@stonecrop/aform 0.16.3 → 0.16.5
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 +42 -0
- package/dist/aform.js +1105 -878
- package/dist/aform.js.map +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/src/index.d.ts +2 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +3 -1
- package/dist/src/types/index.d.ts +37 -0
- package/dist/src/types/index.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/components/form/ACurrencyInput.vue +357 -0
- package/src/components/form/AFormLink.vue +78 -11
- package/src/index.ts +3 -0
- package/src/types/index.ts +39 -0
package/dist/aform.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { install as
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import './assets/index.css';function
|
|
1
|
+
import { install as pe } from "@stonecrop/atable";
|
|
2
|
+
import { defineComponent as R, computed as A, useModel as G, openBlock as u, createElementBlock as m, Fragment as L, createElementVNode as a, toDisplayString as g, withDirectives as p, vModelCheckbox as Le, vShow as K, mergeModels as P, useId as qe, ref as S, inject as ie, watch as J, normalizeClass as X, withKeys as _, withModifiers as B, vModelText as Y, createCommentVNode as C, renderList as Z, renderSlot as re, createTextVNode as ae, unref as W, createVNode as le, withCtx as Fe, useTemplateRef as te, onMounted as $e, nextTick as _e, reactive as ce, vModelSelect as Ce, provide as Be, createBlock as O, watchEffect as Re, resolveDynamicComponent as he, mergeProps as Ve } from "vue";
|
|
3
|
+
import { vOnClickOutside as me } from "@vueuse/components";
|
|
4
|
+
import { onClickOutside as ke, useFileDialog as Ne } from "@vueuse/core";
|
|
5
|
+
import './assets/index.css';function ue(e) {
|
|
6
6
|
return Function(`"use strict"; return (${e})`)();
|
|
7
7
|
}
|
|
8
|
-
const
|
|
8
|
+
const He = { class: "aform_form-element" }, Ue = { class: "aform_field-label" }, Ee = { class: "aform_display-value" }, Ke = ["for"], Pe = { class: "aform_checkbox-container aform_input-field" }, Qe = ["id", "disabled", "required"], Ye = ["innerHTML"], Ge = /* @__PURE__ */ R({
|
|
9
9
|
__name: "ACheckbox",
|
|
10
|
-
props: /* @__PURE__ */
|
|
10
|
+
props: /* @__PURE__ */ P({
|
|
11
11
|
schema: {},
|
|
12
12
|
label: {},
|
|
13
13
|
selectRange: { type: Boolean },
|
|
@@ -23,52 +23,414 @@ const _e = { class: "aform_form-element" }, Re = { class: "aform_field-label" },
|
|
|
23
23
|
}),
|
|
24
24
|
emits: ["update:modelValue"],
|
|
25
25
|
setup(e) {
|
|
26
|
-
const
|
|
27
|
-
return (
|
|
28
|
-
e.mode === "display" ? (u(), m(
|
|
29
|
-
a("label",
|
|
30
|
-
a("span",
|
|
31
|
-
], 64)) : (u(), m(
|
|
26
|
+
const s = A(() => e.errors?.length ? e.errors.join("; ") : e.validation.errorMessage ?? ""), n = G(e, "modelValue");
|
|
27
|
+
return (c, t) => (u(), m("div", He, [
|
|
28
|
+
e.mode === "display" ? (u(), m(L, { key: 0 }, [
|
|
29
|
+
a("label", Ue, g(e.label), 1),
|
|
30
|
+
a("span", Ee, g(n.value ? "✓" : "✗"), 1)
|
|
31
|
+
], 64)) : (u(), m(L, { key: 1 }, [
|
|
32
32
|
a("label", {
|
|
33
33
|
class: "aform_field-label",
|
|
34
34
|
for: e.uuid
|
|
35
|
-
},
|
|
36
|
-
a("span",
|
|
37
|
-
|
|
35
|
+
}, g(e.label), 9, Ke),
|
|
36
|
+
a("span", Pe, [
|
|
37
|
+
p(a("input", {
|
|
38
38
|
id: e.uuid,
|
|
39
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
39
|
+
"onUpdate:modelValue": t[0] || (t[0] = (d) => n.value = d),
|
|
40
40
|
type: "checkbox",
|
|
41
41
|
class: "aform_checkbox",
|
|
42
42
|
disabled: e.mode === "read",
|
|
43
43
|
required: e.required
|
|
44
|
-
}, null, 8,
|
|
45
|
-
[
|
|
44
|
+
}, null, 8, Qe), [
|
|
45
|
+
[Le, n.value]
|
|
46
46
|
])
|
|
47
47
|
]),
|
|
48
|
-
|
|
48
|
+
p(a("p", {
|
|
49
49
|
class: "aform_error",
|
|
50
|
-
innerHTML:
|
|
51
|
-
}, null, 8,
|
|
52
|
-
[
|
|
50
|
+
innerHTML: s.value
|
|
51
|
+
}, null, 8, Ye), [
|
|
52
|
+
[K, s.value]
|
|
53
53
|
])
|
|
54
54
|
], 64))
|
|
55
55
|
]));
|
|
56
56
|
}
|
|
57
|
-
}),
|
|
58
|
-
const
|
|
59
|
-
for (const [
|
|
60
|
-
|
|
61
|
-
return
|
|
62
|
-
},
|
|
57
|
+
}), U = (e, s) => {
|
|
58
|
+
const n = e.__vccOpts || e;
|
|
59
|
+
for (const [c, t] of s)
|
|
60
|
+
n[c] = t;
|
|
61
|
+
return n;
|
|
62
|
+
}, ze = /* @__PURE__ */ U(Ge, [["__scopeId", "data-v-ca06741d"]]), We = {
|
|
63
|
+
key: 0,
|
|
64
|
+
class: "aform_display-value"
|
|
65
|
+
}, Je = { class: "aform_form-link-wrapper" }, Xe = { class: "input-group" }, Ze = ["placeholder", "aria-label", "required", "aria-expanded", "aria-controls", "aria-activedescendant", "disabled", "onKeydown"], Oe = ["onKeydown"], je = ["aria-label"], et = {
|
|
66
|
+
key: 0,
|
|
67
|
+
class: "autocomplete-result loading"
|
|
68
|
+
}, tt = ["id", "aria-selected", "onMousedown"], at = {
|
|
69
|
+
key: 0,
|
|
70
|
+
class: "aform_field-label"
|
|
71
|
+
}, lt = /* @__PURE__ */ R({
|
|
72
|
+
__name: "AFormLink",
|
|
73
|
+
props: /* @__PURE__ */ P({
|
|
74
|
+
schema: {},
|
|
75
|
+
label: {},
|
|
76
|
+
selectRange: { type: Boolean },
|
|
77
|
+
mask: {},
|
|
78
|
+
required: { type: Boolean },
|
|
79
|
+
mode: {},
|
|
80
|
+
uuid: {},
|
|
81
|
+
validation: {},
|
|
82
|
+
errors: {},
|
|
83
|
+
doctype: { default: () => {
|
|
84
|
+
} },
|
|
85
|
+
formatter: { type: Function, default: void 0 },
|
|
86
|
+
icon: { default: "arrow-right" },
|
|
87
|
+
disabled: { type: Boolean, default: !1 },
|
|
88
|
+
filterFunction: { type: [String, Function], default: void 0 },
|
|
89
|
+
isAsync: { type: Boolean, default: !1 },
|
|
90
|
+
embedded: { type: Boolean, default: !1 },
|
|
91
|
+
placeholder: { default: () => {
|
|
92
|
+
} },
|
|
93
|
+
ariaLabel: { default: () => {
|
|
94
|
+
} }
|
|
95
|
+
}, {
|
|
96
|
+
modelValue: { default: () => ({ id: "", displayText: "" }) },
|
|
97
|
+
modelModifiers: {}
|
|
98
|
+
}),
|
|
99
|
+
emits: ["update:modelValue"],
|
|
100
|
+
setup(e) {
|
|
101
|
+
const s = `${e.uuid ?? `aform-link-${qe()}`}-listbox`, n = G(e, "modelValue"), c = A(() => {
|
|
102
|
+
const D = n.value?.id;
|
|
103
|
+
return D != null && D !== "";
|
|
104
|
+
}), t = A(() => c.value ? e.formatter ? e.formatter(n.value) : n.value.displayText ?? String(n.value.id) : "—"), d = S(c.value ? t.value : ""), y = S(!1), k = S(!1), v = S([]), h = S(null), x = ie("aformLinkNavigator", null), $ = ie("aformLinkResolver", null);
|
|
105
|
+
J(
|
|
106
|
+
() => n.value,
|
|
107
|
+
(D) => {
|
|
108
|
+
D != null && (typeof D == "string" || typeof D == "number") && (n.value = { id: D });
|
|
109
|
+
},
|
|
110
|
+
{ immediate: !0 }
|
|
111
|
+
), J(
|
|
112
|
+
() => n.value?.id,
|
|
113
|
+
async (D) => {
|
|
114
|
+
if (!(!D || n.value.displayText))
|
|
115
|
+
try {
|
|
116
|
+
let V, N;
|
|
117
|
+
if (e.filterFunction ? (V = (await (typeof e.filterFunction == "string" ? ue(e.filterFunction) : e.filterFunction)(String(D))).find((j) => String(j.id) === String(D)), N = V?.displayText, N === void 0 && console.warn(
|
|
118
|
+
`[AFormLink] filterFunction returned no matching result for id "${D}". The function must return an item whose \`id\` exactly matches the search string.`
|
|
119
|
+
)) : $ && e.doctype && (N = await $(e.doctype, D.toString()) ?? void 0), N) {
|
|
120
|
+
const Q = { ...n.value, ...V, id: n.value.id, displayText: N };
|
|
121
|
+
d.value = e.formatter ? e.formatter(Q) : N, n.value = Q;
|
|
122
|
+
}
|
|
123
|
+
} catch {
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
{ immediate: !0 }
|
|
127
|
+
);
|
|
128
|
+
const I = () => {
|
|
129
|
+
x && e.doctype ? x.navigate(e.doctype, n.value.id) : x && !e.doctype && console.warn(
|
|
130
|
+
"[AFormLink] Navigation requested but `doctype` prop is missing. Add `options` (or `doctype`) to the Link field definition to enable navigation."
|
|
131
|
+
);
|
|
132
|
+
}, f = async (D) => {
|
|
133
|
+
if (!(!e.filterFunction || e.mode === "read")) {
|
|
134
|
+
h.value = null, y.value = !0, e.isAsync && (k.value = !0);
|
|
135
|
+
try {
|
|
136
|
+
const V = typeof e.filterFunction == "string" ? ue(e.filterFunction) : e.filterFunction;
|
|
137
|
+
v.value = await V(D) ?? [];
|
|
138
|
+
} catch {
|
|
139
|
+
v.value = [];
|
|
140
|
+
} finally {
|
|
141
|
+
k.value = !1;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}, l = () => {
|
|
145
|
+
y.value = !1, h.value = null, d.value = c.value ? t.value : "";
|
|
146
|
+
}, o = () => {
|
|
147
|
+
y.value && l();
|
|
148
|
+
}, i = () => f(d.value), w = () => f(d.value), r = (D) => {
|
|
149
|
+
n.value = D, d.value = e.formatter ? e.formatter(D) : D.displayText ?? String(D.id), y.value = !1, h.value = null;
|
|
150
|
+
}, F = () => {
|
|
151
|
+
const D = v.value.length;
|
|
152
|
+
D && (h.value = h.value === null ? 0 : (h.value + 1) % D);
|
|
153
|
+
}, b = () => {
|
|
154
|
+
v.value.length && (h.value === null || h.value === 0 ? h.value = null : h.value -= 1);
|
|
155
|
+
}, q = () => {
|
|
156
|
+
h.value !== null && v.value[h.value] && r(v.value[h.value]);
|
|
157
|
+
};
|
|
158
|
+
return (D, V) => (u(), m("div", {
|
|
159
|
+
class: X(["aform_form-element", { "aform_form-element--embedded": e.embedded }])
|
|
160
|
+
}, [
|
|
161
|
+
e.mode === "display" ? (u(), m("span", We, g(t.value), 1)) : (u(), m(L, { key: 1 }, [
|
|
162
|
+
p((u(), m("div", Je, [
|
|
163
|
+
a("div", Xe, [
|
|
164
|
+
p(a("input", {
|
|
165
|
+
"onUpdate:modelValue": V[0] || (V[0] = (N) => d.value = N),
|
|
166
|
+
type: "text",
|
|
167
|
+
role: "combobox",
|
|
168
|
+
autocomplete: "off",
|
|
169
|
+
"aria-autocomplete": "list",
|
|
170
|
+
class: X(["aform_input-field", { "aform_input-field--embedded": e.embedded }]),
|
|
171
|
+
placeholder: e.placeholder,
|
|
172
|
+
"aria-label": e.ariaLabel,
|
|
173
|
+
required: e.required,
|
|
174
|
+
"aria-expanded": y.value,
|
|
175
|
+
"aria-controls": y.value ? s : void 0,
|
|
176
|
+
"aria-activedescendant": h.value === null ? void 0 : `${s}-opt-${h.value}`,
|
|
177
|
+
disabled: e.disabled || e.mode === "read",
|
|
178
|
+
onInput: w,
|
|
179
|
+
onFocus: i,
|
|
180
|
+
onKeydown: [
|
|
181
|
+
_(B(F, ["prevent"]), ["down"]),
|
|
182
|
+
_(B(b, ["prevent"]), ["up"]),
|
|
183
|
+
_(B(q, ["prevent"]), ["enter"]),
|
|
184
|
+
_(l, ["esc"]),
|
|
185
|
+
_(l, ["tab"])
|
|
186
|
+
]
|
|
187
|
+
}, null, 42, Ze), [
|
|
188
|
+
[Y, d.value]
|
|
189
|
+
]),
|
|
190
|
+
c.value && !e.disabled && !e.embedded ? (u(), m("button", {
|
|
191
|
+
key: 0,
|
|
192
|
+
type: "button",
|
|
193
|
+
class: "aform_form-btn",
|
|
194
|
+
onClick: I,
|
|
195
|
+
onKeydown: _(B(I, ["prevent"]), ["enter"])
|
|
196
|
+
}, [
|
|
197
|
+
a("span", null, g(e.icon === "chevron-right" ? "›" : "→"), 1)
|
|
198
|
+
], 40, Oe)) : C("", !0)
|
|
199
|
+
]),
|
|
200
|
+
y.value ? (u(), m("ul", {
|
|
201
|
+
key: 0,
|
|
202
|
+
id: s,
|
|
203
|
+
class: "autocomplete-results",
|
|
204
|
+
role: "listbox",
|
|
205
|
+
"aria-label": e.ariaLabel
|
|
206
|
+
}, [
|
|
207
|
+
k.value ? (u(), m("li", et, "Loading…")) : (u(!0), m(L, { key: 1 }, Z(v.value, (N, Q) => (u(), m("li", {
|
|
208
|
+
id: `${s}-opt-${Q}`,
|
|
209
|
+
key: String(N.id),
|
|
210
|
+
role: "option",
|
|
211
|
+
"aria-selected": Q === h.value,
|
|
212
|
+
class: X(["autocomplete-result", { "is-active": Q === h.value }]),
|
|
213
|
+
onMousedown: B((se) => r(N), ["prevent"])
|
|
214
|
+
}, [
|
|
215
|
+
re(D.$slots, "option", { option: N }, () => [
|
|
216
|
+
ae(g(N.displayText ?? String(N.id)), 1)
|
|
217
|
+
], !0)
|
|
218
|
+
], 42, tt))), 128))
|
|
219
|
+
], 8, je)) : C("", !0)
|
|
220
|
+
])), [
|
|
221
|
+
[W(me), o]
|
|
222
|
+
]),
|
|
223
|
+
e.label && !e.embedded ? (u(), m("label", at, g(e.label), 1)) : C("", !0)
|
|
224
|
+
], 64))
|
|
225
|
+
], 2));
|
|
226
|
+
}
|
|
227
|
+
}), xe = /* @__PURE__ */ U(lt, [["__scopeId", "data-v-eb2fee75"]]), nt = { class: "aform_form-element acurrency" }, st = { class: "aform_display-value" }, ot = { class: "aform_field-label" }, it = { class: "acurrency__row" }, ut = { class: "acurrency__field acurrency__field--amount" }, dt = { class: "acurrency__group" }, rt = { class: "acurrency__currency" }, ct = { class: "acurrency__amount-wrap" }, mt = ["id", "disabled", "required"], ft = ["for"], vt = { class: "acurrency__row acurrency__row--base" }, yt = { class: "acurrency__field acurrency__field--base-currency" }, ht = ["value"], bt = { class: "aform_field-label" }, gt = { class: "acurrency__field acurrency__field--base-amount" }, $t = ["value"], kt = { class: "aform_field-label" }, xt = { class: "acurrency__field acurrency__field--exchange-rate" }, wt = ["value"], Dt = { class: "aform_field-label" }, Mt = ["innerHTML"], be = 6, Tt = /* @__PURE__ */ R({
|
|
228
|
+
__name: "ACurrencyInput",
|
|
229
|
+
props: /* @__PURE__ */ P({
|
|
230
|
+
schema: {},
|
|
231
|
+
label: {},
|
|
232
|
+
selectRange: { type: Boolean },
|
|
233
|
+
mask: {},
|
|
234
|
+
required: { type: Boolean },
|
|
235
|
+
mode: {},
|
|
236
|
+
uuid: {},
|
|
237
|
+
validation: { default: () => ({ errorMessage: " " }) },
|
|
238
|
+
errors: {},
|
|
239
|
+
options: { default: () => ({}) },
|
|
240
|
+
currencyLabel: { default: "Currency" },
|
|
241
|
+
baseCurrencyLabel: { default: "Base Currency" },
|
|
242
|
+
baseAmountLabel: { default: "Base Amount" },
|
|
243
|
+
exchangeRateLabel: { default: "Exchange Rate" }
|
|
244
|
+
}, {
|
|
245
|
+
modelValue: {
|
|
246
|
+
default: () => ({
|
|
247
|
+
amount: 0,
|
|
248
|
+
currency: { id: "" },
|
|
249
|
+
baseAmount: 0,
|
|
250
|
+
baseCurrency: { id: "" },
|
|
251
|
+
exchangeRate: 1
|
|
252
|
+
})
|
|
253
|
+
},
|
|
254
|
+
modelModifiers: {}
|
|
255
|
+
}),
|
|
256
|
+
emits: ["update:modelValue"],
|
|
257
|
+
setup(e) {
|
|
258
|
+
const s = (r) => r.symbol ?? r.displayText ?? String(r.id), n = G(e, "modelValue"), c = A(() => {
|
|
259
|
+
const r = e.options.baseCurrency ?? n.value?.baseCurrency;
|
|
260
|
+
return r ? typeof r == "string" ? { id: r } : r : { id: "" };
|
|
261
|
+
}), t = ie("aformLinkResolver", null), d = S(c.value);
|
|
262
|
+
J(
|
|
263
|
+
c,
|
|
264
|
+
async (r) => {
|
|
265
|
+
if (!r.id || r.displayText || !t || !e.options.doctype) {
|
|
266
|
+
d.value = r;
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
try {
|
|
270
|
+
const F = await t(e.options.doctype, String(r.id));
|
|
271
|
+
d.value = F ? { ...r, displayText: F } : r;
|
|
272
|
+
} catch {
|
|
273
|
+
d.value = r;
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
{ immediate: !0 }
|
|
277
|
+
);
|
|
278
|
+
const y = A(() => {
|
|
279
|
+
const r = d.value;
|
|
280
|
+
return r?.id ? r.displayText ?? String(r.id) : "";
|
|
281
|
+
}), k = (r) => {
|
|
282
|
+
const F = d.value.id;
|
|
283
|
+
return !r || String(r) === String(F) ? 1 : String(r) === String(n.value?.currency?.id) ? n.value?.exchangeRate ?? e.options.exchangeRates?.[String(r)] ?? 1 : e.options.exchangeRates?.[String(r)] ?? 1;
|
|
284
|
+
}, v = A(() => {
|
|
285
|
+
const { precision: r } = e.options;
|
|
286
|
+
return r === void 0 ? be : Number.isInteger(r) && r >= 0 && r <= 100 ? r : be;
|
|
287
|
+
}), h = (r) => Number(r.toFixed(v.value)), x = (r, F) => {
|
|
288
|
+
const b = k(F.id);
|
|
289
|
+
n.value = {
|
|
290
|
+
amount: r,
|
|
291
|
+
currency: F,
|
|
292
|
+
exchangeRate: b,
|
|
293
|
+
baseCurrency: d.value,
|
|
294
|
+
baseAmount: h(r * b)
|
|
295
|
+
};
|
|
296
|
+
}, $ = A({
|
|
297
|
+
get: () => n.value?.amount ?? 0,
|
|
298
|
+
set: (r) => x(r, n.value?.currency ?? { id: "" })
|
|
299
|
+
}), I = A({
|
|
300
|
+
get: () => n.value?.currency ?? { id: "" },
|
|
301
|
+
set: (r) => x(n.value?.amount ?? 0, r)
|
|
302
|
+
}), f = /* @__PURE__ */ new Set([
|
|
303
|
+
"Backspace",
|
|
304
|
+
"Delete",
|
|
305
|
+
"Tab",
|
|
306
|
+
"Escape",
|
|
307
|
+
"Enter",
|
|
308
|
+
"ArrowLeft",
|
|
309
|
+
"ArrowRight",
|
|
310
|
+
"ArrowUp",
|
|
311
|
+
"ArrowDown",
|
|
312
|
+
"Home",
|
|
313
|
+
"End"
|
|
314
|
+
]), l = (r) => {
|
|
315
|
+
if (r.ctrlKey || r.metaKey || r.altKey || f.has(r.key) || /^[0-9]$/.test(r.key)) return;
|
|
316
|
+
const F = r.target;
|
|
317
|
+
r.key === "." && !F.value.includes(".") || r.key === "-" && !F.value.includes("-") || r.preventDefault();
|
|
318
|
+
}, o = (r) => {
|
|
319
|
+
const F = r.clipboardData?.getData("text") ?? "";
|
|
320
|
+
/^-?\d*\.?\d*$/.test(F) || r.preventDefault();
|
|
321
|
+
}, i = A(() => {
|
|
322
|
+
const r = n.value;
|
|
323
|
+
return !!r?.baseCurrency?.id && (r.currency?.id !== r.baseCurrency?.id || r.amount !== r.baseAmount);
|
|
324
|
+
}), w = A(() => {
|
|
325
|
+
const r = n.value;
|
|
326
|
+
if (!r || !r.currency?.id) return "—";
|
|
327
|
+
const F = r.currency.displayText ?? String(r.currency.id), b = `${r.amount} ${F}`;
|
|
328
|
+
if (!i.value) return b;
|
|
329
|
+
const q = r.baseCurrency.displayText ?? String(r.baseCurrency.id);
|
|
330
|
+
return `${b} (${r.baseAmount} ${q})`;
|
|
331
|
+
});
|
|
332
|
+
return (r, F) => (u(), m("div", nt, [
|
|
333
|
+
e.mode === "display" ? (u(), m(L, { key: 0 }, [
|
|
334
|
+
a("span", st, g(w.value), 1),
|
|
335
|
+
a("label", ot, g(e.label), 1)
|
|
336
|
+
], 64)) : (u(), m(L, { key: 1 }, [
|
|
337
|
+
a("div", it, [
|
|
338
|
+
a("div", ut, [
|
|
339
|
+
a("div", dt, [
|
|
340
|
+
a("div", rt, [
|
|
341
|
+
le(xe, {
|
|
342
|
+
modelValue: I.value,
|
|
343
|
+
"onUpdate:modelValue": F[0] || (F[0] = (b) => I.value = b),
|
|
344
|
+
mode: e.mode,
|
|
345
|
+
embedded: "",
|
|
346
|
+
placeholder: e.currencyLabel,
|
|
347
|
+
"aria-label": e.currencyLabel,
|
|
348
|
+
required: e.required,
|
|
349
|
+
formatter: s,
|
|
350
|
+
doctype: e.options.doctype,
|
|
351
|
+
"filter-function": e.options.filterFunction,
|
|
352
|
+
"is-async": e.options.isAsync
|
|
353
|
+
}, {
|
|
354
|
+
option: Fe(({ option: b }) => [
|
|
355
|
+
ae(g(b.symbol ? `${b.symbol} — ` : "") + g(b.displayText ?? b.id), 1)
|
|
356
|
+
]),
|
|
357
|
+
_: 1
|
|
358
|
+
}, 8, ["modelValue", "mode", "placeholder", "aria-label", "required", "doctype", "filter-function", "is-async"])
|
|
359
|
+
]),
|
|
360
|
+
a("div", ct, [
|
|
361
|
+
p(a("input", {
|
|
362
|
+
id: e.uuid,
|
|
363
|
+
"onUpdate:modelValue": F[1] || (F[1] = (b) => $.value = b),
|
|
364
|
+
class: "acurrency__amount",
|
|
365
|
+
type: "number",
|
|
366
|
+
disabled: e.mode === "read",
|
|
367
|
+
required: e.required,
|
|
368
|
+
onKeydown: l,
|
|
369
|
+
onPaste: o
|
|
370
|
+
}, null, 40, mt), [
|
|
371
|
+
[
|
|
372
|
+
Y,
|
|
373
|
+
$.value,
|
|
374
|
+
void 0,
|
|
375
|
+
{ number: !0 }
|
|
376
|
+
]
|
|
377
|
+
]),
|
|
378
|
+
a("label", {
|
|
379
|
+
class: "aform_field-label",
|
|
380
|
+
for: e.uuid
|
|
381
|
+
}, g(e.label), 9, ft)
|
|
382
|
+
])
|
|
383
|
+
])
|
|
384
|
+
])
|
|
385
|
+
]),
|
|
386
|
+
a("div", vt, [
|
|
387
|
+
a("div", yt, [
|
|
388
|
+
a("input", {
|
|
389
|
+
value: y.value,
|
|
390
|
+
class: "aform_input-field acurrency__base-field",
|
|
391
|
+
type: "text",
|
|
392
|
+
disabled: ""
|
|
393
|
+
}, null, 8, ht),
|
|
394
|
+
a("label", bt, g(e.baseCurrencyLabel), 1)
|
|
395
|
+
]),
|
|
396
|
+
a("div", gt, [
|
|
397
|
+
a("input", {
|
|
398
|
+
value: n.value.baseAmount,
|
|
399
|
+
class: "aform_input-field acurrency__base-field",
|
|
400
|
+
type: "number",
|
|
401
|
+
disabled: ""
|
|
402
|
+
}, null, 8, $t),
|
|
403
|
+
a("label", kt, g(e.baseAmountLabel), 1)
|
|
404
|
+
]),
|
|
405
|
+
a("div", xt, [
|
|
406
|
+
a("input", {
|
|
407
|
+
value: n.value.exchangeRate,
|
|
408
|
+
class: "aform_input-field acurrency__base-field",
|
|
409
|
+
type: "number",
|
|
410
|
+
disabled: ""
|
|
411
|
+
}, null, 8, wt),
|
|
412
|
+
a("label", Dt, g(e.exchangeRateLabel), 1)
|
|
413
|
+
])
|
|
414
|
+
]),
|
|
415
|
+
p(a("p", {
|
|
416
|
+
class: "aform_error",
|
|
417
|
+
innerHTML: e.validation.errorMessage
|
|
418
|
+
}, null, 8, Mt), [
|
|
419
|
+
[K, e.validation.errorMessage]
|
|
420
|
+
])
|
|
421
|
+
], 64))
|
|
422
|
+
]));
|
|
423
|
+
}
|
|
424
|
+
}), St = /* @__PURE__ */ U(Tt, [["__scopeId", "data-v-15bec6ef"]]), At = { class: "aform_display-value" }, It = { key: 0 }, pt = ["innerHTML"], Lt = {
|
|
63
425
|
ref: "datepicker",
|
|
64
426
|
class: "adatepicker",
|
|
65
427
|
tabindex: "0"
|
|
66
|
-
},
|
|
428
|
+
}, qt = {
|
|
67
429
|
colspan: "5",
|
|
68
430
|
tabindex: -1
|
|
69
|
-
},
|
|
431
|
+
}, Ft = { key: 0 }, _t = { colspan: "7" }, Ct = { class: "date-input" }, Bt = ["value"], Rt = ["value"], Vt = ["onClick", "onKeydown", "onMouseover"], Nt = ["innerHTML"], Ht = 6, ge = 7, Ut = /* @__PURE__ */ R({
|
|
70
432
|
__name: "ADatePicker",
|
|
71
|
-
props: /* @__PURE__ */
|
|
433
|
+
props: /* @__PURE__ */ P({
|
|
72
434
|
schema: {},
|
|
73
435
|
label: {},
|
|
74
436
|
selectRange: { type: Boolean, default: !1 },
|
|
@@ -82,129 +444,129 @@ const _e = { class: "aform_form-element" }, Re = { class: "aform_field-label" },
|
|
|
82
444
|
modelValue: { default: () => /* @__PURE__ */ new Date() },
|
|
83
445
|
modelModifiers: {}
|
|
84
446
|
}),
|
|
85
|
-
emits: /* @__PURE__ */
|
|
86
|
-
setup(e, { expose:
|
|
87
|
-
const
|
|
447
|
+
emits: /* @__PURE__ */ P(["get-date"], ["update:modelValue"]),
|
|
448
|
+
setup(e, { expose: s, emit: n }) {
|
|
449
|
+
const c = A(() => e.errors?.length ? e.errors.join("; ") : e.validation.errorMessage ?? ""), t = G(e, "modelValue"), d = S(new Date(t.value)), y = S(d.value.getMonth()), k = S(d.value.getFullYear()), v = S([]), h = S(new Date(t.value)), x = S(null), $ = S(null), I = te("start-date-input"), f = te("end-date-input"), l = n, o = A(() => new Date(k.value, y.value, 1).toLocaleDateString(void 0, {
|
|
88
450
|
year: "numeric",
|
|
89
451
|
month: "long"
|
|
90
|
-
})), i =
|
|
91
|
-
const
|
|
92
|
-
return
|
|
93
|
-
},
|
|
94
|
-
const
|
|
95
|
-
return
|
|
96
|
-
},
|
|
97
|
-
const
|
|
98
|
-
return
|
|
99
|
-
},
|
|
100
|
-
const
|
|
101
|
-
if (!
|
|
102
|
-
const
|
|
103
|
-
return
|
|
104
|
-
},
|
|
105
|
-
|
|
106
|
-
},
|
|
107
|
-
|
|
108
|
-
const
|
|
109
|
-
for (const
|
|
110
|
-
|
|
111
|
-
},
|
|
112
|
-
|
|
113
|
-
},
|
|
114
|
-
|
|
115
|
-
},
|
|
116
|
-
|
|
117
|
-
},
|
|
118
|
-
if (t.value =
|
|
119
|
-
const
|
|
120
|
-
|
|
452
|
+
})), i = A(() => x.value != null ? r(x.value) : ""), w = A(() => $.value != null ? r($.value) : ""), r = (M) => z(M) ? M.getMonth() + 1 + "/" + M.getDate() + "/" + M.getFullYear() : "", F = (M) => {
|
|
453
|
+
const T = /* @__PURE__ */ new Date();
|
|
454
|
+
return y.value !== T.getMonth() ? !1 : T.toDateString() === new Date(M).toDateString();
|
|
455
|
+
}, b = (M) => new Date(M).toDateString() === new Date(d.value).toDateString(), q = (M) => {
|
|
456
|
+
const T = x.value;
|
|
457
|
+
return z(T) ? new Date(M).toDateString() === T.toDateString() : !1;
|
|
458
|
+
}, D = (M) => {
|
|
459
|
+
const T = $.value;
|
|
460
|
+
return z(T) ? new Date(M).toDateString() === T.toDateString() : !1;
|
|
461
|
+
}, V = (M, T) => (M - 1) * ge + T, N = (M) => {
|
|
462
|
+
const T = x.value;
|
|
463
|
+
if (!z(T)) return !1;
|
|
464
|
+
const H = new Date(M), E = $.value, ee = z(E) ? E : new Date(h.value);
|
|
465
|
+
return H.getTime() > T.getTime() && H.getTime() < ee.getTime();
|
|
466
|
+
}, Q = (M, T) => v.value[V(M, T)], se = (M) => {
|
|
467
|
+
h.value = new Date(v.value[M]);
|
|
468
|
+
}, j = () => {
|
|
469
|
+
v.value = [];
|
|
470
|
+
const M = new Date(k.value, y.value, 1), T = M.getDay(), H = M.setDate(M.getDate() - T);
|
|
471
|
+
for (const E of Array(43).keys())
|
|
472
|
+
v.value.push(H + E * 864e5);
|
|
473
|
+
}, Me = () => k.value -= 1, Te = () => k.value += 1, Se = () => {
|
|
474
|
+
y.value == 0 ? (y.value = 11, Me()) : y.value -= 1;
|
|
475
|
+
}, Ae = () => {
|
|
476
|
+
y.value == 11 ? (y.value = 0, Te()) : y.value += 1;
|
|
477
|
+
}, fe = (M) => {
|
|
478
|
+
M.key === "Enter" && oe();
|
|
479
|
+
}, ve = (M) => {
|
|
480
|
+
if (t.value = d.value = new Date(v.value[M]), e.selectRange) {
|
|
481
|
+
const T = x.value;
|
|
482
|
+
T == null || $.value != null ? (x.value = t.value, $.value = null) : z(T) && d.value.getTime() < T.getTime() ? ($.value = null, x.value = t.value) : $.value = t.value, I.value && (I.value.value = r(x.value) ?? ""), f.value && (f.value.value = r($.value) ?? "");
|
|
121
483
|
}
|
|
122
|
-
|
|
123
|
-
},
|
|
124
|
-
const
|
|
125
|
-
|
|
126
|
-
},
|
|
127
|
-
if (
|
|
128
|
-
|
|
129
|
-
else if (
|
|
130
|
-
const
|
|
131
|
-
|
|
484
|
+
ye();
|
|
485
|
+
}, Ie = () => {
|
|
486
|
+
const M = x.value, T = $.value;
|
|
487
|
+
z(T) && z(M) && T.getTime() < M.getTime() && ([x.value, $.value] = [T, M]);
|
|
488
|
+
}, z = (M) => M instanceof Date && !isNaN(M.getTime()), oe = () => {
|
|
489
|
+
if (I.value?.value == "")
|
|
490
|
+
x.value = null;
|
|
491
|
+
else if (I.value) {
|
|
492
|
+
const M = new Date(I.value.value);
|
|
493
|
+
x.value = z(M) ? M : null;
|
|
132
494
|
}
|
|
133
|
-
if (
|
|
134
|
-
|
|
135
|
-
else if (
|
|
136
|
-
const
|
|
137
|
-
|
|
495
|
+
if (f.value?.value == "")
|
|
496
|
+
$.value = null;
|
|
497
|
+
else if (f.value) {
|
|
498
|
+
const M = new Date(f.value.value);
|
|
499
|
+
$.value = z(M) ? M : null;
|
|
138
500
|
}
|
|
139
|
-
|
|
140
|
-
},
|
|
501
|
+
z(x.value) && (z($.value) && Ie(), d.value = x.value), ye();
|
|
502
|
+
}, ye = () => {
|
|
141
503
|
l("get-date", {
|
|
142
|
-
start: e.selectRange ?
|
|
143
|
-
end: e.selectRange ?
|
|
144
|
-
selected:
|
|
504
|
+
start: e.selectRange ? x.value : null,
|
|
505
|
+
end: e.selectRange ? $.value : null,
|
|
506
|
+
selected: d.value
|
|
145
507
|
});
|
|
146
508
|
};
|
|
147
|
-
return
|
|
148
|
-
|
|
149
|
-
const
|
|
150
|
-
if (
|
|
151
|
-
|
|
509
|
+
return $e(async () => {
|
|
510
|
+
j(), await _e();
|
|
511
|
+
const M = document.getElementsByClassName("selectedDate");
|
|
512
|
+
if (M.length > 0)
|
|
513
|
+
M[0].focus();
|
|
152
514
|
else {
|
|
153
|
-
const
|
|
154
|
-
|
|
515
|
+
const T = document.getElementsByClassName("todaysDate");
|
|
516
|
+
T.length > 0 && T[0].focus();
|
|
155
517
|
}
|
|
156
|
-
}),
|
|
157
|
-
a("span",
|
|
158
|
-
e.label ? (u(), m("label",
|
|
159
|
-
|
|
518
|
+
}), J([y, k], j), s({ currentMonth: y, currentYear: k, selectedDate: d }), (M, T) => e.mode === "display" || e.mode === "read" ? (u(), m(L, { key: 0 }, [
|
|
519
|
+
a("span", At, g(t.value ? new Date(t.value).toLocaleDateString() : ""), 1),
|
|
520
|
+
e.label ? (u(), m("label", It, g(e.label), 1)) : C("", !0),
|
|
521
|
+
p(a("p", {
|
|
160
522
|
class: "aform_error",
|
|
161
|
-
innerHTML:
|
|
162
|
-
}, null, 8,
|
|
163
|
-
[
|
|
523
|
+
innerHTML: c.value
|
|
524
|
+
}, null, 8, pt), [
|
|
525
|
+
[K, c.value]
|
|
164
526
|
])
|
|
165
|
-
], 64)) : (u(), m(
|
|
166
|
-
a("div",
|
|
527
|
+
], 64)) : (u(), m(L, { key: 1 }, [
|
|
528
|
+
a("div", Lt, [
|
|
167
529
|
a("table", null, [
|
|
168
530
|
a("tbody", null, [
|
|
169
531
|
a("tr", null, [
|
|
170
532
|
a("td", {
|
|
171
533
|
id: "previous-month-btn",
|
|
172
534
|
tabindex: -1,
|
|
173
|
-
onClick:
|
|
535
|
+
onClick: Se
|
|
174
536
|
}, "<"),
|
|
175
|
-
a("th",
|
|
537
|
+
a("th", qt, g(o.value), 1),
|
|
176
538
|
a("td", {
|
|
177
539
|
id: "next-month-btn",
|
|
178
540
|
tabindex: -1,
|
|
179
|
-
onClick:
|
|
541
|
+
onClick: Ae
|
|
180
542
|
}, ">")
|
|
181
543
|
]),
|
|
182
|
-
e.selectRange ? (u(), m("tr",
|
|
183
|
-
a("td",
|
|
184
|
-
a("div",
|
|
544
|
+
e.selectRange ? (u(), m("tr", Ft, [
|
|
545
|
+
a("td", _t, [
|
|
546
|
+
a("div", Ct, [
|
|
185
547
|
a("input", {
|
|
186
548
|
ref: "start-date-input",
|
|
187
549
|
value: i.value,
|
|
188
550
|
class: "date-input-start aform_input-field",
|
|
189
551
|
type: "text",
|
|
190
552
|
placeholder: "start date",
|
|
191
|
-
onBlur:
|
|
192
|
-
onKeydown:
|
|
193
|
-
}, null, 40,
|
|
194
|
-
|
|
553
|
+
onBlur: T[0] || (T[0] = (H) => oe()),
|
|
554
|
+
onKeydown: fe
|
|
555
|
+
}, null, 40, Bt),
|
|
556
|
+
T[2] || (T[2] = a("div", null, "-", -1)),
|
|
195
557
|
a("input", {
|
|
196
558
|
ref: "end-date-input",
|
|
197
559
|
value: w.value,
|
|
198
560
|
class: "date-input-end aform_input-field",
|
|
199
561
|
type: "text",
|
|
200
562
|
placeholder: "end date",
|
|
201
|
-
onBlur:
|
|
202
|
-
onKeydown:
|
|
203
|
-
}, null, 40,
|
|
563
|
+
onBlur: T[1] || (T[1] = (H) => oe()),
|
|
564
|
+
onKeydown: fe
|
|
565
|
+
}, null, 40, Rt)
|
|
204
566
|
])
|
|
205
567
|
])
|
|
206
|
-
])) :
|
|
207
|
-
|
|
568
|
+
])) : C("", !0),
|
|
569
|
+
T[3] || (T[3] = a("tr", { class: "days-header" }, [
|
|
208
570
|
a("td", null, "M"),
|
|
209
571
|
a("td", null, "T"),
|
|
210
572
|
a("td", null, "W"),
|
|
@@ -213,41 +575,41 @@ const _e = { class: "aform_form-element" }, Re = { class: "aform_field-label" },
|
|
|
213
575
|
a("td", null, "S"),
|
|
214
576
|
a("td", null, "S")
|
|
215
577
|
], -1)),
|
|
216
|
-
(u(), m(
|
|
217
|
-
(u(), m(
|
|
578
|
+
(u(), m(L, null, Z(Ht, (H) => a("tr", { key: H }, [
|
|
579
|
+
(u(), m(L, null, Z(ge, (E) => a("td", {
|
|
218
580
|
ref_for: !0,
|
|
219
581
|
ref: "celldate",
|
|
220
|
-
key:
|
|
221
|
-
class:
|
|
222
|
-
todaysDate:
|
|
223
|
-
selectedDate:
|
|
224
|
-
withinRange: e.selectRange ?
|
|
225
|
-
startDate: e.selectRange ?
|
|
226
|
-
endDate: e.selectRange ?
|
|
582
|
+
key: V(H, E),
|
|
583
|
+
class: X(["date-cell", {
|
|
584
|
+
todaysDate: F(Q(H, E)),
|
|
585
|
+
selectedDate: b(Q(H, E)),
|
|
586
|
+
withinRange: e.selectRange ? N(Q(H, E)) : !1,
|
|
587
|
+
startDate: e.selectRange ? q(Q(H, E)) : !1,
|
|
588
|
+
endDate: e.selectRange ? D(Q(H, E)) : !1
|
|
227
589
|
}]),
|
|
228
590
|
contenteditable: !1,
|
|
229
591
|
spellcheck: !1,
|
|
230
592
|
tabindex: 0,
|
|
231
|
-
onClick: B((
|
|
232
|
-
onKeydown:
|
|
233
|
-
onMouseover: (
|
|
234
|
-
},
|
|
593
|
+
onClick: B((ee) => ve(V(H, E)), ["prevent", "stop"]),
|
|
594
|
+
onKeydown: _((ee) => ve(V(H, E)), ["enter"]),
|
|
595
|
+
onMouseover: (ee) => se(V(H, E))
|
|
596
|
+
}, g(new Date(Q(H, E)).getDate()), 43, Vt)), 64))
|
|
235
597
|
])), 64))
|
|
236
598
|
])
|
|
237
599
|
])
|
|
238
600
|
], 512),
|
|
239
|
-
|
|
601
|
+
p(a("p", {
|
|
240
602
|
class: "aform_error",
|
|
241
|
-
innerHTML:
|
|
242
|
-
}, null, 8,
|
|
243
|
-
[
|
|
603
|
+
innerHTML: c.value
|
|
604
|
+
}, null, 8, Nt), [
|
|
605
|
+
[K, c.value]
|
|
244
606
|
])
|
|
245
607
|
], 64));
|
|
246
608
|
}
|
|
247
|
-
}),
|
|
609
|
+
}), we = /* @__PURE__ */ U(Ut, [["__scopeId", "data-v-9e85c95a"]]), Et = { class: "adate_time" }, Kt = { class: "adate_time_fields" }, Pt = ["onKeydown"], Qt = ["onKeydown"], Yt = {
|
|
248
610
|
key: 0,
|
|
249
611
|
class: "colon"
|
|
250
|
-
},
|
|
612
|
+
}, Gt = ["onKeydown"], zt = /* @__PURE__ */ R({
|
|
251
613
|
__name: "ADateTime",
|
|
252
614
|
props: {
|
|
253
615
|
allowMilitaryTime: { type: Boolean, default: !1 },
|
|
@@ -258,145 +620,145 @@ const _e = { class: "aform_form-element" }, Re = { class: "aform_field-label" },
|
|
|
258
620
|
useSeconds: { type: Boolean, default: !0 }
|
|
259
621
|
},
|
|
260
622
|
emits: ["get-time"],
|
|
261
|
-
setup(e, { emit:
|
|
262
|
-
const
|
|
623
|
+
setup(e, { emit: s }) {
|
|
624
|
+
const n = s, c = te("meridiem-selector"), t = ce({
|
|
263
625
|
hours: String(e.defaultHours).padStart(2, "0"),
|
|
264
626
|
minutes: String(e.defaultMinutes).padStart(2, "0"),
|
|
265
627
|
seconds: String(e.defaultSeconds).padStart(2, "0")
|
|
266
|
-
}),
|
|
267
|
-
|
|
268
|
-
|
|
628
|
+
}), d = S(e.defaultMeridiem == "AM" ? "AM" : "PM");
|
|
629
|
+
$e(() => {
|
|
630
|
+
k();
|
|
269
631
|
});
|
|
270
|
-
const
|
|
271
|
-
const
|
|
632
|
+
const y = () => {
|
|
633
|
+
const f = e.allowMilitaryTime ? 23 : 12, l = e.allowMilitaryTime ? 0 : 1;
|
|
272
634
|
let o = Number(t.hours), i = Number(t.minutes), w = Number(t.seconds);
|
|
273
|
-
(isNaN(o) || t.hours === "" || o >
|
|
274
|
-
},
|
|
275
|
-
const
|
|
276
|
-
|
|
277
|
-
hours:
|
|
635
|
+
(isNaN(o) || t.hours === "" || o > f) && (o = f), !e.allowMilitaryTime && o < l && (o = l), (isNaN(i) || t.minutes === "" || i > 59) && (i = 59), (isNaN(w) || t.seconds === "" || w > 59) && (w = 59), t.hours = String(o).padStart(2, "0"), t.minutes = String(i).padStart(2, "0"), t.seconds = String(w).padStart(2, "0"), k();
|
|
636
|
+
}, k = () => {
|
|
637
|
+
const f = Number(t.hours), l = Number(t.minutes), o = Number(t.seconds);
|
|
638
|
+
n("get-time", {
|
|
639
|
+
hours: f,
|
|
278
640
|
minutes: l,
|
|
279
641
|
seconds: o,
|
|
280
|
-
meridiem:
|
|
281
|
-
militaryTime: e.allowMilitaryTime ?
|
|
642
|
+
meridiem: d.value,
|
|
643
|
+
militaryTime: e.allowMilitaryTime ? f : d.value === "PM" ? f === 12 ? 12 : f + 12 : f % 12
|
|
282
644
|
});
|
|
283
|
-
},
|
|
284
|
-
const l =
|
|
645
|
+
}, v = (f) => {
|
|
646
|
+
const l = f.target;
|
|
285
647
|
l instanceof HTMLInputElement && l.select();
|
|
286
|
-
},
|
|
648
|
+
}, h = (f, l = 1) => {
|
|
287
649
|
const o = e.allowMilitaryTime ? 23 : 12, i = e.allowMilitaryTime ? 0 : 1;
|
|
288
|
-
if (
|
|
289
|
-
const
|
|
290
|
-
t.hours = String(
|
|
291
|
-
} else
|
|
650
|
+
if (f == "hours") {
|
|
651
|
+
const F = Number(t.hours);
|
|
652
|
+
t.hours = String(F + l), (F == 11 && Number(t.hours) == 12 || F == 12 && Number(t.hours) == 11) && $();
|
|
653
|
+
} else f == "minutes" ? t.minutes = String(Number(t.minutes) + l) : f == "seconds" && (t.seconds = String(Number(t.seconds) + l));
|
|
292
654
|
const w = Number(t.hours);
|
|
293
655
|
Number(t.seconds) < 0 ? t.minutes = String(Number(t.minutes) - 1) : Number(t.seconds) > 59 && (t.minutes = String(Number(t.minutes) + 1)), Number(t.minutes) < 0 ? t.hours = String(w - 1) : Number(t.minutes) > 59 && (t.hours = String(w + 1));
|
|
294
|
-
const
|
|
295
|
-
!e.allowMilitaryTime &&
|
|
656
|
+
const r = Number(t.hours);
|
|
657
|
+
!e.allowMilitaryTime && r !== w && (w === 11 && r === 12 || w === 12 && r === 11) && $(), t.hours = String(x(Number(t.hours), i, o)).padStart(2, "0"), t.minutes = String(x(Number(t.minutes), 0, 59)).padStart(2, "0"), t.seconds = String(x(Number(t.seconds), 0, 59)).padStart(2, "0");
|
|
296
658
|
};
|
|
297
|
-
|
|
659
|
+
J(
|
|
298
660
|
() => t.hours,
|
|
299
|
-
(
|
|
300
|
-
t.hours = Number(
|
|
661
|
+
(f, l) => {
|
|
662
|
+
t.hours = Number(f) > 99 ? l : f;
|
|
301
663
|
}
|
|
302
|
-
),
|
|
664
|
+
), J(
|
|
303
665
|
() => t.minutes,
|
|
304
|
-
(
|
|
305
|
-
t.minutes = Number(
|
|
666
|
+
(f, l) => {
|
|
667
|
+
t.minutes = Number(f) > 99 ? l : f;
|
|
306
668
|
}
|
|
307
|
-
),
|
|
669
|
+
), J(
|
|
308
670
|
() => t.seconds,
|
|
309
|
-
(
|
|
310
|
-
t.seconds = Number(
|
|
671
|
+
(f, l) => {
|
|
672
|
+
t.seconds = Number(f) > 99 ? l : f;
|
|
311
673
|
}
|
|
312
674
|
);
|
|
313
|
-
const
|
|
314
|
-
|
|
315
|
-
},
|
|
316
|
-
|
|
317
|
-
const o =
|
|
675
|
+
const x = (f, l, o) => f > o ? l : f < l ? o : f, $ = () => {
|
|
676
|
+
d.value = d.value == "PM" ? "AM" : "PM", k();
|
|
677
|
+
}, I = (f, l = !1) => {
|
|
678
|
+
f.stopPropagation(), f.preventDefault();
|
|
679
|
+
const o = f.clipboardData;
|
|
318
680
|
if (!o) return;
|
|
319
681
|
let i = o.getData("Text");
|
|
320
682
|
if (i = i.replace(/[^0-9]/g, ""), l) {
|
|
321
683
|
i.length % 2 != 0 && (i = "0" + i), i.length < 3 && (i += "00"), i.length < 5 && (i += "00");
|
|
322
684
|
const w = i.match(/(..?)/g);
|
|
323
685
|
if (!w || w.length < 3) return;
|
|
324
|
-
t.seconds = w[2], t.minutes = w[1], t.hours = w[0],
|
|
686
|
+
t.seconds = w[2], t.minutes = w[1], t.hours = w[0], y(), e.allowMilitaryTime || c.value?.focus();
|
|
325
687
|
} else {
|
|
326
688
|
i.length > 2 && (i = i.slice(0, 2));
|
|
327
|
-
const w =
|
|
689
|
+
const w = f.target;
|
|
328
690
|
w instanceof HTMLInputElement && (w.value = i, w.dispatchEvent(new Event("input")));
|
|
329
691
|
}
|
|
330
692
|
};
|
|
331
|
-
return (
|
|
332
|
-
a("div",
|
|
333
|
-
|
|
693
|
+
return (f, l) => (u(), m("div", Et, [
|
|
694
|
+
a("div", Kt, [
|
|
695
|
+
p(a("input", {
|
|
334
696
|
"onUpdate:modelValue": l[0] || (l[0] = (o) => t.hours = o),
|
|
335
697
|
type: "text",
|
|
336
698
|
inputmode: "numeric",
|
|
337
|
-
onPaste: l[1] || (l[1] = (o) =>
|
|
338
|
-
onFocus:
|
|
339
|
-
onBlur:
|
|
699
|
+
onPaste: l[1] || (l[1] = (o) => I(o, !0)),
|
|
700
|
+
onFocus: v,
|
|
701
|
+
onBlur: y,
|
|
340
702
|
onKeydown: [
|
|
341
|
-
|
|
342
|
-
l[2] || (l[2] =
|
|
343
|
-
l[3] || (l[3] =
|
|
703
|
+
_(B(y, ["prevent"]), ["enter"]),
|
|
704
|
+
l[2] || (l[2] = _(B((o) => h("hours"), ["prevent"]), ["up"])),
|
|
705
|
+
l[3] || (l[3] = _(B((o) => h("hours", -1), ["prevent"]), ["down"]))
|
|
344
706
|
]
|
|
345
|
-
}, null, 40,
|
|
346
|
-
[
|
|
707
|
+
}, null, 40, Pt), [
|
|
708
|
+
[Y, t.hours]
|
|
347
709
|
]),
|
|
348
710
|
l[12] || (l[12] = a("span", { class: "colon" }, ":", -1)),
|
|
349
|
-
|
|
711
|
+
p(a("input", {
|
|
350
712
|
"onUpdate:modelValue": l[4] || (l[4] = (o) => t.minutes = o),
|
|
351
713
|
type: "text",
|
|
352
714
|
inputmode: "numeric",
|
|
353
|
-
onPaste:
|
|
354
|
-
onFocus:
|
|
355
|
-
onBlur:
|
|
715
|
+
onPaste: I,
|
|
716
|
+
onFocus: v,
|
|
717
|
+
onBlur: y,
|
|
356
718
|
onKeydown: [
|
|
357
|
-
|
|
358
|
-
l[5] || (l[5] =
|
|
359
|
-
l[6] || (l[6] =
|
|
719
|
+
_(B(y, ["prevent"]), ["enter"]),
|
|
720
|
+
l[5] || (l[5] = _(B((o) => h("minutes"), ["prevent"]), ["up"])),
|
|
721
|
+
l[6] || (l[6] = _(B((o) => h("minutes", -1), ["prevent"]), ["down"]))
|
|
360
722
|
]
|
|
361
|
-
}, null, 40,
|
|
362
|
-
[
|
|
723
|
+
}, null, 40, Qt), [
|
|
724
|
+
[Y, t.minutes]
|
|
363
725
|
]),
|
|
364
|
-
e.useSeconds ? (u(), m("span",
|
|
365
|
-
e.useSeconds ?
|
|
726
|
+
e.useSeconds ? (u(), m("span", Yt, ":")) : C("", !0),
|
|
727
|
+
e.useSeconds ? p((u(), m("input", {
|
|
366
728
|
key: 1,
|
|
367
729
|
"onUpdate:modelValue": l[7] || (l[7] = (o) => t.seconds = o),
|
|
368
730
|
type: "text",
|
|
369
731
|
inputmode: "numeric",
|
|
370
|
-
onPaste:
|
|
371
|
-
onFocus:
|
|
372
|
-
onBlur:
|
|
732
|
+
onPaste: I,
|
|
733
|
+
onFocus: v,
|
|
734
|
+
onBlur: y,
|
|
373
735
|
onKeydown: [
|
|
374
|
-
|
|
375
|
-
l[8] || (l[8] =
|
|
376
|
-
l[9] || (l[9] =
|
|
736
|
+
_(B(y, ["prevent"]), ["enter"]),
|
|
737
|
+
l[8] || (l[8] = _(B((o) => h("seconds"), ["prevent"]), ["up"])),
|
|
738
|
+
l[9] || (l[9] = _(B((o) => h("seconds", -1), ["prevent"]), ["down"]))
|
|
377
739
|
]
|
|
378
|
-
}, null, 40,
|
|
379
|
-
[
|
|
380
|
-
]) :
|
|
381
|
-
e.allowMilitaryTime ?
|
|
740
|
+
}, null, 40, Gt)), [
|
|
741
|
+
[Y, t.seconds]
|
|
742
|
+
]) : C("", !0),
|
|
743
|
+
e.allowMilitaryTime ? C("", !0) : p((u(), m("select", {
|
|
382
744
|
key: 2,
|
|
383
745
|
ref: "meridiem-selector",
|
|
384
|
-
"onUpdate:modelValue": l[10] || (l[10] = (o) =>
|
|
746
|
+
"onUpdate:modelValue": l[10] || (l[10] = (o) => d.value = o),
|
|
385
747
|
class: "aform-select meridiem-selector",
|
|
386
|
-
onChange:
|
|
748
|
+
onChange: y
|
|
387
749
|
}, [...l[11] || (l[11] = [
|
|
388
750
|
a("option", { value: "AM" }, "AM", -1),
|
|
389
751
|
a("option", { value: "PM" }, "PM", -1)
|
|
390
752
|
])], 544)), [
|
|
391
|
-
[
|
|
753
|
+
[Ce, d.value]
|
|
392
754
|
])
|
|
393
755
|
])
|
|
394
756
|
]));
|
|
395
757
|
}
|
|
396
|
-
}),
|
|
758
|
+
}), de = /* @__PURE__ */ U(zt, [["__scopeId", "data-v-959a3e41"]]), Wt = { class: "adate-selection" }, Jt = {
|
|
397
759
|
key: 3,
|
|
398
760
|
class: "empty"
|
|
399
|
-
},
|
|
761
|
+
}, Xt = /* @__PURE__ */ R({
|
|
400
762
|
__name: "ADateSelection",
|
|
401
763
|
props: {
|
|
402
764
|
showDate: { type: Boolean, default: !0 },
|
|
@@ -411,13 +773,13 @@ const _e = { class: "aform_form-element" }, Re = { class: "aform_field-label" },
|
|
|
411
773
|
useSeconds: { type: Boolean, default: !0 }
|
|
412
774
|
},
|
|
413
775
|
emits: ["get-date", "get-time", "get-range"],
|
|
414
|
-
setup(e, { emit:
|
|
415
|
-
const
|
|
416
|
-
|
|
417
|
-
const
|
|
776
|
+
setup(e, { emit: s }) {
|
|
777
|
+
const n = s;
|
|
778
|
+
Be("select-range", e.selectRange);
|
|
779
|
+
const c = /* @__PURE__ */ new Date(), t = S(c), d = S(c), y = S(0), k = S(0), v = (l, o) => {
|
|
418
780
|
const i = new Date(l);
|
|
419
781
|
return i.setHours(0, 0, 0, 0), new Date(i.getTime() + o);
|
|
420
|
-
},
|
|
782
|
+
}, h = (l) => {
|
|
421
783
|
let o;
|
|
422
784
|
if (l.militaryTime !== void 0)
|
|
423
785
|
o = l.militaryTime;
|
|
@@ -426,25 +788,25 @@ const _e = { class: "aform_form-element" }, Re = { class: "aform_field-label" },
|
|
|
426
788
|
o = l.meridiem === "PM" ? i + 12 : i;
|
|
427
789
|
}
|
|
428
790
|
return (o * 3600 + l.minutes * 60 + (l.seconds ?? 0)) * 1e3;
|
|
429
|
-
},
|
|
430
|
-
!e.selectRange || !e.showTime || !e.showEndTime ||
|
|
431
|
-
start:
|
|
432
|
-
end:
|
|
791
|
+
}, x = () => {
|
|
792
|
+
!e.selectRange || !e.showTime || !e.showEndTime || n("get-range", {
|
|
793
|
+
start: v(t.value, y.value),
|
|
794
|
+
end: v(d.value, k.value)
|
|
433
795
|
});
|
|
434
|
-
},
|
|
435
|
-
|
|
436
|
-
},
|
|
437
|
-
|
|
438
|
-
},
|
|
439
|
-
|
|
796
|
+
}, $ = (l) => {
|
|
797
|
+
n("get-date", l), e.selectRange && (t.value = l.start ?? l.selected, d.value = l.end ?? l.selected, x());
|
|
798
|
+
}, I = (l) => {
|
|
799
|
+
y.value = h(l), e.showEndTime ? x() : n("get-time", l);
|
|
800
|
+
}, f = (l) => {
|
|
801
|
+
k.value = h(l), x();
|
|
440
802
|
};
|
|
441
|
-
return (l, o) => (u(), m("div",
|
|
442
|
-
e.showDate ? (u(),
|
|
803
|
+
return (l, o) => (u(), m("div", Wt, [
|
|
804
|
+
e.showDate ? (u(), O(we, {
|
|
443
805
|
key: 0,
|
|
444
806
|
"select-range": e.selectRange,
|
|
445
|
-
onGetDate:
|
|
446
|
-
}, null, 8, ["select-range"])) :
|
|
447
|
-
e.showTime ? (u(),
|
|
807
|
+
onGetDate: $
|
|
808
|
+
}, null, 8, ["select-range"])) : C("", !0),
|
|
809
|
+
e.showTime ? (u(), O(de, {
|
|
448
810
|
key: 1,
|
|
449
811
|
"allow-military-time": e.allowMilitaryTime,
|
|
450
812
|
"default-hours": e.defaultHours,
|
|
@@ -452,26 +814,26 @@ const _e = { class: "aform_form-element" }, Re = { class: "aform_field-label" },
|
|
|
452
814
|
"default-seconds": e.defaultSeconds,
|
|
453
815
|
"default-meridiem": e.defaultMeridiem,
|
|
454
816
|
"use-seconds": e.useSeconds,
|
|
455
|
-
onGetTime:
|
|
456
|
-
}, null, 8, ["allow-military-time", "default-hours", "default-minutes", "default-seconds", "default-meridiem", "use-seconds"])) :
|
|
457
|
-
e.selectRange && e.showTime && e.showEndTime ? (u(), m(
|
|
817
|
+
onGetTime: I
|
|
818
|
+
}, null, 8, ["allow-military-time", "default-hours", "default-minutes", "default-seconds", "default-meridiem", "use-seconds"])) : C("", !0),
|
|
819
|
+
e.selectRange && e.showTime && e.showEndTime ? (u(), m(L, { key: 2 }, [
|
|
458
820
|
o[0] || (o[0] = a("div", { class: "adate-selection__end-label" }, "End time", -1)),
|
|
459
|
-
|
|
821
|
+
le(de, {
|
|
460
822
|
"allow-military-time": e.allowMilitaryTime,
|
|
461
823
|
"default-hours": e.defaultHours,
|
|
462
824
|
"default-minutes": e.defaultMinutes,
|
|
463
825
|
"default-seconds": e.defaultSeconds,
|
|
464
826
|
"default-meridiem": e.defaultMeridiem,
|
|
465
827
|
"use-seconds": e.useSeconds,
|
|
466
|
-
onGetTime:
|
|
828
|
+
onGetTime: f
|
|
467
829
|
}, null, 8, ["allow-military-time", "default-hours", "default-minutes", "default-seconds", "default-meridiem", "use-seconds"])
|
|
468
|
-
], 64)) :
|
|
469
|
-
!e.showTime && !e.showDate ? (u(), m("p",
|
|
830
|
+
], 64)) : C("", !0),
|
|
831
|
+
!e.showTime && !e.showDate ? (u(), m("p", Jt, "empty")) : C("", !0)
|
|
470
832
|
]));
|
|
471
833
|
}
|
|
472
|
-
}),
|
|
834
|
+
}), ne = /* @__PURE__ */ U(Xt, [["__scopeId", "data-v-eeadb3e2"]]), Zt = { class: "aform_display-value" }, Ot = ["id", "value", "disabled", "required"], jt = ["for"], ea = ["innerHTML"], ta = /* @__PURE__ */ R({
|
|
473
835
|
__name: "ADate",
|
|
474
|
-
props: /* @__PURE__ */
|
|
836
|
+
props: /* @__PURE__ */ P({
|
|
475
837
|
schema: {},
|
|
476
838
|
label: { default: "Date" },
|
|
477
839
|
selectRange: { type: Boolean },
|
|
@@ -487,71 +849,71 @@ const _e = { class: "aform_form-element" }, Re = { class: "aform_field-label" },
|
|
|
487
849
|
}),
|
|
488
850
|
emits: ["update:modelValue"],
|
|
489
851
|
setup(e) {
|
|
490
|
-
const
|
|
491
|
-
get: () =>
|
|
492
|
-
set: (
|
|
493
|
-
|
|
852
|
+
const s = A(() => e.errors?.length ? e.errors.join("; ") : e.validation.errorMessage ?? ""), n = G(e, "modelValue"), c = S(n.value ? new Date(n.value) : /* @__PURE__ */ new Date()), t = A({
|
|
853
|
+
get: () => c.value.toISOString().split("T")[0],
|
|
854
|
+
set: (v) => {
|
|
855
|
+
c.value = new Date(v), n.value = v;
|
|
494
856
|
}
|
|
495
|
-
}),
|
|
496
|
-
|
|
497
|
-
() =>
|
|
498
|
-
(
|
|
499
|
-
|
|
857
|
+
}), d = te("picker"), y = S(!1);
|
|
858
|
+
ke(d, () => y.value = !1), J(
|
|
859
|
+
() => n.value,
|
|
860
|
+
(v) => {
|
|
861
|
+
v && (c.value = new Date(v));
|
|
500
862
|
}
|
|
501
863
|
);
|
|
502
|
-
const
|
|
503
|
-
|
|
864
|
+
const k = (v) => {
|
|
865
|
+
c.value = v.selected, n.value = t.value;
|
|
504
866
|
};
|
|
505
|
-
return (
|
|
506
|
-
e.mode === "display" ? (u(), m(
|
|
507
|
-
a("span",
|
|
508
|
-
a("label", null,
|
|
509
|
-
], 64)) : (u(), m(
|
|
510
|
-
|
|
867
|
+
return (v, h) => (u(), m("div", null, [
|
|
868
|
+
e.mode === "display" ? (u(), m(L, { key: 0 }, [
|
|
869
|
+
a("span", Zt, g(n.value ? new Date(t.value).toLocaleDateString() : ""), 1),
|
|
870
|
+
a("label", null, g(e.label), 1)
|
|
871
|
+
], 64)) : (u(), m(L, { key: 1 }, [
|
|
872
|
+
p(a("input", {
|
|
511
873
|
id: e.uuid,
|
|
512
874
|
ref: "date",
|
|
513
|
-
"onUpdate:modelValue":
|
|
875
|
+
"onUpdate:modelValue": h[0] || (h[0] = (x) => t.value = x),
|
|
514
876
|
class: "adate-input",
|
|
515
877
|
value: t.value,
|
|
516
878
|
type: "date",
|
|
517
879
|
disabled: e.mode === "read",
|
|
518
880
|
required: e.required,
|
|
519
|
-
onClick:
|
|
881
|
+
onClick: h[1] || (h[1] = B(
|
|
520
882
|
() => {
|
|
521
|
-
|
|
883
|
+
y.value = !y.value;
|
|
522
884
|
},
|
|
523
885
|
["prevent"]
|
|
524
886
|
))
|
|
525
|
-
}, null, 8,
|
|
526
|
-
[
|
|
887
|
+
}, null, 8, Ot), [
|
|
888
|
+
[Y, t.value]
|
|
527
889
|
]),
|
|
528
|
-
a("label", { for: e.uuid },
|
|
529
|
-
|
|
530
|
-
[
|
|
890
|
+
a("label", { for: e.uuid }, g(e.label), 9, jt),
|
|
891
|
+
p(a("p", { innerHTML: s.value }, null, 8, ea), [
|
|
892
|
+
[K, s.value]
|
|
531
893
|
]),
|
|
532
|
-
|
|
894
|
+
y.value ? (u(), O(ne, {
|
|
533
895
|
key: 0,
|
|
534
896
|
ref: "picker",
|
|
535
897
|
class: "picker",
|
|
536
898
|
"select-range": !1,
|
|
537
899
|
"show-time": !1,
|
|
538
|
-
onGetDate:
|
|
539
|
-
}, null, 512)) :
|
|
900
|
+
onGetDate: k
|
|
901
|
+
}, null, 512)) : C("", !0)
|
|
540
902
|
], 64))
|
|
541
903
|
]));
|
|
542
904
|
}
|
|
543
|
-
}),
|
|
905
|
+
}), aa = /* @__PURE__ */ U(ta, [["__scopeId", "data-v-a73c275b"]]), la = {
|
|
544
906
|
key: 0,
|
|
545
907
|
class: "input-wrapper"
|
|
546
|
-
},
|
|
908
|
+
}, na = { class: "aform_display-value" }, sa = ["innerHTML"], oa = { class: "input-wrapper" }, ia = ["disabled"], ua = {
|
|
547
909
|
id: "autocomplete-results",
|
|
548
910
|
class: "autocomplete-results"
|
|
549
|
-
},
|
|
911
|
+
}, da = {
|
|
550
912
|
key: 0,
|
|
551
913
|
class: "loading autocomplete-result"
|
|
552
|
-
},
|
|
914
|
+
}, ra = ["onClick"], ca = ["innerHTML"], ma = /* @__PURE__ */ R({
|
|
553
915
|
__name: "ADropdown",
|
|
554
|
-
props: /* @__PURE__ */
|
|
916
|
+
props: /* @__PURE__ */ P({
|
|
555
917
|
schema: {},
|
|
556
918
|
label: {},
|
|
557
919
|
selectRange: { type: Boolean },
|
|
@@ -570,16 +932,16 @@ const _e = { class: "aform_form-element" }, Re = { class: "aform_field-label" },
|
|
|
570
932
|
}),
|
|
571
933
|
emits: ["update:modelValue"],
|
|
572
934
|
setup(e) {
|
|
573
|
-
const
|
|
935
|
+
const s = A(() => e.errors?.length ? e.errors.join("; ") : e.validation.errorMessage ?? ""), n = G(e, "modelValue"), c = S(n.value ?? ""), t = ce({
|
|
574
936
|
activeItemIndex: null,
|
|
575
937
|
open: !1,
|
|
576
938
|
loading: !1,
|
|
577
939
|
results: e.options
|
|
578
|
-
}),
|
|
940
|
+
}), d = () => h(), y = async () => {
|
|
579
941
|
if (t.open = !0, t.activeItemIndex = null, e.filterFunction) {
|
|
580
942
|
e.isAsync && (t.loading = !0);
|
|
581
943
|
try {
|
|
582
|
-
const l = await e.filterFunction(
|
|
944
|
+
const l = await e.filterFunction(n.value || "");
|
|
583
945
|
t.results = l || [];
|
|
584
946
|
} catch {
|
|
585
947
|
t.results = [];
|
|
@@ -587,94 +949,94 @@ const _e = { class: "aform_form-element" }, Re = { class: "aform_field-label" },
|
|
|
587
949
|
e.isAsync && (t.loading = !1);
|
|
588
950
|
}
|
|
589
951
|
} else
|
|
590
|
-
|
|
591
|
-
},
|
|
592
|
-
|
|
593
|
-
},
|
|
594
|
-
const l = e.options?.indexOf(
|
|
952
|
+
x();
|
|
953
|
+
}, k = (l) => {
|
|
954
|
+
n.value = l, c.value = l, h(l);
|
|
955
|
+
}, v = () => {
|
|
956
|
+
const l = e.options?.indexOf(n.value ?? "") ?? -1;
|
|
595
957
|
t.activeItemIndex = e.isAsync ? null : l >= 0 ? l : null, t.open = !0, t.results = e.isAsync ? [] : e.options;
|
|
596
|
-
},
|
|
597
|
-
t.activeItemIndex = null, t.open = !1, e.options?.includes(l ||
|
|
598
|
-
},
|
|
599
|
-
|
|
600
|
-
},
|
|
958
|
+
}, h = (l) => {
|
|
959
|
+
t.activeItemIndex = null, t.open = !1, e.options?.includes(l || n.value || "") || (n.value = c.value);
|
|
960
|
+
}, x = () => {
|
|
961
|
+
n.value ? t.results = e.options?.filter((l) => l.toLowerCase().includes((n.value ?? "").toLowerCase())) : t.results = e.options;
|
|
962
|
+
}, $ = () => {
|
|
601
963
|
const l = t.results?.length || 0;
|
|
602
964
|
if (t.activeItemIndex != null) {
|
|
603
965
|
const o = isNaN(t.activeItemIndex) ? 0 : t.activeItemIndex;
|
|
604
966
|
t.activeItemIndex = (o + 1) % l;
|
|
605
967
|
} else
|
|
606
968
|
t.activeItemIndex = 0;
|
|
607
|
-
},
|
|
969
|
+
}, I = () => {
|
|
608
970
|
const l = t.results?.length || 0;
|
|
609
971
|
if (t.activeItemIndex != null) {
|
|
610
972
|
const o = isNaN(t.activeItemIndex) ? 0 : t.activeItemIndex;
|
|
611
973
|
o === 0 ? t.activeItemIndex = null : t.activeItemIndex = o - 1;
|
|
612
974
|
} else
|
|
613
975
|
t.activeItemIndex = l - 1;
|
|
614
|
-
},
|
|
976
|
+
}, f = () => {
|
|
615
977
|
if (t.results) {
|
|
616
978
|
const l = t.activeItemIndex || 0, o = t.results[l];
|
|
617
|
-
|
|
979
|
+
k(o);
|
|
618
980
|
}
|
|
619
981
|
t.activeItemIndex = 0;
|
|
620
982
|
};
|
|
621
|
-
return (l, o) => e.mode === "display" ? (u(), m("div",
|
|
622
|
-
a("span",
|
|
623
|
-
a("label", null,
|
|
624
|
-
|
|
983
|
+
return (l, o) => e.mode === "display" ? (u(), m("div", la, [
|
|
984
|
+
a("span", na, g(n.value ?? ""), 1),
|
|
985
|
+
a("label", null, g(e.label), 1),
|
|
986
|
+
p(a("p", {
|
|
625
987
|
class: "aform_error",
|
|
626
|
-
innerHTML:
|
|
627
|
-
}, null, 8,
|
|
628
|
-
[
|
|
988
|
+
innerHTML: s.value
|
|
989
|
+
}, null, 8, sa), [
|
|
990
|
+
[K, s.value]
|
|
629
991
|
])
|
|
630
|
-
])) :
|
|
992
|
+
])) : p((u(), m("div", {
|
|
631
993
|
key: 1,
|
|
632
|
-
class:
|
|
994
|
+
class: X(["autocomplete", { isOpen: t.open }])
|
|
633
995
|
}, [
|
|
634
|
-
a("div",
|
|
635
|
-
|
|
636
|
-
"onUpdate:modelValue": o[0] || (o[0] = (i) =>
|
|
996
|
+
a("div", oa, [
|
|
997
|
+
p(a("input", {
|
|
998
|
+
"onUpdate:modelValue": o[0] || (o[0] = (i) => n.value = i),
|
|
637
999
|
type: "text",
|
|
638
1000
|
disabled: e.mode === "read",
|
|
639
|
-
onInput:
|
|
640
|
-
onFocus:
|
|
1001
|
+
onInput: y,
|
|
1002
|
+
onFocus: v,
|
|
641
1003
|
onKeydown: [
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
1004
|
+
_($, ["down"]),
|
|
1005
|
+
_(I, ["up"]),
|
|
1006
|
+
_(f, ["enter"]),
|
|
1007
|
+
_(d, ["esc"]),
|
|
1008
|
+
_(d, ["tab"])
|
|
647
1009
|
]
|
|
648
|
-
}, null, 40,
|
|
649
|
-
[
|
|
1010
|
+
}, null, 40, ia), [
|
|
1011
|
+
[Y, n.value]
|
|
650
1012
|
]),
|
|
651
|
-
|
|
652
|
-
t.loading ? (u(), m("li",
|
|
1013
|
+
p(a("ul", ua, [
|
|
1014
|
+
t.loading ? (u(), m("li", da, "Loading results...")) : (u(!0), m(L, { key: 1 }, Z(t.results, (i, w) => (u(), m("li", {
|
|
653
1015
|
key: i,
|
|
654
|
-
class:
|
|
655
|
-
onClick: B((
|
|
656
|
-
},
|
|
1016
|
+
class: X(["autocomplete-result", { "is-active": w === t.activeItemIndex }]),
|
|
1017
|
+
onClick: B((r) => k(i), ["stop"])
|
|
1018
|
+
}, g(i), 11, ra))), 128))
|
|
657
1019
|
], 512), [
|
|
658
|
-
[
|
|
1020
|
+
[K, t.open]
|
|
659
1021
|
]),
|
|
660
|
-
a("label", null,
|
|
1022
|
+
a("label", null, g(e.label), 1)
|
|
661
1023
|
]),
|
|
662
|
-
|
|
1024
|
+
p(a("p", {
|
|
663
1025
|
class: "aform_error",
|
|
664
|
-
innerHTML:
|
|
665
|
-
}, null, 8,
|
|
666
|
-
[
|
|
1026
|
+
innerHTML: s.value
|
|
1027
|
+
}, null, 8, ca), [
|
|
1028
|
+
[K, s.value]
|
|
667
1029
|
])
|
|
668
1030
|
], 2)), [
|
|
669
|
-
[
|
|
1031
|
+
[W(me), d]
|
|
670
1032
|
]);
|
|
671
1033
|
}
|
|
672
|
-
}),
|
|
1034
|
+
}), fa = /* @__PURE__ */ U(ma, [["__scopeId", "data-v-2b75e2d5"]]), va = { class: "aduration" }, ya = { class: "aform_display-value" }, ha = { class: "aduration__footer" }, ba = {
|
|
673
1035
|
key: 0,
|
|
674
1036
|
class: "aduration__summary"
|
|
675
|
-
},
|
|
1037
|
+
}, ga = { class: "aduration__value" }, $a = { class: "aduration__ms" }, ka = /* @__PURE__ */ R({
|
|
676
1038
|
__name: "ADuration",
|
|
677
|
-
props: /* @__PURE__ */
|
|
1039
|
+
props: /* @__PURE__ */ P({
|
|
678
1040
|
label: { default: "Duration" },
|
|
679
1041
|
mode: { default: "edit" },
|
|
680
1042
|
allowMilitaryTime: { type: Boolean, default: !1 },
|
|
@@ -685,55 +1047,55 @@ const _e = { class: "aform_form-element" }, Re = { class: "aform_field-label" },
|
|
|
685
1047
|
}),
|
|
686
1048
|
emits: ["update:modelValue"],
|
|
687
1049
|
setup(e) {
|
|
688
|
-
const
|
|
689
|
-
if (!
|
|
690
|
-
const
|
|
691
|
-
return
|
|
1050
|
+
const s = G(e, "modelValue"), n = S(null), c = S(null), t = A(() => {
|
|
1051
|
+
if (!n.value || !c.value) return 0;
|
|
1052
|
+
const v = c.value.getTime() - n.value.getTime();
|
|
1053
|
+
return v > 0 ? v : 0;
|
|
692
1054
|
});
|
|
693
|
-
|
|
694
|
-
|
|
1055
|
+
J(t, (v) => {
|
|
1056
|
+
s.value = v;
|
|
695
1057
|
});
|
|
696
|
-
const
|
|
697
|
-
|
|
698
|
-
},
|
|
699
|
-
const
|
|
700
|
-
if (
|
|
701
|
-
const
|
|
702
|
-
return [
|
|
703
|
-
}),
|
|
704
|
-
const
|
|
705
|
-
if (!
|
|
706
|
-
const
|
|
707
|
-
return [
|
|
1058
|
+
const d = (v) => {
|
|
1059
|
+
n.value = v.start, c.value = v.end, s.value = t.value;
|
|
1060
|
+
}, y = A(() => {
|
|
1061
|
+
const v = t.value;
|
|
1062
|
+
if (v === 0) return "0s";
|
|
1063
|
+
const h = Math.floor(v / 1e3) % 60, x = Math.floor(v / 6e4) % 60, $ = Math.floor(v / 36e5) % 24, I = Math.floor(v / 864e5);
|
|
1064
|
+
return [I && `${I}d`, $ && `${$}h`, x && `${x}m`, h && `${h}s`].filter(Boolean).join(" ") || "0s";
|
|
1065
|
+
}), k = A(() => {
|
|
1066
|
+
const v = s.value;
|
|
1067
|
+
if (!v) return "—";
|
|
1068
|
+
const h = Math.floor(v / 1e3) % 60, x = Math.floor(v / 6e4) % 60, $ = Math.floor(v / 36e5) % 24, I = Math.floor(v / 864e5);
|
|
1069
|
+
return [I && `${I}d`, $ && `${$}h`, x && `${x}m`, h && `${h}s`].filter(Boolean).join(" ") || "0s";
|
|
708
1070
|
});
|
|
709
|
-
return (
|
|
710
|
-
e.mode === "display" || e.mode === "read" ? (u(), m(
|
|
711
|
-
a("span",
|
|
712
|
-
a("label", null,
|
|
713
|
-
], 64)) : (u(), m(
|
|
714
|
-
|
|
1071
|
+
return (v, h) => (u(), m("div", va, [
|
|
1072
|
+
e.mode === "display" || e.mode === "read" ? (u(), m(L, { key: 0 }, [
|
|
1073
|
+
a("span", ya, g(k.value), 1),
|
|
1074
|
+
a("label", null, g(e.label), 1)
|
|
1075
|
+
], 64)) : (u(), m(L, { key: 1 }, [
|
|
1076
|
+
le(ne, {
|
|
715
1077
|
ref: "selectionRef",
|
|
716
1078
|
"select-range": !0,
|
|
717
1079
|
"show-time": !0,
|
|
718
1080
|
"show-end-time": !0,
|
|
719
1081
|
"allow-military-time": e.allowMilitaryTime,
|
|
720
1082
|
"use-seconds": e.useSeconds,
|
|
721
|
-
onGetRange:
|
|
1083
|
+
onGetRange: d
|
|
722
1084
|
}, null, 8, ["allow-military-time", "use-seconds"]),
|
|
723
|
-
a("div",
|
|
724
|
-
a("label", null,
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
a("span",
|
|
728
|
-
a("span",
|
|
729
|
-
])) :
|
|
1085
|
+
a("div", ha, [
|
|
1086
|
+
a("label", null, g(e.label), 1),
|
|
1087
|
+
n.value && c.value ? (u(), m("div", ba, [
|
|
1088
|
+
h[0] || (h[0] = a("span", { class: "aduration__label" }, "Duration:", -1)),
|
|
1089
|
+
a("span", ga, g(y.value), 1),
|
|
1090
|
+
a("span", $a, "(" + g(s.value ?? 0) + " ms)", 1)
|
|
1091
|
+
])) : C("", !0)
|
|
730
1092
|
])
|
|
731
1093
|
], 64))
|
|
732
1094
|
]));
|
|
733
1095
|
}
|
|
734
|
-
}),
|
|
1096
|
+
}), xa = /* @__PURE__ */ U(ka, [["__scopeId", "data-v-22611dd6"]]), wa = { class: "adaterange" }, Da = { class: "aform_display-value" }, Ma = ["id", "value", "disabled"], Ta = ["for"], Sa = ["innerHTML"], Aa = /* @__PURE__ */ R({
|
|
735
1097
|
__name: "ADateRange",
|
|
736
|
-
props: /* @__PURE__ */
|
|
1098
|
+
props: /* @__PURE__ */ P({
|
|
737
1099
|
schema: {},
|
|
738
1100
|
label: { default: "Date Range" },
|
|
739
1101
|
selectRange: { type: Boolean },
|
|
@@ -751,73 +1113,73 @@ const _e = { class: "aform_form-element" }, Re = { class: "aform_field-label" },
|
|
|
751
1113
|
}),
|
|
752
1114
|
emits: ["update:modelValue"],
|
|
753
1115
|
setup(e) {
|
|
754
|
-
const
|
|
755
|
-
|
|
756
|
-
const
|
|
757
|
-
e.mode !== "read" && (
|
|
758
|
-
},
|
|
759
|
-
const i =
|
|
1116
|
+
const s = (i) => new Date(i).toLocaleDateString(), n = A(() => e.errors?.length ? e.errors.join("; ") : e.validation.errorMessage ?? ""), c = G(e, "modelValue"), t = S(c.value.start_date ? new Date(c.value.start_date) : null), d = S(c.value.end_date ? new Date(c.value.end_date) : null), y = S(!1), k = S(null);
|
|
1117
|
+
ke(k, () => y.value = !1);
|
|
1118
|
+
const v = () => {
|
|
1119
|
+
e.mode !== "read" && (y.value = !0);
|
|
1120
|
+
}, h = (i) => i ? `${i.getMonth() + 1}/${i.getDate()}/${i.getFullYear()}` : "", x = A(() => {
|
|
1121
|
+
const i = h(t.value), w = h(d.value);
|
|
760
1122
|
return i && w ? `${i} — ${w}` : i ? `${i} — ...` : "";
|
|
761
|
-
}),
|
|
762
|
-
const i =
|
|
763
|
-
return !i && !w ? "" : i && w ? `${
|
|
764
|
-
}),
|
|
765
|
-
const i = t.value, w =
|
|
766
|
-
i && w && w.getTime() < i.getTime() && ([t.value,
|
|
767
|
-
},
|
|
768
|
-
|
|
769
|
-
start_date:
|
|
770
|
-
end_date:
|
|
1123
|
+
}), $ = A(() => {
|
|
1124
|
+
const i = c.value.start_date, w = c.value.end_date;
|
|
1125
|
+
return !i && !w ? "" : i && w ? `${s(i)} — ${s(w)}` : i ? `From ${s(i)}` : `Until ${s(w)}`;
|
|
1126
|
+
}), I = () => {
|
|
1127
|
+
const i = t.value, w = d.value;
|
|
1128
|
+
i && w && w.getTime() < i.getTime() && ([t.value, d.value] = [w, i]);
|
|
1129
|
+
}, f = (i) => i ? i.toISOString().split("T")[0] : null, l = () => {
|
|
1130
|
+
c.value = {
|
|
1131
|
+
start_date: f(t.value),
|
|
1132
|
+
end_date: f(d.value)
|
|
771
1133
|
};
|
|
772
1134
|
}, o = (i) => {
|
|
773
|
-
i.start && (t.value = i.start), i.end && (
|
|
1135
|
+
i.start && (t.value = i.start), i.end && (d.value = i.end, I(), y.value = !1), l();
|
|
774
1136
|
};
|
|
775
|
-
return
|
|
776
|
-
() =>
|
|
1137
|
+
return J(
|
|
1138
|
+
() => c.value,
|
|
777
1139
|
(i) => {
|
|
778
|
-
t.value = i.start_date ? new Date(i.start_date) : null,
|
|
1140
|
+
t.value = i.start_date ? new Date(i.start_date) : null, d.value = i.end_date ? new Date(i.end_date) : null;
|
|
779
1141
|
},
|
|
780
1142
|
{ deep: !0 }
|
|
781
|
-
), (i, w) => (u(), m("div",
|
|
782
|
-
e.mode === "display" ? (u(), m(
|
|
783
|
-
a("span",
|
|
784
|
-
a("label", null,
|
|
785
|
-
], 64)) : (u(), m(
|
|
1143
|
+
), (i, w) => (u(), m("div", wa, [
|
|
1144
|
+
e.mode === "display" ? (u(), m(L, { key: 0 }, [
|
|
1145
|
+
a("span", Da, g($.value), 1),
|
|
1146
|
+
a("label", null, g(e.label), 1)
|
|
1147
|
+
], 64)) : (u(), m(L, { key: 1 }, [
|
|
786
1148
|
a("input", {
|
|
787
1149
|
id: e.uuid,
|
|
788
1150
|
class: "adate-input aform_input-field",
|
|
789
1151
|
type: "text",
|
|
790
|
-
value:
|
|
1152
|
+
value: x.value,
|
|
791
1153
|
placeholder: "Select date range",
|
|
792
1154
|
disabled: e.mode === "read",
|
|
793
1155
|
readonly: "",
|
|
794
|
-
onClick:
|
|
795
|
-
}, null, 8,
|
|
796
|
-
a("label", { for: e.uuid },
|
|
797
|
-
|
|
798
|
-
[
|
|
1156
|
+
onClick: v
|
|
1157
|
+
}, null, 8, Ma),
|
|
1158
|
+
a("label", { for: e.uuid }, g(e.label), 9, Ta),
|
|
1159
|
+
p(a("p", { innerHTML: n.value }, null, 8, Sa), [
|
|
1160
|
+
[K, n.value]
|
|
799
1161
|
]),
|
|
800
|
-
|
|
1162
|
+
y.value ? (u(), O(ne, {
|
|
801
1163
|
key: 0,
|
|
802
1164
|
ref_key: "pickerRef",
|
|
803
|
-
ref:
|
|
1165
|
+
ref: k,
|
|
804
1166
|
class: "picker",
|
|
805
1167
|
"select-range": !0,
|
|
806
1168
|
"show-time": !1,
|
|
807
1169
|
onGetDate: o
|
|
808
|
-
}, null, 512)) :
|
|
1170
|
+
}, null, 512)) : C("", !0)
|
|
809
1171
|
], 64))
|
|
810
1172
|
]));
|
|
811
1173
|
}
|
|
812
|
-
}),
|
|
1174
|
+
}), Ia = /* @__PURE__ */ U(Aa, [["__scopeId", "data-v-b5838478"]]), pa = { class: "aform" }, La = {
|
|
813
1175
|
key: 0,
|
|
814
1176
|
class: "aform-nested-section"
|
|
815
|
-
},
|
|
1177
|
+
}, qa = {
|
|
816
1178
|
key: 0,
|
|
817
1179
|
class: "aform-nested-label"
|
|
818
|
-
},
|
|
1180
|
+
}, Fa = /* @__PURE__ */ R({
|
|
819
1181
|
__name: "AForm",
|
|
820
|
-
props: /* @__PURE__ */
|
|
1182
|
+
props: /* @__PURE__ */ P({
|
|
821
1183
|
schema: {},
|
|
822
1184
|
mode: { default: "edit" },
|
|
823
1185
|
errors: {}
|
|
@@ -825,84 +1187,84 @@ const _e = { class: "aform_form-element" }, Re = { class: "aform_field-label" },
|
|
|
825
1187
|
data: { required: !0 },
|
|
826
1188
|
dataModifiers: {}
|
|
827
1189
|
}),
|
|
828
|
-
emits: /* @__PURE__ */
|
|
829
|
-
setup(e, { emit:
|
|
830
|
-
const
|
|
831
|
-
|
|
832
|
-
() =>
|
|
833
|
-
(
|
|
834
|
-
!e.schema || !
|
|
835
|
-
t(l) && (
|
|
1190
|
+
emits: /* @__PURE__ */ P(["update:schema", "update:data"], ["update:data"]),
|
|
1191
|
+
setup(e, { emit: s }) {
|
|
1192
|
+
const n = s, c = G(e, "data"), t = (f) => (f.kind === "link" || f.kind === "fieldset") && "schema" in f && Array.isArray(f.schema) && f.schema.length > 0, d = S({});
|
|
1193
|
+
J(
|
|
1194
|
+
() => c.value,
|
|
1195
|
+
(f) => {
|
|
1196
|
+
!e.schema || !f || e.schema.forEach((l) => {
|
|
1197
|
+
t(l) && (d.value[l.fieldname] = f[l.fieldname] ?? {});
|
|
836
1198
|
});
|
|
837
1199
|
},
|
|
838
1200
|
{ immediate: !0 }
|
|
839
1201
|
);
|
|
840
|
-
const
|
|
841
|
-
|
|
842
|
-
},
|
|
1202
|
+
const y = (f, l) => {
|
|
1203
|
+
d.value[f] = l, c.value && (c.value[f] = l, n("update:data", { ...c.value }));
|
|
1204
|
+
}, k = (f) => {
|
|
843
1205
|
const l = {};
|
|
844
|
-
for (const [o, i] of Object.entries(
|
|
1206
|
+
for (const [o, i] of Object.entries(f))
|
|
845
1207
|
["component", "primaryKey", "computed", "language", "hidden", "mode", "width"].includes(o) || (l[o] = i);
|
|
846
|
-
return
|
|
847
|
-
},
|
|
848
|
-
if (
|
|
849
|
-
const l =
|
|
1208
|
+
return f.kind === "table" && (l.rows = c.value[f.fieldname] || []), l;
|
|
1209
|
+
}, v = (f) => {
|
|
1210
|
+
if (f.kind !== "field") return {};
|
|
1211
|
+
const l = f.width;
|
|
850
1212
|
return l ? { flexBasis: l, width: l } : {};
|
|
851
|
-
},
|
|
852
|
-
function
|
|
853
|
-
const l =
|
|
854
|
-
return l ||
|
|
1213
|
+
}, h = A(() => e.mode ?? "edit");
|
|
1214
|
+
function x(f) {
|
|
1215
|
+
const l = f.mode;
|
|
1216
|
+
return l || h.value;
|
|
855
1217
|
}
|
|
856
|
-
const
|
|
857
|
-
|
|
858
|
-
e.schema &&
|
|
1218
|
+
const $ = S([]);
|
|
1219
|
+
Re(() => {
|
|
1220
|
+
e.schema && $.value.length !== e.schema.length && ($.value = e.schema.map((f, l) => A({
|
|
859
1221
|
get() {
|
|
860
|
-
return
|
|
1222
|
+
return c.value?.[e.schema[l].fieldname];
|
|
861
1223
|
},
|
|
862
1224
|
set: (o) => {
|
|
863
1225
|
const i = e.schema[l].fieldname;
|
|
864
|
-
i &&
|
|
1226
|
+
i && c.value && (c.value[i] = o, n("update:data", { ...c.value })), n("update:schema", e.schema);
|
|
865
1227
|
}
|
|
866
1228
|
})));
|
|
867
1229
|
});
|
|
868
|
-
const
|
|
869
|
-
return (
|
|
870
|
-
(u(!0), m(
|
|
871
|
-
t(o) ? (u(), m("div",
|
|
872
|
-
o.label && o.kind !== "fieldset" ? (u(), m("h4",
|
|
873
|
-
(u(),
|
|
874
|
-
data:
|
|
875
|
-
mode:
|
|
1230
|
+
const I = A(() => $.value);
|
|
1231
|
+
return (f, l) => (u(), m("form", pa, [
|
|
1232
|
+
(u(!0), m(L, null, Z(e.schema, (o, i) => (u(), m(L, { key: i }, [
|
|
1233
|
+
t(o) ? (u(), m("div", La, [
|
|
1234
|
+
o.label && o.kind !== "fieldset" ? (u(), m("h4", qa, g(o.label), 1)) : C("", !0),
|
|
1235
|
+
(u(), O(he(o.component ?? "AForm"), {
|
|
1236
|
+
data: d.value[o.fieldname],
|
|
1237
|
+
mode: x(o),
|
|
876
1238
|
schema: o.schema,
|
|
877
1239
|
label: o.label,
|
|
878
1240
|
collapsible: o.kind === "fieldset" ? o.collapsible : void 0,
|
|
879
1241
|
errors: e.errors,
|
|
880
|
-
"onUpdate:data": (w) =>
|
|
1242
|
+
"onUpdate:data": (w) => y(o.fieldname, w)
|
|
881
1243
|
}, null, 40, ["data", "mode", "schema", "label", "collapsible", "errors", "onUpdate:data"]))
|
|
882
|
-
])) : o.hidden ?
|
|
1244
|
+
])) : o.hidden ? C("", !0) : (u(), O(he(o.component), Ve({
|
|
883
1245
|
key: 1,
|
|
884
|
-
modelValue:
|
|
885
|
-
"onUpdate:modelValue": (w) =>
|
|
886
|
-
style:
|
|
1246
|
+
modelValue: I.value[i].value,
|
|
1247
|
+
"onUpdate:modelValue": (w) => I.value[i].value = w,
|
|
1248
|
+
style: v(o),
|
|
887
1249
|
schema: o,
|
|
888
|
-
data:
|
|
889
|
-
mode:
|
|
1250
|
+
data: c.value[o.fieldname],
|
|
1251
|
+
mode: x(o),
|
|
890
1252
|
errors: e.errors?.[o.fieldname]
|
|
891
|
-
}, { ref_for: !0 },
|
|
1253
|
+
}, { ref_for: !0 }, k(o)), null, 16, ["modelValue", "onUpdate:modelValue", "style", "schema", "data", "mode", "errors"]))
|
|
892
1254
|
], 64))), 128))
|
|
893
1255
|
]));
|
|
894
1256
|
}
|
|
895
|
-
}),
|
|
1257
|
+
}), De = /* @__PURE__ */ U(Fa, [["__scopeId", "data-v-bb17171c"]]), _a = /* @__PURE__ */ R({
|
|
896
1258
|
__name: "CollapseButton",
|
|
897
1259
|
props: {
|
|
898
1260
|
collapsed: { type: Boolean }
|
|
899
1261
|
},
|
|
900
1262
|
setup(e) {
|
|
901
|
-
return (
|
|
902
|
-
class:
|
|
1263
|
+
return (s, n) => (u(), m("button", {
|
|
1264
|
+
class: X(["collapse-button", e.collapsed ? "rotated" : "unrotated"])
|
|
903
1265
|
}, "×", 2));
|
|
904
1266
|
}
|
|
905
|
-
}),
|
|
1267
|
+
}), Ca = /* @__PURE__ */ U(_a, [["__scopeId", "data-v-6f1c1b45"]]), Ba = /* @__PURE__ */ R({
|
|
906
1268
|
__name: "AFieldset",
|
|
907
1269
|
props: {
|
|
908
1270
|
schema: {},
|
|
@@ -912,44 +1274,44 @@ const _e = { class: "aform_form-element" }, Re = { class: "aform_field-label" },
|
|
|
912
1274
|
data: { default: () => ({}) },
|
|
913
1275
|
mode: { default: "edit" }
|
|
914
1276
|
},
|
|
915
|
-
setup(e, { expose:
|
|
916
|
-
const
|
|
917
|
-
|
|
1277
|
+
setup(e, { expose: s }) {
|
|
1278
|
+
const n = S(!1), c = S(e.data || []), t = S(e.schema), d = (y) => {
|
|
1279
|
+
y.preventDefault(), e.collapsible && (n.value = !n.value);
|
|
918
1280
|
};
|
|
919
|
-
return
|
|
1281
|
+
return s({ collapsed: n }), (y, k) => (u(), m("fieldset", null, [
|
|
920
1282
|
e.label || e.collapsible ? (u(), m("legend", {
|
|
921
1283
|
key: 0,
|
|
922
|
-
onClick:
|
|
923
|
-
onSubmit:
|
|
1284
|
+
onClick: d,
|
|
1285
|
+
onSubmit: d
|
|
924
1286
|
}, [
|
|
925
|
-
|
|
926
|
-
e.collapsible ? (u(),
|
|
1287
|
+
ae(g(e.label) + " ", 1),
|
|
1288
|
+
e.collapsible ? (u(), O(Ca, {
|
|
927
1289
|
key: 0,
|
|
928
|
-
collapsed:
|
|
929
|
-
}, null, 8, ["collapsed"])) :
|
|
930
|
-
], 32)) :
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
data:
|
|
934
|
-
"onUpdate:data":
|
|
1290
|
+
collapsed: n.value
|
|
1291
|
+
}, null, 8, ["collapsed"])) : C("", !0)
|
|
1292
|
+
], 32)) : C("", !0),
|
|
1293
|
+
re(y.$slots, "default", { collapsed: n.value }, () => [
|
|
1294
|
+
p(le(De, {
|
|
1295
|
+
data: c.value,
|
|
1296
|
+
"onUpdate:data": k[0] || (k[0] = (v) => c.value = v),
|
|
935
1297
|
schema: t.value,
|
|
936
1298
|
mode: e.mode
|
|
937
1299
|
}, null, 8, ["data", "schema", "mode"]), [
|
|
938
|
-
[
|
|
1300
|
+
[K, !n.value]
|
|
939
1301
|
])
|
|
940
1302
|
], !0)
|
|
941
1303
|
]));
|
|
942
1304
|
}
|
|
943
|
-
}),
|
|
1305
|
+
}), Ra = /* @__PURE__ */ U(Ba, [["__scopeId", "data-v-162e7317"]]), Va = { class: "aform_form-element aform_file-attach aform__grid--full" }, Na = {
|
|
944
1306
|
key: 0,
|
|
945
1307
|
class: "aform_file-attach-feedback"
|
|
946
|
-
},
|
|
1308
|
+
}, Ha = {
|
|
947
1309
|
key: 1,
|
|
948
1310
|
class: "aform_display-value"
|
|
949
|
-
},
|
|
1311
|
+
}, Ua = {
|
|
950
1312
|
key: 0,
|
|
951
1313
|
class: "aform_file-attach-feedback"
|
|
952
|
-
},
|
|
1314
|
+
}, Ea = ["disabled"], Ka = ["disabled"], Pa = /* @__PURE__ */ R({
|
|
953
1315
|
__name: "AFileAttach",
|
|
954
1316
|
props: {
|
|
955
1317
|
schema: {},
|
|
@@ -963,184 +1325,48 @@ const _e = { class: "aform_form-element" }, Re = { class: "aform_field-label" },
|
|
|
963
1325
|
errors: {}
|
|
964
1326
|
},
|
|
965
1327
|
setup(e) {
|
|
966
|
-
const { files:
|
|
967
|
-
const
|
|
968
|
-
return `${
|
|
1328
|
+
const { files: s, open: n, reset: c, onChange: t } = Ne(), d = A(() => {
|
|
1329
|
+
const y = s.value?.length ?? 0;
|
|
1330
|
+
return `${y} ${y === 1 ? "file" : "files"}`;
|
|
969
1331
|
});
|
|
970
|
-
return t((
|
|
971
|
-
e.mode === "display" ? (u(), m(
|
|
972
|
-
|
|
1332
|
+
return t((y) => y), (y, k) => (u(), m("div", Va, [
|
|
1333
|
+
e.mode === "display" ? (u(), m(L, { key: 0 }, [
|
|
1334
|
+
W(s) ? (u(), m("div", Na, [
|
|
973
1335
|
a("p", null, [
|
|
974
|
-
a("b", null,
|
|
1336
|
+
a("b", null, g(d.value), 1)
|
|
975
1337
|
]),
|
|
976
|
-
(u(!0), m(
|
|
977
|
-
key:
|
|
978
|
-
},
|
|
979
|
-
])) : (u(), m("span",
|
|
980
|
-
], 64)) : (u(), m(
|
|
981
|
-
|
|
1338
|
+
(u(!0), m(L, null, Z(W(s), (v) => (u(), m("li", {
|
|
1339
|
+
key: v.name
|
|
1340
|
+
}, g(v.name), 1))), 128))
|
|
1341
|
+
])) : (u(), m("span", Ha, "No file selected"))
|
|
1342
|
+
], 64)) : (u(), m(L, { key: 1 }, [
|
|
1343
|
+
W(s) ? (u(), m("div", Ua, [
|
|
982
1344
|
a("p", null, [
|
|
983
|
-
|
|
984
|
-
a("b", null,
|
|
1345
|
+
k[2] || (k[2] = ae(" You have selected: ", -1)),
|
|
1346
|
+
a("b", null, g(d.value), 1)
|
|
985
1347
|
]),
|
|
986
|
-
(u(!0), m(
|
|
987
|
-
key:
|
|
988
|
-
},
|
|
989
|
-
])) :
|
|
1348
|
+
(u(!0), m(L, null, Z(W(s), (v) => (u(), m("li", {
|
|
1349
|
+
key: v.name
|
|
1350
|
+
}, g(v.name), 1))), 128))
|
|
1351
|
+
])) : C("", !0),
|
|
990
1352
|
a("button", {
|
|
991
1353
|
type: "button",
|
|
992
1354
|
class: "aform_form-btn",
|
|
993
1355
|
disabled: e.mode === "read",
|
|
994
|
-
onClick:
|
|
995
|
-
},
|
|
1356
|
+
onClick: k[0] || (k[0] = (v) => W(n)())
|
|
1357
|
+
}, g(e.label), 9, Ea),
|
|
996
1358
|
a("button", {
|
|
997
1359
|
type: "button",
|
|
998
|
-
disabled: !
|
|
1360
|
+
disabled: !W(s) || e.mode === "read",
|
|
999
1361
|
class: "aform_form-btn",
|
|
1000
|
-
onClick:
|
|
1001
|
-
}, "Reset", 8,
|
|
1002
|
-
], 64))
|
|
1003
|
-
]));
|
|
1004
|
-
}
|
|
1005
|
-
}), ia = /* @__PURE__ */ C(oa, [["__scopeId", "data-v-8eefd179"]]), ua = { class: "aform_form-element" }, da = {
|
|
1006
|
-
key: 0,
|
|
1007
|
-
class: "aform_display-value"
|
|
1008
|
-
}, ra = { class: "aform_form-link-wrapper" }, ca = { class: "input-group" }, ma = ["disabled", "onKeydown"], fa = ["onKeydown"], va = {
|
|
1009
|
-
key: 0,
|
|
1010
|
-
class: "autocomplete-results"
|
|
1011
|
-
}, ya = {
|
|
1012
|
-
key: 0,
|
|
1013
|
-
class: "autocomplete-result loading"
|
|
1014
|
-
}, ha = ["onMousedown"], ga = {
|
|
1015
|
-
key: 0,
|
|
1016
|
-
class: "aform_field-label"
|
|
1017
|
-
}, ba = /* @__PURE__ */ _({
|
|
1018
|
-
__name: "AFormLink",
|
|
1019
|
-
props: /* @__PURE__ */ U({
|
|
1020
|
-
schema: {},
|
|
1021
|
-
label: {},
|
|
1022
|
-
selectRange: { type: Boolean },
|
|
1023
|
-
mask: {},
|
|
1024
|
-
required: { type: Boolean },
|
|
1025
|
-
mode: {},
|
|
1026
|
-
uuid: {},
|
|
1027
|
-
validation: {},
|
|
1028
|
-
errors: {},
|
|
1029
|
-
doctype: { default: () => {
|
|
1030
|
-
} },
|
|
1031
|
-
formatter: { type: Function, default: void 0 },
|
|
1032
|
-
icon: { default: "arrow-right" },
|
|
1033
|
-
disabled: { type: Boolean, default: !1 },
|
|
1034
|
-
filterFunction: { type: [String, Function], default: void 0 },
|
|
1035
|
-
isAsync: { type: Boolean, default: !1 }
|
|
1036
|
-
}, {
|
|
1037
|
-
modelValue: { default: () => ({ id: "", displayText: "" }) },
|
|
1038
|
-
modelModifiers: {}
|
|
1039
|
-
}),
|
|
1040
|
-
emits: ["update:modelValue"],
|
|
1041
|
-
setup(e) {
|
|
1042
|
-
const n = Q(e, "modelValue"), s = F(() => {
|
|
1043
|
-
const b = n.value?.id;
|
|
1044
|
-
return b != null && b !== "";
|
|
1045
|
-
}), d = F(() => s.value ? e.formatter ? e.formatter(n.value) : n.value.displayText ?? String(n.value.id) : "—"), t = T(s.value ? d.value : ""), f = T(!1), v = T(!1), y = T([]), r = T(null), g = fe("aformLinkNavigator", null), D = fe("aformLinkResolver", null);
|
|
1046
|
-
G(
|
|
1047
|
-
() => n.value,
|
|
1048
|
-
(b) => {
|
|
1049
|
-
b != null && (typeof b == "string" || typeof b == "number") && (n.value = { id: b });
|
|
1050
|
-
},
|
|
1051
|
-
{ immediate: !0 }
|
|
1052
|
-
), G(
|
|
1053
|
-
() => n.value?.id,
|
|
1054
|
-
async (b) => {
|
|
1055
|
-
if (!(!b || n.value.displayText))
|
|
1056
|
-
try {
|
|
1057
|
-
let A;
|
|
1058
|
-
e.filterFunction ? (A = (await (typeof e.filterFunction == "string" ? le(e.filterFunction) : e.filterFunction)(String(b))).find((W) => String(W.id) === String(b))?.displayText, A === void 0 && console.warn(
|
|
1059
|
-
`[AFormLink] filterFunction returned no matching result for id "${b}". The function must return an item whose \`id\` exactly matches the search string.`
|
|
1060
|
-
)) : D && e.doctype && (A = await D(e.doctype, b.toString()) ?? void 0), A && (t.value = A, n.value = { ...n.value, displayText: A });
|
|
1061
|
-
} catch {
|
|
1062
|
-
}
|
|
1063
|
-
},
|
|
1064
|
-
{ immediate: !0 }
|
|
1065
|
-
);
|
|
1066
|
-
const h = () => {
|
|
1067
|
-
g && e.doctype ? g.navigate(e.doctype, n.value.id) : g && !e.doctype && console.warn(
|
|
1068
|
-
"[AFormLink] Navigation requested but `doctype` prop is missing. Add `options` (or `doctype`) to the Link field definition to enable navigation."
|
|
1069
|
-
);
|
|
1070
|
-
}, S = async (b) => {
|
|
1071
|
-
if (!(!e.filterFunction || e.mode === "read")) {
|
|
1072
|
-
r.value = null, f.value = !0, e.isAsync && (v.value = !0);
|
|
1073
|
-
try {
|
|
1074
|
-
const A = typeof e.filterFunction == "string" ? le(e.filterFunction) : e.filterFunction;
|
|
1075
|
-
y.value = await A(b) ?? [];
|
|
1076
|
-
} catch {
|
|
1077
|
-
y.value = [];
|
|
1078
|
-
} finally {
|
|
1079
|
-
v.value = !1;
|
|
1080
|
-
}
|
|
1081
|
-
}
|
|
1082
|
-
}, c = () => {
|
|
1083
|
-
f.value = !1, r.value = null, t.value = s.value ? d.value : "";
|
|
1084
|
-
}, l = () => {
|
|
1085
|
-
f.value && c();
|
|
1086
|
-
}, o = () => S(t.value), i = () => S(t.value), w = (b) => {
|
|
1087
|
-
n.value = b, t.value = b.displayText ?? String(b.id), f.value = !1, r.value = null;
|
|
1088
|
-
}, P = () => {
|
|
1089
|
-
const b = y.value.length;
|
|
1090
|
-
b && (r.value = r.value === null ? 0 : (r.value + 1) % b);
|
|
1091
|
-
}, z = () => {
|
|
1092
|
-
y.value.length && (r.value === null || r.value === 0 ? r.value = null : r.value -= 1);
|
|
1093
|
-
}, $ = () => {
|
|
1094
|
-
r.value !== null && y.value[r.value] && w(y.value[r.value]);
|
|
1095
|
-
};
|
|
1096
|
-
return (b, A) => (u(), m("div", ua, [
|
|
1097
|
-
e.mode === "display" ? (u(), m("span", da, k(d.value), 1)) : (u(), m(p, { key: 1 }, [
|
|
1098
|
-
I((u(), m("div", ra, [
|
|
1099
|
-
a("div", ca, [
|
|
1100
|
-
I(a("input", {
|
|
1101
|
-
"onUpdate:modelValue": A[0] || (A[0] = (R) => t.value = R),
|
|
1102
|
-
type: "text",
|
|
1103
|
-
class: "aform_input-field",
|
|
1104
|
-
disabled: e.disabled || e.mode === "read",
|
|
1105
|
-
onInput: i,
|
|
1106
|
-
onFocus: o,
|
|
1107
|
-
onKeydown: [
|
|
1108
|
-
q(B(P, ["prevent"]), ["down"]),
|
|
1109
|
-
q(B(z, ["prevent"]), ["up"]),
|
|
1110
|
-
q(B($, ["prevent"]), ["enter"]),
|
|
1111
|
-
q(c, ["esc"]),
|
|
1112
|
-
q(c, ["tab"])
|
|
1113
|
-
]
|
|
1114
|
-
}, null, 40, ma), [
|
|
1115
|
-
[K, t.value]
|
|
1116
|
-
]),
|
|
1117
|
-
s.value && !e.disabled ? (u(), m("button", {
|
|
1118
|
-
key: 0,
|
|
1119
|
-
type: "button",
|
|
1120
|
-
class: "aform_form-btn",
|
|
1121
|
-
onClick: h,
|
|
1122
|
-
onKeydown: q(B(h, ["prevent"]), ["enter"])
|
|
1123
|
-
}, [
|
|
1124
|
-
a("span", null, k(e.icon === "chevron-right" ? "›" : "→"), 1)
|
|
1125
|
-
], 40, fa)) : L("", !0)
|
|
1126
|
-
]),
|
|
1127
|
-
f.value ? (u(), m("ul", va, [
|
|
1128
|
-
v.value ? (u(), m("li", ya, "Loading…")) : (u(!0), m(p, { key: 1 }, J(y.value, (R, Z) => (u(), m("li", {
|
|
1129
|
-
key: String(R.id),
|
|
1130
|
-
class: O(["autocomplete-result", { "is-active": Z === r.value }]),
|
|
1131
|
-
onMousedown: B((W) => w(R), ["prevent"])
|
|
1132
|
-
}, k(R.displayText ?? String(R.id)), 43, ha))), 128))
|
|
1133
|
-
])) : L("", !0)
|
|
1134
|
-
])), [
|
|
1135
|
-
[Y(ie), l]
|
|
1136
|
-
]),
|
|
1137
|
-
e.label ? (u(), m("label", ga, k(e.label), 1)) : L("", !0)
|
|
1362
|
+
onClick: k[1] || (k[1] = (v) => W(c)())
|
|
1363
|
+
}, "Reset", 8, Ka)
|
|
1138
1364
|
], 64))
|
|
1139
1365
|
]));
|
|
1140
1366
|
}
|
|
1141
|
-
}),
|
|
1367
|
+
}), Qa = /* @__PURE__ */ U(Pa, [["__scopeId", "data-v-8eefd179"]]), Ya = { class: "aform_form-element" }, Ga = { class: "aform_display-value" }, za = { class: "aform_field-label" }, Wa = ["id", "disabled", "required"], Ja = ["for"], Xa = ["innerHTML"], Za = /* @__PURE__ */ R({
|
|
1142
1368
|
__name: "ANumericInput",
|
|
1143
|
-
props: /* @__PURE__ */
|
|
1369
|
+
props: /* @__PURE__ */ P({
|
|
1144
1370
|
schema: {},
|
|
1145
1371
|
label: {},
|
|
1146
1372
|
selectRange: { type: Boolean },
|
|
@@ -1156,38 +1382,38 @@ const _e = { class: "aform_form-element" }, Re = { class: "aform_field-label" },
|
|
|
1156
1382
|
}),
|
|
1157
1383
|
emits: ["update:modelValue"],
|
|
1158
1384
|
setup(e) {
|
|
1159
|
-
const
|
|
1160
|
-
return (
|
|
1161
|
-
e.mode === "display" ? (u(), m(
|
|
1162
|
-
a("span",
|
|
1163
|
-
a("label",
|
|
1164
|
-
], 64)) : (u(), m(
|
|
1165
|
-
|
|
1385
|
+
const s = A(() => e.errors?.length ? e.errors.join("; ") : e.validation.errorMessage ?? ""), n = G(e, "modelValue");
|
|
1386
|
+
return (c, t) => (u(), m("div", Ya, [
|
|
1387
|
+
e.mode === "display" ? (u(), m(L, { key: 0 }, [
|
|
1388
|
+
a("span", Ga, g(n.value ?? ""), 1),
|
|
1389
|
+
a("label", za, g(e.label), 1)
|
|
1390
|
+
], 64)) : (u(), m(L, { key: 1 }, [
|
|
1391
|
+
p(a("input", {
|
|
1166
1392
|
id: e.uuid,
|
|
1167
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
1393
|
+
"onUpdate:modelValue": t[0] || (t[0] = (d) => n.value = d),
|
|
1168
1394
|
class: "aform_input-field",
|
|
1169
1395
|
type: "number",
|
|
1170
1396
|
disabled: e.mode === "read",
|
|
1171
1397
|
required: e.required
|
|
1172
|
-
}, null, 8,
|
|
1173
|
-
[
|
|
1398
|
+
}, null, 8, Wa), [
|
|
1399
|
+
[Y, n.value]
|
|
1174
1400
|
]),
|
|
1175
1401
|
a("label", {
|
|
1176
1402
|
class: "aform_field-label",
|
|
1177
1403
|
for: e.uuid
|
|
1178
|
-
},
|
|
1179
|
-
|
|
1404
|
+
}, g(e.label), 9, Ja),
|
|
1405
|
+
p(a("p", {
|
|
1180
1406
|
class: "aform_error",
|
|
1181
|
-
innerHTML:
|
|
1182
|
-
}, null, 8,
|
|
1183
|
-
[
|
|
1407
|
+
innerHTML: s.value
|
|
1408
|
+
}, null, 8, Xa), [
|
|
1409
|
+
[K, s.value]
|
|
1184
1410
|
])
|
|
1185
1411
|
], 64))
|
|
1186
1412
|
]));
|
|
1187
1413
|
}
|
|
1188
|
-
}),
|
|
1414
|
+
}), Oa = { class: "aform_form-element aquantity" }, ja = { class: "aform_display-value" }, el = { class: "aform_field-label" }, tl = { class: "aquantity__row" }, al = { class: "aquantity__field aquantity__field--qty" }, ll = { class: "aquantity__group" }, nl = ["id", "disabled", "required"], sl = { class: "aquantity__uom" }, ol = ["id", "disabled", "aria-expanded", "aria-activedescendant", "onKeydown"], il = { class: "aquantity__uom-value" }, ul = ["aria-label"], dl = ["id", "aria-selected", "onMouseenter", "onClick"], rl = ["for"], cl = { class: "aquantity__row aquantity__row--stock" }, ml = { class: "aquantity__field aquantity__field--stock-uom" }, fl = ["value"], vl = { class: "aform_field-label" }, yl = { class: "aquantity__field aquantity__field--stock-qty" }, hl = ["value"], bl = { class: "aform_field-label" }, gl = { class: "aquantity__field aquantity__field--conversion" }, $l = ["value"], kl = { class: "aform_field-label" }, xl = ["innerHTML"], wl = /* @__PURE__ */ R({
|
|
1189
1415
|
__name: "AQuantityInput",
|
|
1190
|
-
props: /* @__PURE__ */
|
|
1416
|
+
props: /* @__PURE__ */ P({
|
|
1191
1417
|
schema: {},
|
|
1192
1418
|
label: {},
|
|
1193
1419
|
selectRange: { type: Boolean },
|
|
@@ -1210,27 +1436,27 @@ const _e = { class: "aform_form-element" }, Re = { class: "aform_field-label" },
|
|
|
1210
1436
|
}),
|
|
1211
1437
|
emits: ["update:modelValue"],
|
|
1212
1438
|
setup(e) {
|
|
1213
|
-
const
|
|
1214
|
-
const
|
|
1215
|
-
if (
|
|
1216
|
-
const
|
|
1217
|
-
return
|
|
1218
|
-
},
|
|
1219
|
-
const
|
|
1220
|
-
|
|
1221
|
-
qty:
|
|
1222
|
-
uom:
|
|
1223
|
-
conversionFactor:
|
|
1224
|
-
stockUom: e.options.stockUom ??
|
|
1225
|
-
stockQty:
|
|
1439
|
+
const s = G(e, "modelValue"), n = A(() => e.options.uoms ?? []), c = (b) => Number(b.toFixed(6)), t = (b) => {
|
|
1440
|
+
const q = e.options.stockUom ?? s.value.stockUom;
|
|
1441
|
+
if (!b || b === q) return 1;
|
|
1442
|
+
const D = e.options.conversionFactors?.[b];
|
|
1443
|
+
return D !== void 0 ? D : b === s.value.uom ? s.value.conversionFactor ?? 1 : 1;
|
|
1444
|
+
}, d = (b, q) => {
|
|
1445
|
+
const D = t(q);
|
|
1446
|
+
s.value = {
|
|
1447
|
+
qty: b,
|
|
1448
|
+
uom: q,
|
|
1449
|
+
conversionFactor: D,
|
|
1450
|
+
stockUom: e.options.stockUom ?? s.value.stockUom,
|
|
1451
|
+
stockQty: c(b * D)
|
|
1226
1452
|
};
|
|
1227
|
-
},
|
|
1228
|
-
get: () =>
|
|
1229
|
-
set: (
|
|
1230
|
-
}),
|
|
1231
|
-
get: () =>
|
|
1232
|
-
set: (
|
|
1233
|
-
}),
|
|
1453
|
+
}, y = A({
|
|
1454
|
+
get: () => s.value?.qty ?? 0,
|
|
1455
|
+
set: (b) => d(b, s.value?.uom ?? "")
|
|
1456
|
+
}), k = A({
|
|
1457
|
+
get: () => s.value?.uom ?? "",
|
|
1458
|
+
set: (b) => d(s.value?.qty ?? 0, b)
|
|
1459
|
+
}), v = /* @__PURE__ */ new Set([
|
|
1234
1460
|
"Backspace",
|
|
1235
1461
|
"Delete",
|
|
1236
1462
|
"Tab",
|
|
@@ -1242,206 +1468,206 @@ const _e = { class: "aform_form-element" }, Re = { class: "aform_field-label" },
|
|
|
1242
1468
|
"ArrowDown",
|
|
1243
1469
|
"Home",
|
|
1244
1470
|
"End"
|
|
1245
|
-
]),
|
|
1246
|
-
if (
|
|
1247
|
-
const
|
|
1248
|
-
|
|
1249
|
-
},
|
|
1250
|
-
const
|
|
1251
|
-
/^\d*\.?\d*$/.test(
|
|
1252
|
-
},
|
|
1253
|
-
|
|
1254
|
-
},
|
|
1255
|
-
|
|
1471
|
+
]), h = (b) => {
|
|
1472
|
+
if (b.ctrlKey || b.metaKey || b.altKey || v.has(b.key) || /^[0-9]$/.test(b.key)) return;
|
|
1473
|
+
const q = b.target;
|
|
1474
|
+
b.key === "." && !q.value.includes(".") || b.preventDefault();
|
|
1475
|
+
}, x = (b) => {
|
|
1476
|
+
const q = b.clipboardData?.getData("text") ?? "";
|
|
1477
|
+
/^\d*\.?\d*$/.test(q) || b.preventDefault();
|
|
1478
|
+
}, $ = ce({ open: !1, activeIndex: -1 }), I = () => {
|
|
1479
|
+
$.activeIndex = Math.max(n.value.indexOf(k.value), 0), $.open = !0;
|
|
1480
|
+
}, f = () => {
|
|
1481
|
+
$.open = !1;
|
|
1256
1482
|
}, l = () => {
|
|
1257
|
-
|
|
1258
|
-
}, o = (
|
|
1259
|
-
|
|
1260
|
-
}, i = (
|
|
1261
|
-
if (
|
|
1262
|
-
|
|
1483
|
+
$.open ? f() : I();
|
|
1484
|
+
}, o = (b) => {
|
|
1485
|
+
k.value = b, f();
|
|
1486
|
+
}, i = (b) => {
|
|
1487
|
+
if (!$.open) {
|
|
1488
|
+
I();
|
|
1263
1489
|
return;
|
|
1264
1490
|
}
|
|
1265
|
-
const
|
|
1266
|
-
|
|
1491
|
+
const q = n.value.length;
|
|
1492
|
+
q && ($.activeIndex = ($.activeIndex + b + q) % q);
|
|
1267
1493
|
}, w = () => {
|
|
1268
|
-
if (
|
|
1269
|
-
|
|
1494
|
+
if (!$.open) {
|
|
1495
|
+
I();
|
|
1270
1496
|
return;
|
|
1271
1497
|
}
|
|
1272
|
-
const
|
|
1273
|
-
|
|
1274
|
-
},
|
|
1275
|
-
const
|
|
1276
|
-
return
|
|
1277
|
-
}),
|
|
1278
|
-
const
|
|
1279
|
-
if (
|
|
1280
|
-
const
|
|
1281
|
-
return
|
|
1498
|
+
const b = n.value[$.activeIndex];
|
|
1499
|
+
b !== void 0 && o(b);
|
|
1500
|
+
}, r = A(() => {
|
|
1501
|
+
const b = s.value;
|
|
1502
|
+
return !!b?.stockUom && (b.uom !== b.stockUom || b.qty !== b.stockQty);
|
|
1503
|
+
}), F = A(() => {
|
|
1504
|
+
const b = s.value;
|
|
1505
|
+
if (!b || !b.uom) return "—";
|
|
1506
|
+
const q = `${b.qty} ${b.uom}`;
|
|
1507
|
+
return r.value ? `${q} (${b.stockQty} ${b.stockUom})` : q;
|
|
1282
1508
|
});
|
|
1283
|
-
return (
|
|
1284
|
-
e.mode === "display" ? (u(), m(
|
|
1285
|
-
a("span",
|
|
1286
|
-
a("label",
|
|
1287
|
-
], 64)) : (u(), m(
|
|
1288
|
-
a("div",
|
|
1289
|
-
a("div",
|
|
1290
|
-
a("div",
|
|
1291
|
-
|
|
1509
|
+
return (b, q) => (u(), m("div", Oa, [
|
|
1510
|
+
e.mode === "display" ? (u(), m(L, { key: 0 }, [
|
|
1511
|
+
a("span", ja, g(F.value), 1),
|
|
1512
|
+
a("label", el, g(e.label), 1)
|
|
1513
|
+
], 64)) : (u(), m(L, { key: 1 }, [
|
|
1514
|
+
a("div", tl, [
|
|
1515
|
+
a("div", al, [
|
|
1516
|
+
a("div", ll, [
|
|
1517
|
+
p(a("input", {
|
|
1292
1518
|
id: e.uuid,
|
|
1293
|
-
"onUpdate:modelValue":
|
|
1519
|
+
"onUpdate:modelValue": q[0] || (q[0] = (D) => y.value = D),
|
|
1294
1520
|
class: "aquantity__qty",
|
|
1295
1521
|
type: "number",
|
|
1296
1522
|
disabled: e.mode === "read",
|
|
1297
1523
|
required: e.required,
|
|
1298
|
-
onKeydown:
|
|
1299
|
-
onPaste:
|
|
1300
|
-
}, null, 40,
|
|
1524
|
+
onKeydown: h,
|
|
1525
|
+
onPaste: x
|
|
1526
|
+
}, null, 40, nl), [
|
|
1301
1527
|
[
|
|
1302
|
-
|
|
1303
|
-
|
|
1528
|
+
Y,
|
|
1529
|
+
y.value,
|
|
1304
1530
|
void 0,
|
|
1305
1531
|
{ number: !0 }
|
|
1306
1532
|
]
|
|
1307
1533
|
]),
|
|
1308
|
-
|
|
1534
|
+
p((u(), m("div", sl, [
|
|
1309
1535
|
a("button", {
|
|
1310
1536
|
id: `${e.uuid}-uom`,
|
|
1311
1537
|
type: "button",
|
|
1312
1538
|
class: "aquantity__uom-toggle",
|
|
1313
1539
|
disabled: e.mode === "read",
|
|
1314
1540
|
"aria-haspopup": "listbox",
|
|
1315
|
-
"aria-expanded":
|
|
1316
|
-
"aria-activedescendant":
|
|
1541
|
+
"aria-expanded": $.open,
|
|
1542
|
+
"aria-activedescendant": $.open && $.activeIndex >= 0 ? `${e.uuid}-uom-opt-${$.activeIndex}` : void 0,
|
|
1317
1543
|
onClick: l,
|
|
1318
1544
|
onKeydown: [
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1545
|
+
q[1] || (q[1] = _(B((D) => i(1), ["prevent"]), ["down"])),
|
|
1546
|
+
q[2] || (q[2] = _(B((D) => i(-1), ["prevent"]), ["up"])),
|
|
1547
|
+
_(B(w, ["prevent"]), ["enter"]),
|
|
1548
|
+
_(f, ["esc"])
|
|
1323
1549
|
]
|
|
1324
1550
|
}, [
|
|
1325
|
-
a("span",
|
|
1326
|
-
|
|
1551
|
+
a("span", il, g(k.value || e.uomLabel), 1),
|
|
1552
|
+
q[3] || (q[3] = a("span", {
|
|
1327
1553
|
class: "aquantity__caret",
|
|
1328
1554
|
"aria-hidden": "true"
|
|
1329
1555
|
}, null, -1))
|
|
1330
|
-
], 40,
|
|
1331
|
-
|
|
1556
|
+
], 40, ol),
|
|
1557
|
+
p(a("ul", {
|
|
1332
1558
|
class: "aquantity__uom-menu",
|
|
1333
1559
|
role: "listbox",
|
|
1334
1560
|
"aria-label": e.uomLabel
|
|
1335
1561
|
}, [
|
|
1336
|
-
(u(!0), m(
|
|
1337
|
-
id: `${e.uuid}-uom-opt-${
|
|
1338
|
-
key:
|
|
1562
|
+
(u(!0), m(L, null, Z(n.value, (D, V) => (u(), m("li", {
|
|
1563
|
+
id: `${e.uuid}-uom-opt-${V}`,
|
|
1564
|
+
key: D,
|
|
1339
1565
|
role: "option",
|
|
1340
|
-
"aria-selected":
|
|
1341
|
-
class:
|
|
1342
|
-
onMouseenter: (
|
|
1343
|
-
onClick: (
|
|
1344
|
-
},
|
|
1345
|
-
], 8,
|
|
1346
|
-
[
|
|
1566
|
+
"aria-selected": D === k.value,
|
|
1567
|
+
class: X(["aquantity__uom-option", { "is-active": V === $.activeIndex }]),
|
|
1568
|
+
onMouseenter: (N) => $.activeIndex = V,
|
|
1569
|
+
onClick: (N) => o(D)
|
|
1570
|
+
}, g(D), 43, dl))), 128))
|
|
1571
|
+
], 8, ul), [
|
|
1572
|
+
[K, $.open]
|
|
1347
1573
|
])
|
|
1348
1574
|
])), [
|
|
1349
|
-
[
|
|
1575
|
+
[W(me), f]
|
|
1350
1576
|
])
|
|
1351
1577
|
]),
|
|
1352
1578
|
a("label", {
|
|
1353
1579
|
class: "aform_field-label",
|
|
1354
1580
|
for: e.uuid
|
|
1355
|
-
},
|
|
1581
|
+
}, g(e.label), 9, rl)
|
|
1356
1582
|
])
|
|
1357
1583
|
]),
|
|
1358
|
-
a("div",
|
|
1359
|
-
a("div",
|
|
1584
|
+
a("div", cl, [
|
|
1585
|
+
a("div", ml, [
|
|
1360
1586
|
a("input", {
|
|
1361
|
-
value:
|
|
1587
|
+
value: s.value.stockUom,
|
|
1362
1588
|
class: "aform_input-field aquantity__stock-field",
|
|
1363
1589
|
type: "text",
|
|
1364
1590
|
disabled: ""
|
|
1365
|
-
}, null, 8,
|
|
1366
|
-
a("label",
|
|
1591
|
+
}, null, 8, fl),
|
|
1592
|
+
a("label", vl, g(e.stockUomLabel), 1)
|
|
1367
1593
|
]),
|
|
1368
|
-
a("div",
|
|
1594
|
+
a("div", yl, [
|
|
1369
1595
|
a("input", {
|
|
1370
|
-
value:
|
|
1596
|
+
value: s.value.stockQty,
|
|
1371
1597
|
class: "aform_input-field aquantity__stock-field",
|
|
1372
1598
|
type: "number",
|
|
1373
1599
|
disabled: ""
|
|
1374
|
-
}, null, 8,
|
|
1375
|
-
a("label",
|
|
1600
|
+
}, null, 8, hl),
|
|
1601
|
+
a("label", bl, g(e.stockQtyLabel), 1)
|
|
1376
1602
|
]),
|
|
1377
|
-
a("div",
|
|
1603
|
+
a("div", gl, [
|
|
1378
1604
|
a("input", {
|
|
1379
|
-
value:
|
|
1605
|
+
value: s.value.conversionFactor,
|
|
1380
1606
|
class: "aform_input-field aquantity__stock-field",
|
|
1381
1607
|
type: "number",
|
|
1382
1608
|
disabled: ""
|
|
1383
|
-
}, null, 8,
|
|
1384
|
-
a("label",
|
|
1609
|
+
}, null, 8, $l),
|
|
1610
|
+
a("label", kl, g(e.conversionFactorLabel), 1)
|
|
1385
1611
|
])
|
|
1386
1612
|
]),
|
|
1387
|
-
|
|
1613
|
+
p(a("p", {
|
|
1388
1614
|
class: "aform_error",
|
|
1389
1615
|
innerHTML: e.validation.errorMessage
|
|
1390
|
-
}, null, 8,
|
|
1391
|
-
[
|
|
1616
|
+
}, null, 8, xl), [
|
|
1617
|
+
[K, e.validation.errorMessage]
|
|
1392
1618
|
])
|
|
1393
1619
|
], 64))
|
|
1394
1620
|
]));
|
|
1395
1621
|
}
|
|
1396
|
-
}),
|
|
1397
|
-
function
|
|
1622
|
+
}), Dl = /* @__PURE__ */ U(wl, [["__scopeId", "data-v-0b714861"]]);
|
|
1623
|
+
function Ml(e) {
|
|
1398
1624
|
try {
|
|
1399
|
-
return
|
|
1625
|
+
return ue(e);
|
|
1400
1626
|
} catch {
|
|
1401
1627
|
return;
|
|
1402
1628
|
}
|
|
1403
1629
|
}
|
|
1404
|
-
function
|
|
1405
|
-
const
|
|
1406
|
-
if (!
|
|
1407
|
-
const
|
|
1408
|
-
if (
|
|
1630
|
+
function Tl(e) {
|
|
1631
|
+
const s = e.value;
|
|
1632
|
+
if (!s) return;
|
|
1633
|
+
const n = Ml(s);
|
|
1634
|
+
if (n) {
|
|
1409
1635
|
const t = e.instance?.locale;
|
|
1410
|
-
return
|
|
1636
|
+
return n(t);
|
|
1411
1637
|
}
|
|
1412
|
-
return n;
|
|
1413
|
-
}
|
|
1414
|
-
function tl(e, n) {
|
|
1415
|
-
let s = e;
|
|
1416
|
-
const d = [n, "/", "-", "(", ")", " "];
|
|
1417
|
-
for (const t of d)
|
|
1418
|
-
s = s.replaceAll(t, "");
|
|
1419
1638
|
return s;
|
|
1420
1639
|
}
|
|
1421
|
-
function
|
|
1422
|
-
let
|
|
1640
|
+
function Sl(e, s) {
|
|
1641
|
+
let n = e;
|
|
1642
|
+
const c = [s, "/", "-", "(", ")", " "];
|
|
1643
|
+
for (const t of c)
|
|
1644
|
+
n = n.replaceAll(t, "");
|
|
1645
|
+
return n;
|
|
1646
|
+
}
|
|
1647
|
+
function Al(e, s, n) {
|
|
1648
|
+
let c = s;
|
|
1423
1649
|
for (const t of e) {
|
|
1424
|
-
const
|
|
1425
|
-
if (
|
|
1426
|
-
const
|
|
1427
|
-
|
|
1650
|
+
const d = c.indexOf(n);
|
|
1651
|
+
if (d !== -1) {
|
|
1652
|
+
const y = c.substring(0, d), k = c.substring(d + 1);
|
|
1653
|
+
c = y + t + k;
|
|
1428
1654
|
}
|
|
1429
1655
|
}
|
|
1430
|
-
return
|
|
1656
|
+
return c.slice(0, s.length);
|
|
1431
1657
|
}
|
|
1432
|
-
function
|
|
1433
|
-
const
|
|
1434
|
-
if (!
|
|
1435
|
-
const
|
|
1436
|
-
if (
|
|
1437
|
-
const
|
|
1438
|
-
|
|
1658
|
+
function Il(e, s) {
|
|
1659
|
+
const n = Tl(s);
|
|
1660
|
+
if (!n) return;
|
|
1661
|
+
const c = "#", t = e.value, d = Sl(t, c);
|
|
1662
|
+
if (d) {
|
|
1663
|
+
const y = Al(d, n, c), k = s.instance;
|
|
1664
|
+
k?.maskFilled && (k.maskFilled = !y.includes(c)), e.value = y;
|
|
1439
1665
|
} else
|
|
1440
|
-
e.value =
|
|
1666
|
+
e.value = n;
|
|
1441
1667
|
}
|
|
1442
|
-
const
|
|
1668
|
+
const pl = { class: "aform_form-element" }, Ll = { class: "aform_display-value" }, ql = { class: "aform_field-label" }, Fl = ["id", "disabled", "maxlength", "required"], _l = ["for"], Cl = ["innerHTML"], Bl = /* @__PURE__ */ R({
|
|
1443
1669
|
__name: "ATextInput",
|
|
1444
|
-
props: /* @__PURE__ */
|
|
1670
|
+
props: /* @__PURE__ */ P({
|
|
1445
1671
|
schema: {},
|
|
1446
1672
|
label: {},
|
|
1447
1673
|
selectRange: { type: Boolean },
|
|
@@ -1457,39 +1683,39 @@ const nl = { class: "aform_form-element" }, sl = { class: "aform_display-value"
|
|
|
1457
1683
|
}),
|
|
1458
1684
|
emits: ["update:modelValue"],
|
|
1459
1685
|
setup(e) {
|
|
1460
|
-
const
|
|
1461
|
-
return (t,
|
|
1462
|
-
e.mode === "display" ? (u(), m(
|
|
1463
|
-
a("span",
|
|
1464
|
-
a("label",
|
|
1465
|
-
], 64)) : (u(), m(
|
|
1466
|
-
|
|
1686
|
+
const s = A(() => e.errors?.length ? e.errors.join("; ") : e.validation.errorMessage ?? ""), n = S(!0), c = G(e, "modelValue");
|
|
1687
|
+
return (t, d) => (u(), m("div", pl, [
|
|
1688
|
+
e.mode === "display" ? (u(), m(L, { key: 0 }, [
|
|
1689
|
+
a("span", Ll, g(c.value ?? ""), 1),
|
|
1690
|
+
a("label", ql, g(e.label), 1)
|
|
1691
|
+
], 64)) : (u(), m(L, { key: 1 }, [
|
|
1692
|
+
p(a("input", {
|
|
1467
1693
|
id: e.uuid,
|
|
1468
|
-
"onUpdate:modelValue":
|
|
1694
|
+
"onUpdate:modelValue": d[0] || (d[0] = (y) => c.value = y),
|
|
1469
1695
|
class: "aform_input-field",
|
|
1470
1696
|
disabled: e.mode === "read",
|
|
1471
|
-
maxlength: e.mask &&
|
|
1697
|
+
maxlength: e.mask && n.value ? e.mask.length : void 0,
|
|
1472
1698
|
required: e.required
|
|
1473
|
-
}, null, 8,
|
|
1474
|
-
[
|
|
1475
|
-
[
|
|
1699
|
+
}, null, 8, Fl), [
|
|
1700
|
+
[Y, c.value],
|
|
1701
|
+
[W(Il), e.mask]
|
|
1476
1702
|
]),
|
|
1477
1703
|
a("label", {
|
|
1478
1704
|
class: "aform_field-label",
|
|
1479
1705
|
for: e.uuid
|
|
1480
|
-
},
|
|
1481
|
-
|
|
1706
|
+
}, g(e.label), 9, _l),
|
|
1707
|
+
p(a("p", {
|
|
1482
1708
|
class: "aform_error",
|
|
1483
|
-
innerHTML:
|
|
1484
|
-
}, null, 8,
|
|
1485
|
-
[
|
|
1709
|
+
innerHTML: s.value
|
|
1710
|
+
}, null, 8, Cl), [
|
|
1711
|
+
[K, s.value]
|
|
1486
1712
|
])
|
|
1487
1713
|
], 64))
|
|
1488
1714
|
]));
|
|
1489
1715
|
}
|
|
1490
|
-
}),
|
|
1716
|
+
}), Rl = { class: "aform_form-element" }, Vl = { class: "aform_display-value aform_textbox-display" }, Nl = { class: "aform_field-label" }, Hl = ["id", "placeholder", "rows", "maxlength", "disabled", "required"], Ul = ["for"], El = ["innerHTML"], Kl = /* @__PURE__ */ R({
|
|
1491
1717
|
__name: "ATextboxInput",
|
|
1492
|
-
props: /* @__PURE__ */
|
|
1718
|
+
props: /* @__PURE__ */ P({
|
|
1493
1719
|
schema: {},
|
|
1494
1720
|
label: {},
|
|
1495
1721
|
selectRange: { type: Boolean },
|
|
@@ -1508,74 +1734,74 @@ const nl = { class: "aform_form-element" }, sl = { class: "aform_display-value"
|
|
|
1508
1734
|
}),
|
|
1509
1735
|
emits: ["update:modelValue"],
|
|
1510
1736
|
setup(e) {
|
|
1511
|
-
const
|
|
1512
|
-
return (
|
|
1513
|
-
e.mode === "display" ? (u(), m(
|
|
1514
|
-
a("span",
|
|
1515
|
-
a("label",
|
|
1516
|
-
], 64)) : (u(), m(
|
|
1517
|
-
|
|
1737
|
+
const s = A(() => e.errors?.length ? e.errors.join("; ") : e.validation.errorMessage ?? ""), n = G(e, "modelValue");
|
|
1738
|
+
return (c, t) => (u(), m("div", Rl, [
|
|
1739
|
+
e.mode === "display" ? (u(), m(L, { key: 0 }, [
|
|
1740
|
+
a("span", Vl, g(n.value ?? ""), 1),
|
|
1741
|
+
a("label", Nl, g(e.label), 1)
|
|
1742
|
+
], 64)) : (u(), m(L, { key: 1 }, [
|
|
1743
|
+
p(a("textarea", {
|
|
1518
1744
|
id: e.uuid,
|
|
1519
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
1745
|
+
"onUpdate:modelValue": t[0] || (t[0] = (d) => n.value = d),
|
|
1520
1746
|
class: "aform_input-field aform_textbox",
|
|
1521
1747
|
placeholder: e.placeholder,
|
|
1522
1748
|
rows: e.rows,
|
|
1523
1749
|
maxlength: e.maxlength,
|
|
1524
1750
|
disabled: e.mode === "read",
|
|
1525
1751
|
required: e.required
|
|
1526
|
-
}, null, 8,
|
|
1527
|
-
[
|
|
1752
|
+
}, null, 8, Hl), [
|
|
1753
|
+
[Y, n.value]
|
|
1528
1754
|
]),
|
|
1529
1755
|
a("label", {
|
|
1530
1756
|
class: "aform_field-label",
|
|
1531
1757
|
for: e.uuid
|
|
1532
|
-
},
|
|
1533
|
-
|
|
1758
|
+
}, g(e.label), 9, Ul),
|
|
1759
|
+
p(a("p", {
|
|
1534
1760
|
class: "aform_error",
|
|
1535
|
-
innerHTML:
|
|
1536
|
-
}, null, 8,
|
|
1537
|
-
[
|
|
1761
|
+
innerHTML: s.value
|
|
1762
|
+
}, null, 8, El), [
|
|
1763
|
+
[K, s.value]
|
|
1538
1764
|
])
|
|
1539
1765
|
], 64))
|
|
1540
1766
|
]));
|
|
1541
1767
|
}
|
|
1542
|
-
}),
|
|
1768
|
+
}), Pl = /* @__PURE__ */ U(Kl, [["__scopeId", "data-v-2a9c793b"]]), Ql = { class: "login-container" }, Yl = { class: "account-container" }, Gl = { class: "account-header" }, zl = { id: "account-title" }, Wl = { id: "account-subtitle" }, Jl = { class: "login-form-container" }, Xl = { class: "login-form-email aform_form-element" }, Zl = ["disabled"], Ol = { class: "login-form-password aform_form-element" }, jl = ["disabled"], en = ["disabled"], tn = {
|
|
1543
1769
|
key: 0,
|
|
1544
1770
|
class: "material-symbols-outlined loading-icon"
|
|
1545
|
-
},
|
|
1771
|
+
}, an = /* @__PURE__ */ R({
|
|
1546
1772
|
__name: "Login",
|
|
1547
1773
|
props: {
|
|
1548
1774
|
headerTitle: { default: "Login" },
|
|
1549
1775
|
headerSubtitle: { default: "Enter your email and password to login" }
|
|
1550
1776
|
},
|
|
1551
1777
|
emits: ["loginFailed", "loginSuccess"],
|
|
1552
|
-
setup(e, { emit:
|
|
1553
|
-
const
|
|
1554
|
-
function
|
|
1555
|
-
if (
|
|
1556
|
-
|
|
1778
|
+
setup(e, { emit: s }) {
|
|
1779
|
+
const n = s, c = S(""), t = S(""), d = S(!1), y = S(!1);
|
|
1780
|
+
function k(v) {
|
|
1781
|
+
if (v.preventDefault(), d.value = !0, y.value) {
|
|
1782
|
+
d.value = !1, n("loginFailed");
|
|
1557
1783
|
return;
|
|
1558
1784
|
}
|
|
1559
|
-
|
|
1785
|
+
d.value = !1, n("loginSuccess");
|
|
1560
1786
|
}
|
|
1561
|
-
return (
|
|
1787
|
+
return (v, h) => (u(), m("div", Ql, [
|
|
1562
1788
|
a("div", null, [
|
|
1563
|
-
a("div",
|
|
1564
|
-
a("div",
|
|
1565
|
-
a("h1",
|
|
1566
|
-
a("p",
|
|
1789
|
+
a("div", Yl, [
|
|
1790
|
+
a("div", Gl, [
|
|
1791
|
+
a("h1", zl, g(e.headerTitle), 1),
|
|
1792
|
+
a("p", Wl, g(e.headerSubtitle), 1)
|
|
1567
1793
|
]),
|
|
1568
|
-
a("form", { onSubmit:
|
|
1569
|
-
a("div",
|
|
1570
|
-
a("div",
|
|
1571
|
-
|
|
1794
|
+
a("form", { onSubmit: k }, [
|
|
1795
|
+
a("div", Jl, [
|
|
1796
|
+
a("div", Xl, [
|
|
1797
|
+
h[2] || (h[2] = a("label", {
|
|
1572
1798
|
id: "login-email",
|
|
1573
1799
|
for: "email",
|
|
1574
1800
|
class: "aform_field-label"
|
|
1575
1801
|
}, "Email", -1)),
|
|
1576
|
-
|
|
1802
|
+
p(a("input", {
|
|
1577
1803
|
id: "email",
|
|
1578
|
-
"onUpdate:modelValue":
|
|
1804
|
+
"onUpdate:modelValue": h[0] || (h[0] = (x) => c.value = x),
|
|
1579
1805
|
class: "aform_input-field",
|
|
1580
1806
|
name: "email",
|
|
1581
1807
|
placeholder: "name@example.com",
|
|
@@ -1583,78 +1809,79 @@ const nl = { class: "aform_form-element" }, sl = { class: "aform_display-value"
|
|
|
1583
1809
|
"auto-capitalize": "none",
|
|
1584
1810
|
"auto-complete": "email",
|
|
1585
1811
|
"auto-correct": "off",
|
|
1586
|
-
disabled:
|
|
1587
|
-
}, null, 8,
|
|
1588
|
-
[
|
|
1812
|
+
disabled: d.value
|
|
1813
|
+
}, null, 8, Zl), [
|
|
1814
|
+
[Y, c.value]
|
|
1589
1815
|
])
|
|
1590
1816
|
]),
|
|
1591
|
-
a("div",
|
|
1592
|
-
|
|
1817
|
+
a("div", Ol, [
|
|
1818
|
+
h[3] || (h[3] = a("label", {
|
|
1593
1819
|
id: "login-password",
|
|
1594
1820
|
for: "password",
|
|
1595
1821
|
class: "aform_field-label"
|
|
1596
1822
|
}, "Password", -1)),
|
|
1597
|
-
|
|
1823
|
+
p(a("input", {
|
|
1598
1824
|
id: "password",
|
|
1599
|
-
"onUpdate:modelValue":
|
|
1825
|
+
"onUpdate:modelValue": h[1] || (h[1] = (x) => t.value = x),
|
|
1600
1826
|
class: "aform_input-field",
|
|
1601
1827
|
name: "password",
|
|
1602
1828
|
type: "password",
|
|
1603
|
-
disabled:
|
|
1604
|
-
}, null, 8,
|
|
1605
|
-
[
|
|
1829
|
+
disabled: d.value
|
|
1830
|
+
}, null, 8, jl), [
|
|
1831
|
+
[Y, t.value]
|
|
1606
1832
|
])
|
|
1607
1833
|
]),
|
|
1608
1834
|
a("button", {
|
|
1609
1835
|
class: "btn",
|
|
1610
|
-
disabled:
|
|
1611
|
-
onClick:
|
|
1836
|
+
disabled: d.value || !c.value || !t.value,
|
|
1837
|
+
onClick: k
|
|
1612
1838
|
}, [
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
], 8,
|
|
1839
|
+
d.value ? (u(), m("span", tn, "progress_activity")) : C("", !0),
|
|
1840
|
+
h[4] || (h[4] = a("span", { id: "login-form-button" }, "Login", -1))
|
|
1841
|
+
], 8, en)
|
|
1616
1842
|
])
|
|
1617
1843
|
], 32),
|
|
1618
|
-
|
|
1844
|
+
h[5] || (h[5] = a("button", { class: "btn" }, [
|
|
1619
1845
|
a("span", { id: "forgot-password-button" }, "Forgot password?")
|
|
1620
1846
|
], -1))
|
|
1621
1847
|
])
|
|
1622
1848
|
])
|
|
1623
1849
|
]));
|
|
1624
1850
|
}
|
|
1625
|
-
}),
|
|
1626
|
-
function
|
|
1627
|
-
return u(), m("div",
|
|
1628
|
-
a("div",
|
|
1629
|
-
|
|
1851
|
+
}), fn = /* @__PURE__ */ U(an, [["__scopeId", "data-v-2c0f0634"]]), ln = {}, nn = { class: "aform-loading" }, sn = { class: "aform-loading__label" };
|
|
1852
|
+
function on(e, s) {
|
|
1853
|
+
return u(), m("div", nn, [
|
|
1854
|
+
a("div", sn, [
|
|
1855
|
+
re(e.$slots, "default", {}, void 0, !0)
|
|
1630
1856
|
]),
|
|
1631
|
-
|
|
1857
|
+
s[0] || (s[0] = a("div", { class: "aform-loading__bar" }, null, -1))
|
|
1632
1858
|
]);
|
|
1633
1859
|
}
|
|
1634
|
-
const
|
|
1635
|
-
function
|
|
1636
|
-
e.use(
|
|
1860
|
+
const un = /* @__PURE__ */ U(ln, [["render", on], ["__scopeId", "data-v-274f5ba3"]]);
|
|
1861
|
+
function vn(e) {
|
|
1862
|
+
e.use(pe), e.component("ACheckbox", ze), e.component("ACurrencyInput", St), e.component("ADate", aa), e.component("ADropdown", fa), e.component("ADatePicker", we), e.component("ADateTime", de), e.component("ADateRange", Ia), e.component("ADateSelection", ne), e.component("AFieldset", Ra), e.component("AFileAttach", Qa), e.component("AForm", De), e.component("AFormLink", xe), e.component("ANumericInput", Za), e.component("AQuantityInput", Dl), e.component("ATextInput", Bl), e.component("ATextboxInput", Pl), e.component("ADuration", xa), e.component("AFormLoading", un);
|
|
1637
1863
|
}
|
|
1638
1864
|
export {
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
ne as
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
Pl as
|
|
1657
|
-
|
|
1658
|
-
|
|
1865
|
+
ze as ACheckbox,
|
|
1866
|
+
St as ACurrencyInput,
|
|
1867
|
+
aa as ADate,
|
|
1868
|
+
we as ADatePicker,
|
|
1869
|
+
Ia as ADateRange,
|
|
1870
|
+
ne as ADateSelection,
|
|
1871
|
+
de as ADateTime,
|
|
1872
|
+
fa as ADropdown,
|
|
1873
|
+
xa as ADuration,
|
|
1874
|
+
Ra as AFieldset,
|
|
1875
|
+
Qa as AFileAttach,
|
|
1876
|
+
De as AForm,
|
|
1877
|
+
xe as AFormLink,
|
|
1878
|
+
un as AFormLoading,
|
|
1879
|
+
Za as ANumericInput,
|
|
1880
|
+
Dl as AQuantityInput,
|
|
1881
|
+
Bl as ATextInput,
|
|
1882
|
+
Pl as ATextboxInput,
|
|
1883
|
+
fn as Login,
|
|
1884
|
+
ue as deserializeFunction,
|
|
1885
|
+
vn as install
|
|
1659
1886
|
};
|
|
1660
1887
|
//# sourceMappingURL=aform.js.map
|