@ianicdev/datatables2 0.9.10 → 0.10.1

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.
Files changed (42) hide show
  1. package/dist/{Columns-CPYUVLvE.js → Columns-6xlIFq_S.js} +1 -1
  2. package/dist/{Columns-BaARuW1m.cjs → Columns-DC9bpj0E.cjs} +1 -1
  3. package/dist/{Comparison-BiPlTpXM.js → Comparison-Dq4BkohR.js} +1 -1
  4. package/dist/{Comparison-DDhGIBui.cjs → Comparison-ame-DP3a.cjs} +1 -1
  5. package/dist/Datepicker--ZUiSi7m.js +1411 -0
  6. package/dist/Datepicker-COihnScF.cjs +2 -0
  7. package/dist/{Download-FGUE_z5x.js → Download-2WQpbEfa.js} +2 -2
  8. package/dist/{Download-DZqwXPMb.cjs → Download-zuQjsbMu.cjs} +1 -1
  9. package/dist/{Options-B-Vq57w_.cjs → Options-BjAdXS-q.cjs} +1 -1
  10. package/dist/{Options-CAwRqQpx.js → Options-g9ZSVebW.js} +1 -1
  11. package/dist/{RefreshTable-C-UPC-U5.cjs → RefreshTable-C3L0Baro.cjs} +1 -1
  12. package/dist/{RefreshTable-DyLlkCOt.js → RefreshTable-C966AEK4.js} +2 -2
  13. package/dist/{Search-Tks4mpaH.cjs → Search-BBoxkqD7.cjs} +1 -1
  14. package/dist/{Search-DBOrKgEi.js → Search-BPB-1_Dp.js} +2 -2
  15. package/dist/{Table-DYDzb63V.cjs → Table-BulChdHr.cjs} +1 -1
  16. package/dist/{Table-P8c-sRdr.js → Table-vFGT7Szy.js} +2 -2
  17. package/dist/{TableServer--svcmINA.js → TableServer-DAj4z8yP.js} +1138 -1134
  18. package/dist/TableServer-Dc9U14eJ.cjs +20 -0
  19. package/dist/cellRender-Cfwedens.cjs +1 -0
  20. package/dist/{cellRender-BPzg8pfq.js → cellRender-Ct6pUDNH.js} +986 -921
  21. package/dist/{dataTables-CPrc2H_E.js → dataTables-B-LwTPCL.js} +2409 -2263
  22. package/dist/dataTables-Bk4R-V8b.cjs +4 -0
  23. package/dist/datatables.cjs +1 -1
  24. package/dist/datatables.js +1 -1
  25. package/dist/datatables2.css +1 -1
  26. package/dist/index-3kLkZg7E.js +4101 -0
  27. package/dist/{index-Dn353bZ1.cjs → index-B6qrTNVx.cjs} +1 -1
  28. package/dist/index-B_4Yq7Un.cjs +1 -0
  29. package/dist/{index-CXBiVM0n.js → index-CQy1mX45.js} +1 -1
  30. package/dist/{index.es-DbLPWyn6.cjs → index.es-Ciudu1vj.cjs} +2 -2
  31. package/dist/{index.es-BXudRhtE.js → index.es-eRsZ1LFr.js} +10 -6
  32. package/dist/jspdf-B3ZoDzKb.cjs +79 -0
  33. package/dist/{jspdf-Dt---f5Z.js → jspdf-ooxm5O8S.js} +3905 -3893
  34. package/package.json +13 -13
  35. package/dist/Datepicker-CzJ1wZmm.cjs +0 -1
  36. package/dist/Datepicker-KGlOP9ck.js +0 -1269
  37. package/dist/TableServer-ftB17VAQ.cjs +0 -20
  38. package/dist/cellRender-DpRXHxxv.cjs +0 -1
  39. package/dist/dataTables-CxQh692H.cjs +0 -4
  40. package/dist/index-BTfw-D-T.cjs +0 -1
  41. package/dist/index-BW-yzY3p.js +0 -4106
  42. package/dist/jspdf-DQdhUPLM.cjs +0 -79
@@ -1,1269 +0,0 @@
1
- import { createVNode as w, mergeProps as O, createElementVNode as x, normalizeStyle as pe, normalizeClass as Z, inject as He, reactive as Le, watch as oe, ref as re, watchEffect as fe, computed as V, Fragment as ie, shallowRef as q, toRef as te, createTextVNode as Je, withDirectives as ze, mergeModels as Ke, useModel as Ze, createBlock as qe, openBlock as Xe, unref as he, isRef as Ge } from "vue";
2
- import E from "moment";
3
- import { c as Ye, g as N, p as T, P as _e, u as R, e as ve, T as X, K as F, aX as ke, J as Qe, a9 as $, ax as me, I as le, W as Oe, H as et, N as ee, S as H, aT as Ie, ay as ge, aY as tt, a0 as at, am as nt, ag as lt, aj as rt, a1 as it, aD as ot, a2 as ut, ao as dt } from "./dataTables-CPrc2H_E.js";
4
- import { j as De, m as st, g as be, l as ct, n as ft } from "./index-BW-yzY3p.js";
5
- const vt = Ye("v-picker-title"), Fe = T({
6
- bgColor: String,
7
- divided: Boolean,
8
- landscape: Boolean,
9
- title: String,
10
- hideHeader: Boolean,
11
- hideTitle: Boolean,
12
- ...st()
13
- }, "VPicker"), Ve = N()({
14
- name: "VPicker",
15
- props: Fe(),
16
- setup(e, a) {
17
- let {
18
- slots: r
19
- } = a;
20
- const {
21
- backgroundColorClasses: n,
22
- backgroundColorStyles: t
23
- } = _e(() => e.color);
24
- return R(() => {
25
- const i = De.filterProps(e), d = !e.hideTitle && !!(e.title || r.title);
26
- return w(De, O(i, {
27
- color: e.bgColor,
28
- class: ["v-picker", {
29
- "v-picker--divided": e.divided,
30
- "v-picker--landscape": e.landscape,
31
- "v-picker--with-actions": !!r.actions
32
- }, e.class],
33
- style: e.style
34
- }), {
35
- default: () => [!e.hideHeader && x("div", {
36
- key: "header",
37
- class: Z([n.value]),
38
- style: pe([t.value])
39
- }, [d && w(vt, {
40
- key: "picker-title"
41
- }, {
42
- default: () => [r.title?.() ?? e.title]
43
- }), r.header && x("div", {
44
- class: "v-picker__header"
45
- }, [r.header()])]), x("div", {
46
- class: "v-picker__body"
47
- }, [r.default?.()]), r.actions && w(ve, {
48
- defaults: {
49
- VBtn: {
50
- slim: !0,
51
- variant: "text"
52
- }
53
- }
54
- }, {
55
- default: () => [x("div", {
56
- class: "v-picker__actions"
57
- }, [r.actions()])]
58
- })]
59
- });
60
- }), {};
61
- }
62
- }), mt = Symbol.for("vuetify:date-options");
63
- function Be(e, a, r) {
64
- const n = Te(e, a, r), t = [a];
65
- for (let i = 1; i < n; i++) {
66
- const d = e.addDays(a, i);
67
- t.push(d);
68
- }
69
- return r && t.push(e.endOfDay(r)), t;
70
- }
71
- function Te(e, a, r) {
72
- const n = [`${e.toISO(r ?? a).split("T")[0]}T00:00:00Z`, `${e.toISO(a).split("T")[0]}T00:00:00Z`];
73
- return typeof e.date() == "string" ? e.getDiff(n[0], n[1], "days") : e.getDiff(e.date(n[0]), e.date(n[1]), "days");
74
- }
75
- function yt(e, a) {
76
- const r = Le(typeof e.adapter == "function" ? new e.adapter({
77
- locale: e.locale[a.current.value] ?? a.current.value,
78
- formats: e.formats
79
- }) : e.adapter);
80
- return oe(a.current, (n) => {
81
- r.locale = e.locale[n] ?? n ?? r.locale;
82
- }), r;
83
- }
84
- function L() {
85
- const e = He(mt);
86
- if (!e) throw new Error("[Vuetify] Could not find injected date options");
87
- const a = X();
88
- return yt(e, a);
89
- }
90
- const $e = T({
91
- modelValue: null,
92
- color: String,
93
- cancelText: {
94
- type: String,
95
- default: "$vuetify.confirmEdit.cancel"
96
- },
97
- okText: {
98
- type: String,
99
- default: "$vuetify.confirmEdit.ok"
100
- },
101
- disabled: {
102
- type: [Boolean, Array],
103
- default: void 0
104
- },
105
- hideActions: Boolean
106
- }, "VConfirmEdit"), we = N()({
107
- name: "VConfirmEdit",
108
- props: $e(),
109
- emits: {
110
- cancel: () => !0,
111
- save: (e) => !0,
112
- "update:modelValue": (e) => !0
113
- },
114
- setup(e, a) {
115
- let {
116
- emit: r,
117
- slots: n
118
- } = a;
119
- const t = F(e, "modelValue"), i = re();
120
- fe(() => {
121
- i.value = structuredClone(ke(t.value));
122
- });
123
- const {
124
- t: d
125
- } = X(), u = V(() => Qe(t.value, i.value));
126
- function s(l) {
127
- return typeof e.disabled == "boolean" ? e.disabled : Array.isArray(e.disabled) ? e.disabled.includes(l) : u.value;
128
- }
129
- const k = V(() => s("save")), f = V(() => s("cancel"));
130
- function h() {
131
- t.value = i.value, r("save", i.value);
132
- }
133
- function D() {
134
- i.value = structuredClone(ke(t.value)), r("cancel");
135
- }
136
- function S(l) {
137
- return x(ie, null, [w($, O({
138
- disabled: f.value,
139
- variant: "text",
140
- color: e.color,
141
- onClick: D,
142
- text: d(e.cancelText)
143
- }, l), null), w($, O({
144
- disabled: k.value,
145
- variant: "text",
146
- color: e.color,
147
- onClick: h,
148
- text: d(e.okText)
149
- }, l), null)]);
150
- }
151
- let p = !1;
152
- return R(() => x(ie, null, [n.default?.({
153
- model: i,
154
- save: h,
155
- cancel: D,
156
- isPristine: u.value,
157
- get actions() {
158
- return p = !0, S;
159
- }
160
- }), !e.hideActions && !p && S()])), {
161
- save: h,
162
- cancel: D,
163
- isPristine: u
164
- };
165
- }
166
- }), ht = Ye("v-spacer", "div", "VSpacer"), We = T({
167
- active: {
168
- type: [String, Array],
169
- default: void 0
170
- },
171
- controlHeight: [Number, String],
172
- disabled: {
173
- type: [Boolean, String, Array],
174
- default: null
175
- },
176
- nextIcon: {
177
- type: le,
178
- default: "$next"
179
- },
180
- prevIcon: {
181
- type: le,
182
- default: "$prev"
183
- },
184
- modeIcon: {
185
- type: le,
186
- default: "$subgroup"
187
- },
188
- text: String,
189
- viewMode: {
190
- type: String,
191
- default: "month"
192
- }
193
- }, "VDatePickerControls"), Pe = N()({
194
- name: "VDatePickerControls",
195
- props: We(),
196
- emits: {
197
- "click:year": () => !0,
198
- "click:month": () => !0,
199
- "click:prev": () => !0,
200
- "click:next": () => !0,
201
- "click:text": () => !0
202
- },
203
- setup(e, a) {
204
- let {
205
- emit: r
206
- } = a;
207
- const {
208
- t: n
209
- } = X(), t = V(() => Array.isArray(e.disabled) ? e.disabled.includes("text") : !!e.disabled), i = V(() => Array.isArray(e.disabled) ? e.disabled.includes("mode") : !!e.disabled), d = V(() => Array.isArray(e.disabled) ? e.disabled.includes("prev") : !!e.disabled), u = V(() => Array.isArray(e.disabled) ? e.disabled.includes("next") : !!e.disabled);
210
- function s() {
211
- r("click:prev");
212
- }
213
- function k() {
214
- r("click:next");
215
- }
216
- function f() {
217
- r("click:year");
218
- }
219
- function h() {
220
- r("click:month");
221
- }
222
- return R(() => x("div", {
223
- class: Z(["v-date-picker-controls"]),
224
- style: {
225
- "--v-date-picker-controls-height": me(e.controlHeight)
226
- }
227
- }, [w($, {
228
- class: "v-date-picker-controls__month-btn",
229
- "data-testid": "month-btn",
230
- disabled: t.value,
231
- text: e.text,
232
- variant: "text",
233
- rounded: !0,
234
- onClick: h
235
- }, null), w($, {
236
- class: "v-date-picker-controls__mode-btn",
237
- "data-testid": "year-btn",
238
- disabled: i.value,
239
- density: "comfortable",
240
- icon: e.modeIcon,
241
- variant: "text",
242
- "aria-label": n("$vuetify.datePicker.ariaLabel.selectYear"),
243
- onClick: f
244
- }, null), w(ht, null, null), x("div", {
245
- class: "v-date-picker-controls__month"
246
- }, [w($, {
247
- "data-testid": "prev-month",
248
- disabled: d.value,
249
- density: "comfortable",
250
- icon: e.prevIcon,
251
- variant: "text",
252
- "aria-label": n("$vuetify.datePicker.ariaLabel.previousMonth"),
253
- onClick: s
254
- }, null), w($, {
255
- "data-testid": "next-month",
256
- disabled: u.value,
257
- icon: e.nextIcon,
258
- density: "comfortable",
259
- variant: "text",
260
- "aria-label": n("$vuetify.datePicker.ariaLabel.nextMonth"),
261
- onClick: k
262
- }, null)])])), {};
263
- }
264
- }), kt = T({
265
- appendIcon: le,
266
- color: String,
267
- header: String,
268
- transition: String,
269
- onClick: et()
270
- }, "VDatePickerHeader"), xe = N()({
271
- name: "VDatePickerHeader",
272
- props: kt(),
273
- emits: {
274
- click: () => !0,
275
- "click:append": () => !0
276
- },
277
- setup(e, a) {
278
- let {
279
- emit: r,
280
- slots: n
281
- } = a;
282
- const {
283
- backgroundColorClasses: t,
284
- backgroundColorStyles: i
285
- } = _e(() => e.color);
286
- function d() {
287
- r("click");
288
- }
289
- function u() {
290
- r("click:append");
291
- }
292
- return R(() => {
293
- const s = !!(n.default || e.header), k = !!(n.append || e.appendIcon);
294
- return x("div", {
295
- class: Z(["v-date-picker-header", {
296
- "v-date-picker-header--clickable": !!e.onClick
297
- }, t.value]),
298
- style: pe(i.value),
299
- onClick: d
300
- }, [n.prepend && x("div", {
301
- key: "prepend",
302
- class: "v-date-picker-header__prepend"
303
- }, [n.prepend()]), s && w(Oe, {
304
- key: "content",
305
- name: e.transition
306
- }, {
307
- default: () => [x("div", {
308
- key: e.header,
309
- class: "v-date-picker-header__content"
310
- }, [n.default?.() ?? e.header])]
311
- }), k && x("div", {
312
- class: "v-date-picker-header__append"
313
- }, [n.append ? w(ve, {
314
- key: "append-defaults",
315
- disabled: !e.appendIcon,
316
- defaults: {
317
- VBtn: {
318
- icon: e.appendIcon,
319
- variant: "text"
320
- }
321
- }
322
- }, {
323
- default: () => [n.append?.()]
324
- }) : w($, {
325
- key: "append-btn",
326
- icon: e.appendIcon,
327
- variant: "text",
328
- onClick: u
329
- }, null)])]);
330
- }), {};
331
- }
332
- }), gt = T({
333
- allowedDates: [Array, Function],
334
- disabled: {
335
- type: Boolean,
336
- default: null
337
- },
338
- displayValue: null,
339
- modelValue: Array,
340
- month: [Number, String],
341
- max: null,
342
- min: null,
343
- showAdjacentMonths: Boolean,
344
- year: [Number, String],
345
- weekdays: {
346
- type: Array,
347
- default: () => [0, 1, 2, 3, 4, 5, 6]
348
- },
349
- weeksInMonth: {
350
- type: String,
351
- default: "dynamic"
352
- },
353
- firstDayOfWeek: {
354
- type: [Number, String],
355
- default: void 0
356
- },
357
- firstDayOfYear: {
358
- type: [Number, String],
359
- default: void 0
360
- },
361
- weekdayFormat: String
362
- }, "calendar");
363
- function Dt(e) {
364
- const a = L(), r = F(e, "modelValue", [], (l) => ee(l).map((y) => a.date(y))), n = V(() => e.displayValue ? a.date(e.displayValue) : r.value.length > 0 ? a.date(r.value[0]) : e.min ? a.date(e.min) : Array.isArray(e.allowedDates) ? a.date(e.allowedDates[0]) : a.date()), t = F(e, "year", void 0, (l) => {
365
- const y = l != null ? Number(l) : a.getYear(n.value);
366
- return a.startOfYear(a.setYear(a.date(), y));
367
- }, (l) => a.getYear(l)), i = F(e, "month", void 0, (l) => {
368
- const y = l != null ? Number(l) : a.getMonth(n.value), c = a.setYear(a.startOfMonth(a.date()), a.getYear(t.value));
369
- return a.setMonth(c, y);
370
- }, (l) => a.getMonth(l)), d = V(() => {
371
- const l = a.toJsDate(a.startOfWeek(a.date(), e.firstDayOfWeek)).getDay();
372
- return a.getWeekdays(e.firstDayOfWeek, e.weekdayFormat).filter((y, c) => e.weekdays.includes((c + l) % 7));
373
- }), u = V(() => {
374
- const l = a.getWeekArray(i.value, e.firstDayOfWeek), y = l.flat(), c = 42;
375
- if (e.weeksInMonth === "static" && y.length < c) {
376
- const b = y[y.length - 1];
377
- let C = [];
378
- for (let o = 1; o <= c - y.length; o++)
379
- C.push(a.addDays(b, o)), o % 7 === 0 && (l.push(C), C = []);
380
- }
381
- return l;
382
- });
383
- function s(l, y) {
384
- return l.filter((c) => e.weekdays.includes(a.toJsDate(c).getDay())).map((c, b) => {
385
- const C = a.toISO(c), o = !a.isSameMonth(c, i.value), P = a.isSameDay(c, a.startOfMonth(i.value)), Y = a.isSameDay(c, a.endOfMonth(i.value)), G = a.isSameDay(c, i.value), W = e.weekdays.length;
386
- return {
387
- date: c,
388
- formatted: a.format(c, "keyboardDate"),
389
- isAdjacent: o,
390
- isDisabled: p(c),
391
- isEnd: Y,
392
- isHidden: o && !e.showAdjacentMonths,
393
- isSame: G,
394
- isSelected: r.value.some((K) => a.isSameDay(c, K)),
395
- isStart: P,
396
- isToday: a.isSameDay(c, y),
397
- isWeekEnd: b % W === W - 1,
398
- isWeekStart: b % W === 0,
399
- isoDate: C,
400
- localized: a.format(c, "dayOfMonth"),
401
- month: a.getMonth(c),
402
- year: a.getYear(c)
403
- };
404
- });
405
- }
406
- const k = V(() => {
407
- const l = a.startOfWeek(n.value, e.firstDayOfWeek), y = [];
408
- for (let b = 0; b <= 6; b++)
409
- y.push(a.addDays(l, b));
410
- const c = a.date();
411
- return s(y, c);
412
- }), f = V(() => {
413
- const l = u.value.flat(), y = a.date();
414
- return s(l, y);
415
- }), h = V(() => u.value.map((l) => l.length ? a.getWeek(l[0], e.firstDayOfWeek, e.firstDayOfYear) : null)), {
416
- minDate: D,
417
- maxDate: S
418
- } = ye(e);
419
- function p(l) {
420
- if (e.disabled) return !0;
421
- const y = a.date(l);
422
- return D.value && a.isBefore(a.endOfDay(y), D.value) || S.value && a.isAfter(y, S.value) ? !0 : Array.isArray(e.allowedDates) && e.allowedDates.length > 0 ? !e.allowedDates.some((c) => a.isSameDay(a.date(c), y)) : typeof e.allowedDates == "function" ? !e.allowedDates(y) : !1;
423
- }
424
- return {
425
- displayValue: n,
426
- daysInMonth: f,
427
- daysInWeek: k,
428
- genDays: s,
429
- model: r,
430
- weeksInMonth: u,
431
- weekdayLabels: d,
432
- weekNumbers: h
433
- };
434
- }
435
- function ye(e) {
436
- const a = L(), r = V(() => {
437
- if (!e.min) return null;
438
- const d = a.date(e.min);
439
- return a.isValid(d) ? d : null;
440
- }), n = V(() => {
441
- if (!e.max) return null;
442
- const d = a.date(e.max);
443
- return a.isValid(d) ? d : null;
444
- });
445
- function t(d) {
446
- return r.value && a.isBefore(d, r.value) ? r.value : n.value && a.isAfter(d, n.value) ? n.value : d;
447
- }
448
- function i(d) {
449
- return (!r.value || a.isAfter(d, r.value)) && (!n.value || a.isBefore(d, n.value));
450
- }
451
- return {
452
- minDate: r,
453
- maxDate: n,
454
- clampDate: t,
455
- isInAllowedRange: i
456
- };
457
- }
458
- const Ne = T({
459
- color: String,
460
- hideWeekdays: Boolean,
461
- multiple: [Boolean, Number, String],
462
- showWeek: Boolean,
463
- transition: {
464
- type: String,
465
- default: "picker-transition"
466
- },
467
- reverseTransition: {
468
- type: String,
469
- default: "picker-reverse-transition"
470
- },
471
- ...H(gt(), ["displayValue"])
472
- }, "VDatePickerMonth"), Me = N()({
473
- name: "VDatePickerMonth",
474
- props: Ne(),
475
- emits: {
476
- "update:modelValue": (e) => !0,
477
- "update:month": (e) => !0,
478
- "update:year": (e) => !0
479
- },
480
- setup(e, a) {
481
- let {
482
- emit: r,
483
- slots: n
484
- } = a;
485
- const t = re(), {
486
- t: i
487
- } = X(), {
488
- daysInMonth: d,
489
- model: u,
490
- weekNumbers: s,
491
- weekdayLabels: k
492
- } = Dt(e), f = L(), h = q(), D = q(), S = q(!1), p = te(() => S.value ? e.reverseTransition : e.transition);
493
- e.multiple === "range" && u.value.length > 0 && (h.value = u.value[0], u.value.length > 1 && (D.value = u.value[u.value.length - 1]));
494
- const l = V(() => {
495
- const o = ["number", "string"].includes(typeof e.multiple) ? Number(e.multiple) : 1 / 0;
496
- return u.value.length >= o;
497
- });
498
- oe(d, (o, P) => {
499
- P && (S.value = f.isBefore(o[0].date, P[0].date));
500
- });
501
- function y(o) {
502
- const P = f.startOfDay(o);
503
- if (u.value.length === 0 ? h.value = void 0 : u.value.length === 1 && (h.value = u.value[0], D.value = void 0), !h.value)
504
- h.value = P, u.value = [h.value];
505
- else if (D.value)
506
- h.value = o, D.value = void 0, u.value = [h.value];
507
- else {
508
- if (f.isSameDay(P, h.value)) {
509
- h.value = void 0, u.value = [];
510
- return;
511
- } else f.isBefore(P, h.value) ? (D.value = f.endOfDay(h.value), h.value = P) : D.value = f.endOfDay(P);
512
- u.value = Be(f, h.value, D.value);
513
- }
514
- }
515
- function c(o) {
516
- const P = f.format(o.date, "fullDateWithWeekday"), Y = o.isToday ? "currentDate" : "selectDate";
517
- return i(`$vuetify.datePicker.ariaLabel.${Y}`, P);
518
- }
519
- function b(o) {
520
- const P = u.value.findIndex((Y) => f.isSameDay(Y, o));
521
- if (P === -1)
522
- u.value = [...u.value, o];
523
- else {
524
- const Y = [...u.value];
525
- Y.splice(P, 1), u.value = Y;
526
- }
527
- }
528
- function C(o) {
529
- e.multiple === "range" ? y(o) : e.multiple ? b(o) : u.value = [o];
530
- }
531
- R(() => x("div", {
532
- class: "v-date-picker-month",
533
- style: {
534
- "--v-date-picker-days-in-week": e.weekdays.length
535
- }
536
- }, [e.showWeek && x("div", {
537
- key: "weeks",
538
- class: "v-date-picker-month__weeks"
539
- }, [!e.hideWeekdays && x("div", {
540
- key: "hide-week-days",
541
- class: "v-date-picker-month__day"
542
- }, [Je(" ")]), s.value.map((o) => x("div", {
543
- class: Z(["v-date-picker-month__day", "v-date-picker-month__day--adjacent"])
544
- }, [o]))]), w(Oe, {
545
- name: p.value
546
- }, {
547
- default: () => [x("div", {
548
- ref: t,
549
- key: d.value[0].date?.toString(),
550
- class: "v-date-picker-month__days"
551
- }, [!e.hideWeekdays && k.value.map((o) => x("div", {
552
- class: Z(["v-date-picker-month__day", "v-date-picker-month__weekday"])
553
- }, [o])), d.value.map((o, P) => {
554
- const Y = {
555
- props: {
556
- class: "v-date-picker-month__day-btn",
557
- color: o.isSelected || o.isToday ? e.color : void 0,
558
- disabled: o.isDisabled,
559
- icon: !0,
560
- ripple: !1,
561
- text: o.localized,
562
- variant: o.isSelected ? "flat" : o.isToday ? "outlined" : "text",
563
- "aria-label": c(o),
564
- "aria-current": o.isToday ? "date" : void 0,
565
- onClick: () => C(o.date)
566
- },
567
- item: o,
568
- i: P
569
- };
570
- return l.value && !o.isSelected && (o.isDisabled = !0), x("div", {
571
- class: Z(["v-date-picker-month__day", {
572
- "v-date-picker-month__day--adjacent": o.isAdjacent,
573
- "v-date-picker-month__day--hide-adjacent": o.isHidden,
574
- "v-date-picker-month__day--selected": o.isSelected,
575
- "v-date-picker-month__day--week-end": o.isWeekEnd,
576
- "v-date-picker-month__day--week-start": o.isWeekStart
577
- }]),
578
- "data-v-date": o.isDisabled ? void 0 : o.isoDate
579
- }, [(e.showAdjacentMonths || !o.isAdjacent) && (n.day?.(Y) ?? w($, Y.props, null))]);
580
- })])]
581
- })]));
582
- }
583
- }), Re = T({
584
- color: String,
585
- height: [String, Number],
586
- min: null,
587
- max: null,
588
- modelValue: Number,
589
- year: Number,
590
- allowedMonths: [Array, Function]
591
- }, "VDatePickerMonths"), Se = N()({
592
- name: "VDatePickerMonths",
593
- props: Re(),
594
- emits: {
595
- "update:modelValue": (e) => !0
596
- },
597
- setup(e, a) {
598
- let {
599
- emit: r,
600
- slots: n
601
- } = a;
602
- const t = L(), i = F(e, "modelValue"), d = V(() => {
603
- let s = t.startOfYear(t.date());
604
- return e.year && (s = t.setYear(s, e.year)), Ie(12).map((k) => {
605
- const f = t.format(s, "monthShort"), h = t.format(s, "month"), D = !!(!u(k) || e.min && t.isAfter(t.startOfMonth(t.date(e.min)), s) || e.max && t.isAfter(s, t.startOfMonth(t.date(e.max))));
606
- return s = t.getNextMonth(s), {
607
- isDisabled: D,
608
- text: f,
609
- label: h,
610
- value: k
611
- };
612
- });
613
- });
614
- fe(() => {
615
- i.value = i.value ?? t.getMonth(t.date());
616
- });
617
- function u(s) {
618
- return Array.isArray(e.allowedMonths) && e.allowedMonths.length ? e.allowedMonths.includes(s) : typeof e.allowedMonths == "function" ? e.allowedMonths(s) : !0;
619
- }
620
- return R(() => x("div", {
621
- class: "v-date-picker-months",
622
- style: {
623
- height: me(e.height)
624
- }
625
- }, [x("div", {
626
- class: "v-date-picker-months__content"
627
- }, [d.value.map((s, k) => {
628
- const f = {
629
- active: i.value === k,
630
- ariaLabel: s.label,
631
- color: i.value === k ? e.color : void 0,
632
- disabled: s.isDisabled,
633
- rounded: !0,
634
- text: s.text,
635
- variant: i.value === s.value ? "flat" : "text",
636
- onClick: () => h(k)
637
- };
638
- function h(D) {
639
- if (i.value === D) {
640
- r("update:modelValue", i.value);
641
- return;
642
- }
643
- i.value = D;
644
- }
645
- return n.month?.({
646
- month: s,
647
- i: k,
648
- props: f
649
- }) ?? w($, O({
650
- key: "month"
651
- }, f), null);
652
- })])])), {};
653
- }
654
- }), Ue = T({
655
- color: String,
656
- height: [String, Number],
657
- min: null,
658
- max: null,
659
- modelValue: Number,
660
- allowedYears: [Array, Function]
661
- }, "VDatePickerYears"), Ce = N()({
662
- name: "VDatePickerYears",
663
- props: Ue(),
664
- directives: {
665
- vIntersect: ge
666
- },
667
- emits: {
668
- "update:modelValue": (e) => !0
669
- },
670
- setup(e, a) {
671
- let {
672
- emit: r,
673
- slots: n
674
- } = a;
675
- const t = L(), i = F(e, "modelValue"), d = V(() => {
676
- const f = t.getYear(t.date());
677
- let h = f - 100, D = f + 52;
678
- e.min && (h = t.getYear(t.date(e.min))), e.max && (D = t.getYear(t.date(e.max)));
679
- let S = t.startOfYear(t.date());
680
- return S = t.setYear(S, h), Ie(D - h + 1, h).map((p) => {
681
- const l = t.format(S, "year");
682
- return S = t.setYear(S, t.getYear(S) + 1), {
683
- text: l,
684
- value: p,
685
- isDisabled: !k(p)
686
- };
687
- });
688
- });
689
- fe(() => {
690
- i.value = i.value ?? t.getYear(t.date());
691
- });
692
- const u = tt();
693
- function s() {
694
- u.el?.focus(), u.el?.scrollIntoView({
695
- block: "center"
696
- });
697
- }
698
- function k(f) {
699
- return Array.isArray(e.allowedYears) && e.allowedYears.length ? e.allowedYears.includes(f) : typeof e.allowedYears == "function" ? e.allowedYears(f) : !0;
700
- }
701
- return R(() => ze(x("div", {
702
- class: "v-date-picker-years",
703
- style: {
704
- height: me(e.height)
705
- }
706
- }, [x("div", {
707
- class: "v-date-picker-years__content"
708
- }, [d.value.map((f, h) => {
709
- const D = {
710
- ref: i.value === f.value ? u : void 0,
711
- active: i.value === f.value,
712
- color: i.value === f.value ? e.color : void 0,
713
- rounded: !0,
714
- text: f.text,
715
- disabled: f.isDisabled,
716
- variant: i.value === f.value ? "flat" : "text",
717
- onClick: () => {
718
- if (i.value === f.value) {
719
- r("update:modelValue", i.value);
720
- return;
721
- }
722
- i.value = f.value;
723
- }
724
- };
725
- return n.year?.({
726
- year: f,
727
- i: h,
728
- props: D
729
- }) ?? w($, O({
730
- key: "month"
731
- }, D), null);
732
- })])]), [[ge, {
733
- handler: s
734
- }, null, {
735
- once: !0
736
- }]])), {};
737
- }
738
- }), Ee = T({
739
- // TODO: implement in v3.5
740
- // calendarIcon: {
741
- // type: String,
742
- // default: '$calendar',
743
- // },
744
- // keyboardIcon: {
745
- // type: String,
746
- // default: '$edit',
747
- // },
748
- // inputMode: {
749
- // type: String as PropType<'calendar' | 'keyboard'>,
750
- // default: 'calendar',
751
- // },
752
- // inputText: {
753
- // type: String,
754
- // default: '$vuetify.datePicker.input.placeholder',
755
- // },
756
- // inputPlaceholder: {
757
- // type: String,
758
- // default: 'dd/mm/yyyy',
759
- // },
760
- header: {
761
- type: String,
762
- default: "$vuetify.datePicker.header"
763
- },
764
- headerColor: String,
765
- ...We(),
766
- ...Ne({
767
- weeksInMonth: "static"
768
- }),
769
- ...H(Re(), ["modelValue"]),
770
- ...H(Ue(), ["modelValue"]),
771
- ...Fe({
772
- title: "$vuetify.datePicker.title"
773
- }),
774
- modelValue: null
775
- }, "VDatePicker"), Ae = N()({
776
- name: "VDatePicker",
777
- props: Ee(),
778
- emits: {
779
- "update:modelValue": (e) => !0,
780
- "update:month": (e) => !0,
781
- "update:year": (e) => !0,
782
- // 'update:inputMode': (date: any) => true,
783
- "update:viewMode": (e) => !0
784
- },
785
- setup(e, a) {
786
- let {
787
- emit: r,
788
- slots: n
789
- } = a;
790
- const t = L(), {
791
- t: i
792
- } = X(), {
793
- rtlClasses: d
794
- } = at(), u = F(e, "modelValue", void 0, (v) => ee(v).map((g) => t.date(g)), (v) => e.multiple ? v : v[0]), s = F(e, "viewMode"), {
795
- minDate: k,
796
- maxDate: f,
797
- clampDate: h
798
- } = ye(e), D = V(() => {
799
- const v = t.date(), g = u.value?.[0] ? t.date(u.value[0]) : h(v);
800
- return g && t.isValid(g) ? g : v;
801
- }), S = te(() => e.headerColor ?? e.color), p = F(e, "month"), l = V({
802
- get: () => Number(p.value ?? t.getMonth(t.startOfMonth(D.value))),
803
- set: (v) => p.value = v
804
- }), y = F(e, "year"), c = V({
805
- get: () => Number(y.value ?? t.getYear(t.startOfYear(t.setMonth(D.value, l.value)))),
806
- set: (v) => y.value = v
807
- }), b = q(!1), C = V(() => e.multiple && u.value.length > 1 ? i("$vuetify.datePicker.itemsSelected", u.value.length) : u.value[0] && t.isValid(u.value[0]) ? t.format(t.date(u.value[0]), "normalDateWithWeekday") : i(e.header)), o = V(() => {
808
- let v = t.date();
809
- return v = t.setDate(v, 1), v = t.setMonth(v, l.value), v = t.setYear(v, c.value), t.format(v, "monthAndYear");
810
- }), P = te(() => `date-picker-header${b.value ? "-reverse" : ""}-transition`), Y = V(() => {
811
- if (e.disabled) return !0;
812
- const v = [];
813
- if (s.value !== "month")
814
- v.push("prev", "next");
815
- else {
816
- let g = t.date();
817
- if (g = t.startOfMonth(g), g = t.setMonth(g, l.value), g = t.setYear(g, c.value), k.value) {
818
- const M = t.addDays(t.startOfMonth(g), -1);
819
- t.isAfter(k.value, M) && v.push("prev");
820
- }
821
- if (f.value) {
822
- const M = t.addDays(t.endOfMonth(g), 1);
823
- t.isAfter(M, f.value) && v.push("next");
824
- }
825
- }
826
- return v;
827
- }), G = V(() => e.allowedYears || ue), W = V(() => e.allowedMonths || ae);
828
- function K(v, g) {
829
- const M = e.allowedDates;
830
- if (typeof M != "function") return !0;
831
- const B = 1 + Te(t, v, g);
832
- for (let I = 0; I < B; I++)
833
- if (M(t.addDays(v, I))) return !0;
834
- return !1;
835
- }
836
- function ue(v) {
837
- if (typeof e.allowedDates == "function") {
838
- const g = t.parseISO(`${v}-01-01`);
839
- return K(g, t.endOfYear(g));
840
- }
841
- if (Array.isArray(e.allowedDates) && e.allowedDates.length) {
842
- for (const g of e.allowedDates)
843
- if (t.getYear(t.date(g)) === v) return !0;
844
- return !1;
845
- }
846
- return !0;
847
- }
848
- function ae(v) {
849
- if (typeof e.allowedDates == "function") {
850
- const g = String(v + 1).padStart(2, "0"), M = t.parseISO(`${c.value}-${g}-01`);
851
- return K(M, t.endOfMonth(M));
852
- }
853
- if (Array.isArray(e.allowedDates) && e.allowedDates.length) {
854
- for (const g of e.allowedDates)
855
- if (t.getYear(t.date(g)) === c.value && t.getMonth(t.date(g)) === v) return !0;
856
- return !1;
857
- }
858
- return !0;
859
- }
860
- function de() {
861
- l.value < 11 ? l.value++ : (c.value++, l.value = 0, A()), m();
862
- }
863
- function se() {
864
- l.value > 0 ? l.value-- : (c.value--, l.value = 11, A()), m();
865
- }
866
- function ce() {
867
- s.value = "month";
868
- }
869
- function ne() {
870
- s.value = s.value === "months" ? "month" : "months";
871
- }
872
- function Q() {
873
- s.value = s.value === "year" ? "month" : "year";
874
- }
875
- function m() {
876
- s.value === "months" && ne();
877
- }
878
- function A() {
879
- s.value === "year" && Q();
880
- }
881
- return oe(u, (v, g) => {
882
- const M = ee(g), B = ee(v);
883
- if (!B.length) return;
884
- const I = t.date(M[M.length - 1]), J = t.date(B[B.length - 1]), U = t.getMonth(J), _ = t.getYear(J);
885
- U !== l.value && (l.value = U, m()), _ !== c.value && (c.value = _, A()), b.value = t.isBefore(I, J);
886
- }), R(() => {
887
- const v = Ve.filterProps(e), g = Pe.filterProps(e), M = xe.filterProps(e), B = Me.filterProps(e), I = H(Se.filterProps(e), ["modelValue"]), J = H(Ce.filterProps(e), ["modelValue"]), U = {
888
- color: S.value,
889
- header: C.value,
890
- transition: P.value
891
- };
892
- return w(Ve, O(v, {
893
- color: S.value,
894
- class: ["v-date-picker", `v-date-picker--${s.value}`, {
895
- "v-date-picker--show-week": e.showWeek
896
- }, d.value, e.class],
897
- style: e.style
898
- }), {
899
- title: () => n.title?.() ?? x("div", {
900
- class: "v-date-picker__title"
901
- }, [i(e.title)]),
902
- header: () => n.header ? w(ve, {
903
- defaults: {
904
- VDatePickerHeader: {
905
- ...U
906
- }
907
- }
908
- }, {
909
- default: () => [n.header?.(U)]
910
- }) : w(xe, O({
911
- key: "header"
912
- }, M, U, {
913
- onClick: s.value !== "month" ? ce : void 0
914
- }), {
915
- prepend: n.prepend,
916
- append: n.append
917
- }),
918
- default: () => x(ie, null, [w(Pe, O(g, {
919
- disabled: Y.value,
920
- text: o.value,
921
- "onClick:next": de,
922
- "onClick:prev": se,
923
- "onClick:month": ne,
924
- "onClick:year": Q
925
- }), null), w(nt, {
926
- hideOnLeave: !0
927
- }, {
928
- default: () => [s.value === "months" ? w(Se, O({
929
- key: "date-picker-months"
930
- }, I, {
931
- modelValue: l.value,
932
- "onUpdate:modelValue": [(_) => l.value = _, m],
933
- min: k.value,
934
- max: f.value,
935
- year: c.value,
936
- allowedMonths: W.value
937
- }), {
938
- month: n.month
939
- }) : s.value === "year" ? w(Ce, O({
940
- key: "date-picker-years"
941
- }, J, {
942
- modelValue: c.value,
943
- "onUpdate:modelValue": [(_) => c.value = _, A],
944
- min: k.value,
945
- max: f.value,
946
- allowedYears: G.value
947
- }), {
948
- year: n.year
949
- }) : w(Me, O({
950
- key: "date-picker-month"
951
- }, B, {
952
- modelValue: u.value,
953
- "onUpdate:modelValue": (_) => u.value = _,
954
- month: l.value,
955
- "onUpdate:month": [(_) => l.value = _, m],
956
- year: c.value,
957
- "onUpdate:year": [(_) => c.value = _, A],
958
- min: k.value,
959
- max: f.value
960
- }), {
961
- day: n.day
962
- })]
963
- })]),
964
- actions: n.actions
965
- });
966
- }), {};
967
- }
968
- });
969
- class j {
970
- constructor(a, r) {
971
- this.order = a, this.separator = r;
972
- }
973
- get format() {
974
- return this.order.split("").map((a) => `${a}${a}`).join(this.separator).replace("yy", "yyyy");
975
- }
976
- static canBeParsed(a) {
977
- if (typeof a != "string") return !1;
978
- const r = a.toLowerCase();
979
- return ["y", "m", "d"].every((n) => r.includes(n)) && ["/", "-", "."].some((n) => a.includes(n));
980
- }
981
- static parse(a) {
982
- if (!j.canBeParsed(a))
983
- throw new Error(`[${a}] cannot be parsed into date format specification`);
984
- const r = a.toLowerCase().split("").filter((t, i, d) => "dmy".includes(t) && d.indexOf(t) === i).join(""), n = ["/", "-", "."].find((t) => a.includes(t));
985
- return new j(r, n);
986
- }
987
- }
988
- const bt = T({
989
- inputFormat: {
990
- type: String,
991
- validator: (e) => !e || j.canBeParsed(e)
992
- }
993
- }, "date-format");
994
- function Vt(e, a) {
995
- const r = L();
996
- function n() {
997
- const s = a.value ?? "en-US", k = Intl.DateTimeFormat(s, {
998
- year: "numeric",
999
- month: "2-digit",
1000
- day: "2-digit"
1001
- }).format(r.toJsDate(r.parseISO("1999-12-07"))).replace(/(07)|(٠٧)|(٢٩)|(۱۶)|(০৭)/, "dd").replace(/(12)|(١٢)|(٠٨)|(۰۹)|(১২)/, "mm").replace(/(1999)|(2542)|(١٩٩٩)|(١٤٢٠)|(۱۳۷۸)|(১৯৯৯)/, "yyyy").replace(/[^ymd\-/.]/g, "").replace(/\.$/, "");
1002
- return j.canBeParsed(k) ? k : (lt(`Date format inferred from locale [${s}] is invalid: [${k}]`), "mm/dd/yyyy");
1003
- }
1004
- const t = te(() => j.canBeParsed(e.inputFormat) ? j.parse(e.inputFormat) : j.parse(n()));
1005
- function i(s) {
1006
- function k(b) {
1007
- const C = b.trim().split(t.value.separator);
1008
- return {
1009
- y: Number(C[t.value.order.indexOf("y")]),
1010
- m: Number(C[t.value.order.indexOf("m")]),
1011
- d: Number(C[t.value.order.indexOf("d")])
1012
- };
1013
- }
1014
- function f(b) {
1015
- const {
1016
- y: C,
1017
- m: o,
1018
- d: P
1019
- } = b;
1020
- return !C || !o || !P || o < 1 || o > 12 || P < 1 || P > 31 ? null : {
1021
- year: h(C),
1022
- month: o,
1023
- day: P
1024
- };
1025
- }
1026
- function h(b) {
1027
- const C = r.getYear(r.date());
1028
- if (b > 100 || C % 100 >= 50)
1029
- return b;
1030
- const o = ~~(C / 100) * 100;
1031
- return b < 50 ? o + b : o - 100 + b;
1032
- }
1033
- const D = k(s), S = f(D);
1034
- if (!S) return null;
1035
- const {
1036
- year: p,
1037
- month: l,
1038
- day: y
1039
- } = S, c = (b) => String(b).padStart(2, "0");
1040
- return r.parseISO(`${p}-${c(l)}-${c(y)}`);
1041
- }
1042
- function d(s) {
1043
- return !!i(s);
1044
- }
1045
- function u(s) {
1046
- const k = r.toISO(s).split("T")[0].split("-");
1047
- return t.value.order.split("").map((f) => k["ymd".indexOf(f)]).join(t.value.separator);
1048
- }
1049
- return {
1050
- isValid: d,
1051
- parseDate: i,
1052
- formatDate: u,
1053
- parserFormat: te(() => t.value.format)
1054
- };
1055
- }
1056
- const wt = T({
1057
- displayFormat: {
1058
- type: [Function, String],
1059
- default: void 0
1060
- },
1061
- location: {
1062
- type: String,
1063
- default: "bottom start"
1064
- },
1065
- menu: Boolean,
1066
- updateOn: {
1067
- type: Array,
1068
- default: () => ["blur", "enter"]
1069
- },
1070
- ...bt(),
1071
- ...dt({
1072
- mobile: null
1073
- }),
1074
- ...ft(),
1075
- ...$e({
1076
- hideActions: !0
1077
- }),
1078
- ...ct({
1079
- prependIcon: "$calendar"
1080
- }),
1081
- ...H(Ee({
1082
- hideHeader: !0,
1083
- showAdjacentMonths: !0
1084
- }), ["active", "location", "rounded", "height", "minHeight", "maxHeight"])
1085
- }, "VDateInput"), Pt = N()({
1086
- name: "VDateInput",
1087
- props: wt(),
1088
- emits: {
1089
- save: (e) => !0,
1090
- cancel: () => !0,
1091
- "update:focused": (e) => !0,
1092
- "update:modelValue": (e) => !0,
1093
- "update:menu": (e) => !0
1094
- },
1095
- setup(e, a) {
1096
- let {
1097
- emit: r,
1098
- slots: n
1099
- } = a;
1100
- const {
1101
- t,
1102
- current: i
1103
- } = X(), d = L(), {
1104
- isValid: u,
1105
- parseDate: s,
1106
- formatDate: k,
1107
- parserFormat: f
1108
- } = Vt(e, i), {
1109
- mobile: h
1110
- } = rt(e), {
1111
- clampDate: D,
1112
- isInAllowedRange: S
1113
- } = ye(e), p = () => e.multiple ? [] : null, l = F(e, "modelValue", p(), (m) => Array.isArray(m) ? m.map((A) => d.toJsDate(A)) : m && d.toJsDate(m), (m) => Array.isArray(m) ? m.map((A) => d.date(A)) : m && d.date(m)), y = F(e, "menu"), c = q(!1), b = q(e.focused), C = re(), o = re(["save"]);
1114
- function P(m) {
1115
- return typeof e.displayFormat == "function" ? e.displayFormat(m) : e.displayFormat ? d.format(m, e.displayFormat ?? "keyboardDate") : k(m);
1116
- }
1117
- const Y = V(() => {
1118
- const m = ee(l.value);
1119
- if (!m.length) return null;
1120
- if (e.multiple === !0)
1121
- return t("$vuetify.datePicker.itemsSelected", m.length);
1122
- if (e.multiple === "range") {
1123
- const A = m[0], v = m[m.length - 1];
1124
- return !d.isValid(A) || !d.isValid(v) ? "" : `${P(d.date(A))} - ${P(d.date(v))}`;
1125
- }
1126
- return d.isValid(l.value) ? P(d.date(l.value)) : "";
1127
- }), G = V(() => {
1128
- if (h.value)
1129
- return c.value ? "text" : "none";
1130
- }), W = V(() => !e.disabled && !e.readonly), K = V(() => e.updateOn.length ? !(h.value && c.value) && e.readonly : !0);
1131
- oe(y, (m) => {
1132
- m || (c.value = !1, o.value = ["save"]);
1133
- });
1134
- function ue(m) {
1135
- m.key === "Enter" && ((!y.value || !b.value) && (y.value = !0), e.updateOn.includes("enter") && !e.readonly && Q(m.target));
1136
- }
1137
- function ae(m) {
1138
- m.preventDefault(), m.stopPropagation(), y.value && h.value ? c.value = !0 : y.value = !0;
1139
- }
1140
- function de() {
1141
- r("cancel"), y.value = !1, c.value = !1;
1142
- }
1143
- function se(m) {
1144
- r("save", m), y.value = !1;
1145
- }
1146
- function ce(m) {
1147
- m == null && (l.value = p());
1148
- }
1149
- function ne(m) {
1150
- e.updateOn.includes("blur") && !e.readonly && Q(m.target), h.value && c.value && !b.value && (y.value = !1, c.value = !1);
1151
- }
1152
- function Q(m) {
1153
- let {
1154
- value: A
1155
- } = m;
1156
- if (!A.trim())
1157
- l.value = p();
1158
- else if (!e.multiple)
1159
- u(A) && (l.value = D(s(A)));
1160
- else {
1161
- const v = A.trim().split(/\D+-\D+|[^\d\-/.]+/);
1162
- if (v.every(u))
1163
- if (e.multiple === "range") {
1164
- const [g, M] = v.map(s).map(D).toSorted((B, I) => d.isAfter(B, I) ? 1 : -1);
1165
- l.value = Be(d, g, M);
1166
- } else
1167
- l.value = v.map(s).filter(S);
1168
- }
1169
- }
1170
- return R(() => {
1171
- const m = we.filterProps(e), A = Ae.filterProps(H(e, ["active", "bgColor", "color", "location", "rounded", "maxWidth", "minWidth", "width"])), v = it(n, ["title", "header", "day", "month", "year"]), g = be.filterProps(H(e, ["placeholder"]));
1172
- return w(be, O({
1173
- ref: C
1174
- }, g, {
1175
- class: e.class,
1176
- style: e.style,
1177
- modelValue: Y.value,
1178
- inputmode: G.value,
1179
- placeholder: e.placeholder ?? f.value,
1180
- readonly: K.value,
1181
- onKeydown: W.value ? ue : void 0,
1182
- focused: y.value || b.value,
1183
- onBlur: ne,
1184
- validationValue: l.value,
1185
- "onClick:control": W.value ? ae : void 0,
1186
- "onClick:prepend": W.value ? ae : void 0,
1187
- "onUpdate:modelValue": ce,
1188
- "onUpdate:focused": (M) => b.value = M
1189
- }), {
1190
- ...n,
1191
- default: () => x(ie, null, [w(ot, {
1192
- modelValue: y.value,
1193
- "onUpdate:modelValue": (M) => y.value = M,
1194
- activator: "parent",
1195
- minWidth: "0",
1196
- eager: b.value,
1197
- location: e.location,
1198
- closeOnContentClick: !1,
1199
- openOnClick: !1
1200
- }, {
1201
- default: () => [w(we, O(m, {
1202
- modelValue: l.value,
1203
- "onUpdate:modelValue": (M) => l.value = M,
1204
- disabled: o.value,
1205
- onSave: se,
1206
- onCancel: de
1207
- }), {
1208
- default: (M) => {
1209
- let {
1210
- actions: B,
1211
- model: I,
1212
- save: J,
1213
- cancel: U,
1214
- isPristine: _
1215
- } = M;
1216
- function je(z) {
1217
- e.hideActions ? (l.value = z, e.multiple || (y.value = !1)) : I.value = z, r("save", z), o.value = [];
1218
- }
1219
- return w(Ae, O(A, {
1220
- modelValue: e.hideActions ? l.value : I.value,
1221
- "onUpdate:modelValue": (z) => je(z),
1222
- onMousedown: (z) => z.preventDefault()
1223
- }), {
1224
- ...v,
1225
- actions: e.hideActions ? void 0 : () => n.actions?.({
1226
- save: J,
1227
- cancel: U,
1228
- isPristine: _
1229
- }) ?? B()
1230
- });
1231
- }
1232
- })]
1233
- }), n.default?.()])
1234
- });
1235
- }), ut({}, C);
1236
- }
1237
- }), At = {
1238
- __name: "Datepicker",
1239
- props: /* @__PURE__ */ Ke({
1240
- returnFormat: {
1241
- type: String,
1242
- default: "DD-MM-YYYY"
1243
- }
1244
- }, {
1245
- modelValue: {},
1246
- modelModifiers: {}
1247
- }),
1248
- emits: ["update:modelValue"],
1249
- setup(e) {
1250
- const a = Ze(e, "modelValue"), r = e, n = V({
1251
- get: () => {
1252
- const t = r.returnFormat, i = Array.isArray(a.value);
1253
- let d;
1254
- return i ? d = a.value.filter((u) => E(u, t).isValid()).map((u) => new Date(E(u, t).format())) : E(a.value, t).isValid() && (d = new Date(E(a.value, t).format())), d;
1255
- },
1256
- set: (t) => {
1257
- const i = r.returnFormat;
1258
- Array.isArray(t) ? a.value = t.filter((u) => E(u).isValid()).map((u) => E(u).format(i)) : a.value = E(t).isValid() ? E(t).format(i) : void 0;
1259
- }
1260
- });
1261
- return (t, i) => (Xe(), qe(he(Pt), {
1262
- modelValue: he(n),
1263
- "onUpdate:modelValue": i[0] || (i[0] = (d) => Ge(n) ? n.value = d : null)
1264
- }, null, 8, ["modelValue"]));
1265
- }
1266
- };
1267
- export {
1268
- At as default
1269
- };