@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.
Files changed (43) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/my-backdrop_8.cjs.entry.js +13 -16
  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-colorbox/my-colorbox.css +2 -2
  6. package/dist/collection/components/my-colorinfo/my-colorinfo.js +7 -27
  7. package/dist/collection/components/my-colorinfo/my-colorinfo.js.map +1 -1
  8. package/dist/collection/components/my-component/my-component.js +19 -0
  9. package/dist/collection/components/my-component/my-component.js.map +1 -1
  10. package/dist/collection/components/my-modal/my-modal.js +1 -1
  11. package/dist/collection/components/my-modal/my-modal.js.map +1 -1
  12. package/dist/collection/components/my-slider/index.js +1 -1
  13. package/dist/collection/components/my-slider/index.js.map +1 -1
  14. package/dist/components/index3.js +1 -1
  15. package/dist/components/index3.js.map +1 -1
  16. package/dist/components/my-colorbox2.js +1 -1
  17. package/dist/components/my-colorbox2.js.map +1 -1
  18. package/dist/components/my-colorinfo2.js +7 -13
  19. package/dist/components/my-colorinfo2.js.map +1 -1
  20. package/dist/components/my-component.js +5 -1
  21. package/dist/components/my-component.js.map +1 -1
  22. package/dist/components/my-modal2.js +1 -1
  23. package/dist/components/my-modal2.js.map +1 -1
  24. package/dist/esm/loader.js +1 -1
  25. package/dist/esm/my-backdrop_8.entry.js +13 -16
  26. package/dist/esm/my-backdrop_8.entry.js.map +1 -1
  27. package/dist/esm/pallete.js +1 -1
  28. package/dist/pallete/p-919c7427.entry.js +2 -0
  29. package/dist/pallete/p-919c7427.entry.js.map +1 -0
  30. package/dist/pallete/pallete.esm.js +1 -1
  31. package/dist/pallete/pallete.esm.js.map +1 -1
  32. package/dist/types/components/my-colorinfo/my-colorinfo.d.ts +2 -4
  33. package/dist/types/components/my-component/my-component.d.ts +1 -0
  34. package/dist/types/components.d.ts +1 -1
  35. package/package.json +1 -1
  36. package/www/build/p-919c7427.entry.js +2 -0
  37. package/www/build/p-919c7427.entry.js.map +1 -0
  38. package/www/build/pallete.esm.js +1 -1
  39. package/www/build/pallete.esm.js.map +1 -1
  40. package/dist/pallete/p-31c2e093.entry.js +0 -2
  41. package/dist/pallete/p-31c2e093.entry.js.map +0 -1
  42. package/www/build/p-31c2e093.entry.js +0 -2
  43. package/www/build/p-31c2e093.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
 
@@ -46,7 +46,7 @@ class API {
46
46
  }
47
47
  const ApiService = new API();
48
48
 
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}";
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: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}";
50
50
 
51
51
  const MyColorBox = class {
52
52
  constructor(hostRef) {
@@ -96,10 +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
101
  this.currentColor &&
104
102
  setDataLayer({
105
103
  event: 'GoToProduct',
@@ -107,8 +105,7 @@ const MyColorInfo = class {
107
105
  product: this.product,
108
106
  color: (_a = this.currentColor) === null || _a === void 0 ? void 0 : _a.name,
109
107
  });
110
- this.getHref();
111
- this.closeModalHandler();
108
+ this.closeInfoBox.emit();
112
109
  };
113
110
  this.onCloseButtonClick = () => {
114
111
  this.closeInfoBox.emit();
@@ -124,12 +121,12 @@ const MyColorInfo = class {
124
121
  };
125
122
  this.getHref = () => {
126
123
  var _a, _b, _c, _d;
127
- let link;
128
124
  if (this.baselink) {
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}`;
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}`;
126
+ }
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;
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');
133
130
  };
134
131
  this.capitalizeFirstLetter = (string) => {
135
132
  return string.charAt(0).toUpperCase() + string.slice(1).toLocaleLowerCase();
@@ -143,9 +140,6 @@ const MyColorInfo = class {
143
140
  this.infoBoxWidth = undefined;
144
141
  this.closeImage = 'close.png';
145
142
  }
146
- closeModalHandler() {
147
- this.close.emit();
148
- }
149
143
  render() {
150
144
  var _a;
151
145
  return (index$1.h("div", { class: `boxes__box-content ${this.currentColor.textWhite ? 'boxes__box-content__white' : ''}`, style: {
@@ -153,7 +147,7 @@ const MyColorInfo = class {
153
147
  maxWidth: `${this.infoBoxWidth && this.infoBoxWidth - 4}px`,
154
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: {
155
149
  maxWidth: this.isMobile ? `${this.infoBoxWidth && this.infoBoxWidth - 35}px` : ``,
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())));
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())));
157
151
  }
158
152
  };
159
153
 
@@ -287,6 +281,9 @@ const MyModalBundle = class {
287
281
  async open() {
288
282
  this.show = true;
289
283
  }
284
+ async close() {
285
+ this.show = false;
286
+ }
290
287
  setReadyToCloseHandler(value) {
291
288
  this.readyToClose = value.detail.observable;
292
289
  }
@@ -2695,7 +2692,7 @@ const MyModal = class {
2695
2692
  this.close = index$1.createEvent(this, "close", 7);
2696
2693
  this.readyToCLose = index$1.createEvent(this, "readyToCLose", 7);
2697
2694
  this.boxDesktopWidth = 130;
2698
- this.boxMobileWidth = 85;
2695
+ this.boxMobileWidth = 70;
2699
2696
  this.desktopPadding = 75;
2700
2697
  this.mobilePadding = 35;
2701
2698
  this.mediumBreakpoint = 1024;
@@ -8287,7 +8284,7 @@ const JcSwiper = class {
8287
8284
  render() {
8288
8285
  return (index$1.h("div", { class: "slider-wrapper" }, index$1.h("div", { class: "swiper mySwiper2" }, index$1.h("div", { class: "swiper-wrapper" }, this.slides &&
8289
8286
  this.slides.length > 0 &&
8290
- this.slides.map((slide) => (index$1.h("div", { key: slide.id, class: "swiper-slide" }, index$1.h("img", { src: `${APIURL}/assets/${slide.directus_files_id}?access_token=${accessToken}`, alt: "room_image" }))))), index$1.h("div", { onClick: this.colorInteraction, class: "swiper-button-next" }), index$1.h("div", { onClick: this.colorInteraction, class: "swiper-button-prev" })), index$1.h("div", { class: "swiper mySwiper" }, index$1.h("div", { class: "swiper-wrapper" }, this.slides &&
8287
+ this.slides.map((slide) => (index$1.h("div", { key: slide.id, class: "swiper-slide" }, index$1.h("img", { src: `${APIURL}/assets/${slide.directus_files_id}?access_token=${accessToken}`, alt: "room_image" }))))), this.slides && this.slides.length >= 2 && (index$1.h("div", null, index$1.h("div", { onClick: this.colorInteraction, class: "swiper-button-next" }), index$1.h("div", { onClick: this.colorInteraction, class: "swiper-button-prev" })))), index$1.h("div", { class: "swiper mySwiper" }, index$1.h("div", { class: "swiper-wrapper" }, this.slides &&
8291
8288
  this.slides.length > 0 &&
8292
8289
  this.slides.map((slide) => (index$1.h("div", { key: slide.id, class: "swiper-slide" }, index$1.h("img", { src: `${APIURL}/assets/${slide.directus_files_id}?access_token=${accessToken}`, alt: "room_image" }))))))));
8293
8290
  }