@inf-monkeys-tech/monkeys-design 0.4.31 → 0.4.32
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/README.md +6 -0
- package/dist/components/workbench/index.d.mts +561 -0
- package/dist/components/workbench/index.d.ts +561 -0
- package/dist/components/workbench/index.js +5513 -0
- package/dist/components/workbench/index.js.map +1 -0
- package/dist/components/workbench/index.mjs +5502 -0
- package/dist/components/workbench/index.mjs.map +1 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2823 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2815 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -1
package/README.md
CHANGED
|
@@ -95,6 +95,10 @@ import {
|
|
|
95
95
|
- `BaseInput`
|
|
96
96
|
- `BaseTextarea`
|
|
97
97
|
- `BaseSelect`
|
|
98
|
+
- `BaseLayout`
|
|
99
|
+
- `BaseLayoutPane`
|
|
100
|
+
- `BaseLayoutSplit`
|
|
101
|
+
- `BaseLayoutResizeHandle`
|
|
98
102
|
- `BaseSwitch`
|
|
99
103
|
- `BaseCheckbox`
|
|
100
104
|
- `BaseRadioGroup`
|
|
@@ -120,6 +124,8 @@ import {
|
|
|
120
124
|
|
|
121
125
|
`BaseAppearance` 用于控制 preset、density、radius、border、background、slot className 和 inline style 覆盖。
|
|
122
126
|
|
|
127
|
+
`BaseLayout` 提供中立布局 primitives:`BaseLayout` 管 header/sidebar/main/aside/footer 区域,`BaseLayoutPane` 管主题化区域表面,`BaseLayoutSplit` 管固定或可调的左右/上下分割。`gap` 可显式控制区域间距,number 按 px,string 原样作为 CSS 长度;不传时继续使用 `BaseAppearance` 的主题间距。可调分割支持 `defaultSize`、受控 `size`、`minSize`、`maxSize` 和 `onSizeChange`;尺寸是否持久化仍由使用方控制。
|
|
128
|
+
|
|
123
129
|
## Data Explorer
|
|
124
130
|
|
|
125
131
|
`components/data-explorer` 提供面向数据密集页面的组合组件。组件库负责可复用的控制、展示、预览、详情和布局结构;数据请求、权限、路由、弹窗和业务动作由使用方控制。
|
|
@@ -0,0 +1,561 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ReactNode, MouseEvent, ElementType, CSSProperties, ComponentPropsWithoutRef, ComponentType } from 'react';
|
|
3
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
+
import { aN as BaseTableSortDirection, c as BaseAppearance, aw as BaseTableColumnSizes, au as BaseTableColumnOrderChangeDetail, av as BaseTableColumnSizeChangeDetail } from '../../types-BgEEUqSm.mjs';
|
|
5
|
+
import '@radix-ui/react-context-menu';
|
|
6
|
+
|
|
7
|
+
interface WorkbenchResizableSidebarItem {
|
|
8
|
+
id: string;
|
|
9
|
+
label: ReactNode;
|
|
10
|
+
icon?: ReactNode;
|
|
11
|
+
active?: boolean;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
href?: string;
|
|
14
|
+
to?: string;
|
|
15
|
+
title?: string;
|
|
16
|
+
endContent?: ReactNode;
|
|
17
|
+
className?: string;
|
|
18
|
+
onClick?: (event: MouseEvent<HTMLElement>) => void;
|
|
19
|
+
}
|
|
20
|
+
interface WorkbenchResizableSidebarClassNames {
|
|
21
|
+
root?: string;
|
|
22
|
+
header?: string;
|
|
23
|
+
title?: string;
|
|
24
|
+
collapseButton?: string;
|
|
25
|
+
list?: string;
|
|
26
|
+
item?: string;
|
|
27
|
+
itemIcon?: string;
|
|
28
|
+
itemLabel?: string;
|
|
29
|
+
resizeHandle?: string;
|
|
30
|
+
mobileNav?: string;
|
|
31
|
+
mobileItem?: string;
|
|
32
|
+
}
|
|
33
|
+
interface WorkbenchResizableSidebarProps {
|
|
34
|
+
title?: ReactNode;
|
|
35
|
+
items: WorkbenchResizableSidebarItem[];
|
|
36
|
+
activeItemId?: string;
|
|
37
|
+
itemAs?: ElementType;
|
|
38
|
+
collapsed?: boolean;
|
|
39
|
+
defaultCollapsed?: boolean;
|
|
40
|
+
onCollapsedChange?: (collapsed: boolean) => void;
|
|
41
|
+
width?: number;
|
|
42
|
+
onWidthChange?: (width: number) => void;
|
|
43
|
+
defaultWidth?: number;
|
|
44
|
+
minWidth?: number;
|
|
45
|
+
maxWidth?: number;
|
|
46
|
+
collapsedWidth?: number;
|
|
47
|
+
collapseThreshold?: number;
|
|
48
|
+
storageKey?: string;
|
|
49
|
+
resizable?: boolean;
|
|
50
|
+
collapsible?: boolean;
|
|
51
|
+
collapseLabel?: string;
|
|
52
|
+
expandLabel?: string;
|
|
53
|
+
resizeLabel?: string;
|
|
54
|
+
desktopClassName?: string;
|
|
55
|
+
mobileClassName?: string;
|
|
56
|
+
className?: string;
|
|
57
|
+
classNames?: WorkbenchResizableSidebarClassNames;
|
|
58
|
+
style?: CSSProperties;
|
|
59
|
+
}
|
|
60
|
+
declare const WorkbenchResizableSidebar: React.ForwardRefExoticComponent<WorkbenchResizableSidebarProps & React.RefAttributes<HTMLElement>>;
|
|
61
|
+
|
|
62
|
+
interface WorkbenchContentPaneClassNames {
|
|
63
|
+
root?: string;
|
|
64
|
+
header?: string;
|
|
65
|
+
body?: string;
|
|
66
|
+
footer?: string;
|
|
67
|
+
}
|
|
68
|
+
interface WorkbenchContentPaneBodyProps extends Omit<ComponentPropsWithoutRef<'div'>, 'children' | 'className'> {
|
|
69
|
+
className?: string;
|
|
70
|
+
}
|
|
71
|
+
interface WorkbenchContentPaneProps extends Omit<ComponentPropsWithoutRef<'section'>, 'children' | 'className' | 'style'> {
|
|
72
|
+
as?: ElementType;
|
|
73
|
+
bodyAs?: ElementType;
|
|
74
|
+
header?: ReactNode;
|
|
75
|
+
footer?: ReactNode;
|
|
76
|
+
children?: ReactNode;
|
|
77
|
+
className?: string;
|
|
78
|
+
headerClassName?: string;
|
|
79
|
+
bodyClassName?: string;
|
|
80
|
+
footerClassName?: string;
|
|
81
|
+
bodyProps?: WorkbenchContentPaneBodyProps;
|
|
82
|
+
classNames?: WorkbenchContentPaneClassNames;
|
|
83
|
+
style?: CSSProperties;
|
|
84
|
+
[key: string]: any;
|
|
85
|
+
}
|
|
86
|
+
declare const WorkbenchContentPane: React.ForwardRefExoticComponent<Omit<WorkbenchContentPaneProps, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
87
|
+
|
|
88
|
+
interface WorkbenchGalleryColumn {
|
|
89
|
+
key: string;
|
|
90
|
+
label?: ReactNode;
|
|
91
|
+
renderType?: string;
|
|
92
|
+
type?: string;
|
|
93
|
+
wrap?: boolean;
|
|
94
|
+
[key: string]: any;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
interface WorkbenchGallerySettingsValue {
|
|
98
|
+
visibleColumnKeys?: string[];
|
|
99
|
+
galleryFieldKey?: string;
|
|
100
|
+
galleryLayout?: 'fixed' | 'masonry' | string;
|
|
101
|
+
galleryDensity?: 'compact' | 'comfortable' | 'detailed' | string;
|
|
102
|
+
galleryGridColumns?: number | 'auto' | string;
|
|
103
|
+
galleryBentoColumns?: 1 | 2 | 3 | number;
|
|
104
|
+
galleryDetailVisibility?: 'all' | 'limit' | string;
|
|
105
|
+
galleryDetailLimit?: number | string;
|
|
106
|
+
[key: string]: any;
|
|
107
|
+
}
|
|
108
|
+
interface WorkbenchGallerySettingsOption<Value extends string | number = string> {
|
|
109
|
+
value: Value;
|
|
110
|
+
label: ReactNode;
|
|
111
|
+
disabled?: boolean;
|
|
112
|
+
}
|
|
113
|
+
interface WorkbenchGallerySettingsLabels {
|
|
114
|
+
settingsButton?: ReactNode;
|
|
115
|
+
title?: ReactNode;
|
|
116
|
+
visibleColumns?: ReactNode;
|
|
117
|
+
coverField?: ReactNode;
|
|
118
|
+
autoDetect?: ReactNode;
|
|
119
|
+
cardDensity?: ReactNode;
|
|
120
|
+
cardColumns?: ReactNode;
|
|
121
|
+
detailColumns?: ReactNode;
|
|
122
|
+
fieldVisibility?: ReactNode;
|
|
123
|
+
fieldLimit?: ReactNode;
|
|
124
|
+
fieldLimitHint?: ReactNode;
|
|
125
|
+
layout?: ReactNode;
|
|
126
|
+
compact?: ReactNode;
|
|
127
|
+
comfortable?: ReactNode;
|
|
128
|
+
detailed?: ReactNode;
|
|
129
|
+
autoColumns?: ReactNode;
|
|
130
|
+
columns?: (count: number) => ReactNode;
|
|
131
|
+
bentoColumns?: (count: number) => ReactNode;
|
|
132
|
+
topLimit?: ReactNode;
|
|
133
|
+
allFields?: ReactNode;
|
|
134
|
+
adaptiveGrid?: ReactNode;
|
|
135
|
+
masonry?: ReactNode;
|
|
136
|
+
}
|
|
137
|
+
interface WorkbenchGallerySettingsPanelClassNames {
|
|
138
|
+
root?: string;
|
|
139
|
+
section?: string;
|
|
140
|
+
sectionHeader?: string;
|
|
141
|
+
columnList?: string;
|
|
142
|
+
columnItem?: string;
|
|
143
|
+
control?: string;
|
|
144
|
+
}
|
|
145
|
+
interface WorkbenchGallerySettingsPanelProps {
|
|
146
|
+
columns?: WorkbenchGalleryColumn[];
|
|
147
|
+
galleryFieldOptions?: WorkbenchGalleryColumn[];
|
|
148
|
+
value?: WorkbenchGallerySettingsValue;
|
|
149
|
+
onValueChange?: (nextValue: WorkbenchGallerySettingsValue, patch: Partial<WorkbenchGallerySettingsValue>) => void;
|
|
150
|
+
labels?: WorkbenchGallerySettingsLabels;
|
|
151
|
+
densityOptions?: Array<WorkbenchGallerySettingsOption>;
|
|
152
|
+
gridColumnOptions?: Array<WorkbenchGallerySettingsOption<number | 'auto'>>;
|
|
153
|
+
bentoColumnOptions?: Array<WorkbenchGallerySettingsOption<number>>;
|
|
154
|
+
detailVisibilityOptions?: Array<WorkbenchGallerySettingsOption>;
|
|
155
|
+
layoutOptions?: Array<WorkbenchGallerySettingsOption>;
|
|
156
|
+
getColumnLabel?: (column: WorkbenchGalleryColumn) => ReactNode;
|
|
157
|
+
getColumnDescription?: (column: WorkbenchGalleryColumn) => ReactNode;
|
|
158
|
+
showColumnVisibility?: boolean;
|
|
159
|
+
showGalleryControls?: boolean;
|
|
160
|
+
showLayoutControl?: boolean;
|
|
161
|
+
showGridColumns?: boolean;
|
|
162
|
+
showDetailColumns?: boolean;
|
|
163
|
+
allowEmptyVisibleColumns?: boolean;
|
|
164
|
+
className?: string;
|
|
165
|
+
classNames?: WorkbenchGallerySettingsPanelClassNames;
|
|
166
|
+
}
|
|
167
|
+
interface WorkbenchGallerySettingsButtonClassNames {
|
|
168
|
+
root?: string;
|
|
169
|
+
trigger?: string;
|
|
170
|
+
popover?: string;
|
|
171
|
+
header?: string;
|
|
172
|
+
panel?: string;
|
|
173
|
+
}
|
|
174
|
+
interface WorkbenchGallerySettingsButtonProps extends WorkbenchGallerySettingsPanelProps {
|
|
175
|
+
open?: boolean;
|
|
176
|
+
defaultOpen?: boolean;
|
|
177
|
+
onOpenChange?: (open: boolean) => void;
|
|
178
|
+
triggerIcon?: ReactNode;
|
|
179
|
+
triggerLabel?: ReactNode;
|
|
180
|
+
triggerTitle?: string;
|
|
181
|
+
align?: 'start' | 'end';
|
|
182
|
+
popoverWidth?: number;
|
|
183
|
+
panelHeader?: ReactNode;
|
|
184
|
+
panelBefore?: ReactNode;
|
|
185
|
+
panelAfter?: ReactNode;
|
|
186
|
+
panelClassName?: string;
|
|
187
|
+
buttonClassName?: string;
|
|
188
|
+
popoverClassName?: string;
|
|
189
|
+
buttonClassNames?: WorkbenchGallerySettingsButtonClassNames;
|
|
190
|
+
}
|
|
191
|
+
declare function WorkbenchGallerySettingsPanel({ columns, galleryFieldOptions, value, onValueChange, labels, densityOptions, gridColumnOptions, bentoColumnOptions, detailVisibilityOptions, layoutOptions, getColumnLabel, getColumnDescription, showColumnVisibility, showGalleryControls, showLayoutControl, showGridColumns, showDetailColumns, allowEmptyVisibleColumns, className, classNames, }: WorkbenchGallerySettingsPanelProps): react_jsx_runtime.JSX.Element;
|
|
192
|
+
declare function WorkbenchGallerySettingsButton({ open, defaultOpen, onOpenChange, triggerIcon, triggerLabel, triggerTitle, align, popoverWidth, panelHeader, panelBefore, panelAfter, panelClassName, buttonClassName, popoverClassName, buttonClassNames, labels, className, classNames, ...panelProps }: WorkbenchGallerySettingsButtonProps): react_jsx_runtime.JSX.Element;
|
|
193
|
+
|
|
194
|
+
interface WorkbenchContentToolbarViewModeOption {
|
|
195
|
+
value: string;
|
|
196
|
+
label: ReactNode;
|
|
197
|
+
icon?: ReactNode;
|
|
198
|
+
disabled?: boolean;
|
|
199
|
+
}
|
|
200
|
+
interface WorkbenchContentToolbarClassNames {
|
|
201
|
+
root?: string;
|
|
202
|
+
start?: string;
|
|
203
|
+
end?: string;
|
|
204
|
+
viewModeRoot?: string;
|
|
205
|
+
viewModeTrigger?: string;
|
|
206
|
+
viewModeMenu?: string;
|
|
207
|
+
viewModeItem?: string;
|
|
208
|
+
settings?: string;
|
|
209
|
+
}
|
|
210
|
+
interface WorkbenchContentToolbarProps extends Omit<ComponentPropsWithoutRef<'div'>, 'children' | 'className'> {
|
|
211
|
+
as?: ElementType;
|
|
212
|
+
children?: ReactNode;
|
|
213
|
+
end?: ReactNode;
|
|
214
|
+
viewMode?: string;
|
|
215
|
+
viewModeOptions?: WorkbenchContentToolbarViewModeOption[];
|
|
216
|
+
onViewModeChange?: (nextValue: string, option: WorkbenchContentToolbarViewModeOption) => void;
|
|
217
|
+
gallerySettings?: WorkbenchGallerySettingsButtonProps | false;
|
|
218
|
+
gallerySettingsPlacement?: 'start' | 'end';
|
|
219
|
+
className?: string;
|
|
220
|
+
startClassName?: string;
|
|
221
|
+
endClassName?: string;
|
|
222
|
+
classNames?: WorkbenchContentToolbarClassNames;
|
|
223
|
+
[key: string]: any;
|
|
224
|
+
}
|
|
225
|
+
declare const WorkbenchContentToolbar: React.ForwardRefExoticComponent<Omit<WorkbenchContentToolbarProps, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
226
|
+
|
|
227
|
+
interface WorkbenchDetailSidebarClassNames {
|
|
228
|
+
root?: string;
|
|
229
|
+
header?: string;
|
|
230
|
+
body?: string;
|
|
231
|
+
footer?: string;
|
|
232
|
+
resizeHandle?: string;
|
|
233
|
+
autoBody?: string;
|
|
234
|
+
section?: string;
|
|
235
|
+
sectionHeader?: string;
|
|
236
|
+
sectionTitle?: string;
|
|
237
|
+
sectionDescription?: string;
|
|
238
|
+
descriptionList?: string;
|
|
239
|
+
descriptionListItem?: string;
|
|
240
|
+
descriptionListTerm?: string;
|
|
241
|
+
descriptionListValue?: string;
|
|
242
|
+
fieldLabel?: string;
|
|
243
|
+
fieldLabelIcon?: string;
|
|
244
|
+
fieldValue?: string;
|
|
245
|
+
mediaValue?: string;
|
|
246
|
+
mediaImage?: string;
|
|
247
|
+
mediaCaption?: string;
|
|
248
|
+
emptyState?: string;
|
|
249
|
+
}
|
|
250
|
+
interface WorkbenchDetailSidebarBodyProps extends Omit<ComponentPropsWithoutRef<'div'>, 'children' | 'className'> {
|
|
251
|
+
className?: string;
|
|
252
|
+
}
|
|
253
|
+
interface WorkbenchDetailSidebarField<Row = any> {
|
|
254
|
+
key: string;
|
|
255
|
+
label?: ReactNode;
|
|
256
|
+
labelIcon?: ReactNode | ElementType;
|
|
257
|
+
icon?: ReactNode | ElementType;
|
|
258
|
+
renderType?: string;
|
|
259
|
+
value?: ReactNode | ((record: Row | null | undefined, field: WorkbenchDetailSidebarField<Row>) => ReactNode);
|
|
260
|
+
description?: ReactNode;
|
|
261
|
+
hidden?: boolean | ((field: WorkbenchDetailSidebarField<Row>, record: Row | null | undefined) => boolean);
|
|
262
|
+
emptyValue?: ReactNode;
|
|
263
|
+
[key: string]: any;
|
|
264
|
+
}
|
|
265
|
+
interface WorkbenchDetailSidebarSection<Row = any> {
|
|
266
|
+
id?: string;
|
|
267
|
+
title?: ReactNode;
|
|
268
|
+
description?: ReactNode;
|
|
269
|
+
fields?: WorkbenchDetailSidebarField<Row>[];
|
|
270
|
+
columns?: 1 | 2 | 3;
|
|
271
|
+
hidden?: boolean | ((section: WorkbenchDetailSidebarSection<Row>, record: Row | null | undefined) => boolean);
|
|
272
|
+
emptyState?: ReactNode;
|
|
273
|
+
[key: string]: any;
|
|
274
|
+
}
|
|
275
|
+
interface WorkbenchDetailSidebarRenderContext<Row = any> {
|
|
276
|
+
field: WorkbenchDetailSidebarField<Row>;
|
|
277
|
+
fieldIndex: number;
|
|
278
|
+
section: WorkbenchDetailSidebarSection<Row>;
|
|
279
|
+
sectionIndex: number;
|
|
280
|
+
record: Row | null | undefined;
|
|
281
|
+
}
|
|
282
|
+
interface WorkbenchDetailSidebarProps<Row = any> extends Omit<ComponentPropsWithoutRef<'aside'>, 'children' | 'className' | 'style'> {
|
|
283
|
+
as?: ElementType;
|
|
284
|
+
bodyAs?: ElementType;
|
|
285
|
+
open?: boolean;
|
|
286
|
+
width?: number | string;
|
|
287
|
+
header?: ReactNode;
|
|
288
|
+
footer?: ReactNode;
|
|
289
|
+
resizeHandle?: ReactNode;
|
|
290
|
+
children?: ReactNode;
|
|
291
|
+
record?: Row | null;
|
|
292
|
+
fields?: WorkbenchDetailSidebarField<Row>[];
|
|
293
|
+
sections?: WorkbenchDetailSidebarSection<Row>[];
|
|
294
|
+
fieldColumns?: 1 | 2 | 3;
|
|
295
|
+
emptyValue?: ReactNode;
|
|
296
|
+
emptyState?: ReactNode;
|
|
297
|
+
getFieldValue?: (field: WorkbenchDetailSidebarField<Row>, record: Row | null | undefined, context: WorkbenchDetailSidebarRenderContext<Row>) => unknown;
|
|
298
|
+
renderFieldValue?: (field: WorkbenchDetailSidebarField<Row>, record: Row | null | undefined, context: WorkbenchDetailSidebarRenderContext<Row>) => ReactNode;
|
|
299
|
+
formatFieldValue?: (value: unknown, context: WorkbenchDetailSidebarRenderContext<Row>) => ReactNode;
|
|
300
|
+
formatFieldLabel?: (label: ReactNode, context: Omit<WorkbenchDetailSidebarRenderContext<Row>, 'fieldIndex'> & {
|
|
301
|
+
field: WorkbenchDetailSidebarField<Row>;
|
|
302
|
+
fieldIndex?: number;
|
|
303
|
+
}) => ReactNode;
|
|
304
|
+
className?: string;
|
|
305
|
+
headerClassName?: string;
|
|
306
|
+
bodyClassName?: string;
|
|
307
|
+
footerClassName?: string;
|
|
308
|
+
resizeHandleClassName?: string;
|
|
309
|
+
bodyProps?: WorkbenchDetailSidebarBodyProps;
|
|
310
|
+
classNames?: WorkbenchDetailSidebarClassNames;
|
|
311
|
+
style?: CSSProperties;
|
|
312
|
+
[key: string]: any;
|
|
313
|
+
}
|
|
314
|
+
declare const WorkbenchDetailSidebar: React.ForwardRefExoticComponent<Omit<WorkbenchDetailSidebarProps<any>, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
315
|
+
|
|
316
|
+
interface WorkbenchTableViewColumn {
|
|
317
|
+
key: string;
|
|
318
|
+
label?: ReactNode;
|
|
319
|
+
helperText?: ReactNode;
|
|
320
|
+
renderType?: string;
|
|
321
|
+
type?: string;
|
|
322
|
+
description?: ReactNode;
|
|
323
|
+
meta?: ReactNode;
|
|
324
|
+
actions?: ReactNode;
|
|
325
|
+
trailing?: ReactNode;
|
|
326
|
+
wrap?: boolean;
|
|
327
|
+
align?: 'left' | 'center' | 'right';
|
|
328
|
+
width?: number | string;
|
|
329
|
+
minWidth?: number | string;
|
|
330
|
+
maxWidth?: number | string;
|
|
331
|
+
sortable?: boolean;
|
|
332
|
+
sortDirection?: BaseTableSortDirection;
|
|
333
|
+
sortLabel?: string;
|
|
334
|
+
draggable?: boolean;
|
|
335
|
+
dragLabel?: string;
|
|
336
|
+
resizable?: boolean;
|
|
337
|
+
resizeLabel?: string;
|
|
338
|
+
compactHeaderClassName?: string;
|
|
339
|
+
compactCellClassName?: string;
|
|
340
|
+
headerClassName?: string;
|
|
341
|
+
cellClassName?: string;
|
|
342
|
+
[key: string]: any;
|
|
343
|
+
}
|
|
344
|
+
interface WorkbenchTableViewClassNames {
|
|
345
|
+
root?: string;
|
|
346
|
+
scrollArea?: string;
|
|
347
|
+
table?: string;
|
|
348
|
+
header?: string;
|
|
349
|
+
headerRow?: string;
|
|
350
|
+
headerCell?: string;
|
|
351
|
+
body?: string;
|
|
352
|
+
row?: string;
|
|
353
|
+
cell?: string;
|
|
354
|
+
footer?: string;
|
|
355
|
+
helper?: string;
|
|
356
|
+
}
|
|
357
|
+
interface WorkbenchTableViewRenderContext<Row = any> {
|
|
358
|
+
row: Row;
|
|
359
|
+
rowIndex: number;
|
|
360
|
+
column: WorkbenchTableViewColumn;
|
|
361
|
+
columnIndex: number;
|
|
362
|
+
compact: boolean;
|
|
363
|
+
surface: 'list' | string;
|
|
364
|
+
}
|
|
365
|
+
interface WorkbenchTableViewHeaderContext<Row = any> {
|
|
366
|
+
column: WorkbenchTableViewColumn;
|
|
367
|
+
columnIndex: number;
|
|
368
|
+
columns: WorkbenchTableViewColumn[];
|
|
369
|
+
rows: Row[];
|
|
370
|
+
columnType?: string;
|
|
371
|
+
}
|
|
372
|
+
interface WorkbenchTableViewProps<Row = any> {
|
|
373
|
+
rows?: Row[];
|
|
374
|
+
columns?: WorkbenchTableViewColumn[];
|
|
375
|
+
onRowClick?: (row: Row, rowIndex: number) => void;
|
|
376
|
+
selectedRowKey?: string;
|
|
377
|
+
selectedLinkKey?: string;
|
|
378
|
+
activePrimaryColumn?: WorkbenchTableViewColumn | null;
|
|
379
|
+
activeTablePrimaryColumn?: WorkbenchTableViewColumn | null;
|
|
380
|
+
renderedRowCount?: number;
|
|
381
|
+
totalRowCount?: number;
|
|
382
|
+
tableMinWidth?: number;
|
|
383
|
+
minWidth?: number;
|
|
384
|
+
bodyMaxHeight?: number | string;
|
|
385
|
+
stickyFirstColumn?: boolean;
|
|
386
|
+
appearance?: BaseAppearance;
|
|
387
|
+
columnOrder?: string[];
|
|
388
|
+
columnSizes?: BaseTableColumnSizes;
|
|
389
|
+
columnDragEnabled?: boolean;
|
|
390
|
+
columnResizeEnabled?: boolean;
|
|
391
|
+
className?: string;
|
|
392
|
+
tableClassName?: string;
|
|
393
|
+
rowClassName?: string | ((row: Row, rowIndex: number) => string | undefined);
|
|
394
|
+
classNames?: WorkbenchTableViewClassNames;
|
|
395
|
+
style?: CSSProperties;
|
|
396
|
+
renderCell?: (column: WorkbenchTableViewColumn, row: Row, context: WorkbenchTableViewRenderContext<Row>) => ReactNode;
|
|
397
|
+
renderFieldValue?: (column: WorkbenchTableViewColumn, row: Row, context: WorkbenchTableViewRenderContext<Row>) => ReactNode;
|
|
398
|
+
renderColumnHeader?: (column: WorkbenchTableViewColumn, context: WorkbenchTableViewHeaderContext<Row>) => ReactNode;
|
|
399
|
+
onColumnOrderChange?: (nextOrder: string[], detail: BaseTableColumnOrderChangeDetail) => void;
|
|
400
|
+
onColumnSizeChange?: (columnId: string, width: number, detail: BaseTableColumnSizeChangeDetail) => void;
|
|
401
|
+
onSort?: (columnKey: string, column: WorkbenchTableViewColumn) => void;
|
|
402
|
+
formatLabel?: (value: ReactNode, context?: {
|
|
403
|
+
column?: WorkbenchTableViewColumn;
|
|
404
|
+
}) => ReactNode;
|
|
405
|
+
getColumnDataType?: (columnKey: string, rows: Row[], column?: WorkbenchTableViewColumn) => string | undefined;
|
|
406
|
+
getColumnIcon?: (columnType?: string, column?: WorkbenchTableViewColumn) => ReactNode | ComponentType<{
|
|
407
|
+
className?: string;
|
|
408
|
+
}> | null | undefined;
|
|
409
|
+
getColumnTypeIcon?: (columnType?: string, column?: WorkbenchTableViewColumn) => ReactNode | ComponentType<{
|
|
410
|
+
className?: string;
|
|
411
|
+
}> | null | undefined;
|
|
412
|
+
getRowKey?: (row: Row, rowIndex: number) => string | number;
|
|
413
|
+
getRowSelectionKey?: (row: Row, rowIndex: number) => string | number | undefined;
|
|
414
|
+
isActionColumn?: (column: WorkbenchTableViewColumn) => boolean;
|
|
415
|
+
isActionField?: (column: WorkbenchTableViewColumn) => boolean;
|
|
416
|
+
isRowDisabled?: (row: Row, rowIndex: number) => boolean;
|
|
417
|
+
isWorkbenchPlaceholderRow?: (row: Row, rowIndex?: number) => boolean;
|
|
418
|
+
emptyState?: ReactNode;
|
|
419
|
+
hiddenRowsMessage?: ReactNode | ((hiddenRowCount: number, renderedRowCount: number, totalRowCount: number) => ReactNode);
|
|
420
|
+
}
|
|
421
|
+
declare function WorkbenchTableView<Row = any>({ rows, columns, onRowClick, selectedRowKey, selectedLinkKey, activePrimaryColumn, activeTablePrimaryColumn, renderedRowCount, totalRowCount, tableMinWidth, minWidth, bodyMaxHeight, stickyFirstColumn, appearance, columnOrder, columnSizes, columnDragEnabled, columnResizeEnabled, className, tableClassName, rowClassName, classNames, style, renderCell, renderFieldValue, renderColumnHeader, onColumnOrderChange, onColumnSizeChange, onSort, formatLabel, getColumnDataType, getColumnIcon, getColumnTypeIcon, getRowKey, getRowSelectionKey, isActionColumn, isActionField, isRowDisabled, isWorkbenchPlaceholderRow, emptyState, hiddenRowsMessage, }: WorkbenchTableViewProps<Row>): react_jsx_runtime.JSX.Element;
|
|
422
|
+
|
|
423
|
+
interface WorkbenchGalleryRecordVisual {
|
|
424
|
+
Icon?: ComponentType<{
|
|
425
|
+
className?: string;
|
|
426
|
+
}> | ReactNode;
|
|
427
|
+
icon?: ComponentType<{
|
|
428
|
+
className?: string;
|
|
429
|
+
}> | ReactNode;
|
|
430
|
+
chipClassName?: string;
|
|
431
|
+
iconClassName?: string;
|
|
432
|
+
label?: ReactNode;
|
|
433
|
+
title?: ReactNode;
|
|
434
|
+
[key: string]: any;
|
|
435
|
+
}
|
|
436
|
+
interface WorkbenchGalleryLabels {
|
|
437
|
+
fieldCount?: (count: number) => ReactNode;
|
|
438
|
+
coverOnlyHint?: ReactNode;
|
|
439
|
+
}
|
|
440
|
+
interface WorkbenchGalleryCardProps<Row = any> {
|
|
441
|
+
row: Row;
|
|
442
|
+
columns: WorkbenchGalleryColumn[];
|
|
443
|
+
onClick?: () => void;
|
|
444
|
+
isSelected?: boolean;
|
|
445
|
+
isMasonry?: boolean;
|
|
446
|
+
galleryFieldKey?: string;
|
|
447
|
+
galleryDensity?: 'compact' | 'comfortable' | 'detailed' | string;
|
|
448
|
+
galleryBentoColumns?: 1 | 2 | 3 | number;
|
|
449
|
+
galleryDetailVisibility?: 'all' | 'limit' | string;
|
|
450
|
+
galleryDetailLimit?: number | string;
|
|
451
|
+
shouldEnhanceMultimodal?: boolean;
|
|
452
|
+
getFieldValue?: (column: WorkbenchGalleryColumn, row: Row) => unknown;
|
|
453
|
+
isMediaColumn?: (column: WorkbenchGalleryColumn, row: Row) => boolean;
|
|
454
|
+
isTitleCandidate?: (column: WorkbenchGalleryColumn, row: Row) => boolean;
|
|
455
|
+
isSummaryCandidate?: (column: WorkbenchGalleryColumn, row: Row) => boolean;
|
|
456
|
+
getDisplayText?: (value: unknown) => ReactNode;
|
|
457
|
+
renderFieldValue?: (column: WorkbenchGalleryColumn, row: Row, context: {
|
|
458
|
+
compact?: boolean;
|
|
459
|
+
surface?: string;
|
|
460
|
+
}) => ReactNode;
|
|
461
|
+
getImagePreviewSrc?: (value: unknown, rowId?: string | number, columnLabel?: ReactNode) => string;
|
|
462
|
+
isImageField?: (column: WorkbenchGalleryColumn, value: unknown) => boolean;
|
|
463
|
+
isAudioField?: (column: WorkbenchGalleryColumn, value: unknown) => boolean;
|
|
464
|
+
AudioPlayerComponent?: ComponentType<{
|
|
465
|
+
filename: string;
|
|
466
|
+
}>;
|
|
467
|
+
cardVariant?: 'default' | 'image-only' | 'preview-only' | 'chromatic-bento' | string;
|
|
468
|
+
renderPreview?: (context: WorkbenchGalleryCardRenderContext<Row>) => ReactNode;
|
|
469
|
+
renderMeta?: (context: WorkbenchGalleryCardMetaContext<Row>) => ReactNode;
|
|
470
|
+
renderLeadingVisual?: (context: WorkbenchGalleryCardMetaContext<Row> & {
|
|
471
|
+
iconVisual?: WorkbenchGalleryRecordVisual | null;
|
|
472
|
+
}) => ReactNode;
|
|
473
|
+
resolveRecordVisual?: (value: unknown, row: Row, iconColumn?: WorkbenchGalleryColumn) => WorkbenchGalleryRecordVisual | null | undefined;
|
|
474
|
+
hiddenDetailFieldKeys?: string[];
|
|
475
|
+
labels?: WorkbenchGalleryLabels;
|
|
476
|
+
formatLabel?: (value: ReactNode, context?: {
|
|
477
|
+
column?: WorkbenchGalleryColumn;
|
|
478
|
+
}) => ReactNode;
|
|
479
|
+
className?: string;
|
|
480
|
+
}
|
|
481
|
+
interface WorkbenchGalleryCardRenderContext<Row = any> {
|
|
482
|
+
row: Row;
|
|
483
|
+
mediaColumn?: WorkbenchGalleryColumn | null;
|
|
484
|
+
mediaValue: unknown;
|
|
485
|
+
isImageMedia: boolean;
|
|
486
|
+
isAudioMedia: boolean;
|
|
487
|
+
iconVisual?: WorkbenchGalleryRecordVisual | null;
|
|
488
|
+
IconComponent?: ComponentType<{
|
|
489
|
+
className?: string;
|
|
490
|
+
}> | null;
|
|
491
|
+
previewClassName: string;
|
|
492
|
+
}
|
|
493
|
+
interface WorkbenchGalleryCardMetaContext<Row = any> {
|
|
494
|
+
row: Row;
|
|
495
|
+
contentColumns: WorkbenchGalleryColumn[];
|
|
496
|
+
detailColumns: WorkbenchGalleryColumn[];
|
|
497
|
+
titleColumn?: WorkbenchGalleryColumn | null;
|
|
498
|
+
summaryColumn?: WorkbenchGalleryColumn | null;
|
|
499
|
+
getDisplayText: (value: unknown) => ReactNode;
|
|
500
|
+
getFieldValue: (column: WorkbenchGalleryColumn, row: Row) => unknown;
|
|
501
|
+
}
|
|
502
|
+
declare function WorkbenchGalleryCard<Row = any>({ row, columns, onClick, isSelected, isMasonry, galleryFieldKey, galleryDensity, galleryBentoColumns, galleryDetailVisibility, galleryDetailLimit, shouldEnhanceMultimodal, getFieldValue, isMediaColumn, isTitleCandidate, isSummaryCandidate, getDisplayText, renderFieldValue, getImagePreviewSrc, isImageField, isAudioField, AudioPlayerComponent, cardVariant, renderPreview, renderMeta, renderLeadingVisual, resolveRecordVisual, hiddenDetailFieldKeys, labels, formatLabel, className, }: WorkbenchGalleryCardProps<Row>): react_jsx_runtime.JSX.Element;
|
|
503
|
+
|
|
504
|
+
interface WorkbenchMasonryItemSize {
|
|
505
|
+
width?: number | string;
|
|
506
|
+
height?: number | string;
|
|
507
|
+
columnSpan?: number;
|
|
508
|
+
rowSpan?: number;
|
|
509
|
+
}
|
|
510
|
+
interface WorkbenchMasonryLayoutContext {
|
|
511
|
+
columnCount: number;
|
|
512
|
+
columnSpan?: number;
|
|
513
|
+
columnWidth: number;
|
|
514
|
+
containerWidth: number;
|
|
515
|
+
gap: number;
|
|
516
|
+
itemWidth?: number;
|
|
517
|
+
placementStrategy: 'shelf' | 'dense';
|
|
518
|
+
rowSpan?: number;
|
|
519
|
+
rowHeight: number;
|
|
520
|
+
size?: WorkbenchMasonryItemSize;
|
|
521
|
+
}
|
|
522
|
+
interface WorkbenchMasonryLayoutProps<Item = any> {
|
|
523
|
+
items?: Item[];
|
|
524
|
+
renderItem: (item: Item, context: WorkbenchMasonryLayoutContext) => ReactNode;
|
|
525
|
+
getItemKey?: (item: Item, index: number) => string | number;
|
|
526
|
+
getItemSize?: (item: Item, context: WorkbenchMasonryLayoutContext) => WorkbenchMasonryItemSize | undefined;
|
|
527
|
+
columnWidth?: number | string;
|
|
528
|
+
gap?: number;
|
|
529
|
+
rowHeight?: number;
|
|
530
|
+
placementStrategy?: 'shelf' | 'dense';
|
|
531
|
+
className?: string;
|
|
532
|
+
}
|
|
533
|
+
declare function WorkbenchMasonryLayout<Item = any>({ items, renderItem, getItemKey, getItemSize, columnWidth, gap, rowHeight, placementStrategy, className, }: WorkbenchMasonryLayoutProps<Item>): react_jsx_runtime.JSX.Element;
|
|
534
|
+
|
|
535
|
+
interface WorkbenchGalleryViewProps<Row = any> extends Omit<WorkbenchGalleryCardProps<Row>, 'row' | 'columns' | 'onClick' | 'isSelected' | 'isMasonry'> {
|
|
536
|
+
rows?: Row[];
|
|
537
|
+
columns?: WorkbenchGalleryColumn[];
|
|
538
|
+
onRowClick?: (row: Row, rowIndex: number) => void;
|
|
539
|
+
selectedLinkKey?: string;
|
|
540
|
+
selectedRowKey?: string;
|
|
541
|
+
className?: string;
|
|
542
|
+
isMasonry?: boolean;
|
|
543
|
+
galleryLayoutMode?: 'auto' | 'rail' | string;
|
|
544
|
+
galleryRailCardWidth?: number;
|
|
545
|
+
galleryGridColumns?: number | 'auto' | string;
|
|
546
|
+
galleryGridCardWidth?: number | string;
|
|
547
|
+
galleryMasonryColumnWidth?: number | string;
|
|
548
|
+
masonryPlacementStrategy?: 'shelf' | 'dense';
|
|
549
|
+
getMasonryItemSize?: (row: Row, context: {
|
|
550
|
+
defaultSize: WorkbenchMasonryItemSize;
|
|
551
|
+
columnCount: number;
|
|
552
|
+
columnWidth: number;
|
|
553
|
+
containerWidth: number;
|
|
554
|
+
gap: number;
|
|
555
|
+
placementStrategy: 'shelf' | 'dense';
|
|
556
|
+
rowHeight: number;
|
|
557
|
+
}) => WorkbenchMasonryItemSize | undefined;
|
|
558
|
+
}
|
|
559
|
+
declare function WorkbenchGalleryView<Row = any>({ rows, columns, onRowClick, selectedLinkKey, selectedRowKey, className, isMasonry, galleryLayoutMode, galleryRailCardWidth, galleryGridColumns, galleryGridCardWidth, galleryMasonryColumnWidth, masonryPlacementStrategy, galleryFieldKey, galleryDensity, galleryBentoColumns, galleryDetailVisibility, galleryDetailLimit, shouldEnhanceMultimodal, getFieldValue, isMediaColumn, isTitleCandidate, isSummaryCandidate, getDisplayText, renderFieldValue, getImagePreviewSrc, isImageField, isAudioField, AudioPlayerComponent, cardVariant, renderPreview, renderMeta, renderLeadingVisual, resolveRecordVisual, hiddenDetailFieldKeys, labels, formatLabel, getMasonryItemSize, }: WorkbenchGalleryViewProps<Row>): react_jsx_runtime.JSX.Element;
|
|
560
|
+
|
|
561
|
+
export { WorkbenchContentPane, type WorkbenchContentPaneBodyProps, type WorkbenchContentPaneClassNames, type WorkbenchContentPaneProps, WorkbenchContentToolbar, type WorkbenchContentToolbarClassNames, type WorkbenchContentToolbarProps, type WorkbenchContentToolbarViewModeOption, WorkbenchDetailSidebar, type WorkbenchDetailSidebarBodyProps, type WorkbenchDetailSidebarClassNames, type WorkbenchDetailSidebarField, type WorkbenchDetailSidebarProps, type WorkbenchDetailSidebarRenderContext, type WorkbenchDetailSidebarSection, WorkbenchGalleryCard, type WorkbenchGalleryCardMetaContext, type WorkbenchGalleryCardProps, type WorkbenchGalleryCardRenderContext, type WorkbenchGalleryColumn, type WorkbenchGalleryLabels, type WorkbenchGalleryRecordVisual, WorkbenchGallerySettingsButton, type WorkbenchGallerySettingsButtonClassNames, type WorkbenchGallerySettingsButtonProps, type WorkbenchGallerySettingsLabels, type WorkbenchGallerySettingsOption, WorkbenchGallerySettingsPanel, type WorkbenchGallerySettingsPanelClassNames, type WorkbenchGallerySettingsPanelProps, type WorkbenchGallerySettingsValue, WorkbenchGalleryView, type WorkbenchGalleryViewProps, type WorkbenchMasonryItemSize, WorkbenchMasonryLayout, type WorkbenchMasonryLayoutContext, type WorkbenchMasonryLayoutProps, WorkbenchResizableSidebar, type WorkbenchResizableSidebarClassNames, type WorkbenchResizableSidebarItem, type WorkbenchResizableSidebarProps, WorkbenchTableView, type WorkbenchTableViewClassNames, type WorkbenchTableViewColumn, type WorkbenchTableViewHeaderContext, type WorkbenchTableViewProps, type WorkbenchTableViewRenderContext };
|