vviinn-widgets 2.222.0 → 2.223.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.
- package/dist/cjs/{index-RlbsyJJk.js → index-DZw3p4dq.js} +1 -1
- package/dist/cjs/{search.store-D4WiAMcl.js → search.store-Bh2_GSpU.js} +2 -1
- package/dist/cjs/vviinn-button_6.cjs.entry.js +1 -1
- package/dist/cjs/vviinn-camera_12.cjs.entry.js +152 -43
- package/dist/cjs/vviinn-carousel_10.cjs.entry.js +2 -53
- package/dist/cjs/vviinn-shop-the-look.cjs.entry.js +1 -1
- package/dist/cjs/vviinn-text-search.cjs.entry.js +1 -1
- package/dist/collection/components/vviinn-cropper/helpers/cropperOcrGate.js +36 -0
- package/dist/collection/components/vviinn-cropper/helpers/hasSelectedOcrFilter.js +4 -0
- package/dist/collection/components/vviinn-cropper/vviinn-cropper.js +108 -38
- package/dist/collection/components/vviinn-filters/vviinn-extended-filters.js +2 -2
- package/dist/collection/components/vviinn-results/vviinn-results.js +78 -3
- package/dist/esm/{index-CEzGPs5u.js → index-DQQYIioG.js} +1 -1
- package/dist/esm/{search.store-Cgs5icgA.js → search.store-lTerE9Yh.js} +2 -2
- package/dist/esm/vviinn-button_6.entry.js +1 -1
- package/dist/esm/vviinn-camera_12.entry.js +152 -43
- package/dist/esm/vviinn-carousel_10.entry.js +2 -53
- package/dist/esm/vviinn-shop-the-look.entry.js +1 -1
- package/dist/esm/vviinn-text-search.entry.js +1 -1
- package/dist/storybook/helpers/industryToken.js +6 -8
- package/dist/types/components/vviinn-cropper/helpers/cropperOcrGate.d.ts +19 -0
- package/dist/types/components/vviinn-cropper/helpers/hasSelectedOcrFilter.d.ts +2 -0
- package/dist/types/components/vviinn-cropper/vviinn-cropper.d.ts +14 -0
- package/dist/types/components/vviinn-filters/vviinn-extended-filters.d.ts +51 -0
- package/dist/types/components/vviinn-results/vviinn-results.d.ts +1 -1
- package/dist/vviinn-widgets/p-08d39cc9.entry.js +1 -0
- package/dist/vviinn-widgets/{p-df4365fb.entry.js → p-1e2f9b9f.entry.js} +1 -1
- package/dist/vviinn-widgets/{p-c1eac87b.entry.js → p-3daed25b.entry.js} +1 -1
- package/{www/build/p-Cxd6yzhY.js → dist/vviinn-widgets/p-CJAxBbhA.js} +1 -1
- package/dist/vviinn-widgets/{p-B246LK7U.js → p-DhCqK4d8.js} +1 -1
- package/dist/vviinn-widgets/{p-818a1e53.entry.js → p-eb579723.entry.js} +1 -1
- package/{www/build/p-df9a1d66.entry.js → dist/vviinn-widgets/p-f9f4e909.entry.js} +1 -1
- package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
- package/package.json +1 -1
- package/www/build/p-08d39cc9.entry.js +1 -0
- package/www/build/{p-df4365fb.entry.js → p-1e2f9b9f.entry.js} +1 -1
- package/www/build/{p-c1eac87b.entry.js → p-3daed25b.entry.js} +1 -1
- package/www/build/{p-e969c76d.js → p-4f556dc3.js} +1 -1
- package/{dist/vviinn-widgets/p-Cxd6yzhY.js → www/build/p-CJAxBbhA.js} +1 -1
- package/www/build/{p-B246LK7U.js → p-DhCqK4d8.js} +1 -1
- package/www/build/{p-818a1e53.entry.js → p-eb579723.entry.js} +1 -1
- package/{dist/vviinn-widgets/p-df9a1d66.entry.js → www/build/p-f9f4e909.entry.js} +1 -1
- package/www/build/vviinn-widgets.esm.js +1 -1
- package/www/index.html +1 -1
- package/dist/vviinn-widgets/p-0b7e8e2e.entry.js +0 -1
- package/www/build/p-0b7e8e2e.entry.js +0 -1
|
@@ -12,6 +12,7 @@ import { makeVisualSearchRequest, useSearchStore, } from "../../store/search.sto
|
|
|
12
12
|
import { getImageSizes } from "../../Image/sizing";
|
|
13
13
|
import { isCropBoxChangeMinimal } from "./helpers/isCropBoxDataSimilar";
|
|
14
14
|
import { getCropBoxData } from "./helpers/cropperUtils";
|
|
15
|
+
import { CropperOcrGate } from "./helpers/cropperOcrGate";
|
|
15
16
|
import { cleanLocalStorage, getLocalStorageItems } from "../../localStorage";
|
|
16
17
|
import { addEventListenersWithSignal } from "../../dom";
|
|
17
18
|
import { renderExternalCSS } from "../../utils/cssUrl/cssUrlHelper";
|
|
@@ -30,6 +31,45 @@ export class VviinnCropper {
|
|
|
30
31
|
this.showInWidget = false;
|
|
31
32
|
this.cropper = null;
|
|
32
33
|
this.selectedDetectedObject = null;
|
|
34
|
+
this.imageElement = null;
|
|
35
|
+
this.gate = new CropperOcrGate();
|
|
36
|
+
this.destroyCropper = () => {
|
|
37
|
+
var _a;
|
|
38
|
+
(_a = this.cropper) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
39
|
+
this.cropper = null;
|
|
40
|
+
};
|
|
41
|
+
this.clearCropSelection = () => {
|
|
42
|
+
this.state.searchArea = null;
|
|
43
|
+
this.state.croppedImageUrl = null;
|
|
44
|
+
this.selectedDetectedObject = null;
|
|
45
|
+
};
|
|
46
|
+
/** Tear down the cropper and drop any applied crop. */
|
|
47
|
+
this.discardCrop = () => {
|
|
48
|
+
this.destroyCropper();
|
|
49
|
+
this.clearCropSelection();
|
|
50
|
+
};
|
|
51
|
+
this.resetCropperState = () => {
|
|
52
|
+
this.discardCrop();
|
|
53
|
+
this.state.image = null;
|
|
54
|
+
};
|
|
55
|
+
/** Show or hide the cropper to match the current OCR gate decision. */
|
|
56
|
+
this.reconcileCropper = () => {
|
|
57
|
+
// Trust the fresh filters even before the image DOM is ready.
|
|
58
|
+
this.gate.onFreshFilters();
|
|
59
|
+
if (!this.state.image || !this.imageElement || !this.state.imageBounds)
|
|
60
|
+
return;
|
|
61
|
+
if (this.gate.isGated(this.state.dynamicFilters)) {
|
|
62
|
+
// Drop only the frame, keep the region/object so OCR searches within it.
|
|
63
|
+
this.destroyCropper();
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
// Guard geometry here so initCropper doesn't re-emit the aspect-ratio error on every filter change.
|
|
67
|
+
if (!this.cropper &&
|
|
68
|
+
this.hasSupportedAspectRatio() &&
|
|
69
|
+
this.hasSupportedSize()) {
|
|
70
|
+
this.initCropper(this.imageElement);
|
|
71
|
+
}
|
|
72
|
+
};
|
|
33
73
|
this.initPreloadedImage = () => {
|
|
34
74
|
var _a;
|
|
35
75
|
if (this.showInWidget && this.state.image) {
|
|
@@ -53,14 +93,12 @@ export class VviinnCropper {
|
|
|
53
93
|
cleanLocalStorage();
|
|
54
94
|
};
|
|
55
95
|
this.resetStateHandler = ({ detail, }) => {
|
|
56
|
-
var _a
|
|
96
|
+
var _a;
|
|
57
97
|
if (this.skipStateChanges(detail.isTriggeredByVpsWidget))
|
|
58
98
|
return;
|
|
59
|
-
this.selectedDetectedObject = null;
|
|
60
99
|
(_a = this.state.image) === null || _a === void 0 ? void 0 : _a.setAttribute("src", "");
|
|
61
100
|
this.state.detectedObjects = [];
|
|
62
|
-
this.
|
|
63
|
-
(_b = this.cropper) === null || _b === void 0 ? void 0 : _b.destroy();
|
|
101
|
+
this.resetCropperState();
|
|
64
102
|
cleanLocalStorage();
|
|
65
103
|
};
|
|
66
104
|
this.resetCropAreaHandler = ({ detail, }) => {
|
|
@@ -68,9 +106,7 @@ export class VviinnCropper {
|
|
|
68
106
|
if (this.skipStateChanges(detail.isTriggeredByVpsWidget))
|
|
69
107
|
return;
|
|
70
108
|
(_a = this.cropper) === null || _a === void 0 ? void 0 : _a.reset();
|
|
71
|
-
this.
|
|
72
|
-
this.state.croppedImageUrl = null;
|
|
73
|
-
this.selectedDetectedObject = null;
|
|
109
|
+
this.clearCropSelection();
|
|
74
110
|
this.vviinnImageCrop.emit({
|
|
75
111
|
isTriggeredByVpsWidget: this.showInWidget,
|
|
76
112
|
});
|
|
@@ -98,32 +134,62 @@ export class VviinnCropper {
|
|
|
98
134
|
this.cropper.replace(this.state.image.src);
|
|
99
135
|
};
|
|
100
136
|
this.loadImage = () => {
|
|
101
|
-
|
|
102
|
-
if (this.state.image)
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
this.
|
|
137
|
+
var _a;
|
|
138
|
+
if (!this.state.image)
|
|
139
|
+
return;
|
|
140
|
+
const renderedImageElement = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector("img");
|
|
141
|
+
if (!renderedImageElement)
|
|
142
|
+
return;
|
|
143
|
+
this.imageElement = renderedImageElement;
|
|
144
|
+
this.gate.onImage(this.state.image);
|
|
145
|
+
let data = {};
|
|
146
|
+
if (this.cropper) {
|
|
147
|
+
data = this.cropper.getData(true);
|
|
148
|
+
this.destroyCropper();
|
|
149
|
+
}
|
|
150
|
+
const imageBounds = fromImage(renderedImageElement);
|
|
151
|
+
this.vviinnCropperLoadImage.emit({
|
|
152
|
+
imageBounds,
|
|
153
|
+
});
|
|
154
|
+
this.state.imageBounds = imageBounds;
|
|
155
|
+
const isSearchLoading = this.state.searchStatus === "loading";
|
|
156
|
+
if (this.gate.isGated(this.state.dynamicFilters, isSearchLoading)) {
|
|
157
|
+
this.discardCrop();
|
|
158
|
+
// Still surface aspect-ratio errors while hidden — geometry matters regardless.
|
|
159
|
+
this.checkAspectRatio();
|
|
160
|
+
return;
|
|
124
161
|
}
|
|
162
|
+
this.initCropper(renderedImageElement, data);
|
|
163
|
+
};
|
|
164
|
+
this.hasSupportedAspectRatio = () => {
|
|
165
|
+
if (!this.state.imageBounds)
|
|
166
|
+
return false;
|
|
167
|
+
const { width, height } = this.state.imageBounds;
|
|
168
|
+
return (width / height >= SUPPORTED_ASPECT_RATIO &&
|
|
169
|
+
height / width >= SUPPORTED_ASPECT_RATIO);
|
|
170
|
+
};
|
|
171
|
+
this.hasSupportedSize = () => {
|
|
172
|
+
if (!this.state.imageBounds)
|
|
173
|
+
return false;
|
|
174
|
+
const { width, height } = this.state.imageBounds;
|
|
175
|
+
return (width >= MIN_IMAGE_SIDE_FOR_CROPPER &&
|
|
176
|
+
height >= MIN_IMAGE_SIDE_FOR_CROPPER);
|
|
177
|
+
};
|
|
178
|
+
this.checkAspectRatio = () => {
|
|
179
|
+
if (this.hasSupportedAspectRatio())
|
|
180
|
+
return true;
|
|
181
|
+
this.vviinnCropperAspectRatioError.emit(true);
|
|
182
|
+
return false;
|
|
183
|
+
};
|
|
184
|
+
this.initCropper = (imageElement, data = {}) => {
|
|
185
|
+
if (!imageElement)
|
|
186
|
+
return;
|
|
187
|
+
if (!this.checkAspectRatio() || !this.hasSupportedSize())
|
|
188
|
+
return;
|
|
189
|
+
this.cropper = new Cropper(imageElement, Object.assign(Object.assign({}, cropperOptions), { cropstart: this.cropStart, cropend: this.cropEnd, ready: () => { var _a; return (_a = this.cropper) === null || _a === void 0 ? void 0 : _a.reset(); }, data }));
|
|
125
190
|
};
|
|
126
191
|
this.cropStart = () => {
|
|
192
|
+
this.gate.onUserAdjust();
|
|
127
193
|
this.startEndCropBoxData = getCropBoxData(this.cropper);
|
|
128
194
|
};
|
|
129
195
|
this.cropEnd = () => {
|
|
@@ -149,9 +215,10 @@ export class VviinnCropper {
|
|
|
149
215
|
!this.showAspectRatioError;
|
|
150
216
|
}
|
|
151
217
|
connectedCallback() {
|
|
152
|
-
const { state, storeName } = useSearchStore(this.showInWidget);
|
|
218
|
+
const { state, storeName, onChange } = useSearchStore(this.showInWidget);
|
|
153
219
|
this.state = state;
|
|
154
220
|
this.storeName = storeName;
|
|
221
|
+
this.disposeStoreListener = onChange("dynamicFilters", this.reconcileCropper);
|
|
155
222
|
this.initPreloadedImage();
|
|
156
223
|
this.eventAbortController = new AbortController();
|
|
157
224
|
const { signal } = this.eventAbortController;
|
|
@@ -162,10 +229,13 @@ export class VviinnCropper {
|
|
|
162
229
|
], signal);
|
|
163
230
|
}
|
|
164
231
|
disconnectedCallback() {
|
|
165
|
-
var _a, _b
|
|
232
|
+
var _a, _b;
|
|
166
233
|
(_a = this.eventAbortController) === null || _a === void 0 ? void 0 : _a.abort();
|
|
167
|
-
(
|
|
168
|
-
this.
|
|
234
|
+
(_b = this.disposeStoreListener) === null || _b === void 0 ? void 0 : _b.call(this);
|
|
235
|
+
this.destroyCropper();
|
|
236
|
+
// "never" keeps no image across mounts, so clear it from the shared store.
|
|
237
|
+
if (this.saveImageMode === "never")
|
|
238
|
+
this.state.image = null;
|
|
169
239
|
}
|
|
170
240
|
selectDetectedObject({ detail }) {
|
|
171
241
|
this.selectedDetectedObject = detail.detectedObject;
|
|
@@ -198,14 +268,14 @@ export class VviinnCropper {
|
|
|
198
268
|
}
|
|
199
269
|
render() {
|
|
200
270
|
var _a;
|
|
201
|
-
return (h(Host, { key: '
|
|
271
|
+
return (h(Host, { key: 'b50ccb5595b27ef6673ff9d9350fc30359a6f7ce', class: {
|
|
202
272
|
"show-in-widget": this.showInWidget,
|
|
203
273
|
active: !!this.state.image,
|
|
204
|
-
} }, renderExternalCSS(this.cssUrl), h("div", { key: '
|
|
274
|
+
} }, renderExternalCSS(this.cssUrl), h("div", { key: 'efd816ed4e19082091567714fee4ef40efe9a6c4', class: "container" }, this.state.image && (h("div", { key: '13f35758ba243eb73513e17375daca8431538383', class: "image-container", style: {
|
|
205
275
|
width: `${this.width.toString()}px`,
|
|
206
276
|
overflow: "hidden",
|
|
207
|
-
} }, h("img", { key: '
|
|
208
|
-
_a.map((object) => (h("vviinn-detected-object", { detectedObject: object, selectedDetectedObject: this.selectedDetectedObject, basicEventData: this.basicEventData, imageBounds: this.state.imageBounds, showInWidget: this.showInWidget }))))), this.showPreloader() && (h("div", { key: '
|
|
277
|
+
} }, h("img", { key: '7525aae0654325fb25c88106a9ee1fface11a62e', decoding: "async", width: this.width, height: this.height, src: this.state.image.src, draggable: false, onLoad: this.loadImage, alt: i18next.t("a11y.cropperImage") }), (_a = this.state.detectedObjects) === null || _a === void 0 ? void 0 :
|
|
278
|
+
_a.map((object) => (h("vviinn-detected-object", { detectedObject: object, selectedDetectedObject: this.selectedDetectedObject, basicEventData: this.basicEventData, imageBounds: this.state.imageBounds, showInWidget: this.showInWidget }))))), this.showPreloader() && (h("div", { key: 'b89ad46bda5279b77f4fe258f7a6d4af08f81c29', class: "image-preloader" }, h("vviinn-preloader", { key: '34f55578c05321480d7e3d8141a4638df8aad08b' }))))));
|
|
209
279
|
}
|
|
210
280
|
static get is() { return "vviinn-cropper"; }
|
|
211
281
|
static get encapsulation() { return "shadow"; }
|
|
@@ -12,6 +12,8 @@ import { useSearchStore } from "../../store/search.store";
|
|
|
12
12
|
import { defaultConfig } from "../../store/store";
|
|
13
13
|
import { addEventListenersWithSignal, isElementInSelector } from "../../dom";
|
|
14
14
|
import { extendedFiltersParts } from "../../cssParts";
|
|
15
|
+
const FILTER_OPTIONS_INITIAL_COUNT = 8;
|
|
16
|
+
const FILTER_OPTIONS_STEP_COUNT = 5;
|
|
15
17
|
/**
|
|
16
18
|
* @slot vviinn-extended-filters-title - Text on widget's header.
|
|
17
19
|
* @slot vviinn-extended-filters-apply - Title of Apply Button.
|
|
@@ -63,8 +65,6 @@ import { extendedFiltersParts } from "../../cssParts";
|
|
|
63
65
|
* @part histogram-from-input - Input field for the minimum value.
|
|
64
66
|
* @part histogram-to-input - Input field for the maximum value.
|
|
65
67
|
*/
|
|
66
|
-
const FILTER_OPTIONS_INITIAL_COUNT = 8;
|
|
67
|
-
const FILTER_OPTIONS_STEP_COUNT = 5;
|
|
68
68
|
export class VviinnExtendedFilters {
|
|
69
69
|
constructor() {
|
|
70
70
|
this.mode = "button";
|
|
@@ -32,6 +32,81 @@ import { addIfNotEmpty } from "../../utils/collections/collectionsUtils";
|
|
|
32
32
|
import { RESULTS_CALCULATED_COLUMNS_CSS_VAR } from "../vviinn-carousel/constants";
|
|
33
33
|
import { renderExternalCSS } from "../../utils/cssUrl/cssUrlHelper";
|
|
34
34
|
import { openProductLink } from "../../helpers/navigation/openProductLink";
|
|
35
|
+
/**
|
|
36
|
+
* @part products - Products container.
|
|
37
|
+
* @part product-card - Product Card itself.
|
|
38
|
+
* @part image-container - Product Card's image container.
|
|
39
|
+
* @part content-container - Product Card's content container.
|
|
40
|
+
* @part basket-button-container - Product Card's basket button container.
|
|
41
|
+
* @part brand - Brand inside Product Card.
|
|
42
|
+
* @part product-type - Product Type inside Product Card.
|
|
43
|
+
* @part currency - Currency related to price.
|
|
44
|
+
* @part deeplink - Anchor element around product title. Rendered only if "deeplink" property is filled.
|
|
45
|
+
* @part image - Product Card image.
|
|
46
|
+
* @part image-link - Anchor element around product image. Rendered only if "deeplink" property is filled.
|
|
47
|
+
* @part image-picture - Picture element for image.
|
|
48
|
+
* @part image-placeholder - Placeholder shown when no image is available.
|
|
49
|
+
* @part price-amount-regular - Numeric part of the price.
|
|
50
|
+
* @part price-amount-sale - Numeric part of the price.
|
|
51
|
+
* @part price-amount-outdated - Numeric part of the price.
|
|
52
|
+
* @part price-amount-base-sale - Numeric part of the base price.
|
|
53
|
+
* @part price-amount-base-outdated - Numeric part of the base price.
|
|
54
|
+
* @part price-amount-base-regular - Numeric part of the base price.
|
|
55
|
+
* @part price-outdated - Block for outdated price. Rendered when the product contains the sale price.
|
|
56
|
+
* @part price-regular - Block for a price if no sale price is presented.
|
|
57
|
+
* @part price-sale - Block for sale price. Rendered only if the sale price is presented.
|
|
58
|
+
* @part price-prefix - Block rendered before each price element (for ex. "from").
|
|
59
|
+
* @part title - Title inside Product Card.
|
|
60
|
+
* @part basket-button - Add to Basket button.
|
|
61
|
+
* @part basket-button-container - Product Card's basket button container.
|
|
62
|
+
* @part favorite-button - Favorite button.
|
|
63
|
+
* @part product-card-actions - Product Card actions wrapper.
|
|
64
|
+
* @part product-card-actions-top - Product Card top actions wrapper.
|
|
65
|
+
* @part energy-label-container - Energy label container.
|
|
66
|
+
* @part energy-label-icon - Icon with an energy class.
|
|
67
|
+
* @part energy-label-product-type - Product type.
|
|
68
|
+
* @part energy-label-data-sheet-link - Data sheet link.
|
|
69
|
+
* @part product-images-pagination - Container for product images pagination dots (mobile only).
|
|
70
|
+
* @part product-images-pagination-bullet - Individual pagination dot.
|
|
71
|
+
* @part product-images-pagination-bullet-active - Active pagination dot.
|
|
72
|
+
*
|
|
73
|
+
* @part custom-label-0 - Custom label with index 0.
|
|
74
|
+
* @part custom-label-1 - Custom label with index 1.
|
|
75
|
+
* @part custom-label-2 - Custom label with index 2.
|
|
76
|
+
* @part custom-label-3 - Custom label with index 3.
|
|
77
|
+
* @part custom-label-4 - Custom label with index 4.
|
|
78
|
+
*
|
|
79
|
+
* @part list-card - List card container (for entity-type="list").
|
|
80
|
+
* @part list-card-content-container - List card's content container.
|
|
81
|
+
* @part list-label - List card's label (e.g., "Category").
|
|
82
|
+
* @part list-title - List card's title.
|
|
83
|
+
* @part list-card-image-container - List card's image container.
|
|
84
|
+
* @part list-card-image - List card's image element.
|
|
85
|
+
* @part list-card-image-picture - List card's image picture element.
|
|
86
|
+
*
|
|
87
|
+
* @part content-card - Content card container (for entity-type="content").
|
|
88
|
+
* @part content-card-content-container - Content card's content container.
|
|
89
|
+
* @part content-label - Content card's label.
|
|
90
|
+
* @part content-title - Content card's title.
|
|
91
|
+
* @part content-link - Content card's link.
|
|
92
|
+
* @part content-card-image - Content card's image element.
|
|
93
|
+
* @part content-card-image-container - Content card's image container.
|
|
94
|
+
* @part content-card-image-picture - Content card's image picture element.
|
|
95
|
+
*
|
|
96
|
+
* @slot vviinn-results-vpr-icon - One-Click Discovery icon.
|
|
97
|
+
* @slot vviinn-favorite-icon - Icon of Favorite button.
|
|
98
|
+
* @slot vviinn-favorite-icon-pressed - Icon of pressed Favorite button.
|
|
99
|
+
* @slot vviinn-basket-button-text - Text of Add to Basket button.
|
|
100
|
+
* @slot vviinn-basket-button-icon - Text of Add to Basket icon.
|
|
101
|
+
* @slot vviinn-basket-button-text-pressed - Text of pressed Add to Basket button.
|
|
102
|
+
* @slot vviinn-basket-button-icon-pressed - Icon of pressed Add to Basket button.
|
|
103
|
+
* @slot vviinn-custom-label-0 - Custom label with index 0.
|
|
104
|
+
* @slot vviinn-custom-label-1 - Custom label with index 1.
|
|
105
|
+
* @slot vviinn-custom-label-2 - Custom label with index 2.
|
|
106
|
+
* @slot vviinn-custom-label-3 - Custom label with index 3.
|
|
107
|
+
* @slot vviinn-custom-label-4 - Custom label with index 4.
|
|
108
|
+
* @slot vviinn-image-placeholder-icon - Icon or content for the image placeholder.
|
|
109
|
+
*/
|
|
35
110
|
export class VviinnResults {
|
|
36
111
|
constructor() {
|
|
37
112
|
/** Campaign ID used for Text Search */
|
|
@@ -432,13 +507,13 @@ export class VviinnResults {
|
|
|
432
507
|
render() {
|
|
433
508
|
var _a;
|
|
434
509
|
const resultsLength = this.getResults().length;
|
|
435
|
-
return (h(Host, { key: '
|
|
510
|
+
return (h(Host, { key: 'd62957bb1294f3a62e14fa9a3eb97c7ef6007eae', id: "results-block", class: {
|
|
436
511
|
"show-in-widget": this.showInWidget,
|
|
437
512
|
"matching-discovery": this.oneClickDiscoveryMode === "append-slider",
|
|
438
|
-
}, exportparts: `${productCardParts}, ${listCardParts}, ${contentCardParts}, ${productCardsGridPart}` }, renderExternalCSS(this.cssUrl), h("div", { key: '
|
|
513
|
+
}, exportparts: `${productCardParts}, ${listCardParts}, ${contentCardParts}, ${productCardsGridPart}` }, renderExternalCSS(this.cssUrl), h("div", { key: '69f7a38dc02f42c357dbae8cf154ecb78380f270', class: "nothing-found" }, this.getCurrentErrorType() && (h("vviinn-error", { key: 'd78ed9f6d777d7ec1686b10b709deee018c4391e', errorType: this.getCurrentErrorType(), handler: this.resetWidgetState, hasBackground: this.showInWidget, searchType: this.state.searchType }))), h("div", { key: 'be3db62dcfd508b6f60036454d3c825d6c27f5ae', class: {
|
|
439
514
|
hidden: this.showAspectRatioError || resultsLength === 0,
|
|
440
515
|
products: true,
|
|
441
|
-
}, part: productCardsGridPart, id: "vviinn-results-products" }, resultsLength > 0 && this.renderResults(), h("div", { key: '
|
|
516
|
+
}, part: productCardsGridPart, id: "vviinn-results-products" }, resultsLength > 0 && this.renderResults(), h("div", { key: '88d3d2d5880806b9e24799694cc540de676d17f8', id: "one-click-discovery-append", style: {
|
|
442
517
|
order: ((_a = this.oneClickDiscoveryAppendIndex) !== null && _a !== void 0 ? _a : resultsLength).toString(),
|
|
443
518
|
} }))));
|
|
444
519
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h } from './index-B89nCb_F.js';
|
|
2
|
-
import { h as addIfNotEmpty, p as parseStringToExcluded, n as isValueMatch, o as isIntervalMatch, q as valueToString, r as extractFilterValue } from './search.store-
|
|
2
|
+
import { h as addIfNotEmpty, p as parseStringToExcluded, n as isValueMatch, o as isIntervalMatch, q as valueToString, r as extractFilterValue } from './search.store-lTerE9Yh.js';
|
|
3
3
|
import { i as instance } from './store-BJxQCbNV.js';
|
|
4
4
|
|
|
5
5
|
const PlusIcon = () => (h("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", class: "plus-icon", "aria-hidden": "true" },
|
|
@@ -8596,7 +8596,7 @@ const encodeToBase64UTF8 = (str) => {
|
|
|
8596
8596
|
return btoa(String.fromCharCode.apply(null, utf8Array));
|
|
8597
8597
|
};
|
|
8598
8598
|
|
|
8599
|
-
const version = "2.
|
|
8599
|
+
const version = "2.223.0";
|
|
8600
8600
|
|
|
8601
8601
|
const appStateGlobalDefaults = {
|
|
8602
8602
|
excluded: null,
|
|
@@ -8893,4 +8893,4 @@ const makeAutoSuggestRequest = async (store, query, token, apiPath, onCompletion
|
|
|
8893
8893
|
}), mapLeft((error) => error))();
|
|
8894
8894
|
};
|
|
8895
8895
|
|
|
8896
|
-
export {
|
|
8896
|
+
export { makeProductListingPageRequest as A, checkDeviceType as B, isMobile as C, fromString as D, fold as E, _ArrayExports as _, makeVisualSearchByUrlRequest as a, imageFromFileTask as b, makeUploadFileRequest as c, setTextSearchQuery as d, makeAutoSuggestRequest as e, campaignTypeNames as f, getAcceptableFileFormats as g, addIfNotEmpty as h, isDesktop as i, makeTextSearchRequest as j, getAcceptableFileFormatsForDisplay as k, searchState as l, makeVisualSearchRequest as m, isValueMatch as n, isIntervalMatch as o, parseStringToExcluded as p, valueToString as q, extractFilterValue as r, shopTheLookState as s, toFile as t, useSearchStore as u, version as v, extractSelectedFilters as w, getImageSizes as x, checkImageType as y, resetStore as z };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h, r as registerInstance, H as Host, c as createEvent, g as getElement, F as Fragment } from './index-B89nCb_F.js';
|
|
2
2
|
import { i as instance } from './store-BJxQCbNV.js';
|
|
3
|
-
import { k as getAcceptableFileFormatsForDisplay, f as campaignTypeNames, h as addIfNotEmpty, l as searchState, u as useSearchStore, v as version } from './search.store-
|
|
3
|
+
import { k as getAcceptableFileFormatsForDisplay, f as campaignTypeNames, h as addIfNotEmpty, l as searchState, u as useSearchStore, v as version } from './search.store-lTerE9Yh.js';
|
|
4
4
|
import { s as slotChangeListener, a as addEventListenersWithSignal } from './index-C1-PYhS4.js';
|
|
5
5
|
import { S as SecondaryActionIcon } from './SecondaryActionIcon-D4f3aMUD.js';
|
|
6
6
|
import { m as modalParts, c as carouselParts, p as productCardParts, r as recommendationsParts, i as initializeLocale } from './index-BCrstDkj.js';
|