vviinn-widgets 2.7.2 → 2.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{index-df6896e2.js → cropper-handler_30.cjs.entry.js} +2323 -165
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/vviinn-widgets.cjs.js +1 -1
- package/dist/collection/components/vviinn-product-card/vviinn-product-card.js +5 -2
- package/dist/esm/{app-globals-865bc7a7.js → app-globals-2f864b5d.js} +1 -1
- package/dist/esm/{index-2fdd499d.js → cropper-handler_30.entry.js} +2294 -119
- package/dist/esm/{index-443468c7.js → index-040cfca9.js} +2 -2
- package/dist/esm/{index-51f71d18.js → index-2d36a726.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/vviinn-recommendations-sidebar.entry.js +2 -2
- package/dist/esm/vviinn-vpr-button.entry.js +2 -2
- package/dist/esm/vviinn-widgets.js +3 -3
- package/dist/types/components/vviinn-product-card/vviinn-product-card.d.ts +1 -0
- package/dist/vviinn-widgets/{p-3469b71a.js → p-334db07e.js} +1 -1
- package/dist/vviinn-widgets/{p-40bea5b5.entry.js → p-a98df480.entry.js} +1 -1
- package/dist/vviinn-widgets/p-da99b592.entry.js +1 -0
- package/dist/vviinn-widgets/{p-a6e0710f.entry.js → p-dc124f62.entry.js} +1 -1
- package/dist/vviinn-widgets/{p-465d043d.js → p-e5a7f685.js} +1 -1
- package/dist/vviinn-widgets/{p-166970f3.js → p-fe8dc0b9.js} +1 -1
- package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
- package/package.json +1 -1
- package/www/build/{p-3469b71a.js → p-334db07e.js} +1 -1
- package/www/build/{p-40bea5b5.entry.js → p-a98df480.entry.js} +1 -1
- package/www/build/p-c5ef37e7.js +125 -0
- package/www/build/p-da99b592.entry.js +1 -0
- package/www/build/{p-a6e0710f.entry.js → p-dc124f62.entry.js} +1 -1
- package/www/build/p-e0153ae2.css +6 -0
- package/www/build/{p-465d043d.js → p-e5a7f685.js} +1 -1
- package/www/build/{p-166970f3.js → p-fe8dc0b9.js} +1 -1
- package/www/build/vviinn-widgets.esm.js +1 -1
- package/www/index.html +2495 -1
- package/dist/cjs/cropper-handler_27.cjs.entry.js +0 -1135
- package/dist/cjs/customized-slots-06ca4007.js +0 -53
- package/dist/cjs/vviinn-carousel_2.cjs.entry.js +0 -1001
- package/dist/cjs/vviinn-vps-button.cjs.entry.js +0 -43
- package/dist/esm/cropper-handler_27.entry.js +0 -1105
- package/dist/esm/customized-slots-96902edf.js +0 -50
- package/dist/esm/vviinn-carousel_2.entry.js +0 -996
- package/dist/esm/vviinn-vps-button.entry.js +0 -39
- package/dist/vviinn-widgets/p-2dd35f19.entry.js +0 -1
- package/dist/vviinn-widgets/p-59bd2a99.js +0 -1
- package/dist/vviinn-widgets/p-74ed36af.entry.js +0 -1
- package/dist/vviinn-widgets/p-9def6b8b.entry.js +0 -1
- package/dist/vviinn-widgets/p-cd995515.js +0 -1
- package/www/build/p-2dd35f19.entry.js +0 -1
- package/www/build/p-59bd2a99.js +0 -1
- package/www/build/p-61933b75.js +0 -1
- package/www/build/p-74ed36af.entry.js +0 -1
- package/www/build/p-9def6b8b.entry.js +0 -1
- package/www/build/p-a67898be.css +0 -1
- package/www/build/p-cd995515.js +0 -1
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const index = require('./index-3c3ab815.js');
|
|
4
|
-
|
|
5
|
-
const defaultSlotsNames = [
|
|
6
|
-
"vviinn-onboarding-title",
|
|
7
|
-
"vviinn-onboarding-card-1-icon",
|
|
8
|
-
"vviinn-onboarding-card-1-text",
|
|
9
|
-
"vviinn-onboarding-card-2-icon",
|
|
10
|
-
"vviinn-onboarding-card-2-text",
|
|
11
|
-
"vviinn-onboarding-card-3-icon",
|
|
12
|
-
"vviinn-onboarding-card-3-text",
|
|
13
|
-
"vviinn-example-images-title",
|
|
14
|
-
"vviinn-example-images-1",
|
|
15
|
-
"vviinn-example-images-2",
|
|
16
|
-
"vviinn-example-images-3",
|
|
17
|
-
"vviinn-example-images-4",
|
|
18
|
-
"vviinn-teaser-text",
|
|
19
|
-
"vviinn-image-upload-button-text",
|
|
20
|
-
"vviinn-privacy-badge-text"
|
|
21
|
-
];
|
|
22
|
-
const renderNamedSlot = (name) => index.h("slot", { name: name });
|
|
23
|
-
const SlotSkeleton = () => defaultSlotsNames.map(renderNamedSlot);
|
|
24
|
-
const getSlots = (element) => Array.from(element.shadowRoot.querySelectorAll("slot"));
|
|
25
|
-
const getNameAttribute = (element) => element.getAttribute("name");
|
|
26
|
-
const getSlotAttribute = (element) => element.getAttribute("slot");
|
|
27
|
-
const elementContainSlot = (slot) => (container) => {
|
|
28
|
-
const name1 = getNameAttribute(slot);
|
|
29
|
-
const name2 = getSlotAttribute(container);
|
|
30
|
-
return name1 === name2;
|
|
31
|
-
};
|
|
32
|
-
const getContentToReplace = (targets) => (acc, content) => {
|
|
33
|
-
const replaceCandidate = targets.find(elementContainSlot(content));
|
|
34
|
-
if (replaceCandidate) {
|
|
35
|
-
acc.set(content, replaceCandidate);
|
|
36
|
-
}
|
|
37
|
-
return acc;
|
|
38
|
-
};
|
|
39
|
-
const replaceSlotContent = (content, target) => {
|
|
40
|
-
target.innerHTML = content.outerHTML;
|
|
41
|
-
};
|
|
42
|
-
const slotChangeListener = (component, element) => {
|
|
43
|
-
component.connectedCallback = function () {
|
|
44
|
-
document.addEventListener("globalSlotsChanged", ({ detail }) => {
|
|
45
|
-
const slotsToReplace = getSlots(element).reduce(getContentToReplace(detail), new Map());
|
|
46
|
-
slotsToReplace.forEach(replaceSlotContent);
|
|
47
|
-
}, true);
|
|
48
|
-
};
|
|
49
|
-
component.connectedCallback.call(component);
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
exports.SlotSkeleton = SlotSkeleton;
|
|
53
|
-
exports.slotChangeListener = slotChangeListener;
|