vviinn-widgets 2.20.21 → 2.20.29
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/highlight-box_22.cjs.entry.js +25 -10
- package/dist/cjs/i18next-74ff3413.js +2258 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{package-1c24894e.js → package-fc932371.js} +1 -1
- package/dist/cjs/vviinn-carousel_3.cjs.entry.js +86 -65
- package/dist/cjs/vviinn-recommendations-sidebar.cjs.entry.js +2 -1
- package/dist/cjs/vviinn-vpr-button.cjs.entry.js +4 -2
- package/dist/cjs/vviinn-vps-button.cjs.entry.js +1 -1
- package/dist/cjs/vviinn-vps-widget.cjs.entry.js +69 -2
- package/dist/cjs/vviinn-widgets.cjs.js +1 -1
- package/dist/collection/components/vviinn-error/vviinn-empty-results/vviinn-empty-results.js +2 -1
- package/dist/collection/components/vviinn-example-images/vviinn-example-images.js +19 -1
- package/dist/collection/components/vviinn-modal/vviinn-modal.css +20 -2
- package/dist/collection/components/vviinn-modal/vviinn-modal.js +12 -1
- package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-1/vviinn-onboarding-card-1.js +43 -1
- package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-2/vviinn-onboarding-card-2.js +43 -1
- package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-3/vviinn-onboarding-card-3.js +43 -1
- package/dist/collection/components/vviinn-onboarding/vviinn-onboarding.js +2 -1
- package/dist/collection/components/vviinn-privacy-badge/vviinn-privacy-badge.js +25 -1
- package/dist/collection/components/vviinn-product-card/stories/vviinn-product-card.stories.js +1 -1
- package/dist/collection/components/vviinn-teaser/vviinn-teaser.js +2 -1
- package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.js +24 -1
- package/dist/collection/components/vviinn-vpr-button/stories/vviinn-vpr-button.stories.js +5 -1
- package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.js +29 -4
- package/dist/collection/components/vviinn-vpr-widget/stories/vviinn-vpr-widget.stories.js +5 -2
- package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-vidget.js +26 -12
- package/dist/collection/components/vviinn-vps-button/stories/vviinn-vps-button.stories.js +3 -0
- package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.js +9 -4
- package/dist/collection/components/vviinn-vps-widget/stories/vviinn-vps-widget.stories.js +10 -8
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +22 -10
- package/dist/collection/locale/index.js +1 -0
- package/dist/collection/locale/resources-vpr.js +12 -0
- package/dist/collection/locale/resources-vps.js +60 -0
- package/dist/esm/highlight-box_22.entry.js +25 -10
- package/dist/esm/i18next-387f2b0a.js +2256 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/package-e2f2d588.js +3 -0
- package/dist/esm/vviinn-carousel_3.entry.js +86 -65
- package/dist/esm/vviinn-recommendations-sidebar.entry.js +2 -1
- package/dist/esm/vviinn-vpr-button.entry.js +4 -2
- package/dist/esm/vviinn-vps-button.entry.js +1 -1
- package/dist/esm/vviinn-vps-widget.entry.js +69 -2
- package/dist/esm/vviinn-widgets.js +1 -1
- package/dist/types/components/vviinn-example-images/vviinn-example-images.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 +2 -0
- package/dist/types/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-2/vviinn-onboarding-card-2.d.ts +2 -0
- package/dist/types/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-3/vviinn-onboarding-card-3.d.ts +2 -0
- package/dist/types/components/vviinn-privacy-badge/vviinn-privacy-badge.d.ts +1 -0
- package/dist/types/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.d.ts +2 -0
- package/dist/types/components/vviinn-vpr-button/vviinn-vpr-button.d.ts +5 -2
- package/dist/types/components/vviinn-vpr-widget/vviinn-vpr-vidget.d.ts +5 -4
- package/dist/types/components/vviinn-vps-button/vviinn-vps-button.d.ts +3 -2
- package/dist/types/components/vviinn-vps-widget/vviinn-vps-widget.d.ts +3 -2
- package/dist/types/components.d.ts +48 -20
- package/dist/types/locale/index.d.ts +1 -0
- package/dist/types/locale/resources-vpr.d.ts +2 -0
- package/dist/types/locale/resources-vps.d.ts +2 -0
- package/dist/vviinn-widgets/p-2e76a5c3.js +1 -0
- package/dist/vviinn-widgets/p-51dd5bb7.entry.js +1 -0
- package/dist/vviinn-widgets/p-5283bad8.entry.js +1 -0
- package/dist/vviinn-widgets/p-643545b1.entry.js +1 -0
- package/dist/vviinn-widgets/p-a4d06752.entry.js +1 -0
- package/dist/vviinn-widgets/p-c06f6765.entry.js +1 -0
- package/dist/vviinn-widgets/p-d99266bf.js +1 -0
- package/dist/vviinn-widgets/p-df710209.entry.js +1 -0
- package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
- package/package.json +3 -2
- package/www/build/p-2e76a5c3.js +1 -0
- package/www/build/p-51dd5bb7.entry.js +1 -0
- package/www/build/p-5283bad8.entry.js +1 -0
- package/www/build/p-643545b1.entry.js +1 -0
- package/www/build/p-9e468d0a.js +161 -0
- package/www/build/p-a4d06752.entry.js +1 -0
- package/www/build/p-c06f6765.entry.js +1 -0
- package/www/build/p-d99266bf.js +1 -0
- package/www/build/p-df710209.entry.js +1 -0
- package/www/build/p-e0153ae2.css +6 -0
- package/www/build/vviinn-widgets.esm.js +1 -1
- package/www/index.html +4 -1
- package/dist/esm/package-4909a9ed.js +0 -3
- package/dist/vviinn-widgets/p-1aa66c1a.entry.js +0 -1
- package/dist/vviinn-widgets/p-4cb106e3.entry.js +0 -1
- package/dist/vviinn-widgets/p-637925f0.entry.js +0 -1
- package/dist/vviinn-widgets/p-6a189f8f.js +0 -1
- package/dist/vviinn-widgets/p-a1c3ccce.entry.js +0 -1
- package/dist/vviinn-widgets/p-ab973311.entry.js +0 -1
- package/dist/vviinn-widgets/p-e5fbf695.entry.js +0 -1
- package/www/build/p-1aa66c1a.entry.js +0 -1
- package/www/build/p-3fe5816c.js +0 -1
- package/www/build/p-4cb106e3.entry.js +0 -1
- package/www/build/p-637925f0.entry.js +0 -1
- package/www/build/p-6a189f8f.js +0 -1
- package/www/build/p-a1c3ccce.entry.js +0 -1
- package/www/build/p-a67898be.css +0 -1
- package/www/build/p-ab973311.entry.js +0 -1
- package/www/build/p-e5fbf695.entry.js +0 -1
|
@@ -11,19 +11,21 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
11
11
|
return t;
|
|
12
12
|
};
|
|
13
13
|
import { Host, h, } from "@stencil/core";
|
|
14
|
-
import { version } from "../../../package.json";
|
|
15
|
-
import { state } from "../../store/store";
|
|
16
|
-
import { imageSearchState } from "../../store/imageSearch.store";
|
|
17
14
|
import * as O from "fp-ts/lib/Option";
|
|
15
|
+
import { pipe } from "fp-ts/lib/function";
|
|
18
16
|
import { isEmpty } from "fp-ts/string";
|
|
19
|
-
import { slotChangeListener } from "../customized-slots";
|
|
20
17
|
import { v4 as uuidv4 } from "uuid";
|
|
18
|
+
import i18next from "i18next";
|
|
19
|
+
import { version } from "../../../package.json";
|
|
20
|
+
import { imageSearchState } from "../../store/imageSearch.store";
|
|
21
|
+
import { state } from "../../store/store";
|
|
22
|
+
import { slotChangeListener } from "../customized-slots";
|
|
21
23
|
import { createTrackingApi } from "../../openApi";
|
|
22
24
|
import { createFilterEvent, createProductClickVpsEvent, createProductViewVpsEvent, createSearchEvent, createWidgetVpsEvent, } from "../../tracking";
|
|
23
|
-
import { pipe } from "fp-ts/lib/function";
|
|
24
25
|
import { SlotSkeleton } from "../customized-slots";
|
|
25
26
|
import { campaignTypeNames } from "../../campaign/Campaign";
|
|
26
27
|
import { parseExcluded } from "../../utils/collections/collectionsUtils";
|
|
28
|
+
import { resources } from "../../locale/resources-vps";
|
|
27
29
|
const filterInt = (value) => /^[-+]?(\d+|Infinity)$/.test(value) ? Number(value) : NaN;
|
|
28
30
|
const notEmptyString = (s) => !isEmpty(s);
|
|
29
31
|
const notNan = (n) => !isNaN(n);
|
|
@@ -204,6 +206,11 @@ export class VviinnVpsWidget {
|
|
|
204
206
|
this.uiSessionId = uuidv4();
|
|
205
207
|
this.trackingApi = createTrackingApi(this.apiPath, this.token);
|
|
206
208
|
this.id = this.el.id;
|
|
209
|
+
i18next.init({
|
|
210
|
+
lng: this.locale,
|
|
211
|
+
fallbackLng: "de-DE",
|
|
212
|
+
resources,
|
|
213
|
+
});
|
|
207
214
|
}
|
|
208
215
|
componentWillLoad() {
|
|
209
216
|
slotChangeListener(this, this.el);
|
|
@@ -290,7 +297,7 @@ export class VviinnVpsWidget {
|
|
|
290
297
|
}
|
|
291
298
|
}, onVviinnNoResult: () => (this.wrongImageFormat = true), resetVpsButton: this.resetVpsButton, basicEventData: this.getBasicEventData(), part: "select-image_button", startUpload: this.buttonPressed &&
|
|
292
299
|
this.showingInButton &&
|
|
293
|
-
this.mode === "upload" }, h("span", { slot: "upload-button-text", class: "upload-button-content" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "29", height: "28", fill: "none" }, h("defs", null), 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" }), 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" })), h("slot", { name: "vviinn-image-upload-button-text" }, h("span", null, "
|
|
300
|
+
this.mode === "upload" }, h("span", { slot: "upload-button-text", class: "upload-button-content" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "29", height: "28", fill: "none" }, h("defs", null), 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" }), 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" })), h("slot", { name: "vviinn-image-upload-button-text" }, h("span", null, i18next.t("imageUploadButtonText"))))), h("vviinn-privacy-badge", { class: { hidden: this.haveErrors() }, privacyBadgeText: i18next.t("privacyBadgeText") })), h("div", { id: "onboarding-block", class: "start-page_block" }, h("div", { class: "onboarding-wrapper" }, h("vviinn-onboarding", null), h("vviinn-example-images", { part: "example-images", exampleImagesTitle: i18next.t("exampleImagesTitle"), onVviinnImageUpload: () => this.handleImageSelection("example"), onVviinnNoResult: () => this.resetScroll("onboarding-block", "smooth"), basicEventData: this.getBasicEventData() })))), h("vviinn-slide", { class: { "results-page": true, active: this.slidePosition == 1 } }, h("div", { class: "image-wrapper" }, h("vviinn-image-view", { basicEventData: this.getBasicEventData() }), h("div", { class: "filters-wrapper" }, h("div", { class: "filters" }, imageSearchState.filters.map((filter) => (h("search-filters", { filter: filter, basicEventData: this.getBasicEventData() })))))), h("div", { id: "results-block", class: "products-wrapper" }, h("div", { class: {
|
|
294
301
|
"nothing-found": true,
|
|
295
302
|
hidden: imageSearchState.results.length > 0,
|
|
296
303
|
} }, h("vviinn-empty-results", null), h("vviinn-onboarding", null)), h("div", { class: {
|
|
@@ -372,15 +379,20 @@ export class VviinnVpsWidget {
|
|
|
372
379
|
"type": "string",
|
|
373
380
|
"mutable": false,
|
|
374
381
|
"complexType": {
|
|
375
|
-
"original": "
|
|
376
|
-
"resolved": "
|
|
377
|
-
"references": {
|
|
382
|
+
"original": "Locale",
|
|
383
|
+
"resolved": "\"de-DE\" | \"en-US\"",
|
|
384
|
+
"references": {
|
|
385
|
+
"Locale": {
|
|
386
|
+
"location": "import",
|
|
387
|
+
"path": "../../locale"
|
|
388
|
+
}
|
|
389
|
+
}
|
|
378
390
|
},
|
|
379
391
|
"required": false,
|
|
380
392
|
"optional": false,
|
|
381
393
|
"docs": {
|
|
382
394
|
"tags": [],
|
|
383
|
-
"text": "The locale for currency formatting"
|
|
395
|
+
"text": "The locale for currency formatting and text localization"
|
|
384
396
|
},
|
|
385
397
|
"attribute": "locale",
|
|
386
398
|
"reflect": false,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export const resources = {
|
|
2
|
+
"de-DE": {
|
|
3
|
+
translation: {
|
|
4
|
+
exampleImagesTitle: "Mit den Beispielbildern die Suche direkt ausprobieren",
|
|
5
|
+
imageUploadButtonText: "Kamera oder Bild auswählen",
|
|
6
|
+
privacyBadgeText: "Durch das Hochladen eines Bildes willigst Du in die Verarbeitung durch unseren Partner Vviinn ein. Das Bild wird nach einer Stunde Inaktivität gelöscht.",
|
|
7
|
+
teaserText_1: "Finde Produkte auf",
|
|
8
|
+
teaserText_2: "einem Foto",
|
|
9
|
+
imageSearchModalTitle: "Bildsuche",
|
|
10
|
+
onboardingBlock: {
|
|
11
|
+
onboardingTitleText: "So funktioniert es",
|
|
12
|
+
onboardingCard1: {
|
|
13
|
+
title: "Starte die Bildsuche",
|
|
14
|
+
text: "Lade ein Bild aus Deiner Galerie hoch oder fotografiere ein Produkt mit Deiner Kamera.",
|
|
15
|
+
},
|
|
16
|
+
onboardingCard2: {
|
|
17
|
+
title: "Verfeiner Deine Suche",
|
|
18
|
+
text: "Du kannst den Bildrahmen selber festlegen und so die Produkte genau auswählen.",
|
|
19
|
+
},
|
|
20
|
+
onboardingCard3: {
|
|
21
|
+
title: "Ohne Hintergrund",
|
|
22
|
+
text: "Die besten Ergebnisse erhältst Du, wenn das gesuchte Objekt mit einfarbigem und hellem Hintergrund zu sehen ist.",
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
emptyResultsBlock: {
|
|
26
|
+
title: "Leider nichts gefunden",
|
|
27
|
+
text: "Leider konnten wir keine passenden Produkte finden. Bitte versuche es mit einem anderen Bildausschnitt noch einmal.",
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
en: {
|
|
32
|
+
translation: {
|
|
33
|
+
exampleImagesTitle: "Try out the search with the example images",
|
|
34
|
+
imageUploadButtonText: "Select camera or image",
|
|
35
|
+
privacyBadgeText: "By uploading a picture you agree to the processing by our partner Vviinn. The image will be deleted after one hour of inactivity.",
|
|
36
|
+
teaserText_1: "Find products in a photo",
|
|
37
|
+
teaserText_2: "",
|
|
38
|
+
imageSearchModalTitle: "Visual Search",
|
|
39
|
+
onboardingBlock: {
|
|
40
|
+
onboardingTitleText: "This is how it works",
|
|
41
|
+
onboardingCard1: {
|
|
42
|
+
title: "Start the Visual Search",
|
|
43
|
+
text: "Upload a picture from your gallery or take a picture of a product with your camera.",
|
|
44
|
+
},
|
|
45
|
+
onboardingCard2: {
|
|
46
|
+
title: "Refine Your Search",
|
|
47
|
+
text: "You can set the frame yourself, so you can choose exactly what you want.",
|
|
48
|
+
},
|
|
49
|
+
onboardingCard3: {
|
|
50
|
+
title: "Without Background",
|
|
51
|
+
text: "For best results, display the object you are looking for against a monochrome, light background.",
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
emptyResultsBlock: {
|
|
55
|
+
title: "Sorry, nothing was found",
|
|
56
|
+
text: "Sorry, we could not find any matching products. Please try again by selecting a different area of the image.",
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, c as createEvent, g as getElement } from './index-48ef9564.js';
|
|
2
2
|
import { O as Option, o as sequenceToOption, i as imageSearchState, a as _function, t as transform, q as move, r as makeRectangularSearchRequest, u as fromAlt, v as foldValueObject, w as scaleWithSized, x as center, y as detectedObjectEq, z as toFile, B as processSelectedFile, E as Either, C as match, D as fromImage, F as dimensionsFromImage, G as scaleByLargestSide, N as NonEmptyArray } from './imageSearch.store-7c025e20.js';
|
|
3
3
|
import { p as pipe, q as pointDiffSemigroup, u as fromMouseEvent } from './Handler-7bfee84f.js';
|
|
4
|
+
import { i as instance } from './i18next-387f2b0a.js';
|
|
4
5
|
import { s as slotChangeListener } from './customized-slots-b372eaed.js';
|
|
5
6
|
import { c as campaignTypeNames } from './Campaign-1af6ed38.js';
|
|
6
7
|
import { O as OnboardingCard1Icon, c as OnboardingCard2Icon, d as OnboardingCard3Icon, A as ArrowIcon } from './index-33bc6d2c.js';
|
|
@@ -333,7 +334,7 @@ const VviinnEmptyResults = class {
|
|
|
333
334
|
registerInstance(this, hostRef);
|
|
334
335
|
}
|
|
335
336
|
render() {
|
|
336
|
-
return (h(Host, null, h("vviinn-error", null, h("svg", { slot: "icon", class: "icon", width: "32", height: "32", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M16 2a14 14 0 1 0 0 28 14 14 0 0 0 0-28Zm0 26a12 12 0 1 1 0-24 12 12 0 0 1 0 24Z", fill: "#525252" }), h("path", { d: "M17 8h-2v11h2V8Zm-1 14a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z", fill: "#525252" })), h("h4", { slot: "title" }, "
|
|
337
|
+
return (h(Host, null, h("vviinn-error", null, h("svg", { slot: "icon", class: "icon", width: "32", height: "32", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M16 2a14 14 0 1 0 0 28 14 14 0 0 0 0-28Zm0 26a12 12 0 1 1 0-24 12 12 0 0 1 0 24Z", fill: "#525252" }), h("path", { d: "M17 8h-2v11h2V8Zm-1 14a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z", fill: "#525252" })), h("h4", { slot: "title" }, instance.t("emptyResultsBlock.title")), h("span", { slot: "text" }, instance.t("emptyResultsBlock.text")))));
|
|
337
338
|
}
|
|
338
339
|
};
|
|
339
340
|
VviinnEmptyResults.style = vviinnEmptyResultsCss;
|
|
@@ -382,6 +383,7 @@ const VviinnExampleImages = class {
|
|
|
382
383
|
this.vviinnImageUpload = createEvent(this, "vviinnImageUpload", 7);
|
|
383
384
|
this.vviinnNoResult = createEvent(this, "vviinnNoResult", 7);
|
|
384
385
|
this.basicEventData = undefined;
|
|
386
|
+
this.exampleImagesTitle = undefined;
|
|
385
387
|
}
|
|
386
388
|
componentWillLoad() {
|
|
387
389
|
slotChangeListener(this, this.el);
|
|
@@ -392,7 +394,7 @@ const VviinnExampleImages = class {
|
|
|
392
394
|
firstExampleImage.focus();
|
|
393
395
|
}
|
|
394
396
|
render() {
|
|
395
|
-
return (h(Host, { onFocus: () => this.delegateFocus() }, h("slot", { name: "vviinn-example-images-title" }, h("h3", null,
|
|
397
|
+
return (h(Host, { onFocus: () => this.delegateFocus() }, h("slot", { name: "vviinn-example-images-title" }, h("h3", null, this.exampleImagesTitle)), h("div", { class: "images", ref: (el) => (this.imagesBlock = el) }, h("slot", { name: "vviinn-example-images-1" }, h("vviinn-example-image", { width: 480, height: 640, src: "https://cdn.vviinn.com/0/fit/480/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDEtTC5qcGc=", basicEventData: this.basicEventData })), h("slot", { name: "vviinn-example-images-2" }, h("vviinn-example-image", { width: 280, height: 480, src: "https://cdn.vviinn.com/0/fit/480/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDItTS5qcGc=", basicEventData: this.basicEventData })), h("slot", { name: "vviinn-example-images-3" }, h("vviinn-example-image", { width: 280, height: 480, src: "https://cdn.vviinn.com/0/fit/480/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDMtTS5qcGc=", basicEventData: this.basicEventData })), h("slot", { name: "vviinn-example-images-4" }, h("vviinn-example-image", { width: 480, height: 640, src: "https://cdn.vviinn.com/0/fit/480/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDQtTC5qcGc=", basicEventData: this.basicEventData })))));
|
|
396
398
|
}
|
|
397
399
|
get el() { return getElement(this); }
|
|
398
400
|
};
|
|
@@ -481,7 +483,7 @@ const VviinnImageView = class {
|
|
|
481
483
|
};
|
|
482
484
|
VviinnImageView.style = vviinnImageViewCss;
|
|
483
485
|
|
|
484
|
-
const vviinnModalCss = ":host{background:white;border-radius:4px;box-sizing:border-box;display:grid;grid-template-rows:min-content auto;max-width:960px;overflow:auto}@media (max-width: 640px){:host{animation-name:fade-in;animation-duration:0.5s;animation-fill-mode:forwards}:host(.closed){animation-name:fade-out;animation-fill-mode:none}.body{overflow-y:auto}}.head{align-items:center;border-bottom:1px solid #f4f4f4;
|
|
486
|
+
const vviinnModalCss = ":host{background:white;border-radius:4px;box-sizing:border-box;display:grid;grid-template-rows:min-content auto;max-width:960px;overflow:auto}@media (max-width: 640px){:host{animation-name:fade-in;animation-duration:0.5s;animation-fill-mode:forwards}:host(.closed){animation-name:fade-out;animation-fill-mode:none}.body{overflow-y:auto}}.head{display:flex;align-items:center;border-bottom:1px solid #f4f4f4;padding:16px}.title{display:flex;align-items:center;transform:translateX(-6px);font-weight:600;font-size:18px;line-height:24px;margin:0 auto}.title-image{border-radius:50%;border:1px solid rgb(244, 244, 244);-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center;margin-right:8px}button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;cursor:pointer;display:grid;padding:4px;color:#c6c6c6}button:hover{color:#000}@keyframes fade-in{from{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes fade-out{from{transform:translateY(0)}to{transform:translateY(100%)}}";
|
|
485
487
|
|
|
486
488
|
const VviinnModal = class {
|
|
487
489
|
constructor(hostRef) {
|
|
@@ -514,8 +516,14 @@ const VviinnModal = class {
|
|
|
514
516
|
return;
|
|
515
517
|
this.slider = true;
|
|
516
518
|
}
|
|
519
|
+
renderImage() {
|
|
520
|
+
return _function.pipe(sequenceToOption(imageSearchState.imageUrl, imageSearchState.image), Option.map(([url]) => {
|
|
521
|
+
const image = (h("img", { width: "32", height: "32", src: url, class: "title-image" }));
|
|
522
|
+
return image;
|
|
523
|
+
}), Option.getOrElse(() => null));
|
|
524
|
+
}
|
|
517
525
|
render() {
|
|
518
|
-
return (h(Host, { exportparts: "secondary-action, title, close-button", class: { closed: !this.active }, onAnimationEnd: (ev) => this.handleAnimationEnd(ev) }, h("div", { class: "head" }, !this.hideBackButton && (h("button", { part: "secondary-action", onClick: () => this.resetState() }, h("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M20.25 12H3.75", stroke: "
|
|
526
|
+
return (h(Host, { exportparts: "secondary-action, title, close-button", class: { closed: !this.active }, onAnimationEnd: (ev) => this.handleAnimationEnd(ev) }, h("div", { class: "head" }, !this.hideBackButton && (h("button", { part: "secondary-action", onClick: () => this.resetState() }, h("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M20.25 12H3.75", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M10.5 5.25L3.75 12L10.5 18.75", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })))), h("div", { class: "title", part: "title" }, this.renderImage(), h("slot", { name: "vviinn-image-search-modal-title" }, instance.t("imageSearchModalTitle"))), h("button", { onClick: () => this.close(), class: "close-button", part: "close-button" }, h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, 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: "currentColor" })))), h("div", { class: "body" }, h("slot", null))));
|
|
519
527
|
}
|
|
520
528
|
get el() { return getElement(this); }
|
|
521
529
|
};
|
|
@@ -531,7 +539,7 @@ const VviinnOnboarding = class {
|
|
|
531
539
|
slotChangeListener(this, this.el);
|
|
532
540
|
}
|
|
533
541
|
render() {
|
|
534
|
-
return (h(Host, null, h("slot", { name: "vviinn-onboarding-title" }, h("h3", null, "
|
|
542
|
+
return (h(Host, null, h("slot", { name: "vviinn-onboarding-title" }, h("h3", null, instance.t("onboardingBlock.onboardingTitleText"))), h("vviinn-slider", { showArrows: true }, h("vviinn-slide", null, h("vviinn-onboarding-card-1", { cardTitle: instance.t("onboardingBlock.onboardingCard1.title"), cardText: instance.t("onboardingBlock.onboardingCard1.text") })), h("vviinn-slide", null, h("vviinn-onboarding-card-2", { cardTitle: instance.t("onboardingBlock.onboardingCard2.title"), cardText: instance.t("onboardingBlock.onboardingCard2.text") })), h("vviinn-slide", null, h("vviinn-onboarding-card-3", { cardTitle: instance.t("onboardingBlock.onboardingCard3.title"), cardText: instance.t("onboardingBlock.onboardingCard3.text") })))));
|
|
535
543
|
}
|
|
536
544
|
get el() { return getElement(this); }
|
|
537
545
|
};
|
|
@@ -542,12 +550,14 @@ const onboardingCardCss$2 = ":host{align-items:center;background:#f4f4f4;display
|
|
|
542
550
|
const VviinnOnboardingCard1 = class {
|
|
543
551
|
constructor(hostRef) {
|
|
544
552
|
registerInstance(this, hostRef);
|
|
553
|
+
this.cardTitle = undefined;
|
|
554
|
+
this.cardText = undefined;
|
|
545
555
|
}
|
|
546
556
|
componentWillLoad() {
|
|
547
557
|
slotChangeListener(this, this.el);
|
|
548
558
|
}
|
|
549
559
|
render() {
|
|
550
|
-
return (h(Host, null, h("slot", { name: "onboarding-card-1-icon" }, h(OnboardingCard1Icon, null)), h("slot", { name: "onboarding-card-1-text" }, h("div", { class: "text" }, h("h4", null,
|
|
560
|
+
return (h(Host, null, h("slot", { name: "onboarding-card-1-icon" }, h(OnboardingCard1Icon, null)), h("slot", { name: "onboarding-card-1-text" }, h("div", { class: "text" }, h("h4", null, this.cardTitle), h("p", null, this.cardText)))));
|
|
551
561
|
}
|
|
552
562
|
get el() { return getElement(this); }
|
|
553
563
|
};
|
|
@@ -558,12 +568,14 @@ const onboardingCardCss$1 = ":host{align-items:center;background:#f4f4f4;display
|
|
|
558
568
|
const VviinnOnboardingCard2 = class {
|
|
559
569
|
constructor(hostRef) {
|
|
560
570
|
registerInstance(this, hostRef);
|
|
571
|
+
this.cardTitle = undefined;
|
|
572
|
+
this.cardText = undefined;
|
|
561
573
|
}
|
|
562
574
|
componentWillLoad() {
|
|
563
575
|
slotChangeListener(this, this.el);
|
|
564
576
|
}
|
|
565
577
|
render() {
|
|
566
|
-
return (h(Host, null, h("slot", { name: "onboarding-card-2-icon" }, h(OnboardingCard2Icon, null)), h("slot", { name: "onboarding-card-2-text" }, h("div", { class: "text" }, h("h4", null,
|
|
578
|
+
return (h(Host, null, h("slot", { name: "onboarding-card-2-icon" }, h(OnboardingCard2Icon, null)), h("slot", { name: "onboarding-card-2-text" }, h("div", { class: "text" }, h("h4", null, this.cardTitle), h("p", null, this.cardText)))));
|
|
567
579
|
}
|
|
568
580
|
get el() { return getElement(this); }
|
|
569
581
|
};
|
|
@@ -574,12 +586,14 @@ const onboardingCardCss = ":host{align-items:center;background:#f4f4f4;display:g
|
|
|
574
586
|
const VviinnOnboardingCard3 = class {
|
|
575
587
|
constructor(hostRef) {
|
|
576
588
|
registerInstance(this, hostRef);
|
|
589
|
+
this.cardTitle = undefined;
|
|
590
|
+
this.cardText = undefined;
|
|
577
591
|
}
|
|
578
592
|
componentWillLoad() {
|
|
579
593
|
slotChangeListener(this, this.el);
|
|
580
594
|
}
|
|
581
595
|
render() {
|
|
582
|
-
return (h(Host, null, h("slot", { name: "onboarding-card-3-icon" }, h(OnboardingCard3Icon, null)), h("slot", { name: "onboarding-card-3-text" }, h("div", { class: "text" }, h("h4", null,
|
|
596
|
+
return (h(Host, null, h("slot", { name: "onboarding-card-3-icon" }, h(OnboardingCard3Icon, null)), h("slot", { name: "onboarding-card-3-text" }, h("div", { class: "text" }, h("h4", null, this.cardTitle), h("p", null, this.cardText)))));
|
|
583
597
|
}
|
|
584
598
|
get el() { return getElement(this); }
|
|
585
599
|
};
|
|
@@ -620,12 +634,13 @@ const vviinnPrivacyBadgeCss = ":host{display:block;background:#F4F4F4;padding:17
|
|
|
620
634
|
const VviinnPrivacyBadge = class {
|
|
621
635
|
constructor(hostRef) {
|
|
622
636
|
registerInstance(this, hostRef);
|
|
637
|
+
this.privacyBadgeText = undefined;
|
|
623
638
|
}
|
|
624
639
|
componentWillLoad() {
|
|
625
640
|
slotChangeListener(this, this.el);
|
|
626
641
|
}
|
|
627
642
|
render() {
|
|
628
|
-
return (h(Host, null, h("slot", null, h("div", { class: "content" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" }, h("defs", null), h("path", { fill: "#525252", d: "M8.5 11V7h-2v1h1v3H6v1h4v-1H8.5zM8 4a.75.75 0 100 1.5A.75.75 0 008 4z" }), h("path", { fill: "#525252", d: "M8 15A7 7 0 118 1a7 7 0 010 14zM8 2a6 6 0 100 12A6 6 0 008 2z" })), h("slot", { name: "vviinn-privacy-badge-text" }, h("p", null,
|
|
643
|
+
return (h(Host, null, h("slot", null, h("div", { class: "content" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" }, h("defs", null), h("path", { fill: "#525252", d: "M8.5 11V7h-2v1h1v3H6v1h4v-1H8.5zM8 4a.75.75 0 100 1.5A.75.75 0 008 4z" }), h("path", { fill: "#525252", d: "M8 15A7 7 0 118 1a7 7 0 010 14zM8 2a6 6 0 100 12A6 6 0 008 2z" })), h("slot", { name: "vviinn-privacy-badge-text" }, h("p", null, this.privacyBadgeText))))));
|
|
629
644
|
}
|
|
630
645
|
get el() { return getElement(this); }
|
|
631
646
|
};
|
|
@@ -788,7 +803,7 @@ const VviinnTeaser = class {
|
|
|
788
803
|
slotChangeListener(this, this.el);
|
|
789
804
|
}
|
|
790
805
|
render() {
|
|
791
|
-
return (h(Host, null, h("slot", null, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "64", height: "64", fill: "none" }, h("defs", null), h("path", { fill: "#C6C6C6", d: "M48 28a11.98 11.98 0 00-9.77 18.942L28 57.172 30.828 60l10.23-10.23A11.994 11.994 0 1048 28zm0 20a8 8 0 118-8 8.009 8.009 0 01-8 8zM34 24a6 6 0 10-6-6 6.006 6.006 0 006 6zm0-8a2 2 0 110 4 2 2 0 010-4z" }), h("path", { fill: "#C6C6C6", d: "M24 48H8V35.993L18 26l11.172 11.172L32 34.336 20.828 23.165a4 4 0 00-5.656 0L8 30.336V8h40v12h4V8a4.004 4.004 0 00-4-4H8a4.004 4.004 0 00-4 4v40a4.005 4.005 0 004 4h16v-4z" })), h("span", { class: "vviinn-teaser-text" }, h("slot", { name: "vviinn-teaser-text" }, "
|
|
806
|
+
return (h(Host, null, h("slot", null, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "64", height: "64", fill: "none" }, h("defs", null), h("path", { fill: "#C6C6C6", d: "M48 28a11.98 11.98 0 00-9.77 18.942L28 57.172 30.828 60l10.23-10.23A11.994 11.994 0 1048 28zm0 20a8 8 0 118-8 8.009 8.009 0 01-8 8zM34 24a6 6 0 10-6-6 6.006 6.006 0 006 6zm0-8a2 2 0 110 4 2 2 0 010-4z" }), h("path", { fill: "#C6C6C6", d: "M24 48H8V35.993L18 26l11.172 11.172L32 34.336 20.828 23.165a4 4 0 00-5.656 0L8 30.336V8h40v12h4V8a4.004 4.004 0 00-4-4H8a4.004 4.004 0 00-4 4v40a4.005 4.005 0 004 4h16v-4z" })), h("span", { class: "vviinn-teaser-text" }, h("slot", { name: "vviinn-teaser-text" }, instance.t("teaserText_1"), h("br", null), instance.t("teaserText_2"))))));
|
|
792
807
|
}
|
|
793
808
|
get el() { return getElement(this); }
|
|
794
809
|
};
|