@leaflink/stash 53.4.7 → 53.4.8
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/AppSidebar.js +43 -41
- package/dist/AppSidebar.js.map +1 -1
- package/dist/Modal.js +33 -31
- package/dist/Modal.js.map +1 -1
- package/dist/Modals.js +30 -26
- package/dist/Modals.js.map +1 -1
- package/dist/SearchBar.js +27 -25
- package/dist/SearchBar.js.map +1 -1
- package/dist/Select.js +22 -20
- package/dist/Select.js.map +1 -1
- package/dist/ThumbnailGroup.js +24 -22
- package/dist/ThumbnailGroup.js.map +1 -1
- package/dist/Timeline.js +15 -13
- package/dist/Timeline.js.map +1 -1
- package/dist/components.css +1 -1
- package/dist/useValidation.d.ts +11 -1
- package/dist/useValidation.js +240 -198
- package/dist/useValidation.js.map +1 -1
- package/package.json +1 -2
package/dist/useValidation.d.ts
CHANGED
|
@@ -92,7 +92,7 @@ export default useValidation;
|
|
|
92
92
|
* The inputs for useValidation
|
|
93
93
|
*/
|
|
94
94
|
export declare interface UseValidationArgs<Values extends object> {
|
|
95
|
-
rules: ValidationRules<Values>;
|
|
95
|
+
rules: MaybeRefOrGetter<ValidationRules<Values> | ValidationRulesDeep>;
|
|
96
96
|
values: MaybeRefOrGetter<{
|
|
97
97
|
[Property in keyof Values]: Values[Property];
|
|
98
98
|
}>;
|
|
@@ -236,6 +236,16 @@ export declare type ValidationRules<Values extends object> = {
|
|
|
236
236
|
[Property in keyof Values]: ValidationRule<Values[Property]>[];
|
|
237
237
|
};
|
|
238
238
|
|
|
239
|
+
/**
|
|
240
|
+
* Nested rules tree: each leaf key maps to `ValidationRule[]`. Use for nested objects or arrays of
|
|
241
|
+
* per-row rule objects (e.g. `terpenes: [{ name: [...], amount: [...] }]`). Inline rule objects
|
|
242
|
+
* should use `validator(value: unknown)` (then narrow) so they match `ValidationRule<unknown>`;
|
|
243
|
+
* you do not need to import this type when `useValidation` can infer `values`.
|
|
244
|
+
*/
|
|
245
|
+
export declare interface ValidationRulesDeep {
|
|
246
|
+
[key: string]: ValidationRule<unknown>[] | ValidationRulesDeep | ValidationRulesDeep[];
|
|
247
|
+
}
|
|
248
|
+
|
|
239
249
|
/**
|
|
240
250
|
* A function that returns `true` if the received value is valid and `false` if invalid.
|
|
241
251
|
*/
|
package/dist/useValidation.js
CHANGED
|
@@ -1,290 +1,332 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { toValue as
|
|
4
|
-
import { DECIMAL_PRECISION as
|
|
5
|
-
import { t as
|
|
6
|
-
import { i as
|
|
7
|
-
import
|
|
8
|
-
function
|
|
9
|
-
|
|
1
|
+
import k from "lodash-es/debounce";
|
|
2
|
+
import V from "lodash-es/get";
|
|
3
|
+
import { toValue as u, ref as A, reactive as R, computed as v, watch as j, effectScope as U, nextTick as M, readonly as w } from "vue";
|
|
4
|
+
import { DECIMAL_PRECISION as _, DEBOUNCE as B } from "./constants.js";
|
|
5
|
+
import { t as b } from "./locale.js";
|
|
6
|
+
import { i as p } from "./isDefined-DzVx0B6k.js";
|
|
7
|
+
import P from "lodash-es/round";
|
|
8
|
+
function W(e) {
|
|
9
|
+
const t = e.replace(/^\//, ""), r = "data/attributes/";
|
|
10
|
+
if (t.startsWith(r))
|
|
11
|
+
return t.slice(r.length).split("/").filter(Boolean).join(".");
|
|
12
|
+
const s = t.split("/").filter(Boolean);
|
|
13
|
+
return s.length ? s.join(".") : e;
|
|
10
14
|
}
|
|
11
|
-
function
|
|
12
|
-
return t;
|
|
13
|
-
}
|
|
14
|
-
function C(t, e) {
|
|
15
|
-
e = e || {};
|
|
16
|
-
const r = e.delimiter || ".", i = e.maxDepth, a = e.transformKey || M, u = {};
|
|
17
|
-
function m(E, S, d) {
|
|
18
|
-
d = d || 1, Object.keys(E).forEach(function(x) {
|
|
19
|
-
const l = E[x], o = e.safe && Array.isArray(l), g = Object.prototype.toString.call(l), N = D(l), p = g === "[object Object]" || g === "[object Array]", n = S ? S + r + a(x) : a(x);
|
|
20
|
-
if (!o && !N && p && Object.keys(l).length && (!e.maxDepth || d < i))
|
|
21
|
-
return m(l, n, d + 1);
|
|
22
|
-
u[n] = l;
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
return m(t), u;
|
|
26
|
-
}
|
|
27
|
-
function k(t) {
|
|
28
|
-
const e = t.replace(/^\//, ""), r = "data/attributes/";
|
|
29
|
-
if (e.startsWith(r))
|
|
30
|
-
return e.slice(r.length).split("/").filter(Boolean).join(".");
|
|
31
|
-
const i = e.split("/").filter(Boolean);
|
|
32
|
-
return i[i.length - 1] || t;
|
|
33
|
-
}
|
|
34
|
-
function U(t) {
|
|
15
|
+
function z(e) {
|
|
35
16
|
var r;
|
|
36
|
-
const
|
|
37
|
-
for (const
|
|
38
|
-
const
|
|
39
|
-
if (!
|
|
17
|
+
const t = {};
|
|
18
|
+
for (const s of e) {
|
|
19
|
+
const i = (r = s.source) == null ? void 0 : r.pointer;
|
|
20
|
+
if (!i)
|
|
40
21
|
continue;
|
|
41
|
-
const
|
|
42
|
-
if (!
|
|
22
|
+
const a = s.detail || s.title || "";
|
|
23
|
+
if (!a)
|
|
43
24
|
continue;
|
|
44
|
-
const
|
|
45
|
-
|
|
25
|
+
const g = W(i);
|
|
26
|
+
t[g] = a;
|
|
46
27
|
}
|
|
47
|
-
return
|
|
28
|
+
return t;
|
|
48
29
|
}
|
|
49
|
-
function
|
|
30
|
+
function ne(e = {}) {
|
|
50
31
|
return {
|
|
51
32
|
name: "email",
|
|
52
|
-
validator(
|
|
53
|
-
return !
|
|
33
|
+
validator(t) {
|
|
34
|
+
return !p(t) || typeof t == "string" && /^\S+@\S+\.\S+$/.test(t);
|
|
54
35
|
},
|
|
55
|
-
message:
|
|
36
|
+
message: e.message || b("ll.validation.email")
|
|
56
37
|
};
|
|
57
38
|
}
|
|
58
|
-
function
|
|
39
|
+
function re(e) {
|
|
59
40
|
return {
|
|
60
41
|
name: "maxLength",
|
|
61
|
-
validator(
|
|
62
|
-
const r =
|
|
63
|
-
if (!
|
|
42
|
+
validator(t) {
|
|
43
|
+
const r = u(e.max), s = u(t);
|
|
44
|
+
if (!p(s))
|
|
64
45
|
return !0;
|
|
65
|
-
let
|
|
66
|
-
return
|
|
46
|
+
let i = String(s);
|
|
47
|
+
return e.trim && (i = i.trim()), i.length <= r;
|
|
67
48
|
},
|
|
68
|
-
message:
|
|
49
|
+
message: e.message || (() => b("ll.validation.maxLength", { max: String(u(e.max)) }))
|
|
69
50
|
};
|
|
70
51
|
}
|
|
71
|
-
function
|
|
52
|
+
function se(e) {
|
|
72
53
|
return {
|
|
73
54
|
name: "maxValue",
|
|
74
|
-
validator(
|
|
75
|
-
const r =
|
|
76
|
-
return !
|
|
55
|
+
validator(t) {
|
|
56
|
+
const r = u(e.max);
|
|
57
|
+
return !p(t) || Number(t) <= r;
|
|
77
58
|
},
|
|
78
|
-
message:
|
|
59
|
+
message: e.message || (() => b("ll.validation.maxValue", { max: String(u(e.max)) }))
|
|
79
60
|
};
|
|
80
61
|
}
|
|
81
|
-
function
|
|
62
|
+
function oe(e) {
|
|
82
63
|
return {
|
|
83
64
|
name: "minLength",
|
|
84
|
-
validator(
|
|
85
|
-
const r =
|
|
86
|
-
if (!
|
|
65
|
+
validator(t) {
|
|
66
|
+
const r = u(e.min), s = u(t);
|
|
67
|
+
if (!p(s))
|
|
87
68
|
return !0;
|
|
88
|
-
let
|
|
89
|
-
return
|
|
69
|
+
let i = String(s);
|
|
70
|
+
return e.trim && (i = i.trim()), i.length >= r;
|
|
90
71
|
},
|
|
91
|
-
message:
|
|
72
|
+
message: e.message || (() => b("ll.validation.minLength", { min: String(u(e.min)) }))
|
|
92
73
|
};
|
|
93
74
|
}
|
|
94
|
-
function
|
|
75
|
+
function ie(e) {
|
|
95
76
|
return {
|
|
96
77
|
name: "minValue",
|
|
97
|
-
validator(
|
|
98
|
-
const r =
|
|
99
|
-
return !
|
|
78
|
+
validator(t) {
|
|
79
|
+
const r = u(e.min);
|
|
80
|
+
return !p(t) || Number(t) >= r;
|
|
100
81
|
},
|
|
101
|
-
message:
|
|
82
|
+
message: e.message || (() => b("ll.validation.minValue", { min: String(u(e.min)) }))
|
|
102
83
|
};
|
|
103
84
|
}
|
|
104
|
-
function
|
|
85
|
+
function ae(e) {
|
|
105
86
|
return {
|
|
106
87
|
name: "pattern",
|
|
107
|
-
validator(
|
|
108
|
-
const r =
|
|
109
|
-
return !
|
|
88
|
+
validator(t) {
|
|
89
|
+
const r = u(t);
|
|
90
|
+
return !p(r) || e.regex.test(String(r));
|
|
110
91
|
},
|
|
111
92
|
message: () => {
|
|
112
|
-
if (typeof
|
|
93
|
+
if (typeof e.message != "string" || !e.message.trim())
|
|
113
94
|
throw new Error(
|
|
114
95
|
'The "pattern" ruleFactory requires a custom message informing the user of the required pattern.'
|
|
115
96
|
);
|
|
116
|
-
return
|
|
97
|
+
return e.message;
|
|
117
98
|
}
|
|
118
99
|
};
|
|
119
100
|
}
|
|
120
|
-
function
|
|
101
|
+
function ue(e = {}) {
|
|
121
102
|
return {
|
|
122
103
|
name: "positiveNumber",
|
|
123
|
-
validator(
|
|
124
|
-
return !
|
|
104
|
+
validator(t) {
|
|
105
|
+
return !p(t) || Number(t) > 0;
|
|
125
106
|
},
|
|
126
|
-
message:
|
|
107
|
+
message: e.message || b("ll.validation.positiveNumber")
|
|
127
108
|
};
|
|
128
109
|
}
|
|
129
|
-
function
|
|
110
|
+
function ce(e = {}) {
|
|
130
111
|
return {
|
|
131
112
|
name: "price",
|
|
132
|
-
validator(
|
|
133
|
-
const r = Number(
|
|
134
|
-
return !
|
|
113
|
+
validator(t) {
|
|
114
|
+
const r = Number(t);
|
|
115
|
+
return !p(t) || r !== 1 / 0 && r >= 0 && r === P(r, _.CURRENCY);
|
|
135
116
|
},
|
|
136
|
-
message:
|
|
117
|
+
message: e.message || b("ll.validation.price")
|
|
137
118
|
};
|
|
138
119
|
}
|
|
139
|
-
function
|
|
120
|
+
function le(e = {}) {
|
|
140
121
|
return {
|
|
141
122
|
name: "required",
|
|
142
|
-
validator(
|
|
143
|
-
return
|
|
123
|
+
validator(t) {
|
|
124
|
+
return p(typeof t == "string" ? t.trim() : t);
|
|
144
125
|
},
|
|
145
|
-
message:
|
|
126
|
+
message: e.message || b("ll.validation.required")
|
|
146
127
|
};
|
|
147
128
|
}
|
|
148
|
-
function
|
|
129
|
+
function me(e = {}) {
|
|
149
130
|
return {
|
|
150
131
|
name: "wholeNumber",
|
|
151
|
-
validator(
|
|
152
|
-
return !
|
|
132
|
+
validator(t) {
|
|
133
|
+
return !p(t) || Number.isInteger(Number(t)) && Number(t) >= 0;
|
|
153
134
|
},
|
|
154
|
-
message:
|
|
135
|
+
message: e.message || b("ll.validation.wholeNumber")
|
|
155
136
|
};
|
|
156
137
|
}
|
|
157
|
-
const
|
|
158
|
-
function
|
|
159
|
-
|
|
160
|
-
|
|
138
|
+
const J = "api";
|
|
139
|
+
function $(e) {
|
|
140
|
+
return typeof e != "object" || e === null || !("validator" in e) ? !1 : typeof Reflect.get(e, "validator") == "function";
|
|
141
|
+
}
|
|
142
|
+
function Y(e) {
|
|
143
|
+
return Array.isArray(e) && e.every($);
|
|
144
|
+
}
|
|
145
|
+
function I(e, t = "") {
|
|
146
|
+
if (e === null || typeof e != "object")
|
|
147
|
+
return [];
|
|
148
|
+
if (Array.isArray(e)) {
|
|
149
|
+
if (e.length === 0)
|
|
150
|
+
return t ? [t] : [];
|
|
151
|
+
const s = e[0];
|
|
152
|
+
if ($(s))
|
|
153
|
+
return t ? [t] : [];
|
|
154
|
+
const i = [];
|
|
155
|
+
for (let a = 0; a < e.length; a++) {
|
|
156
|
+
const g = t === "" ? String(a) : `${t}.${a}`;
|
|
157
|
+
i.push(...I(e[a], g));
|
|
158
|
+
}
|
|
159
|
+
return i;
|
|
160
|
+
}
|
|
161
|
+
const r = [];
|
|
162
|
+
for (const s of Object.keys(e)) {
|
|
163
|
+
const i = e[s], a = t === "" ? s : `${t}.${s}`;
|
|
164
|
+
r.push(...I(i, a));
|
|
165
|
+
}
|
|
166
|
+
return r;
|
|
167
|
+
}
|
|
168
|
+
function fe({
|
|
169
|
+
rules: e,
|
|
170
|
+
values: t
|
|
161
171
|
}) {
|
|
162
|
-
const r =
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
), n
|
|
175
|
-
|
|
176
|
-
|
|
172
|
+
const r = A({}), s = R({}), i = /* @__PURE__ */ new Map(), a = v(() => I(u(e)).sort());
|
|
173
|
+
function g(n) {
|
|
174
|
+
const o = i.get(n);
|
|
175
|
+
if (o && (o.cancelDebounced(), o.stop(), o.stopFieldScope(), i.delete(n)), s[n] && delete s[n], r.value[n]) {
|
|
176
|
+
const m = { ...r.value };
|
|
177
|
+
delete m[n], r.value = m;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
function F(n) {
|
|
181
|
+
if (s[n])
|
|
182
|
+
return;
|
|
183
|
+
const o = A(V(u(t), n)), m = () => {
|
|
184
|
+
o.value = V(u(t), n);
|
|
185
|
+
}, f = k(() => {
|
|
186
|
+
m();
|
|
187
|
+
}, B.FAST), d = j(
|
|
188
|
+
() => V(u(t), n),
|
|
189
|
+
() => {
|
|
190
|
+
f();
|
|
191
|
+
}
|
|
192
|
+
), h = U(), D = h.run(
|
|
193
|
+
() => G({
|
|
194
|
+
fieldName: n,
|
|
195
|
+
fieldValue: o,
|
|
177
196
|
flush: () => {
|
|
178
|
-
|
|
197
|
+
f.cancel(), m();
|
|
179
198
|
},
|
|
180
|
-
getApiError: () =>
|
|
181
|
-
|
|
182
|
-
|
|
199
|
+
getApiError: () => r.value[n] || "",
|
|
200
|
+
getRules: () => {
|
|
201
|
+
const N = V(u(e), n);
|
|
202
|
+
return Y(N) ? N : [];
|
|
203
|
+
}
|
|
204
|
+
})
|
|
205
|
+
);
|
|
206
|
+
if (!D) {
|
|
207
|
+
d(), f.cancel(), h.stop();
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
i.set(n, {
|
|
211
|
+
stop: d,
|
|
212
|
+
cancelDebounced: () => f.cancel(),
|
|
213
|
+
stopFieldScope: () => h.stop()
|
|
214
|
+
}), s[n] = D;
|
|
215
|
+
}
|
|
216
|
+
j(
|
|
217
|
+
a,
|
|
218
|
+
(n, o) => {
|
|
219
|
+
const m = o ?? [], f = new Set(n), d = new Set(m);
|
|
220
|
+
for (const h of m)
|
|
221
|
+
f.has(h) || g(h);
|
|
222
|
+
for (const h of n)
|
|
223
|
+
d.has(h) || F(h);
|
|
183
224
|
},
|
|
184
|
-
{}
|
|
185
|
-
)
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
225
|
+
{ immediate: !0 }
|
|
226
|
+
);
|
|
227
|
+
const y = v(() => Object.values(s)), S = v(() => y.value.some((n) => n.errors.length > 0)), T = v(() => y.value.some((n) => n.isTouched)), x = v(() => y.value.filter((n) => n.isDirty)), c = async function({ preventScroll: n } = {}) {
|
|
228
|
+
if (y.value.forEach((o) => {
|
|
229
|
+
o.setTouched(!1), o.setTouched(!0);
|
|
230
|
+
}), await M(), S.value && !n) {
|
|
231
|
+
const o = Object.entries(s).find(([, d]) => d.errorMessage), m = (o == null ? void 0 : o[0]) || "", f = document == null ? void 0 : document.querySelector(`[name="${m}"]`);
|
|
232
|
+
f && f.scrollIntoView({ behavior: "smooth" });
|
|
191
233
|
}
|
|
192
|
-
return !
|
|
193
|
-
}, x = function(n) {
|
|
194
|
-
var s;
|
|
195
|
-
return ((s = a[n]) == null ? void 0 : s.errorMessage) || "";
|
|
234
|
+
return !S.value;
|
|
196
235
|
}, l = function(n) {
|
|
197
|
-
|
|
236
|
+
var o;
|
|
237
|
+
return ((o = s[n]) == null ? void 0 : o.errorMessage) || "";
|
|
238
|
+
}, L = function(n) {
|
|
239
|
+
if (!s[n])
|
|
198
240
|
throw new Error(`In touch: fieldName "${n}" does not exist in the validation fields.`);
|
|
199
|
-
|
|
200
|
-
},
|
|
201
|
-
await
|
|
241
|
+
s[n].setTouched();
|
|
242
|
+
}, E = async function() {
|
|
243
|
+
await M(), y.value.forEach((n) => {
|
|
202
244
|
n.setTouched(!1);
|
|
203
245
|
});
|
|
204
|
-
},
|
|
205
|
-
|
|
206
|
-
|
|
246
|
+
}, q = function(n) {
|
|
247
|
+
y.value.forEach((o) => {
|
|
248
|
+
o.setInitialValue(V(n, o.name));
|
|
207
249
|
});
|
|
208
250
|
};
|
|
209
|
-
function
|
|
210
|
-
const
|
|
211
|
-
for (const
|
|
212
|
-
|
|
213
|
-
|
|
251
|
+
function C(n) {
|
|
252
|
+
const o = z(n), m = a.value, f = {};
|
|
253
|
+
for (const d of m)
|
|
254
|
+
o[d] && (f[d] = o[d]);
|
|
255
|
+
r.value = f;
|
|
214
256
|
}
|
|
215
|
-
function
|
|
257
|
+
function O(n) {
|
|
216
258
|
if (n) {
|
|
217
|
-
const
|
|
218
|
-
delete
|
|
259
|
+
const o = { ...r.value };
|
|
260
|
+
delete o[n], r.value = o;
|
|
219
261
|
} else
|
|
220
|
-
|
|
262
|
+
r.value = {};
|
|
221
263
|
}
|
|
222
|
-
return
|
|
223
|
-
validate:
|
|
224
|
-
getError:
|
|
225
|
-
touch:
|
|
226
|
-
setAllUntouched:
|
|
227
|
-
setInitialValues:
|
|
228
|
-
setApiErrors:
|
|
229
|
-
clearApiErrors:
|
|
230
|
-
fields:
|
|
231
|
-
dirtyFields:
|
|
232
|
-
hasErrors:
|
|
233
|
-
someTouched:
|
|
264
|
+
return R({
|
|
265
|
+
validate: c,
|
|
266
|
+
getError: l,
|
|
267
|
+
touch: L,
|
|
268
|
+
setAllUntouched: E,
|
|
269
|
+
setInitialValues: q,
|
|
270
|
+
setApiErrors: C,
|
|
271
|
+
clearApiErrors: O,
|
|
272
|
+
fields: s,
|
|
273
|
+
dirtyFields: x,
|
|
274
|
+
hasErrors: S,
|
|
275
|
+
someTouched: T
|
|
234
276
|
});
|
|
235
277
|
}
|
|
236
|
-
function
|
|
237
|
-
fieldName:
|
|
238
|
-
fieldValue:
|
|
239
|
-
|
|
240
|
-
flush:
|
|
241
|
-
getApiError:
|
|
278
|
+
function G({
|
|
279
|
+
fieldName: e,
|
|
280
|
+
fieldValue: t,
|
|
281
|
+
getRules: r,
|
|
282
|
+
flush: s,
|
|
283
|
+
getApiError: i
|
|
242
284
|
}) {
|
|
243
|
-
const
|
|
244
|
-
fieldName:
|
|
245
|
-
ruleName:
|
|
246
|
-
isValid:
|
|
247
|
-
message: typeof
|
|
248
|
-
})) : []),
|
|
249
|
-
const
|
|
250
|
-
ruleName:
|
|
251
|
-
message:
|
|
285
|
+
const a = A(t.value), g = A(!1), F = v(() => (t.value ?? "") !== (a.value ?? "")), y = v(() => g.value ? r().map((l) => ({
|
|
286
|
+
fieldName: e,
|
|
287
|
+
ruleName: l.name,
|
|
288
|
+
isValid: l.validator(t.value),
|
|
289
|
+
message: typeof l.message == "function" ? l.message(t.value) : l.message
|
|
290
|
+
})) : []), S = v(() => {
|
|
291
|
+
const c = i(), l = c !== "" ? [{ ruleName: J, message: c }] : [], L = y.value.filter((E) => !E.isValid).map((E) => ({
|
|
292
|
+
ruleName: E.ruleName,
|
|
293
|
+
message: E.message
|
|
252
294
|
}));
|
|
253
|
-
return [...
|
|
295
|
+
return [...l, ...L];
|
|
254
296
|
});
|
|
255
|
-
function
|
|
256
|
-
|
|
297
|
+
function T(c = !0) {
|
|
298
|
+
s(), g.value = c;
|
|
257
299
|
}
|
|
258
|
-
function
|
|
259
|
-
|
|
300
|
+
function x(c) {
|
|
301
|
+
a.value = c;
|
|
260
302
|
}
|
|
261
|
-
return
|
|
262
|
-
name:
|
|
263
|
-
currentValue: w(
|
|
264
|
-
initialValue: w(
|
|
265
|
-
isTouched: w(
|
|
266
|
-
isDirty: w(
|
|
303
|
+
return R({
|
|
304
|
+
name: e,
|
|
305
|
+
currentValue: w(t),
|
|
306
|
+
initialValue: w(a),
|
|
307
|
+
isTouched: w(g),
|
|
308
|
+
isDirty: w(F),
|
|
267
309
|
errorMessage: v(() => {
|
|
268
|
-
var
|
|
269
|
-
return ((
|
|
310
|
+
var c, l;
|
|
311
|
+
return ((l = (c = S.value) == null ? void 0 : c[0]) == null ? void 0 : l.message) || "";
|
|
270
312
|
}),
|
|
271
|
-
errors:
|
|
272
|
-
setInitialValue:
|
|
273
|
-
setTouched:
|
|
313
|
+
errors: S,
|
|
314
|
+
setInitialValue: x,
|
|
315
|
+
setTouched: T
|
|
274
316
|
});
|
|
275
317
|
}
|
|
276
318
|
export {
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
319
|
+
fe as default,
|
|
320
|
+
ne as email,
|
|
321
|
+
p as isDefined,
|
|
322
|
+
re as maxLength,
|
|
323
|
+
se as maxValue,
|
|
324
|
+
oe as minLength,
|
|
325
|
+
ie as minValue,
|
|
326
|
+
ae as pattern,
|
|
327
|
+
ue as positiveNumber,
|
|
328
|
+
ce as price,
|
|
329
|
+
le as required,
|
|
330
|
+
me as wholeNumber
|
|
289
331
|
};
|
|
290
332
|
//# sourceMappingURL=useValidation.js.map
|