@memobit/libs 3.26.4 → 3.28.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.
Files changed (47) hide show
  1. package/dist/components/Banner/Banner2.js +15 -13
  2. package/dist/components/BoldText/BoldText.js +5 -0
  3. package/dist/components/Calendar/Calendar2.js +108 -135
  4. package/dist/components/ColorPicker/ColorPicker.css +1 -1
  5. package/dist/components/ColorPicker/ColorPicker2.js +114 -114
  6. package/dist/components/ConfirmDialog/ConfirmDialog2.js +13 -11
  7. package/dist/components/ConfirmPopover/ConfirmPopover2.js +26 -24
  8. package/dist/components/ContextMenu/ContextMenu2.js +46 -33
  9. package/dist/components/ControlPanel/ControlPanel2.js +95 -93
  10. package/dist/components/ControlPanel/ControlPanelFilter.js +205 -193
  11. package/dist/components/ControlPanel/ControlPanelOptions.js +190 -185
  12. package/dist/components/DataView/DataView.CardView.js +83 -81
  13. package/dist/components/DataView/DataView.ColumnSelector.js +27 -25
  14. package/dist/components/DataView/DataView.TableView.js +74 -72
  15. package/dist/components/DataView/DataView2.js +169 -167
  16. package/dist/components/DatePicker/DatePicker2.js +71 -69
  17. package/dist/components/Drawer/Drawer2.js +58 -55
  18. package/dist/components/Dropdown/Dropdown2.js +187 -189
  19. package/dist/components/InputDate/InputDate2.js +43 -41
  20. package/dist/components/InputSearch/InputSearch2.js +27 -25
  21. package/dist/components/MenuBar/MenuBar.css +1 -0
  22. package/dist/components/MenuBar/MenuBar2.js +46 -0
  23. package/dist/components/Modal/Modal2.js +49 -47
  24. package/dist/components/Pagination/Pagination2.js +44 -47
  25. package/dist/components/ScrollToTop/ScrollToTop2.js +18 -16
  26. package/dist/components/ThemeSettings/ThemeSettings2.js +131 -123
  27. package/dist/components/TipsOfTheDay/TipsOfTheDay2.js +16 -12
  28. package/dist/components/Toast/Toast2.js +38 -33
  29. package/dist/components/ToolButton/ToolButton.css +1 -0
  30. package/dist/components/ToolButton/ToolButton2.js +36 -0
  31. package/dist/components/ToolPalette/ToolPalette.css +1 -0
  32. package/dist/components/ToolPalette/ToolPalette2.js +83 -0
  33. package/dist/components/Toolbar/Toolbar2.js +58 -56
  34. package/dist/contexts/LanguageContext/LanguageContext.context.js +9 -0
  35. package/dist/contexts/LanguageContext/LanguageContext.js +19 -0
  36. package/dist/contexts/LanguageContext/libMessages.js +240 -0
  37. package/dist/helpers/Datetime.js +84 -68
  38. package/dist/helpers/Language.js +8 -0
  39. package/dist/helpers/Pagination.js +5 -4
  40. package/dist/helpers/VersionInfo.js +1 -1
  41. package/dist/hooks/useLanguage.js +16 -0
  42. package/dist/index.d.ts +133 -6
  43. package/dist/index.js +417 -399
  44. package/dist/memobit-icons.json +4 -0
  45. package/dist/version.js +2 -2
  46. package/dist/version.json +4 -4
  47. package/package.json +1 -1
@@ -1,55 +1,57 @@
1
1
  import './DataView.css';
2
- import { Icon as ut } from "../Icon/Icon2.js";
3
- import { Button as ft } from "../Button/Button2.js";
4
- import { Tooltip as mt } from "../Tooltip/Tooltip2.js";
5
- import { Checkbox as pt } from "../Checkbox/Checkbox2.js";
6
- import { Dropdown as ht } from "../Dropdown/Dropdown2.js";
7
- import { useBreakpoint as vt } from "../../hooks/useBreakpoint.js";
8
- import { getResultsCount as gt } from "../../helpers/Pagination.js";
9
- import { useListMotion as wt } from "../../hooks/useListMotion/useListMotion.js";
10
- import { EmptyState as bt } from "../EmptyState/EmptyState2.js";
11
- import { Pagination as St } from "../Pagination/Pagination2.js";
12
- import { calculateTimelineMarkers as yt } from "../TimelineMarkers/calculateTimelineMarkers.js";
13
- import { DEFAULT_PAGE_SIZES as Ee, getColumnLabel as Ct } from "./DataView.helpers.js";
14
- import { CardView as _t } from "./DataView.CardView.js";
15
- import { DataViewColumnSelector as kt } from "./DataView.ColumnSelector.js";
16
- import { DataViewMiniSort as Mt } from "./DataView.MiniSort.js";
17
- import { TableView as Nt } from "./DataView.TableView.js";
2
+ import { Icon as mt } from "../Icon/Icon2.js";
3
+ import { libMessages as pt } from "../../contexts/LanguageContext/libMessages.js";
4
+ import { useLanguage as gt, useMessages as ht } from "../../hooks/useLanguage.js";
5
+ import { Button as vt } from "../Button/Button2.js";
6
+ import { Tooltip as wt } from "../Tooltip/Tooltip2.js";
7
+ import { Checkbox as bt } from "../Checkbox/Checkbox2.js";
8
+ import { Dropdown as St } from "../Dropdown/Dropdown2.js";
9
+ import { useBreakpoint as yt } from "../../hooks/useBreakpoint.js";
10
+ import { getResultsCount as Ct } from "../../helpers/Pagination.js";
11
+ import { useListMotion as _t } from "../../hooks/useListMotion/useListMotion.js";
12
+ import { EmptyState as Mt } from "../EmptyState/EmptyState2.js";
13
+ import { Pagination as kt } from "../Pagination/Pagination2.js";
14
+ import { calculateTimelineMarkers as Tt } from "../TimelineMarkers/calculateTimelineMarkers.js";
15
+ import { DEFAULT_PAGE_SIZES as De, getColumnLabel as Nt } from "./DataView.helpers.js";
16
+ import { CardView as Et } from "./DataView.CardView.js";
17
+ import { DataViewColumnSelector as Dt } from "./DataView.ColumnSelector.js";
18
+ import { DataViewMiniSort as Gt } from "./DataView.MiniSort.js";
19
+ import { TableView as Pt } from "./DataView.TableView.js";
18
20
  /* empty css */
19
- import { useCallback as Ge, useEffect as Tt, useMemo as E, useRef as De, useState as C } from "react";
20
- import { Fragment as Et, jsx as r, jsxs as _ } from "react/jsx-runtime";
21
- function Ht({ columns: l, data: L, rowKey: F, pinnedIds: p, selectable: G = !1, onSelectionChange: Pe, selectedIds: I, pageSizeOptions: Ve = Ee, initialPageSize: Le = Ee[1], showPageSize: U = !0, card: Re, actions: ee, actionsWidth: xe, timeline: h, onRowClick: te, rowHref: oe, rowClassName: ne, rowDetail: Ae, empty: se, initialSortKey: $e = null, initialSortDirection: Be = "asc", sortKey: W, sortDirection: re, onSortChange: ze, miniSort: R, showCardSortControls: Fe = !0, desktopView: ie = "table", cardMaxWidth: Ue, className: k, onPageChange: ae, onPageSizeChange: We, currentPage: K, totalItems: le, group: i, showResultsCount: Ke = !0, totalCount: Xe, itemNoun: je, columnSelector: X, animateChanges: Oe = !0, highlightIds: v }) {
22
- const { isMobile: ce } = vt(), x = De(null), A = wt(x, {
23
- enabled: Oe && F !== void 0,
21
+ import { useCallback as Ge, useEffect as Lt, useMemo as D, useRef as Pe, useState as _ } from "react";
22
+ import { Fragment as Vt, jsx as r, jsxs as M } from "react/jsx-runtime";
23
+ function oo({ columns: l, data: A, rowKey: W, pinnedIds: g, selectable: G = !1, onSelectionChange: Le, selectedIds: ee, pageSizeOptions: Ve = De, initialPageSize: Ae = De[1], showPageSize: U = !0, card: Be, actions: te, actionsWidth: Re, timeline: h, onRowClick: oe, rowHref: ne, rowClassName: se, rowDetail: xe, empty: re, initialSortKey: $e = null, initialSortDirection: ze = "asc", sortKey: K, sortDirection: ie, onSortChange: Fe, miniSort: B, showCardSortControls: We = !0, desktopView: ae = "table", cardMaxWidth: Ue, className: k, onPageChange: le, onPageSizeChange: Ke, currentPage: X, totalItems: ce, group: i, showResultsCount: Xe = !0, totalCount: je, itemNoun: Oe, columnSelector: j, animateChanges: He = !0, highlightIds: v }) {
24
+ const f = ht(pt), { language: Ze } = gt(), { isMobile: de } = yt(), R = Pe(null), x = _t(R, {
25
+ enabled: He && W !== void 0,
24
26
  highlightKeys: v
25
- }), [Ze, qe] = C($e), [He, Je] = C(Be), [Qe, Ye] = C([]), f = I ?? Qe, [Ie, et] = C(1), j = K ?? Ie, [g, tt] = C(Le), [de, ot] = C(() => l.reduce((e, t) => (t.width && (e[t.key] = t.width), e), {})), [ue, nt] = C(/* @__PURE__ */ new Set()), fe = (e) => {
26
- A.forceNext(), nt((t) => {
27
+ }), [qe, Je] = _($e), [Qe, Ye] = _(ze), [Ie, et] = _([]), m = ee ?? Ie, [tt, ot] = _(1), O = X ?? tt, [w, nt] = _(Ae), [ue, st] = _(() => l.reduce((e, t) => (t.width && (e[t.key] = t.width), e), {})), [fe, rt] = _(/* @__PURE__ */ new Set()), me = (e) => {
28
+ x.forceNext(), rt((t) => {
27
29
  const s = new Set(t);
28
30
  return s.has(e) ? s.delete(e) : s.add(e), s;
29
31
  });
30
- }, c = Ge((e, t) => F?.(e, t) ?? t, [F]), D = Ge((e) => {
31
- e !== j && A.skipNext(), K === void 0 && et(e), ae?.(e);
32
+ }, c = Ge((e, t) => W?.(e, t) ?? t, [W]), P = Ge((e) => {
33
+ e !== O && x.skipNext(), X === void 0 && ot(e), le?.(e);
32
34
  }, [
33
- K,
34
- j,
35
- A,
36
- ae
37
- ]), d = W !== void 0 ? W : Ze, u = re ?? He, M = (e, t) => {
38
- W === void 0 && qe(e), re === void 0 && Je(t), ze?.({
35
+ X,
36
+ O,
37
+ x,
38
+ le
39
+ ]), d = K !== void 0 ? K : qe, u = ie ?? Qe, T = (e, t) => {
40
+ K === void 0 && Je(e), ie === void 0 && Ye(t), Fe?.({
39
41
  key: e,
40
42
  direction: t
41
- }), D(1);
42
- }, $ = E(() => new Set(p ?? []), [p]), O = E(() => {
43
- let e = L;
43
+ }), P(1);
44
+ }, $ = D(() => new Set(g ?? []), [g]), H = D(() => {
45
+ let e = A;
44
46
  if (d) {
45
47
  const o = l.find((n) => n.key === d);
46
48
  if (o) {
47
- const n = o.sortAccessor || o.accessor || ((P) => {
48
- const S = P[o.key];
49
- return typeof S == "string" || typeof S == "number" ? S : "";
50
- }), a = [...L].sort((P, S) => {
51
- const V = n(P), y = n(S);
52
- return typeof V == "number" && typeof y == "number" ? V - y : String(V).localeCompare(String(y));
49
+ const n = o.sortAccessor || o.accessor || ((L) => {
50
+ const y = L[o.key];
51
+ return typeof y == "string" || typeof y == "number" ? y : "";
52
+ }), a = [...A].sort((L, y) => {
53
+ const V = n(L), C = n(y);
54
+ return typeof V == "number" && typeof C == "number" ? V - C : String(V).localeCompare(String(C));
53
55
  });
54
56
  e = u === "asc" ? a : a.reverse();
55
57
  }
@@ -58,23 +60,23 @@ function Ht({ columns: l, data: L, rowKey: F, pinnedIds: p, selectable: G = !1,
58
60
  const t = [], s = [];
59
61
  if (e.forEach((o, n) => {
60
62
  $.has(c(o, n)) ? t.push(o) : s.push(o);
61
- }), p && p.length > 1 && t.length > 1) {
62
- const o = new Map(p.map((n, a) => [n, a]));
63
+ }), g && g.length > 1 && t.length > 1) {
64
+ const o = new Map(g.map((n, a) => [n, a]));
63
65
  t.sort((n, a) => (o.get(c(n, 0)) ?? 0) - (o.get(c(a, 0)) ?? 0));
64
66
  }
65
67
  return [...t, ...s];
66
68
  }, [
67
69
  l,
68
- L,
70
+ A,
69
71
  u,
70
72
  d,
71
73
  $,
72
- p,
74
+ g,
73
75
  c
74
- ]), N = le !== void 0, w = E(() => {
75
- if (!i || N) return O;
76
+ ]), N = ce !== void 0, b = D(() => {
77
+ if (!i || N) return H;
76
78
  const e = /* @__PURE__ */ new Map(), t = [];
77
- O.forEach((o) => {
79
+ H.forEach((o) => {
78
80
  const n = i.groupBy(o), a = e.get(n);
79
81
  a ? a.push(o) : (e.set(n, [o]), t.push(n));
80
82
  });
@@ -91,35 +93,35 @@ function Ht({ columns: l, data: L, rowKey: F, pinnedIds: p, selectable: G = !1,
91
93
  }, [
92
94
  i,
93
95
  N,
94
- O
95
- ]), B = N ? le : w.length, me = Math.max(1, Math.ceil(B / g)), T = Math.min(j, me), b = N ? w : w.slice((T - 1) * g, T * g), pe = De(void 0);
96
- Tt(() => {
97
- if (!v || v.length === 0 || N || pe.current === v) return;
98
- const e = w.findIndex((s, o) => v.includes(c(s, o)));
96
+ H
97
+ ]), z = N ? ce : b.length, pe = Math.max(1, Math.ceil(z / w)), E = Math.min(O, pe), S = N ? b : b.slice((E - 1) * w, E * w), ge = Pe(void 0);
98
+ Lt(() => {
99
+ if (!v || v.length === 0 || N || ge.current === v) return;
100
+ const e = b.findIndex((s, o) => v.includes(c(s, o)));
99
101
  if (e === -1) return;
100
- pe.current = v;
101
- const t = Math.floor(e / g) + 1;
102
- t !== T && D(t);
102
+ ge.current = v;
103
+ const t = Math.floor(e / w) + 1;
104
+ t !== E && P(t);
103
105
  }, [
104
- D,
106
+ P,
105
107
  v,
106
108
  N,
109
+ b,
107
110
  w,
108
- g,
109
111
  c,
110
- T
112
+ E
111
113
  ]);
112
- const Z = Ke ? gt(g, B, Xe ?? B, T, je) : null, q = E(() => {
114
+ const Z = Xe ? Ct(w, z, je ?? z, E, Oe, Ze) : null, q = D(() => {
113
115
  if (!i) return null;
114
116
  const e = /* @__PURE__ */ new Map();
115
- return w.forEach((t) => {
117
+ return b.forEach((t) => {
116
118
  const s = i.groupBy(t);
117
119
  e.set(s, (e.get(s) ?? 0) + 1);
118
120
  }), e;
119
- }, [i, w]), he = E(() => {
121
+ }, [i, b]), he = D(() => {
120
122
  if (!i || !q) return null;
121
123
  const e = /* @__PURE__ */ new Map(), t = [];
122
- b.forEach((o) => {
124
+ S.forEach((o) => {
123
125
  const n = i.groupBy(o), a = e.get(n);
124
126
  a ? a.push(o) : (e.set(n, [o]), t.push(n));
125
127
  });
@@ -133,202 +135,202 @@ function Ht({ columns: l, data: L, rowKey: F, pinnedIds: p, selectable: G = !1,
133
135
  }, [
134
136
  i,
135
137
  q,
136
- b
137
- ]), ve = E(() => {
138
+ S
139
+ ]), ve = D(() => {
138
140
  if (!h) return /* @__PURE__ */ new Map();
139
- const e = b.map((t) => ({
141
+ const e = S.map((t) => ({
140
142
  id: h.idAccessor(t),
141
143
  date: h.dateAccessor(t)
142
144
  }));
143
- return yt(e, h.granularity);
144
- }, [b, h]), z = (e) => {
145
- I === void 0 && Ye(e), Pe?.(L.filter((t, s) => e.includes(c(t, s))));
146
- }, ge = (e, t) => {
147
- z(t ? [...f, e] : f.filter((s) => s !== e));
148
- }, st = (e) => {
149
- e.sortable && (d === e.key ? M(e.key, u === "asc" ? "desc" : "asc") : M(e.key, "asc"));
150
- }, rt = (e, t) => {
145
+ return Tt(e, h.granularity);
146
+ }, [S, h]), F = (e) => {
147
+ ee === void 0 && et(e), Le?.(A.filter((t, s) => e.includes(c(t, s))));
148
+ }, we = (e, t) => {
149
+ F(t ? [...m, e] : m.filter((s) => s !== e));
150
+ }, it = (e) => {
151
+ e.sortable && (d === e.key ? T(e.key, u === "asc" ? "desc" : "asc") : T(e.key, "asc"));
152
+ }, at = (e, t) => {
151
153
  e.preventDefault();
152
- const s = e.clientX, o = de[t] ?? 150, n = (P) => {
153
- const S = P.clientX - s, V = l.find((y) => y.key === t)?.minWidth ?? 120;
154
- ot((y) => ({
155
- ...y,
156
- [t]: Math.max(V, o + S)
154
+ const s = e.clientX, o = ue[t] ?? 150, n = (L) => {
155
+ const y = L.clientX - s, V = l.find((C) => C.key === t)?.minWidth ?? 120;
156
+ st((C) => ({
157
+ ...C,
158
+ [t]: Math.max(V, o + y)
157
159
  }));
158
160
  }, a = () => {
159
161
  window.removeEventListener("mousemove", n), window.removeEventListener("mouseup", a);
160
162
  };
161
163
  window.addEventListener("mousemove", n), window.addEventListener("mouseup", a);
162
- }, we = l.some((e) => e.filter), H = l.filter((e) => e.sortable), it = H.map((e) => ({
163
- label: Ct(e),
164
+ }, be = l.some((e) => e.filter), J = l.filter((e) => e.sortable), lt = J.map((e) => ({
165
+ label: Nt(e),
164
166
  value: e.key
165
- })), at = H.length > 0, J = d ? H.find((e) => e.key === d) : void 0, lt = R?.align ?? "left", be = (R?.columns ?? R?.column ?? []).length > 0 ? /* @__PURE__ */ r(Mt, {
167
+ })), ct = J.length > 0, Q = d ? J.find((e) => e.key === d) : void 0, dt = B?.align ?? "left", Se = (B?.columns ?? B?.column ?? []).length > 0 ? /* @__PURE__ */ r(Gt, {
166
168
  columns: l,
167
- config: R,
169
+ config: B,
168
170
  sortKey: d,
169
171
  sortDirection: u,
170
- onSort: M
171
- }) : null, Se = X && X.options.length > 0 ? /* @__PURE__ */ r(kt, { config: X }) : null, m = b.map(c), Q = m.filter((e) => f.includes(e)).length, Y = !!G && m.length > 0 && Q === m.length, ye = !!G && Q > 0 && Q < m.length, Ce = (e) => {
172
- z(e ? [...f, ...m.filter((t) => !f.includes(t))] : f.filter((t) => !m.includes(t)));
173
- }, ct = G && m.length > 0 ? /* @__PURE__ */ _("label", {
172
+ onSort: T
173
+ }) : null, ye = j && j.options.length > 0 ? /* @__PURE__ */ r(Dt, { config: j }) : null, p = S.map(c), Y = p.filter((e) => m.includes(e)).length, I = !!G && p.length > 0 && Y === p.length, Ce = !!G && Y > 0 && Y < p.length, _e = (e) => {
174
+ F(e ? [...m, ...p.filter((t) => !m.includes(t))] : m.filter((t) => !p.includes(t)));
175
+ }, ut = G && p.length > 0 ? /* @__PURE__ */ M("label", {
174
176
  className: "data-view__select-all",
175
- children: [/* @__PURE__ */ r(pt, {
176
- checked: Y,
177
- indeterminate: ye,
178
- onChange: Ce
179
- }), /* @__PURE__ */ r("span", { children: Y ? "Clear selection" : `Select these ${m.length}` })]
180
- }) : null, _e = (e) => Z || be || Se || e ? /* @__PURE__ */ _("div", {
181
- className: `data-view__top-row data-view__top-row--mini-${lt}`,
177
+ children: [/* @__PURE__ */ r(bt, {
178
+ checked: I,
179
+ indeterminate: Ce,
180
+ onChange: _e
181
+ }), /* @__PURE__ */ r("span", { children: I ? f.clearSelection : f.selectThese(p.length) })]
182
+ }) : null, Me = (e) => Z || Se || ye || e ? /* @__PURE__ */ M("div", {
183
+ className: `data-view__top-row data-view__top-row--mini-${dt}`,
182
184
  children: [
183
185
  Z && /* @__PURE__ */ r("div", {
184
186
  className: "data-view__results-count",
185
187
  children: Z
186
188
  }),
187
189
  e,
188
- be,
189
- Se
190
+ Se,
191
+ ye
190
192
  ]
191
- }) : null, ke = _e(), Me = /* @__PURE__ */ r(St, {
192
- currentPage: T,
193
- totalPages: me,
194
- totalItems: B,
195
- onPageChange: D,
193
+ }) : null, ke = Me(), Te = /* @__PURE__ */ r(kt, {
194
+ currentPage: E,
195
+ totalPages: pe,
196
+ totalItems: z,
197
+ onPageChange: P,
196
198
  pageSizeOptions: U ? Ve : void 0,
197
- pageSize: U ? g : void 0,
199
+ pageSize: U ? w : void 0,
198
200
  onPageSizeChange: U ? (e) => {
199
- A.skipNext(), tt(e), D(1), We?.(e);
201
+ x.skipNext(), nt(e), P(1), Ke?.(e);
200
202
  } : void 0
201
203
  });
202
- if (ie !== "cards" && l.length === 0) return /* @__PURE__ */ _("div", {
204
+ if (ae !== "cards" && l.length === 0) return /* @__PURE__ */ M("div", {
203
205
  className: `data-view${k ? ` ${k}` : ""}`,
204
- ref: x,
206
+ ref: R,
205
207
  children: [ke, /* @__PURE__ */ r("div", {
206
208
  className: "data-view__wrapper data-view__wrapper--empty",
207
- children: /* @__PURE__ */ r(bt, {
208
- title: "No columns selected",
209
- description: "Use the Columns button above to pick which columns to display."
209
+ children: /* @__PURE__ */ r(Mt, {
210
+ title: f.noColumnsTitle,
211
+ description: f.noColumnsHint
210
212
  })
211
213
  })]
212
214
  });
213
- if (ie === "cards") return /* @__PURE__ */ _("div", {
215
+ if (ae === "cards") return /* @__PURE__ */ M("div", {
214
216
  className: `data-view data-view--cards${k ? ` ${k}` : ""}`,
215
- ref: x,
217
+ ref: R,
216
218
  children: [
217
- _e(ct),
218
- Fe && at && /* @__PURE__ */ _("div", {
219
+ Me(ut),
220
+ We && ct && /* @__PURE__ */ M("div", {
219
221
  className: "data-view__card-sort-bar",
220
222
  children: [/* @__PURE__ */ r("div", {
221
223
  className: "data-view__card-sort-field",
222
- children: /* @__PURE__ */ r(ht, {
224
+ children: /* @__PURE__ */ r(St, {
223
225
  name: "data-view-card-sort",
224
- label: "Sort by",
225
- options: it,
226
+ label: f.sortBy,
227
+ options: lt,
226
228
  value: d,
227
- placeholder: "Sort by...",
229
+ placeholder: f.sortByPlaceholder,
228
230
  searchable: !1,
229
231
  usePortal: !1,
230
232
  onChange: (e) => {
231
233
  if (!e || Array.isArray(e)) {
232
- M(null, u);
234
+ T(null, u);
233
235
  return;
234
236
  }
235
237
  const t = String(e.value);
236
- M(t, d === t ? u : "asc");
238
+ T(t, d === t ? u : "asc");
237
239
  }
238
240
  })
239
- }), /* @__PURE__ */ r(mt, {
240
- title: u === "asc" ? "Sort descending" : "Sort ascending",
241
- children: /* @__PURE__ */ r(ft, {
241
+ }), /* @__PURE__ */ r(wt, {
242
+ title: u === "asc" ? f.sortDescending : f.sortAscending,
243
+ children: /* @__PURE__ */ r(vt, {
242
244
  className: "data-view__card-sort-direction",
243
- disabled: !J,
245
+ disabled: !Q,
244
246
  onClick: () => {
245
- J && M(J.key, u === "asc" ? "desc" : "asc");
247
+ Q && T(Q.key, u === "asc" ? "desc" : "asc");
246
248
  },
247
249
  variant: "ghost",
248
- children: /* @__PURE__ */ r(ut, { name: u === "asc" ? "arrow-up" : "arrow-down" })
250
+ children: /* @__PURE__ */ r(mt, { name: u === "asc" ? "arrow-up" : "arrow-down" })
249
251
  })
250
252
  })]
251
253
  }),
252
- we && /* @__PURE__ */ r("div", {
254
+ be && /* @__PURE__ */ r("div", {
253
255
  className: "data-view__filter-bar",
254
256
  children: l.filter((e) => e.filter).map((e) => /* @__PURE__ */ r("div", {
255
257
  className: "data-view__filter-bar-item",
256
258
  children: e.filter
257
259
  }, e.key))
258
260
  }),
259
- /* @__PURE__ */ r(_t, {
260
- data: b,
261
+ /* @__PURE__ */ r(Et, {
262
+ data: S,
261
263
  columns: l,
262
264
  rowKey: c,
263
- card: Re,
264
- actions: ee,
265
+ card: Be,
266
+ actions: te,
265
267
  timeline: h,
266
- onRowClick: te,
267
- rowHref: oe,
268
- rowClassName: ne,
269
- empty: se,
268
+ onRowClick: oe,
269
+ rowHref: ne,
270
+ rowClassName: se,
271
+ empty: re,
270
272
  selectable: G,
271
- selectedIds: f,
272
- pinnedIds: p,
273
+ selectedIds: m,
274
+ pinnedIds: g,
273
275
  cardMaxWidth: Ue,
274
- isMobile: ce,
276
+ isMobile: de,
275
277
  groups: he ?? void 0,
276
278
  showGroupCount: i?.showCount !== !1,
277
279
  collapsible: i?.collapsible,
278
- collapsedGroups: ue,
279
- onToggleGroup: fe,
280
- onToggleSelect: ge
280
+ collapsedGroups: fe,
281
+ onToggleGroup: me,
282
+ onToggleSelect: we
281
283
  }),
282
- Me
284
+ Te
283
285
  ]
284
286
  });
285
- const dt = l.filter((e) => !e.hideInTable && !(ce && e.hideInMobile)), Ne = h && ve.size > 0, Te = /* @__PURE__ */ _(Et, { children: [
287
+ const ft = l.filter((e) => !e.hideInTable && !(de && e.hideInMobile)), Ne = h && ve.size > 0, Ee = /* @__PURE__ */ M(Vt, { children: [
286
288
  ke,
287
289
  /* @__PURE__ */ r("div", {
288
290
  className: "data-view__wrapper",
289
- children: /* @__PURE__ */ r(Nt, {
290
- data: b,
291
- columns: dt,
291
+ children: /* @__PURE__ */ r(Pt, {
292
+ data: S,
293
+ columns: ft,
292
294
  rowKey: c,
293
- columnWidths: de,
294
- onResizeStart: rt,
295
+ columnWidths: ue,
296
+ onResizeStart: at,
295
297
  sortKey: d,
296
298
  sortDirection: u,
297
- onToggleSort: st,
298
- hasFilters: we,
299
+ onToggleSort: it,
300
+ hasFilters: be,
299
301
  showTimeline: !!Ne,
300
302
  timelineMarkers: ve,
301
303
  selectable: G,
302
- selectedIds: f,
303
- allVisibleSelected: Y,
304
- someVisibleSelected: ye,
305
- onToggleVisibleSelection: Ce,
306
- onToggleSelect: ge,
304
+ selectedIds: m,
305
+ allVisibleSelected: I,
306
+ someVisibleSelected: Ce,
307
+ onToggleVisibleSelection: _e,
308
+ onToggleSelect: we,
307
309
  pinnedSet: $,
308
- actions: ee,
309
- actionsWidth: xe,
310
- onRowClick: te,
311
- rowHref: oe,
312
- rowClassName: ne,
313
- rowDetail: Ae,
314
- empty: se,
310
+ actions: te,
311
+ actionsWidth: Re,
312
+ onRowClick: oe,
313
+ rowHref: ne,
314
+ rowClassName: se,
315
+ rowDetail: xe,
316
+ empty: re,
315
317
  groups: he,
316
318
  group: i,
317
- collapsedGroups: ue,
318
- onToggleGroup: fe
319
+ collapsedGroups: fe,
320
+ onToggleGroup: me
319
321
  })
320
322
  }),
321
- Me
323
+ Te
322
324
  ] });
323
325
  return /* @__PURE__ */ r("div", {
324
326
  className: `data-view${k ? ` ${k}` : ""}`,
325
- ref: x,
326
- children: Ne ? /* @__PURE__ */ _("div", {
327
+ ref: R,
328
+ children: Ne ? /* @__PURE__ */ M("div", {
327
329
  className: "timeline-markers",
328
- children: [/* @__PURE__ */ r("div", { className: "timeline-markers__track" }), Te]
329
- }) : Te
330
+ children: [/* @__PURE__ */ r("div", { className: "timeline-markers__track" }), Ee]
331
+ }) : Ee
330
332
  });
331
333
  }
332
334
  export {
333
- Ht as DataView
335
+ oo as DataView
334
336
  };