@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,58 +1,60 @@
1
- import { Icon as C } from "../Icon/Icon2.js";
2
- import { Tooltip as U } from "../Tooltip/Tooltip2.js";
3
- import { Checkbox as A } from "../Checkbox/Checkbox2.js";
4
- import { EmptyState as F } from "../EmptyState/EmptyState2.js";
5
- import { calculateTimelineMarkers as X } from "../TimelineMarkers/calculateTimelineMarkers.js";
6
- import { TimelineMobileSeparator as Y } from "../TimelineMarkers/TimelineMarkers2.js";
7
- import { groupMotionKey as Z, renderCellContent as R, renderColumnLabel as W } from "./DataView.helpers.js";
8
- import aa, { useMemo as j } from "react";
9
- import { Fragment as ea, jsx as a, jsxs as c } from "react/jsx-runtime";
10
- var ta = (d) => typeof d == "number" ? `${d}px` : d;
11
- function _a({ data: d, columns: z, rowKey: V, card: n, actions: k, timeline: l, onRowClick: o, rowHref: D, rowClassName: E, empty: r, selectable: u, selectedIds: L = [], pinnedIds: b, onToggleSelect: _, cardMaxWidth: N, isMobile: q = !1, groups: g, showGroupCount: B = !0, collapsible: v = !1, collapsedGroups: G, onToggleGroup: H }) {
12
- const $ = z.filter((e) => !e.hideInCard && !(q && e.hideInMobile)), J = j(() => new Set(b ?? []), [b]), I = `data-view__cards${N !== void 0 ? " data-view__cards--grid" : ""}`, K = N !== void 0 ? { "--data-view-card-max-width": ta(N) } : void 0, O = j(() => {
1
+ import { Icon as k } from "../Icon/Icon2.js";
2
+ import { libMessages as X } from "../../contexts/LanguageContext/libMessages.js";
3
+ import { useMessages as Y } from "../../hooks/useLanguage.js";
4
+ import { Tooltip as Z } from "../Tooltip/Tooltip2.js";
5
+ import { Checkbox as F } from "../Checkbox/Checkbox2.js";
6
+ import { EmptyState as j } from "../EmptyState/EmptyState2.js";
7
+ import { calculateTimelineMarkers as R } from "../TimelineMarkers/calculateTimelineMarkers.js";
8
+ import { TimelineMobileSeparator as W } from "../TimelineMarkers/TimelineMarkers2.js";
9
+ import { groupMotionKey as ee, renderCellContent as ae, renderColumnLabel as te } from "./DataView.helpers.js";
10
+ import ie, { useMemo as z } from "react";
11
+ import { Fragment as se, jsx as e, jsxs as c } from "react/jsx-runtime";
12
+ var ne = (d) => typeof d == "number" ? `${d}px` : d;
13
+ function fe({ data: d, columns: D, rowKey: V, card: s, actions: b, timeline: l, onRowClick: o, rowHref: E, rowClassName: L, empty: r, selectable: u, selectedIds: q = [], pinnedIds: g, onToggleSelect: _, cardMaxWidth: f, isMobile: B = !1, groups: $, showGroupCount: G = !0, collapsible: v = !1, collapsedGroups: H, onToggleGroup: J }) {
14
+ const N = Y(X), I = D.filter((a) => !a.hideInCard && !(B && a.hideInMobile)), O = z(() => new Set(g ?? []), [g]), M = `data-view__cards${f !== void 0 ? " data-view__cards--grid" : ""}`, K = f !== void 0 ? { "--data-view-card-max-width": ne(f) } : void 0, Q = z(() => {
13
15
  if (!l) return /* @__PURE__ */ new Map();
14
- const e = d.map((i) => ({
16
+ const a = d.map((i) => ({
15
17
  id: l.idAccessor(i),
16
18
  date: l.dateAccessor(i)
17
19
  }));
18
- return X(e, l.granularity);
20
+ return R(a, l.granularity);
19
21
  }, [d, l]);
20
22
  if (d.length === 0)
21
- return r ? /* @__PURE__ */ a(F, {
23
+ return r ? /* @__PURE__ */ e(j, {
22
24
  title: r.title,
23
25
  description: r.description,
24
26
  icon: r.icon,
25
27
  primary: r.primary,
26
28
  secondary: r.secondary
27
- }) : /* @__PURE__ */ a(F, { title: "No data available" });
28
- const P = (e, i) => {
29
- const h = O.get(i), s = V(e, i), m = u && L.includes(s), p = J.has(s), f = D?.(e), Q = !!o || !!f, w = n?.accentColor?.(e), x = `data-view__card ${Q ? "data-view__card--clickable" : ""} ${m ? "data-view__card--selected" : ""} ${p ? "data-view__card--pinned" : ""} ${w ? "data-view__card--accent" : ""} ${E?.(e) || ""}`, M = w ? { "--data-view-card-accent-color": w } : void 0, T = (t) => {
30
- t.metaKey || t.ctrlKey || t.shiftKey || t.altKey || t.button !== 0 || o && (t.preventDefault(), o(e, t));
31
- }, S = /* @__PURE__ */ c(ea, { children: [
32
- p && /* @__PURE__ */ a(U, {
33
- title: "Pinned",
34
- children: /* @__PURE__ */ a("span", {
29
+ }) : /* @__PURE__ */ e(j, { title: N.noData });
30
+ const P = (a, i) => {
31
+ const h = Q.get(i), n = V(a, i), m = u && q.includes(n), p = O.has(n), w = E?.(a), T = !!o || !!w, C = s?.accentColor?.(a), x = `data-view__card ${T ? "data-view__card--clickable" : ""} ${m ? "data-view__card--selected" : ""} ${p ? "data-view__card--pinned" : ""} ${C ? "data-view__card--accent" : ""} ${L?.(a) || ""}`, S = C ? { "--data-view-card-accent-color": C } : void 0, U = (t) => {
32
+ t.metaKey || t.ctrlKey || t.shiftKey || t.altKey || t.button !== 0 || o && (t.preventDefault(), o(a, t));
33
+ }, A = /* @__PURE__ */ c(se, { children: [
34
+ p && /* @__PURE__ */ e(Z, {
35
+ title: N.pinned,
36
+ children: /* @__PURE__ */ e("span", {
35
37
  className: "data-view__card-pin",
36
- children: /* @__PURE__ */ a(C, {
38
+ children: /* @__PURE__ */ e(k, {
37
39
  name: "pin",
38
40
  size: "sm"
39
41
  })
40
42
  })
41
43
  }),
42
- u && _ && !n && /* @__PURE__ */ a("div", {
44
+ u && _ && !s && /* @__PURE__ */ e("div", {
43
45
  className: "data-view__card-select",
44
46
  onClick: (t) => t.stopPropagation(),
45
- children: /* @__PURE__ */ a(A, {
47
+ children: /* @__PURE__ */ e(F, {
46
48
  checked: m || !1,
47
- onChange: (t) => _(s, t)
49
+ onChange: (t) => _(n, t)
48
50
  })
49
51
  }),
50
- n?.media && /* @__PURE__ */ a("div", {
52
+ s?.media && /* @__PURE__ */ e("div", {
51
53
  className: "data-view__card-media",
52
- children: n.media(e)
54
+ children: s.media(a)
53
55
  }),
54
- n && (() => {
55
- const t = n.icon?.(e);
56
+ s && (() => {
57
+ const t = s.icon?.(a);
56
58
  return /* @__PURE__ */ c("div", {
57
59
  className: "data-view__card-header",
58
60
  children: [/* @__PURE__ */ c("div", {
@@ -60,98 +62,98 @@ function _a({ data: d, columns: z, rowKey: V, card: n, actions: k, timeline: l,
60
62
  children: [/* @__PURE__ */ c("div", {
61
63
  className: "data-view__card-title-line",
62
64
  children: [
63
- u && _ && /* @__PURE__ */ a("div", {
65
+ u && _ && /* @__PURE__ */ e("div", {
64
66
  className: "data-view__card-select",
65
67
  onClick: (y) => y.stopPropagation(),
66
- children: /* @__PURE__ */ a(A, {
68
+ children: /* @__PURE__ */ e(F, {
67
69
  checked: m || !1,
68
- onChange: (y) => _(s, y)
70
+ onChange: (y) => _(n, y)
69
71
  })
70
72
  }),
71
- t && /* @__PURE__ */ a(C, {
73
+ t && /* @__PURE__ */ e(k, {
72
74
  className: "data-view__card-icon",
73
75
  name: t
74
76
  }),
75
- /* @__PURE__ */ a("span", {
77
+ /* @__PURE__ */ e("span", {
76
78
  className: "data-view__card-title",
77
- children: n.title(e)
79
+ children: s.title(a)
78
80
  })
79
81
  ]
80
- }), n.subtitle && /* @__PURE__ */ a("span", {
82
+ }), s.subtitle && /* @__PURE__ */ e("span", {
81
83
  className: "data-view__card-subtitle",
82
- children: n.subtitle(e)
84
+ children: s.subtitle(a)
83
85
  })]
84
- }), n.badges && /* @__PURE__ */ a("div", {
86
+ }), s.badges && /* @__PURE__ */ e("div", {
85
87
  className: "data-view__card-badges",
86
- children: n.badges(e)
88
+ children: s.badges(a)
87
89
  })]
88
90
  });
89
91
  })(),
90
- $.length > 0 && /* @__PURE__ */ a("div", {
92
+ I.length > 0 && /* @__PURE__ */ e("div", {
91
93
  className: "data-view__card-body",
92
- children: $.map((t) => /* @__PURE__ */ c("div", {
94
+ children: I.map((t) => /* @__PURE__ */ c("div", {
93
95
  className: "data-view__card-field",
94
- children: [/* @__PURE__ */ a("span", {
96
+ children: [/* @__PURE__ */ e("span", {
95
97
  className: "data-view__card-label",
96
- children: W(t)
97
- }), /* @__PURE__ */ a("span", {
98
+ children: te(t)
99
+ }), /* @__PURE__ */ e("span", {
98
100
  className: "data-view__card-value",
99
- children: R(t, e)
101
+ children: ae(t, a)
100
102
  })]
101
103
  }, t.key))
102
104
  }),
103
- k && /* @__PURE__ */ a("div", {
105
+ b && /* @__PURE__ */ e("div", {
104
106
  className: "data-view__card-actions",
105
107
  onClick: (t) => t.stopPropagation(),
106
- children: k(e)
108
+ children: b(a)
107
109
  })
108
110
  ] });
109
- return /* @__PURE__ */ c(aa.Fragment, { children: [h && /* @__PURE__ */ a(Y, { marker: h }), f ? /* @__PURE__ */ a("a", {
111
+ return /* @__PURE__ */ c(ie.Fragment, { children: [h && /* @__PURE__ */ e(W, { marker: h }), w ? /* @__PURE__ */ e("a", {
110
112
  className: x,
111
- "data-motion-key": s,
112
- href: f,
113
- style: M,
114
- onClick: T,
115
- children: S
116
- }) : /* @__PURE__ */ a("div", {
113
+ "data-motion-key": n,
114
+ href: w,
115
+ style: S,
116
+ onClick: U,
117
+ children: A
118
+ }) : /* @__PURE__ */ e("div", {
117
119
  className: x,
118
- "data-motion-key": s,
119
- style: M,
120
- onClick: o ? (t) => o(e, t) : void 0,
121
- children: S
122
- })] }, s);
120
+ "data-motion-key": n,
121
+ style: S,
122
+ onClick: o ? (t) => o(a, t) : void 0,
123
+ children: A
124
+ })] }, n);
123
125
  };
124
- if (g) {
125
- let e = 0;
126
- return /* @__PURE__ */ a("div", {
126
+ if ($) {
127
+ let a = 0;
128
+ return /* @__PURE__ */ e("div", {
127
129
  className: "data-view__groups",
128
- children: g.map((i) => {
129
- const h = e;
130
- e += i.items.length;
131
- const s = v && G?.has(i.key);
130
+ children: $.map((i) => {
131
+ const h = a;
132
+ a += i.items.length;
133
+ const n = v && H?.has(i.key);
132
134
  return /* @__PURE__ */ c("section", {
133
135
  className: "data-view__group",
134
136
  children: [/* @__PURE__ */ c("header", {
135
137
  className: `data-view__group-header${v ? " data-view__group-header--collapsible" : ""}`,
136
- "data-motion-key": Z(i.key),
137
- onClick: v ? () => H?.(i.key) : void 0,
138
+ "data-motion-key": ee(i.key),
139
+ onClick: v ? () => J?.(i.key) : void 0,
138
140
  children: [
139
- /* @__PURE__ */ a("span", {
141
+ /* @__PURE__ */ e("span", {
140
142
  className: "data-view__group-label",
141
143
  children: i.label
142
144
  }),
143
- B && /* @__PURE__ */ a("span", {
145
+ G && /* @__PURE__ */ e("span", {
144
146
  className: "data-view__group-count",
145
- children: i.items.length === i.totalCount ? i.totalCount : `${i.items.length} of ${i.totalCount}`
147
+ children: i.items.length === i.totalCount ? i.totalCount : N.groupPartCount(i.items.length, i.totalCount)
146
148
  }),
147
- v && /* @__PURE__ */ a(C, {
149
+ v && /* @__PURE__ */ e(k, {
148
150
  className: "data-view__group-chevron",
149
- name: s ? "caret-down" : "caret-up",
151
+ name: n ? "caret-down" : "caret-up",
150
152
  size: "sm"
151
153
  })
152
154
  ]
153
- }), !s && /* @__PURE__ */ a("div", {
154
- className: I,
155
+ }), !n && /* @__PURE__ */ e("div", {
156
+ className: M,
155
157
  style: K,
156
158
  children: i.items.map((m, p) => P(m, h + p))
157
159
  })]
@@ -159,12 +161,12 @@ function _a({ data: d, columns: z, rowKey: V, card: n, actions: k, timeline: l,
159
161
  })
160
162
  });
161
163
  }
162
- return /* @__PURE__ */ a("div", {
163
- className: I,
164
+ return /* @__PURE__ */ e("div", {
165
+ className: M,
164
166
  style: K,
165
- children: d.map((e, i) => P(e, i))
167
+ children: d.map((a, i) => P(a, i))
166
168
  });
167
169
  }
168
170
  export {
169
- _a as CardView
171
+ fe as CardView
170
172
  };
@@ -1,47 +1,49 @@
1
- import { Icon as h } from "../Icon/Icon2.js";
2
- import { Button as b } from "../Button/Button2.js";
3
- import { Checkbox as p } from "../Checkbox/Checkbox2.js";
4
- import { Popover as v } from "../Popover/Popover2.js";
5
- import { useRef as C, useState as _ } from "react";
6
- import { jsx as l, jsxs as s } from "react/jsx-runtime";
7
- function j({ config: m }) {
8
- const { options: r, selectedKeys: t, onChange: c, label: u = "Columns" } = m, a = C(null), [d, i] = _(!1);
1
+ import { Icon as p } from "../Icon/Icon2.js";
2
+ import { libMessages as b } from "../../contexts/LanguageContext/libMessages.js";
3
+ import { useMessages as v } from "../../hooks/useLanguage.js";
4
+ import { Button as g } from "../Button/Button2.js";
5
+ import { Checkbox as _ } from "../Checkbox/Checkbox2.js";
6
+ import { Popover as C } from "../Popover/Popover2.js";
7
+ import { useRef as w, useState as k } from "react";
8
+ import { jsx as l, jsxs as n } from "react/jsx-runtime";
9
+ function S({ config: m }) {
10
+ const u = v(b), { options: r, selectedKeys: s, onChange: c, label: d = u.columns } = m, a = w(null), [f, i] = k(!1);
9
11
  if (r.length === 0) return null;
10
- const f = (e, n) => {
11
- if (n) {
12
- if (t.includes(e)) return;
13
- c([...t, e]);
14
- } else c(t.filter((o) => o !== e));
12
+ const h = (e, t) => {
13
+ if (t) {
14
+ if (s.includes(e)) return;
15
+ c([...s, e]);
16
+ } else c(s.filter((o) => o !== e));
15
17
  };
16
- return /* @__PURE__ */ s("div", {
18
+ return /* @__PURE__ */ n("div", {
17
19
  className: "data-view__column-selector",
18
- children: [/* @__PURE__ */ l(b, {
20
+ children: [/* @__PURE__ */ l(g, {
19
21
  ref: a,
20
22
  variant: "ghost",
21
23
  size: "small",
22
24
  icon: "table",
23
25
  onClick: () => i((e) => !e),
24
- children: /* @__PURE__ */ s("span", {
26
+ children: /* @__PURE__ */ n("span", {
25
27
  className: "data-view__column-selector-label",
26
- children: [u, /* @__PURE__ */ l(h, {
28
+ children: [d, /* @__PURE__ */ l(p, {
27
29
  name: "caret-down",
28
30
  size: "sm"
29
31
  })]
30
32
  })
31
- }), /* @__PURE__ */ l(v, {
32
- visible: d,
33
+ }), /* @__PURE__ */ l(C, {
34
+ visible: f,
33
35
  onClose: () => i(!1),
34
36
  anchorEl: a.current,
35
37
  placement: "bottom",
36
38
  children: /* @__PURE__ */ l("div", {
37
39
  className: "data-view__column-selector-list",
38
40
  children: r.map((e) => {
39
- const n = t.includes(e.key);
40
- return /* @__PURE__ */ s("label", {
41
+ const t = s.includes(e.key);
42
+ return /* @__PURE__ */ n("label", {
41
43
  className: "data-view__column-selector-item",
42
- children: [/* @__PURE__ */ l(p, {
43
- checked: n,
44
- onChange: (o) => f(e.key, o)
44
+ children: [/* @__PURE__ */ l(_, {
45
+ checked: t,
46
+ onChange: (o) => h(e.key, o)
45
47
  }), /* @__PURE__ */ l("span", { children: e.label })]
46
48
  }, e.key);
47
49
  })
@@ -50,5 +52,5 @@ function j({ config: m }) {
50
52
  });
51
53
  }
52
54
  export {
53
- j as DataViewColumnSelector
55
+ S as DataViewColumnSelector
54
56
  };
@@ -1,60 +1,62 @@
1
- import { Icon as C } from "../Icon/Icon2.js";
2
- import { Tooltip as Z } from "../Tooltip/Tooltip2.js";
3
- import { Checkbox as $ } from "../Checkbox/Checkbox2.js";
4
- import { EmptyState as S } from "../EmptyState/EmptyState2.js";
5
- import { TimelineMarkerDot as W } from "../TimelineMarkers/TimelineMarkers2.js";
6
- import { detailMotionKey as ee, groupMotionKey as ae, renderCellContent as te, renderColumnLabel as ie } from "./DataView.helpers.js";
7
- import P from "react";
8
- import { jsx as e, jsxs as n } from "react/jsx-runtime";
9
- function le({ state: o }) {
1
+ import { Icon as u } from "../Icon/Icon2.js";
2
+ import { libMessages as W } from "../../contexts/LanguageContext/libMessages.js";
3
+ import { useMessages as ee } from "../../hooks/useLanguage.js";
4
+ import { Tooltip as ae } from "../Tooltip/Tooltip2.js";
5
+ import { Checkbox as M } from "../Checkbox/Checkbox2.js";
6
+ import { EmptyState as P } from "../EmptyState/EmptyState2.js";
7
+ import { TimelineMarkerDot as te } from "../TimelineMarkers/TimelineMarkers2.js";
8
+ import { detailMotionKey as ie, groupMotionKey as le, renderCellContent as re, renderColumnLabel as ne } from "./DataView.helpers.js";
9
+ import $ from "react";
10
+ import { jsx as e, jsxs as r } from "react/jsx-runtime";
11
+ function oe({ state: o }) {
10
12
  return /* @__PURE__ */ e("span", {
11
13
  className: `data-view__sort-icon data-view__sort-icon--${o}`,
12
- children: /* @__PURE__ */ e(C, { name: o === "asc" ? "arrow-up" : o === "desc" ? "arrow-down" : "arrow-bidirectional-vertical" })
14
+ children: /* @__PURE__ */ e(u, { name: o === "asc" ? "arrow-up" : o === "desc" ? "arrow-down" : "arrow-bidirectional-vertical" })
13
15
  });
14
16
  }
15
- function we({ data: o, columns: w, rowKey: I, columnWidths: d, onResizeStart: K, sortKey: M, sortDirection: j, onToggleSort: z, hasFilters: A, showTimeline: p, timelineMarkers: D, selectable: m, selectedIds: T, allVisibleSelected: F, someVisibleSelected: R, onToggleVisibleSelection: B, onToggleSelect: E, pinnedSet: G, actions: c, actionsWidth: v, onRowClick: y, rowHref: L, rowClassName: O, rowDetail: V, empty: s, groups: u, group: _, collapsedGroups: q, onToggleGroup: H }) {
16
- const b = w.length + (p ? 1 : 0) + (m ? 1 : 0) + (c ? 1 : 0), J = _?.showCount !== !1, x = (a, t) => {
17
- const l = I(a, t), h = T.includes(l), k = G.has(l), f = D.get(t), r = L?.(a), g = !!y || !!r, U = (i) => {
18
- if (r && (i.metaKey || i.ctrlKey || i.shiftKey)) {
19
- window.open(r, "_blank", "noopener,noreferrer");
17
+ function fe({ data: o, columns: w, rowKey: I, columnWidths: s, onResizeStart: K, sortKey: D, sortDirection: j, onToggleSort: z, hasFilters: T, showTimeline: p, timelineMarkers: A, selectable: m, selectedIds: F, allVisibleSelected: R, someVisibleSelected: B, onToggleVisibleSelection: E, onToggleSelect: G, pinnedSet: L, actions: c, actionsWidth: v, onRowClick: b, rowHref: O, rowClassName: V, rowDetail: q, empty: d, groups: g, group: _, collapsedGroups: H, onToggleGroup: J }) {
18
+ const k = ee(W), N = w.length + (p ? 1 : 0) + (m ? 1 : 0) + (c ? 1 : 0), Q = _?.showCount !== !1, x = (a, t) => {
19
+ const l = I(a, t), h = F.includes(l), f = L.has(l), y = A.get(t), n = O?.(a), S = !!b || !!n, X = (i) => {
20
+ if (n && (i.metaKey || i.ctrlKey || i.shiftKey)) {
21
+ window.open(n, "_blank", "noopener,noreferrer");
20
22
  return;
21
23
  }
22
- if (y) {
23
- y(a, i);
24
+ if (b) {
25
+ b(a, i);
24
26
  return;
25
27
  }
26
- r && window.location.assign(r);
27
- }, X = (i) => {
28
- i.button !== 1 || !r || (i.preventDefault(), window.open(r, "_blank", "noopener,noreferrer"));
29
- }, N = V?.(a);
30
- return /* @__PURE__ */ n(P.Fragment, { children: [/* @__PURE__ */ n("tr", {
31
- className: `${h ? "is-selected" : ""} ${g ? "data-view__row--clickable" : ""} ${k ? "data-view__row--pinned" : ""} ${O?.(a) || ""}`,
28
+ n && window.location.assign(n);
29
+ }, Y = (i) => {
30
+ i.button !== 1 || !n || (i.preventDefault(), window.open(n, "_blank", "noopener,noreferrer"));
31
+ }, C = q?.(a);
32
+ return /* @__PURE__ */ r($.Fragment, { children: [/* @__PURE__ */ r("tr", {
33
+ className: `${h ? "is-selected" : ""} ${S ? "data-view__row--clickable" : ""} ${f ? "data-view__row--pinned" : ""} ${V?.(a) || ""}`,
32
34
  "data-motion-key": l,
33
- onClick: g ? U : void 0,
34
- onAuxClick: r ? X : void 0,
35
+ onClick: S ? X : void 0,
36
+ onAuxClick: n ? Y : void 0,
35
37
  children: [
36
38
  p && /* @__PURE__ */ e("td", {
37
39
  className: "data-view__timeline-cell",
38
- children: f && /* @__PURE__ */ e(W, { marker: f })
40
+ children: y && /* @__PURE__ */ e(te, { marker: y })
39
41
  }),
40
42
  m && /* @__PURE__ */ e("td", {
41
43
  className: "data-view__checkbox",
42
44
  onClick: (i) => i.stopPropagation(),
43
- children: /* @__PURE__ */ e($, {
45
+ children: /* @__PURE__ */ e(M, {
44
46
  checked: h,
45
- onChange: (i) => E(l, i)
47
+ onChange: (i) => G(l, i)
46
48
  })
47
49
  }),
48
- w.map((i, Y) => /* @__PURE__ */ n("td", {
49
- style: d[i.key] ? { width: d[i.key] } : void 0,
50
- children: [Y === 0 && k && /* @__PURE__ */ e(Z, {
51
- title: "Pinned",
52
- children: /* @__PURE__ */ e(C, {
50
+ w.map((i, Z) => /* @__PURE__ */ r("td", {
51
+ style: s[i.key] ? { width: s[i.key] } : void 0,
52
+ children: [Z === 0 && f && /* @__PURE__ */ e(ae, {
53
+ title: k.pinned,
54
+ children: /* @__PURE__ */ e(u, {
53
55
  className: "data-view__pin-indicator",
54
56
  name: "pin",
55
57
  size: "sm"
56
58
  })
57
- }), te(i, a)]
59
+ }), re(i, a)]
58
60
  }, i.key)),
59
61
  c && /* @__PURE__ */ e("td", {
60
62
  className: "data-view__actions-cell",
@@ -66,80 +68,80 @@ function we({ data: o, columns: w, rowKey: I, columnWidths: d, onResizeStart: K,
66
68
  })
67
69
  })
68
70
  ]
69
- }), N != null && N !== !1 && /* @__PURE__ */ e("tr", {
71
+ }), C != null && C !== !1 && /* @__PURE__ */ e("tr", {
70
72
  className: "data-view__row-detail",
71
- "data-motion-key": ee(l),
73
+ "data-motion-key": ie(l),
72
74
  children: /* @__PURE__ */ e("td", {
73
- colSpan: b,
75
+ colSpan: N,
74
76
  onClick: (i) => i.stopPropagation(),
75
- children: N
77
+ children: C
76
78
  })
77
79
  })] }, l);
78
- }, Q = () => {
80
+ }, U = () => {
79
81
  if (o.length === 0) return /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", {
80
- colSpan: b,
82
+ colSpan: N,
81
83
  className: "data-view__empty",
82
- children: s ? /* @__PURE__ */ e(S, {
83
- title: s.title,
84
- description: s.description,
85
- icon: s.icon,
86
- primary: s.primary,
87
- secondary: s.secondary
88
- }) : /* @__PURE__ */ e(S, { title: "No data available" })
84
+ children: d ? /* @__PURE__ */ e(P, {
85
+ title: d.title,
86
+ description: d.description,
87
+ icon: d.icon,
88
+ primary: d.primary,
89
+ secondary: d.secondary
90
+ }) : /* @__PURE__ */ e(P, { title: k.noData })
89
91
  }) });
90
- if (u) {
92
+ if (g) {
91
93
  let a = 0;
92
- return u.map((t) => {
94
+ return g.map((t) => {
93
95
  const l = a;
94
96
  a += t.items.length;
95
- const h = _?.collapsible && q.has(t.key);
96
- return /* @__PURE__ */ n(P.Fragment, { children: [/* @__PURE__ */ e("tr", {
97
+ const h = _?.collapsible && H.has(t.key);
98
+ return /* @__PURE__ */ r($.Fragment, { children: [/* @__PURE__ */ e("tr", {
97
99
  className: `data-view__group-row${_?.collapsible ? " data-view__group-row--collapsible" : ""}`,
98
- "data-motion-key": ae(t.key),
99
- onClick: _?.collapsible ? () => H(t.key) : void 0,
100
- children: /* @__PURE__ */ n("td", {
101
- colSpan: b,
100
+ "data-motion-key": le(t.key),
101
+ onClick: _?.collapsible ? () => J(t.key) : void 0,
102
+ children: /* @__PURE__ */ r("td", {
103
+ colSpan: N,
102
104
  className: "data-view__group-cell",
103
105
  children: [
104
106
  /* @__PURE__ */ e("span", {
105
107
  className: "data-view__group-label",
106
108
  children: t.label
107
109
  }),
108
- J && /* @__PURE__ */ e("span", {
110
+ Q && /* @__PURE__ */ e("span", {
109
111
  className: "data-view__group-count",
110
- children: t.items.length === t.totalCount ? t.totalCount : `${t.items.length} of ${t.totalCount}`
112
+ children: t.items.length === t.totalCount ? t.totalCount : k.groupPartCount(t.items.length, t.totalCount)
111
113
  }),
112
- _?.collapsible && /* @__PURE__ */ e(C, {
114
+ _?.collapsible && /* @__PURE__ */ e(u, {
113
115
  className: "data-view__group-chevron",
114
116
  name: h ? "caret-down" : "caret-up",
115
117
  size: "sm"
116
118
  })
117
119
  ]
118
120
  })
119
- }), !h && t.items.map((k, f) => x(k, l + f))] }, t.key ?? "__null__");
121
+ }), !h && t.items.map((f, y) => x(f, l + y))] }, t.key ?? "__null__");
120
122
  });
121
123
  }
122
124
  return o.map((a, t) => x(a, t));
123
125
  };
124
- return /* @__PURE__ */ n("table", { children: [/* @__PURE__ */ n("thead", { children: [/* @__PURE__ */ n("tr", { children: [
126
+ return /* @__PURE__ */ r("table", { children: [/* @__PURE__ */ r("thead", { children: [/* @__PURE__ */ r("tr", { children: [
125
127
  p && /* @__PURE__ */ e("th", { className: "data-view__timeline-cell" }),
126
128
  m && /* @__PURE__ */ e("th", {
127
129
  className: "data-view__checkbox",
128
- children: /* @__PURE__ */ e($, {
129
- checked: F,
130
- indeterminate: R,
131
- onChange: B
130
+ children: /* @__PURE__ */ e(M, {
131
+ checked: R,
132
+ indeterminate: B,
133
+ onChange: E
132
134
  })
133
135
  }),
134
136
  w.map((a) => {
135
137
  const t = {};
136
- return d[a.key] && (t.width = d[a.key]), a.minWidth && (t.minWidth = a.minWidth), /* @__PURE__ */ n("th", {
138
+ return s[a.key] && (t.width = s[a.key]), a.minWidth && (t.minWidth = a.minWidth), /* @__PURE__ */ r("th", {
137
139
  style: Object.keys(t).length > 0 ? t : void 0,
138
140
  className: a.sortable ? "is-sortable" : "",
139
141
  onClick: () => z(a),
140
- children: [/* @__PURE__ */ n("span", {
142
+ children: [/* @__PURE__ */ r("span", {
141
143
  className: "data-view__th-content",
142
- children: [ie(a), a.sortable && /* @__PURE__ */ e(le, { state: M === a.key ? j : "unsorted" })]
144
+ children: [ne(a), a.sortable && /* @__PURE__ */ e(oe, { state: D === a.key ? j : "unsorted" })]
143
145
  }), /* @__PURE__ */ e("span", {
144
146
  className: "data-view__resizer",
145
147
  onMouseDown: (l) => K(l, a.key),
@@ -150,22 +152,22 @@ function we({ data: o, columns: w, rowKey: I, columnWidths: d, onResizeStart: K,
150
152
  c && /* @__PURE__ */ e("th", {
151
153
  className: "data-view__actions-header",
152
154
  style: v ? { width: v } : void 0,
153
- children: "Actions"
155
+ children: k.actions
154
156
  })
155
- ] }), A && /* @__PURE__ */ n("tr", {
157
+ ] }), T && /* @__PURE__ */ r("tr", {
156
158
  className: "data-view__filter-row",
157
159
  children: [
158
160
  p && /* @__PURE__ */ e("td", { className: "data-view__filter-cell data-view__filter-cell--spacer" }),
159
161
  m && /* @__PURE__ */ e("td", { className: "data-view__filter-cell data-view__filter-cell--spacer" }),
160
162
  w.map((a) => /* @__PURE__ */ e("td", {
161
163
  className: "data-view__filter-cell",
162
- style: d[a.key] ? { width: d[a.key] } : void 0,
164
+ style: s[a.key] ? { width: s[a.key] } : void 0,
163
165
  children: a.filter ?? null
164
166
  }, a.key)),
165
167
  c && /* @__PURE__ */ e("td", { className: "data-view__filter-cell data-view__filter-cell--spacer" })
166
168
  ]
167
- })] }), /* @__PURE__ */ e("tbody", { children: Q() })] });
169
+ })] }), /* @__PURE__ */ e("tbody", { children: U() })] });
168
170
  }
169
171
  export {
170
- we as TableView
172
+ fe as TableView
171
173
  };