@ppg_pl/pallete 2.0.10 → 2.0.12

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.
Files changed (32) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/my-backdrop_8.cjs.entry.js +9 -9
  3. package/dist/cjs/my-backdrop_8.cjs.entry.js.map +1 -1
  4. package/dist/cjs/pallete.cjs.js +1 -1
  5. package/dist/collection/components/my-colorinfo/my-colorinfo.js +6 -23
  6. package/dist/collection/components/my-colorinfo/my-colorinfo.js.map +1 -1
  7. package/dist/collection/components/my-component/my-component.js +19 -0
  8. package/dist/collection/components/my-component/my-component.js.map +1 -1
  9. package/dist/components/my-colorinfo2.js +6 -9
  10. package/dist/components/my-colorinfo2.js.map +1 -1
  11. package/dist/components/my-component.js +5 -1
  12. package/dist/components/my-component.js.map +1 -1
  13. package/dist/esm/loader.js +1 -1
  14. package/dist/esm/my-backdrop_8.entry.js +9 -9
  15. package/dist/esm/my-backdrop_8.entry.js.map +1 -1
  16. package/dist/esm/pallete.js +1 -1
  17. package/dist/pallete/p-d7466235.entry.js +2 -0
  18. package/dist/pallete/p-d7466235.entry.js.map +1 -0
  19. package/dist/pallete/pallete.esm.js +1 -1
  20. package/dist/pallete/pallete.esm.js.map +1 -1
  21. package/dist/types/components/my-colorinfo/my-colorinfo.d.ts +1 -3
  22. package/dist/types/components/my-component/my-component.d.ts +1 -0
  23. package/dist/types/components.d.ts +1 -1
  24. package/package.json +1 -1
  25. package/www/build/p-d7466235.entry.js +2 -0
  26. package/www/build/p-d7466235.entry.js.map +1 -0
  27. package/www/build/pallete.esm.js +1 -1
  28. package/www/build/pallete.esm.js.map +1 -1
  29. package/dist/pallete/p-a7ce8105.entry.js +0 -2
  30. package/dist/pallete/p-a7ce8105.entry.js.map +0 -1
  31. package/www/build/p-a7ce8105.entry.js +0 -2
  32. package/www/build/p-a7ce8105.entry.js.map +0 -1
@@ -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],"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);
17
+ return index.bootstrapLazy([["my-backdrop_8.cjs",[[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);
18
18
  });
19
19
  };
20
20
 
@@ -96,11 +96,8 @@ const MyColorInfo = class {
96
96
  constructor(hostRef) {
97
97
  index$1.registerInstance(this, hostRef);
98
98
  this.closeInfoBox = index$1.createEvent(this, "closeInfoBox", 7);
99
- this.close = index$1.createEvent(this, "close", 7);
100
- this.goToProduct = (e) => {
99
+ this.goToProduct = () => {
101
100
  var _a;
102
- e.preventDefault();
103
- this.closeModalHandler();
104
101
  this.currentColor &&
105
102
  setDataLayer({
106
103
  event: 'GoToProduct',
@@ -108,6 +105,7 @@ const MyColorInfo = class {
108
105
  product: this.product,
109
106
  color: (_a = this.currentColor) === null || _a === void 0 ? void 0 : _a.name,
110
107
  });
108
+ this.closeInfoBox.emit();
111
109
  };
112
110
  this.onCloseButtonClick = () => {
113
111
  this.closeInfoBox.emit();
@@ -126,7 +124,9 @@ const MyColorInfo = class {
126
124
  if (this.baselink) {
127
125
  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}`;
128
126
  }
129
- 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
+ else {
128
+ 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;
129
+ }
130
130
  };
131
131
  this.capitalizeFirstLetter = (string) => {
132
132
  return string.charAt(0).toUpperCase() + string.slice(1).toLocaleLowerCase();
@@ -140,9 +140,6 @@ const MyColorInfo = class {
140
140
  this.infoBoxWidth = undefined;
141
141
  this.closeImage = 'close.png';
142
142
  }
143
- closeModalHandler() {
144
- this.close.emit();
145
- }
146
143
  render() {
147
144
  var _a;
148
145
  return (index$1.h("div", { class: `boxes__box-content ${this.currentColor.textWhite ? 'boxes__box-content__white' : ''}`, style: {
@@ -150,7 +147,7 @@ const MyColorInfo = class {
150
147
  maxWidth: `${this.infoBoxWidth && this.infoBoxWidth - 4}px`,
151
148
  } }, 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
149
  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("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())));
150
+ } }, !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, href: this.getHref(), class: `button ${this.currentColor.imageInsteadHex ? 'brown' : this.currentColor.buttonInverse ? 'inverse' : ''}` }, "wybierz kolor"))))), index$1.h("div", { class: "boxes__box-content__slider" }, this.renderSliderOrImage())));
154
151
  }
155
152
  };
156
153
 
@@ -284,6 +281,9 @@ const MyModalBundle = class {
284
281
  async open() {
285
282
  this.show = true;
286
283
  }
284
+ async close() {
285
+ this.show = false;
286
+ }
287
287
  setReadyToCloseHandler(value) {
288
288
  this.readyToClose = value.detail.observable;
289
289
  }