@featherk/composables 0.10.9 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/featherk-composables.es.js +967 -922
- package/dist/featherk-composables.es.js.map +1 -1
- package/dist/featherk-composables.umd.js +1 -1
- package/dist/featherk-composables.umd.js.map +1 -1
- package/dist/grid/index.d.ts +1 -1
- package/dist/grid/useGridRowAction.d.ts +14 -0
- package/dist/menu/usePopupMenu.d.ts +5 -5
- package/docs/grid/useGridRowAction.md +51 -24
- package/docs/menu/usePopupMenu.md +6 -3
- package/package.json +1 -1
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { ref as U, onBeforeUnmount as Pe, nextTick as B, computed as
|
|
1
|
+
import { ref as U, onBeforeUnmount as Pe, nextTick as B, computed as y, watchEffect as Te, toValue as le, reactive as Ve, watch as ue, unref as Le, onUnmounted as Ke, onMounted as Me, readonly as Q, shallowRef as Ne } from "vue";
|
|
2
2
|
import { useFocusTrap as qe } from "@vueuse/integrations/useFocusTrap";
|
|
3
|
-
const
|
|
3
|
+
const st = (e, t) => {
|
|
4
4
|
const r = U(null);
|
|
5
|
-
let
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
return
|
|
9
|
-
},
|
|
5
|
+
let h = !1, p = null, m = null;
|
|
6
|
+
const D = [], P = ".k-table-row[data-grid-row-index] [tabindex]", T = () => {
|
|
7
|
+
const s = e?.value?.$el;
|
|
8
|
+
return s ? s.closest(".k-grid") : null;
|
|
9
|
+
}, L = (s) => {
|
|
10
10
|
const w = T();
|
|
11
11
|
if (!w) return !1;
|
|
12
|
-
const
|
|
13
|
-
if (
|
|
14
|
-
return w.contains(
|
|
15
|
-
const b =
|
|
12
|
+
const f = s.closest(".k-grid-aria-root");
|
|
13
|
+
if (f)
|
|
14
|
+
return w.contains(f);
|
|
15
|
+
const b = s.closest(
|
|
16
16
|
".k-grid-header, .k-grid-content, .k-grid-content-locked"
|
|
17
17
|
);
|
|
18
18
|
return b ? w.contains(b) : !1;
|
|
19
|
-
},
|
|
20
|
-
const w =
|
|
21
|
-
([" ", "Spacebar", "Space"].includes(w) ||
|
|
22
|
-
},
|
|
19
|
+
}, A = (s) => s.key === "Enter" || s.code === "Enter" || s.code === "NumpadEnter", R = () => e?.value?.columns, E = (s) => {
|
|
20
|
+
const w = s.key || s.code;
|
|
21
|
+
([" ", "Spacebar", "Space"].includes(w) || A(s)) && (s.preventDefault(), s.stopPropagation(), r.value = s.target, s.target.click());
|
|
22
|
+
}, k = (s) => {
|
|
23
23
|
if (!r.value) return;
|
|
24
|
-
if (
|
|
25
|
-
|
|
24
|
+
if (s.code === "Escape") {
|
|
25
|
+
s.stopPropagation(), r.value && r.value.focus();
|
|
26
26
|
return;
|
|
27
27
|
}
|
|
28
28
|
const w = Array.from(
|
|
29
29
|
document.querySelectorAll(
|
|
30
30
|
".k-animation-container .k-popup .k-column-menu .k-columnmenu-item-wrapper .k-columnmenu-item"
|
|
31
31
|
)
|
|
32
|
-
),
|
|
32
|
+
), f = document.querySelector(
|
|
33
33
|
".k-animation-container .k-popup .k-column-menu .k-filter-menu-container"
|
|
34
34
|
);
|
|
35
|
-
if (
|
|
36
|
-
if (
|
|
35
|
+
if (f) {
|
|
36
|
+
if (s.code === "Tab") {
|
|
37
37
|
const b = [
|
|
38
38
|
// ".k-filter-menu-container .k-dropdownlist[tabindex='0']",
|
|
39
39
|
// ".k-filter-menu-container input.k-input-inner:not([tabindex='-1']):not([disabled])",
|
|
@@ -44,37 +44,37 @@ const it = (e, t) => {
|
|
|
44
44
|
"button:not([tabindex='-1']):not([disabled])",
|
|
45
45
|
".k-checkbox"
|
|
46
46
|
], I = t?.focusableMenuSelectors ?? b, S = Array.from(
|
|
47
|
-
|
|
47
|
+
f.querySelectorAll(I.join(","))
|
|
48
48
|
);
|
|
49
49
|
if (S.length === 0) return;
|
|
50
50
|
const M = S.findIndex(
|
|
51
51
|
(W) => W === document.activeElement
|
|
52
52
|
);
|
|
53
|
-
let
|
|
54
|
-
M === -1 ?
|
|
53
|
+
let N;
|
|
54
|
+
M === -1 ? N = 0 : s.shiftKey ? N = (M - 1 + S.length) % S.length : N = (M + 1) % S.length, s.preventDefault(), s.stopPropagation(), S[N]?.focus();
|
|
55
55
|
}
|
|
56
|
-
} else if (
|
|
57
|
-
|
|
56
|
+
} else if (s.code === "ArrowUp" || s.code === "ArrowDown") {
|
|
57
|
+
s.preventDefault(), s.stopPropagation();
|
|
58
58
|
const b = w.findIndex(
|
|
59
59
|
(S) => S === document.activeElement
|
|
60
60
|
);
|
|
61
61
|
let I = b;
|
|
62
|
-
|
|
62
|
+
s.code === "ArrowUp" ? I = b > 0 ? b - 1 : w.length - 1 : s.code === "ArrowDown" && (I = b < w.length - 1 ? b + 1 : 0), w[I]?.focus();
|
|
63
63
|
return;
|
|
64
64
|
}
|
|
65
|
-
if (
|
|
66
|
-
|
|
65
|
+
if (s.code === "Tab") {
|
|
66
|
+
s.preventDefault(), s.stopPropagation();
|
|
67
67
|
const b = r.value?.parentElement;
|
|
68
|
-
(
|
|
68
|
+
(s.shiftKey ? b?.previousElementSibling : b?.nextElementSibling)?.querySelector(
|
|
69
69
|
"button, [role='button'], .k-link"
|
|
70
70
|
)?.focus();
|
|
71
71
|
}
|
|
72
|
-
},
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
w.addedNodes.forEach((
|
|
76
|
-
if (
|
|
77
|
-
const b =
|
|
72
|
+
}, C = () => {
|
|
73
|
+
p = new MutationObserver((s) => {
|
|
74
|
+
s.forEach((w) => {
|
|
75
|
+
w.addedNodes.forEach((f) => {
|
|
76
|
+
if (f.nodeType === Node.ELEMENT_NODE) {
|
|
77
|
+
const b = f;
|
|
78
78
|
if (b.classList.contains("k-animation-container")) {
|
|
79
79
|
const S = r.value;
|
|
80
80
|
S && (S.dataset.featherKSortable === "true" || B(() => {
|
|
@@ -85,17 +85,17 @@ const it = (e, t) => {
|
|
|
85
85
|
});
|
|
86
86
|
})), b.addEventListener(
|
|
87
87
|
"keydown",
|
|
88
|
-
|
|
88
|
+
k
|
|
89
89
|
), B(() => {
|
|
90
90
|
const M = () => {
|
|
91
|
-
const
|
|
91
|
+
const N = Array.from(
|
|
92
92
|
b.querySelectorAll(
|
|
93
93
|
".k-animation-container .k-popup .k-column-menu .k-columnmenu-item-wrapper .k-columnmenu-item"
|
|
94
94
|
)
|
|
95
95
|
);
|
|
96
|
-
if (
|
|
97
|
-
|
|
98
|
-
else if (
|
|
96
|
+
if (N.length === 1)
|
|
97
|
+
N[0].focus(), N[0].click(), M.attempts = 0;
|
|
98
|
+
else if (N.length > 1) {
|
|
99
99
|
M.attempts = 0;
|
|
100
100
|
return;
|
|
101
101
|
} else
|
|
@@ -109,54 +109,54 @@ const it = (e, t) => {
|
|
|
109
109
|
).forEach((S) => {
|
|
110
110
|
S.addEventListener(
|
|
111
111
|
"keydown",
|
|
112
|
-
|
|
112
|
+
k
|
|
113
113
|
);
|
|
114
114
|
});
|
|
115
115
|
}
|
|
116
|
-
}), w.removedNodes.forEach((
|
|
117
|
-
if (
|
|
118
|
-
const b =
|
|
116
|
+
}), w.removedNodes.forEach((f) => {
|
|
117
|
+
if (f.nodeType === Node.ELEMENT_NODE) {
|
|
118
|
+
const b = f;
|
|
119
119
|
b.classList.contains("k-animation-container") && b.removeEventListener(
|
|
120
120
|
"keydown",
|
|
121
|
-
|
|
121
|
+
k
|
|
122
122
|
), b.querySelectorAll(
|
|
123
123
|
".k-animation-container"
|
|
124
124
|
).forEach((S) => {
|
|
125
125
|
S.removeEventListener(
|
|
126
126
|
"keydown",
|
|
127
|
-
|
|
127
|
+
k
|
|
128
128
|
);
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
131
|
});
|
|
132
132
|
});
|
|
133
|
-
}),
|
|
133
|
+
}), p.observe(document.body, {
|
|
134
134
|
childList: !0,
|
|
135
135
|
subtree: !0
|
|
136
136
|
});
|
|
137
|
-
},
|
|
138
|
-
const w =
|
|
139
|
-
return !!(["input", "textarea", "select", "button"].includes(w) ||
|
|
137
|
+
}, u = (s) => {
|
|
138
|
+
const w = s.tagName.toLowerCase();
|
|
139
|
+
return !!(["input", "textarea", "select", "button"].includes(w) || s.closest(
|
|
140
140
|
'.k-picker-wrap, .k-input-inner, .k-textbox, [role="combobox"]'
|
|
141
141
|
));
|
|
142
|
-
},
|
|
143
|
-
if (!
|
|
142
|
+
}, i = (s) => {
|
|
143
|
+
if (!s.type || !s)
|
|
144
144
|
return;
|
|
145
|
-
const w =
|
|
145
|
+
const w = s.target;
|
|
146
146
|
if (!w) return;
|
|
147
|
-
const
|
|
147
|
+
const f = w.closest(
|
|
148
148
|
".k-table-row[data-grid-row-index]"
|
|
149
149
|
);
|
|
150
|
-
if (!
|
|
150
|
+
if (!L(w))
|
|
151
151
|
return;
|
|
152
152
|
const b = ["ArrowLeft", "ArrowRight"].includes(
|
|
153
|
-
|
|
153
|
+
s.code
|
|
154
154
|
);
|
|
155
|
-
if (!(
|
|
156
|
-
if (
|
|
155
|
+
if (!(u(w) && !(f && b))) {
|
|
156
|
+
if (s.code === "Escape") {
|
|
157
157
|
const I = document.activeElement?.closest(".k-table-row[data-grid-row-index]");
|
|
158
158
|
if (I) {
|
|
159
|
-
|
|
159
|
+
s.preventDefault(), s.stopPropagation();
|
|
160
160
|
try {
|
|
161
161
|
Array.from(
|
|
162
162
|
e?.value.$el.querySelectorAll(
|
|
@@ -177,60 +177,60 @@ const it = (e, t) => {
|
|
|
177
177
|
"Enter",
|
|
178
178
|
"NumpadEnter",
|
|
179
179
|
"Space"
|
|
180
|
-
].includes(
|
|
180
|
+
].includes(s.code)) {
|
|
181
181
|
if (w.classList.contains("k-grid-header-menu") && w.classList.contains("k-grid-column-menu")) {
|
|
182
182
|
r.value = w;
|
|
183
183
|
return;
|
|
184
184
|
}
|
|
185
|
-
if (
|
|
186
|
-
if (["ArrowDown", "ArrowUp"].includes(
|
|
187
|
-
|
|
188
|
-
const I = (M,
|
|
189
|
-
let W =
|
|
185
|
+
if (f) {
|
|
186
|
+
if (["ArrowDown", "ArrowUp"].includes(s.code)) {
|
|
187
|
+
s.preventDefault(), s.stopPropagation();
|
|
188
|
+
const I = (M, N) => {
|
|
189
|
+
let W = N === "next" ? M.nextElementSibling : M.previousElementSibling;
|
|
190
190
|
for (; W; ) {
|
|
191
|
-
const
|
|
191
|
+
const re = W;
|
|
192
192
|
try {
|
|
193
|
-
if (
|
|
194
|
-
return
|
|
193
|
+
if (re.classList.contains("k-table-row"))
|
|
194
|
+
return re;
|
|
195
195
|
} catch {
|
|
196
196
|
}
|
|
197
|
-
W =
|
|
197
|
+
W = N === "next" ? W.nextElementSibling : W.previousElementSibling;
|
|
198
198
|
}
|
|
199
199
|
return null;
|
|
200
|
-
}, S =
|
|
201
|
-
S && (
|
|
200
|
+
}, S = s.code === "ArrowDown" ? I(f, "next") : I(f, "previous");
|
|
201
|
+
S && (f.setAttribute("tabindex", "-1"), S.setAttribute("tabindex", "0"), S.focus());
|
|
202
202
|
return;
|
|
203
203
|
}
|
|
204
|
-
if (["ArrowLeft", "ArrowRight"].includes(
|
|
205
|
-
|
|
206
|
-
const I =
|
|
207
|
-
|
|
204
|
+
if (["ArrowLeft", "ArrowRight"].includes(s.code)) {
|
|
205
|
+
s.preventDefault(), s.stopPropagation();
|
|
206
|
+
const I = f.querySelectorAll(
|
|
207
|
+
P
|
|
208
208
|
);
|
|
209
209
|
if (I.length === 0) return;
|
|
210
210
|
let S = Array.from(I).findIndex(
|
|
211
211
|
(M) => M === document.activeElement
|
|
212
212
|
);
|
|
213
|
-
if (S === -1 && document.activeElement ===
|
|
213
|
+
if (S === -1 && document.activeElement === f) {
|
|
214
214
|
I[0].focus();
|
|
215
215
|
return;
|
|
216
216
|
}
|
|
217
|
-
|
|
217
|
+
s.code === "ArrowRight" ? S = S === I.length - 1 ? 0 : S + 1 : s.code === "ArrowLeft" && (S = S === 0 ? I.length - 1 : S - 1), I[S].focus();
|
|
218
218
|
return;
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
|
-
},
|
|
223
|
+
}, l = () => {
|
|
224
224
|
B(() => {
|
|
225
|
-
const
|
|
226
|
-
if (!
|
|
227
|
-
const w =
|
|
225
|
+
const s = e.value?.$el;
|
|
226
|
+
if (!s || typeof s.closest != "function") return;
|
|
227
|
+
const w = s.closest(".k-grid");
|
|
228
228
|
w && w.classList.add("fk-grid");
|
|
229
229
|
});
|
|
230
|
-
},
|
|
231
|
-
if (!
|
|
230
|
+
}, g = () => {
|
|
231
|
+
if (!m)
|
|
232
232
|
try {
|
|
233
|
-
const
|
|
233
|
+
const s = () => {
|
|
234
234
|
try {
|
|
235
235
|
const b = Array.from(
|
|
236
236
|
e.value.$el.querySelectorAll(
|
|
@@ -259,139 +259,139 @@ const it = (e, t) => {
|
|
|
259
259
|
w.length > 0 && w.forEach((b, I) => {
|
|
260
260
|
b.setAttribute("tabindex", I === 0 ? "0" : "-1");
|
|
261
261
|
});
|
|
262
|
-
const
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
}),
|
|
266
|
-
} catch (
|
|
267
|
-
console.error("Error setting up row navigation:",
|
|
262
|
+
const f = e.value.$el.querySelector(".k-table-tbody");
|
|
263
|
+
f && (m = new MutationObserver(() => {
|
|
264
|
+
s();
|
|
265
|
+
}), m.observe(f, { childList: !0, subtree: !0 }));
|
|
266
|
+
} catch (s) {
|
|
267
|
+
console.error("Error setting up row navigation:", s);
|
|
268
268
|
}
|
|
269
269
|
}, V = () => {
|
|
270
270
|
B(() => {
|
|
271
271
|
const w = document.querySelectorAll(".k-grid-header .k-grid-header-menu.k-grid-column-menu");
|
|
272
|
-
w && w.forEach((
|
|
273
|
-
|
|
272
|
+
w && w.forEach((f) => {
|
|
273
|
+
f.setAttribute("role", "button"), f.addEventListener(
|
|
274
274
|
"keydown",
|
|
275
|
-
|
|
275
|
+
E
|
|
276
276
|
);
|
|
277
|
-
}),
|
|
277
|
+
}), C(), z();
|
|
278
278
|
});
|
|
279
279
|
}, Y = () => {
|
|
280
280
|
const w = document.querySelectorAll(".k-grid-header .k-grid-header-menu.k-grid-column-menu");
|
|
281
|
-
w && w.forEach((
|
|
282
|
-
|
|
281
|
+
w && w.forEach((f) => {
|
|
282
|
+
f.removeEventListener(
|
|
283
283
|
"keydown",
|
|
284
|
-
|
|
284
|
+
E
|
|
285
285
|
);
|
|
286
|
-
}),
|
|
287
|
-
},
|
|
286
|
+
}), p && (p.disconnect(), p = null), m && (m.disconnect(), m = null), D.forEach((f) => f()), D.length = 0;
|
|
287
|
+
}, z = () => {
|
|
288
288
|
document.querySelectorAll(
|
|
289
289
|
".k-grid-header .k-table-thead th"
|
|
290
|
-
).forEach((
|
|
291
|
-
if (
|
|
290
|
+
).forEach((f, b) => {
|
|
291
|
+
if (f.dataset.featherKHeaderBound === "true")
|
|
292
292
|
return;
|
|
293
|
-
const I =
|
|
293
|
+
const I = f.querySelector(
|
|
294
294
|
".k-grid-header-menu.k-grid-column-menu"
|
|
295
295
|
);
|
|
296
296
|
if (!I) return;
|
|
297
|
-
const S =
|
|
297
|
+
const S = R();
|
|
298
298
|
if (S && S[b]) {
|
|
299
299
|
const a = S[b].field ?? "";
|
|
300
|
-
|
|
300
|
+
f.setAttribute("data-feather-k-field", a), f.setAttribute(
|
|
301
301
|
"data-feather-k-filterable",
|
|
302
302
|
S[b].filterable === !1 ? "false" : "true"
|
|
303
|
-
),
|
|
303
|
+
), f.setAttribute(
|
|
304
304
|
"data-feather-k-sortable",
|
|
305
305
|
S[b].sortable === !1 ? "false" : "true"
|
|
306
306
|
);
|
|
307
307
|
}
|
|
308
|
-
const M =
|
|
309
|
-
I.setAttribute("tabindex", "-1"), M ||
|
|
308
|
+
const M = f.dataset.featherKFilterable !== "false", N = f.dataset.featherKSortable !== "false";
|
|
309
|
+
I.setAttribute("tabindex", "-1"), M || N ? f.style.cursor = "pointer" : f.style.cursor = "default", M ? (f.setAttribute("tabindex", "0"), f.setAttribute("role", "button"), f.setAttribute("aria-haspopup", "menu")) : (f.setAttribute("tabindex", "0"), f.setAttribute("role", "columnheader"), f.removeAttribute("aria-haspopup"));
|
|
310
310
|
const W = (a) => {
|
|
311
|
-
a.target?.closest(".k-column-resizer") || (r.value =
|
|
312
|
-
},
|
|
311
|
+
a.target?.closest(".k-column-resizer") || (r.value = f, I.click());
|
|
312
|
+
}, re = (a) => {
|
|
313
313
|
if (M)
|
|
314
|
-
r.value =
|
|
315
|
-
else if (
|
|
316
|
-
r.value =
|
|
317
|
-
const
|
|
318
|
-
|
|
314
|
+
r.value = f, a.preventDefault(), a.stopPropagation(), W(a);
|
|
315
|
+
else if (N) {
|
|
316
|
+
r.value = f;
|
|
317
|
+
const v = f.querySelector(".k-link");
|
|
318
|
+
v && v.click();
|
|
319
319
|
}
|
|
320
320
|
};
|
|
321
|
-
|
|
322
|
-
|
|
321
|
+
f.addEventListener("click", re), D.push(() => {
|
|
322
|
+
f.removeEventListener("click", re);
|
|
323
323
|
});
|
|
324
324
|
const se = (a) => {
|
|
325
|
-
if ((
|
|
326
|
-
if (a.preventDefault(), a.stopPropagation(), r.value =
|
|
325
|
+
if ((A(a) || a.code === "Space") && (M || N)) {
|
|
326
|
+
if (a.preventDefault(), a.stopPropagation(), r.value = f, r.value.focus(), M)
|
|
327
327
|
W(a);
|
|
328
|
-
else if (
|
|
329
|
-
const
|
|
330
|
-
|
|
328
|
+
else if (N) {
|
|
329
|
+
const v = f.querySelector(".k-link");
|
|
330
|
+
v && v.click();
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
333
|
};
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
}),
|
|
334
|
+
f.addEventListener("keydown", se, !0), D.push(() => {
|
|
335
|
+
f.removeEventListener("keydown", se, !0);
|
|
336
|
+
}), f.dataset.featherKHeaderBound = "true";
|
|
337
337
|
});
|
|
338
338
|
const w = document.querySelector(".k-grid-header .k-table-thead");
|
|
339
339
|
if (w && w.dataset.featherKHeaderBound !== "true") {
|
|
340
|
-
const
|
|
340
|
+
const f = (b) => {
|
|
341
341
|
const I = b.target.closest("th");
|
|
342
|
-
I && (
|
|
342
|
+
I && (A(b) || b.code === "Space") && I.dataset.featherKFilterable === "false" && I.dataset.featherKSortable === "false" && (b.preventDefault(), b.stopImmediatePropagation());
|
|
343
343
|
};
|
|
344
344
|
w.addEventListener(
|
|
345
345
|
"keydown",
|
|
346
|
-
|
|
346
|
+
f,
|
|
347
347
|
!0
|
|
348
348
|
// NOTE: capture phase
|
|
349
|
-
),
|
|
349
|
+
), D.push(() => {
|
|
350
350
|
w.removeEventListener(
|
|
351
351
|
"keydown",
|
|
352
|
-
|
|
352
|
+
f,
|
|
353
353
|
!0
|
|
354
354
|
);
|
|
355
355
|
}), w.dataset.featherKHeaderBound = "true";
|
|
356
356
|
}
|
|
357
|
-
},
|
|
358
|
-
const
|
|
359
|
-
if (!
|
|
360
|
-
const I =
|
|
357
|
+
}, _ = function(s, w) {
|
|
358
|
+
const f = s?.event?.event.target, b = R();
|
|
359
|
+
if (!f || !b) return;
|
|
360
|
+
const I = f.classList.contains("k-grid-header-menu"), S = f.classList.contains("k-columnmenu-item"), M = b.find((N) => N.field === s?.event?.field)?.sortable && !0;
|
|
361
361
|
if (!I) {
|
|
362
362
|
if (S && !M) {
|
|
363
|
-
|
|
364
|
-
(W) => W.field !==
|
|
363
|
+
s?.event?.sort?.filter(
|
|
364
|
+
(W) => W.field !== s?.event?.field
|
|
365
365
|
);
|
|
366
366
|
return;
|
|
367
367
|
}
|
|
368
368
|
typeof w == "function" && B(() => {
|
|
369
|
-
r.value && r.value.focus(), w(
|
|
370
|
-
|
|
369
|
+
r.value && r.value.focus(), w(s), B(() => {
|
|
370
|
+
z();
|
|
371
371
|
});
|
|
372
372
|
});
|
|
373
373
|
}
|
|
374
|
-
},
|
|
375
|
-
if (!
|
|
374
|
+
}, ee = () => {
|
|
375
|
+
if (!h)
|
|
376
376
|
try {
|
|
377
|
-
|
|
378
|
-
} catch (
|
|
379
|
-
console.error("initA11y failed:",
|
|
377
|
+
l(), g(), V(), h = !0;
|
|
378
|
+
} catch (s) {
|
|
379
|
+
console.error("initA11y failed:", s), Y();
|
|
380
380
|
}
|
|
381
381
|
};
|
|
382
382
|
return Pe(() => {
|
|
383
383
|
Y();
|
|
384
384
|
}), {
|
|
385
385
|
activeFilterButton: r,
|
|
386
|
-
handleGridKeyDown:
|
|
387
|
-
handleSortChange:
|
|
388
|
-
initA11y:
|
|
386
|
+
handleGridKeyDown: i,
|
|
387
|
+
handleSortChange: _,
|
|
388
|
+
initA11y: ee
|
|
389
389
|
};
|
|
390
|
-
},
|
|
391
|
-
(r) =>
|
|
392
|
-
) :
|
|
393
|
-
(r) =>
|
|
394
|
-
) ? "active" : "",
|
|
390
|
+
}, Oe = (e) => !!e && typeof e == "object" && "filters" in e && Array.isArray(e.filters), Ue = (e) => !!e && typeof e == "object" && "field" in e, Re = (e, t) => !e || typeof e != "object" ? !1 : Oe(e) ? e.filters.some(
|
|
391
|
+
(r) => Re(r, t)
|
|
392
|
+
) : Ue(e) ? e.field === t : !1, ut = (e) => (t) => e.value?.filters && e.value.filters.some(
|
|
393
|
+
(r) => Re(r, t)
|
|
394
|
+
) ? "active" : "", Be = [
|
|
395
395
|
"button",
|
|
396
396
|
"a",
|
|
397
397
|
"input",
|
|
@@ -409,190 +409,225 @@ const it = (e, t) => {
|
|
|
409
409
|
".k-hierarchy-cell",
|
|
410
410
|
".k-grid-header-menu",
|
|
411
411
|
".k-column-menu"
|
|
412
|
-
],
|
|
412
|
+
], ct = (e) => {
|
|
413
413
|
const {
|
|
414
414
|
onRowAction: t,
|
|
415
415
|
gridRef: r,
|
|
416
|
-
dataItems:
|
|
417
|
-
ignoreSelectors:
|
|
418
|
-
shouldIgnoreTarget:
|
|
419
|
-
enableKeyboardAction:
|
|
420
|
-
} = e,
|
|
421
|
-
...
|
|
422
|
-
...
|
|
423
|
-
], T = (
|
|
424
|
-
if (!
|
|
425
|
-
const
|
|
426
|
-
return
|
|
427
|
-
},
|
|
416
|
+
dataItems: h,
|
|
417
|
+
ignoreSelectors: p = [],
|
|
418
|
+
shouldIgnoreTarget: m,
|
|
419
|
+
enableKeyboardAction: D = !0
|
|
420
|
+
} = e, P = [
|
|
421
|
+
...Be,
|
|
422
|
+
...p
|
|
423
|
+
], T = (u, i) => {
|
|
424
|
+
if (!u) return !1;
|
|
425
|
+
const l = P.join(",");
|
|
426
|
+
return u.closest && u.closest(l) ? !0 : m && i ? m(u, i) : !1;
|
|
427
|
+
}, L = (u) => {
|
|
428
|
+
const l = u?.closest?.(
|
|
429
|
+
".k-table-row[data-grid-row-index]"
|
|
430
|
+
)?.getAttribute("data-grid-row-index");
|
|
431
|
+
if (l == null) return;
|
|
432
|
+
const g = parseInt(l, 10);
|
|
433
|
+
return Number.isNaN(g) ? void 0 : g;
|
|
434
|
+
}, A = (u) => {
|
|
435
|
+
if (!u || typeof u.clientX != "number")
|
|
436
|
+
return;
|
|
437
|
+
const i = typeof window < "u" && window.scrollX || 0, l = typeof window < "u" && window.scrollY || 0, g = typeof window < "u" && window.screenX || 0, V = typeof window < "u" && window.screenY || 0;
|
|
438
|
+
return {
|
|
439
|
+
clientX: u.clientX,
|
|
440
|
+
clientY: u.clientY,
|
|
441
|
+
pageX: typeof u.pageX == "number" ? u.pageX : u.clientX + i,
|
|
442
|
+
pageY: typeof u.pageY == "number" ? u.pageY : u.clientY + l,
|
|
443
|
+
screenX: typeof u.screenX == "number" ? u.screenX : u.clientX + g,
|
|
444
|
+
screenY: typeof u.screenY == "number" ? u.screenY : u.clientY + V
|
|
445
|
+
};
|
|
446
|
+
}, R = (u) => {
|
|
447
|
+
if (!u || typeof u.getBoundingClientRect != "function")
|
|
448
|
+
return;
|
|
449
|
+
const i = u.getBoundingClientRect();
|
|
450
|
+
if (!i) return;
|
|
451
|
+
const l = i.left, g = i.bottom, V = typeof window < "u" && window.scrollX || 0, Y = typeof window < "u" && window.scrollY || 0;
|
|
452
|
+
return {
|
|
453
|
+
clientX: l,
|
|
454
|
+
clientY: g,
|
|
455
|
+
pageX: l + V,
|
|
456
|
+
pageY: g + Y,
|
|
457
|
+
screenX: l,
|
|
458
|
+
screenY: g
|
|
459
|
+
};
|
|
460
|
+
}, E = (u) => {
|
|
428
461
|
if (typeof window > "u") return !1;
|
|
429
|
-
const
|
|
430
|
-
if (!
|
|
462
|
+
const i = window.getSelection();
|
|
463
|
+
if (!i || i.isCollapsed || !i.toString().trim())
|
|
431
464
|
return !1;
|
|
432
|
-
if (
|
|
433
|
-
const
|
|
434
|
-
return
|
|
465
|
+
if (u && i.anchorNode && i.focusNode) {
|
|
466
|
+
const l = u.closest(".k-table-row") || u.closest(".k-grid") || u, g = i.anchorNode.nodeType === Node.ELEMENT_NODE ? i.anchorNode : i.anchorNode.parentElement, V = i.focusNode.nodeType === Node.ELEMENT_NODE ? i.focusNode : i.focusNode.parentElement, Y = !!(g && l.contains(g)), z = !!(V && l.contains(V));
|
|
467
|
+
return Y || z;
|
|
435
468
|
}
|
|
436
469
|
return !0;
|
|
437
470
|
};
|
|
438
471
|
return {
|
|
439
|
-
handleRowClick: (
|
|
440
|
-
const
|
|
441
|
-
if (
|
|
472
|
+
handleRowClick: (u) => {
|
|
473
|
+
const i = u?.htmlEvent || u?.event || u?.nativeEvent || (u instanceof Event ? u : void 0);
|
|
474
|
+
if (i && i.button !== void 0 && i.button !== 0)
|
|
442
475
|
return;
|
|
443
|
-
const
|
|
444
|
-
if (
|
|
476
|
+
const l = i?.target || u?.target;
|
|
477
|
+
if (l && T(l, i || u) || E(l))
|
|
445
478
|
return;
|
|
446
|
-
const
|
|
447
|
-
dataItem:
|
|
448
|
-
rowIndex:
|
|
449
|
-
field:
|
|
450
|
-
event:
|
|
479
|
+
const g = {
|
|
480
|
+
dataItem: u.dataItem,
|
|
481
|
+
rowIndex: u.rowIndex ?? L(l),
|
|
482
|
+
field: u.field,
|
|
483
|
+
event: i || u,
|
|
451
484
|
triggerType: "click",
|
|
452
|
-
ctrlKey: !!
|
|
453
|
-
shiftKey: !!
|
|
454
|
-
metaKey: !!
|
|
455
|
-
altKey: !!
|
|
485
|
+
ctrlKey: !!i?.ctrlKey,
|
|
486
|
+
shiftKey: !!i?.shiftKey,
|
|
487
|
+
metaKey: !!i?.metaKey,
|
|
488
|
+
altKey: !!i?.altKey,
|
|
489
|
+
coordinates: A(i) ?? R(l)
|
|
456
490
|
};
|
|
457
|
-
t(
|
|
491
|
+
t(u.dataItem, g);
|
|
458
492
|
},
|
|
459
|
-
handleRowKeyDown: (
|
|
460
|
-
if (!
|
|
461
|
-
const
|
|
462
|
-
if (!(
|
|
463
|
-
const
|
|
464
|
-
if (!
|
|
465
|
-
const
|
|
493
|
+
handleRowKeyDown: (u, i) => {
|
|
494
|
+
if (!D) return;
|
|
495
|
+
const l = u.key || u.code;
|
|
496
|
+
if (!(l === "Enter" || l === "NumpadEnter" || l === " " || l === "Space" || u.code === "Enter" || u.code === "NumpadEnter" || u.code === "Space")) return;
|
|
497
|
+
const V = u.target;
|
|
498
|
+
if (!V) return;
|
|
499
|
+
const Y = V.closest(
|
|
466
500
|
".k-table-row[data-grid-row-index], .k-table-row"
|
|
467
501
|
);
|
|
468
|
-
if (!
|
|
502
|
+
if (!Y || T(V, u))
|
|
469
503
|
return;
|
|
470
|
-
|
|
471
|
-
const
|
|
472
|
-
let
|
|
473
|
-
if (
|
|
474
|
-
const
|
|
475
|
-
|
|
504
|
+
u.preventDefault(), u.stopPropagation();
|
|
505
|
+
const z = Y.getAttribute("data-grid-row-index"), _ = z !== null ? parseInt(z, 10) : void 0;
|
|
506
|
+
let ee = i;
|
|
507
|
+
if (ee === void 0) {
|
|
508
|
+
const w = (Array.isArray(h) ? h : h?.value) || r?.value?.props?.dataItems || r?.value?.dataItems;
|
|
509
|
+
w && _ !== void 0 && _ >= 0 && _ < w.length && (ee = w[_]);
|
|
476
510
|
}
|
|
477
|
-
if (
|
|
478
|
-
const
|
|
479
|
-
dataItem:
|
|
480
|
-
rowIndex:
|
|
481
|
-
event:
|
|
511
|
+
if (ee === void 0) return;
|
|
512
|
+
const s = {
|
|
513
|
+
dataItem: ee,
|
|
514
|
+
rowIndex: _,
|
|
515
|
+
event: u,
|
|
482
516
|
triggerType: "keyboard",
|
|
483
|
-
ctrlKey: !!
|
|
484
|
-
shiftKey: !!
|
|
485
|
-
metaKey: !!
|
|
486
|
-
altKey: !!
|
|
517
|
+
ctrlKey: !!u.ctrlKey,
|
|
518
|
+
shiftKey: !!u.shiftKey,
|
|
519
|
+
metaKey: !!u.metaKey,
|
|
520
|
+
altKey: !!u.altKey,
|
|
521
|
+
coordinates: R(Y)
|
|
487
522
|
};
|
|
488
|
-
t(
|
|
523
|
+
t(ee, s);
|
|
489
524
|
},
|
|
490
525
|
isIgnoredTarget: T
|
|
491
526
|
};
|
|
492
|
-
},
|
|
527
|
+
}, Ye = "Enter a valid ZIP code with exactly 5 or 9 digits.", Ce = (e) => {
|
|
493
528
|
const t = e.replace(/\D/g, "").slice(0, 9);
|
|
494
529
|
return t.length > 5 ? `${t.slice(0, 5)}-${t.slice(5)}` : t;
|
|
495
530
|
}, ze = (e, t) => e.slice(0, Math.max(0, t)).replace(/\D/g, "").length, He = (e) => e <= 5 ? e : Math.min(e + 1, 10), Ze = (e) => {
|
|
496
|
-
const t = U(Ce(e.initialValue ?? "")), r = U(!1),
|
|
497
|
-
e.errorMessage?.trim() ||
|
|
498
|
-
),
|
|
499
|
-
const
|
|
500
|
-
return
|
|
501
|
-
}),
|
|
502
|
-
const
|
|
531
|
+
const t = U(Ce(e.initialValue ?? "")), r = U(!1), h = U(
|
|
532
|
+
e.errorMessage?.trim() || Ye
|
|
533
|
+
), p = y(() => t.value.replace(/\D/g, "")), m = y(() => {
|
|
534
|
+
const k = p.value.length;
|
|
535
|
+
return k === 5 || k === 9;
|
|
536
|
+
}), D = y(() => r.value && !m.value), P = y(() => !r.value || m.value), T = y(() => r.value), L = (k, C) => {
|
|
537
|
+
const u = He(C);
|
|
503
538
|
B(() => {
|
|
504
|
-
|
|
539
|
+
k.isConnected && k.setSelectionRange(u, u);
|
|
505
540
|
});
|
|
506
541
|
};
|
|
507
542
|
return {
|
|
508
543
|
// writable state
|
|
509
544
|
zipDisplay: t,
|
|
510
545
|
submitted: r,
|
|
511
|
-
errorMessage:
|
|
546
|
+
errorMessage: h,
|
|
512
547
|
// bindings
|
|
513
548
|
wrapperClass: "fk-zip-textbox",
|
|
514
549
|
// derived state
|
|
515
|
-
zipRaw:
|
|
516
|
-
isZipValid:
|
|
517
|
-
showZipError:
|
|
518
|
-
textBoxValid:
|
|
550
|
+
zipRaw: p,
|
|
551
|
+
isZipValid: m,
|
|
552
|
+
showZipError: D,
|
|
553
|
+
textBoxValid: P,
|
|
519
554
|
textBoxValidate: T,
|
|
520
555
|
// actions
|
|
521
|
-
handleZipInput: (...
|
|
522
|
-
const
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
) :
|
|
526
|
-
t.value = Ce(
|
|
556
|
+
handleZipInput: (...k) => {
|
|
557
|
+
const C = k[0], i = C?.event?.target, l = C?.value, g = Array.isArray(l) ? l.join("") : String(l ?? ""), V = i?.selectionStart !== void 0 && i.selectionStart !== null ? ze(
|
|
558
|
+
i.value,
|
|
559
|
+
i.selectionStart
|
|
560
|
+
) : g.replace(/\D/g, "").length;
|
|
561
|
+
t.value = Ce(g), i && L(i, V);
|
|
527
562
|
},
|
|
528
|
-
submitAndValidate: (
|
|
563
|
+
submitAndValidate: (k) => {
|
|
529
564
|
r.value = !0;
|
|
530
|
-
const
|
|
531
|
-
return !
|
|
565
|
+
const C = m.value;
|
|
566
|
+
return !C && k?.focus && B(() => {
|
|
532
567
|
document.getElementById(
|
|
533
568
|
e.id
|
|
534
569
|
)?.focus();
|
|
535
|
-
}),
|
|
570
|
+
}), C;
|
|
536
571
|
},
|
|
537
|
-
buildPayload: () => ({ zip:
|
|
572
|
+
buildPayload: () => ({ zip: p.value })
|
|
538
573
|
};
|
|
539
574
|
};
|
|
540
|
-
function
|
|
575
|
+
function Xe(e, t) {
|
|
541
576
|
const r = U(!1);
|
|
542
577
|
Te(() => {
|
|
543
578
|
e.value?.setAttribute("aria-invalid", String(!t.isValid()));
|
|
544
579
|
});
|
|
545
|
-
function
|
|
546
|
-
const
|
|
547
|
-
(!
|
|
580
|
+
function h(m) {
|
|
581
|
+
const D = e.value ?? m.currentTarget, P = m.relatedTarget;
|
|
582
|
+
(!D || !D.contains(P)) && (r.value = !0);
|
|
548
583
|
}
|
|
549
|
-
function
|
|
584
|
+
function p() {
|
|
550
585
|
r.value = !1;
|
|
551
586
|
}
|
|
552
|
-
return { touched: r, onFocusout:
|
|
587
|
+
return { touched: r, onFocusout: h, reset: p };
|
|
553
588
|
}
|
|
554
589
|
function We(e, t) {
|
|
555
|
-
const r = U(!1),
|
|
556
|
-
() =>
|
|
557
|
-
),
|
|
558
|
-
isValid: () =>
|
|
590
|
+
const r = U(!1), h = U(!1), p = y(
|
|
591
|
+
() => le(t.submitted) || r.value
|
|
592
|
+
), m = y(() => !p.value || t.isValid()), D = Xe(e, {
|
|
593
|
+
isValid: () => m.value
|
|
559
594
|
});
|
|
560
|
-
function
|
|
561
|
-
return
|
|
595
|
+
function P(E) {
|
|
596
|
+
return y(() => !p.value || le(E));
|
|
562
597
|
}
|
|
563
|
-
function T(
|
|
598
|
+
function T(E) {
|
|
564
599
|
return Object.fromEntries(
|
|
565
|
-
Object.entries(
|
|
566
|
-
|
|
567
|
-
C
|
|
600
|
+
Object.entries(E).map(([k, C]) => [
|
|
601
|
+
k,
|
|
602
|
+
P(C)
|
|
568
603
|
])
|
|
569
604
|
);
|
|
570
605
|
}
|
|
571
|
-
function
|
|
572
|
-
const
|
|
573
|
-
if (!
|
|
574
|
-
|
|
606
|
+
function L(E) {
|
|
607
|
+
const k = le(E);
|
|
608
|
+
if (!k) return;
|
|
609
|
+
k.querySelector(
|
|
575
610
|
'.k-invalid input, .k-invalid[tabindex="0"]'
|
|
576
611
|
)?.focus();
|
|
577
612
|
}
|
|
578
|
-
function
|
|
579
|
-
if (
|
|
580
|
-
|
|
613
|
+
function A(E) {
|
|
614
|
+
if (h.value) {
|
|
615
|
+
h.value = !1;
|
|
581
616
|
return;
|
|
582
617
|
}
|
|
583
|
-
|
|
618
|
+
D.onFocusout(E), D.touched.value && (r.value = !0);
|
|
584
619
|
}
|
|
585
|
-
function
|
|
586
|
-
r.value = !1,
|
|
620
|
+
function R() {
|
|
621
|
+
r.value = !1, h.value = !0, D.reset();
|
|
587
622
|
}
|
|
588
623
|
return {
|
|
589
624
|
touched: r,
|
|
590
|
-
fieldsetValidate:
|
|
591
|
-
onFocusout:
|
|
592
|
-
reset:
|
|
593
|
-
createFieldValidity:
|
|
625
|
+
fieldsetValidate: p,
|
|
626
|
+
onFocusout: A,
|
|
627
|
+
reset: R,
|
|
628
|
+
createFieldValidity: P,
|
|
594
629
|
createFieldValidationsMap: T,
|
|
595
|
-
focusFirstInvalidField:
|
|
630
|
+
focusFirstInvalidField: L
|
|
596
631
|
};
|
|
597
632
|
}
|
|
598
633
|
const Ge = [
|
|
@@ -664,17 +699,17 @@ function je() {
|
|
|
664
699
|
});
|
|
665
700
|
return {
|
|
666
701
|
formData: e,
|
|
667
|
-
onAddress1Input: (...
|
|
668
|
-
e.address1 = De(
|
|
702
|
+
onAddress1Input: (...D) => {
|
|
703
|
+
e.address1 = De(D[0]);
|
|
669
704
|
},
|
|
670
|
-
onAddress2Input: (...
|
|
671
|
-
e.address2 = De(
|
|
705
|
+
onAddress2Input: (...D) => {
|
|
706
|
+
e.address2 = De(D[0]);
|
|
672
707
|
},
|
|
673
|
-
onCityInput: (...
|
|
674
|
-
e.city = De(
|
|
708
|
+
onCityInput: (...D) => {
|
|
709
|
+
e.city = De(D[0]);
|
|
675
710
|
},
|
|
676
|
-
onStateChange: (
|
|
677
|
-
e.state =
|
|
711
|
+
onStateChange: (D) => {
|
|
712
|
+
e.state = D.value;
|
|
678
713
|
},
|
|
679
714
|
resetFormData: () => {
|
|
680
715
|
e.address1 = "", e.address2 = "", e.city = "", e.state = null, e.zip = "";
|
|
@@ -683,329 +718,339 @@ function je() {
|
|
|
683
718
|
}
|
|
684
719
|
function _e(e, t = "zip") {
|
|
685
720
|
const r = Ze({ id: t }), {
|
|
686
|
-
zipDisplay:
|
|
687
|
-
zipRaw:
|
|
688
|
-
isZipValid:
|
|
689
|
-
wrapperClass:
|
|
690
|
-
handleZipInput:
|
|
721
|
+
zipDisplay: h,
|
|
722
|
+
zipRaw: p,
|
|
723
|
+
isZipValid: m,
|
|
724
|
+
wrapperClass: D,
|
|
725
|
+
handleZipInput: P
|
|
691
726
|
} = r;
|
|
692
|
-
return ue(
|
|
693
|
-
e.zip =
|
|
727
|
+
return ue(p, (L) => {
|
|
728
|
+
e.zip = L;
|
|
694
729
|
}), {
|
|
695
|
-
zipDisplay:
|
|
696
|
-
isZipValid:
|
|
697
|
-
zipWrapperClass:
|
|
698
|
-
onZipInput:
|
|
730
|
+
zipDisplay: h,
|
|
731
|
+
isZipValid: m,
|
|
732
|
+
zipWrapperClass: D,
|
|
733
|
+
onZipInput: P,
|
|
699
734
|
resetZip: () => {
|
|
700
|
-
|
|
735
|
+
h.value = "", e.zip = "";
|
|
701
736
|
}
|
|
702
737
|
};
|
|
703
738
|
}
|
|
704
739
|
function Je(e) {
|
|
705
|
-
const t =
|
|
740
|
+
const t = y(
|
|
706
741
|
() => e.formData.address1.trim() !== ""
|
|
707
|
-
), r =
|
|
708
|
-
() => t.value && r.value &&
|
|
742
|
+
), r = y(() => e.formData.city.trim() !== ""), h = y(() => !!e.formData.state), p = y(() => le(e.isZipValid)), m = y(
|
|
743
|
+
() => t.value && r.value && h.value && p.value
|
|
709
744
|
);
|
|
710
745
|
return {
|
|
711
746
|
strictAddress1Valid: t,
|
|
712
747
|
strictCityValid: r,
|
|
713
|
-
strictStateValid:
|
|
714
|
-
strictZipValid:
|
|
715
|
-
strictAddressValid:
|
|
748
|
+
strictStateValid: h,
|
|
749
|
+
strictZipValid: p,
|
|
750
|
+
strictAddressValid: m
|
|
716
751
|
};
|
|
717
752
|
}
|
|
718
|
-
function
|
|
753
|
+
function Qe(e) {
|
|
719
754
|
if (!e) return;
|
|
720
755
|
e.querySelector(
|
|
721
756
|
'.k-invalid input, .k-invalid[tabindex="0"]'
|
|
722
757
|
)?.focus();
|
|
723
758
|
}
|
|
724
|
-
function
|
|
725
|
-
const r = e ?? t.currentTarget,
|
|
726
|
-
return !r || !r.contains(
|
|
759
|
+
function et(e, t) {
|
|
760
|
+
const r = e ?? t.currentTarget, h = t.relatedTarget;
|
|
761
|
+
return !r || !r.contains(h);
|
|
727
762
|
}
|
|
728
|
-
function
|
|
763
|
+
function dt(e) {
|
|
729
764
|
const t = U(
|
|
730
|
-
|
|
765
|
+
le(e.fieldsetRef)
|
|
731
766
|
);
|
|
732
767
|
Te(() => {
|
|
733
|
-
t.value =
|
|
768
|
+
t.value = le(e.fieldsetRef);
|
|
734
769
|
});
|
|
735
|
-
const r = U(!1),
|
|
736
|
-
formData:
|
|
737
|
-
onAddress1Input:
|
|
738
|
-
onAddress2Input:
|
|
770
|
+
const r = U(!1), h = U(!1), p = y(() => le(e.required) ?? !0), {
|
|
771
|
+
formData: m,
|
|
772
|
+
onAddress1Input: D,
|
|
773
|
+
onAddress2Input: P,
|
|
739
774
|
onCityInput: T,
|
|
740
|
-
onStateChange:
|
|
741
|
-
resetFormData:
|
|
742
|
-
} = je(),
|
|
743
|
-
strictAddress1Valid:
|
|
744
|
-
strictCityValid:
|
|
775
|
+
onStateChange: L,
|
|
776
|
+
resetFormData: A
|
|
777
|
+
} = je(), R = `${e.addressId}-zip`, { zipDisplay: E, isZipValid: k, zipWrapperClass: C, onZipInput: u, resetZip: i } = _e(m, R), {
|
|
778
|
+
strictAddress1Valid: l,
|
|
779
|
+
strictCityValid: g,
|
|
745
780
|
strictStateValid: V,
|
|
746
781
|
strictZipValid: Y,
|
|
747
|
-
strictAddressValid:
|
|
782
|
+
strictAddressValid: z
|
|
748
783
|
} = Je({
|
|
749
|
-
formData:
|
|
750
|
-
isZipValid:
|
|
751
|
-
}),
|
|
784
|
+
formData: m,
|
|
785
|
+
isZipValid: k
|
|
786
|
+
}), _ = We(t, {
|
|
752
787
|
submitted: r,
|
|
753
|
-
isValid: () =>
|
|
754
|
-
}), { touched:
|
|
755
|
-
address1:
|
|
756
|
-
city:
|
|
788
|
+
isValid: () => z.value
|
|
789
|
+
}), { touched: ee, fieldsetValidate: s, onFocusout: w, reset: f } = _, b = _.createFieldValidationsMap({
|
|
790
|
+
address1: l,
|
|
791
|
+
city: g,
|
|
757
792
|
state: V,
|
|
758
793
|
zip: Y,
|
|
759
|
-
address:
|
|
794
|
+
address: z
|
|
760
795
|
}), {
|
|
761
796
|
address1: I,
|
|
762
797
|
city: S,
|
|
763
798
|
state: M,
|
|
764
|
-
zip:
|
|
799
|
+
zip: N,
|
|
765
800
|
address: W
|
|
766
|
-
} = b,
|
|
767
|
-
() =>
|
|
768
|
-
), se =
|
|
769
|
-
() =>
|
|
770
|
-
), a =
|
|
771
|
-
() =>
|
|
772
|
-
),
|
|
773
|
-
() =>
|
|
774
|
-
),
|
|
775
|
-
() =>
|
|
776
|
-
),
|
|
777
|
-
() =>
|
|
778
|
-
),
|
|
779
|
-
label:
|
|
780
|
-
value:
|
|
781
|
-
})), n =
|
|
782
|
-
address1:
|
|
783
|
-
address2:
|
|
784
|
-
city:
|
|
785
|
-
state: (
|
|
786
|
-
zip:
|
|
787
|
-
})),
|
|
788
|
-
const
|
|
789
|
-
return !
|
|
790
|
-
}),
|
|
801
|
+
} = b, re = y(
|
|
802
|
+
() => p.value ? s.value : !1
|
|
803
|
+
), se = y(
|
|
804
|
+
() => p.value ? I.value : !0
|
|
805
|
+
), a = y(
|
|
806
|
+
() => p.value ? S.value : !0
|
|
807
|
+
), v = y(
|
|
808
|
+
() => p.value ? M.value : !0
|
|
809
|
+
), $ = y(
|
|
810
|
+
() => p.value ? N.value : !0
|
|
811
|
+
), H = y(
|
|
812
|
+
() => p.value ? W.value : !0
|
|
813
|
+
), Z = { value: null, label: "State" }, G = Ge.map(({ label: d, value: x }) => ({
|
|
814
|
+
label: d,
|
|
815
|
+
value: x
|
|
816
|
+
})), n = y(() => ({
|
|
817
|
+
address1: m.address1.trim(),
|
|
818
|
+
address2: m.address2.trim(),
|
|
819
|
+
city: m.city.trim(),
|
|
820
|
+
state: (m.state ?? "").trim().toUpperCase(),
|
|
821
|
+
zip: m.zip.replace(/\D/g, "")
|
|
822
|
+
})), c = y(() => m.address1.trim() === "" && m.address2.trim() === "" && m.city.trim() === "" && (m.state ?? "").trim() === "" && m.zip.replace(/\D/g, "") === ""), F = y(() => !c.value), q = y(() => !p.value && F.value && (!l.value || !g.value || !V.value)), j = y(() => {
|
|
823
|
+
const d = m.zip.replace(/\D/g, "");
|
|
824
|
+
return !p.value && F.value && d.length !== 5 && d.length !== 9;
|
|
825
|
+
}), te = y(() => !p.value && F.value && !z.value), O = y(() => !p.value && te.value && (h.value || r.value));
|
|
791
826
|
return ue(n, () => {
|
|
792
|
-
|
|
793
|
-
}), ue(
|
|
794
|
-
|
|
827
|
+
p.value || (h.value = !1);
|
|
828
|
+
}), ue(p, (d) => {
|
|
829
|
+
d || (r.value = !1, h.value = !1, f());
|
|
795
830
|
}), {
|
|
796
|
-
formData:
|
|
831
|
+
formData: m,
|
|
797
832
|
submitted: r,
|
|
798
|
-
touched:
|
|
799
|
-
addressValidate:
|
|
833
|
+
touched: ee,
|
|
834
|
+
addressValidate: re,
|
|
800
835
|
address1Valid: se,
|
|
801
836
|
cityValid: a,
|
|
802
|
-
stateValid:
|
|
803
|
-
zipValid:
|
|
804
|
-
addressValid:
|
|
837
|
+
stateValid: v,
|
|
838
|
+
zipValid: $,
|
|
839
|
+
addressValid: H,
|
|
805
840
|
optionalFeedbackActive: O,
|
|
806
|
-
optionalPartialInvalid:
|
|
807
|
-
optionalMissingRequiredFields:
|
|
841
|
+
optionalPartialInvalid: te,
|
|
842
|
+
optionalMissingRequiredFields: q,
|
|
808
843
|
optionalZipInvalid: j,
|
|
809
|
-
stateDefaultItem:
|
|
844
|
+
stateDefaultItem: Z,
|
|
810
845
|
stateOptions: G,
|
|
811
|
-
zipDisplay:
|
|
812
|
-
zipWrapperClass:
|
|
813
|
-
onAddress1Input:
|
|
814
|
-
onAddress2Input:
|
|
846
|
+
zipDisplay: E,
|
|
847
|
+
zipWrapperClass: C,
|
|
848
|
+
onAddress1Input: D,
|
|
849
|
+
onAddress2Input: P,
|
|
815
850
|
onCityInput: T,
|
|
816
|
-
onStateChange:
|
|
817
|
-
onZipInput:
|
|
818
|
-
onFieldsetFocusout: (
|
|
819
|
-
const
|
|
820
|
-
w(
|
|
851
|
+
onStateChange: L,
|
|
852
|
+
onZipInput: u,
|
|
853
|
+
onFieldsetFocusout: (d) => {
|
|
854
|
+
const x = et(t.value, d);
|
|
855
|
+
w(d), !p.value && x && (h.value = !0);
|
|
821
856
|
},
|
|
822
857
|
normalizedPayload: n,
|
|
823
|
-
validateForSubmit: async () =>
|
|
858
|
+
validateForSubmit: async () => p.value ? (r.value = !0, z.value ? {
|
|
824
859
|
isValid: !0,
|
|
825
860
|
payload: n.value
|
|
826
|
-
} : (await B(),
|
|
861
|
+
} : (await B(), Qe(t.value), { isValid: !1, payload: null })) : c.value || z.value ? (r.value = !1, {
|
|
827
862
|
isValid: !0,
|
|
828
863
|
payload: n.value
|
|
829
864
|
}) : (r.value = !0, { isValid: !1, payload: null }),
|
|
830
865
|
reset: () => {
|
|
831
|
-
r.value = !1,
|
|
866
|
+
r.value = !1, h.value = !1, f(), A(), i();
|
|
832
867
|
}
|
|
833
868
|
};
|
|
834
869
|
}
|
|
835
|
-
const
|
|
870
|
+
const tt = typeof window < "u" && typeof document < "u";
|
|
836
871
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
837
|
-
const
|
|
872
|
+
const nt = Object.prototype.toString, at = (e) => nt.call(e) === "[object Object]", we = () => {
|
|
838
873
|
};
|
|
839
874
|
function Ee(e) {
|
|
840
875
|
return Array.isArray(e) ? e : [e];
|
|
841
876
|
}
|
|
842
|
-
function
|
|
877
|
+
function rt(e, t, r) {
|
|
843
878
|
return ue(e, t, {
|
|
844
879
|
...r,
|
|
845
880
|
immediate: !0
|
|
846
881
|
});
|
|
847
882
|
}
|
|
848
|
-
const
|
|
883
|
+
const Fe = tt ? window : void 0;
|
|
849
884
|
function he(e) {
|
|
850
885
|
var t;
|
|
851
|
-
const r =
|
|
886
|
+
const r = le(e);
|
|
852
887
|
return (t = r?.$el) !== null && t !== void 0 ? t : r;
|
|
853
888
|
}
|
|
854
|
-
function
|
|
855
|
-
const t = (
|
|
856
|
-
const
|
|
857
|
-
return
|
|
889
|
+
function xe(...e) {
|
|
890
|
+
const t = (h, p, m, D) => (h.addEventListener(p, m, D), () => h.removeEventListener(p, m, D)), r = y(() => {
|
|
891
|
+
const h = Ee(le(e[0])).filter((p) => p != null);
|
|
892
|
+
return h.every((p) => typeof p != "string") ? h : void 0;
|
|
858
893
|
});
|
|
859
|
-
return
|
|
860
|
-
var
|
|
894
|
+
return rt(() => {
|
|
895
|
+
var h, p;
|
|
861
896
|
return [
|
|
862
|
-
(
|
|
863
|
-
Ee(
|
|
897
|
+
(h = (p = r.value) === null || p === void 0 ? void 0 : p.map((m) => he(m))) !== null && h !== void 0 ? h : [Fe].filter((m) => m != null),
|
|
898
|
+
Ee(le(r.value ? e[1] : e[0])),
|
|
864
899
|
Ee(Le(r.value ? e[2] : e[1])),
|
|
865
|
-
|
|
900
|
+
le(r.value ? e[3] : e[2])
|
|
866
901
|
];
|
|
867
|
-
}, ([
|
|
868
|
-
if (!
|
|
869
|
-
const
|
|
902
|
+
}, ([h, p, m, D], P, T) => {
|
|
903
|
+
if (!h?.length || !p?.length || !m?.length) return;
|
|
904
|
+
const L = at(D) ? { ...D } : D, A = h.flatMap((R) => p.flatMap((E) => m.map((k) => t(R, E, k, L))));
|
|
870
905
|
T(() => {
|
|
871
|
-
|
|
906
|
+
A.forEach((R) => R());
|
|
872
907
|
});
|
|
873
908
|
}, { flush: "post" });
|
|
874
909
|
}
|
|
875
910
|
function $e(e, t, r = {}) {
|
|
876
|
-
const { window:
|
|
877
|
-
if (!
|
|
878
|
-
stop:
|
|
879
|
-
cancel:
|
|
880
|
-
trigger:
|
|
881
|
-
} :
|
|
911
|
+
const { window: h = Fe, ignore: p = [], capture: m = !0, detectIframe: D = !1, controls: P = !1 } = r;
|
|
912
|
+
if (!h) return P ? {
|
|
913
|
+
stop: we,
|
|
914
|
+
cancel: we,
|
|
915
|
+
trigger: we
|
|
916
|
+
} : we;
|
|
882
917
|
let T = !0;
|
|
883
|
-
const
|
|
884
|
-
if (typeof
|
|
918
|
+
const L = (i) => le(p).some((l) => {
|
|
919
|
+
if (typeof l == "string") return Array.from(h.document.querySelectorAll(l)).some((g) => g === i.target || i.composedPath().includes(g));
|
|
885
920
|
{
|
|
886
|
-
const
|
|
887
|
-
return
|
|
921
|
+
const g = he(l);
|
|
922
|
+
return g && (i.target === g || i.composedPath().includes(g));
|
|
888
923
|
}
|
|
889
924
|
});
|
|
890
|
-
function
|
|
891
|
-
const
|
|
892
|
-
return
|
|
925
|
+
function A(i) {
|
|
926
|
+
const l = le(i);
|
|
927
|
+
return l && l.$.subTree.shapeFlag === 16;
|
|
893
928
|
}
|
|
894
|
-
function
|
|
895
|
-
const
|
|
896
|
-
return V == null || !Array.isArray(V) ? !1 : V.some((Y) => Y.el ===
|
|
929
|
+
function R(i, l) {
|
|
930
|
+
const g = le(i), V = g.$.subTree && g.$.subTree.children;
|
|
931
|
+
return V == null || !Array.isArray(V) ? !1 : V.some((Y) => Y.el === l.target || l.composedPath().includes(Y.el));
|
|
897
932
|
}
|
|
898
|
-
const
|
|
899
|
-
const
|
|
900
|
-
if (
|
|
901
|
-
if ("detail" in
|
|
933
|
+
const E = (i) => {
|
|
934
|
+
const l = he(e);
|
|
935
|
+
if (i.target != null && !(!(l instanceof Element) && A(e) && R(e, i)) && !(!l || l === i.target || i.composedPath().includes(l))) {
|
|
936
|
+
if ("detail" in i && i.detail === 0 && (T = !L(i)), !T) {
|
|
902
937
|
T = !0;
|
|
903
938
|
return;
|
|
904
939
|
}
|
|
905
|
-
t(
|
|
940
|
+
t(i);
|
|
906
941
|
}
|
|
907
942
|
};
|
|
908
|
-
let
|
|
909
|
-
const
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
}, 0),
|
|
943
|
+
let k = !1;
|
|
944
|
+
const C = [
|
|
945
|
+
xe(h, "click", (i) => {
|
|
946
|
+
k || (k = !0, setTimeout(() => {
|
|
947
|
+
k = !1;
|
|
948
|
+
}, 0), E(i));
|
|
914
949
|
}, {
|
|
915
950
|
passive: !0,
|
|
916
|
-
capture:
|
|
951
|
+
capture: m
|
|
917
952
|
}),
|
|
918
|
-
|
|
919
|
-
const
|
|
920
|
-
T = !
|
|
953
|
+
xe(h, "pointerdown", (i) => {
|
|
954
|
+
const l = he(e);
|
|
955
|
+
T = !L(i) && !!(l && !i.composedPath().includes(l));
|
|
921
956
|
}, { passive: !0 }),
|
|
922
|
-
|
|
957
|
+
D && xe(h, "blur", (i) => {
|
|
923
958
|
setTimeout(() => {
|
|
924
|
-
const
|
|
925
|
-
let
|
|
926
|
-
for (;
|
|
927
|
-
|
|
959
|
+
const l = he(e);
|
|
960
|
+
let g = h.document.activeElement;
|
|
961
|
+
for (; g?.shadowRoot; ) g = g.shadowRoot.activeElement;
|
|
962
|
+
g?.tagName === "IFRAME" && !l?.contains(h.document.activeElement) && t(i);
|
|
928
963
|
}, 0);
|
|
929
964
|
}, { passive: !0 })
|
|
930
|
-
].filter(Boolean),
|
|
931
|
-
return
|
|
932
|
-
stop:
|
|
965
|
+
].filter(Boolean), u = () => C.forEach((i) => i());
|
|
966
|
+
return P ? {
|
|
967
|
+
stop: u,
|
|
933
968
|
cancel: () => {
|
|
934
969
|
T = !1;
|
|
935
970
|
},
|
|
936
|
-
trigger: (
|
|
937
|
-
T = !0,
|
|
971
|
+
trigger: (i) => {
|
|
972
|
+
T = !0, E(i), T = !1;
|
|
938
973
|
}
|
|
939
|
-
} :
|
|
974
|
+
} : u;
|
|
940
975
|
}
|
|
941
|
-
const
|
|
976
|
+
const Ie = (e) => {
|
|
942
977
|
if (e instanceof HTMLElement) return e;
|
|
943
978
|
const t = e?.$el;
|
|
944
979
|
return t instanceof HTMLElement ? t : null;
|
|
945
|
-
},
|
|
946
|
-
const t = U(null), r = e.menuItemSelector ?? ".k-menu-item:not(.k-disabled)",
|
|
947
|
-
const l =
|
|
980
|
+
}, ot = (e, t) => t === "row" || !e.matches("tr.k-table-row"), ft = (e) => {
|
|
981
|
+
const t = U(null), r = e.menuItemSelector ?? ".k-menu-item:not(.k-disabled)", h = e.triggerMode ?? "button", p = () => Ie(e.triggerRef.value), m = () => e.resolveFocusTarget?.() ?? Ie(e.focusTargetRef?.value), D = () => {
|
|
982
|
+
const l = m();
|
|
948
983
|
if (l)
|
|
949
984
|
return l.focus(), !0;
|
|
950
|
-
const
|
|
951
|
-
return
|
|
952
|
-
},
|
|
953
|
-
|
|
954
|
-
},
|
|
985
|
+
const g = p();
|
|
986
|
+
return g?.focus(), !!g;
|
|
987
|
+
}, P = () => {
|
|
988
|
+
Ie(e.menuRef.value)?.querySelector(r)?.focus();
|
|
989
|
+
}, T = (l) => {
|
|
955
990
|
e.isOpen.value && (t.value = l, e.requestHide());
|
|
956
991
|
};
|
|
957
|
-
$e(e.menuRef, () =>
|
|
992
|
+
$e(e.menuRef, () => T("outside-click"), {
|
|
958
993
|
ignore: [e.triggerRef]
|
|
959
|
-
})
|
|
994
|
+
});
|
|
995
|
+
let L = null;
|
|
996
|
+
const A = () => {
|
|
997
|
+
L?.removeAttribute("aria-haspopup"), L?.removeAttribute("aria-expanded"), L = null;
|
|
998
|
+
}, R = (l) => {
|
|
999
|
+
if (e.manageMenuTriggerAria === !1) return;
|
|
1000
|
+
const g = p();
|
|
1001
|
+
if (!g || !ot(g, h)) {
|
|
1002
|
+
A();
|
|
1003
|
+
return;
|
|
1004
|
+
}
|
|
1005
|
+
L !== g && A(), g.setAttribute("aria-haspopup", "menu"), g.setAttribute("aria-expanded", l ? "true" : "false"), L = g;
|
|
1006
|
+
};
|
|
1007
|
+
ue(
|
|
960
1008
|
[e.isOpen, e.triggerRef],
|
|
961
|
-
([l]) =>
|
|
962
|
-
const y = g();
|
|
963
|
-
!y || !rt(y) || y.setAttribute("aria-expanded", l ? "true" : "false");
|
|
964
|
-
},
|
|
1009
|
+
([l]) => R(l),
|
|
965
1010
|
{ immediate: !0, flush: "post" }
|
|
966
|
-
);
|
|
967
|
-
const
|
|
1011
|
+
), Ke(A);
|
|
1012
|
+
const E = () => {
|
|
968
1013
|
if (e.isOpen.value) {
|
|
969
|
-
|
|
1014
|
+
T("trigger-click");
|
|
970
1015
|
return;
|
|
971
1016
|
}
|
|
972
|
-
e.requestShow(), B(
|
|
1017
|
+
e.requestShow(), B(P);
|
|
973
1018
|
};
|
|
974
1019
|
return {
|
|
975
1020
|
/**
|
|
976
1021
|
* Handles Kendo Menu selection: records keyboard or mouse modality,
|
|
977
1022
|
* requests popup close, then runs the optional caller-owned action.
|
|
978
1023
|
*/
|
|
979
|
-
handleMenuSelect: (l,
|
|
980
|
-
|
|
1024
|
+
handleMenuSelect: (l, g) => {
|
|
1025
|
+
T(
|
|
981
1026
|
l.event?.type?.startsWith("key") ? "keyboard" : "mouse-selection"
|
|
982
|
-
),
|
|
1027
|
+
), g?.(l);
|
|
983
1028
|
},
|
|
984
1029
|
/**
|
|
985
1030
|
* Toggles the action menu. When opening, focuses the first enabled Kendo
|
|
986
1031
|
* Menu item after Vue renders the popup.
|
|
987
1032
|
*/
|
|
988
|
-
handleActionButtonClick:
|
|
1033
|
+
handleActionButtonClick: E,
|
|
989
1034
|
/**
|
|
990
1035
|
* Handles trigger keyboard input: Enter and Space toggle the menu; Escape
|
|
991
1036
|
* closes an open menu or focuses the configured target when already closed.
|
|
992
1037
|
*/
|
|
993
1038
|
handleActionButtonKeydown: (l) => {
|
|
994
1039
|
if (l.key === "Enter" || l.code === "Space") {
|
|
995
|
-
l.preventDefault(),
|
|
1040
|
+
l.preventDefault(), E();
|
|
996
1041
|
return;
|
|
997
1042
|
}
|
|
998
1043
|
if (l.key === "Escape") {
|
|
999
1044
|
if (l.preventDefault(), l.stopPropagation(), e.isOpen.value) {
|
|
1000
|
-
|
|
1045
|
+
T("keyboard");
|
|
1001
1046
|
return;
|
|
1002
1047
|
}
|
|
1003
|
-
|
|
1048
|
+
D();
|
|
1004
1049
|
}
|
|
1005
1050
|
},
|
|
1006
1051
|
/** Closes the open menu through the keyboard path when Escape is pressed inside it. */
|
|
1007
1052
|
handleActionMenuEscape: (l) => {
|
|
1008
|
-
l.preventDefault(), l.stopPropagation(),
|
|
1053
|
+
l.preventDefault(), l.stopPropagation(), T("keyboard");
|
|
1009
1054
|
},
|
|
1010
1055
|
/**
|
|
1011
1056
|
* Restores focus after Kendo Popup closes: keyboard closes prefer the
|
|
@@ -1014,91 +1059,91 @@ const xe = (e) => {
|
|
|
1014
1059
|
*/
|
|
1015
1060
|
handlePopupClose: () => {
|
|
1016
1061
|
B(() => {
|
|
1017
|
-
t.value === "keyboard" ?
|
|
1062
|
+
t.value === "keyboard" ? D() : t.value === "mouse-selection" && p()?.focus(), t.value = null;
|
|
1018
1063
|
});
|
|
1019
1064
|
}
|
|
1020
1065
|
};
|
|
1021
1066
|
};
|
|
1022
|
-
function
|
|
1023
|
-
const t = U(""), r = U(void 0),
|
|
1067
|
+
function pt(e) {
|
|
1068
|
+
const t = U(""), r = U(void 0), h = U(!!e.debug), p = U(e.dateFormat ?? "mm/dd/yyyy"), m = y(() => !!e.required), D = 1e3, P = U(!1), T = ["ArrowUp", "ArrowDown"], L = ["ArrowLeft", "ArrowRight"], A = y(() => (t.value ?? "").replace(/\D/g, "")), R = (a) => a <= 2 ? "mm" : a <= 5 ? "dd" : A.value.length <= 10 ? "yyyy" : "mm", E = y(() => {
|
|
1024
1069
|
const a = t.value && t.value.substring(0, 2).replace(/\D/g, "0") || "0";
|
|
1025
1070
|
return parseInt(a).toString().padStart(2, "0");
|
|
1026
|
-
}),
|
|
1071
|
+
}), k = y(() => {
|
|
1027
1072
|
const a = t.value && t.value.substring(3, 5).replace(/\D/g, "0") || "0";
|
|
1028
1073
|
return parseInt(a).toString().padStart(2, "0");
|
|
1029
|
-
}),
|
|
1074
|
+
}), C = y(() => {
|
|
1030
1075
|
const a = t.value && t.value.substring(6, 10).replace(/\D/g, "0") || "0";
|
|
1031
1076
|
return parseInt(a).toString().padStart(4, "0");
|
|
1032
|
-
}),
|
|
1033
|
-
if (
|
|
1077
|
+
}), u = (a) => {
|
|
1078
|
+
if (A.value.length === 0) {
|
|
1034
1079
|
e.onChange({ value: null, event: a });
|
|
1035
1080
|
return;
|
|
1036
1081
|
}
|
|
1037
|
-
if (
|
|
1082
|
+
if (A.value.length < 8) {
|
|
1038
1083
|
e.onChange({ value: null, event: a });
|
|
1039
1084
|
return;
|
|
1040
1085
|
}
|
|
1041
|
-
if ((t.value ?? "").length === 10 &&
|
|
1042
|
-
const [
|
|
1043
|
-
if (
|
|
1044
|
-
const
|
|
1045
|
-
|
|
1086
|
+
if ((t.value ?? "").length === 10 && A.value.length === 8) {
|
|
1087
|
+
const [v, $, H] = t.value.split("/"), Z = parseInt(v), G = parseInt($), n = parseInt(H);
|
|
1088
|
+
if (z(n, Z, G)) {
|
|
1089
|
+
const c = V(n, Z, G);
|
|
1090
|
+
i(c) ? e.onChange({ value: c, event: a }) : e.onChange({ value: null, event: a });
|
|
1046
1091
|
} else
|
|
1047
1092
|
e.onChange({ value: null, event: a });
|
|
1048
1093
|
}
|
|
1049
|
-
},
|
|
1050
|
-
const
|
|
1051
|
-
return !(
|
|
1052
|
-
},
|
|
1053
|
-
if ((t.value ?? "").length === 10 &&
|
|
1054
|
-
const [a,
|
|
1055
|
-
if (
|
|
1056
|
-
return V(G,
|
|
1094
|
+
}, i = (a) => {
|
|
1095
|
+
const v = e.min ?? void 0, $ = e.max ?? void 0;
|
|
1096
|
+
return !(v && a < v || $ && a > $);
|
|
1097
|
+
}, l = y(() => {
|
|
1098
|
+
if ((t.value ?? "").length === 10 && A.value.length === 8) {
|
|
1099
|
+
const [a, v, $] = (t.value ?? "").split("/"), H = parseInt(a), Z = parseInt(v), G = parseInt($);
|
|
1100
|
+
if (z(G, H, Z))
|
|
1101
|
+
return V(G, H, Z);
|
|
1057
1102
|
}
|
|
1058
1103
|
return null;
|
|
1059
|
-
}),
|
|
1060
|
-
const
|
|
1061
|
-
return
|
|
1062
|
-
}, Y = (a,
|
|
1104
|
+
}), g = y(() => (t.value ?? "").length === 10 && A.value.length === 8), V = (a, v, $) => {
|
|
1105
|
+
const H = /* @__PURE__ */ new Date(0);
|
|
1106
|
+
return H.setFullYear(a, v - 1, $), H.setHours(0, 0, 0, 0), H;
|
|
1107
|
+
}, Y = (a, v) => V(a, v + 1, 0).getDate(), z = (a, v, $) => v >= 1 && v <= 12 && a >= D && $ >= 1 && $ <= Y(a, v), _ = (a) => {
|
|
1063
1108
|
t.value = a.value;
|
|
1064
|
-
const
|
|
1065
|
-
r.value =
|
|
1066
|
-
},
|
|
1109
|
+
const v = a.event?.target;
|
|
1110
|
+
r.value = v?.selectionStart ?? 0, u(a);
|
|
1111
|
+
}, ee = (a) => {
|
|
1067
1112
|
r.value = a.target.selectionStart ?? 0;
|
|
1068
|
-
},
|
|
1069
|
-
const
|
|
1070
|
-
r.value =
|
|
1071
|
-
let
|
|
1072
|
-
if (!(
|
|
1073
|
-
const
|
|
1074
|
-
|
|
1113
|
+
}, s = (a, v, $) => {
|
|
1114
|
+
const H = v?.selectionStart ?? r.value ?? 0;
|
|
1115
|
+
r.value = H;
|
|
1116
|
+
let Z = parseInt(E.value), G = parseInt(k.value), n = parseInt(C.value);
|
|
1117
|
+
if (!(A.value.length >= 8) || !z(n, Z, G)) {
|
|
1118
|
+
const X = e.defaultValue ?? /* @__PURE__ */ new Date();
|
|
1119
|
+
Z = X.getMonth() + 1, G = X.getDate(), n = X.getFullYear(), t.value = `${String(Z).padStart(2, "0")}/${String(G).padStart(
|
|
1075
1120
|
2,
|
|
1076
1121
|
"0"
|
|
1077
1122
|
)}/${String(n)}`;
|
|
1078
|
-
const ce = V(n,
|
|
1079
|
-
e.onChange({ value:
|
|
1123
|
+
const ce = V(n, Z, G);
|
|
1124
|
+
e.onChange({ value: i(ce) ? ce : null, event: $ }), S({ useRAF: !0 });
|
|
1080
1125
|
return;
|
|
1081
1126
|
}
|
|
1082
|
-
const F =
|
|
1127
|
+
const F = R(H);
|
|
1083
1128
|
if (F === "mm")
|
|
1084
|
-
|
|
1129
|
+
Z = a === "ArrowUp" ? Z < 12 ? Z + 1 : 1 : Z > 1 ? Z - 1 : 12;
|
|
1085
1130
|
else if (F === "dd") {
|
|
1086
|
-
const
|
|
1087
|
-
G = a === "ArrowUp" ? G <
|
|
1131
|
+
const X = new Date(n, Z, 0).getDate();
|
|
1132
|
+
G = a === "ArrowUp" ? G < X ? G + 1 : 1 : G > 1 ? G - 1 : X;
|
|
1088
1133
|
} else F === "yyyy" && (n = a === "ArrowUp" ? n + 1 : Math.max(1, n - 1));
|
|
1089
|
-
t.value = `${String(
|
|
1134
|
+
t.value = `${String(Z).padStart(2, "0")}/${String(G).padStart(
|
|
1090
1135
|
2,
|
|
1091
1136
|
"0"
|
|
1092
1137
|
)}/${String(n)}`;
|
|
1093
|
-
const [
|
|
1094
|
-
parseInt(
|
|
1095
|
-
parseInt(
|
|
1138
|
+
const [q, j, te] = t.value.split("/"), O = V(
|
|
1139
|
+
parseInt(te),
|
|
1140
|
+
parseInt(q),
|
|
1096
1141
|
parseInt(j)
|
|
1097
1142
|
);
|
|
1098
|
-
O.toString() !== "Invalid Date" && parseInt(
|
|
1099
|
-
value:
|
|
1100
|
-
event:
|
|
1101
|
-
}) : e.onChange({ value: null, event:
|
|
1143
|
+
O.toString() !== "Invalid Date" && parseInt(te) >= 1e3 ? e.onChange({
|
|
1144
|
+
value: i(O) ? O : null,
|
|
1145
|
+
event: $
|
|
1146
|
+
}) : e.onChange({ value: null, event: $ }), S({ useRAF: !0 });
|
|
1102
1147
|
}, w = (a) => {
|
|
1103
1148
|
if (a.code === "Space" || a.key === " ") {
|
|
1104
1149
|
a.preventDefault(), a.stopPropagation(), e.onShowCalendar(a);
|
|
@@ -1111,69 +1156,69 @@ function ft(e) {
|
|
|
1111
1156
|
if (T.includes(a.key)) {
|
|
1112
1157
|
if (a.altKey) return;
|
|
1113
1158
|
a.preventDefault(), a.stopPropagation();
|
|
1114
|
-
const
|
|
1115
|
-
|
|
1159
|
+
const v = a.target;
|
|
1160
|
+
s(a.key, v, a);
|
|
1116
1161
|
return;
|
|
1117
1162
|
}
|
|
1118
|
-
},
|
|
1163
|
+
}, f = (a) => {
|
|
1119
1164
|
a.preventDefault();
|
|
1120
|
-
const
|
|
1121
|
-
|
|
1165
|
+
const v = a.deltaY < 0 ? "ArrowUp" : "ArrowDown";
|
|
1166
|
+
s(v, a.target, a);
|
|
1122
1167
|
}, b = (a) => {
|
|
1123
|
-
const
|
|
1124
|
-
if (
|
|
1125
|
-
r.value =
|
|
1168
|
+
const v = a.target;
|
|
1169
|
+
if (L.includes(a.key)) {
|
|
1170
|
+
r.value = v?.selectionStart ?? 0;
|
|
1126
1171
|
return;
|
|
1127
1172
|
}
|
|
1128
1173
|
if (T.includes(a.key)) {
|
|
1129
1174
|
if (a.altKey) return;
|
|
1130
|
-
r.value =
|
|
1175
|
+
r.value = v?.selectionStart ?? 0;
|
|
1131
1176
|
}
|
|
1132
1177
|
}, I = (a) => {
|
|
1133
|
-
|
|
1134
|
-
const
|
|
1135
|
-
|
|
1178
|
+
P.value = !0, m.value && !e.defaultValue && e.externalValue && e.externalValue.value === void 0 && A.value.length === 0 && (e.externalValue.value = "");
|
|
1179
|
+
const v = a.target;
|
|
1180
|
+
v && (r.value = v.selectionStart ?? 0);
|
|
1136
1181
|
}, S = (a) => {
|
|
1137
|
-
const
|
|
1138
|
-
const
|
|
1182
|
+
const v = () => {
|
|
1183
|
+
const $ = document.getElementById(
|
|
1139
1184
|
e.id
|
|
1140
1185
|
);
|
|
1141
|
-
if (
|
|
1142
|
-
const
|
|
1186
|
+
if (!$) return;
|
|
1187
|
+
const H = a?.pos ?? r.value ?? $.value.length;
|
|
1143
1188
|
try {
|
|
1144
|
-
|
|
1189
|
+
$.focus(), $.setSelectionRange(H, H);
|
|
1145
1190
|
} catch {
|
|
1146
1191
|
}
|
|
1147
1192
|
};
|
|
1148
1193
|
B(() => {
|
|
1149
1194
|
if (a?.delay && a.delay > 0) {
|
|
1150
|
-
setTimeout(
|
|
1195
|
+
setTimeout(v, a.delay);
|
|
1151
1196
|
return;
|
|
1152
1197
|
}
|
|
1153
1198
|
if (a?.useRAF) {
|
|
1154
|
-
requestAnimationFrame(
|
|
1199
|
+
requestAnimationFrame(v);
|
|
1155
1200
|
return;
|
|
1156
1201
|
}
|
|
1157
|
-
|
|
1202
|
+
v();
|
|
1158
1203
|
});
|
|
1159
1204
|
};
|
|
1160
1205
|
e.externalValue && ue(
|
|
1161
1206
|
e.externalValue,
|
|
1162
1207
|
(a) => {
|
|
1163
1208
|
if (a) {
|
|
1164
|
-
const
|
|
1165
|
-
if (
|
|
1166
|
-
const
|
|
1167
|
-
t.value = `${
|
|
1209
|
+
const v = new Date(a);
|
|
1210
|
+
if (v.toString() !== "Invalid Date") {
|
|
1211
|
+
const $ = (v.getMonth() + 1).toString().padStart(2, "0"), H = v.getDate().toString().padStart(2, "0"), Z = v.getFullYear().toString();
|
|
1212
|
+
t.value = `${$}/${H}/${Z}`, S({ delay: 50 });
|
|
1168
1213
|
return;
|
|
1169
1214
|
}
|
|
1170
1215
|
}
|
|
1171
1216
|
},
|
|
1172
1217
|
{ immediate: !0 }
|
|
1173
1218
|
);
|
|
1174
|
-
const M =
|
|
1175
|
-
["Date", `${
|
|
1176
|
-
["Digits only",
|
|
1219
|
+
const M = y(() => [
|
|
1220
|
+
["Date", `${E.value} / ${k.value} / ${C.value}`],
|
|
1221
|
+
["Digits only", A.value],
|
|
1177
1222
|
[
|
|
1178
1223
|
"min",
|
|
1179
1224
|
e.min?.toLocaleDateString("en-US", {
|
|
@@ -1190,46 +1235,46 @@ function ft(e) {
|
|
|
1190
1235
|
day: "2-digit"
|
|
1191
1236
|
}) ?? null
|
|
1192
1237
|
]
|
|
1193
|
-
]),
|
|
1194
|
-
if (!
|
|
1195
|
-
if (!
|
|
1196
|
-
const
|
|
1197
|
-
return
|
|
1238
|
+
]), N = y(() => {
|
|
1239
|
+
if (!m.value) {
|
|
1240
|
+
if (!g.value) return !0;
|
|
1241
|
+
const v = l.value;
|
|
1242
|
+
return v ? i(v) : !1;
|
|
1198
1243
|
}
|
|
1199
|
-
if (!
|
|
1200
|
-
const a =
|
|
1201
|
-
return !
|
|
1202
|
-
}), W =
|
|
1203
|
-
if (!
|
|
1204
|
-
if (!
|
|
1205
|
-
const
|
|
1206
|
-
return
|
|
1244
|
+
if (!P.value) return !0;
|
|
1245
|
+
const a = l.value;
|
|
1246
|
+
return !g.value || !a ? !1 : i(a);
|
|
1247
|
+
}), W = y(() => {
|
|
1248
|
+
if (!m.value) {
|
|
1249
|
+
if (!g.value) return;
|
|
1250
|
+
const v = l.value;
|
|
1251
|
+
return v ? i(v) ? "valid" : "out-of-bounds" : "invalid-date";
|
|
1207
1252
|
}
|
|
1208
|
-
if (!
|
|
1209
|
-
if (
|
|
1253
|
+
if (!P.value) return;
|
|
1254
|
+
if (A.value.length === 0 || !g.value)
|
|
1210
1255
|
return "incomplete";
|
|
1211
|
-
const a =
|
|
1212
|
-
return a ?
|
|
1213
|
-
}),
|
|
1256
|
+
const a = l.value;
|
|
1257
|
+
return a ? i(a) ? "valid" : "out-of-bounds" : "invalid-date";
|
|
1258
|
+
}), re = y(() => {
|
|
1214
1259
|
const a = W.value;
|
|
1215
1260
|
if (!a || a === "valid") return "";
|
|
1216
1261
|
if (a === "incomplete")
|
|
1217
1262
|
return "Required";
|
|
1218
1263
|
if (a === "invalid-date")
|
|
1219
|
-
return `Must be in ${
|
|
1220
|
-
const
|
|
1264
|
+
return `Must be in ${p.value} format.`;
|
|
1265
|
+
const v = e.min ? e.min.toLocaleDateString("en-US", {
|
|
1221
1266
|
year: "numeric",
|
|
1222
1267
|
month: "2-digit",
|
|
1223
1268
|
day: "2-digit"
|
|
1224
|
-
}) : null,
|
|
1269
|
+
}) : null, $ = e.max ? e.max.toLocaleDateString("en-US", {
|
|
1225
1270
|
year: "numeric",
|
|
1226
1271
|
month: "2-digit",
|
|
1227
1272
|
day: "2-digit"
|
|
1228
1273
|
}) : null;
|
|
1229
1274
|
if (a === "out-of-bounds") {
|
|
1230
|
-
if (
|
|
1231
|
-
if (
|
|
1232
|
-
if (
|
|
1275
|
+
if (v && $) return `Must be between ${v} and ${$}.`;
|
|
1276
|
+
if (v) return `Must be on or after ${v}.`;
|
|
1277
|
+
if ($) return `Must be on or before ${$}.`;
|
|
1233
1278
|
}
|
|
1234
1279
|
return "";
|
|
1235
1280
|
}), se = () => {
|
|
@@ -1241,16 +1286,16 @@ function ft(e) {
|
|
|
1241
1286
|
console.warn(`ID (#${e.id}) not found for styling.`);
|
|
1242
1287
|
return;
|
|
1243
1288
|
}
|
|
1244
|
-
const
|
|
1245
|
-
if (!
|
|
1289
|
+
const v = a.closest(".k-datepicker");
|
|
1290
|
+
if (!v) {
|
|
1246
1291
|
console.warn(`.k-datepicker parent not found for #${e.id} styling.`);
|
|
1247
1292
|
return;
|
|
1248
1293
|
}
|
|
1249
|
-
const
|
|
1250
|
-
if (
|
|
1251
|
-
if (
|
|
1294
|
+
const $ = v.parentElement;
|
|
1295
|
+
if ($) {
|
|
1296
|
+
if ($.classList.contains("fk-datepicker"))
|
|
1252
1297
|
return;
|
|
1253
|
-
|
|
1298
|
+
$.classList.add("fk-datepicker");
|
|
1254
1299
|
} else
|
|
1255
1300
|
console.warn(
|
|
1256
1301
|
`Parent of .k-datepicker not found for #${e.id} styling.`
|
|
@@ -1262,63 +1307,63 @@ function ft(e) {
|
|
|
1262
1307
|
}), {
|
|
1263
1308
|
raw: t,
|
|
1264
1309
|
cursorPos: r,
|
|
1265
|
-
debugEnabled:
|
|
1310
|
+
debugEnabled: h,
|
|
1266
1311
|
debugLines: M,
|
|
1267
|
-
placeholder:
|
|
1268
|
-
isValid:
|
|
1269
|
-
reason:
|
|
1270
|
-
validationMessage:
|
|
1271
|
-
digitsOnly:
|
|
1272
|
-
month:
|
|
1273
|
-
day:
|
|
1274
|
-
year:
|
|
1275
|
-
datePart:
|
|
1276
|
-
handleChange:
|
|
1312
|
+
placeholder: p,
|
|
1313
|
+
isValid: N,
|
|
1314
|
+
reason: Q(W),
|
|
1315
|
+
validationMessage: re,
|
|
1316
|
+
digitsOnly: A,
|
|
1317
|
+
month: Q(E),
|
|
1318
|
+
day: Q(k),
|
|
1319
|
+
year: Q(C),
|
|
1320
|
+
datePart: R,
|
|
1321
|
+
handleChange: _,
|
|
1277
1322
|
handleKeyDown: w,
|
|
1278
|
-
handleWheel:
|
|
1323
|
+
handleWheel: f,
|
|
1279
1324
|
handleKeyUp: b,
|
|
1280
|
-
handleClick:
|
|
1325
|
+
handleClick: ee,
|
|
1281
1326
|
handleBlur: I,
|
|
1282
1327
|
// Expose so consumers can re-run styling when needed
|
|
1283
1328
|
initStyling: se
|
|
1284
1329
|
};
|
|
1285
1330
|
}
|
|
1286
|
-
function
|
|
1287
|
-
const t = U(""), r = U(void 0),
|
|
1288
|
-
e.min = e.min ?? T, e.max = e.max ??
|
|
1289
|
-
const
|
|
1331
|
+
function mt(e) {
|
|
1332
|
+
const t = U(""), r = U(void 0), h = U(!!e.debug), p = U(!1), m = 1440 * 60 * 1e3, D = 365 * m, P = /* @__PURE__ */ new Date(), T = new Date(P.getTime() - D), L = new Date(P.getTime() + D);
|
|
1333
|
+
e.min = e.min ?? T, e.max = e.max ?? L;
|
|
1334
|
+
const A = y(() => (t.value ?? "").replace(/\D/g, "")), R = (o, d) => new Date(o, d, 0).getDate(), E = (o, d, x) => d >= 1 && d <= 12 && o >= 1e3 && x >= 1 && x <= R(o, d), k = (o) => Date.UTC(o.getFullYear(), o.getMonth(), o.getDate()), C = (o) => {
|
|
1290
1335
|
if (!o) return null;
|
|
1291
|
-
const
|
|
1292
|
-
return
|
|
1293
|
-
},
|
|
1294
|
-
if ((o ?? "").length < 23 ||
|
|
1336
|
+
const d = e.min ?? new Date(Date.now() - 90 * m), x = e.max ?? /* @__PURE__ */ new Date(), K = k(o);
|
|
1337
|
+
return K < k(d) || K > k(x) ? null : o;
|
|
1338
|
+
}, u = (o, d) => e.allowReverse ?? !1 ? !0 : o <= d, i = y(() => (t.value?.length ?? 0) >= 23 && A.value.length >= 16), l = (o) => {
|
|
1339
|
+
if ((o ?? "").length < 23 || A.value.length < 16)
|
|
1295
1340
|
return { start: null, end: null };
|
|
1296
|
-
const
|
|
1297
|
-
return { start:
|
|
1298
|
-
},
|
|
1299
|
-
const o =
|
|
1300
|
-
return { start: o, end:
|
|
1301
|
-
}),
|
|
1302
|
-
if (!
|
|
1303
|
-
const o = Y.value.start,
|
|
1304
|
-
if (!o || !
|
|
1305
|
-
const
|
|
1306
|
-
return Math.round(
|
|
1307
|
-
}),
|
|
1308
|
-
if (!
|
|
1309
|
-
const { start: o, end:
|
|
1310
|
-
if (!
|
|
1311
|
-
if (!o || !
|
|
1341
|
+
const d = o.substring(0, 10), x = o.substring(13, 23), [K, ne, ae] = d.split("/").map((pe) => parseInt(pe || "0", 10)), [fe, me, ve] = x.split("/").map((pe) => parseInt(pe || "0", 10)), ge = new Date(ae, K - 1, ne), ye = new Date(ve, fe - 1, me), Se = E(ae, K, ne) && ge.toString() !== "Invalid Date", ke = E(ve, fe, me) && ye.toString() !== "Invalid Date";
|
|
1342
|
+
return { start: Se ? ge : null, end: ke ? ye : null };
|
|
1343
|
+
}, g = e.externalValid ?? U(!0), V = y(() => l(t.value)), Y = y(() => {
|
|
1344
|
+
const o = C(V.value.start), d = C(V.value.end);
|
|
1345
|
+
return { start: o, end: d };
|
|
1346
|
+
}), z = y(() => {
|
|
1347
|
+
if (!i.value) return;
|
|
1348
|
+
const o = Y.value.start, d = Y.value.end;
|
|
1349
|
+
if (!o || !d) return;
|
|
1350
|
+
const x = Math.abs(k(d) - k(o));
|
|
1351
|
+
return Math.round(x / 864e5 + 1);
|
|
1352
|
+
}), _ = U(!1), ee = y(() => {
|
|
1353
|
+
if (!_.value) return;
|
|
1354
|
+
const { start: o, end: d } = V.value;
|
|
1355
|
+
if (!i.value) return "incomplete";
|
|
1356
|
+
if (!o || !d) return "invalid-date";
|
|
1312
1357
|
if (!Y.value.start || !Y.value.end) return "out-of-bounds";
|
|
1313
|
-
const
|
|
1314
|
-
return
|
|
1315
|
-
}),
|
|
1316
|
-
const o =
|
|
1358
|
+
const x = Y.value.start, K = Y.value.end;
|
|
1359
|
+
return u(x, K) ? typeof e.maxSpanDays == "number" && z.value !== void 0 && z.value > e.maxSpanDays ? "span-exceeds-limit" : "valid" : "reversed-range";
|
|
1360
|
+
}), s = y(() => {
|
|
1361
|
+
const o = ee.value;
|
|
1317
1362
|
return o === void 0 || o === "valid";
|
|
1318
|
-
}), w =
|
|
1319
|
-
const { min: o, max:
|
|
1320
|
-
if (!
|
|
1321
|
-
switch (
|
|
1363
|
+
}), w = y(() => {
|
|
1364
|
+
const { min: o, max: d } = e, x = ee.value;
|
|
1365
|
+
if (!x) return "";
|
|
1366
|
+
switch (x) {
|
|
1322
1367
|
case "incomplete":
|
|
1323
1368
|
return "Required";
|
|
1324
1369
|
case "invalid-date":
|
|
@@ -1326,54 +1371,54 @@ function pt(e) {
|
|
|
1326
1371
|
case "reversed-range":
|
|
1327
1372
|
return "End Date must be on or after Start Date.";
|
|
1328
1373
|
case "out-of-bounds":
|
|
1329
|
-
return o &&
|
|
1374
|
+
return o && d ? `Dates must be between ${S(o)} and ${S(d)}.` : "Dates must be within the allowed range.";
|
|
1330
1375
|
case "span-exceeds-limit":
|
|
1331
1376
|
return typeof e.maxSpanDays == "number" ? `Date range exceeds ${e.maxSpanDays} days.` : "Date range exceeds maximum allowed span.";
|
|
1332
1377
|
default:
|
|
1333
1378
|
return "";
|
|
1334
1379
|
}
|
|
1335
|
-
}),
|
|
1380
|
+
}), f = ["ArrowUp", "ArrowDown"], b = ["ArrowLeft", "ArrowRight"], I = (o, d) => String(o).padStart(d, "0"), S = (o) => `${I(o.getMonth() + 1, 2)}/${I(o.getDate(), 2)}/${I(
|
|
1336
1381
|
o.getFullYear(),
|
|
1337
1382
|
4
|
|
1338
|
-
)}`, M = (o) => o <= 2 ? { side: "start", part: "mm" } : o <= 5 ? { side: "start", part: (o <= 3, "dd") } : o <= 11 ? { side: "start", part: "yyyy" } : o <= 15 ? { side: "end", part: "mm" } : o <= 18 ? { side: "end", part: "dd" } : { side: "end", part: "yyyy" },
|
|
1339
|
-
const
|
|
1340
|
-
r.value =
|
|
1341
|
-
const { start:
|
|
1342
|
-
if (!
|
|
1383
|
+
)}`, M = (o) => o <= 2 ? { side: "start", part: "mm" } : o <= 5 ? { side: "start", part: (o <= 3, "dd") } : o <= 11 ? { side: "start", part: "yyyy" } : o <= 15 ? { side: "end", part: "mm" } : o <= 18 ? { side: "end", part: "dd" } : { side: "end", part: "yyyy" }, N = (o, d, x) => {
|
|
1384
|
+
const K = d?.selectionStart ?? r.value ?? 0;
|
|
1385
|
+
r.value = K;
|
|
1386
|
+
const { start: ne, end: ae } = l(t.value);
|
|
1387
|
+
if (!ne && !ae) {
|
|
1343
1388
|
const J = /* @__PURE__ */ new Date(), de = S(J);
|
|
1344
|
-
t.value = `${de} - ${de}`, e.onChange({ value: { start: J, end: J }, event:
|
|
1389
|
+
t.value = `${de} - ${de}`, e.onChange({ value: { start: J, end: J }, event: x }), B(() => {
|
|
1345
1390
|
requestAnimationFrame(() => {
|
|
1346
|
-
const
|
|
1391
|
+
const oe = document.getElementById(
|
|
1347
1392
|
e.id
|
|
1348
1393
|
), ie = r.value ?? 0;
|
|
1349
|
-
|
|
1394
|
+
oe && (oe.focus(), oe.setSelectionRange(ie, ie));
|
|
1350
1395
|
});
|
|
1351
1396
|
});
|
|
1352
1397
|
return;
|
|
1353
1398
|
}
|
|
1354
|
-
const fe = /* @__PURE__ */ new Date(), me = M(
|
|
1355
|
-
let ve =
|
|
1399
|
+
const fe = /* @__PURE__ */ new Date(), me = M(K);
|
|
1400
|
+
let ve = ne ? new Date(ne) : new Date(fe), ge = ae ? new Date(ae) : new Date(fe);
|
|
1356
1401
|
const ye = (J, de) => {
|
|
1357
1402
|
if (de === "mm") {
|
|
1358
|
-
const
|
|
1403
|
+
const oe = J.getMonth() + 1, ie = o === "ArrowUp" ? oe < 12 ? oe + 1 : 1 : oe > 1 ? oe - 1 : 12;
|
|
1359
1404
|
J.setMonth(ie - 1);
|
|
1360
|
-
const be =
|
|
1405
|
+
const be = R(J.getFullYear(), ie);
|
|
1361
1406
|
J.getDate() > be && J.setDate(be);
|
|
1362
1407
|
} else if (de === "dd") {
|
|
1363
|
-
const
|
|
1408
|
+
const oe = R(J.getFullYear(), J.getMonth() + 1), ie = J.getDate(), be = o === "ArrowUp" ? ie < oe ? ie + 1 : 1 : ie > 1 ? ie - 1 : oe;
|
|
1364
1409
|
J.setDate(be);
|
|
1365
1410
|
} else if (de === "yyyy") {
|
|
1366
|
-
const
|
|
1367
|
-
J.setFullYear(o === "ArrowUp" ?
|
|
1368
|
-
const ie =
|
|
1411
|
+
const oe = J.getFullYear();
|
|
1412
|
+
J.setFullYear(o === "ArrowUp" ? oe + 1 : Math.max(1, oe - 1));
|
|
1413
|
+
const ie = R(J.getFullYear(), J.getMonth() + 1);
|
|
1369
1414
|
J.getDate() > ie && J.setDate(ie);
|
|
1370
1415
|
}
|
|
1371
1416
|
};
|
|
1372
1417
|
me.side === "start" ? ye(ve, me.part) : ye(ge, me.part);
|
|
1373
|
-
const
|
|
1374
|
-
t.value = `${
|
|
1375
|
-
const pe =
|
|
1376
|
-
pe && Ae &&
|
|
1418
|
+
const Se = S(ve), ke = S(ge);
|
|
1419
|
+
t.value = `${Se} - ${ke}`;
|
|
1420
|
+
const pe = C(ve), Ae = C(ge);
|
|
1421
|
+
pe && Ae && u(pe, Ae) ? e.onChange({ value: { start: pe, end: Ae }, event: x }) : e.onChange({ value: null, event: x }), B(() => {
|
|
1377
1422
|
requestAnimationFrame(() => {
|
|
1378
1423
|
const J = document.getElementById(
|
|
1379
1424
|
e.id
|
|
@@ -1382,30 +1427,30 @@ function pt(e) {
|
|
|
1382
1427
|
});
|
|
1383
1428
|
});
|
|
1384
1429
|
}, W = (o) => {
|
|
1385
|
-
const { start:
|
|
1386
|
-
if (!
|
|
1430
|
+
const { start: d, end: x } = l(t.value);
|
|
1431
|
+
if (!d || !x) {
|
|
1387
1432
|
e.onChange({ value: null, event: o });
|
|
1388
1433
|
return;
|
|
1389
1434
|
}
|
|
1390
|
-
const
|
|
1391
|
-
if (!
|
|
1435
|
+
const K = C(d), ne = C(x);
|
|
1436
|
+
if (!K || !ne) {
|
|
1392
1437
|
e.onChange({ value: null, event: o });
|
|
1393
1438
|
return;
|
|
1394
1439
|
}
|
|
1395
|
-
if (!
|
|
1440
|
+
if (!u(K, ne)) {
|
|
1396
1441
|
e.onChange({ value: null, event: o });
|
|
1397
1442
|
return;
|
|
1398
1443
|
}
|
|
1399
|
-
e.onChange({ value: { start:
|
|
1400
|
-
},
|
|
1401
|
-
const
|
|
1402
|
-
if (!
|
|
1403
|
-
G(
|
|
1444
|
+
e.onChange({ value: { start: K, end: ne }, event: o });
|
|
1445
|
+
}, re = (o) => {
|
|
1446
|
+
const d = o.value ?? "", x = o.event;
|
|
1447
|
+
if (!d && x && x.type === "click") {
|
|
1448
|
+
G(x);
|
|
1404
1449
|
return;
|
|
1405
1450
|
}
|
|
1406
|
-
t.value =
|
|
1407
|
-
const
|
|
1408
|
-
r.value =
|
|
1451
|
+
t.value = d;
|
|
1452
|
+
const K = x?.target;
|
|
1453
|
+
r.value = K?.selectionStart ?? 0, W(o);
|
|
1409
1454
|
}, se = (o) => {
|
|
1410
1455
|
r.value = o.target.selectionStart ?? 0;
|
|
1411
1456
|
}, a = (o) => {
|
|
@@ -1417,63 +1462,63 @@ function pt(e) {
|
|
|
1417
1462
|
o.preventDefault(), o.stopPropagation(), e.onShowCalendar(o);
|
|
1418
1463
|
return;
|
|
1419
1464
|
}
|
|
1420
|
-
if (
|
|
1465
|
+
if (f.includes(o.key)) {
|
|
1421
1466
|
o.preventDefault(), o.stopPropagation();
|
|
1422
|
-
const
|
|
1423
|
-
|
|
1467
|
+
const d = o.target;
|
|
1468
|
+
N(o.key, d, o);
|
|
1424
1469
|
return;
|
|
1425
1470
|
}
|
|
1426
|
-
},
|
|
1471
|
+
}, v = (o) => {
|
|
1427
1472
|
o.preventDefault();
|
|
1428
|
-
const
|
|
1429
|
-
|
|
1430
|
-
},
|
|
1431
|
-
if (b.includes(o.key) ||
|
|
1432
|
-
const
|
|
1433
|
-
r.value =
|
|
1473
|
+
const d = o.deltaY < 0 ? "ArrowUp" : "ArrowDown";
|
|
1474
|
+
N(d, o.target, o);
|
|
1475
|
+
}, $ = (o) => {
|
|
1476
|
+
if (b.includes(o.key) || f.includes(o.key)) {
|
|
1477
|
+
const d = o.target;
|
|
1478
|
+
r.value = d?.selectionStart ?? 0;
|
|
1434
1479
|
}
|
|
1435
|
-
},
|
|
1436
|
-
|
|
1437
|
-
},
|
|
1438
|
-
|
|
1480
|
+
}, H = () => {
|
|
1481
|
+
_.value = !0, (e.manageValid ?? !0) && (g.value = s.value);
|
|
1482
|
+
}, Z = (o) => {
|
|
1483
|
+
H();
|
|
1439
1484
|
}, G = (o) => {
|
|
1440
|
-
t.value = "", r.value = 0, e.onChange({ value: null, event: o }),
|
|
1441
|
-
const
|
|
1485
|
+
t.value = "", r.value = 0, e.onChange({ value: null, event: o }), H(), B(() => {
|
|
1486
|
+
const d = document.getElementById(
|
|
1442
1487
|
e.id
|
|
1443
1488
|
);
|
|
1444
|
-
|
|
1489
|
+
d && (d.focus(), d.setSelectionRange(0, 0));
|
|
1445
1490
|
});
|
|
1446
1491
|
};
|
|
1447
1492
|
e.externalValue && ue(
|
|
1448
1493
|
e.externalValue,
|
|
1449
1494
|
(o) => {
|
|
1450
|
-
const
|
|
1451
|
-
if (
|
|
1452
|
-
if (t.value = `${S(
|
|
1453
|
-
const
|
|
1495
|
+
const d = o?.start ?? null, x = o?.end ?? null;
|
|
1496
|
+
if (d && x) {
|
|
1497
|
+
if (t.value = `${S(d)} - ${S(x)}`, e.isOpen?.value && p.value && e.onRequestClose) {
|
|
1498
|
+
const K = typeof e.closeDelay == "number" ? e.closeDelay : e.closeDelay?.value ?? 0;
|
|
1454
1499
|
setTimeout(() => {
|
|
1455
|
-
e.onRequestClose?.(),
|
|
1456
|
-
},
|
|
1500
|
+
e.onRequestClose?.(), p.value = !1, H();
|
|
1501
|
+
}, K);
|
|
1457
1502
|
}
|
|
1458
1503
|
return;
|
|
1459
1504
|
}
|
|
1460
1505
|
},
|
|
1461
1506
|
{ immediate: !0 }
|
|
1462
1507
|
);
|
|
1463
|
-
const n =
|
|
1508
|
+
const n = y(
|
|
1464
1509
|
() => t.value && t.value.substring(0, 2).replace(/\D/g, "0") || "0"
|
|
1465
|
-
),
|
|
1510
|
+
), c = y(
|
|
1466
1511
|
() => t.value && t.value.substring(3, 5).replace(/\D/g, "0") || "0"
|
|
1467
|
-
), F =
|
|
1512
|
+
), F = y(
|
|
1468
1513
|
() => t.value && t.value.substring(6, 10).replace(/\D/g, "0") || "0"
|
|
1469
|
-
),
|
|
1514
|
+
), q = y(
|
|
1470
1515
|
() => t.value && t.value.substring(13, 15).replace(/\D/g, "0") || "0"
|
|
1471
|
-
), j =
|
|
1516
|
+
), j = y(
|
|
1472
1517
|
() => t.value && t.value.substring(16, 18).replace(/\D/g, "0") || "0"
|
|
1473
|
-
),
|
|
1518
|
+
), te = y(
|
|
1474
1519
|
() => t.value && t.value.substring(19, 23).replace(/\D/g, "0") || "0"
|
|
1475
|
-
), O =
|
|
1476
|
-
const { start: o, end:
|
|
1520
|
+
), O = y(() => {
|
|
1521
|
+
const { start: o, end: d } = l(t.value);
|
|
1477
1522
|
return [
|
|
1478
1523
|
{
|
|
1479
1524
|
label: "Raw",
|
|
@@ -1490,55 +1535,55 @@ function pt(e) {
|
|
|
1490
1535
|
{
|
|
1491
1536
|
label: "Start",
|
|
1492
1537
|
value: `${String(n.value).padStart(2, "0")} / ${String(
|
|
1493
|
-
|
|
1538
|
+
c.value
|
|
1494
1539
|
).padStart(2, "0")} / ${String(F.value).padStart(4, "0")}`
|
|
1495
1540
|
},
|
|
1496
1541
|
{
|
|
1497
1542
|
label: "End",
|
|
1498
|
-
value: `${String(
|
|
1543
|
+
value: `${String(q.value).padStart(2, "0")} / ${String(
|
|
1499
1544
|
j.value
|
|
1500
|
-
).padStart(2, "0")} / ${String(
|
|
1545
|
+
).padStart(2, "0")} / ${String(te.value).padStart(4, "0")}`
|
|
1501
1546
|
},
|
|
1502
|
-
{ label: "Digits only", value:
|
|
1503
|
-
{ label: "Mask complete", value: `${
|
|
1547
|
+
{ label: "Digits only", value: A.value },
|
|
1548
|
+
{ label: "Mask complete", value: `${i.value}` },
|
|
1504
1549
|
{
|
|
1505
1550
|
label: "Parsed",
|
|
1506
|
-
value: `${o ? o.toDateString() : "-"} | ${
|
|
1551
|
+
value: `${o ? o.toDateString() : "-"} | ${d ? d.toDateString() : "-"}`
|
|
1507
1552
|
},
|
|
1508
1553
|
{
|
|
1509
1554
|
label: "Valid (managed)",
|
|
1510
|
-
value: `${
|
|
1555
|
+
value: `${g.value ?? "-"}`
|
|
1511
1556
|
},
|
|
1512
|
-
{ label: "Span (days)", value: `${
|
|
1557
|
+
{ label: "Span (days)", value: `${z.value ?? "-"}` },
|
|
1513
1558
|
{
|
|
1514
1559
|
label: "Reason",
|
|
1515
|
-
value: `${
|
|
1560
|
+
value: `${ee.value ?? "-"}`
|
|
1516
1561
|
},
|
|
1517
1562
|
{
|
|
1518
1563
|
label: "Cursor in",
|
|
1519
1564
|
value: `${r.value ?? "-"} (${(() => {
|
|
1520
|
-
const
|
|
1521
|
-
return `${
|
|
1565
|
+
const x = r.value ?? 0, K = M(x);
|
|
1566
|
+
return `${K.side}.${K.part}`;
|
|
1522
1567
|
})()})`
|
|
1523
1568
|
}
|
|
1524
1569
|
];
|
|
1525
|
-
}),
|
|
1570
|
+
}), X = () => {
|
|
1526
1571
|
B(() => {
|
|
1527
1572
|
const o = document.getElementById(e.id);
|
|
1528
1573
|
if (!o) {
|
|
1529
1574
|
console.warn(`#${e.id} not found for styling.`);
|
|
1530
1575
|
return;
|
|
1531
1576
|
}
|
|
1532
|
-
const
|
|
1533
|
-
if (!
|
|
1577
|
+
const d = o.closest("div");
|
|
1578
|
+
if (!d) {
|
|
1534
1579
|
console.warn(`Parent div of #${e.id} not found for styling.`);
|
|
1535
1580
|
return;
|
|
1536
1581
|
}
|
|
1537
|
-
|
|
1582
|
+
d.classList.contains("fk-daterangepicker") || d.classList.add("fk-daterangepicker");
|
|
1538
1583
|
});
|
|
1539
1584
|
};
|
|
1540
1585
|
Me(() => {
|
|
1541
|
-
|
|
1586
|
+
X();
|
|
1542
1587
|
});
|
|
1543
1588
|
const ce = () => {
|
|
1544
1589
|
B(() => {
|
|
@@ -1547,16 +1592,16 @@ function pt(e) {
|
|
|
1547
1592
|
document.querySelectorAll(".k-animation-container")
|
|
1548
1593
|
);
|
|
1549
1594
|
if (!o.length) return;
|
|
1550
|
-
const
|
|
1595
|
+
const x = [...o].reverse().find((ae) => ae.querySelector(".k-calendar"))?.querySelector(
|
|
1551
1596
|
".k-calendar"
|
|
1552
1597
|
);
|
|
1553
|
-
if (!
|
|
1554
|
-
const
|
|
1598
|
+
if (!x) return;
|
|
1599
|
+
const K = x.querySelectorAll(
|
|
1555
1600
|
".k-calendar-table"
|
|
1556
1601
|
);
|
|
1557
|
-
let
|
|
1558
|
-
|
|
1559
|
-
|
|
1602
|
+
let ne = !1;
|
|
1603
|
+
K.forEach((ae) => {
|
|
1604
|
+
ae.tabIndex === 0 && (ne ? ae.tabIndex = -1 : ne = !0);
|
|
1560
1605
|
});
|
|
1561
1606
|
} catch (o) {
|
|
1562
1607
|
console.warn(o);
|
|
@@ -1572,94 +1617,94 @@ function pt(e) {
|
|
|
1572
1617
|
), {
|
|
1573
1618
|
raw: t,
|
|
1574
1619
|
cursorPos: r,
|
|
1575
|
-
debugEnabled:
|
|
1620
|
+
debugEnabled: h,
|
|
1576
1621
|
debugLines: O,
|
|
1577
|
-
digitsOnly:
|
|
1578
|
-
valid:
|
|
1579
|
-
validComputed:
|
|
1580
|
-
reason:
|
|
1581
|
-
validationMessage:
|
|
1582
|
-
spanDays:
|
|
1583
|
-
month1:
|
|
1584
|
-
day1:
|
|
1585
|
-
year1:
|
|
1586
|
-
month2:
|
|
1587
|
-
day2:
|
|
1588
|
-
year2:
|
|
1589
|
-
handleChange:
|
|
1622
|
+
digitsOnly: A,
|
|
1623
|
+
valid: g,
|
|
1624
|
+
validComputed: Q(s),
|
|
1625
|
+
reason: Q(ee),
|
|
1626
|
+
validationMessage: Q(w),
|
|
1627
|
+
spanDays: Q(z),
|
|
1628
|
+
month1: Q(n),
|
|
1629
|
+
day1: Q(c),
|
|
1630
|
+
year1: Q(F),
|
|
1631
|
+
month2: Q(q),
|
|
1632
|
+
day2: Q(j),
|
|
1633
|
+
year2: Q(te),
|
|
1634
|
+
handleChange: re,
|
|
1590
1635
|
handleKeyDown: a,
|
|
1591
|
-
handleWheel:
|
|
1592
|
-
handleKeyUp:
|
|
1636
|
+
handleWheel: v,
|
|
1637
|
+
handleKeyUp: $,
|
|
1593
1638
|
handleClick: se,
|
|
1594
|
-
handleBlur:
|
|
1639
|
+
handleBlur: Z,
|
|
1595
1640
|
handleClear: G,
|
|
1596
1641
|
onCalendarChange: () => {
|
|
1597
|
-
|
|
1642
|
+
p.value = !0;
|
|
1598
1643
|
},
|
|
1599
|
-
initStyling:
|
|
1644
|
+
initStyling: X
|
|
1600
1645
|
};
|
|
1601
1646
|
}
|
|
1602
|
-
function
|
|
1603
|
-
const t = U(""), r = U(void 0),
|
|
1647
|
+
function vt(e) {
|
|
1648
|
+
const t = U(""), r = U(void 0), h = U(!!e.debug), p = U(e.timeFormat ?? "hh:mm AM"), m = y(() => !!e.required), D = U(!1), P = ["ArrowUp", "ArrowDown"], T = ["ArrowLeft", "ArrowRight"], L = y(() => (t.value ?? "").replace(/\D/g, "")), A = {
|
|
1604
1649
|
H: /[0-9]/,
|
|
1605
1650
|
h: /[0-9]/,
|
|
1606
1651
|
M: /[0-9]/,
|
|
1607
1652
|
m: /[0-9]/,
|
|
1608
1653
|
A: /[AaPp]/,
|
|
1609
1654
|
a: /[Mm]/
|
|
1610
|
-
},
|
|
1611
|
-
const n = t.value && t.value.substring(0, 2).replace(/\D/g, "0") || "0",
|
|
1612
|
-
return Math.min(Math.max(
|
|
1613
|
-
}),
|
|
1614
|
-
const n = t.value && t.value.substring(3, 5).replace(/\D/g, "0") || "0",
|
|
1615
|
-
return Math.min(Math.max(
|
|
1616
|
-
}),
|
|
1617
|
-
const n = parseInt(t.value?.substring(0, 2).replace(/\D/g, "0") || "0"),
|
|
1618
|
-
return n === 12 ?
|
|
1619
|
-
}),
|
|
1655
|
+
}, R = (n) => n <= 2 ? "hh" : n <= 5 ? "mm" : "ampm", E = y(() => {
|
|
1656
|
+
const n = t.value && t.value.substring(0, 2).replace(/\D/g, "0") || "0", c = parseInt(n);
|
|
1657
|
+
return Math.min(Math.max(c, 0), 23);
|
|
1658
|
+
}), k = y(() => {
|
|
1659
|
+
const n = t.value && t.value.substring(3, 5).replace(/\D/g, "0") || "0", c = parseInt(n);
|
|
1660
|
+
return Math.min(Math.max(c, 0), 59);
|
|
1661
|
+
}), C = y(() => (t.value?.substring(6, 8) || "AM").toUpperCase().startsWith("P") ? "PM" : "AM"), u = y(() => {
|
|
1662
|
+
const n = parseInt(t.value?.substring(0, 2).replace(/\D/g, "0") || "0"), c = C.value;
|
|
1663
|
+
return n === 12 ? c === "AM" ? 0 : 12 : c === "PM" ? n + 12 : n;
|
|
1664
|
+
}), i = y(() => l.value ? `${String(u.value).padStart(2, "0")}:${String(k.value).padStart(2, "0")}:00` : null), l = y(
|
|
1620
1665
|
() => /^(\d{2}):(\d{2})\s([AP]M)$/i.test(t.value ?? "")
|
|
1621
|
-
),
|
|
1622
|
-
let
|
|
1623
|
-
return
|
|
1666
|
+
), g = (n, c, F) => {
|
|
1667
|
+
let q = n % 12;
|
|
1668
|
+
return q === 0 && (q = 12), `${String(q).padStart(2, "0")}:${String(c).padStart(
|
|
1624
1669
|
2,
|
|
1625
1670
|
"0"
|
|
1626
1671
|
)} ${F}`;
|
|
1627
1672
|
}, V = (n) => {
|
|
1628
|
-
const
|
|
1629
|
-
if (!
|
|
1630
|
-
const F = parseInt(
|
|
1631
|
-
if (F < 1 || F > 12 ||
|
|
1632
|
-
let
|
|
1633
|
-
j === "PM" && (
|
|
1673
|
+
const c = n.match(/^(\d{2}):(\d{2})\s([AP]M)$/i);
|
|
1674
|
+
if (!c) return null;
|
|
1675
|
+
const F = parseInt(c[1]), q = parseInt(c[2]), j = c[3].toUpperCase();
|
|
1676
|
+
if (F < 1 || F > 12 || q < 0 || q > 59) return null;
|
|
1677
|
+
let te = F % 12;
|
|
1678
|
+
j === "PM" && (te += 12);
|
|
1634
1679
|
const O = /* @__PURE__ */ new Date();
|
|
1635
|
-
return O.setSeconds(0, 0), O.setHours(
|
|
1680
|
+
return O.setSeconds(0, 0), O.setHours(te), O.setMinutes(q), O;
|
|
1636
1681
|
}, Y = (n) => {
|
|
1637
|
-
if (
|
|
1682
|
+
if (L.value.length === 0) {
|
|
1638
1683
|
e.onChange({ value: null, event: n });
|
|
1639
1684
|
return;
|
|
1640
1685
|
}
|
|
1641
|
-
if (!
|
|
1686
|
+
if (!l.value) {
|
|
1642
1687
|
e.onChange({ value: null, event: n });
|
|
1643
1688
|
return;
|
|
1644
1689
|
}
|
|
1645
|
-
const
|
|
1646
|
-
|
|
1647
|
-
},
|
|
1648
|
-
const
|
|
1649
|
-
if (
|
|
1650
|
-
const j =
|
|
1651
|
-
if (
|
|
1690
|
+
const c = V(t.value);
|
|
1691
|
+
c && _(c) ? e.onChange({ value: c, event: n }) : e.onChange({ value: null, event: n });
|
|
1692
|
+
}, z = (n) => n.getHours() * 60 + n.getMinutes(), _ = (n) => {
|
|
1693
|
+
const c = e.min ?? void 0, F = e.max ?? void 0, q = z(n);
|
|
1694
|
+
if (c) {
|
|
1695
|
+
const j = z(c);
|
|
1696
|
+
if (q < j) return !1;
|
|
1652
1697
|
}
|
|
1653
1698
|
if (F) {
|
|
1654
|
-
const j =
|
|
1655
|
-
if (
|
|
1699
|
+
const j = z(F);
|
|
1700
|
+
if (q > j) return !1;
|
|
1656
1701
|
}
|
|
1657
1702
|
return !0;
|
|
1658
|
-
},
|
|
1659
|
-
const
|
|
1660
|
-
t.value =
|
|
1661
|
-
},
|
|
1662
|
-
e.onChange({ value: n, event:
|
|
1703
|
+
}, ee = (n) => {
|
|
1704
|
+
const c = n.getHours(), F = c >= 12 ? "PM" : "AM";
|
|
1705
|
+
t.value = g(c, n.getMinutes(), F);
|
|
1706
|
+
}, s = (n, c) => {
|
|
1707
|
+
e.onChange({ value: n, event: c });
|
|
1663
1708
|
}, w = () => {
|
|
1664
1709
|
B(() => {
|
|
1665
1710
|
requestAnimationFrame(() => {
|
|
@@ -1669,50 +1714,50 @@ function mt(e) {
|
|
|
1669
1714
|
);
|
|
1670
1715
|
if (n) {
|
|
1671
1716
|
n.focus();
|
|
1672
|
-
const
|
|
1673
|
-
n.setSelectionRange(
|
|
1717
|
+
const c = (n.value ?? "").length;
|
|
1718
|
+
n.setSelectionRange(c, c);
|
|
1674
1719
|
}
|
|
1675
1720
|
});
|
|
1676
1721
|
});
|
|
1677
1722
|
});
|
|
1678
|
-
},
|
|
1679
|
-
const
|
|
1680
|
-
return
|
|
1681
|
-
}, b = (n,
|
|
1682
|
-
n &&
|
|
1723
|
+
}, f = (n) => {
|
|
1724
|
+
const c = n?.event?.target;
|
|
1725
|
+
return c ? c.closest(".k-time-now") ? "now" : c.closest(".k-time-accept") ? "set" : null : null;
|
|
1726
|
+
}, b = (n, c) => {
|
|
1727
|
+
n && _(n) ? s(n, c) : s(null, c);
|
|
1683
1728
|
}, I = (...n) => {
|
|
1684
|
-
const
|
|
1685
|
-
if (!
|
|
1686
|
-
const F =
|
|
1729
|
+
const c = n[0];
|
|
1730
|
+
if (!c) return;
|
|
1731
|
+
const F = f(c);
|
|
1687
1732
|
if (F === "now") {
|
|
1688
1733
|
const j = /* @__PURE__ */ new Date();
|
|
1689
|
-
|
|
1734
|
+
ee(j), b(j, c), w();
|
|
1690
1735
|
return;
|
|
1691
1736
|
}
|
|
1692
|
-
if (
|
|
1693
|
-
const j = new Date(
|
|
1694
|
-
|
|
1737
|
+
if (c?.value instanceof Date) {
|
|
1738
|
+
const j = new Date(c.value);
|
|
1739
|
+
ee(j), b(j, c), F === "set" && w();
|
|
1695
1740
|
return;
|
|
1696
1741
|
}
|
|
1697
|
-
if (
|
|
1698
|
-
t.value = "",
|
|
1742
|
+
if (c?.value === null) {
|
|
1743
|
+
t.value = "", s(null, c);
|
|
1699
1744
|
return;
|
|
1700
1745
|
}
|
|
1701
|
-
t.value =
|
|
1702
|
-
const
|
|
1703
|
-
r.value =
|
|
1746
|
+
t.value = c.value;
|
|
1747
|
+
const q = c.event?.target;
|
|
1748
|
+
r.value = q?.selectionStart ?? 0;
|
|
1704
1749
|
try {
|
|
1705
1750
|
const j = r.value ?? 0;
|
|
1706
|
-
if (
|
|
1707
|
-
const
|
|
1708
|
-
/[Aa]/.test(
|
|
1751
|
+
if (R(j) === "ampm" && (t.value ?? "").length >= 8) {
|
|
1752
|
+
const te = t.value.charAt(6);
|
|
1753
|
+
/[Aa]/.test(te) ? (t.value = `${t.value.slice(0, 6)}AM${t.value.slice(8)}`, B(() => {
|
|
1709
1754
|
requestAnimationFrame(() => {
|
|
1710
1755
|
const O = document.getElementById(
|
|
1711
1756
|
e.id
|
|
1712
1757
|
);
|
|
1713
1758
|
O && (O.focus(), O.setSelectionRange(8, 8));
|
|
1714
1759
|
});
|
|
1715
|
-
})) : /[Pp]/.test(
|
|
1760
|
+
})) : /[Pp]/.test(te) && (t.value = `${t.value.slice(0, 6)}PM${t.value.slice(8)}`, B(() => {
|
|
1716
1761
|
requestAnimationFrame(() => {
|
|
1717
1762
|
const O = document.getElementById(
|
|
1718
1763
|
e.id
|
|
@@ -1723,60 +1768,60 @@ function mt(e) {
|
|
|
1723
1768
|
}
|
|
1724
1769
|
} catch {
|
|
1725
1770
|
}
|
|
1726
|
-
Y(
|
|
1771
|
+
Y(c);
|
|
1727
1772
|
}, S = (n) => {
|
|
1728
1773
|
r.value = n.target.selectionStart ?? 0;
|
|
1729
|
-
}, M = (n,
|
|
1730
|
-
const
|
|
1731
|
-
r.value =
|
|
1732
|
-
const j =
|
|
1733
|
-
if (!
|
|
1734
|
-
if ((t.value ?? "").length === 0 ||
|
|
1735
|
-
const
|
|
1736
|
-
t.value = x
|
|
1737
|
-
const
|
|
1738
|
-
b(
|
|
1774
|
+
}, M = (n, c, F) => {
|
|
1775
|
+
const q = c?.selectionStart ?? r.value ?? 0;
|
|
1776
|
+
r.value = q;
|
|
1777
|
+
const j = R(q), te = (t.value ?? "").match(/^(\d{2}):(\d{2})\s([AP]M)$/i);
|
|
1778
|
+
if (!te) {
|
|
1779
|
+
if ((t.value ?? "").length === 0 || L.value.length === 0) {
|
|
1780
|
+
const d = /* @__PURE__ */ new Date(), x = d.getHours(), K = x >= 12 ? "PM" : "AM";
|
|
1781
|
+
t.value = g(x, d.getMinutes(), K);
|
|
1782
|
+
const ne = V(t.value);
|
|
1783
|
+
b(ne, F), B(() => {
|
|
1739
1784
|
requestAnimationFrame(() => {
|
|
1740
|
-
const
|
|
1785
|
+
const ae = document.getElementById(
|
|
1741
1786
|
e.id
|
|
1742
1787
|
), fe = r.value ?? 0;
|
|
1743
|
-
|
|
1788
|
+
ae && (ae.focus(), ae.setSelectionRange(fe, fe));
|
|
1744
1789
|
});
|
|
1745
1790
|
});
|
|
1746
1791
|
}
|
|
1747
1792
|
return;
|
|
1748
1793
|
}
|
|
1749
|
-
let O = parseInt(
|
|
1794
|
+
let O = parseInt(te[1]), X = parseInt(te[2]), ce = te[3].toUpperCase();
|
|
1750
1795
|
if (j === "hh")
|
|
1751
1796
|
n === "ArrowUp" ? O = O < 12 ? O + 1 : 1 : O = O > 1 ? O - 1 : 12;
|
|
1752
1797
|
else if (j === "mm") {
|
|
1753
|
-
const
|
|
1754
|
-
if (
|
|
1755
|
-
n === "ArrowUp" ?
|
|
1798
|
+
const d = e.minuteStepRef?.value ?? e.minuteStep ?? 1;
|
|
1799
|
+
if (d === 1)
|
|
1800
|
+
n === "ArrowUp" ? X = X < 59 ? X + 1 : 0 : X = X > 0 ? X - 1 : 59;
|
|
1756
1801
|
else if (n === "ArrowUp") {
|
|
1757
|
-
const
|
|
1758
|
-
let
|
|
1759
|
-
|
|
1802
|
+
const x = X % d;
|
|
1803
|
+
let K = x === 0 ? X + d : X + (d - x);
|
|
1804
|
+
K >= 60 && (K = 0), X = K;
|
|
1760
1805
|
} else {
|
|
1761
|
-
const
|
|
1762
|
-
let
|
|
1763
|
-
|
|
1806
|
+
const x = X % d;
|
|
1807
|
+
let K = x === 0 ? X - d : X - x;
|
|
1808
|
+
K < 0 && (K = 60 - d), X = K;
|
|
1764
1809
|
}
|
|
1765
1810
|
} else j === "ampm" && (ce = ce === "AM" ? "PM" : "AM");
|
|
1766
|
-
t.value = `${String(O).padStart(2, "0")}:${String(
|
|
1811
|
+
t.value = `${String(O).padStart(2, "0")}:${String(X).padStart(
|
|
1767
1812
|
2,
|
|
1768
1813
|
"0"
|
|
1769
1814
|
)} ${ce}`;
|
|
1770
1815
|
const o = V(t.value);
|
|
1771
1816
|
b(o, F), B(() => {
|
|
1772
1817
|
requestAnimationFrame(() => {
|
|
1773
|
-
const
|
|
1818
|
+
const d = document.getElementById(
|
|
1774
1819
|
e.id
|
|
1775
|
-
),
|
|
1776
|
-
|
|
1820
|
+
), x = r.value ?? 0;
|
|
1821
|
+
d && (d.focus(), d.setSelectionRange(x, x));
|
|
1777
1822
|
});
|
|
1778
1823
|
});
|
|
1779
|
-
},
|
|
1824
|
+
}, N = (n) => {
|
|
1780
1825
|
if (n.code === "Space" || n.key === " ") {
|
|
1781
1826
|
n.preventDefault(), n.stopPropagation(), e.onShowPicker(n);
|
|
1782
1827
|
return;
|
|
@@ -1785,57 +1830,57 @@ function mt(e) {
|
|
|
1785
1830
|
n.preventDefault(), n.stopPropagation(), e.onShowPicker(n);
|
|
1786
1831
|
return;
|
|
1787
1832
|
}
|
|
1788
|
-
if (
|
|
1833
|
+
if (P.includes(n.key)) {
|
|
1789
1834
|
if (n.altKey) return;
|
|
1790
1835
|
n.preventDefault(), n.stopPropagation();
|
|
1791
|
-
const
|
|
1792
|
-
M(n.key,
|
|
1836
|
+
const c = n.target;
|
|
1837
|
+
M(n.key, c, n);
|
|
1793
1838
|
return;
|
|
1794
1839
|
}
|
|
1795
1840
|
}, W = (n) => {
|
|
1796
1841
|
n.preventDefault();
|
|
1797
|
-
const
|
|
1798
|
-
M(
|
|
1799
|
-
},
|
|
1800
|
-
const
|
|
1842
|
+
const c = n.deltaY < 0 ? "ArrowUp" : "ArrowDown";
|
|
1843
|
+
M(c, n.target, n);
|
|
1844
|
+
}, re = (n) => {
|
|
1845
|
+
const c = n.target;
|
|
1801
1846
|
if (T.includes(n.key)) {
|
|
1802
|
-
r.value =
|
|
1847
|
+
r.value = c?.selectionStart ?? 0;
|
|
1803
1848
|
return;
|
|
1804
1849
|
}
|
|
1805
|
-
if (
|
|
1850
|
+
if (P.includes(n.key)) {
|
|
1806
1851
|
if (n.altKey) return;
|
|
1807
|
-
r.value =
|
|
1852
|
+
r.value = c?.selectionStart ?? 0;
|
|
1808
1853
|
}
|
|
1809
1854
|
}, se = (n) => {
|
|
1810
|
-
|
|
1811
|
-
const
|
|
1812
|
-
|
|
1855
|
+
D.value = !0, m.value && e.externalValue && e.externalValue.value === void 0 && L.value.length === 0 && (e.externalValue.value = "");
|
|
1856
|
+
const c = n.target;
|
|
1857
|
+
c && (r.value = c.selectionStart ?? 0);
|
|
1813
1858
|
};
|
|
1814
1859
|
e.externalValue && ue(
|
|
1815
1860
|
e.externalValue,
|
|
1816
1861
|
(n) => {
|
|
1817
1862
|
if (n) {
|
|
1818
|
-
const
|
|
1819
|
-
if (
|
|
1820
|
-
const F =
|
|
1821
|
-
t.value =
|
|
1863
|
+
const c = new Date(n);
|
|
1864
|
+
if (c.toString() !== "Invalid Date") {
|
|
1865
|
+
const F = c.getHours(), q = F >= 12 ? "PM" : "AM";
|
|
1866
|
+
t.value = g(F, c.getMinutes(), q);
|
|
1822
1867
|
return;
|
|
1823
1868
|
}
|
|
1824
1869
|
}
|
|
1825
1870
|
},
|
|
1826
1871
|
{ immediate: !0 }
|
|
1827
1872
|
);
|
|
1828
|
-
const a =
|
|
1873
|
+
const a = y(() => [
|
|
1829
1874
|
["Time", t.value || "--:-- --"],
|
|
1830
|
-
["Hour (12h)",
|
|
1831
|
-
["Hour (24h)",
|
|
1832
|
-
["Minute",
|
|
1833
|
-
["Period",
|
|
1834
|
-
["Time (24h)",
|
|
1835
|
-
["Digits only",
|
|
1875
|
+
["Hour (12h)", E.value],
|
|
1876
|
+
["Hour (24h)", u.value],
|
|
1877
|
+
["Minute", k.value],
|
|
1878
|
+
["Period", C.value],
|
|
1879
|
+
["Time (24h)", i.value ?? "--:--:--"],
|
|
1880
|
+
["Digits only", L.value],
|
|
1836
1881
|
[
|
|
1837
1882
|
"Parsed Date",
|
|
1838
|
-
|
|
1883
|
+
v.value?.toLocaleDateString("en-US", {
|
|
1839
1884
|
hour: "2-digit",
|
|
1840
1885
|
minute: "2-digit"
|
|
1841
1886
|
}) ?? null
|
|
@@ -1854,46 +1899,46 @@ function mt(e) {
|
|
|
1854
1899
|
minute: "2-digit"
|
|
1855
1900
|
}) ?? null
|
|
1856
1901
|
],
|
|
1857
|
-
["valid",
|
|
1858
|
-
["reason",
|
|
1859
|
-
["validationMessage",
|
|
1860
|
-
]),
|
|
1902
|
+
["valid", $.value],
|
|
1903
|
+
["reason", H.value],
|
|
1904
|
+
["validationMessage", Z.value]
|
|
1905
|
+
]), v = y(
|
|
1861
1906
|
() => V(t.value) ?? null
|
|
1862
|
-
),
|
|
1863
|
-
if (!
|
|
1864
|
-
if (!
|
|
1865
|
-
const
|
|
1866
|
-
return
|
|
1907
|
+
), $ = y(() => {
|
|
1908
|
+
if (!m.value) {
|
|
1909
|
+
if (!l.value) return !0;
|
|
1910
|
+
const c = v.value;
|
|
1911
|
+
return c ? _(c) : !1;
|
|
1867
1912
|
}
|
|
1868
|
-
if (!
|
|
1869
|
-
const n =
|
|
1870
|
-
return !
|
|
1871
|
-
}),
|
|
1872
|
-
if (!
|
|
1873
|
-
if (!
|
|
1874
|
-
const
|
|
1875
|
-
return
|
|
1913
|
+
if (!D.value) return !0;
|
|
1914
|
+
const n = v.value;
|
|
1915
|
+
return !l.value || !n ? !1 : _(n);
|
|
1916
|
+
}), H = y(() => {
|
|
1917
|
+
if (!m.value) {
|
|
1918
|
+
if (!l.value) return;
|
|
1919
|
+
const c = v.value;
|
|
1920
|
+
return c ? _(c) ? "valid" : "out-of-bounds" : "invalid-time";
|
|
1876
1921
|
}
|
|
1877
|
-
if (!
|
|
1878
|
-
if (
|
|
1922
|
+
if (!D.value) return;
|
|
1923
|
+
if (L.value.length === 0 || !l.value)
|
|
1879
1924
|
return "incomplete";
|
|
1880
|
-
const n =
|
|
1881
|
-
return n ?
|
|
1882
|
-
}),
|
|
1883
|
-
const n =
|
|
1925
|
+
const n = v.value;
|
|
1926
|
+
return n ? _(n) ? "valid" : "out-of-bounds" : "invalid-time";
|
|
1927
|
+
}), Z = y(() => {
|
|
1928
|
+
const n = H.value;
|
|
1884
1929
|
if (!n || n === "valid") return "";
|
|
1885
1930
|
if (n === "incomplete")
|
|
1886
1931
|
return "Required";
|
|
1887
1932
|
if (n === "invalid-time")
|
|
1888
|
-
return `Must be in ${
|
|
1889
|
-
const
|
|
1933
|
+
return `Must be in ${p.value} format.`;
|
|
1934
|
+
const c = {
|
|
1890
1935
|
hour: "2-digit",
|
|
1891
1936
|
minute: "2-digit"
|
|
1892
|
-
}, F = e.min ? e.min.toLocaleTimeString("en-US",
|
|
1937
|
+
}, F = e.min ? e.min.toLocaleTimeString("en-US", c) : null, q = e.max ? e.max.toLocaleTimeString("en-US", c) : null;
|
|
1893
1938
|
if (n === "out-of-bounds") {
|
|
1894
|
-
if (F &&
|
|
1939
|
+
if (F && q) return `Must be between ${F} and ${q}.`;
|
|
1895
1940
|
if (F) return `Must be ${F} or later.`;
|
|
1896
|
-
if (
|
|
1941
|
+
if (q) return `Must be ${q} or earlier.`;
|
|
1897
1942
|
}
|
|
1898
1943
|
return "";
|
|
1899
1944
|
}), G = () => {
|
|
@@ -1903,14 +1948,14 @@ function mt(e) {
|
|
|
1903
1948
|
console.warn(`#${e.id} not found for styling.`);
|
|
1904
1949
|
return;
|
|
1905
1950
|
}
|
|
1906
|
-
const
|
|
1907
|
-
if (!
|
|
1951
|
+
const c = n.closest(".k-timepicker");
|
|
1952
|
+
if (!c) {
|
|
1908
1953
|
console.warn(
|
|
1909
1954
|
`.k-timepicker parent of #${e.id} not found for styling.`
|
|
1910
1955
|
);
|
|
1911
1956
|
return;
|
|
1912
1957
|
}
|
|
1913
|
-
const F =
|
|
1958
|
+
const F = c.parentElement;
|
|
1914
1959
|
if (!F) {
|
|
1915
1960
|
console.warn(
|
|
1916
1961
|
`Parent of .k-timepicker not found for #${e.id} styling.`
|
|
@@ -1924,25 +1969,25 @@ function mt(e) {
|
|
|
1924
1969
|
G();
|
|
1925
1970
|
}), {
|
|
1926
1971
|
raw: t,
|
|
1927
|
-
rules:
|
|
1928
|
-
debugEnabled:
|
|
1972
|
+
rules: A,
|
|
1973
|
+
debugEnabled: h,
|
|
1929
1974
|
debugLines: a,
|
|
1930
|
-
placeholder:
|
|
1931
|
-
isValid:
|
|
1932
|
-
reason:
|
|
1933
|
-
validationMessage:
|
|
1934
|
-
isComplete:
|
|
1935
|
-
inRangeTime:
|
|
1975
|
+
placeholder: p,
|
|
1976
|
+
isValid: $,
|
|
1977
|
+
reason: Q(H),
|
|
1978
|
+
validationMessage: Z,
|
|
1979
|
+
isComplete: l,
|
|
1980
|
+
inRangeTime: _,
|
|
1936
1981
|
cursorPos: r,
|
|
1937
|
-
hour:
|
|
1938
|
-
hour24:
|
|
1939
|
-
minute:
|
|
1940
|
-
period:
|
|
1941
|
-
time24:
|
|
1942
|
-
parsedRawTime:
|
|
1982
|
+
hour: Q(E),
|
|
1983
|
+
hour24: Q(u),
|
|
1984
|
+
minute: Q(k),
|
|
1985
|
+
period: Q(C),
|
|
1986
|
+
time24: Q(i),
|
|
1987
|
+
parsedRawTime: Q(v),
|
|
1943
1988
|
handleChange: I,
|
|
1944
|
-
handleKeyDown:
|
|
1945
|
-
handleKeyUp:
|
|
1989
|
+
handleKeyDown: N,
|
|
1990
|
+
handleKeyUp: re,
|
|
1946
1991
|
handleClick: S,
|
|
1947
1992
|
handleWheel: W,
|
|
1948
1993
|
handleBlur: se,
|
|
@@ -1950,87 +1995,87 @@ function mt(e) {
|
|
|
1950
1995
|
initStyling: G
|
|
1951
1996
|
};
|
|
1952
1997
|
}
|
|
1953
|
-
function
|
|
1954
|
-
const t =
|
|
1998
|
+
function gt(e) {
|
|
1999
|
+
const t = Ne(null), r = [
|
|
1955
2000
|
".k-animation-container .k-popup",
|
|
1956
2001
|
".k-popup",
|
|
1957
2002
|
".k-timepicker-popup",
|
|
1958
2003
|
".k-menu-popup"
|
|
1959
|
-
],
|
|
2004
|
+
], h = Array.isArray(e.popupSelector) ? e.popupSelector : [e.popupSelector ?? r].flat(), p = (A) => A ? typeof e.initialFocus == "string" ? A.querySelector(e.initialFocus) ?? A : typeof e.initialFocus == "function" ? e.initialFocus(A) ?? A : A.querySelector(
|
|
1960
2005
|
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
1961
|
-
) ??
|
|
2006
|
+
) ?? A : null, { activate: m, deactivate: D } = qe(t, {
|
|
1962
2007
|
escapeDeactivates: !1,
|
|
1963
2008
|
clickOutsideDeactivates: !1,
|
|
1964
2009
|
fallbackFocus: () => t.value,
|
|
1965
|
-
initialFocus: () =>
|
|
2010
|
+
initialFocus: () => p(t.value),
|
|
1966
2011
|
...e.focusTrapOptions ?? {}
|
|
1967
2012
|
});
|
|
1968
|
-
let
|
|
1969
|
-
const
|
|
2013
|
+
let P = null, T = U(null);
|
|
2014
|
+
const L = () => {
|
|
1970
2015
|
if (e.resolvePopupEl) return e.resolvePopupEl();
|
|
1971
|
-
const
|
|
1972
|
-
const
|
|
1973
|
-
if (!
|
|
1974
|
-
const
|
|
1975
|
-
(
|
|
2016
|
+
const A = (E, k) => {
|
|
2017
|
+
const C = Array.from(E.querySelectorAll(k));
|
|
2018
|
+
if (!C.length) return null;
|
|
2019
|
+
const u = C.filter(
|
|
2020
|
+
(i) => i.offsetParent !== null || i.getClientRects().length > 0
|
|
1976
2021
|
);
|
|
1977
|
-
return
|
|
1978
|
-
},
|
|
1979
|
-
for (const
|
|
1980
|
-
const
|
|
1981
|
-
if (
|
|
2022
|
+
return u[u.length - 1] ?? C[C.length - 1] ?? null;
|
|
2023
|
+
}, R = e.triggerEl?.value?.closest?.(".k-animation-container") ?? document.body;
|
|
2024
|
+
for (const E of h) {
|
|
2025
|
+
const k = A(R, E);
|
|
2026
|
+
if (k) return k;
|
|
1982
2027
|
}
|
|
1983
|
-
for (const
|
|
1984
|
-
const
|
|
1985
|
-
if (
|
|
2028
|
+
for (const E of h) {
|
|
2029
|
+
const k = A(document, E);
|
|
2030
|
+
if (k) return k;
|
|
1986
2031
|
}
|
|
1987
2032
|
return null;
|
|
1988
2033
|
};
|
|
1989
|
-
return $e(t, (
|
|
1990
|
-
T.value = "outside", e.isOpen.value && e.onRequestClose?.("outside",
|
|
2034
|
+
return $e(t, (A) => {
|
|
2035
|
+
T.value = "outside", e.isOpen.value && e.onRequestClose?.("outside", A);
|
|
1991
2036
|
}), ue(
|
|
1992
2037
|
() => e.isOpen.value,
|
|
1993
|
-
(
|
|
1994
|
-
|
|
1995
|
-
const
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
}, document.addEventListener("keydown",
|
|
1999
|
-
})) : (
|
|
2000
|
-
const
|
|
2001
|
-
const
|
|
2002
|
-
|
|
2038
|
+
(A) => {
|
|
2039
|
+
A ? (T.value = null, B(() => {
|
|
2040
|
+
const R = L();
|
|
2041
|
+
R && (t.value = R, setTimeout(() => m(), 0), P || (P = (E) => {
|
|
2042
|
+
E.key === "Escape" && (T.value = "escape", e.isOpen.value && e.onRequestClose?.("escape", E));
|
|
2043
|
+
}, document.addEventListener("keydown", P, !0)));
|
|
2044
|
+
})) : (D(), P && (document.removeEventListener("keydown", P, !0), P = null), t.value = null, T.value === "outside" && B(() => {
|
|
2045
|
+
const R = () => {
|
|
2046
|
+
const E = e.triggerEl?.value, k = E?.querySelector("input"), C = document.activeElement;
|
|
2047
|
+
C && (C === k || E && E.contains(C)) && (k ?? E)?.blur?.();
|
|
2003
2048
|
};
|
|
2004
|
-
requestAnimationFrame(() => setTimeout(
|
|
2049
|
+
requestAnimationFrame(() => setTimeout(R, 0));
|
|
2005
2050
|
}), e.returnFocusToTrigger !== !1 && T.value === "escape" && e.triggerEl?.value && B(() => {
|
|
2006
|
-
const
|
|
2007
|
-
const
|
|
2008
|
-
if (!
|
|
2009
|
-
(
|
|
2051
|
+
const R = () => {
|
|
2052
|
+
const E = e.triggerEl?.value;
|
|
2053
|
+
if (!E) return;
|
|
2054
|
+
(E.querySelector("input") ?? E)?.focus?.();
|
|
2010
2055
|
};
|
|
2011
|
-
requestAnimationFrame(() => setTimeout(
|
|
2056
|
+
requestAnimationFrame(() => setTimeout(R, 0));
|
|
2012
2057
|
}));
|
|
2013
2058
|
}
|
|
2014
2059
|
), {
|
|
2015
2060
|
popupRef: t,
|
|
2016
|
-
activate:
|
|
2017
|
-
deactivate:
|
|
2018
|
-
lastCloseReason:
|
|
2019
|
-
setPopupEl: (
|
|
2061
|
+
activate: m,
|
|
2062
|
+
deactivate: D,
|
|
2063
|
+
lastCloseReason: Q(T),
|
|
2064
|
+
setPopupEl: (A) => t.value = A
|
|
2020
2065
|
};
|
|
2021
2066
|
}
|
|
2022
2067
|
export {
|
|
2023
|
-
|
|
2068
|
+
Xe as useFieldsetTouchTracker,
|
|
2024
2069
|
We as useFieldsetValidationKit,
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2070
|
+
st as useGridA11y,
|
|
2071
|
+
ut as useGridActiveFilter,
|
|
2072
|
+
ct as useGridRowAction,
|
|
2073
|
+
pt as useMaskedDateInput,
|
|
2074
|
+
mt as useMaskedDateRangeInput,
|
|
2075
|
+
vt as useMaskedTimeInput,
|
|
2076
|
+
ft as usePopupMenu,
|
|
2077
|
+
gt as usePopupTrap,
|
|
2078
|
+
dt as useUSAddress,
|
|
2034
2079
|
Ze as useZipTextBox
|
|
2035
2080
|
};
|
|
2036
2081
|
//# sourceMappingURL=featherk-composables.es.js.map
|