@ppg_pl/pallete 2.0.25 → 2.0.27

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 (78) hide show
  1. package/dist/cjs/{index-d74cbc0d.js → index-e6121396.js} +19 -6
  2. package/dist/cjs/index-e6121396.js.map +1 -0
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/my-backdrop_8.cjs.entry.js +45 -28
  5. package/dist/cjs/my-backdrop_8.cjs.entry.js.map +1 -1
  6. package/dist/cjs/pallete.cjs.js +2 -2
  7. package/dist/collection/components/my-backdrop/my-backdrop.css +13 -1
  8. package/dist/collection/components/my-backdrop/my-backdrop.js +1 -0
  9. package/dist/collection/components/my-backdrop/my-backdrop.js.map +1 -1
  10. package/dist/collection/components/my-colorbox/my-colorbox.css +11 -0
  11. package/dist/collection/components/my-colorbox/my-colorbox.js +1 -0
  12. package/dist/collection/components/my-colorbox/my-colorbox.js.map +1 -1
  13. package/dist/collection/components/my-colorinfo/my-colorinfo.css +361 -0
  14. package/dist/collection/components/my-colorinfo/my-colorinfo.js +11 -0
  15. package/dist/collection/components/my-colorinfo/my-colorinfo.js.map +1 -1
  16. package/dist/collection/components/my-component/my-component.js +1 -1
  17. package/dist/collection/components/my-component/my-component.js.map +1 -1
  18. package/dist/collection/components/my-loader/my-loader.js +1 -1
  19. package/dist/collection/components/my-loader/my-loader.js.map +1 -1
  20. package/dist/collection/components/my-modal/my-modal.css +13 -342
  21. package/dist/collection/components/my-modal/my-modal.js +6 -2
  22. package/dist/collection/components/my-modal/my-modal.js.map +1 -1
  23. package/dist/collection/components/my-search/my-search.css +11 -0
  24. package/dist/collection/components/my-search/my-search.js +1 -1
  25. package/dist/collection/components/my-search/my-search.js.map +1 -1
  26. package/dist/collection/components/my-slider/index.js +30 -18
  27. package/dist/collection/components/my-slider/index.js.map +1 -1
  28. package/dist/collection/components/my-slider/my-slider.css +30 -3
  29. package/dist/components/index3.js +32 -20
  30. package/dist/components/index3.js.map +1 -1
  31. package/dist/components/my-backdrop2.js +3 -2
  32. package/dist/components/my-backdrop2.js.map +1 -1
  33. package/dist/components/my-colorbox2.js +3 -2
  34. package/dist/components/my-colorbox2.js.map +1 -1
  35. package/dist/components/my-colorinfo2.js +5 -1
  36. package/dist/components/my-colorinfo2.js.map +1 -1
  37. package/dist/components/my-component.js +3 -2
  38. package/dist/components/my-component.js.map +1 -1
  39. package/dist/components/my-loader2.js +3 -2
  40. package/dist/components/my-loader2.js.map +1 -1
  41. package/dist/components/my-modal2.js +8 -4
  42. package/dist/components/my-modal2.js.map +1 -1
  43. package/dist/components/my-search2.js +3 -2
  44. package/dist/components/my-search2.js.map +1 -1
  45. package/dist/esm/{index-45a30349.js → index-bfca3bb0.js} +19 -6
  46. package/dist/esm/index-bfca3bb0.js.map +1 -0
  47. package/dist/esm/loader.js +3 -3
  48. package/dist/esm/my-backdrop_8.entry.js +45 -28
  49. package/dist/esm/my-backdrop_8.entry.js.map +1 -1
  50. package/dist/esm/pallete.js +3 -3
  51. package/dist/pallete/p-28521606.entry.js +2 -0
  52. package/dist/pallete/p-28521606.entry.js.map +1 -0
  53. package/dist/pallete/p-a9353643.js +3 -0
  54. package/dist/pallete/p-a9353643.js.map +1 -0
  55. package/dist/pallete/pallete.css +1 -1
  56. package/dist/pallete/pallete.esm.js +1 -1
  57. package/package.json +1 -1
  58. package/www/build/p-28521606.entry.js +2 -0
  59. package/www/build/p-28521606.entry.js.map +1 -0
  60. package/www/build/p-a9353643.js +3 -0
  61. package/www/build/p-a9353643.js.map +1 -0
  62. package/www/build/p-e0d7f1b0.js +163 -0
  63. package/www/build/p-e724a1ee.css +21 -0
  64. package/www/build/pallete.css +1 -1
  65. package/www/build/pallete.esm.js +1 -1
  66. package/www/index.html +1 -1
  67. package/dist/cjs/index-d74cbc0d.js.map +0 -1
  68. package/dist/esm/index-45a30349.js.map +0 -1
  69. package/dist/pallete/p-a3449132.js +0 -3
  70. package/dist/pallete/p-a3449132.js.map +0 -1
  71. package/dist/pallete/p-d142c667.entry.js +0 -2
  72. package/dist/pallete/p-d142c667.entry.js.map +0 -1
  73. package/www/build/p-8c41f668.js +0 -2
  74. package/www/build/p-a3449132.js +0 -3
  75. package/www/build/p-a3449132.js.map +0 -1
  76. package/www/build/p-d142c667.entry.js +0 -2
  77. package/www/build/p-d142c667.entry.js.map +0 -1
  78. package/www/build/p-f8a0208d.css +0 -1
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-d74cbc0d.js');
5
+ const index = require('./index-e6121396.js');
6
6
 
7
7
  /*
8
8
  Stencil Client Patch Browser v3.1.0 | MIT Licensed | https://stenciljs.com
@@ -20,7 +20,7 @@ const patchBrowser = () => {
20
20
  };
21
21
 
22
22
  patchBrowser().then(options => {
23
- return index.bootstrapLazy([["my-backdrop_8.cjs",[[2,"my-component",{"shop":[1],"product":[1],"baselink":[1],"colorname":[1],"available_testers":[1],"price":[2],"show":[32],"readyToClose":[32],"open":[64],"close":[64]},[[0,"readyToCLose","setReadyToCloseHandler"],[0,"close","closeModalHandler"],[0,"addToBasket","addToBasketHandler"]]],[0,"my-modal",{"shop":[1],"product":[1],"baselink":[1],"available_testers":[16],"price":[2],"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],"availableTesters":[16],"price":[2],"data":[16],"isMobile":[4,"is-mobile"],"infoBoxWidth":[2,"info-box-width"],"closeImage":[1,"close-image"],"shapeImage":[1,"shape-image"],"buttonBlocked":[4,"button-blocked"]}],[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);
23
+ return index.bootstrapLazy([["my-backdrop_8.cjs",[[1,"my-component",{"shop":[1],"product":[1],"baselink":[1],"colorname":[1],"available_testers":[1],"price":[2],"show":[32],"readyToClose":[32],"open":[64],"close":[64]},[[0,"readyToCLose","setReadyToCloseHandler"],[0,"close","closeModalHandler"],[0,"addToBasket","addToBasketHandler"]]],[1,"my-modal",{"shop":[1],"product":[1],"baselink":[1],"available_testers":[16],"price":[2],"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"]]],[1,"my-backdrop"],[1,"my-colorinfo",{"currentColor":[16],"shop":[1],"product":[1],"baselink":[1],"availableTesters":[16],"price":[2],"data":[16],"isMobile":[4,"is-mobile"],"infoBoxWidth":[2,"info-box-width"],"closeImage":[1,"close-image"],"shapeImage":[1,"shape-image"],"buttonBlocked":[4,"button-blocked"]}],[1,"my-colorbox",{"color":[1],"name":[1],"shop":[1],"product":[1],"isActive":[4,"is-active"],"isCategoryActive":[4,"is-category-active"],"isImageInsteadHex":[16]}],[1,"my-loader"],[1,"my-search",{"productname":[1],"shopname":[1],"isMobile":[4,"is-mobile"],"searchIcon":[1,"search-icon"],"searchText":[32]},[[4,"clearSearchText","clearSearchTextHandler"]]],[1,"my-slider",{"slides":[16],"shop":[1],"product":[1],"color":[1]}]]]], options);
24
24
  });
25
25
 
26
26
  exports.setNonce = index.setNonce;
@@ -5,11 +5,23 @@
5
5
  font-style: normal;
6
6
  font-display: swap;
7
7
  }
8
+ @font-face {
9
+ font-family: swiper-icons;
10
+ src: url("data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYDAzaX6QjD6/4//Bxj5GA8AuRwMYGkAPywL13jaY2BkYGA88P8Agx4j+/8fQDYfA1AEBWgDAIB2BOoAeNpjYGRgYNBh4GdgYgABEMnIABJzYNADCQAACWgAsQB42mNgYfzCOIGBlYGB0YcxjYGBwR1Kf2WQZGhhYGBiYGVmgAFGBiQQkOaawtDAoMBQxXjg/wEGPcYDDA4wNUA2CCgwsAAAO4EL6gAAeNpj2M0gyAACqxgGNWBkZ2D4/wMA+xkDdgAAAHjaY2BgYGaAYBkG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bmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8telefonCBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA");
11
+ font-weight: 400;
12
+ font-style: normal;
13
+ }
8
14
  .pallete-wrapper * {
9
15
  font-family: "Galatea", sans-serif;
10
16
  }
11
17
 
12
- my-backdrop {
18
+ :host,
19
+ :host * {
20
+ font-family: "Galatea", sans-serif;
21
+ }
22
+
23
+ :host {
24
+ display: block;
13
25
  width: 100%;
14
26
  height: 100%;
15
27
  background-color: rgba(0, 0, 0, 0.7);
@@ -3,6 +3,7 @@ export class MyBackdrop {
3
3
  return null;
4
4
  }
5
5
  static get is() { return "my-backdrop"; }
6
+ static get encapsulation() { return "shadow"; }
6
7
  static get originalStyleUrls() {
7
8
  return {
8
9
  "$": ["my-backdrop.scss"]
@@ -1 +1 @@
1
- {"version":3,"file":"my-backdrop.js","sourceRoot":"","sources":["../../../src/components/my-backdrop/my-backdrop.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAM1C,MAAM,OAAO,UAAU;EACrB,MAAM;IACJ,OAAO,IAAI,CAAC;EACd,CAAC;;;;;;;;CACF","sourcesContent":["import { Component } from '@stencil/core';\n\n@Component({\n tag: 'my-backdrop',\n styleUrl: 'my-backdrop.scss',\n})\nexport class MyBackdrop {\n render() {\n return null;\n }\n}\n"]}
1
+ {"version":3,"file":"my-backdrop.js","sourceRoot":"","sources":["../../../src/components/my-backdrop/my-backdrop.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAO1C,MAAM,OAAO,UAAU;EACrB,MAAM;IACJ,OAAO,IAAI,CAAC;EACd,CAAC;;;;;;;;;CACF","sourcesContent":["import { Component } from '@stencil/core';\n\n@Component({\n tag: 'my-backdrop',\n styleUrl: 'my-backdrop.scss',\n shadow: true,\n})\nexport class MyBackdrop {\n render() {\n return null;\n }\n}\n"]}
@@ -5,10 +5,21 @@
5
5
  font-style: normal;
6
6
  font-display: swap;
7
7
  }
8
+ @font-face {
9
+ font-family: swiper-icons;
10
+ src: url("data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYDAzaX6QjD6/4//Bxj5GA8AuRwMYGkAPywL13jaY2BkYGA88P8Agx4j+/8fQDYfA1AEBWgDAIB2BOoAeNpjYGRgYNBh4GdgYgABEMnIABJzYNADCQAACWgAsQB42mNgYfzCOIGBlYGB0YcxjYGBwR1Kf2WQZGhhYGBiYGVmgAFGBiQQkOaawtDAoMBQxXjg/wEGPcYDDA4wNUA2CCgwsAAAO4EL6gAAeNpj2M0gyAACqxgG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+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8telefonCBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA");
11
+ font-weight: 400;
12
+ font-style: normal;
13
+ }
8
14
  .pallete-wrapper * {
9
15
  font-family: "Galatea", sans-serif;
10
16
  }
11
17
 
18
+ :host,
19
+ :host * {
20
+ font-family: "Galatea", sans-serif;
21
+ }
22
+
12
23
  .my-color-box {
13
24
  width: 125px;
14
25
  height: 125px;
@@ -42,6 +42,7 @@ export class MyColorBox {
42
42
  } }, h("div", { class: "color-name" }, this.name)));
43
43
  }
44
44
  static get is() { return "my-colorbox"; }
45
+ static get encapsulation() { return "shadow"; }
45
46
  static get originalStyleUrls() {
46
47
  return {
47
48
  "$": ["my-colorbox.scss"]
@@ -1 +1 @@
1
- {"version":3,"file":"my-colorbox.js","sourceRoot":"","sources":["../../../src/components/my-colorbox/my-colorbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAM7C,MAAM,OAAO,UAAU;;IAWrB,eAAU,GAAG,GAAG,EAAE;MAChB,IAAI,CAAC,YAAY,GAAG,UAAU,CAAC,GAAG,EAAE;QAClC,YAAY,CAAC;UACX,KAAK,EAAE,YAAY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AAA,IAAI,CAAC,iBAAiB,0CAAE,iBAAiB,EAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;QACxE,eAAe,EAAE,CAAA,MAAA,IAAI,CAAC,iBAAiB,0CAAE,iBAAiB,EAAC,CAAC,CAAC,OAAO,MAAM,WAAW,IAAI,CAAC,iBAAiB,CAAC,QAAQ,iBAAiB,WAAW,GAAG,CAAC,CAAC,CAAC,EAAE;QACxJ,UAAU,EAAE,CAAA,MAAA,IAAI,CAAC,iBAAiB,0CAAE,iBAAiB,EAAC,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK;QACpG,MAAM,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,aAAa,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE;OACjF;MAED,WAAK,KAAK,EAAC,YAAY,IAAE,IAAI,CAAC,IAAI,CAAO,CACrC,CACP,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h } from '@stencil/core';\nimport { setDataLayer } from '../../gtmUtils';\nimport { ColorBoxyIsImageInsteadHex } from '../../types';\nimport { APIURL, accessToken } from '../api';\n\n@Component({\n tag: 'my-colorbox',\n styleUrl: 'my-colorbox.scss',\n})\nexport class MyColorBox {\n private checkTimeout: ReturnType<typeof setTimeout> | undefined;\n\n @Prop() color: string;\n @Prop() name: string;\n @Prop() shop: string;\n @Prop() product: string;\n @Prop() isActive?: boolean;\n @Prop() isCategoryActive?: boolean;\n @Prop() isImageInsteadHex?: ColorBoxyIsImageInsteadHex;\n\n colorCheck = () => {\n this.checkTimeout = setTimeout(() => {\n setDataLayer({\n event: 'ColorCheck',\n shop: this.shop,\n product: this.product,\n color: this.name,\n });\n }, 2000);\n };\n\n colorUnCheck = () => {\n if (this.checkTimeout) clearTimeout(this.checkTimeout);\n this.checkTimeout = undefined;\n };\n\n darkenColor = (color: string) => {\n const red = parseInt(color[1] + color[2], 16) - 20;\n const green = parseInt(color[3] + color[4], 16) - 20;\n const blue = parseInt(color[5] + color[6], 16) - 20;\n return `rgb(${red},${green},${blue})`;\n };\n\n render() {\n return (\n <div\n onMouseEnter={() => this.colorCheck()}\n onMouseLeave={() => this.colorUnCheck()}\n class={`my-color-box ${this.isActive ? 'active' : ''} ${this.isCategoryActive ? 'categoryactive' : ''}`}\n style={{\n backgroundSize: this.isImageInsteadHex?.isImageInsteadHex ? 'cover' : '',\n backgroundImage: this.isImageInsteadHex?.isImageInsteadHex ? `url(${APIURL}/assets/${this.isImageInsteadHex.bigImage}?access_token=${accessToken})` : '',\n background: this.isImageInsteadHex?.isImageInsteadHex ? this.isImageInsteadHex.bigImage : this.color,\n border: this.isCategoryActive ? `5px solid ${this.darkenColor(this.color)}` : '',\n }}\n >\n <div class=\"color-name\">{this.name}</div>\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"my-colorbox.js","sourceRoot":"","sources":["../../../src/components/my-colorbox/my-colorbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAO7C,MAAM,OAAO,UAAU;;IAWrB,eAAU,GAAG,GAAG,EAAE;MAChB,IAAI,CAAC,YAAY,GAAG,UAAU,CAAC,GAAG,EAAE;QAClC,YAAY,CAAC;UACX,KAAK,EAAE,YAAY;UACnB,IAAI,EAAE,IAAI,CAAC,IAAI;UACf,OAAO,EAAE,IAAI,CAAC,O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AC,CAAC,CAAC,EAAE;QACxE,eAAe,EAAE,CAAA,MAAA,IAAI,CAAC,iBAAiB,0CAAE,iBAAiB,EAAC,CAAC,CAAC,OAAO,MAAM,WAAW,IAAI,CAAC,iBAAiB,CAAC,QAAQ,iBAAiB,WAAW,GAAG,CAAC,CAAC,CAAC,EAAE;QACxJ,UAAU,EAAE,CAAA,MAAA,IAAI,CAAC,iBAAiB,0CAAE,iBAAiB,EAAC,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK;QACpG,MAAM,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,aAAa,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE;OACjF;MAED,WAAK,KAAK,EAAC,YAAY,IAAE,IAAI,CAAC,IAAI,CAAO,CACrC,CACP,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h } from '@stencil/core';\nimport { setDataLayer } from '../../gtmUtils';\nimport { ColorBoxyIsImageInsteadHex } from '../../types';\nimport { APIURL, accessToken } from '../api';\n\n@Component({\n tag: 'my-colorbox',\n styleUrl: 'my-colorbox.scss',\n shadow: true,\n})\nexport class MyColorBox {\n private checkTimeout: ReturnType<typeof setTimeout> | undefined;\n\n @Prop() color: string;\n @Prop() name: string;\n @Prop() shop: string;\n @Prop() product: string;\n @Prop() isActive?: boolean;\n @Prop() isCategoryActive?: boolean;\n @Prop() isImageInsteadHex?: ColorBoxyIsImageInsteadHex;\n\n colorCheck = () => {\n this.checkTimeout = setTimeout(() => {\n setDataLayer({\n event: 'ColorCheck',\n shop: this.shop,\n product: this.product,\n color: this.name,\n });\n }, 2000);\n };\n\n colorUnCheck = () => {\n if (this.checkTimeout) clearTimeout(this.checkTimeout);\n this.checkTimeout = undefined;\n };\n\n darkenColor = (color: string) => {\n const red = parseInt(color[1] + color[2], 16) - 20;\n const green = parseInt(color[3] + color[4], 16) - 20;\n const blue = parseInt(color[5] + color[6], 16) - 20;\n return `rgb(${red},${green},${blue})`;\n };\n\n render() {\n return (\n <div\n onMouseEnter={() => this.colorCheck()}\n onMouseLeave={() => this.colorUnCheck()}\n class={`my-color-box ${this.isActive ? 'active' : ''} ${this.isCategoryActive ? 'categoryactive' : ''}`}\n style={{\n backgroundSize: this.isImageInsteadHex?.isImageInsteadHex ? 'cover' : '',\n backgroundImage: this.isImageInsteadHex?.isImageInsteadHex ? `url(${APIURL}/assets/${this.isImageInsteadHex.bigImage}?access_token=${accessToken})` : '',\n background: this.isImageInsteadHex?.isImageInsteadHex ? this.isImageInsteadHex.bigImage : this.color,\n border: this.isCategoryActive ? `5px solid ${this.darkenColor(this.color)}` : '',\n }}\n >\n <div class=\"color-name\">{this.name}</div>\n </div>\n );\n }\n}\n"]}
@@ -0,0 +1,361 @@
1
+ @font-face {
2
+ font-family: "Galatea";
3
+ src: url("/assets/fonts/Galatea-Regular.woff2") format("woff2"), url("/assets/fonts/Galatea-Regular.woff") format("woff"), url("/assets/fonts/Galatea-Regular.ttf") format("truetype");
4
+ font-weight: normal;
5
+ font-style: normal;
6
+ font-display: swap;
7
+ }
8
+ @font-face {
9
+ font-family: swiper-icons;
10
+ src: url("data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEB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1ugWHgo3S1XdZEVqWM7ET0cfnLGxWfkgR42o2PvWrDMBSFj/IHLaF0zKjRgdiVMwScNRAoWUoH78Y2icB/yIY09An6AH2Bdu/UB+yxopYshQiEvnvu0dURgDt8QeC8PDw7Fpji3fEA4z/PEJ6YOB5hKh4dj3EvXhxPqH/SKUY3rJ7srZ4FZnh1PMAtPhwP6fl2PMJMPDgeQ4rY8YT6Gzao0eAEA409DuggmTnFnOcSCiEiLMgxCiTI6Cq5DZUd3Qmp10vO0LaLTd2cjN4fOumlc7lUYbSQcZFkutRG7g6JKZKy0RmdLY680CDnEJ+UMkpFFe1RN7nxdVpXrC4aTtnaurOnYercZg2YVmLN/d/gczfEimrE/fs/bOuq29Zmn8tloORaXgZgGa78yO9/cnXm2BpaGvq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8telefonCBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA");
11
+ font-weight: 400;
12
+ font-style: normal;
13
+ }
14
+ .pallete-wrapper * {
15
+ font-family: "Galatea", sans-serif;
16
+ }
17
+
18
+ :host,
19
+ :host * {
20
+ font-family: "Galatea", sans-serif;
21
+ }
22
+
23
+ .boxes__box-content {
24
+ width: 100%;
25
+ margin-bottom: 5px;
26
+ height: 500px;
27
+ text-align: left;
28
+ display: flex;
29
+ flex-direction: row;
30
+ justify-content: space-between;
31
+ position: relative;
32
+ }
33
+ .boxes__box-content .closebtn {
34
+ position: absolute;
35
+ right: 10px;
36
+ top: 10px;
37
+ width: 53px;
38
+ height: 53px;
39
+ cursor: pointer;
40
+ object-fit: cover;
41
+ z-index: 9999;
42
+ }
43
+ @media (max-width: 1024px) {
44
+ .boxes__box-content {
45
+ flex-direction: column-reverse;
46
+ height: auto;
47
+ }
48
+ }
49
+ @media (max-width: 768px) {
50
+ .boxes__box-content {
51
+ margin: 0 auto;
52
+ }
53
+ }
54
+ .boxes__box-content__info {
55
+ width: 40%;
56
+ padding: 50px 40px;
57
+ position: relative;
58
+ display: flex;
59
+ flex-direction: column;
60
+ justify-content: space-between;
61
+ }
62
+ @media (max-width: 1024px) {
63
+ .boxes__box-content__info {
64
+ width: 100%;
65
+ padding: 15px;
66
+ min-height: 100px;
67
+ }
68
+ }
69
+ @media (max-width: 768px) {
70
+ .boxes__box-content__info {
71
+ min-height: auto;
72
+ }
73
+ }
74
+ .boxes__box-content__info__header {
75
+ display: flex;
76
+ flex-direction: column;
77
+ align-items: flex-start;
78
+ }
79
+ .boxes__box-content__info h2 {
80
+ font-size: 35px;
81
+ font-weight: normal;
82
+ margin-bottom: 30px;
83
+ color: #232323;
84
+ }
85
+ @media (max-width: 768px) {
86
+ .boxes__box-content__info h2 {
87
+ font-size: 16px;
88
+ text-align: center;
89
+ margin-bottom: 15px;
90
+ margin-top: 5px;
91
+ }
92
+ }
93
+ .boxes__box-content__info h4 {
94
+ margin-top: 0px;
95
+ margin-bottom: 15px;
96
+ font-size: 16px;
97
+ color: #4c4c4c;
98
+ }
99
+ .boxes__box-content__info__value {
100
+ display: flex;
101
+ flex-direction: column;
102
+ align-items: flex-start;
103
+ gap: 20px;
104
+ }
105
+ @media (max-width: 1024px) {
106
+ .boxes__box-content__info__value {
107
+ justify-content: flex-start;
108
+ margin-top: 30px;
109
+ }
110
+ }
111
+ @media (max-width: 768px) {
112
+ .boxes__box-content__info__value {
113
+ flex-direction: column;
114
+ }
115
+ }
116
+ @media (max-width: 768px) {
117
+ .boxes__box-content__info__value-image {
118
+ margin: 0 auto;
119
+ margin-bottom: 10px;
120
+ }
121
+ }
122
+ .boxes__box-content__info__value-image img {
123
+ width: 114px;
124
+ object-fit: cover;
125
+ }
126
+ @media (max-width: 1024px) {
127
+ .boxes__box-content__info__value-image img {
128
+ width: 75px;
129
+ }
130
+ }
131
+ .boxes__box-content__info__value-product {
132
+ color: #232323;
133
+ margin-left: 10px;
134
+ }
135
+ @media (max-width: 1024px) {
136
+ .boxes__box-content__info__value-product h2 {
137
+ font-size: 26px;
138
+ margin: 0;
139
+ margin-right: 10px;
140
+ }
141
+ }
142
+ @media (max-width: 768px) {
143
+ .boxes__box-content__info__value-product h2 {
144
+ font-size: 16px;
145
+ }
146
+ }
147
+ .boxes__box-content__info__value-product p {
148
+ font-size: 20px;
149
+ margin-top: 0px;
150
+ margin-bottom: 0px;
151
+ }
152
+ .boxes__box-content__info__value-product p:last-of-type {
153
+ margin-bottom: 20px;
154
+ }
155
+ @media (max-width: 1024px) {
156
+ .boxes__box-content__info__value-product p:last-of-type {
157
+ margin-bottom: 0;
158
+ }
159
+ }
160
+ @media (max-width: 768px) {
161
+ .boxes__box-content__info__value-product p {
162
+ font-size: 10px;
163
+ }
164
+ }
165
+ @media (max-width: 1024px) {
166
+ .boxes__box-content__info__value-product > div {
167
+ display: flex;
168
+ justify-content: flex-start;
169
+ align-items: center;
170
+ }
171
+ }
172
+ @media (max-width: 768px) {
173
+ .boxes__box-content__info__value-product > div {
174
+ flex-direction: column;
175
+ }
176
+ }
177
+ .boxes__box-content__info__tester {
178
+ display: flex;
179
+ flex-direction: column;
180
+ gap: 15px;
181
+ width: 100%;
182
+ }
183
+ @media (max-width: 1024px) {
184
+ .boxes__box-content__info__tester {
185
+ text-align: center;
186
+ }
187
+ }
188
+ .boxes__box-content__info__tester .tester-text h2 {
189
+ margin: 0 0 10px;
190
+ font-size: 18px;
191
+ font-weight: 700;
192
+ }
193
+ .boxes__box-content__info__tester .tester-text p {
194
+ margin: 0;
195
+ font-size: 14px;
196
+ }
197
+ .boxes__box-content__info__tester .tester-buy {
198
+ display: flex;
199
+ align-items: center;
200
+ gap: 15px;
201
+ }
202
+ @media (max-width: 1024px) {
203
+ .boxes__box-content__info__tester .tester-buy {
204
+ flex-direction: column;
205
+ }
206
+ .boxes__box-content__info__tester .tester-buy button {
207
+ margin: 0;
208
+ max-width: 100%;
209
+ }
210
+ }
211
+ .boxes__box-content__info__tester .price {
212
+ font-size: 20px;
213
+ font-weight: 600;
214
+ }
215
+ .boxes__box-content__slider {
216
+ width: 60%;
217
+ min-width: 60%;
218
+ max-width: 60%;
219
+ position: relative;
220
+ }
221
+ @media (max-width: 1024px) {
222
+ .boxes__box-content__slider {
223
+ width: 100%;
224
+ display: block;
225
+ min-width: 100%;
226
+ max-width: 100%;
227
+ }
228
+ }
229
+ .boxes__box-content__slider .color-big-image {
230
+ width: 100%;
231
+ height: 100%;
232
+ object-fit: cover;
233
+ }
234
+ @media (max-width: 1024px) {
235
+ .boxes__box-content__slider .color-big-image {
236
+ height: 300px;
237
+ }
238
+ }
239
+ .boxes__box-content__white .tester-text,
240
+ .boxes__box-content__white .tester-buy {
241
+ color: #fff;
242
+ }
243
+ .boxes__box-content__white h2 {
244
+ color: #fff;
245
+ }
246
+
247
+ .button,
248
+ a.button {
249
+ background-color: #fff;
250
+ font-size: 16px;
251
+ box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.1);
252
+ border-radius: 22px;
253
+ padding: 10px 35px;
254
+ color: #232323;
255
+ text-decoration: none;
256
+ text-align: center;
257
+ transition: all 0.7s ease-in-out;
258
+ border: none;
259
+ cursor: pointer;
260
+ display: flex;
261
+ align-items: center;
262
+ gap: 5px;
263
+ }
264
+ .button .shape-icon,
265
+ a.button .shape-icon {
266
+ display: inline-flex;
267
+ }
268
+ .button .shape-icon svg,
269
+ a.button .shape-icon svg {
270
+ display: block;
271
+ }
272
+ .button .shape-icon path,
273
+ .button .shape-icon .shape-icon__path,
274
+ a.button .shape-icon path,
275
+ a.button .shape-icon .shape-icon__path {
276
+ fill: currentColor;
277
+ transition: fill 0.7s ease-in-out;
278
+ }
279
+ .button.fit,
280
+ a.button.fit {
281
+ padding: 10px 15px;
282
+ }
283
+ .button:hover,
284
+ a.button:hover {
285
+ color: #fff;
286
+ background-color: #232323;
287
+ }
288
+ .button.brown,
289
+ a.button.brown {
290
+ background-color: #3c2114;
291
+ color: #fff;
292
+ }
293
+ .button.brown:hover,
294
+ a.button.brown:hover {
295
+ color: #fff;
296
+ background-color: #232323;
297
+ }
298
+ .button.inverse,
299
+ a.button.inverse {
300
+ background-color: #232323;
301
+ color: #fff;
302
+ }
303
+ .button.inverse:hover,
304
+ a.button.inverse:hover {
305
+ color: #232323;
306
+ background-color: #fff;
307
+ }
308
+ .button.inverse svg path,
309
+ a.button.inverse svg path {
310
+ fill: #fff;
311
+ }
312
+ .button:disabled,
313
+ a.button:disabled {
314
+ cursor: not-allowed;
315
+ background-color: white;
316
+ opacity: 0.5;
317
+ }
318
+ .button:disabled.brown,
319
+ a.button:disabled.brown {
320
+ background-color: black;
321
+ color: white;
322
+ opacity: 0.5;
323
+ }
324
+ .button:disabled.inverse,
325
+ a.button:disabled.inverse {
326
+ background-color: black;
327
+ color: white;
328
+ opacity: 0.5;
329
+ }
330
+ .button:disabled:hover,
331
+ a.button:disabled:hover {
332
+ background-color: inherit;
333
+ color: inherit;
334
+ opacity: 0.5;
335
+ }
336
+ @media (max-width: 1024px) {
337
+ .button,
338
+ a.button {
339
+ max-width: 150px;
340
+ font-size: 13px;
341
+ padding: 12px 25px;
342
+ }
343
+ }
344
+ @media (max-width: 768px) {
345
+ .button,
346
+ a.button {
347
+ margin: 0 auto;
348
+ }
349
+ }
350
+
351
+ .divider {
352
+ border: 1px solid #4c4c4c;
353
+ opacity: 0.2;
354
+ margin-bottom: 20px;
355
+ }
356
+ @media (max-width: 768px) {
357
+ .divider {
358
+ margin: 10px 0px;
359
+ display: none;
360
+ }
361
+ }
@@ -91,6 +91,17 @@ export class MyColorInfo {
91
91
  } }, h("div", { class: "boxes__box-content__info__header" }, !this.isMobile && h("img", { class: 'closebtn', onClick: this.onCloseButtonClick, src: getAssetPath(`./assets/${this.closeImage}`), alt: "closebtn" }), h("h2", null, this.capitalizeFirstLetter(this.currentColor.name)), !this.isMobile && h("h4", null, this.currentColor.number), 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)) && (h("a", { onClick: this.goToProduct, href: this.getHref(), class: `button ${this.getButtonClass()}` }, "wybierz kolor"))), h("div", { class: "boxes__box-content__info__value" }, h("div", { class: "divider" }), h("div", { class: "boxes__box-content__info__tester" }, ' ', h("div", { class: "divider" }), h("div", { class: "tester-text" }, h("h2", null, "Zam\u00F3w tester"), h("p", null, "Sprawd\u017A go na swojej \u015Bcianie.")), h("div", { class: "tester-buy" }, h("div", { class: "price" }, this.price ? `${this.price} zł` : ''), h("button", { class: `button fit ${this.getButtonClass()} ${!this.availableTesters ? 'disabled' : ''}`, onClick: this.handleAddToBasket, disabled: !this.availableTesters || this.buttonBlocked }, h("span", { class: "shape-icon", "aria-hidden": "true" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "15", height: "16", viewBox: "0 0 15 16" }, h("path", { class: "shape-icon__path", transform: "translate(0.0867462 0)", d: "M13.246571 12.763281L11.931726 4.961875C11.801879 4.1936703 11.13567 3.6319427 10.35657 3.63375L9.7429771 3.63375L9.7429771 3.1025C9.7429771 1.3890365 8.35394 0 6.6404767 0C4.9270134 0 3.537977 1.3890365 3.537977 3.1025L3.537977 3.63375L2.9217269 3.63375C2.1426277 3.6319427 1.4764187 4.1936703 1.3465706 4.961875L0.034383144 12.763281C-0.086738147 13.483807 0.11555123 14.221112 0.58740741 14.778946C1.0592636 15.336781 1.7528107 15.658594 2.4834456 15.658594L10.797508 15.658594C11.528143 15.658594 12.22169 15.336781 12.693546 14.778946C13.165402 14.221112 13.367692 13.483807 13.246571 12.763281L13.246571 12.763281ZM4.3348517 3.0892186C4.3348517 1.8158572 5.3671155 0.78359371 6.6404767 0.78359371C7.9138384 0.78359371 8.9461021 1.8158572 8.9461021 3.0892186L8.9461021 3.6204686L4.3348517 3.6204686L4.3348517 3.0892186ZM12.08579 14.264063C11.765244 14.643165 11.293964 14.86172 10.797508 14.86172L2.4834456 14.86172C1.9871488 14.862442 1.5158025 14.644215 1.195269 14.265309C0.87473541 13.886404 0.73765546 13.385406 0.82063317 12.896093L2.1248519 5.092031C2.1891608 4.703371 2.5278175 4.4200282 2.9217269 4.4252396L3.5353208 4.4252396L3.5353208 5.5834374C3.5353208 5.8034883 3.7137072 5.9818749 3.9337583 5.9818749C4.1538091 5.9818749 4.3321958 5.8034883 4.3321958 5.5834374L4.3321958 4.4252396L8.9461021 4.4252396L8.9461021 5.5834374C8.9461021 5.8034883 9.1244888 5.9818749 9.3445396 5.9818749C9.5645905 5.9818749 9.7429771 5.8034883 9.7429771 5.5834374L9.7429771 4.4252396L10.359227 4.4252396C10.753137 4.4200282 11.091793 4.703371 11.156102 5.092031L12.46032 12.896093C12.542204 13.384947 12.40527 13.885097 12.08579 14.264063L12.08579 14.264063Z" }))), this.buttonBlocked ? 'Dodano do koszyka…' : !this.availableTesters ? 'Tester obecnie niedostępny' : 'Dodaj do koszyka'))))), h("div", { class: "boxes__box-content__slider" }, this.renderSliderOrImage())));
92
92
  }
93
93
  static get is() { return "my-colorinfo"; }
94
+ static get encapsulation() { return "shadow"; }
95
+ static get originalStyleUrls() {
96
+ return {
97
+ "$": ["my-colorinfo.scss"]
98
+ };
99
+ }
100
+ static get styleUrls() {
101
+ return {
102
+ "$": ["my-colorinfo.css"]
103
+ };
104
+ }
94
105
  static get assetsDirs() { return ["assets"]; }
95
106
  static get properties() {
96
107
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"my-colorinfo.js","sourceRoot":"","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,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW;oBAChF,YACE,KAAK,EAAC,kBAAkB,EACxB,SAAS,EAAC,wBAAwB,EAClC,CAAC,EAAC,ynDAAynD,GAC3nD,CACE,CACD;gBAGN,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,4BAA4B,CAAC,CAAC,CAAC,kBAAkB,CAChH,CACL,CACF,CACF,CACF;MACN,WAAK,KAAK,EAAC,4BAA4B,IAAE,IAAI,CAAC,mBAAmB,EAAE,CAAO,CACtE,CACP,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h, getAssetPath, Event, EventEmitter } from '@stencil/core';\nimport { setDataLayer } from '../../gtmUtils';\nimport { AvailableTester, Color, Link, Product } from '../../types';\nimport { APIURL, accessToken } from '../api';\n\n@Component({\n tag: 'my-colorinfo',\n assetsDirs: ['assets'],\n})\nexport class MyColorInfo {\n @Prop() currentColor: Color;\n @Prop() shop: string;\n @Prop() product: string;\n @Prop() baselink: string;\n @Prop() availableTesters: AvailableTester | null;\n @Prop() price: number | null;\n @Prop() data: Product | null = null;\n @Prop() isMobile: boolean = false;\n @Prop() infoBoxWidth: number | null;\n @Prop() closeImage = 'close.png';\n @Prop() shapeImage = 'Shape.svg';\n @Prop() buttonBlocked = false;\n\n @Event() closeInfoBox: EventEmitter;\n @Event({ bubbles: true, composed: true }) addToBasket: EventEmitter<{ id: number }>;\n\n goToProduct = () => {\n this.currentColor &&\n setDataLayer({\n event: 'GoToProduct',\n shop: this.shop,\n product: this.product,\n color: this.currentColor?.name,\n });\n this.closeInfoBox.emit();\n };\n\n onCloseButtonClick = () => {\n this.closeInfoBox.emit();\n };\n\n renderSliderOrImage = () => {\n if (this.currentColor.imageInsteadHex) {\n return <img class={'color-big-image'} src={`${APIURL}/assets/${this.currentColor.bigImage}?access_token=${accessToken}`} alt=\"color-image\" />;\n } else {\n return <my-slider color={this.currentColor.name} shop={this.shop} product={this.product} slides={this.data?.images}></my-slider>;\n }\n };\n\n getHref = () => {\n if (this.baselink) {\n return `${this.baselink}/${this?.currentColor.links?.find((link: Link) => link?.shop === this.shop)?.path}`;\n } else {\n return this?.currentColor.links?.find((link: Link) => link?.shop === this.shop)?.path;\n }\n };\n\n capitalizeFirstLetter = (string: string) => {\n return string.charAt(0).toUpperCase() + string.slice(1).toLocaleLowerCase();\n };\n\n isVeryLightBackground = (): boolean => {\n if (this.currentColor.imageInsteadHex) return true;\n const hex = this.currentColor.hex?.replace('#', '') ?? '';\n if (hex.length !== 6 && hex.length !== 3) return false;\n const r = parseInt(hex.length === 3 ? hex[0] + hex[0] : hex.slice(0, 2), 16) / 255;\n const g = parseInt(hex.length === 3 ? hex[1] + hex[1] : hex.slice(2, 4), 16) / 255;\n const b = parseInt(hex.length === 3 ? hex[2] + hex[2] : hex.slice(4, 6), 16) / 255;\n const luminance = 0.299 * r + 0.587 * g + 0.114 * b;\n return luminance > 0.96; // only near-white: dark button; rest: white button\n };\n\n getButtonClass = () => {\n if (this.currentColor.imageInsteadHex) return 'brown';\n return this.isVeryLightBackground() ? 'inverse' : '';\n };\n\n handleAddToBasket = () => {\n if (!this.availableTesters?.id_product_attribute) return;\n this.buttonBlocked = true;\n this.addToBasket.emit({\n id: this.availableTesters.id_product_attribute,\n });\n\n setTimeout(() => {\n this.buttonBlocked = false;\n }, 10000);\n };\n\n render() {\n return (\n <div\n class={`boxes__box-content ${this.currentColor.textWhite ? 'boxes__box-content__white' : ''}`}\n style={{\n background: this.currentColor.imageInsteadHex ? 'white' : this.currentColor.hex,\n maxWidth: `${this.infoBoxWidth && this.infoBoxWidth - 4}px`,\n }}\n >\n {this.isMobile && <img class={'closebtn'} onClick={this.onCloseButtonClick} src={getAssetPath(`./assets/${this.closeImage}`)} alt=\"closebtn\" />}\n <div\n class=\"boxes__box-content__info\"\n style={{\n maxWidth: this.isMobile ? `${this.infoBoxWidth && this.infoBoxWidth - 35}px` : ``,\n }}\n >\n <div class=\"boxes__box-content__info__header\">\n {!this.isMobile && <img class={'closebtn'} onClick={this.onCloseButtonClick} src={getAssetPath(`./assets/${this.closeImage}`)} alt=\"closebtn\" />}\n <h2>{this.capitalizeFirstLetter(this.currentColor.name)}</h2>\n {!this.isMobile && <h4>{this.currentColor.number}</h4>}\n {this.currentColor && this.currentColor.links?.find((link: Link) => link?.shop === this.shop) && (\n <a onClick={this.goToProduct} href={this.getHref()} class={`button ${this.getButtonClass()}`}>\n wybierz kolor\n </a>\n )}\n </div>\n <div class=\"boxes__box-content__info__value\">\n <div class=\"divider\"></div>\n\n <div class=\"boxes__box-content__info__tester\">\n {' '}\n <div class=\"divider\"></div>\n <div class=\"tester-text\">\n <h2>Zamów tester</h2>\n <p>Sprawdź go na swojej ścianie.</p>\n </div>\n <div class=\"tester-buy\">\n <div class=\"price\">{this.price ? `${this.price} zł` : ''}</div>\n\n <button\n class={`button fit ${this.getButtonClass()} ${!this.availableTesters ? 'disabled' : ''}`}\n onClick={this.handleAddToBasket}\n disabled={!this.availableTesters || this.buttonBlocked}\n >\n <span class=\"shape-icon\" aria-hidden=\"true\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"15\" height=\"16\" viewBox=\"0 0 15 16\">\n <path\n class=\"shape-icon__path\"\n transform=\"translate(0.0867462 0)\"\n d=\"M13.246571 12.763281L11.931726 4.961875C11.801879 4.1936703 11.13567 3.6319427 10.35657 3.63375L9.7429771 3.63375L9.7429771 3.1025C9.7429771 1.3890365 8.35394 0 6.6404767 0C4.9270134 0 3.537977 1.3890365 3.537977 3.1025L3.537977 3.63375L2.9217269 3.63375C2.1426277 3.6319427 1.4764187 4.1936703 1.3465706 4.961875L0.034383144 12.763281C-0.086738147 13.483807 0.11555123 14.221112 0.58740741 14.778946C1.0592636 15.336781 1.7528107 15.658594 2.4834456 15.658594L10.797508 15.658594C11.528143 15.658594 12.22169 15.336781 12.693546 14.778946C13.165402 14.221112 13.367692 13.483807 13.246571 12.763281L13.246571 12.763281ZM4.3348517 3.0892186C4.3348517 1.8158572 5.3671155 0.78359371 6.6404767 0.78359371C7.9138384 0.78359371 8.9461021 1.8158572 8.9461021 3.0892186L8.9461021 3.6204686L4.3348517 3.6204686L4.3348517 3.0892186ZM12.08579 14.264063C11.765244 14.643165 11.293964 14.86172 10.797508 14.86172L2.4834456 14.86172C1.9871488 14.862442 1.5158025 14.644215 1.195269 14.265309C0.87473541 13.886404 0.73765546 13.385406 0.82063317 12.896093L2.1248519 5.092031C2.1891608 4.703371 2.5278175 4.4200282 2.9217269 4.4252396L3.5353208 4.4252396L3.5353208 5.5834374C3.5353208 5.8034883 3.7137072 5.9818749 3.9337583 5.9818749C4.1538091 5.9818749 4.3321958 5.8034883 4.3321958 5.5834374L4.3321958 4.4252396L8.9461021 4.4252396L8.9461021 5.5834374C8.9461021 5.8034883 9.1244888 5.9818749 9.3445396 5.9818749C9.5645905 5.9818749 9.7429771 5.8034883 9.7429771 5.5834374L9.7429771 4.4252396L10.359227 4.4252396C10.753137 4.4200282 11.091793 4.703371 11.156102 5.092031L12.46032 12.896093C12.542204 13.384947 12.40527 13.885097 12.08579 14.264063L12.08579 14.264063Z\"\n />\n </svg>\n </span>\n \n\n {this.buttonBlocked ? 'Dodano do koszyka…' : !this.availableTesters ? 'Tester obecnie niedostępny' : 'Dodaj do koszyka'}\n </button>\n </div>\n </div>\n </div>\n </div>\n <div class=\"boxes__box-content__slider\">{this.renderSliderOrImage()}</div>\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C,WAAK,KAAK,EAAC,4BAA4B,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW;oBAChF,YACE,KAAK,EAAC,kBAAkB,EACxB,SAAS,EAAC,wBAAwB,EAClC,CAAC,EAAC,ynDAAynD,GAC3nD,CACE,CACD;gBAGN,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,4BAA4B,CAAC,CAAC,CAAC,kBAAkB,CAChH,CACL,CACF,CACF,CACF;MACN,WAAK,KAAK,EAAC,4BAA4B,IAAE,IAAI,CAAC,mBAAmB,EAAE,CAAO,CACtE,CACP,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h, getAssetPath, Event, EventEmitter } from '@stencil/core';\nimport { setDataLayer } from '../../gtmUtils';\nimport { AvailableTester, Color, Link, Product } from '../../types';\nimport { APIURL, accessToken } from '../api';\n\n@Component({\n tag: 'my-colorinfo',\n styleUrl: 'my-colorinfo.scss',\n assetsDirs: ['assets'],\n shadow: true,\n})\nexport class MyColorInfo {\n @Prop() currentColor: Color;\n @Prop() shop: string;\n @Prop() product: string;\n @Prop() baselink: string;\n @Prop() availableTesters: AvailableTester | null;\n @Prop() price: number | null;\n @Prop() data: Product | null = null;\n @Prop() isMobile: boolean = false;\n @Prop() infoBoxWidth: number | null;\n @Prop() closeImage = 'close.png';\n @Prop() shapeImage = 'Shape.svg';\n @Prop() buttonBlocked = false;\n\n @Event({ bubbles: true, composed: true }) closeInfoBox: EventEmitter;\n @Event({ bubbles: true, composed: true }) addToBasket: EventEmitter<{ id: number }>;\n\n goToProduct = () => {\n this.currentColor &&\n setDataLayer({\n event: 'GoToProduct',\n shop: this.shop,\n product: this.product,\n color: this.currentColor?.name,\n });\n this.closeInfoBox.emit();\n };\n\n onCloseButtonClick = () => {\n this.closeInfoBox.emit();\n };\n\n renderSliderOrImage = () => {\n if (this.currentColor.imageInsteadHex) {\n return <img class={'color-big-image'} src={`${APIURL}/assets/${this.currentColor.bigImage}?access_token=${accessToken}`} alt=\"color-image\" />;\n } else {\n return <my-slider color={this.currentColor.name} shop={this.shop} product={this.product} slides={this.data?.images}></my-slider>;\n }\n };\n\n getHref = () => {\n if (this.baselink) {\n return `${this.baselink}/${this?.currentColor.links?.find((link: Link) => link?.shop === this.shop)?.path}`;\n } else {\n return this?.currentColor.links?.find((link: Link) => link?.shop === this.shop)?.path;\n }\n };\n\n capitalizeFirstLetter = (string: string) => {\n return string.charAt(0).toUpperCase() + string.slice(1).toLocaleLowerCase();\n };\n\n isVeryLightBackground = (): boolean => {\n if (this.currentColor.imageInsteadHex) return true;\n const hex = this.currentColor.hex?.replace('#', '') ?? '';\n if (hex.length !== 6 && hex.length !== 3) return false;\n const r = parseInt(hex.length === 3 ? hex[0] + hex[0] : hex.slice(0, 2), 16) / 255;\n const g = parseInt(hex.length === 3 ? hex[1] + hex[1] : hex.slice(2, 4), 16) / 255;\n const b = parseInt(hex.length === 3 ? hex[2] + hex[2] : hex.slice(4, 6), 16) / 255;\n const luminance = 0.299 * r + 0.587 * g + 0.114 * b;\n return luminance > 0.96; // only near-white: dark button; rest: white button\n };\n\n getButtonClass = () => {\n if (this.currentColor.imageInsteadHex) return 'brown';\n return this.isVeryLightBackground() ? 'inverse' : '';\n };\n\n handleAddToBasket = () => {\n if (!this.availableTesters?.id_product_attribute) return;\n this.buttonBlocked = true;\n this.addToBasket.emit({\n id: this.availableTesters.id_product_attribute,\n });\n\n setTimeout(() => {\n this.buttonBlocked = false;\n }, 10000);\n };\n\n render() {\n return (\n <div\n class={`boxes__box-content ${this.currentColor.textWhite ? 'boxes__box-content__white' : ''}`}\n style={{\n background: this.currentColor.imageInsteadHex ? 'white' : this.currentColor.hex,\n maxWidth: `${this.infoBoxWidth && this.infoBoxWidth - 4}px`,\n }}\n >\n {this.isMobile && <img class={'closebtn'} onClick={this.onCloseButtonClick} src={getAssetPath(`./assets/${this.closeImage}`)} alt=\"closebtn\" />}\n <div\n class=\"boxes__box-content__info\"\n style={{\n maxWidth: this.isMobile ? `${this.infoBoxWidth && this.infoBoxWidth - 35}px` : ``,\n }}\n >\n <div class=\"boxes__box-content__info__header\">\n {!this.isMobile && <img class={'closebtn'} onClick={this.onCloseButtonClick} src={getAssetPath(`./assets/${this.closeImage}`)} alt=\"closebtn\" />}\n <h2>{this.capitalizeFirstLetter(this.currentColor.name)}</h2>\n {!this.isMobile && <h4>{this.currentColor.number}</h4>}\n {this.currentColor && this.currentColor.links?.find((link: Link) => link?.shop === this.shop) && (\n <a onClick={this.goToProduct} href={this.getHref()} class={`button ${this.getButtonClass()}`}>\n wybierz kolor\n </a>\n )}\n </div>\n <div class=\"boxes__box-content__info__value\">\n <div class=\"divider\"></div>\n\n <div class=\"boxes__box-content__info__tester\">\n {' '}\n <div class=\"divider\"></div>\n <div class=\"tester-text\">\n <h2>Zamów tester</h2>\n <p>Sprawdź go na swojej ścianie.</p>\n </div>\n <div class=\"tester-buy\">\n <div class=\"price\">{this.price ? `${this.price} zł` : ''}</div>\n\n <button\n class={`button fit ${this.getButtonClass()} ${!this.availableTesters ? 'disabled' : ''}`}\n onClick={this.handleAddToBasket}\n disabled={!this.availableTesters || this.buttonBlocked}\n >\n <span class=\"shape-icon\" aria-hidden=\"true\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"15\" height=\"16\" viewBox=\"0 0 15 16\">\n <path\n class=\"shape-icon__path\"\n transform=\"translate(0.0867462 0)\"\n d=\"M13.246571 12.763281L11.931726 4.961875C11.801879 4.1936703 11.13567 3.6319427 10.35657 3.63375L9.7429771 3.63375L9.7429771 3.1025C9.7429771 1.3890365 8.35394 0 6.6404767 0C4.9270134 0 3.537977 1.3890365 3.537977 3.1025L3.537977 3.63375L2.9217269 3.63375C2.1426277 3.6319427 1.4764187 4.1936703 1.3465706 4.961875L0.034383144 12.763281C-0.086738147 13.483807 0.11555123 14.221112 0.58740741 14.778946C1.0592636 15.336781 1.7528107 15.658594 2.4834456 15.658594L10.797508 15.658594C11.528143 15.658594 12.22169 15.336781 12.693546 14.778946C13.165402 14.221112 13.367692 13.483807 13.246571 12.763281L13.246571 12.763281ZM4.3348517 3.0892186C4.3348517 1.8158572 5.3671155 0.78359371 6.6404767 0.78359371C7.9138384 0.78359371 8.9461021 1.8158572 8.9461021 3.0892186L8.9461021 3.6204686L4.3348517 3.6204686L4.3348517 3.0892186ZM12.08579 14.264063C11.765244 14.643165 11.293964 14.86172 10.797508 14.86172L2.4834456 14.86172C1.9871488 14.862442 1.5158025 14.644215 1.195269 14.265309C0.87473541 13.886404 0.73765546 13.385406 0.82063317 12.896093L2.1248519 5.092031C2.1891608 4.703371 2.5278175 4.4200282 2.9217269 4.4252396L3.5353208 4.4252396L3.5353208 5.5834374C3.5353208 5.8034883 3.7137072 5.9818749 3.9337583 5.9818749C4.1538091 5.9818749 4.3321958 5.8034883 4.3321958 5.5834374L4.3321958 4.4252396L8.9461021 4.4252396L8.9461021 5.5834374C8.9461021 5.8034883 9.1244888 5.9818749 9.3445396 5.9818749C9.5645905 5.9818749 9.7429771 5.8034883 9.7429771 5.5834374L9.7429771 4.4252396L10.359227 4.4252396C10.753137 4.4200282 11.091793 4.703371 11.156102 5.092031L12.46032 12.896093C12.542204 13.384947 12.40527 13.885097 12.08579 14.264063L12.08579 14.264063Z\"\n />\n </svg>\n </span>\n \n\n {this.buttonBlocked ? 'Dodano do koszyka…' : !this.availableTesters ? 'Tester obecnie niedostępny' : 'Dodaj do koszyka'}\n </button>\n </div>\n </div>\n </div>\n </div>\n <div class=\"boxes__box-content__slider\">{this.renderSliderOrImage()}</div>\n </div>\n );\n }\n}\n"]}
@@ -52,7 +52,7 @@ export class MyModalBundle {
52
52
  })(window, document, 'script', 'dataLayer', 'GTM-PMTKHDX');`)), h("div", { class: "pallete-wrapper" }, content), h("noscript", null, h("iframe", { src: "https://www.googletagmanager.com/ns.html?id=GTM-PMTKHDX", height: "0", width: "0", style: { display: 'none', visibility: 'hidden' } }))));
53
53
  }
54
54
  static get is() { return "my-component"; }
55
- static get encapsulation() { return "scoped"; }
55
+ static get encapsulation() { return "shadow"; }
56
56
  static get originalStyleUrls() {
57
57
  return {
58
58
  "$": ["my-component.scss"]
@@ -1 +1 @@
1
- {"version":3,"file":"my-component.js","sourceRoot":"","sources":["../../../src/components/my-component/my-component.tsx"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,eAAe,CAAC;AAOxG,MAAM,OAAO,aAAa;;;;;;;;gBAWR,KAAK;wBACG,KAAK;;EAG7B,KAAK,CAAC,IAAI;IACR,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;EACnB,CAAC;EAGD,KAAK,CAAC,KAAK;IACT,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;EACpB,CAAC;EAGD,sBAAsB,CAAC,KAAkB;IACvC,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC;EAC9C,CAAC;EAGD,iBAAiB;IACf,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;IAClB,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;EAC5B,CAAC;EAGD,kBAAkB,CAAC,KAAkC;IACnD,MAAM,EAAE,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il/helmet';\nimport { Component, Prop, Method, Element, State, Listen, Event, EventEmitter, h } from '@stencil/core';\n\n@Component({\n tag: 'my-component',\n styleUrl: 'my-component.scss',\n scoped: true,\n})\nexport class MyModalBundle {\n @Element() modalEl: HTMLElement;\n\n @Prop() shop: string;\n @Prop() product: string;\n @Prop() baselink: string;\n @Prop() colorname: string | null;\n @Prop() available_testers: string | null;\n @Prop() price: number | null;\n @Event({ bubbles: true, composed: true }) addToBasket: EventEmitter<{ id: number }>;\n\n @State() show = false;\n @State() readyToClose = false;\n\n @Method()\n async open() {\n this.show = true;\n }\n\n @Method()\n async close() {\n this.show = false;\n }\n\n @Listen('readyToCLose')\n setReadyToCloseHandler(value: CustomEvent) {\n this.readyToClose = value.detail.observable;\n }\n\n @Listen('close')\n closeModalHandler() {\n this.show = false;\n this.readyToClose = false;\n }\n\n @Listen('addToBasket')\n addToBasketHandler(event: CustomEvent<{ id: number }>) {\n const { id } = event.detail;\n\n return id;\n }\n\n render() {\n let content = null;\n if (this.show) {\n content = [\n <my-backdrop></my-backdrop>,\n <my-modal\n shop={this.shop}\n product={this.product}\n baselink={this.baselink}\n selectedcolor={this.colorname}\n available_testers={this.available_testers ? JSON.parse(this.available_testers) : null}\n price={this.price}\n ></my-modal>,\n ];\n }\n return (\n <div\n onClick={() => {\n if (this.readyToClose) {\n this.closeModalHandler();\n }\n }}\n >\n <Helmet>\n <script>\n {`(function (w, d, s, l, i) {\n w[l] = w[l] || [];\n w[l].push({ 'gtm.start': new Date().getTime(), 'event': 'gtm.js' });\n var f = d.getElementsByTagName(s)[0],\n j = d.createElement(s),\n dl = l != 'dataLayer' ? '&l=' + l : '';\n j.async = true;\n j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;\n f.parentNode.insertBefore(j, f);\n })(window, document, 'script', 'dataLayer', 'GTM-PMTKHDX');`}\n </script>\n </Helmet>\n <div class=\"pallete-wrapper\">{content}</div>\n <noscript>\n <iframe src=\"https://www.googletagmanager.com/ns.html?id=GTM-PMTKHDX\" height=\"0\" width=\"0\" style={{ display: 'none', visibility: 'hidden' }}></iframe>\n </noscript>\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"my-component.js","sourceRoot":"","sources":["../../../src/components/my-component/my-component.tsx"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,eAAe,CAAC;AAOxG,MAAM,OAAO,aAAa;;;;;;;;gBAWR,KAAK;wBACG,KAAK;;EAG7B,KAAK,CAAC,IAAI;IACR,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;EACnB,CAAC;EAGD,KAAK,CAAC,KAAK;IACT,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;EACpB,CAAC;EAGD,sBAAsB,CAAC,KAAkB;IACvC,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC;EAC9C,CAAC;EAGD,iBAAiB;IACf,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;IAClB,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;EAC5B,CAAC;EAGD,kBAAkB,CAAC,KAAkC;IACnD,MAAM,EAAE,EAAE,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC;IAE5B,OAAO,EAAE,CAAC;EACZ,CAAC;EAED,MAAM;IACJ,IAAI,OAAO,GAAG,IAAI,CAAC;IACnB,IAAI,IAAI,CAAC,IAAI,EAAE;MACb,OAAO,GAAG;QACR,sBAA2B;QAC3B,gBACE,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,aAAa,EAAE,IAAI,CAAC,SAAS,EAC7B,iBAAiB,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,IAAI,EACrF,KAAK,EAAE,IAAI,CAAC,KAAK,GACP;OACb,CAAC;KACH;IACD,OAAO,CACL,WACE,OAAO,EAAE,GAAG,EAAE;QACZ,IAAI,IAAI,CAAC,YAAY,EAAE;UACrB,IAAI,CAAC,iBAAiB,EAAE,CAAC;SAC1B;MACH,CAAC;MAED,EAAC,MAAM;QACL,kBACG;;;;;;;;;kEASqD,CAC/C,CACF;MACT,WAAK,KAAK,EAAC,iBAAiB,IAAE,OAAO,CAAO;MAC5C;QACE,cAAQ,GAAG,EAAC,yDAAyD,EAAC,MAAM,EAAC,GAAG,EAAC,KAAK,EAAC,GAAG,EAAC,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAW,CAC7I,CACP,CACP,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import Helmet from '@stencil/helmet';\nimport { Component, Prop, Method, Element, State, Listen, Event, EventEmitter, h } from '@stencil/core';\n\n@Component({\n tag: 'my-component',\n styleUrl: 'my-component.scss',\n shadow: true,\n})\nexport class MyModalBundle {\n @Element() modalEl: HTMLElement;\n\n @Prop() shop: string;\n @Prop() product: string;\n @Prop() baselink: string;\n @Prop() colorname: string | null;\n @Prop() available_testers: string | null;\n @Prop() price: number | null;\n @Event({ bubbles: true, composed: true }) addToBasket: EventEmitter<{ id: number }>;\n\n @State() show = false;\n @State() readyToClose = false;\n\n @Method()\n async open() {\n this.show = true;\n }\n\n @Method()\n async close() {\n this.show = false;\n }\n\n @Listen('readyToCLose')\n setReadyToCloseHandler(value: CustomEvent) {\n this.readyToClose = value.detail.observable;\n }\n\n @Listen('close')\n closeModalHandler() {\n this.show = false;\n this.readyToClose = false;\n }\n\n @Listen('addToBasket')\n addToBasketHandler(event: CustomEvent<{ id: number }>) {\n const { id } = event.detail;\n\n return id;\n }\n\n render() {\n let content = null;\n if (this.show) {\n content = [\n <my-backdrop></my-backdrop>,\n <my-modal\n shop={this.shop}\n product={this.product}\n baselink={this.baselink}\n selectedcolor={this.colorname}\n available_testers={this.available_testers ? JSON.parse(this.available_testers) : null}\n price={this.price}\n ></my-modal>,\n ];\n }\n return (\n <div\n onClick={() => {\n if (this.readyToClose) {\n this.closeModalHandler();\n }\n }}\n >\n <Helmet>\n <script>\n {`(function (w, d, s, l, i) {\n w[l] = w[l] || [];\n w[l].push({ 'gtm.start': new Date().getTime(), 'event': 'gtm.js' });\n var f = d.getElementsByTagName(s)[0],\n j = d.createElement(s),\n dl = l != 'dataLayer' ? '&l=' + l : '';\n j.async = true;\n j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;\n f.parentNode.insertBefore(j, f);\n })(window, document, 'script', 'dataLayer', 'GTM-PMTKHDX');`}\n </script>\n </Helmet>\n <div class=\"pallete-wrapper\">{content}</div>\n <noscript>\n <iframe src=\"https://www.googletagmanager.com/ns.html?id=GTM-PMTKHDX\" height=\"0\" width=\"0\" style={{ display: 'none', visibility: 'hidden' }}></iframe>\n </noscript>\n </div>\n );\n }\n}\n"]}
@@ -4,7 +4,7 @@ export class MyLoader {
4
4
  return (h("div", { class: "container" }, h("div", { class: "item" }), h("div", { class: "item" }), h("div", { class: "item" }), h("div", { class: "item" }), h("div", { class: "item" })));
5
5
  }
6
6
  static get is() { return "my-loader"; }
7
- static get encapsulation() { return "scoped"; }
7
+ static get encapsulation() { return "shadow"; }
8
8
  static get originalStyleUrls() {
9
9
  return {
10
10
  "$": ["my-loader.scss"]
@@ -1 +1 @@
1
- {"version":3,"file":"my-loader.js","sourceRoot":"","sources":["../../../src/components/my-loader/my-loader.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAO7C,MAAM,OAAO,QAAQ;EACnB,MAAM;IACJ,OAAO,CACL,WAAK,KAAK,EAAC,WAAW;MACpB,WAAK,KAAK,EAAC,MAAM,GAAO;MACxB,WAAK,KAAK,EAAC,MAAM,GAAO;MACxB,WAAK,KAAK,EAAC,MAAM,GAAO;MACxB,WAAK,KAAK,EAAC,MAAM,GAAO;MACxB,WAAK,KAAK,EAAC,MAAM,GAAO,CACpB,CACP,CAAC;EACJ,CAAC;;;;;;;;;CACF","sourcesContent":["import { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'my-loader',\n styleUrl: 'my-loader.scss',\n scoped: true,\n})\nexport class MyLoader {\n render() {\n return (\n <div class=\"container\">\n <div class=\"item\"></div>\n <div class=\"item\"></div>\n <div class=\"item\"></div>\n <div class=\"item\"></div>\n <div class=\"item\"></div>\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"my-loader.js","sourceRoot":"","sources":["../../../src/components/my-loader/my-loader.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAO7C,MAAM,OAAO,QAAQ;EACnB,MAAM;IACJ,OAAO,CACL,WAAK,KAAK,EAAC,WAAW;MACpB,WAAK,KAAK,EAAC,MAAM,GAAO;MACxB,WAAK,KAAK,EAAC,MAAM,GAAO;MACxB,WAAK,KAAK,EAAC,MAAM,GAAO;MACxB,WAAK,KAAK,EAAC,MAAM,GAAO;MACxB,WAAK,KAAK,EAAC,MAAM,GAAO,CACpB,CACP,CAAC;EACJ,CAAC;;;;;;;;;CACF","sourcesContent":["import { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'my-loader',\n styleUrl: 'my-loader.scss',\n shadow: true,\n})\nexport class MyLoader {\n render() {\n return (\n <div class=\"container\">\n <div class=\"item\"></div>\n <div class=\"item\"></div>\n <div class=\"item\"></div>\n <div class=\"item\"></div>\n <div class=\"item\"></div>\n </div>\n );\n }\n}\n"]}