sit-onyx 1.1.0-dev-20250924092358 → 2.0.0-dev-20250922064701
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -36,10 +36,10 @@ const hp = ["compact", "default", "cozy"], F = (n) => ({
|
|
|
36
36
|
emit: o,
|
|
37
37
|
key: "modelValue",
|
|
38
38
|
default: () => []
|
|
39
|
-
}), { disabled: r, exclusive: u } = ro(e), c = oe(e), { densityClass: d } = F(e), p = (y,
|
|
40
|
-
if (!
|
|
39
|
+
}), { disabled: r, exclusive: u } = ro(e), c = oe(e), { densityClass: d } = F(e), p = (y, b) => {
|
|
40
|
+
if (!b) {
|
|
41
41
|
if (!s.value.includes(y)) return;
|
|
42
|
-
s.value = s.value.filter((
|
|
42
|
+
s.value = s.value.filter((h) => h !== y);
|
|
43
43
|
return;
|
|
44
44
|
}
|
|
45
45
|
if (u.value) {
|
|
@@ -52,8 +52,8 @@ const hp = ["compact", "default", "cozy"], F = (n) => ({
|
|
|
52
52
|
u,
|
|
53
53
|
(y) => {
|
|
54
54
|
if (y && s.value.length > 1) {
|
|
55
|
-
const
|
|
56
|
-
s.value =
|
|
55
|
+
const b = s.value.at(-1);
|
|
56
|
+
s.value = b != null ? [b] : [];
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
59
|
{ immediate: !0 }
|
|
@@ -63,7 +63,7 @@ const hp = ["compact", "default", "cozy"], F = (n) => ({
|
|
|
63
63
|
updateOpen: p,
|
|
64
64
|
disabled: r,
|
|
65
65
|
skeleton: c
|
|
66
|
-
}), (y,
|
|
66
|
+
}), (y, b) => (i(), v(
|
|
67
67
|
"div",
|
|
68
68
|
{
|
|
69
69
|
class: I([
|
|
@@ -138,12 +138,12 @@ const gl = ["innerHTML"], z = /* @__PURE__ */ A({
|
|
|
138
138
|
});
|
|
139
139
|
Y(
|
|
140
140
|
() => t.value,
|
|
141
|
-
(y,
|
|
142
|
-
e?.updateOpen(y, e?.openItems.value.includes(y)), e?.updateOpen(
|
|
141
|
+
(y, b) => {
|
|
142
|
+
e?.updateOpen(y, e?.openItems.value.includes(y)), e?.updateOpen(b, !1);
|
|
143
143
|
}
|
|
144
144
|
);
|
|
145
145
|
const a = oe(t), { densityClass: s } = F(t), r = m(() => e?.disabled.value || t.disabled), u = m(() => e?.type.value ?? "default"), c = m(() => `header-${t.value.toString()}`), d = m(() => `panel-${t.value.toString()}`), p = m(() => a.value || e?.skeleton.value);
|
|
146
|
-
return (y,
|
|
146
|
+
return (y, b) => p.value ? (i(), _(Ce(u.value === "card" ? Z : "div"), {
|
|
147
147
|
key: 0,
|
|
148
148
|
class: I([
|
|
149
149
|
"onyx-component",
|
|
@@ -176,7 +176,7 @@ const gl = ["innerHTML"], z = /* @__PURE__ */ A({
|
|
|
176
176
|
"aria-expanded": o.value,
|
|
177
177
|
"aria-controls": d.value,
|
|
178
178
|
"aria-disabled": r.value,
|
|
179
|
-
onClick:
|
|
179
|
+
onClick: b[0] || (b[0] = Me((h) => o.value = !o.value, ["prevent"]))
|
|
180
180
|
}, [
|
|
181
181
|
f("div", El, [
|
|
182
182
|
C(y.$slots, "header")
|
|
@@ -450,8 +450,8 @@ const ds = (n, t) => Object.entries(n).every(
|
|
|
450
450
|
onToggle: d,
|
|
451
451
|
onSelect: p,
|
|
452
452
|
onActivateFirst: y,
|
|
453
|
-
onActivateLast:
|
|
454
|
-
onActivateNext:
|
|
453
|
+
onActivateLast: b,
|
|
454
|
+
onActivateNext: h,
|
|
455
455
|
onActivatePrevious: g,
|
|
456
456
|
templateRef: $
|
|
457
457
|
}) => {
|
|
@@ -464,24 +464,24 @@ const ds = (n, t) => Object.entries(n).every(
|
|
|
464
464
|
switch (R.key) {
|
|
465
465
|
case "ArrowUp":
|
|
466
466
|
if (R.preventDefault(), c.value == null)
|
|
467
|
-
return
|
|
467
|
+
return b?.();
|
|
468
468
|
g?.(c.value);
|
|
469
469
|
break;
|
|
470
470
|
case "ArrowDown":
|
|
471
471
|
if (R.preventDefault(), c.value == null)
|
|
472
472
|
return y?.();
|
|
473
|
-
|
|
473
|
+
h?.(c.value);
|
|
474
474
|
break;
|
|
475
475
|
case "Home":
|
|
476
476
|
R.preventDefault(), y?.();
|
|
477
477
|
break;
|
|
478
478
|
case "End":
|
|
479
|
-
R.preventDefault(),
|
|
479
|
+
R.preventDefault(), b?.();
|
|
480
480
|
break;
|
|
481
481
|
}
|
|
482
482
|
}, X = (R) => {
|
|
483
483
|
if (R.key === "Enter" && R.preventDefault(), !M.value && eo(R, _n))
|
|
484
|
-
return d?.(), R.key === " " && R.preventDefault(), R.key === "End" ?
|
|
484
|
+
return d?.(), R.key === " " && R.preventDefault(), R.key === "End" ? b?.() : y?.();
|
|
485
485
|
if (vs(R, w.value === "none"))
|
|
486
486
|
return K(c.value);
|
|
487
487
|
if (M.value && eo(R, xn))
|
|
@@ -554,32 +554,32 @@ const ds = (n, t) => Object.entries(n).every(
|
|
|
554
554
|
const t = pe(), e = pe(), o = Io(), a = Io(), s = pe(), r = m(() => ne(n.position) ?? "bottom");
|
|
555
555
|
Ye({
|
|
556
556
|
type: "keydown",
|
|
557
|
-
listener: (
|
|
557
|
+
listener: (b) => b.key === "Escape" && c(!1),
|
|
558
558
|
disabled: m(() => !n.isExpanded.value)
|
|
559
559
|
});
|
|
560
560
|
const u = bn(() => n.onToggle(), 200);
|
|
561
561
|
Y(n.isExpanded, () => u.abort());
|
|
562
|
-
const c = (
|
|
562
|
+
const c = (b, h = !1) => {
|
|
563
563
|
if (!n.disabled?.value) {
|
|
564
|
-
if (
|
|
564
|
+
if (b === n.isExpanded.value) {
|
|
565
565
|
u.abort();
|
|
566
566
|
return;
|
|
567
567
|
}
|
|
568
|
-
if (
|
|
568
|
+
if (h) {
|
|
569
569
|
u();
|
|
570
570
|
return;
|
|
571
571
|
}
|
|
572
572
|
n.onToggle();
|
|
573
573
|
}
|
|
574
|
-
}, d = (
|
|
575
|
-
const
|
|
574
|
+
}, d = (b) => {
|
|
575
|
+
const h = document.activeElement, g = h?.closest('[role="menu"]') || a.value;
|
|
576
576
|
if (!g) return;
|
|
577
577
|
const $ = Array.from(g.querySelectorAll('[role="menuitem"]')).filter((M) => M.closest('[role="menu"]') === g);
|
|
578
578
|
r.value === "top" && $.reverse();
|
|
579
579
|
let x = 0;
|
|
580
|
-
if (
|
|
581
|
-
const M = $.indexOf(
|
|
582
|
-
switch (
|
|
580
|
+
if (h) {
|
|
581
|
+
const M = $.indexOf(h);
|
|
582
|
+
switch (b) {
|
|
583
583
|
case "next":
|
|
584
584
|
x = M + 1;
|
|
585
585
|
break;
|
|
@@ -595,27 +595,27 @@ const ds = (n, t) => Object.entries(n).every(
|
|
|
595
595
|
}
|
|
596
596
|
}
|
|
597
597
|
$[x]?.focus();
|
|
598
|
-
}, p = (
|
|
599
|
-
switch (
|
|
598
|
+
}, p = (b) => {
|
|
599
|
+
switch (b.key) {
|
|
600
600
|
case "ArrowDown":
|
|
601
|
-
|
|
601
|
+
b.preventDefault(), d(r.value === "bottom" ? "next" : "prev");
|
|
602
602
|
break;
|
|
603
603
|
case "ArrowUp":
|
|
604
|
-
|
|
604
|
+
b.preventDefault(), d(r.value === "bottom" ? "prev" : "next");
|
|
605
605
|
break;
|
|
606
606
|
case "Home":
|
|
607
|
-
|
|
607
|
+
b.preventDefault(), d("first");
|
|
608
608
|
break;
|
|
609
609
|
case "End":
|
|
610
|
-
|
|
610
|
+
b.preventDefault(), d("last");
|
|
611
611
|
break;
|
|
612
612
|
case " ":
|
|
613
613
|
case "Enter":
|
|
614
|
-
if (
|
|
615
|
-
|
|
614
|
+
if (b.target instanceof HTMLInputElement) break;
|
|
615
|
+
b.preventDefault(), b.target.click();
|
|
616
616
|
break;
|
|
617
617
|
case "Escape":
|
|
618
|
-
|
|
618
|
+
b.preventDefault(), c(!1);
|
|
619
619
|
break;
|
|
620
620
|
}
|
|
621
621
|
}, y = m(() => {
|
|
@@ -723,12 +723,12 @@ const ds = (n, t) => Object.entries(n).every(
|
|
|
723
723
|
const t = /* @__PURE__ */ new Map(), e = (a) => (t.has(a) || t.set(a, { tabId: pe(), panelId: pe() }), t.get(a)), o = (a) => {
|
|
724
724
|
const s = a.target, r = Array.from(
|
|
725
725
|
s.parentElement?.querySelectorAll('[role="tab"]') ?? []
|
|
726
|
-
).filter((
|
|
727
|
-
|
|
728
|
-
}, d = () => c(r.at(0)), p = () => c(r.at(-1)), y = (
|
|
726
|
+
).filter((b) => b.ariaDisabled !== "true"), u = r.indexOf(s), c = (b) => {
|
|
727
|
+
b instanceof HTMLElement && b.focus();
|
|
728
|
+
}, d = () => c(r.at(0)), p = () => c(r.at(-1)), y = (b) => {
|
|
729
729
|
if (u === -1) return;
|
|
730
|
-
const
|
|
731
|
-
return
|
|
730
|
+
const h = b === "next" ? u + 1 : u - 1;
|
|
731
|
+
return h < 0 ? p() : h >= r.length ? d() : c(r.at(h));
|
|
732
732
|
};
|
|
733
733
|
switch (a.key) {
|
|
734
734
|
case "ArrowRight":
|
|
@@ -746,8 +746,8 @@ const ds = (n, t) => Object.entries(n).every(
|
|
|
746
746
|
case "Enter":
|
|
747
747
|
case " ":
|
|
748
748
|
{
|
|
749
|
-
const
|
|
750
|
-
|
|
749
|
+
const b = Array.from(t.entries()).find(([, { tabId: h }]) => h === s.id);
|
|
750
|
+
b && n.onSelect?.(b[0]);
|
|
751
751
|
}
|
|
752
752
|
break;
|
|
753
753
|
}
|
|
@@ -1390,10 +1390,10 @@ const ds = (n, t) => Object.entries(n).every(
|
|
|
1390
1390
|
offset: r = 0
|
|
1391
1391
|
}) => {
|
|
1392
1392
|
const u = V("-1000px"), c = V("-1000px"), { isIntersecting: d } = Fs(t), p = () => {
|
|
1393
|
-
const
|
|
1394
|
-
if (!
|
|
1393
|
+
const b = Ge(n.value), h = Ge(t.value);
|
|
1394
|
+
if (!b || !h)
|
|
1395
1395
|
return;
|
|
1396
|
-
const g =
|
|
1396
|
+
const g = h.getBoundingClientRect(), $ = b.getBoundingClientRect();
|
|
1397
1397
|
let x = 0, w = 0;
|
|
1398
1398
|
const M = ne(a) && ne(o) !== "center" && (ne(e) === "top" || ne(e) === "bottom") ? ne(o) === "left" || ne(s) ? g.left : g.right - $.width : g.left + g.width / 2 - $.width / 2;
|
|
1399
1399
|
switch (ne(e)) {
|
|
@@ -1462,8 +1462,8 @@ const ds = (n, t) => Object.entries(n).every(
|
|
|
1462
1462
|
a.value = e;
|
|
1463
1463
|
return;
|
|
1464
1464
|
}
|
|
1465
|
-
const p = (d.width - c.width + 32) / 2, y = d.width - c.width + 16,
|
|
1466
|
-
e === "right" &&
|
|
1465
|
+
const p = (d.width - c.width + 32) / 2, y = d.width - c.width + 16, b = window.innerWidth, h = c.left, g = b - c.right, $ = h >= p, x = g >= p;
|
|
1466
|
+
e === "right" && h >= y || e === "left" && g >= y || e === "center" && $ && x ? a.value = e : h > g ? a.value = "right" : a.value = "left";
|
|
1467
1467
|
}
|
|
1468
1468
|
};
|
|
1469
1469
|
}, fo = (n, t = "bottom") => {
|
|
@@ -1504,7 +1504,7 @@ const ds = (n, t) => Object.entries(n).every(
|
|
|
1504
1504
|
set: (R) => s.value = R,
|
|
1505
1505
|
get: () => typeof o.open == "boolean" && !o.disabled ? o.open : s.value
|
|
1506
1506
|
}), u = m(
|
|
1507
|
-
() => o.position === "auto" ?
|
|
1507
|
+
() => o.position === "auto" ? h.value : o.position
|
|
1508
1508
|
), c = m(
|
|
1509
1509
|
() => o.alignment === "auto" ? $.value : o.alignment
|
|
1510
1510
|
);
|
|
@@ -1526,19 +1526,19 @@ const ds = (n, t) => Object.entries(n).every(
|
|
|
1526
1526
|
return u.value + " span-left";
|
|
1527
1527
|
}
|
|
1528
1528
|
return u.value;
|
|
1529
|
-
}), y = J("popover"),
|
|
1530
|
-
|
|
1529
|
+
}), y = J("popover"), b = J("popoverWrapper"), { openDirection: h, updateOpenDirection: g } = fo(b, "bottom"), { openAlignment: $, updateOpenAlignment: x } = An(
|
|
1530
|
+
b,
|
|
1531
1531
|
y,
|
|
1532
1532
|
"left"
|
|
1533
1533
|
), { leftPosition: w, topPosition: M, updateAnchorPositionPolyfill: O, useragentSupportsAnchorApi: L } = On({
|
|
1534
1534
|
positionedRef: y,
|
|
1535
|
-
targetRef:
|
|
1535
|
+
targetRef: b,
|
|
1536
1536
|
positionArea: u,
|
|
1537
1537
|
alignment: c,
|
|
1538
1538
|
alignsWithEdge: !0,
|
|
1539
1539
|
fitParent: !1,
|
|
1540
1540
|
offset: 8
|
|
1541
|
-
}), { width: N } = He(
|
|
1541
|
+
}), { width: N } = He(b), K = (R) => {
|
|
1542
1542
|
R ? y.value?.showPopover?.() : y.value?.hidePopover?.();
|
|
1543
1543
|
}, H = () => {
|
|
1544
1544
|
g(), x();
|
|
@@ -1632,7 +1632,7 @@ const ds = (n, t) => Object.entries(n).every(
|
|
|
1632
1632
|
disabled: m(() => e.disabled),
|
|
1633
1633
|
position: m(() => u.value?.includes("top") ? "top" : "bottom")
|
|
1634
1634
|
});
|
|
1635
|
-
return (y,
|
|
1635
|
+
return (y, b) => (i(), _(vo, E(l(fe)(l(c), { ref: r.value }), {
|
|
1636
1636
|
class: "onyx-component onyx-flyout-menu",
|
|
1637
1637
|
open: l(a),
|
|
1638
1638
|
label: e.label,
|
|
@@ -1697,14 +1697,14 @@ const ds = (n, t) => Object.entries(n).every(
|
|
|
1697
1697
|
}), null, 16, ["class", "icon", "skeleton"])) : (i(), _(je, {
|
|
1698
1698
|
key: 1,
|
|
1699
1699
|
open: l(u),
|
|
1700
|
-
"onUpdate:open": y[0] || (y[0] = (
|
|
1700
|
+
"onUpdate:open": y[0] || (y[0] = (b) => Ee(u) ? u.value = b : null),
|
|
1701
1701
|
label: e.label,
|
|
1702
1702
|
trigger: "click",
|
|
1703
1703
|
class: I(["onyx-fab", `onyx-fab--${e.alignment}`, l(s)]),
|
|
1704
1704
|
alignment: e.alignment
|
|
1705
1705
|
}, {
|
|
1706
|
-
button: S(({ trigger:
|
|
1707
|
-
B(to, E(l(fe)(e,
|
|
1706
|
+
button: S(({ trigger: b }) => [
|
|
1707
|
+
B(to, E(l(fe)(e, b), {
|
|
1708
1708
|
label: e.label,
|
|
1709
1709
|
"hide-label": "",
|
|
1710
1710
|
icon: d.value
|
|
@@ -2099,11 +2099,11 @@ const oo = /* @__PURE__ */ Vt(Zs, [["render", Qs]]), Le = /* @__PURE__ */ A({
|
|
|
2099
2099
|
let n = 1;
|
|
2100
2100
|
const t = V([]), e = (a) => {
|
|
2101
2101
|
const s = n++;
|
|
2102
|
-
|
|
2102
|
+
t.value.unshift({
|
|
2103
2103
|
...a,
|
|
2104
2104
|
id: s,
|
|
2105
2105
|
onClose: () => o(s)
|
|
2106
|
-
})
|
|
2106
|
+
});
|
|
2107
2107
|
}, o = (a) => {
|
|
2108
2108
|
t.value = t.value.filter((s) => s.id !== a);
|
|
2109
2109
|
};
|
|
@@ -2122,7 +2122,7 @@ const oo = /* @__PURE__ */ Vt(Zs, [["render", Qs]]), Le = /* @__PURE__ */ A({
|
|
|
2122
2122
|
// provide fallback so "useNotification()" does not return "undefined"
|
|
2123
2123
|
() => ({
|
|
2124
2124
|
notifications: m(() => []),
|
|
2125
|
-
show:
|
|
2125
|
+
show: n,
|
|
2126
2126
|
remove: n
|
|
2127
2127
|
}),
|
|
2128
2128
|
!0
|
|
@@ -2499,9 +2499,9 @@ const oo = /* @__PURE__ */ Vt(Zs, [["render", Qs]]), Le = /* @__PURE__ */ A({
|
|
|
2499
2499
|
const u = Do(n.parentRef.value), c = Do(n.listRef.value);
|
|
2500
2500
|
a.value > 0 && (r -= a.value + u), t.value = [], e.value = [];
|
|
2501
2501
|
const d = Array.from(s.entries());
|
|
2502
|
-
ne(n.direction) === "ltr" && d.reverse(), d.forEach(([p, y],
|
|
2503
|
-
r -= y + (
|
|
2504
|
-
|
|
2502
|
+
ne(n.direction) === "ltr" && d.reverse(), d.forEach(([p, y], b, { length: h }) => {
|
|
2503
|
+
r -= y + (b > 0 ? c : 0), r >= 0 || // check if last element fits if more indicator would be hidden
|
|
2504
|
+
b === h - 1 && r + a.value >= 0 ? t.value.push(p) : e.value.push(p);
|
|
2505
2505
|
});
|
|
2506
2506
|
},
|
|
2507
2507
|
{
|
|
@@ -2630,13 +2630,13 @@ const oo = /* @__PURE__ */ Vt(Zs, [["render", Qs]]), Le = /* @__PURE__ */ A({
|
|
|
2630
2630
|
key: "open",
|
|
2631
2631
|
default: !1
|
|
2632
2632
|
}), d = J("backButtonRef"), p = J("menuItemRef"), {
|
|
2633
|
-
elements: { listItem: y, menuItem:
|
|
2633
|
+
elements: { listItem: y, menuItem: b }
|
|
2634
2634
|
} = yo({
|
|
2635
2635
|
onOpen: async () => {
|
|
2636
2636
|
x.value && (c.value = !0, await Ve(), d.value?.$el.querySelector("button").focus());
|
|
2637
2637
|
}
|
|
2638
|
-
}), { isActive:
|
|
2639
|
-
() =>
|
|
2638
|
+
}), { isActive: h } = rt(), g = m(() => s.active !== "auto" ? s.active : h.value(s.link)), $ = m(
|
|
2639
|
+
() => b({
|
|
2640
2640
|
active: g.value,
|
|
2641
2641
|
disabled: s.disabled
|
|
2642
2642
|
})
|
|
@@ -2751,7 +2751,7 @@ const oo = /* @__PURE__ */ Vt(Zs, [["render", Qs]]), Le = /* @__PURE__ */ A({
|
|
|
2751
2751
|
},
|
|
2752
2752
|
setup(n) {
|
|
2753
2753
|
const t = n, { restAttrs: e, rootAttrs: o } = ge(), { densityClass: a } = F(t), { currentRoute: s } = rt(), r = oe(t), { componentRef: u, isVisible: c } = Nn(zn), d = ve(Dn, void 0), p = m(() => t.href && t.active === "auto" ? t.href === s.value?.path : t.active);
|
|
2754
|
-
return (y,
|
|
2754
|
+
return (y, b) => (i(), v(
|
|
2755
2755
|
G,
|
|
2756
2756
|
null,
|
|
2757
2757
|
[
|
|
@@ -2790,9 +2790,9 @@ const oo = /* @__PURE__ */ Vt(Zs, [["render", Qs]]), Le = /* @__PURE__ */ A({
|
|
|
2790
2790
|
16
|
|
2791
2791
|
/* FULL_PROPS */
|
|
2792
2792
|
)) : k("v-if", !0),
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2793
|
+
(i(), _(st, {
|
|
2794
|
+
to: l(d),
|
|
2795
|
+
disabled: !l(d)
|
|
2796
2796
|
}, [
|
|
2797
2797
|
l(c) ? k("v-if", !0) : (i(), _(Ne, E({
|
|
2798
2798
|
key: 0,
|
|
@@ -2805,7 +2805,7 @@ const oo = /* @__PURE__ */ Vt(Zs, [["render", Qs]]), Le = /* @__PURE__ */ A({
|
|
|
2805
2805
|
_: 3
|
|
2806
2806
|
/* FORWARDED */
|
|
2807
2807
|
}, 16, ["link", "active"]))
|
|
2808
|
-
], 8, ["to"
|
|
2808
|
+
], 8, ["to", "disabled"]))
|
|
2809
2809
|
],
|
|
2810
2810
|
64
|
|
2811
2811
|
/* STABLE_FRAGMENT */
|
|
@@ -3089,10 +3089,10 @@ const oo = /* @__PURE__ */ Vt(Zs, [["render", Qs]]), Le = /* @__PURE__ */ A({
|
|
|
3089
3089
|
step: n.props.validStepSize
|
|
3090
3090
|
};
|
|
3091
3091
|
if (c === "typeMismatch") {
|
|
3092
|
-
const
|
|
3092
|
+
const b = Kr.includes(n.props.type) ? n.props.type : "generic";
|
|
3093
3093
|
return {
|
|
3094
|
-
longMessage: t.value(`validations.typeMismatch.${
|
|
3095
|
-
shortMessage: t.value(`validations.typeMismatch.${
|
|
3094
|
+
longMessage: t.value(`validations.typeMismatch.${b}.fullError`, y),
|
|
3095
|
+
shortMessage: t.value(`validations.typeMismatch.${b}.preview`, y)
|
|
3096
3096
|
};
|
|
3097
3097
|
}
|
|
3098
3098
|
return {
|
|
@@ -3155,11 +3155,11 @@ const oo = /* @__PURE__ */ Vt(Zs, [["render", Qs]]), Le = /* @__PURE__ */ A({
|
|
|
3155
3155
|
() => e.position === "auto" ? N.value : e.position
|
|
3156
3156
|
), y = m(
|
|
3157
3157
|
() => e.alignment === "auto" ? H.value : e.alignment
|
|
3158
|
-
),
|
|
3158
|
+
), b = m(() => {
|
|
3159
3159
|
let ke = p.value;
|
|
3160
3160
|
return (p.value === "top" || p.value === "bottom") && w.value && (y.value === "left" && (ke = p.value + " x-start"), y.value === "right" && (ke = p.value + " x-end")), ke;
|
|
3161
|
-
}),
|
|
3162
|
-
Y(d, () => g.value =
|
|
3161
|
+
}), h = () => d.value === "hover" ? ws(u.value) : ks(c.value), g = Ue(h());
|
|
3162
|
+
Y(d, () => g.value = h());
|
|
3163
3163
|
const $ = m(() => g.value?.elements.tooltip), x = m(() => ne(g.value?.elements.trigger)), w = m(() => e.alignsWithEdge), M = m(() => e.fitParent), O = J("tooltipWrapperRefEl"), L = J("tooltipRefEl"), { openDirection: N, updateOpenDirection: K } = fo(O, "top"), { openAlignment: H, updateOpenAlignment: X } = An(O, L), { leftPosition: ue, topPosition: P, updateAnchorPositionPolyfill: D, useragentSupportsAnchorApi: ee } = On({
|
|
3164
3164
|
positionedRef: L,
|
|
3165
3165
|
targetRef: O,
|
|
@@ -3199,7 +3199,7 @@ const oo = /* @__PURE__ */ Vt(Zs, [["render", Qs]]), Le = /* @__PURE__ */ A({
|
|
|
3199
3199
|
const et = pe(), me = m(() => `--anchor-${et}`), kt = m(() => ee.value ? {
|
|
3200
3200
|
width: Qe.value,
|
|
3201
3201
|
"position-anchor": me.value,
|
|
3202
|
-
"position-area":
|
|
3202
|
+
"position-area": b.value
|
|
3203
3203
|
} : {
|
|
3204
3204
|
width: Qe.value,
|
|
3205
3205
|
left: ue.value,
|
|
@@ -3318,8 +3318,8 @@ const oo = /* @__PURE__ */ Vt(Zs, [["render", Qs]]), Le = /* @__PURE__ */ A({
|
|
|
3318
3318
|
emit: a,
|
|
3319
3319
|
key: "modelValue",
|
|
3320
3320
|
default: !1
|
|
3321
|
-
}), { vCustomValidity: c, errorMessages: d } = Pe({ props: o, emit: a }), { densityClass: p } = F(o), { disabled: y, requiredMarker:
|
|
3322
|
-
return t({ input: w }), Ae(w, o), (M, O) => l(
|
|
3321
|
+
}), { vCustomValidity: c, errorMessages: d } = Pe({ props: o, emit: a }), { densityClass: p } = F(o), { disabled: y, requiredMarker: b } = be(o), h = oe(o), { requiredMarkerClass: g, requiredTypeClass: $ } = zt(o, b), x = m(() => o.hideLabel ? o.label : void 0), w = J("inputRef");
|
|
3322
|
+
return t({ input: w }), Ae(w, o), (M, O) => l(h) ? (i(), v(
|
|
3323
3323
|
"div",
|
|
3324
3324
|
E({
|
|
3325
3325
|
key: 0,
|
|
@@ -3540,7 +3540,7 @@ const oo = /* @__PURE__ */ Vt(Zs, [["render", Qs]]), Le = /* @__PURE__ */ A({
|
|
|
3540
3540
|
u.value = w ? [...u.value, x] : u.value.filter((M) => M !== x);
|
|
3541
3541
|
}, d = m(
|
|
3542
3542
|
() => o.options.filter((x) => !x.disabled && !x.skeleton).map(({ value: x }) => x)
|
|
3543
|
-
), { disabled: p, requiredMarker: y } = be(o),
|
|
3543
|
+
), { disabled: p, requiredMarker: y } = be(o), b = oe(o), h = qn(
|
|
3544
3544
|
d,
|
|
3545
3545
|
m(() => u.value),
|
|
3546
3546
|
(x) => u.value = x
|
|
@@ -3582,10 +3582,10 @@ const oo = /* @__PURE__ */ Vt(Zs, [["render", Qs]]), Le = /* @__PURE__ */ A({
|
|
|
3582
3582
|
}])
|
|
3583
3583
|
},
|
|
3584
3584
|
[
|
|
3585
|
-
l(
|
|
3585
|
+
l(b) ? typeof l(b) == "number" ? (i(!0), v(
|
|
3586
3586
|
G,
|
|
3587
3587
|
{ key: 1 },
|
|
3588
|
-
de(l(
|
|
3588
|
+
de(l(b), (M) => (i(), _(mt, {
|
|
3589
3589
|
key: M,
|
|
3590
3590
|
label: `Skeleton ${M}`,
|
|
3591
3591
|
value: `skeleton-${M}`,
|
|
@@ -3600,11 +3600,11 @@ const oo = /* @__PURE__ */ Vt(Zs, [["render", Qs]]), Le = /* @__PURE__ */ A({
|
|
|
3600
3600
|
o.withCheckAll ? (i(), _(mt, E({
|
|
3601
3601
|
key: 0,
|
|
3602
3602
|
"required-marker": l(y)
|
|
3603
|
-
}, l(
|
|
3603
|
+
}, l(h).state.value, {
|
|
3604
3604
|
label: g.value,
|
|
3605
3605
|
value: "all",
|
|
3606
3606
|
class: "onyx-checkbox-group__option onyx-checkbox-group__check-all",
|
|
3607
|
-
"onUpdate:modelValue": l(
|
|
3607
|
+
"onUpdate:modelValue": l(h).handleChange
|
|
3608
3608
|
}), null, 16, ["required-marker", "label", "onUpdate:modelValue"])) : k("v-if", !0),
|
|
3609
3609
|
(i(!0), v(
|
|
3610
3610
|
G,
|
|
@@ -3693,7 +3693,7 @@ const oo = /* @__PURE__ */ Vt(Zs, [["render", Qs]]), Le = /* @__PURE__ */ A({
|
|
|
3693
3693
|
"--onyx-table-observed-height": `${u.value}px`,
|
|
3694
3694
|
"--onyx-table-observed-width": `${c.value}px`
|
|
3695
3695
|
})), p = pe(), y = m(() => e.headline ? p : void 0);
|
|
3696
|
-
return (
|
|
3696
|
+
return (b, h) => (i(), v(
|
|
3697
3697
|
"div",
|
|
3698
3698
|
{
|
|
3699
3699
|
class: "onyx-table-wrapper onyx-component",
|
|
@@ -3702,10 +3702,10 @@ const oo = /* @__PURE__ */ Vt(Zs, [["render", Qs]]), Le = /* @__PURE__ */ A({
|
|
|
3702
3702
|
[
|
|
3703
3703
|
e.headline || e.actions ? (i(), v("div", li, [
|
|
3704
3704
|
f("div", { id: y.value }, [
|
|
3705
|
-
C(
|
|
3705
|
+
C(b.$slots, "headline")
|
|
3706
3706
|
], 8, si),
|
|
3707
3707
|
f("div", ri, [
|
|
3708
|
-
C(
|
|
3708
|
+
C(b.$slots, "actions")
|
|
3709
3709
|
])
|
|
3710
3710
|
])) : k("v-if", !0),
|
|
3711
3711
|
f("div", E({
|
|
@@ -3714,7 +3714,7 @@ const oo = /* @__PURE__ */ Vt(Zs, [["render", Qs]]), Le = /* @__PURE__ */ A({
|
|
|
3714
3714
|
{ "onyx-table-wrapper__container--no-scroll": t.withPageScrolling }
|
|
3715
3715
|
],
|
|
3716
3716
|
tabindex: t.withPageScrolling ? void 0 : 0
|
|
3717
|
-
},
|
|
3717
|
+
}, b.scrollContainerAttrs), [
|
|
3718
3718
|
f("table", {
|
|
3719
3719
|
ref: "tableRef",
|
|
3720
3720
|
class: I(["onyx-table onyx-text", [
|
|
@@ -3751,14 +3751,14 @@ const oo = /* @__PURE__ */ Vt(Zs, [["render", Qs]]), Le = /* @__PURE__ */ A({
|
|
|
3751
3751
|
/* KEYED_FRAGMENT */
|
|
3752
3752
|
))
|
|
3753
3753
|
])) : k("v-if", !0),
|
|
3754
|
-
C(
|
|
3754
|
+
C(b.$slots, "head")
|
|
3755
3755
|
])) : k("v-if", !0),
|
|
3756
3756
|
f("tbody", null, [
|
|
3757
|
-
C(
|
|
3757
|
+
C(b.$slots, "default", {}, () => [
|
|
3758
3758
|
f("tr", yi, [
|
|
3759
3759
|
f("td", fi, [
|
|
3760
3760
|
f("div", vi, [
|
|
3761
|
-
C(
|
|
3761
|
+
C(b.$slots, "empty", { defaultMessage: s.value }, () => [
|
|
3762
3762
|
B(Kn, null, {
|
|
3763
3763
|
default: S(() => [
|
|
3764
3764
|
W(
|
|
@@ -3780,10 +3780,10 @@ const oo = /* @__PURE__ */ Vt(Zs, [["render", Qs]]), Le = /* @__PURE__ */ A({
|
|
|
3780
3780
|
], 16, ii),
|
|
3781
3781
|
e.bottomLeft || e.pagination ? (i(), v("div", hi, [
|
|
3782
3782
|
f("div", null, [
|
|
3783
|
-
C(
|
|
3783
|
+
C(b.$slots, "bottomLeft")
|
|
3784
3784
|
]),
|
|
3785
3785
|
f("div", null, [
|
|
3786
|
-
C(
|
|
3786
|
+
C(b.$slots, "pagination")
|
|
3787
3787
|
])
|
|
3788
3788
|
])) : k("v-if", !0)
|
|
3789
3789
|
],
|
|
@@ -3929,7 +3929,7 @@ const oo = /* @__PURE__ */ Vt(Zs, [["render", Qs]]), Le = /* @__PURE__ */ A({
|
|
|
3929
3929
|
* Focuses the input.
|
|
3930
3930
|
*/
|
|
3931
3931
|
focus: () => p.value?.focus()
|
|
3932
|
-
}), (
|
|
3932
|
+
}), (b, h) => (i(), v(
|
|
3933
3933
|
"div",
|
|
3934
3934
|
E({
|
|
3935
3935
|
class: ["onyx-component", "onyx-mini-search", l(c)]
|
|
@@ -3939,7 +3939,7 @@ const oo = /* @__PURE__ */ Vt(Zs, [["render", Qs]]), Le = /* @__PURE__ */ A({
|
|
|
3939
3939
|
[
|
|
3940
3940
|
xe(f("input", E({
|
|
3941
3941
|
ref: "inputRef",
|
|
3942
|
-
"onUpdate:modelValue":
|
|
3942
|
+
"onUpdate:modelValue": h[0] || (h[0] = (g) => Ee(s) ? s.value = g : null),
|
|
3943
3943
|
autofocus: o.autofocus,
|
|
3944
3944
|
class: "onyx-mini-search__input onyx-text",
|
|
3945
3945
|
placeholder: y.value,
|
|
@@ -3955,9 +3955,9 @@ const oo = /* @__PURE__ */ Vt(Zs, [["render", Qs]]), Le = /* @__PURE__ */ A({
|
|
|
3955
3955
|
class: "onyx-mini-search__clear",
|
|
3956
3956
|
"aria-label": l(d)("select.clearSearch"),
|
|
3957
3957
|
tabindex: "-1",
|
|
3958
|
-
onMousedown:
|
|
3958
|
+
onMousedown: h[1] || (h[1] = Me(() => {
|
|
3959
3959
|
}, ["prevent"])),
|
|
3960
|
-
onClick:
|
|
3960
|
+
onClick: h[2] || (h[2] = (g) => a("clear"))
|
|
3961
3961
|
}, [
|
|
3962
3962
|
B(z, { icon: l(De) }, null, 8, ["icon"])
|
|
3963
3963
|
], 40, _i),
|
|
@@ -4119,7 +4119,7 @@ const Ci = (n, t) => {
|
|
|
4119
4119
|
return ki(u.value, x);
|
|
4120
4120
|
}), d = m(() => na(r)), p = () => Ci(c.value, ne(o)), y = () => fe(
|
|
4121
4121
|
...r.map(({ scrollContainerAttributes: x }) => x?.())
|
|
4122
|
-
),
|
|
4122
|
+
), b = () => {
|
|
4123
4123
|
const x = r.map((O) => O.header).filter((O) => !!O), w = x.map((O) => O.actions).filter((O) => !!O), M = x.map((O) => O.wrapper).filter((O) => !!O);
|
|
4124
4124
|
return c.value.map((O, L, N) => {
|
|
4125
4125
|
const K = w.flatMap((U) => U(O, L, N)), H = d.value.getFor("header", O.type.name), X = K.map(({ menuItems: U }) => U).filter((U) => !!U), ue = K.map(({ iconComponent: U }) => U), P = le(
|
|
@@ -4159,7 +4159,7 @@ const Ci = (n, t) => {
|
|
|
4159
4159
|
component: () => le(ee)
|
|
4160
4160
|
};
|
|
4161
4161
|
});
|
|
4162
|
-
},
|
|
4162
|
+
}, h = (x) => {
|
|
4163
4163
|
const w = r.map((O) => O.mutation).filter((O) => !!O).sort((O, L) => (L.order ?? 0) - (O.order ?? 0));
|
|
4164
4164
|
let M = [...x];
|
|
4165
4165
|
return w.forEach(({ func: O }) => {
|
|
@@ -4206,9 +4206,9 @@ const Ci = (n, t) => {
|
|
|
4206
4206
|
/** Uses the column definition and available column group config to generate the column groups for the underlying OnyxTable */
|
|
4207
4207
|
createRendererColumnGroups: p,
|
|
4208
4208
|
/** Takes the column definition and maps all, calls mutation func and maps at the end to RendererCell */
|
|
4209
|
-
createRendererRows:
|
|
4209
|
+
createRendererRows: h,
|
|
4210
4210
|
/** Takes the column definition and creates a RenderHeader for each, adds actions from features */
|
|
4211
|
-
createRendererColumns:
|
|
4211
|
+
createRendererColumns: b,
|
|
4212
4212
|
/** Uses all features and generates the content of the additional table slots (headline, pagination etc.) for the underlying OnyxTable */
|
|
4213
4213
|
createSlots: g,
|
|
4214
4214
|
// the combined `watch` for all features
|
|
@@ -4235,14 +4235,14 @@ const Ci = (n, t) => {
|
|
|
4235
4235
|
}, Bi = Symbol("Filtering"), wo = 0, Oi = (n) => (t) => {
|
|
4236
4236
|
const { i18n: e } = t, o = ie(n?.filterState ?? {}), a = m(() => ne(n?.columns)), { isEnabled: s, isAsync: r } = ut(t, n), u = (p) => r.value ? p : p.filter(
|
|
4237
4237
|
(y) => Object.entries(o.value).every(
|
|
4238
|
-
([
|
|
4239
|
-
const g = a.value?.[
|
|
4240
|
-
if (
|
|
4241
|
-
let x =
|
|
4238
|
+
([b, h]) => {
|
|
4239
|
+
const g = a.value?.[b], $ = { ...n?.filterConfig, ...g?.config };
|
|
4240
|
+
if (h == null || h === "") return !0;
|
|
4241
|
+
let x = h.toString(), w = y[b]?.toString() ?? "";
|
|
4242
4242
|
return $?.filterFunc ? $.filterFunc(
|
|
4243
4243
|
x,
|
|
4244
4244
|
w,
|
|
4245
|
-
|
|
4245
|
+
b,
|
|
4246
4246
|
y
|
|
4247
4247
|
) : (w = At(w), x = At(x), $.caseSensitive || (w = w.toLowerCase(), x = x.toLowerCase()), $.searchFromStart ? w.startsWith(x) : $.exactMatch ? w === x : w.includes(x));
|
|
4248
4248
|
}
|
|
@@ -4251,8 +4251,8 @@ const Ci = (n, t) => {
|
|
|
4251
4251
|
o.value[p] = "";
|
|
4252
4252
|
}, d = (p) => {
|
|
4253
4253
|
let y = o.value[p] || "";
|
|
4254
|
-
const
|
|
4255
|
-
|
|
4254
|
+
const b = (h) => {
|
|
4255
|
+
h.key === "Enter" && (o.value[p] = y);
|
|
4256
4256
|
};
|
|
4257
4257
|
return le(Wn, {
|
|
4258
4258
|
label: e.t.value("dataGrid.head.filtering.menu.label", { column: p.toString() }),
|
|
@@ -4261,16 +4261,16 @@ const Ci = (n, t) => {
|
|
|
4261
4261
|
modelValue: y,
|
|
4262
4262
|
// TODO: check after https://github.com/SchwarzIT/onyx/issues/2982 is closed -- `autofocus` doesn't have an effect currently
|
|
4263
4263
|
autofocus: !0,
|
|
4264
|
-
"onUpdate:modelValue": (
|
|
4265
|
-
y =
|
|
4264
|
+
"onUpdate:modelValue": (h) => {
|
|
4265
|
+
y = h || "";
|
|
4266
4266
|
},
|
|
4267
4267
|
onClear: () => {
|
|
4268
4268
|
o.value[p] = "", y = "";
|
|
4269
4269
|
},
|
|
4270
4270
|
onChange: () => o.value[p] = y,
|
|
4271
|
-
onKeydown:
|
|
4272
|
-
onClick: (
|
|
4273
|
-
|
|
4271
|
+
onKeydown: b,
|
|
4272
|
+
onClick: (h) => {
|
|
4273
|
+
h.preventDefault(), h.stopPropagation();
|
|
4274
4274
|
}
|
|
4275
4275
|
});
|
|
4276
4276
|
};
|
|
@@ -4425,26 +4425,26 @@ const Ci = (n, t) => {
|
|
|
4425
4425
|
key: "modelValue"
|
|
4426
4426
|
}), c = m(() => {
|
|
4427
4427
|
if (e.withCounter && e.maxlength) {
|
|
4428
|
-
const p = (u.value?.toString() ?? "").length, y = typeof e.maxlength == "object" ? e.maxlength.max : e.maxlength,
|
|
4428
|
+
const p = (u.value?.toString() ?? "").length, y = typeof e.maxlength == "object" ? e.maxlength.max : e.maxlength, b = p > y;
|
|
4429
4429
|
return {
|
|
4430
4430
|
length: p,
|
|
4431
4431
|
maxLength: y,
|
|
4432
|
-
violated:
|
|
4432
|
+
violated: b
|
|
4433
4433
|
};
|
|
4434
4434
|
}
|
|
4435
4435
|
}), d = m(() => {
|
|
4436
|
-
const { errorMessages: p, successMessages: y, message:
|
|
4436
|
+
const { errorMessages: p, successMessages: y, message: b } = e, h = {
|
|
4437
4437
|
counter: c.value,
|
|
4438
4438
|
errorMessages: p,
|
|
4439
4439
|
successMessages: y,
|
|
4440
|
-
message:
|
|
4440
|
+
message: b
|
|
4441
4441
|
};
|
|
4442
|
-
for (const g in
|
|
4442
|
+
for (const g in h) {
|
|
4443
4443
|
const $ = g;
|
|
4444
|
-
|
|
4444
|
+
h[$] == null && delete h[$];
|
|
4445
4445
|
}
|
|
4446
|
-
if (Object.keys(
|
|
4447
|
-
return
|
|
4446
|
+
if (Object.keys(h).length !== 0)
|
|
4447
|
+
return h;
|
|
4448
4448
|
});
|
|
4449
4449
|
return (p, y) => (i(), v(
|
|
4450
4450
|
"div",
|
|
@@ -4561,7 +4561,7 @@ const Ci = (n, t) => {
|
|
|
4561
4561
|
},
|
|
4562
4562
|
emits: ["inputClick", "validityChange"],
|
|
4563
4563
|
setup(n, { expose: t, emit: e }) {
|
|
4564
|
-
const { rootAttrs: o, restAttrs: a } = ge(), s = n, r = e, { t: u } = q(), { vCustomValidity: c, errorMessages: d } = Pe({ props: s, emit: r }), p = m(() => Be(s.success)), y = m(() => Be(s.message)), { disabled:
|
|
4564
|
+
const { rootAttrs: o, restAttrs: a } = ge(), s = n, r = e, { t: u } = q(), { vCustomValidity: c, errorMessages: d } = Pe({ props: s, emit: r }), p = m(() => Be(s.success)), y = m(() => Be(s.message)), { disabled: b, showError: h } = be(s), g = oe(s), $ = _t(h), x = m(() => s.modelValue ? s.modelValue.length : 0), w = m(() => {
|
|
4565
4565
|
const H = s.modelValue?.length;
|
|
4566
4566
|
if (!s.modelValue || !H) return "";
|
|
4567
4567
|
if (H === 1) return s.modelValue[0];
|
|
@@ -4618,7 +4618,7 @@ const Ci = (n, t) => {
|
|
|
4618
4618
|
default: S(({ id: ue }) => [
|
|
4619
4619
|
f("div", {
|
|
4620
4620
|
class: "onyx-select-input__wrapper",
|
|
4621
|
-
onClick: X[0] || (X[0] = (P) => !l(
|
|
4621
|
+
onClick: X[0] || (X[0] = (P) => !l(b) && !s.loading && r("inputClick"))
|
|
4622
4622
|
}, [
|
|
4623
4623
|
s.loading ? (i(), _(Le, {
|
|
4624
4624
|
key: 0,
|
|
@@ -4639,7 +4639,7 @@ const Ci = (n, t) => {
|
|
|
4639
4639
|
readonly: s.readonly,
|
|
4640
4640
|
placeholder: s.placeholder,
|
|
4641
4641
|
required: s.required,
|
|
4642
|
-
disabled: l(
|
|
4642
|
+
disabled: l(b) || s.loading,
|
|
4643
4643
|
"aria-label": s.hideLabel ? s.label : void 0,
|
|
4644
4644
|
title: s.hideLabel ? s.label : void 0,
|
|
4645
4645
|
value: w.value,
|
|
@@ -4682,7 +4682,7 @@ const Ci = (n, t) => {
|
|
|
4682
4682
|
"aria-label": l(u)("select.toggleDropDown"),
|
|
4683
4683
|
title: l(u)("select.toggleDropDown"),
|
|
4684
4684
|
tabindex: "-1",
|
|
4685
|
-
disabled: l(
|
|
4685
|
+
disabled: l(b) || s.readonly || s.loading
|
|
4686
4686
|
}, [
|
|
4687
4687
|
B(z, { icon: l(Na) }, null, 8, ["icon"])
|
|
4688
4688
|
], 8, zi),
|
|
@@ -4832,7 +4832,7 @@ const Ci = (n, t) => {
|
|
|
4832
4832
|
emit: a,
|
|
4833
4833
|
key: "open",
|
|
4834
4834
|
default: !1
|
|
4835
|
-
}), y = J("selectRef"), { openDirection:
|
|
4835
|
+
}), y = J("selectRef"), { openDirection: b, updateOpenDirection: h } = fo(y), g = V(), $ = m(() => yt(c.value)), x = m(() => o.valueLabel !== void 0 ? yt(o.valueLabel) : $.value.reduce((j, re) => {
|
|
4836
4836
|
const se = o.options.find(({ value: ye }) => ye === re)?.label;
|
|
4837
4837
|
return se && j.push(se), j;
|
|
4838
4838
|
}, [])), w = J("miniSearchRef"), M = J("selectInputRef"), O = m(() => o.noFilter || !d.value ? o.options : o.options.filter(
|
|
@@ -4860,7 +4860,7 @@ const Ci = (n, t) => {
|
|
|
4860
4860
|
return;
|
|
4861
4861
|
}
|
|
4862
4862
|
const se = p.value;
|
|
4863
|
-
p.value = !se, await Ve(), p.value &&
|
|
4863
|
+
p.value = !se, await Ve(), p.value && h(), se !== p.value && (se ? (d.value && (d.value = ""), j || M.value?.input?.focus()) : w.value?.focus());
|
|
4864
4864
|
}, H = () => g.value = N.value.at(0), X = () => g.value = N.value.at(-1), ue = (j) => {
|
|
4865
4865
|
const re = N.value.findIndex((se) => se === j);
|
|
4866
4866
|
re < N.value.length - 1 && (g.value = N.value[re + 1]);
|
|
@@ -4964,7 +4964,7 @@ const Ci = (n, t) => {
|
|
|
4964
4964
|
B(vo, {
|
|
4965
4965
|
class: I(l(u)),
|
|
4966
4966
|
label: o.listLabel,
|
|
4967
|
-
position: l(
|
|
4967
|
+
position: l(b),
|
|
4968
4968
|
alignment: o.alignment === "full" ? "center" : o.alignment,
|
|
4969
4969
|
"fit-parent": o.alignment === "full",
|
|
4970
4970
|
open: l(p)
|
|
@@ -5165,11 +5165,11 @@ const Ci = (n, t) => {
|
|
|
5165
5165
|
label: w.toString(),
|
|
5166
5166
|
value: w
|
|
5167
5167
|
};
|
|
5168
|
-
})),
|
|
5168
|
+
})), b = m(() => {
|
|
5169
5169
|
let $ = y.value;
|
|
5170
5170
|
const x = c.value.trim().toLowerCase();
|
|
5171
5171
|
return x && ($ = $.filter((w) => Sn(w.label, x))), $.slice(0, d.value);
|
|
5172
|
-
}),
|
|
5172
|
+
}), h = m(() => e.modelValue <= 1), g = m(() => e.modelValue >= e.pages);
|
|
5173
5173
|
return ($, x) => l(u) ? (i(), _(Z, {
|
|
5174
5174
|
key: 0,
|
|
5175
5175
|
class: I(["onyx-pagination-skeleton", "onyx-text", l(r)])
|
|
@@ -5186,7 +5186,7 @@ const Ci = (n, t) => {
|
|
|
5186
5186
|
class: "onyx-pagination__select",
|
|
5187
5187
|
label: l(a)("pagination.select.label"),
|
|
5188
5188
|
"list-label": l(a)("pagination.select.listLabel"),
|
|
5189
|
-
options:
|
|
5189
|
+
options: b.value,
|
|
5190
5190
|
"model-value": e.modelValue,
|
|
5191
5191
|
"value-label": e.modelValue.toString(),
|
|
5192
5192
|
"hide-label": "",
|
|
@@ -5209,7 +5209,7 @@ const Ci = (n, t) => {
|
|
|
5209
5209
|
class: "onyx-pagination__button",
|
|
5210
5210
|
"aria-label": l(a)("pagination.previous"),
|
|
5211
5211
|
type: "button",
|
|
5212
|
-
disabled: e.disabled ||
|
|
5212
|
+
disabled: e.disabled || h.value,
|
|
5213
5213
|
onClick: x[2] || (x[2] = (w) => o("update:modelValue", e.modelValue - 1))
|
|
5214
5214
|
}, [
|
|
5215
5215
|
B(z, { icon: l(sn) }, null, 8, ["icon"])
|
|
@@ -5253,30 +5253,30 @@ const Ci = (n, t) => {
|
|
|
5253
5253
|
selectMode: "include",
|
|
5254
5254
|
contingent: /* @__PURE__ */ new Set()
|
|
5255
5255
|
}
|
|
5256
|
-
), a = V(0), s = ie(n?.hover ?? !1), { isEnabled: r } = ut(t, n), u = (
|
|
5257
|
-
o.value.selectMode =
|
|
5258
|
-
}, d = (
|
|
5259
|
-
o.value.selectMode === "include" &&
|
|
5256
|
+
), a = V(0), s = ie(n?.hover ?? !1), { isEnabled: r } = ut(t, n), u = (h) => o.value.selectMode === "include" ? o.value.contingent.has(h) : !o.value.contingent.has(h), c = (h) => {
|
|
5257
|
+
o.value.selectMode = h ? "exclude" : "include", o.value.contingent.clear();
|
|
5258
|
+
}, d = (h, g) => {
|
|
5259
|
+
o.value.selectMode === "include" && h === !0 || o.value.selectMode === "exclude" && h === !1 ? o.value.contingent.add(g) : o.value.contingent.delete(g);
|
|
5260
5260
|
}, p = () => o.value.contingent.size !== 0 && o.value.contingent.size !== a.value, y = () => {
|
|
5261
|
-
const { contingent:
|
|
5262
|
-
return g === "exclude" ?
|
|
5261
|
+
const { contingent: h, selectMode: g } = o.value;
|
|
5262
|
+
return g === "exclude" ? h.size === 0 : h.size > 0 && h.size === a.value;
|
|
5263
5263
|
};
|
|
5264
5264
|
return {
|
|
5265
5265
|
name: ec,
|
|
5266
5266
|
watch: [o, s, r],
|
|
5267
5267
|
modifyColumns: {
|
|
5268
|
-
func: (
|
|
5268
|
+
func: (h) => r.value() ? [
|
|
5269
5269
|
{
|
|
5270
5270
|
key: e,
|
|
5271
5271
|
type: { name: e },
|
|
5272
5272
|
label: "",
|
|
5273
5273
|
width: "2.5rem"
|
|
5274
5274
|
},
|
|
5275
|
-
...
|
|
5276
|
-
] : [...
|
|
5275
|
+
...h
|
|
5276
|
+
] : [...h]
|
|
5277
5277
|
},
|
|
5278
5278
|
mutation: {
|
|
5279
|
-
func: (
|
|
5279
|
+
func: (h) => (a.value = h.length, h),
|
|
5280
5280
|
order: ra
|
|
5281
5281
|
},
|
|
5282
5282
|
typeRenderer: {
|
|
@@ -5289,7 +5289,7 @@ const Ci = (n, t) => {
|
|
|
5289
5289
|
hideLabel: !0,
|
|
5290
5290
|
indeterminate: p(),
|
|
5291
5291
|
disabled: a.value === 0,
|
|
5292
|
-
"onUpdate:modelValue": (
|
|
5292
|
+
"onUpdate:modelValue": (h) => c(h),
|
|
5293
5293
|
modelValue: y()
|
|
5294
5294
|
})
|
|
5295
5295
|
},
|
|
@@ -5299,8 +5299,8 @@ const Ci = (n, t) => {
|
|
|
5299
5299
|
"onyx-data-grid-selection-cell": !0
|
|
5300
5300
|
}
|
|
5301
5301
|
},
|
|
5302
|
-
component: ({ row:
|
|
5303
|
-
const g = u(
|
|
5302
|
+
component: ({ row: h }) => {
|
|
5303
|
+
const g = u(h.id), $ = String(h.id), x = o.value.selectMode === "include" ? t.i18n.t.value("dataGrid.head.selection.select", { id: $ }) : t.i18n.t.value("dataGrid.head.selection.deselect", { id: $ });
|
|
5304
5304
|
return le(mt, {
|
|
5305
5305
|
class: {
|
|
5306
5306
|
"onyx-data-grid-selection-cell__checkbox": !0,
|
|
@@ -5309,7 +5309,7 @@ const Ci = (n, t) => {
|
|
|
5309
5309
|
},
|
|
5310
5310
|
value: `selection-${$}`,
|
|
5311
5311
|
hideLabel: !0,
|
|
5312
|
-
"onUpdate:modelValue": (w) => d(w,
|
|
5312
|
+
"onUpdate:modelValue": (w) => d(w, h.id),
|
|
5313
5313
|
label: x,
|
|
5314
5314
|
modelValue: g
|
|
5315
5315
|
});
|
|
@@ -5323,22 +5323,22 @@ const Ci = (n, t) => {
|
|
|
5323
5323
|
n?.paginationState ?? { current: 1, pages: 1, pageSize: n?.pageSize ?? 25 }
|
|
5324
5324
|
), { isEnabled: o, isAsync: a } = ut(t, n), s = m(() => n.disabled?.value ?? !1), r = m(
|
|
5325
5325
|
() => e.value.pages > 1 || e.value.current > e.value.pageSize
|
|
5326
|
-
), u = m(() => e.value.current >= e.value.pages), c = m(() => n.loading?.value ?? !1), d = n.type ?? "select", p = V(), { vScrollEnd: y, isScrollEnd:
|
|
5326
|
+
), u = m(() => e.value.current >= e.value.pages), c = m(() => n.loading?.value ?? !1), d = n.type ?? "select", p = V(), { vScrollEnd: y, isScrollEnd: b } = aa({
|
|
5327
5327
|
enabled: m(() => d === "lazy" && !u.value && !ne(n.disabled)),
|
|
5328
5328
|
loading: c
|
|
5329
5329
|
});
|
|
5330
|
-
return Y(
|
|
5331
|
-
|
|
5330
|
+
return Y(b, (h) => {
|
|
5331
|
+
h && e.value.current++;
|
|
5332
5332
|
}), Y(p, () => {
|
|
5333
5333
|
p.value && y.mounted(p.value);
|
|
5334
5334
|
}), {
|
|
5335
5335
|
name: oc,
|
|
5336
|
-
watch: [e, o, a, s, t.skeleton,
|
|
5336
|
+
watch: [e, o, a, s, t.skeleton, b, c],
|
|
5337
5337
|
mutation: {
|
|
5338
5338
|
order: ia,
|
|
5339
|
-
func: (
|
|
5340
|
-
if (!o.value()) return
|
|
5341
|
-
let g =
|
|
5339
|
+
func: (h) => {
|
|
5340
|
+
if (!o.value()) return h;
|
|
5341
|
+
let g = h.slice();
|
|
5342
5342
|
if (!a.value) {
|
|
5343
5343
|
e.value.pages = Math.ceil(g.length / e.value.pageSize), e.value.current = So(e.value.current, 1, e.value.pages);
|
|
5344
5344
|
let $ = (e.value.current - 1) * e.value.pageSize;
|
|
@@ -5386,21 +5386,21 @@ const Ci = (n, t) => {
|
|
|
5386
5386
|
slots: {
|
|
5387
5387
|
pagination: () => {
|
|
5388
5388
|
if (!o.value() || d !== "select") return [];
|
|
5389
|
-
const
|
|
5390
|
-
return !r.value && !
|
|
5389
|
+
const h = t.skeleton.value && !r.value;
|
|
5390
|
+
return !r.value && !h ? [] : [
|
|
5391
5391
|
le(sa, {
|
|
5392
5392
|
modelValue: e.value.current,
|
|
5393
5393
|
pages: e.value.pages,
|
|
5394
5394
|
disabled: s.value,
|
|
5395
|
-
skeleton:
|
|
5395
|
+
skeleton: h,
|
|
5396
5396
|
"onUpdate:modelValue": (g) => e.value.current = g
|
|
5397
5397
|
})
|
|
5398
5398
|
];
|
|
5399
5399
|
}
|
|
5400
5400
|
},
|
|
5401
5401
|
scrollContainerAttributes: () => ({
|
|
5402
|
-
ref: (
|
|
5403
|
-
p.value =
|
|
5402
|
+
ref: (h) => {
|
|
5403
|
+
p.value = h;
|
|
5404
5404
|
}
|
|
5405
5405
|
})
|
|
5406
5406
|
};
|
|
@@ -5471,7 +5471,7 @@ const Ci = (n, t) => {
|
|
|
5471
5471
|
withPageScrolling: { type: Boolean }
|
|
5472
5472
|
},
|
|
5473
5473
|
setup(n) {
|
|
5474
|
-
const t = n, e = q(), o = ce(), a = oe(t), s = Ue([]), r = Ue([]), u = Ue(), c = Ue(), d = Ue(), { columns: p, data: y, features:
|
|
5474
|
+
const t = n, e = q(), o = ce(), a = oe(t), s = Ue([]), r = Ue([]), u = Ue(), c = Ue(), d = Ue(), { columns: p, data: y, features: b, columnGroups: h, async: g } = ro(t);
|
|
5475
5475
|
let $;
|
|
5476
5476
|
const x = ({
|
|
5477
5477
|
createRendererColumns: w,
|
|
@@ -5481,21 +5481,21 @@ const Ci = (n, t) => {
|
|
|
5481
5481
|
createScrollContainerAttributes: N,
|
|
5482
5482
|
createSlots: K
|
|
5483
5483
|
}) => Y(
|
|
5484
|
-
[y, a, p,
|
|
5484
|
+
[y, a, p, h, e.locale, e.t, ...O],
|
|
5485
5485
|
() => {
|
|
5486
5486
|
s.value = w(), r.value = M(y.value), u.value = L(), c.value = N(), d.value = K();
|
|
5487
5487
|
},
|
|
5488
5488
|
{ immediate: !0, deep: !0 }
|
|
5489
5489
|
);
|
|
5490
5490
|
return Y(
|
|
5491
|
-
|
|
5491
|
+
b,
|
|
5492
5492
|
() => {
|
|
5493
5493
|
const w = Ei(
|
|
5494
|
-
[ic({ headline: ie(t, "headline") }), ...
|
|
5494
|
+
[ic({ headline: ie(t, "headline") }), ...b.value],
|
|
5495
5495
|
{
|
|
5496
5496
|
i18n: e,
|
|
5497
5497
|
columnConfig: p,
|
|
5498
|
-
columnGroups:
|
|
5498
|
+
columnGroups: h,
|
|
5499
5499
|
async: g,
|
|
5500
5500
|
skeleton: a
|
|
5501
5501
|
}
|
|
@@ -5639,13 +5639,13 @@ const Ci = (n, t) => {
|
|
|
5639
5639
|
if (!r.value) return;
|
|
5640
5640
|
s.value = r.value.getBoundingClientRect().width, c.value = !0, u = new AbortController();
|
|
5641
5641
|
const g = { signal: u.signal, passive: !0 };
|
|
5642
|
-
window.addEventListener("mousemove", y, g), window.addEventListener("mouseup",
|
|
5642
|
+
window.addEventListener("mousemove", y, g), window.addEventListener("mouseup", b, g), window.addEventListener("keydown", h, g), o("start");
|
|
5643
5643
|
};
|
|
5644
5644
|
Oe(() => {
|
|
5645
5645
|
Y(
|
|
5646
5646
|
() => e.active,
|
|
5647
5647
|
(g) => {
|
|
5648
|
-
g != null && (g && !c.value ? d() : !g && c.value &&
|
|
5648
|
+
g != null && (g && !c.value ? d() : !g && c.value && b());
|
|
5649
5649
|
},
|
|
5650
5650
|
{ immediate: !0 }
|
|
5651
5651
|
);
|
|
@@ -5657,10 +5657,10 @@ const Ci = (n, t) => {
|
|
|
5657
5657
|
const $ = r.value.getBoundingClientRect();
|
|
5658
5658
|
let x;
|
|
5659
5659
|
e.alignment === "right" ? x = g.clientX - $.left : x = $.right - g.clientX, o("updateWidth", Math.max(e.min, x));
|
|
5660
|
-
},
|
|
5660
|
+
}, b = () => {
|
|
5661
5661
|
u?.abort(), s.value = void 0, c.value = !1, o("end");
|
|
5662
|
-
},
|
|
5663
|
-
g.key === "Escape" && (s.value && o("updateWidth", s.value),
|
|
5662
|
+
}, h = (g) => {
|
|
5663
|
+
g.key === "Escape" && (s.value && o("updateWidth", s.value), b());
|
|
5664
5664
|
};
|
|
5665
5665
|
return (g, $) => (i(), v(
|
|
5666
5666
|
"button",
|
|
@@ -5701,31 +5701,31 @@ const Ci = (n, t) => {
|
|
|
5701
5701
|
[a, r],
|
|
5702
5702
|
() => {
|
|
5703
5703
|
a.value.forEach((p, y) => {
|
|
5704
|
-
const
|
|
5705
|
-
g ?
|
|
5704
|
+
const b = `--onyx-data-grid-column-${go(y)}`, h = p.closest(".onyx-table-wrapper__container"), g = r.value.get(y);
|
|
5705
|
+
g ? h?.style.setProperty(b, g) : h?.style.removeProperty(b);
|
|
5706
5706
|
});
|
|
5707
5707
|
},
|
|
5708
5708
|
{ flush: "post", deep: !0 }
|
|
5709
5709
|
);
|
|
5710
5710
|
const c = (p) => {
|
|
5711
|
-
const y = p.map((
|
|
5712
|
-
if (!s.value(
|
|
5713
|
-
const
|
|
5711
|
+
const y = p.map((b) => {
|
|
5712
|
+
if (!s.value(b.key)) return b;
|
|
5713
|
+
const h = {
|
|
5714
5714
|
class: "onyx-data-grid-resize-cell",
|
|
5715
5715
|
ref: ($) => {
|
|
5716
|
-
$ ? a.value.set(
|
|
5716
|
+
$ ? a.value.set(b.key, $) : a.value.delete(b.key);
|
|
5717
5717
|
}
|
|
5718
|
-
}, g = r.value.get(
|
|
5718
|
+
}, g = r.value.get(b.key);
|
|
5719
5719
|
return {
|
|
5720
|
-
...
|
|
5721
|
-
width: g ||
|
|
5722
|
-
thAttributes: fe(
|
|
5720
|
+
...b,
|
|
5721
|
+
width: g || b.width,
|
|
5722
|
+
thAttributes: fe(h, b.thAttributes)
|
|
5723
5723
|
};
|
|
5724
5724
|
});
|
|
5725
5725
|
return y.push({ key: Ct, type: { name: Ct }, label: "" }), y;
|
|
5726
|
-
}, d = (p, y,
|
|
5727
|
-
const
|
|
5728
|
-
return !s.value(y.key) ||
|
|
5726
|
+
}, d = (p, y, b) => {
|
|
5727
|
+
const h = p.default?.();
|
|
5728
|
+
return !s.value(y.key) || b ? h : [
|
|
5729
5729
|
le(lo, {
|
|
5730
5730
|
min: o,
|
|
5731
5731
|
element: a.value.get(y.key),
|
|
@@ -5744,7 +5744,7 @@ const Ci = (n, t) => {
|
|
|
5744
5744
|
},
|
|
5745
5745
|
onAutoSize: () => r.value.set(y.key, "max-content")
|
|
5746
5746
|
}),
|
|
5747
|
-
|
|
5747
|
+
h
|
|
5748
5748
|
];
|
|
5749
5749
|
};
|
|
5750
5750
|
return {
|
|
@@ -5773,8 +5773,8 @@ const Ci = (n, t) => {
|
|
|
5773
5773
|
}
|
|
5774
5774
|
},
|
|
5775
5775
|
header: {
|
|
5776
|
-
wrapper: (p, y, { length:
|
|
5777
|
-
const $ = y ===
|
|
5776
|
+
wrapper: (p, y, { length: b }) => (h, { slots: g }) => {
|
|
5777
|
+
const $ = y === b - 1, x = p.type.name === Ct;
|
|
5778
5778
|
return d(g, p, $ || x);
|
|
5779
5779
|
}
|
|
5780
5780
|
}
|
|
@@ -5845,25 +5845,25 @@ const Ci = (n, t) => {
|
|
|
5845
5845
|
let r = [];
|
|
5846
5846
|
const u = m(
|
|
5847
5847
|
() => ne(n?.collator) ?? new Intl.Collator(o.locale.value, { numeric: !0 })
|
|
5848
|
-
), c = (
|
|
5849
|
-
const $ = ne(n?.columns)?.[
|
|
5848
|
+
), c = (h) => {
|
|
5849
|
+
const $ = ne(n?.columns)?.[h]?.sortFunc;
|
|
5850
5850
|
if ($)
|
|
5851
5851
|
return $;
|
|
5852
|
-
const x = r.find(({ key: w }) =>
|
|
5852
|
+
const x = r.find(({ key: w }) => h === w)?.type.name ?? "";
|
|
5853
5853
|
return Yo[x] ? Yo[x] : $o;
|
|
5854
|
-
}, d = (
|
|
5854
|
+
}, d = (h) => {
|
|
5855
5855
|
const { column: g, direction: $ } = e.value;
|
|
5856
5856
|
if (s.value || !g || $ === "none")
|
|
5857
|
-
return
|
|
5857
|
+
return h;
|
|
5858
5858
|
const x = $ === "asc" ? 1 : -1, w = c(g);
|
|
5859
|
-
return
|
|
5860
|
-
}, p = (
|
|
5861
|
-
const $ = e.value.column ===
|
|
5859
|
+
return h.sort((M, O) => w(M[g], O[g], u.value) * x), h;
|
|
5860
|
+
}, p = (h, g = !1) => {
|
|
5861
|
+
const $ = e.value.column === h ? so(e.value.direction, g) : so(void 0, g), x = $ !== "none" ? h : void 0;
|
|
5862
5862
|
e.value = {
|
|
5863
5863
|
direction: $,
|
|
5864
5864
|
column: x
|
|
5865
5865
|
};
|
|
5866
|
-
}, y = m(() => (
|
|
5866
|
+
}, y = m(() => (h, g) => e.value.column === h && e.value.direction === g), b = (h, g) => {
|
|
5867
5867
|
const $ = {
|
|
5868
5868
|
none: Pa,
|
|
5869
5869
|
asc: rn,
|
|
@@ -5872,8 +5872,8 @@ const Ci = (n, t) => {
|
|
|
5872
5872
|
return le(
|
|
5873
5873
|
Ne,
|
|
5874
5874
|
{
|
|
5875
|
-
active: y.value(
|
|
5876
|
-
onClick: () => e.value = { column:
|
|
5875
|
+
active: y.value(h, g),
|
|
5876
|
+
onClick: () => e.value = { column: h, direction: g }
|
|
5877
5877
|
},
|
|
5878
5878
|
() => [
|
|
5879
5879
|
le(z, { icon: $[g] }),
|
|
@@ -5890,30 +5890,30 @@ const Ci = (n, t) => {
|
|
|
5890
5890
|
modifyColumns: [
|
|
5891
5891
|
{
|
|
5892
5892
|
// save final column config
|
|
5893
|
-
func: (
|
|
5893
|
+
func: (h) => r = h,
|
|
5894
5894
|
order: -1 / 0
|
|
5895
5895
|
}
|
|
5896
5896
|
],
|
|
5897
5897
|
header: {
|
|
5898
|
-
actions: ({ key:
|
|
5898
|
+
actions: ({ key: h, label: g }) => a.value(h) ? [
|
|
5899
5899
|
{
|
|
5900
5900
|
iconComponent: le(Jo, {
|
|
5901
5901
|
columnLabel: g,
|
|
5902
|
-
sortDirection: e.value.column ===
|
|
5903
|
-
onClick: () => p(
|
|
5902
|
+
sortDirection: e.value.column === h ? e.value.direction : void 0,
|
|
5903
|
+
onClick: () => p(h)
|
|
5904
5904
|
}),
|
|
5905
5905
|
menuItems: [
|
|
5906
|
-
h
|
|
5907
|
-
h
|
|
5908
|
-
h
|
|
5906
|
+
b(h, "none"),
|
|
5907
|
+
b(h, "asc"),
|
|
5908
|
+
b(h, "desc")
|
|
5909
5909
|
]
|
|
5910
5910
|
},
|
|
5911
|
-
e.value.column ===
|
|
5911
|
+
e.value.column === h && e.value.direction && e.value.direction !== "none" ? {
|
|
5912
5912
|
iconComponent: {
|
|
5913
5913
|
iconComponent: le(Jo, {
|
|
5914
5914
|
columnLabel: g,
|
|
5915
|
-
sortDirection: e.value.column ===
|
|
5916
|
-
onClick: () => p(
|
|
5915
|
+
sortDirection: e.value.column === h ? e.value.direction : void 0,
|
|
5916
|
+
onClick: () => p(h, !0)
|
|
5917
5917
|
}),
|
|
5918
5918
|
alwaysShowInHeader: !0
|
|
5919
5919
|
}
|
|
@@ -5927,8 +5927,8 @@ const Ci = (n, t) => {
|
|
|
5927
5927
|
if (!("ResizeObserver" in window)) return;
|
|
5928
5928
|
const p = new ResizeObserver(() => {
|
|
5929
5929
|
Object.entries(a.value).forEach(
|
|
5930
|
-
([y,
|
|
5931
|
-
), t.value.forEach((y,
|
|
5930
|
+
([y, b]) => o.value[y] = b.getBoundingClientRect().width
|
|
5931
|
+
), t.value.forEach((y, b) => c(y, b));
|
|
5932
5932
|
});
|
|
5933
5933
|
Y(
|
|
5934
5934
|
a,
|
|
@@ -5940,27 +5940,27 @@ const Ci = (n, t) => {
|
|
|
5940
5940
|
});
|
|
5941
5941
|
const c = (p, y) => {
|
|
5942
5942
|
if (!n) return;
|
|
5943
|
-
const
|
|
5944
|
-
document.body.style.setProperty(u(p), `${
|
|
5943
|
+
const b = t.value.map((h) => o.value[h]).reduce((h, g, $) => $ < y ? h + g : h, 0);
|
|
5944
|
+
document.body.style.setProperty(u(p), `${b}px`);
|
|
5945
5945
|
}, d = (p) => {
|
|
5946
|
-
const y = p.scrollWidth - p.clientWidth,
|
|
5947
|
-
r.value = e.value === "left" &&
|
|
5946
|
+
const y = p.scrollWidth - p.clientWidth, b = Math.round(p.scrollLeft);
|
|
5947
|
+
r.value = e.value === "left" && b > 0 || e.value === "right" && b < y;
|
|
5948
5948
|
};
|
|
5949
5949
|
return {
|
|
5950
5950
|
name: hc,
|
|
5951
5951
|
watch: [e, t, r],
|
|
5952
5952
|
modifyColumns: {
|
|
5953
5953
|
func: (p) => {
|
|
5954
|
-
const y = p.filter((
|
|
5954
|
+
const y = p.filter((h) => t.value.includes(h.key)).map((h) => {
|
|
5955
5955
|
const g = e.value === "left" ? {
|
|
5956
5956
|
right: "auto",
|
|
5957
|
-
left: `var(${u(
|
|
5957
|
+
left: `var(${u(h.key)})`
|
|
5958
5958
|
} : {
|
|
5959
5959
|
left: "auto",
|
|
5960
|
-
right: `var(${u(
|
|
5960
|
+
right: `var(${u(h.key)})`
|
|
5961
5961
|
};
|
|
5962
5962
|
return {
|
|
5963
|
-
...
|
|
5963
|
+
...h,
|
|
5964
5964
|
thAttributes: fe(
|
|
5965
5965
|
{
|
|
5966
5966
|
style: g,
|
|
@@ -5970,10 +5970,10 @@ const Ci = (n, t) => {
|
|
|
5970
5970
|
isScrolled: r.value
|
|
5971
5971
|
},
|
|
5972
5972
|
ref: ($) => {
|
|
5973
|
-
$ ? a.value[
|
|
5973
|
+
$ ? a.value[h.key] = $ : delete a.value[h.key];
|
|
5974
5974
|
}
|
|
5975
5975
|
},
|
|
5976
|
-
|
|
5976
|
+
h.thAttributes
|
|
5977
5977
|
),
|
|
5978
5978
|
tdAttributes: {
|
|
5979
5979
|
style: g,
|
|
@@ -5984,8 +5984,8 @@ const Ci = (n, t) => {
|
|
|
5984
5984
|
}
|
|
5985
5985
|
}
|
|
5986
5986
|
};
|
|
5987
|
-
}),
|
|
5988
|
-
return e.value === "left" ? [...y, ...
|
|
5987
|
+
}), b = p.filter((h) => !t.value.includes(h.key));
|
|
5988
|
+
return e.value === "left" ? [...y, ...b] : [...b, ...y.slice().reverse()];
|
|
5989
5989
|
}
|
|
5990
5990
|
},
|
|
5991
5991
|
scrollContainerAttributes: () => ({
|
|
@@ -6048,7 +6048,7 @@ const Ci = (n, t) => {
|
|
|
6048
6048
|
},
|
|
6049
6049
|
emits: ["update:modelValue", "validityChange"],
|
|
6050
6050
|
setup(n, { emit: t }) {
|
|
6051
|
-
const e = n, o = t, { rootAttrs: a, restAttrs: s } = ge(), { vCustomValidity: r, errorMessages: u } = Pe({ props: e, emit: o }), c = m(() => Be(e.success)), d = m(() => Be(e.message)), { densityClass: p } = F(e), { disabled: y, showError:
|
|
6051
|
+
const e = n, o = t, { rootAttrs: a, restAttrs: s } = ge(), { vCustomValidity: r, errorMessages: u } = Pe({ props: e, emit: o }), c = m(() => Be(e.success)), d = m(() => Be(e.message)), { densityClass: p } = F(e), { disabled: y, showError: b } = be(e), h = oe(e), g = _t(b), $ = m(() => (O) => {
|
|
6052
6052
|
const L = O != null && O != null ? new Date(O) : void 0;
|
|
6053
6053
|
if (!no(L)) return;
|
|
6054
6054
|
const N = L.toISOString().split("T")[0];
|
|
@@ -6066,7 +6066,7 @@ const Ci = (n, t) => {
|
|
|
6066
6066
|
x.value = no(L) ? L.toISOString() : "";
|
|
6067
6067
|
}
|
|
6068
6068
|
}), M = J("inputRef");
|
|
6069
|
-
return Ae(M, e), (O, L) => l(
|
|
6069
|
+
return Ae(M, e), (O, L) => l(h) ? (i(), v(
|
|
6070
6070
|
"div",
|
|
6071
6071
|
E({
|
|
6072
6072
|
key: 0,
|
|
@@ -6443,7 +6443,7 @@ const Ci = (n, t) => {
|
|
|
6443
6443
|
props: o,
|
|
6444
6444
|
emit: a,
|
|
6445
6445
|
default: ""
|
|
6446
|
-
}), { rootAttrs: u, restAttrs: c } = ge(), { t: d } = q(), { maxLength: p, maxLengthError: y } = ca({ modelValue: r, props: o }),
|
|
6446
|
+
}), { rootAttrs: u, restAttrs: c } = ge(), { t: d } = q(), { maxLength: p, maxLengthError: y } = ca({ modelValue: r, props: o }), b = m(() => o.error ?? y.value), { vCustomValidity: h, errorMessages: g } = Pe({ props: o, emit: a, error: b }), $ = m(() => Be(o.success)), x = m(() => Be(o.message)), { densityClass: w } = F(o), M = m(() => o.pattern instanceof RegExp ? o.pattern.source : o.pattern), O = J("inputRef");
|
|
6447
6447
|
t({ input: O });
|
|
6448
6448
|
const { disabled: L, showError: N } = be(o), K = oe(o), H = _t(N);
|
|
6449
6449
|
Ae(O, o);
|
|
@@ -6509,7 +6509,7 @@ const Ci = (n, t) => {
|
|
|
6509
6509
|
title: o.hideLabel ? o.label : void 0
|
|
6510
6510
|
}, l(c)), null, 16, Mc), [
|
|
6511
6511
|
[tn, l(r)],
|
|
6512
|
-
[l(
|
|
6512
|
+
[l(h)]
|
|
6513
6513
|
]),
|
|
6514
6514
|
!o.hideClearIcon && l(r) !== "" ? (i(), v("button", {
|
|
6515
6515
|
key: 2,
|
|
@@ -6777,7 +6777,7 @@ const Ci = (n, t) => {
|
|
|
6777
6777
|
open: e.open,
|
|
6778
6778
|
class: "onyx-select-dialog",
|
|
6779
6779
|
label: e.label,
|
|
6780
|
-
"onUpdate:open": y[1] || (y[1] = (
|
|
6780
|
+
"onUpdate:open": y[1] || (y[1] = (b) => o("update:open", b))
|
|
6781
6781
|
}), _e({
|
|
6782
6782
|
footer: S(() => [
|
|
6783
6783
|
B(Lr, null, {
|
|
@@ -6786,7 +6786,7 @@ const Ci = (n, t) => {
|
|
|
6786
6786
|
label: l(r)("cancel"),
|
|
6787
6787
|
mode: "plain",
|
|
6788
6788
|
color: "neutral",
|
|
6789
|
-
onClick: y[0] || (y[0] = (
|
|
6789
|
+
onClick: y[0] || (y[0] = (b) => o("update:open", !1))
|
|
6790
6790
|
}, null, 8, ["label"]),
|
|
6791
6791
|
B(lt, {
|
|
6792
6792
|
label: l(r)("apply"),
|
|
@@ -6814,17 +6814,17 @@ const Ci = (n, t) => {
|
|
|
6814
6814
|
(i(!0), v(
|
|
6815
6815
|
G,
|
|
6816
6816
|
null,
|
|
6817
|
-
de(e.options, (
|
|
6818
|
-
key:
|
|
6817
|
+
de(e.options, (b) => (i(), v("label", {
|
|
6818
|
+
key: b.value
|
|
6819
6819
|
}, [
|
|
6820
6820
|
B(
|
|
6821
6821
|
Un,
|
|
6822
6822
|
{ class: "onyx-select-dialog__option" },
|
|
6823
6823
|
{
|
|
6824
6824
|
default: S(() => [
|
|
6825
|
-
|
|
6825
|
+
b.icon ? (i(), _(z, {
|
|
6826
6826
|
key: 0,
|
|
6827
|
-
icon:
|
|
6827
|
+
icon: b.icon,
|
|
6828
6828
|
class: "onyx-select-dialog__icon"
|
|
6829
6829
|
}, null, 8, ["icon"])) : k("v-if", !0),
|
|
6830
6830
|
f("div", null, [
|
|
@@ -6836,10 +6836,10 @@ const Ci = (n, t) => {
|
|
|
6836
6836
|
f("input", {
|
|
6837
6837
|
type: "radio",
|
|
6838
6838
|
name: "color-scheme",
|
|
6839
|
-
autofocus: e.modelValue ===
|
|
6840
|
-
value:
|
|
6841
|
-
checked: e.modelValue ===
|
|
6842
|
-
"aria-label":
|
|
6839
|
+
autofocus: e.modelValue === b.value,
|
|
6840
|
+
value: b.value,
|
|
6841
|
+
checked: e.modelValue === b.value,
|
|
6842
|
+
"aria-label": b.label,
|
|
6843
6843
|
required: ""
|
|
6844
6844
|
}, null, 8, Yc)
|
|
6845
6845
|
]),
|
|
@@ -6852,14 +6852,14 @@ const Ci = (n, t) => {
|
|
|
6852
6852
|
f(
|
|
6853
6853
|
"span",
|
|
6854
6854
|
Jc,
|
|
6855
|
-
T(
|
|
6855
|
+
T(b.label),
|
|
6856
6856
|
1
|
|
6857
6857
|
/* TEXT */
|
|
6858
6858
|
),
|
|
6859
|
-
|
|
6859
|
+
b.description ? (i(), v(
|
|
6860
6860
|
"p",
|
|
6861
6861
|
Zc,
|
|
6862
|
-
T(
|
|
6862
|
+
T(b.description),
|
|
6863
6863
|
1
|
|
6864
6864
|
/* TEXT */
|
|
6865
6865
|
)) : k("v-if", !0)
|
|
@@ -7092,17 +7092,17 @@ const Ci = (n, t) => {
|
|
|
7092
7092
|
emit: o,
|
|
7093
7093
|
key: "open",
|
|
7094
7094
|
default: !1
|
|
7095
|
-
}), { restAttrs: u, rootAttrs: c } = ge(), d = m(() => !!a.children), { isActive: p } = rt(), y = m(() => e.active !== "auto" ? e.active : p.value(e.link)),
|
|
7095
|
+
}), { restAttrs: u, rootAttrs: c } = ge(), d = m(() => !!a.children), { isActive: p } = rt(), y = m(() => e.active !== "auto" ? e.active : p.value(e.link)), b = ve(
|
|
7096
7096
|
Ft,
|
|
7097
7097
|
m(() => !1)
|
|
7098
|
-
),
|
|
7098
|
+
), h = ve(da, void 0), g = ve(Zo, !0);
|
|
7099
7099
|
Re(Zo, !1);
|
|
7100
7100
|
const { componentRef: $, isVisible: x } = g ? Nn(ua) : { isVisible: ie(!0) };
|
|
7101
7101
|
return (w, M) => (i(), v(
|
|
7102
7102
|
G,
|
|
7103
7103
|
null,
|
|
7104
7104
|
[
|
|
7105
|
-
l(
|
|
7105
|
+
l(b) && l(r) ? (i(), v(
|
|
7106
7106
|
"div",
|
|
7107
7107
|
E({
|
|
7108
7108
|
key: 0,
|
|
@@ -7147,7 +7147,7 @@ const Ci = (n, t) => {
|
|
|
7147
7147
|
],
|
|
7148
7148
|
16
|
|
7149
7149
|
/* FULL_PROPS */
|
|
7150
|
-
)) : l(
|
|
7150
|
+
)) : l(b) ? (i(), _(We, E({ key: 1 }, l(fe)(e, w.$attrs), {
|
|
7151
7151
|
active: y.value,
|
|
7152
7152
|
context: "mobile",
|
|
7153
7153
|
onClick: M[1] || (M[1] = (O) => d.value && (r.value = !0))
|
|
@@ -7224,9 +7224,10 @@ const Ci = (n, t) => {
|
|
|
7224
7224
|
key: "0"
|
|
7225
7225
|
} : void 0
|
|
7226
7226
|
]), 1040, ["active"])) : k("v-if", !0),
|
|
7227
|
-
l(g) && !l(
|
|
7227
|
+
l(g) && !l(b) && l(h) ? (i(), _(st, {
|
|
7228
7228
|
key: 5,
|
|
7229
|
-
|
|
7229
|
+
disabled: !l(h),
|
|
7230
|
+
to: l(h)
|
|
7230
7231
|
}, [
|
|
7231
7232
|
l(x) ? k("v-if", !0) : (i(), _(We, E({ key: 0 }, l(fe)(e, w.$attrs), {
|
|
7232
7233
|
active: y.value,
|
|
@@ -7246,7 +7247,7 @@ const Ci = (n, t) => {
|
|
|
7246
7247
|
key: "0"
|
|
7247
7248
|
} : void 0
|
|
7248
7249
|
]), 1040, ["active"]))
|
|
7249
|
-
], 8, ["to"])) : k("v-if", !0)
|
|
7250
|
+
], 8, ["disabled", "to"])) : k("v-if", !0)
|
|
7250
7251
|
],
|
|
7251
7252
|
64
|
|
7252
7253
|
/* STABLE_FRAGMENT */
|
|
@@ -7519,10 +7520,10 @@ const Ci = (n, t) => {
|
|
|
7519
7520
|
setup(n, { expose: t, emit: e }) {
|
|
7520
7521
|
const o = n, a = e, s = ce(), r = J("navBarRef"), { width: u } = He(r), { t: c } = q(), { currentRoute: d } = rt(), {
|
|
7521
7522
|
elements: { nav: p }
|
|
7522
|
-
} = _s({ navigationName: ie(() => o.appName) }), y = V(!1),
|
|
7523
|
+
} = _s({ navigationName: ie(() => o.appName) }), y = V(!1), b = V(!1), h = (x, w) => w !== 0 && w < x, g = m(() => typeof o.mobile == "number" ? h(o.mobile, u.value) : typeof o.mobile == "string" ? h(Ot[o.mobile], u.value) : o.mobile);
|
|
7523
7524
|
Re(Ft, g), Re(da, J("moreListRef"));
|
|
7524
7525
|
const $ = () => {
|
|
7525
|
-
y.value = !1,
|
|
7526
|
+
y.value = !1, b.value = !1;
|
|
7526
7527
|
};
|
|
7527
7528
|
return Y(d, () => $(), { deep: !0 }), t({
|
|
7528
7529
|
/**
|
|
@@ -7548,7 +7549,7 @@ const Ci = (n, t) => {
|
|
|
7548
7549
|
},
|
|
7549
7550
|
[
|
|
7550
7551
|
f("div", wu, [
|
|
7551
|
-
g.value && s.mobileActivePage && !y.value && !
|
|
7552
|
+
g.value && s.mobileActivePage && !y.value && !b.value ? (i(), v("span", Su, [
|
|
7552
7553
|
C(x.$slots, "mobileActivePage")
|
|
7553
7554
|
])) : o.appName || o.logoUrl || s.appArea ? (i(), _(jc, E({
|
|
7554
7555
|
key: 1,
|
|
@@ -7579,7 +7580,7 @@ const Ci = (n, t) => {
|
|
|
7579
7580
|
open: y.value,
|
|
7580
7581
|
"onUpdate:open": [
|
|
7581
7582
|
w[1] || (w[1] = (M) => y.value = M),
|
|
7582
|
-
w[2] || (w[2] = (M) =>
|
|
7583
|
+
w[2] || (w[2] = (M) => b.value = !1)
|
|
7583
7584
|
],
|
|
7584
7585
|
class: "onyx-nav-bar__burger",
|
|
7585
7586
|
icon: l(ja),
|
|
@@ -7668,9 +7669,9 @@ const Ci = (n, t) => {
|
|
|
7668
7669
|
])) : k("v-if", !0),
|
|
7669
7670
|
s.contextArea ? (i(), _(Xo, {
|
|
7670
7671
|
key: 1,
|
|
7671
|
-
open:
|
|
7672
|
+
open: b.value,
|
|
7672
7673
|
"onUpdate:open": [
|
|
7673
|
-
w[3] || (w[3] = (M) =>
|
|
7674
|
+
w[3] || (w[3] = (M) => b.value = M),
|
|
7674
7675
|
w[4] || (w[4] = (M) => y.value = !1)
|
|
7675
7676
|
],
|
|
7676
7677
|
icon: l(un),
|
|
@@ -8019,10 +8020,10 @@ const Ci = (n, t) => {
|
|
|
8019
8020
|
const p = d + 1;
|
|
8020
8021
|
let y = "default";
|
|
8021
8022
|
p === e.modelValue ? y = "active" : p < e.modelValue ? y = "completed" : p <= r.value - 1 && (y = "visited");
|
|
8022
|
-
const
|
|
8023
|
+
const b = y === "default" && p !== r.value;
|
|
8023
8024
|
return {
|
|
8024
8025
|
value: p,
|
|
8025
|
-
disabled:
|
|
8026
|
+
disabled: b,
|
|
8026
8027
|
status: y,
|
|
8027
8028
|
skeleton: s.value,
|
|
8028
8029
|
// allow user to override step properties so he has full control, therefore we add "...step" at the very end
|
|
@@ -8098,8 +8099,8 @@ const Ci = (n, t) => {
|
|
|
8098
8099
|
},
|
|
8099
8100
|
emits: ["validityChange"],
|
|
8100
8101
|
setup(n, { expose: t, emit: e }) {
|
|
8101
|
-
const o = n, a = e, { rootAttrs: s, restAttrs: r } = ge(), { vCustomValidity: u, errorMessages: c } = Pe({ props: o, emit: a }), { densityClass: d } = F(o), { disabled: p } = be(o), y = oe(o),
|
|
8102
|
-
return t({ input:
|
|
8102
|
+
const o = n, a = e, { rootAttrs: s, restAttrs: r } = ge(), { vCustomValidity: u, errorMessages: c } = Pe({ props: o, emit: a }), { densityClass: d } = F(o), { disabled: p } = be(o), y = oe(o), b = J("inputRef");
|
|
8103
|
+
return t({ input: b }), Ae(b, o), (h, g) => l(y) ? (i(), v(
|
|
8103
8104
|
"div",
|
|
8104
8105
|
E({
|
|
8105
8106
|
key: 0,
|
|
@@ -8186,11 +8187,11 @@ const Ci = (n, t) => {
|
|
|
8186
8187
|
props: o,
|
|
8187
8188
|
emit: p,
|
|
8188
8189
|
key: "modelValue"
|
|
8189
|
-
}),
|
|
8190
|
+
}), b = (g, $) => {
|
|
8190
8191
|
g && (y.value = $);
|
|
8191
|
-
},
|
|
8192
|
+
}, h = J("radiobuttonsRef");
|
|
8192
8193
|
return t({
|
|
8193
|
-
inputs: m(() => yt(
|
|
8194
|
+
inputs: m(() => yt(h.value).flatMap(($) => $?.input).filter(($) => !!$))
|
|
8194
8195
|
}), (g, $) => (i(), v("fieldset", {
|
|
8195
8196
|
class: I(["onyx-component", "onyx-radio-group", l(a), l(c)]),
|
|
8196
8197
|
disabled: l(s),
|
|
@@ -8251,7 +8252,7 @@ const Ci = (n, t) => {
|
|
|
8251
8252
|
required: o.required,
|
|
8252
8253
|
truncation: x.truncation ?? o.truncation,
|
|
8253
8254
|
onValidityChange: (M) => w === 0 && p("validityChange", M),
|
|
8254
|
-
onChange: (M) =>
|
|
8255
|
+
onChange: (M) => b(M, x.value)
|
|
8255
8256
|
}), null, 16, ["name", "error", "checked", "required", "truncation", "onValidityChange", "onChange"]))),
|
|
8256
8257
|
128
|
|
8257
8258
|
/* KEYED_FRAGMENT */
|
|
@@ -8439,10 +8440,10 @@ const Ci = (n, t) => {
|
|
|
8439
8440
|
onAutoSize: () => d.value = void 0,
|
|
8440
8441
|
alignment: e.alignment === "left" ? "right" : "left"
|
|
8441
8442
|
})
|
|
8442
|
-
), { width:
|
|
8443
|
-
if (!e.collapseSidebar ||
|
|
8443
|
+
), { width: b } = He(), h = m(() => {
|
|
8444
|
+
if (!e.collapseSidebar || b.value === 0) return !1;
|
|
8444
8445
|
const w = typeof e.collapseSidebar == "number" ? e.collapseSidebar : Ot[e.collapseSidebar];
|
|
8445
|
-
return
|
|
8446
|
+
return b.value <= w;
|
|
8446
8447
|
}), g = V(!1), $ = m({
|
|
8447
8448
|
get: () => typeof e.temporary?.open == "boolean" ? e.temporary.open : g.value,
|
|
8448
8449
|
set: (w) => {
|
|
@@ -8450,9 +8451,9 @@ const Ci = (n, t) => {
|
|
|
8450
8451
|
}
|
|
8451
8452
|
}), x = pe();
|
|
8452
8453
|
return Y(
|
|
8453
|
-
[
|
|
8454
|
+
[h, () => e.temporary],
|
|
8454
8455
|
() => {
|
|
8455
|
-
if (!
|
|
8456
|
+
if (!h.value || e.temporary) {
|
|
8456
8457
|
r.remove(x);
|
|
8457
8458
|
return;
|
|
8458
8459
|
}
|
|
@@ -8476,7 +8477,7 @@ const Ci = (n, t) => {
|
|
|
8476
8477
|
{ immediate: !0 }
|
|
8477
8478
|
), Lt(() => {
|
|
8478
8479
|
r.remove(x);
|
|
8479
|
-
}), (w, M) => !e.temporary && !
|
|
8480
|
+
}), (w, M) => !e.temporary && !h.value ? (i(), v("aside", {
|
|
8480
8481
|
key: 0,
|
|
8481
8482
|
ref: "sidebarRef",
|
|
8482
8483
|
class: I([
|
|
@@ -8591,7 +8592,7 @@ const Ci = (n, t) => {
|
|
|
8591
8592
|
},
|
|
8592
8593
|
emits: ["validityChange", "update:modelValue"],
|
|
8593
8594
|
setup(n, { expose: t, emit: e }) {
|
|
8594
|
-
const o = n, a = e, { t: s, locale: r } = q(), u = J("inputRef"), { disabled: c, showError: d } = be(o), p = oe(o), y = _t(d), { densityClass:
|
|
8595
|
+
const o = n, a = e, { t: s, locale: r } = q(), u = J("inputRef"), { disabled: c, showError: d } = be(o), p = oe(o), y = _t(d), { densityClass: b } = F(o), { vCustomValidity: h, errorMessages: g } = Pe({ props: o, emit: a }), $ = m(() => Be(o.success)), x = m(() => Be(o.message)), { rootAttrs: w, restAttrs: M } = ge(), O = V(!1), L = ae({
|
|
8595
8596
|
props: o,
|
|
8596
8597
|
emit: a,
|
|
8597
8598
|
key: "modelValue"
|
|
@@ -8617,7 +8618,7 @@ const Ci = (n, t) => {
|
|
|
8617
8618
|
"div",
|
|
8618
8619
|
E({
|
|
8619
8620
|
key: 0,
|
|
8620
|
-
class: ["onyx-component", "onyx-stepper-skeleton", l(
|
|
8621
|
+
class: ["onyx-component", "onyx-stepper-skeleton", l(b)]
|
|
8621
8622
|
}, l(w)),
|
|
8622
8623
|
[
|
|
8623
8624
|
o.hideLabel ? k("v-if", !0) : (i(), _(Z, {
|
|
@@ -8632,7 +8633,7 @@ const Ci = (n, t) => {
|
|
|
8632
8633
|
"div",
|
|
8633
8634
|
E({
|
|
8634
8635
|
key: 1,
|
|
8635
|
-
class: ["onyx-component", "onyx-stepper", l(
|
|
8636
|
+
class: ["onyx-component", "onyx-stepper", l(b), l(y)]
|
|
8636
8637
|
}, l(w)),
|
|
8637
8638
|
[
|
|
8638
8639
|
B(xt, E(o, {
|
|
@@ -8684,7 +8685,7 @@ const Ci = (n, t) => {
|
|
|
8684
8685
|
]
|
|
8685
8686
|
}), null, 16, vd)), [
|
|
8686
8687
|
[co, N.value],
|
|
8687
|
-
[l(
|
|
8688
|
+
[l(h)]
|
|
8688
8689
|
]),
|
|
8689
8690
|
f(
|
|
8690
8691
|
"p",
|
|
@@ -8734,7 +8735,7 @@ const Ci = (n, t) => {
|
|
|
8734
8735
|
},
|
|
8735
8736
|
emits: ["update:modelValue", "validityChange"],
|
|
8736
8737
|
setup(n, { expose: t, emit: e }) {
|
|
8737
|
-
const o = n, a = e, { rootAttrs: s, restAttrs: r } = ge(), { densityClass: u } = F(o), { disabled: c, showError: d, requiredMarker: p } = be(o), { requiredMarkerClass: y, requiredTypeClass:
|
|
8738
|
+
const o = n, a = e, { rootAttrs: s, restAttrs: r } = ge(), { densityClass: u } = F(o), { disabled: c, showError: d, requiredMarker: p } = be(o), { requiredMarkerClass: y, requiredTypeClass: b } = zt(o, p), { vCustomValidity: h, errorMessages: g } = Pe({ props: o, emit: a }), $ = m(
|
|
8738
8739
|
() => d.value !== !1 ? g.value : void 0
|
|
8739
8740
|
), x = m(() => o.hideLabel && o.label || void 0), w = oe(o), M = ae({
|
|
8740
8741
|
props: o,
|
|
@@ -8766,7 +8767,7 @@ const Ci = (n, t) => {
|
|
|
8766
8767
|
}, l(s)), {
|
|
8767
8768
|
default: S(() => [
|
|
8768
8769
|
f("label", {
|
|
8769
|
-
class: I(["onyx-component onyx-switch", [l(
|
|
8770
|
+
class: I(["onyx-component onyx-switch", [l(b), l(u)]]),
|
|
8770
8771
|
title: x.value
|
|
8771
8772
|
}, [
|
|
8772
8773
|
xe(f("input", E({
|
|
@@ -8781,7 +8782,7 @@ const Ci = (n, t) => {
|
|
|
8781
8782
|
autofocus: o.autofocus
|
|
8782
8783
|
}, l(r)), null, 16, kd), [
|
|
8783
8784
|
[en, l(M)],
|
|
8784
|
-
[l(
|
|
8785
|
+
[l(h)]
|
|
8785
8786
|
]),
|
|
8786
8787
|
f("span", wd, [
|
|
8787
8788
|
f("span", Sd, [
|
|
@@ -9095,7 +9096,7 @@ const Ci = (n, t) => {
|
|
|
9095
9096
|
if (e.link)
|
|
9096
9097
|
return Ze(e.link);
|
|
9097
9098
|
});
|
|
9098
|
-
return (y,
|
|
9099
|
+
return (y, b) => l(u) ? (i(), _(Z, {
|
|
9099
9100
|
key: 0,
|
|
9100
9101
|
class: I(["onyx-file-card-skeleton", l(s)])
|
|
9101
9102
|
}, null, 8, ["class"])) : (i(), _(Un, {
|
|
@@ -9360,7 +9361,7 @@ const nm = /* @__PURE__ */ Vt(qd, [["render", jd]]), Wd = /* @__PURE__ */ A({
|
|
|
9360
9361
|
props: e,
|
|
9361
9362
|
emit: o,
|
|
9362
9363
|
key: "modelValue"
|
|
9363
|
-
}),
|
|
9364
|
+
}), b = J("inputRef"), h = m(() => yt(y.value ?? []).filter((D) => D != null)), g = V(!1), $ = m(() => h.value.map((P, D) => {
|
|
9364
9365
|
if (e.accept && !Gd(P, e.accept))
|
|
9365
9366
|
return {
|
|
9366
9367
|
text: r.value("fileUpload.status.fileTypeError", {
|
|
@@ -9375,7 +9376,7 @@ const nm = /* @__PURE__ */ Vt(qd, [["render", jd]]), Wd = /* @__PURE__ */ A({
|
|
|
9375
9376
|
}),
|
|
9376
9377
|
color: "danger"
|
|
9377
9378
|
};
|
|
9378
|
-
const ee =
|
|
9379
|
+
const ee = h.value.slice(0, D + 1).reduce((U, R) => U + R.size, 0);
|
|
9379
9380
|
if (e.maxTotalSize && ee > ao(e.maxTotalSize))
|
|
9380
9381
|
return {
|
|
9381
9382
|
text: r.value("fileUpload.status.maxFileSizeError", {
|
|
@@ -9388,7 +9389,7 @@ const nm = /* @__PURE__ */ Vt(qd, [["render", jd]]), Wd = /* @__PURE__ */ A({
|
|
|
9388
9389
|
text: r.value("fileUpload.status.maxCountError", { count: e.maxCount }),
|
|
9389
9390
|
color: "danger"
|
|
9390
9391
|
};
|
|
9391
|
-
})), x = m(() =>
|
|
9392
|
+
})), x = m(() => h.value.map((P, D) => ({
|
|
9392
9393
|
file: P,
|
|
9393
9394
|
props: {
|
|
9394
9395
|
filename: P.name,
|
|
@@ -9399,10 +9400,10 @@ const nm = /* @__PURE__ */ Vt(qd, [["render", jd]]), Wd = /* @__PURE__ */ A({
|
|
|
9399
9400
|
}
|
|
9400
9401
|
}))), w = (P) => {
|
|
9401
9402
|
let D;
|
|
9402
|
-
e.multiple ? e.replace ? D = P.slice() : D =
|
|
9403
|
+
e.multiple ? e.replace ? D = P.slice() : D = h.value.concat(P) : D = P[0], y.value = D;
|
|
9403
9404
|
}, M = (P) => {
|
|
9404
9405
|
if (e.multiple) {
|
|
9405
|
-
const D =
|
|
9406
|
+
const D = h.value.filter((ee) => ee !== P);
|
|
9406
9407
|
y.value = D;
|
|
9407
9408
|
} else
|
|
9408
9409
|
y.value = void 0;
|
|
@@ -9422,7 +9423,7 @@ const nm = /* @__PURE__ */ Vt(qd, [["render", jd]]), Wd = /* @__PURE__ */ A({
|
|
|
9422
9423
|
} catch {
|
|
9423
9424
|
return;
|
|
9424
9425
|
}
|
|
9425
|
-
}, ue = m(() => e.listType === "hidden" || !
|
|
9426
|
+
}, ue = m(() => e.listType === "hidden" || !h.value.length ? !1 : e.listType === "button" ? !g.value : !0);
|
|
9426
9427
|
return (P, D) => l(a) ? (i(), _(Z, {
|
|
9427
9428
|
key: 0,
|
|
9428
9429
|
class: I(["onyx-file-upload-skeleton", `onyx-file-upload-skeleton--${e.size}`, l(u)])
|
|
@@ -9446,7 +9447,7 @@ const nm = /* @__PURE__ */ Vt(qd, [["render", jd]]), Wd = /* @__PURE__ */ A({
|
|
|
9446
9447
|
onDragover: D[1] || (D[1] = Me(() => {
|
|
9447
9448
|
}, ["prevent"])),
|
|
9448
9449
|
onDrop: Me(K, ["prevent"]),
|
|
9449
|
-
onClick: D[2] || (D[2] = (ee) =>
|
|
9450
|
+
onClick: D[2] || (D[2] = (ee) => b.value?.click())
|
|
9450
9451
|
}, [
|
|
9451
9452
|
e.size === "large" ? (i(), _(l(Wd), {
|
|
9452
9453
|
key: 0,
|
|
@@ -9548,7 +9549,7 @@ const nm = /* @__PURE__ */ Vt(qd, [["render", jd]]), Wd = /* @__PURE__ */ A({
|
|
|
9548
9549
|
disabled: l(s),
|
|
9549
9550
|
name: e.name
|
|
9550
9551
|
}, l(c), { onChange: O }), null, 16, op),
|
|
9551
|
-
e.listType === "button" &&
|
|
9552
|
+
e.listType === "button" && h.value.length ? (i(), _(we, {
|
|
9552
9553
|
key: 0,
|
|
9553
9554
|
class: "onyx-file-upload__list-button",
|
|
9554
9555
|
label: g.value ? l(r)("fileUpload.revealFilesButton") : l(r)("fileUpload.hideFilesButton"),
|
|
@@ -9666,7 +9667,7 @@ const nm = /* @__PURE__ */ Vt(qd, [["render", jd]]), Wd = /* @__PURE__ */ A({
|
|
|
9666
9667
|
emit: a,
|
|
9667
9668
|
key: "modelValue",
|
|
9668
9669
|
default: ""
|
|
9669
|
-
}), { rootAttrs: r, restAttrs: u } = ge(), { maxLength: c, maxLengthError: d } = ca({ props: o, modelValue: s }), p = m(() => o.error ?? d.value), { vCustomValidity: y, errorMessages:
|
|
9670
|
+
}), { rootAttrs: r, restAttrs: u } = ge(), { maxLength: c, maxLengthError: d } = ca({ props: o, modelValue: s }), p = m(() => o.error ?? d.value), { vCustomValidity: y, errorMessages: b } = Pe({ props: o, emit: a, error: p }), { densityClass: h } = F(o), g = m(() => Be(o.success)), $ = m(() => Be(o.message)), x = m(() => {
|
|
9670
9671
|
if (!o.autosize) return;
|
|
9671
9672
|
const H = o.autosize.min ? Math.max(o.autosize.min, 2) : void 0, X = o.autosize.max;
|
|
9672
9673
|
return [H ? `--min-autosize-rows: ${H}` : "", `--max-autosize-rows: ${X ?? "unset"}`];
|
|
@@ -9678,7 +9679,7 @@ const nm = /* @__PURE__ */ Vt(qd, [["render", jd]]), Wd = /* @__PURE__ */ A({
|
|
|
9678
9679
|
"div",
|
|
9679
9680
|
E({
|
|
9680
9681
|
key: 0,
|
|
9681
|
-
class: ["onyx-component", "onyx-textarea-skeleton", l(
|
|
9682
|
+
class: ["onyx-component", "onyx-textarea-skeleton", l(h)],
|
|
9682
9683
|
style: x.value
|
|
9683
9684
|
}, l(r)),
|
|
9684
9685
|
[
|
|
@@ -9694,14 +9695,14 @@ const nm = /* @__PURE__ */ Vt(qd, [["render", jd]]), Wd = /* @__PURE__ */ A({
|
|
|
9694
9695
|
"div",
|
|
9695
9696
|
E({
|
|
9696
9697
|
key: 1,
|
|
9697
|
-
class: ["onyx-component", "onyx-textarea", l(N), l(
|
|
9698
|
+
class: ["onyx-component", "onyx-textarea", l(N), l(h)],
|
|
9698
9699
|
style: x.value
|
|
9699
9700
|
}, l(r)),
|
|
9700
9701
|
[
|
|
9701
9702
|
B(xt, E(o, {
|
|
9702
9703
|
message: $.value,
|
|
9703
9704
|
"success-messages": g.value,
|
|
9704
|
-
"error-messages": l(
|
|
9705
|
+
"error-messages": l(b)
|
|
9705
9706
|
}), {
|
|
9706
9707
|
default: S(({ id: ue }) => [
|
|
9707
9708
|
f("div", {
|