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