@stonecrop/aform 0.2.10 → 0.2.11

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.js ADDED
@@ -0,0 +1,869 @@
1
+ import { defineComponent as D, mergeModels as se, useModel as ae, openBlock as f, createElementBlock as h, createElementVNode as i, withDirectives as C, vModelCheckbox as be, toDisplayString as k, vShow as O, resolveComponent as we, createBlock as H, withCtx as Ce, onMounted as re, onBeforeUnmount as ke, ref as y, watch as F, unref as S, getCurrentScope as De, onScopeDispose as Ee, inject as ie, nextTick as Ae, computed as L, Fragment as V, renderList as x, normalizeStyle as Ie, withModifiers as Me, normalizeClass as B, createCommentVNode as ue, withKeys as P, vModelText as R, resolveDynamicComponent as Te, mergeProps as _e, createTextVNode as Se, renderSlot as Oe, createVNode as $e, resolveDirective as Le } from "vue";
2
+ const Ve = { id: "checkbox-container" }, xe = ["id", "readonly", "required"], Be = { id: "custom-checkbox" }, Pe = ["for"], qe = ["innerHTML"], He = /* @__PURE__ */ D({
3
+ __name: "ACheckbox",
4
+ props: /* @__PURE__ */ se({
5
+ label: {},
6
+ required: { type: Boolean },
7
+ readOnly: { type: Boolean },
8
+ uuid: {},
9
+ validation: { default: () => ({ errorMessage: " " }) }
10
+ }, {
11
+ modelValue: {},
12
+ modelModifiers: {}
13
+ }),
14
+ emits: ["update:modelValue"],
15
+ setup(e) {
16
+ const t = ae(e, "modelValue");
17
+ return (n, o) => (f(), h("div", null, [
18
+ i("label", Ve, [
19
+ C(i("input", {
20
+ "onUpdate:modelValue": o[0] || (o[0] = (l) => t.value = l),
21
+ type: "checkbox",
22
+ id: n.uuid,
23
+ class: "checkbox",
24
+ readonly: n.readOnly,
25
+ required: n.required
26
+ }, null, 8, xe), [
27
+ [be, t.value]
28
+ ]),
29
+ i("span", Be, k(t.value), 1)
30
+ ]),
31
+ i("label", {
32
+ for: n.uuid,
33
+ id: "checkbox-label"
34
+ }, k(n.label), 9, Pe),
35
+ C(i("p", {
36
+ innerHTML: n.validation.errorMessage
37
+ }, null, 8, qe), [
38
+ [O, n.validation.errorMessage]
39
+ ])
40
+ ]));
41
+ }
42
+ }), M = (e, t) => {
43
+ const n = e.__vccOpts || e;
44
+ for (const [o, l] of t)
45
+ n[o] = l;
46
+ return n;
47
+ }, Fe = /* @__PURE__ */ M(He, [["__scopeId", "data-v-5093f1cb"]]), Re = /* @__PURE__ */ i("div", null, [
48
+ /* @__PURE__ */ i("input", { type: "text" }),
49
+ /* @__PURE__ */ i("input", { type: "text" }),
50
+ /* @__PURE__ */ i("input", { type: "text" })
51
+ ], -1), Ue = /* @__PURE__ */ D({
52
+ __name: "AComboBox",
53
+ props: ["event", "cellData", "tableID"],
54
+ setup(e) {
55
+ return (t, n) => {
56
+ const o = we("ATableModal");
57
+ return f(), H(o, {
58
+ event: e.event,
59
+ cellData: e.cellData,
60
+ class: "amodal"
61
+ }, {
62
+ default: Ce(() => [
63
+ Re
64
+ ]),
65
+ _: 1
66
+ }, 8, ["event", "cellData"]);
67
+ };
68
+ }
69
+ });
70
+ var W;
71
+ const de = typeof window < "u", Qe = (e) => typeof e == "string", Ye = () => {
72
+ };
73
+ de && (W = window == null ? void 0 : window.navigator) != null && W.userAgent && /iP(ad|hone|od)/.test(window.navigator.userAgent);
74
+ function ce(e) {
75
+ return typeof e == "function" ? e() : S(e);
76
+ }
77
+ function je(e) {
78
+ return e;
79
+ }
80
+ function We(e) {
81
+ return De() ? (Ee(e), !0) : !1;
82
+ }
83
+ function q(e) {
84
+ var t;
85
+ const n = ce(e);
86
+ return (t = n == null ? void 0 : n.$el) != null ? t : n;
87
+ }
88
+ const pe = de ? window : void 0;
89
+ function Ne(...e) {
90
+ let t, n, o, l;
91
+ if (Qe(e[0]) || Array.isArray(e[0]) ? ([n, o, l] = e, t = pe) : [t, n, o, l] = e, !t)
92
+ return Ye;
93
+ Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);
94
+ const s = [], a = () => {
95
+ s.forEach((d) => d()), s.length = 0;
96
+ }, r = (d, g, b, m) => (d.addEventListener(g, b, m), () => d.removeEventListener(g, b, m)), p = F(() => [q(t), ce(l)], ([d, g]) => {
97
+ a(), d && s.push(...n.flatMap((b) => o.map((m) => r(d, b, m, g))));
98
+ }, { immediate: !0, flush: "post" }), u = () => {
99
+ p(), a();
100
+ };
101
+ return We(u), u;
102
+ }
103
+ const N = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, z = "__vueuse_ssr_handlers__";
104
+ N[z] = N[z] || {};
105
+ function ze(e, { window: t = pe, scrollTarget: n } = {}) {
106
+ const o = y(!1), l = () => {
107
+ if (!t)
108
+ return;
109
+ const s = t.document, a = q(e);
110
+ if (!a)
111
+ o.value = !1;
112
+ else {
113
+ const r = a.getBoundingClientRect();
114
+ o.value = r.top <= (t.innerHeight || s.documentElement.clientHeight) && r.left <= (t.innerWidth || s.documentElement.clientWidth) && r.bottom >= 0 && r.right >= 0;
115
+ }
116
+ };
117
+ return F(() => q(e), () => l(), { immediate: !0, flush: "post" }), t && Ne(n || t, "scroll", l, {
118
+ capture: !1,
119
+ passive: !0
120
+ }), o;
121
+ }
122
+ var G;
123
+ (function(e) {
124
+ e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
125
+ })(G || (G = {}));
126
+ var Ge = Object.defineProperty, K = Object.getOwnPropertySymbols, Ke = Object.prototype.hasOwnProperty, Je = Object.prototype.propertyIsEnumerable, J = (e, t, n) => t in e ? Ge(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Xe = (e, t) => {
127
+ for (var n in t || (t = {}))
128
+ Ke.call(t, n) && J(e, n, t[n]);
129
+ if (K)
130
+ for (var n of K(t))
131
+ Je.call(t, n) && J(e, n, t[n]);
132
+ return e;
133
+ };
134
+ const Ze = {
135
+ easeInSine: [0.12, 0, 0.39, 0],
136
+ easeOutSine: [0.61, 1, 0.88, 1],
137
+ easeInOutSine: [0.37, 0, 0.63, 1],
138
+ easeInQuad: [0.11, 0, 0.5, 0],
139
+ easeOutQuad: [0.5, 1, 0.89, 1],
140
+ easeInOutQuad: [0.45, 0, 0.55, 1],
141
+ easeInCubic: [0.32, 0, 0.67, 0],
142
+ easeOutCubic: [0.33, 1, 0.68, 1],
143
+ easeInOutCubic: [0.65, 0, 0.35, 1],
144
+ easeInQuart: [0.5, 0, 0.75, 0],
145
+ easeOutQuart: [0.25, 1, 0.5, 1],
146
+ easeInOutQuart: [0.76, 0, 0.24, 1],
147
+ easeInQuint: [0.64, 0, 0.78, 0],
148
+ easeOutQuint: [0.22, 1, 0.36, 1],
149
+ easeInOutQuint: [0.83, 0, 0.17, 1],
150
+ easeInExpo: [0.7, 0, 0.84, 0],
151
+ easeOutExpo: [0.16, 1, 0.3, 1],
152
+ easeInOutExpo: [0.87, 0, 0.13, 1],
153
+ easeInCirc: [0.55, 0, 1, 0.45],
154
+ easeOutCirc: [0, 0.55, 0.45, 1],
155
+ easeInOutCirc: [0.85, 0, 0.15, 1],
156
+ easeInBack: [0.36, 0, 0.66, -0.56],
157
+ easeOutBack: [0.34, 1.56, 0.64, 1],
158
+ easeInOutBack: [0.68, -0.6, 0.32, 1.6]
159
+ };
160
+ Xe({
161
+ linear: je
162
+ }, Ze);
163
+ const E = (e) => {
164
+ let t = ze(e).value;
165
+ return t = t && e.offsetHeight > 0, t;
166
+ }, A = (e) => e.tabIndex >= 0, X = (e) => {
167
+ const t = e.target;
168
+ return U(t);
169
+ }, U = (e) => {
170
+ var t;
171
+ let n;
172
+ if (e instanceof HTMLTableCellElement) {
173
+ const o = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;
174
+ if (o) {
175
+ const l = Array.from(o.children)[e.cellIndex];
176
+ l && (n = l);
177
+ }
178
+ } else if (e instanceof HTMLTableRowElement) {
179
+ const o = e.previousElementSibling;
180
+ o && (n = o);
181
+ }
182
+ return n && (!A(n) || !E(n)) ? U(n) : n;
183
+ }, et = (e) => {
184
+ var t;
185
+ const n = e.target;
186
+ let o;
187
+ if (n instanceof HTMLTableCellElement) {
188
+ const l = (t = n.parentElement) == null ? void 0 : t.parentElement;
189
+ if (l) {
190
+ const s = l.firstElementChild.children[n.cellIndex];
191
+ s && (o = s);
192
+ }
193
+ } else if (n instanceof HTMLTableRowElement) {
194
+ const l = n.parentElement;
195
+ if (l) {
196
+ const s = l.firstElementChild;
197
+ s && (o = s);
198
+ }
199
+ }
200
+ return o && (!A(o) || !E(o)) ? Q(o) : o;
201
+ }, Z = (e) => {
202
+ const t = e.target;
203
+ return Q(t);
204
+ }, Q = (e) => {
205
+ var t;
206
+ let n;
207
+ if (e instanceof HTMLTableCellElement) {
208
+ const o = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;
209
+ if (o) {
210
+ const l = Array.from(o.children)[e.cellIndex];
211
+ l && (n = l);
212
+ }
213
+ } else if (e instanceof HTMLTableRowElement) {
214
+ const o = e.nextElementSibling;
215
+ o && (n = o);
216
+ }
217
+ return n && (!A(n) || !E(n)) ? Q(n) : n;
218
+ }, tt = (e) => {
219
+ var t;
220
+ const n = e.target;
221
+ let o;
222
+ if (n instanceof HTMLTableCellElement) {
223
+ const l = (t = n.parentElement) == null ? void 0 : t.parentElement;
224
+ if (l) {
225
+ const s = l.lastElementChild.children[n.cellIndex];
226
+ s && (o = s);
227
+ }
228
+ } else if (n instanceof HTMLTableRowElement) {
229
+ const l = n.parentElement;
230
+ if (l) {
231
+ const s = l.lastElementChild;
232
+ s && (o = s);
233
+ }
234
+ }
235
+ return o && (!A(o) || !E(o)) ? U(o) : o;
236
+ }, ee = (e) => {
237
+ const t = e.target;
238
+ return Y(t);
239
+ }, Y = (e) => {
240
+ var t;
241
+ let n;
242
+ if (e.previousElementSibling)
243
+ n = e.previousElementSibling;
244
+ else {
245
+ const o = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;
246
+ n = o == null ? void 0 : o.lastElementChild;
247
+ }
248
+ return n && (!A(n) || !E(n)) ? Y(n) : n;
249
+ }, te = (e) => {
250
+ const t = e.target;
251
+ return j(t);
252
+ }, j = (e) => {
253
+ var t;
254
+ let n;
255
+ if (e.nextElementSibling)
256
+ n = e.nextElementSibling;
257
+ else {
258
+ const o = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;
259
+ n = o == null ? void 0 : o.firstElementChild;
260
+ }
261
+ return n && (!A(n) || !E(n)) ? j(n) : n;
262
+ }, ne = (e) => {
263
+ const t = e.target.parentElement.firstElementChild;
264
+ return t && (!A(t) || !E(t)) ? j(t) : t;
265
+ }, oe = (e) => {
266
+ const t = e.target.parentElement.lastElementChild;
267
+ return t && (!A(t) || !E(t)) ? Y(t) : t;
268
+ }, $ = ["alt", "control", "shift", "meta"], nt = {
269
+ ArrowUp: "up",
270
+ ArrowDown: "down",
271
+ ArrowLeft: "left",
272
+ ArrowRight: "right"
273
+ }, fe = {
274
+ "keydown.up": (e) => {
275
+ const t = X(e);
276
+ t && (e.preventDefault(), e.stopPropagation(), t.focus());
277
+ },
278
+ "keydown.down": (e) => {
279
+ const t = Z(e);
280
+ t && (e.preventDefault(), e.stopPropagation(), t.focus());
281
+ },
282
+ "keydown.left": (e) => {
283
+ const t = ee(e);
284
+ e.preventDefault(), e.stopPropagation(), t && t.focus();
285
+ },
286
+ "keydown.right": (e) => {
287
+ const t = te(e);
288
+ e.preventDefault(), e.stopPropagation(), t && t.focus();
289
+ },
290
+ "keydown.control.up": (e) => {
291
+ const t = et(e);
292
+ t && (e.preventDefault(), e.stopPropagation(), t.focus());
293
+ },
294
+ "keydown.control.down": (e) => {
295
+ const t = tt(e);
296
+ t && (e.preventDefault(), e.stopPropagation(), t.focus());
297
+ },
298
+ "keydown.control.left": (e) => {
299
+ const t = ne(e);
300
+ t && (e.preventDefault(), e.stopPropagation(), t.focus());
301
+ },
302
+ "keydown.control.right": (e) => {
303
+ const t = oe(e);
304
+ t && (e.preventDefault(), e.stopPropagation(), t.focus());
305
+ },
306
+ "keydown.end": (e) => {
307
+ const t = oe(e);
308
+ t && (e.preventDefault(), e.stopPropagation(), t.focus());
309
+ },
310
+ "keydown.enter": (e) => {
311
+ if (e.target instanceof HTMLTableCellElement) {
312
+ e.preventDefault(), e.stopPropagation();
313
+ const t = Z(e);
314
+ t && t.focus();
315
+ }
316
+ },
317
+ "keydown.shift.enter": (e) => {
318
+ if (e.target instanceof HTMLTableCellElement) {
319
+ e.preventDefault(), e.stopPropagation();
320
+ const t = X(e);
321
+ t && t.focus();
322
+ }
323
+ },
324
+ "keydown.home": (e) => {
325
+ const t = ne(e);
326
+ t && (e.preventDefault(), e.stopPropagation(), t.focus());
327
+ },
328
+ "keydown.tab": (e) => {
329
+ const t = te(e);
330
+ t && (e.preventDefault(), e.stopPropagation(), t.focus());
331
+ },
332
+ "keydown.shift.tab": (e) => {
333
+ const t = ee(e);
334
+ t && (e.preventDefault(), e.stopPropagation(), t.focus());
335
+ }
336
+ };
337
+ function ot(e) {
338
+ const t = (o) => {
339
+ let l = null;
340
+ o.parent && (typeof o.parent == "string" ? l = document.querySelector(o.parent) : o.parent instanceof Element ? l = o.parent : l = o.parent.value);
341
+ let s = [];
342
+ if (o.selectors)
343
+ if (typeof o.selectors == "string")
344
+ s = l ? Array.from(l.querySelectorAll(o.selectors)) : Array.from(document.querySelectorAll(o.selectors));
345
+ else if (o.selectors instanceof Element)
346
+ s.push(o.selectors);
347
+ else if (Array.isArray(o.selectors.value))
348
+ for (const a of o.selectors.value)
349
+ a instanceof Element ? s.push(a) : s.push(a.$el);
350
+ else
351
+ s.push(o.selectors.value);
352
+ else
353
+ s = Array.from(l.children).filter((a) => A(a) && E(a));
354
+ return s;
355
+ }, n = (o) => (l) => {
356
+ const s = nt[l.key] || l.key.toLowerCase();
357
+ if ($.includes(s))
358
+ return;
359
+ const a = o.handlers || fe;
360
+ for (const r of Object.keys(a)) {
361
+ const [p, ...u] = r.split(".");
362
+ if (p === "keydown" && u.includes(s)) {
363
+ const d = a[r], g = u.filter((m) => $.includes(m)), b = $.some((m) => {
364
+ const _ = m.charAt(0).toUpperCase() + m.slice(1);
365
+ return l.getModifierState(_);
366
+ });
367
+ if (g.length > 0) {
368
+ if (b) {
369
+ for (const m of $)
370
+ if (u.includes(m)) {
371
+ const _ = m.charAt(0).toUpperCase() + m.slice(1);
372
+ l.getModifierState(_) && d(l);
373
+ }
374
+ }
375
+ } else
376
+ b || d(l);
377
+ }
378
+ }
379
+ };
380
+ re(() => {
381
+ for (const o of e) {
382
+ const l = t(o);
383
+ for (const s of l)
384
+ s.addEventListener("keydown", n(o));
385
+ }
386
+ }), ke(() => {
387
+ for (const o of e) {
388
+ const l = t(o);
389
+ for (const s of l)
390
+ s.removeEventListener("keydown", n(o));
391
+ }
392
+ });
393
+ }
394
+ const lt = ["event", "colIndex", "rowIndex", "tableid"], st = { colspan: "5" }, at = ["onClick"], rt = 6, I = 7, it = /* @__PURE__ */ D({
395
+ __name: "ADate",
396
+ props: {
397
+ colIndex: {},
398
+ rowIndex: {},
399
+ tableid: {},
400
+ event: {},
401
+ indent: {},
402
+ readonly: { type: Boolean }
403
+ },
404
+ setup(e) {
405
+ const t = e, n = ie(t.tableid), o = /* @__PURE__ */ new Date(), l = y(), s = y(), a = y(), r = y([]);
406
+ re(async () => {
407
+ let c = n.cellData(t.colIndex, t.rowIndex);
408
+ c ? (c instanceof Date || (c = new Date(c)), l.value = c, s.value = l.value.getMonth(), a.value = l.value.getFullYear()) : (s.value = o.getMonth(), a.value = o.getFullYear()), p(), await Ae();
409
+ const T = document.getElementsByClassName("selecteddate");
410
+ if (T.length > 0)
411
+ T[0].focus();
412
+ else {
413
+ const v = document.getElementsByClassName("todaysdate");
414
+ v.length > 0 && v[0].focus();
415
+ }
416
+ }), F([s, a], () => {
417
+ p();
418
+ });
419
+ const p = () => {
420
+ r.value = [];
421
+ const c = new Date(a.value, s.value, 1), T = c.getDay(), v = c.setDate(c.getDate() - T);
422
+ for (let w of Array(43).keys())
423
+ r.value.push(v + w * 864e5);
424
+ }, u = () => {
425
+ a.value -= 1;
426
+ }, d = () => {
427
+ a.value += 1;
428
+ }, g = () => {
429
+ s.value == 0 ? (s.value = 11, u()) : s.value -= 1;
430
+ }, b = () => {
431
+ s.value == 11 ? (s.value = 0, d()) : s.value += 1;
432
+ }, m = (c) => {
433
+ if (s.value === o.getMonth())
434
+ return o.toDateString() === new Date(c).toDateString();
435
+ }, _ = (c) => new Date(c).toDateString() === new Date(l.value).toDateString(), he = (c, T) => {
436
+ l.value = new Date(r.value[T]), ve();
437
+ }, ve = () => {
438
+ n.setCellData(t.rowIndex, t.colIndex, l.value.getTime());
439
+ }, ge = L(() => new Date(a.value, s.value, 1).toLocaleDateString(void 0, {
440
+ year: "numeric",
441
+ month: "long"
442
+ }));
443
+ return ot([
444
+ {
445
+ parent: "table.adate",
446
+ selectors: "td",
447
+ handlers: {
448
+ ...fe,
449
+ "keydown.pageup": g,
450
+ "keydown.shift.pageup": u,
451
+ "keydown.pagedown": b,
452
+ "keydown.shift.pagedown": d
453
+ }
454
+ }
455
+ ]), (c, T) => c.readonly ? ue("", !0) : (f(), h("div", {
456
+ key: 0,
457
+ event: c.event,
458
+ colIndex: c.colIndex,
459
+ rowIndex: c.rowIndex,
460
+ tableid: c.tableid,
461
+ class: "adate",
462
+ tabindex: "0",
463
+ ref: "adatepicker"
464
+ }, [
465
+ i("table", null, [
466
+ i("tr", null, [
467
+ i("td", {
468
+ onClick: g,
469
+ tabindex: -1
470
+ }, "<"),
471
+ i("th", st, k(ge.value), 1),
472
+ i("td", {
473
+ onClick: b,
474
+ tabindex: -1
475
+ }, ">")
476
+ ]),
477
+ (f(), h(V, null, x(rt, (v) => i("tr", { key: v }, [
478
+ (f(), h(V, null, x(I, (w) => i("td", {
479
+ key: (v - 1) * I + w,
480
+ contenteditable: !1,
481
+ spellcheck: !1,
482
+ tabindex: 0,
483
+ style: Ie({
484
+ border: _(r.value[(v - 1) * I + w]) ? "2px solid var(--focus-cell-outline)" : "none",
485
+ borderBottomColor: m(r.value[(v - 1) * I + w]) ? "var(--focus-cell-outline)" : "none"
486
+ }),
487
+ onClick: Me((ye) => he(ye, (v - 1) * I + w), ["prevent", "stop"]),
488
+ class: B({
489
+ todaysdate: m(r.value[(v - 1) * I + w]),
490
+ selecteddate: _(r.value[(v - 1) * I + w])
491
+ })
492
+ }, k(new Date(r.value[(v - 1) * I + w]).getDate()), 15, at)), 64))
493
+ ])), 64))
494
+ ])
495
+ ], 8, lt));
496
+ }
497
+ }), ut = /* @__PURE__ */ M(it, [["__scopeId", "data-v-169f1184"]]), dt = D({
498
+ name: "ADropdown",
499
+ props: {
500
+ modelValue: {
501
+ type: String,
502
+ required: !1,
503
+ default: ""
504
+ },
505
+ label: {
506
+ type: String,
507
+ required: !0
508
+ },
509
+ value: String,
510
+ items: {
511
+ type: Array,
512
+ required: !1,
513
+ default: () => []
514
+ },
515
+ isAsync: {
516
+ type: Boolean,
517
+ required: !1,
518
+ default: !1
519
+ }
520
+ },
521
+ emits: ["update:modelValue", "filterChanged"],
522
+ data() {
523
+ return {
524
+ results: [],
525
+ search: this.modelValue,
526
+ isLoading: !1,
527
+ arrowCounter: 0,
528
+ isOpen: !1
529
+ };
530
+ },
531
+ watch: {
532
+ items: function(e, t) {
533
+ this.isLoading = !1, this.results = e;
534
+ }
535
+ },
536
+ mounted() {
537
+ document.addEventListener("click", this.handleClickOutside), this.filterResults();
538
+ },
539
+ destroyed() {
540
+ document.removeEventListener("click", this.handleClickOutside);
541
+ },
542
+ methods: {
543
+ setResult(e) {
544
+ this.search = e, this.closeResults();
545
+ },
546
+ filterResults() {
547
+ this.results = this.items.filter((e) => e.toLowerCase().indexOf(this.search.toLowerCase()) > -1);
548
+ },
549
+ onChange() {
550
+ this.isOpen = !0, this.isAsync ? (this.isLoading = !0, this.$emit("filterChanged", this.search)) : this.filterResults();
551
+ },
552
+ handleClickOutside(e) {
553
+ this.$el.contains(e.target) || (this.closeResults(), this.arrowCounter = 0);
554
+ },
555
+ closeResults() {
556
+ this.isOpen = !1, this.items.includes(this.search) || (this.search = ""), this.$emit("update:modelValue", this.search);
557
+ },
558
+ onArrowDown() {
559
+ this.arrowCounter < this.results.length && (this.arrowCounter = this.arrowCounter + 1);
560
+ },
561
+ onArrowUp() {
562
+ this.arrowCounter > 0 && (this.arrowCounter = this.arrowCounter - 1);
563
+ },
564
+ onEnter() {
565
+ this.search = this.results[this.arrowCounter], this.closeResults(), this.arrowCounter = 0;
566
+ },
567
+ openWithSearch() {
568
+ this.search = "", this.onChange(), this.$refs.mopInput.focus();
569
+ }
570
+ }
571
+ }), ct = { class: "input-wrapper" }, pt = {
572
+ id: "autocomplete-results",
573
+ class: "autocomplete-results"
574
+ }, ft = {
575
+ key: 0,
576
+ class: "loading autocomplete-result"
577
+ }, mt = ["onClick"];
578
+ function ht(e, t, n, o, l, s) {
579
+ return f(), h("div", {
580
+ class: B(["autocomplete", { isOpen: e.isOpen }])
581
+ }, [
582
+ i("div", ct, [
583
+ C(i("input", {
584
+ ref: "mopInput",
585
+ type: "text",
586
+ onInput: t[0] || (t[0] = (...a) => e.onChange && e.onChange(...a)),
587
+ onFocus: t[1] || (t[1] = (...a) => e.onChange && e.onChange(...a)),
588
+ "onUpdate:modelValue": t[2] || (t[2] = (a) => e.search = a),
589
+ onKeydown: [
590
+ t[3] || (t[3] = P((...a) => e.onArrowDown && e.onArrowDown(...a), ["down"])),
591
+ t[4] || (t[4] = P((...a) => e.onArrowUp && e.onArrowUp(...a), ["up"])),
592
+ t[5] || (t[5] = P((...a) => e.onEnter && e.onEnter(...a), ["enter"]))
593
+ ]
594
+ }, null, 544), [
595
+ [R, e.search]
596
+ ]),
597
+ C(i("ul", pt, [
598
+ e.isLoading ? (f(), h("li", ft, "Loading results...")) : (f(!0), h(V, { key: 1 }, x(e.results, (a, r) => (f(), h("li", {
599
+ key: r,
600
+ onClick: (p) => e.setResult(a),
601
+ class: B(["autocomplete-result", { "is-active": r === e.arrowCounter }])
602
+ }, k(a), 11, mt))), 128))
603
+ ], 512), [
604
+ [O, e.isOpen]
605
+ ]),
606
+ i("label", null, k(e.label), 1)
607
+ ])
608
+ ], 2);
609
+ }
610
+ const vt = /* @__PURE__ */ M(dt, [["render", ht]]), gt = /* @__PURE__ */ D({
611
+ __name: "CollapseButton",
612
+ props: {
613
+ collapsed: { type: Boolean }
614
+ },
615
+ setup(e) {
616
+ return (t, n) => (f(), h("button", {
617
+ class: B(["collapse-button", t.collapsed ? "rotated" : "unrotated"])
618
+ }, "×", 2));
619
+ }
620
+ }), yt = /* @__PURE__ */ M(gt, [["__scopeId", "data-v-6f1c1b45"]]), bt = /* @__PURE__ */ D({
621
+ __name: "AForm",
622
+ props: {
623
+ modelValue: {},
624
+ data: {},
625
+ readonly: { type: Boolean }
626
+ },
627
+ emits: ["update:modelValue"],
628
+ setup(e, { emit: t }) {
629
+ const n = e, o = t, l = y(n.data || {}), s = (r) => {
630
+ let p = {};
631
+ for (const [u, d] of Object.entries(r))
632
+ ["component", "fieldtype"].includes(u) || (p[u] = d), u === "rows" && d && d.length === 0 && (p.rows = l.value[r.fieldname]);
633
+ return p;
634
+ }, a = L({
635
+ get: () => n.modelValue.map((r, p) => L({
636
+ get() {
637
+ return r.value;
638
+ },
639
+ set: (u) => {
640
+ n.modelValue[p].value = u, o("update:modelValue", n.modelValue);
641
+ }
642
+ })),
643
+ set: () => {
644
+ }
645
+ });
646
+ return (r, p) => (f(), h("form", null, [
647
+ (f(!0), h(V, null, x(r.modelValue, (u, d) => (f(), H(Te(u.component), _e({
648
+ key: d,
649
+ schema: u,
650
+ modelValue: a.value[d].value,
651
+ "onUpdate:modelValue": (g) => a.value[d].value = g,
652
+ data: l.value[u.fieldname],
653
+ readonly: r.readonly
654
+ }, s(u)), null, 16, ["schema", "modelValue", "onUpdate:modelValue", "data", "readonly"]))), 128))
655
+ ]));
656
+ }
657
+ }), me = /* @__PURE__ */ M(bt, [["__scopeId", "data-v-74d66cf2"]]), wt = /* @__PURE__ */ D({
658
+ __name: "AFieldset",
659
+ props: {
660
+ schema: {},
661
+ label: {},
662
+ collapsible: { type: Boolean },
663
+ data: {}
664
+ },
665
+ setup(e) {
666
+ const t = e, n = y(t.data || []);
667
+ let o = y(!1), l = y(t.collapsible);
668
+ const s = y(t.schema);
669
+ function a(r) {
670
+ r.preventDefault(), l.value && (o.value = !o.value);
671
+ }
672
+ return (r, p) => (f(), h("fieldset", null, [
673
+ i("legend", {
674
+ onClick: a,
675
+ onSubmit: a
676
+ }, [
677
+ Se(k(r.label) + " ", 1),
678
+ S(l) ? (f(), H(yt, {
679
+ key: 0,
680
+ collapsed: S(o)
681
+ }, null, 8, ["collapsed"])) : ue("", !0)
682
+ ], 32),
683
+ Oe(r.$slots, "default", { collapsed: S(o) }, () => [
684
+ C($e(me, {
685
+ modelValue: s.value,
686
+ "onUpdate:modelValue": p[0] || (p[0] = (u) => s.value = u),
687
+ data: n.value
688
+ }, null, 8, ["modelValue", "data"]), [
689
+ [O, !S(o)]
690
+ ])
691
+ ], !0)
692
+ ]));
693
+ }
694
+ }), Ct = /* @__PURE__ */ M(wt, [["__scopeId", "data-v-cad9b578"]]), kt = ["id", "disabled", "required"], Dt = ["for"], Et = ["innerHTML"], At = /* @__PURE__ */ D({
695
+ __name: "ANumericInput",
696
+ props: /* @__PURE__ */ se({
697
+ label: {},
698
+ required: { type: Boolean },
699
+ readonly: { type: Boolean },
700
+ uuid: {},
701
+ validation: { default: () => ({ errorMessage: "&nbsp;" }) }
702
+ }, {
703
+ modelValue: {},
704
+ modelModifiers: {}
705
+ }),
706
+ emits: ["update:modelValue"],
707
+ setup(e) {
708
+ const t = ae(e, "modelValue");
709
+ return (n, o) => (f(), h("div", null, [
710
+ C(i("input", {
711
+ "onUpdate:modelValue": o[0] || (o[0] = (l) => t.value = l),
712
+ type: "number",
713
+ id: n.uuid,
714
+ disabled: n.readonly,
715
+ required: n.required
716
+ }, null, 8, kt), [
717
+ [R, t.value]
718
+ ]),
719
+ i("label", { for: n.uuid }, k(n.label), 9, Dt),
720
+ C(i("p", {
721
+ innerHTML: n.validation.errorMessage
722
+ }, null, 8, Et), [
723
+ [O, n.validation.errorMessage]
724
+ ])
725
+ ]));
726
+ }
727
+ }), It = /* @__PURE__ */ M(At, [["__scopeId", "data-v-02907cd6"]]), le = {
728
+ date: "##/##/####",
729
+ datetime: "####/##/## ##:##",
730
+ time: "##:##",
731
+ fulltime: "##:##:##",
732
+ phone: "(###) ### - ####",
733
+ card: "#### #### #### ####"
734
+ };
735
+ function Mt(e) {
736
+ try {
737
+ return Function(`"use strict";return (${e})`)();
738
+ } catch {
739
+ }
740
+ }
741
+ function Tt(e) {
742
+ var n;
743
+ let t = e.value;
744
+ if (t) {
745
+ const o = Mt(t);
746
+ if (o) {
747
+ const l = e.instance.locale;
748
+ t = o(l);
749
+ }
750
+ } else {
751
+ const l = (n = e.instance.schema.fieldtype) == null ? void 0 : n.toLowerCase();
752
+ l && le[l] && (t = le[l]);
753
+ }
754
+ return t;
755
+ }
756
+ function _t(e, t) {
757
+ t || (t = "#");
758
+ let n = e;
759
+ const o = [t, "/", "-", "(", ")", " "];
760
+ for (const l of o)
761
+ n = n.replaceAll(l, "");
762
+ return n;
763
+ }
764
+ function St(e, t, n) {
765
+ n || (n = "#");
766
+ let o = t;
767
+ for (const l of e) {
768
+ const s = o.indexOf(n);
769
+ if (s !== -1) {
770
+ const a = o.substring(0, s), r = o.substring(s + 1);
771
+ o = a + l + r;
772
+ }
773
+ }
774
+ return o.slice(0, t.length);
775
+ }
776
+ function Ot(e, t) {
777
+ const n = Tt(t);
778
+ if (!n)
779
+ return;
780
+ const o = "#", l = e.value, s = _t(l, o);
781
+ if (s) {
782
+ const a = St(s, n, o);
783
+ t.instance.maskFilled && (t.instance.maskFilled = !a.includes(o)), e.value = a;
784
+ } else
785
+ e.value = n;
786
+ }
787
+ const $t = D({
788
+ name: "ATextInput",
789
+ props: {
790
+ schema: {
791
+ type: Object,
792
+ required: !0
793
+ },
794
+ label: {
795
+ type: String,
796
+ required: !0
797
+ },
798
+ modelValue: {
799
+ type: null
800
+ },
801
+ mask: {
802
+ type: String
803
+ },
804
+ required: {
805
+ type: Boolean
806
+ },
807
+ readonly: {
808
+ type: Boolean
809
+ },
810
+ uuid: {
811
+ type: String
812
+ },
813
+ validation: {
814
+ type: Object,
815
+ default: () => ({ errorMessage: "&nbsp;" })
816
+ }
817
+ },
818
+ setup(e, t) {
819
+ const n = y(!1), o = ie("locale", "");
820
+ return { inputText: L({
821
+ get() {
822
+ return e.modelValue;
823
+ },
824
+ set(s) {
825
+ t.emit("update:modelValue", s);
826
+ }
827
+ }), locale: o, maskFilled: n };
828
+ },
829
+ directives: {
830
+ mask: Ot
831
+ }
832
+ }), Lt = ["id", "disabled", "maxlength", "required"], Vt = ["for"], xt = ["innerHTML"];
833
+ function Bt(e, t, n, o, l, s) {
834
+ const a = Le("mask");
835
+ return f(), h("div", null, [
836
+ C(i("input", {
837
+ "onUpdate:modelValue": t[0] || (t[0] = (r) => e.inputText = r),
838
+ id: e.uuid,
839
+ disabled: e.readonly,
840
+ maxlength: e.mask ? e.maskFilled && e.mask.length : void 0,
841
+ required: e.required
842
+ }, null, 8, Lt), [
843
+ [R, e.inputText],
844
+ [a, e.mask]
845
+ ]),
846
+ i("label", { for: e.uuid }, k(e.label), 9, Vt),
847
+ C(i("p", {
848
+ innerHTML: e.validation.errorMessage
849
+ }, null, 8, xt), [
850
+ [O, e.validation.errorMessage]
851
+ ])
852
+ ]);
853
+ }
854
+ const Pt = /* @__PURE__ */ M($t, [["render", Bt], ["__scopeId", "data-v-76dba9b8"]]);
855
+ function Ht(e) {
856
+ e.component("ACheckbox", Fe), e.component("ACombobox", Ue), e.component("ADate", ut), e.component("ADropdown", vt), e.component("AFieldset", Ct), e.component("AForm", me), e.component("ANumericInput", It), e.component("ATextInput", Pt);
857
+ }
858
+ export {
859
+ Fe as ACheckbox,
860
+ Ue as AComboBox,
861
+ ut as ADate,
862
+ vt as ADropdown,
863
+ Ct as AFieldset,
864
+ me as AForm,
865
+ It as ANumericInput,
866
+ Pt as ATextInput,
867
+ Ht as install
868
+ };
869
+ //# sourceMappingURL=aform.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aform.js","sources":["../src/components/form/ACheckbox.vue","../../utilities/dist/utilities.js","../src/components/form/ADate.vue","../src/components/form/ADropdown.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>\n\t\t<label id=\"checkbox-container\">\n\t\t\t<input v-model=\"checkbox\" type=\"checkbox\" :id=\"uuid\" class=\"checkbox\" :readonly=\"readOnly\" :required=\"required\" />\n\t\t\t<span id=\"custom-checkbox\">{{ checkbox }}</span>\n\t\t</label>\n\t\t<label :for=\"uuid\" id=\"checkbox-label\">{{ 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 { 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: '&nbsp;' }),\n\t}\n)\n\nconst checkbox = defineModel<InputHTMLAttributes['checked']>()\n</script>\n\n<style scoped>\ndiv {\n\tdisplay: inline-block;\n\tmin-width: 40ch;\n\tborder: 1px solid transparent;\n\tpadding: 0rem;\n\tmargin: 0rem;\n\tmargin-right: 1ch;\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\n.checkbox {\n\tvisibility: hidden;\n}\n\n.checkbox + #custom-checkbox:after {\n\tcontent: '⬡';\n\tpadding: 1ch 0 0.5ch 0;\n\tfont-size: 120%;\n\tcursor: pointer;\n\tposition: relative;\n\tleft: -18px;\n}\n\n.checkbox:checked + #custom-checkbox:after {\n\tcontent: '⬣';\n\tpadding: 1ch 0 0.5ch 0;\n\tfont-size: 120%;\n\tcursor: pointer;\n\tposition: relative;\n\tleft: -18px;\n}\n\n#custom-checkbox {\n\tdisplay: inline-block;\n}\n\n#checkbox-container {\n\tdisplay: inline-block;\n\tmin-width: 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\theight: 1.15rem;\n\tborder-radius: 0.25rem;\n}\n\n#checkbox-container:hover {\n\tborder: 1px solid var(--input-active-border-color);\n}\n\n#checkbox-container:hover + label {\n\tcolor: var(--input-active-label-color);\n}\n\n#checkbox-label {\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</style>\n","import { unref as Q, getCurrentScope as U, onScopeDispose as K, ref as B, watch as D, onMounted as W, onBeforeUnmount as V } from \"vue\";\nvar v;\nconst M = typeof window < \"u\", F = (e) => typeof e == \"string\", j = () => {\n};\nM && ((v = window == null ? void 0 : window.navigator) != null && v.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nfunction H(e) {\n return typeof e == \"function\" ? e() : Q(e);\n}\nfunction q(e) {\n return e;\n}\nfunction G(e) {\n return U() ? (K(e), !0) : !1;\n}\nfunction y(e) {\n var t;\n const r = H(e);\n return (t = r == null ? void 0 : r.$el) != null ? t : r;\n}\nconst N = M ? window : void 0;\nfunction z(...e) {\n let t, r, n, o;\n if (F(e[0]) || Array.isArray(e[0]) ? ([r, n, o] = e, t = N) : [t, r, n, o] = e, !t)\n return j;\n Array.isArray(r) || (r = [r]), Array.isArray(n) || (n = [n]);\n const l = [], s = () => {\n l.forEach((c) => c()), l.length = 0;\n }, a = (c, g, p, i) => (c.addEventListener(g, p, i), () => c.removeEventListener(g, p, i)), C = D(() => [y(t), H(o)], ([c, g]) => {\n s(), c && l.push(...r.flatMap((p) => n.map((i) => a(c, p, i, g))));\n }, { immediate: !0, flush: \"post\" }), d = () => {\n C(), s();\n };\n return G(d), d;\n}\nconst O = typeof globalThis < \"u\" ? globalThis : typeof window < \"u\" ? window : typeof global < \"u\" ? global : typeof self < \"u\" ? self : {}, T = \"__vueuse_ssr_handlers__\";\nO[T] = O[T] || {};\nfunction J(e, { window: t = N, scrollTarget: r } = {}) {\n const n = B(!1), o = () => {\n if (!t)\n return;\n const l = t.document, s = y(e);\n if (!s)\n n.value = !1;\n else {\n const a = s.getBoundingClientRect();\n n.value = a.top <= (t.innerHeight || l.documentElement.clientHeight) && a.left <= (t.innerWidth || l.documentElement.clientWidth) && a.bottom >= 0 && a.right >= 0;\n }\n };\n return D(() => y(e), () => o(), { immediate: !0, flush: \"post\" }), t && z(r || t, \"scroll\", o, {\n capture: !1,\n passive: !0\n }), n;\n}\nvar P;\n(function(e) {\n e.UP = \"UP\", e.RIGHT = \"RIGHT\", e.DOWN = \"DOWN\", e.LEFT = \"LEFT\", e.NONE = \"NONE\";\n})(P || (P = {}));\nvar X = Object.defineProperty, I = Object.getOwnPropertySymbols, Y = Object.prototype.hasOwnProperty, Z = Object.prototype.propertyIsEnumerable, _ = (e, t, r) => t in e ? X(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, ee = (e, t) => {\n for (var r in t || (t = {}))\n Y.call(t, r) && _(e, r, t[r]);\n if (I)\n for (var r of I(t))\n Z.call(t, r) && _(e, r, t[r]);\n return e;\n};\nconst te = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nee({\n linear: q\n}, te);\nconst f = (e) => {\n let t = J(e).value;\n return t = t && e.offsetHeight > 0, t;\n}, u = (e) => e.tabIndex >= 0, A = (e) => {\n const t = e.target;\n return E(t);\n}, E = (e) => {\n var r;\n let t;\n if (e instanceof HTMLTableCellElement) {\n const n = (r = e.parentElement) == null ? void 0 : r.previousElementSibling;\n if (n) {\n const l = Array.from(n.children)[e.cellIndex];\n l && (t = l);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const n = e.previousElementSibling;\n n && (t = n);\n }\n return t && (!u(t) || !f(t)) ? E(t) : t;\n}, ne = (e) => {\n var n;\n const t = e.target;\n let r;\n if (t instanceof HTMLTableCellElement) {\n const o = (n = t.parentElement) == null ? void 0 : n.parentElement;\n if (o) {\n const s = o.firstElementChild.children[t.cellIndex];\n s && (r = s);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.parentElement;\n if (o) {\n const l = o.firstElementChild;\n l && (r = l);\n }\n }\n return r && (!u(r) || !f(r)) ? w(r) : r;\n}, x = (e) => {\n const t = e.target;\n return w(t);\n}, w = (e) => {\n var r;\n let t;\n if (e instanceof HTMLTableCellElement) {\n const n = (r = e.parentElement) == null ? void 0 : r.nextElementSibling;\n if (n) {\n const l = Array.from(n.children)[e.cellIndex];\n l && (t = l);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const n = e.nextElementSibling;\n n && (t = n);\n }\n return t && (!u(t) || !f(t)) ? w(t) : t;\n}, re = (e) => {\n var n;\n const t = e.target;\n let r;\n if (t instanceof HTMLTableCellElement) {\n const o = (n = t.parentElement) == null ? void 0 : n.parentElement;\n if (o) {\n const s = o.lastElementChild.children[t.cellIndex];\n s && (r = s);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.parentElement;\n if (o) {\n const l = o.lastElementChild;\n l && (r = l);\n }\n }\n return r && (!u(r) || !f(r)) ? E(r) : r;\n}, k = (e) => {\n const t = e.target;\n return h(t);\n}, h = (e) => {\n var r;\n let t;\n if (e.previousElementSibling)\n t = e.previousElementSibling;\n else {\n const n = (r = e.parentElement) == null ? void 0 : r.previousElementSibling;\n t = n == null ? void 0 : n.lastElementChild;\n }\n return t && (!u(t) || !f(t)) ? h(t) : t;\n}, S = (e) => {\n const t = e.target;\n return b(t);\n}, b = (e) => {\n var r;\n let t;\n if (e.nextElementSibling)\n t = e.nextElementSibling;\n else {\n const n = (r = e.parentElement) == null ? void 0 : r.nextElementSibling;\n t = n == null ? void 0 : n.firstElementChild;\n }\n return t && (!u(t) || !f(t)) ? b(t) : t;\n}, L = (e) => {\n const n = e.target.parentElement.firstElementChild;\n return n && (!u(n) || !f(n)) ? b(n) : n;\n}, R = (e) => {\n const n = e.target.parentElement.lastElementChild;\n return n && (!u(n) || !f(n)) ? h(n) : n;\n}, m = [\"alt\", \"control\", \"shift\", \"meta\"], oe = {\n ArrowUp: \"up\",\n ArrowDown: \"down\",\n ArrowLeft: \"left\",\n ArrowRight: \"right\"\n}, le = {\n \"keydown.up\": (e) => {\n const t = A(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.down\": (e) => {\n const t = x(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.left\": (e) => {\n const t = k(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.right\": (e) => {\n const t = S(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 = re(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.left\": (e) => {\n const t = L(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.right\": (e) => {\n const t = R(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.end\": (e) => {\n const t = R(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 r = x(e);\n r && r.focus();\n }\n },\n \"keydown.shift.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const r = A(e);\n r && r.focus();\n }\n },\n \"keydown.home\": (e) => {\n const t = L(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.tab\": (e) => {\n const t = S(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.shift.tab\": (e) => {\n const t = k(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n }\n};\nfunction ie(e) {\n const t = (n) => {\n let o = null;\n n.parent && (typeof n.parent == \"string\" ? o = document.querySelector(n.parent) : n.parent instanceof Element ? o = n.parent : o = n.parent.value);\n let l = [];\n if (n.selectors)\n if (typeof n.selectors == \"string\")\n l = o ? Array.from(o.querySelectorAll(n.selectors)) : Array.from(document.querySelectorAll(n.selectors));\n else if (n.selectors instanceof Element)\n l.push(n.selectors);\n else if (Array.isArray(n.selectors.value))\n for (const s of n.selectors.value)\n s instanceof Element ? l.push(s) : l.push(s.$el);\n else\n l.push(n.selectors.value);\n else\n l = Array.from(o.children).filter((a) => u(a) && f(a));\n return l;\n }, r = (n) => (o) => {\n const l = oe[o.key] || o.key.toLowerCase();\n if (m.includes(l))\n return;\n const s = n.handlers || le;\n for (const a of Object.keys(s)) {\n const [C, ...d] = a.split(\".\");\n if (C === \"keydown\" && d.includes(l)) {\n const c = s[a], g = d.filter((i) => m.includes(i)), p = m.some((i) => {\n const $ = i.charAt(0).toUpperCase() + i.slice(1);\n return o.getModifierState($);\n });\n if (g.length > 0) {\n if (p) {\n for (const i of m)\n if (d.includes(i)) {\n const $ = i.charAt(0).toUpperCase() + i.slice(1);\n o.getModifierState($) && c(o);\n }\n }\n } else\n p || c(o);\n }\n }\n };\n W(() => {\n for (const n of e) {\n const o = t(n);\n for (const l of o)\n l.addEventListener(\"keydown\", r(n));\n }\n }), V(() => {\n for (const n of e) {\n const o = t(n);\n for (const l of o)\n l.removeEventListener(\"keydown\", r(n));\n }\n });\n}\nfunction ae(e) {\n}\nexport {\n le as defaultKeypressHandlers,\n ae as install,\n ie as useKeyboardNav\n};\n//# sourceMappingURL=utilities.js.map\n","<template>\n\t<div\n\t\tv-if=\"!readonly\"\n\t\t:event=\"event\"\n\t\t:colIndex=\"colIndex\"\n\t\t:rowIndex=\"rowIndex\"\n\t\t:tableid=\"tableid\"\n\t\tclass=\"adate\"\n\t\ttabindex=\"0\"\n\t\tref=\"adatepicker\">\n\t\t<table>\n\t\t\t<tr>\n\t\t\t\t<td @click=\"previousMonth\" :tabindex=\"-1\">&lt;</td>\n\t\t\t\t<th colspan=\"5\">{{ monthAndYear }}</th>\n\t\t\t\t<td @click=\"nextMonth\" :tabindex=\"-1\">&gt;</td>\n\t\t\t</tr>\n\t\t\t<tr v-for=\"rowNo in numberOfRows\" :key=\"rowNo\">\n\t\t\t\t<!-- TODO: (style) remove inline styling and replace with theme package -->\n\t\t\t\t<td\n\t\t\t\t\tv-for=\"colNo in numberOfColumns\"\n\t\t\t\t\t:key=\"(rowNo - 1) * numberOfColumns + 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:style=\"{\n\t\t\t\t\t\tborder: isSelectedDate(currentDates[(rowNo - 1) * numberOfColumns + colNo])\n\t\t\t\t\t\t\t? '2px solid var(--focus-cell-outline)'\n\t\t\t\t\t\t\t: 'none',\n\t\t\t\t\t\tborderBottomColor: isTodaysDate(currentDates[(rowNo - 1) * numberOfColumns + colNo])\n\t\t\t\t\t\t\t? 'var(--focus-cell-outline)'\n\t\t\t\t\t\t\t: 'none',\n\t\t\t\t\t}\"\n\t\t\t\t\t@click.prevent.stop=\"selectDate($event, (rowNo - 1) * numberOfColumns + colNo)\"\n\t\t\t\t\t:class=\"{\n\t\t\t\t\t\ttodaysdate: isTodaysDate(currentDates[(rowNo - 1) * numberOfColumns + colNo]),\n\t\t\t\t\t\tselecteddate: isSelectedDate(currentDates[(rowNo - 1) * numberOfColumns + colNo]),\n\t\t\t\t\t}\">\n\t\t\t\t\t{{ new Date(currentDates[(rowNo - 1) * numberOfColumns + 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 { computed, inject, nextTick, onMounted, ref, watch } from 'vue'\n\nimport { TableDataStore } from '@stonecrop/atable'\nimport { defaultKeypressHandlers, useKeyboardNav } from '@stonecrop/utilities'\n\nconst props = defineProps<{\n\tcolIndex?: number\n\trowIndex?: number\n\ttableid?: string\n\tevent?: Event\n\tindent?: number\n\treadonly?: boolean\n}>()\n\nconst tableData = inject<TableDataStore>(props.tableid)\n\nconst numberOfRows = 6\nconst numberOfColumns = 7\nconst todaysDate = new Date()\n\nconst selectedDate = ref<Date>()\nconst currentMonth = ref<number>()\nconst currentYear = ref<number>()\nconst currentDates = ref<number[]>([])\n// const width = ref('')\n\nonMounted(async () => {\n\tlet cellDate = tableData.cellData<string | number | Date>(props.colIndex, props.rowIndex)\n\tif (cellDate) {\n\t\tif (!(cellDate instanceof Date)) {\n\t\t\tcellDate = new Date(cellDate)\n\t\t}\n\n\t\tselectedDate.value = cellDate\n\t\tcurrentMonth.value = selectedDate.value.getMonth()\n\t\tcurrentYear.value = selectedDate.value.getFullYear()\n\t} else {\n\t\tcurrentMonth.value = todaysDate.getMonth()\n\t\tcurrentYear.value = todaysDate.getFullYear()\n\t}\n\n\trenderMonth()\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\nwatch([currentMonth, currentYear], () => {\n\trenderMonth()\n})\n\nconst renderMonth = () => {\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\tfor (let dayIndex of Array(43).keys()) {\n\t\tcurrentDates.value.push(calendarStartDay + dayIndex * 86400000)\n\t}\n}\n\nconst previousYear = () => {\n\tcurrentYear.value -= 1\n}\n\nconst nextYear = () => {\n\tcurrentYear.value += 1\n}\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\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 selectDate = (event: Event, currentIndex: number) => {\n\tselectedDate.value = new Date(currentDates.value[currentIndex])\n\tupdateData()\n\t// TODO: (typing) figure out a way to close datepicker\n\t// context.refs.adatepicker.destroy()\n}\n\nconst updateData = () => {\n\t// TODO: check proper date format to feed back (assuming number for now)\n\ttableData.setCellData(props.rowIndex, props.colIndex, selectedDate.value.getTime())\n}\n\n// const dayWidth = computed(() => {\n// \tconst widthValue = Number(width.value.replace('px', ''))\n// \treturn `${widthValue / (numberOfColumns - 1)}px`\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: 'table.adate',\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},\n\t\t},\n\t},\n])\n</script>\n\n<style scoped>\n@import '@/theme/aform.css';\n\n.adate {\n\tborder: 2px solid var(--focus-cell-outline);\n\tposition: absolute;\n\tz-index: 100;\n\tfont-size: var(--table-font-size);\n\tdisplay: inline-table;\n\tbackground-color: var(--row-color-zebra-light);\n\tcolor: var(--cell-text-color);\n\toutline: none;\n\twidth: calc(100% - 4px);\n}\n\n.adate tr {\n\theight: 1.15rem;\n\ttext-align: center;\n\tvertical-align: middle;\n}\n\n.adate td {\n\tborder: 2px solid transparent;\n\tmin-width: 2.25ch; /* this doesn't zoom correctly */\n}\n\n.adate td:hover {\n\tborder: 2px solid var(--focus-cell-outline);\n}\n\n.adate td {\n\tborder: 1px;\n\tborder-style: solid;\n\tborder-color: var(--cell-border-color);\n\tborder-radius: 0px;\n\tbox-sizing: border-box;\n\tmargin: 0px;\n\toutline: none;\n\tbox-shadow: none;\n\tcolor: var(--cell-text-color);\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n\tpadding-left: 0.5ch;\n\tpadding-right: 0.5ch;\n}\n\n.adate td:focus,\n.adate td:focus-within {\n\tbackground-color: var(--focus-cell-background);\n\toutline-width: 2px;\n\toutline-style: solid;\n\toutline-color: var(--focus-cell-outline);\n\tbox-shadow: none;\n\toverflow: hidden;\n\tmin-height: 1.15em;\n\tmax-height: 1.15em;\n\toverflow: hidden;\n}\n\nbutton {\n\tbackground-color: var(--row-color-zebra-light);\n\tborder: none;\n\tpadding: 0px;\n\tmargin: 0px;\n\tcolor: var(--cell-text-color);\n\toutline: none;\n\tfont-size: var(--table-font-size);\n}\n\n.dateheader {\n\tfont-weight: 700;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n}\n\n.adate .todaysdate {\n\tborder-bottom-color: var(--focus-cell-outline);\n}\n\n.adate .selecteddate {\n\tborder: 2px solid var(--focus-cell-outline);\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\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 lang=\"ts\">\nimport { defineComponent } from 'vue'\nexport default defineComponent({\n\tname: 'ADropdown',\n\tprops: {\n\t\tmodelValue: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\t\tlabel: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tvalue: String,\n\t\titems: {\n\t\t\ttype: Array,\n\t\t\trequired: false,\n\t\t\tdefault: () => [],\n\t\t},\n\t\tisAsync: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\temits: ['update:modelValue', 'filterChanged'],\n\tdata() {\n\t\treturn {\n\t\t\tresults: [],\n\t\t\tsearch: this.modelValue,\n\t\t\tisLoading: false,\n\t\t\tarrowCounter: 0,\n\t\t\tisOpen: false,\n\t\t}\n\t},\n\twatch: {\n\t\titems: function (value, oldValue) {\n\t\t\tthis.isLoading = false\n\t\t\tthis.results = value\n\t\t},\n\t},\n\tmounted() {\n\t\tdocument.addEventListener('click', this.handleClickOutside)\n\t\tthis.filterResults()\n\t},\n\tdestroyed() {\n\t\tdocument.removeEventListener('click', this.handleClickOutside)\n\t},\n\tmethods: {\n\t\tsetResult(result) {\n\t\t\tthis.search = result\n\t\t\tthis.closeResults()\n\t\t},\n\t\tfilterResults() {\n\t\t\tthis.results = this.items.filter(item => {\n\t\t\t\treturn item.toLowerCase().indexOf(this.search.toLowerCase()) > -1\n\t\t\t})\n\t\t},\n\t\tonChange() {\n\t\t\tthis.isOpen = true\n\t\t\tif (this.isAsync) {\n\t\t\t\tthis.isLoading = true\n\t\t\t\tthis.$emit('filterChanged', this.search)\n\t\t\t} else {\n\t\t\t\tthis.filterResults()\n\t\t\t}\n\t\t},\n\t\thandleClickOutside(event) {\n\t\t\tif (!this.$el.contains(event.target)) {\n\t\t\t\tthis.closeResults()\n\t\t\t\tthis.arrowCounter = 0\n\t\t\t}\n\t\t},\n\t\tcloseResults() {\n\t\t\tthis.isOpen = false\n\n\t\t\tif (!this.items.includes(this.search)) {\n\t\t\t\tthis.search = ''\n\t\t\t}\n\n\t\t\tthis.$emit('update:modelValue', this.search)\n\t\t},\n\t\tonArrowDown() {\n\t\t\tif (this.arrowCounter < this.results.length) {\n\t\t\t\tthis.arrowCounter = this.arrowCounter + 1\n\t\t\t}\n\t\t},\n\t\tonArrowUp() {\n\t\t\tif (this.arrowCounter > 0) {\n\t\t\t\tthis.arrowCounter = this.arrowCounter - 1\n\t\t\t}\n\t\t},\n\t\tonEnter() {\n\t\t\tthis.search = this.results[this.arrowCounter]\n\t\t\tthis.closeResults()\n\t\t\tthis.arrowCounter = 0\n\t\t},\n\t\topenWithSearch() {\n\t\t\tthis.search = ''\n\t\t\tthis.onChange()\n\t\t\tthis.$refs.mopInput.focus()\n\t\t},\n\t},\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","<template>\n\t<form>\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>\nform {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: wrap;\n\tjustify-content: flex-start;\n\talign-items: baseline;\n}\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 || [])\nlet collapsed = ref(false)\nlet 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>\n\t\t<input v-model=\"inputNumber\" type=\"number\" :id=\"uuid\" :disabled=\"readonly\" :required=\"required\" />\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\">\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: '&nbsp;' }),\n\t}\n)\n\nconst inputNumber = defineModel<number>()\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","import type { FormSchema } from 'types'\nimport { 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>\n\t\t<input\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<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 lang=\"ts\">\nimport { defineComponent, inject, PropType, ref, computed } from 'vue'\n\nimport { FormSchema } from 'types'\nimport { useStringMask } from '@/directives/mask'\n\n// TODO: when moving to composition API, figure out how to provide mask\n// as a custom directive\nexport default defineComponent({\n\tname: 'ATextInput',\n\tprops: {\n\t\tschema: {\n\t\t\ttype: Object as PropType<FormSchema>,\n\t\t\trequired: true,\n\t\t},\n\t\tlabel: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tmodelValue: {\n\t\t\ttype: null as unknown as PropType<string | number>,\n\t\t},\n\t\tmask: {\n\t\t\ttype: String,\n\t\t},\n\t\trequired: {\n\t\t\ttype: Boolean,\n\t\t},\n\t\treadonly: {\n\t\t\ttype: Boolean,\n\t\t},\n\t\tuuid: {\n\t\t\ttype: String,\n\t\t},\n\t\tvalidation: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({ errorMessage: '&nbsp;' }),\n\t\t},\n\t},\n\tsetup(props, context) {\n\t\tconst maskFilled = ref(false)\n\n\t\t// TODO: (state) replace with state management\n\t\tconst locale = inject<string>('locale', '')\n\n\t\tconst inputText = computed({\n\t\t\tget() {\n\t\t\t\treturn props.modelValue\n\t\t\t},\n\t\t\tset(newValue) {\n\t\t\t\tcontext.emit('update:modelValue', newValue)\n\t\t\t},\n\t\t})\n\n\t\treturn { inputText, locale, maskFilled }\n\t},\n\tdirectives: {\n\t\tmask: useStringMask,\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","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 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('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, AFieldset, AForm, ANumericInput, ATextInput, install }\n"],"names":["checkbox","_useModel","__props","v","M","F","j","H","Q","q","G","U","K","y","r","N","z","n","o","l","s","c","a","p","i","C","D","d","O","T","J","B","P","X","I","Y","Z","_","ee","te","f","u","A","E","t","ne","w","x","re","k","h","S","b","L","R","m","oe","le","ie","$","W","V","numberOfRows","numberOfColumns","props","tableData","inject","todaysDate","selectedDate","ref","currentMonth","currentYear","currentDates","onMounted","cellDate","renderMonth","nextTick","$selectedDate","$todaysDate","watch","firstOfMonth","monthStartWeekday","calendarStartDay","dayIndex","previousYear","nextYear","previousMonth","nextMonth","isTodaysDate","day","isSelectedDate","selectDate","event","currentIndex","updateData","monthAndYear","computed","useKeyboardNav","defaultKeypressHandlers","_sfc_main$5","defineComponent","value","oldValue","result","item","_hoisted_1","_hoisted_2","_hoisted_3","_sfc_render","_ctx","_cache","$props","$setup","$data","isOpen","_normalizeClass","_createElementVNode","_withDirectives","search","args","$event","_withKeys","_vModelText","_openBlock","_createElementBlock","_Fragment","_renderList","setResult","_vShow","emit","__emit","formData","componentProps","componentObj","propsToPass","key","childModels","val","newValue","collapsed","collapsible","formSchema","toggleCollapse","inputNumber","NAMED_MASKS","extractMaskFn","mask","getMask","binding","maskFn","locale","fieldType","_a","unmaskInput","input","maskToken","unmaskedInput","maskChars","char","fillMask","replacement","inputChar","replaceIndex","prefix","suffix","useStringMask","el","inputText","_sfc_main","context","maskFilled","_resolveDirective","required","_directive_mask","validation","_toDisplayString","install","app","ACheckbox","AComboBox","ADate","ADropdown","AFieldset","AForm","ANumericInput","ATextInput"],"mappings":";;;;;;;;;;;;;;;AA2BM,UAAAA,IAAWC,GAA2CC,GAAA,YAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC1B7D,IAAIC;AACJ,MAAMC,KAAI,OAAO,SAAS,KAAKC,KAAI,CAAC,MAAM,OAAO,KAAK,UAAUC,KAAI,MAAM;AAC1E;AACAF,OAAOD,IAAI,UAAU,OAAO,SAAS,OAAO,cAAc,QAAQA,EAAE,aAAc,iBAAiB,KAAK,OAAO,UAAU,SAAS;AAClI,SAASI,GAAE,GAAG;AACZ,SAAO,OAAO,KAAK,aAAa,EAAC,IAAKC,EAAE,CAAC;AAC3C;AACA,SAASC,GAAE,GAAG;AACZ,SAAO;AACT;AACA,SAASC,GAAE,GAAG;A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d?define(["exports","vue"],n):(m=typeof globalThis<"u"?globalThis:m||self,n(m["@stonecrop/aform"]={},m.Vue))})(this,function(m,n){"use strict";const ne={id:"checkbox-container"},oe=["id","readonly","required"],le={id:"custom-checkbox"},ae=["for"],re=["innerHTML"],se=n.defineComponent({__name:"ACheckbox",props:n.mergeModels({label:{},required:{type:Boolean},readOnly:{type:Boolean},uuid:{},validation:{default:()=>({errorMessage:"&nbsp;"})}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=n.useModel(e,"modelValue");return(o,l)=>(n.openBlock(),n.createElementBlock("div",null,[n.createElementVNode("label",ne,[n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":l[0]||(l[0]=a=>t.value=a),type:"checkbox",id:o.uuid,class:"checkbox",readonly:o.readOnly,required:o.required},null,8,oe),[[n.vModelCheckbox,t.value]]),n.createElementVNode("span",le,n.toDisplayString(t.value),1)]),n.createElementVNode("label",{for:o.uuid,id:"checkbox-label"},n.toDisplayString(o.label),9,ae),n.withDirectives(n.createElementVNode("p",{innerHTML:o.validation.errorMessage},null,8,re),[[n.vShow,o.validation.errorMessage]])]))}}),E=(e,t)=>{const o=e.__vccOpts||e;for(const[l,a]of t)o[l]=a;return o},$=E(se,[["__scopeId","data-v-5093f1cb"]]),ie=n.createElementVNode("div",null,[n.createElementVNode("input",{type:"text"}),n.createElementVNode("input",{type:"text"}),n.createElementVNode("input",{type:"text"})],-1),O=n.defineComponent({__name:"AComboBox",props:["event","cellData","tableID"],setup(e){return(t,o)=>{const l=n.resolveComponent("ATableModal");return n.openBlock(),n.createBlock(l,{event:e.event,cellData:e.cellData,class:"amodal"},{default:n.withCtx(()=>[ie]),_:1},8,["event","cellData"])}}});var L;const v=typeof window<"u",ce=e=>typeof e=="string",de=()=>{};v&&(L=window==null?void 0:window.navigator)!=null&&L.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function N(e){return typeof e=="function"?e():n.unref(e)}function ue(e){return e}function pe(e){return n.getCurrentScope()?(n.onScopeDispose(e),!0):!1}function I(e){var t;const o=N(e);return(t=o==null?void 0:o.$el)!=null?t:o}const F=v?window:void 0;function fe(...e){let t,o,l,a;if(ce(e[0])||Array.isArray(e[0])?([o,l,a]=e,t=F):[t,o,l,a]=e,!t)return de;Array.isArray(o)||(o=[o]),Array.isArray(l)||(l=[l]);const r=[],s=()=>{r.forEach(d=>d()),r.length=0},i=(d,y,g,f)=>(d.addEventListener(y,g,f),()=>d.removeEventListener(y,g,f)),p=n.watch(()=>[I(t),N(a)],([d,y])=>{s(),d&&r.push(...o.flatMap(g=>l.map(f=>i(d,g,f,y))))},{immediate:!0,flush:"post"}),c=()=>{p(),s()};return pe(c),c}const P=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},q="__vueuse_ssr_handlers__";P[q]=P[q]||{};function me(e,{window:t=F,scrollTarget:o}={}){const l=n.ref(!1),a=()=>{if(!t)return;const r=t.document,s=I(e);if(!s)l.value=!1;else{const i=s.getBoundingClientRect();l.value=i.top<=(t.innerHeight||r.documentElement.clientHeight)&&i.left<=(t.innerWidth||r.documentElement.clientWidth)&&i.bottom>=0&&i.right>=0}};return n.watch(()=>I(e),()=>a(),{immediate:!0,flush:"post"}),t&&fe(o||t,"scroll",a,{capture:!1,passive:!0}),l}var x;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(x||(x={}));var he=Object.defineProperty,H=Object.getOwnPropertySymbols,ye=Object.prototype.hasOwnProperty,ge=Object.prototype.propertyIsEnumerable,R=(e,t,o)=>t in e?he(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,we=(e,t)=>{for(var o in t||(t={}))ye.call(t,o)&&R(e,o,t[o]);if(H)for(var o of H(t))ge.call(t,o)&&R(e,o,t[o]);return e};we({linear:ue},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});const w=e=>{let t=me(e).value;return t=t&&e.offsetHeight>0,t},b=e=>e.tabIndex>=0,U=e=>{const t=e.target;return M(t)},M=e=>{var t;let o;if(e instanceof HTMLTableCellElement){const l=(t=e.parentElement)==null?void 0:t.previousElementSibling;if(l){const a=Array.from(l.children)[e.cellIndex];a&&(o=a)}}else if(e instanceof HTMLTableRowElement){const l=e.previousElementSibling;l&&(o=l)}return o&&(!b(o)||!w(o))?M(o):o},be=e=>{var t;const o=e.target;let l;if(o instanceof HTMLTableCellElement){const a=(t=o.parentElement)==null?void 0:t.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&&(!b(l)||!w(l))?S(l):l},j=e=>{const t=e.target;return S(t)},S=e=>{var t;let o;if(e instanceof HTMLTableCellElement){const l=(t=e.parentElement)==null?void 0:t.nextElementSibling;if(l){const a=Array.from(l.children)[e.cellIndex];a&&(o=a)}}else if(e instanceof HTMLTableRowElement){const l=e.nextElementSibling;l&&(o=l)}return o&&(!b(o)||!w(o))?S(o):o},ke=e=>{var t;const o=e.target;let l;if(o instanceof HTMLTableCellElement){const a=(t=o.parentElement)==null?void 0:t.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&&(!b(l)||!w(l))?M(l):l},Q=e=>{const t=e.target;return B(t)},B=e=>{var t;let o;if(e.previousElementSibling)o=e.previousElementSibling;else{const l=(t=e.parentElement)==null?void 0:t.previousElementSibling;o=l==null?void 0:l.lastElementChild}return o&&(!b(o)||!w(o))?B(o):o},Y=e=>{const t=e.target;return _(t)},_=e=>{var t;let o;if(e.nextElementSibling)o=e.nextElementSibling;else{const l=(t=e.parentElement)==null?void 0:t.nextElementSibling;o=l==null?void 0:l.firstElementChild}return o&&(!b(o)||!w(o))?_(o):o},z=e=>{const t=e.target.parentElement.firstElementChild;return t&&(!b(t)||!w(t))?_(t):t},W=e=>{const t=e.target.parentElement.lastElementChild;return t&&(!b(t)||!w(t))?B(t):t},V=["alt","control","shift","meta"],Ee={ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right"},K={"keydown.up":e=>{const t=U(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.down":e=>{const t=j(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.left":e=>{const t=Q(e);e.preventDefault(),e.stopPropagation(),t&&t.focus()},"keydown.right":e=>{const t=Y(e);e.preventDefault(),e.stopPropagation(),t&&t.focus()},"keydown.control.up":e=>{const t=be(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.down":e=>{const t=ke(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.left":e=>{const t=z(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.right":e=>{const t=W(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.end":e=>{const t=W(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.enter":e=>{if(e.target instanceof HTMLTableCellElement){e.preventDefault(),e.stopPropagation();const t=j(e);t&&t.focus()}},"keydown.shift.enter":e=>{if(e.target instanceof HTMLTableCellElement){e.preventDefault(),e.stopPropagation();const t=U(e);t&&t.focus()}},"keydown.home":e=>{const t=z(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.tab":e=>{const t=Y(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.shift.tab":e=>{const t=Q(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())}};function Ce(e){const t=l=>{let a=null;l.parent&&(typeof l.parent=="string"?a=document.querySelector(l.parent):l.parent instanceof Element?a=l.parent:a=l.parent.value);let r=[];if(l.selectors)if(typeof l.selectors=="string")r=a?Array.from(a.querySelectorAll(l.selectors)):Array.from(document.querySelectorAll(l.selectors));else if(l.selectors instanceof Element)r.push(l.selectors);else if(Array.isArray(l.selectors.value))for(const s of l.selectors.value)s instanceof Element?r.push(s):r.push(s.$el);else r.push(l.selectors.value);else r=Array.from(a.children).filter(s=>b(s)&&w(s));return r},o=l=>a=>{const r=Ee[a.key]||a.key.toLowerCase();if(V.includes(r))return;const s=l.handlers||K;for(const i of Object.keys(s)){const[p,...c]=i.split(".");if(p==="keydown"&&c.includes(r)){const d=s[i],y=c.filter(f=>V.includes(f)),g=V.some(f=>{const A=f.charAt(0).toUpperCase()+f.slice(1);return a.getModifierState(A)});if(y.length>0){if(g){for(const f of V)if(c.includes(f)){const A=f.charAt(0).toUpperCase()+f.slice(1);a.getModifierState(A)&&d(a)}}}else g||d(a)}}};n.onMounted(()=>{for(const l of e){const a=t(l);for(const r of a)r.addEventListener("keydown",o(l))}}),n.onBeforeUnmount(()=>{for(const l of e){const a=t(l);for(const r of a)r.removeEventListener("keydown",o(l))}})}const De=["event","colIndex","rowIndex","tableid"],Ae={colspan:"5"},Ve=["onClick"],Ie=6,C=7,G=E(n.defineComponent({__name:"ADate",props:{colIndex:{},rowIndex:{},tableid:{},event:{},indent:{},readonly:{type:Boolean}},setup(e){const t=e,o=n.inject(t.tableid),l=new Date,a=n.ref(),r=n.ref(),s=n.ref(),i=n.ref([]);n.onMounted(async()=>{let u=o.cellData(t.colIndex,t.rowIndex);u?(u instanceof Date||(u=new Date(u)),a.value=u,r.value=a.value.getMonth(),s.value=a.value.getFullYear()):(r.value=l.getMonth(),s.value=l.getFullYear()),p(),await n.nextTick();const D=document.getElementsByClassName("selecteddate");if(D.length>0)D[0].focus();else{const h=document.getElementsByClassName("todaysdate");h.length>0&&h[0].focus()}}),n.watch([r,s],()=>{p()});const p=()=>{i.value=[];const u=new Date(s.value,r.value,1),D=u.getDay(),h=u.setDate(u.getDate()-D);for(let k of Array(43).keys())i.value.push(h+k*864e5)},c=()=>{s.value-=1},d=()=>{s.value+=1},y=()=>{r.value==0?(r.value=11,c()):r.value-=1},g=()=>{r.value==11?(r.value=0,d()):r.value+=1},f=u=>{if(r.value===l.getMonth())return l.toDateString()===new Date(u).toDateString()},A=u=>new Date(u).toDateString()===new Date(a.value).toDateString(),We=(u,D)=>{a.value=new Date(i.value[D]),Ke()},Ke=()=>{o.setCellData(t.rowIndex,t.colIndex,a.value.getTime())},Ge=n.computed(()=>new Date(s.value,r.value,1).toLocaleDateString(void 0,{year:"numeric",month:"long"}));return Ce([{parent:"table.adate",selectors:"td",handlers:{...K,"keydown.pageup":y,"keydown.shift.pageup":c,"keydown.pagedown":g,"keydown.shift.pagedown":d}}]),(u,D)=>u.readonly?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",{key:0,event:u.event,colIndex:u.colIndex,rowIndex:u.rowIndex,tableid:u.tableid,class:"adate",tabindex:"0",ref:"adatepicker"},[n.createElementVNode("table",null,[n.createElementVNode("tr",null,[n.createElementVNode("td",{onClick:y,tabindex:-1},"<"),n.createElementVNode("th",Ae,n.toDisplayString(Ge.value),1),n.createElementVNode("td",{onClick:g,tabindex:-1},">")]),(n.openBlock(),n.createElementBlock(n.Fragment,null,n.renderList(Ie,h=>n.createElementVNode("tr",{key:h},[(n.openBlock(),n.createElementBlock(n.Fragment,null,n.renderList(C,k=>n.createElementVNode("td",{key:(h-1)*C+k,contenteditable:!1,spellcheck:!1,tabindex:0,style:n.normalizeStyle({border:A(i.value[(h-1)*C+k])?"2px solid var(--focus-cell-outline)":"none",borderBottomColor:f(i.value[(h-1)*C+k])?"var(--focus-cell-outline)":"none"}),onClick:n.withModifiers(Je=>We(Je,(h-1)*C+k),["prevent","stop"]),class:n.normalizeClass({todaysdate:f(i.value[(h-1)*C+k]),selecteddate:A(i.value[(h-1)*C+k])})},n.toDisplayString(new Date(i.value[(h-1)*C+k]).getDate()),15,Ve)),64))])),64))])],8,De))}}),[["__scopeId","data-v-169f1184"]]),Me=n.defineComponent({name:"ADropdown",props:{modelValue:{type:String,required:!1,default:""},label:{type:String,required:!0},value:String,items:{type:Array,required:!1,default:()=>[]},isAsync:{type:Boolean,required:!1,default:!1}},emits:["update:modelValue","filterChanged"],data(){return{results:[],search:this.modelValue,isLoading:!1,arrowCounter:0,isOpen:!1}},watch:{items:function(e,t){this.isLoading=!1,this.results=e}},mounted(){document.addEventListener("click",this.handleClickOutside),this.filterResults()},destroyed(){document.removeEventListener("click",this.handleClickOutside)},methods:{setResult(e){this.search=e,this.closeResults()},filterResults(){this.results=this.items.filter(e=>e.toLowerCase().indexOf(this.search.toLowerCase())>-1)},onChange(){this.isOpen=!0,this.isAsync?(this.isLoading=!0,this.$emit("filterChanged",this.search)):this.filterResults()},handleClickOutside(e){this.$el.contains(e.target)||(this.closeResults(),this.arrowCounter=0)},closeResults(){this.isOpen=!1,this.items.includes(this.search)||(this.search=""),this.$emit("update:modelValue",this.search)},onArrowDown(){this.arrowCounter<this.results.length&&(this.arrowCounter=this.arrowCounter+1)},onArrowUp(){this.arrowCounter>0&&(this.arrowCounter=this.arrowCounter-1)},onEnter(){this.search=this.results[this.arrowCounter],this.closeResults(),this.arrowCounter=0},openWithSearch(){this.search="",this.onChange(),this.$refs.mopInput.focus()}}}),Se={class:"input-wrapper"},Be={id:"autocomplete-results",class:"autocomplete-results"},_e={key:0,class:"loading autocomplete-result"},Te=["onClick"];function $e(e,t,o,l,a,r){return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["autocomplete",{isOpen:e.isOpen}])},[n.createElementVNode("div",Se,[n.withDirectives(n.createElementVNode("input",{ref:"mopInput",type:"text",onInput:t[0]||(t[0]=(...s)=>e.onChange&&e.onChange(...s)),onFocus:t[1]||(t[1]=(...s)=>e.onChange&&e.onChange(...s)),"onUpdate:modelValue":t[2]||(t[2]=s=>e.search=s),onKeydown:[t[3]||(t[3]=n.withKeys((...s)=>e.onArrowDown&&e.onArrowDown(...s),["down"])),t[4]||(t[4]=n.withKeys((...s)=>e.onArrowUp&&e.onArrowUp(...s),["up"])),t[5]||(t[5]=n.withKeys((...s)=>e.onEnter&&e.onEnter(...s),["enter"]))]},null,544),[[n.vModelText,e.search]]),n.withDirectives(n.createElementVNode("ul",Be,[e.isLoading?(n.openBlock(),n.createElementBlock("li",_e,"Loading results...")):(n.openBlock(!0),n.createElementBlock(n.Fragment,{key:1},n.renderList(e.results,(s,i)=>(n.openBlock(),n.createElementBlock("li",{key:i,onClick:p=>e.setResult(s),class:n.normalizeClass(["autocomplete-result",{"is-active":i===e.arrowCounter}])},n.toDisplayString(s),11,Te))),128))],512),[[n.vShow,e.isOpen]]),n.createElementVNode("label",null,n.toDisplayString(e.label),1)])],2)}const J=E(Me,[["render",$e]]),Oe=E(n.defineComponent({__name:"CollapseButton",props:{collapsed:{type:Boolean}},setup(e){return(t,o)=>(n.openBlock(),n.createElementBlock("button",{class:n.normalizeClass(["collapse-button",t.collapsed?"rotated":"unrotated"])},"×",2))}}),[["__scopeId","data-v-6f1c1b45"]]),T=E(n.defineComponent({__name:"AForm",props:{modelValue:{},data:{},readonly:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const o=e,l=t,a=n.ref(o.data||{}),r=i=>{let p={};for(const[c,d]of Object.entries(i))["component","fieldtype"].includes(c)||(p[c]=d),c==="rows"&&d&&d.length===0&&(p.rows=a.value[i.fieldname]);return p},s=n.computed({get:()=>o.modelValue.map((i,p)=>n.computed({get(){return i.value},set:c=>{o.modelValue[p].value=c,l("update:modelValue",o.modelValue)}})),set:()=>{}});return(i,p)=>(n.openBlock(),n.createElementBlock("form",null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(i.modelValue,(c,d)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(c.component),n.mergeProps({key:d,schema:c,modelValue:s.value[d].value,"onUpdate:modelValue":y=>s.value[d].value=y,data:a.value[c.fieldname],readonly:i.readonly},r(c)),null,16,["schema","modelValue","onUpdate:modelValue","data","readonly"]))),128))]))}}),[["__scopeId","data-v-74d66cf2"]]),X=E(n.defineComponent({__name:"AFieldset",props:{schema:{},label:{},collapsible:{type:Boolean},data:{}},setup(e){const t=e,o=n.ref(t.data||[]);let l=n.ref(!1),a=n.ref(t.collapsible);const r=n.ref(t.schema);function s(i){i.preventDefault(),a.value&&(l.value=!l.value)}return(i,p)=>(n.openBlock(),n.createElementBlock("fieldset",null,[n.createElementVNode("legend",{onClick:s,onSubmit:s},[n.createTextVNode(n.toDisplayString(i.label)+" ",1),n.unref(a)?(n.openBlock(),n.createBlock(Oe,{key:0,collapsed:n.unref(l)},null,8,["collapsed"])):n.createCommentVNode("",!0)],32),n.renderSlot(i.$slots,"default",{collapsed:n.unref(l)},()=>[n.withDirectives(n.createVNode(T,{modelValue:r.value,"onUpdate:modelValue":p[0]||(p[0]=c=>r.value=c),data:o.value},null,8,["modelValue","data"]),[[n.vShow,!n.unref(l)]])],!0)]))}}),[["__scopeId","data-v-cad9b578"]]),Le=["id","disabled","required"],ve=["for"],Ne=["innerHTML"],Z=E(n.defineComponent({__name:"ANumericInput",props:n.mergeModels({label:{},required:{type:Boolean},readonly:{type:Boolean},uuid:{},validation:{default:()=>({errorMessage:"&nbsp;"})}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=n.useModel(e,"modelValue");return(o,l)=>(n.openBlock(),n.createElementBlock("div",null,[n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":l[0]||(l[0]=a=>t.value=a),type:"number",id:o.uuid,disabled:o.readonly,required:o.required},null,8,Le),[[n.vModelText,t.value]]),n.createElementVNode("label",{for:o.uuid},n.toDisplayString(o.label),9,ve),n.withDirectives(n.createElementVNode("p",{innerHTML:o.validation.errorMessage},null,8,Ne),[[n.vShow,o.validation.errorMessage]])]))}}),[["__scopeId","data-v-02907cd6"]]),ee={date:"##/##/####",datetime:"####/##/## ##:##",time:"##:##",fulltime:"##:##:##",phone:"(###) ### - ####",card:"#### #### #### ####"};function Fe(e){try{return Function(`"use strict";return (${e})`)()}catch{}}function Pe(e){var o;let t=e.value;if(t){const l=Fe(t);if(l){const a=e.instance.locale;t=l(a)}}else{const a=(o=e.instance.schema.fieldtype)==null?void 0:o.toLowerCase();a&&ee[a]&&(t=ee[a])}return t}function qe(e,t){t||(t="#");let o=e;const l=[t,"/","-","(",")"," "];for(const a of l)o=o.replaceAll(a,"");return o}function xe(e,t,o){o||(o="#");let l=t;for(const a of e){const r=l.indexOf(o);if(r!==-1){const s=l.substring(0,r),i=l.substring(r+1);l=s+a+i}}return l.slice(0,t.length)}function He(e,t){const o=Pe(t);if(!o)return;const l="#",a=e.value,r=qe(a,l);if(r){const s=xe(r,o,l);t.instance.maskFilled&&(t.instance.maskFilled=!s.includes(l)),e.value=s}else e.value=o}const Re=n.defineComponent({name:"ATextInput",props:{schema:{type:Object,required:!0},label:{type:String,required:!0},modelValue:{type:null},mask:{type:String},required:{type:Boolean},readonly:{type:Boolean},uuid:{type:String},validation:{type:Object,default:()=>({errorMessage:"&nbsp;"})}},setup(e,t){const o=n.ref(!1),l=n.inject("locale","");return{inputText:n.computed({get(){return e.modelValue},set(r){t.emit("update:modelValue",r)}}),locale:l,maskFilled:o}},directives:{mask:He}}),Ue=["id","disabled","maxlength","required"],je=["for"],Qe=["innerHTML"];function Ye(e,t,o,l,a,r){const s=n.resolveDirective("mask");return n.openBlock(),n.createElementBlock("div",null,[n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":t[0]||(t[0]=i=>e.inputText=i),id:e.uuid,disabled:e.readonly,maxlength:e.mask?e.maskFilled&&e.mask.length:void 0,required:e.required},null,8,Ue),[[n.vModelText,e.inputText],[s,e.mask]]),n.createElementVNode("label",{for:e.uuid},n.toDisplayString(e.label),9,je),n.withDirectives(n.createElementVNode("p",{innerHTML:e.validation.errorMessage},null,8,Qe),[[n.vShow,e.validation.errorMessage]])])}const te=E(Re,[["render",Ye],["__scopeId","data-v-76dba9b8"]]);function ze(e){e.component("ACheckbox",$),e.component("ACombobox",O),e.component("ADate",G),e.component("ADropdown",J),e.component("AFieldset",X),e.component("AForm",T),e.component("ANumericInput",Z),e.component("ATextInput",te)}m.ACheckbox=$,m.AComboBox=O,m.ADate=G,m.ADropdown=J,m.AFieldset=X,m.AForm=T,m.ANumericInput=Z,m.ATextInput=te,m.install=ze,Object.defineProperty(m,Symbol.toStringTag,{value:"Module"})});
2
+ //# sourceMappingURL=aform.umd.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aform.umd.cjs","sources":["../src/components/form/ACheckbox.vue","../../utilities/dist/utilities.js","../src/components/form/ADate.vue","../src/components/form/ADropdown.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>\n\t\t<label id=\"checkbox-container\">\n\t\t\t<input v-model=\"checkbox\" type=\"checkbox\" :id=\"uuid\" class=\"checkbox\" :readonly=\"readOnly\" :required=\"required\" />\n\t\t\t<span id=\"custom-checkbox\">{{ checkbox }}</span>\n\t\t</label>\n\t\t<label :for=\"uuid\" id=\"checkbox-label\">{{ 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 { 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: '&nbsp;' }),\n\t}\n)\n\nconst checkbox = defineModel<InputHTMLAttributes['checked']>()\n</script>\n\n<style scoped>\ndiv {\n\tdisplay: inline-block;\n\tmin-width: 40ch;\n\tborder: 1px solid transparent;\n\tpadding: 0rem;\n\tmargin: 0rem;\n\tmargin-right: 1ch;\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\n.checkbox {\n\tvisibility: hidden;\n}\n\n.checkbox + #custom-checkbox:after {\n\tcontent: '⬡';\n\tpadding: 1ch 0 0.5ch 0;\n\tfont-size: 120%;\n\tcursor: pointer;\n\tposition: relative;\n\tleft: -18px;\n}\n\n.checkbox:checked + #custom-checkbox:after {\n\tcontent: '⬣';\n\tpadding: 1ch 0 0.5ch 0;\n\tfont-size: 120%;\n\tcursor: pointer;\n\tposition: relative;\n\tleft: -18px;\n}\n\n#custom-checkbox {\n\tdisplay: inline-block;\n}\n\n#checkbox-container {\n\tdisplay: inline-block;\n\tmin-width: 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\theight: 1.15rem;\n\tborder-radius: 0.25rem;\n}\n\n#checkbox-container:hover {\n\tborder: 1px solid var(--input-active-border-color);\n}\n\n#checkbox-container:hover + label {\n\tcolor: var(--input-active-label-color);\n}\n\n#checkbox-label {\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</style>\n","import { unref as Q, getCurrentScope as U, onScopeDispose as K, ref as B, watch as D, onMounted as W, onBeforeUnmount as V } from \"vue\";\nvar v;\nconst M = typeof window < \"u\", F = (e) => typeof e == \"string\", j = () => {\n};\nM && ((v = window == null ? void 0 : window.navigator) != null && v.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nfunction H(e) {\n return typeof e == \"function\" ? e() : Q(e);\n}\nfunction q(e) {\n return e;\n}\nfunction G(e) {\n return U() ? (K(e), !0) : !1;\n}\nfunction y(e) {\n var t;\n const r = H(e);\n return (t = r == null ? void 0 : r.$el) != null ? t : r;\n}\nconst N = M ? window : void 0;\nfunction z(...e) {\n let t, r, n, o;\n if (F(e[0]) || Array.isArray(e[0]) ? ([r, n, o] = e, t = N) : [t, r, n, o] = e, !t)\n return j;\n Array.isArray(r) || (r = [r]), Array.isArray(n) || (n = [n]);\n const l = [], s = () => {\n l.forEach((c) => c()), l.length = 0;\n }, a = (c, g, p, i) => (c.addEventListener(g, p, i), () => c.removeEventListener(g, p, i)), C = D(() => [y(t), H(o)], ([c, g]) => {\n s(), c && l.push(...r.flatMap((p) => n.map((i) => a(c, p, i, g))));\n }, { immediate: !0, flush: \"post\" }), d = () => {\n C(), s();\n };\n return G(d), d;\n}\nconst O = typeof globalThis < \"u\" ? globalThis : typeof window < \"u\" ? window : typeof global < \"u\" ? global : typeof self < \"u\" ? self : {}, T = \"__vueuse_ssr_handlers__\";\nO[T] = O[T] || {};\nfunction J(e, { window: t = N, scrollTarget: r } = {}) {\n const n = B(!1), o = () => {\n if (!t)\n return;\n const l = t.document, s = y(e);\n if (!s)\n n.value = !1;\n else {\n const a = s.getBoundingClientRect();\n n.value = a.top <= (t.innerHeight || l.documentElement.clientHeight) && a.left <= (t.innerWidth || l.documentElement.clientWidth) && a.bottom >= 0 && a.right >= 0;\n }\n };\n return D(() => y(e), () => o(), { immediate: !0, flush: \"post\" }), t && z(r || t, \"scroll\", o, {\n capture: !1,\n passive: !0\n }), n;\n}\nvar P;\n(function(e) {\n e.UP = \"UP\", e.RIGHT = \"RIGHT\", e.DOWN = \"DOWN\", e.LEFT = \"LEFT\", e.NONE = \"NONE\";\n})(P || (P = {}));\nvar X = Object.defineProperty, I = Object.getOwnPropertySymbols, Y = Object.prototype.hasOwnProperty, Z = Object.prototype.propertyIsEnumerable, _ = (e, t, r) => t in e ? X(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, ee = (e, t) => {\n for (var r in t || (t = {}))\n Y.call(t, r) && _(e, r, t[r]);\n if (I)\n for (var r of I(t))\n Z.call(t, r) && _(e, r, t[r]);\n return e;\n};\nconst te = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nee({\n linear: q\n}, te);\nconst f = (e) => {\n let t = J(e).value;\n return t = t && e.offsetHeight > 0, t;\n}, u = (e) => e.tabIndex >= 0, A = (e) => {\n const t = e.target;\n return E(t);\n}, E = (e) => {\n var r;\n let t;\n if (e instanceof HTMLTableCellElement) {\n const n = (r = e.parentElement) == null ? void 0 : r.previousElementSibling;\n if (n) {\n const l = Array.from(n.children)[e.cellIndex];\n l && (t = l);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const n = e.previousElementSibling;\n n && (t = n);\n }\n return t && (!u(t) || !f(t)) ? E(t) : t;\n}, ne = (e) => {\n var n;\n const t = e.target;\n let r;\n if (t instanceof HTMLTableCellElement) {\n const o = (n = t.parentElement) == null ? void 0 : n.parentElement;\n if (o) {\n const s = o.firstElementChild.children[t.cellIndex];\n s && (r = s);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.parentElement;\n if (o) {\n const l = o.firstElementChild;\n l && (r = l);\n }\n }\n return r && (!u(r) || !f(r)) ? w(r) : r;\n}, x = (e) => {\n const t = e.target;\n return w(t);\n}, w = (e) => {\n var r;\n let t;\n if (e instanceof HTMLTableCellElement) {\n const n = (r = e.parentElement) == null ? void 0 : r.nextElementSibling;\n if (n) {\n const l = Array.from(n.children)[e.cellIndex];\n l && (t = l);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const n = e.nextElementSibling;\n n && (t = n);\n }\n return t && (!u(t) || !f(t)) ? w(t) : t;\n}, re = (e) => {\n var n;\n const t = e.target;\n let r;\n if (t instanceof HTMLTableCellElement) {\n const o = (n = t.parentElement) == null ? void 0 : n.parentElement;\n if (o) {\n const s = o.lastElementChild.children[t.cellIndex];\n s && (r = s);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.parentElement;\n if (o) {\n const l = o.lastElementChild;\n l && (r = l);\n }\n }\n return r && (!u(r) || !f(r)) ? E(r) : r;\n}, k = (e) => {\n const t = e.target;\n return h(t);\n}, h = (e) => {\n var r;\n let t;\n if (e.previousElementSibling)\n t = e.previousElementSibling;\n else {\n const n = (r = e.parentElement) == null ? void 0 : r.previousElementSibling;\n t = n == null ? void 0 : n.lastElementChild;\n }\n return t && (!u(t) || !f(t)) ? h(t) : t;\n}, S = (e) => {\n const t = e.target;\n return b(t);\n}, b = (e) => {\n var r;\n let t;\n if (e.nextElementSibling)\n t = e.nextElementSibling;\n else {\n const n = (r = e.parentElement) == null ? void 0 : r.nextElementSibling;\n t = n == null ? void 0 : n.firstElementChild;\n }\n return t && (!u(t) || !f(t)) ? b(t) : t;\n}, L = (e) => {\n const n = e.target.parentElement.firstElementChild;\n return n && (!u(n) || !f(n)) ? b(n) : n;\n}, R = (e) => {\n const n = e.target.parentElement.lastElementChild;\n return n && (!u(n) || !f(n)) ? h(n) : n;\n}, m = [\"alt\", \"control\", \"shift\", \"meta\"], oe = {\n ArrowUp: \"up\",\n ArrowDown: \"down\",\n ArrowLeft: \"left\",\n ArrowRight: \"right\"\n}, le = {\n \"keydown.up\": (e) => {\n const t = A(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.down\": (e) => {\n const t = x(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.left\": (e) => {\n const t = k(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.right\": (e) => {\n const t = S(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 = re(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.left\": (e) => {\n const t = L(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.right\": (e) => {\n const t = R(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.end\": (e) => {\n const t = R(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 r = x(e);\n r && r.focus();\n }\n },\n \"keydown.shift.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const r = A(e);\n r && r.focus();\n }\n },\n \"keydown.home\": (e) => {\n const t = L(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.tab\": (e) => {\n const t = S(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.shift.tab\": (e) => {\n const t = k(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n }\n};\nfunction ie(e) {\n const t = (n) => {\n let o = null;\n n.parent && (typeof n.parent == \"string\" ? o = document.querySelector(n.parent) : n.parent instanceof Element ? o = n.parent : o = n.parent.value);\n let l = [];\n if (n.selectors)\n if (typeof n.selectors == \"string\")\n l = o ? Array.from(o.querySelectorAll(n.selectors)) : Array.from(document.querySelectorAll(n.selectors));\n else if (n.selectors instanceof Element)\n l.push(n.selectors);\n else if (Array.isArray(n.selectors.value))\n for (const s of n.selectors.value)\n s instanceof Element ? l.push(s) : l.push(s.$el);\n else\n l.push(n.selectors.value);\n else\n l = Array.from(o.children).filter((a) => u(a) && f(a));\n return l;\n }, r = (n) => (o) => {\n const l = oe[o.key] || o.key.toLowerCase();\n if (m.includes(l))\n return;\n const s = n.handlers || le;\n for (const a of Object.keys(s)) {\n const [C, ...d] = a.split(\".\");\n if (C === \"keydown\" && d.includes(l)) {\n const c = s[a], g = d.filter((i) => m.includes(i)), p = m.some((i) => {\n const $ = i.charAt(0).toUpperCase() + i.slice(1);\n return o.getModifierState($);\n });\n if (g.length > 0) {\n if (p) {\n for (const i of m)\n if (d.includes(i)) {\n const $ = i.charAt(0).toUpperCase() + i.slice(1);\n o.getModifierState($) && c(o);\n }\n }\n } else\n p || c(o);\n }\n }\n };\n W(() => {\n for (const n of e) {\n const o = t(n);\n for (const l of o)\n l.addEventListener(\"keydown\", r(n));\n }\n }), V(() => {\n for (const n of e) {\n const o = t(n);\n for (const l of o)\n l.removeEventListener(\"keydown\", r(n));\n }\n });\n}\nfunction ae(e) {\n}\nexport {\n le as defaultKeypressHandlers,\n ae as install,\n ie as useKeyboardNav\n};\n//# sourceMappingURL=utilities.js.map\n","<template>\n\t<div\n\t\tv-if=\"!readonly\"\n\t\t:event=\"event\"\n\t\t:colIndex=\"colIndex\"\n\t\t:rowIndex=\"rowIndex\"\n\t\t:tableid=\"tableid\"\n\t\tclass=\"adate\"\n\t\ttabindex=\"0\"\n\t\tref=\"adatepicker\">\n\t\t<table>\n\t\t\t<tr>\n\t\t\t\t<td @click=\"previousMonth\" :tabindex=\"-1\">&lt;</td>\n\t\t\t\t<th colspan=\"5\">{{ monthAndYear }}</th>\n\t\t\t\t<td @click=\"nextMonth\" :tabindex=\"-1\">&gt;</td>\n\t\t\t</tr>\n\t\t\t<tr v-for=\"rowNo in numberOfRows\" :key=\"rowNo\">\n\t\t\t\t<!-- TODO: (style) remove inline styling and replace with theme package -->\n\t\t\t\t<td\n\t\t\t\t\tv-for=\"colNo in numberOfColumns\"\n\t\t\t\t\t:key=\"(rowNo - 1) * numberOfColumns + 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:style=\"{\n\t\t\t\t\t\tborder: isSelectedDate(currentDates[(rowNo - 1) * numberOfColumns + colNo])\n\t\t\t\t\t\t\t? '2px solid var(--focus-cell-outline)'\n\t\t\t\t\t\t\t: 'none',\n\t\t\t\t\t\tborderBottomColor: isTodaysDate(currentDates[(rowNo - 1) * numberOfColumns + colNo])\n\t\t\t\t\t\t\t? 'var(--focus-cell-outline)'\n\t\t\t\t\t\t\t: 'none',\n\t\t\t\t\t}\"\n\t\t\t\t\t@click.prevent.stop=\"selectDate($event, (rowNo - 1) * numberOfColumns + colNo)\"\n\t\t\t\t\t:class=\"{\n\t\t\t\t\t\ttodaysdate: isTodaysDate(currentDates[(rowNo - 1) * numberOfColumns + colNo]),\n\t\t\t\t\t\tselecteddate: isSelectedDate(currentDates[(rowNo - 1) * numberOfColumns + colNo]),\n\t\t\t\t\t}\">\n\t\t\t\t\t{{ new Date(currentDates[(rowNo - 1) * numberOfColumns + 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 { computed, inject, nextTick, onMounted, ref, watch } from 'vue'\n\nimport { TableDataStore } from '@stonecrop/atable'\nimport { defaultKeypressHandlers, useKeyboardNav } from '@stonecrop/utilities'\n\nconst props = defineProps<{\n\tcolIndex?: number\n\trowIndex?: number\n\ttableid?: string\n\tevent?: Event\n\tindent?: number\n\treadonly?: boolean\n}>()\n\nconst tableData = inject<TableDataStore>(props.tableid)\n\nconst numberOfRows = 6\nconst numberOfColumns = 7\nconst todaysDate = new Date()\n\nconst selectedDate = ref<Date>()\nconst currentMonth = ref<number>()\nconst currentYear = ref<number>()\nconst currentDates = ref<number[]>([])\n// const width = ref('')\n\nonMounted(async () => {\n\tlet cellDate = tableData.cellData<string | number | Date>(props.colIndex, props.rowIndex)\n\tif (cellDate) {\n\t\tif (!(cellDate instanceof Date)) {\n\t\t\tcellDate = new Date(cellDate)\n\t\t}\n\n\t\tselectedDate.value = cellDate\n\t\tcurrentMonth.value = selectedDate.value.getMonth()\n\t\tcurrentYear.value = selectedDate.value.getFullYear()\n\t} else {\n\t\tcurrentMonth.value = todaysDate.getMonth()\n\t\tcurrentYear.value = todaysDate.getFullYear()\n\t}\n\n\trenderMonth()\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\nwatch([currentMonth, currentYear], () => {\n\trenderMonth()\n})\n\nconst renderMonth = () => {\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\tfor (let dayIndex of Array(43).keys()) {\n\t\tcurrentDates.value.push(calendarStartDay + dayIndex * 86400000)\n\t}\n}\n\nconst previousYear = () => {\n\tcurrentYear.value -= 1\n}\n\nconst nextYear = () => {\n\tcurrentYear.value += 1\n}\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\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 selectDate = (event: Event, currentIndex: number) => {\n\tselectedDate.value = new Date(currentDates.value[currentIndex])\n\tupdateData()\n\t// TODO: (typing) figure out a way to close datepicker\n\t// context.refs.adatepicker.destroy()\n}\n\nconst updateData = () => {\n\t// TODO: check proper date format to feed back (assuming number for now)\n\ttableData.setCellData(props.rowIndex, props.colIndex, selectedDate.value.getTime())\n}\n\n// const dayWidth = computed(() => {\n// \tconst widthValue = Number(width.value.replace('px', ''))\n// \treturn `${widthValue / (numberOfColumns - 1)}px`\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: 'table.adate',\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},\n\t\t},\n\t},\n])\n</script>\n\n<style scoped>\n@import '@/theme/aform.css';\n\n.adate {\n\tborder: 2px solid var(--focus-cell-outline);\n\tposition: absolute;\n\tz-index: 100;\n\tfont-size: var(--table-font-size);\n\tdisplay: inline-table;\n\tbackground-color: var(--row-color-zebra-light);\n\tcolor: var(--cell-text-color);\n\toutline: none;\n\twidth: calc(100% - 4px);\n}\n\n.adate tr {\n\theight: 1.15rem;\n\ttext-align: center;\n\tvertical-align: middle;\n}\n\n.adate td {\n\tborder: 2px solid transparent;\n\tmin-width: 2.25ch; /* this doesn't zoom correctly */\n}\n\n.adate td:hover {\n\tborder: 2px solid var(--focus-cell-outline);\n}\n\n.adate td {\n\tborder: 1px;\n\tborder-style: solid;\n\tborder-color: var(--cell-border-color);\n\tborder-radius: 0px;\n\tbox-sizing: border-box;\n\tmargin: 0px;\n\toutline: none;\n\tbox-shadow: none;\n\tcolor: var(--cell-text-color);\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n\tpadding-left: 0.5ch;\n\tpadding-right: 0.5ch;\n}\n\n.adate td:focus,\n.adate td:focus-within {\n\tbackground-color: var(--focus-cell-background);\n\toutline-width: 2px;\n\toutline-style: solid;\n\toutline-color: var(--focus-cell-outline);\n\tbox-shadow: none;\n\toverflow: hidden;\n\tmin-height: 1.15em;\n\tmax-height: 1.15em;\n\toverflow: hidden;\n}\n\nbutton {\n\tbackground-color: var(--row-color-zebra-light);\n\tborder: none;\n\tpadding: 0px;\n\tmargin: 0px;\n\tcolor: var(--cell-text-color);\n\toutline: none;\n\tfont-size: var(--table-font-size);\n}\n\n.dateheader {\n\tfont-weight: 700;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n}\n\n.adate .todaysdate {\n\tborder-bottom-color: var(--focus-cell-outline);\n}\n\n.adate .selecteddate {\n\tborder: 2px solid var(--focus-cell-outline);\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\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 lang=\"ts\">\nimport { defineComponent } from 'vue'\nexport default defineComponent({\n\tname: 'ADropdown',\n\tprops: {\n\t\tmodelValue: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\t\tlabel: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tvalue: String,\n\t\titems: {\n\t\t\ttype: Array,\n\t\t\trequired: false,\n\t\t\tdefault: () => [],\n\t\t},\n\t\tisAsync: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\temits: ['update:modelValue', 'filterChanged'],\n\tdata() {\n\t\treturn {\n\t\t\tresults: [],\n\t\t\tsearch: this.modelValue,\n\t\t\tisLoading: false,\n\t\t\tarrowCounter: 0,\n\t\t\tisOpen: false,\n\t\t}\n\t},\n\twatch: {\n\t\titems: function (value, oldValue) {\n\t\t\tthis.isLoading = false\n\t\t\tthis.results = value\n\t\t},\n\t},\n\tmounted() {\n\t\tdocument.addEventListener('click', this.handleClickOutside)\n\t\tthis.filterResults()\n\t},\n\tdestroyed() {\n\t\tdocument.removeEventListener('click', this.handleClickOutside)\n\t},\n\tmethods: {\n\t\tsetResult(result) {\n\t\t\tthis.search = result\n\t\t\tthis.closeResults()\n\t\t},\n\t\tfilterResults() {\n\t\t\tthis.results = this.items.filter(item => {\n\t\t\t\treturn item.toLowerCase().indexOf(this.search.toLowerCase()) > -1\n\t\t\t})\n\t\t},\n\t\tonChange() {\n\t\t\tthis.isOpen = true\n\t\t\tif (this.isAsync) {\n\t\t\t\tthis.isLoading = true\n\t\t\t\tthis.$emit('filterChanged', this.search)\n\t\t\t} else {\n\t\t\t\tthis.filterResults()\n\t\t\t}\n\t\t},\n\t\thandleClickOutside(event) {\n\t\t\tif (!this.$el.contains(event.target)) {\n\t\t\t\tthis.closeResults()\n\t\t\t\tthis.arrowCounter = 0\n\t\t\t}\n\t\t},\n\t\tcloseResults() {\n\t\t\tthis.isOpen = false\n\n\t\t\tif (!this.items.includes(this.search)) {\n\t\t\t\tthis.search = ''\n\t\t\t}\n\n\t\t\tthis.$emit('update:modelValue', this.search)\n\t\t},\n\t\tonArrowDown() {\n\t\t\tif (this.arrowCounter < this.results.length) {\n\t\t\t\tthis.arrowCounter = this.arrowCounter + 1\n\t\t\t}\n\t\t},\n\t\tonArrowUp() {\n\t\t\tif (this.arrowCounter > 0) {\n\t\t\t\tthis.arrowCounter = this.arrowCounter - 1\n\t\t\t}\n\t\t},\n\t\tonEnter() {\n\t\t\tthis.search = this.results[this.arrowCounter]\n\t\t\tthis.closeResults()\n\t\t\tthis.arrowCounter = 0\n\t\t},\n\t\topenWithSearch() {\n\t\t\tthis.search = ''\n\t\t\tthis.onChange()\n\t\t\tthis.$refs.mopInput.focus()\n\t\t},\n\t},\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","<template>\n\t<form>\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>\nform {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: wrap;\n\tjustify-content: flex-start;\n\talign-items: baseline;\n}\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 || [])\nlet collapsed = ref(false)\nlet 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>\n\t\t<input v-model=\"inputNumber\" type=\"number\" :id=\"uuid\" :disabled=\"readonly\" :required=\"required\" />\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\">\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: '&nbsp;' }),\n\t}\n)\n\nconst inputNumber = defineModel<number>()\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","import type { FormSchema } from 'types'\nimport { 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>\n\t\t<input\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<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 lang=\"ts\">\nimport { defineComponent, inject, PropType, ref, computed } from 'vue'\n\nimport { FormSchema } from 'types'\nimport { useStringMask } from '@/directives/mask'\n\n// TODO: when moving to composition API, figure out how to provide mask\n// as a custom directive\nexport default defineComponent({\n\tname: 'ATextInput',\n\tprops: {\n\t\tschema: {\n\t\t\ttype: Object as PropType<FormSchema>,\n\t\t\trequired: true,\n\t\t},\n\t\tlabel: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tmodelValue: {\n\t\t\ttype: null as unknown as PropType<string | number>,\n\t\t},\n\t\tmask: {\n\t\t\ttype: String,\n\t\t},\n\t\trequired: {\n\t\t\ttype: Boolean,\n\t\t},\n\t\treadonly: {\n\t\t\ttype: Boolean,\n\t\t},\n\t\tuuid: {\n\t\t\ttype: String,\n\t\t},\n\t\tvalidation: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({ errorMessage: '&nbsp;' }),\n\t\t},\n\t},\n\tsetup(props, context) {\n\t\tconst maskFilled = ref(false)\n\n\t\t// TODO: (state) replace with state management\n\t\tconst locale = inject<string>('locale', '')\n\n\t\tconst inputText = computed({\n\t\t\tget() {\n\t\t\t\treturn props.modelValue\n\t\t\t},\n\t\t\tset(newValue) {\n\t\t\t\tcontext.emit('update:modelValue', newValue)\n\t\t\t},\n\t\t})\n\n\t\treturn { inputText, locale, maskFilled }\n\t},\n\tdirectives: {\n\t\tmask: useStringMask,\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","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 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('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, AFieldset, AForm, ANumericInput, ATextInput, install }\n"],"names":["checkbox","_useModel","__props","v","M","F","j","H","Q","q","G","U","K","y","r","N","z","n","o","l","c","a","g","p","i","C","D","d","O","T","J","B","P","X","I","Y","Z","_","ee","f","u","A","E","t","ne","s","w","x","re","k","h","S","b","L","R","m","oe","le","ie","$","W","V","numberOfRows","numberOfColumns","props","tableData","inject","todaysDate","selectedDate","ref","currentMonth","currentYear","currentDates","onMounted","cellDate","renderMonth","nextTick","$selectedDate","$todaysDate","watch","firstOfMonth","monthStartWeekday","calendarStartDay","dayIndex","previousYear","nextYear","previousMonth","nextMonth","isTodaysDate","day","isSelectedDate","selectDate","event","currentIndex","updateData","monthAndYear","computed","useKeyboardNav","defaultKeypressHandlers","_sfc_main$5","defineComponent","value","oldValue","result","item","_hoisted_1","_hoisted_2","_hoisted_3","_sfc_render","_ctx","_cache","$props","$setup","$data","isOpen","_normalizeClass","_createElementVNode","_withDirectives","search","args","$event","_withKeys","_vModelText","_openBlock","_createElementBlock","_Fragment","_renderList","setResult","_vShow","emit","__emit","formData","componentProps","componentObj","propsToPass","key","childModels","val","newValue","collapsed","collapsible","formSchema","toggleCollapse","inputNumber","NAMED_MASKS","extractMaskFn","mask","getMask","binding","maskFn","locale","fieldType","_a","unmaskInput","input","maskToken","unmaskedInput","maskChars","char","fillMask","replacement","inputChar","replaceIndex","prefix","suffix","useStringMask","el","inputText","_sfc_main","context","maskFilled","_resolveDirective","required","_directive_mask","validation","_toDisplayString","install","app","ACheckbox","AComboBox","ADate","ADropdown","AFieldset","AForm","ANumericInput","ATextInput"],"mappings":"4nBA2BM,MAAAA,EAAWC,EAAAA,SAA2CC,EAAA,YAAC,kqCC1B7D,IAAIC,EACJ,MAAMC,EAAI,OAAO,OAAS,IAAKC,GAAK,GAAM,OAAO,GAAK,SAAUC,GAAI,IAAM,CAC1E,EACAF,IAAOD,EAAI,QAAU,KAAO,OAAS,OAAO,YAAc,MAAQA,EAAE,WAAc,iBAAiB,KAAK,OAAO,UAAU,SAAS,EAClI,SAASI,EAAE,EAAG,CACZ,OAAO,OAAO,GAAK,WAAa,EAAC,EAAKC,EAAAA,MAAE,CAAC,CAC3C,CACA,SAASC,GAAE,EAAG,CACZ,OAAO,CACT,CACA,SAASC,GAAE,EAAG,CACZ,OAAOC,EAAAA,gBAAG,GAAIC,iBAAE,CAAC,EAAG,IAAM,EAC5B,CACA,SAASC,EAAE,EAAG,CACZ,IAAI,EACJ,MAAMC,EAAIP,EAAE,CAAC,EACb,OAAQ,EAAIO,GAAK,KAAO,OAASA,EAAE,MAAQ,KAAO,EAAIA,CACxD,CACA,MAAMC,EAAIX,EAAI,OAAS,OACvB,SAASY,MAAK,EAAG,CACf,IAAI,EAAGF,EAAGG,EAAGC,EACb,GAAIb,GAAE,EAAE,CAAC,CAAC,GAAK,MAAM,QAAQ,EAAE,CAAC,CAAC,GAAK,CAACS,EAAGG,EAAGC,CAAC,EAAI,EAAG,EAAIH,GAAK,CAAC,EAAGD,EAAGG,EAAGC,CAAC,EAAI,EAAG,CAAC,EAC/E,OAAOZ,GACT,MAAM,QAAQQ,CAAC,IAAMA,EAAI,CAACA,CAAC,GAAI,MAAM,QAAQG,CAAC,IAAMA,EAAI,CAACA,CAAC,GAC1D,MAAME,EAAI,GAAI,EAAI,IAAM,CACtBA,EAAE,QAASC,GAAMA,EAAG,CAAA,EAAGD,EAAE,OAAS,CACn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,UAAA/D,EAAA,KAAAA,EAAA,YAAAA,EAAA,KAAA,OAAA,OAGY0D,SAAAA,EAAAA,QAAAA,EAKDrB,KAAAA,EAAAA,EAAAA,EAAAA,CAAAA,CAAAA,EAAAA,WAAAA,EAAAA,SAAAA,EACT,CAAuC2B,EAAAhE,EAAA,IAAA,CAAA,CAAA,EACKiE,EAAAA,mBAAAA,QAAW,CAAY,IAAAjE,EAAA,IAAA,EAAAkE,EAAA,gBAAAlE,EAAA,KAAA,EAAA,EAAAH,EAAA,EAVrEW,EAAA,eAAAD,EAAA,mBAAA,IAAA,CAAA,UAUa0D,EAAW,WAAA,YAAA,EAAA,KAAA,EAAAnE,EAAA,EAAA,wGCGxB,SAASqE,GAAQC,EAAwB,CACpCA,EAAA,UAAU,YAAaC,CAAS,EAChCD,EAAA,UAAU,YAAaE,CAAS,EAChCF,EAAA,UAAU,QAASG,CAAK,EACxBH,EAAA,UAAU,YAAaI,CAAS,EAChCJ,EAAA,UAAU,YAAaK,CAAS,EAChCL,EAAA,UAAU,QAASM,CAAK,EACxBN,EAAA,UAAU,gBAAiBO,CAAa,EACxCP,EAAA,UAAU,aAAcQ,EAAU,CAGvC"}
package/dist/style.css ADDED
@@ -0,0 +1 @@
1
+ @import"https://fonts.googleapis.com/css2?family=Arimo:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap";@import"https://fonts.googleapis.com/css2?family=Arimo:ital,wght@0,400..700;1,400..700&display=swap";div[data-v-5093f1cb]{display:inline-block;min-width:40ch;border:1px solid transparent;padding:0rem;margin:0rem;margin-right:1ch}p[data-v-5093f1cb],label[data-v-5093f1cb]{color:var(--input-label-color);display:block;min-height:1.15rem;padding:0rem;margin:0rem 0rem .25rem;border:1px solid transparent}p[data-v-5093f1cb]{width:100%;color:red;font-size:85%}.checkbox[data-v-5093f1cb]{visibility:hidden}.checkbox+#custom-checkbox[data-v-5093f1cb]:after{content:"⬡";padding:1ch 0 .5ch;font-size:120%;cursor:pointer;position:relative;left:-18px}.checkbox:checked+#custom-checkbox[data-v-5093f1cb]:after{content:"⬣";padding:1ch 0 .5ch;font-size:120%;cursor:pointer;position:relative;left:-18px}#custom-checkbox[data-v-5093f1cb]{display:inline-block}#checkbox-container[data-v-5093f1cb]{display:inline-block;min-width:calc(100% - 1ch);outline:1px solid transparent;border:1px solid var(--input-border-color);padding:1ch .5ch .5ch 1ch;margin:.575rem 0 0;height:1.15rem;border-radius:.25rem}#checkbox-container[data-v-5093f1cb]:hover{border:1px solid var(--input-active-border-color)}#checkbox-container:hover+label[data-v-5093f1cb]{color:var(--input-active-label-color)}#checkbox-label[data-v-5093f1cb]{z-index:2;font-size:80%;position:absolute;background:#fff;margin:-2.575rem 0 0 1ch;padding:0 .25ch}[data-v-169f1184]:root{--primary-color: #0098c9;--primary-text-color: #ffffff;--brand-color: #202a44;--gray-5: #f2f2f2;--gray-10: #e6e6e6;--gray-20: #cccccc;--gray-50: #808080;--gray-60: #666666;--gray-80: #333333;--brand-danger: #e63c28;--brand-success: #155724;--row-color-zebra-light: #eeeeee;--row-color-zebra-dark: #dddddd;--focus-cell-background: #ffffff;--focus-cell-outline: #000000;--cell-border-color: #ffffff;--cell-text-color: #3a3c41;--active-cell-background: #ffffff;--active-cell-outline: #e6a92d;--row-border-color: var(--gray-20);--header-border-color: #ffffff;--header-text-color: var(--gray-20);--row-number-background-color: #ffffff;--input-border-color: var(--gray-20);--input-label-color: var(--gray-80);--input-active-border-color: #000000;--input-active-label-color: #000000;--required-border: #e63c28;--font-size: 11pt;--font-family: Arimo, Arial, sans-serif;--table-font-size: 11pt;--atable-font-family: "Arimo", sans-serif;--atable-row-padding: 0px;--atable-row-height: 1.5em;--btn-color: white;--btn-border: #cccccc;--btn-hover: #f2f2f2;--btn-label-color: black}[data-v-169f1184]:root{font-family:var(--font-family)}.aform-primary-action[data-v-169f1184]{font-size:100%;text-align:center;min-height:2em;padding:.25rem 1rem;border:1px solid var(--primary-color);color:var(--primary-text-color);background-color:var(--primary-color);outline:2px solid var(--primary-text-color);transition:outline-offset .2s ease;font-size:var(--font-size);margin:.5ch}.aform-primary-action[data-v-169f1184]:hover,.aform-primary-action[data-v-169f1184]:active{outline:2px solid var(--primary-text-color);outline-offset:-4px;transition:outline-offset .2s ease}.adate[data-v-169f1184]{border:2px solid var(--focus-cell-outline);position:absolute;z-index:100;font-size:var(--table-font-size);display:inline-table;background-color:var(--row-color-zebra-light);color:var(--cell-text-color);outline:none;width:calc(100% - 4px)}.adate tr[data-v-169f1184]{height:1.15rem;text-align:center;vertical-align:middle}.adate td[data-v-169f1184]{border:2px solid transparent;min-width:2.25ch}.adate td[data-v-169f1184]:hover{border:2px solid var(--focus-cell-outline)}.adate td[data-v-169f1184]{border:1px;border-style:solid;border-color:var(--cell-border-color);border-radius:0;box-sizing:border-box;margin:0;outline:none;box-shadow:none;color:var(--cell-text-color);text-overflow:ellipsis;overflow:hidden;padding-left:.5ch;padding-right:.5ch}.adate td[data-v-169f1184]:focus,.adate td[data-v-169f1184]:focus-within{background-color:var(--focus-cell-background);outline-width:2px;outline-style:solid;outline-color:var(--focus-cell-outline);box-shadow:none;min-height:1.15em;max-height:1.15em;overflow:hidden}button[data-v-169f1184]{background-color:var(--row-color-zebra-light);border:none;padding:0;margin:0;color:var(--cell-text-color);outline:none;font-size:var(--table-font-size)}.dateheader[data-v-169f1184]{font-weight:700;display:flex;align-items:center;justify-content:space-between}.adate .todaysdate[data-v-169f1184]{border-bottom-color:var(--focus-cell-outline)}.adate .selecteddate[data-v-169f1184]{border:2px solid var(--focus-cell-outline)}.autocomplete{position:relative}.input-wrapper{min-width:40ch;border:1px solid transparent;padding:0rem;margin:0rem;margin-right:1ch}input{width:calc(100% - 1ch);outline:1px solid transparent;border:1px solid var(--input-border-color);padding:1ch .5ch .5ch 1ch;margin:.575rem 0 0;min-height:1.15rem;border-radius:.25rem}input:focus{border:1px solid var(--input-active-border-color);border-radius:.25rem .25rem 0 0;border-bottom:none}label{display:block;min-height:1.15rem;padding:0rem;margin:0rem 0rem .25rem;border:1px solid transparent;z-index:2;font-size:80%;position:absolute;background:#fff;margin:-2.575rem 0 0 1ch;padding:0 .25ch}.autocomplete-results{position:absolute;width:calc(100% - 1ch + 1.5px);z-index:1;padding:0;margin:0;color:#000;border:1px solid var(--input-active-border-color);border-radius:0 0 .25rem .25rem;border-top:none}.autocomplete-result{list-style:none;text-align:left;padding:4px 6px;cursor:pointer}.autocomplete-result.is-active,.autocomplete-result:hover{background-color:var(--row-color-zebra-light);color:#000}.collapse-button[data-v-6f1c1b45]{width:2ch;min-width:calc(66px - 4ch);background-color:transparent;font-size:150%;text-align:center;border:none;margin-top:-.5rem}.rotated[data-v-6f1c1b45]{transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transition:transform .25s;transform-origin:center center}.unrotated[data-v-6f1c1b45]{transform:rotate(0);-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg);transition:transform .25s}form[data-v-74d66cf2]{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;align-items:baseline}fieldset[data-v-cad9b578]{max-width:100%;width:100%;margin-right:2ch;border:1px solid transparent;border-bottom:1px solid var(--gray-50)}legend[data-v-cad9b578]{width:100%;height:1.15rem;border:1px solid transparent;padding-bottom:.5rem;font-size:110%;font-weight:600;-webkit-user-select:none;user-select:none}.collapse-button[data-v-cad9b578]{float:right}div[data-v-02907cd6]{min-width:40ch;border:1px solid transparent;padding:0rem;margin:0rem;margin-right:1ch}input[data-v-02907cd6]{width:calc(100% - 1ch);outline:1px solid transparent;border:1px solid var(--input-border-color);padding:1ch .5ch .5ch 1ch;margin:.575rem 0 0;min-height:1.15rem;border-radius:.25rem}p[data-v-02907cd6],label[data-v-02907cd6]{color:var(--input-label-color);display:block;min-height:1.15rem;padding:0rem;margin:0rem 0rem .25rem;border:1px solid transparent}p[data-v-02907cd6]{width:100%;color:red;font-size:85%}label[data-v-02907cd6]{z-index:2;font-size:80%;position:absolute;background:#fff;margin:-2.575rem 0 0 1ch;padding:0 .25ch}input[data-v-02907cd6]:focus{border:1px solid var(--input-active-border-color)}input:focus+label[data-v-02907cd6]{color:var(--input-active-label-color)}div[data-v-76dba9b8]{min-width:40ch;border:1px solid transparent;padding:0rem;margin:0rem;margin-right:1ch}input[data-v-76dba9b8]{width:calc(100% - 1ch);outline:1px solid transparent;border:1px solid var(--input-border-color);padding:1ch .5ch .5ch 1ch;margin:.575rem 0 0;min-height:1.15rem;border-radius:.25rem}p[data-v-76dba9b8],label[data-v-76dba9b8]{color:var(--input-label-color);display:block;min-height:1.15rem;padding:0rem;margin:0rem 0rem .25rem;border:1px solid transparent}p[data-v-76dba9b8]{width:100%;color:red;font-size:85%}label[data-v-76dba9b8]{z-index:2;font-size:80%;position:absolute;background:#fff;margin:-2.575rem 0 0 1ch;padding:0 .25ch}input[data-v-76dba9b8]:focus{border:1px solid var(--input-active-border-color)}input:focus+label[data-v-76dba9b8]{color:var(--input-active-label-color)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stonecrop/aform",
3
- "version": "0.2.10",
3
+ "version": "0.2.11",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "author": {
@@ -33,8 +33,8 @@
33
33
  "dependencies": {
34
34
  "uuid": "^9.0.0",
35
35
  "vue": "^3.4.23",
36
- "@stonecrop/utilities": "0.2.10",
37
- "@stonecrop/themes": "0.2.10"
36
+ "@stonecrop/themes": "0.2.11",
37
+ "@stonecrop/utilities": "0.2.11"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@histoire/plugin-vue": "^0.17.17",
@@ -55,10 +55,10 @@
55
55
  "vite": "^5.2.9",
56
56
  "vitest": "^1.5.0",
57
57
  "vue-router": "^4",
58
- "@stonecrop/atable": "0.2.10"
58
+ "@stonecrop/atable": "0.2.11"
59
59
  },
60
60
  "peerDependencies": {
61
- "@stonecrop/atable": "0.2.10"
61
+ "@stonecrop/atable": "0.2.11"
62
62
  },
63
63
  "publishConfig": {
64
64
  "access": "public"