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