@stonecrop/aform 0.2.30 → 0.2.31
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.d.ts +3 -0
- package/dist/aform.js +448 -355
- package/dist/aform.js.map +1 -1
- package/dist/aform.umd.cjs +1 -1
- package/dist/aform.umd.cjs.map +1 -1
- package/dist/index.js +3 -1
- package/dist/src/index.d.ts +2 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +7 -6
- package/src/components/form/AFileAttach.vue +38 -0
- package/src/components/utilities/Login.vue +2 -2
- package/src/index.ts +3 -0
package/dist/aform.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as E, mergeModels as x, useModel as H, openBlock as p, createElementBlock as _, createElementVNode as c, toDisplayString as k, withDirectives as A, vModelCheckbox as he, vShow as I, resolveComponent as _e, createBlock as N, withCtx as ge, ref as f, onMounted as Y, onUnmounted as ye, normalizeClass as W, withKeys as U, vModelText as P, Fragment as F, renderList as B, watch as q, onBeforeUnmount as be, computed as V, unref as C, getCurrentScope as ce, onScopeDispose as de, getCurrentInstance as we, nextTick as ke, withModifiers as De, resolveDynamicComponent as Ae, mergeProps as Ee, createTextVNode as fe, createCommentVNode as j, renderSlot as Me, createVNode as Ce, readonly as Te } from "vue";
|
|
2
|
+
const $e = { class: "aform__form-element" }, Se = ["for"], Le = { class: "aform__checkbox-container aform__input-field" }, Ve = ["id", "readonly", "required"], xe = ["innerHTML"], He = /* @__PURE__ */ E({
|
|
3
3
|
__name: "ACheckbox",
|
|
4
|
-
props: /* @__PURE__ */
|
|
4
|
+
props: /* @__PURE__ */ x({
|
|
5
5
|
label: {},
|
|
6
6
|
required: { type: Boolean },
|
|
7
7
|
readOnly: { type: Boolean },
|
|
@@ -13,57 +13,57 @@ const Te = { class: "aform__form-element" }, Se = ["for"], Le = { class: "aform_
|
|
|
13
13
|
}),
|
|
14
14
|
emits: ["update:modelValue"],
|
|
15
15
|
setup(e) {
|
|
16
|
-
const t =
|
|
17
|
-
return (n, o) => (
|
|
18
|
-
|
|
16
|
+
const t = H(e, "modelValue");
|
|
17
|
+
return (n, o) => (p(), _("div", $e, [
|
|
18
|
+
c("label", {
|
|
19
19
|
class: "aform__field-label",
|
|
20
20
|
for: n.uuid
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
}, k(n.label), 9, Se),
|
|
22
|
+
c("span", Le, [
|
|
23
|
+
A(c("input", {
|
|
24
24
|
"onUpdate:modelValue": o[0] || (o[0] = (l) => t.value = l),
|
|
25
25
|
type: "checkbox",
|
|
26
26
|
id: n.uuid,
|
|
27
27
|
class: "aform__checkbox",
|
|
28
28
|
readonly: n.readOnly,
|
|
29
29
|
required: n.required
|
|
30
|
-
}, null, 8,
|
|
31
|
-
[
|
|
30
|
+
}, null, 8, Ve), [
|
|
31
|
+
[he, t.value]
|
|
32
32
|
])
|
|
33
33
|
]),
|
|
34
|
-
|
|
34
|
+
A(c("p", {
|
|
35
35
|
class: "error",
|
|
36
36
|
innerHTML: n.validation.errorMessage
|
|
37
|
-
}, null, 8,
|
|
38
|
-
[
|
|
37
|
+
}, null, 8, xe), [
|
|
38
|
+
[I, n.validation.errorMessage]
|
|
39
39
|
])
|
|
40
40
|
]));
|
|
41
41
|
}
|
|
42
|
-
}),
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
], -1),
|
|
42
|
+
}), Ie = /* @__PURE__ */ c("div", null, [
|
|
43
|
+
/* @__PURE__ */ c("input", { type: "text" }),
|
|
44
|
+
/* @__PURE__ */ c("input", { type: "text" }),
|
|
45
|
+
/* @__PURE__ */ c("input", { type: "text" })
|
|
46
|
+
], -1), Pe = /* @__PURE__ */ E({
|
|
47
47
|
__name: "AComboBox",
|
|
48
48
|
props: ["event", "cellData", "tableID"],
|
|
49
49
|
setup(e) {
|
|
50
50
|
return (t, n) => {
|
|
51
|
-
const o =
|
|
52
|
-
return
|
|
51
|
+
const o = _e("ATableModal");
|
|
52
|
+
return p(), N(o, {
|
|
53
53
|
event: e.event,
|
|
54
54
|
cellData: e.cellData,
|
|
55
55
|
class: "amodal"
|
|
56
56
|
}, {
|
|
57
|
-
default:
|
|
58
|
-
|
|
57
|
+
default: ge(() => [
|
|
58
|
+
Ie
|
|
59
59
|
]),
|
|
60
60
|
_: 1
|
|
61
61
|
}, 8, ["event", "cellData"]);
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
|
-
}),
|
|
64
|
+
}), Fe = ["id", "disabled", "required", "value"], Be = ["for"], Oe = ["innerHTML"], qe = /* @__PURE__ */ E({
|
|
65
65
|
__name: "ADate",
|
|
66
|
-
props: /* @__PURE__ */
|
|
66
|
+
props: /* @__PURE__ */ x({
|
|
67
67
|
label: { default: "Date" },
|
|
68
68
|
required: { type: Boolean },
|
|
69
69
|
readonly: { type: Boolean },
|
|
@@ -75,11 +75,11 @@ const Te = { class: "aform__form-element" }, Se = ["for"], Le = { class: "aform_
|
|
|
75
75
|
}),
|
|
76
76
|
emits: ["update:modelValue"],
|
|
77
77
|
setup(e) {
|
|
78
|
-
const t =
|
|
78
|
+
const t = H(e, "modelValue"), n = f(null), o = () => {
|
|
79
79
|
n.value && "showPicker" in HTMLInputElement.prototype && n.value.showPicker();
|
|
80
80
|
};
|
|
81
|
-
return (l, a) => (
|
|
82
|
-
|
|
81
|
+
return (l, a) => (p(), _("div", null, [
|
|
82
|
+
c("input", {
|
|
83
83
|
ref_key: "dateRef",
|
|
84
84
|
ref: n,
|
|
85
85
|
type: "date",
|
|
@@ -88,29 +88,29 @@ const Te = { class: "aform__form-element" }, Se = ["for"], Le = { class: "aform_
|
|
|
88
88
|
required: l.required,
|
|
89
89
|
value: t.value,
|
|
90
90
|
onClick: o
|
|
91
|
-
}, null, 8,
|
|
92
|
-
|
|
93
|
-
|
|
91
|
+
}, null, 8, Fe),
|
|
92
|
+
c("label", { for: l.uuid }, k(l.label), 9, Be),
|
|
93
|
+
A(c("p", {
|
|
94
94
|
innerHTML: l.validation.errorMessage
|
|
95
|
-
}, null, 8,
|
|
96
|
-
[
|
|
95
|
+
}, null, 8, Oe), [
|
|
96
|
+
[I, l.validation.errorMessage]
|
|
97
97
|
])
|
|
98
98
|
]));
|
|
99
99
|
}
|
|
100
|
-
}),
|
|
100
|
+
}), G = (e, t) => {
|
|
101
101
|
const n = e.__vccOpts || e;
|
|
102
102
|
for (const [o, l] of t)
|
|
103
103
|
n[o] = l;
|
|
104
104
|
return n;
|
|
105
|
-
}, Re = /* @__PURE__ */
|
|
105
|
+
}, Re = /* @__PURE__ */ G(qe, [["__scopeId", "data-v-69d0f23d"]]), Ue = { class: "input-wrapper" }, We = {
|
|
106
106
|
id: "autocomplete-results",
|
|
107
107
|
class: "autocomplete-results"
|
|
108
|
-
},
|
|
108
|
+
}, Ye = {
|
|
109
109
|
key: 0,
|
|
110
110
|
class: "loading autocomplete-result"
|
|
111
|
-
},
|
|
111
|
+
}, Ge = ["onClick"], Ke = /* @__PURE__ */ E({
|
|
112
112
|
__name: "ADropdown",
|
|
113
|
-
props: /* @__PURE__ */
|
|
113
|
+
props: /* @__PURE__ */ x({
|
|
114
114
|
label: {},
|
|
115
115
|
items: {},
|
|
116
116
|
isAsync: { type: Boolean }
|
|
@@ -118,171 +118,171 @@ const Te = { class: "aform__form-element" }, Se = ["for"], Le = { class: "aform_
|
|
|
118
118
|
modelValue: {},
|
|
119
119
|
modelModifiers: {}
|
|
120
120
|
}),
|
|
121
|
-
emits: /* @__PURE__ */
|
|
121
|
+
emits: /* @__PURE__ */ x(["filterChanged"], ["update:modelValue"]),
|
|
122
122
|
setup(e, { emit: t }) {
|
|
123
|
-
const n = e, o = t, l = f(n.items), a =
|
|
124
|
-
|
|
125
|
-
document.addEventListener("click",
|
|
126
|
-
}),
|
|
127
|
-
document.removeEventListener("click",
|
|
123
|
+
const n = e, o = t, l = f(n.items), a = H(e, "modelValue"), r = f(!1), s = f(0), u = f(!1), i = f(null);
|
|
124
|
+
Y(() => {
|
|
125
|
+
document.addEventListener("click", g), m();
|
|
126
|
+
}), ye(() => {
|
|
127
|
+
document.removeEventListener("click", g);
|
|
128
128
|
});
|
|
129
|
-
const d = (
|
|
130
|
-
a.value =
|
|
131
|
-
},
|
|
132
|
-
a.value ? l.value = n.items.filter((
|
|
133
|
-
},
|
|
134
|
-
|
|
135
|
-
},
|
|
129
|
+
const d = (v) => {
|
|
130
|
+
a.value = v, b();
|
|
131
|
+
}, m = () => {
|
|
132
|
+
a.value ? l.value = n.items.filter((v) => v.toLowerCase().indexOf(a.value.toLowerCase()) > -1) : l.value = n.items;
|
|
133
|
+
}, h = () => {
|
|
134
|
+
u.value = !0, n.isAsync ? (r.value = !0, o("filterChanged", a.value)) : m();
|
|
135
|
+
}, g = () => {
|
|
136
136
|
b(), s.value = 0;
|
|
137
137
|
}, b = () => {
|
|
138
|
-
|
|
138
|
+
u.value = !1, n.items.includes(a.value) || (a.value = "");
|
|
139
139
|
}, S = () => {
|
|
140
140
|
s.value < l.value.length && (s.value = s.value + 1);
|
|
141
|
-
},
|
|
141
|
+
}, D = () => {
|
|
142
142
|
s.value > 0 && (s.value = s.value - 1);
|
|
143
143
|
}, L = () => {
|
|
144
144
|
a.value = l.value[s.value], b(), s.value = 0;
|
|
145
145
|
};
|
|
146
|
-
return (
|
|
147
|
-
class:
|
|
146
|
+
return (v, y) => (p(), _("div", {
|
|
147
|
+
class: W(["autocomplete", { isOpen: u.value }])
|
|
148
148
|
}, [
|
|
149
|
-
|
|
150
|
-
|
|
149
|
+
c("div", Ue, [
|
|
150
|
+
A(c("input", {
|
|
151
151
|
ref_key: "mopInput",
|
|
152
|
-
ref:
|
|
152
|
+
ref: i,
|
|
153
153
|
type: "text",
|
|
154
|
-
onInput:
|
|
155
|
-
onFocus:
|
|
154
|
+
onInput: h,
|
|
155
|
+
onFocus: h,
|
|
156
156
|
"onUpdate:modelValue": y[0] || (y[0] = (w) => a.value = w),
|
|
157
157
|
onKeydown: [
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
158
|
+
U(S, ["down"]),
|
|
159
|
+
U(D, ["up"]),
|
|
160
|
+
U(L, ["enter"])
|
|
161
161
|
]
|
|
162
162
|
}, null, 544), [
|
|
163
|
-
[
|
|
163
|
+
[P, a.value]
|
|
164
164
|
]),
|
|
165
|
-
|
|
166
|
-
r.value ? (
|
|
165
|
+
A(c("ul", We, [
|
|
166
|
+
r.value ? (p(), _("li", Ye, "Loading results...")) : (p(!0), _(F, { key: 1 }, B(l.value, (w, M) => (p(), _("li", {
|
|
167
167
|
key: M,
|
|
168
|
-
onClick: (
|
|
169
|
-
class:
|
|
170
|
-
},
|
|
168
|
+
onClick: (te) => d(w),
|
|
169
|
+
class: W(["autocomplete-result", { "is-active": M === s.value }])
|
|
170
|
+
}, k(w), 11, Ge))), 128))
|
|
171
171
|
], 512), [
|
|
172
|
-
[
|
|
172
|
+
[I, u.value]
|
|
173
173
|
]),
|
|
174
|
-
|
|
174
|
+
c("label", null, k(v.label), 1)
|
|
175
175
|
])
|
|
176
176
|
], 2));
|
|
177
177
|
}
|
|
178
178
|
});
|
|
179
|
-
function
|
|
180
|
-
return
|
|
179
|
+
function pe(e) {
|
|
180
|
+
return ce() ? (de(e), !0) : !1;
|
|
181
181
|
}
|
|
182
|
-
function
|
|
183
|
-
return typeof e == "function" ? e() :
|
|
182
|
+
function J(e) {
|
|
183
|
+
return typeof e == "function" ? e() : C(e);
|
|
184
184
|
}
|
|
185
185
|
const ze = typeof window < "u" && typeof document < "u";
|
|
186
186
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
187
|
-
const
|
|
187
|
+
const Ne = (e) => e != null, je = Object.prototype.toString, Je = (e) => je.call(e) === "[object Object]", Qe = () => {
|
|
188
188
|
};
|
|
189
|
-
function
|
|
189
|
+
function O(e) {
|
|
190
190
|
var t;
|
|
191
|
-
const n =
|
|
191
|
+
const n = J(e);
|
|
192
192
|
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
193
193
|
}
|
|
194
194
|
const K = ze ? window : void 0;
|
|
195
195
|
function z(...e) {
|
|
196
196
|
let t, n, o, l;
|
|
197
197
|
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, o, l] = e, t = K) : [t, n, o, l] = e, !t)
|
|
198
|
-
return
|
|
198
|
+
return Qe;
|
|
199
199
|
Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);
|
|
200
200
|
const a = [], r = () => {
|
|
201
201
|
a.forEach((d) => d()), a.length = 0;
|
|
202
|
-
}, s = (d,
|
|
203
|
-
() => [
|
|
204
|
-
([d,
|
|
202
|
+
}, s = (d, m, h, g) => (d.addEventListener(m, h, g), () => d.removeEventListener(m, h, g)), u = q(
|
|
203
|
+
() => [O(t), J(l)],
|
|
204
|
+
([d, m]) => {
|
|
205
205
|
if (r(), !d)
|
|
206
206
|
return;
|
|
207
|
-
const
|
|
207
|
+
const h = Je(m) ? { ...m } : m;
|
|
208
208
|
a.push(
|
|
209
|
-
...n.flatMap((
|
|
209
|
+
...n.flatMap((g) => o.map((b) => s(d, g, b, h)))
|
|
210
210
|
);
|
|
211
211
|
},
|
|
212
212
|
{ immediate: !0, flush: "post" }
|
|
213
|
-
),
|
|
214
|
-
|
|
213
|
+
), i = () => {
|
|
214
|
+
u(), r();
|
|
215
215
|
};
|
|
216
|
-
return
|
|
216
|
+
return pe(i), i;
|
|
217
217
|
}
|
|
218
|
-
function
|
|
219
|
-
const e = f(!1), t =
|
|
220
|
-
return t &&
|
|
218
|
+
function Xe() {
|
|
219
|
+
const e = f(!1), t = we();
|
|
220
|
+
return t && Y(() => {
|
|
221
221
|
e.value = !0;
|
|
222
222
|
}, t), e;
|
|
223
223
|
}
|
|
224
|
-
function
|
|
225
|
-
const t =
|
|
226
|
-
return
|
|
224
|
+
function Ze(e) {
|
|
225
|
+
const t = Xe();
|
|
226
|
+
return V(() => (t.value, !!e()));
|
|
227
227
|
}
|
|
228
|
-
function
|
|
228
|
+
function et(e, t, n = {}) {
|
|
229
229
|
const { window: o = K, ...l } = n;
|
|
230
230
|
let a;
|
|
231
|
-
const r =
|
|
231
|
+
const r = Ze(() => o && "MutationObserver" in o), s = () => {
|
|
232
232
|
a && (a.disconnect(), a = void 0);
|
|
233
|
-
},
|
|
234
|
-
const
|
|
235
|
-
return new Set(
|
|
236
|
-
}),
|
|
237
|
-
() =>
|
|
238
|
-
(
|
|
239
|
-
s(), r.value &&
|
|
233
|
+
}, u = V(() => {
|
|
234
|
+
const h = J(e), g = (Array.isArray(h) ? h : [h]).map(O).filter(Ne);
|
|
235
|
+
return new Set(g);
|
|
236
|
+
}), i = q(
|
|
237
|
+
() => u.value,
|
|
238
|
+
(h) => {
|
|
239
|
+
s(), r.value && h.size && (a = new MutationObserver(t), h.forEach((g) => a.observe(g, l)));
|
|
240
240
|
},
|
|
241
241
|
{ immediate: !0, flush: "post" }
|
|
242
|
-
), d = () => a == null ? void 0 : a.takeRecords(),
|
|
243
|
-
s(),
|
|
242
|
+
), d = () => a == null ? void 0 : a.takeRecords(), m = () => {
|
|
243
|
+
s(), i();
|
|
244
244
|
};
|
|
245
|
-
return
|
|
245
|
+
return pe(m), {
|
|
246
246
|
isSupported: r,
|
|
247
|
-
stop:
|
|
247
|
+
stop: m,
|
|
248
248
|
takeRecords: d
|
|
249
249
|
};
|
|
250
250
|
}
|
|
251
|
-
function
|
|
251
|
+
function tt(e = {}) {
|
|
252
252
|
var t;
|
|
253
253
|
const {
|
|
254
254
|
window: n = K,
|
|
255
255
|
deep: o = !0,
|
|
256
256
|
triggerOnRemoval: l = !1
|
|
257
257
|
} = e, a = (t = e.document) != null ? t : n == null ? void 0 : n.document, r = () => {
|
|
258
|
-
var
|
|
258
|
+
var i;
|
|
259
259
|
let d = a == null ? void 0 : a.activeElement;
|
|
260
260
|
if (o)
|
|
261
261
|
for (; d != null && d.shadowRoot; )
|
|
262
|
-
d = (
|
|
262
|
+
d = (i = d == null ? void 0 : d.shadowRoot) == null ? void 0 : i.activeElement;
|
|
263
263
|
return d;
|
|
264
|
-
}, s = f(),
|
|
264
|
+
}, s = f(), u = () => {
|
|
265
265
|
s.value = r();
|
|
266
266
|
};
|
|
267
|
-
return n && (z(n, "blur", (
|
|
268
|
-
|
|
269
|
-
}, !0), z(n, "focus",
|
|
270
|
-
|
|
271
|
-
d === s.value &&
|
|
267
|
+
return n && (z(n, "blur", (i) => {
|
|
268
|
+
i.relatedTarget === null && u();
|
|
269
|
+
}, !0), z(n, "focus", u, !0)), l && et(a, (i) => {
|
|
270
|
+
i.filter((d) => d.removedNodes.length).map((d) => Array.from(d.removedNodes)).flat().forEach((d) => {
|
|
271
|
+
d === s.value && u();
|
|
272
272
|
});
|
|
273
273
|
}, {
|
|
274
274
|
childList: !0,
|
|
275
275
|
subtree: !0
|
|
276
|
-
}),
|
|
276
|
+
}), u(), s;
|
|
277
277
|
}
|
|
278
|
-
function
|
|
279
|
-
const n =
|
|
280
|
-
return { focused:
|
|
278
|
+
function nt(e, t = {}) {
|
|
279
|
+
const n = tt(t), o = V(() => O(e));
|
|
280
|
+
return { focused: V(() => o.value && n.value ? o.value.contains(n.value) : !1) };
|
|
281
281
|
}
|
|
282
|
-
function
|
|
282
|
+
function ot(e, { window: t = K, scrollTarget: n } = {}) {
|
|
283
283
|
const o = f(!1), l = () => {
|
|
284
284
|
if (!t) return;
|
|
285
|
-
const a = t.document, r =
|
|
285
|
+
const a = t.document, r = O(e);
|
|
286
286
|
if (!r)
|
|
287
287
|
o.value = !1;
|
|
288
288
|
else {
|
|
@@ -290,8 +290,8 @@ function nt(e, { window: t = K, scrollTarget: n } = {}) {
|
|
|
290
290
|
o.value = s.top <= (t.innerHeight || a.documentElement.clientHeight) && s.left <= (t.innerWidth || a.documentElement.clientWidth) && s.bottom >= 0 && s.right >= 0;
|
|
291
291
|
}
|
|
292
292
|
};
|
|
293
|
-
return
|
|
294
|
-
() =>
|
|
293
|
+
return q(
|
|
294
|
+
() => O(e),
|
|
295
295
|
() => l(),
|
|
296
296
|
{ immediate: !0, flush: "post" }
|
|
297
297
|
), t && z(n || t, "scroll", l, {
|
|
@@ -299,13 +299,13 @@ function nt(e, { window: t = K, scrollTarget: n } = {}) {
|
|
|
299
299
|
passive: !0
|
|
300
300
|
}), o;
|
|
301
301
|
}
|
|
302
|
-
const
|
|
303
|
-
let t =
|
|
302
|
+
const T = (e) => {
|
|
303
|
+
let t = ot(e).value;
|
|
304
304
|
return t = t && e.offsetHeight > 0, t;
|
|
305
|
-
},
|
|
305
|
+
}, $ = (e) => e.tabIndex >= 0, ne = (e) => {
|
|
306
306
|
const t = e.target;
|
|
307
|
-
return
|
|
308
|
-
},
|
|
307
|
+
return Q(t);
|
|
308
|
+
}, Q = (e) => {
|
|
309
309
|
var t;
|
|
310
310
|
let n;
|
|
311
311
|
if (e instanceof HTMLTableCellElement) {
|
|
@@ -318,8 +318,8 @@ const C = (e) => {
|
|
|
318
318
|
const o = e.previousElementSibling;
|
|
319
319
|
o && (n = o);
|
|
320
320
|
}
|
|
321
|
-
return n && (
|
|
322
|
-
},
|
|
321
|
+
return n && (!$(n) || !T(n)) ? Q(n) : n;
|
|
322
|
+
}, lt = (e) => {
|
|
323
323
|
var t;
|
|
324
324
|
const n = e.target;
|
|
325
325
|
let o;
|
|
@@ -336,11 +336,11 @@ const C = (e) => {
|
|
|
336
336
|
a && (o = a);
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
|
-
return o && (
|
|
340
|
-
},
|
|
339
|
+
return o && (!$(o) || !T(o)) ? X(o) : o;
|
|
340
|
+
}, oe = (e) => {
|
|
341
341
|
const t = e.target;
|
|
342
|
-
return
|
|
343
|
-
},
|
|
342
|
+
return X(t);
|
|
343
|
+
}, X = (e) => {
|
|
344
344
|
var t;
|
|
345
345
|
let n;
|
|
346
346
|
if (e instanceof HTMLTableCellElement) {
|
|
@@ -353,8 +353,8 @@ const C = (e) => {
|
|
|
353
353
|
const o = e.nextElementSibling;
|
|
354
354
|
o && (n = o);
|
|
355
355
|
}
|
|
356
|
-
return n && (
|
|
357
|
-
},
|
|
356
|
+
return n && (!$(n) || !T(n)) ? X(n) : n;
|
|
357
|
+
}, at = (e) => {
|
|
358
358
|
var t;
|
|
359
359
|
const n = e.target;
|
|
360
360
|
let o;
|
|
@@ -371,11 +371,11 @@ const C = (e) => {
|
|
|
371
371
|
a && (o = a);
|
|
372
372
|
}
|
|
373
373
|
}
|
|
374
|
-
return o && (
|
|
375
|
-
},
|
|
374
|
+
return o && (!$(o) || !T(o)) ? Q(o) : o;
|
|
375
|
+
}, le = (e) => {
|
|
376
376
|
const t = e.target;
|
|
377
|
-
return
|
|
378
|
-
},
|
|
377
|
+
return Z(t);
|
|
378
|
+
}, Z = (e) => {
|
|
379
379
|
var t;
|
|
380
380
|
let n;
|
|
381
381
|
if (e.previousElementSibling)
|
|
@@ -384,11 +384,11 @@ const C = (e) => {
|
|
|
384
384
|
const o = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;
|
|
385
385
|
n = o == null ? void 0 : o.lastElementChild;
|
|
386
386
|
}
|
|
387
|
-
return n && (
|
|
388
|
-
},
|
|
387
|
+
return n && (!$(n) || !T(n)) ? Z(n) : n;
|
|
388
|
+
}, ae = (e) => {
|
|
389
389
|
const t = e.target;
|
|
390
|
-
return
|
|
391
|
-
},
|
|
390
|
+
return ee(t);
|
|
391
|
+
}, ee = (e) => {
|
|
392
392
|
var t;
|
|
393
393
|
let n;
|
|
394
394
|
if (e.nextElementSibling)
|
|
@@ -397,157 +397,157 @@ const C = (e) => {
|
|
|
397
397
|
const o = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;
|
|
398
398
|
n = o == null ? void 0 : o.firstElementChild;
|
|
399
399
|
}
|
|
400
|
-
return n && (
|
|
401
|
-
},
|
|
400
|
+
return n && (!$(n) || !T(n)) ? ee(n) : n;
|
|
401
|
+
}, se = (e) => {
|
|
402
402
|
const t = e.target.parentElement.firstElementChild;
|
|
403
|
-
return t && (
|
|
404
|
-
},
|
|
403
|
+
return t && (!$(t) || !T(t)) ? ee(t) : t;
|
|
404
|
+
}, re = (e) => {
|
|
405
405
|
const t = e.target.parentElement.lastElementChild;
|
|
406
|
-
return t && (
|
|
407
|
-
},
|
|
406
|
+
return t && (!$(t) || !T(t)) ? Z(t) : t;
|
|
407
|
+
}, R = ["alt", "control", "shift", "meta"], st = {
|
|
408
408
|
ArrowUp: "up",
|
|
409
409
|
ArrowDown: "down",
|
|
410
410
|
ArrowLeft: "left",
|
|
411
411
|
ArrowRight: "right"
|
|
412
|
-
},
|
|
412
|
+
}, me = {
|
|
413
413
|
"keydown.up": (e) => {
|
|
414
|
-
const t =
|
|
414
|
+
const t = ne(e);
|
|
415
415
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
416
416
|
},
|
|
417
417
|
"keydown.down": (e) => {
|
|
418
|
-
const t =
|
|
418
|
+
const t = oe(e);
|
|
419
419
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
420
420
|
},
|
|
421
421
|
"keydown.left": (e) => {
|
|
422
|
-
const t =
|
|
422
|
+
const t = le(e);
|
|
423
423
|
e.preventDefault(), e.stopPropagation(), t && t.focus();
|
|
424
424
|
},
|
|
425
425
|
"keydown.right": (e) => {
|
|
426
|
-
const t =
|
|
426
|
+
const t = ae(e);
|
|
427
427
|
e.preventDefault(), e.stopPropagation(), t && t.focus();
|
|
428
428
|
},
|
|
429
429
|
"keydown.control.up": (e) => {
|
|
430
|
-
const t =
|
|
430
|
+
const t = lt(e);
|
|
431
431
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
432
432
|
},
|
|
433
433
|
"keydown.control.down": (e) => {
|
|
434
|
-
const t =
|
|
434
|
+
const t = at(e);
|
|
435
435
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
436
436
|
},
|
|
437
437
|
"keydown.control.left": (e) => {
|
|
438
|
-
const t =
|
|
438
|
+
const t = se(e);
|
|
439
439
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
440
440
|
},
|
|
441
441
|
"keydown.control.right": (e) => {
|
|
442
|
-
const t =
|
|
442
|
+
const t = re(e);
|
|
443
443
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
444
444
|
},
|
|
445
445
|
"keydown.end": (e) => {
|
|
446
|
-
const t =
|
|
446
|
+
const t = re(e);
|
|
447
447
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
448
448
|
},
|
|
449
449
|
"keydown.enter": (e) => {
|
|
450
450
|
if (e.target instanceof HTMLTableCellElement) {
|
|
451
451
|
e.preventDefault(), e.stopPropagation();
|
|
452
|
-
const t =
|
|
452
|
+
const t = oe(e);
|
|
453
453
|
t && t.focus();
|
|
454
454
|
}
|
|
455
455
|
},
|
|
456
456
|
"keydown.shift.enter": (e) => {
|
|
457
457
|
if (e.target instanceof HTMLTableCellElement) {
|
|
458
458
|
e.preventDefault(), e.stopPropagation();
|
|
459
|
-
const t =
|
|
459
|
+
const t = ne(e);
|
|
460
460
|
t && t.focus();
|
|
461
461
|
}
|
|
462
462
|
},
|
|
463
463
|
"keydown.home": (e) => {
|
|
464
|
-
const t =
|
|
464
|
+
const t = se(e);
|
|
465
465
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
466
466
|
},
|
|
467
467
|
"keydown.tab": (e) => {
|
|
468
|
-
const t =
|
|
468
|
+
const t = ae(e);
|
|
469
469
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
470
470
|
},
|
|
471
471
|
"keydown.shift.tab": (e) => {
|
|
472
|
-
const t =
|
|
472
|
+
const t = le(e);
|
|
473
473
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
474
474
|
}
|
|
475
475
|
};
|
|
476
|
-
function
|
|
476
|
+
function rt(e) {
|
|
477
477
|
const t = (r) => {
|
|
478
478
|
let s = null;
|
|
479
479
|
return r.parent && (typeof r.parent == "string" ? s = document.querySelector(r.parent) : r.parent instanceof HTMLElement ? s = r.parent : s = r.parent.value), s;
|
|
480
480
|
}, n = (r) => {
|
|
481
481
|
const s = t(r);
|
|
482
|
-
let
|
|
482
|
+
let u = [];
|
|
483
483
|
if (typeof r.selectors == "string")
|
|
484
|
-
|
|
484
|
+
u = s ? Array.from(s.querySelectorAll(r.selectors)) : Array.from(document.querySelectorAll(r.selectors));
|
|
485
485
|
else if (Array.isArray(r.selectors))
|
|
486
|
-
for (const
|
|
487
|
-
|
|
486
|
+
for (const i of r.selectors)
|
|
487
|
+
i instanceof HTMLElement ? u.push(i) : u.push(i.$el);
|
|
488
488
|
else if (r.selectors instanceof HTMLElement)
|
|
489
|
-
|
|
489
|
+
u.push(r.selectors);
|
|
490
490
|
else if (Array.isArray(r.selectors.value))
|
|
491
|
-
for (const
|
|
492
|
-
|
|
491
|
+
for (const i of r.selectors.value)
|
|
492
|
+
i instanceof HTMLElement ? u.push(i) : u.push(i.$el);
|
|
493
493
|
else
|
|
494
|
-
|
|
495
|
-
return
|
|
494
|
+
u.push(r.selectors.value);
|
|
495
|
+
return u;
|
|
496
496
|
}, o = (r) => {
|
|
497
497
|
const s = t(r);
|
|
498
|
-
let
|
|
499
|
-
return r.selectors ?
|
|
498
|
+
let u = [];
|
|
499
|
+
return r.selectors ? u = n(r) : s && (u = Array.from(s.children).filter((i) => $(i) && T(i))), u;
|
|
500
500
|
}, l = (r) => (s) => {
|
|
501
|
-
const
|
|
502
|
-
if (
|
|
503
|
-
const
|
|
504
|
-
for (const d of Object.keys(
|
|
505
|
-
const [
|
|
506
|
-
if (
|
|
507
|
-
const
|
|
508
|
-
const L =
|
|
501
|
+
const u = st[s.key] || s.key.toLowerCase();
|
|
502
|
+
if (R.includes(u)) return;
|
|
503
|
+
const i = r.handlers || me;
|
|
504
|
+
for (const d of Object.keys(i)) {
|
|
505
|
+
const [m, ...h] = d.split(".");
|
|
506
|
+
if (m === "keydown" && h.includes(u)) {
|
|
507
|
+
const g = i[d], b = h.filter((D) => R.includes(D)), S = R.some((D) => {
|
|
508
|
+
const L = D.charAt(0).toUpperCase() + D.slice(1);
|
|
509
509
|
return s.getModifierState(L);
|
|
510
510
|
});
|
|
511
511
|
if (b.length > 0) {
|
|
512
512
|
if (S) {
|
|
513
|
-
for (const
|
|
514
|
-
if (
|
|
515
|
-
const L =
|
|
516
|
-
s.getModifierState(L) &&
|
|
513
|
+
for (const D of R)
|
|
514
|
+
if (h.includes(D)) {
|
|
515
|
+
const L = D.charAt(0).toUpperCase() + D.slice(1);
|
|
516
|
+
s.getModifierState(L) && g(s);
|
|
517
517
|
}
|
|
518
518
|
}
|
|
519
519
|
} else
|
|
520
|
-
S ||
|
|
520
|
+
S || g(s);
|
|
521
521
|
}
|
|
522
522
|
}
|
|
523
523
|
}, a = [];
|
|
524
|
-
|
|
524
|
+
Y(() => {
|
|
525
525
|
for (const r of e) {
|
|
526
|
-
const s = t(r),
|
|
527
|
-
for (const
|
|
528
|
-
const { focused:
|
|
529
|
-
b ?
|
|
526
|
+
const s = t(r), u = o(r), i = l(r), d = s ? [s] : u;
|
|
527
|
+
for (const m of d) {
|
|
528
|
+
const { focused: h } = nt(f(m)), g = q(h, (b) => {
|
|
529
|
+
b ? m.addEventListener("keydown", i) : m.removeEventListener("keydown", i);
|
|
530
530
|
});
|
|
531
|
-
a.push(
|
|
531
|
+
a.push(g);
|
|
532
532
|
}
|
|
533
533
|
}
|
|
534
|
-
}),
|
|
534
|
+
}), be(() => {
|
|
535
535
|
for (const r of a)
|
|
536
536
|
r();
|
|
537
537
|
});
|
|
538
538
|
}
|
|
539
|
-
const
|
|
539
|
+
const it = {
|
|
540
540
|
colspan: "5",
|
|
541
541
|
tabindex: -1
|
|
542
|
-
},
|
|
543
|
-
/* @__PURE__ */
|
|
544
|
-
/* @__PURE__ */
|
|
545
|
-
/* @__PURE__ */
|
|
546
|
-
/* @__PURE__ */
|
|
547
|
-
/* @__PURE__ */
|
|
548
|
-
/* @__PURE__ */
|
|
549
|
-
/* @__PURE__ */
|
|
550
|
-
], -1),
|
|
542
|
+
}, ut = /* @__PURE__ */ c("tr", { class: "days-header" }, [
|
|
543
|
+
/* @__PURE__ */ c("td", null, "M"),
|
|
544
|
+
/* @__PURE__ */ c("td", null, "T"),
|
|
545
|
+
/* @__PURE__ */ c("td", null, "W"),
|
|
546
|
+
/* @__PURE__ */ c("td", null, "T"),
|
|
547
|
+
/* @__PURE__ */ c("td", null, "F"),
|
|
548
|
+
/* @__PURE__ */ c("td", null, "S"),
|
|
549
|
+
/* @__PURE__ */ c("td", null, "S")
|
|
550
|
+
], -1), ct = ["onClick", "onKeydown"], dt = 6, ie = 7, ft = /* @__PURE__ */ E({
|
|
551
551
|
__name: "ADatePicker",
|
|
552
552
|
props: {
|
|
553
553
|
modelValue: { default: /* @__PURE__ */ new Date() },
|
|
@@ -555,12 +555,12 @@ const rt = {
|
|
|
555
555
|
},
|
|
556
556
|
emits: ["update:modelValue"],
|
|
557
557
|
setup(e) {
|
|
558
|
-
const t =
|
|
559
|
-
|
|
560
|
-
s(), await
|
|
561
|
-
const
|
|
562
|
-
if (
|
|
563
|
-
|
|
558
|
+
const t = H(e, "modelValue"), n = f(new Date(t.value)), o = f(n.value.getMonth()), l = f(n.value.getFullYear()), a = f([]), r = f(null);
|
|
559
|
+
Y(async () => {
|
|
560
|
+
s(), await ke();
|
|
561
|
+
const v = document.getElementsByClassName("selectedDate");
|
|
562
|
+
if (v.length > 0)
|
|
563
|
+
v[0].focus();
|
|
564
564
|
else {
|
|
565
565
|
const y = document.getElementsByClassName("todaysDate");
|
|
566
566
|
y.length > 0 && y[0].focus();
|
|
@@ -568,35 +568,35 @@ const rt = {
|
|
|
568
568
|
});
|
|
569
569
|
const s = () => {
|
|
570
570
|
a.value = [];
|
|
571
|
-
const
|
|
571
|
+
const v = new Date(l.value, o.value, 1), y = v.getDay(), w = v.setDate(v.getDate() - y);
|
|
572
572
|
for (const M of Array(43).keys())
|
|
573
573
|
a.value.push(w + M * 864e5);
|
|
574
574
|
};
|
|
575
|
-
|
|
576
|
-
const
|
|
577
|
-
o.value == 0 ? (o.value = 11,
|
|
578
|
-
},
|
|
579
|
-
o.value == 11 ? (o.value = 0,
|
|
580
|
-
},
|
|
575
|
+
q([o, l], s);
|
|
576
|
+
const u = () => l.value -= 1, i = () => l.value += 1, d = () => {
|
|
577
|
+
o.value == 0 ? (o.value = 11, u()) : o.value -= 1;
|
|
578
|
+
}, m = () => {
|
|
579
|
+
o.value == 11 ? (o.value = 0, i()) : o.value += 1;
|
|
580
|
+
}, h = (v) => {
|
|
581
581
|
const y = /* @__PURE__ */ new Date();
|
|
582
582
|
if (o.value === y.getMonth())
|
|
583
|
-
return y.toDateString() === new Date(
|
|
584
|
-
},
|
|
585
|
-
t.value = n.value = new Date(a.value[
|
|
586
|
-
}, L =
|
|
583
|
+
return y.toDateString() === new Date(v).toDateString();
|
|
584
|
+
}, g = (v) => new Date(v).toDateString() === new Date(n.value).toDateString(), b = (v, y) => (v - 1) * ie + y, S = (v, y) => a.value[b(v, y)], D = (v) => {
|
|
585
|
+
t.value = n.value = new Date(a.value[v]);
|
|
586
|
+
}, L = V(() => new Date(l.value, o.value, 1).toLocaleDateString(void 0, {
|
|
587
587
|
year: "numeric",
|
|
588
588
|
month: "long"
|
|
589
589
|
}));
|
|
590
|
-
return
|
|
590
|
+
return rt([
|
|
591
591
|
{
|
|
592
592
|
parent: r,
|
|
593
593
|
selectors: "td",
|
|
594
594
|
handlers: {
|
|
595
|
-
...
|
|
595
|
+
...me,
|
|
596
596
|
"keydown.pageup": d,
|
|
597
|
-
"keydown.shift.pageup":
|
|
598
|
-
"keydown.pagedown":
|
|
599
|
-
"keydown.shift.pagedown":
|
|
597
|
+
"keydown.shift.pageup": u,
|
|
598
|
+
"keydown.pagedown": m,
|
|
599
|
+
"keydown.shift.pagedown": i,
|
|
600
600
|
// TODO: this is a hack to override the stonecrop enter handler;
|
|
601
601
|
// store context inside the component so that handlers can be setup consistently
|
|
602
602
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
@@ -604,57 +604,57 @@ const rt = {
|
|
|
604
604
|
}
|
|
605
605
|
}
|
|
606
606
|
}
|
|
607
|
-
]), (
|
|
607
|
+
]), (v, y) => (p(), _("div", {
|
|
608
608
|
class: "adatepicker",
|
|
609
609
|
tabindex: "0",
|
|
610
610
|
ref_key: "adatepicker",
|
|
611
611
|
ref: r
|
|
612
612
|
}, [
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
613
|
+
c("table", null, [
|
|
614
|
+
c("tr", null, [
|
|
615
|
+
c("td", {
|
|
616
616
|
id: "previous-month-btn",
|
|
617
617
|
onClick: d,
|
|
618
618
|
tabindex: -1
|
|
619
619
|
}, "<"),
|
|
620
|
-
|
|
621
|
-
|
|
620
|
+
c("th", it, k(L.value), 1),
|
|
621
|
+
c("td", {
|
|
622
622
|
id: "next-month-btn",
|
|
623
|
-
onClick:
|
|
623
|
+
onClick: m,
|
|
624
624
|
tabindex: -1
|
|
625
625
|
}, ">")
|
|
626
626
|
]),
|
|
627
|
-
|
|
628
|
-
(
|
|
629
|
-
(
|
|
627
|
+
ut,
|
|
628
|
+
(p(), _(F, null, B(dt, (w) => c("tr", { key: w }, [
|
|
629
|
+
(p(), _(F, null, B(ie, (M) => c("td", {
|
|
630
630
|
ref_for: !0,
|
|
631
631
|
ref: "celldate",
|
|
632
632
|
key: b(w, M),
|
|
633
633
|
contenteditable: !1,
|
|
634
634
|
spellcheck: !1,
|
|
635
635
|
tabindex: 0,
|
|
636
|
-
onClick:
|
|
637
|
-
onKeydown:
|
|
638
|
-
class:
|
|
639
|
-
todaysDate:
|
|
640
|
-
selectedDate:
|
|
636
|
+
onClick: De((te) => D(b(w, M)), ["prevent", "stop"]),
|
|
637
|
+
onKeydown: U((te) => D(b(w, M)), ["enter"]),
|
|
638
|
+
class: W({
|
|
639
|
+
todaysDate: h(S(w, M)),
|
|
640
|
+
selectedDate: g(S(w, M))
|
|
641
641
|
})
|
|
642
|
-
},
|
|
642
|
+
}, k(new Date(S(w, M)).getDate()), 43, ct)), 64))
|
|
643
643
|
])), 64))
|
|
644
644
|
])
|
|
645
645
|
], 512));
|
|
646
646
|
}
|
|
647
|
-
}),
|
|
647
|
+
}), pt = /* @__PURE__ */ E({
|
|
648
648
|
__name: "CollapseButton",
|
|
649
649
|
props: {
|
|
650
650
|
collapsed: { type: Boolean }
|
|
651
651
|
},
|
|
652
652
|
setup(e) {
|
|
653
|
-
return (t, n) => (
|
|
654
|
-
class:
|
|
653
|
+
return (t, n) => (p(), _("button", {
|
|
654
|
+
class: W(["collapse-button", t.collapsed ? "rotated" : "unrotated"])
|
|
655
655
|
}, "×", 2));
|
|
656
656
|
}
|
|
657
|
-
}),
|
|
657
|
+
}), mt = /* @__PURE__ */ G(pt, [["__scopeId", "data-v-6f1c1b45"]]), vt = { class: "aform" }, ht = /* @__PURE__ */ E({
|
|
658
658
|
__name: "AForm",
|
|
659
659
|
props: {
|
|
660
660
|
modelValue: {},
|
|
@@ -664,35 +664,35 @@ const rt = {
|
|
|
664
664
|
emits: ["update:modelValue"],
|
|
665
665
|
setup(e, { emit: t }) {
|
|
666
666
|
const n = e, o = t, l = f(n.data || {}), a = (s) => {
|
|
667
|
-
let
|
|
668
|
-
for (const [
|
|
669
|
-
["component", "fieldtype"].includes(
|
|
670
|
-
return
|
|
671
|
-
}, r =
|
|
672
|
-
get: () => n.modelValue.map((s,
|
|
667
|
+
let u = {};
|
|
668
|
+
for (const [i, d] of Object.entries(s))
|
|
669
|
+
["component", "fieldtype"].includes(i) || (u[i] = d), i === "rows" && d && d.length === 0 && (u.rows = l.value[s.fieldname]);
|
|
670
|
+
return u;
|
|
671
|
+
}, r = V({
|
|
672
|
+
get: () => n.modelValue.map((s, u) => V({
|
|
673
673
|
get() {
|
|
674
674
|
return s.value;
|
|
675
675
|
},
|
|
676
|
-
set: (
|
|
677
|
-
n.modelValue[
|
|
676
|
+
set: (i) => {
|
|
677
|
+
n.modelValue[u].value = i, o("update:modelValue", n.modelValue);
|
|
678
678
|
}
|
|
679
679
|
})),
|
|
680
680
|
set: () => {
|
|
681
681
|
}
|
|
682
682
|
});
|
|
683
|
-
return (s,
|
|
684
|
-
(
|
|
683
|
+
return (s, u) => (p(), _("form", vt, [
|
|
684
|
+
(p(!0), _(F, null, B(s.modelValue, (i, d) => (p(), N(Ae(i.component), Ee({
|
|
685
685
|
key: d,
|
|
686
|
-
schema:
|
|
686
|
+
schema: i,
|
|
687
687
|
modelValue: r.value[d].value,
|
|
688
|
-
"onUpdate:modelValue": (
|
|
689
|
-
data: l.value[
|
|
688
|
+
"onUpdate:modelValue": (m) => r.value[d].value = m,
|
|
689
|
+
data: l.value[i.fieldname],
|
|
690
690
|
readonly: s.readonly,
|
|
691
691
|
ref_for: !0
|
|
692
|
-
}, a(
|
|
692
|
+
}, a(i)), null, 16, ["schema", "modelValue", "onUpdate:modelValue", "data", "readonly"]))), 128))
|
|
693
693
|
]));
|
|
694
694
|
}
|
|
695
|
-
}),
|
|
695
|
+
}), ve = /* @__PURE__ */ G(ht, [["__scopeId", "data-v-dc1a868d"]]), _t = /* @__PURE__ */ E({
|
|
696
696
|
__name: "AFieldset",
|
|
697
697
|
props: {
|
|
698
698
|
schema: {},
|
|
@@ -705,31 +705,123 @@ const rt = {
|
|
|
705
705
|
function r(s) {
|
|
706
706
|
s.preventDefault(), l.value && (o.value = !o.value);
|
|
707
707
|
}
|
|
708
|
-
return (s,
|
|
709
|
-
|
|
708
|
+
return (s, u) => (p(), _("fieldset", null, [
|
|
709
|
+
c("legend", {
|
|
710
710
|
onClick: r,
|
|
711
711
|
onSubmit: r
|
|
712
712
|
}, [
|
|
713
|
-
|
|
714
|
-
l.value ? (
|
|
713
|
+
fe(k(s.label) + " ", 1),
|
|
714
|
+
l.value ? (p(), N(mt, {
|
|
715
715
|
key: 0,
|
|
716
716
|
collapsed: o.value
|
|
717
|
-
}, null, 8, ["collapsed"])) :
|
|
717
|
+
}, null, 8, ["collapsed"])) : j("", !0)
|
|
718
718
|
], 32),
|
|
719
|
-
|
|
720
|
-
|
|
719
|
+
Me(s.$slots, "default", { collapsed: o.value }, () => [
|
|
720
|
+
A(Ce(ve, {
|
|
721
721
|
modelValue: a.value,
|
|
722
|
-
"onUpdate:modelValue":
|
|
722
|
+
"onUpdate:modelValue": u[0] || (u[0] = (i) => a.value = i),
|
|
723
723
|
data: n.value
|
|
724
724
|
}, null, 8, ["modelValue", "data"]), [
|
|
725
|
-
[
|
|
725
|
+
[I, !o.value]
|
|
726
726
|
])
|
|
727
727
|
], !0)
|
|
728
728
|
]));
|
|
729
729
|
}
|
|
730
|
-
}),
|
|
730
|
+
}), gt = /* @__PURE__ */ G(_t, [["__scopeId", "data-v-b89db0c0"]]);
|
|
731
|
+
function yt(e) {
|
|
732
|
+
return ce() ? (de(e), !0) : !1;
|
|
733
|
+
}
|
|
734
|
+
function bt() {
|
|
735
|
+
const e = /* @__PURE__ */ new Set(), t = (l) => {
|
|
736
|
+
e.delete(l);
|
|
737
|
+
};
|
|
738
|
+
return {
|
|
739
|
+
on: (l) => {
|
|
740
|
+
e.add(l);
|
|
741
|
+
const a = () => t(l);
|
|
742
|
+
return yt(a), {
|
|
743
|
+
off: a
|
|
744
|
+
};
|
|
745
|
+
},
|
|
746
|
+
off: t,
|
|
747
|
+
trigger: (...l) => Promise.all(Array.from(e).map((a) => a(...l)))
|
|
748
|
+
};
|
|
749
|
+
}
|
|
750
|
+
const wt = typeof window < "u" && typeof document < "u";
|
|
751
|
+
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
752
|
+
const kt = (e, t) => Object.prototype.hasOwnProperty.call(e, t), Dt = wt ? window.document : void 0, At = {
|
|
753
|
+
multiple: !0,
|
|
754
|
+
accept: "*",
|
|
755
|
+
reset: !1,
|
|
756
|
+
directory: !1
|
|
757
|
+
};
|
|
758
|
+
function Et(e = {}) {
|
|
759
|
+
const {
|
|
760
|
+
document: t = Dt
|
|
761
|
+
} = e, n = f(null), { on: o, trigger: l } = bt();
|
|
762
|
+
let a;
|
|
763
|
+
t && (a = t.createElement("input"), a.type = "file", a.onchange = (u) => {
|
|
764
|
+
const i = u.target;
|
|
765
|
+
n.value = i.files, l(n.value);
|
|
766
|
+
});
|
|
767
|
+
const r = () => {
|
|
768
|
+
n.value = null, a && a.value && (a.value = "", l(null));
|
|
769
|
+
}, s = (u) => {
|
|
770
|
+
if (!a)
|
|
771
|
+
return;
|
|
772
|
+
const i = {
|
|
773
|
+
...At,
|
|
774
|
+
...e,
|
|
775
|
+
...u
|
|
776
|
+
};
|
|
777
|
+
a.multiple = i.multiple, a.accept = i.accept, a.webkitdirectory = i.directory, kt(i, "capture") && (a.capture = i.capture), i.reset && r(), a.click();
|
|
778
|
+
};
|
|
779
|
+
return {
|
|
780
|
+
files: Te(n),
|
|
781
|
+
open: s,
|
|
782
|
+
reset: r,
|
|
783
|
+
onChange: o
|
|
784
|
+
};
|
|
785
|
+
}
|
|
786
|
+
const Mt = { class: "aform__form-element aform__file-attach aform__grid--full" }, Ct = {
|
|
787
|
+
key: 0,
|
|
788
|
+
class: "aform__file-attach-feedback"
|
|
789
|
+
}, Tt = ["disabled"], $t = /* @__PURE__ */ E({
|
|
790
|
+
__name: "AFileAttach",
|
|
791
|
+
props: {
|
|
792
|
+
schema: {},
|
|
793
|
+
label: {},
|
|
794
|
+
collapsible: { type: Boolean },
|
|
795
|
+
data: {}
|
|
796
|
+
},
|
|
797
|
+
setup(e) {
|
|
798
|
+
const t = e, { files: n, open: o, reset: l, onChange: a } = Et();
|
|
799
|
+
return a((r) => r), (r, s) => (p(), _("div", Mt, [
|
|
800
|
+
C(n) ? (p(), _("div", Ct, [
|
|
801
|
+
c("p", null, [
|
|
802
|
+
fe(" You have selected: "),
|
|
803
|
+
c("b", null, k(`${C(n).length} ${C(n).length === 1 ? "file" : "files"}`), 1)
|
|
804
|
+
]),
|
|
805
|
+
(p(!0), _(F, null, B(C(n), (u) => (p(), _("li", {
|
|
806
|
+
key: u.name
|
|
807
|
+
}, k(u.name), 1))), 128))
|
|
808
|
+
])) : j("", !0),
|
|
809
|
+
c("button", {
|
|
810
|
+
type: "button",
|
|
811
|
+
onClick: s[0] || (s[0] = (u) => C(o)()),
|
|
812
|
+
class: "aform__form-btn"
|
|
813
|
+
}, k(t.label), 1),
|
|
814
|
+
c("button", {
|
|
815
|
+
type: "button",
|
|
816
|
+
disabled: !C(n),
|
|
817
|
+
onClick: s[1] || (s[1] = (u) => C(l)()),
|
|
818
|
+
class: "aform__form-btn"
|
|
819
|
+
}, "Reset", 8, Tt)
|
|
820
|
+
]));
|
|
821
|
+
}
|
|
822
|
+
}), St = { class: "aform__form-element" }, Lt = ["for"], Vt = ["id", "disabled", "required"], xt = ["innerHTML"], Ht = /* @__PURE__ */ E({
|
|
731
823
|
__name: "ANumericInput",
|
|
732
|
-
props: /* @__PURE__ */
|
|
824
|
+
props: /* @__PURE__ */ x({
|
|
733
825
|
label: {},
|
|
734
826
|
required: { type: Boolean },
|
|
735
827
|
readonly: { type: Boolean },
|
|
@@ -741,31 +833,31 @@ const rt = {
|
|
|
741
833
|
}),
|
|
742
834
|
emits: ["update:modelValue"],
|
|
743
835
|
setup(e) {
|
|
744
|
-
const t =
|
|
745
|
-
return (n, o) => (
|
|
746
|
-
|
|
836
|
+
const t = H(e, "modelValue");
|
|
837
|
+
return (n, o) => (p(), _("div", St, [
|
|
838
|
+
c("label", {
|
|
747
839
|
class: "aform__field-label",
|
|
748
840
|
for: n.uuid
|
|
749
|
-
},
|
|
750
|
-
|
|
841
|
+
}, k(n.label), 9, Lt),
|
|
842
|
+
A(c("input", {
|
|
751
843
|
class: "aform__input-field",
|
|
752
844
|
"onUpdate:modelValue": o[0] || (o[0] = (l) => t.value = l),
|
|
753
845
|
type: "number",
|
|
754
846
|
id: n.uuid,
|
|
755
847
|
disabled: n.readonly,
|
|
756
848
|
required: n.required
|
|
757
|
-
}, null, 8,
|
|
758
|
-
[
|
|
849
|
+
}, null, 8, Vt), [
|
|
850
|
+
[P, t.value]
|
|
759
851
|
]),
|
|
760
|
-
|
|
852
|
+
A(c("p", {
|
|
761
853
|
class: "error",
|
|
762
854
|
innerHTML: n.validation.errorMessage
|
|
763
|
-
}, null, 8,
|
|
764
|
-
[
|
|
855
|
+
}, null, 8, xt), [
|
|
856
|
+
[I, n.validation.errorMessage]
|
|
765
857
|
])
|
|
766
858
|
]));
|
|
767
859
|
}
|
|
768
|
-
}),
|
|
860
|
+
}), ue = {
|
|
769
861
|
date: "##/##/####",
|
|
770
862
|
datetime: "####/##/## ##:##",
|
|
771
863
|
time: "##:##",
|
|
@@ -773,28 +865,28 @@ const rt = {
|
|
|
773
865
|
phone: "(###) ### - ####",
|
|
774
866
|
card: "#### #### #### ####"
|
|
775
867
|
};
|
|
776
|
-
function
|
|
868
|
+
function It(e) {
|
|
777
869
|
try {
|
|
778
870
|
return Function(`"use strict";return (${e})`)();
|
|
779
871
|
} catch {
|
|
780
872
|
}
|
|
781
873
|
}
|
|
782
|
-
function
|
|
874
|
+
function Pt(e) {
|
|
783
875
|
var n;
|
|
784
876
|
let t = e.value;
|
|
785
877
|
if (t) {
|
|
786
|
-
const o =
|
|
878
|
+
const o = It(t);
|
|
787
879
|
if (o) {
|
|
788
880
|
const l = e.instance.locale;
|
|
789
881
|
t = o(l);
|
|
790
882
|
}
|
|
791
883
|
} else {
|
|
792
884
|
const o = e.instance.schema, l = (n = o == null ? void 0 : o.fieldtype) == null ? void 0 : n.toLowerCase();
|
|
793
|
-
l &&
|
|
885
|
+
l && ue[l] && (t = ue[l]);
|
|
794
886
|
}
|
|
795
887
|
return t;
|
|
796
888
|
}
|
|
797
|
-
function
|
|
889
|
+
function Ft(e, t) {
|
|
798
890
|
t || (t = "#");
|
|
799
891
|
let n = e;
|
|
800
892
|
const o = [t, "/", "-", "(", ")", " "];
|
|
@@ -802,7 +894,7 @@ function Et(e, t) {
|
|
|
802
894
|
n = n.replaceAll(l, "");
|
|
803
895
|
return n;
|
|
804
896
|
}
|
|
805
|
-
function
|
|
897
|
+
function Bt(e, t, n) {
|
|
806
898
|
n || (n = "#");
|
|
807
899
|
let o = t;
|
|
808
900
|
for (const l of e) {
|
|
@@ -814,19 +906,19 @@ function At(e, t, n) {
|
|
|
814
906
|
}
|
|
815
907
|
return o.slice(0, t.length);
|
|
816
908
|
}
|
|
817
|
-
function
|
|
818
|
-
const n =
|
|
909
|
+
function Ot(e, t) {
|
|
910
|
+
const n = Pt(t);
|
|
819
911
|
if (!n) return;
|
|
820
|
-
const o = "#", l = e.value, a =
|
|
912
|
+
const o = "#", l = e.value, a = Ft(l, o);
|
|
821
913
|
if (a) {
|
|
822
|
-
const r =
|
|
914
|
+
const r = Bt(a, n, o);
|
|
823
915
|
t.instance.maskFilled && (t.instance.maskFilled = !r.includes(o)), e.value = r;
|
|
824
916
|
} else
|
|
825
917
|
e.value = n;
|
|
826
918
|
}
|
|
827
|
-
const
|
|
919
|
+
const qt = { class: "aform__form-element" }, Rt = ["for"], Ut = ["id", "disabled", "maxlength", "required"], Wt = ["innerHTML"], Yt = /* @__PURE__ */ E({
|
|
828
920
|
__name: "ATextInput",
|
|
829
|
-
props: /* @__PURE__ */
|
|
921
|
+
props: /* @__PURE__ */ x({
|
|
830
922
|
schema: {},
|
|
831
923
|
label: {},
|
|
832
924
|
mask: {},
|
|
@@ -840,45 +932,45 @@ const Tt = { class: "aform__form-element" }, St = ["for"], Lt = ["id", "disabled
|
|
|
840
932
|
}),
|
|
841
933
|
emits: ["update:modelValue"],
|
|
842
934
|
setup(e) {
|
|
843
|
-
const t = f(!0), n =
|
|
844
|
-
return (o, l) => (
|
|
845
|
-
|
|
935
|
+
const t = f(!0), n = H(e, "modelValue");
|
|
936
|
+
return (o, l) => (p(), _("div", qt, [
|
|
937
|
+
c("label", {
|
|
846
938
|
class: "aform__field-label",
|
|
847
939
|
for: o.uuid
|
|
848
|
-
},
|
|
849
|
-
|
|
940
|
+
}, k(o.label), 9, Rt),
|
|
941
|
+
A(c("input", {
|
|
850
942
|
class: "aform__input-field",
|
|
851
943
|
"onUpdate:modelValue": l[0] || (l[0] = (a) => n.value = a),
|
|
852
944
|
id: o.uuid,
|
|
853
945
|
disabled: o.readonly,
|
|
854
946
|
maxlength: o.mask ? t.value && o.mask.length : void 0,
|
|
855
947
|
required: o.required
|
|
856
|
-
}, null, 8,
|
|
857
|
-
[
|
|
858
|
-
[
|
|
948
|
+
}, null, 8, Ut), [
|
|
949
|
+
[P, n.value],
|
|
950
|
+
[C(Ot), o.mask]
|
|
859
951
|
]),
|
|
860
|
-
|
|
952
|
+
A(c("p", {
|
|
861
953
|
class: "error",
|
|
862
954
|
innerHTML: o.validation.errorMessage
|
|
863
|
-
}, null, 8,
|
|
864
|
-
[
|
|
955
|
+
}, null, 8, Wt), [
|
|
956
|
+
[I, o.validation.errorMessage]
|
|
865
957
|
])
|
|
866
958
|
]));
|
|
867
959
|
}
|
|
868
|
-
}),
|
|
960
|
+
}), Gt = { class: "login-container" }, Kt = { class: "account-container" }, zt = { class: "account-header" }, Nt = { id: "account-title" }, jt = { id: "account-subtitle" }, Jt = { class: "login-form-container" }, Qt = { class: "login-form-email login-form-element" }, Xt = /* @__PURE__ */ c("label", {
|
|
869
961
|
id: "login-email",
|
|
870
962
|
for: "email",
|
|
871
963
|
class: "aform__field-label"
|
|
872
|
-
}, "Email", -1),
|
|
964
|
+
}, "Email", -1), Zt = ["disabled"], en = { class: "login-form-password login-form-element" }, tn = /* @__PURE__ */ c("label", {
|
|
873
965
|
id: "login-password",
|
|
874
966
|
for: "password",
|
|
875
|
-
class: "
|
|
876
|
-
}, "Password", -1),
|
|
967
|
+
class: "aform__field-label"
|
|
968
|
+
}, "Password", -1), nn = ["disabled"], on = ["disabled"], ln = {
|
|
877
969
|
key: 0,
|
|
878
970
|
class: "material-symbols-outlined loading-icon"
|
|
879
|
-
},
|
|
880
|
-
/* @__PURE__ */
|
|
881
|
-
], -1),
|
|
971
|
+
}, an = /* @__PURE__ */ c("span", { id: "login-form-button" }, "Login", -1), sn = /* @__PURE__ */ c("button", { class: "btn" }, [
|
|
972
|
+
/* @__PURE__ */ c("span", { id: "forgot-password-button" }, "Forgot password?")
|
|
973
|
+
], -1), un = /* @__PURE__ */ E({
|
|
882
974
|
__name: "Login",
|
|
883
975
|
props: {
|
|
884
976
|
headerTitle: { default: "Login" },
|
|
@@ -887,82 +979,83 @@ const Tt = { class: "aform__form-element" }, St = ["for"], Lt = ["id", "disabled
|
|
|
887
979
|
emits: ["loginFailed", "loginSuccess"],
|
|
888
980
|
setup(e, { emit: t }) {
|
|
889
981
|
const n = t, o = f(""), l = f(""), a = f(!1), r = f(!1);
|
|
890
|
-
function s(
|
|
891
|
-
if (
|
|
982
|
+
function s(u) {
|
|
983
|
+
if (u.preventDefault(), a.value = !0, r.value) {
|
|
892
984
|
a.value = !1, n("loginFailed");
|
|
893
985
|
return;
|
|
894
986
|
}
|
|
895
987
|
a.value = !1, n("loginSuccess");
|
|
896
988
|
}
|
|
897
|
-
return (
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
989
|
+
return (u, i) => (p(), _("div", Gt, [
|
|
990
|
+
c("div", null, [
|
|
991
|
+
c("div", Kt, [
|
|
992
|
+
c("div", zt, [
|
|
993
|
+
c("h1", Nt, k(u.headerTitle), 1),
|
|
994
|
+
c("p", jt, k(u.headerSubtitle), 1)
|
|
903
995
|
]),
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
996
|
+
c("form", { onSubmit: s }, [
|
|
997
|
+
c("div", Jt, [
|
|
998
|
+
c("div", Qt, [
|
|
999
|
+
Xt,
|
|
1000
|
+
A(c("input", {
|
|
909
1001
|
id: "email",
|
|
910
1002
|
class: "aform__input-field",
|
|
911
1003
|
name: "email",
|
|
912
1004
|
placeholder: "name@example.com",
|
|
913
1005
|
type: "email",
|
|
914
|
-
"onUpdate:modelValue":
|
|
1006
|
+
"onUpdate:modelValue": i[0] || (i[0] = (d) => o.value = d),
|
|
915
1007
|
"auto-capitalize": "none",
|
|
916
1008
|
"auto-complete": "email",
|
|
917
1009
|
"auto-correct": "off",
|
|
918
1010
|
disabled: a.value
|
|
919
|
-
}, null, 8,
|
|
920
|
-
[
|
|
1011
|
+
}, null, 8, Zt), [
|
|
1012
|
+
[P, o.value]
|
|
921
1013
|
])
|
|
922
1014
|
]),
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
1015
|
+
c("div", en, [
|
|
1016
|
+
tn,
|
|
1017
|
+
A(c("input", {
|
|
926
1018
|
id: "password",
|
|
927
|
-
class: "
|
|
1019
|
+
class: "aform__input-field",
|
|
928
1020
|
name: "password",
|
|
929
1021
|
type: "password",
|
|
930
|
-
"onUpdate:modelValue":
|
|
1022
|
+
"onUpdate:modelValue": i[1] || (i[1] = (d) => l.value = d),
|
|
931
1023
|
disabled: a.value
|
|
932
|
-
}, null, 8,
|
|
933
|
-
[
|
|
1024
|
+
}, null, 8, nn), [
|
|
1025
|
+
[P, l.value]
|
|
934
1026
|
])
|
|
935
1027
|
]),
|
|
936
|
-
|
|
1028
|
+
c("button", {
|
|
937
1029
|
class: "btn",
|
|
938
1030
|
onClick: s,
|
|
939
1031
|
disabled: a.value || !o.value || !l.value
|
|
940
1032
|
}, [
|
|
941
|
-
a.value ? (
|
|
942
|
-
|
|
943
|
-
], 8,
|
|
1033
|
+
a.value ? (p(), _("span", ln, "progress_activity")) : j("", !0),
|
|
1034
|
+
an
|
|
1035
|
+
], 8, on)
|
|
944
1036
|
])
|
|
945
1037
|
], 32),
|
|
946
|
-
|
|
1038
|
+
sn
|
|
947
1039
|
])
|
|
948
1040
|
])
|
|
949
1041
|
]));
|
|
950
1042
|
}
|
|
951
1043
|
});
|
|
952
|
-
function
|
|
953
|
-
e.component("ACheckbox",
|
|
1044
|
+
function cn(e) {
|
|
1045
|
+
e.component("ACheckbox", He), e.component("ACombobox", Pe), e.component("ADate", Re), e.component("ADropdown", Ke), e.component("ADatePicker", ft), e.component("AFieldset", gt), e.component("AFileAttach", $t), e.component("AForm", ve), e.component("ANumericInput", Ht), e.component("ATextInput", Yt);
|
|
954
1046
|
}
|
|
955
1047
|
export {
|
|
956
|
-
|
|
957
|
-
|
|
1048
|
+
He as ACheckbox,
|
|
1049
|
+
Pe as AComboBox,
|
|
958
1050
|
Re as ADate,
|
|
959
|
-
|
|
1051
|
+
ft as ADatePicker,
|
|
960
1052
|
Ke as ADropdown,
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
1053
|
+
gt as AFieldset,
|
|
1054
|
+
$t as AFileAttach,
|
|
1055
|
+
ve as AForm,
|
|
1056
|
+
Ht as ANumericInput,
|
|
1057
|
+
Yt as ATextInput,
|
|
1058
|
+
un as Login,
|
|
1059
|
+
cn as install
|
|
967
1060
|
};
|
|
968
1061
|
//# sourceMappingURL=aform.js.map
|