Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 41 additions & 39 deletions resources/views/components/productlist.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,47 +9,49 @@
<x-rapidez::productlist :value="false" v-bind:base-filters="() => [{dslQuery}}]"/>
--}}

@if ($value !== [])
@if (!is_iterable($value) || count($value))
<lazy v-slot="{ intersected }">
<listing
{{ $attributes }}
v-if="intersected"
v-slot="listingSlotProps"
v-cloak
>
<div ref="root">
<ais-instant-search
v-if="listingSlotProps.searchClient"
:future="{ preserveSharedStateOnUnmount: true }"
:search-client="listingSlotProps.searchClient"
:index-name="listingSlotProps.index"
:middlewares="listingSlotProps.middlewares"
>
@slotdefault('before')
@if ($value && $value !== [])
<ais-configure :filters="'{{ $field }}:({{ is_array($value)
? implode(' OR ', $value)
: "'+".$value.".join(' OR ')+'"
}})'"/>
@endif
@endslotdefault

<ais-hits v-slot="{ items, sendEvent }" v-bind:transform-items="listingSlotProps.transformItems">
<div v-if="items.length" class="flex flex-col gap-5">
@if ($title)
<strong class="font-bold text-2xl">
@lang($title)
</strong>
@if (!is_iterable($value)) <template v-if="{{ $value }}.length"> @endif
<listing
{{ $attributes }}
v-if="intersected"
v-slot="listingSlotProps"
v-cloak
>
<div ref="root">
<ais-instant-search
v-if="listingSlotProps.searchClient"
:future="{ preserveSharedStateOnUnmount: true }"
:search-client="listingSlotProps.searchClient"
:index-name="listingSlotProps.index"
:middlewares="listingSlotProps.middlewares"
>
@slotdefault('before')
@if ($value && $value !== [])
<ais-configure :filters="'{{ $field }}:({{ is_array($value)
? implode(' OR ', $value)
: "'+".$value.".join(' OR ')+'"
}})'"/>
@endif
@slotdefault('items')
<x-rapidez::slider />
@endslotdefault
</div>
</ais-hits>
@endslotdefault

<ais-hits v-slot="{ items, sendEvent }" v-bind:transform-items="listingSlotProps.transformItems">
<div v-if="items.length" class="flex flex-col gap-5">
@if ($title)
<strong class="font-bold text-2xl">
@lang($title)
</strong>
@endif
@slotdefault('items')
<x-rapidez::slider />
@endslotdefault
</div>
</ais-hits>

{{ $after ?? '' }}
</ais-instant-search>
</div>
</listing>
{{ $after ?? '' }}
</ais-instant-search>
</div>
</listing>
@if (!is_array($value)) </template> @endif
</lazy>
@endif
Loading