@hybridcore/ui 1.6.26 → 1.6.28

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/CATALOG.md CHANGED
@@ -61,6 +61,7 @@ import { ComponentName } from '@hybridcore/ui';
61
61
  | InstanceHierarchyTable | HCInstanceHierarchyTable | Accordion table showing template hierarchy with counts | data-table, hierarchy, accordion |
62
62
  | SimplePivotTable | HCSimplePivotTable | Pivot table with row/column dimensions + aggregations (sum/avg/min/max) | data-table, pivot, aggregation |
63
63
  | PaginatedList | HCPaginatedList | Paginated list with selection mode and snapshot export | data-list, pagination, selection |
64
+ | DataList | HCDataList | Dashboard list: leading icon states, composed meta line, trailing badge/progress slot | data-list, dashboard, badge, status |
64
65
  | SortableList | HCSortableList | Drag-and-drop sortable list | data-list, sortable, drag |
65
66
  | InstanceVariableList | HCInstanceVariableList | Renders typed instance variables with per-type widgets | data-list, ontology, variable, domain |
66
67
 
@@ -0,0 +1,19 @@
1
+ import { c as e } from "./createReactComponent-C7L-DMHj.js";
2
+ /**
3
+ * @license @tabler/icons-react v3.44.0 - MIT
4
+ *
5
+ * This source code is licensed under the MIT license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */
8
+ const t = [["path", { d: "M12 9v4", key: "svg-0" }], ["path", { d: "M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0", key: "svg-1" }], ["path", { d: "M12 16h.01", key: "svg-2" }]], c = e("outline", "alert-triangle", "AlertTriangle", t);
9
+ /**
10
+ * @license @tabler/icons-react v3.44.0 - MIT
11
+ *
12
+ * This source code is licensed under the MIT license.
13
+ * See the LICENSE file in the root directory of this source tree.
14
+ */
15
+ const a = [["path", { d: "M5 12l5 5l10 -10", key: "svg-0" }]], n = e("outline", "check", "Check", a);
16
+ export {
17
+ n as I,
18
+ c as a
19
+ };
@@ -1451,7 +1451,10 @@ const kn = (t) => {
1451
1451
  Ee.new(m, {
1452
1452
  width: Vt,
1453
1453
  height: Vt,
1454
- wheelable: !0,
1454
+ // Off by default for the same reason the XY charts set `wheelX`/`wheelY`
1455
+ // to "none": the widget lives in a scrollable dashboard, and capturing the
1456
+ // wheel traps the page scroll. Drill-down is click-driven; pinch still zooms.
1457
+ wheelable: !1,
1455
1458
  pinchZoom: !0
1456
1459
  })
1457
1460
  ).contents.children.push(
@@ -1,6 +1,6 @@
1
1
  import { R as I, A as W } from "../../../AnimatedTheme-ktdO3Bel.js";
2
- import { useThemeProps as z } from "@mui/material";
3
- import { useRef as d, useLayoutEffect as S } from "react";
2
+ import { useThemeProps as S } from "@mui/material";
3
+ import { useRef as d, useLayoutEffect as z } from "react";
4
4
  import { X as F, V } from "../../../AxisRenderer-BCQoUJw6.js";
5
5
  import { X as G } from "../../../XYCursor-CVUSpqb9.js";
6
6
  import { D as M } from "../../../DateAxis-DEXKps1S.js";
@@ -11,7 +11,7 @@ import { L as j } from "../../../LineSeries-D_IL2qGF.js";
11
11
  import { T as q } from "../../../Tooltip-vyZRZWih.js";
12
12
  import { L as B } from "../../../Legend-CFvQiIfn.js";
13
13
  const ie = (v) => {
14
- const u = z({
14
+ const u = S({
15
15
  props: v,
16
16
  name: "HCHighlightLineChart"
17
17
  }), {
@@ -24,7 +24,7 @@ const ie = (v) => {
24
24
  emptyMessage: x = "No data available",
25
25
  sx: A,
26
26
  ...L
27
- } = u, X = {
27
+ } = u, y = {
28
28
  ...u,
29
29
  height: f,
30
30
  width: k,
@@ -32,8 +32,8 @@ const ie = (v) => {
32
32
  showLegend: l,
33
33
  loading: g,
34
34
  emptyMessage: x
35
- }, y = d(null), C = d(null), h = d(null);
36
- return S(() => {
35
+ }, X = d(null), C = d(null), h = d(null);
36
+ return z(() => {
37
37
  if (!h.current) return;
38
38
  const e = I.new(h.current);
39
39
  C.current = e, e.setThemes([W.new(e)]);
@@ -41,12 +41,14 @@ const ie = (v) => {
41
41
  F.new(e, {
42
42
  panX: !0,
43
43
  panY: !0,
44
- wheelX: "panX",
45
- wheelY: "zoomX",
44
+ // The widget lives in a scrollable dashboard, so the wheel must reach the
45
+ // page instead of panning/zooming the plot. Drag-pan and pinch still zoom.
46
+ wheelX: "none",
47
+ wheelY: "none",
46
48
  pinchZoomX: !0
47
49
  })
48
50
  );
49
- y.current = o, o.set(
51
+ X.current = o, o.set(
50
52
  "cursor",
51
53
  G.new(e, {
52
54
  behavior: "zoomX"
@@ -120,7 +122,7 @@ const ie = (v) => {
120
122
  emptyMessage: x,
121
123
  sx: A,
122
124
  other: L,
123
- ownerState: X
125
+ ownerState: y
124
126
  };
125
127
  };
126
128
  export {
@@ -383,7 +383,10 @@ const ze = (t) => {
383
383
  U.new(f, {
384
384
  width: q,
385
385
  height: q,
386
- wheelable: !0,
386
+ // Off by default for the same reason the XY charts set `wheelX`/`wheelY`
387
+ // to "none": the widget lives in a scrollable dashboard, and capturing the
388
+ // wheel traps the page scroll. `ZoomTools` and pinch still zoom.
389
+ wheelable: !1,
387
390
  pinchZoom: !0
388
391
  })
389
392
  );
@@ -0,0 +1,139 @@
1
+ import { jsxs as o, jsx as a, Fragment as g } from "react/jsx-runtime";
2
+ import { Typography as k, Stack as u, Skeleton as L, CircularProgress as w, TablePagination as x } from "@mui/material";
3
+ import { LinearIndicator as m } from "../linear-indicator/index.js";
4
+ import { useDataListLogic as y } from "./logic.js";
5
+ import { DataListRoot as v, DataListHeader as A, DataListHeaderActionLink as B, DataListHeaderActionButton as R, DataListContent as E, DataListEmpty as H, DataListList as M, DataListLoadMore as T, DataListPagination as j, DataListItemRow as z, DataListItemButton as O, DataListItemEnd as V, DataListItemStart as f, DataListBadge as F, DataListEndLabel as b, DataListItemMain as N, DataListItemTitle as W, DataListItemMeta as _ } from "./styled.js";
6
+ const Q = (t) => {
7
+ const { refs: c, state: r, actions: d } = y(t), { ownerState: l, displayData: C } = r, D = !!(t.title || t.headerAction || t.actionLabel && (t.onActionClick || t.actionHref)), s = (e) => {
8
+ if (t.renderItemStart) return t.renderItemStart(e);
9
+ if (e.icon)
10
+ return /* @__PURE__ */ a(f, { ownerState: l, children: e.icon });
11
+ const i = r.getIcon(e);
12
+ if (!i) return null;
13
+ const n = r.getIconState(e);
14
+ return /* @__PURE__ */ a(
15
+ f,
16
+ {
17
+ ownerState: l,
18
+ iconColor: n == null ? void 0 : n.color,
19
+ iconBackground: n == null ? void 0 : n.backgroundColor,
20
+ role: n != null && n.label ? "img" : void 0,
21
+ "aria-label": n == null ? void 0 : n.label,
22
+ "aria-hidden": n != null && n.label ? void 0 : !0,
23
+ title: n == null ? void 0 : n.label,
24
+ children: /* @__PURE__ */ a(i, { size: l.dense ? 16 : 20 })
25
+ }
26
+ );
27
+ }, P = (e) => {
28
+ if (t.renderItemEnd) return t.renderItemEnd(e);
29
+ if (e.endContent) return e.endContent;
30
+ if (r.endSlot === "badge") {
31
+ const i = r.getBadgeLabel(e);
32
+ if (!i) return null;
33
+ const n = r.getBadgeState(e);
34
+ return /* @__PURE__ */ a(
35
+ F,
36
+ {
37
+ badgeColor: n == null ? void 0 : n.color,
38
+ badgeBackground: n == null ? void 0 : n.backgroundColor,
39
+ badgeBorder: n == null ? void 0 : n.borderColor,
40
+ children: i
41
+ }
42
+ );
43
+ }
44
+ if (r.endSlot === "progress")
45
+ return /* @__PURE__ */ o(g, { children: [
46
+ /* @__PURE__ */ a(
47
+ m,
48
+ {
49
+ value: r.getProgressValue(e),
50
+ sx: { flex: 1, minWidth: 0 }
51
+ }
52
+ ),
53
+ e.endLabel && /* @__PURE__ */ a(b, { children: e.endLabel })
54
+ ] });
55
+ if (r.endSlot === "text") {
56
+ const i = e.endLabel ?? e.endValue;
57
+ return i == null || `${i}`.trim() === "" ? null : /* @__PURE__ */ a(b, { children: i });
58
+ }
59
+ return null;
60
+ }, h = (e) => {
61
+ const i = r.getSecondaryText(e);
62
+ return /* @__PURE__ */ o(N, { ownerState: l, children: [
63
+ /* @__PURE__ */ a(W, { title: e.title, children: e.title }),
64
+ i && /* @__PURE__ */ a(_, { ownerState: l, title: i, children: i })
65
+ ] });
66
+ }, I = (e) => {
67
+ const i = P(e);
68
+ return /* @__PURE__ */ o(z, { ownerState: l, children: [
69
+ r.isItemClickable(e) ? /* @__PURE__ */ o(
70
+ O,
71
+ {
72
+ onClick: d.handleItemClick(e),
73
+ disabled: e.disabled,
74
+ children: [
75
+ s(e),
76
+ h(e)
77
+ ]
78
+ }
79
+ ) : /* @__PURE__ */ o(g, { children: [
80
+ s(e),
81
+ h(e)
82
+ ] }),
83
+ i && /* @__PURE__ */ a(V, { ownerState: l, children: i })
84
+ ] }, e.id);
85
+ };
86
+ return /* @__PURE__ */ o(
87
+ v,
88
+ {
89
+ ownerState: l,
90
+ sx: t.sx,
91
+ elevation: 0,
92
+ "data-snapshot": r.snapshot,
93
+ children: [
94
+ D && /* @__PURE__ */ o(A, { ownerState: l, children: [
95
+ t.title && /* @__PURE__ */ a(k, { variant: "h3", children: t.title }),
96
+ t.headerAction ?? (t.actionLabel && (t.actionHref ? /* @__PURE__ */ a(
97
+ B,
98
+ {
99
+ href: t.actionHref,
100
+ onClick: t.onActionClick,
101
+ children: t.actionLabel
102
+ }
103
+ ) : t.onActionClick && /* @__PURE__ */ a(
104
+ R,
105
+ {
106
+ type: "button",
107
+ onClick: t.onActionClick,
108
+ children: t.actionLabel
109
+ }
110
+ )))
111
+ ] }),
112
+ /* @__PURE__ */ o(E, { ownerState: l, children: [
113
+ t.loading ? /* @__PURE__ */ a(u, { spacing: 2, padding: 2, children: Array.from({ length: t.loadingRows ?? 4 }).map((e, i) => /* @__PURE__ */ o(u, { spacing: 0.5, children: [
114
+ /* @__PURE__ */ a(L, { variant: "text", width: "60%" }),
115
+ /* @__PURE__ */ a(L, { variant: "text", width: "40%" })
116
+ ] }, i)) }) : l.isEmpty ? /* @__PURE__ */ a(H, { ownerState: l, children: t.emptyMessage ?? "No records to display" }) : /* @__PURE__ */ o(M, { ownerState: l, ref: c.listRef, children: [
117
+ C.map(I),
118
+ r.hasMore && /* @__PURE__ */ a(T, { ownerState: l, ref: c.sentinelRef, children: r.isLoadingMore && /* @__PURE__ */ a(w, { size: 18 }) })
119
+ ] }),
120
+ r.showPagination && /* @__PURE__ */ a(j, { ownerState: l, children: /* @__PURE__ */ a(
121
+ x,
122
+ {
123
+ component: "div",
124
+ count: r.count,
125
+ page: r.page,
126
+ rowsPerPage: r.rowsPerPage,
127
+ rowsPerPageOptions: r.rowsPerPageOptions,
128
+ onPageChange: d.handleChangePage,
129
+ onRowsPerPageChange: d.handleChangeRowsPerPage
130
+ }
131
+ ) })
132
+ ] })
133
+ ]
134
+ }
135
+ );
136
+ };
137
+ export {
138
+ Q as DataList
139
+ };
@@ -0,0 +1,224 @@
1
+ import { useThemeProps as de } from "@mui/material";
2
+ import { useRef as f, useState as N, useMemo as S, useCallback as ge, useEffect as B } from "react";
3
+ import { c as s } from "../../createReactComponent-C7L-DMHj.js";
4
+ import { a as he, I as pe } from "../../IconCheck-BcUcbvno.js";
5
+ import { I as ve } from "../../IconCircle-HcgE1lHy.js";
6
+ /**
7
+ * @license @tabler/icons-react v3.44.0 - MIT
8
+ *
9
+ * This source code is licensed under the MIT license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */
12
+ const fe = [["path", { d: "M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0", key: "svg-0" }], ["path", { d: "M12 8v4", key: "svg-1" }], ["path", { d: "M12 16h.01", key: "svg-2" }]], Me = s("outline", "alert-circle", "AlertCircle", fe);
13
+ /**
14
+ * @license @tabler/icons-react v3.44.0 - MIT
15
+ *
16
+ * This source code is licensed under the MIT license.
17
+ * See the LICENSE file in the root directory of this source tree.
18
+ */
19
+ const me = [["path", { d: "M10 5a2 2 0 1 1 4 0a7 7 0 0 1 4 6v3a4 4 0 0 0 2 3h-16a4 4 0 0 0 2 -3v-3a7 7 0 0 1 4 -6", key: "svg-0" }], ["path", { d: "M9 17v1a3 3 0 0 0 6 0v-1", key: "svg-1" }]], ke = s("outline", "bell", "Bell", me);
20
+ /**
21
+ * @license @tabler/icons-react v3.44.0 - MIT
22
+ *
23
+ * This source code is licensed under the MIT license.
24
+ * See the LICENSE file in the root directory of this source tree.
25
+ */
26
+ const ye = [["path", { d: "M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0", key: "svg-0" }], ["path", { d: "M12 7v5l3 3", key: "svg-1" }]], _e = s("outline", "clock", "Clock", ye);
27
+ /**
28
+ * @license @tabler/icons-react v3.44.0 - MIT
29
+ *
30
+ * This source code is licensed under the MIT license.
31
+ * See the LICENSE file in the root directory of this source tree.
32
+ */
33
+ const Ie = [["path", { d: "M14 3v4a1 1 0 0 0 1 1h4", key: "svg-0" }], ["path", { d: "M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2", key: "svg-1" }], ["path", { d: "M9 9l1 0", key: "svg-2" }], ["path", { d: "M9 13l6 0", key: "svg-3" }], ["path", { d: "M9 17l6 0", key: "svg-4" }]], Pe = s("outline", "file-text", "FileText", Ie);
34
+ /**
35
+ * @license @tabler/icons-react v3.44.0 - MIT
36
+ *
37
+ * This source code is licensed under the MIT license.
38
+ * See the LICENSE file in the root directory of this source tree.
39
+ */
40
+ const be = [["path", { d: "M5 5a5 5 0 0 1 7 0a5 5 0 0 0 7 0v9a5 5 0 0 1 -7 0a5 5 0 0 0 -7 0v-9", key: "svg-0" }], ["path", { d: "M5 21v-7", key: "svg-1" }]], Ne = s("outline", "flag", "Flag", be);
41
+ /**
42
+ * @license @tabler/icons-react v3.44.0 - MIT
43
+ *
44
+ * This source code is licensed under the MIT license.
45
+ * See the LICENSE file in the root directory of this source tree.
46
+ */
47
+ const Se = [["path", { d: "M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0", key: "svg-0" }], ["path", { d: "M12 9h.01", key: "svg-1" }], ["path", { d: "M11 12h1v4h1", key: "svg-2" }]], we = s("outline", "info-circle", "InfoCircle", Se);
48
+ /**
49
+ * @license @tabler/icons-react v3.44.0 - MIT
50
+ *
51
+ * This source code is licensed under the MIT license.
52
+ * See the LICENSE file in the root directory of this source tree.
53
+ */
54
+ const Re = [["path", { d: "M9 11a3 3 0 1 0 6 0a3 3 0 0 0 -6 0", key: "svg-0" }], ["path", { d: "M17.657 16.657l-4.243 4.243a2 2 0 0 1 -2.827 0l-4.244 -4.243a8 8 0 1 1 11.314 0", key: "svg-1" }]], $e = s("outline", "map-pin", "MapPin", Re);
55
+ /**
56
+ * @license @tabler/icons-react v3.44.0 - MIT
57
+ *
58
+ * This source code is licensed under the MIT license.
59
+ * See the LICENSE file in the root directory of this source tree.
60
+ */
61
+ const Ce = [["path", { d: "M8 9h8", key: "svg-0" }], ["path", { d: "M8 13h6", key: "svg-1" }], ["path", { d: "M18 4a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-5l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12", key: "svg-2" }]], Oe = s("outline", "message", "Message", Ce);
62
+ /**
63
+ * @license @tabler/icons-react v3.44.0 - MIT
64
+ *
65
+ * This source code is licensed under the MIT license.
66
+ * See the LICENSE file in the root directory of this source tree.
67
+ */
68
+ const Le = [["path", { d: "M15.04 19.745c-.942 .551 -1.964 .976 -3.04 1.255a12 12 0 0 1 -8.5 -15a12 12 0 0 0 8.5 -3a12 12 0 0 0 8.5 3a12 12 0 0 1 .195 6.015", key: "svg-0" }], ["path", { d: "M19 16v3", key: "svg-1" }], ["path", { d: "M19 22v.01", key: "svg-2" }]], xe = s("outline", "shield-exclamation", "ShieldExclamation", Le);
69
+ /**
70
+ * @license @tabler/icons-react v3.44.0 - MIT
71
+ *
72
+ * This source code is licensed under the MIT license.
73
+ * See the LICENSE file in the root directory of this source tree.
74
+ */
75
+ const Te = [["path", { d: "M12 3a12 12 0 0 0 8.5 3a12 12 0 0 1 -8.5 15a12 12 0 0 1 -8.5 -15a12 12 0 0 0 8.5 -3", key: "svg-0" }]], Ae = s("outline", "shield", "Shield", Te);
76
+ /**
77
+ * @license @tabler/icons-react v3.44.0 - MIT
78
+ *
79
+ * This source code is licensed under the MIT license.
80
+ * See the LICENSE file in the root directory of this source tree.
81
+ */
82
+ const Ee = [["path", { d: "M7 11v8a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-7a1 1 0 0 1 1 -1h3a4 4 0 0 0 4 -4v-1a2 2 0 0 1 4 0v5h3a2 2 0 0 1 2 2l-1 5a2 3 0 0 1 -2 2h-7a3 3 0 0 1 -3 -3", key: "svg-0" }]], Be = s("outline", "thumb-up", "ThumbUp", Ee);
83
+ /**
84
+ * @license @tabler/icons-react v3.44.0 - MIT
85
+ *
86
+ * This source code is licensed under the MIT license.
87
+ * See the LICENSE file in the root directory of this source tree.
88
+ */
89
+ const Fe = [["path", { d: "M5 7a4 4 0 1 0 8 0a4 4 0 1 0 -8 0", key: "svg-0" }], ["path", { d: "M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2", key: "svg-1" }], ["path", { d: "M16 3.13a4 4 0 0 1 0 7.75", key: "svg-2" }], ["path", { d: "M21 21v-2a4 4 0 0 0 -3 -3.85", key: "svg-3" }]], Ve = s("outline", "users", "Users", Fe), De = {
90
+ shield: Ae,
91
+ "shield-alert": xe,
92
+ "alert-triangle": he,
93
+ "alert-circle": Me,
94
+ info: we,
95
+ bell: ke,
96
+ check: pe,
97
+ clock: _e,
98
+ flag: Ne,
99
+ file: Pe,
100
+ "map-pin": $e,
101
+ message: Oe,
102
+ "thumb-up": Be,
103
+ users: Ve,
104
+ circle: ve
105
+ }, Ue = [5, 10, 25, 50], Ge = "120px", F = (g, d) => {
106
+ if (!(g != null && g.length) || d === void 0 || d === null) return;
107
+ const o = `${d}`.trim().toLowerCase();
108
+ if (o)
109
+ return g.find((k) => `${k.value}`.trim().toLowerCase() === o);
110
+ }, qe = (g) => {
111
+ const d = de({ props: g, name: "HCDataList" }), {
112
+ data: o = [],
113
+ totalCount: k,
114
+ payload: i,
115
+ onChange: r,
116
+ onItemClick: M,
117
+ iconStates: V,
118
+ iconShape: D = "circle",
119
+ badgeStates: U,
120
+ endSlot: w = "badge",
121
+ metaSeparator: G = "•",
122
+ descriptionLines: j = 1,
123
+ dense: H = !1,
124
+ divider: J = !0,
125
+ headerGutter: K = !1,
126
+ paginationMode: y = "infinite",
127
+ rowsPerPage: W = 10,
128
+ resetKey: q,
129
+ loading: _ = !1,
130
+ loadingMore: z = !1
131
+ } = d, R = f(null), $ = f(null), [Q, C] = N(0), [X, Y] = N(W), l = (i == null ? void 0 : i.pageNumber) ?? Q, a = (i == null ? void 0 : i.rows) ?? X, c = !!r, u = y === "infinite", [O, L] = N(a), p = f(/* @__PURE__ */ new Map()), m = `${q ?? ""}`, x = f(m), h = f(null);
132
+ x.current !== m && (x.current = m, p.current.clear(), h.current = null), c && u && (l === 0 && p.current.clear(), p.current.set(l, o), h.current === l && (h.current = null));
133
+ const T = S(() => !c || !u ? o : Array.from(p.current.keys()).sort((e, t) => e - t).flatMap((e) => p.current.get(e) ?? []), [c, u, o, l]), I = c ? k ?? 0 : o.length, v = S(() => u ? c ? T : o.slice(0, O) : c ? o : o.slice(l * a, (l + 1) * a), [u, c, T, o, O, l, a]), P = u && v.length < I, Z = y === "buttons" && I > a, b = ge(() => {
134
+ if (!c) {
135
+ L((t) => t + a);
136
+ return;
137
+ }
138
+ const e = l + 1;
139
+ h.current === null && (h.current = e, r == null || r({ ...i, pageNumber: e, rows: a }));
140
+ }, [c, a, l, r, i]);
141
+ B(() => {
142
+ if (!u || !P || _) return;
143
+ const e = $.current;
144
+ if (!e || typeof IntersectionObserver > "u") return;
145
+ const t = new IntersectionObserver(
146
+ (n) => {
147
+ n.some((ue) => ue.isIntersecting) && b();
148
+ },
149
+ { root: R.current, rootMargin: Ge }
150
+ );
151
+ return t.observe(e), () => t.disconnect();
152
+ }, [u, P, _, b]), B(() => {
153
+ u && !c && L(a);
154
+ }, [u, c, a, m, o.length]);
155
+ const ee = (e, t) => {
156
+ C(t), r == null || r({ ...i, pageNumber: t, rows: a });
157
+ }, te = (e) => {
158
+ const t = parseInt(e.target.value, 10);
159
+ Y(t), C(0), r == null || r({ ...i, pageNumber: 0, rows: t });
160
+ }, ne = (e) => () => {
161
+ e.disabled || M == null || M(e);
162
+ }, oe = (e) => !!M && !e.disabled, ae = (e) => {
163
+ if (!e.meta) return e.description;
164
+ const t = e.meta.filter((n) => n != null && `${n}`.trim() !== "").map((n) => `${n}`.trim());
165
+ return t.length ? t.join(` ${G} `) : void 0;
166
+ }, A = (e) => F(V, e.iconValue), se = (e) => {
167
+ var n;
168
+ const t = (n = A(e)) == null ? void 0 : n.icon;
169
+ return t ? De[t] : void 0;
170
+ }, E = (e) => F(U, e.status), re = (e) => {
171
+ var n;
172
+ const t = E(e);
173
+ return t ? t.label ?? t.value : ((n = e.status) == null ? void 0 : n.trim()) || void 0;
174
+ }, ce = (e) => {
175
+ const t = typeof e.endValue == "string" ? Number(e.endValue) : e.endValue;
176
+ return Number.isFinite(t) ? Math.min(100, Math.max(0, t)) : 0;
177
+ }, ie = S(
178
+ () => JSON.stringify({ title: d.title, data: v }),
179
+ [d.title, v]
180
+ ), le = {
181
+ ...d,
182
+ iconShape: D,
183
+ endSlot: w,
184
+ dense: H,
185
+ divider: J,
186
+ descriptionLines: j,
187
+ headerGutter: K,
188
+ paginationMode: y,
189
+ isEmpty: !_ && v.length === 0
190
+ };
191
+ return {
192
+ refs: { listRef: R, sentinelRef: $ },
193
+ state: {
194
+ ownerState: le,
195
+ displayData: v,
196
+ count: I,
197
+ page: l,
198
+ rowsPerPage: a,
199
+ rowsPerPageOptions: d.rowsPerPageOptions ?? Ue,
200
+ showPagination: Z,
201
+ hasMore: P,
202
+ // Either the caller says a request is running, or we know one is in flight.
203
+ isLoadingMore: z || h.current !== null,
204
+ snapshot: ie,
205
+ endSlot: w,
206
+ isItemClickable: oe,
207
+ getSecondaryText: ae,
208
+ getIconState: A,
209
+ getIcon: se,
210
+ getBadgeState: E,
211
+ getBadgeLabel: re,
212
+ getProgressValue: ce
213
+ },
214
+ actions: {
215
+ handleChangePage: ee,
216
+ handleChangeRowsPerPage: te,
217
+ handleItemClick: ne,
218
+ loadMore: b
219
+ }
220
+ };
221
+ };
222
+ export {
223
+ qe as useDataListLogic
224
+ };