@ck-ui/component-library 1.0.6 → 1.0.7

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 (51) hide show
  1. package/dist/DropdownFooter-B1d0HFxd.js +96 -0
  2. package/dist/assets/{DropdownFooter-tfY7sg47.css → DropdownFooter-CRxQRvLY.css} +1 -1
  3. package/dist/assets/{index-BpRKr5z7.css → index-31u7i502.css} +1 -1
  4. package/dist/assets/index-C8gvpfKZ.css +1 -0
  5. package/dist/assets/index-D5sFw3XA.css +1 -0
  6. package/dist/assets/styles-BATmGmYA.css +1 -0
  7. package/dist/assets/styles-DAqMiQ0N.css +1 -0
  8. package/dist/components/FusionChart/_config/builders.d.ts.map +1 -1
  9. package/dist/components/FusionChart/_config/builders.js +172 -145
  10. package/dist/components/FusionChart/_config/events.d.ts.map +1 -1
  11. package/dist/components/FusionChart/_config/events.js +44 -30
  12. package/dist/components/FusionChart/_config/helpers.d.ts +10 -0
  13. package/dist/components/FusionChart/_config/helpers.d.ts.map +1 -1
  14. package/dist/components/FusionChart/_config/helpers.js +6 -3
  15. package/dist/components/FusionChart/_helpers/doughnutHelper.d.ts.map +1 -1
  16. package/dist/components/FusionChart/_helpers/doughnutHelper.js +63 -53
  17. package/dist/components/FusionChart/index.js +34 -34
  18. package/dist/components/IconButton/index.js +20 -20
  19. package/dist/components/MultiSelect/SimpleMultiSelect.d.ts.map +1 -1
  20. package/dist/components/MultiSelect/SimpleMultiSelect.js +30 -30
  21. package/dist/components/MultiSelect/_helpers/DropdownFooter.js +1 -1
  22. package/dist/components/MultiSelect/_helpers/OptionRow.js +1 -1
  23. package/dist/components/MultiSelect/_helpers/OverflowMenu.d.ts.map +1 -1
  24. package/dist/components/MultiSelect/_helpers/OverflowMenu.js +5 -33
  25. package/dist/components/MultiSelect/_helpers/OverflowMenuItem.js +1 -1
  26. package/dist/components/MultiSelect/_helpers/SearchResult.js +1 -1
  27. package/dist/components/MultiSelect/_helpers/TagContent.js +1 -1
  28. package/dist/components/MultiSelect/_helpers/TriggerButton.d.ts +1 -1
  29. package/dist/components/MultiSelect/_helpers/TriggerButton.d.ts.map +1 -1
  30. package/dist/components/MultiSelect/_helpers/TriggerButton.js +99 -73
  31. package/dist/components/MultiSelect/index.d.ts.map +1 -1
  32. package/dist/components/MultiSelect/index.js +27 -27
  33. package/dist/components/Pagination/index.d.ts.map +1 -1
  34. package/dist/components/Pagination/index.js +101 -92
  35. package/dist/components/SingleSelectDropdown/_helpers/DropdownFooter.js +2 -2
  36. package/dist/components/SingleSelectDropdown/index.js +2 -2
  37. package/dist/components/Table/_hooks/useOverlayScrollbar.d.ts +7 -0
  38. package/dist/components/Table/_hooks/useOverlayScrollbar.d.ts.map +1 -0
  39. package/dist/components/Table/_hooks/useOverlayScrollbar.js +90 -0
  40. package/dist/components/Table/_utils/table.utils.d.ts.map +1 -1
  41. package/dist/components/Table/_utils/table.utils.js +32 -37
  42. package/dist/components/Table/index.d.ts.map +1 -1
  43. package/dist/components/Table/index.js +290 -273
  44. package/dist/styles.module-BJEFZA32.js +56 -0
  45. package/package.json +1 -1
  46. package/dist/DropdownFooter-B63OOZOS.js +0 -96
  47. package/dist/assets/index-DyCyrZSK.css +0 -1
  48. package/dist/assets/index-nXJu3Pq0.css +0 -1
  49. package/dist/assets/styles-DngCqCGW.css +0 -1
  50. package/dist/assets/styles-infyYXuZ.css +0 -1
  51. package/dist/styles.module-DlIBNC4w.js +0 -55
@@ -1,130 +1,141 @@
1
- import { jsx as l, jsxs as g } from "react/jsx-runtime";
2
- import * as i from "react";
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
- import st from "./_helpers/ColumnManager/index.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
- import { formatCellValue as we } from "./_utils/formatCellValue.js";
21
- import '../../assets/styles-DngCqCGW.css';/* empty css */
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: {
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__ */ 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
- if (typeof c == "number") return c;
28
- if (typeof c == "string" && c.trim().endsWith("px")) {
29
- const f = Number.parseFloat(c);
30
- return Number.isNaN(f) ? void 0 : f;
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 At({
34
- config: c = {},
35
- data: f = [],
36
- maxHeight: Me = "600px",
37
- virtualization: $ = !1,
38
- persistTableConfig: d = "",
39
- message: te,
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: ne,
42
- selection: P,
43
- expandable: _,
44
- externalColumnFilters: G,
45
- externalTableConfig: k,
46
- onConfigChange: Ne,
47
- isLoading: oe = !1
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: x = [],
59
+ headers: v = [],
51
60
  headerGroups: B,
52
61
  showFilters: Be = !0,
53
- showColumnManager: Fe = !0,
54
- columnManagerConfig: ie = Ce,
62
+ showColumnManager: Le = !0,
63
+ columnManagerConfig: se = be,
55
64
  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) => {
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 r = Array.isArray(s) ? s : s.values, u = Array.isArray(s) ? !1 : s.exclude;
77
- if (!r || r.length === 0) return !0;
78
- const E = String(n.getValue(o));
79
- return u ? !r.includes(E) : r.includes(E);
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 r = Number(n.getValue(o));
83
- return r >= s.min && r <= s.max;
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 && Ee(e.minWidth) !== void 0 ? { minSize: Ee(e.minWidth) } : {},
89
- ...e.type === "number" ? { sortingFn: "alphanumeric" } : {},
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) => we(n.getValue(), e)
105
+ cell: (n) => Se(n.getValue(), e)
95
106
  } : {}
96
107
  };
97
108
  }),
98
- [x]
99
- ), K = I(
109
+ [v]
110
+ ), H = I(
100
111
  () => ({
101
- ...Ce,
102
- ...ie,
103
- columns: R
112
+ ...be,
113
+ ...se,
114
+ columns: A
104
115
  }),
105
- [ie, R]
106
- ), ue = () => {
107
- const e = K();
108
- if (d)
116
+ [se, A]
117
+ ), fe = () => {
118
+ const e = H();
119
+ if (c)
109
120
  try {
110
- const t = localStorage.getItem(`${N}-${d}`);
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(), 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);
117
- }), { ...e, ...n.tableConfig, columns: r };
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
- }, fe = () => {
125
- if (d)
135
+ }, ge = () => {
136
+ if (c)
126
137
  try {
127
- const e = localStorage.getItem(`${N}-${d}`);
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
- }, Re = () => {
137
- if (d)
147
+ }, Ke = () => {
148
+ if (c)
138
149
  try {
139
- const e = localStorage.getItem(`${N}-${d}`);
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, 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]));
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
- }, [k, h, R]), Ae = G ?? L, He = z(() => {
179
+ }, [C, h, A]), Ae = q ?? z, He = R(() => {
169
180
  const e = {};
170
- return x.forEach((t) => {
171
- if (a.columnVisibility[t.accessorKey] !== !1) {
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(f.map((o) => String(o[t.accessorKey] ?? "")).filter(Boolean))
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 = 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;
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
- }, [x, f, a.columnVisibility]);
184
- M(() => {
185
- if (d && !Se)
194
+ }, [v, m, d.columnVisibility]);
195
+ w(() => {
196
+ if (c && !Ne)
186
197
  try {
187
- const e = L.length > 0, t = !xe(h, K());
188
- (e || t) && (Se = !0);
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
- }, [d]), M(() => {
193
- d && Object.keys(p).length > 0 && Y(`${N}-${d}`, { columnSizing: p });
194
- }, [p, d]), M(() => {
195
- q((e) => {
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 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) => {
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
- }, []), Te = I((e) => {
213
- J((t) => {
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
- }, []), $e = z(() => {
218
- const e = [], t = [], n = a.columns.filter(
219
- (o) => a.columnVisibility[o.accessorKey] !== !1
228
+ }, []), Pe = R(() => {
229
+ const e = [], t = [], n = d.columns.filter(
230
+ (o) => d.columnVisibility[o.accessorKey] !== !1
220
231
  );
221
- if (a.stickyStart === "first" && n.length > 0 && e.push(n[0].accessorKey), a.stickyStart === "firstTwo" && n.length > 1 && (e.push(n[0].accessorKey), e.push(n[1].accessorKey)), a.stickyEnd === "last" && n.length > 0) {
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
- }, [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(
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
- }, [m, D, f, x, a.columnVisibility]), y = qe({
236
- data: Pe,
237
- columns: a.columns,
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
- getRowId: (e, t) => Le(e, t),
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: a.columnVisibility,
244
- columnPinning: $e,
260
+ columnVisibility: d.columnVisibility,
261
+ columnPinning: Pe,
245
262
  columnFilters: Ae,
246
263
  columnSizing: p
247
264
  },
248
- onColumnFiltersChange: q,
249
- onColumnSizingChange: Ke,
265
+ onColumnFiltersChange: Z,
266
+ onColumnSizingChange: Ve,
250
267
  enableRowSelection: !1,
251
268
  enableColumnResizing: !0,
252
269
  columnResizeMode: "onChange",
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,
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
- ), S = Je({
261
- count: O.length,
262
- getScrollElement: () => de.current,
263
- estimateSize: pe,
277
+ ), N = qe({
278
+ count: $.length,
279
+ getScrollElement: () => L.current,
280
+ estimateSize: ye,
264
281
  overscan: 5
265
282
  });
266
- M(() => {
267
- T.current.clear(), requestAnimationFrame(() => {
268
- S.measure();
283
+ w(() => {
284
+ _.current.clear(), requestAnimationFrame(() => {
285
+ N.measure();
269
286
  });
270
- }, [a.wrapText, S]);
271
- const _e = I(
287
+ }, [d.wrapText, N]);
288
+ const Ge = I(
272
289
  (e, t) => {
273
290
  if (!t) return;
274
- const n = t.offsetHeight, o = T.current.get(e);
275
- n && o !== n && (T.current.set(e, n), requestAnimationFrame(() => {
276
- S.measure();
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
- [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,
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: H,
285
- setDraftColumnFilters: ge,
301
+ draftColumnFilters: j,
302
+ setDraftColumnFilters: he,
286
303
  handleApplyFilters: () => {
287
- q(H), C({ ...V, open: !1 }), d && Y(`${N}-${d}`, { columnFilters: H });
304
+ Z(j), b({ ...T, open: !1 }), c && te(`${F}-${c}`, { columnFilters: j });
288
305
  },
289
- setModalOpen: C,
290
- virtualization: $,
291
- isFilterChanged: JSON.stringify(H) !== JSON.stringify(L)
306
+ setModalOpen: b,
307
+ virtualization: k,
308
+ isFilterChanged: JSON.stringify(j) !== JSON.stringify(z)
292
309
  }
293
- ) : /* @__PURE__ */ l(
294
- st,
310
+ ) : /* @__PURE__ */ i(
311
+ lt,
295
312
  {
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)
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
- ), Q = Fe, X = Be && !G;
322
+ ), Y = Le, ee = Be && !q;
306
323
  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,
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: D,
312
- placeholder: m.placeholder ?? "Search",
313
- debounceMs: m.debounceMs ?? 0,
314
- onChange: ce,
315
- onClear: () => ce(""),
316
- disabled: oe
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
- (Q || X) && /* @__PURE__ */ g("div", { style: { display: "flex", gap: "8px", alignItems: "center" }, children: [
320
- Q && /* @__PURE__ */ l(
321
- ke,
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
- A({ ...h, columnVisibility: { ...h.columnVisibility }, columns: [...h.columns] }), C({ open: !0, type: "columnManager", activeOption: "" });
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__ */ l(nt, {}) },
329
- label: se ? "Column Manager" : void 0,
330
- iconOnly: !se
345
+ icons: { left: /* @__PURE__ */ i(ot, {}) },
346
+ label: ae ? "Column Manager" : void 0,
347
+ iconOnly: !ae
331
348
  }
332
349
  ),
333
- /* @__PURE__ */ l("div", { style: { borderRight: "1px solid var(--ckcl-black-200, #C2C2C2)", margin: "5px 0" } }),
334
- X && /* @__PURE__ */ l(
335
- ke,
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 ${L.length > 0 ? "after:content-[''] after:absolute after:-top-[1px] after:-right-[1px] after:size-[5px] after:rounded-full after:bg-primary" : ""}`,
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
- ge(L), C({ open: !0, type: "filter", activeOption: "" });
356
+ he(z), b({ open: !0, type: "filter", activeOption: "" });
340
357
  },
341
358
  variant: "secondary",
342
359
  size: "medium",
343
- icons: { right: /* @__PURE__ */ l(ot, {}) },
344
- label: re ? "Filters" : void 0,
345
- iconOnly: !re
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
- oe && /* @__PURE__ */ l(tt, { overlay: !0 }),
352
- /* @__PURE__ */ l(
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: de,
357
- style: { maxHeight: Me, width: y?.getHeaderGroups()?.[0]?.headers?.length === 1 ? "fit-content" : "100%" },
358
- children: O.length ? /* @__PURE__ */ g(
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: U, display: "block" },
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: U, backgroundColor: "var(--ckds-cell-bg-default, #ffffff)" }, children: [
365
- B && B.length > 0 && /* @__PURE__ */ l(
366
- rt,
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: W,
371
- getSortIcon: Z,
372
- selectionCell: W ? /* @__PURE__ */ l(
373
- be,
387
+ hasSelection: D,
388
+ getSortIcon: X,
389
+ selectionCell: D ? /* @__PURE__ */ i(
390
+ xe,
374
391
  {
375
- isAllSelected: F.isAllSelected,
376
- isIndeterminate: F.isIndeterminate,
377
- onToggleAll: me
392
+ isAllSelected: W.isAllSelected,
393
+ isIndeterminate: W.isIndeterminate,
394
+ onToggleAll: ue
378
395
  }
379
396
  ) : void 0,
380
- lastColId: he,
397
+ lastColId: pe,
381
398
  columnSizing: p,
382
- pinnedStyle: ee,
383
- selectionOffset: j
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
- W && /* @__PURE__ */ l(
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__ */ l(
393
- be,
409
+ children: /* @__PURE__ */ i(
410
+ xe,
394
411
  {
395
- isAllSelected: F.isAllSelected,
396
- isIndeterminate: F.isIndeterminate,
397
- onToggleAll: me
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 === he;
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
- ...ee(t.column, y, j),
410
- ...ve(t.column, w, p),
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__ */ 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()) })
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__ */ l(
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__ */ l("div", { className: "ckds-col-resize-line" })
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__ */ l(
476
+ /* @__PURE__ */ i(
460
477
  "tbody",
461
478
  {
462
479
  className: "ckds-dragable-tbody",
463
480
  style: {
464
- height: $ && O.length ? `${S.getTotalSize()}px` : "auto",
481
+ height: k && $.length ? `${N.getTotalSize()}px` : "auto",
465
482
  position: "relative",
466
483
  display: "block",
467
484
  width: "100%",
468
- minWidth: U
485
+ minWidth: Q
469
486
  },
470
- children: /* @__PURE__ */ l(
471
- at,
487
+ children: /* @__PURE__ */ i(
488
+ ct,
472
489
  {
473
- rows: O,
474
- virtualization: $,
475
- rowVirtualizer: S,
476
- handleMeasure: _e,
477
- getEstimatedSize: pe,
490
+ rows: $,
491
+ virtualization: k,
492
+ rowVirtualizer: N,
493
+ handleMeasure: Ge,
494
+ getEstimatedSize: ye,
478
495
  columnSizing: p,
479
- tableConfig: a,
496
+ tableConfig: d,
480
497
  table: y,
481
- selectionState: F,
482
- selectionConfig: P,
483
- onToggleRowSelection: We,
484
- expandableConfig: _,
485
- expandedIds: ze,
486
- onToggleExpand: De
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
- 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 } }),
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 = ne[e.id], s = e.columnDef;
495
- let r = null;
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(
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
- ...ee(e, y, j),
520
+ ...ne(e, y, P),
504
521
  display: "flex",
505
522
  alignItems: "center",
506
- ...ve(e, w, p),
523
+ ...ve(e, E, p),
507
524
  zIndex: n ? 2 : void 0
508
525
  },
509
- children: /* @__PURE__ */ l("div", { style: { width: "100%", textAlign: u, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: r })
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__ */ l(
518
- et,
534
+ ) : /* @__PURE__ */ i(
535
+ tt,
519
536
  {
520
- icon: Ie ?? /* @__PURE__ */ l(pt, {}),
537
+ icon: Ie ?? /* @__PURE__ */ i(kt, {}),
521
538
  message: {
522
- heading: te?.heading ?? "No data to display",
523
- content: te?.content ?? "There's no activity recorded for this period or filter selection."
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
- V.open && !G && !k && /* @__PURE__ */ l(
548
+ T.open && !q && !C && /* @__PURE__ */ i(
532
549
  "div",
533
550
  {
534
551
  className: "ckds-table-filter-modal-wr",
535
- onClick: () => C({ ...V, open: !1 }),
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__ */ l(
564
+ children: /* @__PURE__ */ i(
548
565
  "div",
549
566
  {
550
567
  className: "ckds-table-modal-box",
551
568
  onClick: (e) => e.stopPropagation(),
552
- children: Ge
569
+ children: Je
553
570
  }
554
571
  )
555
572
  }
@@ -557,6 +574,6 @@ function At({
557
574
  ] });
558
575
  }
559
576
  export {
560
- At as CustomTable,
561
- At as default
577
+ jt as CustomTable,
578
+ jt as default
562
579
  };