@ppg_pl/pallete 0.0.4 → 0.0.6
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-160fcb6c.js +1661 -0
- package/dist/cjs/index-160fcb6c.js.map +1 -0
- package/dist/cjs/index.cjs.js +4 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +24 -0
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/cjs/my-backdrop_8.cjs.entry.js +7985 -0
- package/dist/cjs/my-backdrop_8.cjs.entry.js.map +1 -0
- package/dist/cjs/pallete.cjs.js +28 -0
- package/dist/cjs/pallete.cjs.js.map +1 -0
- package/dist/collection/collection-manifest.json +19 -0
- package/dist/collection/components/api/index.js +20 -0
- package/dist/collection/components/api/index.js.map +1 -0
- package/dist/collection/components/api/services.js +82 -0
- package/dist/collection/components/api/services.js.map +1 -0
- package/dist/collection/components/my-backdrop/my-backdrop.css +13 -0
- package/dist/collection/components/my-backdrop/my-backdrop.js +17 -0
- package/dist/collection/components/my-backdrop/my-backdrop.js.map +1 -0
- package/dist/collection/components/my-colorbox/my-colorbox.css +52 -0
- package/dist/collection/components/my-colorbox/my-colorbox.js +157 -0
- package/dist/collection/components/my-colorbox/my-colorbox.js.map +1 -0
- package/dist/collection/components/my-colorinfo/my-colorinfo.js +187 -0
- package/dist/collection/components/my-colorinfo/my-colorinfo.js.map +1 -0
- package/dist/collection/components/my-component/my-component.css +6 -0
- package/dist/collection/components/my-component/my-component.js +133 -0
- package/dist/collection/components/my-component/my-component.js.map +1 -0
- package/dist/collection/components/my-loader/my-loader.css +85 -0
- package/dist/collection/components/my-loader/my-loader.js +19 -0
- package/dist/collection/components/my-loader/my-loader.js.map +1 -0
- package/dist/collection/components/my-modal/__mocks__/index.js +759 -0
- package/dist/collection/components/my-modal/__mocks__/index.js.map +1 -0
- package/dist/collection/components/my-modal/assets/arrow_down.png +0 -0
- package/dist/collection/components/my-modal/assets/close.png +0 -0
- package/dist/collection/components/my-modal/my-modal.css +367 -0
- package/dist/collection/components/my-modal/my-modal.js +448 -0
- package/dist/collection/components/my-modal/my-modal.js.map +1 -0
- package/dist/collection/components/my-search/assets/search.svg +15 -0
- package/dist/collection/components/my-search/my-search.css +35 -0
- package/dist/collection/components/my-search/my-search.js +125 -0
- package/dist/collection/components/my-search/my-search.js.map +1 -0
- package/dist/collection/components/my-slider/index.js +148 -0
- package/dist/collection/components/my-slider/index.js.map +1 -0
- package/dist/collection/components/my-slider/my-slider.css +88 -0
- package/dist/collection/gtmUtils.js +4 -0
- package/dist/collection/gtmUtils.js.map +1 -0
- package/dist/collection/index.js +2 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/types.js +2 -0
- package/dist/collection/types.js.map +1 -0
- package/{www/build/gtmUtils-dcdac4ce.js → dist/components/gtmUtils.js} +2 -0
- package/dist/components/gtmUtils.js.map +1 -0
- package/dist/components/index.d.ts +9 -11
- package/dist/components/index.js +3 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/index2.js +5305 -0
- package/dist/components/index2.js.map +1 -0
- package/dist/components/my-backdrop.js +8 -0
- package/dist/components/my-backdrop.js.map +1 -0
- package/dist/components/my-backdrop2.js +31 -0
- package/dist/components/my-backdrop2.js.map +1 -0
- package/dist/components/my-colorbox.js +8 -0
- package/dist/components/my-colorbox.js.map +1 -0
- package/dist/{pallete/my-colorbox.entry.js → components/my-colorbox2.js} +37 -8
- package/dist/components/my-colorbox2.js.map +1 -0
- package/dist/components/my-colorinfo.js +8 -0
- package/dist/components/my-colorinfo.js.map +1 -0
- package/dist/{pallete/my-colorinfo.entry.js → components/my-colorinfo2.js} +44 -10
- package/dist/components/my-colorinfo2.js.map +1 -0
- package/dist/{pallete/my-component.entry.js → components/my-component.js} +87 -11
- package/dist/components/my-component.js.map +1 -0
- package/dist/components/my-loader.js +8 -0
- package/dist/components/my-loader.js.map +1 -0
- package/{www/build/my-loader.entry.js → dist/components/my-loader2.js} +23 -7
- package/dist/components/my-loader2.js.map +1 -0
- package/dist/components/my-modal.js +8 -0
- package/dist/components/my-modal.js.map +1 -0
- package/dist/{pallete/my-modal.entry.js → components/my-modal2.js} +120 -120
- package/dist/components/my-modal2.js.map +1 -0
- package/dist/components/my-search.js +8 -0
- package/dist/components/my-search.js.map +1 -0
- package/{www/build/my-search.entry.js → dist/components/my-search2.js} +32 -9
- package/dist/components/my-search2.js.map +1 -0
- package/dist/components/my-slider.js +8 -0
- package/dist/components/my-slider.js.map +1 -0
- package/dist/esm/index-943c259f.js +1632 -0
- package/dist/esm/index-943c259f.js.map +1 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/loader.js +20 -0
- package/dist/esm/loader.js.map +1 -0
- package/dist/esm/my-backdrop_8.entry.js +7974 -0
- package/dist/esm/my-backdrop_8.entry.js.map +1 -0
- package/dist/esm/pallete.js +23 -0
- package/dist/esm/pallete.js.map +1 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/pallete/index.esm.js +1 -0
- package/dist/pallete/index.esm.js.map +1 -0
- package/dist/pallete/p-9a7eff4f.entry.js +2 -0
- package/dist/pallete/p-9a7eff4f.entry.js.map +1 -0
- package/dist/pallete/p-c77aaa54.js +3 -0
- package/dist/pallete/p-c77aaa54.js.map +1 -0
- package/dist/pallete/pallete.css +1 -3
- package/dist/pallete/pallete.esm.js +2 -129
- package/dist/pallete/pallete.esm.js.map +1 -0
- package/dist/types/components/api/services.d.ts +1 -1
- package/dist/types/components/my-component/my-component.d.ts +2 -0
- package/dist/types/components/my-modal/__mocks__/index.d.ts +415 -0
- package/dist/types/components/my-modal/my-modal.d.ts +3 -1
- package/dist/types/components.d.ts +2 -0
- package/dist/types/stencil-public-runtime.d.ts +91 -19
- package/dist/types/types.d.ts +8 -8
- package/loader/index.d.ts +9 -0
- package/loader/package.json +1 -0
- package/package.json +21 -5
- package/www/build/index.esm.js +1 -0
- package/www/build/index.esm.js.map +1 -0
- package/www/build/p-825a7d1d.js +163 -0
- package/www/build/p-9a7eff4f.entry.js +2 -0
- package/www/build/p-9a7eff4f.entry.js.map +1 -0
- package/www/build/p-c77aaa54.js +3 -0
- package/www/build/p-c77aaa54.js.map +1 -0
- package/www/build/p-fd390eef.css +3 -0
- package/www/build/pallete.css +1 -3
- package/www/build/pallete.esm.js +2 -129
- package/www/build/pallete.esm.js.map +1 -0
- package/www/index.html +2 -40
- package/dist/pallete/app-globals-0f993ce5.js +0 -3
- package/dist/pallete/css-shim-60f618b9.js +0 -4
- package/dist/pallete/dom-4eeb3fee.js +0 -73
- package/dist/pallete/gtmUtils-dcdac4ce.js +0 -5
- package/dist/pallete/index-1ac7471e.js +0 -3059
- package/dist/pallete/my-backdrop.entry.js +0 -15
- package/dist/pallete/my-loader.entry.js +0 -15
- package/dist/pallete/my-search.entry.js +0 -36
- package/dist/pallete/my-slider.entry.js +0 -11333
- package/dist/pallete/shadow-css-02866686.js +0 -387
- package/www/build/app-globals-0f993ce5.js +0 -3
- package/www/build/css-shim-60f618b9.js +0 -4
- package/www/build/dom-4eeb3fee.js +0 -73
- package/www/build/index-1ac7471e.js +0 -3059
- package/www/build/my-backdrop.entry.js +0 -15
- package/www/build/my-colorbox.entry.js +0 -40
- package/www/build/my-colorinfo.entry.js +0 -36
- package/www/build/my-component.entry.js +0 -154
- package/www/build/my-modal.entry.js +0 -2459
- package/www/build/my-slider.entry.js +0 -11333
- package/www/build/shadow-css-02866686.js +0 -387
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance } from './index-1ac7471e.js';
|
|
2
|
-
|
|
3
|
-
const myBackdropCss = ".pallete-wrapper *{font-family:\"Galatea\", sans-serif}my-backdrop{width:100%;height:100%;background-color:rgba(0, 0, 0, 0.7);position:fixed;z-index:100;left:0;top:0}";
|
|
4
|
-
|
|
5
|
-
const MyBackdrop = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
}
|
|
9
|
-
render() {
|
|
10
|
-
return null;
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
MyBackdrop.style = myBackdropCss;
|
|
14
|
-
|
|
15
|
-
export { MyBackdrop as my_backdrop };
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-1ac7471e.js';
|
|
2
|
-
import { s as setDataLayer } from './gtmUtils-dcdac4ce.js';
|
|
3
|
-
|
|
4
|
-
const myColorboxCss = ".pallete-wrapper *{font-family:\"Galatea\", sans-serif}.my-color-box{width:125px;height:125px;display:block;margin-bottom:5px;cursor:pointer;display:flex;flex-direction:column;justify-content:flex-end;position:relative}@media (max-width: 1024px){.my-color-box{width:80px;height:80px}}.my-color-box .color-name{width:100%;background-color:#fff;padding:15px 0px 10px;border-top-left-radius:15px;border-top-right-radius:15px;opacity:0;transition:0.3s opacity ease-in-out;font-size:10px;color:#232323;text-transform:lowercase}.my-color-box.active .color-name{opacity:1}.my-color-box.categoryactive{width:120px;height:115px}.my-color-box.categoryactive .color-name{opacity:1}@media (max-width: 1024px){.my-color-box.categoryactive{width:72px;height:72px}}.my-color-box:hover .color-name{opacity:1}";
|
|
5
|
-
|
|
6
|
-
const MyColorBox = class {
|
|
7
|
-
constructor(hostRef) {
|
|
8
|
-
registerInstance(this, hostRef);
|
|
9
|
-
this.colorCheck = () => {
|
|
10
|
-
this.checkTimeout = setTimeout(() => {
|
|
11
|
-
setDataLayer({
|
|
12
|
-
event: 'ColorCheck',
|
|
13
|
-
shop: this.shop,
|
|
14
|
-
product: this.product,
|
|
15
|
-
color: this.name,
|
|
16
|
-
});
|
|
17
|
-
}, 2000);
|
|
18
|
-
};
|
|
19
|
-
this.colorUnCheck = () => {
|
|
20
|
-
if (this.checkTimeout)
|
|
21
|
-
clearTimeout(this.checkTimeout);
|
|
22
|
-
this.checkTimeout = undefined;
|
|
23
|
-
};
|
|
24
|
-
this.darkenColor = (color) => {
|
|
25
|
-
const red = parseInt(color[1] + color[2], 16) - 20;
|
|
26
|
-
const green = parseInt(color[3] + color[4], 16) - 20;
|
|
27
|
-
const blue = parseInt(color[5] + color[6], 16) - 20;
|
|
28
|
-
return `rgb(${red},${green},${blue})`;
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
render() {
|
|
32
|
-
return (h("div", { onMouseEnter: () => this.colorCheck(), onMouseLeave: () => this.colorUnCheck(), class: `my-color-box ${this.isActive ? 'active' : ''} ${this.isCategoryActive ? 'categoryactive' : ''}`, style: {
|
|
33
|
-
background: this.color,
|
|
34
|
-
border: this.isCategoryActive ? `5px solid ${this.darkenColor(this.color)}` : '',
|
|
35
|
-
} }, h("div", { class: "color-name" }, this.name)));
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
MyColorBox.style = myColorboxCss;
|
|
39
|
-
|
|
40
|
-
export { MyColorBox as my_colorbox };
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, e as createEvent, h, f as getAssetPath } from './index-1ac7471e.js';
|
|
2
|
-
import { s as setDataLayer } from './gtmUtils-dcdac4ce.js';
|
|
3
|
-
|
|
4
|
-
const MyColorInfo = class {
|
|
5
|
-
constructor(hostRef) {
|
|
6
|
-
registerInstance(this, hostRef);
|
|
7
|
-
this.closeInfoBox = createEvent(this, "closeInfoBox", 7);
|
|
8
|
-
this.data = null;
|
|
9
|
-
this.isMobile = false;
|
|
10
|
-
this.closeImage = 'close.png';
|
|
11
|
-
this.goToProduct = () => {
|
|
12
|
-
var _a;
|
|
13
|
-
this.currentColor &&
|
|
14
|
-
setDataLayer({
|
|
15
|
-
event: 'GoToProduct',
|
|
16
|
-
shop: this.shop,
|
|
17
|
-
product: this.product,
|
|
18
|
-
color: (_a = this.currentColor) === null || _a === void 0 ? void 0 : _a.name,
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
this.onCloseButtonClick = () => {
|
|
22
|
-
this.closeInfoBox.emit();
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
render() {
|
|
26
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
27
|
-
return (h("div", { class: `boxes__box-content ${this.currentColor.textWhite ? 'boxes__box-content__white' : ''}`, style: {
|
|
28
|
-
background: this.currentColor.hex,
|
|
29
|
-
maxWidth: `${this.infoBoxWidth && this.infoBoxWidth - 4}px`,
|
|
30
|
-
} }, this.isMobile && h("img", { class: 'closebtn', onClick: this.onCloseButtonClick, src: getAssetPath(`./assets/${this.closeImage}`), alt: "closebtn" }), h("div", { class: "boxes__box-content__info", style: {
|
|
31
|
-
maxWidth: this.isMobile ? `${this.infoBoxWidth && this.infoBoxWidth - 35}px` : ``,
|
|
32
|
-
} }, !this.isMobile && h("img", { class: 'closebtn', onClick: this.onCloseButtonClick, src: getAssetPath(`./assets/${this.closeImage}`), alt: "closebtn" }), !this.isMobile && h("h2", null, this.currentColor.name), !this.isMobile && h("h4", null, this.currentColor.number), !this.isMobile && h("div", { class: "divider" }), h("div", { class: "boxes__box-content__info__value" }, h("div", { class: "boxes__box-content__info__value-image" }, ((_a = this.currentColor) === null || _a === void 0 ? void 0 : _a.image.data) && h("img", { src: `${(_e = (_d = (_c = (_b = this.currentColor) === null || _b === void 0 ? void 0 : _b.image) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.attributes) === null || _e === void 0 ? void 0 : _e.formats.thumbnail.url}`, alt: "color-image" })), h("div", { class: "boxes__box-content__info__value-product" }, h("div", null, !this.isMobile && h("p", null, "Produkt:"), this.isMobile && h("h2", null, this.currentColor.name), " ", h("p", null, this.product)), this.isMobile && h("div", { class: 'divider' }), this.currentColor && this.currentColor.links.find((link) => { var _a, _b, _c; return ((_c = (_b = (_a = link === null || link === void 0 ? void 0 : link.shop) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.attributes) === null || _c === void 0 ? void 0 : _c.name) === this.shop; }) && (h("a", { onClick: this.goToProduct, class: `${this.currentColor.buttonInverse ? 'inverse' : ''}`, target: "_blank", href: (_f = this === null || this === void 0 ? void 0 : this.currentColor.links.find((link) => { var _a, _b, _c; return ((_c = (_b = (_a = link === null || link === void 0 ? void 0 : link.shop) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.attributes) === null || _c === void 0 ? void 0 : _c.name) === this.shop; })) === null || _f === void 0 ? void 0 : _f.path }, "przejd\u017A do produktu"))))), h("div", { class: "boxes__box-content__slider" }, h("my-slider", { color: this.currentColor.name, shop: this.shop, product: this.product, slides: (_g = this.data) === null || _g === void 0 ? void 0 : _g.images.data }), ' ')));
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
export { MyColorInfo as my_colorinfo };
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, g as getElement } from './index-1ac7471e.js';
|
|
2
|
-
|
|
3
|
-
const isObject = (val) => !Array.isArray(val) && val !== null && typeof val === 'object';
|
|
4
|
-
const hasAttributes = ({ vattrs }, requiredAttrs = []) => isObject(vattrs) && requiredAttrs.every(vattrs.hasOwnProperty.bind(vattrs));
|
|
5
|
-
const isTextNode = ({ vtext }) => typeof vtext === 'string';
|
|
6
|
-
// Can't use instanceof HTMLElement because MockHTMLElement during pre-rendering isn't
|
|
7
|
-
const isElement = (val) => typeof val === 'object' && val.nodeType === 1 && typeof val.ownerDocument === 'object';
|
|
8
|
-
const isElementArray = (val) => Array.isArray(val) && val.every(isElement);
|
|
9
|
-
|
|
10
|
-
const createElement = ({ vtag, vattrs, vchildren, vtext }, utils) => {
|
|
11
|
-
if (vtext != null) {
|
|
12
|
-
return document.createTextNode(vtext);
|
|
13
|
-
}
|
|
14
|
-
const element = document.createElement(vtag);
|
|
15
|
-
if (vattrs != null) {
|
|
16
|
-
for (const key in vattrs) {
|
|
17
|
-
element.setAttribute(key, vattrs[key]);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
if (vchildren != null) {
|
|
21
|
-
utils.forEach(vchildren, (child) => {
|
|
22
|
-
element.appendChild(createElement(child, utils));
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
return element;
|
|
26
|
-
};
|
|
27
|
-
const shouldApplyToHead = (val) => isElement(val) || (isElementArray(val) && val.length === 2);
|
|
28
|
-
const applyToHead = (element) => {
|
|
29
|
-
if (Array.isArray(element)) {
|
|
30
|
-
return document.head.replaceChild(element[0], element[1]);
|
|
31
|
-
}
|
|
32
|
-
return document.head.appendChild(element);
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
const hasChildren = (node) => Array.isArray(node.vchildren);
|
|
36
|
-
const getFirstChild = (vchildren, utils) => {
|
|
37
|
-
let firstChild = null;
|
|
38
|
-
utils.forEach(vchildren || [], (c, i) => {
|
|
39
|
-
if (i === 0) {
|
|
40
|
-
firstChild = c;
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
return firstChild;
|
|
45
|
-
};
|
|
46
|
-
function title(node, head, utils) {
|
|
47
|
-
const firstChild = getFirstChild(node.vchildren || [], utils);
|
|
48
|
-
if (firstChild && isTextNode(firstChild)) {
|
|
49
|
-
return [createElement(node, utils), head.querySelector('title')];
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
function meta(node, head, utils) {
|
|
53
|
-
var _a, _b, _c;
|
|
54
|
-
const namePropKey = ((_a = node.vattrs) === null || _a === void 0 ? void 0 : _a.property) ? 'property' : 'name';
|
|
55
|
-
const namePropValue = ((_b = node.vattrs) === null || _b === void 0 ? void 0 : _b.property) || ((_c = node.vattrs) === null || _c === void 0 ? void 0 : _c.name);
|
|
56
|
-
const existingElement = head.querySelector(`meta[${namePropKey}="${namePropValue}"]`);
|
|
57
|
-
if (existingElement !== null) {
|
|
58
|
-
return [createElement(node, utils), existingElement];
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
return createElement(node, utils);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
function link(node, _head, utils) {
|
|
65
|
-
if (!hasChildren(node)) {
|
|
66
|
-
return createElement(node, utils);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
function style(node, _head, utils) {
|
|
70
|
-
const firstChild = getFirstChild(node.vchildren || [], utils);
|
|
71
|
-
if (firstChild && isTextNode(firstChild)) {
|
|
72
|
-
return createElement(node, utils);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
function script(node, _head, utils) {
|
|
76
|
-
if (hasChildren(node) || hasAttributes(node)) {
|
|
77
|
-
return createElement(node, utils);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
function base(node, _head, utils) {
|
|
81
|
-
if (!hasChildren(node) && hasAttributes(node)) {
|
|
82
|
-
return createElement(node, utils);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
const template = createElement;
|
|
86
|
-
const noscript = createElement; // SSR only
|
|
87
|
-
const types = {
|
|
88
|
-
title,
|
|
89
|
-
meta,
|
|
90
|
-
link,
|
|
91
|
-
style,
|
|
92
|
-
script,
|
|
93
|
-
base,
|
|
94
|
-
template,
|
|
95
|
-
noscript,
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
const headExists = document && document.head;
|
|
99
|
-
const validTagNames = Object.keys(types);
|
|
100
|
-
const isValidNode = (node) => validTagNames.indexOf(node.vtag) > -1;
|
|
101
|
-
const renderNode = (node, utils) => types[node.vtag](node, document.head, utils);
|
|
102
|
-
const Helmet = (_props, children, utils) => {
|
|
103
|
-
if (!headExists) {
|
|
104
|
-
return null;
|
|
105
|
-
}
|
|
106
|
-
const rendered = [];
|
|
107
|
-
const validChildren = [];
|
|
108
|
-
utils.forEach(children, (n) => {
|
|
109
|
-
if (isValidNode(n)) {
|
|
110
|
-
validChildren.push(n);
|
|
111
|
-
rendered.push(renderNode(n, utils));
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
// Build an HTMLElement for each provided virtual child
|
|
115
|
-
rendered
|
|
116
|
-
.filter(shouldApplyToHead)
|
|
117
|
-
.forEach(applyToHead);
|
|
118
|
-
return null;
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
const myComponentCss = ".pallete-wrapper.sc-my-component{display:flex;flex-direction:column;align-items:center;justify-content:center}";
|
|
122
|
-
|
|
123
|
-
const MyModalBundle = class {
|
|
124
|
-
constructor(hostRef) {
|
|
125
|
-
registerInstance(this, hostRef);
|
|
126
|
-
this.show = false;
|
|
127
|
-
}
|
|
128
|
-
async open() {
|
|
129
|
-
this.show = true;
|
|
130
|
-
}
|
|
131
|
-
closeModalHandler() {
|
|
132
|
-
this.show = false;
|
|
133
|
-
}
|
|
134
|
-
render() {
|
|
135
|
-
let content = null;
|
|
136
|
-
if (this.show) {
|
|
137
|
-
content = [h("my-backdrop", null), h("my-modal", { shop: this.shop, product: this.product })];
|
|
138
|
-
}
|
|
139
|
-
return (h("div", null, h(Helmet, null, h("script", null, `(function (w, d, s, l, i) {
|
|
140
|
-
w[l] = w[l] || [];
|
|
141
|
-
w[l].push({ 'gtm.start': new Date().getTime(), 'event': 'gtm.js' });
|
|
142
|
-
var f = d.getElementsByTagName(s)[0],
|
|
143
|
-
j = d.createElement(s),
|
|
144
|
-
dl = l != 'dataLayer' ? '&l=' + l : '';
|
|
145
|
-
j.async = true;
|
|
146
|
-
j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
|
|
147
|
-
f.parentNode.insertBefore(j, f);
|
|
148
|
-
})(window, document, 'script', 'dataLayer', 'GTM-PMTKHDX');`)), h("div", { class: "pallete-wrapper" }, content), h("noscript", null, h("iframe", { src: "https://www.googletagmanager.com/ns.html?id=GTM-PMTKHDX", height: "0", width: "0", style: { display: 'none', visibility: 'hidden' } }))));
|
|
149
|
-
}
|
|
150
|
-
get modalEl() { return getElement(this); }
|
|
151
|
-
};
|
|
152
|
-
MyModalBundle.style = myComponentCss;
|
|
153
|
-
|
|
154
|
-
export { MyModalBundle as my_component };
|