@stonecrop/aform 0.2.24 → 0.2.26
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/aform/src/tsdoc-metadata.json +11 -0
- package/dist/aform.d.ts +55 -0
- package/dist/aform.js +477 -354
- package/dist/aform.js.map +1 -1
- package/dist/aform.tsbuildinfo +1 -0
- package/dist/aform.umd.cjs +1 -1
- package/dist/aform.umd.cjs.map +1 -1
- package/dist/directives/mask.js +88 -0
- package/dist/index.js +31 -0
- package/dist/src/directives/mask.d.ts +3 -0
- package/dist/src/directives/mask.d.ts.map +1 -0
- package/dist/src/index.d.ts +20 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/types/index.d.ts +27 -0
- package/dist/src/types/index.d.ts.map +1 -0
- package/dist/style.css +1 -1
- package/dist/types/index.js +0 -0
- package/package.json +24 -27
- package/src/components/AForm.vue +2 -1
- package/src/components/form/ACheckbox.vue +7 -1
- package/src/components/form/ADropdown.vue +1 -1
- package/src/components/form/AFieldset.vue +1 -1
- package/src/components/form/ANumericInput.vue +7 -1
- package/src/components/form/ATextInput.vue +2 -2
- package/src/directives/mask.ts +2 -1
- package/src/index.ts +20 -1
- package/src/theme/aform.css +1 -1
- package/src/theme/fields.css +34 -35
- package/src/theme/login.css +0 -2
- package/src/types/index.ts +31 -0
- package/src/histoire.setup.ts +0 -26
package/dist/aform.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aform.js","sources":["../src/components/form/ACheckbox.vue","../src/components/form/ADate.vue","../src/components/form/ADropdown.vue","../../utilities/dist/utilities.js","../src/components/form/ADatePicker.vue","../src/components/AForm.vue","../src/components/form/AFieldset.vue","../src/components/form/ANumericInput.vue","../src/directives/mask.ts","../src/components/form/ATextInput.vue","../src/index.ts"],"sourcesContent":["<template>\n\t<div class=\"aform__form-element\">\n\t\t<label class=\"aform__field-label\" :for=\"uuid\">{{ label }}</label>\n\t\t<span class=\"aform__checkbox-container aform__input-field\">\n\t\t\t<input v-model=\"checkbox\" type=\"checkbox\" :id=\"uuid\" class=\"aform__checkbox\" :readonly=\"readOnly\" :required=\"required\" />\n\t\t</span>\n\t\t<p class=\"error\" v-show=\"validation.errorMessage\" v-html=\"validation.errorMessage\"></p>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport { InputHTMLAttributes } from 'vue'\n\nwithDefaults(\n\tdefineProps<{\n\t\tlabel?: string\n\t\trequired?: boolean\n\t\treadOnly?: boolean\n\t\tuuid?: string\n\t\tvalidation?: Record<string, any>\n\t}>(),\n\t{\n\t\tvalidation: () => ({ errorMessage: ' ' }),\n\t}\n)\n\nconst checkbox = defineModel<InputHTMLAttributes['checked']>()\n</script>\n","<template>\n\t<div>\n\t\t<input\n\t\t\tref=\"dateRef\"\n\t\t\ttype=\"date\"\n\t\t\t:id=\"uuid\"\n\t\t\t:disabled=\"readonly\"\n\t\t\t:required=\"required\"\n\t\t\t:value=\"inputDate\"\n\t\t\t@click=\"showPicker\" />\n\t\t<label :for=\"uuid\">{{ label }}</label>\n\t\t<p v-show=\"validation.errorMessage\" v-html=\"validation.errorMessage\"></p>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref } from 'vue'\n\nwithDefaults(\n\tdefineProps<{\n\t\tlabel?: string\n\t\trequired?: boolean\n\t\treadonly?: boolean\n\t\tuuid?: string\n\t\tvalidation?: Record<string, any>\n\t}>(),\n\t{\n\t\tlabel: 'Date',\n\t\tvalidation: () => ({ errorMessage: ' ' }),\n\t}\n)\n\nconst inputDate = defineModel<string | number | Date>()\nconst dateRef = ref<HTMLInputElement | null>(null)\n\nconst showPicker = () => {\n\tif (dateRef.value) {\n\t\tif ('showPicker' in HTMLInputElement.prototype) {\n\t\t\t// https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/showPicker\n\t\t\t// TODO: re-check browser support and compatibility; figure out alternative ways\n\t\t\t// to spawn the native datepicker and eventually replace with ADatepicker\n\t\t\tdateRef.value.showPicker()\n\t\t}\n\t}\n}\n</script>\n\n<style scoped>\ndiv {\n\tmin-width: 40ch;\n\tborder: 1px solid transparent;\n\tpadding: 0rem;\n\tmargin: 0rem;\n\tmargin-right: 1ch;\n}\n\ninput {\n\twidth: calc(100% - 1ch);\n\toutline: 1px solid transparent;\n\tborder: 1px solid var(--input-border-color);\n\tpadding: 1ch 0.5ch 0.5ch 1ch;\n\tmargin: calc(1.15rem / 2) 0 0 0;\n\tmin-height: 1.15rem;\n\tborder-radius: 0.25rem;\n}\n\np,\nlabel {\n\tcolor: var(--input-label-color);\n\tdisplay: block;\n\tmin-height: 1.15rem;\n\tpadding: 0rem;\n\tmargin: 0rem;\n\tborder: 1px solid transparent;\n\tmargin-bottom: 0.25rem;\n}\n\np {\n\twidth: 100%;\n\tcolor: red;\n\tfont-size: 85%;\n}\n\nlabel {\n\tz-index: 2;\n\tfont-size: 80%;\n\tposition: absolute;\n\tbackground: white;\n\tmargin: calc(-1.5rem - calc(2.15rem / 2)) 0 0 1ch;\n\tpadding: 0 0.25ch 0 0.25ch;\n}\n\ninput:focus {\n\tborder: 1px solid var(--input-active-border-color);\n}\n\ninput:focus + label {\n\tcolor: var(--input-active-label-color);\n}\n</style>\n","<template>\n\t<div class=\"autocomplete\" :class=\"{ isOpen: isOpen }\">\n\t\t<div class=\"input-wrapper\">\n\t\t\t<input\n\t\t\t\tref=\"mopInput\"\n\t\t\t\ttype=\"text\"\n\t\t\t\t@input=\"onChange\"\n\t\t\t\t@focus=\"onChange\"\n\t\t\t\tv-model=\"search\"\n\t\t\t\t@keydown.down=\"onArrowDown\"\n\t\t\t\t@keydown.up=\"onArrowUp\"\n\t\t\t\t@keydown.enter=\"onEnter\" />\n\n\t\t\t<ul id=\"autocomplete-results\" v-show=\"isOpen\" class=\"autocomplete-results\">\n\t\t\t\t<li class=\"loading autocomplete-result\" v-if=\"isLoading\">Loading results...</li>\n\t\t\t\t<li\n\t\t\t\t\tv-else\n\t\t\t\t\tv-for=\"(result, i) in results\"\n\t\t\t\t\t:key=\"i\"\n\t\t\t\t\t@click=\"setResult(result)\"\n\t\t\t\t\tclass=\"autocomplete-result\"\n\t\t\t\t\t:class=\"{ 'is-active': i === arrowCounter }\">\n\t\t\t\t\t{{ result }}\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t\t<label>{{ label }}</label>\n\t\t</div>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport { onMounted, onUnmounted, ref } from 'vue'\n\nconst props = defineProps<{\n\tlabel: string\n\titems?: string[]\n\tisAsync?: boolean\n}>()\n\nconst emit = defineEmits(['filterChanged'])\n\nconst results = ref(props.items)\nconst search = defineModel<string>()\nconst isLoading = ref(false)\nconst arrowCounter = ref(0)\nconst isOpen = ref(false)\nconst mopInput = ref(null)\n\nonMounted(() => {\n\tdocument.addEventListener('click', handleClickOutside)\n\tfilterResults()\n})\n\nonUnmounted(() => {\n\tdocument.removeEventListener('click', handleClickOutside)\n})\n\nconst setResult = result => {\n\tsearch.value = result\n\tcloseResults()\n}\n\nconst filterResults = () => {\n\tif (!search.value) {\n\t\tresults.value = props.items\n\t} else {\n\t\tresults.value = props.items.filter(item => {\n\t\t\treturn item.toLowerCase().indexOf(search.value.toLowerCase()) > -1\n\t\t})\n\t}\n}\n\nconst onChange = () => {\n\tisOpen.value = true\n\tif (props.isAsync) {\n\t\tisLoading.value = true\n\t\temit('filterChanged', search.value)\n\t} else {\n\t\tfilterResults()\n\t}\n}\n\nconst handleClickOutside = (event: MouseEvent) => {\n\tcloseResults()\n\tarrowCounter.value = 0\n}\n\nconst closeResults = () => {\n\tisOpen.value = false\n\n\t// TODO: (test) when would this occur? how should this be tested?\n\tif (!props.items.includes(search.value)) {\n\t\tsearch.value = ''\n\t}\n}\n\nconst onArrowDown = () => {\n\tif (arrowCounter.value < results.value.length) {\n\t\tarrowCounter.value = arrowCounter.value + 1\n\t}\n}\n\nconst onArrowUp = () => {\n\tif (arrowCounter.value > 0) {\n\t\tarrowCounter.value = arrowCounter.value - 1\n\t}\n}\n\nconst onEnter = () => {\n\tsearch.value = results.value[arrowCounter.value]\n\tcloseResults()\n\tarrowCounter.value = 0\n}\n\n// const openWithSearch = () => {\n// \tsearch.value = ''\n// \tonChange()\n// \tmopInput.value.focus()\n// }\n</script>\n\n<style>\n/* variables taken from here: https://github.com/frappe/frappe/blob/version-13/frappe/public/scss/common/awesomeplete.scss */\n.autocomplete {\n\tposition: relative;\n}\n\n.input-wrapper {\n\tmin-width: 40ch;\n\tborder: 1px solid transparent;\n\tpadding: 0rem;\n\tmargin: 0rem;\n\tmargin-right: 1ch;\n}\n\ninput {\n\twidth: calc(100% - 1ch);\n\toutline: 1px solid transparent;\n\tborder: 1px solid var(--input-border-color);\n\tpadding: 1ch 0.5ch 0.5ch 1ch;\n\tmargin: calc(1.15rem / 2) 0 0 0;\n\tmin-height: 1.15rem;\n\tborder-radius: 0.25rem;\n}\n\ninput:focus {\n\tborder: 1px solid var(--input-active-border-color);\n\tborder-radius: 0.25rem 0.25rem 0 0;\n\tborder-bottom: none;\n}\n\nlabel {\n\tdisplay: block;\n\tmin-height: 1.15rem;\n\tpadding: 0rem;\n\tmargin: 0rem;\n\tborder: 1px solid transparent;\n\tmargin-bottom: 0.25rem;\n\tz-index: 2;\n\tfont-size: 80%;\n\tposition: absolute;\n\tbackground: white;\n\tmargin: calc(-1.5rem - calc(2.15rem / 2)) 0 0 1ch;\n\tpadding: 0 0.25ch 0 0.25ch;\n}\n\n.autocomplete-results {\n\tposition: absolute;\n\twidth: calc(100% - 1ch + 1.5px);\n\tz-index: 1;\n\tpadding: 0;\n\tmargin: 0;\n\tcolor: #000000;\n\tborder: 1px solid var(--input-active-border-color);\n\tborder-radius: 0 0 0.25rem 0.25rem;\n\tborder-top: none;\n}\n\n.autocomplete-result {\n\tlist-style: none;\n\ttext-align: left;\n\tpadding: 4px 6px;\n\tcursor: pointer;\n}\n\n.autocomplete-result.is-active,\n.autocomplete-result:hover {\n\tbackground-color: var(--row-color-zebra-light);\n\tcolor: #000000;\n}\n</style>\n","import { unref as I, getCurrentScope as O, onScopeDispose as U, computed as M, ref as b, watch as v, onMounted as j, onBeforeUnmount as V } from \"vue\";\nfunction B(e) {\n return O() ? (U(e), !0) : !1;\n}\nfunction _(e) {\n return typeof e == \"function\" ? e() : I(e);\n}\nconst F = typeof window < \"u\" && typeof document < \"u\";\ntypeof WorkerGlobalScope < \"u\" && globalThis instanceof WorkerGlobalScope;\nconst q = Object.prototype.toString, N = (e) => q.call(e) === \"[object Object]\", G = () => {\n};\nfunction y(e) {\n var t;\n const n = _(e);\n return (t = n == null ? void 0 : n.$el) != null ? t : n;\n}\nconst T = F ? window : void 0;\nfunction w(...e) {\n let t, n, l, s;\n if (typeof e[0] == \"string\" || Array.isArray(e[0]) ? ([n, l, s] = e, t = T) : [t, n, l, s] = e, !t)\n return G;\n Array.isArray(n) || (n = [n]), Array.isArray(l) || (l = [l]);\n const i = [], o = () => {\n i.forEach((f) => f()), i.length = 0;\n }, r = (f, u, p, d) => (f.addEventListener(u, p, d), () => f.removeEventListener(u, p, d)), c = v(\n () => [y(t), _(s)],\n ([f, u]) => {\n if (o(), !f)\n return;\n const p = N(u) ? { ...u } : u;\n i.push(\n ...n.flatMap((d) => l.map((E) => r(f, d, E, p)))\n );\n },\n { immediate: !0, flush: \"post\" }\n ), a = () => {\n c(), o();\n };\n return B(a), a;\n}\nfunction z(e = {}) {\n var t;\n const {\n window: n = T,\n deep: l = !0\n } = e, s = (t = e.document) != null ? t : n == null ? void 0 : n.document, i = () => {\n var c;\n let a = s == null ? void 0 : s.activeElement;\n if (l)\n for (; a != null && a.shadowRoot; )\n a = (c = a == null ? void 0 : a.shadowRoot) == null ? void 0 : c.activeElement;\n return a;\n }, o = b(), r = () => {\n o.value = i();\n };\n return n && (w(n, \"blur\", (c) => {\n c.relatedTarget === null && r();\n }, !0), w(n, \"focus\", r, !0)), r(), o;\n}\nfunction J(e, t = {}) {\n const n = z(t), l = M(() => y(e));\n return { focused: M(() => l.value && n.value ? l.value.contains(n.value) : !1) };\n}\nfunction Q(e, { window: t = T, scrollTarget: n } = {}) {\n const l = b(!1), s = () => {\n if (!t)\n return;\n const i = t.document, o = y(e);\n if (!o)\n l.value = !1;\n else {\n const r = o.getBoundingClientRect();\n l.value = r.top <= (t.innerHeight || i.documentElement.clientHeight) && r.left <= (t.innerWidth || i.documentElement.clientWidth) && r.bottom >= 0 && r.right >= 0;\n }\n };\n return v(\n () => y(e),\n () => s(),\n { immediate: !0, flush: \"post\" }\n ), t && w(n || t, \"scroll\", s, {\n capture: !1,\n passive: !0\n }), l;\n}\nconst g = (e) => {\n let t = Q(e).value;\n return t = t && e.offsetHeight > 0, t;\n}, m = (e) => e.tabIndex >= 0, x = (e) => {\n const t = e.target;\n return A(t);\n}, A = (e) => {\n var n;\n let t;\n if (e instanceof HTMLTableCellElement) {\n const l = (n = e.parentElement) == null ? void 0 : n.previousElementSibling;\n if (l) {\n const i = Array.from(l.children)[e.cellIndex];\n i && (t = i);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const l = e.previousElementSibling;\n l && (t = l);\n }\n return t && (!m(t) || !g(t)) ? A(t) : t;\n}, X = (e) => {\n var l;\n const t = e.target;\n let n;\n if (t instanceof HTMLTableCellElement) {\n const s = (l = t.parentElement) == null ? void 0 : l.parentElement;\n if (s) {\n const o = s.firstElementChild.children[t.cellIndex];\n o && (n = o);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const s = t.parentElement;\n if (s) {\n const i = s.firstElementChild;\n i && (n = i);\n }\n }\n return n && (!m(n) || !g(n)) ? S(n) : n;\n}, D = (e) => {\n const t = e.target;\n return S(t);\n}, S = (e) => {\n var n;\n let t;\n if (e instanceof HTMLTableCellElement) {\n const l = (n = e.parentElement) == null ? void 0 : n.nextElementSibling;\n if (l) {\n const i = Array.from(l.children)[e.cellIndex];\n i && (t = i);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const l = e.nextElementSibling;\n l && (t = l);\n }\n return t && (!m(t) || !g(t)) ? S(t) : t;\n}, Y = (e) => {\n var l;\n const t = e.target;\n let n;\n if (t instanceof HTMLTableCellElement) {\n const s = (l = t.parentElement) == null ? void 0 : l.parentElement;\n if (s) {\n const o = s.lastElementChild.children[t.cellIndex];\n o && (n = o);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const s = t.parentElement;\n if (s) {\n const i = s.lastElementChild;\n i && (n = i);\n }\n }\n return n && (!m(n) || !g(n)) ? A(n) : n;\n}, R = (e) => {\n const t = e.target;\n return k(t);\n}, k = (e) => {\n var n;\n let t;\n if (e.previousElementSibling)\n t = e.previousElementSibling;\n else {\n const l = (n = e.parentElement) == null ? void 0 : n.previousElementSibling;\n t = l == null ? void 0 : l.lastElementChild;\n }\n return t && (!m(t) || !g(t)) ? k(t) : t;\n}, P = (e) => {\n const t = e.target;\n return L(t);\n}, L = (e) => {\n var n;\n let t;\n if (e.nextElementSibling)\n t = e.nextElementSibling;\n else {\n const l = (n = e.parentElement) == null ? void 0 : n.nextElementSibling;\n t = l == null ? void 0 : l.firstElementChild;\n }\n return t && (!m(t) || !g(t)) ? L(t) : t;\n}, K = (e) => {\n const l = e.target.parentElement.firstElementChild;\n return l && (!m(l) || !g(l)) ? L(l) : l;\n}, W = (e) => {\n const l = e.target.parentElement.lastElementChild;\n return l && (!m(l) || !g(l)) ? k(l) : l;\n}, C = [\"alt\", \"control\", \"shift\", \"meta\"], Z = {\n ArrowUp: \"up\",\n ArrowDown: \"down\",\n ArrowLeft: \"left\",\n ArrowRight: \"right\"\n}, ee = {\n \"keydown.up\": (e) => {\n const t = x(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.down\": (e) => {\n const t = D(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.left\": (e) => {\n const t = R(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.right\": (e) => {\n const t = P(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.control.up\": (e) => {\n const t = X(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.down\": (e) => {\n const t = Y(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.left\": (e) => {\n const t = K(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.right\": (e) => {\n const t = W(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.end\": (e) => {\n const t = W(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const n = D(e);\n n && n.focus();\n }\n },\n \"keydown.shift.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const n = x(e);\n n && n.focus();\n }\n },\n \"keydown.home\": (e) => {\n const t = K(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.tab\": (e) => {\n const t = P(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.shift.tab\": (e) => {\n const t = R(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n }\n};\nfunction ne(e) {\n const t = (o) => {\n let r = null;\n return o.parent && (typeof o.parent == \"string\" ? r = document.querySelector(o.parent) : o.parent instanceof HTMLElement ? r = o.parent : r = o.parent.value), r;\n }, n = (o) => {\n const r = t(o);\n let c = [];\n if (typeof o.selectors == \"string\")\n c = r ? Array.from(r.querySelectorAll(o.selectors)) : Array.from(document.querySelectorAll(o.selectors));\n else if (Array.isArray(o.selectors))\n for (const a of o.selectors)\n a instanceof HTMLElement ? c.push(a) : c.push(a.$el);\n else if (o.selectors instanceof HTMLElement)\n c.push(o.selectors);\n else if (Array.isArray(o.selectors.value))\n for (const a of o.selectors.value)\n a instanceof HTMLElement ? c.push(a) : c.push(a.$el);\n else\n c.push(o.selectors.value);\n return c;\n }, l = (o) => {\n const r = t(o);\n let c = [];\n return o.selectors ? c = n(o) : r && (c = Array.from(r.children).filter((f) => m(f) && g(f))), c;\n }, s = (o) => (r) => {\n const c = Z[r.key] || r.key.toLowerCase();\n if (C.includes(c))\n return;\n const a = o.handlers || ee;\n for (const f of Object.keys(a)) {\n const [u, ...p] = f.split(\".\");\n if (u === \"keydown\" && p.includes(c)) {\n const d = a[f], E = p.filter(($) => C.includes($)), H = C.some(($) => {\n const h = $.charAt(0).toUpperCase() + $.slice(1);\n return r.getModifierState(h);\n });\n if (E.length > 0) {\n if (H) {\n for (const $ of C)\n if (p.includes($)) {\n const h = $.charAt(0).toUpperCase() + $.slice(1);\n r.getModifierState(h) && d(r);\n }\n }\n } else\n H || d(r);\n }\n }\n }, i = [];\n j(() => {\n for (const o of e) {\n const r = t(o), c = l(o), a = s(o), f = r ? [r] : c;\n for (const u of f) {\n const { focused: p } = J(b(u)), d = v(p, (E) => {\n E ? u.addEventListener(\"keydown\", a) : u.removeEventListener(\"keydown\", a);\n });\n i.push(d);\n }\n }\n }), V(() => {\n for (const o of i)\n o();\n });\n}\nfunction le(e) {\n}\nexport {\n ee as defaultKeypressHandlers,\n le as install,\n ne as useKeyboardNav\n};\n//# sourceMappingURL=utilities.js.map\n","<template>\n\t<div class=\"adatepicker\" tabindex=\"0\" ref=\"adatepicker\">\n\t\t<table>\n\t\t\t<tr>\n\t\t\t\t<td id=\"previous-month-btn\" @click=\"previousMonth\" :tabindex=\"-1\"><</td>\n\t\t\t\t<th colspan=\"5\" :tabindex=\"-1\">{{ monthAndYear }}</th>\n\t\t\t\t<td id=\"next-month-btn\" @click=\"nextMonth\" :tabindex=\"-1\">></td>\n\t\t\t</tr>\n\t\t\t<tr class=\"days-header\">\n\t\t\t\t<td>M</td>\n\t\t\t\t<td>T</td>\n\t\t\t\t<td>W</td>\n\t\t\t\t<td>T</td>\n\t\t\t\t<td>F</td>\n\t\t\t\t<td>S</td>\n\t\t\t\t<td>S</td>\n\t\t\t</tr>\n\t\t\t<tr v-for=\"rowNo in numberOfRows\" :key=\"rowNo\">\n\t\t\t\t<td\n\t\t\t\t\tv-for=\"colNo in numberOfColumns\"\n\t\t\t\t\tref=\"celldate\"\n\t\t\t\t\t:key=\"getCurrentCell(rowNo, colNo)\"\n\t\t\t\t\t:contenteditable=\"false\"\n\t\t\t\t\t:spellcheck=\"false\"\n\t\t\t\t\t:tabindex=\"0\"\n\t\t\t\t\t@click.prevent.stop=\"selectDate(getCurrentCell(rowNo, colNo))\"\n\t\t\t\t\t@keydown.enter=\"selectDate(getCurrentCell(rowNo, colNo))\"\n\t\t\t\t\t:class=\"{\n\t\t\t\t\t\ttodaysDate: isTodaysDate(getCurrentDate(rowNo, colNo)),\n\t\t\t\t\t\tselectedDate: isSelectedDate(getCurrentDate(rowNo, colNo)),\n\t\t\t\t\t}\">\n\t\t\t\t\t{{ new Date(getCurrentDate(rowNo, colNo)).getDate() }}\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport { defaultKeypressHandlers, useKeyboardNav } from '@stonecrop/utilities'\nimport { computed, nextTick, onMounted, ref, watch } from 'vue'\n\nconst numberOfRows = 6\nconst numberOfColumns = 7\n\nconst date = defineModel<number | Date>({ default: new Date() })\nconst selectedDate = ref(new Date(date.value))\nconst currentMonth = ref<number>(selectedDate.value.getMonth())\nconst currentYear = ref<number>(selectedDate.value.getFullYear())\nconst currentDates = ref<number[]>([])\nconst adatepicker = ref<HTMLElement | null>(null)\n\nonMounted(async () => {\n\tpopulateMonth()\n\n\t// required to allow the elements to be focused in the next step\n\tawait nextTick()\n\n\tconst $selectedDate = document.getElementsByClassName('selectedDate')\n\tif ($selectedDate.length > 0) {\n\t\t;($selectedDate[0] as HTMLElement).focus()\n\t} else {\n\t\tconst $todaysDate = document.getElementsByClassName('todaysDate')\n\t\tif ($todaysDate.length > 0) {\n\t\t\t;($todaysDate[0] as HTMLElement).focus()\n\t\t}\n\t}\n})\n\nconst populateMonth = () => {\n\tcurrentDates.value = []\n\tconst firstOfMonth = new Date(currentYear.value, currentMonth.value, 1)\n\tconst monthStartWeekday = firstOfMonth.getDay()\n\tconst calendarStartDay = firstOfMonth.setDate(firstOfMonth.getDate() - monthStartWeekday)\n\n\t// assume midnight for all dates while building the calendar\n\tfor (const dayIndex of Array(43).keys()) {\n\t\tcurrentDates.value.push(calendarStartDay + dayIndex * 86400000)\n\t}\n}\n\nwatch([currentMonth, currentYear], populateMonth)\nconst previousYear = () => (currentYear.value -= 1)\nconst nextYear = () => (currentYear.value += 1)\n\nconst previousMonth = () => {\n\tif (currentMonth.value == 0) {\n\t\tcurrentMonth.value = 11\n\t\tpreviousYear()\n\t} else {\n\t\tcurrentMonth.value -= 1\n\t}\n}\n\nconst nextMonth = () => {\n\tif (currentMonth.value == 11) {\n\t\tcurrentMonth.value = 0\n\t\tnextYear()\n\t} else {\n\t\tcurrentMonth.value += 1\n\t}\n}\n\nconst isTodaysDate = (day: string | number | Date) => {\n\tconst todaysDate = new Date()\n\tif (currentMonth.value !== todaysDate.getMonth()) {\n\t\treturn\n\t}\n\treturn todaysDate.toDateString() === new Date(day).toDateString()\n}\n\nconst isSelectedDate = (day: string | number | Date) => {\n\treturn new Date(day).toDateString() === new Date(selectedDate.value).toDateString()\n}\n\nconst getCurrentCell = (rowNo: number, colNo: number) => {\n\treturn (rowNo - 1) * numberOfColumns + colNo\n}\n\nconst getCurrentDate = (rowNo: number, colNo: number) => {\n\treturn currentDates.value[getCurrentCell(rowNo, colNo)]\n}\n\nconst selectDate = (currentIndex: number) => {\n\tdate.value = selectedDate.value = new Date(currentDates.value[currentIndex])\n}\n\nconst monthAndYear = computed(() => {\n\treturn new Date(currentYear.value, currentMonth.value, 1).toLocaleDateString(undefined, {\n\t\tyear: 'numeric',\n\t\tmonth: 'long',\n\t})\n})\n\n// setup keyboard navigation\nuseKeyboardNav([\n\t{\n\t\tparent: adatepicker,\n\t\tselectors: 'td',\n\t\thandlers: {\n\t\t\t...defaultKeypressHandlers,\n\t\t\t...{\n\t\t\t\t'keydown.pageup': previousMonth,\n\t\t\t\t'keydown.shift.pageup': previousYear,\n\t\t\t\t'keydown.pagedown': nextMonth,\n\t\t\t\t'keydown.shift.pagedown': nextYear,\n\t\t\t\t// TODO: this is a hack to override the stonecrop enter handler;\n\t\t\t\t// store context inside the component so that handlers can be setup consistently\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-empty-function\n\t\t\t\t'keydown.enter': () => {}, // select this date\n\t\t\t},\n\t\t},\n\t},\n])\n</script>\n\n<style>\n@import url('@stonecrop/themes/default/default.css');\n@import url('@/theme/adate.css');\n@import url('@/theme/aform.css');\n</style>\n","<template>\n\t<form class=\"aform\">\n\t\t<component\n\t\t\tv-for=\"(componentObj, key) in modelValue\"\n\t\t\t:is=\"componentObj.component\"\n\t\t\t:key=\"key\"\n\t\t\t:schema=\"componentObj\"\n\t\t\tv-model=\"childModels[key].value\"\n\t\t\t:data=\"formData[componentObj.fieldname]\"\n\t\t\t:readonly=\"readonly\"\n\t\t\tv-bind=\"componentProps(componentObj)\">\n\t\t</component>\n\t</form>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, computed } from 'vue'\n\nimport { SchemaTypes } from 'types'\n\nconst props = defineProps<{\n\tmodelValue: SchemaTypes[]\n\tdata: Record<string, any>\n\treadonly?: boolean\n}>()\n\nconst emit = defineEmits(['update:modelValue'])\n\nconst formData = ref(props.data || {})\n\nconst componentProps = (componentObj: SchemaTypes) => {\n\tlet propsToPass = {}\n\tfor (const [key, value] of Object.entries(componentObj)) {\n\t\tif (!['component', 'fieldtype'].includes(key)) {\n\t\t\tpropsToPass[key] = value\n\t\t}\n\n\t\t// handle ATable data formats in case the table is nested under an AFormm;\n\t\t// TODO: there's probably a better way to do this\n\t\tif (key === 'rows') {\n\t\t\tif (value && (value as any[]).length === 0) {\n\t\t\t\tpropsToPass['rows'] = formData.value[componentObj.fieldname]\n\t\t\t}\n\t\t}\n\t}\n\treturn propsToPass\n}\n\nconst childModels = computed({\n\tget: () => {\n\t\treturn props.modelValue.map((val, i) => {\n\t\t\treturn computed({\n\t\t\t\tget() {\n\t\t\t\t\treturn val.value\n\t\t\t\t},\n\t\t\t\tset: newValue => {\n\t\t\t\t\t// Find the component in modelValue and update it\n\t\t\t\t\tprops.modelValue[i].value = newValue\n\t\t\t\t\temit('update:modelValue', props.modelValue)\n\t\t\t\t},\n\t\t\t})\n\t\t})\n\t},\n\tset: (/* newValue */) => {\n\t\t//emit('update:modelValue', '')\n\t},\n})\n</script>\n\n<style scoped>\n@import url('@/theme/aform.css');\n</style>\n","<template>\n\t<fieldset>\n\t\t<legend @click=\"toggleCollapse\" @submit=\"toggleCollapse\">\n\t\t\t{{ label }}\n\t\t\t<CollapseButton v-if=\"collapsible\" :collapsed=\"collapsed\" />\n\t\t</legend>\n\t\t<slot :collapsed=\"collapsed\">\n\t\t\t<AForm v-show=\"!collapsed\" v-model=\"formSchema\" :data=\"formData\" />\n\t\t</slot>\n\t</fieldset>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref } from 'vue'\n\nimport CollapseButton from '@/components/base/CollapseButton.vue'\nimport AForm from '@/components/AForm.vue'\nimport { SchemaTypes } from 'types/index'\n\nconst props = defineProps<{\n\tschema: SchemaTypes[]\n\tlabel: string\n\tcollapsible?: boolean\n\tdata?: any\n}>()\n\nconst formData = ref(props.data || [])\nconst collapsed = ref(false)\nconst collapsible = ref(props.collapsible)\n\nconst formSchema = ref(props.schema)\nfunction toggleCollapse(event: Event) {\n\tevent.preventDefault()\n\tif (!collapsible.value) {\n\t\treturn\n\t}\n\tcollapsed.value = !collapsed.value\n}\n</script>\n\n<style scoped>\nfieldset {\n\tmax-width: 100%;\n\twidth: 100%;\n\tmargin-right: 2ch;\n\tborder: 1px solid transparent;\n\tborder-bottom: 1px solid var(--gray-50);\n}\n\nlegend {\n\twidth: 100%;\n\theight: 1.15rem;\n\tborder: 1px solid transparent;\n\tpadding-bottom: 0.5rem;\n\tfont-size: 110%;\n\tfont-weight: 600;\n\tuser-select: none;\n}\n\n.collapse-button {\n\tfloat: right;\n}\n</style>\n","<template>\n\t<div class=\"aform__form-element\">\n\t\t<label class=\"aform__field-label\" :for=\"uuid\">{{ label }}</label>\n\t\t<input class=\"aform__input-field\" v-model=\"inputNumber\" type=\"number\" :id=\"uuid\" :disabled=\"readonly\" :required=\"required\" />\n\t\t<p class=\"error\" v-show=\"validation.errorMessage\" v-html=\"validation.errorMessage\"></p>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nwithDefaults(\n\tdefineProps<{\n\t\tlabel: string\n\t\trequired?: boolean\n\t\treadonly?: boolean\n\t\tuuid?: string\n\t\tvalidation?: Record<string, any>\n\t}>(),\n\t{\n\t\tvalidation: () => ({ errorMessage: ' ' }),\n\t}\n)\n\nconst inputNumber = defineModel<number>()\n</script>\n","import type { FormSchema } from 'types'\nimport type { DirectiveBinding } from 'vue'\n\nconst NAMED_MASKS = {\n\tdate: '##/##/####',\n\tdatetime: '####/##/## ##:##',\n\ttime: '##:##',\n\tfulltime: '##:##:##',\n\tphone: '(###) ### - ####',\n\tcard: '#### #### #### ####',\n}\n\nfunction extractMaskFn(mask: string): ((args: any) => string) | void {\n\ttry {\n\t\t// eslint-disable-next-line @typescript-eslint/no-implied-eval\n\t\treturn Function(`\"use strict\";return (${mask})`)()\n\t} catch (error) {\n\t\tif (error instanceof ReferenceError) {\n\t\t\t// assume mask is a string\n\t\t}\n\t}\n}\n\nfunction getMask(binding: DirectiveBinding<string>) {\n\tlet mask = binding.value\n\n\tif (mask) {\n\t\tconst maskFn = extractMaskFn(mask)\n\t\tif (maskFn) {\n\t\t\t// TODO: (state) replace with state management;\n\t\t\t// pass the entire form/table data to the function\n\t\t\tconst locale = binding.instance['locale']\n\t\t\tmask = maskFn(locale)\n\t\t}\n\t} else {\n\t\t// TODO: (state) handle using state management\n\t\tconst schema: FormSchema = binding.instance['schema']\n\t\tconst fieldType: string | undefined = schema?.fieldtype?.toLowerCase()\n\t\tif (fieldType && NAMED_MASKS[fieldType]) {\n\t\t\tmask = NAMED_MASKS[fieldType]\n\t\t}\n\t}\n\n\treturn mask\n}\n\nfunction unmaskInput(input: string, maskToken?: string) {\n\tif (!maskToken) {\n\t\tmaskToken = '#'\n\t}\n\n\tlet unmaskedInput = input\n\tconst maskChars = [maskToken, '/', '-', '(', ')', ' ']\n\n\tfor (const char of maskChars) {\n\t\tunmaskedInput = unmaskedInput.replaceAll(char, '')\n\t}\n\n\treturn unmaskedInput\n}\n\nfunction fillMask(input: string, mask: string, maskToken?: string) {\n\tif (!maskToken) {\n\t\tmaskToken = '#'\n\t}\n\n\tlet replacement = mask\n\tfor (const inputChar of input) {\n\t\tconst replaceIndex = replacement.indexOf(maskToken)\n\t\tif (replaceIndex !== -1) {\n\t\t\tconst prefix = replacement.substring(0, replaceIndex)\n\t\t\tconst suffix = replacement.substring(replaceIndex + 1)\n\t\t\treplacement = prefix + inputChar + suffix\n\t\t}\n\t}\n\n\treturn replacement.slice(0, mask.length)\n}\n\nexport function useStringMask(el: HTMLInputElement, binding: DirectiveBinding<string>) {\n\tconst mask = getMask(binding)\n\tif (!mask) return\n\n\tconst maskToken = '#'\n\tconst inputText = el.value\n\n\t// process input value with mask\n\tconst unmaskedInput = unmaskInput(inputText, maskToken)\n\tif (unmaskedInput) {\n\t\tconst replacement = fillMask(unmaskedInput, mask, maskToken)\n\n\t\t// TODO: (state) this is very opinionated;\n\t\t// most likely fixed with state management;\n\t\t// a better way could be to emit back to instance;\n\n\t\tif (binding.instance['maskFilled']) {\n\t\t\tbinding.instance['maskFilled'] = !replacement.includes(maskToken)\n\t\t}\n\n\t\tel.value = replacement\n\t} else {\n\t\tel.value = mask\n\t}\n}\n","<template>\n\t<div class=\"aform__form-element\">\n\t\t<label class=\"aform__field-label\" :for=\"uuid\">{{ label }} </label>\n\t\t<input\n\t\t\tclass=\"aform__input-field\"\n\t\t\tv-model=\"inputText\"\n\t\t\t:id=\"uuid\"\n\t\t\t:disabled=\"readonly\"\n\t\t\t:maxlength=\"mask ? maskFilled && mask.length : undefined\"\n\t\t\t:required=\"required\"\n\t\t\tv-mask=\"mask\" />\n\t\t<p class=\"error\" v-show=\"validation.errorMessage\" v-html=\"validation.errorMessage\"></p>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport { inject, ref } from 'vue'\n\nimport { FormSchema } from 'types'\nimport { useStringMask as vMask } from '@/directives/mask'\n\nwithDefaults(\n\tdefineProps<{\n\t\tschema: FormSchema\n\t\tlabel: string\n\t\tmask?: string\n\t\trequired?: boolean\n\t\treadonly?: boolean\n\t\tuuid?: string\n\t\tvalidation?: { errorMessage: string }\n\t}>(),\n\t{\n\t\tvalidation: () => ({ errorMessage: ' ' }),\n\t}\n)\n\n// TODO: setup maskFilled as a computed property\nconst maskFilled = ref(true)\n\n// TODO: (state) replace with state management\n// const locale = inject<string>('locale', '')\n\nconst inputText = defineModel<number | string>()\n</script>\n","import { App } from 'vue'\n\nimport ACheckbox from '@/components/form/ACheckbox.vue'\nimport AComboBox from '@/components/form/AComboBox.vue'\nimport ADate from '@/components/form/ADate.vue'\nimport ADropdown from '@/components/form/ADropdown.vue'\nimport ADatePicker from '@/components/form/ADatePicker.vue'\nimport AFieldset from '@/components/form/AFieldset.vue'\nimport AForm from '@/components/AForm.vue'\nimport ANumericInput from '@/components/form/ANumericInput.vue'\nimport ATextInput from '@/components/form/ATextInput.vue'\n// import { ACurrency } from '@/components/form/ACurrency.vue'\n// import { AQuantity } from '@/components/form/AQuantity.vue'\n\nfunction install(app: App /* options */) {\n\tapp.component('ACheckbox', ACheckbox)\n\tapp.component('ACombobox', AComboBox)\n\tapp.component('ADate', ADate)\n\tapp.component('ADropdown', ADropdown)\n\tapp.component('ADatePicker', ADatePicker)\n\tapp.component('AFieldset', AFieldset)\n\tapp.component('AForm', AForm)\n\tapp.component('ANumericInput', ANumericInput)\n\tapp.component('ATextInput', ATextInput)\n\t// app.component('ACurrency', ACurrency)\n\t// app.component('AQuantity', AQuantity)\n}\n\nexport { ACheckbox, AComboBox, ADate, ADropdown, ADatePicker, AFieldset, AForm, ANumericInput, ATextInput, install }\n"],"names":["checkbox","_useModel","__props","inputDate","dateRef","ref","showPicker","props","emit","__emit","results","search","isLoading","arrowCounter","isOpen","mopInput","onMounted","handleClickOutside","filterResults","onUnmounted","setResult","result","closeResults","item","onChange","event","onArrowDown","onArrowUp","onEnter","B","O","U","_","I","F","q","N","G","y","T","w","l","s","i","o","f","r","u","p","d","c","v","E","a","z","b","J","M","Q","g","m","x","A","n","t","X","S","D","Y","R","k","P","L","K","W","C","Z","ee","ne","$","H","h","j","V","numberOfRows","numberOfColumns","date","selectedDate","currentMonth","currentYear","currentDates","adatepicker","populateMonth","nextTick","$selectedDate","$todaysDate","firstOfMonth","monthStartWeekday","calendarStartDay","dayIndex","watch","previousYear","nextYear","previousMonth","nextMonth","isTodaysDate","day","todaysDate","isSelectedDate","getCurrentCell","rowNo","colNo","getCurrentDate","selectDate","currentIndex","monthAndYear","computed","useKeyboardNav","defaultKeypressHandlers","formData","componentProps","componentObj","propsToPass","key","value","childModels","val","newValue","collapsed","collapsible","formSchema","toggleCollapse","inputNumber","NAMED_MASKS","extractMaskFn","mask","getMask","binding","maskFn","locale","schema","fieldType","_a","unmaskInput","input","maskToken","unmaskedInput","maskChars","char","fillMask","replacement","inputChar","replaceIndex","prefix","suffix","useStringMask","el","inputText","maskFilled","install","app","ACheckbox","AComboBox","ADate","ADropdown","ADatePicker","AFieldset","AForm","ANumericInput","ATextInput"],"mappings":";;;;;;;;;;;;;;;AA0BM,UAAAA,IAAWC,EAA2CC,GAAA,YAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACMvD,UAAAC,IAAYF,iBAAoC,GAChDG,IAAUC,EAA6B,IAAI,GAE3CC,IAAa,MAAM;AACxB,MAAIF,EAAQ,SACP,gBAAgB,iBAAiB,aAIpCA,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,UAAUE,IAAe,CAAC;AACrD,MAAAF,IAAcG,IAASF,IAAYG;AAAA,IACpC;AAAA,EACD;AAEA,SAAOJ,EAAY,MAAM,GAAGf,EAAK,MAAM;AACxC;AAEgB,SAAAoB,GAAcC,GAAsBnB,GAAmC;AAChF,QAAAF,IAAOC,GAAQC,CAAO;AAC5B,MAAI,CAACF;AAAM;AAEX,QAAMU,IAAY,KACZY,IAAYD,EAAG,OAGfV,IAAgBH,GAAYc,GAAWZ,CAAS;AACtD,MAAIC,GAAe;AAClB,UAAMI,IAAcD,GAASH,GAAeX,GAAMU,CAAS;AAMvD,IAAAR,EAAQ,SAAS,eACpBA,EAAQ,SAAS,aAAgB,CAACa,EAAY,SAASL,CAAS,IAGjEW,EAAG,QAAQN;AAAA,EAAA;AAEX,IAAAM,EAAG,QAAQrB;AAEb;;;;;;;;;;;;;;;;;AClEM,UAAAuB,IAAazJ,EAAI,EAAI,GAKrBwJ,IAAY5J,iBAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;AC5B/C,SAAS8J,GAAQC,GAAwB;AACpC,EAAAA,EAAA,UAAU,aAAaC,EAAS,GAChCD,EAAA,UAAU,aAAaE,EAAS,GAChCF,EAAA,UAAU,SAASG,EAAK,GACxBH,EAAA,UAAU,aAAaI,EAAS,GAChCJ,EAAA,UAAU,eAAeK,EAAW,GACpCL,EAAA,UAAU,aAAaM,EAAS,GAChCN,EAAA,UAAU,SAASO,EAAK,GACxBP,EAAA,UAAU,iBAAiBQ,EAAa,GACxCR,EAAA,UAAU,cAAcS,EAAU;AAGvC;"}
|
|
1
|
+
{"version":3,"file":"aform.js","sources":["../src/components/form/ACheckbox.vue","../src/components/form/ADate.vue","../src/components/form/ADropdown.vue","../../utilities/dist/utilities.js","../src/components/form/ADatePicker.vue","../src/components/AForm.vue","../src/components/form/AFieldset.vue","../src/components/form/ANumericInput.vue","../src/directives/mask.ts","../src/components/form/ATextInput.vue","../src/components/utilities/Login.vue","../src/index.ts"],"sourcesContent":["<template>\n\t<div class=\"aform__form-element\">\n\t\t<label class=\"aform__field-label\" :for=\"uuid\">{{ label }}</label>\n\t\t<span class=\"aform__checkbox-container aform__input-field\">\n\t\t\t<input\n\t\t\t\tv-model=\"checkbox\"\n\t\t\t\ttype=\"checkbox\"\n\t\t\t\t:id=\"uuid\"\n\t\t\t\tclass=\"aform__checkbox\"\n\t\t\t\t:readonly=\"readOnly\"\n\t\t\t\t:required=\"required\" />\n\t\t</span>\n\t\t<p class=\"error\" v-show=\"validation.errorMessage\" v-html=\"validation.errorMessage\"></p>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport { InputHTMLAttributes } from 'vue'\n\nwithDefaults(\n\tdefineProps<{\n\t\tlabel?: string\n\t\trequired?: boolean\n\t\treadOnly?: boolean\n\t\tuuid?: string\n\t\tvalidation?: Record<string, any>\n\t}>(),\n\t{\n\t\tvalidation: () => ({ errorMessage: ' ' }),\n\t}\n)\n\nconst checkbox = defineModel<InputHTMLAttributes['checked']>()\n</script>\n","<template>\n\t<div>\n\t\t<input\n\t\t\tref=\"dateRef\"\n\t\t\ttype=\"date\"\n\t\t\t:id=\"uuid\"\n\t\t\t:disabled=\"readonly\"\n\t\t\t:required=\"required\"\n\t\t\t:value=\"inputDate\"\n\t\t\t@click=\"showPicker\" />\n\t\t<label :for=\"uuid\">{{ label }}</label>\n\t\t<p v-show=\"validation.errorMessage\" v-html=\"validation.errorMessage\"></p>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref } from 'vue'\n\nwithDefaults(\n\tdefineProps<{\n\t\tlabel?: string\n\t\trequired?: boolean\n\t\treadonly?: boolean\n\t\tuuid?: string\n\t\tvalidation?: Record<string, any>\n\t}>(),\n\t{\n\t\tlabel: 'Date',\n\t\tvalidation: () => ({ errorMessage: ' ' }),\n\t}\n)\n\nconst inputDate = defineModel<string | number | Date>()\nconst dateRef = ref<HTMLInputElement | null>(null)\n\nconst showPicker = () => {\n\tif (dateRef.value) {\n\t\tif ('showPicker' in HTMLInputElement.prototype) {\n\t\t\t// https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/showPicker\n\t\t\t// TODO: re-check browser support and compatibility; figure out alternative ways\n\t\t\t// to spawn the native datepicker and eventually replace with ADatepicker\n\t\t\tdateRef.value.showPicker()\n\t\t}\n\t}\n}\n</script>\n\n<style scoped>\ndiv {\n\tmin-width: 40ch;\n\tborder: 1px solid transparent;\n\tpadding: 0rem;\n\tmargin: 0rem;\n\tmargin-right: 1ch;\n}\n\ninput {\n\twidth: calc(100% - 1ch);\n\toutline: 1px solid transparent;\n\tborder: 1px solid var(--input-border-color);\n\tpadding: 1ch 0.5ch 0.5ch 1ch;\n\tmargin: calc(1.15rem / 2) 0 0 0;\n\tmin-height: 1.15rem;\n\tborder-radius: 0.25rem;\n}\n\np,\nlabel {\n\tcolor: var(--input-label-color);\n\tdisplay: block;\n\tmin-height: 1.15rem;\n\tpadding: 0rem;\n\tmargin: 0rem;\n\tborder: 1px solid transparent;\n\tmargin-bottom: 0.25rem;\n}\n\np {\n\twidth: 100%;\n\tcolor: red;\n\tfont-size: 85%;\n}\n\nlabel {\n\tz-index: 2;\n\tfont-size: 80%;\n\tposition: absolute;\n\tbackground: white;\n\tmargin: calc(-1.5rem - calc(2.15rem / 2)) 0 0 1ch;\n\tpadding: 0 0.25ch 0 0.25ch;\n}\n\ninput:focus {\n\tborder: 1px solid var(--input-active-border-color);\n}\n\ninput:focus + label {\n\tcolor: var(--input-active-label-color);\n}\n</style>\n","<template>\n\t<div class=\"autocomplete\" :class=\"{ isOpen: isOpen }\">\n\t\t<div class=\"input-wrapper\">\n\t\t\t<input\n\t\t\t\tref=\"mopInput\"\n\t\t\t\ttype=\"text\"\n\t\t\t\t@input=\"onChange\"\n\t\t\t\t@focus=\"onChange\"\n\t\t\t\tv-model=\"search\"\n\t\t\t\t@keydown.down=\"onArrowDown\"\n\t\t\t\t@keydown.up=\"onArrowUp\"\n\t\t\t\t@keydown.enter=\"onEnter\" />\n\n\t\t\t<ul id=\"autocomplete-results\" v-show=\"isOpen\" class=\"autocomplete-results\">\n\t\t\t\t<li class=\"loading autocomplete-result\" v-if=\"isLoading\">Loading results...</li>\n\t\t\t\t<li\n\t\t\t\t\tv-else\n\t\t\t\t\tv-for=\"(result, i) in results\"\n\t\t\t\t\t:key=\"i\"\n\t\t\t\t\t@click=\"setResult(result)\"\n\t\t\t\t\tclass=\"autocomplete-result\"\n\t\t\t\t\t:class=\"{ 'is-active': i === arrowCounter }\">\n\t\t\t\t\t{{ result }}\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t\t<label>{{ label }}</label>\n\t\t</div>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport { onMounted, onUnmounted, ref } from 'vue'\n\nconst props = defineProps<{\n\tlabel: string\n\titems?: string[]\n\tisAsync?: boolean\n}>()\n\nconst emit = defineEmits(['filterChanged'])\n\nconst results = ref(props.items)\nconst search = defineModel<string>()\nconst isLoading = ref(false)\nconst arrowCounter = ref(0)\nconst isOpen = ref(false)\nconst mopInput = ref(null)\n\nonMounted(() => {\n\tdocument.addEventListener('click', handleClickOutside)\n\tfilterResults()\n})\n\nonUnmounted(() => {\n\tdocument.removeEventListener('click', handleClickOutside)\n})\n\nconst setResult = result => {\n\tsearch.value = result\n\tcloseResults()\n}\n\nconst filterResults = () => {\n\tif (!search.value) {\n\t\tresults.value = props.items\n\t} else {\n\t\tresults.value = props.items.filter(item => {\n\t\t\treturn item.toLowerCase().indexOf(search.value.toLowerCase()) > -1\n\t\t})\n\t}\n}\n\nconst onChange = () => {\n\tisOpen.value = true\n\tif (props.isAsync) {\n\t\tisLoading.value = true\n\t\temit('filterChanged', search.value)\n\t} else {\n\t\tfilterResults()\n\t}\n}\n\nconst handleClickOutside = () => {\n\tcloseResults()\n\tarrowCounter.value = 0\n}\n\nconst closeResults = () => {\n\tisOpen.value = false\n\n\t// TODO: (test) when would this occur? how should this be tested?\n\tif (!props.items.includes(search.value)) {\n\t\tsearch.value = ''\n\t}\n}\n\nconst onArrowDown = () => {\n\tif (arrowCounter.value < results.value.length) {\n\t\tarrowCounter.value = arrowCounter.value + 1\n\t}\n}\n\nconst onArrowUp = () => {\n\tif (arrowCounter.value > 0) {\n\t\tarrowCounter.value = arrowCounter.value - 1\n\t}\n}\n\nconst onEnter = () => {\n\tsearch.value = results.value[arrowCounter.value]\n\tcloseResults()\n\tarrowCounter.value = 0\n}\n\n// const openWithSearch = () => {\n// \tsearch.value = ''\n// \tonChange()\n// \tmopInput.value.focus()\n// }\n</script>\n\n<style>\n/* variables taken from here: https://github.com/frappe/frappe/blob/version-13/frappe/public/scss/common/awesomeplete.scss */\n.autocomplete {\n\tposition: relative;\n}\n\n.input-wrapper {\n\tmin-width: 40ch;\n\tborder: 1px solid transparent;\n\tpadding: 0rem;\n\tmargin: 0rem;\n\tmargin-right: 1ch;\n}\n\ninput {\n\twidth: calc(100% - 1ch);\n\toutline: 1px solid transparent;\n\tborder: 1px solid var(--input-border-color);\n\tpadding: 1ch 0.5ch 0.5ch 1ch;\n\tmargin: calc(1.15rem / 2) 0 0 0;\n\tmin-height: 1.15rem;\n\tborder-radius: 0.25rem;\n}\n\ninput:focus {\n\tborder: 1px solid var(--input-active-border-color);\n\tborder-radius: 0.25rem 0.25rem 0 0;\n\tborder-bottom: none;\n}\n\nlabel {\n\tdisplay: block;\n\tmin-height: 1.15rem;\n\tpadding: 0rem;\n\tmargin: 0rem;\n\tborder: 1px solid transparent;\n\tmargin-bottom: 0.25rem;\n\tz-index: 2;\n\tfont-size: 80%;\n\tposition: absolute;\n\tbackground: white;\n\tmargin: calc(-1.5rem - calc(2.15rem / 2)) 0 0 1ch;\n\tpadding: 0 0.25ch 0 0.25ch;\n}\n\n.autocomplete-results {\n\tposition: absolute;\n\twidth: calc(100% - 1ch + 1.5px);\n\tz-index: 1;\n\tpadding: 0;\n\tmargin: 0;\n\tcolor: #000000;\n\tborder: 1px solid var(--input-active-border-color);\n\tborder-radius: 0 0 0.25rem 0.25rem;\n\tborder-top: none;\n}\n\n.autocomplete-result {\n\tlist-style: none;\n\ttext-align: left;\n\tpadding: 4px 6px;\n\tcursor: pointer;\n}\n\n.autocomplete-result.is-active,\n.autocomplete-result:hover {\n\tbackground-color: var(--row-color-zebra-light);\n\tcolor: #000000;\n}\n</style>\n","import { unref as N, getCurrentScope as U, onScopeDispose as j, computed as y, ref as v, watch as w, getCurrentInstance as B, onMounted as K, onBeforeUnmount as V } from \"vue\";\nfunction _(e) {\n return U() ? (j(e), !0) : !1;\n}\nfunction T(e) {\n return typeof e == \"function\" ? e() : N(e);\n}\nconst F = typeof window < \"u\" && typeof document < \"u\";\ntypeof WorkerGlobalScope < \"u\" && globalThis instanceof WorkerGlobalScope;\nconst q = (e) => e != null, G = Object.prototype.toString, z = (e) => G.call(e) === \"[object Object]\", J = () => {\n};\nfunction C(e) {\n var t;\n const n = T(e);\n return (t = n == null ? void 0 : n.$el) != null ? t : n;\n}\nconst b = F ? window : void 0;\nfunction S(...e) {\n let t, n, o, c;\n if (typeof e[0] == \"string\" || Array.isArray(e[0]) ? ([n, o, c] = e, t = b) : [t, n, o, c] = e, !t)\n return J;\n Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);\n const l = [], r = () => {\n l.forEach((i) => i()), l.length = 0;\n }, s = (i, p, u, d) => (i.addEventListener(p, u, d), () => i.removeEventListener(p, u, d)), a = w(\n () => [C(t), T(c)],\n ([i, p]) => {\n if (r(), !i)\n return;\n const u = z(p) ? { ...p } : p;\n l.push(\n ...n.flatMap((d) => o.map((E) => s(i, d, E, u)))\n );\n },\n { immediate: !0, flush: \"post\" }\n ), f = () => {\n a(), r();\n };\n return _(f), f;\n}\nfunction Q() {\n const e = v(!1), t = B();\n return t && K(() => {\n e.value = !0;\n }, t), e;\n}\nfunction X(e) {\n const t = Q();\n return y(() => (t.value, !!e()));\n}\nfunction Y(e, t, n = {}) {\n const { window: o = b, ...c } = n;\n let l;\n const r = X(() => o && \"MutationObserver\" in o), s = () => {\n l && (l.disconnect(), l = void 0);\n }, a = y(() => {\n const u = T(e), d = (Array.isArray(u) ? u : [u]).map(C).filter(q);\n return new Set(d);\n }), f = w(\n () => a.value,\n (u) => {\n s(), r.value && u.size && (l = new MutationObserver(t), u.forEach((d) => l.observe(d, c)));\n },\n { immediate: !0, flush: \"post\" }\n ), i = () => l == null ? void 0 : l.takeRecords(), p = () => {\n s(), f();\n };\n return _(p), {\n isSupported: r,\n stop: p,\n takeRecords: i\n };\n}\nfunction Z(e = {}) {\n var t;\n const {\n window: n = b,\n deep: o = !0,\n triggerOnRemoval: c = !1\n } = e, l = (t = e.document) != null ? t : n == null ? void 0 : n.document, r = () => {\n var f;\n let i = l == null ? void 0 : l.activeElement;\n if (o)\n for (; i != null && i.shadowRoot; )\n i = (f = i == null ? void 0 : i.shadowRoot) == null ? void 0 : f.activeElement;\n return i;\n }, s = v(), a = () => {\n s.value = r();\n };\n return n && (S(n, \"blur\", (f) => {\n f.relatedTarget === null && a();\n }, !0), S(n, \"focus\", a, !0)), c && Y(l, (f) => {\n f.filter((i) => i.removedNodes.length).map((i) => Array.from(i.removedNodes)).flat().forEach((i) => {\n i === s.value && a();\n });\n }, {\n childList: !0,\n subtree: !0\n }), a(), s;\n}\nfunction ee(e, t = {}) {\n const n = Z(t), o = y(() => C(e));\n return { focused: y(() => o.value && n.value ? o.value.contains(n.value) : !1) };\n}\nfunction te(e, { window: t = b, scrollTarget: n } = {}) {\n const o = v(!1), c = () => {\n if (!t) return;\n const l = t.document, r = C(e);\n if (!r)\n o.value = !1;\n else {\n const s = r.getBoundingClientRect();\n o.value = s.top <= (t.innerHeight || l.documentElement.clientHeight) && s.left <= (t.innerWidth || l.documentElement.clientWidth) && s.bottom >= 0 && s.right >= 0;\n }\n };\n return w(\n () => C(e),\n () => c(),\n { immediate: !0, flush: \"post\" }\n ), t && S(n || t, \"scroll\", c, {\n capture: !1,\n passive: !0\n }), o;\n}\nconst m = (e) => {\n let t = te(e).value;\n return t = t && e.offsetHeight > 0, t;\n}, g = (e) => e.tabIndex >= 0, x = (e) => {\n const t = e.target;\n return M(t);\n}, M = (e) => {\n var n;\n let t;\n if (e instanceof HTMLTableCellElement) {\n const o = (n = e.parentElement) == null ? void 0 : n.previousElementSibling;\n if (o) {\n const l = Array.from(o.children)[e.cellIndex];\n l && (t = l);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const o = e.previousElementSibling;\n o && (t = o);\n }\n return t && (!g(t) || !m(t)) ? M(t) : t;\n}, ne = (e) => {\n var o;\n const t = e.target;\n let n;\n if (t instanceof HTMLTableCellElement) {\n const c = (o = t.parentElement) == null ? void 0 : o.parentElement;\n if (c) {\n const r = c.firstElementChild.children[t.cellIndex];\n r && (n = r);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const c = t.parentElement;\n if (c) {\n const l = c.firstElementChild;\n l && (n = l);\n }\n }\n return n && (!g(n) || !m(n)) ? k(n) : n;\n}, D = (e) => {\n const t = e.target;\n return k(t);\n}, k = (e) => {\n var n;\n let t;\n if (e instanceof HTMLTableCellElement) {\n const o = (n = e.parentElement) == null ? void 0 : n.nextElementSibling;\n if (o) {\n const l = Array.from(o.children)[e.cellIndex];\n l && (t = l);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const o = e.nextElementSibling;\n o && (t = o);\n }\n return t && (!g(t) || !m(t)) ? k(t) : t;\n}, oe = (e) => {\n var o;\n const t = e.target;\n let n;\n if (t instanceof HTMLTableCellElement) {\n const c = (o = t.parentElement) == null ? void 0 : o.parentElement;\n if (c) {\n const r = c.lastElementChild.children[t.cellIndex];\n r && (n = r);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const c = t.parentElement;\n if (c) {\n const l = c.lastElementChild;\n l && (n = l);\n }\n }\n return n && (!g(n) || !m(n)) ? M(n) : n;\n}, P = (e) => {\n const t = e.target;\n return L(t);\n}, L = (e) => {\n var n;\n let t;\n if (e.previousElementSibling)\n t = e.previousElementSibling;\n else {\n const o = (n = e.parentElement) == null ? void 0 : n.previousElementSibling;\n t = o == null ? void 0 : o.lastElementChild;\n }\n return t && (!g(t) || !m(t)) ? L(t) : t;\n}, O = (e) => {\n const t = e.target;\n return R(t);\n}, R = (e) => {\n var n;\n let t;\n if (e.nextElementSibling)\n t = e.nextElementSibling;\n else {\n const o = (n = e.parentElement) == null ? void 0 : n.nextElementSibling;\n t = o == null ? void 0 : o.firstElementChild;\n }\n return t && (!g(t) || !m(t)) ? R(t) : t;\n}, W = (e) => {\n const o = e.target.parentElement.firstElementChild;\n return o && (!g(o) || !m(o)) ? R(o) : o;\n}, I = (e) => {\n const o = e.target.parentElement.lastElementChild;\n return o && (!g(o) || !m(o)) ? L(o) : o;\n}, h = [\"alt\", \"control\", \"shift\", \"meta\"], re = {\n ArrowUp: \"up\",\n ArrowDown: \"down\",\n ArrowLeft: \"left\",\n ArrowRight: \"right\"\n}, le = {\n \"keydown.up\": (e) => {\n const t = x(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.down\": (e) => {\n const t = D(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.left\": (e) => {\n const t = P(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.right\": (e) => {\n const t = O(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.control.up\": (e) => {\n const t = ne(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.down\": (e) => {\n const t = oe(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.left\": (e) => {\n const t = W(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.right\": (e) => {\n const t = I(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.end\": (e) => {\n const t = I(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const n = D(e);\n n && n.focus();\n }\n },\n \"keydown.shift.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const n = x(e);\n n && n.focus();\n }\n },\n \"keydown.home\": (e) => {\n const t = W(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.tab\": (e) => {\n const t = O(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.shift.tab\": (e) => {\n const t = P(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n }\n};\nfunction ie(e) {\n const t = (r) => {\n let s = null;\n return r.parent && (typeof r.parent == \"string\" ? s = document.querySelector(r.parent) : r.parent instanceof HTMLElement ? s = r.parent : s = r.parent.value), s;\n }, n = (r) => {\n const s = t(r);\n let a = [];\n if (typeof r.selectors == \"string\")\n a = s ? Array.from(s.querySelectorAll(r.selectors)) : Array.from(document.querySelectorAll(r.selectors));\n else if (Array.isArray(r.selectors))\n for (const f of r.selectors)\n f instanceof HTMLElement ? a.push(f) : a.push(f.$el);\n else if (r.selectors instanceof HTMLElement)\n a.push(r.selectors);\n else if (Array.isArray(r.selectors.value))\n for (const f of r.selectors.value)\n f instanceof HTMLElement ? a.push(f) : a.push(f.$el);\n else\n a.push(r.selectors.value);\n return a;\n }, o = (r) => {\n const s = t(r);\n let a = [];\n return r.selectors ? a = n(r) : s && (a = Array.from(s.children).filter((i) => g(i) && m(i))), a;\n }, c = (r) => (s) => {\n const a = re[s.key] || s.key.toLowerCase();\n if (h.includes(a)) return;\n const f = r.handlers || le;\n for (const i of Object.keys(f)) {\n const [p, ...u] = i.split(\".\");\n if (p === \"keydown\" && u.includes(a)) {\n const d = f[i], E = u.filter(($) => h.includes($)), H = h.some(($) => {\n const A = $.charAt(0).toUpperCase() + $.slice(1);\n return s.getModifierState(A);\n });\n if (E.length > 0) {\n if (H) {\n for (const $ of h)\n if (u.includes($)) {\n const A = $.charAt(0).toUpperCase() + $.slice(1);\n s.getModifierState(A) && d(s);\n }\n }\n } else\n H || d(s);\n }\n }\n }, l = [];\n K(() => {\n for (const r of e) {\n const s = t(r), a = o(r), f = c(r), i = s ? [s] : a;\n for (const p of i) {\n const { focused: u } = ee(v(p)), d = w(u, (E) => {\n E ? p.addEventListener(\"keydown\", f) : p.removeEventListener(\"keydown\", f);\n });\n l.push(d);\n }\n }\n }), V(() => {\n for (const r of l)\n r();\n });\n}\nfunction ce(e) {\n}\nexport {\n le as defaultKeypressHandlers,\n ce as install,\n ie as useKeyboardNav\n};\n//# sourceMappingURL=utilities.js.map\n","<template>\n\t<div class=\"adatepicker\" tabindex=\"0\" ref=\"adatepicker\">\n\t\t<table>\n\t\t\t<tr>\n\t\t\t\t<td id=\"previous-month-btn\" @click=\"previousMonth\" :tabindex=\"-1\"><</td>\n\t\t\t\t<th colspan=\"5\" :tabindex=\"-1\">{{ monthAndYear }}</th>\n\t\t\t\t<td id=\"next-month-btn\" @click=\"nextMonth\" :tabindex=\"-1\">></td>\n\t\t\t</tr>\n\t\t\t<tr class=\"days-header\">\n\t\t\t\t<td>M</td>\n\t\t\t\t<td>T</td>\n\t\t\t\t<td>W</td>\n\t\t\t\t<td>T</td>\n\t\t\t\t<td>F</td>\n\t\t\t\t<td>S</td>\n\t\t\t\t<td>S</td>\n\t\t\t</tr>\n\t\t\t<tr v-for=\"rowNo in numberOfRows\" :key=\"rowNo\">\n\t\t\t\t<td\n\t\t\t\t\tv-for=\"colNo in numberOfColumns\"\n\t\t\t\t\tref=\"celldate\"\n\t\t\t\t\t:key=\"getCurrentCell(rowNo, colNo)\"\n\t\t\t\t\t:contenteditable=\"false\"\n\t\t\t\t\t:spellcheck=\"false\"\n\t\t\t\t\t:tabindex=\"0\"\n\t\t\t\t\t@click.prevent.stop=\"selectDate(getCurrentCell(rowNo, colNo))\"\n\t\t\t\t\t@keydown.enter=\"selectDate(getCurrentCell(rowNo, colNo))\"\n\t\t\t\t\t:class=\"{\n\t\t\t\t\t\ttodaysDate: isTodaysDate(getCurrentDate(rowNo, colNo)),\n\t\t\t\t\t\tselectedDate: isSelectedDate(getCurrentDate(rowNo, colNo)),\n\t\t\t\t\t}\">\n\t\t\t\t\t{{ new Date(getCurrentDate(rowNo, colNo)).getDate() }}\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport { defaultKeypressHandlers, useKeyboardNav } from '@stonecrop/utilities'\nimport { computed, nextTick, onMounted, ref, watch } from 'vue'\n\nconst numberOfRows = 6\nconst numberOfColumns = 7\n\nconst date = defineModel<number | Date>({ default: new Date() })\nconst selectedDate = ref(new Date(date.value))\nconst currentMonth = ref<number>(selectedDate.value.getMonth())\nconst currentYear = ref<number>(selectedDate.value.getFullYear())\nconst currentDates = ref<number[]>([])\nconst adatepicker = ref<HTMLElement | null>(null)\n\nonMounted(async () => {\n\tpopulateMonth()\n\n\t// required to allow the elements to be focused in the next step\n\tawait nextTick()\n\n\tconst $selectedDate = document.getElementsByClassName('selectedDate')\n\tif ($selectedDate.length > 0) {\n\t\t;($selectedDate[0] as HTMLElement).focus()\n\t} else {\n\t\tconst $todaysDate = document.getElementsByClassName('todaysDate')\n\t\tif ($todaysDate.length > 0) {\n\t\t\t;($todaysDate[0] as HTMLElement).focus()\n\t\t}\n\t}\n})\n\nconst populateMonth = () => {\n\tcurrentDates.value = []\n\tconst firstOfMonth = new Date(currentYear.value, currentMonth.value, 1)\n\tconst monthStartWeekday = firstOfMonth.getDay()\n\tconst calendarStartDay = firstOfMonth.setDate(firstOfMonth.getDate() - monthStartWeekday)\n\n\t// assume midnight for all dates while building the calendar\n\tfor (const dayIndex of Array(43).keys()) {\n\t\tcurrentDates.value.push(calendarStartDay + dayIndex * 86400000)\n\t}\n}\n\nwatch([currentMonth, currentYear], populateMonth)\nconst previousYear = () => (currentYear.value -= 1)\nconst nextYear = () => (currentYear.value += 1)\n\nconst previousMonth = () => {\n\tif (currentMonth.value == 0) {\n\t\tcurrentMonth.value = 11\n\t\tpreviousYear()\n\t} else {\n\t\tcurrentMonth.value -= 1\n\t}\n}\n\nconst nextMonth = () => {\n\tif (currentMonth.value == 11) {\n\t\tcurrentMonth.value = 0\n\t\tnextYear()\n\t} else {\n\t\tcurrentMonth.value += 1\n\t}\n}\n\nconst isTodaysDate = (day: string | number | Date) => {\n\tconst todaysDate = new Date()\n\tif (currentMonth.value !== todaysDate.getMonth()) {\n\t\treturn\n\t}\n\treturn todaysDate.toDateString() === new Date(day).toDateString()\n}\n\nconst isSelectedDate = (day: string | number | Date) => {\n\treturn new Date(day).toDateString() === new Date(selectedDate.value).toDateString()\n}\n\nconst getCurrentCell = (rowNo: number, colNo: number) => {\n\treturn (rowNo - 1) * numberOfColumns + colNo\n}\n\nconst getCurrentDate = (rowNo: number, colNo: number) => {\n\treturn currentDates.value[getCurrentCell(rowNo, colNo)]\n}\n\nconst selectDate = (currentIndex: number) => {\n\tdate.value = selectedDate.value = new Date(currentDates.value[currentIndex])\n}\n\nconst monthAndYear = computed(() => {\n\treturn new Date(currentYear.value, currentMonth.value, 1).toLocaleDateString(undefined, {\n\t\tyear: 'numeric',\n\t\tmonth: 'long',\n\t})\n})\n\n// setup keyboard navigation\nuseKeyboardNav([\n\t{\n\t\tparent: adatepicker,\n\t\tselectors: 'td',\n\t\thandlers: {\n\t\t\t...defaultKeypressHandlers,\n\t\t\t...{\n\t\t\t\t'keydown.pageup': previousMonth,\n\t\t\t\t'keydown.shift.pageup': previousYear,\n\t\t\t\t'keydown.pagedown': nextMonth,\n\t\t\t\t'keydown.shift.pagedown': nextYear,\n\t\t\t\t// TODO: this is a hack to override the stonecrop enter handler;\n\t\t\t\t// store context inside the component so that handlers can be setup consistently\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-empty-function\n\t\t\t\t'keydown.enter': () => {}, // select this date\n\t\t\t},\n\t\t},\n\t},\n])\n</script>\n\n<style>\n@import url('@stonecrop/themes/default/default.css');\n@import url('@/theme/adate.css');\n@import url('@/theme/aform.css');\n</style>\n","<template>\n\t<form class=\"aform\">\n\t\t<component\n\t\t\tv-for=\"(componentObj, key) in modelValue\"\n\t\t\t:is=\"componentObj.component\"\n\t\t\t:key=\"key\"\n\t\t\t:schema=\"componentObj\"\n\t\t\tv-model=\"childModels[key].value\"\n\t\t\t:data=\"formData[componentObj.fieldname]\"\n\t\t\t:readonly=\"readonly\"\n\t\t\tv-bind=\"componentProps(componentObj)\">\n\t\t</component>\n\t</form>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, computed } from 'vue'\n\nimport type { SchemaTypes } from '@/types'\n\nconst props = defineProps<{\n\tmodelValue: SchemaTypes[]\n\tdata: Record<string, any>\n\treadonly?: boolean\n}>()\n\nconst emit = defineEmits(['update:modelValue'])\n\nconst formData = ref(props.data || {})\n\nconst componentProps = (componentObj: SchemaTypes) => {\n\tlet propsToPass = {}\n\tfor (const [key, value] of Object.entries(componentObj)) {\n\t\tif (!['component', 'fieldtype'].includes(key)) {\n\t\t\tpropsToPass[key] = value\n\t\t}\n\n\t\t// handle ATable data formats in case the table is nested under an AFormm;\n\t\t// TODO: there's probably a better way to do this\n\t\tif (key === 'rows') {\n\t\t\tif (value && (value as any[]).length === 0) {\n\t\t\t\tpropsToPass['rows'] = formData.value[componentObj.fieldname]\n\t\t\t}\n\t\t}\n\t}\n\treturn propsToPass\n}\n\nconst childModels = computed({\n\tget: () => {\n\t\treturn props.modelValue.map((val, i) => {\n\t\t\treturn computed({\n\t\t\t\tget() {\n\t\t\t\t\treturn val.value\n\t\t\t\t},\n\t\t\t\tset: newValue => {\n\t\t\t\t\t// Find the component in modelValue and update it\n\t\t\t\t\t// eslint-disable-next-line vue/no-mutating-props\n\t\t\t\t\tprops.modelValue[i].value = newValue\n\t\t\t\t\temit('update:modelValue', props.modelValue)\n\t\t\t\t},\n\t\t\t})\n\t\t})\n\t},\n\tset: (/* newValue */) => {\n\t\t//emit('update:modelValue', '')\n\t},\n})\n</script>\n\n<style scoped>\n@import url('@/theme/aform.css');\n</style>\n","<template>\n\t<fieldset>\n\t\t<legend @click=\"toggleCollapse\" @submit=\"toggleCollapse\">\n\t\t\t{{ label }}\n\t\t\t<CollapseButton v-if=\"collapsible\" :collapsed=\"collapsed\" />\n\t\t</legend>\n\t\t<slot :collapsed=\"collapsed\">\n\t\t\t<AForm v-show=\"!collapsed\" v-model=\"formSchema\" :data=\"formData\" />\n\t\t</slot>\n\t</fieldset>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref } from 'vue'\n\nimport CollapseButton from '@/components/base/CollapseButton.vue'\nimport AForm from '@/components/AForm.vue'\nimport { SchemaTypes } from '@/types'\n\nconst props = defineProps<{\n\tschema: SchemaTypes[]\n\tlabel: string\n\tcollapsible?: boolean\n\tdata?: any\n}>()\n\nconst formData = ref(props.data || [])\nconst collapsed = ref(false)\nconst collapsible = ref(props.collapsible)\n\nconst formSchema = ref(props.schema)\nfunction toggleCollapse(event: Event) {\n\tevent.preventDefault()\n\tif (!collapsible.value) {\n\t\treturn\n\t}\n\tcollapsed.value = !collapsed.value\n}\n</script>\n\n<style scoped>\nfieldset {\n\tmax-width: 100%;\n\twidth: 100%;\n\tmargin-right: 2ch;\n\tborder: 1px solid transparent;\n\tborder-bottom: 1px solid var(--gray-50);\n}\n\nlegend {\n\twidth: 100%;\n\theight: 1.15rem;\n\tborder: 1px solid transparent;\n\tpadding-bottom: 0.5rem;\n\tfont-size: 110%;\n\tfont-weight: 600;\n\tuser-select: none;\n}\n\n.collapse-button {\n\tfloat: right;\n}\n</style>\n","<template>\n\t<div class=\"aform__form-element\">\n\t\t<label class=\"aform__field-label\" :for=\"uuid\">{{ label }}</label>\n\t\t<input\n\t\t\tclass=\"aform__input-field\"\n\t\t\tv-model=\"inputNumber\"\n\t\t\ttype=\"number\"\n\t\t\t:id=\"uuid\"\n\t\t\t:disabled=\"readonly\"\n\t\t\t:required=\"required\" />\n\t\t<p class=\"error\" v-show=\"validation.errorMessage\" v-html=\"validation.errorMessage\"></p>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nwithDefaults(\n\tdefineProps<{\n\t\tlabel: string\n\t\trequired?: boolean\n\t\treadonly?: boolean\n\t\tuuid?: string\n\t\tvalidation?: Record<string, any>\n\t}>(),\n\t{\n\t\tvalidation: () => ({ errorMessage: ' ' }),\n\t}\n)\n\nconst inputNumber = defineModel<number>()\n</script>\n","import type { DirectiveBinding } from 'vue'\n\nimport type { FormSchema } from '@/types'\n\nconst NAMED_MASKS = {\n\tdate: '##/##/####',\n\tdatetime: '####/##/## ##:##',\n\ttime: '##:##',\n\tfulltime: '##:##:##',\n\tphone: '(###) ### - ####',\n\tcard: '#### #### #### ####',\n}\n\nfunction extractMaskFn(mask: string): ((args: any) => string) | void {\n\ttry {\n\t\t// eslint-disable-next-line @typescript-eslint/no-implied-eval\n\t\treturn Function(`\"use strict\";return (${mask})`)()\n\t} catch (error) {\n\t\tif (error instanceof ReferenceError) {\n\t\t\t// assume mask is a string\n\t\t}\n\t}\n}\n\nfunction getMask(binding: DirectiveBinding<string>) {\n\tlet mask = binding.value\n\n\tif (mask) {\n\t\tconst maskFn = extractMaskFn(mask)\n\t\tif (maskFn) {\n\t\t\t// TODO: (state) replace with state management;\n\t\t\t// pass the entire form/table data to the function\n\t\t\tconst locale = binding.instance['locale']\n\t\t\tmask = maskFn(locale)\n\t\t}\n\t} else {\n\t\t// TODO: (state) handle using state management\n\t\tconst schema: FormSchema = binding.instance['schema']\n\t\tconst fieldType: string | undefined = schema?.fieldtype?.toLowerCase()\n\t\tif (fieldType && NAMED_MASKS[fieldType]) {\n\t\t\tmask = NAMED_MASKS[fieldType]\n\t\t}\n\t}\n\n\treturn mask\n}\n\nfunction unmaskInput(input: string, maskToken?: string) {\n\tif (!maskToken) {\n\t\tmaskToken = '#'\n\t}\n\n\tlet unmaskedInput = input\n\tconst maskChars = [maskToken, '/', '-', '(', ')', ' ']\n\n\tfor (const char of maskChars) {\n\t\tunmaskedInput = unmaskedInput.replaceAll(char, '')\n\t}\n\n\treturn unmaskedInput\n}\n\nfunction fillMask(input: string, mask: string, maskToken?: string) {\n\tif (!maskToken) {\n\t\tmaskToken = '#'\n\t}\n\n\tlet replacement = mask\n\tfor (const inputChar of input) {\n\t\tconst replaceIndex = replacement.indexOf(maskToken)\n\t\tif (replaceIndex !== -1) {\n\t\t\tconst prefix = replacement.substring(0, replaceIndex)\n\t\t\tconst suffix = replacement.substring(replaceIndex + 1)\n\t\t\treplacement = prefix + inputChar + suffix\n\t\t}\n\t}\n\n\treturn replacement.slice(0, mask.length)\n}\n\nexport function useStringMask(el: HTMLInputElement, binding: DirectiveBinding<string>) {\n\tconst mask = getMask(binding)\n\tif (!mask) return\n\n\tconst maskToken = '#'\n\tconst inputText = el.value\n\n\t// process input value with mask\n\tconst unmaskedInput = unmaskInput(inputText, maskToken)\n\tif (unmaskedInput) {\n\t\tconst replacement = fillMask(unmaskedInput, mask, maskToken)\n\n\t\t// TODO: (state) this is very opinionated;\n\t\t// most likely fixed with state management;\n\t\t// a better way could be to emit back to instance;\n\n\t\tif (binding.instance['maskFilled']) {\n\t\t\tbinding.instance['maskFilled'] = !replacement.includes(maskToken)\n\t\t}\n\n\t\tel.value = replacement\n\t} else {\n\t\tel.value = mask\n\t}\n}\n","<template>\n\t<div class=\"aform__form-element\">\n\t\t<label class=\"aform__field-label\" :for=\"uuid\">{{ label }} </label>\n\t\t<input\n\t\t\tclass=\"aform__input-field\"\n\t\t\tv-model=\"inputText\"\n\t\t\t:id=\"uuid\"\n\t\t\t:disabled=\"readonly\"\n\t\t\t:maxlength=\"mask ? maskFilled && mask.length : undefined\"\n\t\t\t:required=\"required\"\n\t\t\tv-mask=\"mask\" />\n\t\t<p class=\"error\" v-show=\"validation.errorMessage\" v-html=\"validation.errorMessage\"></p>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport { /* inject, */ ref } from 'vue'\n\nimport { useStringMask as vMask } from '@/directives/mask'\nimport type { FormSchema } from '@/types'\n\nwithDefaults(\n\tdefineProps<{\n\t\tschema: FormSchema\n\t\tlabel: string\n\t\tmask?: string\n\t\trequired?: boolean\n\t\treadonly?: boolean\n\t\tuuid?: string\n\t\tvalidation?: { errorMessage: string }\n\t}>(),\n\t{\n\t\tvalidation: () => ({ errorMessage: ' ' }),\n\t}\n)\n\n// TODO: setup maskFilled as a computed property\nconst maskFilled = ref(true)\n\n// TODO: (state) replace with state management\n// const locale = inject<string>('locale', '')\n\nconst inputText = defineModel<number | string>()\n</script>\n","<template>\n\t<div class=\"login-container\">\n\t\t<div>\n\t\t\t<div class=\"account-container\">\n\t\t\t\t<div class=\"account-header\">\n\t\t\t\t\t<h1 id=\"account-title\">{{ headerTitle }}</h1>\n\t\t\t\t\t<p id=\"account-subtitle\">{{ headerSubtitle }}</p>\n\t\t\t\t</div>\n\n\t\t\t\t<form @submit=\"onSubmit\">\n\t\t\t\t\t<div class=\"login-form-container\">\n\t\t\t\t\t\t<div class=\"login-form-email login-form-element\">\n\t\t\t\t\t\t\t<label id=\"login-email\" for=\"email\" class=\"aform__field-label\">Email</label>\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\tid=\"email\"\n\t\t\t\t\t\t\t\tclass=\"aform__input-field\"\n\t\t\t\t\t\t\t\tname=\"email\"\n\t\t\t\t\t\t\t\tplaceholder=\"name@example.com\"\n\t\t\t\t\t\t\t\ttype=\"email\"\n\t\t\t\t\t\t\t\tv-model=\"email\"\n\t\t\t\t\t\t\t\tauto-capitalize=\"none\"\n\t\t\t\t\t\t\t\tauto-complete=\"email\"\n\t\t\t\t\t\t\t\tauto-correct=\"off\"\n\t\t\t\t\t\t\t\t:disabled=\"isLoading\" />\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div class=\"login-form-password login-form-element\">\n\t\t\t\t\t\t\t<label id=\"login-password\" for=\"password\" class=\"login-label\">Password</label>\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\tid=\"password\"\n\t\t\t\t\t\t\t\tclass=\"login-field\"\n\t\t\t\t\t\t\t\tname=\"password\"\n\t\t\t\t\t\t\t\ttype=\"password\"\n\t\t\t\t\t\t\t\tv-model=\"password\"\n\t\t\t\t\t\t\t\t:disabled=\"isLoading\" />\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<button class=\"btn\" @click=\"onSubmit\" :disabled=\"isLoading || !email || !password\">\n\t\t\t\t\t\t\t<span v-if=\"isLoading\" class=\"material-symbols-outlined loading-icon\">progress_activity</span>\n\t\t\t\t\t\t\t<span id=\"login-form-button\">Login</span>\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t</form>\n\n\t\t\t\t<button class=\"btn\">\n\t\t\t\t\t<span id=\"forgot-password-button\">Forgot password?</span>\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref } from 'vue'\n\nwithDefaults(\n\tdefineProps<{\n\t\theaderTitle?: string\n\t\theaderSubtitle?: string\n\t}>(),\n\t{\n\t\theaderTitle: 'Login',\n\t\theaderSubtitle: 'Enter your email and password to login',\n\t}\n)\n\nconst emit = defineEmits(['loginFailed', 'loginSuccess'])\n\nconst email = ref('')\nconst password = ref('')\n\nconst isLoading = ref(false)\nconst loginFailed = ref(false)\n\nfunction onSubmit(event: Event) {\n\tevent.preventDefault()\n\tisLoading.value = true\n\n\t// TODO: handle submit logic, handle failure\n\n\tif (loginFailed.value) {\n\t\tisLoading.value = false\n\t\temit('loginFailed')\n\t\treturn\n\t}\n\n\tisLoading.value = false\n\temit('loginSuccess')\n}\n</script>\n\n<style>\n@import url('@/theme/login.css');\n</style>\n","import { App } from 'vue'\n\nimport ACheckbox from '@/components/form/ACheckbox.vue'\nimport AComboBox from '@/components/form/AComboBox.vue'\nimport ADate from '@/components/form/ADate.vue'\nimport ADropdown from '@/components/form/ADropdown.vue'\nimport ADatePicker from '@/components/form/ADatePicker.vue'\nimport AFieldset from '@/components/form/AFieldset.vue'\nimport AForm from '@/components/AForm.vue'\nimport ANumericInput from '@/components/form/ANumericInput.vue'\nimport ATextInput from '@/components/form/ATextInput.vue'\nimport Login from '@/components/utilities/Login.vue'\nexport type { BasicSchema, FormSchema, TableSchema, FieldsetSchema, SchemaTypes } from '@/types'\n// import { ACurrency } from '@/components/form/ACurrency.vue'\n// import { AQuantity } from '@/components/form/AQuantity.vue'\n\n/**\n * Install all AForm components\n * @param app - Vue app instance\n * @public\n */\nfunction install(app: App /* options */) {\n\tapp.component('ACheckbox', ACheckbox)\n\tapp.component('ACombobox', AComboBox)\n\tapp.component('ADate', ADate)\n\tapp.component('ADropdown', ADropdown)\n\tapp.component('ADatePicker', ADatePicker)\n\tapp.component('AFieldset', AFieldset)\n\tapp.component('AForm', AForm)\n\tapp.component('ANumericInput', ANumericInput)\n\tapp.component('ATextInput', ATextInput)\n\t// app.component('ACurrency', ACurrency)\n\t// app.component('AQuantity', AQuantity)\n}\n\nexport {\n\tACheckbox,\n\tAComboBox,\n\tADate,\n\tADropdown,\n\tADatePicker,\n\tAFieldset,\n\tAForm,\n\tANumericInput,\n\tATextInput,\n\tLogin,\n\tinstall,\n}\n"],"names":["checkbox","_useModel","__props","inputDate","dateRef","ref","showPicker","props","emit","__emit","results","search","isLoading","arrowCounter","isOpen","mopInput","onMounted","handleClickOutside","filterResults","onUnmounted","setResult","result","closeResults","item","onChange","onArrowDown","onArrowUp","onEnter","_","U","j","T","N","F","q","G","z","J","C","b","S","c","l","i","u","d","a","w","E","f","Q","v","B","K","X","y","Y","Z","ee","te","m","g","x","M","n","t","ne","o","r","k","D","oe","P","L","O","R","W","I","h","re","le","ie","$","H","A","V","numberOfRows","numberOfColumns","date","selectedDate","currentMonth","currentYear","currentDates","adatepicker","populateMonth","nextTick","$selectedDate","$todaysDate","firstOfMonth","monthStartWeekday","calendarStartDay","dayIndex","watch","previousYear","nextYear","previousMonth","nextMonth","isTodaysDate","day","todaysDate","isSelectedDate","getCurrentCell","rowNo","colNo","getCurrentDate","selectDate","currentIndex","monthAndYear","computed","useKeyboardNav","defaultKeypressHandlers","formData","componentProps","componentObj","propsToPass","key","value","childModels","val","newValue","collapsed","collapsible","formSchema","toggleCollapse","event","inputNumber","NAMED_MASKS","extractMaskFn","mask","getMask","binding","maskFn","locale","schema","fieldType","_a","unmaskInput","input","maskToken","unmaskedInput","maskChars","char","fillMask","replacement","inputChar","replaceIndex","prefix","suffix","useStringMask","el","inputText","maskFilled","email","password","loginFailed","onSubmit","install","app","ACheckbox","AComboBox","ADate","ADropdown","ADatePicker","AFieldset","AForm","ANumericInput","ATextInput"],"mappings":";;;;;;;;;;;;;;;AAgCM,UAAAA,IAAWC,EAA2CC,GAAA,YAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAvD,UAAAC,IAAYF,iBAAoC,GAChDG,IAAUC,EAA6B,IAAI,GAE3CC,IAAa,MAAM;AACxB,MAAIF,EAAQ,SACP,gBAAgB,iBAAiB,aAIpCA,EAAQ,MAAM;IAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACVD,UAAMG,IAAQL,GAMRM,IAAOC,GAEPC,IAAUL,EAAIE,EAAM,KAAK,GACzBI,IAASV,EAAmBC,GAAA,YAAC,GAC7BU,IAAYP,EAAI,EAAK,GACrBQ,IAAeR,EAAI,CAAC,GACpBS,IAAST,EAAI,EAAK,GAClBU,IAAWV,EAAI,IAAI;AAEzB,IAAAW,EAAU,MAAM;AACN,eAAA,iBAAiB,SAASC,CAAkB,GACvCC;IAAA,CACd,GAEDC,GAAY,MAAM;AACR,eAAA,oBAAoB,SAASF,CAAkB;AAAA,IAAA,CACxD;AAED,UAAMG,IAAY,CAAUC,MAAA;AAC3B,MAAAV,EAAO,QAAQU,GACFC;IAAA,GAGRJ,IAAgB,MAAM;AACvB,MAACP,EAAO,QAGXD,EAAQ,QAAQH,EAAM,MAAM,OAAO,CAAQgB,MACnCA,EAAK,YAAc,EAAA,QAAQZ,EAAO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B2J,IAAY/J,iBAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACwB/C,UAAMO,IAAOC,GAEPyJ,IAAQ7J,EAAI,EAAE,GACd8J,IAAW9J,EAAI,EAAE,GAEjBO,IAAYP,EAAI,EAAK,GACrB+J,IAAc/J,EAAI,EAAK;AAE7B,aAASgK,EAAS/B,GAAc;AAM/B,UALAA,EAAM,eAAe,GACrB1H,EAAU,QAAQ,IAIdwJ,EAAY,OAAO;AACtB,QAAAxJ,EAAU,QAAQ,IAClBJ,EAAK,aAAa;AAClB;AAAA,MACD;AAEA,MAAAI,EAAU,QAAQ,IAClBJ,EAAK,cAAc;AAAA,IACpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACnEA,SAAS8J,GAAQC,GAAwB;AACpC,EAAAA,EAAA,UAAU,aAAaC,EAAS,GAChCD,EAAA,UAAU,aAAaE,EAAS,GAChCF,EAAA,UAAU,SAASG,EAAK,GACxBH,EAAA,UAAU,aAAaI,EAAS,GAChCJ,EAAA,UAAU,eAAeK,EAAW,GACpCL,EAAA,UAAU,aAAaM,EAAS,GAChCN,EAAA,UAAU,SAASO,EAAK,GACxBP,EAAA,UAAU,iBAAiBQ,EAAa,GACxCR,EAAA,UAAU,cAAcS,EAAU;AAGvC;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":"5.5.2"}
|
package/dist/aform.umd.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(p,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(p=typeof globalThis<"u"?globalThis:p||self,e(p["@stonecrop/aform"]={},p.Vue))})(this,function(p,e){"use strict";const te={class:"aform__form-element"},ne=["for"],oe={class:"aform__checkbox-container aform__input-field"},le=["id","readonly","required"],ae=["innerHTML"],I=e.defineComponent({__name:"ACheckbox",props:e.mergeModels({label:{},required:{type:Boolean},readOnly:{type:Boolean},uuid:{},validation:{default:()=>({errorMessage:" "})}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const n=e.useModel(t,"modelValue");return(o,l)=>(e.openBlock(),e.createElementBlock("div",te,[e.createElementVNode("label",{class:"aform__field-label",for:o.uuid},e.toDisplayString(o.label),9,ne),e.createElementVNode("span",oe,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":l[0]||(l[0]=a=>n.value=a),type:"checkbox",id:o.uuid,class:"aform__checkbox",readonly:o.readOnly,required:o.required},null,8,le),[[e.vModelCheckbox,n.value]])]),e.withDirectives(e.createElementVNode("p",{class:"error",innerHTML:o.validation.errorMessage},null,8,ae),[[e.vShow,o.validation.errorMessage]])]))}}),re=e.createElementVNode("div",null,[e.createElementVNode("input",{type:"text"}),e.createElementVNode("input",{type:"text"}),e.createElementVNode("input",{type:"text"})],-1),P=e.defineComponent({__name:"AComboBox",props:["event","cellData","tableID"],setup(t){return(n,o)=>{const l=e.resolveComponent("ATableModal");return e.openBlock(),e.createBlock(l,{event:t.event,cellData:t.cellData,class:"amodal"},{default:e.withCtx(()=>[re]),_:1},8,["event","cellData"])}}}),se=["id","disabled","required","value"],ie=["for"],ce=["innerHTML"],de=e.defineComponent({__name:"ADate",props:e.mergeModels({label:{default:"Date"},required:{type:Boolean},readonly:{type:Boolean},uuid:{},validation:{default:()=>({errorMessage:" "})}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const n=e.useModel(t,"modelValue"),o=e.ref(null),l=()=>{o.value&&"showPicker"in HTMLInputElement.prototype&&o.value.showPicker()};return(a,i)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("input",{ref_key:"dateRef",ref:o,type:"date",id:a.uuid,disabled:a.readonly,required:a.required,value:n.value,onClick:l},null,8,se),e.createElementVNode("label",{for:a.uuid},e.toDisplayString(a.label),9,ie),e.withDirectives(e.createElementVNode("p",{innerHTML:a.validation.errorMessage},null,8,ce),[[e.vShow,a.validation.errorMessage]])]))}}),C=(t,n)=>{const o=t.__vccOpts||t;for(const[l,a]of n)o[l]=a;return o},F=C(de,[["__scopeId","data-v-69d0f23d"]]),ue={class:"input-wrapper"},me={id:"autocomplete-results",class:"autocomplete-results"},fe={key:0,class:"loading autocomplete-result"},pe=["onClick"],q=e.defineComponent({__name:"ADropdown",props:e.mergeModels({label:{},items:{},isAsync:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["filterChanged"],["update:modelValue"]),setup(t,{emit:n}){const o=t,l=n,a=e.ref(o.items),i=e.useModel(t,"modelValue"),s=e.ref(!1),r=e.ref(0),d=e.ref(!1),c=e.ref(null);e.onMounted(()=>{document.addEventListener("click",g),f()}),e.onUnmounted(()=>{document.removeEventListener("click",g)});const u=m=>{i.value=m,k()},f=()=>{i.value?a.value=o.items.filter(m=>m.toLowerCase().indexOf(i.value.toLowerCase())>-1):a.value=o.items},h=()=>{d.value=!0,o.isAsync?(s.value=!0,l("filterChanged",i.value)):f()},g=m=>{k(),r.value=0},k=()=>{d.value=!1,o.items.includes(i.value)||(i.value="")},M=()=>{r.value<a.value.length&&(r.value=r.value+1)},_=()=>{r.value>0&&(r.value=r.value-1)},V=()=>{i.value=a.value[r.value],k(),r.value=0};return(m,y)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["autocomplete",{isOpen:d.value}])},[e.createElementVNode("div",ue,[e.withDirectives(e.createElementVNode("input",{ref_key:"mopInput",ref:c,type:"text",onInput:h,onFocus:h,"onUpdate:modelValue":y[0]||(y[0]=E=>i.value=E),onKeydown:[e.withKeys(M,["down"]),e.withKeys(_,["up"]),e.withKeys(V,["enter"])]},null,544),[[e.vModelText,i.value]]),e.withDirectives(e.createElementVNode("ul",me,[s.value?(e.openBlock(),e.createElementBlock("li",fe,"Loading results...")):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(a.value,(E,w)=>(e.openBlock(),e.createElementBlock("li",{key:w,onClick:ee=>u(E),class:e.normalizeClass(["autocomplete-result",{"is-active":w===r.value}])},e.toDisplayString(E),11,pe))),128))],512),[[e.vShow,d.value]]),e.createElementVNode("label",null,e.toDisplayString(m.label),1)])],2))}});function he(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}function x(t){return typeof t=="function"?t():e.unref(t)}const ye=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const ge=Object.prototype.toString,ke=t=>ge.call(t)==="[object Object]",Ee=()=>{};function A(t){var n;const o=x(t);return(n=o==null?void 0:o.$el)!=null?n:o}const S=ye?window:void 0;function T(...t){let n,o,l,a;if(typeof t[0]=="string"||Array.isArray(t[0])?([o,l,a]=t,n=S):[n,o,l,a]=t,!n)return Ee;Array.isArray(o)||(o=[o]),Array.isArray(l)||(l=[l]);const i=[],s=()=>{i.forEach(u=>u()),i.length=0},r=(u,f,h,g)=>(u.addEventListener(f,h,g),()=>u.removeEventListener(f,h,g)),d=e.watch(()=>[A(n),x(a)],([u,f])=>{if(s(),!u)return;const h=ke(f)?{...f}:f;i.push(...o.flatMap(g=>l.map(k=>r(u,g,k,h))))},{immediate:!0,flush:"post"}),c=()=>{d(),s()};return he(c),c}function _e(t={}){var n;const{window:o=S,deep:l=!0}=t,a=(n=t.document)!=null?n:o==null?void 0:o.document,i=()=>{var d;let c=a==null?void 0:a.activeElement;if(l)for(;c!=null&&c.shadowRoot;)c=(d=c==null?void 0:c.shadowRoot)==null?void 0:d.activeElement;return c},s=e.ref(),r=()=>{s.value=i()};return o&&(T(o,"blur",d=>{d.relatedTarget===null&&r()},!0),T(o,"focus",r,!0)),r(),s}function we(t,n={}){const o=_e(n),l=e.computed(()=>A(t));return{focused:e.computed(()=>l.value&&o.value?l.value.contains(o.value):!1)}}function be(t,{window:n=S,scrollTarget:o}={}){const l=e.ref(!1),a=()=>{if(!n)return;const i=n.document,s=A(t);if(!s)l.value=!1;else{const r=s.getBoundingClientRect();l.value=r.top<=(n.innerHeight||i.documentElement.clientHeight)&&r.left<=(n.innerWidth||i.documentElement.clientWidth)&&r.bottom>=0&&r.right>=0}};return e.watch(()=>A(t),()=>a(),{immediate:!0,flush:"post"}),n&&T(o||n,"scroll",a,{capture:!1,passive:!0}),l}const b=t=>{let n=be(t).value;return n=n&&t.offsetHeight>0,n},D=t=>t.tabIndex>=0,R=t=>{const n=t.target;return L(n)},L=t=>{var n;let o;if(t instanceof HTMLTableCellElement){const l=(n=t.parentElement)==null?void 0:n.previousElementSibling;if(l){const a=Array.from(l.children)[t.cellIndex];a&&(o=a)}}else if(t instanceof HTMLTableRowElement){const l=t.previousElementSibling;l&&(o=l)}return o&&(!D(o)||!b(o))?L(o):o},De=t=>{var n;const o=t.target;let l;if(o instanceof HTMLTableCellElement){const a=(n=o.parentElement)==null?void 0:n.parentElement;if(a){const i=a.firstElementChild.children[o.cellIndex];i&&(l=i)}}else if(o instanceof HTMLTableRowElement){const a=o.parentElement;if(a){const i=a.firstElementChild;i&&(l=i)}}return l&&(!D(l)||!b(l))?$(l):l},U=t=>{const n=t.target;return $(n)},$=t=>{var n;let o;if(t instanceof HTMLTableCellElement){const l=(n=t.parentElement)==null?void 0:n.nextElementSibling;if(l){const a=Array.from(l.children)[t.cellIndex];a&&(o=a)}}else if(t instanceof HTMLTableRowElement){const l=t.nextElementSibling;l&&(o=l)}return o&&(!D(o)||!b(o))?$(o):o},Me=t=>{var n;const o=t.target;let l;if(o instanceof HTMLTableCellElement){const a=(n=o.parentElement)==null?void 0:n.parentElement;if(a){const i=a.lastElementChild.children[o.cellIndex];i&&(l=i)}}else if(o instanceof HTMLTableRowElement){const a=o.parentElement;if(a){const i=a.lastElementChild;i&&(l=i)}}return l&&(!D(l)||!b(l))?L(l):l},O=t=>{const n=t.target;return N(n)},N=t=>{var n;let o;if(t.previousElementSibling)o=t.previousElementSibling;else{const l=(n=t.parentElement)==null?void 0:n.previousElementSibling;o=l==null?void 0:l.lastElementChild}return o&&(!D(o)||!b(o))?N(o):o},K=t=>{const n=t.target;return v(n)},v=t=>{var n;let o;if(t.nextElementSibling)o=t.nextElementSibling;else{const l=(n=t.parentElement)==null?void 0:n.nextElementSibling;o=l==null?void 0:l.firstElementChild}return o&&(!D(o)||!b(o))?v(o):o},W=t=>{const n=t.target.parentElement.firstElementChild;return n&&(!D(n)||!b(n))?v(n):n},Y=t=>{const n=t.target.parentElement.lastElementChild;return n&&(!D(n)||!b(n))?N(n):n},B=["alt","control","shift","meta"],Ve={ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right"},z={"keydown.up":t=>{const n=R(t);n&&(t.preventDefault(),t.stopPropagation(),n.focus())},"keydown.down":t=>{const n=U(t);n&&(t.preventDefault(),t.stopPropagation(),n.focus())},"keydown.left":t=>{const n=O(t);t.preventDefault(),t.stopPropagation(),n&&n.focus()},"keydown.right":t=>{const n=K(t);t.preventDefault(),t.stopPropagation(),n&&n.focus()},"keydown.control.up":t=>{const n=De(t);n&&(t.preventDefault(),t.stopPropagation(),n.focus())},"keydown.control.down":t=>{const n=Me(t);n&&(t.preventDefault(),t.stopPropagation(),n.focus())},"keydown.control.left":t=>{const n=W(t);n&&(t.preventDefault(),t.stopPropagation(),n.focus())},"keydown.control.right":t=>{const n=Y(t);n&&(t.preventDefault(),t.stopPropagation(),n.focus())},"keydown.end":t=>{const n=Y(t);n&&(t.preventDefault(),t.stopPropagation(),n.focus())},"keydown.enter":t=>{if(t.target instanceof HTMLTableCellElement){t.preventDefault(),t.stopPropagation();const n=U(t);n&&n.focus()}},"keydown.shift.enter":t=>{if(t.target instanceof HTMLTableCellElement){t.preventDefault(),t.stopPropagation();const n=R(t);n&&n.focus()}},"keydown.home":t=>{const n=W(t);n&&(t.preventDefault(),t.stopPropagation(),n.focus())},"keydown.tab":t=>{const n=K(t);n&&(t.preventDefault(),t.stopPropagation(),n.focus())},"keydown.shift.tab":t=>{const n=O(t);n&&(t.preventDefault(),t.stopPropagation(),n.focus())}};function Ce(t){const n=s=>{let r=null;return s.parent&&(typeof s.parent=="string"?r=document.querySelector(s.parent):s.parent instanceof HTMLElement?r=s.parent:r=s.parent.value),r},o=s=>{const r=n(s);let d=[];if(typeof s.selectors=="string")d=r?Array.from(r.querySelectorAll(s.selectors)):Array.from(document.querySelectorAll(s.selectors));else if(Array.isArray(s.selectors))for(const c of s.selectors)c instanceof HTMLElement?d.push(c):d.push(c.$el);else if(s.selectors instanceof HTMLElement)d.push(s.selectors);else if(Array.isArray(s.selectors.value))for(const c of s.selectors.value)c instanceof HTMLElement?d.push(c):d.push(c.$el);else d.push(s.selectors.value);return d},l=s=>{const r=n(s);let d=[];return s.selectors?d=o(s):r&&(d=Array.from(r.children).filter(c=>D(c)&&b(c))),d},a=s=>r=>{const d=Ve[r.key]||r.key.toLowerCase();if(B.includes(d))return;const c=s.handlers||z;for(const u of Object.keys(c)){const[f,...h]=u.split(".");if(f==="keydown"&&h.includes(d)){const g=c[u],k=h.filter(_=>B.includes(_)),M=B.some(_=>{const V=_.charAt(0).toUpperCase()+_.slice(1);return r.getModifierState(V)});if(k.length>0){if(M){for(const _ of B)if(h.includes(_)){const V=_.charAt(0).toUpperCase()+_.slice(1);r.getModifierState(V)&&g(r)}}}else M||g(r)}}},i=[];e.onMounted(()=>{for(const s of t){const r=n(s),d=l(s),c=a(s),u=r?[r]:d;for(const f of u){const{focused:h}=we(e.ref(f)),g=e.watch(h,k=>{k?f.addEventListener("keydown",c):f.removeEventListener("keydown",c)});i.push(g)}}}),e.onBeforeUnmount(()=>{for(const s of i)s()})}const Ae={colspan:"5",tabindex:-1},Be=e.createElementVNode("tr",{class:"days-header"},[e.createElementVNode("td",null,"M"),e.createElementVNode("td",null,"T"),e.createElementVNode("td",null,"W"),e.createElementVNode("td",null,"T"),e.createElementVNode("td",null,"F"),e.createElementVNode("td",null,"S"),e.createElementVNode("td",null,"S")],-1),Se=["onClick","onKeydown"],Te=6,j=7,G=e.defineComponent({__name:"ADatePicker",props:{modelValue:{default:new Date},modelModifiers:{}},emits:["update:modelValue"],setup(t){const n=e.useModel(t,"modelValue"),o=e.ref(new Date(n.value)),l=e.ref(o.value.getMonth()),a=e.ref(o.value.getFullYear()),i=e.ref([]),s=e.ref(null);e.onMounted(async()=>{r(),await e.nextTick();const m=document.getElementsByClassName("selectedDate");if(m.length>0)m[0].focus();else{const y=document.getElementsByClassName("todaysDate");y.length>0&&y[0].focus()}});const r=()=>{i.value=[];const m=new Date(a.value,l.value,1),y=m.getDay(),E=m.setDate(m.getDate()-y);for(const w of Array(43).keys())i.value.push(E+w*864e5)};e.watch([l,a],r);const d=()=>a.value-=1,c=()=>a.value+=1,u=()=>{l.value==0?(l.value=11,d()):l.value-=1},f=()=>{l.value==11?(l.value=0,c()):l.value+=1},h=m=>{const y=new Date;if(l.value===y.getMonth())return y.toDateString()===new Date(m).toDateString()},g=m=>new Date(m).toDateString()===new Date(o.value).toDateString(),k=(m,y)=>(m-1)*j+y,M=(m,y)=>i.value[k(m,y)],_=m=>{n.value=o.value=new Date(i.value[m])},V=e.computed(()=>new Date(a.value,l.value,1).toLocaleDateString(void 0,{year:"numeric",month:"long"}));return Ce([{parent:s,selectors:"td",handlers:{...z,"keydown.pageup":u,"keydown.shift.pageup":d,"keydown.pagedown":f,"keydown.shift.pagedown":c,"keydown.enter":()=>{}}}]),(m,y)=>(e.openBlock(),e.createElementBlock("div",{class:"adatepicker",tabindex:"0",ref_key:"adatepicker",ref:s},[e.createElementVNode("table",null,[e.createElementVNode("tr",null,[e.createElementVNode("td",{id:"previous-month-btn",onClick:u,tabindex:-1},"<"),e.createElementVNode("th",Ae,e.toDisplayString(V.value),1),e.createElementVNode("td",{id:"next-month-btn",onClick:f,tabindex:-1},">")]),Be,(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(Te,E=>e.createElementVNode("tr",{key:E},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(j,w=>e.createElementVNode("td",{ref_for:!0,ref:"celldate",key:k(E,w),contenteditable:!1,spellcheck:!1,tabindex:0,onClick:e.withModifiers(ee=>_(k(E,w)),["prevent","stop"]),onKeydown:e.withKeys(ee=>_(k(E,w)),["enter"]),class:e.normalizeClass({todaysDate:h(M(E,w)),selectedDate:g(M(E,w))})},e.toDisplayString(new Date(M(E,w)).getDate()),43,Se)),64))])),64))])],512))}}),Le=C(e.defineComponent({__name:"CollapseButton",props:{collapsed:{type:Boolean}},setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["collapse-button",n.collapsed?"rotated":"unrotated"])},"×",2))}}),[["__scopeId","data-v-6f1c1b45"]]),$e={class:"aform"},H=C(e.defineComponent({__name:"AForm",props:{modelValue:{},data:{},readonly:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:n}){const o=t,l=n,a=e.ref(o.data||{}),i=r=>{let d={};for(const[c,u]of Object.entries(r))["component","fieldtype"].includes(c)||(d[c]=u),c==="rows"&&u&&u.length===0&&(d.rows=a.value[r.fieldname]);return d},s=e.computed({get:()=>o.modelValue.map((r,d)=>e.computed({get(){return r.value},set:c=>{o.modelValue[d].value=c,l("update:modelValue",o.modelValue)}})),set:()=>{}});return(r,d)=>(e.openBlock(),e.createElementBlock("form",$e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.modelValue,(c,u)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.component),e.mergeProps({key:u,schema:c,modelValue:s.value[u].value,"onUpdate:modelValue":f=>s.value[u].value=f,data:a.value[c.fieldname],readonly:r.readonly},i(c)),null,16,["schema","modelValue","onUpdate:modelValue","data","readonly"]))),128))]))}}),[["__scopeId","data-v-88047a70"]]),J=C(e.defineComponent({__name:"AFieldset",props:{schema:{},label:{},collapsible:{type:Boolean},data:{}},setup(t){const n=t,o=e.ref(n.data||[]),l=e.ref(!1),a=e.ref(n.collapsible),i=e.ref(n.schema);function s(r){r.preventDefault(),a.value&&(l.value=!l.value)}return(r,d)=>(e.openBlock(),e.createElementBlock("fieldset",null,[e.createElementVNode("legend",{onClick:s,onSubmit:s},[e.createTextVNode(e.toDisplayString(r.label)+" ",1),a.value?(e.openBlock(),e.createBlock(Le,{key:0,collapsed:l.value},null,8,["collapsed"])):e.createCommentVNode("",!0)],32),e.renderSlot(r.$slots,"default",{collapsed:l.value},()=>[e.withDirectives(e.createVNode(H,{modelValue:i.value,"onUpdate:modelValue":d[0]||(d[0]=c=>i.value=c),data:o.value},null,8,["modelValue","data"]),[[e.vShow,!l.value]])],!0)]))}}),[["__scopeId","data-v-0f671e32"]]),Ne={class:"aform__form-element"},ve=["for"],He=["id","disabled","required"],Ie=["innerHTML"],Q=e.defineComponent({__name:"ANumericInput",props:e.mergeModels({label:{},required:{type:Boolean},readonly:{type:Boolean},uuid:{},validation:{default:()=>({errorMessage:" "})}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const n=e.useModel(t,"modelValue");return(o,l)=>(e.openBlock(),e.createElementBlock("div",Ne,[e.createElementVNode("label",{class:"aform__field-label",for:o.uuid},e.toDisplayString(o.label),9,ve),e.withDirectives(e.createElementVNode("input",{class:"aform__input-field","onUpdate:modelValue":l[0]||(l[0]=a=>n.value=a),type:"number",id:o.uuid,disabled:o.readonly,required:o.required},null,8,He),[[e.vModelText,n.value]]),e.withDirectives(e.createElementVNode("p",{class:"error",innerHTML:o.validation.errorMessage},null,8,Ie),[[e.vShow,o.validation.errorMessage]])]))}}),X={date:"##/##/####",datetime:"####/##/## ##:##",time:"##:##",fulltime:"##:##:##",phone:"(###) ### - ####",card:"#### #### #### ####"};function Pe(t){try{return Function(`"use strict";return (${t})`)()}catch{}}function Fe(t){var o;let n=t.value;if(n){const l=Pe(n);if(l){const a=t.instance.locale;n=l(a)}}else{const l=t.instance.schema,a=(o=l==null?void 0:l.fieldtype)==null?void 0:o.toLowerCase();a&&X[a]&&(n=X[a])}return n}function qe(t,n){n||(n="#");let o=t;const l=[n,"/","-","(",")"," "];for(const a of l)o=o.replaceAll(a,"");return o}function xe(t,n,o){o||(o="#");let l=n;for(const a of t){const i=l.indexOf(o);if(i!==-1){const s=l.substring(0,i),r=l.substring(i+1);l=s+a+r}}return l.slice(0,n.length)}function Re(t,n){const o=Fe(n);if(!o)return;const l="#",a=t.value,i=qe(a,l);if(i){const s=xe(i,o,l);n.instance.maskFilled&&(n.instance.maskFilled=!s.includes(l)),t.value=s}else t.value=o}const Ue={class:"aform__form-element"},Oe=["for"],Ke=["id","disabled","maxlength","required"],We=["innerHTML"],Z=e.defineComponent({__name:"ATextInput",props:e.mergeModels({schema:{},label:{},mask:{},required:{type:Boolean},readonly:{type:Boolean},uuid:{},validation:{default:()=>({errorMessage:" "})}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const n=e.ref(!0),o=e.useModel(t,"modelValue");return(l,a)=>(e.openBlock(),e.createElementBlock("div",Ue,[e.createElementVNode("label",{class:"aform__field-label",for:l.uuid},e.toDisplayString(l.label),9,Oe),e.withDirectives(e.createElementVNode("input",{class:"aform__input-field","onUpdate:modelValue":a[0]||(a[0]=i=>o.value=i),id:l.uuid,disabled:l.readonly,maxlength:l.mask?n.value&&l.mask.length:void 0,required:l.required},null,8,Ke),[[e.vModelText,o.value],[e.unref(Re),l.mask]]),e.withDirectives(e.createElementVNode("p",{class:"error",innerHTML:l.validation.errorMessage},null,8,We),[[e.vShow,l.validation.errorMessage]])]))}});function Ye(t){t.component("ACheckbox",I),t.component("ACombobox",P),t.component("ADate",F),t.component("ADropdown",q),t.component("ADatePicker",G),t.component("AFieldset",J),t.component("AForm",H),t.component("ANumericInput",Q),t.component("ATextInput",Z)}p.ACheckbox=I,p.AComboBox=P,p.ADate=F,p.ADatePicker=G,p.ADropdown=q,p.AFieldset=J,p.AForm=H,p.ANumericInput=Q,p.ATextInput=Z,p.install=Ye,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(g,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(g=typeof globalThis<"u"?globalThis:g||self,e(g["@stonecrop/aform"]={},g.Vue))})(this,function(g,e){"use strict";const ne={class:"aform__form-element"},oe=["for"],le={class:"aform__checkbox-container aform__input-field"},ae=["id","readonly","required"],re=["innerHTML"],F=e.defineComponent({__name:"ACheckbox",props:e.mergeModels({label:{},required:{type:Boolean},readOnly:{type:Boolean},uuid:{},validation:{default:()=>({errorMessage:" "})}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const n=e.useModel(t,"modelValue");return(o,l)=>(e.openBlock(),e.createElementBlock("div",ne,[e.createElementVNode("label",{class:"aform__field-label",for:o.uuid},e.toDisplayString(o.label),9,oe),e.createElementVNode("span",le,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":l[0]||(l[0]=a=>n.value=a),type:"checkbox",id:o.uuid,class:"aform__checkbox",readonly:o.readOnly,required:o.required},null,8,ae),[[e.vModelCheckbox,n.value]])]),e.withDirectives(e.createElementVNode("p",{class:"error",innerHTML:o.validation.errorMessage},null,8,re),[[e.vShow,o.validation.errorMessage]])]))}}),se=e.createElementVNode("div",null,[e.createElementVNode("input",{type:"text"}),e.createElementVNode("input",{type:"text"}),e.createElementVNode("input",{type:"text"})],-1),P=e.defineComponent({__name:"AComboBox",props:["event","cellData","tableID"],setup(t){return(n,o)=>{const l=e.resolveComponent("ATableModal");return e.openBlock(),e.createBlock(l,{event:t.event,cellData:t.cellData,class:"amodal"},{default:e.withCtx(()=>[se]),_:1},8,["event","cellData"])}}}),ie=["id","disabled","required","value"],ce=["for"],de=["innerHTML"],me=e.defineComponent({__name:"ADate",props:e.mergeModels({label:{default:"Date"},required:{type:Boolean},readonly:{type:Boolean},uuid:{},validation:{default:()=>({errorMessage:" "})}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const n=e.useModel(t,"modelValue"),o=e.ref(null),l=()=>{o.value&&"showPicker"in HTMLInputElement.prototype&&o.value.showPicker()};return(a,r)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("input",{ref_key:"dateRef",ref:o,type:"date",id:a.uuid,disabled:a.readonly,required:a.required,value:n.value,onClick:l},null,8,ie),e.createElementVNode("label",{for:a.uuid},e.toDisplayString(a.label),9,ce),e.withDirectives(e.createElementVNode("p",{innerHTML:a.validation.errorMessage},null,8,de),[[e.vShow,a.validation.errorMessage]])]))}}),A=(t,n)=>{const o=t.__vccOpts||t;for(const[l,a]of n)o[l]=a;return o},x=A(me,[["__scopeId","data-v-69d0f23d"]]),ue={class:"input-wrapper"},fe={id:"autocomplete-results",class:"autocomplete-results"},pe={key:0,class:"loading autocomplete-result"},he=["onClick"],q=e.defineComponent({__name:"ADropdown",props:e.mergeModels({label:{},items:{},isAsync:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["filterChanged"],["update:modelValue"]),setup(t,{emit:n}){const o=t,l=n,a=e.ref(o.items),r=e.useModel(t,"modelValue"),i=e.ref(!1),s=e.ref(0),d=e.ref(!1),c=e.ref(null);e.onMounted(()=>{document.addEventListener("click",h),u()}),e.onUnmounted(()=>{document.removeEventListener("click",h)});const m=f=>{r.value=f,y()},u=()=>{r.value?a.value=o.items.filter(f=>f.toLowerCase().indexOf(r.value.toLowerCase())>-1):a.value=o.items},p=()=>{d.value=!0,o.isAsync?(i.value=!0,l("filterChanged",r.value)):u()},h=()=>{y(),s.value=0},y=()=>{d.value=!1,o.items.includes(r.value)||(r.value="")},V=()=>{s.value<a.value.length&&(s.value=s.value+1)},k=()=>{s.value>0&&(s.value=s.value-1)},M=()=>{r.value=a.value[s.value],y(),s.value=0};return(f,_)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["autocomplete",{isOpen:d.value}])},[e.createElementVNode("div",ue,[e.withDirectives(e.createElementVNode("input",{ref_key:"mopInput",ref:c,type:"text",onInput:p,onFocus:p,"onUpdate:modelValue":_[0]||(_[0]=E=>r.value=E),onKeydown:[e.withKeys(V,["down"]),e.withKeys(k,["up"]),e.withKeys(M,["enter"])]},null,544),[[e.vModelText,r.value]]),e.withDirectives(e.createElementVNode("ul",fe,[i.value?(e.openBlock(),e.createElementBlock("li",pe,"Loading results...")):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(a.value,(E,b)=>(e.openBlock(),e.createElementBlock("li",{key:b,onClick:te=>m(E),class:e.normalizeClass(["autocomplete-result",{"is-active":b===s.value}])},e.toDisplayString(E),11,he))),128))],512),[[e.vShow,d.value]]),e.createElementVNode("label",null,e.toDisplayString(f.label),1)])],2))}});function R(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}function T(t){return typeof t=="function"?t():e.unref(t)}const ge=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const _e=t=>t!=null,ye=Object.prototype.toString,Ee=t=>ye.call(t)==="[object Object]",ke=()=>{};function C(t){var n;const o=T(t);return(n=o==null?void 0:o.$el)!=null?n:o}const S=ge?window:void 0;function N(...t){let n,o,l,a;if(typeof t[0]=="string"||Array.isArray(t[0])?([o,l,a]=t,n=S):[n,o,l,a]=t,!n)return ke;Array.isArray(o)||(o=[o]),Array.isArray(l)||(l=[l]);const r=[],i=()=>{r.forEach(m=>m()),r.length=0},s=(m,u,p,h)=>(m.addEventListener(u,p,h),()=>m.removeEventListener(u,p,h)),d=e.watch(()=>[C(n),T(a)],([m,u])=>{if(i(),!m)return;const p=Ee(u)?{...u}:u;r.push(...o.flatMap(h=>l.map(y=>s(m,h,y,p))))},{immediate:!0,flush:"post"}),c=()=>{d(),i()};return R(c),c}function be(){const t=e.ref(!1),n=e.getCurrentInstance();return n&&e.onMounted(()=>{t.value=!0},n),t}function we(t){const n=be();return e.computed(()=>(n.value,!!t()))}function De(t,n,o={}){const{window:l=S,...a}=o;let r;const i=we(()=>l&&"MutationObserver"in l),s=()=>{r&&(r.disconnect(),r=void 0)},d=e.computed(()=>{const p=T(t),h=(Array.isArray(p)?p:[p]).map(C).filter(_e);return new Set(h)}),c=e.watch(()=>d.value,p=>{s(),i.value&&p.size&&(r=new MutationObserver(n),p.forEach(h=>r.observe(h,a)))},{immediate:!0,flush:"post"}),m=()=>r==null?void 0:r.takeRecords(),u=()=>{s(),c()};return R(u),{isSupported:i,stop:u,takeRecords:m}}function Ve(t={}){var n;const{window:o=S,deep:l=!0,triggerOnRemoval:a=!1}=t,r=(n=t.document)!=null?n:o==null?void 0:o.document,i=()=>{var c;let m=r==null?void 0:r.activeElement;if(l)for(;m!=null&&m.shadowRoot;)m=(c=m==null?void 0:m.shadowRoot)==null?void 0:c.activeElement;return m},s=e.ref(),d=()=>{s.value=i()};return o&&(N(o,"blur",c=>{c.relatedTarget===null&&d()},!0),N(o,"focus",d,!0)),a&&De(r,c=>{c.filter(m=>m.removedNodes.length).map(m=>Array.from(m.removedNodes)).flat().forEach(m=>{m===s.value&&d()})},{childList:!0,subtree:!0}),d(),s}function Me(t,n={}){const o=Ve(n),l=e.computed(()=>C(t));return{focused:e.computed(()=>l.value&&o.value?l.value.contains(o.value):!1)}}function Ce(t,{window:n=S,scrollTarget:o}={}){const l=e.ref(!1),a=()=>{if(!n)return;const r=n.document,i=C(t);if(!i)l.value=!1;else{const s=i.getBoundingClientRect();l.value=s.top<=(n.innerHeight||r.documentElement.clientHeight)&&s.left<=(n.innerWidth||r.documentElement.clientWidth)&&s.bottom>=0&&s.right>=0}};return e.watch(()=>C(t),()=>a(),{immediate:!0,flush:"post"}),n&&N(o||n,"scroll",a,{capture:!1,passive:!0}),l}const w=t=>{let n=Ce(t).value;return n=n&&t.offsetHeight>0,n},D=t=>t.tabIndex>=0,O=t=>{const n=t.target;return L(n)},L=t=>{var n;let o;if(t instanceof HTMLTableCellElement){const l=(n=t.parentElement)==null?void 0:n.previousElementSibling;if(l){const a=Array.from(l.children)[t.cellIndex];a&&(o=a)}}else if(t instanceof HTMLTableRowElement){const l=t.previousElementSibling;l&&(o=l)}return o&&(!D(o)||!w(o))?L(o):o},Ae=t=>{var n;const o=t.target;let l;if(o instanceof HTMLTableCellElement){const a=(n=o.parentElement)==null?void 0:n.parentElement;if(a){const r=a.firstElementChild.children[o.cellIndex];r&&(l=r)}}else if(o instanceof HTMLTableRowElement){const a=o.parentElement;if(a){const r=a.firstElementChild;r&&(l=r)}}return l&&(!D(l)||!w(l))?$(l):l},U=t=>{const n=t.target;return $(n)},$=t=>{var n;let o;if(t instanceof HTMLTableCellElement){const l=(n=t.parentElement)==null?void 0:n.nextElementSibling;if(l){const a=Array.from(l.children)[t.cellIndex];a&&(o=a)}}else if(t instanceof HTMLTableRowElement){const l=t.nextElementSibling;l&&(o=l)}return o&&(!D(o)||!w(o))?$(o):o},Se=t=>{var n;const o=t.target;let l;if(o instanceof HTMLTableCellElement){const a=(n=o.parentElement)==null?void 0:n.parentElement;if(a){const r=a.lastElementChild.children[o.cellIndex];r&&(l=r)}}else if(o instanceof HTMLTableRowElement){const a=o.parentElement;if(a){const r=a.lastElementChild;r&&(l=r)}}return l&&(!D(l)||!w(l))?L(l):l},K=t=>{const n=t.target;return v(n)},v=t=>{var n;let o;if(t.previousElementSibling)o=t.previousElementSibling;else{const l=(n=t.parentElement)==null?void 0:n.previousElementSibling;o=l==null?void 0:l.lastElementChild}return o&&(!D(o)||!w(o))?v(o):o},z=t=>{const n=t.target;return H(n)},H=t=>{var n;let o;if(t.nextElementSibling)o=t.nextElementSibling;else{const l=(n=t.parentElement)==null?void 0:n.nextElementSibling;o=l==null?void 0:l.firstElementChild}return o&&(!D(o)||!w(o))?H(o):o},W=t=>{const n=t.target.parentElement.firstElementChild;return n&&(!D(n)||!w(n))?H(n):n},Y=t=>{const n=t.target.parentElement.lastElementChild;return n&&(!D(n)||!w(n))?v(n):n},B=["alt","control","shift","meta"],Be={ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right"},j={"keydown.up":t=>{const n=O(t);n&&(t.preventDefault(),t.stopPropagation(),n.focus())},"keydown.down":t=>{const n=U(t);n&&(t.preventDefault(),t.stopPropagation(),n.focus())},"keydown.left":t=>{const n=K(t);t.preventDefault(),t.stopPropagation(),n&&n.focus()},"keydown.right":t=>{const n=z(t);t.preventDefault(),t.stopPropagation(),n&&n.focus()},"keydown.control.up":t=>{const n=Ae(t);n&&(t.preventDefault(),t.stopPropagation(),n.focus())},"keydown.control.down":t=>{const n=Se(t);n&&(t.preventDefault(),t.stopPropagation(),n.focus())},"keydown.control.left":t=>{const n=W(t);n&&(t.preventDefault(),t.stopPropagation(),n.focus())},"keydown.control.right":t=>{const n=Y(t);n&&(t.preventDefault(),t.stopPropagation(),n.focus())},"keydown.end":t=>{const n=Y(t);n&&(t.preventDefault(),t.stopPropagation(),n.focus())},"keydown.enter":t=>{if(t.target instanceof HTMLTableCellElement){t.preventDefault(),t.stopPropagation();const n=U(t);n&&n.focus()}},"keydown.shift.enter":t=>{if(t.target instanceof HTMLTableCellElement){t.preventDefault(),t.stopPropagation();const n=O(t);n&&n.focus()}},"keydown.home":t=>{const n=W(t);n&&(t.preventDefault(),t.stopPropagation(),n.focus())},"keydown.tab":t=>{const n=z(t);n&&(t.preventDefault(),t.stopPropagation(),n.focus())},"keydown.shift.tab":t=>{const n=K(t);n&&(t.preventDefault(),t.stopPropagation(),n.focus())}};function Te(t){const n=i=>{let s=null;return i.parent&&(typeof i.parent=="string"?s=document.querySelector(i.parent):i.parent instanceof HTMLElement?s=i.parent:s=i.parent.value),s},o=i=>{const s=n(i);let d=[];if(typeof i.selectors=="string")d=s?Array.from(s.querySelectorAll(i.selectors)):Array.from(document.querySelectorAll(i.selectors));else if(Array.isArray(i.selectors))for(const c of i.selectors)c instanceof HTMLElement?d.push(c):d.push(c.$el);else if(i.selectors instanceof HTMLElement)d.push(i.selectors);else if(Array.isArray(i.selectors.value))for(const c of i.selectors.value)c instanceof HTMLElement?d.push(c):d.push(c.$el);else d.push(i.selectors.value);return d},l=i=>{const s=n(i);let d=[];return i.selectors?d=o(i):s&&(d=Array.from(s.children).filter(c=>D(c)&&w(c))),d},a=i=>s=>{const d=Be[s.key]||s.key.toLowerCase();if(B.includes(d))return;const c=i.handlers||j;for(const m of Object.keys(c)){const[u,...p]=m.split(".");if(u==="keydown"&&p.includes(d)){const h=c[m],y=p.filter(k=>B.includes(k)),V=B.some(k=>{const M=k.charAt(0).toUpperCase()+k.slice(1);return s.getModifierState(M)});if(y.length>0){if(V){for(const k of B)if(p.includes(k)){const M=k.charAt(0).toUpperCase()+k.slice(1);s.getModifierState(M)&&h(s)}}}else V||h(s)}}},r=[];e.onMounted(()=>{for(const i of t){const s=n(i),d=l(i),c=a(i),m=s?[s]:d;for(const u of m){const{focused:p}=Me(e.ref(u)),h=e.watch(p,y=>{y?u.addEventListener("keydown",c):u.removeEventListener("keydown",c)});r.push(h)}}}),e.onBeforeUnmount(()=>{for(const i of r)i()})}const Ne={colspan:"5",tabindex:-1},Le=e.createElementVNode("tr",{class:"days-header"},[e.createElementVNode("td",null,"M"),e.createElementVNode("td",null,"T"),e.createElementVNode("td",null,"W"),e.createElementVNode("td",null,"T"),e.createElementVNode("td",null,"F"),e.createElementVNode("td",null,"S"),e.createElementVNode("td",null,"S")],-1),$e=["onClick","onKeydown"],ve=6,G=7,J=e.defineComponent({__name:"ADatePicker",props:{modelValue:{default:new Date},modelModifiers:{}},emits:["update:modelValue"],setup(t){const n=e.useModel(t,"modelValue"),o=e.ref(new Date(n.value)),l=e.ref(o.value.getMonth()),a=e.ref(o.value.getFullYear()),r=e.ref([]),i=e.ref(null);e.onMounted(async()=>{s(),await e.nextTick();const f=document.getElementsByClassName("selectedDate");if(f.length>0)f[0].focus();else{const _=document.getElementsByClassName("todaysDate");_.length>0&&_[0].focus()}});const s=()=>{r.value=[];const f=new Date(a.value,l.value,1),_=f.getDay(),E=f.setDate(f.getDate()-_);for(const b of Array(43).keys())r.value.push(E+b*864e5)};e.watch([l,a],s);const d=()=>a.value-=1,c=()=>a.value+=1,m=()=>{l.value==0?(l.value=11,d()):l.value-=1},u=()=>{l.value==11?(l.value=0,c()):l.value+=1},p=f=>{const _=new Date;if(l.value===_.getMonth())return _.toDateString()===new Date(f).toDateString()},h=f=>new Date(f).toDateString()===new Date(o.value).toDateString(),y=(f,_)=>(f-1)*G+_,V=(f,_)=>r.value[y(f,_)],k=f=>{n.value=o.value=new Date(r.value[f])},M=e.computed(()=>new Date(a.value,l.value,1).toLocaleDateString(void 0,{year:"numeric",month:"long"}));return Te([{parent:i,selectors:"td",handlers:{...j,"keydown.pageup":m,"keydown.shift.pageup":d,"keydown.pagedown":u,"keydown.shift.pagedown":c,"keydown.enter":()=>{}}}]),(f,_)=>(e.openBlock(),e.createElementBlock("div",{class:"adatepicker",tabindex:"0",ref_key:"adatepicker",ref:i},[e.createElementVNode("table",null,[e.createElementVNode("tr",null,[e.createElementVNode("td",{id:"previous-month-btn",onClick:m,tabindex:-1},"<"),e.createElementVNode("th",Ne,e.toDisplayString(M.value),1),e.createElementVNode("td",{id:"next-month-btn",onClick:u,tabindex:-1},">")]),Le,(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(ve,E=>e.createElementVNode("tr",{key:E},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(G,b=>e.createElementVNode("td",{ref_for:!0,ref:"celldate",key:y(E,b),contenteditable:!1,spellcheck:!1,tabindex:0,onClick:e.withModifiers(te=>k(y(E,b)),["prevent","stop"]),onKeydown:e.withKeys(te=>k(y(E,b)),["enter"]),class:e.normalizeClass({todaysDate:p(V(E,b)),selectedDate:h(V(E,b))})},e.toDisplayString(new Date(V(E,b)).getDate()),43,$e)),64))])),64))])],512))}}),He=A(e.defineComponent({__name:"CollapseButton",props:{collapsed:{type:Boolean}},setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["collapse-button",n.collapsed?"rotated":"unrotated"])},"×",2))}}),[["__scopeId","data-v-6f1c1b45"]]),Ie={class:"aform"},I=A(e.defineComponent({__name:"AForm",props:{modelValue:{},data:{},readonly:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:n}){const o=t,l=n,a=e.ref(o.data||{}),r=s=>{let d={};for(const[c,m]of Object.entries(s))["component","fieldtype"].includes(c)||(d[c]=m),c==="rows"&&m&&m.length===0&&(d.rows=a.value[s.fieldname]);return d},i=e.computed({get:()=>o.modelValue.map((s,d)=>e.computed({get(){return s.value},set:c=>{o.modelValue[d].value=c,l("update:modelValue",o.modelValue)}})),set:()=>{}});return(s,d)=>(e.openBlock(),e.createElementBlock("form",Ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.modelValue,(c,m)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.component),e.mergeProps({key:m,schema:c,modelValue:i.value[m].value,"onUpdate:modelValue":u=>i.value[m].value=u,data:a.value[c.fieldname],readonly:s.readonly,ref_for:!0},r(c)),null,16,["schema","modelValue","onUpdate:modelValue","data","readonly"]))),128))]))}}),[["__scopeId","data-v-dc1a868d"]]),Q=A(e.defineComponent({__name:"AFieldset",props:{schema:{},label:{},collapsible:{type:Boolean},data:{}},setup(t){const n=t,o=e.ref(n.data||[]),l=e.ref(!1),a=e.ref(n.collapsible),r=e.ref(n.schema);function i(s){s.preventDefault(),a.value&&(l.value=!l.value)}return(s,d)=>(e.openBlock(),e.createElementBlock("fieldset",null,[e.createElementVNode("legend",{onClick:i,onSubmit:i},[e.createTextVNode(e.toDisplayString(s.label)+" ",1),a.value?(e.openBlock(),e.createBlock(He,{key:0,collapsed:l.value},null,8,["collapsed"])):e.createCommentVNode("",!0)],32),e.renderSlot(s.$slots,"default",{collapsed:l.value},()=>[e.withDirectives(e.createVNode(I,{modelValue:r.value,"onUpdate:modelValue":d[0]||(d[0]=c=>r.value=c),data:o.value},null,8,["modelValue","data"]),[[e.vShow,!l.value]])],!0)]))}}),[["__scopeId","data-v-b89db0c0"]]),Fe={class:"aform__form-element"},Pe=["for"],xe=["id","disabled","required"],qe=["innerHTML"],X=e.defineComponent({__name:"ANumericInput",props:e.mergeModels({label:{},required:{type:Boolean},readonly:{type:Boolean},uuid:{},validation:{default:()=>({errorMessage:" "})}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const n=e.useModel(t,"modelValue");return(o,l)=>(e.openBlock(),e.createElementBlock("div",Fe,[e.createElementVNode("label",{class:"aform__field-label",for:o.uuid},e.toDisplayString(o.label),9,Pe),e.withDirectives(e.createElementVNode("input",{class:"aform__input-field","onUpdate:modelValue":l[0]||(l[0]=a=>n.value=a),type:"number",id:o.uuid,disabled:o.readonly,required:o.required},null,8,xe),[[e.vModelText,n.value]]),e.withDirectives(e.createElementVNode("p",{class:"error",innerHTML:o.validation.errorMessage},null,8,qe),[[e.vShow,o.validation.errorMessage]])]))}}),Z={date:"##/##/####",datetime:"####/##/## ##:##",time:"##:##",fulltime:"##:##:##",phone:"(###) ### - ####",card:"#### #### #### ####"};function Re(t){try{return Function(`"use strict";return (${t})`)()}catch{}}function Oe(t){var o;let n=t.value;if(n){const l=Re(n);if(l){const a=t.instance.locale;n=l(a)}}else{const l=t.instance.schema,a=(o=l==null?void 0:l.fieldtype)==null?void 0:o.toLowerCase();a&&Z[a]&&(n=Z[a])}return n}function Ue(t,n){n||(n="#");let o=t;const l=[n,"/","-","(",")"," "];for(const a of l)o=o.replaceAll(a,"");return o}function Ke(t,n,o){o||(o="#");let l=n;for(const a of t){const r=l.indexOf(o);if(r!==-1){const i=l.substring(0,r),s=l.substring(r+1);l=i+a+s}}return l.slice(0,n.length)}function ze(t,n){const o=Oe(n);if(!o)return;const l="#",a=t.value,r=Ue(a,l);if(r){const i=Ke(r,o,l);n.instance.maskFilled&&(n.instance.maskFilled=!i.includes(l)),t.value=i}else t.value=o}const We={class:"aform__form-element"},Ye=["for"],je=["id","disabled","maxlength","required"],Ge=["innerHTML"],ee=e.defineComponent({__name:"ATextInput",props:e.mergeModels({schema:{},label:{},mask:{},required:{type:Boolean},readonly:{type:Boolean},uuid:{},validation:{default:()=>({errorMessage:" "})}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const n=e.ref(!0),o=e.useModel(t,"modelValue");return(l,a)=>(e.openBlock(),e.createElementBlock("div",We,[e.createElementVNode("label",{class:"aform__field-label",for:l.uuid},e.toDisplayString(l.label),9,Ye),e.withDirectives(e.createElementVNode("input",{class:"aform__input-field","onUpdate:modelValue":a[0]||(a[0]=r=>o.value=r),id:l.uuid,disabled:l.readonly,maxlength:l.mask?n.value&&l.mask.length:void 0,required:l.required},null,8,je),[[e.vModelText,o.value],[e.unref(ze),l.mask]]),e.withDirectives(e.createElementVNode("p",{class:"error",innerHTML:l.validation.errorMessage},null,8,Ge),[[e.vShow,l.validation.errorMessage]])]))}}),Je={class:"login-container"},Qe={class:"account-container"},Xe={class:"account-header"},Ze={id:"account-title"},et={id:"account-subtitle"},tt={class:"login-form-container"},nt={class:"login-form-email login-form-element"},ot=e.createElementVNode("label",{id:"login-email",for:"email",class:"aform__field-label"},"Email",-1),lt=["disabled"],at={class:"login-form-password login-form-element"},rt=e.createElementVNode("label",{id:"login-password",for:"password",class:"login-label"},"Password",-1),st=["disabled"],it=["disabled"],ct={key:0,class:"material-symbols-outlined loading-icon"},dt=e.createElementVNode("span",{id:"login-form-button"},"Login",-1),mt=e.createElementVNode("button",{class:"btn"},[e.createElementVNode("span",{id:"forgot-password-button"},"Forgot password?")],-1),ut=e.defineComponent({__name:"Login",props:{headerTitle:{default:"Login"},headerSubtitle:{default:"Enter your email and password to login"}},emits:["loginFailed","loginSuccess"],setup(t,{emit:n}){const o=n,l=e.ref(""),a=e.ref(""),r=e.ref(!1),i=e.ref(!1);function s(d){if(d.preventDefault(),r.value=!0,i.value){r.value=!1,o("loginFailed");return}r.value=!1,o("loginSuccess")}return(d,c)=>(e.openBlock(),e.createElementBlock("div",Je,[e.createElementVNode("div",null,[e.createElementVNode("div",Qe,[e.createElementVNode("div",Xe,[e.createElementVNode("h1",Ze,e.toDisplayString(d.headerTitle),1),e.createElementVNode("p",et,e.toDisplayString(d.headerSubtitle),1)]),e.createElementVNode("form",{onSubmit:s},[e.createElementVNode("div",tt,[e.createElementVNode("div",nt,[ot,e.withDirectives(e.createElementVNode("input",{id:"email",class:"aform__input-field",name:"email",placeholder:"name@example.com",type:"email","onUpdate:modelValue":c[0]||(c[0]=m=>l.value=m),"auto-capitalize":"none","auto-complete":"email","auto-correct":"off",disabled:r.value},null,8,lt),[[e.vModelText,l.value]])]),e.createElementVNode("div",at,[rt,e.withDirectives(e.createElementVNode("input",{id:"password",class:"login-field",name:"password",type:"password","onUpdate:modelValue":c[1]||(c[1]=m=>a.value=m),disabled:r.value},null,8,st),[[e.vModelText,a.value]])]),e.createElementVNode("button",{class:"btn",onClick:s,disabled:r.value||!l.value||!a.value},[r.value?(e.openBlock(),e.createElementBlock("span",ct,"progress_activity")):e.createCommentVNode("",!0),dt],8,it)])],32),mt])])]))}});function ft(t){t.component("ACheckbox",F),t.component("ACombobox",P),t.component("ADate",x),t.component("ADropdown",q),t.component("ADatePicker",J),t.component("AFieldset",Q),t.component("AForm",I),t.component("ANumericInput",X),t.component("ATextInput",ee)}g.ACheckbox=F,g.AComboBox=P,g.ADate=x,g.ADatePicker=J,g.ADropdown=q,g.AFieldset=Q,g.AForm=I,g.ANumericInput=X,g.ATextInput=ee,g.Login=ut,g.install=ft,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});
|
|
2
2
|
//# sourceMappingURL=aform.umd.cjs.map
|