@memobit/libs 3.11.2 → 3.11.3

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 (34) hide show
  1. package/dist/components/Confetti/Confetti2.js +33 -33
  2. package/dist/components/ContextToast/ContextToast2.js +53 -57
  3. package/dist/components/ContextToast/useToast.js +12 -0
  4. package/dist/components/ControlPanel/ControlPanel2.js +41 -43
  5. package/dist/components/ControlPanel/ControlPanelContext.js +16 -21
  6. package/dist/components/ControlPanel/useControlPanel.js +11 -0
  7. package/dist/components/DataView/DataView.CardView.js +83 -109
  8. package/dist/components/DataView/DataView.MiniSort.js +1 -1
  9. package/dist/components/DataView/DataView.helpers.js +34 -0
  10. package/dist/components/DataView/DataView2.js +111 -108
  11. package/dist/components/Dropdown/Dropdown2.js +108 -106
  12. package/dist/components/InputEmail/InputEmail2.js +43 -43
  13. package/dist/components/InputEmail/validateEmail.js +7 -0
  14. package/dist/components/InputMask/InputMask2.js +40 -54
  15. package/dist/components/InputMask/InputMaskPresets.js +18 -0
  16. package/dist/components/Pagination/Pagination2.js +4 -4
  17. package/dist/components/Sidebar/Sidebar2.js +1 -1
  18. package/dist/components/Sidebar/SidebarContext.js +18 -23
  19. package/dist/components/Sidebar/useSidebar.js +11 -0
  20. package/dist/components/SuggestionsList/SuggestionsList2.js +27 -27
  21. package/dist/components/TimelineMarkers/TimelineMarkers2.js +31 -49
  22. package/dist/components/TimelineMarkers/calculateTimelineMarkers.js +28 -0
  23. package/dist/components/Toolbar/Toolbar2.js +6 -6
  24. package/dist/components/Tooltip/Tooltip2.js +35 -35
  25. package/dist/contexts/AuthContext/AuthContext.context.js +5 -0
  26. package/dist/contexts/AuthContext/AuthContext.js +5 -6
  27. package/dist/helpers/VersionInfo.js +1 -1
  28. package/dist/hooks/useAppPersistence.js +20 -20
  29. package/dist/hooks/useAuth/useAuth.js +1 -1
  30. package/dist/index.d.ts +1 -1
  31. package/dist/index.js +269 -262
  32. package/dist/version.js +1 -1
  33. package/dist/version.json +4 -4
  34. package/package.json +1 -1
@@ -1,36 +1,38 @@
1
1
  import './DataView.css';
2
2
  import { Icon as X } from "../Icon/Icon2.js";
3
3
  import { Button as ft } from "../Button/Button2.js";
4
- import { Tooltip as Ae } from "../Tooltip/Tooltip2.js";
4
+ import { Tooltip as Ee } from "../Tooltip/Tooltip2.js";
5
5
  import { Checkbox as re } from "../Checkbox/Checkbox2.js";
6
- import { useBreakpoint as pt } from "../../hooks/useBreakpoint.js";
7
- import { Dropdown as vt } from "../Dropdown/Dropdown2.js";
6
+ import { Dropdown as pt } from "../Dropdown/Dropdown2.js";
7
+ import { useBreakpoint as vt } from "../../hooks/useBreakpoint.js";
8
8
  import { getResultsCount as _t } from "../../helpers/Pagination.js";
9
9
  import { EmptyState as oe } from "../EmptyState/EmptyState2.js";
10
- import { Pagination as Ee } from "../Pagination/Pagination2.js";
11
- import { TimelineMarkerDot as wt, calculateTimelineMarkers as gt } from "../TimelineMarkers/TimelineMarkers2.js";
12
- import { CardView as bt, DEFAULT_PAGE_SIZES as Ge, getColumnLabel as yt, renderCellContent as kt, renderColumnLabel as Ct } from "./DataView.CardView.js";
10
+ import { Pagination as Ge } from "../Pagination/Pagination2.js";
11
+ import { calculateTimelineMarkers as wt } from "../TimelineMarkers/calculateTimelineMarkers.js";
12
+ import { TimelineMarkerDot as gt } from "../TimelineMarkers/TimelineMarkers2.js";
13
+ import { DEFAULT_PAGE_SIZES as Le, getColumnLabel as bt, renderCellContent as kt, renderColumnLabel as yt } from "./DataView.helpers.js";
14
+ import { CardView as Ct } from "./DataView.CardView.js";
13
15
  import { DataViewColumnSelector as Nt } from "./DataView.ColumnSelector.js";
14
16
  import { DataViewMiniSort as St } from "./DataView.MiniSort.js";
15
17
  /* empty css */
16
- import Le, { useMemo as L, useState as P } from "react";
17
- import { Fragment as Mt, jsx as t, jsxs as c } from "react/jsx-runtime";
18
- function Pt({ state: h }) {
18
+ import Ve, { useCallback as Mt, useMemo as L, useState as P } from "react";
19
+ import { Fragment as Pt, jsx as t, jsxs as c } from "react/jsx-runtime";
20
+ function $t({ state: h }) {
19
21
  return /* @__PURE__ */ t("span", {
20
22
  className: `data-view__sort-icon data-view__sort-icon--${h}`,
21
23
  children: /* @__PURE__ */ t(X, { name: h === "asc" ? "arrow-up" : h === "desc" ? "arrow-down" : "arrow-bidirectional-vertical" })
22
24
  });
23
25
  }
24
- function Wt({ columns: h, data: I, rowKey: Ve, pinnedIds: y, selectable: w = !1, onSelectionChange: xe, selectedIds: le, pageSizeOptions: ce = Ge, initialPageSize: Be = Ge[1], showPageSize: $ = !0, card: Fe, actions: k, actionsWidth: K, timeline: C, onRowClick: R, rowHref: de, rowClassName: he, rowDetail: Ie, empty: N, initialSortKey: Ke = null, initialSortDirection: Re = "asc", sortKey: Z, sortDirection: ue, onSortChange: ze, miniSort: z, showCardSortControls: Ue = !0, desktopView: me = "table", cardMaxWidth: We, className: D, onPageChange: je, onPageSizeChange: fe, currentPage: pe, totalItems: ve, group: o, showResultsCount: Oe = !0, totalCount: Xe, itemNoun: Ze, columnSelector: q }) {
25
- const { isMobile: _e } = pt(), [qe, Je] = P(Ke), [Qe, Ye] = P(Re), [He, et] = P([]), f = le ?? He, [tt, at] = P(1), nt = pe ?? tt, [T, we] = P(Be), [S, it] = P(() => h.reduce((e, a) => (a.width && (e[a.key] = a.width), e), {})), [ge, st] = P(/* @__PURE__ */ new Set()), be = (e) => {
26
+ function Xt({ columns: h, data: I, rowKey: le, pinnedIds: y, selectable: w = !1, onSelectionChange: xe, selectedIds: ce, pageSizeOptions: de = Le, initialPageSize: Be = Le[1], showPageSize: $ = !0, card: Fe, actions: C, actionsWidth: R, timeline: N, onRowClick: z, rowHref: he, rowClassName: ue, rowDetail: Ie, empty: S, initialSortKey: Re = null, initialSortDirection: ze = "asc", sortKey: Z, sortDirection: me, onSortChange: Ke, miniSort: K, showCardSortControls: Ue = !0, desktopView: fe = "table", cardMaxWidth: We, className: D, onPageChange: je, onPageSizeChange: pe, currentPage: ve, totalItems: _e, group: o, showResultsCount: Oe = !0, totalCount: Xe, itemNoun: Ze, columnSelector: q }) {
27
+ const { isMobile: we } = vt(), [qe, Je] = P(Re), [Qe, Ye] = P(ze), [He, et] = P([]), f = ce ?? He, [tt, at] = P(1), nt = ve ?? tt, [T, ge] = P(Be), [M, it] = P(() => h.reduce((e, a) => (a.width && (e[a.key] = a.width), e), {})), [be, st] = P(/* @__PURE__ */ new Set()), ke = (e) => {
26
28
  st((a) => {
27
29
  const s = new Set(a);
28
30
  return s.has(e) ? s.delete(e) : s.add(e), s;
29
31
  });
30
- }, M = (e, a) => Ve?.(e, a) ?? a, V = (e) => {
31
- pe === void 0 && at(e), je?.(e);
32
- }, p = Z !== void 0 ? Z : qe, v = ue ?? Qe, A = (e, a) => {
33
- Z === void 0 && Je(e), ue === void 0 && Ye(a), ze?.({
32
+ }, g = Mt((e, a) => le?.(e, a) ?? a, [le]), V = (e) => {
33
+ ve === void 0 && at(e), je?.(e);
34
+ }, p = Z !== void 0 ? Z : qe, v = me ?? Qe, A = (e, a) => {
35
+ Z === void 0 && Je(e), me === void 0 && Ye(a), Ke?.({
34
36
  key: e,
35
37
  direction: a
36
38
  }), V(1);
@@ -52,10 +54,10 @@ function Wt({ columns: h, data: I, rowKey: Ve, pinnedIds: y, selectable: w = !1,
52
54
  if (U.size === 0) return e;
53
55
  const a = [], s = [];
54
56
  if (e.forEach((n, i) => {
55
- U.has(M(n, i)) ? a.push(n) : s.push(n);
57
+ U.has(g(n, i)) ? a.push(n) : s.push(n);
56
58
  }), y && y.length > 1 && a.length > 1) {
57
59
  const n = new Map(y.map((i, r) => [i, r]));
58
- a.sort((i, r) => (n.get(M(i, 0)) ?? 0) - (n.get(M(r, 0)) ?? 0));
60
+ a.sort((i, r) => (n.get(g(i, 0)) ?? 0) - (n.get(g(r, 0)) ?? 0));
59
61
  }
60
62
  return [...a, ...s];
61
63
  }, [
@@ -64,8 +66,9 @@ function Wt({ columns: h, data: I, rowKey: Ve, pinnedIds: y, selectable: w = !1,
64
66
  v,
65
67
  p,
66
68
  U,
67
- y
68
- ]), j = ve !== void 0, x = L(() => {
69
+ y,
70
+ g
71
+ ]), j = _e !== void 0, x = L(() => {
69
72
  if (!o || j) return W;
70
73
  const e = /* @__PURE__ */ new Map(), a = [];
71
74
  W.forEach((n) => {
@@ -86,7 +89,7 @@ function Wt({ columns: h, data: I, rowKey: Ve, pinnedIds: y, selectable: w = !1,
86
89
  o,
87
90
  j,
88
91
  W
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 = Oe ? _t(T, O, Xe ?? O, B, Ze) : null, Y = L(() => {
92
+ ]), O = j ? _e : x.length, J = Math.max(1, Math.ceil(O / T)), B = Math.min(nt, J), b = j ? x : x.slice((B - 1) * T, B * T), Q = Oe ? _t(T, O, Xe ?? O, B, Ze) : null, Y = L(() => {
90
93
  if (!o) return null;
91
94
  const e = /* @__PURE__ */ new Map();
92
95
  return x.forEach((a) => {
@@ -96,7 +99,7 @@ function Wt({ columns: h, data: I, rowKey: Ve, pinnedIds: y, selectable: w = !1,
96
99
  }, [o, x]), H = L(() => {
97
100
  if (!o || !Y) return null;
98
101
  const e = /* @__PURE__ */ new Map(), a = [];
99
- g.forEach((n) => {
102
+ b.forEach((n) => {
100
103
  const i = o.groupBy(n), r = e.get(i);
101
104
  r ? r.push(n) : (e.set(i, [n]), a.push(i));
102
105
  });
@@ -110,21 +113,21 @@ function Wt({ columns: h, data: I, rowKey: Ve, pinnedIds: y, selectable: w = !1,
110
113
  }, [
111
114
  o,
112
115
  Y,
113
- g
116
+ b
114
117
  ]), ye = L(() => {
115
- if (!C) return /* @__PURE__ */ new Map();
116
- const e = g.map((a) => ({
117
- id: C.idAccessor(a),
118
- date: C.dateAccessor(a)
118
+ if (!N) return /* @__PURE__ */ new Map();
119
+ const e = b.map((a) => ({
120
+ id: N.idAccessor(a),
121
+ date: N.dateAccessor(a)
119
122
  }));
120
- return gt(e, C.granularity);
121
- }, [g, C]), E = (e) => {
122
- le === void 0 && et(e), xe?.(I.filter((a, s) => e.includes(M(a, s))));
123
+ return wt(e, N.granularity);
124
+ }, [b, N]), E = (e) => {
125
+ ce === void 0 && et(e), xe?.(I.filter((a, s) => e.includes(g(a, s))));
123
126
  }, rt = (e) => {
124
127
  e.sortable && (p === e.key ? A(e.key, v === "asc" ? "desc" : "asc") : A(e.key, "asc"));
125
128
  }, ot = (e, a) => {
126
129
  e.preventDefault();
127
- const s = e.clientX, n = S[a] ?? 150, i = (m) => {
130
+ const s = e.clientX, n = M[a] ?? 150, i = (m) => {
128
131
  const u = m.clientX - s, _ = h.find((d) => d.key === a)?.minWidth ?? 120;
129
132
  it((d) => ({
130
133
  ...d,
@@ -134,25 +137,25 @@ function Wt({ columns: h, data: I, rowKey: Ve, pinnedIds: y, selectable: w = !1,
134
137
  window.removeEventListener("mousemove", i), window.removeEventListener("mouseup", r);
135
138
  };
136
139
  window.addEventListener("mousemove", i), window.addEventListener("mouseup", r);
137
- }, ke = h.some((e) => e.filter), ee = h.filter((e) => e.sortable), lt = ee.map((e) => ({
138
- label: yt(e),
140
+ }, Ce = h.some((e) => e.filter), ee = h.filter((e) => e.sortable), lt = ee.map((e) => ({
141
+ label: bt(e),
139
142
  value: e.key
140
- })), ct = ee.length > 0, te = p ? ee.find((e) => e.key === p) : void 0, dt = z?.align ?? "left", Ce = (z?.columns ?? z?.column ?? []).length > 0 ? /* @__PURE__ */ t(St, {
143
+ })), ct = ee.length > 0, te = p ? ee.find((e) => e.key === p) : void 0, dt = K?.align ?? "left", Ne = (K?.columns ?? K?.column ?? []).length > 0 ? /* @__PURE__ */ t(St, {
141
144
  columns: h,
142
- config: z,
145
+ config: K,
143
146
  sortKey: p,
144
147
  sortDirection: v,
145
148
  onSort: A
146
- }) : null, Ne = 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, Se = !!w && ae > 0 && ae < b.length, Me = (e) => {
147
- E(e ? [...f, ...b.filter((a) => !f.includes(a))] : f.filter((a) => !b.includes(a)));
148
- }, ht = w && b.length > 0 ? /* @__PURE__ */ c("label", {
149
+ }) : null, Se = q && q.options.length > 0 ? /* @__PURE__ */ t(Nt, { config: q }) : null, k = b.map(g), ae = k.filter((e) => f.includes(e)).length, ne = !!w && k.length > 0 && ae === k.length, Me = !!w && ae > 0 && ae < k.length, Pe = (e) => {
150
+ E(e ? [...f, ...k.filter((a) => !f.includes(a))] : f.filter((a) => !k.includes(a)));
151
+ }, ht = w && k.length > 0 ? /* @__PURE__ */ c("label", {
149
152
  className: "data-view__select-all",
150
153
  children: [/* @__PURE__ */ t(re, {
151
154
  checked: ne,
152
- indeterminate: Se,
153
- onChange: Me
154
- }), /* @__PURE__ */ t("span", { children: ne ? "Clear selection" : `Select these ${b.length}` })]
155
- }) : null, Pe = (e) => Q || Ce || Ne || e ? /* @__PURE__ */ c("div", {
155
+ indeterminate: Me,
156
+ onChange: Pe
157
+ }), /* @__PURE__ */ t("span", { children: ne ? "Clear selection" : `Select these ${k.length}` })]
158
+ }) : null, $e = (e) => Q || Ne || Se || e ? /* @__PURE__ */ c("div", {
156
159
  className: `data-view__top-row data-view__top-row--mini-${dt}`,
157
160
  children: [
158
161
  Q && /* @__PURE__ */ t("div", {
@@ -160,13 +163,13 @@ function Wt({ columns: h, data: I, rowKey: Ve, pinnedIds: y, selectable: w = !1,
160
163
  children: Q
161
164
  }),
162
165
  e,
163
- Ce,
164
- Ne
166
+ Ne,
167
+ Se
165
168
  ]
166
- }) : null, $e = Pe();
167
- if (me !== "cards" && h.length === 0) return /* @__PURE__ */ c("div", {
169
+ }) : null, De = $e();
170
+ if (fe !== "cards" && h.length === 0) return /* @__PURE__ */ c("div", {
168
171
  className: `data-view${D ? ` ${D}` : ""}`,
169
- children: [$e, /* @__PURE__ */ t("div", {
172
+ children: [De, /* @__PURE__ */ t("div", {
170
173
  className: "data-view__wrapper data-view__wrapper--empty",
171
174
  children: /* @__PURE__ */ t(oe, {
172
175
  title: "No columns selected",
@@ -174,15 +177,15 @@ function Wt({ columns: h, data: I, rowKey: Ve, pinnedIds: y, selectable: w = !1,
174
177
  })
175
178
  })]
176
179
  });
177
- if (me === "cards") return /* @__PURE__ */ c("div", {
180
+ if (fe === "cards") return /* @__PURE__ */ c("div", {
178
181
  className: `data-view data-view--cards${D ? ` ${D}` : ""}`,
179
182
  children: [
180
- Pe(ht),
183
+ $e(ht),
181
184
  Ue && ct && /* @__PURE__ */ c("div", {
182
185
  className: "data-view__card-sort-bar",
183
186
  children: [/* @__PURE__ */ t("div", {
184
187
  className: "data-view__card-sort-field",
185
- children: /* @__PURE__ */ t(vt, {
188
+ children: /* @__PURE__ */ t(pt, {
186
189
  name: "data-view-card-sort",
187
190
  label: "Sort by",
188
191
  options: lt,
@@ -199,7 +202,7 @@ function Wt({ columns: h, data: I, rowKey: Ve, pinnedIds: y, selectable: w = !1,
199
202
  A(a, p === a ? v : "asc");
200
203
  }
201
204
  })
202
- }), /* @__PURE__ */ t(Ae, {
205
+ }), /* @__PURE__ */ t(Ee, {
203
206
  title: v === "asc" ? "Sort descending" : "Sort ascending",
204
207
  children: /* @__PURE__ */ t(ft, {
205
208
  className: "data-view__card-sort-direction",
@@ -212,53 +215,53 @@ function Wt({ columns: h, data: I, rowKey: Ve, pinnedIds: y, selectable: w = !1,
212
215
  })
213
216
  })]
214
217
  }),
215
- ke && /* @__PURE__ */ t("div", {
218
+ Ce && /* @__PURE__ */ t("div", {
216
219
  className: "data-view__filter-bar",
217
220
  children: h.filter((e) => e.filter).map((e) => /* @__PURE__ */ t("div", {
218
221
  className: "data-view__filter-bar-item",
219
222
  children: e.filter
220
223
  }, e.key))
221
224
  }),
222
- /* @__PURE__ */ t(bt, {
223
- data: g,
225
+ /* @__PURE__ */ t(Ct, {
226
+ data: b,
224
227
  columns: h,
225
- rowKey: M,
228
+ rowKey: g,
226
229
  card: Fe,
227
- actions: k,
228
- timeline: C,
229
- onRowClick: R,
230
- rowHref: de,
231
- rowClassName: he,
232
- empty: N,
230
+ actions: C,
231
+ timeline: N,
232
+ onRowClick: z,
233
+ rowHref: he,
234
+ rowClassName: ue,
235
+ empty: S,
233
236
  selectable: w,
234
237
  selectedIds: f,
235
238
  pinnedIds: y,
236
239
  cardMaxWidth: We,
237
- isMobile: _e,
240
+ isMobile: we,
238
241
  groups: H ?? void 0,
239
242
  showGroupCount: o?.showCount !== !1,
240
243
  collapsible: o?.collapsible,
241
- collapsedGroups: ge,
242
- onToggleGroup: be,
244
+ collapsedGroups: be,
245
+ onToggleGroup: ke,
243
246
  onToggleSelect: (e, a) => {
244
247
  E(a ? [...f, e] : f.filter((s) => s !== e));
245
248
  }
246
249
  }),
247
- /* @__PURE__ */ t(Ee, {
250
+ /* @__PURE__ */ t(Ge, {
248
251
  currentPage: B,
249
252
  totalPages: J,
250
253
  totalItems: O,
251
254
  onPageChange: V,
252
- pageSizeOptions: $ ? ce : void 0,
255
+ pageSizeOptions: $ ? de : void 0,
253
256
  pageSize: $ ? T : void 0,
254
257
  onPageSizeChange: $ ? (e) => {
255
- we(e), V(1), fe?.(e);
258
+ ge(e), V(1), pe?.(e);
256
259
  } : void 0
257
260
  })
258
261
  ]
259
262
  });
260
- const F = h.filter((e) => !e.hideInTable && !(_e && e.hideInMobile)), G = C && ye.size > 0, De = /* @__PURE__ */ c(Mt, { children: [
261
- $e,
263
+ const F = h.filter((e) => !e.hideInTable && !(we && e.hideInMobile)), G = N && ye.size > 0, Te = /* @__PURE__ */ c(Pt, { children: [
264
+ De,
262
265
  /* @__PURE__ */ t("div", {
263
266
  className: "data-view__wrapper",
264
267
  children: /* @__PURE__ */ c("table", { children: [/* @__PURE__ */ c("thead", { children: [/* @__PURE__ */ c("tr", { children: [
@@ -267,19 +270,19 @@ function Wt({ columns: h, data: I, rowKey: Ve, pinnedIds: y, selectable: w = !1,
267
270
  className: "data-view__checkbox",
268
271
  children: /* @__PURE__ */ t(re, {
269
272
  checked: ne,
270
- indeterminate: Se,
271
- onChange: Me
273
+ indeterminate: Me,
274
+ onChange: Pe
272
275
  })
273
276
  }),
274
277
  F.map((e) => {
275
278
  const a = {};
276
- return S[e.key] && (a.width = S[e.key]), e.minWidth && (a.minWidth = e.minWidth), /* @__PURE__ */ c("th", {
279
+ return M[e.key] && (a.width = M[e.key]), e.minWidth && (a.minWidth = e.minWidth), /* @__PURE__ */ c("th", {
277
280
  style: Object.keys(a).length > 0 ? a : void 0,
278
281
  className: e.sortable ? "is-sortable" : "",
279
282
  onClick: () => rt(e),
280
283
  children: [/* @__PURE__ */ c("span", {
281
284
  className: "data-view__th-content",
282
- children: [Ct(e), e.sortable && /* @__PURE__ */ t(Pt, { state: p === e.key ? v : "unsorted" })]
285
+ children: [yt(e), e.sortable && /* @__PURE__ */ t($t, { state: p === e.key ? v : "unsorted" })]
283
286
  }), /* @__PURE__ */ t("span", {
284
287
  className: "data-view__resizer",
285
288
  onMouseDown: (s) => ot(s, e.key),
@@ -287,57 +290,57 @@ function Wt({ columns: h, data: I, rowKey: Ve, pinnedIds: y, selectable: w = !1,
287
290
  })]
288
291
  }, e.key);
289
292
  }),
290
- k && /* @__PURE__ */ t("th", {
293
+ C && /* @__PURE__ */ t("th", {
291
294
  className: "data-view__actions-header",
292
- style: K ? { width: K } : void 0,
295
+ style: R ? { width: R } : void 0,
293
296
  children: "Actions"
294
297
  })
295
- ] }), ke && /* @__PURE__ */ c("tr", {
298
+ ] }), Ce && /* @__PURE__ */ c("tr", {
296
299
  className: "data-view__filter-row",
297
300
  children: [
298
301
  G && /* @__PURE__ */ t("td", { className: "data-view__filter-cell data-view__filter-cell--spacer" }),
299
302
  w && /* @__PURE__ */ t("td", { className: "data-view__filter-cell data-view__filter-cell--spacer" }),
300
303
  F.map((e) => /* @__PURE__ */ t("td", {
301
304
  className: "data-view__filter-cell",
302
- style: S[e.key] ? { width: S[e.key] } : void 0,
305
+ style: M[e.key] ? { width: M[e.key] } : void 0,
303
306
  children: e.filter ?? null
304
307
  }, e.key)),
305
- k && /* @__PURE__ */ t("td", { className: "data-view__filter-cell data-view__filter-cell--spacer" })
308
+ C && /* @__PURE__ */ t("td", { className: "data-view__filter-cell data-view__filter-cell--spacer" })
306
309
  ]
307
310
  })] }), /* @__PURE__ */ t("tbody", { children: (() => {
308
- if (g.length === 0) return /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
309
- colSpan: F.length + (G ? 1 : 0) + (w ? 1 : 0) + (k ? 1 : 0),
311
+ if (b.length === 0) return /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
312
+ colSpan: F.length + (G ? 1 : 0) + (w ? 1 : 0) + (C ? 1 : 0),
310
313
  className: "data-view__empty",
311
- children: N ? /* @__PURE__ */ t(oe, {
312
- title: N.title,
313
- description: N.description,
314
- icon: N.icon,
315
- primary: N.primary,
316
- secondary: N.secondary
314
+ children: S ? /* @__PURE__ */ t(oe, {
315
+ title: S.title,
316
+ description: S.description,
317
+ icon: S.icon,
318
+ primary: S.primary,
319
+ secondary: S.secondary
317
320
  }) : /* @__PURE__ */ t(oe, { title: "No data available" })
318
321
  }) });
319
- const e = F.length + (G ? 1 : 0) + (w ? 1 : 0) + (k ? 1 : 0), a = o?.showCount !== !1, s = (n, i) => {
320
- const r = M(n, i), m = f.includes(r), u = U.has(r), _ = ye.get(i), d = de?.(n), Te = !!R || !!d, ut = (l) => {
322
+ const e = F.length + (G ? 1 : 0) + (w ? 1 : 0) + (C ? 1 : 0), a = o?.showCount !== !1, s = (n, i) => {
323
+ const r = g(n, i), m = f.includes(r), u = U.has(r), _ = ye.get(i), d = he?.(n), Ae = !!z || !!d, ut = (l) => {
321
324
  if (d && (l.metaKey || l.ctrlKey || l.shiftKey)) {
322
325
  window.open(d, "_blank", "noopener,noreferrer");
323
326
  return;
324
327
  }
325
- if (R) {
326
- R(n, l);
328
+ if (z) {
329
+ z(n, l);
327
330
  return;
328
331
  }
329
332
  d && window.location.assign(d);
330
333
  }, mt = (l) => {
331
334
  l.button !== 1 || !d || (l.preventDefault(), window.open(d, "_blank", "noopener,noreferrer"));
332
335
  }, ie = Ie?.(n);
333
- return /* @__PURE__ */ c(Le.Fragment, { children: [/* @__PURE__ */ c("tr", {
334
- className: `${m ? "is-selected" : ""} ${Te ? "data-view__row--clickable" : ""} ${u ? "data-view__row--pinned" : ""} ${he?.(n) || ""}`,
335
- onClick: Te ? ut : void 0,
336
+ return /* @__PURE__ */ c(Ve.Fragment, { children: [/* @__PURE__ */ c("tr", {
337
+ className: `${m ? "is-selected" : ""} ${Ae ? "data-view__row--clickable" : ""} ${u ? "data-view__row--pinned" : ""} ${ue?.(n) || ""}`,
338
+ onClick: Ae ? ut : void 0,
336
339
  onAuxClick: d ? mt : void 0,
337
340
  children: [
338
341
  G && /* @__PURE__ */ t("td", {
339
342
  className: "data-view__timeline-cell",
340
- children: _ && /* @__PURE__ */ t(wt, { marker: _ })
343
+ children: _ && /* @__PURE__ */ t(gt, { marker: _ })
341
344
  }),
342
345
  w && /* @__PURE__ */ t("td", {
343
346
  className: "data-view__checkbox",
@@ -349,8 +352,8 @@ function Wt({ columns: h, data: I, rowKey: Ve, pinnedIds: y, selectable: w = !1,
349
352
  })
350
353
  }),
351
354
  F.map((l, se) => /* @__PURE__ */ c("td", {
352
- style: S[l.key] ? { width: S[l.key] } : void 0,
353
- children: [se === 0 && u && /* @__PURE__ */ t(Ae, {
355
+ style: M[l.key] ? { width: M[l.key] } : void 0,
356
+ children: [se === 0 && u && /* @__PURE__ */ t(Ee, {
354
357
  title: "Pinned",
355
358
  children: /* @__PURE__ */ t(X, {
356
359
  className: "data-view__pin-indicator",
@@ -359,13 +362,13 @@ function Wt({ columns: h, data: I, rowKey: Ve, pinnedIds: y, selectable: w = !1,
359
362
  })
360
363
  }), kt(l, n)]
361
364
  }, l.key)),
362
- k && /* @__PURE__ */ t("td", {
365
+ C && /* @__PURE__ */ t("td", {
363
366
  className: "data-view__actions-cell",
364
- style: K ? { width: K } : void 0,
367
+ style: R ? { width: R } : void 0,
365
368
  children: /* @__PURE__ */ t("div", {
366
369
  className: "data-view__table-actions",
367
370
  onClick: (l) => l.stopPropagation(),
368
- children: k(n)
371
+ children: C(n)
369
372
  })
370
373
  })
371
374
  ]
@@ -383,10 +386,10 @@ function Wt({ columns: h, data: I, rowKey: Ve, pinnedIds: y, selectable: w = !1,
383
386
  return H.map((i) => {
384
387
  const r = n;
385
388
  n += i.items.length;
386
- const m = o?.collapsible && ge.has(i.key);
387
- return /* @__PURE__ */ c(Le.Fragment, { children: [/* @__PURE__ */ t("tr", {
389
+ const m = o?.collapsible && be.has(i.key);
390
+ return /* @__PURE__ */ c(Ve.Fragment, { children: [/* @__PURE__ */ t("tr", {
388
391
  className: `data-view__group-row${o?.collapsible ? " data-view__group-row--collapsible" : ""}`,
389
- onClick: o?.collapsible ? () => be(i.key) : void 0,
392
+ onClick: o?.collapsible ? () => ke(i.key) : void 0,
390
393
  children: /* @__PURE__ */ c("td", {
391
394
  colSpan: e,
392
395
  className: "data-view__group-cell",
@@ -409,18 +412,18 @@ function Wt({ columns: h, data: I, rowKey: Ve, pinnedIds: y, selectable: w = !1,
409
412
  }), !m && i.items.map((u, _) => s(u, r + _))] }, i.key ?? "__null__");
410
413
  });
411
414
  }
412
- return g.map((n, i) => s(n, i));
415
+ return b.map((n, i) => s(n, i));
413
416
  })() })] })
414
417
  }),
415
- /* @__PURE__ */ t(Ee, {
418
+ /* @__PURE__ */ t(Ge, {
416
419
  currentPage: B,
417
420
  totalPages: J,
418
421
  totalItems: W.length,
419
422
  onPageChange: V,
420
- pageSizeOptions: $ ? ce : void 0,
423
+ pageSizeOptions: $ ? de : void 0,
421
424
  pageSize: $ ? T : void 0,
422
425
  onPageSizeChange: $ ? (e) => {
423
- we(e), V(1), fe?.(e);
426
+ ge(e), V(1), pe?.(e);
424
427
  } : void 0
425
428
  })
426
429
  ] });
@@ -428,10 +431,10 @@ function Wt({ columns: h, data: I, rowKey: Ve, pinnedIds: y, selectable: w = !1,
428
431
  className: `data-view${D ? ` ${D}` : ""}`,
429
432
  children: G ? /* @__PURE__ */ c("div", {
430
433
  className: "timeline-markers",
431
- children: [/* @__PURE__ */ t("div", { className: "timeline-markers__track" }), De]
432
- }) : De
434
+ children: [/* @__PURE__ */ t("div", { className: "timeline-markers__track" }), Te]
435
+ }) : Te
433
436
  });
434
437
  }
435
438
  export {
436
- Wt as DataView
439
+ Xt as DataView
437
440
  };