@ppg_pl/tinting 0.0.0

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 (197) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +81 -0
  3. package/dist/cjs/index-0a139db0.js +1667 -0
  4. package/dist/cjs/index-0a139db0.js.map +1 -0
  5. package/dist/cjs/index.cjs.js +4 -0
  6. package/dist/cjs/index.cjs.js.map +1 -0
  7. package/dist/cjs/loader.cjs.js +24 -0
  8. package/dist/cjs/loader.cjs.js.map +1 -0
  9. package/dist/cjs/modal-header_10.cjs.entry.js +12313 -0
  10. package/dist/cjs/modal-header_10.cjs.entry.js.map +1 -0
  11. package/dist/cjs/tinting.cjs.js +28 -0
  12. package/dist/cjs/tinting.cjs.js.map +1 -0
  13. package/dist/collection/collection-manifest.json +21 -0
  14. package/dist/collection/components/api/index.js +23 -0
  15. package/dist/collection/components/api/index.js.map +1 -0
  16. package/dist/collection/components/api/services.js +96 -0
  17. package/dist/collection/components/api/services.js.map +1 -0
  18. package/dist/collection/components/backdrop/index.css +14 -0
  19. package/dist/collection/components/backdrop/index.js +17 -0
  20. package/dist/collection/components/backdrop/index.js.map +1 -0
  21. package/dist/collection/components/colorbox/index.css +53 -0
  22. package/dist/collection/components/colorbox/index.js +182 -0
  23. package/dist/collection/components/colorbox/index.js.map +1 -0
  24. package/dist/collection/components/colorinfo/index.js +239 -0
  25. package/dist/collection/components/colorinfo/index.js.map +1 -0
  26. package/dist/collection/components/component/index.css +6 -0
  27. package/dist/collection/components/component/index.js +220 -0
  28. package/dist/collection/components/component/index.js.map +1 -0
  29. package/dist/collection/components/header/assets/close.png +0 -0
  30. package/dist/collection/components/header/index.css +180 -0
  31. package/dist/collection/components/header/index.js +334 -0
  32. package/dist/collection/components/header/index.js.map +1 -0
  33. package/dist/collection/components/loader/index.css +85 -0
  34. package/dist/collection/components/loader/index.js +19 -0
  35. package/dist/collection/components/loader/index.js.map +1 -0
  36. package/dist/collection/components/modal/__mocks__/index.js +759 -0
  37. package/dist/collection/components/modal/__mocks__/index.js.map +1 -0
  38. package/dist/collection/components/modal/assets/arrow_down.png +0 -0
  39. package/dist/collection/components/modal/index.css +386 -0
  40. package/dist/collection/components/modal/index.js +646 -0
  41. package/dist/collection/components/modal/index.js.map +1 -0
  42. package/dist/collection/components/search/assets/search.svg +15 -0
  43. package/dist/collection/components/search/index.css +38 -0
  44. package/dist/collection/components/search/index.js +178 -0
  45. package/dist/collection/components/search/index.js.map +1 -0
  46. package/dist/collection/components/select/assets/chevron-down.webp +0 -0
  47. package/dist/collection/components/select/assets/chevron.png +0 -0
  48. package/dist/collection/components/select/index.css +77 -0
  49. package/dist/collection/components/select/index.js +231 -0
  50. package/dist/collection/components/select/index.js.map +1 -0
  51. package/dist/collection/components/slider/index.css +89 -0
  52. package/dist/collection/components/slider/index.js +145 -0
  53. package/dist/collection/components/slider/index.js.map +1 -0
  54. package/dist/collection/gtmUtils.js +4 -0
  55. package/dist/collection/gtmUtils.js.map +1 -0
  56. package/dist/collection/index.js +2 -0
  57. package/dist/collection/index.js.map +1 -0
  58. package/dist/collection/types.js +2 -0
  59. package/dist/collection/types.js.map +1 -0
  60. package/dist/collection/utils/index.js +12 -0
  61. package/dist/collection/utils/index.js.map +1 -0
  62. package/dist/components/gtmUtils.js +7 -0
  63. package/dist/components/gtmUtils.js.map +1 -0
  64. package/dist/components/index.d.ts +27 -0
  65. package/dist/components/index.js +3 -0
  66. package/dist/components/index.js.map +1 -0
  67. package/dist/components/index10.js +31 -0
  68. package/dist/components/index10.js.map +1 -0
  69. package/dist/components/index11.js +3949 -0
  70. package/dist/components/index11.js.map +1 -0
  71. package/dist/components/index2.js +2726 -0
  72. package/dist/components/index2.js.map +1 -0
  73. package/dist/components/index3.js +87 -0
  74. package/dist/components/index3.js.map +1 -0
  75. package/dist/components/index4.js +121 -0
  76. package/dist/components/index4.js.map +1 -0
  77. package/dist/components/index5.js +26 -0
  78. package/dist/components/index5.js.map +1 -0
  79. package/dist/components/index6.js +31 -0
  80. package/dist/components/index6.js.map +1 -0
  81. package/dist/components/index7.js +75 -0
  82. package/dist/components/index7.js.map +1 -0
  83. package/dist/components/index8.js +87 -0
  84. package/dist/components/index8.js.map +1 -0
  85. package/dist/components/index9.js +5306 -0
  86. package/dist/components/index9.js.map +1 -0
  87. package/dist/components/modal-header.d.ts +11 -0
  88. package/dist/components/modal-header.js +8 -0
  89. package/dist/components/modal-header.js.map +1 -0
  90. package/dist/components/my-backdrop.d.ts +11 -0
  91. package/dist/components/my-backdrop.js +8 -0
  92. package/dist/components/my-backdrop.js.map +1 -0
  93. package/dist/components/my-colorbox.d.ts +11 -0
  94. package/dist/components/my-colorbox.js +8 -0
  95. package/dist/components/my-colorbox.js.map +1 -0
  96. package/dist/components/my-colorinfo.d.ts +11 -0
  97. package/dist/components/my-colorinfo.js +8 -0
  98. package/dist/components/my-colorinfo.js.map +1 -0
  99. package/dist/components/my-component.d.ts +11 -0
  100. package/dist/components/my-component.js +254 -0
  101. package/dist/components/my-component.js.map +1 -0
  102. package/dist/components/my-loader.d.ts +11 -0
  103. package/dist/components/my-loader.js +8 -0
  104. package/dist/components/my-loader.js.map +1 -0
  105. package/dist/components/my-modal.d.ts +11 -0
  106. package/dist/components/my-modal.js +8 -0
  107. package/dist/components/my-modal.js.map +1 -0
  108. package/dist/components/my-search.d.ts +11 -0
  109. package/dist/components/my-search.js +8 -0
  110. package/dist/components/my-search.js.map +1 -0
  111. package/dist/components/my-select.d.ts +11 -0
  112. package/dist/components/my-select.js +8 -0
  113. package/dist/components/my-select.js.map +1 -0
  114. package/dist/components/my-slider.d.ts +11 -0
  115. package/dist/components/my-slider.js +8 -0
  116. package/dist/components/my-slider.js.map +1 -0
  117. package/dist/esm/index-f3be6531.js +1638 -0
  118. package/dist/esm/index-f3be6531.js.map +1 -0
  119. package/dist/esm/index.js +3 -0
  120. package/dist/esm/index.js.map +1 -0
  121. package/dist/esm/loader.js +20 -0
  122. package/dist/esm/loader.js.map +1 -0
  123. package/dist/esm/modal-header_10.entry.js +12300 -0
  124. package/dist/esm/modal-header_10.entry.js.map +1 -0
  125. package/dist/esm/polyfills/core-js.js +11 -0
  126. package/dist/esm/polyfills/css-shim.js +1 -0
  127. package/dist/esm/polyfills/dom.js +79 -0
  128. package/dist/esm/polyfills/es5-html-element.js +1 -0
  129. package/dist/esm/polyfills/index.js +34 -0
  130. package/dist/esm/polyfills/system.js +6 -0
  131. package/dist/esm/tinting.js +23 -0
  132. package/dist/esm/tinting.js.map +1 -0
  133. package/dist/index.cjs.js +1 -0
  134. package/dist/index.js +1 -0
  135. package/dist/tinting/assets/arrow_down.png +0 -0
  136. package/dist/tinting/assets/chevron-down.webp +0 -0
  137. package/dist/tinting/assets/chevron.png +0 -0
  138. package/dist/tinting/assets/close.png +0 -0
  139. package/dist/tinting/assets/search.svg +15 -0
  140. package/dist/tinting/index.esm.js +2 -0
  141. package/dist/tinting/index.esm.js.map +1 -0
  142. package/dist/tinting/p-06cd865b.entry.js +15 -0
  143. package/dist/tinting/p-06cd865b.entry.js.map +1 -0
  144. package/dist/tinting/p-b135c76f.js +3 -0
  145. package/dist/tinting/p-b135c76f.js.map +1 -0
  146. package/dist/tinting/tinting.css +1 -0
  147. package/dist/tinting/tinting.esm.js +2 -0
  148. package/dist/tinting/tinting.esm.js.map +1 -0
  149. package/dist/types/components/api/index.d.ts +7 -0
  150. package/dist/types/components/api/services.d.ts +9 -0
  151. package/dist/types/components/backdrop/index.d.ts +3 -0
  152. package/dist/types/components/colorbox/index.d.ts +15 -0
  153. package/dist/types/components/colorinfo/index.d.ts +19 -0
  154. package/dist/types/components/component/index.d.ts +18 -0
  155. package/dist/types/components/header/index.d.ts +35 -0
  156. package/dist/types/components/loader/index.d.ts +3 -0
  157. package/dist/types/components/modal/__mocks__/index.d.ts +415 -0
  158. package/dist/types/components/modal/index.d.ts +77 -0
  159. package/dist/types/components/search/index.d.ts +15 -0
  160. package/dist/types/components/select/index.d.ts +31 -0
  161. package/dist/types/components/slider/index.d.ts +15 -0
  162. package/dist/types/components.d.ts +289 -0
  163. package/dist/types/gtmUtils.d.ts +1 -0
  164. package/dist/types/index.d.ts +1 -0
  165. package/dist/types/stencil-public-runtime.d.ts +1637 -0
  166. package/dist/types/types.d.ts +68 -0
  167. package/dist/types/utils/index.d.ts +1 -0
  168. package/loader/cdn.js +3 -0
  169. package/loader/index.cjs.js +3 -0
  170. package/loader/index.d.ts +21 -0
  171. package/loader/index.es2017.js +3 -0
  172. package/loader/index.js +4 -0
  173. package/loader/package.json +11 -0
  174. package/package.json +69 -0
  175. package/www/build/assets/arrow_down.png +0 -0
  176. package/www/build/assets/chevron-down.webp +0 -0
  177. package/www/build/assets/chevron.png +0 -0
  178. package/www/build/assets/close.png +0 -0
  179. package/www/build/assets/fonts/Galatea-Regular.eot +0 -0
  180. package/www/build/assets/fonts/Galatea-Regular.ttf +0 -0
  181. package/www/build/assets/fonts/Galatea-Regular.woff +0 -0
  182. package/www/build/assets/fonts/Galatea-Regular.woff2 +0 -0
  183. package/www/build/assets/search.svg +15 -0
  184. package/www/build/index.esm.js +2 -0
  185. package/www/build/index.esm.js.map +1 -0
  186. package/www/build/p-06cd865b.entry.js +15 -0
  187. package/www/build/p-06cd865b.entry.js.map +1 -0
  188. package/www/build/p-a4907f5e.css +4 -0
  189. package/www/build/p-b135c76f.js +3 -0
  190. package/www/build/p-b135c76f.js.map +1 -0
  191. package/www/build/p-e2322b6c.js +163 -0
  192. package/www/build/tinting.css +1 -0
  193. package/www/build/tinting.esm.js +2 -0
  194. package/www/build/tinting.esm.js.map +1 -0
  195. package/www/build/tinting.js +33 -0
  196. package/www/host.config.json +15 -0
  197. package/www/index.html +31 -0
@@ -0,0 +1,163 @@
1
+ import { B as BUILD, c as consoleDevInfo, p as plt, w as win, H, d as doc, N as NAMESPACE, a as promiseResolve, b as bootstrapLazy } from './index-68de629a.js';
2
+ export { s as setNonce } from './index-68de629a.js';
3
+ import { g as globalScripts } from './app-globals-0f993ce5.js';
4
+
5
+ /*
6
+ Stencil Client Patch Browser v3.1.0 | MIT Licensed | https://stenciljs.com
7
+ */
8
+ /**
9
+ * Helper method for querying a `meta` tag that contains a nonce value
10
+ * out of a DOM's head.
11
+ *
12
+ * @param doc The DOM containing the `head` to query against
13
+ * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag
14
+ * exists or the tag has no content.
15
+ */
16
+ function queryNonceMetaTagContent(doc) {
17
+ var _a, _b, _c;
18
+ return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;
19
+ }
20
+ // TODO(STENCIL-661): Remove code related to the dynamic import shim
21
+ const getDynamicImportFunction = (namespace) => `__sc_import_${namespace.replace(/\s|-/g, '_')}`;
22
+ const patchBrowser = () => {
23
+ // NOTE!! This fn cannot use async/await!
24
+ if (BUILD.isDev && !BUILD.isTesting) {
25
+ consoleDevInfo('Running in development mode.');
26
+ }
27
+ // TODO(STENCIL-659): Remove code implementing the CSS variable shim
28
+ if (BUILD.cssVarShim) {
29
+ // shim css vars
30
+ // TODO(STENCIL-659): Remove code implementing the CSS variable shim
31
+ plt.$cssShim$ = win.__cssshim;
32
+ }
33
+ if (BUILD.cloneNodeFix) {
34
+ // opted-in to polyfill cloneNode() for slot polyfilled components
35
+ patchCloneNodeFix(H.prototype);
36
+ }
37
+ if (BUILD.profile && !performance.mark) {
38
+ // not all browsers support performance.mark/measure (Safari 10)
39
+ // because the mark/measure APIs are designed to write entries to a buffer in the browser that does not exist,
40
+ // simply stub the implementations out.
41
+ // TODO(STENCIL-323): Remove this patch when support for older browsers is removed (breaking)
42
+ // @ts-ignore
43
+ performance.mark = performance.measure = () => {
44
+ /*noop*/
45
+ };
46
+ performance.getEntriesByName = () => [];
47
+ }
48
+ // @ts-ignore
49
+ const scriptElm =
50
+ // TODO(STENCIL-661): Remove code related to the dynamic import shim
51
+ // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.
52
+ BUILD.scriptDataOpts || BUILD.safari10 || BUILD.dynamicImportShim
53
+ ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\/${NAMESPACE}(\\.esm)?\\.js($|\\?|#)`).test(s.src) ||
54
+ s.getAttribute('data-stencil-namespace') === NAMESPACE)
55
+ : null;
56
+ const importMeta = import.meta.url;
57
+ const opts = BUILD.scriptDataOpts ? (scriptElm || {})['data-opts'] || {} : {};
58
+ // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.
59
+ if (BUILD.safari10 && 'onbeforeload' in scriptElm && !history.scrollRestoration /* IS_ESM_BUILD */) {
60
+ // Safari < v11 support: This IF is true if it's Safari below v11.
61
+ // This fn cannot use async/await since Safari didn't support it until v11,
62
+ // however, Safari 10 did support modules. Safari 10 also didn't support "nomodule",
63
+ // so both the ESM file and nomodule file would get downloaded. Only Safari
64
+ // has 'onbeforeload' in the script, and "history.scrollRestoration" was added
65
+ // to Safari in v11. Return a noop then() so the async/await ESM code doesn't continue.
66
+ // IS_ESM_BUILD is replaced at build time so this check doesn't happen in systemjs builds.
67
+ return {
68
+ then() {
69
+ /* promise noop */
70
+ },
71
+ };
72
+ }
73
+ // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.
74
+ if (!BUILD.safari10 && importMeta !== '') {
75
+ opts.resourcesUrl = new URL('.', importMeta).href;
76
+ // TODO(STENCIL-661): Remove code related to the dynamic import shim
77
+ // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.
78
+ }
79
+ else if (BUILD.dynamicImportShim || BUILD.safari10) {
80
+ opts.resourcesUrl = new URL('.', new URL(scriptElm.getAttribute('data-resources-url') || scriptElm.src, win.location.href)).href;
81
+ // TODO(STENCIL-661): Remove code related to the dynamic import shim
82
+ if (BUILD.dynamicImportShim) {
83
+ patchDynamicImport(opts.resourcesUrl, scriptElm);
84
+ }
85
+ // TODO(STENCIL-661): Remove code related to the dynamic import shim
86
+ if (BUILD.dynamicImportShim && !win.customElements) {
87
+ // module support, but no custom elements support (Old Edge)
88
+ // @ts-ignore
89
+ return import(/* webpackChunkName: "polyfills-dom" */ './dom-423bdd70.js').then(() => opts);
90
+ }
91
+ }
92
+ return promiseResolve(opts);
93
+ };
94
+ // TODO(STENCIL-661): Remove code related to the dynamic import shim
95
+ const patchDynamicImport = (base, orgScriptElm) => {
96
+ const importFunctionName = getDynamicImportFunction(NAMESPACE);
97
+ try {
98
+ // test if this browser supports dynamic imports
99
+ // There is a caching issue in V8, that breaks using import() in Function
100
+ // By generating a random string, we can workaround it
101
+ // Check https://bugs.chromium.org/p/chromium/issues/detail?id=990810 for more info
102
+ win[importFunctionName] = new Function('w', `return import(w);//${Math.random()}`);
103
+ }
104
+ catch (e) {
105
+ // this shim is specifically for browsers that do support "esm" imports
106
+ // however, they do NOT support "dynamic" imports
107
+ // basically this code is for old Edge, v18 and below
108
+ const moduleMap = new Map();
109
+ win[importFunctionName] = (src) => {
110
+ var _a;
111
+ const url = new URL(src, base).href;
112
+ let mod = moduleMap.get(url);
113
+ if (!mod) {
114
+ const script = doc.createElement('script');
115
+ script.type = 'module';
116
+ script.crossOrigin = orgScriptElm.crossOrigin;
117
+ script.src = URL.createObjectURL(new Blob([`import * as m from '${url}'; window.${importFunctionName}.m = m;`], {
118
+ type: 'application/javascript',
119
+ }));
120
+ // Apply CSP nonce to the script tag if it exists
121
+ const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
122
+ if (nonce != null) {
123
+ script.setAttribute('nonce', nonce);
124
+ }
125
+ mod = new Promise((resolve) => {
126
+ script.onload = () => {
127
+ resolve(win[importFunctionName].m);
128
+ script.remove();
129
+ };
130
+ });
131
+ moduleMap.set(url, mod);
132
+ doc.head.appendChild(script);
133
+ }
134
+ return mod;
135
+ };
136
+ }
137
+ };
138
+ const patchCloneNodeFix = (HTMLElementPrototype) => {
139
+ const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;
140
+ HTMLElementPrototype.cloneNode = function (deep) {
141
+ if (this.nodeName === 'TEMPLATE') {
142
+ return nativeCloneNodeFn.call(this, deep);
143
+ }
144
+ const clonedNode = nativeCloneNodeFn.call(this, false);
145
+ const srcChildNodes = this.childNodes;
146
+ if (deep) {
147
+ for (let i = 0; i < srcChildNodes.length; i++) {
148
+ // Node.ATTRIBUTE_NODE === 2, and checking because IE11
149
+ if (srcChildNodes[i].nodeType !== 2) {
150
+ clonedNode.appendChild(srcChildNodes[i].cloneNode(true));
151
+ }
152
+ }
153
+ }
154
+ return clonedNode;
155
+ };
156
+ };
157
+
158
+ patchBrowser().then(options => {
159
+ globalScripts();
160
+ return bootstrapLazy([["modal-header",[[0,"modal-header",{"modalName":[1,"modal-name"],"modalLogo":[1,"modal-logo"],"modalDescription":[1,"modal-description"],"selectedColorFamily":[1,"selected-color-family"],"shop":[1],"productName":[1,"product-name"],"isMobile":[4,"is-mobile"],"closeImage":[1,"close-image"],"productSamples":[16],"colorFamilies":[32]}]]],["my-modal",[[0,"my-modal",{"shop":[1],"product":[1],"baselink":[1],"selectedcolor":[1],"arrowDown":[1,"arrow-down"],"chunksNum":[32],"data":[32],"preloader":[32],"loading":[32],"currentColor":[32],"currentIndex":[32],"infoBoxWidth":[32],"boxWidth":[32],"padding":[32],"isMobile":[32],"showRange":[32],"colorCategories":[32],"selectedCategory":[32],"page":[32],"colorIsSelected":[32],"colorsList":[32],"hasMore":[32],"filters":[32],"open":[64]},[[0,"closeInfoBox","closeInfoBoxHandler"],[0,"onCurrentColor","handleEmitColor"],[9,"resize","handleResize"],[0,"colorFamilySelected","handleColorFamilySelected"],[0,"searchColors","searchColorsHandler"]]]]],["my-backdrop",[[0,"my-backdrop"]]],["my-colorinfo",[[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"]}]]],["my-colorbox",[[0,"my-colorbox",{"color":[1],"name":[1],"shop":[1],"product":[1],"isActive":[4,"is-active"],"isCategoryActive":[4,"is-category-active"],"isImageInsteadHex":[16]}]]],["my-loader",[[2,"my-loader"]]],["my-search",[[2,"my-search",{"productname":[1],"shopname":[1],"isMobile":[4,"is-mobile"],"searchIcon":[1,"search-icon"],"searchText":[32]},[[4,"clearSearchText","clearSearchTextHandler"]]]]],["my-select",[[2,"my-select",{"options":[16],"placeholder":[1],"isMobile":[4,"is-mobile"],"searchIcon":[1,"search-icon"],"searchText":[32],"filteredOptions":[32],"showDropdown":[32],"selectedValue":[32]},[[4,"clearSearchText","clearSearchTextHandler"]]]]],["my-slider",[[0,"my-slider",{"slides":[16],"shop":[1],"product":[1],"color":[1]}]]],["my-component",[[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,"onSelectedColorEmit","handleSelectedColor"]]]]]], options);
161
+ });
162
+
163
+ //# sourceMappingURL=tinting.esm.js.map
@@ -0,0 +1 @@
1
+ @import url("https://fonts.googleapis.com/css2?family=Figtree:ital,wght@0,300..900;1,300..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap"); .tinting-wrapper *{font-family:"Poppins", sans-serif}
@@ -0,0 +1,2 @@
1
+ import{p as e,b as o}from"./p-b135c76f.js";export{s as setNonce}from"./p-b135c76f.js";const l=()=>{const o=import.meta.url;const l={};if(o!==""){l.resourcesUrl=new URL(".",o).href}return e(l)};l().then((e=>o([["p-06cd865b",[[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,"onSelectedColorEmit","handleSelectedColor"]]],[0,"my-modal",{shop:[1],product:[1],baselink:[1],selectedcolor:[1],arrowDown:[1,"arrow-down"],chunksNum:[32],data:[32],preloader:[32],loading:[32],currentColor:[32],currentIndex:[32],infoBoxWidth:[32],boxWidth:[32],padding:[32],isMobile:[32],showRange:[32],colorCategories:[32],selectedCategory:[32],page:[32],colorIsSelected:[32],colorsList:[32],hasMore:[32],filters:[32],open:[64]},[[0,"closeInfoBox","closeInfoBoxHandler"],[0,"onCurrentColor","handleEmitColor"],[9,"resize","handleResize"],[0,"colorFamilySelected","handleColorFamilySelected"],[0,"searchColors","searchColorsHandler"]]],[0,"my-backdrop"],[0,"modal-header",{modalName:[1,"modal-name"],modalLogo:[1,"modal-logo"],modalDescription:[1,"modal-description"],selectedColorFamily:[1,"selected-color-family"],shop:[1],productName:[1,"product-name"],isMobile:[4,"is-mobile"],closeImage:[1,"close-image"],productSamples:[16],colorFamilies:[32]}],[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"]]],[2,"my-select",{options:[16],placeholder:[1],isMobile:[4,"is-mobile"],searchIcon:[1,"search-icon"],searchText:[32],filteredOptions:[32],showDropdown:[32],selectedValue:[32]},[[4,"clearSearchText","clearSearchTextHandler"]]],[0,"my-slider",{slides:[16],shop:[1],product:[1],color:[1]}]]]],e)));
2
+ //# sourceMappingURL=tinting.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["patchBrowser","importMeta","import","meta","url","opts","resourcesUrl","URL","href","promiseResolve","then","options","bootstrapLazy","shop","product","baselink","colorname","show","readyToClose","open","close","selectedcolor","arrowDown","chunksNum","data","preloader","loading","currentColor","currentIndex","infoBoxWidth","boxWidth","padding","isMobile","showRange","colorCategories","selectedCategory","page","colorIsSelected","colorsList","hasMore","filters","modalName","modalLogo","modalDescription","selectedColorFamily","productName","closeImage","productSamples","colorFamilies","color","name","isActive","isCategoryActive","isImageInsteadHex","productname","shopname","searchIcon","searchText","placeholder","filteredOptions","showDropdown","selectedValue","slides"],"sources":["./node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v3.1.0 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';\nimport { consoleDevInfo, plt, win, doc, promiseResolve, H } from '@stencil/core';\n/**\n * Helper method for querying a `meta` tag that contains a nonce value\n * out of a DOM's head.\n *\n * @param doc The DOM containing the `head` to query against\n * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag\n * exists or the tag has no content.\n */\nfunction queryNonceMetaTagContent(doc) {\n var _a, _b, _c;\n return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name=\"csp-nonce\"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;\n}\n// TODO(STENCIL-661): Remove code related to the dynamic import shim\nconst getDynamicImportFunction = (namespace) => `__sc_import_${namespace.replace(/\\s|-/g, '_')}`;\nconst patchBrowser = () => {\n // NOTE!! This fn cannot use async/await!\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo('Running in development mode.');\n }\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n if (BUILD.cssVarShim) {\n // shim css vars\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n plt.$cssShim$ = win.__cssshim;\n }\n if (BUILD.cloneNodeFix) {\n // opted-in to polyfill cloneNode() for slot polyfilled components\n patchCloneNodeFix(H.prototype);\n }\n if (BUILD.profile && !performance.mark) {\n // not all browsers support performance.mark/measure (Safari 10)\n // because the mark/measure APIs are designed to write entries to a buffer in the browser that does not exist,\n // simply stub the implementations out.\n // TODO(STENCIL-323): Remove this patch when support for older browsers is removed (breaking)\n // @ts-ignore\n performance.mark = performance.measure = () => {\n /*noop*/\n };\n performance.getEntriesByName = () => [];\n }\n // @ts-ignore\n const scriptElm = \n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n BUILD.scriptDataOpts || BUILD.safari10 || BUILD.dynamicImportShim\n ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\\/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) ||\n s.getAttribute('data-stencil-namespace') === NAMESPACE)\n : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})['data-opts'] || {} : {};\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n if (BUILD.safari10 && 'onbeforeload' in scriptElm && !history.scrollRestoration /* IS_ESM_BUILD */) {\n // Safari < v11 support: This IF is true if it's Safari below v11.\n // This fn cannot use async/await since Safari didn't support it until v11,\n // however, Safari 10 did support modules. Safari 10 also didn't support \"nomodule\",\n // so both the ESM file and nomodule file would get downloaded. Only Safari\n // has 'onbeforeload' in the script, and \"history.scrollRestoration\" was added\n // to Safari in v11. Return a noop then() so the async/await ESM code doesn't continue.\n // IS_ESM_BUILD is replaced at build time so this check doesn't happen in systemjs builds.\n return {\n then() {\n /* promise noop */\n },\n };\n }\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n if (!BUILD.safari10 && importMeta !== '') {\n opts.resourcesUrl = new URL('.', importMeta).href;\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n }\n else if (BUILD.dynamicImportShim || BUILD.safari10) {\n opts.resourcesUrl = new URL('.', new URL(scriptElm.getAttribute('data-resources-url') || scriptElm.src, win.location.href)).href;\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n if (BUILD.dynamicImportShim) {\n patchDynamicImport(opts.resourcesUrl, scriptElm);\n }\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n if (BUILD.dynamicImportShim && !win.customElements) {\n // module support, but no custom elements support (Old Edge)\n // @ts-ignore\n return import(/* webpackChunkName: \"polyfills-dom\" */ './dom.js').then(() => opts);\n }\n }\n return promiseResolve(opts);\n};\n// TODO(STENCIL-661): Remove code related to the dynamic import shim\nconst patchDynamicImport = (base, orgScriptElm) => {\n const importFunctionName = getDynamicImportFunction(NAMESPACE);\n try {\n // test if this browser supports dynamic imports\n // There is a caching issue in V8, that breaks using import() in Function\n // By generating a random string, we can workaround it\n // Check https://bugs.chromium.org/p/chromium/issues/detail?id=990810 for more info\n win[importFunctionName] = new Function('w', `return import(w);//${Math.random()}`);\n }\n catch (e) {\n // this shim is specifically for browsers that do support \"esm\" imports\n // however, they do NOT support \"dynamic\" imports\n // basically this code is for old Edge, v18 and below\n const moduleMap = new Map();\n win[importFunctionName] = (src) => {\n var _a;\n const url = new URL(src, base).href;\n let mod = moduleMap.get(url);\n if (!mod) {\n const script = doc.createElement('script');\n script.type = 'module';\n script.crossOrigin = orgScriptElm.crossOrigin;\n script.src = URL.createObjectURL(new Blob([`import * as m from '${url}'; window.${importFunctionName}.m = m;`], {\n type: 'application/javascript',\n }));\n // Apply CSP nonce to the script tag if it exists\n const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);\n if (nonce != null) {\n script.setAttribute('nonce', nonce);\n }\n mod = new Promise((resolve) => {\n script.onload = () => {\n resolve(win[importFunctionName].m);\n script.remove();\n };\n });\n moduleMap.set(url, mod);\n doc.head.appendChild(script);\n }\n return mod;\n };\n }\n};\nconst patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function (deep) {\n if (this.nodeName === 'TEMPLATE') {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n // Node.ATTRIBUTE_NODE === 2, and checking because IE11\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport { patchBrowser };\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(options => {\n globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":"sFAmBA,MAAMA,EAAe,KAkCjB,MAAMC,EAAaC,OAAOC,KAAKC,IAC/B,MAAMC,EAAqE,GAiB3E,GAAuBJ,IAAe,GAAI,CACtCI,EAAKC,aAAe,IAAIC,IAAI,IAAKN,GAAYO,IAGrD,CAcI,OAAOC,EAAeJ,EAAK,ECrF/BL,IAAeU,MAAKC,GAEXC,EAAc,kCAA8B,CAAAC,KAAS,IAAAC,QAAA,IAAAC,SAAA,IAAAC,UAAA,IAAAC,KAAA,KAAAC,aAAA,KAAAC,KAAA,KAAAC,MAAA,oJAAAP,KAAA,IAAAC,QAAA,IAAAC,SAAA,IAAAM,cAAA,IAAAC,UAAA,iBAAAC,UAAA,KAAAC,KAAA,KAAAC,UAAA,KAAAC,QAAA,KAAAC,aAAA,KAAAC,aAAA,KAAAC,aAAA,KAAAC,SAAA,KAAAC,QAAA,KAAAC,SAAA,KAAAC,UAAA,KAAAC,gBAAA,KAAAC,iBAAA,KAAAC,KAAA,KAAAC,gBAAA,KAAAC,WAAA,KAAAC,QAAA,KAAAC,QAAA,KAAArB,KAAA,yPAAAsB,UAAA,iBAAAC,UAAA,iBAAAC,iBAAA,wBAAAC,oBAAA,4BAAA/B,KAAA,IAAAgC,YAAA,mBAAAb,SAAA,gBAAAc,WAAA,kBAAAC,eAAA,KAAAC,cAAA,0BAAArB,aAAA,KAAAd,KAAA,IAAAC,QAAA,IAAAC,SAAA,IAAAS,KAAA,KAAAQ,SAAA,gBAAAH,aAAA,qBAAAiB,WAAA,sCAAAG,MAAA,IAAAC,KAAA,IAAArC,KAAA,IAAAC,QAAA,IAAAqC,SAAA,gBAAAC,iBAAA,yBAAAC,kBAAA,uCAAAC,YAAA,IAAAC,SAAA,IAAAvB,SAAA,gBAAAwB,WAAA,kBAAAC,WAAA,wEAAA9C,QAAA,KAAA+C,YAAA,IAAA1B,SAAA,gBAAAwB,WAAA,kBAAAC,WAAA,KAAAE,gBAAA,KAAAC,aAAA,KAAAC,cAAA,wEAAAC,OAAA,KAAAjD,KAAA,IAAAC,QAAA,IAAAmC,MAAA,SAAAtC"}
@@ -0,0 +1,33 @@
1
+
2
+ (function() {
3
+ function checkSupport() {
4
+ if (!document.body) {
5
+ setTimeout(checkSupport);
6
+ return;
7
+ }
8
+ function supportsDynamicImports() {
9
+ try {
10
+ new Function('import("")');
11
+ return true;
12
+ } catch (e) {}
13
+ return false;
14
+ }
15
+ var supportsEsModules = !!('noModule' in document.createElement('script'));
16
+
17
+ if (!supportsEsModules) {
18
+ document.body.innerHTML = '\n \n<style>\nbody {\n display: block !important;\n font-family: sans-serif;\n padding: 20px;\n line-height:22px;\n}\nh1 {\n font-size: 18px;\n}\nh2 {\n font-size: 14px;\n margin-top: 40px;\n}\n</style>\n\n\n <h1>This Stencil app is disabled for this browser.</h1>\n\n <h2>Developers:</h2>\n <ul>\n <li>ES5 builds are disabled <strong>during development</strong> to take advantage of 2x faster build times.</li>\n <li>Please see the example below or our <a href="https://stenciljs.com/docs/stencil-config" target="_blank" rel="noopener noreferrer">config docs</a> if you would like to develop on a browser that does not fully support ES2017 and custom elements.</li>\n <li>Note that as of Stencil v2, ES5 builds and polyfills are <strong>disabled</strong> during production builds. You can enable these <a href="https://stenciljs.com/docs/config#buildes5" target="_blank" rel="noopener noreferrer">in your stencil.config.ts file</a>.</li>\n <li>When testing browsers it is recommended to always test in production mode, and ES5 builds should always be enabled during production builds.</li>\n <li><em>This is only an experiment and if it slows down app development then we will revert this and enable ES5 builds during dev.</em></li>\n </ul>\n\n\n <h2>Enabling ES5 builds during development:</h2>\n <pre>\n <code>npm run dev --es5</code>\n </pre>\n <p>For stencil-component-starter, use:</p>\n <pre>\n <code>npm start --es5</code>\n </pre>\n\n\n <h2>Enabling full production builds during development:</h2>\n <pre>\n <code>npm run dev --prod</code>\n </pre>\n <p>For stencil-component-starter, use:</p>\n <pre>\n <code>npm start --prod</code>\n </pre>\n\n <h2>Current Browser\'s Support:</h2>\n <ul>\n <li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import">ES Module Imports</a>: <span id="es-modules-test"></span></li>\n <li><a href="http://2ality.com/2017/01/import-operator.html">ES Dynamic Imports</a>: <span id="es-dynamic-modules-test"></span></li>\n <li><a href="https://developer.mozilla.org/en-US/docs/Web/API/Window/customElements">Custom Elements</a>: <span id="custom-elements-test"></span></li>\n <li><a href="https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM">Shadow DOM</a>: <span id="shadow-dom-test"></span></li>\n <li><a href="https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API">fetch</a>: <span id="fetch-test"></span></li>\n <li><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_variables">CSS Variables</a>: <span id="css-variables-test"></span></li>\n </ul>\n\n <h2>Current Browser:</h2>\n <pre>\n <code id="current-browser-output"></code>\n </pre>\n';
19
+
20
+ document.getElementById('current-browser-output').textContent = window.navigator.userAgent;
21
+ document.getElementById('es-modules-test').textContent = supportsEsModules;
22
+ document.getElementById('es-dynamic-modules-test').textContent = supportsDynamicImports();
23
+ document.getElementById('shadow-dom-test').textContent = !!(document.head.attachShadow);
24
+ document.getElementById('custom-elements-test').textContent = !!(window.customElements);
25
+ document.getElementById('css-variables-test').textContent = !!(window.CSS && window.CSS.supports && window.CSS.supports('color', 'var(--c)'));
26
+ document.getElementById('fetch-test').textContent = !!(window.fetch);
27
+ } else {
28
+ document.body.innerHTML = '\n \n<style>\nbody {\n display: block !important;\n font-family: sans-serif;\n padding: 20px;\n line-height:22px;\n}\nh1 {\n font-size: 18px;\n}\nh2 {\n font-size: 14px;\n margin-top: 40px;\n}\n</style>\n\n\n <h1>Update src/index.html</h1>\n\n <p>Stencil recently changed how scripts are loaded in order to improve performance.</p>\n\n <h2>BEFORE:</h2>\n <p>Previously, a single script was included that handled loading the correct JavaScript based on browser support.</p>\n <pre>\n <code>&lt;script src=&quot;/build/tinting.js&quot;&gt;&lt;/script&gt;\n</code>\n </pre>\n\n <h2 style="margin-top:0">AFTER:</h2>\n <p>The index.html should now include two scripts using the modern ES Module script pattern.\n Note that only one file will actually be requested and loaded based on the browser\'s native support for ES Modules.\n For more info, please see <a href="https://developers.google.com/web/fundamentals/primers/modules#browser" target="_blank" rel="noopener noreferrer">Using JavaScript modules on the web</a>.\n </p>\n <pre>\n <code>&lt;script <span style="background:yellow">type="module"</span> src="/build/tinting<span style="background:yellow">.esm</span>.js"&gt;&lt;/script&gt;\n &lt;script <span style="background:yellow">nomodule</span> src=&quot;/build/tinting.js&quot;&gt;&lt;/script&gt;</code>\n </pre>\n';
29
+ }
30
+ }
31
+
32
+ setTimeout(checkSupport);
33
+ })();
@@ -0,0 +1,15 @@
1
+ {
2
+ "hosting": {
3
+ "headers": [
4
+ {
5
+ "source": "/build/p-*",
6
+ "headers": [
7
+ {
8
+ "key": "Cache-Control",
9
+ "value": "max-age=31556952, s-maxage=31556952, immutable"
10
+ }
11
+ ]
12
+ }
13
+ ]
14
+ }
15
+ }
package/www/index.html ADDED
@@ -0,0 +1,31 @@
1
+ <!doctype html><html dir="ltr" lang="pl"><head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Color Selector</title> <style type="text/css" media="screen, print">@font-face {
2
+ font-family: 'Galatea';
3
+ src: url(./assets/fonts/Galatea-Regular.woff2) format('woff2'), url(./assets/fonts/Galatea-Regular.woff) format('woff'),
4
+ url(./assets/fonts/Galatea-Regular.ttf) format('truetype'), url(./assets/fonts/Galatea-Regular.eot) format('embedded-opentype');
5
+ font-weight: 400;
6
+ font-style: normal;
7
+ }</style> <link rel="modulepreload" href="/build/p-e2322b6c.js"><script type="module" src="/build/p-e2322b6c.js" data-stencil data-resources-url="/build/" data-stencil-namespace="tinting"></script> <script nomodule="" src="/build/tinting.js" data-stencil></script> </head> <body> <!-- shop="DEKORAL" product="Dekoral Łazienka & Kuchnia" --> <my-component class="modal_tinting"></my-component> <label for="shop">Shop</label> <input name="shop" type="text" title="Shop"> <label for="product">Product</label> <input name="product" type="text" title="Product"> <label for="baselink">Base link</label> <input name="baselink" type="text" title="baselink"> <label for="colorname">Color name</label> <input name="colorname" type="text" title="colorname"> <button>open modal</button> <script>
8
+ const btn = document.querySelector('button');
9
+ const modal = document.querySelector('.modal_tinting');
10
+ const shop = document.querySelector('input[name="shop"]');
11
+ const product = document.querySelector('input[name="product"]');
12
+ const baselink = document.querySelector('input[name="baselink"]');
13
+ const colorname = document.querySelector('input[name="colorname"]');
14
+
15
+ btn.addEventListener('click', () => {
16
+ if (!shop.value && !product.value) {
17
+ alert('Podaj shop i product');
18
+ } else {
19
+ modal.setAttribute('shop', shop.value); //shop.value / VIVERTO
20
+ modal.setAttribute('product', product.value); //product.value / Dekoral Łazienka & Kuchnia
21
+ modal.setAttribute('baselink', baselink.value); //baseLink.value / https://www.dekoral.pl/produkty/dekoracje/dekoracje-do-lazienki-i-kuchni
22
+
23
+ modal.setAttribute('colorname', colorname.value); //colorName.value / 1201
24
+ modal.open();
25
+ }
26
+ });
27
+
28
+ modal.addEventListener('onSelectedColor', e => {
29
+ console.log('Color selected:', e.detail);
30
+ });
31
+ </script> </body></html>