@empathyco/x-components 3.0.0-alpha.110 → 3.0.0-alpha.111
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 +13 -0
- package/docs/API-reference/api/x-components.xcomponentaliasapi.md +1 -0
- package/docs/API-reference/api/x-components.xcomponentaliasapi.results.md +13 -0
- package/js/plugins/x-plugin.alias.js +3 -0
- package/js/plugins/x-plugin.alias.js.map +1 -1
- package/package.json +2 -2
- package/report/x-components.api.json +40 -0
- package/report/x-components.api.md +1 -0
- package/types/plugins/x-plugin.alias.d.ts.map +1 -1
- package/types/plugins/x-plugin.types.d.ts +14 -6
- package/types/plugins/x-plugin.types.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,19 @@
|
|
|
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.111](https://github.com/empathyco/x/compare/@empathyco/x-components@3.0.0-alpha.110...@empathyco/x-components@3.0.0-alpha.111) (2022-06-16)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **x-plugin:** add results to `Alias API` (#545)
|
|
11
|
+
([9993ab6](https://github.com/empathyco/x/commit/9993ab6c31f0b532a9cc12eea2f3fb18dd6fd856)),
|
|
12
|
+
closes [EX-6324](https://searchbroker.atlassian.net/browse/EX-6324)
|
|
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
|
+
|
|
6
19
|
## [3.0.0-alpha.110](https://github.com/empathyco/x/compare/@empathyco/x-components@3.0.0-alpha.109...@empathyco/x-components@3.0.0-alpha.110) (2022-06-16)
|
|
7
20
|
|
|
8
21
|
**Note:** Version bump only for package @empathyco/x-components
|
|
@@ -30,6 +30,7 @@ export interface XComponentAliasAPI
|
|
|
30
30
|
| [recommendations](./x-components.xcomponentaliasapi.recommendations.md) | ReadonlyArray<Result> | The [RecommendationsXModule](./x-components.recommendationsxmodule.md) recommendations. |
|
|
31
31
|
| [redirections](./x-components.xcomponentaliasapi.redirections.md) | ReadonlyArray<Redirection> | The [SearchXModule](./x-components.searchxmodule.md) redirections. |
|
|
32
32
|
| [relatedTags](./x-components.xcomponentaliasapi.relatedtags.md) | ReadonlyArray<RelatedTag> | The [RelatedTagsXModule](./x-components.relatedtagsxmodule.md) related tags (Both selected and deselected). |
|
|
33
|
+
| [results](./x-components.xcomponentaliasapi.results.md) | ReadonlyArray<Result> | The [SearchXModule](./x-components.searchxmodule.md) search results. |
|
|
33
34
|
| [scroll](./x-components.xcomponentaliasapi.scroll.md) | Record<string, [ScrollComponentState](./x-components.scrollcomponentstate.md)<!-- -->> | The [ScrollXModule](./x-components.scrollxmodule.md) data state. |
|
|
34
35
|
| [selectedFilters](./x-components.xcomponentaliasapi.selectedfilters.md) | Filter\[\] | The [FacetsXModule](./x-components.facetsxmodule.md) selected filters. |
|
|
35
36
|
| [selectedRelatedTags](./x-components.xcomponentaliasapi.selectedrelatedtags.md) | ReadonlyArray<RelatedTag> | The [RelatedTagsXModule](./x-components.relatedtagsxmodule.md) selected related tags. |
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [XComponentAliasAPI](./x-components.xcomponentaliasapi.md) > [results](./x-components.xcomponentaliasapi.results.md)
|
|
4
|
+
|
|
5
|
+
## XComponentAliasAPI.results property
|
|
6
|
+
|
|
7
|
+
The [SearchXModule](./x-components.searchxmodule.md) search results.
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
readonly results: ReadonlyArray<Result>;
|
|
13
|
+
```
|
|
@@ -83,6 +83,9 @@ function getAliasAPI(component) {
|
|
|
83
83
|
get relatedTags() {
|
|
84
84
|
return component.$store.getters[getGetterPath('relatedTags', 'relatedTags')] ?? [];
|
|
85
85
|
},
|
|
86
|
+
get results() {
|
|
87
|
+
return component.$store.state.x.search?.results ?? [];
|
|
88
|
+
},
|
|
86
89
|
get scroll() {
|
|
87
90
|
return component.$store.state.x.scroll?.data ?? {};
|
|
88
91
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"x-plugin.alias.js","sources":["../../../src/plugins/x-plugin.alias.ts"],"sourcesContent":["import Vue from 'vue';\nimport { RequestStatus } from '../store/utils/status-store.utils';\nimport {\n XComponentAliasAPI,\n XComponentAliasQueryAPI,\n XComponentAliasStatusAPI\n} from './x-plugin.types';\nimport { getGetterPath } from './x-plugin.utils';\n\n/**\n * Creates an object containing the alias part of {@link XComponentAPI}.\n *\n * @param component - The component with the store from which retrieve the data.\n * @returns An object containing the alias part of the {@link XComponentAPI}.\n *\n * @internal\n */\nexport function getAliasAPI(component: Vue): XComponentAliasAPI {\n const queryModules = [\n 'searchBox',\n 'nextQueries',\n 'querySuggestions',\n 'relatedTags',\n 'search'\n ] as const;\n const statusModules = [\n 'identifierResults',\n 'nextQueries',\n 'popularSearches',\n 'querySuggestions',\n 'recommendations',\n 'relatedTags',\n 'search'\n ] as const;\n\n const query = queryModules.reduce((acc, moduleName) => {\n return Object.defineProperty(acc, moduleName, {\n get(): string {\n return component.$store.state.x[moduleName]?.query ?? '';\n },\n enumerable: true\n });\n }, {} as XComponentAliasQueryAPI);\n const status = statusModules.reduce((acc, moduleName) => {\n return Object.defineProperty(acc, moduleName, {\n get(): RequestStatus | undefined {\n return component.$store.state.x[moduleName]?.status;\n },\n enumerable: true\n });\n }, {} as XComponentAliasStatusAPI);\n\n return {\n query,\n status,\n get device() {\n return component.$store.state.x.device?.name ?? null;\n },\n get facets() {\n return component.$store.getters[getGetterPath('facets', 'facets')] ?? {};\n },\n get historyQueries() {\n return component.$store.getters[getGetterPath('historyQueries', 'historyQueries')] ?? [];\n },\n get identifierResults() {\n return component.$store.state.x.identifierResults?.identifierResults ?? [];\n },\n get isEmpathizeOpen() {\n return component.$store.state.x.empathize?.isOpen ?? false;\n },\n get nextQueries() {\n return component.$store.getters[getGetterPath('nextQueries', 'nextQueries')] ?? [];\n },\n get noResults() {\n return !this.totalResults && !!this.query.search && this.status.search === 'success';\n },\n get partialResults() {\n return component.$store.state.x.search?.partialResults ?? [];\n },\n get popularSearches() {\n return component.$store.state.x.popularSearches?.popularSearches ?? [];\n },\n get querySuggestions() {\n return component.$store.state.x.querySuggestions?.suggestions ?? [];\n },\n get recommendations() {\n return component.$store.state.x.recommendations?.recommendations ?? [];\n },\n get redirections() {\n return component.$store.state.x.search?.redirections ?? [];\n },\n get relatedTags() {\n return component.$store.getters[getGetterPath('relatedTags', 'relatedTags')] ?? [];\n },\n get scroll() {\n return component.$store.state.x.scroll?.data ?? {};\n },\n get selectedFilters() {\n return component.$store.getters[getGetterPath('facets', 'selectedFilters')] ?? [];\n },\n get selectedRelatedTags() {\n return component.$store.state.x.relatedTags?.selectedRelatedTags ?? [];\n },\n get spellcheckedQuery() {\n return component.$store.state.x.search?.spellcheckedQuery ?? null;\n },\n get totalResults() {\n return component.$store.state.x.search?.totalResults ?? 0;\n },\n get selectedSort() {\n return component.$store.state.x.search?.sort ?? '';\n }\n };\n}\n"],"names":[],"mappings":";;AASA;;;;;;;;SAQgB,WAAW,CAAC,SAAc;IACxC,MAAM,YAAY,GAAG;QACnB,WAAW;QACX,aAAa;QACb,kBAAkB;QAClB,aAAa;QACb,QAAQ;KACA,CAAC;IACX,MAAM,aAAa,GAAG;QACpB,mBAAmB;QACnB,aAAa;QACb,iBAAiB;QACjB,kBAAkB;QAClB,iBAAiB;QACjB,aAAa;QACb,QAAQ;KACA,CAAC;IAEX,MAAM,KAAK,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,U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AQ,EAAE,iBAAiB,CAAC,CAAC,IAAI,EAAE,CAAC;SACnF;QACD,IAAI,mBAAmB;YACrB,OAAO,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,WAAW,EAAE,mBAAmB,IAAI,EAAE,CAAC;SACxE;QACD,IAAI,iBAAiB;YACnB,OAAO,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,iBAAiB,IAAI,IAAI,CAAC;SACnE;QACD,IAAI,YAAY;YACd,OAAO,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,YAAY,IAAI,CAAC,CAAC;SAC3D;QACD,IAAI,YAAY;YACd,OAAO,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,IAAI,IAAI,EAAE,CAAC;SACpD;KACF,CAAC;AACJ;;;;"}
|
|
1
|
+
{"version":3,"file":"x-plugin.alias.js","sources":["../../../src/plugins/x-plugin.alias.ts"],"sourcesContent":["import Vue from 'vue';\nimport { RequestStatus } from '../store/utils/status-store.utils';\nimport {\n XComponentAliasAPI,\n XComponentAliasQueryAPI,\n XComponentAliasStatusAPI\n} from './x-plugin.types';\nimport { getGetterPath } from './x-plugin.utils';\n\n/**\n * Creates an object containing the alias part of {@link XComponentAPI}.\n *\n * @param component - The component with the store from which retrieve the data.\n * @returns An object containing the alias part of the {@link XComponentAPI}.\n *\n * @internal\n */\nexport function getAliasAPI(component: Vue): XComponentAliasAPI {\n const queryModules = [\n 'searchBox',\n 'nextQueries',\n 'querySuggestions',\n 'relatedTags',\n 'search'\n ] as const;\n const statusModules = [\n 'identifierResults',\n 'nextQueries',\n 'popularSearches',\n 'querySuggestions',\n 'recommendations',\n 'relatedTags',\n 'search'\n ] as const;\n\n const query = queryModules.reduce((acc, moduleName) => {\n return Object.defineProperty(acc, moduleName, {\n get(): string {\n return component.$store.state.x[moduleName]?.query ?? '';\n },\n enumerable: true\n });\n }, {} as XComponentAliasQueryAPI);\n const status = statusModules.reduce((acc, moduleName) => {\n return Object.defineProperty(acc, moduleName, {\n get(): RequestStatus | undefined {\n return component.$store.state.x[moduleName]?.status;\n },\n enumerable: true\n });\n }, {} as XComponentAliasStatusAPI);\n\n return {\n query,\n status,\n get device() {\n return component.$store.state.x.device?.name ?? null;\n },\n get facets() {\n return component.$store.getters[getGetterPath('facets', 'facets')] ?? {};\n },\n get historyQueries() {\n return component.$store.getters[getGetterPath('historyQueries', 'historyQueries')] ?? [];\n },\n get identifierResults() {\n return component.$store.state.x.identifierResults?.identifierResults ?? [];\n },\n get isEmpathizeOpen() {\n return component.$store.state.x.empathize?.isOpen ?? false;\n },\n get nextQueries() {\n return component.$store.getters[getGetterPath('nextQueries', 'nextQueries')] ?? [];\n },\n get noResults() {\n return !this.totalResults && !!this.query.search && this.status.search === 'success';\n },\n get partialResults() {\n return component.$store.state.x.search?.partialResults ?? [];\n },\n get popularSearches() {\n return component.$store.state.x.popularSearches?.popularSearches ?? [];\n },\n get querySuggestions() {\n return component.$store.state.x.querySuggestions?.suggestions ?? [];\n },\n get recommendations() {\n return component.$store.state.x.recommendations?.recommendations ?? [];\n },\n get redirections() {\n return component.$store.state.x.search?.redirections ?? [];\n },\n get relatedTags() {\n return component.$store.getters[getGetterPath('relatedTags', 'relatedTags')] ?? [];\n },\n get results() {\n return component.$store.state.x.search?.results ?? [];\n },\n get scroll() {\n return component.$store.state.x.scroll?.data ?? {};\n },\n get selectedFilters() {\n return component.$store.getters[getGetterPath('facets', 'selectedFilters')] ?? [];\n },\n get selectedRelatedTags() {\n return component.$store.state.x.relatedTags?.selectedRelatedTags ?? [];\n },\n get spellcheckedQuery() {\n return component.$store.state.x.search?.spellcheckedQuery ?? null;\n },\n get totalResults() {\n return component.$store.state.x.search?.totalResults ?? 0;\n },\n get selectedSort() {\n return component.$store.state.x.search?.sort ?? '';\n }\n };\n}\n"],"names":[],"mappings":";;AASA;;;;;;;;SAQgB,WAAW,CAAC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S,CAAC,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC,IAAI,EAAE,CAAC;SACpF;QACD,IAAI,OAAO;YACT,OAAO,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,IAAI,EAAE,CAAC;SACvD;QACD,IAAI,MAAM;YACR,OAAO,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,IAAI,IAAI,EAAE,CAAC;SACpD;QACD,IAAI,eAAe;YACjB,OAAO,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,QAAQ,EAAE,iBAAiB,CAAC,CAAC,IAAI,EAAE,CAAC;SACnF;QACD,IAAI,mBAAmB;YACrB,OAAO,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,WAAW,EAAE,mBAAmB,IAAI,EAAE,CAAC;SACxE;QACD,IAAI,iBAAiB;YACnB,OAAO,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,iBAAiB,IAAI,IAAI,CAAC;SACnE;QACD,IAAI,YAAY;YACd,OAAO,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,YAAY,IAAI,CAAC,CAAC;SAC3D;QACD,IAAI,YAAY;YACd,OAAO,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,IAAI,IAAI,EAAE,CAAC;SACpD;KACF,CAAC;AACJ;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@empathyco/x-components",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.111",
|
|
4
4
|
"description": "Empathy X Components",
|
|
5
5
|
"author": "Empathy Systems Corporation S.L.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -125,5 +125,5 @@
|
|
|
125
125
|
"access": "public",
|
|
126
126
|
"directory": "dist"
|
|
127
127
|
},
|
|
128
|
-
"gitHead": "
|
|
128
|
+
"gitHead": "03d13b16c549448e716a46bddce184cac25c713e"
|
|
129
129
|
}
|
|
@@ -50938,6 +50938,46 @@
|
|
|
50938
50938
|
"endIndex": 5
|
|
50939
50939
|
}
|
|
50940
50940
|
},
|
|
50941
|
+
{
|
|
50942
|
+
"kind": "PropertySignature",
|
|
50943
|
+
"canonicalReference": "@empathyco/x-components!XComponentAliasAPI#results:member",
|
|
50944
|
+
"docComment": "/**\n * The {@link SearchXModule} search results.\n */\n",
|
|
50945
|
+
"excerptTokens": [
|
|
50946
|
+
{
|
|
50947
|
+
"kind": "Content",
|
|
50948
|
+
"text": "readonly results: "
|
|
50949
|
+
},
|
|
50950
|
+
{
|
|
50951
|
+
"kind": "Reference",
|
|
50952
|
+
"text": "ReadonlyArray",
|
|
50953
|
+
"canonicalReference": "!ReadonlyArray:interface"
|
|
50954
|
+
},
|
|
50955
|
+
{
|
|
50956
|
+
"kind": "Content",
|
|
50957
|
+
"text": "<"
|
|
50958
|
+
},
|
|
50959
|
+
{
|
|
50960
|
+
"kind": "Reference",
|
|
50961
|
+
"text": "Result",
|
|
50962
|
+
"canonicalReference": "@empathyco/x-components!Result:interface"
|
|
50963
|
+
},
|
|
50964
|
+
{
|
|
50965
|
+
"kind": "Content",
|
|
50966
|
+
"text": ">"
|
|
50967
|
+
},
|
|
50968
|
+
{
|
|
50969
|
+
"kind": "Content",
|
|
50970
|
+
"text": ";"
|
|
50971
|
+
}
|
|
50972
|
+
],
|
|
50973
|
+
"isOptional": false,
|
|
50974
|
+
"releaseTag": "Public",
|
|
50975
|
+
"name": "results",
|
|
50976
|
+
"propertyTypeTokenRange": {
|
|
50977
|
+
"startIndex": 1,
|
|
50978
|
+
"endIndex": 5
|
|
50979
|
+
}
|
|
50980
|
+
},
|
|
50941
50981
|
{
|
|
50942
50982
|
"kind": "PropertySignature",
|
|
50943
50983
|
"canonicalReference": "@empathyco/x-components!XComponentAliasAPI#scroll:member",
|
|
@@ -4743,6 +4743,7 @@ export interface XComponentAliasAPI {
|
|
|
4743
4743
|
readonly recommendations: ReadonlyArray<Result>;
|
|
4744
4744
|
readonly redirections: ReadonlyArray<Redirection_2>;
|
|
4745
4745
|
readonly relatedTags: ReadonlyArray<RelatedTag_2>;
|
|
4746
|
+
readonly results: ReadonlyArray<Result>;
|
|
4746
4747
|
readonly scroll: Record<string, ScrollComponentState>;
|
|
4747
4748
|
readonly selectedFilters: Filter[];
|
|
4748
4749
|
readonly selectedRelatedTags: ReadonlyArray<RelatedTag_2>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"x-plugin.alias.d.ts","sourceRoot":"","sources":["../../../src/plugins/x-plugin.alias.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AAEtB,OAAO,EACL,kBAAkB,EAGnB,MAAM,kBAAkB,CAAC;AAG1B;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAAE,GAAG,GAAG,kBAAkB,
|
|
1
|
+
{"version":3,"file":"x-plugin.alias.d.ts","sourceRoot":"","sources":["../../../src/plugins/x-plugin.alias.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AAEtB,OAAO,EACL,kBAAkB,EAGnB,MAAM,kBAAkB,CAAC;AAG1B;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAAE,GAAG,GAAG,kBAAkB,CAmG9D"}
|
|
@@ -22,15 +22,19 @@ import { XBus } from './x-bus.types';
|
|
|
22
22
|
export interface XPluginOptions {
|
|
23
23
|
/** The adapter transforms the request for the the search and tagging APIs and its responses. */
|
|
24
24
|
adapter: SearchAdapter;
|
|
25
|
-
/**
|
|
26
|
-
*
|
|
25
|
+
/**
|
|
26
|
+
* A Vuex store to install the X module. If not passed a new one will be created and injected
|
|
27
|
+
* into every component.
|
|
28
|
+
*/
|
|
27
29
|
store?: Store<any>;
|
|
28
30
|
/** A {@link XModule | XModules} to be registered during the {@link XPlugin} installation. */
|
|
29
31
|
initialXModules?: AnyXModule[];
|
|
30
32
|
/** Override the {@link XModule | XModules} config state and its wiring. */
|
|
31
33
|
xModules?: XModulesOptions;
|
|
32
|
-
/**
|
|
33
|
-
*
|
|
34
|
+
/**
|
|
35
|
+
* Override the {@link XModule | XModules} store module and store emitters. It must be used
|
|
36
|
+
* only in exceptional cases.
|
|
37
|
+
*/
|
|
34
38
|
__PRIVATE__xModules?: PrivateXModulesOptions;
|
|
35
39
|
}
|
|
36
40
|
/**
|
|
@@ -95,6 +99,8 @@ export interface XComponentAliasAPI {
|
|
|
95
99
|
readonly redirections: ReadonlyArray<Redirection>;
|
|
96
100
|
/** The {@link RelatedTagsXModule} related tags (Both selected and deselected). */
|
|
97
101
|
readonly relatedTags: ReadonlyArray<RelatedTag>;
|
|
102
|
+
/** The {@link SearchXModule} search results. */
|
|
103
|
+
readonly results: ReadonlyArray<Result>;
|
|
98
104
|
/** The {@link ScrollXModule} data state. */
|
|
99
105
|
readonly scroll: Record<string, ScrollComponentState>;
|
|
100
106
|
/** The {@link FacetsXModule} selected filters. */
|
|
@@ -187,8 +193,10 @@ export declare type PrivateXModulesOptions = {
|
|
|
187
193
|
* @public
|
|
188
194
|
*/
|
|
189
195
|
export interface PrivateXModuleOptions<Module extends AnyXModule> {
|
|
190
|
-
/**
|
|
191
|
-
*
|
|
196
|
+
/**
|
|
197
|
+
* The options to override events that will be emitted when a the getters value or the state
|
|
198
|
+
* of the store changes.
|
|
199
|
+
*/
|
|
192
200
|
storeEmitters?: Partial<StoreEmitters<Module['storeModule']>>;
|
|
193
201
|
/** The options to override the default store module configuration. */
|
|
194
202
|
storeModule?: XStoreModuleOptions<Module['storeModule']>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"x-plugin.types.d.ts","sourceRoot":"","sources":["../../../src/plugins/x-plugin.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EACL,KAAK,EACL,MAAM,EACN,YAAY,EACZ,SAAS,EACT,aAAa,EACb,WAAW,EACX,UAAU,EACV,MAAM,EACN,UAAU,EACX,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACnG,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAErC;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,gGAAgG;IAChG,OAAO,EAAE,aAAa,CAAC;IACvB
|
|
1
|
+
{"version":3,"file":"x-plugin.types.d.ts","sourceRoot":"","sources":["../../../src/plugins/x-plugin.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACr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