@ck-ui/component-library 0.3.0 → 1.0.0

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