@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"my-backdrop.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement } from '@stencil/core/internal/client';
|
|
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 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
}
|
|
10
|
+
render() {
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
static get style() { return myBackdropCss; }
|
|
14
|
+
}, [0, "my-backdrop"]);
|
|
15
|
+
function defineCustomElement() {
|
|
16
|
+
if (typeof customElements === "undefined") {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
const components = ["my-backdrop"];
|
|
20
|
+
components.forEach(tagName => { switch (tagName) {
|
|
21
|
+
case "my-backdrop":
|
|
22
|
+
if (!customElements.get(tagName)) {
|
|
23
|
+
customElements.define(tagName, MyBackdrop);
|
|
24
|
+
}
|
|
25
|
+
break;
|
|
26
|
+
} });
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { MyBackdrop as M, defineCustomElement as d };
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=my-backdrop2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"my-backdrop2.js","mappings":";;AAAA,MAAM,aAAa,GAAG,wKAAwK;;MCMjL,UAAU;;;;;EACrB,MAAM;IACJ,OAAO,IAAI,CAAC;GACb;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/my-backdrop/my-backdrop.scss?tag=my-backdrop","./src/components/my-backdrop/my-backdrop.tsx"],"sourcesContent":["@import '../../global/app.scss';\n\nmy-backdrop {\n width: 100%;\n height: 100%;\n background-color: $backdrop_black;\n position: fixed;\n z-index: 100;\n left: 0;\n top: 0;\n}\n","import { Component } from '@stencil/core';\n\n@Component({\n tag: 'my-backdrop',\n styleUrl: 'my-backdrop.scss',\n})\nexport class MyBackdrop {\n render() {\n return null;\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"my-colorbox.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { s as setDataLayer } from './gtmUtils
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { s as setDataLayer } from './gtmUtils.js';
|
|
3
3
|
|
|
4
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
5
|
|
|
6
|
-
const MyColorBox = class {
|
|
7
|
-
constructor(
|
|
8
|
-
|
|
6
|
+
const MyColorBox = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
this.__registerHost();
|
|
9
10
|
this.colorCheck = () => {
|
|
10
11
|
this.checkTimeout = setTimeout(() => {
|
|
11
12
|
setDataLayer({
|
|
@@ -27,6 +28,12 @@ const MyColorBox = class {
|
|
|
27
28
|
const blue = parseInt(color[5] + color[6], 16) - 20;
|
|
28
29
|
return `rgb(${red},${green},${blue})`;
|
|
29
30
|
};
|
|
31
|
+
this.color = undefined;
|
|
32
|
+
this.name = undefined;
|
|
33
|
+
this.shop = undefined;
|
|
34
|
+
this.product = undefined;
|
|
35
|
+
this.isActive = undefined;
|
|
36
|
+
this.isCategoryActive = undefined;
|
|
30
37
|
}
|
|
31
38
|
render() {
|
|
32
39
|
return (h("div", { onMouseEnter: () => this.colorCheck(), onMouseLeave: () => this.colorUnCheck(), class: `my-color-box ${this.isActive ? 'active' : ''} ${this.isCategoryActive ? 'categoryactive' : ''}`, style: {
|
|
@@ -34,7 +41,29 @@ const MyColorBox = class {
|
|
|
34
41
|
border: this.isCategoryActive ? `5px solid ${this.darkenColor(this.color)}` : '',
|
|
35
42
|
} }, h("div", { class: "color-name" }, this.name)));
|
|
36
43
|
}
|
|
37
|
-
}
|
|
38
|
-
|
|
44
|
+
static get style() { return myColorboxCss; }
|
|
45
|
+
}, [0, "my-colorbox", {
|
|
46
|
+
"color": [1],
|
|
47
|
+
"name": [1],
|
|
48
|
+
"shop": [1],
|
|
49
|
+
"product": [1],
|
|
50
|
+
"isActive": [4, "is-active"],
|
|
51
|
+
"isCategoryActive": [4, "is-category-active"]
|
|
52
|
+
}]);
|
|
53
|
+
function defineCustomElement() {
|
|
54
|
+
if (typeof customElements === "undefined") {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
const components = ["my-colorbox"];
|
|
58
|
+
components.forEach(tagName => { switch (tagName) {
|
|
59
|
+
case "my-colorbox":
|
|
60
|
+
if (!customElements.get(tagName)) {
|
|
61
|
+
customElements.define(tagName, MyColorBox);
|
|
62
|
+
}
|
|
63
|
+
break;
|
|
64
|
+
} });
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export { MyColorBox as M, defineCustomElement as d };
|
|
39
68
|
|
|
40
|
-
|
|
69
|
+
//# sourceMappingURL=my-colorbox2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"my-colorbox2.js","mappings":";;;AAAA,MAAM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AU,EAAE,IAAI,CAAC,KAAK;QACtB,MAAM,EAAE,IAAI,CAAC,gBAAgB,GAAG,aAAa,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE;OACjF,IAED,WAAK,KAAK,EAAC,YAAY,IAAE,IAAI,CAAC,IAAI,CAAO,CACrC,EACN;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/my-colorbox/my-colorbox.scss?tag=my-colorbox","./src/components/my-colorbox/my-colorbox.tsx"],"sourcesContent":["@import '../../global/app.scss';\n\n.my-color-box {\n width: 125px;\n height: 125px;\n display: block;\n margin-bottom: 5px;\n cursor: pointer;\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n position: relative;\n\n @media (max-width: $medium) {\n width: 80px;\n height: 80px;\n }\n .color-name {\n width: 100%;\n background-color: $white;\n padding: 15px 0px 10px;\n border-top-left-radius: 15px;\n border-top-right-radius: 15px;\n opacity: 0;\n transition: 0.3s opacity ease-in-out;\n font-size: 10px;\n color: $black;\n text-transform: lowercase;\n }\n &.active {\n .color-name {\n opacity: 1;\n }\n }\n\n &.categoryactive {\n width: 120px;\n height: 115px;\n .color-name {\n opacity: 1;\n }\n\n @media (max-width: $medium) {\n width: 72px;\n height: 72px;\n }\n }\n &:hover {\n .color-name {\n opacity: 1;\n }\n }\n}\n","import { Component, Prop, h } from '@stencil/core';\nimport { setDataLayer } from '../../gtmUtils';\n\n@Component({\n tag: 'my-colorbox',\n styleUrl: 'my-colorbox.scss',\n})\nexport class MyColorBox {\n private checkTimeout: ReturnType<typeof setTimeout> | undefined;\n\n @Prop() color: string;\n @Prop() name: string;\n @Prop() shop: string;\n @Prop() product: string;\n @Prop() isActive?: boolean;\n @Prop() isCategoryActive?: boolean;\n\n colorCheck = () => {\n this.checkTimeout = setTimeout(() => {\n setDataLayer({\n event: 'ColorCheck',\n shop: this.shop,\n product: this.product,\n color: this.name,\n });\n }, 2000);\n };\n\n colorUnCheck = () => {\n if (this.checkTimeout) clearTimeout(this.checkTimeout);\n this.checkTimeout = undefined;\n };\n\n darkenColor = (color: string) => {\n const red = parseInt(color[1] + color[2], 16) - 20;\n const green = parseInt(color[3] + color[4], 16) - 20;\n const blue = parseInt(color[5] + color[6], 16) - 20;\n return `rgb(${red},${green},${blue})`;\n };\n\n render() {\n return (\n <div\n onMouseEnter={() => this.colorCheck()}\n onMouseLeave={() => this.colorUnCheck()}\n class={`my-color-box ${this.isActive ? 'active' : ''} ${this.isCategoryActive ? 'categoryactive' : ''}`}\n style={{\n background: this.color,\n border: this.isCategoryActive ? `5px solid ${this.darkenColor(this.color)}` : '',\n }}\n >\n <div class=\"color-name\">{this.name}</div>\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { M as MyColorInfo, d as defineCustomElement$1 } from './my-colorinfo2.js';
|
|
2
|
+
|
|
3
|
+
const MyColorinfo = MyColorInfo;
|
|
4
|
+
const defineCustomElement = defineCustomElement$1;
|
|
5
|
+
|
|
6
|
+
export { MyColorinfo, defineCustomElement };
|
|
7
|
+
|
|
8
|
+
//# sourceMappingURL=my-colorinfo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"my-colorinfo.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { s as setDataLayer } from './gtmUtils
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, getAssetPath } from '@stencil/core/internal/client';
|
|
2
|
+
import { s as setDataLayer } from './gtmUtils.js';
|
|
3
|
+
import { d as defineCustomElement$1 } from './index2.js';
|
|
3
4
|
|
|
4
|
-
const MyColorInfo = class {
|
|
5
|
-
constructor(
|
|
6
|
-
|
|
5
|
+
const MyColorInfo = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
7
9
|
this.closeInfoBox = createEvent(this, "closeInfoBox", 7);
|
|
8
|
-
this.data = null;
|
|
9
|
-
this.isMobile = false;
|
|
10
|
-
this.closeImage = 'close.png';
|
|
11
10
|
this.goToProduct = () => {
|
|
12
11
|
var _a;
|
|
13
12
|
this.currentColor &&
|
|
@@ -21,6 +20,13 @@ const MyColorInfo = class {
|
|
|
21
20
|
this.onCloseButtonClick = () => {
|
|
22
21
|
this.closeInfoBox.emit();
|
|
23
22
|
};
|
|
23
|
+
this.currentColor = undefined;
|
|
24
|
+
this.shop = undefined;
|
|
25
|
+
this.product = undefined;
|
|
26
|
+
this.data = null;
|
|
27
|
+
this.isMobile = false;
|
|
28
|
+
this.infoBoxWidth = undefined;
|
|
29
|
+
this.closeImage = 'close.png';
|
|
24
30
|
}
|
|
25
31
|
render() {
|
|
26
32
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
@@ -31,6 +37,34 @@ const MyColorInfo = class {
|
|
|
31
37
|
maxWidth: this.isMobile ? `${this.infoBoxWidth && this.infoBoxWidth - 35}px` : ``,
|
|
32
38
|
} }, !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
39
|
}
|
|
34
|
-
}
|
|
40
|
+
}, [0, "my-colorinfo", {
|
|
41
|
+
"currentColor": [16],
|
|
42
|
+
"shop": [1],
|
|
43
|
+
"product": [1],
|
|
44
|
+
"data": [16],
|
|
45
|
+
"isMobile": [4, "is-mobile"],
|
|
46
|
+
"infoBoxWidth": [2, "info-box-width"],
|
|
47
|
+
"closeImage": [1, "close-image"]
|
|
48
|
+
}]);
|
|
49
|
+
function defineCustomElement() {
|
|
50
|
+
if (typeof customElements === "undefined") {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
const components = ["my-colorinfo", "my-slider"];
|
|
54
|
+
components.forEach(tagName => { switch (tagName) {
|
|
55
|
+
case "my-colorinfo":
|
|
56
|
+
if (!customElements.get(tagName)) {
|
|
57
|
+
customElements.define(tagName, MyColorInfo);
|
|
58
|
+
}
|
|
59
|
+
break;
|
|
60
|
+
case "my-slider":
|
|
61
|
+
if (!customElements.get(tagName)) {
|
|
62
|
+
defineCustomElement$1();
|
|
63
|
+
}
|
|
64
|
+
break;
|
|
65
|
+
} });
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export { MyColorInfo as M, defineCustomElement as d };
|
|
35
69
|
|
|
36
|
-
|
|
70
|
+
//# sourceMappingURL=my-colorinfo2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"my-colorinfo2.js","mappings":";;;;MAMa,WAAW;;;;;IAWtB,gBAAW,GAAG;;MACZ,IAAI,CAAC,YAAY;QACf,YAAY,CAAC;UACX,KAAK,EAAE,aAAa;UACpB,IAAI,EAAE,IAAI,CAAC,IAAI;UACf,OAAO,EAAE,IAAI,CAAC,OAAO;UACrB,KAAK,EAAE,MAAA,IAAI,CAAC,YAAY,0CAAE,IAAI;SAC/B,CAAC,CAAC;KACN,CAAC;IAEF,uBAAkB,GAAG;MACnB,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;KAC1B,CAAC;;;;gBAnB6B,IAAI;oBACP,KAAK;;sBAEZ,WAAW;;EAkBhC,MAAM;;IACJ,QACE,WACE,KAAK,EAAE,sBAAsB,IAAI,CAAC,YAAY,CAAC,SAAS,GAAG,2BAA2B,GAAG,EAAE,EAAE,EAC7F,KAAK,EAAE;QACL,UAAU,EAAE,IAAI,CAAC,YAAY,CAAC,GAAG;QACjC,QAAQ,EAAE,GAAG,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY,GAAG,CAAC,IAAI;OAC5D,IAEA,IAAI,CAAC,QAAQ,IAAI,WAAK,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,IAAI,CAAC,kBAAkB,EAAE,GAAG,EAAE,YAAY,CAAC,YAAY,IAAI,CAAC,UAAU,EAAE,CAAC,EAAE,GAAG,EAAC,UAAU,GAAG,EAC/I,WACE,KAAK,EAAC,0BAA0B,EAChC,KAAK,EAAE;QACL,QAAQ,EAAE,IAAI,CAAC,QAAQ,GAAG,GAAG,IAAI,CAAC,Y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AAE,IAAI,0CAAE,IAAI,0CAAE,UAAU,0CAAE,IAAI,MAAK,IAAI,CAAC,IAAI,CAAA,EAAA,CAAC,KAClH,SACE,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,KAAK,EAAE,GAAG,IAAI,CAAC,YAAY,CAAC,aAAa,GAAG,SAAS,GAAG,EAAE,EAAE,EAC5D,MAAM,EAAC,QAAQ,EACf,IAAI,EAAE,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAU,uBAAK,OAAA,CAAA,MAAA,MAAA,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,0CAAE,IAAI,0CAAE,UAAU,0CAAE,IAAI,MAAK,IAAI,CAAC,IAAI,CAAA,EAAA,CAAC,0CAAE,IAAI,+BAGzG,CACL,CACG,CACF,CACF,EACN,WAAK,KAAK,EAAC,4BAA4B,IACrC,iBAAW,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,MAAA,IAAI,CAAC,IAAI,0CAAE,MAAM,CAAC,IAAI,GAAc,EAAC,GAAG,CAC9H,CACF,EACN;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/my-colorinfo/my-colorinfo.tsx"],"sourcesContent":["import { Component, Prop, h, getAssetPath, Event, EventEmitter } from '@stencil/core';\nimport { setDataLayer } from '../../gtmUtils';\nimport { Color, Link, Product } from '../../types';\n@Component({\n tag: 'my-colorinfo',\n})\nexport class MyColorInfo {\n @Prop() currentColor: Color;\n @Prop() shop: string;\n @Prop() product: string;\n @Prop() data: Product | null = null;\n @Prop() isMobile: boolean = false;\n @Prop() infoBoxWidth: number | null;\n @Prop() closeImage = 'close.png';\n\n @Event() closeInfoBox: EventEmitter;\n\n goToProduct = () => {\n this.currentColor &&\n setDataLayer({\n event: 'GoToProduct',\n shop: this.shop,\n product: this.product,\n color: this.currentColor?.name,\n });\n };\n\n onCloseButtonClick = () => {\n this.closeInfoBox.emit();\n };\n\n render() {\n return (\n <div\n class={`boxes__box-content ${this.currentColor.textWhite ? 'boxes__box-content__white' : ''}`}\n style={{\n background: this.currentColor.hex,\n maxWidth: `${this.infoBoxWidth && this.infoBoxWidth - 4}px`,\n }}\n >\n {this.isMobile && <img class={'closebtn'} onClick={this.onCloseButtonClick} src={getAssetPath(`./assets/${this.closeImage}`)} alt=\"closebtn\" />}\n <div\n class=\"boxes__box-content__info\"\n style={{\n maxWidth: this.isMobile ? `${this.infoBoxWidth && this.infoBoxWidth - 35}px` : ``,\n }}\n >\n {!this.isMobile && <img class={'closebtn'} onClick={this.onCloseButtonClick} src={getAssetPath(`./assets/${this.closeImage}`)} alt=\"closebtn\" />}\n {!this.isMobile && <h2>{this.currentColor.name}</h2>}\n {!this.isMobile && <h4>{this.currentColor.number}</h4>}\n {!this.isMobile && <div class=\"divider\"></div>}\n <div class=\"boxes__box-content__info__value\">\n <div class=\"boxes__box-content__info__value-image\">\n {this.currentColor?.image.data! && <img src={`${this.currentColor?.image?.data?.attributes?.formats.thumbnail.url}`} alt=\"color-image\" />}\n </div>\n <div class=\"boxes__box-content__info__value-product\">\n <div>\n {!this.isMobile && <p>Produkt:</p>}\n {this.isMobile && <h2>{this.currentColor.name}</h2>} <p>{this.product}</p>\n </div>\n\n {this.isMobile && <div class={'divider'}></div>}\n {this.currentColor && this.currentColor.links.find((link: Link) => link?.shop?.data?.attributes?.name === this.shop) && (\n <a\n onClick={this.goToProduct}\n class={`${this.currentColor.buttonInverse ? 'inverse' : ''}`}\n target=\"_blank\"\n href={this?.currentColor.links.find((link: Link) => link?.shop?.data?.attributes?.name === this.shop)?.path}\n >\n przejdź do produktu\n </a>\n )}\n </div>\n </div>\n </div>\n <div class=\"boxes__box-content__slider\">\n <my-slider color={this.currentColor.name} shop={this.shop} product={this.product} slides={this.data?.images.data}></my-slider>{' '}\n </div>\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as defineCustomElement$8 } from './my-backdrop2.js';
|
|
3
|
+
import { d as defineCustomElement$7 } from './my-colorbox2.js';
|
|
4
|
+
import { d as defineCustomElement$6 } from './my-colorinfo2.js';
|
|
5
|
+
import { d as defineCustomElement$5 } from './my-loader2.js';
|
|
6
|
+
import { d as defineCustomElement$4 } from './my-modal2.js';
|
|
7
|
+
import { d as defineCustomElement$3 } from './my-search2.js';
|
|
8
|
+
import { d as defineCustomElement$2 } from './index2.js';
|
|
2
9
|
|
|
3
10
|
const isObject = (val) => !Array.isArray(val) && val !== null && typeof val === 'object';
|
|
4
11
|
const hasAttributes = ({ vattrs }, requiredAttrs = []) => isObject(vattrs) && requiredAttrs.every(vattrs.hasOwnProperty.bind(vattrs));
|
|
@@ -104,10 +111,8 @@ const Helmet = (_props, children, utils) => {
|
|
|
104
111
|
return null;
|
|
105
112
|
}
|
|
106
113
|
const rendered = [];
|
|
107
|
-
const validChildren = [];
|
|
108
114
|
utils.forEach(children, (n) => {
|
|
109
115
|
if (isValidNode(n)) {
|
|
110
|
-
validChildren.push(n);
|
|
111
116
|
rendered.push(renderNode(n, utils));
|
|
112
117
|
}
|
|
113
118
|
});
|
|
@@ -120,23 +125,35 @@ const Helmet = (_props, children, utils) => {
|
|
|
120
125
|
|
|
121
126
|
const myComponentCss = ".pallete-wrapper.sc-my-component{display:flex;flex-direction:column;align-items:center;justify-content:center}";
|
|
122
127
|
|
|
123
|
-
const MyModalBundle = class {
|
|
124
|
-
constructor(
|
|
125
|
-
|
|
128
|
+
const MyModalBundle = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
129
|
+
constructor() {
|
|
130
|
+
super();
|
|
131
|
+
this.__registerHost();
|
|
132
|
+
this.shop = undefined;
|
|
133
|
+
this.product = undefined;
|
|
126
134
|
this.show = false;
|
|
135
|
+
this.readyToClose = false;
|
|
127
136
|
}
|
|
128
137
|
async open() {
|
|
129
138
|
this.show = true;
|
|
130
139
|
}
|
|
140
|
+
setReadyToCloseHandler(value) {
|
|
141
|
+
this.readyToClose = value.detail.observable;
|
|
142
|
+
}
|
|
131
143
|
closeModalHandler() {
|
|
132
144
|
this.show = false;
|
|
145
|
+
this.readyToClose = false;
|
|
133
146
|
}
|
|
134
147
|
render() {
|
|
135
148
|
let content = null;
|
|
136
149
|
if (this.show) {
|
|
137
150
|
content = [h("my-backdrop", null), h("my-modal", { shop: this.shop, product: this.product })];
|
|
138
151
|
}
|
|
139
|
-
return (h("div",
|
|
152
|
+
return (h("div", { onClick: () => {
|
|
153
|
+
if (this.readyToClose) {
|
|
154
|
+
this.closeModalHandler();
|
|
155
|
+
}
|
|
156
|
+
} }, h(Helmet, null, h("script", null, `(function (w, d, s, l, i) {
|
|
140
157
|
w[l] = w[l] || [];
|
|
141
158
|
w[l].push({ 'gtm.start': new Date().getTime(), 'event': 'gtm.js' });
|
|
142
159
|
var f = d.getElementsByTagName(s)[0],
|
|
@@ -147,8 +164,67 @@ const MyModalBundle = class {
|
|
|
147
164
|
f.parentNode.insertBefore(j, f);
|
|
148
165
|
})(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
166
|
}
|
|
150
|
-
get modalEl() { return
|
|
151
|
-
}
|
|
152
|
-
|
|
167
|
+
get modalEl() { return this; }
|
|
168
|
+
static get style() { return myComponentCss; }
|
|
169
|
+
}, [2, "my-component", {
|
|
170
|
+
"shop": [1],
|
|
171
|
+
"product": [1],
|
|
172
|
+
"show": [32],
|
|
173
|
+
"readyToClose": [32],
|
|
174
|
+
"open": [64]
|
|
175
|
+
}, [[0, "readyToCLose", "setReadyToCloseHandler"], [0, "close", "closeModalHandler"]]]);
|
|
176
|
+
function defineCustomElement$1() {
|
|
177
|
+
if (typeof customElements === "undefined") {
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
const components = ["my-component", "my-backdrop", "my-colorbox", "my-colorinfo", "my-loader", "my-modal", "my-search", "my-slider"];
|
|
181
|
+
components.forEach(tagName => { switch (tagName) {
|
|
182
|
+
case "my-component":
|
|
183
|
+
if (!customElements.get(tagName)) {
|
|
184
|
+
customElements.define(tagName, MyModalBundle);
|
|
185
|
+
}
|
|
186
|
+
break;
|
|
187
|
+
case "my-backdrop":
|
|
188
|
+
if (!customElements.get(tagName)) {
|
|
189
|
+
defineCustomElement$8();
|
|
190
|
+
}
|
|
191
|
+
break;
|
|
192
|
+
case "my-colorbox":
|
|
193
|
+
if (!customElements.get(tagName)) {
|
|
194
|
+
defineCustomElement$7();
|
|
195
|
+
}
|
|
196
|
+
break;
|
|
197
|
+
case "my-colorinfo":
|
|
198
|
+
if (!customElements.get(tagName)) {
|
|
199
|
+
defineCustomElement$6();
|
|
200
|
+
}
|
|
201
|
+
break;
|
|
202
|
+
case "my-loader":
|
|
203
|
+
if (!customElements.get(tagName)) {
|
|
204
|
+
defineCustomElement$5();
|
|
205
|
+
}
|
|
206
|
+
break;
|
|
207
|
+
case "my-modal":
|
|
208
|
+
if (!customElements.get(tagName)) {
|
|
209
|
+
defineCustomElement$4();
|
|
210
|
+
}
|
|
211
|
+
break;
|
|
212
|
+
case "my-search":
|
|
213
|
+
if (!customElements.get(tagName)) {
|
|
214
|
+
defineCustomElement$3();
|
|
215
|
+
}
|
|
216
|
+
break;
|
|
217
|
+
case "my-slider":
|
|
218
|
+
if (!customElements.get(tagName)) {
|
|
219
|
+
defineCustomElement$2();
|
|
220
|
+
}
|
|
221
|
+
break;
|
|
222
|
+
} });
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
const MyComponent = MyModalBundle;
|
|
226
|
+
const defineCustomElement = defineCustomElement$1;
|
|
227
|
+
|
|
228
|
+
export { MyComponent, defineCustomElement };
|
|
153
229
|
|
|
154
|
-
|
|
230
|
+
//# sourceMappingURL=my-component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"my-component.js","mappings":";;;;;;;;;AAAA,MAAM,QAAQ,GAAG,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,KAAK,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ,CAAC;AAClF,MAAM,aAAa,GAAG,CAAC,EAAE,MAAM,EAAE,EAAE,aAAa,GAAG,EAAE,KAAK,QAAQ,CAAC,MAAM,CAAC,IAAI,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;AACtI,MAAM,UAAU,GAAG,CAAC,EAAE,KAAK,EAAE,KAAK,OAAO,KAAK,KAAK,QAAQ,CAAC;AACnE;AACO,MAAM,SAAS,GAAG,CAAC,GAAG,KAAK,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,CAAC,QAAQ,KAAK,CAAC,IAAI,OAAO,GAAG,CAAC,aAAa,KAAK,QAAQ,CAAC;AAClH,MAAM,cAAc,GAAG,CAAC,GAAG,KAAK,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC;;ACJ1E,MAAM,aAAa,GAAG,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,KAAK,KAAK;AAC5E,IAAI,IAAI,KAAK,IAAI,IAAI,EAAE;AACvB,QAAQ,OAAO,QAAQ,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AAC9C,KAAK;AACL,IAAI,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;AACj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Ac,GAAG,gHAAgH;;MCQ1H,aAAa;;;;;;gBAKR,KAAK;wBACG,KAAK;;EAG7B,MAAM,IAAI;IACR,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;GAClB;EAGD,sBAAsB,CAAC,KAAkB;IACvC,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC;GAC7C;EAGD,iBAAiB;IACf,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;IAClB,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;GAC3B;EAED,MAAM;IACJ,IAAI,OAAO,GAAG,IAAI,CAAC;IACnB,IAAI,IAAI,CAAC,IAAI,EAAE;MACb,OAAO,GAAG,CAAC,sBAA2B,EAAE,gBAAU,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,GAAa,CAAC,CAAC;KACxG;IACD,QACE,WACE,OAAO,EAAE;QACP,IAAI,IAAI,CAAC,YAAY,EAAE;UACrB,IAAI,CAAC,iBAAiB,EAAE,CAAC;SAC1B;OACF,IAED,EAAC,MAAM,QACL,kBACG;;;;;;;;;kEASqD,CAC/C,CACF,EACT,WAAK,KAAK,EAAC,iBAAiB,IAAE,OAAO,CAAO,EAC5C,oBACE,cAAQ,GAAG,EAAC,yDAAyD,EAAC,MAAM,EAAC,GAAG,EAAC,KAAK,EAAC,GAAG,EAAC,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAW,CAC7I,CACP,EACN;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["RenderTypes"],"sources":["./node_modules/@stencil/helmet/dist/util.js","./node_modules/@stencil/helmet/dist/dom.js","./node_modules/@stencil/helmet/dist/render.js","./node_modules/@stencil/helmet/dist/stencil-helmet.js","./src/components/my-component/my-component.scss?tag=my-component&encapsulation=scoped","./src/components/my-component/my-component.tsx"],"sourcesContent":["const isObject = (val) => !Array.isArray(val) && val !== null && typeof val === 'object';\nexport const hasAttributes = ({ vattrs }, requiredAttrs = []) => isObject(vattrs) && requiredAttrs.every(vattrs.hasOwnProperty.bind(vattrs));\nexport const isTextNode = ({ vtext }) => typeof vtext === 'string';\n// Can't use instanceof HTMLElement because MockHTMLElement during pre-rendering isn't\nexport const isElement = (val) => typeof val === 'object' && val.nodeType === 1 && typeof val.ownerDocument === 'object';\nexport const isElementArray = (val) => Array.isArray(val) && val.every(isElement);\n","import { isElement, isElementArray } from './util';\nexport const createElement = ({ vtag, vattrs, vchildren, vtext }, utils) => {\n if (vtext != null) {\n return document.createTextNode(vtext);\n }\n const element = document.createElement(vtag);\n if (vattrs != null) {\n for (const key in vattrs) {\n element.setAttribute(key, vattrs[key]);\n }\n }\n if (vchildren != null) {\n utils.forEach(vchildren, (child) => {\n element.appendChild(createElement(child, utils));\n });\n }\n return element;\n};\nexport const shouldApplyToHead = (val) => isElement(val) || (isElementArray(val) && val.length === 2);\nexport const applyToHead = (element) => {\n if (Array.isArray(element)) {\n return document.head.replaceChild(element[0], element[1]);\n }\n return document.head.appendChild(element);\n};\n","import { hasAttributes, isTextNode } from './util';\nimport { createElement } from './dom';\nconst hasChildren = (node) => Array.isArray(node.vchildren);\nconst getFirstChild = (vchildren, utils) => {\n let firstChild = null;\n utils.forEach(vchildren || [], (c, i) => {\n if (i === 0) {\n firstChild = c;\n return;\n }\n });\n return firstChild;\n};\nfunction title(node, head, utils) {\n const firstChild = getFirstChild(node.vchildren || [], utils);\n if (firstChild && isTextNode(firstChild)) {\n return [createElement(node, utils), head.querySelector('title')];\n }\n}\nfunction meta(node, head, utils) {\n var _a, _b, _c;\n const namePropKey = ((_a = node.vattrs) === null || _a === void 0 ? void 0 : _a.property) ? 'property' : 'name';\n const namePropValue = ((_b = node.vattrs) === null || _b === void 0 ? void 0 : _b.property) || ((_c = node.vattrs) === null || _c === void 0 ? void 0 : _c.name);\n const existingElement = head.querySelector(`meta[${namePropKey}=\"${namePropValue}\"]`);\n if (existingElement !== null) {\n return [createElement(node, utils), existingElement];\n }\n else {\n return createElement(node, utils);\n }\n}\nfunction link(node, _head, utils) {\n if (!hasChildren(node)) {\n return createElement(node, utils);\n }\n}\nfunction style(node, _head, utils) {\n const firstChild = getFirstChild(node.vchildren || [], utils);\n if (firstChild && isTextNode(firstChild)) {\n return createElement(node, utils);\n }\n}\nfunction script(node, _head, utils) {\n if (hasChildren(node) || hasAttributes(node)) {\n return createElement(node, utils);\n }\n}\nfunction base(node, _head, utils) {\n if (!hasChildren(node) && hasAttributes(node)) {\n return createElement(node, utils);\n }\n}\nconst template = createElement;\nconst noscript = createElement; // SSR only\nconst types = {\n title,\n meta,\n link,\n style,\n script,\n base,\n template,\n noscript,\n};\nexport default types;\n","import RenderTypes from './render';\nimport { shouldApplyToHead, applyToHead } from './dom';\nconst headExists = document && document.head;\nconst validTagNames = Object.keys(RenderTypes);\nconst isValidNode = (node) => validTagNames.indexOf(node.vtag) > -1;\nconst renderNode = (node, utils) => RenderTypes[node.vtag](node, document.head, utils);\nexport const Helmet = (_props, children, utils) => {\n if (!headExists) {\n return null;\n }\n const rendered = [];\n const validChildren = [];\n utils.forEach(children, (n) => {\n if (isValidNode(n)) {\n validChildren.push(n);\n rendered.push(renderNode(n, utils));\n }\n });\n // Build an HTMLElement for each provided virtual child\n rendered\n .filter(shouldApplyToHead)\n .forEach(applyToHead);\n return null;\n};\nexport default Helmet;\n",".pallete-wrapper {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n","import Helmet from '@stencil/helmet';\nimport { Component, Prop, Method, Element, State, Listen, h } from '@stencil/core';\n\n@Component({\n tag: 'my-component',\n styleUrl: 'my-component.scss',\n scoped: true,\n})\nexport class MyModalBundle {\n @Element() modalEl: HTMLElement;\n\n @Prop() shop: string;\n @Prop() product: string;\n @State() show = false;\n @State() readyToClose = false;\n\n @Method()\n async open() {\n this.show = true;\n }\n\n @Listen('readyToCLose')\n setReadyToCloseHandler(value: CustomEvent) {\n this.readyToClose = value.detail.observable;\n }\n\n @Listen('close')\n closeModalHandler() {\n this.show = false;\n this.readyToClose = false;\n }\n\n render() {\n let content = null;\n if (this.show) {\n content = [<my-backdrop></my-backdrop>, <my-modal shop={this.shop} product={this.product}></my-modal>];\n }\n return (\n <div\n onClick={() => {\n if (this.readyToClose) {\n this.closeModalHandler();\n }\n }}\n >\n <Helmet>\n <script>\n {`(function (w, d, s, l, i) {\n w[l] = w[l] || [];\n w[l].push({ 'gtm.start': new Date().getTime(), 'event': 'gtm.js' });\n var f = d.getElementsByTagName(s)[0],\n j = d.createElement(s),\n dl = l != 'dataLayer' ? '&l=' + l : '';\n j.async = true;\n j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;\n f.parentNode.insertBefore(j, f);\n })(window, document, 'script', 'dataLayer', 'GTM-PMTKHDX');`}\n </script>\n </Helmet>\n <div class=\"pallete-wrapper\">{content}</div>\n <noscript>\n <iframe src=\"https://www.googletagmanager.com/ns.html?id=GTM-PMTKHDX\" height=\"0\" width=\"0\" style={{ display: 'none', visibility: 'hidden' }}></iframe>\n </noscript>\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"my-loader.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
|
@@ -1,15 +1,31 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
2
|
|
|
3
3
|
const myLoaderCss = ".container.sc-my-loader{display:flex;justify-content:center;align-items:center;height:100px;overflow:hidden}.item.sc-my-loader{width:20px;height:20px;margin:3px;list-style-type:none;transition:0.5s all ease}.item.sc-my-loader:nth-child(1){animation:right-1 1s infinite alternate;background-color:#b8cf40;animation-delay:20ms}@keyframes right-1{0%{transform:translateY(-18px)}100%{transform:translateY(18px)}}.item.sc-my-loader:nth-child(2){animation:right-2 1s infinite alternate;background-color:#ee4b5e;animation-delay:40ms}@keyframes right-2{0%{transform:translateY(-21px)}100%{transform:translateY(21px)}}.item.sc-my-loader:nth-child(3){animation:right-3 1s infinite alternate;background-color:#ea0f47;animation-delay:60ms}@keyframes right-3{0%{transform:translateY(-24px)}100%{transform:translateY(24px)}}.item.sc-my-loader:nth-child(4){animation:right-4 1s infinite alternate;background-color:#d42840;animation-delay:80ms}@keyframes right-4{0%{transform:translateY(-27px)}100%{transform:translateY(27px)}}.item.sc-my-loader:nth-child(5){animation:right-5 1s infinite alternate;background-color:#8b2850;animation-delay:100ms}@keyframes right-5{0%{transform:translateY(-30px)}100%{transform:translateY(30px)}}";
|
|
4
4
|
|
|
5
|
-
const MyLoader = class {
|
|
6
|
-
constructor(
|
|
7
|
-
|
|
5
|
+
const MyLoader = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
8
9
|
}
|
|
9
10
|
render() {
|
|
10
11
|
return (h("div", { class: "container" }, h("div", { class: "item" }), h("div", { class: "item" }), h("div", { class: "item" }), h("div", { class: "item" }), h("div", { class: "item" })));
|
|
11
12
|
}
|
|
12
|
-
}
|
|
13
|
-
|
|
13
|
+
static get style() { return myLoaderCss; }
|
|
14
|
+
}, [2, "my-loader"]);
|
|
15
|
+
function defineCustomElement() {
|
|
16
|
+
if (typeof customElements === "undefined") {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
const components = ["my-loader"];
|
|
20
|
+
components.forEach(tagName => { switch (tagName) {
|
|
21
|
+
case "my-loader":
|
|
22
|
+
if (!customElements.get(tagName)) {
|
|
23
|
+
customElements.define(tagName, MyLoader);
|
|
24
|
+
}
|
|
25
|
+
break;
|
|
26
|
+
} });
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { MyLoader as M, defineCustomElement as d };
|
|
14
30
|
|
|
15
|
-
|
|
31
|
+
//# sourceMappingURL=my-loader2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"my-loader2.js","mappings":";;AAAA,MAAM,WAAW,GAAG,+rCAA+rC;;MCOtsC,QAAQ;;;;;EACnB,MAAM;IACJ,QACE,WAAK,KAAK,EAAC,WAAW,IACpB,WAAK,KAAK,EAAC,MAAM,GAAO,EACxB,WAAK,KAAK,EAAC,MAAM,GAAO,EACxB,WAAK,KAAK,EAAC,MAAM,GAAO,EACxB,WAAK,KAAK,EAAC,MAAM,GAAO,EACxB,WAAK,KAAK,EAAC,MAAM,GAAO,CACpB,EACN;GACH;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/my-loader/my-loader.scss?tag=my-loader&encapsulation=scoped","./src/components/my-loader/my-loader.tsx"],"sourcesContent":["$color: #b8cf40, #ee4b5e, #ea0f47, #d42840, #8b2850;\n\n@mixin anim($i) {\n $y: ($i + 5) * 3;\n\n @keyframes right-#{$i} {\n 0% {\n transform: translateY(#{-$y}px);\n }\n 100% {\n transform: translateY(#{$y}px);\n }\n }\n}\n\n.container {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100px;\n overflow: hidden;\n}\n\n.item {\n width: 20px;\n height: 20px;\n margin: 3px;\n list-style-type: none;\n transition: 0.5s all ease;\n}\n\n@for $i from 1 through 5 {\n .item:nth-child(#{$i}) {\n @include anim($i);\n animation: right-#{$i} 1s infinite alternate;\n background-color: nth($color, $i);\n animation-delay: 20ms * $i;\n }\n}\n","import { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'my-loader',\n styleUrl: 'my-loader.scss',\n scoped: true,\n})\nexport class MyLoader {\n render() {\n return (\n <div class=\"container\">\n <div class=\"item\"></div>\n <div class=\"item\"></div>\n <div class=\"item\"></div>\n <div class=\"item\"></div>\n <div class=\"item\"></div>\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"my-modal.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|