@opencxh/ui-kit 3.107.0 → 3.108.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +166 -175
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -824,7 +824,7 @@ const xt = () => /* @__PURE__ */ e("svg", { className: "h-4 w-4", fill: "none",
|
|
|
824
824
|
N?.(v);
|
|
825
825
|
} else
|
|
826
826
|
N?.(D), _(!1), J("");
|
|
827
|
-
}, A = u ? null : V.find((D) => D.value === x),
|
|
827
|
+
}, A = u ? null : V.find((D) => D.value === x), M = u ? V.filter(
|
|
828
828
|
(D) => Array.isArray(x) && x.includes(D.value)
|
|
829
829
|
) : [], q = d && j ? V.filter(
|
|
830
830
|
(D) => D.label.toLowerCase().includes(j.toLowerCase())
|
|
@@ -840,7 +840,7 @@ const xt = () => /* @__PURE__ */ e("svg", { className: "h-4 w-4", fill: "none",
|
|
|
840
840
|
return;
|
|
841
841
|
}
|
|
842
842
|
K((T) => [...T, v]), S(v.value), J(""), u || _(!1);
|
|
843
|
-
}, ne = () => u ?
|
|
843
|
+
}, ne = () => u ? M.length > 0 ? M.map((D) => D.label).join(", ") : i || "Select options" : A?.label || i || "Select an option";
|
|
844
844
|
return /* @__PURE__ */ c(
|
|
845
845
|
"div",
|
|
846
846
|
{
|
|
@@ -1182,7 +1182,7 @@ const de = (...t) => t.filter(Boolean).join(" "), Nt = (t) => /* @__PURE__ */ e(
|
|
|
1182
1182
|
Z(() => {
|
|
1183
1183
|
p !== void 0 && $(p);
|
|
1184
1184
|
}, [p]);
|
|
1185
|
-
const
|
|
1185
|
+
const M = ue(() => {
|
|
1186
1186
|
if (y && !S || !J) return d;
|
|
1187
1187
|
const v = String(J).toLowerCase();
|
|
1188
1188
|
return d.filter(
|
|
@@ -1220,7 +1220,7 @@ const de = (...t) => t.filter(Boolean).join(" "), Nt = (t) => /* @__PURE__ */ e(
|
|
|
1220
1220
|
$(v.label), K(!1), A(!1), x && x(v.value);
|
|
1221
1221
|
}, re = () => {
|
|
1222
1222
|
(d.length > 0 || u) && (K(!0), A(!1));
|
|
1223
|
-
}, ne = i || w, D = V && (
|
|
1223
|
+
}, ne = i || w, D = V && (M.length > 0 || ne), I = ue(() => G || j, [G]);
|
|
1224
1224
|
return /* @__PURE__ */ c(
|
|
1225
1225
|
"div",
|
|
1226
1226
|
{
|
|
@@ -1326,7 +1326,7 @@ const de = (...t) => t.filter(Boolean).join(" "), Nt = (t) => /* @__PURE__ */ e(
|
|
|
1326
1326
|
{
|
|
1327
1327
|
className: "absolute z-10 mt-1 w-full bg-surface border border-border rounded-lg shadow-lg max-h-60 overflow-auto top-full",
|
|
1328
1328
|
role: "listbox",
|
|
1329
|
-
children:
|
|
1329
|
+
children: M.length > 0 ? M.map((v) => /* @__PURE__ */ e(
|
|
1330
1330
|
"li",
|
|
1331
1331
|
{
|
|
1332
1332
|
className: "px-4 py-2 cursor-pointer text-text hover:bg-accent-soft hover:text-accent transition-colors",
|
|
@@ -1406,7 +1406,7 @@ function St({
|
|
|
1406
1406
|
] })
|
|
1407
1407
|
] }) });
|
|
1408
1408
|
}
|
|
1409
|
-
const
|
|
1409
|
+
const Mt = ({
|
|
1410
1410
|
trigger: t,
|
|
1411
1411
|
options: r,
|
|
1412
1412
|
value: n,
|
|
@@ -1514,7 +1514,7 @@ const zt = ({
|
|
|
1514
1514
|
"button",
|
|
1515
1515
|
{
|
|
1516
1516
|
"data-option-value": w.value,
|
|
1517
|
-
onClick: (
|
|
1517
|
+
onClick: (M) => _(M, w),
|
|
1518
1518
|
onMouseEnter: () => j(w),
|
|
1519
1519
|
onMouseLeave: () => J(w),
|
|
1520
1520
|
disabled: w.disabled,
|
|
@@ -1557,8 +1557,8 @@ const zt = ({
|
|
|
1557
1557
|
u(null);
|
|
1558
1558
|
}, 150);
|
|
1559
1559
|
},
|
|
1560
|
-
children: /* @__PURE__ */ e("div", { className: "p-2", children: w.children.map((
|
|
1561
|
-
if (
|
|
1560
|
+
children: /* @__PURE__ */ e("div", { className: "p-2", children: w.children.map((M, q) => {
|
|
1561
|
+
if (M.divider)
|
|
1562
1562
|
return /* @__PURE__ */ e(
|
|
1563
1563
|
"div",
|
|
1564
1564
|
{
|
|
@@ -1567,35 +1567,35 @@ const zt = ({
|
|
|
1567
1567
|
`divider-${q}`
|
|
1568
1568
|
);
|
|
1569
1569
|
const L = typeof n == "object" && n[w.value] && n[w.value].includes(
|
|
1570
|
-
|
|
1571
|
-
) || n ===
|
|
1570
|
+
M.value
|
|
1571
|
+
) || n === M.value;
|
|
1572
1572
|
return /* @__PURE__ */ c(
|
|
1573
1573
|
"button",
|
|
1574
1574
|
{
|
|
1575
1575
|
onClick: (re) => $(
|
|
1576
1576
|
re,
|
|
1577
|
-
|
|
1577
|
+
M,
|
|
1578
1578
|
w.value
|
|
1579
1579
|
),
|
|
1580
|
-
disabled:
|
|
1580
|
+
disabled: M.disabled,
|
|
1581
1581
|
className: f(
|
|
1582
1582
|
"flex w-full items-center justify-between rounded-md px-3 py-1.5 text-sm text-text transition-colors duration-fast ease-out hover:bg-surface-hover",
|
|
1583
1583
|
{
|
|
1584
|
-
"opacity-50 cursor-not-allowed":
|
|
1584
|
+
"opacity-50 cursor-not-allowed": M.disabled
|
|
1585
1585
|
}
|
|
1586
1586
|
),
|
|
1587
1587
|
children: [
|
|
1588
1588
|
/* @__PURE__ */ c("div", { className: "flex items-center space-x-2 min-w-0", children: [
|
|
1589
|
-
|
|
1589
|
+
M.icon && /* @__PURE__ */ e("span", { className: "flex-shrink-0", children: M.icon }),
|
|
1590
1590
|
/* @__PURE__ */ c("div", { className: "flex flex-col items-start min-w-0", children: [
|
|
1591
|
-
/* @__PURE__ */ e("span", { className: "font-base truncate", children:
|
|
1592
|
-
|
|
1591
|
+
/* @__PURE__ */ e("span", { className: "font-base truncate", children: M.label }),
|
|
1592
|
+
M.description && /* @__PURE__ */ e("span", { className: "text-xs text-text-muted", children: M.description })
|
|
1593
1593
|
] })
|
|
1594
1594
|
] }),
|
|
1595
1595
|
b && L && /* @__PURE__ */ e(ke, { className: "size-icon-md shrink-0 text-success-fg", "aria-hidden": !0 })
|
|
1596
1596
|
]
|
|
1597
1597
|
},
|
|
1598
|
-
|
|
1598
|
+
M.value
|
|
1599
1599
|
);
|
|
1600
1600
|
}) })
|
|
1601
1601
|
}
|
|
@@ -1605,7 +1605,7 @@ const zt = ({
|
|
|
1605
1605
|
(() => {
|
|
1606
1606
|
const w = r.reduce((m, S) => {
|
|
1607
1607
|
if (S.divider) return m;
|
|
1608
|
-
const A = S.children ? S.children.filter((
|
|
1608
|
+
const A = S.children ? S.children.filter((M) => !M.divider).length : 0;
|
|
1609
1609
|
return m + 1 + A;
|
|
1610
1610
|
}, 0);
|
|
1611
1611
|
return w > 1 && /* @__PURE__ */ e("div", { className: "border-t border-border mt-2 pt-2", children: /* @__PURE__ */ c("div", { className: "text-xs text-text-muted px-3 py-1", children: [
|
|
@@ -1617,7 +1617,7 @@ const zt = ({
|
|
|
1617
1617
|
]
|
|
1618
1618
|
}
|
|
1619
1619
|
);
|
|
1620
|
-
},
|
|
1620
|
+
}, zt = () => /* @__PURE__ */ e(
|
|
1621
1621
|
"svg",
|
|
1622
1622
|
{
|
|
1623
1623
|
className: "h-4 w-4",
|
|
@@ -1806,7 +1806,7 @@ const zt = ({
|
|
|
1806
1806
|
)
|
|
1807
1807
|
] })
|
|
1808
1808
|
] }) }) });
|
|
1809
|
-
},
|
|
1809
|
+
}, Me = ({
|
|
1810
1810
|
data: t,
|
|
1811
1811
|
columns: r,
|
|
1812
1812
|
loading: n = !1,
|
|
@@ -1838,48 +1838,48 @@ const zt = ({
|
|
|
1838
1838
|
}), K = te(null), w = ue(() => {
|
|
1839
1839
|
let o = t;
|
|
1840
1840
|
if (s && Y.trim()) {
|
|
1841
|
-
const
|
|
1841
|
+
const z = r.filter(
|
|
1842
1842
|
(H) => H.searchable !== !1
|
|
1843
1843
|
), F = Y.toLowerCase();
|
|
1844
|
-
o = o.filter((H) =>
|
|
1845
|
-
const
|
|
1846
|
-
return String(
|
|
1844
|
+
o = o.filter((H) => z.some((P) => {
|
|
1845
|
+
const X = typeof P.accessor == "function" ? P.accessor(H) : H[P.accessor];
|
|
1846
|
+
return String(X || "").toLowerCase().includes(F);
|
|
1847
1847
|
}));
|
|
1848
1848
|
}
|
|
1849
|
-
return l.forEach((
|
|
1850
|
-
|
|
1851
|
-
const H = r.find((
|
|
1849
|
+
return l.forEach((z) => {
|
|
1850
|
+
z.value && z.value !== "all" && (o = o.filter((F) => {
|
|
1851
|
+
const H = r.find((X) => X.id === z.id);
|
|
1852
1852
|
if (!H) return !0;
|
|
1853
1853
|
const P = typeof H.accessor == "function" ? H.accessor(F) : F[H.accessor];
|
|
1854
|
-
return String(P || "") ===
|
|
1854
|
+
return String(P || "") === z.value;
|
|
1855
1855
|
}));
|
|
1856
1856
|
}), o;
|
|
1857
1857
|
}, [t, Y, r, s, l]), m = ue(() => {
|
|
1858
1858
|
if (!j.column || !j.direction) return w;
|
|
1859
|
-
const o = r.find((
|
|
1860
|
-
return o ? [...w].sort((
|
|
1861
|
-
const H = typeof o.accessor == "function" ? o.accessor(
|
|
1862
|
-
let
|
|
1863
|
-
return H < P ?
|
|
1859
|
+
const o = r.find((z) => z.id === j.column);
|
|
1860
|
+
return o ? [...w].sort((z, F) => {
|
|
1861
|
+
const H = typeof o.accessor == "function" ? o.accessor(z) : z[o.accessor], P = typeof o.accessor == "function" ? o.accessor(F) : F[o.accessor];
|
|
1862
|
+
let X = 0;
|
|
1863
|
+
return H < P ? X = -1 : H > P && (X = 1), j.direction === "desc" ? -X : X;
|
|
1864
1864
|
}) : w;
|
|
1865
1865
|
}, [w, j, r]), S = ue(() => {
|
|
1866
1866
|
if (!i) return m;
|
|
1867
|
-
const o = $.page * $.pageSize,
|
|
1868
|
-
return m.slice(o,
|
|
1867
|
+
const o = $.page * $.pageSize, z = o + $.pageSize;
|
|
1868
|
+
return m.slice(o, z);
|
|
1869
1869
|
}, [m, $, i]), A = le(
|
|
1870
1870
|
(o) => {
|
|
1871
1871
|
r.find((F) => F.id === o)?.sortable && J((F) => F.column !== o ? { column: o, direction: "asc" } : F.direction === "asc" ? { column: o, direction: "desc" } : { column: null, direction: null });
|
|
1872
1872
|
},
|
|
1873
1873
|
[r]
|
|
1874
|
-
),
|
|
1875
|
-
V((
|
|
1874
|
+
), M = le((o) => {
|
|
1875
|
+
V((z) => ({ ...z, page: o }));
|
|
1876
1876
|
}, []), q = le((o) => {
|
|
1877
1877
|
V({ page: 0, pageSize: o });
|
|
1878
1878
|
}, []), L = le(
|
|
1879
|
-
(o,
|
|
1879
|
+
(o, z) => {
|
|
1880
1880
|
if (!x) return;
|
|
1881
1881
|
const F = N(o, 0);
|
|
1882
|
-
u.map((H, P) => N(H, P)), x(
|
|
1882
|
+
u.map((H, P) => N(H, P)), x(z ? [...u, o] : u.filter(
|
|
1883
1883
|
(H, P) => N(u[P], P) !== F
|
|
1884
1884
|
));
|
|
1885
1885
|
},
|
|
@@ -1896,19 +1896,19 @@ const zt = ({
|
|
|
1896
1896
|
V((o) => ({ ...o, page: 0 }));
|
|
1897
1897
|
}, [l.map((o) => o.value).join(",")]);
|
|
1898
1898
|
const ne = m.length, D = Math.ceil(ne / $.pageSize), I = $.page * $.pageSize + 1, v = Math.min(I + $.pageSize - 1, ne), T = S.length > 0 && S.every((o) => {
|
|
1899
|
-
const
|
|
1899
|
+
const z = N(o, 0);
|
|
1900
1900
|
return u.some(
|
|
1901
|
-
(F, H) => N(F, H) ===
|
|
1901
|
+
(F, H) => N(F, H) === z
|
|
1902
1902
|
);
|
|
1903
1903
|
}), B = S.some((o) => {
|
|
1904
|
-
const
|
|
1904
|
+
const z = N(o, 0);
|
|
1905
1905
|
return u.some(
|
|
1906
|
-
(F, H) => N(F, H) ===
|
|
1906
|
+
(F, H) => N(F, H) === z
|
|
1907
1907
|
);
|
|
1908
1908
|
}), W = f(
|
|
1909
1909
|
"w-full text-sm leading-5 text-text border-collapse",
|
|
1910
1910
|
G
|
|
1911
|
-
),
|
|
1911
|
+
), Q = f("bg-surface"), R = f(
|
|
1912
1912
|
"text-text p-3 border-b border-border"
|
|
1913
1913
|
), oe = f("h-row-lg", {
|
|
1914
1914
|
"hover:bg-surface-sunk": p,
|
|
@@ -1923,7 +1923,7 @@ const zt = ({
|
|
|
1923
1923
|
placeholder: a,
|
|
1924
1924
|
value: Y,
|
|
1925
1925
|
onChange: (o) => _(o.target.value),
|
|
1926
|
-
startIcon: /* @__PURE__ */ e(
|
|
1926
|
+
startIcon: /* @__PURE__ */ e(zt, {}),
|
|
1927
1927
|
className: "max-w-sm"
|
|
1928
1928
|
}
|
|
1929
1929
|
) })
|
|
@@ -1938,7 +1938,7 @@ const zt = ({
|
|
|
1938
1938
|
}
|
|
1939
1939
|
) }),
|
|
1940
1940
|
/* @__PURE__ */ c("table", { ref: K, className: f(W, "min-w-full"), children: [
|
|
1941
|
-
/* @__PURE__ */ e("thead", { className:
|
|
1941
|
+
/* @__PURE__ */ e("thead", { className: Q, children: /* @__PURE__ */ c("tr", { children: [
|
|
1942
1942
|
d && /* @__PURE__ */ e("th", { className: f(R, "w-12"), children: /* @__PURE__ */ e(
|
|
1943
1943
|
"input",
|
|
1944
1944
|
{
|
|
@@ -2010,9 +2010,9 @@ const zt = ({
|
|
|
2010
2010
|
),
|
|
2011
2011
|
children: y || "No data available"
|
|
2012
2012
|
}
|
|
2013
|
-
) }) : S.map((o,
|
|
2014
|
-
const F = N(o,
|
|
2015
|
-
(P,
|
|
2013
|
+
) }) : S.map((o, z) => {
|
|
2014
|
+
const F = N(o, z), H = u.some(
|
|
2015
|
+
(P, X) => N(P, X) === F
|
|
2016
2016
|
);
|
|
2017
2017
|
return /* @__PURE__ */ c(
|
|
2018
2018
|
"tr",
|
|
@@ -2020,10 +2020,10 @@ const zt = ({
|
|
|
2020
2020
|
className: f(
|
|
2021
2021
|
oe,
|
|
2022
2022
|
{ "bg-accent-soft": H },
|
|
2023
|
-
O?.(o,
|
|
2023
|
+
O?.(o, z)
|
|
2024
2024
|
),
|
|
2025
2025
|
onClick: (P) => {
|
|
2026
|
-
P.stopPropagation(), h?.(o,
|
|
2026
|
+
P.stopPropagation(), h?.(o, z);
|
|
2027
2027
|
},
|
|
2028
2028
|
children: [
|
|
2029
2029
|
d && /* @__PURE__ */ e("td", { className: R, children: /* @__PURE__ */ e(
|
|
@@ -2038,7 +2038,7 @@ const zt = ({
|
|
|
2038
2038
|
}
|
|
2039
2039
|
) }),
|
|
2040
2040
|
r.map((P) => {
|
|
2041
|
-
const
|
|
2041
|
+
const X = typeof P.accessor == "function" ? P.accessor(o) : o[P.accessor];
|
|
2042
2042
|
return /* @__PURE__ */ e(
|
|
2043
2043
|
"td",
|
|
2044
2044
|
{
|
|
@@ -2049,13 +2049,13 @@ const zt = ({
|
|
|
2049
2049
|
"sticky left-0 bg-surface": P.sticky === "left",
|
|
2050
2050
|
"sticky right-0 bg-surface": P.sticky === "right"
|
|
2051
2051
|
}),
|
|
2052
|
-
children: P.cell ? P.cell(
|
|
2052
|
+
children: P.cell ? P.cell(X, o, z) : String(X || "")
|
|
2053
2053
|
},
|
|
2054
2054
|
P.id
|
|
2055
2055
|
);
|
|
2056
2056
|
}),
|
|
2057
2057
|
k.length > 0 && /* @__PURE__ */ e("td", { className: R, children: /* @__PURE__ */ e(
|
|
2058
|
-
|
|
2058
|
+
Mt,
|
|
2059
2059
|
{
|
|
2060
2060
|
trigger: /* @__PURE__ */ c("div", { className: "inline-flex items-center gap-1 px-2 py-1 text-sm text-text-muted hover:text-text", children: [
|
|
2061
2061
|
/* @__PURE__ */ e("span", { children: "Options" }),
|
|
@@ -2068,10 +2068,10 @@ const zt = ({
|
|
|
2068
2068
|
disabled: P.disabled?.(o)
|
|
2069
2069
|
})),
|
|
2070
2070
|
onSelect: (P) => {
|
|
2071
|
-
const
|
|
2071
|
+
const X = k.find(
|
|
2072
2072
|
(pe) => pe.id === P
|
|
2073
2073
|
);
|
|
2074
|
-
|
|
2074
|
+
X && X.onClick(o, z);
|
|
2075
2075
|
},
|
|
2076
2076
|
placement: "bottom-end"
|
|
2077
2077
|
}
|
|
@@ -2113,7 +2113,7 @@ const zt = ({
|
|
|
2113
2113
|
{
|
|
2114
2114
|
size: "sm",
|
|
2115
2115
|
variant: "ghost",
|
|
2116
|
-
onClick: () =>
|
|
2116
|
+
onClick: () => M(0),
|
|
2117
2117
|
disabled: $.page === 0,
|
|
2118
2118
|
iconOnly: !0,
|
|
2119
2119
|
children: /* @__PURE__ */ e(jt, {})
|
|
@@ -2124,7 +2124,7 @@ const zt = ({
|
|
|
2124
2124
|
{
|
|
2125
2125
|
size: "sm",
|
|
2126
2126
|
variant: "ghost",
|
|
2127
|
-
onClick: () =>
|
|
2127
|
+
onClick: () => M($.page - 1),
|
|
2128
2128
|
disabled: $.page === 0,
|
|
2129
2129
|
iconOnly: !0,
|
|
2130
2130
|
children: /* @__PURE__ */ e($t, {})
|
|
@@ -2141,7 +2141,7 @@ const zt = ({
|
|
|
2141
2141
|
{
|
|
2142
2142
|
size: "sm",
|
|
2143
2143
|
variant: "ghost",
|
|
2144
|
-
onClick: () =>
|
|
2144
|
+
onClick: () => M($.page + 1),
|
|
2145
2145
|
disabled: $.page >= D - 1,
|
|
2146
2146
|
iconOnly: !0,
|
|
2147
2147
|
children: /* @__PURE__ */ e(Tt, {})
|
|
@@ -2152,7 +2152,7 @@ const zt = ({
|
|
|
2152
2152
|
{
|
|
2153
2153
|
size: "sm",
|
|
2154
2154
|
variant: "ghost",
|
|
2155
|
-
onClick: () =>
|
|
2155
|
+
onClick: () => M(D - 1),
|
|
2156
2156
|
disabled: $.page >= D - 1,
|
|
2157
2157
|
iconOnly: !0,
|
|
2158
2158
|
children: /* @__PURE__ */ e(Dt, {})
|
|
@@ -2450,7 +2450,7 @@ const Ht = ({
|
|
|
2450
2450
|
}) => {
|
|
2451
2451
|
const [u, x] = U(!1), [N, y] = U([]), [p, E] = U(null), [C, G] = U("/"), [O, Y] = U([]), [_, j] = U(!1), [J, $] = U(""), [V, K] = U(
|
|
2452
2452
|
typeof t == "object" ? t : null
|
|
2453
|
-
), [w, m] = U(!1), [S, A] = U(""),
|
|
2453
|
+
), [w, m] = U(!1), [S, A] = U(""), M = te(null);
|
|
2454
2454
|
Z(() => {
|
|
2455
2455
|
u && q();
|
|
2456
2456
|
}, [u]), Z(() => {
|
|
@@ -2479,19 +2479,19 @@ const Ht = ({
|
|
|
2479
2479
|
}
|
|
2480
2480
|
}
|
|
2481
2481
|
}, re = async (o) => {
|
|
2482
|
-
const
|
|
2483
|
-
if (
|
|
2482
|
+
const z = o.target.files?.[0];
|
|
2483
|
+
if (z) {
|
|
2484
2484
|
j(!0);
|
|
2485
2485
|
try {
|
|
2486
|
-
const F = await
|
|
2486
|
+
const F = await z.arrayBuffer(), H = new Uint8Array(F), P = {
|
|
2487
2487
|
id: `local-${Date.now()}`,
|
|
2488
|
-
name:
|
|
2488
|
+
name: z.name,
|
|
2489
2489
|
type: "file",
|
|
2490
2490
|
path: "/",
|
|
2491
|
-
mimeType:
|
|
2492
|
-
size:
|
|
2491
|
+
mimeType: z.type || "application/octet-stream",
|
|
2492
|
+
size: z.size,
|
|
2493
2493
|
mountId: "local",
|
|
2494
|
-
providerKey:
|
|
2494
|
+
providerKey: z.name,
|
|
2495
2495
|
ownerId: "me"
|
|
2496
2496
|
};
|
|
2497
2497
|
K(P), r(P, H), x(!1);
|
|
@@ -2502,14 +2502,14 @@ const Ht = ({
|
|
|
2502
2502
|
}
|
|
2503
2503
|
}
|
|
2504
2504
|
}, ne = async (o) => {
|
|
2505
|
-
const
|
|
2506
|
-
if (!(!
|
|
2505
|
+
const z = o.target.files?.[0];
|
|
2506
|
+
if (!(!z || !p)) {
|
|
2507
2507
|
j(!0);
|
|
2508
2508
|
try {
|
|
2509
|
-
const F = await
|
|
2509
|
+
const F = await z.arrayBuffer(), H = await k?.({
|
|
2510
2510
|
file: new Uint8Array(F),
|
|
2511
|
-
filename:
|
|
2512
|
-
mimeType:
|
|
2511
|
+
filename: z.name,
|
|
2512
|
+
mimeType: z.type || "application/octet-stream",
|
|
2513
2513
|
mountId: p.id,
|
|
2514
2514
|
path: C
|
|
2515
2515
|
});
|
|
@@ -2547,42 +2547,42 @@ const Ht = ({
|
|
|
2547
2547
|
}, I = async (o) => {
|
|
2548
2548
|
j(!0);
|
|
2549
2549
|
try {
|
|
2550
|
-
const
|
|
2551
|
-
K(o), r(o,
|
|
2552
|
-
} catch (
|
|
2553
|
-
console.error("Failed to download file",
|
|
2550
|
+
const z = await h?.(o.id);
|
|
2551
|
+
K(o), r(o, z), x(!1);
|
|
2552
|
+
} catch (z) {
|
|
2553
|
+
console.error("Failed to download file", z);
|
|
2554
2554
|
} finally {
|
|
2555
2555
|
j(!1);
|
|
2556
2556
|
}
|
|
2557
2557
|
}, v = (o) => {
|
|
2558
2558
|
o.stopPropagation(), K(null), r(null);
|
|
2559
2559
|
}, T = ue(() => {
|
|
2560
|
-
const o = /* @__PURE__ */ new Set(),
|
|
2560
|
+
const o = /* @__PURE__ */ new Set(), z = [];
|
|
2561
2561
|
return O.forEach((F) => {
|
|
2562
2562
|
if (F.type === "folder") {
|
|
2563
2563
|
F.path === C && o.add(F.name);
|
|
2564
2564
|
return;
|
|
2565
2565
|
}
|
|
2566
|
-
const H = F.providerKey || F.name,
|
|
2567
|
-
|
|
2566
|
+
const H = F.providerKey || F.name, X = (C ? H.substring(C.length) : H).split("/").filter((pe) => pe !== "");
|
|
2567
|
+
X.length > 1 ? o.add(X[0]) : X.length === 1 && z.push(F);
|
|
2568
2568
|
}), {
|
|
2569
2569
|
folders: Array.from(o).sort(),
|
|
2570
|
-
files:
|
|
2570
|
+
files: z.sort((F, H) => F.name.localeCompare(H.name))
|
|
2571
2571
|
};
|
|
2572
2572
|
}, [O, C]), B = (o) => {
|
|
2573
|
-
G((
|
|
2573
|
+
G((z) => `${z}${o}/`);
|
|
2574
2574
|
}, W = () => {
|
|
2575
|
-
const o = C.split("/").filter((
|
|
2575
|
+
const o = C.split("/").filter((z) => z !== "");
|
|
2576
2576
|
o.pop(), o.length === 0 ? G("/") : G(`${o.join("/")}/`);
|
|
2577
|
-
},
|
|
2578
|
-
const o = T.folders.map((
|
|
2579
|
-
id: `folder-${
|
|
2580
|
-
name:
|
|
2577
|
+
}, Q = ue(() => {
|
|
2578
|
+
const o = T.folders.map((z) => ({
|
|
2579
|
+
id: `folder-${z}`,
|
|
2580
|
+
name: z,
|
|
2581
2581
|
type: "folder"
|
|
2582
2582
|
}));
|
|
2583
|
-
return T.files.forEach((
|
|
2583
|
+
return T.files.forEach((z) => {
|
|
2584
2584
|
o.push({
|
|
2585
|
-
...
|
|
2585
|
+
...z,
|
|
2586
2586
|
type: "file"
|
|
2587
2587
|
});
|
|
2588
2588
|
}), o;
|
|
@@ -2591,16 +2591,16 @@ const Ht = ({
|
|
|
2591
2591
|
id: "name",
|
|
2592
2592
|
header: "Name",
|
|
2593
2593
|
accessor: "name",
|
|
2594
|
-
cell: (o,
|
|
2594
|
+
cell: (o, z) => /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
|
|
2595
2595
|
/* @__PURE__ */ e(
|
|
2596
2596
|
ce,
|
|
2597
2597
|
{
|
|
2598
|
-
icon:
|
|
2598
|
+
icon: z.type === "folder" ? Se : ge,
|
|
2599
2599
|
size: "sm",
|
|
2600
|
-
color:
|
|
2600
|
+
color: z.type === "folder" ? "warning" : "secondary"
|
|
2601
2601
|
}
|
|
2602
2602
|
),
|
|
2603
|
-
/* @__PURE__ */ e("span", { className: f(
|
|
2603
|
+
/* @__PURE__ */ e("span", { className: f(z.type === "folder" && "font-medium"), children: o })
|
|
2604
2604
|
] })
|
|
2605
2605
|
},
|
|
2606
2606
|
{
|
|
@@ -2618,16 +2618,16 @@ const Ht = ({
|
|
|
2618
2618
|
header: "",
|
|
2619
2619
|
accessor: "id",
|
|
2620
2620
|
align: "right",
|
|
2621
|
-
cell: (o,
|
|
2621
|
+
cell: (o, z) => /* @__PURE__ */ e(
|
|
2622
2622
|
ee,
|
|
2623
2623
|
{
|
|
2624
2624
|
size: "sm",
|
|
2625
2625
|
variant: "outline",
|
|
2626
2626
|
onClick: (F) => {
|
|
2627
|
-
F.stopPropagation(),
|
|
2627
|
+
F.stopPropagation(), z.type === "folder" ? B(z.name) : I(z);
|
|
2628
2628
|
},
|
|
2629
|
-
loading: _ &&
|
|
2630
|
-
children:
|
|
2629
|
+
loading: _ && z.type === "file" && V?.id === z.id,
|
|
2630
|
+
children: z.type === "folder" ? "Open" : "Select"
|
|
2631
2631
|
}
|
|
2632
2632
|
)
|
|
2633
2633
|
}
|
|
@@ -2646,7 +2646,7 @@ const Ht = ({
|
|
|
2646
2646
|
header: "",
|
|
2647
2647
|
accessor: "id",
|
|
2648
2648
|
align: "right",
|
|
2649
|
-
cell: (o,
|
|
2649
|
+
cell: (o, z) => /* @__PURE__ */ e(ee, { size: "sm", variant: "outline", onClick: () => E(z), children: "Open" })
|
|
2650
2650
|
}
|
|
2651
2651
|
];
|
|
2652
2652
|
return /* @__PURE__ */ c("div", { className: "space-y-1", children: [
|
|
@@ -2735,7 +2735,7 @@ const Ht = ({
|
|
|
2735
2735
|
{
|
|
2736
2736
|
variant: "primary",
|
|
2737
2737
|
size: "sm",
|
|
2738
|
-
onClick: () =>
|
|
2738
|
+
onClick: () => M.current?.click(),
|
|
2739
2739
|
leftIcon: /* @__PURE__ */ e(ce, { icon: Ke, size: "xs" }),
|
|
2740
2740
|
loading: _,
|
|
2741
2741
|
children: "Upload"
|
|
@@ -2746,7 +2746,7 @@ const Ht = ({
|
|
|
2746
2746
|
{
|
|
2747
2747
|
type: "file",
|
|
2748
2748
|
className: "hidden",
|
|
2749
|
-
ref:
|
|
2749
|
+
ref: M,
|
|
2750
2750
|
onChange: ne,
|
|
2751
2751
|
accept: i
|
|
2752
2752
|
}
|
|
@@ -2769,9 +2769,9 @@ const Ht = ({
|
|
|
2769
2769
|
/* @__PURE__ */ e(ee, { size: "sm", variant: "ghost", onClick: () => m(!1), children: "Cancel" })
|
|
2770
2770
|
] }),
|
|
2771
2771
|
/* @__PURE__ */ e("div", { className: "max-h-100 overflow-auto rounded-lg border border-border", children: /* @__PURE__ */ e(
|
|
2772
|
-
|
|
2772
|
+
Me,
|
|
2773
2773
|
{
|
|
2774
|
-
data:
|
|
2774
|
+
data: Q,
|
|
2775
2775
|
columns: R,
|
|
2776
2776
|
loading: _,
|
|
2777
2777
|
emptyContent: "This folder is empty",
|
|
@@ -2779,7 +2779,7 @@ const Ht = ({
|
|
|
2779
2779
|
}
|
|
2780
2780
|
) })
|
|
2781
2781
|
] }) : /* @__PURE__ */ e("div", { className: "max-h-100 overflow-auto rounded-lg border border-border", children: /* @__PURE__ */ e(
|
|
2782
|
-
|
|
2782
|
+
Me,
|
|
2783
2783
|
{
|
|
2784
2784
|
data: N,
|
|
2785
2785
|
columns: oe,
|
|
@@ -2897,7 +2897,7 @@ const Ht = ({
|
|
|
2897
2897
|
}
|
|
2898
2898
|
);
|
|
2899
2899
|
Ne.displayName = "TextArea";
|
|
2900
|
-
function
|
|
2900
|
+
function ze(t, r) {
|
|
2901
2901
|
return r.split(".").reduce(
|
|
2902
2902
|
(n, s) => n && typeof n == "object" && s in n ? n[s] : void 0,
|
|
2903
2903
|
t
|
|
@@ -2946,21 +2946,21 @@ const Or = ({
|
|
|
2946
2946
|
}, [r]);
|
|
2947
2947
|
const _ = le(
|
|
2948
2948
|
(m, S, A) => {
|
|
2949
|
-
const
|
|
2950
|
-
if (!
|
|
2951
|
-
if (
|
|
2952
|
-
return `${
|
|
2953
|
-
if (
|
|
2954
|
-
if (
|
|
2955
|
-
return `${
|
|
2949
|
+
const M = t.flatMap((q) => q.items).find((q) => q.name === m);
|
|
2950
|
+
if (!M) return null;
|
|
2951
|
+
if (M.required && (S == null || S === ""))
|
|
2952
|
+
return `${M.label} is required`;
|
|
2953
|
+
if (M.type === "array") {
|
|
2954
|
+
if (M.required && (!S || S.length === 0))
|
|
2955
|
+
return `${M.label} cannot be empty.`;
|
|
2956
2956
|
if (S && !Array.isArray(S))
|
|
2957
|
-
return `${
|
|
2958
|
-
if (Array.isArray(S) &&
|
|
2957
|
+
return `${M.label} must be an array.`;
|
|
2958
|
+
if (Array.isArray(S) && M.arrayFields) {
|
|
2959
2959
|
const q = [];
|
|
2960
2960
|
let L = !1;
|
|
2961
2961
|
if (S.forEach((re, ne) => {
|
|
2962
2962
|
const D = {};
|
|
2963
|
-
for (const I of
|
|
2963
|
+
for (const I of M.arrayFields) {
|
|
2964
2964
|
const v = re?.[I.name];
|
|
2965
2965
|
if (I.required && (v == null || v === ""))
|
|
2966
2966
|
D[I.name] = `${I.label} is required`, L = !0;
|
|
@@ -2974,7 +2974,7 @@ const Or = ({
|
|
|
2974
2974
|
return JSON.stringify(q);
|
|
2975
2975
|
}
|
|
2976
2976
|
}
|
|
2977
|
-
return
|
|
2977
|
+
return M.validator ? M.validator(S, A) : null;
|
|
2978
2978
|
},
|
|
2979
2979
|
[t]
|
|
2980
2980
|
), j = le(
|
|
@@ -3001,7 +3001,7 @@ const Or = ({
|
|
|
3001
3001
|
continue;
|
|
3002
3002
|
const L = _(
|
|
3003
3003
|
q.name,
|
|
3004
|
-
|
|
3004
|
+
ze(p, q.name),
|
|
3005
3005
|
p
|
|
3006
3006
|
);
|
|
3007
3007
|
L && (S[q.name] = L);
|
|
@@ -3012,15 +3012,15 @@ const Or = ({
|
|
|
3012
3012
|
}
|
|
3013
3013
|
if (G(S), Object.keys(S).some((q) => S[q]))
|
|
3014
3014
|
return;
|
|
3015
|
-
const
|
|
3016
|
-
await n?.(p,
|
|
3015
|
+
const M = l ? l(p) : p;
|
|
3016
|
+
await n?.(p, M);
|
|
3017
3017
|
},
|
|
3018
3018
|
[p, t, _, i, l, n, u]
|
|
3019
3019
|
), $ = le(
|
|
3020
3020
|
(m) => {
|
|
3021
|
-
const S =
|
|
3021
|
+
const S = ze(p, m.name), A = O[m.name] ? C[m.name] : void 0, M = m.disabled || u, q = {
|
|
3022
3022
|
value: S || "",
|
|
3023
|
-
disabled:
|
|
3023
|
+
disabled: M,
|
|
3024
3024
|
required: m.required,
|
|
3025
3025
|
placeholder: m.placeholder,
|
|
3026
3026
|
...m.fieldProps
|
|
@@ -3095,7 +3095,7 @@ const Or = ({
|
|
|
3095
3095
|
value: L.value,
|
|
3096
3096
|
checked: S === L.value,
|
|
3097
3097
|
onChange: () => j(m.name, L.value),
|
|
3098
|
-
disabled:
|
|
3098
|
+
disabled: M || L.disabled,
|
|
3099
3099
|
className: "size-checkbox shrink-0 border border-border-strong bg-surface-input accent-accent focus-visible:outline-none focus-visible:focus-ring"
|
|
3100
3100
|
}
|
|
3101
3101
|
),
|
|
@@ -3157,7 +3157,7 @@ const Or = ({
|
|
|
3157
3157
|
method: "GET",
|
|
3158
3158
|
action: "storage.mount"
|
|
3159
3159
|
}),
|
|
3160
|
-
disabled:
|
|
3160
|
+
disabled: M,
|
|
3161
3161
|
size: d,
|
|
3162
3162
|
placeholder: m.placeholder
|
|
3163
3163
|
}
|
|
@@ -3167,7 +3167,7 @@ const Or = ({
|
|
|
3167
3167
|
value: S,
|
|
3168
3168
|
onChange: (L) => j(m.name, L),
|
|
3169
3169
|
error: A,
|
|
3170
|
-
disabled:
|
|
3170
|
+
disabled: M
|
|
3171
3171
|
});
|
|
3172
3172
|
case "array": {
|
|
3173
3173
|
const L = S || [];
|
|
@@ -3205,9 +3205,9 @@ const Or = ({
|
|
|
3205
3205
|
B.required && /* @__PURE__ */ e("span", { className: "ml-1 text-danger-fg", children: "*" })
|
|
3206
3206
|
] }),
|
|
3207
3207
|
(() => {
|
|
3208
|
-
const
|
|
3208
|
+
const Q = {
|
|
3209
3209
|
value: v?.[B.name] || "",
|
|
3210
|
-
disabled:
|
|
3210
|
+
disabled: M,
|
|
3211
3211
|
required: B.required,
|
|
3212
3212
|
placeholder: B.placeholder,
|
|
3213
3213
|
...B.fieldProps
|
|
@@ -3222,7 +3222,7 @@ const Or = ({
|
|
|
3222
3222
|
return /* @__PURE__ */ e(
|
|
3223
3223
|
me,
|
|
3224
3224
|
{
|
|
3225
|
-
...
|
|
3225
|
+
...Q,
|
|
3226
3226
|
onChange: (R) => I(
|
|
3227
3227
|
T,
|
|
3228
3228
|
B.name,
|
|
@@ -3238,7 +3238,7 @@ const Or = ({
|
|
|
3238
3238
|
return /* @__PURE__ */ e(
|
|
3239
3239
|
Ne,
|
|
3240
3240
|
{
|
|
3241
|
-
...
|
|
3241
|
+
...Q,
|
|
3242
3242
|
onChange: (R) => I(
|
|
3243
3243
|
T,
|
|
3244
3244
|
B.name,
|
|
@@ -3253,7 +3253,7 @@ const Or = ({
|
|
|
3253
3253
|
return /* @__PURE__ */ e(
|
|
3254
3254
|
be,
|
|
3255
3255
|
{
|
|
3256
|
-
...
|
|
3256
|
+
...Q,
|
|
3257
3257
|
onChange: (R) => I(
|
|
3258
3258
|
T,
|
|
3259
3259
|
B.name,
|
|
@@ -3276,7 +3276,7 @@ const Or = ({
|
|
|
3276
3276
|
return /* @__PURE__ */ e(
|
|
3277
3277
|
fe,
|
|
3278
3278
|
{
|
|
3279
|
-
...
|
|
3279
|
+
...Q,
|
|
3280
3280
|
checked: !!v?.[B.name],
|
|
3281
3281
|
onChange: (R) => I(
|
|
3282
3282
|
T,
|
|
@@ -3304,7 +3304,7 @@ const Or = ({
|
|
|
3304
3304
|
B.name,
|
|
3305
3305
|
R.value
|
|
3306
3306
|
),
|
|
3307
|
-
disabled:
|
|
3307
|
+
disabled: M || R.disabled,
|
|
3308
3308
|
className: "size-checkbox shrink-0 border border-border-strong bg-surface-input accent-accent focus-visible:outline-none focus-visible:focus-ring"
|
|
3309
3309
|
}
|
|
3310
3310
|
),
|
|
@@ -3318,7 +3318,7 @@ const Or = ({
|
|
|
3318
3318
|
return /* @__PURE__ */ e(
|
|
3319
3319
|
ye,
|
|
3320
3320
|
{
|
|
3321
|
-
...
|
|
3321
|
+
...Q,
|
|
3322
3322
|
value: R ? new Date(R) : null,
|
|
3323
3323
|
onChange: (oe) => I(
|
|
3324
3324
|
T,
|
|
@@ -3338,7 +3338,7 @@ const Or = ({
|
|
|
3338
3338
|
R
|
|
3339
3339
|
),
|
|
3340
3340
|
error: W,
|
|
3341
|
-
disabled:
|
|
3341
|
+
disabled: M
|
|
3342
3342
|
});
|
|
3343
3343
|
// Add other field types here as needed
|
|
3344
3344
|
default:
|
|
@@ -3364,7 +3364,7 @@ const Or = ({
|
|
|
3364
3364
|
size: "md",
|
|
3365
3365
|
"aria-label": `${m.label} verwijderen`,
|
|
3366
3366
|
onClick: () => D(T),
|
|
3367
|
-
disabled:
|
|
3367
|
+
disabled: M,
|
|
3368
3368
|
className: f("shrink-0", T === 0 && "mt-5"),
|
|
3369
3369
|
children: /* @__PURE__ */ e(Ge, { className: "size-icon-md" })
|
|
3370
3370
|
}
|
|
@@ -3378,7 +3378,7 @@ const Or = ({
|
|
|
3378
3378
|
size: "sm",
|
|
3379
3379
|
leftIcon: /* @__PURE__ */ e(Je, { className: "size-icon-sm" }),
|
|
3380
3380
|
onClick: ne,
|
|
3381
|
-
disabled:
|
|
3381
|
+
disabled: M,
|
|
3382
3382
|
children: [
|
|
3383
3383
|
m.label,
|
|
3384
3384
|
" toevoegen"
|
|
@@ -3396,7 +3396,7 @@ const Or = ({
|
|
|
3396
3396
|
(m) => {
|
|
3397
3397
|
if (m.conditional && !m.conditional(p))
|
|
3398
3398
|
return null;
|
|
3399
|
-
const S = m.items.filter((
|
|
3399
|
+
const S = m.items.filter((M) => !(M.hidden || M.conditional && !M.conditional(p)));
|
|
3400
3400
|
if (S.length === 0) return null;
|
|
3401
3401
|
const A = f(
|
|
3402
3402
|
m.layout === "flex" ? "flex flex-wrap gap-3" : "grid gap-3",
|
|
@@ -3417,26 +3417,26 @@ const Or = ({
|
|
|
3417
3417
|
/* @__PURE__ */ e("span", { className: "text-sm font-semibold text-text", children: m.title }),
|
|
3418
3418
|
m.description && /* @__PURE__ */ e("p", { className: "mt-1 text-xs leading-4 text-text-subtle", children: m.description })
|
|
3419
3419
|
] }),
|
|
3420
|
-
/* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ e("div", { className: A, children: S.map((
|
|
3420
|
+
/* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ e("div", { className: A, children: S.map((M) => (O[M.name] && C[M.name], /* @__PURE__ */ c(
|
|
3421
3421
|
"div",
|
|
3422
3422
|
{
|
|
3423
3423
|
className: f(
|
|
3424
3424
|
"flex min-w-0 flex-col gap-1.5",
|
|
3425
|
-
|
|
3425
|
+
M.type === "checkbox" && "justify-center"
|
|
3426
3426
|
),
|
|
3427
3427
|
style: {
|
|
3428
|
-
width: typeof
|
|
3429
|
-
gridColumn: typeof
|
|
3428
|
+
width: typeof M.width == "string" ? M.width : void 0,
|
|
3429
|
+
gridColumn: typeof M.width == "number" ? `span ${M.width} / span ${M.width}` : void 0
|
|
3430
3430
|
},
|
|
3431
3431
|
children: [
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3432
|
+
M.type !== "custom" && M.type !== "checkbox" && /* @__PURE__ */ c("label", { className: "block text-xs font-semibold uppercase tracking-label text-text-subtle", children: [
|
|
3433
|
+
M.label,
|
|
3434
|
+
M.required && /* @__PURE__ */ e("span", { className: "ml-1 text-danger-fg", children: "*" })
|
|
3435
3435
|
] }),
|
|
3436
|
-
$(
|
|
3436
|
+
$(M)
|
|
3437
3437
|
]
|
|
3438
3438
|
},
|
|
3439
|
-
|
|
3439
|
+
M.name
|
|
3440
3440
|
))) }) })
|
|
3441
3441
|
]
|
|
3442
3442
|
},
|
|
@@ -3962,7 +3962,7 @@ function Gr({
|
|
|
3962
3962
|
() => Object.fromEntries(
|
|
3963
3963
|
(d ?? []).filter((v) => v.defaultCollapsed).map((v) => [v.id, !0])
|
|
3964
3964
|
)
|
|
3965
|
-
), S = (v, T) => r ? r(v, T) : T, A = (v) => E.includes(v),
|
|
3965
|
+
), S = (v, T) => r ? r(v, T) : T, A = (v) => E.includes(v), M = (v, T) => {
|
|
3966
3966
|
C && C(
|
|
3967
3967
|
T ? [...E, v] : E.filter((B) => B !== v)
|
|
3968
3968
|
);
|
|
@@ -3991,7 +3991,7 @@ function Gr({
|
|
|
3991
3991
|
if (t.length === 0 && j)
|
|
3992
3992
|
return /* @__PURE__ */ e("div", { className: L, children: j });
|
|
3993
3993
|
const re = t.length > 0 && E.length === t.length, ne = E.length > 0 && !re, D = (v, T, B) => {
|
|
3994
|
-
const W = b?.(v, T) ?? !1,
|
|
3994
|
+
const W = b?.(v, T) ?? !1, Q = g?.(v, T) ?? !1, R = k?.(v, T) ?? !1, oe = p && A(v);
|
|
3995
3995
|
return /* @__PURE__ */ c(
|
|
3996
3996
|
"li",
|
|
3997
3997
|
{
|
|
@@ -4002,7 +4002,7 @@ function Gr({
|
|
|
4002
4002
|
n === "divided" && !B && "border-t border-border-subtle",
|
|
4003
4003
|
i && "cursor-pointer",
|
|
4004
4004
|
W || oe ? "bg-accent-soft text-text" : i && "hover:bg-surface-hover",
|
|
4005
|
-
|
|
4005
|
+
Q && "font-bold",
|
|
4006
4006
|
R && "opacity-55"
|
|
4007
4007
|
),
|
|
4008
4008
|
children: [
|
|
@@ -4010,7 +4010,7 @@ function Gr({
|
|
|
4010
4010
|
fe,
|
|
4011
4011
|
{
|
|
4012
4012
|
checked: A(v),
|
|
4013
|
-
onChange: (o) =>
|
|
4013
|
+
onChange: (o) => M(v, o.target.checked),
|
|
4014
4014
|
"aria-label": "Rij selecteren"
|
|
4015
4015
|
}
|
|
4016
4016
|
) }),
|
|
@@ -4022,14 +4022,6 @@ function Gr({
|
|
|
4022
4022
|
}
|
|
4023
4023
|
),
|
|
4024
4024
|
s && /* @__PURE__ */ e("span", { className: "shrink-0", children: s(v, T) }),
|
|
4025
|
-
X && /* @__PURE__ */ e(
|
|
4026
|
-
"span",
|
|
4027
|
-
{
|
|
4028
|
-
"aria-hidden": !0,
|
|
4029
|
-
className: "size-1.5 shrink-0 rounded-full bg-accent",
|
|
4030
|
-
title: "Ongelezen"
|
|
4031
|
-
}
|
|
4032
|
-
),
|
|
4033
4025
|
/* @__PURE__ */ e("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: a ? a(v, T) : String(v) }),
|
|
4034
4026
|
l && /* @__PURE__ */ e("span", { className: "shrink-0 text-xs text-text-subtle", children: l(v, T) })
|
|
4035
4027
|
]
|
|
@@ -4038,18 +4030,18 @@ function Gr({
|
|
|
4038
4030
|
);
|
|
4039
4031
|
}, I = (() => {
|
|
4040
4032
|
if (!h)
|
|
4041
|
-
return t.map((W,
|
|
4033
|
+
return t.map((W, Q) => D(W, Q, Q === 0));
|
|
4042
4034
|
const v = /* @__PURE__ */ new Map();
|
|
4043
|
-
t.forEach((W,
|
|
4044
|
-
const R = h(W,
|
|
4045
|
-
v.has(R) || v.set(R, []), v.get(R).push({ item: W, index:
|
|
4035
|
+
t.forEach((W, Q) => {
|
|
4036
|
+
const R = h(W, Q);
|
|
4037
|
+
v.has(R) || v.set(R, []), v.get(R).push({ item: W, index: Q });
|
|
4046
4038
|
});
|
|
4047
4039
|
const T = d ?? [];
|
|
4048
4040
|
return [
|
|
4049
4041
|
...T.filter((W) => v.has(W.id)),
|
|
4050
|
-
...[...v.keys()].filter((W) => !T.some((
|
|
4051
|
-
].flatMap((W,
|
|
4052
|
-
const R = v.get(W.id) ?? [], oe = N && w[W.id], o = W.title ?? W.id,
|
|
4042
|
+
...[...v.keys()].filter((W) => !T.some((Q) => Q.id === W)).map((W) => ({ id: W }))
|
|
4043
|
+
].flatMap((W, Q) => {
|
|
4044
|
+
const R = v.get(W.id) ?? [], oe = N && w[W.id], o = W.title ?? W.id, z = W.count ?? R.length, F = /* @__PURE__ */ e(
|
|
4053
4045
|
"li",
|
|
4054
4046
|
{
|
|
4055
4047
|
onClick: N ? () => m((H) => ({ ...H, [W.id]: !H[W.id] })) : void 0,
|
|
@@ -4057,7 +4049,7 @@ function Gr({
|
|
|
4057
4049
|
"flex items-center gap-2 bg-surface-sunk px-4 py-1.5",
|
|
4058
4050
|
"text-xs font-semibold uppercase tracking-label text-text-subtle",
|
|
4059
4051
|
"border-border-subtle",
|
|
4060
|
-
|
|
4052
|
+
Q > 0 && "border-t",
|
|
4061
4053
|
"border-b",
|
|
4062
4054
|
x && "sticky z-10",
|
|
4063
4055
|
N && "cursor-pointer select-none hover:text-text"
|
|
@@ -4076,7 +4068,7 @@ function Gr({
|
|
|
4076
4068
|
}
|
|
4077
4069
|
),
|
|
4078
4070
|
/* @__PURE__ */ e("span", { children: o }),
|
|
4079
|
-
!y && /* @__PURE__ */ e("span", { className: "ml-auto font-normal tabular-nums", children:
|
|
4071
|
+
!y && /* @__PURE__ */ e("span", { className: "ml-auto font-normal tabular-nums", children: z })
|
|
4080
4072
|
] })
|
|
4081
4073
|
},
|
|
4082
4074
|
`group-${W.id}`
|
|
@@ -4084,7 +4076,7 @@ function Gr({
|
|
|
4084
4076
|
return oe ? [F] : [
|
|
4085
4077
|
F,
|
|
4086
4078
|
...R.map(
|
|
4087
|
-
({ item: H, index: P },
|
|
4079
|
+
({ item: H, index: P }, X) => D(H, P, X === 0)
|
|
4088
4080
|
)
|
|
4089
4081
|
];
|
|
4090
4082
|
});
|
|
@@ -4110,7 +4102,7 @@ function Gr({
|
|
|
4110
4102
|
"div",
|
|
4111
4103
|
{
|
|
4112
4104
|
className: f(
|
|
4113
|
-
"flex items-center gap-3 border-b border-border-subtle
|
|
4105
|
+
"flex items-center gap-3 border-b border-border-subtle px-4 py-1.5",
|
|
4114
4106
|
"text-xs font-semibold uppercase tracking-label text-text-subtle",
|
|
4115
4107
|
Y && "sticky top-0 z-20"
|
|
4116
4108
|
),
|
|
@@ -4164,7 +4156,7 @@ const Yr = ({
|
|
|
4164
4156
|
"div",
|
|
4165
4157
|
{
|
|
4166
4158
|
className: f(
|
|
4167
|
-
"p-5 pb-3
|
|
4159
|
+
"p-5 pb-3",
|
|
4168
4160
|
a
|
|
4169
4161
|
),
|
|
4170
4162
|
children: [
|
|
@@ -4565,8 +4557,7 @@ const Qr = ({
|
|
|
4565
4557
|
"div",
|
|
4566
4558
|
{
|
|
4567
4559
|
className: f(
|
|
4568
|
-
"flex items-center gap-2 px-2 pt-4 pb-1 text-xs font-semibold uppercase tracking-label text-text-subtle"
|
|
4569
|
-
s > 0 && "pl-6"
|
|
4560
|
+
"flex items-center gap-2 px-2 pt-4 pb-1 text-xs font-semibold uppercase tracking-label text-text-subtle"
|
|
4570
4561
|
),
|
|
4571
4562
|
children: [
|
|
4572
4563
|
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate", children: t.label }),
|
|
@@ -4598,7 +4589,7 @@ const Qr = ({
|
|
|
4598
4589
|
"transition-colors duration-fast ease-out",
|
|
4599
4590
|
"focus-visible:outline-none focus-visible:focus-ring",
|
|
4600
4591
|
l ? "bg-accent-soft font-semibold text-accent" : "text-text-muted hover:bg-surface-hover hover:text-text",
|
|
4601
|
-
s
|
|
4592
|
+
s === 0 && "font-ui-450"
|
|
4602
4593
|
),
|
|
4603
4594
|
children: [
|
|
4604
4595
|
t.icon && /* @__PURE__ */ e("span", { className: "flex w-5 shrink-0 items-center justify-center", children: t.icon }),
|
|
@@ -4623,7 +4614,7 @@ const Qr = ({
|
|
|
4623
4614
|
isSelectedHandler: s,
|
|
4624
4615
|
onClick: a,
|
|
4625
4616
|
preMenuItemsComponent: l
|
|
4626
|
-
}) => /* @__PURE__ */ c("nav", { className: "flex h-full
|
|
4617
|
+
}) => /* @__PURE__ */ c("nav", { className: "flex h-full shrink-0 flex-col p-3 pt-4", children: [
|
|
4627
4618
|
/* @__PURE__ */ c("div", { className: "flex items-center gap-2 px-2 pb-3", children: [
|
|
4628
4619
|
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-lg font-semibold text-text", children: t }),
|
|
4629
4620
|
r && r.length > 0 && /* @__PURE__ */ e("div", { className: "flex shrink-0 items-center gap-1", children: r.map((i, b) => /* @__PURE__ */ e(
|
|
@@ -5015,7 +5006,7 @@ export {
|
|
|
5015
5006
|
rn as CommandPalette,
|
|
5016
5007
|
St as ContentLoading,
|
|
5017
5008
|
ye as DatePicker,
|
|
5018
|
-
|
|
5009
|
+
Mt as Dropdown,
|
|
5019
5010
|
Wr as EmptyState,
|
|
5020
5011
|
an as ErrorBoundary,
|
|
5021
5012
|
sn as FederatedResource,
|
|
@@ -5045,7 +5036,7 @@ export {
|
|
|
5045
5036
|
De as SplitButton,
|
|
5046
5037
|
Ht as StorageInput,
|
|
5047
5038
|
Br as TabBar,
|
|
5048
|
-
|
|
5039
|
+
Me as Table,
|
|
5049
5040
|
Pt as Tabs,
|
|
5050
5041
|
ae as Text,
|
|
5051
5042
|
Ne as TextArea,
|