@empathyco/x-components 3.0.0-alpha.280 → 3.0.0-alpha.282

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (21) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/design-system/full-theme.css +9 -10
  3. package/docs/API-reference/api/x-components.basesuggestions.md +2 -2
  4. package/docs/API-reference/api/x-components.historyquery.md +2 -2
  5. package/docs/API-reference/components/common/suggestions/x-components.base-suggestions.md +36 -0
  6. package/js/components/suggestions/base-suggestions.vue.js +2 -1
  7. package/js/components/suggestions/base-suggestions.vue.js.map +1 -1
  8. package/js/components/suggestions/base-suggestions.vue_rollup-plugin-vue_script.vue.js +3 -3
  9. package/js/components/suggestions/base-suggestions.vue_rollup-plugin-vue_script.vue.js.map +1 -1
  10. package/js/components/suggestions/base-suggestions.vue_rollup-plugin-vue_styles.0.vue.js +1 -1
  11. package/js/x-modules/history-queries/components/history-query.vue.js +1 -0
  12. package/js/x-modules/history-queries/components/history-query.vue.js.map +1 -1
  13. package/js/x-modules/history-queries/components/history-query.vue_rollup-plugin-vue_script.vue.js +3 -3
  14. package/js/x-modules/history-queries/components/history-query.vue_rollup-plugin-vue_script.vue.js.map +1 -1
  15. package/package.json +2 -2
  16. package/report/x-components.api.json +4 -4
  17. package/report/x-components.api.md +6 -2
  18. package/types/components/suggestions/base-suggestions.vue.d.ts +3 -1
  19. package/types/components/suggestions/base-suggestions.vue.d.ts.map +1 -1
  20. package/types/x-modules/history-queries/components/history-query.vue.d.ts +3 -2
  21. package/types/x-modules/history-queries/components/history-query.vue.d.ts.map +1 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,26 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ ## [3.0.0-alpha.282](https://github.com/empathyco/x/compare/@empathyco/x-components@3.0.0-alpha.281...@empathyco/x-components@3.0.0-alpha.282) (2023-01-17)
7
+
8
+
9
+ ### Features
10
+
11
+ * add dynamic classes to the suggestion item inside the `base-suggestions` (#1008) ([3e0b683](https://github.com/empathyco/x/commit/3e0b683eb83b9b2e9f6ebb0a17b80a9ff46d6e3c)), closes [EX-7834](https://searchbroker.atlassian.net/browse/EX-7834)
12
+
13
+
14
+
15
+ ## [3.0.0-alpha.281](https://github.com/empathyco/x/compare/@empathyco/x-components@3.0.0-alpha.280...@empathyco/x-components@3.0.0-alpha.281) (2023-01-16)
16
+
17
+
18
+ ### Features
19
+
20
+ * **history-queries:** add dynamic classes to the remove history query button (#1007) ([b5623d1](https://github.com/empathyco/x/commit/b5623d1c6f7f2709251164c6055b616218163c6f)), closes [EX-7833](https://searchbroker.atlassian.net/browse/EX-7833)
21
+
22
+
23
+
1
24
  # Change Log
2
25
 
3
26
  All notable changes to this project will be documented in this file. See
@@ -644,6 +644,15 @@
644
644
  --x-number-font-weight-facet-default: var(--x-number-font-weight-title3);
645
645
  --x-size-line-height-facet-default: var(--x-size-line-height-title3);
646
646
  }
647
+ .x-facet--line.x-facet,
648
+ .x-facet--line .x-facet {
649
+ --x-color-border-facet-header-default: var(--x-color-border-facet-header-line);
650
+ --x-size-border-width-facet-header-default: var(--x-size-border-width-facet-header-line);
651
+ --x-size-border-width-top-facet-header-default: var(--x-size-border-width-top-facet-header-line);
652
+ --x-size-border-width-right-facet-header-default: var(--x-size-border-width-right-facet-header-line);
653
+ --x-size-border-width-bottom-facet-header-default: var(--x-size-border-width-bottom-facet-header-line);
654
+ --x-size-border-width-left-facet-header-default: var(--x-size-border-width-left-facet-header-line);
655
+ }
647
656
  :root {
648
657
  --x-color-border-facet-header-line: var(--x-color-base-neutral-10);
649
658
  --x-size-border-width-facet-header-line: var(--x-size-border-width-base);
@@ -6660,13 +6669,3 @@
6660
6669
  .x-sticky {
6661
6670
  position: sticky !important;
6662
6671
  }
6663
-
6664
- .x-facet--line.x-facet,
6665
- .x-facet--line .x-facet {
6666
- --x-color-border-facet-header-default: var(--x-color-border-facet-header-line);
6667
- --x-size-border-width-facet-header-default: var(--x-size-border-width-facet-header-line);
6668
- --x-size-border-width-top-facet-header-default: var(--x-size-border-width-top-facet-header-line);
6669
- --x-size-border-width-right-facet-header-default: var(--x-size-border-width-right-facet-header-line);
6670
- --x-size-border-width-bottom-facet-header-default: var(--x-size-border-width-bottom-facet-header-line);
6671
- --x-size-border-width-left-facet-header-default: var(--x-size-border-width-left-facet-header-line);
6672
- }
@@ -9,9 +9,9 @@ Paints a list of suggestions passed in by prop. Requires a component for a singl
9
9
  <b>Signature:</b>
10
10
 
11
11
  ```typescript
12
- export default class BaseSuggestions extends Vue
12
+ export default class BaseSuggestions extends BaseSuggestions_base
13
13
  ```
14
- <b>Extends:</b> Vue
14
+ <b>Extends:</b> BaseSuggestions\_base
15
15
 
16
16
  ## Properties
17
17
 
@@ -9,9 +9,9 @@ This component renders a history query suggestion combining two buttons: one for
9
9
  <b>Signature:</b>
10
10
 
11
11
  ```typescript
12
- export default class HistoryQuery extends Vue
12
+ export default class HistoryQuery extends HistoryQuery_base
13
13
  ```
14
- <b>Extends:</b> Vue
14
+ <b>Extends:</b> HistoryQuery\_base
15
15
 
16
16
  ## Properties
17
17
 
@@ -153,3 +153,39 @@ export default {
153
153
  };
154
154
  </script>
155
155
  ```
156
+
157
+ In this example, the `contentClass` prop can be used to add classes to the suggestion item.
158
+
159
+ ```vue
160
+ <template>
161
+ <BaseSuggestions
162
+ :suggestions="suggestions"
163
+ suggestionItemClass="x-custom-class"
164
+ />
165
+ </template>
166
+
167
+ <script>
168
+ import { BaseSuggestions } from "@empathyco/x-components";
169
+
170
+ export default {
171
+ name: "BaseSuggestionsDemo",
172
+ components: {
173
+ BaseSuggestions
174
+ },
175
+ data() {
176
+ return {
177
+ suggestions: [
178
+ {
179
+ facets: [],
180
+ key: "chips",
181
+ query: "Chips",
182
+ totalResults: 10,
183
+ results: [],
184
+ modelName: "PopularSearch"
185
+ }
186
+ ]
187
+ };
188
+ }
189
+ };
190
+ </script>
191
+ ```
@@ -23,6 +23,7 @@ var __vue_render__ = function () {
23
23
  {
24
24
  key: _vm.suggestionsKeys[index],
25
25
  staticClass: "x-list x-suggestions__item",
26
+ class: _vm.suggestionItemClass,
26
27
  attrs: { "data-test": "suggestion-item" },
27
28
  },
28
29
  [
@@ -45,7 +46,7 @@ __vue_render__._withStripped = true;
45
46
  /* style */
46
47
  const __vue_inject_styles__ = undefined;
47
48
  /* scoped */
48
- const __vue_scope_id__ = "data-v-43ea023e";
49
+ const __vue_scope_id__ = "data-v-7cfe08e4";
49
50
  /* module identifier */
50
51
  const __vue_module_identifier__ = undefined;
51
52
  /* functional template */
@@ -1 +1 @@
1
- {"version":3,"file":"base-suggestions.vue.js","sources":["../../../../src/components/suggestions/base-suggestions.vue"],"sourcesContent":["<template>\n <component :is=\"animation\" v-if=\"suggestions.length\" tag=\"ul\" class=\"x-list x-suggestions\">\n <li\n v-for=\"(suggestion, index) in suggestionsToRender\"\n :key=\"suggestionsKeys[index]\"\n class=\"x-list x-suggestions__item\"\n data-test=\"suggestion-item\"\n >\n <!--\n @slot (Required) List item content\n @binding {Suggestion} suggestion - Suggestion data\n @binding {number} index - Suggestion index\n @binding {Filter | undefined} filter - Suggestion's filter\n -->\n <slot v-bind=\"{ suggestion, index, filter: getSuggestionFilter(suggestion) }\" />\n </li>\n </component>\n</template>\n\n<script lang=\"ts\">\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import { Suggestion, Facet, Filter } from '@empathyco/x-types';\n import { isArrayEmpty } from '../../utils/array';\n\n /**\n * Paints a list of suggestions passed in by prop. Requires a component for a single suggestion\n * in the default slot for working.\n *\n * @public\n */\n @Component\n export default class BaseSuggestions extends Vue {\n /**\n * The list of suggestions to render.\n *\n * @public\n */\n @Prop({ required: true })\n protected suggestions!: Suggestion[];\n\n /**\n * Animation component that will be used to animate the suggestion.\n *\n * @public\n */\n @Prop({ default: 'ul' })\n protected animation!: Vue | string;\n\n /**\n * Number of suggestions to be rendered.\n *\n * @public\n */\n @Prop()\n protected maxItemsToRender?: number;\n\n /**\n * Boolean value to indicate if the facets should be rendered.\n *\n * @public\n */\n @Prop({ default: false, type: Boolean })\n protected showFacets!: boolean;\n\n /**\n * When {@link BaseSuggestions.showFacets} is true, it indicates if the suggestion without\n * filter should be rendered.\n *\n * @public\n */\n @Prop({ default: false, type: Boolean })\n protected showPlainSuggestion!: boolean;\n\n /**\n * An array with the unique keys for each suggestion. Required by the `v-for` loop.\n *\n * @returns An array with the unique keys of the suggestions.\n * @internal\n */\n protected get suggestionsKeys(): string[] {\n return this.suggestionsToRender.map(suggestion =>\n isArrayEmpty(suggestion.facets)\n ? suggestion.query\n : `${suggestion.query}-in-${this.getFacetsKey(suggestion.facets)}`\n );\n }\n\n /**\n * Generates a string from the given facets.\n *\n * @param facets - The list of facets to reduce to a string.\n * @returns - A string representing the list of facets.\n * @internal\n */\n protected getFacetsKey(facets: Facet[]): string {\n // Component methods are bound by Vue:\n // eslint-disable-next-line @typescript-eslint/unbound-method\n return facets.map(this.getFacetKey).join('&');\n }\n\n /**\n * Generates a string from the given facet.\n *\n * @param facet - The facet to reduce to a string.\n * @returns - A string representing the facet.\n * @internal\n */\n protected getFacetKey(facet: Facet): string {\n return facet.filters.map(filter => filter.id).join('&');\n }\n\n /**\n * Creates a list of suggestions to render based on the configuration of this component.\n *\n * @returns - The list of suggestions to be rendered by this component.\n *\n * @internal\n */\n protected get suggestionsToRender(): Suggestion[] {\n return this.suggestions\n .flatMap(suggestion =>\n this.showFacets && suggestion.facets?.length\n ? this.showPlainSuggestion\n ? [{ ...suggestion, facets: [] }, ...this.expandSuggestionFilters(suggestion)]\n : this.expandSuggestionFilters(suggestion)\n : { ...suggestion, facets: [] }\n )\n .slice(0, this.maxItemsToRender);\n }\n\n /**\n * Creates a suggestion for each one of the filter inside each facet.\n *\n * @param suggestion - Suggestion to expand.\n * @returns A list of suggestions, each one with a single filter.\n *\n * @internal\n */\n protected expandSuggestionFilters(suggestion: Suggestion): Suggestion[] {\n return (\n suggestion.facets?.flatMap(facet =>\n facet.filters.map(filter => ({\n ...suggestion,\n facets: [{ ...facet, filters: [filter] }]\n }))\n ) ?? []\n );\n }\n\n /**\n * Returns the filter contained by the suggestion.\n *\n * @param suggestion - Suggestion containing the filter.\n * @returns The suggestion filter.\n * @internal\n */\n protected getSuggestionFilter(suggestion: Suggestion): Filter | undefined {\n return suggestion.facets?.[0]?.filters[0];\n }\n }\n</script>\n\n<style lang=\"scss\" scoped>\n .x-suggestions {\n list-style-type: none;\n }\n</style>\n\n<docs lang=\"mdx\">\n## Examples\n\nFor this component to work, you will need to set a list of suggestions as prop, and also to\nimplement the component for single suggestion, which handles the click event. In the following\nexample, the suggestions are retrieved from a property called `suggestions`, and the implementation\nof the suggestion component is a simple `button`, that calls the `emitSuggestionSelected` method\nwhen clicked.\n\n```vue\n<BaseSuggestions :suggestions=\"suggestions\">\n <template #default=\"{ suggestion }\">\n <button @click=\"emitSuggestionSelected($event, suggestion)\">\n {{ suggestion.query }}\n </button>\n </template>\n</BaseSuggestions>\n```\n\nFollowing the previous example, the component options object could be something like this:\n\n```js\nexport default {\n computed: {\n ...mapGetters(['x', 'querySuggestions'], { suggestions: 'suggestions' })\n },\n methods: {\n emitSuggestionSelected(event, suggestion) {\n this.$x.emit('UserAcceptedAQuery', suggestion.query, { target: event.target });\n this.$x.emit('UserSelectedAQuerySuggestion', suggestion, { target: event.target });\n }\n }\n};\n```\n\n### Play with props\n\nIn this example, the suggestions has been limited to render a maximum of 3 items. _Type \"puzzle\" or\nanother toy in the input field to try it out!_\n\n```vue\n<template>\n <BaseSuggestions :suggestions=\"suggestions\" :maxItemsToRender=\"3\" />\n</template>\n\n<script>\n import { BaseSuggestions } from '@empathyco/x-components';\n\n export default {\n name: 'BaseSuggestionsDemo',\n components: {\n BaseSuggestions\n },\n data() {\n return {\n suggestions: [\n {\n facets: [],\n key: 'chips',\n query: 'Chips',\n totalResults: 10,\n results: [],\n modelName: 'PopularSearch'\n }\n ]\n };\n }\n };\n</script>\n```\n\nIn this example, the filters of the suggestion will be rendered along with the query.\n\nThe `showPlainSuggestion` prop can be used to indicate if the suggestion without filter must be\nrendered along with the suggestion with filters.\n\nThis will render:\n\n- Chips //If `showPlainSuggestion` is true\n- Chips EXAMPLE\n\n```vue\n<template>\n <BaseSuggestions :suggestions=\"suggestions\" showFacets showPlainSuggestion />\n</template>\n\n<script>\n import { BaseSuggestions } from '@empathyco/x-components';\n\n export default {\n name: 'BaseSuggestionsDemo',\n components: {\n BaseSuggestions\n },\n data() {\n return {\n suggestions: [\n {\n facets: [\n {\n id: 'exampleFacet',\n label: 'exampleFacet',\n modelName: 'SimpleFacet',\n filters: [\n {\n facetId: 'exampleFacet',\n id: '{!tag=exampleFacet}exampleFacet_60361120_64009600:\"EXAMPLE\"',\n label: 'EXAMPLE',\n selected: false,\n totalResults: 10,\n modelName: 'SimpleFilter'\n }\n ]\n }\n ],\n key: 'chips',\n query: 'Chips',\n totalResults: 10,\n results: [],\n modelName: 'PopularSearch'\n }\n ]\n };\n }\n };\n</script>\n```\n</docs>\n"],"names":[],"mappings":";;;;;AAEA,MAAc,cAAA,GAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"base-suggestions.vue.js","sources":["../../../../src/components/suggestions/base-suggestions.vue"],"sourcesContent":["<template>\n <component :is=\"animation\" v-if=\"suggestions.length\" tag=\"ul\" class=\"x-list x-suggestions\">\n <li\n v-for=\"(suggestion, index) in suggestionsToRender\"\n :key=\"suggestionsKeys[index]\"\n class=\"x-list x-suggestions__item\"\n :class=\"suggestionItemClass\"\n data-test=\"suggestion-item\"\n >\n <!--\n @slot (Required) List item content\n @binding {Suggestion} suggestion - Suggestion data\n @binding {number} index - Suggestion index\n @binding {Filter | undefined} filter - Suggestion's filter\n -->\n <slot v-bind=\"{ suggestion, index, filter: getSuggestionFilter(suggestion) }\" />\n </li>\n </component>\n</template>\n\n<script lang=\"ts\">\n import Vue from 'vue';\n import { Component, Mixins, Prop } from 'vue-property-decorator';\n import { Suggestion, Facet, Filter } from '@empathyco/x-types';\n import { isArrayEmpty } from '../../utils/array';\n import { dynamicPropsMixin } from '../dynamic-props.mixin';\n\n /**\n * Paints a list of suggestions passed in by prop. Requires a component for a single suggestion\n * in the default slot for working.\n *\n * @public\n */\n @Component\n export default class BaseSuggestions extends Mixins(dynamicPropsMixin(['suggestionItemClass'])) {\n /**\n * The list of suggestions to render.\n *\n * @public\n */\n @Prop({ required: true })\n protected suggestions!: Suggestion[];\n\n /**\n * Animation component that will be used to animate the suggestion.\n *\n * @public\n */\n @Prop({ default: 'ul' })\n protected animation!: Vue | string;\n\n /**\n * Number of suggestions to be rendered.\n *\n * @public\n */\n @Prop()\n protected maxItemsToRender?: number;\n\n /**\n * Boolean value to indicate if the facets should be rendered.\n *\n * @public\n */\n @Prop({ default: false, type: Boolean })\n protected showFacets!: boolean;\n\n /**\n * When {@link BaseSuggestions.showFacets} is true, it indicates if the suggestion without\n * filter should be rendered.\n *\n * @public\n */\n @Prop({ default: false, type: Boolean })\n protected showPlainSuggestion!: boolean;\n\n /**\n * An array with the unique keys for each suggestion. Required by the `v-for` loop.\n *\n * @returns An array with the unique keys of the suggestions.\n * @internal\n */\n protected get suggestionsKeys(): string[] {\n return this.suggestionsToRender.map(suggestion =>\n isArrayEmpty(suggestion.facets)\n ? suggestion.query\n : `${suggestion.query}-in-${this.getFacetsKey(suggestion.facets)}`\n );\n }\n\n /**\n * Generates a string from the given facets.\n *\n * @param facets - The list of facets to reduce to a string.\n * @returns - A string representing the list of facets.\n * @internal\n */\n protected getFacetsKey(facets: Facet[]): string {\n // Component methods are bound by Vue:\n // eslint-disable-next-line @typescript-eslint/unbound-method\n return facets.map(this.getFacetKey).join('&');\n }\n\n /**\n * Generates a string from the given facet.\n *\n * @param facet - The facet to reduce to a string.\n * @returns - A string representing the facet.\n * @internal\n */\n protected getFacetKey(facet: Facet): string {\n return facet.filters.map(filter => filter.id).join('&');\n }\n\n /**\n * Creates a list of suggestions to render based on the configuration of this component.\n *\n * @returns - The list of suggestions to be rendered by this component.\n *\n * @internal\n */\n protected get suggestionsToRender(): Suggestion[] {\n return this.suggestions\n .flatMap(suggestion =>\n this.showFacets && suggestion.facets?.length\n ? this.showPlainSuggestion\n ? [{ ...suggestion, facets: [] }, ...this.expandSuggestionFilters(suggestion)]\n : this.expandSuggestionFilters(suggestion)\n : { ...suggestion, facets: [] }\n )\n .slice(0, this.maxItemsToRender);\n }\n\n /**\n * Creates a suggestion for each one of the filter inside each facet.\n *\n * @param suggestion - Suggestion to expand.\n * @returns A list of suggestions, each one with a single filter.\n *\n * @internal\n */\n protected expandSuggestionFilters(suggestion: Suggestion): Suggestion[] {\n return (\n suggestion.facets?.flatMap(facet =>\n facet.filters.map(filter => ({\n ...suggestion,\n facets: [{ ...facet, filters: [filter] }]\n }))\n ) ?? []\n );\n }\n\n /**\n * Returns the filter contained by the suggestion.\n *\n * @param suggestion - Suggestion containing the filter.\n * @returns The suggestion filter.\n * @internal\n */\n protected getSuggestionFilter(suggestion: Suggestion): Filter | undefined {\n return suggestion.facets?.[0]?.filters[0];\n }\n }\n</script>\n\n<style lang=\"scss\" scoped>\n .x-suggestions {\n list-style-type: none;\n }\n</style>\n\n<docs lang=\"mdx\">\n## Examples\n\nFor this component to work, you will need to set a list of suggestions as prop, and also to\nimplement the component for single suggestion, which handles the click event. In the following\nexample, the suggestions are retrieved from a property called `suggestions`, and the implementation\nof the suggestion component is a simple `button`, that calls the `emitSuggestionSelected` method\nwhen clicked.\n\n```vue\n<BaseSuggestions :suggestions=\"suggestions\">\n <template #default=\"{ suggestion }\">\n <button @click=\"emitSuggestionSelected($event, suggestion)\">\n {{ suggestion.query }}\n </button>\n </template>\n</BaseSuggestions>\n```\n\nFollowing the previous example, the component options object could be something like this:\n\n```js\nexport default {\n computed: {\n ...mapGetters(['x', 'querySuggestions'], { suggestions: 'suggestions' })\n },\n methods: {\n emitSuggestionSelected(event, suggestion) {\n this.$x.emit('UserAcceptedAQuery', suggestion.query, { target: event.target });\n this.$x.emit('UserSelectedAQuerySuggestion', suggestion, { target: event.target });\n }\n }\n};\n```\n\n### Play with props\n\nIn this example, the suggestions has been limited to render a maximum of 3 items. _Type \"puzzle\" or\nanother toy in the input field to try it out!_\n\n```vue\n<template>\n <BaseSuggestions :suggestions=\"suggestions\" :maxItemsToRender=\"3\" />\n</template>\n\n<script>\n import { BaseSuggestions } from '@empathyco/x-components';\n\n export default {\n name: 'BaseSuggestionsDemo',\n components: {\n BaseSuggestions\n },\n data() {\n return {\n suggestions: [\n {\n facets: [],\n key: 'chips',\n query: 'Chips',\n totalResults: 10,\n results: [],\n modelName: 'PopularSearch'\n }\n ]\n };\n }\n };\n</script>\n```\n\nIn this example, the filters of the suggestion will be rendered along with the query.\n\nThe `showPlainSuggestion` prop can be used to indicate if the suggestion without filter must be\nrendered along with the suggestion with filters.\n\nThis will render:\n\n- Chips //If `showPlainSuggestion` is true\n- Chips EXAMPLE\n\n```vue\n<template>\n <BaseSuggestions :suggestions=\"suggestions\" showFacets showPlainSuggestion />\n</template>\n\n<script>\n import { BaseSuggestions } from '@empathyco/x-components';\n\n export default {\n name: 'BaseSuggestionsDemo',\n components: {\n BaseSuggestions\n },\n data() {\n return {\n suggestions: [\n {\n facets: [\n {\n id: 'exampleFacet',\n label: 'exampleFacet',\n modelName: 'SimpleFacet',\n filters: [\n {\n facetId: 'exampleFacet',\n id: '{!tag=exampleFacet}exampleFacet_60361120_64009600:\"EXAMPLE\"',\n label: 'EXAMPLE',\n selected: false,\n totalResults: 10,\n modelName: 'SimpleFilter'\n }\n ]\n }\n ],\n key: 'chips',\n query: 'Chips',\n totalResults: 10,\n results: [],\n modelName: 'PopularSearch'\n }\n ]\n };\n }\n };\n</script>\n```\n\nIn this example, the `contentClass` prop can be used to add classes to the suggestion item.\n\n```vue\n<template>\n <BaseSuggestions :suggestions=\"suggestions\" suggestionItemClass=\"x-custom-class\" />\n</template>\n\n<script>\n import { BaseSuggestions } from '@empathyco/x-components';\n\n export default {\n name: 'BaseSuggestionsDemo',\n components: {\n BaseSuggestions\n },\n data() {\n return {\n suggestions: [\n {\n facets: [],\n key: 'chips',\n query: 'Chips',\n totalResults: 10,\n results: [],\n modelName: 'PopularSearch'\n }\n ]\n };\n }\n };\n</script>\n```\n</docs>\n"],"names":[],"mappings":";;;;;AAEA,MAAc,cAAA,GAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { __decorate } from 'tslib';
2
- import Vue from 'vue';
3
- import { Prop, Component } from 'vue-property-decorator';
2
+ import { Mixins, Prop, Component } from 'vue-property-decorator';
4
3
  import { isArrayEmpty } from '../../utils/array.js';
4
+ import { dynamicPropsMixin } from '../dynamic-props.mixin.js';
5
5
 
6
6
  /**
7
7
  * Paints a list of suggestions passed in by prop. Requires a component for a single suggestion
@@ -9,7 +9,7 @@ import { isArrayEmpty } from '../../utils/array.js';
9
9
  *
10
10
  * @public
11
11
  */
12
- let BaseSuggestions = class BaseSuggestions extends Vue {
12
+ let BaseSuggestions = class BaseSuggestions extends Mixins(dynamicPropsMixin(['suggestionItemClass'])) {
13
13
  /**
14
14
  * An array with the unique keys for each suggestion. Required by the `v-for` loop.
15
15
  *
@@ -1 +1 @@
1
- {"version":3,"file":"base-suggestions.vue_rollup-plugin-vue_script.vue.js","sources":["../../../../src/components/suggestions/base-suggestions.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 import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import { Suggestion, Facet, Filter } from '@empathyco/x-types';\n import { isArrayEmpty } from '../../utils/array';\n\n /**\n * Paints a list of suggestions passed in by prop. Requires a component for a single suggestion\n * in the default slot for working.\n *\n * @public\n */\n @Component\n export default class BaseSuggestions extends Vue {\n /**\n * The list of suggestions to render.\n *\n * @public\n */\n @Prop({ required: true })\n protected suggestions!: Suggestion[];\n\n /**\n * Animation component that will be used to animate the suggestion.\n *\n * @public\n */\n @Prop({ default: 'ul' })\n protected animation!: Vue | string;\n\n /**\n * Number of suggestions to be rendered.\n *\n * @public\n */\n @Prop()\n protected maxItemsToRender?: number;\n\n /**\n * Boolean value to indicate if the facets should be rendered.\n *\n * @public\n */\n @Prop({ default: false, type: Boolean })\n protected showFacets!: boolean;\n\n /**\n * When {@link BaseSuggestions.showFacets} is true, it indicates if the suggestion without\n * filter should be rendered.\n *\n * @public\n */\n @Prop({ default: false, type: Boolean })\n protected showPlainSuggestion!: boolean;\n\n /**\n * An array with the unique keys for each suggestion. Required by the `v-for` loop.\n *\n * @returns An array with the unique keys of the suggestions.\n * @internal\n */\n protected get suggestionsKeys(): string[] {\n return this.suggestionsToRender.map(suggestion =>\n isArrayEmpty(suggestion.facets)\n ? suggestion.query\n : `${suggestion.query}-in-${this.getFacetsKey(suggestion.facets)}`\n );\n }\n\n /**\n * Generates a string from the given facets.\n *\n * @param facets - The list of facets to reduce to a string.\n * @returns - A string representing the list of facets.\n * @internal\n */\n protected getFacetsKey(facets: Facet[]): string {\n // Component methods are bound by Vue:\n // eslint-disable-next-line @typescript-eslint/unbound-method\n return facets.map(this.getFacetKey).join('&');\n }\n\n /**\n * Generates a string from the given facet.\n *\n * @param facet - The facet to reduce to a string.\n * @returns - A string representing the facet.\n * @internal\n */\n protected getFacetKey(facet: Facet): string {\n return facet.filters.map(filter => filter.id).join('&');\n }\n\n /**\n * Creates a list of suggestions to render based on the configuration of this component.\n *\n * @returns - The list of suggestions to be rendered by this component.\n *\n * @internal\n */\n protected get suggestionsToRender(): Suggestion[] {\n return this.suggestions\n .flatMap(suggestion =>\n this.showFacets && suggestion.facets?.length\n ? this.showPlainSuggestion\n ? [{ ...suggestion, facets: [] }, ...this.expandSuggestionFilters(suggestion)]\n : this.expandSuggestionFilters(suggestion)\n : { ...suggestion, facets: [] }\n )\n .slice(0, this.maxItemsToRender);\n }\n\n /**\n * Creates a suggestion for each one of the filter inside each facet.\n *\n * @param suggestion - Suggestion to expand.\n * @returns A list of suggestions, each one with a single filter.\n *\n * @internal\n */\n protected expandSuggestionFilters(suggestion: Suggestion): Suggestion[] {\n return (\n suggestion.facets?.flatMap(facet =>\n facet.filters.map(filter => ({\n ...suggestion,\n facets: [{ ...facet, filters: [filter] }]\n }))\n ) ?? []\n );\n }\n\n /**\n * Returns the filter contained by the suggestion.\n *\n * @param suggestion - Suggestion containing the filter.\n * @returns The suggestion filter.\n * @internal\n */\n protected getSuggestionFilter(suggestion: Suggestion): Filter | undefined {\n return suggestion.facets?.[0]?.filters[0];\n }\n }\n"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"base-suggestions.vue_rollup-plugin-vue_script.vue.js","sources":["../../../../src/components/suggestions/base-suggestions.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 import Vue from 'vue';\n import { Component, Mixins, Prop } from 'vue-property-decorator';\n import { Suggestion, Facet, Filter } from '@empathyco/x-types';\n import { isArrayEmpty } from '../../utils/array';\n import { dynamicPropsMixin } from '../dynamic-props.mixin';\n\n /**\n * Paints a list of suggestions passed in by prop. Requires a component for a single suggestion\n * in the default slot for working.\n *\n * @public\n */\n @Component\n export default class BaseSuggestions extends Mixins(dynamicPropsMixin(['suggestionItemClass'])) {\n /**\n * The list of suggestions to render.\n *\n * @public\n */\n @Prop({ required: true })\n protected suggestions!: Suggestion[];\n\n /**\n * Animation component that will be used to animate the suggestion.\n *\n * @public\n */\n @Prop({ default: 'ul' })\n protected animation!: Vue | string;\n\n /**\n * Number of suggestions to be rendered.\n *\n * @public\n */\n @Prop()\n protected maxItemsToRender?: number;\n\n /**\n * Boolean value to indicate if the facets should be rendered.\n *\n * @public\n */\n @Prop({ default: false, type: Boolean })\n protected showFacets!: boolean;\n\n /**\n * When {@link BaseSuggestions.showFacets} is true, it indicates if the suggestion without\n * filter should be rendered.\n *\n * @public\n */\n @Prop({ default: false, type: Boolean })\n protected showPlainSuggestion!: boolean;\n\n /**\n * An array with the unique keys for each suggestion. Required by the `v-for` loop.\n *\n * @returns An array with the unique keys of the suggestions.\n * @internal\n */\n protected get suggestionsKeys(): string[] {\n return this.suggestionsToRender.map(suggestion =>\n isArrayEmpty(suggestion.facets)\n ? suggestion.query\n : `${suggestion.query}-in-${this.getFacetsKey(suggestion.facets)}`\n );\n }\n\n /**\n * Generates a string from the given facets.\n *\n * @param facets - The list of facets to reduce to a string.\n * @returns - A string representing the list of facets.\n * @internal\n */\n protected getFacetsKey(facets: Facet[]): string {\n // Component methods are bound by Vue:\n // eslint-disable-next-line @typescript-eslint/unbound-method\n return facets.map(this.getFacetKey).join('&');\n }\n\n /**\n * Generates a string from the given facet.\n *\n * @param facet - The facet to reduce to a string.\n * @returns - A string representing the facet.\n * @internal\n */\n protected getFacetKey(facet: Facet): string {\n return facet.filters.map(filter => filter.id).join('&');\n }\n\n /**\n * Creates a list of suggestions to render based on the configuration of this component.\n *\n * @returns - The list of suggestions to be rendered by this component.\n *\n * @internal\n */\n protected get suggestionsToRender(): Suggestion[] {\n return this.suggestions\n .flatMap(suggestion =>\n this.showFacets && suggestion.facets?.length\n ? this.showPlainSuggestion\n ? [{ ...suggestion, facets: [] }, ...this.expandSuggestionFilters(suggestion)]\n : this.expandSuggestionFilters(suggestion)\n : { ...suggestion, facets: [] }\n )\n .slice(0, this.maxItemsToRender);\n }\n\n /**\n * Creates a suggestion for each one of the filter inside each facet.\n *\n * @param suggestion - Suggestion to expand.\n * @returns A list of suggestions, each one with a single filter.\n *\n * @internal\n */\n protected expandSuggestionFilters(suggestion: Suggestion): Suggestion[] {\n return (\n suggestion.facets?.flatMap(facet =>\n facet.filters.map(filter => ({\n ...suggestion,\n facets: [{ ...facet, filters: [filter] }]\n }))\n ) ?? []\n );\n }\n\n /**\n * Returns the filter contained by the suggestion.\n *\n * @param suggestion - Suggestion containing the filter.\n * @returns The suggestion filter.\n * @internal\n */\n protected getSuggestionFilter(suggestion: Suggestion): Filter | undefined {\n return suggestion.facets?.[0]?.filters[0];\n }\n }\n"],"names":[],"mappings":"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"}
@@ -1,6 +1,6 @@
1
1
  import { createInjector, createInjectorSSR } from 'vue-runtime-helpers';
2
2
 
3
- var css = ".x-suggestions[data-v-43ea023e] {\n list-style-type: none;\n}";
3
+ var css = ".x-suggestions[data-v-7cfe08e4] {\n list-style-type: none;\n}";
4
4
  const isBrowser = /*#__PURE__*/ (function () {
5
5
  return (
6
6
  Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) !==
@@ -52,6 +52,7 @@ var __vue_render__ = function () {
52
52
  "RemoveHistoryQuery",
53
53
  {
54
54
  staticClass: "x-history-query__remove x-suggestion-group-button",
55
+ class: _vm.removeHistoryQueryClass,
55
56
  attrs: {
56
57
  historyQuery: _vm.suggestion,
57
58
  "data-test": "remove-history-query",
@@ -1 +1 @@
1
- {"version":3,"file":"history-query.vue.js","sources":["../../../../../src/x-modules/history-queries/components/history-query.vue"],"sourcesContent":["<template>\n <div class=\"x-history-query x-suggestion-group\">\n <BaseSuggestion\n class=\"x-history-query__suggestion\"\n v-bind=\"{ suggestion, suggestionSelectedEvents, query }\"\n data-test=\"history-query\"\n feature=\"history_query\"\n #default=\"baseScope\"\n >\n <!-- eslint-disable max-len -->\n <!--\n @slot History Query content\n @binding {Object} v-bind - `BaseSuggestion` default slot scope: **suggestion** <code>Suggestion</code> - Suggestion data<br /> **query** <code>string</code> - The query that the suggestion belongs to<br /> **filter** <code>Filter \\| undefined</code> - Suggestion's filter\n -->\n <!-- eslint-enable max-len -->\n <slot v-bind=\"{ ...baseScope }\" />\n </BaseSuggestion>\n <RemoveHistoryQuery\n class=\"x-history-query__remove x-suggestion-group-button\"\n :historyQuery=\"suggestion\"\n data-test=\"remove-history-query\"\n >\n <!--\n @slot History Query remove button content\n @binding {Suggestion} suggestion - History Query suggestion data\n -->\n <slot name=\"remove-button-content\" v-bind=\"{ suggestion }\">✕</slot>\n </RemoveHistoryQuery>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { HistoryQuery as HistoryQueryModel } from '@empathyco/x-types';\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import { Getter } from '../../../components/decorators/store.decorators';\n import Highlight from '../../../components/highlight.vue';\n import BaseSuggestion from '../../../components/suggestions/base-suggestion.vue';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { XEventsTypes } from '../../../wiring/events.types';\n import { historyQueriesXModule } from '../x-module';\n import RemoveHistoryQuery from './remove-history-query.vue';\n\n /**\n * This component renders a history query suggestion combining two buttons: one for selecting this\n * suggestion as the search query, and another one to remove this query suggestion from the\n * history queries.\n *\n * @public\n */\n @Component({\n mixins: [xComponentMixin(historyQueriesXModule)],\n components: { Highlight, RemoveHistoryQuery, BaseSuggestion }\n })\n export default class HistoryQuery extends Vue {\n /**\n * The history query suggestion to render.\n *\n * @public\n */\n @Prop({ required: true })\n protected suggestion!: HistoryQueryModel;\n\n /**\n * The normalized query of the history-queries module.\n *\n * @internal\n */\n @Getter('historyQueries', 'normalizedQuery')\n public query!: string;\n\n /**\n * The list of events that are going to be emitted when the suggestion button is pressed.\n *\n * @internal\n * @returns The {@link XEvent | XEvents} to emit.\n */\n protected get suggestionSelectedEvents(): Partial<XEventsTypes> {\n return {\n UserSelectedAHistoryQuery: this.suggestion\n };\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n## Examples\n\n### Basic usage\n\nThis component only requires a prop called `suggestion`\n\n```vue live\n<template>\n <HistoryQuery :suggestion=\"suggestion\" />\n</template>\n\n<script>\n import { HistoryQuery } from '@empathyco/x-components/history-queries';\n export default {\n name: 'HistoryQueryDemo',\n components: {\n HistoryQuery\n },\n data() {\n return {\n suggestion: {\n modelName: 'HistoryQuery',\n query: 'trousers',\n facets: []\n }\n };\n }\n };\n</script>\n```\n\n### Customizing slots content\n\nSuggestion and remove buttons contents can be customized.\n\nThe default slot allows you to replace the content of the suggestion button. It has two properties,\nthe suggestion itself, and a `string` of HTML with the matched query.\n\nThe other slot is called `remove-button-content`, and allows you to set the content of the button\nthat serves to remove this query from the history. This slot only has one property, the suggestion.\n\n```vue live\n<template>\n <HistoryQuery :suggestion=\"suggestion\">\n <template #default=\"{ suggestion }\">\n <HistoryIcon />\n <Highlight highlight=\"tro\" :text=\"suggestion.query\" />\n </template>\n\n <template #remove-button-content=\"{ suggestion }\">\n <CrossIcon />\n </template>\n </HistoryQuery>\n</template>\n\n<script>\n import { HistoryQuery } from '@empathyco/x-components/history-queries';\n import { HistoryIcon, CrossIcon, Highlight } from '@empathyco/x-components';\n\n export default {\n name: 'HistoryQueryDemo',\n components: {\n HistoryQuery,\n HistoryIcon,\n CrossIcon,\n Highlight\n },\n data() {\n return {\n suggestion: {\n modelName: 'HistoryQuery',\n query: 'trousers',\n facets: []\n }\n };\n }\n };\n</script>\n```\n\n## Events\n\nA list of events that the component will emit:\n\n- `UserSelectedAHistoryQuery`: the event is emitted after the user clicks the button. The event\n payload is the history query data.\n</docs>\n"],"names":[],"mappings":";;;;AAEA,MAAc,cAAA,GAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"history-query.vue.js","sources":["../../../../../src/x-modules/history-queries/components/history-query.vue"],"sourcesContent":["<template>\n <div class=\"x-history-query x-suggestion-group\">\n <BaseSuggestion\n class=\"x-history-query__suggestion\"\n v-bind=\"{ suggestion, suggestionSelectedEvents, query }\"\n data-test=\"history-query\"\n feature=\"history_query\"\n #default=\"baseScope\"\n >\n <!-- eslint-disable max-len -->\n <!--\n @slot History Query content\n @binding {Object} v-bind - `BaseSuggestion` default slot scope: **suggestion** <code>Suggestion</code> - Suggestion data<br /> **query** <code>string</code> - The query that the suggestion belongs to<br /> **filter** <code>Filter \\| undefined</code> - Suggestion's filter\n -->\n <!-- eslint-enable max-len -->\n <slot v-bind=\"{ ...baseScope }\" />\n </BaseSuggestion>\n <RemoveHistoryQuery\n class=\"x-history-query__remove x-suggestion-group-button\"\n :class=\"removeHistoryQueryClass\"\n :historyQuery=\"suggestion\"\n data-test=\"remove-history-query\"\n >\n <!--\n @slot History Query remove button content\n @binding {Suggestion} suggestion - History Query suggestion data\n -->\n <slot name=\"remove-button-content\" v-bind=\"{ suggestion }\">✕</slot>\n </RemoveHistoryQuery>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { HistoryQuery as HistoryQueryModel } from '@empathyco/x-types';\n import { Component, Mixins, Prop } from 'vue-property-decorator';\n import { Getter } from '../../../components/decorators/store.decorators';\n import Highlight from '../../../components/highlight.vue';\n import BaseSuggestion from '../../../components/suggestions/base-suggestion.vue';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { XEventsTypes } from '../../../wiring/events.types';\n import { historyQueriesXModule } from '../x-module';\n import { dynamicPropsMixin } from '../../../components/dynamic-props.mixin';\n import RemoveHistoryQuery from './remove-history-query.vue';\n\n /**\n * This component renders a history query suggestion combining two buttons: one for selecting this\n * suggestion as the search query, and another one to remove this query suggestion from the\n * history queries.\n *\n * @public\n */\n @Component({\n mixins: [xComponentMixin(historyQueriesXModule)],\n components: { Highlight, RemoveHistoryQuery, BaseSuggestion }\n })\n export default class HistoryQuery extends Mixins(dynamicPropsMixin(['removeHistoryQueryClass'])) {\n /**\n * The history query suggestion to render.\n *\n * @public\n */\n @Prop({ required: true })\n protected suggestion!: HistoryQueryModel;\n\n /**\n * The normalized query of the history-queries module.\n *\n * @internal\n */\n @Getter('historyQueries', 'normalizedQuery')\n public query!: string;\n\n /**\n * The list of events that are going to be emitted when the suggestion button is pressed.\n *\n * @internal\n * @returns The {@link XEvent | XEvents} to emit.\n */\n protected get suggestionSelectedEvents(): Partial<XEventsTypes> {\n return {\n UserSelectedAHistoryQuery: this.suggestion\n };\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n## Examples\n\n### Basic usage\n\nThis component only requires a prop called `suggestion`\n\n```vue live\n<template>\n <HistoryQuery :suggestion=\"suggestion\" />\n</template>\n\n<script>\n import { HistoryQuery } from '@empathyco/x-components/history-queries';\n export default {\n name: 'HistoryQueryDemo',\n components: {\n HistoryQuery\n },\n data() {\n return {\n suggestion: {\n modelName: 'HistoryQuery',\n query: 'trousers',\n facets: []\n }\n };\n }\n };\n</script>\n```\n\n### Customizing slots content\n\nSuggestion and remove buttons contents can be customized.\n\nThe default slot allows you to replace the content of the suggestion button. It has two properties,\nthe suggestion itself, and a `string` of HTML with the matched query.\n\nThe other slot is called `remove-button-content`, and allows you to set the content of the button\nthat serves to remove this query from the history. This slot only has one property, the suggestion.\n\n```vue live\n<template>\n <HistoryQuery :suggestion=\"suggestion\">\n <template #default=\"{ suggestion }\">\n <HistoryIcon />\n <Highlight highlight=\"tro\" :text=\"suggestion.query\" />\n </template>\n\n <template #remove-button-content=\"{ suggestion }\">\n <CrossIcon />\n </template>\n </HistoryQuery>\n</template>\n\n<script>\n import { HistoryQuery } from '@empathyco/x-components/history-queries';\n import { HistoryIcon, CrossIcon, Highlight } from '@empathyco/x-components';\n\n export default {\n name: 'HistoryQueryDemo',\n components: {\n HistoryQuery,\n HistoryIcon,\n CrossIcon,\n Highlight\n },\n data() {\n return {\n suggestion: {\n modelName: 'HistoryQuery',\n query: 'trousers',\n facets: []\n }\n };\n }\n };\n</script>\n```\n\n## Events\n\nA list of events that the component will emit:\n\n- `UserSelectedAHistoryQuery`: the event is emitted after the user clicks the button. The event\n payload is the history query data.\n</docs>\n"],"names":[],"mappings":";;;;AAEA,MAAc,cAAA,GAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,11 +1,11 @@
1
1
  import { __decorate } from 'tslib';
2
- import Vue from 'vue';
3
- import { Prop, Component } from 'vue-property-decorator';
2
+ import { Mixins, Prop, Component } from 'vue-property-decorator';
4
3
  import { Getter } from '../../../components/decorators/store.decorators.js';
5
4
  import __vue_component__ from '../../../components/highlight.vue.js';
6
5
  import __vue_component__$2 from '../../../components/suggestions/base-suggestion.vue.js';
7
6
  import { xComponentMixin } from '../../../components/x-component.mixin.js';
8
7
  import { historyQueriesXModule } from '../x-module.js';
8
+ import { dynamicPropsMixin } from '../../../components/dynamic-props.mixin.js';
9
9
  import __vue_component__$1 from './remove-history-query.vue.js';
10
10
 
11
11
  /**
@@ -15,7 +15,7 @@ import __vue_component__$1 from './remove-history-query.vue.js';
15
15
  *
16
16
  * @public
17
17
  */
18
- let HistoryQuery = class HistoryQuery extends Vue {
18
+ let HistoryQuery = class HistoryQuery extends Mixins(dynamicPropsMixin(['removeHistoryQueryClass'])) {
19
19
  /**
20
20
  * The list of events that are going to be emitted when the suggestion button is pressed.
21
21
  *
@@ -1 +1 @@
1
- {"version":3,"file":"history-query.vue_rollup-plugin-vue_script.vue.js","sources":["../../../../../src/x-modules/history-queries/components/history-query.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 import { HistoryQuery as HistoryQueryModel } from '@empathyco/x-types';\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import { Getter } from '../../../components/decorators/store.decorators';\n import Highlight from '../../../components/highlight.vue';\n import BaseSuggestion from '../../../components/suggestions/base-suggestion.vue';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { XEventsTypes } from '../../../wiring/events.types';\n import { historyQueriesXModule } from '../x-module';\n import RemoveHistoryQuery from './remove-history-query.vue';\n\n /**\n * This component renders a history query suggestion combining two buttons: one for selecting this\n * suggestion as the search query, and another one to remove this query suggestion from the\n * history queries.\n *\n * @public\n */\n @Component({\n mixins: [xComponentMixin(historyQueriesXModule)],\n components: { Highlight, RemoveHistoryQuery, BaseSuggestion }\n })\n export default class HistoryQuery extends Vue {\n /**\n * The history query suggestion to render.\n *\n * @public\n */\n @Prop({ required: true })\n protected suggestion!: HistoryQueryModel;\n\n /**\n * The normalized query of the history-queries module.\n *\n * @internal\n */\n @Getter('historyQueries', 'normalizedQuery')\n public query!: string;\n\n /**\n * The list of events that are going to be emitted when the suggestion button is pressed.\n *\n * @internal\n * @returns The {@link XEvent | XEvents} to emit.\n */\n protected get suggestionSelectedEvents(): Partial<XEventsTypes> {\n return {\n UserSelectedAHistoryQuery: this.suggestion\n };\n }\n }\n"],"names":["Highlight","RemoveHistoryQuery","BaseSuggestion"],"mappings":";;;;;;;;;;AA2CE;;;;;;AAMG;AAKH,IAAqB,YAAY,GAAjC,MAAqB,YAAa,SAAQ,GAAG,CAAA;AAiB3C;;;;;AAKG;AACH,IAAA,IAAc,wBAAwB,GAAA;QACpC,OAAO;YACL,yBAAyB,EAAE,IAAI,CAAC,UAAU;SAC3C,CAAC;KACH;CACF,CAAA;AArBC,UAAA,CAAA;AADC,IAAA,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AACgB,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,YAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAQzC,UAAA,CAAA;AADC,IAAA,MAAM,CAAC,gBAAgB,EAAE,iBAAiB,CAAC;AACtB,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,OAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAfH,YAAY,GAAA,UAAA,CAAA;AAJhC,IAAA,SAAS,CAAC;AACT,QAAA,MAAM,EAAE,CAAC,eAAe,CAAC,qBAAqB,CAAC,CAAC;AAChD,QAAA,UAAU,EAAE,aAAEA,iBAAS,sBAAEC,mBAAkB,kBAAEC,mBAAc,EAAE;KAC9D,CAAC;AACmB,CAAA,EAAA,YAAY,CA4BhC,CAAA;aA5BoB,YAAY;;;;"}
1
+ {"version":3,"file":"history-query.vue_rollup-plugin-vue_script.vue.js","sources":["../../../../../src/x-modules/history-queries/components/history-query.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 import { HistoryQuery as HistoryQueryModel } from '@empathyco/x-types';\n import { Component, Mixins, Prop } from 'vue-property-decorator';\n import { Getter } from '../../../components/decorators/store.decorators';\n import Highlight from '../../../components/highlight.vue';\n import BaseSuggestion from '../../../components/suggestions/base-suggestion.vue';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { XEventsTypes } from '../../../wiring/events.types';\n import { historyQueriesXModule } from '../x-module';\n import { dynamicPropsMixin } from '../../../components/dynamic-props.mixin';\n import RemoveHistoryQuery from './remove-history-query.vue';\n\n /**\n * This component renders a history query suggestion combining two buttons: one for selecting this\n * suggestion as the search query, and another one to remove this query suggestion from the\n * history queries.\n *\n * @public\n */\n @Component({\n mixins: [xComponentMixin(historyQueriesXModule)],\n components: { Highlight, RemoveHistoryQuery, BaseSuggestion }\n })\n export default class HistoryQuery extends Mixins(dynamicPropsMixin(['removeHistoryQueryClass'])) {\n /**\n * The history query suggestion to render.\n *\n * @public\n */\n @Prop({ required: true })\n protected suggestion!: HistoryQueryModel;\n\n /**\n * The normalized query of the history-queries module.\n *\n * @internal\n */\n @Getter('historyQueries', 'normalizedQuery')\n public query!: string;\n\n /**\n * The list of events that are going to be emitted when the suggestion button is pressed.\n *\n * @internal\n * @returns The {@link XEvent | XEvents} to emit.\n */\n protected get suggestionSelectedEvents(): Partial<XEventsTypes> {\n return {\n UserSelectedAHistoryQuery: this.suggestion\n };\n }\n }\n"],"names":["Highlight","RemoveHistoryQuery","BaseSuggestion"],"mappings":";;;;;;;;;;AA4CE;;;;;;AAMG;AAKH,IAAqB,YAAY,GAAjC,MAAqB,YAAa,SAAQ,MAAM,CAAC,iBAAiB,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,CAAA;AAiB9F;;;;;AAKG;AACH,IAAA,IAAc,wBAAwB,GAAA;QACpC,OAAO;YACL,yBAAyB,EAAE,IAAI,CAAC,UAAU;SAC3C,CAAC;KACH;CACF,CAAA;AArBC,UAAA,CAAA;AADC,IAAA,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AACgB,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,YAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAQzC,UAAA,CAAA;AADC,IAAA,MAAM,CAAC,gBAAgB,EAAE,iBAAiB,CAAC;AACtB,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,OAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAfH,YAAY,GAAA,UAAA,CAAA;AAJhC,IAAA,SAAS,CAAC;AACT,QAAA,MAAM,EAAE,CAAC,eAAe,CAAC,qBAAqB,CAAC,CAAC;AAChD,QAAA,UAAU,EAAE,aAAEA,iBAAS,sBAAEC,mBAAkB,kBAAEC,mBAAc,EAAE;KAC9D,CAAC;AACmB,CAAA,EAAA,YAAY,CA4BhC,CAAA;aA5BoB,YAAY;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empathyco/x-components",
3
- "version": "3.0.0-alpha.280",
3
+ "version": "3.0.0-alpha.282",
4
4
  "description": "Empathy X Components",
5
5
  "author": "Empathy Systems Corporation S.L.",
6
6
  "license": "Apache-2.0",
@@ -138,5 +138,5 @@
138
138
  "access": "public",
139
139
  "directory": "dist"
140
140
  },
141
- "gitHead": "f0bad0fbb957dc37b0d261e6b231abfa90e9ab56"
141
+ "gitHead": "13fce8d2ebc3e20a38e487f4b13cb4e8562aa7a7"
142
142
  }
@@ -6702,8 +6702,8 @@
6702
6702
  },
6703
6703
  {
6704
6704
  "kind": "Reference",
6705
- "text": "Vue",
6706
- "canonicalReference": "vue!Vue:interface"
6705
+ "text": "BaseSuggestions_base",
6706
+ "canonicalReference": "@empathyco/x-components!~BaseSuggestions_base"
6707
6707
  },
6708
6708
  {
6709
6709
  "kind": "Content",
@@ -22808,8 +22808,8 @@
22808
22808
  },
22809
22809
  {
22810
22810
  "kind": "Reference",
22811
- "text": "Vue",
22812
- "canonicalReference": "vue!Vue:interface"
22811
+ "text": "HistoryQuery_base",
22812
+ "canonicalReference": "@empathyco/x-components!~HistoryQuery_base"
22813
22813
  },
22814
22814
  {
22815
22815
  "kind": "Content",
@@ -608,8 +608,10 @@ export class BaseSuggestion extends Vue_2 {
608
608
  protected suggestionSelectedEvents: Partial<XEventsTypes>;
609
609
  }
610
610
 
611
+ // Warning: (ae-forgotten-export) The symbol "BaseSuggestions_base" needs to be exported by the entry point index.d.ts
612
+ //
611
613
  // @public
612
- export class BaseSuggestions extends Vue_2 {
614
+ export class BaseSuggestions extends BaseSuggestions_base {
613
615
  protected animation: Vue_2 | string;
614
616
  // @internal
615
617
  protected expandSuggestionFilters(suggestion: Suggestion): Suggestion[];
@@ -2146,8 +2148,10 @@ export type HistoryQueriesXStoreModule = XStoreModule<HistoryQueriesState, Histo
2146
2148
  // @internal
2147
2149
  export const historyQueriesXStoreModule: HistoryQueriesXStoreModule;
2148
2150
 
2151
+ // Warning: (ae-forgotten-export) The symbol "HistoryQuery_base" needs to be exported by the entry point index.d.ts
2152
+ //
2149
2153
  // @public
2150
- export class HistoryQuery extends Vue_2 {
2154
+ export class HistoryQuery extends HistoryQuery_base {
2151
2155
  // @internal
2152
2156
  query: string;
2153
2157
  protected suggestion: HistoryQuery_2;
@@ -1,12 +1,13 @@
1
1
  import Vue from 'vue';
2
2
  import { Suggestion, Facet, Filter } from '@empathyco/x-types';
3
+ declare const BaseSuggestions_base: import("vue-class-component/lib/declarations").VueClass<object & import("vue/types/v3-component-options").ExtractComputedReturns<{}> & Record<never, any> & Partial<Record<"suggestionItemClass", string>> & import("vue").ShallowUnwrapRef<{}>>;
3
4
  /**
4
5
  * Paints a list of suggestions passed in by prop. Requires a component for a single suggestion
5
6
  * in the default slot for working.
6
7
  *
7
8
  * @public
8
9
  */
9
- export default class BaseSuggestions extends Vue {
10
+ export default class BaseSuggestions extends BaseSuggestions_base {
10
11
  /**
11
12
  * The list of suggestions to render.
12
13
  *
@@ -87,4 +88,5 @@ export default class BaseSuggestions extends Vue {
87
88
  */
88
89
  protected getSuggestionFilter(suggestion: Suggestion): Filter | undefined;
89
90
  }
91
+ export {};
90
92
  //# sourceMappingURL=base-suggestions.vue?rollup-plugin-vue=script.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"base-suggestions.vue?rollup-plugin-vue=script.d.ts","sourceRoot":"","sources":["../../../../src/components/suggestions/base-suggestions.vue?rollup-plugin-vue=script.ts"],"names":[],"mappings":"AAoBE,OAAO,GAAG,MAAM,KAAK,CAAC;AAEtB,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAG/D;;;;;GAKG;AAEH,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,GAAG;IAC9C;;;;OAIG;IAEH,SAAS,CAAC,WAAW,EAAG,UAAU,EAAE,CAAC;IAErC;;;;OAIG;IAEH,SAAS,CAAC,SAAS,EAAG,GAAG,GAAG,MAAM,CAAC;IAEnC;;;;OAIG;IAEH,SAAS,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAEpC;;;;OAIG;IAEH,SAAS,CAAC,UAAU,EAAG,OAAO,CAAC;IAE/B;;;;;OAKG;IAEH,SAAS,CAAC,mBAAmB,EAAG,OAAO,CAAC;IAExC;;;;;OAKG;IACH,SAAS,KAAK,eAAe,IAAI,MAAM,EAAE,CAMxC;IAED;;;;;;OAMG;IACH,SAAS,CAAC,YAAY,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM;IAM/C;;;;;;OAMG;IACH,SAAS,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM;IAI3C;;;;;;OAMG;IACH,SAAS,KAAK,mBAAmB,IAAI,UAAU,EAAE,CAUhD;IAED;;;;;;;OAOG;IACH,SAAS,CAAC,uBAAuB,CAAC,UAAU,EAAE,UAAU,GAAG,UAAU,EAAE;IAWvE;;;;;;OAMG;IACH,SAAS,CAAC,mBAAmB,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS;CAG1E"}
1
+ {"version":3,"file":"base-suggestions.vue?rollup-plugin-vue=script.d.ts","sourceRoot":"","sources":["../../../../src/components/suggestions/base-suggestions.vue?rollup-plugin-vue=script.ts"],"names":[],"mappings":"AAqBE,OAAO,GAAG,MAAM,KAAK,CAAC;AAEtB,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;;AAI/D;;;;;GAKG;AAEH,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,oBAAkD;IAC7F;;;;OAIG;IAEH,SAAS,CAAC,WAAW,EAAG,UAAU,EAAE,CAAC;IAErC;;;;OAIG;IAEH,SAAS,CAAC,SAAS,EAAG,GAAG,GAAG,MAAM,CAAC;IAEnC;;;;OAIG;IAEH,SAAS,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAEpC;;;;OAIG;IAEH,SAAS,CAAC,UAAU,EAAG,OAAO,CAAC;IAE/B;;;;;OAKG;IAEH,SAAS,CAAC,mBAAmB,EAAG,OAAO,CAAC;IAExC;;;;;OAKG;IACH,SAAS,KAAK,eAAe,IAAI,MAAM,EAAE,CAMxC;IAED;;;;;;OAMG;IACH,SAAS,CAAC,YAAY,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM;IAM/C;;;;;;OAMG;IACH,SAAS,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM;IAI3C;;;;;;OAMG;IACH,SAAS,KAAK,mBAAmB,IAAI,UAAU,EAAE,CAUhD;IAED;;;;;;;OAOG;IACH,SAAS,CAAC,uBAAuB,CAAC,UAAU,EAAE,UAAU,GAAG,UAAU,EAAE;IAWvE;;;;;;OAMG;IACH,SAAS,CAAC,mBAAmB,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS;CAG1E"}
@@ -1,6 +1,6 @@
1
1
  import { HistoryQuery as HistoryQueryModel } from '@empathyco/x-types';
2
- import Vue from 'vue';
3
2
  import { XEventsTypes } from '../../../wiring/events.types';
3
+ declare const HistoryQuery_base: import("vue-class-component/lib/declarations").VueClass<object & import("vue/types/v3-component-options").ExtractComputedReturns<{}> & Record<never, any> & Partial<Record<"removeHistoryQueryClass", string>> & import("vue").ShallowUnwrapRef<{}>>;
4
4
  /**
5
5
  * This component renders a history query suggestion combining two buttons: one for selecting this
6
6
  * suggestion as the search query, and another one to remove this query suggestion from the
@@ -8,7 +8,7 @@ import { XEventsTypes } from '../../../wiring/events.types';
8
8
  *
9
9
  * @public
10
10
  */
11
- export default class HistoryQuery extends Vue {
11
+ export default class HistoryQuery extends HistoryQuery_base {
12
12
  /**
13
13
  * The history query suggestion to render.
14
14
  *
@@ -29,4 +29,5 @@ export default class HistoryQuery extends Vue {
29
29
  */
30
30
  protected get suggestionSelectedEvents(): Partial<XEventsTypes>;
31
31
  }
32
+ export {};
32
33
  //# sourceMappingURL=history-query.vue?rollup-plugin-vue=script.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"history-query.vue?rollup-plugin-vue=script.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/history-queries/components/history-query.vue?rollup-plugin-vue=script.ts"],"names":[],"mappings":"AAgCE,OAAO,EAAE,YAAY,IAAI,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,GAAG,MAAM,KAAK,CAAC;AAMtB,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAI5D;;;;;;GAMG;AAKH,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,GAAG;IAC3C;;;;OAIG;IAEH,SAAS,CAAC,UAAU,EAAG,iBAAiB,CAAC;IAEzC;;;;OAIG;IAEI,KAAK,EAAG,MAAM,CAAC;IAEtB;;;;;OAKG;IACH,SAAS,KAAK,wBAAwB,IAAI,OAAO,CAAC,YAAY,CAAC,CAI9D;CACF"}
1
+ {"version":3,"file":"history-query.vue?rollup-plugin-vue=script.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/history-queries/components/history-query.vue?rollup-plugin-vue=script.ts"],"names":[],"mappings":"AAiCE,OAAO,EAAE,YAAY,IAAI,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAMvE,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;;AAK5D;;;;;;GAMG;AAKH,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,iBAAsD;IAC9F;;;;OAIG;IAEH,SAAS,CAAC,UAAU,EAAG,iBAAiB,CAAC;IAEzC;;;;OAIG;IAEI,KAAK,EAAG,MAAM,CAAC;IAEtB;;;;;OAKG;IACH,SAAS,KAAK,wBAAwB,IAAI,OAAO,CAAC,YAAY,CAAC,CAI9D;CACF"}