@ppg_pl/pallete 2.0.4 → 2.0.5
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/loader.cjs.js +1 -1
- package/dist/cjs/my-backdrop_8.cjs.entry.js +40 -29
- package/dist/cjs/my-backdrop_8.cjs.entry.js.map +1 -1
- package/dist/cjs/pallete.cjs.js +1 -1
- package/dist/collection/components/my-colorbox/my-colorbox.js +27 -1
- package/dist/collection/components/my-colorbox/my-colorbox.js.map +1 -1
- package/dist/collection/components/my-modal/my-modal.js +8 -2
- package/dist/collection/components/my-modal/my-modal.js.map +1 -1
- package/dist/collection/types.js.map +1 -1
- package/dist/components/index2.js +4 -5302
- package/dist/components/index2.js.map +1 -1
- package/dist/components/index3.js +5305 -0
- package/dist/components/index3.js.map +1 -0
- package/dist/components/my-colorbox2.js +9 -3
- package/dist/components/my-colorbox2.js.map +1 -1
- package/dist/components/my-colorinfo2.js +2 -2
- package/dist/components/my-component.js +1 -1
- package/dist/components/my-modal2.js +10 -4
- package/dist/components/my-modal2.js.map +1 -1
- package/dist/components/my-slider.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/my-backdrop_8.entry.js +40 -29
- package/dist/esm/my-backdrop_8.entry.js.map +1 -1
- package/dist/esm/pallete.js +1 -1
- package/dist/pallete/p-39f2a8e0.entry.js +2 -0
- package/dist/pallete/p-39f2a8e0.entry.js.map +1 -0
- package/dist/pallete/pallete.esm.js +1 -1
- package/dist/pallete/pallete.esm.js.map +1 -1
- package/dist/types/components/my-colorbox/my-colorbox.d.ts +2 -0
- package/dist/types/components.d.ts +4 -2
- package/dist/types/types.d.ts +6 -0
- package/package.json +1 -1
- package/www/build/p-39f2a8e0.entry.js +2 -0
- package/www/build/p-39f2a8e0.entry.js.map +1 -0
- package/www/build/p-90c0eb8a.js +163 -0
- package/www/build/p-fd390eef.css +3 -0
- package/www/build/pallete.esm.js +1 -1
- package/www/build/pallete.esm.js.map +1 -1
- package/www/index.html +1 -1
- package/dist/components/gtmUtils.js +0 -7
- package/dist/components/gtmUtils.js.map +0 -1
- package/dist/pallete/p-ee5f61e8.entry.js +0 -2
- package/dist/pallete/p-ee5f61e8.entry.js.map +0 -1
- package/www/build/p-7c1b28aa.css +0 -1
- package/www/build/p-e8e99831.js +0 -2
- package/www/build/p-ee5f61e8.entry.js +0 -2
- package/www/build/p-ee5f61e8.entry.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
-
import { s as setDataLayer } from './
|
|
2
|
+
import { s as setDataLayer, A as APIURL, a as accessToken } from './index2.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
|
|
|
@@ -34,10 +34,15 @@ const MyColorBox = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
34
34
|
this.product = undefined;
|
|
35
35
|
this.isActive = undefined;
|
|
36
36
|
this.isCategoryActive = undefined;
|
|
37
|
+
this.isImageInsteadHex = undefined;
|
|
37
38
|
}
|
|
38
39
|
render() {
|
|
40
|
+
var _a, _b, _c;
|
|
41
|
+
console.log(this.color);
|
|
39
42
|
return (h("div", { onMouseEnter: () => this.colorCheck(), onMouseLeave: () => this.colorUnCheck(), class: `my-color-box ${this.isActive ? 'active' : ''} ${this.isCategoryActive ? 'categoryactive' : ''}`, style: {
|
|
40
|
-
|
|
43
|
+
backgroundSize: ((_a = this.isImageInsteadHex) === null || _a === void 0 ? void 0 : _a.isImageInsteadHex) ? 'cover' : '',
|
|
44
|
+
backgroundImage: ((_b = this.isImageInsteadHex) === null || _b === void 0 ? void 0 : _b.isImageInsteadHex) ? `url(${APIURL}/assets/${this.isImageInsteadHex.bigImage}?access_token=${accessToken})` : '',
|
|
45
|
+
background: ((_c = this.isImageInsteadHex) === null || _c === void 0 ? void 0 : _c.isImageInsteadHex) ? this.isImageInsteadHex.bigImage : this.color,
|
|
41
46
|
border: this.isCategoryActive ? `5px solid ${this.darkenColor(this.color)}` : '',
|
|
42
47
|
} }, h("div", { class: "color-name" }, this.name)));
|
|
43
48
|
}
|
|
@@ -48,7 +53,8 @@ const MyColorBox = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
48
53
|
"shop": [1],
|
|
49
54
|
"product": [1],
|
|
50
55
|
"isActive": [4, "is-active"],
|
|
51
|
-
"isCategoryActive": [4, "is-category-active"]
|
|
56
|
+
"isCategoryActive": [4, "is-category-active"],
|
|
57
|
+
"isImageInsteadHex": [16]
|
|
52
58
|
}]);
|
|
53
59
|
function defineCustomElement() {
|
|
54
60
|
if (typeof customElements === "undefined") {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"my-colorbox2.js","mappings":";;;AAAA,MAAM,aAAa,GAAG,0xBAA0xB;;
|
|
1
|
+
{"file":"my-colorbox2.js","mappings":";;;AAAA,MAAM,aAAa,GAAG,0xBAA0xB;;MCSnyB,UAAU;;;;IAWrB,eAAU,GAAG;MACX,IAAI,CAAC,YAAY,GAAG,UAAU,CAAC;QAC7B,YAAY,CAAC;UACX,KAAK,EAAE,YAAY;UACnB,IAAI,EAAE,IAAI,CAAC,IAAI;UACf,OAAO,EAAE,IAAI,CAAC,OAAO;UACrB,KAAK,EAAE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,IAAI,CAAC,iBAAiB,CAAC,QAAQ,iBAAiB,WAAW,GAAG,GAAG,EAAE;QACxJ,UAAU,EAAE,CAAA,MAAA,IAAI,CAAC,iBAAiB,0CAAE,iBAAiB,IAAG,IAAI,CAAC,iBAAiB,CAAC,QAAQ,GAAG,IAAI,CAAC,KAAK;QACpG,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';\nimport { ColorBoxyIsImageInsteadHex } from '../../types';\nimport { APIURL, accessToken } from '../api';\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 @Prop() isImageInsteadHex?: ColorBoxyIsImageInsteadHex;\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 console.log(this.color);\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 backgroundSize: this.isImageInsteadHex?.isImageInsteadHex ? 'cover' : '',\n backgroundImage: this.isImageInsteadHex?.isImageInsteadHex ? `url(${APIURL}/assets/${this.isImageInsteadHex.bigImage}?access_token=${accessToken})` : '',\n background: this.isImageInsteadHex?.isImageInsteadHex ? this.isImageInsteadHex.bigImage : 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}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, getAssetPath } from '@stencil/core/internal/client';
|
|
2
|
-
import { s as setDataLayer } from './
|
|
3
|
-
import {
|
|
2
|
+
import { s as setDataLayer, A as APIURL, a as accessToken } from './index2.js';
|
|
3
|
+
import { d as defineCustomElement$1 } from './index3.js';
|
|
4
4
|
|
|
5
5
|
const MyColorInfo = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
6
|
constructor() {
|
|
@@ -5,7 +5,7 @@ import { d as defineCustomElement$6 } from './my-colorinfo2.js';
|
|
|
5
5
|
import { d as defineCustomElement$5 } from './my-loader2.js';
|
|
6
6
|
import { d as defineCustomElement$4 } from './my-modal2.js';
|
|
7
7
|
import { d as defineCustomElement$3 } from './my-search2.js';
|
|
8
|
-
import { d as defineCustomElement$2 } from './
|
|
8
|
+
import { d as defineCustomElement$2 } from './index3.js';
|
|
9
9
|
|
|
10
10
|
const isObject = (val) => !Array.isArray(val) && val !== null && typeof val === 'object';
|
|
11
11
|
const hasAttributes = ({ vattrs }, requiredAttrs = []) => isObject(vattrs) && requiredAttrs.every(vattrs.hasOwnProperty.bind(vattrs));
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement as HTMLElement$1, createEvent, h, getAssetPath } from '@stencil/core/internal/client';
|
|
2
|
-
import { b as ApiService, A as APIURL, a as accessToken
|
|
3
|
-
import { s as setDataLayer } from './gtmUtils.js';
|
|
2
|
+
import { s as setDataLayer, b as ApiService, A as APIURL, a as accessToken } from './index2.js';
|
|
4
3
|
import { d as defineCustomElement$5 } from './my-colorbox2.js';
|
|
5
4
|
import { d as defineCustomElement$4 } from './my-colorinfo2.js';
|
|
6
5
|
import { d as defineCustomElement$3 } from './my-loader2.js';
|
|
7
6
|
import { d as defineCustomElement$2 } from './my-search2.js';
|
|
7
|
+
import { d as defineCustomElement$1 } from './index3.js';
|
|
8
8
|
|
|
9
9
|
/** @type {import('.')} */
|
|
10
10
|
var esErrors = Error;
|
|
@@ -2600,7 +2600,10 @@ const MyModal = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$1 {
|
|
|
2600
2600
|
}
|
|
2601
2601
|
render() {
|
|
2602
2602
|
var _a, _b, _c, _d;
|
|
2603
|
-
return (h("div", { class: `my-modal`, onMouseEnter: () => this.handleReadyToClose(false), onMouseLeave: () => this.handleReadyToClose(true) }, this.preloader && (h("div", { class: 'loader' }, h("my-loader", null))), !this.preloader && (h("button", { class: "my-modal__close", onClick: () => this.closeModalHandler() }, h("img", { src: getAssetPath(`./assets/${this.closeImage}`), alt: "closebtn" }))), !this.preloader && this.data && this.data.modalLogo && h("img", { src: `${APIURL}/assets/${(_a = this.data) === null || _a === void 0 ? void 0 : _a.modalLogo}?access_token=${accessToken}`, alt: "modal-logo" }), !this.preloader && this.data && (h("p", { class: "my-modal__see-more" }, (_b = this.data) === null || _b === void 0 ? void 0 : _b.modalDescription)), this.showRange && (h("div", { class: 'categories' }, this.data && h("my-search", { productId: Number((_c = this.data) === null || _c === void 0 ? void 0 : _c.id), isMobile: this.isMobile }), h("div", { class: 'categories__container', style: { maxWidth: `${this.infoBoxWidth}px` } }, (_d = this.data) === null || _d === void 0 ? void 0 : _d.Category.map((c) => (h("my-colorbox", { key: c.id, onClick: () => this.handleCategoryClick(c.Category_id.id), color: c.Category_id.hex, name: c.Category_id.category_name, shop: this.shop, product: this.product, isCategoryActive: this.selectedCategory === c.Category_id.id
|
|
2603
|
+
return (h("div", { class: `my-modal`, onMouseEnter: () => this.handleReadyToClose(false), onMouseLeave: () => this.handleReadyToClose(true) }, this.preloader && (h("div", { class: 'loader' }, h("my-loader", null))), !this.preloader && (h("button", { class: "my-modal__close", onClick: () => this.closeModalHandler() }, h("img", { src: getAssetPath(`./assets/${this.closeImage}`), alt: "closebtn" }))), !this.preloader && this.data && this.data.modalLogo && h("img", { src: `${APIURL}/assets/${(_a = this.data) === null || _a === void 0 ? void 0 : _a.modalLogo}?access_token=${accessToken}`, alt: "modal-logo" }), !this.preloader && this.data && (h("p", { class: "my-modal__see-more" }, (_b = this.data) === null || _b === void 0 ? void 0 : _b.modalDescription)), this.showRange && (h("div", { class: 'categories' }, this.data && h("my-search", { productId: Number((_c = this.data) === null || _c === void 0 ? void 0 : _c.id), isMobile: this.isMobile }), h("div", { class: 'categories__container', style: { maxWidth: `${this.infoBoxWidth}px` } }, (_d = this.data) === null || _d === void 0 ? void 0 : _d.Category.map((c) => (h("my-colorbox", { key: c.id, onClick: () => this.handleCategoryClick(c.Category_id.id), color: c.Category_id.hex, name: c.Category_id.category_name, shop: this.shop, product: this.product, isCategoryActive: this.selectedCategory === c.Category_id.id, isImageInsteadHex: {
|
|
2604
|
+
isImageInsteadHex: (c === null || c === void 0 ? void 0 : c.imageInsteadHex) || false,
|
|
2605
|
+
bigImage: (c === null || c === void 0 ? void 0 : c.bigImage) || '',
|
|
2606
|
+
} })))), this.isMobile && (h("div", { class: 'categories__slide-information', style: { width: `${this.infoBoxWidth}px` } }, h("span", null, "Przewi\u0144 w lewo"), h("span", null, "Przewi\u0144 w prawo"))))), h("div", { class: 'my-modal__wrapper' }, this.loading && h("my-loader", null), !this.loading && this.colors && (h("div", { class: 'container_boxes' }, this.colors.list.length > 0 ? (this.chunks(this.colors.list).map((color, index) => {
|
|
2604
2607
|
var _a;
|
|
2605
2608
|
return (h("div", { key: index, class: "boxes" }, h("div", { class: "boxes__list" }, color.map((c) => {
|
|
2606
2609
|
var _a;
|
|
@@ -2617,7 +2620,10 @@ const MyModal = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$1 {
|
|
|
2617
2620
|
}),
|
|
2618
2621
|
((_c = this.currentColor) === null || _c === void 0 ? void 0 : _c.id) && this.clearInterval(),
|
|
2619
2622
|
];
|
|
2620
|
-
}, color: c.hex, name: c.name, isActive: ((_a = this.currentColor) === null || _a === void 0 ? void 0 : _a.id) === c.id, shop: this.shop, product: this.product
|
|
2623
|
+
}, color: c.hex, name: c.name, isActive: ((_a = this.currentColor) === null || _a === void 0 ? void 0 : _a.id) === c.id, shop: this.shop, product: this.product, isImageInsteadHex: {
|
|
2624
|
+
isImageInsteadHex: c.imageInsteadHex,
|
|
2625
|
+
bigImage: c.bigImage,
|
|
2626
|
+
} }));
|
|
2621
2627
|
})), ((_a = this.currentColor) === null || _a === void 0 ? void 0 : _a.id) && index === this.currentIndex && (h("my-colorinfo", { currentColor: this.currentColor, shop: this.shop, product: this.product, data: this.data, isMobile: this.isMobile, infoBoxWidth: this.infoBoxWidth }))));
|
|
2622
2628
|
})) : (h("p", null, "Brak wynik\u00F3w")), this.colors.pagination.filter_count > limit && (h("div", { class: 'pagination' }, Array.from({ length: Math.ceil(this.colors.pagination.filter_count / limit) }).map((_, i) => (h("span", { class: i + 1 === this.page ? 'current' : '', onClick: e => {
|
|
2623
2629
|
e.preventDefault();
|