@robot-admin/naive-ui-components 0.16.0 → 0.17.1
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/CHANGELOG.md +39 -0
- package/README.md +12 -9
- package/README_EN.md +12 -9
- package/dist/C_ActionBar.css +56 -48
- package/dist/C_ActionBar2.cjs +1 -1
- package/dist/C_ActionBar2.js +1 -1
- package/dist/C_AntV2.cjs +1 -1
- package/dist/C_AntV2.js +3 -3
- package/dist/C_Barcode.css +6 -6
- package/dist/C_Barcode2.cjs +1 -1
- package/dist/C_Barcode2.js +1 -1
- package/dist/C_Chat.css +269 -185
- package/dist/C_Chat2.cjs +1 -1
- package/dist/C_Chat2.js +1 -1
- package/dist/C_Code.css +26 -26
- package/dist/C_Code2.cjs +1 -1
- package/dist/C_Code2.js +1 -1
- package/dist/C_Draggable2.cjs +1 -1
- package/dist/C_Draggable2.js +1 -1
- package/dist/C_FilePreview.css +96 -57
- package/dist/C_FilePreview2.cjs +1 -1
- package/dist/C_FilePreview2.js +1 -1
- package/dist/C_Form.base.css +295 -277
- package/dist/C_Form.css +295 -277
- package/dist/C_Form.d.cts +2 -1
- package/dist/C_Form.d.ts +2 -1
- package/dist/C_FormModal.css +10 -10
- package/dist/C_FormModal2.cjs +1 -1
- package/dist/C_FormModal2.js +1 -1
- package/dist/C_FormSearch.css +67 -68
- package/dist/C_FormSearch.d.cts +2 -1
- package/dist/C_FormSearch.d.ts +2 -1
- package/dist/C_FormSearch2.cjs +1 -1
- package/dist/C_FormSearch2.js +1 -1
- package/dist/C_FullCalendar2.cjs +1 -1
- package/dist/C_FullCalendar2.js +1 -1
- package/dist/C_GlobalSearch.css +140 -118
- package/dist/C_GlobalSearch2.cjs +1 -1
- package/dist/C_GlobalSearch2.js +1 -1
- package/dist/C_ImageCropper.css +12 -10
- package/dist/C_ImageCropper2.cjs +1 -1
- package/dist/C_ImageCropper2.js +1 -1
- package/dist/C_Login.css +79 -79
- package/dist/C_Login2.cjs +1 -1
- package/dist/C_Login2.js +1 -1
- package/dist/C_Map.css +10 -10
- package/dist/C_Map2.cjs +1 -1
- package/dist/C_Map2.js +1 -1
- package/dist/C_OrgChart.css +28 -4
- package/dist/C_OrgChart2.cjs +1 -1
- package/dist/C_OrgChart2.js +1 -1
- package/dist/C_QRCode2.cjs +1 -1
- package/dist/C_QRCode2.js +1 -1
- package/dist/C_Signature.css +15 -15
- package/dist/C_Signature2.cjs +1 -1
- package/dist/C_Signature2.js +1 -1
- package/dist/C_SplitPane.cjs +1 -1
- package/dist/C_SplitPane.css +251 -109
- package/dist/C_SplitPane.js +1 -1
- package/dist/C_SplitPane2.cjs +1 -1
- package/dist/C_SplitPane2.js +1 -1
- package/dist/C_Table.base.css +491 -563
- package/dist/C_Table.cjs +1 -1
- package/dist/C_Table.css +491 -563
- package/dist/C_Table.d.cts +3 -2
- package/dist/C_Table.d.ts +4 -2
- package/dist/C_Table.js +1 -1
- package/dist/C_TagsView2.cjs +1 -1
- package/dist/C_TagsView2.js +1 -1
- package/dist/C_Transfer.css +93 -84
- package/dist/C_Transfer2.cjs +1 -1
- package/dist/C_Transfer2.js +1 -1
- package/dist/C_Tree.css +72 -125
- package/dist/C_Tree.d.cts +3 -2
- package/dist/C_Tree.d.ts +15 -2
- package/dist/C_Tree2.cjs +1 -1
- package/dist/C_Tree2.js +1 -1
- package/dist/C_Upload.css +5 -5
- package/dist/C_Upload2.cjs +1 -1
- package/dist/C_Upload2.js +1 -1
- package/dist/C_VideoPlayer2.cjs +4 -3
- package/dist/C_VideoPlayer2.js +4 -3
- package/dist/C_VtableGantt.css +29 -28
- package/dist/C_VtableGantt2.cjs +1 -1
- package/dist/C_VtableGantt2.js +1 -1
- package/dist/C_WaterFall.css +29 -29
- package/dist/C_WaterFall2.cjs +1 -1
- package/dist/C_WaterFall2.js +1 -1
- package/dist/C_WorkFlow2.cjs +1 -1
- package/dist/C_WorkFlow2.js +1 -1
- package/dist/Card.cjs +1 -1
- package/dist/Card.js +1 -1
- package/dist/Custom.cjs +1 -1
- package/dist/Custom.js +1 -1
- package/dist/Dynamic.cjs +1 -1
- package/dist/Dynamic.js +1 -1
- package/dist/Steps.cjs +1 -1
- package/dist/Steps.js +1 -1
- package/dist/Tabs.cjs +1 -1
- package/dist/Tabs.js +1 -1
- package/dist/constants.d.cts +2 -2
- package/dist/constants.d.ts +2 -2
- package/dist/constants2.d.cts +2 -2
- package/dist/constants2.d.ts +2 -2
- package/dist/constants3.d.cts +2 -2
- package/dist/constants3.d.ts +2 -2
- package/dist/constants4.d.cts +4 -4
- package/dist/constants4.d.ts +4 -4
- package/dist/constants5.d.cts +3 -7
- package/dist/constants5.d.ts +3 -7
- package/dist/data.d.cts +10 -10
- package/dist/data.d.ts +10 -10
- package/dist/density.cjs +1 -0
- package/dist/density.d.cts +15 -0
- package/dist/density.d.ts +15 -0
- package/dist/density.js +1 -0
- package/dist/helpers.cjs +1 -1
- package/dist/helpers.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +1 -1
- package/dist/index.vue.d.cts +5 -5
- package/dist/index.vue.d.ts +5 -5
- package/dist/index10.vue.d.cts +5 -5
- package/dist/index10.vue.d.ts +3 -3
- package/dist/index11.vue.d.cts +3 -3
- package/dist/index11.vue.d.ts +5 -5
- package/dist/index12.vue.d.cts +5 -5
- package/dist/index13.vue.d.ts +5 -5
- package/dist/index14.vue.d.cts +5 -5
- package/dist/index14.vue.d.ts +9 -9
- package/dist/index15.vue.d.cts +9 -9
- package/dist/index15.vue.d.ts +3 -3
- package/dist/index16.vue.d.cts +3 -3
- package/dist/index17.vue.d.ts +1 -1
- package/dist/index18.vue.d.cts +1 -1
- package/dist/index18.vue.d.ts +7 -7
- package/dist/index19.vue.d.cts +7 -7
- package/dist/index19.vue.d.ts +5 -5
- package/dist/index2.vue.d.cts +2 -2
- package/dist/index2.vue.d.ts +2 -2
- package/dist/index20.vue.d.cts +6 -2
- package/dist/index20.vue.d.ts +6 -2
- package/dist/index21.vue.d.cts +2 -2
- package/dist/index21.vue.d.ts +2 -2
- package/dist/index22.vue.d.cts +2 -2
- package/dist/index22.vue.d.ts +2 -2
- package/dist/index23.vue.d.cts +2 -2
- package/dist/index23.vue.d.ts +2 -2
- package/dist/index25.vue.d.cts +5 -5
- package/dist/index25.vue.d.ts +5 -5
- package/dist/index27.vue.d.cts +2 -2
- package/dist/index27.vue.d.ts +2 -2
- package/dist/index28.vue.d.cts +7 -3
- package/dist/index28.vue.d.ts +7 -3
- package/dist/index3.vue.d.cts +3 -3
- package/dist/index3.vue.d.ts +3 -3
- package/dist/index4.vue.d.cts +5 -5
- package/dist/index5.vue.d.ts +2 -2
- package/dist/index6.vue.d.cts +2 -2
- package/dist/index6.vue.d.ts +7 -4
- package/dist/index7.vue.d.cts +7 -4
- package/dist/index7.vue.d.ts +2 -2
- package/dist/index8.vue.d.cts +2 -2
- package/dist/index8.vue.d.ts +4 -6
- package/dist/index9.vue.d.cts +4 -6
- package/dist/index9.vue.d.ts +5 -5
- package/dist/mapUtils.d.cts +4 -4
- package/dist/mapUtils.d.ts +4 -4
- package/dist/presets.d.cts +4 -1
- package/dist/presets.d.ts +4 -1
- package/dist/style.css +1763 -1566
- package/dist/useCalendarEvents.d.cts +10 -9
- package/dist/useCalendarEvents.d.ts +10 -9
- package/dist/useCollapsePanel.d.cts +3 -3
- package/dist/useCollapsePanel.d.ts +3 -3
- package/dist/useCropperCore.d.cts +9 -9
- package/dist/useCropperCore.d.ts +9 -9
- package/dist/useDraggableLayout.d.cts +15 -13
- package/dist/useDraggableLayout.d.ts +15 -13
- package/dist/useDynamicFormState.d.cts +5 -2
- package/dist/useDynamicFormState.d.ts +5 -2
- package/dist/useEdgeInteraction.d.cts +3 -3
- package/dist/useEdgeInteraction.d.ts +3 -3
- package/dist/useFullscreen.d.cts +4 -0
- package/dist/useFullscreen.d.ts +4 -0
- package/dist/useGlobalSearch.d.cts +9 -4
- package/dist/useGlobalSearch.d.ts +9 -4
- package/dist/useInfiniteScroll.d.cts +4 -1
- package/dist/useInfiniteScroll.d.ts +4 -1
- package/dist/useQRCode.d.cts +3 -3
- package/dist/useQRCode.d.ts +3 -3
- package/dist/useSearchState.d.cts +8 -6
- package/dist/useSearchState.d.ts +8 -6
- package/dist/useSignatureHistory.d.cts +7 -7
- package/dist/useSignatureHistory.d.ts +7 -7
- package/dist/useSplitResize.d.cts +50 -61
- package/dist/useSplitResize.d.ts +50 -61
- package/dist/useTableQuery.cjs +3 -3
- package/dist/useTableQuery.d.cts +237 -13
- package/dist/useTableQuery.d.ts +237 -13
- package/dist/useTableQuery.js +3 -3
- package/dist/useTimeSelection.d.cts +2 -2
- package/dist/useTimeSelection.d.ts +2 -2
- package/dist/useWorkflowValidation.d.cts +3 -3
- package/dist/useWorkflowValidation.d.ts +3 -3
- package/dist/verification.d.cts +5 -5
- package/dist/verification.d.ts +5 -5
- package/docs/component-review-20261019.md +55 -0
- package/docs/guides/form-density.en.md +42 -0
- package/docs/guides/form-density.md +59 -0
- package/docs/guides/runtime-performance.md +38 -0
- package/docs/guides/split-pane.en.md +103 -0
- package/docs/guides/split-pane.md +126 -0
- package/docs/guides/table-density.md +87 -0
- package/docs/guides/transfer.md +11 -0
- package/docs/guides/tree.md +157 -0
- package/docs/guides/usage.en.md +2 -0
- package/docs/guides/usage.md +2 -0
- package/docs/runtime-review-20261019.md +41 -0
- package/docs/wl-ui-produce-coverage.md +62 -0
- package/package.json +4 -2
- package/dist/useTreeOperations.d.cts +0 -185
- package/dist/useTreeOperations.d.ts +0 -185
package/dist/useTableQuery.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { f as ActionItem, s as ActionBarConfig } from "./presets.js";
|
|
2
2
|
import { n as ComponentLocale, t as ComponentFeedback } from "./contracts.js";
|
|
3
|
+
import { n as ResolvedComponentDensity, t as ComponentDensity } from "./density.js";
|
|
3
4
|
import * as vue from "vue";
|
|
4
5
|
import { App, ComputedRef, InjectionKey, MaybeRef, MaybeRefOrGetter, Ref, VNodeChild } from "vue";
|
|
5
|
-
import { DataTableBaseColumn, DataTableColumn, DataTableRowKey, FormItemRule, PaginationProps } from "naive-ui";
|
|
6
|
+
import { DataTableBaseColumn, DataTableColumn, DataTableRowKey, FormItemRule, PaginationProps, TreeInst, TreeOption, TreeProps } from "naive-ui";
|
|
6
7
|
import * as _vue_shared0 from "@vue/shared";
|
|
7
8
|
import { HLJSApi } from "highlight.js";
|
|
8
9
|
|
|
@@ -317,6 +318,7 @@ interface CrudBinding<T extends object = DataRecord> {
|
|
|
317
318
|
data: Ref<T[]>;
|
|
318
319
|
loading: Ref<boolean>;
|
|
319
320
|
columns: ComputedRef<readonly unknown[]>;
|
|
321
|
+
/** 提供 save 时 edit 函数只标记保存能力;自定义编辑入口放到 config.actions.edit。 */
|
|
320
322
|
actions?: ComputedRef<SimpleTableActions<T>>;
|
|
321
323
|
pagination?: ComputedRef<PaginationConfig | boolean | undefined>;
|
|
322
324
|
tableRef?: Ref<any>;
|
|
@@ -330,6 +332,8 @@ interface CrudBinding<T extends object = DataRecord> {
|
|
|
330
332
|
}
|
|
331
333
|
/** C_Table :config prop 的类型 — 所有功能配置收拢在此 */
|
|
332
334
|
interface TableConfig<T extends object = DataRecord> {
|
|
335
|
+
/** 与 C_Form / C_FormSearch 共用密度;局部 display.size 等显式配置优先。 */
|
|
336
|
+
density?: ComponentDensity;
|
|
333
337
|
/** 组件级反馈适配器;未提供时尝试复用 Naive Provider,再安全降级 */
|
|
334
338
|
feedback?: ComponentFeedback;
|
|
335
339
|
/** 组件级文案与语言覆盖 */
|
|
@@ -337,7 +341,7 @@ interface TableConfig<T extends object = DataRecord> {
|
|
|
337
341
|
/** 校验缺失/重复行键;默认开启,超大或无状态表格可关闭。 */
|
|
338
342
|
validateRowKeys?: boolean;
|
|
339
343
|
/** 编辑配置 */
|
|
340
|
-
edit?: EditConfig<T> | boolean;
|
|
344
|
+
edit?: EditConfig<T> | EditMode | boolean;
|
|
341
345
|
/** 操作按钮 */
|
|
342
346
|
actions?: SimpleTableActions<T>;
|
|
343
347
|
/** 分页配置 */
|
|
@@ -377,7 +381,7 @@ interface TableConfig<T extends object = DataRecord> {
|
|
|
377
381
|
}
|
|
378
382
|
interface EditConfig<T extends object = DataRecord> {
|
|
379
383
|
enabled?: boolean;
|
|
380
|
-
mode?:
|
|
384
|
+
mode?: EditMode;
|
|
381
385
|
showRowActions?: boolean;
|
|
382
386
|
modalTitle?: string;
|
|
383
387
|
modalWidth?: number;
|
|
@@ -494,10 +498,12 @@ interface BatchActionsConfig<T extends object = DataRecord> {
|
|
|
494
498
|
}>;
|
|
495
499
|
}
|
|
496
500
|
interface ResolvedConfig {
|
|
501
|
+
density: ComponentDensity | undefined;
|
|
502
|
+
controlSize: 'small' | 'medium' | 'large';
|
|
497
503
|
feedback: ComponentFeedback | undefined;
|
|
498
504
|
locale: ComponentLocale | undefined;
|
|
499
505
|
editable: boolean;
|
|
500
|
-
editMode:
|
|
506
|
+
editMode: EditMode;
|
|
501
507
|
showRowActions: boolean;
|
|
502
508
|
modalTitle: string;
|
|
503
509
|
modalWidth: number;
|
|
@@ -654,7 +660,7 @@ interface TableRowKeyIssue<T extends object = DataRecord> {
|
|
|
654
660
|
}
|
|
655
661
|
type EditMode = 'row' | 'cell' | 'both' | 'modal' | 'none';
|
|
656
662
|
type EditType = 'input' | 'textarea' | 'select' | 'date' | 'number' | 'switch' | 'email' | 'mobile';
|
|
657
|
-
type ButtonType = 'default' | 'primary' | 'info' | 'success' | 'warning' | 'error';
|
|
663
|
+
type ButtonType$1 = 'default' | 'primary' | 'info' | 'success' | 'warning' | 'error';
|
|
658
664
|
type ParentChildLinkMode = 'strict' | 'loose';
|
|
659
665
|
interface PaginationConfig {
|
|
660
666
|
enabled?: boolean;
|
|
@@ -681,7 +687,7 @@ interface CustomAction<T extends object = DataRecord> {
|
|
|
681
687
|
/** 按钮图标 */
|
|
682
688
|
icon: string | ((row: T, index: number) => string);
|
|
683
689
|
/** 按钮类型样式 */
|
|
684
|
-
type?: ButtonType | ((row: T, index: number) => ButtonType);
|
|
690
|
+
type?: ButtonType$1 | ((row: T, index: number) => ButtonType$1);
|
|
685
691
|
/** 点击事件处理器 */
|
|
686
692
|
onClick: (row: T, index: number) => void | Promise<void>;
|
|
687
693
|
/** 条件显示函数(可选) */
|
|
@@ -726,11 +732,13 @@ interface UseTableActionsOptions<T extends object = DataRecord> {
|
|
|
726
732
|
config: Ref<{
|
|
727
733
|
editable: boolean;
|
|
728
734
|
editMode: string;
|
|
735
|
+
controlSize?: 'small' | 'medium' | 'large';
|
|
729
736
|
feedback?: ComponentFeedback;
|
|
730
737
|
locale?: ComponentLocale;
|
|
731
738
|
}> | ComputedRef<{
|
|
732
739
|
editable: boolean;
|
|
733
740
|
editMode: string;
|
|
741
|
+
controlSize?: 'small' | 'medium' | 'large';
|
|
734
742
|
feedback?: ComponentFeedback;
|
|
735
743
|
locale?: ComponentLocale;
|
|
736
744
|
}>;
|
|
@@ -807,12 +815,19 @@ interface BaseTableColumn<T extends object = DataRecord> extends Omit<DataTableB
|
|
|
807
815
|
maxWidth?: number;
|
|
808
816
|
}
|
|
809
817
|
interface NormalTableColumn<T extends object = DataRecord> extends BaseTableColumn<T> {
|
|
818
|
+
type?: never;
|
|
810
819
|
key: Extract<keyof T, DataTableRowKey> | DataTableRowKey;
|
|
811
820
|
title: string;
|
|
812
821
|
}
|
|
813
822
|
interface BuiltInTableColumn<T extends object = DataRecord> extends BaseTableColumn<T> {
|
|
814
823
|
/** 内置列类型:无需 key / title */
|
|
815
824
|
type: 'selection' | 'expand' | 'index';
|
|
825
|
+
/** 原生选择列禁用判定;与 config.selection.rowCheckable 一起生效。 */
|
|
826
|
+
disabled?: (row: T) => boolean;
|
|
827
|
+
/** 原生选择列是否多选;maxSelection=1 时仍使用单选。 */
|
|
828
|
+
multiple?: boolean;
|
|
829
|
+
/** 原生展开列判定;与 config.expand.rowExpandable 一起生效。 */
|
|
830
|
+
expandable?: (row: T) => boolean;
|
|
816
831
|
/** 展开行渲染函数(仅当 type = expand 时有效) */
|
|
817
832
|
renderExpand?: (rowData: T, rowIndex: number) => VNodeChild;
|
|
818
833
|
}
|
|
@@ -999,7 +1014,7 @@ interface UseTableExpandReturn<T extends object = DataRecord, C = DataRecord> {
|
|
|
999
1014
|
interface RowAction<T extends object = DataRecord> {
|
|
1000
1015
|
label: string;
|
|
1001
1016
|
icon?: string;
|
|
1002
|
-
type?: ButtonType;
|
|
1017
|
+
type?: ButtonType$1;
|
|
1003
1018
|
disabled?: boolean | ((row: T, index: number) => boolean);
|
|
1004
1019
|
show?: boolean | ((row: T, index: number) => boolean);
|
|
1005
1020
|
onClick?: (row: T, index: number) => void | Promise<void>;
|
|
@@ -1020,10 +1035,11 @@ type ColumnWithKey = TableColumn & {
|
|
|
1020
1035
|
};
|
|
1021
1036
|
//#endregion
|
|
1022
1037
|
//#region src/components/C_Table/index.vue.d.ts
|
|
1023
|
-
declare const __VLS_export: <T extends object = DataRecord>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
1038
|
+
declare const __VLS_export$1: <T extends object = DataRecord>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
1024
1039
|
props: vue.PublicProps & __VLS_PrettifyLocal<{
|
|
1025
1040
|
/** 根容器 class;普通 class/style 仍按既有契约转发到 NDataTable。 */wrapperClass?: vue.HTMLAttributes["class"]; /** 填满已确定高度的根容器,并为工具栏和分页预留空间。 */
|
|
1026
|
-
flexHeight?: boolean; /**
|
|
1041
|
+
flexHeight?: boolean; /** 原生横向虚拟滚动;未声明业务列宽时仍提供可计算的数值兜底。 */
|
|
1042
|
+
virtualScrollX?: boolean; /** 列配置(crud 模式下可省略) */
|
|
1027
1043
|
columns?: TableColumn<T>[]; /** 数据源(crud 模式下可省略) */
|
|
1028
1044
|
data?: MaybeRefLike<T[]>; /** 加载状态 */
|
|
1029
1045
|
loading?: MaybeRefLike<boolean>; /** 行唯一键 */
|
|
@@ -1148,7 +1164,7 @@ declare const __VLS_export: <T extends object = DataRecord>(__VLS_props: NonNull
|
|
|
1148
1164
|
}>) => vue.VNode & {
|
|
1149
1165
|
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
1150
1166
|
};
|
|
1151
|
-
declare const _default: typeof __VLS_export;
|
|
1167
|
+
declare const _default$1: typeof __VLS_export$1;
|
|
1152
1168
|
type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K] } : { [K in keyof T as K]: T[K] }) & {};
|
|
1153
1169
|
//#endregion
|
|
1154
1170
|
//#region src/components/C_Table/helpers.d.ts
|
|
@@ -1194,6 +1210,8 @@ interface UseTableColumnsOptions {
|
|
|
1194
1210
|
config: ComputedRef<ResolvedConfig>;
|
|
1195
1211
|
/** 默认列宽 */
|
|
1196
1212
|
columnWidth: number;
|
|
1213
|
+
/** 区分使用侧显式统一列宽与内部默认值,不把默认值强加给弹性业务列。 */
|
|
1214
|
+
columnWidthExplicit?: boolean;
|
|
1197
1215
|
/** 用户设定的 scrollX */
|
|
1198
1216
|
scrollX?: number | string;
|
|
1199
1217
|
/** 行键获取函数 */
|
|
@@ -1265,6 +1283,7 @@ declare function useRowEdit(options: RowEditOptions): {
|
|
|
1265
1283
|
getEditingRowData: (rowKey: DataTableRowKey) => DataRecord | undefined;
|
|
1266
1284
|
updateEditingRowData: (rowKey: DataTableRowKey, field: string, value: unknown) => void;
|
|
1267
1285
|
findRowData: (rowKey: DataTableRowKey) => DataRecord | null | undefined;
|
|
1286
|
+
invalidate: () => void;
|
|
1268
1287
|
};
|
|
1269
1288
|
//#endregion
|
|
1270
1289
|
//#region src/components/C_Table/composables/useTableManager.d.ts
|
|
@@ -1358,6 +1377,7 @@ declare function useTableManager(params: TableManagerParams): {
|
|
|
1358
1377
|
getEditingRowData: (rowKey: DataTableRowKey) => DataRecord | undefined;
|
|
1359
1378
|
updateEditingRowData: (rowKey: DataTableRowKey, field: string, value: unknown) => void;
|
|
1360
1379
|
findRowData: (rowKey: DataTableRowKey) => DataRecord | null | undefined;
|
|
1380
|
+
invalidate: () => void;
|
|
1361
1381
|
};
|
|
1362
1382
|
cellEdit: {
|
|
1363
1383
|
editingCell: vue.Ref<{
|
|
@@ -1387,6 +1407,7 @@ declare function useTableManager(params: TableManagerParams): {
|
|
|
1387
1407
|
getEditingCellValue: (rowKey: DataTableRowKey, columnKey: string) => unknown;
|
|
1388
1408
|
updateEditingCellValue: (rowKey: DataTableRowKey, columnKey: string, value: unknown) => void;
|
|
1389
1409
|
findRowData: (rowKey: DataTableRowKey) => DataRecord | null | undefined;
|
|
1410
|
+
invalidate: () => void;
|
|
1390
1411
|
};
|
|
1391
1412
|
modalEdit: {
|
|
1392
1413
|
isModalVisible: vue.Ref<boolean, boolean>;
|
|
@@ -1404,6 +1425,7 @@ declare function useTableManager(params: TableManagerParams): {
|
|
|
1404
1425
|
resetEditingState: () => boolean;
|
|
1405
1426
|
isEditingRow: (rowKey: DataTableRowKey) => boolean;
|
|
1406
1427
|
getEditingRowData: (rowKey: DataTableRowKey) => any;
|
|
1428
|
+
invalidate: () => void;
|
|
1407
1429
|
};
|
|
1408
1430
|
};
|
|
1409
1431
|
expandState: UseTableExpandReturn<DataRecord, DataRecord>;
|
|
@@ -1534,6 +1556,7 @@ declare function useCellEdit(options: CellEditOptions): {
|
|
|
1534
1556
|
getEditingCellValue: (rowKey: DataTableRowKey, columnKey: string) => unknown;
|
|
1535
1557
|
updateEditingCellValue: (rowKey: DataTableRowKey, columnKey: string, value: unknown) => void;
|
|
1536
1558
|
findRowData: (rowKey: DataTableRowKey) => DataRecord | null | undefined;
|
|
1559
|
+
invalidate: () => void;
|
|
1537
1560
|
};
|
|
1538
1561
|
//#endregion
|
|
1539
1562
|
//#region src/components/C_Table/composables/useModalEdit.d.ts
|
|
@@ -1560,6 +1583,7 @@ declare function useModalEdit<T extends object = DataRecord>(options: ModalEditO
|
|
|
1560
1583
|
resetEditingState: () => boolean;
|
|
1561
1584
|
isEditingRow: (rowKey: DataTableRowKey) => boolean;
|
|
1562
1585
|
getEditingRowData: (rowKey: DataTableRowKey) => any;
|
|
1586
|
+
invalidate: () => void;
|
|
1563
1587
|
};
|
|
1564
1588
|
//#endregion
|
|
1565
1589
|
//#region src/plugins/highlight.d.ts
|
|
@@ -1594,6 +1618,204 @@ declare function useHighlight(options?: HighlightPluginOptions): HighlightAPI;
|
|
|
1594
1618
|
*/
|
|
1595
1619
|
declare function setupHighlight(app: App, options?: HighlightPluginOptions): HighlightAPI;
|
|
1596
1620
|
//#endregion
|
|
1621
|
+
//#region src/components/C_Tree/types.d.ts
|
|
1622
|
+
type TreeKey = string | number;
|
|
1623
|
+
type TreeMode = 'menu' | 'file' | 'org' | 'custom';
|
|
1624
|
+
type StatusType = 'success' | 'warning' | 'error' | 'info';
|
|
1625
|
+
type ButtonType = 'primary' | 'info' | 'warning' | 'error' | 'default';
|
|
1626
|
+
/** Custom fields are allowed; keyField/labelField select the actual identity and label. */
|
|
1627
|
+
interface TreeOption$1 extends TreeOption {
|
|
1628
|
+
id?: TreeKey;
|
|
1629
|
+
children?: TreeOption$1[];
|
|
1630
|
+
}
|
|
1631
|
+
interface TreeNodeData extends TreeOption$1 {
|
|
1632
|
+
name?: string;
|
|
1633
|
+
type?: string;
|
|
1634
|
+
children?: TreeNodeData[];
|
|
1635
|
+
}
|
|
1636
|
+
interface DropInfo {
|
|
1637
|
+
node: TreeOption$1;
|
|
1638
|
+
dragNode: TreeOption$1;
|
|
1639
|
+
dropPosition: 'before' | 'inside' | 'after';
|
|
1640
|
+
event: DragEvent;
|
|
1641
|
+
}
|
|
1642
|
+
interface StatusConfig {
|
|
1643
|
+
field: string;
|
|
1644
|
+
values: Record<string | number, {
|
|
1645
|
+
text: string;
|
|
1646
|
+
type: StatusType;
|
|
1647
|
+
}>;
|
|
1648
|
+
}
|
|
1649
|
+
interface ActionConfig {
|
|
1650
|
+
key: string;
|
|
1651
|
+
text: string;
|
|
1652
|
+
icon: string;
|
|
1653
|
+
type?: ButtonType;
|
|
1654
|
+
show?: (node: TreeNodeData) => boolean;
|
|
1655
|
+
confirm?: string;
|
|
1656
|
+
}
|
|
1657
|
+
interface IconConfig {
|
|
1658
|
+
default?: string;
|
|
1659
|
+
typeMap?: Record<string, string>;
|
|
1660
|
+
colorMap?: Record<string, string>;
|
|
1661
|
+
}
|
|
1662
|
+
type TreeNativeProps = Omit<TreeProps, 'data'>;
|
|
1663
|
+
interface TreeRenderContext {
|
|
1664
|
+
option: TreeOption$1;
|
|
1665
|
+
checked: boolean;
|
|
1666
|
+
selected: boolean;
|
|
1667
|
+
}
|
|
1668
|
+
interface TreeUpdateMeta {
|
|
1669
|
+
node: TreeOption$1 | null;
|
|
1670
|
+
action: 'select' | 'unselect' | 'check' | 'uncheck' | 'expand' | 'collapse' | 'filter';
|
|
1671
|
+
}
|
|
1672
|
+
interface TreeProps$1 {
|
|
1673
|
+
/** Business interfaces need no string index signature; fields are selected by config. */
|
|
1674
|
+
data: object[];
|
|
1675
|
+
mode?: TreeMode;
|
|
1676
|
+
/** Native tree capabilities; explicit wrapper props have priority. */
|
|
1677
|
+
treeProps?: TreeNativeProps;
|
|
1678
|
+
density?: ComponentDensity;
|
|
1679
|
+
keyField?: string;
|
|
1680
|
+
labelField?: string;
|
|
1681
|
+
childrenField?: string;
|
|
1682
|
+
searchPattern?: string;
|
|
1683
|
+
searchable?: boolean;
|
|
1684
|
+
searchPlaceholder?: string;
|
|
1685
|
+
draggable?: boolean;
|
|
1686
|
+
showLine?: boolean;
|
|
1687
|
+
showToolbar?: boolean;
|
|
1688
|
+
addable?: boolean;
|
|
1689
|
+
addText?: string;
|
|
1690
|
+
refreshable?: boolean;
|
|
1691
|
+
iconField?: string;
|
|
1692
|
+
iconConfig?: IconConfig;
|
|
1693
|
+
statusConfigs?: StatusConfig[];
|
|
1694
|
+
actions?: ActionConfig[];
|
|
1695
|
+
defaultExpandAll?: boolean;
|
|
1696
|
+
defaultExpandedKeys?: TreeKey[];
|
|
1697
|
+
defaultSelectedKeys?: TreeKey[];
|
|
1698
|
+
defaultCheckedKeys?: TreeKey[];
|
|
1699
|
+
expandedKeys?: TreeKey[];
|
|
1700
|
+
selectedKeys?: TreeKey[];
|
|
1701
|
+
checkedKeys?: TreeKey[];
|
|
1702
|
+
}
|
|
1703
|
+
interface TreeExpose {
|
|
1704
|
+
expandAll: () => void;
|
|
1705
|
+
collapseAll: () => void;
|
|
1706
|
+
selectNode: (key: TreeKey) => void;
|
|
1707
|
+
clearSelection: () => void;
|
|
1708
|
+
setCheckedKeys: (keys: TreeKey[]) => void;
|
|
1709
|
+
clearChecked: () => void;
|
|
1710
|
+
getSelectedNode: () => TreeNodeData | null;
|
|
1711
|
+
getCheckedData: TreeInst['getCheckedData'];
|
|
1712
|
+
getIndeterminateData: TreeInst['getIndeterminateData'];
|
|
1713
|
+
scrollTo: TreeInst['scrollTo'];
|
|
1714
|
+
expandedKeys: Ref<TreeKey[]>;
|
|
1715
|
+
selectedKeys: Ref<TreeKey[]>;
|
|
1716
|
+
checkedKeys: Ref<TreeKey[]>;
|
|
1717
|
+
}
|
|
1718
|
+
interface TreeEmits {
|
|
1719
|
+
'update:searchPattern': [pattern: string];
|
|
1720
|
+
'update:expandedKeys': [keys: TreeKey[], options: Array<TreeOption$1 | null>, meta: TreeUpdateMeta];
|
|
1721
|
+
'update:selectedKeys': [keys: TreeKey[], options: Array<TreeOption$1 | null>, meta: TreeUpdateMeta];
|
|
1722
|
+
'update:checkedKeys': [keys: TreeKey[], options: Array<TreeOption$1 | null>, meta: TreeUpdateMeta];
|
|
1723
|
+
'node-select': [node: TreeNodeData | null, selectedKeys: TreeKey[]];
|
|
1724
|
+
'node-action': [action: string, node: TreeNodeData];
|
|
1725
|
+
'node-drop': [info: DropInfo];
|
|
1726
|
+
'load-error': [error: unknown, node: TreeOption$1];
|
|
1727
|
+
add: [parentNode?: TreeNodeData];
|
|
1728
|
+
refresh: [];
|
|
1729
|
+
}
|
|
1730
|
+
interface TreeSlots {
|
|
1731
|
+
'toolbar-actions'?: () => VNodeChild;
|
|
1732
|
+
label?: (context: TreeRenderContext) => VNodeChild;
|
|
1733
|
+
prefix?: (context: TreeRenderContext) => VNodeChild;
|
|
1734
|
+
suffix?: (context: TreeRenderContext) => VNodeChild;
|
|
1735
|
+
empty?: () => VNodeChild;
|
|
1736
|
+
}
|
|
1737
|
+
//#endregion
|
|
1738
|
+
//#region src/components/C_Tree/index.vue.d.ts
|
|
1739
|
+
type __VLS_Slots = TreeSlots;
|
|
1740
|
+
declare const __VLS_base: vue.DefineComponent<TreeProps$1, TreeExpose, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
1741
|
+
add: (parentNode?: TreeNodeData | undefined) => any;
|
|
1742
|
+
"update:searchPattern": (pattern: string) => any;
|
|
1743
|
+
"update:expandedKeys": (keys: TreeKey[], options: (TreeOption$1 | null)[], meta: TreeUpdateMeta) => any;
|
|
1744
|
+
"update:selectedKeys": (keys: TreeKey[], options: (TreeOption$1 | null)[], meta: TreeUpdateMeta) => any;
|
|
1745
|
+
"update:checkedKeys": (keys: TreeKey[], options: (TreeOption$1 | null)[], meta: TreeUpdateMeta) => any;
|
|
1746
|
+
"node-select": (node: TreeNodeData | null, selectedKeys: TreeKey[]) => any;
|
|
1747
|
+
"node-action": (action: string, node: TreeNodeData) => any;
|
|
1748
|
+
"node-drop": (info: DropInfo) => any;
|
|
1749
|
+
"load-error": (error: unknown, node: TreeOption$1) => any;
|
|
1750
|
+
refresh: () => any;
|
|
1751
|
+
}, string, vue.PublicProps, Readonly<TreeProps$1> & Readonly<{
|
|
1752
|
+
onAdd?: ((parentNode?: TreeNodeData | undefined) => any) | undefined;
|
|
1753
|
+
"onUpdate:searchPattern"?: ((pattern: string) => any) | undefined;
|
|
1754
|
+
"onUpdate:expandedKeys"?: ((keys: TreeKey[], options: (TreeOption$1 | null)[], meta: TreeUpdateMeta) => any) | undefined;
|
|
1755
|
+
"onUpdate:selectedKeys"?: ((keys: TreeKey[], options: (TreeOption$1 | null)[], meta: TreeUpdateMeta) => any) | undefined;
|
|
1756
|
+
"onUpdate:checkedKeys"?: ((keys: TreeKey[], options: (TreeOption$1 | null)[], meta: TreeUpdateMeta) => any) | undefined;
|
|
1757
|
+
"onNode-select"?: ((node: TreeNodeData | null, selectedKeys: TreeKey[]) => any) | undefined;
|
|
1758
|
+
"onNode-action"?: ((action: string, node: TreeNodeData) => any) | undefined;
|
|
1759
|
+
"onNode-drop"?: ((info: DropInfo) => any) | undefined;
|
|
1760
|
+
"onLoad-error"?: ((error: unknown, node: TreeOption$1) => any) | undefined;
|
|
1761
|
+
onRefresh?: (() => any) | undefined;
|
|
1762
|
+
}>, {
|
|
1763
|
+
mode: TreeMode;
|
|
1764
|
+
showToolbar: boolean;
|
|
1765
|
+
draggable: boolean;
|
|
1766
|
+
density: ComponentDensity;
|
|
1767
|
+
searchable: boolean;
|
|
1768
|
+
searchPlaceholder: string;
|
|
1769
|
+
showLine: boolean;
|
|
1770
|
+
addable: boolean;
|
|
1771
|
+
addText: string;
|
|
1772
|
+
refreshable: boolean;
|
|
1773
|
+
defaultExpandAll: boolean;
|
|
1774
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
1775
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
1776
|
+
declare const _default: typeof __VLS_export;
|
|
1777
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
1778
|
+
new (): {
|
|
1779
|
+
$slots: S;
|
|
1780
|
+
};
|
|
1781
|
+
};
|
|
1782
|
+
//#endregion
|
|
1783
|
+
//#region src/components/C_Tree/data.d.ts
|
|
1784
|
+
declare const presetConfigs: Record<TreeMode, Partial<TreeProps$1>>;
|
|
1785
|
+
//#endregion
|
|
1786
|
+
//#region src/components/C_Tree/composables/useTreeOperations.d.ts
|
|
1787
|
+
type EmitFn = <E extends keyof TreeEmits>(event: E, ...args: TreeEmits[E]) => void;
|
|
1788
|
+
/** State coordination only; checking, filtering, keyboard and loading stay native. */
|
|
1789
|
+
declare function useTreeOperations(props: TreeProps$1, emit: EmitFn, slots?: TreeSlots): {
|
|
1790
|
+
internalSearchPattern: vue.Ref<string, string>;
|
|
1791
|
+
expandedKeys: vue.WritableComputedRef<TreeKey[], TreeKey[]>;
|
|
1792
|
+
selectedKeys: vue.WritableComputedRef<TreeKey[], TreeKey[]>;
|
|
1793
|
+
checkedKeys: vue.WritableComputedRef<TreeKey[], TreeKey[]>;
|
|
1794
|
+
isAllExpanded: vue.ComputedRef<boolean>;
|
|
1795
|
+
treeData: vue.ComputedRef<object[]>;
|
|
1796
|
+
currentSearchPattern: vue.WritableComputedRef<string, string>;
|
|
1797
|
+
renderPrefix: (info: TreeRenderContext) => string | number | boolean | void | vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
1798
|
+
[key: string]: any;
|
|
1799
|
+
}> | vue.VNodeArrayChildren | null;
|
|
1800
|
+
renderLabel: (info: TreeRenderContext) => string | number | boolean | void | vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
1801
|
+
[key: string]: any;
|
|
1802
|
+
}> | vue.VNodeArrayChildren | null;
|
|
1803
|
+
renderSuffix: (info: TreeRenderContext) => string | number | boolean | void | vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
1804
|
+
[key: string]: any;
|
|
1805
|
+
}> | vue.VNodeArrayChildren | null;
|
|
1806
|
+
treeBindings: vue.ComputedRef<TreeProps>;
|
|
1807
|
+
treeRef: vue.ShallowRef<TreeInst | undefined, TreeInst | undefined>;
|
|
1808
|
+
density: vue.ComputedRef<ResolvedComponentDensity>;
|
|
1809
|
+
toggleExpandAll: () => void;
|
|
1810
|
+
handleExpandedKeysChange: (keys: TreeKey[], options?: (TreeNodeData | null)[], meta?: TreeUpdateMeta) => void;
|
|
1811
|
+
handleSelectedKeysChange: (keys: TreeKey[], options?: (TreeNodeData | null)[], meta?: TreeUpdateMeta) => void;
|
|
1812
|
+
handleCheckedKeysChange: (keys: TreeKey[], options?: (TreeNodeData | null)[], meta?: TreeUpdateMeta) => void;
|
|
1813
|
+
handleDrop: (info: DropInfo) => void;
|
|
1814
|
+
handleAdd: () => void;
|
|
1815
|
+
handleRefresh: () => void;
|
|
1816
|
+
expose: TreeExpose;
|
|
1817
|
+
};
|
|
1818
|
+
//#endregion
|
|
1597
1819
|
//#region src/utils/storage.d.ts
|
|
1598
1820
|
/** SSR-safe localStorage helpers. Storage failures never break component state. */
|
|
1599
1821
|
/** Store a value. Returns false when storage is unavailable or full. */
|
|
@@ -1660,10 +1882,11 @@ declare function useTableQuery<T extends object, Q extends object = Record<strin
|
|
|
1660
1882
|
simple?: boolean;
|
|
1661
1883
|
size?: "small" | "medium" | "large";
|
|
1662
1884
|
};
|
|
1885
|
+
density?: ComponentDensity;
|
|
1663
1886
|
feedback?: ComponentFeedback;
|
|
1664
1887
|
locale?: ComponentLocale;
|
|
1665
1888
|
validateRowKeys?: boolean;
|
|
1666
|
-
edit?: boolean | EditConfig<T> | undefined;
|
|
1889
|
+
edit?: boolean | EditMode | EditConfig<T> | undefined;
|
|
1667
1890
|
actions?: SimpleTableActions<T> | undefined;
|
|
1668
1891
|
expand?: boolean | ExpandConfig$1<T> | undefined;
|
|
1669
1892
|
selection?: boolean | SelectionConfig$1<T> | undefined;
|
|
@@ -1707,10 +1930,11 @@ declare function useTableQuery<T extends object, Q extends object = Record<strin
|
|
|
1707
1930
|
simple?: boolean;
|
|
1708
1931
|
size?: "small" | "medium" | "large";
|
|
1709
1932
|
};
|
|
1933
|
+
density?: ComponentDensity;
|
|
1710
1934
|
feedback?: ComponentFeedback;
|
|
1711
1935
|
locale?: ComponentLocale;
|
|
1712
1936
|
validateRowKeys?: boolean;
|
|
1713
|
-
edit?: boolean | EditConfig<T> | undefined;
|
|
1937
|
+
edit?: boolean | EditMode | EditConfig<T> | undefined;
|
|
1714
1938
|
actions?: SimpleTableActions<T> | undefined;
|
|
1715
1939
|
expand?: boolean | ExpandConfig$1<T> | undefined;
|
|
1716
1940
|
selection?: boolean | SelectionConfig$1<T> | undefined;
|
|
@@ -1733,4 +1957,4 @@ declare function useTableQuery<T extends object, Q extends object = Record<strin
|
|
|
1733
1957
|
cancel: () => void;
|
|
1734
1958
|
};
|
|
1735
1959
|
//#endregion
|
|
1736
|
-
export {
|
|
1960
|
+
export { MaybeRefLike as $, printPresets as $t, HighlightPluginOptions as A, ExpandConfig$1 as At, useRowEdit as B, exportTableData as Bt, TreeNodeData as C, useTableGlobalConfig as Ct, TreeSlots as D, DisplayConfig as Dt, TreeRenderContext as E, CrudBinding as Et, useCellEdit as F, TreeConfig as Ft, _default$1 as G, RowDragConfig as Gt, defineTableColumns as H, UseCrossPageSelectionOptions as Ht, usePagination as I, VirtualScrollConfig as It, ChildSelectionState as J, useRowDrag as Jt, ApiFunction as K, UseRowDragOptions as Kt, useTableActions as L, createEditModeChecker as Lt, setupHighlight as M, SummaryConfig as Mt, useHighlight as N, TableConfig as Nt, TreeUpdateMeta as O, EditConfig as Ot, useModalEdit as P, ToolbarConfig as Pt, EditMode as Q, PrintWatermarkOptions as Qt, useTableExpand as R, resolveConfig as Rt, TreeNativeProps as S, mergeGlobalConfig as St, TreeProps$1 as T, ColumnDragConfig as Tt, defineTableConfig as U, UseCrossPageSelectionReturn as Ut, useTableColumns as V, CrossPageSelectionConfig as Vt, validateTableRowKeys as W, useCrossPageSelection as Wt, CustomAction as X, DynamicRowsReturn as Xt, ColumnWithKey as Y, DynamicRowsOptions as Yt, DataRecord as Z, useDynamicRows as Zt, StatusType as _, FormatterConfig as _t, getItem as a, SelectOption as at, TreeKey as b, TableGlobalConfig as bt, setItem as c, TableColumn as ct, _default as d, TableProps as dt, usePrintWatermark as en, NormalTableColumn as et, ActionConfig as f, TableRowKey as ft, StatusConfig as g, ColumnFormatter as gt, IconConfig as h, UseTableExpandReturn as ht, useTableQuery as i, COMPONENT_LOCALE_KEY as in, RowAction as it, createHighlight as j, SelectionConfig$1 as jt, HighlightAPI as k, ErrorConfig as kt, useTreeOperations as l, TableEmits as lt, DropInfo as m, UseTableExpandOptions as mt, TableQueryResult as n, useComponentLocale as nn, ParentChildLinkMode as nt, removeAllItem as o, SimpleTableActions as ot, ButtonType as p, TableRowKeyIssue as pt, BuiltInTableColumn as q, UseRowDragReturn as qt, UseTableQueryOptions as r, COMPONENT_FEEDBACK_KEY as rn, RenderFunction as rt, removeItem as s, StrictTableColumn as st, TableQueryContext as t, useComponentFeedback as tn, PaginationConfig as tt, presetConfigs as u, TableInstance as ut, TreeEmits as v, FormatterType as vt, TreeOption$1 as w, BatchActionsConfig as wt, TreeMode as x, applyFormatter as xt, TreeExpose as y, TABLE_GLOBAL_CONFIG_KEY as yt, useTableManager as z, ExportConfig as zt };
|