@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.
- package/dist/DropdownFooter-Dm6aLDx8.js +89 -0
- package/dist/IconSlot-CPQsGPB-.js +33 -0
- package/dist/{OptionList-BNaH2PnX.js → OptionList-DN1xZbnV.js} +29 -29
- package/dist/assets/DropdownFooter-DjdPf69A.css +1 -0
- package/dist/assets/IconSlot-D8WWEHKb.css +1 -0
- package/dist/assets/index-B81zpOpq.css +1 -0
- package/dist/assets/index-BXwGxK7I.css +1 -0
- package/dist/assets/index-BZgvXFWW.css +1 -0
- package/dist/assets/index-BoQKDmZt.css +1 -0
- package/dist/assets/index-Cdmws__2.css +1 -0
- package/dist/assets/index-CtR-jzNi.css +1 -0
- package/dist/assets/index-PKpDB4Cl.css +1 -0
- package/dist/assets/index-UphWJR2V.css +1 -0
- package/dist/assets/index-i-aBFBOq.css +1 -0
- package/dist/assets/styles-Bj-7zn37.css +1 -0
- package/dist/assets/styles-CZCmGNUn.css +1 -0
- package/dist/assets/styles-DLJzdWsF.css +1 -0
- package/dist/assets/{styles-CbbBUzsN.css → styles-DngCqCGW.css} +1 -1
- package/dist/assets/styles-O-5pBCak.css +1 -0
- package/dist/components/Breadcrumb/index.d.ts.map +1 -1
- package/dist/components/Breadcrumb/index.js +53 -47
- package/dist/components/CKButton/_helper/ComboLayout.js +1 -1
- package/dist/components/CKButton/_helper/IconSlot.js +1 -1
- package/dist/components/CKButton/_helper/StandardLayout.js +1 -1
- package/dist/components/CKButton/index.js +1 -1
- package/dist/components/CKCheckbox/index.d.ts.map +1 -1
- package/dist/components/CKCheckbox/index.js +22 -21
- package/dist/components/CardBox/index.js +18 -18
- package/dist/components/CostComparatorTable/_helpers/CostCell.d.ts +3 -1
- package/dist/components/CostComparatorTable/_helpers/CostCell.d.ts.map +1 -1
- package/dist/components/CostComparatorTable/_helpers/CostCell.js +30 -28
- package/dist/components/CostComparatorTable/_helpers/HeaderCheckbox.js +1 -1
- package/dist/components/CostComparatorTable/_types/costComparatorTable.types.d.ts +7 -0
- package/dist/components/CostComparatorTable/_types/costComparatorTable.types.d.ts.map +1 -1
- package/dist/components/CostComparatorTable/index.d.ts +1 -1
- package/dist/components/CostComparatorTable/index.d.ts.map +1 -1
- package/dist/components/CostComparatorTable/index.js +93 -85
- package/dist/components/DateRangePicker/DateRangePicker.d.ts.map +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.js +1685 -1651
- package/dist/components/DateRangePicker/_types/dateRangePicker.types.d.ts +10 -0
- package/dist/components/DateRangePicker/_types/dateRangePicker.types.d.ts.map +1 -1
- package/dist/components/FusionChart/_config/builders.d.ts.map +1 -1
- package/dist/components/FusionChart/_config/builders.js +141 -141
- package/dist/components/FusionChart/_config/helpers.js +2 -2
- package/dist/components/FusionChart/_helpers/doughnutHelper.d.ts.map +1 -1
- package/dist/components/FusionChart/_helpers/doughnutHelper.js +56 -43
- package/dist/components/FusionChart/index.d.ts.map +1 -1
- package/dist/components/FusionChart/index.js +356 -340
- package/dist/components/Loader/_types/loader.types.d.ts +10 -0
- package/dist/components/Loader/_types/loader.types.d.ts.map +1 -0
- package/dist/components/Loader/_types/loader.types.js +1 -0
- package/dist/components/Loader/index.d.ts +6 -0
- package/dist/components/Loader/index.d.ts.map +1 -0
- package/dist/components/Loader/index.js +37 -0
- package/dist/components/MAVDropdown/_types/mavDropdown.types.d.ts +27 -0
- package/dist/components/MAVDropdown/_types/mavDropdown.types.d.ts.map +1 -0
- package/dist/components/MAVDropdown/_types/mavDropdown.types.js +1 -0
- package/dist/components/MAVDropdown/index.d.ts +6 -0
- package/dist/components/MAVDropdown/index.d.ts.map +1 -0
- package/dist/components/MAVDropdown/index.js +162 -0
- package/dist/components/MetricCards/Component/CardWithIconAndForecast/index.js +33 -33
- package/dist/components/MultiSelect/SimpleMultiSelect.d.ts +22 -0
- package/dist/components/MultiSelect/SimpleMultiSelect.d.ts.map +1 -0
- package/dist/components/MultiSelect/SimpleMultiSelect.js +221 -0
- package/dist/components/MultiSelect/_helpers/DropdownFooter.js +1 -1
- package/dist/components/MultiSelect/_helpers/OptionRow.js +1 -1
- package/dist/components/MultiSelect/_helpers/OverflowMenu.js +1 -1
- package/dist/components/MultiSelect/_helpers/OverflowMenuItem.js +1 -1
- package/dist/components/MultiSelect/_helpers/SearchResult.js +1 -1
- package/dist/components/MultiSelect/_helpers/TagContent.d.ts.map +1 -1
- package/dist/components/MultiSelect/_helpers/TagContent.js +20 -19
- package/dist/components/MultiSelect/_helpers/TriggerButton.d.ts.map +1 -1
- package/dist/components/MultiSelect/_helpers/TriggerButton.js +39 -34
- package/dist/components/MultiSelect/_types/type.d.ts +4 -0
- package/dist/components/MultiSelect/_types/type.d.ts.map +1 -1
- package/dist/components/MultiSelect/index.d.ts +1 -1
- package/dist/components/MultiSelect/index.d.ts.map +1 -1
- package/dist/components/MultiSelect/index.js +148 -145
- package/dist/components/ProfileDropdown/_types/profileDropdown.types.d.ts +28 -0
- package/dist/components/ProfileDropdown/_types/profileDropdown.types.d.ts.map +1 -0
- package/dist/components/ProfileDropdown/_types/profileDropdown.types.js +13 -0
- package/dist/components/ProfileDropdown/constants.d.ts +3 -0
- package/dist/components/ProfileDropdown/constants.d.ts.map +1 -0
- package/dist/components/ProfileDropdown/constants.js +8 -0
- package/dist/components/ProfileDropdown/index.d.ts +6 -0
- package/dist/components/ProfileDropdown/index.d.ts.map +1 -0
- package/dist/components/ProfileDropdown/index.js +154 -0
- package/dist/components/RadioButton/index.js +34 -34
- package/dist/components/RadioGroup/_types/radioGroup.types.d.ts +1 -0
- package/dist/components/RadioGroup/_types/radioGroup.types.d.ts.map +1 -1
- package/dist/components/RadioGroup/index.d.ts +1 -1
- package/dist/components/RadioGroup/index.d.ts.map +1 -1
- package/dist/components/RadioGroup/index.js +19 -17
- package/dist/components/Search/index.js +35 -35
- package/dist/components/SingleSelectDropdown/_helpers/DropdownFooter.d.ts +2 -1
- package/dist/components/SingleSelectDropdown/_helpers/DropdownFooter.d.ts.map +1 -1
- package/dist/components/SingleSelectDropdown/_helpers/DropdownFooter.js +7 -3
- package/dist/components/SingleSelectDropdown/_types/singleSelectDropdown.types.d.ts +2 -2
- package/dist/components/SingleSelectDropdown/_types/singleSelectDropdown.types.d.ts.map +1 -1
- package/dist/components/SingleSelectDropdown/index.d.ts +1 -1
- package/dist/components/SingleSelectDropdown/index.d.ts.map +1 -1
- package/dist/components/SingleSelectDropdown/index.js +61 -57
- package/dist/components/Table/_helpers/ColumnManager/ColumnConfig.d.ts +1 -0
- package/dist/components/Table/_helpers/ColumnManager/ColumnConfig.d.ts.map +1 -1
- package/dist/components/Table/_helpers/ColumnManager/ColumnConfig.js +49 -47
- package/dist/components/Table/_helpers/ColumnManager/index.d.ts.map +1 -1
- package/dist/components/Table/_helpers/ColumnManager/index.js +393 -385
- package/dist/components/Table/_helpers/ExpandableRow/index.d.ts.map +1 -1
- package/dist/components/Table/_helpers/ExpandableRow/index.js +30 -20
- package/dist/components/Table/_helpers/GroupedHeader/index.d.ts +2 -2
- package/dist/components/Table/_helpers/GroupedHeader/index.d.ts.map +1 -1
- package/dist/components/Table/_helpers/GroupedHeader/index.js +79 -87
- package/dist/components/Table/_helpers/TableFilterModal/OptionList.js +1 -1
- package/dist/components/Table/_helpers/TableFilterModal/index.d.ts.map +1 -1
- package/dist/components/Table/_helpers/TableFilterModal/index.js +43 -42
- package/dist/components/Table/_helpers/TableRows.d.ts +1 -1
- package/dist/components/Table/_helpers/TableRows.d.ts.map +1 -1
- package/dist/components/Table/_helpers/TableRows.js +288 -283
- package/dist/components/Table/_types/table.types.d.ts +9 -3
- package/dist/components/Table/_types/table.types.d.ts.map +1 -1
- package/dist/components/Table/_utils/table.utils.d.ts +3 -0
- package/dist/components/Table/_utils/table.utils.d.ts.map +1 -1
- package/dist/components/Table/_utils/table.utils.js +73 -23
- package/dist/components/Table/index.d.ts +1 -1
- package/dist/components/Table/index.d.ts.map +1 -1
- package/dist/components/Table/index.js +388 -358
- package/dist/components/Typography/index.js +30 -30
- package/dist/main.d.ts +6 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +97 -85
- package/dist/styles.module-BXby6f8d.js +16 -0
- package/dist/styles.module-DakCndIP.js +42 -0
- package/package.json +1 -1
- package/dist/DropdownFooter-C20yRiDR.js +0 -84
- package/dist/IconSlot-CFKmSU2_.js +0 -33
- package/dist/assets/DropdownFooter-C7Cml53c.css +0 -1
- package/dist/assets/IconSlot-CLpdZgmb.css +0 -1
- package/dist/assets/index-BQ0m7FKV.css +0 -1
- package/dist/assets/index-BmQOtMhS.css +0 -1
- package/dist/assets/index-CaWXKQ7j.css +0 -1
- package/dist/assets/index-CiQd_iRw.css +0 -1
- package/dist/assets/index-Dudb2XKF.css +0 -1
- package/dist/assets/index-w7AdSPwF.css +0 -1
- package/dist/assets/styles-BA66-SUu.css +0 -1
- package/dist/assets/styles-BTZL03H2.css +0 -1
- package/dist/assets/styles-CflOKRvX.css +0 -1
- package/dist/assets/styles-D8sahtFb.css +0 -1
- package/dist/styles.module-CCyijXTv.js +0 -16
- package/dist/styles.module-CmWIIYpK.js +0 -41
|
@@ -1,403 +1,408 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { f as
|
|
3
|
-
import { useRef as
|
|
4
|
-
import {
|
|
5
|
-
import { ROW_MIN_HEIGHT as
|
|
6
|
-
import { SelectionCell as
|
|
7
|
-
import { ExpandableRowToggle as
|
|
1
|
+
import { jsx as t, Fragment as V, jsxs as I } from "react/jsx-runtime";
|
|
2
|
+
import { f as z } from "../../../index-f7TB87Mf.js";
|
|
3
|
+
import { useRef as q, useState as K, useCallback as Q } from "react";
|
|
4
|
+
import { columnLayoutStyle as O, pinnedStyle as T } from "../_utils/table.utils.js";
|
|
5
|
+
import { ROW_MIN_HEIGHT as W } from "../constants.js";
|
|
6
|
+
import { SelectionCell as j } from "./SelectionCell/index.js";
|
|
7
|
+
import { ExpandableRowToggle as G } from "./ExpandableRow/index.js";
|
|
8
8
|
import { Tooltip as U } from "../../Tooltip/index.js";
|
|
9
|
-
import { mergeClasses as
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
import { mergeClasses as B } from "../../../utils/mergeClasses.js";
|
|
10
|
+
const _ = [
|
|
11
|
+
"var(--ckcl-primary-50, #F8FBFF)",
|
|
12
|
+
// depth 1
|
|
13
|
+
"var(--ckcl-primary-80, #F1F6FF)",
|
|
14
|
+
// depth 2
|
|
15
|
+
"var(--ckcl-primary-100, #D9E6FB)"
|
|
16
|
+
// depth 3+
|
|
17
|
+
];
|
|
18
|
+
function X(r) {
|
|
19
|
+
if (r < 1) return;
|
|
20
|
+
const e = Math.min(r - 1, _.length - 1);
|
|
21
|
+
return _[e];
|
|
14
22
|
}
|
|
15
|
-
function
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
23
|
+
function E(r, e, m) {
|
|
24
|
+
const l = X(r);
|
|
25
|
+
return l || (e && m % 2 !== 0 ? "var(--ckds-cell-bg-striped, var(--ckcl-primary-50))" : "var(--ckds-cell-bg-default, #ffffff)");
|
|
26
|
+
}
|
|
27
|
+
function H(r) {
|
|
28
|
+
const e = r?.align;
|
|
29
|
+
if (e === "right") return "flex-end";
|
|
30
|
+
if (e === "center") return "center";
|
|
31
|
+
}
|
|
32
|
+
function R(r) {
|
|
33
|
+
const e = r?.align;
|
|
34
|
+
if (e === "right") return "right";
|
|
35
|
+
if (e === "center") return "center";
|
|
19
36
|
}
|
|
20
37
|
function M({
|
|
21
38
|
title: r,
|
|
22
|
-
wrapText:
|
|
23
|
-
children:
|
|
39
|
+
wrapText: e,
|
|
40
|
+
children: m
|
|
24
41
|
}) {
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
}, []),
|
|
42
|
+
const l = q(null), [y, g] = K(!1), d = Q(() => {
|
|
43
|
+
l.current && g(l.current.scrollWidth > l.current.offsetWidth);
|
|
44
|
+
}, []), o = /* @__PURE__ */ t(
|
|
28
45
|
"div",
|
|
29
46
|
{
|
|
30
|
-
ref:
|
|
31
|
-
onMouseEnter:
|
|
32
|
-
className: `${
|
|
33
|
-
children:
|
|
47
|
+
ref: l,
|
|
48
|
+
onMouseEnter: e ? void 0 : d,
|
|
49
|
+
className: `${e ? "whitespace-normal wrap-break-word" : "whitespace-nowrap overflow-hidden text-ellipsis"} w-full`,
|
|
50
|
+
children: m
|
|
34
51
|
}
|
|
35
52
|
);
|
|
36
|
-
return
|
|
53
|
+
return e || !y ? o : /* @__PURE__ */ t(U, { title: r, placement: "top", arrow: !0, children: o });
|
|
37
54
|
}
|
|
38
|
-
function
|
|
55
|
+
function ae({
|
|
39
56
|
rows: r,
|
|
40
|
-
virtualization:
|
|
41
|
-
rowVirtualizer:
|
|
42
|
-
handleMeasure:
|
|
43
|
-
getEstimatedSize:
|
|
44
|
-
|
|
45
|
-
lastNonPinnedColId: u,
|
|
57
|
+
virtualization: e,
|
|
58
|
+
rowVirtualizer: m,
|
|
59
|
+
handleMeasure: l,
|
|
60
|
+
getEstimatedSize: y,
|
|
61
|
+
columnSizing: g,
|
|
46
62
|
tableConfig: d,
|
|
47
|
-
table:
|
|
48
|
-
selectionState:
|
|
49
|
-
selectionConfig:
|
|
50
|
-
onToggleRowSelection:
|
|
51
|
-
expandableConfig:
|
|
52
|
-
expandedIds:
|
|
53
|
-
onToggleExpand:
|
|
63
|
+
table: o,
|
|
64
|
+
selectionState: i,
|
|
65
|
+
selectionConfig: h,
|
|
66
|
+
onToggleRowSelection: k,
|
|
67
|
+
expandableConfig: a,
|
|
68
|
+
expandedIds: b,
|
|
69
|
+
onToggleExpand: p,
|
|
54
70
|
depth: D = 0
|
|
55
71
|
}) {
|
|
56
|
-
const f = (
|
|
57
|
-
return
|
|
58
|
-
const
|
|
59
|
-
return /* @__PURE__ */
|
|
72
|
+
const f = (h?.enabled ?? !1) && !a?.enabled, u = f ? 40 : 0, F = a?.enabled ?? !1, v = a?.indentSize ?? 20, C = a?.childrenKey ?? "children";
|
|
73
|
+
return e ? /* @__PURE__ */ t(V, { children: m.getVirtualItems().map((n) => {
|
|
74
|
+
const s = r[n.index], w = s.id, x = f && i?.selectedIds.has(w);
|
|
75
|
+
return /* @__PURE__ */ I(
|
|
60
76
|
"tr",
|
|
61
77
|
{
|
|
62
|
-
ref: (
|
|
63
|
-
"data-index":
|
|
64
|
-
className:
|
|
78
|
+
ref: (c) => l(n.index, c),
|
|
79
|
+
"data-index": n.index,
|
|
80
|
+
className: B("ckds-dragable-tr flex absolute top-0 left-0 w-full"),
|
|
65
81
|
style: {
|
|
66
|
-
transform: `translateY(${
|
|
67
|
-
minHeight:
|
|
82
|
+
transform: `translateY(${n.start}px)`,
|
|
83
|
+
minHeight: y(n.index),
|
|
84
|
+
borderBottom: "1px solid var(--ckcl-black-50, #F4F4F4)"
|
|
68
85
|
},
|
|
69
86
|
children: [
|
|
70
|
-
f && /* @__PURE__ */
|
|
71
|
-
|
|
72
|
-
const
|
|
73
|
-
return /* @__PURE__ */
|
|
87
|
+
f && /* @__PURE__ */ t("td", { className: "ckds-dragable-td flex items-center justify-center", style: { width: 40, minWidth: 40, maxWidth: 40, height: W, flex: "0 0 40px", position: "sticky", left: 0, zIndex: 2, backgroundColor: "var(--ckds-cell-bg-default, #ffffff)" }, children: /* @__PURE__ */ t(j, { checked: !!x, onChange: () => k?.(w) }) }),
|
|
88
|
+
s.getVisibleCells().map((c, $) => {
|
|
89
|
+
const N = s.original?.status?.toLowerCase?.() === "inactive", L = $ === 0;
|
|
90
|
+
return /* @__PURE__ */ t(
|
|
74
91
|
"td",
|
|
75
92
|
{
|
|
76
|
-
className:
|
|
93
|
+
className: "ckds-dragable-td flex items-center",
|
|
77
94
|
style: {
|
|
78
|
-
...
|
|
79
|
-
minHeight: `${
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
// Explicit background — Tailwind bg-base-* tokens can be
|
|
87
|
-
// overridden by the host app, making sticky cells transparent.
|
|
88
|
-
backgroundColor: d.stripedRows && i.index % 2 !== 0 ? "var(--ckds-cell-bg-striped, var(--ckcl-primary-50))" : "var(--ckds-cell-bg-default, #ffffff)"
|
|
95
|
+
...T(c.column, o, u),
|
|
96
|
+
minHeight: `${y(n.index)}px`,
|
|
97
|
+
...O(c.column, o.getVisibleLeafColumns(), g),
|
|
98
|
+
justifyContent: H(c.column.columnDef),
|
|
99
|
+
textAlign: R(c.column.columnDef),
|
|
100
|
+
// Explicit color — avoids DaisyUI text-base-* token dependency
|
|
101
|
+
color: N ? "var(--ckcl-black-400, #737373)" : "var(--ckcl-black-500, #2b2b2b)",
|
|
102
|
+
backgroundColor: E(D, d.stripedRows, n.index)
|
|
89
103
|
},
|
|
90
|
-
children: /* @__PURE__ */
|
|
91
|
-
|
|
104
|
+
children: /* @__PURE__ */ t(M, { title: String(c.getValue() ?? ""), wrapText: d.wrapText, children: /* @__PURE__ */ t(
|
|
105
|
+
J,
|
|
92
106
|
{
|
|
93
|
-
isFirstDataCol:
|
|
94
|
-
hasExpansion:
|
|
95
|
-
row:
|
|
107
|
+
isFirstDataCol: L,
|
|
108
|
+
hasExpansion: F,
|
|
109
|
+
row: s,
|
|
96
110
|
childrenKey: C,
|
|
97
|
-
expandedIds:
|
|
98
|
-
onToggleExpand:
|
|
111
|
+
expandedIds: b,
|
|
112
|
+
onToggleExpand: p,
|
|
99
113
|
depth: D,
|
|
100
|
-
indentSize:
|
|
101
|
-
expandableConfig:
|
|
102
|
-
children:
|
|
114
|
+
indentSize: v,
|
|
115
|
+
expandableConfig: a,
|
|
116
|
+
children: z(c.column.columnDef.cell ?? c.column.columnDef.header, c.getContext())
|
|
103
117
|
}
|
|
104
118
|
) })
|
|
105
119
|
},
|
|
106
|
-
|
|
120
|
+
c.id
|
|
107
121
|
);
|
|
108
122
|
})
|
|
109
123
|
]
|
|
110
124
|
},
|
|
111
|
-
|
|
125
|
+
s.id
|
|
112
126
|
);
|
|
113
|
-
}) }) : /* @__PURE__ */
|
|
114
|
-
const
|
|
115
|
-
return /* @__PURE__ */
|
|
116
|
-
|
|
127
|
+
}) }) : /* @__PURE__ */ t(V, { children: r.map((n, s) => {
|
|
128
|
+
const w = n.original, x = w?.status?.toLowerCase?.() === "inactive", c = n.id, $ = f && i?.selectedIds.has(c), A = F && b?.has(c), N = F ? w[C] : void 0, L = Array.isArray(N) && N.length > 0;
|
|
129
|
+
return /* @__PURE__ */ t(
|
|
130
|
+
Z,
|
|
117
131
|
{
|
|
118
|
-
row:
|
|
119
|
-
rowIndex:
|
|
120
|
-
isInactive:
|
|
121
|
-
isSelected:
|
|
122
|
-
isExpanded: !!
|
|
123
|
-
hasChildren:
|
|
124
|
-
nestedChildren:
|
|
125
|
-
|
|
126
|
-
lastNonPinnedColId: u,
|
|
132
|
+
row: n,
|
|
133
|
+
rowIndex: s,
|
|
134
|
+
isInactive: x,
|
|
135
|
+
isSelected: !!$,
|
|
136
|
+
isExpanded: !!A,
|
|
137
|
+
hasChildren: L,
|
|
138
|
+
nestedChildren: N,
|
|
139
|
+
columnSizing: g,
|
|
127
140
|
tableConfig: d,
|
|
128
|
-
table:
|
|
141
|
+
table: o,
|
|
129
142
|
hasSelection: f,
|
|
130
|
-
selectionState:
|
|
131
|
-
onToggleRowSelection:
|
|
132
|
-
expandedIds:
|
|
133
|
-
onToggleExpand:
|
|
134
|
-
expandableConfig:
|
|
143
|
+
selectionState: i,
|
|
144
|
+
onToggleRowSelection: k,
|
|
145
|
+
expandedIds: b,
|
|
146
|
+
onToggleExpand: p,
|
|
147
|
+
expandableConfig: a,
|
|
135
148
|
depth: D,
|
|
136
|
-
indentSize:
|
|
149
|
+
indentSize: v,
|
|
137
150
|
childrenKey: C
|
|
138
151
|
},
|
|
139
|
-
|
|
152
|
+
n.id
|
|
140
153
|
);
|
|
141
154
|
}) });
|
|
142
155
|
}
|
|
143
|
-
function
|
|
156
|
+
function J({
|
|
144
157
|
isFirstDataCol: r,
|
|
145
|
-
hasExpansion:
|
|
146
|
-
row:
|
|
147
|
-
childrenKey:
|
|
148
|
-
expandedIds:
|
|
149
|
-
onToggleExpand:
|
|
150
|
-
depth:
|
|
151
|
-
indentSize:
|
|
152
|
-
expandableConfig:
|
|
153
|
-
children:
|
|
158
|
+
hasExpansion: e,
|
|
159
|
+
row: m,
|
|
160
|
+
childrenKey: l,
|
|
161
|
+
expandedIds: y,
|
|
162
|
+
onToggleExpand: g,
|
|
163
|
+
depth: d,
|
|
164
|
+
indentSize: o,
|
|
165
|
+
expandableConfig: i,
|
|
166
|
+
children: h
|
|
154
167
|
}) {
|
|
155
|
-
if (!r || !
|
|
156
|
-
const a =
|
|
157
|
-
return /* @__PURE__ */
|
|
158
|
-
|
|
168
|
+
if (!r || !e) return /* @__PURE__ */ t(V, { children: h });
|
|
169
|
+
const a = m.original[l], b = Array.isArray(a) && a.length > 0 || !!i?.renderExpandedContent, p = y?.has(m.id) ?? !1;
|
|
170
|
+
return /* @__PURE__ */ t(
|
|
171
|
+
G,
|
|
159
172
|
{
|
|
160
|
-
isExpanded:
|
|
161
|
-
hasChildren:
|
|
162
|
-
depth:
|
|
163
|
-
indentSize:
|
|
164
|
-
onToggle: () =>
|
|
165
|
-
children:
|
|
173
|
+
isExpanded: p,
|
|
174
|
+
hasChildren: b,
|
|
175
|
+
depth: d,
|
|
176
|
+
indentSize: o,
|
|
177
|
+
onToggle: () => g?.(m.id),
|
|
178
|
+
children: h
|
|
166
179
|
}
|
|
167
180
|
);
|
|
168
181
|
}
|
|
169
|
-
function
|
|
182
|
+
function Z({
|
|
170
183
|
row: r,
|
|
171
|
-
rowIndex:
|
|
172
|
-
isInactive:
|
|
173
|
-
isSelected:
|
|
174
|
-
isExpanded:
|
|
175
|
-
hasChildren:
|
|
176
|
-
nestedChildren:
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
expandedIds: b,
|
|
184
|
+
rowIndex: e,
|
|
185
|
+
isInactive: m,
|
|
186
|
+
isSelected: l,
|
|
187
|
+
isExpanded: y,
|
|
188
|
+
hasChildren: g,
|
|
189
|
+
nestedChildren: d,
|
|
190
|
+
columnSizing: o,
|
|
191
|
+
tableConfig: i,
|
|
192
|
+
table: h,
|
|
193
|
+
hasSelection: k,
|
|
194
|
+
selectionState: a,
|
|
195
|
+
onToggleRowSelection: b,
|
|
196
|
+
expandedIds: p,
|
|
185
197
|
onToggleExpand: D,
|
|
186
198
|
expandableConfig: f,
|
|
187
|
-
depth:
|
|
188
|
-
indentSize:
|
|
189
|
-
childrenKey:
|
|
199
|
+
depth: u,
|
|
200
|
+
indentSize: F,
|
|
201
|
+
childrenKey: v
|
|
190
202
|
}) {
|
|
191
|
-
const C = f?.enabled ?? !1,
|
|
192
|
-
return /* @__PURE__ */
|
|
193
|
-
/* @__PURE__ */
|
|
194
|
-
|
|
195
|
-
r.getVisibleCells().map((
|
|
196
|
-
const
|
|
197
|
-
return /* @__PURE__ */
|
|
203
|
+
const C = f?.enabled ?? !1, n = k ? 40 : 0;
|
|
204
|
+
return /* @__PURE__ */ I(V, { children: [
|
|
205
|
+
/* @__PURE__ */ I("tr", { className: B("ckds-dragable-tr flex w-full"), "data-depth": u, style: { position: "relative", zIndex: 0, borderBottom: "1px solid var(--ckcl-black-50, #F4F4F4)" }, children: [
|
|
206
|
+
k && /* @__PURE__ */ t("td", { className: "ckds-dragable-td flex items-center justify-center", style: { width: 40, minWidth: 40, maxWidth: 40, height: W, flex: "0 0 40px", position: "sticky", left: 0, zIndex: 2, backgroundColor: E(u, i.stripedRows, e) }, children: /* @__PURE__ */ t(j, { checked: l, onChange: () => b?.(r.id) }) }),
|
|
207
|
+
r.getVisibleCells().map((s, w) => {
|
|
208
|
+
const x = w === 0, c = E(u, i.stripedRows, e);
|
|
209
|
+
return /* @__PURE__ */ t(
|
|
198
210
|
"td",
|
|
199
211
|
{
|
|
200
|
-
className:
|
|
212
|
+
className: "ckds-dragable-td flex items-center",
|
|
201
213
|
style: {
|
|
202
|
-
...
|
|
203
|
-
...
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
backgroundColor: $
|
|
214
|
+
...T(s.column, h, n),
|
|
215
|
+
...i.wrapText ? { minHeight: `${W}px` } : { height: `${W}px` },
|
|
216
|
+
...O(s.column, h.getVisibleLeafColumns(), o),
|
|
217
|
+
justifyContent: H(s.column.columnDef),
|
|
218
|
+
textAlign: R(s.column.columnDef),
|
|
219
|
+
// Explicit color — avoids DaisyUI text-base-* token dependency
|
|
220
|
+
color: m ? "var(--ckcl-black-400, #737373)" : "var(--ckcl-black-500, #2b2b2b)",
|
|
221
|
+
backgroundColor: c
|
|
211
222
|
},
|
|
212
|
-
children: /* @__PURE__ */
|
|
213
|
-
|
|
223
|
+
children: /* @__PURE__ */ t(M, { title: String(s.getValue() ?? ""), wrapText: i.wrapText, children: /* @__PURE__ */ t(
|
|
224
|
+
J,
|
|
214
225
|
{
|
|
215
|
-
isFirstDataCol:
|
|
226
|
+
isFirstDataCol: x,
|
|
216
227
|
hasExpansion: C,
|
|
217
228
|
row: r,
|
|
218
|
-
childrenKey:
|
|
219
|
-
expandedIds:
|
|
229
|
+
childrenKey: v,
|
|
230
|
+
expandedIds: p,
|
|
220
231
|
onToggleExpand: D,
|
|
221
|
-
depth:
|
|
222
|
-
indentSize:
|
|
232
|
+
depth: u,
|
|
233
|
+
indentSize: F,
|
|
223
234
|
expandableConfig: f,
|
|
224
|
-
children:
|
|
235
|
+
children: z(s.column.columnDef.cell ?? s.column.columnDef.header, s.getContext())
|
|
225
236
|
}
|
|
226
237
|
) })
|
|
227
238
|
},
|
|
228
|
-
|
|
239
|
+
s.id
|
|
229
240
|
);
|
|
230
241
|
})
|
|
231
242
|
] }),
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
/* @__PURE__ */
|
|
243
|
+
y && f?.renderExpandedContent && /* @__PURE__ */ I("tr", { className: "ckds-dragable-tr flex w-full", "data-depth": u, children: [
|
|
244
|
+
k && /* @__PURE__ */ t("td", { className: "ckds-dragable-td", style: { width: 40, minWidth: 40, maxWidth: 40, flex: "0 0 40px", backgroundColor: E(u, i.stripedRows, e) } }),
|
|
245
|
+
/* @__PURE__ */ t(
|
|
235
246
|
"td",
|
|
236
247
|
{
|
|
237
248
|
className: "ckds-dragable-td",
|
|
238
|
-
colSpan:
|
|
239
|
-
style: { flex: "1 1 auto", padding: 0, backgroundColor:
|
|
240
|
-
children: f.renderExpandedContent(r.original,
|
|
249
|
+
colSpan: h.getVisibleLeafColumns().length,
|
|
250
|
+
style: { flex: "1 1 auto", padding: 0, backgroundColor: E(u, i.stripedRows, e) },
|
|
251
|
+
children: f.renderExpandedContent(r.original, u)
|
|
241
252
|
}
|
|
242
253
|
)
|
|
243
254
|
] }),
|
|
244
|
-
|
|
245
|
-
|
|
255
|
+
y && g && d && !f?.renderExpandedContent && /* @__PURE__ */ t(
|
|
256
|
+
P,
|
|
246
257
|
{
|
|
247
|
-
nestedChildren:
|
|
258
|
+
nestedChildren: d,
|
|
248
259
|
parentId: r.id,
|
|
249
|
-
depth:
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
expandedIds: b,
|
|
260
|
+
depth: u + 1,
|
|
261
|
+
columnSizing: o,
|
|
262
|
+
tableConfig: i,
|
|
263
|
+
table: h,
|
|
264
|
+
hasSelection: k,
|
|
265
|
+
selectionState: a,
|
|
266
|
+
onToggleRowSelection: b,
|
|
267
|
+
expandedIds: p,
|
|
258
268
|
onToggleExpand: D,
|
|
259
269
|
expandableConfig: f,
|
|
260
|
-
indentSize:
|
|
261
|
-
childrenKey:
|
|
270
|
+
indentSize: F,
|
|
271
|
+
childrenKey: v
|
|
262
272
|
}
|
|
263
273
|
)
|
|
264
274
|
] });
|
|
265
275
|
}
|
|
266
|
-
function
|
|
276
|
+
function P({
|
|
267
277
|
nestedChildren: r,
|
|
268
|
-
parentId:
|
|
269
|
-
depth:
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
table: u,
|
|
278
|
+
parentId: e,
|
|
279
|
+
depth: m,
|
|
280
|
+
columnSizing: l,
|
|
281
|
+
tableConfig: y,
|
|
282
|
+
table: g,
|
|
274
283
|
hasSelection: d,
|
|
275
|
-
selectionState:
|
|
276
|
-
onToggleRowSelection:
|
|
277
|
-
expandedIds:
|
|
278
|
-
onToggleExpand:
|
|
279
|
-
expandableConfig:
|
|
280
|
-
indentSize:
|
|
281
|
-
childrenKey:
|
|
284
|
+
selectionState: o,
|
|
285
|
+
onToggleRowSelection: i,
|
|
286
|
+
expandedIds: h,
|
|
287
|
+
onToggleExpand: k,
|
|
288
|
+
expandableConfig: a,
|
|
289
|
+
indentSize: b,
|
|
290
|
+
childrenKey: p
|
|
282
291
|
}) {
|
|
283
|
-
const D =
|
|
284
|
-
return /* @__PURE__ */
|
|
285
|
-
const
|
|
286
|
-
return /* @__PURE__ */
|
|
287
|
-
|
|
292
|
+
const D = g.getVisibleLeafColumns(), f = a?.enabled ?? !1;
|
|
293
|
+
return /* @__PURE__ */ t(V, { children: r.map((u, F) => {
|
|
294
|
+
const v = u, C = `${e}.${F}`, n = v[p], s = Array.isArray(n) && n.length > 0, w = h?.has(C) ?? !1, x = d && (o?.selectedIds.has(C) ?? !1), c = v?.status?.toLowerCase?.() === "inactive";
|
|
295
|
+
return /* @__PURE__ */ t(
|
|
296
|
+
S,
|
|
288
297
|
{
|
|
289
|
-
childRecord:
|
|
298
|
+
childRecord: v,
|
|
290
299
|
childRowId: C,
|
|
291
|
-
childIndex:
|
|
292
|
-
childIsInactive:
|
|
293
|
-
childIsSelected:
|
|
294
|
-
childIsExpanded:
|
|
295
|
-
childHasChildren:
|
|
296
|
-
childChildren:
|
|
297
|
-
depth:
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
table: u,
|
|
300
|
+
childIndex: F,
|
|
301
|
+
childIsInactive: c,
|
|
302
|
+
childIsSelected: x,
|
|
303
|
+
childIsExpanded: w,
|
|
304
|
+
childHasChildren: s,
|
|
305
|
+
childChildren: n,
|
|
306
|
+
depth: m,
|
|
307
|
+
columnSizing: l,
|
|
308
|
+
tableConfig: y,
|
|
309
|
+
table: g,
|
|
302
310
|
visibleCols: D,
|
|
303
311
|
hasSelection: d,
|
|
304
312
|
hasExpansion: f,
|
|
305
|
-
selectionState:
|
|
306
|
-
onToggleRowSelection:
|
|
307
|
-
expandedIds:
|
|
308
|
-
onToggleExpand:
|
|
309
|
-
expandableConfig:
|
|
310
|
-
indentSize:
|
|
311
|
-
childrenKey:
|
|
313
|
+
selectionState: o,
|
|
314
|
+
onToggleRowSelection: i,
|
|
315
|
+
expandedIds: h,
|
|
316
|
+
onToggleExpand: k,
|
|
317
|
+
expandableConfig: a,
|
|
318
|
+
indentSize: b,
|
|
319
|
+
childrenKey: p
|
|
312
320
|
},
|
|
313
321
|
C
|
|
314
322
|
);
|
|
315
323
|
}) });
|
|
316
324
|
}
|
|
317
|
-
function
|
|
325
|
+
function S({
|
|
318
326
|
childRecord: r,
|
|
319
|
-
childRowId:
|
|
320
|
-
childIndex:
|
|
321
|
-
childIsInactive:
|
|
322
|
-
childIsSelected:
|
|
323
|
-
childIsExpanded:
|
|
324
|
-
childHasChildren:
|
|
325
|
-
childChildren:
|
|
326
|
-
depth:
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
hasSelection: b,
|
|
327
|
+
childRowId: e,
|
|
328
|
+
childIndex: m,
|
|
329
|
+
childIsInactive: l,
|
|
330
|
+
childIsSelected: y,
|
|
331
|
+
childIsExpanded: g,
|
|
332
|
+
childHasChildren: d,
|
|
333
|
+
childChildren: o,
|
|
334
|
+
depth: i,
|
|
335
|
+
columnSizing: h,
|
|
336
|
+
tableConfig: k,
|
|
337
|
+
table: a,
|
|
338
|
+
visibleCols: b,
|
|
339
|
+
hasSelection: p,
|
|
333
340
|
hasExpansion: D,
|
|
334
341
|
selectionState: f,
|
|
335
|
-
onToggleRowSelection:
|
|
336
|
-
expandedIds:
|
|
337
|
-
onToggleExpand:
|
|
342
|
+
onToggleRowSelection: u,
|
|
343
|
+
expandedIds: F,
|
|
344
|
+
onToggleExpand: v,
|
|
338
345
|
expandableConfig: C,
|
|
339
|
-
indentSize:
|
|
340
|
-
childrenKey:
|
|
346
|
+
indentSize: n,
|
|
347
|
+
childrenKey: s
|
|
341
348
|
}) {
|
|
342
|
-
const
|
|
343
|
-
return /* @__PURE__ */
|
|
344
|
-
/* @__PURE__ */
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
const
|
|
348
|
-
|
|
349
|
+
const w = p ? 40 : 0;
|
|
350
|
+
return /* @__PURE__ */ I(V, { children: [
|
|
351
|
+
/* @__PURE__ */ I("tr", { className: B("ckds-dragable-tr flex w-full"), "data-depth": i, style: { position: "relative", zIndex: 0, borderBottom: "1px solid var(--ckcl-black-50, #F4F4F4)" }, children: [
|
|
352
|
+
p && /* @__PURE__ */ t("td", { className: "ckds-dragable-td flex items-center justify-center", style: { width: 40, minWidth: 40, maxWidth: 40, height: W, flex: "0 0 40px", position: "sticky", left: 0, zIndex: 2, backgroundColor: "var(--ckds-cell-bg-default, #ffffff)" }, children: /* @__PURE__ */ t(j, { checked: y, onChange: () => u?.(e) }) }),
|
|
353
|
+
b.map((x, c) => {
|
|
354
|
+
const $ = c === 0, A = r[x.id], N = A != null ? String(A) : "", L = E(i, k.stripedRows, m), Y = $ && D ? /* @__PURE__ */ t(
|
|
355
|
+
G,
|
|
349
356
|
{
|
|
350
|
-
isExpanded:
|
|
351
|
-
hasChildren:
|
|
352
|
-
depth:
|
|
353
|
-
indentSize:
|
|
354
|
-
onToggle: () =>
|
|
355
|
-
children:
|
|
357
|
+
isExpanded: g,
|
|
358
|
+
hasChildren: d,
|
|
359
|
+
depth: i,
|
|
360
|
+
indentSize: n,
|
|
361
|
+
onToggle: () => v?.(e),
|
|
362
|
+
children: N
|
|
356
363
|
}
|
|
357
|
-
) :
|
|
358
|
-
return /* @__PURE__ */
|
|
364
|
+
) : N;
|
|
365
|
+
return /* @__PURE__ */ t(
|
|
359
366
|
"td",
|
|
360
367
|
{
|
|
361
|
-
className:
|
|
368
|
+
className: "ckds-dragable-td flex items-center",
|
|
362
369
|
style: {
|
|
363
|
-
...
|
|
364
|
-
...
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
textAlign: P(c.columnDef)
|
|
370
|
+
...T(x, a, w),
|
|
371
|
+
...k.wrapText ? { minHeight: `${W}px` } : { height: `${W}px` },
|
|
372
|
+
...O(x, b, h),
|
|
373
|
+
backgroundColor: L,
|
|
374
|
+
// Explicit color — avoids DaisyUI text-base-* token dependency
|
|
375
|
+
color: l ? "var(--ckcl-black-400, #737373)" : "var(--ckcl-black-500, #2b2b2b)",
|
|
376
|
+
justifyContent: H(x.columnDef),
|
|
377
|
+
textAlign: R(x.columnDef)
|
|
372
378
|
},
|
|
373
|
-
children: /* @__PURE__ */
|
|
379
|
+
children: /* @__PURE__ */ t(M, { title: N, wrapText: k.wrapText, children: Y })
|
|
374
380
|
},
|
|
375
|
-
`${
|
|
381
|
+
`${e}-${x.id}`
|
|
376
382
|
);
|
|
377
383
|
})
|
|
378
384
|
] }),
|
|
379
|
-
|
|
380
|
-
|
|
385
|
+
g && d && o && /* @__PURE__ */ t(
|
|
386
|
+
P,
|
|
381
387
|
{
|
|
382
|
-
nestedChildren:
|
|
383
|
-
parentId:
|
|
384
|
-
depth:
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
hasSelection: b,
|
|
388
|
+
nestedChildren: o,
|
|
389
|
+
parentId: e,
|
|
390
|
+
depth: i + 1,
|
|
391
|
+
columnSizing: h,
|
|
392
|
+
tableConfig: k,
|
|
393
|
+
table: a,
|
|
394
|
+
hasSelection: p,
|
|
390
395
|
selectionState: f,
|
|
391
|
-
onToggleRowSelection:
|
|
392
|
-
expandedIds:
|
|
393
|
-
onToggleExpand:
|
|
396
|
+
onToggleRowSelection: u,
|
|
397
|
+
expandedIds: F,
|
|
398
|
+
onToggleExpand: v,
|
|
394
399
|
expandableConfig: C,
|
|
395
|
-
indentSize:
|
|
396
|
-
childrenKey:
|
|
400
|
+
indentSize: n,
|
|
401
|
+
childrenKey: s
|
|
397
402
|
}
|
|
398
403
|
)
|
|
399
404
|
] });
|
|
400
405
|
}
|
|
401
406
|
export {
|
|
402
|
-
|
|
407
|
+
ae as default
|
|
403
408
|
};
|