@mgdis/mg-components 6.10.1 → 6.11.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.
- package/dist/cjs/{index-CL_COdxv.js → index-B_WwxtkQ.js} +4 -4
- package/dist/cjs/{index-CL_COdxv.js.map → index-B_WwxtkQ.js.map} +1 -1
- package/dist/cjs/{index.es-DaPqByCe.js → index.es-C-3Gv8Eu.js} +47 -43
- package/dist/cjs/index.es-C-3Gv8Eu.js.map +1 -0
- package/dist/cjs/mg-action-more_37.cjs.entry.js +186 -187
- package/dist/cjs/mg-action-more_37.cjs.entry.js.map +1 -1
- package/dist/cjs/mg-alert.cjs.entry.js +6 -6
- package/dist/cjs/mg-input-combobox.cjs.entry.js +74 -71
- package/dist/cjs/mg-input-combobox.cjs.entry.js.map +1 -1
- package/dist/cjs/mg-input-combobox.entry.cjs.js.map +1 -1
- package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +6 -6
- package/dist/cjs/mg-loader.cjs.entry.js +3 -3
- package/dist/cjs/mg-progress.cjs.entry.js +9 -9
- package/dist/collection/components/atoms/mg-button/mg-button.js +1 -1
- package/dist/collection/components/atoms/mg-button/mg-button.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.conf.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js +67 -45
- package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +25 -30
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js.map +1 -1
- package/dist/collection/components/molecules/mg-details/mg-details.js +5 -1
- package/dist/collection/components/molecules/mg-details/mg-details.js.map +1 -1
- package/dist/components/index.es.js +40 -37
- package/dist/components/index.es.js.map +1 -1
- package/dist/components/index2.js +2 -2
- package/dist/components/mg-action-more.js +6 -6
- package/dist/components/mg-alert.js +5 -5
- package/dist/components/mg-badge2.js +5 -5
- package/dist/components/mg-button2.js +6 -6
- package/dist/components/mg-button2.js.map +1 -1
- package/dist/components/mg-character-left2.js +4 -4
- package/dist/components/mg-details.js +6 -2
- package/dist/components/mg-details.js.map +1 -1
- package/dist/components/mg-form.js +7 -7
- package/dist/components/mg-icon2.js +6 -6
- package/dist/components/mg-illustrated-message.js +5 -5
- package/dist/components/mg-input-checkbox.js +5 -5
- package/dist/components/mg-input-combobox.js +73 -70
- package/dist/components/mg-input-combobox.js.map +1 -1
- package/dist/components/mg-input-date.js +14 -14
- package/dist/components/mg-input-numeric.js +11 -11
- package/dist/components/mg-input-password.js +2 -2
- package/dist/components/mg-input-radio.js +6 -6
- package/dist/components/mg-input-rich-text-editor.js +5 -5
- package/dist/components/mg-input-select2.js +31 -36
- package/dist/components/mg-input-select2.js.map +1 -1
- package/dist/components/mg-input-text2.js +6 -6
- package/dist/components/mg-input-textarea.js +5 -5
- package/dist/components/mg-input-title2.js +3 -3
- package/dist/components/mg-input-toggle.js +5 -5
- package/dist/components/mg-input2.js +6 -6
- package/dist/components/mg-item-more2.js +7 -7
- package/dist/components/mg-loader2.js +2 -2
- package/dist/components/mg-menu-item2.js +8 -8
- package/dist/components/mg-message2.js +4 -4
- package/dist/components/mg-modal.js +7 -7
- package/dist/components/mg-pagination2.js +6 -6
- package/dist/components/mg-panel.js +8 -8
- package/dist/components/mg-popover-content2.js +3 -3
- package/dist/components/mg-popover2.js +5 -5
- package/dist/components/mg-progress.js +9 -9
- package/dist/components/mg-table.js +5 -5
- package/dist/components/mg-tabs.js +11 -11
- package/dist/components/mg-tag.js +3 -3
- package/dist/components/mg-tooltip2.js +8 -8
- package/dist/esm/{index-DALWFL9i.js → index-DHpyFawS.js} +4 -4
- package/dist/esm/{index-DALWFL9i.js.map → index-DHpyFawS.js.map} +1 -1
- package/dist/esm/{index.es-hNwGkhG6.js → index.es-lyrZ9KRh.js} +42 -39
- package/dist/esm/index.es-lyrZ9KRh.js.map +1 -0
- package/dist/esm/mg-action-more_37.entry.js +186 -187
- package/dist/esm/mg-action-more_37.entry.js.map +1 -1
- package/dist/esm/mg-alert.entry.js +6 -6
- package/dist/esm/mg-input-combobox.entry.js +74 -71
- package/dist/esm/mg-input-combobox.entry.js.map +1 -1
- package/dist/esm/mg-input-rich-text-editor.entry.js +6 -6
- package/dist/esm/mg-loader.entry.js +3 -3
- package/dist/esm/mg-progress.entry.js +9 -9
- package/dist/mg-components/mg-components.esm.js +1 -1
- package/dist/mg-components/mg-input-combobox.entry.esm.js.map +1 -1
- package/dist/mg-components/{p-bf5de898.entry.js → p-596c0e08.entry.js} +2 -2
- package/dist/mg-components/p-8a3bd8ad.entry.js +2 -0
- package/dist/mg-components/p-8a3bd8ad.entry.js.map +1 -0
- package/dist/mg-components/p-98a74b62.entry.js +2 -0
- package/dist/mg-components/{p-a52a168c.entry.js.map → p-98a74b62.entry.js.map} +1 -1
- package/dist/mg-components/{p-Cg3R_y_o.js → p-C-vIqOyI.js} +2 -2
- package/dist/mg-components/{p-Cg3R_y_o.js.map → p-C-vIqOyI.js.map} +1 -1
- package/dist/mg-components/{p-e33557f9.entry.js → p-d4ed3aad.entry.js} +2 -2
- package/dist/mg-components/p-e822bd96.entry.js +2 -0
- package/dist/mg-components/{p-352cfc01.entry.js.map → p-e822bd96.entry.js.map} +1 -1
- package/dist/mg-components/p-fc7b96e6.entry.js +2 -0
- package/dist/mg-components/p-fc7b96e6.entry.js.map +1 -0
- package/dist/mg-components/p-lyrZ9KRh.js +2 -0
- package/dist/mg-components/p-lyrZ9KRh.js.map +1 -0
- package/dist/types/components/molecules/inputs/mg-input-combobox/mg-input-combobox.conf.d.ts +1 -1
- package/dist/types/components/molecules/inputs/mg-input-combobox/mg-input-combobox.d.ts +5 -0
- package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +0 -9
- package/dist/types/components/molecules/mg-details/mg-details.d.ts +1 -0
- package/dist/types/components.d.ts +5 -0
- package/ide/intellij/web-types.json +6 -2
- package/ide/vscode/html-custom-data.json +1 -1
- package/package.json +8 -8
- package/dist/cjs/index.es-DaPqByCe.js.map +0 -1
- package/dist/esm/index.es-hNwGkhG6.js.map +0 -1
- package/dist/mg-components/p-352cfc01.entry.js +0 -2
- package/dist/mg-components/p-68f7de47.entry.js +0 -2
- package/dist/mg-components/p-68f7de47.entry.js.map +0 -1
- package/dist/mg-components/p-a52a168c.entry.js +0 -2
- package/dist/mg-components/p-dcefa0b0.entry.js +0 -2
- package/dist/mg-components/p-dcefa0b0.entry.js.map +0 -1
- package/dist/mg-components/p-hNwGkhG6.js +0 -2
- package/dist/mg-components/p-hNwGkhG6.js.map +0 -1
- /package/dist/mg-components/{p-bf5de898.entry.js.map → p-596c0e08.entry.js.map} +0 -0
- /package/dist/mg-components/{p-e33557f9.entry.js.map → p-d4ed3aad.entry.js.map} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.es-hNwGkhG6.js","sources":["../stencil-helpers/dist/index.es.js"],"sourcesContent":["var De = Object.defineProperty;\nvar ce = (e) => {\n throw TypeError(e);\n};\nvar He = (e, t, r) => t in e ? De(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;\nvar d = (e, t, r) => He(e, typeof t != \"symbol\" ? t + \"\" : t, r), fe = (e, t, r) => t.has(e) || ce(\"Cannot \" + r);\nvar v = (e, t, r) => (fe(e, t, \"read from private field\"), r ? r.call(e) : t.get(e)), k = (e, t, r) => t.has(e) ? ce(\"Cannot add the same private member more than once\") : t instanceof WeakSet ? t.add(e) : t.set(e, r), U = (e, t, r, s) => (fe(e, t, \"write to private field\"), s ? s.call(e, r) : t.set(e, r), r);\nconst Zt = (e = \"\", t = 10) => {\n const r = new Uint8Array(t);\n crypto.getRandomValues(r);\n const s = Array.from(r).map((n) => n.toString(16).padStart(2, \"0\")).join(\"\").slice(0, t);\n return e !== \"\" ? `${e}-${s}` : s;\n}, Dt = (e) => qe(e) && /^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/.exec(e) !== null;\nclass Ht {\n constructor(t = []) {\n /**\n * Available classes\n */\n d(this, \"classes\");\n /**\n * Add class\n * @param className - class name to add\n */\n d(this, \"add\", (t) => {\n this.has(t) || this.classes.push(t);\n });\n /**\n * Delete class\n * @param className - class name to delete\n */\n d(this, \"delete\", (t) => {\n const r = this.classes.indexOf(t);\n r > -1 && this.classes.splice(r, 1);\n });\n /**\n * Check if class exist in list\n * @param className - class name to check\n * @returns class name is in the list\n */\n d(this, \"has\", (t) => this.classes.includes(t));\n /**\n * Join classes seperated by spaces\n * @returns joined values\n */\n d(this, \"join\", () => this.classes.join(\" \"));\n this.classes = t;\n }\n}\nconst qt = (e) => Array.isArray(e) && e.every((t) => typeof t == \"string\"), Bt = (e, t) => t.includes(e == null ? void 0 : e.tagName.toLowerCase()), Gt = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"]), [identifier], mg-button', Jt = (e) => {\n const t = _e(e), r = be(e);\n return [e, ...t, ...r];\n}, _e = (e, t = []) => {\n if (e.self !== e.top)\n try {\n const r = e.parent;\n return r ? (t.push(r), _e(r, t)) : t;\n } catch (r) {\n return console.error(\"Different hosts between iframes:\", r), t;\n }\n return t;\n}, be = (e, t = []) => {\n if (e.frames.length > 0)\n for (const r of Array.from(e.frames))\n t.push(r), be(r, t);\n return t;\n}, qe = (e) => typeof e == \"string\" && e.trim() !== \"\", Xt = (e) => typeof e == \"object\" ? JSON.stringify(e) : `${e}`, Kt = (e) => typeof e == \"number\" && !Number.isNaN(e), Yt = (e) => typeof e == \"string\" ? e.toLocaleLowerCase().normalize(\"NFD\").replaceAll(/[\\u0300-\\u036f]/g, \"\") : e, Qt = async (e) => {\n if (e) return e();\n}, ne = (e) => typeof e == \"object\" && !Array.isArray(e) && e !== null, Be = (e, t, r) => {\n const s = \".\";\n if (!ne(e) || typeof t != \"string\")\n return r;\n const [n, ...i] = t.split(s);\n return i.length ? Be(e[n], i.join(s)) : e[n];\n}, Vt = {\n FIRST: \"first\",\n NEXT: \"next\",\n PREVIOUS: \"previous\",\n LAST: \"last\"\n}, ve = 10;\nclass Ge {\n constructor(t) {\n /**\n * Define items\n */\n d(this, \"items\", []);\n /**\n * Define total\n */\n d(this, \"total\");\n /**\n * Define top\n */\n d(this, \"top\", ve);\n /**\n * Define next\n */\n d(this, \"next\");\n /**\n * Define base index\n */\n d(this, \"baseIndex\", 1);\n /**\n * Get index of items from cursor\n * @param cursor - cursor to find\n * @param oldItem - previous item\n * @returns item index\n */\n d(this, \"getIndexFromCursor\", (t = \"first\", r) => {\n if (!Array.isArray(this.items) || !this.items.length) return null;\n const n = this.items.length - this.baseIndex;\n let i = 0, o = 0;\n if ([\"previous\", \"next\"].includes(t) && r) {\n const f = this.items.findIndex((c) => JSON.stringify(c) === JSON.stringify(r));\n if (f === -1) return 0;\n o = f;\n }\n return t === \"first\" ? i = 0 : t === \"last\" ? i = n : t === \"previous\" ? i = JSON.stringify(this.items[o]) === JSON.stringify(this.items[0]) ? n : o - this.baseIndex : t === \"next\" && (i = JSON.stringify(this.items[o]) === JSON.stringify(this.items[n]) ? 0 : o + this.baseIndex), i;\n });\n if (ne(t))\n Array.isArray(t.items) && (this.items = t.items), typeof t.top == \"number\" && (this.top = t.top), this.total = typeof t.total == \"number\" ? t.total : this.items.length, this.next = t.next;\n else\n throw new Error(\"Page - init must match IPage type.\");\n }\n}\nvar O, N, C;\nclass er {\n constructor(t, r) {\n /**\n * Define paginated items\n */\n d(this, \"items\", []);\n /* Privates */\n k(this, O, ve);\n k(this, N);\n k(this, C);\n /**\n * Get page\n * @param offset - pagiantion offset\n * @param filter - filter methode\n * @returns formated page\n */\n d(this, \"getPage\", (t = 0, r) => {\n const s = typeof r == \"function\" ? this.items.filter(r) : this.items;\n let n;\n return v(this, N) ? n = v(this, N) : s.length > t + v(this, O) && (n = () => this.getPage(t + v(this, O), r)), new Ge({\n items: s.slice(t, t + v(this, O)),\n total: v(this, C),\n top: v(this, O),\n next: n\n });\n });\n Array.isArray(t) && (this.items = t), r && ([\"string\", \"function\"].includes(typeof r.next) || ne(r.next) && URL.canParse(r.next)) && U(this, N, r.next), typeof (r == null ? void 0 : r.top) == \"number\" && U(this, O, r.top), typeof (r == null ? void 0 : r.total) == \"number\" && U(this, C, r.total);\n }\n}\nO = new WeakMap(), N = new WeakMap(), C = new WeakMap();\nvar K = {\n updatable: !0,\n slotRelocation: !0,\n // TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior\n experimentalSlotFixes: !1\n}, Je = Object.defineProperty, Xe = (e, t) => {\n for (var r in t)\n Je(e, r, { get: t[r], enumerable: !0 });\n}, Ke = \"http://www.w3.org/2000/svg\", Ye = \"http://www.w3.org/1999/xhtml\", ue = (e, t) => t in e, pe = \"http://www.w3.org/1999/xlink\", A = typeof window < \"u\" ? window : {}, z = {\n $flags$: 0,\n $resourcesUrl$: \"\",\n jmp: (e) => e(),\n raf: (e) => requestAnimationFrame(e),\n ael: (e, t, r, s) => e.addEventListener(t, r, s),\n rel: (e, t, r, s) => e.removeEventListener(t, r, s),\n ce: (e, t) => new CustomEvent(e, t)\n}, Qe = (e) => e != null && e !== void 0, we = (e) => (e = typeof e, e === \"object\" || e === \"function\"), Ve = {};\nXe(Ve, {\n err: () => me,\n map: () => et,\n ok: () => Q,\n unwrap: () => tt,\n unwrapErr: () => rt\n});\nvar Q = (e) => ({\n isOk: !0,\n isErr: !1,\n value: e\n}), me = (e) => ({\n isOk: !1,\n isErr: !0,\n value: e\n});\nfunction et(e, t) {\n if (e.isOk) {\n const r = t(e.value);\n return r instanceof Promise ? r.then((s) => Q(s)) : Q(r);\n }\n if (e.isErr) {\n const r = e.value;\n return me(r);\n }\n throw \"should never get here\";\n}\nvar tt = (e) => {\n if (e.isOk)\n return e.value;\n throw e.value;\n}, rt = (e) => {\n if (e.isErr)\n return e.value;\n throw e.value;\n}, xe = (e) => {\n const t = $e(e, \"childNodes\");\n e.tagName && e.tagName.includes(\"-\") && e[\"s-cr\"] && e.tagName !== \"SLOT-FB\" && Ee(t, e.tagName).forEach((s) => {\n s.nodeType === 1 && s.tagName === \"SLOT-FB\" && (nt(s, ie(s), !1).length ? s.hidden = !0 : s.hidden = !1);\n });\n let r = 0;\n for (r = 0; r < t.length; r++) {\n const s = t[r];\n s.nodeType === 1 && $e(s, \"childNodes\").length && xe(s);\n }\n}, st = (e) => {\n const t = [];\n for (let r = 0; r < e.length; r++) {\n const s = e[r][\"s-nr\"] || void 0;\n s && s.isConnected && t.push(s);\n }\n return t;\n};\nfunction Ee(e, t, r) {\n let s = 0, n = [], i;\n for (; s < e.length; s++)\n i = e[s], i[\"s-sr\"] && (!t || i[\"s-hn\"] === t) && r === void 0 && n.push(i), n = [...n, ...Ee(i.childNodes, t, r)];\n return n;\n}\nvar nt = (e, t, r = !0) => {\n const s = [];\n (r && e[\"s-sr\"] || !e[\"s-sr\"]) && s.push(e);\n let n = e;\n for (; n = n.nextSibling; )\n ie(n) === t && (r || !n[\"s-sr\"]) && s.push(n);\n return s;\n}, ge = (e, t) => e.nodeType === 1 ? e.getAttribute(\"slot\") === null && t === \"\" || e.getAttribute(\"slot\") === t : e[\"s-sn\"] === t ? !0 : t === \"\", ie = (e) => typeof e[\"s-sn\"] == \"string\" ? e[\"s-sn\"] : e.nodeType === 1 && e.getAttribute(\"slot\") || void 0;\nfunction it(e) {\n if (e.assignedElements || e.assignedNodes || !e[\"s-sr\"]) return;\n const t = (r) => (function(s) {\n const n = [], i = this[\"s-sn\"];\n s != null && s.flatten && console.error(`\n Flattening is not supported for Stencil non-shadow slots. \n You can use \\`.childNodes\\` to nested slot fallback content.\n If you have a particular use case, please open an issue on the Stencil repo.\n `);\n const o = this[\"s-cr\"].parentElement;\n return (o.__childNodes ? o.childNodes : st(o.childNodes)).forEach((c) => {\n i === ie(c) && n.push(c);\n }), r ? n.filter(\n (c) => c.nodeType === 1\n /* ElementNode */\n ) : n;\n }).bind(e);\n e.assignedElements = t(!0), e.assignedNodes = t(!1);\n}\nfunction $e(e, t) {\n if (\"__\" + t in e) {\n const r = e[\"__\" + t];\n return typeof r != \"function\" ? r : r.bind(e);\n } else\n return typeof e[t] != \"function\" ? e[t] : e[t].bind(e);\n}\nvar ot = (e, t, ...r) => {\n let s = null, n = null, i = null, o = !1, f = !1;\n const c = [], l = (a) => {\n for (let g = 0; g < a.length; g++)\n s = a[g], Array.isArray(s) ? l(s) : s != null && typeof s != \"boolean\" && ((o = !we(s)) && (s = String(s)), o && f ? c[c.length - 1].$text$ += s : c.push(o ? V(null, s) : s), f = o);\n };\n l(r);\n const p = V(e, null);\n return p.$attrs$ = t, c.length > 0 && (p.$children$ = c), p.$key$ = n, p.$name$ = i, p;\n}, V = (e, t) => {\n const r = {\n $flags$: 0,\n $tag$: e,\n $text$: t,\n $elm$: null,\n $children$: null\n };\n return r.$attrs$ = null, r.$key$ = null, r.$name$ = null, r;\n}, at = {}, lt = (e) => e && e.$tag$ === at, de = (e, t, r, s, n, i, o) => {\n if (r === s)\n return;\n let f = ue(e, t), c = t.toLowerCase();\n if (t === \"class\") {\n const l = e.classList, p = he(r);\n let a = he(s);\n l.remove(...p.filter((g) => g && !a.includes(g))), l.add(...a.filter((g) => g && !p.includes(g)));\n } else if (t === \"style\") {\n for (const l in r)\n (!s || s[l] == null) && (l.includes(\"-\") ? e.style.removeProperty(l) : e.style[l] = \"\");\n for (const l in s)\n (!r || s[l] !== r[l]) && (l.includes(\"-\") ? e.style.setProperty(l, s[l]) : e.style[l] = s[l]);\n } else if (t !== \"key\") if (t === \"ref\")\n s && s(e);\n else if (!e.__lookupSetter__(t) && t[0] === \"o\" && t[1] === \"n\") {\n if (t[2] === \"-\" ? t = t.slice(3) : ue(A, c) ? t = c.slice(2) : t = c[2] + t.slice(3), r || s) {\n const l = t.endsWith(Se);\n t = t.replace(ft, \"\"), r && z.rel(e, t, r, l), s && z.ael(e, t, s, l);\n }\n } else {\n const l = we(s);\n if ((f || l && s !== null) && !n)\n try {\n if (e.tagName.includes(\"-\"))\n e[t] !== s && (e[t] = s);\n else {\n const a = s ?? \"\";\n t === \"list\" ? f = !1 : (r == null || e[t] != a) && (typeof e.__lookupSetter__(t) == \"function\" ? e[t] = a : e.setAttribute(t, a));\n }\n } catch {\n }\n let p = !1;\n c !== (c = c.replace(/^xlink\\:?/, \"\")) && (t = c, p = !0), s == null || s === !1 ? (s !== !1 || e.getAttribute(t) === \"\") && (p ? e.removeAttributeNS(pe, t) : e.removeAttribute(t)) : (!f || i & 4 || n) && !l && e.nodeType === 1 && (s = s === !0 ? \"\" : s, p ? e.setAttributeNS(pe, t, s) : e.setAttribute(t, s));\n }\n}, ct = /\\s/, he = (e) => (typeof e == \"object\" && e && \"baseVal\" in e && (e = e.baseVal), !e || typeof e != \"string\" ? [] : e.split(ct)), Se = \"Capture\", ft = new RegExp(Se + \"$\"), ee = (e, t, r, s) => {\n const n = t.$elm$.nodeType === 11 && t.$elm$.host ? t.$elm$.host : t.$elm$, i = e && e.$attrs$ || {}, o = t.$attrs$ || {};\n for (const f of ye(Object.keys(i)))\n f in o || de(\n n,\n f,\n i[f],\n void 0,\n r,\n t.$flags$\n );\n for (const f of ye(Object.keys(o)))\n de(\n n,\n f,\n i[f],\n o[f],\n r,\n t.$flags$\n );\n};\nfunction ye(e) {\n return e.includes(\"ref\") ? (\n // we need to sort these to ensure that `'ref'` is the last attr\n [...e.filter((t) => t !== \"ref\"), \"ref\"]\n ) : (\n // no need to sort, return the original array\n e\n );\n}\nvar Z, q, L, te = !1, B = !1, oe = !1, b = !1, G = (e, t, r) => {\n var s;\n const n = t.$children$[r];\n let i = 0, o, f, c;\n if (te || (oe = !0, n.$tag$ === \"slot\" && (n.$flags$ |= n.$children$ ? (\n // slot element has fallback content\n // still create an element that \"mocks\" the slot element\n 2\n ) : (\n // slot element does not have fallback content\n // create an html comment we'll use to always reference\n // where actual slot content should sit next to\n 1\n ))), n.$text$ !== null)\n o = n.$elm$ = A.document.createTextNode(n.$text$);\n else if (n.$flags$ & 1)\n o = n.$elm$ = A.document.createTextNode(\"\"), ee(null, n, b);\n else {\n if (b || (b = n.$tag$ === \"svg\"), !A.document)\n throw new Error(\n \"You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component.\"\n );\n if (o = n.$elm$ = A.document.createElementNS(\n b ? Ke : Ye,\n !te && K.slotRelocation && n.$flags$ & 2 ? \"slot-fb\" : n.$tag$\n ), b && n.$tag$ === \"foreignObject\" && (b = !1), ee(null, n, b), Qe(Z) && o[\"s-si\"] !== Z && o.classList.add(o[\"s-si\"] = Z), n.$children$)\n for (i = 0; i < n.$children$.length; ++i)\n f = G(e, n, i), f && o.appendChild(f);\n n.$tag$ === \"svg\" ? b = !1 : o.tagName === \"foreignObject\" && (b = !0);\n }\n return o[\"s-hn\"] = L, n.$flags$ & 3 && (o[\"s-sr\"] = !0, o[\"s-cr\"] = q, o[\"s-sn\"] = n.$name$ || \"\", o[\"s-rf\"] = (s = n.$attrs$) == null ? void 0 : s.ref, it(o), c = e && e.$children$ && e.$children$[r], c && c.$tag$ === n.$tag$ && e.$elm$ && M(e.$elm$, !1), ke(q, o, t.$elm$, e == null ? void 0 : e.$elm$)), o;\n}, M = (e, t) => {\n z.$flags$ |= 1;\n const r = Array.from(e.__childNodes || e.childNodes);\n e[\"s-sr\"] && K.experimentalSlotFixes;\n for (let s = r.length - 1; s >= 0; s--) {\n const n = r[s];\n n[\"s-hn\"] !== L && n[\"s-ol\"] && (T(F(n).parentNode, n, F(n)), n[\"s-ol\"].remove(), n[\"s-ol\"] = void 0, n[\"s-sh\"] = void 0, oe = !0), t && M(n, t);\n }\n z.$flags$ &= -2;\n}, Oe = (e, t, r, s, n, i) => {\n let o = e[\"s-cr\"] && e[\"s-cr\"].parentNode || e, f;\n for (o.shadowRoot && o.tagName === L && (o = o.shadowRoot); n <= i; ++n)\n s[n] && (f = G(null, r, n), f && (s[n].$elm$ = f, T(o, f, F(t))));\n}, Ae = (e, t, r) => {\n for (let s = t; s <= r; ++s) {\n const n = e[s];\n if (n) {\n const i = n.$elm$;\n Te(n), i && (B = !0, i[\"s-ol\"] ? i[\"s-ol\"].remove() : M(i, !0), i.remove());\n }\n }\n}, ut = (e, t, r, s, n = !1) => {\n let i = 0, o = 0, f = 0, c = 0, l = t.length - 1, p = t[0], a = t[l], g = s.length - 1, u = s[0], $ = s[g], _, w;\n for (; i <= l && o <= g; )\n if (p == null)\n p = t[++i];\n else if (a == null)\n a = t[--l];\n else if (u == null)\n u = s[++o];\n else if ($ == null)\n $ = s[--g];\n else if (W(p, u, n))\n R(p, u, n), p = t[++i], u = s[++o];\n else if (W(a, $, n))\n R(a, $, n), a = t[--l], $ = s[--g];\n else if (W(p, $, n))\n (p.$tag$ === \"slot\" || $.$tag$ === \"slot\") && M(p.$elm$.parentNode, !1), R(p, $, n), T(e, p.$elm$, a.$elm$.nextSibling), p = t[++i], $ = s[--g];\n else if (W(a, u, n))\n (p.$tag$ === \"slot\" || $.$tag$ === \"slot\") && M(a.$elm$.parentNode, !1), R(a, u, n), T(e, a.$elm$, p.$elm$), a = t[--l], u = s[++o];\n else {\n for (f = -1, c = i; c <= l; ++c)\n if (t[c] && t[c].$key$ !== null && t[c].$key$ === u.$key$) {\n f = c;\n break;\n }\n f >= 0 ? (w = t[f], w.$tag$ !== u.$tag$ ? _ = G(t && t[o], r, f) : (R(w, u, n), t[f] = void 0, _ = w.$elm$), u = s[++o]) : (_ = G(t && t[o], r, o), u = s[++o]), _ && T(\n F(p.$elm$).parentNode,\n _,\n F(p.$elm$)\n );\n }\n i > l ? Oe(\n e,\n s[g + 1] == null ? null : s[g + 1].$elm$,\n r,\n s,\n o,\n g\n ) : o > g && Ae(t, i, l);\n}, W = (e, t, r = !1) => e.$tag$ === t.$tag$ ? e.$tag$ === \"slot\" ? e.$name$ === t.$name$ : r ? (r && !e.$key$ && t.$key$ && (e.$key$ = t.$key$), !0) : e.$key$ === t.$key$ : !1, F = (e) => e && e[\"s-ol\"] || e, R = (e, t, r = !1) => {\n const s = t.$elm$ = e.$elm$, n = e.$children$, i = t.$children$, o = t.$tag$, f = t.$text$;\n let c;\n f === null ? (b = o === \"svg\" ? !0 : o === \"foreignObject\" ? !1 : b, ee(e, t, b), n !== null && i !== null ? ut(s, n, t, i, r) : i !== null ? (e.$text$ !== null && (s.textContent = \"\"), Oe(s, null, t, i, 0, i.length - 1)) : (\n // don't do this on initial render as it can cause non-hydrated content to be removed\n !r && K.updatable && n !== null && Ae(n, 0, n.length - 1)\n ), b && o === \"svg\" && (b = !1)) : (c = s[\"s-cr\"]) ? c.parentNode.textContent = f : e.$text$ !== f && (s.data = f);\n}, x = [], je = (e) => {\n let t, r, s;\n const n = e.__childNodes || e.childNodes;\n for (const i of n) {\n if (i[\"s-sr\"] && (t = i[\"s-cr\"]) && t.parentNode) {\n r = t.parentNode.__childNodes || t.parentNode.childNodes;\n const o = i[\"s-sn\"];\n for (s = r.length - 1; s >= 0; s--)\n if (t = r[s], !t[\"s-cn\"] && !t[\"s-nr\"] && t[\"s-hn\"] !== i[\"s-hn\"])\n if (ge(t, o)) {\n let f = x.find((c) => c.$nodeToRelocate$ === t);\n B = !0, t[\"s-sn\"] = t[\"s-sn\"] || o, f ? (f.$nodeToRelocate$[\"s-sh\"] = i[\"s-hn\"], f.$slotRefNode$ = i) : (t[\"s-sh\"] = i[\"s-hn\"], x.push({\n $slotRefNode$: i,\n $nodeToRelocate$: t\n })), t[\"s-sr\"] && x.map((c) => {\n ge(c.$nodeToRelocate$, t[\"s-sn\"]) && (f = x.find((l) => l.$nodeToRelocate$ === t), f && !c.$slotRefNode$ && (c.$slotRefNode$ = f.$slotRefNode$));\n });\n } else x.some((f) => f.$nodeToRelocate$ === t) || x.push({\n $nodeToRelocate$: t\n });\n }\n i.nodeType === 1 && je(i);\n }\n}, Te = (e) => {\n e.$attrs$ && e.$attrs$.ref && e.$attrs$.ref(null), e.$children$ && e.$children$.map(Te);\n}, T = (e, t, r) => (typeof t[\"s-sn\"] == \"string\" && t[\"s-sr\"] && t[\"s-cr\"] && ke(t[\"s-cr\"], t, e, t.parentElement), e == null ? void 0 : e.insertBefore(t, r));\nfunction ke(e, t, r, s) {\n var n, i;\n let o;\n if (e && typeof t[\"s-sn\"] == \"string\" && t[\"s-sr\"] && e.parentNode && e.parentNode[\"s-sc\"] && (o = t[\"s-si\"] || e.parentNode[\"s-sc\"])) {\n const f = t[\"s-sn\"], c = t[\"s-hn\"];\n if ((n = r.classList) == null || n.add(o + \"-s\"), s && ((i = s.classList) != null && i.contains(o + \"-s\"))) {\n let l = (s.__childNodes || s.childNodes)[0], p = !1;\n for (; l; ) {\n if (l[\"s-sn\"] !== f && l[\"s-hn\"] === c && l[\"s-sr\"]) {\n p = !0;\n break;\n }\n l = l.nextSibling;\n }\n p || s.classList.remove(o + \"-s\");\n }\n }\n}\nvar pt = (e, t, r = !1) => {\n var s, n, i, o, f;\n const c = e.$hostElement$, l = e.$cmpMeta$, p = e.$vnode$ || V(null, null), a = lt(t) ? t : ot(null, null, t);\n if (L = c.tagName, l.$attrsToReflect$ && (a.$attrs$ = a.$attrs$ || {}, l.$attrsToReflect$.map(\n ([g, u]) => a.$attrs$[u] = c[g]\n )), r && a.$attrs$)\n for (const g of Object.keys(a.$attrs$))\n c.hasAttribute(g) && ![\"key\", \"ref\", \"style\", \"class\"].includes(g) && (a.$attrs$[g] = c[g]);\n a.$tag$ = null, a.$flags$ |= 4, e.$vnode$ = a, a.$elm$ = p.$elm$ = c.shadowRoot || c, Z = c[\"s-sc\"], te = !!(l.$flags$ & 1) && !(l.$flags$ & 128), q = c[\"s-cr\"], B = !1, R(p, a, r);\n {\n if (z.$flags$ |= 1, oe) {\n je(a.$elm$);\n for (const g of x) {\n const u = g.$nodeToRelocate$;\n if (!u[\"s-ol\"] && A.document) {\n const $ = A.document.createTextNode(\"\");\n $[\"s-nr\"] = u, T(u.parentNode, u[\"s-ol\"] = $, u);\n }\n }\n for (const g of x) {\n const u = g.$nodeToRelocate$, $ = g.$slotRefNode$;\n if ($) {\n const _ = $.parentNode;\n let w = $.nextSibling;\n {\n let y = (s = u[\"s-ol\"]) == null ? void 0 : s.previousSibling;\n for (; y; ) {\n let h = (n = y[\"s-nr\"]) != null ? n : null;\n if (h && h[\"s-sn\"] === u[\"s-sn\"] && _ === (h.__parentNode || h.parentNode)) {\n for (h = h.nextSibling; h === u || h != null && h[\"s-sr\"]; )\n h = h == null ? void 0 : h.nextSibling;\n if (!h || !h[\"s-nr\"]) {\n w = h;\n break;\n }\n }\n y = y.previousSibling;\n }\n }\n const P = u.__parentNode || u.parentNode, S = u.__nextSibling || u.nextSibling;\n (!w && _ !== P || S !== w) && u !== w && (!u[\"s-hn\"] && u[\"s-ol\"] && (u[\"s-hn\"] = u[\"s-ol\"].parentNode.nodeName), T(_, u, w), u.nodeType === 1 && u.tagName !== \"SLOT-FB\" && (u.hidden = (i = u[\"s-ih\"]) != null ? i : !1)), u && typeof $[\"s-rf\"] == \"function\" && $[\"s-rf\"]($);\n } else\n u.nodeType === 1 && (r && (u[\"s-ih\"] = (o = u.hidden) != null ? o : !1), u.hidden = !0);\n }\n }\n B && xe(a.$elm$), z.$flags$ &= -2, x.length = 0;\n }\n if (K.experimentalScopedSlotChanges && l.$flags$ & 2) {\n const g = a.$elm$.__childNodes || a.$elm$.childNodes;\n for (const u of g)\n u[\"s-hn\"] !== L && !u[\"s-sh\"] && (r && u[\"s-ih\"] == null && (u[\"s-ih\"] = (f = u.hidden) != null ? f : !1), u.hidden = !0);\n }\n q = void 0;\n};\nconst D = {\n content_wrap: 0,\n ignore: [],\n ignore_with: \"_!i-£___£%_\",\n strict: !1,\n tab_size: 2,\n tag_wrap: 0,\n tag_wrap_width: 80,\n trim: []\n}, E = \"__!i-£___£%__\", m = \"!i-£___£%_\", Re = [\n \"area\",\n \"base\",\n \"br\",\n \"col\",\n \"embed\",\n \"hr\",\n \"img\",\n \"input\",\n \"link\",\n \"meta\",\n \"param\",\n \"source\",\n \"track\",\n \"wbr\"\n], ae = (e) => /<(?:[A-Za-z]+[A-Za-z0-9]*)(?:\\s+.*?)*?\\/{0,1}>/.test(e) || /<(?<Element>(?:[A-Za-z]+[A-Za-z0-9]*:)?(?:[A-Za-z]+[A-Za-z0-9]*))(?:\\s+.*?)*?>(?:.|\\n)*?<\\/{1}\\k<Element>>/.test(e) || /<(?<Element>(?:[a-z][a-z0-9._]*:)?[a-z][a-z0-9._]*-[a-z0-9._-]+)(?:\\s+.*?)*?>(?:.|\\n)*?<\\/{1}\\k<Element>>/.test(e), Ne = (e, t) => {\n if (!e || !t)\n throw new Error(\"Both 'current' and 'updates' must be passed-in to mergeObjects()\");\n let r;\n if (Array.isArray(e))\n r = structuredClone(e).concat(t);\n else if (typeof e == \"object\") {\n r = { ...e };\n for (let s of Object.keys(t))\n typeof t[s] != \"object\" ? r[s] = t[s] : r[s] = Ne(r[s] || {}, t[s]);\n }\n return r;\n}, gt = (e, t) => Ne(structuredClone(e), t), $t = (e) => (e = e.replace(/<[\\w:\\-]+([^>]*[^\\/])>/g, (t, r) => t.replace(r, (s) => s.replace(/\\n/g, m + \"nl!\").replace(/\\r/g, m + \"cr!\").replace(/\\s/g, m + \"ws!\"))), e), dt = (e) => e.replace(/\\n/g, E + \"nl!\").replace(/\\r/g, E + \"cr!\").replace(/\\s/g, E + \"ws!\"), ht = (e) => {\n const t = /\\s*<([a-zA-Z0-9:-]+)[^>]*>\\n\\s*<\\/\\1>(?=\\n[ ]*[^\\n]*__!i-£___£%__[^\\n]*\\n)(\\n[ ]*\\S[^\\n]*\\n)|<([a-zA-Z0-9:-]+)[^>]*>(?=\\n[ ]*[^\\n]*__!i-£___£%__[^\\n]*\\n)(\\n[ ]*\\S[^\\n]*\\n\\s*)<\\/\\3>/g;\n return e.replace(t, (r, s, n, i, o) => {\n const f = n || o;\n if (!f)\n return r;\n const c = f.replace(/\\n/g, E + \"nl!\").replace(/\\r/g, E + \"cr!\").replace(/\\s/g, E + \"ws!\");\n return r.replace(f, c);\n });\n}, yt = (e) => {\n const t = /<([A-Za-z][A-Za-z0-9]*|[a-z][a-z0-9._]*-[a-z0-9._-]+)((?:\\s+[A-Za-z0-9_-]+=\"[^\"]*\"|\\s*[a-z]*)*)>/g;\n return e = e.replace(t, (r, s, n) => r.replace(n, (i) => i.replace(/</g, m + \"lt!\").replace(/>/g, m + \"gt!\"))), e;\n}, _t = (e, t) => {\n const r = t.ignore, s = t.ignore_with;\n for (let n = 0; n < r.length; n++) {\n const i = new RegExp(`<${r[n]}[^>]*>((.|\n)*?)</${r[n]}>`, \"g\");\n e = e.replace(i, (o, f) => o.replace(f, (c) => c.replace(/</g, \"-\" + s + \"lt-\").replace(/>/g, \"-\" + s + \"gt-\").replace(/\\n/g, \"-\" + s + \"nl-\").replace(/\\r/g, \"-\" + s + \"cr-\").replace(/\\s/g, \"-\" + s + \"ws-\")));\n }\n return e;\n}, bt = (e, t) => {\n for (let r = 0; r < t.length; r++) {\n const s = new RegExp(`(<${t[r]}[^>]*>)\\\\s+`, \"g\"), n = new RegExp(`\\\\s+(</${t[r]}>)`, \"g\");\n e = e.replace(s, \"$1\").replace(n, \"$1\");\n }\n return e;\n}, vt = (e) => (e = e.replace(/<[\\w:\\-]+([^>]*[^\\/])>/g, (t, r) => t.replace(r, (s) => s.replace(new RegExp(m + \"nl!\", \"g\"), `\n`).replace(new RegExp(m + \"cr!\", \"g\"), \"\\r\").replace(new RegExp(m + \"ws!\", \"g\"), \" \"))), e), wt = (e) => (e = e.replace(/.*__!i-£___£%__[a-z]{2}!.*/g, (t) => t.replace(/__!i-£___£%__[a-z]{2}!/g, (r) => r.replace(new RegExp(E + \"nl!\", \"g\"), `\n`).replace(new RegExp(E + \"cr!\", \"g\"), \"\\r\").replace(new RegExp(E + \"ws!\", \"g\"), \" \"))), e), mt = (e) => (e = e.replace(/<[\\w:\\-]+([^>]*)>/g, (t, r) => t.replace(r, (s) => s.replace(new RegExp(m + \"lt!\", \"g\"), \"<\").replace(new RegExp(m + \"gt!\", \"g\"), \">\"))), e), xt = (e, t) => {\n const r = t.ignore, s = t.ignore_with;\n for (let n = 0; n < r.length; n++) {\n const i = new RegExp(`<${r[n]}[^>]*>((.|\n)*?)</${r[n]}>`, \"g\");\n e = e.replace(i, (o, f) => o.replace(f, (c) => c.replace(new RegExp(\"-\" + s + \"lt-\", \"g\"), \"<\").replace(new RegExp(\"-\" + s + \"gt-\", \"g\"), \">\").replace(new RegExp(\"-\" + s + \"nl-\", \"g\"), `\n`).replace(new RegExp(\"-\" + s + \"cr-\", \"g\"), \"\\r\").replace(new RegExp(\"-\" + s + \"ws-\", \"g\"), \" \")));\n }\n return e;\n}, Et = (e) => {\n var s, n;\n if (typeof e != \"object\") throw new Error(\"Config must be an object.\");\n if (!(Object.hasOwn(e, \"content_wrap\") || Object.hasOwn(e, \"ignore\") || Object.hasOwn(e, \"ignore_with\") || Object.hasOwn(e, \"strict\") || Object.hasOwn(e, \"tab_size\") || Object.hasOwn(e, \"tag_wrap\") || Object.hasOwn(e, \"tag_wrap_width\") || Object.hasOwn(e, \"trim\"))) return D;\n let r = e.tab_size;\n if (r) {\n if (typeof r != \"number\") throw new Error(`tab_size must be a number, not ${typeof e.tab_size}.`);\n if (!Number.isSafeInteger(r)) throw new Error(`Tab size ${r} is not safe. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger for more info.`);\n if (r = Math.floor(r), r < 1 || r > 16) throw new Error(\"Tab size out of range. Expecting 1 to 16.\");\n e.tab_size = r;\n }\n if (Object.hasOwn(e, \"content_wrap\") && typeof e.content_wrap != \"number\")\n throw new Error(`content_wrap config must be a number, not ${typeof e.tag_wrap_width}.`);\n if (Object.hasOwn(e, \"ignore\") && (!Array.isArray(e.ignore) || !((s = e.ignore) != null && s.every((i) => typeof i == \"string\"))))\n throw new Error(\"Ignore config must be an array of strings.\");\n if (Object.hasOwn(e, \"ignore_with\") && typeof e.ignore_with != \"string\")\n throw new Error(`Ignore_with config must be a string, not ${typeof e.ignore_with}.`);\n if (Object.hasOwn(e, \"strict\") && typeof e.strict != \"boolean\")\n throw new Error(`Strict config must be a boolean, not ${typeof e.strict}.`);\n if (Object.hasOwn(e, \"tag_wrap\") && typeof e.tag_wrap == \"boolean\" && (console.warn(\"tag_wrap as a boolean is deprecated, and will not be supported in v0.9.0+. Use `tag_wrap: <number>` instead; where <number> is the max character width acceptable before wrapping attributes.\"), e.tag_wrap_width ? e.tag_wrap = e.tag_wrap_width : e.tag_wrap = D.tag_wrap_width), Object.hasOwn(e, \"tag_wrap\") && typeof e.tag_wrap != \"number\")\n throw new Error(`tag_wrap config must be a number, not ${typeof e.tag_wrap}.`);\n if (Object.hasOwn(e, \"tag_wrap_width\") && console.warn(\"tag_wrap_width is deprecated, and will not be supported in v0.9.0+. Use `tag_wrap: <number>` instead; where <number> is the max character width acceptable before wrapping attributes.\"), Object.hasOwn(e, \"tag_wrap_width\") && typeof e.tag_wrap_width != \"number\")\n throw new Error(`tag_wrap_width config must be a number, not ${typeof e.tag_wrap_width}.`);\n if (Object.hasOwn(e, \"trim\") && (!Array.isArray(e.trim) || !((n = e.trim) != null && n.every((i) => typeof i == \"string\"))))\n throw new Error(\"Trim config must be an array of strings.\");\n return gt(D, e);\n}, St = (e, t, r) => {\n const s = e.trim().split(/\\s+/);\n if (s.length === 0 || s.length === 1 && s[0] === \"\")\n return \"\";\n const n = [];\n let i = \"\";\n const o = r;\n s.forEach((c) => {\n if (c === \"\") return;\n if (c.length >= t) {\n i !== \"\" && n.push(n.length === 0 ? r + i : o + i), n.push(n.length === 0 ? r + c : o + c), i = \"\";\n return;\n }\n const l = i === \"\" ? c : i + \" \" + c;\n l.length <= t ? i = l : (i !== \"\" && n.push(n.length === 0 ? r + i : o + i), i = c);\n }), i !== \"\" && n.push(n.length === 0 ? r + i : o + i);\n const f = n.join(`\n`);\n return dt(f);\n}, Ot = (e, t = !0) => t && !ae(e) ? e : e.replace(/<([a-zA-Z\\-0-9:]+)[^>]*>/g, (r, s) => Re.indexOf(s) > -1 ? `${r.substring(0, r.length - 1)} />`.replace(/\\/\\s\\//g, \"/\") : r.replace(/[\\s]?\\/>/g, `></${s}>`)), At = (e, t = !1) => (e = e.replace(/<textarea[^>]*>((.|\\n)*?)<\\/textarea>/g, (r, s) => r.replace(s, (n) => n.replace(/</g, \"<\").replace(/>/g, \">\").replace(/\"/g, \""\").replace(/'/g, \"'\").replace(/\\n/g, \" \").replace(/\\r/g, \" \").replace(/\\s/g, \" \"))), t && (e = e.replace(/<textarea[^>]*>((.|\\n)*?)<\\/textarea>/g, (r, s) => (r = r.replace(s, (n) => n.replace(/\\n|\\t/g, \"\").replace(/[a-z]+=\"\\s*\"/ig, \"\").replace(/>\\s+</g, \"><\").replace(/\\s+/g, \" \")), r = r.replace(/\\s+/g, \" \").replace(/\\s>/g, \">\").replace(/>\\s/g, \">\").replace(/\\s</g, \"<\").replace(/class=[\"']\\s/g, (n) => n.replace(/\\s/g, \"\")).replace(/(class=.*)\\s([\"'])/g, \"$1$2\"), r))), e), jt = (e, t = !0) => (t && !ae(e) || (e = At(e), e = e.replace(/\\n|\\t/g, \"\"), e = e.replace(/>\\s+</g, \"><\"), e = e.replace(/ {2,}/g, \" \"), e = e.replace(/ >/g, \">\"), e = e.replace(/ </g, \"<\"), e = e.replace(/> /g, \">\"), e = e.replace(/<\\s*\\//g, \"</\"), e = e.replace(/ = /g, \"=\"), e = e.replace(\n /([a-zA-Z0-9_-]+)=(['\"])(.*?)\\2/g,\n (r, s, n, i) => {\n const o = i.trim();\n return `${s}=${n}${o}${n}`;\n }\n), e = e.trim()), e);\nlet H, re;\nconst I = {\n line: []\n}, Tt = (e) => {\n I.line = [];\n let t = -1;\n const r = /(<[^>]+>)|([^<]+)/g;\n return e = e.replace(r, (s, n, i) => (n ? I.line.push({ type: \"tag\", value: s }) : i && i.trim().length > 0 && I.line.push({ type: \"text\", value: s }), t++, `\n[#-# : ${t} : ${s} : #-#]\n`)), e;\n}, kt = (e) => (e = Ot(e, !1), re.length > 0 && (e = bt(e, re)), e = jt(e, !1), e = Tt(e), e), Rt = (e, t) => {\n const r = \" \".repeat(t.tab_size), s = t.tag_wrap, n = t.content_wrap;\n let i = \"\";\n const o = [], f = /<[A-Za-z]+\\b[^>]*(?:.|\\n)*?\\/?>/g, c = /\\s{1}[A-Za-z-]+(?:=\".*?\")?/g;\n I.line.forEach((p, a) => {\n let g = p.value, u = 0;\n const $ = I.line[a - 1], _ = ($ == null ? void 0 : $.value) ?? \"\";\n i += \"0\", a === 0 && u++, g.trim().startsWith(\"</\") && u++, _.trim().startsWith(\"<!doctype\") && u++, _.trim().startsWith(\"<!--\") && u++, _.trim().endsWith(\"/>\") && u++, _.trim().startsWith(\"</\") && u++, ($ == null ? void 0 : $.type) === \"text\" && u++;\n const P = Math.max(0, i.length - u);\n i = i.substring(0, P);\n const S = r.repeat(P);\n if (H && g.trim().startsWith(\"<!--\"))\n return;\n let y = g;\n if (p.type === \"text\" && n > 0 && y.length >= n)\n y = St(y, n, S);\n else if (s > 0 && y.length > s && f.test(y)) {\n f.lastIndex = 0, c.lastIndex = 0;\n const h = y.split(c).filter(Boolean);\n if (h.length >= 2) {\n const Le = y.matchAll(c), Me = S + r;\n let Y = S + h[0] + `\n`;\n for (const We of Le) {\n const Ze = We[0].trim();\n Y += Me + Ze + `\n`;\n }\n const le = h[0].match(/<([A-Za-z_:-]+)/), Fe = le ? le[1] : \"\", Ce = Re.includes(Fe), Pe = h[1].trim(), Ue = S + (H && Ce ? \" \" : \"\");\n Y += Ue + Pe, y = Y;\n } else\n y = S + y;\n } else\n y = S + y;\n o.push(y);\n });\n let l = o.join(`\n`);\n return s > 0 && (l = $t(l)), n > 0 && /\\n[ ]*[^\\n]*__!i-£___£%__[^\\n]*\\n/.test(l) && (l = ht(l)), l = l.replace(\n /<(?<Element>.+).*>[^<]*?[^><\\/\\s][^<]*?<\\/{1}\\k<Element>|<script[^>]*>\\s+<\\/script>|<(\\w+)>\\s+<\\/(\\w+)|<(?:([\\w:\\._-]+)|([\\w:\\._-]+)[^>]*[^\\/])>\\s+<\\/([\\w:\\._-]+)>/g,\n (p) => p.replace(/\\n|\\t|\\s{2,}/g, \"\")\n ), n > 0 && (l = wt(l)), s > 0 && (l = vt(l)), H && (l = l.replace(/\\s\\/>|\\/>/g, \">\")), l.startsWith(`\n`) && (l = l.substring(1)), l.endsWith(`\n`) && (l = l.substring(0, l.length - 1)), l;\n}, Nt = (e, t) => {\n if (!ae(e)) return e;\n const r = t ? Et(t) : D;\n H = r.strict;\n const s = r.ignore.length > 0;\n return re = r.trim, s && (e = _t(e, r)), e = yt(e), e = kt(e), e = Rt(e, r), e = mt(e), s && (e = xt(e, r)), e;\n}, zt = (e, t, r) => {\n [null, void 0, \"\", !1].includes(r) || [\"innerHTML\", \"style\", \"\"].includes(t) || e.setAttribute(t, [\"object\", \"function\"].includes(typeof r) ? \"⚠️ Property must be set through a script or a framework-specific syntax.\" : r);\n}, ze = (e, t, r, s, n) => {\n if (t && typeof t == \"string\") {\n const i = document.createElement(t);\n Object.keys(r || {}).forEach((o) => {\n zt(i, o, r[o]);\n }), s == null || s.forEach((o) => {\n ze(i, o.$tag$, o.$attrs$, o.$children$, o.$text$);\n }), r != null && r.innerHTML && (i.innerHTML = r.innerHTML), e.appendChild(i);\n }\n n && (e.innerHTML = n);\n}, tr = (e, t, r = []) => {\n const s = {};\n if (typeof e != \"object\")\n throw new Error(\"filterArgs - args isn't an object.\");\n for (const n in e)\n if (!r.includes(n)) {\n const i = e[n], o = n.replace(/([a-z])([A-Z])/g, \"$1-$2\").toLowerCase();\n (!t || !Object.keys(t).includes(n) || t[n] !== i) && (s[o] = i);\n }\n return s;\n}, rr = (e, t) => {\n var s, n;\n const r = document.getElementById(\"storybook-root\");\n if (r !== null)\n return (n = document.querySelector(\"[lang]\")) == null || n.setAttribute(\"lang\", ((s = t.globals) == null ? void 0 : s.locale) || \"en\"), pt(\n {\n $cmpMeta$: {\n $flags$: 0,\n $tagName$: r.tagName\n },\n $hostElement$: r\n },\n e(t)\n ), r.children[r.children.length - 1];\n}, sr = ({ $tag$: e, $attrs$: t, $children$: r, $text$: s }) => {\n const n = document.createElement(\"div\");\n return ze(n, e, t, r, s), Nt(n.innerHTML, {\n tag_wrap: 40,\n content_wrap: 120\n }).replace(/=\"true\"/g, \"\");\n}, J = (e, t) => {\n if (!t)\n return;\n const r = t.split(\"/\");\n return `${e}${r.slice(2, r.length - 1).join(\"-\")}--docs`;\n};\nvar j, X;\nclass nr {\n constructor(t) {\n /**\n * JsonDocs\n */\n d(this, \"jsonDoc\");\n /**\n * Get component data from the jsonDoc\n * @param tagName - tag name we want to get the data from\n * @returns component data\n */\n k(this, j, (t) => this.jsonDoc.components.find((r) => r.tag === t));\n /**\n * Get the control for the given prop\n * Based on https://storybook.js.org/docs/api/arg-types#controltype\n * @param prop - prop to get control for\n * @returns control type and options if applicable\n */\n k(this, X, (t) => {\n const r = t.type.replace(/\"([^\"]+)\"/g, \"$1\").replace(/\\s/g, \"\").replace(/\\(.*?\\)/g, (s) => s.replace(/\\|/g, \" OR \")).split(\"|\").map((s) => s.trim().replace(/ OR /g, \"|\"));\n return t.type === \"string\" ? { control: { type: \"text\" } } : t.type === \"number\" ? { control: { type: \"number\" } } : t.type === \"boolean\" ? { control: { type: \"boolean\" } } : t.type.startsWith(\"{\") && t.type.endsWith(\"}\") ? { control: { type: \"object\" } } : r.length > 1 ? r.includes(\"string\") ? { control: { type: \"text\" } } : r.every((s) => s == null ? void 0 : s.includes(\"[]\")) ? { control: { type: \"object\" } } : (r.unshift(void 0), { control: { type: \"select\" }, options: r }) : { control: { type: \"object\" } };\n });\n /**\n * Extract component arg types from the component data\n * @param tagName - tag name we want to extract the arg types from\n * @returns component arg types\n */\n d(this, \"extractArgTypes\", (t) => {\n const r = v(this, j).call(this, t), s = r == null ? void 0 : r.props.reduce((p, a) => {\n const { control: g, options: u } = v(this, X).call(this, a);\n return {\n ...p,\n [a.name]: {\n name: a.attr || a.name,\n description: a.docs,\n type: { required: a.required },\n table: {\n category: \"props\",\n type: { summary: a.type },\n defaultValue: { summary: a.default }\n },\n control: g,\n options: u\n }\n };\n }, {}), n = r == null ? void 0 : r.events.reduce(\n (p, a) => ({\n ...p,\n [a.event]: {\n name: a.event,\n description: a.docs,\n table: {\n category: \"events\",\n type: { summary: a.detail }\n }\n }\n }),\n {}\n ), i = r == null ? void 0 : r.methods.reduce(\n (p, a) => ({\n ...p,\n [a.name]: {\n name: a.name,\n description: a.docs,\n table: {\n category: \"methods\",\n type: { summary: a.signature }\n }\n }\n }),\n {}\n ), o = r == null ? void 0 : r.slots.reduce(\n (p, a) => ({\n ...p,\n [a.name]: {\n name: a.name !== \"\" ? a.name : \"default\",\n // default slot are unnamed\n description: a.docs,\n table: {\n category: \"slots\",\n type: { summary: void 0 }\n }\n }\n }),\n {}\n ), f = r == null ? void 0 : r.styles.reduce(\n (p, a) => ({\n ...p,\n [a.name]: {\n name: a.name,\n description: a.docs,\n table: {\n category: \"custom properties\",\n type: { summary: void 0 }\n }\n }\n }),\n {}\n ), c = r == null ? void 0 : r.dependencies.reduce((p, a) => {\n const g = v(this, j).call(this, a);\n return g ? {\n ...p,\n [a]: {\n name: a,\n description: `<a href=\"./?path=/docs/${J(\"\", g == null ? void 0 : g.filePath)}\">View Component Documentation</a>`,\n table: {\n category: \"depends on\",\n type: { summary: void 0 }\n }\n }\n } : p;\n }, {}), l = r == null ? void 0 : r.dependents.reduce((p, a) => {\n const g = v(this, j).call(this, a);\n return g ? {\n ...p,\n [a]: {\n name: a,\n description: `<a href=\"./?path=/docs/${J(\"\", g == null ? void 0 : g.filePath)}\">View Component Documentation</a>`,\n table: {\n category: \"used by\",\n type: { summary: void 0 }\n }\n }\n } : p;\n }, {});\n return {\n ...s,\n ...n,\n ...i,\n ...o,\n ...f,\n ...c,\n ...l\n };\n });\n /**\n * Extract component description from the component data\n * @param tagName - tag name we want to extract the description from\n * @returns component description\n */\n d(this, \"extractComponentDescription\", (t) => {\n const r = v(this, j).call(this, t);\n return (r == null ? void 0 : r.readme) || (r == null ? void 0 : r.docs);\n });\n this.jsonDoc = t;\n }\n}\nj = new WeakMap(), X = new WeakMap();\nconst It = (e, t) => {\n if (t)\n return `${e}${t}`;\n}, Ie = (e) => {\n let t = e.overview ? `${e.overview}\n\n` : \"\";\n const r = e.props.filter(({ attr: n }) => n !== void 0);\n r.length && (t += `Attributes:\n`, t += r.map(({ attr: n, docs: i }) => `- \\`${n}\\`: ${i}\n`).join(\"\"), t += `\n`);\n const s = e.props.filter(({ attr: n }) => n === void 0);\n return s.length && (t += `Properties:\n`, t += s.map(({ name: n, docs: i }) => `- \\`${n}\\`: ${i}\n`).join(\"\"), t += `\n`), e.methods.length && (t += `Methods:\n`, t += e.methods.map(({ name: n, docs: i }) => `- \\`${n}\\`: ${i}\n`).join(\"\"), t += `\n`), e.events.length && (t += `Events:\n`, t += e.events.map(({ event: n, docs: i }) => `- \\`${n}\\`: ${i}\n`).join(\"\"), t += `\n`), e.listeners.length && (t += `Listeners:\n`, t += e.listeners.map(({ event: n }) => `- \\`${n}\\`\n`).join(\"\"), t += `\n`), e.slots.length && (t += `Slots:\n`, t += e.slots.map(({ name: n, docs: i }) => `- \\`${n}\\`: ${i}\n`).join(\"\"), t += `\n`), t;\n}, se = (e) => `${e.docs}\n\nType: \\`${e.type}\\``, ir = (e, t, r, s) => ({\n $schema: \"https://json.schemastore.org/web-types\",\n name: e,\n version: t,\n \"description-markup\": \"markdown\",\n contributions: {\n html: {\n elements: r.components.map((n) => {\n const i = J(s, n.filePath);\n return {\n name: n.tag,\n description: Ie(n),\n \"doc-url\": i,\n attributes: n.props.filter((o) => o.attr).map((o) => ({\n name: o.attr,\n description: se(o),\n \"doc-url\": i,\n value: {\n type: o.type,\n default: o.default,\n required: o.required\n }\n })),\n js: {\n properties: n.props.map((o) => ({\n name: o.name,\n description: se(o),\n \"doc-url\": i,\n value: {\n type: o.type,\n default: o.default,\n required: o.required\n }\n })),\n events: n.events.map((o) => ({\n name: o.event,\n description: o.docs\n }))\n },\n css: {\n properties: n.styles.map((o) => ({\n name: o.name,\n description: o.docs\n }))\n }\n };\n })\n }\n }\n}), Lt = (e, t, r) => [\n { name: \"Storybook\", url: J(e, r) },\n { name: \"Sources\", url: It(t, r) }\n], Mt = (e) => {\n if (!e.values.some(({ value: t }) => t === void 0))\n return e.values.map(({ value: t }) => ({ name: t }));\n}, or = (e, t, r) => ({\n version: 1.1,\n tags: e.components.map((s) => {\n const n = Lt(t, r, s.filePath);\n return {\n name: s.tag,\n description: Ie(s),\n attributes: s.props.map((i) => ({\n name: i.attr || i.name,\n description: se(i),\n values: Mt(i),\n references: n\n })),\n references: n\n };\n }),\n globalAttributes: [],\n valueSets: []\n}), ar = (e) => ({\n version: 1.1,\n properties: e.components.flatMap(\n (t) => t.styles.map((r) => ({\n name: r.name,\n description: r.docs\n }))\n )\n}), lr = (e) => {\n const t = { value: \"2023\", pattern: \"yyyy\" }, r = { value: \"12\", pattern: \"mm\" }, s = { value: \"24\", pattern: \"dd\" };\n return Pt([t.value, r.value, s.value].join(\"-\"), e, { timeZone: \"UTC\" }).replace(t.value, t.pattern).replace(r.value, r.pattern).replace(s.value, s.pattern);\n}, cr = (e) => e.toISOString().split(\"T\")[0], Ft = (e, t, r) => {\n const s = e.closest(\"[lang]\"), n = Intl.NumberFormat.supportedLocalesOf(s == null ? void 0 : s.lang), i = n.length > 0 && typeof n[0] == \"string\" ? n[0] : navigator.language || r, o = i.split(\"-\").shift();\n return Object.keys(t).length === 0 ? {\n locale: i,\n messages: { lang: r }\n } : {\n locale: i,\n messages: t[o] || t[r] || { lang: r }\n };\n}, fr = (e, t, r) => new Intl.NumberFormat(t, { style: \"currency\", currency: r }).format(e), ur = (e, t, r = 0) => new Intl.NumberFormat(t, { minimumFractionDigits: r }).format(Number(e)), pr = (e, t, r = 0) => new Intl.NumberFormat(t, {\n style: \"percent\",\n minimumFractionDigits: r,\n maximumFractionDigits: r\n}).format(e), gr = (e, t, r, s = \"short\", n = 0) => new Intl.NumberFormat(t, {\n style: \"unit\",\n unit: r,\n unitDisplay: s,\n minimumFractionDigits: n,\n maximumFractionDigits: n\n}).format(e), Ct = /^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$/, Pt = (e, t, r) => typeof e != \"string\" || e === \"\" || !Ct.test(e) ? \"\" : new Intl.DateTimeFormat(t, r).format(new Date(e)), $r = (e, t) => (r) => Ft(r, e, t), dr = ({ disconnect: e, observe: t, takeRecords: r }) => {\n class s {\n constructor(i) {\n /**\n *\n */\n d(this, \"disconnect\", e);\n /**\n *\n */\n d(this, \"observe\", t);\n /**\n *\n */\n d(this, \"takeRecords\", r);\n /**\n *\n */\n d(this, \"cb\");\n this.cb = i;\n }\n }\n return [window, global].forEach((n) => {\n Object.defineProperty(n, \"MutationObserver\", {\n writable: !0,\n configurable: !0,\n value: s\n });\n }), s;\n}, hr = ({ disconnect: e, observe: t }) => {\n class r {\n constructor(n) {\n /**\n *\n */\n d(this, \"disconnect\", e);\n /**\n *\n */\n d(this, \"observe\", t);\n /**\n *\n */\n d(this, \"unobserve\");\n /**\n *\n */\n d(this, \"cb\");\n this.cb = n;\n }\n }\n return [window, global].forEach((s) => {\n Object.defineProperty(s, \"ResizeObserver\", {\n writable: !0,\n configurable: !0,\n value: r\n });\n }), r;\n};\nclass Ut extends Event {\n constructor() {\n super(...arguments);\n /**\n *\n */\n d(this, \"detail\");\n }\n // eslint-disable-line @typescript-eslint/no-explicit-any\n}\nconst yr = () => {\n class e extends Ut {\n }\n return [window, global].forEach((t) => {\n Object.defineProperty(t, \"SubmitEvent\", {\n writable: !0,\n configurable: !0,\n value: e\n });\n }), e;\n}, _r = (e) => {\n const t = (r) => (setTimeout(r, 1), e(), 0);\n return [window, global].forEach((r) => {\n Object.defineProperty(r, \"requestAnimationFrame\", {\n writable: !0,\n configurable: !0,\n value: t\n });\n }), t;\n};\nexport {\n Ht as ClassList,\n Vt as Cursor,\n Ge as Page,\n er as Paginate,\n nr as StorybookPreview,\n qt as allItemsAreString,\n Yt as cleanString,\n Zt as createID,\n Ct as dateRegExp,\n cr as dateToString,\n $r as defineLocales,\n tr as filterArgs,\n Gt as focusableElements,\n lr as getLocaleDatePattern,\n Be as getObjectValueFromKey,\n _e as getParentWindows,\n sr as getStoryHTML,\n J as getStorybookUrl,\n Jt as getWindows,\n ne as isObject,\n Bt as isTagName,\n Kt as isValidNumber,\n qe as isValidString,\n Dt as isValideID,\n fr as localeCurrency,\n Pt as localeDate,\n ur as localeNumber,\n pr as localePercent,\n gr as localeUnit,\n Qt as nextTick,\n _r as setUpRequestAnimationFrameMock,\n dr as setupMutationObserverMock,\n hr as setupResizeObserverMock,\n yr as setupSubmitEventMock,\n rr as stencilWrapper,\n Xt as toString,\n ar as vsCodeCssGenerator,\n or as vsCodeGenerator,\n ir as webTypesGenerator\n};\n//# sourceMappingURL=index.es.js.map\n"],"names":[],"mappings":"AAAA,IAAI,EAAE,GAAG,MAAM,CAAC,cAAc;AAC9B,IAAI,EAAE,GAAG,CAAC,CAAC,KAAK;AAChB,EAAE,MAAM,SAAS,CAAC,CAAC,CAAC;AACpB,CAAC;AACD,IAAI,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,UAAU,EAAE,IAAE,EAAE,YAAY,EAAE,IAAE,EAAE,QAAQ,EAAE,IAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;AAChH,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,IAAI,QAAQ,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC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AE,IAAI,EAAE,CAAC;AACT,EAAE,WAAW,EAAE,CAAC;AAChB,EAAE,qBAAqB,EAAE,CAAC;AAC1B,EAAE,qBAAqB,EAAE;AACzB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,+CAA+C,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,OAAO,CAAC,IAAI,QAAQ,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,EAAE,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;;;;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r,h as s,H as e}from"./p-CAuxALt5.js";import{a,X as o,K as i}from"./p-hNwGkhG6.js";const t=["progressbar","meter"];const c="/*!\n * @prop --mg-c-progress-size: Defines the size of the progress bar. Default value is `--mg-b-size-8`.\n * @prop --mg-c-progress-border-color: Defines the color of the progress bar border. Default value is `--mg-b-color-neutral-80`.\n * @prop --mg-c-progress-bar-color-background: Defines the color of the progress bar. Default value is `--mg-b-color-neutral-30`.\n * @prop --mg-c-progress-fill-color-background: Defines the color of the progress bar fill background. Default value is `--mg-b-color-app`.\n */.mg-c-progress{min-width:calc(var(--mg-b-size-16)*4)}.mg-c-progress__bar{position:relative;overflow:hidden;height:var(--mg-c-progress-size);border-width:var(--mg-b-size-border);border-style:solid;border-color:var(--mg-c-progress-border-color);border-radius:calc((var(--mg-c-progress-size) + var(--mg-b-size-border)*2)/2);background-color:var(--mg-c-progress-bar-color-background)}.mg-c-progress__fill{height:100%;border-radius:calc((var(--mg-c-progress-size) + var(--mg-b-size-border)*2)/2);transition:width 300ms ease-in-out}.mg-c-progress__bar.mg-c-progress__bar--active .mg-c-progress__fill{background-color:var(--mg-c-progress-fill-color-background)}";const g=class{constructor(s){r(this,s);this.ariaRole="progressbar";this.value=0;this.min=0;this.max=100}watchLabel(r){if(!a(r)){throw new Error(`<mg-progress> prop "label" must be a valid string. Passed value: ${o(r)}.`)}}watchAriaRole(r){if(r&&!t.includes(r)){throw new Error(`<mg-progress> prop "ariaRole" must be one of: ${t.join(", ")}. Passed value: ${o(r)}.`)}}watchValue(r){if(r!==undefined&&(!i(r)||!(r>=this.min&&r<=this.max)))throw new Error(`<mg-progress> prop “value” must be a number within the range ${this.min} to ${this.max}. Passed value: ${o(r)}.`)}watchMin(r){if(r!==0&&r!==undefined&&(!i(r)||r>=this.max))throw new Error(`<mg-progress> prop “min” must be a number lower than: ${this.max}. Passed value: ${o(r)}.`)}watchMax(r){if(r!==100&&r!==undefined&&(!i(r)||r<=this.min))throw new Error(`<mg-progress> prop “max” must be a number greater than: ${this.min}. Passed value: ${o(r)}.`)}componentWillLoad(){this.watchLabel(this.label);this.watchAriaRole(this.ariaRole);this.watchMin(this.min);this.watchMax(this.max);this.watchValue(this.value)}render(){return s(e,{key:"c2a8b5264af27dab4f81981a6d20d04d572321db",role:this.ariaRole,"aria-label":this.label,"aria-valuenow":this.value,"aria-valuemin":this.min,"aria-valuemax":this.max},s("div",{key:"1ab08ca9582182c7c2e9cf1041e68cfd38390e3b",class:"mg-c-progress"},s("div",{key:"95044f35b5fcc1b5eb380828acc3935ff30c6c1f",class:{"mg-c-progress__bar":true,"mg-c-progress__bar--active":this.value>this.min}},s("div",{key:"4d3588379c0b1a135dd9118fd2cb3c00c9dd31cb",class:"mg-c-progress__fill",style:{width:`${Math.round((this.value-this.min)/(this.max-this.min)*100)}%`}}))))}static get watchers(){return{label:["watchLabel"],ariaRole:["watchAriaRole"],value:["watchValue"],min:["watchMin"],max:["watchMax"]}}};g.style=c;export{g as mg_progress};
|
|
2
|
-
//# sourceMappingURL=p-352cfc01.entry.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,h as e,g as s}from"./p-CAuxALt5.js";import{e as n,H as o,V as a,Q as h,B as r,X as c,q as p,n as u,a as m,G as l}from"./p-hNwGkhG6.js";import{c as g,a as d,w as b}from"./p-CNgv8hc5.js";import{i as f}from"./p-Cg3R_y_o.js";import{K as v}from"./p-yMGqY8YG.js";const w=".mg-c-input__box{height:var(--mg-b-size-min-height);box-sizing:border-box;padding:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2) var(--mg-b-size-8);border-width:var(--mg-c-input-border-width);border-style:solid;border-color:var(--mg-c-input-color-border);border-radius:var(--mg-c-input-border-radius);background-color:var(--mg-b-color-light);color:var(--mg-b-color-dark);font-family:inherit;font-size:var(--mg-b-font-size);text-align:var(--mg-c-input-text-align, left)}.mg-c-input__box::placeholder{color:var(--mg-c-input-placeholder-color-text);font-style:italic}.mg-c-input__box:focus{box-shadow:0 0 var(--mg-b-size-4) var(--mg-c-input-color-box-shadow-focus)}.mg-c-input__box:disabled{opacity:var(--mg-b-opacity-element-disabled)}.mg-c-input.mg-c-input--has-error .mg-c-input__box{border-color:var(--mg-b-color-danger)}.mg-c-input.mg-c-input--is-input-group-append{--mg-c-button-border-radius-top-left:0;--mg-c-button-border-radius-bottom-left:0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box{margin-right:calc(-1*var(--mg-b-size-border));border-bottom-right-radius:0;border-top-right-radius:0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box:focus-visible{outline-offset:-0.2rem;outline-style:solid;outline-width:.2rem}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]){--mg-c-button-border-radius-top-right:0;--mg-c-button-border-radius-bottom-right:0}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]:not(:last-of-type)){--mg-c-button-border-right-width:0}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]:last-of-type){--mg-c-button-border-radius-top-right:var(--mg-c-input-border-radius);--mg-c-button-border-radius-bottom-right:var(--mg-c-input-border-radius)}.mg-c-input.mg-c-input--is-append-input-slot-content:not(.mg-c-input--readonly) ::slotted([slot=append-input]){align-self:start;padding-top:calc((var(--mg-b-size-min-height) - var(--mg-b-size-16))/2)}.mg-c-input.mg-c-input--has-icon .mg-c-input__with-character-left>mg-icon:first-of-type,.mg-c-input.mg-c-input--has-icon .mg-c-input__input-group-container>mg-icon:first-of-type{position:absolute;top:50%;left:var(--mg-b-size-8);color:var(--mg-c-input-color-icon);transform:translateY(-50%)}.mg-c-input.mg-c-input--has-icon .mg-c-input__with-character-left .mg-c-input__box,.mg-c-input.mg-c-input--has-icon .mg-c-input__input-group-container .mg-c-input__box{padding-left:calc(var(--mg-b-size-16) + var(--mg-b-size-8)*2)}.mg-c-input__input-container{width:100%;flex:1 auto}.mg-c-input.mg-c-input--width-full .mg-c-input__box{width:100%}.mg-c-input.mg-c-input--width-2 .mg-c-input__with-character-left,.mg-c-input.mg-c-input--width-4 .mg-c-input__with-character-left,.mg-c-input.mg-c-input--width-16 .mg-c-input__with-character-left{width:max-content}.mg-c-input.mg-c-input--width-2 .mg-c-input__with-character-left:has(textarea),.mg-c-input.mg-c-input--width-4 .mg-c-input__with-character-left:has(textarea),.mg-c-input.mg-c-input--width-16 .mg-c-input__with-character-left:has(textarea){flex-grow:inherit}.mg-c-input.mg-c-input--width-2 .mg-c-input__box{width:var(--mg-b-size-48)}.mg-c-input.mg-c-input--width-2 .mg-c-input__with-character-left:not(:has(textarea)) .mg-c-input__box{width:calc(var(--mg-b-size-48) + var(--mg-c-character-left-message-length)*(.35ch + .3rem))}.mg-c-input.mg-c-input--width-4 .mg-c-input__box{width:var(--mg-b-size-72)}.mg-c-input.mg-c-input--width-4 .mg-c-input__with-character-left:not(:has(textarea)) .mg-c-input__box{width:calc(var(--mg-b-size-72) + var(--mg-c-character-left-message-length)*(.35ch + .3rem))}.mg-c-input.mg-c-input--width-16 .mg-c-input__box{width:calc(26*var(--mg-b-size-8))}.mg-c-input.mg-c-input--width-16 .mg-c-input__with-character-left:not(:has(textarea)) .mg-c-input__box{width:calc(calc(26 * var(--mg-b-size-8)) + var(--mg-c-character-left-message-length)*(.35ch + .3rem))}.mg-c-input.mg-c-input--width-full:not(.mg-c-input--label-on-top){justify-content:stretch}.mg-c-input.mg-c-input--is-input-group-append ::slotted([slot=append-input]),.mg-c-input.mg-c-input--is-append-input-slot-content ::slotted([slot=append-input]){width:auto}:host(.mg-c-input.mg-c-input--width-full) ::slotted(*:not(mg-input-title)){width:100%;max-width:100%}.mg-c-input__readonly-value{min-height:var(--mg-b-font-size);align-self:flex-start;margin-top:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2);word-break:break-word}.mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*{animation:none !important;transition:none !important}}.mg-c-input.mg-c-input--combobox mg-popover{--mg-c-popover-padding-vertical:0;--mg-c-popover-padding-horizontal:0}.mg-c-input.mg-c-input--combobox .mg-c-input__input-group-container{position:relative}.mg-c-input.mg-c-input--combobox .mg-c-input__box{cursor:pointer}.mg-c-input.mg-c-input--combobox .mg-c-input__popover-container{display:flex;min-width:var(--mg-c-input-list-width);max-height:calc(50*var(--mg-b-size-8) - var(--mg-b-size-32));flex-direction:column;gap:var(--mg-b-size-4);overflow-y:scroll}.mg-c-input.mg-c-input--combobox .mg-c-input__popover-info{padding:var(--mg-b-size-8);margin:0;text-align:center}.mg-c-input.mg-c-input--combobox .mg-c-input__load-more{padding:0 var(--mg-b-size-8) var(--mg-b-size-4)}.mg-c-input.mg-c-input--combobox .mg-c-input__reset{padding-right:var(--mg-b-size-min-height)}.mg-c-input.mg-c-input--combobox .mg-c-input__input-list{padding:0;margin:0;cursor:pointer;list-style:none}.mg-c-input.mg-c-input--combobox .mg-c-input__input-list-item{display:flex;padding:var(--mg-b-size-8)}.mg-c-input.mg-c-input--combobox .mg-c-input__input-list-item:hover,.mg-c-input.mg-c-input--combobox .mg-c-input__input-list-item.mg-c-input__input-list-item--focus-visible{background-color:var(--mg-b-color-neutral-20)}.mg-c-input.mg-c-input--combobox .mg-c-input__input-list-item.mg-c-input__input-list-item--selected{font-weight:700}.mg-c-input.mg-c-input--combobox .mg-c-input__input-list-item.mg-c-input__input-list-item--selected mg-icon{margin-left:auto}.mg-c-input.mg-c-input--combobox.mg-c-input--width-2 .mg-c-input__box{width:calc(var(--mg-b-size-16) + var(--mg-b-size-8)*2 + var(--mg-b-size-24) + var(--mg-b-size-min-height)*2 + var(--mg-b-size-4))}.mg-c-input.mg-c-input--combobox.mg-c-input--width-4 .mg-c-input__box{width:calc(var(--mg-b-size-16) + var(--mg-b-size-8)*2 + var(--mg-b-size-48) + var(--mg-b-size-min-height)*2 + var(--mg-b-size-4))}.mg-c-input.mg-c-input--combobox.mg-c-input--width-16 .mg-c-input__box{width:calc(var(--mg-b-size-16) + var(--mg-b-size-8)*2 + calc(23 * var(--mg-b-size-8)) + var(--mg-b-size-min-height)*2 + var(--mg-b-size-4))}.mg-c-input.mg-c-input--combobox.mg-c-input--width-full mg-popover{--mg-c-popover-max-width:var(--mg-c-input-list-width, var(--mg-c-popover-max-width))}.mg-c-input.mg-c-input--combobox.mg-c-input--width-full .mg-c-input__input-group-container{display:flex;width:100%}.mg-c-input.mg-c-input--combobox.mg-c-input--width-full .mg-c-input__box{flex:1}.mg-c-input.mg-c-input--combobox.mg-c-input--input-append .mg-c-input__box{padding-right:calc(var(--mg-b-size-min-height)*var(--mg-c-input-append-x) + var(--mg-b-size-4))}.mg-c-input.mg-c-input--combobox.mg-c-input--input-append .mg-c-input__box-append{position:absolute;top:0;right:0}";const _=t=>t&&typeof t==="object"&&typeof t.title==="string"&&t.value!==undefined;const x=t=>Array.isArray(t)&&t.every(_);const y=t=>{const i=u(t)&&Object.hasOwn(t,"request")&&Object.hasOwn(t,"response");if(i){const{request:i,response:e}=t;if([i,e].some((t=>!u(t))))return false;const s=typeof i.filter==="string";const n=typeof e==="object"&&typeof e.total==="string"&&typeof e.items==="string"&&typeof e.next==="string"&&typeof e.itemTitle==="string"&&typeof e.itemValue==="string";return s&&n}else{return i}};const z=(t,i)=>{if(!Boolean(t))return;else if(URL.canParse(t)){return t}const e=t.includes("?")&&t.split("?").pop();if(Boolean(e)){const{origin:t,pathname:s}=new URL(i);return`${t}${s}?${e}`}else{return t}};const k=class{constructor(e){t(this,e);this.valueChange=i(this,"value-change");this.filterChange=i(this,"filter-change");this.loadMore=i(this,"load-more");this.inputValid=i(this,"input-valid");this.classFocus="mg-u-is-focused";this.hasDisplayedError=false;this.name=this.identifier;this.labelOnTop=false;this.labelHide=false;this.required=false;this.readonly=false;this.disabled=false;this.mgWidth="full";this.tooltipPosition="input";this.options=new n([]);this.filter="";this.classCollection=new o(["mg-c-input--combobox","mg-c-input--has-icon","mg-c-input--input-append"]);this.popoverDisplay=false;this.handleOptionClick=t=>{this.setValue(this.options.items.find((i=>i.value===t.target.id)));this.popoverDisplay=false};this.handleResetButton=t=>{t.stopPropagation();this.reset().then((()=>{this.input.focus()}))};this.handlePopoverDisplay=t=>{this.popoverDisplay=t.detail};this.handleFilterInput=()=>{this.checkValidity();if(this.hasDisplayedError)this.setErrorMessage();if(!this.popoverDisplay)this.popoverDisplay=true;this.filter=this.input.value};this.handleFilterBlur=()=>{if(this.popoverDisplay)return;this.handlerInProgress="blur";this.displayError().finally((()=>{this.handlerInProgress=undefined}))};this.handleFilterFocus=()=>{if(!this.isLoading){this.option=null}};this.handleLoadMoreButton=()=>{this.loadingWrapper({name:"load-more",cursor:a.NEXT}).then((()=>{this.input.focus()}))};this.handleFilterKeydown=t=>{if(this.disabled||t.ctrlKey||t.shiftKey)return;let i=false;switch(t.key){case v.TAB:case v.ENTER:i=t.key===v.ENTER;const e=this.option||this.options.items.find(this.isCurrentOption);if(this.popoverDisplay)this.setValue(this.page.total>0?e:null);this.popoverDisplay=false;break;case v.DOWN:case v.ARROWDOWN:case v.UP:case v.ARROWUP:i=true;if(this.isLoading||!(this.page.total>0)){this.popoverDisplay=true;break}if(Boolean(t.altKey)&&[v.DOWN,v.ARROWDOWN].includes(t.key)){this.popoverDisplay=true;break}let s;const n=this.popoverDisplay&&_(this.option);if([v.DOWN,v.ARROWDOWN].includes(t.key)){s=n?a.NEXT:a.FIRST}else if([v.UP,v.ARROWUP].includes(t.key)){s=n?a.PREVIOUS:a.LAST}this.loadingWrapper({name:"scroll",cursor:s});this.popoverDisplay=true;break;case v.LEFT:case v.ARROWLEFT:case v.HOME:case v.RIGHT:case v.ARROWRIGHT:case v.END:if(!_(this.option))break;i=true;this.option=null;let o;if(v.HOME===t.key){o=0}else if(v.END===t.key){o=this.filter.length}if(typeof o==="number"){this.input.setSelectionRange(o,o)}break;case v.ESC:case v.ESCAPE:i=true;if(this.popoverDisplay){this.popoverDisplay=false}else{this.setValue(null);this.filter="";this.option=null}break;default:this.option=null;break}if(i){t.stopPropagation();t.preventDefault()}};this.scrollToIndex=t=>{var i;(i=this.element.shadowRoot.querySelector(`li:nth-of-type(${(t||0)+this.page.baseIndex})`))===null||i===void 0?void 0:i.scrollIntoView()};this.isCurrentOption=t=>(_(this.value)?this.value.value:this.value)===t.value;this.getValueTitle=()=>{if(this.value&&_(this.value))return this.value.title;else if(typeof this.value==="string")return this.value;else return""};this.checkValidity=()=>{this.setValidity(this.readonly||this.disabled||this.input.checkValidity())};this.setErrorMessage=t=>{this.errorMessage=undefined;if(!this.valid&&t!==undefined){this.errorMessage=t}else if(!this.valid&&this.input.validity.valueMissing){this.errorMessage=this.messages.errors.required}};this.optionsFilter=t=>this.filter===""?true:t.title.toLocaleLowerCase().includes(this.filter.toLocaleLowerCase());this.loadingWrapper=t=>{let i;let e;if(!Boolean(this.loadingAction)){this.loadingAction=t.name}if(Boolean(this.option)&&this.loadingAction!=="load-more"){e=this.page.items.findIndex((t=>t.value.toString()===this.option.value.toString()))}else if(this.loadingAction==="load-more"){e=this.page.items.length-this.page.baseIndex}if(t.name==="load-more"){this.isLoading=true;i=this.goToNextPage}else if(t.cursor===a.NEXT&&this.page.items.length<=this.page.total&&e+this.page.baseIndex===this.page.items.length&&e+this.page.baseIndex<this.page.total){this.loadMoreElement.click();return}else if(t.name==="scroll"){i=h}else{i=this.updatePage}return i().then((()=>{const i=this.options.items.filter(this.optionsFilter);if(t.name!=="load-data"){e=this.page.getIndexFromCursor(t.cursor,this.loadingAction==="load-more"&&e>=0?i[e]:this.option)}this.option=i[e];this.scrollToIndex(e)})).finally((()=>{requestAnimationFrame((()=>{this.isLoading=false;this.loadingAction=undefined}))}))};this.goToNextPage=()=>{this.loadMore.emit();if(Boolean(this.fetchurl)){return this.getOptions(typeof this.page.next==="string"?this.page.next:undefined).then((t=>{if(!Boolean(t))return;const i=[...this.page.items,...t.items];this.options=new n(i,{total:t.total,next:t.next,top:i.length})}))}else{return h((()=>{if(typeof this.page.next==="function"){const t=this.page.next();this.page=new l(Object.assign(Object.assign({},t),{items:[...this.page.items,...t.items]}))}}))}};this.updatePage=async()=>{if(Boolean(this.fetchurl)){return this.getOptions().then((t=>{if(!Boolean(t))return;this.options=new n(t.items,{total:t.total,next:t.next,top:t.top})}))}else{this.page=this.options.getPage(0,this.optionsFilter)}};this.getOptions=async(t=this.fetchurl)=>{const i=(typeof t==="string"?t:t.toString()).replaceAll(this.fetchmappings.request.filter,encodeURIComponent(this.filter));try{const t=await fetch(i,this.fetchoptions).then((t=>t.json()));if(!t)return null;const e=r(t,this.fetchmappings.response.items).map((t=>({title:r(t,this.fetchmappings.response.itemTitle),value:r(t,this.fetchmappings.response.itemValue)})));const s=Number(r(t,this.fetchmappings.response.total,0));const n=z(r(t,this.fetchmappings.response.next),this.fetchurl.toString());return{items:e,total:s,next:n,top:e.length}}catch(t){}}}watchValue(t){this.filter=this.getValueTitle();this.valueChange.emit(t)}watchItems(t){if(Boolean(this.fetchurl)&&!Boolean(t)){return}else if(Boolean(this.fetchurl)&&Boolean(t)){throw new Error(`<mg-input-combobox> prop "items" values cannot be use with "fetchurl" prop defined. Passed value: ${c(t)}.`)}else if(Array.isArray(t)&&t.length===0){this.options=new n([])}else if(p(t)){this.options=new n(t.map((t=>({title:t,value:t}))),{total:t.length})}else if(x(t)){this.options=new n(t,{total:t.length})}else{throw new Error(`<mg-input-combobox> prop "items" values must be the same type, string or Option. Passed value: ${c(t)}.`)}}watchIdentifier(t){if(Boolean(t)){this.popoverId=`${t}-popover`;this.element.dataset.mgPopoverGuard=this.popoverId}}watchReadonly(t){if(t)this.classCollection.add(g);else this.classCollection.delete(g)}watchValidityChange(t,i,e){if(this.input===undefined)return;this.input[e]=t;this.checkValidity();if(this.hasDisplayedError){this.setErrorMessage();this.hasDisplayedError=false}}watchDisabled(t){if(t){this.classCollection.add(d)}else{this.classCollection.delete(d)}}watchMgWidth(t){b.forEach((t=>{this.classCollection.delete(`mg-c-input--width-${t}`)}));if(t!==undefined)this.classCollection.add(`mg-c-input--width-${this.mgWidth}`);this.classCollection=new o(this.classCollection.classes)}watchFetchUrl(t){if(t&&!URL.canParse(t)){throw new Error(`<mg-input-combobox> prop "fetchurl" value must be URL or string. Passed value: ${c(t)}.`)}}watchFetchOptions(t){if(this.fetchurl&&t&&!u(t)){throw new Error(`<mg-input-combobox> prop "fetchoptions" value must be a valid RequestInit. Passed value: ${c(t)}.`)}else{new Request(this.fetchurl,t)}}watchFetchMappings(t){if(Boolean(this.fetchurl)&&!Boolean(t)){throw new Error(`<mg-input-combobox> prop "fetchmappings" is required with "fetchurl" prop.`)}else if(Boolean(t)&&!y(t)){throw new Error(`<mg-input-combobox> prop "fetchmappings" value must be { request: RequestMappingType, response: ResponseMappingType }. Passed value: ${c(t)}.`)}}watchOptions(t){this.page=t.getPage(0,Boolean(this.filter)?this.optionsFilter:undefined)}watchFilter(t){this.loadingWrapper({name:"load-data"});this.filterChange.emit(t)}watchPopoverDisplay(t){if(t){this.classCollection.add(this.classFocus);this.input.focus();this.scrollToIndex(0)}else{this.option=null;this.filter=this.getValueTitle();this.classCollection.delete(this.classFocus);this.handlerInProgress="blur";this.displayError().finally((()=>{this.handlerInProgress=undefined}))}}async setFocus(){this.input.focus()}displayError(){return new Promise((t=>{requestAnimationFrame((()=>{this.checkValidity();this.setErrorMessage();this.hasDisplayedError=this.invalid;t()}))}))}async setError(t,i){if(typeof t!=="boolean"){throw new Error('<mg-input-combobox> method "setError()" param "valid" must be a boolean.')}else if(!m(i)){throw new Error('<mg-input-combobox> method "setError()" param "errorMessage" must be a string.')}else{this.setValidity(t);this.setErrorMessage(t?undefined:i);this.hasDisplayedError=this.invalid}}async reset(){if(this.readonly)return;this.setValue(null);this.option=null;this.filter="";this.checkValidity();this.errorMessage=undefined;this.hasDisplayedError=false}setValue(t){if(!_(t)){this.value=""}else{this.value=p(this.items||this.options.items)?t.title:Object.assign({},t)}}setValidity(t){const i=this.valid;this.valid=t;this.invalid=!this.valid;if(this.handlerInProgress===undefined||this.handlerInProgress==="blur"&&this.valid!==i)this.inputValid.emit(this.valid)}componentWillLoad(){this.messages=f(this.element).messages;this.watchIdentifier(this.identifier);this.watchItems(this.items);if(Boolean(this.fetchurl)){this.watchFetchUrl(this.fetchurl);this.watchFetchOptions(this.fetchoptions);this.watchFetchMappings(this.fetchmappings);this.loadingWrapper({name:"load-data"})}this.watchValue(this.value);this.watchOptions(this.options);this.watchMgWidth(this.mgWidth);this.watchReadonly(this.readonly);this.watchDisabled(this.disabled);return setTimeout((()=>{this.checkValidity()}),0)}render(){var t,i,s,n,o,a;const h=`${this.identifier}-list`;const r=this.getValueTitle();const c=this.value&&!this.disabled;let p;if(((t=this.page)===null||t===void 0?void 0:t.items.length)>0)p="list";else if(((i=this.page)===null||i===void 0?void 0:i.items.length)===0&&Boolean(this.filter))p="notfound";else if(((s=this.page)===null||s===void 0?void 0:s.items.length)===0)p="notavailable";return e("mg-input",{key:"b8c4c6d18bb1d16ff0a8494ddb698cb4e0198e43",label:this.label,identifier:this.identifier,class:this.classCollection.classes.join(" "),ariaDescribedbyIDs:p&&p!=="list"?[p]:[],labelOnTop:this.labelOnTop,labelHide:this.labelHide,required:this.required,tooltip:this.tooltip,tooltipPosition:this.readonly&&this.value===undefined?"label":this.tooltipPosition,helpText:this.helpText,errorMessage:this.errorMessage},this.readonly?r&&e("b",{class:"mg-c-input__readonly-value"},r):e("mg-popover",{identifier:this.popoverId,placement:"bottom-start",display:this.popoverDisplay,"arrow-hide":true,style:{"--mg-c-input-list-width":Boolean((n=this.input)===null||n===void 0?void 0:n.offsetWidth)?`${this.input.offsetWidth}px`:undefined,"--mg-c-input-append-x":c?"2":"1"},"data-fallback-placement":"bottom-end","onDisplay-change":this.handlePopoverDisplay},e("div",{class:"mg-c-input__input-group-container"},e("mg-icon",{icon:"magnifying-glass"}),e("input",{type:"text",role:"combobox",class:"mg-c-input__box mg-c-input__box--width",value:this.filter,id:this.identifier,name:this.name,placeholder:this.placeholder,title:this.placeholder,disabled:this.disabled,required:this.required,autocomplete:"off","aria-autocomplete":"list","aria-expanded":this.popoverDisplay.toString(),"aria-controls":h,"aria-invalid":(this.invalid===true).toString(),"aria-activedescendant":Boolean((o=this.option)===null||o===void 0?void 0:o.value)?this.option.value:typeof this.value==="string"?this.value:(a=this.value)===null||a===void 0?void 0:a.value,onInput:this.handleFilterInput,onBlur:this.handleFilterBlur,onFocus:this.handleFilterFocus,onKeyDown:this.handleFilterKeydown,ref:t=>{if(t!==null)this.input=t}}),c&&e("mg-button",{class:"mg-c-input__box-append mg-c-input__reset",variant:"flat","is-icon":true,label:this.messages.general.reset,"aria-controls":this.identifier,tabindex:"-1",onClick:this.handleResetButton},e("mg-icon",{icon:"cross"})),e("mg-button",{class:"mg-c-input__box-append",variant:"flat","is-icon":true,label:this.itemsLabel,tabindex:"-1",disabled:this.disabled},e("mg-icon",{icon:`chevron-${this.popoverDisplay?"up":"down"}`}))),e("div",{slot:"content",class:"mg-c-input__popover-container"},p==="list"&&[e("ul",{key:"list",class:"mg-c-input__input-list",role:"listbox",id:h,"aria-label":this.itemsLabel,"aria-setsize":this.page.total},this.page.items.map((t=>e("li",{role:"option",class:{"mg-c-input__input-list-item":true,"mg-c-input__input-list-item--focus-visible":this.option===t,"mg-c-input__input-list-item--selected":this.isCurrentOption(t)},key:t.title,id:t.value.toString(),"aria-selected":this.isCurrentOption(t).toString(),onClick:this.handleOptionClick},t.title,this.isCurrentOption(t)&&e("mg-icon",{icon:"check"}))))),this.isLoading&&e("mg-loader",{key:"loader",message:this.messages.input.combobox.search,class:{"mg-u-visually-hidden":Boolean(this.page.next)}}),this.page.next&&e("mg-button",{key:"load-more",variant:"flat",class:"mg-c-input__load-more",tabIndex:-1,disabled:this.isLoading,"full-width":true,"disable-on-click":true,onClick:this.handleLoadMoreButton,"aria-controls":h,ref:t=>{if(t!==null)this.loadMoreElement=t}},e("mg-icon",{icon:"chevron-down"}),this.messages.input.combobox.loadMore)],p==="notfound"&&e("p",{id:p,class:"mg-c-input__popover-info"},this.messages.input.combobox.notFound),p==="notavailable"&&e("p",{id:p,class:"mg-c-input__popover-info"},this.messages.input.combobox.notAvailable))))}get element(){return s(this)}static get watchers(){return{value:["watchValue"],items:["watchItems"],identifier:["watchIdentifier"],readonly:["watchReadonly","watchValidityChange"],required:["watchValidityChange"],disabled:["watchValidityChange","watchDisabled"],mgWidth:["watchMgWidth"],fetchurl:["watchFetchUrl"],fetchoptions:["watchFetchOptions"],fetchmappings:["watchFetchMappings"],options:["watchOptions"],filter:["watchFilter"],popoverDisplay:["watchPopoverDisplay"]}}};k.style=w;export{k as mg_input_combobox};
|
|
2
|
-
//# sourceMappingURL=p-68f7de47.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["mgInputComboboxCss","isItem","item","title","value","undefined","isItems","items","Array","isArray","every","isFetchmappings","isValidRoot","isObject","Object","hasOwn","request","response","some","property","isValidRequest","filter","isValidResponse","total","next","itemTitle","itemValue","mapUrl","newValue","oldValue","Boolean","URL","canParse","params","includes","split","pop","origin","pathname","MgInputCombobox","constructor","hostRef","this","classFocus","hasDisplayedError","name","identifier","labelOnTop","labelHide","required","readonly","disabled","mgWidth","tooltipPosition","options","Paginate","classCollection","ClassList","popoverDisplay","handleOptionClick","event","setValue","find","option","target","id","handleResetButton","stopPropagation","reset","then","input","focus","handlePopoverDisplay","detail","handleFilterInput","checkValidity","setErrorMessage","handleFilterBlur","handlerInProgress","displayError","finally","handleFilterFocus","isLoading","handleLoadMoreButton","loadingWrapper","cursor","Cursor","NEXT","handleFilterKeydown","ctrlKey","shiftKey","guard","key","Keys","TAB","ENTER","isCurrentOption","page","DOWN","ARROWDOWN","UP","ARROWUP","altKey","isNavigationStart","FIRST","PREVIOUS","LAST","LEFT","ARROWLEFT","HOME","RIGHT","ARROWRIGHT","END","index","length","setSelectionRange","ESC","ESCAPE","preventDefault","scrollToIndex","_a","element","shadowRoot","querySelector","baseIndex","scrollIntoView","getValueTitle","setValidity","errorMessage","valid","validity","valueMissing","messages","errors","optionsFilter","toLocaleLowerCase","action","promise","loadingAction","findIndex","toString","goToNextPage","loadMoreElement","click","nextTick","updatePage","getIndexFromCursor","requestAnimationFrame","loadMore","emit","fetchurl","getOptions","nextPage","top","Page","assign","async","getPage","url","updateUrl","replaceAll","fetchmappings","encodeURIComponent","fetch","fetchoptions","json","getObjectValueFromKey","map","Number","watchValue","valueChange","watchItems","Error","allItemsAreString","watchIdentifier","popoverId","dataset","mgPopoverGuard","watchReadonly","add","classReadonly","delete","watchValidityChange","_oldValue","prop","watchDisabled","classDisabled","watchMgWidth","widths","forEach","width","classes","watchFetchUrl","watchFetchOptions","Request","watchFetchMappings","watchOptions","watchFilter","filterChange","watchPopoverDisplay","setFocus","Promise","resolve","invalid","setError","isValidString","oldValidValue","inputValid","componentWillLoad","initLocales","setTimeout","render","listId","readonlyValue","withResetButton","popoverContent","_b","_c","h","label","class","join","ariaDescribedbyIDs","tooltip","helpText","placement","display","style","_d","offsetWidth","icon","type","role","placeholder","autocomplete","_e","_f","onInput","onBlur","onFocus","onKeyDown","ref","el","variant","general","tabindex","onClick","itemsLabel","slot","message","combobox","search","tabIndex","notFound","notAvailable"],"sources":["../styles/dist/components/mg-input-combobox.css?tag=mg-input-combobox&encapsulation=shadow","src/components/molecules/inputs/mg-input-combobox/mg-input-combobox.tsx"],"sourcesContent":[".mg-c-input__box{height:var(--mg-b-size-min-height);box-sizing:border-box;padding:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2) var(--mg-b-size-8);border-width:var(--mg-c-input-border-width);border-style:solid;border-color:var(--mg-c-input-color-border);border-radius:var(--mg-c-input-border-radius);background-color:var(--mg-b-color-light);color:var(--mg-b-color-dark);font-family:inherit;font-size:var(--mg-b-font-size);text-align:var(--mg-c-input-text-align, left)}.mg-c-input__box::placeholder{color:var(--mg-c-input-placeholder-color-text);font-style:italic}.mg-c-input__box:focus{box-shadow:0 0 var(--mg-b-size-4) var(--mg-c-input-color-box-shadow-focus)}.mg-c-input__box:disabled{opacity:var(--mg-b-opacity-element-disabled)}.mg-c-input.mg-c-input--has-error .mg-c-input__box{border-color:var(--mg-b-color-danger)}.mg-c-input.mg-c-input--is-input-group-append{--mg-c-button-border-radius-top-left: 0;--mg-c-button-border-radius-bottom-left: 0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box{margin-right:calc(-1*var(--mg-b-size-border));border-bottom-right-radius:0;border-top-right-radius:0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box:focus-visible{outline-offset:-0.2rem;outline-style:solid;outline-width:.2rem}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]){--mg-c-button-border-radius-top-right: 0;--mg-c-button-border-radius-bottom-right: 0}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]:not(:last-of-type)){--mg-c-button-border-right-width: 0}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]:last-of-type){--mg-c-button-border-radius-top-right: var(--mg-c-input-border-radius);--mg-c-button-border-radius-bottom-right: var(--mg-c-input-border-radius)}.mg-c-input.mg-c-input--is-append-input-slot-content:not(.mg-c-input--readonly) ::slotted([slot=append-input]){align-self:start;padding-top:calc((var(--mg-b-size-min-height) - var(--mg-b-size-16))/2)}.mg-c-input.mg-c-input--has-icon .mg-c-input__with-character-left>mg-icon:first-of-type,.mg-c-input.mg-c-input--has-icon .mg-c-input__input-group-container>mg-icon:first-of-type{position:absolute;top:50%;left:var(--mg-b-size-8);color:var(--mg-c-input-color-icon);transform:translateY(-50%)}.mg-c-input.mg-c-input--has-icon .mg-c-input__with-character-left .mg-c-input__box,.mg-c-input.mg-c-input--has-icon .mg-c-input__input-group-container .mg-c-input__box{padding-left:calc(var(--mg-b-size-16) + var(--mg-b-size-8)*2)}.mg-c-input__input-container{width:100%;flex:1 auto}.mg-c-input.mg-c-input--width-full .mg-c-input__box{width:100%}.mg-c-input.mg-c-input--width-2 .mg-c-input__with-character-left,.mg-c-input.mg-c-input--width-4 .mg-c-input__with-character-left,.mg-c-input.mg-c-input--width-16 .mg-c-input__with-character-left{width:max-content}.mg-c-input.mg-c-input--width-2 .mg-c-input__with-character-left:has(textarea),.mg-c-input.mg-c-input--width-4 .mg-c-input__with-character-left:has(textarea),.mg-c-input.mg-c-input--width-16 .mg-c-input__with-character-left:has(textarea){flex-grow:inherit}.mg-c-input.mg-c-input--width-2 .mg-c-input__box{width:var(--mg-b-size-48)}.mg-c-input.mg-c-input--width-2 .mg-c-input__with-character-left:not(:has(textarea)) .mg-c-input__box{width:calc(var(--mg-b-size-48) + var(--mg-c-character-left-message-length)*(.35ch + .3rem))}.mg-c-input.mg-c-input--width-4 .mg-c-input__box{width:var(--mg-b-size-72)}.mg-c-input.mg-c-input--width-4 .mg-c-input__with-character-left:not(:has(textarea)) .mg-c-input__box{width:calc(var(--mg-b-size-72) + var(--mg-c-character-left-message-length)*(.35ch + .3rem))}.mg-c-input.mg-c-input--width-16 .mg-c-input__box{width:calc(26*var(--mg-b-size-8))}.mg-c-input.mg-c-input--width-16 .mg-c-input__with-character-left:not(:has(textarea)) .mg-c-input__box{width:calc(calc(26 * var(--mg-b-size-8)) + var(--mg-c-character-left-message-length)*(.35ch + .3rem))}.mg-c-input.mg-c-input--width-full:not(.mg-c-input--label-on-top){justify-content:stretch}.mg-c-input.mg-c-input--is-input-group-append ::slotted([slot=append-input]),.mg-c-input.mg-c-input--is-append-input-slot-content ::slotted([slot=append-input]){width:auto}:host(.mg-c-input.mg-c-input--width-full) ::slotted(*:not(mg-input-title)){width:100%;max-width:100%}.mg-c-input__readonly-value{min-height:var(--mg-b-font-size);align-self:flex-start;margin-top:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2);word-break:break-word}.mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media(prefers-reduced-motion){*{animation:none !important;transition:none !important}}.mg-c-input.mg-c-input--combobox mg-popover{--mg-c-popover-padding-vertical: 0;--mg-c-popover-padding-horizontal: 0}.mg-c-input.mg-c-input--combobox .mg-c-input__input-group-container{position:relative}.mg-c-input.mg-c-input--combobox .mg-c-input__box{cursor:pointer}.mg-c-input.mg-c-input--combobox .mg-c-input__popover-container{display:flex;min-width:var(--mg-c-input-list-width);max-height:calc(50*var(--mg-b-size-8) - var(--mg-b-size-32));flex-direction:column;gap:var(--mg-b-size-4);overflow-y:scroll}.mg-c-input.mg-c-input--combobox .mg-c-input__popover-info{padding:var(--mg-b-size-8);margin:0;text-align:center}.mg-c-input.mg-c-input--combobox .mg-c-input__load-more{padding:0 var(--mg-b-size-8) var(--mg-b-size-4)}.mg-c-input.mg-c-input--combobox .mg-c-input__reset{padding-right:var(--mg-b-size-min-height)}.mg-c-input.mg-c-input--combobox .mg-c-input__input-list{padding:0;margin:0;cursor:pointer;list-style:none}.mg-c-input.mg-c-input--combobox .mg-c-input__input-list-item{display:flex;padding:var(--mg-b-size-8)}.mg-c-input.mg-c-input--combobox .mg-c-input__input-list-item:hover,.mg-c-input.mg-c-input--combobox .mg-c-input__input-list-item.mg-c-input__input-list-item--focus-visible{background-color:var(--mg-b-color-neutral-20)}.mg-c-input.mg-c-input--combobox .mg-c-input__input-list-item.mg-c-input__input-list-item--selected{font-weight:700}.mg-c-input.mg-c-input--combobox .mg-c-input__input-list-item.mg-c-input__input-list-item--selected mg-icon{margin-left:auto}.mg-c-input.mg-c-input--combobox.mg-c-input--width-2 .mg-c-input__box{width:calc(var(--mg-b-size-16) + var(--mg-b-size-8)*2 + var(--mg-b-size-24) + var(--mg-b-size-min-height)*2 + var(--mg-b-size-4))}.mg-c-input.mg-c-input--combobox.mg-c-input--width-4 .mg-c-input__box{width:calc(var(--mg-b-size-16) + var(--mg-b-size-8)*2 + var(--mg-b-size-48) + var(--mg-b-size-min-height)*2 + var(--mg-b-size-4))}.mg-c-input.mg-c-input--combobox.mg-c-input--width-16 .mg-c-input__box{width:calc(var(--mg-b-size-16) + var(--mg-b-size-8)*2 + calc(23 * var(--mg-b-size-8)) + var(--mg-b-size-min-height)*2 + var(--mg-b-size-4))}.mg-c-input.mg-c-input--combobox.mg-c-input--width-full mg-popover{--mg-c-popover-max-width: var(--mg-c-input-list-width, var(--mg-c-popover-max-width))}.mg-c-input.mg-c-input--combobox.mg-c-input--width-full .mg-c-input__input-group-container{display:flex;width:100%}.mg-c-input.mg-c-input--combobox.mg-c-input--width-full .mg-c-input__box{flex:1}.mg-c-input.mg-c-input--combobox.mg-c-input--input-append .mg-c-input__box{padding-right:calc(var(--mg-b-size-min-height)*var(--mg-c-input-append-x) + var(--mg-b-size-4))}.mg-c-input.mg-c-input--combobox.mg-c-input--input-append .mg-c-input__box-append{position:absolute;top:0;right:0}/*# sourceMappingURL=mg-input-combobox.css.map */\n","import { Component, Event, h, Prop, EventEmitter, State, Element, Method, Watch } from '@stencil/core';\nimport { allItemsAreString, ClassList, getObjectValueFromKey, isValidString, nextTick, Page, Paginate, Cursor, type CursorType, toString, isObject } from '@mgdis/stencil-helpers';\nimport { type ActionType, type RequestMappingType, type ResponseMappingType } from './mg-input-combobox.conf';\nimport { type TooltipPosition, type Width, type EventType, widths, classReadonly, classDisabled } from '../mg-input/mg-input.conf';\nimport type { Option } from '../../../../types';\nimport { initLocales } from '../../../../locales';\nimport { Keys } from '../../../../utils/events.utils';\n\n/**\n * Check if object is an item\n * @param item - object to check\n * @returns True if object is an item\n */\nconst isItem = (item: unknown): item is Option => item && typeof item === 'object' && typeof (item as Option).title === 'string' && (item as Option).value !== undefined;\n\n/**\n * Check if objects are items\n * @param items - items to check\n * @returns True if objects are items\n */\nconst isItems = (items: unknown[]): items is Option[] => Array.isArray(items) && items.every(isItem);\n\n/**\n * Check if object is valid combobox fetchmappings\n * @param value - to validate\n * @returns truthy if mapping is valid\n */\nconst isFetchmappings = (value: unknown): value is MgInputCombobox['fetchmappings'] => {\n const isValidRoot = isObject<Record<string, unknown>>(value) && Object.hasOwn(value, 'request') && Object.hasOwn(value, 'response');\n if (isValidRoot) {\n const { request, response } = value as MgInputCombobox['fetchmappings'];\n if ([request, response].some(property => !isObject(property))) return false;\n const isValidRequest = typeof request.filter === 'string';\n const isValidResponse =\n typeof response === 'object' &&\n typeof response.total === 'string' &&\n typeof response.items === 'string' &&\n typeof response.next === 'string' &&\n typeof response.itemTitle === 'string' &&\n typeof response.itemValue === 'string';\n return isValidRequest && isValidResponse;\n } else {\n return isValidRoot;\n }\n};\n\n/**\n * Map new URL from old url\n * @param newValue - new URL value\n * @param oldValue - previous URL value\n * @returns updated url\n */\nconst mapUrl = (newValue: string, oldValue: string): string => {\n if (!Boolean(newValue)) return;\n else if (URL.canParse(newValue)) {\n return newValue;\n }\n\n // build new URL\n const params = newValue.includes('?') && newValue.split('?').pop();\n if (Boolean(params)) {\n const { origin, pathname } = new URL(oldValue);\n return `${origin}${pathname}?${params}`;\n } else {\n return newValue;\n }\n};\n\n@Component({\n tag: 'mg-input-combobox',\n styleUrl: '../../../../../node_modules/@mgdis/styles/dist/components/mg-input-combobox.css',\n shadow: true,\n})\nexport class MgInputCombobox {\n /************\n * Internal *\n ************/\n\n // Classes\n private readonly classFocus = 'mg-u-is-focused';\n\n // HTML selector\n private input: HTMLInputElement;\n private loadMoreElement: HTMLMgButtonElement;\n private popoverId: string;\n\n // Locales\n private messages;\n\n // hasDisplayedError (triggered by blur event)\n private hasDisplayedError = false;\n\n private handlerInProgress: EventType;\n private loadingAction: ActionType['name'];\n\n private page: Page<Option>;\n\n /**************\n * Decorators *\n **************/\n\n /**\n * Get component DOM element\n */\n @Element() element: HTMLMgInputComboboxElement;\n\n /**\n * Define component value\n */\n @Prop({ mutable: true, reflect: true }) value: string | Option;\n @Watch('value')\n watchValue(newValue: MgInputCombobox['value']): void {\n this.filter = this.getValueTitle();\n this.valueChange.emit(newValue);\n }\n\n /**\n * Define components items\n */\n @Prop() items: (string | Option)[];\n @Watch('items')\n watchItems(newValue: MgInputCombobox['items']) {\n if (Boolean(this.fetchurl) && !Boolean(newValue)) {\n // skip newValue check\n return;\n } else if (Boolean(this.fetchurl) && Boolean(newValue)) {\n throw new Error(`<mg-input-combobox> prop \"items\" values cannot be use with \"fetchurl\" prop defined. Passed value: ${toString(newValue)}.`);\n }\n // Empty options\n else if (Array.isArray(newValue) && newValue.length === 0) {\n this.options = new Paginate([]);\n }\n // String array\n else if (allItemsAreString(newValue)) {\n this.options = new Paginate(\n newValue.map(item => ({ title: item, value: item })),\n { total: newValue.length },\n );\n }\n // Object array\n else if (isItems(newValue)) {\n this.options = new Paginate(newValue, { total: newValue.length });\n } else {\n throw new Error(`<mg-input-combobox> prop \"items\" values must be the same type, string or Option. Passed value: ${toString(newValue)}.`);\n }\n }\n\n /**\n * Define items label\n * Include short description. Required for accessibility.\n * @example\n * ```\n * Countries\n * ```\n */\n @Prop() itemsLabel!: string;\n\n /**\n * Identifier is used for the element ID (id is a reserved prop in Stencil.js)\n */\n @Prop() identifier!: string;\n @Watch('identifier')\n watchIdentifier(newValue: MgInputCombobox['identifier']): void {\n if (Boolean(newValue)) {\n this.popoverId = `${newValue}-popover`;\n this.element.dataset.mgPopoverGuard = this.popoverId;\n }\n }\n\n /**\n * Input name\n * If not set the value equals the identifier\n */\n @Prop() name: string = this.identifier;\n\n /**\n * Input label\n */\n @Prop() label!: string;\n\n /**\n * Define if label is displayed on top\n */\n @Prop() labelOnTop = false;\n\n /**\n * Define if label is visible\n */\n @Prop() labelHide = false;\n\n /**\n * Define input placeholder.\n * It should be a word or short phrase that demonstrates the expected type of data, not a replacement for labels or help combobox.\n */\n @Prop() placeholder?: string;\n\n /**\n * Define if input is required\n */\n @Prop() required = false;\n\n /**\n * Define if input is readonly\n */\n @Prop() readonly = false;\n @Watch('readonly')\n watchReadonly(newValue: MgInputCombobox['readonly']): void {\n if (newValue) this.classCollection.add(classReadonly);\n else this.classCollection.delete(classReadonly);\n }\n\n /**\n * Define if input is disabled\n */\n @Prop() disabled = false;\n @Watch('required')\n @Watch('readonly')\n @Watch('disabled')\n watchValidityChange(newValue: boolean, _oldValue: boolean, prop: string): void {\n if (this.input === undefined) return;\n this.input[prop] = newValue;\n this.checkValidity();\n if (this.hasDisplayedError) {\n this.setErrorMessage();\n this.hasDisplayedError = false;\n }\n }\n\n @Watch('disabled')\n watchDisabled(newValue: MgInputCombobox['disabled']): void {\n if (newValue) {\n this.classCollection.add(classDisabled);\n } else {\n this.classCollection.delete(classDisabled);\n }\n }\n\n /**\n * Define input width\n */\n @Prop() mgWidth: Width = 'full';\n @Watch('mgWidth')\n watchMgWidth(newValue: MgInputCombobox['mgWidth']): void {\n // reset width class\n widths.forEach(width => {\n this.classCollection.delete(`mg-c-input--width-${width}`);\n });\n\n // apply new width\n if (newValue !== undefined) this.classCollection.add(`mg-c-input--width-${this.mgWidth}`);\n this.classCollection = new ClassList(this.classCollection.classes);\n }\n\n /**\n * Add a tooltip message next to the input\n */\n @Prop() tooltip?: string;\n\n /**\n * Define tooltip position\n */\n @Prop() tooltipPosition: TooltipPosition = 'input';\n\n /**\n * Add a help text under the input, usually expected data format and example\n */\n @Prop() helpText?: string;\n\n /**\n * Define API url to fetch\n * @example\n * ```\n * {\n * url: \"http://myapi.com?$select='href,name'&my-custom-param='my-custom-value'\", // url to fetch\n * }\n * ```\n */\n @Prop() fetchurl?: string | URL;\n @Watch('fetchurl')\n watchFetchUrl(newValue: MgInputCombobox['fetchurl']): void {\n if (newValue && !URL.canParse(newValue)) {\n throw new Error(`<mg-input-combobox> prop \"fetchurl\" value must be URL or string. Passed value: ${toString(newValue)}.`);\n }\n }\n\n /**\n * Define fetch options object\n * Require `fetchurl` prop to be defined otherwith it will be ignored if defined\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/RequestInit}\n * @example JSON headers:\n * ```json\n * {\n * \"headers\": {\n * \"authorization\": \"my-token\"\n * }\n * }\n * ```\n */\n @Prop() fetchoptions?: RequestInit;\n @Watch('fetchoptions')\n watchFetchOptions(newValue: MgInputCombobox['fetchoptions']): void {\n if (this.fetchurl && newValue && !isObject(newValue)) {\n throw new Error(`<mg-input-combobox> prop \"fetchoptions\" value must be a valid RequestInit. Passed value: ${toString(newValue)}.`);\n } else {\n new Request(this.fetchurl, newValue);\n }\n }\n\n /**\n * Define fetch request mappings.\n * Required with `fetchurl`\n * @example\n * ```\n * {\n * request: {\n * filter: 'name', // `filter` key\n * },\n * response: {\n * total: 'body.data.total', // response object mapping to get `total` value\n * items: 'body.data.results' // response object mapping to get `items` value\n * next: 'body.next' // response object mapping to get `next` items\n * itemTitle: 'name', // item property to map on item['title']\n * itemValue: 'href', // item property to map on item['value']\n * }\n * }\n * ```\n */\n @Prop() fetchmappings?: { request: RequestMappingType; response: ResponseMappingType };\n @Watch('fetchmappings')\n watchFetchMappings(newValue: MgInputCombobox['fetchmappings']): void {\n if (Boolean(this.fetchurl) && !Boolean(newValue)) {\n throw new Error(`<mg-input-combobox> prop \"fetchmappings\" is required with \"fetchurl\" prop.`);\n } else if (Boolean(newValue) && !isFetchmappings(newValue)) {\n throw new Error(\n `<mg-input-combobox> prop \"fetchmappings\" value must be { request: RequestMappingType, response: ResponseMappingType }. Passed value: ${toString(newValue)}.`,\n );\n }\n }\n\n /**\n * Define input valid state\n */\n @Prop({ mutable: true }) valid: boolean;\n\n /**\n * Define input invalid state\n */\n @Prop({ mutable: true }) invalid: boolean;\n\n /**\n * Define if items are loading\n */\n @State() isLoading: boolean;\n\n /**\n * Formated items for display\n */\n @State() options: Paginate<Option> = new Paginate([]);\n @Watch('options')\n watchOptions(newValue: Paginate<Option>): void {\n this.page = newValue.getPage(0, Boolean(this.filter) ? this.optionsFilter : undefined);\n }\n\n /**\n * Active option\n */\n @State() option: Option;\n\n /**\n * Option filter\n */\n @State() filter: string = '';\n @Watch('filter')\n watchFilter(newValue: MgInputCombobox['filter']): void {\n this.loadingWrapper({ name: 'load-data' });\n this.filterChange.emit(newValue);\n }\n\n /**\n * Component classes\n */\n @State() classCollection: ClassList = new ClassList(['mg-c-input--combobox', 'mg-c-input--has-icon', 'mg-c-input--input-append']);\n\n /**\n * Error message to display\n */\n @State() errorMessage: string;\n\n /**\n * Popover display state\n */\n @State() popoverDisplay = false;\n @Watch('popoverDisplay')\n watchPopoverDisplay(newValue: MgInputCombobox['popoverDisplay']): void {\n if (newValue) {\n this.classCollection.add(this.classFocus);\n this.input.focus();\n this.scrollToIndex(0);\n } else {\n // remove visual focus\n this.option = null;\n // reset filter with value\n this.filter = this.getValueTitle();\n this.classCollection.delete(this.classFocus);\n this.handlerInProgress = 'blur';\n this.displayError().finally(() => {\n // reset guard\n this.handlerInProgress = undefined;\n });\n }\n }\n\n /**\n * Emited event when value change\n */\n @Event({ eventName: 'value-change' }) valueChange: EventEmitter<HTMLMgInputComboboxElement['value']>;\n\n /**\n * Emited event when filter change\n */\n @Event({ eventName: 'filter-change' }) filterChange: EventEmitter<string>;\n\n /**\n * Emited event when `load-more` is called\n */\n @Event({ eventName: 'load-more' }) loadMore: EventEmitter<void>;\n\n /**\n * Emited event when checking validity\n */\n @Event({ eventName: 'input-valid' }) inputValid: EventEmitter<HTMLMgInputComboboxElement['valid']>;\n\n /**\n * Public method to play input focus\n */\n @Method()\n async setFocus(): Promise<void> {\n this.input.focus();\n }\n\n /**\n * Display input error if it exists.\n */\n @Method()\n displayError(): Promise<void> {\n // Use `Promise` as requested for stencil method\n // Use `requestAnimationFrame` to ensure:\n // - DOM is fully updated before validation\n // - Async operations are completed\n // - No timing issues with Stencil's render cycle\n // - Keep everything in sync both inside and outside the component\n return new Promise(resolve => {\n requestAnimationFrame(() => {\n this.checkValidity();\n this.setErrorMessage();\n this.hasDisplayedError = this.invalid;\n resolve();\n });\n });\n }\n\n /**\n * Set an error and display a custom error message.\n * This method can be used to set the component's error state from its concombobox by passing a boolean value to the `valid` parameter.\n * It must be paired with an error message to display for the given concombobox.\n * When used to set validity to `false`, you should use this method again to reset the validity to `true`.\n * @param valid - value indicating the validity\n * @param errorMessage - the error message to display\n */\n @Method()\n async setError(valid: MgInputCombobox['valid'], errorMessage: string): Promise<void> {\n if (typeof valid !== 'boolean') {\n throw new Error('<mg-input-combobox> method \"setError()\" param \"valid\" must be a boolean.');\n } else if (!isValidString(errorMessage)) {\n throw new Error('<mg-input-combobox> method \"setError()\" param \"errorMessage\" must be a string.');\n } else {\n this.setValidity(valid);\n this.setErrorMessage(valid ? undefined : errorMessage);\n this.hasDisplayedError = this.invalid;\n }\n }\n\n /**\n * Reset value, validity and error state\n */\n @Method()\n async reset(): Promise<void> {\n if (this.readonly) return;\n this.setValue(null);\n this.option = null;\n this.filter = '';\n this.checkValidity();\n this.errorMessage = undefined;\n this.hasDisplayedError = false;\n }\n\n /**\n * Handle `click` event on option\n * @param event - option element click event\n */\n private handleOptionClick = (event: MouseEvent & { target: HTMLLIElement }) => {\n this.setValue(this.options.items.find(option => option.value === event.target.id));\n this.popoverDisplay = false;\n };\n\n /**\n * Handle `click` event on reset button\n * @param event - click event\n */\n private handleResetButton = (event: MouseEvent): void => {\n event.stopPropagation();\n this.reset().then(() => {\n this.input.focus();\n });\n };\n\n /**\n * Handle `display-change` event on mg-popover\n */\n private handlePopoverDisplay = (event: CustomEvent): void => {\n this.popoverDisplay = event.detail;\n };\n\n /**\n * Handle input event\n */\n private handleFilterInput = (): void => {\n this.checkValidity();\n if (this.hasDisplayedError) this.setErrorMessage();\n if (!this.popoverDisplay) this.popoverDisplay = true;\n this.filter = this.input.value;\n };\n\n /**\n * Handle `blur` event\n */\n private handleFilterBlur = (): void => {\n // skip process if popover is displayed\n if (this.popoverDisplay) return;\n\n // Display Error\n this.handlerInProgress = 'blur';\n this.displayError().finally(() => {\n // reset guard\n this.handlerInProgress = undefined;\n });\n };\n\n /**\n * Handle `focus` event\n */\n private handleFilterFocus = (): void => {\n // ensure visual focus is always clear on focus when component isn't in loading state\n if (!this.isLoading) {\n this.option = null;\n }\n };\n\n /**\n * Handle load-more <mg-button> `click`\n */\n private handleLoadMoreButton = (): void => {\n this.loadingWrapper({ name: 'load-more', cursor: Cursor.NEXT }).then(() => {\n this.input.focus();\n });\n };\n\n /**\n * Handle `keypress` event\n * @param event - keyboard event\n */\n private handleFilterKeydown = (event: KeyboardEvent): void => {\n if (this.disabled || event.ctrlKey || event.shiftKey) return;\n\n let guard = false;\n\n // override keys actions\n switch (event.key) {\n case Keys.TAB:\n case Keys.ENTER:\n guard = event.key === Keys.ENTER;\n const option = this.option || this.options.items.find(this.isCurrentOption);\n // Sets the value to the content of the focused option in the listbox.\n if (this.popoverDisplay) this.setValue(this.page.total > 0 ? option : null);\n // Closes the popover.\n this.popoverDisplay = false;\n break;\n\n case Keys.DOWN:\n case Keys.ARROWDOWN:\n case Keys.UP:\n case Keys.ARROWUP:\n guard = true;\n if (this.isLoading || !(this.page.total > 0)) {\n this.popoverDisplay = true;\n break;\n }\n\n if (Boolean(event.altKey) && [Keys.DOWN, Keys.ARROWDOWN].includes(event.key)) {\n // Opens the popover without moving focus or changing selection.\n this.popoverDisplay = true;\n break;\n }\n\n // define cursor\n let cursor: CursorType;\n const isNavigationStart = this.popoverDisplay && isItem(this.option);\n if ([Keys.DOWN, Keys.ARROWDOWN].includes(event.key)) {\n // If the filter is not empty and the popover is displayed, moves visual focus to the first suggested value.\n // If the filter is empty and the popover is not displayed, opens the popover and moves visual focus to the first option.\n // Moves visual focus to the next option.\n // If visual focus is on the last option, moves visual focus to the first option.\n cursor = isNavigationStart ? Cursor.NEXT : Cursor.FIRST;\n } else if ([Keys.UP, Keys.ARROWUP].includes(event.key)) {\n // If the filter is not empty and the popover is displayed, moves visual focus to the last suggested value.\n // If the filter is empty, first opens the popover if it is not already displayed and then moves visual focus to the last option.\n // Moves visual focus to the previous option.\n // If visual focus is on the first option, moves visual focus to the last option.\n cursor = isNavigationStart ? Cursor.PREVIOUS : Cursor.LAST;\n }\n\n // update scroll and visual focused option in wrapper\n this.loadingWrapper({ name: 'scroll', cursor });\n\n // open popover\n this.popoverDisplay = true;\n break;\n\n case Keys.LEFT:\n case Keys.ARROWLEFT:\n case Keys.HOME:\n case Keys.RIGHT:\n case Keys.ARROWRIGHT:\n case Keys.END:\n // skip process if visual focus is not in popover\n if (!isItem(this.option)) break;\n guard = true;\n\n // Remove visual focus from popover options\n this.option = null;\n\n let index;\n if (Keys.HOME === event.key) {\n // Moves visual focus to the textbox and places the editing cursor at the beginning of the field.\n index = 0;\n } else if (Keys.END === event.key) {\n // Moves visual focus to the textbox and places the editing cursor at the end of the field.\n index = this.filter.length;\n }\n if (typeof index === 'number') {\n this.input.setSelectionRange(index, index);\n }\n break;\n\n case Keys.ESC:\n case Keys.ESCAPE:\n guard = true;\n\n if (this.popoverDisplay) {\n // If the popover is displayed, closes it.\n this.popoverDisplay = false;\n } else {\n // If the popover is not displayed, clears the filter.\n this.setValue(null);\n this.filter = '';\n // Sets visual focus on the textbox.\n this.option = null;\n }\n break;\n\n default:\n // Remove visual focus from popover options\n this.option = null;\n break;\n }\n\n if (guard) {\n event.stopPropagation();\n event.preventDefault();\n }\n };\n\n /**\n * Scroll to next option from cursor\n * @param index - targeted option index to scroll into\n */\n private scrollToIndex = (index: number): void => {\n this.element.shadowRoot.querySelector(`li:nth-of-type(${(index || 0) + this.page.baseIndex})`)?.scrollIntoView();\n };\n\n /**\n * Is option the current value\n * @param option - option to match with\n * @returns true if option is the current value\n */\n private isCurrentOption = (option: Option) => (isItem(this.value) ? this.value.value : this.value) === option.value;\n\n /**\n * Set value prop\n * @param newValue - slected option item\n */\n private setValue(newValue: MgInputCombobox['option'] | null): void {\n if (!isItem(newValue)) {\n this.value = '';\n } else {\n this.value = allItemsAreString(this.items || this.options.items) ? newValue.title : { ...newValue };\n }\n }\n\n /**\n * get value prop title\n * @returns value title\n */\n private getValueTitle = (): Option['title'] => {\n if (this.value && isItem(this.value)) return this.value.title;\n else if (typeof this.value === 'string') return this.value;\n else return '';\n };\n\n /**\n * Method to set validity values\n * @param newValue - valid new value\n */\n private setValidity(newValue: MgInputCombobox['valid']) {\n const oldValidValue = this.valid;\n this.valid = newValue;\n this.invalid = !this.valid;\n // We need to send valid event even if it is the same value\n if (this.handlerInProgress === undefined || (this.handlerInProgress === 'blur' && this.valid !== oldValidValue)) this.inputValid.emit(this.valid);\n }\n\n /**\n * Check if input is valid\n */\n private checkValidity = (): void => {\n this.setValidity(this.readonly || this.disabled || this.input.checkValidity());\n };\n\n /**\n * Set input error message\n * @param errorMessage - errorMessage override\n */\n private setErrorMessage = (errorMessage?: string): void => {\n // Set error message\n this.errorMessage = undefined;\n // Does have a custom error message\n if (!this.valid && errorMessage !== undefined) {\n this.errorMessage = errorMessage;\n }\n // required\n else if (!this.valid && this.input.validity.valueMissing) {\n this.errorMessage = this.messages.errors.required;\n }\n };\n\n /**\n * Get filtered options from `filter` input value\n * @returns filtered options\n */\n private optionsFilter = (option): boolean => (this.filter === '' ? true : option.title.toLocaleLowerCase().includes(this.filter.toLocaleLowerCase()));\n\n /**\n * Loading wrapper with a given action\n * @param action - wrapped loading action\n * @returns promisified action\n */\n private loadingWrapper = (action: ActionType): Promise<void> => {\n let promise;\n let index: number;\n\n // cache initial loading action if not defined\n if (!Boolean(this.loadingAction)) {\n this.loadingAction = action.name;\n }\n\n // update index\n if (Boolean(this.option) && this.loadingAction !== 'load-more') {\n index = this.page.items.findIndex(option => option.value.toString() === this.option.value.toString());\n } else if (this.loadingAction === 'load-more') {\n index = this.page.items.length - this.page.baseIndex;\n }\n // when action require a loadMore we fetch the API else we report action to next tick\n // Set \"load more\" if action match OR if next item not available in the current page\n if (action.name === 'load-more') {\n // wait for new element render and update scroll position\n // set component loading\n this.isLoading = true;\n promise = this.goToNextPage;\n } else if (\n action.cursor === Cursor.NEXT &&\n this.page.items.length <= this.page.total &&\n index + this.page.baseIndex === this.page.items.length &&\n index + this.page.baseIndex < this.page.total\n ) {\n // trigger load-more from button to benefit from `disabled-on-click`\n this.loadMoreElement.click();\n return;\n } else if (action.name === 'scroll') {\n promise = nextTick;\n } else {\n promise = this.updatePage;\n }\n\n return promise()\n .then(() => {\n // parse full items list from options\n const options = this.options.items.filter(this.optionsFilter);\n\n // update visual focus\n if (action.name !== 'load-data') {\n index = this.page.getIndexFromCursor(action.cursor, this.loadingAction === 'load-more' && index >= 0 ? options[index] : this.option);\n }\n this.option = options[index];\n\n // update scroll position\n this.scrollToIndex(index);\n })\n .finally(() => {\n // reset loading after next render\n requestAnimationFrame(() => {\n this.isLoading = false;\n this.loadingAction = undefined;\n });\n });\n };\n\n /**\n * Go to next page\n * @returns promise\n */\n private goToNextPage = (): Promise<void> => {\n this.loadMore.emit();\n if (Boolean(this.fetchurl)) {\n return this.getOptions(typeof this.page.next === 'string' ? this.page.next : undefined).then(nextPage => {\n if (!Boolean(nextPage)) return;\n // merge items from current page and next page\n const items = [...this.page.items, ...nextPage.items];\n // create new options pagination withe merged items\n this.options = new Paginate(items, { total: nextPage.total, next: nextPage.next, top: items.length });\n });\n } else {\n return nextTick(() => {\n if (typeof this.page.next === 'function') {\n const nextPage = this.page.next();\n this.page = new Page({\n ...nextPage,\n items: [...this.page.items, ...nextPage.items],\n });\n }\n });\n }\n };\n\n /**\n * Go to next page\n * @returns promise\n */\n private updatePage = async (): Promise<void> => {\n if (Boolean(this.fetchurl)) {\n return this.getOptions().then(page => {\n if (!Boolean(page)) return;\n // reset current options pagination from API response\n this.options = new Paginate(page.items, { total: page.total, next: page.next, top: page.top });\n });\n } else {\n this.page = this.options.getPage(0, this.optionsFilter);\n }\n };\n\n /**\n * Fetch request\n * @param url - to fetch\n * @returns new page from url\n */\n private getOptions = async (url = this.fetchurl): Promise<Pick<Page<Option>, 'items' | 'top'> & Partial<Page<Option>>> => {\n // add text filter\n const updateUrl = (typeof url === 'string' ? url : url.toString()).replaceAll(this.fetchmappings.request.filter, encodeURIComponent(this.filter));\n\n try {\n const response = await fetch(updateUrl, this.fetchoptions).then(response => response.json());\n if (!response) return null;\n const items = getObjectValueFromKey<Response, Option[]>(response, this.fetchmappings.response.items).map(\n (item): Option => ({\n title: getObjectValueFromKey<unknown, Option['title']>(item, this.fetchmappings.response.itemTitle),\n value: getObjectValueFromKey<unknown, Option['value']>(item, this.fetchmappings.response.itemValue),\n }),\n );\n const total = Number(getObjectValueFromKey<Response, number>(response, this.fetchmappings.response.total, 0));\n const next = mapUrl(getObjectValueFromKey<Response, string>(response, this.fetchmappings.response.next), this.fetchurl.toString());\n return { items, total, next, top: items.length };\n } catch {}\n };\n\n /*************\n * Lifecycle *\n *************/\n\n /**\n * Check if component props are well configured on init\n * @returns timeout\n */\n componentWillLoad(): ReturnType<typeof setTimeout> {\n // Get locales\n this.messages = initLocales(this.element).messages;\n // Validate\n this.watchIdentifier(this.identifier);\n this.watchItems(this.items);\n if (Boolean(this.fetchurl)) {\n this.watchFetchUrl(this.fetchurl);\n this.watchFetchOptions(this.fetchoptions);\n this.watchFetchMappings(this.fetchmappings);\n this.loadingWrapper({ name: 'load-data' });\n }\n this.watchValue(this.value);\n this.watchOptions(this.options);\n this.watchMgWidth(this.mgWidth);\n this.watchReadonly(this.readonly);\n this.watchDisabled(this.disabled);\n // Check validity when component is ready\n // return a promise to process action only in the FIRST render().\n // https://stenciljs.com/docs/component-lifecycle#componentwillload\n return setTimeout(() => {\n this.checkValidity();\n }, 0);\n }\n\n /**\n * Render\n * @returns HTML Element\n */\n render(): HTMLElement {\n const listId = `${this.identifier}-list`;\n const readonlyValue = this.getValueTitle();\n const withResetButton = this.value && !this.disabled;\n\n let popoverContent: 'list' | 'notfound' | 'notavailable';\n if (this.page?.items.length > 0) popoverContent = 'list';\n else if (this.page?.items.length === 0 && Boolean(this.filter)) popoverContent = 'notfound';\n else if (this.page?.items.length === 0) popoverContent = 'notavailable';\n\n return (\n <mg-input\n label={this.label}\n identifier={this.identifier}\n class={this.classCollection.classes.join(' ')}\n ariaDescribedbyIDs={popoverContent && popoverContent !== 'list' ? [popoverContent] : []}\n labelOnTop={this.labelOnTop}\n labelHide={this.labelHide}\n required={this.required}\n tooltip={this.tooltip}\n tooltipPosition={this.readonly && this.value === undefined ? 'label' : this.tooltipPosition}\n helpText={this.helpText}\n errorMessage={this.errorMessage}\n >\n {this.readonly ? (\n readonlyValue && <b class=\"mg-c-input__readonly-value\">{readonlyValue}</b>\n ) : (\n <mg-popover\n identifier={this.popoverId}\n placement=\"bottom-start\"\n display={this.popoverDisplay}\n arrow-hide\n style={{\n '--mg-c-input-list-width': Boolean(this.input?.offsetWidth) ? `${this.input.offsetWidth}px` : undefined,\n '--mg-c-input-append-x': withResetButton ? '2' : '1',\n }}\n data-fallback-placement=\"bottom-end\"\n onDisplay-change={this.handlePopoverDisplay}\n >\n <div class=\"mg-c-input__input-group-container\">\n <mg-icon icon=\"magnifying-glass\"></mg-icon>\n <input\n type=\"text\"\n role=\"combobox\"\n class=\"mg-c-input__box mg-c-input__box--width\"\n value={this.filter}\n id={this.identifier}\n name={this.name}\n placeholder={this.placeholder}\n title={this.placeholder}\n disabled={this.disabled}\n required={this.required}\n autocomplete=\"off\"\n aria-autocomplete=\"list\"\n aria-expanded={this.popoverDisplay.toString()}\n aria-controls={listId}\n aria-invalid={(this.invalid === true).toString()}\n aria-activedescendant={Boolean(this.option?.value) ? this.option.value : typeof this.value === 'string' ? this.value : this.value?.value}\n onInput={this.handleFilterInput}\n onBlur={this.handleFilterBlur}\n onFocus={this.handleFilterFocus}\n onKeyDown={this.handleFilterKeydown}\n ref={(el: HTMLInputElement) => {\n if (el !== null) this.input = el;\n }}\n />\n {withResetButton && (\n <mg-button\n class=\"mg-c-input__box-append mg-c-input__reset\"\n variant=\"flat\"\n is-icon\n label={this.messages.general.reset}\n aria-controls={this.identifier}\n tabindex=\"-1\"\n onClick={this.handleResetButton}\n >\n <mg-icon icon=\"cross\"></mg-icon>\n </mg-button>\n )}\n <mg-button class=\"mg-c-input__box-append\" variant=\"flat\" is-icon label={this.itemsLabel} tabindex=\"-1\" disabled={this.disabled}>\n <mg-icon icon={`chevron-${this.popoverDisplay ? 'up' : 'down'}`}></mg-icon>\n </mg-button>\n </div>\n <div slot=\"content\" class=\"mg-c-input__popover-container\">\n {popoverContent === 'list' && [\n // eslint-disable-next-line jsx-a11y/role-supports-aria-props\n <ul key=\"list\" class=\"mg-c-input__input-list\" role=\"listbox\" id={listId} aria-label={this.itemsLabel} aria-setsize={this.page.total}>\n {this.page.items.map(option => {\n return (\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events\n <li\n role=\"option\"\n class={{\n 'mg-c-input__input-list-item': true,\n 'mg-c-input__input-list-item--focus-visible': this.option === option,\n 'mg-c-input__input-list-item--selected': this.isCurrentOption(option),\n }}\n key={option.title}\n id={option.value.toString()}\n aria-selected={this.isCurrentOption(option).toString()}\n onClick={this.handleOptionClick}\n >\n {option.title}\n {this.isCurrentOption(option) && <mg-icon icon=\"check\"></mg-icon>}\n </li>\n );\n })}\n </ul>,\n this.isLoading && <mg-loader key=\"loader\" message={this.messages.input.combobox.search} class={{ 'mg-u-visually-hidden': Boolean(this.page.next) }}></mg-loader>,\n this.page.next && (\n <mg-button\n key=\"load-more\"\n variant=\"flat\"\n class=\"mg-c-input__load-more\"\n tabIndex={-1}\n disabled={this.isLoading}\n full-width\n disable-on-click\n onClick={this.handleLoadMoreButton}\n aria-controls={listId}\n ref={(el: HTMLMgButtonElement) => {\n if (el !== null) this.loadMoreElement = el;\n }}\n >\n <mg-icon icon=\"chevron-down\"></mg-icon>\n {this.messages.input.combobox.loadMore}\n </mg-button>\n ),\n ]}\n {popoverContent === 'notfound' && (\n <p id={popoverContent} class=\"mg-c-input__popover-info\">\n {this.messages.input.combobox.notFound}\n </p>\n )}\n {popoverContent === 'notavailable' && (\n <p id={popoverContent} class=\"mg-c-input__popover-info\">\n {this.messages.input.combobox.notAvailable}\n </p>\n )}\n </div>\n </mg-popover>\n )}\n </mg-input>\n );\n }\n}\n"],"mappings":"sRAAA,MAAMA,EAAqB,ygPCa3B,MAAMC,EAAUC,GAAkCA,UAAeA,IAAS,iBAAoBA,EAAgBC,QAAU,UAAaD,EAAgBE,QAAUC,UAO/J,MAAMC,EAAWC,GAAwCC,MAAMC,QAAQF,IAAUA,EAAMG,MAAMT,GAO7F,MAAMU,EAAmBP,IACvB,MAAMQ,EAAcC,EAAkCT,IAAUU,OAAOC,OAAOX,EAAO,YAAcU,OAAOC,OAAOX,EAAO,YACxH,GAAIQ,EAAa,CACf,MAAMI,QAAEA,EAAOC,SAAEA,GAAab,EAC9B,GAAI,CAACY,EAASC,GAAUC,MAAKC,IAAaN,EAASM,KAAY,OAAO,MACtE,MAAMC,SAAwBJ,EAAQK,SAAW,SACjD,MAAMC,SACGL,IAAa,iBACbA,EAASM,QAAU,iBACnBN,EAAS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nBiI,EACf6B,IAAMC,IACJ,GAAIA,IAAO,KAAMxM,KAAKoG,gBAAkBoG,CAAE,GAG5CxB,EAAS,WAAAY,KAAK,iBACb5L,KAAK0F,SAAS9D,MAAMoL,SAAStG,WAInCmE,IAAmB,YAClBG,EAAA,KAAGzJ,GAAIsJ,EAAgBK,MAAM,4BAC1BlL,KAAK0F,SAAS9D,MAAMoL,SAASG,UAGjCtC,IAAmB,gBAClBG,EAAG,KAAAzJ,GAAIsJ,EAAgBK,MAAM,4BAC1BlL,KAAK0F,SAAS9D,MAAMoL,SAASI,gB","ignoreList":[]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as t,h as e,g as a}from"./p-CAuxALt5.js";import{i}from"./p-Cg3R_y_o.js";import{a as r,X as s}from"./p-hNwGkhG6.js";const o=".mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*{animation:none !important;transition:none !important}}:host{display:block}.mg-c-loader{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:var(--mg-b-size-4);text-align:center}";const n=class{constructor(e){t(this,e);this.messageHide=false}watchMessage(t){if(t&&!r(t))throw new Error(`<mg-loader> prop "message" must be a valid string. Passed value: ${s(t)}.`)}componentWillLoad(){this.messages=i(this.element).messages;this.watchMessage(this.message)}render(){return e("div",{key:"cd791f239c0ca655ed2470d606068dd361d9f019",class:"mg-c-loader","aria-live":"polite"},e("mg-icon",{key:"450b1d79e33bb1f67a3e5243c3fb5f7855165848",icon:"loader",spin:true}),e("span",{key:"e0f3e296fa631b1a2d44a7067b52dd0991cb43c6",class:{"mg-u-visually-hidden":this.messageHide}},this.message||this.messages.loader.inProgress))}get element(){return a(this)}static get watchers(){return{message:["watchMessage"]}}};n.style=o;export{n as mg_loader};
|
|
2
|
-
//# sourceMappingURL=p-a52a168c.entry.js.map
|