@ck-ui/component-library 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/DropdownFooter-B63OOZOS.js +96 -0
  2. package/dist/assets/{DropdownFooter-JrU15UnN.css → DropdownFooter-tfY7sg47.css} +1 -1
  3. package/dist/assets/index-DyCyrZSK.css +1 -0
  4. package/dist/assets/{styles-CEyiQgVQ.css → styles-Nuwxl0ex.css} +1 -1
  5. package/dist/components/FusionChart/_config/builders.d.ts.map +1 -1
  6. package/dist/components/FusionChart/_config/builders.js +120 -113
  7. package/dist/components/FusionChart/_config/events.d.ts.map +1 -1
  8. package/dist/components/FusionChart/_config/events.js +37 -23
  9. package/dist/components/FusionChart/_types/fusionChart.types.d.ts +5 -0
  10. package/dist/components/FusionChart/_types/fusionChart.types.d.ts.map +1 -1
  11. package/dist/components/FusionChart/index.d.ts.map +1 -1
  12. package/dist/components/FusionChart/index.js +733 -711
  13. package/dist/components/MultiSelect/SimpleMultiSelect.js +1 -1
  14. package/dist/components/MultiSelect/_helpers/DropdownFooter.js +1 -1
  15. package/dist/components/MultiSelect/_helpers/OptionRow.js +1 -1
  16. package/dist/components/MultiSelect/_helpers/OverflowMenu.js +1 -1
  17. package/dist/components/MultiSelect/_helpers/OverflowMenuItem.js +1 -1
  18. package/dist/components/MultiSelect/_helpers/SearchResult.js +1 -1
  19. package/dist/components/MultiSelect/_helpers/TagContent.js +1 -1
  20. package/dist/components/MultiSelect/_helpers/TriggerButton.js +1 -1
  21. package/dist/components/MultiSelect/index.js +1 -1
  22. package/dist/components/SingleSelectDropdown/_helpers/DropdownFooter.js +1 -1
  23. package/dist/components/SingleSelectDropdown/index.js +1 -1
  24. package/dist/components/Table/_types/table.types.d.ts +10 -0
  25. package/dist/components/Table/_types/table.types.d.ts.map +1 -1
  26. package/dist/components/Table/index.d.ts +1 -1
  27. package/dist/components/Table/index.d.ts.map +1 -1
  28. package/dist/components/Table/index.js +266 -252
  29. package/dist/styles.module-CdFoY0cE.js +53 -0
  30. package/package.json +1 -1
  31. package/dist/DropdownFooter-CsDll1Tj.js +0 -96
  32. package/dist/assets/index-CDtSVOTj.css +0 -1
  33. package/dist/styles.module-yIHBMSTk.js +0 -53
@@ -1,86 +1,91 @@
1
- import { jsx as s, jsxs as f } from "react/jsx-runtime";
1
+ import { jsx as l, jsxs as g } from "react/jsx-runtime";
2
2
  import * as i from "react";
3
- import { useState as C, useCallback as S, useRef as pe, useMemo as W, useEffect as T } from "react";
4
- import { u as Ge } from "../../OptionList-BM4AleXV.js";
5
- import { u as Je, f as qe, g as Ue, a as Ze, b as Qe } from "../../index-Bcvmezbu.js";
6
- import { CKButton as ye } from "../CKButton/index.js";
7
- import { Search as Xe } from "../Search/index.js";
8
- import { EmptyState as Ye } from "../EmptyState/index.js";
9
- import { Loader as et } from "../Loader/index.js";
10
- import { S as tt, a as nt } from "../../table-filter-C0zetUfo.js";
11
- import { INITIAL_COLUMN_MANAGER_CONFIG as ke, ROW_MIN_HEIGHT as ot, TABLE_PREFIX as E } from "./constants.js";
12
- import it from "./_helpers/TableFilterModal/index.js";
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 lt from "./_helpers/GroupedHeader/index.js";
15
- import { SelectionHeaderCell as Ce } from "./_helpers/SelectionCell/index.js";
16
- import rt from "./_helpers/TableRows.js";
17
- import { useSelection as at } from "./_hooks/useSelection.js";
18
- import { useExpansion as ct } from "./_hooks/useExpansion.js";
19
- import { isTableConfigDefault as be, saveToLocalStorage as X, getTableMinWidth as dt, isTableConfigChanged as mt, pinnedStyle as Y, columnLayoutStyle as xe } from "./_utils/table.utils.js";
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 ut = (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" })), 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 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" })), 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("mask", { id: "mask0_1852_13537", style: {
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" }))), ht = (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 ve = !1;
26
- const Se = (c) => {
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 u = Number.parseFloat(c);
30
- return Number.isNaN(u) ? void 0 : u;
29
+ const f = Number.parseFloat(c);
30
+ return Number.isNaN(f) ? void 0 : f;
31
31
  }
32
32
  };
33
- function Kt({
33
+ function At({
34
34
  config: c = {},
35
- data: u = [],
36
- maxHeight: Ee = "600px",
35
+ data: f = [],
36
+ maxHeight: Me = "600px",
37
37
  virtualization: $ = !1,
38
38
  persistTableConfig: d = "",
39
- message: ee,
40
- icon: Me,
41
- totalRow: te,
39
+ message: te,
40
+ icon: Ie,
41
+ totalRow: ne,
42
42
  selection: P,
43
43
  expandable: _,
44
44
  externalColumnFilters: G,
45
- externalTableConfig: M,
46
- isLoading: ne = !1
45
+ externalTableConfig: k,
46
+ onConfigChange: Ne,
47
+ isLoading: oe = !1
47
48
  }) {
48
49
  const {
49
- headers: b = [],
50
- headerGroups: I,
51
- showFilters: Ie = !0,
52
- showColumnManager: Ne = !0,
53
- columnManagerConfig: oe = ke,
54
- toolbarLabels: ie,
55
- search: g
56
- } = c ?? {}, se = ie?.columnManager ?? !0, le = ie?.filter ?? !0, [z, Be] = C(""), re = S((e) => {
57
- Be(e), g?.onSearch?.(e);
58
- }, [g]), ae = pe(null), {
59
- selectionState: N,
60
- getRowId: Fe,
61
- toggleRowSelection: Le,
62
- toggleSelectAll: ce
63
- } = at(u, P), {
64
- expandedIds: We,
65
- toggleExpand: ze
66
- } = ct(_), D = W(
67
- () => b.map((e) => {
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, l) => {
70
- if (!l) return !0;
71
- const r = Array.isArray(l) ? l : l.values, m = Array.isArray(l) ? !1 : l.exclude;
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 v = String(n.getValue(o));
74
- return m ? !r.includes(v) : r.includes(v);
75
- } : e.type === "number" && (t = (n, o, l) => {
76
- if (!l) return !0;
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 >= l.min && r <= l.max;
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 && Se(e.minWidth) !== void 0 ? { minSize: Se(e.minWidth) } : {},
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
- [b]
94
- ), R = S(
98
+ [x]
99
+ ), K = I(
95
100
  () => ({
96
- ...ke,
97
- ...oe,
98
- columns: D
101
+ ...Ce,
102
+ ...ie,
103
+ columns: R
99
104
  }),
100
- [oe, D]
101
- ), de = () => {
102
- const e = R();
105
+ [ie, R]
106
+ ), ue = () => {
107
+ const e = K();
103
108
  if (d)
104
109
  try {
105
- const t = localStorage.getItem(`${E}-${d}`);
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 || [], l = /* @__PURE__ */ new Set(), r = o.map((m) => e.columns.find((v) => v.accessorKey === m.accessorKey)).filter((m) => !m || l.has(m.accessorKey) ? !1 : (l.add(m.accessorKey), !0));
110
- return e.columns.forEach((m) => {
111
- r.find((v) => v.accessorKey === m.accessorKey) || r.push(m);
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
- }, me = () => {
124
+ }, fe = () => {
120
125
  if (d)
121
126
  try {
122
- const e = localStorage.getItem(`${E}-${d}`);
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
- }, De = () => {
136
+ }, Re = () => {
132
137
  if (d)
133
138
  try {
134
- const e = localStorage.getItem(`${E}-${d}`);
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, ue] = C(de), [B, K] = C(de), [F, J] = C(me), [A, fe] = C(me), [p, Re] = C(De), [H, k] = C({ open: !1, type: "", activeOption: "" }), a = W(() => {
144
- const e = M ?? h;
145
- if (!M) return e;
146
- const t = new Map(D.map((n) => [n.accessorKey, n.filterFn]));
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 ? { ...n, filterFn: o } : n;
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
- }, [M, h, D]), Ke = G ?? F, Ae = W(() => {
168
+ }, [k, h, R]), Ae = G ?? L, He = z(() => {
155
169
  const e = {};
156
- return b.forEach((t) => {
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(u.map((o) => String(o[t.accessorKey] ?? "")).filter(Boolean))
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 = u.map((r) => Number(r[t.accessorKey])).filter((r) => !Number.isNaN(r)), o = n.length ? Math.floor(Math.min(...n)) : 0, l = n.length ? Math.ceil(Math.max(...n)) : 0;
165
- e[t.header] = { type: "range", values: { min: o, max: l }, accessorKey: t.accessorKey };
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
- }, [b, u, a.columnVisibility]);
170
- T(() => {
171
- if (d && !ve)
183
+ }, [x, f, a.columnVisibility]);
184
+ M(() => {
185
+ if (d && !Se)
172
186
  try {
173
- const e = F.length > 0, t = !be(h, R());
174
- (e || t) && (ve = !0);
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]), T(() => {
179
- d && Object.keys(p).length > 0 && X(`${E}-${d}`, { columnSizing: p });
180
- }, [p, d]), T(() => {
181
- J((e) => {
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 He = () => {
189
- const e = /* @__PURE__ */ new Set(), t = B.columns.filter((o) => e.has(o.accessorKey) ? !1 : (e.add(o.accessorKey), !0)), n = { ...B, columns: t };
190
- ue(n), k({ type: "", activeOption: "", open: !1 }), d && X(`${E}-${d}`, { tableConfig: n });
191
- }, Ve = () => {
192
- K(R);
193
- }, Oe = S((e, t) => {
194
- K((n) => {
195
- const o = [...n.columns], [l] = o.splice(e, 1);
196
- return o.splice(t, 0, l), { ...n, columns: o };
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
- }, []), je = S((e) => {
199
- ue((t) => {
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
- }, []), Te = W(() => {
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]), $e = W(() => {
213
- if (!g || g.mode !== "frontend" || !z.trim()) return u;
214
- const e = z.toLowerCase(), t = b.filter((n) => a.columnVisibility[n.accessorKey] !== !1).map((n) => n.accessorKey);
215
- return u.filter(
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 l = n[o];
218
- return l != null && String(l).toLowerCase().includes(e);
231
+ const s = n[o];
232
+ return s != null && String(s).toLowerCase().includes(e);
219
233
  })
220
234
  );
221
- }, [g, z, u, b, a.columnVisibility]), y = Je({
222
- data: $e,
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) => Fe(e, t),
241
+ getRowId: (e, t) => Le(e, t),
228
242
  state: {
229
243
  columnVisibility: a.columnVisibility,
230
- columnPinning: Te,
231
- columnFilters: Ke,
244
+ columnPinning: $e,
245
+ columnFilters: Ae,
232
246
  columnSizing: p
233
247
  },
234
- onColumnFiltersChange: J,
235
- onColumnSizingChange: Re,
248
+ onColumnFiltersChange: q,
249
+ onColumnSizingChange: Ke,
236
250
  enableRowSelection: !1,
237
251
  enableColumnResizing: !0,
238
252
  columnResizeMode: "onChange",
239
- onColumnVisibilityChange: je,
240
- getCoreRowModel: Qe(),
241
- getSortedRowModel: Ze(),
242
- getFilteredRowModel: Ue()
243
- }), { rows: V } = y.getRowModel(), x = y.getVisibleLeafColumns(), ge = x.length > 0 ? x[x.length - 1].id : null, L = (P?.enabled ?? !1) && !_?.enabled, O = L ? 40 : 0, q = dt(x, O, p), j = pe(/* @__PURE__ */ new Map()), he = S(
244
- (e) => j.current.get(e) || ot,
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
- ), w = Ge({
247
- count: V.length,
248
- getScrollElement: () => ae.current,
249
- estimateSize: he,
260
+ ), S = Je({
261
+ count: O.length,
262
+ getScrollElement: () => de.current,
263
+ estimateSize: pe,
250
264
  overscan: 5
251
265
  });
252
- T(() => {
253
- j.current.clear(), requestAnimationFrame(() => {
254
- w.measure();
266
+ M(() => {
267
+ T.current.clear(), requestAnimationFrame(() => {
268
+ S.measure();
255
269
  });
256
- }, [a.wrapText, w]);
257
- const Pe = S(
270
+ }, [a.wrapText, S]);
271
+ const _e = I(
258
272
  (e, t) => {
259
273
  if (!t) return;
260
- const n = t.offsetHeight, o = j.current.get(e);
261
- n && o !== n && (j.current.set(e, n), requestAnimationFrame(() => {
262
- w.measure();
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
- [w]
266
- ), U = (e) => e === "asc" ? /* @__PURE__ */ s(ut, {}) : e === "desc" ? /* @__PURE__ */ s(ft, {}) : /* @__PURE__ */ s(gt, {}), _e = H.type === "filter" ? /* @__PURE__ */ s(
267
- it,
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: Ae,
270
- draftColumnFilters: A,
271
- setDraftColumnFilters: fe,
283
+ filters: He,
284
+ draftColumnFilters: H,
285
+ setDraftColumnFilters: ge,
272
286
  handleApplyFilters: () => {
273
- J(A), k({ ...H, open: !1 }), d && X(`${E}-${d}`, { columnFilters: A });
287
+ q(H), C({ ...V, open: !1 }), d && Y(`${N}-${d}`, { columnFilters: H });
274
288
  },
275
- setModalOpen: k,
289
+ setModalOpen: C,
276
290
  virtualization: $,
277
- isFilterChanged: JSON.stringify(A) !== JSON.stringify(F)
291
+ isFilterChanged: JSON.stringify(H) !== JSON.stringify(L)
278
292
  }
279
- ) : /* @__PURE__ */ s(
293
+ ) : /* @__PURE__ */ l(
280
294
  st,
281
295
  {
282
- draftConfig: B,
283
- setDraftConfig: K,
284
- moveDraftColumn: Oe,
285
- handleApplyPref: He,
286
- setModalOpen: k,
287
- handleResetToDefault: Ve,
288
- isDefault: be(B, R()),
289
- isConfigChanged: mt(B, h)
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
- ), Z = Ne && !M, Q = Ie && !G;
292
- return /* @__PURE__ */ f("div", { children: [
293
- (g || Z || Q) && /* @__PURE__ */ f("div", { className: "ckds-filter-wrapper", style: { display: "flex", gap: "8px", margin: "20px 0", justifyContent: "space-between", alignItems: "center" }, children: [
294
- /* @__PURE__ */ s("div", { className: "ckds-toolbar-search", children: g && /* @__PURE__ */ s(
295
- Xe,
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: z,
298
- placeholder: g.placeholder ?? "Search",
299
- debounceMs: g.debounceMs ?? 0,
300
- onChange: re,
301
- onClear: () => re(""),
302
- disabled: ne
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
- (Z || Q) && /* @__PURE__ */ f("div", { style: { display: "flex", gap: "8px", alignItems: "center" }, children: [
306
- Z && /* @__PURE__ */ s(
307
- ye,
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
- K({ ...h, columnVisibility: { ...h.columnVisibility }, columns: [...h.columns] }), k({ open: !0, type: "columnManager", activeOption: "" });
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__ */ s(tt, {}) },
328
+ icons: { left: /* @__PURE__ */ l(nt, {}) },
315
329
  label: se ? "Column Manager" : void 0,
316
330
  iconOnly: !se
317
331
  }
318
332
  ),
319
- /* @__PURE__ */ s("div", { style: { borderRight: "1px solid var(--ckcl-black-200, #C2C2C2)", margin: "5px 0" } }),
320
- Q && /* @__PURE__ */ s(
321
- ye,
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 ${F.length > 0 ? "after:content-[''] after:absolute after:-top-[1px] after:-right-[1px] after:size-[5px] after:rounded-full after:bg-primary" : ""}`,
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
- fe(F), k({ open: !0, type: "filter", activeOption: "" });
339
+ ge(L), C({ open: !0, type: "filter", activeOption: "" });
326
340
  },
327
341
  variant: "secondary",
328
342
  size: "medium",
329
- icons: { right: /* @__PURE__ */ s(nt, {}) },
330
- label: le ? "Filters" : void 0,
331
- iconOnly: !le
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__ */ f("div", { style: { position: "relative" }, children: [
337
- ne && /* @__PURE__ */ s(et, { overlay: !0 }),
338
- /* @__PURE__ */ s(
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: ae,
343
- style: { maxHeight: Ee, width: y?.getHeaderGroups()?.[0]?.headers?.length === 1 ? "fit-content" : "100%" },
344
- children: V.length ? /* @__PURE__ */ f(
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: q, display: "block" },
362
+ style: { width: "100%", minWidth: U, display: "block" },
349
363
  children: [
350
- /* @__PURE__ */ f("thead", { className: "ckds-dragable-thead", style: { display: "block", position: "sticky", top: 0, zIndex: 10, minWidth: q, backgroundColor: "var(--ckds-cell-bg-default, #ffffff)" }, children: [
351
- I && I.length > 0 && /* @__PURE__ */ s(
352
- lt,
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: I,
368
+ headerGroups: B,
355
369
  table: y,
356
- hasSelection: L,
357
- getSortIcon: U,
358
- selectionCell: L ? /* @__PURE__ */ s(
359
- Ce,
370
+ hasSelection: W,
371
+ getSortIcon: Z,
372
+ selectionCell: W ? /* @__PURE__ */ l(
373
+ be,
360
374
  {
361
- isAllSelected: N.isAllSelected,
362
- isIndeterminate: N.isIndeterminate,
363
- onToggleAll: ce
375
+ isAllSelected: F.isAllSelected,
376
+ isIndeterminate: F.isIndeterminate,
377
+ onToggleAll: me
364
378
  }
365
379
  ) : void 0,
366
- lastColId: ge,
380
+ lastColId: he,
367
381
  columnSizing: p,
368
- pinnedStyle: Y,
369
- selectionOffset: O
382
+ pinnedStyle: ee,
383
+ selectionOffset: j
370
384
  }
371
385
  ),
372
- !(I && I.length > 0) && y.getHeaderGroups().map((e) => /* @__PURE__ */ f("tr", { className: "ckds-dragable-tr", style: { display: "flex", width: "100%" }, children: [
373
- L && /* @__PURE__ */ s(
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__ */ s(
379
- Ce,
392
+ children: /* @__PURE__ */ l(
393
+ be,
380
394
  {
381
- isAllSelected: N.isAllSelected,
382
- isIndeterminate: N.isIndeterminate,
383
- onToggleAll: ce
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 === ge;
390
- return /* @__PURE__ */ f(
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
- ...Y(t.column, y, O),
396
- ...xe(t.column, x, p),
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__ */ f(
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: (l) => {
418
- t.column.getCanSort() && (l.key === "Enter" || l.key === " ") && t.column.getToggleSortingHandler()?.(l);
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__ */ s("span", { className: "ckds-sort-icon ckds-sort-icon-left", children: U(t.column.getIsSorted()) }),
422
- qe(t.column.columnDef.header, t.getContext()),
423
- t.column.columnDef.align !== "right" && t.column.getCanSort() && /* @__PURE__ */ s("span", { className: "ckds-sort-icon", children: U(t.column.getIsSorted()) })
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__ */ s(
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__ */ s("div", { className: "ckds-col-resize-line" })
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__ */ s(
459
+ /* @__PURE__ */ l(
446
460
  "tbody",
447
461
  {
448
462
  className: "ckds-dragable-tbody",
449
463
  style: {
450
- height: $ && V.length ? `${w.getTotalSize()}px` : "auto",
464
+ height: $ && O.length ? `${S.getTotalSize()}px` : "auto",
451
465
  position: "relative",
452
466
  display: "block",
453
467
  width: "100%",
454
- minWidth: q
468
+ minWidth: U
455
469
  },
456
- children: /* @__PURE__ */ s(
457
- rt,
470
+ children: /* @__PURE__ */ l(
471
+ at,
458
472
  {
459
- rows: V,
473
+ rows: O,
460
474
  virtualization: $,
461
- rowVirtualizer: w,
462
- handleMeasure: Pe,
463
- getEstimatedSize: he,
475
+ rowVirtualizer: S,
476
+ handleMeasure: _e,
477
+ getEstimatedSize: pe,
464
478
  columnSizing: p,
465
479
  tableConfig: a,
466
480
  table: y,
467
- selectionState: N,
481
+ selectionState: F,
468
482
  selectionConfig: P,
469
- onToggleRowSelection: Le,
483
+ onToggleRowSelection: We,
470
484
  expandableConfig: _,
471
- expandedIds: We,
472
- onToggleExpand: ze
485
+ expandedIds: ze,
486
+ onToggleExpand: De
473
487
  }
474
488
  )
475
489
  }
476
490
  ),
477
- te && /* @__PURE__ */ s("tfoot", { className: "ckds-dragable-tfoot", style: { display: "block", position: "sticky", bottom: 0, zIndex: 10, backgroundColor: "var(--ckds-cell-bg-default, #ffffff)" }, children: /* @__PURE__ */ f("tr", { className: "ckds-dragable-tr", style: { display: "flex", width: "100%" }, children: [
478
- L && /* @__PURE__ */ s("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 } }),
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 = te[e.id], l = e.columnDef;
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__ */ s("span", { children: "Total" }) : o !== void 0 && (typeof o == "object" && o !== null ? r = /* @__PURE__ */ s("span", { children: o }) : l.prefix || l.suffix || l.decimalPlaces !== void 0 ? r = /* @__PURE__ */ s("span", { children: we(o, l) }) : r = /* @__PURE__ */ s("span", { children: o }));
483
- const m = l.align === "right" ? "right" : l.align === "center" ? "center" : "left";
484
- return /* @__PURE__ */ s(
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
- ...Y(e, y, O),
503
+ ...ee(e, y, j),
490
504
  display: "flex",
491
505
  alignItems: "center",
492
- ...xe(e, x, p),
506
+ ...ve(e, w, p),
493
507
  zIndex: n ? 2 : void 0
494
508
  },
495
- children: /* @__PURE__ */ s("div", { style: { width: "100%", textAlign: m, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: r })
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__ */ s(
504
- Ye,
517
+ ) : /* @__PURE__ */ l(
518
+ et,
505
519
  {
506
- icon: Me ?? /* @__PURE__ */ s(ht, {}),
520
+ icon: Ie ?? /* @__PURE__ */ l(pt, {}),
507
521
  message: {
508
- heading: ee?.heading ?? "No data to display",
509
- content: ee?.content ?? "There's no activity recorded for this period or filter selection."
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
- H.open && !G && !M && /* @__PURE__ */ s(
531
+ V.open && !G && !k && /* @__PURE__ */ l(
518
532
  "div",
519
533
  {
520
534
  className: "ckds-table-filter-modal-wr",
521
- onClick: () => k({ ...H, open: !1 }),
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__ */ s(
547
+ children: /* @__PURE__ */ l(
534
548
  "div",
535
549
  {
536
550
  className: "ckds-table-modal-box",
537
551
  onClick: (e) => e.stopPropagation(),
538
- children: _e
552
+ children: Ge
539
553
  }
540
554
  )
541
555
  }
@@ -543,6 +557,6 @@ function Kt({
543
557
  ] });
544
558
  }
545
559
  export {
546
- Kt as CustomTable,
547
- Kt as default
560
+ At as CustomTable,
561
+ At as default
548
562
  };