@stonecrop/aform 0.3.1 → 0.3.2
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 +16 -2
- package/dist/aform.js +92 -85
- package/dist/aform.js.map +1 -1
- package/dist/aform.umd.cjs +2 -2
- package/dist/aform.umd.cjs.map +1 -1
- package/dist/assets/index.css +1 -1
- package/package.json +5 -5
- package/src/components/form/ADate.vue +5 -2
package/dist/aform.d.ts
CHANGED
|
@@ -106,9 +106,23 @@ export declare type TableColumn = {
|
|
|
106
106
|
pinned?: boolean;
|
|
107
107
|
cellComponent?: string;
|
|
108
108
|
cellComponentProps?: Record<string, any>;
|
|
109
|
-
|
|
109
|
+
/**
|
|
110
|
+
* The component to use for the modal. If a function is provided, it will be called with the cell context.
|
|
111
|
+
* The following properties are available on the cell context:
|
|
112
|
+
* - `row` - the row object
|
|
113
|
+
* - `column` - the column object
|
|
114
|
+
* - `table` - the table object
|
|
115
|
+
*
|
|
116
|
+
* The function should return the name of the component to use for the modal.
|
|
117
|
+
*
|
|
118
|
+
* Additionally, the following properties will be automatically passed to the modal component:
|
|
119
|
+
* - `colIndex` - the column index of the current cell
|
|
120
|
+
* - `rowIndex` - the row index of the current cell
|
|
121
|
+
* - `store` - the table data store
|
|
122
|
+
*/
|
|
123
|
+
modalComponent?: string | ((context: CellContext) => string);
|
|
110
124
|
modalComponentExtraProps?: Record<string, any>;
|
|
111
|
-
format?: string | ((value: any, context
|
|
125
|
+
format?: string | ((value: any, context: CellContext) => string);
|
|
112
126
|
mask?: (value: any) => any;
|
|
113
127
|
};
|
|
114
128
|
|
package/dist/aform.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as A, mergeModels as H, useModel as
|
|
1
|
+
import { defineComponent as A, mergeModels as H, useModel as x, openBlock as m, createElementBlock as h, createElementVNode as i, toDisplayString as k, withDirectives as w, vModelCheckbox as ye, vShow as F, resolveComponent as be, createBlock as N, withCtx as _e, useTemplateRef as ce, vModelText as P, ref as v, onMounted as z, onUnmounted as ke, normalizeClass as K, withKeys as G, Fragment as B, renderList as q, watch as U, onBeforeUnmount as we, computed as V, unref as I, getCurrentScope as de, onScopeDispose as fe, getCurrentInstance as De, nextTick as Ae, withModifiers as Me, resolveDynamicComponent as Ee, mergeProps as Ce, createTextVNode as me, createCommentVNode as j, renderSlot as Te, createVNode as Se, readonly as $e } from "vue";
|
|
2
2
|
import './assets/index.css';const Le = { class: "aform_form-element" }, Ve = ["for"], Ie = { class: "aform_checkbox-container aform_input-field" }, He = ["id", "readonly", "required"], Pe = ["innerHTML"], xe = /* @__PURE__ */ A({
|
|
3
3
|
__name: "ACheckbox",
|
|
4
4
|
props: /* @__PURE__ */ H({
|
|
@@ -14,14 +14,14 @@ import './assets/index.css';const Le = { class: "aform_form-element" }, Ve = ["f
|
|
|
14
14
|
}),
|
|
15
15
|
emits: ["update:modelValue"],
|
|
16
16
|
setup(e) {
|
|
17
|
-
const t =
|
|
17
|
+
const t = x(e, "modelValue");
|
|
18
18
|
return (n, o) => (m(), h("div", Le, [
|
|
19
19
|
i("label", {
|
|
20
20
|
class: "aform_field-label",
|
|
21
21
|
for: n.uuid
|
|
22
22
|
}, k(n.label), 9, Ve),
|
|
23
23
|
i("span", Ie, [
|
|
24
|
-
|
|
24
|
+
w(i("input", {
|
|
25
25
|
"onUpdate:modelValue": o[0] || (o[0] = (l) => t.value = l),
|
|
26
26
|
type: "checkbox",
|
|
27
27
|
id: n.uuid,
|
|
@@ -32,11 +32,11 @@ import './assets/index.css';const Le = { class: "aform_form-element" }, Ve = ["f
|
|
|
32
32
|
[ye, t.value]
|
|
33
33
|
])
|
|
34
34
|
]),
|
|
35
|
-
|
|
35
|
+
w(i("p", {
|
|
36
36
|
class: "aform_error",
|
|
37
37
|
innerHTML: n.validation.errorMessage
|
|
38
38
|
}, null, 8, Pe), [
|
|
39
|
-
[
|
|
39
|
+
[F, n.validation.errorMessage]
|
|
40
40
|
])
|
|
41
41
|
]));
|
|
42
42
|
}
|
|
@@ -67,7 +67,7 @@ import './assets/index.css';const Le = { class: "aform_form-element" }, Ve = ["f
|
|
|
67
67
|
}, 8, ["event", "cellData"]);
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
|
-
}), qe = ["id", "disabled", "required"
|
|
70
|
+
}), qe = ["id", "disabled", "required"], Oe = ["for"], Re = ["innerHTML"], Ue = /* @__PURE__ */ A({
|
|
71
71
|
__name: "ADate",
|
|
72
72
|
props: /* @__PURE__ */ H({
|
|
73
73
|
label: { default: "Date" },
|
|
@@ -77,33 +77,40 @@ import './assets/index.css';const Le = { class: "aform_form-element" }, Ve = ["f
|
|
|
77
77
|
uuid: {},
|
|
78
78
|
validation: { default: () => ({ errorMessage: " " }) }
|
|
79
79
|
}, {
|
|
80
|
-
modelValue: {
|
|
80
|
+
modelValue: {
|
|
81
|
+
// format the date to be compatible with the native input datepicker
|
|
82
|
+
},
|
|
81
83
|
modelModifiers: {}
|
|
82
84
|
}),
|
|
83
85
|
emits: ["update:modelValue"],
|
|
84
86
|
setup(e) {
|
|
85
|
-
const t =
|
|
87
|
+
const t = x(e, "modelValue", {
|
|
88
|
+
// format the date to be compatible with the native input datepicker
|
|
89
|
+
set: (l) => new Date(l).toISOString().split("T")[0]
|
|
90
|
+
}), n = ce("date"), o = () => {
|
|
86
91
|
n.value && "showPicker" in HTMLInputElement.prototype && n.value.showPicker();
|
|
87
92
|
};
|
|
88
93
|
return (l, a) => (m(), h("div", null, [
|
|
89
|
-
i("input", {
|
|
94
|
+
w(i("input", {
|
|
95
|
+
"onUpdate:modelValue": a[0] || (a[0] = (s) => t.value = s),
|
|
90
96
|
ref: "date",
|
|
91
97
|
type: "date",
|
|
92
98
|
id: l.uuid,
|
|
93
99
|
disabled: l.readonly,
|
|
94
100
|
required: l.required,
|
|
95
|
-
value: t.value,
|
|
96
101
|
onClick: o
|
|
97
|
-
}, null, 8, qe),
|
|
98
|
-
|
|
99
|
-
|
|
102
|
+
}, null, 8, qe), [
|
|
103
|
+
[P, t.value]
|
|
104
|
+
]),
|
|
105
|
+
i("label", { for: l.uuid }, k(l.label), 9, Oe),
|
|
106
|
+
w(i("p", {
|
|
100
107
|
innerHTML: l.validation.errorMessage
|
|
101
|
-
}, null, 8,
|
|
102
|
-
[
|
|
108
|
+
}, null, 8, Re), [
|
|
109
|
+
[F, l.validation.errorMessage]
|
|
103
110
|
])
|
|
104
111
|
]));
|
|
105
112
|
}
|
|
106
|
-
}), We = /* @__PURE__ */ E(Ue, [["__scopeId", "data-v-
|
|
113
|
+
}), We = /* @__PURE__ */ E(Ue, [["__scopeId", "data-v-bf338f75"]]), Ye = { class: "input-wrapper" }, Ge = {
|
|
107
114
|
id: "autocomplete-results",
|
|
108
115
|
class: "autocomplete-results"
|
|
109
116
|
}, Ke = {
|
|
@@ -121,7 +128,7 @@ import './assets/index.css';const Le = { class: "aform_form-element" }, Ve = ["f
|
|
|
121
128
|
}),
|
|
122
129
|
emits: /* @__PURE__ */ H(["filterChanged"], ["update:modelValue"]),
|
|
123
130
|
setup(e, { emit: t }) {
|
|
124
|
-
const n = t, o = v(e.items), l =
|
|
131
|
+
const n = t, o = v(e.items), l = x(e, "modelValue"), a = v(!1), s = v(0), r = v(!1);
|
|
125
132
|
z(() => {
|
|
126
133
|
document.addEventListener("click", f), u();
|
|
127
134
|
}), ke(() => {
|
|
@@ -139,37 +146,37 @@ import './assets/index.css';const Le = { class: "aform_form-element" }, Ve = ["f
|
|
|
139
146
|
r.value = !1, e.items.includes(l.value) || (l.value = "");
|
|
140
147
|
}, y = () => {
|
|
141
148
|
s.value < o.value.length && (s.value = s.value + 1);
|
|
142
|
-
},
|
|
149
|
+
}, D = () => {
|
|
143
150
|
s.value > 0 && (s.value = s.value - 1);
|
|
144
|
-
},
|
|
151
|
+
}, S = () => {
|
|
145
152
|
l.value = o.value[s.value], p(), s.value = 0;
|
|
146
153
|
};
|
|
147
|
-
return (b,
|
|
154
|
+
return (b, $) => (m(), h("div", {
|
|
148
155
|
class: K(["autocomplete", { isOpen: r.value }])
|
|
149
156
|
}, [
|
|
150
157
|
i("div", Ye, [
|
|
151
|
-
|
|
158
|
+
w(i("input", {
|
|
152
159
|
ref: "mopInput",
|
|
153
160
|
type: "text",
|
|
154
161
|
onInput: d,
|
|
155
162
|
onFocus: d,
|
|
156
|
-
"onUpdate:modelValue":
|
|
163
|
+
"onUpdate:modelValue": $[0] || ($[0] = (g) => l.value = g),
|
|
157
164
|
onKeydown: [
|
|
158
165
|
G(y, ["down"]),
|
|
159
|
-
G(
|
|
160
|
-
G(
|
|
166
|
+
G(D, ["up"]),
|
|
167
|
+
G(S, ["enter"])
|
|
161
168
|
]
|
|
162
169
|
}, null, 544), [
|
|
163
|
-
[
|
|
170
|
+
[P, l.value]
|
|
164
171
|
]),
|
|
165
|
-
|
|
172
|
+
w(i("ul", Ge, [
|
|
166
173
|
a.value ? (m(), h("li", Ke, "Loading results...")) : (m(!0), h(B, { key: 1 }, q(o.value, (g, _) => (m(), h("li", {
|
|
167
174
|
key: _,
|
|
168
175
|
onClick: (M) => c(g),
|
|
169
176
|
class: K(["autocomplete-result", { "is-active": _ === s.value }])
|
|
170
177
|
}, k(g), 11, ze))), 128))
|
|
171
178
|
], 512), [
|
|
172
|
-
[
|
|
179
|
+
[F, r.value]
|
|
173
180
|
]),
|
|
174
181
|
i("label", null, k(b.label), 1)
|
|
175
182
|
])
|
|
@@ -186,12 +193,12 @@ const Je = typeof window < "u" && typeof document < "u";
|
|
|
186
193
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
187
194
|
const Qe = (e) => e != null, Xe = Object.prototype.toString, Ze = (e) => Xe.call(e) === "[object Object]", et = () => {
|
|
188
195
|
}, W = Je ? window : void 0;
|
|
189
|
-
function
|
|
196
|
+
function O(e) {
|
|
190
197
|
var t;
|
|
191
198
|
const n = J(e);
|
|
192
199
|
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
193
200
|
}
|
|
194
|
-
function
|
|
201
|
+
function R(...e) {
|
|
195
202
|
let t, n, o, l;
|
|
196
203
|
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, o, l] = e, t = W) : [t, n, o, l] = e, !t)
|
|
197
204
|
return et;
|
|
@@ -199,13 +206,13 @@ function O(...e) {
|
|
|
199
206
|
const a = [], s = () => {
|
|
200
207
|
a.forEach((d) => d()), a.length = 0;
|
|
201
208
|
}, r = (d, f, p, y) => (d.addEventListener(f, p, y), () => d.removeEventListener(f, p, y)), c = U(
|
|
202
|
-
() => [
|
|
209
|
+
() => [O(t), J(l)],
|
|
203
210
|
([d, f]) => {
|
|
204
211
|
if (s(), !d)
|
|
205
212
|
return;
|
|
206
213
|
const p = Ze(f) ? { ...f } : f;
|
|
207
214
|
a.push(
|
|
208
|
-
...n.flatMap((y) => o.map((
|
|
215
|
+
...n.flatMap((y) => o.map((D) => r(d, y, D, p)))
|
|
209
216
|
);
|
|
210
217
|
},
|
|
211
218
|
{ immediate: !0, flush: "post" }
|
|
@@ -230,7 +237,7 @@ function ot(e, t, n = {}) {
|
|
|
230
237
|
const s = nt(() => o && "MutationObserver" in o), r = () => {
|
|
231
238
|
a && (a.disconnect(), a = void 0);
|
|
232
239
|
}, c = V(() => {
|
|
233
|
-
const p = J(e), y = (Array.isArray(p) ? p : [p]).map(
|
|
240
|
+
const p = J(e), y = (Array.isArray(p) ? p : [p]).map(O).filter(Qe);
|
|
234
241
|
return new Set(y);
|
|
235
242
|
}), u = U(
|
|
236
243
|
() => c.value,
|
|
@@ -263,9 +270,9 @@ function lt(e = {}) {
|
|
|
263
270
|
}, r = v(), c = () => {
|
|
264
271
|
r.value = s();
|
|
265
272
|
};
|
|
266
|
-
return n && (
|
|
273
|
+
return n && (R(n, "blur", (u) => {
|
|
267
274
|
u.relatedTarget === null && c();
|
|
268
|
-
}, !0),
|
|
275
|
+
}, !0), R(n, "focus", c, !0)), l && ot(a, (u) => {
|
|
269
276
|
u.filter((d) => d.removedNodes.length).map((d) => Array.from(d.removedNodes)).flat().forEach((d) => {
|
|
270
277
|
d === r.value && c();
|
|
271
278
|
});
|
|
@@ -276,13 +283,13 @@ function lt(e = {}) {
|
|
|
276
283
|
}
|
|
277
284
|
const at = "focusin", st = "focusout";
|
|
278
285
|
function rt(e, t = {}) {
|
|
279
|
-
const { window: n = W } = t, o = V(() =>
|
|
280
|
-
return !n || !s.value ? { focused: a } : (
|
|
286
|
+
const { window: n = W } = t, o = V(() => O(e)), l = v(!1), a = V(() => l.value), s = lt(t);
|
|
287
|
+
return !n || !s.value ? { focused: a } : (R(o, at, () => l.value = !0), R(o, st, () => l.value = !1), { focused: a });
|
|
281
288
|
}
|
|
282
289
|
function it(e, { window: t = W, scrollTarget: n } = {}) {
|
|
283
290
|
const o = v(!1), l = () => {
|
|
284
291
|
if (!t) return;
|
|
285
|
-
const a = t.document, s =
|
|
292
|
+
const a = t.document, s = O(e);
|
|
286
293
|
if (!s)
|
|
287
294
|
o.value = !1;
|
|
288
295
|
else {
|
|
@@ -291,10 +298,10 @@ function it(e, { window: t = W, scrollTarget: n } = {}) {
|
|
|
291
298
|
}
|
|
292
299
|
};
|
|
293
300
|
return U(
|
|
294
|
-
() =>
|
|
301
|
+
() => O(e),
|
|
295
302
|
() => l(),
|
|
296
303
|
{ immediate: !0, flush: "post" }
|
|
297
|
-
), t &&
|
|
304
|
+
), t && R(n || t, "scroll", l, {
|
|
298
305
|
capture: !1,
|
|
299
306
|
passive: !0
|
|
300
307
|
}), o;
|
|
@@ -504,20 +511,20 @@ function ft(e) {
|
|
|
504
511
|
for (const d of Object.keys(u)) {
|
|
505
512
|
const [f, ...p] = d.split(".");
|
|
506
513
|
if (f === "keydown" && p.includes(c)) {
|
|
507
|
-
const y = u[d],
|
|
508
|
-
const
|
|
509
|
-
return r.getModifierState(
|
|
514
|
+
const y = u[d], D = p.filter((b) => Y.includes(b)), S = Y.some((b) => {
|
|
515
|
+
const $ = b.charAt(0).toUpperCase() + b.slice(1);
|
|
516
|
+
return r.getModifierState($);
|
|
510
517
|
});
|
|
511
|
-
if (
|
|
512
|
-
if (
|
|
518
|
+
if (D.length > 0) {
|
|
519
|
+
if (S) {
|
|
513
520
|
for (const b of Y)
|
|
514
521
|
if (p.includes(b)) {
|
|
515
|
-
const
|
|
516
|
-
r.getModifierState(
|
|
522
|
+
const $ = b.charAt(0).toUpperCase() + b.slice(1);
|
|
523
|
+
r.getModifierState($) && y(r);
|
|
517
524
|
}
|
|
518
525
|
}
|
|
519
526
|
} else
|
|
520
|
-
|
|
527
|
+
S || y(r);
|
|
521
528
|
}
|
|
522
529
|
}
|
|
523
530
|
}, a = [];
|
|
@@ -525,8 +532,8 @@ function ft(e) {
|
|
|
525
532
|
for (const s of e) {
|
|
526
533
|
const r = t(s), c = o(s), u = l(s), d = r ? [r] : c;
|
|
527
534
|
for (const f of d) {
|
|
528
|
-
const { focused: p } = rt(v(f)), y = U(p, (
|
|
529
|
-
|
|
535
|
+
const { focused: p } = rt(v(f)), y = U(p, (D) => {
|
|
536
|
+
D ? f.addEventListener("keydown", u) : f.removeEventListener("keydown", u);
|
|
530
537
|
});
|
|
531
538
|
a.push(y);
|
|
532
539
|
}
|
|
@@ -551,7 +558,7 @@ const mt = {
|
|
|
551
558
|
},
|
|
552
559
|
emits: ["update:modelValue"],
|
|
553
560
|
setup(e) {
|
|
554
|
-
const t =
|
|
561
|
+
const t = x(e, "modelValue"), n = v(new Date(t.value)), o = v(n.value.getMonth()), l = v(n.value.getFullYear()), a = v([]), s = ce("datepicker");
|
|
555
562
|
z(async () => {
|
|
556
563
|
r(), await Ae();
|
|
557
564
|
const g = document.getElementsByClassName("selectedDate");
|
|
@@ -577,9 +584,9 @@ const mt = {
|
|
|
577
584
|
const _ = /* @__PURE__ */ new Date();
|
|
578
585
|
if (o.value === _.getMonth())
|
|
579
586
|
return _.toDateString() === new Date(g).toDateString();
|
|
580
|
-
}, y = (g) => new Date(g).toDateString() === new Date(n.value).toDateString(),
|
|
587
|
+
}, y = (g) => new Date(g).toDateString() === new Date(n.value).toDateString(), D = (g, _) => (g - 1) * re + _, S = (g, _) => a.value[D(g, _)], b = (g) => {
|
|
581
588
|
t.value = n.value = new Date(a.value[g]);
|
|
582
|
-
},
|
|
589
|
+
}, $ = V(() => new Date(l.value, o.value, 1).toLocaleDateString(void 0, {
|
|
583
590
|
year: "numeric",
|
|
584
591
|
month: "long"
|
|
585
592
|
}));
|
|
@@ -609,7 +616,7 @@ const mt = {
|
|
|
609
616
|
onClick: d,
|
|
610
617
|
tabindex: -1
|
|
611
618
|
}, "<"),
|
|
612
|
-
i("th", pt, k(
|
|
619
|
+
i("th", pt, k($.value), 1),
|
|
613
620
|
i("td", {
|
|
614
621
|
id: "next-month-btn",
|
|
615
622
|
onClick: f,
|
|
@@ -629,17 +636,17 @@ const mt = {
|
|
|
629
636
|
(m(), h(B, null, q(re, (L) => i("td", {
|
|
630
637
|
ref_for: !0,
|
|
631
638
|
ref: "celldate",
|
|
632
|
-
key:
|
|
639
|
+
key: D(M, L),
|
|
633
640
|
contenteditable: !1,
|
|
634
641
|
spellcheck: !1,
|
|
635
642
|
tabindex: 0,
|
|
636
|
-
onClick: Me((he) => b(
|
|
637
|
-
onKeydown: G((he) => b(
|
|
643
|
+
onClick: Me((he) => b(D(M, L)), ["prevent", "stop"]),
|
|
644
|
+
onKeydown: G((he) => b(D(M, L)), ["enter"]),
|
|
638
645
|
class: K({
|
|
639
|
-
todaysDate: p(
|
|
640
|
-
selectedDate: y(
|
|
646
|
+
todaysDate: p(S(M, L)),
|
|
647
|
+
selectedDate: y(S(M, L))
|
|
641
648
|
})
|
|
642
|
-
}, k(new Date(
|
|
649
|
+
}, k(new Date(S(M, L)).getDate()), 43, vt)), 64))
|
|
643
650
|
])), 64))
|
|
644
651
|
])
|
|
645
652
|
])
|
|
@@ -717,12 +724,12 @@ const mt = {
|
|
|
717
724
|
}, null, 8, ["collapsed"])) : j("", !0)
|
|
718
725
|
], 32),
|
|
719
726
|
Te(a.$slots, "default", { collapsed: t.value }, () => [
|
|
720
|
-
|
|
727
|
+
w(Se(ge, {
|
|
721
728
|
modelValue: o.value,
|
|
722
729
|
"onUpdate:modelValue": s[0] || (s[0] = (r) => o.value = r),
|
|
723
730
|
data: n.value
|
|
724
731
|
}, null, 8, ["modelValue", "data"]), [
|
|
725
|
-
[
|
|
732
|
+
[F, !t.value]
|
|
726
733
|
])
|
|
727
734
|
], !0)
|
|
728
735
|
]));
|
|
@@ -749,13 +756,13 @@ function ie() {
|
|
|
749
756
|
}
|
|
750
757
|
const Et = typeof window < "u" && typeof document < "u";
|
|
751
758
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
752
|
-
const Ct = (e, t) => Object.prototype.hasOwnProperty.call(e, t), Tt = Et ? window.document : void 0,
|
|
759
|
+
const Ct = (e, t) => Object.prototype.hasOwnProperty.call(e, t), Tt = Et ? window.document : void 0, St = {
|
|
753
760
|
multiple: !0,
|
|
754
761
|
accept: "*",
|
|
755
762
|
reset: !1,
|
|
756
763
|
directory: !1
|
|
757
764
|
};
|
|
758
|
-
function
|
|
765
|
+
function $t(e = {}) {
|
|
759
766
|
const {
|
|
760
767
|
document: t = Tt
|
|
761
768
|
} = e, n = v(null), { on: o, trigger: l } = ie(), { on: a, trigger: s } = ie();
|
|
@@ -772,14 +779,14 @@ function St(e = {}) {
|
|
|
772
779
|
if (!r)
|
|
773
780
|
return;
|
|
774
781
|
const f = {
|
|
775
|
-
|
|
782
|
+
...St,
|
|
776
783
|
...e,
|
|
777
784
|
...d
|
|
778
785
|
};
|
|
779
786
|
r.multiple = f.multiple, r.accept = f.accept, r.webkitdirectory = f.directory, Ct(f, "capture") && (r.capture = f.capture), f.reset && c(), r.click();
|
|
780
787
|
};
|
|
781
788
|
return {
|
|
782
|
-
files:
|
|
789
|
+
files: $e(n),
|
|
783
790
|
open: u,
|
|
784
791
|
reset: c,
|
|
785
792
|
onCancel: a,
|
|
@@ -795,7 +802,7 @@ const Lt = { class: "aform_form-element aform_file-attach aform__grid--full" },
|
|
|
795
802
|
label: {}
|
|
796
803
|
},
|
|
797
804
|
setup(e) {
|
|
798
|
-
const { files: t, open: n, reset: o, onChange: l } =
|
|
805
|
+
const { files: t, open: n, reset: o, onChange: l } = $t(), a = V(() => `${t.value.length} ${t.value.length === 1 ? "file" : "files"}`);
|
|
799
806
|
return l((s) => s), (s, r) => (m(), h("div", Lt, [
|
|
800
807
|
I(t) ? (m(), h("div", Vt, [
|
|
801
808
|
i("p", null, [
|
|
@@ -819,7 +826,7 @@ const Lt = { class: "aform_form-element aform_file-attach aform__grid--full" },
|
|
|
819
826
|
}, "Reset", 8, It)
|
|
820
827
|
]));
|
|
821
828
|
}
|
|
822
|
-
}), Pt = /* @__PURE__ */ E(Ht, [["__scopeId", "data-v-0b3a11cc"]]), xt = { class: "aform_form-element" }, Ft = ["id", "disabled", "required"], Bt = ["for"], qt = ["innerHTML"],
|
|
829
|
+
}), Pt = /* @__PURE__ */ E(Ht, [["__scopeId", "data-v-0b3a11cc"]]), xt = { class: "aform_form-element" }, Ft = ["id", "disabled", "required"], Bt = ["for"], qt = ["innerHTML"], Ot = /* @__PURE__ */ A({
|
|
823
830
|
__name: "ANumericInput",
|
|
824
831
|
props: /* @__PURE__ */ H({
|
|
825
832
|
label: {},
|
|
@@ -834,9 +841,9 @@ const Lt = { class: "aform_form-element aform_file-attach aform__grid--full" },
|
|
|
834
841
|
}),
|
|
835
842
|
emits: ["update:modelValue"],
|
|
836
843
|
setup(e) {
|
|
837
|
-
const t =
|
|
844
|
+
const t = x(e, "modelValue");
|
|
838
845
|
return (n, o) => (m(), h("div", xt, [
|
|
839
|
-
|
|
846
|
+
w(i("input", {
|
|
840
847
|
class: "aform_input-field",
|
|
841
848
|
"onUpdate:modelValue": o[0] || (o[0] = (l) => t.value = l),
|
|
842
849
|
type: "number",
|
|
@@ -844,17 +851,17 @@ const Lt = { class: "aform_form-element aform_file-attach aform__grid--full" },
|
|
|
844
851
|
disabled: n.readonly,
|
|
845
852
|
required: n.required
|
|
846
853
|
}, null, 8, Ft), [
|
|
847
|
-
[
|
|
854
|
+
[P, t.value]
|
|
848
855
|
]),
|
|
849
856
|
i("label", {
|
|
850
857
|
class: "aform_field-label",
|
|
851
858
|
for: n.uuid
|
|
852
859
|
}, k(n.label), 9, Bt),
|
|
853
|
-
|
|
860
|
+
w(i("p", {
|
|
854
861
|
class: "aform_error",
|
|
855
862
|
innerHTML: n.validation.errorMessage
|
|
856
863
|
}, null, 8, qt), [
|
|
857
|
-
[
|
|
864
|
+
[F, n.validation.errorMessage]
|
|
858
865
|
])
|
|
859
866
|
]));
|
|
860
867
|
}
|
|
@@ -866,7 +873,7 @@ const Lt = { class: "aform_form-element aform_file-attach aform__grid--full" },
|
|
|
866
873
|
phone: "(###) ### - ####",
|
|
867
874
|
card: "#### #### #### ####"
|
|
868
875
|
};
|
|
869
|
-
function
|
|
876
|
+
function Rt(e) {
|
|
870
877
|
try {
|
|
871
878
|
return Function(`"use strict";return (${e})`)();
|
|
872
879
|
} catch {
|
|
@@ -876,7 +883,7 @@ function Ut(e) {
|
|
|
876
883
|
var n;
|
|
877
884
|
let t = e.value;
|
|
878
885
|
if (t) {
|
|
879
|
-
const o =
|
|
886
|
+
const o = Rt(t);
|
|
880
887
|
if (o) {
|
|
881
888
|
const l = e.instance.locale;
|
|
882
889
|
t = o(l);
|
|
@@ -930,9 +937,9 @@ const Kt = { class: "aform_form-element" }, zt = ["id", "disabled", "maxlength",
|
|
|
930
937
|
}),
|
|
931
938
|
emits: ["update:modelValue"],
|
|
932
939
|
setup(e) {
|
|
933
|
-
const t = v(!0), n =
|
|
940
|
+
const t = v(!0), n = x(e, "modelValue");
|
|
934
941
|
return (o, l) => (m(), h("div", Kt, [
|
|
935
|
-
|
|
942
|
+
w(i("input", {
|
|
936
943
|
class: "aform_input-field",
|
|
937
944
|
"onUpdate:modelValue": l[0] || (l[0] = (a) => n.value = a),
|
|
938
945
|
id: o.uuid,
|
|
@@ -940,18 +947,18 @@ const Kt = { class: "aform_form-element" }, zt = ["id", "disabled", "maxlength",
|
|
|
940
947
|
maxlength: o.mask ? t.value && o.mask.length : void 0,
|
|
941
948
|
required: o.required
|
|
942
949
|
}, null, 8, zt), [
|
|
943
|
-
[
|
|
950
|
+
[P, n.value],
|
|
944
951
|
[I(Gt), o.mask]
|
|
945
952
|
]),
|
|
946
953
|
i("label", {
|
|
947
954
|
class: "aform_field-label",
|
|
948
955
|
for: o.uuid
|
|
949
956
|
}, k(o.label), 9, Nt),
|
|
950
|
-
|
|
957
|
+
w(i("p", {
|
|
951
958
|
class: "aform_error",
|
|
952
959
|
innerHTML: o.validation.errorMessage
|
|
953
960
|
}, null, 8, jt), [
|
|
954
|
-
[
|
|
961
|
+
[F, o.validation.errorMessage]
|
|
955
962
|
])
|
|
956
963
|
]));
|
|
957
964
|
}
|
|
@@ -989,7 +996,7 @@ const Kt = { class: "aform_form-element" }, zt = ["id", "disabled", "maxlength",
|
|
|
989
996
|
for: "email",
|
|
990
997
|
class: "aform_field-label"
|
|
991
998
|
}, "Email", -1)),
|
|
992
|
-
|
|
999
|
+
w(i("input", {
|
|
993
1000
|
id: "email",
|
|
994
1001
|
class: "aform_input-field",
|
|
995
1002
|
name: "email",
|
|
@@ -1001,7 +1008,7 @@ const Kt = { class: "aform_form-element" }, zt = ["id", "disabled", "maxlength",
|
|
|
1001
1008
|
"auto-correct": "off",
|
|
1002
1009
|
disabled: a.value
|
|
1003
1010
|
}, null, 8, ln), [
|
|
1004
|
-
[
|
|
1011
|
+
[P, o.value]
|
|
1005
1012
|
])
|
|
1006
1013
|
]),
|
|
1007
1014
|
i("div", an, [
|
|
@@ -1010,7 +1017,7 @@ const Kt = { class: "aform_form-element" }, zt = ["id", "disabled", "maxlength",
|
|
|
1010
1017
|
for: "password",
|
|
1011
1018
|
class: "aform_field-label"
|
|
1012
1019
|
}, "Password", -1)),
|
|
1013
|
-
|
|
1020
|
+
w(i("input", {
|
|
1014
1021
|
id: "password",
|
|
1015
1022
|
class: "aform_input-field",
|
|
1016
1023
|
name: "password",
|
|
@@ -1018,7 +1025,7 @@ const Kt = { class: "aform_form-element" }, zt = ["id", "disabled", "maxlength",
|
|
|
1018
1025
|
"onUpdate:modelValue": u[1] || (u[1] = (d) => l.value = d),
|
|
1019
1026
|
disabled: a.value
|
|
1020
1027
|
}, null, 8, sn), [
|
|
1021
|
-
[
|
|
1028
|
+
[P, l.value]
|
|
1022
1029
|
])
|
|
1023
1030
|
]),
|
|
1024
1031
|
i("button", {
|
|
@@ -1040,7 +1047,7 @@ const Kt = { class: "aform_form-element" }, zt = ["id", "disabled", "maxlength",
|
|
|
1040
1047
|
}
|
|
1041
1048
|
}), fn = /* @__PURE__ */ E(cn, [["__scopeId", "data-v-6cbd3add"]]);
|
|
1042
1049
|
function mn(e) {
|
|
1043
|
-
e.component("ACheckbox", Fe), e.component("ACombobox", Be), e.component("ADate", We), e.component("ADropdown", je), e.component("ADatePicker", yt), e.component("AFieldset", At), e.component("AFileAttach", Pt), e.component("AForm", ge), e.component("ANumericInput",
|
|
1050
|
+
e.component("ACheckbox", Fe), e.component("ACombobox", Be), e.component("ADate", We), e.component("ADropdown", je), e.component("ADatePicker", yt), e.component("AFieldset", At), e.component("AFileAttach", Pt), e.component("AForm", ge), e.component("ANumericInput", Ot), e.component("ATextInput", Jt);
|
|
1044
1051
|
}
|
|
1045
1052
|
export {
|
|
1046
1053
|
Fe as ACheckbox,
|
|
@@ -1051,7 +1058,7 @@ export {
|
|
|
1051
1058
|
At as AFieldset,
|
|
1052
1059
|
Pt as AFileAttach,
|
|
1053
1060
|
ge as AForm,
|
|
1054
|
-
|
|
1061
|
+
Ot as ANumericInput,
|
|
1055
1062
|
Jt as ATextInput,
|
|
1056
1063
|
fn as Login,
|
|
1057
1064
|
mn as install
|