@empathyco/x-components 3.0.0-alpha.165 → 3.0.0-alpha.166

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 CHANGED
@@ -3,6 +3,19 @@
3
3
  All notable changes to this project will be documented in this file. See
4
4
  [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [3.0.0-alpha.166](https://github.com/empathyco/x/compare/@empathyco/x-components@3.0.0-alpha.165...@empathyco/x-components@3.0.0-alpha.166) (2022-09-02)
7
+
8
+ ### Bug Fixes
9
+
10
+ - Make `Home` grid next queries use grid data rather than state data. (#687)
11
+ ([e340ed0](https://github.com/empathyco/x/commit/e340ed0c4fc4d70a0912c38296812c2fcc0c4e23)),
12
+ closes [EX-6955](https://searchbroker.atlassian.net/browse/EX-6955)
13
+
14
+ # Change Log
15
+
16
+ All notable changes to this project will be documented in this file. See
17
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
18
+
6
19
  ## [3.0.0-alpha.165](https://github.com/empathyco/x/compare/@empathyco/x-components@3.0.0-alpha.164...@empathyco/x-components@3.0.0-alpha.165) (2022-08-31)
7
20
 
8
21
  ### Build System
@@ -1426,18 +1426,6 @@
1426
1426
  --x-size-border-radius-bottom-right-input-group-pill: var(--x-size-border-radius-input-group-pill);
1427
1427
  --x-size-border-radius-bottom-left-input-group-pill: var(--x-size-border-radius-input-group-pill);
1428
1428
  }
1429
- .x-input--card.x-input,
1430
- .x-input--card .x-input {
1431
- --x-size-border-radius-input-default: var(--x-size-border-radius-input-card);
1432
- --x-size-border-radius-top-left-input-default: var(--x-size-border-radius-top-left-input-card);
1433
- --x-size-border-radius-top-right-input-default: var(--x-size-border-radius-top-right-input-card);
1434
- --x-size-border-radius-bottom-right-input-default: var(
1435
- --x-size-border-radius-bottom-right-input-card
1436
- );
1437
- --x-size-border-radius-bottom-left-input-default: var(
1438
- --x-size-border-radius-bottom-left-input-card
1439
- );
1440
- }
1441
1429
  :root {
1442
1430
  --x-size-border-radius-input-card: var(--x-size-border-radius-base-s);
1443
1431
  --x-size-border-radius-top-left-input-card: var(--x-size-border-radius-input-card);
@@ -7483,3 +7471,16 @@
7483
7471
  .x-normal-case {
7484
7472
  text-transform: none;
7485
7473
  }
7474
+
7475
+ .x-input--card.x-input,
7476
+ .x-input--card .x-input {
7477
+ --x-size-border-radius-input-default: var(--x-size-border-radius-input-card);
7478
+ --x-size-border-radius-top-left-input-default: var(--x-size-border-radius-top-left-input-card);
7479
+ --x-size-border-radius-top-right-input-default: var(--x-size-border-radius-top-right-input-card);
7480
+ --x-size-border-radius-bottom-right-input-default: var(
7481
+ --x-size-border-radius-bottom-right-input-card
7482
+ );
7483
+ --x-size-border-radius-bottom-left-input-default: var(
7484
+ --x-size-border-radius-bottom-left-input-card
7485
+ );
7486
+ }
@@ -9,5 +9,5 @@ Animation component that will be used to animate the suggestions.
9
9
  <b>Signature:</b>
10
10
 
11
11
  ```typescript
12
- protected animation: Vue;
12
+ animation?: Vue;
13
13
  ```
@@ -9,5 +9,5 @@ Flag to indicate if the curated next queries should be displayed different.
9
9
  <b>Signature:</b>
10
10
 
11
11
  ```typescript
12
- protected highlightCurated: boolean;
12
+ highlightCurated: boolean;
13
13
  ```
@@ -9,5 +9,5 @@ Number of next queries to be rendered.
9
9
  <b>Signature:</b>
10
10
 
11
11
  ```typescript
12
- protected maxItemsToRender?: number;
12
+ maxItemsToRender?: number;
13
13
  ```
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [NextQueries](./x-components.nextqueries.md) &gt; [suggestions](./x-components.nextqueries.suggestions.md)
4
+
5
+ ## NextQueries.suggestions property
6
+
7
+ NextQueries list to be used instead of state NextQueries.
8
+
9
+ <b>Signature:</b>
10
+
11
+ ```typescript
12
+ suggestions?: NextQueryModel[];
13
+ ```
@@ -19,6 +19,7 @@ of `shirts`.
19
19
  | <code>animation</code> | Animation component that will be used to animate the suggestions. | <code>Vue</code> | <code></code> |
20
20
  | <code>maxItemsToRender</code> | Number of next queries to be rendered. | <code>number</code> | <code></code> |
21
21
  | <code>highlightCurated</code> | Flag to indicate if the curated next queries should be displayed different. | <code>boolean</code> | <code>false</code> |
22
+ | <code>suggestions</code> | NextQueries list to be used instead of state NextQueries. | <code>Array</code> | <code></code> |
22
23
 
23
24
  ## Slots
24
25
 
@@ -12,7 +12,7 @@ var __vue_render__ = function () {
12
12
  return _c("BaseSuggestions", {
13
13
  staticClass: "x-next-queries",
14
14
  attrs: {
15
- suggestions: _vm.nextQueries,
15
+ suggestions: _vm.renderedNextQueries,
16
16
  "data-test": "next-queries",
17
17
  animation: _vm.animation,
18
18
  maxItemsToRender: _vm.maxItemsToRender,
@@ -1 +1 @@
1
- {"version":3,"file":"next-queries.vue.js","sources":["../../../../../src/x-modules/next-queries/components/next-queries.vue"],"sourcesContent":["<template>\n <BaseSuggestions\n :suggestions=\"nextQueries\"\n data-test=\"next-queries\"\n class=\"x-next-queries\"\n :animation=\"animation\"\n :maxItemsToRender=\"maxItemsToRender\"\n >\n <template #default=\"{ suggestion, index }\">\n <!--\n @slot Next Query item\n @binding {Suggestion} suggestion - Next Query suggestion data\n @binding {number} index - Next Query suggestion index\n @binding {boolean} highlightCurated - True if the curated NQs should be highlighted\n -->\n <slot name=\"suggestion\" v-bind=\"{ suggestion, highlightCurated, index }\">\n <NextQuery\n #default=\"{ suggestion, shouldHighlightCurated }\"\n :suggestion=\"suggestion\"\n :highlightCurated=\"highlightCurated\"\n class=\"x-next-queries__suggestion\"\n >\n <!--\n @slot Next Query content\n @binding {Suggestion} suggestion - Next Query suggestion data\n @binding {boolean} shouldHighlightCurated - True if the curated NQ should\n be highlighted\n @binding {number} index - Next Query suggestion index\n -->\n <slot name=\"suggestion-content\" v-bind=\"{ suggestion, shouldHighlightCurated, index }\" />\n </NextQuery>\n </slot>\n </template>\n </BaseSuggestions>\n</template>\n\n<script lang=\"ts\">\n import { NextQuery as NextQueryModel } from '@empathyco/x-types';\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import BaseSuggestions from '../../../components/suggestions/base-suggestions.vue';\n import { Getter } from '../../../components/decorators/store.decorators';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { nextQueriesXModule } from '../x-module';\n import NextQuery from './next-query.vue';\n\n /**\n * Simple next-queries component that renders a list of suggestions, allowing the user to\n * select one of them, and emitting the needed events.\n * A next query is a suggestion for a new search, related to your previous query. I.e. If\n * people normally search for `shirts`, and then `trousers`, `trousers` would be a next query\n * of `shirts`.\n *\n * @public\n */\n @Component({\n components: { NextQuery, BaseSuggestions },\n mixins: [xComponentMixin(nextQueriesXModule)]\n })\n export default class NextQueries extends Vue {\n /**\n * Animation component that will be used to animate the suggestions.\n *\n * @public\n */\n @Prop()\n protected animation!: Vue;\n\n /**\n * Number of next queries to be rendered.\n *\n * @public\n */\n @Prop()\n protected maxItemsToRender?: number;\n\n /**\n * The list of next queries.\n *\n * @internal\n */\n @Getter('nextQueries', 'nextQueries')\n public nextQueries!: NextQueryModel[];\n\n /**\n * Flag to indicate if the curated next queries should be displayed different.\n *\n * @public\n */\n @Prop({ default: false, type: Boolean })\n protected highlightCurated!: boolean;\n }\n</script>\n\n<docs lang=\"mdx\">\n## Examples\n\n### Basic example\n\nYou don't need to pass any props, or slots. Simply add the component, and when it has any next\nqueries it will show them\n\n```vue live\n<template>\n <div>\n <SearchInput />\n <NextQueries />\n </div>\n</template>\n\n<script>\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { NextQueries } from '@empathyco/x-components/next-queries';\n\n export default {\n name: 'NextQueriesDemo',\n components: {\n SearchInput,\n NextQueries\n }\n };\n</script>\n```\n\nThe component has three optional props. `animation` to render the component with an animation,\n`maxItemToRender` to limit the number of next queries will be rendered (by default it is 5) and\n`highlightCurated` to indicate if the curated Next Queries inside the list should be highlighted.\n\n```vue live\n<template>\n <div>\n <SearchInput />\n <NextQueries :animation=\"'FadeAndSlide'\" :maxItemsToRender=\"10\" :highlightCurated=\"true\" />\n </div>\n</template>\n\n<script>\n import Vue from 'vue';\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { NextQueries } from '@empathyco/x-components/next-queries';\n import { FadeAndSlide } from '@empathyco/x-components';\n\n // Registering the animation as a global component\n Vue.component('FadeAndSlide', FadeAndSlide);\n export default {\n name: 'NextQueriesDemo',\n components: {\n SearchInput,\n NextQueries\n }\n };\n</script>\n```\n\n### Overriding Next Queries' Content\n\nYou can use your custom implementation of the Next Query's content. In the example below, instead of\nusing the default Next Query's content, an icon is added, as well as a span with the query of the\nNext Query suggestion.\n\n```vue live\n<template>\n <div>\n <SearchInput />\n <NextQueries>\n <template #suggestion-content=\"{ suggestion }\">\n <Nq1Icon />\n <span class=\"x-next-query__query\">{{ suggestion.query }}</span>\n </template>\n </NextQueries>\n </div>\n</template>\n\n<script>\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { NextQueries } from '@empathyco/x-components/next-queries';\n import { Nq1Icon } from '@empathyco/x-components';\n\n export default {\n name: 'NextQueriesDemo',\n components: {\n SearchInput,\n NextQueries,\n Nq1Icon\n }\n };\n</script>\n```\n\n### Adding a custom next query component\n\nYou can use your custom implementation of a next query component. To work correctly, it should use\nthe `emitNextQuerySelected` function when the next query is selected. In the example below, instead\nof using the default `button` tag for a next query, an icon is added, and the text of the next query\nis wrapped in a `span`\n\n```vue live\n<template>\n <div>\n <SearchInput />\n <NextQueries>\n <template #suggestion=\"{ suggestion }\">\n <NextQuery :suggestion=\"suggestion\" class=\"x-next-queries__suggestion\">\n <template #default=\"{ suggestion }\">\n <Nq1Icon />\n <span class=\"x-next-query__query\">{{ suggestion.query }}</span>\n </template>\n </NextQuery>\n <button>Custom Behaviour</button>\n </template>\n </NextQueries>\n </div>\n</template>\n\n<script>\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { NextQueries, NextQuery } from '@empathyco/x-components/next-queries';\n import { Nq1Icon } from '@empathyco/x-components';\n\n export default {\n name: 'NextQueriesDemo',\n components: {\n SearchInput,\n NextQueries,\n NextQuery,\n Nq1Icon\n }\n };\n</script>\n```\n</docs>\n"],"names":[],"mappings":";;;;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"next-queries.vue.js","sources":["../../../../../src/x-modules/next-queries/components/next-queries.vue"],"sourcesContent":["<template>\n <BaseSuggestions\n :suggestions=\"renderedNextQueries\"\n data-test=\"next-queries\"\n class=\"x-next-queries\"\n :animation=\"animation\"\n :maxItemsToRender=\"maxItemsToRender\"\n >\n <template #default=\"{ suggestion, index }\">\n <!--\n @slot Next Query item\n @binding {Suggestion} suggestion - Next Query suggestion data\n @binding {number} index - Next Query suggestion index\n @binding {boolean} highlightCurated - True if the curated NQs should be highlighted\n -->\n <slot name=\"suggestion\" v-bind=\"{ suggestion, highlightCurated, index }\">\n <NextQuery\n #default=\"{ suggestion, shouldHighlightCurated }\"\n :suggestion=\"suggestion\"\n :highlightCurated=\"highlightCurated\"\n class=\"x-next-queries__suggestion\"\n >\n <!--\n @slot Next Query content\n @binding {Suggestion} suggestion - Next Query suggestion data\n @binding {boolean} shouldHighlightCurated - True if the curated NQ should\n be highlighted\n @binding {number} index - Next Query suggestion index\n -->\n <slot name=\"suggestion-content\" v-bind=\"{ suggestion, shouldHighlightCurated, index }\" />\n </NextQuery>\n </slot>\n </template>\n </BaseSuggestions>\n</template>\n\n<script lang=\"ts\">\n import { NextQuery as NextQueryModel } from '@empathyco/x-types';\n import Vue from 'vue';\n import { Component, Prop } from 'vue-property-decorator';\n import BaseSuggestions from '../../../components/suggestions/base-suggestions.vue';\n import { Getter } from '../../../components/decorators/store.decorators';\n import { xComponentMixin } from '../../../components/x-component.mixin';\n import { nextQueriesXModule } from '../x-module';\n import NextQuery from './next-query.vue';\n\n /**\n * Simple next-queries component that renders a list of suggestions, allowing the user to\n * select one of them, and emitting the needed events.\n * A next query is a suggestion for a new search, related to your previous query. I.e. If\n * people normally search for `shirts`, and then `trousers`, `trousers` would be a next query\n * of `shirts`.\n *\n * @public\n */\n @Component({\n components: { NextQuery, BaseSuggestions },\n mixins: [xComponentMixin(nextQueriesXModule)]\n })\n export default class NextQueries extends Vue {\n /**\n * Animation component that will be used to animate the suggestions.\n *\n * @public\n */\n @Prop()\n public animation?: Vue;\n\n /**\n * Number of next queries to be rendered.\n *\n * @public\n */\n @Prop()\n public maxItemsToRender?: number;\n\n /**\n * Flag to indicate if the curated next queries should be displayed different.\n *\n * @public\n */\n @Prop({ default: false, type: Boolean })\n public highlightCurated!: boolean;\n\n /**\n * NextQueries list to be used instead of state NextQueries.\n *\n * @public\n */\n @Prop()\n public suggestions?: NextQueryModel[];\n\n /**\n * The list of next queries from the state.\n *\n * @internal\n */\n @Getter('nextQueries', 'nextQueries')\n public stateNextQueries!: NextQueryModel[];\n\n /**.\n * The list of next queries finally rendered\n *\n * @internal\n */\n protected get renderedNextQueries(): NextQueryModel[] {\n return this.suggestions ?? this.stateNextQueries;\n }\n }\n</script>\n\n<docs lang=\"mdx\">\n## Examples\n\n### Basic example\n\nYou don't need to pass any props, or slots. Simply add the component, and when it has any next\nqueries it will show them\n\n```vue live\n<template>\n <div>\n <SearchInput />\n <NextQueries />\n </div>\n</template>\n\n<script>\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { NextQueries } from '@empathyco/x-components/next-queries';\n\n export default {\n name: 'NextQueriesDemo',\n components: {\n SearchInput,\n NextQueries\n }\n };\n</script>\n```\n\nThe component has three optional props. `animation` to render the component with an animation,\n`maxItemToRender` to limit the number of next queries will be rendered (by default it is 5) and\n`highlightCurated` to indicate if the curated Next Queries inside the list should be highlighted.\n\n```vue live\n<template>\n <div>\n <SearchInput />\n <NextQueries :animation=\"'FadeAndSlide'\" :maxItemsToRender=\"10\" :highlightCurated=\"true\" />\n </div>\n</template>\n\n<script>\n import Vue from 'vue';\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { NextQueries } from '@empathyco/x-components/next-queries';\n import { FadeAndSlide } from '@empathyco/x-components';\n\n // Registering the animation as a global component\n Vue.component('FadeAndSlide', FadeAndSlide);\n export default {\n name: 'NextQueriesDemo',\n components: {\n SearchInput,\n NextQueries\n }\n };\n</script>\n```\n\n### Overriding Next Queries' Content\n\nYou can use your custom implementation of the Next Query's content. In the example below, instead of\nusing the default Next Query's content, an icon is added, as well as a span with the query of the\nNext Query suggestion.\n\n```vue live\n<template>\n <div>\n <SearchInput />\n <NextQueries>\n <template #suggestion-content=\"{ suggestion }\">\n <Nq1Icon />\n <span class=\"x-next-query__query\">{{ suggestion.query }}</span>\n </template>\n </NextQueries>\n </div>\n</template>\n\n<script>\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { NextQueries } from '@empathyco/x-components/next-queries';\n import { Nq1Icon } from '@empathyco/x-components';\n\n export default {\n name: 'NextQueriesDemo',\n components: {\n SearchInput,\n NextQueries,\n Nq1Icon\n }\n };\n</script>\n```\n\n### Adding a custom next query component\n\nYou can use your custom implementation of a next query component. To work correctly, it should use\nthe `emitNextQuerySelected` function when the next query is selected. In the example below, instead\nof using the default `button` tag for a next query, an icon is added, and the text of the next query\nis wrapped in a `span`\n\n```vue live\n<template>\n <div>\n <SearchInput />\n <NextQueries>\n <template #suggestion=\"{ suggestion }\">\n <NextQuery :suggestion=\"suggestion\" class=\"x-next-queries__suggestion\">\n <template #default=\"{ suggestion }\">\n <Nq1Icon />\n <span class=\"x-next-query__query\">{{ suggestion.query }}</span>\n </template>\n </NextQuery>\n <button>Custom Behaviour</button>\n </template>\n </NextQueries>\n </div>\n</template>\n\n<script>\n import { SearchInput } from '@empathyco/x-components/search-box';\n import { NextQueries, NextQuery } from '@empathyco/x-components/next-queries';\n import { Nq1Icon } from '@empathyco/x-components';\n\n export default {\n name: 'NextQueriesDemo',\n components: {\n SearchInput,\n NextQueries,\n NextQuery,\n Nq1Icon\n }\n };\n</script>\n```\n</docs>\n"],"names":[],"mappings":";;;;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -17,6 +17,14 @@ import __vue_component__ from './next-query.vue.js';
17
17
  * @public
18
18
  */
19
19
  let NextQueries = class NextQueries extends Vue {
20
+ /**.
21
+ * The list of next queries finally rendered
22
+ *
23
+ * @internal
24
+ */
25
+ get renderedNextQueries() {
26
+ return this.suggestions ?? this.stateNextQueries;
27
+ }
20
28
  };
21
29
  __decorate([
22
30
  Prop()
@@ -24,12 +32,15 @@ __decorate([
24
32
  __decorate([
25
33
  Prop()
26
34
  ], NextQueries.prototype, "maxItemsToRender", void 0);
27
- __decorate([
28
- Getter('nextQueries', 'nextQueries')
29
- ], NextQueries.prototype, "nextQueries", void 0);
30
35
  __decorate([
31
36
  Prop({ default: false, type: Boolean })
32
37
  ], NextQueries.prototype, "highlightCurated", void 0);
38
+ __decorate([
39
+ Prop()
40
+ ], NextQueries.prototype, "suggestions", void 0);
41
+ __decorate([
42
+ Getter('nextQueries', 'nextQueries')
43
+ ], NextQueries.prototype, "stateNextQueries", void 0);
33
44
  NextQueries = __decorate([
34
45
  Component({
35
46
  components: { NextQuery: __vue_component__, BaseSuggestions: __vue_component__$1 },
@@ -1 +1 @@
1
- {"version":3,"file":"next-queries.vue_rollup-plugin-vue_script.vue.js","sources":["../../../../../src/x-modules/next-queries/components/next-queries.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\n\nimport { NextQuery as NextQueryModel } from '@empathyco/x-types';\nimport Vue from 'vue';\nimport { Component, Prop } from 'vue-property-decorator';\nimport BaseSuggestions from '../../../components/suggestions/base-suggestions.vue';\nimport { Getter } from '../../../components/decorators/store.decorators';\nimport { xComponentMixin } from '../../../components/x-component.mixin';\nimport { nextQueriesXModule } from '../x-module';\nimport NextQuery from './next-query.vue';\n\n/**\n * Simple next-queries component that renders a list of suggestions, allowing the user to\n * select one of them, and emitting the needed events.\n * A next query is a suggestion for a new search, related to your previous query. I.e. If\n * people normally search for `shirts`, and then `trousers`, `trousers` would be a next query\n * of `shirts`.\n *\n * @public\n */\n@Component({\n components: { NextQuery, BaseSuggestions },\n mixins: [xComponentMixin(nextQueriesXModule)]\n})\nexport default class NextQueries extends Vue {\n /**\n * Animation component that will be used to animate the suggestions.\n *\n * @public\n */\n @Prop()\n protected animation!: Vue;\n\n /**\n * Number of next queries to be rendered.\n *\n * @public\n */\n @Prop()\n protected maxItemsToRender?: number;\n\n /**\n * The list of next queries.\n *\n * @internal\n */\n @Getter('nextQueries', 'nextQueries')\n public nextQueries!: NextQueryModel[];\n\n /**\n * Flag to indicate if the curated next queries should be displayed different.\n *\n * @public\n */\n @Prop({ default: false, type: Boolean })\n protected highlightCurated!: boolean;\n}\n"],"names":["NextQuery","BaseSuggestions"],"mappings":";;;;;;;;;AA8CA;;;;;;;;;AAaA,IAAqB,WAAW,GAAhC,MAAqB,WAAY,SAAQ,GAAG;CAgC3C,CAAA;AAzBC;IADC,IAAI,EAAE;8CACmB;AAQ1B;IADC,IAAI,EAAE;qDAC6B;AAQpC;IADC,MAAM,CAAC,aAAa,EAAE,aAAa,CAAC;gDACC;AAQtC;IADC,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;qDACH;AA/BlB,WAAW;IAJ/B,SAAS,CAAC;QACT,UAAU,EAAE,aAAEA,iBAAS,mBAAEC,mBAAe,EAAE;QAC1C,MAAM,EAAE,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAAC;KAC9C,CAAC;GACmB,WAAW,CAgC/B;aAhCoB,WAAW;;;;"}
1
+ {"version":3,"file":"next-queries.vue_rollup-plugin-vue_script.vue.js","sources":["../../../../../src/x-modules/next-queries/components/next-queries.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\n\nimport { NextQuery as NextQueryModel } from '@empathyco/x-types';\nimport Vue from 'vue';\nimport { Component, Prop } from 'vue-property-decorator';\nimport BaseSuggestions from '../../../components/suggestions/base-suggestions.vue';\nimport { Getter } from '../../../components/decorators/store.decorators';\nimport { xComponentMixin } from '../../../components/x-component.mixin';\nimport { nextQueriesXModule } from '../x-module';\nimport NextQuery from './next-query.vue';\n\n/**\n * Simple next-queries component that renders a list of suggestions, allowing the user to\n * select one of them, and emitting the needed events.\n * A next query is a suggestion for a new search, related to your previous query. I.e. If\n * people normally search for `shirts`, and then `trousers`, `trousers` would be a next query\n * of `shirts`.\n *\n * @public\n */\n@Component({\n components: { NextQuery, BaseSuggestions },\n mixins: [xComponentMixin(nextQueriesXModule)]\n})\nexport default class NextQueries extends Vue {\n /**\n * Animation component that will be used to animate the suggestions.\n *\n * @public\n */\n @Prop()\n public animation?: Vue;\n\n /**\n * Number of next queries to be rendered.\n *\n * @public\n */\n @Prop()\n public maxItemsToRender?: number;\n\n /**\n * Flag to indicate if the curated next queries should be displayed different.\n *\n * @public\n */\n @Prop({ default: false, type: Boolean })\n public highlightCurated!: boolean;\n\n /**\n * NextQueries list to be used instead of state NextQueries.\n *\n * @public\n */\n @Prop()\n public suggestions?: NextQueryModel[];\n\n /**\n * The list of next queries from the state.\n *\n * @internal\n */\n @Getter('nextQueries', 'nextQueries')\n public stateNextQueries!: NextQueryModel[];\n\n /**.\n * The list of next queries finally rendered\n *\n * @internal\n */\n protected get renderedNextQueries(): NextQueryModel[] {\n return this.suggestions ?? this.stateNextQueries;\n }\n}\n"],"names":["NextQuery","BaseSuggestions"],"mappings":";;;;;;;;;AA8CA;;;;;;;;;AAaA,IAAqB,WAAW,GAAhC,MAAqB,WAAY,SAAQ,GAAG;;;;;;IA8C1C,IAAc,mBAAmB;QAC/B,OAAO,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,gBAAgB,CAAC;KAClD;CACF,CAAA;AA1CC;IADC,IAAI,EAAE;8CACgB;AAQvB;IADC,IAAI,EAAE;qDAC0B;AAQjC;IADC,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;qDACN;AAQlC;IADC,IAAI,EAAE;gDAC+B;AAQtC;IADC,MAAM,CAAC,aAAa,EAAE,aAAa,CAAC;qDACM;AAvCxB,WAAW;IAJ/B,SAAS,CAAC;QACT,UAAU,EAAE,aAAEA,iBAAS,mBAAEC,mBAAe,EAAE;QAC1C,MAAM,EAAE,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAAC;KAC9C,CAAC;GACmB,WAAW,CAiD/B;aAjDoB,WAAW;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empathyco/x-components",
3
- "version": "3.0.0-alpha.165",
3
+ "version": "3.0.0-alpha.166",
4
4
  "description": "Empathy X Components",
5
5
  "author": "Empathy Systems Corporation S.L.",
6
6
  "license": "Apache-2.0",
@@ -133,5 +133,5 @@
133
133
  "access": "public",
134
134
  "directory": "dist"
135
135
  },
136
- "gitHead": "ae73f52aa83026452100e50da0d919427b8d4976"
136
+ "gitHead": "b7ece15f9e9f0586221ed12a904f00def2d1a321"
137
137
  }
@@ -26053,7 +26053,7 @@
26053
26053
  "excerptTokens": [
26054
26054
  {
26055
26055
  "kind": "Content",
26056
- "text": "protected animation: "
26056
+ "text": "animation?: "
26057
26057
  },
26058
26058
  {
26059
26059
  "kind": "Reference",
@@ -26065,7 +26065,7 @@
26065
26065
  "text": ";"
26066
26066
  }
26067
26067
  ],
26068
- "isOptional": false,
26068
+ "isOptional": true,
26069
26069
  "releaseTag": "Public",
26070
26070
  "name": "animation",
26071
26071
  "propertyTypeTokenRange": {
@@ -26081,7 +26081,7 @@
26081
26081
  "excerptTokens": [
26082
26082
  {
26083
26083
  "kind": "Content",
26084
- "text": "protected highlightCurated: "
26084
+ "text": "highlightCurated: "
26085
26085
  },
26086
26086
  {
26087
26087
  "kind": "Content",
@@ -26108,7 +26108,7 @@
26108
26108
  "excerptTokens": [
26109
26109
  {
26110
26110
  "kind": "Content",
26111
- "text": "protected maxItemsToRender?: "
26111
+ "text": "maxItemsToRender?: "
26112
26112
  },
26113
26113
  {
26114
26114
  "kind": "Content",
@@ -26127,6 +26127,38 @@
26127
26127
  "endIndex": 2
26128
26128
  },
26129
26129
  "isStatic": false
26130
+ },
26131
+ {
26132
+ "kind": "Property",
26133
+ "canonicalReference": "@empathyco/x-components!NextQueries#suggestions:member",
26134
+ "docComment": "/**\n * NextQueries list to be used instead of state NextQueries.\n *\n * @public\n */\n",
26135
+ "excerptTokens": [
26136
+ {
26137
+ "kind": "Content",
26138
+ "text": "suggestions?: "
26139
+ },
26140
+ {
26141
+ "kind": "Reference",
26142
+ "text": "NextQueryModel",
26143
+ "canonicalReference": "@empathyco/x-components!NextQuery:interface"
26144
+ },
26145
+ {
26146
+ "kind": "Content",
26147
+ "text": "[]"
26148
+ },
26149
+ {
26150
+ "kind": "Content",
26151
+ "text": ";"
26152
+ }
26153
+ ],
26154
+ "isOptional": true,
26155
+ "releaseTag": "Public",
26156
+ "name": "suggestions",
26157
+ "propertyTypeTokenRange": {
26158
+ "startIndex": 1,
26159
+ "endIndex": 3
26160
+ },
26161
+ "isStatic": false
26130
26162
  }
26131
26163
  ],
26132
26164
  "extendsTokenRange": {
@@ -2458,13 +2458,15 @@ export type NamespacedWiringData<ModuleName extends XModuleName> = StoreModuleSt
2458
2458
 
2459
2459
  // @public
2460
2460
  export class NextQueries extends Vue_2 {
2461
- protected animation: Vue_2;
2462
- protected highlightCurated: boolean;
2463
- protected maxItemsToRender?: number;
2464
- // Warning: (ae-forgotten-export) The symbol "NextQuery" needs to be exported by the entry point index.d.ts
2465
- //
2461
+ animation?: Vue_2;
2462
+ highlightCurated: boolean;
2463
+ maxItemsToRender?: number;
2466
2464
  // @internal
2467
- nextQueries: NextQuery_2[];
2465
+ protected get renderedNextQueries(): NextQuery_2[];
2466
+ // @internal
2467
+ stateNextQueries: NextQuery_2[];
2468
+ // Warning: (ae-forgotten-export) The symbol "NextQuery" needs to be exported by the entry point index.d.ts
2469
+ suggestions?: NextQuery_2[];
2468
2470
  }
2469
2471
 
2470
2472
  // @public
@@ -15,24 +15,36 @@ export default class NextQueries extends Vue {
15
15
  *
16
16
  * @public
17
17
  */
18
- protected animation: Vue;
18
+ animation?: Vue;
19
19
  /**
20
20
  * Number of next queries to be rendered.
21
21
  *
22
22
  * @public
23
23
  */
24
- protected maxItemsToRender?: number;
24
+ maxItemsToRender?: number;
25
25
  /**
26
- * The list of next queries.
26
+ * Flag to indicate if the curated next queries should be displayed different.
27
27
  *
28
- * @internal
28
+ * @public
29
29
  */
30
- nextQueries: NextQueryModel[];
30
+ highlightCurated: boolean;
31
31
  /**
32
- * Flag to indicate if the curated next queries should be displayed different.
32
+ * NextQueries list to be used instead of state NextQueries.
33
33
  *
34
34
  * @public
35
35
  */
36
- protected highlightCurated: boolean;
36
+ suggestions?: NextQueryModel[];
37
+ /**
38
+ * The list of next queries from the state.
39
+ *
40
+ * @internal
41
+ */
42
+ stateNextQueries: NextQueryModel[];
43
+ /**.
44
+ * The list of next queries finally rendered
45
+ *
46
+ * @internal
47
+ */
48
+ protected get renderedNextQueries(): NextQueryModel[];
37
49
  }
38
50
  //# sourceMappingURL=next-queries.vue?rollup-plugin-vue=script.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"next-queries.vue?rollup-plugin-vue=script.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/next-queries/components/next-queries.vue?rollup-plugin-vue=script.ts"],"names":[],"mappings":"AAqCA,OAAO,EAAE,SAAS,IAAI,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,GAAG,MAAM,KAAK,CAAC;AAQtB;;;;;;;;GAQG;AAKH,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,GAAG;IAC1C;;;;OAIG;IAEH,SAAS,CAAC,SAAS,EAAG,GAAG,CAAC;IAE1B;;;;OAIG;IAEH,SAAS,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAEpC;;;;OAIG;IAEI,WAAW,EAAG,cAAc,EAAE,CAAC;IAEtC;;;;OAIG;IAEH,SAAS,CAAC,gBAAgB,EAAG,OAAO,CAAC;CACtC"}
1
+ {"version":3,"file":"next-queries.vue?rollup-plugin-vue=script.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/next-queries/components/next-queries.vue?rollup-plugin-vue=script.ts"],"names":[],"mappings":"AAqCA,OAAO,EAAE,SAAS,IAAI,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,GAAG,MAAM,KAAK,CAAC;AAQtB;;;;;;;;GAQG;AAKH,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,GAAG;IAC1C;;;;OAIG;IAEI,SAAS,CAAC,EAAE,GAAG,CAAC;IAEvB;;;;OAIG;IAEI,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAEjC;;;;OAIG;IAEI,gBAAgB,EAAG,OAAO,CAAC;IAElC;;;;OAIG;IAEI,WAAW,CAAC,EAAE,cAAc,EAAE,CAAC;IAEtC;;;;OAIG;IAEI,gBAAgB,EAAG,cAAc,EAAE,CAAC;IAE3C;;;;OAIG;IACH,SAAS,KAAK,mBAAmB,IAAI,cAAc,EAAE,CAEpD;CACF"}