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