@canvas-components/list-table 0.3.19 → 0.3.21
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 +81 -2
- package/dist/index.cjs +1757 -168
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +170 -36
- package/dist/index.d.ts +170 -36
- package/dist/index.js +1735 -169
- package/dist/index.js.map +1 -1
- package/package.json +5 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import * as antDesignIcons from '@ant-design/icons-svg';
|
|
2
|
+
import { CanvasChartPieOption, CanvasChartRadarOption, CanvasChartGaugeOption, CanvasChartSparklineOption } from '@canvas-components/chart';
|
|
1
3
|
import { CanvasScrollbarOptions, XlsxExportOptions } from '@canvas-components/utils';
|
|
2
4
|
export { CanvasScrollbarAxisOptions as ListTableScrollbarAxisOptions } from '@canvas-components/utils';
|
|
3
|
-
import { CanvasChartPieOption, CanvasChartRadarOption, CanvasChartGaugeOption, CanvasChartSparklineOption } from '@canvas-components/chart';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* 排序状态。
|
|
@@ -296,30 +297,46 @@ type ListTableCacheCategory = "sort" | "filter" | "summary" | "alignment" | "dat
|
|
|
296
297
|
/** 未指定的缓存类别默认开启,持久化需要 storageKey。 */
|
|
297
298
|
type ListTableCachePreferences = Partial<Record<ListTableCacheCategory, boolean>>;
|
|
298
299
|
|
|
299
|
-
/**
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
300
|
+
/** 上传单元格的值,始终使用文件数组;selected 表示仅本地选择,尚未上传。 */
|
|
301
|
+
interface ListTableUploadFile {
|
|
302
|
+
uid: string;
|
|
303
|
+
name: string;
|
|
304
|
+
type?: string;
|
|
305
|
+
size?: number;
|
|
306
|
+
url?: string;
|
|
307
|
+
thumbUrl?: string;
|
|
308
|
+
status?: "selected" | "uploading" | "done" | "error";
|
|
309
|
+
percent?: number;
|
|
310
|
+
error?: string;
|
|
311
|
+
response?: unknown;
|
|
312
|
+
originFileObj?: File;
|
|
313
|
+
}
|
|
314
|
+
/** 自定义上传请求,关闭编辑或移除文件时调用返回的 abort。 */
|
|
315
|
+
interface ListTableUploadRequest {
|
|
316
|
+
file: File;
|
|
317
|
+
onProgress: (percent: number) => void;
|
|
318
|
+
onSuccess: (response: unknown) => void;
|
|
319
|
+
onError: (error: Error) => void;
|
|
320
|
+
}
|
|
321
|
+
/** 原生上传编辑配置,不依赖框架;未设置 action/customRequest 时仅选择本地文件。 */
|
|
322
|
+
interface ListTableUploadConfig {
|
|
323
|
+
accept?: string;
|
|
324
|
+
multiple?: boolean;
|
|
325
|
+
maxCount?: number;
|
|
326
|
+
/** 文件大小上限,单位字节。 */
|
|
327
|
+
maxSize?: number;
|
|
328
|
+
action?: string;
|
|
312
329
|
name?: string;
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
/**
|
|
322
|
-
|
|
330
|
+
headers?: Record<string, string>;
|
|
331
|
+
data?: Record<string, string | Blob>;
|
|
332
|
+
withCredentials?: boolean;
|
|
333
|
+
/** 返回 false 保留文件但不上传;抛出错误则拒绝文件。 */
|
|
334
|
+
beforeUpload?: (file: File) => boolean | void | Promise<boolean | void>;
|
|
335
|
+
customRequest?: (request: ListTableUploadRequest) => void | {
|
|
336
|
+
abort: () => void;
|
|
337
|
+
};
|
|
338
|
+
/** 默认读取响应对象的 url 字段,可按实际服务端协议覆盖。 */
|
|
339
|
+
getResponseUrl?: (response: unknown, file: File) => string | undefined;
|
|
323
340
|
}
|
|
324
341
|
|
|
325
342
|
/** Canvas 区域支持的 CSS 属性。长度支持数字(px)或 px 字符串,padding 支持 1~2 值。 */
|
|
@@ -408,6 +425,54 @@ interface ListTableTheme {
|
|
|
408
425
|
headerFontWeight: string;
|
|
409
426
|
}
|
|
410
427
|
|
|
428
|
+
/** 当前列原始值的条件比较方式。 */
|
|
429
|
+
type ListTableConditionalOperator = "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "between" | "contains" | "empty" | "notEmpty";
|
|
430
|
+
/** 当前列的一项比较条件。 */
|
|
431
|
+
interface ListTableConditionalFormatCondition {
|
|
432
|
+
/** 与上一条件的关系;首项忽略。且优先于或,未指定时兼容规则的统一关系。 */
|
|
433
|
+
relation?: "and" | "or";
|
|
434
|
+
operator: ListTableConditionalOperator;
|
|
435
|
+
value?: string | number;
|
|
436
|
+
endValue?: string | number;
|
|
437
|
+
}
|
|
438
|
+
/** 条件格式规则,按数组顺序匹配,首条命中的背景生效。 */
|
|
439
|
+
interface ListTableConditionalFormatRule {
|
|
440
|
+
id: string;
|
|
441
|
+
name?: string;
|
|
442
|
+
/** 兼容旧版单条件配置;conditions 存在时优先采用条件列表。 */
|
|
443
|
+
operator?: ListTableConditionalOperator;
|
|
444
|
+
value?: string | number;
|
|
445
|
+
endValue?: string | number;
|
|
446
|
+
conditions?: ListTableConditionalFormatCondition[];
|
|
447
|
+
/** 兼容旧版统一关系;各条件的 relation 优先,默认且。 */
|
|
448
|
+
conditionRelation?: "and" | "or";
|
|
449
|
+
backgroundColor: string;
|
|
450
|
+
/** 命中规则时的单元格文本颜色。 */
|
|
451
|
+
textColor: string;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
/** 原有短名称,保留已经调整过的图形和评分外观。 */
|
|
455
|
+
declare const listTableBuiltinIconNames: readonly ["star", "sun", "moon", "check", "close", "circle", "check-circle", "close-circle", "clock-circle", "info-circle", "question-circle", "warning", "loading", "plus", "minus", "plus-circle", "minus-circle", "up", "down", "left", "right", "arrow-up", "arrow-down", "arrow-left", "arrow-right", "search", "edit", "delete", "copy", "save", "upload", "download", "reload", "ellipsis", "file", "file-text", "file-pdf", "folder", "folder-open", "picture", "user", "team", "calendar", "filter", "sort-ascending", "sort-descending", "link", "eye", "lock", "unlock", "home", "mail", "setting", "header-sort", "header-sort-ascending", "header-sort-descending", "header-filter", "header-fixed"];
|
|
456
|
+
/** 官方图标使用原始名称,例如 AccountBookOutlined、HeartFilled、SmileTwoTone。 */
|
|
457
|
+
type ListTableAntdIconName = keyof typeof antDesignIcons;
|
|
458
|
+
type ListTableBuiltinIconName = (typeof listTableBuiltinIconNames)[number];
|
|
459
|
+
/** 全量官方图标定义为纯数据,不包含 React 运行时。 */
|
|
460
|
+
declare const listTableAntdIconNames: ListTableAntdIconName[];
|
|
461
|
+
/** 支持的全部单元格图标名称。 */
|
|
462
|
+
type ListTableSymbolType = ListTableBuiltinIconName | ListTableAntdIconName;
|
|
463
|
+
declare const listTableIconNames: readonly ListTableSymbolType[];
|
|
464
|
+
/** 评分控件仅使用可部分填充的图形,不随普通图标扩展。 */
|
|
465
|
+
type ListTableRateSymbolType = "star" | "sun" | "moon";
|
|
466
|
+
|
|
467
|
+
/** TreeSelect 的原生树节点,value 在树内唯一。 */
|
|
468
|
+
interface ListTableTreeSelectNode {
|
|
469
|
+
title: string;
|
|
470
|
+
value: string | number;
|
|
471
|
+
key?: string | number;
|
|
472
|
+
disabled?: boolean;
|
|
473
|
+
selectable?: boolean;
|
|
474
|
+
children?: ListTableTreeSelectNode[];
|
|
475
|
+
}
|
|
411
476
|
/** 排序配置;compare 按升序返回负数、零、正数,降序由表格自动反转。 */
|
|
412
477
|
type ListTableSorter<RecordType> = boolean | {
|
|
413
478
|
/** 多列排序优先级,数值越大越优先。 */
|
|
@@ -502,9 +567,6 @@ type ListTableSparklineSize = "small" | "medium" | number | [number, number] | {
|
|
|
502
567
|
type ListTableChartType = "sparkline" | "pie" | "radar" | "gauge" | (string & {});
|
|
503
568
|
type ListTableChartSize = ListTableSparklineSize;
|
|
504
569
|
type ListTableRateSize = "small" | "medium" | "large" | number;
|
|
505
|
-
type ListTableRateSymbolType = "star" | "sun" | "moon";
|
|
506
|
-
/** 单元格内置图标名称。 */
|
|
507
|
-
type ListTableSymbolType = ListTableRateSymbolType | "check" | "close";
|
|
508
570
|
type ListTableButtonType = "primary" | "default" | "dashed" | "text" | "link";
|
|
509
571
|
type ListTableButtonSize = "small" | "middle" | "medium" | "large";
|
|
510
572
|
/**
|
|
@@ -658,6 +720,34 @@ interface ListTableProgressCellContent<RecordType = any> extends ListTableBaseCe
|
|
|
658
720
|
successColor?: string;
|
|
659
721
|
strokeWidth?: number;
|
|
660
722
|
}
|
|
723
|
+
/** 时间轴节点;title 为时间标签,content 为事件描述,不接受 ReactNode。 */
|
|
724
|
+
interface ListTableTimelineItem {
|
|
725
|
+
title?: string;
|
|
726
|
+
content: string;
|
|
727
|
+
/** 支持 blue、green、red、gray 以及自定义颜色。 */
|
|
728
|
+
color?: string;
|
|
729
|
+
position?: "start" | "end";
|
|
730
|
+
/** 进行中节点使用缺口圆环和虚线连接,不创建持续动画。 */
|
|
731
|
+
loading?: boolean;
|
|
732
|
+
/** 可复用全部内置图标;clock、cross 保留为时间轴快捷名称。 */
|
|
733
|
+
icon?: ListTableSymbolType | "clock" | "cross";
|
|
734
|
+
}
|
|
735
|
+
/** 原生纵向时间轴。配合 rowHeight: "auto" 展示完整内容。 */
|
|
736
|
+
interface ListTableTimelineCellContent<RecordType = any> extends ListTableBaseCellContent<RecordType> {
|
|
737
|
+
type: "timeline";
|
|
738
|
+
items: ListTableTimelineItem[];
|
|
739
|
+
mode?: "start" | "end" | "alternate";
|
|
740
|
+
reverse?: boolean;
|
|
741
|
+
variant?: "outlined" | "filled";
|
|
742
|
+
/** 默认宽度 220,窄列自动收缩并换行。 */
|
|
743
|
+
width?: number;
|
|
744
|
+
/** 节点之间的额外留白,默认 12px。 */
|
|
745
|
+
itemGap?: number;
|
|
746
|
+
/** 节点图标直径,默认 16px,最大不超过文字行高。 */
|
|
747
|
+
dotSize?: number;
|
|
748
|
+
lineColor?: string;
|
|
749
|
+
titleColor?: string;
|
|
750
|
+
}
|
|
661
751
|
/**
|
|
662
752
|
* 通用单元格图表片段基类。
|
|
663
753
|
*/
|
|
@@ -732,6 +822,8 @@ interface ListTableRateCellContent<RecordType = any> extends ListTableBaseCellCo
|
|
|
732
822
|
interface ListTableIconCellContent<RecordType = any> extends ListTableBaseCellContent<RecordType> {
|
|
733
823
|
type: "icon";
|
|
734
824
|
icon: ListTableSymbolType;
|
|
825
|
+
/** 官方 TwoTone 图标的主色,或 [主色, 副色];未指定时使用 color。 */
|
|
826
|
+
twoToneColor?: string | [string, string];
|
|
735
827
|
color?: string;
|
|
736
828
|
size?: number;
|
|
737
829
|
}
|
|
@@ -897,7 +989,7 @@ interface ListTableNestedTableCellContent<RecordType = any> extends ListTableBas
|
|
|
897
989
|
/**
|
|
898
990
|
* 单元格内容定义。
|
|
899
991
|
*/
|
|
900
|
-
type ListTableCellContent<RecordType = any> = ListTableArrowCellContent<RecordType> | ListTableIconCellContent<RecordType> | ListTableTextCellContent<RecordType> | ListTableMoneyCellContent<RecordType> | ListTableLinkCellContent<RecordType> | ListTableImageCellContent<RecordType> | ListTableProgressCellContent<RecordType> | ListTableChartCellContent<RecordType> | ListTableRateCellContent<RecordType> | ListTableButtonCellContent<RecordType> | ListTableQrCodeCellContent<RecordType> | ListTableBarcodeCellContent<RecordType> | ListTableColorCellContent<RecordType> | ListTableTagCellContent<RecordType> | ListTableSelectionCellContent<RecordType> | ListTableSwitchCellContent<RecordType> | ListTableNestedTableCellContent<RecordType>;
|
|
992
|
+
type ListTableCellContent<RecordType = any> = ListTableArrowCellContent<RecordType> | ListTableIconCellContent<RecordType> | ListTableTextCellContent<RecordType> | ListTableMoneyCellContent<RecordType> | ListTableLinkCellContent<RecordType> | ListTableImageCellContent<RecordType> | ListTableProgressCellContent<RecordType> | ListTableTimelineCellContent<RecordType> | ListTableChartCellContent<RecordType> | ListTableRateCellContent<RecordType> | ListTableButtonCellContent<RecordType> | ListTableQrCodeCellContent<RecordType> | ListTableBarcodeCellContent<RecordType> | ListTableColorCellContent<RecordType> | ListTableTagCellContent<RecordType> | ListTableSelectionCellContent<RecordType> | ListTableSwitchCellContent<RecordType> | ListTableNestedTableCellContent<RecordType>;
|
|
901
993
|
/**
|
|
902
994
|
* 单元格跨度配置。
|
|
903
995
|
*
|
|
@@ -919,7 +1011,7 @@ type ListTableCellRender<RecordType> = (value: unknown, record: RecordType, rowI
|
|
|
919
1011
|
*
|
|
920
1012
|
* 采用可扩展枚举,便于后续继续补充原生编辑器实现。
|
|
921
1013
|
*/
|
|
922
|
-
type ListTableEditValueType = "text" | "number" | "input-range" | "year" | "quarter" | "month" | "time" | "datetime" | "timerange" | "date" | "date-range" | "datetime-range" | "color" | "select" | "cascader" | "auto-complete";
|
|
1014
|
+
type ListTableEditValueType = "text" | "number" | "input-range" | "year" | "quarter" | "month" | "time" | "datetime" | "timerange" | "date" | "date-range" | "datetime-range" | "color" | "select" | "cascader" | "tree-select" | "upload" | "auto-complete";
|
|
923
1015
|
/**
|
|
924
1016
|
* 下拉编辑选项。
|
|
925
1017
|
*/
|
|
@@ -954,11 +1046,23 @@ interface ListTableFormItemPropsConfig<RecordType = Record<string, unknown>> {
|
|
|
954
1046
|
max?: number | string;
|
|
955
1047
|
step?: number | string;
|
|
956
1048
|
options?: ListTableEditOption[];
|
|
1049
|
+
/** TreeSelect 树节点,使用 title/value/children,value 在树内唯一。 */
|
|
1050
|
+
treeData?: ListTableTreeSelectNode[];
|
|
1051
|
+
/** 原生文件上传配置。 */
|
|
1052
|
+
upload?: ListTableUploadConfig;
|
|
1053
|
+
/** TreeSelect 初始展开全部节点。 */
|
|
1054
|
+
treeDefaultExpandAll?: boolean;
|
|
1055
|
+
/** TreeSelect 初始展开节点 key,未指定 key 时使用 value。 */
|
|
1056
|
+
treeDefaultExpandedKeys?: (string | number)[];
|
|
957
1057
|
/** Cascader 是否允许选择非末级,默认 false。 */
|
|
958
1058
|
changeOnSelect?: boolean;
|
|
1059
|
+
/** 开启多选:Cascader 使用二维路径数组,TreeSelect 使用节点值数组。 */
|
|
1060
|
+
multiple?: boolean;
|
|
1061
|
+
/** 多选回填策略:完整父级或末级路径,默认 SHOW_PARENT。 */
|
|
1062
|
+
showCheckedStrategy?: "SHOW_PARENT" | "SHOW_CHILD";
|
|
959
1063
|
/** Cascader 展开下级的方式,默认 click。 */
|
|
960
1064
|
expandTrigger?: "click" | "hover";
|
|
961
|
-
/** Cascader 是否允许清空,默认 true。 */
|
|
1065
|
+
/** Cascader / TreeSelect 是否允许清空,默认 true。 */
|
|
962
1066
|
allowClear?: boolean;
|
|
963
1067
|
/** Cascader 路径显示文本,默认使用 / 分隔。 */
|
|
964
1068
|
displayRender?: (labels: string[], selectedOptions: ListTableEditOption[]) => string;
|
|
@@ -1042,7 +1146,7 @@ interface ListTableColumn<RecordType = Record<string, unknown>> {
|
|
|
1042
1146
|
* 用法参考 AntD Table 的 `onCell`。
|
|
1043
1147
|
*/
|
|
1044
1148
|
onCell?: (value: unknown, record: RecordType, rowIndex: number, column: ListTableColumn<RecordType>) => ListTableCellSpan | null | undefined;
|
|
1045
|
-
cellType?: "text" | "money" | "link" | "image" | "qrcode" | "barcode" | "color" | "progress" | "chart" | "rate" | "checkbox" | "radio" | "switch" | "tag" | "button" | "custom";
|
|
1149
|
+
cellType?: "text" | "money" | "link" | "image" | "qrcode" | "barcode" | "color" | "progress" | "timeline" | "chart" | "rate" | "checkbox" | "radio" | "switch" | "tag" | "button" | "custom";
|
|
1046
1150
|
cellStyle?: ListTableCellStyle;
|
|
1047
1151
|
/** 金额单元格格式配置,仅在 `cellType: "money"` 时生效。 */
|
|
1048
1152
|
moneyFormat?: ListTableMoneyFormatOptions;
|
|
@@ -1141,7 +1245,7 @@ interface ListTableTooltipRequest {
|
|
|
1141
1245
|
x: number;
|
|
1142
1246
|
y: number;
|
|
1143
1247
|
content: string;
|
|
1144
|
-
variant?: "default" | "error";
|
|
1248
|
+
variant?: "default" | "error" | "resize";
|
|
1145
1249
|
/**
|
|
1146
1250
|
* 表格内容缩放(1 = 100%),用于 tooltip 与画布视觉同步。
|
|
1147
1251
|
*/
|
|
@@ -1175,6 +1279,12 @@ interface ListTableDangerConfirmRequest {
|
|
|
1175
1279
|
onConfirm: () => void;
|
|
1176
1280
|
onCancel: () => void;
|
|
1177
1281
|
}
|
|
1282
|
+
/** 导出前确认文件名称。 */
|
|
1283
|
+
interface ListTableExportNameRequest {
|
|
1284
|
+
fileName: string;
|
|
1285
|
+
onConfirm: (fileName: string) => void;
|
|
1286
|
+
onCancel: () => void;
|
|
1287
|
+
}
|
|
1178
1288
|
interface HeaderContextMenuColumnItem {
|
|
1179
1289
|
key: string;
|
|
1180
1290
|
title: string;
|
|
@@ -1317,7 +1427,7 @@ interface PaginationConfig {
|
|
|
1317
1427
|
onChange?: (page: number, pageSize: number) => void;
|
|
1318
1428
|
onPageSizeChange?: (page: number, pageSize: number) => void;
|
|
1319
1429
|
}
|
|
1320
|
-
type ListTableEditorValueType = "text" | "number" | "input-range" | "year" | "quarter" | "month" | "time" | "datetime" | "timerange" | "date" | "date-range" | "datetime-range" | "color" | "select" | "cascader" | "auto-complete";
|
|
1430
|
+
type ListTableEditorValueType = "text" | "number" | "input-range" | "year" | "quarter" | "month" | "time" | "datetime" | "timerange" | "date" | "date-range" | "datetime-range" | "color" | "select" | "cascader" | "tree-select" | "upload" | "auto-complete";
|
|
1321
1431
|
interface ListTableEditorOption {
|
|
1322
1432
|
label: string;
|
|
1323
1433
|
value: string | number;
|
|
@@ -1332,6 +1442,7 @@ type ListTableEditorFilterOption = (input: string, option: ListTableEditorOption
|
|
|
1332
1442
|
*/
|
|
1333
1443
|
type ListTableEditorAutoCompleteEnter = (input: string) => ListTableEditorOption[] | void | Promise<ListTableEditorOption[] | void>;
|
|
1334
1444
|
interface ListTableEditorConfig {
|
|
1445
|
+
upload?: ListTableUploadConfig;
|
|
1335
1446
|
valueType?: ListTableEditorValueType;
|
|
1336
1447
|
format?: ListTableFormItemFormatter<any>;
|
|
1337
1448
|
placeholder?: string;
|
|
@@ -1339,11 +1450,21 @@ interface ListTableEditorConfig {
|
|
|
1339
1450
|
max?: number | string;
|
|
1340
1451
|
step?: number | string;
|
|
1341
1452
|
options?: ListTableEditorOption[];
|
|
1453
|
+
/** TreeSelect 树节点。 */
|
|
1454
|
+
treeData?: ListTableTreeSelectNode[];
|
|
1455
|
+
/** 初始展开全部树节点。 */
|
|
1456
|
+
treeDefaultExpandAll?: boolean;
|
|
1457
|
+
/** 初始展开节点 key。 */
|
|
1458
|
+
treeDefaultExpandedKeys?: (string | number)[];
|
|
1342
1459
|
/** Cascader 是否允许选择非末级。 */
|
|
1343
1460
|
changeOnSelect?: boolean;
|
|
1461
|
+
/** 开启多选:Cascader 使用二维路径数组,TreeSelect 使用节点值数组。 */
|
|
1462
|
+
multiple?: boolean;
|
|
1463
|
+
/** 多选回填策略,默认 SHOW_PARENT。 */
|
|
1464
|
+
showCheckedStrategy?: "SHOW_PARENT" | "SHOW_CHILD";
|
|
1344
1465
|
/** Cascader 展开下级的方式。 */
|
|
1345
1466
|
expandTrigger?: "click" | "hover";
|
|
1346
|
-
/** Cascader 是否允许清空。 */
|
|
1467
|
+
/** Cascader / TreeSelect 是否允许清空。 */
|
|
1347
1468
|
allowClear?: boolean;
|
|
1348
1469
|
/** Cascader 路径显示文本。 */
|
|
1349
1470
|
displayRender?: (labels: string[], selectedOptions: ListTableEditorOption[]) => string;
|
|
@@ -1427,6 +1548,8 @@ interface ListTablePaginationAdapter {
|
|
|
1427
1548
|
destroy(): void;
|
|
1428
1549
|
}
|
|
1429
1550
|
interface CreateCellEditorSessionParams {
|
|
1551
|
+
/** 聚焦时是否全选内容;空单元格由首次键入打开时为 false。 */
|
|
1552
|
+
selectOnFocus?: boolean;
|
|
1430
1553
|
rect: ListTableEditorRect;
|
|
1431
1554
|
clipRect?: ListTableEditorRect;
|
|
1432
1555
|
hostRect?: ListTableEditorRect;
|
|
@@ -1440,6 +1563,8 @@ interface CreateCellEditorSessionParams {
|
|
|
1440
1563
|
}
|
|
1441
1564
|
type ListTableEditorNavigateDirection = "up" | "down" | "prev" | "next";
|
|
1442
1565
|
interface ListTableEditorRequest {
|
|
1566
|
+
/** 聚焦时是否全选内容;false 时光标置于输入内容末尾。 */
|
|
1567
|
+
selectOnFocus?: boolean;
|
|
1443
1568
|
/** 当前编辑单元格标识,用于切换单元格时重置编辑器状态。 */
|
|
1444
1569
|
editorKey?: string;
|
|
1445
1570
|
rect: ListTableEditorRect;
|
|
@@ -1903,6 +2028,8 @@ interface ListTableExpandableOptions<RecordType = Record<string, unknown>> {
|
|
|
1903
2028
|
* UI 适配层配置。
|
|
1904
2029
|
*/
|
|
1905
2030
|
interface ListTableUiOptions {
|
|
2031
|
+
/** 导出文件名输入弹窗;未提供时使用浏览器输入框。 */
|
|
2032
|
+
onExportNameRequest?: (request: ListTableExportNameRequest | null) => void;
|
|
1906
2033
|
editorFactory?: ListTableEditorFactory;
|
|
1907
2034
|
paginationAdapter?: ListTablePaginationAdapter;
|
|
1908
2035
|
onEditorRequest?: (request: ListTableEditorRequest | null) => void;
|
|
@@ -1944,6 +2071,11 @@ interface ListTableImagePreviewRequest {
|
|
|
1944
2071
|
* 表格配置。
|
|
1945
2072
|
*/
|
|
1946
2073
|
interface ListTableOptions<RecordType = Record<string, unknown>> {
|
|
2074
|
+
/** 工具栏、实例与右键导出的默认文件名及弹窗开关。 */
|
|
2075
|
+
exportOptions?: {
|
|
2076
|
+
fileName?: string;
|
|
2077
|
+
promptFileName?: boolean;
|
|
2078
|
+
};
|
|
1947
2079
|
type?: "list";
|
|
1948
2080
|
rowKey?: TableColumnDataIndex | ((record: RecordType, index: number) => string | number);
|
|
1949
2081
|
/**
|
|
@@ -2081,9 +2213,11 @@ type ListTableDensity = 26 | 32 | 48 | 56 | "auto";
|
|
|
2081
2213
|
* XLSX 导出参数。
|
|
2082
2214
|
*/
|
|
2083
2215
|
interface ListTableExportXlsxOptions extends XlsxExportOptions {
|
|
2216
|
+
/** 导出前输入文件名称,默认 true。 */
|
|
2217
|
+
promptFileName?: boolean;
|
|
2084
2218
|
/** 导出文件名,可省略 `.xlsx` 扩展名。 */
|
|
2085
2219
|
fileName?: string;
|
|
2086
|
-
/**
|
|
2220
|
+
/** 是否在数据末尾追加按当前列配置计算的汇总行,默认跟随表格汇总行的显示状态。 */
|
|
2087
2221
|
includeSummary?: boolean;
|
|
2088
2222
|
/** 导出失败通知;已保存的分文件不会撤回,取消不触发此回调。 */
|
|
2089
2223
|
onError?: (error: unknown) => void;
|
|
@@ -2245,4 +2379,4 @@ interface ListTableValidationTarget {
|
|
|
2245
2379
|
columnKey: string;
|
|
2246
2380
|
}
|
|
2247
2381
|
|
|
2248
|
-
export { type CreateCellEditorSessionParams, type DebugHitTestResult, EXPAND_COLUMN, type FilterPanelConfig, type FilterPanelOptionItem, type FilterPanelTexts, type FixedPopupConfig, type HeaderContextMenuColumnItem, type HeaderContextMenuConfig, type HeaderContextMenuDensity, ListTable, type ListTableAutoMergeRule, type ListTableBarcodeCellContent, type ListTableBarcodeFormat, type ListTableButtonCellContent, type ListTableButtonPopconfirmOptions, type ListTableButtonSize, type ListTableButtonType, type ListTableCSSProperties, type ListTableCacheCategory, type ListTableCachePreferences, type ListTableCarouselScrollOptions, type ListTableCellContent, type ListTableCellContentClickContext, type ListTableCellEditorSession, type ListTableCellSpan, type ListTableCellStyle, type ListTableChartCellContent, type ListTableChartSize, type ListTableChartType, type ListTableColorCellContent, type ListTableColumn, type ListTableConditionalFormatCondition, type ListTableConditionalFormatRule, type ListTableConditionalOperator, type ListTableContextMenuFeature, type ListTableContextMenuOptions, type ListTableCustomChartCellContent, type ListTableDangerConfirmRequest, type ListTableDataFormat, type ListTableDataFormatOptions, type ListTableDataFormatType, type ListTableDebugOptions, type ListTableDebugSnapshot, type ListTableDensity, type ListTableEditAutoCompleteEnter, type ListTableEditFilterOption, type ListTableEditOption, type ListTableEditValueType, type ListTableEditable, type ListTableEditorAutoCompleteEnter, type ListTableEditorConfig, type ListTableEditorFactory, type ListTableEditorFilterOption, type ListTableEditorNavigateDirection, type ListTableEditorOption, type ListTableEditorRect, type ListTableEditorRequest, type ListTableEditorTheme, type ListTableEditorValueType, type ListTableExperimentalOptions, type ListTableExportXlsxOptions, type ListTableFilterCondition$1 as ListTableFilterCondition, type ListTableFilterConditionOperator, type ListTableFilterConditionRelation, type ListTableFilterMatchMode, type ListTableFilterOption, type ListTableFilterOptionValue, type ListTableFilterPanelAdapter, type ListTableFilterState, type ListTableFilterType, type ListTableFilterValue$1 as ListTableFilterValue, type ListTableFixedPopupAdapter, type ListTableFormItemProps, type ListTableFormItemPropsConfig, type ListTableFormRule, type ListTableFormRules, type ListTableGaugeChartCellContent, type ListTableGroupingOptions, type ListTableHeaderContextMenuAdapter, type ListTableHighlightMode, type ListTableHorizontalAlign, type ListTableIconCellContent, type ListTableImageCellContent, type ListTableImageObjectFit, type ListTableImagePreviewRequest, type ListTableLoadingAdapter, type ListTableLoadingRequest, type ListTableMergeCellOptions, type ListTableNestedTableCellContent, type ListTableNestedTableColumn, type ListTableOffscreenCanvasStatusInfo, type ListTableOptions, type ListTablePaginationAdapter, type ListTablePaginationCSSProperties, type ListTablePaginationOptions, type ListTablePaginationStyleSlot, type ListTablePaginationStyles, type ListTablePerformanceMetric, type ListTablePieChartCellContent, type ListTableProgressCellContent, type ListTableProgressShape, type ListTableProgressSize, type ListTableQrCodeCellContent, type ListTableQrCodeLevel, type ListTableQueryChange, type ListTableQueryChangeExtra, type ListTableQueryFilters, type ListTableQueryOptions, type ListTableQueryPagination, type ListTableQuerySorter, type ListTableRadarChartCellContent, type ListTableRateCellContent, type ListTableRateSize, type ListTableRateSymbolType, type ListTableRowDragMode, type ListTableRowDragOptions, type ListTableRowDragPayload, type ListTableRowDragSourceInfo, type ListTableRowDragZone, type ListTableRowEventProps, type ListTableRowSelectionChangeInfo, type ListTableRowSelectionOptions, type ListTableRowSelectorOptions, type ListTableScrollToOptions, type ListTableScrollbarCSSProperties, type ListTableScrollbarOptions, type ListTableSearchRequest, type ListTableSelectionState, type ListTableServerSummaryValues, type ListTableSortItem, type ListTableSortState, type ListTableSorter, type ListTableSparklineChartCellContent, type ListTableSparklineSize, type ListTableStyles, type ListTableSummaryConfig, type ListTableSummaryRoundingMode, type ListTableSummaryType, type ListTableSymbolType, type ListTableTagCellContent, type ListTableTheme, type ListTableTooltipAdapter, type ListTableTooltipRequest, type ListTableUiOptions, type ListTableValidationError, type ListTableValidationErrorField, type ListTableValidationFailure, type ListTableValidationTarget, type PaginationConfig, ROW_SELECTION_COLUMN, type RenderCellDescriptor, SELECTION_COLUMN, getListTableStoredPageSize, resetListTableStoredColumnConfig };
|
|
2382
|
+
export { type CreateCellEditorSessionParams, type DebugHitTestResult, EXPAND_COLUMN, type FilterPanelConfig, type FilterPanelOptionItem, type FilterPanelTexts, type FixedPopupConfig, type HeaderContextMenuColumnItem, type HeaderContextMenuConfig, type HeaderContextMenuDensity, ListTable, type ListTableAntdIconName, type ListTableAutoMergeRule, type ListTableBarcodeCellContent, type ListTableBarcodeFormat, type ListTableBuiltinIconName, type ListTableButtonCellContent, type ListTableButtonPopconfirmOptions, type ListTableButtonSize, type ListTableButtonType, type ListTableCSSProperties, type ListTableCacheCategory, type ListTableCachePreferences, type ListTableCarouselScrollOptions, type ListTableCellContent, type ListTableCellContentClickContext, type ListTableCellEditorSession, type ListTableCellSpan, type ListTableCellStyle, type ListTableChartCellContent, type ListTableChartSize, type ListTableChartType, type ListTableColorCellContent, type ListTableColumn, type ListTableConditionalFormatCondition, type ListTableConditionalFormatRule, type ListTableConditionalOperator, type ListTableContextMenuFeature, type ListTableContextMenuOptions, type ListTableCustomChartCellContent, type ListTableDangerConfirmRequest, type ListTableDataFormat, type ListTableDataFormatOptions, type ListTableDataFormatType, type ListTableDebugOptions, type ListTableDebugSnapshot, type ListTableDensity, type ListTableEditAutoCompleteEnter, type ListTableEditFilterOption, type ListTableEditOption, type ListTableEditValueType, type ListTableEditable, type ListTableEditorAutoCompleteEnter, type ListTableEditorConfig, type ListTableEditorFactory, type ListTableEditorFilterOption, type ListTableEditorNavigateDirection, type ListTableEditorOption, type ListTableEditorRect, type ListTableEditorRequest, type ListTableEditorTheme, type ListTableEditorValueType, type ListTableExperimentalOptions, type ListTableExportNameRequest, type ListTableExportXlsxOptions, type ListTableFilterCondition$1 as ListTableFilterCondition, type ListTableFilterConditionOperator, type ListTableFilterConditionRelation, type ListTableFilterMatchMode, type ListTableFilterOption, type ListTableFilterOptionValue, type ListTableFilterPanelAdapter, type ListTableFilterState, type ListTableFilterType, type ListTableFilterValue$1 as ListTableFilterValue, type ListTableFixedPopupAdapter, type ListTableFormItemProps, type ListTableFormItemPropsConfig, type ListTableFormRule, type ListTableFormRules, type ListTableGaugeChartCellContent, type ListTableGroupingOptions, type ListTableHeaderContextMenuAdapter, type ListTableHighlightMode, type ListTableHorizontalAlign, type ListTableIconCellContent, type ListTableImageCellContent, type ListTableImageObjectFit, type ListTableImagePreviewRequest, type ListTableLoadingAdapter, type ListTableLoadingRequest, type ListTableMergeCellOptions, type ListTableNestedTableCellContent, type ListTableNestedTableColumn, type ListTableOffscreenCanvasStatusInfo, type ListTableOptions, type ListTablePaginationAdapter, type ListTablePaginationCSSProperties, type ListTablePaginationOptions, type ListTablePaginationStyleSlot, type ListTablePaginationStyles, type ListTablePerformanceMetric, type ListTablePieChartCellContent, type ListTableProgressCellContent, type ListTableProgressShape, type ListTableProgressSize, type ListTableQrCodeCellContent, type ListTableQrCodeLevel, type ListTableQueryChange, type ListTableQueryChangeExtra, type ListTableQueryFilters, type ListTableQueryOptions, type ListTableQueryPagination, type ListTableQuerySorter, type ListTableRadarChartCellContent, type ListTableRateCellContent, type ListTableRateSize, type ListTableRateSymbolType, type ListTableRowDragMode, type ListTableRowDragOptions, type ListTableRowDragPayload, type ListTableRowDragSourceInfo, type ListTableRowDragZone, type ListTableRowEventProps, type ListTableRowSelectionChangeInfo, type ListTableRowSelectionOptions, type ListTableRowSelectorOptions, type ListTableScrollToOptions, type ListTableScrollbarCSSProperties, type ListTableScrollbarOptions, type ListTableSearchRequest, type ListTableSelectionState, type ListTableServerSummaryValues, type ListTableSortItem, type ListTableSortState, type ListTableSorter, type ListTableSparklineChartCellContent, type ListTableSparklineSize, type ListTableStyles, type ListTableSummaryConfig, type ListTableSummaryRoundingMode, type ListTableSummaryType, type ListTableSymbolType, type ListTableTagCellContent, type ListTableTheme, type ListTableTimelineCellContent, type ListTableTimelineItem, type ListTableTooltipAdapter, type ListTableTooltipRequest, type ListTableTreeSelectNode, type ListTableUiOptions, type ListTableUploadConfig, type ListTableUploadFile, type ListTableUploadRequest, type ListTableValidationError, type ListTableValidationErrorField, type ListTableValidationFailure, type ListTableValidationTarget, type PaginationConfig, ROW_SELECTION_COLUMN, type RenderCellDescriptor, SELECTION_COLUMN, getListTableStoredPageSize, listTableAntdIconNames, listTableBuiltinIconNames, listTableIconNames, resetListTableStoredColumnConfig };
|