@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
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],"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"],"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,21 @@ 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;
|
|
85
|
+
console.log(this.color);
|
|
57
86
|
return (index$1.h("div", { onMouseEnter: () => this.colorCheck(), onMouseLeave: () => this.colorUnCheck(), class: `my-color-box ${this.isActive ? 'active' : ''} ${this.isCategoryActive ? 'categoryactive' : ''}`, style: {
|
|
58
|
-
|
|
87
|
+
backgroundSize: ((_a = this.isImageInsteadHex) === null || _a === void 0 ? void 0 : _a.isImageInsteadHex) ? 'cover' : '',
|
|
88
|
+
backgroundImage: ((_b = this.isImageInsteadHex) === null || _b === void 0 ? void 0 : _b.isImageInsteadHex) ? `url(${APIURL}/assets/${this.isImageInsteadHex.bigImage}?access_token=${accessToken})` : '',
|
|
89
|
+
background: ((_c = this.isImageInsteadHex) === null || _c === void 0 ? void 0 : _c.isImageInsteadHex) ? this.isImageInsteadHex.bigImage : this.color,
|
|
59
90
|
border: this.isCategoryActive ? `5px solid ${this.darkenColor(this.color)}` : '',
|
|
60
91
|
} }, index$1.h("div", { class: "color-name" }, this.name)));
|
|
61
92
|
}
|
|
62
93
|
};
|
|
63
94
|
MyColorBox.style = myColorboxCss;
|
|
64
95
|
|
|
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
96
|
const MyColorInfo = class {
|
|
92
97
|
constructor(hostRef) {
|
|
93
98
|
index$1.registerInstance(this, hostRef);
|
|
@@ -2898,7 +2903,10 @@ const MyModal = class {
|
|
|
2898
2903
|
}
|
|
2899
2904
|
render() {
|
|
2900
2905
|
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
|
|
2906
|
+
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: {
|
|
2907
|
+
isImageInsteadHex: (c === null || c === void 0 ? void 0 : c.imageInsteadHex) || false,
|
|
2908
|
+
bigImage: (c === null || c === void 0 ? void 0 : c.bigImage) || '',
|
|
2909
|
+
} })))), 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
2910
|
var _a;
|
|
2903
2911
|
return (index$1.h("div", { key: index, class: "boxes" }, index$1.h("div", { class: "boxes__list" }, color.map((c) => {
|
|
2904
2912
|
var _a;
|
|
@@ -2915,7 +2923,10 @@ const MyModal = class {
|
|
|
2915
2923
|
}),
|
|
2916
2924
|
((_c = this.currentColor) === null || _c === void 0 ? void 0 : _c.id) && this.clearInterval(),
|
|
2917
2925
|
];
|
|
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
|
|
2926
|
+
}, 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: {
|
|
2927
|
+
isImageInsteadHex: c.imageInsteadHex,
|
|
2928
|
+
bigImage: c.bigImage,
|
|
2929
|
+
} }));
|
|
2919
2930
|
})), ((_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 }))));
|
|
2920
2931
|
})) : (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
2932
|
e.preventDefault();
|