@empathyco/x-components 3.0.0-alpha.144 → 3.0.0-alpha.147
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.
- package/CHANGELOG.md +45 -0
- package/design-system/default-theme.css +28 -28
- package/design-system/full-theme.css +53 -54
- package/docs/API-reference/api/x-adapter-platform.md +0 -1
- package/docs/API-reference/api/x-adapter-platform.searchresponsemapper.md +1 -11
- package/docs/API-reference/api/x-components.facetsmutations.md +1 -1
- package/docs/API-reference/api/x-components.facetsmutations.mutatefilter.md +24 -0
- package/docs/API-reference/api/x-components.flathierarchicalfilters.md +26 -0
- package/docs/API-reference/api/x-components.md +2 -0
- package/docs/API-reference/api/x-components.mutatefilterpayload.filter.md +13 -0
- package/docs/API-reference/api/x-components.mutatefilterpayload.md +21 -0
- package/docs/API-reference/api/x-components.mutatefilterpayload.newfilterstate.md +13 -0
- package/docs/API-reference/api/x-types.hierarchicalfilter.children.md +2 -2
- package/docs/API-reference/api/x-types.hierarchicalfilter.md +2 -2
- package/docs/API-reference/api/x-types.hierarchicalfilter.parentid.md +1 -1
- package/docs/build-search-ui/web-archetype-development-guide.md +10 -7
- package/docs/build-search-ui/web-archetype-integration-guide.md +15 -14
- package/docs/build-search-ui/web-x-components-development-guide.md +5 -4
- package/docs/experience-search-&-discovery/README.md +119 -0
- package/docs/experience-search-&-discovery/empathize.md +102 -0
- package/docs/experience-search-&-discovery/facets-and-filters.md +138 -0
- package/docs/experience-search-&-discovery/history-queries.md +56 -0
- package/docs/experience-search-&-discovery/id-results.md +40 -0
- package/docs/experience-search-&-discovery/next-queries.md +52 -0
- package/docs/experience-search-&-discovery/popular-searches.md +32 -0
- package/docs/experience-search-&-discovery/product-results-ui.md +68 -0
- package/docs/experience-search-&-discovery/query-suggestions.md +32 -0
- package/docs/experience-search-&-discovery/recommendations.md +32 -0
- package/docs/experience-search-&-discovery/related-tags.md +41 -0
- package/docs/experience-search-&-discovery/search-box.md +81 -0
- package/docs/experience-search-&-discovery/serp-ui.md +109 -0
- package/docs/experience-search-&-discovery/web-local-storage.md +25 -0
- package/facets/index.js +1 -1
- package/js/index.js +1 -1
- package/js/x-modules/facets/components/facets/facets-provider.vue.js +2 -2
- package/js/x-modules/facets/components/facets/facets-provider.vue.js.map +1 -1
- package/js/x-modules/facets/components/facets/facets-provider.vue_rollup-plugin-vue_script.vue.js +7 -2
- package/js/x-modules/facets/components/facets/facets-provider.vue_rollup-plugin-vue_script.vue.js.map +1 -1
- package/js/x-modules/facets/components/filters/hierarchical-filter.vue.js.map +1 -1
- package/js/x-modules/facets/components/filters/hierarchical-filter.vue_rollup-plugin-vue_script.vue.js +2 -130
- package/js/x-modules/facets/components/filters/hierarchical-filter.vue_rollup-plugin-vue_script.vue.js.map +1 -1
- package/js/x-modules/facets/entities/editable-number-range-filter.entity.js +11 -10
- package/js/x-modules/facets/entities/editable-number-range-filter.entity.js.map +1 -1
- package/js/x-modules/facets/entities/hierarchical-filter.entity.js +9 -11
- package/js/x-modules/facets/entities/hierarchical-filter.entity.js.map +1 -1
- package/js/x-modules/facets/entities/number-range-filter.entity.js +2 -2
- package/js/x-modules/facets/entities/number-range-filter.entity.js.map +1 -1
- package/js/x-modules/facets/entities/raw-filter.entity.js +1 -1
- package/js/x-modules/facets/entities/raw-filter.entity.js.map +1 -1
- package/js/x-modules/facets/entities/simple-filter.entity.js +2 -2
- package/js/x-modules/facets/entities/simple-filter.entity.js.map +1 -1
- package/js/x-modules/facets/entities/single-select.modifier.js +1 -1
- package/js/x-modules/facets/entities/single-select.modifier.js.map +1 -1
- package/js/x-modules/facets/service/facets.service.js +18 -2
- package/js/x-modules/facets/service/facets.service.js.map +1 -1
- package/js/x-modules/facets/store/module.js +4 -3
- package/js/x-modules/facets/store/module.js.map +1 -1
- package/js/x-modules/facets/utils.js +16 -1
- package/js/x-modules/facets/utils.js.map +1 -1
- package/js/x-modules/search-box/components/search-input.vue.js +54 -45
- package/js/x-modules/search-box/components/search-input.vue.js.map +1 -1
- package/js/x-modules/search-box/components/search-input.vue_rollup-plugin-vue_script.vue.js.map +1 -1
- package/package.json +4 -4
- package/report/x-adapter-platform.api.json +5 -133
- package/report/x-components.api.json +181 -45
- package/report/x-components.api.md +14 -5
- package/report/x-types.api.json +5 -5
- package/types/x-modules/facets/components/facets/facets-provider.vue.d.ts.map +1 -1
- package/types/x-modules/facets/components/filters/hierarchical-filter.vue.d.ts +0 -6
- package/types/x-modules/facets/components/filters/hierarchical-filter.vue.d.ts.map +1 -1
- package/types/x-modules/facets/entities/editable-number-range-filter.entity.d.ts +1 -1
- package/types/x-modules/facets/entities/editable-number-range-filter.entity.d.ts.map +1 -1
- package/types/x-modules/facets/entities/hierarchical-filter.entity.d.ts +2 -1
- package/types/x-modules/facets/entities/hierarchical-filter.entity.d.ts.map +1 -1
- package/types/x-modules/facets/entities/single-select.modifier.d.ts.map +1 -1
- package/types/x-modules/facets/service/facets.service.d.ts +13 -0
- package/types/x-modules/facets/service/facets.service.d.ts.map +1 -1
- package/types/x-modules/facets/store/module.d.ts.map +1 -1
- package/types/x-modules/facets/store/types.d.ts +22 -6
- package/types/x-modules/facets/store/types.d.ts.map +1 -1
- package/types/x-modules/facets/utils.d.ts +11 -0
- package/types/x-modules/facets/utils.d.ts.map +1 -1
- package/types/x-modules/search-box/components/search-input.vue.d.ts.map +1 -1
- package/docs/API-reference/api/x-adapter-platform.searchresponsefacetsmapper.md +0 -27
- package/docs/API-reference/api/x-components.facetsmutations.setfilter.md +0 -24
- package/docs/functional-doc/web-local-storage.md +0 -22
|
@@ -13794,6 +13794,51 @@
|
|
|
13794
13794
|
"releaseTag": "Public",
|
|
13795
13795
|
"name": "FacetsMutations",
|
|
13796
13796
|
"members": [
|
|
13797
|
+
{
|
|
13798
|
+
"kind": "MethodSignature",
|
|
13799
|
+
"canonicalReference": "@empathyco/x-components!FacetsMutations#mutateFilter:member(1)",
|
|
13800
|
+
"docComment": "/**\n * Updates the state of a filter.\n *\n * @param payload - An object containing the filter to update, and the properties to modify.\n */\n",
|
|
13801
|
+
"excerptTokens": [
|
|
13802
|
+
{
|
|
13803
|
+
"kind": "Content",
|
|
13804
|
+
"text": "mutateFilter(payload: "
|
|
13805
|
+
},
|
|
13806
|
+
{
|
|
13807
|
+
"kind": "Reference",
|
|
13808
|
+
"text": "MutateFilterPayload",
|
|
13809
|
+
"canonicalReference": "@empathyco/x-components!MutateFilterPayload:interface"
|
|
13810
|
+
},
|
|
13811
|
+
{
|
|
13812
|
+
"kind": "Content",
|
|
13813
|
+
"text": "): "
|
|
13814
|
+
},
|
|
13815
|
+
{
|
|
13816
|
+
"kind": "Content",
|
|
13817
|
+
"text": "void"
|
|
13818
|
+
},
|
|
13819
|
+
{
|
|
13820
|
+
"kind": "Content",
|
|
13821
|
+
"text": ";"
|
|
13822
|
+
}
|
|
13823
|
+
],
|
|
13824
|
+
"isOptional": false,
|
|
13825
|
+
"returnTypeTokenRange": {
|
|
13826
|
+
"startIndex": 3,
|
|
13827
|
+
"endIndex": 4
|
|
13828
|
+
},
|
|
13829
|
+
"releaseTag": "Public",
|
|
13830
|
+
"overloadIndex": 1,
|
|
13831
|
+
"parameters": [
|
|
13832
|
+
{
|
|
13833
|
+
"parameterName": "payload",
|
|
13834
|
+
"parameterTypeTokenRange": {
|
|
13835
|
+
"startIndex": 1,
|
|
13836
|
+
"endIndex": 2
|
|
13837
|
+
}
|
|
13838
|
+
}
|
|
13839
|
+
],
|
|
13840
|
+
"name": "mutateFilter"
|
|
13841
|
+
},
|
|
13797
13842
|
{
|
|
13798
13843
|
"kind": "MethodSignature",
|
|
13799
13844
|
"canonicalReference": "@empathyco/x-components!FacetsMutations#removeFacet:member(1)",
|
|
@@ -14023,51 +14068,6 @@
|
|
|
14023
14068
|
],
|
|
14024
14069
|
"name": "setFacetGroup"
|
|
14025
14070
|
},
|
|
14026
|
-
{
|
|
14027
|
-
"kind": "MethodSignature",
|
|
14028
|
-
"canonicalReference": "@empathyco/x-components!FacetsMutations#setFilter:member(1)",
|
|
14029
|
-
"docComment": "/**\n * Adds the filter to the {@link FacetsState.filters | filters} record.\n *\n * @param filter - The filter to add.\n */\n",
|
|
14030
|
-
"excerptTokens": [
|
|
14031
|
-
{
|
|
14032
|
-
"kind": "Content",
|
|
14033
|
-
"text": "setFilter(filter: "
|
|
14034
|
-
},
|
|
14035
|
-
{
|
|
14036
|
-
"kind": "Reference",
|
|
14037
|
-
"text": "Filter",
|
|
14038
|
-
"canonicalReference": "@empathyco/x-components!Filter:interface"
|
|
14039
|
-
},
|
|
14040
|
-
{
|
|
14041
|
-
"kind": "Content",
|
|
14042
|
-
"text": "): "
|
|
14043
|
-
},
|
|
14044
|
-
{
|
|
14045
|
-
"kind": "Content",
|
|
14046
|
-
"text": "void"
|
|
14047
|
-
},
|
|
14048
|
-
{
|
|
14049
|
-
"kind": "Content",
|
|
14050
|
-
"text": ";"
|
|
14051
|
-
}
|
|
14052
|
-
],
|
|
14053
|
-
"isOptional": false,
|
|
14054
|
-
"returnTypeTokenRange": {
|
|
14055
|
-
"startIndex": 3,
|
|
14056
|
-
"endIndex": 4
|
|
14057
|
-
},
|
|
14058
|
-
"releaseTag": "Public",
|
|
14059
|
-
"overloadIndex": 1,
|
|
14060
|
-
"parameters": [
|
|
14061
|
-
{
|
|
14062
|
-
"parameterName": "filter",
|
|
14063
|
-
"parameterTypeTokenRange": {
|
|
14064
|
-
"startIndex": 1,
|
|
14065
|
-
"endIndex": 2
|
|
14066
|
-
}
|
|
14067
|
-
}
|
|
14068
|
-
],
|
|
14069
|
-
"name": "setFilter"
|
|
14070
|
-
},
|
|
14071
14071
|
{
|
|
14072
14072
|
"kind": "MethodSignature",
|
|
14073
14073
|
"canonicalReference": "@empathyco/x-components!FacetsMutations#setFilters:member(1)",
|
|
@@ -17771,6 +17771,59 @@
|
|
|
17771
17771
|
},
|
|
17772
17772
|
"implementsTokenRanges": []
|
|
17773
17773
|
},
|
|
17774
|
+
{
|
|
17775
|
+
"kind": "Function",
|
|
17776
|
+
"canonicalReference": "@empathyco/x-components!flatHierarchicalFilters:function(1)",
|
|
17777
|
+
"docComment": "/**\n * This function flattens the Hierarchical Filters, returning an array with all filters including the children.\n *\n * @param hierarchicalFilters - The list of Hierarchical Filters to flatten.\n *\n * @returns An array with all the Hierarchical filters.\n *\n * @public\n */\n",
|
|
17778
|
+
"excerptTokens": [
|
|
17779
|
+
{
|
|
17780
|
+
"kind": "Content",
|
|
17781
|
+
"text": "export declare function flatHierarchicalFilters(hierarchicalFilters: "
|
|
17782
|
+
},
|
|
17783
|
+
{
|
|
17784
|
+
"kind": "Reference",
|
|
17785
|
+
"text": "HierarchicalFilter",
|
|
17786
|
+
"canonicalReference": "@empathyco/x-components!HierarchicalFilter:interface"
|
|
17787
|
+
},
|
|
17788
|
+
{
|
|
17789
|
+
"kind": "Content",
|
|
17790
|
+
"text": "[]"
|
|
17791
|
+
},
|
|
17792
|
+
{
|
|
17793
|
+
"kind": "Content",
|
|
17794
|
+
"text": "): "
|
|
17795
|
+
},
|
|
17796
|
+
{
|
|
17797
|
+
"kind": "Reference",
|
|
17798
|
+
"text": "HierarchicalFilter",
|
|
17799
|
+
"canonicalReference": "@empathyco/x-components!HierarchicalFilter:interface"
|
|
17800
|
+
},
|
|
17801
|
+
{
|
|
17802
|
+
"kind": "Content",
|
|
17803
|
+
"text": "[]"
|
|
17804
|
+
},
|
|
17805
|
+
{
|
|
17806
|
+
"kind": "Content",
|
|
17807
|
+
"text": ";"
|
|
17808
|
+
}
|
|
17809
|
+
],
|
|
17810
|
+
"returnTypeTokenRange": {
|
|
17811
|
+
"startIndex": 4,
|
|
17812
|
+
"endIndex": 6
|
|
17813
|
+
},
|
|
17814
|
+
"releaseTag": "Public",
|
|
17815
|
+
"overloadIndex": 1,
|
|
17816
|
+
"parameters": [
|
|
17817
|
+
{
|
|
17818
|
+
"parameterName": "hierarchicalFilters",
|
|
17819
|
+
"parameterTypeTokenRange": {
|
|
17820
|
+
"startIndex": 1,
|
|
17821
|
+
"endIndex": 3
|
|
17822
|
+
}
|
|
17823
|
+
}
|
|
17824
|
+
],
|
|
17825
|
+
"name": "flatHierarchicalFilters"
|
|
17826
|
+
},
|
|
17774
17827
|
{
|
|
17775
17828
|
"kind": "Function",
|
|
17776
17829
|
"canonicalReference": "@empathyco/x-components!getRootXComponent:function(1)",
|
|
@@ -24076,6 +24129,89 @@
|
|
|
24076
24129
|
},
|
|
24077
24130
|
"implementsTokenRanges": []
|
|
24078
24131
|
},
|
|
24132
|
+
{
|
|
24133
|
+
"kind": "Interface",
|
|
24134
|
+
"canonicalReference": "@empathyco/x-components!MutateFilterPayload:interface",
|
|
24135
|
+
"docComment": "/**\n * Payload to use in the `mutateFilter` mutation.\n *\n * @public\n */\n",
|
|
24136
|
+
"excerptTokens": [
|
|
24137
|
+
{
|
|
24138
|
+
"kind": "Content",
|
|
24139
|
+
"text": "export interface MutateFilterPayload "
|
|
24140
|
+
}
|
|
24141
|
+
],
|
|
24142
|
+
"releaseTag": "Public",
|
|
24143
|
+
"name": "MutateFilterPayload",
|
|
24144
|
+
"members": [
|
|
24145
|
+
{
|
|
24146
|
+
"kind": "PropertySignature",
|
|
24147
|
+
"canonicalReference": "@empathyco/x-components!MutateFilterPayload#filter:member",
|
|
24148
|
+
"docComment": "/**\n * The filter to modify. If it does not belong to the store it will be added.\n */\n",
|
|
24149
|
+
"excerptTokens": [
|
|
24150
|
+
{
|
|
24151
|
+
"kind": "Content",
|
|
24152
|
+
"text": "filter: "
|
|
24153
|
+
},
|
|
24154
|
+
{
|
|
24155
|
+
"kind": "Reference",
|
|
24156
|
+
"text": "Filter",
|
|
24157
|
+
"canonicalReference": "@empathyco/x-components!Filter:interface"
|
|
24158
|
+
},
|
|
24159
|
+
{
|
|
24160
|
+
"kind": "Content",
|
|
24161
|
+
"text": ";"
|
|
24162
|
+
}
|
|
24163
|
+
],
|
|
24164
|
+
"isOptional": false,
|
|
24165
|
+
"releaseTag": "Public",
|
|
24166
|
+
"name": "filter",
|
|
24167
|
+
"propertyTypeTokenRange": {
|
|
24168
|
+
"startIndex": 1,
|
|
24169
|
+
"endIndex": 2
|
|
24170
|
+
}
|
|
24171
|
+
},
|
|
24172
|
+
{
|
|
24173
|
+
"kind": "PropertySignature",
|
|
24174
|
+
"canonicalReference": "@empathyco/x-components!MutateFilterPayload#newFilterState:member",
|
|
24175
|
+
"docComment": "/**\n * The new fields values to modify in the filter.\n */\n",
|
|
24176
|
+
"excerptTokens": [
|
|
24177
|
+
{
|
|
24178
|
+
"kind": "Content",
|
|
24179
|
+
"text": "newFilterState: "
|
|
24180
|
+
},
|
|
24181
|
+
{
|
|
24182
|
+
"kind": "Reference",
|
|
24183
|
+
"text": "Partial",
|
|
24184
|
+
"canonicalReference": "!Partial:type"
|
|
24185
|
+
},
|
|
24186
|
+
{
|
|
24187
|
+
"kind": "Content",
|
|
24188
|
+
"text": "<"
|
|
24189
|
+
},
|
|
24190
|
+
{
|
|
24191
|
+
"kind": "Reference",
|
|
24192
|
+
"text": "Filter",
|
|
24193
|
+
"canonicalReference": "@empathyco/x-components!Filter:interface"
|
|
24194
|
+
},
|
|
24195
|
+
{
|
|
24196
|
+
"kind": "Content",
|
|
24197
|
+
"text": ">"
|
|
24198
|
+
},
|
|
24199
|
+
{
|
|
24200
|
+
"kind": "Content",
|
|
24201
|
+
"text": ";"
|
|
24202
|
+
}
|
|
24203
|
+
],
|
|
24204
|
+
"isOptional": false,
|
|
24205
|
+
"releaseTag": "Public",
|
|
24206
|
+
"name": "newFilterState",
|
|
24207
|
+
"propertyTypeTokenRange": {
|
|
24208
|
+
"startIndex": 1,
|
|
24209
|
+
"endIndex": 5
|
|
24210
|
+
}
|
|
24211
|
+
}
|
|
24212
|
+
],
|
|
24213
|
+
"extendsTokenRanges": []
|
|
24214
|
+
},
|
|
24079
24215
|
{
|
|
24080
24216
|
"kind": "TypeAlias",
|
|
24081
24217
|
"canonicalReference": "@empathyco/x-components!MutationNamesFor:type",
|
|
@@ -943,6 +943,8 @@ export class DefaultFacetsService implements FacetsService {
|
|
|
943
943
|
// (undocumented)
|
|
944
944
|
protected filterEntityFactory: FilterEntityFactory;
|
|
945
945
|
// @internal
|
|
946
|
+
protected flatFilters(facetsGroup: FacetsGroup): Filter[];
|
|
947
|
+
// @internal
|
|
946
948
|
protected getFilterEntity(filter: Filter): FilterEntity;
|
|
947
949
|
// @internal
|
|
948
950
|
protected getSelectedFilters(): FacetsGetters['selectedFilters'];
|
|
@@ -1134,7 +1136,7 @@ export class EditableNumberRangeFilterEntity implements FilterEntity {
|
|
|
1134
1136
|
static accepts(filter: Filter): boolean;
|
|
1135
1137
|
deselect(filter: EditableNumberRangeFilter_2): void;
|
|
1136
1138
|
protected getFilterByFacet(facetId: Facet['id']): EditableNumberRangeFilter_2 | undefined;
|
|
1137
|
-
protected getNewFilterId(filter: EditableNumberRangeFilter_2): string;
|
|
1139
|
+
protected getNewFilterId(filter: Pick<EditableNumberRangeFilter_2, 'range' | 'facetId'>): string;
|
|
1138
1140
|
protected isSelected(filter: EditableNumberRangeFilter_2): boolean;
|
|
1139
1141
|
protected removePreviousFilter(facetId: Facet['id']): void;
|
|
1140
1142
|
select(filter: EditableNumberRangeFilter_2): void;
|
|
@@ -1404,12 +1406,12 @@ export class FacetsMixin extends Vue_2 {
|
|
|
1404
1406
|
|
|
1405
1407
|
// @public
|
|
1406
1408
|
export interface FacetsMutations {
|
|
1409
|
+
mutateFilter(payload: MutateFilterPayload): void;
|
|
1407
1410
|
removeFacet(facet: Facet): void;
|
|
1408
1411
|
removeFilter(filter: Filter): void;
|
|
1409
1412
|
removeFilters(filters: Filter[]): void;
|
|
1410
1413
|
setFacet(facet: Facet): void;
|
|
1411
1414
|
setFacetGroup(facetGroupEntry: FacetGroupEntry): void;
|
|
1412
|
-
setFilter(filter: Filter): void;
|
|
1413
1415
|
setFilters(filters: Filter[]): void;
|
|
1414
1416
|
setPreselectedFilters(filters: RawFilter[]): void;
|
|
1415
1417
|
}
|
|
@@ -1741,6 +1743,9 @@ export class FixedHeaderAndAsidesLayout extends FixedHeaderAndAsidesLayout_base
|
|
|
1741
1743
|
protected setPosition(position: number): void;
|
|
1742
1744
|
}
|
|
1743
1745
|
|
|
1746
|
+
// @public
|
|
1747
|
+
export function flatHierarchicalFilters(hierarchicalFilters: HierarchicalFilter_2[]): HierarchicalFilter_2[];
|
|
1748
|
+
|
|
1744
1749
|
// @internal
|
|
1745
1750
|
export function getBusAPI(bus: XBus, component: PrivateExtendedVueComponent): XComponentBusAPI;
|
|
1746
1751
|
|
|
@@ -1810,8 +1815,6 @@ export class HierarchicalFilter extends Vue_2 {
|
|
|
1810
1815
|
protected get cssClasses(): VueCSSClasses;
|
|
1811
1816
|
filter: HierarchicalFilter_2;
|
|
1812
1817
|
// @internal
|
|
1813
|
-
filters: Record<Filter['id'], Filter>;
|
|
1814
|
-
// @internal
|
|
1815
1818
|
protected getChildFilterClickEvents(childFilter: HierarchicalFilter_2): Partial<XEventsTypes>;
|
|
1816
1819
|
// (undocumented)
|
|
1817
1820
|
protected isFilterPartiallySelected(filter: HierarchicalFilter_2): boolean;
|
|
@@ -1831,7 +1834,7 @@ export class HierarchicalFilterEntity implements FilterEntity {
|
|
|
1831
1834
|
deselect(filter: HierarchicalFilter_2): void;
|
|
1832
1835
|
protected deselectDescendants(filter: HierarchicalFilter_2): void;
|
|
1833
1836
|
protected getFilterById(id: HierarchicalFilter_2['id']): HierarchicalFilter_2;
|
|
1834
|
-
protected saveFilter(filter: HierarchicalFilter_2): void;
|
|
1837
|
+
protected saveFilter(filter: HierarchicalFilter_2, newFilterState?: Partial<HierarchicalFilter_2>): void;
|
|
1835
1838
|
select(filter: HierarchicalFilter_2): void;
|
|
1836
1839
|
protected selectAncestors(filter: HierarchicalFilter_2): void;
|
|
1837
1840
|
// (undocumented)
|
|
@@ -2352,6 +2355,12 @@ export class MultiColumnMaxWidthLayout extends MultiColumnMaxWidthLayout_base {
|
|
|
2352
2355
|
protected asideAnimation: Vue_2;
|
|
2353
2356
|
}
|
|
2354
2357
|
|
|
2358
|
+
// @public
|
|
2359
|
+
export interface MutateFilterPayload {
|
|
2360
|
+
filter: Filter;
|
|
2361
|
+
newFilterState: Partial<Filter>;
|
|
2362
|
+
}
|
|
2363
|
+
|
|
2355
2364
|
// @public
|
|
2356
2365
|
export type MutationNamesFor<ModuleName extends XModuleName> = keyof ExtractMutations<XModulesTree[ModuleName]>;
|
|
2357
2366
|
|
package/report/x-types.api.json
CHANGED
|
@@ -1378,7 +1378,7 @@
|
|
|
1378
1378
|
{
|
|
1379
1379
|
"kind": "PropertySignature",
|
|
1380
1380
|
"canonicalReference": "@empathyco/x-types!HierarchicalFilter#children:member",
|
|
1381
|
-
"docComment": "/**\n * Descendants filters
|
|
1381
|
+
"docComment": "/**\n * Descendants filters.\n */\n",
|
|
1382
1382
|
"excerptTokens": [
|
|
1383
1383
|
{
|
|
1384
1384
|
"kind": "Content",
|
|
@@ -1386,12 +1386,12 @@
|
|
|
1386
1386
|
},
|
|
1387
1387
|
{
|
|
1388
1388
|
"kind": "Reference",
|
|
1389
|
-
"text": "
|
|
1390
|
-
"canonicalReference": "@empathyco/x-types!
|
|
1389
|
+
"text": "HierarchicalFilter",
|
|
1390
|
+
"canonicalReference": "@empathyco/x-types!HierarchicalFilter:interface"
|
|
1391
1391
|
},
|
|
1392
1392
|
{
|
|
1393
1393
|
"kind": "Content",
|
|
1394
|
-
"text": "[
|
|
1394
|
+
"text": "[]"
|
|
1395
1395
|
},
|
|
1396
1396
|
{
|
|
1397
1397
|
"kind": "Content",
|
|
@@ -1435,7 +1435,7 @@
|
|
|
1435
1435
|
{
|
|
1436
1436
|
"kind": "PropertySignature",
|
|
1437
1437
|
"canonicalReference": "@empathyco/x-types!HierarchicalFilter#parentId:member",
|
|
1438
|
-
"docComment": "/**\n *
|
|
1438
|
+
"docComment": "/**\n * A unique id used to reference the parent filter or null if it hasn't.\n */\n",
|
|
1439
1439
|
"excerptTokens": [
|
|
1440
1440
|
{
|
|
1441
1441
|
"kind": "Content",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"facets-provider.vue?rollup-plugin-vue=script.d.ts","sourceRoot":"","sources":["../../../../../../src/x-modules/facets/components/facets/facets-provider.vue?rollup-plugin-vue=script.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"facets-provider.vue?rollup-plugin-vue=script.d.ts","sourceRoot":"","sources":["../../../../../../src/x-modules/facets/components/facets/facets-provider.vue?rollup-plugin-vue=script.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAuB,MAAM,oBAAoB,CAAC;AACxE,OAAO,GAAG,MAAM,KAAK,CAAC;AAMtB,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAI5C;;;;;;;GAOG;AAIH,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,GAAG;IAC7C;;;;;OAKG;IAEI,OAAO,EAAG,OAAO,CAAC;IAEzB;;;;;OAKG;IAEI,MAAM,EAAG,KAAK,EAAE,CAAC;IAExB;;;;;OAKG;IACH,SAAS,CAAC,eAAe,EAAE,MAAM,EAAE,GAAG,IAAI,CAAQ;IAElD;;;;;;OAMG;IACH,SAAS,KAAK,WAAW,IAAI,WAAW,CAEvC;IAED;;;;;;OAMG;IAEH,0BAA0B,CAAC,eAAe,EAAE,MAAM,EAAE,GAAG,IAAI;IAU3D;;;;OAIG;IAEH,aAAa,IAAI,IAAI;IAQrB;;;;;;OAMG;IACH,SAAS,CAAC,sBAAsB,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI;IASvD,MAAM,IAAI,IAAI;CACf"}
|
|
@@ -12,12 +12,6 @@ export default class HierarchicalFilter extends Vue {
|
|
|
12
12
|
filter: HierarchicalFilterModel;
|
|
13
13
|
/** The animation component to use for the children filters. */
|
|
14
14
|
childrenAnimation?: Vue | string;
|
|
15
|
-
/**
|
|
16
|
-
* The state filters.
|
|
17
|
-
*
|
|
18
|
-
* @internal
|
|
19
|
-
*/
|
|
20
|
-
filters: Record<Filter['id'], Filter>;
|
|
21
15
|
/**
|
|
22
16
|
* Additional events, with their payload, to emit when the filter is clicked.
|
|
23
17
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hierarchical-filter.vue?rollup-plugin-vue=script.d.ts","sourceRoot":"","sources":["../../../../../../src/x-modules/facets/components/filters/hierarchical-filter.vue?rollup-plugin-vue=script.ts"],"names":[],"mappings":"AA0DA,OAAO,EACL,MAAM,EACN,kBAAkB,IAAI,uBAAuB,EAE9C,MAAM,oBAAoB,CAAC;AAE5B,OAAO,GAAG,MAAM,KAAK,CAAC;AAGtB,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAK/D;;;;GAIG;AAMH,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,GAAG;IACjD,iCAAiC;IAE1B,MAAM,EAAG,uBAAuB,CAAC;IAExC,+DAA+D;IAExD,iBAAiB,CAAC,EAAE,GAAG,GAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"hierarchical-filter.vue?rollup-plugin-vue=script.d.ts","sourceRoot":"","sources":["../../../../../../src/x-modules/facets/components/filters/hierarchical-filter.vue?rollup-plugin-vue=script.ts"],"names":[],"mappings":"AA0DA,OAAO,EACL,MAAM,EACN,kBAAkB,IAAI,uBAAuB,EAE9C,MAAM,oBAAoB,CAAC;AAE5B,OAAO,GAAG,MAAM,KAAK,CAAC;AAGtB,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAK/D;;;;GAIG;AAMH,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,GAAG;IACjD,iCAAiC;IAE1B,MAAM,EAAG,uBAAuB,CAAC;IAExC,+DAA+D;IAExD,iBAAiB,CAAC,EAAE,GAAG,GAAG,MAAM,CAAC;IAExC;;;;OAIG;IAEI,WAAW,EAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAE3C;;;;;OAKG;IACH,SAAS,KAAK,YAAY,IAAI,OAAO,CAAC,YAAY,CAAC,CAKlD;IAED;;;;;OAKG;IACH,SAAS,KAAK,UAAU,IAAI,aAAa,CAMxC;IAED;;;;;;;OAOG;IACH,SAAS,CAAC,yBAAyB,CACjC,WAAW,EAAE,uBAAuB,GACnC,OAAO,CAAC,YAAY,CAAC;IAcxB;;;;;;OAMG;IACH,SAAS,KAAK,mBAAmB,IAAI,OAAO,CAE3C;IAED;;;;;;OAMG;IACH,SAAS,KAAK,uBAAuB,IAAI,MAAM,EAAE,CAEhD;IAED,SAAS,CAAC,yBAAyB,CAAC,MAAM,EAAE,uBAAuB,GAAG,OAAO;CAU9E"}
|
|
@@ -36,7 +36,7 @@ export declare class EditableNumberRangeFilterEntity implements FilterEntity {
|
|
|
36
36
|
* @returns The new filter id.
|
|
37
37
|
* @internal
|
|
38
38
|
*/
|
|
39
|
-
protected getNewFilterId(filter: EditableNumberRangeFilter): string;
|
|
39
|
+
protected getNewFilterId(filter: Pick<EditableNumberRangeFilter, 'range' | 'facetId'>): string;
|
|
40
40
|
/**
|
|
41
41
|
* It returns if the filter range min or the filter range max is not null.
|
|
42
42
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editable-number-range-filter.entity.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/facets/entities/editable-number-range-filter.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,KAAK,EACL,MAAM,EAEP,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC;;;;;GAKG;AACH,qBAAa,+BAAgC,YAAW,YAAY;IAC/C,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,eAAe,CAAC;gBAA7B,KAAK,EAAE,KAAK,CAAC,eAAe,CAAC;IAE1D,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;IAIvC;;;;;;OAMG;IACH,QAAQ,CAAC,MAAM,EAAE,yBAAyB,GAAG,IAAI;
|
|
1
|
+
{"version":3,"file":"editable-number-range-filter.entity.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/facets/entities/editable-number-range-filter.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,KAAK,EACL,MAAM,EAEP,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC;;;;;GAKG;AACH,qBAAa,+BAAgC,YAAW,YAAY;IAC/C,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,eAAe,CAAC;gBAA7B,KAAK,EAAE,KAAK,CAAC,eAAe,CAAC;IAE1D,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;IAIvC;;;;;;OAMG;IACH,QAAQ,CAAC,MAAM,EAAE,yBAAyB,GAAG,IAAI;IAcjD;;;;;;;OAOG;IACH,MAAM,CAAC,MAAM,EAAE,yBAAyB,GAAG,IAAI;IAU/C;;;;;;OAMG;IACH,SAAS,CAAC,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC,yBAAyB,EAAE,OAAO,GAAG,SAAS,CAAC,GAAG,MAAM;IAI9F;;;;;;OAMG;IACH,SAAS,CAAC,UAAU,CAAC,MAAM,EAAE,yBAAyB,GAAG,OAAO;IAIhE;;;;;OAKG;IACH,SAAS,CAAC,oBAAoB,CAAC,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI;IAO1D;;;;;;OAMG;IACH,SAAS,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,yBAAyB,GAAG,SAAS;CAGxF"}
|
|
@@ -52,8 +52,9 @@ export declare class HierarchicalFilterEntity implements FilterEntity {
|
|
|
52
52
|
* Saves the given filter to the store.
|
|
53
53
|
*
|
|
54
54
|
* @param filter - The filter to save to the store.
|
|
55
|
+
* @param newFilterState - The new partial state of the filter.
|
|
55
56
|
* @internal
|
|
56
57
|
*/
|
|
57
|
-
protected saveFilter(filter: HierarchicalFilter): void;
|
|
58
|
+
protected saveFilter(filter: HierarchicalFilter, newFilterState?: Partial<HierarchicalFilter>): void;
|
|
58
59
|
}
|
|
59
60
|
//# sourceMappingURL=hierarchical-filter.entity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hierarchical-filter.entity.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/facets/entities/hierarchical-filter.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC;;;;;GAKG;AACH,qBAAa,wBAAyB,YAAW,YAAY;IAGxC,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,eAAe,CAAC;IAF1D,OAAc,OAAO,8BAAwB;gBAEhB,KAAK,EAAE,KAAK,CAAC,eAAe,CAAC;IAE1D;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI;IAM1C;;;;OAIG;IACH,MAAM,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI;IAMxC;;;;;;OAMG;IACH,SAAS,CAAC,mBAAmB,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI;
|
|
1
|
+
{"version":3,"file":"hierarchical-filter.entity.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/facets/entities/hierarchical-filter.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC;;;;;GAKG;AACH,qBAAa,wBAAyB,YAAW,YAAY;IAGxC,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,eAAe,CAAC;IAF1D,OAAc,OAAO,8BAAwB;gBAEhB,KAAK,EAAE,KAAK,CAAC,eAAe,CAAC;IAE1D;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI;IAM1C;;;;OAIG;IACH,MAAM,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI;IAMxC;;;;;;OAMG;IACH,SAAS,CAAC,mBAAmB,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI;IAS/D;;;;;;OAMG;IACH,SAAS,CAAC,eAAe,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI;IAU3D;;;;;;OAMG;IACH,SAAS,CAAC,aAAa,CAAC,EAAE,EAAE,kBAAkB,CAAC,IAAI,CAAC,GAAG,kBAAkB;IAIzE;;;;;;OAMG;IACH,SAAS,CAAC,UAAU,CAClB,MAAM,EAAE,kBAAkB,EAC1B,cAAc,GAAE,OAAO,CAAC,kBAAkB,CAAM,GAC/C,IAAI;CAGR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"single-select.modifier.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/facets/entities/single-select.modifier.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,WAAW,EACX,KAAK,EACL,MAAM,EACN,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAEnD;;;;GAIG;AACH,qBAAa,oBAAqB,SAAQ,wBAAwB;IAChE;;;;OAIG;IACH,MAAM,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI;IAKjC;;;;;;;;;;OAUG;IACH,SAAS,CAAC,eAAe,CAAC,MAAM,EAAE,WAAW,GAAG,WAAW,EAAE;IAqB7D;;;;;;;OAOG;IACH,SAAS,CAAC,eAAe,CACvB,MAAM,EAAE,kBAAkB,EAC1B,GAAG,GAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAe,GACrC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAStB;;;;;;;;OAQG;IACH,SAAS,CAAC,iBAAiB,CACzB,MAAM,EAAE,kBAAkB,EAC1B,GAAG,GAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAe,GACrC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"single-select.modifier.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/facets/entities/single-select.modifier.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,WAAW,EACX,KAAK,EACL,MAAM,EACN,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAEnD;;;;GAIG;AACH,qBAAa,oBAAqB,SAAQ,wBAAwB;IAChE;;;;OAIG;IACH,MAAM,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI;IAKjC;;;;;;;;;;OAUG;IACH,SAAS,CAAC,eAAe,CAAC,MAAM,EAAE,WAAW,GAAG,WAAW,EAAE;IAqB7D;;;;;;;OAOG;IACH,SAAS,CAAC,eAAe,CACvB,MAAM,EAAE,kBAAkB,EAC1B,GAAG,GAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAe,GACrC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAStB;;;;;;;;OAQG;IACH,SAAS,CAAC,iBAAiB,CACzB,MAAM,EAAE,kBAAkB,EAC1B,GAAG,GAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAe,GACrC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAQtB;;;;;;OAMG;IACH,SAAS,CAAC,eAAe,CAAC,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,WAAW,EAAE;CAM/D"}
|
|
@@ -49,6 +49,19 @@ export declare class DefaultFacetsService implements FacetsService {
|
|
|
49
49
|
* @internal
|
|
50
50
|
*/
|
|
51
51
|
protected updateStore(facetsGroup: FacetsGroup): Filter[];
|
|
52
|
+
/**
|
|
53
|
+
* This function returns the filters of the facets group flattened in an array. It keeps the
|
|
54
|
+
* relations between the filters (parent--children).
|
|
55
|
+
*
|
|
56
|
+
* @privateRemarks If it is necessary to deal with more cases than the hierarchical, we need to
|
|
57
|
+
* refactor this logic and maybe move it to the entities, to not make this service dependant of
|
|
58
|
+
* the facet type. At the moment it is only one `if`, and is ok as long as no more `if`s are
|
|
59
|
+
* needed.
|
|
60
|
+
* @param facetsGroup - The facets group from where extract the filters to flat.
|
|
61
|
+
* @returns An array with the filters flattened.
|
|
62
|
+
* @internal
|
|
63
|
+
*/
|
|
64
|
+
protected flatFilters(facetsGroup: FacetsGroup): Filter[];
|
|
52
65
|
/**
|
|
53
66
|
* Retrieves the selected filters from the store.
|
|
54
67
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"facets.service.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/facets/service/facets.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"facets.service.d.ts","sourceRoot":"","sources":["../../../../../src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ts"],"names":[],"mappings":"AAKA,OAAO,EAAmB,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE9D;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/facets/store/module.ts"],"names":[],"mappings":"AAKA,OAAO,EAAmB,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE9D;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,kBAwChC,CAAC"}
|
|
@@ -40,6 +40,12 @@ export interface FacetsGetters {
|
|
|
40
40
|
* @public
|
|
41
41
|
*/
|
|
42
42
|
export interface FacetsMutations {
|
|
43
|
+
/**
|
|
44
|
+
* Updates the state of a filter.
|
|
45
|
+
*
|
|
46
|
+
* @param payload - An object containing the filter to update, and the properties to modify.
|
|
47
|
+
*/
|
|
48
|
+
mutateFilter(payload: MutateFilterPayload): void;
|
|
43
49
|
/**
|
|
44
50
|
* Removes the filter from the {@link FacetsState.filters | filters} record.
|
|
45
51
|
*
|
|
@@ -65,12 +71,6 @@ export interface FacetsMutations {
|
|
|
65
71
|
* @param filters - The filters to add.
|
|
66
72
|
*/
|
|
67
73
|
setFilters(filters: Filter[]): void;
|
|
68
|
-
/**
|
|
69
|
-
* Adds the filter to the {@link FacetsState.filters | filters} record.
|
|
70
|
-
*
|
|
71
|
-
* @param filter - The filter to add.
|
|
72
|
-
*/
|
|
73
|
-
setFilter(filter: Filter): void;
|
|
74
74
|
/**
|
|
75
75
|
* Adds a list of filters to the {@link FacetsState.preselectedFilters | preselectedFilters}
|
|
76
76
|
* record.
|
|
@@ -133,4 +133,20 @@ export interface FacetGroupEntry {
|
|
|
133
133
|
* @public
|
|
134
134
|
*/
|
|
135
135
|
export declare type FiltersByFacet = Record<Facet['id'], Filter[]>;
|
|
136
|
+
/**
|
|
137
|
+
* Payload to use in the `mutateFilter` mutation.
|
|
138
|
+
*
|
|
139
|
+
* @public
|
|
140
|
+
*/
|
|
141
|
+
export interface MutateFilterPayload {
|
|
142
|
+
/**
|
|
143
|
+
* The filter to modify.
|
|
144
|
+
* If it does not belong to the store it will be added.
|
|
145
|
+
*/
|
|
146
|
+
filter: Filter;
|
|
147
|
+
/**
|
|
148
|
+
* The new fields values to modify in the filter.
|
|
149
|
+
*/
|
|
150
|
+
newFilterState: Partial<Filter>;
|
|
151
|
+
}
|
|
136
152
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/facets/store/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9D;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,yDAAyD;IACzD,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC;IACtC,yDAAyD;IACzD,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC;IACrC,wCAAwC;IACxC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC;IACpD,uDAAuD;IACvD,kBAAkB,EAAE,SAAS,EAAE,CAAC;CACjC;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B;;OAEG;IACH,sBAAsB,EAAE,cAAc,CAAC;IACvC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC;CACpC;AAED;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,YAAY,CA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}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { HierarchicalFilter } from '@empathyco/x-types';
|
|
1
2
|
/**
|
|
2
3
|
* Compares two queries to know if the new one is a refined query from the previous one or a new
|
|
3
4
|
* one.
|
|
@@ -27,4 +28,14 @@
|
|
|
27
28
|
* @public
|
|
28
29
|
*/
|
|
29
30
|
export declare function isNewQuery(newQuery: string, previousQuery: string): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* This function flattens the Hierarchical Filters, returning an array with all filters including
|
|
33
|
+
* the children.
|
|
34
|
+
*
|
|
35
|
+
* @param hierarchicalFilters - The list of Hierarchical Filters to flatten.
|
|
36
|
+
* @returns An array with all the Hierarchical filters.
|
|
37
|
+
*
|
|
38
|
+
* @public
|
|
39
|
+
*/
|
|
40
|
+
export declare function flatHierarchicalFilters(hierarchicalFilters: HierarchicalFilter[]): HierarchicalFilter[];
|
|
30
41
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/x-modules/facets/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/x-modules/facets/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAGxD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CAe3E;AAED;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CACrC,mBAAmB,EAAE,kBAAkB,EAAE,GACxC,kBAAkB,EAAE,CAKtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-input.vue?rollup-plugin-vue=script.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/search-box/components/search-input.vue?rollup-plugin-vue=script.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"search-input.vue?rollup-plugin-vue=script.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/search-box/components/search-input.vue?rollup-plugin-vue=script.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,GAAG,MAAM,KAAK,CAAC;AAKtB,OAAO,EAAY,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAG5D;;;;;GAKG;AAIH,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,GAAG;IACnC,KAAK,EAAG;QAAE,KAAK,EAAE,gBAAgB,CAAA;KAAE,CAAC;IAE3C,SAAS,CAAC,kBAAkB,SAA0B;IAEtD;;OAEG;IAEH,SAAS,CAAC,SAAS,EAAG,MAAM,CAAC;IAE7B;;OAEG;IAEH,SAAS,CAAC,SAAS,EAAG,OAAO,CAAC;IAE9B;;OAEG;IAEH,SAAS,CAAC,OAAO,EAAG,OAAO,CAAC;IAE5B;;OAEG;IAEH,SAAS,CAAC,mBAAmB,EAAG,MAAM,CAAC;IAEvC;;OAEG;IAEH,SAAS,CAAC,wBAAwB,EAAG,MAAM,EAAE,CAAC;IAE9C;;OAEG;IAEH,SAAS,CAAC,4BAA4B,EAAG,aAAa,CAAC,YAAY,EAAE,UAAU,EAAE,CAAC,CAAC;IAG5E,KAAK,EAAG,MAAM,CAAC;IAEtB;;;;;;OAMG;IAEH,UAAU,IAAI,IAAI;IAIlB,SAAS,CAAC,2BAA2B,EAAG,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;IAEpE;;;;;;OAMG;IAEH,iCAAiC,IAAI,IAAI;IAIzC,OAAO,IAAI,IAAI;IAMf;;;;;;OAMG;IACH,+BAA+B,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAYpD;;;;;OAKG;IACH,SAAS,CAAC,mBAAmB,IAAI,IAAI,CAAC,YAAY,EAAE,YAAY,CAAC;IAOjE;;;;OAIG;IACH,SAAS,CAAC,wBAAwB,IAAI,IAAI;IAI1C;;;;OAIG;IACH,SAAS,CAAC,wBAAwB,IAAI,IAAI;IAI1C;;;;OAIG;IACH,SAAS,CAAC,wBAAwB,IAAI,IAAI;IAI1C;;;;;;OAMG;IACH,SAAS,CAAC,4BAA4B,IAAI,IAAI;IAU9C;;;;;OAKG;IACH,SAAS,CAAC,uBAAuB,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI;IAI7D;;;;;;;;;OASG;IACH,SAAS,CAAC,uBAAuB,IAAI,IAAI;IASzC;;;;;;;OAOG;IACH,SAAS,CAAC,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;CAGtD"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@empathyco/x-adapter-platform](./x-adapter-platform.md) > [searchResponseFacetsMapper](./x-adapter-platform.searchresponsefacetsmapper.md)
|
|
4
|
-
|
|
5
|
-
## searchResponseFacetsMapper() function
|
|
6
|
-
|
|
7
|
-
Mapper to flatten hierarchical facet filters.
|
|
8
|
-
|
|
9
|
-
<b>Signature:</b>
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
export declare function searchResponseFacetsMapper(from: PlatformSearchResponse, { mappedValue }: MapperContext): Partial<SearchResponse>;
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Parameters
|
|
16
|
-
|
|
17
|
-
| Parameter | Type | Description |
|
|
18
|
-
| --- | --- | --- |
|
|
19
|
-
| from | [PlatformSearchResponse](./x-adapter-platform.platformsearchresponse.md) | The Platform search response. |
|
|
20
|
-
| { mappedValue } | MapperContext | |
|
|
21
|
-
|
|
22
|
-
<b>Returns:</b>
|
|
23
|
-
|
|
24
|
-
Partial<SearchResponse>
|
|
25
|
-
|
|
26
|
-
The mapped facets.
|
|
27
|
-
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [FacetsMutations](./x-components.facetsmutations.md) > [setFilter](./x-components.facetsmutations.setfilter.md)
|
|
4
|
-
|
|
5
|
-
## FacetsMutations.setFilter() method
|
|
6
|
-
|
|
7
|
-
Adds the filter to the [filters](./x-components.facetsstate.filters.md) record.
|
|
8
|
-
|
|
9
|
-
<b>Signature:</b>
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
setFilter(filter: Filter): void;
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Parameters
|
|
16
|
-
|
|
17
|
-
| Parameter | Type | Description |
|
|
18
|
-
| --- | --- | --- |
|
|
19
|
-
| filter | Filter | The filter to add. |
|
|
20
|
-
|
|
21
|
-
<b>Returns:</b>
|
|
22
|
-
|
|
23
|
-
void
|
|
24
|
-
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Interface X data privacy and browser local storage
|
|
3
|
-
tags:
|
|
4
|
-
- x components
|
|
5
|
-
- interface x
|
|
6
|
-
- cookies
|
|
7
|
-
- local storage
|
|
8
|
-
- history queries
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# Interface X data privacy and browser local storage
|
|
12
|
-
|
|
13
|
-
Interface X for web _doesn't use cookies_ for storing data. The Interface X Components use the web browser's local storage to
|
|
14
|
-
save the technical data required to provide the services associated with the search & discovery experience. The data remains in the shopper's device until the expiration time is reached or the shopper chooses to delete it.
|
|
15
|
-
|
|
16
|
-
More specifically, Interface X Components store the following elements in the browser's local storage:
|
|
17
|
-
|
|
18
|
-
| Key | Duration | Purpose |
|
|
19
|
-
| -------------------- | ----------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
20
|
-
| `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 |
|
|
21
|
-
| `x-session-time-stamp` | 30 minutes | Timestamp for the current session ID |
|
|
22
|
-
| `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. |
|