vviinn-widgets 2.97.0 → 2.97.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{emitRequestFiltersMore-8b713194.js → emitRequestFiltersMore-35a9fed4.js} +1 -1
- package/dist/cjs/{index-105aee62.js → index-3035bd2b.js} +1 -1
- package/dist/cjs/{package-c4d4f888.js → package-42b40c90.js} +1 -1
- package/dist/cjs/search-filters_19.cjs.entry.js +4 -4
- package/dist/cjs/{search.store-d2b420fd.js → search.store-4593a19d.js} +9 -0
- package/dist/cjs/vviinn-carousel_8.cjs.entry.js +4 -4
- package/dist/cjs/vviinn-preloader.cjs.entry.js +1 -1
- package/dist/cjs/vviinn-recommendations-sidebar.cjs.entry.js +2 -8
- 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 +3 -3
- package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.js +2 -7
- package/dist/collection/geometry/Rectangle.js +8 -0
- package/dist/esm/{emitRequestFiltersMore-3b8ae486.js → emitRequestFiltersMore-d84828f1.js} +1 -1
- package/dist/esm/{index-279b5fe1.js → index-60812b71.js} +1 -1
- package/dist/esm/{package-4ceb52bb.js → package-ecb8af3e.js} +1 -1
- package/dist/esm/search-filters_19.entry.js +4 -4
- package/dist/esm/{search.store-24896fcf.js → search.store-a11affa8.js} +9 -1
- package/dist/esm/vviinn-carousel_8.entry.js +4 -4
- package/dist/esm/vviinn-preloader.entry.js +1 -1
- package/dist/esm/vviinn-recommendations-sidebar.entry.js +2 -8
- 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 +3 -3
- package/dist/types/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.d.ts +1 -4
- package/dist/types/geometry/Rectangle.d.ts +5 -0
- package/dist/vviinn-widgets/{p-aad518d7.js → p-25a4ca73.js} +1 -1
- package/dist/vviinn-widgets/{p-263f64ad.entry.js → p-299751a4.entry.js} +1 -1
- package/dist/vviinn-widgets/p-2af6e85a.js +1 -0
- package/{www/build/p-042b091b.js → dist/vviinn-widgets/p-43242068.js} +1 -1
- package/{www/build/p-707f4189.js → dist/vviinn-widgets/p-57e0dbdb.js} +1 -1
- package/dist/vviinn-widgets/{p-91937557.entry.js → p-5cb91313.entry.js} +1 -1
- package/dist/vviinn-widgets/{p-926b0a0f.entry.js → p-ba8ad4b6.entry.js} +1 -1
- package/{www/build/p-e3199f82.entry.js → dist/vviinn-widgets/p-bdc1114b.entry.js} +1 -1
- package/dist/vviinn-widgets/{p-67e72877.entry.js → p-bfb377b3.entry.js} +1 -1
- package/{www/build/p-fb2e2d42.entry.js → dist/vviinn-widgets/p-c64bbd15.entry.js} +1 -1
- package/dist/vviinn-widgets/p-e61fa361.entry.js +1 -0
- package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
- package/package.json +1 -1
- package/www/build/{p-aad518d7.js → p-25a4ca73.js} +1 -1
- package/www/build/{p-263f64ad.entry.js → p-299751a4.entry.js} +1 -1
- package/www/build/p-2af6e85a.js +1 -0
- package/{dist/vviinn-widgets/p-042b091b.js → www/build/p-43242068.js} +1 -1
- package/{dist/vviinn-widgets/p-707f4189.js → www/build/p-57e0dbdb.js} +1 -1
- package/www/build/{p-91937557.entry.js → p-5cb91313.entry.js} +1 -1
- package/www/build/{p-926b0a0f.entry.js → p-ba8ad4b6.entry.js} +1 -1
- package/{dist/vviinn-widgets/p-e3199f82.entry.js → www/build/p-bdc1114b.entry.js} +1 -1
- package/www/build/{p-67e72877.entry.js → p-bfb377b3.entry.js} +1 -1
- package/{dist/vviinn-widgets/p-fb2e2d42.entry.js → www/build/p-c64bbd15.entry.js} +1 -1
- package/www/build/p-e61fa361.entry.js +1 -0
- package/www/build/vviinn-widgets.esm.js +1 -1
- package/dist/vviinn-widgets/p-6963f7bf.entry.js +0 -1
- package/dist/vviinn-widgets/p-fc276eec.js +0 -1
- package/www/build/p-6963f7bf.entry.js +0 -1
- package/www/build/p-fc276eec.js +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const search_store = require('./search.store-
|
|
3
|
+
const search_store = require('./search.store-4593a19d.js');
|
|
4
4
|
const index = require('./index-4474431a.js');
|
|
5
5
|
|
|
6
6
|
const PlusIcon = () => (index.h("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", class: "plus-icon" },
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-4474431a.js');
|
|
6
|
-
const search_store = require('./search.store-
|
|
7
|
-
const index$1 = require('./index-
|
|
6
|
+
const search_store = require('./search.store-4593a19d.js');
|
|
7
|
+
const index$1 = require('./index-3035bd2b.js');
|
|
8
8
|
const customizedSlots = require('./customized-slots-ee9418c1.js');
|
|
9
|
-
const emitRequestFiltersMore = require('./emitRequestFiltersMore-
|
|
10
|
-
const _package = require('./package-
|
|
9
|
+
const emitRequestFiltersMore = require('./emitRequestFiltersMore-35a9fed4.js');
|
|
10
|
+
const _package = require('./package-42b40c90.js');
|
|
11
11
|
|
|
12
12
|
const ArrowIcon = () => (index.h("svg", { width: "12", height: "20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
13
13
|
index.h("path", { d: "M0 10 10 0l1.4 1.4L2.8 10l8.6 8.6L10 20 0 10Z" })));
|
|
@@ -16618,6 +16618,14 @@ const center = (r) => {
|
|
|
16618
16618
|
y: r.y + r.height * 0.5,
|
|
16619
16619
|
};
|
|
16620
16620
|
};
|
|
16621
|
+
const isClickedInRectBound = (event, rect) => {
|
|
16622
|
+
const { clientX, clientY } = event;
|
|
16623
|
+
const inLeftBound = clientX >= rect.left;
|
|
16624
|
+
const inRightBound = clientX <= rect.right;
|
|
16625
|
+
const inTopBound = clientY >= rect.top;
|
|
16626
|
+
const inBottomBound = clientY <= rect.bottom;
|
|
16627
|
+
return inLeftBound && inRightBound && inTopBound && inBottomBound;
|
|
16628
|
+
};
|
|
16621
16629
|
|
|
16622
16630
|
var FormMemberName;
|
|
16623
16631
|
(function (FormMemberName) {
|
|
@@ -17440,6 +17448,7 @@ exports.fromImage = fromImage;
|
|
|
17440
17448
|
exports.getApiPath = getApiPath;
|
|
17441
17449
|
exports.getOrElse = getOrElse$1;
|
|
17442
17450
|
exports.has = has;
|
|
17451
|
+
exports.isClickedInRectBound = isClickedInRectBound;
|
|
17443
17452
|
exports.makeProductListingPageRequest = makeProductListingPageRequest;
|
|
17444
17453
|
exports.makeRectangularSearchRequest = makeRectangularSearchRequest;
|
|
17445
17454
|
exports.makeRequest = makeRequest;
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-4474431a.js');
|
|
6
|
-
const search_store = require('./search.store-
|
|
6
|
+
const search_store = require('./search.store-4593a19d.js');
|
|
7
7
|
const customizedSlots = require('./customized-slots-ee9418c1.js');
|
|
8
|
-
const emitRequestFiltersMore = require('./emitRequestFiltersMore-
|
|
9
|
-
const index$1 = require('./index-
|
|
10
|
-
const _package = require('./package-
|
|
8
|
+
const emitRequestFiltersMore = require('./emitRequestFiltersMore-35a9fed4.js');
|
|
9
|
+
const index$1 = require('./index-3035bd2b.js');
|
|
10
|
+
const _package = require('./package-42b40c90.js');
|
|
11
11
|
|
|
12
12
|
const BasketIcon = () => (index.h("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
13
13
|
index.h("g", { id: "shopping-bag" },
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-4474431a.js');
|
|
6
|
-
const search_store = require('./search.store-
|
|
6
|
+
const search_store = require('./search.store-4593a19d.js');
|
|
7
7
|
|
|
8
8
|
const vviinnPreloaderCss = ":host{--preloader-size:24px;--preloader-width:calc(var(--preloader-size) / 6);transform-origin:center;animation:rotate 3s linear infinite;border:var(--preloader-width) solid currentColor;border-radius:50%;border-top-color:transparent;display:none;outline:0;width:var(--preloader-size);height:var(--preloader-size);box-sizing:border-box}:host(.active){display:flex}@keyframes rotate{from{transform:rotate(-360deg)}to{transform:rotate(360deg)}}";
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-4474431a.js');
|
|
6
|
-
const search_store = require('./search.store-
|
|
6
|
+
const search_store = require('./search.store-4593a19d.js');
|
|
7
7
|
|
|
8
8
|
const CrossIcon = () => (index.h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
9
9
|
index.h("path", { d: "M16 1.4L14.6 0L8 6.6L1.4 0L0 1.4L6.6 8L0 14.6L1.4 16L8 9.4L14.6 16L16 14.6L9.4 8L16 1.4Z", fill: "#161616" })));
|
|
@@ -61,16 +61,10 @@ const RecommendationsSidebar = class {
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
bodyClickListener(event) {
|
|
64
|
-
const { clientX, clientY } = event;
|
|
65
64
|
const sidebarRect = this.getSidebarRectangle();
|
|
66
65
|
if (!sidebarRect)
|
|
67
66
|
return;
|
|
68
|
-
|
|
69
|
-
const inRightBound = clientX <= sidebarRect.right;
|
|
70
|
-
const inTopBound = clientY >= sidebarRect.top;
|
|
71
|
-
const inBottomBound = clientY <= sidebarRect.bottom;
|
|
72
|
-
const inBound = inLeftBound && inRightBound && inTopBound && inBottomBound;
|
|
73
|
-
if (!inBound) {
|
|
67
|
+
if (!search_store.isClickedInRectBound(event, sidebarRect)) {
|
|
74
68
|
this.state = "closed";
|
|
75
69
|
}
|
|
76
70
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-4474431a.js');
|
|
6
|
-
const _package = require('./package-
|
|
6
|
+
const _package = require('./package-42b40c90.js');
|
|
7
7
|
|
|
8
8
|
const SimilarProductsIcon = () => (index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" },
|
|
9
9
|
index.h("path", { d: "M4 16V15H2V16C2 19.31 4.69 22 8 22H9V20H8C5.79 20 4 18.21 4 16Z", fill: "#161616" }),
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-4474431a.js');
|
|
6
|
-
const _package = require('./package-
|
|
6
|
+
const _package = require('./package-42b40c90.js');
|
|
7
7
|
const customizedSlots = require('./customized-slots-ee9418c1.js');
|
|
8
8
|
const constants = require('./constants-7684cbfc.js');
|
|
9
9
|
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-4474431a.js');
|
|
6
|
-
const search_store = require('./search.store-
|
|
7
|
-
const index$1 = require('./index-
|
|
8
|
-
const _package = require('./package-
|
|
6
|
+
const search_store = require('./search.store-4593a19d.js');
|
|
7
|
+
const index$1 = require('./index-3035bd2b.js');
|
|
8
|
+
const _package = require('./package-42b40c90.js');
|
|
9
9
|
const customizedSlots = require('./customized-slots-ee9418c1.js');
|
|
10
10
|
const constants = require('./constants-7684cbfc.js');
|
|
11
11
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Host, h, } from "@stencil/core";
|
|
2
2
|
import { CrossIcon } from "../../vviinn-icons";
|
|
3
3
|
import { searchState } from "../../../store/search.store";
|
|
4
|
+
import { isClickedInRectBound } from "../../../geometry/Rectangle";
|
|
4
5
|
export class RecommendationsSidebar {
|
|
5
6
|
constructor() {
|
|
6
7
|
this.isSourceImageValid = () => { var _a; return !!((_a = searchState === null || searchState === void 0 ? void 0 : searchState.sourceProduct) === null || _a === void 0 ? void 0 : _a.image); };
|
|
@@ -50,16 +51,10 @@ export class RecommendationsSidebar {
|
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
53
|
bodyClickListener(event) {
|
|
53
|
-
const { clientX, clientY } = event;
|
|
54
54
|
const sidebarRect = this.getSidebarRectangle();
|
|
55
55
|
if (!sidebarRect)
|
|
56
56
|
return;
|
|
57
|
-
|
|
58
|
-
const inRightBound = clientX <= sidebarRect.right;
|
|
59
|
-
const inTopBound = clientY >= sidebarRect.top;
|
|
60
|
-
const inBottomBound = clientY <= sidebarRect.bottom;
|
|
61
|
-
const inBound = inLeftBound && inRightBound && inTopBound && inBottomBound;
|
|
62
|
-
if (!inBound) {
|
|
57
|
+
if (!isClickedInRectBound(event, sidebarRect)) {
|
|
63
58
|
this.state = "closed";
|
|
64
59
|
}
|
|
65
60
|
}
|
|
@@ -59,3 +59,11 @@ export const center = (r) => {
|
|
|
59
59
|
y: r.y + r.height * 0.5,
|
|
60
60
|
};
|
|
61
61
|
};
|
|
62
|
+
export const isClickedInRectBound = (event, rect) => {
|
|
63
|
+
const { clientX, clientY } = event;
|
|
64
|
+
const inLeftBound = clientX >= rect.left;
|
|
65
|
+
const inRightBound = clientX <= rect.right;
|
|
66
|
+
const inTopBound = clientY >= rect.top;
|
|
67
|
+
const inBottomBound = clientY <= rect.bottom;
|
|
68
|
+
return inLeftBound && inRightBound && inTopBound && inBottomBound;
|
|
69
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as _function, E as Either } from './search.store-
|
|
1
|
+
import { _ as _function, E as Either } from './search.store-a11affa8.js';
|
|
2
2
|
import { h, F as Fragment } from './index-abf408d8.js';
|
|
3
3
|
|
|
4
4
|
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" },
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-abf408d8.js';
|
|
2
|
-
import { s as searchState, _ as _function, O as Option,
|
|
3
|
-
import { i as instance, r as resources, c as createTrackingApi, v as v4, n as createResultVpsEventByType, o as createProductVpsEventByType } from './index-
|
|
2
|
+
import { s as searchState, _ as _function, O as Option, l as fromAlt, n as foldValueObject, o as scaleWithSized, q as center, r as makeRectangularSearchRequest, u as detectedObjectEq, v as toFile, w as processSelectedFile, E as Either, x as match, i as createCommonjsModule, e as commonjsGlobal, y as sequenceToOption, z as fromImage, B as dimensionsFromImage, C as scaleByLargestSide, d as state, D as makeSearchIdRequest, F as getOrElse, G as makeTextSearchRequest, H as makeSearchQueryRequest, I as makeProductListingPageRequest, N as NonEmptyArray } from './search.store-a11affa8.js';
|
|
3
|
+
import { i as instance, r as resources, c as createTrackingApi, v as v4, n as createResultVpsEventByType, o as createProductVpsEventByType } from './index-60812b71.js';
|
|
4
4
|
import { s as slotChangeListener, c as campaignTypeNames } from './customized-slots-7fa3856f.js';
|
|
5
|
-
import { d as PlusIcon, c as calculatePriceLabel, s as subFilterSelection, e as emitRequestFiltersMore, a as showActiveOnSubButton, R as RenderButton } from './emitRequestFiltersMore-
|
|
6
|
-
import { v as version } from './package-
|
|
5
|
+
import { d as PlusIcon, c as calculatePriceLabel, s as subFilterSelection, e as emitRequestFiltersMore, a as showActiveOnSubButton, R as RenderButton } from './emitRequestFiltersMore-d84828f1.js';
|
|
6
|
+
import { v as version } from './package-ecb8af3e.js';
|
|
7
7
|
|
|
8
8
|
const ArrowIcon = () => (h("svg", { width: "12", height: "20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
9
9
|
h("path", { d: "M0 10 10 0l1.4 1.4L2.8 10l8.6 8.6L10 20 0 10Z" })));
|
|
@@ -16616,6 +16616,14 @@ const center = (r) => {
|
|
|
16616
16616
|
y: r.y + r.height * 0.5,
|
|
16617
16617
|
};
|
|
16618
16618
|
};
|
|
16619
|
+
const isClickedInRectBound = (event, rect) => {
|
|
16620
|
+
const { clientX, clientY } = event;
|
|
16621
|
+
const inLeftBound = clientX >= rect.left;
|
|
16622
|
+
const inRightBound = clientX <= rect.right;
|
|
16623
|
+
const inTopBound = clientY >= rect.top;
|
|
16624
|
+
const inBottomBound = clientY <= rect.bottom;
|
|
16625
|
+
return inLeftBound && inRightBound && inTopBound && inBottomBound;
|
|
16626
|
+
};
|
|
16619
16627
|
|
|
16620
16628
|
var FormMemberName;
|
|
16621
16629
|
(function (FormMemberName) {
|
|
@@ -17416,4 +17424,4 @@ const processSelectedFile = async (file, fromTextSearch = false, token, apiPath)
|
|
|
17416
17424
|
return session;
|
|
17417
17425
|
};
|
|
17418
17426
|
|
|
17419
|
-
export { Apply as A,
|
|
17427
|
+
export { Apply as A, dimensionsFromImage as B, scaleByLargestSide as C, makeSearchIdRequest as D, Either as E, getOrElse$1 as F, makeTextSearchRequest as G, makeSearchQueryRequest as H, makeProductListingPageRequest as I, NonEmptyArray as N, Option as O, Semigroup$1 as S, TaskEither as T, _function as _, _Array as a, createInitPostRequest as b, chainW as c, state$1 as d, commonjsGlobal as e, fromEither as f, getApiPath as g, has as h, createCommonjsModule as i, isClickedInRectBound as j, parseExcludedToParams as k, fromAlt as l, makeRequest as m, foldValueObject as n, scaleWithSized as o, pipe as p, center as q, makeRectangularSearchRequest as r, searchState as s, tuple as t, detectedObjectEq as u, toFile as v, processSelectedFile as w, match$1 as x, sequenceToOption as y, fromImage as z };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { h, r as registerInstance, c as createEvent, H as Host, g as getElement, F as Fragment } from './index-abf408d8.js';
|
|
2
|
-
import { h as has, t as tuple, s as searchState, _ as _function, a as _Array, O as Option, S as Semigroup, p as pipe, c as chainW, m as makeRequest, f as fromEither, g as getApiPath, b as createInitPostRequest, A as Apply, d as state, T as TaskEither, E as Either } from './search.store-
|
|
2
|
+
import { h as has, t as tuple, s as searchState, _ as _function, a as _Array, O as Option, S as Semigroup, p as pipe, c as chainW, m as makeRequest, f as fromEither, g as getApiPath, b as createInitPostRequest, A as Apply, d as state, T as TaskEither, E as Either } from './search.store-a11affa8.js';
|
|
3
3
|
import { c as campaignTypeNames, s as slotChangeListener, S as SlotSkeleton, f as fromString, a as fold } from './customized-slots-7fa3856f.js';
|
|
4
|
-
import { c as calculatePriceLabel, s as subFilterSelection, e as emitRequestFiltersMore, C as CheckFilterIcon, S as SquareFilterIcon, a as showActiveOnSubButton, R as RenderButton, b as ResponsiveImage, I as Image, L as Linked, P as Price, p as parseBasePrice } from './emitRequestFiltersMore-
|
|
5
|
-
import { i as instance, r as resources, v as v4, c as createTrackingApi, a as createAddToBasketVpcEvent, b as createAddToBasketVprEvent, d as createWidgetVpcEvent, e as createWidgetVprEvent, f as createResultVpcEventByType, g as createResultVprEventByType, h as createProductVpcEventByType, j as createProductVprEventByType } from './index-
|
|
6
|
-
import { v as version } from './package-
|
|
4
|
+
import { c as calculatePriceLabel, s as subFilterSelection, e as emitRequestFiltersMore, C as CheckFilterIcon, S as SquareFilterIcon, a as showActiveOnSubButton, R as RenderButton, b as ResponsiveImage, I as Image, L as Linked, P as Price, p as parseBasePrice } from './emitRequestFiltersMore-d84828f1.js';
|
|
5
|
+
import { i as instance, r as resources, v as v4, c as createTrackingApi, a as createAddToBasketVpcEvent, b as createAddToBasketVprEvent, d as createWidgetVpcEvent, e as createWidgetVprEvent, f as createResultVpcEventByType, g as createResultVprEventByType, h as createProductVpcEventByType, j as createProductVprEventByType } from './index-60812b71.js';
|
|
6
|
+
import { v as version } from './package-ecb8af3e.js';
|
|
7
7
|
|
|
8
8
|
const BasketIcon = () => (h("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
9
9
|
h("g", { id: "shopping-bag" },
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host } from './index-abf408d8.js';
|
|
2
|
-
import { s as searchState } from './search.store-
|
|
2
|
+
import { s as searchState } from './search.store-a11affa8.js';
|
|
3
3
|
|
|
4
4
|
const vviinnPreloaderCss = ":host{--preloader-size:24px;--preloader-width:calc(var(--preloader-size) / 6);transform-origin:center;animation:rotate 3s linear infinite;border:var(--preloader-width) solid currentColor;border-radius:50%;border-top-color:transparent;display:none;outline:0;width:var(--preloader-size);height:var(--preloader-size);box-sizing:border-box}:host(.active){display:flex}@keyframes rotate{from{transform:rotate(-360deg)}to{transform:rotate(360deg)}}";
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-abf408d8.js';
|
|
2
|
-
import { s as searchState } from './search.store-
|
|
2
|
+
import { s as searchState, j as isClickedInRectBound } from './search.store-a11affa8.js';
|
|
3
3
|
|
|
4
4
|
const CrossIcon = () => (h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
5
5
|
h("path", { d: "M16 1.4L14.6 0L8 6.6L1.4 0L0 1.4L6.6 8L0 14.6L1.4 16L8 9.4L14.6 16L16 14.6L9.4 8L16 1.4Z", fill: "#161616" })));
|
|
@@ -57,16 +57,10 @@ const RecommendationsSidebar = class {
|
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
bodyClickListener(event) {
|
|
60
|
-
const { clientX, clientY } = event;
|
|
61
60
|
const sidebarRect = this.getSidebarRectangle();
|
|
62
61
|
if (!sidebarRect)
|
|
63
62
|
return;
|
|
64
|
-
|
|
65
|
-
const inRightBound = clientX <= sidebarRect.right;
|
|
66
|
-
const inTopBound = clientY >= sidebarRect.top;
|
|
67
|
-
const inBottomBound = clientY <= sidebarRect.bottom;
|
|
68
|
-
const inBound = inLeftBound && inRightBound && inTopBound && inBottomBound;
|
|
69
|
-
if (!inBound) {
|
|
63
|
+
if (!isClickedInRectBound(event, sidebarRect)) {
|
|
70
64
|
this.state = "closed";
|
|
71
65
|
}
|
|
72
66
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-abf408d8.js';
|
|
2
|
-
import { v as version } from './package-
|
|
2
|
+
import { v as version } from './package-ecb8af3e.js';
|
|
3
3
|
|
|
4
4
|
const SimilarProductsIcon = () => (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" },
|
|
5
5
|
h("path", { d: "M4 16V15H2V16C2 19.31 4.69 22 8 22H9V20H8C5.79 20 4 18.21 4 16Z", fill: "#161616" }),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-abf408d8.js';
|
|
2
|
-
import { v as version } from './package-
|
|
2
|
+
import { v as version } from './package-ecb8af3e.js';
|
|
3
3
|
import { c as campaignTypeNames, S as SlotSkeleton } from './customized-slots-7fa3856f.js';
|
|
4
4
|
import { D as DEFAULT_EXAMPLE_IMAGE } from './constants-8bf233a9.js';
|
|
5
5
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h, r as registerInstance, c as createEvent, F as Fragment, H as Host, g as getElement } from './index-abf408d8.js';
|
|
2
|
-
import { s as searchState, d as state,
|
|
3
|
-
import { i as instance, r as resources, k as createSearchEvent, l as createFilterEvent, v as v4, c as createTrackingApi, m as createWidgetVpsEvent } from './index-
|
|
4
|
-
import { v as version } from './package-
|
|
2
|
+
import { s as searchState, d as state, k as parseExcludedToParams, O as Option } from './search.store-a11affa8.js';
|
|
3
|
+
import { i as instance, r as resources, k as createSearchEvent, l as createFilterEvent, v as v4, c as createTrackingApi, m as createWidgetVpsEvent } from './index-60812b71.js';
|
|
4
|
+
import { v as version } from './package-ecb8af3e.js';
|
|
5
5
|
import { c as campaignTypeNames, s as slotChangeListener, S as SlotSkeleton } from './customized-slots-7fa3856f.js';
|
|
6
6
|
import { D as DEFAULT_EXAMPLE_IMAGE } from './constants-8bf233a9.js';
|
|
7
7
|
|
package/dist/types/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.d.ts
CHANGED
|
@@ -4,11 +4,8 @@ import { BasicEventData } from "../../../recommendation/events";
|
|
|
4
4
|
import { CampaignName } from "../../../campaign/Campaign";
|
|
5
5
|
import { Locale } from "../../../locale";
|
|
6
6
|
import { UpdateButtonLocation } from "../../vviinn-vpr-widget/vviinn-vpr-widget";
|
|
7
|
+
import { ClickEvent } from "../../../geometry/Rectangle";
|
|
7
8
|
type SidebarState = "idle" | "open" | "closed";
|
|
8
|
-
type ClickEvent = Event & {
|
|
9
|
-
clientX: number;
|
|
10
|
-
clientY: number;
|
|
11
|
-
};
|
|
12
9
|
export declare class RecommendationsSidebar {
|
|
13
10
|
el: HTMLElement;
|
|
14
11
|
sidebarTitle: string;
|
|
@@ -2,6 +2,10 @@ import { Point } from "./Point";
|
|
|
2
2
|
import { Sized } from "./Sized";
|
|
3
3
|
import { RectangleAlt } from "./RectangleAlt";
|
|
4
4
|
export type Rectangle = Point & Sized;
|
|
5
|
+
export type ClickEvent = Event & {
|
|
6
|
+
clientX: number;
|
|
7
|
+
clientY: number;
|
|
8
|
+
};
|
|
5
9
|
export declare const move: (origin: Rectangle, position: Point) => Rectangle;
|
|
6
10
|
export declare const fromImage: (image: HTMLImageElement) => Rectangle;
|
|
7
11
|
export declare const fromNaturalImage: (image: HTMLImageElement) => Rectangle;
|
|
@@ -11,3 +15,4 @@ export declare const fromAlt: (r: RectangleAlt) => Rectangle;
|
|
|
11
15
|
export declare const scaleWithSized: (s: Sized) => (r: Rectangle) => Rectangle;
|
|
12
16
|
export declare const divideOnSized: (s: Sized) => (r: Rectangle) => Rectangle;
|
|
13
17
|
export declare const center: (r: Rectangle) => Point;
|
|
18
|
+
export declare const isClickedInRectBound: (event: ClickEvent, rect: DOMRect) => boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,E as l}from"./p-
|
|
1
|
+
import{_ as e,E as l}from"./p-43242068.js";import{h as r,F as a}from"./p-1c863deb.js";const t=()=>r("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"plus-icon"},r("path",{d:"M14.6667 17.3333H8.00001C7.62223 17.3333 7.30556 17.2056 7.05001 16.95C6.79445 16.6944 6.66667 16.3778 6.66667 16C6.66667 15.6222 6.79445 15.3056 7.05001 15.05C7.30556 14.7944 7.62223 14.6667 8.00001 14.6667H14.6667V8.00001C14.6667 7.62223 14.7944 7.30556 15.05 7.05001C15.3056 6.79445 15.6222 6.66667 16 6.66667C16.3778 6.66667 16.6944 6.79445 16.95 7.05001C17.2056 7.30556 17.3333 7.62223 17.3333 8.00001V14.6667H24C24.3778 14.6667 24.6944 14.7944 24.95 15.05C25.2056 15.3056 25.3333 15.6222 25.3333 16C25.3333 16.3778 25.2056 16.6944 24.95 16.95C24.6944 17.2056 24.3778 17.3333 24 17.3333H17.3333V24C17.3333 24.3778 17.2056 24.6944 16.95 24.95C16.6944 25.2056 16.3778 25.3333 16 25.3333C15.6222 25.3333 15.3056 25.2056 15.05 24.95C14.7944 24.6944 14.6667 24.3778 14.6667 24V17.3333Z",fill:"currentColor"})),s=()=>r("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},r("rect",{x:"2",y:"2",width:"20",height:"20",rx:"4",fill:"white"}),r("path",{d:"M10.8765 13.5061L16.1943 8.30769C16.4041 8.10256 16.6526 8 16.9398 8C17.2269 8 17.4754 8.10256 17.6852 8.30769C17.8951 8.51282 18 8.75574 18 9.03644C18 9.31714 17.8951 9.56005 17.6852 9.76518L11.622 15.6923C11.4121 15.8974 11.1637 16 10.8765 16C10.5894 16 10.3409 15.8974 10.131 15.6923L7.31476 12.9393C7.10492 12.7341 7 12.4912 7 12.2105C7 11.9298 7.10492 11.6869 7.31476 11.4818C7.5246 11.2767 7.77309 11.1741 8.06024 11.1741C8.34739 11.1741 8.59588 11.2767 8.80572 11.4818L10.8765 13.5061Z",fill:"#161616"})),i=()=>r("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},r("path",{d:"M12 13.4L7.09999 18.3C6.91665 18.4834 6.68332 18.575 6.39999 18.575C6.11665 18.575 5.88332 18.4834 5.69999 18.3C5.51665 18.1167 5.42499 17.8834 5.42499 17.6C5.42499 17.3167 5.51665 17.0834 5.69999 16.9L10.6 12L5.69999 7.10005C5.51665 6.91672 5.42499 6.68338 5.42499 6.40005C5.42499 6.11672 5.51665 5.88338 5.69999 5.70005C5.88332 5.51672 6.11665 5.42505 6.39999 5.42505C6.68332 5.42505 6.91665 5.51672 7.09999 5.70005L12 10.6L16.9 5.70005C17.0833 5.51672 17.3167 5.42505 17.6 5.42505C17.8833 5.42505 18.1167 5.51672 18.3 5.70005C18.4833 5.88338 18.575 6.11672 18.575 6.40005C18.575 6.68338 18.4833 6.91672 18.3 7.10005L13.4 12L18.3 16.9C18.4833 17.0834 18.575 17.3167 18.575 17.6C18.575 17.8834 18.4833 18.1167 18.3 18.3C18.1167 18.4834 17.8833 18.575 17.6 18.575C17.3167 18.575 17.0833 18.4834 16.9 18.3L12 13.4Z",fill:"#8D8D8D"})),c=()=>r("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},r("rect",{x:"3",y:"3",width:"20",height:"20",rx:"3",fill:"white",stroke:"#E0E0E0","stroke-width":"2"})),n=/fit\/\d+\//,o=(r,a)=>e.pipe((r=>e.pipe(r.match(n),l.fromNullable(r),l.map((()=>r))))(r),l.map((e=>e.replace(n,`fit/${a}/`))),l.getOrElse((()=>r))),p=(e,l)=>e.deeplink?r("a",{class:e.part,part:e.part,href:e.deeplink},l):l,u=(e,l)=>new Intl.NumberFormat(l,{minimumFractionDigits:2,maximumFractionDigits:2}).format(e),C=e=>{const l=e.priceType,a=u(e.price,e.locale),t=e.prefix?r("span",{part:"price-prefix"},e.prefix+" "):null,s=e.currency?r("span",{part:"currency",class:"currency"},e.currency):null;return r("span",{class:"price-amount",part:"price-amount"+(l?"-"+l:"")},t,a,s)},d=({currency:e,basePrice:l,priceType:a,locale:t})=>{if(!(null==l?void 0:l.price))return null;const s=u(l.price,t);return r("span",{class:"price-amount price-amount--base",part:"price-amount-base"+(a?"-"+a:"")},s,(null==e?void 0:e.length)>0&&r("span",{part:"currency",class:"currency"},e),"/",(null==l?void 0:l.quantity)>1&&(null==l?void 0:l.quantity),null==l?void 0:l.measure)},g=e=>e?"string"==typeof e?JSON.parse(e):e:null,m=({custom_label_0:e,custom_label_1:l,custom_label_2:t,custom_label_3:s,custom_label_4:i})=>{const c=(e,l)=>{if(!e)return"";const a=`price-label-${l}`;return r("span",{part:a,class:a},e)};return r(a,null,c(e,0),c(l,1),c(t,2),c(s,3),c(i,4))},f=e=>r("span",{class:"price-container",part:"price-container"},e.priceLabel&&r("span",{part:"price-label",class:"price-label"},e.priceLabel),e.salePrice?[r("span",{class:"price-outdated",part:"price-outdated"},r(C,{prefix:e.prefix,currency:e.currency,price:e.price,locale:e.locale,priceType:"outdated"}),r(d,{currency:e.currency,basePrice:e.basePrice,locale:e.locale,priceType:"outdated"})),r("span",{class:"price-sale",part:"price-sale"},r(C,{prefix:e.prefix,currency:e.currency,price:e.salePrice,locale:e.locale,priceType:"sale"}),r(d,{currency:e.currency,basePrice:e.baseSalePrice,locale:e.locale,priceType:"sale"}))]:r("span",{class:"price-regular",part:"price-regular"},r(C,{prefix:e.prefix,currency:e.currency,price:e.price,locale:e.locale,priceType:"regular"}),r(d,{currency:e.currency,basePrice:e.basePrice,locale:e.locale,priceType:"regular"}))),h=(e,l=(()=>{}))=>r("picture",null,r("img",{loading:e.lazy?"lazy":"eager",part:"image",class:"image",width:e.width,height:e.height,src:o(e.src,e.width),alt:e.title,ref:e.ref,onLoad:l}),e.isSource&&r(t,null)),w=(e,l=(()=>{}))=>r("picture",null,r("img",{loading:e.lazy?"lazy":"eager",part:"image",class:"image responsive",src:o(e.src,e.width),alt:e.title,ref:e.ref,onLoad:l})),b=(e,{column:l},r)=>{var a,t,s;const i=null!==(t=null!==(a=r.interval)&&void 0!==a?a:r.value)&&void 0!==t?t:r,c=e.findIndex((({column:e})=>e===l)),n=null===(s=e[c])||void 0===s?void 0:s.values.findIndex((e=>e===i)),o=-1===c||"price"===l?{column:l,values:[]}:e[c];return n>-1?o.values.splice(n,1):o.values.push(i),-1===c?(e=[...e,o],document.getElementById("filters-footer")&&(document.getElementById("filters-footer").scrollLeft=0)):(e[c]=o,e=0===e[c].values.length?[...e.filter((l=>e[c]!==l))]:[...e]),e},v=(e,l,a,t,n,o=!1,p=!1)=>{const u=l.hexCode;return r("li",{onClick:()=>t?e(l,n):null},r("button",{class:`filters-sub-button${o?"-selected":""} ${u?"filters-sub-button-color":""} ${o?"active":""}`,style:{backgroundColor:u},disabled:!t,part:"filters-sub-button"},r("span",null,r("span",null,a),p?null:r(o?s:c,null))),o&&p&&r(i,null))},y=(e,l,r)=>{if(!r||!e)return!1;const a=e.find((({column:e})=>e===r.column));return!!a&&!!a.values.some((e=>e===l||e===l.interval||e===l.value))},x=(e,l,r)=>{r.emit({filters:e,el:l})};export{s as C,h as I,p as L,f as P,v as R,c as S,y as a,w as b,m as c,t as d,x as e,g as p,b as s}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,h as e,H as o}from"./p-1c863deb.js";import{s as t}from"./p-
|
|
1
|
+
import{r,h as e,H as o}from"./p-1c863deb.js";import{s as t}from"./p-43242068.js";const a=class{constructor(e){r(this,e)}isActive(){return t.loading||t.objectDetectionInProgress}render(){return e(o,{class:{active:this.isActive()}})}};a.style=":host{--preloader-size:24px;--preloader-width:calc(var(--preloader-size) / 6);transform-origin:center;animation:rotate 3s linear infinite;border:var(--preloader-width) solid currentColor;border-radius:50%;border-top-color:transparent;display:none;outline:0;width:var(--preloader-size);height:var(--preloader-size);box-sizing:border-box}:host(.active){display:flex}@keyframes rotate{from{transform:rotate(-360deg)}to{transform:rotate(360deg)}}";export{a as vviinn_preloader}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const o="2.97.1";export{o as v}
|