@empathyco/x-components 8.4.0 → 8.5.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 (55) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/core/index.js.map +1 -1
  3. package/docs/API-reference/api/x-components.hierarchicalfilter.md +1 -0
  4. package/docs/API-reference/api/x-components.md +37 -0
  5. package/docs/API-reference/api/x-components.setbanners.md +13 -0
  6. package/docs/API-reference/api/x-components.simplefilter.md +1 -0
  7. package/docs/API-reference/api/x-components.snippetcallbacks.md +1 -0
  8. package/docs/API-reference/api/x-components.vendorbanner.md +59 -0
  9. package/docs/API-reference/api/x-components.vendorbanner.position.md +11 -0
  10. package/docs/API-reference/api/x-components.vendorbannerslist.md +31 -0
  11. package/docs/API-reference/api/x-components.vendormutations.md +17 -0
  12. package/docs/API-reference/api/x-components.vendormutations.setbanners.md +11 -0
  13. package/docs/API-reference/api/x-components.vendorstate.banners.md +11 -0
  14. package/docs/API-reference/api/x-components.vendorstate.md +17 -0
  15. package/docs/API-reference/api/x-components.vendorxevents.md +19 -0
  16. package/docs/API-reference/api/x-components.vendorxevents.vendorbannerschanged.md +13 -0
  17. package/docs/API-reference/components/vendor/x-components.vendor-banners-list.md +21 -0
  18. package/js/components/base-grid.vue.js.map +1 -1
  19. package/js/components/base-grid.vue2.js +5 -1
  20. package/js/components/base-grid.vue2.js.map +1 -1
  21. package/js/components/base-grid.vue3.js +1 -1
  22. package/js/index.js +2 -1
  23. package/js/index.js.map +1 -1
  24. package/js/x-modules/vendor/components/vendor-banners-list.vue.js +83 -0
  25. package/js/x-modules/vendor/components/vendor-banners-list.vue.js.map +1 -0
  26. package/js/x-modules/vendor/components/vendor-banners-list.vue2.js +6 -0
  27. package/js/x-modules/vendor/components/vendor-banners-list.vue2.js.map +1 -0
  28. package/js/x-modules/vendor/store/module.js +4 -0
  29. package/js/x-modules/vendor/store/module.js.map +1 -1
  30. package/js/x-modules/vendor/wiring.js +20 -1
  31. package/js/x-modules/vendor/wiring.js.map +1 -1
  32. package/package.json +2 -2
  33. package/report/x-components.api.json +497 -5
  34. package/report/x-components.api.md +38 -0
  35. package/types/src/components/base-grid.vue.d.ts.map +1 -1
  36. package/types/src/components/snippet-callbacks.vue.d.ts +1 -0
  37. package/types/src/components/snippet-callbacks.vue.d.ts.map +1 -1
  38. package/types/src/x-modules/facets/components/filters/hierarchical-filter.vue.d.ts +1 -0
  39. package/types/src/x-modules/facets/components/filters/hierarchical-filter.vue.d.ts.map +1 -1
  40. package/types/src/x-modules/facets/components/filters/simple-filter.vue.d.ts +1 -0
  41. package/types/src/x-modules/facets/components/filters/simple-filter.vue.d.ts.map +1 -1
  42. package/types/src/x-modules/vendor/components/index.d.ts +1 -0
  43. package/types/src/x-modules/vendor/components/index.d.ts.map +1 -1
  44. package/types/src/x-modules/vendor/components/vendor-banners-list.vue.d.ts +30 -0
  45. package/types/src/x-modules/vendor/components/vendor-banners-list.vue.d.ts.map +1 -0
  46. package/types/src/x-modules/vendor/events.types.d.ts +7 -1
  47. package/types/src/x-modules/vendor/events.types.d.ts.map +1 -1
  48. package/types/src/x-modules/vendor/store/module.d.ts.map +1 -1
  49. package/types/src/x-modules/vendor/store/types.d.ts +3 -1
  50. package/types/src/x-modules/vendor/store/types.d.ts.map +1 -1
  51. package/types/src/x-modules/vendor/types.d.ts +10 -1
  52. package/types/src/x-modules/vendor/types.d.ts.map +1 -1
  53. package/types/src/x-modules/vendor/wiring.d.ts +10 -0
  54. package/types/src/x-modules/vendor/wiring.d.ts.map +1 -1
  55. package/vendor/index.js +2 -1
@@ -196,6 +196,7 @@ declare const _default: import("vue").DefineComponent<{}, {
196
196
  UserViewedAVendorResult: (payload: import("..").VendorResult, metadata: WireMetadata) => unknown;
197
197
  UserClickedAVendorResult: (payload: import("..").VendorResult, metadata: WireMetadata) => unknown;
198
198
  UserClickedVendorResultAddToCart: (payload: import("..").VendorResult, metadata: WireMetadata) => unknown;
199
+ VendorBannersChanged: (payload: Omit<import("..").VendorBanner, "modelName">[], metadata: WireMetadata) => unknown;
199
200
  }>>;
200
201
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {
201
202
  GlobalXBus: import("vue").DefineComponent<{}, {}, any>;
@@ -1 +1 @@
1
- {"version":3,"file":"snippet-callbacks.vue?vue&type=script&lang.d.ts","sourceRoot":"","sources":["../../../../src/components/snippet-callbacks.vue?vue&type=script&lang.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAO7C;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACH,wBA0CE"}
1
+ {"version":3,"file":"snippet-callbacks.vue?vue&type=script&lang.d.ts","sourceRoot":"","sources":["../../../../src/components/snippet-callbacks.vue?vue&type=script&lang.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAO7C;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACH,wBA0CE"}
@@ -221,6 +221,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
221
221
  UserViewedAVendorResult?: import("../../../vendor").VendorResult | undefined;
222
222
  UserClickedAVendorResult?: import("../../../vendor").VendorResult | undefined;
223
223
  UserClickedVendorResultAddToCart?: import("../../../vendor").VendorResult | undefined;
224
+ VendorBannersChanged?: Omit<import("../../../vendor").VendorBanner, "modelName">[] | undefined;
224
225
  }>;
225
226
  innerCssClasses: import("vue").ComputedRef<(string | Dictionary<boolean>)[]>;
226
227
  renderedChildrenFilters: import("vue").ComputedRef<HierarchicalFilterModel[]>;
@@ -1 +1 @@
1
- {"version":3,"file":"hierarchical-filter.vue?vue&type=script&lang.d.ts","sourceRoot":"","sources":["../../../../../../../src/x-modules/facets/components/filters/hierarchical-filter.vue?vue&type=script&lang.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,kBAAkB,IAAI,uBAAuB,EAAE,MAAM,oBAAoB,CAAA;AAC/F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AACnC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AASnE;;;;GAIG;;IAMC,iCAAiC;;cAEf,QAAQ,CAAC,uBAAuB,CAAC;;;IAGnD,+DAA+D;;IAE/D;;;;OAIG;iBACoB,QAAQ,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IACtD,+BAA+B;;cAEd,QAAQ,CAAC,CAAC,MAAM,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC;;;IAG3D,0CAA0C;;IAE1C,0CAA0C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6CAwDM,uBAAuB;;IA5EvE,iCAAiC;;cAEf,QAAQ,CAAC,uBAAuB,CAAC;;;IAGnD,+DAA+D;;IAE/D;;;;OAIG;iBACoB,QAAQ,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IACtD,+BAA+B;;cAEd,QAAQ,CAAC,CAAC,MAAM,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC;;;IAG3D,0CAA0C;;IAE1C,0CAA0C;;;;;;;;AAzB9C,wBA+GE"}
1
+ {"version":3,"file":"hierarchical-filter.vue?vue&type=script&lang.d.ts","sourceRoot":"","sources":["../../../../../../../src/x-modules/facets/components/filters/hierarchical-filter.vue?vue&type=script&lang.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,kBAAkB,IAAI,uBAAuB,EAAE,MAAM,oBAAoB,CAAA;AAC/F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AACnC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AASnE;;;;GAIG;;IAMC,iCAAiC;;cAEf,QAAQ,CAAC,uBAAuB,CAAC;;;IAGnD,+DAA+D;;IAE/D;;;;OAIG;iBACoB,QAAQ,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IACtD,+BAA+B;;cAEd,QAAQ,CAAC,CAAC,MAAM,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC;;;IAG3D,0CAA0C;;IAE1C,0CAA0C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6CAwDM,uBAAuB;;IA5EvE,iCAAiC;;cAEf,QAAQ,CAAC,uBAAuB,CAAC;;;IAGnD,+DAA+D;;IAE/D;;;;OAIG;iBACoB,QAAQ,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IACtD,+BAA+B;;cAEd,QAAQ,CAAC,CAAC,MAAM,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC;;;IAG3D,0CAA0C;;IAE1C,0CAA0C;;;;;;;;AAzB9C,wBA+GE"}
@@ -211,6 +211,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
211
211
  UserViewedAVendorResult?: import("../../../vendor").VendorResult | undefined;
212
212
  UserClickedAVendorResult?: import("../../../vendor").VendorResult | undefined;
213
213
  UserClickedVendorResultAddToCart?: import("../../../vendor").VendorResult | undefined;
214
+ VendorBannersChanged?: Omit<import("../../../vendor").VendorBanner, "modelName">[] | undefined;
214
215
  }>;
215
216
  innerCssClasses: import("vue").ComputedRef<(string | Dictionary<boolean>)[]>;
216
217
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
@@ -1 +1 @@
1
- {"version":3,"file":"simple-filter.vue?vue&type=script&lang.d.ts","sourceRoot":"","sources":["../../../../../../../src/x-modules/facets/components/filters/simple-filter.vue?vue&type=script&lang.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,IAAI,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAC3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AACnC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AAKnE;;;;GAIG;;IAOC,iCAAiC;;cAEf,QAAQ,CAAC,iBAAiB,CAAC;;;IAG7C,iFAAiF;iBAC1D,QAAQ,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IACtD,+BAA+B;;cAEd,QAAQ,CAAC,CAAC,MAAM,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAT3D,iCAAiC;;cAEf,QAAQ,CAAC,iBAAiB,CAAC;;;IAG7C,iFAAiF;iBAC1D,QAAQ,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IACtD,+BAA+B;;cAEd,QAAQ,CAAC,CAAC,MAAM,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC;;;;;;;;AAf/D,wBAsCE"}
1
+ {"version":3,"file":"simple-filter.vue?vue&type=script&lang.d.ts","sourceRoot":"","sources":["../../../../../../../src/x-modules/facets/components/filters/simple-filter.vue?vue&type=script&lang.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,IAAI,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAC3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AACnC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AAKnE;;;;GAIG;;IAOC,iCAAiC;;cAEf,QAAQ,CAAC,iBAAiB,CAAC;;;IAG7C,iFAAiF;iBAC1D,QAAQ,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IACtD,+BAA+B;;cAEd,QAAQ,CAAC,CAAC,MAAM,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAT3D,iCAAiC;;cAEf,QAAQ,CAAC,iBAAiB,CAAC;;;IAG7C,iFAAiF;iBAC1D,QAAQ,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IACtD,+BAA+B;;cAEd,QAAQ,CAAC,CAAC,MAAM,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC;;;;;;;;AAf/D,wBAsCE"}
@@ -1,2 +1,3 @@
1
+ export { default as VendorBannersList } from './vendor-banners-list.vue';
1
2
  export { default as VendorResultsList } from './vendor-results-list.vue';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/x-modules/vendor/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,2BAA2B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/x-modules/vendor/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AACxE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,2BAA2B,CAAA"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * It renders a {@link ItemsList} list of vendor banners from {@link VendorState.banners}.
3
+ *
4
+ * The component provides a default slot which wraps the whole component with the `vendorBanners`
5
+ * plus the `injectedListItems` which also contains the injected list items from
6
+ * the ancestor.
7
+ *
8
+ * It also provides the parent slots to customize the items.
9
+ *
10
+ * @public
11
+ */
12
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
13
+ /** Animation component that will be used to animate the vendor banners. */
14
+ animation: {
15
+ type: (StringConstructor | ObjectConstructor | FunctionConstructor)[];
16
+ default: string;
17
+ };
18
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
19
+ [key: string]: any;
20
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
21
+ /** Animation component that will be used to animate the vendor banners. */
22
+ animation: {
23
+ type: (StringConstructor | ObjectConstructor | FunctionConstructor)[];
24
+ default: string;
25
+ };
26
+ }>> & Readonly<{}>, {
27
+ animation: string | Function | Record<string, any>;
28
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
29
+ export default _default;
30
+ //# sourceMappingURL=vendor-banners-list.vue?vue&type=script&lang.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vendor-banners-list.vue?vue&type=script&lang.d.ts","sourceRoot":"","sources":["../../../../../../src/x-modules/vendor/components/vendor-banners-list.vue?vue&type=script&lang.ts"],"names":[],"mappings":"AAWA;;;;;;;;;;GAUG;;IAKC,2EAA2E;;;;;;;;IAA3E,2EAA2E;;;;;;;;AAJ/E,wBAiEE"}
@@ -1,4 +1,4 @@
1
- import type { VendorResult } from './types';
1
+ import type { VendorBanner, VendorResult } from './types';
2
2
  /**
3
3
  * Directory of events for the vendor module.
4
4
  *
@@ -26,5 +26,11 @@ export interface VendorXEvents {
26
26
  * Payload: The {@link VendorResult | vendor result} that was clicked.
27
27
  */
28
28
  UserClickedVendorResultAddToCart: VendorResult;
29
+ /**
30
+ * The x consumer has provided vendor banners to be inserted in the result grid.
31
+ * Payload: The array of vendor banner inputs with their items and positions.
32
+ * modelName is excluded since it is an internal field, and we will assign it under the hood.
33
+ */
34
+ VendorBannersChanged: Omit<VendorBanner, 'modelName'>[];
29
35
  }
30
36
  //# sourceMappingURL=events.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"events.types.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/vendor/events.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAE3C;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,oBAAoB,EAAE,IAAI,CAAC,YAAY,EAAE,WAAW,CAAC,EAAE,CAAA;IACvD;;;OAGG;IACH,uBAAuB,EAAE,YAAY,CAAA;IACrC;;;OAGG;IACH,wBAAwB,EAAE,YAAY,CAAA;IACtC;;;OAGG;IACH,gCAAgC,EAAE,YAAY,CAAA;CAC/C"}
1
+ {"version":3,"file":"events.types.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/vendor/events.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAEzD;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,oBAAoB,EAAE,IAAI,CAAC,YAAY,EAAE,WAAW,CAAC,EAAE,CAAA;IACvD;;;OAGG;IACH,uBAAuB,EAAE,YAAY,CAAA;IACrC;;;OAGG;IACH,wBAAwB,EAAE,YAAY,CAAA;IACtC;;;OAGG;IACH,gCAAgC,EAAE,YAAY,CAAA;IAE9C;;;;OAIG;IACH,oBAAoB,EAAE,IAAI,CAAC,YAAY,EAAE,WAAW,CAAC,EAAE,CAAA;CACxD"}
@@ -1 +1 @@
1
- {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../../../src/x-modules/vendor/store/module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAEjD,eAAO,MAAM,kBAAkB,EAAE,kBAWhC,CAAA"}
1
+ {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../../../src/x-modules/vendor/store/module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAEjD,eAAO,MAAM,kBAAkB,EAAE,kBAehC,CAAA"}
@@ -1,11 +1,13 @@
1
1
  import type { XStoreModule } from '../../../store';
2
- import type { VendorResult } from '../types';
2
+ import type { VendorBanner, VendorResult } from '../types';
3
3
  export interface VendorState {
4
+ banners: VendorBanner[];
4
5
  results: VendorResult[];
5
6
  }
6
7
  export interface VendorGetters {
7
8
  }
8
9
  export interface VendorMutations {
10
+ setBanners: (banners: VendorBanner[]) => void;
9
11
  setResults: (results: VendorResult[]) => void;
10
12
  }
11
13
  export interface VendorActions {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/x-modules/vendor/store/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAE5C,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,YAAY,EAAE,CAAA;CACxB;AAED,MAAM,WAAW,aAAa;CAAG;AAEjC,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,KAAK,IAAI,CAAA;CAC9C;AAED,MAAM,WAAW,aAAa;CAAG;AAEjC,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAC3C,WAAW,EACX,aAAa,EACb,eAAe,EACf,aAAa,CACd,CAAA"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/x-modules/vendor/store/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAE1D,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,OAAO,EAAE,YAAY,EAAE,CAAA;CACxB;AAED,MAAM,WAAW,aAAa;CAAG;AAEjC,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,KAAK,IAAI,CAAA;IAC7C,UAAU,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,KAAK,IAAI,CAAA;CAC9C;AAED,MAAM,WAAW,aAAa;CAAG;AAEjC,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAC3C,WAAW,EACX,aAAa,EACb,eAAe,EACf,aAAa,CACd,CAAA"}
@@ -1,4 +1,4 @@
1
- import type { NamedModel, Result } from '@empathyco/x-types';
1
+ import type { Banner, NamedModel, Result } from '@empathyco/x-types';
2
2
  export interface VendorResultTagging {
3
3
  viewUrl: string;
4
4
  clickUrl: string;
@@ -11,4 +11,13 @@ export interface VendorResult extends Omit<Result, 'modelName' | 'tagging'>, Nam
11
11
  position: number;
12
12
  tagging?: VendorResultTagging;
13
13
  }
14
+ /**
15
+ * The interface for a vendor banner, extending the base Banner interface.
16
+ * The optional position means:
17
+ * - If the position is defined, the banner will be displayed in that position inside the grid.
18
+ * - If the position is undefined, the banner will be displayed on top of the grid and full width.
19
+ */
20
+ export interface VendorBanner extends Omit<Banner, 'modelName'>, NamedModel<'VendorBanner'> {
21
+ position?: number;
22
+ }
14
23
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/vendor/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAE5D,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,MAAM,CAAA;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,YACf,SAAQ,IAAI,CAAC,MAAM,EAAE,WAAW,GAAG,SAAS,CAAC,EAAE,UAAU,CAAC,cAAc,CAAC;IACzE,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,mBAAmB,CAAA;CAC9B"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/vendor/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAEpE,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,MAAM,CAAA;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,YACf,SAAQ,IAAI,CAAC,MAAM,EAAE,WAAW,GAAG,SAAS,CAAC,EAAE,UAAU,CAAC,cAAc,CAAC;IACzE,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,mBAAmB,CAAA;CAC9B;AAED;;;;;GAKG;AACH,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,MAAM,EAAE,WAAW,CAAC,EAAE,UAAU,CAAC,cAAc,CAAC;IACzF,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB"}
@@ -4,6 +4,12 @@
4
4
  * @public
5
5
  */
6
6
  export declare const setResults: import("../../wiring").AnyWire;
7
+ /**
8
+ * Sets the vendor banners of the {@link VendorXModule}.
9
+ *
10
+ * @public
11
+ */
12
+ export declare const setBanners: import("../../wiring").AnyWire;
7
13
  /**
8
14
  * Wiring configuration for the {@link VendorXModule | vendor module}.
9
15
  *
@@ -22,8 +28,12 @@ export declare const vendorWiring: {
22
28
  UserClickedVendorResultAddToCart: {
23
29
  trackResultAddToCart: import("../../wiring").Wire<import("./types").VendorResult>;
24
30
  };
31
+ VendorBannersChanged: {
32
+ setBanners: import("../../wiring").AnyWire;
33
+ };
25
34
  SearchRequestChanged: {
26
35
  resetResults: import("../../wiring").AnyWire;
36
+ resetBanners: import("../../wiring").AnyWire;
27
37
  };
28
38
  };
29
39
  //# sourceMappingURL=wiring.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wiring.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/vendor/wiring.ts"],"names":[],"mappings":"AAqBA;;;;GAIG;AACH,eAAO,MAAM,UAAU,gCAOtB,CAAA;AASD;;;;GAIG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;CAgBvB,CAAA"}
1
+ {"version":3,"file":"wiring.d.ts","sourceRoot":"","sources":["../../../../../src/x-modules/vendor/wiring.ts"],"names":[],"mappings":"AAqBA;;;;GAIG;AACH,eAAO,MAAM,UAAU,gCAOtB,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,UAAU,gCAOtB,CAAA;AAgBD;;;;GAIG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;CAoBvB,CAAA"}
package/vendor/index.js CHANGED
@@ -1,5 +1,6 @@
1
+ export { default as VendorBannersList } from '../js/x-modules/vendor/components/vendor-banners-list.vue.js';
1
2
  export { default as VendorResultsList } from '../js/x-modules/vendor/components/vendor-results-list.vue.js';
2
3
  export { vendorEmitters } from '../js/x-modules/vendor/store/emitters.js';
3
4
  export { vendorXStoreModule } from '../js/x-modules/vendor/store/module.js';
4
- export { setResults, vendorWiring } from '../js/x-modules/vendor/wiring.js';
5
+ export { setBanners, setResults, vendorWiring } from '../js/x-modules/vendor/wiring.js';
5
6
  export { vendorXModule } from '../js/x-modules/vendor/x-module.js';