@ppg_pl/pallete 2.0.4 → 2.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/loader.cjs.js +1 -1
- package/dist/cjs/my-backdrop_8.cjs.entry.js +58 -34
- 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 +26 -1
- package/dist/collection/components/my-colorbox/my-colorbox.js.map +1 -1
- package/dist/collection/components/my-colorinfo/my-colorinfo.js +30 -2
- package/dist/collection/components/my-colorinfo/my-colorinfo.js.map +1 -1
- package/dist/collection/components/my-component/my-component.js +20 -1
- package/dist/collection/components/my-component/my-component.js.map +1 -1
- package/dist/collection/components/my-modal/my-modal.css +6 -7
- package/dist/collection/components/my-modal/my-modal.js +27 -3
- 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 +8 -3
- package/dist/components/my-colorbox2.js.map +1 -1
- package/dist/components/my-colorinfo2.js +16 -4
- package/dist/components/my-colorinfo2.js.map +1 -1
- package/dist/components/my-component.js +5 -2
- package/dist/components/my-component.js.map +1 -1
- package/dist/components/my-modal2.js +14 -6
- 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 +58 -34
- package/dist/esm/my-backdrop_8.entry.js.map +1 -1
- package/dist/esm/pallete.js +1 -1
- package/dist/pallete/p-8931967a.entry.js +2 -0
- package/dist/pallete/p-8931967a.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/my-colorinfo/my-colorinfo.d.ts +3 -0
- package/dist/types/components/my-component/my-component.d.ts +1 -0
- package/dist/types/components/my-modal/my-modal.d.ts +1 -0
- package/dist/types/components.d.ts +10 -2
- package/dist/types/types.d.ts +6 -0
- package/package.json +1 -1
- package/www/build/p-8931967a.entry.js +2 -0
- package/www/build/p-8931967a.entry.js.map +1 -0
- package/www/build/pallete.esm.js +1 -1
- package/www/build/pallete.esm.js.map +1 -1
- package/www/index.html +4 -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
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["my-backdrop_8.cjs",[[2,"my-component",{"shop":[1],"product":[1],"show":[32],"readyToClose":[32],"open":[64]},[[0,"readyToCLose","setReadyToCloseHandler"],[0,"close","closeModalHandler"]]],[0,"my-modal",{"shop":[1],"product":[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],"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"]}],[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);
|
|
17
|
+
return index.bootstrapLazy([["my-backdrop_8.cjs",[[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);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -20,6 +20,32 @@ const setDataLayer = (obj) => {
|
|
|
20
20
|
return window.dataLayer.push(obj);
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
+
// DEV/
|
|
24
|
+
// export const APIURL = 'http://57.128.200.45:8055';
|
|
25
|
+
// export const accessToken = '_baZ127gfvFIFmZ5umrrTBUUm6D7ve6p';
|
|
26
|
+
// PROD
|
|
27
|
+
const APIURL = 'http://147.135.211.144:8055'; //'https://pallete-colors-backend.herokuapp.com';
|
|
28
|
+
const accessToken = 'uBKzhiNM4rkdZSe_PQvKJp9pE-DSTmtu';
|
|
29
|
+
class API {
|
|
30
|
+
async getData(ep) {
|
|
31
|
+
try {
|
|
32
|
+
const request = await fetch(`${APIURL}/${ep}`, {
|
|
33
|
+
method: 'GET',
|
|
34
|
+
headers: {
|
|
35
|
+
'Authorization': `Bearer ${accessToken}`,
|
|
36
|
+
'Content-Type': 'application/json',
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
const response = await request.json();
|
|
40
|
+
return response;
|
|
41
|
+
}
|
|
42
|
+
catch (error) {
|
|
43
|
+
console.error(error);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
const ApiService = new API();
|
|
48
|
+
|
|
23
49
|
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}";
|
|
24
50
|
|
|
25
51
|
const MyColorBox = class {
|
|
@@ -52,42 +78,20 @@ const MyColorBox = class {
|
|
|
52
78
|
this.product = undefined;
|
|
53
79
|
this.isActive = undefined;
|
|
54
80
|
this.isCategoryActive = undefined;
|
|
81
|
+
this.isImageInsteadHex = undefined;
|
|
55
82
|
}
|
|
56
83
|
render() {
|
|
84
|
+
var _a, _b, _c;
|
|
57
85
|
return (index$1.h("div", { onMouseEnter: () => this.colorCheck(), onMouseLeave: () => this.colorUnCheck(), class: `my-color-box ${this.isActive ? 'active' : ''} ${this.isCategoryActive ? 'categoryactive' : ''}`, style: {
|
|
58
|
-
|
|
86
|
+
backgroundSize: ((_a = this.isImageInsteadHex) === null || _a === void 0 ? void 0 : _a.isImageInsteadHex) ? 'cover' : '',
|
|
87
|
+
backgroundImage: ((_b = this.isImageInsteadHex) === null || _b === void 0 ? void 0 : _b.isImageInsteadHex) ? `url(${APIURL}/assets/${this.isImageInsteadHex.bigImage}?access_token=${accessToken})` : '',
|
|
88
|
+
background: ((_c = this.isImageInsteadHex) === null || _c === void 0 ? void 0 : _c.isImageInsteadHex) ? this.isImageInsteadHex.bigImage : this.color,
|
|
59
89
|
border: this.isCategoryActive ? `5px solid ${this.darkenColor(this.color)}` : '',
|
|
60
90
|
} }, index$1.h("div", { class: "color-name" }, this.name)));
|
|
61
91
|
}
|
|
62
92
|
};
|
|
63
93
|
MyColorBox.style = myColorboxCss;
|
|
64
94
|
|
|
65
|
-
// DEV/
|
|
66
|
-
// export const APIURL = 'http://57.128.200.45:8055';
|
|
67
|
-
// export const accessToken = '_baZ127gfvFIFmZ5umrrTBUUm6D7ve6p';
|
|
68
|
-
// PROD
|
|
69
|
-
const APIURL = 'http://147.135.211.144:8055'; //'https://pallete-colors-backend.herokuapp.com';
|
|
70
|
-
const accessToken = 'uBKzhiNM4rkdZSe_PQvKJp9pE-DSTmtu';
|
|
71
|
-
class API {
|
|
72
|
-
async getData(ep) {
|
|
73
|
-
try {
|
|
74
|
-
const request = await fetch(`${APIURL}/${ep}`, {
|
|
75
|
-
method: 'GET',
|
|
76
|
-
headers: {
|
|
77
|
-
'Authorization': `Bearer ${accessToken}`,
|
|
78
|
-
'Content-Type': 'application/json',
|
|
79
|
-
},
|
|
80
|
-
});
|
|
81
|
-
const response = await request.json();
|
|
82
|
-
return response;
|
|
83
|
-
}
|
|
84
|
-
catch (error) {
|
|
85
|
-
console.error(error);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
const ApiService = new API();
|
|
90
|
-
|
|
91
95
|
const MyColorInfo = class {
|
|
92
96
|
constructor(hostRef) {
|
|
93
97
|
index$1.registerInstance(this, hostRef);
|
|
@@ -114,22 +118,33 @@ const MyColorInfo = class {
|
|
|
114
118
|
return index$1.h("my-slider", { color: this.currentColor.name, shop: this.shop, product: this.product, slides: (_a = this.data) === null || _a === void 0 ? void 0 : _a.images });
|
|
115
119
|
}
|
|
116
120
|
};
|
|
121
|
+
this.getHref = () => {
|
|
122
|
+
var _a, _b, _c, _d;
|
|
123
|
+
if (this.baselink) {
|
|
124
|
+
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}`;
|
|
125
|
+
}
|
|
126
|
+
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;
|
|
127
|
+
};
|
|
128
|
+
this.capitalizeFirstLetter = (string) => {
|
|
129
|
+
return string.charAt(0).toUpperCase() + string.slice(1).toLocaleLowerCase();
|
|
130
|
+
};
|
|
117
131
|
this.currentColor = undefined;
|
|
118
132
|
this.shop = undefined;
|
|
119
133
|
this.product = undefined;
|
|
134
|
+
this.baselink = undefined;
|
|
120
135
|
this.data = null;
|
|
121
136
|
this.isMobile = false;
|
|
122
137
|
this.infoBoxWidth = undefined;
|
|
123
138
|
this.closeImage = 'close.png';
|
|
124
139
|
}
|
|
125
140
|
render() {
|
|
126
|
-
var _a
|
|
141
|
+
var _a;
|
|
127
142
|
return (index$1.h("div", { class: `boxes__box-content ${this.currentColor.textWhite ? 'boxes__box-content__white' : ''}`, style: {
|
|
128
143
|
background: this.currentColor.imageInsteadHex ? 'white' : this.currentColor.hex,
|
|
129
144
|
maxWidth: `${this.infoBoxWidth && this.infoBoxWidth - 4}px`,
|
|
130
145
|
} }, this.isMobile && index$1.h("img", { class: 'closebtn', onClick: this.onCloseButtonClick, src: index$1.getAssetPath(`./assets/${this.closeImage}`), alt: "closebtn" }), index$1.h("div", { class: "boxes__box-content__info", style: {
|
|
131
146
|
maxWidth: this.isMobile ? `${this.infoBoxWidth && this.infoBoxWidth - 35}px` : ``,
|
|
132
|
-
} }, !this.isMobile && index$1.h("img", { class: 'closebtn', onClick: this.onCloseButtonClick, src: index$1.getAssetPath(`./assets/${this.closeImage}`), alt: "closebtn" }), !this.isMobile && index$1.h("h2", null, this.currentColor.name), !this.isMobile && index$1.h("h4", null, this.currentColor.number),
|
|
147
|
+
} }, !this.isMobile && index$1.h("img", { class: 'closebtn', onClick: this.onCloseButtonClick, src: index$1.getAssetPath(`./assets/${this.closeImage}`), alt: "closebtn" }), !this.isMobile && index$1.h("h2", null, this.capitalizeFirstLetter(this.currentColor.name)), !this.isMobile && index$1.h("h4", null, this.currentColor.number), index$1.h("div", { class: "boxes__box-content__info__value" }, index$1.h("div", { class: "boxes__box-content__info__value-product" }, this.isMobile && index$1.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)) && (index$1.h("a", { onClick: this.goToProduct, class: `${this.currentColor.imageInsteadHex ? 'brown' : this.currentColor.buttonInverse ? 'inverse' : ''}`, href: this.getHref() }, "wybierz kolor"))))), index$1.h("div", { class: "boxes__box-content__slider" }, this.renderSliderOrImage())));
|
|
133
148
|
}
|
|
134
149
|
};
|
|
135
150
|
|
|
@@ -256,6 +271,7 @@ const MyModalBundle = class {
|
|
|
256
271
|
index$1.registerInstance(this, hostRef);
|
|
257
272
|
this.shop = undefined;
|
|
258
273
|
this.product = undefined;
|
|
274
|
+
this.baselink = undefined;
|
|
259
275
|
this.show = false;
|
|
260
276
|
this.readyToClose = false;
|
|
261
277
|
}
|
|
@@ -272,7 +288,8 @@ const MyModalBundle = class {
|
|
|
272
288
|
render() {
|
|
273
289
|
let content = null;
|
|
274
290
|
if (this.show) {
|
|
275
|
-
|
|
291
|
+
console.log(this.baselink, this.shop, this.product);
|
|
292
|
+
content = [index$1.h("my-backdrop", null), index$1.h("my-modal", { shop: this.shop, product: this.product, baselink: this.baselink })];
|
|
276
293
|
}
|
|
277
294
|
return (index$1.h("div", { onClick: () => {
|
|
278
295
|
if (this.readyToClose) {
|
|
@@ -2661,7 +2678,7 @@ const fetchColorByNumber = (id, colorNumber) => lib.stringify({
|
|
|
2661
2678
|
encodeValuesOnly: true,
|
|
2662
2679
|
});
|
|
2663
2680
|
|
|
2664
|
-
const myModalCss = ".pallete-wrapper *{font-family:\"Galatea\", sans-serif}.my-modal{box-shadow:1px 1px 1px #ccc;background-color:#fff;position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);max-width:1555px;width:90%;z-index:1000;text-align:center;padding:35px 40px;max-height:calc(100vh - 100px);overflow-y:auto}@media (max-width: 1024px){.my-modal{padding:80px 20px 20px}}.my-modal::-webkit-scrollbar{display:none}.my-modal .loader{display:flex;flex-direction:column;align-items:center;justify-content:center;height:300px}.my-modal>img{width:300px;object-fit:cover}@media (max-width: 768px){.my-modal>img{width:200px}}.my-modal__close{position:absolute;right:20px;top:20px;background:transparent;border:none}.my-modal__close>img{width:45px;height:45px;object-fit:cover;cursor:pointer}@media (max-width: 1024px){.my-modal__close{top:65px}}.my-modal__see-more{font-size:22px;margin-bottom:27px;display:flex;justify-content:center;align-items:center}@media (max-width: 1024px){.my-modal__see-more{font-size:18px}}.my-modal__see-more img{width:45px;height:45px}@media (max-width: 1024px){.my-modal__see-more img{display:none}}.my-modal__wrapper{display:flex;flex-direction:column;position:relative}.my-modal__wrapper .boxes{display:flex;flex-direction:column;flex-wrap:wrap}.my-modal__wrapper .boxes__list{display:flex;flex-wrap:wrap;gap:5px 5px}@media (max-width: 1024px){.my-modal__wrapper .boxes__list{justify-content:center}}.my-modal__wrapper .boxes__box-content{width:100%;margin-bottom:5px;height:500px;text-align:left;display:flex;flex-direction:row;justify-content:space-between;position:relative}.my-modal__wrapper .boxes__box-content .closebtn{position:absolute;right:10px;top:10px;width:53px;height:53px;cursor:pointer;object-fit:cover;z-index:9999}@media (max-width: 1024px){.my-modal__wrapper .boxes__box-content{flex-direction:column-reverse;height:auto}}@media (max-width: 768px){.my-modal__wrapper .boxes__box-content{margin:0 auto}}.my-modal__wrapper .boxes__box-content__info{width:40%;padding:50px 40px;position:relative}@media (max-width: 1024px){.my-modal__wrapper .boxes__box-content__info{width:100%;padding:15px;min-height:100px}}@media (max-width: 768px){.my-modal__wrapper .boxes__box-content__info{min-height:auto}}.my-modal__wrapper .boxes__box-content__info h2{font-size:35px;font-weight:normal;
|
|
2681
|
+
const myModalCss = ".pallete-wrapper *{font-family:\"Galatea\", sans-serif}.my-modal{box-shadow:1px 1px 1px #ccc;background-color:#fff;position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);max-width:1555px;width:90%;z-index:1000;text-align:center;padding:35px 40px;max-height:calc(100vh - 100px);overflow-y:auto}@media (max-width: 1024px){.my-modal{padding:80px 20px 20px}}.my-modal::-webkit-scrollbar{display:none}.my-modal .loader{display:flex;flex-direction:column;align-items:center;justify-content:center;height:300px}.my-modal>img{max-width:300px;object-fit:cover}@media (max-width: 768px){.my-modal>img{max-width:200px}}.my-modal__close{position:absolute;right:20px;top:20px;background:transparent;border:none}.my-modal__close>img{width:45px;height:45px;object-fit:cover;cursor:pointer}@media (max-width: 1024px){.my-modal__close{top:65px}}.my-modal__see-more{font-size:22px;margin-bottom:27px;display:flex;justify-content:center;align-items:center}@media (max-width: 1024px){.my-modal__see-more{font-size:18px}}.my-modal__see-more img{width:45px;height:45px}@media (max-width: 1024px){.my-modal__see-more img{display:none}}.my-modal__wrapper{display:flex;flex-direction:column;position:relative}.my-modal__wrapper .boxes{display:flex;flex-direction:column;flex-wrap:wrap}.my-modal__wrapper .boxes__list{display:flex;flex-wrap:wrap;gap:5px 5px}@media (max-width: 1024px){.my-modal__wrapper .boxes__list{justify-content:center}}.my-modal__wrapper .boxes__box-content{width:100%;margin-bottom:5px;height:500px;text-align:left;display:flex;flex-direction:row;justify-content:space-between;position:relative}.my-modal__wrapper .boxes__box-content .closebtn{position:absolute;right:10px;top:10px;width:53px;height:53px;cursor:pointer;object-fit:cover;z-index:9999}@media (max-width: 1024px){.my-modal__wrapper .boxes__box-content{flex-direction:column-reverse;height:auto}}@media (max-width: 768px){.my-modal__wrapper .boxes__box-content{margin:0 auto}}.my-modal__wrapper .boxes__box-content__info{width:40%;padding:50px 40px;position:relative}@media (max-width: 1024px){.my-modal__wrapper .boxes__box-content__info{width:100%;padding:15px;min-height:100px}}@media (max-width: 768px){.my-modal__wrapper .boxes__box-content__info{min-height:auto}}.my-modal__wrapper .boxes__box-content__info h2{font-size:35px;font-weight:normal;margin-bottom:30px;color:#232323}.my-modal__wrapper .boxes__box-content__info h4{margin-top:0px;margin-bottom:15px;font-size:16px;color:#4c4c4c}.my-modal__wrapper .boxes__box-content__info .divider{border:1px solid #4c4c4c;opacity:0.2;margin-bottom:20px}@media (max-width: 768px){.my-modal__wrapper .boxes__box-content__info .divider{margin:10px 0px}}.my-modal__wrapper .boxes__box-content__info__value{display:flex;flex-direction:row;justify-content:flex-start}@media (max-width: 1024px){.my-modal__wrapper .boxes__box-content__info__value{justify-content:flex-start}}@media (max-width: 768px){.my-modal__wrapper .boxes__box-content__info__value{flex-direction:column}}@media (max-width: 768px){.my-modal__wrapper .boxes__box-content__info__value-image{margin:0 auto;margin-bottom:10px}}.my-modal__wrapper .boxes__box-content__info__value-image img{width:114px;object-fit:cover}@media (max-width: 1024px){.my-modal__wrapper .boxes__box-content__info__value-image img{width:75px}}.my-modal__wrapper .boxes__box-content__info__value-product{color:#232323;margin-left:10px}@media (max-width: 1024px){.my-modal__wrapper .boxes__box-content__info__value-product h2{font-size:26px;margin:0;margin-right:10px}}@media (max-width: 768px){.my-modal__wrapper .boxes__box-content__info__value-product h2{font-size:16px}}.my-modal__wrapper .boxes__box-content__info__value-product p{font-size:20px;margin-top:0px;margin-bottom:0px}.my-modal__wrapper .boxes__box-content__info__value-product p:last-of-type{margin-bottom:20px}@media (max-width: 1024px){.my-modal__wrapper .boxes__box-content__info__value-product p:last-of-type{margin-bottom:0}}@media (max-width: 768px){.my-modal__wrapper .boxes__box-content__info__value-product p{font-size:10px}}@media (max-width: 1024px){.my-modal__wrapper .boxes__box-content__info__value-product>div{display:flex;justify-content:flex-start;align-items:center}}@media (max-width: 768px){.my-modal__wrapper .boxes__box-content__info__value-product>div{flex-direction:column}}.my-modal__wrapper .boxes__box-content__slider{width:60%;min-width:60%;max-width:60%;position:relative}@media (max-width: 1024px){.my-modal__wrapper .boxes__box-content__slider{width:100%;display:block}}.my-modal__wrapper .boxes__box-content__slider .color-big-image{width:100%;height:100%;object-fit:cover}@media (max-width: 1024px){.my-modal__wrapper .boxes__box-content__slider .color-big-image{height:300px}}.my-modal__wrapper .boxes__box-content__white *{color:#fff}.my-modal__wrapper .boxes__box-content__white h2{color:#fff}.my-modal__wrapper .pagination{margin:10px 0px;font-size:16px;display:flex;flex-direction:row;align-items:center;justify-content:center}.my-modal__wrapper .pagination>span{margin:0 3px;cursor:pointer;min-width:20px;padding:5px;box-shadow:1px 1px 1px #ccc}.my-modal__wrapper .pagination .current{background-color:wheat}.my-modal .categories{padding-bottom:20px;margin-bottom:20px;border-bottom:1px solid #dfdfdf;display:flex;flex-direction:column;align-items:flex-start}.my-modal .categories__container{display:flex;flex-wrap:nowrap;gap:5px 5px;overflow-x:auto;width:100%}@media (max-width: 1024px){.my-modal .categories__container{padding-bottom:5px}}.my-modal .categories__slide-information{display:flex;flex-direction:row;align-items:center;justify-content:space-between}.my-modal .categories__slide-information span{color:#4c4c4c;font-size:16px;font-weight:normal}.my-modal .categories__slide-information span:first-of-type{margin-left:7px}.my-modal .categories__slide-information span:last-of-type{margin-right:7px}.my-modal .button,.my-modal a{background-color:#fff;font-size:16px;box-shadow:0px 10px 20px rgba(0, 0, 0, 0.1);border-radius:22px;padding:10px 35px;color:#232323;text-decoration:none;display:block;text-align:center;transition:all 0.7s ease-in-out;border:none;cursor:pointer}.my-modal .button:hover,.my-modal a:hover{color:#fff;background-color:#232323}.my-modal .button.brown,.my-modal a.brown{background-color:#3c2114;color:#fff}.my-modal .button.brown:hover,.my-modal a.brown:hover{color:#fff;background-color:#232323}.my-modal .button.inverse,.my-modal a.inverse{background-color:#232323;color:#fff}.my-modal .button.inverse:hover,.my-modal a.inverse:hover{color:#232323;background-color:#fff}@media (max-width: 1024px){.my-modal .button,.my-modal a{max-width:150px;font-size:13px;padding:12px 25px}}@media (max-width: 768px){.my-modal .button,.my-modal a{margin:0 auto}}.my-modal>.button{margin:10px auto}";
|
|
2665
2682
|
|
|
2666
2683
|
const MyModal = class {
|
|
2667
2684
|
constructor(hostRef) {
|
|
@@ -2811,6 +2828,7 @@ const MyModal = class {
|
|
|
2811
2828
|
};
|
|
2812
2829
|
this.shop = undefined;
|
|
2813
2830
|
this.product = undefined;
|
|
2831
|
+
this.baselink = undefined;
|
|
2814
2832
|
this.closeImage = 'close.png';
|
|
2815
2833
|
this.arrowDown = 'arrow_down.png';
|
|
2816
2834
|
this.chunksNum = 12;
|
|
@@ -2898,7 +2916,10 @@ const MyModal = class {
|
|
|
2898
2916
|
}
|
|
2899
2917
|
render() {
|
|
2900
2918
|
var _a, _b, _c, _d;
|
|
2901
|
-
return (index$1.h("div", { class: `my-modal`, onMouseEnter: () => this.handleReadyToClose(false), onMouseLeave: () => this.handleReadyToClose(true) }, this.preloader && (index$1.h("div", { class: 'loader' }, index$1.h("my-loader", null))), !this.preloader && (index$1.h("button", { class: "my-modal__close", onClick: () => this.closeModalHandler() }, index$1.h("img", { src: index$1.getAssetPath(`./assets/${this.closeImage}`), alt: "closebtn" }))), !this.preloader && this.data && this.data.modalLogo && index$1.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 && (index$1.h("p", { class: "my-modal__see-more" }, (_b = this.data) === null || _b === void 0 ? void 0 : _b.modalDescription)), this.showRange && (index$1.h("div", { class: 'categories' }, this.data && index$1.h("my-search", { productId: Number((_c = this.data) === null || _c === void 0 ? void 0 : _c.id), isMobile: this.isMobile }), index$1.h("div", { class: 'categories__container', style: { maxWidth: `${this.infoBoxWidth}px` } }, (_d = this.data) === null || _d === void 0 ? void 0 : _d.Category.map((c) => (index$1.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
|
|
2919
|
+
return (index$1.h("div", { class: `my-modal`, onMouseEnter: () => this.handleReadyToClose(false), onMouseLeave: () => this.handleReadyToClose(true) }, this.preloader && (index$1.h("div", { class: 'loader' }, index$1.h("my-loader", null))), !this.preloader && (index$1.h("button", { class: "my-modal__close", onClick: () => this.closeModalHandler() }, index$1.h("img", { src: index$1.getAssetPath(`./assets/${this.closeImage}`), alt: "closebtn" }))), !this.preloader && this.data && this.data.modalLogo && index$1.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 && (index$1.h("p", { class: "my-modal__see-more" }, (_b = this.data) === null || _b === void 0 ? void 0 : _b.modalDescription)), this.showRange && (index$1.h("div", { class: 'categories' }, this.data && index$1.h("my-search", { productId: Number((_c = this.data) === null || _c === void 0 ? void 0 : _c.id), isMobile: this.isMobile }), index$1.h("div", { class: 'categories__container', style: { maxWidth: `${this.infoBoxWidth}px` } }, (_d = this.data) === null || _d === void 0 ? void 0 : _d.Category.map((c) => (index$1.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: {
|
|
2920
|
+
isImageInsteadHex: (c === null || c === void 0 ? void 0 : c.imageInsteadHex) || false,
|
|
2921
|
+
bigImage: (c === null || c === void 0 ? void 0 : c.bigImage) || '',
|
|
2922
|
+
} })))), this.isMobile && (index$1.h("div", { class: 'categories__slide-information', style: { width: `${this.infoBoxWidth}px` } }, index$1.h("span", null, "Przewi\u0144 w lewo"), index$1.h("span", null, "Przewi\u0144 w prawo"))))), index$1.h("div", { class: 'my-modal__wrapper' }, this.loading && index$1.h("my-loader", null), !this.loading && this.colors && (index$1.h("div", { class: 'container_boxes' }, this.colors.list.length > 0 ? (this.chunks(this.colors.list).map((color, index) => {
|
|
2902
2923
|
var _a;
|
|
2903
2924
|
return (index$1.h("div", { key: index, class: "boxes" }, index$1.h("div", { class: "boxes__list" }, color.map((c) => {
|
|
2904
2925
|
var _a;
|
|
@@ -2915,8 +2936,11 @@ const MyModal = class {
|
|
|
2915
2936
|
}),
|
|
2916
2937
|
((_c = this.currentColor) === null || _c === void 0 ? void 0 : _c.id) && this.clearInterval(),
|
|
2917
2938
|
];
|
|
2918
|
-
}, 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
|
|
2919
|
-
|
|
2939
|
+
}, 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: {
|
|
2940
|
+
isImageInsteadHex: c.imageInsteadHex,
|
|
2941
|
+
bigImage: c.bigImage,
|
|
2942
|
+
} }));
|
|
2943
|
+
})), ((_a = this.currentColor) === null || _a === void 0 ? void 0 : _a.id) && index === this.currentIndex && (index$1.h("my-colorinfo", { currentColor: this.currentColor, shop: this.shop, product: this.product, data: this.data, isMobile: this.isMobile, infoBoxWidth: this.infoBoxWidth, baselink: this.baselink }))));
|
|
2920
2944
|
})) : (index$1.h("p", null, "Brak wynik\u00F3w")), this.colors.pagination.filter_count > limit && (index$1.h("div", { class: 'pagination' }, Array.from({ length: Math.ceil(this.colors.pagination.filter_count / limit) }).map((_, i) => (index$1.h("span", { class: i + 1 === this.page ? 'current' : '', onClick: e => {
|
|
2921
2945
|
e.preventDefault();
|
|
2922
2946
|
this.onPage(i + 1);
|