vviinn-widgets 2.3.1 → 2.4.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/{app-globals-6b5da080.js → app-globals-d999d944.js} +1 -1
- package/dist/cjs/{highlight-box_22.cjs.entry.js → cropper-handler_27.cjs.entry.js} +486 -92
- package/dist/cjs/{customized-slots-8bc78ad4.js → customized-slots-90e8e849.js} +1 -1
- package/dist/cjs/{index-5b9a60ac.js → index-53400160.js} +1 -1
- package/dist/cjs/{imageSearch.store-042e9f45.js → index-c0d08aca.js} +15288 -11038
- package/dist/cjs/{index-553c2b4f.js → index-e8cf5dc5.js} +1 -1
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{vviinn-carousel_3.cjs.entry.js → vviinn-carousel_2.cjs.entry.js} +50 -206
- package/dist/cjs/vviinn-recommendations-sidebar.cjs.entry.js +2 -2
- package/dist/cjs/vviinn-vpr-button.cjs.entry.js +2 -2
- package/dist/cjs/vviinn-vps-button.cjs.entry.js +3 -3
- package/dist/cjs/vviinn-widgets.cjs.js +3 -3
- package/dist/collection/components/image-search/image-view/image-cropper/image-cropper.js +27 -7
- package/dist/collection/components/image-search/search-filters/search-filters.js +24 -1
- package/dist/collection/components/vviinn-carousel/vviinn-carousel.js +3 -3
- package/dist/collection/components/vviinn-example-images/vviinn-example-images.js +4 -4
- package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.js +18 -1
- package/dist/collection/components/vviinn-product-card/vviinn-product-card.js +57 -12
- package/dist/collection/components/vviinn-vpr-widget/stories/args.js +8 -8
- package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-vidget.js +46 -10
- package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-widget.css +5 -0
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +106 -10
- package/dist/collection/network/utils.js +1 -1
- package/dist/collection/openApi/index.js +27 -0
- package/dist/collection/{components/vviinn-vpr-widget/GridMode.js → recommendation/events.js} +0 -0
- package/dist/collection/store/store.js +7 -9
- package/dist/collection/store/tracking.store.js +3 -0
- package/dist/collection/tracking/event.js +3 -0
- package/dist/collection/tracking/filter.js +5 -0
- package/dist/collection/tracking/index.js +13 -0
- package/dist/collection/tracking/models.js +6 -0
- package/dist/collection/tracking/product.js +18 -0
- package/dist/collection/tracking/search.js +5 -0
- package/dist/collection/tracking/widget.js +10 -0
- package/dist/esm/{app-globals-90d99f95.js → app-globals-f91c6f94.js} +1 -1
- package/dist/esm/{highlight-box_22.entry.js → cropper-handler_27.entry.js} +417 -28
- package/dist/esm/{customized-slots-65b2467d.js → customized-slots-7be7f3b8.js} +1 -1
- package/dist/esm/{index-ac2e3b9d.js → index-00c7b7c2.js} +2 -2
- package/dist/esm/{imageSearch.store-f35e14f8.js → index-840ec915.js} +15232 -10993
- package/dist/esm/{index-d7c7df1c.js → index-d7147986.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{vviinn-carousel_3.entry.js → vviinn-carousel_2.entry.js} +42 -197
- package/dist/esm/vviinn-recommendations-sidebar.entry.js +2 -2
- package/dist/esm/vviinn-vpr-button.entry.js +2 -2
- package/dist/esm/vviinn-vps-button.entry.js +3 -3
- package/dist/esm/vviinn-widgets.js +3 -3
- package/dist/types/Image/error.d.ts +1 -0
- package/dist/types/Image/form.d.ts +1 -0
- package/dist/types/Image/fromFile.d.ts +1 -0
- package/dist/types/Image/imageToB64.d.ts +1 -0
- package/dist/types/Image/index.d.ts +1 -0
- package/dist/types/Image/renderPromise.d.ts +1 -0
- package/dist/types/Image/resizeImage.d.ts +1 -0
- package/dist/types/Image/sizing.d.ts +1 -0
- package/dist/types/Image/toFile.d.ts +1 -0
- package/dist/types/analytics/GAnalytics.d.ts +1 -0
- package/dist/types/analytics/GeneralAnalytics.d.ts +1 -0
- package/dist/types/analytics/GtagAnalytics.d.ts +1 -0
- package/dist/types/analytics/ProductAnalytics.d.ts +1 -0
- package/dist/types/campaign/Campaign.d.ts +1 -0
- package/dist/types/campaign/CampaignService.d.ts +1 -0
- package/dist/types/campaign/VCSCampaign.d.ts +1 -0
- package/dist/types/campaign/VCSCampaignResponse.d.ts +1 -0
- package/dist/types/campaign/VCSCampaignService.d.ts +1 -0
- package/dist/types/campaign/VPRCampaignResponse.d.ts +1 -0
- package/dist/types/campaign/VPRCampaignService.d.ts +1 -0
- package/dist/types/components/customized-slots.d.ts +1 -0
- package/dist/types/components/image-search/image-view/highlight-box/highlight-box.d.ts +1 -0
- package/dist/types/components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.d.ts +1 -0
- package/dist/types/components/image-search/image-view/image-cropper/image-cropper.d.ts +4 -0
- package/dist/types/components/image-search/search-filters/search-filters.d.ts +4 -0
- package/dist/types/components/vviinn-carousel/vviinn-carousel.d.ts +1 -0
- package/dist/types/components/vviinn-error/vviinn-empty-results/vviinn-empty-results.d.ts +1 -0
- package/dist/types/components/vviinn-error/vviinn-error.d.ts +1 -0
- package/dist/types/components/vviinn-error/vviinn-server-error/vviinn-server-error.d.ts +1 -0
- package/dist/types/components/vviinn-error/vviinn-wrong-format/vviinn-wrong-format.d.ts +1 -0
- package/dist/types/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.d.ts +1 -0
- package/dist/types/components/vviinn-example-images/vviinn-example-images.d.ts +1 -0
- package/dist/types/components/vviinn-icons/index.d.ts +1 -0
- package/dist/types/components/vviinn-image-selector/vviinn-image-selector.d.ts +1 -0
- package/dist/types/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.d.ts +3 -0
- package/dist/types/components/vviinn-image-view/vviinn-image-view.d.ts +1 -0
- package/dist/types/components/vviinn-modal/vviinn-modal.d.ts +1 -0
- package/dist/types/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-1/vviinn-onboarding-card-1.d.ts +1 -0
- package/dist/types/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-2/vviinn-onboarding-card-2.d.ts +1 -0
- package/dist/types/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-3/vviinn-onboarding-card-3.d.ts +1 -0
- package/dist/types/components/vviinn-onboarding/vviinn-onboarding.d.ts +1 -0
- package/dist/types/components/vviinn-overlay/vviinn-overlay.d.ts +1 -0
- package/dist/types/components/vviinn-overlayed-modal/vviinn-overlayed-modal.d.ts +1 -0
- package/dist/types/components/vviinn-preloader/vviinn-preloader.d.ts +1 -0
- package/dist/types/components/vviinn-privacy-badge/vviinn-privacy-badge.d.ts +1 -0
- package/dist/types/components/vviinn-product-card/render-helpers.d.ts +1 -0
- package/dist/types/components/vviinn-product-card/stories/args.d.ts +1 -0
- package/dist/types/components/vviinn-product-card/stories/decorators.d.ts +1 -0
- package/dist/types/components/vviinn-product-card/stories/vviinn-product-card.stories.d.ts +1 -0
- package/dist/types/components/vviinn-product-card/vviinn-product-card.d.ts +9 -3
- package/dist/types/components/vviinn-slider/arrow.d.ts +1 -0
- package/dist/types/components/vviinn-slider/vviinn-slide/vviinn-slide.d.ts +1 -0
- package/dist/types/components/vviinn-slider/vviinn-slider.d.ts +1 -0
- package/dist/types/components/vviinn-teaser/vviinn-teaser.d.ts +1 -0
- package/dist/types/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.d.ts +1 -0
- package/dist/types/components/vviinn-vpr-button/stories/args.d.ts +1 -0
- package/dist/types/components/vviinn-vpr-button/stories/vviinn-vpr-button.stories.d.ts +1 -0
- package/dist/types/components/vviinn-vpr-button/vviinn-vpr-button.d.ts +1 -0
- package/dist/types/components/vviinn-vpr-widget/stories/args.d.ts +1 -0
- package/dist/types/components/vviinn-vpr-widget/stories/decorators.d.ts +1 -0
- package/dist/types/components/vviinn-vpr-widget/stories/vviinn-vpr-widget.stories.d.ts +1 -0
- package/dist/types/components/vviinn-vpr-widget/token-helpers.d.ts +1 -0
- package/dist/types/components/vviinn-vpr-widget/vviinn-vpr-vidget.d.ts +9 -1
- package/dist/types/components/vviinn-vps-button/stories/vviinn-vps-button.stories.d.ts +1 -0
- package/dist/types/components/vviinn-vps-button/vviinn-vps-button.d.ts +1 -0
- package/dist/types/components/vviinn-vps-widget/stories/vviinn-vps-widget.stories.d.ts +1 -0
- package/dist/types/components/vviinn-vps-widget/vviinn-vps-widget.d.ts +13 -1
- package/dist/types/components.d.ts +10 -4
- package/dist/types/cropper/Cropper.d.ts +1 -0
- package/dist/types/cropper/Handler.d.ts +1 -0
- package/dist/types/dom/index.d.ts +1 -0
- package/dist/types/error.d.ts +1 -0
- package/dist/types/file/index.d.ts +1 -0
- package/dist/types/geometry/Clip.d.ts +1 -0
- package/dist/types/geometry/Point.d.ts +1 -0
- package/dist/types/geometry/Rectangle.d.ts +1 -0
- package/dist/types/geometry/RectangleAlt.d.ts +1 -0
- package/dist/types/geometry/Sized.d.ts +1 -0
- package/dist/types/global.d.ts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/interfaces/generated.d.ts +1 -0
- package/dist/types/interfaces/recommendation.d.ts +1 -0
- package/dist/types/network/apiClient.d.ts +1 -0
- package/dist/types/network/ion/File.d.ts +1 -0
- package/dist/types/network/ion/Form.d.ts +1 -0
- package/dist/types/network/ion/Link.d.ts +1 -0
- package/dist/types/network/ion/ValueObject.d.ts +1 -0
- package/dist/types/network/request.d.ts +1 -0
- package/dist/types/network/utils.d.ts +1 -0
- package/dist/types/openApi/index.d.ts +6 -0
- package/dist/types/recommendation/events.d.ts +6 -0
- package/dist/types/recommendation/recommendation.d.ts +1 -0
- package/dist/types/searchSession/searchSession.d.ts +1 -0
- package/dist/types/sentry.d.ts +1 -0
- package/dist/types/slider/GridMode.d.ts +1 -0
- package/dist/types/store/file-processing.d.ts +1 -0
- package/dist/types/store/imageSearch.store.d.ts +1 -0
- package/dist/types/store/store.d.ts +8 -6
- package/dist/types/store/tracking.store.d.ts +4 -0
- package/dist/types/stories/image-selector.stories.d.ts +1 -0
- package/dist/types/stories/image-view.stories.d.ts +1 -0
- package/dist/types/stories/modal.stories.d.ts +1 -0
- package/dist/types/stories/onboarding.stories.d.ts +1 -0
- package/dist/types/stories/overlay.stories.d.ts +1 -0
- package/dist/types/stories/overlayedModal.stories.d.ts +1 -0
- package/dist/types/stories/privacy-badge.stories.d.ts +1 -0
- package/dist/types/stories/slider.stories.d.ts +1 -0
- package/dist/types/stories/teaser.stories.d.ts +1 -0
- package/dist/types/stories/vps-widget.stories.d.ts +1 -0
- package/dist/types/stories/vviinn-product.stories.d.ts +1 -0
- package/dist/types/tracking/event.d.ts +4 -0
- package/dist/types/tracking/filter.d.ts +3 -0
- package/dist/types/tracking/index.d.ts +9 -0
- package/dist/types/tracking/models.d.ts +13 -0
- package/dist/types/tracking/product.d.ts +7 -0
- package/dist/types/tracking/search.d.ts +3 -0
- package/dist/types/tracking/widget.d.ts +5 -0
- package/dist/types/utils/collections/collectionsUtils.d.ts +1 -0
- package/dist/types/utils/either.d.ts +1 -0
- package/dist/types/utils/enum/enumUtils.d.ts +1 -0
- package/dist/types/utils/event/Events.d.ts +1 -0
- package/dist/types/utils/number/index.d.ts +1 -0
- package/dist/types/utils/option/option.d.ts +1 -0
- package/dist/types/utils/semigroup/semigroupDiff.d.ts +1 -0
- package/dist/types/utils/token/tokenUtils.d.ts +1 -0
- package/dist/vviinn-widgets/{p-e362fa80.entry.js → p-07d8ba79.entry.js} +1 -1
- package/dist/vviinn-widgets/p-196479f9.js +1 -0
- package/dist/vviinn-widgets/{p-a5b69a48.entry.js → p-2d4cb17f.entry.js} +1 -1
- package/dist/vviinn-widgets/{p-679ea2ce.js → p-7d5af04d.js} +1 -1
- package/dist/vviinn-widgets/{p-4530ca32.entry.js → p-9c7297c8.entry.js} +1 -1
- package/{www/build/p-55491d9b.js → dist/vviinn-widgets/p-a66512b2.js} +1 -1
- package/dist/vviinn-widgets/p-ae524f97.entry.js +1 -0
- package/{www/build/p-e882fbeb.js → dist/vviinn-widgets/p-ce96f232.js} +1 -1
- package/dist/vviinn-widgets/{p-b4b46a70.js → p-dc2da207.js} +1 -1
- package/dist/vviinn-widgets/p-fce4183d.entry.js +1 -0
- package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
- package/package.json +11 -3
- package/www/build/{p-e362fa80.entry.js → p-07d8ba79.entry.js} +1 -1
- package/www/build/p-196479f9.js +1 -0
- package/www/build/{p-a5b69a48.entry.js → p-2d4cb17f.entry.js} +1 -1
- package/www/build/p-32bb0615.js +1 -0
- package/www/build/{p-679ea2ce.js → p-7d5af04d.js} +1 -1
- package/www/build/{p-4530ca32.entry.js → p-9c7297c8.entry.js} +1 -1
- package/{dist/vviinn-widgets/p-55491d9b.js → www/build/p-a66512b2.js} +1 -1
- package/www/build/p-ae524f97.entry.js +1 -0
- package/{dist/vviinn-widgets/p-e882fbeb.js → www/build/p-ce96f232.js} +1 -1
- package/www/build/{p-b4b46a70.js → p-dc2da207.js} +1 -1
- package/www/build/p-fce4183d.entry.js +1 -0
- package/www/build/vviinn-widgets.esm.js +1 -1
- package/www/index.html +1 -107
- package/dist/cjs/Handler-d1a8a86a.js +0 -329
- package/dist/cjs/cropper-handler.cjs.entry.js +0 -27
- package/dist/cjs/vviinn-error.cjs.entry.js +0 -19
- package/dist/cjs/vviinn-preloader.cjs.entry.js +0 -26
- package/dist/cjs/vviinn-vps-widget.cjs.entry.js +0 -97
- package/dist/esm/Handler-639a4cb3.js +0 -308
- package/dist/esm/cropper-handler.entry.js +0 -23
- package/dist/esm/vviinn-error.entry.js +0 -15
- package/dist/esm/vviinn-preloader.entry.js +0 -22
- package/dist/esm/vviinn-vps-widget.entry.js +0 -93
- package/dist/types/components/vviinn-vpr-widget/GridMode.d.ts +0 -1
- package/dist/vviinn-widgets/p-1c141479.entry.js +0 -1
- package/dist/vviinn-widgets/p-320844ea.entry.js +0 -1
- package/dist/vviinn-widgets/p-6239a782.entry.js +0 -1
- package/dist/vviinn-widgets/p-757849fd.entry.js +0 -1
- package/dist/vviinn-widgets/p-80f0d4e0.js +0 -1
- package/dist/vviinn-widgets/p-935b4f49.entry.js +0 -1
- package/dist/vviinn-widgets/p-b0243e84.entry.js +0 -1
- package/dist/vviinn-widgets/p-f582db5c.js +0 -1
- package/www/build/p-1c141479.entry.js +0 -1
- package/www/build/p-320844ea.entry.js +0 -1
- package/www/build/p-4379b1c2.js +0 -1
- package/www/build/p-6239a782.entry.js +0 -1
- package/www/build/p-757849fd.entry.js +0 -1
- package/www/build/p-80f0d4e0.js +0 -1
- package/www/build/p-935b4f49.entry.js +0 -1
- package/www/build/p-b0243e84.entry.js +0 -1
- package/www/build/p-f582db5c.js +0 -1
|
@@ -1,329 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
// -------------------------------------------------------------------------------------
|
|
4
|
-
/**
|
|
5
|
-
* @since 2.0.0
|
|
6
|
-
*/
|
|
7
|
-
function identity(a) {
|
|
8
|
-
return a;
|
|
9
|
-
}
|
|
10
|
-
function flow(ab, bc, cd, de, ef, fg, gh, hi, ij) {
|
|
11
|
-
switch (arguments.length) {
|
|
12
|
-
case 1:
|
|
13
|
-
return ab;
|
|
14
|
-
case 2:
|
|
15
|
-
return function () {
|
|
16
|
-
return bc(ab.apply(this, arguments));
|
|
17
|
-
};
|
|
18
|
-
case 3:
|
|
19
|
-
return function () {
|
|
20
|
-
return cd(bc(ab.apply(this, arguments)));
|
|
21
|
-
};
|
|
22
|
-
case 4:
|
|
23
|
-
return function () {
|
|
24
|
-
return de(cd(bc(ab.apply(this, arguments))));
|
|
25
|
-
};
|
|
26
|
-
case 5:
|
|
27
|
-
return function () {
|
|
28
|
-
return ef(de(cd(bc(ab.apply(this, arguments)))));
|
|
29
|
-
};
|
|
30
|
-
case 6:
|
|
31
|
-
return function () {
|
|
32
|
-
return fg(ef(de(cd(bc(ab.apply(this, arguments))))));
|
|
33
|
-
};
|
|
34
|
-
case 7:
|
|
35
|
-
return function () {
|
|
36
|
-
return gh(fg(ef(de(cd(bc(ab.apply(this, arguments)))))));
|
|
37
|
-
};
|
|
38
|
-
case 8:
|
|
39
|
-
return function () {
|
|
40
|
-
return hi(gh(fg(ef(de(cd(bc(ab.apply(this, arguments))))))));
|
|
41
|
-
};
|
|
42
|
-
case 9:
|
|
43
|
-
return function () {
|
|
44
|
-
return ij(hi(gh(fg(ef(de(cd(bc(ab.apply(this, arguments)))))))));
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* @since 2.0.0
|
|
51
|
-
*/
|
|
52
|
-
function tuple() {
|
|
53
|
-
var t = [];
|
|
54
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
55
|
-
t[_i] = arguments[_i];
|
|
56
|
-
}
|
|
57
|
-
return t;
|
|
58
|
-
}
|
|
59
|
-
function pipe(a, ab, bc, cd, de, ef, fg, gh, hi) {
|
|
60
|
-
switch (arguments.length) {
|
|
61
|
-
case 1:
|
|
62
|
-
return a;
|
|
63
|
-
case 2:
|
|
64
|
-
return ab(a);
|
|
65
|
-
case 3:
|
|
66
|
-
return bc(ab(a));
|
|
67
|
-
case 4:
|
|
68
|
-
return cd(bc(ab(a)));
|
|
69
|
-
case 5:
|
|
70
|
-
return de(cd(bc(ab(a))));
|
|
71
|
-
case 6:
|
|
72
|
-
return ef(de(cd(bc(ab(a)))));
|
|
73
|
-
case 7:
|
|
74
|
-
return fg(ef(de(cd(bc(ab(a))))));
|
|
75
|
-
case 8:
|
|
76
|
-
return gh(fg(ef(de(cd(bc(ab(a)))))));
|
|
77
|
-
case 9:
|
|
78
|
-
return hi(gh(fg(ef(de(cd(bc(ab(a))))))));
|
|
79
|
-
default:
|
|
80
|
-
var ret = arguments[0];
|
|
81
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
82
|
-
ret = arguments[i](ret);
|
|
83
|
-
}
|
|
84
|
-
return ret;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
// -------------------------------------------------------------------------------------
|
|
89
|
-
// Option
|
|
90
|
-
// -------------------------------------------------------------------------------------
|
|
91
|
-
/** @internal */
|
|
92
|
-
var isNone = function (fa) { return fa._tag === 'None'; };
|
|
93
|
-
/** @internal */
|
|
94
|
-
var isSome = function (fa) { return fa._tag === 'Some'; };
|
|
95
|
-
/** @internal */
|
|
96
|
-
var none = { _tag: 'None' };
|
|
97
|
-
/** @internal */
|
|
98
|
-
var some = function (a) { return ({ _tag: 'Some', value: a }); };
|
|
99
|
-
// -------------------------------------------------------------------------------------
|
|
100
|
-
// Either
|
|
101
|
-
// -------------------------------------------------------------------------------------
|
|
102
|
-
/** @internal */
|
|
103
|
-
var isLeft = function (ma) { return ma._tag === 'Left'; };
|
|
104
|
-
/** @internal */
|
|
105
|
-
var left = function (e) { return ({ _tag: 'Left', left: e }); };
|
|
106
|
-
/** @internal */
|
|
107
|
-
var right = function (a) { return ({ _tag: 'Right', right: a }); };
|
|
108
|
-
// -------------------------------------------------------------------------------------
|
|
109
|
-
// Record
|
|
110
|
-
// -------------------------------------------------------------------------------------
|
|
111
|
-
/** @internal */
|
|
112
|
-
var has = Object.prototype.hasOwnProperty;
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* If a type `A` can form a `Semigroup` it has an **associative** binary operation.
|
|
116
|
-
*
|
|
117
|
-
* ```ts
|
|
118
|
-
* interface Semigroup<A> {
|
|
119
|
-
* readonly concat: (x: A, y: A) => A
|
|
120
|
-
* }
|
|
121
|
-
* ```
|
|
122
|
-
*
|
|
123
|
-
* Associativity means the following equality must hold for any choice of `x`, `y`, and `z`.
|
|
124
|
-
*
|
|
125
|
-
* ```ts
|
|
126
|
-
* concat(x, concat(y, z)) = concat(concat(x, y), z)
|
|
127
|
-
* ```
|
|
128
|
-
*
|
|
129
|
-
* A common example of a semigroup is the type `string` with the operation `+`.
|
|
130
|
-
*
|
|
131
|
-
* ```ts
|
|
132
|
-
* import { Semigroup } from 'fp-ts/Semigroup'
|
|
133
|
-
*
|
|
134
|
-
* const semigroupString: Semigroup<string> = {
|
|
135
|
-
* concat: (x, y) => x + y
|
|
136
|
-
* }
|
|
137
|
-
*
|
|
138
|
-
* const x = 'x'
|
|
139
|
-
* const y = 'y'
|
|
140
|
-
* const z = 'z'
|
|
141
|
-
*
|
|
142
|
-
* semigroupString.concat(x, y) // 'xy'
|
|
143
|
-
*
|
|
144
|
-
* semigroupString.concat(x, semigroupString.concat(y, z)) // 'xyz'
|
|
145
|
-
*
|
|
146
|
-
* semigroupString.concat(semigroupString.concat(x, y), z) // 'xyz'
|
|
147
|
-
* ```
|
|
148
|
-
*
|
|
149
|
-
* *Adapted from https://typelevel.org/cats*
|
|
150
|
-
*
|
|
151
|
-
* @since 2.0.0
|
|
152
|
-
*/
|
|
153
|
-
/**
|
|
154
|
-
* Given a struct of semigroups returns a semigroup for the struct.
|
|
155
|
-
*
|
|
156
|
-
* @example
|
|
157
|
-
* import { struct } from 'fp-ts/Semigroup'
|
|
158
|
-
* import * as N from 'fp-ts/number'
|
|
159
|
-
*
|
|
160
|
-
* interface Point {
|
|
161
|
-
* readonly x: number
|
|
162
|
-
* readonly y: number
|
|
163
|
-
* }
|
|
164
|
-
*
|
|
165
|
-
* const S = struct<Point>({
|
|
166
|
-
* x: N.SemigroupSum,
|
|
167
|
-
* y: N.SemigroupSum
|
|
168
|
-
* })
|
|
169
|
-
*
|
|
170
|
-
* assert.deepStrictEqual(S.concat({ x: 1, y: 2 }, { x: 3, y: 4 }), { x: 4, y: 6 })
|
|
171
|
-
*
|
|
172
|
-
* @category combinators
|
|
173
|
-
* @since 2.10.0
|
|
174
|
-
*/
|
|
175
|
-
var struct = function (semigroups) { return ({
|
|
176
|
-
concat: function (first, second) {
|
|
177
|
-
var r = {};
|
|
178
|
-
for (var k in semigroups) {
|
|
179
|
-
if (has.call(semigroups, k)) {
|
|
180
|
-
r[k] = semigroups[k].concat(first[k], second[k]);
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
return r;
|
|
184
|
-
}
|
|
185
|
-
}); };
|
|
186
|
-
// -------------------------------------------------------------------------------------
|
|
187
|
-
// instances
|
|
188
|
-
// -------------------------------------------------------------------------------------
|
|
189
|
-
/**
|
|
190
|
-
* Always return the first argument.
|
|
191
|
-
*
|
|
192
|
-
* @example
|
|
193
|
-
* import * as S from 'fp-ts/Semigroup'
|
|
194
|
-
*
|
|
195
|
-
* assert.deepStrictEqual(S.first<number>().concat(1, 2), 1)
|
|
196
|
-
*
|
|
197
|
-
* @category instances
|
|
198
|
-
* @since 2.10.0
|
|
199
|
-
*/
|
|
200
|
-
var first = function () { return ({ concat: identity }); };
|
|
201
|
-
/**
|
|
202
|
-
* Always return the last argument.
|
|
203
|
-
*
|
|
204
|
-
* @example
|
|
205
|
-
* import * as S from 'fp-ts/Semigroup'
|
|
206
|
-
*
|
|
207
|
-
* assert.deepStrictEqual(S.last<number>().concat(1, 2), 2)
|
|
208
|
-
*
|
|
209
|
-
* @category instances
|
|
210
|
-
* @since 2.10.0
|
|
211
|
-
*/
|
|
212
|
-
var last = function () { return ({ concat: function (_, y) { return y; } }); };
|
|
213
|
-
/**
|
|
214
|
-
* Use [`SemigroupSum`](./number.ts.html#SemigroupSum) instead.
|
|
215
|
-
*
|
|
216
|
-
* @category instances
|
|
217
|
-
* @since 2.0.0
|
|
218
|
-
* @deprecated
|
|
219
|
-
*/
|
|
220
|
-
var semigroupSum = {
|
|
221
|
-
concat: function (x, y) { return x + y; }
|
|
222
|
-
};
|
|
223
|
-
|
|
224
|
-
const semigroupDiff = {
|
|
225
|
-
concat: (x, y) => x - y,
|
|
226
|
-
};
|
|
227
|
-
|
|
228
|
-
const fromRectangle$1 = ({ x, y }) => {
|
|
229
|
-
return {
|
|
230
|
-
x,
|
|
231
|
-
y,
|
|
232
|
-
};
|
|
233
|
-
};
|
|
234
|
-
const fromMouseEvent = ({ clientX, clientY }) => {
|
|
235
|
-
return {
|
|
236
|
-
x: clientX,
|
|
237
|
-
y: clientY,
|
|
238
|
-
};
|
|
239
|
-
};
|
|
240
|
-
const pointDiffSemigroup = struct({
|
|
241
|
-
x: semigroupDiff,
|
|
242
|
-
y: semigroupDiff,
|
|
243
|
-
});
|
|
244
|
-
const pointSumSemigroup = struct({
|
|
245
|
-
x: semigroupSum,
|
|
246
|
-
y: semigroupSum,
|
|
247
|
-
});
|
|
248
|
-
|
|
249
|
-
exports.HandlerDirection = void 0;
|
|
250
|
-
(function (HandlerDirection) {
|
|
251
|
-
HandlerDirection[HandlerDirection["East"] = 0] = "East";
|
|
252
|
-
HandlerDirection[HandlerDirection["North"] = 1] = "North";
|
|
253
|
-
HandlerDirection[HandlerDirection["NorthEast"] = 2] = "NorthEast";
|
|
254
|
-
HandlerDirection[HandlerDirection["NorthWest"] = 3] = "NorthWest";
|
|
255
|
-
HandlerDirection[HandlerDirection["South"] = 4] = "South";
|
|
256
|
-
HandlerDirection[HandlerDirection["SouthEast"] = 5] = "SouthEast";
|
|
257
|
-
HandlerDirection[HandlerDirection["SouthWest"] = 6] = "SouthWest";
|
|
258
|
-
HandlerDirection[HandlerDirection["West"] = 7] = "West";
|
|
259
|
-
})(exports.HandlerDirection || (exports.HandlerDirection = {}));
|
|
260
|
-
const getCursorValue = (direction) => {
|
|
261
|
-
switch (direction) {
|
|
262
|
-
case exports.HandlerDirection.East:
|
|
263
|
-
return "e-resize";
|
|
264
|
-
case exports.HandlerDirection.North:
|
|
265
|
-
return "n-resize";
|
|
266
|
-
case exports.HandlerDirection.NorthEast:
|
|
267
|
-
return "ne-resize";
|
|
268
|
-
case exports.HandlerDirection.NorthWest:
|
|
269
|
-
return "nw-resize";
|
|
270
|
-
case exports.HandlerDirection.South:
|
|
271
|
-
return "s-resize";
|
|
272
|
-
case exports.HandlerDirection.SouthEast:
|
|
273
|
-
return "se-resize";
|
|
274
|
-
case exports.HandlerDirection.SouthWest:
|
|
275
|
-
return "sw-resize";
|
|
276
|
-
case exports.HandlerDirection.West:
|
|
277
|
-
return "w-resize";
|
|
278
|
-
default:
|
|
279
|
-
return "pointer";
|
|
280
|
-
}
|
|
281
|
-
};
|
|
282
|
-
const fromRectangle = (r) => [
|
|
283
|
-
{
|
|
284
|
-
position: fromRectangle$1(r),
|
|
285
|
-
direction: exports.HandlerDirection.NorthWest,
|
|
286
|
-
},
|
|
287
|
-
{
|
|
288
|
-
position: pointSumSemigroup.concat(fromRectangle$1(r), {
|
|
289
|
-
x: r.width,
|
|
290
|
-
y: 0,
|
|
291
|
-
}),
|
|
292
|
-
direction: exports.HandlerDirection.NorthEast,
|
|
293
|
-
},
|
|
294
|
-
{
|
|
295
|
-
position: pointSumSemigroup.concat(fromRectangle$1(r), {
|
|
296
|
-
x: 0,
|
|
297
|
-
y: r.height,
|
|
298
|
-
}),
|
|
299
|
-
direction: exports.HandlerDirection.SouthWest,
|
|
300
|
-
},
|
|
301
|
-
{
|
|
302
|
-
position: pointSumSemigroup.concat(fromRectangle$1(r), {
|
|
303
|
-
x: r.width,
|
|
304
|
-
y: r.height,
|
|
305
|
-
}),
|
|
306
|
-
direction: exports.HandlerDirection.SouthEast,
|
|
307
|
-
},
|
|
308
|
-
];
|
|
309
|
-
|
|
310
|
-
exports.first = first;
|
|
311
|
-
exports.flow = flow;
|
|
312
|
-
exports.fromMouseEvent = fromMouseEvent;
|
|
313
|
-
exports.fromRectangle = fromRectangle$1;
|
|
314
|
-
exports.fromRectangle$1 = fromRectangle;
|
|
315
|
-
exports.getCursorValue = getCursorValue;
|
|
316
|
-
exports.identity = identity;
|
|
317
|
-
exports.isLeft = isLeft;
|
|
318
|
-
exports.isNone = isNone;
|
|
319
|
-
exports.isSome = isSome;
|
|
320
|
-
exports.last = last;
|
|
321
|
-
exports.left = left;
|
|
322
|
-
exports.none = none;
|
|
323
|
-
exports.pipe = pipe;
|
|
324
|
-
exports.pointDiffSemigroup = pointDiffSemigroup;
|
|
325
|
-
exports.pointSumSemigroup = pointSumSemigroup;
|
|
326
|
-
exports.right = right;
|
|
327
|
-
exports.some = some;
|
|
328
|
-
exports.struct = struct;
|
|
329
|
-
exports.tuple = tuple;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-553c2b4f.js');
|
|
6
|
-
const Handler = require('./Handler-d1a8a86a.js');
|
|
7
|
-
|
|
8
|
-
const cropperHandlerCss = ":host{--size:20px;background:transparent;border:4px solid white;box-sizing:content-box;display:block;height:var(--size);touch-action:none;position:absolute;width:var(--size);z-index:4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host(.disabled){opacity:0.25}:host(.nw-resize){border-bottom:none;border-right:none;top:0;left:0}:host(.ne-resize){border-left:none;border-bottom:none;right:0;top:0}:host(.sw-resize){border-right:none;border-top:none;left:0;bottom:0}:host(.se-resize){border-left:none;border-top:none;bottom:0;right:0}";
|
|
9
|
-
|
|
10
|
-
let CropperHandler = class {
|
|
11
|
-
constructor(hostRef) {
|
|
12
|
-
index.registerInstance(this, hostRef);
|
|
13
|
-
this.disabled = false;
|
|
14
|
-
}
|
|
15
|
-
render() {
|
|
16
|
-
return (index.h(index.Host, { part: `handle ${Handler.getCursorValue(this.handler.direction)}`, class: {
|
|
17
|
-
disabled: this.disabled,
|
|
18
|
-
[Handler.getCursorValue(this.handler.direction)]: true,
|
|
19
|
-
}, style: {
|
|
20
|
-
"--size": "20px",
|
|
21
|
-
cursor: Handler.getCursorValue(this.handler.direction),
|
|
22
|
-
}, draggable: false }));
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
CropperHandler.style = cropperHandlerCss;
|
|
26
|
-
|
|
27
|
-
exports.cropper_handler = CropperHandler;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-553c2b4f.js');
|
|
6
|
-
|
|
7
|
-
const vviinnErrorCss = ":host{background:#F4F4F4;border-radius:8px;display:grid;grid-gap:20px;padding:24px;text-align:center}::slotted(svg){display:grid;align-self:center}::slotted(h4){margin:unset;font-weight:600;font-size:18px;line-height:24px}::slotted(span){font-size:14px;line-height:20px}::slotted(button){-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;background:transparent;color:var(--color-primary, var(--color-primary-system));font-weight:600;font-size:16px;line-height:20px;cursor:pointer}";
|
|
8
|
-
|
|
9
|
-
let VviinnError = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
index.registerInstance(this, hostRef);
|
|
12
|
-
}
|
|
13
|
-
render() {
|
|
14
|
-
return (index.h(index.Host, null, index.h("slot", { name: "icon" }), index.h("slot", { name: "title" }), index.h("slot", { name: "text" }), index.h("slot", { name: "action" })));
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
VviinnError.style = vviinnErrorCss;
|
|
18
|
-
|
|
19
|
-
exports.vviinn_error = VviinnError;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-553c2b4f.js');
|
|
6
|
-
const imageSearch_store = require('./imageSearch.store-042e9f45.js');
|
|
7
|
-
require('./Handler-d1a8a86a.js');
|
|
8
|
-
|
|
9
|
-
const vviinnPreloaderCss = ":host{--preloader-size:24px;--preloader-width:calc(var(--preloader-size) / 6);transform-origin:center;-webkit-animation:rotate 3s linear infinite;animation:rotate 3s linear infinite;border:var(--preloader-width) solid white;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}@-webkit-keyframes rotate{from{transform:rotate(-360deg)}to{transform:rotate(360deg)}}@keyframes rotate{from{transform:rotate(-360deg)}to{transform:rotate(360deg)}}";
|
|
10
|
-
|
|
11
|
-
let VviinnPreloader = class {
|
|
12
|
-
constructor(hostRef) {
|
|
13
|
-
index.registerInstance(this, hostRef);
|
|
14
|
-
}
|
|
15
|
-
isActive() {
|
|
16
|
-
return (imageSearch_store.imageSearchState.loading || imageSearch_store.imageSearchState.objectDetectionInProgress);
|
|
17
|
-
}
|
|
18
|
-
render() {
|
|
19
|
-
return (index.h(index.Host, { class: {
|
|
20
|
-
active: this.isActive(),
|
|
21
|
-
} }));
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
VviinnPreloader.style = vviinnPreloaderCss;
|
|
25
|
-
|
|
26
|
-
exports.vviinn_preloader = VviinnPreloader;
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-553c2b4f.js');
|
|
6
|
-
const imageSearch_store = require('./imageSearch.store-042e9f45.js');
|
|
7
|
-
const customizedSlots = require('./customized-slots-8bc78ad4.js');
|
|
8
|
-
require('./Handler-d1a8a86a.js');
|
|
9
|
-
|
|
10
|
-
const vviinnVpsWidgetCss = ":host{--color-primary-system:#0F62FE;--color-primary-hover-system:#014CDA;--color-icons-system:#2F8EDF;--spacer:8px}:host{display:block}.hidden{visibility:hidden;height:1px}vviinn-overlayed-modal.first-screen::part(title),vviinn-overlayed-modal.first-screen::part(secondary-action){visibility:hidden}.start-page{display:grid;grid-template-columns:repeat(2, 1fr);min-height:580px}.start-page_block{align-content:start;border-right:1px solid #F4F4F4;display:grid;padding:48px}.start-page_block.error{align-content:center}#onboarding-block{border-right:unset;box-sizing:border-box;grid-gap:24px;overflow-y:auto;position:relative;width:100%}vviinn-teaser{margin-bottom:32px;margin-top:-24px}vviinn-image-selector{align-items:center;background:var(--color-primary, var(--color-primary-system));border-color:var(--color-primary, var(--color-primary-system));border-radius:2px;color:white;display:grid;font-size:16px;font-weight:600;height:56px;justify-items:center;margin-bottom:16px;transition:background 0.1s ease-in-out}vviinn-image-selector:hover{background:var(--color-primary-hover, var(--color-primary-hover-system));border-color:var(--color-primary-hover, var(--color-primary-hover-system))}vviinn-image-selector:active{border-color:black}.upload-button-content{display:grid;align-items:center;justify-items:start;justify-content:center;grid-template-columns:-webkit-max-content auto;grid-template-columns:max-content auto;grid-gap:16px}.results-page{display:grid;grid-template-columns:336px auto;box-sizing:border-box}.results-page>*{padding:24px;box-sizing:border-box}.products{align-content:center;align-items:start;box-sizing:border-box;display:grid;grid-gap:32px 16px;grid-template-columns:repeat(auto-fill, minmax(152px, 1fr));justify-items:center;padding:24px;padding-right:0;position:absolute;width:calc(100% - 16px)}.products.hidden{display:none}vviinn-empty-results{width:280px;align-self:center;justify-self:center}.products-wrapper{display:grid;overflow-y:auto;overflow-x:hidden;padding:unset;position:relative;width:100%}.image-wrapper{border-right:1px solid #F4F4F4;display:grid;grid-template-rows:-webkit-min-content 170px;grid-template-rows:min-content 170px;grid-gap:24px;min-width:100%}.onboarding-wrapper{position:absolute;width:100%;padding:48px;box-sizing:border-box;display:grid;grid-gap:64px;padding-bottom:24px}vviinn-product-card{gap:0;width:100%}vviinn-product-card::part(image){border:1px solid #eaeaea;margin-bottom:8px}vviinn-product-card::part(price-container),vviinn-product-card::part(deeplink),vviinn-product-card::part(title){align-self:start}search-filters span{display:none}search-filters::part(filter){background:#F4F4F4;border-radius:4px;border:1px solid #F4F4F4;box-sizing:border-box;color:#161616;font-size:14px;font-weight:600;line-height:20px}search-filters::part(show-more-filters){border:1px solid #f4f4f4;border-radius:4px;box-sizing:border-box;color:#161616;font-size:14px;font-weight:600;line-height:20px;padding:6px 16px}search-filters::part(show-more-filters):hover{background:#EAEAEA}search-filters::part(filter):hover{background:#EAEAEA}search-filters::part(filter):focus{outline:none;border:1px solid var(--color-primary, var(--color-primary-system))}search-filters::part(filter active){background:rgba(15, 98, 254, 0.15);color:var(--color-primary, var(--color-primary-system))}.filters-wrapper{overflow:auto}.results-page:not(.active){display:none}.nothing-found{display:grid;grid-gap:64px;justify-self:center;padding-top:64px;padding-bottom:16px;position:absolute;width:60%}@media (max-width: 768px){.start-page_block{padding:24px}.onboarding-wrapper{padding:24px}}@media (max-width: 640px){.start-page{grid-template-rows:-webkit-min-content;grid-template-rows:min-content;grid-template-columns:unset;grid-gap:48px;padding:24px 0 48px 0}}@media (max-width: 640px) and (min-width: 415px){.onboarding-wrapper{position:unset}#onboarding-block{overflow:unset}.start-page.active{height:1px;overflow:auto}}@media (max-width: 415px){.results-page>*{box-sizing:border-box;padding:24px}vviinn-slide{padding-bottom:48px}.start-page_block:last-of-type{border-right:unset;overflow-y:unset;position:static;box-sizing:border-box;width:unset}.start-page_block{padding:0 24px}vviinn-teaser{margin-top:24px}.onboarding-wrapper{position:static;width:unset;padding:unset;box-sizing:border-box}.results-page{grid-template-columns:unset;grid-template-rows:-webkit-min-content auto;grid-template-rows:min-content auto}.image{margin-bottom:8px}.image-wrapper{grid-template-rows:-webkit-min-content auto;grid-template-rows:min-content auto;width:100%}.products-wrapper{align-content:start;position:static;overflow-y:unset;width:100%;padding-top:0}.products{position:static;padding:0;width:unset;grid-gap:32px 16px;justify-content:center}.nothing-found{position:static;grid-gap:64px;padding:unset;align-content:start;width:unset}}@media (max-width: 320px){.products{grid-template-columns:unset}}vviinn-wrong-format,vviinn-server-error{width:280px;align-self:center;justify-self:center}";
|
|
11
|
-
|
|
12
|
-
let VviinnVpsWidget = class {
|
|
13
|
-
constructor(hostRef) {
|
|
14
|
-
index.registerInstance(this, hostRef);
|
|
15
|
-
/** When true modal window with widget will be shown */
|
|
16
|
-
this.active = false;
|
|
17
|
-
/** Currency sign will shown after price */
|
|
18
|
-
this.currencySign = "€";
|
|
19
|
-
/** Locale for currency formatting */
|
|
20
|
-
this.locale = "de-DE";
|
|
21
|
-
this.slidePosition = 0;
|
|
22
|
-
this.width = 0;
|
|
23
|
-
this.wrongImageFormat = false;
|
|
24
|
-
}
|
|
25
|
-
activeWatcher(value) {
|
|
26
|
-
if (value) {
|
|
27
|
-
this.overflow = document.body.style.overflow;
|
|
28
|
-
document.body.style.overflow = "hidden";
|
|
29
|
-
}
|
|
30
|
-
else {
|
|
31
|
-
document.body.style.overflow = this.overflow;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
componentWillLoad() {
|
|
35
|
-
customizedSlots.slotChangeListener(this, this.el);
|
|
36
|
-
}
|
|
37
|
-
connectedCallback() {
|
|
38
|
-
imageSearch_store.state$1.apiPath = this.apiPath;
|
|
39
|
-
imageSearch_store.state$1.currencySign = this.currencySign;
|
|
40
|
-
imageSearch_store.state$1.locale = this.locale;
|
|
41
|
-
imageSearch_store.imageSearchState.token = this.token;
|
|
42
|
-
}
|
|
43
|
-
handleImageSelection() {
|
|
44
|
-
this.slidePosition = 1;
|
|
45
|
-
const root = this.el.shadowRoot.querySelector("vviinn-overlayed-modal");
|
|
46
|
-
const overlay = root.shadowRoot.querySelector("vviinn-overlay");
|
|
47
|
-
const modal = overlay.querySelector("vviinn-modal");
|
|
48
|
-
const modalBody = modal.shadowRoot.querySelector(".body");
|
|
49
|
-
modalBody.scrollTop = 0;
|
|
50
|
-
}
|
|
51
|
-
resetState() {
|
|
52
|
-
this.resetScroll("onboarding-block");
|
|
53
|
-
this.slidePosition = 0;
|
|
54
|
-
imageSearch_store.imageSearchState.image = imageSearch_store.Option.none;
|
|
55
|
-
imageSearch_store.imageSearchState.imageUrl = imageSearch_store.Option.none;
|
|
56
|
-
imageSearch_store.imageSearchState.imageBounds = imageSearch_store.Option.none;
|
|
57
|
-
imageSearch_store.imageSearchState.searchArea = imageSearch_store.Option.none;
|
|
58
|
-
imageSearch_store.imageSearchState.results = [];
|
|
59
|
-
imageSearch_store.imageSearchState.filters = [];
|
|
60
|
-
imageSearch_store.imageSearchState.detectedObjects = [];
|
|
61
|
-
imageSearch_store.imageSearchState.activeIonLink = undefined;
|
|
62
|
-
imageSearch_store.imageSearchState.rectangleSearchForm = undefined;
|
|
63
|
-
this.resetScroll("results-block");
|
|
64
|
-
}
|
|
65
|
-
haveErrors() {
|
|
66
|
-
return this.wrongImageFormat || imageSearch_store.imageSearchState.serverError;
|
|
67
|
-
}
|
|
68
|
-
resetScroll(elementId, behavior = "auto") {
|
|
69
|
-
const element = this.el.shadowRoot.getElementById(elementId);
|
|
70
|
-
element.scroll({ top: 0, left: 0, behavior });
|
|
71
|
-
}
|
|
72
|
-
handleModalClose() {
|
|
73
|
-
this.active = false;
|
|
74
|
-
this.resetState();
|
|
75
|
-
const elementsToReset = ["onboarding-block", "results-block"];
|
|
76
|
-
elementsToReset.forEach((name) => this.resetScroll(name));
|
|
77
|
-
}
|
|
78
|
-
render() {
|
|
79
|
-
return (index.h(index.Host, null, index.h("vviinn-overlayed-modal", { class: { "first-screen": this.slidePosition === 0 }, active: this.active, onSecondaryActionClicked: () => this.resetState(), onModalClosed: () => this.handleModalClose(), exportparts: "secondary-action, title, close-button" }, index.h("vviinn-slider", { showBullets: false, position: this.slidePosition }, index.h("vviinn-slide", { class: { "start-page": true } }, index.h("div", { class: {
|
|
80
|
-
error: this.haveErrors(),
|
|
81
|
-
"start-page_block": true,
|
|
82
|
-
} }, index.h("vviinn-wrong-format", { class: { hidden: !this.wrongImageFormat }, onActionClick: () => (this.wrongImageFormat = false) }), index.h("vviinn-server-error", { class: { hidden: !imageSearch_store.imageSearchState.serverError }, onActionClick: () => (imageSearch_store.imageSearchState.serverError = false) }), index.h("vviinn-teaser", { class: { hidden: this.haveErrors() } }), index.h("vviinn-image-selector", { class: { hidden: this.haveErrors() }, onImageSelected: () => this.handleImageSelection(), onImageSelectedError: () => (this.wrongImageFormat = true), part: "select-image_button" }, index.h("span", { slot: "upload-button-text", class: "upload-button-content" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "29", height: "28", fill: "none" }, index.h("defs", null), index.h("path", { fill: "#fff", "fill-rule": "evenodd", d: "M10.271 3.89A.875.875 0 0111 3.5h7c.293 0 .566.146.728.39l1.49 2.235h3.033a2.625 2.625 0 012.625 2.625V21a2.625 2.625 0 01-2.625 2.625H5.75A2.625 2.625 0 013.125 21V8.75A2.625 2.625 0 015.75 6.125h3.031l1.49-2.235zm1.197 1.36l-1.49 2.235a.875.875 0 01-.729.39H5.75a.875.875 0 00-.875.875V21a.875.875 0 00.875.875h17.5a.875.875 0 00.875-.875V8.75a.875.875 0 00-.875-.875h-3.5a.875.875 0 01-.729-.39l-1.49-2.235h-6.063z", "clip-rule": "evenodd" }), index.h("path", { fill: "#fff", "fill-rule": "evenodd", d: "M14.5 11.375a3.062 3.062 0 100 6.125 3.062 3.062 0 000-6.125zm-4.813 3.063a4.812 4.812 0 119.625 0 4.812 4.812 0 01-9.625 0z", "clip-rule": "evenodd" })), index.h("slot", { name: "vviinn-image-upload-button-text" }, index.h("span", null, "Kamera oder Bild ausw\u00E4hlen")))), index.h("vviinn-privacy-badge", { class: { hidden: this.haveErrors() } })), index.h("div", { id: "onboarding-block", class: "start-page_block" }, index.h("div", { class: "onboarding-wrapper" }, index.h("vviinn-onboarding", null), index.h("vviinn-example-images", { onImageSelected: () => this.handleImageSelection(), onImageSelectedError: () => this.resetScroll("onboarding-block", "smooth") })))), index.h("vviinn-slide", { class: { "results-page": true, active: this.slidePosition == 1 } }, index.h("div", { class: "image-wrapper" }, index.h("vviinn-image-view", null), index.h("div", { class: "filters-wrapper" }, index.h("div", { class: "filters" }, imageSearch_store.imageSearchState.filters.map((filter) => (index.h("search-filters", { filter: filter })))))), index.h("div", { id: "results-block", class: "products-wrapper" }, index.h("div", { class: { "nothing-found": true, hidden: imageSearch_store.imageSearchState.results.length > 0 } }, index.h("vviinn-empty-results", null), index.h("vviinn-onboarding", null)), index.h("div", { class: {
|
|
83
|
-
hidden: imageSearch_store.imageSearchState.results.length <= 0,
|
|
84
|
-
products: true,
|
|
85
|
-
} }, imageSearch_store.imageSearchState.results.map((p) => {
|
|
86
|
-
var _a;
|
|
87
|
-
return (index.h("vviinn-product-card", { hidden: true, productTitle: p.title, productId: p.productId, brand: p.brand, deeplink: p.deeplink, price: p.price.actual, salePrice: p.price.sale, imageWidth: 160, image: (_a = p.image.thumbnail) !== null && _a !== void 0 ? _a : p.image.original, part: "product-card" }));
|
|
88
|
-
}))))))));
|
|
89
|
-
}
|
|
90
|
-
get el() { return index.getElement(this); }
|
|
91
|
-
static get watchers() { return {
|
|
92
|
-
"active": ["activeWatcher"]
|
|
93
|
-
}; }
|
|
94
|
-
};
|
|
95
|
-
VviinnVpsWidget.style = vviinnVpsWidgetCss;
|
|
96
|
-
|
|
97
|
-
exports.vviinn_vps_widget = VviinnVpsWidget;
|