@wordrhyme/auto-crud 1.0.0 → 1.0.2
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 +76 -7
- package/dist/index.cjs +841 -213
- package/dist/index.d.cts +188 -36
- package/dist/index.d.ts +188 -36
- package/dist/index.js +833 -213
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import * as _tanstack_react_table0 from "@tanstack/react-table";
|
|
4
4
|
import { Column, ColumnDef, ColumnSort, Row, RowData, Table, TableOptions, TableState } from "@tanstack/react-table";
|
|
@@ -314,7 +314,7 @@ declare function AutoTableActionBar<TData>({
|
|
|
314
314
|
enableExport,
|
|
315
315
|
enableDelete,
|
|
316
316
|
extraActions
|
|
317
|
-
}: AutoTableActionBarProps<TData>):
|
|
317
|
+
}: AutoTableActionBarProps<TData>): react_jsx_runtime0.JSX.Element;
|
|
318
318
|
//#endregion
|
|
319
319
|
//#region src/lib/schema-bridge/types.d.ts
|
|
320
320
|
/**
|
|
@@ -394,16 +394,23 @@ declare function createSelectColumn<T>(): ColumnDef<T>;
|
|
|
394
394
|
/**
|
|
395
395
|
* 操作列配置
|
|
396
396
|
*/
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
397
|
+
/**
|
|
398
|
+
* 已解析的操作项(渲染层使用)
|
|
399
|
+
*/
|
|
400
|
+
interface ResolvedActionItem<T> {
|
|
401
|
+
label: string;
|
|
402
|
+
onClick: (row: T) => void;
|
|
403
|
+
separator?: boolean;
|
|
404
|
+
variant?: "default" | "destructive";
|
|
402
405
|
}
|
|
406
|
+
/**
|
|
407
|
+
* 操作列配置(ResolvedActionItem 数组)
|
|
408
|
+
*/
|
|
409
|
+
type ActionsColumnConfig<T> = ResolvedActionItem<T>[];
|
|
403
410
|
/**
|
|
404
411
|
* 创建操作列
|
|
405
412
|
*/
|
|
406
|
-
declare function createActionsColumn<T>(
|
|
413
|
+
declare function createActionsColumn<T>(items: ActionsColumnConfig<T>): ColumnDef<T>;
|
|
407
414
|
//#endregion
|
|
408
415
|
//#region src/components/auto-crud/auto-table.d.ts
|
|
409
416
|
/** 过滤模式类型 */
|
|
@@ -463,7 +470,97 @@ declare function AutoTable<T extends z.ZodObject<z.ZodRawShape>>({
|
|
|
463
470
|
enableExport,
|
|
464
471
|
onSelectedCountChange,
|
|
465
472
|
getSelectedRows
|
|
466
|
-
}: AutoTableProps<T>):
|
|
473
|
+
}: AutoTableProps<T>): react_jsx_runtime0.JSX.Element;
|
|
474
|
+
//#endregion
|
|
475
|
+
//#region src/i18n/locale.d.ts
|
|
476
|
+
/**
|
|
477
|
+
* AutoCrud 国际化接口及内置语言包
|
|
478
|
+
*
|
|
479
|
+
* 使用方式:
|
|
480
|
+
* // 内置语言
|
|
481
|
+
* <AutoCrudTable locale="en-US" ... />
|
|
482
|
+
*
|
|
483
|
+
* // 部分覆盖(以 zh-CN 为基础深合并)
|
|
484
|
+
* <AutoCrudTable locale={{ toolbar: { create: "Add" } }} ... />
|
|
485
|
+
*/
|
|
486
|
+
interface AutoCrudLocale {
|
|
487
|
+
toolbar: {
|
|
488
|
+
create: string;
|
|
489
|
+
import: string;
|
|
490
|
+
export: string;
|
|
491
|
+
exportSelected: (count: number) => string;
|
|
492
|
+
};
|
|
493
|
+
rowActions: {
|
|
494
|
+
view: string;
|
|
495
|
+
edit: string;
|
|
496
|
+
copy: string;
|
|
497
|
+
delete: string;
|
|
498
|
+
};
|
|
499
|
+
viewModal: {
|
|
500
|
+
title: string;
|
|
501
|
+
};
|
|
502
|
+
boolean: {
|
|
503
|
+
true: string;
|
|
504
|
+
false: string;
|
|
505
|
+
};
|
|
506
|
+
formModal: {
|
|
507
|
+
createTitle: string;
|
|
508
|
+
editTitle: string;
|
|
509
|
+
cancel: string;
|
|
510
|
+
create: string;
|
|
511
|
+
save: string;
|
|
512
|
+
submitting: string;
|
|
513
|
+
};
|
|
514
|
+
deleteModal: {
|
|
515
|
+
title: string;
|
|
516
|
+
description: string;
|
|
517
|
+
cancel: string;
|
|
518
|
+
confirm: string;
|
|
519
|
+
confirming: string;
|
|
520
|
+
};
|
|
521
|
+
importDialog: {
|
|
522
|
+
title: string;
|
|
523
|
+
uploadDescription: string;
|
|
524
|
+
previewDescription: (count: number) => string;
|
|
525
|
+
importingDescription: string;
|
|
526
|
+
doneDescription: string;
|
|
527
|
+
dragHint: string;
|
|
528
|
+
formatHint: string;
|
|
529
|
+
downloadTemplate: string;
|
|
530
|
+
moreColumns: (count: number) => string;
|
|
531
|
+
previewSummary: (rows: number, fields: number, format: string, previewLimit?: number) => string;
|
|
532
|
+
reselect: string;
|
|
533
|
+
confirmImport: string;
|
|
534
|
+
importingRows: (count: number) => string;
|
|
535
|
+
resultCreated: string;
|
|
536
|
+
resultUpdated: string;
|
|
537
|
+
resultSkipped: string;
|
|
538
|
+
resultFailed: string;
|
|
539
|
+
failedRowHeader: string;
|
|
540
|
+
failedErrorHeader: string;
|
|
541
|
+
close: string;
|
|
542
|
+
continueImport: string;
|
|
543
|
+
errorNoData: string;
|
|
544
|
+
errorParseFailed: string;
|
|
545
|
+
errorImportFailed: string;
|
|
546
|
+
};
|
|
547
|
+
}
|
|
548
|
+
declare const zhCN: AutoCrudLocale;
|
|
549
|
+
declare const enUS: AutoCrudLocale;
|
|
550
|
+
declare const jaJP: AutoCrudLocale;
|
|
551
|
+
declare const koKR: AutoCrudLocale;
|
|
552
|
+
declare const frFR: AutoCrudLocale;
|
|
553
|
+
declare const deDE: AutoCrudLocale;
|
|
554
|
+
declare const esES: AutoCrudLocale;
|
|
555
|
+
type DeepPartial<T> = { [P in keyof T]?: T[P] extends ((...args: unknown[]) => unknown) ? T[P] : T[P] extends object ? DeepPartial<T[P]> : T[P] };
|
|
556
|
+
/** locale prop 类型:内置语言 key 或部分覆盖对象 */
|
|
557
|
+
type LocaleProp = string | DeepPartial<AutoCrudLocale>;
|
|
558
|
+
/**
|
|
559
|
+
* 解析 locale prop 为完整的 AutoCrudLocale
|
|
560
|
+
* - string → 内置语言(fallback: zh-CN)
|
|
561
|
+
* - object → 以 zh-CN 为基础深合并
|
|
562
|
+
*/
|
|
563
|
+
declare function resolveLocale(localeProp?: LocaleProp): AutoCrudLocale;
|
|
467
564
|
//#endregion
|
|
468
565
|
//#region src/components/auto-crud/auto-crud-table.d.ts
|
|
469
566
|
/**
|
|
@@ -490,6 +587,8 @@ interface FilterConfig {
|
|
|
490
587
|
placeholder?: string;
|
|
491
588
|
/** 是否在筛选栏中隐藏(隐藏筛选但不影响表格列显示) */
|
|
492
589
|
hidden?: boolean;
|
|
590
|
+
/** 控制在哪些筛选模式下显示(未设置则在所有模式显示) */
|
|
591
|
+
modes?: Array<"simple" | "advanced" | "command">;
|
|
493
592
|
}
|
|
494
593
|
/**
|
|
495
594
|
* 统一字段配置
|
|
@@ -502,10 +601,16 @@ interface Field {
|
|
|
502
601
|
hidden?: boolean;
|
|
503
602
|
/**
|
|
504
603
|
* 筛选器独立配置
|
|
604
|
+
* - FilterConfig: 详细配置
|
|
605
|
+
* - false: 禁用筛选(简写,等价于 { enabled: false })
|
|
505
606
|
* 独立于 table.meta 控制筛选器行为,不影响表格列显示/隐藏
|
|
506
607
|
*/
|
|
507
|
-
filter?: FilterConfig;
|
|
508
|
-
/**
|
|
608
|
+
filter?: FilterConfig | false;
|
|
609
|
+
/**
|
|
610
|
+
* 表格特定配置
|
|
611
|
+
* - object: 详细配置
|
|
612
|
+
* - false: 隐藏表格列(简写,等价于 { hidden: true })
|
|
613
|
+
*/
|
|
509
614
|
table?: {
|
|
510
615
|
/** 是否在表格中隐藏 */
|
|
511
616
|
hidden?: boolean;
|
|
@@ -513,8 +618,12 @@ interface Field {
|
|
|
513
618
|
meta?: Record<string, unknown>;
|
|
514
619
|
/** 其他列配置 */
|
|
515
620
|
[key: string]: unknown;
|
|
516
|
-
};
|
|
517
|
-
/**
|
|
621
|
+
} | false;
|
|
622
|
+
/**
|
|
623
|
+
* 表单特定配置
|
|
624
|
+
* - object: 详细配置(Formily Schema)
|
|
625
|
+
* - false: 隐藏表单字段(简写,等价于 { "x-hidden": true })
|
|
626
|
+
*/
|
|
518
627
|
form?: {
|
|
519
628
|
/** 是否在表单中隐藏 */
|
|
520
629
|
"x-hidden"?: boolean;
|
|
@@ -524,9 +633,34 @@ interface Field {
|
|
|
524
633
|
"x-component-props"?: Record<string, unknown>;
|
|
525
634
|
/** 其他表单配置 */
|
|
526
635
|
[key: string]: unknown;
|
|
527
|
-
};
|
|
636
|
+
} | false;
|
|
528
637
|
}
|
|
529
638
|
type Fields = Record<string, Field>;
|
|
639
|
+
type BuiltinType = "view" | "edit" | "copy" | "delete";
|
|
640
|
+
/** 内置操作项(覆盖默认行为或调整位置) */
|
|
641
|
+
type BuiltinActionItem<T> = {
|
|
642
|
+
type: BuiltinType;
|
|
643
|
+
onClick?: (row: T) => void;
|
|
644
|
+
label?: string;
|
|
645
|
+
separator?: boolean;
|
|
646
|
+
};
|
|
647
|
+
/** 自定义操作项 */
|
|
648
|
+
type CustomActionItem<T> = {
|
|
649
|
+
type: "custom";
|
|
650
|
+
label: string;
|
|
651
|
+
onClick: (row: T) => void;
|
|
652
|
+
/** 仅在无内置项时生效:插入到首部还是尾部(默认 end) */
|
|
653
|
+
position?: "start" | "end";
|
|
654
|
+
separator?: boolean;
|
|
655
|
+
variant?: "default" | "destructive";
|
|
656
|
+
};
|
|
657
|
+
/**
|
|
658
|
+
* 行操作项
|
|
659
|
+
*
|
|
660
|
+
* - **只传 custom**:内置保持默认,custom 追加到首/尾
|
|
661
|
+
* - **包含任意内置 type**:数组完全接管,未列出的隐藏,顺序即渲染顺序
|
|
662
|
+
*/
|
|
663
|
+
type ActionItem<T> = BuiltinActionItem<T> | CustomActionItem<T>;
|
|
530
664
|
/**
|
|
531
665
|
* AutoCrudTable Props 接口
|
|
532
666
|
*/
|
|
@@ -578,12 +712,9 @@ interface AutoCrudTableProps<TSchema extends z.ZodObject<z.ZodRawShape>> {
|
|
|
578
712
|
toolbarStart?: React$1.ReactNode;
|
|
579
713
|
/** 工具栏右侧插槽 */
|
|
580
714
|
toolbarEnd?: React$1.ReactNode;
|
|
581
|
-
/** 自定义行操作 */
|
|
582
|
-
rowActions?: (row: z.output<TSchema>) => Array<{
|
|
583
|
-
label: string;
|
|
584
|
-
onClick: () => void;
|
|
585
|
-
}>;
|
|
586
715
|
};
|
|
716
|
+
/** 行操作配置,见 {@link ActionItem} */
|
|
717
|
+
actions?: ActionItem<z.output<TSchema>>[];
|
|
587
718
|
/**
|
|
588
719
|
* 权限配置
|
|
589
720
|
* 控制按钮显示和字段访问
|
|
@@ -605,6 +736,18 @@ interface AutoCrudTableProps<TSchema extends z.ZodObject<z.ZodRawShape>> {
|
|
|
605
736
|
* ```
|
|
606
737
|
*/
|
|
607
738
|
permissions?: CrudPermissions;
|
|
739
|
+
/**
|
|
740
|
+
* 语言配置
|
|
741
|
+
* - 内置语言 key:`"zh-CN"`(默认)、`"en-US"`
|
|
742
|
+
* - 部分覆盖对象:以 zh-CN 为基础深合并
|
|
743
|
+
*
|
|
744
|
+
* @example
|
|
745
|
+
* ```tsx
|
|
746
|
+
* <AutoCrudTable locale="en-US" ... />
|
|
747
|
+
* <AutoCrudTable locale={{ toolbar: { create: "Add New" } }} ... />
|
|
748
|
+
* ```
|
|
749
|
+
*/
|
|
750
|
+
locale?: LocaleProp;
|
|
608
751
|
}
|
|
609
752
|
/**
|
|
610
753
|
* AutoCrudTable 组件
|
|
@@ -620,8 +763,10 @@ declare function AutoCrudTable<TSchema extends z.ZodObject<z.ZodRawShape>>({
|
|
|
620
763
|
table: tableConfig,
|
|
621
764
|
form: formConfig,
|
|
622
765
|
slots,
|
|
623
|
-
permissions
|
|
624
|
-
|
|
766
|
+
permissions,
|
|
767
|
+
actions: actionItems,
|
|
768
|
+
locale: localeProp
|
|
769
|
+
}: AutoCrudTableProps<TSchema>): react_jsx_runtime0.JSX.Element;
|
|
625
770
|
//#endregion
|
|
626
771
|
//#region src/components/auto-crud/auto-form.d.ts
|
|
627
772
|
interface AutoFormProps<T extends z.ZodObject<z.ZodRawShape>> {
|
|
@@ -653,7 +798,7 @@ declare function AutoFormInner<T extends z.ZodObject<z.ZodRawShape>>({
|
|
|
653
798
|
labelAlign,
|
|
654
799
|
labelWidth,
|
|
655
800
|
showSubmitButton
|
|
656
|
-
}: AutoFormProps<T>, ref: React.Ref<AutoFormRef>):
|
|
801
|
+
}: AutoFormProps<T>, ref: React.Ref<AutoFormRef>): react_jsx_runtime0.JSX.Element;
|
|
657
802
|
declare const AutoForm: <T extends z.ZodObject<z.ZodRawShape>>(props: AutoFormProps<T> & {
|
|
658
803
|
ref?: React.Ref<AutoFormRef>;
|
|
659
804
|
}) => ReturnType<typeof AutoFormInner>;
|
|
@@ -908,6 +1053,8 @@ declare module "@tanstack/react-table" {
|
|
|
908
1053
|
range?: [number, number];
|
|
909
1054
|
unit?: string;
|
|
910
1055
|
icon?: React.FC<React.SVGProps<SVGSVGElement>>;
|
|
1056
|
+
/** 控制在哪些筛选模式下显示(未设置则在所有模式显示) */
|
|
1057
|
+
modes?: Array<"simple" | "advanced" | "command">;
|
|
911
1058
|
}
|
|
912
1059
|
}
|
|
913
1060
|
interface QueryKeys {
|
|
@@ -949,7 +1096,7 @@ declare function AutoTableSimpleFilters<TData>({
|
|
|
949
1096
|
shallow,
|
|
950
1097
|
filters: externalFilters,
|
|
951
1098
|
onFiltersChange
|
|
952
|
-
}: AutoTableSimpleFiltersProps<TData>):
|
|
1099
|
+
}: AutoTableSimpleFiltersProps<TData>): react_jsx_runtime0.JSX.Element | null;
|
|
953
1100
|
//#endregion
|
|
954
1101
|
//#region src/components/auto-crud/form-modal.d.ts
|
|
955
1102
|
type ModalVariant = "dialog" | "sheet";
|
|
@@ -966,6 +1113,7 @@ interface CrudFormModalProps<T extends z.ZodObject<z.ZodRawShape>> {
|
|
|
966
1113
|
variant?: ModalVariant;
|
|
967
1114
|
overrides?: FormSchemaOverrides;
|
|
968
1115
|
title?: string;
|
|
1116
|
+
locale?: AutoCrudLocale["formModal"];
|
|
969
1117
|
/** Label 对齐方式 */
|
|
970
1118
|
labelAlign?: "left" | "top" | "right";
|
|
971
1119
|
/** Label 宽度(labelAlign 为 left 时有效) */
|
|
@@ -982,9 +1130,10 @@ declare function CrudFormModal<T extends z.ZodObject<z.ZodRawShape>>({
|
|
|
982
1130
|
variant,
|
|
983
1131
|
overrides,
|
|
984
1132
|
title,
|
|
1133
|
+
locale,
|
|
985
1134
|
labelAlign,
|
|
986
1135
|
labelWidth
|
|
987
|
-
}: CrudFormModalProps<T>):
|
|
1136
|
+
}: CrudFormModalProps<T>): react_jsx_runtime0.JSX.Element;
|
|
988
1137
|
//#endregion
|
|
989
1138
|
//#region src/components/auto-crud/import-dialog.d.ts
|
|
990
1139
|
interface ImportDialogProps {
|
|
@@ -994,16 +1143,19 @@ interface ImportDialogProps {
|
|
|
994
1143
|
onImport: (rows: Record<string, unknown>[]) => Promise<ImportResult>;
|
|
995
1144
|
/** 可用列名(用于生成模板) */
|
|
996
1145
|
columns?: string[];
|
|
997
|
-
/**
|
|
1146
|
+
/** 对话框标题(优先于 locale.title) */
|
|
998
1147
|
title?: string;
|
|
1148
|
+
/** 语言包,默认 zh-CN */
|
|
1149
|
+
locale?: AutoCrudLocale["importDialog"];
|
|
999
1150
|
}
|
|
1000
1151
|
declare function ImportDialog({
|
|
1001
1152
|
open,
|
|
1002
1153
|
onOpenChange,
|
|
1003
1154
|
onImport,
|
|
1004
1155
|
columns,
|
|
1005
|
-
title
|
|
1006
|
-
|
|
1156
|
+
title,
|
|
1157
|
+
locale
|
|
1158
|
+
}: ImportDialogProps): react_jsx_runtime0.JSX.Element;
|
|
1007
1159
|
//#endregion
|
|
1008
1160
|
//#region src/components/auto-crud/export-dialog.d.ts
|
|
1009
1161
|
type ExportMode = "selected" | "filtered";
|
|
@@ -1023,7 +1175,7 @@ declare function ExportDialog({
|
|
|
1023
1175
|
selectedCount,
|
|
1024
1176
|
onExport,
|
|
1025
1177
|
canExportFiltered
|
|
1026
|
-
}: ExportDialogProps):
|
|
1178
|
+
}: ExportDialogProps): react_jsx_runtime0.JSX.Element;
|
|
1027
1179
|
//#endregion
|
|
1028
1180
|
//#region src/components/data-table/data-table.d.ts
|
|
1029
1181
|
interface DataTableProps<TData> extends React$1.ComponentProps<"div"> {
|
|
@@ -1036,7 +1188,7 @@ declare function DataTable<TData>({
|
|
|
1036
1188
|
children,
|
|
1037
1189
|
className,
|
|
1038
1190
|
...props
|
|
1039
|
-
}: DataTableProps<TData>):
|
|
1191
|
+
}: DataTableProps<TData>): react_jsx_runtime0.JSX.Element;
|
|
1040
1192
|
//#endregion
|
|
1041
1193
|
//#region src/components/data-table/data-table-advanced-toolbar.d.ts
|
|
1042
1194
|
interface DataTableAdvancedToolbarProps<TData> extends React$1.ComponentProps<"div"> {
|
|
@@ -1047,7 +1199,7 @@ declare function DataTableAdvancedToolbar<TData>({
|
|
|
1047
1199
|
children,
|
|
1048
1200
|
className,
|
|
1049
1201
|
...props
|
|
1050
|
-
}: DataTableAdvancedToolbarProps<TData>):
|
|
1202
|
+
}: DataTableAdvancedToolbarProps<TData>): react_jsx_runtime0.JSX.Element;
|
|
1051
1203
|
//#endregion
|
|
1052
1204
|
//#region src/components/data-table/data-table-column-header.d.ts
|
|
1053
1205
|
interface DataTableColumnHeaderProps<TData, TValue> extends React.ComponentProps<typeof DropdownMenuTrigger> {
|
|
@@ -1059,7 +1211,7 @@ declare function DataTableColumnHeader<TData, TValue>({
|
|
|
1059
1211
|
label,
|
|
1060
1212
|
className,
|
|
1061
1213
|
...props
|
|
1062
|
-
}: DataTableColumnHeaderProps<TData, TValue>):
|
|
1214
|
+
}: DataTableColumnHeaderProps<TData, TValue>): react_jsx_runtime0.JSX.Element;
|
|
1063
1215
|
//#endregion
|
|
1064
1216
|
//#region src/components/data-table/data-table-faceted-filter.d.ts
|
|
1065
1217
|
interface DataTableFacetedFilterProps<TData, TValue> {
|
|
@@ -1073,7 +1225,7 @@ declare function DataTableFacetedFilter<TData, TValue>({
|
|
|
1073
1225
|
title,
|
|
1074
1226
|
options,
|
|
1075
1227
|
multiple
|
|
1076
|
-
}: DataTableFacetedFilterProps<TData, TValue>):
|
|
1228
|
+
}: DataTableFacetedFilterProps<TData, TValue>): react_jsx_runtime0.JSX.Element;
|
|
1077
1229
|
//#endregion
|
|
1078
1230
|
//#region src/components/data-table/data-table-pagination.d.ts
|
|
1079
1231
|
interface DataTablePaginationProps<TData> extends React.ComponentProps<"div"> {
|
|
@@ -1085,7 +1237,7 @@ declare function DataTablePagination<TData>({
|
|
|
1085
1237
|
pageSizeOptions,
|
|
1086
1238
|
className,
|
|
1087
1239
|
...props
|
|
1088
|
-
}: DataTablePaginationProps<TData>):
|
|
1240
|
+
}: DataTablePaginationProps<TData>): react_jsx_runtime0.JSX.Element;
|
|
1089
1241
|
//#endregion
|
|
1090
1242
|
//#region src/components/data-table/data-table-toolbar.d.ts
|
|
1091
1243
|
interface DataTableToolbarProps<TData> extends React$1.ComponentProps<"div"> {
|
|
@@ -1096,7 +1248,7 @@ declare function DataTableToolbar<TData>({
|
|
|
1096
1248
|
children,
|
|
1097
1249
|
className,
|
|
1098
1250
|
...props
|
|
1099
|
-
}: DataTableToolbarProps<TData>):
|
|
1251
|
+
}: DataTableToolbarProps<TData>): react_jsx_runtime0.JSX.Element;
|
|
1100
1252
|
//#endregion
|
|
1101
1253
|
//#region src/components/data-table/data-table-view-options.d.ts
|
|
1102
1254
|
interface DataTableViewOptionsProps<TData> extends React$1.ComponentProps<typeof PopoverContent> {
|
|
@@ -1107,7 +1259,7 @@ declare function DataTableViewOptions<TData>({
|
|
|
1107
1259
|
table,
|
|
1108
1260
|
disabled,
|
|
1109
1261
|
...props
|
|
1110
|
-
}: DataTableViewOptionsProps<TData>):
|
|
1262
|
+
}: DataTableViewOptionsProps<TData>): react_jsx_runtime0.JSX.Element;
|
|
1111
1263
|
//#endregion
|
|
1112
1264
|
//#region src/hooks/use-data-table.d.ts
|
|
1113
1265
|
interface UseDataTableProps<TData> extends Omit<TableOptions<TData>, "state" | "pageCount" | "getCoreRowModel" | "manualFiltering" | "manualPagination" | "manualSorting">, Required<Pick<TableOptions<TData>, "pageCount">> {
|
|
@@ -1442,4 +1594,4 @@ declare function exportAllToCSV<T extends Record<string, unknown>>(data: T[], op
|
|
|
1442
1594
|
*/
|
|
1443
1595
|
declare function downloadCSVTemplate(headers: string[], filename?: string): void;
|
|
1444
1596
|
//#endregion
|
|
1445
|
-
export { type ActionsColumnConfig, AutoCrudTable, type AutoCrudTableProps, AutoForm, type AutoQueryParams, AutoTable, AutoTableActionBar, AutoTableSimpleFilters, type ColumnOverrides, type CreateFormSchemaOptions, type CreateTableSchemaOptions, CrudFormModal, type CrudHooks, type CrudOperationPermissions, type CrudPermissions, type DataSource, DataTable, DataTableAdvancedToolbar, DataTableColumnHeader, DataTableFacetedFilter, DataTablePagination, DataTableRowAction, DataTableToolbar, DataTableViewOptions, type EnumOption, ExportDialog, type ExportDialogProps, type ExportMode, ExtendedColumnFilter, ExtendedColumnSort, type Field, type FieldType, type Fields, type FilterConfig, FilterOperator, type FilterVariant, type FormSchemaOverrides, ImportDialog, type ImportDialogProps, type ImportResult, type JSONSchema, type JSONSchemaProperty, JoinOperator, type ListParams, type ListResult, Option, type ParsedImportData, type ParsedZodField, type Parser, QueryKeys, SchemaAdapter, type SimpleFieldConfig, type SimpleFieldsConfig, type ToastAdapter, type UnifiedField, type UnifiedSchema, type UrlStateOptions, type UseAutoCrudResourceOptions, type UseAutoCrudResourceParams, type UseAutoCrudResourceReturn, cn, coerceRowValues, createActionsColumn, createEditFormSchema, createFormSchema, createMemoryDataSource, createSelectColumn, createTRPCDataSource, createTableSchema, dataToCSV, downloadCSVTemplate, exportAllToCSV, exportTableToCSV, formatDate, generateCSVTemplate, getUrlParams, humanize, noopToastAdapter, parseAsArrayOf, parseAsInteger, parseAsString, parseAsStringEnum, parseCSV, parseImportFile, parseJSON, parseZodField, setSearchParams, useAutoCrudResource, useDataTable, useQueryState, useQueryStates, useReadableFilters, useUrlState, useUrlStates };
|
|
1597
|
+
export { type ActionItem, type ActionsColumnConfig, type AutoCrudLocale, AutoCrudTable, type AutoCrudTableProps, AutoForm, type AutoQueryParams, AutoTable, AutoTableActionBar, AutoTableSimpleFilters, type ColumnOverrides, type CreateFormSchemaOptions, type CreateTableSchemaOptions, CrudFormModal, type CrudHooks, type CrudOperationPermissions, type CrudPermissions, type DataSource, DataTable, DataTableAdvancedToolbar, DataTableColumnHeader, DataTableFacetedFilter, DataTablePagination, DataTableRowAction, DataTableToolbar, DataTableViewOptions, type EnumOption, ExportDialog, type ExportDialogProps, type ExportMode, ExtendedColumnFilter, ExtendedColumnSort, type Field, type FieldType, type Fields, type FilterConfig, FilterOperator, type FilterVariant, type FormSchemaOverrides, ImportDialog, type ImportDialogProps, type ImportResult, type JSONSchema, type JSONSchemaProperty, JoinOperator, type ListParams, type ListResult, type LocaleProp, Option, type ParsedImportData, type ParsedZodField, type Parser, QueryKeys, SchemaAdapter, type SimpleFieldConfig, type SimpleFieldsConfig, type ToastAdapter, type UnifiedField, type UnifiedSchema, type UrlStateOptions, type UseAutoCrudResourceOptions, type UseAutoCrudResourceParams, type UseAutoCrudResourceReturn, cn, coerceRowValues, createActionsColumn, createEditFormSchema, createFormSchema, createMemoryDataSource, createSelectColumn, createTRPCDataSource, createTableSchema, dataToCSV, deDE, downloadCSVTemplate, enUS, esES, exportAllToCSV, exportTableToCSV, formatDate, frFR, generateCSVTemplate, getUrlParams, humanize, jaJP, koKR, noopToastAdapter, parseAsArrayOf, parseAsInteger, parseAsString, parseAsStringEnum, parseCSV, parseImportFile, parseJSON, parseZodField, resolveLocale, setSearchParams, useAutoCrudResource, useDataTable, useQueryState, useQueryStates, useReadableFilters, useUrlState, useUrlStates, zhCN };
|