@ppg_pl/pallete 2.0.10 → 2.0.11
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/my-backdrop_8.cjs.entry.js +7 -4
- package/dist/cjs/my-backdrop_8.cjs.entry.js.map +1 -1
- package/dist/collection/components/my-colorinfo/my-colorinfo.js +7 -4
- package/dist/collection/components/my-colorinfo/my-colorinfo.js.map +1 -1
- package/dist/components/my-colorinfo2.js +7 -4
- package/dist/components/my-colorinfo2.js.map +1 -1
- package/dist/esm/my-backdrop_8.entry.js +7 -4
- package/dist/esm/my-backdrop_8.entry.js.map +1 -1
- package/dist/pallete/p-31c2e093.entry.js +2 -0
- package/dist/pallete/p-31c2e093.entry.js.map +1 -0
- package/dist/pallete/pallete.esm.js +1 -1
- package/dist/types/components/my-colorinfo/my-colorinfo.d.ts +1 -1
- package/package.json +1 -1
- package/www/build/p-31c2e093.entry.js +2 -0
- package/www/build/p-31c2e093.entry.js.map +1 -0
- package/www/build/pallete.esm.js +1 -1
- package/dist/pallete/p-a7ce8105.entry.js +0 -2
- package/dist/pallete/p-a7ce8105.entry.js.map +0 -1
- package/www/build/p-a7ce8105.entry.js +0 -2
- package/www/build/p-a7ce8105.entry.js.map +0 -1
|
@@ -100,7 +100,6 @@ const MyColorInfo = class {
|
|
|
100
100
|
this.goToProduct = (e) => {
|
|
101
101
|
var _a;
|
|
102
102
|
e.preventDefault();
|
|
103
|
-
this.closeModalHandler();
|
|
104
103
|
this.currentColor &&
|
|
105
104
|
setDataLayer({
|
|
106
105
|
event: 'GoToProduct',
|
|
@@ -108,6 +107,8 @@ const MyColorInfo = class {
|
|
|
108
107
|
product: this.product,
|
|
109
108
|
color: (_a = this.currentColor) === null || _a === void 0 ? void 0 : _a.name,
|
|
110
109
|
});
|
|
110
|
+
this.getHref();
|
|
111
|
+
this.closeModalHandler();
|
|
111
112
|
};
|
|
112
113
|
this.onCloseButtonClick = () => {
|
|
113
114
|
this.closeInfoBox.emit();
|
|
@@ -123,10 +124,12 @@ const MyColorInfo = class {
|
|
|
123
124
|
};
|
|
124
125
|
this.getHref = () => {
|
|
125
126
|
var _a, _b, _c, _d;
|
|
127
|
+
let link;
|
|
126
128
|
if (this.baselink) {
|
|
127
|
-
|
|
129
|
+
link = `${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}`;
|
|
128
130
|
}
|
|
129
|
-
|
|
131
|
+
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;
|
|
132
|
+
window.open(link, '_self');
|
|
130
133
|
};
|
|
131
134
|
this.capitalizeFirstLetter = (string) => {
|
|
132
135
|
return string.charAt(0).toUpperCase() + string.slice(1).toLocaleLowerCase();
|
|
@@ -150,7 +153,7 @@ const MyColorInfo = class {
|
|
|
150
153
|
maxWidth: `${this.infoBoxWidth && this.infoBoxWidth - 4}px`,
|
|
151
154
|
} }, 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: {
|
|
152
155
|
maxWidth: this.isMobile ? `${this.infoBoxWidth && this.infoBoxWidth - 35}px` : ``,
|
|
153
|
-
} }, !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("
|
|
156
|
+
} }, !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("button", { onClick: this.goToProduct, class: `button ${this.currentColor.imageInsteadHex ? 'brown' : this.currentColor.buttonInverse ? 'inverse' : ''}` }, "wybierz kolor"))))), index$1.h("div", { class: "boxes__box-content__slider" }, this.renderSliderOrImage())));
|
|
154
157
|
}
|
|
155
158
|
};
|
|
156
159
|
|