@empathyco/x-components 3.0.0-alpha.160 → 3.0.0-alpha.163

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 (115) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/design-system/full-theme.css +10 -10
  3. package/docs/API-reference/api/x-components.resultvariantsprovider.autoselectdepth.md +13 -0
  4. package/docs/API-reference/api/x-components.resultvariantsprovider.md +3 -0
  5. package/docs/API-reference/api/x-components.resultvariantsprovider.resetselectedvariants.md +17 -0
  6. package/docs/API-reference/api/x-components.resultvariantsprovider.selectfirstvariants.md +24 -0
  7. package/docs/API-reference/components/common/result/x-components.result-variants-provider.md +91 -3
  8. package/docs/build-search-ui/web-x-components-development-guide.md +2 -2
  9. package/docs/experience-search-and-discovery/README.md +35 -36
  10. package/docs/experience-search-and-discovery/empathize.md +9 -9
  11. package/docs/experience-search-and-discovery/facets-and-filters.md +1 -1
  12. package/docs/experience-search-and-discovery/history-queries.md +8 -3
  13. package/docs/experience-search-and-discovery/id-results.md +1 -1
  14. package/docs/experience-search-and-discovery/my-history.md +50 -0
  15. package/docs/experience-search-and-discovery/next-queries.md +1 -1
  16. package/docs/experience-search-and-discovery/popular-searches.md +1 -1
  17. package/docs/experience-search-and-discovery/product-results-ui.md +1 -1
  18. package/docs/experience-search-and-discovery/query-suggestions.md +1 -1
  19. package/docs/experience-search-and-discovery/related-tags.md +1 -1
  20. package/docs/experience-search-and-discovery/serp-ui.md +1 -1
  21. package/docs/experience-search-and-discovery/web-local-storage.md +3 -3
  22. package/js/components/animations/animate-clip-path/animate-clip-path.style.scss.js +11 -2
  23. package/js/components/animations/animate-clip-path/animate-clip-path.style.scss.js.map +1 -1
  24. package/js/components/animations/animate-scale/animate-scale.style.scss.js +11 -2
  25. package/js/components/animations/animate-scale/animate-scale.style.scss.js.map +1 -1
  26. package/js/components/animations/animate-translate/animate-translate.style.scss.js +11 -2
  27. package/js/components/animations/animate-translate/animate-translate.style.scss.js.map +1 -1
  28. package/js/components/animations/animate-width.vue_rollup-plugin-vue_styles.0.vue.js +11 -2
  29. package/js/components/animations/animate-width.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -1
  30. package/js/components/animations/collapse-height.vue_rollup-plugin-vue_styles.0.vue.js +11 -2
  31. package/js/components/animations/collapse-height.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -1
  32. package/js/components/animations/collapse-width.vue_rollup-plugin-vue_styles.0.vue.js +11 -2
  33. package/js/components/animations/collapse-width.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -1
  34. package/js/components/animations/cross-fade.vue_rollup-plugin-vue_styles.0.vue.js +11 -2
  35. package/js/components/animations/cross-fade.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -1
  36. package/js/components/animations/fade-and-slide.vue_rollup-plugin-vue_styles.0.vue.js +11 -2
  37. package/js/components/animations/fade-and-slide.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -1
  38. package/js/components/animations/fade.vue_rollup-plugin-vue_styles.0.vue.js +11 -2
  39. package/js/components/animations/fade.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -1
  40. package/js/components/animations/staggered-fade-and-slide.vue_rollup-plugin-vue_styles.0.vue.js +11 -2
  41. package/js/components/animations/staggered-fade-and-slide.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -1
  42. package/js/components/animations/staggering-transition-group.vue_rollup-plugin-vue_styles.0.vue.js +11 -2
  43. package/js/components/animations/staggering-transition-group.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -1
  44. package/js/components/auto-progress-bar.vue_rollup-plugin-vue_styles.0.vue.js +11 -2
  45. package/js/components/auto-progress-bar.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -1
  46. package/js/components/base-dropdown.vue_rollup-plugin-vue_styles.0.vue.js +11 -2
  47. package/js/components/base-dropdown.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -1
  48. package/js/components/base-grid.vue_rollup-plugin-vue_styles.0.vue.js +11 -2
  49. package/js/components/base-grid.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -1
  50. package/js/components/base-rating.vue_rollup-plugin-vue_styles.0.vue.js +11 -2
  51. package/js/components/base-rating.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -1
  52. package/js/components/base-switch.vue_rollup-plugin-vue_styles.0.vue.js +11 -2
  53. package/js/components/base-switch.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -1
  54. package/js/components/column-picker/base-column-picker-list.vue_rollup-plugin-vue_styles.0.vue.js +11 -2
  55. package/js/components/column-picker/base-column-picker-list.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -1
  56. package/js/components/layouts/fixed-header-and-asides-layout.vue_rollup-plugin-vue_styles.0.vue.js +11 -2
  57. package/js/components/layouts/fixed-header-and-asides-layout.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -1
  58. package/js/components/layouts/multi-column-max-width-layout.vue_rollup-plugin-vue_styles.0.vue.js +11 -2
  59. package/js/components/layouts/multi-column-max-width-layout.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -1
  60. package/js/components/layouts/multi-column-max-width-layout.vue_rollup-plugin-vue_styles.1.vue.js +11 -2
  61. package/js/components/layouts/multi-column-max-width-layout.vue_rollup-plugin-vue_styles.1.vue.js.map +1 -1
  62. package/js/components/layouts/single-column-layout.vue_rollup-plugin-vue_styles.0.vue.js +11 -2
  63. package/js/components/layouts/single-column-layout.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -1
  64. package/js/components/modals/base-modal.vue_rollup-plugin-vue_styles.0.vue.js +11 -2
  65. package/js/components/modals/base-modal.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -1
  66. package/js/components/panels/base-header-toggle-panel.vue_rollup-plugin-vue_styles.0.vue.js +11 -2
  67. package/js/components/panels/base-header-toggle-panel.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -1
  68. package/js/components/result/base-result-image.vue_rollup-plugin-vue_styles.0.vue.js +11 -2
  69. package/js/components/result/base-result-image.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -1
  70. package/js/components/result/base-result-link.vue_rollup-plugin-vue_styles.0.vue.js +11 -2
  71. package/js/components/result/base-result-link.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -1
  72. package/js/components/result/base-result-rating.vue_rollup-plugin-vue_styles.0.vue.js +11 -2
  73. package/js/components/result/base-result-rating.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -1
  74. package/js/components/result/result-variants-provider.vue.js.map +1 -1
  75. package/js/components/result/result-variants-provider.vue_rollup-plugin-vue_script.vue.js +29 -1
  76. package/js/components/result/result-variants-provider.vue_rollup-plugin-vue_script.vue.js.map +1 -1
  77. package/js/components/scroll/base-scroll.vue_rollup-plugin-vue_styles.0.vue.js +11 -2
  78. package/js/components/scroll/base-scroll.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -1
  79. package/js/components/sliding-panel.vue_rollup-plugin-vue_styles.0.vue.js +11 -2
  80. package/js/components/sliding-panel.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -1
  81. package/js/components/suggestions/base-suggestions.vue_rollup-plugin-vue_styles.0.vue.js +11 -2
  82. package/js/components/suggestions/base-suggestions.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -1
  83. package/js/x-modules/facets/components/facets/facets-provider.vue_rollup-plugin-vue_styles.0.vue.js +11 -2
  84. package/js/x-modules/facets/components/facets/facets-provider.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -1
  85. package/js/x-modules/facets/components/facets/facets.vue_rollup-plugin-vue_styles.0.vue.js +11 -2
  86. package/js/x-modules/facets/components/facets/facets.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -1
  87. package/js/x-modules/facets/components/filters/editable-number-range-filter.vue_rollup-plugin-vue_styles.0.vue.js +11 -2
  88. package/js/x-modules/facets/components/filters/editable-number-range-filter.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -1
  89. package/js/x-modules/facets/components/lists/filters-list.vue_rollup-plugin-vue_styles.0.vue.js +11 -2
  90. package/js/x-modules/facets/components/lists/filters-list.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -1
  91. package/js/x-modules/facets/components/lists/filters-search.vue_rollup-plugin-vue_styles.0.vue.js +11 -2
  92. package/js/x-modules/facets/components/lists/filters-search.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -1
  93. package/js/x-modules/recommendations/components/recommendations.vue_rollup-plugin-vue_styles.0.vue.js +11 -2
  94. package/js/x-modules/recommendations/components/recommendations.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -1
  95. package/js/x-modules/related-tags/components/related-tag.vue_rollup-plugin-vue_styles.0.vue.js +11 -2
  96. package/js/x-modules/related-tags/components/related-tag.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -1
  97. package/js/x-modules/related-tags/components/related-tags.vue_rollup-plugin-vue_styles.0.vue.js +11 -2
  98. package/js/x-modules/related-tags/components/related-tags.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -1
  99. package/js/x-modules/scroll/components/main-scroll.vue_rollup-plugin-vue_styles.0.vue.js +11 -2
  100. package/js/x-modules/scroll/components/main-scroll.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -1
  101. package/js/x-modules/search/components/banner.vue_rollup-plugin-vue_styles.0.vue.js +11 -2
  102. package/js/x-modules/search/components/banner.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -1
  103. package/js/x-modules/search/components/partial-results-list.vue_rollup-plugin-vue_styles.0.vue.js +11 -2
  104. package/js/x-modules/search/components/partial-results-list.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -1
  105. package/js/x-modules/search/components/promoted.vue_rollup-plugin-vue_styles.0.vue.js +11 -2
  106. package/js/x-modules/search/components/promoted.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -1
  107. package/js/x-modules/search/components/sort-list.vue_rollup-plugin-vue_styles.0.vue.js +11 -2
  108. package/js/x-modules/search/components/sort-list.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -1
  109. package/js/x-modules/search-box/components/search-input.vue_rollup-plugin-vue_styles.0.vue.js +11 -2
  110. package/js/x-modules/search-box/components/search-input.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -1
  111. package/package.json +3 -2
  112. package/report/x-components.api.json +102 -0
  113. package/report/x-components.api.md +3 -0
  114. package/types/components/result/result-variants-provider.vue.d.ts +20 -0
  115. package/types/components/result/result-variants-provider.vue.d.ts.map +1 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,44 @@
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.163](https://github.com/empathyco/x/compare/@empathyco/x-components@3.0.0-alpha.162...@empathyco/x-components@3.0.0-alpha.163) (2022-08-29)
7
+
8
+ ### Documentation
9
+
10
+ - **functional:** add my history ui and related docs (#685)
11
+ ([3a9ac8a](https://github.com/empathyco/x/commit/3a9ac8a769d64196b31f05872fb92ec26dc635ad))
12
+
13
+ # Change Log
14
+
15
+ All notable changes to this project will be documented in this file. See
16
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
17
+
18
+ ## [3.0.0-alpha.162](https://github.com/empathyco/x/compare/@empathyco/x-components@3.0.0-alpha.161...@empathyco/x-components@3.0.0-alpha.162) (2022-08-29)
19
+
20
+ ### Build System
21
+
22
+ - Support SSR with createInjectorSSR for styles. (#674)
23
+ ([85473c3](https://github.com/empathyco/x/commit/85473c31f5aa755890bef4d20f787ba1453b8843)),
24
+ closes [EX-6892](https://searchbroker.atlassian.net/browse/EX-6892)
25
+
26
+ # Change Log
27
+
28
+ All notable changes to this project will be documented in this file. See
29
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
30
+
31
+ ## [3.0.0-alpha.161](https://github.com/empathyco/x/compare/@empathyco/x-components@3.0.0-alpha.160...@empathyco/x-components@3.0.0-alpha.161) (2022-08-26)
32
+
33
+ ### Features
34
+
35
+ - **components:** variants auto selection (#679)
36
+ ([c1c8664](https://github.com/empathyco/x/commit/c1c866481ae8866fec4fd9e2dd5389fcba00e62b)),
37
+ closes [EX-6878](https://searchbroker.atlassian.net/browse/EX-6878)
38
+
39
+ # Change Log
40
+
41
+ All notable changes to this project will be documented in this file. See
42
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
43
+
6
44
  ## [3.0.0-alpha.160](https://github.com/empathyco/x/compare/@empathyco/x-components@3.0.0-alpha.159...@empathyco/x-components@3.0.0-alpha.160) (2022-08-25)
7
45
 
8
46
  ### Features
@@ -303,16 +303,6 @@
303
303
  --x-size-border-width-bottom-button-secondary: var(--x-size-border-width-button-secondary);
304
304
  --x-size-border-width-left-button-secondary: var(--x-size-border-width-button-secondary);
305
305
  }
306
- :root {
307
- --x-color-background-button-tertiary: var(--x-color-base-neutral-95);
308
- --x-color-border-button-tertiary: var(--x-color-base-neutral-70);
309
- --x-color-text-button-tertiary: var(--x-color-text-default);
310
- --x-size-border-width-button-tertiary: var(--x-size-border-width-base);
311
- --x-size-border-width-top-button-tertiary: var(--x-size-border-width-button-tertiary);
312
- --x-size-border-width-right-button-tertiary: var(--x-size-border-width-button-tertiary);
313
- --x-size-border-width-bottom-button-tertiary: var(--x-size-border-width-button-tertiary);
314
- --x-size-border-width-left-button-tertiary: var(--x-size-border-width-button-tertiary);
315
- }
316
306
  .x-button--tertiary.x-button,
317
307
  .x-button--tertiary .x-button {
318
308
  --x-color-background-button-default: var(--x-color-background-button-tertiary);
@@ -323,6 +313,16 @@
323
313
  --x-size-border-width-bottom-button-default: var(--x-size-border-width-bottom-button-tertiary);
324
314
  --x-size-border-width-left-button-default: var(--x-size-border-width-left-button-tertiary);
325
315
  }
316
+ :root {
317
+ --x-color-background-button-tertiary: var(--x-color-base-neutral-95);
318
+ --x-color-border-button-tertiary: var(--x-color-base-neutral-70);
319
+ --x-color-text-button-tertiary: var(--x-color-text-default);
320
+ --x-size-border-width-button-tertiary: var(--x-size-border-width-base);
321
+ --x-size-border-width-top-button-tertiary: var(--x-size-border-width-button-tertiary);
322
+ --x-size-border-width-right-button-tertiary: var(--x-size-border-width-button-tertiary);
323
+ --x-size-border-width-bottom-button-tertiary: var(--x-size-border-width-button-tertiary);
324
+ --x-size-border-width-left-button-tertiary: var(--x-size-border-width-button-tertiary);
325
+ }
326
326
  .x-dropdown--card {
327
327
  --x-size-gap-dropdown-default: var(--x-size-gap-dropdown-card);
328
328
  --x-size-border-radius-dropdown-default: var(--x-size-border-radius-dropdown-card);
@@ -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; [ResultVariantsProvider](./x-components.resultvariantsprovider.md) &gt; [autoSelectDepth](./x-components.resultvariantsprovider.autoselectdepth.md)
4
+
5
+ ## ResultVariantsProvider.autoSelectDepth property
6
+
7
+ The provider by default will auto select the first variants of all levels. This prop allows to limit the number of variants auto selected when the provider is created. Take into account that the depth will be the variants level + 1, so, setting autoSelectDepth to 0 will not select any variant, setting it to 1 will select only the first variant of the first level, and so on.
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ autoSelectDepth: number;
13
+ ```
@@ -21,6 +21,7 @@ export default class ResultVariantsProvider extends Vue
21
21
 
22
22
  | Property | Modifiers | Type | Description |
23
23
  | --- | --- | --- | --- |
24
+ | [autoSelectDepth](./x-components.resultvariantsprovider.autoselectdepth.md) | | number | The provider by default will auto select the first variants of all levels. This prop allows to limit the number of variants auto selected when the provider is created. Take into account that the depth will be the variants level + 1, so, setting autoSelectDepth to 0 will not select any variant, setting it to 1 will select only the first variant of the first level, and so on. |
24
25
  | [result](./x-components.resultvariantsprovider.result.md) | | Result | The original result containing the variants. |
25
26
  | [resultToProvide](./x-components.resultvariantsprovider.resulttoprovide.md) | | Result | Merges the original result with the selected variant. The merge is done with all the selected variants of the array. |
26
27
  | [selectedVariants](./x-components.resultvariantsprovider.selectedvariants.md) | | ResultVariant\[\] | Array to keep track of the selected variants of the result. Each position of the array is a nest level in the variants' hierarchy, so, the second position will contain a variant that is present inside the variant of the first position, and so on. |
@@ -30,5 +31,7 @@ export default class ResultVariantsProvider extends Vue
30
31
  | Method | Modifiers | Description |
31
32
  | --- | --- | --- |
32
33
  | [render(createElement)](./x-components.resultvariantsprovider.render.md) | | Render function of the provider. It exposes the result with the selected variant merged. |
34
+ | [resetSelectedVariants()](./x-components.resultvariantsprovider.resetselectedvariants.md) | | Resets the selected variants when the result changes. That includes doing the auto selection of the variants when the component is created and when the result is changed. |
35
+ | [selectFirstVariants(variant)](./x-components.resultvariantsprovider.selectfirstvariants.md) | | Adds to the selectedVariants array the variants up to the autoSelectDepth level. |
33
36
  | [selectResultVariant(variant, level)](./x-components.resultvariantsprovider.selectresultvariant.md) | | Selects a variant of the result. When called, it slices the array of selected variants to remove the selected child variants. Emits the [XEventsTypes.UserSelectedAResultVariant](./x-components.xeventstypes.userselectedaresultvariant.md) when called. |
34
37
 
@@ -0,0 +1,17 @@
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; [ResultVariantsProvider](./x-components.resultvariantsprovider.md) &gt; [resetSelectedVariants](./x-components.resultvariantsprovider.resetselectedvariants.md)
4
+
5
+ ## ResultVariantsProvider.resetSelectedVariants() method
6
+
7
+ Resets the selected variants when the result changes. That includes doing the auto selection of the variants when the component is created and when the result is changed.
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ resetSelectedVariants(): void;
13
+ ```
14
+ <b>Returns:</b>
15
+
16
+ void
17
+
@@ -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; [ResultVariantsProvider](./x-components.resultvariantsprovider.md) &gt; [selectFirstVariants](./x-components.resultvariantsprovider.selectfirstvariants.md)
4
+
5
+ ## ResultVariantsProvider.selectFirstVariants() method
6
+
7
+ Adds to the selectedVariants array the variants up to the autoSelectDepth level.
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ selectFirstVariants(variant?: ResultVariant): void;
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Type | Description |
18
+ | --- | --- | --- |
19
+ | variant | ResultVariant | Variant to add to the array. |
20
+
21
+ <b>Returns:</b>
22
+
23
+ void
24
+
@@ -15,9 +15,10 @@ set the selected variant to be used from a child.
15
15
 
16
16
  ## Props
17
17
 
18
- | Name | Description | Type | Default |
19
- | ------------------- | -------------------------------------------- | ------------------- | ------------- |
20
- | <code>result</code> | The original result containing the variants. | <code>Result</code> | <code></code> |
18
+ | Name | Description | Type | Default |
19
+ | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------- | ------------------------------------- |
20
+ | <code>result</code> | The original result containing the variants. | <code>Result</code> | <code></code> |
21
+ | <code>autoSelectDepth</code> | The provider by default will auto select the first variants of all levels.<br />This prop allows to limit the number of variants auto selected when the provider is created.<br />Take into account that the depth will be the variants level + 1, so, setting autoSelectDepth<br />to 0 will not select any variant, setting it to 1 will select only the first variant of the<br />first level, and so on. | <code>number</code> | <code>Number.POSITIVE_INFINITY</code> |
21
22
 
22
23
  ## Events
23
24
 
@@ -31,6 +32,8 @@ This component is intended to be used in conjunction with the `ResultVariantSele
31
32
 
32
33
  The result exposed in the default slot will contain the data of the selected variant.
33
34
 
35
+ By default, the first variants of all the levels will be selected when the component is rendered.
36
+
34
37
  ```vue
35
38
  <template>
36
39
  <ResultVariantsProvider :result="result" #default="{ result }">
@@ -105,3 +108,88 @@ export default {
105
108
  };
106
109
  </script>
107
110
  ```
111
+
112
+ ### Play with props
113
+
114
+ In this example, the provider has been configured to not auto select any variant. Changing the
115
+ `autoSelectDepth` prop sets the number of variant levels to auto select, being 0 no variants, 1 the
116
+ first variant of the first level, and so on.
117
+
118
+ ```vue
119
+ <template>
120
+ <ResultVariantsProvider
121
+ :result="result"
122
+ :autoSelectDepth="0"
123
+ #default="{ result }"
124
+ >
125
+ <p>Result name: {{ result.name }}</p>
126
+
127
+ <h1>Select color</h1>
128
+ <ResultVariantSelector :level="0" #variant="{ variant, selectVariant }">
129
+ <button @click="selectVariant">{{ variant.name }}</button>
130
+ </ResultVariantSelector>
131
+
132
+ <h1>Select size</h1>
133
+ <ResultVariantSelector :level="1" #variant="{ variant, selectVariant }">
134
+ <button @click="selectVariant">{{ variant.name }}</button>
135
+ </ResultVariantSelector>
136
+ </ResultVariantsProvider>
137
+ </template>
138
+
139
+ <script>
140
+ import {
141
+ ResultVariantsProvider,
142
+ ResultVariantSelector
143
+ } from "@empathyco/x-components";
144
+
145
+ export default {
146
+ name: "ResultVariantsProviderDemo",
147
+ components: {
148
+ ResultVariantsProvider,
149
+ ResultVariantSelector
150
+ },
151
+ data() {
152
+ return {
153
+ result: {
154
+ id: "jacket",
155
+ modelName: "Result",
156
+ type: "Product",
157
+ isWishlisted: false,
158
+ identifier: { value: "jacket" },
159
+ images: [],
160
+ name: "jacket",
161
+ price: { hasDiscount: false, originalValue: 10, value: 10 },
162
+ url: "/products/jacket",
163
+ variants: [
164
+ {
165
+ name: "red",
166
+ variants: [
167
+ {
168
+ name: "red XL"
169
+ },
170
+ {
171
+ name: "red L"
172
+ }
173
+ ]
174
+ },
175
+ {
176
+ name: "blue",
177
+ variants: [
178
+ {
179
+ name: "blue S"
180
+ },
181
+ {
182
+ name: "blue M"
183
+ },
184
+ {
185
+ name: "blue L"
186
+ }
187
+ ]
188
+ }
189
+ ]
190
+ }
191
+ };
192
+ }
193
+ };
194
+ </script>
195
+ ```
@@ -162,8 +162,8 @@ building your search and discovery UI:
162
162
 
163
163
  </br>
164
164
  <VideoContent
165
- source="/assets/media/videos/How-to-use-X-components-in-a-real-project.mp4"
166
- poster="/assets/media/videos/How-to-use-X-components-in-a-real-project.jpeg"
165
+ :source="$withBase('/assets/media/videos/How-to-use-X-components-in-a-real-project.mp4')"
166
+ :poster="$withBase('/assets/media/videos/How-to-use-X-components-in-a-real-project.jpeg')"
167
167
  >
168
168
 
169
169
  Watch how our frontend Team Lead, [Iván Tajes](https://github.com/tajespasarela), integrates the
@@ -4,7 +4,7 @@ title: Experience search & discovery
4
4
 
5
5
  # Experience search & discovery
6
6
 
7
- Search inevitably is key when people look for specific products in an online store. It is the door
7
+ Search inevitably is key when people look for specific products in an online store. It's the door
8
8
  to the entire product catalogue, so having an outstanding, well-structured, and optimized search UI
9
9
  is a must.
10
10
 
@@ -30,8 +30,9 @@ Apps cover everything and even go beyond, thanks to their standalone, configurab
30
30
  that allow you to quickly construct the search UI for your store:
31
31
  **Interface&nbsp;X&nbsp;Components** and **Interface&nbsp;X&nbsp;Components for Apps**.
32
32
 
33
- **Mix and match your experience**
34
- Each X&nbsp;Component represents a graphical part of the UI, with
33
+ ### Mix and match your experience
34
+
35
+ Each Interface&nbsp;X&nbsp;Component represents a graphical part of the UI, with
35
36
  its own unique view and behavior. They’ve been smartly designed to **work together yet
36
37
  independently**, so a single component adds real value to your UI by itself. The more components you
37
38
  add and combine, the more functionality you get.
@@ -58,35 +59,7 @@ choose the modules and components that best suit your needs.
58
59
 
59
60
  :::
60
61
 
61
- ## Try X Components to…
62
-
63
- - Surprise your shoppers by **rendering shopping-aimed search and discovery features** that
64
- intuitively guide and inspire them with trends, suggestions, and recommendations, based on your
65
- shoppers’ behavior.
66
- - Add a **predictive layer** to your search UI that gathers all search functionalities in one, from
67
- autocomplete and autosuggest to ideas of what to look for next.
68
- - Delight your shoppers with an **elegant and multi-configurable SERP** to help them discover what
69
- they’re exactly looking for.
70
- - Enhance the shopping experience by adding **additional features to the SERP** such as add-to-cart
71
- buttons or product rating information.
72
-
73
- ::: warning
74
-
75
- Some X&nbsp;Components are supported by Empathy Platform search and discovery features. If you’re
76
- using a different search engine, make sure it supports all the functionalities you need.
77
-
78
- :::
79
-
80
- ::: interact
81
-
82
- Explore the Empathy Platform [interactive map](/explore-empathy-platform/diagram/interface/) for a
83
- sneak peak of the X&nbsp;Components available!
84
-
85
- :::
86
-
87
- ---
88
-
89
- ## Discover Interface X Components
62
+ #### Discover Interface X Components for web
90
63
 
91
64
  Check out these X&nbsp;Components for Vue.js applications. They’ll certainly come in handy if you
92
65
  want to make the difference!
@@ -94,6 +67,7 @@ want to make the difference!
94
67
  <CardCarousel :cards="[
95
68
  'x_popular_searches',
96
69
  'x_history_queries',
70
+ 'x_my_history',
97
71
  'x_id_results',
98
72
  'x_search_box',
99
73
  'x_query_suggestions',
@@ -105,16 +79,14 @@ want to make the difference!
105
79
  'x_facets']"
106
80
  />
107
81
 
108
- ::: note
82
+ ::: interact
109
83
 
110
84
  Check out the **Interface X for web [open-source project](https://github.com/empathyco/x)** on
111
85
  GitHub!
112
86
 
113
87
  :::
114
88
 
115
- ---
116
-
117
- ## Discover Interface X Components for Apps
89
+ #### Discover Interface X Components for Apps
118
90
 
119
91
  Check out the X&nbsp;Components available for Interface&nbsp;X for Apps, that can help you create
120
92
  your native app search solution.
@@ -122,6 +94,7 @@ your native app search solution.
122
94
  <CardCarousel :cards="[
123
95
  'x_popular_searches',
124
96
  'x_history_queries',
97
+ 'x_my_history',
125
98
  'x_id_results',
126
99
  'x_search_box',
127
100
  'x_query_suggestions',
@@ -130,3 +103,29 @@ your native app search solution.
130
103
  'x_empathize',
131
104
  'x_results',]"
132
105
  />
106
+
107
+ ::: warning
108
+
109
+ Some X&nbsp;Components are supported by Empathy Platform search and discovery features. If you’re
110
+ using a different search engine, make sure it supports all the functionalities you need.
111
+
112
+ :::
113
+
114
+ ## Try X Components to…
115
+
116
+ - Surprise your shoppers by **rendering shopping-aimed search and discovery features** that
117
+ intuitively guide and inspire them with trends, suggestions, and recommendations, based on your
118
+ shoppers’ behavior.
119
+ - Add a **predictive layer** to your search UI that gathers all search functionalities in one, from
120
+ autocomplete and autosuggest to ideas of what to look for next.
121
+ - Delight your shoppers with an **elegant and multi-configurable SERP** to help them discover what
122
+ they’re exactly looking for.
123
+ - Enhance the shopping experience by adding **additional features to the SERP**, such as add-to-cart
124
+ buttons or product rating information.
125
+
126
+ ::: interact
127
+
128
+ Explore the Empathy Platform [interactive map](/explore-empathy-platform/diagram/interface/) for a
129
+ sneak peak of the X&nbsp;Components available!
130
+
131
+ :::
@@ -9,11 +9,9 @@ Empathize is a UI container, but not just any container. It’s the
9
9
  experience that is usually displayed below the search box. Consider it the natural companion of the
10
10
  **[search box](search-box.md)**, featuring search suggestions and recommendations.
11
11
 
12
- ![Empathize](/assets/media/xcomponents_func_empathize.gif)
12
+ ![Empathize](~@assets/media/xcomponents_func_empathize.gif)
13
13
 
14
- **Placement matters**
15
-
16
- One of the characteristics of X&nbsp;Components is that you can place them
14
+ One of the characteristics of Interface&nbsp;X&nbsp;Components is that you can place them
17
15
  wherever you want. However, you know that the placement of the search box in your shop matters. So,
18
16
  why have search suggestions and recommendations spread all over the page, far away from the search
19
17
  box? The Empathize container brings everything together so that your shoppers perceive a smooth,
@@ -24,10 +22,10 @@ effortless search experience.
24
22
  Being the face of your predictive layer, Empathize comes into play before the search process starts
25
23
  and only makes sense when used with other components.
26
24
 
27
- Thanks to the nature of X&nbsp;Components, you can mix and match the components you use within
25
+ Thanks to the nature of Interface&nbsp;X&nbsp;Components, you can [mix and match the components](/explore-empathy-platform/experience-search-and-discovery/readme.md#mix-and-match-your-experience) you use within
28
26
  Empathize. For example, provide shoppers with search ideas and use Empathize to display popular
29
- search terms and trending products. Or anticipate your shoppers’ intent with recent searches and
30
- query suggestions. There are lots of handy possibilities that you might want to place close to the
27
+ search terms and trending products. Anticipate your shoppers’ intent with recent searches and
28
+ query suggestions. Or give shoppers access to their [complete search history](my-history.md) and let them control tracking search data. There are lots of handy possibilities that you might want to place close to the
31
29
  search box.
32
30
 
33
31
  **Combine Empathize with:**
@@ -36,10 +34,12 @@ search box.
36
34
  - [Recommendations](recommendations.md)
37
35
  - [History Queries](history-queries.md)
38
36
  - [Query Suggestions](query-suggestions.md)
37
+ - [Next Queries](next-queries.md)
38
+ - [ID Results](id-results.md)
39
39
 
40
40
  ## How it works...
41
41
 
42
- Empathize is an event-driven component. It is determined by events that make it react to shoppers'
42
+ Empathize is an event-driven component. It's determined by events that make it react to shoppers'
43
43
  actions, such as clicks or keystrokes. That is the Empathize magic; the component listens by default
44
44
  to some events to expand the container and others to collapse it. However, this behavior is
45
45
  configurable.
@@ -96,7 +96,7 @@ search capabilities, such as Query Suggestions and Popular Searches. Don’t get
96
96
 
97
97
  ::: interact
98
98
 
99
- Want to know more? Learn how to [configure](/develop-empathy-platform/ui-reference/) your web
99
+ Want to know more? Learn how to [configure](/develop-empathy-platform/ui-reference/components/empathize/x-components.empathize.md) your web
100
100
  experience.
101
101
 
102
102
  :::
@@ -144,7 +144,7 @@ Make sure your current Search microservice is compatible with this kind of confi
144
144
 
145
145
  ::: interact
146
146
 
147
- Want to know more? Learn how to [configure](/develop-empathy-platform/ui-reference/) your web
147
+ Want to know more? Learn how to [configure](/develop-empathy-platform/ui-reference/components/facets/) your web
148
148
  experience.
149
149
 
150
150
  :::
@@ -7,7 +7,7 @@ title: History Queries UI
7
7
  The History Queries UI component displays the search history, allowing shoppers to check previous
8
8
  searches and revisit products they’ve viewed before in a few clicks.
9
9
 
10
- ![History Queries](/assets/media/xcomponents_func_historyqueries.gif)
10
+ ![History Queries](~@assets/media/xcomponents_func_historyqueries.gif)
11
11
 
12
12
  ::: interact
13
13
 
@@ -36,7 +36,7 @@ Can't quite capture the concept? Learn more about
36
36
 
37
37
  ::: interact
38
38
 
39
- Want to know more? Learn how to [configure](/develop-empathy-platform/ui-reference/) your web
39
+ Want to know more? Learn how to [configure](/develop-empathy-platform/ui-reference/components/history-queries/) your web
40
40
  experience.
41
41
 
42
42
  :::
@@ -51,9 +51,14 @@ session will display.
51
51
  Combine History Queries with the [Search module](/develop-empathy-platform/ui-reference/components/search/) to ease shoppers' frustrations. That way, you can
52
52
  configure it to display only successful history searches.
53
53
 
54
+ ::: note Search history tracking
55
+
56
+ Use the [My History](my-history.md) component to access and control search history. Shoppers can view a complete list of history queries and decide to stop saving search history. If search history is disabled, the History Queries list is cleared.
57
+
58
+ :::
54
59
 
55
60
  ::: interact
56
61
 
57
- To know more about which data is stored in the browser’s data storage, check out [nterface X data privacy and browser local storage](/web-local-storage.md).'
62
+ To know more about which data is stored in the browser’s data storage, check out [Interface X data privacy and browser local storage](web-local-storage.md).
58
63
 
59
64
  :::
@@ -38,7 +38,7 @@ Don't quite understand ID results? Learn more about
38
38
 
39
39
  ::: interact
40
40
 
41
- Want to know more? Learn how to [configure](/develop-empathy-platform/ui-reference/) your web
41
+ Want to know more? Learn how to [configure](/develop-empathy-platform/ui-reference/components/identifier-results/) your web
42
42
  experience.
43
43
 
44
44
  :::
@@ -0,0 +1,50 @@
1
+ ---
2
+ title: My History UI
3
+ ---
4
+
5
+ The My History UI component displays the complete list of history queries, allowing shoppers to reuse previously searched queries.
6
+
7
+ ![My History](~@assets/media/overview_myhistory.svg)
8
+
9
+ ::: interact
10
+
11
+ Can't quite capture the concept? Learn more about [My History](/explore-empathy-platform/features/my-history-overview.md).
12
+
13
+ :::
14
+
15
+ From the frontend perspective, My History is a UI component that specifically manages the display of a list of history search suggestions. To display a dashboard featuring shoppers' data privacy and control, My History is combined with other UI elements and components, such as a toggle switch for shoppers to enable or disable search history.
16
+
17
+ ::: note Search data storage
18
+
19
+ To show the complete list of history queries, My History component uses the history records saved on the shopper’s browser local history. See [Interface X data privacy and browser local storage](/explore-empathy-platform/experience-search-and-discovery/web-local-storage.md) to check out the information stored locally on the shopper’s device.
20
+
21
+ :::
22
+
23
+
24
+ ## Tailor the web experience
25
+
26
+ - Configure the position and place it wherever you prefer.
27
+ - Layout the list of history queries as you want.
28
+ - Customize date and time format.
29
+ - Animate the display of My History dashboard at your ease.
30
+ - Customize content. Show whatever you need: text, images, icons...
31
+
32
+ ::: note
33
+
34
+ Configuration options here only apply to tailor the My History component, which provides a way to display the full list of history queries. Other UI elements that comprise the My History feature can be configured as well. Check a complete list of UI components in the [Interface X Components UI Reference](/develop-empathy-platform/ui-reference/).
35
+
36
+ :::
37
+
38
+ ::: interact
39
+
40
+ Want to know more? Learn how to [configure](/develop-empathy-platform/ui-reference/components/history-queries/x-components.my-history) your search history experience.
41
+
42
+ :::
43
+
44
+ <!--Include link to twitch session here: Watch how XXX uses the My History UI component in a real project. -->
45
+
46
+
47
+
48
+
49
+
50
+
@@ -8,7 +8,7 @@ The Next Queries UI component provides shoppers with ideas on what to search for
8
8
  last search. Since next queries are related to the last query, they appear after performing a first
9
9
  search.
10
10
 
11
- ![Next Queries](/assets/media/xcomponents_func_nextqueries.gif)
11
+ ![Next Queries](~@assets/media/xcomponents_func_nextqueries.gif)
12
12
 
13
13
  Next queries can be **organic**, using information on the most common searches that are performed
14
14
  successively or within a same session by shoppers, or **curated**, created manually by the
@@ -8,7 +8,7 @@ The Popular Searches UI component displays what are the top search queries durin
8
8
  This type of suggestion can show up even before shoppers have started entering a query or when there
9
9
  are no search results to show.
10
10
 
11
- ![Popular Searches](/assets/media/xcomponents_func_popularsearches.gif)
11
+ ![Popular Searches](~@assets/media/xcomponents_func_popularsearches.gif)
12
12
 
13
13
  ::: warning
14
14
 
@@ -14,7 +14,7 @@ tailor the display to create the best product discovery experience for your shop
14
14
  elements and product-related information you want to include when displaying product results such as
15
15
  the price, a picture, or even an add-to-cart button.
16
16
 
17
- ![X Components for results display](/assets/media/overview_product_card.svg)
17
+ ![X Components for results display](~@assets/media/overview_product_card.svg)
18
18
 
19
19
  <FootNote>
20
20
 
@@ -8,7 +8,7 @@ The Query Suggestions UI component helps your shoppers with hints of what to loo
8
8
  relevant results. They complete and nail down the query as shoppers type without needing to keep
9
9
  typing.
10
10
 
11
- ![Query Suggestions](/assets/media/xcomponents_func_querysuggestions.gif)
11
+ ![Query Suggestions](~@assets/media/xcomponents_func_querysuggestions.gif)
12
12
 
13
13
  ::: warning
14
14
 
@@ -10,7 +10,7 @@ the results appear to fine-tune the search with extra information and get highly
10
10
  They are shown as labels usually at the top of the results page, but can be displayed anywhere
11
11
  instead.
12
12
 
13
- ![Related Tags](/assets/media/xcomponents_func_relatedtags.gif)
13
+ ![Related Tags](~@assets/media/xcomponents_func_relatedtags.gif)
14
14
 
15
15
  ::: warning
16
16
 
@@ -8,7 +8,7 @@ To handle and display search results, the layout of results and other related di
8
8
  paramount. For example, how to arrange results on the SERP or the features shoppers expect to easily
9
9
  navigate and organize results are key points to have in mind. <br/>
10
10
 
11
- ![X Components for results layout](/assets/media/xcomponents_func_results_layout.svg)
11
+ ![X Components for results layout](~@assets/media/xcomponents_func_results_layout.svg)
12
12
 
13
13
  <FootNote>
14
14
 
@@ -10,8 +10,8 @@ tags:
10
10
 
11
11
  # Interface X data privacy and browser local storage
12
12
 
13
- Interface&nbsp;X for web _doesn't use cookies_ for storing data. The
14
- Interface&nbsp;X&nbsp;Components use the web browser's local storage to save the technical data
13
+ Interface&nbsp;X for web **does not use cookies** for storing data. The
14
+ [Interface X Components](readme.md#interface-x-and-interface-x-for-apps-the-solution) use the web browser's local storage to save the technical data
15
15
  required to provide the services associated with the search & discovery experience. The data remains
16
16
  in the shopper's device until the expiration time is reached or the shopper chooses to delete it.
17
17
 
@@ -20,6 +20,6 @@ local storage:
20
20
 
21
21
  | Key | Duration | Purpose |
22
22
  | ---------------------- | ---------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
23
- | `x-session-id` | 30 minutes | Short-term session ID to be sent to the Tagging API. It identifies short sessions in a device. It does not identify individual shoppers in any way. It is required for [Analytics](https://docs.empathy.co/explore-empathy-platform/understand-data-privacy/), [Next Queries](https://docs.empathy.co/explore-empathy-platform/features/history-queries-overview.html), and [Related Tags](https://docs.empathy.co/explore-empathy-platform/features/related-tags-overview.html) features |
23
+ | `x-session-id` | 30 minutes | Short-term session ID to be sent to the Tagging API. It identifies short sessions in a device. It does not identify individual shoppers in any way. It's required for [Analytics](/explore-empathy-platform/understand-data-privacy/), [Next Queries](/explore-empathy-platform/features/history-queries-overview.html), and [Related Tags](/explore-empathy-platform/features/related-tags-overview.html) features |
24
24
  | `x-session-time-stamp` | 30 minutes | Timestamp for the current session ID |
25
25
  | `x-history-queries` | Stored until the shopper clears/disables the feature | List of the searches performed that the shopper has chosen to store, which are shown in different steps of the search journey. |