@memobit/libs 3.4.3 → 3.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AngleSlider/AngleSlider2.js +27 -27
- package/dist/components/AppHeader/AppHeader2.js +39 -36
- package/dist/components/Auth/ChangePasswordModal/ChangePasswordModal2.js +48 -52
- package/dist/components/Auth/MfaSetupModal/MfaSetupModal2.js +64 -65
- package/dist/components/Blockquote/Blockquote2.js +14 -14
- package/dist/components/BulkActionBar/BulkActionBar2.js +34 -30
- package/dist/components/Calendar/Calendar2.js +10 -8
- package/dist/components/Card/Card.css +1 -1
- package/dist/components/Confetti/Confetti2.js +2 -3
- package/dist/components/ControlPanel/ControlPanelFilter.js +26 -26
- package/dist/components/DataView/DataView.CardView.js +8 -4
- package/dist/components/DataView/DataView.ColumnSelector.js +24 -21
- package/dist/components/DataView/DataView.MiniSort.js +18 -16
- package/dist/components/DataView/DataView2.js +90 -86
- package/dist/components/DiffViewer/DiffViewer2.js +124 -118
- package/dist/components/Dropdown/Dropdown2.js +0 -3
- package/dist/components/EventCalendar/EventCalendar.Chip.js +21 -21
- package/dist/components/EventCalendar/EventCalendar.Month.js +19 -19
- package/dist/components/FloatingWindow/FloatingWindow2.js +60 -60
- package/dist/components/Grid/Grid2.js +18 -18
- package/dist/components/InputPIN/InputPIN2.js +42 -42
- package/dist/components/MiniSort/MiniSort2.js +47 -43
- package/dist/components/MiniStatsCard/MiniStatsCard2.js +20 -20
- package/dist/components/Pagination/Pagination2.js +18 -18
- package/dist/components/Popover/Popover2.js +23 -21
- package/dist/components/ProtectedRoute/ProtectedRoute.css +1 -0
- package/dist/components/ProtectedRoute/ProtectedRoute2.js +19 -0
- package/dist/components/RangeSlider/RangeSlider2.js +25 -25
- package/dist/components/Rating/RatingIcon.js +9 -9
- package/dist/components/RichTextEditor/hooks/useLinkPrompt.js +7 -6
- package/dist/components/RollingNumber/RollingNumber2.js +33 -31
- package/dist/components/Separator/Separator2.js +27 -23
- package/dist/components/Skeleton/Skeleton2.js +6 -8
- package/dist/components/Slider/Slider2.js +32 -32
- package/dist/components/Splitter/Splitter2.js +34 -34
- package/dist/components/StackedBar/StackedBar2.js +36 -34
- package/dist/components/Stats/Stats2.js +20 -16
- package/dist/components/StickyBar/StickyBar2.js +26 -22
- package/dist/components/Timeline/Timeline2.js +53 -47
- package/dist/components/Tooltip/Tooltip2.js +7 -8
- package/dist/components/TourHud/TourHud2.js +20 -20
- package/dist/components/Transition/Transition2.js +20 -20
- package/dist/components/Tree/Tree2.js +23 -23
- package/dist/contexts/AuthContext/AuthContext.js +33 -32
- package/dist/helpers/Charts.js +18 -0
- package/dist/helpers/Http.js +102 -0
- package/dist/helpers/Images.js +19 -0
- package/dist/helpers/Numbers.js +5 -4
- package/dist/helpers/VersionInfo.js +1 -1
- package/dist/hooks/useAccountMenu.js +58 -0
- package/dist/http.d.ts +97 -0
- package/dist/http.js +14 -0
- package/dist/index.d.ts +152 -5
- package/dist/index.js +334 -309
- package/dist/node_modules/qrcode.react/lib/esm/index.js +2 -2
- package/dist/router.d.ts +18 -0
- package/dist/router.js +4 -0
- package/dist/version.js +2 -2
- package/dist/version.json +4 -4
- package/package.json +38 -23
|
@@ -2,46 +2,49 @@ import { Icon as h } from "../Icon/Icon2.js";
|
|
|
2
2
|
import { Button as b } from "../Button/Button2.js";
|
|
3
3
|
import { Checkbox as p } from "../Checkbox/Checkbox2.js";
|
|
4
4
|
import { Popover as v } from "../Popover/Popover2.js";
|
|
5
|
-
import { useRef as
|
|
6
|
-
import { jsx as l, jsxs as
|
|
7
|
-
function j({ config:
|
|
8
|
-
const { options:
|
|
9
|
-
if (
|
|
10
|
-
const
|
|
5
|
+
import { useRef as C, useState as _ } from "react";
|
|
6
|
+
import { jsx as l, jsxs as s } from "react/jsx-runtime";
|
|
7
|
+
function j({ config: m }) {
|
|
8
|
+
const { options: r, selectedKeys: t, onChange: c, label: u = "Columns" } = m, a = C(null), [d, i] = _(!1);
|
|
9
|
+
if (r.length === 0) return null;
|
|
10
|
+
const f = (e, n) => {
|
|
11
11
|
if (n) {
|
|
12
12
|
if (t.includes(e)) return;
|
|
13
|
-
|
|
14
|
-
} else
|
|
13
|
+
c([...t, e]);
|
|
14
|
+
} else c(t.filter((o) => o !== e));
|
|
15
15
|
};
|
|
16
|
-
return /* @__PURE__ */
|
|
16
|
+
return /* @__PURE__ */ s("div", {
|
|
17
17
|
className: "data-view__column-selector",
|
|
18
18
|
children: [/* @__PURE__ */ l(b, {
|
|
19
19
|
ref: a,
|
|
20
20
|
variant: "ghost",
|
|
21
21
|
size: "small",
|
|
22
22
|
icon: "table",
|
|
23
|
-
onClick: () =>
|
|
24
|
-
children: /* @__PURE__ */
|
|
23
|
+
onClick: () => i((e) => !e),
|
|
24
|
+
children: /* @__PURE__ */ s("span", {
|
|
25
25
|
className: "data-view__column-selector-label",
|
|
26
|
-
children: [
|
|
26
|
+
children: [u, /* @__PURE__ */ l(h, {
|
|
27
27
|
name: "caret-down",
|
|
28
28
|
size: "sm"
|
|
29
29
|
})]
|
|
30
30
|
})
|
|
31
31
|
}), /* @__PURE__ */ l(v, {
|
|
32
|
-
visible:
|
|
33
|
-
onClose: () =>
|
|
32
|
+
visible: d,
|
|
33
|
+
onClose: () => i(!1),
|
|
34
34
|
anchorEl: a.current,
|
|
35
35
|
placement: "bottom",
|
|
36
36
|
children: /* @__PURE__ */ l("div", {
|
|
37
37
|
className: "data-view__column-selector-list",
|
|
38
|
-
children:
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
children: r.map((e) => {
|
|
39
|
+
const n = t.includes(e.key);
|
|
40
|
+
return /* @__PURE__ */ s("label", {
|
|
41
|
+
className: "data-view__column-selector-item",
|
|
42
|
+
children: [/* @__PURE__ */ l(p, {
|
|
43
|
+
checked: n,
|
|
44
|
+
onChange: (o) => f(e.key, o)
|
|
45
|
+
}), /* @__PURE__ */ l("span", { children: e.label })]
|
|
46
|
+
}, e.key);
|
|
47
|
+
})
|
|
45
48
|
})
|
|
46
49
|
})]
|
|
47
50
|
});
|
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
import { getColumnLabel as a } from "./DataView.CardView.js";
|
|
2
|
-
import { MiniSort as
|
|
3
|
-
import { jsx as
|
|
4
|
-
function
|
|
2
|
+
import { MiniSort as s } from "../MiniSort/MiniSort2.js";
|
|
3
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
4
|
+
function g({ columns: t, config: l, sortDirection: i, sortKey: c, onSort: e }) {
|
|
5
5
|
const r = l?.columns ?? l?.column ?? [];
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
6
|
+
if (r.length === 0) return null;
|
|
7
|
+
const u = r.map((n) => {
|
|
8
|
+
const o = t.find((m) => m.key === n.column);
|
|
9
|
+
return {
|
|
10
|
+
value: n.column,
|
|
11
|
+
label: n.label ?? (o ? a(o) : n.column),
|
|
12
|
+
icon: n.icon ?? o?.icon,
|
|
13
|
+
direction: n.direction ?? "asc",
|
|
14
|
+
disabled: !o
|
|
15
|
+
};
|
|
16
|
+
});
|
|
17
|
+
return /* @__PURE__ */ d(s, {
|
|
18
|
+
items: u,
|
|
17
19
|
sortKey: c,
|
|
18
|
-
sortDirection:
|
|
20
|
+
sortDirection: i,
|
|
19
21
|
onSort: e,
|
|
20
22
|
align: l?.align ?? "left"
|
|
21
23
|
});
|
|
22
24
|
}
|
|
23
25
|
export {
|
|
24
|
-
|
|
26
|
+
g as DataViewMiniSort
|
|
25
27
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './DataView.css';
|
|
2
2
|
import { Icon as X } from "../Icon/Icon2.js";
|
|
3
|
-
import { Button as
|
|
3
|
+
import { Button as ft } from "../Button/Button2.js";
|
|
4
4
|
import { Tooltip as Te } from "../Tooltip/Tooltip2.js";
|
|
5
5
|
import { Checkbox as re } from "../Checkbox/Checkbox2.js";
|
|
6
6
|
import { useBreakpoint as pt } from "../../hooks/useBreakpoint.js";
|
|
@@ -21,43 +21,43 @@ function Pt({ state: h }) {
|
|
|
21
21
|
children: /* @__PURE__ */ t(X, { name: h === "asc" ? "arrow-up" : h === "desc" ? "arrow-down" : "arrow-bidirectional-vertical" })
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
-
function Wt({ columns: h, data: I, rowKey: Le, pinnedIds: y, selectable: w = !1, onSelectionChange: Ve, selectedIds: le, pageSizeOptions: ce = Ee, initialPageSize: xe = Ee[1], showPageSize: $ = !0, card: Be, actions: k, actionsWidth: K, timeline: C, onRowClick: R, rowHref: de, rowClassName: he, rowDetail: Fe, empty: N, initialSortKey: Ie = null, initialSortDirection: Ke = "asc", sortKey: Z, sortDirection: ue, onSortChange: Re, miniSort: z, showCardSortControls: ze = !0, desktopView:
|
|
25
|
-
const { isMobile: Ze } = pt(), [qe, Je] = P(Ie), [Qe, Ye] = P(Ke), [He, et] = P([]),
|
|
26
|
-
it((
|
|
27
|
-
const i = new Set(
|
|
24
|
+
function Wt({ columns: h, data: I, rowKey: Le, pinnedIds: y, selectable: w = !1, onSelectionChange: Ve, selectedIds: le, pageSizeOptions: ce = Ee, initialPageSize: xe = Ee[1], showPageSize: $ = !0, card: Be, actions: k, actionsWidth: K, timeline: C, onRowClick: R, rowHref: de, rowClassName: he, rowDetail: Fe, empty: N, initialSortKey: Ie = null, initialSortDirection: Ke = "asc", sortKey: Z, sortDirection: ue, onSortChange: Re, miniSort: z, showCardSortControls: ze = !0, desktopView: me = "table", cardMaxWidth: Ue, className: D, onPageChange: We, onPageSizeChange: fe, currentPage: pe, totalItems: ve, group: o, showResultsCount: je = !0, totalCount: Oe, itemNoun: Xe, columnSelector: q }) {
|
|
25
|
+
const { isMobile: Ze } = pt(), [qe, Je] = P(Ie), [Qe, Ye] = P(Ke), [He, et] = P([]), f = le ?? He, [tt, at] = P(1), nt = pe ?? tt, [T, _e] = P(xe), [S, st] = P(() => h.reduce((e, a) => (a.width && (e[a.key] = a.width), e), {})), [we, it] = P(/* @__PURE__ */ new Set()), ge = (e) => {
|
|
26
|
+
it((a) => {
|
|
27
|
+
const i = new Set(a);
|
|
28
28
|
return i.has(e) ? i.delete(e) : i.add(e), i;
|
|
29
29
|
});
|
|
30
|
-
}, M = (e,
|
|
30
|
+
}, M = (e, a) => Le?.(e, a) ?? a, V = (e) => {
|
|
31
31
|
pe === void 0 && at(e), We?.(e);
|
|
32
|
-
}, p = Z !== void 0 ? Z : qe, v = ue ?? Qe, A = (e,
|
|
33
|
-
Z === void 0 && Je(e), ue === void 0 && Ye(
|
|
32
|
+
}, p = Z !== void 0 ? Z : qe, v = ue ?? Qe, A = (e, a) => {
|
|
33
|
+
Z === void 0 && Je(e), ue === void 0 && Ye(a), Re?.({
|
|
34
34
|
key: e,
|
|
35
|
-
direction:
|
|
35
|
+
direction: a
|
|
36
36
|
}), V(1);
|
|
37
37
|
}, U = L(() => new Set(y ?? []), [y]), W = L(() => {
|
|
38
38
|
let e = I;
|
|
39
39
|
if (p) {
|
|
40
|
-
const
|
|
41
|
-
if (
|
|
42
|
-
const s =
|
|
43
|
-
const u =
|
|
40
|
+
const n = h.find((s) => s.key === p);
|
|
41
|
+
if (n) {
|
|
42
|
+
const s = n.sortAccessor || n.accessor || ((m) => {
|
|
43
|
+
const u = m[n.key];
|
|
44
44
|
return typeof u == "string" || typeof u == "number" ? u : "";
|
|
45
|
-
}), r = [...I].sort((
|
|
46
|
-
const _ = s(
|
|
45
|
+
}), r = [...I].sort((m, u) => {
|
|
46
|
+
const _ = s(m), d = s(u);
|
|
47
47
|
return typeof _ == "number" && typeof d == "number" ? _ - d : String(_).localeCompare(String(d));
|
|
48
48
|
});
|
|
49
49
|
e = v === "asc" ? r : r.reverse();
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
if (U.size === 0) return e;
|
|
53
|
-
const
|
|
54
|
-
if (e.forEach((
|
|
55
|
-
U.has(M(
|
|
56
|
-
}), y && y.length > 1 &&
|
|
57
|
-
const
|
|
58
|
-
|
|
53
|
+
const a = [], i = [];
|
|
54
|
+
if (e.forEach((n, s) => {
|
|
55
|
+
U.has(M(n, s)) ? a.push(n) : i.push(n);
|
|
56
|
+
}), y && y.length > 1 && a.length > 1) {
|
|
57
|
+
const n = new Map(y.map((s, r) => [s, r]));
|
|
58
|
+
a.sort((s, r) => (n.get(M(s, 0)) ?? 0) - (n.get(M(r, 0)) ?? 0));
|
|
59
59
|
}
|
|
60
|
-
return [...
|
|
60
|
+
return [...a, ...i];
|
|
61
61
|
}, [
|
|
62
62
|
h,
|
|
63
63
|
I,
|
|
@@ -67,21 +67,21 @@ function Wt({ columns: h, data: I, rowKey: Le, pinnedIds: y, selectable: w = !1,
|
|
|
67
67
|
y
|
|
68
68
|
]), j = ve !== void 0, x = L(() => {
|
|
69
69
|
if (!o || j) return W;
|
|
70
|
-
const e = /* @__PURE__ */ new Map(),
|
|
71
|
-
W.forEach((
|
|
72
|
-
const s = o.groupBy(
|
|
73
|
-
r ? r.push(
|
|
70
|
+
const e = /* @__PURE__ */ new Map(), a = [];
|
|
71
|
+
W.forEach((n) => {
|
|
72
|
+
const s = o.groupBy(n), r = e.get(s);
|
|
73
|
+
r ? r.push(n) : (e.set(s, [n]), a.push(s));
|
|
74
74
|
});
|
|
75
|
-
const i =
|
|
76
|
-
const s = e.get(
|
|
75
|
+
const i = a.map((n) => {
|
|
76
|
+
const s = e.get(n);
|
|
77
77
|
return {
|
|
78
|
-
key:
|
|
79
|
-
label: o.groupLabel(
|
|
78
|
+
key: n,
|
|
79
|
+
label: o.groupLabel(n),
|
|
80
80
|
items: s,
|
|
81
81
|
totalCount: s.length
|
|
82
82
|
};
|
|
83
83
|
});
|
|
84
|
-
return o.sortGroups ? i.sort(o.sortGroups) : i.sort((
|
|
84
|
+
return o.sortGroups ? i.sort(o.sortGroups) : i.sort((n, s) => n.key === null ? 1 : s.key === null ? -1 : 0), i.flatMap((n) => n.items);
|
|
85
85
|
}, [
|
|
86
86
|
o,
|
|
87
87
|
j,
|
|
@@ -89,42 +89,46 @@ function Wt({ columns: h, data: I, rowKey: Le, pinnedIds: y, selectable: w = !1,
|
|
|
89
89
|
]), O = j ? ve : x.length, J = Math.max(1, Math.ceil(O / T)), B = Math.min(nt, J), g = j ? x : x.slice((B - 1) * T, B * T), Q = je ? _t(T, O, Oe ?? O, B, Xe) : null, Y = L(() => {
|
|
90
90
|
if (!o) return null;
|
|
91
91
|
const e = /* @__PURE__ */ new Map();
|
|
92
|
-
return x.forEach((
|
|
93
|
-
const i = o.groupBy(
|
|
92
|
+
return x.forEach((a) => {
|
|
93
|
+
const i = o.groupBy(a);
|
|
94
94
|
e.set(i, (e.get(i) ?? 0) + 1);
|
|
95
95
|
}), e;
|
|
96
96
|
}, [o, x]), H = L(() => {
|
|
97
97
|
if (!o || !Y) return null;
|
|
98
|
-
const e = /* @__PURE__ */ new Map(),
|
|
99
|
-
g.forEach((
|
|
100
|
-
const s = o.groupBy(
|
|
101
|
-
r ? r.push(
|
|
98
|
+
const e = /* @__PURE__ */ new Map(), a = [];
|
|
99
|
+
g.forEach((n) => {
|
|
100
|
+
const s = o.groupBy(n), r = e.get(s);
|
|
101
|
+
r ? r.push(n) : (e.set(s, [n]), a.push(s));
|
|
102
102
|
});
|
|
103
|
-
const i =
|
|
104
|
-
key:
|
|
105
|
-
label: o.groupLabel(
|
|
106
|
-
items: e.get(
|
|
107
|
-
totalCount: Y.get(
|
|
103
|
+
const i = a.map((n) => ({
|
|
104
|
+
key: n,
|
|
105
|
+
label: o.groupLabel(n),
|
|
106
|
+
items: e.get(n),
|
|
107
|
+
totalCount: Y.get(n) ?? 0
|
|
108
108
|
}));
|
|
109
|
-
return o.sortGroups ? i.sort(o.sortGroups) : i.sort((
|
|
109
|
+
return o.sortGroups ? i.sort(o.sortGroups) : i.sort((n, s) => n.key === null ? 1 : s.key === null ? -1 : 0), i;
|
|
110
110
|
}, [
|
|
111
111
|
o,
|
|
112
112
|
Y,
|
|
113
113
|
g
|
|
114
|
-
]), be = L(() =>
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
114
|
+
]), be = L(() => {
|
|
115
|
+
if (!C) return /* @__PURE__ */ new Map();
|
|
116
|
+
const e = g.map((a) => ({
|
|
117
|
+
id: C.idAccessor(a),
|
|
118
|
+
date: C.dateAccessor(a)
|
|
119
|
+
}));
|
|
120
|
+
return gt(e, C.granularity);
|
|
121
|
+
}, [g, C]), E = (e) => {
|
|
122
|
+
le === void 0 && et(e), Ve?.(I.filter((a, i) => e.includes(M(a, i))));
|
|
119
123
|
}, rt = (e) => {
|
|
120
124
|
e.sortable && (p === e.key ? A(e.key, v === "asc" ? "desc" : "asc") : A(e.key, "asc"));
|
|
121
|
-
}, ot = (e,
|
|
125
|
+
}, ot = (e, a) => {
|
|
122
126
|
e.preventDefault();
|
|
123
|
-
const i = e.clientX,
|
|
124
|
-
const u =
|
|
127
|
+
const i = e.clientX, n = S[a] ?? 150, s = (m) => {
|
|
128
|
+
const u = m.clientX - i, _ = h.find((d) => d.key === a)?.minWidth ?? 120;
|
|
125
129
|
st((d) => ({
|
|
126
130
|
...d,
|
|
127
|
-
[
|
|
131
|
+
[a]: Math.max(_, n + u)
|
|
128
132
|
}));
|
|
129
133
|
}, r = () => {
|
|
130
134
|
window.removeEventListener("mousemove", s), window.removeEventListener("mouseup", r);
|
|
@@ -139,8 +143,8 @@ function Wt({ columns: h, data: I, rowKey: Le, pinnedIds: y, selectable: w = !1,
|
|
|
139
143
|
sortKey: p,
|
|
140
144
|
sortDirection: v,
|
|
141
145
|
onSort: A
|
|
142
|
-
}) : null, Ce = q && q.options.length > 0 ? /* @__PURE__ */ t(Nt, { config: q }) : null, b = g.map(M), ae = b.filter((e) =>
|
|
143
|
-
E(e ? [...
|
|
146
|
+
}) : null, Ce = q && q.options.length > 0 ? /* @__PURE__ */ t(Nt, { config: q }) : null, b = g.map(M), ae = b.filter((e) => f.includes(e)).length, ne = !!w && b.length > 0 && ae === b.length, Ne = !!w && ae > 0 && ae < b.length, Se = (e) => {
|
|
147
|
+
E(e ? [...f, ...b.filter((a) => !f.includes(a))] : f.filter((a) => !b.includes(a)));
|
|
144
148
|
}, ht = w && b.length > 0 ? /* @__PURE__ */ c("label", {
|
|
145
149
|
className: "data-view__select-all",
|
|
146
150
|
children: [/* @__PURE__ */ t(re, {
|
|
@@ -160,7 +164,7 @@ function Wt({ columns: h, data: I, rowKey: Le, pinnedIds: y, selectable: w = !1,
|
|
|
160
164
|
Ce
|
|
161
165
|
]
|
|
162
166
|
}) : null, Pe = Me();
|
|
163
|
-
if (
|
|
167
|
+
if (me !== "cards" && h.length === 0) return /* @__PURE__ */ c("div", {
|
|
164
168
|
className: `data-view${D ? ` ${D}` : ""}`,
|
|
165
169
|
children: [Pe, /* @__PURE__ */ t("div", {
|
|
166
170
|
className: "data-view__wrapper data-view__wrapper--empty",
|
|
@@ -170,7 +174,7 @@ function Wt({ columns: h, data: I, rowKey: Le, pinnedIds: y, selectable: w = !1,
|
|
|
170
174
|
})
|
|
171
175
|
})]
|
|
172
176
|
});
|
|
173
|
-
if (
|
|
177
|
+
if (me === "cards") return /* @__PURE__ */ c("div", {
|
|
174
178
|
className: `data-view data-view--cards${D ? ` ${D}` : ""}`,
|
|
175
179
|
children: [
|
|
176
180
|
Me(ht),
|
|
@@ -191,13 +195,13 @@ function Wt({ columns: h, data: I, rowKey: Le, pinnedIds: y, selectable: w = !1,
|
|
|
191
195
|
A(null, v);
|
|
192
196
|
return;
|
|
193
197
|
}
|
|
194
|
-
const
|
|
195
|
-
A(
|
|
198
|
+
const a = String(e.value);
|
|
199
|
+
A(a, p === a ? v : "asc");
|
|
196
200
|
}
|
|
197
201
|
})
|
|
198
202
|
}), /* @__PURE__ */ t(Te, {
|
|
199
203
|
title: v === "asc" ? "Sort descending" : "Sort ascending",
|
|
200
|
-
children: /* @__PURE__ */ t(
|
|
204
|
+
children: /* @__PURE__ */ t(ft, {
|
|
201
205
|
className: "data-view__card-sort-direction",
|
|
202
206
|
disabled: !te,
|
|
203
207
|
onClick: () => {
|
|
@@ -227,7 +231,7 @@ function Wt({ columns: h, data: I, rowKey: Le, pinnedIds: y, selectable: w = !1,
|
|
|
227
231
|
rowClassName: he,
|
|
228
232
|
empty: N,
|
|
229
233
|
selectable: w,
|
|
230
|
-
selectedIds:
|
|
234
|
+
selectedIds: f,
|
|
231
235
|
pinnedIds: y,
|
|
232
236
|
cardMaxWidth: Ue,
|
|
233
237
|
isMobile: Ze,
|
|
@@ -236,8 +240,8 @@ function Wt({ columns: h, data: I, rowKey: Le, pinnedIds: y, selectable: w = !1,
|
|
|
236
240
|
collapsible: o?.collapsible,
|
|
237
241
|
collapsedGroups: we,
|
|
238
242
|
onToggleGroup: ge,
|
|
239
|
-
onToggleSelect: (e,
|
|
240
|
-
E(
|
|
243
|
+
onToggleSelect: (e, a) => {
|
|
244
|
+
E(a ? [...f, e] : f.filter((i) => i !== e));
|
|
241
245
|
}
|
|
242
246
|
}),
|
|
243
247
|
/* @__PURE__ */ t(Ae, {
|
|
@@ -248,7 +252,7 @@ function Wt({ columns: h, data: I, rowKey: Le, pinnedIds: y, selectable: w = !1,
|
|
|
248
252
|
pageSizeOptions: $ ? ce : void 0,
|
|
249
253
|
pageSize: $ ? T : void 0,
|
|
250
254
|
onPageSizeChange: $ ? (e) => {
|
|
251
|
-
_e(e), V(1),
|
|
255
|
+
_e(e), V(1), fe?.(e);
|
|
252
256
|
} : void 0
|
|
253
257
|
})
|
|
254
258
|
]
|
|
@@ -268,9 +272,9 @@ function Wt({ columns: h, data: I, rowKey: Le, pinnedIds: y, selectable: w = !1,
|
|
|
268
272
|
})
|
|
269
273
|
}),
|
|
270
274
|
F.map((e) => {
|
|
271
|
-
const
|
|
272
|
-
return S[e.key] && (
|
|
273
|
-
style: Object.keys(
|
|
275
|
+
const a = {};
|
|
276
|
+
return S[e.key] && (a.width = S[e.key]), e.minWidth && (a.minWidth = e.minWidth), /* @__PURE__ */ c("th", {
|
|
277
|
+
style: Object.keys(a).length > 0 ? a : void 0,
|
|
274
278
|
className: e.sortable ? "is-sortable" : "",
|
|
275
279
|
onClick: () => rt(e),
|
|
276
280
|
children: [/* @__PURE__ */ c("span", {
|
|
@@ -312,24 +316,24 @@ function Wt({ columns: h, data: I, rowKey: Le, pinnedIds: y, selectable: w = !1,
|
|
|
312
316
|
secondary: N.secondary
|
|
313
317
|
}) : /* @__PURE__ */ t(oe, { title: "No data available" })
|
|
314
318
|
}) });
|
|
315
|
-
const e = F.length + (G ? 1 : 0) + (w ? 1 : 0) + (k ? 1 : 0),
|
|
316
|
-
const r = M(
|
|
319
|
+
const e = F.length + (G ? 1 : 0) + (w ? 1 : 0) + (k ? 1 : 0), a = o?.showCount !== !1, i = (n, s) => {
|
|
320
|
+
const r = M(n, s), m = f.includes(r), u = U.has(r), _ = be.get(s), d = de?.(n), De = !!R || !!d, ut = (l) => {
|
|
317
321
|
if (d && (l.metaKey || l.ctrlKey || l.shiftKey)) {
|
|
318
322
|
window.open(d, "_blank", "noopener,noreferrer");
|
|
319
323
|
return;
|
|
320
324
|
}
|
|
321
325
|
if (R) {
|
|
322
|
-
R(
|
|
326
|
+
R(n, l);
|
|
323
327
|
return;
|
|
324
328
|
}
|
|
325
329
|
d && window.location.assign(d);
|
|
326
|
-
},
|
|
330
|
+
}, mt = (l) => {
|
|
327
331
|
l.button !== 1 || !d || (l.preventDefault(), window.open(d, "_blank", "noopener,noreferrer"));
|
|
328
|
-
}, se = Fe?.(
|
|
332
|
+
}, se = Fe?.(n);
|
|
329
333
|
return /* @__PURE__ */ c(Ge.Fragment, { children: [/* @__PURE__ */ c("tr", {
|
|
330
|
-
className: `${
|
|
334
|
+
className: `${m ? "is-selected" : ""} ${De ? "data-view__row--clickable" : ""} ${u ? "data-view__row--pinned" : ""} ${he?.(n) || ""}`,
|
|
331
335
|
onClick: De ? ut : void 0,
|
|
332
|
-
onAuxClick: d ?
|
|
336
|
+
onAuxClick: d ? mt : void 0,
|
|
333
337
|
children: [
|
|
334
338
|
G && /* @__PURE__ */ t("td", {
|
|
335
339
|
className: "data-view__timeline-cell",
|
|
@@ -338,9 +342,9 @@ function Wt({ columns: h, data: I, rowKey: Le, pinnedIds: y, selectable: w = !1,
|
|
|
338
342
|
w && /* @__PURE__ */ t("td", {
|
|
339
343
|
className: "data-view__checkbox",
|
|
340
344
|
children: /* @__PURE__ */ t(re, {
|
|
341
|
-
checked:
|
|
345
|
+
checked: m,
|
|
342
346
|
onChange: (l) => {
|
|
343
|
-
E(l ? [...
|
|
347
|
+
E(l ? [...f, r] : f.filter((ie) => ie !== r));
|
|
344
348
|
}
|
|
345
349
|
})
|
|
346
350
|
}),
|
|
@@ -353,7 +357,7 @@ function Wt({ columns: h, data: I, rowKey: Le, pinnedIds: y, selectable: w = !1,
|
|
|
353
357
|
name: "pin",
|
|
354
358
|
size: "sm"
|
|
355
359
|
})
|
|
356
|
-
}), kt(l,
|
|
360
|
+
}), kt(l, n)]
|
|
357
361
|
}, l.key)),
|
|
358
362
|
k && /* @__PURE__ */ t("td", {
|
|
359
363
|
className: "data-view__actions-cell",
|
|
@@ -361,7 +365,7 @@ function Wt({ columns: h, data: I, rowKey: Le, pinnedIds: y, selectable: w = !1,
|
|
|
361
365
|
children: /* @__PURE__ */ t("div", {
|
|
362
366
|
className: "data-view__table-actions",
|
|
363
367
|
onClick: (l) => l.stopPropagation(),
|
|
364
|
-
children: k(
|
|
368
|
+
children: k(n)
|
|
365
369
|
})
|
|
366
370
|
})
|
|
367
371
|
]
|
|
@@ -375,11 +379,11 @@ function Wt({ columns: h, data: I, rowKey: Le, pinnedIds: y, selectable: w = !1,
|
|
|
375
379
|
})] }, r);
|
|
376
380
|
};
|
|
377
381
|
if (H) {
|
|
378
|
-
let
|
|
382
|
+
let n = 0;
|
|
379
383
|
return H.map((s) => {
|
|
380
|
-
const r =
|
|
381
|
-
|
|
382
|
-
const
|
|
384
|
+
const r = n;
|
|
385
|
+
n += s.items.length;
|
|
386
|
+
const m = o?.collapsible && we.has(s.key);
|
|
383
387
|
return /* @__PURE__ */ c(Ge.Fragment, { children: [/* @__PURE__ */ t("tr", {
|
|
384
388
|
className: `data-view__group-row${o?.collapsible ? " data-view__group-row--collapsible" : ""}`,
|
|
385
389
|
onClick: o?.collapsible ? () => ge(s.key) : void 0,
|
|
@@ -391,21 +395,21 @@ function Wt({ columns: h, data: I, rowKey: Le, pinnedIds: y, selectable: w = !1,
|
|
|
391
395
|
className: "data-view__group-label",
|
|
392
396
|
children: s.label
|
|
393
397
|
}),
|
|
394
|
-
|
|
398
|
+
a && /* @__PURE__ */ t("span", {
|
|
395
399
|
className: "data-view__group-count",
|
|
396
400
|
children: s.items.length === s.totalCount ? s.totalCount : `${s.items.length} of ${s.totalCount}`
|
|
397
401
|
}),
|
|
398
402
|
o?.collapsible && /* @__PURE__ */ t(X, {
|
|
399
403
|
className: "data-view__group-chevron",
|
|
400
|
-
name:
|
|
404
|
+
name: m ? "caret-down" : "caret-up",
|
|
401
405
|
size: "sm"
|
|
402
406
|
})
|
|
403
407
|
]
|
|
404
408
|
})
|
|
405
|
-
}), !
|
|
409
|
+
}), !m && s.items.map((u, _) => i(u, r + _))] }, s.key ?? "__null__");
|
|
406
410
|
});
|
|
407
411
|
}
|
|
408
|
-
return g.map((
|
|
412
|
+
return g.map((n, s) => i(n, s));
|
|
409
413
|
})() })] })
|
|
410
414
|
}),
|
|
411
415
|
/* @__PURE__ */ t(Ae, {
|
|
@@ -416,7 +420,7 @@ function Wt({ columns: h, data: I, rowKey: Le, pinnedIds: y, selectable: w = !1,
|
|
|
416
420
|
pageSizeOptions: $ ? ce : void 0,
|
|
417
421
|
pageSize: $ ? T : void 0,
|
|
418
422
|
onPageSizeChange: $ ? (e) => {
|
|
419
|
-
_e(e), V(1),
|
|
423
|
+
_e(e), V(1), fe?.(e);
|
|
420
424
|
} : void 0
|
|
421
425
|
})
|
|
422
426
|
] });
|