@memobit/libs 3.8.2 → 3.8.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.
@@ -1,19 +1,19 @@
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 Te } from "../Tooltip/Tooltip2.js";
4
+ import { Tooltip as Ae } from "../Tooltip/Tooltip2.js";
5
5
  import { Checkbox as re } from "../Checkbox/Checkbox2.js";
6
6
  import { useBreakpoint as pt } from "../../hooks/useBreakpoint.js";
7
7
  import { Dropdown as vt } from "../Dropdown/Dropdown2.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 Ae } from "../Pagination/Pagination2.js";
10
+ import { Pagination as Ee } from "../Pagination/Pagination2.js";
11
11
  import { TimelineMarkerDot as wt, calculateTimelineMarkers as gt } from "../TimelineMarkers/TimelineMarkers2.js";
12
- import { CardView as bt, DEFAULT_PAGE_SIZES as Ee, getColumnLabel as yt, renderCellContent as kt, renderColumnLabel as Ct } from "./DataView.CardView.js";
12
+ import { CardView as bt, DEFAULT_PAGE_SIZES as Ge, getColumnLabel as yt, renderCellContent as kt, renderColumnLabel as Ct } from "./DataView.CardView.js";
13
13
  import { DataViewColumnSelector as Nt } from "./DataView.ColumnSelector.js";
14
14
  import { DataViewMiniSort as St } from "./DataView.MiniSort.js";
15
15
  /* empty css */
16
- import Ge, { useMemo as L, useState as P } from "react";
16
+ import Le, { useMemo as L, useState as P } from "react";
17
17
  import { Fragment as Mt, jsx as t, jsxs as c } from "react/jsx-runtime";
18
18
  function Pt({ state: h }) {
19
19
  return /* @__PURE__ */ t("span", {
@@ -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: 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
- return i.has(e) ? i.delete(e) : i.add(e), i;
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
+ st((a) => {
27
+ const s = new Set(a);
28
+ return s.has(e) ? s.delete(e) : s.add(e), s;
29
29
  });
30
- }, M = (e, a) => Le?.(e, a) ?? a, V = (e) => {
31
- pe === void 0 && at(e), We?.(e);
30
+ }, M = (e, a) => Ve?.(e, a) ?? a, V = (e) => {
31
+ pe === void 0 && at(e), je?.(e);
32
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?.({
33
+ Z === void 0 && Je(e), ue === void 0 && Ye(a), ze?.({
34
34
  key: e,
35
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 n = h.find((s) => s.key === p);
40
+ const n = h.find((i) => i.key === p);
41
41
  if (n) {
42
- const s = n.sortAccessor || n.accessor || ((m) => {
42
+ const i = n.sortAccessor || n.accessor || ((m) => {
43
43
  const u = m[n.key];
44
44
  return typeof u == "string" || typeof u == "number" ? u : "";
45
45
  }), r = [...I].sort((m, u) => {
46
- const _ = s(m), d = s(u);
46
+ const _ = i(m), d = i(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 a = [], i = [];
54
- if (e.forEach((n, s) => {
55
- U.has(M(n, s)) ? a.push(n) : i.push(n);
53
+ const a = [], s = [];
54
+ if (e.forEach((n, i) => {
55
+ U.has(M(n, i)) ? a.push(n) : s.push(n);
56
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));
57
+ 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));
59
59
  }
60
- return [...a, ...i];
60
+ return [...a, ...s];
61
61
  }, [
62
62
  h,
63
63
  I,
@@ -69,49 +69,49 @@ function Wt({ columns: h, data: I, rowKey: Le, pinnedIds: y, selectable: w = !1,
69
69
  if (!o || j) return W;
70
70
  const e = /* @__PURE__ */ new Map(), a = [];
71
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));
72
+ const i = o.groupBy(n), r = e.get(i);
73
+ r ? r.push(n) : (e.set(i, [n]), a.push(i));
74
74
  });
75
- const i = a.map((n) => {
76
- const s = e.get(n);
75
+ const s = a.map((n) => {
76
+ const i = e.get(n);
77
77
  return {
78
78
  key: n,
79
79
  label: o.groupLabel(n),
80
- items: s,
81
- totalCount: s.length
80
+ items: i,
81
+ totalCount: i.length
82
82
  };
83
83
  });
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);
84
+ return o.sortGroups ? s.sort(o.sortGroups) : s.sort((n, i) => n.key === null ? 1 : i.key === null ? -1 : 0), s.flatMap((n) => n.items);
85
85
  }, [
86
86
  o,
87
87
  j,
88
88
  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 = je ? _t(T, O, Oe ?? O, B, Xe) : null, Y = L(() => {
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(() => {
90
90
  if (!o) return null;
91
91
  const e = /* @__PURE__ */ new Map();
92
92
  return x.forEach((a) => {
93
- const i = o.groupBy(a);
94
- e.set(i, (e.get(i) ?? 0) + 1);
93
+ const s = o.groupBy(a);
94
+ e.set(s, (e.get(s) ?? 0) + 1);
95
95
  }), e;
96
96
  }, [o, x]), H = L(() => {
97
97
  if (!o || !Y) return null;
98
98
  const e = /* @__PURE__ */ new Map(), a = [];
99
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));
100
+ const i = o.groupBy(n), r = e.get(i);
101
+ r ? r.push(n) : (e.set(i, [n]), a.push(i));
102
102
  });
103
- const i = a.map((n) => ({
103
+ const s = a.map((n) => ({
104
104
  key: n,
105
105
  label: o.groupLabel(n),
106
106
  items: e.get(n),
107
107
  totalCount: Y.get(n) ?? 0
108
108
  }));
109
- return o.sortGroups ? i.sort(o.sortGroups) : i.sort((n, s) => n.key === null ? 1 : s.key === null ? -1 : 0), i;
109
+ return o.sortGroups ? s.sort(o.sortGroups) : s.sort((n, i) => n.key === null ? 1 : i.key === null ? -1 : 0), s;
110
110
  }, [
111
111
  o,
112
112
  Y,
113
113
  g
114
- ]), be = L(() => {
114
+ ]), ye = L(() => {
115
115
  if (!C) return /* @__PURE__ */ new Map();
116
116
  const e = g.map((a) => ({
117
117
  id: C.idAccessor(a),
@@ -119,40 +119,40 @@ function Wt({ columns: h, data: I, rowKey: Le, pinnedIds: y, selectable: w = !1,
119
119
  }));
120
120
  return gt(e, C.granularity);
121
121
  }, [g, C]), E = (e) => {
122
- le === void 0 && et(e), Ve?.(I.filter((a, i) => e.includes(M(a, i))));
122
+ le === void 0 && et(e), xe?.(I.filter((a, s) => e.includes(M(a, s))));
123
123
  }, rt = (e) => {
124
124
  e.sortable && (p === e.key ? A(e.key, v === "asc" ? "desc" : "asc") : A(e.key, "asc"));
125
125
  }, ot = (e, a) => {
126
126
  e.preventDefault();
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;
129
- st((d) => ({
127
+ const s = e.clientX, n = S[a] ?? 150, i = (m) => {
128
+ const u = m.clientX - s, _ = h.find((d) => d.key === a)?.minWidth ?? 120;
129
+ it((d) => ({
130
130
  ...d,
131
131
  [a]: Math.max(_, n + u)
132
132
  }));
133
133
  }, r = () => {
134
- window.removeEventListener("mousemove", s), window.removeEventListener("mouseup", r);
134
+ window.removeEventListener("mousemove", i), window.removeEventListener("mouseup", r);
135
135
  };
136
- window.addEventListener("mousemove", s), window.addEventListener("mouseup", r);
137
- }, ye = h.some((e) => e.filter), ee = h.filter((e) => e.sortable), lt = ee.map((e) => ({
136
+ 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
138
  label: yt(e),
139
139
  value: e.key
140
- })), ct = ee.length > 0, te = p ? ee.find((e) => e.key === p) : void 0, dt = z?.align ?? "left", ke = (z?.columns ?? z?.column ?? []).length > 0 ? /* @__PURE__ */ t(St, {
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, {
141
141
  columns: h,
142
142
  config: z,
143
143
  sortKey: p,
144
144
  sortDirection: v,
145
145
  onSort: A
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) => {
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
147
  E(e ? [...f, ...b.filter((a) => !f.includes(a))] : f.filter((a) => !b.includes(a)));
148
148
  }, ht = w && b.length > 0 ? /* @__PURE__ */ c("label", {
149
149
  className: "data-view__select-all",
150
150
  children: [/* @__PURE__ */ t(re, {
151
151
  checked: ne,
152
- indeterminate: Ne,
153
- onChange: Se
152
+ indeterminate: Se,
153
+ onChange: Me
154
154
  }), /* @__PURE__ */ t("span", { children: ne ? "Clear selection" : `Select these ${b.length}` })]
155
- }) : null, Me = (e) => Q || ke || Ce || e ? /* @__PURE__ */ c("div", {
155
+ }) : null, Pe = (e) => Q || Ce || Ne || e ? /* @__PURE__ */ c("div", {
156
156
  className: `data-view__top-row data-view__top-row--mini-${dt}`,
157
157
  children: [
158
158
  Q && /* @__PURE__ */ t("div", {
@@ -160,13 +160,13 @@ function Wt({ columns: h, data: I, rowKey: Le, pinnedIds: y, selectable: w = !1,
160
160
  children: Q
161
161
  }),
162
162
  e,
163
- ke,
164
- Ce
163
+ Ce,
164
+ Ne
165
165
  ]
166
- }) : null, Pe = Me();
166
+ }) : null, $e = Pe();
167
167
  if (me !== "cards" && h.length === 0) return /* @__PURE__ */ c("div", {
168
168
  className: `data-view${D ? ` ${D}` : ""}`,
169
- children: [Pe, /* @__PURE__ */ t("div", {
169
+ children: [$e, /* @__PURE__ */ t("div", {
170
170
  className: "data-view__wrapper data-view__wrapper--empty",
171
171
  children: /* @__PURE__ */ t(oe, {
172
172
  title: "No columns selected",
@@ -177,8 +177,8 @@ function Wt({ columns: h, data: I, rowKey: Le, pinnedIds: y, selectable: w = !1,
177
177
  if (me === "cards") return /* @__PURE__ */ c("div", {
178
178
  className: `data-view data-view--cards${D ? ` ${D}` : ""}`,
179
179
  children: [
180
- Me(ht),
181
- ze && ct && /* @__PURE__ */ c("div", {
180
+ Pe(ht),
181
+ Ue && ct && /* @__PURE__ */ c("div", {
182
182
  className: "data-view__card-sort-bar",
183
183
  children: [/* @__PURE__ */ t("div", {
184
184
  className: "data-view__card-sort-field",
@@ -199,7 +199,7 @@ function Wt({ columns: h, data: I, rowKey: Le, pinnedIds: y, selectable: w = !1,
199
199
  A(a, p === a ? v : "asc");
200
200
  }
201
201
  })
202
- }), /* @__PURE__ */ t(Te, {
202
+ }), /* @__PURE__ */ t(Ae, {
203
203
  title: v === "asc" ? "Sort descending" : "Sort ascending",
204
204
  children: /* @__PURE__ */ t(ft, {
205
205
  className: "data-view__card-sort-direction",
@@ -212,7 +212,7 @@ function Wt({ columns: h, data: I, rowKey: Le, pinnedIds: y, selectable: w = !1,
212
212
  })
213
213
  })]
214
214
  }),
215
- ye && /* @__PURE__ */ t("div", {
215
+ ke && /* @__PURE__ */ t("div", {
216
216
  className: "data-view__filter-bar",
217
217
  children: h.filter((e) => e.filter).map((e) => /* @__PURE__ */ t("div", {
218
218
  className: "data-view__filter-bar-item",
@@ -223,7 +223,7 @@ function Wt({ columns: h, data: I, rowKey: Le, pinnedIds: y, selectable: w = !1,
223
223
  data: g,
224
224
  columns: h,
225
225
  rowKey: M,
226
- card: Be,
226
+ card: Fe,
227
227
  actions: k,
228
228
  timeline: C,
229
229
  onRowClick: R,
@@ -233,18 +233,18 @@ function Wt({ columns: h, data: I, rowKey: Le, pinnedIds: y, selectable: w = !1,
233
233
  selectable: w,
234
234
  selectedIds: f,
235
235
  pinnedIds: y,
236
- cardMaxWidth: Ue,
237
- isMobile: Ze,
236
+ cardMaxWidth: We,
237
+ isMobile: _e,
238
238
  groups: H ?? void 0,
239
239
  showGroupCount: o?.showCount !== !1,
240
240
  collapsible: o?.collapsible,
241
- collapsedGroups: we,
242
- onToggleGroup: ge,
241
+ collapsedGroups: ge,
242
+ onToggleGroup: be,
243
243
  onToggleSelect: (e, a) => {
244
- E(a ? [...f, e] : f.filter((i) => i !== e));
244
+ E(a ? [...f, e] : f.filter((s) => s !== e));
245
245
  }
246
246
  }),
247
- /* @__PURE__ */ t(Ae, {
247
+ /* @__PURE__ */ t(Ee, {
248
248
  currentPage: B,
249
249
  totalPages: J,
250
250
  totalItems: O,
@@ -252,13 +252,13 @@ function Wt({ columns: h, data: I, rowKey: Le, pinnedIds: y, selectable: w = !1,
252
252
  pageSizeOptions: $ ? ce : void 0,
253
253
  pageSize: $ ? T : void 0,
254
254
  onPageSizeChange: $ ? (e) => {
255
- _e(e), V(1), fe?.(e);
255
+ we(e), V(1), fe?.(e);
256
256
  } : void 0
257
257
  })
258
258
  ]
259
259
  });
260
- const F = h.filter((e) => !e.hideInTable), G = C && be.size > 0, $e = /* @__PURE__ */ c(Mt, { children: [
261
- Pe,
260
+ const F = h.filter((e) => !e.hideInTable && !(_e && e.hideInMobile)), G = C && ye.size > 0, De = /* @__PURE__ */ c(Mt, { children: [
261
+ $e,
262
262
  /* @__PURE__ */ t("div", {
263
263
  className: "data-view__wrapper",
264
264
  children: /* @__PURE__ */ c("table", { children: [/* @__PURE__ */ c("thead", { children: [/* @__PURE__ */ c("tr", { children: [
@@ -267,8 +267,8 @@ function Wt({ columns: h, data: I, rowKey: Le, pinnedIds: y, selectable: w = !1,
267
267
  className: "data-view__checkbox",
268
268
  children: /* @__PURE__ */ t(re, {
269
269
  checked: ne,
270
- indeterminate: Ne,
271
- onChange: Se
270
+ indeterminate: Se,
271
+ onChange: Me
272
272
  })
273
273
  }),
274
274
  F.map((e) => {
@@ -282,8 +282,8 @@ function Wt({ columns: h, data: I, rowKey: Le, pinnedIds: y, selectable: w = !1,
282
282
  children: [Ct(e), e.sortable && /* @__PURE__ */ t(Pt, { state: p === e.key ? v : "unsorted" })]
283
283
  }), /* @__PURE__ */ t("span", {
284
284
  className: "data-view__resizer",
285
- onMouseDown: (i) => ot(i, e.key),
286
- onClick: (i) => i.stopPropagation()
285
+ onMouseDown: (s) => ot(s, e.key),
286
+ onClick: (s) => s.stopPropagation()
287
287
  })]
288
288
  }, e.key);
289
289
  }),
@@ -292,7 +292,7 @@ function Wt({ columns: h, data: I, rowKey: Le, pinnedIds: y, selectable: w = !1,
292
292
  style: K ? { width: K } : void 0,
293
293
  children: "Actions"
294
294
  })
295
- ] }), ye && /* @__PURE__ */ c("tr", {
295
+ ] }), ke && /* @__PURE__ */ c("tr", {
296
296
  className: "data-view__filter-row",
297
297
  children: [
298
298
  G && /* @__PURE__ */ t("td", { className: "data-view__filter-cell data-view__filter-cell--spacer" }),
@@ -316,8 +316,8 @@ function Wt({ columns: h, data: I, rowKey: Le, pinnedIds: y, selectable: w = !1,
316
316
  secondary: N.secondary
317
317
  }) : /* @__PURE__ */ t(oe, { title: "No data available" })
318
318
  }) });
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) => {
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) => {
321
321
  if (d && (l.metaKey || l.ctrlKey || l.shiftKey)) {
322
322
  window.open(d, "_blank", "noopener,noreferrer");
323
323
  return;
@@ -329,10 +329,10 @@ function Wt({ columns: h, data: I, rowKey: Le, pinnedIds: y, selectable: w = !1,
329
329
  d && window.location.assign(d);
330
330
  }, mt = (l) => {
331
331
  l.button !== 1 || !d || (l.preventDefault(), window.open(d, "_blank", "noopener,noreferrer"));
332
- }, se = Fe?.(n);
333
- return /* @__PURE__ */ c(Ge.Fragment, { children: [/* @__PURE__ */ c("tr", {
334
- className: `${m ? "is-selected" : ""} ${De ? "data-view__row--clickable" : ""} ${u ? "data-view__row--pinned" : ""} ${he?.(n) || ""}`,
335
- onClick: De ? ut : void 0,
332
+ }, 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
336
  onAuxClick: d ? mt : void 0,
337
337
  children: [
338
338
  G && /* @__PURE__ */ t("td", {
@@ -344,13 +344,13 @@ function Wt({ columns: h, data: I, rowKey: Le, pinnedIds: y, selectable: w = !1,
344
344
  children: /* @__PURE__ */ t(re, {
345
345
  checked: m,
346
346
  onChange: (l) => {
347
- E(l ? [...f, r] : f.filter((ie) => ie !== r));
347
+ E(l ? [...f, r] : f.filter((se) => se !== r));
348
348
  }
349
349
  })
350
350
  }),
351
- F.map((l, ie) => /* @__PURE__ */ c("td", {
351
+ F.map((l, se) => /* @__PURE__ */ c("td", {
352
352
  style: S[l.key] ? { width: S[l.key] } : void 0,
353
- children: [ie === 0 && u && /* @__PURE__ */ t(Te, {
353
+ children: [se === 0 && u && /* @__PURE__ */ t(Ae, {
354
354
  title: "Pinned",
355
355
  children: /* @__PURE__ */ t(X, {
356
356
  className: "data-view__pin-indicator",
@@ -369,35 +369,35 @@ function Wt({ columns: h, data: I, rowKey: Le, pinnedIds: y, selectable: w = !1,
369
369
  })
370
370
  })
371
371
  ]
372
- }), se != null && se !== !1 && /* @__PURE__ */ t("tr", {
372
+ }), ie != null && ie !== !1 && /* @__PURE__ */ t("tr", {
373
373
  className: "data-view__row-detail",
374
374
  children: /* @__PURE__ */ t("td", {
375
375
  colSpan: e,
376
376
  onClick: (l) => l.stopPropagation(),
377
- children: se
377
+ children: ie
378
378
  })
379
379
  })] }, r);
380
380
  };
381
381
  if (H) {
382
382
  let n = 0;
383
- return H.map((s) => {
383
+ return H.map((i) => {
384
384
  const r = n;
385
- n += s.items.length;
386
- const m = o?.collapsible && we.has(s.key);
387
- return /* @__PURE__ */ c(Ge.Fragment, { children: [/* @__PURE__ */ t("tr", {
385
+ n += i.items.length;
386
+ const m = o?.collapsible && ge.has(i.key);
387
+ return /* @__PURE__ */ c(Le.Fragment, { children: [/* @__PURE__ */ t("tr", {
388
388
  className: `data-view__group-row${o?.collapsible ? " data-view__group-row--collapsible" : ""}`,
389
- onClick: o?.collapsible ? () => ge(s.key) : void 0,
389
+ onClick: o?.collapsible ? () => be(i.key) : void 0,
390
390
  children: /* @__PURE__ */ c("td", {
391
391
  colSpan: e,
392
392
  className: "data-view__group-cell",
393
393
  children: [
394
394
  /* @__PURE__ */ t("span", {
395
395
  className: "data-view__group-label",
396
- children: s.label
396
+ children: i.label
397
397
  }),
398
398
  a && /* @__PURE__ */ t("span", {
399
399
  className: "data-view__group-count",
400
- children: s.items.length === s.totalCount ? s.totalCount : `${s.items.length} of ${s.totalCount}`
400
+ children: i.items.length === i.totalCount ? i.totalCount : `${i.items.length} of ${i.totalCount}`
401
401
  }),
402
402
  o?.collapsible && /* @__PURE__ */ t(X, {
403
403
  className: "data-view__group-chevron",
@@ -406,13 +406,13 @@ function Wt({ columns: h, data: I, rowKey: Le, pinnedIds: y, selectable: w = !1,
406
406
  })
407
407
  ]
408
408
  })
409
- }), !m && s.items.map((u, _) => i(u, r + _))] }, s.key ?? "__null__");
409
+ }), !m && i.items.map((u, _) => s(u, r + _))] }, i.key ?? "__null__");
410
410
  });
411
411
  }
412
- return g.map((n, s) => i(n, s));
412
+ return g.map((n, i) => s(n, i));
413
413
  })() })] })
414
414
  }),
415
- /* @__PURE__ */ t(Ae, {
415
+ /* @__PURE__ */ t(Ee, {
416
416
  currentPage: B,
417
417
  totalPages: J,
418
418
  totalItems: W.length,
@@ -420,7 +420,7 @@ function Wt({ columns: h, data: I, rowKey: Le, pinnedIds: y, selectable: w = !1,
420
420
  pageSizeOptions: $ ? ce : void 0,
421
421
  pageSize: $ ? T : void 0,
422
422
  onPageSizeChange: $ ? (e) => {
423
- _e(e), V(1), fe?.(e);
423
+ we(e), V(1), fe?.(e);
424
424
  } : void 0
425
425
  })
426
426
  ] });
@@ -428,8 +428,8 @@ function Wt({ columns: h, data: I, rowKey: Le, pinnedIds: y, selectable: w = !1,
428
428
  className: `data-view${D ? ` ${D}` : ""}`,
429
429
  children: G ? /* @__PURE__ */ c("div", {
430
430
  className: "timeline-markers",
431
- children: [/* @__PURE__ */ t("div", { className: "timeline-markers__track" }), $e]
432
- }) : $e
431
+ children: [/* @__PURE__ */ t("div", { className: "timeline-markers__track" }), De]
432
+ }) : De
433
433
  });
434
434
  }
435
435
  export {
@@ -23,7 +23,7 @@ var r = (i) => {
23
23
  const o = {
24
24
  ...i,
25
25
  lib: d,
26
- libBuildNumber: 493,
26
+ libBuildNumber: 3,
27
27
  libCommit: n,
28
28
  libBuildDate: t
29
29
  };
package/dist/index.d.ts CHANGED
@@ -1072,7 +1072,7 @@ export declare interface DataViewColumn<T> {
1072
1072
  minWidth?: number;
1073
1073
  hideInCard?: boolean;
1074
1074
  hideInTable?: boolean;
1075
- /** Hide this column only on mobile breakpoint (not when cards are used on desktop). */
1075
+ /** Hide this column only on mobile breakpoint, in both table and card views (not when cards are used on desktop). */
1076
1076
  hideInMobile?: boolean;
1077
1077
  }
1078
1078
 
@@ -1,36 +1,36 @@
1
- // Universal body painting + sizing. Consumed via themes.scss so every memobit
2
- // app picks it up automatically.
3
- //
4
- // Why this lives here:
5
- // Theme backgrounds are gradients (multi-stop linear/radial). If the body is
6
- // shorter than the viewport during initial render — empty content, loading
7
- // state — the gradient gets tiled vertically by default, producing visible
8
- // horizontal banding. `min-height: 100vh` ensures the body is at least as tall
9
- // as the viewport so the gradient renders at full size on first paint;
10
- // `background-repeat: no-repeat` is a defensive guard for edge cases (zoom,
11
- // tall viewport with short content after HMR).
12
- //
13
- // Do NOT use the `background` shorthand in consumer App.scss — it resets
14
- // `background-repeat` to its initial `repeat` value and re-introduces the
15
- // banding. Set `background-image` long-hand if a per-project override is
16
- // needed; otherwise omit and let this rule own it.
17
-
18
- html,
19
- body {
20
- background: var(--body-background);
21
- background-repeat: no-repeat;
22
- margin: 0;
23
- padding: 0;
24
- min-height: 100vh;
25
- }
26
-
27
- // Ambient glow overlay — themes opt in via `--body-background-glow`. Pinned to
28
- // the viewport so it stays put on scroll; z-index: -1 keeps it behind app content.
29
- body::before {
30
- content: '';
31
- position: fixed;
32
- inset: 0;
33
- z-index: -1;
34
- background: var(--body-background-glow, none);
35
- pointer-events: none;
36
- }
1
+ // Universal body painting + sizing. Consumed via themes.scss so every memobit
2
+ // app picks it up automatically.
3
+ //
4
+ // Why this lives here:
5
+ // Theme backgrounds are gradients (multi-stop linear/radial). If the body is
6
+ // shorter than the viewport during initial render — empty content, loading
7
+ // state — the gradient gets tiled vertically by default, producing visible
8
+ // horizontal banding. `min-height: 100vh` ensures the body is at least as tall
9
+ // as the viewport so the gradient renders at full size on first paint;
10
+ // `background-repeat: no-repeat` is a defensive guard for edge cases (zoom,
11
+ // tall viewport with short content after HMR).
12
+ //
13
+ // Do NOT use the `background` shorthand in consumer App.scss — it resets
14
+ // `background-repeat` to its initial `repeat` value and re-introduces the
15
+ // banding. Set `background-image` long-hand if a per-project override is
16
+ // needed; otherwise omit and let this rule own it.
17
+
18
+ html,
19
+ body {
20
+ background: var(--body-background);
21
+ background-repeat: no-repeat;
22
+ margin: 0;
23
+ padding: 0;
24
+ min-height: 100vh;
25
+ }
26
+
27
+ // Ambient glow overlay — themes opt in via `--body-background-glow`. Pinned to
28
+ // the viewport so it stays put on scroll; z-index: -1 keeps it behind app content.
29
+ body::before {
30
+ content: '';
31
+ position: fixed;
32
+ inset: 0;
33
+ z-index: -1;
34
+ background: var(--body-background-glow, none);
35
+ pointer-events: none;
36
+ }