hemfixarna-web-components 1.7.4 → 1.8.1
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.
- package/dist/cjs/hemfixarna-address_15.cjs.entry.js +117 -52
- package/dist/cjs/hemfixarna-address_15.cjs.entry.js.map +1 -1
- package/dist/cjs/hemfixarna-byggmax.cjs.entry.js +2 -2
- package/dist/cjs/hemfixarna-category.cjs.entry.js +2 -2
- package/dist/cjs/hemfixarna-components.cjs.js +2 -2
- package/dist/cjs/hemfixarna-components.cjs.js.map +1 -1
- package/dist/cjs/hemfixarna-doro.cjs.entry.js +2 -2
- package/dist/cjs/hemfixarna-elfa.cjs.entry.js +2 -2
- package/dist/cjs/hemfixarna-fargvaruhuset.cjs.entry.js +2 -2
- package/dist/cjs/hemfixarna-flyttsmart.cjs.entry.js +2 -2
- package/dist/cjs/hemfixarna-forebygg.cjs.entry.js +2 -2
- package/dist/cjs/hemfixarna-hornbach.cjs.entry.js +2 -2
- package/dist/cjs/hemfixarna-kbygg.cjs.entry.js +2 -2
- package/dist/cjs/hemfixarna-klint.cjs.entry.js +2 -2
- package/dist/cjs/hemfixarna-kund.cjs.entry.js +2 -2
- package/dist/cjs/hemfixarna-norrgavel.cjs.entry.js +2 -2
- package/dist/cjs/hemfixarna-power.cjs.entry.js +2 -2
- package/dist/cjs/hemfixarna-service.cjs.entry.js +2 -2
- package/dist/cjs/hemfixarna-skanska.cjs.entry.js +2 -2
- package/dist/cjs/hemfixarna-sparfonster.cjs.entry.js +2 -2
- package/dist/cjs/hemfixarna-string-furniture.cjs.entry.js +2 -2
- package/dist/cjs/hemfixarna-superfront.cjs.entry.js +2 -2
- package/dist/cjs/hemfixarna-tesla.cjs.entry.js +2 -2
- package/dist/cjs/hemfixarna-traningspartner.cjs.entry.js +2 -2
- package/dist/cjs/hemfixarna-zaptec.cjs.entry.js +2 -2
- package/dist/cjs/{index-6af772cf.js → index-3e8dcb29.js} +2 -2
- package/dist/cjs/{index-6af772cf.js.map → index-3e8dcb29.js.map} +1 -1
- package/dist/cjs/{index-8054ce93.js → index-739bf321.js} +3 -1
- package/dist/cjs/index-739bf321.js.map +1 -0
- package/dist/cjs/{index-b83343b9.js → index-e6926623.js} +74 -20
- package/dist/cjs/index-e6926623.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/hemfixarna-checkout/hemfixarna-checkout.js +16 -0
- package/dist/collection/components/hemfixarna-checkout/hemfixarna-checkout.js.map +1 -1
- package/dist/collection/components/hemfixarna-component/hemfixarna-component.js +11 -1
- package/dist/collection/components/hemfixarna-component/hemfixarna-component.js.map +1 -1
- package/dist/collection/components/hemfixarna-component/hemfixarna.css +17 -7
- package/dist/collection/components/hemfixarna-invoice/hemfixarna-invoice.js +2 -1
- package/dist/collection/components/hemfixarna-invoice/hemfixarna-invoice.js.map +1 -1
- package/dist/collection/components/hemfixarna-orderrows/hemfixarna-orderrows.js +30 -20
- package/dist/collection/components/hemfixarna-orderrows/hemfixarna-orderrows.js.map +1 -1
- package/dist/collection/components/hemfixarna-product/hemfixarna-product.js +3 -2
- package/dist/collection/components/hemfixarna-product/hemfixarna-product.js.map +1 -1
- package/dist/collection/store/index.js.map +1 -1
- package/dist/collection/types/index.js +2 -0
- package/dist/collection/types/index.js.map +1 -1
- package/dist/collection/utils/calc.js +52 -5
- package/dist/collection/utils/calc.js.map +1 -1
- package/dist/collection/utils/felixApi.js.map +1 -1
- package/dist/esm/hemfixarna-address_15.entry.js +117 -52
- package/dist/esm/hemfixarna-address_15.entry.js.map +1 -1
- package/dist/esm/hemfixarna-byggmax.entry.js +2 -2
- package/dist/esm/hemfixarna-category.entry.js +2 -2
- package/dist/esm/hemfixarna-components.js +3 -3
- package/dist/esm/hemfixarna-components.js.map +1 -1
- package/dist/esm/hemfixarna-doro.entry.js +2 -2
- package/dist/esm/hemfixarna-elfa.entry.js +2 -2
- package/dist/esm/hemfixarna-fargvaruhuset.entry.js +2 -2
- package/dist/esm/hemfixarna-flyttsmart.entry.js +2 -2
- package/dist/esm/hemfixarna-forebygg.entry.js +2 -2
- package/dist/esm/hemfixarna-hornbach.entry.js +2 -2
- package/dist/esm/hemfixarna-kbygg.entry.js +2 -2
- package/dist/esm/hemfixarna-klint.entry.js +2 -2
- package/dist/esm/hemfixarna-kund.entry.js +2 -2
- package/dist/esm/hemfixarna-norrgavel.entry.js +2 -2
- package/dist/esm/hemfixarna-power.entry.js +2 -2
- package/dist/esm/hemfixarna-service.entry.js +2 -2
- package/dist/esm/hemfixarna-skanska.entry.js +2 -2
- package/dist/esm/hemfixarna-sparfonster.entry.js +2 -2
- package/dist/esm/hemfixarna-string-furniture.entry.js +2 -2
- package/dist/esm/hemfixarna-superfront.entry.js +2 -2
- package/dist/esm/hemfixarna-tesla.entry.js +2 -2
- package/dist/esm/hemfixarna-traningspartner.entry.js +2 -2
- package/dist/esm/hemfixarna-zaptec.entry.js +2 -2
- package/dist/esm/{index-8282f88e.js → index-aa51ad9d.js} +2 -2
- package/dist/esm/{index-8282f88e.js.map → index-aa51ad9d.js.map} +1 -1
- package/dist/esm/{index-1fbc7a74.js → index-c8aebf0d.js} +3 -1
- package/dist/esm/index-c8aebf0d.js.map +1 -0
- package/dist/esm/{index-04bcf90e.js → index-ea1d222e.js} +74 -20
- package/dist/esm/index-ea1d222e.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/loader.js.map +1 -1
- package/dist/hemfixarna-components/hemfixarna-components.esm.js +1 -1
- package/dist/hemfixarna-components/hemfixarna-components.esm.js.map +1 -1
- package/dist/hemfixarna-components/{p-cb1634e8.entry.js → p-3a05b24c.entry.js} +2 -2
- package/dist/hemfixarna-components/{p-3acd1346.entry.js → p-3b6bf910.entry.js} +2 -2
- package/dist/hemfixarna-components/{p-b397b966.js → p-642db21e.js} +2 -2
- package/dist/hemfixarna-components/{p-b397b966.js.map → p-642db21e.js.map} +1 -1
- package/dist/hemfixarna-components/p-6aed6e88.entry.js +2 -0
- package/dist/hemfixarna-components/p-6aed6e88.entry.js.map +1 -0
- package/dist/hemfixarna-components/{p-1b80999e.entry.js → p-6d17838c.entry.js} +2 -2
- package/dist/hemfixarna-components/{p-8d509bf1.entry.js → p-76cec215.entry.js} +2 -2
- package/dist/hemfixarna-components/{p-1f875c7a.entry.js → p-7bdc4485.entry.js} +2 -2
- package/dist/hemfixarna-components/{p-6f6601b8.entry.js → p-7f5b7e4d.entry.js} +2 -2
- package/dist/hemfixarna-components/p-85caa0b1.entry.js +2 -0
- package/dist/hemfixarna-components/p-89e35a2b.entry.js +2 -0
- package/dist/hemfixarna-components/{p-61b4597f.entry.js → p-a64997e6.entry.js} +2 -2
- package/dist/hemfixarna-components/{p-8cc96dd9.entry.js → p-a66f910f.entry.js} +2 -2
- package/dist/hemfixarna-components/{p-e0aad0ff.entry.js → p-ae532b1e.entry.js} +2 -2
- package/dist/hemfixarna-components/p-b250a909.entry.js +2 -0
- package/dist/hemfixarna-components/p-c707b937.js +3 -0
- package/dist/hemfixarna-components/p-c707b937.js.map +1 -0
- package/dist/hemfixarna-components/{p-8356796a.entry.js → p-c7a68aec.entry.js} +2 -2
- package/dist/hemfixarna-components/{p-edac9f21.entry.js → p-d26af1b1.entry.js} +2 -2
- package/dist/hemfixarna-components/{p-cfdc93e9.js → p-d297cb30.js} +2 -2
- package/dist/hemfixarna-components/p-d297cb30.js.map +1 -0
- package/dist/hemfixarna-components/{p-a63a6a56.entry.js → p-d96ab852.entry.js} +2 -2
- package/dist/hemfixarna-components/{p-dabad8a7.entry.js → p-e0c54744.entry.js} +2 -2
- package/dist/hemfixarna-components/p-e2c0ddb1.entry.js +2 -0
- package/dist/hemfixarna-components/{p-e8800c3b.entry.js → p-e2cd711c.entry.js} +2 -2
- package/dist/hemfixarna-components/p-e63f00b7.entry.js +2 -0
- package/dist/hemfixarna-components/{p-6c1d21dd.entry.js → p-eabbb263.entry.js} +2 -2
- package/dist/hemfixarna-components/p-fcb4a599.entry.js +2 -0
- package/dist/types/components/hemfixarna-orderrows/hemfixarna-orderrows.d.ts +2 -3
- package/dist/types/stencil-public-runtime.d.ts +3 -0
- package/dist/types/store/index.d.ts +1 -1
- package/dist/types/types/index.d.ts +15 -3
- package/dist/types/utils/calc.d.ts +9 -1
- package/dist/types/utils/felixApi.d.ts +7 -0
- package/package.json +1 -1
- package/dist/cjs/index-8054ce93.js.map +0 -1
- package/dist/cjs/index-b83343b9.js.map +0 -1
- package/dist/esm/index-04bcf90e.js.map +0 -1
- package/dist/esm/index-1fbc7a74.js.map +0 -1
- package/dist/hemfixarna-components/p-32a8152b.js +0 -3
- package/dist/hemfixarna-components/p-32a8152b.js.map +0 -1
- package/dist/hemfixarna-components/p-53afbc10.entry.js +0 -2
- package/dist/hemfixarna-components/p-53f0abfa.entry.js +0 -2
- package/dist/hemfixarna-components/p-72901f4a.entry.js +0 -2
- package/dist/hemfixarna-components/p-72901f4a.entry.js.map +0 -1
- package/dist/hemfixarna-components/p-8f0a688c.entry.js +0 -2
- package/dist/hemfixarna-components/p-ae3fc85c.entry.js +0 -2
- package/dist/hemfixarna-components/p-b6bc1537.entry.js +0 -2
- package/dist/hemfixarna-components/p-cfdc93e9.js.map +0 -1
- package/dist/hemfixarna-components/p-dfcefa54.entry.js +0 -2
- /package/dist/hemfixarna-components/{p-cb1634e8.entry.js.map → p-3a05b24c.entry.js.map} +0 -0
- /package/dist/hemfixarna-components/{p-3acd1346.entry.js.map → p-3b6bf910.entry.js.map} +0 -0
- /package/dist/hemfixarna-components/{p-1b80999e.entry.js.map → p-6d17838c.entry.js.map} +0 -0
- /package/dist/hemfixarna-components/{p-8d509bf1.entry.js.map → p-76cec215.entry.js.map} +0 -0
- /package/dist/hemfixarna-components/{p-1f875c7a.entry.js.map → p-7bdc4485.entry.js.map} +0 -0
- /package/dist/hemfixarna-components/{p-6f6601b8.entry.js.map → p-7f5b7e4d.entry.js.map} +0 -0
- /package/dist/hemfixarna-components/{p-8f0a688c.entry.js.map → p-85caa0b1.entry.js.map} +0 -0
- /package/dist/hemfixarna-components/{p-dfcefa54.entry.js.map → p-89e35a2b.entry.js.map} +0 -0
- /package/dist/hemfixarna-components/{p-61b4597f.entry.js.map → p-a64997e6.entry.js.map} +0 -0
- /package/dist/hemfixarna-components/{p-8cc96dd9.entry.js.map → p-a66f910f.entry.js.map} +0 -0
- /package/dist/hemfixarna-components/{p-e0aad0ff.entry.js.map → p-ae532b1e.entry.js.map} +0 -0
- /package/dist/hemfixarna-components/{p-b6bc1537.entry.js.map → p-b250a909.entry.js.map} +0 -0
- /package/dist/hemfixarna-components/{p-8356796a.entry.js.map → p-c7a68aec.entry.js.map} +0 -0
- /package/dist/hemfixarna-components/{p-edac9f21.entry.js.map → p-d26af1b1.entry.js.map} +0 -0
- /package/dist/hemfixarna-components/{p-a63a6a56.entry.js.map → p-d96ab852.entry.js.map} +0 -0
- /package/dist/hemfixarna-components/{p-dabad8a7.entry.js.map → p-e0c54744.entry.js.map} +0 -0
- /package/dist/hemfixarna-components/{p-53afbc10.entry.js.map → p-e2c0ddb1.entry.js.map} +0 -0
- /package/dist/hemfixarna-components/{p-e8800c3b.entry.js.map → p-e2cd711c.entry.js.map} +0 -0
- /package/dist/hemfixarna-components/{p-ae3fc85c.entry.js.map → p-e63f00b7.entry.js.map} +0 -0
- /package/dist/hemfixarna-components/{p-6c1d21dd.entry.js.map → p-eabbb263.entry.js.map} +0 -0
- /package/dist/hemfixarna-components/{p-53f0abfa.entry.js.map → p-fcb4a599.entry.js.map} +0 -0
@@ -1,5 +1,5 @@
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
2
|
-
import { W as WidgetStyle, B as Business } from './index-
|
1
|
+
import { r as registerInstance, h } from './index-ea1d222e.js';
|
2
|
+
import { W as WidgetStyle, B as Business } from './index-c8aebf0d.js';
|
3
3
|
|
4
4
|
const hemfixarnaByggmaxCss = "";
|
5
5
|
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
2
|
-
import { s as state } from './index-
|
1
|
+
import { r as registerInstance, h } from './index-ea1d222e.js';
|
2
|
+
import { s as state } from './index-aa51ad9d.js';
|
3
3
|
|
4
4
|
const HemfixarnaCategory = class {
|
5
5
|
constructor(hostRef) {
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
2
|
-
export { s as setNonce } from './index-
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-ea1d222e.js';
|
2
|
+
export { s as setNonce } from './index-ea1d222e.js';
|
3
3
|
|
4
4
|
/*
|
5
|
-
Stencil Client Patch Browser v3.2
|
5
|
+
Stencil Client Patch Browser v3.4.2 | MIT Licensed | https://stenciljs.com
|
6
6
|
*/
|
7
7
|
const patchBrowser = () => {
|
8
8
|
const importMeta = import.meta.url;
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"hemfixarna-components.js","mappings":";;;AAAA;AACA;AACA;AAiBA,MAAM,YAAY,GAAG,MAAM;AAkC3B,IAAI,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;AACvC,IAAI,MAAM,IAAI,GAAiE,EAAE,CAAC;AAgBlF;AACA,IAAI,IAAuB,UAAU,KAAK,EAAE,EAAE;AAC9C,QAAQ,IAAI,CAAC,YAAY,GAAG,IAAI,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,IAAI,CAAC;AAC1D;AACA;AACA,KAaK;AACL,IAAI,OAAO,cAAc,CAAC,IAAI,CAAC,CAAC;AAChC,CAAC;;ACtFD,YAAY,EAAE,CAAC,IAAI,CAAC,OAAO,IAAI;AAE/B,EAAE,OAAO,aAAa,CAAC,4BAA4B,EAAE,OAAO,CAAC,CAAC;AAC9D,CAAC,CAAC","names":[],"sources":["./node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v3.2
|
1
|
+
{"file":"hemfixarna-components.js","mappings":";;;AAAA;AACA;AACA;AAiBA,MAAM,YAAY,GAAG,MAAM;AAkC3B,IAAI,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;AACvC,IAAI,MAAM,IAAI,GAAiE,EAAE,CAAC;AAgBlF;AACA,IAAI,IAAuB,UAAU,KAAK,EAAE,EAAE;AAC9C,QAAQ,IAAI,CAAC,YAAY,GAAG,IAAI,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,IAAI,CAAC;AAC1D;AACA;AACA,KAaK;AACL,IAAI,OAAO,cAAc,CAAC,IAAI,CAAC,CAAC;AAChC,CAAC;;ACtFD,YAAY,EAAE,CAAC,IAAI,CAAC,OAAO,IAAI;AAE/B,EAAE,OAAO,aAAa,CAAC,4BAA4B,EAAE,OAAO,CAAC,CAAC;AAC9D,CAAC,CAAC","names":[],"sources":["./node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v3.4.2 | 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"],"version":3}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
2
|
-
import { W as WidgetStyle, B as Business } from './index-
|
1
|
+
import { r as registerInstance, h } from './index-ea1d222e.js';
|
2
|
+
import { W as WidgetStyle, B as Business } from './index-c8aebf0d.js';
|
3
3
|
|
4
4
|
const hemfixarnaDoroCss = "";
|
5
5
|
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
2
|
-
import { W as WidgetStyle, B as Business } from './index-
|
1
|
+
import { r as registerInstance, h } from './index-ea1d222e.js';
|
2
|
+
import { W as WidgetStyle, B as Business } from './index-c8aebf0d.js';
|
3
3
|
|
4
4
|
const hemfixarnaElfaCss = "";
|
5
5
|
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
2
|
-
import { W as WidgetStyle, B as Business } from './index-
|
1
|
+
import { r as registerInstance, h } from './index-ea1d222e.js';
|
2
|
+
import { W as WidgetStyle, B as Business } from './index-c8aebf0d.js';
|
3
3
|
|
4
4
|
const MyComponent = class {
|
5
5
|
constructor(hostRef) {
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
2
|
-
import { W as WidgetStyle, B as Business } from './index-
|
1
|
+
import { r as registerInstance, h } from './index-ea1d222e.js';
|
2
|
+
import { W as WidgetStyle, B as Business } from './index-c8aebf0d.js';
|
3
3
|
|
4
4
|
const MyComponent = class {
|
5
5
|
constructor(hostRef) {
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
2
|
-
import { W as WidgetStyle, B as Business } from './index-
|
1
|
+
import { r as registerInstance, h } from './index-ea1d222e.js';
|
2
|
+
import { W as WidgetStyle, B as Business } from './index-c8aebf0d.js';
|
3
3
|
|
4
4
|
const hemfixarnaForebyggCss = "";
|
5
5
|
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
2
|
-
import { W as WidgetStyle, B as Business } from './index-
|
1
|
+
import { r as registerInstance, h } from './index-ea1d222e.js';
|
2
|
+
import { W as WidgetStyle, B as Business } from './index-c8aebf0d.js';
|
3
3
|
|
4
4
|
const hemfixarnaHornbachCss = "";
|
5
5
|
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
2
|
-
import { W as WidgetStyle, B as Business } from './index-
|
1
|
+
import { r as registerInstance, h } from './index-ea1d222e.js';
|
2
|
+
import { W as WidgetStyle, B as Business } from './index-c8aebf0d.js';
|
3
3
|
|
4
4
|
const MyComponent = class {
|
5
5
|
constructor(hostRef) {
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
2
|
-
import { W as WidgetStyle, B as Business } from './index-
|
1
|
+
import { r as registerInstance, h } from './index-ea1d222e.js';
|
2
|
+
import { W as WidgetStyle, B as Business } from './index-c8aebf0d.js';
|
3
3
|
|
4
4
|
const MyComponent = class {
|
5
5
|
constructor(hostRef) {
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
2
|
-
import { W as WidgetStyle, B as Business } from './index-
|
1
|
+
import { r as registerInstance, h } from './index-ea1d222e.js';
|
2
|
+
import { W as WidgetStyle, B as Business } from './index-c8aebf0d.js';
|
3
3
|
|
4
4
|
const MyComponent = class {
|
5
5
|
constructor(hostRef) {
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
2
|
-
import { W as WidgetStyle, B as Business } from './index-
|
1
|
+
import { r as registerInstance, h } from './index-ea1d222e.js';
|
2
|
+
import { W as WidgetStyle, B as Business } from './index-c8aebf0d.js';
|
3
3
|
|
4
4
|
const MyComponent = class {
|
5
5
|
constructor(hostRef) {
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
2
|
-
import { W as WidgetStyle, B as Business } from './index-
|
1
|
+
import { r as registerInstance, h } from './index-ea1d222e.js';
|
2
|
+
import { W as WidgetStyle, B as Business } from './index-c8aebf0d.js';
|
3
3
|
|
4
4
|
const MyComponent = class {
|
5
5
|
constructor(hostRef) {
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
2
|
-
import { s as state } from './index-
|
1
|
+
import { r as registerInstance, h } from './index-ea1d222e.js';
|
2
|
+
import { s as state } from './index-aa51ad9d.js';
|
3
3
|
|
4
4
|
const HemfixarnaService = class {
|
5
5
|
constructor(hostRef) {
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
2
|
-
import { W as WidgetStyle, B as Business } from './index-
|
1
|
+
import { r as registerInstance, h } from './index-ea1d222e.js';
|
2
|
+
import { W as WidgetStyle, B as Business } from './index-c8aebf0d.js';
|
3
3
|
|
4
4
|
const hemfixarnaSkanskaCss = "";
|
5
5
|
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
2
|
-
import { W as WidgetStyle, B as Business } from './index-
|
1
|
+
import { r as registerInstance, h } from './index-ea1d222e.js';
|
2
|
+
import { W as WidgetStyle, B as Business } from './index-c8aebf0d.js';
|
3
3
|
|
4
4
|
const MyComponent = class {
|
5
5
|
constructor(hostRef) {
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
2
|
-
import { W as WidgetStyle, B as Business } from './index-
|
1
|
+
import { r as registerInstance, h } from './index-ea1d222e.js';
|
2
|
+
import { W as WidgetStyle, B as Business } from './index-c8aebf0d.js';
|
3
3
|
|
4
4
|
const hemfixarnaStringCss = "";
|
5
5
|
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
2
|
-
import { W as WidgetStyle, B as Business } from './index-
|
1
|
+
import { r as registerInstance, h } from './index-ea1d222e.js';
|
2
|
+
import { W as WidgetStyle, B as Business } from './index-c8aebf0d.js';
|
3
3
|
|
4
4
|
const MyComponent = class {
|
5
5
|
constructor(hostRef) {
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
2
|
-
import { W as WidgetStyle, B as Business } from './index-
|
1
|
+
import { r as registerInstance, h } from './index-ea1d222e.js';
|
2
|
+
import { W as WidgetStyle, B as Business } from './index-c8aebf0d.js';
|
3
3
|
|
4
4
|
const MyComponent = class {
|
5
5
|
constructor(hostRef) {
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
2
|
-
import { W as WidgetStyle, B as Business } from './index-
|
1
|
+
import { r as registerInstance, h } from './index-ea1d222e.js';
|
2
|
+
import { W as WidgetStyle, B as Business } from './index-c8aebf0d.js';
|
3
3
|
|
4
4
|
const MyComponent = class {
|
5
5
|
constructor(hostRef) {
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
2
|
-
import { W as WidgetStyle, B as Business } from './index-
|
1
|
+
import { r as registerInstance, h } from './index-ea1d222e.js';
|
2
|
+
import { W as WidgetStyle, B as Business } from './index-c8aebf0d.js';
|
3
3
|
|
4
4
|
const MyComponent = class {
|
5
5
|
constructor(hostRef) {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { c as getRenderingRef, f as forceUpdate } from './index-
|
1
|
+
import { c as getRenderingRef, f as forceUpdate } from './index-ea1d222e.js';
|
2
2
|
|
3
3
|
const appendToMap = (map, propName, value) => {
|
4
4
|
const items = map.get(propName);
|
@@ -260,4 +260,4 @@ onChange('selectedCustomerCategory', category => {
|
|
260
260
|
|
261
261
|
export { state as s };
|
262
262
|
|
263
|
-
//# sourceMappingURL=index-
|
263
|
+
//# sourceMappingURL=index-aa51ad9d.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"index-8282f88e.js","mappings":";;AAEA,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,KAAK;AAC9C,IAAI,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACpC,IAAI,IAAI,CAAC,KAAK,EAAE;AAChB,QAAQ,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;AACnC,KAAK;AACL,SAAS,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;AACrC,QAAQ,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC1B,KAAK;AACL,CAAC,CAAC;AACF,MAAM,QAAQ,GAAG,CAAC,EAAE,EAAE,EAAE,KAAK;AAC7B,IAAI,IAAI,SAAS,CAAC;AAClB,IAAI,OAAO,CAAC,GAAG,IAAI,KAAK;AACxB,QAAQ,IAAI,SAAS,EAAE;AACvB,YAAY,YAAY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,CAAC,iBAAiB,EAAE,OAAO;EACjC,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,CAAC,OAAO;IAAE,OAAO;EACxC,MAAM,UAAU,GAAG,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,UAAU,EAAE,GAAG,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,cAAI,OAAA,MAAA,CAAC,CAAC,cAAc,mCAAI,EAAE,CAAA,EAAA,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;EACxH,MAAM,QAAQ,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;EACtE,IAAI,QAAQ,EAAE;IACZ,KAAK,CAAC,cAAc,GAAG,QAAQ,CAAC;IAChC,OAAO;GACR;EACD,KAAK,CAAC,cAAc,GAAG,IAAI,CAAC;AAC9B,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,0BAA0B,EAAE,QAAQ;EAC3C,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,CAAC,QAAQ;IAAE,OAAO;EACzC,IAAK,QAAgC,CAAC,MAAM,EAAE;IAC5C,MAAM,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,KAAM,QAAgC,CAAC,MAAM,CAAC,CAAC;IACtG,IAAI,MAAM,EAAE;MACV,KAAK,CAAC,cAAc,GAAG,MAAM,CAAC;MAC9B,OAAO;KACR;GACF;EACD,KAAK,CAAC,cAAc,GAAG,IAAI,CAAC;AAC9B,CAAC,CAAC;;;;","names":[],"sources":["./node_modules/@stencil/store/dist/index.mjs","./src/store/index.ts"],"sourcesContent":["import { getRenderingRef, forceUpdate } from '@stencil/core';\n\nconst appendToMap = (map, propName, value) => {\n const items = map.get(propName);\n if (!items) {\n map.set(propName, [value]);\n }\n else if (!items.includes(value)) {\n items.push(value);\n }\n};\nconst debounce = (fn, ms) => {\n let timeoutId;\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n timeoutId = 0;\n fn(...args);\n }, ms);\n };\n};\n\n/**\n * Check if a possible element isConnected.\n * The property might not be there, so we check for it.\n *\n * We want it to return true if isConnected is not a property,\n * otherwise we would remove these elements and would not update.\n *\n * Better leak in Edge than to be useless.\n */\nconst isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;\nconst cleanupElements = debounce((map) => {\n for (let key of map.keys()) {\n map.set(key, map.get(key).filter(isConnected));\n }\n}, 2000);\nconst stencilSubscription = () => {\n if (typeof getRenderingRef !== 'function') {\n // If we are not in a stencil project, we do nothing.\n // This function is not really exported by @stencil/core.\n return {};\n }\n const elmsToUpdate = new Map();\n return {\n dispose: () => elmsToUpdate.clear(),\n get: (propName) => {\n const elm = getRenderingRef();\n if (elm) {\n appendToMap(elmsToUpdate, propName, elm);\n }\n },\n set: (propName) => {\n const elements = elmsToUpdate.get(propName);\n if (elements) {\n elmsToUpdate.set(propName, elements.filter(forceUpdate));\n }\n cleanupElements(elmsToUpdate);\n },\n reset: () => {\n elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));\n cleanupElements(elmsToUpdate);\n },\n };\n};\n\nconst unwrap = (val) => (typeof val === 'function' ? val() : val);\nconst createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {\n const unwrappedState = unwrap(defaultState);\n let states = new Map(Object.entries(unwrappedState !== null && unwrappedState !== void 0 ? unwrappedState : {}));\n const handlers = {\n dispose: [],\n get: [],\n set: [],\n reset: [],\n };\n const reset = () => {\n var _a;\n // When resetting the state, the default state may be a function - unwrap it to invoke it.\n // otherwise, the state won't be properly reset\n states = new Map(Object.entries((_a = unwrap(defaultState)) !== null && _a !== void 0 ? _a : {}));\n handlers.reset.forEach((cb) => cb());\n };\n const dispose = () => {\n // Call first dispose as resetting the state would\n // cause less updates ;)\n handlers.dispose.forEach((cb) => cb());\n reset();\n };\n const get = (propName) => {\n handlers.get.forEach((cb) => cb(propName));\n return states.get(propName);\n };\n const set = (propName, value) => {\n const oldValue = states.get(propName);\n if (shouldUpdate(value, oldValue, propName)) {\n states.set(propName, value);\n handlers.set.forEach((cb) => cb(propName, value, oldValue));\n }\n };\n const state = (typeof Proxy === 'undefined'\n ? {}\n : new Proxy(unwrappedState, {\n get(_, propName) {\n return get(propName);\n },\n ownKeys(_) {\n return Array.from(states.keys());\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n has(_, propName) {\n return states.has(propName);\n },\n set(_, propName, value) {\n set(propName, value);\n return true;\n },\n }));\n const on = (eventName, callback) => {\n handlers[eventName].push(callback);\n return () => {\n removeFromArray(handlers[eventName], callback);\n };\n };\n const onChange = (propName, cb) => {\n const unSet = on('set', (key, newValue) => {\n if (key === propName) {\n cb(newValue);\n }\n });\n // We need to unwrap the defaultState because it might be a function.\n // Otherwise we might not be sending the right reset value.\n const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));\n return () => {\n unSet();\n unReset();\n };\n };\n const use = (...subscriptions) => {\n const unsubs = subscriptions.reduce((unsubs, subscription) => {\n if (subscription.set) {\n unsubs.push(on('set', subscription.set));\n }\n if (subscription.get) {\n unsubs.push(on('get', subscription.get));\n }\n if (subscription.reset) {\n unsubs.push(on('reset', subscription.reset));\n }\n if (subscription.dispose) {\n unsubs.push(on('dispose', subscription.dispose));\n }\n return unsubs;\n }, []);\n return () => unsubs.forEach((unsub) => unsub());\n };\n const forceUpdate = (key) => {\n const oldValue = states.get(key);\n handlers.set.forEach((cb) => cb(key, oldValue, oldValue));\n };\n return {\n state,\n get,\n set,\n on,\n onChange,\n use,\n dispose,\n reset,\n forceUpdate,\n };\n};\nconst removeFromArray = (array, item) => {\n const index = array.indexOf(item);\n if (index >= 0) {\n array[index] = array[array.length - 1];\n array.length--;\n }\n};\n\nconst createStore = (defaultState, shouldUpdate) => {\n const map = createObservableMap(defaultState, shouldUpdate);\n map.use(stencilSubscription());\n return map;\n};\n\nexport { createObservableMap, createStore };\n","import { createStore } from '@stencil/store';\nimport { OnChangeHandler } from '@stencil/store/dist/types';\nimport { Business, CartItem, Category, Customer, CustomerCategory, CustomerSubCategory, GreenOptions, Product, RotOptions, RutOptions, Service, User, WpOptions } from '../types';\nimport { CreditSafeUser } from '../types/felixtypes';\n\ntype StateType = {\n step: number;\n selectedCategory: Category | null;\n selectedService: Service | null;\n selectedProduct: Product | null;\n cart: Array<CartItem>;\n business: Business | 'undefined';\n options: WpOptions | null;\n rut: boolean;\n rot: boolean;\n green: boolean;\n token: string | null;\n checkoutStep: number;\n checkoutEdit: boolean;\n user: User | null;\n creditSafeUser: CreditSafeUser | null;\n modal: {\n title?: string;\n text: string[];\n } | null;\n rutOptions: RutOptions | null;\n rotOptions: RotOptions | null;\n greenOptions: GreenOptions | null;\n customer: Customer | null;\n selectedCustomerCategory: CustomerCategory | CustomerSubCategory | null;\n parentCategory: CustomerCategory | CustomerSubCategory;\n checkoutInvoice: boolean;\n maleri: boolean;\n selectSource: boolean;\n showSourcePasswordPrompt: boolean;\n};\n\nconst {\n state,\n onChange,\n}: {\n state: StateType;\n onChange: OnChangeHandler<StateType>;\n} = createStore({\n step: 1,\n checkoutStep: 1,\n checkoutEdit: false,\n selectedCategory: null,\n selectedService: null,\n selectedProduct: null,\n cart: [],\n business: 'undefined',\n options: null,\n rut: true,\n rot: true,\n green: true,\n token: null,\n user: null,\n modal: null,\n rutOptions: null,\n rotOptions: null,\n greenOptions: null,\n customer: null,\n selectedCustomerCategory: null,\n parentCategory: null,\n creditSafeUser: null,\n checkoutInvoice: false,\n maleri: false,\n sources: null,\n selectSource: false,\n showSourcePasswordPrompt: false,\n});\n\nonChange('cart', cart => {\n window.sessionStorage.setItem(`hemfixarna-${state.business}-cart`, JSON.stringify(cart));\n});\n\nonChange('user', user => {\n window.sessionStorage.setItem(`hemfixarna-${state.business}-user`, JSON.stringify(user));\n});\n\nonChange('creditSafeUser', user => {\n window.sessionStorage.setItem(`hemfixarna-${state.business}-creditSafeUser`, JSON.stringify(user));\n});\n\nonChange('selectSource', selectSource => {\n if (selectSource) {\n localStorage.setItem('select_source', 'true');\n }\n});\n\nonChange('selectedProduct', product => {\n if (!state.customer || !product) return;\n const categories = [...state.customer.categories, ...state.customer.categories.map(c => c.sub_categories ?? [])].flat();\n const category = categories.find(c => c && c.id === product.category);\n if (category) {\n state.parentCategory = category;\n return;\n }\n state.parentCategory = null;\n});\n\nonChange('selectedCustomerCategory', category => {\n if (!state.customer || !category) return;\n if ((category as CustomerSubCategory).parent) {\n const parent = state.customer.categories.find(c => c.id === (category as CustomerSubCategory).parent);\n if (parent) {\n state.parentCategory = parent;\n return;\n }\n }\n state.parentCategory = null;\n});\n\nexport default state;\n"],"version":3}
|
1
|
+
{"file":"index-aa51ad9d.js","mappings":";;AAEA,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,KAAK;AAC9C,IAAI,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACpC,IAAI,IAAI,CAAC,KAAK,EAAE;AAChB,QAAQ,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;AACnC,KAAK;AACL,SAAS,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;AACrC,QAAQ,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC1B,KAAK;AACL,CAAC,CAAC;AACF,MAAM,QAAQ,GAAG,CAAC,EAAE,EAAE,EAAE,KAAK;AAC7B,IAAI,IAAI,SAAS,CAAC;AAClB,IAAI,OAAO,CAAC,GAAG,IAAI,KAAK;AACxB,QAAQ,IAAI,SAAS,EAAE;AACvB,YAAY,YAAY,CAAC,SAAS,CAAC,CAAC;AACpC,SAAS;AACT,QAAQ,SAAS,GAAG,UAAU,C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I,CAAC,OAAO;IAAE,OAAO;EACxC,MAAM,UAAU,GAAG,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,UAAU,EAAE,GAAG,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,cAAI,OAAA,MAAA,CAAC,CAAC,cAAc,mCAAI,EAAE,CAAA,EAAA,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;EACxH,MAAM,QAAQ,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;EACtE,IAAI,QAAQ,EAAE;IACZ,KAAK,CAAC,cAAc,GAAG,QAAQ,CAAC;IAChC,OAAO;GACR;EACD,KAAK,CAAC,cAAc,GAAG,IAAI,CAAC;AAC9B,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,0BAA0B,EAAE,QAAQ;EAC3C,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,CAAC,QAAQ;IAAE,OAAO;EACzC,IAAK,QAAgC,CAAC,MAAM,EAAE;IAC5C,MAAM,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,KAAM,QAAgC,CAAC,MAAM,CAAC,CAAC;IACtG,IAAI,MAAM,EAAE;MACV,KAAK,CAAC,cAAc,GAAG,MAAM,CAAC;MAC9B,OAAO;KACR;GACF;EACD,KAAK,CAAC,cAAc,GAAG,IAAI,CAAC;AAC9B,CAAC,CAAC;;;;","names":[],"sources":["./node_modules/@stencil/store/dist/index.mjs","./src/store/index.ts"],"sourcesContent":["import { getRenderingRef, forceUpdate } from '@stencil/core';\n\nconst appendToMap = (map, propName, value) => {\n const items = map.get(propName);\n if (!items) {\n map.set(propName, [value]);\n }\n else if (!items.includes(value)) {\n items.push(value);\n }\n};\nconst debounce = (fn, ms) => {\n let timeoutId;\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n timeoutId = 0;\n fn(...args);\n }, ms);\n };\n};\n\n/**\n * Check if a possible element isConnected.\n * The property might not be there, so we check for it.\n *\n * We want it to return true if isConnected is not a property,\n * otherwise we would remove these elements and would not update.\n *\n * Better leak in Edge than to be useless.\n */\nconst isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;\nconst cleanupElements = debounce((map) => {\n for (let key of map.keys()) {\n map.set(key, map.get(key).filter(isConnected));\n }\n}, 2000);\nconst stencilSubscription = () => {\n if (typeof getRenderingRef !== 'function') {\n // If we are not in a stencil project, we do nothing.\n // This function is not really exported by @stencil/core.\n return {};\n }\n const elmsToUpdate = new Map();\n return {\n dispose: () => elmsToUpdate.clear(),\n get: (propName) => {\n const elm = getRenderingRef();\n if (elm) {\n appendToMap(elmsToUpdate, propName, elm);\n }\n },\n set: (propName) => {\n const elements = elmsToUpdate.get(propName);\n if (elements) {\n elmsToUpdate.set(propName, elements.filter(forceUpdate));\n }\n cleanupElements(elmsToUpdate);\n },\n reset: () => {\n elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));\n cleanupElements(elmsToUpdate);\n },\n };\n};\n\nconst unwrap = (val) => (typeof val === 'function' ? val() : val);\nconst createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {\n const unwrappedState = unwrap(defaultState);\n let states = new Map(Object.entries(unwrappedState !== null && unwrappedState !== void 0 ? unwrappedState : {}));\n const handlers = {\n dispose: [],\n get: [],\n set: [],\n reset: [],\n };\n const reset = () => {\n var _a;\n // When resetting the state, the default state may be a function - unwrap it to invoke it.\n // otherwise, the state won't be properly reset\n states = new Map(Object.entries((_a = unwrap(defaultState)) !== null && _a !== void 0 ? _a : {}));\n handlers.reset.forEach((cb) => cb());\n };\n const dispose = () => {\n // Call first dispose as resetting the state would\n // cause less updates ;)\n handlers.dispose.forEach((cb) => cb());\n reset();\n };\n const get = (propName) => {\n handlers.get.forEach((cb) => cb(propName));\n return states.get(propName);\n };\n const set = (propName, value) => {\n const oldValue = states.get(propName);\n if (shouldUpdate(value, oldValue, propName)) {\n states.set(propName, value);\n handlers.set.forEach((cb) => cb(propName, value, oldValue));\n }\n };\n const state = (typeof Proxy === 'undefined'\n ? {}\n : new Proxy(unwrappedState, {\n get(_, propName) {\n return get(propName);\n },\n ownKeys(_) {\n return Array.from(states.keys());\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n has(_, propName) {\n return states.has(propName);\n },\n set(_, propName, value) {\n set(propName, value);\n return true;\n },\n }));\n const on = (eventName, callback) => {\n handlers[eventName].push(callback);\n return () => {\n removeFromArray(handlers[eventName], callback);\n };\n };\n const onChange = (propName, cb) => {\n const unSet = on('set', (key, newValue) => {\n if (key === propName) {\n cb(newValue);\n }\n });\n // We need to unwrap the defaultState because it might be a function.\n // Otherwise we might not be sending the right reset value.\n const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));\n return () => {\n unSet();\n unReset();\n };\n };\n const use = (...subscriptions) => {\n const unsubs = subscriptions.reduce((unsubs, subscription) => {\n if (subscription.set) {\n unsubs.push(on('set', subscription.set));\n }\n if (subscription.get) {\n unsubs.push(on('get', subscription.get));\n }\n if (subscription.reset) {\n unsubs.push(on('reset', subscription.reset));\n }\n if (subscription.dispose) {\n unsubs.push(on('dispose', subscription.dispose));\n }\n return unsubs;\n }, []);\n return () => unsubs.forEach((unsub) => unsub());\n };\n const forceUpdate = (key) => {\n const oldValue = states.get(key);\n handlers.set.forEach((cb) => cb(key, oldValue, oldValue));\n };\n return {\n state,\n get,\n set,\n on,\n onChange,\n use,\n dispose,\n reset,\n forceUpdate,\n };\n};\nconst removeFromArray = (array, item) => {\n const index = array.indexOf(item);\n if (index >= 0) {\n array[index] = array[array.length - 1];\n array.length--;\n }\n};\n\nconst createStore = (defaultState, shouldUpdate) => {\n const map = createObservableMap(defaultState, shouldUpdate);\n map.use(stencilSubscription());\n return map;\n};\n\nexport { createObservableMap, createStore };\n","import { createStore } from '@stencil/store';\nimport { OnChangeHandler } from '@stencil/store/dist/types';\nimport { Business, CartItem, Category, Customer, CustomerCategory, CustomerSubCategory, GreenOptions, Product, RotOptions, RutOptions, Service, User, WpOptions } from '../types';\nimport { CreditSafeUser } from '../types/felixtypes';\n\ntype StateType = {\n step: number;\n selectedCategory: Category | null;\n selectedService: Service | null;\n selectedProduct: Product | null;\n cart: Array<CartItem>;\n business: Business | 'undefined';\n options: WpOptions | null;\n rut: boolean;\n rot: boolean;\n green: boolean;\n token: string | null;\n checkoutStep: number;\n checkoutEdit: boolean;\n user: User | null;\n creditSafeUser: CreditSafeUser | null;\n modal: {\n title?: string;\n text: string;\n } | null;\n rutOptions: RutOptions | null;\n rotOptions: RotOptions | null;\n greenOptions: GreenOptions | null;\n customer: Customer | null;\n selectedCustomerCategory: CustomerCategory | CustomerSubCategory | null;\n parentCategory: CustomerCategory | CustomerSubCategory;\n checkoutInvoice: boolean;\n maleri: boolean;\n selectSource: boolean;\n showSourcePasswordPrompt: boolean;\n};\n\nconst {\n state,\n onChange,\n}: {\n state: StateType;\n onChange: OnChangeHandler<StateType>;\n} = createStore({\n step: 1,\n checkoutStep: 1,\n checkoutEdit: false,\n selectedCategory: null,\n selectedService: null,\n selectedProduct: null,\n cart: [],\n business: 'undefined',\n options: null,\n rut: true,\n rot: true,\n green: true,\n token: null,\n user: null,\n modal: null,\n rutOptions: null,\n rotOptions: null,\n greenOptions: null,\n customer: null,\n selectedCustomerCategory: null,\n parentCategory: null,\n creditSafeUser: null,\n checkoutInvoice: false,\n maleri: false,\n sources: null,\n selectSource: false,\n showSourcePasswordPrompt: false,\n});\n\nonChange('cart', cart => {\n window.sessionStorage.setItem(`hemfixarna-${state.business}-cart`, JSON.stringify(cart));\n});\n\nonChange('user', user => {\n window.sessionStorage.setItem(`hemfixarna-${state.business}-user`, JSON.stringify(user));\n});\n\nonChange('creditSafeUser', user => {\n window.sessionStorage.setItem(`hemfixarna-${state.business}-creditSafeUser`, JSON.stringify(user));\n});\n\nonChange('selectSource', selectSource => {\n if (selectSource) {\n localStorage.setItem('select_source', 'true');\n }\n});\n\nonChange('selectedProduct', product => {\n if (!state.customer || !product) return;\n const categories = [...state.customer.categories, ...state.customer.categories.map(c => c.sub_categories ?? [])].flat();\n const category = categories.find(c => c && c.id === product.category);\n if (category) {\n state.parentCategory = category;\n return;\n }\n state.parentCategory = null;\n});\n\nonChange('selectedCustomerCategory', category => {\n if (!state.customer || !category) return;\n if ((category as CustomerSubCategory).parent) {\n const parent = state.customer.categories.find(c => c.id === (category as CustomerSubCategory).parent);\n if (parent) {\n state.parentCategory = parent;\n return;\n }\n }\n state.parentCategory = null;\n});\n\nexport default state;\n"],"version":3}
|
@@ -24,6 +24,8 @@ var Business;
|
|
24
24
|
Business["traningspartner"] = "traningspartner";
|
25
25
|
Business["superfront"] = "superfront";
|
26
26
|
Business["inet"] = "inet";
|
27
|
+
Business["design24"] = "design24";
|
28
|
+
Business["netatonce"] = "netatonce";
|
27
29
|
})(Business || (Business = {}));
|
28
30
|
var WidgetStyle;
|
29
31
|
(function (WidgetStyle) {
|
@@ -39,4 +41,4 @@ var TopCategory;
|
|
39
41
|
|
40
42
|
export { Business as B, WidgetStyle as W };
|
41
43
|
|
42
|
-
//# sourceMappingURL=index-
|
44
|
+
//# sourceMappingURL=index-c8aebf0d.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"file":"index-c8aebf0d.js","mappings":"AAAA;AACA;AACA;IAEY;AAAZ,WAAY,QAAQ;EAClB,yBAAa,CAAA;EACb,+BAAmB,CAAA;EACnB,+BAAmB,CAAA;EACnB,uCAA2B,CAAA;EAC3B,iCAAqB,CAAA;EACrB,iCAAqB,CAAA;EACrB,yBAAa,CAAA;EACb,yBAAa,CAAA;EACb,4BAAgB,CAAA;EAChB,mCAAuB,CAAA;EACvB,2CAA+B,CAAA;EAC/B,6BAAiB,CAAA;EACjB,2BAAe,CAAA;EACf,2BAAe,CAAA;EACf,qCAAyB,CAAA;EACzB,qBAAS,CAAA;EACT,uCAA2B,CAAA;EAC3B,2BAAe,CAAA;EACf,+CAAmC,CAAA;EACnC,qCAAyB,CAAA;EACzB,yBAAa,CAAA;EACb,iCAAqB,CAAA;EACrB,mCAAuB,CAAA;AACzB,CAAC,EAxBW,QAAQ,KAAR,QAAQ,QAwBnB;IAqMW;AAAZ,WAAY,WAAW;EACrB,oCAAqB,CAAA;EACrB,0CAA2B,CAAA;EAC3B,8CAA+B,CAAA;EAC/B,8CAA+B,CAAA;AACjC,CAAC,EALW,WAAW,KAAX,WAAW,QAKtB;AAED,IAAY,WAEX;AAFD,WAAY,WAAW;EACrB,wCAAyB,CAAA;AAC3B,CAAC,EAFW,WAAW,KAAX,WAAW;;;;","names":[],"sources":["./src/types/index.ts"],"sourcesContent":["// Match slug with partner slug in wp admin\n// Dont forget to add the partners url to cors for creditsafe\n// https://bitbucket.org/afonso-sweden/creditsafe-lookup/src/main/api/index.ts\n\nexport enum Business {\n kund = 'kund',\n byggmax = 'byggmax',\n skanska = 'skanska',\n string = 'string-furniture',\n hornbach = 'hornbach',\n forebygg = 'forebygg',\n doro = 'doro',\n elfa = 'elfa',\n kbygg = 'k-bygg',\n norrgavel = 'norrgavel',\n fargvaruhuset = 'fargvaruhuset',\n zaptec = 'zaptec',\n tesla = 'tesla',\n klint = 'klint',\n flyttsmart = 'flyttsmart',\n lg = 'lg',\n sparfonster = 'sparfonster',\n power = 'power',\n traningspartner = 'traningspartner',\n superfront = 'superfront',\n inet = 'inet',\n design24 = 'design24',\n netatonce = 'netatonce',\n}\n\ntype Icon = {\n url: string;\n};\n\ninterface Customer {\n ID: number;\n post_title: string;\n post_name: string;\n post_type: string;\n filter: string;\n categories: CustomerCategory[];\n logo?: Icon;\n partner_url?: string;\n at_hemfixarna: boolean;\n info_title: string;\n widget_title?: string;\n info_text: string;\n checkout_title: string;\n checkout_trust_badges: { text: string }[];\n trust_badges: { text: string }[];\n source?: Source;\n password_protected: boolean;\n}\n\ninterface CustomerCategory {\n id: string;\n name: string;\n widget_title?: string;\n icon: string;\n show_products: boolean;\n products: { fields: Product }[] | false;\n sub_categories: CustomerSubCategory[] | false;\n add_painting: boolean;\n}\n\ninterface CustomerSubCategory {\n id: string;\n name: string;\n widget_title?: string;\n icon: string;\n products: { fields: Product }[];\n parent: string;\n add_painting: boolean;\n}\n\ninterface Part {\n ID: number;\n post_author: number;\n post_date: Date;\n post_date_gmt: Date;\n post_content: string;\n post_title: string;\n post_excerpt: string;\n post_status: string;\n comment_status: string;\n ping_status: string;\n post_password: string;\n post_name: string;\n to_ping: string;\n pinged: string;\n post_modified: Date;\n post_modified_gmt: Date;\n post_content_filtered: string;\n post_parent: 0 | 1;\n guid: string;\n menu_order: 0;\n post_type: string;\n post_mime_type: string;\n comment_count: number;\n filter: string;\n price: number;\n title: string;\n}\n\ninterface Product {\n ID: number;\n post_author: string;\n post_date: Date;\n post_date_gmt: Date;\n post_content: string;\n post_title: string;\n post_excerpt: string;\n post_status: string;\n comment_status: string;\n ping_status: string;\n post_password: string;\n post_name: string;\n to_ping: string;\n pinged: string;\n post_modified: Date;\n post_modified_gmt: Date;\n post_content_filtered: string;\n post_parent: 0;\n guid: string;\n menu_order: 0;\n post_type: string;\n post_mime_type: string;\n comment_count: 0;\n filter: string;\n price: number;\n icon?: Icon | string;\n parts?: Array<Part>;\n list: Array<{ bullet: string }>;\n terms: string;\n terms_checkout: string;\n terms_show_checkbox: boolean;\n rut: boolean;\n rot: boolean;\n green: boolean;\n hide_start_fee: boolean;\n description: string;\n category: string;\n title: string;\n invoice: string;\n invoice_price: string;\n invoice_description?: string;\n start_fee_obj: StartFee | null;\n}\n\ninterface Service {\n ID: 41857;\n icon?: Icon | string;\n post_author: 34419;\n post_date: Date;\n post_date_gmt: Date;\n post_content: string;\n post_title: string;\n post_excerpt: string;\n post_status: string;\n comment_status: string;\n ping_status: string;\n post_password: string;\n post_name: string;\n to_ping: string;\n pinged: string;\n post_modified: Date;\n post_modified_gmt: Date;\n post_content_filtered: string;\n post_parent: 0;\n guid: string;\n menu_order: 0;\n post_type: 'service';\n post_mime_type: string;\n comment_count: 0;\n filter: string;\n products: Array<Product>;\n}\n\ninterface Category {\n count: number;\n description: string;\n name: string;\n icon?: Icon | string;\n parent: 0 | 1;\n slug: string;\n taxonomy: 'service_cat';\n term_group: 0 | 1;\n term_id: number;\n term_order: string;\n term_taxonomy_id: number;\n sub_cats?: Array<Category>;\n services?: Array<Service>;\n}\n\ninterface WpOptions {\n link: { title: string; url: string };\n trust: { trust_badge: string }[];\n thank_you_image: string;\n start_fee: number;\n terms: string;\n maleri_title: string;\n maleri_text: string;\n}\ninterface CartPart {\n id: number;\n amount: number;\n price: number;\n name: string;\n}\n\ninterface CartItem {\n id: number;\n price: number;\n name: string;\n amount: number;\n parts: CartPart[];\n rut: boolean;\n rot: boolean;\n green: boolean;\n start_fee: boolean;\n terms_checkout: string;\n icon?: Icon | string;\n start_fee_obj: StartFee | null;\n}\n\nexport enum WidgetStyle {\n standard = 'standard',\n alternative = 'alternative',\n alternative_2 = 'alternative_2',\n alternative_3 = 'alternative_3',\n}\n\nexport enum TopCategory {\n byggmax = 'category/bygg',\n}\n\ninterface User {\n email: string;\n phone: string;\n ssn: string;\n firstName: string;\n lastName: string;\n street: string;\n zip: string;\n town: string;\n}\n\ninterface RutOptions {\n rut_start_fee_heading: string;\n rut_start_fee_text: string;\n rut_start_fee_text_secondary: string;\n}\n\ninterface RotOptions {\n rot_start_fee_heading: string;\n rot_start_fee_text: string;\n rot_start_fee_text_secondary: string;\n}\n\ninterface GreenOptions {\n green_start_fee_heading: string;\n green_start_fee_text: string;\n green_start_fee_text_secondary: string;\n}\n\ninterface SubSource {\n 'recordId': string;\n 'So_SubSource::Sus01_Name': string;\n 'So_SubSource::_id': string;\n 'So_SubSource::_id_Source': string;\n 'modId': string;\n}\n\ninterface FieldData {\n _id: string;\n So01_Name: string;\n So457_Aktiv_ac: number;\n So40_WebSubSource: string | number;\n So39_WebSource: number;\n rec_id: number;\n}\n\ninterface Source {\n fieldData: FieldData;\n sub_sources: SubSource[];\n}\n\ninterface SourcesRespone {\n dataInfo: {\n database: string;\n layout: string;\n table: string;\n totalRecordCount: number;\n foundCount: number;\n returnedCount: number;\n };\n data: Source[];\n}\n\ninterface StartFee {\n ID: number;\n title: string;\n price: number;\n pop_up: string | null;\n discount_type: string | null;\n description: string;\n}\n\nexport type {\n CartItem,\n CartPart,\n Category,\n Customer,\n CustomerCategory,\n CustomerSubCategory,\n GreenOptions,\n Icon,\n Part,\n Product,\n RotOptions,\n RutOptions,\n Service,\n Source,\n SourcesRespone,\n StartFee,\n User,\n WpOptions,\n};\n"],"version":3}
|
@@ -609,15 +609,16 @@ const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) =>
|
|
609
609
|
* @param vnodes a list of virtual DOM nodes to remove
|
610
610
|
* @param startIdx the index at which to start removing nodes (inclusive)
|
611
611
|
* @param endIdx the index at which to stop removing nodes (inclusive)
|
612
|
-
* @param vnode a VNode
|
613
|
-
* @param elm an element
|
614
612
|
*/
|
615
|
-
const removeVnodes = (vnodes, startIdx, endIdx
|
616
|
-
for (
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
elm
|
613
|
+
const removeVnodes = (vnodes, startIdx, endIdx) => {
|
614
|
+
for (let index = startIdx; index <= endIdx; ++index) {
|
615
|
+
const vnode = vnodes[index];
|
616
|
+
if (vnode) {
|
617
|
+
const elm = vnode.$elm$;
|
618
|
+
if (elm) {
|
619
|
+
// remove the vnode's element from the dom
|
620
|
+
elm.remove();
|
621
|
+
}
|
621
622
|
}
|
622
623
|
}
|
623
624
|
};
|
@@ -961,27 +962,83 @@ const scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
961
962
|
const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
|
962
963
|
return writeTask(dispatch) ;
|
963
964
|
};
|
965
|
+
/**
|
966
|
+
* Dispatch initial-render and update lifecycle hooks, enqueuing calls to
|
967
|
+
* component lifecycle methods like `componentWillLoad` as well as
|
968
|
+
* {@link updateComponent}, which will kick off the virtual DOM re-render.
|
969
|
+
*
|
970
|
+
* @param hostRef a reference to a host DOM node
|
971
|
+
* @param isInitialLoad whether we're on the initial load or not
|
972
|
+
* @returns an empty Promise which is used to enqueue a series of operations for
|
973
|
+
* the component
|
974
|
+
*/
|
964
975
|
const dispatchHooks = (hostRef, isInitialLoad) => {
|
965
976
|
const endSchedule = createTime('scheduleUpdate', hostRef.$cmpMeta$.$tagName$);
|
966
977
|
const instance = hostRef.$lazyInstance$ ;
|
967
|
-
|
978
|
+
// We're going to use this variable together with `enqueue` to implement a
|
979
|
+
// little promise-based queue. We start out with it `undefined`. When we add
|
980
|
+
// the first function to the queue we'll set this variable to be that
|
981
|
+
// function's return value. When we attempt to add subsequent values to the
|
982
|
+
// queue we'll check that value and, if it was a `Promise`, we'll then chain
|
983
|
+
// the new function off of that `Promise` using `.then()`. This will give our
|
984
|
+
// queue two nice properties:
|
985
|
+
//
|
986
|
+
// 1. If all functions added to the queue are synchronous they'll be called
|
987
|
+
// synchronously right away.
|
988
|
+
// 2. If all functions added to the queue are asynchronous they'll all be
|
989
|
+
// called in order after `dispatchHooks` exits.
|
990
|
+
let maybePromise;
|
968
991
|
if (isInitialLoad) {
|
969
992
|
{
|
970
993
|
hostRef.$flags$ |= 256 /* HOST_FLAGS.isListenReady */;
|
971
994
|
if (hostRef.$queuedListeners$) {
|
972
995
|
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
973
|
-
hostRef.$queuedListeners$ =
|
996
|
+
hostRef.$queuedListeners$ = undefined;
|
974
997
|
}
|
975
998
|
}
|
976
999
|
{
|
977
|
-
|
1000
|
+
// If `componentWillLoad` returns a `Promise` then we want to wait on
|
1001
|
+
// whatever's going on in that `Promise` before we launch into
|
1002
|
+
// rendering the component, doing other lifecycle stuff, etc. So
|
1003
|
+
// in that case we assign the returned promise to the variable we
|
1004
|
+
// declared above to hold a possible 'queueing' Promise
|
1005
|
+
maybePromise = safeCall(instance, 'componentWillLoad');
|
978
1006
|
}
|
979
1007
|
}
|
980
1008
|
endSchedule();
|
981
|
-
return
|
1009
|
+
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
982
1010
|
};
|
1011
|
+
/**
|
1012
|
+
* This function uses a Promise to implement a simple first-in, first-out queue
|
1013
|
+
* of functions to be called.
|
1014
|
+
*
|
1015
|
+
* The queue is ordered on the basis of the first argument. If it's
|
1016
|
+
* `undefined`, then nothing is on the queue yet, so the provided function can
|
1017
|
+
* be called synchronously (although note that this function may return a
|
1018
|
+
* `Promise`). The idea is that then the return value of that enqueueing
|
1019
|
+
* operation is kept around, so that if it was a `Promise` then subsequent
|
1020
|
+
* functions can be enqueued by calling this function again with that `Promise`
|
1021
|
+
* as the first argument.
|
1022
|
+
*
|
1023
|
+
* @param maybePromise either a `Promise` which should resolve before the next function is called or an 'empty' sentinel
|
1024
|
+
* @param fn a function to enqueue
|
1025
|
+
* @returns either a `Promise` or the return value of the provided function
|
1026
|
+
*/
|
1027
|
+
const enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn) : fn();
|
1028
|
+
/**
|
1029
|
+
* Check that a value is a `Promise`. To check, we first see if the value is an
|
1030
|
+
* instance of the `Promise` global. In a few circumstances, in particular if
|
1031
|
+
* the global has been overwritten, this is could be misleading, so we also do
|
1032
|
+
* a little 'duck typing' check to see if the `.then` property of the value is
|
1033
|
+
* defined and a function.
|
1034
|
+
*
|
1035
|
+
* @param maybePromise it might be a promise!
|
1036
|
+
* @returns whether it is or not
|
1037
|
+
*/
|
1038
|
+
const isPromisey = (maybePromise) => maybePromise instanceof Promise ||
|
1039
|
+
(maybePromise && maybePromise.then && typeof maybePromise.then === 'function');
|
983
1040
|
const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
984
|
-
|
1041
|
+
var _a;
|
985
1042
|
const elm = hostRef.$hostElement$;
|
986
1043
|
const endUpdate = createTime('update', hostRef.$cmpMeta$.$tagName$);
|
987
1044
|
const rc = elm['s-rc'];
|
@@ -1003,7 +1060,7 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
1003
1060
|
endRender();
|
1004
1061
|
endUpdate();
|
1005
1062
|
{
|
1006
|
-
const childrenPromises = elm['s-p'];
|
1063
|
+
const childrenPromises = (_a = elm['s-p']) !== null && _a !== void 0 ? _a : [];
|
1007
1064
|
const postUpdate = () => postUpdateComponent(hostRef);
|
1008
1065
|
if (childrenPromises.length === 0) {
|
1009
1066
|
postUpdate();
|
@@ -1116,9 +1173,6 @@ const safeCall = (instance, method, arg) => {
|
|
1116
1173
|
}
|
1117
1174
|
return undefined;
|
1118
1175
|
};
|
1119
|
-
const then = (promise, thenFn) => {
|
1120
|
-
return promise && promise.then ? promise.then(thenFn) : thenFn();
|
1121
|
-
};
|
1122
1176
|
const addHydratedFlag = (elm) => elm.classList.add('hydrated')
|
1123
1177
|
;
|
1124
1178
|
const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
|
@@ -1269,9 +1323,9 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1269
1323
|
const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
|
1270
1324
|
// initializeComponent
|
1271
1325
|
if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
|
1326
|
+
// Let the runtime know that the component has been initialized
|
1327
|
+
hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
|
1272
1328
|
{
|
1273
|
-
// we haven't initialized this element yet
|
1274
|
-
hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
|
1275
1329
|
// lazy loaded components
|
1276
1330
|
// request the component's implementation to be
|
1277
1331
|
// wired up with the host element
|
@@ -1653,4 +1707,4 @@ const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
1653
1707
|
|
1654
1708
|
export { Fragment as F, getAssetPath as a, bootstrapLazy as b, getRenderingRef as c, forceUpdate as f, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
1655
1709
|
|
1656
|
-
//# sourceMappingURL=index-
|
1710
|
+
//# sourceMappingURL=index-ea1d222e.js.map
|