@empathyco/x-components 8.10.0 → 8.12.0

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 (73) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/docs/API-reference/api/x-components.hierarchicalfilter.md +8 -0
  3. package/docs/API-reference/api/x-components.md +37 -0
  4. package/docs/API-reference/api/x-components.querypreviewlist.md +2 -0
  5. package/docs/API-reference/api/x-components.setquerypreviewvendorbanners.md +16 -0
  6. package/docs/API-reference/api/x-components.setquerypreviewvendorresults.md +16 -0
  7. package/docs/API-reference/api/x-components.simplefilter.md +8 -0
  8. package/docs/API-reference/api/x-components.snippetcallbacks.md +8 -0
  9. package/docs/API-reference/api/x-components.vendorbannerslist.md +11 -0
  10. package/docs/API-reference/api/x-components.vendormutations.md +57 -0
  11. package/docs/API-reference/api/x-components.vendormutations.removequerypreviewvendordata.md +13 -0
  12. package/docs/API-reference/api/x-components.vendormutations.setquerypreviewvendorbanners.md +16 -0
  13. package/docs/API-reference/api/x-components.vendormutations.setquerypreviewvendorresults.md +16 -0
  14. package/docs/API-reference/api/x-components.vendorquerypreview.banners.md +13 -0
  15. package/docs/API-reference/api/x-components.vendorquerypreview.md +77 -0
  16. package/docs/API-reference/api/x-components.vendorquerypreview.results.md +13 -0
  17. package/docs/API-reference/api/x-components.vendorresultslist.md +11 -0
  18. package/docs/API-reference/api/x-components.vendorstate.md +19 -0
  19. package/docs/API-reference/api/x-components.vendorstate.querypreviews.md +13 -0
  20. package/docs/API-reference/api/x-components.vendorxevents.md +38 -0
  21. package/docs/API-reference/api/x-components.vendorxevents.querypreviewvendorbannerschanged.md +16 -0
  22. package/docs/API-reference/api/x-components.vendorxevents.querypreviewvendorresultschanged.md +16 -0
  23. package/docs/API-reference/api/x-components.vendorxevents.vendorquerychanged.md +5 -0
  24. package/docs/API-reference/components/queries-preview/x-components.query-preview-list.md +46 -0
  25. package/docs/API-reference/components/vendor/x-components.vendor-banners-list.md +7 -3
  26. package/docs/API-reference/components/vendor/x-components.vendor-results-list.md +7 -3
  27. package/js/components/icons/ai-spinner-icon.vue.js +1 -1
  28. package/js/components/icons/ai-spinner-icon.vue.js.map +1 -1
  29. package/js/index.js +1 -1
  30. package/js/x-modules/queries-preview/components/query-preview-list.vue.js +30 -34
  31. package/js/x-modules/queries-preview/components/query-preview-list.vue.js.map +1 -1
  32. package/js/x-modules/queries-preview/components/query-preview-list.vue2.js +2 -0
  33. package/js/x-modules/queries-preview/components/query-preview-list.vue2.js.map +1 -1
  34. package/js/x-modules/queries-preview/components/query-preview.vue.js.map +1 -1
  35. package/js/x-modules/queries-preview/components/query-preview.vue2.js +1 -0
  36. package/js/x-modules/queries-preview/components/query-preview.vue2.js.map +1 -1
  37. package/js/x-modules/vendor/components/vendor-banners-list.vue.js +34 -5
  38. package/js/x-modules/vendor/components/vendor-banners-list.vue.js.map +1 -1
  39. package/js/x-modules/vendor/components/vendor-results-list.vue.js +34 -5
  40. package/js/x-modules/vendor/components/vendor-results-list.vue.js.map +1 -1
  41. package/js/x-modules/vendor/store/emitters.js +11 -1
  42. package/js/x-modules/vendor/store/emitters.js.map +1 -1
  43. package/js/x-modules/vendor/store/module.js +22 -0
  44. package/js/x-modules/vendor/store/module.js.map +1 -1
  45. package/js/x-modules/vendor/wiring.js +32 -1
  46. package/js/x-modules/vendor/wiring.js.map +1 -1
  47. package/package.json +2 -2
  48. package/report/x-components.api.json +647 -19
  49. package/report/x-components.api.md +103 -1
  50. package/types/src/components/snippet-callbacks.vue.d.ts +8 -0
  51. package/types/src/components/snippet-callbacks.vue.d.ts.map +1 -1
  52. package/types/src/x-modules/facets/components/filters/hierarchical-filter.vue.d.ts +8 -0
  53. package/types/src/x-modules/facets/components/filters/hierarchical-filter.vue.d.ts.map +1 -1
  54. package/types/src/x-modules/facets/components/filters/simple-filter.vue.d.ts +8 -0
  55. package/types/src/x-modules/facets/components/filters/simple-filter.vue.d.ts.map +1 -1
  56. package/types/src/x-modules/queries-preview/components/query-preview-list.vue.d.ts +2 -0
  57. package/types/src/x-modules/queries-preview/components/query-preview-list.vue.d.ts.map +1 -1
  58. package/types/src/x-modules/queries-preview/components/query-preview.vue.d.ts.map +1 -1
  59. package/types/src/x-modules/vendor/components/vendor-banners-list.vue.d.ts +20 -0
  60. package/types/src/x-modules/vendor/components/vendor-banners-list.vue.d.ts.map +1 -1
  61. package/types/src/x-modules/vendor/components/vendor-results-list.vue.d.ts +20 -0
  62. package/types/src/x-modules/vendor/components/vendor-results-list.vue.d.ts.map +1 -1
  63. package/types/src/x-modules/vendor/events.types.d.ts +24 -0
  64. package/types/src/x-modules/vendor/events.types.d.ts.map +1 -1
  65. package/types/src/x-modules/vendor/store/emitters.d.ts +11 -1
  66. package/types/src/x-modules/vendor/store/emitters.d.ts.map +1 -1
  67. package/types/src/x-modules/vendor/store/module.d.ts +1 -0
  68. package/types/src/x-modules/vendor/store/module.d.ts.map +1 -1
  69. package/types/src/x-modules/vendor/store/types.d.ts +42 -0
  70. package/types/src/x-modules/vendor/store/types.d.ts.map +1 -1
  71. package/types/src/x-modules/vendor/wiring.d.ts +36 -0
  72. package/types/src/x-modules/vendor/wiring.d.ts.map +1 -1
  73. package/vendor/index.js +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"vendor-banners-list.vue.js","sources":["../../../../../src/x-modules/vendor/components/vendor-banners-list.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { ListItem } from '../../../utils/types'\nimport { computed, defineComponent, h, inject, provide } from 'vue'\nimport { LIST_ITEMS_KEY } from '../../../components/decorators/injection.consts'\nimport ItemsList from '../../../components/items-list.vue'\nimport { use$x } from '../../../composables/use-$x'\nimport { useState } from '../../../composables/use-state'\nimport { AnimationProp } from '../../../types/animation-prop'\nimport { vendorXModule } from '../x-module'\n\n/**\n * It renders a {@link ItemsList} list of vendor banners from {@link VendorState.banners}.\n *\n * The component provides a default slot which wraps the whole component with the `vendorBanners`\n * plus the `injectedListItems` which also contains the injected list items from\n * the ancestor.\n *\n * It also provides the parent slots to customize the items.\n *\n * @public\n */\nexport default defineComponent({\n name: 'VendorBannersList',\n xModule: vendorXModule.name,\n props: {\n /** Animation component that will be used to animate the vendor banners. */\n animation: {\n type: AnimationProp,\n default: 'ul',\n },\n },\n setup(props, { slots }) {\n const $x = use$x()\n\n /** The vendor banners to render from the state. */\n const stateItems = useState('vendor').banners\n\n /** It injects {@link ListItem} provided by an ancestor as injectedListItems. */\n const injectedListItems = inject<Ref<ListItem[]>>(LIST_ITEMS_KEY as string)\n\n /**\n * The `stateItems` concatenated with the `injectedListItems` if there are.\n *\n * @remarks This computed defines the merging strategy of the `stateItems` and the\n * `injectedListItems`.\n *\n * @returns List of {@link ListItem}.\n */\n const items = computed(() => {\n if (!injectedListItems?.value!.length) {\n return stateItems.value\n }\n const items = [...injectedListItems.value]\n const positionedBanners = stateItems.value.filter(item => item.position != null)\n const unpositionedBanners = stateItems.value.filter(item => item.position == null)\n for (const item of positionedBanners) {\n let index = item.position! - 1\n while (items.at(index)?.modelName === 'VendorBanner') {\n index++\n }\n const isIndexInLoadedPages = index <= items.length\n const areAllPagesLoaded = $x.results.length === $x.totalResults\n if (!isIndexInLoadedPages && !areAllPagesLoaded) {\n break\n }\n items.splice(index, 0, item)\n }\n items.unshift(...unpositionedBanners)\n return items\n })\n\n /**\n * The computed list items of the entity that uses the mixin.\n *\n * @remarks It should be overridden in the component that uses the mixin and it's intended to be\n * filled with items from the state. Vue doesn't allow mixins as abstract classes.\n * @returns An empty array as fallback in case it is not overridden.\n */\n provide(LIST_ITEMS_KEY as string, items)\n\n return () => {\n const innerProps = { items: items.value, animation: props.animation }\n // https://vue-land.github.io/faq/forwarding-slots#passing-all-slots\n return slots.default?.(innerProps)[0] ?? h(ItemsList, innerProps, slots)\n }\n },\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;AAWA;;;;;;;;;;AAUE;AACF,gBAAe,eAAe,CAAC;AAC7B,IAAA,IAAI,EAA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AAmB,IAAK,CAAC,iBAAiB,EAAE;oBAC/C;gBACF;gBACA,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,EAAE,IAAI,CAAA;YAC7B;AACA,YAAA,KAAK,CAAC,OAAO,CAAC,GAAG,mBAAmB,CAAA;AACpC,YAAA,OAAO,KAAI;AACb,QAAA,CAAC,CAAA;AAED;;;;;;AAME;AACF,QAAA,OAAO,CAAC,cAAwB,EAAE,KAAK,CAAA;AAEvC,QAAA,OAAO,MAAI;AACT,YAAA,MAAM,UAAS,GAAI,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,CAAC,SAAQ,EAAE;;AAEpE,YAAA,OAAO,KAAK,CAAC,OAAO,GAAG,UAAU,CAAC,CAAC,CAAC,CAAA,IAAK,CAAC,CAAC,SAAS,EAAE,UAAU,EAAE,KAAK,CAAA;AACzE,QAAA,CAAA;IACF,CAAC;AACF,CAAA,CAAA;;;;"}
1
+ {"version":3,"file":"vendor-banners-list.vue.js","sources":["../../../../../src/x-modules/vendor/components/vendor-banners-list.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { ListItem } from '../../../utils/types'\nimport { computed, defineComponent, h, inject, provide } from 'vue'\nimport { LIST_ITEMS_KEY } from '../../../components/decorators/injection.consts'\nimport ItemsList from '../../../components/items-list.vue'\nimport { use$x } from '../../../composables/use-$x'\nimport { useState } from '../../../composables/use-state'\nimport { AnimationProp } from '../../../types/animation-prop'\nimport { vendorXModule } from '../x-module'\n\n/**\n * It renders a {@link ItemsList} list of vendor banners from {@link VendorState.banners}.\n *\n * The component provides a default slot which wraps the whole component with the `vendorBanners`\n * plus the `injectedListItems` which also contains the injected list items from\n * the ancestor.\n *\n * If the `queryPreviewHash` prop is provided, the vendor banners are retrieved from\n * {@link VendorState.queryPreviews}, scoped to the query preview.\n *\n * It also provides the parent slots to customize the items.\n *\n * @public\n */\nexport default defineComponent({\n name: 'VendorBannersList',\n xModule: vendorXModule.name,\n props: {\n /** Animation component that will be used to animate the vendor banners. */\n animation: {\n type: AnimationProp,\n default: 'ul',\n },\n /**\n * The hash of the query preview to render its vendor banners. If not provided,\n * the vendor banners from the root state are rendered.\n */\n queryPreviewHash: {\n type: String,\n default: undefined,\n },\n },\n setup(props, { slots }) {\n const $x = use$x()\n\n /** The vendor banners to render from the vendor state. */\n const vendorBanners = useState('vendor').banners\n\n /** The vendor banners of the query previews, indexed by their query preview hash. */\n const vendorQueryPreviews = useState('vendor').queryPreviews\n\n /**\n * The vendor banners to render. They are read from the query preview state when the\n * `queryPreviewHash` prop is provided, or from the root vendor state otherwise.\n */\n const stateItems = computed(() =>\n props.queryPreviewHash\n ? (vendorQueryPreviews.value?.[props.queryPreviewHash]?.banners ?? [])\n : vendorBanners.value,\n )\n\n /** It injects {@link ListItem} provided by an ancestor as injectedListItems. */\n const injectedListItems = inject<Ref<ListItem[]>>(LIST_ITEMS_KEY as string)\n\n /**\n * Indicates if all the results of the current context have been loaded, to know if the\n * vendor banners can be inserted in positions of not yet loaded pages.\n *\n * @remarks The query preview results are always considered as fully loaded, since they are\n * retrieved as a fixed batch.\n *\n * @returns Whether all the results are loaded.\n */\n const areAllPagesLoaded = computed(() =>\n props.queryPreviewHash ? true : $x.results.length === $x.totalResults,\n )\n\n /**\n * The `stateItems` concatenated with the `injectedListItems` if there are.\n *\n * @remarks This computed defines the merging strategy of the `stateItems` and the\n * `injectedListItems`.\n *\n * @returns List of {@link ListItem}.\n */\n const items = computed(() => {\n if (!injectedListItems?.value!.length) {\n return stateItems.value\n }\n const items = [...injectedListItems.value]\n const positionedBanners = stateItems.value.filter(item => item.position != null)\n const unpositionedBanners = stateItems.value.filter(item => item.position == null)\n for (const item of positionedBanners) {\n let index = item.position! - 1\n while (items.at(index)?.modelName === 'VendorBanner') {\n index++\n }\n const isIndexInLoadedPages = index <= items.length\n if (!isIndexInLoadedPages && !areAllPagesLoaded.value) {\n break\n }\n items.splice(index, 0, item)\n }\n items.unshift(...unpositionedBanners)\n return items\n })\n\n /**\n * The computed list items of the entity that uses the mixin.\n *\n * @remarks It should be overridden in the component that uses the mixin and it's intended to be\n * filled with items from the state. Vue doesn't allow mixins as abstract classes.\n * @returns An empty array as fallback in case it is not overridden.\n */\n provide(LIST_ITEMS_KEY as string, items)\n\n return () => {\n const innerProps = { items: items.value, animation: props.animation }\n // https://vue-land.github.io/faq/forwarding-slots#passing-all-slots\n return slots.default?.(innerProps)[0] ?? h(ItemsList, innerProps, slots)\n }\n },\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;AAWA;;;;;;;;;;;;;AAaE;AACF,gBAAe,eAAe,CAAC;AAC7B,IAAA,IAAI,EAAE,mBAAmB;IACzB,OAAO,EAAE,aAAa,CAAC,IAAI;AAC3B,IAAA,KAAK,EAAE;;AAEL,QAAA,SAAS,EAAE;AACT,YAAA,IAAI,EAAE,aAAa;AACnB,YAAA,OAAO,EAAE,IAAI;AACd,SAAA;AACD;;;AAGE;AACF,QAAA,gBAAgB,EAAE;AAChB,YAAA,IAAI,EAAE,MAAM;AACZ,YAAA,OAAO,EAAE,SAAS;AACnB,SAAA;AACF,KAAA;AACD,IAAA,KAAK,CAAC,KAAK,EAAE,EAAE,KAAI,EAAG,EAAA;AACpB,QAAA,MAAM,EAAC,GAAI,KAAK,EAAC;;QAGjB,MAAM,aAAY,GAAI,QAAQ,CAAC,QAAQ,CAAC,CAAC,OAAM;;QAG/C,MAAM,mBAAkB,GAAI,QAAQ,CAAC,QAAQ,CAAC,CAAC,aAAY;AAE3D;;;AAGE;QACF,MAAM,aAAa,QAAQ,CAAC,MAC1B,KAAK,CAAC;AACJ,eAAG,mBAAmB,CAAC,KAAK,GAAG,KAAK,CAAC,gBAAgB,CAAC,EAAE,OAAM,IAAK,EAAE;AACrE,cAAE,aAAa,CAAC,KAAK,CACzB;;AAGA,QAAA,MAAM,iBAAgB,GAAI,MAAM,CAAkB,cAAwB,CAAA;AAE1E;;;;;;;;AAQE;QACF,M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AE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,CAAC,SAAQ,EAAE;;AAEpE,YAAA,OAAO,KAAK,CAAC,OAAO,GAAG,UAAU,CAAC,CAAC,CAAC,CAAA,IAAK,CAAC,CAAC,SAAS,EAAE,UAAU,EAAE,KAAK,CAAA;AACzE,QAAA,CAAA;IACF,CAAC;AACF,CAAA,CAAA;;;;"}
@@ -1,4 +1,4 @@
1
- import { defineComponent, inject, computed, provide, h } from 'vue';
1
+ import { defineComponent, computed, inject, provide, h } from 'vue';
2
2
  import { LIST_ITEMS_KEY } from '../../../components/decorators/injection.consts.js';
3
3
  import ItemsList from '../../../components/items-list.vue.js';
4
4
  import { use$x } from '../../../composables/use-_x.js';
@@ -13,6 +13,9 @@ import { vendorXModule } from '../x-module.js';
13
13
  * plus the `injectedListItems` which also contains the injected list items from
14
14
  * the ancestor.
15
15
  *
16
+ * If the `queryPreviewHash` prop is provided, the vendor results are retrieved from
17
+ * {@link VendorState.queryPreviews}, scoped to the query preview.
18
+ *
16
19
  * It also provides the parent slots to customize the items.
17
20
  *
18
21
  * @public
@@ -26,13 +29,40 @@ var _sfc_main = defineComponent({
26
29
  type: AnimationProp,
27
30
  default: 'ul',
28
31
  },
32
+ /**
33
+ * The hash of the query preview to render its vendor results. If not provided,
34
+ * the vendor results from the root state are rendered.
35
+ */
36
+ queryPreviewHash: {
37
+ type: String,
38
+ default: undefined,
39
+ },
29
40
  },
30
41
  setup(props, { slots }) {
31
42
  const $x = use$x();
32
- /** The vendor results to render from the state. */
33
- const stateItems = useState('vendor').results;
43
+ /** The vendor results to render from the vendor state. */
44
+ const vendorResults = useState('vendor').results;
45
+ /** The vendor results of the query previews, indexed by their query preview hash. */
46
+ const vendorQueryPreviews = useState('vendor').queryPreviews;
47
+ /**
48
+ * The vendor results to render. They are read from the query preview state when the
49
+ * `queryPreviewHash` prop is provided, or from the root vendor state otherwise.
50
+ */
51
+ const stateItems = computed(() => props.queryPreviewHash
52
+ ? (vendorQueryPreviews.value?.[props.queryPreviewHash]?.results ?? [])
53
+ : vendorResults.value);
34
54
  /** It injects {@link ListItem} provided by an ancestor as injectedListItems. */
35
55
  const injectedListItems = inject(LIST_ITEMS_KEY);
56
+ /**
57
+ * Indicates if all the results of the current context have been loaded, to know if the
58
+ * vendor results can be inserted in positions of not yet loaded pages.
59
+ *
60
+ * @remarks The query preview results are always considered as fully loaded, since they are
61
+ * retrieved as a fixed batch.
62
+ *
63
+ * @returns Whether all the results are loaded.
64
+ */
65
+ const areAllPagesLoaded = computed(() => props.queryPreviewHash ? true : $x.results.length === $x.totalResults);
36
66
  /**
37
67
  * The `stateItems` concatenated with the `injectedListItems` if there are.
38
68
  *
@@ -53,8 +83,7 @@ var _sfc_main = defineComponent({
53
83
  index++;
54
84
  }
55
85
  const isIndexInLoadedPages = index <= items.length;
56
- const areAllPagesLoaded = $x.results.length === $x.totalResults;
57
- if (!isIndexInLoadedPages && !areAllPagesLoaded) {
86
+ if (!isIndexInLoadedPages && !areAllPagesLoaded.value) {
58
87
  break;
59
88
  }
60
89
  items.splice(index, 0, item);
@@ -1 +1 @@
1
- {"version":3,"file":"vendor-results-list.vue.js","sources":["../../../../../src/x-modules/vendor/components/vendor-results-list.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { ListItem } from '../../../utils/types'\nimport { computed, defineComponent, h, inject, provide } from 'vue'\nimport { LIST_ITEMS_KEY } from '../../../components/decorators/injection.consts'\nimport ItemsList from '../../../components/items-list.vue'\nimport { use$x } from '../../../composables/use-$x'\nimport { useState } from '../../../composables/use-state'\nimport { AnimationProp } from '../../../types/animation-prop'\nimport { vendorXModule } from '../x-module'\n\n/**\n * It renders a {@link ItemsList} of vendor results from {@link VendorState.results}.\n *\n * The component provides a default slot which wraps the whole component with the `vendorResults`\n * plus the `injectedListItems` which also contains the injected list items from\n * the ancestor.\n *\n * It also provides the parent slots to customize the items.\n *\n * @public\n */\nexport default defineComponent({\n name: 'VendorResultsList',\n xModule: vendorXModule.name,\n props: {\n /** Animation component that will be used to animate the vendor results. */\n animation: {\n type: AnimationProp,\n default: 'ul',\n },\n },\n setup(props, { slots }) {\n const $x = use$x()\n\n /** The vendor results to render from the state. */\n const stateItems = useState('vendor').results\n\n /** It injects {@link ListItem} provided by an ancestor as injectedListItems. */\n const injectedListItems = inject<Ref<ListItem[]>>(LIST_ITEMS_KEY as string)\n\n /**\n * The `stateItems` concatenated with the `injectedListItems` if there are.\n *\n * @remarks This computed defines the merging strategy of the `stateItems` and the\n * `injectedListItems`.\n *\n * @returns List of {@link ListItem}.\n */\n const items = computed(() => {\n if (!injectedListItems?.value!.length) {\n return stateItems.value\n }\n const items = [...injectedListItems.value]\n for (const item of stateItems.value) {\n const position = item.position ?? 1\n let index = position - 1\n while (items.at(index)?.modelName === 'VendorResult') {\n index++\n }\n const isIndexInLoadedPages = index <= items.length\n const areAllPagesLoaded = $x.results.length === $x.totalResults\n if (!isIndexInLoadedPages && !areAllPagesLoaded) {\n break\n }\n items.splice(index, 0, item)\n }\n return items\n })\n\n /**\n * The computed list items of the entity that uses the mixin.\n *\n * @remarks It should be overridden in the component that uses the mixin and it's intended to be\n * filled with items from the state. Vue doesn't allow mixins as abstract classes.\n * @returns An empty array as fallback in case it is not overridden.\n */\n provide(LIST_ITEMS_KEY as string, items)\n\n return () => {\n const innerProps = { items: items.value, animation: props.animation }\n // https://vue-land.github.io/faq/forwarding-slots#passing-all-slots\n return slots.default?.(innerProps)[0] ?? h(ItemsList, innerProps, slots)\n }\n },\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;AAWA;;;;;;;;;;AAUE;AACF,gBAAe,eAAe,CAAC;AAC7B,IAAA,IAAI,EAAE,mBAAmB;IACzB,OAAO,EAAE,aAAa,CAAC,IAAI;AAC3B,IAAA,KAAK,EAAE;;AAEL,QAAA,SAAS,EAAE;AACT,YAAA,IAAI,EAAE,aAAa;AACnB,YAAA,OAAO,EAAE,IAAI;AACd,SAAA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KAAK,CAAC,SAAQ,EAAE;;AAEpE,YAAA,OAAO,KAAK,CAAC,OAAO,GAAG,UAAU,CAAC,CAAC,CAAC,CAAA,IAAK,CAAC,CAAC,SAAS,EAAE,UAAU,EAAE,KAAK,CAAA;AACzE,QAAA,CAAA;IACF,CAAC;AACF,CAAA,CAAA;;;;"}
1
+ {"version":3,"file":"vendor-results-list.vue.js","sources":["../../../../../src/x-modules/vendor/components/vendor-results-list.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { ListItem } from '../../../utils/types'\nimport { computed, defineComponent, h, inject, provide } from 'vue'\nimport { LIST_ITEMS_KEY } from '../../../components/decorators/injection.consts'\nimport ItemsList from '../../../components/items-list.vue'\nimport { use$x } from '../../../composables/use-$x'\nimport { useState } from '../../../composables/use-state'\nimport { AnimationProp } from '../../../types/animation-prop'\nimport { vendorXModule } from '../x-module'\n\n/**\n * It renders a {@link ItemsList} of vendor results from {@link VendorState.results}.\n *\n * The component provides a default slot which wraps the whole component with the `vendorResults`\n * plus the `injectedListItems` which also contains the injected list items from\n * the ancestor.\n *\n * If the `queryPreviewHash` prop is provided, the vendor results are retrieved from\n * {@link VendorState.queryPreviews}, scoped to the query preview.\n *\n * It also provides the parent slots to customize the items.\n *\n * @public\n */\nexport default defineComponent({\n name: 'VendorResultsList',\n xModule: vendorXModule.name,\n props: {\n /** Animation component that will be used to animate the vendor results. */\n animation: {\n type: AnimationProp,\n default: 'ul',\n },\n /**\n * The hash of the query preview to render its vendor results. If not provided,\n * the vendor results from the root state are rendered.\n */\n queryPreviewHash: {\n type: String,\n default: undefined,\n },\n },\n setup(props, { slots }) {\n const $x = use$x()\n\n /** The vendor results to render from the vendor state. */\n const vendorResults = useState('vendor').results\n\n /** The vendor results of the query previews, indexed by their query preview hash. */\n const vendorQueryPreviews = useState('vendor').queryPreviews\n\n /**\n * The vendor results to render. They are read from the query preview state when the\n * `queryPreviewHash` prop is provided, or from the root vendor state otherwise.\n */\n const stateItems = computed(() =>\n props.queryPreviewHash\n ? (vendorQueryPreviews.value?.[props.queryPreviewHash]?.results ?? [])\n : vendorResults.value,\n )\n\n /** It injects {@link ListItem} provided by an ancestor as injectedListItems. */\n const injectedListItems = inject<Ref<ListItem[]>>(LIST_ITEMS_KEY as string)\n\n /**\n * Indicates if all the results of the current context have been loaded, to know if the\n * vendor results can be inserted in positions of not yet loaded pages.\n *\n * @remarks The query preview results are always considered as fully loaded, since they are\n * retrieved as a fixed batch.\n *\n * @returns Whether all the results are loaded.\n */\n const areAllPagesLoaded = computed(() =>\n props.queryPreviewHash ? true : $x.results.length === $x.totalResults,\n )\n\n /**\n * The `stateItems` concatenated with the `injectedListItems` if there are.\n *\n * @remarks This computed defines the merging strategy of the `stateItems` and the\n * `injectedListItems`.\n *\n * @returns List of {@link ListItem}.\n */\n const items = computed(() => {\n if (!injectedListItems?.value!.length) {\n return stateItems.value\n }\n const items = [...injectedListItems.value]\n for (const item of stateItems.value) {\n const position = item.position ?? 1\n let index = position - 1\n while (items.at(index)?.modelName === 'VendorResult') {\n index++\n }\n const isIndexInLoadedPages = index <= items.length\n if (!isIndexInLoadedPages && !areAllPagesLoaded.value) {\n break\n }\n items.splice(index, 0, item)\n }\n return items\n })\n\n /**\n * The computed list items of the entity that uses the mixin.\n *\n * @remarks It should be overridden in the component that uses the mixin and it's intended to be\n * filled with items from the state. Vue doesn't allow mixins as abstract classes.\n * @returns An empty array as fallback in case it is not overridden.\n */\n provide(LIST_ITEMS_KEY as string, items)\n\n return () => {\n const innerProps = { items: items.value, animation: props.animation }\n // https://vue-land.github.io/faq/forwarding-slots#passing-all-slots\n return slots.default?.(innerProps)[0] ?? h(ItemsList, innerProps, slots)\n }\n },\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;AAWA;;;;;;;;;;;;;AAaE;AACF,gBAAe,eAAe,CAAC;AAC7B,IAAA,IAAI,EAAE,mBAAmB;IACzB,OAAO,EAAE,aAAa,CAAC,IAAI;AAC3B,IAAA,KAAK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A,IAAI,KAAI,GAAI,WAAW,CAAA;gBACvB,OAAO,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,cAAc,cAAc,EAAE;AACpD,oBAAA,KAAK,EAAC;gBACR;AACA,gBAAA,MAAM,uBAAuB,SAAS,KAAK,CAAC,MAAK;gBACjD,IAAI,CAAC,oBAAmB,IAAK,CAAC,iBAAiB,CAAC,KAAK,EAAE;oBACrD;gBACF;gBACA,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,EAAE,IAAI,CAAA;YAC7B;AACA,YAAA,OAAO,KAAI;AACb,QAAA,CAAC,CAAA;AAED;;;;;;AAME;AACF,QAAA,OAAO,CAAC,cAAwB,EAAE,KAAK,CAAA;AAEvC,QAAA,OAAO,MAAI;AACT,YAAA,MAAM,UAAS,GAAI,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,CAAC,SAAQ,EAAE;;AAEpE,YAAA,OAAO,KAAK,CAAC,OAAO,GAAG,UAAU,CAAC,CAAC,CAAC,CAAA,IAAK,CAAC,CAAC,SAAS,EAAE,UAAU,EAAE,KAAK,CAAA;AACzE,QAAA,CAAA;IACF,CAAC;AACF,CAAA,CAAA;;;;"}
@@ -8,7 +8,17 @@ import { vendorXStoreModule } from './module.js';
8
8
  * @internal
9
9
  */
10
10
  const vendorEmitters = createStoreEmitters(vendorXStoreModule, {
11
- VendorQueryChanged: (_, getters) => getters.query,
11
+ VendorQueryChanged: {
12
+ selector: (_, getters) => getters.query,
13
+ /**
14
+ * Emits the event on module registration with the current query, so the consumers can
15
+ * fetch the vendor results and banners even when there is no query yet (e.g. the initial
16
+ * query previews).
17
+ *
18
+ * @internal
19
+ */
20
+ immediate: true,
21
+ },
12
22
  });
13
23
 
14
24
  export { vendorEmitters };
@@ -1 +1 @@
1
- {"version":3,"file":"emitters.js","sources":["../../../../../src/x-modules/vendor/store/emitters.ts"],"sourcesContent":["import { createStoreEmitters } from '../../../store'\nimport { vendorXStoreModule } from './module'\n\n/**\n * {@link StoreEmitters} For the vendor module.\n *\n * @internal\n */\nexport const vendorEmitters = createStoreEmitters(vendorXStoreModule, {\n VendorQueryChanged: (_, getters) => getters.query,\n})\n"],"names":[],"mappings":";;;;AAGA;;;;AAIG;AACI,MAAM,cAAc,GAAG,mBAAmB,CAAC,kBAAkB,EAAE;IACpE,kBAAkB,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,KAAK;AAClD,CAAA;;;;"}
1
+ {"version":3,"file":"emitters.js","sources":["../../../../../src/x-modules/vendor/store/emitters.ts"],"sourcesContent":["import { createStoreEmitters } from '../../../store'\nimport { vendorXStoreModule } from './module'\n\n/**\n * {@link StoreEmitters} For the vendor module.\n *\n * @internal\n */\nexport const vendorEmitters = createStoreEmitters(vendorXStoreModule, {\n VendorQueryChanged: {\n selector: (_, getters) => getters.query,\n /**\n * Emits the event on module registration with the current query, so the consumers can\n * fetch the vendor results and banners even when there is no query yet (e.g. the initial\n * query previews).\n *\n * @internal\n */\n immediate: true,\n },\n})\n"],"names":[],"mappings":";;;;AAGA;;;;AAIG;AACI,MAAM,cAAc,GAAG,mBAAmB,CAAC,kBAAkB,EAAE;AACpE,IAAA,kBAAkB,EAAE;QAClB,QAAQ,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,KAAK;AACvC;;;;;;AAMG;AACH,QAAA,SAAS,EAAE,IAAI;AAChB,KAAA;AACF,CAAA;;;;"}
@@ -12,6 +12,7 @@ import { query } from './getters/query.getter.js';
12
12
  function resettableVendorState() {
13
13
  return {
14
14
  banners: [],
15
+ queryPreviews: {},
15
16
  relatedTags: [],
16
17
  results: [],
17
18
  };
@@ -35,6 +36,27 @@ const vendorXStoreModule = {
35
36
  setResults(state, results) {
36
37
  state.results = results;
37
38
  },
39
+ setQueryPreviewVendorResults(state, { queryPreviewHash, results }) {
40
+ state.queryPreviews[queryPreviewHash] = {
41
+ ...state.queryPreviews[queryPreviewHash],
42
+ results: results.map(vendorResult => ({
43
+ ...vendorResult,
44
+ modelName: 'VendorResult',
45
+ })),
46
+ };
47
+ },
48
+ setQueryPreviewVendorBanners(state, { queryPreviewHash, banners }) {
49
+ state.queryPreviews[queryPreviewHash] = {
50
+ ...state.queryPreviews[queryPreviewHash],
51
+ banners: banners.map(vendorBanner => ({
52
+ ...vendorBanner,
53
+ modelName: 'VendorBanner',
54
+ })),
55
+ };
56
+ },
57
+ removeQueryPreviewVendorData(state, queryPreviewHash) {
58
+ delete state.queryPreviews[queryPreviewHash];
59
+ },
38
60
  resetState(state) {
39
61
  Object.assign(state, resettableVendorState());
40
62
  },
@@ -1 +1 @@
1
- {"version":3,"file":"module.js","sources":["../../../../../src/x-modules/vendor/store/module.ts"],"sourcesContent":["import type { VendorXStoreModule } from './types'\nimport { setQuery } from '../../../store/utils/query.utils'\nimport { setUrlParams } from './actions/set-url-params.action'\nimport { query } from './getters/query.getter'\n\n/**\n * Function to return the \"resettable\" part of the state.\n *\n * @returns The \"resettable\" part of the {@link VendorState}.\n *\n * @internal\n */\nexport function resettableVendorState() {\n return {\n banners: [],\n relatedTags: [],\n results: [],\n }\n}\n\nexport const vendorXStoreModule: VendorXStoreModule = {\n state: () => ({\n query: '',\n ...resettableVendorState(),\n }),\n getters: {\n query,\n },\n mutations: {\n setQuery,\n setBanners(state, banners) {\n state.banners = banners\n },\n setRelatedTags(state, relatedTags) {\n state.relatedTags = relatedTags\n },\n setResults(state, results) {\n state.results = results\n },\n resetState(state) {\n Object.assign(state, resettableVendorState())\n },\n },\n actions: {\n setUrlParams,\n },\n}\n"],"names":[],"mappings":";;;;AAKA;;;;;;AAMG;SACa,qBAAqB,GAAA;IACnC,OAAO;AACL,QAAA,OAAO,EAAE,EAAE;AACX,QAAA,WAAW,EAAE,EAAE;AACf,QAAA,OAAO,EAAE,EAAE;KACZ;AACH;AAEO,MAAM,kBAAkB,GAAuB;AACpD,IAAA,KAAK,EAAE,OAAO;AACZ,QAAA,KAAK,EAAE,EAAE;AACT,QAAA,GAAG,qBAAqB,EAAE;KAC3B,CAAC;AACF,IAAA,OAAO,EAAE;QACP,KAAK;AACN,KAAA;AACD,IAAA,SAAS,EAAE;QACT,QAAQ;QACR,UAAU,CAAC,KAAK,EAAE,OAAO,EAAA;AACvB,YAAA,KAAK,CAAC,OAAO,GAAG,OAAO;QACzB,CAAC;QACD,cAAc,CAAC,KAAK,EAAE,WAAW,EAAA;AAC/B,YAAA,KAAK,CAAC,WAAW,GAAG,WAAW;QACjC,CAAC;QACD,UAAU,CAAC,KAAK,EAAE,OAAO,EAAA;AACvB,YAAA,KAAK,CAAC,OAAO,GAAG,OAAO;QACzB,CAAC;AACD,QAAA,UAAU,CAAC,KAAK,EAAA;YACd,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,qBAAqB,EAAE,CAAC;QAC/C,CAAC;AACF,KAAA;AACD,IAAA,OAAO,EAAE;QACP,YAAY;AACb,KAAA;;;;;"}
1
+ {"version":3,"file":"module.js","sources":["../../../../../src/x-modules/vendor/store/module.ts"],"sourcesContent":["import type { VendorXStoreModule } from './types'\nimport { setQuery } from '../../../store/utils/query.utils'\nimport { setUrlParams } from './actions/set-url-params.action'\nimport { query } from './getters/query.getter'\n\n/**\n * Function to return the \"resettable\" part of the state.\n *\n * @returns The \"resettable\" part of the {@link VendorState}.\n *\n * @internal\n */\nexport function resettableVendorState() {\n return {\n banners: [],\n queryPreviews: {},\n relatedTags: [],\n results: [],\n }\n}\n\nexport const vendorXStoreModule: VendorXStoreModule = {\n state: () => ({\n query: '',\n ...resettableVendorState(),\n }),\n getters: {\n query,\n },\n mutations: {\n setQuery,\n setBanners(state, banners) {\n state.banners = banners\n },\n setRelatedTags(state, relatedTags) {\n state.relatedTags = relatedTags\n },\n setResults(state, results) {\n state.results = results\n },\n setQueryPreviewVendorResults(state, { queryPreviewHash, results }) {\n state.queryPreviews[queryPreviewHash] = {\n ...state.queryPreviews[queryPreviewHash],\n results: results.map(vendorResult => ({\n ...vendorResult,\n modelName: 'VendorResult' as const,\n })),\n }\n },\n setQueryPreviewVendorBanners(state, { queryPreviewHash, banners }) {\n state.queryPreviews[queryPreviewHash] = {\n ...state.queryPreviews[queryPreviewHash],\n banners: banners.map(vendorBanner => ({\n ...vendorBanner,\n modelName: 'VendorBanner' as const,\n })),\n }\n },\n removeQueryPreviewVendorData(state, queryPreviewHash) {\n delete state.queryPreviews[queryPreviewHash]\n },\n resetState(state) {\n Object.assign(state, resettableVendorState())\n },\n },\n actions: {\n setUrlParams,\n },\n}\n"],"names":[],"mappings":";;;;AAKA;;;;;;AAMG;SACa,qBAAqB,GAAA;IACnC,OAAO;AACL,QAAA,OAAO,EAAE,EAAE;AACX,QAAA,aAAa,EAAE,EAAE;AACjB,QAAA,WAAW,EAAE,EAAE;AACf,QAAA,OAAO,EAAE,EAAE;KACZ;AACH;AAEO,MAAM,kBAAkB,GAAuB;AACpD,IAAA,KAAK,EAAE,OAAO;AACZ,QAAA,KAAK,EAAE,EAAE;AACT,QAAA,GAAG,qBAAqB,EAAE;KAC3B,CAAC;AACF,IAAA,OAAO,EAAE;QACP,KAAK;AACN,KAAA;AACD,IAAA,SAAS,EAAE;QACT,QAAQ;QACR,UAAU,CAAC,KAAK,EAAE,OAAO,EAAA;AACvB,YAAA,KAAK,CAAC,OAAO,GAAG,OAAO;QACzB,CAAC;QACD,cAAc,CAAC,KAAK,EAAE,WAAW,EAAA;AAC/B,YAAA,KAAK,CAAC,WAAW,GAAG,WAAW;QACjC,CAAC;QACD,UAAU,CAAC,KAAK,EAAE,OAAO,EAAA;AACvB,YAAA,KAAK,CAAC,OAAO,GAAG,OAAO;QACzB,CAAC;AACD,QAAA,4BAA4B,CAAC,KAAK,EAAE,EAAE,gBAAgB,EAAE,OAAO,EAAE,EAAA;AAC/D,YAAA,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,GAAG;AACtC,gBAAA,GAAG,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC;gBACxC,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,YAAY,KAAK;AACpC,oBAAA,GAAG,YAAY;AACf,oBAAA,SAAS,EAAE,cAAuB;AACnC,iBAAA,CAAC,CAAC;aACJ;QACH,CAAC;AACD,QAAA,4BAA4B,CAAC,KAAK,EAAE,EAAE,gBAAgB,EAAE,OAAO,EAAE,EAAA;AAC/D,YAAA,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,GAAG;AACtC,gBAAA,GAAG,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC;gBACxC,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,YAAY,KAAK;AACpC,oBAAA,GAAG,YAAY;AACf,oBAAA,SAAS,EAAE,cAAuB;AACnC,iBAAA,CAAC,CAAC;aACJ;QACH,CAAC;QACD,4BAA4B,CAAC,KAAK,EAAE,gBAAgB,EAAA;AAClD,YAAA,OAAO,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC;QAC9C,CAAC;AACD,QAAA,UAAU,CAAC,KAAK,EAAA;YACd,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,qBAAqB,EAAE,CAAC;QAC/C,CAAC;AACF,KAAA;AACD,IAAA,OAAO,EAAE;QACP,YAAY;AACb,KAAA;;;;;"}
@@ -45,6 +45,28 @@ const setBanners = wireCommit('setBanners', ({ eventPayload }) => eventPayload.m
45
45
  ...vendorBanner,
46
46
  modelName: 'VendorBanner',
47
47
  })));
48
+ /**
49
+ * Sets the vendor results of a query preview in the {@link VendorXModule}.
50
+ *
51
+ * @public
52
+ */
53
+ const setQueryPreviewVendorResults = wireCommit('setQueryPreviewVendorResults');
54
+ /**
55
+ * Sets the vendor banners of a query preview in the {@link VendorXModule}.
56
+ *
57
+ * @public
58
+ */
59
+ const setQueryPreviewVendorBanners = wireCommit('setQueryPreviewVendorBanners');
60
+ /**
61
+ * Removes the vendor data of a non-cacheable query preview when it is unmounted.
62
+ *
63
+ * @internal
64
+ */
65
+ const removeQueryPreviewVendorData = createWireFromFunction(({ eventPayload, store }) => {
66
+ if (!eventPayload.cache) {
67
+ store.commit('x/vendor/removeQueryPreviewVendorData', eventPayload.queryPreviewHash);
68
+ }
69
+ });
48
70
  /**
49
71
  * Sets the vendor query of the {@link VendorXModule}.
50
72
  *
@@ -102,6 +124,15 @@ const vendorWiring = createWiring({
102
124
  VendorBannersChanged: {
103
125
  setBanners,
104
126
  },
127
+ QueryPreviewVendorResultsChanged: {
128
+ setQueryPreviewVendorResults,
129
+ },
130
+ QueryPreviewVendorBannersChanged: {
131
+ setQueryPreviewVendorBanners,
132
+ },
133
+ QueryPreviewUnmounted: {
134
+ removeQueryPreviewVendorData,
135
+ },
105
136
  VendorBannerMounted: {
106
137
  trackMounted,
107
138
  },
@@ -129,5 +160,5 @@ const vendorWiring = createWiring({
129
160
  },
130
161
  });
131
162
 
132
- export { setBanners, setResults, vendorWiring };
163
+ export { setBanners, setQueryPreviewVendorBanners, setQueryPreviewVendorResults, setResults, vendorWiring };
133
164
  //# sourceMappingURL=wiring.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/vendor/wiring.ts"],"sourcesContent":["import type { WirePayload, XEventPayload } from '../../wiring'\nimport {\n createWireFromFunction,\n createWiring,\n namespacedWireCommit,\n namespacedWireCommitWithoutPayload,\n namespacedWireDispatch,\n} from '../../wiring'\n\n/**\n * WireCommit for {@link VendorXModule}.\n *\n * @internal\n */\nconst wireCommit = namespacedWireCommit('vendor')\n\n/**\n * WireCommitWithoutPayload for {@link VendorXModule}.\n *\n * @internal\n */\nconst wireCommitWithoutPayload = namespacedWireCommitWithoutPayload('vendor')\n\n/**\n * WireDispatch for {@link VendorXModule}.\n *\n * @internal\n */\nconst wireDispatch = namespacedWireDispatch('vendor')\n\nconst fetchTagging = async (url: string) => fetch(url, { method: 'GET', keepalive: true })\n\nconst trackMounted = createWireFromFunction<\n XEventPayload<'VendorResultMounted' | 'VendorBannerMounted'>\n>(({ eventPayload: { tagging } }) => tagging?.mountedUrl && void fetchTagging(tagging.mountedUrl))\n\nconst trackView = createWireFromFunction<\n XEventPayload<'UserViewedAVendorResult' | 'UserViewedAVendorBanner'>\n>(({ eventPayload: { tagging } }) => tagging?.viewUrl && void fetchTagging(tagging.viewUrl))\n\nconst trackClick = createWireFromFunction<\n XEventPayload<'UserClickedAVendorResult' | 'UserClickedAVendorBanner'>\n>(({ eventPayload: { tagging } }) => tagging?.clickUrl && void fetchTagging(tagging.clickUrl))\n\nconst trackResultAddToCart = createWireFromFunction<\n XEventPayload<'UserClickedVendorResultAddToCart'>\n>(({ eventPayload: { tagging } }) => tagging?.add2cartUrl && void fetchTagging(tagging.add2cartUrl))\n\n/**\n * Sets the vendor results of the {@link VendorXModule}.\n *\n * @public\n */\nexport const setResults = wireCommit(\n 'setResults',\n ({ eventPayload }: WirePayload<XEventPayload<'VendorResultsChanged'>>) =>\n eventPayload.map(vendorResult => ({\n ...vendorResult,\n modelName: 'VendorResult' as const,\n })),\n)\n\n/**\n * Sets the vendor banners of the {@link VendorXModule}.\n *\n * @public\n */\nexport const setBanners = wireCommit(\n 'setBanners',\n ({ eventPayload }: WirePayload<XEventPayload<'VendorBannersChanged'>>) =>\n eventPayload.map(vendorBanner => ({\n ...vendorBanner,\n modelName: 'VendorBanner' as const,\n })),\n)\n\n/**\n * Sets the vendor query of the {@link VendorXModule}.\n *\n * @public\n */\nconst setVendorQuery = wireCommit('setQuery')\n\n/**\n * Resets the vendor query of the {@link VendorXModule}.\n *\n * @public\n */\nconst resetVendorQuery = wireCommit('setQuery', '')\n\n/**\n * Resets the vendor state of the {@link VendorXModule}.\n *\n * @public\n */\nconst resetVendorState = wireCommitWithoutPayload('resetState')\n\n/**\n * Sets the vendor state from URL data.\n *\n * @public\n */\nconst setUrlParams = wireDispatch('setUrlParams')\n\n/**\n * Sets the vendor related tags of the {@link VendorXModule}.\n *\n * @public\n */\nconst setVendorRelatedTags = wireCommit('setRelatedTags')\n\n/**\n * Wiring configuration for the {@link VendorXModule | vendor module}.\n *\n * @internal\n */\nexport const vendorWiring = createWiring({\n ParamsLoadedFromUrl: {\n setUrlParams,\n },\n VendorResultsChanged: {\n setResults,\n },\n VendorResultMounted: {\n trackMounted,\n },\n UserViewedAVendorResult: {\n trackView,\n },\n UserClickedAVendorResult: {\n trackClick,\n },\n UserClickedVendorResultAddToCart: {\n trackResultAddToCart,\n },\n VendorBannersChanged: {\n setBanners,\n },\n VendorBannerMounted: {\n trackMounted,\n },\n UserViewedAVendorBanner: {\n trackView,\n },\n UserClickedAVendorBanner: {\n trackClick,\n },\n SelectedRelatedTagsChanged: {\n resetVendorState,\n setVendorRelatedTags,\n },\n UserAcceptedAQuery: {\n resetVendorState,\n setVendorQuery,\n },\n UserClearedQuery: {\n resetVendorState,\n resetVendorQuery,\n },\n UserBrowsedToCategory: {\n resetVendorState,\n resetVendorQuery,\n },\n})\n"],"names":[],"mappings":";;;;;;AASA;;;;AAIG;AACH,MAAM,UAAU,GAAG,oBAAoB,CAAC,QAAQ,CAAC;AAEjD;;;;AAIG;AACH,MAAM,wBAAwB,GAAG,kCAAkC,CAAC,QAAQ,CAAC;AAE7E;;;;AAIG;AACH,MAAM,YAAY,GAAG,sBAAsB,CAAC,QAAQ,CAAC;AAErD,MAAM,YAAY,GAAG,OAAO,GAAW,KAAK,KAAK,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;AAE1F,MAAM,YAAY,GAAG,sBAAsB,CAEzC,CAAC,EAAE,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,KAAK,OAAO,EAAE,UAAU,IAAI,KAAK,YAAY,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;AAElG,MAAM,SAAS,GAAG,sBAAsB,CAEtC,CAAC,EAAE,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,KAAK,OAAO,EAAE,OAAO,IAAI,KAAK,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AAE5F,MAAM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AAE;QACnB,YAAY;AACb,KAAA;AACD,IAAA,uBAAuB,EAAE;QACvB,SAAS;AACV,KAAA;AACD,IAAA,wBAAwB,EAAE;QACxB,UAAU;AACX,KAAA;AACD,IAAA,gCAAgC,EAAE;QAChC,oBAAoB;AACrB,KAAA;AACD,IAAA,oBAAoB,EAAE;QACpB,UAAU;AACX,KAAA;AACD,IAAA,mBAAmB,EAAE;QACnB,YAAY;AACb,KAAA;AACD,IAAA,uBAAuB,EAAE;QACvB,SAAS;AACV,KAAA;AACD,IAAA,wBAAwB,EAAE;QACxB,UAAU;AACX,KAAA;AACD,IAAA,0BAA0B,EAAE;QAC1B,gBAAgB;QAChB,oBAAoB;AACrB,KAAA;AACD,IAAA,kBAAkB,EAAE;QAClB,gBAAgB;QAChB,cAAc;AACf,KAAA;AACD,IAAA,gBAAgB,EAAE;QAChB,gBAAgB;QAChB,gBAAgB;AACjB,KAAA;AACD,IAAA,qBAAqB,EAAE;QACrB,gBAAgB;QAChB,gBAAgB;AACjB,KAAA;AACF,CAAA;;;;"}
1
+ {"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/vendor/wiring.ts"],"sourcesContent":["import type { WirePayload, XEventPayload } from '../../wiring'\nimport {\n createWireFromFunction,\n createWiring,\n namespacedWireCommit,\n namespacedWireCommitWithoutPayload,\n namespacedWireDispatch,\n} from '../../wiring'\n\n/**\n * WireCommit for {@link VendorXModule}.\n *\n * @internal\n */\nconst wireCommit = namespacedWireCommit('vendor')\n\n/**\n * WireCommitWithoutPayload for {@link VendorXModule}.\n *\n * @internal\n */\nconst wireCommitWithoutPayload = namespacedWireCommitWithoutPayload('vendor')\n\n/**\n * WireDispatch for {@link VendorXModule}.\n *\n * @internal\n */\nconst wireDispatch = namespacedWireDispatch('vendor')\n\nconst fetchTagging = async (url: string) => fetch(url, { method: 'GET', keepalive: true })\n\nconst trackMounted = createWireFromFunction<\n XEventPayload<'VendorResultMounted' | 'VendorBannerMounted'>\n>(({ eventPayload: { tagging } }) => tagging?.mountedUrl && void fetchTagging(tagging.mountedUrl))\n\nconst trackView = createWireFromFunction<\n XEventPayload<'UserViewedAVendorResult' | 'UserViewedAVendorBanner'>\n>(({ eventPayload: { tagging } }) => tagging?.viewUrl && void fetchTagging(tagging.viewUrl))\n\nconst trackClick = createWireFromFunction<\n XEventPayload<'UserClickedAVendorResult' | 'UserClickedAVendorBanner'>\n>(({ eventPayload: { tagging } }) => tagging?.clickUrl && void fetchTagging(tagging.clickUrl))\n\nconst trackResultAddToCart = createWireFromFunction<\n XEventPayload<'UserClickedVendorResultAddToCart'>\n>(({ eventPayload: { tagging } }) => tagging?.add2cartUrl && void fetchTagging(tagging.add2cartUrl))\n\n/**\n * Sets the vendor results of the {@link VendorXModule}.\n *\n * @public\n */\nexport const setResults = wireCommit(\n 'setResults',\n ({ eventPayload }: WirePayload<XEventPayload<'VendorResultsChanged'>>) =>\n eventPayload.map(vendorResult => ({\n ...vendorResult,\n modelName: 'VendorResult' as const,\n })),\n)\n\n/**\n * Sets the vendor banners of the {@link VendorXModule}.\n *\n * @public\n */\nexport const setBanners = wireCommit(\n 'setBanners',\n ({ eventPayload }: WirePayload<XEventPayload<'VendorBannersChanged'>>) =>\n eventPayload.map(vendorBanner => ({\n ...vendorBanner,\n modelName: 'VendorBanner' as const,\n })),\n)\n\n/**\n * Sets the vendor results of a query preview in the {@link VendorXModule}.\n *\n * @public\n */\nexport const setQueryPreviewVendorResults = wireCommit('setQueryPreviewVendorResults')\n\n/**\n * Sets the vendor banners of a query preview in the {@link VendorXModule}.\n *\n * @public\n */\nexport const setQueryPreviewVendorBanners = wireCommit('setQueryPreviewVendorBanners')\n\n/**\n * Removes the vendor data of a non-cacheable query preview when it is unmounted.\n *\n * @internal\n */\nconst removeQueryPreviewVendorData = createWireFromFunction<XEventPayload<'QueryPreviewUnmounted'>>(\n ({ eventPayload, store }) => {\n if (!eventPayload.cache) {\n store.commit('x/vendor/removeQueryPreviewVendorData', eventPayload.queryPreviewHash)\n }\n },\n)\n\n/**\n * Sets the vendor query of the {@link VendorXModule}.\n *\n * @public\n */\nconst setVendorQuery = wireCommit('setQuery')\n\n/**\n * Resets the vendor query of the {@link VendorXModule}.\n *\n * @public\n */\nconst resetVendorQuery = wireCommit('setQuery', '')\n\n/**\n * Resets the vendor state of the {@link VendorXModule}.\n *\n * @public\n */\nconst resetVendorState = wireCommitWithoutPayload('resetState')\n\n/**\n * Sets the vendor state from URL data.\n *\n * @public\n */\nconst setUrlParams = wireDispatch('setUrlParams')\n\n/**\n * Sets the vendor related tags of the {@link VendorXModule}.\n *\n * @public\n */\nconst setVendorRelatedTags = wireCommit('setRelatedTags')\n\n/**\n * Wiring configuration for the {@link VendorXModule | vendor module}.\n *\n * @internal\n */\nexport const vendorWiring = createWiring({\n ParamsLoadedFromUrl: {\n setUrlParams,\n },\n VendorResultsChanged: {\n setResults,\n },\n VendorResultMounted: {\n trackMounted,\n },\n UserViewedAVendorResult: {\n trackView,\n },\n UserClickedAVendorResult: {\n trackClick,\n },\n UserClickedVendorResultAddToCart: {\n trackResultAddToCart,\n },\n VendorBannersChanged: {\n setBanners,\n },\n QueryPreviewVendorResultsChanged: {\n setQueryPreviewVendorResults,\n },\n QueryPreviewVendorBannersChanged: {\n setQueryPreviewVendorBanners,\n },\n QueryPreviewUnmounted: {\n removeQueryPreviewVendorData,\n },\n VendorBannerMounted: {\n trackMounted,\n },\n UserViewedAVendorBanner: {\n trackView,\n },\n UserClickedAVendorBanner: {\n trackClick,\n },\n SelectedRelatedTagsChanged: {\n resetVendorState,\n setVendorRelatedTags,\n },\n UserAcceptedAQuery: {\n resetVendorState,\n setVendorQuery,\n },\n UserClearedQuery: {\n resetVendorState,\n resetVendorQuery,\n },\n UserBrowsedToCategory: {\n resetVendorState,\n resetVendorQuery,\n },\n})\n"],"names":[],"mappings":";;;;;;AASA;;;;AAIG;AACH,MAAM,UAAU,GAAG,oBAAoB,CAAC,QAAQ,CAAC;AAEjD;;;;AAIG;AACH,MAAM,wBAAwB,GAA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B;AAC7B,KAAA;AACD,IAAA,qBAAqB,EAAE;QACrB,4BAA4B;AAC7B,KAAA;AACD,IAAA,mBAAmB,EAAE;QACnB,YAAY;AACb,KAAA;AACD,IAAA,uBAAuB,EAAE;QACvB,SAAS;AACV,KAAA;AACD,IAAA,wBAAwB,EAAE;QACxB,UAAU;AACX,KAAA;AACD,IAAA,0BAA0B,EAAE;QAC1B,gBAAgB;QAChB,oBAAoB;AACrB,KAAA;AACD,IAAA,kBAAkB,EAAE;QAClB,gBAAgB;QAChB,cAAc;AACf,KAAA;AACD,IAAA,gBAAgB,EAAE;QAChB,gBAAgB;QAChB,gBAAgB;AACjB,KAAA;AACD,IAAA,qBAAqB,EAAE;QACrB,gBAAgB;QAChB,gBAAgB;AACjB,KAAA;AACF,CAAA;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empathyco/x-components",
3
- "version": "8.10.0",
3
+ "version": "8.12.0",
4
4
  "description": "Empathy X Components",
5
5
  "author": "Empathy Systems Corporation S.L.",
6
6
  "license": "Apache-2.0",
@@ -117,5 +117,5 @@
117
117
  "access": "public",
118
118
  "directory": "dist"
119
119
  },
120
- "gitHead": "a6d91f9aee1997e73c308b735dfc6b53a08bab2f"
120
+ "gitHead": "c2630b7e854bbeb96f5486f2fe207c939c1794e2"
121
121
  }