vviinn-widgets 2.4.2 → 2.4.3

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 (93) hide show
  1. package/dist/cjs/Handler-d1a8a86a.js +329 -0
  2. package/dist/cjs/{app-globals-d999d944.js → app-globals-474864e0.js} +1 -1
  3. package/dist/cjs/cropper-handler.cjs.entry.js +27 -0
  4. package/dist/cjs/{customized-slots-90e8e849.js → customized-slots-0aa6c3d6.js} +1 -1
  5. package/dist/cjs/{cropper-handler_27.cjs.entry.js → highlight-box_22.cjs.entry.js} +85 -469
  6. package/dist/cjs/{index-c0d08aca.js → imageSearch.store-076370bf.js} +10575 -14822
  7. package/dist/cjs/index-34d20028.js +3222 -0
  8. package/dist/cjs/{index-e8cf5dc5.js → index-61403ab1.js} +1 -1
  9. package/dist/cjs/{index-53400160.js → index-a87f1a44.js} +1 -1
  10. package/dist/cjs/loader.cjs.js +3 -3
  11. package/dist/cjs/{vviinn-carousel_2.cjs.entry.js → vviinn-carousel_3.cjs.entry.js} +212 -25
  12. package/dist/cjs/vviinn-error.cjs.entry.js +19 -0
  13. package/dist/cjs/vviinn-preloader.cjs.entry.js +26 -0
  14. package/dist/cjs/vviinn-recommendations-sidebar.cjs.entry.js +2 -2
  15. package/dist/cjs/vviinn-vpr-button.cjs.entry.js +2 -2
  16. package/dist/cjs/vviinn-vps-button.cjs.entry.js +3 -3
  17. package/dist/cjs/vviinn-vps-widget.cjs.entry.js +162 -0
  18. package/dist/cjs/vviinn-widgets.cjs.js +3 -3
  19. package/dist/collection/components/image-search/search-filters/search-filters.js +1 -1
  20. package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +3 -0
  21. package/dist/collection/openApi/index.js +1 -1
  22. package/dist/esm/Handler-639a4cb3.js +308 -0
  23. package/dist/esm/{app-globals-f91c6f94.js → app-globals-3888cd41.js} +1 -1
  24. package/dist/esm/cropper-handler.entry.js +23 -0
  25. package/dist/esm/{customized-slots-7be7f3b8.js → customized-slots-863113e2.js} +1 -1
  26. package/dist/esm/{cropper-handler_27.entry.js → highlight-box_22.entry.js} +21 -400
  27. package/dist/esm/{index-840ec915.js → imageSearch.store-b516d12e.js} +10749 -14986
  28. package/dist/esm/index-2f8fb0fe.js +3213 -0
  29. package/dist/esm/{index-00c7b7c2.js → index-36978848.js} +2 -2
  30. package/dist/esm/{index-d7147986.js → index-56c062df.js} +1 -1
  31. package/dist/esm/loader.js +3 -3
  32. package/dist/esm/{vviinn-carousel_2.entry.js → vviinn-carousel_3.entry.js} +190 -4
  33. package/dist/esm/vviinn-error.entry.js +15 -0
  34. package/dist/esm/vviinn-preloader.entry.js +22 -0
  35. package/dist/esm/vviinn-recommendations-sidebar.entry.js +2 -2
  36. package/dist/esm/vviinn-vpr-button.entry.js +2 -2
  37. package/dist/esm/vviinn-vps-button.entry.js +3 -3
  38. package/dist/esm/vviinn-vps-widget.entry.js +158 -0
  39. package/dist/esm/vviinn-widgets.js +3 -3
  40. package/dist/types/components/image-search/search-filters/search-filters.d.ts +1 -1
  41. package/dist/types/components/vviinn-vpr-widget/vviinn-vpr-vidget.d.ts +1 -1
  42. package/dist/types/components/vviinn-vps-widget/vviinn-vps-widget.d.ts +2 -1
  43. package/dist/types/components.d.ts +1 -1
  44. package/dist/types/openApi/index.d.ts +2 -2
  45. package/dist/types/tracking/event.d.ts +1 -1
  46. package/dist/types/tracking/index.d.ts +8 -8
  47. package/dist/types/tracking/models.d.ts +1 -1
  48. package/dist/vviinn-widgets/{p-2d4cb17f.entry.js → p-0a9cee09.entry.js} +1 -1
  49. package/dist/vviinn-widgets/p-28678772.js +1 -0
  50. package/dist/vviinn-widgets/{p-07d8ba79.entry.js → p-2e6ecda7.entry.js} +1 -1
  51. package/dist/vviinn-widgets/{p-dc2da207.js → p-47183c9a.js} +1 -1
  52. package/dist/vviinn-widgets/p-535611cd.entry.js +1 -0
  53. package/dist/vviinn-widgets/p-606ff863.js +1 -0
  54. package/dist/vviinn-widgets/p-9cc6f0dd.entry.js +1 -0
  55. package/{www/build/p-ce96f232.js → dist/vviinn-widgets/p-ac0a2989.js} +1 -1
  56. package/dist/vviinn-widgets/p-ad29e9c5.entry.js +1 -0
  57. package/{www/build/p-a66512b2.js → dist/vviinn-widgets/p-b4caf042.js} +1 -1
  58. package/dist/vviinn-widgets/p-b547a6d0.entry.js +1 -0
  59. package/dist/vviinn-widgets/{p-7d5af04d.js → p-c853cba8.js} +1 -1
  60. package/dist/vviinn-widgets/p-d2097302.entry.js +1 -0
  61. package/dist/vviinn-widgets/p-d8d49616.entry.js +1 -0
  62. package/dist/vviinn-widgets/p-f582db5c.js +1 -0
  63. package/dist/vviinn-widgets/{p-9c7297c8.entry.js → p-f9410382.entry.js} +1 -1
  64. package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
  65. package/package.json +3 -3
  66. package/www/build/{p-2d4cb17f.entry.js → p-0a9cee09.entry.js} +1 -1
  67. package/www/build/p-28678772.js +1 -0
  68. package/www/build/{p-07d8ba79.entry.js → p-2e6ecda7.entry.js} +1 -1
  69. package/www/build/{p-dc2da207.js → p-47183c9a.js} +1 -1
  70. package/www/build/p-535611cd.entry.js +1 -0
  71. package/www/build/p-606ff863.js +1 -0
  72. package/www/build/p-7c313f33.js +125 -0
  73. package/www/build/p-9cc6f0dd.entry.js +1 -0
  74. package/{dist/vviinn-widgets/p-ce96f232.js → www/build/p-ac0a2989.js} +1 -1
  75. package/www/build/p-ad29e9c5.entry.js +1 -0
  76. package/{dist/vviinn-widgets/p-a66512b2.js → www/build/p-b4caf042.js} +1 -1
  77. package/www/build/p-b547a6d0.entry.js +1 -0
  78. package/www/build/{p-7d5af04d.js → p-c853cba8.js} +1 -1
  79. package/www/build/p-d2097302.entry.js +1 -0
  80. package/www/build/p-d8d49616.entry.js +1 -0
  81. package/www/build/p-e0153ae2.css +6 -0
  82. package/www/build/p-f582db5c.js +1 -0
  83. package/www/build/{p-9c7297c8.entry.js → p-f9410382.entry.js} +1 -1
  84. package/www/build/vviinn-widgets.esm.js +1 -1
  85. package/www/index.html +1 -1
  86. package/dist/vviinn-widgets/p-196479f9.js +0 -1
  87. package/dist/vviinn-widgets/p-ae524f97.entry.js +0 -1
  88. package/dist/vviinn-widgets/p-fce4183d.entry.js +0 -1
  89. package/www/build/p-196479f9.js +0 -1
  90. package/www/build/p-32bb0615.js +0 -1
  91. package/www/build/p-a67898be.css +0 -1
  92. package/www/build/p-ae524f97.entry.js +0 -1
  93. package/www/build/p-fce4183d.entry.js +0 -1
@@ -0,0 +1,162 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-61403ab1.js');
6
+ const imageSearch_store = require('./imageSearch.store-076370bf.js');
7
+ const customizedSlots = require('./customized-slots-0aa6c3d6.js');
8
+ const index$1 = require('./index-34d20028.js');
9
+ require('./Handler-d1a8a86a.js');
10
+
11
+ const vviinnVpsWidgetCss = ":host{--color-primary-system:#0F62FE;--color-primary-hover-system:#014CDA;--color-icons-system:#2F8EDF;--spacer:8px}:host{display:block}.hidden{visibility:hidden;height:1px}vviinn-overlayed-modal.first-screen::part(title),vviinn-overlayed-modal.first-screen::part(secondary-action){visibility:hidden}.start-page{display:grid;grid-template-columns:repeat(2, 1fr);min-height:580px}.start-page_block{align-content:start;border-right:1px solid #F4F4F4;display:grid;padding:48px}.start-page_block.error{align-content:center}#onboarding-block{border-right:unset;box-sizing:border-box;grid-gap:24px;overflow-y:auto;position:relative;width:100%}vviinn-teaser{margin-bottom:32px;margin-top:-24px}vviinn-image-selector{align-items:center;background:var(--color-primary, var(--color-primary-system));border-color:var(--color-primary, var(--color-primary-system));border-radius:2px;color:white;display:grid;font-size:16px;font-weight:600;height:56px;justify-items:center;margin-bottom:16px;transition:background 0.1s ease-in-out}vviinn-image-selector:hover{background:var(--color-primary-hover, var(--color-primary-hover-system));border-color:var(--color-primary-hover, var(--color-primary-hover-system))}vviinn-image-selector:active{border-color:black}.upload-button-content{display:grid;align-items:center;justify-items:start;justify-content:center;grid-template-columns:-webkit-max-content auto;grid-template-columns:max-content auto;grid-gap:16px}.results-page{display:grid;grid-template-columns:336px auto;box-sizing:border-box}.results-page>*{padding:24px;box-sizing:border-box}.products{align-content:center;align-items:start;box-sizing:border-box;display:grid;grid-gap:32px 16px;grid-template-columns:repeat(auto-fill, minmax(152px, 1fr));justify-items:center;padding:24px;padding-right:0;position:absolute;width:calc(100% - 16px)}.products.hidden{display:none}vviinn-empty-results{width:280px;align-self:center;justify-self:center}.products-wrapper{display:grid;overflow-y:auto;overflow-x:hidden;padding:unset;position:relative;width:100%}.image-wrapper{border-right:1px solid #F4F4F4;display:grid;grid-template-rows:-webkit-min-content 170px;grid-template-rows:min-content 170px;grid-gap:24px;min-width:100%}.onboarding-wrapper{position:absolute;width:100%;padding:48px;box-sizing:border-box;display:grid;grid-gap:64px;padding-bottom:24px}vviinn-product-card{gap:0;width:100%}vviinn-product-card::part(image){border:1px solid #eaeaea;margin-bottom:8px}vviinn-product-card::part(price-container),vviinn-product-card::part(deeplink),vviinn-product-card::part(title){align-self:start}search-filters span{display:none}search-filters::part(filter){background:#F4F4F4;border-radius:4px;border:1px solid #F4F4F4;box-sizing:border-box;color:#161616;font-size:14px;font-weight:600;line-height:20px}search-filters::part(show-more-filters){border:1px solid #f4f4f4;border-radius:4px;box-sizing:border-box;color:#161616;font-size:14px;font-weight:600;line-height:20px;padding:6px 16px}search-filters::part(show-more-filters):hover{background:#EAEAEA}search-filters::part(filter):hover{background:#EAEAEA}search-filters::part(filter):focus{outline:none;border:1px solid var(--color-primary, var(--color-primary-system))}search-filters::part(filter active){background:rgba(15, 98, 254, 0.15);color:var(--color-primary, var(--color-primary-system))}.filters-wrapper{overflow:auto}.results-page:not(.active){display:none}.nothing-found{display:grid;grid-gap:64px;justify-self:center;padding-top:64px;padding-bottom:16px;position:absolute;width:60%}@media (max-width: 768px){.start-page_block{padding:24px}.onboarding-wrapper{padding:24px}}@media (max-width: 640px){.start-page{grid-template-rows:-webkit-min-content;grid-template-rows:min-content;grid-template-columns:unset;grid-gap:48px;padding:24px 0 48px 0}}@media (max-width: 640px) and (min-width: 415px){.onboarding-wrapper{position:unset}#onboarding-block{overflow:unset}.start-page.active{height:1px;overflow:auto}}@media (max-width: 415px){.results-page>*{box-sizing:border-box;padding:24px}vviinn-slide{padding-bottom:48px}.start-page_block:last-of-type{border-right:unset;overflow-y:unset;position:static;box-sizing:border-box;width:unset}.start-page_block{padding:0 24px}vviinn-teaser{margin-top:24px}.onboarding-wrapper{position:static;width:unset;padding:unset;box-sizing:border-box}.results-page{grid-template-columns:unset;grid-template-rows:-webkit-min-content auto;grid-template-rows:min-content auto}.image{margin-bottom:8px}.image-wrapper{grid-template-rows:-webkit-min-content auto;grid-template-rows:min-content auto;width:100%}.products-wrapper{align-content:start;position:static;overflow-y:unset;width:100%;padding-top:0}.products{position:static;padding:0;width:unset;grid-gap:32px 16px;justify-content:center}.nothing-found{position:static;grid-gap:64px;padding:unset;align-content:start;width:unset}}@media (max-width: 320px){.products{grid-template-columns:unset}}vviinn-wrong-format,vviinn-server-error{width:280px;align-self:center;justify-self:center}";
12
+
13
+ let VviinnVpsWidget = class {
14
+ constructor(hostRef) {
15
+ index.registerInstance(this, hostRef);
16
+ /** @internal */
17
+ this.apiPath = "https://api.vviinn.com";
18
+ /** When true modal window with widget will be shown */
19
+ this.active = false;
20
+ /** Currency sign will shown after price */
21
+ this.currencySign = "€";
22
+ /** Locale for currency formatting */
23
+ this.locale = "de-DE";
24
+ this.slidePosition = 0;
25
+ this.width = 0;
26
+ this.wrongImageFormat = false;
27
+ this.imageSource = null;
28
+ }
29
+ activeWatcher(value) {
30
+ if (value) {
31
+ this.overflow = document.body.style.overflow;
32
+ document.body.style.overflow = "hidden";
33
+ this.trackOpenEvent();
34
+ }
35
+ else {
36
+ document.body.style.overflow = this.overflow;
37
+ }
38
+ }
39
+ trackRecommendationView({ detail }) {
40
+ const recommendationViewEvent = index$1.createProductViewVpsEvent(Object.assign({ session_id: this.uiSessionId }, detail));
41
+ this.trackingApi.trackEvent(recommendationViewEvent);
42
+ }
43
+ trackRecommendationClick({ detail }) {
44
+ const recommendationClickEvent = index$1.createProductViewVpsEvent(Object.assign({ sessionId: this.uiSessionId }, detail));
45
+ this.trackingApi.trackEvent(recommendationClickEvent);
46
+ }
47
+ trachSearchAreaChanges() {
48
+ const searchEvent = index$1.createSearchEvent({
49
+ session_id: this.uiSessionId,
50
+ source: this.imageSource,
51
+ search_area: "manual-selection",
52
+ });
53
+ this.trackingApi.trackEvent(searchEvent);
54
+ }
55
+ trackDetectedObject() {
56
+ const searchEvent = index$1.createSearchEvent({
57
+ session_id: this.uiSessionId,
58
+ source: this.imageSource,
59
+ search_area: "attention-point",
60
+ });
61
+ this.trackingApi.trackEvent(searchEvent);
62
+ }
63
+ trackFilter({ detail }) {
64
+ const searchEvent = index$1.createFilterEvent({
65
+ session_id: this.uiSessionId,
66
+ source: this.imageSource,
67
+ kind: "category",
68
+ action: detail,
69
+ });
70
+ this.trackingApi.trackEvent(searchEvent);
71
+ }
72
+ componentWillLoad() {
73
+ customizedSlots.slotChangeListener(this, this.el);
74
+ }
75
+ connectedCallback() {
76
+ imageSearch_store.state.apiPath = this.apiPath;
77
+ imageSearch_store.state.currencySign = this.currencySign;
78
+ imageSearch_store.state.locale = this.locale;
79
+ imageSearch_store.imageSearchState.token = this.token;
80
+ this.uiSessionId = index$1.v4();
81
+ }
82
+ trackOpenEvent() {
83
+ this.trackingApi = index$1.createTrackingApi(this.apiPath, this.token);
84
+ const widgetOpenEvent = index$1.createWidgetVpsEvent({
85
+ action: "open",
86
+ session_id: this.uiSessionId,
87
+ });
88
+ this.trackingApi.trackEvent(widgetOpenEvent);
89
+ }
90
+ handleImageSelection(source) {
91
+ this.imageSource = source;
92
+ this.slidePosition = 1;
93
+ const root = this.el.shadowRoot.querySelector("vviinn-overlayed-modal");
94
+ const overlay = root.shadowRoot.querySelector("vviinn-overlay");
95
+ const modal = overlay.querySelector("vviinn-modal");
96
+ const modalBody = modal.shadowRoot.querySelector(".body");
97
+ modalBody.scrollTop = 0;
98
+ this.trackInitialSearch();
99
+ }
100
+ trackInitialSearch() {
101
+ const searchEvent = index$1.createSearchEvent({
102
+ session_id: this.uiSessionId,
103
+ source: this.imageSource,
104
+ search_area: "full",
105
+ });
106
+ this.trackingApi.trackEvent(searchEvent);
107
+ }
108
+ resetState() {
109
+ this.resetScroll("onboarding-block");
110
+ this.slidePosition = 0;
111
+ imageSearch_store.imageSearchState.image = imageSearch_store.Option.none;
112
+ imageSearch_store.imageSearchState.imageUrl = imageSearch_store.Option.none;
113
+ imageSearch_store.imageSearchState.imageBounds = imageSearch_store.Option.none;
114
+ imageSearch_store.imageSearchState.searchArea = imageSearch_store.Option.none;
115
+ imageSearch_store.imageSearchState.results = [];
116
+ imageSearch_store.imageSearchState.filters = [];
117
+ imageSearch_store.imageSearchState.detectedObjects = [];
118
+ imageSearch_store.imageSearchState.activeIonLink = undefined;
119
+ imageSearch_store.imageSearchState.rectangleSearchForm = undefined;
120
+ this.resetScroll("results-block");
121
+ }
122
+ haveErrors() {
123
+ return this.wrongImageFormat || imageSearch_store.imageSearchState.serverError;
124
+ }
125
+ resetScroll(elementId, behavior = "auto") {
126
+ const element = this.el.shadowRoot.getElementById(elementId);
127
+ element.scroll({ top: 0, left: 0, behavior });
128
+ }
129
+ handleModalClose() {
130
+ this.active = false;
131
+ this.resetState();
132
+ const elementsToReset = ["onboarding-block", "results-block"];
133
+ elementsToReset.forEach((name) => this.resetScroll(name));
134
+ const widgetOpenEvent = index$1.createWidgetVpsEvent({
135
+ action: "close",
136
+ session_id: this.uiSessionId,
137
+ });
138
+ this.trackingApi.trackEvent(widgetOpenEvent);
139
+ }
140
+ render() {
141
+ return (index.h(index.Host, null, index.h("vviinn-overlayed-modal", { class: { "first-screen": this.slidePosition === 0 }, active: this.active, onSecondaryActionClicked: () => this.resetState(), onModalClosed: () => this.handleModalClose(), exportparts: "secondary-action, title, close-button" }, index.h("vviinn-slider", { showBullets: false, position: this.slidePosition }, index.h("vviinn-slide", { class: { "start-page": true } }, index.h("div", { class: {
142
+ error: this.haveErrors(),
143
+ "start-page_block": true,
144
+ } }, index.h("vviinn-wrong-format", { class: { hidden: !this.wrongImageFormat }, onActionClick: () => (this.wrongImageFormat = false) }), index.h("vviinn-server-error", { class: { hidden: !imageSearch_store.imageSearchState.serverError }, onActionClick: () => (imageSearch_store.imageSearchState.serverError = false) }), index.h("vviinn-teaser", { class: { hidden: this.haveErrors() } }), index.h("vviinn-image-selector", { class: { hidden: this.haveErrors() }, onImageSelected: () => this.handleImageSelection("upload"), onImageSelectedError: () => (this.wrongImageFormat = true), part: "select-image_button" }, index.h("span", { slot: "upload-button-text", class: "upload-button-content" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "29", height: "28", fill: "none" }, index.h("defs", null), index.h("path", { fill: "#fff", "fill-rule": "evenodd", d: "M10.271 3.89A.875.875 0 0111 3.5h7c.293 0 .566.146.728.39l1.49 2.235h3.033a2.625 2.625 0 012.625 2.625V21a2.625 2.625 0 01-2.625 2.625H5.75A2.625 2.625 0 013.125 21V8.75A2.625 2.625 0 015.75 6.125h3.031l1.49-2.235zm1.197 1.36l-1.49 2.235a.875.875 0 01-.729.39H5.75a.875.875 0 00-.875.875V21a.875.875 0 00.875.875h17.5a.875.875 0 00.875-.875V8.75a.875.875 0 00-.875-.875h-3.5a.875.875 0 01-.729-.39l-1.49-2.235h-6.063z", "clip-rule": "evenodd" }), index.h("path", { fill: "#fff", "fill-rule": "evenodd", d: "M14.5 11.375a3.062 3.062 0 100 6.125 3.062 3.062 0 000-6.125zm-4.813 3.063a4.812 4.812 0 119.625 0 4.812 4.812 0 01-9.625 0z", "clip-rule": "evenodd" })), index.h("slot", { name: "vviinn-image-upload-button-text" }, index.h("span", null, "Kamera oder Bild ausw\u00E4hlen")))), index.h("vviinn-privacy-badge", { class: { hidden: this.haveErrors() } })), index.h("div", { id: "onboarding-block", class: "start-page_block" }, index.h("div", { class: "onboarding-wrapper" }, index.h("vviinn-onboarding", null), index.h("vviinn-example-images", { onImageSelected: () => this.handleImageSelection("example"), onImageSelectedError: () => this.resetScroll("onboarding-block", "smooth") })))), index.h("vviinn-slide", { class: { "results-page": true, active: this.slidePosition == 1 } }, index.h("div", { class: "image-wrapper" }, index.h("vviinn-image-view", null), index.h("div", { class: "filters-wrapper" }, index.h("div", { class: "filters" }, imageSearch_store.imageSearchState.filters.map((filter) => (index.h("search-filters", { filter: filter })))))), index.h("div", { id: "results-block", class: "products-wrapper" }, index.h("div", { class: {
145
+ "nothing-found": true,
146
+ hidden: imageSearch_store.imageSearchState.results.length > 0,
147
+ } }, index.h("vviinn-empty-results", null), index.h("vviinn-onboarding", null)), index.h("div", { class: {
148
+ hidden: imageSearch_store.imageSearchState.results.length <= 0,
149
+ products: true,
150
+ } }, imageSearch_store.imageSearchState.results.map((p, i) => {
151
+ var _a;
152
+ return (index.h("vviinn-product-card", { hidden: true, productTitle: p.title, productId: p.productId, brand: p.brand, deeplink: p.deeplink, price: p.price.actual, salePrice: p.price.sale, imageWidth: 160, image: (_a = p.image.thumbnail) !== null && _a !== void 0 ? _a : p.image.original, part: "product-card", index: i }));
153
+ }))))))));
154
+ }
155
+ get el() { return index.getElement(this); }
156
+ static get watchers() { return {
157
+ "active": ["activeWatcher"]
158
+ }; }
159
+ };
160
+ VviinnVpsWidget.style = vviinnVpsWidgetCss;
161
+
162
+ exports.vviinn_vps_widget = VviinnVpsWidget;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-e8cf5dc5.js');
4
- const appGlobals = require('./app-globals-d999d944.js');
3
+ const index = require('./index-61403ab1.js');
4
+ const appGlobals = require('./app-globals-474864e0.js');
5
5
 
6
6
  /*
7
7
  Stencil Client Patch Browser v2.9.0 | MIT Licensed | https://stenciljs.com
@@ -17,5 +17,5 @@ const patchBrowser = () => {
17
17
 
18
18
  patchBrowser().then(options => {
19
19
  appGlobals.globalScripts();
20
- return index.bootstrapLazy([["cropper-handler_27.cjs",[[1,"vviinn-vps-widget",{"token":[1],"apiPath":[1,"api-path"],"active":[1028],"currencySign":[1,"currency-sign"],"locale":[1],"slidePosition":[32],"width":[32],"wrongImageFormat":[32]},[[0,"recommendationView","trackRecommendationView"],[0,"recommendationClick","trackRecommendationClick"],[0,"cropperChanged","trachSearchAreaChanges"],[0,"detectedObjectClicked","trackDetectedObject"],[0,"filterSelected","trackFilter"]]],[1,"vviinn-image-view"],[1,"vviinn-onboarding"],[1,"vviinn-example-images",null,[[0,"exampleImageSelected","handleImageSelection"],[0,"exampleImageError","handleImageSelectionError"]]],[1,"vviinn-overlayed-modal",{"active":[4]}],[1,"vviinn-empty-results"],[1,"vviinn-image-selector"],[1,"vviinn-server-error"],[1,"vviinn-wrong-format"],[1,"search-filters",{"filter":[16],"selectedCategoryId":[32],"hideFilters":[32]}],[1,"vviinn-privacy-badge"],[1,"vviinn-teaser"],[1,"image-cropper",{"disabled":[4],"handleMove":[32]}],[1,"vviinn-example-image",{"src":[1],"width":[2],"height":[2],"selected":[32]}],[1,"highlight-box"],[1,"vviinn-detected-object",{"detectedObject":[16],"position":[32]}],[1,"vviinn-modal",{"active":[1540],"slider":[32]}],[1,"vviinn-onboarding-card-1"],[1,"vviinn-onboarding-card-2"],[1,"vviinn-onboarding-card-3"],[1,"vviinn-overlay"],[1,"vviinn-slide"],[1,"vviinn-slider",{"showBullets":[4,"show-bullets"],"position":[514],"showArrows":[4,"show-arrows"],"elementsCount":[32],"internalPosition":[32],"swipeStartPosition":[32]}],[1,"cropper-handler",{"handler":[16],"disabled":[4]}],[1,"vviinn-error"],[1,"vviinn-preloader"],[1,"vviinn-product-card",{"brand":[1],"currency":[1],"deeplink":[1],"image":[1],"imageRatio":[2,"image-ratio"],"imageWidth":[2,"image-width"],"locale":[1],"price":[2],"pricePrefix":[1,"price-prefix"],"productId":[1,"product-id"],"productTitle":[1,"product-title"],"productType":[1,"product-type"],"salePrice":[2,"sale-price"],"responsive":[4],"dimmedBackground":[4,"dimmed-background"],"index":[2],"imageLoaded":[32]}]]],["vviinn-vps-button.cjs",[[1,"vviinn-vps-button",{"token":[1],"currencySign":[1,"currency-sign"],"locale":[1],"apiPath":[1,"api-path"],"pressed":[32]},[[0,"modalClosed","handleModalClosed"]]]]],["vviinn-carousel_2.cjs",[[1,"vviinn-vpr-widget",{"blockTitle":[1,"block-title"],"imageRatio":[2,"image-ratio"],"imageWidth":[2,"image-width"],"productId":[1,"product-id"],"token":[1],"currencySign":[1,"currency-sign"],"pricePrefix":[1,"price-prefix"],"mode":[1],"campaignType":[1,"campaign-type"],"locale":[1],"apiPath":[1,"api-path"],"useCarousel":[4,"use-carousel"],"showScroll":[4,"show-scroll"],"cssUrl":[1,"css-url"],"recommendations":[32],"loaded":[32]},[[0,"productImageLoaded","handleImageLoading"],[0,"recommendationView","trackRecommendationView"],[0,"recommendationClick","trackRecommendationClick"]]],[0,"vviinn-carousel",{"mode":[1],"imageWidth":[2,"image-width"],"showScroll":[4,"show-scroll"],"recommendations":[16],"moveDirection":[32],"contentGroups":[32],"activeContentGroup":[32]}]]],["vviinn-recommendations-sidebar.cjs",[[1,"vviinn-recommendations-sidebar",{"sidebarTitle":[1,"sidebar-title"],"token":[1],"productId":[1,"product-id"],"position":[1],"sourceImage":[1,"source-image"],"widgetScrollbar":[4,"widget-scrollbar"],"state":[32]},[[16,"click","bodyClickListener"]]]]],["vviinn-vpr-button.cjs",[[1,"vviinn-vpr-button",{"token":[1],"productId":[1,"product-id"],"position":[1],"sourceImage":[1,"source-image"],"sidebarTitle":[1,"sidebar-title"],"modalScrollbar":[4,"modal-scrollbar"]}]]]], options);
20
+ return index.bootstrapLazy([["cropper-handler.cjs",[[1,"cropper-handler",{"handler":[16],"disabled":[4]}]]],["vviinn-error.cjs",[[1,"vviinn-error"]]],["vviinn-preloader.cjs",[[1,"vviinn-preloader"]]],["vviinn-carousel_3.cjs",[[1,"vviinn-vpr-widget",{"blockTitle":[1,"block-title"],"imageRatio":[2,"image-ratio"],"imageWidth":[2,"image-width"],"productId":[1,"product-id"],"token":[1],"currencySign":[1,"currency-sign"],"pricePrefix":[1,"price-prefix"],"mode":[1],"campaignType":[1,"campaign-type"],"locale":[1],"apiPath":[1,"api-path"],"useCarousel":[4,"use-carousel"],"showScroll":[4,"show-scroll"],"cssUrl":[1,"css-url"],"recommendations":[32],"loaded":[32]},[[0,"productImageLoaded","handleImageLoading"],[0,"recommendationView","trackRecommendationView"],[0,"recommendationClick","trackRecommendationClick"]]],[0,"vviinn-carousel",{"mode":[1],"imageWidth":[2,"image-width"],"showScroll":[4,"show-scroll"],"recommendations":[16],"moveDirection":[32],"contentGroups":[32],"activeContentGroup":[32]}],[1,"vviinn-product-card",{"brand":[1],"currency":[1],"deeplink":[1],"image":[1],"imageRatio":[2,"image-ratio"],"imageWidth":[2,"image-width"],"locale":[1],"price":[2],"pricePrefix":[1,"price-prefix"],"productId":[1,"product-id"],"productTitle":[1,"product-title"],"productType":[1,"product-type"],"salePrice":[2,"sale-price"],"responsive":[4],"dimmedBackground":[4,"dimmed-background"],"index":[2],"imageLoaded":[32]}]]],["highlight-box_22.cjs",[[1,"vviinn-image-view"],[1,"vviinn-onboarding"],[1,"vviinn-example-images",null,[[0,"exampleImageSelected","handleImageSelection"],[0,"exampleImageError","handleImageSelectionError"]]],[1,"vviinn-overlayed-modal",{"active":[4]}],[1,"vviinn-empty-results"],[1,"vviinn-image-selector"],[1,"vviinn-server-error"],[1,"vviinn-wrong-format"],[1,"search-filters",{"filter":[16],"selectedCategoryId":[32],"hideFilters":[32]}],[1,"vviinn-privacy-badge"],[1,"vviinn-teaser"],[1,"image-cropper",{"disabled":[4],"handleMove":[32]}],[1,"vviinn-example-image",{"src":[1],"width":[2],"height":[2],"selected":[32]}],[1,"highlight-box"],[1,"vviinn-detected-object",{"detectedObject":[16],"position":[32]}],[1,"vviinn-modal",{"active":[1540],"slider":[32]}],[1,"vviinn-onboarding-card-1"],[1,"vviinn-onboarding-card-2"],[1,"vviinn-onboarding-card-3"],[1,"vviinn-overlay"],[1,"vviinn-slide"],[1,"vviinn-slider",{"showBullets":[4,"show-bullets"],"position":[514],"showArrows":[4,"show-arrows"],"elementsCount":[32],"internalPosition":[32],"swipeStartPosition":[32]}]]],["vviinn-vps-widget.cjs",[[1,"vviinn-vps-widget",{"token":[1],"apiPath":[1,"api-path"],"active":[1028],"currencySign":[1,"currency-sign"],"locale":[1],"slidePosition":[32],"width":[32],"wrongImageFormat":[32]},[[0,"recommendationView","trackRecommendationView"],[0,"recommendationClick","trackRecommendationClick"],[0,"cropperChanged","trachSearchAreaChanges"],[0,"detectedObjectClicked","trackDetectedObject"],[0,"filterSelected","trackFilter"]]]]],["vviinn-vps-button.cjs",[[1,"vviinn-vps-button",{"token":[1],"currencySign":[1,"currency-sign"],"locale":[1],"apiPath":[1,"api-path"],"pressed":[32]},[[0,"modalClosed","handleModalClosed"]]]]],["vviinn-recommendations-sidebar.cjs",[[1,"vviinn-recommendations-sidebar",{"sidebarTitle":[1,"sidebar-title"],"token":[1],"productId":[1,"product-id"],"position":[1],"sourceImage":[1,"source-image"],"widgetScrollbar":[4,"widget-scrollbar"],"state":[32]},[[16,"click","bodyClickListener"]]]]],["vviinn-vpr-button.cjs",[[1,"vviinn-vpr-button",{"token":[1],"productId":[1,"product-id"],"position":[1],"sourceImage":[1,"source-image"],"sidebarTitle":[1,"sidebar-title"],"modalScrollbar":[4,"modal-scrollbar"]}]]]], options);
21
21
  });
@@ -116,7 +116,7 @@ export class SearchFilters {
116
116
  "references": {
117
117
  "FilterAction": {
118
118
  "location": "import",
119
- "path": "@vviinn/tracking-client-ts"
119
+ "path": "vviinn-tracking-client-ts"
120
120
  }
121
121
  }
122
122
  }
@@ -48,6 +48,7 @@ export class VviinnVpsWidget {
48
48
  if (value) {
49
49
  this.overflow = document.body.style.overflow;
50
50
  document.body.style.overflow = "hidden";
51
+ this.trackOpenEvent();
51
52
  }
52
53
  else {
53
54
  document.body.style.overflow = this.overflow;
@@ -95,6 +96,8 @@ export class VviinnVpsWidget {
95
96
  state.locale = this.locale;
96
97
  imageSearchState.token = this.token;
97
98
  this.uiSessionId = uuidv4();
99
+ }
100
+ trackOpenEvent() {
98
101
  this.trackingApi = createTrackingApi(this.apiPath, this.token);
99
102
  const widgetOpenEvent = createWidgetVpsEvent({
100
103
  action: "open",
@@ -1,4 +1,4 @@
1
- import { createConfiguration, DefaultApi, servers, } from "@vviinn/tracking-client-ts";
1
+ import { createConfiguration, DefaultApi, servers, } from "vviinn-tracking-client-ts";
2
2
  const STAGE_SERVER_IDENTIFIER = "stage";
3
3
  export const getTrackingServerByApiPath = (apiPath) => isProductionPath(apiPath) ? servers[0] : servers[1];
4
4
  export const isProductionPath = (apiPath) => !apiPath.includes(STAGE_SERVER_IDENTIFIER);
@@ -0,0 +1,308 @@
1
+ // -------------------------------------------------------------------------------------
2
+ /**
3
+ * @since 2.0.0
4
+ */
5
+ function identity(a) {
6
+ return a;
7
+ }
8
+ function flow(ab, bc, cd, de, ef, fg, gh, hi, ij) {
9
+ switch (arguments.length) {
10
+ case 1:
11
+ return ab;
12
+ case 2:
13
+ return function () {
14
+ return bc(ab.apply(this, arguments));
15
+ };
16
+ case 3:
17
+ return function () {
18
+ return cd(bc(ab.apply(this, arguments)));
19
+ };
20
+ case 4:
21
+ return function () {
22
+ return de(cd(bc(ab.apply(this, arguments))));
23
+ };
24
+ case 5:
25
+ return function () {
26
+ return ef(de(cd(bc(ab.apply(this, arguments)))));
27
+ };
28
+ case 6:
29
+ return function () {
30
+ return fg(ef(de(cd(bc(ab.apply(this, arguments))))));
31
+ };
32
+ case 7:
33
+ return function () {
34
+ return gh(fg(ef(de(cd(bc(ab.apply(this, arguments)))))));
35
+ };
36
+ case 8:
37
+ return function () {
38
+ return hi(gh(fg(ef(de(cd(bc(ab.apply(this, arguments))))))));
39
+ };
40
+ case 9:
41
+ return function () {
42
+ return ij(hi(gh(fg(ef(de(cd(bc(ab.apply(this, arguments)))))))));
43
+ };
44
+ }
45
+ return;
46
+ }
47
+ /**
48
+ * @since 2.0.0
49
+ */
50
+ function tuple() {
51
+ var t = [];
52
+ for (var _i = 0; _i < arguments.length; _i++) {
53
+ t[_i] = arguments[_i];
54
+ }
55
+ return t;
56
+ }
57
+ function pipe(a, ab, bc, cd, de, ef, fg, gh, hi) {
58
+ switch (arguments.length) {
59
+ case 1:
60
+ return a;
61
+ case 2:
62
+ return ab(a);
63
+ case 3:
64
+ return bc(ab(a));
65
+ case 4:
66
+ return cd(bc(ab(a)));
67
+ case 5:
68
+ return de(cd(bc(ab(a))));
69
+ case 6:
70
+ return ef(de(cd(bc(ab(a)))));
71
+ case 7:
72
+ return fg(ef(de(cd(bc(ab(a))))));
73
+ case 8:
74
+ return gh(fg(ef(de(cd(bc(ab(a)))))));
75
+ case 9:
76
+ return hi(gh(fg(ef(de(cd(bc(ab(a))))))));
77
+ default:
78
+ var ret = arguments[0];
79
+ for (var i = 1; i < arguments.length; i++) {
80
+ ret = arguments[i](ret);
81
+ }
82
+ return ret;
83
+ }
84
+ }
85
+
86
+ // -------------------------------------------------------------------------------------
87
+ // Option
88
+ // -------------------------------------------------------------------------------------
89
+ /** @internal */
90
+ var isNone = function (fa) { return fa._tag === 'None'; };
91
+ /** @internal */
92
+ var isSome = function (fa) { return fa._tag === 'Some'; };
93
+ /** @internal */
94
+ var none = { _tag: 'None' };
95
+ /** @internal */
96
+ var some = function (a) { return ({ _tag: 'Some', value: a }); };
97
+ // -------------------------------------------------------------------------------------
98
+ // Either
99
+ // -------------------------------------------------------------------------------------
100
+ /** @internal */
101
+ var isLeft = function (ma) { return ma._tag === 'Left'; };
102
+ /** @internal */
103
+ var left = function (e) { return ({ _tag: 'Left', left: e }); };
104
+ /** @internal */
105
+ var right = function (a) { return ({ _tag: 'Right', right: a }); };
106
+ // -------------------------------------------------------------------------------------
107
+ // Record
108
+ // -------------------------------------------------------------------------------------
109
+ /** @internal */
110
+ var has = Object.prototype.hasOwnProperty;
111
+
112
+ /**
113
+ * If a type `A` can form a `Semigroup` it has an **associative** binary operation.
114
+ *
115
+ * ```ts
116
+ * interface Semigroup<A> {
117
+ * readonly concat: (x: A, y: A) => A
118
+ * }
119
+ * ```
120
+ *
121
+ * Associativity means the following equality must hold for any choice of `x`, `y`, and `z`.
122
+ *
123
+ * ```ts
124
+ * concat(x, concat(y, z)) = concat(concat(x, y), z)
125
+ * ```
126
+ *
127
+ * A common example of a semigroup is the type `string` with the operation `+`.
128
+ *
129
+ * ```ts
130
+ * import { Semigroup } from 'fp-ts/Semigroup'
131
+ *
132
+ * const semigroupString: Semigroup<string> = {
133
+ * concat: (x, y) => x + y
134
+ * }
135
+ *
136
+ * const x = 'x'
137
+ * const y = 'y'
138
+ * const z = 'z'
139
+ *
140
+ * semigroupString.concat(x, y) // 'xy'
141
+ *
142
+ * semigroupString.concat(x, semigroupString.concat(y, z)) // 'xyz'
143
+ *
144
+ * semigroupString.concat(semigroupString.concat(x, y), z) // 'xyz'
145
+ * ```
146
+ *
147
+ * *Adapted from https://typelevel.org/cats*
148
+ *
149
+ * @since 2.0.0
150
+ */
151
+ /**
152
+ * Given a struct of semigroups returns a semigroup for the struct.
153
+ *
154
+ * @example
155
+ * import { struct } from 'fp-ts/Semigroup'
156
+ * import * as N from 'fp-ts/number'
157
+ *
158
+ * interface Point {
159
+ * readonly x: number
160
+ * readonly y: number
161
+ * }
162
+ *
163
+ * const S = struct<Point>({
164
+ * x: N.SemigroupSum,
165
+ * y: N.SemigroupSum
166
+ * })
167
+ *
168
+ * assert.deepStrictEqual(S.concat({ x: 1, y: 2 }, { x: 3, y: 4 }), { x: 4, y: 6 })
169
+ *
170
+ * @category combinators
171
+ * @since 2.10.0
172
+ */
173
+ var struct = function (semigroups) { return ({
174
+ concat: function (first, second) {
175
+ var r = {};
176
+ for (var k in semigroups) {
177
+ if (has.call(semigroups, k)) {
178
+ r[k] = semigroups[k].concat(first[k], second[k]);
179
+ }
180
+ }
181
+ return r;
182
+ }
183
+ }); };
184
+ // -------------------------------------------------------------------------------------
185
+ // instances
186
+ // -------------------------------------------------------------------------------------
187
+ /**
188
+ * Always return the first argument.
189
+ *
190
+ * @example
191
+ * import * as S from 'fp-ts/Semigroup'
192
+ *
193
+ * assert.deepStrictEqual(S.first<number>().concat(1, 2), 1)
194
+ *
195
+ * @category instances
196
+ * @since 2.10.0
197
+ */
198
+ var first = function () { return ({ concat: identity }); };
199
+ /**
200
+ * Always return the last argument.
201
+ *
202
+ * @example
203
+ * import * as S from 'fp-ts/Semigroup'
204
+ *
205
+ * assert.deepStrictEqual(S.last<number>().concat(1, 2), 2)
206
+ *
207
+ * @category instances
208
+ * @since 2.10.0
209
+ */
210
+ var last = function () { return ({ concat: function (_, y) { return y; } }); };
211
+ /**
212
+ * Use [`SemigroupSum`](./number.ts.html#SemigroupSum) instead.
213
+ *
214
+ * @category instances
215
+ * @since 2.0.0
216
+ * @deprecated
217
+ */
218
+ var semigroupSum = {
219
+ concat: function (x, y) { return x + y; }
220
+ };
221
+
222
+ const semigroupDiff = {
223
+ concat: (x, y) => x - y,
224
+ };
225
+
226
+ const fromRectangle$1 = ({ x, y }) => {
227
+ return {
228
+ x,
229
+ y,
230
+ };
231
+ };
232
+ const fromMouseEvent = ({ clientX, clientY }) => {
233
+ return {
234
+ x: clientX,
235
+ y: clientY,
236
+ };
237
+ };
238
+ const pointDiffSemigroup = struct({
239
+ x: semigroupDiff,
240
+ y: semigroupDiff,
241
+ });
242
+ const pointSumSemigroup = struct({
243
+ x: semigroupSum,
244
+ y: semigroupSum,
245
+ });
246
+
247
+ var HandlerDirection;
248
+ (function (HandlerDirection) {
249
+ HandlerDirection[HandlerDirection["East"] = 0] = "East";
250
+ HandlerDirection[HandlerDirection["North"] = 1] = "North";
251
+ HandlerDirection[HandlerDirection["NorthEast"] = 2] = "NorthEast";
252
+ HandlerDirection[HandlerDirection["NorthWest"] = 3] = "NorthWest";
253
+ HandlerDirection[HandlerDirection["South"] = 4] = "South";
254
+ HandlerDirection[HandlerDirection["SouthEast"] = 5] = "SouthEast";
255
+ HandlerDirection[HandlerDirection["SouthWest"] = 6] = "SouthWest";
256
+ HandlerDirection[HandlerDirection["West"] = 7] = "West";
257
+ })(HandlerDirection || (HandlerDirection = {}));
258
+ const getCursorValue = (direction) => {
259
+ switch (direction) {
260
+ case HandlerDirection.East:
261
+ return "e-resize";
262
+ case HandlerDirection.North:
263
+ return "n-resize";
264
+ case HandlerDirection.NorthEast:
265
+ return "ne-resize";
266
+ case HandlerDirection.NorthWest:
267
+ return "nw-resize";
268
+ case HandlerDirection.South:
269
+ return "s-resize";
270
+ case HandlerDirection.SouthEast:
271
+ return "se-resize";
272
+ case HandlerDirection.SouthWest:
273
+ return "sw-resize";
274
+ case HandlerDirection.West:
275
+ return "w-resize";
276
+ default:
277
+ return "pointer";
278
+ }
279
+ };
280
+ const fromRectangle = (r) => [
281
+ {
282
+ position: fromRectangle$1(r),
283
+ direction: HandlerDirection.NorthWest,
284
+ },
285
+ {
286
+ position: pointSumSemigroup.concat(fromRectangle$1(r), {
287
+ x: r.width,
288
+ y: 0,
289
+ }),
290
+ direction: HandlerDirection.NorthEast,
291
+ },
292
+ {
293
+ position: pointSumSemigroup.concat(fromRectangle$1(r), {
294
+ x: 0,
295
+ y: r.height,
296
+ }),
297
+ direction: HandlerDirection.SouthWest,
298
+ },
299
+ {
300
+ position: pointSumSemigroup.concat(fromRectangle$1(r), {
301
+ x: r.width,
302
+ y: r.height,
303
+ }),
304
+ direction: HandlerDirection.SouthEast,
305
+ },
306
+ ];
307
+
308
+ export { HandlerDirection as H, isLeft as a, identity as b, flow as c, struct as d, last as e, first as f, pointSumSemigroup as g, fromRectangle$1 as h, isNone as i, isSome as j, fromRectangle as k, left as l, pointDiffSemigroup as m, none as n, fromMouseEvent as o, pipe as p, getCursorValue as q, right as r, some as s, tuple as t };
@@ -1,4 +1,4 @@
1
- import { E as Env } from './index-d7147986.js';
1
+ import { E as Env } from './index-56c062df.js';
2
2
 
3
3
  /*! *****************************************************************************
4
4
  Copyright (c) Microsoft Corporation.
@@ -0,0 +1,23 @@
1
+ import { r as registerInstance, h, H as Host } from './index-56c062df.js';
2
+ import { q as getCursorValue } from './Handler-639a4cb3.js';
3
+
4
+ const cropperHandlerCss = ":host{--size:20px;background:transparent;border:4px solid white;box-sizing:content-box;display:block;height:var(--size);touch-action:none;position:absolute;width:var(--size);z-index:4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host(.disabled){opacity:0.25}:host(.nw-resize){border-bottom:none;border-right:none;top:0;left:0}:host(.ne-resize){border-left:none;border-bottom:none;right:0;top:0}:host(.sw-resize){border-right:none;border-top:none;left:0;bottom:0}:host(.se-resize){border-left:none;border-top:none;bottom:0;right:0}";
5
+
6
+ let CropperHandler = class {
7
+ constructor(hostRef) {
8
+ registerInstance(this, hostRef);
9
+ this.disabled = false;
10
+ }
11
+ render() {
12
+ return (h(Host, { part: `handle ${getCursorValue(this.handler.direction)}`, class: {
13
+ disabled: this.disabled,
14
+ [getCursorValue(this.handler.direction)]: true,
15
+ }, style: {
16
+ "--size": "20px",
17
+ cursor: getCursorValue(this.handler.direction),
18
+ }, draggable: false }));
19
+ }
20
+ };
21
+ CropperHandler.style = cropperHandlerCss;
22
+
23
+ export { CropperHandler as cropper_handler };
@@ -1,4 +1,4 @@
1
- import { h } from './index-d7147986.js';
1
+ import { h } from './index-56c062df.js';
2
2
 
3
3
  const defaultSlotsNames = [
4
4
  "vviinn-onboarding-title",