beeple-toolkit 1.0.49 → 1.0.50
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createElementBlock as d, openBlock as l, createElementVNode as
|
|
1
|
+
import { createElementBlock as d, openBlock as l, createElementVNode as y, defineComponent as oe, computed as f, createCommentVNode as _, normalizeStyle as ge, createBlock as j, resolveDynamicComponent as ea, normalizeClass as ne, ref as w, toDisplayString as A, withCtx as K, renderSlot as Pe, Fragment as le, renderList as Ie, createVNode as C, useSlots as va, watch as Se, nextTick as ke, onUnmounted as wt, Teleport as Fe, Transition as dt, createTextVNode as ot, onMounted as ct, unref as De, withKeys as ze, withModifiers as ve, mergeProps as En, onBeforeUnmount as _t, useId as ca, TransitionGroup as Vn, withDirectives as In, vShow as Ln, createSlots as ta, createStaticVNode as An } from "vue";
|
|
2
2
|
import { defineStore as Nn } from "pinia";
|
|
3
3
|
const Rn = {
|
|
4
4
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -7,7 +7,7 @@ const Rn = {
|
|
|
7
7
|
};
|
|
8
8
|
function Hn(e, a) {
|
|
9
9
|
return l(), d("svg", Rn, [...a[0] || (a[0] = [
|
|
10
|
-
|
|
10
|
+
y("path", {
|
|
11
11
|
stroke: "currentColor",
|
|
12
12
|
"stroke-linecap": "round",
|
|
13
13
|
"stroke-linejoin": "round",
|
|
@@ -26,15 +26,15 @@ const nn = { render: Hn }, Bn = {
|
|
|
26
26
|
};
|
|
27
27
|
function Fn(e, a) {
|
|
28
28
|
return l(), d("svg", Bn, [...a[0] || (a[0] = [
|
|
29
|
-
|
|
29
|
+
y("path", {
|
|
30
30
|
fill: "#41B883",
|
|
31
31
|
d: "M204.8 0H256L128 220.8 0 0h97.92L128 51.2 157.44 0z"
|
|
32
32
|
}, null, -1),
|
|
33
|
-
|
|
33
|
+
y("path", {
|
|
34
34
|
fill: "#41B883",
|
|
35
35
|
d: "m0 0 128 220.8L256 0h-51.2L128 132.48 50.56 0z"
|
|
36
36
|
}, null, -1),
|
|
37
|
-
|
|
37
|
+
y("path", {
|
|
38
38
|
fill: "#35495E",
|
|
39
39
|
d: "M50.56 0 128 133.12 204.8 0h-47.36L128 51.2 97.92 0z"
|
|
40
40
|
}, null, -1)
|
|
@@ -101,7 +101,7 @@ const Yn = { render: Fn }, ra = {
|
|
|
101
101
|
withColor: {}
|
|
102
102
|
},
|
|
103
103
|
setup(e) {
|
|
104
|
-
const a = e, t =
|
|
104
|
+
const a = e, t = w(!1), n = w(!1), o = f(() => a.user?.photo), i = f(() => ({
|
|
105
105
|
"toolkit-avatar--loading": o.value && !n.value && !t.value,
|
|
106
106
|
"toolkit-avatar__fallback": !o.value || t.value
|
|
107
107
|
})), r = {
|
|
@@ -112,19 +112,19 @@ const Yn = { render: Fn }, ra = {
|
|
|
112
112
|
medium: "8",
|
|
113
113
|
large: "12"
|
|
114
114
|
}, s = f(() => r[a.size] ?? "8"), u = f(() => a.withColor ? { backgroundColor: a.withColor } : {}), m = f(() => {
|
|
115
|
-
const
|
|
116
|
-
if (!
|
|
117
|
-
const
|
|
118
|
-
return (
|
|
115
|
+
const p = a.user?.fullName?.trim().split(" ").filter((v) => v.length > 0);
|
|
116
|
+
if (!p?.length) return "";
|
|
117
|
+
const k = p[0].charAt(0), g = p.length > 1 ? p[p.length - 1].charAt(0) : "";
|
|
118
|
+
return (k + g).toUpperCase();
|
|
119
119
|
}), c = () => {
|
|
120
120
|
t.value = !0, n.value = !1;
|
|
121
121
|
}, h = () => {
|
|
122
122
|
t.value = !1, n.value = !0;
|
|
123
123
|
};
|
|
124
|
-
return (
|
|
124
|
+
return (p, k) => (l(), d("div", {
|
|
125
125
|
class: ne(["toolkit-avatar-wrapper", `toolkit-avatar--${e.size}`])
|
|
126
126
|
}, [
|
|
127
|
-
|
|
127
|
+
y("div", {
|
|
128
128
|
class: ne(["toolkit-avatar", i.value])
|
|
129
129
|
}, [
|
|
130
130
|
o.value && !t.value ? (l(), d("img", {
|
|
@@ -232,7 +232,7 @@ const Yn = { render: Fn }, ra = {
|
|
|
232
232
|
},
|
|
233
233
|
setup(e) {
|
|
234
234
|
return (a, t) => (l(), d("nav", to, [
|
|
235
|
-
|
|
235
|
+
y("ol", ao, [
|
|
236
236
|
(l(!0), d(le, null, Ie(e.items, (n, o) => (l(), d("li", {
|
|
237
237
|
key: o,
|
|
238
238
|
class: ne(["toolkit-breadcrumbs__item", { "toolkit-breadcrumbs__item--current": o === e.items.length - 1 }])
|
|
@@ -244,7 +244,7 @@ const Yn = { render: Fn }, ra = {
|
|
|
244
244
|
href: n.href,
|
|
245
245
|
size: "x-small"
|
|
246
246
|
}, null, 8, ["label", "href"]),
|
|
247
|
-
t[0] || (t[0] =
|
|
247
|
+
t[0] || (t[0] = y("span", { class: "toolkit-breadcrumbs__separator" }, "/", -1))
|
|
248
248
|
], 64))
|
|
249
249
|
], 2))), 128))
|
|
250
250
|
])
|
|
@@ -275,7 +275,7 @@ const Yn = { render: Fn }, ra = {
|
|
|
275
275
|
class: ne(i.value),
|
|
276
276
|
for: o.value
|
|
277
277
|
}, [
|
|
278
|
-
|
|
278
|
+
y("input", {
|
|
279
279
|
id: o.value,
|
|
280
280
|
type: "checkbox",
|
|
281
281
|
checked: e.checked,
|
|
@@ -283,7 +283,7 @@ const Yn = { render: Fn }, ra = {
|
|
|
283
283
|
onChange: r,
|
|
284
284
|
class: "toolkit-checkbox__input"
|
|
285
285
|
}, null, 40, io),
|
|
286
|
-
|
|
286
|
+
y("span", ro, [
|
|
287
287
|
e.checked ? (l(), j(de, {
|
|
288
288
|
key: 0,
|
|
289
289
|
icon: "checkmark",
|
|
@@ -304,66 +304,66 @@ const Yn = { render: Fn }, ra = {
|
|
|
304
304
|
isOpen: { type: Boolean, default: void 0 }
|
|
305
305
|
},
|
|
306
306
|
setup(e) {
|
|
307
|
-
const a = e, t = va(), n = f(() => !!t.content || !!a.title), o =
|
|
307
|
+
const a = e, t = va(), n = f(() => !!t.content || !!a.title), o = w(null), i = w(null), r = w(!1), s = w(a.position), u = w({});
|
|
308
308
|
let m = null, c = null;
|
|
309
309
|
const h = async () => {
|
|
310
310
|
n.value && a.isOpen !== !1 && (m && clearTimeout(m), c && clearTimeout(c), m = setTimeout(async () => {
|
|
311
|
-
r.value = !0, await ke(), await ke(),
|
|
311
|
+
r.value = !0, await ke(), await ke(), k(), setTimeout(k, 10), window.addEventListener("scroll", k, !0), window.addEventListener("resize", k);
|
|
312
312
|
}, a.delay));
|
|
313
|
-
},
|
|
313
|
+
}, p = () => {
|
|
314
314
|
a.isOpen || (m && (clearTimeout(m), m = null), c && clearTimeout(c), c = setTimeout(() => {
|
|
315
|
-
r.value = !1, window.removeEventListener("scroll",
|
|
315
|
+
r.value = !1, window.removeEventListener("scroll", k, !0), window.removeEventListener("resize", k);
|
|
316
316
|
}, 100));
|
|
317
|
-
},
|
|
317
|
+
}, k = () => {
|
|
318
318
|
if (!o.value || !i.value) return;
|
|
319
|
-
const v = (o.value.firstElementChild ?? o.value).getBoundingClientRect(),
|
|
319
|
+
const v = (o.value.firstElementChild ?? o.value).getBoundingClientRect(), x = {
|
|
320
320
|
width: i.value.offsetWidth,
|
|
321
321
|
height: i.value.offsetHeight
|
|
322
|
-
}, T = window.innerHeight, W = window.innerWidth,
|
|
323
|
-
let
|
|
322
|
+
}, T = window.innerHeight, W = window.innerWidth, M = 8;
|
|
323
|
+
let $ = a.position, b = 0, D = 0;
|
|
324
324
|
const z = {
|
|
325
325
|
"top-left": () => {
|
|
326
|
-
b = v.top -
|
|
326
|
+
b = v.top - x.height - M, D = v.left;
|
|
327
327
|
},
|
|
328
328
|
"top-middle": () => {
|
|
329
|
-
b = v.top -
|
|
329
|
+
b = v.top - x.height - M, D = v.left + v.width / 2 - x.width / 2;
|
|
330
330
|
},
|
|
331
331
|
"top-right": () => {
|
|
332
|
-
b = v.top -
|
|
332
|
+
b = v.top - x.height - M, D = v.right - x.width;
|
|
333
333
|
},
|
|
334
334
|
"bottom-left": () => {
|
|
335
|
-
b = v.bottom +
|
|
335
|
+
b = v.bottom + M, D = v.left;
|
|
336
336
|
},
|
|
337
337
|
"bottom-middle": () => {
|
|
338
|
-
b = v.bottom +
|
|
338
|
+
b = v.bottom + M, D = v.left + v.width / 2 - x.width / 2;
|
|
339
339
|
},
|
|
340
340
|
"bottom-right": () => {
|
|
341
|
-
b = v.bottom +
|
|
341
|
+
b = v.bottom + M, D = v.right - x.width;
|
|
342
342
|
},
|
|
343
343
|
"left-top": () => {
|
|
344
|
-
b = v.top, D = v.left -
|
|
344
|
+
b = v.top, D = v.left - x.width - M;
|
|
345
345
|
},
|
|
346
346
|
"left-middle": () => {
|
|
347
|
-
b = v.top + v.height / 2 -
|
|
347
|
+
b = v.top + v.height / 2 - x.height / 2, D = v.left - x.width - M;
|
|
348
348
|
},
|
|
349
349
|
"left-bottom": () => {
|
|
350
|
-
b = v.bottom -
|
|
350
|
+
b = v.bottom - x.height, D = v.left - x.width - M;
|
|
351
351
|
},
|
|
352
352
|
"right-top": () => {
|
|
353
|
-
b = v.top, D = v.right +
|
|
353
|
+
b = v.top, D = v.right + M;
|
|
354
354
|
},
|
|
355
355
|
"right-middle": () => {
|
|
356
|
-
b = v.top + v.height / 2 -
|
|
356
|
+
b = v.top + v.height / 2 - x.height / 2, D = v.right + M;
|
|
357
357
|
},
|
|
358
358
|
"right-bottom": () => {
|
|
359
|
-
b = v.bottom -
|
|
359
|
+
b = v.bottom - x.height, D = v.right + M;
|
|
360
360
|
}
|
|
361
361
|
};
|
|
362
|
-
z[
|
|
362
|
+
z[$]?.();
|
|
363
363
|
const H = (R, O) => {
|
|
364
|
-
|
|
365
|
-
}, Z = b >= 10, me = b +
|
|
366
|
-
|
|
364
|
+
$ = $.replace(R, O), z[$]?.();
|
|
365
|
+
}, Z = b >= 10, me = b + x.height <= T - 10, B = D >= 10, X = D + x.width <= W - 10;
|
|
366
|
+
$.startsWith("top-") && !Z && v.bottom + x.height + M <= T - 10 ? H("top-", "bottom-") : $.startsWith("bottom-") && !me && v.top - x.height - M >= 10 ? H("bottom-", "top-") : $.startsWith("left-") && !B && v.right + x.width + M <= W - 10 ? H("left-", "right-") : $.startsWith("right-") && !X && v.left - x.width - M >= 10 && H("right-", "left-"), D = Math.max(10, Math.min(D, W - x.width - 10)), b = Math.max(10, Math.min(b, T - x.height - 10)), s.value = $, u.value = {
|
|
367
367
|
position: "fixed",
|
|
368
368
|
top: `${b}px`,
|
|
369
369
|
left: `${D}px`,
|
|
@@ -373,20 +373,20 @@ const Yn = { render: Fn }, ra = {
|
|
|
373
373
|
};
|
|
374
374
|
return Se(
|
|
375
375
|
() => a.isOpen,
|
|
376
|
-
async (
|
|
377
|
-
|
|
376
|
+
async (g) => {
|
|
377
|
+
g ? (r.value = !0, await ke(), await ke(), k(), window.addEventListener("scroll", k, !0), window.addEventListener("resize", k)) : g === !1 && (m && (clearTimeout(m), m = null), c && (clearTimeout(c), c = null), r.value = !1, window.removeEventListener("scroll", k, !0), window.removeEventListener("resize", k));
|
|
378
378
|
},
|
|
379
379
|
{ immediate: !0 }
|
|
380
380
|
), wt(() => {
|
|
381
|
-
m && clearTimeout(m), c && clearTimeout(c), window.removeEventListener("scroll",
|
|
382
|
-
}), (
|
|
381
|
+
m && clearTimeout(m), c && clearTimeout(c), window.removeEventListener("scroll", k, !0), window.removeEventListener("resize", k);
|
|
382
|
+
}), (g, v) => (l(), d("div", {
|
|
383
383
|
ref_key: "triggerRef",
|
|
384
384
|
ref: o,
|
|
385
385
|
class: "toolkit-context-card-wrapper",
|
|
386
386
|
onMouseenter: h,
|
|
387
|
-
onMouseleave:
|
|
387
|
+
onMouseleave: p
|
|
388
388
|
}, [
|
|
389
|
-
Pe(
|
|
389
|
+
Pe(g.$slots, "default"),
|
|
390
390
|
(l(), j(Fe, { to: "body" }, [
|
|
391
391
|
C(dt, { name: "toolkit-context-card-fade" }, {
|
|
392
392
|
default: K(() => [
|
|
@@ -401,10 +401,10 @@ const Yn = { render: Fn }, ra = {
|
|
|
401
401
|
style: ge(u.value),
|
|
402
402
|
role: "tooltip",
|
|
403
403
|
onMouseenter: h,
|
|
404
|
-
onMouseleave:
|
|
404
|
+
onMouseleave: p
|
|
405
405
|
}, [
|
|
406
|
-
|
|
407
|
-
Pe(
|
|
406
|
+
y("div", so, [
|
|
407
|
+
Pe(g.$slots, "content", {}, () => [
|
|
408
408
|
ot(A(e.title), 1)
|
|
409
409
|
])
|
|
410
410
|
])
|
|
@@ -1704,8 +1704,8 @@ function Ae(e, a, t) {
|
|
|
1704
1704
|
let u = a.match(ai).map((c) => {
|
|
1705
1705
|
const h = c[0];
|
|
1706
1706
|
if (h === "p" || h === "P") {
|
|
1707
|
-
const
|
|
1708
|
-
return
|
|
1707
|
+
const p = ma[h];
|
|
1708
|
+
return p(c, o.formatLong);
|
|
1709
1709
|
}
|
|
1710
1710
|
return c;
|
|
1711
1711
|
}).join("").match(ti).map((c) => {
|
|
@@ -1732,8 +1732,8 @@ function Ae(e, a, t) {
|
|
|
1732
1732
|
if (!c.isToken) return c.value;
|
|
1733
1733
|
const h = c.value;
|
|
1734
1734
|
(!t?.useAdditionalWeekYearTokens && bn(h) || !t?.useAdditionalDayOfYearTokens && pn(h)) && fa(h, a, String(e));
|
|
1735
|
-
const
|
|
1736
|
-
return
|
|
1735
|
+
const p = za[h[0]];
|
|
1736
|
+
return p(s, h, o.localize, m);
|
|
1737
1737
|
}).join("");
|
|
1738
1738
|
}
|
|
1739
1739
|
function ri(e) {
|
|
@@ -3181,67 +3181,67 @@ function xn(e, a, t, n) {
|
|
|
3181
3181
|
firstWeekContainsDate: s,
|
|
3182
3182
|
weekStartsOn: u,
|
|
3183
3183
|
locale: r
|
|
3184
|
-
}, c = [new pi(n?.in, t)], h = a.match(ar).map((
|
|
3185
|
-
const T =
|
|
3184
|
+
}, c = [new pi(n?.in, t)], h = a.match(ar).map((x) => {
|
|
3185
|
+
const T = x[0];
|
|
3186
3186
|
if (T in ma) {
|
|
3187
3187
|
const W = ma[T];
|
|
3188
|
-
return W(
|
|
3188
|
+
return W(x, r.formatLong);
|
|
3189
3189
|
}
|
|
3190
|
-
return
|
|
3191
|
-
}).join("").match(tr),
|
|
3192
|
-
for (let
|
|
3193
|
-
bn(
|
|
3194
|
-
const T =
|
|
3190
|
+
return x;
|
|
3191
|
+
}).join("").match(tr), p = [];
|
|
3192
|
+
for (let x of h) {
|
|
3193
|
+
bn(x) && fa(x, a, e), pn(x) && fa(x, a, e);
|
|
3194
|
+
const T = x[0], W = er[T];
|
|
3195
3195
|
if (W) {
|
|
3196
|
-
const { incompatibleTokens:
|
|
3197
|
-
if (Array.isArray(
|
|
3198
|
-
const b =
|
|
3199
|
-
(D) =>
|
|
3196
|
+
const { incompatibleTokens: M } = W;
|
|
3197
|
+
if (Array.isArray(M)) {
|
|
3198
|
+
const b = p.find(
|
|
3199
|
+
(D) => M.includes(D.token) || D.token === T
|
|
3200
3200
|
);
|
|
3201
3201
|
if (b)
|
|
3202
3202
|
throw new RangeError(
|
|
3203
|
-
`The format string mustn't contain \`${b.fullToken}\` and \`${
|
|
3203
|
+
`The format string mustn't contain \`${b.fullToken}\` and \`${x}\` at the same time`
|
|
3204
3204
|
);
|
|
3205
|
-
} else if (W.incompatibleTokens === "*" &&
|
|
3205
|
+
} else if (W.incompatibleTokens === "*" && p.length > 0)
|
|
3206
3206
|
throw new RangeError(
|
|
3207
|
-
`The format string mustn't contain \`${
|
|
3207
|
+
`The format string mustn't contain \`${x}\` and any other token at the same time`
|
|
3208
3208
|
);
|
|
3209
|
-
|
|
3210
|
-
const
|
|
3209
|
+
p.push({ token: T, fullToken: x });
|
|
3210
|
+
const $ = W.run(
|
|
3211
3211
|
e,
|
|
3212
|
-
|
|
3212
|
+
x,
|
|
3213
3213
|
r.match,
|
|
3214
3214
|
m
|
|
3215
3215
|
);
|
|
3216
|
-
if (
|
|
3216
|
+
if (!$)
|
|
3217
3217
|
return o();
|
|
3218
|
-
c.push(
|
|
3218
|
+
c.push($.setter), e = $.rest;
|
|
3219
3219
|
} else {
|
|
3220
3220
|
if (T.match(rr))
|
|
3221
3221
|
throw new RangeError(
|
|
3222
3222
|
"Format string contains an unescaped latin alphabet character `" + T + "`"
|
|
3223
3223
|
);
|
|
3224
|
-
if (
|
|
3225
|
-
e = e.slice(
|
|
3224
|
+
if (x === "''" ? x = "'" : T === "'" && (x = lr(x)), e.indexOf(x) === 0)
|
|
3225
|
+
e = e.slice(x.length);
|
|
3226
3226
|
else
|
|
3227
3227
|
return o();
|
|
3228
3228
|
}
|
|
3229
3229
|
}
|
|
3230
3230
|
if (e.length > 0 && ir.test(e))
|
|
3231
3231
|
return o();
|
|
3232
|
-
const
|
|
3233
|
-
(
|
|
3234
|
-
).map((
|
|
3235
|
-
let
|
|
3236
|
-
if (isNaN(+
|
|
3232
|
+
const k = c.map((x) => x.priority).sort((x, T) => T - x).filter((x, T, W) => W.indexOf(x) === T).map(
|
|
3233
|
+
(x) => c.filter((T) => T.priority === x).sort((T, W) => W.subPriority - T.subPriority)
|
|
3234
|
+
).map((x) => x[0]);
|
|
3235
|
+
let g = ce(t, n?.in);
|
|
3236
|
+
if (isNaN(+g)) return o();
|
|
3237
3237
|
const v = {};
|
|
3238
|
-
for (const
|
|
3239
|
-
if (
|
|
3238
|
+
for (const x of k) {
|
|
3239
|
+
if (!x.validate(g, m))
|
|
3240
3240
|
return o();
|
|
3241
|
-
const T =
|
|
3242
|
-
Array.isArray(T) ? (
|
|
3241
|
+
const T = x.set(g, v, m);
|
|
3242
|
+
Array.isArray(T) ? (g = T[0], Object.assign(v, T[1])) : g = T;
|
|
3243
3243
|
}
|
|
3244
|
-
return
|
|
3244
|
+
return g;
|
|
3245
3245
|
}
|
|
3246
3246
|
function lr(e) {
|
|
3247
3247
|
return e.match(nr)[1].replace(or, "'");
|
|
@@ -3310,75 +3310,75 @@ const vr = { class: "toolkit-tooltip__content" }, Ne = /* @__PURE__ */ oe({
|
|
|
3310
3310
|
tooltipClass: {}
|
|
3311
3311
|
},
|
|
3312
3312
|
setup(e) {
|
|
3313
|
-
const a = e, t =
|
|
3313
|
+
const a = e, t = w(null), n = w(null), o = w(!1), i = w(!1), r = w(a.position), s = w({});
|
|
3314
3314
|
let u = null, m = null;
|
|
3315
3315
|
const c = async () => {
|
|
3316
3316
|
a.disabled || (i.value = !0, m && (clearTimeout(m), m = null), !o.value && (u && clearTimeout(u), u = setTimeout(async () => {
|
|
3317
|
-
o.value = !0, await ke(), await ke(),
|
|
3317
|
+
o.value = !0, await ke(), await ke(), p(), setTimeout(p, 10), window.addEventListener("scroll", p, !0), window.addEventListener("resize", p);
|
|
3318
3318
|
}, a.delay)));
|
|
3319
3319
|
}, h = () => {
|
|
3320
3320
|
i.value = !1, u && (clearTimeout(u), u = null), m && clearTimeout(m), m = setTimeout(() => {
|
|
3321
|
-
i.value || (o.value = !1, window.removeEventListener("scroll",
|
|
3321
|
+
i.value || (o.value = !1, window.removeEventListener("scroll", p, !0), window.removeEventListener("resize", p));
|
|
3322
3322
|
}, 100);
|
|
3323
3323
|
};
|
|
3324
3324
|
Se(
|
|
3325
3325
|
() => a.disabled,
|
|
3326
|
-
(
|
|
3327
|
-
|
|
3326
|
+
(g) => {
|
|
3327
|
+
g && (u && (clearTimeout(u), u = null), m && (clearTimeout(m), m = null), i.value = !1, o.value = !1, window.removeEventListener("scroll", p, !0), window.removeEventListener("resize", p));
|
|
3328
3328
|
}
|
|
3329
3329
|
);
|
|
3330
|
-
const
|
|
3330
|
+
const p = () => {
|
|
3331
3331
|
if (!t.value || !n.value) return;
|
|
3332
|
-
const
|
|
3332
|
+
const g = t.value.getBoundingClientRect(), v = {
|
|
3333
3333
|
width: n.value.offsetWidth,
|
|
3334
3334
|
height: n.value.offsetHeight
|
|
3335
|
-
},
|
|
3336
|
-
let
|
|
3335
|
+
}, x = window.innerHeight, T = window.innerWidth, W = 4;
|
|
3336
|
+
let M = a.position, $ = 0, b = 0;
|
|
3337
3337
|
const D = {
|
|
3338
3338
|
"top-left": () => {
|
|
3339
|
-
|
|
3339
|
+
$ = g.top - v.height - W, b = g.left;
|
|
3340
3340
|
},
|
|
3341
3341
|
"top-middle": () => {
|
|
3342
|
-
|
|
3342
|
+
$ = g.top - v.height - W, b = g.left + g.width / 2 - v.width / 2;
|
|
3343
3343
|
},
|
|
3344
3344
|
"top-right": () => {
|
|
3345
|
-
|
|
3345
|
+
$ = g.top - v.height - W, b = g.right - v.width;
|
|
3346
3346
|
},
|
|
3347
3347
|
"bottom-left": () => {
|
|
3348
|
-
|
|
3348
|
+
$ = g.bottom + W, b = g.left;
|
|
3349
3349
|
},
|
|
3350
3350
|
"bottom-middle": () => {
|
|
3351
|
-
|
|
3351
|
+
$ = g.bottom + W, b = g.left + g.width / 2 - v.width / 2;
|
|
3352
3352
|
},
|
|
3353
3353
|
"bottom-right": () => {
|
|
3354
|
-
|
|
3354
|
+
$ = g.bottom + W, b = g.right - v.width;
|
|
3355
3355
|
},
|
|
3356
3356
|
"left-top": () => {
|
|
3357
|
-
|
|
3357
|
+
$ = g.top, b = g.left - v.width - W;
|
|
3358
3358
|
},
|
|
3359
3359
|
"left-middle": () => {
|
|
3360
|
-
|
|
3360
|
+
$ = g.top + g.height / 2 - v.height / 2, b = g.left - v.width - W;
|
|
3361
3361
|
},
|
|
3362
3362
|
"left-bottom": () => {
|
|
3363
|
-
|
|
3363
|
+
$ = g.bottom - v.height, b = g.left - v.width - W;
|
|
3364
3364
|
},
|
|
3365
3365
|
"right-top": () => {
|
|
3366
|
-
|
|
3366
|
+
$ = g.top, b = g.right + W;
|
|
3367
3367
|
},
|
|
3368
3368
|
"right-middle": () => {
|
|
3369
|
-
|
|
3369
|
+
$ = g.top + g.height / 2 - v.height / 2, b = g.right + W;
|
|
3370
3370
|
},
|
|
3371
3371
|
"right-bottom": () => {
|
|
3372
|
-
|
|
3372
|
+
$ = g.bottom - v.height, b = g.right + W;
|
|
3373
3373
|
}
|
|
3374
3374
|
};
|
|
3375
|
-
D[
|
|
3375
|
+
D[M]?.();
|
|
3376
3376
|
const z = (X, R) => {
|
|
3377
|
-
|
|
3378
|
-
}, H =
|
|
3379
|
-
|
|
3377
|
+
M = M.replace(X, R), D[M]?.();
|
|
3378
|
+
}, H = $ >= 10, Z = $ + v.height <= x - 10, me = b >= 10, B = b + v.width <= T - 10;
|
|
3379
|
+
M.startsWith("top-") && !H && g.bottom + v.height + W <= x - 10 ? z("top-", "bottom-") : M.startsWith("bottom-") && !Z && g.top - v.height - W >= 10 ? z("bottom-", "top-") : M.startsWith("left-") && !me && g.right + v.width + W <= T - 10 ? z("left-", "right-") : M.startsWith("right-") && !B && g.left - v.width - W >= 10 && z("right-", "left-"), b = Math.max(10, Math.min(b, T - v.width - 10)), $ = Math.max(10, Math.min($, x - v.height - 10)), r.value = M, s.value = {
|
|
3380
3380
|
position: "fixed",
|
|
3381
|
-
top: `${
|
|
3381
|
+
top: `${$}px`,
|
|
3382
3382
|
left: `${b}px`,
|
|
3383
3383
|
maxWidth: `${a.maxWidth}px`,
|
|
3384
3384
|
zIndex: "10000"
|
|
@@ -3387,24 +3387,24 @@ const vr = { class: "toolkit-tooltip__content" }, Ne = /* @__PURE__ */ oe({
|
|
|
3387
3387
|
Se(
|
|
3388
3388
|
() => a.title,
|
|
3389
3389
|
async () => {
|
|
3390
|
-
o.value && (await ke(),
|
|
3390
|
+
o.value && (await ke(), p());
|
|
3391
3391
|
}
|
|
3392
3392
|
);
|
|
3393
|
-
const
|
|
3394
|
-
|
|
3393
|
+
const k = (g) => {
|
|
3394
|
+
g.persisted && (i.value = !1, o.value = !1);
|
|
3395
3395
|
};
|
|
3396
3396
|
return ct(() => {
|
|
3397
|
-
window.addEventListener("pageshow",
|
|
3397
|
+
window.addEventListener("pageshow", k);
|
|
3398
3398
|
}), wt(() => {
|
|
3399
|
-
u && clearTimeout(u), m && clearTimeout(m), window.removeEventListener("scroll",
|
|
3400
|
-
}), (
|
|
3399
|
+
u && clearTimeout(u), m && clearTimeout(m), window.removeEventListener("scroll", p, !0), window.removeEventListener("resize", p), window.removeEventListener("pageshow", k);
|
|
3400
|
+
}), (g, v) => (l(), d("div", {
|
|
3401
3401
|
ref_key: "triggerRef",
|
|
3402
3402
|
ref: t,
|
|
3403
3403
|
class: "toolkit-tooltip-wrapper",
|
|
3404
3404
|
onMouseenter: c,
|
|
3405
3405
|
onMouseleave: h
|
|
3406
3406
|
}, [
|
|
3407
|
-
Pe(
|
|
3407
|
+
Pe(g.$slots, "default"),
|
|
3408
3408
|
(l(), j(Fe, { to: "body" }, [
|
|
3409
3409
|
C(dt, { name: "toolkit-tooltip-fade" }, {
|
|
3410
3410
|
default: K(() => [
|
|
@@ -3416,8 +3416,8 @@ const vr = { class: "toolkit-tooltip__content" }, Ne = /* @__PURE__ */ oe({
|
|
|
3416
3416
|
style: ge(s.value),
|
|
3417
3417
|
role: "tooltip"
|
|
3418
3418
|
}, [
|
|
3419
|
-
|
|
3420
|
-
Pe(
|
|
3419
|
+
y("div", vr, [
|
|
3420
|
+
Pe(g.$slots, "content", {}, () => [
|
|
3421
3421
|
ot(A(e.title), 1)
|
|
3422
3422
|
])
|
|
3423
3423
|
])
|
|
@@ -7497,7 +7497,7 @@ const Ue = {
|
|
|
7497
7497
|
]),
|
|
7498
7498
|
_: 1
|
|
7499
7499
|
}, 8, ["title"])) : _("", !0),
|
|
7500
|
-
|
|
7500
|
+
y("div", Tc, [
|
|
7501
7501
|
e.view === "calendar" ? (l(), d(le, { key: 0 }, [
|
|
7502
7502
|
C(be, {
|
|
7503
7503
|
label: e.month,
|
|
@@ -7592,14 +7592,14 @@ const Ue = {
|
|
|
7592
7592
|
},
|
|
7593
7593
|
emits: ["update:modelValue", "focus", "blur", "clear", "increment", "decrement"],
|
|
7594
7594
|
setup(e, { expose: a, emit: t }) {
|
|
7595
|
-
const n = e, o = t, i = va(), r =
|
|
7596
|
-
const
|
|
7597
|
-
return isNaN(
|
|
7595
|
+
const n = e, o = t, i = va(), r = w(null), s = f(() => n.id || `input-${Math.random().toString(36).slice(2, 11)}`), u = f(() => !!i["leading-icon"]), m = f(() => !!i["trailing-icon"]), c = f(() => {
|
|
7596
|
+
const $ = parseFloat(n.modelValue || "0");
|
|
7597
|
+
return isNaN($) ? 0 : $;
|
|
7598
7598
|
}), h = f(
|
|
7599
7599
|
() => n.min !== void 0 && c.value <= n.min
|
|
7600
|
-
),
|
|
7600
|
+
), p = f(
|
|
7601
7601
|
() => n.max !== void 0 && c.value >= n.max
|
|
7602
|
-
),
|
|
7602
|
+
), k = f(() => [
|
|
7603
7603
|
"toolkit-input",
|
|
7604
7604
|
`toolkit-input--${n.size}`,
|
|
7605
7605
|
{
|
|
@@ -7607,49 +7607,49 @@ const Ue = {
|
|
|
7607
7607
|
"toolkit-input--disabled": n.disabled,
|
|
7608
7608
|
"toolkit-input--error": n.isError || n.errorMessage
|
|
7609
7609
|
}
|
|
7610
|
-
]),
|
|
7611
|
-
o("update:modelValue",
|
|
7612
|
-
}, v = (
|
|
7613
|
-
o("focus",
|
|
7614
|
-
},
|
|
7610
|
+
]), g = ($) => {
|
|
7611
|
+
o("update:modelValue", $.target.value);
|
|
7612
|
+
}, v = ($) => {
|
|
7613
|
+
o("focus", $);
|
|
7614
|
+
}, x = ($) => {
|
|
7615
7615
|
if (n.type === "number" && n.numberType) {
|
|
7616
|
-
const b =
|
|
7616
|
+
const b = $.target, D = b.value;
|
|
7617
7617
|
if (D === "") {
|
|
7618
|
-
n.modelValue !== "" && n.modelValue !== void 0 && o("update:modelValue", ""), o("blur",
|
|
7618
|
+
n.modelValue !== "" && n.modelValue !== void 0 && o("update:modelValue", ""), o("blur", $);
|
|
7619
7619
|
return;
|
|
7620
7620
|
}
|
|
7621
7621
|
const z = Number(D);
|
|
7622
7622
|
let H;
|
|
7623
7623
|
Number.isFinite(z) ? n.numberType === "integer" ? H = String(Math.trunc(z)) : H = String(z) : H = "", H !== D && (b.value = H), H !== n.modelValue && o("update:modelValue", H);
|
|
7624
7624
|
}
|
|
7625
|
-
o("blur",
|
|
7625
|
+
o("blur", $);
|
|
7626
7626
|
}, T = () => {
|
|
7627
7627
|
o("update:modelValue", ""), o("clear"), r.value?.focus();
|
|
7628
7628
|
}, W = () => {
|
|
7629
|
-
if (n.disabled ||
|
|
7630
|
-
const
|
|
7629
|
+
if (n.disabled || p.value) return;
|
|
7630
|
+
const $ = c.value + n.step, b = n.max !== void 0 ? Math.min($, n.max) : $;
|
|
7631
7631
|
o("update:modelValue", b.toString()), o("increment");
|
|
7632
|
-
},
|
|
7632
|
+
}, M = () => {
|
|
7633
7633
|
if (n.disabled || h.value) return;
|
|
7634
|
-
const
|
|
7634
|
+
const $ = c.value - n.step, b = n.min !== void 0 ? Math.max($, n.min) : $;
|
|
7635
7635
|
o("update:modelValue", b.toString()), o("decrement");
|
|
7636
7636
|
};
|
|
7637
7637
|
return a({
|
|
7638
7638
|
focus: () => r.value?.focus(),
|
|
7639
7639
|
blur: () => r.value?.blur()
|
|
7640
|
-
}), (
|
|
7641
|
-
e.label ||
|
|
7642
|
-
Pe(
|
|
7640
|
+
}), ($, b) => (l(), d("div", Cc, [
|
|
7641
|
+
e.label || $.$slots.label ? (l(), d("div", Wc, [
|
|
7642
|
+
Pe($.$slots, "label", {}, () => [
|
|
7643
7643
|
ot(A(e.label), 1)
|
|
7644
7644
|
])
|
|
7645
7645
|
])) : _("", !0),
|
|
7646
|
-
|
|
7647
|
-
class: ne(
|
|
7646
|
+
y("div", {
|
|
7647
|
+
class: ne(k.value)
|
|
7648
7648
|
}, [
|
|
7649
7649
|
u.value && e.type !== "number" ? (l(), d("div", Sc, [
|
|
7650
|
-
Pe(
|
|
7650
|
+
Pe($.$slots, "leading-icon")
|
|
7651
7651
|
])) : _("", !0),
|
|
7652
|
-
|
|
7652
|
+
y("input", {
|
|
7653
7653
|
ref_key: "inputRef",
|
|
7654
7654
|
ref: r,
|
|
7655
7655
|
id: s.value,
|
|
@@ -7662,26 +7662,26 @@ const Ue = {
|
|
|
7662
7662
|
min: e.min,
|
|
7663
7663
|
max: e.max,
|
|
7664
7664
|
class: "toolkit-input__field",
|
|
7665
|
-
onInput:
|
|
7665
|
+
onInput: g,
|
|
7666
7666
|
onFocus: v,
|
|
7667
|
-
onBlur:
|
|
7667
|
+
onBlur: x
|
|
7668
7668
|
}, null, 40, zc),
|
|
7669
7669
|
e.type === "number" && !e.disabled ? (l(), d("div", Oc, [
|
|
7670
|
-
|
|
7670
|
+
y("button", {
|
|
7671
7671
|
type: "button",
|
|
7672
7672
|
class: "toolkit-input__number-btn toolkit-input__number-btn--decrement",
|
|
7673
7673
|
disabled: h.value,
|
|
7674
|
-
onClick:
|
|
7674
|
+
onClick: M
|
|
7675
7675
|
}, [
|
|
7676
7676
|
C(de, {
|
|
7677
7677
|
icon: "minus-outline",
|
|
7678
7678
|
size: "16"
|
|
7679
7679
|
})
|
|
7680
7680
|
], 8, Ec),
|
|
7681
|
-
|
|
7681
|
+
y("button", {
|
|
7682
7682
|
type: "button",
|
|
7683
7683
|
class: "toolkit-input__number-btn toolkit-input__number-btn--increment",
|
|
7684
|
-
disabled:
|
|
7684
|
+
disabled: p.value,
|
|
7685
7685
|
onClick: W
|
|
7686
7686
|
}, [
|
|
7687
7687
|
C(de, {
|
|
@@ -7703,7 +7703,7 @@ const Ue = {
|
|
|
7703
7703
|
})
|
|
7704
7704
|
])) : _("", !0),
|
|
7705
7705
|
m.value && e.type !== "number" ? (l(), d("div", Ic, [
|
|
7706
|
-
Pe(
|
|
7706
|
+
Pe($.$slots, "trailing-icon")
|
|
7707
7707
|
])) : _("", !0)
|
|
7708
7708
|
], 2),
|
|
7709
7709
|
e.errorMessage ? (l(), d("div", Lc, A(e.errorMessage), 1)) : _("", !0)
|
|
@@ -7804,7 +7804,7 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
7804
7804
|
emits: ["update:inputValue", "update:inputEndValue", "inputEnter", "inputEndEnter", "inputBlur", "inputEndBlur", "selectDate"],
|
|
7805
7805
|
setup(e, { emit: a }) {
|
|
7806
7806
|
const t = e, n = a, o = f(() => Ue[t.locale].weekDays), i = (m) => {
|
|
7807
|
-
const { key: c, ctrlKey: h, metaKey:
|
|
7807
|
+
const { key: c, ctrlKey: h, metaKey: p } = m, k = m.target;
|
|
7808
7808
|
if (!([
|
|
7809
7809
|
"Backspace",
|
|
7810
7810
|
"Delete",
|
|
@@ -7815,12 +7815,12 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
7815
7815
|
"ArrowRight",
|
|
7816
7816
|
"ArrowUp",
|
|
7817
7817
|
"ArrowDown"
|
|
7818
|
-
].includes(c) || ["a", "c", "v", "x"].includes(c) && (h ||
|
|
7818
|
+
].includes(c) || ["a", "c", "v", "x"].includes(c) && (h || p))) {
|
|
7819
7819
|
if (!/[\d/]/.test(c)) {
|
|
7820
7820
|
m.preventDefault();
|
|
7821
7821
|
return;
|
|
7822
7822
|
}
|
|
7823
|
-
|
|
7823
|
+
k.value.length >= 10 && !k.selectionStart && m.preventDefault();
|
|
7824
7824
|
}
|
|
7825
7825
|
}, r = f({
|
|
7826
7826
|
get: () => t.inputValue,
|
|
@@ -7874,23 +7874,23 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
7874
7874
|
],
|
|
7875
7875
|
onBlur: c[8] || (c[8] = (h) => n("inputBlur"))
|
|
7876
7876
|
}, null, 8, ["modelValue", "is-error"])),
|
|
7877
|
-
|
|
7877
|
+
y("div", Bc, [
|
|
7878
7878
|
(l(!0), d(le, null, Ie(o.value, (h) => (l(), d("div", {
|
|
7879
7879
|
key: h,
|
|
7880
7880
|
class: "toolkit-datepicker__weekday"
|
|
7881
7881
|
}, A(h), 1))), 128))
|
|
7882
7882
|
]),
|
|
7883
|
-
|
|
7884
|
-
(l(!0), d(le, null, Ie(u.value, (h,
|
|
7885
|
-
(l(!0), d(le, null, Ie(h, (
|
|
7886
|
-
key: `${
|
|
7883
|
+
y("div", Fc, [
|
|
7884
|
+
(l(!0), d(le, null, Ie(u.value, (h, p) => (l(), d(le, { key: p }, [
|
|
7885
|
+
(l(!0), d(le, null, Ie(h, (k, g) => (l(), d(le, {
|
|
7886
|
+
key: `${p}-${g}`
|
|
7887
7887
|
}, [
|
|
7888
|
-
|
|
7888
|
+
k.isRangeGroup ? (l(), d("div", {
|
|
7889
7889
|
key: 0,
|
|
7890
7890
|
class: "toolkit-datepicker__dates-in-range",
|
|
7891
|
-
style: ge({ gridColumn: `span ${
|
|
7891
|
+
style: ge({ gridColumn: `span ${k.days?.length}` })
|
|
7892
7892
|
}, [
|
|
7893
|
-
(l(!0), d(le, null, Ie(
|
|
7893
|
+
(l(!0), d(le, null, Ie(k.days, (v) => (l(), d("button", {
|
|
7894
7894
|
key: v.date.toISOString(),
|
|
7895
7895
|
type: "button",
|
|
7896
7896
|
class: ne(["toolkit-datepicker__day", {
|
|
@@ -7900,20 +7900,20 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
7900
7900
|
"toolkit-datepicker__day--disabled": v.isDisabled
|
|
7901
7901
|
}]),
|
|
7902
7902
|
disabled: v.isDisabled,
|
|
7903
|
-
onClick: (
|
|
7903
|
+
onClick: (x) => n("selectDate", v.date)
|
|
7904
7904
|
}, A(v.day), 11, Yc))), 128))
|
|
7905
7905
|
], 4)) : (l(), d("button", {
|
|
7906
7906
|
key: 1,
|
|
7907
7907
|
type: "button",
|
|
7908
7908
|
class: ne(["toolkit-datepicker__day", {
|
|
7909
|
-
"toolkit-datepicker__day--other-month": !
|
|
7910
|
-
"toolkit-datepicker__day--selected":
|
|
7911
|
-
"toolkit-datepicker__day--today":
|
|
7912
|
-
"toolkit-datepicker__day--disabled":
|
|
7909
|
+
"toolkit-datepicker__day--other-month": !k.day?.isCurrentMonth,
|
|
7910
|
+
"toolkit-datepicker__day--selected": k.day?.isSelected,
|
|
7911
|
+
"toolkit-datepicker__day--today": k.day?.isToday,
|
|
7912
|
+
"toolkit-datepicker__day--disabled": k.day?.isDisabled
|
|
7913
7913
|
}]),
|
|
7914
|
-
disabled:
|
|
7915
|
-
onClick: (v) =>
|
|
7916
|
-
}, A(
|
|
7914
|
+
disabled: k.day?.isDisabled,
|
|
7915
|
+
onClick: (v) => k.day && n("selectDate", k.day.date)
|
|
7916
|
+
}, A(k.day?.day), 11, jc))
|
|
7917
7917
|
], 64))), 128))
|
|
7918
7918
|
], 64))), 128))
|
|
7919
7919
|
])
|
|
@@ -7941,11 +7941,11 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
7941
7941
|
},
|
|
7942
7942
|
emits: ["update:modelValue", "focus", "blur"],
|
|
7943
7943
|
setup(e, { emit: a }) {
|
|
7944
|
-
const t = e, n = a, o =
|
|
7944
|
+
const t = e, n = a, o = w(null), i = w(null), r = w(!1), s = (b) => {
|
|
7945
7945
|
if (!b) return { hours: "", minutes: "" };
|
|
7946
7946
|
const D = b.split(":");
|
|
7947
7947
|
return { hours: D[0] || "", minutes: D[1] || "" };
|
|
7948
|
-
}, { hours: u, minutes: m } = s(t.modelValue), c =
|
|
7948
|
+
}, { hours: u, minutes: m } = s(t.modelValue), c = w(u), h = w(m);
|
|
7949
7949
|
Se(
|
|
7950
7950
|
() => t.modelValue,
|
|
7951
7951
|
(b) => {
|
|
@@ -7953,10 +7953,10 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
7953
7953
|
c.value = D, h.value = z;
|
|
7954
7954
|
}
|
|
7955
7955
|
);
|
|
7956
|
-
const
|
|
7956
|
+
const p = f(() => t.use24Hour ? 23 : 12), k = (b, D) => {
|
|
7957
7957
|
const z = parseInt(b, 10);
|
|
7958
7958
|
return isNaN(z) ? "" : Math.min(Math.max(0, z), D).toString().padStart(2, "0");
|
|
7959
|
-
},
|
|
7959
|
+
}, g = () => {
|
|
7960
7960
|
if (!c.value && !h.value) {
|
|
7961
7961
|
n("update:modelValue", "");
|
|
7962
7962
|
return;
|
|
@@ -7964,26 +7964,26 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
7964
7964
|
n("update:modelValue", `${c.value}:${h.value}`);
|
|
7965
7965
|
}, v = (b) => {
|
|
7966
7966
|
t.disabled || b.target.tagName === "INPUT" || (h.value ? i.value?.focus() : o.value?.focus());
|
|
7967
|
-
},
|
|
7967
|
+
}, x = (b, D) => {
|
|
7968
7968
|
const z = b.target;
|
|
7969
7969
|
let H = z.value.replace(/\D/g, "").slice(0, 2);
|
|
7970
7970
|
if (D === "hours") {
|
|
7971
7971
|
const Z = parseInt(H, 10);
|
|
7972
|
-
!isNaN(Z) && Z >
|
|
7972
|
+
!isNaN(Z) && Z > p.value && (H = p.value.toString()), c.value = H, H.length === 2 && i.value?.focus();
|
|
7973
7973
|
} else {
|
|
7974
7974
|
const Z = parseInt(H, 10);
|
|
7975
7975
|
!isNaN(Z) && Z > 59 && (H = "59"), h.value = H;
|
|
7976
7976
|
}
|
|
7977
|
-
z.value = H,
|
|
7977
|
+
z.value = H, g();
|
|
7978
7978
|
}, T = (b, D) => {
|
|
7979
7979
|
const z = b.target;
|
|
7980
|
-
D === "hours" ? b.key === "Tab" && c.value.length === 1 ? (c.value =
|
|
7980
|
+
D === "hours" ? b.key === "Tab" && c.value.length === 1 ? (c.value = k(c.value, p.value), g()) : (b.key === "ArrowRight" && z.selectionStart === z.value.length || b.key === ":") && (b.preventDefault(), i.value?.focus()) : b.key === "ArrowLeft" && z.selectionStart === 0 ? (b.preventDefault(), o.value?.focus()) : b.key === "Enter" ? z.blur() : (b.key === "Backspace" || b.key === "Delete") && !z.value && (b.preventDefault(), o.value?.focus());
|
|
7981
7981
|
}, W = (b) => {
|
|
7982
7982
|
r.value = !0, b.target.select(), n("focus");
|
|
7983
|
-
},
|
|
7983
|
+
}, M = (b) => {
|
|
7984
7984
|
const D = b.relatedTarget;
|
|
7985
|
-
D === o.value || D === i.value || (r.value = !1, !c.value && h.value && (c.value = "00"), c.value && !h.value && (h.value = "00"), c.value && (c.value =
|
|
7986
|
-
},
|
|
7985
|
+
D === o.value || D === i.value || (r.value = !1, !c.value && h.value && (c.value = "00"), c.value && !h.value && (h.value = "00"), c.value && (c.value = k(c.value, p.value)), h.value && (h.value = k(h.value, 59)), g(), n("blur"));
|
|
7986
|
+
}, $ = f(() => [
|
|
7987
7987
|
"toolkit-time-input",
|
|
7988
7988
|
`toolkit-time-input--${t.size}`,
|
|
7989
7989
|
{
|
|
@@ -7998,11 +7998,11 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
7998
7998
|
ot(A(e.label), 1)
|
|
7999
7999
|
])
|
|
8000
8000
|
])) : _("", !0),
|
|
8001
|
-
|
|
8002
|
-
class: ne(
|
|
8001
|
+
y("div", {
|
|
8002
|
+
class: ne($.value),
|
|
8003
8003
|
onClick: v
|
|
8004
8004
|
}, [
|
|
8005
|
-
|
|
8005
|
+
y("input", {
|
|
8006
8006
|
id: e.id,
|
|
8007
8007
|
ref_key: "hoursInputRef",
|
|
8008
8008
|
ref: o,
|
|
@@ -8013,13 +8013,13 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
8013
8013
|
disabled: e.disabled,
|
|
8014
8014
|
maxlength: "2",
|
|
8015
8015
|
class: "toolkit-time-input__input toolkit-time-input__input--hours",
|
|
8016
|
-
onInput: D[0] || (D[0] = (z) =>
|
|
8016
|
+
onInput: D[0] || (D[0] = (z) => x(z, "hours")),
|
|
8017
8017
|
onFocus: W,
|
|
8018
|
-
onBlur:
|
|
8018
|
+
onBlur: M,
|
|
8019
8019
|
onKeydown: D[1] || (D[1] = (z) => T(z, "hours"))
|
|
8020
8020
|
}, null, 40, Xc),
|
|
8021
|
-
D[4] || (D[4] =
|
|
8022
|
-
|
|
8021
|
+
D[4] || (D[4] = y("span", { class: "toolkit-time-input__separator" }, ":", -1)),
|
|
8022
|
+
y("input", {
|
|
8023
8023
|
ref_key: "minutesInputRef",
|
|
8024
8024
|
ref: i,
|
|
8025
8025
|
type: "text",
|
|
@@ -8029,9 +8029,9 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
8029
8029
|
disabled: e.disabled,
|
|
8030
8030
|
maxlength: "2",
|
|
8031
8031
|
class: "toolkit-time-input__input toolkit-time-input__input--minutes",
|
|
8032
|
-
onInput: D[2] || (D[2] = (z) =>
|
|
8032
|
+
onInput: D[2] || (D[2] = (z) => x(z, "minutes")),
|
|
8033
8033
|
onFocus: W,
|
|
8034
|
-
onBlur:
|
|
8034
|
+
onBlur: M,
|
|
8035
8035
|
onKeydown: D[3] || (D[3] = (z) => T(z, "minutes"))
|
|
8036
8036
|
}, null, 40, Qc)
|
|
8037
8037
|
], 2),
|
|
@@ -8056,34 +8056,34 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
8056
8056
|
},
|
|
8057
8057
|
emits: ["update:startHours", "update:startMinutes", "update:endHours", "update:endMinutes"],
|
|
8058
8058
|
setup(e, { emit: a }) {
|
|
8059
|
-
const t = e, n = a, o = f(() => !t.startHours && !t.startMinutes ? "" : `${t.startHours}:${t.startMinutes}`), i = f(() => !t.endHours && !t.endMinutes ? "" : `${t.endHours}:${t.endMinutes}`), r =
|
|
8060
|
-
Se(o, (
|
|
8061
|
-
r.value =
|
|
8062
|
-
}), Se(i, (
|
|
8063
|
-
s.value =
|
|
8059
|
+
const t = e, n = a, o = f(() => !t.startHours && !t.startMinutes ? "" : `${t.startHours}:${t.startMinutes}`), i = f(() => !t.endHours && !t.endMinutes ? "" : `${t.endHours}:${t.endMinutes}`), r = w(o.value), s = w(i.value);
|
|
8060
|
+
Se(o, (p) => {
|
|
8061
|
+
r.value = p;
|
|
8062
|
+
}), Se(i, (p) => {
|
|
8063
|
+
s.value = p;
|
|
8064
8064
|
});
|
|
8065
|
-
const u = (
|
|
8066
|
-
if (
|
|
8067
|
-
const [
|
|
8068
|
-
n("update:startHours",
|
|
8065
|
+
const u = (p) => {
|
|
8066
|
+
if (p.includes(":")) {
|
|
8067
|
+
const [k = "", g = ""] = p.split(":");
|
|
8068
|
+
n("update:startHours", k), n("update:startMinutes", g);
|
|
8069
8069
|
}
|
|
8070
|
-
}, m = (
|
|
8071
|
-
if (
|
|
8072
|
-
const [
|
|
8073
|
-
n("update:endHours",
|
|
8070
|
+
}, m = (p) => {
|
|
8071
|
+
if (p.includes(":")) {
|
|
8072
|
+
const [k = "", g = ""] = p.split(":");
|
|
8073
|
+
n("update:endHours", k), n("update:endMinutes", g);
|
|
8074
8074
|
}
|
|
8075
8075
|
}, c = () => {
|
|
8076
8076
|
r.value || (n("update:startHours", "00"), n("update:startMinutes", "00"));
|
|
8077
8077
|
}, h = () => {
|
|
8078
8078
|
s.value || (n("update:endHours", "00"), n("update:endMinutes", "00"));
|
|
8079
8079
|
};
|
|
8080
|
-
return (
|
|
8080
|
+
return (p, k) => (l(), d("div", Jc, [
|
|
8081
8081
|
e.variant === "single-time" ? (l(), d("div", Zc, [
|
|
8082
8082
|
C(yt, {
|
|
8083
8083
|
class: "toolkit-datepicker__time-input",
|
|
8084
8084
|
modelValue: r.value,
|
|
8085
8085
|
"onUpdate:modelValue": [
|
|
8086
|
-
|
|
8086
|
+
k[0] || (k[0] = (g) => r.value = g),
|
|
8087
8087
|
u
|
|
8088
8088
|
],
|
|
8089
8089
|
label: e.translations?.time ?? "Time",
|
|
@@ -8096,7 +8096,7 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
8096
8096
|
class: "toolkit-datepicker__time-input",
|
|
8097
8097
|
modelValue: r.value,
|
|
8098
8098
|
"onUpdate:modelValue": [
|
|
8099
|
-
|
|
8099
|
+
k[1] || (k[1] = (g) => r.value = g),
|
|
8100
8100
|
u
|
|
8101
8101
|
],
|
|
8102
8102
|
label: e.translations?.startTime ?? "Start Time",
|
|
@@ -8107,7 +8107,7 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
8107
8107
|
class: "toolkit-datepicker__time-input",
|
|
8108
8108
|
modelValue: s.value,
|
|
8109
8109
|
"onUpdate:modelValue": [
|
|
8110
|
-
|
|
8110
|
+
k[2] || (k[2] = (g) => s.value = g),
|
|
8111
8111
|
m
|
|
8112
8112
|
],
|
|
8113
8113
|
label: e.translations?.endTime ?? "End time",
|
|
@@ -8146,37 +8146,37 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
8146
8146
|
setup(e, { emit: a }) {
|
|
8147
8147
|
const t = e, n = a, o = f(() => Ue[t.locale]);
|
|
8148
8148
|
return (i, r) => (l(), d("div", om, [
|
|
8149
|
-
|
|
8150
|
-
|
|
8151
|
-
|
|
8149
|
+
y("div", im, [
|
|
8150
|
+
y("div", rm, A(o.value.navigation.weekTitle), 1),
|
|
8151
|
+
y("button", {
|
|
8152
8152
|
type: "button",
|
|
8153
8153
|
class: "toolkit-datepicker__navigation-item",
|
|
8154
8154
|
onClick: r[0] || (r[0] = (s) => n("selectThisWeek"))
|
|
8155
8155
|
}, A(o.value.navigation.thisWeek), 1),
|
|
8156
|
-
|
|
8156
|
+
y("button", {
|
|
8157
8157
|
type: "button",
|
|
8158
8158
|
class: "toolkit-datepicker__navigation-item",
|
|
8159
8159
|
onClick: r[1] || (r[1] = (s) => n("selectPreviousWeek"))
|
|
8160
8160
|
}, A(o.value.navigation.previousWeek), 1),
|
|
8161
|
-
|
|
8161
|
+
y("button", {
|
|
8162
8162
|
type: "button",
|
|
8163
8163
|
class: "toolkit-datepicker__navigation-item",
|
|
8164
8164
|
onClick: r[2] || (r[2] = (s) => n("selectNextWeek"))
|
|
8165
8165
|
}, A(o.value.navigation.nextWeek), 1)
|
|
8166
8166
|
]),
|
|
8167
|
-
|
|
8168
|
-
|
|
8169
|
-
|
|
8167
|
+
y("div", lm, [
|
|
8168
|
+
y("div", sm, A(o.value.navigation.monthTitle), 1),
|
|
8169
|
+
y("button", {
|
|
8170
8170
|
type: "button",
|
|
8171
8171
|
class: "toolkit-datepicker__navigation-item",
|
|
8172
8172
|
onClick: r[3] || (r[3] = (s) => n("selectThisMonth"))
|
|
8173
8173
|
}, A(o.value.navigation.thisMonth), 1),
|
|
8174
|
-
|
|
8174
|
+
y("button", {
|
|
8175
8175
|
type: "button",
|
|
8176
8176
|
class: "toolkit-datepicker__navigation-item",
|
|
8177
8177
|
onClick: r[4] || (r[4] = (s) => n("selectPreviousMonth"))
|
|
8178
8178
|
}, A(o.value.navigation.previousMonth), 1),
|
|
8179
|
-
|
|
8179
|
+
y("button", {
|
|
8180
8180
|
type: "button",
|
|
8181
8181
|
class: "toolkit-datepicker__navigation-item",
|
|
8182
8182
|
onClick: r[5] || (r[5] = (s) => n("selectNextMonth"))
|
|
@@ -8212,12 +8212,12 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
8212
8212
|
},
|
|
8213
8213
|
emits: ["update:modelValue", "apply", "cancel"],
|
|
8214
8214
|
setup(e, { emit: a }) {
|
|
8215
|
-
const t = e, n = a, o = f(() => ua(t.timezone)), i =
|
|
8215
|
+
const t = e, n = a, o = f(() => ua(t.timezone)), i = w(ua(t.timezone)), r = w(""), s = w(""), u = w(null), m = w(null), c = w(null), h = w(t.defaultStartHours), p = w(t.defaultStartMinutes), k = w(t.defaultEndHours), g = w(t.defaultEndMinutes), v = w(!1), x = w(!1), T = w("calendar"), W = w(la(ua(t.timezone)) - 6), M = f(
|
|
8216
8216
|
() => Array.from(
|
|
8217
8217
|
{ length: 12 },
|
|
8218
8218
|
(I, G) => Ae(new Date(2024, G, 1), "MMM", { locale: Ue[t.locale].dateFnsLocale })
|
|
8219
8219
|
)
|
|
8220
|
-
),
|
|
8220
|
+
), $ = f(() => Array.from({ length: 12 }, (I, G) => W.value + G)), b = f(() => T.value === "year" ? `${W.value} – ${W.value + 11}` : Ae(i.value, "yyyy")), D = f(() => ["single-time", "single-time-range", "range-time"].includes(t.variant)), z = f(() => ["range", "range-time"].includes(t.variant)), H = f(() => t.isShowActions !== void 0 ? t.isShowActions : t.variant !== "single"), Z = f(() => z.value ? m.value ? c.value ? {
|
|
8221
8221
|
start: Ae(m.value, "dd/MM/yyyy"),
|
|
8222
8222
|
end: Ae(c.value, "dd/MM/yyyy")
|
|
8223
8223
|
} : { start: Ae(m.value, "dd/MM/yyyy"), end: "" } : { start: "", end: "" } : u.value ? Ae(u.value, "dd/MM/yyyy") : ""), me = f(() => {
|
|
@@ -8237,29 +8237,29 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
8237
8237
|
const G = bt(I);
|
|
8238
8238
|
return !!t.minDate && mi(G, bt(t.minDate)) || !!t.maxDate && ci(G, bt(t.maxDate));
|
|
8239
8239
|
}, R = (I) => z.value ? (m.value ? Yt(I, m.value) : !1) || (c.value ? Yt(I, c.value) : !1) : u.value ? Yt(I, u.value) : !1, O = (I) => !z.value || !m.value || !c.value ? !1 : dr(I, { start: m.value, end: c.value }), E = (I) => {
|
|
8240
|
-
X(I) || (z.value ? !m.value || c.value ? (m.value = I, c.value = null, v.value = !1) : (I < m.value ? (c.value = m.value, m.value = I) : c.value = I,
|
|
8240
|
+
X(I) || (z.value ? !m.value || c.value ? (m.value = I, c.value = null, v.value = !1) : (I < m.value ? (c.value = m.value, m.value = I) : c.value = I, x.value = !1) : (u.value = I, v.value = !1, t.variant === "single" && !t.isShowActions && N()), q());
|
|
8241
8241
|
}, ie = () => {
|
|
8242
8242
|
let I = !0;
|
|
8243
|
-
return m.value || (v.value = !0, I = !1), c.value || (
|
|
8243
|
+
return m.value || (v.value = !0, I = !1), c.value || (x.value = !0, I = !1), I;
|
|
8244
8244
|
}, se = () => u.value ? !0 : (v.value = !0, !1), F = () => {
|
|
8245
8245
|
let I = m.value, G = c.value;
|
|
8246
|
-
t.variant === "range-time" && (I = Et(Ot(I, parseInt(h.value)), parseInt(
|
|
8246
|
+
t.variant === "range-time" && (I = Et(Ot(I, parseInt(h.value)), parseInt(p.value)), G = Et(Ot(G, parseInt(k.value)), parseInt(g.value)));
|
|
8247
8247
|
const ee = { start: I, end: G };
|
|
8248
8248
|
n("update:modelValue", ee), n("apply", ee);
|
|
8249
8249
|
}, fe = () => {
|
|
8250
8250
|
const I = Et(
|
|
8251
8251
|
Ot(u.value, parseInt(h.value)),
|
|
8252
|
-
parseInt(g.value)
|
|
8253
|
-
), G = Et(
|
|
8254
|
-
Ot(u.value, parseInt(y.value)),
|
|
8255
8252
|
parseInt(p.value)
|
|
8253
|
+
), G = Et(
|
|
8254
|
+
Ot(u.value, parseInt(k.value)),
|
|
8255
|
+
parseInt(g.value)
|
|
8256
8256
|
), ee = { date: u.value, startTime: I, endTime: G };
|
|
8257
8257
|
n("update:modelValue", ee), n("apply", ee);
|
|
8258
8258
|
}, S = () => {
|
|
8259
8259
|
let I = u.value;
|
|
8260
|
-
t.variant === "single-time" && (I = Et(Ot(I, parseInt(h.value)), parseInt(
|
|
8260
|
+
t.variant === "single-time" && (I = Et(Ot(I, parseInt(h.value)), parseInt(p.value))), n("update:modelValue", I), n("apply", I);
|
|
8261
8261
|
}, N = () => {
|
|
8262
|
-
if (v.value = !1,
|
|
8262
|
+
if (v.value = !1, x.value = !1, z.value) {
|
|
8263
8263
|
if (!ie()) return;
|
|
8264
8264
|
F();
|
|
8265
8265
|
} else {
|
|
@@ -8287,7 +8287,7 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
8287
8287
|
if (s.value)
|
|
8288
8288
|
try {
|
|
8289
8289
|
const I = da(s.value);
|
|
8290
|
-
I ? (c.value = I,
|
|
8290
|
+
I ? (c.value = I, x.value = !1) : q();
|
|
8291
8291
|
} catch {
|
|
8292
8292
|
q();
|
|
8293
8293
|
}
|
|
@@ -8317,7 +8317,7 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
8317
8317
|
return Se(
|
|
8318
8318
|
() => t.modelValue,
|
|
8319
8319
|
(I) => {
|
|
8320
|
-
I && (z.value && typeof I == "object" && "start" in I ? (m.value = I.start, c.value = I.end, i.value = I.start, t.variant === "range-time" && (h.value = I.start.getHours().toString().padStart(2, "0"),
|
|
8320
|
+
I && (z.value && typeof I == "object" && "start" in I ? (m.value = I.start, c.value = I.end, i.value = I.start, t.variant === "range-time" && (h.value = I.start.getHours().toString().padStart(2, "0"), p.value = I.start.getMinutes().toString().padStart(2, "0"), k.value = I.end.getHours().toString().padStart(2, "0"), g.value = I.end.getMinutes().toString().padStart(2, "0"))) : typeof I == "object" && "date" in I && "startTime" in I && "endTime" in I ? (u.value = I.date, i.value = I.date, h.value = I.startTime.getHours().toString().padStart(2, "0"), p.value = I.startTime.getMinutes().toString().padStart(2, "0"), k.value = I.endTime.getHours().toString().padStart(2, "0"), g.value = I.endTime.getMinutes().toString().padStart(2, "0")) : I instanceof Date && (u.value = I, i.value = I, D.value && (h.value = I.getHours().toString().padStart(2, "0"), p.value = I.getMinutes().toString().padStart(2, "0"))), q());
|
|
8321
8321
|
},
|
|
8322
8322
|
{ immediate: !0 }
|
|
8323
8323
|
), (I, G) => (l(), d("div", dm, [
|
|
@@ -8331,7 +8331,7 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
8331
8331
|
onSelectPreviousMonth: Wt,
|
|
8332
8332
|
onSelectNextMonth: St
|
|
8333
8333
|
}, null, 8, ["locale"])) : _("", !0),
|
|
8334
|
-
|
|
8334
|
+
y("div", cm, [
|
|
8335
8335
|
C(_c, {
|
|
8336
8336
|
month: De(Ae)(i.value, "MMMM", { locale: De(Ue)[e.locale].dateFnsLocale }),
|
|
8337
8337
|
year: b.value,
|
|
@@ -8345,8 +8345,8 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
8345
8345
|
onSelectYear: qe
|
|
8346
8346
|
}, null, 8, ["month", "year", "view", "locale"]),
|
|
8347
8347
|
T.value === "month" ? (l(), d("div", mm, [
|
|
8348
|
-
|
|
8349
|
-
(l(!0), d(le, null, Ie(
|
|
8348
|
+
y("div", fm, [
|
|
8349
|
+
(l(!0), d(le, null, Ie(M.value, (ee, Xe) => (l(), j(be, {
|
|
8350
8350
|
key: Xe,
|
|
8351
8351
|
type: Xe === De(di)(i.value) ? "primary" : "tertiary",
|
|
8352
8352
|
size: "small",
|
|
@@ -8354,7 +8354,7 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
8354
8354
|
onClick: (Qe) => Ze(Xe)
|
|
8355
8355
|
}, null, 8, ["type", "label", "onClick"]))), 128))
|
|
8356
8356
|
]),
|
|
8357
|
-
|
|
8357
|
+
y("div", hm, [
|
|
8358
8358
|
C(be, {
|
|
8359
8359
|
label: e.translations?.back ?? "Back",
|
|
8360
8360
|
type: "secondary",
|
|
@@ -8364,8 +8364,8 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
8364
8364
|
}, null, 8, ["label"])
|
|
8365
8365
|
])
|
|
8366
8366
|
])) : T.value === "year" ? (l(), d("div", vm, [
|
|
8367
|
-
|
|
8368
|
-
(l(!0), d(le, null, Ie(
|
|
8367
|
+
y("div", gm, [
|
|
8368
|
+
(l(!0), d(le, null, Ie($.value, (ee) => (l(), j(be, {
|
|
8369
8369
|
label: String(ee),
|
|
8370
8370
|
key: ee,
|
|
8371
8371
|
type: ee === De(la)(i.value) ? "primary" : "tertiary",
|
|
@@ -8373,7 +8373,7 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
8373
8373
|
onClick: (Xe) => et(ee)
|
|
8374
8374
|
}, null, 8, ["label", "type", "onClick"]))), 128))
|
|
8375
8375
|
]),
|
|
8376
|
-
|
|
8376
|
+
y("div", pm, [
|
|
8377
8377
|
C(be, {
|
|
8378
8378
|
label: e.translations?.back ?? "Back",
|
|
8379
8379
|
type: "secondary",
|
|
@@ -8390,7 +8390,7 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
8390
8390
|
"onUpdate:inputEndValue": G[4] || (G[4] = (ee) => s.value = ee),
|
|
8391
8391
|
"is-range": z.value,
|
|
8392
8392
|
"is-input-error": v.value,
|
|
8393
|
-
"is-input-end-error":
|
|
8393
|
+
"is-input-end-error": x.value,
|
|
8394
8394
|
"calendar-days": B.value,
|
|
8395
8395
|
locale: e.locale,
|
|
8396
8396
|
onInputEnter: U,
|
|
@@ -8404,12 +8404,12 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
8404
8404
|
variant: e.variant,
|
|
8405
8405
|
"start-hours": h.value,
|
|
8406
8406
|
"onUpdate:startHours": G[5] || (G[5] = (ee) => h.value = ee),
|
|
8407
|
-
"start-minutes":
|
|
8408
|
-
"onUpdate:startMinutes": G[6] || (G[6] = (ee) =>
|
|
8409
|
-
"end-hours":
|
|
8410
|
-
"onUpdate:endHours": G[7] || (G[7] = (ee) =>
|
|
8411
|
-
"end-minutes":
|
|
8412
|
-
"onUpdate:endMinutes": G[8] || (G[8] = (ee) =>
|
|
8407
|
+
"start-minutes": p.value,
|
|
8408
|
+
"onUpdate:startMinutes": G[6] || (G[6] = (ee) => p.value = ee),
|
|
8409
|
+
"end-hours": k.value,
|
|
8410
|
+
"onUpdate:endHours": G[7] || (G[7] = (ee) => k.value = ee),
|
|
8411
|
+
"end-minutes": g.value,
|
|
8412
|
+
"onUpdate:endMinutes": G[8] || (G[8] = (ee) => g.value = ee),
|
|
8413
8413
|
translations: e.translations
|
|
8414
8414
|
}, null, 8, ["variant", "start-hours", "start-minutes", "end-hours", "end-minutes", "translations"])) : _("", !0),
|
|
8415
8415
|
H.value ? (l(), j(nm, {
|
|
@@ -8442,34 +8442,34 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
8442
8442
|
},
|
|
8443
8443
|
emits: ["update:modelValue", "change"],
|
|
8444
8444
|
setup(e, { emit: a }) {
|
|
8445
|
-
const t = e, n = a, o =
|
|
8446
|
-
const
|
|
8447
|
-
return Nc(t.modelValue, t.variant,
|
|
8445
|
+
const t = e, n = a, o = w(null), i = w(null), r = w(!1), s = w({}), u = w(null), m = f(() => {
|
|
8446
|
+
const M = Ue[t.locale].dateFnsLocale;
|
|
8447
|
+
return Nc(t.modelValue, t.variant, M);
|
|
8448
8448
|
}), c = async () => {
|
|
8449
|
-
r.value = !r.value, r.value ? (await ke(), W(), await ke(), W(), window.addEventListener("scroll", W, !0), window.addEventListener("resize", W), document.addEventListener("mousedown", v, !0), document.addEventListener("click",
|
|
8449
|
+
r.value = !r.value, r.value ? (await ke(), W(), await ke(), W(), window.addEventListener("scroll", W, !0), window.addEventListener("resize", W), document.addEventListener("mousedown", v, !0), document.addEventListener("click", x, !0), document.addEventListener("keydown", p)) : T();
|
|
8450
8450
|
}, h = () => {
|
|
8451
8451
|
if (r.value = !1, T(), o.value) {
|
|
8452
|
-
const
|
|
8453
|
-
|
|
8452
|
+
const M = o.value.querySelector("button, [tabindex]");
|
|
8453
|
+
M instanceof HTMLElement && M.blur();
|
|
8454
8454
|
}
|
|
8455
|
-
},
|
|
8456
|
-
|
|
8457
|
-
},
|
|
8458
|
-
n("update:modelValue",
|
|
8459
|
-
},
|
|
8460
|
-
t.variant === "single" && (n("update:modelValue",
|
|
8461
|
-
}, v = (
|
|
8462
|
-
u.value =
|
|
8463
|
-
},
|
|
8464
|
-
const
|
|
8465
|
-
u.value && b(u.value) && b(
|
|
8455
|
+
}, p = (M) => {
|
|
8456
|
+
M.key === "Escape" && h();
|
|
8457
|
+
}, k = (M) => {
|
|
8458
|
+
n("update:modelValue", M), n("change", M), h();
|
|
8459
|
+
}, g = (M) => {
|
|
8460
|
+
t.variant === "single" && (n("update:modelValue", M), n("change", M), h());
|
|
8461
|
+
}, v = (M) => {
|
|
8462
|
+
u.value = M.target;
|
|
8463
|
+
}, x = (M) => {
|
|
8464
|
+
const $ = M.target, b = (D) => !!o.value && !!i.value && !o.value.contains(D) && !i.value.contains(D);
|
|
8465
|
+
u.value && b(u.value) && b($) && h(), u.value = null;
|
|
8466
8466
|
}, T = () => {
|
|
8467
|
-
window.removeEventListener("scroll", W, !0), window.removeEventListener("resize", W), document.removeEventListener("mousedown", v, !0), document.removeEventListener("click",
|
|
8467
|
+
window.removeEventListener("scroll", W, !0), window.removeEventListener("resize", W), document.removeEventListener("mousedown", v, !0), document.removeEventListener("click", x, !0), document.removeEventListener("keydown", p);
|
|
8468
8468
|
}, W = () => {
|
|
8469
8469
|
if (!o.value || !i.value) return;
|
|
8470
|
-
const
|
|
8471
|
-
let H =
|
|
8472
|
-
H +
|
|
8470
|
+
const M = o.value.getBoundingClientRect(), $ = i.value.getBoundingClientRect(), b = window.innerHeight, D = window.innerWidth, z = 8;
|
|
8471
|
+
let H = M.bottom + z, Z = M.left;
|
|
8472
|
+
H + $.height > b - 10 && (H = M.top - $.height - z), Z = Math.max(10, Math.min(Z, D - $.width - 10)), H = Math.max(10, H), s.value = {
|
|
8473
8473
|
position: "fixed",
|
|
8474
8474
|
top: `${H}px`,
|
|
8475
8475
|
left: `${Z}px`,
|
|
@@ -8478,18 +8478,18 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
8478
8478
|
};
|
|
8479
8479
|
return wt(() => {
|
|
8480
8480
|
T();
|
|
8481
|
-
}), (
|
|
8481
|
+
}), (M, $) => (l(), d("div", {
|
|
8482
8482
|
ref_key: "triggerRef",
|
|
8483
8483
|
ref: o,
|
|
8484
8484
|
class: ne(["toolkit-datepicker-wrapper", { "toolkit-datepicker-wrapper--full-width": e.fullWidth }])
|
|
8485
8485
|
}, [
|
|
8486
|
-
e.label ||
|
|
8487
|
-
Pe(
|
|
8486
|
+
e.label || M.$slots.label ? (l(), d("div", bm, [
|
|
8487
|
+
Pe(M.$slots, "label", {}, () => [
|
|
8488
8488
|
ot(A(e.label), 1)
|
|
8489
8489
|
])
|
|
8490
8490
|
])) : _("", !0),
|
|
8491
|
-
|
|
8492
|
-
Pe(
|
|
8491
|
+
y("div", { onClick: c }, [
|
|
8492
|
+
Pe(M.$slots, "trigger", { isOpen: r.value }, () => [
|
|
8493
8493
|
C(be, {
|
|
8494
8494
|
label: m.value || e.placeholder,
|
|
8495
8495
|
type: "secondary",
|
|
@@ -8516,9 +8516,9 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
8516
8516
|
locale: e.locale,
|
|
8517
8517
|
translations: e.translations,
|
|
8518
8518
|
timezone: e.timezone,
|
|
8519
|
-
onApply:
|
|
8519
|
+
onApply: k,
|
|
8520
8520
|
onCancel: h,
|
|
8521
|
-
"onUpdate:modelValue":
|
|
8521
|
+
"onUpdate:modelValue": g
|
|
8522
8522
|
}, null, 8, ["variant", "model-value", "is-extended", "min-date", "max-date", "locale", "translations", "timezone"])
|
|
8523
8523
|
], 4)) : _("", !0)
|
|
8524
8524
|
]),
|
|
@@ -8560,7 +8560,7 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
8560
8560
|
setup(e, { expose: a }) {
|
|
8561
8561
|
const t = e, n = f(
|
|
8562
8562
|
() => Array.isArray(t.modelValue) ? t.modelValue : []
|
|
8563
|
-
), o = (r) => t.getTagLeadingIcon(r) || "", i =
|
|
8563
|
+
), o = (r) => t.getTagLeadingIcon(r) || "", i = w(null);
|
|
8564
8564
|
return a({ triggerRef: i }), (r, s) => (l(), d("div", {
|
|
8565
8565
|
ref_key: "triggerRef",
|
|
8566
8566
|
ref: i,
|
|
@@ -8577,13 +8577,13 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
8577
8577
|
"aria-haspopup": !0,
|
|
8578
8578
|
"aria-label": e.label || e.placeholder
|
|
8579
8579
|
}, [
|
|
8580
|
-
|
|
8580
|
+
y("div", wm, [
|
|
8581
8581
|
e.isMulti && e.hasValue ? (l(), d("div", km, [
|
|
8582
8582
|
(l(!0), d(le, null, Ie(n.value, (u, m) => (l(), d("div", {
|
|
8583
8583
|
key: e.getTagKey(u, m),
|
|
8584
8584
|
class: "toolkit-dropdown__tag"
|
|
8585
8585
|
}, [
|
|
8586
|
-
|
|
8586
|
+
y("div", Mm, [
|
|
8587
8587
|
e.getTagAvatar(u) ? (l(), j(Ut, {
|
|
8588
8588
|
key: 0,
|
|
8589
8589
|
user: e.getTagAvatar(u),
|
|
@@ -8595,9 +8595,9 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
8595
8595
|
size: "12",
|
|
8596
8596
|
class: "toolkit-dropdown__tag-icon"
|
|
8597
8597
|
}, null, 8, ["icon"])) : _("", !0),
|
|
8598
|
-
|
|
8598
|
+
y("span", xm, A(e.getTagLabel(u)), 1)
|
|
8599
8599
|
]),
|
|
8600
|
-
|
|
8600
|
+
y("button", {
|
|
8601
8601
|
type: "button",
|
|
8602
8602
|
class: "toolkit-dropdown__tag-remove",
|
|
8603
8603
|
onClick: ve((c) => r.$emit("removeTag", u), ["stop"]),
|
|
@@ -8621,7 +8621,7 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
8621
8621
|
size: "16",
|
|
8622
8622
|
class: "toolkit-dropdown__selected-icon"
|
|
8623
8623
|
}, null, 8, ["icon"])) : _("", !0),
|
|
8624
|
-
|
|
8624
|
+
y("span", Tm, A(e.displayValue), 1)
|
|
8625
8625
|
])) : (l(), d("span", Dm, A(e.placeholder), 1))
|
|
8626
8626
|
]),
|
|
8627
8627
|
e.clearable && e.hasValue && !e.disabled ? (l(), d("button", {
|
|
@@ -8673,7 +8673,7 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
8673
8673
|
role: "option",
|
|
8674
8674
|
"aria-selected": e.isSelected
|
|
8675
8675
|
}, [
|
|
8676
|
-
|
|
8676
|
+
y("div", Wm, [
|
|
8677
8677
|
e.isMulti ? (l(), d("div", {
|
|
8678
8678
|
key: 0,
|
|
8679
8679
|
onClick: t[1] || (t[1] = ve(() => {
|
|
@@ -8699,7 +8699,7 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
8699
8699
|
size: "16",
|
|
8700
8700
|
class: "toolkit-dropdown__option-leading-icon"
|
|
8701
8701
|
}, null, 8, ["icon"])) : _("", !0),
|
|
8702
|
-
|
|
8702
|
+
y("span", Sm, A(e.label), 1),
|
|
8703
8703
|
e.trailingIcon ? (l(), j(de, {
|
|
8704
8704
|
key: 3,
|
|
8705
8705
|
icon: e.trailingIcon,
|
|
@@ -8752,7 +8752,7 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
8752
8752
|
},
|
|
8753
8753
|
emits: ["close", "selectFirstFiltered", "selectHighlighted", "navigateDown", "navigateUp", "selectAll", "clearAll", "selectOption", "setHighlighted", "checkboxChange", "update:searchQuery"],
|
|
8754
8754
|
setup(e, { expose: a }) {
|
|
8755
|
-
const t = (s) => typeof s == "object" && s !== null && "children" in s && Array.isArray(s.children), n = (s) => s.children || [], o =
|
|
8755
|
+
const t = (s) => typeof s == "object" && s !== null && "children" in s && Array.isArray(s.children), n = (s) => s.children || [], o = w(null), i = w(null), r = w(null);
|
|
8756
8756
|
return a({ dropdownRef: o, optionsRef: i, searchRef: r }), (s, u) => (l(), j(Fe, { to: "body" }, [
|
|
8757
8757
|
e.isOpen ? (l(), d("div", {
|
|
8758
8758
|
key: 0,
|
|
@@ -8812,7 +8812,7 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
8812
8812
|
onClick: u[6] || (u[6] = (m) => s.$emit("clearAll"))
|
|
8813
8813
|
}, null, 8, ["label"])
|
|
8814
8814
|
])) : _("", !0),
|
|
8815
|
-
|
|
8815
|
+
y("div", {
|
|
8816
8816
|
ref_key: "optionsRef",
|
|
8817
8817
|
ref: i,
|
|
8818
8818
|
class: "toolkit-dropdown__options"
|
|
@@ -8821,7 +8821,7 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
8821
8821
|
key: t(m) ? `group-${e.getOptionKey(m)}` : e.getOptionKey(m)
|
|
8822
8822
|
}, [
|
|
8823
8823
|
t(m) && n(m).length > 0 ? (l(), d(le, { key: 0 }, [
|
|
8824
|
-
|
|
8824
|
+
y("div", Vm, A(e.getOptionLabel(m)), 1),
|
|
8825
8825
|
(l(!0), d(le, null, Ie(n(m), (c) => (l(), j(Zt, {
|
|
8826
8826
|
key: e.getOptionKey(c),
|
|
8827
8827
|
option: c,
|
|
@@ -8836,7 +8836,7 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
8836
8836
|
leadingIcon: e.getOptionLeadingIcon(c),
|
|
8837
8837
|
trailingIcon: e.getOptionTrailingIcon(c),
|
|
8838
8838
|
onSelect: u[7] || (u[7] = (h) => s.$emit("selectOption", h)),
|
|
8839
|
-
onCheckboxChange: (h,
|
|
8839
|
+
onCheckboxChange: (h, p) => s.$emit("checkboxChange", h, p)
|
|
8840
8840
|
}, null, 8, ["option", "label", "isMulti", "isSelected", "isHighlighted", "isDisabled", "isClickable", "avatar", "avatarAlt", "leadingIcon", "trailingIcon", "onCheckboxChange"]))), 128))
|
|
8841
8841
|
], 64)) : t(m) ? _("", !0) : (l(), j(Zt, {
|
|
8842
8842
|
key: 1,
|
|
@@ -8893,114 +8893,114 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
8893
8893
|
},
|
|
8894
8894
|
emits: ["update:modelValue", "change", "open", "close", "search"],
|
|
8895
8895
|
setup(e, { emit: a }) {
|
|
8896
|
-
const t = e, n = a, o =
|
|
8896
|
+
const t = e, n = a, o = w(null), i = w(null), r = f(() => o.value?.triggerRef || null), s = f(() => i.value?.dropdownRef || null), u = f(() => i.value?.optionsRef || null), m = f(() => i.value?.searchRef || null), c = w(!1), h = w(""), p = w(-1), k = w({}), g = f(() => ({
|
|
8897
8897
|
"toolkit-dropdown--disabled": t.disabled,
|
|
8898
8898
|
"toolkit-dropdown--open": c.value,
|
|
8899
8899
|
"toolkit-dropdown--error": t.isError || t.errorMessage,
|
|
8900
8900
|
"toolkit-dropdown--full-width": t.fullWidth,
|
|
8901
8901
|
[`toolkit-dropdown--${t.size}`]: !0
|
|
8902
|
-
})), v = f(() => t.modelValue === null || t.modelValue === void 0 ? !1 : t.isMulti ? Array.isArray(t.modelValue) && t.modelValue.length > 0 : !0),
|
|
8902
|
+
})), v = f(() => t.modelValue === null || t.modelValue === void 0 ? !1 : t.isMulti ? Array.isArray(t.modelValue) && t.modelValue.length > 0 : !0), x = (P) => typeof P == "object" && P !== null && "children" in P && Array.isArray(P.children), T = (P) => P.children || [], W = f(() => {
|
|
8903
8903
|
if (!t.groupBy) return t.options;
|
|
8904
|
-
const
|
|
8904
|
+
const P = /* @__PURE__ */ new Map();
|
|
8905
8905
|
for (const V of t.options) {
|
|
8906
8906
|
const J = typeof V == "object" && V !== null ? String(V[t.groupBy] ?? "") : "";
|
|
8907
|
-
|
|
8907
|
+
P.has(J) || P.set(J, []), P.get(J).push(V);
|
|
8908
8908
|
}
|
|
8909
|
-
return Array.from(
|
|
8909
|
+
return Array.from(P.entries()).map(([V, J]) => ({
|
|
8910
8910
|
label: t.groupLabel?.[V] ?? V,
|
|
8911
8911
|
children: J
|
|
8912
8912
|
}));
|
|
8913
|
-
}), P = f(() => {
|
|
8914
|
-
const x = [];
|
|
8915
|
-
for (const V of W.value)
|
|
8916
|
-
$(V) ? x.push(...T(V)) : x.push(V);
|
|
8917
|
-
return x;
|
|
8918
8913
|
}), M = f(() => {
|
|
8914
|
+
const P = [];
|
|
8915
|
+
for (const V of W.value)
|
|
8916
|
+
x(V) ? P.push(...T(V)) : P.push(V);
|
|
8917
|
+
return P;
|
|
8918
|
+
}), $ = f(() => {
|
|
8919
8919
|
if (!t.searchable || !h.value)
|
|
8920
8920
|
return W.value;
|
|
8921
|
-
const
|
|
8921
|
+
const P = h.value.toLowerCase(), V = [];
|
|
8922
8922
|
for (const J of W.value)
|
|
8923
|
-
if (
|
|
8923
|
+
if (x(J)) {
|
|
8924
8924
|
const xe = T(J).filter(
|
|
8925
|
-
(Le) => B(Le).toLowerCase().includes(
|
|
8925
|
+
(Le) => B(Le).toLowerCase().includes(P)
|
|
8926
8926
|
);
|
|
8927
8927
|
xe.length > 0 && V.push({ ...J, children: xe });
|
|
8928
8928
|
} else
|
|
8929
|
-
B(J).toLowerCase().includes(
|
|
8929
|
+
B(J).toLowerCase().includes(P) && V.push(J);
|
|
8930
8930
|
return V;
|
|
8931
8931
|
}), b = f(() => {
|
|
8932
|
-
const
|
|
8933
|
-
for (const V of
|
|
8934
|
-
|
|
8935
|
-
return
|
|
8932
|
+
const P = [];
|
|
8933
|
+
for (const V of $.value)
|
|
8934
|
+
x(V) ? P.push(...T(V)) : P.push(V);
|
|
8935
|
+
return P;
|
|
8936
8936
|
}), D = f(() => {
|
|
8937
8937
|
if (!t.modelValue || t.isMulti) return "";
|
|
8938
|
-
const
|
|
8939
|
-
return
|
|
8938
|
+
const P = N(t.modelValue);
|
|
8939
|
+
return P ? B(P) : "";
|
|
8940
8940
|
}), z = f(() => !t.modelValue || t.isMulti ? null : N(t.modelValue) || null), H = f(() => z.value ? O(z.value) : null), Z = f(() => z.value ? ie(z.value) : null), me = f(() => {
|
|
8941
|
-
if (!t.isMulti || !Array.isArray(t.modelValue) ||
|
|
8941
|
+
if (!t.isMulti || !Array.isArray(t.modelValue) || M.value.length === 0)
|
|
8942
8942
|
return !1;
|
|
8943
|
-
const
|
|
8944
|
-
return
|
|
8943
|
+
const P = t.modelValue;
|
|
8944
|
+
return M.value.every((V) => {
|
|
8945
8945
|
const J = X(V);
|
|
8946
|
-
return
|
|
8946
|
+
return P.some((xe) => xe === J);
|
|
8947
8947
|
});
|
|
8948
|
-
}), B = (
|
|
8949
|
-
if (typeof
|
|
8950
|
-
const V = t.optionLabel, J =
|
|
8951
|
-
return V in J ? J[V] || "" : "label" in
|
|
8952
|
-
}, X = (
|
|
8953
|
-
if (typeof
|
|
8954
|
-
const V = t.optionValue, J =
|
|
8955
|
-
return V in J ? J[V] : "value" in
|
|
8956
|
-
}, R = (
|
|
8957
|
-
const V = X(
|
|
8948
|
+
}), B = (P) => {
|
|
8949
|
+
if (typeof P == "string" || typeof P == "number") return P.toString();
|
|
8950
|
+
const V = t.optionLabel, J = P;
|
|
8951
|
+
return V in J ? J[V] || "" : "label" in P ? P.label : P.toString();
|
|
8952
|
+
}, X = (P) => {
|
|
8953
|
+
if (typeof P == "string" || typeof P == "number") return P;
|
|
8954
|
+
const V = t.optionValue, J = P;
|
|
8955
|
+
return V in J ? J[V] : "value" in P ? P.value : P;
|
|
8956
|
+
}, R = (P) => {
|
|
8957
|
+
const V = X(P);
|
|
8958
8958
|
return typeof V == "object" ? JSON.stringify(V) : String(V);
|
|
8959
|
-
}, O = (
|
|
8960
|
-
if (typeof
|
|
8961
|
-
const V =
|
|
8959
|
+
}, O = (P) => {
|
|
8960
|
+
if (typeof P == "object" && P !== null && "avatar" in P) {
|
|
8961
|
+
const V = P.avatar;
|
|
8962
8962
|
if (V)
|
|
8963
8963
|
return {
|
|
8964
8964
|
photo: V.photo,
|
|
8965
8965
|
fullName: V.fullName
|
|
8966
8966
|
};
|
|
8967
8967
|
}
|
|
8968
|
-
}, E = (
|
|
8969
|
-
if (typeof
|
|
8970
|
-
return
|
|
8971
|
-
}, ie = (
|
|
8972
|
-
if (typeof
|
|
8973
|
-
return
|
|
8974
|
-
}, se = (
|
|
8975
|
-
if (typeof
|
|
8976
|
-
return
|
|
8977
|
-
}, F = (
|
|
8978
|
-
if (typeof
|
|
8979
|
-
return
|
|
8980
|
-
}, N = (
|
|
8981
|
-
const V = De(
|
|
8982
|
-
return
|
|
8983
|
-
}, U = (
|
|
8984
|
-
const V = N(
|
|
8985
|
-
return V ? B(V) : String(
|
|
8986
|
-
}, he = (
|
|
8987
|
-
const V = N(
|
|
8968
|
+
}, E = (P) => {
|
|
8969
|
+
if (typeof P == "object" && P !== null && "avatar" in P)
|
|
8970
|
+
return P.avatar?.alt;
|
|
8971
|
+
}, ie = (P) => {
|
|
8972
|
+
if (typeof P == "object" && P !== null && "leadingIcon" in P)
|
|
8973
|
+
return P.leadingIcon;
|
|
8974
|
+
}, se = (P) => {
|
|
8975
|
+
if (typeof P == "object" && P !== null && "trailingIcon" in P)
|
|
8976
|
+
return P.trailingIcon;
|
|
8977
|
+
}, F = (P) => typeof P == "object" && P !== null && "disabled" in P ? !!P.disabled : !1, fe = (P) => typeof P == "object" && P !== null && "clickable" in P ? !!P.clickable : !1, S = (P) => {
|
|
8978
|
+
if (typeof P == "object" && P !== null && "onClick" in P)
|
|
8979
|
+
return P.onClick;
|
|
8980
|
+
}, N = (P) => {
|
|
8981
|
+
const V = De(P);
|
|
8982
|
+
return M.value.find((J) => X(J) === V);
|
|
8983
|
+
}, U = (P) => {
|
|
8984
|
+
const V = N(P);
|
|
8985
|
+
return V ? B(V) : String(P);
|
|
8986
|
+
}, he = (P, V) => typeof P == "object" ? `${V}-${JSON.stringify(P)}` : `${V}-${String(P)}`, we = (P) => {
|
|
8987
|
+
const V = N(P);
|
|
8988
8988
|
return V ? O(V) : void 0;
|
|
8989
|
-
}, q = (
|
|
8990
|
-
const V = N(
|
|
8989
|
+
}, q = (P) => {
|
|
8990
|
+
const V = N(P);
|
|
8991
8991
|
return V ? ie(V) : void 0;
|
|
8992
8992
|
}, Q = {
|
|
8993
8993
|
"x-small": "xx-small",
|
|
8994
8994
|
small: "xx-small",
|
|
8995
8995
|
medium: "x-small",
|
|
8996
8996
|
large: "small"
|
|
8997
|
-
}, re = f(() => Q[t.size] ?? "xx-small"), pe = (
|
|
8997
|
+
}, re = f(() => Q[t.size] ?? "xx-small"), pe = (P) => {
|
|
8998
8998
|
if (t.disabled || !t.isMulti) return;
|
|
8999
|
-
const V = Array.isArray(t.modelValue) ? [...t.modelValue] : [], J = V.findIndex((xe) => xe ===
|
|
8999
|
+
const V = Array.isArray(t.modelValue) ? [...t.modelValue] : [], J = V.findIndex((xe) => xe === P);
|
|
9000
9000
|
J > -1 && (V.splice(J, 1), n("update:modelValue", V), n("change", V));
|
|
9001
|
-
}, _e = (
|
|
9002
|
-
if (F(
|
|
9003
|
-
const J = X(
|
|
9001
|
+
}, _e = (P, V) => {
|
|
9002
|
+
if (F(P)) return;
|
|
9003
|
+
const J = X(P), xe = Array.isArray(t.modelValue) ? [...t.modelValue] : [];
|
|
9004
9004
|
if (V)
|
|
9005
9005
|
xe.some((Le) => Le === J) || xe.push(J);
|
|
9006
9006
|
else {
|
|
@@ -9008,92 +9008,92 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
9008
9008
|
Le > -1 && xe.splice(Le, 1);
|
|
9009
9009
|
}
|
|
9010
9010
|
n("update:modelValue", xe), n("change", xe), ke(ee);
|
|
9011
|
-
}, qe = (
|
|
9011
|
+
}, qe = (P) => {
|
|
9012
9012
|
if (!(t.disabled || !t.isMulti)) {
|
|
9013
|
-
if (
|
|
9014
|
-
const V =
|
|
9013
|
+
if (P) {
|
|
9014
|
+
const V = M.value.map((xe) => X(xe)), J = Array.isArray(t.modelValue) ? [...t.modelValue] : [];
|
|
9015
9015
|
V.forEach((xe) => {
|
|
9016
9016
|
J.some((Le) => Le === xe) || J.push(xe);
|
|
9017
9017
|
}), n("update:modelValue", J), n("change", J);
|
|
9018
9018
|
} else {
|
|
9019
|
-
const V =
|
|
9019
|
+
const V = M.value.map((Le) => X(Le)), xe = (Array.isArray(t.modelValue) ? [...t.modelValue] : []).filter((Le) => !V.some((st) => st === Le));
|
|
9020
9020
|
n("update:modelValue", xe), n("change", xe);
|
|
9021
9021
|
}
|
|
9022
9022
|
ke(ee);
|
|
9023
9023
|
}
|
|
9024
9024
|
}, Ze = () => {
|
|
9025
9025
|
t.disabled || !t.isMulti || (n("update:modelValue", []), n("change", []), ke(ee));
|
|
9026
|
-
}, et = (
|
|
9027
|
-
const V = X(
|
|
9026
|
+
}, et = (P) => {
|
|
9027
|
+
const V = X(P);
|
|
9028
9028
|
return t.isMulti ? Array.isArray(t.modelValue) && t.modelValue.some((J) => J === V) : t.modelValue === V;
|
|
9029
|
-
}, Ge = (
|
|
9030
|
-
t.disabled || (c.value ? Re() : rt(
|
|
9031
|
-
}, rt = async (
|
|
9029
|
+
}, Ge = (P) => {
|
|
9030
|
+
t.disabled || (c.value ? Re() : rt(P));
|
|
9031
|
+
}, rt = async (P) => {
|
|
9032
9032
|
if (!t.disabled) {
|
|
9033
|
-
if (c.value = !0, n("open"), !t.isMulti &&
|
|
9033
|
+
if (c.value = !0, n("open"), !t.isMulti && P === "enter") {
|
|
9034
9034
|
const V = b.value.findIndex(
|
|
9035
9035
|
(J) => X(J) === t.modelValue
|
|
9036
9036
|
);
|
|
9037
|
-
|
|
9037
|
+
p.value = V >= 0 ? V : 0;
|
|
9038
9038
|
}
|
|
9039
9039
|
await ke(), ee(), await ke(), ee(), t.searchable ? m.value?.focus() : s.value?.focus();
|
|
9040
9040
|
}
|
|
9041
9041
|
}, Re = () => {
|
|
9042
|
-
c.value = !1, h.value = "",
|
|
9043
|
-
}, Ct = (
|
|
9044
|
-
if (
|
|
9042
|
+
c.value = !1, h.value = "", p.value = -1, n("close");
|
|
9043
|
+
}, Ct = (P) => {
|
|
9044
|
+
if (P.stopPropagation(), t.disabled) return;
|
|
9045
9045
|
const V = t.isMulti ? [] : null;
|
|
9046
9046
|
n("update:modelValue", V), n("change", V), Re();
|
|
9047
|
-
}, tt = (
|
|
9048
|
-
if (F(
|
|
9049
|
-
if (fe(
|
|
9050
|
-
S(
|
|
9047
|
+
}, tt = (P) => {
|
|
9048
|
+
if (F(P)) return;
|
|
9049
|
+
if (fe(P)) {
|
|
9050
|
+
S(P)?.();
|
|
9051
9051
|
return;
|
|
9052
9052
|
}
|
|
9053
|
-
const V = X(
|
|
9053
|
+
const V = X(P);
|
|
9054
9054
|
if (t.isMulti) {
|
|
9055
9055
|
const J = Array.isArray(t.modelValue) ? [...t.modelValue] : [], xe = J.findIndex((Le) => Le === V);
|
|
9056
9056
|
xe > -1 ? J.splice(xe, 1) : J.push(V), n("update:modelValue", J), n("change", J), ke(ee);
|
|
9057
9057
|
} else
|
|
9058
9058
|
n("update:modelValue", V), n("change", V), Re();
|
|
9059
9059
|
}, Wt = () => {
|
|
9060
|
-
const
|
|
9061
|
-
|
|
9060
|
+
const P = p.value >= 0 ? b.value[p.value] : b.value[0];
|
|
9061
|
+
P && tt(P);
|
|
9062
9062
|
}, St = () => {
|
|
9063
|
-
|
|
9063
|
+
p.value < b.value.length - 1 && (p.value++, G());
|
|
9064
9064
|
}, I = () => {
|
|
9065
|
-
|
|
9065
|
+
p.value > 0 && (p.value--, G());
|
|
9066
9066
|
}, G = () => {
|
|
9067
|
-
if (!u.value ||
|
|
9067
|
+
if (!u.value || p.value < 0) return;
|
|
9068
9068
|
u.value.querySelector(
|
|
9069
9069
|
".toolkit-dropdown__option--highlighted"
|
|
9070
9070
|
)?.scrollIntoView({ block: "nearest" });
|
|
9071
9071
|
}, ee = () => {
|
|
9072
9072
|
if (!r.value || !s.value) return;
|
|
9073
|
-
const
|
|
9074
|
-
if (
|
|
9073
|
+
const P = r.value.getBoundingClientRect(), V = window.innerHeight, J = window.innerWidth, xe = t.searchable ? 0 : 40, Le = parseInt(t.maxHeight) - xe;
|
|
9074
|
+
if (P.width === 0 || P.height === 0) {
|
|
9075
9075
|
setTimeout(ee, 10);
|
|
9076
9076
|
return;
|
|
9077
9077
|
}
|
|
9078
|
-
const st = V -
|
|
9078
|
+
const st = V - P.bottom - 20, Lt = P.top - 20, At = st < 150 && Lt > st, na = (t.searchable ? 44 : 0) + 40 + 16, Rt = Math.max(na, Math.min(Le, At ? Lt : st)), Ht = Math.max(Nm, P.width), oa = s.value?.offsetWidth ?? Ht, Bt = Math.max(
|
|
9079
9079
|
10,
|
|
9080
|
-
Math.min(
|
|
9080
|
+
Math.min(P.left, J - oa - 10)
|
|
9081
9081
|
);
|
|
9082
|
-
|
|
9082
|
+
k.value = {
|
|
9083
9083
|
position: "fixed",
|
|
9084
9084
|
left: `${Bt}px`,
|
|
9085
9085
|
minWidth: `${Ht}px`,
|
|
9086
9086
|
maxWidth: "250px",
|
|
9087
9087
|
maxHeight: `${Rt}px`,
|
|
9088
9088
|
zIndex: 9999,
|
|
9089
|
-
...At ? { bottom: `${V -
|
|
9089
|
+
...At ? { bottom: `${V - P.top}px` } : { top: `${P.bottom}px` }
|
|
9090
9090
|
};
|
|
9091
|
-
}, Xe = (
|
|
9092
|
-
const V =
|
|
9091
|
+
}, Xe = (P) => {
|
|
9092
|
+
const V = P.target, J = V.closest(".toolkit-input__clear"), xe = V.closest(".toolkit-input");
|
|
9093
9093
|
c.value && r.value && s.value && !r.value.contains(V) && !s.value.contains(V) && !J && !xe && Re();
|
|
9094
9094
|
};
|
|
9095
|
-
Se(h, (
|
|
9096
|
-
|
|
9095
|
+
Se(h, (P) => {
|
|
9096
|
+
p.value = -1, n("search", P);
|
|
9097
9097
|
});
|
|
9098
9098
|
let Qe = null, He = null;
|
|
9099
9099
|
const lt = () => {
|
|
@@ -9101,17 +9101,17 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
9101
9101
|
He = null, ee();
|
|
9102
9102
|
}));
|
|
9103
9103
|
};
|
|
9104
|
-
return Se(c, (
|
|
9105
|
-
|
|
9104
|
+
return Se(c, (P) => {
|
|
9105
|
+
P ? (window.addEventListener("resize", ee), window.addEventListener("scroll", ee, !0), Qe = new MutationObserver(lt), Qe.observe(document.body, { childList: !0, subtree: !0 }), setTimeout(ee, 0)) : (window.removeEventListener("resize", ee), window.removeEventListener("scroll", ee, !0), Qe?.disconnect(), Qe = null, He !== null && (cancelAnimationFrame(He), He = null));
|
|
9106
9106
|
}), ct(() => {
|
|
9107
9107
|
document.addEventListener("click", Xe);
|
|
9108
9108
|
}), wt(() => {
|
|
9109
9109
|
document.removeEventListener("click", Xe), window.removeEventListener("resize", ee), window.removeEventListener("scroll", ee, !0), Qe?.disconnect();
|
|
9110
|
-
}), (
|
|
9111
|
-
class: ne(["toolkit-dropdown",
|
|
9110
|
+
}), (P, V) => (l(), d("div", {
|
|
9111
|
+
class: ne(["toolkit-dropdown", g.value])
|
|
9112
9112
|
}, [
|
|
9113
|
-
e.label ||
|
|
9114
|
-
Pe(
|
|
9113
|
+
e.label || P.$slots.label ? (l(), d("div", Lm, [
|
|
9114
|
+
Pe(P.$slots, "label", {}, () => [
|
|
9115
9115
|
ot(A(e.label), 1)
|
|
9116
9116
|
])
|
|
9117
9117
|
])) : _("", !0),
|
|
@@ -9143,7 +9143,7 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
9143
9143
|
ref_key: "dropdownMenuRef",
|
|
9144
9144
|
ref: i,
|
|
9145
9145
|
isOpen: c.value,
|
|
9146
|
-
dropdownStyle:
|
|
9146
|
+
dropdownStyle: k.value,
|
|
9147
9147
|
isMulti: e.isMulti,
|
|
9148
9148
|
searchable: e.searchable,
|
|
9149
9149
|
searchPlaceholder: e.searchPlaceholder,
|
|
@@ -9151,9 +9151,9 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
9151
9151
|
selectAllText: e.selectAllText,
|
|
9152
9152
|
clearAllText: e.clearAllText,
|
|
9153
9153
|
areAllOptionsSelected: me.value,
|
|
9154
|
-
filteredOptions:
|
|
9154
|
+
filteredOptions: $.value,
|
|
9155
9155
|
navigableOptions: b.value,
|
|
9156
|
-
highlightedIndex:
|
|
9156
|
+
highlightedIndex: p.value,
|
|
9157
9157
|
noOptionsText: e.noOptionsText,
|
|
9158
9158
|
optionLabel: e.optionLabel,
|
|
9159
9159
|
optionValue: e.optionValue,
|
|
@@ -9173,7 +9173,7 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
9173
9173
|
onSelectAll: qe,
|
|
9174
9174
|
onClearAll: Ze,
|
|
9175
9175
|
onSelectOption: tt,
|
|
9176
|
-
onSetHighlighted: V[0] || (V[0] = (J) =>
|
|
9176
|
+
onSetHighlighted: V[0] || (V[0] = (J) => p.value = J),
|
|
9177
9177
|
onCheckboxChange: _e,
|
|
9178
9178
|
"onUpdate:searchQuery": V[1] || (V[1] = (J) => h.value = J)
|
|
9179
9179
|
}, null, 8, ["isOpen", "dropdownStyle", "isMulti", "searchable", "searchPlaceholder", "searchQuery", "selectAllText", "clearAllText", "areAllOptionsSelected", "filteredOptions", "navigableOptions", "highlightedIndex", "noOptionsText", "optionLabel", "optionValue"]),
|
|
@@ -9191,7 +9191,7 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
9191
9191
|
},
|
|
9192
9192
|
emits: ["remove"],
|
|
9193
9193
|
setup(e, { expose: a }) {
|
|
9194
|
-
const t = e, n =
|
|
9194
|
+
const t = e, n = w(null), o = f(() => [
|
|
9195
9195
|
"toolkit-filter-btn-trigger",
|
|
9196
9196
|
`toolkit-filter-btn-trigger--${t.size}`,
|
|
9197
9197
|
{ "toolkit-filter-btn-trigger--open": t.isOpen }
|
|
@@ -9204,8 +9204,8 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
9204
9204
|
class: o.value,
|
|
9205
9205
|
disabled: e.disabled
|
|
9206
9206
|
}, r.$attrs), [
|
|
9207
|
-
|
|
9208
|
-
|
|
9207
|
+
y("div", Hm, A(e.filterName), 1),
|
|
9208
|
+
y("div", {
|
|
9209
9209
|
class: ne(["toolkit-filter-btn-count", { "toolkit-filter-btn-count--active": e.selectedCount > 0 }])
|
|
9210
9210
|
}, A(i.value), 3),
|
|
9211
9211
|
e.selectedCount > 0 ? (l(), j(de, {
|
|
@@ -9248,7 +9248,7 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
9248
9248
|
class: ne(i.value),
|
|
9249
9249
|
for: o.value
|
|
9250
9250
|
}, [
|
|
9251
|
-
|
|
9251
|
+
y("input", {
|
|
9252
9252
|
id: o.value,
|
|
9253
9253
|
type: "radio",
|
|
9254
9254
|
name: e.name,
|
|
@@ -9258,7 +9258,7 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
9258
9258
|
class: "toolkit-radio__input",
|
|
9259
9259
|
onChange: r
|
|
9260
9260
|
}, null, 40, Ym),
|
|
9261
|
-
|
|
9261
|
+
y("span", jm, [
|
|
9262
9262
|
e.checked ? (l(), d("span", qm)) : _("", !0)
|
|
9263
9263
|
]),
|
|
9264
9264
|
e.label ? (l(), d("span", Gm, A(e.label), 1)) : _("", !0)
|
|
@@ -9306,11 +9306,11 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
9306
9306
|
// LIST_SINGLE_OPTION intentionally absent — empty value depends on forceSingle:
|
|
9307
9307
|
// forceSingle=false → multi-select → [], forceSingle=true → single-select → null
|
|
9308
9308
|
BOOLEAN: null
|
|
9309
|
-
}, o = e, i = a, r =
|
|
9310
|
-
() => s.value?.dropdownRef || u.value || m.value || c.value || h.value ||
|
|
9311
|
-
),
|
|
9309
|
+
}, o = e, i = a, r = w(null), s = w(null), u = w(null), m = w(null), c = w(null), h = w(null), p = w(null), k = w(null), g = f(() => r.value?.triggerRef || null), v = f(
|
|
9310
|
+
() => s.value?.dropdownRef || u.value || m.value || c.value || h.value || p.value || null
|
|
9311
|
+
), x = f(() => s.value?.optionsRef || null), T = f(() => s.value?.searchRef || null), W = w(!1), M = w(!1), $ = w(""), b = w(-1), D = w({}), z = w(null), H = w(null), Z = w(""), me = w(""), B = w(""), X = w(""), R = w("");
|
|
9312
9312
|
let O = null;
|
|
9313
|
-
const E =
|
|
9313
|
+
const E = w(null), ie = w(null), se = f(() => o.filterConfig?.type ?? "LIST_MULTI_OPTION"), F = f(
|
|
9314
9314
|
() => !o.forceSingle && (se.value === "LIST_MULTI_OPTION" || se.value === "LIST_SINGLE_OPTION")
|
|
9315
9315
|
), fe = f(() => se.value === "NUMERIC_RANGE"), S = f(() => se.value === "BOOLEAN"), N = f(() => se.value === "TEXT"), U = f(
|
|
9316
9316
|
() => se.value === "DATE_RANGE" && !!o.filterConfig?.options.use_selector && (o.filterConfig?.options.rendering.collection.length ?? 0) > 0
|
|
@@ -9362,8 +9362,8 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
9362
9362
|
const Y = Re(L);
|
|
9363
9363
|
return F.value ? (Array.isArray(E.value) ? E.value : []).some((Te) => Te != null && String(Te) === Y) : E.value != null && String(E.value) === Y;
|
|
9364
9364
|
}, tt = f(() => {
|
|
9365
|
-
if (
|
|
9366
|
-
const L =
|
|
9365
|
+
if (!$.value) return et.value;
|
|
9366
|
+
const L = $.value.toLowerCase();
|
|
9367
9367
|
return et.value.filter(
|
|
9368
9368
|
(Y) => rt(Y).toLowerCase().includes(L)
|
|
9369
9369
|
);
|
|
@@ -9375,7 +9375,7 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
9375
9375
|
return L.some((Te) => Te != null && String(Te) === ue);
|
|
9376
9376
|
});
|
|
9377
9377
|
}), St = () => {
|
|
9378
|
-
o.disabled || (
|
|
9378
|
+
o.disabled || (M.value ? G() : I());
|
|
9379
9379
|
}, I = async () => {
|
|
9380
9380
|
if (o.disabled) return;
|
|
9381
9381
|
if (fe.value) {
|
|
@@ -9385,7 +9385,7 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
9385
9385
|
const Y = o.modelValue;
|
|
9386
9386
|
B.value = Y?.time_minimal_value ?? "", X.value = Y?.time_maximal_value ?? "";
|
|
9387
9387
|
} else S.value ? ie.value = o.modelValue != null ? String(o.modelValue) : null : N.value ? R.value = String(o.modelValue ?? "") : Q.value && (E.value = F.value ? Array.isArray(o.modelValue) ? [...o.modelValue] : [] : o.modelValue ?? null);
|
|
9388
|
-
const L =
|
|
9388
|
+
const L = g.value?.getBoundingClientRect();
|
|
9389
9389
|
if (he.value)
|
|
9390
9390
|
D.value = { position: "fixed", zIndex: 9999, visibility: "hidden" };
|
|
9391
9391
|
else if (L) {
|
|
@@ -9398,17 +9398,17 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
9398
9398
|
minWidth: `${Math.max(en, L.width)}px`
|
|
9399
9399
|
};
|
|
9400
9400
|
}
|
|
9401
|
-
|
|
9401
|
+
M.value = !0, i("open"), await ke(), he.value ? requestAnimationFrame(() => {
|
|
9402
9402
|
W.value && (He(), setTimeout(() => {
|
|
9403
9403
|
W.value && c.value?.querySelector("button, [tabindex]")?.focus();
|
|
9404
9404
|
}, 0));
|
|
9405
9405
|
}) : requestAnimationFrame(() => {
|
|
9406
9406
|
W.value && (He(), setTimeout(() => {
|
|
9407
|
-
W.value && (Q.value ? T.value?.focus() : fe.value ?
|
|
9407
|
+
W.value && (Q.value ? T.value?.focus() : fe.value ? k.value?.focus() : S.value ? m.value?.querySelector("input")?.focus() : we.value ? h.value?.querySelector("input")?.focus() : N.value && p.value?.querySelector("input")?.focus());
|
|
9408
9408
|
}, 0));
|
|
9409
9409
|
});
|
|
9410
9410
|
}, G = () => {
|
|
9411
|
-
if (
|
|
9411
|
+
if (M.value) {
|
|
9412
9412
|
if (fe.value && J(
|
|
9413
9413
|
V(Z.value, pe.value, _e.value),
|
|
9414
9414
|
V(me.value, pe.value, _e.value)
|
|
@@ -9419,20 +9419,20 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
9419
9419
|
};
|
|
9420
9420
|
i("update:modelValue", L), i("change", L);
|
|
9421
9421
|
}
|
|
9422
|
-
S.value && (i("update:modelValue", ie.value), i("change", ie.value)), Q.value && (i("update:modelValue", E.value), i("change", E.value)),
|
|
9422
|
+
S.value && (i("update:modelValue", ie.value), i("change", ie.value)), Q.value && (i("update:modelValue", E.value), i("change", E.value)), M.value = !1, $.value = "", b.value = -1, i("close");
|
|
9423
9423
|
}
|
|
9424
9424
|
}, ee = () => {
|
|
9425
9425
|
b.value < tt.value.length - 1 && (b.value++, Qe());
|
|
9426
9426
|
}, Xe = () => {
|
|
9427
9427
|
b.value > 0 && (b.value--, Qe());
|
|
9428
9428
|
}, Qe = () => {
|
|
9429
|
-
if (
|
|
9430
|
-
|
|
9429
|
+
if (!x.value || b.value < 0) return;
|
|
9430
|
+
x.value.children[b.value]?.scrollIntoView({ block: "nearest" });
|
|
9431
9431
|
}, He = () => {
|
|
9432
|
-
if (!
|
|
9432
|
+
if (!g.value) return;
|
|
9433
9433
|
const L = v.value;
|
|
9434
9434
|
if (!L) return;
|
|
9435
|
-
const Y =
|
|
9435
|
+
const Y = g.value.getBoundingClientRect(), ue = window.innerHeight, Te = window.innerWidth, je = fe.value || we.value || S.value || N.value, ht = je ? af : tf;
|
|
9436
9436
|
if (Y.width === 0 || Y.height === 0) {
|
|
9437
9437
|
setTimeout(() => {
|
|
9438
9438
|
W.value && He();
|
|
@@ -9480,8 +9480,8 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
9480
9480
|
On.length === Ca.length && Ca.every((vt) => Da[vt] === _a[vt]) || (D.value = Ft);
|
|
9481
9481
|
}, lt = (L) => {
|
|
9482
9482
|
b.value = L;
|
|
9483
|
-
},
|
|
9484
|
-
|
|
9483
|
+
}, P = (L) => {
|
|
9484
|
+
$.value = L;
|
|
9485
9485
|
}, V = (L, Y, ue) => {
|
|
9486
9486
|
if (L === "") return null;
|
|
9487
9487
|
const Te = Number(L);
|
|
@@ -9530,11 +9530,11 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
9530
9530
|
}, $a = () => {
|
|
9531
9531
|
Rt(), G(), i("remove");
|
|
9532
9532
|
}, Rt = () => {
|
|
9533
|
-
if (S.value &&
|
|
9533
|
+
if (S.value && M.value) {
|
|
9534
9534
|
ie.value = null, G();
|
|
9535
9535
|
return;
|
|
9536
9536
|
}
|
|
9537
|
-
if (Q.value &&
|
|
9537
|
+
if (Q.value && M.value) {
|
|
9538
9538
|
const ue = F.value ? [] : null;
|
|
9539
9539
|
E.value = ue, i("update:modelValue", ue), i("change", ue);
|
|
9540
9540
|
return;
|
|
@@ -9548,13 +9548,13 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
9548
9548
|
const L = tt.value[b.value];
|
|
9549
9549
|
L && Nt(L);
|
|
9550
9550
|
}, Bt = (L) => {
|
|
9551
|
-
if (!
|
|
9551
|
+
if (!M.value) return;
|
|
9552
9552
|
const Y = L.composedPath();
|
|
9553
|
-
|
|
9553
|
+
g.value && Y.includes(g.value) || v.value && Y.includes(v.value) || G();
|
|
9554
9554
|
}, Pa = () => {
|
|
9555
|
-
|
|
9555
|
+
M.value && He();
|
|
9556
9556
|
}, Ta = () => {
|
|
9557
|
-
|
|
9557
|
+
M.value && He();
|
|
9558
9558
|
};
|
|
9559
9559
|
let zt = null, mt = null;
|
|
9560
9560
|
const Cn = () => {
|
|
@@ -9562,7 +9562,7 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
9562
9562
|
mt = null, He();
|
|
9563
9563
|
}));
|
|
9564
9564
|
};
|
|
9565
|
-
return Se(
|
|
9565
|
+
return Se(M, (L) => {
|
|
9566
9566
|
L ? (zt = new MutationObserver(Cn), zt.observe(document.body, { childList: !0, subtree: !0 })) : (zt?.disconnect(), zt = null, mt !== null && (cancelAnimationFrame(mt), mt = null));
|
|
9567
9567
|
}), ct(() => {
|
|
9568
9568
|
W.value = !0, document.addEventListener("click", Bt), window.addEventListener("resize", Pa), window.addEventListener("scroll", Ta, { capture: !0, passive: !0 }), o.initialOpen && setTimeout(() => I(), 0);
|
|
@@ -9578,14 +9578,14 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
9578
9578
|
selectedCount: Ge.value,
|
|
9579
9579
|
size: e.size,
|
|
9580
9580
|
disabled: e.disabled,
|
|
9581
|
-
isOpen:
|
|
9582
|
-
"aria-expanded":
|
|
9581
|
+
isOpen: M.value,
|
|
9582
|
+
"aria-expanded": M.value,
|
|
9583
9583
|
"aria-haspopup": Q.value ? "listbox" : "dialog",
|
|
9584
9584
|
onClick: St,
|
|
9585
9585
|
onRemove: $a
|
|
9586
9586
|
}, null, 8, ["filterName", "selectedCount", "size", "disabled", "isOpen", "aria-expanded", "aria-haspopup"]),
|
|
9587
9587
|
(l(), j(Fe, { to: "body" }, [
|
|
9588
|
-
S.value &&
|
|
9588
|
+
S.value && M.value ? (l(), d("div", {
|
|
9589
9589
|
key: 0,
|
|
9590
9590
|
ref_key: "booleanDropdownRef",
|
|
9591
9591
|
ref: m,
|
|
@@ -9613,7 +9613,7 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
9613
9613
|
], 44, Um)) : _("", !0)
|
|
9614
9614
|
])),
|
|
9615
9615
|
(l(), j(Fe, { to: "body" }, [
|
|
9616
|
-
fe.value &&
|
|
9616
|
+
fe.value && M.value ? (l(), d("div", {
|
|
9617
9617
|
key: 0,
|
|
9618
9618
|
ref_key: "rangeDropdownRef",
|
|
9619
9619
|
ref: u,
|
|
@@ -9623,10 +9623,10 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
9623
9623
|
style: ge(D.value),
|
|
9624
9624
|
onKeydown: ze(G, ["escape"])
|
|
9625
9625
|
}, [
|
|
9626
|
-
|
|
9626
|
+
y("div", Qm, [
|
|
9627
9627
|
C(ut, {
|
|
9628
9628
|
ref_key: "rangeMinInputRef",
|
|
9629
|
-
ref:
|
|
9629
|
+
ref: k,
|
|
9630
9630
|
modelValue: Z.value,
|
|
9631
9631
|
name: `filter-range-min-${e.filterConfig?.name ?? e.filterName}`,
|
|
9632
9632
|
type: "number",
|
|
@@ -9648,7 +9648,7 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
9648
9648
|
], 44, Xm)) : _("", !0)
|
|
9649
9649
|
])),
|
|
9650
9650
|
(l(), j(Fe, { to: "body" }, [
|
|
9651
|
-
he.value &&
|
|
9651
|
+
he.value && M.value ? (l(), d("div", {
|
|
9652
9652
|
key: 0,
|
|
9653
9653
|
ref_key: "datePickerPanelRef",
|
|
9654
9654
|
ref: c,
|
|
@@ -9666,7 +9666,7 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
9666
9666
|
], 44, Km)) : _("", !0)
|
|
9667
9667
|
])),
|
|
9668
9668
|
(l(), j(Fe, { to: "body" }, [
|
|
9669
|
-
we.value &&
|
|
9669
|
+
we.value && M.value ? (l(), d("div", {
|
|
9670
9670
|
key: 0,
|
|
9671
9671
|
ref_key: "timePanelRef",
|
|
9672
9672
|
ref: h,
|
|
@@ -9676,7 +9676,7 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
9676
9676
|
style: ge(D.value),
|
|
9677
9677
|
onKeydown: ze(G, ["escape"])
|
|
9678
9678
|
}, [
|
|
9679
|
-
|
|
9679
|
+
y("div", Zm, [
|
|
9680
9680
|
C(yt, {
|
|
9681
9681
|
modelValue: B.value,
|
|
9682
9682
|
label: e.rangeFromLabel,
|
|
@@ -9693,10 +9693,10 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
9693
9693
|
], 44, Jm)) : _("", !0)
|
|
9694
9694
|
])),
|
|
9695
9695
|
(l(), j(Fe, { to: "body" }, [
|
|
9696
|
-
N.value &&
|
|
9696
|
+
N.value && M.value ? (l(), d("div", {
|
|
9697
9697
|
key: 0,
|
|
9698
9698
|
ref_key: "textPanelRef",
|
|
9699
|
-
ref:
|
|
9699
|
+
ref: p,
|
|
9700
9700
|
role: "dialog",
|
|
9701
9701
|
"aria-label": re.value,
|
|
9702
9702
|
class: "toolkit-filter-btn__dropdown toolkit-filter-btn__text-panel",
|
|
@@ -9715,12 +9715,12 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
9715
9715
|
key: 0,
|
|
9716
9716
|
ref_key: "dropdownMenuRef",
|
|
9717
9717
|
ref: s,
|
|
9718
|
-
isOpen:
|
|
9718
|
+
isOpen: M.value,
|
|
9719
9719
|
dropdownStyle: { ...D.value, width: "250px" },
|
|
9720
9720
|
isMulti: F.value,
|
|
9721
9721
|
searchable: q.value && e.searchable,
|
|
9722
9722
|
searchPlaceholder: e.searchPlaceholder,
|
|
9723
|
-
searchQuery:
|
|
9723
|
+
searchQuery: $.value,
|
|
9724
9724
|
selectAllText: e.selectAllText,
|
|
9725
9725
|
clearAllText: e.clearAllText,
|
|
9726
9726
|
areAllOptionsSelected: Wt.value,
|
|
@@ -9743,7 +9743,7 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
9743
9743
|
onSelectHighlighted: oa,
|
|
9744
9744
|
onSetHighlighted: lt,
|
|
9745
9745
|
onCheckboxChange: xa,
|
|
9746
|
-
"onUpdate:searchQuery":
|
|
9746
|
+
"onUpdate:searchQuery": P
|
|
9747
9747
|
}, null, 8, ["isOpen", "dropdownStyle", "isMulti", "searchable", "searchPlaceholder", "searchQuery", "selectAllText", "clearAllText", "areAllOptionsSelected", "filteredOptions", "navigableOptions", "highlightedIndex", "noOptionsText", "optionLabel", "optionValue"])) : _("", !0)
|
|
9748
9748
|
], 2));
|
|
9749
9749
|
}
|
|
@@ -9859,46 +9859,46 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
9859
9859
|
},
|
|
9860
9860
|
emits: ["select", "open", "close"],
|
|
9861
9861
|
setup(e, { emit: a }) {
|
|
9862
|
-
const t = e, n = a, o = f(() => (Array.isArray(t.items[0]) ? t.items : [t.items]).map((T) => T.filter((W) => W.visible !== !1)).filter((T) => T.length > 0)), i =
|
|
9862
|
+
const t = e, n = a, o = f(() => (Array.isArray(t.items[0]) ? t.items : [t.items]).map((T) => T.filter((W) => W.visible !== !1)).filter((T) => T.length > 0)), i = w(null), r = w(null), s = w(!1), u = w(t.position), m = w({}), c = async () => {
|
|
9863
9863
|
s.value = !s.value, s.value ? (n("open"), await ke(), await ke(), v(), setTimeout(() => {
|
|
9864
9864
|
v();
|
|
9865
|
-
}, 10), window.addEventListener("scroll", v, !0), window.addEventListener("resize", v), document.addEventListener("click",
|
|
9865
|
+
}, 10), window.addEventListener("scroll", v, !0), window.addEventListener("resize", v), document.addEventListener("click", k, !0)) : g();
|
|
9866
9866
|
}, h = () => {
|
|
9867
|
-
s.value = !1,
|
|
9868
|
-
},
|
|
9869
|
-
|
|
9870
|
-
},
|
|
9871
|
-
const T =
|
|
9872
|
-
W && r.value && !W.contains(T) && !r.value.contains(T) && (s.value = !1,
|
|
9873
|
-
},
|
|
9874
|
-
window.removeEventListener("scroll", v, !0), window.removeEventListener("resize", v), document.removeEventListener("click",
|
|
9867
|
+
s.value = !1, g();
|
|
9868
|
+
}, p = (x) => {
|
|
9869
|
+
x.onClick?.(), n("select", x), h();
|
|
9870
|
+
}, k = (x) => {
|
|
9871
|
+
const T = x.target, W = t.triggerEl ?? i.value;
|
|
9872
|
+
W && r.value && !W.contains(T) && !r.value.contains(T) && (s.value = !1, g(), n("close"));
|
|
9873
|
+
}, g = () => {
|
|
9874
|
+
window.removeEventListener("scroll", v, !0), window.removeEventListener("resize", v), document.removeEventListener("click", k, !0);
|
|
9875
9875
|
}, v = () => {
|
|
9876
|
-
const
|
|
9877
|
-
if (
|
|
9878
|
-
const T =
|
|
9876
|
+
const x = t.triggerEl ?? i.value;
|
|
9877
|
+
if (!x || !r.value) return;
|
|
9878
|
+
const T = x.getBoundingClientRect();
|
|
9879
9879
|
if (!(T.top < window.innerHeight && T.bottom > 0 && T.left < window.innerWidth && T.right > 0)) {
|
|
9880
|
-
s.value = !1,
|
|
9880
|
+
s.value = !1, g(), n("close");
|
|
9881
9881
|
return;
|
|
9882
9882
|
}
|
|
9883
|
-
const
|
|
9883
|
+
const M = r.value.getBoundingClientRect(), $ = window.innerHeight, b = window.innerWidth, D = 8;
|
|
9884
9884
|
let z = t.position, H = 0, Z = 0;
|
|
9885
9885
|
const me = {
|
|
9886
9886
|
top: () => {
|
|
9887
|
-
H = T.top -
|
|
9887
|
+
H = T.top - M.height - D, Z = T.left;
|
|
9888
9888
|
},
|
|
9889
9889
|
bottom: () => {
|
|
9890
9890
|
H = T.bottom + D, Z = T.left;
|
|
9891
9891
|
},
|
|
9892
9892
|
left: () => {
|
|
9893
|
-
H = T.top, Z = T.left -
|
|
9893
|
+
H = T.top, Z = T.left - M.width - D;
|
|
9894
9894
|
},
|
|
9895
9895
|
right: () => {
|
|
9896
9896
|
H = T.top, Z = T.right + D;
|
|
9897
9897
|
}
|
|
9898
9898
|
}, B = me[z];
|
|
9899
9899
|
B && B();
|
|
9900
|
-
const X = H >= 10, R = H +
|
|
9901
|
-
z === "top" && !X && T.bottom +
|
|
9900
|
+
const X = H >= 10, R = H + M.height <= $ - 10, O = Z >= 10, E = Z + M.width <= b - 10;
|
|
9901
|
+
z === "top" && !X && T.bottom + M.height + D <= $ - 10 ? (z = "bottom", me.bottom()) : z === "bottom" && !R && T.top - M.height - D >= 10 ? (z = "top", me.top()) : z === "left" && !O && T.right + M.width + D <= b - 10 ? (z = "right", me.right()) : z === "right" && !E && T.left - M.width - D >= 10 && (z = "left", me.left()), Z < 10 && (Z = 10), Z + M.width > b - 10 && (Z = b - M.width - 10), H < 10 && (H = 10), H + M.height > $ - 10 && (H = $ - M.height - 10), u.value = z, m.value = {
|
|
9902
9902
|
position: "fixed",
|
|
9903
9903
|
top: `${H}px`,
|
|
9904
9904
|
left: `${Z}px`,
|
|
@@ -9906,14 +9906,14 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
9906
9906
|
};
|
|
9907
9907
|
};
|
|
9908
9908
|
return wt(() => {
|
|
9909
|
-
|
|
9910
|
-
}), (
|
|
9909
|
+
g();
|
|
9910
|
+
}), (x, T) => (l(), d("div", {
|
|
9911
9911
|
ref_key: "triggerRef",
|
|
9912
9912
|
ref: i,
|
|
9913
9913
|
class: "toolkit-menu-wrapper"
|
|
9914
9914
|
}, [
|
|
9915
|
-
|
|
9916
|
-
Pe(
|
|
9915
|
+
y("div", { onClick: c }, [
|
|
9916
|
+
Pe(x.$slots, "trigger", { isOpen: s.value })
|
|
9917
9917
|
]),
|
|
9918
9918
|
(l(), j(Fe, { to: "body" }, [
|
|
9919
9919
|
C(dt, { name: "toolkit-menu-fade" }, {
|
|
@@ -9926,41 +9926,41 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
9926
9926
|
style: ge(m.value),
|
|
9927
9927
|
role: "menu"
|
|
9928
9928
|
}, [
|
|
9929
|
-
|
|
9930
|
-
|
|
9931
|
-
(l(!0), d(le, null, Ie(o.value, (W,
|
|
9932
|
-
|
|
9933
|
-
(l(!0), d(le, null, Ie(W, (
|
|
9934
|
-
|
|
9929
|
+
y("div", pf, [
|
|
9930
|
+
y("div", bf, [
|
|
9931
|
+
(l(!0), d(le, null, Ie(o.value, (W, M) => (l(), d(le, { key: M }, [
|
|
9932
|
+
M > 0 ? (l(), d("div", yf)) : _("", !0),
|
|
9933
|
+
(l(!0), d(le, null, Ie(W, ($, b) => (l(), d(le, { key: b }, [
|
|
9934
|
+
$.href ? (l(), d("a", {
|
|
9935
9935
|
key: 0,
|
|
9936
|
-
href:
|
|
9937
|
-
"data-remote":
|
|
9936
|
+
href: $.disabled ? void 0 : $.href,
|
|
9937
|
+
"data-remote": !$.disabled && $.dataRemote || void 0,
|
|
9938
9938
|
class: "toolkit-menu__link",
|
|
9939
|
-
onClick: (D) =>
|
|
9939
|
+
onClick: (D) => $.disabled ? D.preventDefault() : h()
|
|
9940
9940
|
}, [
|
|
9941
9941
|
C(Zt, {
|
|
9942
|
-
option:
|
|
9943
|
-
label:
|
|
9942
|
+
option: $,
|
|
9943
|
+
label: $.label,
|
|
9944
9944
|
isMulti: !1,
|
|
9945
9945
|
isSelected: !1,
|
|
9946
9946
|
isHighlighted: !1,
|
|
9947
|
-
isDisabled:
|
|
9948
|
-
isClickable:
|
|
9949
|
-
leadingIcon:
|
|
9950
|
-
color:
|
|
9947
|
+
isDisabled: $.disabled || !1,
|
|
9948
|
+
isClickable: !$.disabled,
|
|
9949
|
+
leadingIcon: $.icon,
|
|
9950
|
+
color: $.color
|
|
9951
9951
|
}, null, 8, ["option", "label", "isDisabled", "isClickable", "leadingIcon", "color"])
|
|
9952
9952
|
], 8, wf)) : (l(), j(Zt, {
|
|
9953
9953
|
key: 1,
|
|
9954
|
-
option:
|
|
9955
|
-
label:
|
|
9954
|
+
option: $,
|
|
9955
|
+
label: $.label,
|
|
9956
9956
|
isMulti: !1,
|
|
9957
9957
|
isSelected: !1,
|
|
9958
9958
|
isHighlighted: !1,
|
|
9959
|
-
isDisabled:
|
|
9960
|
-
isClickable:
|
|
9961
|
-
leadingIcon:
|
|
9962
|
-
color:
|
|
9963
|
-
onSelect: (D) =>
|
|
9959
|
+
isDisabled: $.disabled || !1,
|
|
9960
|
+
isClickable: !$.disabled,
|
|
9961
|
+
leadingIcon: $.icon,
|
|
9962
|
+
color: $.color,
|
|
9963
|
+
onSelect: (D) => p($)
|
|
9964
9964
|
}, null, 8, ["option", "label", "isDisabled", "isClickable", "leadingIcon", "color", "onSelect"]))
|
|
9965
9965
|
], 64))), 128))
|
|
9966
9966
|
], 64))), 128))
|
|
@@ -10000,7 +10000,7 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
10000
10000
|
},
|
|
10001
10001
|
emits: ["update:modelValue"],
|
|
10002
10002
|
setup(e, { emit: a }) {
|
|
10003
|
-
const t = e, n = a, o = va(), i =
|
|
10003
|
+
const t = e, n = a, o = va(), i = w(null), r = w(null), s = w(!1), u = f(() => [
|
|
10004
10004
|
"toolkit-modal",
|
|
10005
10005
|
`toolkit-modal--${t.size}`,
|
|
10006
10006
|
`toolkit-modal--align-${t.titleAlign}`
|
|
@@ -10010,11 +10010,11 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
10010
10010
|
{ "toolkit-modal__header--scrolled": s.value }
|
|
10011
10011
|
]), c = f(() => o.title || o.subtitle), h = () => {
|
|
10012
10012
|
n("update:modelValue", !1);
|
|
10013
|
-
},
|
|
10013
|
+
}, p = (v) => {
|
|
10014
10014
|
v.key === "Escape" && t.modelValue && h();
|
|
10015
|
-
},
|
|
10015
|
+
}, k = () => {
|
|
10016
10016
|
s.value = (r.value?.scrollTop ?? 0) > 0;
|
|
10017
|
-
},
|
|
10017
|
+
}, g = async () => {
|
|
10018
10018
|
if (await ke(), !i.value) return;
|
|
10019
10019
|
i.value.querySelectorAll(
|
|
10020
10020
|
'input, button, textarea, select, a[href], [tabindex]:not([tabindex="-1"])'
|
|
@@ -10023,14 +10023,14 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
10023
10023
|
return Se(
|
|
10024
10024
|
() => t.modelValue,
|
|
10025
10025
|
(v) => {
|
|
10026
|
-
v ? (document.addEventListener("keydown",
|
|
10027
|
-
r.value && (r.value.addEventListener("scroll",
|
|
10028
|
-
})) : (document.removeEventListener("keydown",
|
|
10026
|
+
v ? (document.addEventListener("keydown", p), g(), document.body.style.overflow = "hidden", ke(() => {
|
|
10027
|
+
r.value && (r.value.addEventListener("scroll", k), k());
|
|
10028
|
+
})) : (document.removeEventListener("keydown", p), r.value && r.value.removeEventListener("scroll", k), s.value = !1, document.body.style.overflow = "");
|
|
10029
10029
|
},
|
|
10030
10030
|
{ immediate: !0 }
|
|
10031
10031
|
), _t(() => {
|
|
10032
|
-
document.removeEventListener("keydown",
|
|
10033
|
-
}), (v,
|
|
10032
|
+
document.removeEventListener("keydown", p), r.value && r.value.removeEventListener("scroll", k), document.body.style.overflow = "";
|
|
10033
|
+
}), (v, x) => (l(), j(Fe, { to: "body" }, [
|
|
10034
10034
|
C(dt, {
|
|
10035
10035
|
name: "modal",
|
|
10036
10036
|
"enter-active-class": "modal-enter-active",
|
|
@@ -10041,7 +10041,7 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
10041
10041
|
default: K(() => [
|
|
10042
10042
|
e.modelValue ? (l(), d("div", kf, [
|
|
10043
10043
|
e.overlay ? (l(), d("div", Mf)) : _("", !0),
|
|
10044
|
-
|
|
10044
|
+
y("div", {
|
|
10045
10045
|
ref_key: "modalRef",
|
|
10046
10046
|
ref: i,
|
|
10047
10047
|
class: ne(u.value),
|
|
@@ -10078,7 +10078,7 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
10078
10078
|
Pe(v.$slots, "subtitle")
|
|
10079
10079
|
])) : _("", !0)
|
|
10080
10080
|
], 2)) : _("", !0),
|
|
10081
|
-
|
|
10081
|
+
y("div", {
|
|
10082
10082
|
ref_key: "contentRef",
|
|
10083
10083
|
ref: r,
|
|
10084
10084
|
class: "toolkit-modal__content"
|
|
@@ -10125,7 +10125,7 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
10125
10125
|
isOpen: { type: Boolean, default: void 0 }
|
|
10126
10126
|
},
|
|
10127
10127
|
setup(e) {
|
|
10128
|
-
const a = e, t =
|
|
10128
|
+
const a = e, t = w(null), n = w(300), o = w(0), i = () => {
|
|
10129
10129
|
if (t.value) {
|
|
10130
10130
|
const T = t.value.offsetWidth;
|
|
10131
10131
|
T !== n.value && (n.value = T, o.value++);
|
|
@@ -10146,9 +10146,9 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
10146
10146
|
), m = f(() => Math.max(0, r.value - a.confirmed - a.unconfirmed)), c = f(
|
|
10147
10147
|
() => r.value > 0 ? m.value / r.value * 100 : 0
|
|
10148
10148
|
), h = (T, W) => {
|
|
10149
|
-
const
|
|
10149
|
+
const M = T.toString(), $ = M.length, b = 4, D = 4 + b, z = $ * D + b;
|
|
10150
10150
|
if (W >= z)
|
|
10151
|
-
return
|
|
10151
|
+
return M;
|
|
10152
10152
|
if (T >= 1e3) {
|
|
10153
10153
|
const H = 4 * D;
|
|
10154
10154
|
if (W <= H) return "999+";
|
|
@@ -10161,17 +10161,17 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
10161
10161
|
const H = 2 * D;
|
|
10162
10162
|
if (W <= H) return "9+";
|
|
10163
10163
|
}
|
|
10164
|
-
return
|
|
10165
|
-
},
|
|
10166
|
-
const
|
|
10167
|
-
return h(T,
|
|
10168
|
-
},
|
|
10169
|
-
() =>
|
|
10170
|
-
),
|
|
10171
|
-
() =>
|
|
10164
|
+
return M;
|
|
10165
|
+
}, p = (T, W) => {
|
|
10166
|
+
const M = W / 100 * n.value;
|
|
10167
|
+
return h(T, M);
|
|
10168
|
+
}, k = f(
|
|
10169
|
+
() => p(a.confirmed, s.value)
|
|
10170
|
+
), g = f(
|
|
10171
|
+
() => p(a.unconfirmed, u.value)
|
|
10172
10172
|
), v = f(
|
|
10173
|
-
() =>
|
|
10174
|
-
),
|
|
10173
|
+
() => p(m.value, c.value)
|
|
10174
|
+
), x = (T) => T > 0 && T / r.value * 100 >= 2;
|
|
10175
10175
|
return (T, W) => (l(), d("div", {
|
|
10176
10176
|
class: ne(["toolkit-progress-bar", `toolkit-progress-bar--${e.size}`])
|
|
10177
10177
|
}, [
|
|
@@ -10183,24 +10183,24 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
10183
10183
|
}, {
|
|
10184
10184
|
content: K(() => [
|
|
10185
10185
|
Pe(T.$slots, "tooltip", {}, () => [
|
|
10186
|
-
|
|
10186
|
+
y("div", Tf, [
|
|
10187
10187
|
e.confirmed > 0 ? (l(), d("div", Df, [
|
|
10188
|
-
W[0] || (W[0] =
|
|
10189
|
-
|
|
10188
|
+
W[0] || (W[0] = y("span", { class: "toolkit-progress-bar__tooltip-dot toolkit-progress-bar__tooltip-dot--confirmed" }, null, -1)),
|
|
10189
|
+
y("span", null, A(e.confirmed), 1)
|
|
10190
10190
|
])) : _("", !0),
|
|
10191
10191
|
e.unconfirmed > 0 ? (l(), d("div", _f, [
|
|
10192
|
-
W[1] || (W[1] =
|
|
10193
|
-
|
|
10192
|
+
W[1] || (W[1] = y("span", { class: "toolkit-progress-bar__tooltip-dot toolkit-progress-bar__tooltip-dot--unconfirmed" }, null, -1)),
|
|
10193
|
+
y("span", null, A(e.unconfirmed), 1)
|
|
10194
10194
|
])) : _("", !0),
|
|
10195
10195
|
m.value > 0 ? (l(), d("div", Cf, [
|
|
10196
|
-
W[2] || (W[2] =
|
|
10197
|
-
|
|
10196
|
+
W[2] || (W[2] = y("span", { class: "toolkit-progress-bar__tooltip-dot toolkit-progress-bar__tooltip-dot--remaining" }, null, -1)),
|
|
10197
|
+
y("span", null, A(m.value), 1)
|
|
10198
10198
|
])) : _("", !0)
|
|
10199
10199
|
])
|
|
10200
10200
|
])
|
|
10201
10201
|
]),
|
|
10202
10202
|
default: K(() => [
|
|
10203
|
-
|
|
10203
|
+
y("div", {
|
|
10204
10204
|
ref_key: "trackRef",
|
|
10205
10205
|
ref: t,
|
|
10206
10206
|
class: "toolkit-progress-bar__track"
|
|
@@ -10210,21 +10210,21 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
10210
10210
|
class: "toolkit-progress-bar__segment toolkit-progress-bar__segment--confirmed",
|
|
10211
10211
|
style: ge({ width: `${s.value}%` })
|
|
10212
10212
|
}, [
|
|
10213
|
-
|
|
10213
|
+
x(e.confirmed) ? (l(), d("span", Wf, A(k.value), 1)) : _("", !0)
|
|
10214
10214
|
], 4)) : _("", !0),
|
|
10215
10215
|
u.value > 0 ? (l(), d("div", {
|
|
10216
10216
|
key: 1,
|
|
10217
10217
|
class: "toolkit-progress-bar__segment toolkit-progress-bar__segment--unconfirmed",
|
|
10218
10218
|
style: ge({ width: `${u.value}%` })
|
|
10219
10219
|
}, [
|
|
10220
|
-
|
|
10220
|
+
x(e.unconfirmed) ? (l(), d("span", Sf, A(g.value), 1)) : _("", !0)
|
|
10221
10221
|
], 4)) : _("", !0),
|
|
10222
10222
|
c.value > 0 ? (l(), d("div", {
|
|
10223
10223
|
key: 2,
|
|
10224
10224
|
class: "toolkit-progress-bar__segment toolkit-progress-bar__segment--remaining",
|
|
10225
10225
|
style: ge({ width: `${c.value}%` })
|
|
10226
10226
|
}, [
|
|
10227
|
-
|
|
10227
|
+
x(m.value) ? (l(), d("span", zf, A(v.value), 1)) : _("", !0)
|
|
10228
10228
|
], 4)) : _("", !0)
|
|
10229
10229
|
], 512)
|
|
10230
10230
|
]),
|
|
@@ -10243,18 +10243,18 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
10243
10243
|
},
|
|
10244
10244
|
emits: ["scroll", "update:scrolled"],
|
|
10245
10245
|
setup(e, { expose: a, emit: t }) {
|
|
10246
|
-
const n = e, o = t, i = ca(), r =
|
|
10247
|
-
let W = null,
|
|
10246
|
+
const n = e, o = t, i = ca(), r = w(null), s = w(null), u = w(!1), m = w(!1), c = w(!1), h = w(!1), p = w(0), k = w(100), g = w(0), v = w(100), x = w(0), T = w(0);
|
|
10247
|
+
let W = null, M = null, $ = null;
|
|
10248
10248
|
const b = f(() => n.direction !== "horizontal"), D = f(() => n.direction !== "vertical"), z = () => {
|
|
10249
10249
|
const F = s.value;
|
|
10250
10250
|
if (F) {
|
|
10251
10251
|
if (u.value = F.scrollHeight > F.clientHeight + 1, m.value = F.scrollWidth > F.clientWidth + 1, c.value = F.scrollTop > 0, u.value) {
|
|
10252
10252
|
const fe = F.clientHeight / F.scrollHeight, S = Math.max(fe * 100, 10), N = F.scrollHeight - F.clientHeight;
|
|
10253
|
-
|
|
10253
|
+
p.value = N > 0 ? F.scrollTop / N * (100 - S) : 0, k.value = S, x.value = N > 0 ? Math.round(F.scrollTop / N * 100) : 0;
|
|
10254
10254
|
}
|
|
10255
10255
|
if (m.value) {
|
|
10256
10256
|
const fe = F.clientWidth / F.scrollWidth, S = Math.max(fe * 100, 10), N = F.scrollWidth - F.clientWidth;
|
|
10257
|
-
|
|
10257
|
+
g.value = N > 0 ? F.scrollLeft / N * (100 - S) : 0, v.value = S, T.value = N > 0 ? Math.round(F.scrollLeft / N * 100) : 0;
|
|
10258
10258
|
}
|
|
10259
10259
|
}
|
|
10260
10260
|
}, H = () => {
|
|
@@ -10294,7 +10294,7 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
10294
10294
|
const S = s.value, N = F.currentTarget.parentElement;
|
|
10295
10295
|
if (!S || !N) return;
|
|
10296
10296
|
H();
|
|
10297
|
-
const U = fe === "vertical", he = U ? F.clientY : F.clientX, we = U ? S.scrollTop : S.scrollLeft, q = U ? N.clientHeight : N.clientWidth, Q = q * ((U ?
|
|
10297
|
+
const U = fe === "vertical", he = U ? F.clientY : F.clientX, we = U ? S.scrollTop : S.scrollLeft, q = U ? N.clientHeight : N.clientWidth, Q = q * ((U ? k.value : v.value) / 100), re = U ? S.scrollHeight - S.clientHeight : S.scrollWidth - S.clientWidth, pe = q - Q;
|
|
10298
10298
|
if (pe <= 0 || re <= 0) return;
|
|
10299
10299
|
const _e = (Ze) => {
|
|
10300
10300
|
const Ge = ((U ? Ze.clientY : Ze.clientX) - he) / pe * re, rt = Math.max(0, Math.min(re, we + Ge));
|
|
@@ -10306,9 +10306,9 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
10306
10306
|
};
|
|
10307
10307
|
return ct(() => {
|
|
10308
10308
|
const F = s.value;
|
|
10309
|
-
F && (n.observeResize && typeof ResizeObserver < "u" && (
|
|
10309
|
+
F && (n.observeResize && typeof ResizeObserver < "u" && (M = new ResizeObserver(z), M.observe(F)), n.observeMutations && typeof MutationObserver < "u" && ($ = new MutationObserver(z), $.observe(F, { subtree: !0, childList: !0, characterData: !0 })), z(), me());
|
|
10310
10310
|
}), _t(() => {
|
|
10311
|
-
W && clearTimeout(W),
|
|
10311
|
+
W && clearTimeout(W), M?.disconnect(), $?.disconnect();
|
|
10312
10312
|
}), (F, fe) => (l(), d("div", {
|
|
10313
10313
|
ref_key: "rootRef",
|
|
10314
10314
|
ref: r,
|
|
@@ -10322,7 +10322,7 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
10322
10322
|
onMousemove: H,
|
|
10323
10323
|
onMouseleave: E
|
|
10324
10324
|
}, [
|
|
10325
|
-
|
|
10325
|
+
y("div", {
|
|
10326
10326
|
id: De(i),
|
|
10327
10327
|
ref_key: "viewportRef",
|
|
10328
10328
|
ref: s,
|
|
@@ -10339,14 +10339,14 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
10339
10339
|
"aria-orientation": "vertical",
|
|
10340
10340
|
"aria-valuemin": "0",
|
|
10341
10341
|
"aria-valuemax": "100",
|
|
10342
|
-
"aria-valuenow":
|
|
10342
|
+
"aria-valuenow": x.value,
|
|
10343
10343
|
"aria-controls": De(i),
|
|
10344
10344
|
onFocus: H,
|
|
10345
10345
|
onKeydown: fe[1] || (fe[1] = (S) => ie(S, "vertical"))
|
|
10346
10346
|
}, [
|
|
10347
|
-
|
|
10347
|
+
y("div", {
|
|
10348
10348
|
class: "toolkit-scrollbar__thumb",
|
|
10349
|
-
style: ge({ top: `${
|
|
10349
|
+
style: ge({ top: `${p.value}%`, height: `${k.value}%` }),
|
|
10350
10350
|
onMousedown: fe[0] || (fe[0] = ve((S) => se(S, "vertical"), ["prevent"]))
|
|
10351
10351
|
}, null, 36)
|
|
10352
10352
|
], 40, Vf)) : _("", !0),
|
|
@@ -10363,9 +10363,9 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
10363
10363
|
onFocus: H,
|
|
10364
10364
|
onKeydown: fe[3] || (fe[3] = (S) => ie(S, "horizontal"))
|
|
10365
10365
|
}, [
|
|
10366
|
-
|
|
10366
|
+
y("div", {
|
|
10367
10367
|
class: "toolkit-scrollbar__thumb",
|
|
10368
|
-
style: ge({ left: `${
|
|
10368
|
+
style: ge({ left: `${g.value}%`, width: `${v.value}%` }),
|
|
10369
10369
|
onMousedown: fe[2] || (fe[2] = ve((S) => se(S, "horizontal"), ["prevent"]))
|
|
10370
10370
|
}, null, 36)
|
|
10371
10371
|
], 40, If)) : _("", !0)
|
|
@@ -10395,7 +10395,7 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
10395
10395
|
},
|
|
10396
10396
|
emits: ["update:modelValue", "change"],
|
|
10397
10397
|
setup(e, { emit: a }) {
|
|
10398
|
-
const t = e, n = a, o = f(() => t.variants === "double"), i = f(() => t.minValue), r = f(() => t.maxValue), s =
|
|
10398
|
+
const t = e, n = a, o = f(() => t.variants === "double"), i = f(() => t.minValue), r = f(() => t.maxValue), s = w(null), u = w(0), m = w(i.value), c = w([i.value, r.value]);
|
|
10399
10399
|
Se(
|
|
10400
10400
|
() => t.modelValue,
|
|
10401
10401
|
(O) => {
|
|
@@ -10412,11 +10412,11 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
10412
10412
|
}), _t(() => {
|
|
10413
10413
|
window.removeEventListener("resize", h);
|
|
10414
10414
|
});
|
|
10415
|
-
const
|
|
10415
|
+
const p = f(
|
|
10416
10416
|
() => typeof t.modelValue == "number" ? t.modelValue : m.value
|
|
10417
|
-
),
|
|
10417
|
+
), k = f(() => Array.isArray(t.modelValue) && t.modelValue.length === 2 ? [t.modelValue[0], t.modelValue[1]] : c.value), g = f(() => k.value[0]), v = f(() => k.value[1]), x = f(() => Math.max(1, r.value - i.value)), T = (O) => u.value ? (Math.min(r.value, Math.max(i.value, O)) - i.value) / x.value * u.value : 0, W = f(() => {
|
|
10418
10418
|
if (o.value) {
|
|
10419
|
-
const O = Math.min(T(
|
|
10419
|
+
const O = Math.min(T(g.value), T(v.value)), E = Math.max(T(g.value), T(v.value));
|
|
10420
10420
|
return {
|
|
10421
10421
|
left: `${O}px`,
|
|
10422
10422
|
width: `${E - O}px`
|
|
@@ -10424,12 +10424,12 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
10424
10424
|
}
|
|
10425
10425
|
return {
|
|
10426
10426
|
left: "0px",
|
|
10427
|
-
width: `${T(
|
|
10427
|
+
width: `${T(p.value)}px`
|
|
10428
10428
|
};
|
|
10429
|
-
}),
|
|
10430
|
-
left: `${T(g.value)}px`
|
|
10431
|
-
})), M = f(() => ({
|
|
10429
|
+
}), M = f(() => ({
|
|
10432
10430
|
left: `${T(p.value)}px`
|
|
10431
|
+
})), $ = f(() => ({
|
|
10432
|
+
left: `${T(g.value)}px`
|
|
10433
10433
|
})), b = f(() => ({
|
|
10434
10434
|
left: `${T(v.value)}px`
|
|
10435
10435
|
})), D = f(
|
|
@@ -10438,13 +10438,13 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
10438
10438
|
typeof t.modelValue != "number" && (m.value = O), n("update:modelValue", O), n("change", O);
|
|
10439
10439
|
}, Z = (O) => {
|
|
10440
10440
|
(!Array.isArray(t.modelValue) || t.modelValue.length !== 2) && (c.value = O), n("update:modelValue", O), n("change", O);
|
|
10441
|
-
}, me =
|
|
10441
|
+
}, me = w(null), B = (O, E) => {
|
|
10442
10442
|
t.disabled || (me.value = O, h(), R(E), window.addEventListener("pointermove", R), window.addEventListener("pointerup", X));
|
|
10443
10443
|
}, X = () => {
|
|
10444
10444
|
me.value = null, window.removeEventListener("pointermove", R), window.removeEventListener("pointerup", X);
|
|
10445
10445
|
}, R = (O) => {
|
|
10446
10446
|
if (!me.value || !s.value) return;
|
|
10447
|
-
const E = s.value.getBoundingClientRect(), ie = O.clientX - E.left, se = Math.min(E.width, Math.max(0, ie)), F = E.width ? se / E.width : 0, fe = i.value + F *
|
|
10447
|
+
const E = s.value.getBoundingClientRect(), ie = O.clientX - E.left, se = Math.min(E.width, Math.max(0, ie)), F = E.width ? se / E.width : 0, fe = i.value + F * x.value, S = Math.round((fe - i.value) / t.step) * t.step + i.value, N = Math.min(r.value, Math.max(i.value, S));
|
|
10448
10448
|
if (me.value === "single") {
|
|
10449
10449
|
H(N);
|
|
10450
10450
|
return;
|
|
@@ -10453,22 +10453,22 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
10453
10453
|
const U = Math.min(N, v.value);
|
|
10454
10454
|
Z([U, v.value]);
|
|
10455
10455
|
} else {
|
|
10456
|
-
const U = Math.max(N,
|
|
10457
|
-
Z([
|
|
10456
|
+
const U = Math.max(N, g.value);
|
|
10457
|
+
Z([g.value, U]);
|
|
10458
10458
|
}
|
|
10459
10459
|
};
|
|
10460
10460
|
return (O, E) => (l(), d("div", Lf, [
|
|
10461
|
-
|
|
10461
|
+
y("div", Af, [
|
|
10462
10462
|
o.value ? (l(), d(le, { key: 1 }, [
|
|
10463
|
-
|
|
10463
|
+
y("div", {
|
|
10464
10464
|
class: "toolkit-slider__value",
|
|
10465
|
-
style: ge(
|
|
10465
|
+
style: ge($.value)
|
|
10466
10466
|
}, [
|
|
10467
10467
|
C(pt, {
|
|
10468
|
-
value: z(
|
|
10468
|
+
value: z(g.value)
|
|
10469
10469
|
}, null, 8, ["value"])
|
|
10470
10470
|
], 4),
|
|
10471
|
-
|
|
10471
|
+
y("div", {
|
|
10472
10472
|
class: "toolkit-slider__value",
|
|
10473
10473
|
style: ge(b.value)
|
|
10474
10474
|
}, [
|
|
@@ -10479,46 +10479,46 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
10479
10479
|
], 64)) : (l(), d("div", {
|
|
10480
10480
|
key: 0,
|
|
10481
10481
|
class: "toolkit-slider__value",
|
|
10482
|
-
style: ge(
|
|
10482
|
+
style: ge(M.value)
|
|
10483
10483
|
}, [
|
|
10484
10484
|
C(pt, {
|
|
10485
|
-
value: z(
|
|
10485
|
+
value: z(p.value)
|
|
10486
10486
|
}, null, 8, ["value"])
|
|
10487
10487
|
], 4))
|
|
10488
10488
|
]),
|
|
10489
|
-
|
|
10489
|
+
y("div", {
|
|
10490
10490
|
ref_key: "rangeRef",
|
|
10491
10491
|
ref: s,
|
|
10492
10492
|
class: "toolkit-slider__range"
|
|
10493
10493
|
}, [
|
|
10494
|
-
E[3] || (E[3] =
|
|
10495
|
-
|
|
10494
|
+
E[3] || (E[3] = y("div", { class: "toolkit-slider__track" }, null, -1)),
|
|
10495
|
+
y("div", {
|
|
10496
10496
|
class: "toolkit-slider__track-fill",
|
|
10497
10497
|
style: ge(W.value)
|
|
10498
10498
|
}, null, 4),
|
|
10499
10499
|
o.value ? (l(), d("div", Rf, [
|
|
10500
|
-
|
|
10500
|
+
y("div", {
|
|
10501
10501
|
class: "toolkit-slider__thumb",
|
|
10502
|
-
style: ge({ left: `${T(
|
|
10502
|
+
style: ge({ left: `${T(g.value)}px` }),
|
|
10503
10503
|
onPointerdown: E[1] || (E[1] = (ie) => B("min", ie))
|
|
10504
10504
|
}, null, 36),
|
|
10505
|
-
|
|
10505
|
+
y("div", {
|
|
10506
10506
|
class: "toolkit-slider__thumb",
|
|
10507
10507
|
style: ge({ left: `${T(v.value)}px` }),
|
|
10508
10508
|
onPointerdown: E[2] || (E[2] = (ie) => B("max", ie))
|
|
10509
10509
|
}, null, 36)
|
|
10510
10510
|
])) : (l(), d("div", Nf, [
|
|
10511
|
-
|
|
10511
|
+
y("div", {
|
|
10512
10512
|
class: "toolkit-slider__thumb",
|
|
10513
|
-
style: ge({ left: `${T(
|
|
10513
|
+
style: ge({ left: `${T(p.value)}px` }),
|
|
10514
10514
|
onPointerdown: E[0] || (E[0] = (ie) => B("single", ie))
|
|
10515
10515
|
}, null, 36)
|
|
10516
10516
|
]))
|
|
10517
10517
|
], 512),
|
|
10518
10518
|
D.value ? (l(), d("div", Hf, [
|
|
10519
|
-
|
|
10520
|
-
|
|
10521
|
-
|
|
10519
|
+
y("div", Bf, A(e.leftLabel), 1),
|
|
10520
|
+
y("div", Ff, A(e.middleLabel), 1),
|
|
10521
|
+
y("div", Yf, A(e.rightLabel), 1)
|
|
10522
10522
|
])) : _("", !0)
|
|
10523
10523
|
]));
|
|
10524
10524
|
}
|
|
@@ -10557,7 +10557,7 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
10557
10557
|
class: ne(["toolkit-status-dot", o.value])
|
|
10558
10558
|
}, [
|
|
10559
10559
|
e.variant === "label-left" && e.label ? (l(), d("span", jf, A(e.label), 1)) : _("", !0),
|
|
10560
|
-
|
|
10560
|
+
y("span", {
|
|
10561
10561
|
class: "toolkit-status-dot__dot",
|
|
10562
10562
|
style: ge(i.value)
|
|
10563
10563
|
}, null, 4),
|
|
@@ -10592,7 +10592,7 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
10592
10592
|
},
|
|
10593
10593
|
emits: ["update:checked", "change"],
|
|
10594
10594
|
setup(e, { expose: a, emit: t }) {
|
|
10595
|
-
const n = e, o = t, i =
|
|
10595
|
+
const n = e, o = t, i = w(null), r = f(() => n.id || `switch-${Math.random().toString(36).slice(2, 11)}`), s = f(() => [
|
|
10596
10596
|
"toolkit-switch-label",
|
|
10597
10597
|
{ "toolkit-switch-label--disabled": n.disabled }
|
|
10598
10598
|
]), u = f(() => [
|
|
@@ -10609,15 +10609,15 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
10609
10609
|
]), c = f(() => [
|
|
10610
10610
|
"toolkit-switch__text",
|
|
10611
10611
|
{ "toolkit-switch__text--left": n.labelPosition === "left" }
|
|
10612
|
-
]), h = (
|
|
10613
|
-
const
|
|
10614
|
-
o("update:checked",
|
|
10612
|
+
]), h = (p) => {
|
|
10613
|
+
const k = p.target.checked;
|
|
10614
|
+
o("update:checked", k), o("change", k);
|
|
10615
10615
|
};
|
|
10616
10616
|
return a({
|
|
10617
10617
|
focus: () => i.value?.focus(),
|
|
10618
10618
|
blur: () => i.value?.blur()
|
|
10619
|
-
}), (
|
|
10620
|
-
|
|
10619
|
+
}), (p, k) => (l(), d("div", Gf, [
|
|
10620
|
+
y("label", {
|
|
10621
10621
|
class: ne(s.value),
|
|
10622
10622
|
for: r.value
|
|
10623
10623
|
}, [
|
|
@@ -10625,7 +10625,7 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
10625
10625
|
key: 0,
|
|
10626
10626
|
class: ne(c.value)
|
|
10627
10627
|
}, A(e.label), 3)) : _("", !0),
|
|
10628
|
-
|
|
10628
|
+
y("input", {
|
|
10629
10629
|
id: r.value,
|
|
10630
10630
|
ref_key: "inputRef",
|
|
10631
10631
|
ref: i,
|
|
@@ -10635,10 +10635,10 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
10635
10635
|
class: "toolkit-switch__input",
|
|
10636
10636
|
onChange: h
|
|
10637
10637
|
}, null, 40, Xf),
|
|
10638
|
-
|
|
10638
|
+
y("span", {
|
|
10639
10639
|
class: ne(u.value)
|
|
10640
10640
|
}, [
|
|
10641
|
-
|
|
10641
|
+
y("span", {
|
|
10642
10642
|
class: ne(m.value)
|
|
10643
10643
|
}, null, 2)
|
|
10644
10644
|
], 2),
|
|
@@ -10693,43 +10693,41 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
10693
10693
|
},
|
|
10694
10694
|
emits: ["update:modelValue", "focus", "blur"],
|
|
10695
10695
|
setup(e, { emit: a }) {
|
|
10696
|
-
const t = e, n = a, o =
|
|
10696
|
+
const t = e, n = a, o = w(), i = w(!1), r = w(t.minRows), s = f(() => t.id || `textarea-${Math.random().toString(36).slice(2, 11)}`), u = f(() => t.maxRows == null || t.maxRows === 0), m = f(() => [
|
|
10697
10697
|
"toolkit-textarea",
|
|
10698
10698
|
{
|
|
10699
10699
|
"toolkit-textarea--disabled": t.disabled,
|
|
10700
10700
|
"toolkit-textarea--error": t.isError || t.errorMessage,
|
|
10701
|
-
"toolkit-textarea--focused": i.value
|
|
10701
|
+
"toolkit-textarea--focused": i.value,
|
|
10702
|
+
"toolkit-textarea--unlimited": u.value
|
|
10702
10703
|
}
|
|
10703
|
-
]),
|
|
10704
|
+
]), c = () => {
|
|
10704
10705
|
if (!o.value) return;
|
|
10705
|
-
const
|
|
10706
|
-
|
|
10707
|
-
const
|
|
10708
|
-
r.value = Math.max(
|
|
10709
|
-
|
|
10710
|
-
|
|
10711
|
-
|
|
10712
|
-
}, c = (y) => {
|
|
10713
|
-
n("update:modelValue", y.target.value), m();
|
|
10714
|
-
}, h = () => {
|
|
10706
|
+
const g = o.value;
|
|
10707
|
+
g.style.height = "auto";
|
|
10708
|
+
const v = parseInt(getComputedStyle(g).lineHeight), x = parseInt(getComputedStyle(g).paddingTop) + parseInt(getComputedStyle(g).paddingBottom), T = g.scrollHeight - x, W = Math.ceil(T / v), M = u.value ? W : Math.min(W, t.maxRows);
|
|
10709
|
+
r.value = Math.max(t.minRows, M), g.style.height = `${r.value * v + x}px`;
|
|
10710
|
+
}, h = (g) => {
|
|
10711
|
+
n("update:modelValue", g.target.value), c();
|
|
10712
|
+
}, p = () => {
|
|
10715
10713
|
i.value = !0, n("focus");
|
|
10716
|
-
},
|
|
10714
|
+
}, k = () => {
|
|
10717
10715
|
i.value = !1, n("blur");
|
|
10718
10716
|
};
|
|
10719
10717
|
return Se(
|
|
10720
10718
|
() => [t.modelValue, t.minRows, t.maxRows],
|
|
10721
|
-
() => ke(
|
|
10722
|
-
), ct(
|
|
10723
|
-
e.label ||
|
|
10719
|
+
() => ke(c)
|
|
10720
|
+
), ct(c), (g, v) => (l(), d("div", Kf, [
|
|
10721
|
+
e.label || g.$slots.label ? (l(), d("label", {
|
|
10724
10722
|
key: 0,
|
|
10725
10723
|
for: s.value,
|
|
10726
10724
|
class: "toolkit-textarea__label"
|
|
10727
10725
|
}, [
|
|
10728
|
-
Pe(
|
|
10726
|
+
Pe(g.$slots, "label", {}, () => [
|
|
10729
10727
|
ot(A(e.label), 1)
|
|
10730
10728
|
])
|
|
10731
10729
|
], 8, Jf)) : _("", !0),
|
|
10732
|
-
|
|
10730
|
+
y("textarea", {
|
|
10733
10731
|
id: s.value,
|
|
10734
10732
|
ref_key: "textareaRef",
|
|
10735
10733
|
ref: o,
|
|
@@ -10737,10 +10735,10 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
10737
10735
|
placeholder: e.placeholder,
|
|
10738
10736
|
disabled: e.disabled,
|
|
10739
10737
|
rows: r.value,
|
|
10740
|
-
class: ne(
|
|
10741
|
-
onInput:
|
|
10742
|
-
onFocus:
|
|
10743
|
-
onBlur:
|
|
10738
|
+
class: ne(m.value),
|
|
10739
|
+
onInput: h,
|
|
10740
|
+
onFocus: p,
|
|
10741
|
+
onBlur: k
|
|
10744
10742
|
}, null, 42, Zf),
|
|
10745
10743
|
e.errorMessage ? (l(), d("div", eh, A(e.errorMessage), 1)) : _("", !0)
|
|
10746
10744
|
]));
|
|
@@ -10779,7 +10777,7 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
10779
10777
|
},
|
|
10780
10778
|
emits: ["close"],
|
|
10781
10779
|
setup(e, { emit: a }) {
|
|
10782
|
-
const t = e, n = a, o =
|
|
10780
|
+
const t = e, n = a, o = w(!1);
|
|
10783
10781
|
ct(() => {
|
|
10784
10782
|
setTimeout(() => {
|
|
10785
10783
|
o.value = !0;
|
|
@@ -10817,7 +10815,7 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
10817
10815
|
size: "20"
|
|
10818
10816
|
}, null, 8, ["icon"])
|
|
10819
10817
|
])) : _("", !0),
|
|
10820
|
-
|
|
10818
|
+
y("div", nh, [
|
|
10821
10819
|
e.toast.title ? (l(), d("div", {
|
|
10822
10820
|
key: 0,
|
|
10823
10821
|
class: ne(["toolkit-toast__title", { "toolkit-toast__title--html": e.toast.allowHtml }])
|
|
@@ -10837,12 +10835,12 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
10837
10835
|
}, null, 8, lh)) : (l(), d("span", rh, A(e.toast.message), 1))
|
|
10838
10836
|
], 2)) : _("", !0),
|
|
10839
10837
|
e.toast.actions?.length ? (l(), d("div", sh, [
|
|
10840
|
-
(l(!0), d(le, null, Ie(e.toast.actions, (
|
|
10841
|
-
key:
|
|
10842
|
-
label:
|
|
10843
|
-
type:
|
|
10838
|
+
(l(!0), d(le, null, Ie(e.toast.actions, (p) => (l(), j(be, {
|
|
10839
|
+
key: p.label,
|
|
10840
|
+
label: p.label,
|
|
10841
|
+
type: p.style ?? "secondary",
|
|
10844
10842
|
size: "x-small",
|
|
10845
|
-
onClick: (
|
|
10843
|
+
onClick: (k) => u(p)
|
|
10846
10844
|
}, null, 8, ["label", "type", "onClick"]))), 128))
|
|
10847
10845
|
])) : _("", !0)
|
|
10848
10846
|
]),
|
|
@@ -10868,7 +10866,7 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
10868
10866
|
}));
|
|
10869
10867
|
}
|
|
10870
10868
|
}), dh = Nn("toast", () => {
|
|
10871
|
-
const e =
|
|
10869
|
+
const e = w([]), a = () => `toast-${Date.now()}-${Math.random().toString(36).substring(2, 11)}`, t = (m) => {
|
|
10872
10870
|
const c = a(), h = {
|
|
10873
10871
|
id: c,
|
|
10874
10872
|
title: m.title,
|
|
@@ -10951,59 +10949,59 @@ const Rc = { class: "toolkit-datepicker__calendar-section" }, Hc = {
|
|
|
10951
10949
|
}
|
|
10952
10950
|
});
|
|
10953
10951
|
function _n(e) {
|
|
10954
|
-
const a = ca(), t = ca(), n =
|
|
10952
|
+
const a = ca(), t = ca(), n = w(null), o = w({}), i = w(!1), r = f(() => e.loading() ?? i.value);
|
|
10955
10953
|
let s = null;
|
|
10956
10954
|
const u = () => {
|
|
10957
|
-
const
|
|
10958
|
-
if (!
|
|
10959
|
-
const v = (
|
|
10960
|
-
let
|
|
10961
|
-
|
|
10962
|
-
let b = v.left + v.width / 2 -
|
|
10963
|
-
b = Math.max(
|
|
10955
|
+
const k = e.triggerEl();
|
|
10956
|
+
if (!k || !n.value) return;
|
|
10957
|
+
const v = (k.closest(".toolkit-team-card") ?? k).getBoundingClientRect(), x = n.value.offsetWidth, T = n.value.offsetHeight, W = 4, M = 10;
|
|
10958
|
+
let $ = v.top - T - W;
|
|
10959
|
+
$ < M && ($ = v.bottom + W);
|
|
10960
|
+
let b = v.left + v.width / 2 - x / 2;
|
|
10961
|
+
b = Math.max(M, Math.min(b, window.innerWidth - x - M)), o.value = {
|
|
10964
10962
|
position: "fixed",
|
|
10965
|
-
top: `${
|
|
10963
|
+
top: `${$}px`,
|
|
10966
10964
|
left: `${b}px`,
|
|
10967
10965
|
zIndex: "10000"
|
|
10968
10966
|
};
|
|
10969
|
-
}, m = (
|
|
10970
|
-
const
|
|
10971
|
-
|
|
10972
|
-
}, c = (
|
|
10973
|
-
if (
|
|
10967
|
+
}, m = (k) => {
|
|
10968
|
+
const g = k.target;
|
|
10969
|
+
g && (n.value?.contains(g) || e.triggerEl()?.contains(g) || e.onClose());
|
|
10970
|
+
}, c = (k) => {
|
|
10971
|
+
if (k.key === "Escape") {
|
|
10974
10972
|
e.onClose();
|
|
10975
10973
|
return;
|
|
10976
10974
|
}
|
|
10977
|
-
if (
|
|
10975
|
+
if (k.key === "Enter" && k.target instanceof HTMLInputElement) {
|
|
10978
10976
|
e.onConfirmEnter?.();
|
|
10979
10977
|
return;
|
|
10980
10978
|
}
|
|
10981
|
-
if (
|
|
10982
|
-
const
|
|
10979
|
+
if (k.key === "Tab" && n.value) {
|
|
10980
|
+
const g = Array.from(
|
|
10983
10981
|
n.value.querySelectorAll(
|
|
10984
10982
|
"button:not([disabled]), input:not([disabled])"
|
|
10985
10983
|
)
|
|
10986
10984
|
);
|
|
10987
|
-
if (
|
|
10988
|
-
const v =
|
|
10989
|
-
|
|
10985
|
+
if (g.length === 0) return;
|
|
10986
|
+
const v = g[0], x = g[g.length - 1], T = document.activeElement;
|
|
10987
|
+
k.shiftKey && T === v ? (k.preventDefault(), x?.focus()) : !k.shiftKey && T === x && (k.preventDefault(), v?.focus());
|
|
10990
10988
|
}
|
|
10991
10989
|
}, h = () => {
|
|
10992
10990
|
document.addEventListener("mousedown", m), document.addEventListener("keydown", c), window.addEventListener("scroll", u, !0), window.addEventListener("resize", u), n.value && typeof ResizeObserver < "u" && (s = new ResizeObserver(u), s.observe(n.value));
|
|
10993
|
-
},
|
|
10991
|
+
}, p = () => {
|
|
10994
10992
|
document.removeEventListener("mousedown", m), document.removeEventListener("keydown", c), window.removeEventListener("scroll", u, !0), window.removeEventListener("resize", u), s?.disconnect(), s = null;
|
|
10995
10993
|
};
|
|
10996
10994
|
return Se(
|
|
10997
10995
|
() => e.isOpen(),
|
|
10998
|
-
async (
|
|
10999
|
-
if (
|
|
10996
|
+
async (k) => {
|
|
10997
|
+
if (k) {
|
|
11000
10998
|
e.onOpen?.(), i.value = !1, await ke(), await ke(), u(), h();
|
|
11001
|
-
const
|
|
10999
|
+
const g = e.focusTargetRef?.value?.$el.querySelector(
|
|
11002
11000
|
"input"
|
|
11003
11001
|
);
|
|
11004
|
-
|
|
11002
|
+
g?.focus({ preventScroll: !0 }), g?.select();
|
|
11005
11003
|
} else
|
|
11006
|
-
|
|
11004
|
+
p();
|
|
11007
11005
|
},
|
|
11008
11006
|
{ immediate: !0 }
|
|
11009
11007
|
), Se(
|
|
@@ -11013,15 +11011,15 @@ function _n(e) {
|
|
|
11013
11011
|
}
|
|
11014
11012
|
), Se(
|
|
11015
11013
|
() => e.loading(),
|
|
11016
|
-
(
|
|
11017
|
-
|
|
11014
|
+
(k) => {
|
|
11015
|
+
k === !1 && (i.value = !1);
|
|
11018
11016
|
}
|
|
11019
11017
|
), Se(
|
|
11020
11018
|
() => e.triggerEl(),
|
|
11021
11019
|
() => {
|
|
11022
11020
|
e.isOpen() && u();
|
|
11023
11021
|
}
|
|
11024
|
-
), _t(
|
|
11022
|
+
), _t(p), {
|
|
11025
11023
|
dialogId: a,
|
|
11026
11024
|
labelId: t,
|
|
11027
11025
|
panelRef: n,
|
|
@@ -11045,20 +11043,20 @@ const mh = ["id", "aria-labelledby"], fh = ["id"], hh = { class: "toolkit-team-c
|
|
|
11045
11043
|
},
|
|
11046
11044
|
emits: ["confirm", "close"],
|
|
11047
11045
|
setup(e, { emit: a }) {
|
|
11048
|
-
const t = e, n = a, o =
|
|
11046
|
+
const t = e, n = a, o = w(null), i = w(String(t.modelValue)), r = f(() => Math.max(t.min, t.max)), s = f(() => {
|
|
11049
11047
|
if (i.value === "") return NaN;
|
|
11050
|
-
const
|
|
11051
|
-
return Number.isInteger(
|
|
11052
|
-
}), u = f(() => i.value === "" ? "empty" : !Number.isInteger(s.value) || s.value < t.min ? "min" : s.value > r.value ? "max" : ""), m = f(() => s.value === t.modelValue), c = (
|
|
11053
|
-
const b = Math.max(t.min, Math.min(r.value, Math.floor(
|
|
11048
|
+
const $ = Number(i.value);
|
|
11049
|
+
return Number.isInteger($) ? $ : NaN;
|
|
11050
|
+
}), u = f(() => i.value === "" ? "empty" : !Number.isInteger(s.value) || s.value < t.min ? "min" : s.value > r.value ? "max" : ""), m = f(() => s.value === t.modelValue), c = ($) => {
|
|
11051
|
+
const b = Math.max(t.min, Math.min(r.value, Math.floor($)));
|
|
11054
11052
|
i.value = String(b);
|
|
11055
|
-
}, h = (
|
|
11056
|
-
i.value =
|
|
11057
|
-
},
|
|
11058
|
-
|
|
11059
|
-
},
|
|
11060
|
-
W.value || u.value || m.value || (
|
|
11061
|
-
}, { dialogId:
|
|
11053
|
+
}, h = ($) => {
|
|
11054
|
+
i.value = $.replace(/\D/g, "");
|
|
11055
|
+
}, p = ($) => {
|
|
11056
|
+
$.metaKey || $.ctrlKey || $.altKey || $.key.length === 1 && !/\d/.test($.key) && $.preventDefault();
|
|
11057
|
+
}, k = () => {
|
|
11058
|
+
W.value || u.value || m.value || (M(), n("confirm", s.value));
|
|
11059
|
+
}, { dialogId: g, labelId: v, panelRef: x, panelStyle: T, isConfirming: W, startConfirming: M } = _n({
|
|
11062
11060
|
isOpen: () => t.isOpen,
|
|
11063
11061
|
triggerEl: () => t.triggerEl,
|
|
11064
11062
|
modelValue: () => t.modelValue,
|
|
@@ -11067,17 +11065,17 @@ const mh = ["id", "aria-labelledby"], fh = ["id"], hh = { class: "toolkit-team-c
|
|
|
11067
11065
|
onOpen: () => {
|
|
11068
11066
|
i.value = String(t.modelValue);
|
|
11069
11067
|
},
|
|
11070
|
-
onConfirmEnter:
|
|
11068
|
+
onConfirmEnter: k,
|
|
11071
11069
|
focusTargetRef: o
|
|
11072
11070
|
});
|
|
11073
|
-
return (
|
|
11071
|
+
return ($, b) => (l(), j(Fe, { to: "body" }, [
|
|
11074
11072
|
C(dt, { name: "toolkit-team-card__collab-edit-fade" }, {
|
|
11075
11073
|
default: K(() => [
|
|
11076
11074
|
e.isOpen ? (l(), d("div", {
|
|
11077
11075
|
key: 0,
|
|
11078
|
-
id: De(
|
|
11076
|
+
id: De(g),
|
|
11079
11077
|
ref_key: "panelRef",
|
|
11080
|
-
ref:
|
|
11078
|
+
ref: x,
|
|
11081
11079
|
class: "toolkit-team-card__collab-edit",
|
|
11082
11080
|
style: ge(De(T)),
|
|
11083
11081
|
role: "dialog",
|
|
@@ -11086,7 +11084,7 @@ const mh = ["id", "aria-labelledby"], fh = ["id"], hh = { class: "toolkit-team-c
|
|
|
11086
11084
|
onClick: b[3] || (b[3] = ve(() => {
|
|
11087
11085
|
}, ["stop"]))
|
|
11088
11086
|
}, [
|
|
11089
|
-
|
|
11087
|
+
y("span", {
|
|
11090
11088
|
id: De(v),
|
|
11091
11089
|
class: "toolkit-team-card__collab-edit-label"
|
|
11092
11090
|
}, A(e.translations?.collaborators ?? "Collaborators"), 9, fh),
|
|
@@ -11098,7 +11096,7 @@ const mh = ["id", "aria-labelledby"], fh = ["id"], hh = { class: "toolkit-team-c
|
|
|
11098
11096
|
"model-value": i.value,
|
|
11099
11097
|
"is-error": !!u.value,
|
|
11100
11098
|
"onUpdate:modelValue": h,
|
|
11101
|
-
onKeydown:
|
|
11099
|
+
onKeydown: p
|
|
11102
11100
|
}, null, 8, ["model-value", "is-error"]),
|
|
11103
11101
|
C(Ne, {
|
|
11104
11102
|
title: e.translations?.decrease ?? "Decrease",
|
|
@@ -11152,8 +11150,8 @@ const mh = ["id", "aria-labelledby"], fh = ["id"], hh = { class: "toolkit-team-c
|
|
|
11152
11150
|
]),
|
|
11153
11151
|
_: 1
|
|
11154
11152
|
}, 8, ["title"]),
|
|
11155
|
-
b[4] || (b[4] =
|
|
11156
|
-
|
|
11153
|
+
b[4] || (b[4] = y("div", { class: "toolkit-team-card__collab-edit-divider" }, null, -1)),
|
|
11154
|
+
y("div", hh, [
|
|
11157
11155
|
C(be, {
|
|
11158
11156
|
type: "secondary",
|
|
11159
11157
|
size: "small",
|
|
@@ -11168,7 +11166,7 @@ const mh = ["id", "aria-labelledby"], fh = ["id"], hh = { class: "toolkit-team-c
|
|
|
11168
11166
|
shape: "roundBorder",
|
|
11169
11167
|
"is-loading": De(W),
|
|
11170
11168
|
disabled: De(W) || !!u.value || m.value,
|
|
11171
|
-
onClick:
|
|
11169
|
+
onClick: k
|
|
11172
11170
|
}, null, 8, ["label", "is-loading", "disabled"])
|
|
11173
11171
|
])
|
|
11174
11172
|
], 12, mh)) : _("", !0)
|
|
@@ -11197,13 +11195,13 @@ const mh = ["id", "aria-labelledby"], fh = ["id"], hh = { class: "toolkit-team-c
|
|
|
11197
11195
|
if (!b) return { start: "", end: "" };
|
|
11198
11196
|
const D = b.split(/\s*[-–—]\s*/).map((z) => z.trim());
|
|
11199
11197
|
return { start: D[0] ?? "", end: D[1] ?? "" };
|
|
11200
|
-
}, r =
|
|
11201
|
-
|
|
11198
|
+
}, r = w(null), s = i(t.modelValue), u = w(s.start), m = w(s.end), c = f(() => `${u.value} - ${m.value}`), h = (b) => /^\d{2}:\d{2}$/.test(b), p = f(() => h(u.value) && h(m.value)), k = f(() => c.value === t.modelValue), g = () => {
|
|
11199
|
+
M.value || !p.value || k.value || ($(), n("confirm", {
|
|
11202
11200
|
value: c.value,
|
|
11203
11201
|
startDatetime: o(t.startDatetime, u.value),
|
|
11204
11202
|
endDatetime: o(t.endDatetime, m.value)
|
|
11205
11203
|
}));
|
|
11206
|
-
}, { dialogId: v, labelId:
|
|
11204
|
+
}, { dialogId: v, labelId: x, panelRef: T, panelStyle: W, isConfirming: M, startConfirming: $ } = _n({
|
|
11207
11205
|
isOpen: () => t.isOpen,
|
|
11208
11206
|
triggerEl: () => t.triggerEl,
|
|
11209
11207
|
modelValue: () => t.modelValue,
|
|
@@ -11213,7 +11211,7 @@ const mh = ["id", "aria-labelledby"], fh = ["id"], hh = { class: "toolkit-team-c
|
|
|
11213
11211
|
const b = i(t.modelValue);
|
|
11214
11212
|
u.value = b.start, m.value = b.end;
|
|
11215
11213
|
},
|
|
11216
|
-
onConfirmEnter:
|
|
11214
|
+
onConfirmEnter: g,
|
|
11217
11215
|
focusTargetRef: r
|
|
11218
11216
|
});
|
|
11219
11217
|
return (b, D) => (l(), j(Fe, { to: "body" }, [
|
|
@@ -11228,15 +11226,15 @@ const mh = ["id", "aria-labelledby"], fh = ["id"], hh = { class: "toolkit-team-c
|
|
|
11228
11226
|
style: ge(De(W)),
|
|
11229
11227
|
role: "dialog",
|
|
11230
11228
|
"aria-modal": "true",
|
|
11231
|
-
"aria-labelledby": De(
|
|
11229
|
+
"aria-labelledby": De(x),
|
|
11232
11230
|
onClick: D[3] || (D[3] = ve(() => {
|
|
11233
11231
|
}, ["stop"]))
|
|
11234
11232
|
}, [
|
|
11235
|
-
|
|
11236
|
-
id: De(
|
|
11233
|
+
y("span", {
|
|
11234
|
+
id: De(x),
|
|
11237
11235
|
class: "toolkit-team-card__collab-edit-label"
|
|
11238
11236
|
}, A(e.translations?.time ?? "Time"), 9, ph),
|
|
11239
|
-
|
|
11237
|
+
y("div", bh, [
|
|
11240
11238
|
C(yt, {
|
|
11241
11239
|
ref_key: "startInputRef",
|
|
11242
11240
|
ref: r,
|
|
@@ -11245,7 +11243,7 @@ const mh = ["id", "aria-labelledby"], fh = ["id"], hh = { class: "toolkit-team-c
|
|
|
11245
11243
|
"model-value": u.value,
|
|
11246
11244
|
"onUpdate:modelValue": D[0] || (D[0] = (z) => u.value = z)
|
|
11247
11245
|
}, null, 8, ["model-value"]),
|
|
11248
|
-
D[4] || (D[4] =
|
|
11246
|
+
D[4] || (D[4] = y("span", { class: "toolkit-team-card__shift-time-edit-separator" }, "-", -1)),
|
|
11249
11247
|
C(yt, {
|
|
11250
11248
|
size: "x-small",
|
|
11251
11249
|
use24Hour: "",
|
|
@@ -11253,8 +11251,8 @@ const mh = ["id", "aria-labelledby"], fh = ["id"], hh = { class: "toolkit-team-c
|
|
|
11253
11251
|
"onUpdate:modelValue": D[1] || (D[1] = (z) => m.value = z)
|
|
11254
11252
|
}, null, 8, ["model-value"])
|
|
11255
11253
|
]),
|
|
11256
|
-
D[5] || (D[5] =
|
|
11257
|
-
|
|
11254
|
+
D[5] || (D[5] = y("div", { class: "toolkit-team-card__collab-edit-divider" }, null, -1)),
|
|
11255
|
+
y("div", yh, [
|
|
11258
11256
|
C(be, {
|
|
11259
11257
|
type: "secondary",
|
|
11260
11258
|
size: "small",
|
|
@@ -11267,9 +11265,9 @@ const mh = ["id", "aria-labelledby"], fh = ["id"], hh = { class: "toolkit-team-c
|
|
|
11267
11265
|
size: "small",
|
|
11268
11266
|
label: e.translations?.confirm ?? "Confirm",
|
|
11269
11267
|
shape: "roundBorder",
|
|
11270
|
-
"is-loading": De(
|
|
11271
|
-
disabled: De(
|
|
11272
|
-
onClick:
|
|
11268
|
+
"is-loading": De(M),
|
|
11269
|
+
disabled: De(M) || !p.value || k.value,
|
|
11270
|
+
onClick: g
|
|
11273
11271
|
}, null, 8, ["label", "is-loading", "disabled"])
|
|
11274
11272
|
])
|
|
11275
11273
|
], 12, gh)) : _("", !0)
|
|
@@ -11296,8 +11294,8 @@ const mh = ["id", "aria-labelledby"], fh = ["id"], hh = { class: "toolkit-team-c
|
|
|
11296
11294
|
() => a.needed > 0 ? (a.unconfirmed ?? 0) / a.needed * 100 : 0
|
|
11297
11295
|
);
|
|
11298
11296
|
return (r, s) => (l(), d("div", kh, [
|
|
11299
|
-
|
|
11300
|
-
|
|
11297
|
+
y("div", Mh, [
|
|
11298
|
+
y("div", xh, A(e.translations?.enrolments ?? "Enrolments") + " (" + A(t.value) + ") ", 1),
|
|
11301
11299
|
C(Dt, {
|
|
11302
11300
|
text: `${e.translations?.open ?? "Open"}: ${n.value}`,
|
|
11303
11301
|
color: "black",
|
|
@@ -11310,31 +11308,31 @@ const mh = ["id", "aria-labelledby"], fh = ["id"], hh = { class: "toolkit-team-c
|
|
|
11310
11308
|
"leading-icon": "people-outline"
|
|
11311
11309
|
}, null, 8, ["text"])
|
|
11312
11310
|
]),
|
|
11313
|
-
|
|
11314
|
-
|
|
11315
|
-
|
|
11316
|
-
|
|
11317
|
-
|
|
11311
|
+
y("div", $h, [
|
|
11312
|
+
y("div", Ph, A(e.translations?.confirmed ?? "Confirmed"), 1),
|
|
11313
|
+
y("div", Th, [
|
|
11314
|
+
y("div", Dh, [
|
|
11315
|
+
y("div", {
|
|
11318
11316
|
class: "toolkit-team-card-progress-tooltip__simple-bar-fill toolkit-team-card-progress-tooltip__simple-bar-fill--confirmed",
|
|
11319
11317
|
style: ge({ width: `${o.value}%` })
|
|
11320
11318
|
}, null, 4)
|
|
11321
11319
|
]),
|
|
11322
|
-
|
|
11320
|
+
y("div", _h, A(e.confirmed ?? 0) + "/" + A(e.needed), 1)
|
|
11323
11321
|
])
|
|
11324
11322
|
]),
|
|
11325
11323
|
(e.unconfirmed ?? 0) > 0 ? (l(), d("div", Ch, [
|
|
11326
|
-
|
|
11327
|
-
|
|
11328
|
-
|
|
11329
|
-
|
|
11324
|
+
y("div", Wh, A(e.translations?.unconfirmed ?? "Unconfirmed"), 1),
|
|
11325
|
+
y("div", Sh, [
|
|
11326
|
+
y("div", zh, [
|
|
11327
|
+
y("div", {
|
|
11330
11328
|
class: "toolkit-team-card-progress-tooltip__simple-bar-fill",
|
|
11331
11329
|
style: ge({ width: `${i.value}%` })
|
|
11332
11330
|
}, null, 4)
|
|
11333
11331
|
]),
|
|
11334
|
-
|
|
11332
|
+
y("div", Oh, A(e.unconfirmed ?? 0) + "/" + A(e.needed), 1)
|
|
11335
11333
|
])
|
|
11336
11334
|
])) : _("", !0),
|
|
11337
|
-
|
|
11335
|
+
y("div", Eh, A(e.translations?.clickProgressBar ?? "Click progress bar to edit"), 1)
|
|
11338
11336
|
]));
|
|
11339
11337
|
}
|
|
11340
11338
|
}), Ih = {
|
|
@@ -11395,34 +11393,34 @@ const mh = ["id", "aria-labelledby"], fh = ["id"], hh = { class: "toolkit-team-c
|
|
|
11395
11393
|
}), r = f(() => {
|
|
11396
11394
|
const B = /* @__PURE__ */ new Set();
|
|
11397
11395
|
return i.value.forEach((X) => B.add(X.groupIndex)), B.size;
|
|
11398
|
-
}), s =
|
|
11396
|
+
}), s = w([]), u = (B) => s.value[B] ?? 1 / 0, m = (B, X) => {
|
|
11399
11397
|
const R = u(B);
|
|
11400
11398
|
return R === 1 / 0 ? 0 : Math.max(0, X - R);
|
|
11401
|
-
}, c =
|
|
11399
|
+
}, c = w(null), h = w(null), p = w(!1), k = w([]), g = w([]), v = w(null), x = (B) => {
|
|
11402
11400
|
v.value = B;
|
|
11403
11401
|
}, T = () => {
|
|
11404
11402
|
n("progress-click", v.value);
|
|
11405
11403
|
}, W = (B) => {
|
|
11406
11404
|
n("edit-time-request", B);
|
|
11407
|
-
},
|
|
11405
|
+
}, M = (B, X) => {
|
|
11408
11406
|
h.value = X;
|
|
11409
|
-
},
|
|
11407
|
+
}, $ = () => {
|
|
11410
11408
|
const B = h.value;
|
|
11411
|
-
|
|
11409
|
+
p.value = !!B && B.scrollWidth > B.offsetWidth;
|
|
11412
11410
|
}, b = (B, X) => {
|
|
11413
|
-
|
|
11411
|
+
k.value[B] = X?.$el ?? null;
|
|
11414
11412
|
}, D = (B, X, R) => {
|
|
11415
11413
|
b(B, R);
|
|
11416
11414
|
}, z = (B) => {
|
|
11417
|
-
const X =
|
|
11415
|
+
const X = k.value[B];
|
|
11418
11416
|
if (!X) return;
|
|
11419
11417
|
const R = X.querySelector(".toolkit-label__text") ?? X;
|
|
11420
|
-
|
|
11418
|
+
g.value[B] = R.scrollWidth > R.offsetWidth;
|
|
11421
11419
|
}, H = () => {
|
|
11422
|
-
|
|
11420
|
+
$(), k.value.forEach((B, X) => {
|
|
11423
11421
|
if (!B) return;
|
|
11424
11422
|
const R = B.querySelector(".toolkit-label__text") ?? B;
|
|
11425
|
-
|
|
11423
|
+
g.value[X] = R.scrollWidth > R.offsetWidth;
|
|
11426
11424
|
});
|
|
11427
11425
|
}, Z = async () => {
|
|
11428
11426
|
const B = c.value;
|
|
@@ -11466,7 +11464,7 @@ const mh = ["id", "aria-labelledby"], fh = ["id"], hh = { class: "toolkit-team-c
|
|
|
11466
11464
|
R.type === "progressBar" ? (l(), d("div", {
|
|
11467
11465
|
key: 0,
|
|
11468
11466
|
ref_for: !0,
|
|
11469
|
-
ref: (E) =>
|
|
11467
|
+
ref: (E) => x(E),
|
|
11470
11468
|
class: "toolkit-team-card__progress-anchor",
|
|
11471
11469
|
onClick: ve(T, ["stop"])
|
|
11472
11470
|
}, [
|
|
@@ -11495,14 +11493,14 @@ const mh = ["id", "aria-labelledby"], fh = ["id"], hh = { class: "toolkit-team-c
|
|
|
11495
11493
|
title: R.isEditableShift ? e.translations?.editTime ?? "Edit time" : R.text,
|
|
11496
11494
|
position: "top-middle",
|
|
11497
11495
|
delay: 400,
|
|
11498
|
-
disabled: e.isOverlayOpen || !R.isEditableShift && !
|
|
11496
|
+
disabled: e.isOverlayOpen || !R.isEditableShift && !p.value
|
|
11499
11497
|
}, {
|
|
11500
11498
|
default: K(() => [
|
|
11501
|
-
|
|
11499
|
+
y("div", {
|
|
11502
11500
|
ref_for: !0,
|
|
11503
|
-
ref: (E) =>
|
|
11501
|
+
ref: (E) => M(R.isEditableShift, E),
|
|
11504
11502
|
class: ne(["toolkit-team-card__title toolkit-team-card--truncate", { "toolkit-team-card__title--editable": R.isEditableShift }]),
|
|
11505
|
-
onMouseenter:
|
|
11503
|
+
onMouseenter: $,
|
|
11506
11504
|
onClick: ve((E) => R.isEditableShift ? W(h.value) : void 0, ["stop"])
|
|
11507
11505
|
}, A(R.text), 43, Lh)
|
|
11508
11506
|
]),
|
|
@@ -11517,7 +11515,7 @@ const mh = ["id", "aria-labelledby"], fh = ["id"], hh = { class: "toolkit-team-c
|
|
|
11517
11515
|
"is-open": e.isOverlayOpen ? !1 : void 0
|
|
11518
11516
|
}, {
|
|
11519
11517
|
content: K(() => [
|
|
11520
|
-
|
|
11518
|
+
y("div", Ah, [
|
|
11521
11519
|
(l(!0), d(le, null, Ie(i.value.get(O).groupTexts, (E, ie) => (l(), d("div", {
|
|
11522
11520
|
key: ie,
|
|
11523
11521
|
class: "toolkit-team-card__inline-more-row"
|
|
@@ -11539,7 +11537,7 @@ const mh = ["id", "aria-labelledby"], fh = ["id"], hh = { class: "toolkit-team-c
|
|
|
11539
11537
|
title: R.isEditableShift ? e.translations?.editTime ?? "Edit time" : R.text,
|
|
11540
11538
|
position: "top-middle",
|
|
11541
11539
|
delay: 400,
|
|
11542
|
-
disabled: e.isOverlayOpen || !R.isEditableShift && !
|
|
11540
|
+
disabled: e.isOverlayOpen || !R.isEditableShift && !g.value[O]
|
|
11543
11541
|
}, {
|
|
11544
11542
|
default: K(() => [
|
|
11545
11543
|
C(Dt, {
|
|
@@ -11551,7 +11549,7 @@ const mh = ["id", "aria-labelledby"], fh = ["id"], hh = { class: "toolkit-team-c
|
|
|
11551
11549
|
size: "small",
|
|
11552
11550
|
class: ne(["toolkit-team-card__inline-label", { "toolkit-team-card__inline-label--editable": R.isEditableShift }]),
|
|
11553
11551
|
onMouseenter: (E) => z(O),
|
|
11554
|
-
onClick: ve((E) => R.isEditableShift ? W(
|
|
11552
|
+
onClick: ve((E) => R.isEditableShift ? W(k.value[O] ?? null) : void 0, ["stop"])
|
|
11555
11553
|
}, null, 8, ["data-label-item", "text", "class", "onMouseenter", "onClick"])
|
|
11556
11554
|
]),
|
|
11557
11555
|
_: 2
|
|
@@ -11599,7 +11597,7 @@ const mh = ["id", "aria-labelledby"], fh = ["id"], hh = { class: "toolkit-team-c
|
|
|
11599
11597
|
setup(e, { emit: a }) {
|
|
11600
11598
|
const t = e, n = f(() => t.rights?.update !== !1), o = a, i = (S, N, U) => {
|
|
11601
11599
|
o("user-click", { user: S, index: N, event: U });
|
|
11602
|
-
}, r =
|
|
11600
|
+
}, r = w(null), s = w(null), u = w(null), m = w(null), c = (S) => {
|
|
11603
11601
|
t.isDraggable && (s.value = S);
|
|
11604
11602
|
}, h = (S, N, U) => {
|
|
11605
11603
|
if (!t.isDraggable || s.value !== N || !U.dataTransfer) {
|
|
@@ -11608,11 +11606,11 @@ const mh = ["id", "aria-labelledby"], fh = ["id"], hh = { class: "toolkit-team-c
|
|
|
11608
11606
|
}
|
|
11609
11607
|
const he = { user: S, index: N, cardId: t.cardId };
|
|
11610
11608
|
U.dataTransfer.effectAllowed = "move", U.dataTransfer.setData(an, JSON.stringify(he)), o("user-drag-start", he);
|
|
11611
|
-
},
|
|
11612
|
-
s.value = null,
|
|
11613
|
-
},
|
|
11609
|
+
}, p = () => {
|
|
11610
|
+
s.value = null, k();
|
|
11611
|
+
}, k = () => {
|
|
11614
11612
|
u.value = null, m.value = null;
|
|
11615
|
-
},
|
|
11613
|
+
}, g = (S) => {
|
|
11616
11614
|
const N = S.dataTransfer?.getData(an);
|
|
11617
11615
|
if (!N) return null;
|
|
11618
11616
|
try {
|
|
@@ -11622,28 +11620,28 @@ const mh = ["id", "aria-labelledby"], fh = ["id"], hh = { class: "toolkit-team-c
|
|
|
11622
11620
|
}
|
|
11623
11621
|
}, v = (S) => {
|
|
11624
11622
|
t.isDraggable && (S.preventDefault(), S.dataTransfer && (S.dataTransfer.dropEffect = "move"), u.value = "add", m.value = null);
|
|
11625
|
-
},
|
|
11623
|
+
}, x = (S) => {
|
|
11626
11624
|
const N = S.relatedTarget;
|
|
11627
|
-
(!r.value || !N || !r.value.contains(N)) &&
|
|
11625
|
+
(!r.value || !N || !r.value.contains(N)) && k();
|
|
11628
11626
|
}, T = (S) => {
|
|
11629
11627
|
if (!t.isDraggable) return;
|
|
11630
11628
|
S.preventDefault();
|
|
11631
|
-
const N =
|
|
11632
|
-
|
|
11629
|
+
const N = g(S);
|
|
11630
|
+
k(), N && o("user-drop", { type: "add", dragged: N, cardId: t.cardId });
|
|
11633
11631
|
}, W = (S, N) => {
|
|
11634
11632
|
t.isDraggable && (N.preventDefault(), N.stopPropagation(), u.value = "replace", m.value = S);
|
|
11635
|
-
},
|
|
11633
|
+
}, M = (S, N, U) => {
|
|
11636
11634
|
if (!t.isDraggable) return;
|
|
11637
11635
|
U.preventDefault(), U.stopPropagation();
|
|
11638
|
-
const he =
|
|
11639
|
-
|
|
11636
|
+
const he = g(U);
|
|
11637
|
+
k(), he && o("user-drop", {
|
|
11640
11638
|
type: "replace",
|
|
11641
11639
|
dragged: he,
|
|
11642
11640
|
cardId: t.cardId,
|
|
11643
11641
|
targetUser: S,
|
|
11644
11642
|
targetIndex: N
|
|
11645
11643
|
});
|
|
11646
|
-
},
|
|
11644
|
+
}, $ = w(null), b = w(!1), D = w(!1), z = w(null), H = f(() => {
|
|
11647
11645
|
if (!Array.isArray(t.teamSummary)) return null;
|
|
11648
11646
|
const S = t.teamSummary.find(
|
|
11649
11647
|
(N) => typeof N == "object" && N !== null && N.teamSummary === !0
|
|
@@ -11665,7 +11663,7 @@ const mh = ["id", "aria-labelledby"], fh = ["id"], hh = { class: "toolkit-team-c
|
|
|
11665
11663
|
const S = H.value;
|
|
11666
11664
|
return S ? typeof S.confirmed == "number" && S.needed > 0 && S.confirmed >= S.needed : !1;
|
|
11667
11665
|
}), R = (S) => {
|
|
11668
|
-
n.value && (
|
|
11666
|
+
n.value && ($.value = S, !(b.value && t.saving) && (b.value = !b.value));
|
|
11669
11667
|
}, O = (S) => {
|
|
11670
11668
|
if (n.value && !(t.savingShiftTime && D.value)) {
|
|
11671
11669
|
if (D.value && z.value === S) {
|
|
@@ -11681,7 +11679,7 @@ const mh = ["id", "aria-labelledby"], fh = ["id"], hh = { class: "toolkit-team-c
|
|
|
11681
11679
|
"ai-scheduled": "checkmark-outline",
|
|
11682
11680
|
backup: "clock-outline",
|
|
11683
11681
|
rejected: "close-outline"
|
|
11684
|
-
}, ie = (S) => E[S ?? "confirmed"], se =
|
|
11682
|
+
}, ie = (S) => E[S ?? "confirmed"], se = w([]), F = w([]), fe = (S) => {
|
|
11685
11683
|
const N = se.value[S];
|
|
11686
11684
|
F.value[S] = !!N && N.scrollWidth > N.offsetWidth;
|
|
11687
11685
|
};
|
|
@@ -11690,7 +11688,7 @@ const mh = ["id", "aria-labelledby"], fh = ["id"], hh = { class: "toolkit-team-c
|
|
|
11690
11688
|
ref: r,
|
|
11691
11689
|
class: ne(["toolkit-team-card__body", { "toolkit-team-card__body--drop-add": u.value === "add" }]),
|
|
11692
11690
|
onDragover: v,
|
|
11693
|
-
onDragleave:
|
|
11691
|
+
onDragleave: x,
|
|
11694
11692
|
onDrop: T
|
|
11695
11693
|
}, [
|
|
11696
11694
|
e.teamSummary && e.teamSummary.length ? (l(), j(Nh, {
|
|
@@ -11714,7 +11712,7 @@ const mh = ["id", "aria-labelledby"], fh = ["id"], hh = { class: "toolkit-team-c
|
|
|
11714
11712
|
key: 1,
|
|
11715
11713
|
"is-open": b.value,
|
|
11716
11714
|
"model-value": H.value.needed,
|
|
11717
|
-
"trigger-el":
|
|
11715
|
+
"trigger-el": $.value,
|
|
11718
11716
|
min: e.minNeeded,
|
|
11719
11717
|
max: e.maxNeeded,
|
|
11720
11718
|
loading: e.saving,
|
|
@@ -11742,9 +11740,9 @@ const mh = ["id", "aria-labelledby"], fh = ["id"], hh = { class: "toolkit-team-c
|
|
|
11742
11740
|
onMouseenter: (we) => fe(he),
|
|
11743
11741
|
onClick: ve((we) => i(U, he, we), ["stop"]),
|
|
11744
11742
|
onDragstart: (we) => h(U, he, we),
|
|
11745
|
-
onDragend:
|
|
11743
|
+
onDragend: p,
|
|
11746
11744
|
onDragover: (we) => W(he, we),
|
|
11747
|
-
onDrop: (we) =>
|
|
11745
|
+
onDrop: (we) => M(U, he, we)
|
|
11748
11746
|
}, [
|
|
11749
11747
|
U.userStatus !== "ai-scheduled" ? (l(), j(de, {
|
|
11750
11748
|
key: 0,
|
|
@@ -11764,7 +11762,7 @@ const mh = ["id", "aria-labelledby"], fh = ["id"], hh = { class: "toolkit-team-c
|
|
|
11764
11762
|
disabled: B.value || !F.value[he]
|
|
11765
11763
|
}, {
|
|
11766
11764
|
default: K(() => [
|
|
11767
|
-
|
|
11765
|
+
y("span", {
|
|
11768
11766
|
ref_for: !0,
|
|
11769
11767
|
ref: (we) => se.value[he] = we,
|
|
11770
11768
|
class: "toolkit-team-card__user-name"
|
|
@@ -11772,7 +11770,7 @@ const mh = ["id", "aria-labelledby"], fh = ["id"], hh = { class: "toolkit-team-c
|
|
|
11772
11770
|
]),
|
|
11773
11771
|
_: 2
|
|
11774
11772
|
}, 1032, ["title", "disabled"]),
|
|
11775
|
-
|
|
11773
|
+
y("span", {
|
|
11776
11774
|
class: ne(["toolkit-team-card__user-more", { "toolkit-team-card__user-more--draggable": e.isDraggable }]),
|
|
11777
11775
|
onMousedown: ve((we) => c(he), ["stop"]),
|
|
11778
11776
|
onClick: N[4] || (N[4] = ve(() => {
|
|
@@ -11833,46 +11831,46 @@ const mh = ["id", "aria-labelledby"], fh = ["id"], hh = { class: "toolkit-team-c
|
|
|
11833
11831
|
},
|
|
11834
11832
|
emits: ["close", "action", "update:published"],
|
|
11835
11833
|
setup(e, { emit: a }) {
|
|
11836
|
-
const t = e, n = f(() => t.rights?.create !== !1), o = f(() => t.rights?.update !== !1), i = f(() => t.rights?.delete !== !1), r = a, s =
|
|
11834
|
+
const t = e, n = f(() => t.rights?.create !== !1), o = f(() => t.rights?.update !== !1), i = f(() => t.rights?.delete !== !1), r = a, s = w(null), u = w({}), m = w(t.isPublished ?? !0);
|
|
11837
11835
|
Se(
|
|
11838
11836
|
() => t.isPublished,
|
|
11839
|
-
(
|
|
11840
|
-
m.value =
|
|
11837
|
+
(g) => {
|
|
11838
|
+
m.value = g ?? !0;
|
|
11841
11839
|
}
|
|
11842
11840
|
);
|
|
11843
|
-
const c = (
|
|
11844
|
-
m.value =
|
|
11841
|
+
const c = (g) => {
|
|
11842
|
+
m.value = g, r("update:published", g);
|
|
11845
11843
|
}, h = () => {
|
|
11846
11844
|
if (!t.anchorEl || !s.value) return;
|
|
11847
|
-
const
|
|
11848
|
-
let
|
|
11849
|
-
const
|
|
11850
|
-
|
|
11845
|
+
const x = (t.anchorEl.closest(".toolkit-team-card") ?? t.anchorEl).getBoundingClientRect(), T = s.value.getBoundingClientRect(), W = window.innerWidth;
|
|
11846
|
+
let M = x.left + x.width / 2 - T.width / 2;
|
|
11847
|
+
const $ = x.top - T.height - 4;
|
|
11848
|
+
M < 8 && (M = 8), M + T.width > W - 8 && (M = W - T.width - 8), u.value = {
|
|
11851
11849
|
position: "fixed",
|
|
11852
|
-
top: `${
|
|
11853
|
-
left: `${
|
|
11850
|
+
top: `${$}px`,
|
|
11851
|
+
left: `${M}px`,
|
|
11854
11852
|
zIndex: "10000"
|
|
11855
11853
|
};
|
|
11856
|
-
},
|
|
11857
|
-
s.value && (s.value.contains(
|
|
11858
|
-
},
|
|
11859
|
-
if (
|
|
11854
|
+
}, p = (g) => {
|
|
11855
|
+
s.value && (s.value.contains(g.target) || r("close"));
|
|
11856
|
+
}, k = (g) => {
|
|
11857
|
+
if (g.key === "Escape") {
|
|
11860
11858
|
r("close");
|
|
11861
11859
|
return;
|
|
11862
11860
|
}
|
|
11863
|
-
if (!
|
|
11861
|
+
if (!g.ctrlKey && !g.metaKey) return;
|
|
11864
11862
|
let v = null;
|
|
11865
|
-
const
|
|
11866
|
-
|
|
11863
|
+
const x = g.key.toLowerCase();
|
|
11864
|
+
x === "m" && o.value ? v = "move" : x === "c" && n.value ? v = "copy" : x === "u" && o.value ? v = "edit" : g.key === "Backspace" && i.value && (v = "delete"), v && (g.preventDefault(), r("action", v));
|
|
11867
11865
|
};
|
|
11868
11866
|
return Se(
|
|
11869
11867
|
() => t.isOpen,
|
|
11870
|
-
async (
|
|
11871
|
-
|
|
11868
|
+
async (g) => {
|
|
11869
|
+
g ? (await ke(), await ke(), h(), setTimeout(h, 10), window.addEventListener("scroll", h, !0), window.addEventListener("resize", h), document.addEventListener("click", p, !0), document.addEventListener("keydown", k)) : (window.removeEventListener("scroll", h, !0), window.removeEventListener("resize", h), document.removeEventListener("click", p, !0), document.removeEventListener("keydown", k));
|
|
11872
11870
|
}
|
|
11873
11871
|
), wt(() => {
|
|
11874
|
-
window.removeEventListener("scroll", h, !0), window.removeEventListener("resize", h), document.removeEventListener("click",
|
|
11875
|
-
}), (
|
|
11872
|
+
window.removeEventListener("scroll", h, !0), window.removeEventListener("resize", h), document.removeEventListener("click", p, !0), document.removeEventListener("keydown", k);
|
|
11873
|
+
}), (g, v) => (l(), j(Fe, { to: "body" }, [
|
|
11876
11874
|
C(dt, { name: "toolkit-team-card-menu-fade" }, {
|
|
11877
11875
|
default: K(() => [
|
|
11878
11876
|
e.isOpen ? (l(), d("div", {
|
|
@@ -11884,15 +11882,15 @@ const mh = ["id", "aria-labelledby"], fh = ["id"], hh = { class: "toolkit-team-c
|
|
|
11884
11882
|
onClick: v[4] || (v[4] = ve(() => {
|
|
11885
11883
|
}, ["stop"]))
|
|
11886
11884
|
}, [
|
|
11887
|
-
|
|
11885
|
+
y("div", Gh, [
|
|
11888
11886
|
o.value ? (l(), j(Ne, {
|
|
11889
11887
|
key: 0,
|
|
11890
11888
|
position: "top-middle",
|
|
11891
11889
|
delay: 400
|
|
11892
11890
|
}, {
|
|
11893
11891
|
content: K(() => [
|
|
11894
|
-
|
|
11895
|
-
|
|
11892
|
+
y("div", Uh, [
|
|
11893
|
+
y("div", null, A(e.translations?.move ?? "Move"), 1),
|
|
11896
11894
|
C(pt, {
|
|
11897
11895
|
size: "small",
|
|
11898
11896
|
value: "M",
|
|
@@ -11907,7 +11905,7 @@ const mh = ["id", "aria-labelledby"], fh = ["id"], hh = { class: "toolkit-team-c
|
|
|
11907
11905
|
shape: "round",
|
|
11908
11906
|
size: "small",
|
|
11909
11907
|
"aria-label": e.translations?.move ?? "Move",
|
|
11910
|
-
onClick: v[0] || (v[0] = (
|
|
11908
|
+
onClick: v[0] || (v[0] = (x) => r("action", "move"))
|
|
11911
11909
|
}, {
|
|
11912
11910
|
textIcon: K(() => [
|
|
11913
11911
|
C(de, {
|
|
@@ -11927,8 +11925,8 @@ const mh = ["id", "aria-labelledby"], fh = ["id"], hh = { class: "toolkit-team-c
|
|
|
11927
11925
|
delay: 400
|
|
11928
11926
|
}, {
|
|
11929
11927
|
content: K(() => [
|
|
11930
|
-
|
|
11931
|
-
|
|
11928
|
+
y("div", Xh, [
|
|
11929
|
+
y("div", null, A(e.translations?.copy ?? "Copy"), 1),
|
|
11932
11930
|
C(pt, {
|
|
11933
11931
|
size: "small",
|
|
11934
11932
|
value: "C",
|
|
@@ -11943,7 +11941,7 @@ const mh = ["id", "aria-labelledby"], fh = ["id"], hh = { class: "toolkit-team-c
|
|
|
11943
11941
|
shape: "round",
|
|
11944
11942
|
size: "small",
|
|
11945
11943
|
"aria-label": e.translations?.copy ?? "Copy",
|
|
11946
|
-
onClick: v[1] || (v[1] = (
|
|
11944
|
+
onClick: v[1] || (v[1] = (x) => r("action", "copy"))
|
|
11947
11945
|
}, {
|
|
11948
11946
|
textIcon: K(() => [
|
|
11949
11947
|
C(de, {
|
|
@@ -11962,8 +11960,8 @@ const mh = ["id", "aria-labelledby"], fh = ["id"], hh = { class: "toolkit-team-c
|
|
|
11962
11960
|
delay: 400
|
|
11963
11961
|
}, {
|
|
11964
11962
|
content: K(() => [
|
|
11965
|
-
|
|
11966
|
-
|
|
11963
|
+
y("div", Qh, [
|
|
11964
|
+
y("div", null, A(e.translations?.edit ?? "Update"), 1),
|
|
11967
11965
|
C(pt, {
|
|
11968
11966
|
size: "small",
|
|
11969
11967
|
value: "U",
|
|
@@ -11978,7 +11976,7 @@ const mh = ["id", "aria-labelledby"], fh = ["id"], hh = { class: "toolkit-team-c
|
|
|
11978
11976
|
shape: "round",
|
|
11979
11977
|
size: "small",
|
|
11980
11978
|
"aria-label": e.translations?.edit ?? "Update",
|
|
11981
|
-
onClick: v[2] || (v[2] = (
|
|
11979
|
+
onClick: v[2] || (v[2] = (x) => r("action", "edit"))
|
|
11982
11980
|
}, {
|
|
11983
11981
|
textIcon: K(() => [
|
|
11984
11982
|
C(de, {
|
|
@@ -11997,8 +11995,8 @@ const mh = ["id", "aria-labelledby"], fh = ["id"], hh = { class: "toolkit-team-c
|
|
|
11997
11995
|
delay: 400
|
|
11998
11996
|
}, {
|
|
11999
11997
|
content: K(() => [
|
|
12000
|
-
|
|
12001
|
-
|
|
11998
|
+
y("div", Kh, [
|
|
11999
|
+
y("div", null, A(e.translations?.delete ?? "Delete"), 1),
|
|
12002
12000
|
C(pt, {
|
|
12003
12001
|
size: "small",
|
|
12004
12002
|
value: "Backspace",
|
|
@@ -12013,7 +12011,7 @@ const mh = ["id", "aria-labelledby"], fh = ["id"], hh = { class: "toolkit-team-c
|
|
|
12013
12011
|
shape: "round",
|
|
12014
12012
|
size: "small",
|
|
12015
12013
|
"aria-label": e.translations?.delete ?? "Delete",
|
|
12016
|
-
onClick: v[3] || (v[3] = (
|
|
12014
|
+
onClick: v[3] || (v[3] = (x) => r("action", "delete"))
|
|
12017
12015
|
}, {
|
|
12018
12016
|
textIcon: K(() => [
|
|
12019
12017
|
C(de, {
|
|
@@ -12029,7 +12027,7 @@ const mh = ["id", "aria-labelledby"], fh = ["id"], hh = { class: "toolkit-team-c
|
|
|
12029
12027
|
]),
|
|
12030
12028
|
o.value ? (l(), d("div", Jh)) : _("", !0),
|
|
12031
12029
|
o.value ? (l(), d("div", Zh, [
|
|
12032
|
-
|
|
12030
|
+
y("span", ev, A(m.value ? t.translations?.published ?? "Published" : t.translations?.notPublished ?? "Not published"), 1),
|
|
12033
12031
|
C(Ne, {
|
|
12034
12032
|
title: m.value ? e.translations?.unpublish ?? "Unpublish?" : e.translations?.publish ?? "Publish?",
|
|
12035
12033
|
position: "top-middle",
|
|
@@ -12072,7 +12070,7 @@ const mh = ["id", "aria-labelledby"], fh = ["id"], hh = { class: "toolkit-team-c
|
|
|
12072
12070
|
},
|
|
12073
12071
|
emits: ["menu-action", "update:status", "update:menu-open"],
|
|
12074
12072
|
setup(e, { emit: a }) {
|
|
12075
|
-
const t = e, n = a, o =
|
|
12073
|
+
const t = e, n = a, o = w(null), i = w(!1);
|
|
12076
12074
|
Se(i, (c) => n("update:menu-open", c));
|
|
12077
12075
|
const r = f(
|
|
12078
12076
|
() => t.rights?.create !== !1 || t.rights?.update !== !1 || t.rights?.delete !== !1
|
|
@@ -12092,56 +12090,56 @@ const mh = ["id", "aria-labelledby"], fh = ["id"], hh = { class: "toolkit-team-c
|
|
|
12092
12090
|
workers: c.filter((h) => h.userStatus === "rejected")
|
|
12093
12091
|
}
|
|
12094
12092
|
].filter((h) => h.workers.length > 0), m = f(() => {
|
|
12095
|
-
const c = t.translations?.published ?? "Published", h = t.translations?.notPublished ?? "Not published",
|
|
12093
|
+
const c = t.translations?.published ?? "Published", h = t.translations?.notPublished ?? "Not published", p = {
|
|
12096
12094
|
published: { color: "success", label: c },
|
|
12097
12095
|
unpublished: { color: "danger", label: h }
|
|
12098
12096
|
};
|
|
12099
|
-
return t.status ?
|
|
12097
|
+
return t.status ? p[t.status] : p.published;
|
|
12100
12098
|
});
|
|
12101
12099
|
return (c, h) => (l(), d("div", av, [
|
|
12102
|
-
|
|
12103
|
-
(l(!0), d(le, null, Ie(e.labels, (
|
|
12104
|
-
key:
|
|
12100
|
+
y("div", nv, [
|
|
12101
|
+
(l(!0), d(le, null, Ie(e.labels, (p, k) => (l(), j(ga, {
|
|
12102
|
+
key: k,
|
|
12105
12103
|
position: "top-middle",
|
|
12106
12104
|
delay: 400,
|
|
12107
12105
|
color: "dark",
|
|
12108
12106
|
"is-open": i.value ? !1 : void 0
|
|
12109
12107
|
}, ta({
|
|
12110
12108
|
default: K(() => [
|
|
12111
|
-
|
|
12112
|
-
|
|
12113
|
-
ot(" " + A(
|
|
12109
|
+
y("div", ov, [
|
|
12110
|
+
p.workers && p.workers.length ? (l(), d("span", iv, A(p.workers && p.workers.length), 1)) : _("", !0),
|
|
12111
|
+
ot(" " + A(p.text), 1)
|
|
12114
12112
|
])
|
|
12115
12113
|
]),
|
|
12116
12114
|
_: 2
|
|
12117
12115
|
}, [
|
|
12118
|
-
|
|
12116
|
+
p.workers && p.workers.length ? {
|
|
12119
12117
|
name: "content",
|
|
12120
12118
|
fn: K(() => [
|
|
12121
|
-
|
|
12122
|
-
|
|
12123
|
-
|
|
12124
|
-
|
|
12119
|
+
y("div", rv, [
|
|
12120
|
+
y("div", lv, [
|
|
12121
|
+
y("div", sv, A(p.text), 1),
|
|
12122
|
+
p.workers ? (l(), j(Dt, {
|
|
12125
12123
|
key: 0,
|
|
12126
|
-
text: `${e.translations?.open ?? "Open"}: ${
|
|
12124
|
+
text: `${e.translations?.open ?? "Open"}: ${p.workers?.length}`,
|
|
12127
12125
|
size: "small",
|
|
12128
12126
|
color: "black"
|
|
12129
12127
|
}, null, 8, ["text"])) : _("", !0)
|
|
12130
12128
|
]),
|
|
12131
|
-
|
|
12132
|
-
(l(!0), d(le, null, Ie(u(
|
|
12133
|
-
key:
|
|
12129
|
+
p.workers && p.workers.length ? (l(), d("div", uv, [
|
|
12130
|
+
(l(!0), d(le, null, Ie(u(p.workers), (g) => (l(), d(le, {
|
|
12131
|
+
key: g.label
|
|
12134
12132
|
}, [
|
|
12135
|
-
|
|
12136
|
-
(l(!0), d(le, null, Ie(
|
|
12137
|
-
key:
|
|
12133
|
+
g.label ? (l(), d("div", dv, A(g.label), 1)) : _("", !0),
|
|
12134
|
+
(l(!0), d(le, null, Ie(g.workers, (v, x) => (l(), d("div", {
|
|
12135
|
+
key: x,
|
|
12138
12136
|
class: "toolkit-team-card__label-worker"
|
|
12139
12137
|
}, [
|
|
12140
12138
|
C(Ut, {
|
|
12141
12139
|
user: { photo: v.photo, fullName: v.fullName },
|
|
12142
12140
|
size: "xx-small"
|
|
12143
12141
|
}, null, 8, ["user"]),
|
|
12144
|
-
|
|
12142
|
+
y("span", cv, A(v.fullName), 1)
|
|
12145
12143
|
]))), 128))
|
|
12146
12144
|
], 64))), 128))
|
|
12147
12145
|
])) : _("", !0)
|
|
@@ -12151,17 +12149,17 @@ const mh = ["id", "aria-labelledby"], fh = ["id"], hh = { class: "toolkit-team-c
|
|
|
12151
12149
|
} : void 0
|
|
12152
12150
|
]), 1032, ["is-open"]))), 128))
|
|
12153
12151
|
]),
|
|
12154
|
-
|
|
12152
|
+
y("div", {
|
|
12155
12153
|
class: ne(["toolkit-team-card__actions", { "is-menu-open": i.value }]),
|
|
12156
12154
|
onClick: ve(s, ["stop"])
|
|
12157
12155
|
}, [
|
|
12158
|
-
|
|
12156
|
+
y("div", mv, [
|
|
12159
12157
|
C(Dn, {
|
|
12160
12158
|
color: m.value.color,
|
|
12161
12159
|
isShadow: ""
|
|
12162
12160
|
}, null, 8, ["color"])
|
|
12163
12161
|
]),
|
|
12164
|
-
|
|
12162
|
+
y("div", fv, A(m.value.label), 1),
|
|
12165
12163
|
r.value ? (l(), j(Ne, {
|
|
12166
12164
|
key: 0,
|
|
12167
12165
|
title: e.translations?.teamActions ?? "Team actions",
|
|
@@ -12171,7 +12169,7 @@ const mh = ["id", "aria-labelledby"], fh = ["id"], hh = { class: "toolkit-team-c
|
|
|
12171
12169
|
"tooltip-class": "toolkit-team-card__actions-tooltip"
|
|
12172
12170
|
}, {
|
|
12173
12171
|
default: K(() => [
|
|
12174
|
-
|
|
12172
|
+
y("div", {
|
|
12175
12173
|
class: "toolkit-team-card__actions-more",
|
|
12176
12174
|
ref_key: "moreRef",
|
|
12177
12175
|
ref: o
|
|
@@ -12192,11 +12190,11 @@ const mh = ["id", "aria-labelledby"], fh = ["id"], hh = { class: "toolkit-team-c
|
|
|
12192
12190
|
"is-published": e.status === "published",
|
|
12193
12191
|
rights: e.rights,
|
|
12194
12192
|
translations: e.translations,
|
|
12195
|
-
onClose: h[0] || (h[0] = (
|
|
12196
|
-
onAction: h[1] || (h[1] = (
|
|
12197
|
-
i.value = !1, n("menu-action",
|
|
12193
|
+
onClose: h[0] || (h[0] = (p) => i.value = !1),
|
|
12194
|
+
onAction: h[1] || (h[1] = (p) => {
|
|
12195
|
+
i.value = !1, n("menu-action", p);
|
|
12198
12196
|
}),
|
|
12199
|
-
"onUpdate:published": h[2] || (h[2] = (
|
|
12197
|
+
"onUpdate:published": h[2] || (h[2] = (p) => n("update:status", p ? "published" : "unpublished"))
|
|
12200
12198
|
}, null, 8, ["is-open", "anchor-el", "is-published", "rights", "translations"])
|
|
12201
12199
|
]));
|
|
12202
12200
|
}
|
|
@@ -12223,7 +12221,7 @@ const mh = ["id", "aria-labelledby"], fh = ["id"], hh = { class: "toolkit-team-c
|
|
|
12223
12221
|
},
|
|
12224
12222
|
emits: ["click", "add-collaborator", "menu-action", "update:status", "update:needed", "update:shift-time", "user-click", "user-drag-start", "user-drop"],
|
|
12225
12223
|
setup(e, { emit: a }) {
|
|
12226
|
-
const t =
|
|
12224
|
+
const t = w(!1), n = e, o = a;
|
|
12227
12225
|
return (i, r) => (l(), d("div", {
|
|
12228
12226
|
class: ne(["toolkit-team-card", [`toolkit-team-card--${e.color}`, { "toolkit-team-card--selected": e.selected }]]),
|
|
12229
12227
|
onClick: r[9] || (r[9] = (s) => o("click", s))
|
|
@@ -12329,7 +12327,7 @@ const pv = { render: gv }, bv = { class: "toolkit-upload-document" }, yv = {
|
|
|
12329
12327
|
},
|
|
12330
12328
|
emits: ["update:modelValue", "files", "files-rejected", "upload-url", "cancel", "remove"],
|
|
12331
12329
|
setup(e, { emit: a }) {
|
|
12332
|
-
const t = e, n = a, o =
|
|
12330
|
+
const t = e, n = a, o = w(null), i = w(!1), r = w(!1), s = w(null), u = w(null), m = w(null), c = f(() => {
|
|
12333
12331
|
const q = s.value;
|
|
12334
12332
|
if (!q) return null;
|
|
12335
12333
|
const Q = q.lastIndexOf(".");
|
|
@@ -12342,11 +12340,11 @@ const pv = { render: gv }, bv = { class: "toolkit-upload-document" }, yv = {
|
|
|
12342
12340
|
re /= 1024, pe++;
|
|
12343
12341
|
const _e = pe === 0 || re >= 10 ? 0 : 1;
|
|
12344
12342
|
return `${re.toFixed(_e)} ${Q[pe]}`;
|
|
12345
|
-
},
|
|
12343
|
+
}, p = f(() => t.error || m.value ? "error" : t.uploading ? "uploading" : t.uploaded || r.value ? "uploaded" : "idle"), k = f(() => p.value === "idle" || p.value === "error"), g = f(() => t.translations?.title ?? "Drag & drop files here"), v = f(
|
|
12346
12344
|
() => t.translations?.subtitle ?? "or click below to browse your computer"
|
|
12347
|
-
),
|
|
12345
|
+
), x = f(() => t.translations?.selectFiles ?? "Select files"), T = f(() => t.translations?.uploadButton ?? "Upload"), W = f(() => t.translations?.urlPlaceholder ?? ""), M = f(
|
|
12348
12346
|
() => t.translations?.invalidUrl ?? "Please enter a valid URL starting with http:// or https://"
|
|
12349
|
-
),
|
|
12347
|
+
), $ = f(() => t.translations?.cancel ?? "Cancel"), b = f(() => t.translations?.remove ?? "Remove"), D = f(() => t.translations?.replaceFile ?? "Replace file"), z = f(
|
|
12350
12348
|
() => t.translations?.invalidFileType ?? "This file type is not supported. We support:"
|
|
12351
12349
|
), H = () => {
|
|
12352
12350
|
const q = z.value, Q = (se.value ?? []).filter((re) => re.startsWith("."));
|
|
@@ -12388,12 +12386,12 @@ const pv = { render: gv }, bv = { class: "toolkit-upload-document" }, yv = {
|
|
|
12388
12386
|
const Q = q.target;
|
|
12389
12387
|
fe(Q.files), Q.value = "";
|
|
12390
12388
|
}, N = () => {
|
|
12391
|
-
t.disabled || !
|
|
12389
|
+
t.disabled || !k.value || (i.value = !0);
|
|
12392
12390
|
}, U = (q) => {
|
|
12393
12391
|
const Q = q.relatedTarget, re = q.currentTarget;
|
|
12394
12392
|
Q && re && re.contains(Q) || (i.value = !1);
|
|
12395
12393
|
}, he = (q) => {
|
|
12396
|
-
i.value = !1, !(t.disabled || !
|
|
12394
|
+
i.value = !1, !(t.disabled || !k.value) && fe(q.dataTransfer?.files ?? null);
|
|
12397
12395
|
}, we = () => {
|
|
12398
12396
|
const q = (t.modelValue ?? "").trim();
|
|
12399
12397
|
if (!(!q || t.disabled || !E.value)) {
|
|
@@ -12413,35 +12411,35 @@ const pv = { render: gv }, bv = { class: "toolkit-upload-document" }, yv = {
|
|
|
12413
12411
|
ot(A(e.label), 1)
|
|
12414
12412
|
])
|
|
12415
12413
|
])) : _("", !0),
|
|
12416
|
-
|
|
12414
|
+
y("div", {
|
|
12417
12415
|
class: ne(["toolkit-upload-document__dropzone", {
|
|
12418
12416
|
"toolkit-upload-document__dropzone--active": i.value,
|
|
12419
12417
|
"toolkit-upload-document__dropzone--disabled": e.disabled,
|
|
12420
|
-
"toolkit-upload-document__dropzone--non-interactive": !
|
|
12418
|
+
"toolkit-upload-document__dropzone--non-interactive": !k.value
|
|
12421
12419
|
}]),
|
|
12422
|
-
role:
|
|
12423
|
-
tabindex:
|
|
12424
|
-
onClick: Q[2] || (Q[2] = (re) =>
|
|
12420
|
+
role: k.value ? "button" : void 0,
|
|
12421
|
+
tabindex: k.value ? 0 : -1,
|
|
12422
|
+
onClick: Q[2] || (Q[2] = (re) => k.value && ie()),
|
|
12425
12423
|
onKeydown: [
|
|
12426
|
-
Q[3] || (Q[3] = ze(ve((re) =>
|
|
12427
|
-
Q[4] || (Q[4] = ze(ve((re) =>
|
|
12424
|
+
Q[3] || (Q[3] = ze(ve((re) => k.value && ie(), ["prevent"]), ["enter"])),
|
|
12425
|
+
Q[4] || (Q[4] = ze(ve((re) => k.value && ie(), ["prevent"]), ["space"]))
|
|
12428
12426
|
],
|
|
12429
12427
|
onDragover: ve(N, ["prevent"]),
|
|
12430
12428
|
onDragenter: ve(N, ["prevent"]),
|
|
12431
12429
|
onDragleave: ve(U, ["prevent"]),
|
|
12432
12430
|
onDrop: ve(he, ["prevent"])
|
|
12433
12431
|
}, [
|
|
12434
|
-
|
|
12435
|
-
|
|
12436
|
-
|
|
12432
|
+
p.value === "uploaded" || p.value === "error" && c.value ? (l(), d(le, { key: 0 }, [
|
|
12433
|
+
y("div", kv, [
|
|
12434
|
+
y("div", Mv, [
|
|
12437
12435
|
c.value ? (l(), d(le, { key: 0 }, [
|
|
12438
|
-
|
|
12436
|
+
y("span", xv, A(c.value.base), 1),
|
|
12439
12437
|
c.value.ext ? (l(), d("span", $v, A(c.value.ext), 1)) : _("", !0)
|
|
12440
12438
|
], 64)) : (l(), d(le, { key: 1 }, [
|
|
12441
|
-
ot(A(
|
|
12439
|
+
ot(A(g.value), 1)
|
|
12442
12440
|
], 64))
|
|
12443
12441
|
]),
|
|
12444
|
-
|
|
12442
|
+
p.value === "uploaded" ? (l(), d("div", Pv, [
|
|
12445
12443
|
C(de, {
|
|
12446
12444
|
icon: "checkmark",
|
|
12447
12445
|
size: "8",
|
|
@@ -12455,21 +12453,21 @@ const pv = { render: gv }, bv = { class: "toolkit-upload-document" }, yv = {
|
|
|
12455
12453
|
})
|
|
12456
12454
|
]))
|
|
12457
12455
|
]),
|
|
12458
|
-
|
|
12459
|
-
|
|
12456
|
+
y("div", Dv, A(u.value !== null ? h(u.value) : v.value), 1),
|
|
12457
|
+
p.value === "error" ? (l(), d("div", _v, A(me.value), 1)) : _("", !0),
|
|
12460
12458
|
C(be, {
|
|
12461
12459
|
class: "toolkit-upload-document__action-button",
|
|
12462
|
-
type:
|
|
12460
|
+
type: p.value === "uploaded" ? "danger-faded" : "secondary",
|
|
12463
12461
|
size: "small",
|
|
12464
|
-
label:
|
|
12462
|
+
label: p.value === "uploaded" ? b.value : D.value,
|
|
12465
12463
|
disabled: e.disabled,
|
|
12466
|
-
onClick: Q[0] || (Q[0] = ve((re) =>
|
|
12464
|
+
onClick: Q[0] || (Q[0] = ve((re) => p.value === "uploaded" ? R() : ie(), ["stop"]))
|
|
12467
12465
|
}, null, 8, ["type", "label", "disabled"])
|
|
12468
12466
|
], 64)) : (l(), d(le, { key: 1 }, [
|
|
12469
12467
|
C(De(pv), { class: "toolkit-upload-document__file-icon" }),
|
|
12470
|
-
|
|
12471
|
-
|
|
12472
|
-
|
|
12468
|
+
y("div", Cv, [
|
|
12469
|
+
y("div", Wv, A(g.value), 1),
|
|
12470
|
+
p.value === "error" ? (l(), d("div", Sv, [
|
|
12473
12471
|
C(de, {
|
|
12474
12472
|
icon: "close-outline",
|
|
12475
12473
|
size: "10",
|
|
@@ -12477,33 +12475,33 @@ const pv = { render: gv }, bv = { class: "toolkit-upload-document" }, yv = {
|
|
|
12477
12475
|
})
|
|
12478
12476
|
])) : _("", !0)
|
|
12479
12477
|
]),
|
|
12480
|
-
|
|
12481
|
-
Q[6] || (Q[6] =
|
|
12478
|
+
p.value === "uploading" ? (l(), d("div", zv, [
|
|
12479
|
+
Q[6] || (Q[6] = y("span", {
|
|
12482
12480
|
class: "toolkit-upload-document__spinner",
|
|
12483
12481
|
"aria-hidden": "true"
|
|
12484
12482
|
}, null, -1)),
|
|
12485
|
-
|
|
12483
|
+
y("span", Ov, A(B.value) + "%", 1)
|
|
12486
12484
|
])) : (l(), d(le, { key: 1 }, [
|
|
12487
|
-
|
|
12488
|
-
|
|
12485
|
+
y("div", Ev, A(v.value), 1),
|
|
12486
|
+
p.value === "error" ? (l(), d("div", Vv, A(me.value), 1)) : _("", !0)
|
|
12489
12487
|
], 64)),
|
|
12490
|
-
|
|
12488
|
+
p.value === "uploading" ? (l(), j(be, {
|
|
12491
12489
|
key: 2,
|
|
12492
12490
|
type: "secondary",
|
|
12493
12491
|
size: "small",
|
|
12494
|
-
label:
|
|
12492
|
+
label: $.value,
|
|
12495
12493
|
onClick: ve(X, ["stop"])
|
|
12496
12494
|
}, null, 8, ["label"])) : (l(), j(be, {
|
|
12497
12495
|
key: 3,
|
|
12498
12496
|
class: "toolkit-upload-document__action-button",
|
|
12499
12497
|
type: "secondary",
|
|
12500
12498
|
size: "small",
|
|
12501
|
-
label:
|
|
12499
|
+
label: x.value,
|
|
12502
12500
|
disabled: e.disabled,
|
|
12503
12501
|
onClick: ve(ie, ["stop"])
|
|
12504
12502
|
}, null, 8, ["label", "disabled"]))
|
|
12505
12503
|
], 64)),
|
|
12506
|
-
|
|
12504
|
+
y("input", {
|
|
12507
12505
|
ref_key: "fileInputRef",
|
|
12508
12506
|
ref: o,
|
|
12509
12507
|
class: "toolkit-upload-document__file-input",
|
|
@@ -12517,7 +12515,7 @@ const pv = { render: gv }, bv = { class: "toolkit-upload-document" }, yv = {
|
|
|
12517
12515
|
}, null, 40, Iv)
|
|
12518
12516
|
], 42, wv),
|
|
12519
12517
|
e.showUrl ? (l(), d("div", Lv, [
|
|
12520
|
-
|
|
12518
|
+
y("div", Av, [
|
|
12521
12519
|
C(ut, {
|
|
12522
12520
|
class: "toolkit-upload-document__url-input",
|
|
12523
12521
|
size: "small",
|
|
@@ -12551,12 +12549,12 @@ const pv = { render: gv }, bv = { class: "toolkit-upload-document" }, yv = {
|
|
|
12551
12549
|
type: "secondary",
|
|
12552
12550
|
size: "small",
|
|
12553
12551
|
label: T.value,
|
|
12554
|
-
disabled: e.disabled || !O.value || !E.value ||
|
|
12552
|
+
disabled: e.disabled || !O.value || !E.value || p.value === "uploading" || p.value === "uploaded",
|
|
12555
12553
|
"is-loading": e.loading,
|
|
12556
12554
|
onClick: we
|
|
12557
12555
|
}, null, 8, ["label", "disabled", "is-loading"])
|
|
12558
12556
|
]),
|
|
12559
|
-
O.value && !E.value ? (l(), d("div", Nv, A(
|
|
12557
|
+
O.value && !E.value ? (l(), d("div", Nv, A(M.value), 1)) : _("", !0)
|
|
12560
12558
|
])) : _("", !0)
|
|
12561
12559
|
]));
|
|
12562
12560
|
}
|