@ppg_pl/pallete 2.0.20 → 2.0.21

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 (41) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/my-backdrop_8.cjs.entry.js +13 -4
  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-modal/my-modal.js +2 -2
  6. package/dist/collection/components/my-modal/my-modal.js.map +1 -1
  7. package/dist/collection/components/my-search/my-search.js +34 -7
  8. package/dist/collection/components/my-search/my-search.js.map +1 -1
  9. package/dist/components/gtmUtils.js +7 -0
  10. package/dist/components/gtmUtils.js.map +1 -0
  11. package/dist/components/index2.js +1 -5
  12. package/dist/components/index2.js.map +1 -1
  13. package/dist/components/index3.js +2 -1
  14. package/dist/components/index3.js.map +1 -1
  15. package/dist/components/my-colorbox2.js +2 -1
  16. package/dist/components/my-colorbox2.js.map +1 -1
  17. package/dist/components/my-colorinfo2.js +2 -1
  18. package/dist/components/my-colorinfo2.js.map +1 -1
  19. package/dist/components/my-modal2.js +4 -3
  20. package/dist/components/my-modal2.js.map +1 -1
  21. package/dist/components/my-search2.js +14 -3
  22. package/dist/components/my-search2.js.map +1 -1
  23. package/dist/esm/loader.js +1 -1
  24. package/dist/esm/my-backdrop_8.entry.js +13 -4
  25. package/dist/esm/my-backdrop_8.entry.js.map +1 -1
  26. package/dist/esm/pallete.js +1 -1
  27. package/dist/pallete/p-00f46562.entry.js +2 -0
  28. package/dist/pallete/p-00f46562.entry.js.map +1 -0
  29. package/dist/pallete/pallete.esm.js +1 -1
  30. package/dist/pallete/pallete.esm.js.map +1 -1
  31. package/dist/types/components/my-search/my-search.d.ts +2 -1
  32. package/dist/types/components.d.ts +4 -2
  33. package/package.json +1 -1
  34. package/www/build/p-00f46562.entry.js +2 -0
  35. package/www/build/p-00f46562.entry.js.map +1 -0
  36. package/www/build/pallete.esm.js +1 -1
  37. package/www/build/pallete.esm.js.map +1 -1
  38. package/dist/pallete/p-821312c7.entry.js +0 -2
  39. package/dist/pallete/p-821312c7.entry.js.map +0 -1
  40. package/www/build/p-821312c7.entry.js +0 -2
  41. package/www/build/p-821312c7.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],"colorname":[1],"show":[32],"readyToClose":[32],"open":[64],"close":[64]},[[0,"readyToCLose","setReadyToCloseHandler"],[0,"close","closeModalHandler"]]],[0,"my-modal",{"shop":[1],"product":[1],"baselink":[1],"selectedcolor":[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],"colorIsSelected":[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],"colorname":[1],"show":[32],"readyToClose":[32],"open":[64],"close":[64]},[[0,"readyToCLose","setReadyToCloseHandler"],[0,"close","closeModalHandler"]]],[0,"my-modal",{"shop":[1],"product":[1],"baselink":[1],"selectedcolor":[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],"colorIsSelected":[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",{"productname":[1],"shopname":[1],"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
 
@@ -2990,8 +2990,8 @@ const MyModal = class {
2990
2990
  this.openSeletedColor();
2991
2991
  }
2992
2992
  render() {
2993
- var _a, _b, _c;
2994
- 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 && this.data && (index$1.h("div", { class: `my-modal__header` }, index$1.h("div", { class: "image-wrapper" }, 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))), index$1.h("div", { class: "search-wrapper" }, !this.preloader && index$1.h("my-search", { productId: Number((_c = this.data) === null || _c === void 0 ? void 0 : _c.id), isMobile: this.isMobile }), !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" })))))), 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) => {
2993
+ var _a, _b;
2994
+ 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 && this.data && (index$1.h("div", { class: `my-modal__header` }, index$1.h("div", { class: "image-wrapper" }, 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))), index$1.h("div", { class: "search-wrapper" }, !this.preloader && index$1.h("my-search", { shopname: this.shop, productname: this.data.name, isMobile: this.isMobile }), !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" })))))), 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) => {
2995
2995
  var _a;
2996
2996
  return (index$1.h("div", { key: index, class: "boxes" }, index$1.h("div", { class: "boxes__list" }, color.map((c) => {
2997
2997
  var _a;
@@ -3050,8 +3050,9 @@ const MySearch = class {
3050
3050
  this.debouncedInputChangeValue = debounce((value) => {
3051
3051
  this.fetchColorsByName(value);
3052
3052
  this.searchText = value;
3053
- }, 300);
3054
- this.productId = undefined;
3053
+ }, 500);
3054
+ this.productname = undefined;
3055
+ this.shopname = undefined;
3055
3056
  this.isMobile = undefined;
3056
3057
  this.searchIcon = 'search.svg';
3057
3058
  this.searchText = null;
@@ -3061,6 +3062,14 @@ const MySearch = class {
3061
3062
  this.debouncedInputChangeValue(value);
3062
3063
  }
3063
3064
  fetchColorsByNameHandle(newValue) {
3065
+ if (newValue.length >= 3) {
3066
+ setDataLayer({
3067
+ event: 'ColorSearch',
3068
+ shop: this.shopname,
3069
+ product: this.productname,
3070
+ search_term: newValue,
3071
+ });
3072
+ }
3064
3073
  this.fetchColorsByName(newValue);
3065
3074
  }
3066
3075
  clearSearchTextHandler() {