@empathyco/x-components 3.0.0-alpha.145 → 3.0.0-alpha.148

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 (124) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/core/index.js +1 -1
  3. package/core/index.js.map +1 -1
  4. package/design-system/full-theme.css +59 -58
  5. package/docs/API-reference/api/x-adapter-platform.md +0 -1
  6. package/docs/API-reference/api/x-adapter-platform.searchresponsemapper.md +1 -11
  7. package/docs/API-reference/api/x-components.facetsmutations.md +1 -1
  8. package/docs/API-reference/api/x-components.facetsmutations.mutatefilter.md +24 -0
  9. package/docs/API-reference/api/x-components.flathierarchicalfilters.md +26 -0
  10. package/docs/API-reference/api/x-components.md +3 -0
  11. package/docs/API-reference/api/x-components.mutatefilterpayload.filter.md +13 -0
  12. package/docs/API-reference/api/x-components.mutatefilterpayload.md +21 -0
  13. package/docs/API-reference/api/x-components.mutatefilterpayload.newfilterstate.md +13 -0
  14. package/docs/API-reference/api/x-components.nextquerieslist.injectedquery.md +13 -0
  15. package/docs/API-reference/api/x-components.nextquerieslist.md +1 -0
  16. package/docs/API-reference/api/x-components.nextquerypreview.md +29 -0
  17. package/docs/API-reference/api/x-components.nextquerypreview.mounted.md +17 -0
  18. package/docs/API-reference/api/x-components.nextquerypreview.previewresults.md +13 -0
  19. package/docs/API-reference/api/x-components.nextquerypreview.suggestion.md +13 -0
  20. package/docs/API-reference/api/x-components.nextquerypreview.suggestionresults.md +13 -0
  21. package/docs/API-reference/api/x-components.resultslist.md +9 -0
  22. package/docs/API-reference/api/x-components.resultslist.providedquery.md +13 -0
  23. package/docs/API-reference/api/x-components.resultslist.searchquery.md +13 -0
  24. package/docs/API-reference/api/x-components.resultslist.searchstatus.md +13 -0
  25. package/docs/API-reference/api/x-components.resultslist.updatequery.md +24 -0
  26. package/docs/API-reference/api/x-types.hierarchicalfilter.children.md +2 -2
  27. package/docs/API-reference/api/x-types.hierarchicalfilter.md +2 -2
  28. package/docs/API-reference/api/x-types.hierarchicalfilter.parentid.md +1 -1
  29. package/docs/API-reference/components/next-queries/x-components.next-query-preview.md +155 -0
  30. package/docs/experience-search-&-discovery/README.md +119 -0
  31. package/docs/experience-search-&-discovery/empathize.md +102 -0
  32. package/docs/experience-search-&-discovery/facets-and-filters.md +138 -0
  33. package/docs/experience-search-&-discovery/history-queries.md +56 -0
  34. package/docs/experience-search-&-discovery/id-results.md +40 -0
  35. package/docs/experience-search-&-discovery/next-queries.md +52 -0
  36. package/docs/experience-search-&-discovery/popular-searches.md +32 -0
  37. package/docs/experience-search-&-discovery/product-results-ui.md +68 -0
  38. package/docs/experience-search-&-discovery/query-suggestions.md +32 -0
  39. package/docs/experience-search-&-discovery/recommendations.md +32 -0
  40. package/docs/experience-search-&-discovery/related-tags.md +41 -0
  41. package/docs/experience-search-&-discovery/search-box.md +81 -0
  42. package/docs/experience-search-&-discovery/serp-ui.md +109 -0
  43. package/docs/experience-search-&-discovery/web-local-storage.md +25 -0
  44. package/facets/index.js +1 -1
  45. package/js/components/base-grid.vue.js +2 -2
  46. package/js/components/base-grid.vue.js.map +1 -1
  47. package/js/components/decorators/injection.consts.js +8 -2
  48. package/js/components/decorators/injection.consts.js.map +1 -1
  49. package/js/index.js +4 -3
  50. package/js/index.js.map +1 -1
  51. package/js/x-modules/facets/components/facets/facets-provider.vue.js +2 -2
  52. package/js/x-modules/facets/components/facets/facets-provider.vue.js.map +1 -1
  53. package/js/x-modules/facets/components/facets/facets-provider.vue_rollup-plugin-vue_script.vue.js +7 -2
  54. package/js/x-modules/facets/components/facets/facets-provider.vue_rollup-plugin-vue_script.vue.js.map +1 -1
  55. package/js/x-modules/facets/components/filters/hierarchical-filter.vue.js.map +1 -1
  56. package/js/x-modules/facets/components/filters/hierarchical-filter.vue_rollup-plugin-vue_script.vue.js +2 -130
  57. package/js/x-modules/facets/components/filters/hierarchical-filter.vue_rollup-plugin-vue_script.vue.js.map +1 -1
  58. package/js/x-modules/facets/entities/editable-number-range-filter.entity.js +11 -10
  59. package/js/x-modules/facets/entities/editable-number-range-filter.entity.js.map +1 -1
  60. package/js/x-modules/facets/entities/hierarchical-filter.entity.js +9 -11
  61. package/js/x-modules/facets/entities/hierarchical-filter.entity.js.map +1 -1
  62. package/js/x-modules/facets/entities/number-range-filter.entity.js +2 -2
  63. package/js/x-modules/facets/entities/number-range-filter.entity.js.map +1 -1
  64. package/js/x-modules/facets/entities/raw-filter.entity.js +1 -1
  65. package/js/x-modules/facets/entities/raw-filter.entity.js.map +1 -1
  66. package/js/x-modules/facets/entities/simple-filter.entity.js +2 -2
  67. package/js/x-modules/facets/entities/simple-filter.entity.js.map +1 -1
  68. package/js/x-modules/facets/entities/single-select.modifier.js +1 -1
  69. package/js/x-modules/facets/entities/single-select.modifier.js.map +1 -1
  70. package/js/x-modules/facets/service/facets.service.js +18 -2
  71. package/js/x-modules/facets/service/facets.service.js.map +1 -1
  72. package/js/x-modules/facets/store/module.js +4 -3
  73. package/js/x-modules/facets/store/module.js.map +1 -1
  74. package/js/x-modules/facets/utils.js +16 -1
  75. package/js/x-modules/facets/utils.js.map +1 -1
  76. package/js/x-modules/next-queries/components/next-queries-list.vue.js.map +1 -1
  77. package/js/x-modules/next-queries/components/next-queries-list.vue_rollup-plugin-vue_script.vue.js +19 -0
  78. package/js/x-modules/next-queries/components/next-queries-list.vue_rollup-plugin-vue_script.vue.js.map +1 -1
  79. package/js/x-modules/next-queries/components/next-query-preview.vue.js +94 -0
  80. package/js/x-modules/next-queries/components/next-query-preview.vue.js.map +1 -0
  81. package/js/x-modules/next-queries/components/next-query-preview.vue_rollup-plugin-vue_script.vue.js +48 -0
  82. package/js/x-modules/next-queries/components/next-query-preview.vue_rollup-plugin-vue_script.vue.js.map +1 -0
  83. package/js/x-modules/next-queries/store/actions/fetch-and-save-next-query-preview.action.js.map +1 -1
  84. package/js/x-modules/search/components/results-list.vue.js.map +1 -1
  85. package/js/x-modules/search/components/results-list.vue_rollup-plugin-vue_script.vue.js +33 -2
  86. package/js/x-modules/search/components/results-list.vue_rollup-plugin-vue_script.vue.js.map +1 -1
  87. package/js/x-modules/search-box/components/search-input.vue.js +54 -45
  88. package/js/x-modules/search-box/components/search-input.vue.js.map +1 -1
  89. package/js/x-modules/search-box/components/search-input.vue_rollup-plugin-vue_script.vue.js.map +1 -1
  90. package/next-queries/index.js +2 -1
  91. package/package.json +4 -4
  92. package/report/x-adapter-platform.api.json +5 -133
  93. package/report/x-components.api.json +491 -45
  94. package/report/x-components.api.md +32 -5
  95. package/report/x-types.api.json +5 -5
  96. package/types/components/decorators/injection.consts.d.ts +6 -0
  97. package/types/components/decorators/injection.consts.d.ts.map +1 -1
  98. package/types/x-modules/facets/components/facets/facets-provider.vue.d.ts.map +1 -1
  99. package/types/x-modules/facets/components/filters/hierarchical-filter.vue.d.ts +0 -6
  100. package/types/x-modules/facets/components/filters/hierarchical-filter.vue.d.ts.map +1 -1
  101. package/types/x-modules/facets/entities/editable-number-range-filter.entity.d.ts +1 -1
  102. package/types/x-modules/facets/entities/editable-number-range-filter.entity.d.ts.map +1 -1
  103. package/types/x-modules/facets/entities/hierarchical-filter.entity.d.ts +2 -1
  104. package/types/x-modules/facets/entities/hierarchical-filter.entity.d.ts.map +1 -1
  105. package/types/x-modules/facets/entities/single-select.modifier.d.ts.map +1 -1
  106. package/types/x-modules/facets/service/facets.service.d.ts +13 -0
  107. package/types/x-modules/facets/service/facets.service.d.ts.map +1 -1
  108. package/types/x-modules/facets/store/module.d.ts.map +1 -1
  109. package/types/x-modules/facets/store/types.d.ts +22 -6
  110. package/types/x-modules/facets/store/types.d.ts.map +1 -1
  111. package/types/x-modules/facets/utils.d.ts +11 -0
  112. package/types/x-modules/facets/utils.d.ts.map +1 -1
  113. package/types/x-modules/next-queries/components/index.d.ts +2 -1
  114. package/types/x-modules/next-queries/components/index.d.ts.map +1 -1
  115. package/types/x-modules/next-queries/components/next-queries-list.vue.d.ts +11 -0
  116. package/types/x-modules/next-queries/components/next-queries-list.vue.d.ts.map +1 -1
  117. package/types/x-modules/next-queries/components/next-query-preview.vue.d.ts +35 -0
  118. package/types/x-modules/next-queries/components/next-query-preview.vue.d.ts.map +1 -0
  119. package/types/x-modules/search/components/results-list.vue.d.ts +21 -0
  120. package/types/x-modules/search/components/results-list.vue.d.ts.map +1 -1
  121. package/types/x-modules/search-box/components/search-input.vue.d.ts.map +1 -1
  122. package/docs/API-reference/api/x-adapter-platform.searchresponsefacetsmapper.md +0 -27
  123. package/docs/API-reference/api/x-components.facetsmutations.setfilter.md +0 -24
  124. package/docs/functional-doc/web-local-storage.md +0 -22
package/CHANGELOG.md CHANGED
@@ -3,6 +3,51 @@
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.148](https://github.com/empathyco/x/compare/@empathyco/x-components@3.0.0-alpha.147...@empathyco/x-components@3.0.0-alpha.148) (2022-08-04)
7
+
8
+ ### Features
9
+
10
+ - **next-queries:** add next query preview component (#631)
11
+ ([1513ab1](https://github.com/empathyco/x/commit/1513ab1ef0cbcf42d72f483d99815eba76b5eaad)),
12
+ closes [EX-6646](https://searchbroker.atlassian.net/browse/EX-6646)
13
+
14
+ # Change Log
15
+
16
+ All notable changes to this project will be documented in this file. See
17
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
18
+
19
+ ## [3.0.0-alpha.147](https://github.com/empathyco/x/compare/@empathyco/x-components@3.0.0-alpha.146...@empathyco/x-components@3.0.0-alpha.147) (2022-08-03)
20
+
21
+ ### ⚠ BREAKING CHANGES
22
+
23
+ - **facets:** Removed the `setFilter`mutation from `facets` X-Module. Use `mutateFilter` instead.
24
+ - **facets:** Modified the `HierarchicalFilter.children` Model type. Now it is an
25
+ `Array<HierarchicalFilter>` instead of an array of ids.
26
+
27
+ ### Features
28
+
29
+ - **facets:** Move filters flattening from `x-adapter-platform` to `x-components`. (#626)
30
+ ([2bebaeb](https://github.com/empathyco/x/commit/2bebaeb2863fe794f1b3bea924904651b9302ef6)),
31
+ closes [EX-6484](https://searchbroker.atlassian.net/browse/EX-6484)
32
+
33
+ # Change Log
34
+
35
+ All notable changes to this project will be documented in this file. See
36
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
37
+
38
+ ## [3.0.0-alpha.146](https://github.com/empathyco/x/compare/@empathyco/x-components@3.0.0-alpha.145...@empathyco/x-components@3.0.0-alpha.146) (2022-08-03)
39
+
40
+ ### Documentation
41
+
42
+ - bring functional docs from eDocs project (#630)
43
+ ([27e6dd6](https://github.com/empathyco/x/commit/27e6dd646084983c37fc52894dc95544253405d5)),
44
+ closes [EX-6237](https://searchbroker.atlassian.net/browse/EX-6237)
45
+
46
+ # Change Log
47
+
48
+ All notable changes to this project will be documented in this file. See
49
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
50
+
6
51
  ## [3.0.0-alpha.145](https://github.com/empathyco/x/compare/@empathyco/x-components@3.0.0-alpha.144...@empathyco/x-components@3.0.0-alpha.145) (2022-08-01)
7
52
 
8
53
  ### Documentation
package/core/index.js CHANGED
@@ -118,7 +118,7 @@ export { default as SlidingPanel } from '../js/components/sliding-panel.vue.js';
118
118
  export { default as SnippetCallbacks } from '../js/components/snippet-callbacks.vue.js';
119
119
  export { XEmit, XOn } from '../js/components/decorators/bus.decorators.js';
120
120
  export { Debounce } from '../js/components/decorators/debounce.decorators.js';
121
- export { LIST_ITEMS_KEY } from '../js/components/decorators/injection.consts.js';
121
+ export { LIST_ITEMS_KEY, QUERY_KEY } from '../js/components/decorators/injection.consts.js';
122
122
  export { XInject, XProvide } from '../js/components/decorators/injection.decorators.js';
123
123
  export { Getter, State } from '../js/components/decorators/store.decorators.js';
124
124
  export { ItemsListInjectionMixin } from '../js/components/items-list-injection.mixin.js';
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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1445,64 +1445,6 @@
1445
1445
  --x-size-border-radius-bottom-right-input-card: var(--x-size-border-radius-input-card);
1446
1446
  --x-size-border-radius-bottom-left-input-card: var(--x-size-border-radius-input-card);
1447
1447
  }
1448
- [dir="ltr"] .x-input {
1449
- padding-left: var(--x-size-padding-left-input-default);
1450
- }
1451
- [dir="rtl"] .x-input {
1452
- padding-right: var(--x-size-padding-left-input-default);
1453
- }
1454
- [dir="ltr"] .x-input {
1455
- padding-right: var(--x-size-padding-right-input-default);
1456
- }
1457
- [dir="rtl"] .x-input {
1458
- padding-left: var(--x-size-padding-right-input-default);
1459
- }
1460
- [dir="ltr"] .x-input {
1461
- border-right-width: var(--x-size-border-width-right-input-default);
1462
- }
1463
- [dir="rtl"] .x-input {
1464
- border-left-width: var(--x-size-border-width-right-input-default);
1465
- }
1466
- [dir="ltr"] .x-input {
1467
- border-left-width: var(--x-size-border-width-left-input-default);
1468
- }
1469
- [dir="rtl"] .x-input {
1470
- border-right-width: var(--x-size-border-width-left-input-default);
1471
- }
1472
- .x-input {
1473
- box-sizing: border-box;
1474
- margin: 0;
1475
- min-width: 0;
1476
- height: var(--x-size-height-input-default);
1477
- padding-top: 0;
1478
- padding-bottom: 0;
1479
- background-color: var(--x-color-background-input-default);
1480
- border-color: var(--x-color-border-input-default);
1481
- color: var(--x-color-text-input-default);
1482
- border-top-width: var(--x-size-border-width-top-input-default);
1483
- border-bottom-width: var(--x-size-border-width-bottom-input-default);
1484
- border-radius: var(--x-size-border-radius-top-left-input-default) var(--x-size-border-radius-top-right-input-default) var(--x-size-border-radius-bottom-right-input-default) var(--x-size-border-radius-bottom-left-input-default);
1485
- border-style: solid;
1486
- font-family: var(--x-font-family-input-default);
1487
- font-size: var(--x-size-font-input-default);
1488
- font-weight: var(--x-number-font-weight-input-default);
1489
- line-height: var(--x-size-line-height-input-default);
1490
- }
1491
- @media not all and (min-resolution: 0.001dpcm) {
1492
- .x-input {
1493
- -webkit-appearance: none;
1494
- }
1495
- }
1496
- .x-input:focus {
1497
- border-color: var(--x-color-border-input-default-focus);
1498
- }
1499
- .x-input::placeholder {
1500
- color: var(--x-color-text-input-placeholder-default);
1501
- font-family: var(--x-font-family-input-placeholder-default);
1502
- font-size: var(--x-size-font-input-placeholder-default);
1503
- font-weight: var(--x-number-font-weight-input-placeholder-default);
1504
- line-height: var(--x-size-line-height-input-placeholder-default);
1505
- }
1506
1448
  :root {
1507
1449
  --x-color-background-input-default: var(--x-color-base-neutral-100);
1508
1450
  --x-color-border-input-default: var(--x-color-base-neutral-70);
@@ -7593,3 +7535,62 @@
7593
7535
  .x-normal-case {
7594
7536
  text-transform: none;
7595
7537
  }
7538
+
7539
+ [dir="ltr"] .x-input {
7540
+ padding-left: var(--x-size-padding-left-input-default);
7541
+ }
7542
+ [dir="rtl"] .x-input {
7543
+ padding-right: var(--x-size-padding-left-input-default);
7544
+ }
7545
+ [dir="ltr"] .x-input {
7546
+ padding-right: var(--x-size-padding-right-input-default);
7547
+ }
7548
+ [dir="rtl"] .x-input {
7549
+ padding-left: var(--x-size-padding-right-input-default);
7550
+ }
7551
+ [dir="ltr"] .x-input {
7552
+ border-right-width: var(--x-size-border-width-right-input-default);
7553
+ }
7554
+ [dir="rtl"] .x-input {
7555
+ border-left-width: var(--x-size-border-width-right-input-default);
7556
+ }
7557
+ [dir="ltr"] .x-input {
7558
+ border-left-width: var(--x-size-border-width-left-input-default);
7559
+ }
7560
+ [dir="rtl"] .x-input {
7561
+ border-right-width: var(--x-size-border-width-left-input-default);
7562
+ }
7563
+ .x-input {
7564
+ box-sizing: border-box;
7565
+ margin: 0;
7566
+ min-width: 0;
7567
+ height: var(--x-size-height-input-default);
7568
+ padding-top: 0;
7569
+ padding-bottom: 0;
7570
+ background-color: var(--x-color-background-input-default);
7571
+ border-color: var(--x-color-border-input-default);
7572
+ color: var(--x-color-text-input-default);
7573
+ border-top-width: var(--x-size-border-width-top-input-default);
7574
+ border-bottom-width: var(--x-size-border-width-bottom-input-default);
7575
+ border-radius: var(--x-size-border-radius-top-left-input-default) var(--x-size-border-radius-top-right-input-default) var(--x-size-border-radius-bottom-right-input-default) var(--x-size-border-radius-bottom-left-input-default);
7576
+ border-style: solid;
7577
+ font-family: var(--x-font-family-input-default);
7578
+ font-size: var(--x-size-font-input-default);
7579
+ font-weight: var(--x-number-font-weight-input-default);
7580
+ line-height: var(--x-size-line-height-input-default);
7581
+ }
7582
+ @media not all and (min-resolution: 0.001dpcm) {
7583
+ .x-input {
7584
+ -webkit-appearance: none;
7585
+ }
7586
+ }
7587
+ .x-input:focus {
7588
+ border-color: var(--x-color-border-input-default-focus);
7589
+ }
7590
+ .x-input::placeholder {
7591
+ color: var(--x-color-text-input-placeholder-default);
7592
+ font-family: var(--x-font-family-input-placeholder-default);
7593
+ font-size: var(--x-size-font-input-placeholder-default);
7594
+ font-weight: var(--x-number-font-weight-input-placeholder-default);
7595
+ line-height: var(--x-size-line-height-input-placeholder-default);
7596
+ }
@@ -11,7 +11,6 @@
11
11
  | [extractUrlParameters(url)](./x-adapter-platform.extracturlparameters.md) | Returns the base url path and an object with the query parameters. |
12
12
  | [getFacetConfig(facet)](./x-adapter-platform.getfacetconfig.md) | Returns the facet's config. |
13
13
  | [getTaggingInfoFromUrl(taggingUrl)](./x-adapter-platform.gettagginginfofromurl.md) | Extracts the tagging info from a URL. |
14
- | [searchResponseFacetsMapper(from, { mappedValue })](./x-adapter-platform.searchresponsefacetsmapper.md) | Mapper to flatten hierarchical facet filters. |
15
14
 
16
15
  ## Interfaces
17
16
 
@@ -7,15 +7,5 @@
7
7
  <b>Signature:</b>
8
8
 
9
9
  ```typescript
10
- searchResponseMapper: import("@empathyco/x-adapter").Mapper<PlatformSearchResponse, {
11
- banners: import("@empathyco/x-types").Banner[];
12
- facets: import("@empathyco/x-types").Facet[];
13
- partialResults: import("@empathyco/x-types").PartialResult[];
14
- promoteds: import("@empathyco/x-types").Promoted[];
15
- queryTagging: import("@empathyco/x-types").TaggingRequest;
16
- redirections: import("@empathyco/x-types").Redirection[];
17
- results: import("@empathyco/x-types").Result[];
18
- spellcheck: string;
19
- totalResults: number;
20
- }>
10
+ searchResponseMapper: import("@empathyco/x-adapter").Mapper<PlatformSearchResponse, SearchResponse>
21
11
  ```
@@ -16,12 +16,12 @@ export interface FacetsMutations
16
16
 
17
17
  | Method | Description |
18
18
  | --- | --- |
19
+ | [mutateFilter(payload)](./x-components.facetsmutations.mutatefilter.md) | Updates the state of a filter. |
19
20
  | [removeFacet(facet)](./x-components.facetsmutations.removefacet.md) | Removes the facet from the [facets](./x-components.facetsstate.facets.md) record. |
20
21
  | [removeFilter(filter)](./x-components.facetsmutations.removefilter.md) | Removes the filter from the [filters](./x-components.facetsstate.filters.md) record. |
21
22
  | [removeFilters(filters)](./x-components.facetsmutations.removefilters.md) | Removes a list of filters from the [filters](./x-components.facetsstate.filters.md) record. |
22
23
  | [setFacet(facet)](./x-components.facetsmutations.setfacet.md) | Adds the facet to the [facets](./x-components.facetsstate.facets.md) record. |
23
24
  | [setFacetGroup(facetGroupEntry)](./x-components.facetsmutations.setfacetgroup.md) | Sets the group id of the facet. |
24
- | [setFilter(filter)](./x-components.facetsmutations.setfilter.md) | Adds the filter to the [filters](./x-components.facetsstate.filters.md) record. |
25
25
  | [setFilters(filters)](./x-components.facetsmutations.setfilters.md) | Adds a list of filters to the [filters](./x-components.facetsstate.filters.md) record. |
26
26
  | [setPreselectedFilters(filters)](./x-components.facetsmutations.setpreselectedfilters.md) | Adds a list of filters to the [preselectedFilters](./x-components.facetsstate.preselectedfilters.md) record. |
27
27
 
@@ -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; [FacetsMutations](./x-components.facetsmutations.md) &gt; [mutateFilter](./x-components.facetsmutations.mutatefilter.md)
4
+
5
+ ## FacetsMutations.mutateFilter() method
6
+
7
+ Updates the state of a filter.
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ mutateFilter(payload: MutateFilterPayload): void;
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Type | Description |
18
+ | --- | --- | --- |
19
+ | payload | [MutateFilterPayload](./x-components.mutatefilterpayload.md) | An object containing the filter to update, and the properties to modify. |
20
+
21
+ <b>Returns:</b>
22
+
23
+ void
24
+
@@ -0,0 +1,26 @@
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; [flatHierarchicalFilters](./x-components.flathierarchicalfilters.md)
4
+
5
+ ## flatHierarchicalFilters() function
6
+
7
+ This function flattens the Hierarchical Filters, returning an array with all filters including the children.
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ export declare function flatHierarchicalFilters(hierarchicalFilters: HierarchicalFilter[]): HierarchicalFilter[];
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Type | Description |
18
+ | --- | --- | --- |
19
+ | hierarchicalFilters | HierarchicalFilter\[\] | The list of Hierarchical Filters to flatten. |
20
+
21
+ <b>Returns:</b>
22
+
23
+ HierarchicalFilter\[\]
24
+
25
+ An array with all the Hierarchical filters.
26
+
@@ -94,6 +94,7 @@ X-Components is a library usable everywhere not only for search experiences.
94
94
  | [NextQueries](./x-components.nextqueries.md) | Simple next-queries component that renders a list of suggestions, allowing the user to select one of them, and emitting the needed events. A next query is a suggestion for a new search, related to your previous query. I.e. If people normally search for <code>shirts</code>, and then <code>trousers</code>, <code>trousers</code> would be a next query of <code>shirts</code>. |
95
95
  | [NextQueriesList](./x-components.nextquerieslist.md) | Component that inserts groups of next queries in different positions of the injected search items list, based on the provided configuration. |
96
96
  | [NextQuery](./x-components.nextquery.md) | Renders a next query item which receives the suggestion that will be rendered as a prop. It exposes a default slot to change the next query content. If the slot is not overridden, it will render the suggestion query by default. |
97
+ | [NextQueryPreview](./x-components.nextquerypreview.md) | Retrieves a preview of the results of a next query and exposes them in the default slot, along with the next query and the totalResults of the search request. By default, it renders the names of the results. |
97
98
  | [NumberRangeFilter](./x-components.numberrangefilter.md) | Renders a number range filter, emitting the needed events when clicked. |
98
99
  | [OpenMainModal](./x-components.openmainmodal.md) | Button to open the [MainModal](./x-components.mainmodal.md)<!-- -->. |
99
100
  | [PartialQueryButton](./x-components.partialquerybutton.md) | A button that when pressed emits the [XEventsTypes.UserAcceptedAQuery](./x-components.xeventstypes.useracceptedaquery.md) and [SearchXEvents.UserClickedPartialQuery](./x-components.searchxevents.userclickedpartialquery.md) events, expressing the user intention to set the partial query. |
@@ -166,6 +167,7 @@ X-Components is a library usable everywhere not only for search experiences.
166
167
  | [filterFalsyPayload(wire)](./x-components.filterfalsypayload.md) | Creates a [Wire](./x-components.wire.md) that is only executed when the payload is truthy. A truthy value is whatever is not a [falsy value](https://developer.mozilla.org/en-US/docs/Glossary/Falsy)<!-- -->. |
167
168
  | [filterTruthyPayload(wire)](./x-components.filtertruthypayload.md) | Creates a [Wire](./x-components.wire.md) that is only executed when the payload is a [falsy value](https://developer.mozilla.org/en-US/docs/Glossary/Falsy)<!-- -->. |
168
169
  | [filterWhitelistedModules(wire, whitelist)](./x-components.filterwhitelistedmodules.md) | Creates a [Wire](./x-components.wire.md) that is only executed if the event is emitted from a [XModule](./x-components.xmodule.md) that is included in the <code>whitelist</code> array passed as parameter. |
170
+ | [flatHierarchicalFilters(hierarchicalFilters)](./x-components.flathierarchicalfilters.md) | This function flattens the Hierarchical Filters, returning an array with all filters including the children. |
169
171
  | [getRootXComponent(component)](./x-components.getrootxcomponent.md) | Given a component, finds the root XComponent in the ancestors hierarchy. |
170
172
  | [getStateAndGettersFromModule(state, getters, moduleName)](./x-components.getstateandgettersfrommodule.md) | Returns an object with the getters and state of a module of store defined by the moduleName parameter. |
171
173
  | [Getter(module, getter)](./x-components.getter.md) | Generates a computed property which returns the selected getter value.<!-- -->The decorated property needs to be public for type inference to work. |
@@ -253,6 +255,7 @@ X-Components is a library usable everywhere not only for search experiences.
253
255
  | [InitWrapper](./x-components.initwrapper.md) | Interface for the returned type of the [XInstaller.init()](./x-components.xinstaller.init.md) function. |
254
256
  | [InstallXOptions](./x-components.installxoptions.md) | Interface for the parameter of the constructor of [XInstaller](./x-components.xinstaller.md) function. It is an extended version of [XPluginOptions](./x-components.xpluginoptions.md)<!-- -->. |
255
257
  | [InternalSearchRequest](./x-components.internalsearchrequest.md) | An internal search request containing the page used to calculate the start and rows properties of a [SearchRequest](./x-types.searchrequest.md)<!-- -->. |
258
+ | [MutateFilterPayload](./x-components.mutatefilterpayload.md) | Payload to use in the <code>mutateFilter</code> mutation. |
256
259
  | [NamespacedWireCommit](./x-components.namespacedwirecommit.md) | Namespaced type for the [wireCommit()](./x-components.wirecommit.md) which creates a wire with its payload associated. Possible ways for creating a wire that commits a mutation. If a payload is passed, then the observable payload can be ignored, so the wire is applicable to any event. If no payload is passed, then the wire is only applicable to events with the same payload type than the mutation. |
257
260
  | [NamespacedWireDispatch](./x-components.namespacedwiredispatch.md) | Namespaced type for the [wireDispatch()](./x-components.wiredispatch.md) which creates a wire with its payload associated. Possible ways for creating a wire that dispatches an action. If a payload is passed, then the observable payload can be ignored, so the wire is applicable to any event. If no payload is passed, then the wire is only applicable to events with the same payload type than the action. |
258
261
  | [NextQueriesActions](./x-components.nextqueriesactions.md) | Next queries module actions. |
@@ -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; [MutateFilterPayload](./x-components.mutatefilterpayload.md) &gt; [filter](./x-components.mutatefilterpayload.filter.md)
4
+
5
+ ## MutateFilterPayload.filter property
6
+
7
+ The filter to modify. If it does not belong to the store it will be added.
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ filter: Filter;
13
+ ```
@@ -0,0 +1,21 @@
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; [MutateFilterPayload](./x-components.mutatefilterpayload.md)
4
+
5
+ ## MutateFilterPayload interface
6
+
7
+ Payload to use in the `mutateFilter` mutation.
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ export interface MutateFilterPayload
13
+ ```
14
+
15
+ ## Properties
16
+
17
+ | Property | Type | Description |
18
+ | --- | --- | --- |
19
+ | [filter](./x-components.mutatefilterpayload.filter.md) | Filter | The filter to modify. If it does not belong to the store it will be added. |
20
+ | [newFilterState](./x-components.mutatefilterpayload.newfilterstate.md) | Partial&lt;Filter&gt; | The new fields values to modify in the filter. |
21
+
@@ -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; [MutateFilterPayload](./x-components.mutatefilterpayload.md) &gt; [newFilterState](./x-components.mutatefilterpayload.newfilterstate.md)
4
+
5
+ ## MutateFilterPayload.newFilterState property
6
+
7
+ The new fields values to modify in the filter.
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ newFilterState: Partial<Filter>;
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; [NextQueriesList](./x-components.nextquerieslist.md) &gt; [injectedQuery](./x-components.nextquerieslist.injectedquery.md)
4
+
5
+ ## NextQueriesList.injectedQuery property
6
+
7
+ Injected query, updated when the related request(s) have succeeded.
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ injectedQuery: string | undefined;
13
+ ```
@@ -19,6 +19,7 @@ export default class NextQueriesList extends NextQueriesList_base
19
19
  | --- | --- | --- | --- |
20
20
  | [animation?](./x-components.nextquerieslist.animation.md) | | Vue \| string | <i>(Optional)</i> Animation component that will be used to animate the next queries groups. |
21
21
  | [frequency](./x-components.nextquerieslist.frequency.md) | | number | The items cycle size to keep inserting next queries groups at. |
22
+ | [injectedQuery](./x-components.nextquerieslist.injectedquery.md) | | string \| undefined | Injected query, updated when the related request(s) have succeeded. |
22
23
  | [maxGroups](./x-components.nextquerieslist.maxgroups.md) | | number | The maximum number of groups to insert into the injected list items list. |
23
24
  | [maxNextQueriesPerGroup](./x-components.nextquerieslist.maxnextqueriespergroup.md) | | number | The maximum amount of next queries to add in a single group. |
24
25
  | [offset](./x-components.nextquerieslist.offset.md) | | number | The first index to insert a group of next queries at. |
@@ -0,0 +1,29 @@
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; [NextQueryPreview](./x-components.nextquerypreview.md)
4
+
5
+ ## NextQueryPreview class
6
+
7
+ Retrieves a preview of the results of a next query and exposes them in the default slot, along with the next query and the totalResults of the search request. By default, it renders the names of the results.
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ export default class NextQueryPreview extends Vue
13
+ ```
14
+ <b>Extends:</b> Vue
15
+
16
+ ## Properties
17
+
18
+ | Property | Modifiers | Type | Description |
19
+ | --- | --- | --- | --- |
20
+ | [previewResults](./x-components.nextquerypreview.previewresults.md) | | Dictionary&lt;PreviewResults&gt; | The results preview of the next queries mounted. It is a dictionary, indexed by the next query query. |
21
+ | [suggestion](./x-components.nextquerypreview.suggestion.md) | | NextQuery | The next query to retrieve the results preview. |
22
+ | [suggestionResults](./x-components.nextquerypreview.suggestionresults.md) | | PreviewResults | Gets from the state the results preview of the next query. |
23
+
24
+ ## Methods
25
+
26
+ | Method | Modifiers | Description |
27
+ | --- | --- | --- |
28
+ | [mounted()](./x-components.nextquerypreview.mounted.md) | | The component emits the NextQueryPreviewMounted event to retrieve the results preview of the next query. |
29
+
@@ -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; [NextQueryPreview](./x-components.nextquerypreview.md) &gt; [mounted](./x-components.nextquerypreview.mounted.md)
4
+
5
+ ## NextQueryPreview.mounted() method
6
+
7
+ The component emits the NextQueryPreviewMounted event to retrieve the results preview of the next query.
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ mounted(): void;
13
+ ```
14
+ <b>Returns:</b>
15
+
16
+ void
17
+
@@ -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; [NextQueryPreview](./x-components.nextquerypreview.md) &gt; [previewResults](./x-components.nextquerypreview.previewresults.md)
4
+
5
+ ## NextQueryPreview.previewResults property
6
+
7
+ The results preview of the next queries mounted. It is a dictionary, indexed by the next query query.
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ previewResults: Dictionary<PreviewResults>;
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; [NextQueryPreview](./x-components.nextquerypreview.md) &gt; [suggestion](./x-components.nextquerypreview.suggestion.md)
4
+
5
+ ## NextQueryPreview.suggestion property
6
+
7
+ The next query to retrieve the results preview.
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ protected suggestion: NextQuery;
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; [NextQueryPreview](./x-components.nextquerypreview.md) &gt; [suggestionResults](./x-components.nextquerypreview.suggestionresults.md)
4
+
5
+ ## NextQueryPreview.suggestionResults property
6
+
7
+ Gets from the state the results preview of the next query.
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ get suggestionResults(): PreviewResults;
13
+ ```
@@ -25,4 +25,13 @@ export default class ResultsList extends Vue implements InfiniteScroll
25
25
  | --- | --- | --- | --- |
26
26
  | [animation](./x-components.resultslist.animation.md) | | Vue \| string | Animation component that will be used to animate the results. |
27
27
  | [items](./x-components.resultslist.items.md) | | Result\[\] | The results to render from the state. |
28
+ | [providedQuery](./x-components.resultslist.providedquery.md) | | string | It provides the search query. This query is updated only when the search request has succeeded. |
29
+ | [searchQuery](./x-components.resultslist.searchquery.md) | | string | The query of the search request, taken from the state. |
30
+ | [searchStatus](./x-components.resultslist.searchstatus.md) | | [RequestStatus](./x-components.requeststatus.md) | The status of the search request, taken from the state. |
31
+
32
+ ## Methods
33
+
34
+ | Method | Modifiers | Description |
35
+ | --- | --- | --- |
36
+ | [updateQuery(status)](./x-components.resultslist.updatequery.md) | | Updates the query to be provided to the child components when the search request has succeeded. |
28
37
 
@@ -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; [ResultsList](./x-components.resultslist.md) &gt; [providedQuery](./x-components.resultslist.providedquery.md)
4
+
5
+ ## ResultsList.providedQuery property
6
+
7
+ It provides the search query. This query is updated only when the search request has succeeded.
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ providedQuery: string;
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; [ResultsList](./x-components.resultslist.md) &gt; [searchQuery](./x-components.resultslist.searchquery.md)
4
+
5
+ ## ResultsList.searchQuery property
6
+
7
+ The query of the search request, taken from the state.
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ searchQuery: string;
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; [ResultsList](./x-components.resultslist.md) &gt; [searchStatus](./x-components.resultslist.searchstatus.md)
4
+
5
+ ## ResultsList.searchStatus property
6
+
7
+ The status of the search request, taken from the state.
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ searchStatus: RequestStatus;
13
+ ```
@@ -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; [ResultsList](./x-components.resultslist.md) &gt; [updateQuery](./x-components.resultslist.updatequery.md)
4
+
5
+ ## ResultsList.updateQuery() method
6
+
7
+ Updates the query to be provided to the child components when the search request has succeeded.
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ updateQuery(status: RequestStatus): void;
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Type | Description |
18
+ | --- | --- | --- |
19
+ | status | [RequestStatus](./x-components.requeststatus.md) | The status of the search request. |
20
+
21
+ <b>Returns:</b>
22
+
23
+ void
24
+
@@ -4,10 +4,10 @@
4
4
 
5
5
  ## HierarchicalFilter.children property
6
6
 
7
- Descendants filters id.
7
+ Descendants filters.
8
8
 
9
9
  <b>Signature:</b>
10
10
 
11
11
  ```typescript
12
- children?: Filter['id'][];
12
+ children?: HierarchicalFilter[];
13
13
  ```
@@ -17,7 +17,7 @@ export interface HierarchicalFilter extends BooleanFilter
17
17
 
18
18
  | Property | Type | Description |
19
19
  | --- | --- | --- |
20
- | [children?](./x-types.hierarchicalfilter.children.md) | [Filter](./x-types.filter.md)<!-- -->\['id'\]\[\] | <i>(Optional)</i> Descendants filters id. |
20
+ | [children?](./x-types.hierarchicalfilter.children.md) | [HierarchicalFilter](./x-types.hierarchicalfilter.md)<!-- -->\[\] | <i>(Optional)</i> Descendants filters. |
21
21
  | [modelName](./x-types.hierarchicalfilter.modelname.md) | 'HierarchicalFilter' | Model name to indicate the filter type. |
22
- | [parentId](./x-types.hierarchicalfilter.parentid.md) | [Filter](./x-types.filter.md)<!-- -->\['id'\] \| null | An unique id used to reference the parent filter or null if it hasn't. |
22
+ | [parentId](./x-types.hierarchicalfilter.parentid.md) | [Filter](./x-types.filter.md)<!-- -->\['id'\] \| null | A unique id used to reference the parent filter or null if it hasn't. |
23
23
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## HierarchicalFilter.parentId property
6
6
 
7
- An unique id used to reference the parent filter or null if it hasn't.
7
+ A unique id used to reference the parent filter or null if it hasn't.
8
8
 
9
9
  <b>Signature:</b>
10
10