@wordrhyme/auto-crud 1.3.6 → 1.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +61 -15
- package/dist/index.cjs +319 -65
- package/dist/index.d.cts +45 -19
- package/dist/index.d.ts +45 -19
- package/dist/index.js +319 -65
- package/package.json +6 -4
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime3 from "react/jsx-runtime";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { JsonSchemaFormScope } from "@wordrhyme/formily-shadcn";
|
|
4
4
|
import * as _tanstack_react_table0 from "@tanstack/react-table";
|
|
@@ -9,6 +9,12 @@ import { DropdownMenuTrigger, PopoverContent } from "@wordrhyme/shadcn";
|
|
|
9
9
|
import { MultiCombobox, MultiComboboxOption, MultiComboboxProps, MultiComboboxTriggerRenderProps, Select, SelectMode, SelectOption, SelectProps, SelectSearchableDynamicProps, SelectSearchableMultipleProps, SelectSearchableProps, SelectSearchableSingleProps, SelectSimpleProps, SelectTriggerRenderProps } from "@wordrhyme/shadcn-ui";
|
|
10
10
|
import { ClassValue } from "clsx";
|
|
11
11
|
|
|
12
|
+
//#region src/lib/default-sorting.d.ts
|
|
13
|
+
type AutoCrudSorting = Array<{
|
|
14
|
+
id: string;
|
|
15
|
+
desc: boolean;
|
|
16
|
+
}>;
|
|
17
|
+
//#endregion
|
|
12
18
|
//#region src/hooks/use-auto-crud-resource.d.ts
|
|
13
19
|
/**
|
|
14
20
|
* Toast 适配器接口
|
|
@@ -103,6 +109,12 @@ interface UseAutoCrudResourceOptions<TSchema extends z.ZodObject<z.ZodRawShape>,
|
|
|
103
109
|
total: number;
|
|
104
110
|
hasMore: boolean;
|
|
105
111
|
}>;
|
|
112
|
+
/**
|
|
113
|
+
* 默认排序。
|
|
114
|
+
* - undefined: schema 有 createdAt 时默认 createdAt desc
|
|
115
|
+
* - false: 不应用默认排序
|
|
116
|
+
*/
|
|
117
|
+
defaultSort?: AutoCrudSorting | false;
|
|
106
118
|
}
|
|
107
119
|
/**
|
|
108
120
|
* 导入结果类型(与服务端保持一致)
|
|
@@ -133,6 +145,8 @@ interface UseAutoCrudResourceReturn<TSchema extends z.ZodObject<z.ZodRawShape>,
|
|
|
133
145
|
schema?: z.ZodObject<z.ZodRawShape>;
|
|
134
146
|
/** Optional field config override from host metadata. */
|
|
135
147
|
fields?: Fields;
|
|
148
|
+
/** Default sorting used by this resource's list query. */
|
|
149
|
+
defaultSort?: AutoCrudSorting;
|
|
136
150
|
modal: ModalState<TListItem>;
|
|
137
151
|
mutations: {
|
|
138
152
|
isCreating: boolean;
|
|
@@ -381,7 +395,7 @@ declare function AutoTableActionBar<TData>({
|
|
|
381
395
|
extraActions,
|
|
382
396
|
actions,
|
|
383
397
|
deleteConfirmation
|
|
384
|
-
}: AutoTableActionBarProps<TData>):
|
|
398
|
+
}: AutoTableActionBarProps<TData>): react_jsx_runtime3.JSX.Element;
|
|
385
399
|
//#endregion
|
|
386
400
|
//#region src/lib/schema-bridge/types.d.ts
|
|
387
401
|
/**
|
|
@@ -557,7 +571,7 @@ declare function AutoTable<T extends z.ZodObject<z.ZodRawShape>>({
|
|
|
557
571
|
onSelectedCountChange,
|
|
558
572
|
onSelectedRowsChange,
|
|
559
573
|
getSelectedRows
|
|
560
|
-
}: AutoTableProps<T>):
|
|
574
|
+
}: AutoTableProps<T>): react_jsx_runtime3.JSX.Element;
|
|
561
575
|
//#endregion
|
|
562
576
|
//#region src/i18n/locale.d.ts
|
|
563
577
|
/**
|
|
@@ -670,12 +684,19 @@ type AutoCrudOption = {
|
|
|
670
684
|
count?: number;
|
|
671
685
|
disabled?: boolean;
|
|
672
686
|
};
|
|
687
|
+
type AutoCrudDataSourceContextType = 'form' | 'filter' | 'resolve';
|
|
688
|
+
type AutoCrudDataSourceResolveFields = readonly string[] | ((context: {
|
|
689
|
+
field: string;
|
|
690
|
+
}) => readonly string[]);
|
|
673
691
|
type AutoCrudDataSourceContext = {
|
|
674
692
|
field: string;
|
|
693
|
+
type: AutoCrudDataSourceContextType;
|
|
675
694
|
page?: number;
|
|
676
695
|
pageSize?: number;
|
|
696
|
+
query?: string;
|
|
697
|
+
/** @deprecated Use `query` instead. */
|
|
677
698
|
search?: string;
|
|
678
|
-
values?: Record<string, unknown
|
|
699
|
+
values?: Record<string, unknown> | Record<string, unknown>[];
|
|
679
700
|
signal?: AbortSignal;
|
|
680
701
|
};
|
|
681
702
|
type AutoCrudDataSourceResult = AutoCrudOption[] | {
|
|
@@ -691,6 +712,7 @@ type AutoCrudDataSourceRegistration = AutoCrudDataSourceLoader | {
|
|
|
691
712
|
debounceMs?: number;
|
|
692
713
|
loadMore?: boolean;
|
|
693
714
|
pageSize?: number;
|
|
715
|
+
resolveFields?: AutoCrudDataSourceResolveFields;
|
|
694
716
|
load: AutoCrudDataSourceLoader;
|
|
695
717
|
};
|
|
696
718
|
type AutoCrudDataSourceEntry = {
|
|
@@ -700,6 +722,7 @@ type AutoCrudDataSourceEntry = {
|
|
|
700
722
|
debounceMs: number;
|
|
701
723
|
loadMore: boolean;
|
|
702
724
|
pageSize: number;
|
|
725
|
+
resolveFields?: AutoCrudDataSourceResolveFields;
|
|
703
726
|
load: AutoCrudDataSourceLoader;
|
|
704
727
|
};
|
|
705
728
|
type RegistryListener$1 = () => void;
|
|
@@ -901,8 +924,11 @@ interface AutoCrudToolbarContext {
|
|
|
901
924
|
selectedRowIds: string[];
|
|
902
925
|
selectedCount: number;
|
|
903
926
|
refresh?: () => Promise<unknown>;
|
|
904
|
-
|
|
927
|
+
openImport?: () => void;
|
|
928
|
+
exportData?: () => Promise<void>;
|
|
905
929
|
openCreate?: () => void;
|
|
930
|
+
isRefreshing: boolean;
|
|
931
|
+
isExporting: boolean;
|
|
906
932
|
}
|
|
907
933
|
type AutoCrudToolbarResolver = (targetId: string, ownerActions: readonly ToolbarActionItem[], context: AutoCrudToolbarContext) => ToolbarActionItem[];
|
|
908
934
|
declare function setToolbarResolver(resolver: AutoCrudToolbarResolver | null): void;
|
|
@@ -1037,7 +1063,7 @@ declare function AutoCrudTable<TSchema extends z.ZodObject<z.ZodRawShape>>({
|
|
|
1037
1063
|
toolbarActions,
|
|
1038
1064
|
locale: localeProp,
|
|
1039
1065
|
onCreate
|
|
1040
|
-
}: AutoCrudTableProps<TSchema>):
|
|
1066
|
+
}: AutoCrudTableProps<TSchema>): react_jsx_runtime3.JSX.Element;
|
|
1041
1067
|
//#endregion
|
|
1042
1068
|
//#region src/components/auto-crud/auto-form.d.ts
|
|
1043
1069
|
interface AutoFormProps<T extends z.ZodObject<z.ZodRawShape>> {
|
|
@@ -1076,7 +1102,7 @@ declare function AutoFormInner<T extends z.ZodObject<z.ZodRawShape>>({
|
|
|
1076
1102
|
labelAlign,
|
|
1077
1103
|
labelWidth,
|
|
1078
1104
|
showSubmitButton
|
|
1079
|
-
}: AutoFormProps<T>, ref: React.Ref<AutoFormRef>):
|
|
1105
|
+
}: AutoFormProps<T>, ref: React.Ref<AutoFormRef>): react_jsx_runtime3.JSX.Element;
|
|
1080
1106
|
declare const AutoForm: <T extends z.ZodObject<z.ZodRawShape>>(props: AutoFormProps<T> & {
|
|
1081
1107
|
ref?: React.Ref<AutoFormRef>;
|
|
1082
1108
|
}) => ReturnType<typeof AutoFormInner>;
|
|
@@ -1392,7 +1418,7 @@ declare function AutoTableSimpleFilters<TData>({
|
|
|
1392
1418
|
filters: externalFilters,
|
|
1393
1419
|
onFiltersChange,
|
|
1394
1420
|
leading
|
|
1395
|
-
}: AutoTableSimpleFiltersProps<TData>):
|
|
1421
|
+
}: AutoTableSimpleFiltersProps<TData>): react_jsx_runtime3.JSX.Element | null;
|
|
1396
1422
|
//#endregion
|
|
1397
1423
|
//#region src/components/auto-crud/form-modal.d.ts
|
|
1398
1424
|
type ModalVariant = "dialog" | "sheet";
|
|
@@ -1436,7 +1462,7 @@ declare function CrudFormModal<T extends z.ZodObject<z.ZodRawShape>>({
|
|
|
1436
1462
|
labelAlign,
|
|
1437
1463
|
labelWidth,
|
|
1438
1464
|
className
|
|
1439
|
-
}: CrudFormModalProps<T>):
|
|
1465
|
+
}: CrudFormModalProps<T>): react_jsx_runtime3.JSX.Element;
|
|
1440
1466
|
//#endregion
|
|
1441
1467
|
//#region src/components/auto-crud/import-dialog.d.ts
|
|
1442
1468
|
interface ImportDialogProps {
|
|
@@ -1458,7 +1484,7 @@ declare function ImportDialog({
|
|
|
1458
1484
|
columns,
|
|
1459
1485
|
title,
|
|
1460
1486
|
locale
|
|
1461
|
-
}: ImportDialogProps):
|
|
1487
|
+
}: ImportDialogProps): react_jsx_runtime3.JSX.Element;
|
|
1462
1488
|
//#endregion
|
|
1463
1489
|
//#region src/components/auto-crud/export-dialog.d.ts
|
|
1464
1490
|
type ExportMode = "selected" | "filtered";
|
|
@@ -1478,7 +1504,7 @@ declare function ExportDialog({
|
|
|
1478
1504
|
selectedCount,
|
|
1479
1505
|
onExport,
|
|
1480
1506
|
canExportFiltered
|
|
1481
|
-
}: ExportDialogProps):
|
|
1507
|
+
}: ExportDialogProps): react_jsx_runtime3.JSX.Element;
|
|
1482
1508
|
//#endregion
|
|
1483
1509
|
//#region src/components/data-table/data-table.d.ts
|
|
1484
1510
|
interface DataTableProps<TData> extends React$1.ComponentProps<"div"> {
|
|
@@ -1491,7 +1517,7 @@ declare function DataTable<TData>({
|
|
|
1491
1517
|
children,
|
|
1492
1518
|
className,
|
|
1493
1519
|
...props
|
|
1494
|
-
}: DataTableProps<TData>):
|
|
1520
|
+
}: DataTableProps<TData>): react_jsx_runtime3.JSX.Element;
|
|
1495
1521
|
//#endregion
|
|
1496
1522
|
//#region src/components/data-table/data-table-advanced-toolbar.d.ts
|
|
1497
1523
|
interface DataTableAdvancedToolbarProps<TData> extends React$1.ComponentProps<"div"> {
|
|
@@ -1502,7 +1528,7 @@ declare function DataTableAdvancedToolbar<TData>({
|
|
|
1502
1528
|
children,
|
|
1503
1529
|
className,
|
|
1504
1530
|
...props
|
|
1505
|
-
}: DataTableAdvancedToolbarProps<TData>):
|
|
1531
|
+
}: DataTableAdvancedToolbarProps<TData>): react_jsx_runtime3.JSX.Element;
|
|
1506
1532
|
//#endregion
|
|
1507
1533
|
//#region src/components/data-table/data-table-column-header.d.ts
|
|
1508
1534
|
interface DataTableColumnHeaderProps<TData, TValue> extends React.ComponentProps<typeof DropdownMenuTrigger> {
|
|
@@ -1514,7 +1540,7 @@ declare function DataTableColumnHeader<TData, TValue>({
|
|
|
1514
1540
|
label,
|
|
1515
1541
|
className,
|
|
1516
1542
|
...props
|
|
1517
|
-
}: DataTableColumnHeaderProps<TData, TValue>):
|
|
1543
|
+
}: DataTableColumnHeaderProps<TData, TValue>): react_jsx_runtime3.JSX.Element;
|
|
1518
1544
|
//#endregion
|
|
1519
1545
|
//#region src/components/data-table/data-table-faceted-filter.d.ts
|
|
1520
1546
|
interface DataTableFacetedFilterProps<TData, TValue> {
|
|
@@ -1528,7 +1554,7 @@ declare function DataTableFacetedFilter<TData, TValue>({
|
|
|
1528
1554
|
title,
|
|
1529
1555
|
options,
|
|
1530
1556
|
multiple
|
|
1531
|
-
}: DataTableFacetedFilterProps<TData, TValue>):
|
|
1557
|
+
}: DataTableFacetedFilterProps<TData, TValue>): react_jsx_runtime3.JSX.Element;
|
|
1532
1558
|
//#endregion
|
|
1533
1559
|
//#region src/components/data-table/data-table-pagination.d.ts
|
|
1534
1560
|
interface DataTablePaginationProps<TData> extends React.ComponentProps<"div"> {
|
|
@@ -1540,7 +1566,7 @@ declare function DataTablePagination<TData>({
|
|
|
1540
1566
|
pageSizeOptions,
|
|
1541
1567
|
className,
|
|
1542
1568
|
...props
|
|
1543
|
-
}: DataTablePaginationProps<TData>):
|
|
1569
|
+
}: DataTablePaginationProps<TData>): react_jsx_runtime3.JSX.Element;
|
|
1544
1570
|
//#endregion
|
|
1545
1571
|
//#region src/components/data-table/data-table-toolbar.d.ts
|
|
1546
1572
|
interface DataTableToolbarProps<TData> extends React$1.ComponentProps<"div"> {
|
|
@@ -1551,7 +1577,7 @@ declare function DataTableToolbar<TData>({
|
|
|
1551
1577
|
children,
|
|
1552
1578
|
className,
|
|
1553
1579
|
...props
|
|
1554
|
-
}: DataTableToolbarProps<TData>):
|
|
1580
|
+
}: DataTableToolbarProps<TData>): react_jsx_runtime3.JSX.Element;
|
|
1555
1581
|
//#endregion
|
|
1556
1582
|
//#region src/components/data-table/data-table-view-options.d.ts
|
|
1557
1583
|
interface DataTableViewOptionsProps<TData> extends React$1.ComponentProps<typeof PopoverContent> {
|
|
@@ -1562,7 +1588,7 @@ declare function DataTableViewOptions<TData>({
|
|
|
1562
1588
|
table,
|
|
1563
1589
|
disabled,
|
|
1564
1590
|
...props
|
|
1565
|
-
}: DataTableViewOptionsProps<TData>):
|
|
1591
|
+
}: DataTableViewOptionsProps<TData>): react_jsx_runtime3.JSX.Element;
|
|
1566
1592
|
//#endregion
|
|
1567
1593
|
//#region src/lib/crud-actions.d.ts
|
|
1568
1594
|
type CrudActionZone = 'toolbar' | 'row' | 'batch';
|
|
@@ -1644,7 +1670,7 @@ declare function useReadableFilters<TData>(columns: ColumnLike<TData>[], options
|
|
|
1644
1670
|
*/
|
|
1645
1671
|
declare function createFormSchema<T extends z.ZodObject<z.ZodRawShape>>(schema: T, options?: CreateFormSchemaOptions): ISchema;
|
|
1646
1672
|
/**
|
|
1647
|
-
* 为编辑模式创建 Form Schema
|
|
1673
|
+
* 为编辑模式创建 Form Schema(排除平台托管字段)
|
|
1648
1674
|
*/
|
|
1649
1675
|
declare function createEditFormSchema<T extends z.ZodObject<z.ZodRawShape>>(schema: T, options?: Omit<CreateFormSchemaOptions, 'exclude'>): ISchema;
|
|
1650
1676
|
//#endregion
|
package/dist/index.d.ts
CHANGED
|
@@ -3,12 +3,18 @@ import * as _tanstack_react_table0 from "@tanstack/react-table";
|
|
|
3
3
|
import { Column, ColumnDef, ColumnSort, Row, RowData, Table, TableOptions, TableState } from "@tanstack/react-table";
|
|
4
4
|
import { DropdownMenuTrigger, PopoverContent } from "@wordrhyme/shadcn";
|
|
5
5
|
import { ClassValue } from "clsx";
|
|
6
|
-
import * as
|
|
6
|
+
import * as react_jsx_runtime5 from "react/jsx-runtime";
|
|
7
7
|
import { MultiCombobox, MultiComboboxOption, MultiComboboxProps, MultiComboboxTriggerRenderProps, Select, SelectMode, SelectOption, SelectProps, SelectSearchableDynamicProps, SelectSearchableMultipleProps, SelectSearchableProps, SelectSearchableSingleProps, SelectSimpleProps, SelectTriggerRenderProps } from "@wordrhyme/shadcn-ui";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
import { JsonSchemaFormScope } from "@wordrhyme/formily-shadcn";
|
|
10
10
|
import { ISchema } from "@formily/json-schema";
|
|
11
11
|
|
|
12
|
+
//#region src/lib/default-sorting.d.ts
|
|
13
|
+
type AutoCrudSorting = Array<{
|
|
14
|
+
id: string;
|
|
15
|
+
desc: boolean;
|
|
16
|
+
}>;
|
|
17
|
+
//#endregion
|
|
12
18
|
//#region src/hooks/use-auto-crud-resource.d.ts
|
|
13
19
|
/**
|
|
14
20
|
* Toast 适配器接口
|
|
@@ -103,6 +109,12 @@ interface UseAutoCrudResourceOptions<TSchema extends z.ZodObject<z.ZodRawShape>,
|
|
|
103
109
|
total: number;
|
|
104
110
|
hasMore: boolean;
|
|
105
111
|
}>;
|
|
112
|
+
/**
|
|
113
|
+
* 默认排序。
|
|
114
|
+
* - undefined: schema 有 createdAt 时默认 createdAt desc
|
|
115
|
+
* - false: 不应用默认排序
|
|
116
|
+
*/
|
|
117
|
+
defaultSort?: AutoCrudSorting | false;
|
|
106
118
|
}
|
|
107
119
|
/**
|
|
108
120
|
* 导入结果类型(与服务端保持一致)
|
|
@@ -133,6 +145,8 @@ interface UseAutoCrudResourceReturn<TSchema extends z.ZodObject<z.ZodRawShape>,
|
|
|
133
145
|
schema?: z.ZodObject<z.ZodRawShape>;
|
|
134
146
|
/** Optional field config override from host metadata. */
|
|
135
147
|
fields?: Fields;
|
|
148
|
+
/** Default sorting used by this resource's list query. */
|
|
149
|
+
defaultSort?: AutoCrudSorting;
|
|
136
150
|
modal: ModalState<TListItem>;
|
|
137
151
|
mutations: {
|
|
138
152
|
isCreating: boolean;
|
|
@@ -381,7 +395,7 @@ declare function AutoTableActionBar<TData>({
|
|
|
381
395
|
extraActions,
|
|
382
396
|
actions,
|
|
383
397
|
deleteConfirmation
|
|
384
|
-
}: AutoTableActionBarProps<TData>):
|
|
398
|
+
}: AutoTableActionBarProps<TData>): react_jsx_runtime5.JSX.Element;
|
|
385
399
|
//#endregion
|
|
386
400
|
//#region src/lib/schema-bridge/types.d.ts
|
|
387
401
|
/**
|
|
@@ -557,7 +571,7 @@ declare function AutoTable<T extends z.ZodObject<z.ZodRawShape>>({
|
|
|
557
571
|
onSelectedCountChange,
|
|
558
572
|
onSelectedRowsChange,
|
|
559
573
|
getSelectedRows
|
|
560
|
-
}: AutoTableProps<T>):
|
|
574
|
+
}: AutoTableProps<T>): react_jsx_runtime5.JSX.Element;
|
|
561
575
|
//#endregion
|
|
562
576
|
//#region src/i18n/locale.d.ts
|
|
563
577
|
/**
|
|
@@ -670,12 +684,19 @@ type AutoCrudOption = {
|
|
|
670
684
|
count?: number;
|
|
671
685
|
disabled?: boolean;
|
|
672
686
|
};
|
|
687
|
+
type AutoCrudDataSourceContextType = 'form' | 'filter' | 'resolve';
|
|
688
|
+
type AutoCrudDataSourceResolveFields = readonly string[] | ((context: {
|
|
689
|
+
field: string;
|
|
690
|
+
}) => readonly string[]);
|
|
673
691
|
type AutoCrudDataSourceContext = {
|
|
674
692
|
field: string;
|
|
693
|
+
type: AutoCrudDataSourceContextType;
|
|
675
694
|
page?: number;
|
|
676
695
|
pageSize?: number;
|
|
696
|
+
query?: string;
|
|
697
|
+
/** @deprecated Use `query` instead. */
|
|
677
698
|
search?: string;
|
|
678
|
-
values?: Record<string, unknown
|
|
699
|
+
values?: Record<string, unknown> | Record<string, unknown>[];
|
|
679
700
|
signal?: AbortSignal;
|
|
680
701
|
};
|
|
681
702
|
type AutoCrudDataSourceResult = AutoCrudOption[] | {
|
|
@@ -691,6 +712,7 @@ type AutoCrudDataSourceRegistration = AutoCrudDataSourceLoader | {
|
|
|
691
712
|
debounceMs?: number;
|
|
692
713
|
loadMore?: boolean;
|
|
693
714
|
pageSize?: number;
|
|
715
|
+
resolveFields?: AutoCrudDataSourceResolveFields;
|
|
694
716
|
load: AutoCrudDataSourceLoader;
|
|
695
717
|
};
|
|
696
718
|
type AutoCrudDataSourceEntry = {
|
|
@@ -700,6 +722,7 @@ type AutoCrudDataSourceEntry = {
|
|
|
700
722
|
debounceMs: number;
|
|
701
723
|
loadMore: boolean;
|
|
702
724
|
pageSize: number;
|
|
725
|
+
resolveFields?: AutoCrudDataSourceResolveFields;
|
|
703
726
|
load: AutoCrudDataSourceLoader;
|
|
704
727
|
};
|
|
705
728
|
type RegistryListener$1 = () => void;
|
|
@@ -901,8 +924,11 @@ interface AutoCrudToolbarContext {
|
|
|
901
924
|
selectedRowIds: string[];
|
|
902
925
|
selectedCount: number;
|
|
903
926
|
refresh?: () => Promise<unknown>;
|
|
904
|
-
|
|
927
|
+
openImport?: () => void;
|
|
928
|
+
exportData?: () => Promise<void>;
|
|
905
929
|
openCreate?: () => void;
|
|
930
|
+
isRefreshing: boolean;
|
|
931
|
+
isExporting: boolean;
|
|
906
932
|
}
|
|
907
933
|
type AutoCrudToolbarResolver = (targetId: string, ownerActions: readonly ToolbarActionItem[], context: AutoCrudToolbarContext) => ToolbarActionItem[];
|
|
908
934
|
declare function setToolbarResolver(resolver: AutoCrudToolbarResolver | null): void;
|
|
@@ -1037,7 +1063,7 @@ declare function AutoCrudTable<TSchema extends z.ZodObject<z.ZodRawShape>>({
|
|
|
1037
1063
|
toolbarActions,
|
|
1038
1064
|
locale: localeProp,
|
|
1039
1065
|
onCreate
|
|
1040
|
-
}: AutoCrudTableProps<TSchema>):
|
|
1066
|
+
}: AutoCrudTableProps<TSchema>): react_jsx_runtime5.JSX.Element;
|
|
1041
1067
|
//#endregion
|
|
1042
1068
|
//#region src/components/auto-crud/auto-form.d.ts
|
|
1043
1069
|
interface AutoFormProps<T extends z.ZodObject<z.ZodRawShape>> {
|
|
@@ -1076,7 +1102,7 @@ declare function AutoFormInner<T extends z.ZodObject<z.ZodRawShape>>({
|
|
|
1076
1102
|
labelAlign,
|
|
1077
1103
|
labelWidth,
|
|
1078
1104
|
showSubmitButton
|
|
1079
|
-
}: AutoFormProps<T>, ref: React.Ref<AutoFormRef>):
|
|
1105
|
+
}: AutoFormProps<T>, ref: React.Ref<AutoFormRef>): react_jsx_runtime5.JSX.Element;
|
|
1080
1106
|
declare const AutoForm: <T extends z.ZodObject<z.ZodRawShape>>(props: AutoFormProps<T> & {
|
|
1081
1107
|
ref?: React.Ref<AutoFormRef>;
|
|
1082
1108
|
}) => ReturnType<typeof AutoFormInner>;
|
|
@@ -1392,7 +1418,7 @@ declare function AutoTableSimpleFilters<TData>({
|
|
|
1392
1418
|
filters: externalFilters,
|
|
1393
1419
|
onFiltersChange,
|
|
1394
1420
|
leading
|
|
1395
|
-
}: AutoTableSimpleFiltersProps<TData>):
|
|
1421
|
+
}: AutoTableSimpleFiltersProps<TData>): react_jsx_runtime5.JSX.Element | null;
|
|
1396
1422
|
//#endregion
|
|
1397
1423
|
//#region src/components/auto-crud/form-modal.d.ts
|
|
1398
1424
|
type ModalVariant = "dialog" | "sheet";
|
|
@@ -1436,7 +1462,7 @@ declare function CrudFormModal<T extends z.ZodObject<z.ZodRawShape>>({
|
|
|
1436
1462
|
labelAlign,
|
|
1437
1463
|
labelWidth,
|
|
1438
1464
|
className
|
|
1439
|
-
}: CrudFormModalProps<T>):
|
|
1465
|
+
}: CrudFormModalProps<T>): react_jsx_runtime5.JSX.Element;
|
|
1440
1466
|
//#endregion
|
|
1441
1467
|
//#region src/components/auto-crud/import-dialog.d.ts
|
|
1442
1468
|
interface ImportDialogProps {
|
|
@@ -1458,7 +1484,7 @@ declare function ImportDialog({
|
|
|
1458
1484
|
columns,
|
|
1459
1485
|
title,
|
|
1460
1486
|
locale
|
|
1461
|
-
}: ImportDialogProps):
|
|
1487
|
+
}: ImportDialogProps): react_jsx_runtime5.JSX.Element;
|
|
1462
1488
|
//#endregion
|
|
1463
1489
|
//#region src/components/auto-crud/export-dialog.d.ts
|
|
1464
1490
|
type ExportMode = "selected" | "filtered";
|
|
@@ -1478,7 +1504,7 @@ declare function ExportDialog({
|
|
|
1478
1504
|
selectedCount,
|
|
1479
1505
|
onExport,
|
|
1480
1506
|
canExportFiltered
|
|
1481
|
-
}: ExportDialogProps):
|
|
1507
|
+
}: ExportDialogProps): react_jsx_runtime5.JSX.Element;
|
|
1482
1508
|
//#endregion
|
|
1483
1509
|
//#region src/components/data-table/data-table.d.ts
|
|
1484
1510
|
interface DataTableProps<TData> extends React$1.ComponentProps<"div"> {
|
|
@@ -1491,7 +1517,7 @@ declare function DataTable<TData>({
|
|
|
1491
1517
|
children,
|
|
1492
1518
|
className,
|
|
1493
1519
|
...props
|
|
1494
|
-
}: DataTableProps<TData>):
|
|
1520
|
+
}: DataTableProps<TData>): react_jsx_runtime5.JSX.Element;
|
|
1495
1521
|
//#endregion
|
|
1496
1522
|
//#region src/components/data-table/data-table-advanced-toolbar.d.ts
|
|
1497
1523
|
interface DataTableAdvancedToolbarProps<TData> extends React$1.ComponentProps<"div"> {
|
|
@@ -1502,7 +1528,7 @@ declare function DataTableAdvancedToolbar<TData>({
|
|
|
1502
1528
|
children,
|
|
1503
1529
|
className,
|
|
1504
1530
|
...props
|
|
1505
|
-
}: DataTableAdvancedToolbarProps<TData>):
|
|
1531
|
+
}: DataTableAdvancedToolbarProps<TData>): react_jsx_runtime5.JSX.Element;
|
|
1506
1532
|
//#endregion
|
|
1507
1533
|
//#region src/components/data-table/data-table-column-header.d.ts
|
|
1508
1534
|
interface DataTableColumnHeaderProps<TData, TValue> extends React.ComponentProps<typeof DropdownMenuTrigger> {
|
|
@@ -1514,7 +1540,7 @@ declare function DataTableColumnHeader<TData, TValue>({
|
|
|
1514
1540
|
label,
|
|
1515
1541
|
className,
|
|
1516
1542
|
...props
|
|
1517
|
-
}: DataTableColumnHeaderProps<TData, TValue>):
|
|
1543
|
+
}: DataTableColumnHeaderProps<TData, TValue>): react_jsx_runtime5.JSX.Element;
|
|
1518
1544
|
//#endregion
|
|
1519
1545
|
//#region src/components/data-table/data-table-faceted-filter.d.ts
|
|
1520
1546
|
interface DataTableFacetedFilterProps<TData, TValue> {
|
|
@@ -1528,7 +1554,7 @@ declare function DataTableFacetedFilter<TData, TValue>({
|
|
|
1528
1554
|
title,
|
|
1529
1555
|
options,
|
|
1530
1556
|
multiple
|
|
1531
|
-
}: DataTableFacetedFilterProps<TData, TValue>):
|
|
1557
|
+
}: DataTableFacetedFilterProps<TData, TValue>): react_jsx_runtime5.JSX.Element;
|
|
1532
1558
|
//#endregion
|
|
1533
1559
|
//#region src/components/data-table/data-table-pagination.d.ts
|
|
1534
1560
|
interface DataTablePaginationProps<TData> extends React.ComponentProps<"div"> {
|
|
@@ -1540,7 +1566,7 @@ declare function DataTablePagination<TData>({
|
|
|
1540
1566
|
pageSizeOptions,
|
|
1541
1567
|
className,
|
|
1542
1568
|
...props
|
|
1543
|
-
}: DataTablePaginationProps<TData>):
|
|
1569
|
+
}: DataTablePaginationProps<TData>): react_jsx_runtime5.JSX.Element;
|
|
1544
1570
|
//#endregion
|
|
1545
1571
|
//#region src/components/data-table/data-table-toolbar.d.ts
|
|
1546
1572
|
interface DataTableToolbarProps<TData> extends React$1.ComponentProps<"div"> {
|
|
@@ -1551,7 +1577,7 @@ declare function DataTableToolbar<TData>({
|
|
|
1551
1577
|
children,
|
|
1552
1578
|
className,
|
|
1553
1579
|
...props
|
|
1554
|
-
}: DataTableToolbarProps<TData>):
|
|
1580
|
+
}: DataTableToolbarProps<TData>): react_jsx_runtime5.JSX.Element;
|
|
1555
1581
|
//#endregion
|
|
1556
1582
|
//#region src/components/data-table/data-table-view-options.d.ts
|
|
1557
1583
|
interface DataTableViewOptionsProps<TData> extends React$1.ComponentProps<typeof PopoverContent> {
|
|
@@ -1562,7 +1588,7 @@ declare function DataTableViewOptions<TData>({
|
|
|
1562
1588
|
table,
|
|
1563
1589
|
disabled,
|
|
1564
1590
|
...props
|
|
1565
|
-
}: DataTableViewOptionsProps<TData>):
|
|
1591
|
+
}: DataTableViewOptionsProps<TData>): react_jsx_runtime5.JSX.Element;
|
|
1566
1592
|
//#endregion
|
|
1567
1593
|
//#region src/lib/crud-actions.d.ts
|
|
1568
1594
|
type CrudActionZone = 'toolbar' | 'row' | 'batch';
|
|
@@ -1644,7 +1670,7 @@ declare function useReadableFilters<TData>(columns: ColumnLike<TData>[], options
|
|
|
1644
1670
|
*/
|
|
1645
1671
|
declare function createFormSchema<T extends z.ZodObject<z.ZodRawShape>>(schema: T, options?: CreateFormSchemaOptions): ISchema;
|
|
1646
1672
|
/**
|
|
1647
|
-
* 为编辑模式创建 Form Schema
|
|
1673
|
+
* 为编辑模式创建 Form Schema(排除平台托管字段)
|
|
1648
1674
|
*/
|
|
1649
1675
|
declare function createEditFormSchema<T extends z.ZodObject<z.ZodRawShape>>(schema: T, options?: Omit<CreateFormSchemaOptions, 'exclude'>): ISchema;
|
|
1650
1676
|
//#endregion
|