vviinn-widgets 2.18.21 → 2.19.1

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 (183) hide show
  1. package/dist/cjs/{index-cb410762.js → Campaign-a94a827a.js} +17 -1
  2. package/dist/cjs/cropper-handler_29.cjs.entry.js +1418 -0
  3. package/dist/cjs/{imageSearch.store-98824653.js → index-48c94264.js} +16016 -11171
  4. package/dist/cjs/{index-7f1325a7.js → index-a4becaff.js} +683 -303
  5. package/dist/cjs/loader.cjs.js +4 -3
  6. package/dist/cjs/{vviinn-carousel_3.cjs.entry.js → vviinn-carousel_2.cjs.entry.js} +150 -270
  7. package/dist/cjs/vviinn-recommendations-sidebar.cjs.entry.js +14 -8
  8. package/dist/cjs/vviinn-vpr-button.cjs.entry.js +12 -14
  9. package/dist/cjs/vviinn-widgets.cjs.js +10 -3
  10. package/dist/collection/Image/sizing.spec.js +66 -0
  11. package/dist/collection/collection-manifest.json +2 -2
  12. package/dist/collection/components/image-search/image-view/highlight-box/highlight-box.css +2 -16
  13. package/dist/collection/components/image-search/image-view/highlight-box/highlight-box.js +11 -7
  14. package/dist/collection/components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.css +0 -1
  15. package/dist/collection/components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.js +40 -37
  16. package/dist/collection/components/image-search/image-view/image-cropper/image-cropper.js +73 -67
  17. package/dist/collection/components/image-search/search-filters/search-filters.css +4 -23
  18. package/dist/collection/components/image-search/search-filters/search-filters.js +97 -91
  19. package/dist/collection/components/vviinn-button/vviinn-button.js +34 -31
  20. package/dist/collection/components/vviinn-carousel/vviinn-carousel.css +1 -2
  21. package/dist/collection/components/vviinn-carousel/vviinn-carousel.js +161 -156
  22. package/dist/collection/components/vviinn-error/vviinn-empty-results/vviinn-empty-results.js +12 -14
  23. package/dist/collection/components/vviinn-error/vviinn-error.js +12 -12
  24. package/dist/collection/components/vviinn-error/vviinn-server-error/vviinn-server-error.js +35 -30
  25. package/dist/collection/components/vviinn-error/vviinn-wrong-format/vviinn-wrong-format.js +35 -30
  26. package/dist/collection/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.js +129 -121
  27. package/dist/collection/components/vviinn-example-images/vviinn-example-images.js +75 -75
  28. package/dist/collection/components/vviinn-icons/index.js +10 -27
  29. package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.js +120 -67
  30. package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.js +81 -69
  31. package/dist/collection/components/vviinn-image-view/vviinn-image-view.css +0 -1
  32. package/dist/collection/components/vviinn-image-view/vviinn-image-view.js +27 -28
  33. package/dist/collection/components/vviinn-modal/vviinn-modal.css +7 -36
  34. package/dist/collection/components/vviinn-modal/vviinn-modal.js +115 -93
  35. package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-1/vviinn-onboarding-card-1.js +12 -14
  36. package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-2/vviinn-onboarding-card-2.js +12 -14
  37. package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-3/vviinn-onboarding-card-3.js +12 -14
  38. package/dist/collection/components/vviinn-onboarding/vviinn-onboarding.js +12 -17
  39. package/dist/collection/components/vviinn-overlay/vviinn-overlay.css +1 -12
  40. package/dist/collection/components/vviinn-overlay/vviinn-overlay.js +12 -9
  41. package/dist/collection/components/vviinn-overlayed-modal/vviinn-overlayed-modal.js +107 -78
  42. package/dist/collection/components/vviinn-preloader/vviinn-preloader.css +1 -11
  43. package/dist/collection/components/vviinn-preloader/vviinn-preloader.js +11 -7
  44. package/dist/collection/components/vviinn-privacy-badge/vviinn-privacy-badge.css +0 -1
  45. package/dist/collection/components/vviinn-privacy-badge/vviinn-privacy-badge.js +12 -16
  46. package/dist/collection/components/vviinn-product-card/render-helpers.js +6 -14
  47. package/dist/collection/components/vviinn-product-card/vviinn-product-card.js +425 -415
  48. package/dist/collection/components/vviinn-slider/arrow.js +1 -2
  49. package/dist/collection/components/vviinn-slider/vviinn-slide/vviinn-slide.js +12 -9
  50. package/dist/collection/components/vviinn-slider/vviinn-slider.css +0 -1
  51. package/dist/collection/components/vviinn-slider/vviinn-slider.js +87 -82
  52. package/dist/collection/components/vviinn-teaser/vviinn-teaser.js +12 -18
  53. package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.css +12 -64
  54. package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.js +371 -360
  55. package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.js +448 -444
  56. package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-vidget.js +545 -542
  57. package/dist/collection/components/vviinn-vps-button/stories/vviinn-vps-button.stories.js +2 -0
  58. package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.js +368 -332
  59. package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.css +0 -5
  60. package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.e2e.js +26 -0
  61. package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +502 -425
  62. package/dist/collection/geometry/Clip.spec.js +16 -0
  63. package/dist/collection/geometry/Rectangle.spec.js +66 -0
  64. package/dist/collection/geometry/Sized.spec.js +16 -0
  65. package/dist/collection/interfaces/generated.js +0 -4
  66. package/dist/collection/network/ion/Form.spec.js +43 -0
  67. package/dist/esm/{index-b31d86ce.js → Campaign-4aa53f29.js} +15 -2
  68. package/dist/esm/cropper-handler_29.entry.js +1386 -0
  69. package/dist/esm/{index-590cb67e.js → index-48ef9564.js} +683 -304
  70. package/dist/esm/{imageSearch.store-9dde5360.js → index-976acf7e.js} +16124 -11292
  71. package/dist/esm/loader.js +4 -3
  72. package/dist/esm/polyfills/css-shim.js +1 -1
  73. package/dist/esm/{vviinn-carousel_3.entry.js → vviinn-carousel_2.entry.js} +106 -225
  74. package/dist/esm/vviinn-recommendations-sidebar.entry.js +13 -7
  75. package/dist/esm/vviinn-vpr-button.entry.js +11 -13
  76. package/dist/esm/vviinn-widgets.js +7 -3
  77. package/dist/loader/index.d.ts +9 -0
  78. package/dist/loader/package.json +1 -0
  79. package/dist/types/Image/sizing.d.ts +4 -4
  80. package/dist/types/campaign/Campaign.d.ts +5 -5
  81. package/dist/types/campaign/VCSCampaignResponse.d.ts +1 -1
  82. package/dist/types/components/vviinn-carousel/vviinn-carousel.d.ts +2 -2
  83. package/dist/types/components/vviinn-image-selector/vviinn-image-selector.d.ts +4 -0
  84. package/dist/types/components/vviinn-modal/vviinn-modal.d.ts +2 -0
  85. package/dist/types/components/vviinn-overlayed-modal/vviinn-overlayed-modal.d.ts +2 -0
  86. package/dist/types/components/vviinn-product-card/render-helpers.d.ts +3 -3
  87. package/dist/types/components/vviinn-slider/arrow.d.ts +2 -2
  88. package/dist/types/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.d.ts +2 -2
  89. package/dist/types/components/vviinn-vps-button/vviinn-vps-button.d.ts +9 -4
  90. package/dist/types/components/vviinn-vps-widget/vviinn-vps-widget.d.ts +8 -0
  91. package/dist/types/components.d.ts +154 -54
  92. package/dist/types/error.d.ts +1 -1
  93. package/dist/types/geometry/Point.d.ts +1 -1
  94. package/dist/types/geometry/Rectangle.d.ts +1 -1
  95. package/dist/types/geometry/Sized.d.ts +1 -1
  96. package/dist/types/interfaces/generated.d.ts +192 -371
  97. package/dist/types/network/ion/File.d.ts +2 -2
  98. package/dist/types/network/ion/Form.d.ts +5 -5
  99. package/dist/types/network/ion/Link.d.ts +1 -1
  100. package/dist/types/network/ion/ValueObject.d.ts +4 -4
  101. package/dist/types/network/utils.d.ts +3 -3
  102. package/dist/types/recommendation/events.d.ts +5 -5
  103. package/dist/types/recommendation/recommendation.d.ts +1 -1
  104. package/dist/types/searchSession/searchSession.d.ts +7 -7
  105. package/dist/types/slider/GridMode.d.ts +1 -1
  106. package/dist/types/stencil-public-runtime.d.ts +98 -23
  107. package/dist/types/store/imageSearch.store.d.ts +1 -1
  108. package/dist/types/tracking/models.d.ts +2 -2
  109. package/dist/types/utils/event/Events.d.ts +1 -1
  110. package/dist/vviinn-widgets/p-312b0eb7.entry.js +1 -0
  111. package/dist/vviinn-widgets/p-414b2291.js +1 -0
  112. package/dist/vviinn-widgets/p-5b50c7e5.entry.js +1 -0
  113. package/dist/vviinn-widgets/p-8deaa5da.entry.js +1 -0
  114. package/dist/vviinn-widgets/p-c6209bc1.entry.js +1 -0
  115. package/{www/build/p-2f9ee951.js → dist/vviinn-widgets/p-d08ce429.js} +1 -1
  116. package/dist/vviinn-widgets/p-fa17e81f.js +2 -0
  117. package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
  118. package/package.json +12 -12
  119. package/www/build/p-312b0eb7.entry.js +1 -0
  120. package/www/build/p-414b2291.js +1 -0
  121. package/www/build/p-5b50c7e5.entry.js +1 -0
  122. package/www/build/p-8deaa5da.entry.js +1 -0
  123. package/www/build/p-c6209bc1.entry.js +1 -0
  124. package/{dist/vviinn-widgets/p-2f9ee951.js → www/build/p-d08ce429.js} +1 -1
  125. package/www/build/p-d39b7d70.js +161 -0
  126. package/www/build/p-fa17e81f.js +2 -0
  127. package/www/build/vviinn-widgets.esm.js +1 -1
  128. package/www/index.html +2 -2
  129. package/dist/cjs/Campaign-13258569.js +0 -18
  130. package/dist/cjs/Handler-176539c8.js +0 -331
  131. package/dist/cjs/cropper-handler.cjs.entry.js +0 -27
  132. package/dist/cjs/customized-slots-6e56c354.js +0 -54
  133. package/dist/cjs/highlight-box_22.cjs.entry.js +0 -770
  134. package/dist/cjs/index-a99edb90.js +0 -3235
  135. package/dist/cjs/vviinn-button.cjs.entry.js +0 -21
  136. package/dist/cjs/vviinn-error.cjs.entry.js +0 -19
  137. package/dist/cjs/vviinn-preloader.cjs.entry.js +0 -26
  138. package/dist/cjs/vviinn-vps-button.cjs.entry.js +0 -65
  139. package/dist/cjs/vviinn-vps-widget.cjs.entry.js +0 -251
  140. package/dist/esm/Campaign-90ba7e06.js +0 -14
  141. package/dist/esm/Handler-f9b8735c.js +0 -309
  142. package/dist/esm/cropper-handler.entry.js +0 -23
  143. package/dist/esm/customized-slots-00afe247.js +0 -51
  144. package/dist/esm/highlight-box_22.entry.js +0 -745
  145. package/dist/esm/index-4d5b52ba.js +0 -3224
  146. package/dist/esm/vviinn-button.entry.js +0 -17
  147. package/dist/esm/vviinn-error.entry.js +0 -15
  148. package/dist/esm/vviinn-preloader.entry.js +0 -22
  149. package/dist/esm/vviinn-vps-button.entry.js +0 -61
  150. package/dist/esm/vviinn-vps-widget.entry.js +0 -247
  151. package/dist/vviinn-widgets/p-11f61564.js +0 -1
  152. package/dist/vviinn-widgets/p-12851e97.entry.js +0 -1
  153. package/dist/vviinn-widgets/p-18fd769b.js +0 -1
  154. package/dist/vviinn-widgets/p-339c6838.js +0 -1
  155. package/dist/vviinn-widgets/p-3b2c91c0.entry.js +0 -1
  156. package/dist/vviinn-widgets/p-45df9f28.entry.js +0 -1
  157. package/dist/vviinn-widgets/p-57ed5303.entry.js +0 -1
  158. package/dist/vviinn-widgets/p-69850e5b.js +0 -1
  159. package/dist/vviinn-widgets/p-7c2f762a.entry.js +0 -1
  160. package/dist/vviinn-widgets/p-7c3b7388.entry.js +0 -1
  161. package/dist/vviinn-widgets/p-85006f41.entry.js +0 -1
  162. package/dist/vviinn-widgets/p-8a3dd76d.entry.js +0 -1
  163. package/dist/vviinn-widgets/p-99e58be7.entry.js +0 -1
  164. package/dist/vviinn-widgets/p-a2b450b6.entry.js +0 -1
  165. package/dist/vviinn-widgets/p-bcc1ccf0.js +0 -1
  166. package/dist/vviinn-widgets/p-e6fee8d2.js +0 -1
  167. package/www/build/p-11f61564.js +0 -1
  168. package/www/build/p-12851e97.entry.js +0 -1
  169. package/www/build/p-18fd769b.js +0 -1
  170. package/www/build/p-339c6838.js +0 -1
  171. package/www/build/p-3b2c91c0.entry.js +0 -1
  172. package/www/build/p-45df9f28.entry.js +0 -1
  173. package/www/build/p-57ed5303.entry.js +0 -1
  174. package/www/build/p-69850e5b.js +0 -1
  175. package/www/build/p-7c2f762a.entry.js +0 -1
  176. package/www/build/p-7c3b7388.entry.js +0 -1
  177. package/www/build/p-85006f41.entry.js +0 -1
  178. package/www/build/p-8a3dd76d.entry.js +0 -1
  179. package/www/build/p-99e58be7.entry.js +0 -1
  180. package/www/build/p-9e2c131a.js +0 -125
  181. package/www/build/p-a2b450b6.entry.js +0 -1
  182. package/www/build/p-bcc1ccf0.js +0 -1
  183. package/www/build/p-e6fee8d2.js +0 -1
@@ -1,7 +1,8 @@
1
1
  var __rest = (this && this.__rest) || function (s, e) {
2
2
  var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
3
+ for (var p in s)
4
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
5
6
  if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
7
  for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
8
  if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
@@ -9,7 +10,7 @@ var __rest = (this && this.__rest) || function (s, e) {
9
10
  }
10
11
  return t;
11
12
  };
12
- import { Component, Host, h, Prop, State, Element, Watch, Event, Listen, Fragment, } from "@stencil/core";
13
+ import { Host, h, Fragment, } from "@stencil/core";
13
14
  import { pipe } from "fp-ts/lib/function";
14
15
  import * as TE from "fp-ts/lib/TaskEither";
15
16
  import * as E from "fp-ts/lib/Either";
@@ -43,41 +44,35 @@ import { checkEmpryString } from "../../utils/option/option";
43
44
  */
44
45
  export class VviinnVprWidget {
45
46
  constructor() {
46
- /** Title for recommendations widget */
47
+ this.productImageLoadedSubject = new Subject();
48
+ this.setTrackingDeactivated = (result) => {
49
+ if (result.status === "rejected") {
50
+ this.trackingDeactivated = true;
51
+ }
52
+ };
47
53
  this.blockTitle = "Recommended products";
48
- /** Ratio of each recommended product image */
49
54
  this.imageRatio = 1;
50
- /** Width of each recommended product image */
51
55
  this.imageWidth = 300;
52
- /** Currency sign will shown after price */
56
+ this.productId = undefined;
57
+ this.token = undefined;
53
58
  this.currencySign = "€";
54
- /** Use slider or grid view */
59
+ this.pricePrefix = undefined;
55
60
  this.mode = "continuity";
56
- /** Campaign type */
57
61
  this.campaignType = "VPR";
58
- /** Locale for currency formatting */
59
62
  this.locale = "de-DE";
60
- /** comma-separated list of campaign-ids */
61
63
  this.campaigns = "";
62
- /** Hiding disabled arrows in the carousel if true */
64
+ this.color = undefined;
63
65
  this.gridArrowsDynamic = false;
64
- /** Showing message (when true) or hiding the whole widget, when no results */
66
+ this.noResultText = undefined;
65
67
  this.noResultShow = true;
66
- /** @internal */
67
68
  this.apiPath = "https://api.vviinn.com";
68
- /** @internal */
69
69
  this.useCarousel = true;
70
70
  this.showScroll = true;
71
71
  this.cssUrl = null;
72
+ this.buttonElementId = undefined;
72
73
  this.recommendations = [];
73
74
  this.trackingDeactivated = false;
74
75
  this.hasErrorOnLoad = false;
75
- this.productImageLoadedSubject = new Subject();
76
- this.setTrackingDeactivated = (result) => {
77
- if (result.status === "rejected") {
78
- this.trackingDeactivated = true;
79
- }
80
- };
81
76
  }
82
77
  getEventData() {
83
78
  return {
@@ -202,14 +197,8 @@ export class VviinnVprWidget {
202
197
  loaded: true,
203
198
  empty: this.recommendations.length == 0,
204
199
  [this.mode]: true,
205
- }, "aria-hidden": "false" },
206
- h(Fragment, null,
207
- this.renderExternalCSS(),
208
- h("style", null, state.fallbackStyles),
209
- h("h2", { part: "recommendations-title" }, this.blockTitle),
210
- this.recommendations.length > 0 &&
211
- (this.useCarousel ? this.renderCarousel() : this.renderResults()),
212
- this.recommendations.length === 0 && this.hasErrorOnLoad && (h("p", { class: "no-result-text" }, `${(_a = this === null || this === void 0 ? void 0 : this.noResultText) !== null && _a !== void 0 ? _a : "No results! Please, try again later."}`)))));
200
+ }, "aria-hidden": "false" }, h(Fragment, null, this.renderExternalCSS(), h("style", null, state.fallbackStyles), h("h2", { part: "recommendations-title" }, this.blockTitle), this.recommendations.length > 0 &&
201
+ (this.useCarousel ? this.renderCarousel() : this.renderResults()), this.recommendations.length === 0 && this.hasErrorOnLoad && (h("p", { class: "no-result-text" }, `${(_a = this === null || this === void 0 ? void 0 : this.noResultText) !== null && _a !== void 0 ? _a : "No results! Please, try again later."}`)))));
213
202
  }
214
203
  renderRecommendation(recommendation, index) {
215
204
  return (h("vviinn-product-card", { part: "product-part", productId: recommendation.productId, productTitle: recommendation.title, deeplink: recommendation.deeplink, image: recommendation.image.thumbnail, brand: recommendation.brand, imageWidth: this.imageWidth, imageRatio: 1, price: recommendation.price.actual, salePrice: recommendation.price.sale, responsive: this.mode === "grid", dimmedBackground: this.useDimmedBackgroundInCard(), campaignTypeId: this.campaignType, index: index, widgetElementId: this.id }));
@@ -225,522 +214,536 @@ export class VviinnVprWidget {
225
214
  }
226
215
  static get is() { return "vviinn-vpr-widget"; }
227
216
  static get encapsulation() { return "shadow"; }
228
- static get originalStyleUrls() { return {
229
- "$": ["vviinn-vpr-widget.css"]
230
- }; }
231
- static get styleUrls() { return {
232
- "$": ["vviinn-vpr-widget.css"]
233
- }; }
234
- static get properties() { return {
235
- "blockTitle": {
236
- "type": "string",
237
- "mutable": false,
238
- "complexType": {
239
- "original": "string",
240
- "resolved": "string",
241
- "references": {}
242
- },
243
- "required": false,
244
- "optional": false,
245
- "docs": {
246
- "tags": [],
247
- "text": "Title for recommendations widget"
248
- },
249
- "attribute": "block-title",
250
- "reflect": false,
251
- "defaultValue": "\"Recommended products\""
252
- },
253
- "imageRatio": {
254
- "type": "number",
255
- "mutable": false,
256
- "complexType": {
257
- "original": "number",
258
- "resolved": "number",
259
- "references": {}
260
- },
261
- "required": false,
262
- "optional": false,
263
- "docs": {
264
- "tags": [],
265
- "text": "Ratio of each recommended product image"
266
- },
267
- "attribute": "image-ratio",
268
- "reflect": false,
269
- "defaultValue": "1"
270
- },
271
- "imageWidth": {
272
- "type": "number",
273
- "mutable": false,
274
- "complexType": {
275
- "original": "number",
276
- "resolved": "number",
277
- "references": {}
278
- },
279
- "required": false,
280
- "optional": false,
281
- "docs": {
282
- "tags": [],
283
- "text": "Width of each recommended product image"
284
- },
285
- "attribute": "image-width",
286
- "reflect": false,
287
- "defaultValue": "300"
288
- },
289
- "productId": {
290
- "type": "string",
291
- "mutable": false,
292
- "complexType": {
293
- "original": "string",
294
- "resolved": "string",
295
- "references": {}
296
- },
297
- "required": false,
298
- "optional": false,
299
- "docs": {
300
- "tags": [],
301
- "text": "Id of product you need recommendations for"
302
- },
303
- "attribute": "product-id",
304
- "reflect": false
305
- },
306
- "token": {
307
- "type": "string",
308
- "mutable": false,
309
- "complexType": {
310
- "original": "string",
311
- "resolved": "string",
312
- "references": {}
313
- },
314
- "required": false,
315
- "optional": false,
316
- "docs": {
317
- "tags": [],
318
- "text": "vviinn customer token"
319
- },
320
- "attribute": "token",
321
- "reflect": false
322
- },
323
- "currencySign": {
324
- "type": "string",
325
- "mutable": false,
326
- "complexType": {
327
- "original": "string",
328
- "resolved": "string",
329
- "references": {}
330
- },
331
- "required": false,
332
- "optional": false,
333
- "docs": {
334
- "tags": [],
335
- "text": "Currency sign will shown after price"
336
- },
337
- "attribute": "currency-sign",
338
- "reflect": false,
339
- "defaultValue": "\"\u20AC\""
340
- },
341
- "pricePrefix": {
342
- "type": "string",
343
- "mutable": false,
344
- "complexType": {
345
- "original": "string",
346
- "resolved": "string",
347
- "references": {}
348
- },
349
- "required": false,
350
- "optional": false,
351
- "docs": {
352
- "tags": [],
353
- "text": "prefix will shown before price"
354
- },
355
- "attribute": "price-prefix",
356
- "reflect": false
357
- },
358
- "mode": {
359
- "type": "string",
360
- "mutable": false,
361
- "complexType": {
362
- "original": "CarouselMode",
363
- "resolved": "\"continuity\" | \"grid\"",
364
- "references": {
365
- "CarouselMode": {
366
- "location": "import",
367
- "path": "../vviinn-carousel/vviinn-carousel"
217
+ static get originalStyleUrls() {
218
+ return {
219
+ "$": ["vviinn-vpr-widget.css"]
220
+ };
221
+ }
222
+ static get styleUrls() {
223
+ return {
224
+ "$": ["vviinn-vpr-widget.css"]
225
+ };
226
+ }
227
+ static get properties() {
228
+ return {
229
+ "blockTitle": {
230
+ "type": "string",
231
+ "mutable": false,
232
+ "complexType": {
233
+ "original": "string",
234
+ "resolved": "string",
235
+ "references": {}
236
+ },
237
+ "required": false,
238
+ "optional": false,
239
+ "docs": {
240
+ "tags": [],
241
+ "text": "Title for recommendations widget"
242
+ },
243
+ "attribute": "block-title",
244
+ "reflect": false,
245
+ "defaultValue": "\"Recommended products\""
246
+ },
247
+ "imageRatio": {
248
+ "type": "number",
249
+ "mutable": false,
250
+ "complexType": {
251
+ "original": "number",
252
+ "resolved": "number",
253
+ "references": {}
254
+ },
255
+ "required": false,
256
+ "optional": false,
257
+ "docs": {
258
+ "tags": [],
259
+ "text": "Ratio of each recommended product image"
260
+ },
261
+ "attribute": "image-ratio",
262
+ "reflect": false,
263
+ "defaultValue": "1"
264
+ },
265
+ "imageWidth": {
266
+ "type": "number",
267
+ "mutable": false,
268
+ "complexType": {
269
+ "original": "number",
270
+ "resolved": "number",
271
+ "references": {}
272
+ },
273
+ "required": false,
274
+ "optional": false,
275
+ "docs": {
276
+ "tags": [],
277
+ "text": "Width of each recommended product image"
278
+ },
279
+ "attribute": "image-width",
280
+ "reflect": false,
281
+ "defaultValue": "300"
282
+ },
283
+ "productId": {
284
+ "type": "string",
285
+ "mutable": false,
286
+ "complexType": {
287
+ "original": "string",
288
+ "resolved": "string",
289
+ "references": {}
290
+ },
291
+ "required": false,
292
+ "optional": false,
293
+ "docs": {
294
+ "tags": [],
295
+ "text": "Id of product you need recommendations for"
296
+ },
297
+ "attribute": "product-id",
298
+ "reflect": false
299
+ },
300
+ "token": {
301
+ "type": "string",
302
+ "mutable": false,
303
+ "complexType": {
304
+ "original": "string",
305
+ "resolved": "string",
306
+ "references": {}
307
+ },
308
+ "required": false,
309
+ "optional": false,
310
+ "docs": {
311
+ "tags": [],
312
+ "text": "vviinn customer token"
313
+ },
314
+ "attribute": "token",
315
+ "reflect": false
316
+ },
317
+ "currencySign": {
318
+ "type": "string",
319
+ "mutable": false,
320
+ "complexType": {
321
+ "original": "string",
322
+ "resolved": "string",
323
+ "references": {}
324
+ },
325
+ "required": false,
326
+ "optional": false,
327
+ "docs": {
328
+ "tags": [],
329
+ "text": "Currency sign will shown after price"
330
+ },
331
+ "attribute": "currency-sign",
332
+ "reflect": false,
333
+ "defaultValue": "\"\u20AC\""
334
+ },
335
+ "pricePrefix": {
336
+ "type": "string",
337
+ "mutable": false,
338
+ "complexType": {
339
+ "original": "string",
340
+ "resolved": "string",
341
+ "references": {}
342
+ },
343
+ "required": false,
344
+ "optional": false,
345
+ "docs": {
346
+ "tags": [],
347
+ "text": "prefix will shown before price"
348
+ },
349
+ "attribute": "price-prefix",
350
+ "reflect": false
351
+ },
352
+ "mode": {
353
+ "type": "string",
354
+ "mutable": false,
355
+ "complexType": {
356
+ "original": "CarouselMode",
357
+ "resolved": "\"continuity\" | \"grid\"",
358
+ "references": {
359
+ "CarouselMode": {
360
+ "location": "import",
361
+ "path": "../vviinn-carousel/vviinn-carousel"
362
+ }
368
363
  }
369
- }
370
- },
371
- "required": false,
372
- "optional": false,
373
- "docs": {
374
- "tags": [],
375
- "text": "Use slider or grid view"
376
- },
377
- "attribute": "mode",
378
- "reflect": false,
379
- "defaultValue": "\"continuity\""
380
- },
381
- "campaignType": {
382
- "type": "string",
383
- "mutable": false,
384
- "complexType": {
385
- "original": "CampaignName",
386
- "resolved": "\"VCS\" | \"VPR\"",
387
- "references": {
388
- "CampaignName": {
389
- "location": "import",
390
- "path": "../../campaign/Campaign"
364
+ },
365
+ "required": false,
366
+ "optional": false,
367
+ "docs": {
368
+ "tags": [],
369
+ "text": "Use slider or grid view"
370
+ },
371
+ "attribute": "mode",
372
+ "reflect": false,
373
+ "defaultValue": "\"continuity\""
374
+ },
375
+ "campaignType": {
376
+ "type": "string",
377
+ "mutable": false,
378
+ "complexType": {
379
+ "original": "CampaignName",
380
+ "resolved": "\"VCS\" | \"VPR\"",
381
+ "references": {
382
+ "CampaignName": {
383
+ "location": "import",
384
+ "path": "../../campaign/Campaign"
385
+ }
391
386
  }
392
- }
393
- },
394
- "required": false,
395
- "optional": false,
396
- "docs": {
397
- "tags": [],
398
- "text": "Campaign type"
399
- },
400
- "attribute": "campaign-type",
401
- "reflect": false,
402
- "defaultValue": "\"VPR\""
403
- },
404
- "locale": {
405
- "type": "string",
406
- "mutable": false,
407
- "complexType": {
408
- "original": "string",
409
- "resolved": "string",
410
- "references": {}
411
- },
412
- "required": false,
413
- "optional": false,
414
- "docs": {
415
- "tags": [],
416
- "text": "Locale for currency formatting"
417
- },
418
- "attribute": "locale",
419
- "reflect": false,
420
- "defaultValue": "\"de-DE\""
421
- },
422
- "campaigns": {
423
- "type": "string",
424
- "mutable": false,
425
- "complexType": {
426
- "original": "string",
427
- "resolved": "string",
428
- "references": {}
429
- },
430
- "required": false,
431
- "optional": false,
432
- "docs": {
433
- "tags": [],
434
- "text": "comma-separated list of campaign-ids"
435
- },
436
- "attribute": "campaigns",
437
- "reflect": false,
438
- "defaultValue": "\"\""
439
- },
440
- "color": {
441
- "type": "string",
442
- "mutable": false,
443
- "complexType": {
444
- "original": "string",
445
- "resolved": "string",
446
- "references": {}
447
- },
448
- "required": false,
449
- "optional": false,
450
- "docs": {
451
- "tags": [],
452
- "text": "Color accepts any hexcode string"
453
- },
454
- "attribute": "color",
455
- "reflect": false
456
- },
457
- "gridArrowsDynamic": {
458
- "type": "boolean",
459
- "mutable": false,
460
- "complexType": {
461
- "original": "boolean",
462
- "resolved": "boolean",
463
- "references": {}
464
- },
465
- "required": false,
466
- "optional": false,
467
- "docs": {
468
- "tags": [],
469
- "text": "Hiding disabled arrows in the carousel if true"
470
- },
471
- "attribute": "grid-arrows-dynamic",
472
- "reflect": false,
473
- "defaultValue": "false"
474
- },
475
- "noResultText": {
476
- "type": "string",
477
- "mutable": false,
478
- "complexType": {
479
- "original": "string",
480
- "resolved": "string",
481
- "references": {}
482
- },
483
- "required": false,
484
- "optional": true,
485
- "docs": {
486
- "tags": [],
487
- "text": "This message is displayed when no results"
488
- },
489
- "attribute": "no-result-text",
490
- "reflect": false
491
- },
492
- "noResultShow": {
493
- "type": "boolean",
494
- "mutable": false,
495
- "complexType": {
496
- "original": "boolean",
497
- "resolved": "boolean",
498
- "references": {}
499
- },
500
- "required": false,
501
- "optional": true,
502
- "docs": {
503
- "tags": [],
504
- "text": "Showing message (when true) or hiding the whole widget, when no results"
505
- },
506
- "attribute": "no-result-show",
507
- "reflect": false,
508
- "defaultValue": "true"
509
- },
510
- "apiPath": {
511
- "type": "string",
512
- "mutable": false,
513
- "complexType": {
514
- "original": "string | undefined",
515
- "resolved": "string",
516
- "references": {}
517
- },
518
- "required": false,
519
- "optional": false,
520
- "docs": {
521
- "tags": [{
522
- "text": undefined,
523
- "name": "internal"
524
- }],
525
- "text": ""
526
- },
527
- "attribute": "api-path",
528
- "reflect": false,
529
- "defaultValue": "\"https://api.vviinn.com\""
530
- },
531
- "useCarousel": {
532
- "type": "boolean",
533
- "mutable": false,
534
- "complexType": {
535
- "original": "boolean",
536
- "resolved": "boolean",
537
- "references": {}
538
- },
539
- "required": false,
540
- "optional": false,
541
- "docs": {
542
- "tags": [{
543
- "text": undefined,
544
- "name": "internal"
545
- }],
546
- "text": ""
547
- },
548
- "attribute": "use-carousel",
549
- "reflect": false,
550
- "defaultValue": "true"
551
- },
552
- "showScroll": {
553
- "type": "boolean",
554
- "mutable": false,
555
- "complexType": {
556
- "original": "boolean",
557
- "resolved": "boolean",
558
- "references": {}
559
- },
560
- "required": false,
561
- "optional": false,
562
- "docs": {
563
- "tags": [],
564
- "text": ""
565
- },
566
- "attribute": "show-scroll",
567
- "reflect": false,
568
- "defaultValue": "true"
569
- },
570
- "cssUrl": {
571
- "type": "string",
572
- "mutable": false,
573
- "complexType": {
574
- "original": "string | null",
575
- "resolved": "string",
576
- "references": {}
577
- },
578
- "required": false,
579
- "optional": false,
580
- "docs": {
581
- "tags": [],
582
- "text": ""
583
- },
584
- "attribute": "css-url",
585
- "reflect": false,
586
- "defaultValue": "null"
587
- },
588
- "buttonElementId": {
589
- "type": "string",
590
- "mutable": false,
591
- "complexType": {
592
- "original": "string",
593
- "resolved": "string",
594
- "references": {}
595
- },
596
- "required": false,
597
- "optional": true,
598
- "docs": {
599
- "tags": [{
600
- "text": undefined,
601
- "name": "internal"
602
- }],
603
- "text": ""
604
- },
605
- "attribute": "button-element-id",
606
- "reflect": false
607
- }
608
- }; }
609
- static get states() { return {
610
- "recommendations": {},
611
- "trackingDeactivated": {},
612
- "hasErrorOnLoad": {}
613
- }; }
614
- static get events() { return [{
615
- "method": "vviinnWidgetLoad",
616
- "name": "vviinnWidgetLoad",
617
- "bubbles": true,
618
- "cancelable": true,
619
- "composed": true,
620
- "docs": {
621
- "tags": [],
622
- "text": ""
623
- },
624
- "complexType": {
625
- "original": "BasicEventData",
626
- "resolved": "{ widgetType: WidgetType; campaignTypeId: CampaignTypeId; campaignTypeName: CampaignTypeTitle; widgetId?: string; }",
627
- "references": {
628
- "BasicEventData": {
629
- "location": "import",
630
- "path": "../../recommendation/events"
387
+ },
388
+ "required": false,
389
+ "optional": false,
390
+ "docs": {
391
+ "tags": [],
392
+ "text": "Campaign type"
393
+ },
394
+ "attribute": "campaign-type",
395
+ "reflect": false,
396
+ "defaultValue": "\"VPR\""
397
+ },
398
+ "locale": {
399
+ "type": "string",
400
+ "mutable": false,
401
+ "complexType": {
402
+ "original": "string",
403
+ "resolved": "string",
404
+ "references": {}
405
+ },
406
+ "required": false,
407
+ "optional": false,
408
+ "docs": {
409
+ "tags": [],
410
+ "text": "Locale for currency formatting"
411
+ },
412
+ "attribute": "locale",
413
+ "reflect": false,
414
+ "defaultValue": "\"de-DE\""
415
+ },
416
+ "campaigns": {
417
+ "type": "string",
418
+ "mutable": false,
419
+ "complexType": {
420
+ "original": "string",
421
+ "resolved": "string",
422
+ "references": {}
423
+ },
424
+ "required": false,
425
+ "optional": false,
426
+ "docs": {
427
+ "tags": [],
428
+ "text": "comma-separated list of campaign-ids"
429
+ },
430
+ "attribute": "campaigns",
431
+ "reflect": false,
432
+ "defaultValue": "\"\""
433
+ },
434
+ "color": {
435
+ "type": "string",
436
+ "mutable": false,
437
+ "complexType": {
438
+ "original": "string",
439
+ "resolved": "string",
440
+ "references": {}
441
+ },
442
+ "required": false,
443
+ "optional": false,
444
+ "docs": {
445
+ "tags": [],
446
+ "text": "Color accepts any hexcode string"
447
+ },
448
+ "attribute": "color",
449
+ "reflect": false
450
+ },
451
+ "gridArrowsDynamic": {
452
+ "type": "boolean",
453
+ "mutable": false,
454
+ "complexType": {
455
+ "original": "boolean",
456
+ "resolved": "boolean",
457
+ "references": {}
458
+ },
459
+ "required": false,
460
+ "optional": false,
461
+ "docs": {
462
+ "tags": [],
463
+ "text": "Hiding disabled arrows in the carousel if true"
464
+ },
465
+ "attribute": "grid-arrows-dynamic",
466
+ "reflect": false,
467
+ "defaultValue": "false"
468
+ },
469
+ "noResultText": {
470
+ "type": "string",
471
+ "mutable": false,
472
+ "complexType": {
473
+ "original": "string",
474
+ "resolved": "string",
475
+ "references": {}
476
+ },
477
+ "required": false,
478
+ "optional": true,
479
+ "docs": {
480
+ "tags": [],
481
+ "text": "This message is displayed when no results"
482
+ },
483
+ "attribute": "no-result-text",
484
+ "reflect": false
485
+ },
486
+ "noResultShow": {
487
+ "type": "boolean",
488
+ "mutable": false,
489
+ "complexType": {
490
+ "original": "boolean",
491
+ "resolved": "boolean",
492
+ "references": {}
493
+ },
494
+ "required": false,
495
+ "optional": true,
496
+ "docs": {
497
+ "tags": [],
498
+ "text": "Showing message (when true) or hiding the whole widget, when no results"
499
+ },
500
+ "attribute": "no-result-show",
501
+ "reflect": false,
502
+ "defaultValue": "true"
503
+ },
504
+ "apiPath": {
505
+ "type": "string",
506
+ "mutable": false,
507
+ "complexType": {
508
+ "original": "string | undefined",
509
+ "resolved": "string",
510
+ "references": {}
511
+ },
512
+ "required": false,
513
+ "optional": false,
514
+ "docs": {
515
+ "tags": [{
516
+ "name": "internal",
517
+ "text": undefined
518
+ }],
519
+ "text": ""
520
+ },
521
+ "attribute": "api-path",
522
+ "reflect": false,
523
+ "defaultValue": "\"https://api.vviinn.com\""
524
+ },
525
+ "useCarousel": {
526
+ "type": "boolean",
527
+ "mutable": false,
528
+ "complexType": {
529
+ "original": "boolean",
530
+ "resolved": "boolean",
531
+ "references": {}
532
+ },
533
+ "required": false,
534
+ "optional": false,
535
+ "docs": {
536
+ "tags": [{
537
+ "name": "internal",
538
+ "text": undefined
539
+ }],
540
+ "text": ""
541
+ },
542
+ "attribute": "use-carousel",
543
+ "reflect": false,
544
+ "defaultValue": "true"
545
+ },
546
+ "showScroll": {
547
+ "type": "boolean",
548
+ "mutable": false,
549
+ "complexType": {
550
+ "original": "boolean",
551
+ "resolved": "boolean",
552
+ "references": {}
553
+ },
554
+ "required": false,
555
+ "optional": false,
556
+ "docs": {
557
+ "tags": [],
558
+ "text": ""
559
+ },
560
+ "attribute": "show-scroll",
561
+ "reflect": false,
562
+ "defaultValue": "true"
563
+ },
564
+ "cssUrl": {
565
+ "type": "string",
566
+ "mutable": false,
567
+ "complexType": {
568
+ "original": "string | null",
569
+ "resolved": "string",
570
+ "references": {}
571
+ },
572
+ "required": false,
573
+ "optional": false,
574
+ "docs": {
575
+ "tags": [],
576
+ "text": ""
577
+ },
578
+ "attribute": "css-url",
579
+ "reflect": false,
580
+ "defaultValue": "null"
581
+ },
582
+ "buttonElementId": {
583
+ "type": "string",
584
+ "mutable": false,
585
+ "complexType": {
586
+ "original": "string",
587
+ "resolved": "string",
588
+ "references": {}
589
+ },
590
+ "required": false,
591
+ "optional": true,
592
+ "docs": {
593
+ "tags": [{
594
+ "name": "internal",
595
+ "text": undefined
596
+ }],
597
+ "text": ""
598
+ },
599
+ "attribute": "button-element-id",
600
+ "reflect": false
601
+ }
602
+ };
603
+ }
604
+ static get states() {
605
+ return {
606
+ "recommendations": {},
607
+ "trackingDeactivated": {},
608
+ "hasErrorOnLoad": {}
609
+ };
610
+ }
611
+ static get events() {
612
+ return [{
613
+ "method": "vviinnWidgetLoad",
614
+ "name": "vviinnWidgetLoad",
615
+ "bubbles": true,
616
+ "cancelable": true,
617
+ "composed": true,
618
+ "docs": {
619
+ "tags": [],
620
+ "text": ""
621
+ },
622
+ "complexType": {
623
+ "original": "BasicEventData",
624
+ "resolved": "{ widgetType: WidgetType; campaignTypeId: CampaignTypeId; campaignTypeName: CampaignTypeTitle; widgetId?: string; }",
625
+ "references": {
626
+ "BasicEventData": {
627
+ "location": "import",
628
+ "path": "../../recommendation/events"
629
+ }
631
630
  }
632
631
  }
633
- }
634
- }, {
635
- "method": "vviinnProductClick",
636
- "name": "vviinnProductClick",
637
- "bubbles": true,
638
- "cancelable": true,
639
- "composed": true,
640
- "docs": {
641
- "tags": [],
642
- "text": ""
643
- },
644
- "complexType": {
645
- "original": "any",
646
- "resolved": "any",
647
- "references": {}
648
- }
649
- }, {
650
- "method": "vviinnProductView",
651
- "name": "vviinnProductView",
652
- "bubbles": true,
653
- "cancelable": true,
654
- "composed": true,
655
- "docs": {
656
- "tags": [],
657
- "text": ""
658
- },
659
- "complexType": {
660
- "original": "any",
661
- "resolved": "any",
662
- "references": {}
663
- }
664
- }, {
665
- "method": "vviinnProductLoad",
666
- "name": "vviinnProductLoad",
667
- "bubbles": true,
668
- "cancelable": true,
669
- "composed": true,
670
- "docs": {
671
- "tags": [],
672
- "text": ""
673
- },
674
- "complexType": {
675
- "original": "any",
676
- "resolved": "any",
677
- "references": {}
678
- }
679
- }, {
680
- "method": "vviinnNoResult",
681
- "name": "vviinnNoResult",
682
- "bubbles": true,
683
- "cancelable": true,
684
- "composed": true,
685
- "docs": {
686
- "tags": [],
687
- "text": ""
688
- },
689
- "complexType": {
690
- "original": "any",
691
- "resolved": "any",
692
- "references": {}
693
- }
694
- }, {
695
- "method": "vviinnRecommendationsLoaded",
696
- "name": "vviinnRecommendationsLoaded",
697
- "bubbles": true,
698
- "cancelable": true,
699
- "composed": true,
700
- "docs": {
701
- "tags": [{
702
- "text": undefined,
703
- "name": "internal"
704
- }],
705
- "text": ""
706
- },
707
- "complexType": {
708
- "original": "any",
709
- "resolved": "any",
710
- "references": {}
711
- }
712
- }]; }
632
+ }, {
633
+ "method": "vviinnProductClick",
634
+ "name": "vviinnProductClick",
635
+ "bubbles": true,
636
+ "cancelable": true,
637
+ "composed": true,
638
+ "docs": {
639
+ "tags": [],
640
+ "text": ""
641
+ },
642
+ "complexType": {
643
+ "original": "any",
644
+ "resolved": "any",
645
+ "references": {}
646
+ }
647
+ }, {
648
+ "method": "vviinnProductView",
649
+ "name": "vviinnProductView",
650
+ "bubbles": true,
651
+ "cancelable": true,
652
+ "composed": true,
653
+ "docs": {
654
+ "tags": [],
655
+ "text": ""
656
+ },
657
+ "complexType": {
658
+ "original": "any",
659
+ "resolved": "any",
660
+ "references": {}
661
+ }
662
+ }, {
663
+ "method": "vviinnProductLoad",
664
+ "name": "vviinnProductLoad",
665
+ "bubbles": true,
666
+ "cancelable": true,
667
+ "composed": true,
668
+ "docs": {
669
+ "tags": [],
670
+ "text": ""
671
+ },
672
+ "complexType": {
673
+ "original": "any",
674
+ "resolved": "any",
675
+ "references": {}
676
+ }
677
+ }, {
678
+ "method": "vviinnNoResult",
679
+ "name": "vviinnNoResult",
680
+ "bubbles": true,
681
+ "cancelable": true,
682
+ "composed": true,
683
+ "docs": {
684
+ "tags": [],
685
+ "text": ""
686
+ },
687
+ "complexType": {
688
+ "original": "any",
689
+ "resolved": "any",
690
+ "references": {}
691
+ }
692
+ }, {
693
+ "method": "vviinnRecommendationsLoaded",
694
+ "name": "vviinnRecommendationsLoaded",
695
+ "bubbles": true,
696
+ "cancelable": true,
697
+ "composed": true,
698
+ "docs": {
699
+ "tags": [{
700
+ "name": "internal",
701
+ "text": undefined
702
+ }],
703
+ "text": ""
704
+ },
705
+ "complexType": {
706
+ "original": "any",
707
+ "resolved": "any",
708
+ "references": {}
709
+ }
710
+ }];
711
+ }
713
712
  static get elementRef() { return "el"; }
714
- static get watchers() { return [{
715
- "propName": "productId",
716
- "methodName": "handleProductIdChange"
717
- }, {
718
- "propName": "campaignType",
719
- "methodName": "handleCampaignTypeChange"
720
- }, {
721
- "propName": "campaigns",
722
- "methodName": "handleCampaignsChange"
723
- }, {
724
- "propName": "apiPath",
725
- "methodName": "handleApiPathChange"
726
- }]; }
727
- static get listeners() { return [{
728
- "name": "vviinnProductLoad",
729
- "method": "handleProductLoading",
730
- "target": undefined,
731
- "capture": false,
732
- "passive": false
733
- }, {
734
- "name": "vviinnProductView",
735
- "method": "trackProductView",
736
- "target": undefined,
737
- "capture": false,
738
- "passive": false
739
- }, {
740
- "name": "vviinnProductClick",
741
- "method": "trackProductClick",
742
- "target": undefined,
743
- "capture": false,
744
- "passive": false
745
- }]; }
713
+ static get watchers() {
714
+ return [{
715
+ "propName": "productId",
716
+ "methodName": "handleProductIdChange"
717
+ }, {
718
+ "propName": "campaignType",
719
+ "methodName": "handleCampaignTypeChange"
720
+ }, {
721
+ "propName": "campaigns",
722
+ "methodName": "handleCampaignsChange"
723
+ }, {
724
+ "propName": "apiPath",
725
+ "methodName": "handleApiPathChange"
726
+ }];
727
+ }
728
+ static get listeners() {
729
+ return [{
730
+ "name": "vviinnProductLoad",
731
+ "method": "handleProductLoading",
732
+ "target": undefined,
733
+ "capture": false,
734
+ "passive": false
735
+ }, {
736
+ "name": "vviinnProductView",
737
+ "method": "trackProductView",
738
+ "target": undefined,
739
+ "capture": false,
740
+ "passive": false
741
+ }, {
742
+ "name": "vviinnProductClick",
743
+ "method": "trackProductClick",
744
+ "target": undefined,
745
+ "capture": false,
746
+ "passive": false
747
+ }];
748
+ }
746
749
  }