@ck-ui/component-library 1.0.6 → 1.0.8
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/dist/DropdownFooter-B1d0HFxd.js +96 -0
- package/dist/assets/{DropdownFooter-tfY7sg47.css → DropdownFooter-CRxQRvLY.css} +1 -1
- package/dist/assets/{index-BpRKr5z7.css → index-31u7i502.css} +1 -1
- package/dist/assets/index-C8gvpfKZ.css +1 -0
- package/dist/assets/index-D5sFw3XA.css +1 -0
- package/dist/assets/styles-C9rG0Alp.css +1 -0
- package/dist/assets/styles-DAqMiQ0N.css +1 -0
- package/dist/components/FusionChart/_config/builders.d.ts.map +1 -1
- package/dist/components/FusionChart/_config/builders.js +172 -145
- package/dist/components/FusionChart/_config/events.d.ts.map +1 -1
- package/dist/components/FusionChart/_config/events.js +44 -30
- package/dist/components/FusionChart/_config/helpers.d.ts +10 -0
- package/dist/components/FusionChart/_config/helpers.d.ts.map +1 -1
- package/dist/components/FusionChart/_config/helpers.js +6 -3
- package/dist/components/FusionChart/_helpers/doughnutHelper.d.ts.map +1 -1
- package/dist/components/FusionChart/_helpers/doughnutHelper.js +63 -53
- package/dist/components/FusionChart/index.js +34 -34
- package/dist/components/IconButton/index.js +20 -20
- package/dist/components/MultiSelect/SimpleMultiSelect.d.ts.map +1 -1
- package/dist/components/MultiSelect/SimpleMultiSelect.js +30 -30
- package/dist/components/MultiSelect/_helpers/DropdownFooter.js +1 -1
- package/dist/components/MultiSelect/_helpers/OptionRow.js +1 -1
- package/dist/components/MultiSelect/_helpers/OverflowMenu.d.ts.map +1 -1
- package/dist/components/MultiSelect/_helpers/OverflowMenu.js +5 -33
- package/dist/components/MultiSelect/_helpers/OverflowMenuItem.js +1 -1
- package/dist/components/MultiSelect/_helpers/SearchResult.js +1 -1
- package/dist/components/MultiSelect/_helpers/TagContent.js +1 -1
- package/dist/components/MultiSelect/_helpers/TriggerButton.d.ts +1 -1
- package/dist/components/MultiSelect/_helpers/TriggerButton.d.ts.map +1 -1
- package/dist/components/MultiSelect/_helpers/TriggerButton.js +99 -73
- package/dist/components/MultiSelect/index.d.ts.map +1 -1
- package/dist/components/MultiSelect/index.js +27 -27
- package/dist/components/Pagination/index.d.ts.map +1 -1
- package/dist/components/Pagination/index.js +101 -92
- package/dist/components/SingleSelectDropdown/_helpers/DropdownFooter.js +2 -2
- package/dist/components/SingleSelectDropdown/index.js +2 -2
- package/dist/components/Table/_hooks/useOverlayScrollbar.d.ts +7 -0
- package/dist/components/Table/_hooks/useOverlayScrollbar.d.ts.map +1 -0
- package/dist/components/Table/_hooks/useOverlayScrollbar.js +90 -0
- package/dist/components/Table/_utils/table.utils.d.ts.map +1 -1
- package/dist/components/Table/_utils/table.utils.js +32 -37
- package/dist/components/Table/index.d.ts.map +1 -1
- package/dist/components/Table/index.js +290 -273
- package/dist/styles.module-DSbSTQeV.js +56 -0
- package/package.json +1 -1
- package/dist/DropdownFooter-B63OOZOS.js +0 -96
- package/dist/assets/index-DyCyrZSK.css +0 -1
- package/dist/assets/index-nXJu3Pq0.css +0 -1
- package/dist/assets/styles-DngCqCGW.css +0 -1
- package/dist/assets/styles-infyYXuZ.css +0 -1
- package/dist/styles.module-DlIBNC4w.js +0 -55
|
@@ -1,130 +1,141 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { u as
|
|
5
|
-
import { u as
|
|
6
|
-
import { CKButton as
|
|
7
|
-
import { Search as
|
|
8
|
-
import { EmptyState as
|
|
9
|
-
import { Loader as
|
|
10
|
-
import { S as
|
|
11
|
-
import { INITIAL_COLUMN_MANAGER_CONFIG as
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import { SelectionHeaderCell as
|
|
16
|
-
import
|
|
17
|
-
import { useSelection as
|
|
18
|
-
import { useExpansion as
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import
|
|
22
|
-
|
|
1
|
+
import { jsx as i, jsxs as g } from "react/jsx-runtime";
|
|
2
|
+
import * as r from "react";
|
|
3
|
+
import { useState as x, useEffect as w, useCallback as I, useRef as ke, useMemo as R } from "react";
|
|
4
|
+
import { u as qe } from "../../OptionList-BM4AleXV.js";
|
|
5
|
+
import { u as Ue, f as Ze, g as Qe, a as Xe, b as Ye } from "../../index-Bcvmezbu.js";
|
|
6
|
+
import { CKButton as Ce } from "../CKButton/index.js";
|
|
7
|
+
import { Search as et } from "../Search/index.js";
|
|
8
|
+
import { EmptyState as tt } from "../EmptyState/index.js";
|
|
9
|
+
import { Loader as nt } from "../Loader/index.js";
|
|
10
|
+
import { S as ot, a as rt } from "../../table-filter-C0zetUfo.js";
|
|
11
|
+
import { INITIAL_COLUMN_MANAGER_CONFIG as be, ROW_MIN_HEIGHT as it, TABLE_PREFIX as F } from "./constants.js";
|
|
12
|
+
import st from "./_helpers/TableFilterModal/index.js";
|
|
13
|
+
import lt from "./_helpers/ColumnManager/index.js";
|
|
14
|
+
import at from "./_helpers/GroupedHeader/index.js";
|
|
15
|
+
import { SelectionHeaderCell as xe } from "./_helpers/SelectionCell/index.js";
|
|
16
|
+
import ct from "./_helpers/TableRows.js";
|
|
17
|
+
import { useSelection as dt } from "./_hooks/useSelection.js";
|
|
18
|
+
import { useExpansion as mt } from "./_hooks/useExpansion.js";
|
|
19
|
+
import { useOverlayScrollbar as ut } from "./_hooks/useOverlayScrollbar.js";
|
|
20
|
+
import { isTableConfigDefault as we, saveToLocalStorage as te, getTableMinWidth as ft, isTableConfigChanged as gt, pinnedStyle as ne, columnLayoutStyle as ve } from "./_utils/table.utils.js";
|
|
21
|
+
import { formatCellValue as Se } from "./_utils/formatCellValue.js";
|
|
22
|
+
import '../../assets/styles-DAqMiQ0N.css';/* empty css */
|
|
23
|
+
const ht = (l) => /* @__PURE__ */ r.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 14, height: 14, viewBox: "0 0 14 14", fill: "none", ...l }, /* @__PURE__ */ r.createElement("path", { d: "M1.75 8.75006L8.16667 8.75", stroke: "#2B2B2B", strokeWidth: 0.875, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ r.createElement("path", { d: "M1.75 5.25H5.83333", stroke: "#2B2B2B", strokeWidth: 0.875, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ r.createElement("path", { d: "M1.75 12.25H11.0833", stroke: "#2B2B2B", strokeWidth: 0.875, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ r.createElement("path", { d: "M10.7913 1.75V8.75M10.7913 1.75C10.3829 1.75 9.61972 2.91334 9.33301 3.20833M10.7913 1.75C11.1998 1.75 11.963 2.91334 12.2497 3.20833", stroke: "#2B2B2B", strokeWidth: 0.875, strokeLinecap: "round", strokeLinejoin: "round" })), pt = (l) => /* @__PURE__ */ r.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 14, height: 14, viewBox: "0 0 14 14", fill: "none", ...l }, /* @__PURE__ */ r.createElement("path", { d: "M1.75 5.24994L8.16667 5.25", stroke: "#2B2B2B", strokeWidth: 0.875, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ r.createElement("path", { d: "M1.75 8.75H5.83333", stroke: "#2B2B2B", strokeWidth: 0.875, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ r.createElement("path", { d: "M1.75 1.75H11.0833", stroke: "#2B2B2B", strokeWidth: 0.875, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ r.createElement("path", { d: "M10.7913 12.25V5.25M10.7913 12.25C10.3829 12.25 9.61972 11.0867 9.33301 10.7917M10.7913 12.25C11.1998 12.25 11.963 11.0867 12.2497 10.7917", stroke: "#2B2B2B", strokeWidth: 0.875, strokeLinecap: "round", strokeLinejoin: "round" })), yt = (l) => /* @__PURE__ */ r.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 14, height: 14, viewBox: "0 0 14 14", fill: "none", ...l }, /* @__PURE__ */ r.createElement("mask", { id: "mask0_1852_13537", style: {
|
|
23
24
|
maskType: "luminance"
|
|
24
|
-
}, maskUnits: "userSpaceOnUse", x: 0, y: 0, width: 14, height: 14 }, /* @__PURE__ */
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
}, maskUnits: "userSpaceOnUse", x: 0, y: 0, width: 14, height: 14 }, /* @__PURE__ */ r.createElement("path", { d: "M13.708 0.291992V13.708H0.291992V0.291992H13.708Z", fill: "white", stroke: "white", strokeWidth: 0.583333 })), /* @__PURE__ */ r.createElement("g", { mask: "url(#mask0_1852_13537)" }, /* @__PURE__ */ r.createElement("path", { d: "M1.75 4.08325H12.25", stroke: "#2B2B2B", strokeWidth: 0.875, strokeLinecap: "round" }), /* @__PURE__ */ r.createElement("path", { d: "M3.5 7H10.5", stroke: "#2B2B2B", strokeWidth: 0.875, strokeLinecap: "round" }), /* @__PURE__ */ r.createElement("path", { d: "M5.83398 9.9165H8.16732", stroke: "#2B2B2B", strokeWidth: 0.875, strokeLinecap: "round" }))), kt = (l) => /* @__PURE__ */ r.createElement("svg", { width: 200, height: 180, viewBox: "0 0 200 180", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...l }, /* @__PURE__ */ r.createElement("ellipse", { cx: 100, cy: 168, rx: 38, ry: 6, fill: "#E0E0E0" }), /* @__PURE__ */ r.createElement("path", { d: "M30 110 C10 110 5 90 20 80 C15 60 35 50 55 60 C60 45 80 38 95 50 C110 38 135 42 140 58 C158 55 170 70 162 85 C175 90 175 110 158 112 Z", fill: "#F0F0F0" }), /* @__PURE__ */ r.createElement("g", { stroke: "#C0C0C0", strokeWidth: 2.5, strokeLinecap: "round" }, /* @__PURE__ */ r.createElement("line", { x1: 28, y1: 22, x2: 28, y2: 32 }), /* @__PURE__ */ r.createElement("line", { x1: 23, y1: 27, x2: 33, y2: 27 }), /* @__PURE__ */ r.createElement("line", { x1: 38, y1: 118, x2: 38, y2: 128 }), /* @__PURE__ */ r.createElement("line", { x1: 33, y1: 123, x2: 43, y2: 123 }), /* @__PURE__ */ r.createElement("line", { x1: 162, y1: 52, x2: 162, y2: 62 }), /* @__PURE__ */ r.createElement("line", { x1: 157, y1: 57, x2: 167, y2: 57 })), /* @__PURE__ */ r.createElement("circle", { cx: 100, cy: 155, r: 2, fill: "#D0D0D0" }), /* @__PURE__ */ r.createElement("g", { transform: "rotate(-8, 100, 90)" }, /* @__PURE__ */ r.createElement("rect", { x: 42, y: 28, width: 112, height: 130, rx: 10, fill: "#DCDCDC" }), /* @__PURE__ */ r.createElement("rect", { x: 44, y: 30, width: 108, height: 126, rx: 9, fill: "white", stroke: "#C2C2C2", strokeWidth: 1.5 }), /* @__PURE__ */ r.createElement("rect", { x: 50, y: 36, width: 96, height: 114, rx: 6, fill: "white", stroke: "#C2C2C2", strokeWidth: 1 }), /* @__PURE__ */ r.createElement("rect", { x: 82, y: 20, width: 32, height: 20, rx: 4, fill: "white", stroke: "#C2C2C2", strokeWidth: 1.5 }), /* @__PURE__ */ r.createElement("path", { d: "M91 20 Q98 14 105 20", stroke: "#C2C2C2", strokeWidth: 1.5, fill: "#F4F4F4" }), /* @__PURE__ */ r.createElement("circle", { cx: 95, cy: 88, r: 26, stroke: "#C2C2C2", strokeWidth: 3, fill: "white" }), /* @__PURE__ */ r.createElement("line", { x1: 113, y1: 106, x2: 128, y2: 121, stroke: "#C2C2C2", strokeWidth: 5, strokeLinecap: "round" }), /* @__PURE__ */ r.createElement("line", { x1: 116, y1: 109, x2: 125, y2: 118, stroke: "#E8E8E8", strokeWidth: 2, strokeLinecap: "round" }))), Ee = (l) => {
|
|
26
|
+
if (typeof l == "number") return l;
|
|
27
|
+
if (l == null) return NaN;
|
|
28
|
+
const m = String(l).replace(/[^0-9.-]/g, "");
|
|
29
|
+
return m === "" ? NaN : Number(m);
|
|
30
|
+
}, Ct = (l, m, K) => {
|
|
31
|
+
const k = Ee(l.getValue(K)), c = Ee(m.getValue(K));
|
|
32
|
+
return Number.isNaN(k) && Number.isNaN(c) ? 0 : Number.isNaN(k) ? 1 : Number.isNaN(c) ? -1 : k - c;
|
|
33
|
+
};
|
|
34
|
+
let Ne = !1;
|
|
35
|
+
const Me = (l) => {
|
|
36
|
+
if (typeof l == "number") return l;
|
|
37
|
+
if (typeof l == "string" && l.trim().endsWith("px")) {
|
|
38
|
+
const m = Number.parseFloat(l);
|
|
39
|
+
return Number.isNaN(m) ? void 0 : m;
|
|
31
40
|
}
|
|
32
41
|
};
|
|
33
|
-
function
|
|
34
|
-
config:
|
|
35
|
-
data:
|
|
36
|
-
maxHeight:
|
|
37
|
-
virtualization:
|
|
38
|
-
persistTableConfig:
|
|
39
|
-
message:
|
|
42
|
+
function jt({
|
|
43
|
+
config: l = {},
|
|
44
|
+
data: m = [],
|
|
45
|
+
maxHeight: K = "600px",
|
|
46
|
+
virtualization: k = !1,
|
|
47
|
+
persistTableConfig: c = "",
|
|
48
|
+
message: oe,
|
|
40
49
|
icon: Ie,
|
|
41
|
-
totalRow:
|
|
42
|
-
selection:
|
|
43
|
-
expandable:
|
|
44
|
-
externalColumnFilters:
|
|
45
|
-
externalTableConfig:
|
|
46
|
-
onConfigChange:
|
|
47
|
-
isLoading:
|
|
50
|
+
totalRow: re,
|
|
51
|
+
selection: G,
|
|
52
|
+
expandable: J,
|
|
53
|
+
externalColumnFilters: q,
|
|
54
|
+
externalTableConfig: C,
|
|
55
|
+
onConfigChange: Fe,
|
|
56
|
+
isLoading: ie = !1
|
|
48
57
|
}) {
|
|
49
58
|
const {
|
|
50
|
-
headers:
|
|
59
|
+
headers: v = [],
|
|
51
60
|
headerGroups: B,
|
|
52
61
|
showFilters: Be = !0,
|
|
53
|
-
showColumnManager:
|
|
54
|
-
columnManagerConfig:
|
|
62
|
+
showColumnManager: Le = !0,
|
|
63
|
+
columnManagerConfig: se = be,
|
|
55
64
|
toolbarLabels: le,
|
|
56
|
-
search:
|
|
57
|
-
} =
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}, [
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
}, [
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
65
|
+
search: u
|
|
66
|
+
} = l ?? {}, ae = le?.columnManager ?? !0, ce = le?.filter ?? !0, [V, de] = x(u?.value ?? "");
|
|
67
|
+
w(() => {
|
|
68
|
+
u?.value !== void 0 && de(u.value);
|
|
69
|
+
}, [u?.value]);
|
|
70
|
+
const me = I((e) => {
|
|
71
|
+
de(e), u?.onSearch?.(e);
|
|
72
|
+
}, [u]), L = ke(null);
|
|
73
|
+
ut(L);
|
|
74
|
+
const {
|
|
75
|
+
selectionState: W,
|
|
76
|
+
getRowId: We,
|
|
77
|
+
toggleRowSelection: ze,
|
|
78
|
+
toggleSelectAll: ue
|
|
79
|
+
} = dt(m, G), {
|
|
80
|
+
expandedIds: De,
|
|
81
|
+
toggleExpand: Re
|
|
82
|
+
} = mt(J), A = R(
|
|
83
|
+
() => v.map((e) => {
|
|
73
84
|
let t = "includesString";
|
|
74
85
|
return e.filterable && (e.type === "string" ? t = (n, o, s) => {
|
|
75
86
|
if (!s) return !0;
|
|
76
|
-
const
|
|
77
|
-
if (!
|
|
78
|
-
const
|
|
79
|
-
return
|
|
87
|
+
const a = Array.isArray(s) ? s : s.values, f = Array.isArray(s) ? !1 : s.exclude;
|
|
88
|
+
if (!a || a.length === 0) return !0;
|
|
89
|
+
const M = String(n.getValue(o));
|
|
90
|
+
return f ? !a.includes(M) : a.includes(M);
|
|
80
91
|
} : e.type === "number" && (t = (n, o, s) => {
|
|
81
92
|
if (!s) return !0;
|
|
82
|
-
const
|
|
83
|
-
return
|
|
93
|
+
const a = Number(n.getValue(o));
|
|
94
|
+
return a >= s.min && a <= s.max;
|
|
84
95
|
})), {
|
|
85
96
|
...e,
|
|
86
97
|
enableSorting: e.sortable !== !1,
|
|
87
98
|
...e.minWidth !== void 0 ? { enableResizing: !1 } : {},
|
|
88
|
-
...e.minSize === void 0 &&
|
|
89
|
-
...e.type === "number" ? { sortingFn: "
|
|
99
|
+
...e.minSize === void 0 && Me(e.minWidth) !== void 0 ? { minSize: Me(e.minWidth) } : {},
|
|
100
|
+
...e.type === "number" ? { sortingFn: "numericSort" } : { sortingFn: "text" },
|
|
90
101
|
filterFn: t,
|
|
91
102
|
...e.renderCell ? {
|
|
92
103
|
cell: (n) => e.renderCell(n.getValue(), n.row.original)
|
|
93
104
|
} : e.prefix || e.suffix || e.decimalPlaces !== void 0 ? {
|
|
94
|
-
cell: (n) =>
|
|
105
|
+
cell: (n) => Se(n.getValue(), e)
|
|
95
106
|
} : {}
|
|
96
107
|
};
|
|
97
108
|
}),
|
|
98
|
-
[
|
|
99
|
-
),
|
|
109
|
+
[v]
|
|
110
|
+
), H = I(
|
|
100
111
|
() => ({
|
|
101
|
-
...
|
|
102
|
-
...
|
|
103
|
-
columns:
|
|
112
|
+
...be,
|
|
113
|
+
...se,
|
|
114
|
+
columns: A
|
|
104
115
|
}),
|
|
105
|
-
[
|
|
106
|
-
),
|
|
107
|
-
const e =
|
|
108
|
-
if (
|
|
116
|
+
[se, A]
|
|
117
|
+
), fe = () => {
|
|
118
|
+
const e = H();
|
|
119
|
+
if (c)
|
|
109
120
|
try {
|
|
110
|
-
const t = localStorage.getItem(`${
|
|
121
|
+
const t = localStorage.getItem(`${F}-${c}`);
|
|
111
122
|
if (t) {
|
|
112
123
|
const n = JSON.parse(t);
|
|
113
124
|
if (n?.tableConfig) {
|
|
114
|
-
const o = n.tableConfig.columns || [], s = /* @__PURE__ */ new Set(),
|
|
115
|
-
return e.columns.forEach((
|
|
116
|
-
|
|
117
|
-
}), { ...e, ...n.tableConfig, columns:
|
|
125
|
+
const o = n.tableConfig.columns || [], s = /* @__PURE__ */ new Set(), a = o.map((f) => e.columns.find((M) => M.accessorKey === f.accessorKey)).filter((f) => !f || s.has(f.accessorKey) ? !1 : (s.add(f.accessorKey), !0));
|
|
126
|
+
return e.columns.forEach((f) => {
|
|
127
|
+
a.find((M) => M.accessorKey === f.accessorKey) || a.push(f);
|
|
128
|
+
}), { ...e, ...n.tableConfig, columns: a };
|
|
118
129
|
}
|
|
119
130
|
}
|
|
120
131
|
} catch (t) {
|
|
121
132
|
console.error("Failed to load table config from local storage", t);
|
|
122
133
|
}
|
|
123
134
|
return e;
|
|
124
|
-
},
|
|
125
|
-
if (
|
|
135
|
+
}, ge = () => {
|
|
136
|
+
if (c)
|
|
126
137
|
try {
|
|
127
|
-
const e = localStorage.getItem(`${
|
|
138
|
+
const e = localStorage.getItem(`${F}-${c}`);
|
|
128
139
|
if (e) {
|
|
129
140
|
const t = JSON.parse(e);
|
|
130
141
|
if (t?.columnFilters) return t.columnFilters;
|
|
@@ -133,10 +144,10 @@ function At({
|
|
|
133
144
|
console.error("Failed to load table config from local storage", e);
|
|
134
145
|
}
|
|
135
146
|
return [];
|
|
136
|
-
},
|
|
137
|
-
if (
|
|
147
|
+
}, Ke = () => {
|
|
148
|
+
if (c)
|
|
138
149
|
try {
|
|
139
|
-
const e = localStorage.getItem(`${
|
|
150
|
+
const e = localStorage.getItem(`${F}-${c}`);
|
|
140
151
|
if (e) {
|
|
141
152
|
const t = JSON.parse(e);
|
|
142
153
|
if (t?.columnSizing) return t.columnSizing;
|
|
@@ -145,14 +156,14 @@ function At({
|
|
|
145
156
|
console.error("Failed to load table config from local storage", e);
|
|
146
157
|
}
|
|
147
158
|
return {};
|
|
148
|
-
}, [h,
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
}, [
|
|
152
|
-
const
|
|
153
|
-
const e =
|
|
154
|
-
if (!
|
|
155
|
-
const t = new Map(
|
|
159
|
+
}, [h, U] = x(fe), [S, O] = x(fe), [z, Z] = x(ge), [j, he] = x(ge), [p, Ve] = x(Ke), [T, b] = x({ open: !1, type: "", activeOption: "" });
|
|
160
|
+
w(() => {
|
|
161
|
+
C && U(C);
|
|
162
|
+
}, [C]);
|
|
163
|
+
const d = R(() => {
|
|
164
|
+
const e = C ?? h;
|
|
165
|
+
if (!C) return e;
|
|
166
|
+
const t = new Map(A.map((n) => [n.accessorKey, n]));
|
|
156
167
|
return {
|
|
157
168
|
...e,
|
|
158
169
|
columns: e.columns.map((n) => {
|
|
@@ -165,249 +176,255 @@ function At({
|
|
|
165
176
|
} : n;
|
|
166
177
|
})
|
|
167
178
|
};
|
|
168
|
-
}, [
|
|
179
|
+
}, [C, h, A]), Ae = q ?? z, He = R(() => {
|
|
169
180
|
const e = {};
|
|
170
|
-
return
|
|
171
|
-
if (
|
|
181
|
+
return v.forEach((t) => {
|
|
182
|
+
if (d.columnVisibility[t.accessorKey] !== !1) {
|
|
172
183
|
if (t.filterable && (t.type === "string" || !t.type)) {
|
|
173
184
|
const n = [
|
|
174
|
-
...new Set(
|
|
185
|
+
...new Set(m.map((o) => String(o[t.accessorKey] ?? "")).filter(Boolean))
|
|
175
186
|
];
|
|
176
187
|
e[t.header] = { type: "checkbox", options: n, accessorKey: t.accessorKey };
|
|
177
188
|
} else if (t.filterable && t.type === "number") {
|
|
178
|
-
const n =
|
|
189
|
+
const n = m.map((a) => Number(a[t.accessorKey])).filter((a) => !Number.isNaN(a)), o = n.length ? Math.floor(Math.min(...n)) : 0, s = n.length ? Math.ceil(Math.max(...n)) : 0;
|
|
179
190
|
e[t.header] = { type: "range", values: { min: o, max: s }, accessorKey: t.accessorKey };
|
|
180
191
|
}
|
|
181
192
|
}
|
|
182
193
|
}), e;
|
|
183
|
-
}, [
|
|
184
|
-
|
|
185
|
-
if (
|
|
194
|
+
}, [v, m, d.columnVisibility]);
|
|
195
|
+
w(() => {
|
|
196
|
+
if (c && !Ne)
|
|
186
197
|
try {
|
|
187
|
-
const e =
|
|
188
|
-
(e || t) && (
|
|
198
|
+
const e = z.length > 0, t = !we(h, H());
|
|
199
|
+
(e || t) && (Ne = !0);
|
|
189
200
|
} catch (e) {
|
|
190
201
|
console.error("Failed to check toast condition", e);
|
|
191
202
|
}
|
|
192
|
-
}, [
|
|
193
|
-
|
|
194
|
-
}, [p,
|
|
195
|
-
|
|
203
|
+
}, [c]), w(() => {
|
|
204
|
+
c && Object.keys(p).length > 0 && te(`${F}-${c}`, { columnSizing: p });
|
|
205
|
+
}, [p, c]), w(() => {
|
|
206
|
+
Z((e) => {
|
|
196
207
|
const t = e.filter(
|
|
197
208
|
(n) => h.columnVisibility[n.id] !== !1
|
|
198
209
|
);
|
|
199
210
|
return t.length !== e.length ? t : e;
|
|
200
211
|
});
|
|
201
212
|
}, [h.columnVisibility]);
|
|
202
|
-
const
|
|
203
|
-
const e = /* @__PURE__ */ new Set(), t =
|
|
204
|
-
|
|
205
|
-
},
|
|
206
|
-
|
|
207
|
-
},
|
|
208
|
-
|
|
213
|
+
const Oe = () => {
|
|
214
|
+
const e = /* @__PURE__ */ new Set(), t = S.columns.filter((o) => e.has(o.accessorKey) ? !1 : (e.add(o.accessorKey), !0)), n = { ...S, columns: t };
|
|
215
|
+
U(n), b({ type: "", activeOption: "", open: !1 }), c && te(`${F}-${c}`, { tableConfig: n }), Fe?.(S);
|
|
216
|
+
}, je = () => {
|
|
217
|
+
O(H);
|
|
218
|
+
}, Te = I((e, t) => {
|
|
219
|
+
O((n) => {
|
|
209
220
|
const o = [...n.columns], [s] = o.splice(e, 1);
|
|
210
221
|
return o.splice(t, 0, s), { ...n, columns: o };
|
|
211
222
|
});
|
|
212
|
-
}, []),
|
|
213
|
-
|
|
223
|
+
}, []), $e = I((e) => {
|
|
224
|
+
U((t) => {
|
|
214
225
|
const n = typeof e == "function" ? e(t.columnVisibility) : e;
|
|
215
226
|
return { ...t, columnVisibility: n };
|
|
216
227
|
});
|
|
217
|
-
}, []),
|
|
218
|
-
const e = [], t = [], n =
|
|
219
|
-
(o) =>
|
|
228
|
+
}, []), Pe = R(() => {
|
|
229
|
+
const e = [], t = [], n = d.columns.filter(
|
|
230
|
+
(o) => d.columnVisibility[o.accessorKey] !== !1
|
|
220
231
|
);
|
|
221
|
-
if (
|
|
232
|
+
if (d.stickyStart === "first" && n.length > 0 && e.push(n[0].accessorKey), d.stickyStart === "firstTwo" && n.length > 1 && (e.push(n[0].accessorKey), e.push(n[1].accessorKey)), d.stickyEnd === "last" && n.length > 0) {
|
|
222
233
|
const o = n[n.length - 1].accessorKey;
|
|
223
234
|
e.includes(o) || t.push(o);
|
|
224
235
|
}
|
|
225
236
|
return { left: e, right: t };
|
|
226
|
-
}, [
|
|
227
|
-
if (!
|
|
228
|
-
const e =
|
|
229
|
-
return
|
|
237
|
+
}, [d.stickyStart, d.stickyEnd, d.columns, d.columnVisibility]), _e = R(() => {
|
|
238
|
+
if (!u || u.mode !== "frontend" || !V.trim()) return m;
|
|
239
|
+
const e = V.toLowerCase(), t = v.filter((n) => d.columnVisibility[n.accessorKey] !== !1).map((n) => n.accessorKey);
|
|
240
|
+
return m.filter(
|
|
230
241
|
(n) => t.some((o) => {
|
|
231
242
|
const s = n[o];
|
|
232
243
|
return s != null && String(s).toLowerCase().includes(e);
|
|
233
244
|
})
|
|
234
245
|
);
|
|
235
|
-
}, [
|
|
236
|
-
|
|
237
|
-
|
|
246
|
+
}, [u, V, m, v, d.columnVisibility]);
|
|
247
|
+
w(() => {
|
|
248
|
+
L.current && (L.current.scrollTop = 0);
|
|
249
|
+
}, [m]);
|
|
250
|
+
const y = Ue({
|
|
251
|
+
data: _e,
|
|
252
|
+
columns: d.columns,
|
|
238
253
|
defaultColumn: {
|
|
239
254
|
minSize: 100
|
|
240
255
|
},
|
|
241
|
-
|
|
256
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
257
|
+
sortingFns: { numericSort: Ct },
|
|
258
|
+
getRowId: (e, t) => We(e, t),
|
|
242
259
|
state: {
|
|
243
|
-
columnVisibility:
|
|
244
|
-
columnPinning:
|
|
260
|
+
columnVisibility: d.columnVisibility,
|
|
261
|
+
columnPinning: Pe,
|
|
245
262
|
columnFilters: Ae,
|
|
246
263
|
columnSizing: p
|
|
247
264
|
},
|
|
248
|
-
onColumnFiltersChange:
|
|
249
|
-
onColumnSizingChange:
|
|
265
|
+
onColumnFiltersChange: Z,
|
|
266
|
+
onColumnSizingChange: Ve,
|
|
250
267
|
enableRowSelection: !1,
|
|
251
268
|
enableColumnResizing: !0,
|
|
252
269
|
columnResizeMode: "onChange",
|
|
253
|
-
onColumnVisibilityChange:
|
|
254
|
-
getCoreRowModel:
|
|
255
|
-
getSortedRowModel:
|
|
256
|
-
getFilteredRowModel:
|
|
257
|
-
}), { rows:
|
|
258
|
-
(e) =>
|
|
270
|
+
onColumnVisibilityChange: $e,
|
|
271
|
+
getCoreRowModel: Ye(),
|
|
272
|
+
getSortedRowModel: Xe(),
|
|
273
|
+
getFilteredRowModel: Qe()
|
|
274
|
+
}), { rows: $ } = y.getRowModel(), E = y.getVisibleLeafColumns(), pe = E.length > 0 ? E[E.length - 1].id : null, D = (G?.enabled ?? !1) && !J?.enabled, P = D ? 40 : 0, Q = ft(E, P, p), _ = ke(/* @__PURE__ */ new Map()), ye = I(
|
|
275
|
+
(e) => _.current.get(e) || it,
|
|
259
276
|
[]
|
|
260
|
-
),
|
|
261
|
-
count:
|
|
262
|
-
getScrollElement: () =>
|
|
263
|
-
estimateSize:
|
|
277
|
+
), N = qe({
|
|
278
|
+
count: $.length,
|
|
279
|
+
getScrollElement: () => L.current,
|
|
280
|
+
estimateSize: ye,
|
|
264
281
|
overscan: 5
|
|
265
282
|
});
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
283
|
+
w(() => {
|
|
284
|
+
_.current.clear(), requestAnimationFrame(() => {
|
|
285
|
+
N.measure();
|
|
269
286
|
});
|
|
270
|
-
}, [
|
|
271
|
-
const
|
|
287
|
+
}, [d.wrapText, N]);
|
|
288
|
+
const Ge = I(
|
|
272
289
|
(e, t) => {
|
|
273
290
|
if (!t) return;
|
|
274
|
-
const n = t.offsetHeight, o =
|
|
275
|
-
n && o !== n && (
|
|
276
|
-
|
|
291
|
+
const n = t.offsetHeight, o = _.current.get(e);
|
|
292
|
+
n && o !== n && (_.current.set(e, n), requestAnimationFrame(() => {
|
|
293
|
+
N.measure();
|
|
277
294
|
}));
|
|
278
295
|
},
|
|
279
|
-
[
|
|
280
|
-
),
|
|
281
|
-
|
|
296
|
+
[N]
|
|
297
|
+
), X = (e) => e === "asc" ? /* @__PURE__ */ i(ht, {}) : e === "desc" ? /* @__PURE__ */ i(pt, {}) : /* @__PURE__ */ i(yt, {}), Je = T.type === "filter" ? /* @__PURE__ */ i(
|
|
298
|
+
st,
|
|
282
299
|
{
|
|
283
300
|
filters: He,
|
|
284
|
-
draftColumnFilters:
|
|
285
|
-
setDraftColumnFilters:
|
|
301
|
+
draftColumnFilters: j,
|
|
302
|
+
setDraftColumnFilters: he,
|
|
286
303
|
handleApplyFilters: () => {
|
|
287
|
-
|
|
304
|
+
Z(j), b({ ...T, open: !1 }), c && te(`${F}-${c}`, { columnFilters: j });
|
|
288
305
|
},
|
|
289
|
-
setModalOpen:
|
|
290
|
-
virtualization:
|
|
291
|
-
isFilterChanged: JSON.stringify(
|
|
306
|
+
setModalOpen: b,
|
|
307
|
+
virtualization: k,
|
|
308
|
+
isFilterChanged: JSON.stringify(j) !== JSON.stringify(z)
|
|
292
309
|
}
|
|
293
|
-
) : /* @__PURE__ */
|
|
294
|
-
|
|
310
|
+
) : /* @__PURE__ */ i(
|
|
311
|
+
lt,
|
|
295
312
|
{
|
|
296
|
-
draftConfig:
|
|
297
|
-
setDraftConfig:
|
|
298
|
-
moveDraftColumn:
|
|
299
|
-
handleApplyPref:
|
|
300
|
-
setModalOpen:
|
|
301
|
-
handleResetToDefault:
|
|
302
|
-
isDefault:
|
|
303
|
-
isConfigChanged:
|
|
313
|
+
draftConfig: S,
|
|
314
|
+
setDraftConfig: O,
|
|
315
|
+
moveDraftColumn: Te,
|
|
316
|
+
handleApplyPref: Oe,
|
|
317
|
+
setModalOpen: b,
|
|
318
|
+
handleResetToDefault: je,
|
|
319
|
+
isDefault: we(S, H()),
|
|
320
|
+
isConfigChanged: gt(S, h)
|
|
304
321
|
}
|
|
305
|
-
),
|
|
322
|
+
), Y = Le, ee = Be && !q;
|
|
306
323
|
return /* @__PURE__ */ g("div", { children: [
|
|
307
|
-
(
|
|
308
|
-
/* @__PURE__ */
|
|
309
|
-
|
|
324
|
+
(u || Y || ee) && /* @__PURE__ */ g("div", { className: "ckds-filter-wrapper", style: { display: "flex", gap: "8px", margin: "16px 0px 12px 0px", justifyContent: "space-between", alignItems: "center" }, children: [
|
|
325
|
+
/* @__PURE__ */ i("div", { className: "ckds-toolbar-search", children: u && /* @__PURE__ */ i(
|
|
326
|
+
et,
|
|
310
327
|
{
|
|
311
|
-
value:
|
|
312
|
-
placeholder:
|
|
313
|
-
debounceMs:
|
|
314
|
-
onChange:
|
|
315
|
-
onClear: () =>
|
|
316
|
-
disabled:
|
|
328
|
+
value: V,
|
|
329
|
+
placeholder: u.placeholder ?? "Search",
|
|
330
|
+
debounceMs: u.debounceMs ?? 0,
|
|
331
|
+
onChange: me,
|
|
332
|
+
onClear: () => me(""),
|
|
333
|
+
disabled: ie
|
|
317
334
|
}
|
|
318
335
|
) }),
|
|
319
|
-
(
|
|
320
|
-
|
|
321
|
-
|
|
336
|
+
(Y || ee) && /* @__PURE__ */ g("div", { style: { display: "flex", gap: "8px", alignItems: "center" }, children: [
|
|
337
|
+
Y && /* @__PURE__ */ i(
|
|
338
|
+
Ce,
|
|
322
339
|
{
|
|
323
340
|
onClick: () => {
|
|
324
|
-
|
|
341
|
+
O({ ...h, columnVisibility: { ...h.columnVisibility }, columns: [...h.columns] }), b({ open: !0, type: "columnManager", activeOption: "" });
|
|
325
342
|
},
|
|
326
343
|
variant: "secondary",
|
|
327
344
|
size: "medium",
|
|
328
|
-
icons: { left: /* @__PURE__ */
|
|
329
|
-
label:
|
|
330
|
-
iconOnly: !
|
|
345
|
+
icons: { left: /* @__PURE__ */ i(ot, {}) },
|
|
346
|
+
label: ae ? "Column Manager" : void 0,
|
|
347
|
+
iconOnly: !ae
|
|
331
348
|
}
|
|
332
349
|
),
|
|
333
|
-
/* @__PURE__ */
|
|
334
|
-
|
|
335
|
-
|
|
350
|
+
/* @__PURE__ */ i("div", { style: { borderRight: "1px solid var(--ckcl-black-200, #C2C2C2)", margin: "5px 0" } }),
|
|
351
|
+
ee && /* @__PURE__ */ i(
|
|
352
|
+
Ce,
|
|
336
353
|
{
|
|
337
|
-
className: `relative ${
|
|
354
|
+
className: `relative ${z.length > 0 ? "after:content-[''] after:absolute after:-top-[1px] after:-right-[1px] after:size-[5px] after:rounded-full after:bg-primary" : ""}`,
|
|
338
355
|
onClick: () => {
|
|
339
|
-
|
|
356
|
+
he(z), b({ open: !0, type: "filter", activeOption: "" });
|
|
340
357
|
},
|
|
341
358
|
variant: "secondary",
|
|
342
359
|
size: "medium",
|
|
343
|
-
icons: { right: /* @__PURE__ */
|
|
344
|
-
label:
|
|
345
|
-
iconOnly: !
|
|
360
|
+
icons: { right: /* @__PURE__ */ i(rt, {}) },
|
|
361
|
+
label: ce ? "Filters" : void 0,
|
|
362
|
+
iconOnly: !ce
|
|
346
363
|
}
|
|
347
364
|
)
|
|
348
365
|
] })
|
|
349
366
|
] }),
|
|
350
|
-
/* @__PURE__ */ g("div", { style: { position: "relative" }, children: [
|
|
351
|
-
|
|
352
|
-
/* @__PURE__ */
|
|
367
|
+
/* @__PURE__ */ g("div", { style: { position: "relative", overflow: "hidden", borderRadius: "var(--ckcl-border-radius-lg, 12px)" }, children: [
|
|
368
|
+
ie && /* @__PURE__ */ i(nt, { overlay: !0 }),
|
|
369
|
+
/* @__PURE__ */ i(
|
|
353
370
|
"div",
|
|
354
371
|
{
|
|
355
372
|
className: "ckds-custom-table ckds-custom-scrollbar",
|
|
356
|
-
ref:
|
|
357
|
-
style: { maxHeight:
|
|
358
|
-
children:
|
|
373
|
+
ref: L,
|
|
374
|
+
style: { maxHeight: K, width: y?.getHeaderGroups()?.[0]?.headers?.length === 1 ? "fit-content" : "100%" },
|
|
375
|
+
children: $.length ? /* @__PURE__ */ g(
|
|
359
376
|
"table",
|
|
360
377
|
{
|
|
361
378
|
className: "ckds-dragable-table",
|
|
362
|
-
style: { width: "100%", minWidth:
|
|
379
|
+
style: { width: "100%", minWidth: Q, display: "block" },
|
|
363
380
|
children: [
|
|
364
|
-
/* @__PURE__ */ g("thead", { className: "ckds-dragable-thead", style: { display: "block", position: "sticky", top: 0, zIndex: 10, minWidth:
|
|
365
|
-
B && B.length > 0 && /* @__PURE__ */
|
|
366
|
-
|
|
381
|
+
/* @__PURE__ */ g("thead", { className: "ckds-dragable-thead", style: { display: "block", position: "sticky", top: 0, zIndex: 10, minWidth: Q, backgroundColor: "var(--ckds-cell-bg-default, #ffffff)" }, children: [
|
|
382
|
+
B && B.length > 0 && /* @__PURE__ */ i(
|
|
383
|
+
at,
|
|
367
384
|
{
|
|
368
385
|
headerGroups: B,
|
|
369
386
|
table: y,
|
|
370
|
-
hasSelection:
|
|
371
|
-
getSortIcon:
|
|
372
|
-
selectionCell:
|
|
373
|
-
|
|
387
|
+
hasSelection: D,
|
|
388
|
+
getSortIcon: X,
|
|
389
|
+
selectionCell: D ? /* @__PURE__ */ i(
|
|
390
|
+
xe,
|
|
374
391
|
{
|
|
375
|
-
isAllSelected:
|
|
376
|
-
isIndeterminate:
|
|
377
|
-
onToggleAll:
|
|
392
|
+
isAllSelected: W.isAllSelected,
|
|
393
|
+
isIndeterminate: W.isIndeterminate,
|
|
394
|
+
onToggleAll: ue
|
|
378
395
|
}
|
|
379
396
|
) : void 0,
|
|
380
|
-
lastColId:
|
|
397
|
+
lastColId: pe,
|
|
381
398
|
columnSizing: p,
|
|
382
|
-
pinnedStyle:
|
|
383
|
-
selectionOffset:
|
|
399
|
+
pinnedStyle: ne,
|
|
400
|
+
selectionOffset: P
|
|
384
401
|
}
|
|
385
402
|
),
|
|
386
403
|
!(B && B.length > 0) && y.getHeaderGroups().map((e) => /* @__PURE__ */ g("tr", { className: "ckds-dragable-tr", style: { display: "flex", width: "100%" }, children: [
|
|
387
|
-
|
|
404
|
+
D && /* @__PURE__ */ i(
|
|
388
405
|
"th",
|
|
389
406
|
{
|
|
390
407
|
className: "ckds-dragable-th",
|
|
391
408
|
style: { width: 40, minWidth: 40, maxWidth: 40, flex: "0 0 40px", display: "flex", alignItems: "center", justifyContent: "center", position: "sticky", left: 0, zIndex: 2 },
|
|
392
|
-
children: /* @__PURE__ */
|
|
393
|
-
|
|
409
|
+
children: /* @__PURE__ */ i(
|
|
410
|
+
xe,
|
|
394
411
|
{
|
|
395
|
-
isAllSelected:
|
|
396
|
-
isIndeterminate:
|
|
397
|
-
onToggleAll:
|
|
412
|
+
isAllSelected: W.isAllSelected,
|
|
413
|
+
isIndeterminate: W.isIndeterminate,
|
|
414
|
+
onToggleAll: ue
|
|
398
415
|
}
|
|
399
416
|
)
|
|
400
417
|
}
|
|
401
418
|
),
|
|
402
419
|
e.headers.map((t) => {
|
|
403
|
-
const n = t.column.getIsPinned(), o = t.column.id ===
|
|
420
|
+
const n = t.column.getIsPinned(), o = t.column.id === pe;
|
|
404
421
|
return /* @__PURE__ */ g(
|
|
405
422
|
"th",
|
|
406
423
|
{
|
|
407
424
|
className: "ckds-dragable-th",
|
|
408
425
|
style: {
|
|
409
|
-
...
|
|
410
|
-
...ve(t.column,
|
|
426
|
+
...ne(t.column, y, P),
|
|
427
|
+
...ve(t.column, E, p),
|
|
411
428
|
position: n ? "sticky" : "relative",
|
|
412
429
|
zIndex: n ? 2 : void 0,
|
|
413
430
|
display: "flex",
|
|
@@ -432,13 +449,13 @@ function At({
|
|
|
432
449
|
t.column.getCanSort() && (s.key === "Enter" || s.key === " ") && t.column.getToggleSortingHandler()?.(s);
|
|
433
450
|
},
|
|
434
451
|
children: [
|
|
435
|
-
t.column.columnDef.align === "right" && t.column.getCanSort() && /* @__PURE__ */
|
|
436
|
-
|
|
437
|
-
t.column.columnDef.align !== "right" && t.column.getCanSort() && /* @__PURE__ */
|
|
452
|
+
t.column.columnDef.align === "right" && t.column.getCanSort() && /* @__PURE__ */ i("span", { className: "ckds-sort-icon ckds-sort-icon-left", children: X(t.column.getIsSorted()) }),
|
|
453
|
+
Ze(t.column.columnDef.header, t.getContext()),
|
|
454
|
+
t.column.columnDef.align !== "right" && t.column.getCanSort() && /* @__PURE__ */ i("span", { className: "ckds-sort-icon", children: X(t.column.getIsSorted()) })
|
|
438
455
|
]
|
|
439
456
|
}
|
|
440
457
|
),
|
|
441
|
-
!o && t.column.getCanResize() && /* @__PURE__ */
|
|
458
|
+
!o && t.column.getCanResize() && /* @__PURE__ */ i(
|
|
442
459
|
"div",
|
|
443
460
|
{
|
|
444
461
|
onMouseDown: t.getResizeHandler(),
|
|
@@ -446,7 +463,7 @@ function At({
|
|
|
446
463
|
className: "ckds-col-resize-handle",
|
|
447
464
|
role: "separator",
|
|
448
465
|
"aria-orientation": "vertical",
|
|
449
|
-
children: /* @__PURE__ */
|
|
466
|
+
children: /* @__PURE__ */ i("div", { className: "ckds-col-resize-line" })
|
|
450
467
|
}
|
|
451
468
|
)
|
|
452
469
|
]
|
|
@@ -456,57 +473,57 @@ function At({
|
|
|
456
473
|
})
|
|
457
474
|
] }, e.id))
|
|
458
475
|
] }),
|
|
459
|
-
/* @__PURE__ */
|
|
476
|
+
/* @__PURE__ */ i(
|
|
460
477
|
"tbody",
|
|
461
478
|
{
|
|
462
479
|
className: "ckds-dragable-tbody",
|
|
463
480
|
style: {
|
|
464
|
-
height:
|
|
481
|
+
height: k && $.length ? `${N.getTotalSize()}px` : "auto",
|
|
465
482
|
position: "relative",
|
|
466
483
|
display: "block",
|
|
467
484
|
width: "100%",
|
|
468
|
-
minWidth:
|
|
485
|
+
minWidth: Q
|
|
469
486
|
},
|
|
470
|
-
children: /* @__PURE__ */
|
|
471
|
-
|
|
487
|
+
children: /* @__PURE__ */ i(
|
|
488
|
+
ct,
|
|
472
489
|
{
|
|
473
|
-
rows:
|
|
474
|
-
virtualization:
|
|
475
|
-
rowVirtualizer:
|
|
476
|
-
handleMeasure:
|
|
477
|
-
getEstimatedSize:
|
|
490
|
+
rows: $,
|
|
491
|
+
virtualization: k,
|
|
492
|
+
rowVirtualizer: N,
|
|
493
|
+
handleMeasure: Ge,
|
|
494
|
+
getEstimatedSize: ye,
|
|
478
495
|
columnSizing: p,
|
|
479
|
-
tableConfig:
|
|
496
|
+
tableConfig: d,
|
|
480
497
|
table: y,
|
|
481
|
-
selectionState:
|
|
482
|
-
selectionConfig:
|
|
483
|
-
onToggleRowSelection:
|
|
484
|
-
expandableConfig:
|
|
485
|
-
expandedIds:
|
|
486
|
-
onToggleExpand:
|
|
498
|
+
selectionState: W,
|
|
499
|
+
selectionConfig: G,
|
|
500
|
+
onToggleRowSelection: ze,
|
|
501
|
+
expandableConfig: J,
|
|
502
|
+
expandedIds: De,
|
|
503
|
+
onToggleExpand: Re
|
|
487
504
|
}
|
|
488
505
|
)
|
|
489
506
|
}
|
|
490
507
|
),
|
|
491
|
-
|
|
492
|
-
|
|
508
|
+
re && /* @__PURE__ */ i("tfoot", { className: "ckds-dragable-tfoot", style: { display: "block", position: "sticky", bottom: 0, zIndex: 10, backgroundColor: "var(--ckds-cell-bg-default, #ffffff)" }, children: /* @__PURE__ */ g("tr", { className: "ckds-dragable-tr", style: { display: "flex", width: "100%" }, children: [
|
|
509
|
+
D && /* @__PURE__ */ i("td", { className: "ckds-dragable-td ckds-dragable-total-td", style: { display: "flex", alignItems: "center", width: 40, minWidth: 40, maxWidth: 40, flex: "0 0 40px", position: "sticky", left: 0, zIndex: 2 } }),
|
|
493
510
|
y.getVisibleLeafColumns().map((e, t) => {
|
|
494
|
-
const n = e.getIsPinned(), o =
|
|
495
|
-
let
|
|
496
|
-
t === 0 && o === void 0 ?
|
|
497
|
-
const
|
|
498
|
-
return /* @__PURE__ */
|
|
511
|
+
const n = e.getIsPinned(), o = re[e.id], s = e.columnDef;
|
|
512
|
+
let a = null;
|
|
513
|
+
t === 0 && o === void 0 ? a = /* @__PURE__ */ i("span", { children: "Total" }) : o !== void 0 && (typeof o == "object" && o !== null ? a = /* @__PURE__ */ i("span", { children: o }) : s.prefix || s.suffix || s.decimalPlaces !== void 0 ? a = /* @__PURE__ */ i("span", { children: Se(o, s) }) : a = /* @__PURE__ */ i("span", { children: o }));
|
|
514
|
+
const f = s.align === "right" ? "right" : s.align === "center" ? "center" : "left";
|
|
515
|
+
return /* @__PURE__ */ i(
|
|
499
516
|
"td",
|
|
500
517
|
{
|
|
501
518
|
className: "ckds-dragable-td ckds-dragable-total-td",
|
|
502
519
|
style: {
|
|
503
|
-
...
|
|
520
|
+
...ne(e, y, P),
|
|
504
521
|
display: "flex",
|
|
505
522
|
alignItems: "center",
|
|
506
|
-
...ve(e,
|
|
523
|
+
...ve(e, E, p),
|
|
507
524
|
zIndex: n ? 2 : void 0
|
|
508
525
|
},
|
|
509
|
-
children: /* @__PURE__ */
|
|
526
|
+
children: /* @__PURE__ */ i("div", { style: { width: "100%", textAlign: f, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: a })
|
|
510
527
|
},
|
|
511
528
|
e.id
|
|
512
529
|
);
|
|
@@ -514,13 +531,13 @@ function At({
|
|
|
514
531
|
] }) })
|
|
515
532
|
]
|
|
516
533
|
}
|
|
517
|
-
) : /* @__PURE__ */
|
|
518
|
-
|
|
534
|
+
) : /* @__PURE__ */ i(
|
|
535
|
+
tt,
|
|
519
536
|
{
|
|
520
|
-
icon: Ie ?? /* @__PURE__ */
|
|
537
|
+
icon: Ie ?? /* @__PURE__ */ i(kt, {}),
|
|
521
538
|
message: {
|
|
522
|
-
heading:
|
|
523
|
-
content:
|
|
539
|
+
heading: oe?.heading ?? "No data to display",
|
|
540
|
+
content: oe?.content ?? "There's no activity recorded for this period or filter selection."
|
|
524
541
|
},
|
|
525
542
|
classNames: { wrapperClass: "ckds-table-empty-state-wrapper" }
|
|
526
543
|
}
|
|
@@ -528,11 +545,11 @@ function At({
|
|
|
528
545
|
}
|
|
529
546
|
)
|
|
530
547
|
] }),
|
|
531
|
-
|
|
548
|
+
T.open && !q && !C && /* @__PURE__ */ i(
|
|
532
549
|
"div",
|
|
533
550
|
{
|
|
534
551
|
className: "ckds-table-filter-modal-wr",
|
|
535
|
-
onClick: () =>
|
|
552
|
+
onClick: () => b({ ...T, open: !1 }),
|
|
536
553
|
role: "dialog",
|
|
537
554
|
"aria-modal": "true",
|
|
538
555
|
style: {
|
|
@@ -544,12 +561,12 @@ function At({
|
|
|
544
561
|
justifyContent: "center",
|
|
545
562
|
backgroundColor: "rgba(0,0,0,0.3)"
|
|
546
563
|
},
|
|
547
|
-
children: /* @__PURE__ */
|
|
564
|
+
children: /* @__PURE__ */ i(
|
|
548
565
|
"div",
|
|
549
566
|
{
|
|
550
567
|
className: "ckds-table-modal-box",
|
|
551
568
|
onClick: (e) => e.stopPropagation(),
|
|
552
|
-
children:
|
|
569
|
+
children: Je
|
|
553
570
|
}
|
|
554
571
|
)
|
|
555
572
|
}
|
|
@@ -557,6 +574,6 @@ function At({
|
|
|
557
574
|
] });
|
|
558
575
|
}
|
|
559
576
|
export {
|
|
560
|
-
|
|
561
|
-
|
|
577
|
+
jt as CustomTable,
|
|
578
|
+
jt as default
|
|
562
579
|
};
|