@crewlethq/ui 0.100.1 → 0.101.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AgentHandoffPanel/index.js +5 -5
- package/dist/ArrangeList/index.js +1 -1
- package/dist/ArtifactBar/index.js +1 -1
- package/dist/ArtifactCard/index.js +2 -2
- package/dist/AuthLayout/index.js +1 -1
- package/dist/AvatarPicker/index.js +3 -3
- package/dist/BriefCard/index.js +1 -1
- package/dist/CharacterPicker/index.js +2 -2
- package/dist/ChatDay/index.js +1 -1
- package/dist/{ChatDay-E3FF5HWF.css → ChatDay-CTX2VI6P.css} +2 -0
- package/dist/ChatThread/index.js +1 -1
- package/dist/Combobox/index.js +2 -2
- package/dist/CommandPalette/index.js +4 -4
- package/dist/CommentThread/index.js +6 -6
- package/dist/Composer/index.js +2 -2
- package/dist/ContrastBadge/index.js +2 -2
- package/dist/ContrastHelp/index.js +3 -3
- package/dist/DataGrid/DataGrid.d.ts +127 -41
- package/dist/DataGrid/index.d.ts +1 -1
- package/dist/DataGrid/index.js +7 -5
- package/dist/DataGrid/parts.d.ts +163 -0
- package/dist/{DataGrid-SAHEL4SN.css → DataGrid-ERDIPEWV.css} +205 -16
- package/dist/DataTable/index.js +4 -4
- package/dist/DataView/index.js +7 -7
- package/dist/DatasetSource/index.js +1 -1
- package/dist/DeepWorkCard/index.js +1 -1
- package/dist/DocTabsEditor/index.js +2 -2
- package/dist/EditingStatus/index.js +2 -2
- package/dist/EntityList/index.js +1 -1
- package/dist/InlineEditor/index.js +3 -3
- package/dist/KeyValueRows/index.js +3 -3
- package/dist/ListInput/index.js +4 -4
- package/dist/LogoSlot/index.js +3 -3
- package/dist/OpenInAppCard/index.js +1 -1
- package/dist/OrgTable/OrgTable.d.ts +5 -20
- package/dist/OrgTable/index.js +10 -3
- package/dist/{OrgTable-XYHEFI5X.css → OrgTable-5NXRECVP.css} +29 -9
- package/dist/PrincipalPicker/index.js +3 -3
- package/dist/ProposalCard/index.js +3 -3
- package/dist/RailList/index.js +4 -3
- package/dist/RefusalCard/index.js +1 -1
- package/dist/RelatedRow/index.js +3 -2
- package/dist/ResultTableCard/index.js +1 -1
- package/dist/RichEditor/index.js +1 -1
- package/dist/SetupWizard/index.js +2 -2
- package/dist/ShareDialog/index.js +3 -3
- package/dist/SheetColumnEditor/index.js +5 -5
- package/dist/SheetGrid/index.js +3 -3
- package/dist/StatusCard/index.js +1 -1
- package/dist/Switcher/index.js +4 -4
- package/dist/TableCells/TableCells.d.ts +10 -2
- package/dist/TableCells/index.js +4 -3
- package/dist/Text/index.js +2 -1
- package/dist/ThreadSummary/index.js +1 -1
- package/dist/TimeRangePicker/index.js +4 -4
- package/dist/TimeWindowPicker/index.js +4 -4
- package/dist/TreeGrid/TreeGrid.d.ts +143 -12
- package/dist/TreeGrid/index.d.ts +1 -1
- package/dist/TreeGrid/index.js +15 -2
- package/dist/{TreeGrid-H3GHMKZX.css → TreeGrid-XZCH5WCC.css} +232 -2
- package/dist/ValueField/index.js +3 -3
- package/dist/{chunk-G44KKOMB.js → chunk-2LLMUJFB.js} +1 -1
- package/dist/{chunk-ONHYFU7D.js → chunk-AGJBHLPE.js} +1 -1
- package/dist/{chunk-BK4KUIAZ.js → chunk-AP6JSZGT.js} +12 -4
- package/dist/chunk-FL5DTFF3.js +557 -0
- package/dist/{chunk-L72GPZ56.js → chunk-G6QKJGQQ.js} +1 -1
- package/dist/{chunk-CL3FWLDO.js → chunk-HI47TXSW.js} +1 -1
- package/dist/{chunk-M6EVTMTK.js → chunk-HYVYYODN.js} +1 -1
- package/dist/{chunk-XQWWA2LG.js → chunk-IQO6YDEM.js} +19 -51
- package/dist/{chunk-HTCNTCBE.js → chunk-KMMRKMBQ.js} +1 -1
- package/dist/chunk-LIRXQOTR.js +892 -0
- package/dist/{chunk-CQIODINH.js → chunk-M2DHVN6T.js} +1 -1
- package/dist/{chunk-EMXUREKE.js → chunk-MKTHLT4E.js} +1 -1
- package/dist/{chunk-PF6X74C5.js → chunk-NHQ7O4DG.js} +3 -3
- package/dist/{chunk-DBH7ORCH.js → chunk-PCXMJZTE.js} +1 -1
- package/dist/{chunk-J3QFTG4B.js → chunk-PXYDEDNN.js} +1 -1
- package/dist/{chunk-PMO6W5NE.js → chunk-SBVTOIFP.js} +2 -2
- package/dist/{chunk-3NCIQO2P.js → chunk-U5Y335HH.js} +8 -4
- package/dist/{chunk-XRKBPNX4.js → chunk-V3QWPHY4.js} +1 -1
- package/dist/chunk-WSIJDWUG.js +10 -0
- package/dist/{chunk-O5CEG7TQ.js → chunk-XLMURU75.js} +1 -6
- package/dist/generated/index.js +90 -90
- package/dist/index.js +90 -90
- package/dist/styles.css +472 -31
- package/dist/utils/titleIfCut.d.ts +18 -0
- package/package.json +3 -3
- package/dist/chunk-CTQZK5J3.js +0 -8
- package/dist/chunk-ERESJG6C.js +0 -353
- package/dist/chunk-Z346ESBB.js +0 -591
- package/dist/{Editor-YHHCK5SJ.js → Editor-XRI2NOO5.js} +2 -2
- package/dist/{chunk-JZADK2FT.js → chunk-3JE6YIG5.js} +2 -2
- package/dist/{chunk-5KJOG5YP.js → chunk-6IAW2ZIE.js} +2 -2
- package/dist/{chunk-XLVWSNW3.js → chunk-CQAR3F33.js} +1 -1
- package/dist/{chunk-AC255TMQ.js → chunk-CRRW4UGJ.js} +1 -1
- package/dist/{chunk-IA3NL54W.js → chunk-CTHZHMVG.js} +1 -1
- package/dist/{chunk-MTKHMGJH.js → chunk-HR5O6PSR.js} +1 -1
- package/dist/{chunk-OU6ZSWEJ.js → chunk-I2GJLUU3.js} +1 -1
- package/dist/{chunk-7L6JJ7VJ.js → chunk-K2GVWTHA.js} +1 -1
- package/dist/{chunk-RSI6EJSH.js → chunk-LNXL22Y7.js} +1 -1
- package/dist/{chunk-NGRSGJM3.js → chunk-MFZBLJYF.js} +1 -1
- package/dist/{chunk-OAKECTYH.js → chunk-NIZRR2NN.js} +1 -1
- package/dist/{chunk-3Z2BSKS5.js → chunk-NRMF2PKX.js} +1 -1
- package/dist/{chunk-DK7CXQFY.js → chunk-QCCWXOKK.js} +1 -1
- package/dist/{chunk-LNQSNXGJ.js → chunk-S4JRQJEP.js} +1 -1
- package/dist/{chunk-HU5PAZMU.js → chunk-TXQ6FZJL.js} +1 -1
- package/dist/{chunk-GA773IOZ.js → chunk-V6CVW6PF.js} +1 -1
- package/dist/{chunk-EW4ULFHK.js → chunk-WTJU7MAG.js} +1 -1
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { TreeGrid } from './chunk-
|
|
1
|
+
import { TreeGrid } from './chunk-FL5DTFF3.js';
|
|
2
2
|
import { createTreeModel, treeParent } from './chunk-MY374UUD.js';
|
|
3
3
|
import { OrgLabel } from './chunk-44GFQ4O3.js';
|
|
4
|
-
import { Checkbox } from './chunk-M6G7XLLP.js';
|
|
5
4
|
import { AddPill } from './chunk-DVRECWCB.js';
|
|
6
5
|
import { IconButton } from './chunk-WDLAAZFZ.js';
|
|
7
6
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
8
|
-
import './OrgTable-
|
|
7
|
+
import './OrgTable-5NXRECVP.css';
|
|
9
8
|
import { useMemo, useRef, useImperativeHandle, useCallback } from 'react';
|
|
10
9
|
import { ChevronDownGlyph, ChevronUpGlyph } from '@crewlethq/icons/glyphs';
|
|
11
|
-
import {
|
|
10
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
12
11
|
|
|
13
12
|
var LABELS = {
|
|
14
13
|
expandAll: "Expand all",
|
|
@@ -16,11 +15,9 @@ var LABELS = {
|
|
|
16
15
|
};
|
|
17
16
|
function OrgTable({
|
|
18
17
|
rows,
|
|
19
|
-
renderCell,
|
|
20
18
|
tone,
|
|
21
19
|
controls = true,
|
|
22
20
|
selection,
|
|
23
|
-
cellHasControl,
|
|
24
21
|
layout = "scroll",
|
|
25
22
|
labels,
|
|
26
23
|
ref,
|
|
@@ -28,8 +25,7 @@ function OrgTable({
|
|
|
28
25
|
...rest
|
|
29
26
|
}) {
|
|
30
27
|
const text = { ...LABELS, ...labels };
|
|
31
|
-
const
|
|
32
|
-
const deep = useMemo(() => Math.max(0, ...tree.depth.values()) >= 3, [tree]);
|
|
28
|
+
const deep = useMemo(() => Math.max(0, ...createTreeModel(rows).depth.values()) >= 3, [rows]);
|
|
33
29
|
const grid = useRef(null);
|
|
34
30
|
useImperativeHandle(
|
|
35
31
|
ref,
|
|
@@ -40,30 +36,21 @@ function OrgTable({
|
|
|
40
36
|
}),
|
|
41
37
|
[]
|
|
42
38
|
);
|
|
43
|
-
const
|
|
44
|
-
(id,
|
|
45
|
-
|
|
46
|
-
const depth = tree.depth.get(id) ?? 0;
|
|
39
|
+
const indent = useCallback(
|
|
40
|
+
(id, context) => {
|
|
41
|
+
const depth = context.tree.depth.get(id) ?? 0;
|
|
47
42
|
const open = context.expandable(id) && context.expanded(id);
|
|
48
|
-
return /* @__PURE__ */
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
),
|
|
58
|
-
selection && /* @__PURE__ */ jsx(OrgTableSelect, { id, selection, context }),
|
|
59
|
-
renderCell(id, column, context)
|
|
60
|
-
] });
|
|
43
|
+
return /* @__PURE__ */ jsx(
|
|
44
|
+
OrgTableWire,
|
|
45
|
+
{
|
|
46
|
+
depth,
|
|
47
|
+
tone: tone?.(id),
|
|
48
|
+
trunk: depth > 0 || open,
|
|
49
|
+
last: !open && lastUnderRoot(context.tree, id)
|
|
50
|
+
}
|
|
51
|
+
);
|
|
61
52
|
},
|
|
62
|
-
[
|
|
63
|
-
);
|
|
64
|
-
const hasControl = useCallback(
|
|
65
|
-
(id, column, key) => column === 1 && selection !== void 0 && selection.checked(id) !== null || (cellHasControl?.(id, column, key) ?? false),
|
|
66
|
-
[selection, cellHasControl]
|
|
53
|
+
[tone]
|
|
67
54
|
);
|
|
68
55
|
return /* @__PURE__ */ jsxs(
|
|
69
56
|
"div",
|
|
@@ -109,8 +96,8 @@ function OrgTable({
|
|
|
109
96
|
ref: grid,
|
|
110
97
|
rows,
|
|
111
98
|
layout,
|
|
112
|
-
|
|
113
|
-
|
|
99
|
+
renderIndent: indent,
|
|
100
|
+
selection,
|
|
114
101
|
labels,
|
|
115
102
|
className: "crewlet-org-table__grid"
|
|
116
103
|
}
|
|
@@ -126,25 +113,6 @@ function lastUnderRoot(tree, id) {
|
|
|
126
113
|
}
|
|
127
114
|
return true;
|
|
128
115
|
}
|
|
129
|
-
function OrgTableSelect({
|
|
130
|
-
id,
|
|
131
|
-
selection,
|
|
132
|
-
context
|
|
133
|
-
}) {
|
|
134
|
-
const checked = selection.checked(id);
|
|
135
|
-
return /* @__PURE__ */ jsx("span", { className: "crewlet-org-table__select", children: checked !== null && /* @__PURE__ */ jsx(
|
|
136
|
-
Checkbox,
|
|
137
|
-
{
|
|
138
|
-
hideLabel: true,
|
|
139
|
-
label: selection.label(id),
|
|
140
|
-
checked: checked === true,
|
|
141
|
-
indeterminate: checked === "mixed",
|
|
142
|
-
tabIndex: context.tabStop(id, 1) ? 0 : -1,
|
|
143
|
-
onClick: () => context.opened(id, 1),
|
|
144
|
-
onCheckedChange: (next) => selection.onCheckedChange(id, next)
|
|
145
|
-
}
|
|
146
|
-
) });
|
|
147
|
-
}
|
|
148
116
|
function OrgTableWire({
|
|
149
117
|
depth,
|
|
150
118
|
tone,
|