@fewangsit/wangsvue-fats 1.0.1-alpha.30 → 1.0.1-alpha.32
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/backgroundimagecropper/index.es.js +2 -2
- package/basecalendar/index.es.js +67 -71
- package/calendar/index.es.js +46 -49
- package/datatable/index.es.js +1 -1
- package/dialogprintqr/index.es.js +2 -2
- package/inputcurrency/index.es.js +79 -75
- package/package.json +1 -1
- package/stats.html +1 -1
- package/style.css +1 -1
- package/wangsvue-fats.esm.browser.js +1966 -1969
- package/wangsvue-fats.system.js +55 -55
|
@@ -50,8 +50,8 @@ const I = (i, s) => {
|
|
|
50
50
|
_: 3
|
|
51
51
|
}, 8, ["mouse-move", "touch-move", "touch-resize", "wheel-resize"]));
|
|
52
52
|
}
|
|
53
|
-
}),
|
|
53
|
+
}), b = /* @__PURE__ */ I(R, [["__scopeId", "data-v-5cd98b2d"]]);
|
|
54
54
|
export {
|
|
55
|
-
|
|
55
|
+
b as B,
|
|
56
56
|
I as _
|
|
57
57
|
};
|
package/basecalendar/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as wt, onMounted as Dt, useAttrs as bt, ref as B, shallowRef as P, computed as A, watch as
|
|
1
|
+
import { defineComponent as wt, onMounted as Dt, useAttrs as bt, ref as B, shallowRef as P, computed as A, watch as ge, createBlock as he, openBlock as c, withCtx as ye, renderSlot as U, createVNode as S, createElementVNode as f, mergeProps as u, unref as q, createElementBlock as g, createCommentVNode as $, withDirectives as Mt, toDisplayString as F, Fragment as Q, renderList as re, createTextVNode as kt, normalizeProps as Tt, withKeys as w, vShow as St } from "vue";
|
|
2
2
|
import { u as $t } from "../plugins/WangsVue.es.js";
|
|
3
3
|
import { s as Ft } from "../vendor/primevue/overlaypanel/overlaypanel.esm.es.js";
|
|
4
4
|
import { s as Yt } from "../vendor/primevue/selectbutton/selectbutton.esm.es.js";
|
|
@@ -67,12 +67,12 @@ const It = ["id"], Pt = ["id", "aria-invalid", "disabled", "placeholder", "value
|
|
|
67
67
|
exactSelection: { type: Boolean, default: !1 }
|
|
68
68
|
},
|
|
69
69
|
emits: ["update:modelValue", "update:epochTimeMillis", "monthChange", "yearChange", "dateSelect"],
|
|
70
|
-
setup(
|
|
71
|
-
const l =
|
|
70
|
+
setup(Ae, { emit: xe }) {
|
|
71
|
+
const l = Ae, x = xe;
|
|
72
72
|
Dt(() => {
|
|
73
73
|
R();
|
|
74
74
|
});
|
|
75
|
-
const
|
|
75
|
+
const Ne = bt(), Y = $t("Calendar"), Oe = (1969 * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) + Math.floor(1970 / 400)) * 24 * 60 * 60 * 1e7, we = B(), Z = B(), ue = B(), L = /* @__PURE__ */ new Date(), h = B(L.getMonth()), i = B(L.getFullYear()), v = B(L.getHours()), D = B(L.getMinutes()), V = B(L.getSeconds()), N = B(l.modelValue), _ = B(!1), ie = P(), p = P(l.view ?? "date"), De = P([]), be = P(!1), y = P(!1), de = P(), Me = P(!1), ve = P(), ke = P([]), o = A(() => l.showButtons || l.showTime ? N.value : l.modelValue), ee = A(() => De.value.flatMap((e) => e)), Ee = A(() => v.value < 10 ? "0" + v.value : v.value), Ke = A(() => D.value < 10 ? "0" + D.value : D.value), We = A(() => l.dateFormat || Y.locale.global.dateFormat), Le = A(() => {
|
|
76
76
|
const e = [], t = (a) => {
|
|
77
77
|
if (l.minDate) {
|
|
78
78
|
const n = l.minDate.getMonth(), r = l.minDate.getFullYear();
|
|
@@ -119,11 +119,7 @@ const It = ["id"], Pt = ["id", "aria-invalid", "disabled", "placeholder", "value
|
|
|
119
119
|
return e;
|
|
120
120
|
const t = /* @__PURE__ */ new Date();
|
|
121
121
|
return l.maxDate && l.maxDate < t ? l.maxDate : l.minDate && l.minDate > t ? l.minDate : t;
|
|
122
|
-
}), Re = A(() => (
|
|
123
|
-
l.invalid || !!ue["error-message"],
|
|
124
|
-
l.invalid,
|
|
125
|
-
!!ue["error-message"]
|
|
126
|
-
), l.invalid || !!ue["error-message"])), b = (e) => e.length > 2 ? e.length - 1 : 1, je = () => {
|
|
122
|
+
}), Re = A(() => l.invalid || !!Ne["error-message"]), b = (e) => e.length > 2 ? e.length - 1 : 1, je = () => {
|
|
127
123
|
const e = new Date(i.value, h.value, 1), t = new Date(i.value, h.value + 1, 0), a = t.getDate(), n = e.getDay(), r = t.getDay(), d = [];
|
|
128
124
|
let s = 1 - n;
|
|
129
125
|
for (; s <= a; ) {
|
|
@@ -154,10 +150,10 @@ const It = ["id"], Pt = ["id", "aria-invalid", "disabled", "placeholder", "value
|
|
|
154
150
|
h.value === 0 ? (i.value--, h.value = 11) : h.value--, R();
|
|
155
151
|
}, qe = () => {
|
|
156
152
|
i.value--;
|
|
157
|
-
},
|
|
153
|
+
}, Te = () => {
|
|
158
154
|
i.value++;
|
|
159
155
|
}, ze = () => {
|
|
160
|
-
h.value === 11 ? (
|
|
156
|
+
h.value === 11 ? (Te(), h.value = 0) : h.value++, R();
|
|
161
157
|
}, Ge = () => {
|
|
162
158
|
i.value -= 10;
|
|
163
159
|
}, Je = () => {
|
|
@@ -165,9 +161,9 @@ const It = ["id"], Pt = ["id", "aria-invalid", "disabled", "placeholder", "value
|
|
|
165
161
|
}, Qe = () => {
|
|
166
162
|
p.value === "date" ? Ue() : p.value === "month" ? qe() : Ge();
|
|
167
163
|
}, Xe = () => {
|
|
168
|
-
p.value === "date" ? ze() : p.value === "month" ?
|
|
164
|
+
p.value === "date" ? ze() : p.value === "month" ? Te() : Je();
|
|
169
165
|
}, R = () => {
|
|
170
|
-
|
|
166
|
+
De.value = je();
|
|
171
167
|
}, E = () => o.value != null && typeof o.value != "string", K = (e) => l.selectionMode === "single" && (!Array.isArray(o.value) || o.value == null), C = () => l.selectionMode === "range" && (Array.isArray(o.value) || o.value == null), I = () => l.selectionMode === "multiple" && (Array.isArray(o.value) || o.value == null), ae = (e) => I() || C(), W = (e, t) => e ? e.getDate() === t.day && e.getMonth() === t.month && e.getFullYear() === t.year : !1, Ze = (e, t, a) => {
|
|
172
168
|
if (e && t) {
|
|
173
169
|
const r = new Date(a.year, a.month, a.day);
|
|
@@ -198,7 +194,7 @@ const It = ["id"], Pt = ["id", "aria-invalid", "disabled", "placeholder", "value
|
|
|
198
194
|
}, _e = (e) => K(o.value) || I() ? z(e) : C() ? z(e) && (W(o.value[0], e) || o.value[0] == null) : !1, et = (e) => K(o.value) || I() ? z(e) : C() ? z(e) && (W(
|
|
199
195
|
o.value[b(o.value)],
|
|
200
196
|
e
|
|
201
|
-
) || o.value[b(o.value)] == null) : !1,
|
|
197
|
+
) || o.value[b(o.value)] == null) : !1, Se = (e) => {
|
|
202
198
|
if (E()) {
|
|
203
199
|
if (K(o.value))
|
|
204
200
|
return o.value.getMonth() === e && o.value.getFullYear() === i.value;
|
|
@@ -215,7 +211,7 @@ const It = ["id"], Pt = ["id", "aria-invalid", "disabled", "placeholder", "value
|
|
|
215
211
|
}
|
|
216
212
|
}
|
|
217
213
|
return !1;
|
|
218
|
-
},
|
|
214
|
+
}, $e = (e) => {
|
|
219
215
|
var t;
|
|
220
216
|
if (E()) {
|
|
221
217
|
if (K(o.value))
|
|
@@ -239,10 +235,10 @@ const It = ["id"], Pt = ["id", "aria-invalid", "disabled", "placeholder", "value
|
|
|
239
235
|
return l.excludeDates && (s = !l.excludeDates.some(
|
|
240
236
|
(m) => m.getFullYear() === a && m.getMonth() === t && m.getDate() === e
|
|
241
237
|
)), l.minDate && (l.minDate.getFullYear() > a || l.minDate.getFullYear() === a && (l.minDate.getMonth() > t || l.minDate.getMonth() === t && l.minDate.getDate() > e)) && (n = !1), l.maxDate && (l.maxDate.getFullYear() < a || l.maxDate.getFullYear() === a && (l.maxDate.getMonth() < t || l.maxDate.getMonth() === t && l.maxDate.getDate() < e)) && (r = !1), n && r && d && s;
|
|
242
|
-
},
|
|
238
|
+
}, ce = (e, t) => {
|
|
243
239
|
e.currentTarget instanceof HTMLElement && e.currentTarget.focus(), t.selectable && gt(t), l.selectionMode === "single" && (!l.showTime || l.hideOnDateTimeSelect) && J();
|
|
244
240
|
}, at = (e, t) => {
|
|
245
|
-
t.selectable && (l.view === "month" ?
|
|
241
|
+
t.selectable && (l.view === "month" ? ce(e, {
|
|
246
242
|
year: i.value,
|
|
247
243
|
month: t.value,
|
|
248
244
|
day: 1,
|
|
@@ -254,7 +250,7 @@ const It = ["id"], Pt = ["id", "aria-invalid", "disabled", "placeholder", "value
|
|
|
254
250
|
year: i.value
|
|
255
251
|
})), R());
|
|
256
252
|
}, lt = (e, t) => {
|
|
257
|
-
t.selectable && (l.view === "year" ?
|
|
253
|
+
t.selectable && (l.view === "year" ? ce(e, {
|
|
258
254
|
year: t.value,
|
|
259
255
|
month: 0,
|
|
260
256
|
day: 1,
|
|
@@ -266,11 +262,11 @@ const It = ["id"], Pt = ["id", "aria-invalid", "disabled", "placeholder", "value
|
|
|
266
262
|
year: i.value
|
|
267
263
|
})), R());
|
|
268
264
|
}, M = (e, t, a) => {
|
|
269
|
-
!l.disabled && !l.readonly && (
|
|
265
|
+
!l.disabled && !l.readonly && (Ce(e, null, t, a), e.preventDefault());
|
|
270
266
|
}, k = (e) => {
|
|
271
|
-
!l.disabled && !l.readonly && (
|
|
267
|
+
!l.disabled && !l.readonly && (me(), He(), e.preventDefault());
|
|
272
268
|
}, le = () => {
|
|
273
|
-
|
|
269
|
+
me();
|
|
274
270
|
}, ne = (e) => {
|
|
275
271
|
switch (e.code) {
|
|
276
272
|
case "Tab":
|
|
@@ -279,20 +275,20 @@ const It = ["id"], Pt = ["id", "aria-invalid", "disabled", "placeholder", "value
|
|
|
279
275
|
J(), e.preventDefault();
|
|
280
276
|
break;
|
|
281
277
|
}
|
|
282
|
-
},
|
|
278
|
+
}, Fe = (e) => {
|
|
283
279
|
l.disabled || setTimeout(() => {
|
|
284
|
-
Z.value.show(e,
|
|
280
|
+
Z.value.show(e, Ye(e));
|
|
285
281
|
}, 0);
|
|
286
282
|
}, nt = (e) => {
|
|
287
283
|
l.disabled || setTimeout(() => {
|
|
288
284
|
var t;
|
|
289
|
-
(t = Z.value) == null || t.toggle(e,
|
|
285
|
+
(t = Z.value) == null || t.toggle(e, Ye(e));
|
|
290
286
|
}, 0);
|
|
291
287
|
}, ot = () => {
|
|
292
|
-
p.value = l.view,
|
|
293
|
-
},
|
|
294
|
-
switch (t || (t = 500),
|
|
295
|
-
|
|
288
|
+
p.value = l.view, fe(), _.value || Ie();
|
|
289
|
+
}, Ye = (e) => ("$el" in ue.value ? ue.value.$el : we.value) ?? e.currentTarget, Ce = (e, t, a, n) => {
|
|
290
|
+
switch (t || (t = 500), me(), de.value = setTimeout(() => {
|
|
291
|
+
Ce(e, 100, a, n);
|
|
296
292
|
}, t), a) {
|
|
297
293
|
case 0:
|
|
298
294
|
n === 1 ? rt(e) : st(e);
|
|
@@ -314,8 +310,8 @@ const It = ["id"], Pt = ["id", "aria-invalid", "disabled", "placeholder", "value
|
|
|
314
310
|
}, it = (e) => {
|
|
315
311
|
let t = D.value - l.stepMinute;
|
|
316
312
|
t = t < 0 ? 60 + t : t, G(v.value, t, V.value, y.value) && (D.value = t), e.preventDefault();
|
|
317
|
-
},
|
|
318
|
-
|
|
313
|
+
}, me = () => {
|
|
314
|
+
de.value && clearInterval(de.value);
|
|
319
315
|
}, G = (e, t, a, n) => {
|
|
320
316
|
let r;
|
|
321
317
|
const d = dt(e, n);
|
|
@@ -326,20 +322,20 @@ const It = ["id"], Pt = ["id", "aria-invalid", "disabled", "placeholder", "value
|
|
|
326
322
|
r = E() ? o.value : O.value;
|
|
327
323
|
const s = r ? r.toDateString() : null;
|
|
328
324
|
return !(l.minDate && s && l.minDate.toDateString() === s && (l.minDate.getHours() > d || l.minDate.getHours() === d && (l.minDate.getMinutes() > t || l.minDate.getMinutes() === t && l.minDate.getSeconds() > a)) || l.maxDate && s && l.maxDate.toDateString() === s && (l.maxDate.getHours() < d || l.maxDate.getHours() === d && (l.maxDate.getMinutes() < t || l.maxDate.getMinutes() === t && l.maxDate.getSeconds() < a)));
|
|
329
|
-
}, dt = (e, t) => l.hourFormat == "12" ? e === 12 ? t ? 12 : 0 : t ? e + 12 : e : e,
|
|
330
|
-
|
|
325
|
+
}, dt = (e, t) => l.hourFormat == "12" ? e === 12 ? t ? 12 : 0 : t ? e + 12 : e : e, He = () => {
|
|
326
|
+
Me.value = !0;
|
|
331
327
|
let e;
|
|
332
328
|
if (ae(o.value)) {
|
|
333
329
|
const t = E() ? o.value : O.value;
|
|
334
330
|
e = t[b(t)] || t[0];
|
|
335
331
|
} else
|
|
336
332
|
e = E() ? o.value : O.value;
|
|
337
|
-
e = e && !Array.isArray(e) ? new Date(e.getTime()) : /* @__PURE__ */ new Date(), l.hourFormat == "12" ? v.value === 12 ? e.setHours(y.value ? 12 : 0) : e.setHours(y.value ? v.value + 12 : v.value) : e.setHours(v.value), e.setMinutes(D.value), e.setSeconds(V.value), ae(o.value) && (I() ? e = [...o.value] : C() && (o.value[b(o.value)] ? e = [o.value[0], e] : e = [e, null])),
|
|
338
|
-
},
|
|
339
|
-
l.showButtons || l.showTime ? (N.value = e, _.value = !1) : (x("update:epochTimeMillis",
|
|
333
|
+
e = e && !Array.isArray(e) ? new Date(e.getTime()) : /* @__PURE__ */ new Date(), l.hourFormat == "12" ? v.value === 12 ? e.setHours(y.value ? 12 : 0) : e.setHours(y.value ? v.value + 12 : v.value) : e.setHours(v.value), e.setMinutes(D.value), e.setSeconds(V.value), ae(o.value) && (I() ? e = [...o.value] : C() && (o.value[b(o.value)] ? e = [o.value[0], e] : e = [e, null])), Ve(e), x("dateSelect", e), setTimeout(() => Me.value = !1, 0);
|
|
334
|
+
}, Be = (e) => e ? Array.isArray(e) ? e.map((a) => a == null ? void 0 : a.getTime()) : e.getTime() : null, Ve = (e) => {
|
|
335
|
+
l.showButtons || l.showTime ? (N.value = e, _.value = !1) : (x("update:epochTimeMillis", Be(e)), x("update:modelValue", e));
|
|
340
336
|
}, vt = () => {
|
|
341
|
-
x("update:epochTimeMillis",
|
|
342
|
-
},
|
|
337
|
+
x("update:epochTimeMillis", Be(N.value)), x("update:modelValue", N.value), _.value = !0, J();
|
|
338
|
+
}, Ie = () => {
|
|
343
339
|
N.value = l.modelValue, _.value = !0, J();
|
|
344
340
|
}, ct = () => {
|
|
345
341
|
!G(
|
|
@@ -347,13 +343,13 @@ const It = ["id"], Pt = ["id", "aria-invalid", "disabled", "placeholder", "value
|
|
|
347
343
|
D.value,
|
|
348
344
|
V.value,
|
|
349
345
|
!y.value
|
|
350
|
-
) && (l.maxDate || l.minDate) || (y.value = !y.value,
|
|
351
|
-
},
|
|
346
|
+
) && (l.maxDate || l.minDate) || (y.value = !y.value, He());
|
|
347
|
+
}, fe = () => {
|
|
352
348
|
h.value = O.value.getMonth(), i.value = O.value.getFullYear(), l.showTime && mt(O.value);
|
|
353
349
|
}, mt = (e) => {
|
|
354
350
|
let t = e.getHours();
|
|
355
351
|
l.hourFormat === "12" && (y.value = t > 11, t >= 12 ? t = t == 12 ? 12 : t - 12 : t = t == 0 ? 12 : t), v.value = Math.floor(t / l.stepHour) * l.stepHour, D.value = Math.floor(e.getMinutes() / l.stepMinute) * l.stepMinute;
|
|
356
|
-
},
|
|
352
|
+
}, Pe = () => {
|
|
357
353
|
const e = l.showButtons || l.showTime ? N.value : o.value;
|
|
358
354
|
if (typeof e == "string")
|
|
359
355
|
return e;
|
|
@@ -382,13 +378,13 @@ const It = ["id"], Pt = ["id", "aria-invalid", "disabled", "placeholder", "value
|
|
|
382
378
|
const n = (H) => {
|
|
383
379
|
const T = a + 1 < t.length && t.charAt(a + 1) === H;
|
|
384
380
|
return T && a++, T;
|
|
385
|
-
}, r = (H, T,
|
|
381
|
+
}, r = (H, T, pe) => {
|
|
386
382
|
let j = "" + T;
|
|
387
383
|
if (n(H))
|
|
388
|
-
for (; j.length <
|
|
384
|
+
for (; j.length < pe; )
|
|
389
385
|
j = "0" + j;
|
|
390
386
|
return j;
|
|
391
|
-
}, d = (H, T,
|
|
387
|
+
}, d = (H, T, pe, j) => n(H) ? j[T] : pe[T];
|
|
392
388
|
let s = "", m = !1;
|
|
393
389
|
if (e)
|
|
394
390
|
for (a = 0; a < t.length; a++)
|
|
@@ -478,16 +474,16 @@ const It = ["id"], Pt = ["id", "aria-invalid", "disabled", "placeholder", "value
|
|
|
478
474
|
!r && t.getTime() >= n.getTime() ? r = t : (n = t, r = null), a = [n, r];
|
|
479
475
|
} else
|
|
480
476
|
a = [t, null];
|
|
481
|
-
a !== null &&
|
|
477
|
+
a !== null && Ve(a), ht(a), x("dateSelect", t);
|
|
482
478
|
}, ht = (e) => {
|
|
483
479
|
const t = l.exactSelection ? e.length > 1 : e && e[b(e)] !== null;
|
|
484
480
|
C() && l.hideOnRangeSelection && !l.showButtons && !l.showTime && t && J();
|
|
485
481
|
}, yt = (e, t) => {
|
|
486
|
-
const a =
|
|
487
|
-
if (!
|
|
488
|
-
return
|
|
482
|
+
const a = ve.value;
|
|
483
|
+
if (!ve.value || a.day === e.day)
|
|
484
|
+
return ve.value = e, ke.value = ee.value, [t];
|
|
489
485
|
const n = a.month === e.month ? ee.value.filter((r) => r.day > a.day && r.day < e.day).map((r) => new Date(r.year, r.month, r.day)) : [
|
|
490
|
-
...
|
|
486
|
+
...ke.value.filter((r) => !r.otherMonth && r.day > a.day).map((r) => new Date(r.year, r.month, r.day)),
|
|
491
487
|
...ee.value.filter((r) => !r.otherMonth && r.day < e.day).map((r) => new Date(r.year, r.month, r.day))
|
|
492
488
|
];
|
|
493
489
|
return [
|
|
@@ -501,7 +497,7 @@ const It = ["id"], Pt = ["id", "aria-invalid", "disabled", "placeholder", "value
|
|
|
501
497
|
(e = Z.value) == null || e.hide();
|
|
502
498
|
}, 150);
|
|
503
499
|
};
|
|
504
|
-
return
|
|
500
|
+
return ge(
|
|
505
501
|
() => [
|
|
506
502
|
l.minDate,
|
|
507
503
|
l.maxDate,
|
|
@@ -510,38 +506,38 @@ const It = ["id"], Pt = ["id", "aria-invalid", "disabled", "placeholder", "value
|
|
|
510
506
|
l.maxMonth
|
|
511
507
|
],
|
|
512
508
|
() => R()
|
|
513
|
-
),
|
|
509
|
+
), ge(
|
|
514
510
|
() => o.value,
|
|
515
511
|
() => {
|
|
516
|
-
|
|
512
|
+
fe(), ie.value = Pe();
|
|
517
513
|
},
|
|
518
514
|
{
|
|
519
515
|
immediate: !0
|
|
520
516
|
}
|
|
521
|
-
), (l.showButtons || l.showTime) &&
|
|
517
|
+
), (l.showButtons || l.showTime) && ge(
|
|
522
518
|
N,
|
|
523
519
|
() => {
|
|
524
|
-
|
|
520
|
+
fe(), ie.value = Pe();
|
|
525
521
|
},
|
|
526
522
|
{
|
|
527
523
|
immediate: !0,
|
|
528
524
|
deep: !0
|
|
529
525
|
}
|
|
530
|
-
), (e, t) => (c(),
|
|
526
|
+
), (e, t) => (c(), he(Ht, {
|
|
531
527
|
ref_key: "wrapper",
|
|
532
|
-
ref:
|
|
528
|
+
ref: ue,
|
|
533
529
|
info: e.fieldInfo,
|
|
534
530
|
label: e.label,
|
|
535
531
|
mandatory: e.mandatory,
|
|
536
532
|
"show-optional-text": e.showOptionalText
|
|
537
533
|
}, {
|
|
538
|
-
default:
|
|
539
|
-
U(e.$slots, "default", { onClick:
|
|
534
|
+
default: ye(() => [
|
|
535
|
+
U(e.$slots, "default", { onClick: Fe }, () => [
|
|
540
536
|
S(Bt, {
|
|
541
537
|
disabled: e.disabled,
|
|
542
538
|
invalid: Re.value
|
|
543
539
|
}, {
|
|
544
|
-
default:
|
|
540
|
+
default: ye(() => [
|
|
545
541
|
f("span", u(e.$preset.calendar.root({ props: l }), {
|
|
546
542
|
id: e.id,
|
|
547
543
|
"data-wv-name": "calendar",
|
|
@@ -550,13 +546,13 @@ const It = ["id"], Pt = ["id", "aria-invalid", "disabled", "placeholder", "value
|
|
|
550
546
|
f("input", u({
|
|
551
547
|
id: e.inputId,
|
|
552
548
|
ref_key: "input",
|
|
553
|
-
ref:
|
|
549
|
+
ref: we,
|
|
554
550
|
"aria-invalid": e.invalid || void 0,
|
|
555
551
|
disabled: e.disabled,
|
|
556
552
|
placeholder: e.placeholder ?? q(Y).locale.defaultPlaceholder,
|
|
557
553
|
tabindex: 0,
|
|
558
|
-
value:
|
|
559
|
-
onClick:
|
|
554
|
+
value: ie.value,
|
|
555
|
+
onClick: Fe,
|
|
560
556
|
"aria-autocomplete": "none",
|
|
561
557
|
autocomplete: "off",
|
|
562
558
|
inputmode: "none",
|
|
@@ -583,7 +579,7 @@ const It = ["id"], Pt = ["id", "aria-invalid", "disabled", "placeholder", "value
|
|
|
583
579
|
},
|
|
584
580
|
onHide: ot
|
|
585
581
|
}, {
|
|
586
|
-
default:
|
|
582
|
+
default: ye(() => [
|
|
587
583
|
f("div", u(e.$preset.calendar.panel({ props: l }), { "data-wv-section": "panel" }), [
|
|
588
584
|
f("div", u(e.$preset.calendar.container, { "data-wv-section": "container" }), [
|
|
589
585
|
f("div", u(e.$preset.calendar.header({ props: l, state: { currentView: p.value } }), { "data-wv-section": "navigation" }), [
|
|
@@ -634,16 +630,16 @@ const It = ["id"], Pt = ["id", "aria-invalid", "disabled", "placeholder", "value
|
|
|
634
630
|
"data-wv-today": a.today,
|
|
635
631
|
"data-wv-section": "day"
|
|
636
632
|
}, [
|
|
637
|
-
|
|
633
|
+
be.value && !a.otherMonth ? (c(), he(q(Ct), {
|
|
638
634
|
key: 0,
|
|
639
635
|
class: "!w-8 !h-8",
|
|
640
636
|
shape: "circle"
|
|
641
|
-
})) :
|
|
637
|
+
})) : be.value ? $("", !0) : (c(), g("span", u(
|
|
642
638
|
{
|
|
643
639
|
key: 1,
|
|
644
640
|
"aria-disabled": !a.selectable,
|
|
645
641
|
"data-p-disabled": a.otherMonth || !a.selectable,
|
|
646
|
-
onClick: (r) =>
|
|
642
|
+
onClick: (r) => ce(r, a),
|
|
647
643
|
ref_for: !0
|
|
648
644
|
},
|
|
649
645
|
e.$preset.calendar.daylabel({
|
|
@@ -683,13 +679,13 @@ const It = ["id"], Pt = ["id", "aria-invalid", "disabled", "placeholder", "value
|
|
|
683
679
|
context: {
|
|
684
680
|
month: a,
|
|
685
681
|
monthIndex: n,
|
|
686
|
-
selected:
|
|
682
|
+
selected: Se(n),
|
|
687
683
|
disabled: !a.selectable
|
|
688
684
|
}
|
|
689
685
|
}),
|
|
690
686
|
{
|
|
691
687
|
"data-p-disabled": !a.selectable,
|
|
692
|
-
"data-p-highlight":
|
|
688
|
+
"data-p-highlight": Se(n),
|
|
693
689
|
onClick: (r) => at(r, a)
|
|
694
690
|
}
|
|
695
691
|
), F(e.$wangsvue.config.locale.global.monthNamesShort[a.value]), 17, Rt))), 128))
|
|
@@ -703,13 +699,13 @@ const It = ["id"], Pt = ["id", "aria-invalid", "disabled", "placeholder", "value
|
|
|
703
699
|
e.$preset.calendar.year({
|
|
704
700
|
context: {
|
|
705
701
|
year: a,
|
|
706
|
-
selected:
|
|
702
|
+
selected: $e(a.value),
|
|
707
703
|
disabled: !a.selectable
|
|
708
704
|
}
|
|
709
705
|
}),
|
|
710
706
|
{
|
|
711
707
|
"data-p-disabled": !a.selectable,
|
|
712
|
-
"data-p-highlight":
|
|
708
|
+
"data-p-highlight": $e(a.value),
|
|
713
709
|
onClick: (n) => lt(n, a)
|
|
714
710
|
}
|
|
715
711
|
), F(a.value), 17, jt))), 128))
|
|
@@ -838,7 +834,7 @@ const It = ["id"], Pt = ["id", "aria-invalid", "disabled", "placeholder", "value
|
|
|
838
834
|
])
|
|
839
835
|
], 16, Gt)
|
|
840
836
|
], 16),
|
|
841
|
-
e.hourFormat === "12" ? (c(),
|
|
837
|
+
e.hourFormat === "12" ? (c(), he(q(Yt), {
|
|
842
838
|
key: 0,
|
|
843
839
|
"model-value": y.value,
|
|
844
840
|
options: [
|
|
@@ -854,7 +850,7 @@ const It = ["id"], Pt = ["id", "aria-invalid", "disabled", "placeholder", "value
|
|
|
854
850
|
e.showButtons || e.showTime ? Mt((c(), g("div", Jt, [
|
|
855
851
|
S(se, {
|
|
856
852
|
label: q(Y).locale.cancelFooterButtonLabel,
|
|
857
|
-
onClick:
|
|
853
|
+
onClick: Ie,
|
|
858
854
|
severity: "secondary",
|
|
859
855
|
text: ""
|
|
860
856
|
}, null, 8, ["label"]),
|
package/calendar/index.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { u as
|
|
3
|
-
import { u as
|
|
4
|
-
import { a as
|
|
5
|
-
import { _ as
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as T, onMounted as w, ref as p, computed as v, watch as n, watchEffect as C, createBlock as x, openBlock as D, mergeProps as b, unref as F, withCtx as f, renderSlot as c, nextTick as S } from "vue";
|
|
2
|
+
import { u as k } from "../vendor/vee-validate/dist/vee-validate.esm.es.js";
|
|
3
|
+
import { u as I } from "../plugins/WangsVue.es.js";
|
|
4
|
+
import { a as L } from "../utils/textFormatter.util.es.js";
|
|
5
|
+
import { _ as O } from "../basecalendar/index.es.js";
|
|
6
|
+
const N = /* @__PURE__ */ T({
|
|
7
7
|
__name: "Calendar",
|
|
8
8
|
props: {
|
|
9
9
|
modelValue: {},
|
|
@@ -48,73 +48,70 @@ const H = /* @__PURE__ */ C({
|
|
|
48
48
|
exactSelection: { type: Boolean }
|
|
49
49
|
},
|
|
50
50
|
emits: ["update:modelValue", "update:epochTimeMillis", "monthChange", "yearChange", "dateSelect"],
|
|
51
|
-
setup(
|
|
52
|
-
const e =
|
|
53
|
-
|
|
54
|
-
e.dateValue != null && (t.value =
|
|
51
|
+
setup(y, { emit: V }) {
|
|
52
|
+
const e = y, r = V;
|
|
53
|
+
w(() => {
|
|
54
|
+
e.dateValue != null && (t.value = d(e.dateValue), o.value = t.value, u.value++), e.epochTimeMillis != null && (t.value = d(e.epochTimeMillis), o.value = t.value, u.value++);
|
|
55
55
|
});
|
|
56
|
-
const { locale:
|
|
57
|
-
value:
|
|
56
|
+
const { locale: M } = I("Calendar"), t = p(), u = p(0), { value: o, errorMessage: g } = e.useValidator ? k(e.fieldName ?? "date", (a) => B(a)) : {
|
|
57
|
+
value: v({
|
|
58
58
|
get: () => e.modelValue,
|
|
59
59
|
set: (a) => {
|
|
60
|
-
|
|
60
|
+
r("update:modelValue", a);
|
|
61
61
|
}
|
|
62
62
|
})
|
|
63
|
-
},
|
|
63
|
+
}, h = v(
|
|
64
64
|
() => e.invalid || "errorMessage" in o && !!o.errorMessage
|
|
65
|
-
),
|
|
65
|
+
), B = async (a) => {
|
|
66
66
|
var l, i;
|
|
67
|
-
return await
|
|
68
|
-
},
|
|
67
|
+
return await S(), typeof e.validatorMessage == "string" && e.invalid ? e.validatorMessage : typeof e.validatorMessage != "string" && !a && e.mandatory ? ((l = e.validatorMessage) == null ? void 0 : l.empty) ?? s() : !a && e.mandatory ? ((i = e.customValidation) == null ? void 0 : i.empty) ?? s() : !0;
|
|
68
|
+
}, s = () => {
|
|
69
69
|
var a;
|
|
70
|
-
return
|
|
70
|
+
return M.emptyInvalidText.replace("{label}", e.label).replace(
|
|
71
71
|
"{formattedLabel}",
|
|
72
|
-
(a =
|
|
72
|
+
(a = L(e.label)) == null ? void 0 : a.toLowerCase()
|
|
73
73
|
);
|
|
74
|
-
},
|
|
75
|
-
(a === e.valueFormat && e.useValidator || !e.useValidator && a === "date") && (o.value = l), a === "date" && e.useValidator &&
|
|
76
|
-
},
|
|
77
|
-
return
|
|
74
|
+
}, m = (a, l) => {
|
|
75
|
+
(a === e.valueFormat && e.useValidator || !e.useValidator && a === "date") && (o.value = l), a === "date" && e.useValidator && r("update:modelValue", l), a === "millis" && r("update:epochTimeMillis", l);
|
|
76
|
+
}, d = (a) => Array.isArray(a) ? a.map((l) => l == null ? null : new Date(l)) : new Date(a);
|
|
77
|
+
return n(
|
|
78
78
|
() => e.dateValue,
|
|
79
79
|
() => {
|
|
80
|
-
t.value =
|
|
80
|
+
t.value = d(e.dateValue), e.useValidator && (o.value = t.value), u.value++;
|
|
81
81
|
},
|
|
82
82
|
{
|
|
83
83
|
once: !0
|
|
84
84
|
}
|
|
85
|
-
),
|
|
85
|
+
), n(
|
|
86
86
|
() => e.epochTimeMillis,
|
|
87
87
|
() => {
|
|
88
|
-
t.value =
|
|
88
|
+
t.value = d(e.epochTimeMillis), e.useValidator && (o.value = t.value), u.value++;
|
|
89
89
|
}
|
|
90
|
-
),
|
|
90
|
+
), n(
|
|
91
91
|
() => e.modelValue,
|
|
92
92
|
() => {
|
|
93
93
|
t.value = e.modelValue, e.useValidator && (o.value = t.value);
|
|
94
94
|
}
|
|
95
|
-
),
|
|
96
|
-
t.value = e.valueFormat === "date" ? o.value : o.value ?
|
|
97
|
-
}), (a, l) => (
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
_: 3
|
|
114
|
-
}, 16, ["error-message", "invalid", "model-value", "selection-mode"]))
|
|
115
|
-
]));
|
|
95
|
+
), C(() => {
|
|
96
|
+
t.value = e.valueFormat === "date" ? o.value : o.value ? d(o.value) : o.value;
|
|
97
|
+
}), (a, l) => (D(), x(O, b({ key: u.value }, e, {
|
|
98
|
+
"error-message": F(g),
|
|
99
|
+
invalid: h.value,
|
|
100
|
+
"model-value": t.value,
|
|
101
|
+
"selection-mode": a.selectionMode || a.mode,
|
|
102
|
+
"onUpdate:epochTimeMillis": l[0] || (l[0] = (i) => m("millis", i)),
|
|
103
|
+
"onUpdate:modelValue": l[1] || (l[1] = (i) => m("date", i))
|
|
104
|
+
}), {
|
|
105
|
+
default: f(({ onClick: i }) => [
|
|
106
|
+
c(a.$slots, "default", { onClick: i })
|
|
107
|
+
]),
|
|
108
|
+
"addon-overlay": f(() => [
|
|
109
|
+
c(a.$slots, "addon-overlay")
|
|
110
|
+
]),
|
|
111
|
+
_: 3
|
|
112
|
+
}, 16, ["error-message", "invalid", "model-value", "selection-mode"]));
|
|
116
113
|
}
|
|
117
114
|
});
|
|
118
115
|
export {
|
|
119
|
-
|
|
116
|
+
N as _
|
|
120
117
|
};
|
package/datatable/index.es.js
CHANGED
|
@@ -988,7 +988,7 @@ const zt = (W, $) => W.every((t) => $.includes(t)), jt = ["id"], Vt = ["onClick"
|
|
|
988
988
|
], 16);
|
|
989
989
|
};
|
|
990
990
|
}
|
|
991
|
-
}), Fl = /* @__PURE__ */ Lt(sl, [["__scopeId", "data-v-
|
|
991
|
+
}), Fl = /* @__PURE__ */ Lt(sl, [["__scopeId", "data-v-37d9df20"]]);
|
|
992
992
|
export {
|
|
993
993
|
Fl as D
|
|
994
994
|
};
|
|
@@ -231,8 +231,8 @@ const H = /* @__PURE__ */ nA(vA), j = "data:image/png;base64,iVBORw0KGgoAAAANSUh
|
|
|
231
231
|
t[4] || (t[4] = e("span", null, "Preview", -1)),
|
|
232
232
|
a(eA, {
|
|
233
233
|
icon: "info",
|
|
234
|
-
info: `This preview is only for showing the side of the
|
|
235
|
-
label that printed or not. It does not show the
|
|
234
|
+
info: `This preview is only for showing the side of the
|
|
235
|
+
label that printed or not. It does not show the
|
|
236
236
|
exact amount you entered.`,
|
|
237
237
|
severity: "primary"
|
|
238
238
|
})
|