|
1 | | -<Suspense> |
2 | | - <template #default> |
3 | | - <autocomplete v-slot="autocompleteSlotProps" :hits-per-page="{{ config('rapidez.frontend.autocomplete.size', 3) }}"> |
4 | | - <div class="relative w-full" ref="root"> |
5 | | - <ais-instant-search |
6 | | - v-if="autocompleteSlotProps.searchClient" |
7 | | - :future="{ preserveSharedStateOnUnmount: true }" |
8 | | - :search-client="autocompleteSlotProps.searchClient" |
9 | | - :middlewares="autocompleteSlotProps.middlewares" |
10 | | - :index-name="config.index.product" |
11 | | - class="contents" |
12 | | - v-cloak |
13 | | - > |
14 | | - <div class="contents"> |
15 | | - <div class="searchbox group/autocomplete"> |
16 | | - <ais-autocomplete> |
17 | | - <template v-slot="{ currentRefinement, refine }"> |
18 | | - <x-rapidez::autocomplete.input |
19 | | - v-bind:value="currentRefinement" |
20 | | - v-on:focus="() => { |
21 | | - refine(autocompleteFacadeQuery || currentRefinement); |
22 | | - autocompleteFacadeQuery = null; |
23 | | - }" |
24 | | - v-on:input="refine($event.currentTarget.value)" |
25 | | - list="search-history" |
26 | | - /> |
27 | | - <div v-on:click="refine('')" class="fixed inset-0 bg-backdrop z-header-autocomplete-overlay hidden group-has-[input:not(:placeholder-shown)]/autocomplete:block group-has-[:focus]/autocomplete:block"></div> |
28 | | - </template> |
29 | | - </ais-autocomplete> |
30 | | - <div class="absolute inset-x-0 top-full mt-1 bg-white rounded-md z-header-autocomplete hidden group-has-[input:not(:placeholder-shown)]/autocomplete:block group-has-[:focus]/autocomplete:block hover:block"> |
31 | | - @include('rapidez::layouts.partials.header.autocomplete.results') |
32 | | - </div> |
33 | | - <ais-stats-analytics></ais-stats-analytics> |
34 | | - </div> |
| 1 | +<autocomplete v-slot="autocompleteSlotProps" :hits-per-page="{{ config('rapidez.frontend.autocomplete.size', 3) }}"> |
| 2 | + <div class="relative w-full" ref="root"> |
| 3 | + <ais-instant-search |
| 4 | + v-if="autocompleteSlotProps.searchClient" |
| 5 | + :future="{ preserveSharedStateOnUnmount: true }" |
| 6 | + :search-client="autocompleteSlotProps.searchClient" |
| 7 | + :middlewares="autocompleteSlotProps.middlewares" |
| 8 | + :index-name="config.index.product" |
| 9 | + class="contents" |
| 10 | + v-cloak |
| 11 | + > |
| 12 | + <div class="contents"> |
| 13 | + <div class="searchbox group/autocomplete"> |
| 14 | + <ais-autocomplete> |
| 15 | + <template v-slot="{ currentRefinement, refine }"> |
| 16 | + <x-rapidez::autocomplete.input |
| 17 | + v-bind:value="currentRefinement" |
| 18 | + v-on:focus="() => { |
| 19 | + refine(autocompleteFacadeQuery || currentRefinement); |
| 20 | + autocompleteFacadeQuery = null; |
| 21 | + }" |
| 22 | + v-on:input="refine($event.currentTarget.value)" |
| 23 | + list="search-history" |
| 24 | + /> |
| 25 | + <div v-on:click="refine('')" class="fixed inset-0 bg-backdrop z-header-autocomplete-overlay hidden group-has-[input:not(:placeholder-shown)]/autocomplete:block group-has-[:focus]/autocomplete:block"></div> |
| 26 | + </template> |
| 27 | + </ais-autocomplete> |
| 28 | + <div class="absolute inset-x-0 top-full mt-1 bg-white rounded-md z-header-autocomplete hidden group-has-[input:not(:placeholder-shown)]/autocomplete:block group-has-[:focus]/autocomplete:block hover:block"> |
| 29 | + @include('rapidez::layouts.partials.header.autocomplete.results') |
35 | 30 | </div> |
36 | | - </ais-instant-search> |
| 31 | + <ais-stats-analytics></ais-stats-analytics> |
| 32 | + </div> |
37 | 33 | </div> |
38 | | - </autocomplete> |
39 | | - </template> |
40 | | - <template #fallback> |
41 | | - <div class="relative w-full"> |
| 34 | + </ais-instant-search> |
| 35 | + <div v-else class="relative w-full"> |
42 | 36 | <x-rapidez::autocomplete.input |
43 | 37 | v-model="autocompleteFacadeQuery" |
44 | 38 | v-on:focus="window.document.dispatchEvent(new window.Event('loadAutoComplete'))" |
45 | 39 | v-on:mouseover="window.document.dispatchEvent(new window.Event('loadAutoComplete'))" |
46 | 40 | /> |
47 | 41 | </div> |
48 | | - </template> |
49 | | -</Suspense> |
| 42 | + </div> |
| 43 | +</autocomplete> |
0 commit comments