@empathyco/x-components 3.0.0-alpha.352 → 3.0.0-alpha.353

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/core/index.js.map +1 -1
  3. package/design-system/full-theme.css +91 -90
  4. package/docs/API-reference/api/x-components.fallbackdisclaimer.md +15 -0
  5. package/docs/API-reference/api/x-components.md +3 -0
  6. package/docs/API-reference/api/x-components.resetfromnoresultswithfilters.md +13 -0
  7. package/docs/API-reference/api/x-components.resetisnoresults.md +13 -0
  8. package/docs/API-reference/api/x-components.searchmutations.md +2 -0
  9. package/docs/API-reference/api/x-components.searchmutations.setfromnoresultswithfilters.md +24 -0
  10. package/docs/API-reference/api/x-components.searchmutations.setisnoresults.md +24 -0
  11. package/docs/API-reference/api/x-components.searchstate.fromnoresultswithfilters.md +13 -0
  12. package/docs/API-reference/api/x-components.searchstate.isnoresults.md +13 -0
  13. package/docs/API-reference/api/x-components.searchstate.md +2 -0
  14. package/docs/API-reference/api/x-components.xcomponentaliasapi.fromnoresultswithfilters.md +13 -0
  15. package/docs/API-reference/api/x-components.xcomponentaliasapi.md +1 -0
  16. package/docs/API-reference/components/facets/x-components.lists/sliced-filters.md +16 -0
  17. package/docs/API-reference/components/history-queries/x-components.my-history.md +21 -0
  18. package/docs/API-reference/components/search/x-components.fallback-disclaimer.md +44 -0
  19. package/js/index.js +2 -1
  20. package/js/index.js.map +1 -1
  21. package/js/plugins/x-plugin.alias.js +4 -1
  22. package/js/plugins/x-plugin.alias.js.map +1 -1
  23. package/js/x-modules/facets/components/lists/sliced-filters.vue.js +2 -0
  24. package/js/x-modules/facets/components/lists/sliced-filters.vue.js.map +1 -1
  25. package/js/x-modules/facets/components/lists/sliced-filters.vue_rollup-plugin-vue_script.vue.js +2 -1
  26. package/js/x-modules/facets/components/lists/sliced-filters.vue_rollup-plugin-vue_script.vue.js.map +1 -1
  27. package/js/x-modules/history-queries/components/my-history.vue.js +1 -0
  28. package/js/x-modules/history-queries/components/my-history.vue.js.map +1 -1
  29. package/js/x-modules/history-queries/components/my-history.vue_rollup-plugin-vue_script.vue.js +2 -1
  30. package/js/x-modules/history-queries/components/my-history.vue_rollup-plugin-vue_script.vue.js.map +1 -1
  31. package/js/x-modules/search/components/fallback-disclaimer.vue.js +72 -0
  32. package/js/x-modules/search/components/fallback-disclaimer.vue.js.map +1 -0
  33. package/js/x-modules/search/components/fallback-disclaimer.vue_rollup-plugin-vue_script.vue.js +167 -0
  34. package/js/x-modules/search/components/fallback-disclaimer.vue_rollup-plugin-vue_script.vue.js.map +1 -0
  35. package/js/x-modules/search/store/actions/reset-request-on-refinement.action.js +4 -1
  36. package/js/x-modules/search/store/actions/reset-request-on-refinement.action.js.map +1 -1
  37. package/js/x-modules/search/store/actions/save-search-response.action.js +10 -1
  38. package/js/x-modules/search/store/actions/save-search-response.action.js.map +1 -1
  39. package/js/x-modules/search/store/emitters.js +3 -1
  40. package/js/x-modules/search/store/emitters.js.map +1 -1
  41. package/js/x-modules/search/store/module.js +9 -1
  42. package/js/x-modules/search/store/module.js.map +1 -1
  43. package/js/x-modules/search/wiring.js +16 -2
  44. package/js/x-modules/search/wiring.js.map +1 -1
  45. package/package.json +2 -2
  46. package/report/x-components.api.json +263 -0
  47. package/report/x-components.api.md +17 -0
  48. package/search/index.js +2 -1
  49. package/types/plugins/x-plugin.alias.d.ts.map +1 -1
  50. package/types/plugins/x-plugin.types.d.ts +2 -0
  51. package/types/plugins/x-plugin.types.d.ts.map +1 -1
  52. package/types/x-modules/facets/components/lists/sliced-filters.vue.d.ts.map +1 -1
  53. package/types/x-modules/history-queries/components/my-history.vue.d.ts.map +1 -1
  54. package/types/x-modules/search/components/fallback-disclaimer.vue.d.ts +10 -0
  55. package/types/x-modules/search/components/fallback-disclaimer.vue.d.ts.map +1 -0
  56. package/types/x-modules/search/components/index.d.ts +1 -0
  57. package/types/x-modules/search/components/index.d.ts.map +1 -1
  58. package/types/x-modules/search/store/actions/reset-request-on-refinement.action.d.ts.map +1 -1
  59. package/types/x-modules/search/store/actions/save-search-response.action.d.ts.map +1 -1
  60. package/types/x-modules/search/store/emitters.d.ts.map +1 -1
  61. package/types/x-modules/search/store/module.d.ts.map +1 -1
  62. package/types/x-modules/search/store/types.d.ts +16 -0
  63. package/types/x-modules/search/store/types.d.ts.map +1 -1
  64. package/types/x-modules/search/wiring.d.ts +14 -0
  65. package/types/x-modules/search/wiring.d.ts.map +1 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,21 @@
3
3
  All notable changes to this project will be documented in this file. See
4
4
  [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [3.0.0-alpha.353](https://github.com/empathyco/x/compare/@empathyco/x-components@3.0.0-alpha.352...@empathyco/x-components@3.0.0-alpha.353) (2023-04-19)
7
+
8
+ ### Features
9
+
10
+ - **search:** add fallback disclaimer component (#1122)
11
+ ([206db77](https://github.com/empathyco/x/commit/206db772b80cfe8a4cab23db19842ea8bd909733)),
12
+ closes [EX-8080](https://searchbroker.atlassian.net/browse/EX-8080)
13
+ - **sliced-filters:** add dynamic prop to show more/less buttons (#1146)
14
+ ([08de5f8](https://github.com/empathyco/x/commit/08de5f827d4ce6b33f04c60655628dabeb19a3bd))
15
+
16
+ # Change Log
17
+
18
+ All notable changes to this project will be documented in this file. See
19
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
20
+
6
21
  ## [3.0.0-alpha.352](https://github.com/empathyco/x/compare/@empathyco/x-components@3.0.0-alpha.351...@empathyco/x-components@3.0.0-alpha.352) (2023-04-18)
7
22
 
8
23
  ### Documentation
package/core/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -2285,84 +2285,25 @@
2285
2285
  --x-size-span-row-item: 1;
2286
2286
  --x-size-start-row-item: 0;
2287
2287
  }
2288
- .x-row--gap-01 {
2289
- --x-size-gap-row: var(--x-size-gap-row-01);
2290
- }
2291
-
2292
- .x-row--gap-02 {
2293
- --x-size-gap-row: var(--x-size-gap-row-02);
2294
- }
2295
-
2296
- .x-row--gap-03 {
2297
- --x-size-gap-row: var(--x-size-gap-row-03);
2298
- }
2299
-
2300
- .x-row--gap-04 {
2301
- --x-size-gap-row: var(--x-size-gap-row-04);
2302
- }
2303
-
2304
- .x-row--gap-05 {
2305
- --x-size-gap-row: var(--x-size-gap-row-05);
2306
- }
2307
-
2308
- .x-row--gap-06 {
2309
- --x-size-gap-row: var(--x-size-gap-row-06);
2310
- }
2311
-
2312
- .x-row--gap-07 {
2313
- --x-size-gap-row: var(--x-size-gap-row-07);
2314
- }
2315
-
2316
- .x-row--gap-08 {
2317
- --x-size-gap-row: var(--x-size-gap-row-08);
2318
- }
2319
-
2320
- .x-row--gap-09 {
2321
- --x-size-gap-row: var(--x-size-gap-row-09);
2322
- }
2323
-
2324
- .x-row--gap-10 {
2325
- --x-size-gap-row: var(--x-size-gap-row-10);
2326
- }
2327
-
2328
- .x-row--gap-11 {
2329
- --x-size-gap-row: var(--x-size-gap-row-11);
2330
- }
2331
-
2332
- .x-row--gap-12 {
2333
- --x-size-gap-row: var(--x-size-gap-row-12);
2334
- }
2335
-
2336
- .x-row--gap-13 {
2337
- --x-size-gap-row: var(--x-size-gap-row-13);
2338
- }
2339
-
2340
- .x-row--gap-14 {
2341
- --x-size-gap-row: var(--x-size-gap-row-14);
2342
- }
2343
-
2344
- .x-row--gap-15 {
2345
- --x-size-gap-row: var(--x-size-gap-row-15);
2346
- }
2347
-
2348
- .x-row--gap-16 {
2349
- --x-size-gap-row: var(--x-size-gap-row-16);
2288
+ /* @deprecated */
2289
+ .x-row--padding-02 {
2290
+ --x-size-padding-row: var(--x-size-padding-row-02);
2350
2291
  }
2351
2292
 
2352
- .x-row--gap-17 {
2353
- --x-size-gap-row: var(--x-size-gap-row-17);
2293
+ .x-row--padding-03 {
2294
+ --x-size-padding-row: var(--x-size-padding-row-03);
2354
2295
  }
2355
2296
 
2356
- .x-row--gap-18 {
2357
- --x-size-gap-row: var(--x-size-gap-row-18);
2297
+ .x-row--padding-04 {
2298
+ --x-size-padding-row: var(--x-size-padding-row-04);
2358
2299
  }
2359
2300
 
2360
- .x-row--gap-19 {
2361
- --x-size-gap-row: var(--x-size-gap-row-19);
2301
+ .x-row--padding-05 {
2302
+ --x-size-padding-row: var(--x-size-padding-row-05);
2362
2303
  }
2363
2304
 
2364
- .x-row--gap-20 {
2365
- --x-size-gap-row: var(--x-size-gap-row-20);
2305
+ .x-row--padding-06 {
2306
+ --x-size-padding-row: var(--x-size-padding-row-06);
2366
2307
  }
2367
2308
  :root {
2368
2309
  --x-size-gap-row-01: var(--x-size-base-01);
@@ -2387,26 +2328,6 @@
2387
2328
  --x-size-gap-row-20: var(--x-size-base-20);
2388
2329
  }
2389
2330
  /* @deprecated */
2390
- .x-row--padding-02 {
2391
- --x-size-padding-row: var(--x-size-padding-row-02);
2392
- }
2393
-
2394
- .x-row--padding-03 {
2395
- --x-size-padding-row: var(--x-size-padding-row-03);
2396
- }
2397
-
2398
- .x-row--padding-04 {
2399
- --x-size-padding-row: var(--x-size-padding-row-04);
2400
- }
2401
-
2402
- .x-row--padding-05 {
2403
- --x-size-padding-row: var(--x-size-padding-row-05);
2404
- }
2405
-
2406
- .x-row--padding-06 {
2407
- --x-size-padding-row: var(--x-size-padding-row-06);
2408
- }
2409
- /* @deprecated */
2410
2331
  :root {
2411
2332
  --x-size-padding-row-02: var(--x-size-base-02);
2412
2333
  --x-size-padding-row-03: var(--x-size-base-03);
@@ -5510,6 +5431,7 @@
5510
5431
  [dir="rtl"] .x-padding--left-20 {
5511
5432
  padding-right: var(--x-size-base-20) !important;
5512
5433
  }
5434
+
5513
5435
  .x-static {
5514
5436
  position: static !important;
5515
5437
  }
@@ -5529,3 +5451,82 @@
5529
5451
  .x-sticky {
5530
5452
  position: sticky !important;
5531
5453
  }
5454
+ .x-row--gap-01 {
5455
+ --x-size-gap-row: var(--x-size-gap-row-01);
5456
+ }
5457
+
5458
+ .x-row--gap-02 {
5459
+ --x-size-gap-row: var(--x-size-gap-row-02);
5460
+ }
5461
+
5462
+ .x-row--gap-03 {
5463
+ --x-size-gap-row: var(--x-size-gap-row-03);
5464
+ }
5465
+
5466
+ .x-row--gap-04 {
5467
+ --x-size-gap-row: var(--x-size-gap-row-04);
5468
+ }
5469
+
5470
+ .x-row--gap-05 {
5471
+ --x-size-gap-row: var(--x-size-gap-row-05);
5472
+ }
5473
+
5474
+ .x-row--gap-06 {
5475
+ --x-size-gap-row: var(--x-size-gap-row-06);
5476
+ }
5477
+
5478
+ .x-row--gap-07 {
5479
+ --x-size-gap-row: var(--x-size-gap-row-07);
5480
+ }
5481
+
5482
+ .x-row--gap-08 {
5483
+ --x-size-gap-row: var(--x-size-gap-row-08);
5484
+ }
5485
+
5486
+ .x-row--gap-09 {
5487
+ --x-size-gap-row: var(--x-size-gap-row-09);
5488
+ }
5489
+
5490
+ .x-row--gap-10 {
5491
+ --x-size-gap-row: var(--x-size-gap-row-10);
5492
+ }
5493
+
5494
+ .x-row--gap-11 {
5495
+ --x-size-gap-row: var(--x-size-gap-row-11);
5496
+ }
5497
+
5498
+ .x-row--gap-12 {
5499
+ --x-size-gap-row: var(--x-size-gap-row-12);
5500
+ }
5501
+
5502
+ .x-row--gap-13 {
5503
+ --x-size-gap-row: var(--x-size-gap-row-13);
5504
+ }
5505
+
5506
+ .x-row--gap-14 {
5507
+ --x-size-gap-row: var(--x-size-gap-row-14);
5508
+ }
5509
+
5510
+ .x-row--gap-15 {
5511
+ --x-size-gap-row: var(--x-size-gap-row-15);
5512
+ }
5513
+
5514
+ .x-row--gap-16 {
5515
+ --x-size-gap-row: var(--x-size-gap-row-16);
5516
+ }
5517
+
5518
+ .x-row--gap-17 {
5519
+ --x-size-gap-row: var(--x-size-gap-row-17);
5520
+ }
5521
+
5522
+ .x-row--gap-18 {
5523
+ --x-size-gap-row: var(--x-size-gap-row-18);
5524
+ }
5525
+
5526
+ .x-row--gap-19 {
5527
+ --x-size-gap-row: var(--x-size-gap-row-19);
5528
+ }
5529
+
5530
+ .x-row--gap-20 {
5531
+ --x-size-gap-row: var(--x-size-gap-row-20);
5532
+ }
@@ -0,0 +1,15 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [FallbackDisclaimer](./x-components.fallbackdisclaimer.md)
4
+
5
+ ## FallbackDisclaimer class
6
+
7
+ The `FallbackDisclaimer` component shows a message if the filters have been removed from the current search because there were no results.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ export default class FallbackDisclaimer extends Vue
13
+ ```
14
+ **Extends:** Vue
15
+
@@ -71,6 +71,7 @@ X-Components is a library usable everywhere not only for search experiences.
71
71
  | [FacetsProvider](./x-components.facetsprovider.md) | This component allows to provide facets by prop, to add them to the state of the <code>Facets X-Module</code>. These facets will be added to the <code>Facets X-Module</code> state together with the facets emitted by the <code>Search X-Module</code> through the [SearchXEvents.FacetsChanged](./x-components.searchxevents.facetschanged.md) event. |
72
72
  | [Fade](./x-components.fade.md) | Renders a transition wrapping the element passed in the default slot. The animation just fades in/out the element by changing its opacity. |
73
73
  | [FadeAndSlide](./x-components.fadeandslide.md) | Renders a transition group wrapping the elements passed in the default slot and animating them with a fade and slide animation. |
74
+ | [FallbackDisclaimer](./x-components.fallbackdisclaimer.md) | The <code>FallbackDisclaimer</code> component shows a message if the filters have been removed from the current search because there were no results. |
74
75
  | [FiltersInjectionMixin](./x-components.filtersinjectionmixin.md) | Mixin to share filters injection logic. |
75
76
  | [FiltersList](./x-components.filterslist.md) | Renders a list with a list item per each [BooleanFilter](./x-types.booleanfilter.md) in the filters prop array. Each list item has a scoped slot, passing the filter as slot prop. |
76
77
  | [FiltersSearch](./x-components.filterssearch.md) | Renders the filters sifted with the input query. |
@@ -527,6 +528,8 @@ X-Components is a library usable everywhere not only for search experiences.
527
528
  | [removeFromHistory](./x-components.removefromhistory.md) | Default implementation for the [HistoryQueriesActions.removeFromHistory()](./x-components.historyqueriesactions.removefromhistory.md)<!-- -->. |
528
529
  | [removeHistoryQuery](./x-components.removehistoryquery.md) | Removes a single history query from the history queries. |
529
530
  | [resetAppending](./x-components.resetappending.md) | Resets the search state <code>isAppendingResults</code>. |
531
+ | [resetFromNoResultsWithFilters](./x-components.resetfromnoresultswithfilters.md) | Resets the search state <code>fromNoResultsWithFilters</code>. |
532
+ | [resetIsNoResults](./x-components.resetisnoresults.md) | Resets the search state <code>isNoResults</code>. |
530
533
  | [resetRequestOnRefinement](./x-components.resetrequestonrefinement.md) | Default implementation for the [SearchActions.resetRequestOnRefinement()](./x-components.searchactions.resetrequestonrefinement.md)<!-- -->. |
531
534
  | [resetRequestOnRefinementWire](./x-components.resetrequestonrefinementwire.md) | Resets the [SearchGetters.request](./x-components.searchgetters.request.md) parameters when refining request and before the actual request is launched. |
532
535
  | [resetResultsPreviewWire](./x-components.resetresultspreviewwire.md) | Resets the next query preview results. |
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [resetFromNoResultsWithFilters](./x-components.resetfromnoresultswithfilters.md)
4
+
5
+ ## resetFromNoResultsWithFilters variable
6
+
7
+ Resets the search state `fromNoResultsWithFilters`<!-- -->.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ resetFromNoResultsWithFilters: import("../../wiring").AnyWire
13
+ ```
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [resetIsNoResults](./x-components.resetisnoresults.md)
4
+
5
+ ## resetIsNoResults variable
6
+
7
+ Resets the search state `isNoResults`<!-- -->.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ resetIsNoResults: import("../../wiring").AnyWire
13
+ ```
@@ -21,7 +21,9 @@ export interface SearchMutations extends StatusMutations, QueryMutations
21
21
  | [resetState()](./x-components.searchmutations.resetstate.md) | Resets the "resettable" part of the Search state to the initial state. See the for details. |
22
22
  | [setBanners(banners)](./x-components.searchmutations.setbanners.md) | Sets the banners of the module. |
23
23
  | [setFacets(facets)](./x-components.searchmutations.setfacets.md) | Sets the facets of the module. |
24
+ | [setFromNoResultsWithFilters(fromNoResultsWithFilters)](./x-components.searchmutations.setfromnoresultswithfilters.md) | Sets the <code>fromNoResultsWithFilters</code> flag value. |
24
25
  | [setIsAppendResults(isAppendResults)](./x-components.searchmutations.setisappendresults.md) | Set the <code>isAppendResuls</code> flag value. |
26
+ | [setIsNoResults(isNoResults)](./x-components.searchmutations.setisnoresults.md) | Sets the <code>isNoResults</code> flag value. |
25
27
  | [setOrigin(origin)](./x-components.searchmutations.setorigin.md) | Sets the origin of the module. |
26
28
  | [setPage(page)](./x-components.searchmutations.setpage.md) | Sets the page of the module. |
27
29
  | [setPageSize(pageSize)](./x-components.searchmutations.setpagesize.md) | Sets the page size of the module. |
@@ -0,0 +1,24 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [SearchMutations](./x-components.searchmutations.md) &gt; [setFromNoResultsWithFilters](./x-components.searchmutations.setfromnoresultswithfilters.md)
4
+
5
+ ## SearchMutations.setFromNoResultsWithFilters() method
6
+
7
+ Sets the `fromNoResultsWithFilters` flag value.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ setFromNoResultsWithFilters(fromNoResultsWithFilters: boolean): void;
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Type | Description |
18
+ | --- | --- | --- |
19
+ | fromNoResultsWithFilters | boolean | The new flag value. |
20
+
21
+ **Returns:**
22
+
23
+ void
24
+
@@ -0,0 +1,24 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [SearchMutations](./x-components.searchmutations.md) &gt; [setIsNoResults](./x-components.searchmutations.setisnoresults.md)
4
+
5
+ ## SearchMutations.setIsNoResults() method
6
+
7
+ Sets the `isNoResults` flag value.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ setIsNoResults(isNoResults: boolean): void;
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Type | Description |
18
+ | --- | --- | --- |
19
+ | isNoResults | boolean | The new flag value. |
20
+
21
+ **Returns:**
22
+
23
+ void
24
+
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [SearchState](./x-components.searchstate.md) &gt; [fromNoResultsWithFilters](./x-components.searchstate.fromnoresultswithfilters.md)
4
+
5
+ ## SearchState.fromNoResultsWithFilters property
6
+
7
+ Flag indicating if there is a no results situation with filters selected
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ fromNoResultsWithFilters: boolean;
13
+ ```
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [SearchState](./x-components.searchstate.md) &gt; [isNoResults](./x-components.searchstate.isnoresults.md)
4
+
5
+ ## SearchState.isNoResults property
6
+
7
+ Flag indicating if there is a no results situation
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ isNoResults: boolean;
13
+ ```
@@ -20,7 +20,9 @@ export interface SearchState extends StatusState, QueryState
20
20
  | [banners](./x-components.searchstate.banners.md) | | Banner\[\] | The list of the banners, related to the <code>query</code> property of the state. |
21
21
  | [config](./x-components.searchstate.config.md) | | [SearchConfig](./x-components.searchconfig.md) | The configuration of the search module. |
22
22
  | [facets](./x-components.searchstate.facets.md) | | Facet\[\] | The list of the facets, related to the <code>query</code> property of the state. |
23
+ | [fromNoResultsWithFilters](./x-components.searchstate.fromnoresultswithfilters.md) | | boolean | Flag indicating if there is a no results situation with filters selected |
23
24
  | [isAppendResults](./x-components.searchstate.isappendresults.md) | | boolean | A flag to indicate if new results are append to the current instead of replacing them. |
25
+ | [isNoResults](./x-components.searchstate.isnoresults.md) | | boolean | Flag indicating if there is a no results situation |
24
26
  | [origin](./x-components.searchstate.origin.md) | | [QueryOrigin](./x-components.queryorigin.md) \| null | The origin property of the request. |
25
27
  | [page](./x-components.searchstate.page.md) | | number | The current page of the request. |
26
28
  | [params](./x-components.searchstate.params.md) | | Dictionary&lt;unknown&gt; | The extra params property of the state. |
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [XComponentAliasAPI](./x-components.xcomponentaliasapi.md) &gt; [fromNoResultsWithFilters](./x-components.xcomponentaliasapi.fromnoresultswithfilters.md)
4
+
5
+ ## XComponentAliasAPI.fromNoResultsWithFilters property
6
+
7
+ The [SearchXModule](./x-components.searchxmodule.md) no results with filters flag.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ readonly fromNoResultsWithFilters: Readonly<boolean>;
13
+ ```
@@ -18,6 +18,7 @@ export interface XComponentAliasAPI
18
18
  | --- | --- | --- | --- |
19
19
  | [device](./x-components.xcomponentaliasapi.device.md) | <code>readonly</code> | string \| null | The [DeviceXModule](./x-components.devicexmodule.md) detected device. |
20
20
  | [facets](./x-components.xcomponentaliasapi.facets.md) | <code>readonly</code> | Record&lt;Facet\['id'\], Facet&gt; | The [FacetsXModule](./x-components.facetsxmodule.md) facets. |
21
+ | [fromNoResultsWithFilters](./x-components.xcomponentaliasapi.fromnoresultswithfilters.md) | <code>readonly</code> | Readonly&lt;boolean&gt; | The [SearchXModule](./x-components.searchxmodule.md) no results with filters flag. |
21
22
  | [fullHistoryQueries](./x-components.xcomponentaliasapi.fullhistoryqueries.md) | <code>readonly</code> | ReadonlyArray&lt;HistoryQuery&gt; | The [HistoryQueriesXModule](./x-components.historyqueriesxmodule.md) history queries. |
22
23
  | [historyQueries](./x-components.xcomponentaliasapi.historyqueries.md) | <code>readonly</code> | ReadonlyArray&lt;HistoryQuery&gt; | The [HistoryQueriesXModule](./x-components.historyqueriesxmodule.md) history queries matching the query. |
23
24
  | [historyQueriesWithResults](./x-components.xcomponentaliasapi.historyquerieswithresults.md) | <code>readonly</code> | ReadonlyArray&lt;HistoryQuery&gt; | The [HistoryQueriesXModule](./x-components.historyqueriesxmodule.md) history queries with 1 or more results. |
@@ -97,3 +97,19 @@ filters list to their children, it is mandatory to send it as prop.
97
97
  </SlicedFilters>
98
98
  </Facets>
99
99
  ```
100
+
101
+ ### Customizing the items with classes
102
+
103
+ The `buttonClass` prop can be used to add classes to the show more/less buttons.
104
+
105
+ ```vue live
106
+ <Facets v-slot="{ facet }">
107
+ <SlicedFilters :filters="facet.filters" :max="4" buttonClass="x-facet-filter-lg">
108
+ <Filters v-slot="{ filter }">
109
+ <SimpleFilter :filter="filter"/>
110
+ </Filters>
111
+ <template #show-more="{ difference }">Show {{ difference }} more filters</template>
112
+ <template #show-less="{ difference }">Show {{ difference }} less filters</template>
113
+ </SlicedFilters>
114
+ </Facets>
115
+ ```
@@ -192,3 +192,24 @@ icon to remove the history query.
192
192
  };
193
193
  </script>
194
194
  ```
195
+
196
+ ### Customizing the items with classes
197
+
198
+ The `queriesListClass` prop can be used to add classes to the suggestions list.
199
+
200
+ ```vue live
201
+ <template>
202
+ <MyHistory #date="{ date }" queriesListClass="x-gap-16" />
203
+ </template>
204
+
205
+ <script>
206
+ import { MyHistory } from '@empathyco/x-components/history-queries';
207
+
208
+ export default {
209
+ name: 'MyHistoryDemo',
210
+ components: {
211
+ MyHistory
212
+ }
213
+ };
214
+ </script>
215
+ ```
@@ -0,0 +1,44 @@
1
+ ---
2
+
3
+ title: FallbackDisclaimer
4
+
5
+ ---
6
+
7
+ # FallbackDisclaimer
8
+
9
+ ## Slots
10
+
11
+ | Name | Description | Bindings<br />(name - type - description) |
12
+ | -------------------- | ----------- | ----------------------------------------- |
13
+ | <code>default</code> | | |
14
+
15
+ ## Examples
16
+
17
+ This default fallback disclaimer component reads the query from the search state and passes it to
18
+ its default slot. This component will be rendered if there is a no results with filters situation.
19
+
20
+ ### Basic usage
21
+
22
+ ```vue
23
+ <FallbackDisclaimer />
24
+ ```
25
+
26
+ ### Customizing its contents
27
+
28
+ ```vue
29
+ <FallbackDisclaimer>
30
+ <template #default="{ query }">
31
+ No results found for '{{ query }}' with the selected filters. The filters have been unselected.
32
+ </template>
33
+ </FallbackDisclaimer>
34
+
35
+ <script>
36
+ import { FallbackDisclaimer } from '@empathyco/x-components/search';
37
+
38
+ export default {
39
+ components: {
40
+ FallbackDisclaimer
41
+ }
42
+ };
43
+ </script>
44
+ ```
package/js/index.js CHANGED
@@ -345,6 +345,7 @@ export { clearPendingScrollToWire, scrollWiring, setPendingScrollToWire, setScro
345
345
  export { scrollXModule } from './x-modules/scroll/x-module.js';
346
346
  export { default as Banner } from './x-modules/search/components/banner.vue.js';
347
347
  export { default as BannersList } from './x-modules/search/components/banners-list.vue.js';
348
+ export { default as FallbackDisclaimer } from './x-modules/search/components/fallback-disclaimer.vue.js';
348
349
  export { default as PartialQueryButton } from './x-modules/search/components/partial-query-button.vue.js';
349
350
  export { default as PartialResultsList } from './x-modules/search/components/partial-results-list.vue.js';
350
351
  export { default as Promoted } from './x-modules/search/components/promoted.vue.js';
@@ -367,7 +368,7 @@ export { searchEmitters } from './x-modules/search/store/emitters.js';
367
368
  export { request as searchRequest } from './x-modules/search/store/getters/request.getter.js';
368
369
  export { query as searchQuery } from './x-modules/search/store/getters/query.getter.js';
369
370
  export { resettableState, searchXStoreModule } from './x-modules/search/store/module.js';
370
- export { cancelFetchAndSaveSearchResponseWire, clearSearchQuery, fetchAndSaveSearchResponseWire, increasePageAppendingResultsWire, resetAppending, resetRequestOnRefinementWire, resetSpellcheckQuery, resetStateIfNoRequestWire, saveOriginWire, searchWiring, setRelatedTags, setSearchExtraParams, setSearchPage, setSearchQuery, setSelectedFilters, setSort, setUrlParams } from './x-modules/search/wiring.js';
371
+ export { cancelFetchAndSaveSearchResponseWire, clearSearchQuery, fetchAndSaveSearchResponseWire, increasePageAppendingResultsWire, resetAppending, resetFromNoResultsWithFilters, resetIsNoResults, resetRequestOnRefinementWire, resetSpellcheckQuery, resetStateIfNoRequestWire, saveOriginWire, searchWiring, setRelatedTags, setSearchExtraParams, setSearchPage, setSearchQuery, setSelectedFilters, setSort, setUrlParams } from './x-modules/search/wiring.js';
371
372
  export { searchXModule } from './x-modules/search/x-module.js';
372
373
  export { default as ClearSearchInput } from './x-modules/search-box/components/clear-search-input.vue.js';
373
374
  export { default as SearchButton } from './x-modules/search-box/components/search-button.vue.js';
package/js/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -63,6 +63,9 @@ function getAliasAPI(component) {
63
63
  get isHistoryQueriesEnabled() {
64
64
  return component.$store.state.x.historyQueries?.isEnabled ?? false;
65
65
  },
66
+ get fromNoResultsWithFilters() {
67
+ return component.$store.state.x.search?.fromNoResultsWithFilters ?? false;
68
+ },
66
69
  get identifierResults() {
67
70
  return component.$store.state.x.identifierResults?.identifierResults ?? [];
68
71
  },
@@ -76,7 +79,7 @@ function getAliasAPI(component) {
76
79
  return component.$store.getters[getGetterPath('nextQueries', 'nextQueries')] ?? [];
77
80
  },
78
81
  get noResults() {
79
- return !this.totalResults && !!this.query.search && this.status.search === 'success';
82
+ return component.$store.state.x.search?.isNoResults ?? false;
80
83
  },
81
84
  get partialResults() {
82
85
  return component.$store.state.x.search?.partialResults ?? [];
@@ -1 +1 @@
1
- {"version":3,"file":"x-plugin.alias.js","sources":["../../../src/plugins/x-plugin.alias.ts"],"sourcesContent":["import Vue from 'vue';\nimport { RequestStatus } from '../store/utils/status-store.utils';\nimport {\n XComponentAliasAPI,\n XComponentAliasQueryAPI,\n XComponentAliasStatusAPI\n} from './x-plugin.types';\nimport { getGetterPath } from './x-plugin.utils';\n\n/**\n * Creates an object containing the alias part of {@link XComponentAPI}.\n *\n * @param component - The component with the store from which retrieve the data.\n * @returns An object containing the alias part of the {@link XComponentAPI}.\n *\n * @internal\n */\nexport function getAliasAPI(component: Vue): XComponentAliasAPI {\n const queryModules = [\n 'facets',\n 'searchBox',\n 'nextQueries',\n 'querySuggestions',\n 'relatedTags',\n 'search'\n ] as const;\n const statusModules = [\n 'identifierResults',\n 'nextQueries',\n 'popularSearches',\n 'querySuggestions',\n 'recommendations',\n 'relatedTags',\n 'search'\n ] as const;\n\n const query = queryModules.reduce((acc, moduleName) => {\n return Object.defineProperty(acc, moduleName, {\n get(): string {\n return component.$store.state.x[moduleName]?.query ?? '';\n },\n enumerable: true\n });\n }, {} as XComponentAliasQueryAPI);\n const status = statusModules.reduce((acc, moduleName) => {\n return Object.defineProperty(acc, moduleName, {\n get(): RequestStatus | undefined {\n return component.$store.state.x[moduleName]?.status;\n },\n enumerable: true\n });\n }, {} as XComponentAliasStatusAPI);\n\n return {\n query,\n status,\n get device() {\n return component.$store.state.x.device?.name ?? null;\n },\n get facets() {\n return component.$store.getters[getGetterPath('facets', 'facets')] ?? {};\n },\n get historyQueries() {\n return component.$store.getters[getGetterPath('historyQueries', 'historyQueries')] ?? [];\n },\n get historyQueriesWithResults() {\n return (\n component.$store.getters[getGetterPath('historyQueries', 'historyQueriesWithResults')] ?? []\n );\n },\n get fullHistoryQueries() {\n return component.$store.state.x.historyQueries?.historyQueries ?? [];\n },\n get isHistoryQueriesEnabled() {\n return component.$store.state.x.historyQueries?.isEnabled ?? false;\n },\n get identifierResults() {\n return component.$store.state.x.identifierResults?.identifierResults ?? [];\n },\n get searchBoxStatus() {\n return component.$store.state.x.searchBox?.inputStatus ?? undefined;\n },\n get isEmpathizeOpen() {\n return component.$store.state.x.empathize?.isOpen ?? false;\n },\n get nextQueries() {\n return component.$store.getters[getGetterPath('nextQueries', 'nextQueries')] ?? [];\n },\n get noResults() {\n return !this.totalResults && !!this.query.search && this.status.search === 'success';\n },\n get partialResults() {\n return component.$store.state.x.search?.partialResults ?? [];\n },\n get popularSearches() {\n return component.$store.state.x.popularSearches?.popularSearches ?? [];\n },\n get querySuggestions() {\n return component.$store.state.x.querySuggestions?.suggestions ?? [];\n },\n get recommendations() {\n return component.$store.state.x.recommendations?.recommendations ?? [];\n },\n get redirections() {\n return component.$store.state.x.search?.redirections ?? [];\n },\n get relatedTags() {\n return component.$store.getters[getGetterPath('relatedTags', 'relatedTags')] ?? [];\n },\n get results() {\n return component.$store.state.x.search?.results ?? [];\n },\n get scroll() {\n return component.$store.state.x.scroll?.data ?? {};\n },\n get selectedFilters() {\n return component.$store.getters[getGetterPath('facets', 'selectedFilters')] ?? [];\n },\n get selectedRelatedTags() {\n return component.$store.state.x.relatedTags?.selectedRelatedTags ?? [];\n },\n get spellcheckedQuery() {\n return component.$store.state.x.search?.spellcheckedQuery ?? null;\n },\n get totalResults() {\n return component.$store.state.x.search?.totalResults ?? 0;\n },\n get selectedSort() {\n return component.$store.state.x.search?.sort ?? '';\n }\n };\n}\n"],"names":[],"mappings":";;AASA;;;;;;;AAOG;AACG,SAAU,WAAW,CAAC,SAAc,EAAA;AACxC,IAAA,MAAM,YAAY,GAAG;QACnB,QAAQ;QACR,WAAW;QACX,aAAa;QACb,kBAAkB;QAClB,aAAa;QACb,QAAQ;KACA,CAAC;AACX,IAAA,MAAM,aAAa,GAAG;QACpB,mBAAmB;QACnB,aAAa;QACb,iBAAiB;QACjB,kBAAkB;QAClB,iBAAiB;QACjB,aAAa;QACb,QAAQ;KACA,CAAC;IAEX,MAAM,KAAK,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,UAAU,KAAI;AACpD,QAAA,OAAO,MAAM,CAAC,cAAc,CAAC,GAAG,EAAE,UAAU,EAAE;YAC5C,GAAG,GAAA;AACD,gBAAA,OAAO,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,EAAE,KAAK,IAAI,EAAE,CAAC;aAC1D;AACD,YAAA,UAAU,EAAE,IAAI;AACjB,SAAA,CAAC,CAAC;KACJ,EAAE,EAA6B,CAAC,CAAC;IAClC,MAAM,MAAM,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,UAAU,KAAI;AACtD,QAAA,OAAO,MAAM,CAAC,cAAc,CAAC,GAAG,EAAE,UAAU,EAAE;YAC5C,GAAG,GAAA;AACD,gBAAA,OAAO,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;aACrD;AACD,YAAA,UAA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AS,CAAC,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC,IAAI,EAAE,CAAC;SACpF;AACD,QAAA,IAAI,OAAO,GAAA;AACT,YAAA,OAAO,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,IAAI,EAAE,CAAC;SACvD;AACD,QAAA,IAAI,MAAM,GAAA;AACR,YAAA,OAAO,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,IAAI,IAAI,EAAE,CAAC;SACpD;AACD,QAAA,IAAI,eAAe,GAAA;AACjB,YAAA,OAAO,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,QAAQ,EAAE,iBAAiB,CAAC,CAAC,IAAI,EAAE,CAAC;SACnF;AACD,QAAA,IAAI,mBAAmB,GAAA;AACrB,YAAA,OAAO,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,WAAW,EAAE,mBAAmB,IAAI,EAAE,CAAC;SACxE;AACD,QAAA,IAAI,iBAAiB,GAAA;AACnB,YAAA,OAAO,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,iBAAiB,IAAI,IAAI,CAAC;SACnE;AACD,QAAA,IAAI,YAAY,GAAA;AACd,YAAA,OAAO,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,YAAY,IAAI,CAAC,CAAC;SAC3D;AACD,QAAA,IAAI,YAAY,GAAA;AACd,YAAA,OAAO,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,IAAI,IAAI,EAAE,CAAC;SACpD;KACF,CAAC;AACJ;;;;"}
1
+ {"version":3,"file":"x-plugin.alias.js","sources":["../../../src/plugins/x-plugin.alias.ts"],"sourcesContent":["import Vue from 'vue';\nimport { RequestStatus } from '../store/utils/status-store.utils';\nimport {\n XComponentAliasAPI,\n XComponentAliasQueryAPI,\n XComponentAliasStatusAPI\n} from './x-plugin.types';\nimport { getGetterPath } from './x-plugin.utils';\n\n/**\n * Creates an object containing the alias part of {@link XComponentAPI}.\n *\n * @param component - The component with the store from which retrieve the data.\n * @returns An object containing the alias part of the {@link XComponentAPI}.\n *\n * @internal\n */\nexport function getAliasAPI(component: Vue): XComponentAliasAPI {\n const queryModules = [\n 'facets',\n 'searchBox',\n 'nextQueries',\n 'querySuggestions',\n 'relatedTags',\n 'search'\n ] as const;\n const statusModules = [\n 'identifierResults',\n 'nextQueries',\n 'popularSearches',\n 'querySuggestions',\n 'recommendations',\n 'relatedTags',\n 'search'\n ] as const;\n\n const query = queryModules.reduce((acc, moduleName) => {\n return Object.defineProperty(acc, moduleName, {\n get(): string {\n return component.$store.state.x[moduleName]?.query ?? '';\n },\n enumerable: true\n });\n }, {} as XComponentAliasQueryAPI);\n const status = statusModules.reduce((acc, moduleName) => {\n return Object.defineProperty(acc, moduleName, {\n get(): RequestStatus | undefined {\n return component.$store.state.x[moduleName]?.status;\n },\n enumerable: true\n });\n }, {} as XComponentAliasStatusAPI);\n\n return {\n query,\n status,\n get device() {\n return component.$store.state.x.device?.name ?? null;\n },\n get facets() {\n return component.$store.getters[getGetterPath('facets', 'facets')] ?? {};\n },\n get historyQueries() {\n return component.$store.getters[getGetterPath('historyQueries', 'historyQueries')] ?? [];\n },\n get historyQueriesWithResults() {\n return (\n component.$store.getters[getGetterPath('historyQueries', 'historyQueriesWithResults')] ?? []\n );\n },\n get fullHistoryQueries() {\n return component.$store.state.x.historyQueries?.historyQueries ?? [];\n },\n get isHistoryQueriesEnabled() {\n return component.$store.state.x.historyQueries?.isEnabled ?? false;\n },\n get fromNoResultsWithFilters() {\n return component.$store.state.x.search?.fromNoResultsWithFilters ?? false;\n },\n get identifierResults() {\n return component.$store.state.x.identifierResults?.identifierResults ?? [];\n },\n get searchBoxStatus() {\n return component.$store.state.x.searchBox?.inputStatus ?? undefined;\n },\n get isEmpathizeOpen() {\n return component.$store.state.x.empathize?.isOpen ?? false;\n },\n get nextQueries() {\n return component.$store.getters[getGetterPath('nextQueries', 'nextQueries')] ?? [];\n },\n get noResults() {\n return component.$store.state.x.search?.isNoResults ?? false;\n },\n get partialResults() {\n return component.$store.state.x.search?.partialResults ?? [];\n },\n get popularSearches() {\n return component.$store.state.x.popularSearches?.popularSearches ?? [];\n },\n get querySuggestions() {\n return component.$store.state.x.querySuggestions?.suggestions ?? [];\n },\n get recommendations() {\n return component.$store.state.x.recommendations?.recommendations ?? [];\n },\n get redirections() {\n return component.$store.state.x.search?.redirections ?? [];\n },\n get relatedTags() {\n return component.$store.getters[getGetterPath('relatedTags', 'relatedTags')] ?? [];\n },\n get results() {\n return component.$store.state.x.search?.results ?? [];\n },\n get scroll() {\n return component.$store.state.x.scroll?.data ?? {};\n },\n get selectedFilters() {\n return component.$store.getters[getGetterPath('facets', 'selectedFilters')] ?? [];\n },\n get selectedRelatedTags() {\n return component.$store.state.x.relatedTags?.selectedRelatedTags ?? [];\n },\n get spellcheckedQuery() {\n return component.$store.state.x.search?.spellcheckedQuery ?? null;\n },\n get totalResults() {\n return component.$store.state.x.search?.totalResults ?? 0;\n },\n get selectedSort() {\n return component.$store.state.x.search?.sort ?? '';\n }\n };\n}\n"],"names":[],"mappings":";;AASA;;;;;;;AAOG;AACG,SAAU,WAAW,CAAC,SAAc,EAAA;AACxC,IAAA,MAAM,YAAY,GAAG;QACnB,QAAQ;QACR,WAAW;QACX,aAAa;QACb,kBAAkB;QAClB,aAAa;QACb,QAAQ;KACA,CAAC;AACX,IAAA,MAAM,aAAa,GAAG;QACpB,mBAAmB;QACnB,aAAa;QACb,iBAAiB;QACjB,kBAAkB;QAClB,iBAAiB;QACjB,aAAa;QACb,QAAQ;KACA,CAAC;IAEX,MAAM,KAAK,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,UAAU,KAAI;AACpD,QAAA,OAAO,MAAM,CAAC,cAAc,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AAC,KAAK,CAAC,CAAC,CAAC,WAAW,EAAE,mBAAmB,IAAI,EAAE,CAAC;SACxE;AACD,QAAA,IAAI,iBAAiB,GAAA;AACnB,YAAA,OAAO,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,iBAAiB,IAAI,IAAI,CAAC;SACnE;AACD,QAAA,IAAI,YAAY,GAAA;AACd,YAAA,OAAO,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,YAAY,IAAI,CAAC,CAAC;SAC3D;AACD,QAAA,IAAI,YAAY,GAAA;AACd,YAAA,OAAO,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,IAAI,IAAI,EAAE,CAAC;SACpD;KACF,CAAC;AACJ;;;;"}
@@ -26,6 +26,7 @@ var __vue_render__ = function () {
26
26
  {
27
27
  staticClass:
28
28
  "x-facet-filter x-sliced-filters__button x-sliced-filters__button--show-more",
29
+ class: _vm.buttonClass,
29
30
  attrs: { "data-test": "sliced-filters-show-more-button" },
30
31
  on: { click: _vm.toggleShowMoreFilters },
31
32
  },
@@ -53,6 +54,7 @@ var __vue_render__ = function () {
53
54
  {
54
55
  staticClass:
55
56
  "x-facet-filter x-sliced-filters__button x-sliced-filters__button--show-less",
57
+ class: _vm.buttonClass,
56
58
  attrs: { "data-test": "sliced-filters-show-less-button" },
57
59
  on: { click: _vm.toggleShowMoreFilters },
58
60
  },