@empathyco/x-components 3.0.0-alpha.412 → 3.0.0-alpha.413
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 +10 -0
- package/design-system/deprecated-full-theme.css +19 -19
- package/docs/API-reference/api/x-components.querypreviewinfo.filters.md +13 -0
- package/docs/API-reference/api/x-components.querypreviewinfo.md +1 -0
- package/js/__stubs__/filters-stubs.factory.js +24 -0
- package/js/__stubs__/filters-stubs.factory.js.map +1 -0
- package/js/x-modules/queries-preview/components/query-preview-button.vue.js.map +1 -1
- package/js/x-modules/queries-preview/components/query-preview-button.vue_rollup-plugin-vue_script.vue.js +2 -1
- package/js/x-modules/queries-preview/components/query-preview-button.vue_rollup-plugin-vue_script.vue.js.map +1 -1
- package/js/x-modules/queries-preview/components/query-preview.vue.js.map +1 -1
- package/js/x-modules/queries-preview/components/query-preview.vue_rollup-plugin-vue_script.vue.js +13 -1
- package/js/x-modules/queries-preview/components/query-preview.vue_rollup-plugin-vue_script.vue.js.map +1 -1
- package/js/x-modules/queries-preview/store/module.js +2 -1
- package/js/x-modules/queries-preview/store/module.js.map +1 -1
- package/package.json +2 -2
- package/report/x-components.api.json +27 -0
- package/report/x-components.api.md +1 -0
- package/types/__stubs__/banners-stubs.factory.d.ts +20 -0
- package/types/__stubs__/banners-stubs.factory.d.ts.map +1 -0
- package/types/__stubs__/empty-search-response-stubs.factory.d.ts +10 -0
- package/types/__stubs__/empty-search-response-stubs.factory.d.ts.map +1 -0
- package/types/__stubs__/facets-stubs.factory.d.ts +85 -0
- package/types/__stubs__/facets-stubs.factory.d.ts.map +1 -0
- package/types/__stubs__/filters-stubs.factory.d.ts +92 -0
- package/types/__stubs__/filters-stubs.factory.d.ts.map +1 -0
- package/types/__stubs__/history-queries-stubs.factory.d.ts +21 -0
- package/types/__stubs__/history-queries-stubs.factory.d.ts.map +1 -0
- package/types/__stubs__/index.d.ts +18 -0
- package/types/__stubs__/index.d.ts.map +1 -0
- package/types/__stubs__/next-queries-stubs.factory.d.ts +19 -0
- package/types/__stubs__/next-queries-stubs.factory.d.ts.map +1 -0
- package/types/__stubs__/partials-results-stubs.factory.d.ts +8 -0
- package/types/__stubs__/partials-results-stubs.factory.d.ts.map +1 -0
- package/types/__stubs__/popular-searches-stubs.factory.d.ts +19 -0
- package/types/__stubs__/popular-searches-stubs.factory.d.ts.map +1 -0
- package/types/__stubs__/promoteds-stubs.factory.d.ts +21 -0
- package/types/__stubs__/promoteds-stubs.factory.d.ts.map +1 -0
- package/types/__stubs__/queries-preview-stubs.factory.d.ts +22 -0
- package/types/__stubs__/queries-preview-stubs.factory.d.ts.map +1 -0
- package/types/__stubs__/query-suggestions-stubs.factory.d.ts +20 -0
- package/types/__stubs__/query-suggestions-stubs.factory.d.ts.map +1 -0
- package/types/__stubs__/redirections-stubs.factory.d.ts +20 -0
- package/types/__stubs__/redirections-stubs.factory.d.ts.map +1 -0
- package/types/__stubs__/related-tags-stubs.factory.d.ts +22 -0
- package/types/__stubs__/related-tags-stubs.factory.d.ts.map +1 -0
- package/types/__stubs__/results-stubs.factory.d.ts +22 -0
- package/types/__stubs__/results-stubs.factory.d.ts.map +1 -0
- package/types/__stubs__/search-response-stubs.factory.d.ts +10 -0
- package/types/__stubs__/search-response-stubs.factory.d.ts.map +1 -0
- package/types/__stubs__/semantic-queries-stubs.factory.d.ts +17 -0
- package/types/__stubs__/semantic-queries-stubs.factory.d.ts.map +1 -0
- package/types/__stubs__/tagging-response-stubs.factory.d.ts +10 -0
- package/types/__stubs__/tagging-response-stubs.factory.d.ts.map +1 -0
- package/types/x-modules/queries-preview/components/query-preview-button.vue.d.ts.map +1 -1
- package/types/x-modules/queries-preview/components/query-preview.vue.d.ts +1 -1
- package/types/x-modules/queries-preview/components/query-preview.vue.d.ts.map +1 -1
- package/types/x-modules/queries-preview/store/module.d.ts.map +1 -1
- package/types/x-modules/queries-preview/store/types.d.ts +2 -0
- package/types/x-modules/queries-preview/store/types.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [3.0.0-alpha.413](https://github.com/empathyco/x/compare/@empathyco/x-components@3.0.0-alpha.412...@empathyco/x-components@3.0.0-alpha.413) (2023-09-20)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* add filters to the query preview request (#1292) ([7f20022](https://github.com/empathyco/x/commit/7f20022eee593460681bfb1c4d574162f325cc05))
|
|
12
|
+
* **query-preview:** use deep equal to compare request (#1291) ([cf3c3e7](https://github.com/empathyco/x/commit/cf3c3e7c738d8b2281183c42f00048b3bff918ea))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
6
16
|
## [3.0.0-alpha.412](https://github.com/empathyco/x/compare/@empathyco/x-components@3.0.0-alpha.411...@empathyco/x-components@3.0.0-alpha.412) (2023-09-18)
|
|
7
17
|
|
|
8
18
|
**Note:** Version bump only for package @empathyco/x-components
|
|
@@ -3550,6 +3550,9 @@
|
|
|
3550
3550
|
overflow: hidden;
|
|
3551
3551
|
white-space: nowrap;
|
|
3552
3552
|
}
|
|
3553
|
+
:root {
|
|
3554
|
+
--x-color-text-accent: var(--x-color-base-accent);
|
|
3555
|
+
}
|
|
3553
3556
|
.x-text--bold.x-text {
|
|
3554
3557
|
--x-number-font-weight-text: var(--x-number-font-weight-base-bold);
|
|
3555
3558
|
}
|
|
@@ -3565,9 +3568,6 @@
|
|
|
3565
3568
|
.x-text--bold.x-small {
|
|
3566
3569
|
--x-number-font-weight-small: var(--x-number-font-weight-base-bold);
|
|
3567
3570
|
}
|
|
3568
|
-
:root {
|
|
3569
|
-
--x-color-text-accent: var(--x-color-base-accent);
|
|
3570
|
-
}
|
|
3571
3571
|
.x-text--accent {
|
|
3572
3572
|
--x-color-text-default: var(--x-color-text-accent);
|
|
3573
3573
|
}
|
|
@@ -3578,13 +3578,6 @@
|
|
|
3578
3578
|
--x-size-border-radius-bottom-right-tag-pill: var(--x-size-border-radius-tag-pill);
|
|
3579
3579
|
--x-size-border-radius-bottom-left-tag-pill: var(--x-size-border-radius-tag-pill);
|
|
3580
3580
|
}
|
|
3581
|
-
:root {
|
|
3582
|
-
--x-size-border-radius-tag-pill: var(--x-size-border-radius-base-pill);
|
|
3583
|
-
--x-size-border-radius-top-left-tag-pill: var(--x-size-border-radius-tag-pill);
|
|
3584
|
-
--x-size-border-radius-top-right-tag-pill: var(--x-size-border-radius-tag-pill);
|
|
3585
|
-
--x-size-border-radius-bottom-right-tag-pill: var(--x-size-border-radius-tag-pill);
|
|
3586
|
-
--x-size-border-radius-bottom-left-tag-pill: var(--x-size-border-radius-tag-pill);
|
|
3587
|
-
}
|
|
3588
3581
|
|
|
3589
3582
|
.x-tag--pill.x-tag,
|
|
3590
3583
|
.x-tag--pill .x-tag {
|
|
@@ -3596,6 +3589,13 @@
|
|
|
3596
3589
|
);
|
|
3597
3590
|
--x-size-border-radius-bottom-left-tag-default: var(--x-size-border-radius-bottom-left-tag-pill);
|
|
3598
3591
|
}
|
|
3592
|
+
:root {
|
|
3593
|
+
--x-size-border-radius-tag-pill: var(--x-size-border-radius-base-pill);
|
|
3594
|
+
--x-size-border-radius-top-left-tag-pill: var(--x-size-border-radius-tag-pill);
|
|
3595
|
+
--x-size-border-radius-top-right-tag-pill: var(--x-size-border-radius-tag-pill);
|
|
3596
|
+
--x-size-border-radius-bottom-right-tag-pill: var(--x-size-border-radius-tag-pill);
|
|
3597
|
+
--x-size-border-radius-bottom-left-tag-pill: var(--x-size-border-radius-tag-pill);
|
|
3598
|
+
}
|
|
3599
3599
|
:root {
|
|
3600
3600
|
--x-color-background-tag-ghost: transparent;
|
|
3601
3601
|
--x-color-border-tag-ghost: transparent;
|
|
@@ -5560,15 +5560,6 @@
|
|
|
5560
5560
|
--x-modal-overlay-color: rgb(0, 0, 0);
|
|
5561
5561
|
--x-modal-overlay-opacity: 0.7;
|
|
5562
5562
|
}
|
|
5563
|
-
:root {
|
|
5564
|
-
--x-modal-overlay-color: rgb(0, 0, 0);
|
|
5565
|
-
--x-modal-overlay-opacity: 0.7;
|
|
5566
|
-
}
|
|
5567
|
-
|
|
5568
|
-
.x-modal__overlay {
|
|
5569
|
-
background-color: var(--x-modal-overlay-color) !important;
|
|
5570
|
-
opacity: var(--x-modal-overlay-opacity) !important;
|
|
5571
|
-
}
|
|
5572
5563
|
:root {
|
|
5573
5564
|
--x-string-justify-message-default: center;
|
|
5574
5565
|
--x-size-gap-message-default: var(--x-size-base-03);
|
|
@@ -5661,6 +5652,15 @@
|
|
|
5661
5652
|
.x-message > p {
|
|
5662
5653
|
margin: 0;
|
|
5663
5654
|
}
|
|
5655
|
+
:root {
|
|
5656
|
+
--x-modal-overlay-color: rgb(0, 0, 0);
|
|
5657
|
+
--x-modal-overlay-opacity: 0.7;
|
|
5658
|
+
}
|
|
5659
|
+
|
|
5660
|
+
.x-modal__overlay {
|
|
5661
|
+
background-color: var(--x-modal-overlay-color) !important;
|
|
5662
|
+
opacity: var(--x-modal-overlay-opacity) !important;
|
|
5663
|
+
}
|
|
5664
5664
|
/* @deprecated */
|
|
5665
5665
|
:root {
|
|
5666
5666
|
--x-size-padding-list-01: var(--x-size-base-01);
|
|
@@ -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) > [QueryPreviewInfo](./x-components.querypreviewinfo.md) > [filters](./x-components.querypreviewinfo.filters.md)
|
|
4
|
+
|
|
5
|
+
## QueryPreviewInfo.filters property
|
|
6
|
+
|
|
7
|
+
The filters to perform the search.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
filters?: string[];
|
|
13
|
+
```
|
|
@@ -17,6 +17,7 @@ export interface QueryPreviewInfo
|
|
|
17
17
|
| Property | Modifiers | Type | Description |
|
|
18
18
|
| --- | --- | --- | --- |
|
|
19
19
|
| [extraParams?](./x-components.querypreviewinfo.extraparams.md) | | Dictionary<unknown> | _(Optional)_ The extra params to perform the search. |
|
|
20
|
+
| [filters?](./x-components.querypreviewinfo.filters.md) | | string\[\] | _(Optional)_ The filters to perform the search. |
|
|
20
21
|
| [query](./x-components.querypreviewinfo.query.md) | | string | The query to search for. |
|
|
21
22
|
| [title?](./x-components.querypreviewinfo.title.md) | | string | _(Optional)_ An optional title for the container. |
|
|
22
23
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a {@link @empathyco/x-types#SimpleFilter | SimpleFilter} stub.
|
|
3
|
+
*
|
|
4
|
+
* @param filter - A partial filter to override certain properties. Useful for testing.
|
|
5
|
+
* @returns A Simple filter.
|
|
6
|
+
*
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Creates a {@link @empathyco/x-types#RawFilter | RawFilter}.
|
|
11
|
+
*
|
|
12
|
+
* @param id - The identifier of the raw filter.
|
|
13
|
+
* @returns A {@link @empathyco/x-types#RawFilter | RawFilter} stub.
|
|
14
|
+
*/
|
|
15
|
+
function createRawFilter(id) {
|
|
16
|
+
return {
|
|
17
|
+
id,
|
|
18
|
+
modelName: 'RawFilter',
|
|
19
|
+
selected: true
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export { createRawFilter };
|
|
24
|
+
//# sourceMappingURL=filters-stubs.factory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filters-stubs.factory.js","sources":["../../../src/__stubs__/filters-stubs.factory.ts"],"sourcesContent":["import {\n EditableNumberRangeFilter,\n HierarchicalFilter,\n NumberRangeFilter,\n RangeValue,\n SimpleFilter,\n RawFilter\n} from '@empathyco/x-types';\n\n/**\n * Creates a {@link @empathyco/x-types#SimpleFilter | SimpleFilter} stub.\n *\n * @param filter - A partial filter to override certain properties. Useful for testing.\n * @returns A Simple filter.\n *\n * @internal\n */\nexport function getSimpleFilterStub(filter: Partial<SimpleFilter> = {}): SimpleFilter {\n return Object.assign<SimpleFilter, Partial<SimpleFilter>>(\n {\n facetId: 'category',\n id: 'category:test',\n modelName: 'SimpleFilter',\n selected: false,\n label: 'Test',\n totalResults: 10\n },\n filter\n );\n}\n\n/**\n * Creates a {@link @empathyco/x-types#NumberRangeFilter | NumberRangeFilter} stub.\n *\n * @param filter - A partial filter to override certain properties. Useful for testing.\n * @returns A Number range filter.\n *\n * @internal\n */\nexport function getNumberRangeFilterStub(\n filter: Partial<NumberRangeFilter> = {}\n): NumberRangeFilter {\n return Object.assign<NumberRangeFilter, Partial<NumberRangeFilter>>(\n {\n facetId: 'price_facet',\n id: 'price_facet:0 TO 10',\n modelName: 'NumberRangeFilter',\n selected: false,\n label: 'Test',\n range: {\n min: 1,\n max: 10\n },\n totalResults: 10\n },\n filter\n );\n}\n\n/**\n * Creates a {@link @empathyco/x-types#HierarchicalFilter | HierarchicalFilter} stub.\n *\n * @param filter - A partial filter to override certain properties. Useful for testing.\n * @returns A Hierarchical filter.\n *\n * @internal\n */\nexport function getHierarchicalFilterStub(\n filter: Partial<HierarchicalFilter> = {}\n): HierarchicalFilter {\n return Object.assign<HierarchicalFilter, Partial<HierarchicalFilter>>(\n {\n facetId: 'category',\n id: 'category:test',\n modelName: 'HierarchicalFilter',\n parentId: null,\n selected: false,\n label: 'Test',\n totalResults: 10,\n children: []\n },\n filter\n );\n}\n\n/**\n * Creates a {@link @empathyco/x-types#RawFilter | RawFilter}.\n *\n * @param id - The identifier of the raw filter.\n * @returns A {@link @empathyco/x-types#RawFilter | RawFilter} stub.\n */\nexport function createRawFilter(id: string): RawFilter {\n return {\n id,\n modelName: 'RawFilter',\n selected: true\n };\n}\n\n/**\n * Creates a {@link @empathyco/x-types#SimpleFilter | SimpleFilter}.\n *\n * @param facetId - The facet id this filter belongs to.\n * @param label - The text that this filter should display.\n * @param selected - True when the filter is checked, false otherwise.\n * @param totalResults - Number of results matching the filter.\n * @returns A stub for a {@link @empathyco/x-types#SimpleFilter | SimpleFilter}.\n */\nexport function createSimpleFilter(\n facetId: string,\n label: string,\n selected = false,\n totalResults = 10\n): SimpleFilter {\n return {\n id: `${facetId}:${label}`,\n modelName: 'SimpleFilter',\n facetId,\n label,\n selected,\n totalResults\n };\n}\n\n/**\n * Creates a {@link @empathyco/x-types#HierarchicalFilter | HierarchicalFilter}.\n *\n * @param facetId - The facet id this filter belongs to.\n * @param label - The text that this filter should display.\n * @param selected - True when the filter is checked, false otherwise.\n * @param children - A list of ids of child filters.\n * @returns A stub for a {@link @empathyco/x-types#HierarchicalFilter | HierarchicalFilter}.\n */\nexport function createHierarchicalFilter(\n facetId: string,\n label: string,\n selected = false,\n children: HierarchicalFilter[] = []\n): HierarchicalFilter {\n return {\n facetId,\n selected,\n label,\n id: `${facetId}:${label}`,\n modelName: 'HierarchicalFilter',\n parentId: null,\n totalResults: 10,\n children\n };\n}\n\n/**\n * Creates a {@link @empathyco/x-types#NumberRangeFilter | NumberRangeFilter}.\n *\n * @param facetId - The facet id this filter belongs to.\n * @param range - The range that this filter has.\n * @param selected - True if the filter is selected, false otherwise.\n * @returns A stub for a\n * {@link @empathyco/x-types#NumberRangeFilter | NumberRangeFilter}.\n */\nexport function createNumberRangeFilter(\n facetId: string,\n range: RangeValue = { min: null, max: null },\n selected = false\n): NumberRangeFilter {\n return {\n id: `${facetId}:${range.min ?? '*'}-${range.max ?? '*'}`,\n modelName: 'NumberRangeFilter',\n label: `From ${String(range.min)} to ${String(range.max)}`,\n facetId,\n range,\n selected\n };\n}\n\n/**\n * Creates a {@link @empathyco/x-types#EditableNumberRangeFilter | EditableNumberRangeFilter}.\n *\n * @param facetId - The facet id this filter belongs to.\n * @param range - The range that this filter has.\n * @param selected - The selected value which has priority over the range values.\n * @returns A stub for a\n * {@link @empathyco/x-types#EditableNumberRangeFilter | EditableNumberRangeFilter}.\n */\nexport function createEditableNumberRangeFilter(\n facetId: string,\n range: RangeValue = { min: null, max: null },\n selected?: boolean\n): EditableNumberRangeFilter {\n return {\n id: `${facetId}:${range.min ?? '*'}-${range.max ?? '*'}`,\n facetId,\n range,\n modelName: 'EditableNumberRangeFilter',\n selected: selected ?? (range.min !== null || range.max !== null)\n };\n}\n\n/**\n * Type of a function that creates\n * {@link @empathyco/x-types#HierarchicalFilter | HierarchicalFilter}s. Based on its label,\n * selected value and children.\n */\nexport type CreateHierarchicalFilter = (\n label: string,\n selected?: boolean,\n createChildren?: (createChildren: CreateHierarchicalFilter) => HierarchicalFilter[]\n) => HierarchicalFilter;\n\n/**\n * Creates a factory of\n * {@link @empathyco/x-types#HierarchicalFilter | HierarchicalFilter}s.\n *\n * @remarks the id is created with `<facetId>:<label>`.\n * @param facetId - Facet id to which the filter belongs.\n * @param parentId - Filter's parent id if exists.\n * @returns A scoped function which is able to create `HierarchicalFilters`.\n */\nexport function createHierarchicalFilterFactory(\n facetId: string,\n parentId: HierarchicalFilter['id'] | null = null\n): CreateHierarchicalFilter {\n return (label, selected, createChildren): HierarchicalFilter => {\n const filter = createHierarchicalFilter(facetId, label, selected);\n filter.children = createChildren\n ? createChildren(createHierarchicalFilterFactory(facetId, filter.id))\n : [];\n filter.parentId = parentId;\n return filter;\n };\n}\n"],"names":[],"mappings":"AASA;;;;;;;AAOG;AAqEH;;;;;AAKG;AACG,SAAU,eAAe,CAAC,EAAU,EAAA;IACxC,OAAO;QACL,EAAE;AACF,QAAA,SAAS,EAAE,WAAW;AACtB,QAAA,QAAQ,EAAE,IAAI;KACf,CAAC;AACJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-preview-button.vue.js","sources":["../../../../../src/x-modules/queries-preview/components/query-preview-button.vue"],"sourcesContent":["<template>\n <BaseEventButton\n v-on=\"$listeners\"\n :events=\"events\"\n class=\"x-query-preview-button x-button\"\n data-test=\"query-preview-button\"\n >\n <!-- @slot Button content with a text, an icon or both -->\n <slot :queryPreviewInfo=\"fullQueryPreviewInfo\">\n {{ queryPreviewInfo.query }}\n </slot>\n </BaseEventButton>\n</template>\n\n<script lang=\"ts\">\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import { Dictionary } from '@empathyco/x-utils';\n import { State } from '../../../components/decorators/store.decorators';\n import { QueryPreviewInfo } from '../store/types';\n import { XEventsTypes } from '../../../wiring/events.types';\n import { BaseEventButton, xComponentMixin } from '../../../components';\n import { queriesPreviewXModule } from '../x-module';\n\n /**\n * Component containing an event button that emits\n * {@link QueriesPreviewXEvents.UserAcceptedAQueryPreview} when clicked with\n * the full query preview info as payload.\n *\n * It has a default slot to customize its contents.\n *\n * @public\n */\n @Component({\n components: { BaseEventButton },\n mixins: [xComponentMixin(queriesPreviewXModule)]\n })\n export default class QueryPreviewButton extends Vue {\n /**\n * The information about the request of the query preview.\n *\n * @public\n */\n @Prop({ required: true })\n protected queryPreviewInfo!: QueryPreviewInfo;\n\n /**\n * We use the module extra params to combine them with the query preview's extra params.\n */\n @State('queriesPreview', 'params')\n public params!: Dictionary<unknown>;\n\n /**\n * The provided query preview with the base extra params from the module merged in.\n *\n * @returns The query preview info with the base extra params merged in.\n * @public\n */\n protected get fullQueryPreviewInfo(): QueryPreviewInfo {\n return {\n ...this.queryPreviewInfo,\n extraParams: {\n ...this.params,\n ...this.queryPreviewInfo.extraParams\n }\n };\n }\n\n /**\n * List of events to emit by the BaseEventButton.\n *\n * @returns An object with the event and payload.\n *\n * @internal\n */\n protected get events(): Partial<XEventsTypes> {\n return { UserAcceptedAQueryPreview: this.fullQueryPreviewInfo };\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n## Examples\n\n### Basic example\n\nThe component content has the query preview query as default\n\n```vue\n<template>\n <div>\n <QueryPreviewButton queryPreviewInfo=\"queryPreviewInfo\" />\n </div>\n</template>\n\n<script>\n import { QueryPreviewButton } from '@empathyco/x-components/queries-preview';\n\n export default {\n components: {\n QueryPreviewButton\n },\n data: function () {\n return {\n queryPreviewInfo: {\n query: 'shoes'\n }\n };\n }\n };\n</script>\n```\n\n### Customizing slots\n\nThe content of the button is customizable via its default slot\n\n```vue\n<template>\n <div>\n <QueryPreviewButton queryPreviewInfo=\"queryPreviewInfo\">\n {{ `Search for: ${queryPreviewInfo.query}` }}\n </QueryPreviewButton>\n </div>\n</template>\n\n<script>\n import { QueryPreviewButton } from '@empathyco/x-components/queries-preview';\n\n export default {\n components: {\n QueryPreviewButton\n },\n data: function () {\n return {\n queryPreviewInfo: {\n query: 'shoes'\n }\n };\n }\n };\n</script>\n```\n\n## Events\n\nA list of events that the component will emit:\n\n- `UserAcceptedAQueryPreview`: the event is emitted after the user clicks the button. The event\n payload is the `QueryPreviewInfo` of the query.\n</docs>\n"],"names":[],"mappings":";;;;AAEA,MAAc,cAAA,GAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"query-preview-button.vue.js","sources":["../../../../../src/x-modules/queries-preview/components/query-preview-button.vue"],"sourcesContent":["<template>\n <BaseEventButton\n v-on=\"$listeners\"\n :events=\"events\"\n class=\"x-query-preview-button x-button\"\n data-test=\"query-preview-button\"\n >\n <!-- @slot Button content with a text, an icon or both -->\n <slot :queryPreviewInfo=\"fullQueryPreviewInfo\">\n {{ queryPreviewInfo.query }}\n </slot>\n </BaseEventButton>\n</template>\n\n<script lang=\"ts\">\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import { Dictionary } from '@empathyco/x-utils';\n import { State } from '../../../components/decorators/store.decorators';\n import { QueryPreviewInfo } from '../store/types';\n import { XEventsTypes } from '../../../wiring/events.types';\n import { BaseEventButton, xComponentMixin } from '../../../components';\n import { queriesPreviewXModule } from '../x-module';\n\n /**\n * Component containing an event button that emits\n * {@link QueriesPreviewXEvents.UserAcceptedAQueryPreview} when clicked with\n * the full query preview info as payload.\n *\n * It has a default slot to customize its contents.\n *\n * @public\n */\n @Component({\n components: { BaseEventButton },\n mixins: [xComponentMixin(queriesPreviewXModule)]\n })\n export default class QueryPreviewButton extends Vue {\n /**\n * The information about the request of the query preview.\n *\n * @public\n */\n @Prop({ required: true })\n protected queryPreviewInfo!: QueryPreviewInfo;\n\n /**\n * We use the module extra params to combine them with the query preview's extra params.\n */\n @State('queriesPreview', 'params')\n public params!: Dictionary<unknown>;\n\n /**\n * The provided query preview with the base extra params from the module merged in.\n *\n * @returns The query preview info with the base extra params merged in.\n * @public\n */\n protected get fullQueryPreviewInfo(): QueryPreviewInfo {\n return {\n ...this.queryPreviewInfo,\n extraParams: {\n ...this.params,\n ...this.queryPreviewInfo.extraParams\n },\n filters: this.queryPreviewInfo.filters\n };\n }\n\n /**\n * List of events to emit by the BaseEventButton.\n *\n * @returns An object with the event and payload.\n *\n * @internal\n */\n protected get events(): Partial<XEventsTypes> {\n return { UserAcceptedAQueryPreview: this.fullQueryPreviewInfo };\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n## Examples\n\n### Basic example\n\nThe component content has the query preview query as default\n\n```vue\n<template>\n <div>\n <QueryPreviewButton queryPreviewInfo=\"queryPreviewInfo\" />\n </div>\n</template>\n\n<script>\n import { QueryPreviewButton } from '@empathyco/x-components/queries-preview';\n\n export default {\n components: {\n QueryPreviewButton\n },\n data: function () {\n return {\n queryPreviewInfo: {\n query: 'shoes'\n }\n };\n }\n };\n</script>\n```\n\n### Customizing slots\n\nThe content of the button is customizable via its default slot\n\n```vue\n<template>\n <div>\n <QueryPreviewButton queryPreviewInfo=\"queryPreviewInfo\">\n {{ `Search for: ${queryPreviewInfo.query}` }}\n </QueryPreviewButton>\n </div>\n</template>\n\n<script>\n import { QueryPreviewButton } from '@empathyco/x-components/queries-preview';\n\n export default {\n components: {\n QueryPreviewButton\n },\n data: function () {\n return {\n queryPreviewInfo: {\n query: 'shoes'\n }\n };\n }\n };\n</script>\n```\n\n## Events\n\nA list of events that the component will emit:\n\n- `UserAcceptedAQueryPreview`: the event is emitted after the user clicks the button. The event\n payload is the `QueryPreviewInfo` of the query.\n</docs>\n"],"names":[],"mappings":";;;;AAEA,MAAc,cAAA,GAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-preview-button.vue_rollup-plugin-vue_script.vue.js","sources":["../../../../../src/x-modules/queries-preview/components/query-preview-button.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import { Dictionary } from '@empathyco/x-utils';\n import { State } from '../../../components/decorators/store.decorators';\n import { QueryPreviewInfo } from '../store/types';\n import { XEventsTypes } from '../../../wiring/events.types';\n import { BaseEventButton, xComponentMixin } from '../../../components';\n import { queriesPreviewXModule } from '../x-module';\n\n /**\n * Component containing an event button that emits\n * {@link QueriesPreviewXEvents.UserAcceptedAQueryPreview} when clicked with\n * the full query preview info as payload.\n *\n * It has a default slot to customize its contents.\n *\n * @public\n */\n @Component({\n components: { BaseEventButton },\n mixins: [xComponentMixin(queriesPreviewXModule)]\n })\n export default class QueryPreviewButton extends Vue {\n /**\n * The information about the request of the query preview.\n *\n * @public\n */\n @Prop({ required: true })\n protected queryPreviewInfo!: QueryPreviewInfo;\n\n /**\n * We use the module extra params to combine them with the query preview's extra params.\n */\n @State('queriesPreview', 'params')\n public params!: Dictionary<unknown>;\n\n /**\n * The provided query preview with the base extra params from the module merged in.\n *\n * @returns The query preview info with the base extra params merged in.\n * @public\n */\n protected get fullQueryPreviewInfo(): QueryPreviewInfo {\n return {\n ...this.queryPreviewInfo,\n extraParams: {\n ...this.params,\n ...this.queryPreviewInfo.extraParams\n }\n };\n }\n\n /**\n * List of events to emit by the BaseEventButton.\n *\n * @returns An object with the event and payload.\n *\n * @internal\n */\n protected get events(): Partial<XEventsTypes> {\n return { UserAcceptedAQueryPreview: this.fullQueryPreviewInfo };\n }\n }\n"],"names":["BaseEventButton"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBE;;;;;;;;AAQG;AAKY,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,GAAG,CAAA;AAejD;;;;;AAKG;AACH,IAAA,IAAc,oBAAoB,GAAA;QAChC,OAAO;YACL,GAAG,IAAI,CAAC,gBAAgB;AACxB,YAAA,WAAW,EAAE;gBACX,GAAG,IAAI,CAAC,MAAM;AACd,gBAAA,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW;AACrC,aAAA;
|
|
1
|
+
{"version":3,"file":"query-preview-button.vue_rollup-plugin-vue_script.vue.js","sources":["../../../../../src/x-modules/queries-preview/components/query-preview-button.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import { Dictionary } from '@empathyco/x-utils';\n import { State } from '../../../components/decorators/store.decorators';\n import { QueryPreviewInfo } from '../store/types';\n import { XEventsTypes } from '../../../wiring/events.types';\n import { BaseEventButton, xComponentMixin } from '../../../components';\n import { queriesPreviewXModule } from '../x-module';\n\n /**\n * Component containing an event button that emits\n * {@link QueriesPreviewXEvents.UserAcceptedAQueryPreview} when clicked with\n * the full query preview info as payload.\n *\n * It has a default slot to customize its contents.\n *\n * @public\n */\n @Component({\n components: { BaseEventButton },\n mixins: [xComponentMixin(queriesPreviewXModule)]\n })\n export default class QueryPreviewButton extends Vue {\n /**\n * The information about the request of the query preview.\n *\n * @public\n */\n @Prop({ required: true })\n protected queryPreviewInfo!: QueryPreviewInfo;\n\n /**\n * We use the module extra params to combine them with the query preview's extra params.\n */\n @State('queriesPreview', 'params')\n public params!: Dictionary<unknown>;\n\n /**\n * The provided query preview with the base extra params from the module merged in.\n *\n * @returns The query preview info with the base extra params merged in.\n * @public\n */\n protected get fullQueryPreviewInfo(): QueryPreviewInfo {\n return {\n ...this.queryPreviewInfo,\n extraParams: {\n ...this.params,\n ...this.queryPreviewInfo.extraParams\n },\n filters: this.queryPreviewInfo.filters\n };\n }\n\n /**\n * List of events to emit by the BaseEventButton.\n *\n * @returns An object with the event and payload.\n *\n * @internal\n */\n protected get events(): Partial<XEventsTypes> {\n return { UserAcceptedAQueryPreview: this.fullQueryPreviewInfo };\n }\n }\n"],"names":["BaseEventButton"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBE;;;;;;;;AAQG;AAKY,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,GAAG,CAAA;AAejD;;;;;AAKG;AACH,IAAA,IAAc,oBAAoB,GAAA;QAChC,OAAO;YACL,GAAG,IAAI,CAAC,gBAAgB;AACxB,YAAA,WAAW,EAAE;gBACX,GAAG,IAAI,CAAC,MAAM;AACd,gBAAA,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW;AACrC,aAAA;AACD,YAAA,OAAO,EAAE,IAAI,CAAC,gBAAgB,CAAC,OAAO;SACvC,CAAC;KACH;AAED;;;;;;AAMG;AACH,IAAA,IAAc,MAAM,GAAA;AAClB,QAAA,OAAO,EAAE,yBAAyB,EAAE,IAAI,CAAC,oBAAoB,EAAE,CAAC;KACjE;CACF,CAAA;AAnCC,UAAA,CAAA;AADC,IAAA,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AACqB,CAAA,EAAA,kBAAA,CAAA,SAAA,EAAA,kBAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAM9C,UAAA,CAAA;AADC,IAAA,KAAK,CAAC,gBAAgB,EAAE,QAAQ,CAAC;AACE,CAAA,EAAA,kBAAA,CAAA,SAAA,EAAA,QAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAbjB,kBAAkB,GAAA,UAAA,CAAA;AAJtC,IAAA,SAAS,CAAC;QACT,UAAU,EAAE,mBAAEA,iBAAe,EAAE;AAC/B,QAAA,MAAM,EAAE,CAAC,eAAe,CAAC,qBAAqB,CAAC,CAAC;KACjD,CAAC;AACmB,CAAA,EAAA,kBAAkB,CA0CtC,CAAA;aA1CoB,kBAAkB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-preview.vue.js","sources":["../../../../../src/x-modules/queries-preview/components/query-preview.vue"],"sourcesContent":["<template>\n <NoElement v-if=\"queryPreviewResults && queryPreviewResults.totalResults\">\n <!--\n @slot Query Preview default slot.\n @binding {QueryPreviewInfo} queryPreviewInfo - The information about the request of the\n query preview\n @binding {Result[]} results - The results preview of the query preview\n @binding {number} totalResults - The total results of the search request\n -->\n <slot\n :queryPreviewInfo=\"queryPreviewInfo\"\n :results=\"queryPreviewResults.results\"\n :totalResults=\"queryPreviewResults.totalResults\"\n >\n <ul data-test=\"query-preview\" class=\"x-query-preview\">\n <li\n v-for=\"result in queryPreviewResults.results\"\n :key=\"result.id\"\n class=\"x-query-preview__item\"\n data-test=\"query-preview-item\"\n >\n <!--\n @slot Query Preview result slot.\n @binding {Result} result - A Query Preview result\n -->\n <slot name=\"result\" :result=\"result\">\n <span data-test=\"result-name\">{{ result.name }}</span>\n </slot>\n </li>\n </ul>\n </slot>\n </NoElement>\n</template>\n\n<script lang=\"ts\">\n import Vue from 'vue';\n import { Component, Prop, Inject, Watch } from 'vue-property-decorator';\n import { Dictionary } from '@empathyco/x-utils';\n import { SearchRequest, Result } from '@empathyco/x-types';\n import { State } from '../../../components/decorators/store.decorators';\n import { LIST_ITEMS_KEY } from '../../../components/decorators/injection.consts';\n import { XProvide } from '../../../components/decorators/injection.decorators';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { NoElement } from '../../../components/no-element';\n import { RequestStatus } from '../../../store';\n import { QueryFeature, FeatureLocation } from '../../../types/origin';\n import { QueryPreviewInfo, QueryPreviewItem } from '../store/types';\n import { QueriesPreviewConfig } from '../config.types';\n import { queriesPreviewXModule } from '../x-module';\n import { createOrigin } from '../../../utils/origin';\n import { debounce } from '../../../utils/debounce';\n import { DebouncedFunction } from '../../../utils';\n\n /**\n * Retrieves a preview of the results of a query and exposes them in the default slot,\n * along with the query preview and the totalResults of the search request.\n * By default, it renders the names of the results.\n *\n * @public\n */\n @Component({\n components: {\n NoElement\n },\n mixins: [xComponentMixin(queriesPreviewXModule)]\n })\n export default class QueryPreview extends Vue {\n /**\n * The information about the request of the query preview.\n *\n * @public\n */\n @Prop({ required: true })\n protected queryPreviewInfo!: QueryPreviewInfo;\n\n /**\n * The origin property for the request.\n *\n * @public\n */\n @Prop()\n protected queryFeature?: QueryFeature;\n\n /**\n * Number of query preview results to be rendered.\n *\n * @public\n */\n @Prop()\n protected maxItemsToRender?: number;\n\n /**\n * Debounce time in milliseconds for triggering the search requests.\n * It will default to 0 to fit the most common use case (pre-search),\n * and it would work properly with a 250 value inside empathize.\n */\n @Prop({ default: 0 })\n public debounceTimeMs!: number;\n\n /**\n * Controls whether the QueryPreview should be removed from the state\n * when the component is destroyed.\n *\n * @public\n */\n @Prop({ default: true })\n public clearOnDestroy!: boolean;\n\n /**\n * The results preview of the queries preview mounted.\n * It is a dictionary, indexed by the query preview query.\n */\n @State('queriesPreview', 'queriesPreview')\n public previewResults!: Dictionary<QueryPreviewItem>;\n\n /**\n * As the request is handled in this component, we need\n * the extra params that will be used in the request.\n */\n @State('queriesPreview', 'params')\n public params!: Dictionary<unknown>;\n\n /**\n * As the request is handled in this component, we need\n * the config that will be used in the request.\n */\n @State('queriesPreview', 'config')\n public config!: QueriesPreviewConfig;\n\n /**\n * The results to render from the state.\n *\n * @remarks The results list are provided with `items` key. It can be\n * concatenated with list items from components such as `BannersList`, `PromotedsList`,\n * `BaseGrid` or any component that injects the list.\n *\n * @returns A list of results.\n * @public\n */\n @XProvide(LIST_ITEMS_KEY)\n public get results(): Result[] | undefined {\n return this.queryPreviewResults?.results;\n }\n\n /**\n * It injects the provided {@link FeatureLocation} of the selected query in the search request.\n *\n * @internal\n */\n @Inject({ default: undefined })\n protected location?: FeatureLocation;\n\n /**\n * The computed request object to be used to retrieve the query preview results.\n *\n * @returns The search request object.\n * @internal\n */\n protected get queryPreviewRequest(): SearchRequest {\n const origin = createOrigin({\n feature: this.queryFeature,\n location: this.location\n });\n\n return {\n query: this.queryPreviewInfo.query,\n rows: this.config.maxItemsToRequest,\n extraParams: { ...this.params, ...this.queryPreviewInfo.extraParams },\n ...(origin && { origin })\n };\n }\n\n /**\n * Gets from the state the results preview of the query preview.\n *\n * @returns The results preview of the actual query preview.\n */\n public get queryPreviewResults(): Partial<QueryPreviewItem> | undefined {\n const previewResults = this.previewResults[this.queryPreviewInfo.query];\n return previewResults?.results\n ? {\n ...previewResults,\n results: previewResults.results.slice(0, this.maxItemsToRender)\n }\n : undefined;\n }\n\n /**\n * The debounce method to trigger the request after the debounceTimeMs defined.\n *\n * @returns The search request object.\n * @internal\n */\n protected get emitQueryPreviewRequestUpdated(): DebouncedFunction<[SearchRequest]> {\n return debounce(request => {\n this.$x.emit('QueryPreviewRequestUpdated', request, { priority: 0, replaceable: false });\n }, this.debounceTimeMs);\n }\n\n /**\n * Initialises watcher to emit debounced requests, and first value for the requests.\n *\n * @internal\n */\n protected created(): void {\n this.$watch(\n () => this.queryPreviewRequest,\n (newRequest, oldRequest) => {\n if (JSON.stringify(newRequest) !== JSON.stringify(oldRequest)) {\n this.emitQueryPreviewRequestUpdated(newRequest);\n }\n }\n );\n this.emitQueryPreviewRequestUpdated(this.queryPreviewRequest);\n }\n\n /**\n * Cancels the (remaining) requests when the component is destroyed\n * via the `debounce.cancel()` method.\n * If the prop 'clearOnDestroy' is set to true, it also removes the QueryPreview\n * from the state when the component is destroyed.\n *\n * @internal\n */\n protected beforeDestroy(): void {\n this.emitQueryPreviewRequestUpdated.cancel();\n\n if (this.clearOnDestroy) {\n this.$x.emit('QueryPreviewUnmountedHook', this.queryPreviewInfo.query, {\n priority: 0,\n replaceable: false\n });\n }\n }\n\n /**\n * Cancels the previous request when the debounced function changes (e.g: the debounceTimeMs\n * prop changes or there is a request in progress that cancels it).\n *\n * @param _new - The new debounced function.\n * @param old - The previous debounced function.\n * @internal\n */\n @Watch('emitQueryPreviewRequestUpdated')\n protected cancelEmitPreviewRequestUpdated(\n _new: DebouncedFunction<[SearchRequest]>,\n old: DebouncedFunction<[SearchRequest]>\n ): void {\n old.cancel();\n }\n\n /**\n * Emits an event when the query results are loaded or fail to load.\n *\n * @param status - The status of the query preview request.\n * @internal\n */\n @Watch('queryPreviewResults.status')\n emitLoad(status: RequestStatus | undefined): void {\n if (status === 'success') {\n this.$emit(this.results?.length ? 'load' : 'error', this.queryPreviewInfo.query);\n } else if (status === 'error') {\n this.$emit('error', this.queryPreviewInfo.query);\n }\n }\n }\n</script>\n<docs lang=\"mdx\">\n## Events\n\nA list of events that the component will emit:\n\n- [`QueryPreviewRequestUpdated`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts):\n the event is emitted when the component is mounted and when the properties of the request object\n changes. The event payload is the `queryPreviewRequest` object.\n\n## Vue Events\n\nA list of vue events that the component will emit:\n\n- `load`: the event is emitted when the query results have been loaded.\n- `error`: the event is emitted if there is some error when retrieving the query results.\n\n## See it in action\n\nHere you have a basic example of how the QueryPreview is rendered. Keep in mind that this component\nis intended to be used overriding its default slot. By default it will only render the names of the\nresults.\n\n```vue live\n<template>\n <QueryPreview :queryPreviewInfo=\"queryPreviewInfo\" />\n</template>\n\n<script>\n import { QueryPreview } from '@empathyco/x-components/queries-preview';\n\n export default {\n name: 'QueryPreviewDemo',\n components: {\n QueryPreview\n },\n data() {\n return {\n queryPreviewInfo: { query: 'sandals' }\n };\n }\n };\n</script>\n```\n\n### Play with the default slot\n\nIn this example, the results will be rendered inside a sliding panel.\n\n```vue live\n<template>\n <QueryPreview :queryPreviewInfo=\"queryPreviewInfo\" #default=\"{ totalResults, results }\">\n <section>\n <p>Total results: {{ totalResults }}</p>\n <SlidingPanel :resetOnContentChange=\"false\">\n <article\n v-for=\"result in results\"\n :key=\"result.id\"\n class=\"x-result\"\n style=\"max-width: 300px; overflow: hidden\"\n >\n <BaseResultLink :result=\"result\">\n <BaseResultImage :result=\"result\" class=\"x-result__picture\" />\n </BaseResultLink>\n <div class=\"x-result__description\">\n <BaseResultLink :result=\"result\">\n <h1 class=\"x-title3\">{{ result.name }}</h1>\n </BaseResultLink>\n </div>\n </article>\n </SlidingPanel>\n </section>\n </QueryPreview>\n</template>\n\n<script>\n import { QueryPreview } from '@empathyco/x-components/queries-preview';\n import { BaseResultImage, BaseResultLink, SlidingPanel } from '@empathyco/x-components';\n\n export default {\n name: 'QueryPreviewDemoOverridingSlot',\n components: {\n BaseResultImage,\n BaseResultLink,\n QueryPreview,\n SlidingPanel\n },\n data() {\n return {\n queryPreviewInfo: { query: 'flip-flops' }\n };\n }\n };\n</script>\n```\n\n### Play with the result slot\n\nThe component exposes a slot to override the result content, without modifying the list.\n\nIn this example, the ID of the results will be rendered along with the name.\n\n```vue\n<template>\n <QueryPreview :queryPreviewInfo=\"queryPreviewInfo\" #result=\"{ result }\">\n <span>{{ result.id }}</span>\n <span>{{ result.name }}</span>\n </QueryPreview>\n</template>\n\n<script>\n import { QueryPreview } from '@empathyco/x-components/queries-preview';\n\n export default {\n name: 'QueryPreviewDemoOverridingResultSlot',\n components: {\n QueryPreview\n },\n data() {\n return {\n queryPreviewInfo: { query: 'flip-flops' }\n };\n }\n };\n</script>\n```\n\n### Play with props\n\nIn this example, the query preview has been limited to render a maximum of 4 results.\n\n```vue\n<template>\n <QueryPreview\n :maxItemsToRender=\"maxItemsToRender\"\n :queryPreviewInfo=\"queryPreviewInfo\"\n #default=\"{ results }\"\n >\n <BaseGrid #default=\"{ item }\" :items=\"results\">\n <BaseResultLink :result=\"item\">\n <BaseResultImage :result=\"item\" />\n </BaseResultLink>\n </BaseGrid>\n </QueryPreview>\n</template>\n\n<script>\n import { BaseGrid, BaseResultImage, BaseResultLink } from '@empathyco/x-components';\n import { QueryPreview } from '@empathyco/x-components/queries-preview';\n\n export default {\n name: 'QueryPreviewDemo',\n components: {\n BaseGrid,\n BaseResultImage,\n BaseResultLink,\n QueryPreview\n },\n data() {\n return {\n maxItemsToRender: 4,\n queryPreviewInfo: { query: 'flip-flops' }\n };\n }\n };\n</script>\n```\n</docs>\n"],"names":[],"mappings":";;;;AAEA,MAAc,cAAA,GAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"query-preview.vue.js","sources":["../../../../../src/x-modules/queries-preview/components/query-preview.vue"],"sourcesContent":["<template>\n <NoElement v-if=\"queryPreviewResults && queryPreviewResults.totalResults\">\n <!--\n @slot Query Preview default slot.\n @binding {QueryPreviewInfo} queryPreviewInfo - The information about the request of the\n query preview\n @binding {Result[]} results - The results preview of the query preview\n @binding {number} totalResults - The total results of the search request\n -->\n <slot\n :queryPreviewInfo=\"queryPreviewInfo\"\n :results=\"queryPreviewResults.results\"\n :totalResults=\"queryPreviewResults.totalResults\"\n >\n <ul data-test=\"query-preview\" class=\"x-query-preview\">\n <li\n v-for=\"result in queryPreviewResults.results\"\n :key=\"result.id\"\n class=\"x-query-preview__item\"\n data-test=\"query-preview-item\"\n >\n <!--\n @slot Query Preview result slot.\n @binding {Result} result - A Query Preview result\n -->\n <slot name=\"result\" :result=\"result\">\n <span data-test=\"result-name\">{{ result.name }}</span>\n </slot>\n </li>\n </ul>\n </slot>\n </NoElement>\n</template>\n\n<script lang=\"ts\">\n import Vue from 'vue';\n import { Component, Prop, Inject, Watch } from 'vue-property-decorator';\n import { SearchRequest, Result, Filter } from '@empathyco/x-types';\n import { deepEqual, Dictionary } from '@empathyco/x-utils';\n import { State } from '../../../components/decorators/store.decorators';\n import { LIST_ITEMS_KEY } from '../../../components/decorators/injection.consts';\n import { XProvide } from '../../../components/decorators/injection.decorators';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { NoElement } from '../../../components/no-element';\n import { RequestStatus } from '../../../store';\n import { QueryFeature, FeatureLocation } from '../../../types/origin';\n import { QueryPreviewInfo, QueryPreviewItem } from '../store/types';\n import { QueriesPreviewConfig } from '../config.types';\n import { queriesPreviewXModule } from '../x-module';\n import { createOrigin } from '../../../utils/origin';\n import { debounce } from '../../../utils/debounce';\n import { DebouncedFunction } from '../../../utils';\n import { createRawFilter } from '../../../__stubs__/index';\n\n /**\n * Retrieves a preview of the results of a query and exposes them in the default slot,\n * along with the query preview and the totalResults of the search request.\n * By default, it renders the names of the results.\n *\n * @public\n */\n @Component({\n components: {\n NoElement\n },\n mixins: [xComponentMixin(queriesPreviewXModule)]\n })\n export default class QueryPreview extends Vue {\n /**\n * The information about the request of the query preview.\n *\n * @public\n */\n @Prop({ required: true })\n protected queryPreviewInfo!: QueryPreviewInfo;\n\n /**\n * The origin property for the request.\n *\n * @public\n */\n @Prop()\n protected queryFeature?: QueryFeature;\n\n /**\n * Number of query preview results to be rendered.\n *\n * @public\n */\n @Prop()\n protected maxItemsToRender?: number;\n\n /**\n * Debounce time in milliseconds for triggering the search requests.\n * It will default to 0 to fit the most common use case (pre-search),\n * and it would work properly with a 250 value inside empathize.\n */\n @Prop({ default: 0 })\n public debounceTimeMs!: number;\n\n /**\n * Controls whether the QueryPreview should be removed from the state\n * when the component is destroyed.\n *\n * @public\n */\n @Prop({ default: true })\n public clearOnDestroy!: boolean;\n\n /**\n * The results preview of the queries preview mounted.\n * It is a dictionary, indexed by the query preview query.\n */\n @State('queriesPreview', 'queriesPreview')\n public previewResults!: Dictionary<QueryPreviewItem>;\n\n /**\n * As the request is handled in this component, we need\n * the extra params that will be used in the request.\n */\n @State('queriesPreview', 'params')\n public params!: Dictionary<unknown>;\n\n /**\n * As the request is handled in this component, we need\n * the config that will be used in the request.\n */\n @State('queriesPreview', 'config')\n public config!: QueriesPreviewConfig;\n\n /**\n * The results to render from the state.\n *\n * @remarks The results list are provided with `items` key. It can be\n * concatenated with list items from components such as `BannersList`, `PromotedsList`,\n * `BaseGrid` or any component that injects the list.\n *\n * @returns A list of results.\n * @public\n */\n @XProvide(LIST_ITEMS_KEY)\n public get results(): Result[] | undefined {\n return this.queryPreviewResults?.results;\n }\n\n /**\n * It injects the provided {@link FeatureLocation} of the selected query in the search request.\n *\n * @internal\n */\n @Inject({ default: undefined })\n protected location?: FeatureLocation;\n\n /**\n * The computed request object to be used to retrieve the query preview results.\n *\n * @returns The search request object.\n * @internal\n */\n protected get queryPreviewRequest(): SearchRequest {\n const origin = createOrigin({\n feature: this.queryFeature,\n location: this.location\n });\n const filters = this.queryPreviewInfo.filters?.reduce((filtersList, filterId) => {\n const facetId = filterId.split(':')[0];\n const rawFilter = createRawFilter(filterId);\n filtersList[facetId] = filtersList[facetId]\n ? filtersList[facetId].concat(rawFilter)\n : [rawFilter];\n\n return filtersList;\n }, {} as Record<string, Filter[]>);\n\n return {\n query: this.queryPreviewInfo.query,\n rows: this.config.maxItemsToRequest,\n extraParams: { ...this.params, ...this.queryPreviewInfo.extraParams },\n filters: filters,\n ...(origin && { origin })\n };\n }\n\n /**\n * Gets from the state the results preview of the query preview.\n *\n * @returns The results preview of the actual query preview.\n */\n public get queryPreviewResults(): Partial<QueryPreviewItem> | undefined {\n const previewResults = this.previewResults[this.queryPreviewInfo.query];\n return previewResults?.results\n ? {\n ...previewResults,\n results: previewResults.results.slice(0, this.maxItemsToRender)\n }\n : undefined;\n }\n\n /**\n * The debounce method to trigger the request after the debounceTimeMs defined.\n *\n * @returns The search request object.\n * @internal\n */\n protected get emitQueryPreviewRequestUpdated(): DebouncedFunction<[SearchRequest]> {\n return debounce(request => {\n this.$x.emit('QueryPreviewRequestUpdated', request, { priority: 0, replaceable: false });\n }, this.debounceTimeMs);\n }\n\n /**\n * Initialises watcher to emit debounced requests, and first value for the requests.\n *\n * @internal\n */\n protected created(): void {\n this.$watch(\n () => this.queryPreviewRequest,\n (newRequest, oldRequest) => {\n if (!deepEqual(newRequest, oldRequest)) {\n this.emitQueryPreviewRequestUpdated(newRequest);\n }\n }\n );\n this.emitQueryPreviewRequestUpdated(this.queryPreviewRequest);\n }\n\n /**\n * Cancels the (remaining) requests when the component is destroyed\n * via the `debounce.cancel()` method.\n * If the prop 'clearOnDestroy' is set to true, it also removes the QueryPreview\n * from the state when the component is destroyed.\n *\n * @internal\n */\n protected beforeDestroy(): void {\n this.emitQueryPreviewRequestUpdated.cancel();\n\n if (this.clearOnDestroy) {\n this.$x.emit('QueryPreviewUnmountedHook', this.queryPreviewInfo.query, {\n priority: 0,\n replaceable: false\n });\n }\n }\n\n /**\n * Cancels the previous request when the debounced function changes (e.g: the debounceTimeMs\n * prop changes or there is a request in progress that cancels it).\n *\n * @param _new - The new debounced function.\n * @param old - The previous debounced function.\n * @internal\n */\n @Watch('emitQueryPreviewRequestUpdated')\n protected cancelEmitPreviewRequestUpdated(\n _new: DebouncedFunction<[SearchRequest]>,\n old: DebouncedFunction<[SearchRequest]>\n ): void {\n old.cancel();\n }\n\n /**\n * Emits an event when the query results are loaded or fail to load.\n *\n * @param status - The status of the query preview request.\n * @internal\n */\n @Watch('queryPreviewResults.status')\n emitLoad(status: RequestStatus | undefined): void {\n if (status === 'success') {\n this.$emit(this.results?.length ? 'load' : 'error', this.queryPreviewInfo.query);\n } else if (status === 'error') {\n this.$emit('error', this.queryPreviewInfo.query);\n }\n }\n }\n</script>\n<docs lang=\"mdx\">\n## Events\n\nA list of events that the component will emit:\n\n- [`QueryPreviewRequestUpdated`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts):\n the event is emitted when the component is mounted and when the properties of the request object\n changes. The event payload is the `queryPreviewRequest` object.\n\n## Vue Events\n\nA list of vue events that the component will emit:\n\n- `load`: the event is emitted when the query results have been loaded.\n- `error`: the event is emitted if there is some error when retrieving the query results.\n\n## See it in action\n\nHere you have a basic example of how the QueryPreview is rendered. Keep in mind that this component\nis intended to be used overriding its default slot. By default it will only render the names of the\nresults.\n\n```vue live\n<template>\n <QueryPreview :queryPreviewInfo=\"queryPreviewInfo\" />\n</template>\n\n<script>\n import { QueryPreview } from '@empathyco/x-components/queries-preview';\n\n export default {\n name: 'QueryPreviewDemo',\n components: {\n QueryPreview\n },\n data() {\n return {\n queryPreviewInfo: { query: 'sandals' }\n };\n }\n };\n</script>\n```\n\n### Play with the default slot\n\nIn this example, the results will be rendered inside a sliding panel.\n\n```vue live\n<template>\n <QueryPreview :queryPreviewInfo=\"queryPreviewInfo\" #default=\"{ totalResults, results }\">\n <section>\n <p>Total results: {{ totalResults }}</p>\n <SlidingPanel :resetOnContentChange=\"false\">\n <article\n v-for=\"result in results\"\n :key=\"result.id\"\n class=\"x-result\"\n style=\"max-width: 300px; overflow: hidden\"\n >\n <BaseResultLink :result=\"result\">\n <BaseResultImage :result=\"result\" class=\"x-result__picture\" />\n </BaseResultLink>\n <div class=\"x-result__description\">\n <BaseResultLink :result=\"result\">\n <h1 class=\"x-title3\">{{ result.name }}</h1>\n </BaseResultLink>\n </div>\n </article>\n </SlidingPanel>\n </section>\n </QueryPreview>\n</template>\n\n<script>\n import { QueryPreview } from '@empathyco/x-components/queries-preview';\n import { BaseResultImage, BaseResultLink, SlidingPanel } from '@empathyco/x-components';\n\n export default {\n name: 'QueryPreviewDemoOverridingSlot',\n components: {\n BaseResultImage,\n BaseResultLink,\n QueryPreview,\n SlidingPanel\n },\n data() {\n return {\n queryPreviewInfo: { query: 'flip-flops' }\n };\n }\n };\n</script>\n```\n\n### Play with the result slot\n\nThe component exposes a slot to override the result content, without modifying the list.\n\nIn this example, the ID of the results will be rendered along with the name.\n\n```vue\n<template>\n <QueryPreview :queryPreviewInfo=\"queryPreviewInfo\" #result=\"{ result }\">\n <span>{{ result.id }}</span>\n <span>{{ result.name }}</span>\n </QueryPreview>\n</template>\n\n<script>\n import { QueryPreview } from '@empathyco/x-components/queries-preview';\n\n export default {\n name: 'QueryPreviewDemoOverridingResultSlot',\n components: {\n QueryPreview\n },\n data() {\n return {\n queryPreviewInfo: { query: 'flip-flops' }\n };\n }\n };\n</script>\n```\n\n### Play with props\n\nIn this example, the query preview has been limited to render a maximum of 4 results.\n\n```vue\n<template>\n <QueryPreview\n :maxItemsToRender=\"maxItemsToRender\"\n :queryPreviewInfo=\"queryPreviewInfo\"\n #default=\"{ results }\"\n >\n <BaseGrid #default=\"{ item }\" :items=\"results\">\n <BaseResultLink :result=\"item\">\n <BaseResultImage :result=\"item\" />\n </BaseResultLink>\n </BaseGrid>\n </QueryPreview>\n</template>\n\n<script>\n import { BaseGrid, BaseResultImage, BaseResultLink } from '@empathyco/x-components';\n import { QueryPreview } from '@empathyco/x-components/queries-preview';\n\n export default {\n name: 'QueryPreviewDemo',\n components: {\n BaseGrid,\n BaseResultImage,\n BaseResultLink,\n QueryPreview\n },\n data() {\n return {\n maxItemsToRender: 4,\n queryPreviewInfo: { query: 'flip-flops' }\n };\n }\n };\n</script>\n```\n</docs>\n"],"names":[],"mappings":";;;;AAEA,MAAc,cAAA,GAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/js/x-modules/queries-preview/components/query-preview.vue_rollup-plugin-vue_script.vue.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { __decorate } from 'tslib';
|
|
2
2
|
import Vue from 'vue';
|
|
3
3
|
import { Prop, Inject, Watch, Component } from 'vue-property-decorator';
|
|
4
|
+
import { deepEqual } from '@empathyco/x-utils';
|
|
4
5
|
import { State } from '../../../components/decorators/store.decorators.js';
|
|
5
6
|
import { LIST_ITEMS_KEY } from '../../../components/decorators/injection.consts.js';
|
|
6
7
|
import { XProvide } from '../../../components/decorators/injection.decorators.js';
|
|
@@ -9,6 +10,8 @@ import { NoElement } from '../../../components/no-element.js';
|
|
|
9
10
|
import { queriesPreviewXModule } from '../x-module.js';
|
|
10
11
|
import { createOrigin } from '../../../utils/origin.js';
|
|
11
12
|
import { debounce } from '../../../utils/debounce.js';
|
|
13
|
+
import { createRawFilter } from '../../../__stubs__/filters-stubs.factory.js';
|
|
14
|
+
import '@empathyco/x-deep-merge';
|
|
12
15
|
|
|
13
16
|
/**
|
|
14
17
|
* Retrieves a preview of the results of a query and exposes them in the default slot,
|
|
@@ -42,10 +45,19 @@ let QueryPreview = class QueryPreview extends Vue {
|
|
|
42
45
|
feature: this.queryFeature,
|
|
43
46
|
location: this.location
|
|
44
47
|
});
|
|
48
|
+
const filters = this.queryPreviewInfo.filters?.reduce((filtersList, filterId) => {
|
|
49
|
+
const facetId = filterId.split(':')[0];
|
|
50
|
+
const rawFilter = createRawFilter(filterId);
|
|
51
|
+
filtersList[facetId] = filtersList[facetId]
|
|
52
|
+
? filtersList[facetId].concat(rawFilter)
|
|
53
|
+
: [rawFilter];
|
|
54
|
+
return filtersList;
|
|
55
|
+
}, {});
|
|
45
56
|
return {
|
|
46
57
|
query: this.queryPreviewInfo.query,
|
|
47
58
|
rows: this.config.maxItemsToRequest,
|
|
48
59
|
extraParams: { ...this.params, ...this.queryPreviewInfo.extraParams },
|
|
60
|
+
filters: filters,
|
|
49
61
|
...(origin && { origin })
|
|
50
62
|
};
|
|
51
63
|
}
|
|
@@ -81,7 +93,7 @@ let QueryPreview = class QueryPreview extends Vue {
|
|
|
81
93
|
*/
|
|
82
94
|
created() {
|
|
83
95
|
this.$watch(() => this.queryPreviewRequest, (newRequest, oldRequest) => {
|
|
84
|
-
if (
|
|
96
|
+
if (!deepEqual(newRequest, oldRequest)) {
|
|
85
97
|
this.emitQueryPreviewRequestUpdated(newRequest);
|
|
86
98
|
}
|
|
87
99
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-preview.vue_rollup-plugin-vue_script.vue.js","sources":["../../../../../src/x-modules/queries-preview/components/query-preview.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n import Vue from 'vue';\n import { Component, Prop, Inject, Watch } from 'vue-property-decorator';\n import { Dictionary } from '@empathyco/x-utils';\n import { SearchRequest, Result } from '@empathyco/x-types';\n import { State } from '../../../components/decorators/store.decorators';\n import { LIST_ITEMS_KEY } from '../../../components/decorators/injection.consts';\n import { XProvide } from '../../../components/decorators/injection.decorators';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { NoElement } from '../../../components/no-element';\n import { RequestStatus } from '../../../store';\n import { QueryFeature, FeatureLocation } from '../../../types/origin';\n import { QueryPreviewInfo, QueryPreviewItem } from '../store/types';\n import { QueriesPreviewConfig } from '../config.types';\n import { queriesPreviewXModule } from '../x-module';\n import { createOrigin } from '../../../utils/origin';\n import { debounce } from '../../../utils/debounce';\n import { DebouncedFunction } from '../../../utils';\n\n /**\n * Retrieves a preview of the results of a query and exposes them in the default slot,\n * along with the query preview and the totalResults of the search request.\n * By default, it renders the names of the results.\n *\n * @public\n */\n @Component({\n components: {\n NoElement\n },\n mixins: [xComponentMixin(queriesPreviewXModule)]\n })\n export default class QueryPreview extends Vue {\n /**\n * The information about the request of the query preview.\n *\n * @public\n */\n @Prop({ required: true })\n protected queryPreviewInfo!: QueryPreviewInfo;\n\n /**\n * The origin property for the request.\n *\n * @public\n */\n @Prop()\n protected queryFeature?: QueryFeature;\n\n /**\n * Number of query preview results to be rendered.\n *\n * @public\n */\n @Prop()\n protected maxItemsToRender?: number;\n\n /**\n * Debounce time in milliseconds for triggering the search requests.\n * It will default to 0 to fit the most common use case (pre-search),\n * and it would work properly with a 250 value inside empathize.\n */\n @Prop({ default: 0 })\n public debounceTimeMs!: number;\n\n /**\n * Controls whether the QueryPreview should be removed from the state\n * when the component is destroyed.\n *\n * @public\n */\n @Prop({ default: true })\n public clearOnDestroy!: boolean;\n\n /**\n * The results preview of the queries preview mounted.\n * It is a dictionary, indexed by the query preview query.\n */\n @State('queriesPreview', 'queriesPreview')\n public previewResults!: Dictionary<QueryPreviewItem>;\n\n /**\n * As the request is handled in this component, we need\n * the extra params that will be used in the request.\n */\n @State('queriesPreview', 'params')\n public params!: Dictionary<unknown>;\n\n /**\n * As the request is handled in this component, we need\n * the config that will be used in the request.\n */\n @State('queriesPreview', 'config')\n public config!: QueriesPreviewConfig;\n\n /**\n * The results to render from the state.\n *\n * @remarks The results list are provided with `items` key. It can be\n * concatenated with list items from components such as `BannersList`, `PromotedsList`,\n * `BaseGrid` or any component that injects the list.\n *\n * @returns A list of results.\n * @public\n */\n @XProvide(LIST_ITEMS_KEY)\n public get results(): Result[] | undefined {\n return this.queryPreviewResults?.results;\n }\n\n /**\n * It injects the provided {@link FeatureLocation} of the selected query in the search request.\n *\n * @internal\n */\n @Inject({ default: undefined })\n protected location?: FeatureLocation;\n\n /**\n * The computed request object to be used to retrieve the query preview results.\n *\n * @returns The search request object.\n * @internal\n */\n protected get queryPreviewRequest(): SearchRequest {\n const origin = createOrigin({\n feature: this.queryFeature,\n location: this.location\n });\n\n return {\n query: this.queryPreviewInfo.query,\n rows: this.config.maxItemsToRequest,\n extraParams: { ...this.params, ...this.queryPreviewInfo.extraParams },\n ...(origin && { origin })\n };\n }\n\n /**\n * Gets from the state the results preview of the query preview.\n *\n * @returns The results preview of the actual query preview.\n */\n public get queryPreviewResults(): Partial<QueryPreviewItem> | undefined {\n const previewResults = this.previewResults[this.queryPreviewInfo.query];\n return previewResults?.results\n ? {\n ...previewResults,\n results: previewResults.results.slice(0, this.maxItemsToRender)\n }\n : undefined;\n }\n\n /**\n * The debounce method to trigger the request after the debounceTimeMs defined.\n *\n * @returns The search request object.\n * @internal\n */\n protected get emitQueryPreviewRequestUpdated(): DebouncedFunction<[SearchRequest]> {\n return debounce(request => {\n this.$x.emit('QueryPreviewRequestUpdated', request, { priority: 0, replaceable: false });\n }, this.debounceTimeMs);\n }\n\n /**\n * Initialises watcher to emit debounced requests, and first value for the requests.\n *\n * @internal\n */\n protected created(): void {\n this.$watch(\n () => this.queryPreviewRequest,\n (newRequest, oldRequest) => {\n if (JSON.stringify(newRequest) !== JSON.stringify(oldRequest)) {\n this.emitQueryPreviewRequestUpdated(newRequest);\n }\n }\n );\n this.emitQueryPreviewRequestUpdated(this.queryPreviewRequest);\n }\n\n /**\n * Cancels the (remaining) requests when the component is destroyed\n * via the `debounce.cancel()` method.\n * If the prop 'clearOnDestroy' is set to true, it also removes the QueryPreview\n * from the state when the component is destroyed.\n *\n * @internal\n */\n protected beforeDestroy(): void {\n this.emitQueryPreviewRequestUpdated.cancel();\n\n if (this.clearOnDestroy) {\n this.$x.emit('QueryPreviewUnmountedHook', this.queryPreviewInfo.query, {\n priority: 0,\n replaceable: false\n });\n }\n }\n\n /**\n * Cancels the previous request when the debounced function changes (e.g: the debounceTimeMs\n * prop changes or there is a request in progress that cancels it).\n *\n * @param _new - The new debounced function.\n * @param old - The previous debounced function.\n * @internal\n */\n @Watch('emitQueryPreviewRequestUpdated')\n protected cancelEmitPreviewRequestUpdated(\n _new: DebouncedFunction<[SearchRequest]>,\n old: DebouncedFunction<[SearchRequest]>\n ): void {\n old.cancel();\n }\n\n /**\n * Emits an event when the query results are loaded or fail to load.\n *\n * @param status - The status of the query preview request.\n * @internal\n */\n @Watch('queryPreviewResults.status')\n emitLoad(status: RequestStatus | undefined): void {\n if (status === 'success') {\n this.$emit(this.results?.length ? 'load' : 'error', this.queryPreviewInf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AgB,EAAE,QAAQ,CAAC;AACG,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,QAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAarC,UAAA,CAAA;IADC,QAAQ,CAAC,cAAc,CAAC;AAGxB,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,SAAA,EAAA,IAAA,CAAA,CAAA;AAQD,UAAA,CAAA;AADC,IAAA,MAAM,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;AACM,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,UAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AA8FrC,UAAA,CAAA;IADC,KAAK,CAAC,gCAAgC,CAAC;AAMvC,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,iCAAA,EAAA,IAAA,CAAA,CAAA;AASD,UAAA,CAAA;IADC,KAAK,CAAC,4BAA4B,CAAC;AAOnC,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,UAAA,EAAA,IAAA,CAAA,CAAA;AAtMkB,YAAY,GAAA,UAAA,CAAA;AANhC,IAAA,SAAS,CAAC;AACT,QAAA,UAAU,EAAE;YACV,SAAS;AACV,SAAA;AACD,QAAA,MAAM,EAAE,CAAC,eAAe,CAAC,qBAAqB,CAAC,CAAC;KACjD,CAAC;AACmB,CAAA,EAAA,YAAY,CAuMhC,CAAA;aAvMoB,YAAY;;;;"}
|
|
1
|
+
{"version":3,"file":"query-preview.vue_rollup-plugin-vue_script.vue.js","sources":["../../../../../src/x-modules/queries-preview/components/query-preview.vue?rollup-plugin-vue=script.ts"],"sourcesContent":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n import Vue from 'vue';\n import { Component, Prop, Inject, Watch } from 'vue-property-decorator';\n import { SearchRequest, Result, Filter } from '@empathyco/x-types';\n import { deepEqual, Dictionary } from '@empathyco/x-utils';\n import { State } from '../../../components/decorators/store.decorators';\n import { LIST_ITEMS_KEY } from '../../../components/decorators/injection.consts';\n import { XProvide } from '../../../components/decorators/injection.decorators';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { NoElement } from '../../../components/no-element';\n import { RequestStatus } from '../../../store';\n import { QueryFeature, FeatureLocation } from '../../../types/origin';\n import { QueryPreviewInfo, QueryPreviewItem } from '../store/types';\n import { QueriesPreviewConfig } from '../config.types';\n import { queriesPreviewXModule } from '../x-module';\n import { createOrigin } from '../../../utils/origin';\n import { debounce } from '../../../utils/debounce';\n import { DebouncedFunction } from '../../../utils';\n import { createRawFilter } from '../../../__stubs__/index';\n\n /**\n * Retrieves a preview of the results of a query and exposes them in the default slot,\n * along with the query preview and the totalResults of the search request.\n * By default, it renders the names of the results.\n *\n * @public\n */\n @Component({\n components: {\n NoElement\n },\n mixins: [xComponentMixin(queriesPreviewXModule)]\n })\n export default class QueryPreview extends Vue {\n /**\n * The information about the request of the query preview.\n *\n * @public\n */\n @Prop({ required: true })\n protected queryPreviewInfo!: QueryPreviewInfo;\n\n /**\n * The origin property for the request.\n *\n * @public\n */\n @Prop()\n protected queryFeature?: QueryFeature;\n\n /**\n * Number of query preview results to be rendered.\n *\n * @public\n */\n @Prop()\n protected maxItemsToRender?: number;\n\n /**\n * Debounce time in milliseconds for triggering the search requests.\n * It will default to 0 to fit the most common use case (pre-search),\n * and it would work properly with a 250 value inside empathize.\n */\n @Prop({ default: 0 })\n public debounceTimeMs!: number;\n\n /**\n * Controls whether the QueryPreview should be removed from the state\n * when the component is destroyed.\n *\n * @public\n */\n @Prop({ default: true })\n public clearOnDestroy!: boolean;\n\n /**\n * The results preview of the queries preview mounted.\n * It is a dictionary, indexed by the query preview query.\n */\n @State('queriesPreview', 'queriesPreview')\n public previewResults!: Dictionary<QueryPreviewItem>;\n\n /**\n * As the request is handled in this component, we need\n * the extra params that will be used in the request.\n */\n @State('queriesPreview', 'params')\n public params!: Dictionary<unknown>;\n\n /**\n * As the request is handled in this component, we need\n * the config that will be used in the request.\n */\n @State('queriesPreview', 'config')\n public config!: QueriesPreviewConfig;\n\n /**\n * The results to render from the state.\n *\n * @remarks The results list are provided with `items` key. It can be\n * concatenated with list items from components such as `BannersList`, `PromotedsList`,\n * `BaseGrid` or any component that injects the list.\n *\n * @returns A list of results.\n * @public\n */\n @XProvide(LIST_ITEMS_KEY)\n public get results(): Result[] | undefined {\n return this.queryPreviewResults?.results;\n }\n\n /**\n * It injects the provided {@link FeatureLocation} of the selected query in the search request.\n *\n * @internal\n */\n @Inject({ default: undefined })\n protected location?: FeatureLocation;\n\n /**\n * The computed request object to be used to retrieve the query preview results.\n *\n * @returns The search request object.\n * @internal\n */\n protected get queryPreviewRequest(): SearchRequest {\n const origin = createOrigin({\n feature: this.queryFeature,\n location: this.location\n });\n const filters = this.queryPreviewInfo.filters?.reduce((filtersList, filterId) => {\n const facetId = filterId.split(':')[0];\n const rawFilter = createRawFilter(filterId);\n filtersList[facetId] = filtersList[facetId]\n ? filtersList[facetId].concat(rawFilter)\n : [rawFilter];\n\n return filtersList;\n }, {} as Record<string, Filter[]>);\n\n return {\n query: this.queryPreviewInfo.query,\n rows: this.config.maxItemsToRequest,\n extraParams: { ...this.params, ...this.queryPreviewInfo.extraParams },\n filters: filters,\n ...(origin && { origin })\n };\n }\n\n /**\n * Gets from the state the results preview of the query preview.\n *\n * @returns The results preview of the actual query preview.\n */\n public get queryPreviewResults(): Partial<QueryPreviewItem> | undefined {\n const previewResults = this.previewResults[this.queryPreviewInfo.query];\n return previewResults?.results\n ? {\n ...previewResults,\n results: previewResults.results.slice(0, this.maxItemsToRender)\n }\n : undefined;\n }\n\n /**\n * The debounce method to trigger the request after the debounceTimeMs defined.\n *\n * @returns The search request object.\n * @internal\n */\n protected get emitQueryPreviewRequestUpdated(): DebouncedFunction<[SearchRequest]> {\n return debounce(request => {\n this.$x.emit('QueryPreviewRequestUpdated', request, { priority: 0, replaceable: false });\n }, this.debounceTimeMs);\n }\n\n /**\n * Initialises watcher to emit debounced requests, and first value for the requests.\n *\n * @internal\n */\n protected created(): void {\n this.$watch(\n () => this.queryPreviewRequest,\n (newRequest, oldRequest) => {\n if (!deepEqual(newRequest, oldRequest)) {\n this.emitQueryPreviewRequestUpdated(newRequest);\n }\n }\n );\n this.emitQueryPreviewRequestUpdated(this.queryPreviewRequest);\n }\n\n /**\n * Cancels the (remaining) requests when the component is destroyed\n * via the `debounce.cancel()` method.\n * If the prop 'clearOnDestroy' is set to true, it also removes the QueryPreview\n * from the state when the component is destroyed.\n *\n * @internal\n */\n protected beforeDestroy(): void {\n this.emitQueryPreviewRequestUpdated.cancel();\n\n if (this.clearOnDestroy) {\n this.$x.emit('QueryPreviewUnmountedHook', this.queryPreviewInfo.query, {\n priority: 0,\n replaceable: false\n });\n }\n }\n\n /**\n * Cancels the previous request when the debounced function changes (e.g: the debounceTimeMs\n * prop changes or there is a request in progress that cancels it).\n *\n * @param _new - The new debounced function.\n * @param old - The previous debounced function.\n * @internal\n */\n @Watch('emitQueryPreviewRequestUpdated')\n protected cancelEmitPreviewRequestUpdated(\n _new: DebouncedFunction<[SearchRequest]>,\n old: DebouncedFunction<[SearchRequest]>\n ): void {\n old.cancel();\n }\n\n /**\n * Emits an event when the query results are loaded or fail to load.\n *\n * @param status - The status of the query preview request.\n * @internal\n */\n @Watch('queryPreviewResults.status')\n emitLoad(status: RequestStatus | undefined): void {\n if (status === 'success') {\n this.$emit(this.results?.length ? 'load' : 'error', this.queryPreviewInfo.query);\n } else if (status === 'error') {\n this.$emit('error', this.queryPreviewInfo.query);\n }\n }\n }\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAsDE;;;;;;AAMG;AAOY,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,GAAG,CAAA;AA+D3C;;;;;;;;;AASG;AAEH,IAAA,IAAW,OAAO,GAAA;AAChB,QAAA,OAAO,IAAI,CAAC,mBAAmB,EAAE,OAAO,CAAC;KAC1C;AAUD;;;;;AAKG;AACH,IAAA,IAAc,mBAAmB,GAAA;QAC/B,MAA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E,QAAQ,CAAC;AACE,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,QAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAOpC,UAAA,CAAA;AADC,IAAA,KAAK,CAAC,gBAAgB,EAAE,QAAQ,CAAC;AACG,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,QAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAarC,UAAA,CAAA;IADC,QAAQ,CAAC,cAAc,CAAC;AAGxB,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,SAAA,EAAA,IAAA,CAAA,CAAA;AAQD,UAAA,CAAA;AADC,IAAA,MAAM,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;AACM,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,UAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAwGrC,UAAA,CAAA;IADC,KAAK,CAAC,gCAAgC,CAAC;AAMvC,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,iCAAA,EAAA,IAAA,CAAA,CAAA;AASD,UAAA,CAAA;IADC,KAAK,CAAC,4BAA4B,CAAC;AAOnC,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,UAAA,EAAA,IAAA,CAAA,CAAA;AAhNkB,YAAY,GAAA,UAAA,CAAA;AANhC,IAAA,SAAS,CAAC;AACT,QAAA,UAAU,EAAE;YACV,SAAS;AACV,SAAA;AACD,QAAA,MAAM,EAAE,CAAC,eAAe,CAAC,qBAAqB,CAAC,CAAC;KACjD,CAAC;AACmB,CAAA,EAAA,YAAY,CAiNhC,CAAA;aAjNoB,YAAY;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sources":["../../../../../src/x-modules/queries-preview/store/module.ts"],"sourcesContent":["import Vue from 'vue';\nimport { QueriesPreviewXStoreModule } from './types';\nimport { fetchQueryPreview } from './actions/fetch-query-preview.action';\nimport { fetchAndSaveQueryPreview } from './actions/fetch-and-save-query-preview.action';\nimport { loadedQueriesPreview } from './getters/loaded-queries-preview.getter';\n\n/**\n * {@link XStoreModule} For the `queries-preview` module.\n *\n * @internal\n */\nexport const queriesPreviewXStoreModule: QueriesPreviewXStoreModule = {\n state: () => ({\n config: {\n maxItemsToRequest: 24\n },\n queriesPreview: {},\n selectedQueryPreview: {\n query: '',\n extraParams: undefined\n },\n params: {}\n }),\n getters: { loadedQueriesPreview },\n mutations: {\n clearQueryPreview(state, query) {\n Vue.delete(state.queriesPreview, query);\n },\n setParams(state, params) {\n state.params = params;\n },\n setQueryPreview(state, queryPreview) {\n Vue.set(state.queriesPreview, queryPreview.request.query, queryPreview);\n },\n setStatus(state, { query, status }) {\n state.queriesPreview[query].status = status;\n },\n setSelectedQueryPreview(state, selectedQueryPreview) {\n state.selectedQueryPreview = selectedQueryPreview;\n }\n },\n actions: {\n fetchQueryPreview,\n fetchAndSaveQueryPreview\n }\n};\n"],"names":[],"mappings":";;;;;AAMA;;;;AAIG;AACU,MAAA,0BAA0B,GAA+B;AACpE,IAAA,KAAK,EAAE,OAAO;AACZ,QAAA,MAAM,EAAE;AACN,YAAA,iBAAiB,EAAE,EAAE;AACtB,SAAA;AACD,QAAA,cAAc,EAAE,EAAE;AAClB,QAAA,oBAAoB,EAAE;AACpB,YAAA,KAAK,EAAE,EAAE;AACT,YAAA,WAAW,EAAE,SAAS;
|
|
1
|
+
{"version":3,"file":"module.js","sources":["../../../../../src/x-modules/queries-preview/store/module.ts"],"sourcesContent":["import Vue from 'vue';\nimport { QueriesPreviewXStoreModule } from './types';\nimport { fetchQueryPreview } from './actions/fetch-query-preview.action';\nimport { fetchAndSaveQueryPreview } from './actions/fetch-and-save-query-preview.action';\nimport { loadedQueriesPreview } from './getters/loaded-queries-preview.getter';\n\n/**\n * {@link XStoreModule} For the `queries-preview` module.\n *\n * @internal\n */\nexport const queriesPreviewXStoreModule: QueriesPreviewXStoreModule = {\n state: () => ({\n config: {\n maxItemsToRequest: 24\n },\n queriesPreview: {},\n selectedQueryPreview: {\n query: '',\n extraParams: undefined,\n filters: undefined\n },\n params: {}\n }),\n getters: { loadedQueriesPreview },\n mutations: {\n clearQueryPreview(state, query) {\n Vue.delete(state.queriesPreview, query);\n },\n setParams(state, params) {\n state.params = params;\n },\n setQueryPreview(state, queryPreview) {\n Vue.set(state.queriesPreview, queryPreview.request.query, queryPreview);\n },\n setStatus(state, { query, status }) {\n state.queriesPreview[query].status = status;\n },\n setSelectedQueryPreview(state, selectedQueryPreview) {\n state.selectedQueryPreview = selectedQueryPreview;\n }\n },\n actions: {\n fetchQueryPreview,\n fetchAndSaveQueryPreview\n }\n};\n"],"names":[],"mappings":";;;;;AAMA;;;;AAIG;AACU,MAAA,0BAA0B,GAA+B;AACpE,IAAA,KAAK,EAAE,OAAO;AACZ,QAAA,MAAM,EAAE;AACN,YAAA,iBAAiB,EAAE,EAAE;AACtB,SAAA;AACD,QAAA,cAAc,EAAE,EAAE;AAClB,QAAA,oBAAoB,EAAE;AACpB,YAAA,KAAK,EAAE,EAAE;AACT,YAAA,WAAW,EAAE,SAAS;AACtB,YAAA,OAAO,EAAE,SAAS;AACnB,SAAA;AACD,QAAA,MAAM,EAAE,EAAE;KACX,CAAC;IACF,OAAO,EAAE,EAAE,oBAAoB,EAAE;AACjC,IAAA,SAAS,EAAE;QACT,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAA;YAC5B,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;SACzC;QACD,SAAS,CAAC,KAAK,EAAE,MAAM,EAAA;AACrB,YAAA,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;SACvB;QACD,eAAe,CAAC,KAAK,EAAE,YAAY,EAAA;AACjC,YAAA,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,cAAc,EAAE,YAAY,CAAC,OAAO,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;SACzE;AACD,QAAA,SAAS,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,EAAA;YAChC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,MAAM,CAAC;SAC7C;QACD,uBAAuB,CAAC,KAAK,EAAE,oBAAoB,EAAA;AACjD,YAAA,KAAK,CAAC,oBAAoB,GAAG,oBAAoB,CAAC;SACnD;AACF,KAAA;AACD,IAAA,OAAO,EAAE;QACP,iBAAiB;QACjB,wBAAwB;AACzB,KAAA;;;;;"}
|
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.413",
|
|
4
4
|
"description": "Empathy X Components",
|
|
5
5
|
"author": "Empathy Systems Corporation S.L.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -143,5 +143,5 @@
|
|
|
143
143
|
"access": "public",
|
|
144
144
|
"directory": "dist"
|
|
145
145
|
},
|
|
146
|
-
"gitHead": "
|
|
146
|
+
"gitHead": "d9a16ab46529038261f8dd5841ffb961e2286fea"
|
|
147
147
|
}
|
|
@@ -38321,6 +38321,33 @@
|
|
|
38321
38321
|
"endIndex": 3
|
|
38322
38322
|
}
|
|
38323
38323
|
},
|
|
38324
|
+
{
|
|
38325
|
+
"kind": "PropertySignature",
|
|
38326
|
+
"canonicalReference": "@empathyco/x-components!QueryPreviewInfo#filters:member",
|
|
38327
|
+
"docComment": "/**\n * The filters to perform the search.\n */\n",
|
|
38328
|
+
"excerptTokens": [
|
|
38329
|
+
{
|
|
38330
|
+
"kind": "Content",
|
|
38331
|
+
"text": "filters?: "
|
|
38332
|
+
},
|
|
38333
|
+
{
|
|
38334
|
+
"kind": "Content",
|
|
38335
|
+
"text": "string[]"
|
|
38336
|
+
},
|
|
38337
|
+
{
|
|
38338
|
+
"kind": "Content",
|
|
38339
|
+
"text": ";"
|
|
38340
|
+
}
|
|
38341
|
+
],
|
|
38342
|
+
"isReadonly": false,
|
|
38343
|
+
"isOptional": true,
|
|
38344
|
+
"releaseTag": "Public",
|
|
38345
|
+
"name": "filters",
|
|
38346
|
+
"propertyTypeTokenRange": {
|
|
38347
|
+
"startIndex": 1,
|
|
38348
|
+
"endIndex": 2
|
|
38349
|
+
}
|
|
38350
|
+
},
|
|
38324
38351
|
{
|
|
38325
38352
|
"kind": "PropertySignature",
|
|
38326
38353
|
"canonicalReference": "@empathyco/x-components!QueryPreviewInfo#query:member",
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Banner } from '@empathyco/x-types';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a {@link @empathyco/x-types#Banner | banners} stub.
|
|
4
|
+
*
|
|
5
|
+
* @returns Array of banners stub.
|
|
6
|
+
*
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export declare function getBannersStub(): Banner[];
|
|
10
|
+
/**
|
|
11
|
+
* Creates a banner.
|
|
12
|
+
*
|
|
13
|
+
* @param identifier - The banner identifier.
|
|
14
|
+
* @param banner - An optional object with fields to override the banner.
|
|
15
|
+
* @returns The banner.
|
|
16
|
+
*
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
export declare function createBannerStub(identifier: string, banner?: Partial<Banner>): Banner;
|
|
20
|
+
//# sourceMappingURL=banners-stubs.factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"banners-stubs.factory.d.ts","sourceRoot":"","sources":["../../../src/__stubs__/banners-stubs.factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C;;;;;;GAMG;AACH,wBAAgB,cAAc,IAAI,MAAM,EAAE,CASzC;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAarF"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SearchResponse } from '@empathyco/x-types';
|
|
2
|
+
/**
|
|
3
|
+
* Creates an empty {@link @empathyco/x-types#SearchResponse | search response} stub.
|
|
4
|
+
*
|
|
5
|
+
* @returns Object of an empty search response stub.
|
|
6
|
+
*
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export declare function getEmptySearchResponseStub(): SearchResponse;
|
|
10
|
+
//# sourceMappingURL=empty-search-response-stubs.factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"empty-search-response-stubs.factory.d.ts","sourceRoot":"","sources":["../../../src/__stubs__/empty-search-response-stubs.factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD;;;;;;GAMG;AACH,wBAAgB,0BAA0B,IAAI,cAAc,CAe3D"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { EditableNumberRangeFacet, EditableNumberRangeFilter, Facet, HierarchicalFacet, HierarchicalFilter, NumberRangeFacet, NumberRangeFilter, RangeValue, SimpleFacet, SimpleFilter } from '@empathyco/x-types';
|
|
2
|
+
import { CreateHierarchicalFilter } from './filters-stubs.factory';
|
|
3
|
+
/**
|
|
4
|
+
* Creates a {@link @empathyco/x-types#SimpleFacet | SimpleFacet} stub.
|
|
5
|
+
*
|
|
6
|
+
* @returns A SimpleFacet.
|
|
7
|
+
*
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export declare function getSimpleFacetStub(): SimpleFacet;
|
|
11
|
+
/**
|
|
12
|
+
* Creates a {@link @empathyco/x-types#HierarchicalFacet | HierarchicalFacet} stub.
|
|
13
|
+
*
|
|
14
|
+
* @returns A HierarchicalFacet.
|
|
15
|
+
*
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
export declare function getHierarchicalFacetStub(): HierarchicalFacet;
|
|
19
|
+
/**
|
|
20
|
+
* Creates a {@link @empathyco/x-types#NumberRangeFacet | NumberRangeFacet} stub.
|
|
21
|
+
*
|
|
22
|
+
* @returns A NumberRangeFacet.
|
|
23
|
+
*
|
|
24
|
+
* @internal
|
|
25
|
+
*/
|
|
26
|
+
export declare function getNumberRangeFacetStub(): NumberRangeFacet;
|
|
27
|
+
/**
|
|
28
|
+
* Creates a {@link @empathyco/x-types#Facet | facets} stub.
|
|
29
|
+
*
|
|
30
|
+
* @returns Array of facets stub.
|
|
31
|
+
*
|
|
32
|
+
* @internal
|
|
33
|
+
*/
|
|
34
|
+
export declare function getFacetsStub(): Facet[];
|
|
35
|
+
/**
|
|
36
|
+
* Creates a number facet given a label and its children. It uses the `label` properties for
|
|
37
|
+
* generating the ids of the filters.
|
|
38
|
+
*
|
|
39
|
+
* @param label - The facet label, also used for generating the facet id.
|
|
40
|
+
* @param createChildren - A function to create the child filters. This function is invoked with
|
|
41
|
+
* a factory to create each child filter, only providing the filter `value` and `selected`
|
|
42
|
+
* properties.
|
|
43
|
+
* @returns A number range facet for use in tests.
|
|
44
|
+
*/
|
|
45
|
+
export declare function createNumberRangeFacet(label: string, createChildren: (createNumberRangeFilter: (range: RangeValue, selected: boolean) => NumberRangeFilter) => NumberRangeFilter[]): NumberRangeFacet;
|
|
46
|
+
/**
|
|
47
|
+
* Function to create a single facet with one filter.
|
|
48
|
+
*
|
|
49
|
+
* @param category - Category to be used in the filter creation.
|
|
50
|
+
* @returns Facet with the filter added.
|
|
51
|
+
*/
|
|
52
|
+
export declare function createFacetWithFilter(category: string): SimpleFacet;
|
|
53
|
+
/**
|
|
54
|
+
* Creates a simple facet with the given parameters.
|
|
55
|
+
*
|
|
56
|
+
* @param label - Used for the facet `id` and `label` properties.
|
|
57
|
+
* @param createChildren - A function that returns the facet filters.
|
|
58
|
+
* @returns A simple facet.
|
|
59
|
+
*/
|
|
60
|
+
export declare function createSimpleFacetStub(label: string, createChildren: (createChild: (label: string, selected?: boolean, totalResults?: number) => SimpleFilter) => SimpleFilter[]): SimpleFacet;
|
|
61
|
+
/**
|
|
62
|
+
* Creates a number range facet with the given parameters.
|
|
63
|
+
*
|
|
64
|
+
* @param label - Used for the facet `id` and `label` properties.
|
|
65
|
+
* @param createChildren - A function that returns the facet filters.
|
|
66
|
+
* @returns A number range facet.
|
|
67
|
+
*/
|
|
68
|
+
export declare function createNumberRangeFacetStub(label: string, createChildren: (createChild: (range: RangeValue, selected?: boolean) => NumberRangeFilter) => NumberRangeFilter[]): NumberRangeFacet;
|
|
69
|
+
/**
|
|
70
|
+
* Creates an editable number range facet with the given parameters.
|
|
71
|
+
*
|
|
72
|
+
* @param label - Used for the facet `id` and `label` properties.
|
|
73
|
+
* @param createChildren - A function that returns the facet filters.
|
|
74
|
+
* @returns An editable number range facet.
|
|
75
|
+
*/
|
|
76
|
+
export declare function createEditableNumberRangeFacetStub(label: string, createChildren: (createChild: (range: RangeValue, selected?: boolean) => EditableNumberRangeFilter) => EditableNumberRangeFilter): EditableNumberRangeFacet;
|
|
77
|
+
/**
|
|
78
|
+
* Creates a hierarchical facet with the given parameters.
|
|
79
|
+
*
|
|
80
|
+
* @param label - Used for the facet `id` and `label` properties.
|
|
81
|
+
* @param createChildren - A function that returns the facet filters.
|
|
82
|
+
* @returns A hierarchical facet.
|
|
83
|
+
*/
|
|
84
|
+
export declare function createHierarchicalFacetStub(label: string, createChildren: (createChild: CreateHierarchicalFilter) => HierarchicalFilter[]): HierarchicalFacet;
|
|
85
|
+
//# sourceMappingURL=facets-stubs.factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"facets-stubs.factory.d.ts","sourceRoot":"","sources":["../../../src/__stubs__/facets-stubs.factory.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,KAAK,EACL,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,UAAU,EACV,WAAW,EACX,YAAY,EACb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAEL,wBAAwB,EAKz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BAA2B,CACzC,KAAK,EAAE,MAAM,EACb,cAAc,EAAE,CAAC,WAAW,EAAE,wBAAwB,KAAK,kBAAkB,EAAE,GAC9E,iBAAiB,CAQnB"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { EditableNumberRangeFilter, HierarchicalFilter, NumberRangeFilter, RangeValue, SimpleFilter, RawFilter } from '@empathyco/x-types';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a {@link @empathyco/x-types#SimpleFilter | SimpleFilter} stub.
|
|
4
|
+
*
|
|
5
|
+
* @param filter - A partial filter to override certain properties. Useful for testing.
|
|
6
|
+
* @returns A Simple filter.
|
|
7
|
+
*
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export declare function getSimpleFilterStub(filter?: Partial<SimpleFilter>): SimpleFilter;
|
|
11
|
+
/**
|
|
12
|
+
* Creates a {@link @empathyco/x-types#NumberRangeFilter | NumberRangeFilter} stub.
|
|
13
|
+
*
|
|
14
|
+
* @param filter - A partial filter to override certain properties. Useful for testing.
|
|
15
|
+
* @returns A Number range filter.
|
|
16
|
+
*
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
export declare function getNumberRangeFilterStub(filter?: Partial<NumberRangeFilter>): NumberRangeFilter;
|
|
20
|
+
/**
|
|
21
|
+
* Creates a {@link @empathyco/x-types#HierarchicalFilter | HierarchicalFilter} stub.
|
|
22
|
+
*
|
|
23
|
+
* @param filter - A partial filter to override certain properties. Useful for testing.
|
|
24
|
+
* @returns A Hierarchical filter.
|
|
25
|
+
*
|
|
26
|
+
* @internal
|
|
27
|
+
*/
|
|
28
|
+
export declare function getHierarchicalFilterStub(filter?: Partial<HierarchicalFilter>): HierarchicalFilter;
|
|
29
|
+
/**
|
|
30
|
+
* Creates a {@link @empathyco/x-types#RawFilter | RawFilter}.
|
|
31
|
+
*
|
|
32
|
+
* @param id - The identifier of the raw filter.
|
|
33
|
+
* @returns A {@link @empathyco/x-types#RawFilter | RawFilter} stub.
|
|
34
|
+
*/
|
|
35
|
+
export declare function createRawFilter(id: string): RawFilter;
|
|
36
|
+
/**
|
|
37
|
+
* Creates a {@link @empathyco/x-types#SimpleFilter | SimpleFilter}.
|
|
38
|
+
*
|
|
39
|
+
* @param facetId - The facet id this filter belongs to.
|
|
40
|
+
* @param label - The text that this filter should display.
|
|
41
|
+
* @param selected - True when the filter is checked, false otherwise.
|
|
42
|
+
* @param totalResults - Number of results matching the filter.
|
|
43
|
+
* @returns A stub for a {@link @empathyco/x-types#SimpleFilter | SimpleFilter}.
|
|
44
|
+
*/
|
|
45
|
+
export declare function createSimpleFilter(facetId: string, label: string, selected?: boolean, totalResults?: number): SimpleFilter;
|
|
46
|
+
/**
|
|
47
|
+
* Creates a {@link @empathyco/x-types#HierarchicalFilter | HierarchicalFilter}.
|
|
48
|
+
*
|
|
49
|
+
* @param facetId - The facet id this filter belongs to.
|
|
50
|
+
* @param label - The text that this filter should display.
|
|
51
|
+
* @param selected - True when the filter is checked, false otherwise.
|
|
52
|
+
* @param children - A list of ids of child filters.
|
|
53
|
+
* @returns A stub for a {@link @empathyco/x-types#HierarchicalFilter | HierarchicalFilter}.
|
|
54
|
+
*/
|
|
55
|
+
export declare function createHierarchicalFilter(facetId: string, label: string, selected?: boolean, children?: HierarchicalFilter[]): HierarchicalFilter;
|
|
56
|
+
/**
|
|
57
|
+
* Creates a {@link @empathyco/x-types#NumberRangeFilter | NumberRangeFilter}.
|
|
58
|
+
*
|
|
59
|
+
* @param facetId - The facet id this filter belongs to.
|
|
60
|
+
* @param range - The range that this filter has.
|
|
61
|
+
* @param selected - True if the filter is selected, false otherwise.
|
|
62
|
+
* @returns A stub for a
|
|
63
|
+
* {@link @empathyco/x-types#NumberRangeFilter | NumberRangeFilter}.
|
|
64
|
+
*/
|
|
65
|
+
export declare function createNumberRangeFilter(facetId: string, range?: RangeValue, selected?: boolean): NumberRangeFilter;
|
|
66
|
+
/**
|
|
67
|
+
* Creates a {@link @empathyco/x-types#EditableNumberRangeFilter | EditableNumberRangeFilter}.
|
|
68
|
+
*
|
|
69
|
+
* @param facetId - The facet id this filter belongs to.
|
|
70
|
+
* @param range - The range that this filter has.
|
|
71
|
+
* @param selected - The selected value which has priority over the range values.
|
|
72
|
+
* @returns A stub for a
|
|
73
|
+
* {@link @empathyco/x-types#EditableNumberRangeFilter | EditableNumberRangeFilter}.
|
|
74
|
+
*/
|
|
75
|
+
export declare function createEditableNumberRangeFilter(facetId: string, range?: RangeValue, selected?: boolean): EditableNumberRangeFilter;
|
|
76
|
+
/**
|
|
77
|
+
* Type of a function that creates
|
|
78
|
+
* {@link @empathyco/x-types#HierarchicalFilter | HierarchicalFilter}s. Based on its label,
|
|
79
|
+
* selected value and children.
|
|
80
|
+
*/
|
|
81
|
+
export type CreateHierarchicalFilter = (label: string, selected?: boolean, createChildren?: (createChildren: CreateHierarchicalFilter) => HierarchicalFilter[]) => HierarchicalFilter;
|
|
82
|
+
/**
|
|
83
|
+
* Creates a factory of
|
|
84
|
+
* {@link @empathyco/x-types#HierarchicalFilter | HierarchicalFilter}s.
|
|
85
|
+
*
|
|
86
|
+
* @remarks the id is created with `<facetId>:<label>`.
|
|
87
|
+
* @param facetId - Facet id to which the filter belongs.
|
|
88
|
+
* @param parentId - Filter's parent id if exists.
|
|
89
|
+
* @returns A scoped function which is able to create `HierarchicalFilters`.
|
|
90
|
+
*/
|
|
91
|
+
export declare function createHierarchicalFilterFactory(facetId: string, parentId?: HierarchicalFilter['id'] | null): CreateHierarchicalFilter;
|
|
92
|
+
//# sourceMappingURL=filters-stubs.factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filters-stubs.factory.d.ts","sourceRoot":"","sources":["../../../src/__stubs__/filters-stubs.factory.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,kBAAkB,EAClB,iBAAiB,EACjB,UAAU,EACV,YAAY,EACZ,SAAS,EACV,MAAM,oBAAoB,CAAC;AAE5B;;;;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,GAAE,kBAAkB,CAAC,IAAI,CAAC,GAAG,IAAW,GAC/C,wBAAwB,CAS1B"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { HistoryQuery } from '@empathyco/x-types';
|
|
2
|
+
import { DeepPartial } from '@empathyco/x-utils';
|
|
3
|
+
/**
|
|
4
|
+
* Creates a history query overriding default values with the ones passed.
|
|
5
|
+
*
|
|
6
|
+
* @param historyQuery - Partial history query to override default values.
|
|
7
|
+
* @returns A new history query with the values provided.
|
|
8
|
+
*
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export declare function createHistoryQuery(historyQuery: DeepPartial<HistoryQuery>): HistoryQuery;
|
|
12
|
+
/**
|
|
13
|
+
* Creates an array of history queries for the given set of queries.
|
|
14
|
+
*
|
|
15
|
+
* @param queries - The queries for creating the history queries.
|
|
16
|
+
* @returns An array containing a list of HistoryQueries.
|
|
17
|
+
*
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
20
|
+
export declare function createHistoryQueries(...queries: string[]): HistoryQuery[];
|
|
21
|
+
//# sourceMappingURL=history-queries-stubs.factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"history-queries-stubs.factory.d.ts","sourceRoot":"","sources":["../../../src/__stubs__/history-queries-stubs.factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,YAAY,CAOxF;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,OAAO,EAAE,MAAM,EAAE,GAAG,YAAY,EAAE,CAEzE"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export * from './banners-stubs.factory';
|
|
2
|
+
export * from './empty-search-response-stubs.factory';
|
|
3
|
+
export * from './facets-stubs.factory';
|
|
4
|
+
export * from './filters-stubs.factory';
|
|
5
|
+
export * from './history-queries-stubs.factory';
|
|
6
|
+
export * from './next-queries-stubs.factory';
|
|
7
|
+
export * from './partials-results-stubs.factory';
|
|
8
|
+
export * from './popular-searches-stubs.factory';
|
|
9
|
+
export * from './promoteds-stubs.factory';
|
|
10
|
+
export * from './queries-preview-stubs.factory';
|
|
11
|
+
export * from './query-suggestions-stubs.factory';
|
|
12
|
+
export * from './redirections-stubs.factory';
|
|
13
|
+
export * from './related-tags-stubs.factory';
|
|
14
|
+
export * from './results-stubs.factory';
|
|
15
|
+
export * from './search-response-stubs.factory';
|
|
16
|
+
export * from './semantic-queries-stubs.factory';
|
|
17
|
+
export * from './tagging-response-stubs.factory';
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/__stubs__/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,uCAAuC,CAAC;AACtD,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAClD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,kCAAkC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { NextQuery } from '@empathyco/x-types';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a {@link @empathyco/x-types#NextQuery | next queries} stub.
|
|
4
|
+
*
|
|
5
|
+
* @param amount - Number of stubbed next queries to create.
|
|
6
|
+
* @returns Array of next queries stub.
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export declare function getNextQueriesStub(amount?: number): NextQuery[];
|
|
10
|
+
/**
|
|
11
|
+
* Creates a next query stub with the provided options. If the name is the only property provided,
|
|
12
|
+
* it will be used to generate the facets, query, totalResults, results and modelName.
|
|
13
|
+
*
|
|
14
|
+
* @param query - The query of the next query.
|
|
15
|
+
* @param nextQuery - An optional object with fields to override the next query.
|
|
16
|
+
* @returns A next query.
|
|
17
|
+
*/
|
|
18
|
+
export declare function createNextQueryStub(query: string, nextQuery?: Partial<NextQuery>): NextQuery;
|
|
19
|
+
//# sourceMappingURL=next-queries-stubs.factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"next-queries-stubs.factory.d.ts","sourceRoot":"","sources":["../../../src/__stubs__/next-queries-stubs.factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,SAAI,GAAG,SAAS,EAAE,CAI1D;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,SAAS,CAU5F"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PartialResult } from '@empathyco/x-types';
|
|
2
|
+
/**
|
|
3
|
+
* Function to create partial results stub.
|
|
4
|
+
*
|
|
5
|
+
* @returns Array of partial results stub.
|
|
6
|
+
*/
|
|
7
|
+
export declare function getPartialResultsStub(): PartialResult[];
|
|
8
|
+
//# sourceMappingURL=partials-results-stubs.factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"partials-results-stubs.factory.d.ts","sourceRoot":"","sources":["../../../src/__stubs__/partials-results-stubs.factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGnD;;;;GAIG;AACH,wBAAgB,qBAAqB,IAAI,aAAa,EAAE,CAevD"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Suggestion } from '@empathyco/x-types';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a list of generic popular searches.
|
|
4
|
+
*
|
|
5
|
+
* @param amount - The number of popular searches to create.
|
|
6
|
+
*
|
|
7
|
+
* @returns An array of popular searches.
|
|
8
|
+
*/
|
|
9
|
+
export declare function getPopularSearchesStub(amount?: number): Suggestion[];
|
|
10
|
+
/**
|
|
11
|
+
* Creates a popular search stub with the provided options.
|
|
12
|
+
*
|
|
13
|
+
* @param query - The query of the suggestion.
|
|
14
|
+
* @param suggestion - An optional object with fields to override the suggestion.
|
|
15
|
+
*
|
|
16
|
+
* @returns A popular search.
|
|
17
|
+
*/
|
|
18
|
+
export declare function createPopularSearch(query: string, suggestion?: Partial<Suggestion>): Suggestion;
|
|
19
|
+
//# sourceMappingURL=popular-searches-stubs.factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popular-searches-stubs.factory.d.ts","sourceRoot":"","sources":["../../../src/__stubs__/popular-searches-stubs.factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,SAAI,GAAG,UAAU,EAAE,CAI/D;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,UAAU,CAU/F"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Promoted } from '@empathyco/x-types';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a {@link @empathyco/x-types#Promoted | Promoted} stub.
|
|
4
|
+
*
|
|
5
|
+
* @returns Array of Promoted stub.
|
|
6
|
+
*
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export declare function getPromotedsStub(): Promoted[];
|
|
10
|
+
/**
|
|
11
|
+
* Creates a promoted with a "unique" identifier.
|
|
12
|
+
*
|
|
13
|
+
* @param identifier - The promoted identifier.
|
|
14
|
+
* @param position - The promoted position inside the grid.
|
|
15
|
+
*
|
|
16
|
+
* @returns The promoted.
|
|
17
|
+
*
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
20
|
+
export declare function createPromotedStub(identifier: string, position?: number): Promoted;
|
|
21
|
+
//# sourceMappingURL=promoteds-stubs.factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promoteds-stubs.factory.d.ts","sourceRoot":"","sources":["../../../src/__stubs__/promoteds-stubs.factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C;;;;;;GAMG;AACH,wBAAgB,gBAAgB,IAAI,QAAQ,EAAE,CAS7C;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,QAAQ,CAelF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { SearchRequest } from '@empathyco/x-types';
|
|
2
|
+
import { QueryPreviewItem } from '../x-modules/queries-preview/store/types';
|
|
3
|
+
/**
|
|
4
|
+
* Creates a {@link QueryPreviewItem} stub.
|
|
5
|
+
*
|
|
6
|
+
* @param query - The query to set in the request.
|
|
7
|
+
* @param queryPreviewItem - The {@link QueryPreviewItem} data to overwrite the default stub.
|
|
8
|
+
* @returns A {@link QueryPreviewItem}.
|
|
9
|
+
*
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export declare const createQueryPreviewItem: (query: string, queryPreviewItem?: Partial<QueryPreviewItem>) => QueryPreviewItem;
|
|
13
|
+
/**
|
|
14
|
+
* Creates a queries preview search request stub.
|
|
15
|
+
*
|
|
16
|
+
* @param query - The query to set in the request.
|
|
17
|
+
* @returns A {@link SearchRequest} to use with queries preview.
|
|
18
|
+
*
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
export declare function getQueryPreviewRequest(query: string): SearchRequest;
|
|
22
|
+
//# sourceMappingURL=queries-preview-stubs.factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queries-preview-stubs.factory.d.ts","sourceRoot":"","sources":["../../../src/__stubs__/queries-preview-stubs.factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAG5E;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,EAAE,CACnC,KAAK,EAAE,MAAM,EACb,gBAAgB,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,KACzC,gBASJ,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,CAQnE"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Suggestion } from '@empathyco/x-types';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a list of generic query suggestions for the given query.
|
|
4
|
+
*
|
|
5
|
+
* @param query - The query the suggestions belong to.
|
|
6
|
+
* @param amount - The number of query suggestions to create.
|
|
7
|
+
*
|
|
8
|
+
* @returns An array of query suggestions.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getQuerySuggestionsStub(query: string, amount?: number): Suggestion[];
|
|
11
|
+
/**
|
|
12
|
+
* Creates a query suggestion stub with the provided options.
|
|
13
|
+
*
|
|
14
|
+
* @param query - The query of the suggestion.
|
|
15
|
+
* @param suggestion - An optional object with fields to override the suggestion.
|
|
16
|
+
*
|
|
17
|
+
* @returns A query suggestion.
|
|
18
|
+
*/
|
|
19
|
+
export declare function createQuerySuggestion(query: string, suggestion?: Partial<Suggestion>): Suggestion;
|
|
20
|
+
//# sourceMappingURL=query-suggestions-stubs.factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query-suggestions-stubs.factory.d.ts","sourceRoot":"","sources":["../../../src/__stubs__/query-suggestions-stubs.factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,SAAI,GAAG,UAAU,EAAE,CAI/E;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,UAAU,CAUjG"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Redirection } from '@empathyco/x-types';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a {@link @empathyco/x-types#Redirection | redirections} stub.
|
|
4
|
+
*
|
|
5
|
+
* @returns A list of redirections.
|
|
6
|
+
*
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export declare function getRedirectionsStub(): Redirection[];
|
|
10
|
+
/**
|
|
11
|
+
* Creates a redirection with a unique identifier.
|
|
12
|
+
*
|
|
13
|
+
* @param id - The redirection identifier.
|
|
14
|
+
*
|
|
15
|
+
* @returns A redirection.
|
|
16
|
+
*
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
export declare function createRedirectionStub(id: string): Redirection;
|
|
20
|
+
//# sourceMappingURL=redirections-stubs.factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"redirections-stubs.factory.d.ts","sourceRoot":"","sources":["../../../src/__stubs__/redirections-stubs.factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD;;;;;;GAMG;AACH,wBAAgB,mBAAmB,IAAI,WAAW,EAAE,CAEnD;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,MAAM,GAAG,WAAW,CAY7D"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { RelatedTag } from '@empathyco/x-types';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a {@link @empathyco/x-types#RelatedTag | related tags} stub.
|
|
4
|
+
*
|
|
5
|
+
* @param amount - Number of stubbed related tags to create.
|
|
6
|
+
*
|
|
7
|
+
* @returns Array of related tags stub.
|
|
8
|
+
*
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export declare function getRelatedTagsStub(amount?: number): RelatedTag[];
|
|
12
|
+
/**
|
|
13
|
+
* Creates a related tag stub with the provided options.
|
|
14
|
+
*
|
|
15
|
+
* @param query - The query of the related tag.
|
|
16
|
+
* @param tag - The related tag.
|
|
17
|
+
* @param relatedTag - An optional object with fields to override the related tag.
|
|
18
|
+
*
|
|
19
|
+
* @returns A related tag.
|
|
20
|
+
*/
|
|
21
|
+
export declare function createRelatedTagStub(query: string, tag: string, relatedTag?: Partial<RelatedTag>): RelatedTag;
|
|
22
|
+
//# sourceMappingURL=related-tags-stubs.factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"related-tags-stubs.factory.d.ts","sourceRoot":"","sources":["../../../src/__stubs__/related-tags-stubs.factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,SAAK,GAAG,UAAU,EAAE,CAI5D;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,MAAM,EACX,UAAU,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,GAC/B,UAAU,CAOZ"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Result } from '@empathyco/x-types';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a {@link @empathyco/x-types#Result | results} stub.
|
|
4
|
+
*
|
|
5
|
+
* @param amount - Number of stubbed results to create.
|
|
6
|
+
*
|
|
7
|
+
* @returns Array of results stub.
|
|
8
|
+
*
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export declare function getResultsStub(amount?: number): Result[];
|
|
12
|
+
/**
|
|
13
|
+
* Creates a result stub with the provided options. If the name is the only property provided,
|
|
14
|
+
* it will be used to generate the id, name, url and tagging.
|
|
15
|
+
*
|
|
16
|
+
* @param name - The name of the result.
|
|
17
|
+
* @param result - An optional object with fields to override the result.
|
|
18
|
+
*
|
|
19
|
+
* @returns A result.
|
|
20
|
+
*/
|
|
21
|
+
export declare function createResultStub(name: string, result?: Partial<Result>): Result;
|
|
22
|
+
//# sourceMappingURL=results-stubs.factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"results-stubs.factory.d.ts","sourceRoot":"","sources":["../../../src/__stubs__/results-stubs.factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAA2B,MAAM,oBAAoB,CAAC;AAGrE;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,MAAM,SAAI,GAAG,MAAM,EAAE,CAInD;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAyB/E"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SearchResponse } from '@empathyco/x-types';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a {@link @empathyco/x-types#SearchResponse | search response} stub.
|
|
4
|
+
*
|
|
5
|
+
* @returns Object of search response stub.
|
|
6
|
+
*
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export declare function getSearchResponseStub(): SearchResponse;
|
|
10
|
+
//# sourceMappingURL=search-response-stubs.factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-response-stubs.factory.d.ts","sourceRoot":"","sources":["../../../src/__stubs__/search-response-stubs.factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAQpD;;;;;;GAMG;AACH,wBAAgB,qBAAqB,IAAI,cAAc,CAYtD"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SemanticQueriesResponse, SemanticQuery } from '@empathyco/x-types';
|
|
2
|
+
import { DeepPartial } from '@empathyco/x-utils';
|
|
3
|
+
/**
|
|
4
|
+
* Creates a {@link SemanticQuery} stub with the provided options.
|
|
5
|
+
*
|
|
6
|
+
* @param semanticQuery - The data to create the stub.
|
|
7
|
+
*
|
|
8
|
+
* @returns A semantic query.
|
|
9
|
+
*/
|
|
10
|
+
export declare function createSemanticQuery(semanticQuery: DeepPartial<SemanticQuery>): SemanticQuery;
|
|
11
|
+
/**
|
|
12
|
+
* Creates a stub containing a list of {@link SemanticQuery}s.
|
|
13
|
+
*
|
|
14
|
+
* @returns A list of semantic queries stubs.
|
|
15
|
+
*/
|
|
16
|
+
export declare function getSemanticQueriesStub(): SemanticQueriesResponse;
|
|
17
|
+
//# sourceMappingURL=semantic-queries-stubs.factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"semantic-queries-stubs.factory.d.ts","sourceRoot":"","sources":["../../../src/__stubs__/semantic-queries-stubs.factory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,aAAa,EAAE,WAAW,CAAC,aAAa,CAAC,GAAG,aAAa,CAQ5F;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,IAAI,uBAAuB,CAoBhE"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TaggingRequest } from '@empathyco/x-types';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a {@link @empathyco/x-types#TaggingRequest | tagging response} stub.
|
|
4
|
+
*
|
|
5
|
+
* @returns Object of tagging response stub.
|
|
6
|
+
*
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export declare function getTaggingResponseStub(): TaggingRequest;
|
|
10
|
+
//# sourceMappingURL=tagging-response-stubs.factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tagging-response-stubs.factory.d.ts","sourceRoot":"","sources":["../../../src/__stubs__/tagging-response-stubs.factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD;;;;;;GAMG;AACH,wBAAgB,sBAAsB,IAAI,cAAc,CAUvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-preview-button.vue?rollup-plugin-vue=script.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/queries-preview/components/query-preview-button.vue?rollup-plugin-vue=script.ts"],"names":[],"mappings":"AAeE,OAAO,GAAG,MAAM,KAAK,CAAC;AAEtB,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAI5D;;;;;;;;GAQG;AAKH,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,GAAG;IACjD;;;;OAIG;IAEH,SAAS,CAAC,gBAAgB,EAAG,gBAAgB,CAAC;IAE9C;;OAEG;IAEI,MAAM,EAAG,UAAU,CAAC,OAAO,CAAC,CAAC;IAEpC;;;;;OAKG;IACH,SAAS,KAAK,oBAAoB,IAAI,gBAAgB,
|
|
1
|
+
{"version":3,"file":"query-preview-button.vue?rollup-plugin-vue=script.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/queries-preview/components/query-preview-button.vue?rollup-plugin-vue=script.ts"],"names":[],"mappings":"AAeE,OAAO,GAAG,MAAM,KAAK,CAAC;AAEtB,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAI5D;;;;;;;;GAQG;AAKH,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,GAAG;IACjD;;;;OAIG;IAEH,SAAS,CAAC,gBAAgB,EAAG,gBAAgB,CAAC;IAE9C;;OAEG;IAEI,MAAM,EAAG,UAAU,CAAC,OAAO,CAAC,CAAC;IAEpC;;;;;OAKG;IACH,SAAS,KAAK,oBAAoB,IAAI,gBAAgB,CASrD;IAED;;;;;;OAMG;IACH,SAAS,KAAK,MAAM,IAAI,OAAO,CAAC,YAAY,CAAC,CAE5C;CACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Vue from 'vue';
|
|
2
|
-
import { Dictionary } from '@empathyco/x-utils';
|
|
3
2
|
import { SearchRequest, Result } from '@empathyco/x-types';
|
|
3
|
+
import { Dictionary } from '@empathyco/x-utils';
|
|
4
4
|
import { RequestStatus } from '../../../store';
|
|
5
5
|
import { QueryFeature, FeatureLocation } from '../../../types/origin';
|
|
6
6
|
import { QueryPreviewInfo, QueryPreviewItem } from '../store/types';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-preview.vue?rollup-plugin-vue=script.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/queries-preview/components/query-preview.vue?rollup-plugin-vue=script.ts"],"names":[],"mappings":"AAmCE,OAAO,GAAG,MAAM,KAAK,CAAC;AAEtB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"query-preview.vue?rollup-plugin-vue=script.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/queries-preview/components/query-preview.vue?rollup-plugin-vue=script.ts"],"names":[],"mappings":"AAmCE,OAAO,GAAG,MAAM,KAAK,CAAC;AAEtB,OAAO,EAAE,aAAa,EAAE,MAAM,EAAU,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAa,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAM3D,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAIvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAGnD;;;;;;GAMG;AAOH,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,GAAG;IAC3C;;;;OAIG;IAEH,SAAS,CAAC,gBAAgB,EAAG,gBAAgB,CAAC;IAE9C;;;;OAIG;IAEH,SAAS,CAAC,YAAY,CAAC,EAAE,YAAY,CAAC;IAEtC;;;;OAIG;IAEH,SAAS,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAEpC;;;;OAIG;IAEI,cAAc,EAAG,MAAM,CAAC;IAE/B;;;;;OAKG;IAEI,cAAc,EAAG,OAAO,CAAC;IAEhC;;;OAGG;IAEI,cAAc,EAAG,UAAU,CAAC,gBAAgB,CAAC,CAAC;IAErD;;;OAGG;IAEI,MAAM,EAAG,UAAU,CAAC,OAAO,CAAC,CAAC;IAEpC;;;OAGG;IAEI,MAAM,EAAG,oBAAoB,CAAC;IAErC;;;;;;;;;OASG;IACH,IACW,OAAO,IAAI,MAAM,EAAE,GAAG,SAAS,CAEzC;IAED;;;;OAIG;IAEH,SAAS,CAAC,QAAQ,CAAC,EAAE,eAAe,CAAC;IAErC;;;;;OAKG;IACH,SAAS,KAAK,mBAAmB,IAAI,aAAa,CAsBjD;IAED;;;;OAIG;IACH,IAAW,mBAAmB,IAAI,OAAO,CAAC,gBAAgB,CAAC,GAAG,SAAS,CAQtE;IAED;;;;;OAKG;IACH,SAAS,KAAK,8BAA8B,IAAI,iBAAiB,CAAC,CAAC,aAAa,CAAC,CAAC,CAIjF;IAED;;;;OAIG;IACH,SAAS,CAAC,OAAO,IAAI,IAAI;IAYzB;;;;;;;OAOG;IACH,SAAS,CAAC,aAAa,IAAI,IAAI;IAW/B;;;;;;;OAOG;IAEH,SAAS,CAAC,+BAA+B,CACvC,IAAI,EAAE,iBAAiB,CAAC,CAAC,aAAa,CAAC,CAAC,EACxC,GAAG,EAAE,iBAAiB,CAAC,CAAC,aAAa,CAAC,CAAC,GACtC,IAAI;IAIP;;;;;OAKG;IAEH,QAAQ,CAAC,MAAM,EAAE,aAAa,GAAG,SAAS,GAAG,IAAI;CAOlD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/queries-preview/store/module.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAKrD;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,EAAE,
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/queries-preview/store/module.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAKrD;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,EAAE,0BAmCxC,CAAC"}
|
|
@@ -32,6 +32,8 @@ export interface QueryPreviewInfo {
|
|
|
32
32
|
query: string;
|
|
33
33
|
/** The extra params to perform the search. */
|
|
34
34
|
extraParams?: Dictionary<unknown>;
|
|
35
|
+
/** The filters to perform the search. */
|
|
36
|
+
filters?: string[];
|
|
35
37
|
/** An optional title for the container. */
|
|
36
38
|
title?: string;
|
|
37
39
|
/** Any other additional information to render the preview with. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/queries-preview/store/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AACrF,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAEvD;;;;GAIG;AACH,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD;;;;;OAKG;IACH,OAAO,EAAE,aAAa,CAAC;IACvB,4CAA4C;IAC5C,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,wDAAwD;IACxD,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,+BAA+B;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,8CAA8C;IAC9C,WAAW,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAClC,2CAA2C;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mEAAmE;IACnE,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAElC,cAAc,EAAE,UAAU,CAAC,gBAAgB,CAAC,CAAC;IAC7C,uDAAuD;IACvD,MAAM,EAAE,oBAAoB,CAAC;IAC7B,8CAA8C;IAC9C,MAAM,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAC5B,+CA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