hemfixarna-web-components 1.8.1 → 1.8.2
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 +61 -28
- package/dist/cjs/hemfixarna-address_15.cjs.entry.js.map +1 -1
- package/dist/cjs/hemfixarna-byggmax.cjs.entry.js +1 -1
- 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 +1 -1
- package/dist/cjs/hemfixarna-elfa.cjs.entry.js +1 -1
- package/dist/cjs/hemfixarna-fargvaruhuset.cjs.entry.js +1 -1
- package/dist/cjs/hemfixarna-flyttsmart.cjs.entry.js +1 -1
- package/dist/cjs/hemfixarna-forebygg.cjs.entry.js +1 -1
- package/dist/cjs/hemfixarna-hornbach.cjs.entry.js +1 -1
- package/dist/cjs/hemfixarna-kbygg.cjs.entry.js +1 -1
- package/dist/cjs/hemfixarna-klint.cjs.entry.js +1 -1
- package/dist/cjs/hemfixarna-kund.cjs.entry.js +1 -1
- package/dist/cjs/hemfixarna-norrgavel.cjs.entry.js +1 -1
- package/dist/cjs/hemfixarna-power.cjs.entry.js +1 -1
- package/dist/cjs/hemfixarna-service.cjs.entry.js +2 -2
- package/dist/cjs/hemfixarna-skanska.cjs.entry.js +1 -1
- package/dist/cjs/hemfixarna-sparfonster.cjs.entry.js +1 -1
- package/dist/cjs/hemfixarna-string-furniture.cjs.entry.js +1 -1
- package/dist/cjs/hemfixarna-superfront.cjs.entry.js +1 -1
- package/dist/cjs/hemfixarna-tesla.cjs.entry.js +1 -1
- package/dist/cjs/hemfixarna-traningspartner.cjs.entry.js +1 -1
- package/dist/cjs/hemfixarna-zaptec.cjs.entry.js +1 -1
- package/dist/cjs/{index-3e8dcb29.js → index-6af772cf.js} +2 -2
- package/dist/cjs/{index-3e8dcb29.js.map → index-6af772cf.js.map} +1 -1
- package/dist/cjs/{index-e6926623.js → index-b83343b9.js} +20 -74
- package/dist/cjs/index-b83343b9.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 +2 -2
- package/dist/collection/components/hemfixarna-checkout/hemfixarna-checkout.js.map +1 -1
- package/dist/collection/utils/calc.js +55 -22
- package/dist/collection/utils/calc.js.map +1 -1
- package/dist/esm/hemfixarna-address_15.entry.js +61 -28
- package/dist/esm/hemfixarna-address_15.entry.js.map +1 -1
- package/dist/esm/hemfixarna-byggmax.entry.js +1 -1
- 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 +1 -1
- package/dist/esm/hemfixarna-elfa.entry.js +1 -1
- package/dist/esm/hemfixarna-fargvaruhuset.entry.js +1 -1
- package/dist/esm/hemfixarna-flyttsmart.entry.js +1 -1
- package/dist/esm/hemfixarna-forebygg.entry.js +1 -1
- package/dist/esm/hemfixarna-hornbach.entry.js +1 -1
- package/dist/esm/hemfixarna-kbygg.entry.js +1 -1
- package/dist/esm/hemfixarna-klint.entry.js +1 -1
- package/dist/esm/hemfixarna-kund.entry.js +1 -1
- package/dist/esm/hemfixarna-norrgavel.entry.js +1 -1
- package/dist/esm/hemfixarna-power.entry.js +1 -1
- package/dist/esm/hemfixarna-service.entry.js +2 -2
- package/dist/esm/hemfixarna-skanska.entry.js +1 -1
- package/dist/esm/hemfixarna-sparfonster.entry.js +1 -1
- package/dist/esm/hemfixarna-string-furniture.entry.js +1 -1
- package/dist/esm/hemfixarna-superfront.entry.js +1 -1
- package/dist/esm/hemfixarna-tesla.entry.js +1 -1
- package/dist/esm/hemfixarna-traningspartner.entry.js +1 -1
- package/dist/esm/hemfixarna-zaptec.entry.js +1 -1
- package/dist/esm/{index-ea1d222e.js → index-04bcf90e.js} +20 -74
- package/dist/esm/index-04bcf90e.js.map +1 -0
- package/dist/esm/{index-aa51ad9d.js → index-8282f88e.js} +2 -2
- package/dist/esm/{index-aa51ad9d.js.map → index-8282f88e.js.map} +1 -1
- 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-3a05b24c.entry.js → p-075a13b6.entry.js} +2 -2
- package/dist/hemfixarna-components/{p-3b6bf910.entry.js → p-0aa722e7.entry.js} +2 -2
- package/dist/hemfixarna-components/p-1cbfbf5a.entry.js +2 -0
- package/dist/hemfixarna-components/p-1cbfbf5a.entry.js.map +1 -0
- package/dist/hemfixarna-components/{p-e2c0ddb1.entry.js → p-226a06bb.entry.js} +2 -2
- package/dist/hemfixarna-components/{p-76cec215.entry.js → p-24b53f91.entry.js} +2 -2
- package/dist/hemfixarna-components/p-32a8152b.js +3 -0
- package/dist/hemfixarna-components/p-32a8152b.js.map +1 -0
- package/dist/hemfixarna-components/{p-7f5b7e4d.entry.js → p-49c372d6.entry.js} +2 -2
- package/dist/hemfixarna-components/{p-b250a909.entry.js → p-506c766c.entry.js} +2 -2
- package/dist/hemfixarna-components/{p-e63f00b7.entry.js → p-53edf50e.entry.js} +2 -2
- package/dist/hemfixarna-components/{p-fcb4a599.entry.js → p-66515865.entry.js} +2 -2
- package/dist/hemfixarna-components/{p-d26af1b1.entry.js → p-6c0e0f95.entry.js} +2 -2
- package/dist/hemfixarna-components/{p-a66f910f.entry.js → p-8cc96dd9.entry.js} +2 -2
- package/dist/hemfixarna-components/{p-c7a68aec.entry.js → p-9b409902.entry.js} +2 -2
- package/dist/hemfixarna-components/{p-6d17838c.entry.js → p-a09f4a5d.entry.js} +2 -2
- package/dist/hemfixarna-components/{p-642db21e.js → p-b397b966.js} +2 -2
- package/dist/hemfixarna-components/{p-85caa0b1.entry.js → p-bf515028.entry.js} +2 -2
- package/dist/hemfixarna-components/{p-a64997e6.entry.js → p-d013eeee.entry.js} +2 -2
- package/dist/hemfixarna-components/{p-89e35a2b.entry.js → p-d281e9e3.entry.js} +2 -2
- package/dist/hemfixarna-components/{p-ae532b1e.entry.js → p-d6af83de.entry.js} +2 -2
- package/dist/hemfixarna-components/{p-e2cd711c.entry.js → p-e8800c3b.entry.js} +2 -2
- package/dist/hemfixarna-components/{p-7bdc4485.entry.js → p-eaa3e1c0.entry.js} +2 -2
- package/dist/hemfixarna-components/{p-eabbb263.entry.js → p-ee6d1a35.entry.js} +2 -2
- package/dist/hemfixarna-components/{p-e0c54744.entry.js → p-f6de66c8.entry.js} +2 -2
- package/dist/hemfixarna-components/{p-d96ab852.entry.js → p-facaf951.entry.js} +2 -2
- package/dist/types/stencil-public-runtime.d.ts +0 -3
- package/dist/types/utils/calc.d.ts +1 -1
- package/package.json +1 -1
- package/dist/cjs/index-e6926623.js.map +0 -1
- package/dist/esm/index-ea1d222e.js.map +0 -1
- package/dist/hemfixarna-components/p-6aed6e88.entry.js +0 -2
- package/dist/hemfixarna-components/p-6aed6e88.entry.js.map +0 -1
- package/dist/hemfixarna-components/p-c707b937.js +0 -3
- package/dist/hemfixarna-components/p-c707b937.js.map +0 -1
- /package/dist/hemfixarna-components/{p-3a05b24c.entry.js.map → p-075a13b6.entry.js.map} +0 -0
- /package/dist/hemfixarna-components/{p-3b6bf910.entry.js.map → p-0aa722e7.entry.js.map} +0 -0
- /package/dist/hemfixarna-components/{p-e2c0ddb1.entry.js.map → p-226a06bb.entry.js.map} +0 -0
- /package/dist/hemfixarna-components/{p-76cec215.entry.js.map → p-24b53f91.entry.js.map} +0 -0
- /package/dist/hemfixarna-components/{p-7f5b7e4d.entry.js.map → p-49c372d6.entry.js.map} +0 -0
- /package/dist/hemfixarna-components/{p-b250a909.entry.js.map → p-506c766c.entry.js.map} +0 -0
- /package/dist/hemfixarna-components/{p-e63f00b7.entry.js.map → p-53edf50e.entry.js.map} +0 -0
- /package/dist/hemfixarna-components/{p-fcb4a599.entry.js.map → p-66515865.entry.js.map} +0 -0
- /package/dist/hemfixarna-components/{p-d26af1b1.entry.js.map → p-6c0e0f95.entry.js.map} +0 -0
- /package/dist/hemfixarna-components/{p-a66f910f.entry.js.map → p-8cc96dd9.entry.js.map} +0 -0
- /package/dist/hemfixarna-components/{p-c7a68aec.entry.js.map → p-9b409902.entry.js.map} +0 -0
- /package/dist/hemfixarna-components/{p-6d17838c.entry.js.map → p-a09f4a5d.entry.js.map} +0 -0
- /package/dist/hemfixarna-components/{p-642db21e.js.map → p-b397b966.js.map} +0 -0
- /package/dist/hemfixarna-components/{p-85caa0b1.entry.js.map → p-bf515028.entry.js.map} +0 -0
- /package/dist/hemfixarna-components/{p-a64997e6.entry.js.map → p-d013eeee.entry.js.map} +0 -0
- /package/dist/hemfixarna-components/{p-89e35a2b.entry.js.map → p-d281e9e3.entry.js.map} +0 -0
- /package/dist/hemfixarna-components/{p-ae532b1e.entry.js.map → p-d6af83de.entry.js.map} +0 -0
- /package/dist/hemfixarna-components/{p-e2cd711c.entry.js.map → p-e8800c3b.entry.js.map} +0 -0
- /package/dist/hemfixarna-components/{p-7bdc4485.entry.js.map → p-eaa3e1c0.entry.js.map} +0 -0
- /package/dist/hemfixarna-components/{p-eabbb263.entry.js.map → p-ee6d1a35.entry.js.map} +0 -0
- /package/dist/hemfixarna-components/{p-e0c54744.entry.js.map → p-f6de66c8.entry.js.map} +0 -0
- /package/dist/hemfixarna-components/{p-d96ab852.entry.js.map → p-facaf951.entry.js.map} +0 -0
@@ -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-04bcf90e.js';
|
2
|
+
import { s as state } from './index-8282f88e.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-04bcf90e.js';
|
2
|
+
export { s as setNonce } from './index-04bcf90e.js';
|
3
3
|
|
4
4
|
/*
|
5
|
-
Stencil Client Patch Browser v3.
|
5
|
+
Stencil Client Patch Browser v3.2.1 | 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.
|
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 | 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 { s as state } from './index-
|
1
|
+
import { r as registerInstance, h } from './index-04bcf90e.js';
|
2
|
+
import { s as state } from './index-8282f88e.js';
|
3
3
|
|
4
4
|
const HemfixarnaService = class {
|
5
5
|
constructor(hostRef) {
|
@@ -609,16 +609,15 @@ 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
|
612
614
|
*/
|
613
|
-
const removeVnodes = (vnodes, startIdx, endIdx) => {
|
614
|
-
for (
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
// remove the vnode's element from the dom
|
620
|
-
elm.remove();
|
621
|
-
}
|
615
|
+
const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
616
|
+
for (; startIdx <= endIdx; ++startIdx) {
|
617
|
+
if ((vnode = vnodes[startIdx])) {
|
618
|
+
elm = vnode.$elm$;
|
619
|
+
// remove the vnode's element from the dom
|
620
|
+
elm.remove();
|
622
621
|
}
|
623
622
|
}
|
624
623
|
};
|
@@ -962,83 +961,27 @@ const scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
962
961
|
const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
|
963
962
|
return writeTask(dispatch) ;
|
964
963
|
};
|
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
|
-
*/
|
975
964
|
const dispatchHooks = (hostRef, isInitialLoad) => {
|
976
965
|
const endSchedule = createTime('scheduleUpdate', hostRef.$cmpMeta$.$tagName$);
|
977
966
|
const instance = hostRef.$lazyInstance$ ;
|
978
|
-
|
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;
|
967
|
+
let promise;
|
991
968
|
if (isInitialLoad) {
|
992
969
|
{
|
993
970
|
hostRef.$flags$ |= 256 /* HOST_FLAGS.isListenReady */;
|
994
971
|
if (hostRef.$queuedListeners$) {
|
995
972
|
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
996
|
-
hostRef.$queuedListeners$ =
|
973
|
+
hostRef.$queuedListeners$ = null;
|
997
974
|
}
|
998
975
|
}
|
999
976
|
{
|
1000
|
-
|
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');
|
977
|
+
promise = safeCall(instance, 'componentWillLoad');
|
1006
978
|
}
|
1007
979
|
}
|
1008
980
|
endSchedule();
|
1009
|
-
return
|
981
|
+
return then(promise, () => updateComponent(hostRef, instance, isInitialLoad));
|
1010
982
|
};
|
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');
|
1040
983
|
const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
1041
|
-
|
984
|
+
// updateComponent
|
1042
985
|
const elm = hostRef.$hostElement$;
|
1043
986
|
const endUpdate = createTime('update', hostRef.$cmpMeta$.$tagName$);
|
1044
987
|
const rc = elm['s-rc'];
|
@@ -1060,7 +1003,7 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
1060
1003
|
endRender();
|
1061
1004
|
endUpdate();
|
1062
1005
|
{
|
1063
|
-
const childrenPromises =
|
1006
|
+
const childrenPromises = elm['s-p'];
|
1064
1007
|
const postUpdate = () => postUpdateComponent(hostRef);
|
1065
1008
|
if (childrenPromises.length === 0) {
|
1066
1009
|
postUpdate();
|
@@ -1173,6 +1116,9 @@ const safeCall = (instance, method, arg) => {
|
|
1173
1116
|
}
|
1174
1117
|
return undefined;
|
1175
1118
|
};
|
1119
|
+
const then = (promise, thenFn) => {
|
1120
|
+
return promise && promise.then ? promise.then(thenFn) : thenFn();
|
1121
|
+
};
|
1176
1122
|
const addHydratedFlag = (elm) => elm.classList.add('hydrated')
|
1177
1123
|
;
|
1178
1124
|
const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
|
@@ -1323,9 +1269,9 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1323
1269
|
const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
|
1324
1270
|
// initializeComponent
|
1325
1271
|
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 */;
|
1328
1272
|
{
|
1273
|
+
// we haven't initialized this element yet
|
1274
|
+
hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
|
1329
1275
|
// lazy loaded components
|
1330
1276
|
// request the component's implementation to be
|
1331
1277
|
// wired up with the host element
|
@@ -1707,4 +1653,4 @@ const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
1707
1653
|
|
1708
1654
|
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 };
|
1709
1655
|
|
1710
|
-
//# sourceMappingURL=index-
|
1656
|
+
//# sourceMappingURL=index-04bcf90e.js.map
|