vviinn-widgets 2.44.0 → 2.44.2
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/loader.cjs.js +1 -1
- package/dist/cjs/{package-9e48dffa.js → package-5912f89d.js} +1 -1
- package/dist/cjs/{search-filters_15.cjs.entry.js → search-filters_16.cjs.entry.js} +56 -14
- package/dist/cjs/vviinn-carousel_4.cjs.entry.js +1 -1
- package/dist/cjs/vviinn-vpr-button.cjs.entry.js +1 -1
- package/dist/cjs/vviinn-vps-button.cjs.entry.js +1 -1
- package/dist/cjs/vviinn-vps-widget.cjs.entry.js +25 -5
- package/dist/cjs/vviinn-widgets.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/image-search/search-filters/search-filters.css +8 -3
- package/dist/collection/components/vviinn-error/vviinn-wrong-aspect-ratio/vviinn-wrong-aspect-ratio.js +36 -0
- package/dist/collection/components/vviinn-example-image/vviinn-example-image.js +10 -3
- package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.css +1 -0
- package/dist/collection/components/vviinn-image-view/vviinn-image-view.css +66 -24
- package/dist/collection/components/vviinn-image-view/vviinn-image-view.js +66 -9
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.css +17 -11
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +17 -4
- package/dist/collection/locale/resources-vps.js +8 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{package-fb112b84.js → package-b2424850.js} +1 -1
- package/dist/esm/{search-filters_15.entry.js → search-filters_16.entry.js} +56 -15
- package/dist/esm/vviinn-carousel_4.entry.js +1 -1
- package/dist/esm/vviinn-vpr-button.entry.js +1 -1
- package/dist/esm/vviinn-vps-button.entry.js +1 -1
- package/dist/esm/vviinn-vps-widget.entry.js +25 -5
- package/dist/esm/vviinn-widgets.js +1 -1
- package/dist/types/components/vviinn-error/vviinn-wrong-aspect-ratio/vviinn-wrong-aspect-ratio.d.ts +4 -0
- package/dist/types/components/vviinn-image-view/vviinn-image-view.d.ts +3 -0
- package/dist/types/components/vviinn-vps-widget/vviinn-vps-widget.d.ts +2 -0
- package/dist/types/components.d.ts +19 -0
- package/dist/vviinn-widgets/p-044c5f45.entry.js +1 -0
- package/dist/vviinn-widgets/p-726774f9.js +1 -0
- package/dist/vviinn-widgets/{p-0d37441f.entry.js → p-a7cc44b3.entry.js} +1 -1
- package/dist/vviinn-widgets/{p-32938807.entry.js → p-b1e9dd46.entry.js} +1 -1
- package/dist/vviinn-widgets/{p-da0b001f.entry.js → p-ecd1c141.entry.js} +2 -2
- package/dist/vviinn-widgets/{p-40e2fb73.entry.js → p-ed082ecf.entry.js} +1 -1
- package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
- package/package.json +1 -1
- package/www/build/p-044c5f45.entry.js +1 -0
- package/www/build/p-726774f9.js +1 -0
- package/www/build/{p-0d37441f.entry.js → p-a7cc44b3.entry.js} +1 -1
- package/www/build/{p-32938807.entry.js → p-b1e9dd46.entry.js} +1 -1
- package/www/build/{p-da0b001f.entry.js → p-ecd1c141.entry.js} +2 -2
- package/www/build/{p-40e2fb73.entry.js → p-ed082ecf.entry.js} +1 -1
- package/www/build/vviinn-widgets.esm.js +1 -1
- package/dist/vviinn-widgets/p-8b0f06e7.js +0 -1
- package/dist/vviinn-widgets/p-8c681088.entry.js +0 -1
- package/www/build/p-8b0f06e7.js +0 -1
- package/www/build/p-8c681088.entry.js +0 -1
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["vviinn-button.cjs",[[1,"vviinn-button",{"addStyle":[4,"add-style"]}]]],["vviinn-preloader.cjs",[[1,"vviinn-preloader"]]],["vviinn-error.cjs",[[1,"vviinn-error"]]],["vviinn-carousel_4.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],"campaigns":[1],"color":[1],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"showScroll":[4,"show-scroll"],"cssUrl":[1,"css-url"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"addToBasketShow":[4,"add-to-basket-show"],"updateButtonLocation":[1,"update-button-location"],"apiPath":[1,"api-path"],"useCarousel":[4,"use-carousel"],"showingInButton":[4,"showing-in-button"],"buttonElementId":[1,"button-element-id"],"closed":[4],"opened":[4],"recommendations":[32],"trackingDeactivated":[32],"hasErrorOnLoad":[32],"updatingAllCards":[32]},[[0,"vviinnProductLoad","trackProductLoad"],[0,"vviinnProductView","trackProductView"],[0,"vviinnProductClick","trackProductClick"],[0,"vviinnAuxClick","trackAuxClick"],[0,"vviinnAddToBasket","trackAddToBasket"],[0,"vviinnUpdatingAllCardsFinished","updatingAllCardsFinishedListener"]]],[0,"vviinn-carousel",{"mode":[1],"imageWidth":[2,"image-width"],"showScroll":[4,"show-scroll"],"campaignTypeId":[1,"campaign-type-id"],"widgetElementId":[1,"widget-element-id"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"recommendations":[16],"widgetVersion":[1,"widget-version"],"addToBasketShow":[4,"add-to-basket-show"],"updatingAllCards":[4,"updating-all-cards"],"updateButtonLocation":[1,"update-button-location"],"moveDirection":[32],"contentGroups":[32],"activeContentGroup":[32],"isRTL":[32],"crossSellingRecommendations":[32]},[[0,"vviinnCrossSellingClick","crossSellingClickListener"]]],[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"],"mode":[1],"addToBasketShow":[4,"add-to-basket-show"],"updateButtonLocation":[1,"update-button-location"],"campaignTypeId":[1,"campaign-type-id"],"widgetElementId":[1,"widget-element-id"],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"index":[2],"updatingAllCards":[4,"updating-all-cards"],"defaultAnimationInterval":[2,"default-animation-interval"],"imageLoaded":[32],"isTransitioning":[32]},[[0,"vviinnCrossSellingClick","crossSellingClickListener"]]],[1,"vviinn-skeleton",{"height":[2],"halfWidth":[4,"half-width"]}]]],["search-
|
|
17
|
+
return index.bootstrapLazy([["vviinn-button.cjs",[[1,"vviinn-button",{"addStyle":[4,"add-style"]}]]],["vviinn-preloader.cjs",[[1,"vviinn-preloader"]]],["vviinn-error.cjs",[[1,"vviinn-error"]]],["vviinn-carousel_4.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],"campaigns":[1],"color":[1],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"showScroll":[4,"show-scroll"],"cssUrl":[1,"css-url"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"addToBasketShow":[4,"add-to-basket-show"],"updateButtonLocation":[1,"update-button-location"],"apiPath":[1,"api-path"],"useCarousel":[4,"use-carousel"],"showingInButton":[4,"showing-in-button"],"buttonElementId":[1,"button-element-id"],"closed":[4],"opened":[4],"recommendations":[32],"trackingDeactivated":[32],"hasErrorOnLoad":[32],"updatingAllCards":[32]},[[0,"vviinnProductLoad","trackProductLoad"],[0,"vviinnProductView","trackProductView"],[0,"vviinnProductClick","trackProductClick"],[0,"vviinnAuxClick","trackAuxClick"],[0,"vviinnAddToBasket","trackAddToBasket"],[0,"vviinnUpdatingAllCardsFinished","updatingAllCardsFinishedListener"]]],[0,"vviinn-carousel",{"mode":[1],"imageWidth":[2,"image-width"],"showScroll":[4,"show-scroll"],"campaignTypeId":[1,"campaign-type-id"],"widgetElementId":[1,"widget-element-id"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"recommendations":[16],"widgetVersion":[1,"widget-version"],"addToBasketShow":[4,"add-to-basket-show"],"updatingAllCards":[4,"updating-all-cards"],"updateButtonLocation":[1,"update-button-location"],"moveDirection":[32],"contentGroups":[32],"activeContentGroup":[32],"isRTL":[32],"crossSellingRecommendations":[32]},[[0,"vviinnCrossSellingClick","crossSellingClickListener"]]],[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"],"mode":[1],"addToBasketShow":[4,"add-to-basket-show"],"updateButtonLocation":[1,"update-button-location"],"campaignTypeId":[1,"campaign-type-id"],"widgetElementId":[1,"widget-element-id"],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"index":[2],"updatingAllCards":[4,"updating-all-cards"],"defaultAnimationInterval":[2,"default-animation-interval"],"imageLoaded":[32],"isTransitioning":[32]},[[0,"vviinnCrossSellingClick","crossSellingClickListener"]]],[1,"vviinn-skeleton",{"height":[2],"halfWidth":[4,"half-width"]}]]],["search-filters_16.cjs",[[1,"vviinn-image-view",{"basicEventData":[16],"setShowAspectRatioError":[16],"showAspectRatioError":[4,"show-aspect-ratio-error"],"cropper":[32],"hidePreloader":[32]},[[0,"vviinnSelectObject","selectDetectedObject"]]],[1,"vviinn-overlayed-modal",{"active":[4],"resetState":[16],"buttonElementId":[1,"button-element-id"],"hideBackButton":[4,"hide-back-button"],"widgetVersion":[1,"widget-version"],"isFirstScreen":[4,"is-first-screen"]}],[1,"vviinn-empty-results",{"handler":[16]}],[1,"vviinn-image-selector",{"basicEventData":[16],"startUpload":[4,"start-upload"],"loading":[4],"accept":[1],"resetVpsButton":[16],"capture":[1]}],[1,"vviinn-server-error",{"handler":[16]}],[1,"vviinn-wrong-aspect-ratio",{"handler":[16]}],[1,"vviinn-wrong-format",{"handler":[16]}],[1,"search-filters",{"filter":[16],"basicEventData":[16],"selectedFilter":[32],"hideFilters":[32]}],[1,"vviinn-example-image",{"exampleImageSource":[1,"example-image-source"],"width":[2],"height":[2],"basicEventData":[16],"srcObject":[16],"cameraButtonClicked":[4,"camera-button-clicked"],"selected":[32],"videoInitialized":[32],"zoomCapabilities":[32]}],[1,"vviinn-privacy-badge",{"privacyBadgeText":[1,"privacy-badge-text"]}],[1,"vviinn-slide"],[1,"vviinn-slider",{"showBullets":[4,"show-bullets"],"position":[514],"showArrows":[4,"show-arrows"],"elementsCount":[32],"internalPosition":[32],"swipeStartPosition":[32],"isRTL":[32]}],[1,"vviinn-teaser"],[1,"vviinn-detected-object",{"detectedObject":[16],"basicEventData":[16],"position":[32]}],[1,"vviinn-modal",{"active":[1540],"resetState":[16],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"hideBackButton":[4,"hide-back-button"],"isFirstScreen":[4,"is-first-screen"],"slider":[32]}],[1,"vviinn-overlay"]]],["vviinn-vps-widget.cjs",[[1,"vviinn-vps-widget",{"token":[1],"active":[1028],"currencySign":[1,"currency-sign"],"locale":[1],"campaignId":[1,"campaign-id"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"imageResolutionWidth":[2,"image-resolution-width"],"exampleImageSource":[1,"example-image-source"],"apiPath":[1,"api-path"],"showingInButton":[4,"showing-in-button"],"buttonElementId":[1,"button-element-id"],"buttonPressed":[4,"button-pressed"],"mode":[1],"resetVpsButton":[16],"slidePosition":[32],"width":[32],"wrongImageFormat":[32],"trackingDeactivated":[32],"stream":[32],"cameraEnabled":[32],"cameraButtonClicked":[32],"uploadSource":[32],"showAspectRatioError":[32]},[[0,"vviinnCameraEnabled","trackCameraEnabled"],[0,"vviinnProductLoad","trackProductLoad"],[0,"vviinnProductView","trackProductView"],[0,"vviinnProductClick","trackProductClick"],[0,"vviinnAuxClick","trackAuxClick"],[0,"vviinnImageCrop","trachSearchAreaChanges"],[0,"vviinnSelectObject","trackDetectedObject"],[0,"vviinnSelectFilter","trackFilter"]]]]],["vviinn-vps-button.cjs",[[1,"vviinn-vps-button",{"token":[1],"currencySign":[1,"currency-sign"],"locale":[1],"campaignId":[1,"campaign-id"],"addStyle":[4,"add-style"],"mode":[1],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"imageResolutionWidth":[2,"image-resolution-width"],"exampleImageSource":[1,"example-image-source"],"apiPath":[1,"api-path"],"buttonPressed":[32]},[[0,"vviinnWidgetClose","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"],"mode":[1],"campaigns":[1],"campaignType":[1,"campaign-type"],"color":[1],"locale":[1],"imageWidth":[2,"image-width"],"currencySign":[1,"currency-sign"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"addToBasketShow":[4,"add-to-basket-show"],"buttonChildren":[16],"apiPath":[1,"api-path"],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"showingInButton":[4,"showing-in-button"],"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"],"campaigns":[1],"campaignType":[1,"campaign-type"],"locale":[1],"color":[1],"addStyle":[4,"add-style"],"mode":[1],"imageWidth":[2,"image-width"],"currencySign":[1,"currency-sign"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"addToBasketShow":[4,"add-to-basket-show"],"apiPath":[1,"api-path"]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -48,7 +48,7 @@ const parseFilters = (filter, filterType) => {
|
|
|
48
48
|
return result[filterType];
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
-
const searchFiltersCss = ".filters{display:flex;flex-direction:row;overflow-x:auto;padding
|
|
51
|
+
const searchFiltersCss = ".filters{display:flex;flex-direction:row;overflow-x:auto;padding:0 12px 12px 24px}.filter{align-items:center;color:#525252;cursor:pointer;display:flex;margin-right:12px;height:-moz-max-content;height:max-content;min-width:-moz-max-content;min-width:max-content;transition-property:background;transition-duration:0.5s;transition-timing-function:ease-in-out;-webkit-user-select:none;-moz-user-select:none;user-select:none;padding:10px 12px}.show-more{display:flex}.show-more.hidden{display:none !important}.show-more::after{position:relative;content:url(\"data:image/svg+xml,%3Csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 12.2l-6-6L3.2 5 8 9.8 12.8 5 14 6.2l-6 6z' fill='%23525252'/%3E%3C/svg%3E\");display:block;transform:rotate(-90deg);left:2px}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}@media (max-width: 768px){.filters{padding-right:54px;padding-bottom:0}}@media (max-width: 640px){.no-scrollbar-mobile{-ms-overflow-style:none;scrollbar-width:none}.no-scrollbar-mobile::-webkit-scrollbar{display:none}}";
|
|
52
52
|
|
|
53
53
|
const FILTERS_COUNT = 5;
|
|
54
54
|
const SearchFilters = class {
|
|
@@ -140,7 +140,7 @@ const SearchFilters = class {
|
|
|
140
140
|
};
|
|
141
141
|
SearchFilters.style = searchFiltersCss;
|
|
142
142
|
|
|
143
|
-
const vviinnDetectedObjectCss = ":host{--color-primary-system:#0F62FE;--color-primary-hover-system:#014CDA;--color-icons-system:#2F8EDF;--spacer:8px}:host{display:block;position:absolute;left:calc(var(--x-position));top:calc(var(--y-position))}:host::before,:host::after{content:\"\";cursor:pointer;position:absolute;height:var(--size);width:var(--size);left:calc(-1 * var(--size) / 2);top:calc(-1 * var(--size) / 2)}:host::before{--size:36px;border-radius:50%;z-index:0;background:rgba(0, 0, 0, 0.16);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);transition:transform 0.07s ease-in-out}:host::after{--size:13px;border-radius:50%;z-index:1;background:white;box-shadow:0px 2px 2px 0px rgba(0, 0, 0, 0.15);transition:transform 0.07s ease-in-out}:host(.active)::before{transform:scale(0.88);background:rgba(0, 0, 0, 0.4)}:host(.active)::after{transform:scale(0.67)}@media (min-width: 768px){:host(:not(.active):hover)::before{transform:scale(1.08);background:rgba(0, 0, 0, 0.32)}}";
|
|
143
|
+
const vviinnDetectedObjectCss = ":host{--color-primary-system:#0F62FE;--color-primary-hover-system:#014CDA;--color-icons-system:#2F8EDF;--spacer:8px}:host{display:block;position:absolute;left:calc(var(--x-position));top:calc(var(--y-position));z-index:2}:host::before,:host::after{content:\"\";cursor:pointer;position:absolute;height:var(--size);width:var(--size);left:calc(-1 * var(--size) / 2);top:calc(-1 * var(--size) / 2)}:host::before{--size:36px;border-radius:50%;z-index:0;background:rgba(0, 0, 0, 0.16);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);transition:transform 0.07s ease-in-out}:host::after{--size:13px;border-radius:50%;z-index:1;background:white;box-shadow:0px 2px 2px 0px rgba(0, 0, 0, 0.15);transition:transform 0.07s ease-in-out}:host(.active)::before{transform:scale(0.88);background:rgba(0, 0, 0, 0.4)}:host(.active)::after{transform:scale(0.67)}@media (min-width: 768px){:host(:not(.active):hover)::before{transform:scale(1.08);background:rgba(0, 0, 0, 0.32)}}";
|
|
144
144
|
|
|
145
145
|
const VviinnDetectedObject = class {
|
|
146
146
|
constructor(hostRef) {
|
|
@@ -223,11 +223,18 @@ const VviinnExampleImage = class {
|
|
|
223
223
|
var _a;
|
|
224
224
|
if (!this.videoTrack || !this.zoomCapabilities)
|
|
225
225
|
return;
|
|
226
|
+
const { max, min } = this.zoomCapabilities;
|
|
226
227
|
const currentSettings = this.videoTrack.getSettings();
|
|
227
|
-
const currentZoom = (_a = currentSettings.zoom) !== null && _a !== void 0 ? _a :
|
|
228
|
-
const step = (
|
|
228
|
+
const currentZoom = (_a = currentSettings.zoom) !== null && _a !== void 0 ? _a : min;
|
|
229
|
+
const step = (max - min) / 3;
|
|
230
|
+
const roundedStep = Math.round(step * 10) / 10;
|
|
229
231
|
let newZoom;
|
|
230
|
-
newZoom =
|
|
232
|
+
newZoom =
|
|
233
|
+
action === "in" ? currentZoom + roundedStep : currentZoom - roundedStep;
|
|
234
|
+
if (newZoom < min)
|
|
235
|
+
newZoom = min;
|
|
236
|
+
if (newZoom > max)
|
|
237
|
+
newZoom = max;
|
|
231
238
|
await this.videoTrack.applyConstraints({
|
|
232
239
|
advanced: [{ zoom: newZoom }],
|
|
233
240
|
});
|
|
@@ -3621,15 +3628,20 @@ var cropper = imageSearch_store.createCommonjsModule(function (module, exports)
|
|
|
3621
3628
|
}));
|
|
3622
3629
|
});
|
|
3623
3630
|
|
|
3624
|
-
const vviinnImageViewCss = ":host {\n display:
|
|
3631
|
+
const vviinnImageViewCss = ":host {\n min-height: 160px;\n display: flex;\n justify-content: center;\n background-color: rgba(0, 0, 0, 0.32);\n}\n\n:host(.bordered) {\n background-color: transparent;\n border: 1px solid #eaeaea;\n margin-top: 40px;\n}\n\n@media (max-width: 768px) {\n :host {\n min-height: unset;\n }\n\n :host(.bordered) {\n border: none;\n margin-top: 48px;\n }\n}\n\n.container {\n max-width: 100%;\n height: 100%;\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n\n.image-container {\n display: flex;\n flex-direction: column;\n align-items: center;\n position: relative;\n}\n\n.image-container > img {\n display: block;\n max-width: 100%;\n}\n\n.image-preloader {\n background: rgba(0, 0, 0, 0.25);\n border-radius: 4px;\n bottom: 18px;\n right: 18px;\n padding: 4px;\n pointer-events: none;\n color: white;\n position: absolute;\n z-index: 4;\n}\n\nvviinn-preloader {\n --preloader-size: 12px;\n}\n\n.cropper-container {\n direction: ltr;\n font-size: 0;\n line-height: 0;\n position: relative;\n touch-action: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n\n & img {\n backface-visibility: hidden;\n display: block;\n height: 100%;\n image-orientation: 0deg;\n max-height: none !important;\n max-width: none !important;\n min-height: 0 !important;\n min-width: 0 !important;\n width: 100%;\n }\n}\n\n.cropper-wrap-box,\n.cropper-canvas,\n.cropper-drag-box,\n.cropper-crop-box,\n.cropper-modal {\n bottom: 0;\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.cropper-wrap-box,\n.cropper-canvas {\n overflow: hidden;\n}\n\n.cropper-drag-box {\n background-color: #fff;\n opacity: 0;\n}\n\n.cropper-modal {\n background-color: #000;\n opacity: 0.4;\n}\n\n.cropper-view-box {\n display: block;\n height: 100%;\n overflow: hidden;\n width: 100%;\n}\n\n.cropper-view-box,\n.cropper-face {\n border-radius: 5px;\n}\n\n.cropper-face,\n.cropper-point {\n display: block;\n height: 100%;\n opacity: 0.1;\n position: absolute;\n width: 100%;\n}\n\n.cropper-face {\n left: 0;\n top: 0;\n}\n\n.cropper-point {\n --cropper-point-width: 44px;\n height: var(--cropper-point-width);\n width: var(--cropper-point-width);\n opacity: 1;\n}\n\n.point-e,\n.point-s,\n.point-w,\n.point-n {\n display: none;\n}\n\n.point-ne,\n.point-nw,\n.point-sw,\n.point-se {\n --delta: -9px;\n}\n\n.point-ne {\n cursor: nesw-resize;\n right: var(--delta);\n top: var(--delta);\n}\n\n.point-nw {\n cursor: nwse-resize;\n left: var(--delta);\n top: var(--delta);\n}\n\n.point-sw {\n cursor: nesw-resize;\n bottom: var(--delta);\n left: var(--delta);\n}\n\n.point-se {\n cursor: nwse-resize;\n bottom: var(--delta);\n right: var(--delta);\n}\n\n.cropper-point::before {\n position: absolute;\n content: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='38' height='38' viewBox='0 0 38 38' fill='none'%3E%3Cpath d='M3 35H23C29.6274 35 35 29.6274 35 23V3' stroke='white' stroke-width='6' stroke-linecap='square'/%3E%3C/svg%3E\");\n display: block;\n pointer-events: none;\n}\n\n.point-ne::before {\n transform: rotate(-90deg);\n left: 0px;\n top: 6px;\n}\n\n.point-nw::before {\n transform: rotate(180deg);\n left: 6px;\n top: 6px;\n}\n\n.point-sw::before {\n transform: rotate(90deg);\n left: 6px;\n top: 0px;\n}\n\n.point-se::before {\n left: 0px;\n top: 0px;\n}\n\n.cropper-invisible {\n opacity: 0;\n}\n\n.cropper-hide {\n display: block;\n height: 0;\n position: absolute;\n width: 0;\n}\n\n.cropper-hidden {\n display: none !important;\n}\n\n.cropper-move {\n cursor: move;\n}\n\n.cropper-crop {\n cursor: crosshair;\n}\n\n.cropper-disabled .cropper-drag-box,\n.cropper-disabled .cropper-face,\n.cropper-disabled .cropper-line,\n.cropper-disabled .cropper-point {\n cursor: not-allowed;\n}\n";
|
|
3625
3632
|
|
|
3626
|
-
const INITIAL_CROP_AREA = 0.
|
|
3633
|
+
const INITIAL_CROP_AREA = 0.9;
|
|
3627
3634
|
const INITIAL_CROP_AREA_OFFSET = 1 - INITIAL_CROP_AREA;
|
|
3628
3635
|
const MIN_SEARCH_AREA_SIZE = 82;
|
|
3636
|
+
const MIN_IMAGE_SIDE_FOR_CROPPER = 90;
|
|
3637
|
+
const SUPPORTED_ASPECT_RATIO = 0.1;
|
|
3638
|
+
const DEFAULT_IMAGE_SIZE = 288;
|
|
3629
3639
|
const cropperOptions = {
|
|
3630
3640
|
autoCropArea: INITIAL_CROP_AREA,
|
|
3631
3641
|
minCropBoxHeight: MIN_SEARCH_AREA_SIZE,
|
|
3632
3642
|
minCropBoxWidth: MIN_SEARCH_AREA_SIZE,
|
|
3643
|
+
minContainerWidth: MIN_IMAGE_SIDE_FOR_CROPPER,
|
|
3644
|
+
minContainerHeight: MIN_IMAGE_SIDE_FOR_CROPPER,
|
|
3633
3645
|
movable: false,
|
|
3634
3646
|
zoomable: false,
|
|
3635
3647
|
rotatable: false,
|
|
@@ -3637,10 +3649,11 @@ const cropperOptions = {
|
|
|
3637
3649
|
zoomOnTouch: false,
|
|
3638
3650
|
zoomOnWheel: false,
|
|
3639
3651
|
toggleDragModeOnDblclick: false,
|
|
3652
|
+
viewMode: 1,
|
|
3640
3653
|
};
|
|
3641
3654
|
const getImageSizes = (i) => {
|
|
3642
3655
|
const dimensions = imageSearch_store.dimensionsFromImage(i);
|
|
3643
|
-
const resize = imageSearch_store.scaleByLargestSide(
|
|
3656
|
+
const resize = imageSearch_store.scaleByLargestSide(DEFAULT_IMAGE_SIZE);
|
|
3644
3657
|
const newDimensions = resize(dimensions);
|
|
3645
3658
|
const sizes = newDimensions.map((d) => d.size);
|
|
3646
3659
|
return [sizes[0], sizes[1]];
|
|
@@ -3677,10 +3690,14 @@ const VviinnImageView = class {
|
|
|
3677
3690
|
this.vviinnImageCrop.emit(this.basicEventData);
|
|
3678
3691
|
};
|
|
3679
3692
|
this.basicEventData = undefined;
|
|
3693
|
+
this.setShowAspectRatioError = undefined;
|
|
3694
|
+
this.showAspectRatioError = undefined;
|
|
3680
3695
|
this.cropper = null;
|
|
3696
|
+
this.hidePreloader = false;
|
|
3681
3697
|
}
|
|
3682
3698
|
disconnectedCallback() {
|
|
3683
|
-
this.cropper
|
|
3699
|
+
if (this.cropper)
|
|
3700
|
+
this.cropper.destroy();
|
|
3684
3701
|
}
|
|
3685
3702
|
selectDetectedObject({ detail }) {
|
|
3686
3703
|
const { top, left, width, height } = detail.detectedObject.value.rectangle;
|
|
@@ -3711,15 +3728,27 @@ const VviinnImageView = class {
|
|
|
3711
3728
|
this.cropper.destroy();
|
|
3712
3729
|
}
|
|
3713
3730
|
const imageBounds = imageSearch_store.fromImage(imageElement);
|
|
3714
|
-
const { x, y } = imageBounds;
|
|
3731
|
+
const { x, y, width, height } = imageBounds;
|
|
3715
3732
|
const searchArea = {
|
|
3716
3733
|
x,
|
|
3717
3734
|
y,
|
|
3718
|
-
width:
|
|
3719
|
-
height:
|
|
3735
|
+
width: width - width * INITIAL_CROP_AREA_OFFSET,
|
|
3736
|
+
height: height - height * INITIAL_CROP_AREA_OFFSET,
|
|
3720
3737
|
};
|
|
3721
3738
|
imageSearch_store.imageSearchState.imageBounds = imageSearch_store.Option.some(imageBounds);
|
|
3722
3739
|
imageSearch_store.imageSearchState.searchArea = imageSearch_store.Option.some(searchArea);
|
|
3740
|
+
if (width / height < SUPPORTED_ASPECT_RATIO ||
|
|
3741
|
+
height / width < SUPPORTED_ASPECT_RATIO) {
|
|
3742
|
+
this.setShowAspectRatioError(true);
|
|
3743
|
+
this.el.classList.add("bordered");
|
|
3744
|
+
return;
|
|
3745
|
+
}
|
|
3746
|
+
if (width < MIN_IMAGE_SIDE_FOR_CROPPER ||
|
|
3747
|
+
height < MIN_IMAGE_SIDE_FOR_CROPPER) {
|
|
3748
|
+
this.el.classList.add("bordered");
|
|
3749
|
+
this.hidePreloader = true;
|
|
3750
|
+
return;
|
|
3751
|
+
}
|
|
3723
3752
|
this.cropper = new cropper(imageElement, Object.assign(Object.assign({}, cropperOptions), { cropend: this.cropEnd, data }));
|
|
3724
3753
|
}
|
|
3725
3754
|
}
|
|
@@ -3733,8 +3762,10 @@ const VviinnImageView = class {
|
|
|
3733
3762
|
}), imageSearch_store.Option.getOrElse(() => null));
|
|
3734
3763
|
}
|
|
3735
3764
|
render() {
|
|
3736
|
-
return (index.h(index.Host, null, index.h("div", { class: "image-container" }, imageSearch_store.imageSearchState.loading ||
|
|
3737
|
-
imageSearch_store.imageSearchState.objectDetectionInProgress
|
|
3765
|
+
return (index.h(index.Host, null, index.h("div", { class: "container" }, index.h("div", { class: "image-container" }, this.renderImage(), imageSearch_store.imageSearchState.detectedObjects.map((o) => this.renderDetectedObject(o))), (imageSearch_store.imageSearchState.loading ||
|
|
3766
|
+
imageSearch_store.imageSearchState.objectDetectionInProgress) &&
|
|
3767
|
+
!this.showAspectRatioError &&
|
|
3768
|
+
!this.hidePreloader ? (index.h("div", { class: "image-preloader" }, index.h("vviinn-preloader", null))) : null)));
|
|
3738
3769
|
}
|
|
3739
3770
|
get el() { return index.getElement(this); }
|
|
3740
3771
|
};
|
|
@@ -4003,6 +4034,16 @@ const VviinnTeaser = class {
|
|
|
4003
4034
|
};
|
|
4004
4035
|
VviinnTeaser.style = vviinnTeaserCss;
|
|
4005
4036
|
|
|
4037
|
+
const VviinnWrongAspectRatio = class {
|
|
4038
|
+
constructor(hostRef) {
|
|
4039
|
+
index.registerInstance(this, hostRef);
|
|
4040
|
+
this.handler = undefined;
|
|
4041
|
+
}
|
|
4042
|
+
render() {
|
|
4043
|
+
return (index.h(index.Host, null, index.h("vviinn-error", null, index.h(index$1.WarningIcon, null), index.h("h4", { slot: "title" }, i18next.instance.t("wrongAspectRatioBlock.title")), index.h("button", { slot: "action", onClick: this.handler }, i18next.instance.t("wrongAspectRatioBlock.button")))));
|
|
4044
|
+
}
|
|
4045
|
+
};
|
|
4046
|
+
|
|
4006
4047
|
const VviinnWrongFormat = class {
|
|
4007
4048
|
constructor(hostRef) {
|
|
4008
4049
|
index.registerInstance(this, hostRef);
|
|
@@ -4027,4 +4068,5 @@ exports.vviinn_server_error = VviinnServerError;
|
|
|
4027
4068
|
exports.vviinn_slide = VviinnSlide;
|
|
4028
4069
|
exports.vviinn_slider = VviinnSlider;
|
|
4029
4070
|
exports.vviinn_teaser = VviinnTeaser;
|
|
4071
|
+
exports.vviinn_wrong_aspect_ratio = VviinnWrongAspectRatio;
|
|
4030
4072
|
exports.vviinn_wrong_format = VviinnWrongFormat;
|
|
@@ -7,7 +7,7 @@ const imageSearch_store = require('./imageSearch.store-dc4e98b3.js');
|
|
|
7
7
|
const index$1 = require('./index-28052f80.js');
|
|
8
8
|
const i18next = require('./i18next-74ff3413.js');
|
|
9
9
|
const customizedSlots = require('./customized-slots-49c03dc1.js');
|
|
10
|
-
const _package = require('./package-
|
|
10
|
+
const _package = require('./package-5912f89d.js');
|
|
11
11
|
const index$2 = require('./index-7ff2ab5f.js');
|
|
12
12
|
|
|
13
13
|
const vviinnCarouselCss = ":host{--vviinn-progressbar-width:0;--vviinn-carousel-item-width:150px;--vviinn-carousel-columns-internal:var(--vviinn-carousel-columns, 4);--vviinn-carousel-image-width-system:140px}.body{display:flex;position:relative;width:var(--vviinn-carousel-content-width);flex-direction:column}.content-wrapper *{box-sizing:border-box}.content-wrapper{overflow-y:hidden;overflow-x:auto;flex-grow:1}.bullets{margin-top:16px;display:flex;flex-direction:row;grid-gap:24px;justify-content:center}.bullet{width:10px;height:10px;background:#e0e0e0;border-radius:50%;cursor:pointer}.bullet.active{background:#161616}.content:not(.show-scrollbar),.content.grid{scrollbar-color:#fff0 #fff0}.content:not(.show-scrollbar)::-webkit-scrollbar,.content.grid::-webkit-scrollbar{opacity:0}.content{display:flex;flex-direction:row;grid-gap:8px;overflow-y:hidden;overflow-x:auto;flex-grow:1;padding-bottom:16px}.content.left>*{scroll-snap-align:start}.content.right>*{scroll-snap-align:end}:host(.continuity) .prev,:host(.continuity) .next{border-radius:2px}:host(.grid) .prev,:host(.grid) .next{border-radius:50%}.prev,.next{align-items:center;background-color:white;border:none;box-shadow:0px 2px 6px rgba(0, 0, 0, 0.15);fill:#525252;cursor:pointer;display:grid;height:40px;justify-items:center;position:absolute;top:calc(50% - 20px);width:40px;z-index:1;padding:0;margin:0}.next:disabled,.prev:disabled{display:none}.prev svg{transform:rotate(180deg);margin-left:-5px}.prev{left:0}.next{right:0}.items-group{display:grid;grid-gap:16px;grid-template-columns:repeat(var(--vviinn-carousel-columns-internal), 1fr);min-width:100%}vviinn-product-card::part(price-container){text-align:center}:host(.classic) vviinn-product-card::part(title),:host(.classic) vviinn-product-card::part(brand),:host(.classic) vviinn-product-card::part(type){text-align:center}@media (max-width: 480px){:host(.modern) button{display:none}.items-group{grid-template-columns:repeat(2, 1fr)}}";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-5619b5ec.js');
|
|
6
|
-
const _package = require('./package-
|
|
6
|
+
const _package = require('./package-5912f89d.js');
|
|
7
7
|
const index$1 = require('./index-28052f80.js');
|
|
8
8
|
|
|
9
9
|
const vviinnVprButtonCss = ":host{display:block}";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-5619b5ec.js');
|
|
6
|
-
const _package = require('./package-
|
|
6
|
+
const _package = require('./package-5912f89d.js');
|
|
7
7
|
const index$1 = require('./index-28052f80.js');
|
|
8
8
|
const customizedSlots = require('./customized-slots-49c03dc1.js');
|
|
9
9
|
const constants = require('./constants-7684cbfc.js');
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-5619b5ec.js');
|
|
6
6
|
const imageSearch_store = require('./imageSearch.store-dc4e98b3.js');
|
|
7
7
|
const i18next = require('./i18next-74ff3413.js');
|
|
8
|
-
const _package = require('./package-
|
|
8
|
+
const _package = require('./package-5912f89d.js');
|
|
9
9
|
const customizedSlots = require('./customized-slots-49c03dc1.js');
|
|
10
10
|
const index$1 = require('./index-7ff2ab5f.js');
|
|
11
11
|
const index$2 = require('./index-28052f80.js');
|
|
@@ -34,6 +34,10 @@ const resources = {
|
|
|
34
34
|
text: "Bitte laden Sie eine .jpg, .png oder .webp Bilddatei hoch.",
|
|
35
35
|
button: "Neues Bild hochladen",
|
|
36
36
|
},
|
|
37
|
+
wrongAspectRatioBlock: {
|
|
38
|
+
title: "Das Bild ist zu schmal",
|
|
39
|
+
button: "Neues Bild hochladen",
|
|
40
|
+
},
|
|
37
41
|
},
|
|
38
42
|
},
|
|
39
43
|
en: {
|
|
@@ -58,6 +62,10 @@ const resources = {
|
|
|
58
62
|
text: "Please upload a .jpg, .png or .webp image file.",
|
|
59
63
|
button: "Upload another file",
|
|
60
64
|
},
|
|
65
|
+
wrongAspectRatioBlock: {
|
|
66
|
+
title: "The image is too narrow",
|
|
67
|
+
button: "Upload another image",
|
|
68
|
+
},
|
|
61
69
|
},
|
|
62
70
|
},
|
|
63
71
|
};
|
|
@@ -69,7 +77,7 @@ const videoStreamSettings = {
|
|
|
69
77
|
frameRate: { ideal: 30 },
|
|
70
78
|
};
|
|
71
79
|
|
|
72
|
-
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);height:640px}#start-page_block{box-sizing:border-box;display:flex;overflow-y:auto;flex-direction:column;justify-content:center;padding:42px 62px}#start-page_block.error{align-content:center}.start-page_main-content{flex-grow:1;display:flex;flex-direction:column;justify-content:center}.start-page_errors-block{display:flex;flex-direction:column;justify-content:center;gap:12px}.buttons-group{display:flex;flex-direction:column;gap:12px;margin:24px 0}.action-button{display:grid;border:none;cursor:pointer;align-items:center;border-radius:8px;font-size:16px;height:48px;justify-items:center;transition:background 0.1s ease-in-out;color:#525252;background-color:#f4f4f4}.action-button:hover{background-color:#eaeaea}.action-button:first-child{background:var(--color-primary, var(--color-primary-system));border-color:var(--color-primary, var(--color-primary-system));color:white}.action-button:first-child:hover{background:var(--color-primary-hover, var(--color-primary-hover-system));border-color:var(--color-primary-hover, var(--color-primary-hover-system))}.action-button:active{border-color:black}.action-button-content{display:grid;align-items:center;justify-items:start;justify-content:center;grid-template-columns:max-content auto;grid-gap:8px}.results-page{margin-top:
|
|
80
|
+
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);height:640px}#start-page_block{box-sizing:border-box;display:flex;overflow-y:auto;flex-direction:column;justify-content:center;padding:42px 62px}#start-page_block.error{align-content:center}.start-page_main-content{flex-grow:1;display:flex;flex-direction:column;justify-content:center}.start-page_errors-block{display:flex;flex-direction:column;justify-content:center;gap:12px}.buttons-group{display:flex;flex-direction:column;gap:12px;margin:24px 0}.action-button{display:grid;border:none;cursor:pointer;align-items:center;border-radius:8px;font-size:16px;height:48px;justify-items:center;transition:background 0.1s ease-in-out;color:#525252;background-color:#f4f4f4}.action-button:hover{background-color:#eaeaea}.action-button:first-child{background:var(--color-primary, var(--color-primary-system));border-color:var(--color-primary, var(--color-primary-system));color:white}.action-button:first-child:hover{background:var(--color-primary-hover, var(--color-primary-hover-system));border-color:var(--color-primary-hover, var(--color-primary-hover-system))}.action-button:active{border-color:black}.action-button-content{display:grid;align-items:center;justify-items:start;justify-content:center;grid-template-columns:max-content auto;grid-gap:8px}.results-page{margin-top:64px;display:grid;grid-template-columns:336px auto;box-sizing:border-box}.results-page>*{padding:24px;box-sizing:border-box}.products{width:100%;align-content:center;align-items:start;box-sizing:border-box;display:grid;grid-gap:32px 16px;grid-template-columns:repeat(auto-fill, minmax(130px, 1fr));justify-items:center;padding:24px;position:absolute}.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{display:grid;grid-template-rows:min-content 1fr;min-width:100%}.filters-wrapper{margin-top:24px;overflow-x:auto;transform:translateX(-24px);min-width:calc(100% + 48px)}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:8px;box-sizing:border-box;color:#161616;font-size:14px;font-weight:400;line-height:20px}search-filters::part(show-more-filters){display:flex;align-items:center;justify-content:center;cursor:pointer;border:1px solid #f4f4f4;min-width:40px;height:40px;border-radius:100px;box-sizing:border-box;color:#161616}search-filters::part(show-more-filters):hover{background:#eaeaea}search-filters::part(filter active){background:var(--color-primary, var(--color-primary-system));color:white}.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: 1080px){#start-page_block{padding:24px 36px}}@media (max-width: 768px){.start-page{display:flex;flex-direction:column;height:100%}vviinn-overlayed-modal.first-screen::part(secondary-action){visibility:visible}.start-page.active{height:calc(100vh - 64px);height:calc(100svh - 64px)}.start-page:not(.active){overflow:hidden}.results-page{margin-top:0}.results-page>*{box-sizing:border-box;padding:12px 24px 24px}.image-wrapper{padding:0}.filters-wrapper{padding-left:24px;min-width:calc(100% + 40px)}.results-page{grid-template-rows:min-content;grid-template-columns:unset}#start-page_block{overflow-y:unset;min-height:-moz-fit-content;min-height:fit-content;padding:24px 20px}.image{margin-bottom:8px}.image-wrapper{grid-template-rows:min-content auto;width:100%}.products-wrapper{align-content:start;position:static;overflow-y:unset;width:100%;padding-top:0;margin-top:24px}.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: 480px){.start-page{padding-top:0}.action-button-content{grid-gap:10px}}@media (max-width: 380px){.filters-wrapper{padding-left:24px}.products{grid-gap:24px 10px}}vviinn-wrong-format,vviinn-server-error{width:280px;align-self:center;justify-self:center}.visually-hidden{clip:rect(0 0 0 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}";
|
|
73
81
|
|
|
74
82
|
var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
75
83
|
var t = {};
|
|
@@ -189,6 +197,9 @@ const VviinnVpsWidget = class {
|
|
|
189
197
|
this.resetState();
|
|
190
198
|
}
|
|
191
199
|
};
|
|
200
|
+
this.setShowAspectRatioError = (isError) => {
|
|
201
|
+
this.showAspectRatioError = isError;
|
|
202
|
+
};
|
|
192
203
|
this.setTrackingDeactivated = (result) => {
|
|
193
204
|
if (result.status === "rejected") {
|
|
194
205
|
this.trackingDeactivated = true;
|
|
@@ -227,6 +238,7 @@ const VviinnVpsWidget = class {
|
|
|
227
238
|
this.cameraEnabled = false;
|
|
228
239
|
this.cameraButtonClicked = false;
|
|
229
240
|
this.uploadSource = undefined;
|
|
241
|
+
this.showAspectRatioError = false;
|
|
230
242
|
}
|
|
231
243
|
initResultEvents() {
|
|
232
244
|
this.resultLoaded = false;
|
|
@@ -473,6 +485,7 @@ const VviinnVpsWidget = class {
|
|
|
473
485
|
this.stream = null;
|
|
474
486
|
this.cameraEnabled = false;
|
|
475
487
|
this.cameraButtonClicked = false;
|
|
488
|
+
this.setShowAspectRatioError(false);
|
|
476
489
|
}
|
|
477
490
|
haveErrors() {
|
|
478
491
|
return this.wrongImageFormat || imageSearch_store.imageSearchState.serverError;
|
|
@@ -504,11 +517,18 @@ const VviinnVpsWidget = class {
|
|
|
504
517
|
} }, index.h("vviinn-wrong-format", { class: { hidden: !this.wrongImageFormat }, handler: () => this.resetState() }), index.h("vviinn-server-error", { class: { hidden: !imageSearch_store.imageSearchState.serverError }, handler: () => this.resetState() })), !this.haveErrors() && index.h("vviinn-teaser", null), !this.haveErrors() && (index.h("div", { class: "buttons-group" }, this.renderButtons()))), index.h("vviinn-privacy-badge", { privacyBadgeText: i18next.instance.t("privacyBadgeText"), class: { invisible: this.haveErrors() } }))), index.h("vviinn-slide", { class: {
|
|
505
518
|
"results-page": true,
|
|
506
519
|
active: this.isResultSlide(),
|
|
507
|
-
} }, index.h("div", { class: "image-wrapper" }, this.isResultSlide() && (index.h("vviinn-image-view", { basicEventData: this.getBasicEventData()
|
|
520
|
+
} }, index.h("div", { class: "image-wrapper" }, this.isResultSlide() && (index.h("vviinn-image-view", { basicEventData: this.getBasicEventData(), setShowAspectRatioError: this.setShowAspectRatioError, showAspectRatioError: this.showAspectRatioError })), index.h("div", { class: {
|
|
521
|
+
"filters-wrapper": true,
|
|
522
|
+
hidden: this.showAspectRatioError,
|
|
523
|
+
} }, index.h("div", { class: "filters" }, imageSearch_store.imageSearchState.filters.map((filter) => (index.h("search-filters", { filter: filter, basicEventData: this.getBasicEventData() })))))), index.h("div", { id: "results-block", class: "products-wrapper" }, index.h("div", { class: {
|
|
508
524
|
"nothing-found": true,
|
|
509
525
|
hidden: imageSearch_store.imageSearchState.results.length > 0,
|
|
510
|
-
} }, index.h("vviinn-empty-results", { handler: () => this.resetState() })
|
|
511
|
-
|
|
526
|
+
} }, index.h("vviinn-empty-results", { handler: () => this.resetState() })), index.h("div", { class: {
|
|
527
|
+
"nothing-found": true,
|
|
528
|
+
hidden: !this.showAspectRatioError,
|
|
529
|
+
} }, index.h("vviinn-wrong-aspect-ratio", { handler: () => this.resetState() })), index.h("div", { class: {
|
|
530
|
+
hidden: imageSearch_store.imageSearchState.results.length <= 0 ||
|
|
531
|
+
this.showAspectRatioError,
|
|
512
532
|
products: true,
|
|
513
533
|
} }, this.active && this.renderResults())))))));
|
|
514
534
|
}
|
|
@@ -20,7 +20,7 @@ const patchBrowser = () => {
|
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
patchBrowser().then(options => {
|
|
23
|
-
return index.bootstrapLazy([["vviinn-button.cjs",[[1,"vviinn-button",{"addStyle":[4,"add-style"]}]]],["vviinn-preloader.cjs",[[1,"vviinn-preloader"]]],["vviinn-error.cjs",[[1,"vviinn-error"]]],["vviinn-carousel_4.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],"campaigns":[1],"color":[1],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"showScroll":[4,"show-scroll"],"cssUrl":[1,"css-url"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"addToBasketShow":[4,"add-to-basket-show"],"updateButtonLocation":[1,"update-button-location"],"apiPath":[1,"api-path"],"useCarousel":[4,"use-carousel"],"showingInButton":[4,"showing-in-button"],"buttonElementId":[1,"button-element-id"],"closed":[4],"opened":[4],"recommendations":[32],"trackingDeactivated":[32],"hasErrorOnLoad":[32],"updatingAllCards":[32]},[[0,"vviinnProductLoad","trackProductLoad"],[0,"vviinnProductView","trackProductView"],[0,"vviinnProductClick","trackProductClick"],[0,"vviinnAuxClick","trackAuxClick"],[0,"vviinnAddToBasket","trackAddToBasket"],[0,"vviinnUpdatingAllCardsFinished","updatingAllCardsFinishedListener"]]],[0,"vviinn-carousel",{"mode":[1],"imageWidth":[2,"image-width"],"showScroll":[4,"show-scroll"],"campaignTypeId":[1,"campaign-type-id"],"widgetElementId":[1,"widget-element-id"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"recommendations":[16],"widgetVersion":[1,"widget-version"],"addToBasketShow":[4,"add-to-basket-show"],"updatingAllCards":[4,"updating-all-cards"],"updateButtonLocation":[1,"update-button-location"],"moveDirection":[32],"contentGroups":[32],"activeContentGroup":[32],"isRTL":[32],"crossSellingRecommendations":[32]},[[0,"vviinnCrossSellingClick","crossSellingClickListener"]]],[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"],"mode":[1],"addToBasketShow":[4,"add-to-basket-show"],"updateButtonLocation":[1,"update-button-location"],"campaignTypeId":[1,"campaign-type-id"],"widgetElementId":[1,"widget-element-id"],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"index":[2],"updatingAllCards":[4,"updating-all-cards"],"defaultAnimationInterval":[2,"default-animation-interval"],"imageLoaded":[32],"isTransitioning":[32]},[[0,"vviinnCrossSellingClick","crossSellingClickListener"]]],[1,"vviinn-skeleton",{"height":[2],"halfWidth":[4,"half-width"]}]]],["search-
|
|
23
|
+
return index.bootstrapLazy([["vviinn-button.cjs",[[1,"vviinn-button",{"addStyle":[4,"add-style"]}]]],["vviinn-preloader.cjs",[[1,"vviinn-preloader"]]],["vviinn-error.cjs",[[1,"vviinn-error"]]],["vviinn-carousel_4.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],"campaigns":[1],"color":[1],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"showScroll":[4,"show-scroll"],"cssUrl":[1,"css-url"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"addToBasketShow":[4,"add-to-basket-show"],"updateButtonLocation":[1,"update-button-location"],"apiPath":[1,"api-path"],"useCarousel":[4,"use-carousel"],"showingInButton":[4,"showing-in-button"],"buttonElementId":[1,"button-element-id"],"closed":[4],"opened":[4],"recommendations":[32],"trackingDeactivated":[32],"hasErrorOnLoad":[32],"updatingAllCards":[32]},[[0,"vviinnProductLoad","trackProductLoad"],[0,"vviinnProductView","trackProductView"],[0,"vviinnProductClick","trackProductClick"],[0,"vviinnAuxClick","trackAuxClick"],[0,"vviinnAddToBasket","trackAddToBasket"],[0,"vviinnUpdatingAllCardsFinished","updatingAllCardsFinishedListener"]]],[0,"vviinn-carousel",{"mode":[1],"imageWidth":[2,"image-width"],"showScroll":[4,"show-scroll"],"campaignTypeId":[1,"campaign-type-id"],"widgetElementId":[1,"widget-element-id"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"recommendations":[16],"widgetVersion":[1,"widget-version"],"addToBasketShow":[4,"add-to-basket-show"],"updatingAllCards":[4,"updating-all-cards"],"updateButtonLocation":[1,"update-button-location"],"moveDirection":[32],"contentGroups":[32],"activeContentGroup":[32],"isRTL":[32],"crossSellingRecommendations":[32]},[[0,"vviinnCrossSellingClick","crossSellingClickListener"]]],[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"],"mode":[1],"addToBasketShow":[4,"add-to-basket-show"],"updateButtonLocation":[1,"update-button-location"],"campaignTypeId":[1,"campaign-type-id"],"widgetElementId":[1,"widget-element-id"],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"index":[2],"updatingAllCards":[4,"updating-all-cards"],"defaultAnimationInterval":[2,"default-animation-interval"],"imageLoaded":[32],"isTransitioning":[32]},[[0,"vviinnCrossSellingClick","crossSellingClickListener"]]],[1,"vviinn-skeleton",{"height":[2],"halfWidth":[4,"half-width"]}]]],["search-filters_16.cjs",[[1,"vviinn-image-view",{"basicEventData":[16],"setShowAspectRatioError":[16],"showAspectRatioError":[4,"show-aspect-ratio-error"],"cropper":[32],"hidePreloader":[32]},[[0,"vviinnSelectObject","selectDetectedObject"]]],[1,"vviinn-overlayed-modal",{"active":[4],"resetState":[16],"buttonElementId":[1,"button-element-id"],"hideBackButton":[4,"hide-back-button"],"widgetVersion":[1,"widget-version"],"isFirstScreen":[4,"is-first-screen"]}],[1,"vviinn-empty-results",{"handler":[16]}],[1,"vviinn-image-selector",{"basicEventData":[16],"startUpload":[4,"start-upload"],"loading":[4],"accept":[1],"resetVpsButton":[16],"capture":[1]}],[1,"vviinn-server-error",{"handler":[16]}],[1,"vviinn-wrong-aspect-ratio",{"handler":[16]}],[1,"vviinn-wrong-format",{"handler":[16]}],[1,"search-filters",{"filter":[16],"basicEventData":[16],"selectedFilter":[32],"hideFilters":[32]}],[1,"vviinn-example-image",{"exampleImageSource":[1,"example-image-source"],"width":[2],"height":[2],"basicEventData":[16],"srcObject":[16],"cameraButtonClicked":[4,"camera-button-clicked"],"selected":[32],"videoInitialized":[32],"zoomCapabilities":[32]}],[1,"vviinn-privacy-badge",{"privacyBadgeText":[1,"privacy-badge-text"]}],[1,"vviinn-slide"],[1,"vviinn-slider",{"showBullets":[4,"show-bullets"],"position":[514],"showArrows":[4,"show-arrows"],"elementsCount":[32],"internalPosition":[32],"swipeStartPosition":[32],"isRTL":[32]}],[1,"vviinn-teaser"],[1,"vviinn-detected-object",{"detectedObject":[16],"basicEventData":[16],"position":[32]}],[1,"vviinn-modal",{"active":[1540],"resetState":[16],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"hideBackButton":[4,"hide-back-button"],"isFirstScreen":[4,"is-first-screen"],"slider":[32]}],[1,"vviinn-overlay"]]],["vviinn-vps-widget.cjs",[[1,"vviinn-vps-widget",{"token":[1],"active":[1028],"currencySign":[1,"currency-sign"],"locale":[1],"campaignId":[1,"campaign-id"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"imageResolutionWidth":[2,"image-resolution-width"],"exampleImageSource":[1,"example-image-source"],"apiPath":[1,"api-path"],"showingInButton":[4,"showing-in-button"],"buttonElementId":[1,"button-element-id"],"buttonPressed":[4,"button-pressed"],"mode":[1],"resetVpsButton":[16],"slidePosition":[32],"width":[32],"wrongImageFormat":[32],"trackingDeactivated":[32],"stream":[32],"cameraEnabled":[32],"cameraButtonClicked":[32],"uploadSource":[32],"showAspectRatioError":[32]},[[0,"vviinnCameraEnabled","trackCameraEnabled"],[0,"vviinnProductLoad","trackProductLoad"],[0,"vviinnProductView","trackProductView"],[0,"vviinnProductClick","trackProductClick"],[0,"vviinnAuxClick","trackAuxClick"],[0,"vviinnImageCrop","trachSearchAreaChanges"],[0,"vviinnSelectObject","trackDetectedObject"],[0,"vviinnSelectFilter","trackFilter"]]]]],["vviinn-vps-button.cjs",[[1,"vviinn-vps-button",{"token":[1],"currencySign":[1,"currency-sign"],"locale":[1],"campaignId":[1,"campaign-id"],"addStyle":[4,"add-style"],"mode":[1],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"imageResolutionWidth":[2,"image-resolution-width"],"exampleImageSource":[1,"example-image-source"],"apiPath":[1,"api-path"],"buttonPressed":[32]},[[0,"vviinnWidgetClose","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"],"mode":[1],"campaigns":[1],"campaignType":[1,"campaign-type"],"color":[1],"locale":[1],"imageWidth":[2,"image-width"],"currencySign":[1,"currency-sign"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"addToBasketShow":[4,"add-to-basket-show"],"buttonChildren":[16],"apiPath":[1,"api-path"],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"showingInButton":[4,"showing-in-button"],"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"],"campaigns":[1],"campaignType":[1,"campaign-type"],"locale":[1],"color":[1],"addStyle":[4,"add-style"],"mode":[1],"imageWidth":[2,"image-width"],"currencySign":[1,"currency-sign"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"addToBasketShow":[4,"add-to-basket-show"],"apiPath":[1,"api-path"]}]]]], options);
|
|
24
24
|
});
|
|
25
25
|
|
|
26
26
|
exports.setNonce = index.setNonce;
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
"./components/vviinn-error/vviinn-error.js",
|
|
8
8
|
"./components/vviinn-error/vviinn-empty-results/vviinn-empty-results.js",
|
|
9
9
|
"./components/vviinn-error/vviinn-server-error/vviinn-server-error.js",
|
|
10
|
+
"./components/vviinn-error/vviinn-wrong-aspect-ratio/vviinn-wrong-aspect-ratio.js",
|
|
10
11
|
"./components/vviinn-error/vviinn-wrong-format/vviinn-wrong-format.js",
|
|
11
12
|
"./components/vviinn-example-image/vviinn-example-image.js",
|
|
12
13
|
"./components/vviinn-image-selector/vviinn-image-selector.js",
|
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: row;
|
|
4
4
|
overflow-x: auto;
|
|
5
|
-
padding
|
|
6
|
-
padding-right: 12px;
|
|
7
|
-
margin-bottom: 12px;
|
|
5
|
+
padding: 0 12px 12px 24px;
|
|
8
6
|
}
|
|
9
7
|
|
|
10
8
|
.filter {
|
|
@@ -51,6 +49,13 @@
|
|
|
51
49
|
scrollbar-width: none;
|
|
52
50
|
}
|
|
53
51
|
|
|
52
|
+
@media (max-width: 768px) {
|
|
53
|
+
.filters {
|
|
54
|
+
padding-right: 54px;
|
|
55
|
+
padding-bottom: 0;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
54
59
|
@media (max-width: 640px) {
|
|
55
60
|
.no-scrollbar-mobile {
|
|
56
61
|
-ms-overflow-style: none;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import i18next from "i18next";
|
|
3
|
+
import { WarningIcon } from "../../vviinn-icons";
|
|
4
|
+
export class VviinnWrongAspectRatio {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.handler = undefined;
|
|
7
|
+
}
|
|
8
|
+
render() {
|
|
9
|
+
return (h(Host, null, h("vviinn-error", null, h(WarningIcon, null), h("h4", { slot: "title" }, i18next.t("wrongAspectRatioBlock.title")), h("button", { slot: "action", onClick: this.handler }, i18next.t("wrongAspectRatioBlock.button")))));
|
|
10
|
+
}
|
|
11
|
+
static get is() { return "vviinn-wrong-aspect-ratio"; }
|
|
12
|
+
static get encapsulation() { return "shadow"; }
|
|
13
|
+
static get properties() {
|
|
14
|
+
return {
|
|
15
|
+
"handler": {
|
|
16
|
+
"type": "unknown",
|
|
17
|
+
"mutable": false,
|
|
18
|
+
"complexType": {
|
|
19
|
+
"original": "VoidFunction",
|
|
20
|
+
"resolved": "VoidFunction",
|
|
21
|
+
"references": {
|
|
22
|
+
"VoidFunction": {
|
|
23
|
+
"location": "global"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"required": false,
|
|
28
|
+
"optional": false,
|
|
29
|
+
"docs": {
|
|
30
|
+
"tags": [],
|
|
31
|
+
"text": ""
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -22,11 +22,18 @@ export class VviinnExampleImage {
|
|
|
22
22
|
var _a;
|
|
23
23
|
if (!this.videoTrack || !this.zoomCapabilities)
|
|
24
24
|
return;
|
|
25
|
+
const { max, min } = this.zoomCapabilities;
|
|
25
26
|
const currentSettings = this.videoTrack.getSettings();
|
|
26
|
-
const currentZoom = (_a = currentSettings.zoom) !== null && _a !== void 0 ? _a :
|
|
27
|
-
const step = (
|
|
27
|
+
const currentZoom = (_a = currentSettings.zoom) !== null && _a !== void 0 ? _a : min;
|
|
28
|
+
const step = (max - min) / 3;
|
|
29
|
+
const roundedStep = Math.round(step * 10) / 10;
|
|
28
30
|
let newZoom;
|
|
29
|
-
newZoom =
|
|
31
|
+
newZoom =
|
|
32
|
+
action === "in" ? currentZoom + roundedStep : currentZoom - roundedStep;
|
|
33
|
+
if (newZoom < min)
|
|
34
|
+
newZoom = min;
|
|
35
|
+
if (newZoom > max)
|
|
36
|
+
newZoom = max;
|
|
30
37
|
await this.videoTrack.applyConstraints({
|
|
31
38
|
advanced: [{ zoom: newZoom }],
|
|
32
39
|
});
|