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