@caspeco/casper-ui-library 9.7.0 → 9.9.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.
@@ -1,2 +1,3 @@
1
1
  export declare function arrayMove<T>(array: T[], fromIndex: number, toIndex: number): T[];
2
+ export declare function getColumnLabel(header: unknown, columnId: string): string;
2
3
  //# sourceMappingURL=helper.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../../../lib/components/table/helper.ts"],"names":[],"mappings":"AAAA,wBAAgB,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,CAAC,EAAE,CAShF"}
1
+ {"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../../../lib/components/table/helper.ts"],"names":[],"mappings":"AAAA,wBAAgB,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,CAAC,EAAE,CAShF;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAExE"}
@@ -1,7 +1,11 @@
1
- function c(r, n, t) {
2
- const e = [...r], [o] = e.splice(n, 1);
3
- return o !== void 0 && e.splice(t, 0, o), e;
1
+ function i(n, t, r) {
2
+ const o = [...n], [e] = o.splice(t, 1);
3
+ return e !== void 0 && o.splice(r, 0, e), o;
4
+ }
5
+ function c(n, t) {
6
+ return typeof n == "string" || typeof n == "number" ? String(n) : t;
4
7
  }
5
8
  export {
6
- c as arrayMove
9
+ i as arrayMove,
10
+ c as getColumnLabel
7
11
  };
@@ -28,6 +28,7 @@ interface TableProviderInterface<TData extends TableData> extends PropsWithChild
28
28
  sortingState?: SortingState;
29
29
  onSelectionChange?: (selectedRowIds: string[]) => void;
30
30
  initialSelectionState?: string[];
31
+ totalDataCount?: number;
31
32
  selectionState?: string[];
32
33
  selectionActions?: SelectionAction[];
33
34
  disableSelectionCheckbox?: (row: Row<TableRow<TData>>) => boolean;
@@ -66,6 +67,7 @@ export interface TableContextInterface<TData extends TableData = TableData> {
66
67
  getTableFilterMethods: () => TableFilterMethods | null;
67
68
  canSelectRows: boolean;
68
69
  setSelectedRowIds: React.Dispatch<React.SetStateAction<string[]>>;
70
+ totalDataCount?: number;
69
71
  selectedRowIds?: string[] | undefined;
70
72
  selectionActions?: SelectionAction[];
71
73
  disableSelectionCheckbox?: (row: Row<TableRow<TData>>) => boolean;
@@ -75,6 +77,6 @@ export interface TableContextInterface<TData extends TableData = TableData> {
75
77
  setColumnOrder: (columnOrder: ColumnOrderState) => void;
76
78
  handleDragEnd: (sourceId: string, targetId: string) => void;
77
79
  }
78
- export declare const TableProvider: <TData extends TableData>({ data, columns, children, expandedState, localeString, initialExpandedState, initialBreakingContentState, initialColumnVisibilityState, columnVisibilityState, onColumnVisibilityChange, onExpandedChange, getRowId, getRowActions, onBreakingContentChange, id, customRowIndication, onSortingChange, initialSortingState, sortingState, selectionState, initialSelectionState, onSelectionChange, selectionActions, disableSelectionCheckbox, enableColumnReorder, columnOrderState, initialColumnOrder, onColumnOrderChange, }: TableProviderInterface<TData>) => import("react/jsx-runtime").JSX.Element;
80
+ export declare const TableProvider: <TData extends TableData>({ data, totalDataCount, columns, children, expandedState, localeString, initialExpandedState, initialBreakingContentState, initialColumnVisibilityState, columnVisibilityState, onColumnVisibilityChange, onExpandedChange, getRowId, getRowActions, onBreakingContentChange, id, customRowIndication, onSortingChange, initialSortingState, sortingState, selectionState, initialSelectionState, onSelectionChange, selectionActions, disableSelectionCheckbox, enableColumnReorder, columnOrderState, initialColumnOrder, onColumnOrderChange, }: TableProviderInterface<TData>) => import("react/jsx-runtime").JSX.Element;
79
81
  export {};
80
82
  //# sourceMappingURL=table-context-provider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"table-context-provider.d.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,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5D;AAED,eAAO,MAAM,aAAa,GAAI,KAAK,SAAS,SAAS,EAAE,ogBA6BpD,sBAAsB,CAAC,KAAK,CAAC,4CAoN/B,CAAC"}
1
+ {"version":3,"file":"table-context-provider.d.ts","sourceRoot":"","sources":["../../../lib/components/table/table-context-provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,EACN,KAAK,SAAS,EACd,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAKlB,KAAK,GAAG,EACR,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,KAAK,EAGV,KAAK,eAAe,EACpB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,KAAK,iBAAiB,EAAoC,MAAM,OAAO,CAAC;AAGjF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEpE,MAAM,WAAW,kBAAkB;IAClC,wBAAwB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACrD,iBAAiB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;CACjD;AAED,UAAU,sBAAsB,CAAC,KAAK,SAAS,SAAS,CAAE,SAAQ,iBAAiB;IAClF,IAAI,EAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;IACxB,OAAO,EAAE,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;IACtC,YAAY,EAAE,OAAO,CAAC;IACtB,2BAA2B,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtD,4BAA4B,CAAC,EAAE,eAAe,CAAC;IAC/C,qBAAqB,CAAC,EAAE,eAAe,CAAC;IACxC,w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,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,KAAK,OAAO,CAAC;IAClE,mBAAmB,EAAE,MAAM,MAAM,EAAE,CAAC;IACpC,mBAAmB,EAAE,OAAO,CAAC;IAC7B,WAAW,EAAE,gBAAgB,CAAC;IAC9B,cAAc,EAAE,CAAC,WAAW,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACxD,aAAa,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5D;AAED,eAAO,MAAM,aAAa,GAAI,KAAK,SAAS,SAAS,EAAE,ohBA8BpD,sBAAsB,CAAC,KAAK,CAAC,4CAqN/B,CAAC"}
@@ -1,101 +1,102 @@
1
- import { jsx as ce } from "react/jsx-runtime";
1
+ import { jsx as me } from "react/jsx-runtime";
2
2
  import { useControllableState as d } from "@chakra-ui/react";
3
- import { useReactTable as me } from "../../node_modules/@tanstack/react-table/build/lib/index.js";
4
- import { useState as b, useCallback as n, useEffect as Ce } from "react";
3
+ import { useReactTable as Ce } from "../../node_modules/@tanstack/react-table/build/lib/index.js";
4
+ import { useState as b, useCallback as n, useEffect as be } from "react";
5
5
  import { arrayMove as L } from "./helper.js";
6
- import { TableContext as be } from "./table-context.js";
7
- import { getFilteredRowModel as we, getSortedRowModel as he, getExpandedRowModel as Re, getCoreRowModel as ve } from "../../node_modules/@tanstack/table-core/build/lib/index.js";
8
- const Ee = ({
6
+ import { TableContext as we } from "./table-context.js";
7
+ import { getFilteredRowModel as he, getSortedRowModel as Re, getExpandedRowModel as ve, getCoreRowModel as Me } from "../../node_modules/@tanstack/table-core/build/lib/index.js";
8
+ const Fe = ({
9
9
  data: w,
10
+ totalDataCount: k,
10
11
  columns: h,
11
- children: k,
12
- expandedState: q,
13
- localeString: z,
12
+ children: q,
13
+ expandedState: z,
14
+ localeString: A,
14
15
  initialExpandedState: R = {},
15
16
  initialBreakingContentState: v = {},
16
- initialColumnVisibilityState: A = {},
17
- columnVisibilityState: B,
18
- onColumnVisibilityChange: G,
17
+ initialColumnVisibilityState: B = {},
18
+ columnVisibilityState: G,
19
+ onColumnVisibilityChange: I,
19
20
  onExpandedChange: M,
20
21
  getRowId: S,
21
- getRowActions: I,
22
- onBreakingContentChange: J,
23
- id: K,
22
+ getRowActions: J,
23
+ onBreakingContentChange: K,
24
+ id: N,
24
25
  customRowIndication: g,
25
26
  onSortingChange: p,
26
- initialSortingState: N = [],
27
+ initialSortingState: Q = [],
27
28
  sortingState: x,
28
- selectionState: Q,
29
- initialSelectionState: U = [],
29
+ selectionState: U,
30
+ initialSelectionState: W = [],
30
31
  onSelectionChange: y,
31
32
  selectionActions: P,
32
33
  disableSelectionCheckbox: u,
33
34
  enableColumnReorder: V = !1,
34
- columnOrderState: W,
35
+ columnOrderState: X,
35
36
  initialColumnOrder: E,
36
- onColumnOrderChange: X
37
+ onColumnOrderChange: Y
37
38
  }) => {
38
39
  const [r, c] = d({
39
- value: q,
40
+ value: z,
40
41
  onChange: M,
41
42
  defaultValue: R
42
43
  }), [a, F] = d({
43
- value: B,
44
- onChange: G,
45
- defaultValue: A
44
+ value: G,
45
+ onChange: I,
46
+ defaultValue: B
46
47
  }), [T, O] = d({
47
48
  value: x,
48
49
  onChange: p,
49
- defaultValue: N
50
- }), [Y, Z] = d({
51
- value: Q,
50
+ defaultValue: Q
51
+ }), [Z, _] = d({
52
+ value: U,
52
53
  onChange: y,
53
- defaultValue: U
54
+ defaultValue: W
54
55
  }), [f, s] = d({
55
- value: W,
56
- onChange: X,
56
+ value: X,
57
+ onChange: Y,
57
58
  defaultValue: E?.length ? E : h.map((e) => e.id).filter((e) => e !== void 0)
58
- }), [_, $] = b(
59
+ }), [$, ee] = b(
59
60
  v || {}
60
- ), [H, m] = b({}), [j, D] = b(null), ee = n((e) => (D(e), () => {
61
+ ), [H, m] = b({}), [j, D] = b(null), te = n((e) => (D(e), () => {
61
62
  D(null);
62
- }), []), te = n(() => j, [j]);
63
- Ce(() => {
63
+ }), []), oe = n(() => j, [j]);
64
+ be(() => {
64
65
  g && m(g);
65
66
  }, [g, m]);
66
- const oe = n(
67
+ const ne = n(
67
68
  (e) => {
68
69
  let t;
69
70
  typeof e == "function" ? t = e(a) : t = e, F(t);
70
71
  },
71
72
  [a, F]
72
- ), ne = n(
73
+ ), le = n(
73
74
  (e) => {
74
75
  let t;
75
76
  typeof e == "function" ? t = e(r) : t = e, c(t);
76
77
  },
77
78
  [r, c]
78
- ), le = n(
79
+ ), ie = n(
79
80
  (e) => {
80
81
  O(e);
81
82
  },
82
83
  [O]
83
- ), ie = n(
84
+ ), se = n(
84
85
  (e) => {
85
86
  const t = typeof e == "function" ? e(f) : e;
86
87
  s(t);
87
88
  },
88
89
  [f, s]
89
- ), o = me({
90
+ ), o = Ce({
90
91
  columns: h,
91
92
  data: w,
92
- getCoreRowModel: ve(),
93
- getExpandedRowModel: Re(),
94
- getSortedRowModel: he(),
95
- getFilteredRowModel: we(),
96
- onColumnVisibilityChange: oe,
97
- onExpandedChange: ne,
98
- onColumnOrderChange: ie,
93
+ getCoreRowModel: Me(),
94
+ getExpandedRowModel: ve(),
95
+ getSortedRowModel: Re(),
96
+ getFilteredRowModel: he(),
97
+ onColumnVisibilityChange: ne,
98
+ onExpandedChange: le,
99
+ onColumnOrderChange: se,
99
100
  getSubRows: (e) => e.subRows,
100
101
  getRowId: S,
101
102
  enableSubRowSelection: !0,
@@ -109,63 +110,64 @@ const Ee = ({
109
110
  columnOrder: V ? f : void 0
110
111
  },
111
112
  manualSorting: x !== void 0
112
- }), se = n(
113
+ }), de = n(
113
114
  (e, t) => {
114
115
  if (e === t) return;
115
- const ae = o.getColumn(e).getIsPinned(), fe = o.getColumn(t).getIsPinned();
116
- if (ae === "left" || fe === "left") {
117
- const i = o.getAllLeafColumns().filter((l) => l.getIsVisible()), C = i.map((l) => l.id), ge = L(
116
+ const fe = o.getColumn(e).getIsPinned(), ge = o.getColumn(t).getIsPinned();
117
+ if (fe === "left" || ge === "left") {
118
+ const i = o.getAllLeafColumns().filter((l) => l.getIsVisible()), C = i.map((l) => l.id), ue = L(
118
119
  C,
119
120
  C.indexOf(e),
120
121
  C.indexOf(t)
121
- ), ue = i.filter((l) => l.getIsPinned() === "left").length;
122
+ ), ce = i.filter((l) => l.getIsPinned() === "left").length;
122
123
  o.setColumnPinning((l) => ({
123
124
  ...l,
124
- left: ge.slice(0, ue)
125
+ left: ue.slice(0, ce)
125
126
  }));
126
127
  }
127
128
  s((i) => L(i, i.indexOf(e), i.indexOf(t)));
128
129
  },
129
130
  [s, o]
130
- ), de = n(() => o.getRowModel().flatRows.filter((e) => !u?.(e)).map((e) => e.id), [u, o]), re = {
131
+ ), re = n(() => o.getRowModel().flatRows.filter((e) => !u?.(e)).map((e) => e.id), [u, o]), ae = {
131
132
  data: w,
133
+ totalDataCount: k,
132
134
  table: o,
133
135
  initialExpandedState: R,
134
136
  initialBreakingContentState: v,
135
- localeString: z,
137
+ localeString: A,
136
138
  onExpandedChange: M,
137
139
  expanded: r,
138
140
  sorting: T,
139
- setSorting: le,
141
+ setSorting: ie,
140
142
  setExpanded: c,
141
143
  getRowId: S,
142
- getRowActions: I,
143
- breakingContentState: _,
144
- setBreakingContentState: $,
145
- onBreakingContentChange: J,
146
- id: K,
144
+ getRowActions: J,
145
+ breakingContentState: $,
146
+ setBreakingContentState: ee,
147
+ onBreakingContentChange: K,
148
+ id: N,
147
149
  setRowHighlight: m,
148
150
  rowHighlight: H,
149
151
  columnVisibility: a,
150
152
  onSortingChange: p,
151
- registerTableFilter: ee,
152
- getTableFilterMethods: te,
153
+ registerTableFilter: te,
154
+ getTableFilterMethods: oe,
153
155
  canSelectRows: y !== void 0 || P !== void 0,
154
- setSelectedRowIds: Z,
155
- selectedRowIds: Y,
156
+ setSelectedRowIds: _,
157
+ selectedRowIds: Z,
156
158
  selectionActions: P,
157
159
  disableSelectionCheckbox: u,
158
- getSelectableRowIds: de,
160
+ getSelectableRowIds: re,
159
161
  enableColumnReorder: V,
160
162
  columnOrder: f,
161
163
  setColumnOrder: s,
162
- handleDragEnd: se
164
+ handleDragEnd: de
163
165
  };
164
166
  return (
165
167
  // This is correct but there's no easy way to type the context statically with generics
166
- /* @__PURE__ */ ce(be.Provider, { value: re, children: k })
168
+ /* @__PURE__ */ me(we.Provider, { value: ae, children: q })
167
169
  );
168
170
  };
169
171
  export {
170
- Ee as TableProvider
172
+ Fe as TableProvider
171
173
  };
@@ -1 +1 @@
1
- {"version":3,"file":"table-header-row.d.ts","sourceRoot":"","sources":["../../../lib/components/table/table-header-row.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAwC,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAK/F,OAAO,KAAK,EAAmB,SAAS,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEpE,KAAK,mBAAmB,CAAC,KAAK,SAAS,SAAS,IAAI;IACnD,WAAW,EAAE,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;IAC1C,uBAAuB,EAAE,OAAO,GAAG,SAAS,CAAC;CAC7C,CAAC;AAEF,QAAA,MAAM,uBAAuB,GAAI,KAAK,SAAS,SAAS,EAAE,+DAIvD,mBAAmB,CAAC,KAAK,CAAC,GAAG;IAAE,kBAAkB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;CAAE,4CAiD3F,CAAC;AA6OF,eAAO,MAAM,cAAc,EAAoC,OAAO,uBAAuB,CAAC"}
1
+ {"version":3,"file":"table-header-row.d.ts","sourceRoot":"","sources":["../../../lib/components/table/table-header-row.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAwC,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAK/F,OAAO,KAAK,EAAmB,SAAS,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEpE,KAAK,mBAAmB,CAAC,KAAK,SAAS,SAAS,IAAI;IACnD,WAAW,EAAE,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;IAC1C,uBAAuB,EAAE,OAAO,GAAG,SAAS,CAAC;CAC7C,CAAC;AAEF,QAAA,MAAM,uBAAuB,GAAI,KAAK,SAAS,SAAS,EAAE,+DAIvD,mBAAmB,CAAC,KAAK,CAAC,GAAG;IAAE,kBAAkB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;CAAE,4CAiD3F,CAAC;AAsPF,eAAO,MAAM,cAAc,EAAoC,OAAO,uBAAuB,CAAC"}
@@ -1,33 +1,33 @@
1
- import { jsx as e, Fragment as f, jsxs as w } from "react/jsx-runtime";
2
- import { Table as C, Box as g, useMediaQuery as A, Portal as T } from "@chakra-ui/react";
3
- import { closestCenter as D } from "../../node_modules/@dnd-kit/collision/dist/index.js";
4
- import { SortableKeyboardPlugin as z } from "../../node_modules/@dnd-kit/dom/sortable.js";
5
- import { useSortable as H } from "../../node_modules/@dnd-kit/react/sortable.js";
6
- import { flexRender as P } from "../../node_modules/@tanstack/react-table/build/lib/index.js";
7
- import { memo as V, useCallback as k, useMemo as F } from "react";
8
- import { useTableContext as u } from "./table-context.js";
9
- import { TableHeaderDropdown as L } from "./table-header-dropdown.js";
10
- import { translations as B } from "./translations.js";
11
- import { Flex as I } from "../flex/flex.js";
12
- import { Divider as O } from "../divider/divider.js";
1
+ import { jsx as e, Fragment as S, jsxs as w } from "react/jsx-runtime";
2
+ import { Table as I, Box as u, useMediaQuery as A, Portal as D } from "@chakra-ui/react";
3
+ import { closestCenter as z } from "../../node_modules/@dnd-kit/collision/dist/index.js";
4
+ import { SortableKeyboardPlugin as H } from "../../node_modules/@dnd-kit/dom/sortable.js";
5
+ import { useSortable as P } from "../../node_modules/@dnd-kit/react/sortable.js";
6
+ import { flexRender as V } from "../../node_modules/@tanstack/react-table/build/lib/index.js";
7
+ import { memo as F, useCallback as R, useMemo as L } from "react";
8
+ import { useTableContext as p } from "./table-context.js";
9
+ import { TableHeaderDropdown as O } from "./table-header-dropdown.js";
10
+ import { interpolate as C, translations as v } from "./translations.js";
11
+ import { Flex as k } from "../flex/flex.js";
12
+ import { Divider as W } from "../divider/divider.js";
13
13
  import { Menu as j } from "../menu/menu.js";
14
14
  import { MenuButton as N } from "../menu/menu-button.js";
15
- import { MenuList as W } from "../menu/menu-list.js";
16
- import { Checkbox as $ } from "../checkbox/checkbox.js";
17
- import { MenuItem as E } from "../menu/menu-item.js";
18
- import { IconButton as K } from "../icon-button/icon-button.js";
19
- import { DeleteIcon as Q } from "../icon/icons/delete-icon.js";
20
- import { Button as U } from "../button/button.js";
21
- import { ThemeColorVariable as m, ThemeSpaceVariable as h, ThemeFontSizeVariable as q, ThemeFontVariable as G } from "../../theme/theme-types.js";
22
- import { TreeViewCollapseIcon as J } from "../icon/icons/tree-view-collapse-icon.js";
23
- const X = ({
15
+ import { MenuList as $ } from "../menu/menu-list.js";
16
+ import { Checkbox as E } from "../checkbox/checkbox.js";
17
+ import { MenuItem as K } from "../menu/menu-item.js";
18
+ import { IconButton as Q } from "../icon-button/icon-button.js";
19
+ import { DeleteIcon as U } from "../icon/icons/delete-icon.js";
20
+ import { Button as q } from "../button/button.js";
21
+ import { ThemeColorVariable as g, ThemeSpaceVariable as f, ThemeFontSizeVariable as G, ThemeFontVariable as J } from "../../theme/theme-types.js";
22
+ import { TreeViewCollapseIcon as X } from "../icon/icons/tree-view-collapse-icon.js";
23
+ const Y = ({
24
24
  headerGroup: t,
25
- hideTableHeaderDropdown: r,
25
+ hideTableHeaderDropdown: n,
26
26
  portalContainerRef: s
27
27
  }) => {
28
- const l = u(), a = !!l.getRowActions, i = (l.selectedRowIds?.length ?? 0) > 0 && (l.selectionActions?.length ?? 0) > 0;
29
- return /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(C.Row, { children: i ? /* @__PURE__ */ e(
30
- C.ColumnHeader,
28
+ const a = p(), l = !!a.getRowActions, i = (a.selectedRowIds?.length ?? 0) > 0 && (a.selectionActions?.length ?? 0) > 0;
29
+ return /* @__PURE__ */ e(S, { children: /* @__PURE__ */ e(I.Row, { children: i ? /* @__PURE__ */ e(
30
+ I.ColumnHeader,
31
31
  {
32
32
  colSpan: t.headers.length,
33
33
  cursor: "default",
@@ -36,74 +36,74 @@ const X = ({
36
36
  backgroundColor: "transparent !important"
37
37
  },
38
38
  "& div span": {
39
- color: m.OnBackground
39
+ color: g.OnBackground
40
40
  },
41
- borderBottom: `1px solid ${m.OnBackgroundBorder}`,
42
- paddingLeft: a ? "24px" : void 0
41
+ borderBottom: `1px solid ${g.OnBackgroundBorder}`,
42
+ paddingLeft: l ? "24px" : void 0
43
43
  },
44
44
  scope: "col",
45
45
  zIndex: 1,
46
- children: /* @__PURE__ */ e(v, { showSelectAll: !0, children: /* @__PURE__ */ e(_, {}) })
46
+ children: /* @__PURE__ */ e(M, { showSelectAll: !0, children: /* @__PURE__ */ e(ee, {}) })
47
47
  }
48
- ) : /* @__PURE__ */ e(f, { children: t.headers.map((o, n) => /* @__PURE__ */ e(
49
- Y,
48
+ ) : /* @__PURE__ */ e(S, { children: t.headers.map((o, r) => /* @__PURE__ */ e(
49
+ Z,
50
50
  {
51
51
  header: o,
52
- hideTableHeaderDropdown: r,
53
- applyActionMenuPadding: a,
52
+ hideTableHeaderDropdown: n,
53
+ applyActionMenuPadding: l,
54
54
  portalContainerRef: s,
55
- isFirstColumn: !o.isPlaceholder && n === 0,
56
- enableColumnReorder: l.enableColumnReorder
55
+ isFirstColumn: !o.isPlaceholder && r === 0,
56
+ enableColumnReorder: a.enableColumnReorder
57
57
  },
58
58
  o.id
59
59
  )) }) }, t.id) });
60
- }, Y = ({
60
+ }, Z = ({
61
61
  header: t,
62
- hideTableHeaderDropdown: r,
62
+ hideTableHeaderDropdown: n,
63
63
  applyActionMenuPadding: s,
64
- portalContainerRef: l,
65
- isFirstColumn: a = !1,
64
+ portalContainerRef: a,
65
+ isFirstColumn: l = !1,
66
66
  enableColumnReorder: i = !1
67
67
  }) => {
68
- const o = u(), { column: n } = t, c = i && !n.columnDef.meta?.disableColumnReorder, {
69
- ref: S,
70
- isDragging: d,
71
- isDropTarget: M
72
- } = H({
73
- id: n.id,
74
- index: n.getIndex(),
68
+ const o = p(), { column: r } = t, c = i && !r.columnDef.meta?.disableColumnReorder, {
69
+ ref: d,
70
+ isDragging: m,
71
+ isDropTarget: T
72
+ } = P({
73
+ id: r.id,
74
+ index: r.getIndex(),
75
75
  disabled: !c,
76
- collisionDetector: D,
77
- plugins: [z]
78
- }), y = k((b) => {
79
- const p = b.getIsPinned(), R = b.getSize();
76
+ collisionDetector: z,
77
+ plugins: [H]
78
+ }), y = R((b) => {
79
+ const h = b.getIsPinned(), x = b.getSize();
80
80
  return {
81
- position: p ? "sticky" : "relative",
82
- left: p ? `${b.getStart("left")}px` : void 0,
83
- backgroundColor: p ? m.Background : void 0,
84
- zIndex: p ? 1 : 0,
85
- width: R,
86
- maxWidth: R
81
+ position: h ? "sticky" : "relative",
82
+ left: h ? `${b.getStart("left")}px` : void 0,
83
+ backgroundColor: h ? g.Background : void 0,
84
+ zIndex: h ? 1 : 0,
85
+ width: x,
86
+ maxWidth: x
87
87
  };
88
88
  }, []);
89
89
  return /* @__PURE__ */ e(
90
- C.ColumnHeader,
90
+ I.ColumnHeader,
91
91
  {
92
92
  className: "tableHeaderCell",
93
- textAlign: n.columnDef.meta?.isNumeric ? "end" : "start",
94
- zIndex: n.getIsPinned() ? 2 : 1,
95
- cursor: i ? d ? "grabbing" : "pointer" : void 0,
96
- opacity: d ? 0.5 : 1,
97
- backgroundColor: M || d ? m.Background : void 0,
93
+ textAlign: r.columnDef.meta?.isNumeric ? "end" : "start",
94
+ zIndex: r.getIsPinned() ? 2 : 1,
95
+ cursor: i ? m ? "grabbing" : "pointer" : void 0,
96
+ opacity: m ? 0.5 : 1,
97
+ backgroundColor: T || m ? g.Background : void 0,
98
98
  scope: "col",
99
99
  style: {
100
- ...y(n),
101
- borderBottom: `1px solid ${m.OnBackgroundBorder}`,
102
- paddingLeft: a && s ? "24px" : void 0,
100
+ ...y(r),
101
+ borderBottom: `1px solid ${g.OnBackgroundBorder}`,
102
+ paddingLeft: l && s ? "24px" : void 0,
103
103
  ...c ? { userSelect: "none", WebkitUserSelect: "none" } : {}
104
104
  },
105
- children: /* @__PURE__ */ e(v, { showSelectAll: o.canSelectRows && a, children: /* @__PURE__ */ e(f, { children: r ? /* @__PURE__ */ e(g, { paddingLeft: h.Small, children: P(t.column.columnDef.header, t.getContext()) }) : /* @__PURE__ */ e(
106
- L,
105
+ children: /* @__PURE__ */ e(M, { showSelectAll: o.canSelectRows && l, children: /* @__PURE__ */ e(S, { children: n ? /* @__PURE__ */ e(u, { paddingLeft: f.Small, children: V(t.column.columnDef.header, t.getContext()) }) : /* @__PURE__ */ e(
106
+ O,
107
107
  {
108
108
  header: t,
109
109
  breakingContentState: o.breakingContentState,
@@ -114,73 +114,80 @@ const X = ({
114
114
  setSorting: o.setSorting,
115
115
  sorting: o.sorting,
116
116
  onBreakingContentChange: o.onBreakingContentChange,
117
- portalContainerRef: l,
118
- dragRef: c ? S : void 0
117
+ portalContainerRef: a,
118
+ dragRef: c ? d : void 0
119
119
  }
120
120
  ) }) })
121
121
  }
122
122
  );
123
- }, v = ({ showSelectAll: t, children: r }) => t ? /* @__PURE__ */ w(I, { w: "100%", align: "center", children: [
124
- /* @__PURE__ */ e(g, { justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ e(Z, {}) }),
125
- r
126
- ] }) : /* @__PURE__ */ e(f, { children: r }), Z = () => {
127
- const t = u(), r = k(
128
- ({ checked: a }) => {
129
- const i = typeof a == "boolean" ? a : !1, o = t.getSelectableRowIds();
130
- i ? t.setSelectedRowIds((n) => [.../* @__PURE__ */ new Set([...n, ...o])]) : t.setSelectedRowIds((n) => n.filter((c) => !o.includes(c)));
123
+ }, M = ({ showSelectAll: t, children: n }) => t ? /* @__PURE__ */ w(k, { w: "100%", align: "center", children: [
124
+ /* @__PURE__ */ e(u, { justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ e(_, {}) }),
125
+ n
126
+ ] }) : /* @__PURE__ */ e(S, { children: n }), _ = () => {
127
+ const t = p(), n = R(
128
+ ({ checked: l }) => {
129
+ const i = typeof l == "boolean" ? l : !1, o = t.getSelectableRowIds();
130
+ i ? t.setSelectedRowIds((r) => [.../* @__PURE__ */ new Set([...r, ...o])]) : t.setSelectedRowIds((r) => r.filter((c) => !o.includes(c)));
131
131
  },
132
132
  [t]
133
- ), { allIsSelected: s, shouldShowIndeterminateState: l } = F(() => {
134
- const i = t.table.getRowModel().flatRows, o = new Set(t.selectedRowIds), n = t.getSelectableRowIds(), c = n.length > 0 && n.every((d) => o.has(d)), S = i.some((d) => o.has(d.id));
133
+ ), { allIsSelected: s, shouldShowIndeterminateState: a } = L(() => {
134
+ const i = t.table.getRowModel().flatRows, o = new Set(t.selectedRowIds), r = t.getSelectableRowIds(), c = r.length > 0 && r.every((m) => o.has(m)), d = i.some((m) => o.has(m.id));
135
135
  return {
136
136
  allIsSelected: c,
137
- shouldShowIndeterminateState: S && !c
137
+ shouldShowIndeterminateState: d && !c
138
138
  };
139
139
  }, [t]);
140
140
  return /* @__PURE__ */ e(
141
- $,
141
+ E,
142
142
  {
143
143
  isChecked: s,
144
- isIndeterminate: l,
145
- onCheckedChange: r
144
+ isIndeterminate: a,
145
+ onCheckedChange: n
146
146
  }
147
147
  );
148
- }, _ = () => {
149
- const { localeString: t, selectedRowIds: r = [], selectionActions: s = [] } = u(), l = B[t], [a] = A(["(min-width: 48em)"]), i = s.length > 3 || !a, o = r.length === 1 ? l.selectedSingular.replace("{count}", "1") : l.selected.replace("{count}", r.length.toString());
150
- return /* @__PURE__ */ w(I, { gap: h.Medium, align: "center", alignContent: "center", children: [
148
+ }, ee = () => {
149
+ const { localeString: t, selectedRowIds: n = [], selectionActions: s = [], totalDataCount: a } = p(), l = v[t], [i] = A(["(min-width: 48em)"]), o = s.length > 3 || !i, r = n.length, c = a ? C(l.selectedWithTotal, {
150
+ count: r,
151
+ total: a
152
+ }) : n.length === 1 ? C(l.selectedSingular, {
153
+ count: 1
154
+ }) : C(l.selected, {
155
+ count: r
156
+ });
157
+ return /* @__PURE__ */ w(k, { gap: f.Medium, align: "center", alignContent: "center", children: [
151
158
  /* @__PURE__ */ e(
152
- g,
159
+ u,
153
160
  {
154
- pl: h.Small,
155
- color: m.OnBackground,
156
- fontFamily: G.Body,
157
- fontSize: q.Medium,
161
+ pl: f.Small,
162
+ color: g.OnBackground,
163
+ fontFamily: J.Body,
164
+ fontSize: G.Medium,
158
165
  whiteSpace: "nowrap",
159
166
  css: { fontVariantNumeric: "normal" },
160
- children: o
167
+ children: c
161
168
  }
162
169
  ),
163
- /* @__PURE__ */ e(g, { children: /* @__PURE__ */ e(O, { orientation: "vertical", height: "20px" }) }),
164
- /* @__PURE__ */ e(I, { gap: h.Small, align: "center", children: i ? /* @__PURE__ */ w(j, { children: [
165
- /* @__PURE__ */ e(N, { variant: "ghost", rightIcon: J, size: "sm", children: l.action }),
166
- /* @__PURE__ */ e(T, { children: /* @__PURE__ */ e(W, { children: s.map((n) => /* @__PURE__ */ e(x, { isMenuItem: !0, action: n }, n.name)) }) })
167
- ] }) : s.map((n) => /* @__PURE__ */ e(x, { isMenuItem: !1, action: n }, n.name)) })
170
+ /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e(W, { orientation: "vertical", height: "20px" }) }),
171
+ /* @__PURE__ */ e(k, { gap: f.Small, align: "center", children: o ? /* @__PURE__ */ w(j, { children: [
172
+ /* @__PURE__ */ e(N, { variant: "ghost", rightIcon: X, size: "sm", children: l.action }),
173
+ /* @__PURE__ */ e(D, { children: /* @__PURE__ */ e($, { children: s.map((d) => /* @__PURE__ */ e(B, { isMenuItem: !0, action: d }, d.name)) }) })
174
+ ] }) : s.map((d) => /* @__PURE__ */ e(B, { isMenuItem: !1, action: d }, d.name)) })
168
175
  ] });
169
- }, x = ({ isMenuItem: t, action: r }) => {
170
- const { selectedRowIds: s, localeString: l } = u(), a = B[l], i = k(() => {
171
- r.onClick(s || []);
172
- }, [r, s]);
173
- return t ? /* @__PURE__ */ e(E, { onClick: i, value: r.name, children: r.variant === "delete" ? /* @__PURE__ */ e(g, { as: "span", color: m.Error, children: r.name }) : r.name }) : r.variant === "delete" ? /* @__PURE__ */ e(
174
- K,
176
+ }, B = ({ isMenuItem: t, action: n }) => {
177
+ const { selectedRowIds: s, localeString: a } = p(), l = v[a], i = R(() => {
178
+ n.onClick(s || []);
179
+ }, [n, s]);
180
+ return t ? /* @__PURE__ */ e(K, { onClick: i, value: n.name, children: n.variant === "delete" ? /* @__PURE__ */ e(u, { as: "span", color: g.Error, children: n.name }) : n.name }) : n.variant === "delete" ? /* @__PURE__ */ e(
181
+ Q,
175
182
  {
176
183
  onClick: i,
177
- icon: Q,
178
- "aria-label": a.deleteSelectedRows,
184
+ icon: U,
185
+ "aria-label": l.deleteSelectedRows,
179
186
  size: "sm",
180
187
  variant: "ghost"
181
188
  }
182
- ) : /* @__PURE__ */ e(U, { onClick: i, size: "sm", variant: "ghost", children: r.name });
183
- }, ke = V(X);
189
+ ) : /* @__PURE__ */ e(q, { onClick: i, size: "sm", variant: "ghost", children: n.name });
190
+ }, Re = F(Y);
184
191
  export {
185
- ke as TableHeaderRow
192
+ Re as TableHeaderRow
186
193
  };
@@ -1 +1 @@
1
- {"version":3,"file":"table-toolbar-settings.d.ts","sourceRoot":"","sources":["../../../lib/components/table/table-toolbar-settings.tsx"],"names":[],"mappings":"AAaA,KAAK,yBAAyB,GAAG;IAChC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;CACjD,CAAC;AAiGF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,uEApGkC,yBAAyB,6CAoGzB,CAAC"}
1
+ {"version":3,"file":"table-toolbar-settings.d.ts","sourceRoot":"","sources":["../../../lib/components/table/table-toolbar-settings.tsx"],"names":[],"mappings":"AAqBA,KAAK,yBAAyB,GAAG;IAChC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;CACjD,CAAC;AA6OF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,uEAxNkC,yBAAyB,6CAwNzB,CAAC"}