@empathyco/x-components 6.0.0-alpha.180 → 6.0.0-alpha.182
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 +16 -0
- package/docs/API-reference/api/x-adapter-platform.facetsendpointadapter.md +13 -0
- package/docs/API-reference/api/x-adapter-platform.facetsrequestschema.md +13 -0
- package/docs/API-reference/api/x-adapter-platform.facetsresponsemapper.md +13 -0
- package/docs/API-reference/api/x-adapter-platform.md +5 -0
- package/docs/API-reference/api/x-adapter-platform.platformfacetsrequest.md +15 -0
- package/docs/API-reference/api/x-adapter-platform.platformfacetsresponse.catalog.md +13 -0
- package/docs/API-reference/api/x-adapter-platform.platformfacetsresponse.md +20 -0
- package/docs/API-reference/api/x-components.applyhierarchicalselection.md +25 -0
- package/docs/API-reference/api/x-components.facetsactions.cancelfetchandsavefacetsresponse.md +13 -0
- package/docs/API-reference/api/x-components.facetsactions.fetchandsavefacetsresponse.md +13 -0
- package/docs/API-reference/api/x-components.facetsactions.fetchfacetsresponse.md +13 -0
- package/docs/API-reference/api/x-components.facetsactions.md +10 -0
- package/docs/API-reference/api/x-components.facetsactions.saveorigin.md +13 -0
- package/docs/API-reference/api/x-components.facetsgetters.md +1 -0
- package/docs/API-reference/api/x-components.facetsgetters.request.md +13 -0
- package/docs/API-reference/api/x-components.facetsmutations.md +4 -2
- package/docs/API-reference/api/x-components.facetsmutations.setorigin.md +13 -0
- package/docs/API-reference/api/x-components.facetsmutations.setparams.md +13 -0
- package/docs/API-reference/api/x-components.facetsstate.md +4 -2
- package/docs/API-reference/api/x-components.facetsstate.origin.md +13 -0
- package/docs/API-reference/api/x-components.facetsstate.params.md +13 -0
- package/docs/API-reference/api/x-components.flattenallfilters.md +26 -0
- package/docs/API-reference/api/x-components.md +2 -0
- package/docs/API-reference/api/x-types.facetsrequest.md +15 -0
- package/docs/API-reference/api/x-types.facetsresponse.facets.md +11 -0
- package/docs/API-reference/api/x-types.facetsresponse.md +20 -0
- package/docs/API-reference/api/x-types.md +2 -0
- package/docs/API-reference/api/x-types.xcomponentsadapter.facets.md +11 -0
- package/docs/API-reference/api/x-types.xcomponentsadapter.md +1 -0
- package/facets/index.js +1 -1
- package/js/index.js +1 -1
- package/js/x-modules/facets/store/actions/fetch-and-save-facets-response.action.js +38 -0
- package/js/x-modules/facets/store/actions/fetch-and-save-facets-response.action.js.map +1 -0
- package/js/x-modules/facets/store/actions/fetch-facets-response.action.js +16 -0
- package/js/x-modules/facets/store/actions/fetch-facets-response.action.js.map +1 -0
- package/js/x-modules/facets/store/actions/save-origin.action.js +16 -0
- package/js/x-modules/facets/store/actions/save-origin.action.js.map +1 -0
- package/js/x-modules/facets/store/getters/request.getter.js +23 -0
- package/js/x-modules/facets/store/getters/request.getter.js.map +1 -0
- package/js/x-modules/facets/store/module.js +23 -1
- package/js/x-modules/facets/store/module.js.map +1 -1
- package/js/x-modules/facets/utils.js +43 -1
- package/js/x-modules/facets/utils.js.map +1 -1
- package/package.json +5 -5
- package/report/x-adapter-platform.api.json +274 -0
- package/report/x-components.api.json +465 -17
- package/report/x-components.api.md +21 -4
- package/report/x-types.api.json +170 -0
- package/types/adapter/e2e-adapter.d.ts.map +1 -1
- package/types/x-modules/facets/store/actions/fetch-and-save-facets-response.action.d.ts +5 -0
- package/types/x-modules/facets/store/actions/fetch-and-save-facets-response.action.d.ts.map +1 -0
- package/types/x-modules/facets/store/actions/fetch-facets-response.action.d.ts +13 -0
- package/types/x-modules/facets/store/actions/fetch-facets-response.action.d.ts.map +1 -0
- package/types/x-modules/facets/store/actions/save-origin.action.d.ts +11 -0
- package/types/x-modules/facets/store/actions/save-origin.action.d.ts.map +1 -0
- package/types/x-modules/facets/store/getters/request.getter.d.ts +13 -0
- package/types/x-modules/facets/store/getters/request.getter.d.ts.map +1 -0
- package/types/x-modules/facets/store/module.d.ts.map +1 -1
- package/types/x-modules/facets/store/types.d.ts +48 -7
- package/types/x-modules/facets/store/types.d.ts.map +1 -1
- package/types/x-modules/facets/utils.d.ts +19 -1
- package/types/x-modules/facets/utils.d.ts.map +1 -1
- package/types/x-modules/related-prompts/components/related-prompts-tag-list.vue.d.ts.map +1 -1
- package/docs/API-reference/api/x-components.facetsstate.query.md +0 -13
package/report/x-types.api.json
CHANGED
|
@@ -2274,6 +2274,126 @@
|
|
|
2274
2274
|
"endIndex": 2
|
|
2275
2275
|
}
|
|
2276
2276
|
},
|
|
2277
|
+
{
|
|
2278
|
+
"kind": "Interface",
|
|
2279
|
+
"canonicalReference": "@empathyco/x-types!FacetsRequest:interface",
|
|
2280
|
+
"docComment": "/**\n * The Request for the Facets endpoint.\n *\n * @public\n */\n",
|
|
2281
|
+
"excerptTokens": [
|
|
2282
|
+
{
|
|
2283
|
+
"kind": "Content",
|
|
2284
|
+
"text": "export interface FacetsRequest extends "
|
|
2285
|
+
},
|
|
2286
|
+
{
|
|
2287
|
+
"kind": "Reference",
|
|
2288
|
+
"text": "QueryableRequest",
|
|
2289
|
+
"canonicalReference": "@empathyco/x-types!QueryableRequest:interface"
|
|
2290
|
+
},
|
|
2291
|
+
{
|
|
2292
|
+
"kind": "Content",
|
|
2293
|
+
"text": ", "
|
|
2294
|
+
},
|
|
2295
|
+
{
|
|
2296
|
+
"kind": "Reference",
|
|
2297
|
+
"text": "FilterableRequest",
|
|
2298
|
+
"canonicalReference": "@empathyco/x-types!FilterableRequest:interface"
|
|
2299
|
+
},
|
|
2300
|
+
{
|
|
2301
|
+
"kind": "Content",
|
|
2302
|
+
"text": ", "
|
|
2303
|
+
},
|
|
2304
|
+
{
|
|
2305
|
+
"kind": "Reference",
|
|
2306
|
+
"text": "TrackableRequest",
|
|
2307
|
+
"canonicalReference": "@empathyco/x-types!TrackableRequest:interface"
|
|
2308
|
+
},
|
|
2309
|
+
{
|
|
2310
|
+
"kind": "Content",
|
|
2311
|
+
"text": ", "
|
|
2312
|
+
},
|
|
2313
|
+
{
|
|
2314
|
+
"kind": "Reference",
|
|
2315
|
+
"text": "ExtraParamsRequest",
|
|
2316
|
+
"canonicalReference": "@empathyco/x-types!ExtraParamsRequest:interface"
|
|
2317
|
+
},
|
|
2318
|
+
{
|
|
2319
|
+
"kind": "Content",
|
|
2320
|
+
"text": " "
|
|
2321
|
+
}
|
|
2322
|
+
],
|
|
2323
|
+
"fileUrlPath": "src/request/facets-request.model.ts",
|
|
2324
|
+
"releaseTag": "Public",
|
|
2325
|
+
"name": "FacetsRequest",
|
|
2326
|
+
"preserveMemberOrder": false,
|
|
2327
|
+
"members": [],
|
|
2328
|
+
"extendsTokenRanges": [
|
|
2329
|
+
{
|
|
2330
|
+
"startIndex": 1,
|
|
2331
|
+
"endIndex": 2
|
|
2332
|
+
},
|
|
2333
|
+
{
|
|
2334
|
+
"startIndex": 3,
|
|
2335
|
+
"endIndex": 4
|
|
2336
|
+
},
|
|
2337
|
+
{
|
|
2338
|
+
"startIndex": 5,
|
|
2339
|
+
"endIndex": 6
|
|
2340
|
+
},
|
|
2341
|
+
{
|
|
2342
|
+
"startIndex": 7,
|
|
2343
|
+
"endIndex": 8
|
|
2344
|
+
}
|
|
2345
|
+
]
|
|
2346
|
+
},
|
|
2347
|
+
{
|
|
2348
|
+
"kind": "Interface",
|
|
2349
|
+
"canonicalReference": "@empathyco/x-types!FacetsResponse:interface",
|
|
2350
|
+
"docComment": "/**\n * Response for the facet endpoint.\n *\n * @public\n */\n",
|
|
2351
|
+
"excerptTokens": [
|
|
2352
|
+
{
|
|
2353
|
+
"kind": "Content",
|
|
2354
|
+
"text": "export interface FacetsResponse "
|
|
2355
|
+
}
|
|
2356
|
+
],
|
|
2357
|
+
"fileUrlPath": "src/response/facets-response.model.ts",
|
|
2358
|
+
"releaseTag": "Public",
|
|
2359
|
+
"name": "FacetsResponse",
|
|
2360
|
+
"preserveMemberOrder": false,
|
|
2361
|
+
"members": [
|
|
2362
|
+
{
|
|
2363
|
+
"kind": "PropertySignature",
|
|
2364
|
+
"canonicalReference": "@empathyco/x-types!FacetsResponse#facets:member",
|
|
2365
|
+
"docComment": "",
|
|
2366
|
+
"excerptTokens": [
|
|
2367
|
+
{
|
|
2368
|
+
"kind": "Content",
|
|
2369
|
+
"text": "facets?: "
|
|
2370
|
+
},
|
|
2371
|
+
{
|
|
2372
|
+
"kind": "Reference",
|
|
2373
|
+
"text": "Facet",
|
|
2374
|
+
"canonicalReference": "@empathyco/x-types!Facet:interface"
|
|
2375
|
+
},
|
|
2376
|
+
{
|
|
2377
|
+
"kind": "Content",
|
|
2378
|
+
"text": "[]"
|
|
2379
|
+
},
|
|
2380
|
+
{
|
|
2381
|
+
"kind": "Content",
|
|
2382
|
+
"text": ";"
|
|
2383
|
+
}
|
|
2384
|
+
],
|
|
2385
|
+
"isReadonly": false,
|
|
2386
|
+
"isOptional": true,
|
|
2387
|
+
"releaseTag": "Public",
|
|
2388
|
+
"name": "facets",
|
|
2389
|
+
"propertyTypeTokenRange": {
|
|
2390
|
+
"startIndex": 1,
|
|
2391
|
+
"endIndex": 3
|
|
2392
|
+
}
|
|
2393
|
+
}
|
|
2394
|
+
],
|
|
2395
|
+
"extendsTokenRanges": []
|
|
2396
|
+
},
|
|
2277
2397
|
{
|
|
2278
2398
|
"kind": "Interface",
|
|
2279
2399
|
"canonicalReference": "@empathyco/x-types!Filter:interface",
|
|
@@ -8997,6 +9117,56 @@
|
|
|
8997
9117
|
"endIndex": 7
|
|
8998
9118
|
}
|
|
8999
9119
|
},
|
|
9120
|
+
{
|
|
9121
|
+
"kind": "PropertySignature",
|
|
9122
|
+
"canonicalReference": "@empathyco/x-types!XComponentsAdapter#facets:member",
|
|
9123
|
+
"docComment": "",
|
|
9124
|
+
"excerptTokens": [
|
|
9125
|
+
{
|
|
9126
|
+
"kind": "Content",
|
|
9127
|
+
"text": "facets: "
|
|
9128
|
+
},
|
|
9129
|
+
{
|
|
9130
|
+
"kind": "Reference",
|
|
9131
|
+
"text": "EndpointAdapter",
|
|
9132
|
+
"canonicalReference": "@empathyco/x-adapter!EndpointAdapter:interface"
|
|
9133
|
+
},
|
|
9134
|
+
{
|
|
9135
|
+
"kind": "Content",
|
|
9136
|
+
"text": "<"
|
|
9137
|
+
},
|
|
9138
|
+
{
|
|
9139
|
+
"kind": "Reference",
|
|
9140
|
+
"text": "FacetsRequest",
|
|
9141
|
+
"canonicalReference": "@empathyco/x-types!FacetsRequest:interface"
|
|
9142
|
+
},
|
|
9143
|
+
{
|
|
9144
|
+
"kind": "Content",
|
|
9145
|
+
"text": ", "
|
|
9146
|
+
},
|
|
9147
|
+
{
|
|
9148
|
+
"kind": "Reference",
|
|
9149
|
+
"text": "FacetsResponse",
|
|
9150
|
+
"canonicalReference": "@empathyco/x-types!FacetsResponse:interface"
|
|
9151
|
+
},
|
|
9152
|
+
{
|
|
9153
|
+
"kind": "Content",
|
|
9154
|
+
"text": ">"
|
|
9155
|
+
},
|
|
9156
|
+
{
|
|
9157
|
+
"kind": "Content",
|
|
9158
|
+
"text": ";"
|
|
9159
|
+
}
|
|
9160
|
+
],
|
|
9161
|
+
"isReadonly": false,
|
|
9162
|
+
"isOptional": false,
|
|
9163
|
+
"releaseTag": "Public",
|
|
9164
|
+
"name": "facets",
|
|
9165
|
+
"propertyTypeTokenRange": {
|
|
9166
|
+
"startIndex": 1,
|
|
9167
|
+
"endIndex": 7
|
|
9168
|
+
}
|
|
9169
|
+
},
|
|
9000
9170
|
{
|
|
9001
9171
|
"kind": "PropertySignature",
|
|
9002
9172
|
"canonicalReference": "@empathyco/x-types!XComponentsAdapter#identifierResults:member",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e2e-adapter.d.ts","sourceRoot":"","sources":["../../../src/adapter/e2e-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AAI5D;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,EAAE,UAWnC,CAAA;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,QAAQ,EACnD,IAAI,EAAE,MAAM,GACX,eAAe,CAAC,OAAO,EAAE,QAAQ,CAAC,CAUpC;AAED,eAAO,MAAM,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"e2e-adapter.d.ts","sourceRoot":"","sources":["../../../src/adapter/e2e-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AAI5D;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,EAAE,UAWnC,CAAA;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,QAAQ,EACnD,IAAI,EAAE,MAAM,GACX,eAAe,CAAC,OAAO,EAAE,QAAQ,CAAC,CAUpC;AAED,eAAO,MAAM,UAAU,EAAE,kBA2BxB,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { FacetsRequest } from '@empathyco/x-types';
|
|
2
|
+
import type { FacetsActionsContext } from '../types';
|
|
3
|
+
export declare const fetchAndSaveFacetsResponse: (context: FacetsActionsContext, request: FacetsRequest | null) => void | Promise<void>;
|
|
4
|
+
export declare const cancelFetchAndSaveFacetsResponse: () => void;
|
|
5
|
+
//# sourceMappingURL=fetch-and-save-facets-response.action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch-and-save-facets-response.action.d.ts","sourceRoot":"","sources":["../../../../../../src/x-modules/facets/store/actions/fetch-and-save-facets-response.action.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAS,aAAa,EAA0B,MAAM,oBAAoB,CAAA;AACtF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AA2CpD,eAAO,MAAM,0BAA0B,wFAAe,CAAA;AACtD,eAAO,MAAM,gCAAgC,YAAiB,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { FacetsXStoreModule } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Default implementation for the {@link FacetsActions.fetchFacetsResponse}.
|
|
4
|
+
*
|
|
5
|
+
* @param _context - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the actions,
|
|
6
|
+
* provided by Vuex.
|
|
7
|
+
* @param request - The facets request to make.
|
|
8
|
+
* @returns A Promise of facets response that resolves when it fetches facets response.
|
|
9
|
+
*
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export declare const fetchFacetsResponse: FacetsXStoreModule['actions']['fetchFacetsResponse'];
|
|
13
|
+
//# sourceMappingURL=fetch-facets-response.action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch-facets-response.action.d.ts","sourceRoot":"","sources":["../../../../../../src/x-modules/facets/store/actions/fetch-facets-response.action.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAGlD;;;;;;;;;GASG;AACH,eAAO,MAAM,mBAAmB,EAAE,kBAAkB,CAAC,SAAS,CAAC,CAAC,qBAAqB,CAGjD,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { FacetsXStoreModule } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Default implementation for the {@link FacetsActions.saveOrigin}.
|
|
4
|
+
*
|
|
5
|
+
* @param context - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the actions,
|
|
6
|
+
* provided by Vuex.
|
|
7
|
+
* @param queryOriginInit - The object to create the {@link QueryOrigin} with.
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
export declare const saveOrigin: FacetsXStoreModule['actions']['saveOrigin'];
|
|
11
|
+
//# sourceMappingURL=save-origin.action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"save-origin.action.d.ts","sourceRoot":"","sources":["../../../../../../src/x-modules/facets/store/actions/save-origin.action.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAGlD;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,EAAE,kBAAkB,CAAC,SAAS,CAAC,CAAC,YAAY,CAKlE,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { FacetsXStoreModule } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Default implementation for the {@link FacetsGetters.request} getter.
|
|
4
|
+
*
|
|
5
|
+
* @param state - Current {@link https://vuex.vuejs.org/guide/state.html | state} of the facets
|
|
6
|
+
* module.
|
|
7
|
+
* @param getters - Current {@link https://vuex.vuejs.org/guide/getters.html | getters} of the
|
|
8
|
+
* facets module.
|
|
9
|
+
* @returns The facets request to fetch data from the API.
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export declare const request: FacetsXStoreModule['getters']['request'];
|
|
13
|
+
//# sourceMappingURL=request.getter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request.getter.d.ts","sourceRoot":"","sources":["../../../../../../src/x-modules/facets/store/getters/request.getter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAElD;;;;;;;;;GASG;AACH,eAAO,MAAM,OAAO,EAAE,kBAAkB,CAAC,SAAS,CAAC,CAAC,SAAS,CAY5D,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/facets/store/module.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAmB,kBAAkB,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/facets/store/module.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAmB,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAgBlE;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,kBA4EhC,CAAA"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import type { Facet, Filter, RawFilter } from '@empathyco/x-types';
|
|
2
|
-
import type {
|
|
1
|
+
import type { Facet, FacetsRequest, FacetsResponse, Filter, RawFilter } from '@empathyco/x-types';
|
|
2
|
+
import type { Dictionary } from '@empathyco/x-utils';
|
|
3
|
+
import type { StatusMutations, StatusState, XActionContext, XStoreModule } from '../../../store';
|
|
3
4
|
import type { ConfigMutations } from '../../../store/utils/config-store.utils';
|
|
4
|
-
import type { QueryMutations } from '../../../store/utils/query.utils';
|
|
5
|
+
import type { QueryMutations, QueryState } from '../../../store/utils/query.utils';
|
|
6
|
+
import type { QueryOrigin, QueryOriginInit } from '../../../types';
|
|
5
7
|
/**
|
|
6
8
|
* Facets store state.
|
|
7
9
|
*
|
|
8
10
|
* @public
|
|
9
11
|
*/
|
|
10
|
-
export interface FacetsState {
|
|
12
|
+
export interface FacetsState extends StatusState, QueryState {
|
|
11
13
|
/** The current facets config {@link FacetsState.config}. */
|
|
12
14
|
config: FacetsConfig;
|
|
13
|
-
/** The current query {@link FacetsState.query}. */
|
|
14
|
-
query: string;
|
|
15
15
|
/** Record of all available filters indexed by its id. */
|
|
16
16
|
filters: Record<Filter['id'], Filter>;
|
|
17
17
|
/** Record specifying the group each facet belongs to. */
|
|
@@ -22,6 +22,10 @@ export interface FacetsState {
|
|
|
22
22
|
preselectedFilters: RawFilter[];
|
|
23
23
|
/** Record of sticky filters indexed by its id. */
|
|
24
24
|
stickyFilters: Record<Filter['id'], Filter>;
|
|
25
|
+
/** The origin property of the request. */
|
|
26
|
+
origin: QueryOrigin | null;
|
|
27
|
+
/** The extra params property of the state. */
|
|
28
|
+
params: Dictionary<unknown>;
|
|
25
29
|
}
|
|
26
30
|
/**
|
|
27
31
|
* Facets store getters.
|
|
@@ -45,13 +49,18 @@ export interface FacetsGetters {
|
|
|
45
49
|
* List of all facets with their filters.
|
|
46
50
|
*/
|
|
47
51
|
facets: Record<Facet['id'], Facet>;
|
|
52
|
+
/**
|
|
53
|
+
* The adapter request object for retrieving the facets, or null if there is no
|
|
54
|
+
* valid data to create a request.
|
|
55
|
+
*/
|
|
56
|
+
request: FacetsRequest | null;
|
|
48
57
|
}
|
|
49
58
|
/**
|
|
50
59
|
* Facets store mutations.
|
|
51
60
|
*
|
|
52
61
|
* @public
|
|
53
62
|
*/
|
|
54
|
-
export interface FacetsMutations extends QueryMutations, ConfigMutations<FacetsState> {
|
|
63
|
+
export interface FacetsMutations extends StatusMutations, QueryMutations, ConfigMutations<FacetsState> {
|
|
55
64
|
/**
|
|
56
65
|
* Updates the state of a filter.
|
|
57
66
|
*
|
|
@@ -119,6 +128,18 @@ export interface FacetsMutations extends QueryMutations, ConfigMutations<FacetsS
|
|
|
119
128
|
*
|
|
120
129
|
*/
|
|
121
130
|
clearStickyFilters: () => void;
|
|
131
|
+
/**
|
|
132
|
+
* Sets the origin of the module.
|
|
133
|
+
*
|
|
134
|
+
* @param origin - The new origin.
|
|
135
|
+
*/
|
|
136
|
+
setOrigin: (origin: QueryOrigin | undefined | null) => void;
|
|
137
|
+
/**
|
|
138
|
+
* Sets the extra params of the module.
|
|
139
|
+
*
|
|
140
|
+
* @param params - The new extra params.
|
|
141
|
+
*/
|
|
142
|
+
setParams: (params: Dictionary<unknown>) => void;
|
|
122
143
|
}
|
|
123
144
|
/**
|
|
124
145
|
* Facets store actions.
|
|
@@ -126,6 +147,26 @@ export interface FacetsMutations extends QueryMutations, ConfigMutations<FacetsS
|
|
|
126
147
|
* @public
|
|
127
148
|
*/
|
|
128
149
|
export interface FacetsActions {
|
|
150
|
+
/**
|
|
151
|
+
* Cancels / interrupt {@link FacetsActions.cancelFetchAndSaveFacetsResponse} synchronous promise.
|
|
152
|
+
*/
|
|
153
|
+
cancelFetchAndSaveFacetsResponse: () => void;
|
|
154
|
+
/**
|
|
155
|
+
* Fetches a new facets response and stores them in the module state.
|
|
156
|
+
*/
|
|
157
|
+
fetchAndSaveFacetsResponse: (request: FacetsRequest | null) => void;
|
|
158
|
+
/**
|
|
159
|
+
* Fetches the facets response and returns them.
|
|
160
|
+
*
|
|
161
|
+
* @returns The new search response.
|
|
162
|
+
*/
|
|
163
|
+
fetchFacetsResponse: (request: FacetsRequest) => FacetsResponse;
|
|
164
|
+
/**
|
|
165
|
+
* Creates a {@link QueryOrigin} and saves it.
|
|
166
|
+
*
|
|
167
|
+
* @param originInit - The object to create the origin with.
|
|
168
|
+
*/
|
|
169
|
+
saveOrigin: (originInit: QueryOriginInit) => void;
|
|
129
170
|
}
|
|
130
171
|
/**
|
|
131
172
|
* The type of the context object for the facets module actions.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/facets/store/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/facets/store/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AACjG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAChG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAA;AAC9E,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAA;AAClF,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAElE;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IAAI,CAAA;CAClD;AAED;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAC/C,WAAW,EACX,aAAa,EACb,eAAe,EACf,aAAa,CACd,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAC3C,WAAW,EACX,aAAa,EACb,eAAe,EACf,aAAa,CACd,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,OAAO,GAAG,MAAM,CAAA;AAE5B;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,oBAAoB;IACpB,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,CAAA;IACpB,oBAAoB;IACpB,OAAO,EAAE,OAAO,CAAA;CACjB;AAED;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC,CAAA;AAE1D;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,cAAc,EAAE,OAAO,CAAC,MAAM,CAAC,CAAA;CAChC;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,mFAAmF;IACnF,yBAAyB,EAAE,yBAAyB,CAAA;CACrD;AAED;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG,KAAK,GAAG,aAAa,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { HierarchicalFilter } from '@empathyco/x-types';
|
|
1
|
+
import type { Facet, Filter, HierarchicalFilter } from '@empathyco/x-types';
|
|
2
2
|
/**
|
|
3
3
|
* This function flattens the Hierarchical Filters, returning an array with all filters including
|
|
4
4
|
* the children.
|
|
@@ -9,4 +9,22 @@ import type { HierarchicalFilter } from '@empathyco/x-types';
|
|
|
9
9
|
* @public
|
|
10
10
|
*/
|
|
11
11
|
export declare function flatHierarchicalFilters(hierarchicalFilters: HierarchicalFilter[]): HierarchicalFilter[];
|
|
12
|
+
/**
|
|
13
|
+
* Flattens all filters from an array of facets, including hierarchical filters.
|
|
14
|
+
*
|
|
15
|
+
* @param facets - The list of facets to extract filters from.
|
|
16
|
+
* @returns A flat array of all filters from all facets.
|
|
17
|
+
*
|
|
18
|
+
* @public
|
|
19
|
+
*/
|
|
20
|
+
export declare function flattenAllFilters(facets: Facet[]): Filter[];
|
|
21
|
+
/**
|
|
22
|
+
* Recursively applies the selected state to hierarchical filters and their children.
|
|
23
|
+
*
|
|
24
|
+
* @param filters - The hierarchical filters to update.
|
|
25
|
+
* @param selectedIds - The set of selected filter ids.
|
|
26
|
+
*
|
|
27
|
+
* @public
|
|
28
|
+
*/
|
|
29
|
+
export declare function applyHierarchicalSelection(filters: HierarchicalFilter[], selectedIds: Set<string | number>): void;
|
|
12
30
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/x-modules/facets/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/x-modules/facets/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AAG3E;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CACrC,mBAAmB,EAAE,kBAAkB,EAAE,GACxC,kBAAkB,EAAE,CAKtB;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,EAAE,CAU3D;AAED;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,kBAAkB,EAAE,EAC7B,WAAW,EAAE,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,GAChC,IAAI,CAWN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"related-prompts-tag-list.vue?vue&type=script&lang.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/related-prompts/components/related-prompts-tag-list.vue?vue&type=script&lang.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AAQnC;;;;;;;GAOG;;IAMC;;;;OAIG;;IAEH;;;;OAIG;;;;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;;OAKG;eACiB,QAAQ,CAAC,MAAM,EAAE,CAAC;IACtC;;;;OAIG;;;;;;8BAoE8B,MAAM,KAAG,IAAI;wBAiEnB,OAAO;kBAeb,OAAO,QAAQ,MAAM,IAAI;kBAkBzB,OAAO,QAAQ,MAAM,IAAI;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"related-prompts-tag-list.vue?vue&type=script&lang.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/related-prompts/components/related-prompts-tag-list.vue?vue&type=script&lang.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AAQnC;;;;;;;GAOG;;IAMC;;;;OAIG;;IAEH;;;;OAIG;;;;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;;OAKG;eACiB,QAAQ,CAAC,MAAM,EAAE,CAAC;IACtC;;;;OAIG;;;;;;8BAoE8B,MAAM,KAAG,IAAI;wBAiEnB,OAAO;kBAeb,OAAO,QAAQ,MAAM,IAAI;kBAkBzB,OAAO,QAAQ,MAAM,IAAI;;;;;;;;;;;iCAoC4oa,CAAC;sCAAqD,CAAC;8BAA6C,CAAC;;;;;;;;;;;;;IA7O/xa;;;;OAIG;;IAEH;;;;OAIG;;;;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;;OAKG;eACiB,QAAQ,CAAC,MAAM,EAAE,CAAC;IACtC;;;;OAIG;;;;;;;;;AAxCP,wBAiPE"}
|
|
@@ -1,13 +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) > [FacetsState](./x-components.facetsstate.md) > [query](./x-components.facetsstate.query.md)
|
|
4
|
-
|
|
5
|
-
## FacetsState.query property
|
|
6
|
-
|
|
7
|
-
The current query [FacetsState.query](./x-components.facetsstate.query.md)<!-- -->.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
query: string;
|
|
13
|
-
```
|