@empathyco/x-components 6.0.0-alpha.219 → 6.0.0-alpha.220

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 (157) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/docs/API-reference/components/ai/x-components.ai-overview.md +4 -4
  3. package/docs/API-reference/components/common/animations/x-components.animate-width.md +4 -4
  4. package/docs/API-reference/components/common/animations/x-components.change-height.md +10 -6
  5. package/docs/API-reference/components/common/animations/x-components.collapse-height.md +15 -11
  6. package/docs/API-reference/components/common/animations/x-components.collapse-width.md +12 -10
  7. package/docs/API-reference/components/common/animations/x-components.cross-fade.md +9 -9
  8. package/docs/API-reference/components/common/animations/x-components.fade-and-slide.md +6 -6
  9. package/docs/API-reference/components/common/animations/x-components.fade.md +9 -9
  10. package/docs/API-reference/components/common/animations/x-components.no-animation.md +2 -2
  11. package/docs/API-reference/components/common/animations/x-components.staggered-fade-and-slide.md +5 -5
  12. package/docs/API-reference/components/common/column-picker/x-components.base-column-picker-dropdown.md +13 -9
  13. package/docs/API-reference/components/common/column-picker/x-components.base-column-picker-list.md +18 -18
  14. package/docs/API-reference/components/common/currency/x-components.base-currency.md +15 -15
  15. package/docs/API-reference/components/common/filters/labels/x-components.base-price-filter-label.md +6 -2
  16. package/docs/API-reference/components/common/filters/labels/x-components.base-rating-filter-label.md +26 -26
  17. package/docs/API-reference/components/common/layouts/x-components.fixed-header-and-asides-layout.md +1 -1
  18. package/docs/API-reference/components/common/layouts/x-components.multi-column-max-width-layout.md +1 -1
  19. package/docs/API-reference/components/common/layouts/x-components.single-column-layout.md +1 -1
  20. package/docs/API-reference/components/common/modals/x-components.base-events-modal-close.md +5 -3
  21. package/docs/API-reference/components/common/modals/x-components.base-events-modal-open.md +2 -2
  22. package/docs/API-reference/components/common/modals/x-components.base-events-modal.md +28 -10
  23. package/docs/API-reference/components/common/modals/x-components.base-id-modal-close.md +2 -2
  24. package/docs/API-reference/components/common/modals/x-components.base-id-modal-open.md +2 -2
  25. package/docs/API-reference/components/common/modals/x-components.base-id-modal.md +10 -2
  26. package/docs/API-reference/components/common/modals/x-components.base-modal.md +12 -12
  27. package/docs/API-reference/components/common/modals/x-components.close-main-modal.md +5 -1
  28. package/docs/API-reference/components/common/modals/x-components.main-modal.md +20 -4
  29. package/docs/API-reference/components/common/modals/x-components.open-main-modal.md +5 -1
  30. package/docs/API-reference/components/common/panels/x-components.base-header-toggle-panel.md +17 -13
  31. package/docs/API-reference/components/common/panels/x-components.base-id-toggle-panel-button.md +11 -4
  32. package/docs/API-reference/components/common/panels/x-components.base-id-toggle-panel.md +20 -13
  33. package/docs/API-reference/components/common/panels/x-components.base-tabs-panel.md +13 -10
  34. package/docs/API-reference/components/common/panels/x-components.base-toggle-panel.md +4 -4
  35. package/docs/API-reference/components/common/result/x-components.base-result-add-to-cart.md +4 -4
  36. package/docs/API-reference/components/common/result/x-components.base-result-current-price.md +7 -5
  37. package/docs/API-reference/components/common/result/x-components.base-result-image.md +25 -19
  38. package/docs/API-reference/components/common/result/x-components.base-result-link.md +5 -5
  39. package/docs/API-reference/components/common/result/x-components.base-result-previous-price.md +7 -5
  40. package/docs/API-reference/components/common/result/x-components.base-result-rating.md +26 -23
  41. package/docs/API-reference/components/common/result/x-components.result-variant-selector.md +62 -42
  42. package/docs/API-reference/components/common/result/x-components.result-variants-provider.md +35 -25
  43. package/docs/API-reference/components/common/scroll/x-components.base-scroll.md +11 -11
  44. package/docs/API-reference/components/common/suggestions/x-components.base-suggestion.md +24 -24
  45. package/docs/API-reference/components/common/suggestions/x-components.base-suggestions.md +47 -44
  46. package/docs/API-reference/components/common/x-components.auto-progress-bar.md +8 -5
  47. package/docs/API-reference/components/common/x-components.base-dropdown.md +7 -5
  48. package/docs/API-reference/components/common/x-components.base-event-button.md +9 -7
  49. package/docs/API-reference/components/common/x-components.base-grid.md +23 -23
  50. package/docs/API-reference/components/common/x-components.base-keyboard-navigation.md +6 -6
  51. package/docs/API-reference/components/common/x-components.base-rating.md +3 -3
  52. package/docs/API-reference/components/common/x-components.base-slider.md +20 -16
  53. package/docs/API-reference/components/common/x-components.base-switch.md +6 -6
  54. package/docs/API-reference/components/common/x-components.base-variable-column-grid.md +37 -28
  55. package/docs/API-reference/components/common/x-components.display-click-provider.md +9 -9
  56. package/docs/API-reference/components/common/x-components.display-emitter.md +1 -1
  57. package/docs/API-reference/components/common/x-components.global-x-bus.md +3 -3
  58. package/docs/API-reference/components/common/x-components.highlight.md +6 -6
  59. package/docs/API-reference/components/common/x-components.location-provider.md +4 -4
  60. package/docs/API-reference/components/common/x-components.page-loader-button.md +14 -14
  61. package/docs/API-reference/components/common/x-components.page-selector.md +12 -12
  62. package/docs/API-reference/components/common/x-components.sliding-panel.md +23 -20
  63. package/docs/API-reference/components/common/x-components.snippet-callbacks.md +3 -3
  64. package/docs/API-reference/components/device/x-components.device-detector.md +15 -15
  65. package/docs/API-reference/components/empathize/x-components.empathize.md +20 -20
  66. package/docs/API-reference/components/experience-controls/x-components.experience-controls.md +1 -1
  67. package/docs/API-reference/components/extra-params/x-components.extra-params.md +3 -3
  68. package/docs/API-reference/components/extra-params/x-components.renderless-extra-param.md +9 -5
  69. package/docs/API-reference/components/extra-params/x-components.snippet-config-extra-params.md +8 -8
  70. package/docs/API-reference/components/facets/x-components.clear-filters.md +10 -6
  71. package/docs/API-reference/components/facets/x-components.facets/facets-provider.md +16 -16
  72. package/docs/API-reference/components/facets/x-components.facets/facets.md +15 -9
  73. package/docs/API-reference/components/facets/x-components.filters/all-filter.md +20 -6
  74. package/docs/API-reference/components/facets/x-components.filters/editable-number-range-filter.md +37 -30
  75. package/docs/API-reference/components/facets/x-components.filters/hierarchical-filter.md +33 -27
  76. package/docs/API-reference/components/facets/x-components.filters/number-range-filter.md +19 -16
  77. package/docs/API-reference/components/facets/x-components.filters/renderless-filter.md +17 -15
  78. package/docs/API-reference/components/facets/x-components.filters/simple-filter.md +38 -32
  79. package/docs/API-reference/components/facets/x-components.lists/exclude-filters-with-no-results.md +30 -30
  80. package/docs/API-reference/components/facets/x-components.lists/filters-list.md +15 -15
  81. package/docs/API-reference/components/facets/x-components.lists/filters-search.md +31 -22
  82. package/docs/API-reference/components/facets/x-components.lists/selected-filters-list.md +8 -6
  83. package/docs/API-reference/components/facets/x-components.lists/selected-filters.md +5 -5
  84. package/docs/API-reference/components/facets/x-components.lists/sliced-filters.md +35 -8
  85. package/docs/API-reference/components/facets/x-components.lists/sorted-filters.md +7 -2
  86. package/docs/API-reference/components/facets/x-components.preselected-filters.md +15 -9
  87. package/docs/API-reference/components/history-queries/x-components.clear-history-queries.md +8 -5
  88. package/docs/API-reference/components/history-queries/x-components.history-queries-switch.md +12 -9
  89. package/docs/API-reference/components/history-queries/x-components.history-queries.md +18 -15
  90. package/docs/API-reference/components/history-queries/x-components.history-query.md +21 -21
  91. package/docs/API-reference/components/history-queries/x-components.my-history.md +14 -11
  92. package/docs/API-reference/components/history-queries/x-components.remove-history-query.md +5 -5
  93. package/docs/API-reference/components/identifier-results/x-components.identifier-result.md +3 -3
  94. package/docs/API-reference/components/identifier-results/x-components.identifier-results.md +7 -7
  95. package/docs/API-reference/components/next-queries/x-components.next-queries-list.md +20 -15
  96. package/docs/API-reference/components/next-queries/x-components.next-queries.md +17 -13
  97. package/docs/API-reference/components/next-queries/x-components.next-query-preview.md +36 -25
  98. package/docs/API-reference/components/next-queries/x-components.next-query.md +14 -12
  99. package/docs/API-reference/components/popular-searches/x-components.popular-search.md +11 -11
  100. package/docs/API-reference/components/popular-searches/x-components.popular-searches.md +10 -7
  101. package/docs/API-reference/components/queries-preview/x-components.query-preview-button.md +6 -6
  102. package/docs/API-reference/components/queries-preview/x-components.query-preview-list.md +23 -21
  103. package/docs/API-reference/components/queries-preview/x-components.query-preview.md +27 -16
  104. package/docs/API-reference/components/query-suggestions/x-components.query-suggestion.md +20 -17
  105. package/docs/API-reference/components/query-suggestions/x-components.query-suggestions.md +16 -13
  106. package/docs/API-reference/components/recommendations/x-components.recommendations.md +23 -12
  107. package/docs/API-reference/components/related-prompts/x-components.related-prompt.md +12 -12
  108. package/docs/API-reference/components/related-prompts/x-components.related-prompts-list.md +13 -13
  109. package/docs/API-reference/components/related-prompts/x-components.related-prompts-tag-list.md +8 -5
  110. package/docs/API-reference/components/related-tags/x-components.related-tag.md +16 -16
  111. package/docs/API-reference/components/related-tags/x-components.related-tags.md +19 -16
  112. package/docs/API-reference/components/scroll/x-components.main-scroll-item.md +9 -5
  113. package/docs/API-reference/components/scroll/x-components.main-scroll.md +16 -8
  114. package/docs/API-reference/components/scroll/x-components.scroll-to-top.md +1 -1
  115. package/docs/API-reference/components/scroll/x-components.scroll.md +27 -27
  116. package/docs/API-reference/components/search/x-components.banner.md +16 -16
  117. package/docs/API-reference/components/search/x-components.banners-list.md +13 -13
  118. package/docs/API-reference/components/search/x-components.fallback-disclaimer.md +4 -4
  119. package/docs/API-reference/components/search/x-components.partial-query-button.md +6 -6
  120. package/docs/API-reference/components/search/x-components.partial-results-list.md +11 -7
  121. package/docs/API-reference/components/search/x-components.promoted.md +16 -16
  122. package/docs/API-reference/components/search/x-components.promoteds-list.md +13 -13
  123. package/docs/API-reference/components/search/x-components.redirection.md +2 -2
  124. package/docs/API-reference/components/search/x-components.results-list.md +17 -13
  125. package/docs/API-reference/components/search/x-components.sort-dropdown.md +13 -9
  126. package/docs/API-reference/components/search/x-components.sort-list.md +7 -7
  127. package/docs/API-reference/components/search/x-components.sort-picker-list.md +10 -10
  128. package/docs/API-reference/components/search/x-components.spellcheck-button.md +2 -2
  129. package/docs/API-reference/components/search/x-components.spellcheck.md +5 -3
  130. package/docs/API-reference/components/search-box/x-components.clear-search-input.md +15 -7
  131. package/docs/API-reference/components/search-box/x-components.search-button.md +11 -11
  132. package/docs/API-reference/components/search-box/x-components.search-input-placeholder.md +22 -16
  133. package/docs/API-reference/components/search-box/x-components.search-input.md +19 -10
  134. package/docs/API-reference/components/semantic-queries/x-components.semantic-queries.md +17 -11
  135. package/docs/API-reference/components/semantic-queries/x-components.semantic-query.md +12 -9
  136. package/docs/API-reference/components/tagging/x-components.tagging.md +8 -4
  137. package/docs/API-reference/components/url/x-components.url-handler.md +2 -2
  138. package/js/store/utils/store-emitters.utils.js.map +1 -1
  139. package/js/x-bus/x-bus.js.map +1 -1
  140. package/js/x-bus/x-priority-queue/x-priority-queue.js.map +1 -1
  141. package/js/x-modules/facets/entities/types.js.map +1 -1
  142. package/package.json +6 -6
  143. package/types/store/utils/store-emitters.utils.d.ts.map +1 -1
  144. package/types/wiring/events.types.d.ts.map +1 -1
  145. package/types/x-bus/x-bus.d.ts.map +1 -1
  146. package/types/x-bus/x-priority-queue/x-priority-queue.d.ts.map +1 -1
  147. package/types/x-modules/facets/entities/types.d.ts.map +1 -1
  148. package/types/x-modules/facets/store/types.d.ts.map +1 -1
  149. package/types/x-modules/history-queries/store/types.d.ts.map +1 -1
  150. package/types/x-modules/identifier-results/store/types.d.ts.map +1 -1
  151. package/types/x-modules/next-queries/store/types.d.ts.map +1 -1
  152. package/types/x-modules/popular-searches/store/types.d.ts.map +1 -1
  153. package/types/x-modules/query-suggestions/store/types.d.ts.map +1 -1
  154. package/types/x-modules/recommendations/store/types.d.ts.map +1 -1
  155. package/types/x-modules/related-tags/store/types.d.ts.map +1 -1
  156. package/types/x-modules/search/store/types.d.ts.map +1 -1
  157. package/types/x-modules/semantic-queries/store/types.d.ts.map +1 -1
@@ -25,14 +25,18 @@ default value of it.
25
25
  ```vue
26
26
  <template>
27
27
  <RenderlessExtraParam v-slot="{ value, updateValue }" name="store">
28
- <BaseDropdown @update:modelValue="updateValue" :modelValue="value" :items="items" />
28
+ <BaseDropdown
29
+ @update:modelValue="updateValue"
30
+ :modelValue="value"
31
+ :items="items"
32
+ />
29
33
  </RenderlessExtraParam>
30
34
  </template>
31
35
 
32
36
  <script setup>
33
- import RenderlessExtraParam from '@empathyco/x-components/js/x-modules/extra-params/components/renderless-extra-param.vue'
34
- import BaseDropdown from '@empathyco/x-components/js/components/base-dropdown.vue'
35
- import { ref } from 'vue'
36
- const items = ref(['spain', 'portugal'])
37
+ import RenderlessExtraParam from "@empathyco/x-components/js/x-modules/extra-params/components/renderless-extra-param.vue";
38
+ import BaseDropdown from "@empathyco/x-components/js/components/base-dropdown.vue";
39
+ import { ref } from "vue";
40
+ const items = ref(["spain", "portugal"]);
37
41
  </script>
38
42
  ```
@@ -25,18 +25,18 @@ _See how the snippet config is injected and passed to the SnippetConfigExtraPara
25
25
  </template>
26
26
 
27
27
  <script setup>
28
- import { SnippetConfigExtraParams } from '@empathyco/x-components/extra-params'
29
- import { defineComponent, provide } from 'vue'
28
+ import { SnippetConfigExtraParams } from "@empathyco/x-components/extra-params";
29
+ import { defineComponent, provide } from "vue";
30
30
 
31
31
  const Provider = defineComponent({
32
32
  setup(_, { slots }) {
33
- provide('snippetConfig', {
34
- instance: 'demo',
35
- lang: 'es',
33
+ provide("snippetConfig", {
34
+ instance: "demo",
35
+ lang: "es",
36
36
  warehouse: 1234,
37
- })
38
- return () => slots.default?.()
37
+ });
38
+ return () => slots.default?.();
39
39
  },
40
- })
40
+ });
41
41
  </script>
42
42
  ```
@@ -44,7 +44,7 @@ This component renders a button, which on clicked emits the `UserClickedClearAll
44
44
  </template>
45
45
 
46
46
  <script setup>
47
- import { ClearFilters } from '@empathyco/x-components/facets'
47
+ import { ClearFilters } from "@empathyco/x-components/facets";
48
48
  </script>
49
49
  ```
50
50
 
@@ -60,7 +60,7 @@ In this example, show the custom message in button.
60
60
  </template>
61
61
 
62
62
  <script setup>
63
- import { ClearFilters } from '@empathyco/x-components/facets'
63
+ import { ClearFilters } from "@empathyco/x-components/facets";
64
64
  </script>
65
65
  ```
66
66
 
@@ -69,15 +69,19 @@ ids.
69
69
 
70
70
  ```vue
71
71
  <template>
72
- <ClearFilters v-slot="{ selectedFilters }" :alwaysVisible="true" :facetsIds="facetsIds">
72
+ <ClearFilters
73
+ v-slot="{ selectedFilters }"
74
+ :alwaysVisible="true"
75
+ :facetsIds="facetsIds"
76
+ >
73
77
  Delete {{ selectedFilters.length }} selected
74
78
  </ClearFilters>
75
79
  </template>
76
80
 
77
81
  <script setup>
78
- import { ClearFilters } from '@empathyco/x-components/facets'
79
- import { ref } from 'vue'
82
+ import { ClearFilters } from "@empathyco/x-components/facets";
83
+ import { ref } from "vue";
80
84
 
81
- const facetsIds = ref(['brand_facet', 'gender_facet'])
85
+ const facetsIds = ref(["brand_facet", "gender_facet"]);
82
86
  </script>
83
87
  ```
@@ -41,35 +41,35 @@ These facets will be added to the `Facets X-Module` state together with the face
41
41
  </template>
42
42
 
43
43
  <script setup>
44
- import { FacetsProvider } from '@empathyco/x-components/facets'
45
- import { ref } from 'vue'
44
+ import { FacetsProvider } from "@empathyco/x-components/facets";
45
+ import { ref } from "vue";
46
46
 
47
47
  const myFacets = ref([
48
48
  {
49
- modelName: 'SimpleFacet',
50
- id: 'color-facet',
51
- label: 'Color',
49
+ modelName: "SimpleFacet",
50
+ id: "color-facet",
51
+ label: "Color",
52
52
  filters: [
53
53
  {
54
- modelName: 'SimpleFilter',
55
- id: 'color:red',
56
- facetId: 'color-facet',
57
- label: 'Red',
54
+ modelName: "SimpleFilter",
55
+ id: "color:red",
56
+ facetId: "color-facet",
57
+ label: "Red",
58
58
  selected: false,
59
- value: 'color:red',
59
+ value: "color:red",
60
60
  totalResults: 10,
61
61
  },
62
62
  {
63
- modelName: 'SimpleFilter',
64
- id: 'color:blue',
65
- facetId: 'color-facet',
66
- label: 'Blue',
63
+ modelName: "SimpleFilter",
64
+ id: "color:blue",
65
+ facetId: "color-facet",
66
+ label: "Blue",
67
67
  selected: false,
68
- value: 'color:blue',
68
+ value: "color:blue",
69
69
  totalResults: 10,
70
70
  },
71
71
  ],
72
72
  },
73
- ])
73
+ ]);
74
74
  </script>
75
75
  ```
@@ -51,7 +51,9 @@ rendered as specified in the default slot.
51
51
  <Facets>
52
52
  <template #default="{ facet, selectedFilters }">
53
53
  <h1>{{ facet.label }}</h1>
54
- <span v-if="selectedFilters.length > 0">{{ `${selectedFilters.length} selected` }}</span>
54
+ <span v-if="selectedFilters.length > 0">{{
55
+ `${selectedFilters.length} selected`
56
+ }}</span>
55
57
 
56
58
  <ul>
57
59
  <li v-for="filter in facet.filters" :key="filter.id">
@@ -63,7 +65,7 @@ rendered as specified in the default slot.
63
65
  </template>
64
66
 
65
67
  <script setup>
66
- import { Facets } from '@empathyco/x-components/facets'
68
+ import { Facets } from "@empathyco/x-components/facets";
67
69
  </script>
68
70
  ```
69
71
 
@@ -84,7 +86,9 @@ with the facet id.
84
86
  <template>
85
87
  <Facets>
86
88
  <template #color="{ facet, selectedFilters }">
87
- <span v-if="selectedFilters.length > 0">{{ `${selectedFilters.length} colors chosen` }}</span>
89
+ <span v-if="selectedFilters.length > 0">{{
90
+ `${selectedFilters.length} colors chosen`
91
+ }}</span>
88
92
 
89
93
  <ul v-for="filter in facet.filters" :key="filter.id">
90
94
  <li v-if="!filter.selected">
@@ -94,7 +98,9 @@ with the facet id.
94
98
  </template>
95
99
 
96
100
  <template #hierarchical-facet="{ facet, selectedFilters }">
97
- <span v-if="selectedFilters.length > 0">{{ `${selectedFilters.length} colors chosen` }}</span>
101
+ <span v-if="selectedFilters.length > 0">{{
102
+ `${selectedFilters.length} colors chosen`
103
+ }}</span>
98
104
 
99
105
  <ul v-for="filter in facet.filters" :key="filter.id">
100
106
  <li v-if="!filter.selected">
@@ -121,7 +127,7 @@ with the facet id.
121
127
  </template>
122
128
 
123
129
  <script setup>
124
- import { Facets } from '@empathyco/x-components/facets'
130
+ import { Facets } from "@empathyco/x-components/facets";
125
131
  </script>
126
132
  ```
127
133
 
@@ -149,7 +155,7 @@ ones. In the following example, the component will only render color and categor
149
155
  </template>
150
156
 
151
157
  <script setup>
152
- import { Facets } from '@empathyco/x-components/facets'
158
+ import { Facets } from "@empathyco/x-components/facets";
153
159
  </script>
154
160
  ```
155
161
 
@@ -174,7 +180,7 @@ render every facet except color and price.
174
180
  </template>
175
181
 
176
182
  <script setup>
177
- import { Facets } from '@empathyco/x-components/facets'
183
+ import { Facets } from "@empathyco/x-components/facets";
178
184
  </script>
179
185
  ```
180
186
 
@@ -224,8 +230,8 @@ import {
224
230
  MultiSelectFilters,
225
231
  NumberRangeFilter,
226
232
  SimpleFilter,
227
- } from '@empathyco/x-components/facets'
233
+ } from "@empathyco/x-components/facets";
228
234
 
229
- import { BasePriceFilterLabel } from '@empathyco/x-components'
235
+ import { BasePriceFilterLabel } from "@empathyco/x-components";
230
236
  </script>
231
237
  ```
@@ -46,7 +46,7 @@ but this content is customizable through the default slot.
46
46
  </template>
47
47
 
48
48
  <script setup>
49
- import { AllFilter } from '@empathyco/x-components/facets'
49
+ import { AllFilter } from "@empathyco/x-components/facets";
50
50
  </script>
51
51
  ```
52
52
 
@@ -54,11 +54,13 @@ import { AllFilter } from '@empathyco/x-components/facets'
54
54
 
55
55
  ```vue
56
56
  <template>
57
- <AllFilter v-slot="{ facet }" :facet="facet"> Select all {{ facet.label }} </AllFilter>
57
+ <AllFilter v-slot="{ facet }" :facet="facet">
58
+ Select all {{ facet.label }}
59
+ </AllFilter>
58
60
  </template>
59
61
 
60
62
  <script setup>
61
- import { AllFilter } from '@empathyco/x-components/facets'
63
+ import { AllFilter } from "@empathyco/x-components/facets";
62
64
  </script>
63
65
  ```
64
66
 
@@ -77,7 +79,12 @@ import { AllFilter } from '@empathyco/x-components/facets'
77
79
  </template>
78
80
 
79
81
  <script setup>
80
- import { Facets, Filters, AllFilter, SimpleFilter } from '@empathyco/x-components/facets'
82
+ import {
83
+ Facets,
84
+ Filters,
85
+ AllFilter,
86
+ SimpleFilter,
87
+ } from "@empathyco/x-components/facets";
81
88
  </script>
82
89
  ```
83
90
 
@@ -87,7 +94,9 @@ import { Facets, Filters, AllFilter, SimpleFilter } from '@empathyco/x-component
87
94
  <template>
88
95
  <Facets>
89
96
  <template #default="{ facet }">
90
- <AllFilter v-slot="{ facet }" :facet="facet"> Select all {{ facet.label }} </AllFilter>
97
+ <AllFilter v-slot="{ facet }" :facet="facet">
98
+ Select all {{ facet.label }}
99
+ </AllFilter>
91
100
  <Filters v-slot="{ filter }" :filters="facet.filters">
92
101
  <SimpleFilter :filter="filter" />
93
102
  </Filters>
@@ -96,6 +105,11 @@ import { Facets, Filters, AllFilter, SimpleFilter } from '@empathyco/x-component
96
105
  </template>
97
106
 
98
107
  <script setup>
99
- import { Facets, Filters, AllFilter, SimpleFilter } from '@empathyco/x-components/facets'
108
+ import {
109
+ Facets,
110
+ Filters,
111
+ AllFilter,
112
+ SimpleFilter,
113
+ } from "@empathyco/x-components/facets";
100
114
  </script>
101
115
  ```
@@ -66,19 +66,19 @@ True by default.
66
66
  </template>
67
67
 
68
68
  <script setup>
69
- import { EditableNumberRangeFilter } from '@empathyco/x-components/facets'
70
- import { ref } from 'vue'
69
+ import { EditableNumberRangeFilter } from "@empathyco/x-components/facets";
70
+ import { ref } from "vue";
71
71
 
72
72
  const editableFilter = ref({
73
- facetId: 'age',
74
- id: 'age:primary',
75
- label: 'primary',
76
- modelName: 'EditableNumberRangeFilter',
73
+ facetId: "age",
74
+ id: "age:primary",
75
+ label: "primary",
76
+ modelName: "EditableNumberRangeFilter",
77
77
  range: {
78
78
  min: null,
79
79
  max: null,
80
80
  },
81
- })
81
+ });
82
82
  </script>
83
83
  ```
84
84
 
@@ -86,23 +86,27 @@ const editableFilter = ref({
86
86
 
87
87
  ```vue
88
88
  <template>
89
- <EditableNumberRangeFilter :filter="editableFilter" :isInstant="true" :hasClearButton="false" />
89
+ <EditableNumberRangeFilter
90
+ :filter="editableFilter"
91
+ :isInstant="true"
92
+ :hasClearButton="false"
93
+ />
90
94
  </template>
91
95
 
92
96
  <script setup>
93
- import { EditableNumberRangeFilter } from '@empathyco/x-components/facets'
94
- import { ref } from 'vue'
97
+ import { EditableNumberRangeFilter } from "@empathyco/x-components/facets";
98
+ import { ref } from "vue";
95
99
 
96
100
  const editableFilter = ref({
97
- facetId: 'age',
98
- id: 'age:primary',
99
- label: 'primary',
100
- modelName: 'EditableNumberRangeFilter',
101
+ facetId: "age",
102
+ id: "age:primary",
103
+ label: "primary",
104
+ modelName: "EditableNumberRangeFilter",
101
105
  range: {
102
106
  min: null,
103
107
  max: null,
104
108
  },
105
- })
109
+ });
106
110
  </script>
107
111
  ```
108
112
 
@@ -117,19 +121,19 @@ const editableFilter = ref({
117
121
  </template>
118
122
 
119
123
  <script setup>
120
- import { EditableNumberRangeFilter } from '@empathyco/x-components/facets'
121
- import { ref } from 'vue'
124
+ import { EditableNumberRangeFilter } from "@empathyco/x-components/facets";
125
+ import { ref } from "vue";
122
126
 
123
127
  const editableFilter = ref({
124
- facetId: 'age',
125
- id: 'age:primary',
126
- label: 'primary',
127
- modelName: 'EditableNumberRangeFilter',
128
+ facetId: "age",
129
+ id: "age:primary",
130
+ label: "primary",
131
+ modelName: "EditableNumberRangeFilter",
128
132
  range: {
129
133
  min: null,
130
134
  max: null,
131
135
  },
132
- })
136
+ });
133
137
  </script>
134
138
  ```
135
139
 
@@ -152,26 +156,29 @@ const editableFilter = ref({
152
156
  >
153
157
  <button @click="emitUserModifiedFilter">✅ Apply!</button>
154
158
  <button @click="clearValues">🗑 Clear!</button>
155
- <input :value="!isAnyRange ? min : null" @change="setMin($event.target.valueAsNumber)" />
159
+ <input
160
+ :value="!isAnyRange ? min : null"
161
+ @change="setMin($event.target.valueAsNumber)"
162
+ />
156
163
  <input :value="max" @change="setMax($event.target.valueAsNumber)" />
157
164
  <div class="has-error" v-if="hasError">⚠️ Invalid range values</div>
158
165
  </EditableNumberRangeFilter>
159
166
  </template>
160
167
 
161
168
  <script setup>
162
- import { EditableNumberRangeFilter } from '@empathyco/x-components/facets'
163
- import { ref } from 'vue'
169
+ import { EditableNumberRangeFilter } from "@empathyco/x-components/facets";
170
+ import { ref } from "vue";
164
171
 
165
172
  const editableFilter = ref({
166
- facetId: 'age',
167
- id: 'age:primary',
168
- label: 'primary',
169
- modelName: 'EditableNumberRangeFilter',
173
+ facetId: "age",
174
+ id: "age:primary",
175
+ label: "primary",
176
+ modelName: "EditableNumberRangeFilter",
170
177
  range: {
171
178
  min: null,
172
179
  max: null,
173
180
  },
174
- })
181
+ });
175
182
  </script>
176
183
  ```
177
184
 
@@ -52,19 +52,19 @@ to emit on click.
52
52
  </template>
53
53
 
54
54
  <script setup>
55
- import { HierarchicalFilter } from '@empathyco/x-components/facets'
56
- import { ref } from 'vue'
55
+ import { HierarchicalFilter } from "@empathyco/x-components/facets";
56
+ import { ref } from "vue";
57
57
 
58
58
  const filter = ref({
59
59
  id: `categories:men`,
60
- modelName: 'HierarchicalFilter',
60
+ modelName: "HierarchicalFilter",
61
61
  label: `men`,
62
- facetId: 'categories',
62
+ facetId: "categories",
63
63
  parentId: null,
64
64
  totalResults: 10,
65
65
  children: [],
66
66
  selected: false,
67
- })
67
+ });
68
68
  </script>
69
69
  ```
70
70
 
@@ -74,23 +74,26 @@ Configuring the events to emit when the filter is clicked.
74
74
 
75
75
  ```vue
76
76
  <template>
77
- <HierarchicalFilter :clickEvents="{ UserClickedAHierarchicalFilter: filter }" :filter="filter" />
77
+ <HierarchicalFilter
78
+ :clickEvents="{ UserClickedAHierarchicalFilter: filter }"
79
+ :filter="filter"
80
+ />
78
81
  </template>
79
82
 
80
83
  <script setup>
81
- import { HierarchicalFilter } from '@empathyco/x-components/facets'
82
- import { ref } from 'vue'
84
+ import { HierarchicalFilter } from "@empathyco/x-components/facets";
85
+ import { ref } from "vue";
83
86
 
84
87
  const filter = ref({
85
88
  id: `categories:men`,
86
- modelName: 'HierarchicalFilter',
89
+ modelName: "HierarchicalFilter",
87
90
  label: `men`,
88
- facetId: 'categories',
91
+ facetId: "categories",
89
92
  parentId: null,
90
93
  totalResults: 10,
91
94
  children: [],
92
95
  selected: false,
93
- })
96
+ });
94
97
  </script>
95
98
  ```
96
99
 
@@ -100,7 +103,10 @@ In this example, the child filters will also include the label and checkbox.
100
103
 
101
104
  ```vue
102
105
  <template>
103
- <HierarchicalFilter :filter="filter" v-slot="{ filter, clickFilter, cssClasses, isDisabled }">
106
+ <HierarchicalFilter
107
+ :filter="filter"
108
+ v-slot="{ filter, clickFilter, cssClasses, isDisabled }"
109
+ >
104
110
  <label :class="cssClasses">
105
111
  <input @change="clickFilter" :disabled="isDisabled" />
106
112
  {{ filter.label }}
@@ -109,19 +115,19 @@ In this example, the child filters will also include the label and checkbox.
109
115
  </template>
110
116
 
111
117
  <script setup>
112
- import { HierarchicalFilter } from '@empathyco/x-components/facets'
113
- import { ref } from 'vue'
118
+ import { HierarchicalFilter } from "@empathyco/x-components/facets";
119
+ import { ref } from "vue";
114
120
 
115
121
  const filter = ref({
116
122
  id: `categories:men`,
117
- modelName: 'HierarchicalFilter',
123
+ modelName: "HierarchicalFilter",
118
124
  label: `men`,
119
- facetId: 'categories',
125
+ facetId: "categories",
120
126
  parentId: null,
121
127
  totalResults: 10,
122
128
  children: [],
123
129
  selected: false,
124
- })
130
+ });
125
131
  </script>
126
132
  ```
127
133
 
@@ -137,19 +143,19 @@ const filter = ref({
137
143
  </template>
138
144
 
139
145
  <script setup>
140
- import { HierarchicalFilter } from '@empathyco/x-components/facets'
141
- import { ref } from 'vue'
146
+ import { HierarchicalFilter } from "@empathyco/x-components/facets";
147
+ import { ref } from "vue";
142
148
 
143
149
  const filter = ref({
144
150
  id: `categories:men`,
145
- modelName: 'HierarchicalFilter',
151
+ modelName: "HierarchicalFilter",
146
152
  label: `men`,
147
- facetId: 'categories',
153
+ facetId: "categories",
148
154
  parentId: null,
149
155
  totalResults: 10,
150
156
  children: [],
151
157
  selected: false,
152
- })
158
+ });
153
159
  </script>
154
160
  ```
155
161
 
@@ -170,18 +176,18 @@ The `filterItemClass` prop can be used to add classes to the filter element itse
170
176
  </template>
171
177
 
172
178
  <script setup>
173
- import { HierarchicalFilter } from '@empathyco/x-components/facets'
174
- import { ref } from 'vue'
179
+ import { HierarchicalFilter } from "@empathyco/x-components/facets";
180
+ import { ref } from "vue";
175
181
 
176
182
  const filter = ref({
177
183
  id: `categories:men`,
178
- modelName: 'HierarchicalFilter',
184
+ modelName: "HierarchicalFilter",
179
185
  label: `men`,
180
- facetId: 'categories',
186
+ facetId: "categories",
181
187
  parentId: null,
182
188
  totalResults: 10,
183
189
  children: [],
184
190
  selected: false,
185
- })
191
+ });
186
192
  </script>
187
193
  ```
@@ -46,20 +46,20 @@ to emit on click.
46
46
  </template>
47
47
 
48
48
  <script setup>
49
- import { NumberRangeFilter } from '@empathyco/x-components/facets'
50
- import { ref } from 'vue'
49
+ import { NumberRangeFilter } from "@empathyco/x-components/facets";
50
+ import { ref } from "vue";
51
51
 
52
52
  const filter = ref({
53
53
  id: `price:1-10`,
54
- modelName: 'NumberRangeFilter',
54
+ modelName: "NumberRangeFilter",
55
55
  label: `From 1 to 10`,
56
- facetId: 'price',
56
+ facetId: "price",
57
57
  range: {
58
58
  min: 1,
59
59
  max: 10,
60
60
  },
61
61
  selected: false,
62
- })
62
+ });
63
63
  </script>
64
64
  ```
65
65
 
@@ -69,24 +69,27 @@ Configuring the events to emit when the filter is clicked.
69
69
 
70
70
  ```vue
71
71
  <template>
72
- <NumberRangeFilter :clickEvents="{ UserClickedANumberRangeFilter: filter }" :filter="filter" />
72
+ <NumberRangeFilter
73
+ :clickEvents="{ UserClickedANumberRangeFilter: filter }"
74
+ :filter="filter"
75
+ />
73
76
  </template>
74
77
 
75
78
  <script setup>
76
- import { NumberRangeFilter } from '@empathyco/x-components/facets'
77
- import { ref } from 'vue'
79
+ import { NumberRangeFilter } from "@empathyco/x-components/facets";
80
+ import { ref } from "vue";
78
81
 
79
82
  const filter = ref({
80
83
  id: `price:1-10`,
81
- modelName: 'NumberRangeFilter',
84
+ modelName: "NumberRangeFilter",
82
85
  label: `From 1 to 10`,
83
- facetId: 'price',
86
+ facetId: "price",
84
87
  range: {
85
88
  min: 1,
86
89
  max: 10,
87
90
  },
88
91
  selected: false,
89
- })
92
+ });
90
93
  </script>
91
94
  ```
92
95
 
@@ -101,19 +104,19 @@ const filter = ref({
101
104
  </template>
102
105
 
103
106
  <script setup>
104
- import { NumberRangeFilter } from '@empathyco/x-components/facets'
105
- import { ref } from 'vue'
107
+ import { NumberRangeFilter } from "@empathyco/x-components/facets";
108
+ import { ref } from "vue";
106
109
 
107
110
  const filter = ref({
108
111
  id: `price:1-10`,
109
- modelName: 'NumberRangeFilter',
112
+ modelName: "NumberRangeFilter",
110
113
  label: `From 1 to 10`,
111
- facetId: 'price',
114
+ facetId: "price",
112
115
  range: {
113
116
  min: 1,
114
117
  max: 10,
115
118
  },
116
119
  selected: false,
117
- })
120
+ });
118
121
  </script>
119
122
  ```