@ck-ui/component-library 0.3.0 → 1.0.1

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