@ppg_pl/pallete 2.0.11 → 2.0.13
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 +13 -16
- 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.css +2 -2
- package/dist/collection/components/my-colorinfo/my-colorinfo.js +7 -27
- package/dist/collection/components/my-colorinfo/my-colorinfo.js.map +1 -1
- package/dist/collection/components/my-component/my-component.js +19 -0
- package/dist/collection/components/my-component/my-component.js.map +1 -1
- package/dist/collection/components/my-modal/my-modal.js +1 -1
- package/dist/collection/components/my-modal/my-modal.js.map +1 -1
- package/dist/collection/components/my-slider/index.js +1 -1
- package/dist/collection/components/my-slider/index.js.map +1 -1
- package/dist/components/index3.js +1 -1
- package/dist/components/index3.js.map +1 -1
- package/dist/components/my-colorbox2.js +1 -1
- package/dist/components/my-colorbox2.js.map +1 -1
- package/dist/components/my-colorinfo2.js +7 -13
- package/dist/components/my-colorinfo2.js.map +1 -1
- package/dist/components/my-component.js +5 -1
- package/dist/components/my-component.js.map +1 -1
- package/dist/components/my-modal2.js +1 -1
- package/dist/components/my-modal2.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/my-backdrop_8.entry.js +13 -16
- package/dist/esm/my-backdrop_8.entry.js.map +1 -1
- package/dist/esm/pallete.js +1 -1
- package/dist/pallete/p-919c7427.entry.js +2 -0
- package/dist/pallete/p-919c7427.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-colorinfo/my-colorinfo.d.ts +2 -4
- package/dist/types/components/my-component/my-component.d.ts +1 -0
- package/dist/types/components.d.ts +1 -1
- package/package.json +1 -1
- package/www/build/p-919c7427.entry.js +2 -0
- package/www/build/p-919c7427.entry.js.map +1 -0
- package/www/build/pallete.esm.js +1 -1
- package/www/build/pallete.esm.js.map +1 -1
- package/dist/pallete/p-31c2e093.entry.js +0 -2
- package/dist/pallete/p-31c2e093.entry.js.map +0 -1
- package/www/build/p-31c2e093.entry.js +0 -2
- package/www/build/p-31c2e093.entry.js.map +0 -1
package/dist/esm/loader.js
CHANGED
|
@@ -11,7 +11,7 @@ const patchEsm = () => {
|
|
|
11
11
|
const defineCustomElements = (win, options) => {
|
|
12
12
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
13
13
|
return patchEsm().then(() => {
|
|
14
|
-
return bootstrapLazy([["my-backdrop_8",[[2,"my-component",{"shop":[1],"product":[1],"baselink":[1],"show":[32],"readyToClose":[32],"open":[64]},[[0,"readyToCLose","setReadyToCloseHandler"],[0,"close","closeModalHandler"]]],[0,"my-modal",{"shop":[1],"product":[1],"baselink":[1],"closeImage":[1,"close-image"],"arrowDown":[1,"arrow-down"],"chunksNum":[32],"data":[32],"preloader":[32],"loading":[32],"colors":[32],"currentColor":[32],"currentIndex":[32],"infoBoxWidth":[32],"boxWidth":[32],"padding":[32],"isMobile":[32],"showRange":[32],"colorCategories":[32],"selectedCategory":[32],"page":[32],"open":[64]},[[0,"closeInfoBox","closeInfoBoxHandler"],[9,"resize","handleResize"],[0,"searchColors","searchColorsHandler"]]],[0,"my-backdrop"],[0,"my-colorinfo",{"currentColor":[16],"shop":[1],"product":[1],"baselink":[1],"data":[16],"isMobile":[4,"is-mobile"],"infoBoxWidth":[2,"info-box-width"],"closeImage":[1,"close-image"]}],[0,"my-colorbox",{"color":[1],"name":[1],"shop":[1],"product":[1],"isActive":[4,"is-active"],"isCategoryActive":[4,"is-category-active"],"isImageInsteadHex":[16]}],[2,"my-loader"],[2,"my-search",{"productId":[2,"product-id"],"isMobile":[4,"is-mobile"],"searchIcon":[1,"search-icon"],"searchText":[32]},[[4,"clearSearchText","clearSearchTextHandler"]]],[0,"my-slider",{"slides":[16],"shop":[1],"product":[1],"color":[1]}]]]], options);
|
|
14
|
+
return bootstrapLazy([["my-backdrop_8",[[2,"my-component",{"shop":[1],"product":[1],"baselink":[1],"show":[32],"readyToClose":[32],"open":[64],"close":[64]},[[0,"readyToCLose","setReadyToCloseHandler"],[0,"close","closeModalHandler"]]],[0,"my-modal",{"shop":[1],"product":[1],"baselink":[1],"closeImage":[1,"close-image"],"arrowDown":[1,"arrow-down"],"chunksNum":[32],"data":[32],"preloader":[32],"loading":[32],"colors":[32],"currentColor":[32],"currentIndex":[32],"infoBoxWidth":[32],"boxWidth":[32],"padding":[32],"isMobile":[32],"showRange":[32],"colorCategories":[32],"selectedCategory":[32],"page":[32],"open":[64]},[[0,"closeInfoBox","closeInfoBoxHandler"],[9,"resize","handleResize"],[0,"searchColors","searchColorsHandler"]]],[0,"my-backdrop"],[0,"my-colorinfo",{"currentColor":[16],"shop":[1],"product":[1],"baselink":[1],"data":[16],"isMobile":[4,"is-mobile"],"infoBoxWidth":[2,"info-box-width"],"closeImage":[1,"close-image"]}],[0,"my-colorbox",{"color":[1],"name":[1],"shop":[1],"product":[1],"isActive":[4,"is-active"],"isCategoryActive":[4,"is-category-active"],"isImageInsteadHex":[16]}],[2,"my-loader"],[2,"my-search",{"productId":[2,"product-id"],"isMobile":[4,"is-mobile"],"searchIcon":[1,"search-icon"],"searchText":[32]},[[4,"clearSearchText","clearSearchTextHandler"]]],[0,"my-slider",{"slides":[16],"shop":[1],"product":[1],"color":[1]}]]]], options);
|
|
15
15
|
});
|
|
16
16
|
};
|
|
17
17
|
|
|
@@ -42,7 +42,7 @@ class API {
|
|
|
42
42
|
}
|
|
43
43
|
const ApiService = new API();
|
|
44
44
|
|
|
45
|
-
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:
|
|
45
|
+
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:65px;height:65px}}.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}";
|
|
46
46
|
|
|
47
47
|
const MyColorBox = class {
|
|
48
48
|
constructor(hostRef) {
|
|
@@ -92,10 +92,8 @@ const MyColorInfo = class {
|
|
|
92
92
|
constructor(hostRef) {
|
|
93
93
|
registerInstance(this, hostRef);
|
|
94
94
|
this.closeInfoBox = createEvent(this, "closeInfoBox", 7);
|
|
95
|
-
this.
|
|
96
|
-
this.goToProduct = (e) => {
|
|
95
|
+
this.goToProduct = () => {
|
|
97
96
|
var _a;
|
|
98
|
-
e.preventDefault();
|
|
99
97
|
this.currentColor &&
|
|
100
98
|
setDataLayer({
|
|
101
99
|
event: 'GoToProduct',
|
|
@@ -103,8 +101,7 @@ const MyColorInfo = class {
|
|
|
103
101
|
product: this.product,
|
|
104
102
|
color: (_a = this.currentColor) === null || _a === void 0 ? void 0 : _a.name,
|
|
105
103
|
});
|
|
106
|
-
this.
|
|
107
|
-
this.closeModalHandler();
|
|
104
|
+
this.closeInfoBox.emit();
|
|
108
105
|
};
|
|
109
106
|
this.onCloseButtonClick = () => {
|
|
110
107
|
this.closeInfoBox.emit();
|
|
@@ -120,12 +117,12 @@ const MyColorInfo = class {
|
|
|
120
117
|
};
|
|
121
118
|
this.getHref = () => {
|
|
122
119
|
var _a, _b, _c, _d;
|
|
123
|
-
let link;
|
|
124
120
|
if (this.baselink) {
|
|
125
|
-
|
|
121
|
+
return `${this.baselink}/${(_b = (_a = this === null || this === void 0 ? void 0 : this.currentColor.links) === null || _a === void 0 ? void 0 : _a.find((link) => (link === null || link === void 0 ? void 0 : link.shop) === this.shop)) === null || _b === void 0 ? void 0 : _b.path}`;
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
return (_d = (_c = this === null || this === void 0 ? void 0 : this.currentColor.links) === null || _c === void 0 ? void 0 : _c.find((link) => (link === null || link === void 0 ? void 0 : link.shop) === this.shop)) === null || _d === void 0 ? void 0 : _d.path;
|
|
126
125
|
}
|
|
127
|
-
link = (_d = (_c = this === null || this === void 0 ? void 0 : this.currentColor.links) === null || _c === void 0 ? void 0 : _c.find((link) => (link === null || link === void 0 ? void 0 : link.shop) === this.shop)) === null || _d === void 0 ? void 0 : _d.path;
|
|
128
|
-
window.open(link, '_self');
|
|
129
126
|
};
|
|
130
127
|
this.capitalizeFirstLetter = (string) => {
|
|
131
128
|
return string.charAt(0).toUpperCase() + string.slice(1).toLocaleLowerCase();
|
|
@@ -139,9 +136,6 @@ const MyColorInfo = class {
|
|
|
139
136
|
this.infoBoxWidth = undefined;
|
|
140
137
|
this.closeImage = 'close.png';
|
|
141
138
|
}
|
|
142
|
-
closeModalHandler() {
|
|
143
|
-
this.close.emit();
|
|
144
|
-
}
|
|
145
139
|
render() {
|
|
146
140
|
var _a;
|
|
147
141
|
return (h("div", { class: `boxes__box-content ${this.currentColor.textWhite ? 'boxes__box-content__white' : ''}`, style: {
|
|
@@ -149,7 +143,7 @@ const MyColorInfo = class {
|
|
|
149
143
|
maxWidth: `${this.infoBoxWidth && this.infoBoxWidth - 4}px`,
|
|
150
144
|
} }, this.isMobile && h("img", { class: 'closebtn', onClick: this.onCloseButtonClick, src: getAssetPath(`./assets/${this.closeImage}`), alt: "closebtn" }), h("div", { class: "boxes__box-content__info", style: {
|
|
151
145
|
maxWidth: this.isMobile ? `${this.infoBoxWidth && this.infoBoxWidth - 35}px` : ``,
|
|
152
|
-
} }, !this.isMobile && h("img", { class: 'closebtn', onClick: this.onCloseButtonClick, src: getAssetPath(`./assets/${this.closeImage}`), alt: "closebtn" }), !this.isMobile && h("h2", null, this.capitalizeFirstLetter(this.currentColor.name)), !this.isMobile && h("h4", null, this.currentColor.number), h("div", { class: "boxes__box-content__info__value" }, h("div", { class: "boxes__box-content__info__value-product" }, this.isMobile && h("div", { class: 'divider' }), this.currentColor && ((_a = this.currentColor.links) === null || _a === void 0 ? void 0 : _a.find((link) => (link === null || link === void 0 ? void 0 : link.shop) === this.shop)) && (h("
|
|
146
|
+
} }, !this.isMobile && h("img", { class: 'closebtn', onClick: this.onCloseButtonClick, src: getAssetPath(`./assets/${this.closeImage}`), alt: "closebtn" }), !this.isMobile && h("h2", null, this.capitalizeFirstLetter(this.currentColor.name)), !this.isMobile && h("h4", null, this.currentColor.number), h("div", { class: "boxes__box-content__info__value" }, h("div", { class: "boxes__box-content__info__value-product" }, this.isMobile && h("div", { class: 'divider' }), this.currentColor && ((_a = this.currentColor.links) === null || _a === void 0 ? void 0 : _a.find((link) => (link === null || link === void 0 ? void 0 : link.shop) === this.shop)) && (h("a", { onClick: this.goToProduct, href: this.getHref(), class: `button ${this.currentColor.imageInsteadHex ? 'brown' : this.currentColor.buttonInverse ? 'inverse' : ''}` }, "wybierz kolor"))))), h("div", { class: "boxes__box-content__slider" }, this.renderSliderOrImage())));
|
|
153
147
|
}
|
|
154
148
|
};
|
|
155
149
|
|
|
@@ -283,6 +277,9 @@ const MyModalBundle = class {
|
|
|
283
277
|
async open() {
|
|
284
278
|
this.show = true;
|
|
285
279
|
}
|
|
280
|
+
async close() {
|
|
281
|
+
this.show = false;
|
|
282
|
+
}
|
|
286
283
|
setReadyToCloseHandler(value) {
|
|
287
284
|
this.readyToClose = value.detail.observable;
|
|
288
285
|
}
|
|
@@ -2691,7 +2688,7 @@ const MyModal = class {
|
|
|
2691
2688
|
this.close = createEvent(this, "close", 7);
|
|
2692
2689
|
this.readyToCLose = createEvent(this, "readyToCLose", 7);
|
|
2693
2690
|
this.boxDesktopWidth = 130;
|
|
2694
|
-
this.boxMobileWidth =
|
|
2691
|
+
this.boxMobileWidth = 70;
|
|
2695
2692
|
this.desktopPadding = 75;
|
|
2696
2693
|
this.mobilePadding = 35;
|
|
2697
2694
|
this.mediumBreakpoint = 1024;
|
|
@@ -8283,7 +8280,7 @@ const JcSwiper = class {
|
|
|
8283
8280
|
render() {
|
|
8284
8281
|
return (h("div", { class: "slider-wrapper" }, h("div", { class: "swiper mySwiper2" }, h("div", { class: "swiper-wrapper" }, this.slides &&
|
|
8285
8282
|
this.slides.length > 0 &&
|
|
8286
|
-
this.slides.map((slide) => (h("div", { key: slide.id, class: "swiper-slide" }, h("img", { src: `${APIURL}/assets/${slide.directus_files_id}?access_token=${accessToken}`, alt: "room_image" }))))), h("div", { onClick: this.colorInteraction, class: "swiper-button-next" }), h("div", { onClick: this.colorInteraction, class: "swiper-button-prev" })), h("div", { class: "swiper mySwiper" }, h("div", { class: "swiper-wrapper" }, this.slides &&
|
|
8283
|
+
this.slides.map((slide) => (h("div", { key: slide.id, class: "swiper-slide" }, h("img", { src: `${APIURL}/assets/${slide.directus_files_id}?access_token=${accessToken}`, alt: "room_image" }))))), this.slides && this.slides.length >= 2 && (h("div", null, h("div", { onClick: this.colorInteraction, class: "swiper-button-next" }), h("div", { onClick: this.colorInteraction, class: "swiper-button-prev" })))), h("div", { class: "swiper mySwiper" }, h("div", { class: "swiper-wrapper" }, this.slides &&
|
|
8287
8284
|
this.slides.length > 0 &&
|
|
8288
8285
|
this.slides.map((slide) => (h("div", { key: slide.id, class: "swiper-slide" }, h("img", { src: `${APIURL}/assets/${slide.directus_files_id}?access_token=${accessToken}`, alt: "room_image" }))))))));
|
|
8289
8286
|
}
|