@wordrhyme/auto-crud 1.3.0 → 1.3.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/dist/index.cjs +1225 -1675
- package/dist/index.d.cts +70 -50
- package/dist/index.d.ts +86 -66
- package/dist/index.js +959 -1414
- package/package.json +5 -9
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as React$1 from "react";
|
|
2
|
-
import { ComponentProps, ReactNode } from "react";
|
|
3
2
|
import * as _tanstack_react_table0 from "@tanstack/react-table";
|
|
4
3
|
import { Column, ColumnDef, ColumnSort, Row, RowData, Table, TableOptions, TableState } from "@tanstack/react-table";
|
|
5
|
-
import {
|
|
4
|
+
import { DropdownMenuTrigger, PopoverContent } from "@wordrhyme/shadcn";
|
|
6
5
|
import { ClassValue } from "clsx";
|
|
7
|
-
import * as
|
|
6
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
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
|
+
import { JsonSchemaFormScope } from "@wordrhyme/formily-shadcn";
|
|
9
10
|
import { ISchema } from "@formily/json-schema";
|
|
10
11
|
|
|
11
12
|
//#region src/hooks/use-auto-crud-resource.d.ts
|
|
@@ -152,6 +153,8 @@ interface UseAutoCrudResourceReturn<TSchema extends z.ZodObject<z.ZodRawShape>,
|
|
|
152
153
|
deleteMany: (rows: TListItem[]) => void;
|
|
153
154
|
updateMany: (rows: TListItem[], data: Record<string, unknown>) => void;
|
|
154
155
|
setVariant: (variant: ModalVariant$1) => void;
|
|
156
|
+
/** 刷新当前列表数据 */
|
|
157
|
+
refresh?: () => Promise<unknown>;
|
|
155
158
|
/** 导入数据(router 有 import 路由时自动可用) */
|
|
156
159
|
import: ((rows: Record<string, unknown>[]) => Promise<ImportResult>) | null;
|
|
157
160
|
/** 导出筛选结果(router 有 export procedure 或传入 exportFetcher 时自动可用)。导出选中行由 AutoCrudTable 内部处理 */
|
|
@@ -341,6 +344,12 @@ type BatchCustomActionItem<TData> = BatchActionMeta & {
|
|
|
341
344
|
};
|
|
342
345
|
type BatchActionItem<TData> = BatchBuiltinActionItem<TData> | BatchCustomActionItem<TData>;
|
|
343
346
|
type BatchActionConfig<TData> = BatchActionItem<TData>[] | ((defaults: BatchBuiltinActionItem<TData>[]) => BatchActionItem<TData>[]);
|
|
347
|
+
interface BatchDeleteConfirmation {
|
|
348
|
+
title: string;
|
|
349
|
+
description: (count: number) => string;
|
|
350
|
+
cancel: string;
|
|
351
|
+
confirm: string;
|
|
352
|
+
}
|
|
344
353
|
interface AutoTableActionBarProps<TData> {
|
|
345
354
|
table: Table<TData>;
|
|
346
355
|
onDeleteSelected?: (rows: TData[]) => void;
|
|
@@ -358,6 +367,8 @@ interface AutoTableActionBarProps<TData> {
|
|
|
358
367
|
extraActions?: React$1.ReactNode;
|
|
359
368
|
/** 批量操作配置,支持和行操作/顶部工具栏一致的顺序接管语义 */
|
|
360
369
|
actions?: BatchActionConfig<TData>;
|
|
370
|
+
/** 批量删除二次确认文案 */
|
|
371
|
+
deleteConfirmation?: BatchDeleteConfirmation;
|
|
361
372
|
}
|
|
362
373
|
declare function AutoTableActionBar<TData>({
|
|
363
374
|
table,
|
|
@@ -368,8 +379,9 @@ declare function AutoTableActionBar<TData>({
|
|
|
368
379
|
showDefaultExport,
|
|
369
380
|
enableDelete,
|
|
370
381
|
extraActions,
|
|
371
|
-
actions
|
|
372
|
-
|
|
382
|
+
actions,
|
|
383
|
+
deleteConfirmation
|
|
384
|
+
}: AutoTableActionBarProps<TData>): react_jsx_runtime0.JSX.Element;
|
|
373
385
|
//#endregion
|
|
374
386
|
//#region src/lib/schema-bridge/types.d.ts
|
|
375
387
|
/**
|
|
@@ -507,6 +519,8 @@ interface AutoTableProps<T extends z.ZodObject<z.ZodRawShape>> {
|
|
|
507
519
|
actionBarExtra?: React.ReactNode;
|
|
508
520
|
/** 批量悬浮操作配置 */
|
|
509
521
|
actionBarActions?: BatchActionConfig<z.infer<T>>;
|
|
522
|
+
/** 批量删除二次确认文案 */
|
|
523
|
+
deleteConfirmation?: BatchDeleteConfirmation;
|
|
510
524
|
/** 初始排序 */
|
|
511
525
|
initialSorting?: any[];
|
|
512
526
|
/** 是否启用导出功能 (默认 true) */
|
|
@@ -536,13 +550,14 @@ declare function AutoTable<T extends z.ZodObject<z.ZodRawShape>>({
|
|
|
536
550
|
batchUpdateFields,
|
|
537
551
|
actionBarExtra,
|
|
538
552
|
actionBarActions,
|
|
553
|
+
deleteConfirmation,
|
|
539
554
|
initialSorting,
|
|
540
555
|
enableExport,
|
|
541
556
|
showDefaultExport,
|
|
542
557
|
onSelectedCountChange,
|
|
543
558
|
onSelectedRowsChange,
|
|
544
559
|
getSelectedRows
|
|
545
|
-
}: AutoTableProps<T>):
|
|
560
|
+
}: AutoTableProps<T>): react_jsx_runtime0.JSX.Element;
|
|
546
561
|
//#endregion
|
|
547
562
|
//#region src/i18n/locale.d.ts
|
|
548
563
|
/**
|
|
@@ -557,6 +572,7 @@ declare function AutoTable<T extends z.ZodObject<z.ZodRawShape>>({
|
|
|
557
572
|
*/
|
|
558
573
|
interface AutoCrudLocale {
|
|
559
574
|
toolbar: {
|
|
575
|
+
refresh: string;
|
|
560
576
|
create: string;
|
|
561
577
|
import: string;
|
|
562
578
|
export: string;
|
|
@@ -590,6 +606,12 @@ interface AutoCrudLocale {
|
|
|
590
606
|
confirm: string;
|
|
591
607
|
confirming: string;
|
|
592
608
|
};
|
|
609
|
+
bulkDeleteModal: {
|
|
610
|
+
title: string;
|
|
611
|
+
description: (count: number) => string;
|
|
612
|
+
cancel: string;
|
|
613
|
+
confirm: string;
|
|
614
|
+
};
|
|
593
615
|
importDialog: {
|
|
594
616
|
title: string;
|
|
595
617
|
uploadDescription: string;
|
|
@@ -650,11 +672,14 @@ type AutoCrudOption = {
|
|
|
650
672
|
};
|
|
651
673
|
type AutoCrudDataSourceContext = {
|
|
652
674
|
field: string;
|
|
675
|
+
page?: number;
|
|
676
|
+
pageSize?: number;
|
|
653
677
|
search?: string;
|
|
654
678
|
values?: Record<string, unknown>;
|
|
655
679
|
signal?: AbortSignal;
|
|
656
680
|
};
|
|
657
681
|
type AutoCrudDataSourceResult = AutoCrudOption[] | {
|
|
682
|
+
hasMore?: boolean;
|
|
658
683
|
options?: AutoCrudOption[];
|
|
659
684
|
};
|
|
660
685
|
type AutoCrudDataSourceLoader = (context: AutoCrudDataSourceContext) => AutoCrudDataSourceResult | Promise<AutoCrudDataSourceResult>;
|
|
@@ -662,11 +687,19 @@ type AutoCrudDataSourceConfig = string;
|
|
|
662
687
|
type AutoCrudDataSourceRegistration = AutoCrudDataSourceLoader | {
|
|
663
688
|
dependencies?: string[];
|
|
664
689
|
reset?: boolean;
|
|
690
|
+
search?: boolean;
|
|
691
|
+
debounceMs?: number;
|
|
692
|
+
loadMore?: boolean;
|
|
693
|
+
pageSize?: number;
|
|
665
694
|
load: AutoCrudDataSourceLoader;
|
|
666
695
|
};
|
|
667
696
|
type AutoCrudDataSourceEntry = {
|
|
668
697
|
dependencies: string[];
|
|
669
698
|
reset: boolean;
|
|
699
|
+
search: boolean;
|
|
700
|
+
debounceMs: number;
|
|
701
|
+
loadMore: boolean;
|
|
702
|
+
pageSize: number;
|
|
670
703
|
load: AutoCrudDataSourceLoader;
|
|
671
704
|
};
|
|
672
705
|
type RegistryListener$1 = () => void;
|
|
@@ -839,8 +872,9 @@ type AutoCrudActionConfig<T> = RowActionConfig<T> | AutoCrudActionsConfig<T>;
|
|
|
839
872
|
/**
|
|
840
873
|
* 顶部工具栏内置操作项
|
|
841
874
|
*/
|
|
875
|
+
type ToolbarBuiltinActionType = 'refresh' | 'create' | 'import' | 'export';
|
|
842
876
|
type ToolbarBuiltinActionItem = ActionMeta & {
|
|
843
|
-
type:
|
|
877
|
+
type: ToolbarBuiltinActionType;
|
|
844
878
|
/** 替代默认的行为 */
|
|
845
879
|
onClick?: () => void;
|
|
846
880
|
/** 替代默认的标签文本 */
|
|
@@ -866,6 +900,8 @@ interface AutoCrudToolbarContext {
|
|
|
866
900
|
rowIds: string[];
|
|
867
901
|
selectedRowIds: string[];
|
|
868
902
|
selectedCount: number;
|
|
903
|
+
refresh?: () => Promise<unknown>;
|
|
904
|
+
isRefreshing: boolean;
|
|
869
905
|
openCreate?: () => void;
|
|
870
906
|
}
|
|
871
907
|
type AutoCrudToolbarResolver = (targetId: string, ownerActions: readonly ToolbarActionItem[], context: AutoCrudToolbarContext) => ToolbarActionItem[];
|
|
@@ -925,6 +961,8 @@ interface AutoCrudTableProps<TSchema extends z.ZodObject<z.ZodRawShape>> {
|
|
|
925
961
|
form?: {
|
|
926
962
|
/** 表单覆盖配置(兼容旧 API,优先级低于 fieldOverrides) */
|
|
927
963
|
overrides?: Record<string, any>;
|
|
964
|
+
/** Formily schema expression/reaction scope */
|
|
965
|
+
scope?: JsonSchemaFormScope;
|
|
928
966
|
/** 表单列数 */
|
|
929
967
|
columns?: number;
|
|
930
968
|
/** 弹窗自定义容器类名(支持控制大小、最大高度等) */
|
|
@@ -999,14 +1037,19 @@ declare function AutoCrudTable<TSchema extends z.ZodObject<z.ZodRawShape>>({
|
|
|
999
1037
|
toolbarActions,
|
|
1000
1038
|
locale: localeProp,
|
|
1001
1039
|
onCreate
|
|
1002
|
-
}: AutoCrudTableProps<TSchema>):
|
|
1040
|
+
}: AutoCrudTableProps<TSchema>): react_jsx_runtime0.JSX.Element;
|
|
1003
1041
|
//#endregion
|
|
1004
1042
|
//#region src/components/auto-crud/auto-form.d.ts
|
|
1005
1043
|
interface AutoFormProps<T extends z.ZodObject<z.ZodRawShape>> {
|
|
1006
1044
|
schema: T;
|
|
1007
1045
|
initialValues?: Partial<z.infer<T>>;
|
|
1008
1046
|
onSubmit: (values: z.infer<T>) => void | Promise<void>;
|
|
1047
|
+
/** 统一字段配置,推荐用于描述 auto-crud 字段级表单行为 */
|
|
1048
|
+
fields?: Fields;
|
|
1049
|
+
/** Formily 字段 schema 覆盖配置,保留兼容旧 API */
|
|
1009
1050
|
overrides?: FormSchemaOverrides;
|
|
1051
|
+
/** Formily schema expression/reaction scope */
|
|
1052
|
+
scope?: JsonSchemaFormScope;
|
|
1010
1053
|
mode?: 'create' | 'edit';
|
|
1011
1054
|
loading?: boolean;
|
|
1012
1055
|
gridColumns?: number;
|
|
@@ -1024,14 +1067,16 @@ declare function AutoFormInner<T extends z.ZodObject<z.ZodRawShape>>({
|
|
|
1024
1067
|
schema: zodSchema,
|
|
1025
1068
|
initialValues,
|
|
1026
1069
|
onSubmit,
|
|
1070
|
+
fields,
|
|
1027
1071
|
overrides,
|
|
1072
|
+
scope: scopeProp,
|
|
1028
1073
|
mode,
|
|
1029
1074
|
loading,
|
|
1030
1075
|
gridColumns,
|
|
1031
1076
|
labelAlign,
|
|
1032
1077
|
labelWidth,
|
|
1033
1078
|
showSubmitButton
|
|
1034
|
-
}: AutoFormProps<T>, ref: React.Ref<AutoFormRef>):
|
|
1079
|
+
}: AutoFormProps<T>, ref: React.Ref<AutoFormRef>): react_jsx_runtime0.JSX.Element;
|
|
1035
1080
|
declare const AutoForm: <T extends z.ZodObject<z.ZodRawShape>>(props: AutoFormProps<T> & {
|
|
1036
1081
|
ref?: React.Ref<AutoFormRef>;
|
|
1037
1082
|
}) => ReturnType<typeof AutoFormInner>;
|
|
@@ -1289,6 +1334,20 @@ declare module '@tanstack/react-table' {
|
|
|
1289
1334
|
icon?: React.FC<React.SVGProps<SVGSVGElement>>;
|
|
1290
1335
|
/** 控制在哪些筛选模式下显示(未设置则在所有模式显示) */
|
|
1291
1336
|
modes?: Array<'simple' | 'advanced' | 'command'>;
|
|
1337
|
+
/** 内部:远程筛选选项搜索值 */
|
|
1338
|
+
autoCrudFilterSearchValue?: string;
|
|
1339
|
+
/** 内部:远程筛选选项搜索回调 */
|
|
1340
|
+
autoCrudFilterOnSearch?: (value: string) => void;
|
|
1341
|
+
/** 内部:是否启用本地选项过滤 */
|
|
1342
|
+
autoCrudFilterShouldFilter?: boolean;
|
|
1343
|
+
/** 内部:远程筛选当前弹窗选项,和稳定标签缓存分离 */
|
|
1344
|
+
autoCrudFilterOptions?: Option[];
|
|
1345
|
+
/** 内部:远程筛选是否还有更多选项 */
|
|
1346
|
+
autoCrudFilterHasMore?: boolean;
|
|
1347
|
+
/** 内部:远程筛选是否正在加载 */
|
|
1348
|
+
autoCrudFilterLoading?: boolean;
|
|
1349
|
+
/** 内部:远程筛选弹窗滚动回调 */
|
|
1350
|
+
autoCrudFilterOnPopupScroll?: React.UIEventHandler<HTMLElement>;
|
|
1292
1351
|
}
|
|
1293
1352
|
}
|
|
1294
1353
|
interface QueryKeys {
|
|
@@ -1333,7 +1392,7 @@ declare function AutoTableSimpleFilters<TData>({
|
|
|
1333
1392
|
filters: externalFilters,
|
|
1334
1393
|
onFiltersChange,
|
|
1335
1394
|
leading
|
|
1336
|
-
}: AutoTableSimpleFiltersProps<TData>):
|
|
1395
|
+
}: AutoTableSimpleFiltersProps<TData>): react_jsx_runtime0.JSX.Element | null;
|
|
1337
1396
|
//#endregion
|
|
1338
1397
|
//#region src/components/auto-crud/form-modal.d.ts
|
|
1339
1398
|
type ModalVariant = "dialog" | "sheet";
|
|
@@ -1342,18 +1401,19 @@ type ModalVariant = "dialog" | "sheet";
|
|
|
1342
1401
|
interface CrudFormModalProps<T extends z.ZodObject<z.ZodRawShape>> {
|
|
1343
1402
|
open: boolean;
|
|
1344
1403
|
onOpenChange: (open: boolean) => void;
|
|
1345
|
-
mode:
|
|
1404
|
+
mode: 'create' | 'edit';
|
|
1346
1405
|
schema: T;
|
|
1347
1406
|
initialValues?: Partial<z.infer<T>>;
|
|
1348
1407
|
onSubmit: (values: z.infer<T>) => void | Promise<void>;
|
|
1349
1408
|
loading?: boolean;
|
|
1350
1409
|
variant?: ModalVariant;
|
|
1351
1410
|
overrides?: FormSchemaOverrides;
|
|
1411
|
+
scope?: JsonSchemaFormScope;
|
|
1352
1412
|
title?: string;
|
|
1353
|
-
locale?: AutoCrudLocale[
|
|
1413
|
+
locale?: AutoCrudLocale['formModal'];
|
|
1354
1414
|
gridColumns?: number;
|
|
1355
1415
|
/** Label 对齐方式 */
|
|
1356
|
-
labelAlign?:
|
|
1416
|
+
labelAlign?: 'left' | 'top' | 'right';
|
|
1357
1417
|
/** Label 宽度(labelAlign 为 left 时有效) */
|
|
1358
1418
|
labelWidth?: number | string;
|
|
1359
1419
|
/** 弹窗自定义样式 */
|
|
@@ -1369,13 +1429,14 @@ declare function CrudFormModal<T extends z.ZodObject<z.ZodRawShape>>({
|
|
|
1369
1429
|
loading,
|
|
1370
1430
|
variant,
|
|
1371
1431
|
overrides,
|
|
1432
|
+
scope,
|
|
1372
1433
|
title,
|
|
1373
1434
|
locale,
|
|
1374
1435
|
gridColumns,
|
|
1375
1436
|
labelAlign,
|
|
1376
1437
|
labelWidth,
|
|
1377
1438
|
className
|
|
1378
|
-
}: CrudFormModalProps<T>):
|
|
1439
|
+
}: CrudFormModalProps<T>): react_jsx_runtime0.JSX.Element;
|
|
1379
1440
|
//#endregion
|
|
1380
1441
|
//#region src/components/auto-crud/import-dialog.d.ts
|
|
1381
1442
|
interface ImportDialogProps {
|
|
@@ -1388,7 +1449,7 @@ interface ImportDialogProps {
|
|
|
1388
1449
|
/** 对话框标题(优先于 locale.title) */
|
|
1389
1450
|
title?: string;
|
|
1390
1451
|
/** 语言包,默认 zh-CN */
|
|
1391
|
-
locale?: AutoCrudLocale[
|
|
1452
|
+
locale?: AutoCrudLocale['importDialog'];
|
|
1392
1453
|
}
|
|
1393
1454
|
declare function ImportDialog({
|
|
1394
1455
|
open,
|
|
@@ -1397,7 +1458,7 @@ declare function ImportDialog({
|
|
|
1397
1458
|
columns,
|
|
1398
1459
|
title,
|
|
1399
1460
|
locale
|
|
1400
|
-
}: ImportDialogProps):
|
|
1461
|
+
}: ImportDialogProps): react_jsx_runtime0.JSX.Element;
|
|
1401
1462
|
//#endregion
|
|
1402
1463
|
//#region src/components/auto-crud/export-dialog.d.ts
|
|
1403
1464
|
type ExportMode = "selected" | "filtered";
|
|
@@ -1417,7 +1478,7 @@ declare function ExportDialog({
|
|
|
1417
1478
|
selectedCount,
|
|
1418
1479
|
onExport,
|
|
1419
1480
|
canExportFiltered
|
|
1420
|
-
}: ExportDialogProps):
|
|
1481
|
+
}: ExportDialogProps): react_jsx_runtime0.JSX.Element;
|
|
1421
1482
|
//#endregion
|
|
1422
1483
|
//#region src/components/data-table/data-table.d.ts
|
|
1423
1484
|
interface DataTableProps<TData> extends React$1.ComponentProps<"div"> {
|
|
@@ -1430,7 +1491,7 @@ declare function DataTable<TData>({
|
|
|
1430
1491
|
children,
|
|
1431
1492
|
className,
|
|
1432
1493
|
...props
|
|
1433
|
-
}: DataTableProps<TData>):
|
|
1494
|
+
}: DataTableProps<TData>): react_jsx_runtime0.JSX.Element;
|
|
1434
1495
|
//#endregion
|
|
1435
1496
|
//#region src/components/data-table/data-table-advanced-toolbar.d.ts
|
|
1436
1497
|
interface DataTableAdvancedToolbarProps<TData> extends React$1.ComponentProps<"div"> {
|
|
@@ -1441,7 +1502,7 @@ declare function DataTableAdvancedToolbar<TData>({
|
|
|
1441
1502
|
children,
|
|
1442
1503
|
className,
|
|
1443
1504
|
...props
|
|
1444
|
-
}: DataTableAdvancedToolbarProps<TData>):
|
|
1505
|
+
}: DataTableAdvancedToolbarProps<TData>): react_jsx_runtime0.JSX.Element;
|
|
1445
1506
|
//#endregion
|
|
1446
1507
|
//#region src/components/data-table/data-table-column-header.d.ts
|
|
1447
1508
|
interface DataTableColumnHeaderProps<TData, TValue> extends React.ComponentProps<typeof DropdownMenuTrigger> {
|
|
@@ -1453,7 +1514,7 @@ declare function DataTableColumnHeader<TData, TValue>({
|
|
|
1453
1514
|
label,
|
|
1454
1515
|
className,
|
|
1455
1516
|
...props
|
|
1456
|
-
}: DataTableColumnHeaderProps<TData, TValue>):
|
|
1517
|
+
}: DataTableColumnHeaderProps<TData, TValue>): react_jsx_runtime0.JSX.Element;
|
|
1457
1518
|
//#endregion
|
|
1458
1519
|
//#region src/components/data-table/data-table-faceted-filter.d.ts
|
|
1459
1520
|
interface DataTableFacetedFilterProps<TData, TValue> {
|
|
@@ -1467,7 +1528,7 @@ declare function DataTableFacetedFilter<TData, TValue>({
|
|
|
1467
1528
|
title,
|
|
1468
1529
|
options,
|
|
1469
1530
|
multiple
|
|
1470
|
-
}: DataTableFacetedFilterProps<TData, TValue>):
|
|
1531
|
+
}: DataTableFacetedFilterProps<TData, TValue>): react_jsx_runtime0.JSX.Element;
|
|
1471
1532
|
//#endregion
|
|
1472
1533
|
//#region src/components/data-table/data-table-pagination.d.ts
|
|
1473
1534
|
interface DataTablePaginationProps<TData> extends React.ComponentProps<"div"> {
|
|
@@ -1479,7 +1540,7 @@ declare function DataTablePagination<TData>({
|
|
|
1479
1540
|
pageSizeOptions,
|
|
1480
1541
|
className,
|
|
1481
1542
|
...props
|
|
1482
|
-
}: DataTablePaginationProps<TData>):
|
|
1543
|
+
}: DataTablePaginationProps<TData>): react_jsx_runtime0.JSX.Element;
|
|
1483
1544
|
//#endregion
|
|
1484
1545
|
//#region src/components/data-table/data-table-toolbar.d.ts
|
|
1485
1546
|
interface DataTableToolbarProps<TData> extends React$1.ComponentProps<"div"> {
|
|
@@ -1490,7 +1551,7 @@ declare function DataTableToolbar<TData>({
|
|
|
1490
1551
|
children,
|
|
1491
1552
|
className,
|
|
1492
1553
|
...props
|
|
1493
|
-
}: DataTableToolbarProps<TData>):
|
|
1554
|
+
}: DataTableToolbarProps<TData>): react_jsx_runtime0.JSX.Element;
|
|
1494
1555
|
//#endregion
|
|
1495
1556
|
//#region src/components/data-table/data-table-view-options.d.ts
|
|
1496
1557
|
interface DataTableViewOptionsProps<TData> extends React$1.ComponentProps<typeof PopoverContent> {
|
|
@@ -1501,48 +1562,7 @@ declare function DataTableViewOptions<TData>({
|
|
|
1501
1562
|
table,
|
|
1502
1563
|
disabled,
|
|
1503
1564
|
...props
|
|
1504
|
-
}: DataTableViewOptionsProps<TData>):
|
|
1505
|
-
//#endregion
|
|
1506
|
-
//#region src/components/ui/multi-combobox.d.ts
|
|
1507
|
-
interface MultiComboboxOption {
|
|
1508
|
-
value: string;
|
|
1509
|
-
label: ReactNode;
|
|
1510
|
-
searchText?: string | string[];
|
|
1511
|
-
keywords?: string[];
|
|
1512
|
-
count?: number;
|
|
1513
|
-
disabled?: boolean;
|
|
1514
|
-
icon?: React$1.ComponentType<{
|
|
1515
|
-
className?: string;
|
|
1516
|
-
}>;
|
|
1517
|
-
}
|
|
1518
|
-
interface MultiComboboxTriggerRenderProps {
|
|
1519
|
-
open: boolean;
|
|
1520
|
-
selectedOptions: MultiComboboxOption[];
|
|
1521
|
-
selectedValues: string[];
|
|
1522
|
-
clearSelection: (event?: React$1.MouseEvent) => void;
|
|
1523
|
-
disabled?: boolean;
|
|
1524
|
-
readOnly?: boolean;
|
|
1525
|
-
}
|
|
1526
|
-
interface MultiComboboxProps extends Omit<ComponentProps<typeof Command>, 'value' | 'defaultValue' | 'onChange' | 'onValueChange'> {
|
|
1527
|
-
value?: string[];
|
|
1528
|
-
defaultValue?: string[];
|
|
1529
|
-
onChange?: (value: string[]) => void;
|
|
1530
|
-
options?: MultiComboboxOption[];
|
|
1531
|
-
placeholder?: string;
|
|
1532
|
-
searchPlaceholder?: string;
|
|
1533
|
-
emptyText?: string;
|
|
1534
|
-
clearText?: string;
|
|
1535
|
-
selectedText?: string;
|
|
1536
|
-
selectionMode?: 'single' | 'multiple';
|
|
1537
|
-
disabled?: boolean;
|
|
1538
|
-
readOnly?: boolean;
|
|
1539
|
-
className?: string;
|
|
1540
|
-
contentClassName?: string;
|
|
1541
|
-
triggerClassName?: string;
|
|
1542
|
-
matchTriggerWidth?: boolean;
|
|
1543
|
-
renderTrigger?: (props: MultiComboboxTriggerRenderProps) => ReactNode;
|
|
1544
|
-
}
|
|
1545
|
-
declare const MultiCombobox: React$1.FC<MultiComboboxProps>;
|
|
1565
|
+
}: DataTableViewOptionsProps<TData>): react_jsx_runtime0.JSX.Element;
|
|
1546
1566
|
//#endregion
|
|
1547
1567
|
//#region src/lib/crud-actions.d.ts
|
|
1548
1568
|
type CrudActionZone = 'toolbar' | 'row' | 'batch';
|
|
@@ -1917,4 +1937,4 @@ declare function exportAllToCSV<T extends Record<string, unknown>>(data: T[], op
|
|
|
1917
1937
|
*/
|
|
1918
1938
|
declare function downloadCSVTemplate(headers: string[], filename?: string): void;
|
|
1919
1939
|
//#endregion
|
|
1920
|
-
export { type ActionConfig, type ActionItem, type ActionsColumnConfig, type AutoCrudActionConfig, type AutoCrudActionsConfig, type AutoCrudDataSourceConfig, type AutoCrudDataSourceContext, type AutoCrudDataSourceEntry, type AutoCrudDataSourceLoader, type AutoCrudDataSourceRegistration, type AutoCrudFormComponentConfig, type AutoCrudLocale, type AutoCrudOption, type AutoCrudRowActionContext, AutoCrudTable, type AutoCrudTableProps, type AutoCrudToolbarContext, type AutoCrudToolbarResolver, AutoForm, type AutoQueryParams, AutoTable, AutoTableActionBar, AutoTableSimpleFilters, type BatchActionConfig, type BatchActionContext, type BatchActionItem, type BatchBuiltinActionItem, type BatchBuiltinActionType, type BatchCustomActionItem, type BatchUpdateField, type ColumnOverrides, type CreateFormSchemaOptions, type CreateTableSchemaOptions, type CrudActionBase, type CrudActionEntry, type CrudActionRegistration, type CrudActionZone, 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 FieldOption, 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, MultiCombobox, type MultiComboboxOption, type MultiComboboxProps, type MultiComboboxTriggerRenderProps, Option, type ParsedImportData, type ParsedZodField, type Parser, QueryKeys, type RowActionConfig, type RowActionItem, type RowBuiltinActionItem, type RowBuiltinActionType, type RowCustomActionItem, SchemaAdapter, type SimpleFieldConfig, type SimpleFieldsConfig, type ToastAdapter, type ToolbarActionConfig, type ToolbarActionItem, type ToolbarBuiltinActionItem, type ToolbarCustomActionItem, type UnifiedField, type UnifiedSchema, type UrlStateOptions, type UseAutoCrudResourceOptions, type UseAutoCrudResourceParams, type UseAutoCrudResourceReturn, cn, coerceRowValues, components, createActionsColumn, createEditFormSchema, createFormSchema, createMemoryDataSource, createSelectColumn, createTRPCDataSource, createTableSchema, crudActions, dataSources, dataToCSV, deDE, downloadCSVTemplate, enUS, esES, exportAllToCSV, exportTableToCSV, formComponents, formatDate, frFR, generateCSVTemplate, getUrlParams, humanize, jaJP, koKR, noopToastAdapter, normalizeDataSourceConfig, normalizeOptions, parseAsArrayOf, parseAsInteger, parseAsString, parseAsStringEnum, parseCSV, parseImportFile, parseJSON, parseZodField, resolveLocale, setSearchParams, setToolbarResolver, useAutoCrudResource, useDataTable, useQueryState, useQueryStates, useReadableFilters, useUrlState, useUrlStates, zhCN };
|
|
1940
|
+
export { type ActionConfig, type ActionItem, type ActionsColumnConfig, type AutoCrudActionConfig, type AutoCrudActionsConfig, type AutoCrudDataSourceConfig, type AutoCrudDataSourceContext, type AutoCrudDataSourceEntry, type AutoCrudDataSourceLoader, type AutoCrudDataSourceRegistration, type AutoCrudFormComponentConfig, type AutoCrudLocale, type AutoCrudOption, type AutoCrudRowActionContext, AutoCrudTable, type AutoCrudTableProps, type AutoCrudToolbarContext, type AutoCrudToolbarResolver, AutoForm, type AutoFormProps, type AutoQueryParams, AutoTable, AutoTableActionBar, AutoTableSimpleFilters, type BatchActionConfig, type BatchActionContext, type BatchActionItem, type BatchBuiltinActionItem, type BatchBuiltinActionType, type BatchCustomActionItem, type BatchUpdateField, type ColumnOverrides, type CreateFormSchemaOptions, type CreateTableSchemaOptions, type CrudActionBase, type CrudActionEntry, type CrudActionRegistration, type CrudActionZone, 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 FieldOption, 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, MultiCombobox, type MultiComboboxOption, type MultiComboboxProps, type MultiComboboxTriggerRenderProps, Option, type ParsedImportData, type ParsedZodField, type Parser, QueryKeys, type RowActionConfig, type RowActionItem, type RowBuiltinActionItem, type RowBuiltinActionType, type RowCustomActionItem, SchemaAdapter, Select, type SelectMode, type SelectOption, type SelectProps, type SelectSearchableDynamicProps, type SelectSearchableMultipleProps, type SelectSearchableProps, type SelectSearchableSingleProps, type SelectSimpleProps, type SelectTriggerRenderProps, type SimpleFieldConfig, type SimpleFieldsConfig, type ToastAdapter, type ToolbarActionConfig, type ToolbarActionItem, type ToolbarBuiltinActionItem, type ToolbarBuiltinActionType, type ToolbarCustomActionItem, type UnifiedField, type UnifiedSchema, type UrlStateOptions, type UseAutoCrudResourceOptions, type UseAutoCrudResourceParams, type UseAutoCrudResourceReturn, cn, coerceRowValues, components, createActionsColumn, createEditFormSchema, createFormSchema, createMemoryDataSource, createSelectColumn, createTRPCDataSource, createTableSchema, crudActions, dataSources, dataToCSV, deDE, downloadCSVTemplate, enUS, esES, exportAllToCSV, exportTableToCSV, formComponents, formatDate, frFR, generateCSVTemplate, getUrlParams, humanize, jaJP, koKR, noopToastAdapter, normalizeDataSourceConfig, normalizeOptions, parseAsArrayOf, parseAsInteger, parseAsString, parseAsStringEnum, parseCSV, parseImportFile, parseJSON, parseZodField, resolveLocale, setSearchParams, setToolbarResolver, useAutoCrudResource, useDataTable, useQueryState, useQueryStates, useReadableFilters, useUrlState, useUrlStates, zhCN };
|