ep-lib-ts 0.1.18 → 0.1.20
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/.vscode/extensions.json +3 -0
- package/dist/BgAudio-d9308f99.js +5 -0
- package/dist/DisplayBox-f17b28bc.js +5 -0
- package/dist/EpAlert-c5ccf377.js +5 -0
- package/dist/EpAudio-ee4175aa.js +5 -0
- package/dist/EpBadge-6fc0f5fc.js +5 -0
- package/dist/EpBarChart-d1bdc878.js +5 -0
- package/dist/EpBtn-010839a7.js +5 -0
- package/dist/EpCard-d67b77b2.js +5 -0
- package/dist/{EpDivider-ae523cf4.js → EpChip-fd468489.js} +1 -1
- package/dist/EpContentSlider-b1f27a7d.js +5 -0
- package/dist/EpDivider-ea7f1d1a.js +5 -0
- package/dist/EpEdu-74aed121.js +5 -0
- package/dist/EpFlex-232d7513.js +5 -0
- package/dist/EpHeader-1f6cca20.js +5 -0
- package/dist/{EpImg-ae604c7e.js → EpIcon-9dd2b039.js} +1 -1
- package/dist/EpIframe-a4082deb.js +5 -0
- package/dist/EpImg-7f4c35bd.js +5 -0
- package/dist/{EpInput-1b3e6753.js → EpInput-556ab6fe.js} +233 -233
- package/dist/EpLineChart-822ceecf.js +5 -0
- package/dist/EpLink-c2a1a872.js +5 -0
- package/dist/EpLinkVersion-2bac33d5.js +5 -0
- package/dist/EpModal-1b4d1ff9.js +5 -0
- package/dist/{EpNothing-008091ff.js → EpNothing-77b5a694.js} +2 -2
- package/dist/EpPieChart-ad8576ca.js +5 -0
- package/dist/EpQuestion-94aa29de.js +5 -0
- package/dist/EpQuote-adfe2a2b.js +5 -0
- package/dist/EpRadio-53f60b1a.js +5 -0
- package/dist/EpReading-747f0ce9.js +5 -0
- package/dist/EpResource-c6662e5a.js +5 -0
- package/dist/EpScope-494ffdec.js +5 -0
- package/dist/EpSection-bdad41e4.js +5 -0
- package/dist/{EpSelect-d53ffb08.js → EpSelect-1ffc465c.js} +4 -4
- package/dist/EpSoftware-2730a943.js +5 -0
- package/dist/EpSpinner-da2475b0.js +5 -0
- package/dist/EpSvg-a2ebcc93.js +5 -0
- package/dist/EpTable-0555285d.js +5 -0
- package/dist/EpTerm-87ed74e7.js +5 -0
- package/dist/EpText-7c29711c.js +5 -0
- package/dist/EpTimeLine-c85d470a.js +5 -0
- package/dist/EpVideo-fe865980.js +5 -0
- package/dist/EpVideoPanopto-f31cdb1e.js +5 -0
- package/dist/TextBloc-d81840e6.js +13 -0
- package/dist/components/medias/EpLink.vue.d.ts +10 -10
- package/dist/components/tools/TextBloc.vue.d.ts +9 -0
- package/dist/ep-lib-ts.js +5 -5
- package/dist/ep-lib-ts.umd.cjs +32 -32
- package/dist/{index-733017ed.js → index-5bd6e63c.js} +4402 -4412
- package/dist/style.css +1 -1
- package/package.json +3 -3
- package/src/components/basics/EpText.vue +22 -3
- package/src/components/medias/EpLink.vue +5 -5
- package/src/components/medias/EpLinkVersion.vue +1 -1
- package/src/components/signages/EpHeader.vue +2 -3
- package/src/components/tools/SvgFilter.vue +1 -1
- package/src/components/tools/TextBloc.vue +10 -0
- package/dist/BgAudio-95590047.js +0 -5
- package/dist/DisplayBox-d0f4000d.js +0 -5
- package/dist/EpAlert-a8f653c0.js +0 -5
- package/dist/EpAudio-481fe623.js +0 -5
- package/dist/EpBadge-29268823.js +0 -5
- package/dist/EpBarChart-161f527a.js +0 -5
- package/dist/EpBtn-e98b39ee.js +0 -5
- package/dist/EpCard-3158d566.js +0 -5
- package/dist/EpChip-28453834.js +0 -5
- package/dist/EpContentSlider-6808eabd.js +0 -5
- package/dist/EpEdu-5a5a8d65.js +0 -5
- package/dist/EpFlex-df30ecf6.js +0 -5
- package/dist/EpHeader-baf44e55.js +0 -5
- package/dist/EpIcon-323fadf6.js +0 -5
- package/dist/EpIframe-91ffea7c.js +0 -5
- package/dist/EpLineChart-0e1aa7f8.js +0 -5
- package/dist/EpLink-6ec8be2b.js +0 -5
- package/dist/EpLinkVersion-db575648.js +0 -5
- package/dist/EpModal-b345155c.js +0 -5
- package/dist/EpPieChart-5e9ec489.js +0 -5
- package/dist/EpQuestion-b99e2686.js +0 -5
- package/dist/EpQuote-5e9ca8fc.js +0 -5
- package/dist/EpRadio-594eb500.js +0 -5
- package/dist/EpReading-0493eba5.js +0 -5
- package/dist/EpResource-ab58e3c3.js +0 -5
- package/dist/EpScope-7a611613.js +0 -5
- package/dist/EpSection-540c888a.js +0 -5
- package/dist/EpSoftware-38b2ba7d.js +0 -5
- package/dist/EpSpinner-517e8088.js +0 -5
- package/dist/EpSvg-4cd82994.js +0 -5
- package/dist/EpTable-6842a2cd.js +0 -5
- package/dist/EpTerm-c1957d47.js +0 -5
- package/dist/EpText-47e0526b.js +0 -5
- package/dist/EpTimeLine-585820f9.js +0 -5
- package/dist/EpVideo-287e5d3c.js +0 -5
- package/dist/EpVideoPanopto-8e5ff3f3.js +0 -5
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import {
|
|
1
|
+
import { computed as N, toValue as V, unref as f, onMounted as qe, getCurrentInstance as z, watch as I, warn as Ye, provide as Xe, isRef as ue, onBeforeUnmount as Ze, inject as et, ref as re, reactive as tt, onUnmounted as rt, nextTick as nt, defineComponent as ot, toRefs as it, toRef as lt, openBlock as be, createElementBlock as ge, Fragment as at, createTextVNode as ye, toDisplayString as J, createElementVNode as P, createVNode as ut, withDirectives as st, vModelText as ct, createCommentVNode as dt } from "vue";
|
|
2
|
+
import { c as ft, u as vt } from "./index-5bd6e63c.js";
|
|
3
3
|
function pt() {
|
|
4
4
|
return Ee().__VUE_DEVTOOLS_GLOBAL_HOOK__;
|
|
5
5
|
}
|
|
6
6
|
function Ee() {
|
|
7
7
|
return typeof navigator < "u" && typeof window < "u" ? window : typeof global < "u" ? global : {};
|
|
8
8
|
}
|
|
9
|
-
const ht = typeof Proxy == "function",
|
|
10
|
-
let
|
|
9
|
+
const ht = typeof Proxy == "function", mt = "devtools-plugin:setup", bt = "plugin:settings:set";
|
|
10
|
+
let B, ne;
|
|
11
11
|
function gt() {
|
|
12
12
|
var e;
|
|
13
|
-
return
|
|
13
|
+
return B !== void 0 || (typeof window < "u" && window.performance ? (B = !0, ne = window.performance) : typeof global < "u" && (!((e = global.perf_hooks) === null || e === void 0) && e.performance) ? (B = !0, ne = global.perf_hooks.performance) : B = !1), B;
|
|
14
14
|
}
|
|
15
15
|
function yt() {
|
|
16
16
|
return gt() ? ne.now() : Date.now();
|
|
@@ -45,26 +45,26 @@ class _t {
|
|
|
45
45
|
now() {
|
|
46
46
|
return yt();
|
|
47
47
|
}
|
|
48
|
-
}, r && r.on(
|
|
48
|
+
}, r && r.on(bt, (i, u) => {
|
|
49
49
|
i === this.plugin.id && this.fallbacks.setSettings(u);
|
|
50
50
|
}), this.proxiedOn = new Proxy({}, {
|
|
51
|
-
get: (i, u) => this.target ? this.target.on[u] : (...
|
|
51
|
+
get: (i, u) => this.target ? this.target.on[u] : (...s) => {
|
|
52
52
|
this.onQueue.push({
|
|
53
53
|
method: u,
|
|
54
|
-
args:
|
|
54
|
+
args: s
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
57
|
}), this.proxiedTarget = new Proxy({}, {
|
|
58
|
-
get: (i, u) => this.target ? this.target[u] : u === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(u) ? (...
|
|
58
|
+
get: (i, u) => this.target ? this.target[u] : u === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(u) ? (...s) => (this.targetQueue.push({
|
|
59
59
|
method: u,
|
|
60
|
-
args:
|
|
60
|
+
args: s,
|
|
61
61
|
resolve: () => {
|
|
62
62
|
}
|
|
63
|
-
}), this.fallbacks[u](...
|
|
63
|
+
}), this.fallbacks[u](...s)) : (...s) => new Promise((d) => {
|
|
64
64
|
this.targetQueue.push({
|
|
65
65
|
method: u,
|
|
66
|
-
args:
|
|
67
|
-
resolve:
|
|
66
|
+
args: s,
|
|
67
|
+
resolve: d
|
|
68
68
|
});
|
|
69
69
|
})
|
|
70
70
|
});
|
|
@@ -80,7 +80,7 @@ class _t {
|
|
|
80
80
|
function Vt(e, t) {
|
|
81
81
|
const r = e, n = Ee(), o = pt(), l = ht && r.enableEarlyProxy;
|
|
82
82
|
if (o && (n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !l))
|
|
83
|
-
o.emit(
|
|
83
|
+
o.emit(mt, e, t);
|
|
84
84
|
else {
|
|
85
85
|
const i = l ? new _t(r, o) : null;
|
|
86
86
|
(n.__VUE_DEVTOOLS_PLUGINS__ = n.__VUE_DEVTOOLS_PLUGINS__ || []).push({
|
|
@@ -91,17 +91,17 @@ function Vt(e, t) {
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
/**
|
|
94
|
-
* vee-validate v4.11.
|
|
94
|
+
* vee-validate v4.11.3
|
|
95
95
|
* (c) 2023 Abdelrahman Awad
|
|
96
96
|
* @license MIT
|
|
97
97
|
*/
|
|
98
|
-
function
|
|
98
|
+
function F(e) {
|
|
99
99
|
return typeof e == "function";
|
|
100
100
|
}
|
|
101
101
|
function Ot(e) {
|
|
102
102
|
return e == null;
|
|
103
103
|
}
|
|
104
|
-
const
|
|
104
|
+
const D = (e) => e !== null && !!e && typeof e == "object" && !Array.isArray(e);
|
|
105
105
|
function Ne(e) {
|
|
106
106
|
return Number(e) >= 0;
|
|
107
107
|
}
|
|
@@ -129,19 +129,19 @@ function kt(e) {
|
|
|
129
129
|
}
|
|
130
130
|
const je = Symbol("vee-validate-form"), xt = Symbol("vee-validate-field-instance"), _e = Symbol("Default empty value"), Et = typeof window < "u";
|
|
131
131
|
function oe(e) {
|
|
132
|
-
return
|
|
132
|
+
return F(e) && !!e.__locatorRef;
|
|
133
133
|
}
|
|
134
134
|
function q(e) {
|
|
135
|
-
return !!e &&
|
|
135
|
+
return !!e && F(e.parse) && e.__type === "VVTypedSchema";
|
|
136
136
|
}
|
|
137
137
|
function ie(e) {
|
|
138
|
-
return !!e &&
|
|
138
|
+
return !!e && F(e.validate);
|
|
139
139
|
}
|
|
140
140
|
function Ce(e) {
|
|
141
141
|
return e === "checkbox" || e === "radio";
|
|
142
142
|
}
|
|
143
143
|
function Nt(e) {
|
|
144
|
-
return
|
|
144
|
+
return D(e) || Array.isArray(e);
|
|
145
145
|
}
|
|
146
146
|
function se(e) {
|
|
147
147
|
return /^\[.+\]$/i.test(e);
|
|
@@ -153,9 +153,9 @@ function Pe(e) {
|
|
|
153
153
|
return e.tagName === "SELECT";
|
|
154
154
|
}
|
|
155
155
|
function Ct(e) {
|
|
156
|
-
return e ? !!(typeof Event < "u" &&
|
|
156
|
+
return e ? !!(typeof Event < "u" && F(Event) && e instanceof Event || e && e.srcElement) : !1;
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function w(e, t) {
|
|
159
159
|
if (e === t)
|
|
160
160
|
return !0;
|
|
161
161
|
if (e && t && typeof e == "object" && typeof t == "object") {
|
|
@@ -166,7 +166,7 @@ function S(e, t) {
|
|
|
166
166
|
if (r = e.length, r != t.length)
|
|
167
167
|
return !1;
|
|
168
168
|
for (n = r; n-- !== 0; )
|
|
169
|
-
if (!
|
|
169
|
+
if (!w(e[n], t[n]))
|
|
170
170
|
return !1;
|
|
171
171
|
return !0;
|
|
172
172
|
}
|
|
@@ -177,7 +177,7 @@ function S(e, t) {
|
|
|
177
177
|
if (!t.has(n[0]))
|
|
178
178
|
return !1;
|
|
179
179
|
for (n of e.entries())
|
|
180
|
-
if (!
|
|
180
|
+
if (!w(n[1], t.get(n[0])))
|
|
181
181
|
return !1;
|
|
182
182
|
return !0;
|
|
183
183
|
}
|
|
@@ -207,7 +207,7 @@ function S(e, t) {
|
|
|
207
207
|
return e.toString() === t.toString();
|
|
208
208
|
for (o = Object.keys(e), r = o.length, n = r; n-- !== 0; ) {
|
|
209
209
|
var l = o[n];
|
|
210
|
-
if (!
|
|
210
|
+
if (!w(e[l], t[l]))
|
|
211
211
|
return !1;
|
|
212
212
|
}
|
|
213
213
|
return !0;
|
|
@@ -218,17 +218,17 @@ function Ve(e) {
|
|
|
218
218
|
return Et ? e instanceof File : !1;
|
|
219
219
|
}
|
|
220
220
|
function Oe(e, t, r) {
|
|
221
|
-
typeof r.value == "object" && (r.value =
|
|
221
|
+
typeof r.value == "object" && (r.value = T(r.value)), !r.enumerable || r.get || r.set || !r.configurable || !r.writable || t === "__proto__" ? Object.defineProperty(e, t, r) : e[t] = r.value;
|
|
222
222
|
}
|
|
223
|
-
function
|
|
223
|
+
function T(e) {
|
|
224
224
|
if (typeof e != "object")
|
|
225
225
|
return e;
|
|
226
226
|
var t = 0, r, n, o, l = Object.prototype.toString.call(e);
|
|
227
227
|
if (l === "[object Object]" ? o = Object.create(e.__proto__ || null) : l === "[object Array]" ? o = Array(e.length) : l === "[object Set]" ? (o = /* @__PURE__ */ new Set(), e.forEach(function(i) {
|
|
228
|
-
o.add(
|
|
228
|
+
o.add(T(i));
|
|
229
229
|
})) : l === "[object Map]" ? (o = /* @__PURE__ */ new Map(), e.forEach(function(i, u) {
|
|
230
|
-
o.set(
|
|
231
|
-
})) : l === "[object Date]" ? o = /* @__PURE__ */ new Date(+e) : l === "[object RegExp]" ? o = new RegExp(e.source, e.flags) : l === "[object DataView]" ? o = new e.constructor(
|
|
230
|
+
o.set(T(u), T(i));
|
|
231
|
+
})) : l === "[object Date]" ? o = /* @__PURE__ */ new Date(+e) : l === "[object RegExp]" ? o = new RegExp(e.source, e.flags) : l === "[object DataView]" ? o = new e.constructor(T(e.buffer)) : l === "[object ArrayBuffer]" ? o = e.slice(0) : l.slice(-6) === "Array]" && (o = new e.constructor(e)), o) {
|
|
232
232
|
for (n = Object.getOwnPropertySymbols(e); t < n.length; t++)
|
|
233
233
|
Oe(o, n[t], Object.getOwnPropertyDescriptor(e, n[t]));
|
|
234
234
|
for (t = 0, n = Object.getOwnPropertyNames(e); t < n.length; t++)
|
|
@@ -239,7 +239,7 @@ function I(e) {
|
|
|
239
239
|
function Ie(e) {
|
|
240
240
|
return se(e) ? e.replace(/\[|\]/gi, "") : e;
|
|
241
241
|
}
|
|
242
|
-
function
|
|
242
|
+
function G(e, t, r) {
|
|
243
243
|
return e ? se(t) ? e[Ie(t)] : (t || "").split(/\.|\[(\d+)\]/).filter(Boolean).reduce((o, l) => Nt(o) && l in o ? o[l] : r, e) : r;
|
|
244
244
|
}
|
|
245
245
|
function Pt(e, t, r) {
|
|
@@ -261,15 +261,15 @@ function Te(e) {
|
|
|
261
261
|
return Object.keys(e);
|
|
262
262
|
}
|
|
263
263
|
function Fe(e, t = void 0) {
|
|
264
|
-
const r =
|
|
264
|
+
const r = z();
|
|
265
265
|
return (r == null ? void 0 : r.provides[e]) || et(e, t);
|
|
266
266
|
}
|
|
267
267
|
function Se(e, t, r) {
|
|
268
268
|
if (Array.isArray(e)) {
|
|
269
|
-
const n = [...e], o = n.findIndex((l) =>
|
|
269
|
+
const n = [...e], o = n.findIndex((l) => w(l, t));
|
|
270
270
|
return o >= 0 ? n.splice(o, 1) : n.push(t), n;
|
|
271
271
|
}
|
|
272
|
-
return
|
|
272
|
+
return w(e, t) ? r : t;
|
|
273
273
|
}
|
|
274
274
|
function It(e, t) {
|
|
275
275
|
let r, n;
|
|
@@ -279,7 +279,7 @@ function It(e, t) {
|
|
|
279
279
|
};
|
|
280
280
|
}
|
|
281
281
|
function Tt(e, t) {
|
|
282
|
-
return
|
|
282
|
+
return D(t) && t.number ? St(e) : e;
|
|
283
283
|
}
|
|
284
284
|
function we(e, t) {
|
|
285
285
|
let r;
|
|
@@ -328,7 +328,7 @@ function Ue(e) {
|
|
|
328
328
|
writable: !1,
|
|
329
329
|
enumerable: !1,
|
|
330
330
|
configurable: !1
|
|
331
|
-
}), e ?
|
|
331
|
+
}), e ? D(e) && e._$$isNormalized ? e : D(e) ? Object.keys(e).reduce((r, n) => {
|
|
332
332
|
const o = Mt(e[n]);
|
|
333
333
|
return e[n] !== !1 && (r[n] = Ae(o)), r;
|
|
334
334
|
}, t) : typeof e != "string" ? t : e.split("|").reduce((r, n) => {
|
|
@@ -337,7 +337,7 @@ function Ue(e) {
|
|
|
337
337
|
}, t) : t;
|
|
338
338
|
}
|
|
339
339
|
function Mt(e) {
|
|
340
|
-
return e === !0 ? [] : Array.isArray(e) ||
|
|
340
|
+
return e === !0 ? [] : Array.isArray(e) || D(e) ? e : [e];
|
|
341
341
|
}
|
|
342
342
|
function Ae(e) {
|
|
343
343
|
const t = (r) => typeof r == "string" && r[0] === "@" ? Rt(r.slice(1)) : r;
|
|
@@ -349,7 +349,7 @@ const Ut = (e) => {
|
|
|
349
349
|
return e.includes(":") && (t = e.split(":").slice(1).join(":").split(",")), { name: r, params: t };
|
|
350
350
|
};
|
|
351
351
|
function Rt(e) {
|
|
352
|
-
const t = (r) =>
|
|
352
|
+
const t = (r) => G(r, e) || r[e];
|
|
353
353
|
return t.__locatorRef = e, t;
|
|
354
354
|
}
|
|
355
355
|
function Lt(e) {
|
|
@@ -381,40 +381,40 @@ async function Gt(e, t, r = {}) {
|
|
|
381
381
|
async function Qt(e, t) {
|
|
382
382
|
if (q(e.rules) || ie(e.rules))
|
|
383
383
|
return Wt(t, e.rules);
|
|
384
|
-
if (
|
|
384
|
+
if (F(e.rules) || Array.isArray(e.rules)) {
|
|
385
385
|
const i = {
|
|
386
386
|
field: e.label || e.name,
|
|
387
387
|
name: e.name,
|
|
388
388
|
label: e.label,
|
|
389
389
|
form: e.formData,
|
|
390
390
|
value: t
|
|
391
|
-
}, u = Array.isArray(e.rules) ? e.rules : [e.rules],
|
|
392
|
-
for (let
|
|
393
|
-
const p = u[
|
|
391
|
+
}, u = Array.isArray(e.rules) ? e.rules : [e.rules], s = u.length, d = [];
|
|
392
|
+
for (let b = 0; b < s; b++) {
|
|
393
|
+
const p = u[b], y = await p(t, i);
|
|
394
394
|
if (!(typeof y != "string" && !Array.isArray(y) && y)) {
|
|
395
395
|
if (Array.isArray(y))
|
|
396
|
-
|
|
396
|
+
d.push(...y);
|
|
397
397
|
else {
|
|
398
|
-
const
|
|
399
|
-
|
|
398
|
+
const O = typeof y == "string" ? y : Re(i);
|
|
399
|
+
d.push(O);
|
|
400
400
|
}
|
|
401
401
|
if (e.bails)
|
|
402
402
|
return {
|
|
403
|
-
errors:
|
|
403
|
+
errors: d
|
|
404
404
|
};
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
407
|
return {
|
|
408
|
-
errors:
|
|
408
|
+
errors: d
|
|
409
409
|
};
|
|
410
410
|
}
|
|
411
411
|
const r = Object.assign(Object.assign({}, e), { rules: Ue(e.rules) }), n = [], o = Object.keys(r.rules), l = o.length;
|
|
412
412
|
for (let i = 0; i < l; i++) {
|
|
413
|
-
const u = o[i],
|
|
413
|
+
const u = o[i], s = await Jt(r, t, {
|
|
414
414
|
name: u,
|
|
415
415
|
params: r.rules[u]
|
|
416
416
|
});
|
|
417
|
-
if (
|
|
417
|
+
if (s.error && (n.push(s.error), e.bails))
|
|
418
418
|
return {
|
|
419
419
|
errors: n
|
|
420
420
|
};
|
|
@@ -442,8 +442,8 @@ function Ht(e) {
|
|
|
442
442
|
if (!(!((n = o.inner) === null || n === void 0) && n.length) && o.errors.length)
|
|
443
443
|
return { errors: [{ path: o.path, errors: o.errors }] };
|
|
444
444
|
const l = o.inner.reduce((i, u) => {
|
|
445
|
-
const
|
|
446
|
-
return i[
|
|
445
|
+
const s = u.path || "";
|
|
446
|
+
return i[s] || (i[s] = { errors: [], path: s }), i[s].errors.push(...u.errors), i;
|
|
447
447
|
}, {});
|
|
448
448
|
return { errors: Object.values(l) };
|
|
449
449
|
}
|
|
@@ -489,18 +489,18 @@ function Yt(e, t) {
|
|
|
489
489
|
const { value: r, initialValue: n, setInitialValue: o } = Xt(e, t.modelValue, t.form);
|
|
490
490
|
if (!t.form) {
|
|
491
491
|
let y = function(h) {
|
|
492
|
-
var
|
|
493
|
-
"value" in h && (r.value = h.value), "errors" in h &&
|
|
492
|
+
var O;
|
|
493
|
+
"value" in h && (r.value = h.value), "errors" in h && d(h.errors), "touched" in h && (p.touched = (O = h.touched) !== null && O !== void 0 ? O : p.touched), "initialValue" in h && o(h.initialValue);
|
|
494
494
|
};
|
|
495
|
-
const { errors:
|
|
495
|
+
const { errors: s, setErrors: d } = tr(), b = ke >= Number.MAX_SAFE_INTEGER ? 0 : ++ke, p = er(r, n, s);
|
|
496
496
|
return {
|
|
497
|
-
id:
|
|
497
|
+
id: b,
|
|
498
498
|
path: e,
|
|
499
499
|
value: r,
|
|
500
500
|
initialValue: n,
|
|
501
501
|
meta: p,
|
|
502
|
-
flags: { pendingUnmount: { [
|
|
503
|
-
errors:
|
|
502
|
+
flags: { pendingUnmount: { [b]: !1 } },
|
|
503
|
+
errors: s,
|
|
504
504
|
setState: y
|
|
505
505
|
};
|
|
506
506
|
}
|
|
@@ -509,10 +509,10 @@ function Yt(e, t) {
|
|
|
509
509
|
label: t.label,
|
|
510
510
|
type: t.type,
|
|
511
511
|
validate: t.validate
|
|
512
|
-
}), i =
|
|
513
|
-
function u(
|
|
514
|
-
var
|
|
515
|
-
"value" in
|
|
512
|
+
}), i = N(() => l.errors);
|
|
513
|
+
function u(s) {
|
|
514
|
+
var d, b, p;
|
|
515
|
+
"value" in s && (r.value = s.value), "errors" in s && ((d = t.form) === null || d === void 0 || d.setFieldError(f(e), s.errors)), "touched" in s && ((b = t.form) === null || b === void 0 || b.setFieldTouched(f(e), (p = s.touched) !== null && p !== void 0 ? p : !1)), "initialValue" in s && o(s.initialValue);
|
|
516
516
|
}
|
|
517
517
|
return {
|
|
518
518
|
id: Array.isArray(l.id) ? l.id[l.id.length - 1] : l.id,
|
|
@@ -526,18 +526,18 @@ function Yt(e, t) {
|
|
|
526
526
|
};
|
|
527
527
|
}
|
|
528
528
|
function Xt(e, t, r) {
|
|
529
|
-
const n = re(
|
|
529
|
+
const n = re(f(t));
|
|
530
530
|
function o() {
|
|
531
|
-
return r ?
|
|
531
|
+
return r ? G(r.initialValues.value, f(e), f(n)) : f(n);
|
|
532
532
|
}
|
|
533
|
-
function l(
|
|
533
|
+
function l(d) {
|
|
534
534
|
if (!r) {
|
|
535
|
-
n.value =
|
|
535
|
+
n.value = d;
|
|
536
536
|
return;
|
|
537
537
|
}
|
|
538
|
-
r.stageInitialValue(
|
|
538
|
+
r.stageInitialValue(f(e), d, !0);
|
|
539
539
|
}
|
|
540
|
-
const i =
|
|
540
|
+
const i = N(o);
|
|
541
541
|
if (!r)
|
|
542
542
|
return {
|
|
543
543
|
value: re(o()),
|
|
@@ -545,13 +545,13 @@ function Xt(e, t, r) {
|
|
|
545
545
|
setInitialValue: l
|
|
546
546
|
};
|
|
547
547
|
const u = Zt(t, r, i, e);
|
|
548
|
-
return r.stageInitialValue(
|
|
549
|
-
value:
|
|
548
|
+
return r.stageInitialValue(f(e), u, !0), {
|
|
549
|
+
value: N({
|
|
550
550
|
get() {
|
|
551
|
-
return
|
|
551
|
+
return G(r.values, f(e));
|
|
552
552
|
},
|
|
553
|
-
set(
|
|
554
|
-
r.setFieldValue(
|
|
553
|
+
set(d) {
|
|
554
|
+
r.setFieldValue(f(e), d, !1);
|
|
555
555
|
}
|
|
556
556
|
}),
|
|
557
557
|
initialValue: i,
|
|
@@ -559,18 +559,18 @@ function Xt(e, t, r) {
|
|
|
559
559
|
};
|
|
560
560
|
}
|
|
561
561
|
function Zt(e, t, r, n) {
|
|
562
|
-
return ue(e) ?
|
|
562
|
+
return ue(e) ? f(e) : e !== void 0 ? e : G(t.values, f(n), f(r));
|
|
563
563
|
}
|
|
564
564
|
function er(e, t, r) {
|
|
565
565
|
const n = tt({
|
|
566
566
|
touched: !1,
|
|
567
567
|
pending: !1,
|
|
568
568
|
valid: !0,
|
|
569
|
-
validated: !!
|
|
570
|
-
initialValue:
|
|
571
|
-
dirty:
|
|
569
|
+
validated: !!f(r).length,
|
|
570
|
+
initialValue: N(() => f(t)),
|
|
571
|
+
dirty: N(() => !w(f(e), f(t)))
|
|
572
572
|
});
|
|
573
|
-
return
|
|
573
|
+
return I(r, (o) => {
|
|
574
574
|
n.valid = !o.length;
|
|
575
575
|
}, {
|
|
576
576
|
immediate: !0,
|
|
@@ -596,26 +596,26 @@ function rr(e) {
|
|
|
596
596
|
logo: "https://vee-validate.logaretm.com/v4/logo.png"
|
|
597
597
|
}, or);
|
|
598
598
|
}
|
|
599
|
-
const Le = {},
|
|
600
|
-
let
|
|
599
|
+
const Le = {}, H = {};
|
|
600
|
+
let j;
|
|
601
601
|
const le = It(() => {
|
|
602
602
|
setTimeout(async () => {
|
|
603
|
-
await nt(),
|
|
603
|
+
await nt(), j == null || j.sendInspectorState($), j == null || j.sendInspectorTree($);
|
|
604
604
|
}, 100);
|
|
605
605
|
}, 100);
|
|
606
606
|
function nr(e) {
|
|
607
|
-
const t =
|
|
608
|
-
if (!
|
|
607
|
+
const t = z();
|
|
608
|
+
if (!j) {
|
|
609
609
|
const r = t == null ? void 0 : t.appContext.app;
|
|
610
610
|
if (!r)
|
|
611
611
|
return;
|
|
612
612
|
rr(r);
|
|
613
613
|
}
|
|
614
|
-
|
|
615
|
-
delete
|
|
614
|
+
H[e.id] = Object.assign({}, e), H[e.id]._vm = t, rt(() => {
|
|
615
|
+
delete H[e.id], le();
|
|
616
616
|
}), le();
|
|
617
617
|
}
|
|
618
|
-
const
|
|
618
|
+
const $ = "vee-validate-inspector", S = {
|
|
619
619
|
error: 12405579,
|
|
620
620
|
success: 448379,
|
|
621
621
|
unknown: 5522283,
|
|
@@ -628,8 +628,8 @@ const B = "vee-validate-inspector", O = {
|
|
|
628
628
|
};
|
|
629
629
|
let g = null;
|
|
630
630
|
function or(e) {
|
|
631
|
-
|
|
632
|
-
id:
|
|
631
|
+
j = e, e.addInspector({
|
|
632
|
+
id: $,
|
|
633
633
|
icon: "rule",
|
|
634
634
|
label: "vee-validate",
|
|
635
635
|
noSelectionText: "Select a vee-validate node to inspect",
|
|
@@ -670,15 +670,15 @@ function or(e) {
|
|
|
670
670
|
}
|
|
671
671
|
]
|
|
672
672
|
}), e.on.getInspectorTree((t) => {
|
|
673
|
-
if (t.inspectorId !==
|
|
673
|
+
if (t.inspectorId !== $)
|
|
674
674
|
return;
|
|
675
|
-
const r = Object.values(Le), n = Object.values(
|
|
675
|
+
const r = Object.values(Le), n = Object.values(H);
|
|
676
676
|
t.rootNodes = [
|
|
677
677
|
...r.map(ir),
|
|
678
678
|
...n.map((o) => ar(o))
|
|
679
679
|
];
|
|
680
680
|
}), e.on.getInspectorState((t, r) => {
|
|
681
|
-
if (t.inspectorId !==
|
|
681
|
+
if (t.inspectorId !== $ || r.currentTab !== `custom-inspector:${$}`)
|
|
682
682
|
return;
|
|
683
683
|
const { form: n, field: o, state: l, type: i } = ur(t.nodeId);
|
|
684
684
|
if (n && i === "form") {
|
|
@@ -706,18 +706,18 @@ function or(e) {
|
|
|
706
706
|
function ir(e) {
|
|
707
707
|
const { textColor: t, bgColor: r } = $e(e.meta.value.valid), n = {};
|
|
708
708
|
Object.values(e.getAllPathStates()).forEach((i) => {
|
|
709
|
-
Pt(n,
|
|
709
|
+
Pt(n, f(i.path), lr(i, e));
|
|
710
710
|
});
|
|
711
711
|
function o(i, u = []) {
|
|
712
|
-
const
|
|
713
|
-
return "id" in i ? Object.assign(Object.assign({}, i), { label:
|
|
712
|
+
const s = [...u].pop();
|
|
713
|
+
return "id" in i ? Object.assign(Object.assign({}, i), { label: s || i.label }) : D(i) ? {
|
|
714
714
|
id: `${u.join(".")}`,
|
|
715
|
-
label:
|
|
716
|
-
children: Object.keys(i).map((
|
|
715
|
+
label: s || "",
|
|
716
|
+
children: Object.keys(i).map((d) => o(i[d], [...u, d]))
|
|
717
717
|
} : Array.isArray(i) ? {
|
|
718
718
|
id: `${u.join(".")}`,
|
|
719
|
-
label: `${
|
|
720
|
-
children: i.map((
|
|
719
|
+
label: `${s}[]`,
|
|
720
|
+
children: i.map((d, b) => o(d, [...u, String(b)]))
|
|
721
721
|
} : { id: "", label: "", children: [] };
|
|
722
722
|
}
|
|
723
723
|
const { children: l } = o(n);
|
|
@@ -733,8 +733,8 @@ function ir(e) {
|
|
|
733
733
|
},
|
|
734
734
|
{
|
|
735
735
|
label: `${e.getAllPathStates().length} fields`,
|
|
736
|
-
textColor:
|
|
737
|
-
backgroundColor:
|
|
736
|
+
textColor: S.white,
|
|
737
|
+
backgroundColor: S.unknown
|
|
738
738
|
}
|
|
739
739
|
]
|
|
740
740
|
};
|
|
@@ -742,14 +742,14 @@ function ir(e) {
|
|
|
742
742
|
function lr(e, t) {
|
|
743
743
|
return {
|
|
744
744
|
id: ce(t, e),
|
|
745
|
-
label:
|
|
745
|
+
label: f(e.path),
|
|
746
746
|
tags: Be(e.multiple, e.fieldsCount, e.type, e.valid, t)
|
|
747
747
|
};
|
|
748
748
|
}
|
|
749
749
|
function ar(e, t) {
|
|
750
750
|
return {
|
|
751
751
|
id: ce(t, e),
|
|
752
|
-
label:
|
|
752
|
+
label: f(e.name),
|
|
753
753
|
tags: Be(!1, 1, e.type, e.meta.valid, t)
|
|
754
754
|
};
|
|
755
755
|
}
|
|
@@ -763,35 +763,35 @@ function Be(e, t, r, n, o) {
|
|
|
763
763
|
},
|
|
764
764
|
o ? void 0 : {
|
|
765
765
|
label: "Standalone",
|
|
766
|
-
textColor:
|
|
767
|
-
backgroundColor:
|
|
766
|
+
textColor: S.black,
|
|
767
|
+
backgroundColor: S.gray
|
|
768
768
|
},
|
|
769
769
|
r === "checkbox" ? {
|
|
770
770
|
label: "Checkbox",
|
|
771
|
-
textColor:
|
|
772
|
-
backgroundColor:
|
|
771
|
+
textColor: S.white,
|
|
772
|
+
backgroundColor: S.blue
|
|
773
773
|
} : void 0,
|
|
774
774
|
r === "radio" ? {
|
|
775
775
|
label: "Radio",
|
|
776
|
-
textColor:
|
|
777
|
-
backgroundColor:
|
|
776
|
+
textColor: S.white,
|
|
777
|
+
backgroundColor: S.purple
|
|
778
778
|
} : void 0,
|
|
779
779
|
e ? {
|
|
780
780
|
label: "Multiple",
|
|
781
|
-
textColor:
|
|
782
|
-
backgroundColor:
|
|
781
|
+
textColor: S.black,
|
|
782
|
+
backgroundColor: S.orange
|
|
783
783
|
} : void 0
|
|
784
784
|
].filter(Boolean);
|
|
785
785
|
}
|
|
786
786
|
function ce(e, t) {
|
|
787
|
-
const r = t ? "path" in t ? "pathState" : "field" : "form", n = t ? "path" in t ? t == null ? void 0 : t.path :
|
|
787
|
+
const r = t ? "path" in t ? "pathState" : "field" : "form", n = t ? "path" in t ? t == null ? void 0 : t.path : f(t == null ? void 0 : t.name) : "", o = { f: e == null ? void 0 : e.formId, ff: n, type: r };
|
|
788
788
|
return btoa(encodeURIComponent(JSON.stringify(o)));
|
|
789
789
|
}
|
|
790
790
|
function ur(e) {
|
|
791
791
|
try {
|
|
792
792
|
const t = JSON.parse(decodeURIComponent(atob(e))), r = Le[t.f];
|
|
793
793
|
if (!r && t.ff) {
|
|
794
|
-
const o =
|
|
794
|
+
const o = H[t.ff];
|
|
795
795
|
return o ? {
|
|
796
796
|
type: t.type,
|
|
797
797
|
field: o
|
|
@@ -874,10 +874,10 @@ function sr(e) {
|
|
|
874
874
|
},
|
|
875
875
|
{
|
|
876
876
|
key: "errors",
|
|
877
|
-
value: Te(t.value).reduce((u,
|
|
878
|
-
var
|
|
879
|
-
const
|
|
880
|
-
return
|
|
877
|
+
value: Te(t.value).reduce((u, s) => {
|
|
878
|
+
var d;
|
|
879
|
+
const b = (d = t.value[s]) === null || d === void 0 ? void 0 : d[0];
|
|
880
|
+
return b && (u[s] = b), u;
|
|
881
881
|
}, {})
|
|
882
882
|
}
|
|
883
883
|
]
|
|
@@ -885,46 +885,46 @@ function sr(e) {
|
|
|
885
885
|
}
|
|
886
886
|
function $e(e) {
|
|
887
887
|
return {
|
|
888
|
-
bgColor: e ?
|
|
889
|
-
textColor: e ?
|
|
888
|
+
bgColor: e ? S.success : S.error,
|
|
889
|
+
textColor: e ? S.black : S.white
|
|
890
890
|
};
|
|
891
891
|
}
|
|
892
892
|
function cr(e, t, r) {
|
|
893
893
|
return Ce(r == null ? void 0 : r.type) ? fr(e, t, r) : ze(e, t, r);
|
|
894
894
|
}
|
|
895
895
|
function ze(e, t, r) {
|
|
896
|
-
const { initialValue: n, validateOnMount: o, bails: l, type: i, checkedValue: u, label:
|
|
897
|
-
if (
|
|
896
|
+
const { initialValue: n, validateOnMount: o, bails: l, type: i, checkedValue: u, label: s, validateOnValueUpdate: d, uncheckedValue: b, controlled: p, keepValueOnUnmount: y, syncVModel: h, form: O } = dr(r), M = p ? Fe(je) : void 0, c = O || M, E = N(() => wt(V(e))), x = N(() => {
|
|
897
|
+
if (V(c == null ? void 0 : c.schema))
|
|
898
898
|
return;
|
|
899
|
-
const v =
|
|
900
|
-
return ie(v) || q(v) ||
|
|
901
|
-
}), { id: Y, value:
|
|
899
|
+
const v = f(t);
|
|
900
|
+
return ie(v) || q(v) || F(v) || Array.isArray(v) ? v : Ue(v);
|
|
901
|
+
}), { id: Y, value: Q, initialValue: Ge, meta: A, setState: W, errors: X, flags: Z } = Yt(E, {
|
|
902
902
|
modelValue: n,
|
|
903
|
-
form:
|
|
903
|
+
form: c,
|
|
904
904
|
bails: l,
|
|
905
|
-
label:
|
|
905
|
+
label: s,
|
|
906
906
|
type: i,
|
|
907
|
-
validate:
|
|
908
|
-
}), Qe =
|
|
909
|
-
h && vr({ value:
|
|
907
|
+
validate: x.value ? fe : void 0
|
|
908
|
+
}), Qe = N(() => X.value[0]);
|
|
909
|
+
h && vr({ value: Q, prop: h, handleChange: ve });
|
|
910
910
|
const Ke = (a, v = !1) => {
|
|
911
|
-
|
|
911
|
+
A.touched = !0, v && U();
|
|
912
912
|
};
|
|
913
913
|
async function de(a) {
|
|
914
914
|
var v, _;
|
|
915
|
-
return
|
|
916
|
-
name:
|
|
917
|
-
label: s
|
|
918
|
-
values: (_ =
|
|
915
|
+
return c != null && c.validateSchema ? (v = (await c.validateSchema(a)).results[V(E)]) !== null && v !== void 0 ? v : { valid: !0, errors: [] } : x.value ? Gt(Q.value, x.value, {
|
|
916
|
+
name: V(E),
|
|
917
|
+
label: V(s),
|
|
918
|
+
values: (_ = c == null ? void 0 : c.values) !== null && _ !== void 0 ? _ : {},
|
|
919
919
|
bails: l
|
|
920
920
|
}) : { valid: !0, errors: [] };
|
|
921
921
|
}
|
|
922
|
-
const
|
|
923
|
-
if (!Z.pendingUnmount[
|
|
924
|
-
return
|
|
925
|
-
}),
|
|
922
|
+
const U = we(async () => (A.pending = !0, A.validated = !0, de("validated-only")), (a) => {
|
|
923
|
+
if (!Z.pendingUnmount[k.id])
|
|
924
|
+
return W({ errors: a.errors }), A.pending = !1, A.valid = a.valid, a;
|
|
925
|
+
}), R = we(async () => de("silent"), (a) => (A.valid = a.valid, a));
|
|
926
926
|
function fe(a) {
|
|
927
|
-
return (a == null ? void 0 : a.mode) === "silent" ?
|
|
927
|
+
return (a == null ? void 0 : a.mode) === "silent" ? R() : U();
|
|
928
928
|
}
|
|
929
929
|
function ve(a, v = !0) {
|
|
930
930
|
const _ = Me(a);
|
|
@@ -932,51 +932,51 @@ function ze(e, t, r) {
|
|
|
932
932
|
}
|
|
933
933
|
qe(() => {
|
|
934
934
|
if (o)
|
|
935
|
-
return
|
|
936
|
-
(!
|
|
935
|
+
return U();
|
|
936
|
+
(!c || !c.validateSchema) && R();
|
|
937
937
|
});
|
|
938
938
|
function He(a) {
|
|
939
|
-
|
|
939
|
+
A.touched = a;
|
|
940
940
|
}
|
|
941
941
|
function pe(a) {
|
|
942
942
|
var v;
|
|
943
943
|
const _ = a && "value" in a ? a.value : Ge.value;
|
|
944
|
-
|
|
945
|
-
value:
|
|
946
|
-
initialValue:
|
|
944
|
+
W({
|
|
945
|
+
value: T(_),
|
|
946
|
+
initialValue: T(_),
|
|
947
947
|
touched: (v = a == null ? void 0 : a.touched) !== null && v !== void 0 ? v : !1,
|
|
948
948
|
errors: (a == null ? void 0 : a.errors) || []
|
|
949
|
-
}),
|
|
949
|
+
}), A.pending = !1, A.validated = !1, R();
|
|
950
950
|
}
|
|
951
|
-
const he =
|
|
951
|
+
const he = z();
|
|
952
952
|
function ee(a, v = !0) {
|
|
953
|
-
|
|
953
|
+
Q.value = he && h ? Tt(a, he.props.modelModifiers) : a, (v ? U : R)();
|
|
954
954
|
}
|
|
955
955
|
function We(a) {
|
|
956
|
-
|
|
956
|
+
W({ errors: Array.isArray(a) ? a : [a] });
|
|
957
957
|
}
|
|
958
|
-
const
|
|
958
|
+
const me = N({
|
|
959
959
|
get() {
|
|
960
|
-
return
|
|
960
|
+
return Q.value;
|
|
961
961
|
},
|
|
962
962
|
set(a) {
|
|
963
|
-
ee(a,
|
|
963
|
+
ee(a, d);
|
|
964
964
|
}
|
|
965
965
|
});
|
|
966
|
-
process.env.NODE_ENV !== "production" &&
|
|
967
|
-
|
|
966
|
+
process.env.NODE_ENV !== "production" && I(me, (a, v) => {
|
|
967
|
+
D(a) && a === v && w(a, v) && Ye("Detected a possible deep change on field `value` ref, for nested changes please either set the entire ref value or use `setValue` or `handleChange`.");
|
|
968
968
|
}, { deep: !0 });
|
|
969
|
-
const
|
|
969
|
+
const k = {
|
|
970
970
|
id: Y,
|
|
971
|
-
name:
|
|
972
|
-
label:
|
|
973
|
-
value:
|
|
974
|
-
meta:
|
|
971
|
+
name: E,
|
|
972
|
+
label: s,
|
|
973
|
+
value: me,
|
|
974
|
+
meta: A,
|
|
975
975
|
errors: X,
|
|
976
976
|
errorMessage: Qe,
|
|
977
977
|
type: i,
|
|
978
978
|
checkedValue: u,
|
|
979
|
-
uncheckedValue:
|
|
979
|
+
uncheckedValue: b,
|
|
980
980
|
bails: l,
|
|
981
981
|
keepValueOnUnmount: y,
|
|
982
982
|
resetField: pe,
|
|
@@ -984,55 +984,55 @@ function ze(e, t, r) {
|
|
|
984
984
|
validate: fe,
|
|
985
985
|
handleChange: ve,
|
|
986
986
|
handleBlur: Ke,
|
|
987
|
-
setState:
|
|
987
|
+
setState: W,
|
|
988
988
|
setTouched: He,
|
|
989
989
|
setErrors: We,
|
|
990
990
|
setValue: ee
|
|
991
991
|
};
|
|
992
|
-
if (Xe(xt,
|
|
993
|
-
|
|
992
|
+
if (Xe(xt, k), ue(t) && typeof f(t) != "function" && I(t, (a, v) => {
|
|
993
|
+
w(a, v) || (A.validated ? U() : R());
|
|
994
994
|
}, {
|
|
995
995
|
deep: !0
|
|
996
|
-
}), process.env.NODE_ENV !== "production" && (
|
|
996
|
+
}), process.env.NODE_ENV !== "production" && (k._vm = z(), I(() => Object.assign(Object.assign({ errors: X.value }, A), { value: Q.value }), le, {
|
|
997
997
|
deep: !0
|
|
998
|
-
}),
|
|
999
|
-
return
|
|
1000
|
-
const Je =
|
|
1001
|
-
const a =
|
|
1002
|
-
return !a ||
|
|
1003
|
-
const
|
|
1004
|
-
const
|
|
1005
|
-
return
|
|
998
|
+
}), c || nr(k)), !c)
|
|
999
|
+
return k;
|
|
1000
|
+
const Je = N(() => {
|
|
1001
|
+
const a = x.value;
|
|
1002
|
+
return !a || F(a) || ie(a) || q(a) || Array.isArray(a) ? {} : Object.keys(a).reduce((v, _) => {
|
|
1003
|
+
const m = Lt(a[_]).map((K) => K.__locatorRef).reduce((K, L) => {
|
|
1004
|
+
const C = G(c.values, L) || c.values[L];
|
|
1005
|
+
return C !== void 0 && (K[L] = C), K;
|
|
1006
1006
|
}, {});
|
|
1007
|
-
return Object.assign(v,
|
|
1007
|
+
return Object.assign(v, m), v;
|
|
1008
1008
|
}, {});
|
|
1009
1009
|
});
|
|
1010
|
-
return
|
|
1010
|
+
return I(Je, (a, v) => {
|
|
1011
1011
|
if (!Object.keys(a).length)
|
|
1012
1012
|
return;
|
|
1013
|
-
!
|
|
1013
|
+
!w(a, v) && (A.validated ? U() : R());
|
|
1014
1014
|
}), Ze(() => {
|
|
1015
1015
|
var a;
|
|
1016
|
-
const v = (a =
|
|
1017
|
-
if (v || !
|
|
1018
|
-
|
|
1016
|
+
const v = (a = V(k.keepValueOnUnmount)) !== null && a !== void 0 ? a : V(c.keepValuesOnUnmount), _ = V(E);
|
|
1017
|
+
if (v || !c || Z.pendingUnmount[k.id]) {
|
|
1018
|
+
c == null || c.removePathState(_, Y);
|
|
1019
1019
|
return;
|
|
1020
1020
|
}
|
|
1021
|
-
Z.pendingUnmount[
|
|
1022
|
-
const
|
|
1023
|
-
if (Array.isArray(
|
|
1024
|
-
if (
|
|
1025
|
-
const
|
|
1026
|
-
if (
|
|
1027
|
-
const
|
|
1028
|
-
|
|
1021
|
+
Z.pendingUnmount[k.id] = !0;
|
|
1022
|
+
const m = c.getPathState(_);
|
|
1023
|
+
if (Array.isArray(m == null ? void 0 : m.id) && (m != null && m.multiple) ? m != null && m.id.includes(k.id) : (m == null ? void 0 : m.id) === k.id) {
|
|
1024
|
+
if (m != null && m.multiple && Array.isArray(m.value)) {
|
|
1025
|
+
const L = m.value.findIndex((C) => w(C, V(k.checkedValue)));
|
|
1026
|
+
if (L > -1) {
|
|
1027
|
+
const C = [...m.value];
|
|
1028
|
+
C.splice(L, 1), c.setFieldValue(_, C);
|
|
1029
1029
|
}
|
|
1030
|
-
Array.isArray(
|
|
1030
|
+
Array.isArray(m.id) && m.id.splice(m.id.indexOf(k.id), 1);
|
|
1031
1031
|
} else
|
|
1032
|
-
|
|
1033
|
-
|
|
1032
|
+
c.unsetPathValue(V(E));
|
|
1033
|
+
c.removePathState(_, Y);
|
|
1034
1034
|
}
|
|
1035
|
-
}),
|
|
1035
|
+
}), k;
|
|
1036
1036
|
}
|
|
1037
1037
|
function dr(e) {
|
|
1038
1038
|
const t = () => ({
|
|
@@ -1044,7 +1044,7 @@ function dr(e) {
|
|
|
1044
1044
|
keepValueOnUnmount: void 0,
|
|
1045
1045
|
syncVModel: !1,
|
|
1046
1046
|
controlled: !0
|
|
1047
|
-
}), r = !!(e != null && e.syncVModel), n = typeof (e == null ? void 0 : e.syncVModel) == "string" ? e.syncVModel : (e == null ? void 0 : e.modelPropName) || "modelValue", o = r && !("initialValue" in (e || {})) ? ae(
|
|
1047
|
+
}), r = !!(e != null && e.syncVModel), n = typeof (e == null ? void 0 : e.syncVModel) == "string" ? e.syncVModel : (e == null ? void 0 : e.modelPropName) || "modelValue", o = r && !("initialValue" in (e || {})) ? ae(z(), n) : e == null ? void 0 : e.initialValue;
|
|
1048
1048
|
if (!e)
|
|
1049
1049
|
return Object.assign(Object.assign({}, t()), { initialValue: o });
|
|
1050
1050
|
const l = "valueProp" in e ? e.valueProp : e.checkedValue, i = "standalone" in e ? !e.standalone : e.controlled, u = (e == null ? void 0 : e.modelPropName) || (e == null ? void 0 : e.syncVModel) || !1;
|
|
@@ -1058,50 +1058,50 @@ function dr(e) {
|
|
|
1058
1058
|
function fr(e, t, r) {
|
|
1059
1059
|
const n = r != null && r.standalone ? void 0 : Fe(je), o = r == null ? void 0 : r.checkedValue, l = r == null ? void 0 : r.uncheckedValue;
|
|
1060
1060
|
function i(u) {
|
|
1061
|
-
const
|
|
1062
|
-
const p =
|
|
1063
|
-
return Array.isArray(p) ? p.findIndex((h) =>
|
|
1061
|
+
const s = u.handleChange, d = N(() => {
|
|
1062
|
+
const p = V(u.value), y = V(o);
|
|
1063
|
+
return Array.isArray(p) ? p.findIndex((h) => w(h, y)) >= 0 : w(y, p);
|
|
1064
1064
|
});
|
|
1065
|
-
function
|
|
1066
|
-
var h,
|
|
1067
|
-
if (
|
|
1065
|
+
function b(p, y = !0) {
|
|
1066
|
+
var h, O;
|
|
1067
|
+
if (d.value === ((h = p == null ? void 0 : p.target) === null || h === void 0 ? void 0 : h.checked)) {
|
|
1068
1068
|
y && u.validate();
|
|
1069
1069
|
return;
|
|
1070
1070
|
}
|
|
1071
|
-
const
|
|
1072
|
-
let
|
|
1073
|
-
n && (
|
|
1071
|
+
const M = V(e), c = n == null ? void 0 : n.getPathState(M), E = Me(p);
|
|
1072
|
+
let x = (O = V(o)) !== null && O !== void 0 ? O : E;
|
|
1073
|
+
n && (c != null && c.multiple) && c.type === "checkbox" ? x = Se(G(n.values, M) || [], x, void 0) : (r == null ? void 0 : r.type) === "checkbox" && (x = Se(V(u.value), x, V(l))), s(x, y);
|
|
1074
1074
|
}
|
|
1075
1075
|
return Object.assign(Object.assign({}, u), {
|
|
1076
|
-
checked:
|
|
1076
|
+
checked: d,
|
|
1077
1077
|
checkedValue: o,
|
|
1078
1078
|
uncheckedValue: l,
|
|
1079
|
-
handleChange:
|
|
1079
|
+
handleChange: b
|
|
1080
1080
|
});
|
|
1081
1081
|
}
|
|
1082
1082
|
return i(ze(e, t, r));
|
|
1083
1083
|
}
|
|
1084
1084
|
function vr({ prop: e, value: t, handleChange: r }) {
|
|
1085
|
-
const n =
|
|
1085
|
+
const n = z();
|
|
1086
1086
|
if (!n || !e) {
|
|
1087
1087
|
process.env.NODE_ENV !== "production" && console.warn("Failed to setup model events because `useField` was not called in setup.");
|
|
1088
1088
|
return;
|
|
1089
1089
|
}
|
|
1090
1090
|
const o = typeof e == "string" ? e : "modelValue", l = `update:${o}`;
|
|
1091
|
-
o in n.props && (
|
|
1092
|
-
|
|
1093
|
-
}),
|
|
1091
|
+
o in n.props && (I(t, (i) => {
|
|
1092
|
+
w(i, ae(n, o)) || n.emit(l, i);
|
|
1093
|
+
}), I(() => ae(n, o), (i) => {
|
|
1094
1094
|
if (i === _e && t.value === void 0)
|
|
1095
1095
|
return;
|
|
1096
1096
|
const u = i === _e ? void 0 : i;
|
|
1097
|
-
|
|
1097
|
+
w(u, t.value) || r(u);
|
|
1098
1098
|
}));
|
|
1099
1099
|
}
|
|
1100
1100
|
function ae(e, t) {
|
|
1101
1101
|
if (e)
|
|
1102
1102
|
return e.props[t];
|
|
1103
1103
|
}
|
|
1104
|
-
const pr = { class: "w-72" }, hr = { class: "relative h-10 w-full min-w-[200px]" },
|
|
1104
|
+
const pr = { class: "w-72" }, hr = { class: "relative h-10 w-full min-w-[200px]" }, mr = /* @__PURE__ */ P("div", { class: "absolute top-2/4 right-3 grid h-5 w-5 -translate-y-2/4 place-items-center text-neutral-400" }, null, -1), br = ["id", "type", "disabled"], gr = ["for"], yr = { class: "my-3" }, _r = ["name", "id"], Vr = { key: 0 }, wr = /* @__PURE__ */ ot({
|
|
1105
1105
|
__name: "EpInput",
|
|
1106
1106
|
props: {
|
|
1107
1107
|
name: {},
|
|
@@ -1124,44 +1124,44 @@ const pr = { class: "w-72" }, hr = { class: "relative h-10 w-full min-w-[200px]"
|
|
|
1124
1124
|
type: l,
|
|
1125
1125
|
modelValue: i,
|
|
1126
1126
|
placeholder: u,
|
|
1127
|
-
iconPath:
|
|
1128
|
-
disabled:
|
|
1129
|
-
readonly:
|
|
1127
|
+
iconPath: s,
|
|
1128
|
+
disabled: d,
|
|
1129
|
+
readonly: b
|
|
1130
1130
|
} = it(r), p = lt(r, "name");
|
|
1131
|
-
function y(
|
|
1132
|
-
return
|
|
1131
|
+
function y(c) {
|
|
1132
|
+
return c ? c.length < 8 ? "this field must contain at least 8 characters" : !0 : "this field is required";
|
|
1133
1133
|
}
|
|
1134
|
-
const { value: h, errorMessage:
|
|
1135
|
-
return (
|
|
1136
|
-
ye(
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
id:
|
|
1142
|
-
type:
|
|
1134
|
+
const { value: h, errorMessage: O, meta: M } = cr(p, y);
|
|
1135
|
+
return (c, E) => (be(), ge(at, null, [
|
|
1136
|
+
ye(J(f(M)) + " ", 1),
|
|
1137
|
+
P("div", pr, [
|
|
1138
|
+
P("div", hr, [
|
|
1139
|
+
mr,
|
|
1140
|
+
P("input", {
|
|
1141
|
+
id: f(n),
|
|
1142
|
+
type: f(l),
|
|
1143
1143
|
class: "peer h-full w-full rounded-[7px] border border-blue-200 border-t-transparent bg-transparent px-3 py-2.5 !pr-9 font-sans text-sm font-normal text-neutral-700 outline outline-0 transition-all placeholder-shown:border placeholder-shown:border-neutral-200 placeholder-shown:border-t-neutral-200 focus:border-2 focus:border-blue-500 focus:border-t-transparent focus:outline-0 disabled:border-0 disabled:bg-neutral-100 disabled:cursor-not-allowed",
|
|
1144
1144
|
placeholder: " ",
|
|
1145
|
-
disabled:
|
|
1146
|
-
}, null, 8,
|
|
1147
|
-
|
|
1148
|
-
for:
|
|
1145
|
+
disabled: f(d)
|
|
1146
|
+
}, null, 8, br),
|
|
1147
|
+
P("label", {
|
|
1148
|
+
for: f(n),
|
|
1149
1149
|
class: "before:content[' '] after:content[' '] pointer-events-none absolute left-0 -top-1.5 flex h-full w-full select-none text-[11px] font-normal leading-tight text-neutral-400 transition-all before:pointer-events-none before:mt-[6.5px] before:mr-1 before:box-border before:block before:h-1.5 before:w-2.5 before:rounded-tl-md before:border-t before:border-l before:border-blue-200 before:transition-all after:pointer-events-none after:mt-[6.5px] after:ml-1 after:box-border after:block after:h-1.5 after:w-2.5 after:flex-grow after:rounded-tr-md after:border-t after:border-r after:border-blue-200 after:transition-all peer-placeholder-shown:text-sm peer-placeholder-shown:leading-[3.75] peer-placeholder-shown:text-neutral-700 peer-placeholder-shown:before:border-transparent peer-placeholder-shown:after:border-transparent peer-focus:text-[11px] peer-focus:leading-tight peer-focus:text-blue-500 peer-focus:before:border-t-2 peer-focus:before:border-l-2 peer-focus:before:border-blue-500 peer-focus:after:border-t-2 peer-focus:after:border-r-2 peer-focus:after:border-blue-500 peer-disabled:text-transparent peer-disabled:before:border-transparent peer-disabled:after:border-transparent peer-disabled:peer-placeholder-shown:text-neutral-500"
|
|
1150
|
-
},
|
|
1151
|
-
ut(ft, { iconPath:
|
|
1150
|
+
}, J(f(o)), 9, gr),
|
|
1151
|
+
ut(ft, { iconPath: f(vt) }, null, 8, ["iconPath"])
|
|
1152
1152
|
])
|
|
1153
1153
|
]),
|
|
1154
|
-
|
|
1155
|
-
ye(
|
|
1156
|
-
st(
|
|
1154
|
+
P("div", yr, [
|
|
1155
|
+
ye(J(p.value) + " ", 1),
|
|
1156
|
+
st(P("input", {
|
|
1157
1157
|
type: "text",
|
|
1158
|
-
"onUpdate:modelValue":
|
|
1158
|
+
"onUpdate:modelValue": E[0] || (E[0] = (x) => ue(h) ? h.value = x : null),
|
|
1159
1159
|
name: p.value,
|
|
1160
1160
|
id: p.value
|
|
1161
1161
|
}, null, 8, _r), [
|
|
1162
|
-
[ct,
|
|
1162
|
+
[ct, f(h)]
|
|
1163
1163
|
]),
|
|
1164
|
-
|
|
1164
|
+
f(O) ? (be(), ge("div", Vr, J(f(O)), 1)) : dt("", !0)
|
|
1165
1165
|
])
|
|
1166
1166
|
], 64));
|
|
1167
1167
|
}
|