@robot-admin/naive-ui-components 0.26.0 → 0.28.0

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.
Files changed (182) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +9 -11
  3. package/README_EN.md +8 -8
  4. package/dist/C_Form.base.css +31 -13
  5. package/dist/C_Form.css +31 -13
  6. package/dist/C_Form.d.cts +3 -2
  7. package/dist/C_Form.d.ts +3 -19
  8. package/dist/C_FormModal.d.cts +1 -1
  9. package/dist/C_FormModal.d.ts +2 -17
  10. package/dist/C_FormSearch.css +79 -79
  11. package/dist/C_FormSearch.d.cts +2 -1
  12. package/dist/C_FormSearch.d.ts +2 -2
  13. package/dist/C_FormulaEditor.d.cts +1 -1
  14. package/dist/C_FormulaEditor.d.ts +1 -1
  15. package/dist/C_Guide.d.cts +1 -1
  16. package/dist/C_Guide.d.ts +1 -1
  17. package/dist/C_Icon.d.cts +1 -1
  18. package/dist/C_Icon.d.ts +1 -1
  19. package/dist/C_Language.d.cts +1 -1
  20. package/dist/C_Language.d.ts +1 -1
  21. package/dist/C_Loading.d.cts +1 -1
  22. package/dist/C_Loading.d.ts +1 -1
  23. package/dist/C_Login.d.cts +1 -1
  24. package/dist/C_Login.d.ts +1 -1
  25. package/dist/C_Markdown.d.cts +1 -1
  26. package/dist/C_Markdown.d.ts +1 -1
  27. package/dist/C_Menu.d.ts +1 -1
  28. package/dist/C_OrgChart.d.cts +1 -1
  29. package/dist/C_OrgChart.d.ts +1 -1
  30. package/dist/C_Progress.d.cts +1 -1
  31. package/dist/C_Progress.d.ts +1 -1
  32. package/dist/C_SectionNav.d.cts +1 -1
  33. package/dist/C_SectionNav.d.ts +1 -1
  34. package/dist/C_Skeleton.d.cts +1 -1
  35. package/dist/C_Skeleton.d.ts +1 -1
  36. package/dist/C_Steps.d.cts +1 -1
  37. package/dist/C_Steps.d.ts +1 -1
  38. package/dist/C_Table.base.css +176 -171
  39. package/dist/C_Table.css +145 -158
  40. package/dist/C_Table.d.cts +1 -1
  41. package/dist/C_Table.d.ts +7 -5
  42. package/dist/C_Table2.cjs +3 -3
  43. package/dist/C_Table2.js +3 -3
  44. package/dist/C_TagsView.d.cts +1 -1
  45. package/dist/C_TagsView.d.ts +1 -1
  46. package/dist/C_Theme.d.cts +1 -1
  47. package/dist/C_Theme.d.ts +1 -1
  48. package/dist/C_Timeline.d.cts +1 -1
  49. package/dist/C_Timeline.d.ts +1 -1
  50. package/dist/C_Transfer.d.cts +1 -1
  51. package/dist/C_Transfer.d.ts +1 -1
  52. package/dist/C_Tree.d.cts +1 -1
  53. package/dist/C_Tree.d.ts +7 -5
  54. package/dist/C_Upload.d.cts +1 -1
  55. package/dist/C_Upload.d.ts +1 -1
  56. package/dist/config.cjs +1 -1
  57. package/dist/config.d.cts +1 -4
  58. package/dist/config.d.ts +1 -4
  59. package/dist/config.js +1 -1
  60. package/dist/constants.d.cts +2 -2
  61. package/dist/constants.d.ts +2 -2
  62. package/dist/constants2.d.cts +173 -402
  63. package/dist/constants2.d.ts +173 -402
  64. package/dist/constants3.d.cts +2 -2
  65. package/dist/constants3.d.ts +2 -2
  66. package/dist/constants4.d.cts +402 -173
  67. package/dist/constants4.d.ts +402 -173
  68. package/dist/data.cjs +1 -1
  69. package/dist/data.d.cts +1 -2
  70. package/dist/data.d.ts +1 -2
  71. package/dist/data.js +1 -1
  72. package/dist/data2.d.cts +5 -5
  73. package/dist/data2.d.ts +5 -5
  74. package/dist/dateRange.d.cts +3 -2
  75. package/dist/dateRange.d.ts +3 -2
  76. package/dist/helpers.cjs +1 -1
  77. package/dist/helpers.js +1 -1
  78. package/dist/index.cjs +1 -1
  79. package/dist/index.d.cts +34 -34
  80. package/dist/index.d.ts +41 -42
  81. package/dist/index.js +1 -1
  82. package/dist/index.vue.d.cts +4 -4
  83. package/dist/index.vue.d.ts +4 -4
  84. package/dist/index10.vue.d.cts +1 -1
  85. package/dist/index10.vue.d.ts +1 -1
  86. package/dist/index11.vue.d.cts +1 -1
  87. package/dist/index11.vue.d.ts +7 -4
  88. package/dist/index12.vue.d.cts +7 -4
  89. package/dist/index13.vue.d.ts +4 -4
  90. package/dist/index14.vue.d.cts +4 -4
  91. package/dist/index15.vue.d.ts +52 -54
  92. package/dist/index16.vue.d.cts +52 -54
  93. package/dist/index16.vue.d.ts +125 -13
  94. package/dist/index17.vue.d.cts +125 -13
  95. package/dist/index17.vue.d.ts +51 -123
  96. package/dist/index18.vue.d.cts +51 -123
  97. package/dist/index18.vue.d.ts +26 -47
  98. package/dist/index19.vue.d.cts +26 -47
  99. package/dist/index19.vue.d.ts +13 -38
  100. package/dist/index2.vue.d.cts +1 -1
  101. package/dist/index2.vue.d.ts +1 -1
  102. package/dist/index20.vue.d.cts +13 -38
  103. package/dist/index20.vue.d.ts +128 -11
  104. package/dist/index21.vue.d.cts +128 -11
  105. package/dist/index21.vue.d.ts +75 -25
  106. package/dist/index22.vue.d.cts +75 -25
  107. package/dist/index22.vue.d.ts +72 -78
  108. package/dist/index23.vue.d.cts +97 -75
  109. package/dist/index23.vue.d.ts +96 -68
  110. package/dist/index24.vue.d.cts +47 -89
  111. package/dist/index24.vue.d.ts +47 -89
  112. package/dist/index25.vue.d.cts +19 -127
  113. package/dist/index25.vue.d.ts +19 -127
  114. package/dist/index26.vue.d.cts +87 -94
  115. package/dist/index26.vue.d.ts +87 -94
  116. package/dist/index27.vue.d.cts +36 -66
  117. package/dist/index27.vue.d.ts +36 -66
  118. package/dist/index28.vue.d.cts +12 -96
  119. package/dist/index28.vue.d.ts +12 -96
  120. package/dist/index29.vue.d.cts +85 -94
  121. package/dist/index29.vue.d.ts +85 -94
  122. package/dist/index3.vue.d.cts +4 -4
  123. package/dist/index3.vue.d.ts +4 -4
  124. package/dist/index30.vue.d.cts +103 -21
  125. package/dist/index30.vue.d.ts +103 -21
  126. package/dist/index31.vue.d.cts +75 -0
  127. package/dist/index31.vue.d.ts +75 -0
  128. package/dist/index6.vue.d.ts +2 -2
  129. package/dist/index7.vue.d.cts +2 -2
  130. package/dist/index7.vue.d.ts +2 -2
  131. package/dist/index8.vue.d.cts +2 -2
  132. package/dist/index8.vue.d.ts +2 -2
  133. package/dist/index9.vue.d.cts +2 -2
  134. package/dist/index9.vue.d.ts +1 -1
  135. package/dist/mapUtils.d.cts +1 -1
  136. package/dist/mapUtils.d.ts +1 -1
  137. package/dist/options.cjs +1 -0
  138. package/dist/options.d.cts +9 -0
  139. package/dist/options.js +1 -0
  140. package/dist/serializeSearch.cjs +1 -1
  141. package/dist/serializeSearch.js +1 -1
  142. package/dist/style.css +256 -251
  143. package/dist/useCalendarEvents.d.cts +1 -1
  144. package/dist/useCalendarEvents.d.ts +1 -1
  145. package/dist/useCollapsePanel.d.cts +5 -5
  146. package/dist/useCollapsePanel.d.ts +5 -5
  147. package/dist/useComponentLocale.cjs +1 -1
  148. package/dist/useComponentLocale.js +1 -1
  149. package/dist/useCropperCore.d.cts +5 -5
  150. package/dist/useCropperCore.d.ts +5 -5
  151. package/dist/useDynamicFormState.d.cts +11 -969
  152. package/dist/useDynamicFormState.d.ts +11 -959
  153. package/dist/useEdgeInteraction.d.cts +3 -3
  154. package/dist/useEdgeInteraction.d.ts +3 -3
  155. package/dist/useFormConfig.d.cts +5 -5
  156. package/dist/useFormConfig.d.ts +13 -6
  157. package/dist/useFullscreen.d.cts +3 -3
  158. package/dist/useFullscreen.d.ts +3 -3
  159. package/dist/useInfiniteScroll.d.cts +4 -4
  160. package/dist/useInfiniteScroll.d.ts +4 -4
  161. package/dist/useQRCode.d.cts +2 -2
  162. package/dist/useQRCode.d.ts +2 -2
  163. package/dist/useSignatureHistory.d.cts +6 -6
  164. package/dist/useSignatureHistory.d.ts +6 -6
  165. package/dist/useSplitResize.d.cts +6 -6
  166. package/dist/useSplitResize.d.ts +6 -6
  167. package/dist/useTableQuery.d.cts +905 -0
  168. package/dist/useTableQuery.d.ts +895 -0
  169. package/dist/useWorkflowValidation.d.cts +4 -4
  170. package/dist/useWorkflowValidation.d.ts +4 -4
  171. package/docs/guides/data-workflows.md +8 -48
  172. package/docs/guides/search-workflows.md +3 -5
  173. package/docs/guides/table-density.md +9 -1
  174. package/docs/guides/usage.en.md +4 -0
  175. package/docs/guides/usage.md +41 -0
  176. package/package.json +1 -1
  177. package/dist/dictionary.cjs +0 -1
  178. package/dist/dictionary.d.cts +0 -47
  179. package/dist/dictionary.d.ts +0 -47
  180. package/dist/dictionary.js +0 -1
  181. package/dist/useDictionary.cjs +0 -1
  182. package/dist/useDictionary.js +0 -1
@@ -1,28 +1,110 @@
1
- import { n as ComponentLocale } from "./contracts.cjs";
2
1
  import * as vue from "vue";
3
2
 
4
- //#region src/components/C_SectionNav/types.d.ts
5
- interface SectionNavItem {
6
- key: string;
7
- label: string;
8
- errorCount?: number;
9
- disabled?: boolean;
3
+ //#region src/components/C_Timeline/types.d.ts
4
+ /**
5
+ * @Description: 时间线组件类型定义
6
+ */
7
+ /** 单条时间线节点 */
8
+ interface TimelineItem {
9
+ /** 唯一标识 */
10
+ id: string | number;
11
+ /** 标题 */
12
+ title: string;
13
+ /** 描述内容(支持 HTML 字符串) */
14
+ content?: string;
15
+ /** 时间标签 */
16
+ time?: string;
17
+ /** 节点颜色(CSS 颜色值) */
18
+ color?: string;
19
+ /** 节点图标(Iconify 图标名) */
20
+ icon?: string;
21
+ /** 节点状态 */
22
+ status?: 'default' | 'success' | 'warning' | 'error' | 'info';
23
+ /** 是否可展开/折叠详情 */
24
+ collapsible?: boolean;
25
+ /** 初始是否展开 */
26
+ defaultExpanded?: boolean;
27
+ /** 附加标签组 */
28
+ tags?: Array<{
29
+ text: string;
30
+ type?: string;
31
+ }>;
32
+ /** 自定义额外数据 */
33
+ extra?: Record<string, unknown>;
10
34
  }
11
- interface SectionNavProps {
12
- items: readonly SectionNavItem[];
13
- modelValue?: string;
14
- ariaLabel?: string;
15
- locale?: ComponentLocale;
35
+ /** 组件 Props */
36
+ interface TimelineProps {
37
+ /** 时间线数据 */
38
+ items: TimelineItem[];
39
+ /** 布局方向 */
40
+ mode?: 'vertical' | 'horizontal';
41
+ /** 垂直模式下时间标签位置 */
42
+ labelPlacement?: 'left' | 'right' | 'alternate';
43
+ /** 是否显示尾部加载更多指示 */
44
+ pending?: boolean;
45
+ /** 加载更多文案 */
46
+ pendingText?: string;
47
+ /** 是否反转排列(最新在前) */
48
+ reverse?: boolean;
49
+ /** 节点大小 */
50
+ size?: 'small' | 'medium' | 'large';
51
+ /** 连接线样式 */
52
+ lineType?: 'solid' | 'dashed' | 'dotted';
53
+ /** 是否显示时间标签 */
54
+ showTime?: boolean;
16
55
  }
56
+ /** 默认 Props */
57
+ declare const DEFAULT_TIMELINE_PROPS: {
58
+ mode: "vertical";
59
+ labelPlacement: "right";
60
+ pending: boolean;
61
+ pendingText: string;
62
+ reverse: boolean;
63
+ size: "medium";
64
+ lineType: "solid";
65
+ showTime: boolean;
66
+ };
67
+ /** 状态 → 颜色映射 */
68
+ declare const STATUS_COLOR_MAP: Record<string, string>;
17
69
  //#endregion
18
- //#region src/components/C_SectionNav/index.vue.d.ts
19
- declare const __VLS_export: vue.DefineComponent<SectionNavProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
20
- "update:modelValue": (key: string) => any;
21
- select: (key: string) => any;
22
- }, string, vue.PublicProps, Readonly<SectionNavProps> & Readonly<{
23
- "onUpdate:modelValue"?: ((key: string) => any) | undefined;
24
- onSelect?: ((key: string) => any) | undefined;
25
- }>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
70
+ //#region src/components/C_Timeline/index.vue.d.ts
71
+ declare var __VLS_1: {
72
+ item: TimelineItem;
73
+ index: number;
74
+ }, __VLS_8: {
75
+ item: TimelineItem;
76
+ index: number;
77
+ };
78
+ type __VLS_Slots = {} & {
79
+ dot?: (props: typeof __VLS_1) => any;
80
+ } & {
81
+ title?: (props: typeof __VLS_8) => any;
82
+ };
83
+ declare const __VLS_base: vue.DefineComponent<TimelineProps, {
84
+ /** 展开全部 */expandAll: () => void; /** 折叠全部 */
85
+ collapseAll: () => void;
86
+ }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
87
+ expand: (item: TimelineItem, expanded: boolean) => any;
88
+ "item-click": (item: TimelineItem, index: number) => any;
89
+ }, string, vue.PublicProps, Readonly<TimelineProps> & Readonly<{
90
+ onExpand?: ((item: TimelineItem, expanded: boolean) => any) | undefined;
91
+ "onItem-click"?: ((item: TimelineItem, index: number) => any) | undefined;
92
+ }>, {
93
+ reverse: boolean;
94
+ size: "small" | "medium" | "large";
95
+ items: TimelineItem[];
96
+ mode: "vertical" | "horizontal";
97
+ pending: boolean;
98
+ labelPlacement: "left" | "right" | "alternate";
99
+ lineType: "solid" | "dashed" | "dotted";
100
+ showTime: boolean;
101
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
102
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
26
103
  declare const _default: typeof __VLS_export;
104
+ type __VLS_WithSlots<T, S> = T & {
105
+ new (): {
106
+ $slots: S;
107
+ };
108
+ };
27
109
  //#endregion
28
- export { SectionNavItem as n, SectionNavProps as r, _default as t };
110
+ export { TimelineProps as a, TimelineItem as i, DEFAULT_TIMELINE_PROPS as n, STATUS_COLOR_MAP as r, _default as t };
@@ -1,28 +1,110 @@
1
- import { n as ComponentLocale } from "./contracts.js";
2
1
  import * as vue from "vue";
3
2
 
4
- //#region src/components/C_SectionNav/types.d.ts
5
- interface SectionNavItem {
6
- key: string;
7
- label: string;
8
- errorCount?: number;
9
- disabled?: boolean;
3
+ //#region src/components/C_Timeline/types.d.ts
4
+ /**
5
+ * @Description: 时间线组件类型定义
6
+ */
7
+ /** 单条时间线节点 */
8
+ interface TimelineItem {
9
+ /** 唯一标识 */
10
+ id: string | number;
11
+ /** 标题 */
12
+ title: string;
13
+ /** 描述内容(支持 HTML 字符串) */
14
+ content?: string;
15
+ /** 时间标签 */
16
+ time?: string;
17
+ /** 节点颜色(CSS 颜色值) */
18
+ color?: string;
19
+ /** 节点图标(Iconify 图标名) */
20
+ icon?: string;
21
+ /** 节点状态 */
22
+ status?: 'default' | 'success' | 'warning' | 'error' | 'info';
23
+ /** 是否可展开/折叠详情 */
24
+ collapsible?: boolean;
25
+ /** 初始是否展开 */
26
+ defaultExpanded?: boolean;
27
+ /** 附加标签组 */
28
+ tags?: Array<{
29
+ text: string;
30
+ type?: string;
31
+ }>;
32
+ /** 自定义额外数据 */
33
+ extra?: Record<string, unknown>;
10
34
  }
11
- interface SectionNavProps {
12
- items: readonly SectionNavItem[];
13
- modelValue?: string;
14
- ariaLabel?: string;
15
- locale?: ComponentLocale;
35
+ /** 组件 Props */
36
+ interface TimelineProps {
37
+ /** 时间线数据 */
38
+ items: TimelineItem[];
39
+ /** 布局方向 */
40
+ mode?: 'vertical' | 'horizontal';
41
+ /** 垂直模式下时间标签位置 */
42
+ labelPlacement?: 'left' | 'right' | 'alternate';
43
+ /** 是否显示尾部加载更多指示 */
44
+ pending?: boolean;
45
+ /** 加载更多文案 */
46
+ pendingText?: string;
47
+ /** 是否反转排列(最新在前) */
48
+ reverse?: boolean;
49
+ /** 节点大小 */
50
+ size?: 'small' | 'medium' | 'large';
51
+ /** 连接线样式 */
52
+ lineType?: 'solid' | 'dashed' | 'dotted';
53
+ /** 是否显示时间标签 */
54
+ showTime?: boolean;
16
55
  }
56
+ /** 默认 Props */
57
+ declare const DEFAULT_TIMELINE_PROPS: {
58
+ mode: "vertical";
59
+ labelPlacement: "right";
60
+ pending: boolean;
61
+ pendingText: string;
62
+ reverse: boolean;
63
+ size: "medium";
64
+ lineType: "solid";
65
+ showTime: boolean;
66
+ };
67
+ /** 状态 → 颜色映射 */
68
+ declare const STATUS_COLOR_MAP: Record<string, string>;
17
69
  //#endregion
18
- //#region src/components/C_SectionNav/index.vue.d.ts
19
- declare const __VLS_export: vue.DefineComponent<SectionNavProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
20
- "update:modelValue": (key: string) => any;
21
- select: (key: string) => any;
22
- }, string, vue.PublicProps, Readonly<SectionNavProps> & Readonly<{
23
- "onUpdate:modelValue"?: ((key: string) => any) | undefined;
24
- onSelect?: ((key: string) => any) | undefined;
25
- }>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
70
+ //#region src/components/C_Timeline/index.vue.d.ts
71
+ declare var __VLS_1: {
72
+ item: TimelineItem;
73
+ index: number;
74
+ }, __VLS_8: {
75
+ item: TimelineItem;
76
+ index: number;
77
+ };
78
+ type __VLS_Slots = {} & {
79
+ dot?: (props: typeof __VLS_1) => any;
80
+ } & {
81
+ title?: (props: typeof __VLS_8) => any;
82
+ };
83
+ declare const __VLS_base: vue.DefineComponent<TimelineProps, {
84
+ /** 展开全部 */expandAll: () => void; /** 折叠全部 */
85
+ collapseAll: () => void;
86
+ }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
87
+ expand: (item: TimelineItem, expanded: boolean) => any;
88
+ "item-click": (item: TimelineItem, index: number) => any;
89
+ }, string, vue.PublicProps, Readonly<TimelineProps> & Readonly<{
90
+ onExpand?: ((item: TimelineItem, expanded: boolean) => any) | undefined;
91
+ "onItem-click"?: ((item: TimelineItem, index: number) => any) | undefined;
92
+ }>, {
93
+ reverse: boolean;
94
+ size: "small" | "medium" | "large";
95
+ items: TimelineItem[];
96
+ mode: "vertical" | "horizontal";
97
+ pending: boolean;
98
+ labelPlacement: "left" | "right" | "alternate";
99
+ lineType: "solid" | "dashed" | "dotted";
100
+ showTime: boolean;
101
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
102
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
26
103
  declare const _default: typeof __VLS_export;
104
+ type __VLS_WithSlots<T, S> = T & {
105
+ new (): {
106
+ $slots: S;
107
+ };
108
+ };
27
109
  //#endregion
28
- export { SectionNavItem as n, SectionNavProps as r, _default as t };
110
+ export { TimelineProps as a, TimelineItem as i, DEFAULT_TIMELINE_PROPS as n, STATUS_COLOR_MAP as r, _default as t };
@@ -0,0 +1,75 @@
1
+ import * as vue from "vue";
2
+
3
+ //#region src/components/C_Transfer/types.d.ts
4
+ /**
5
+ * @Description: 穿梭框组件类型定义
6
+ */
7
+ /** 穿梭框数据项 */
8
+ interface TransferItem<K extends string | number = string | number> {
9
+ /** 唯一标识 */
10
+ key: K;
11
+ /** 显示标签 */
12
+ label: string;
13
+ /** 是否禁用 */
14
+ disabled?: boolean;
15
+ /** 分组名称 */
16
+ group?: string;
17
+ /** 描述信息(用于详细模式) */
18
+ description?: string;
19
+ /** 图标(Iconify) */
20
+ icon?: string;
21
+ /** 额外数据 */
22
+ extra?: Record<string, unknown>;
23
+ }
24
+ /** 组件 Props */
25
+ interface TransferProps<T extends TransferItem = TransferItem> {
26
+ /** 数据源 */
27
+ data: readonly T[];
28
+ /** 右侧已选 key 列表 (v-model) */
29
+ modelValue: readonly NoInfer<T['key']>[];
30
+ /** 左右栏标题 */
31
+ titles?: readonly [string, string];
32
+ /** 是否可搜索 */
33
+ filterable?: boolean;
34
+ /** 搜索占位符 */
35
+ filterPlaceholder?: string;
36
+ /** 自定义筛选函数 */
37
+ filterMethod?: (query: string, item: T) => boolean;
38
+ /** 是否显示全选复选框 */
39
+ showSelectAll?: boolean;
40
+ /** 左侧空状态描述 */
41
+ sourceEmptyText?: string;
42
+ /** 右侧空状态描述 */
43
+ targetEmptyText?: string;
44
+ /** 尺寸 */
45
+ size?: 'small' | 'medium' | 'large';
46
+ /** 大列表自动使用虚拟滚动;自定义可变行高或需要完整 DOM 时可关闭。默认 true,100 项起启用。 */
47
+ virtualScroll?: boolean;
48
+ }
49
+ /** 事件保留数据源的键类型,例如纯数字键仍为 number[]。 */
50
+ interface TransferEmits<T extends TransferItem = TransferItem> {
51
+ 'update:modelValue': [value: Array<T['key']>];
52
+ change: [targetKeys: Array<T['key']>, direction: 'left' | 'right', moveKeys: Array<T['key']>];
53
+ }
54
+ /** 默认 Props */
55
+ declare const DEFAULT_TRANSFER_PROPS: Partial<TransferProps>;
56
+ //#endregion
57
+ //#region src/components/C_Transfer/index.vue.d.ts
58
+ declare const __VLS_export: <T extends TransferItem = TransferItem>(__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<{
59
+ props: vue.PublicProps & __VLS_PrettifyLocal<TransferProps<T> & {
60
+ onChange?: ((targetKeys: T["key"][], direction: "left" | "right", moveKeys: T["key"][]) => any) | undefined;
61
+ "onUpdate:modelValue"?: ((value: T["key"][]) => any) | undefined;
62
+ }> & (typeof globalThis extends {
63
+ __VLS_PROPS_FALLBACK: infer P;
64
+ } ? P : {});
65
+ expose: (exposed: {}) => void;
66
+ attrs: any;
67
+ slots: {};
68
+ emit: ((evt: "change", targetKeys: T["key"][], direction: "left" | "right", moveKeys: T["key"][]) => void) & ((evt: "update:modelValue", value: T["key"][]) => void);
69
+ }>) => vue.VNode & {
70
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
71
+ };
72
+ declare const _default: typeof __VLS_export;
73
+ type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K] } : { [K in keyof T as K]: T[K] }) & {};
74
+ //#endregion
75
+ export { TransferProps as a, TransferItem as i, DEFAULT_TRANSFER_PROPS as n, TransferEmits as r, _default as t };
@@ -0,0 +1,75 @@
1
+ import * as vue from "vue";
2
+
3
+ //#region src/components/C_Transfer/types.d.ts
4
+ /**
5
+ * @Description: 穿梭框组件类型定义
6
+ */
7
+ /** 穿梭框数据项 */
8
+ interface TransferItem<K extends string | number = string | number> {
9
+ /** 唯一标识 */
10
+ key: K;
11
+ /** 显示标签 */
12
+ label: string;
13
+ /** 是否禁用 */
14
+ disabled?: boolean;
15
+ /** 分组名称 */
16
+ group?: string;
17
+ /** 描述信息(用于详细模式) */
18
+ description?: string;
19
+ /** 图标(Iconify) */
20
+ icon?: string;
21
+ /** 额外数据 */
22
+ extra?: Record<string, unknown>;
23
+ }
24
+ /** 组件 Props */
25
+ interface TransferProps<T extends TransferItem = TransferItem> {
26
+ /** 数据源 */
27
+ data: readonly T[];
28
+ /** 右侧已选 key 列表 (v-model) */
29
+ modelValue: readonly NoInfer<T['key']>[];
30
+ /** 左右栏标题 */
31
+ titles?: readonly [string, string];
32
+ /** 是否可搜索 */
33
+ filterable?: boolean;
34
+ /** 搜索占位符 */
35
+ filterPlaceholder?: string;
36
+ /** 自定义筛选函数 */
37
+ filterMethod?: (query: string, item: T) => boolean;
38
+ /** 是否显示全选复选框 */
39
+ showSelectAll?: boolean;
40
+ /** 左侧空状态描述 */
41
+ sourceEmptyText?: string;
42
+ /** 右侧空状态描述 */
43
+ targetEmptyText?: string;
44
+ /** 尺寸 */
45
+ size?: 'small' | 'medium' | 'large';
46
+ /** 大列表自动使用虚拟滚动;自定义可变行高或需要完整 DOM 时可关闭。默认 true,100 项起启用。 */
47
+ virtualScroll?: boolean;
48
+ }
49
+ /** 事件保留数据源的键类型,例如纯数字键仍为 number[]。 */
50
+ interface TransferEmits<T extends TransferItem = TransferItem> {
51
+ 'update:modelValue': [value: Array<T['key']>];
52
+ change: [targetKeys: Array<T['key']>, direction: 'left' | 'right', moveKeys: Array<T['key']>];
53
+ }
54
+ /** 默认 Props */
55
+ declare const DEFAULT_TRANSFER_PROPS: Partial<TransferProps>;
56
+ //#endregion
57
+ //#region src/components/C_Transfer/index.vue.d.ts
58
+ declare const __VLS_export: <T extends TransferItem = TransferItem>(__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<{
59
+ props: vue.PublicProps & __VLS_PrettifyLocal<TransferProps<T> & {
60
+ onChange?: ((targetKeys: T["key"][], direction: "left" | "right", moveKeys: T["key"][]) => any) | undefined;
61
+ "onUpdate:modelValue"?: ((value: T["key"][]) => any) | undefined;
62
+ }> & (typeof globalThis extends {
63
+ __VLS_PROPS_FALLBACK: infer P;
64
+ } ? P : {});
65
+ expose: (exposed: {}) => void;
66
+ attrs: any;
67
+ slots: {};
68
+ emit: ((evt: "change", targetKeys: T["key"][], direction: "left" | "right", moveKeys: T["key"][]) => void) & ((evt: "update:modelValue", value: T["key"][]) => void);
69
+ }>) => vue.VNode & {
70
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
71
+ };
72
+ declare const _default: typeof __VLS_export;
73
+ type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K] } : { [K in keyof T as K]: T[K] }) & {};
74
+ //#endregion
75
+ export { TransferProps as a, TransferItem as i, DEFAULT_TRANSFER_PROPS as n, TransferEmits as r, _default as t };
@@ -19,11 +19,11 @@ type __VLS_Props = {
19
19
  modelValue?: CascadeValue;
20
20
  };
21
21
  declare const __VLS_export: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
22
- "update:modelValue": (value: CascadeValue) => any;
23
22
  change: (value: CascadeValue) => any;
23
+ "update:modelValue": (value: CascadeValue) => any;
24
24
  }, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{
25
- "onUpdate:modelValue"?: ((value: CascadeValue) => any) | undefined;
26
25
  onChange?: ((value: CascadeValue) => any) | undefined;
26
+ "onUpdate:modelValue"?: ((value: CascadeValue) => any) | undefined;
27
27
  }>, {
28
28
  placeholders: string[];
29
29
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
@@ -19,11 +19,11 @@ type __VLS_Props = {
19
19
  modelValue?: CascadeValue;
20
20
  };
21
21
  declare const __VLS_export: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
22
- "update:modelValue": (value: CascadeValue) => any;
23
22
  change: (value: CascadeValue) => any;
23
+ "update:modelValue": (value: CascadeValue) => any;
24
24
  }, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{
25
- "onUpdate:modelValue"?: ((value: CascadeValue) => any) | undefined;
26
25
  onChange?: ((value: CascadeValue) => any) | undefined;
26
+ "onUpdate:modelValue"?: ((value: CascadeValue) => any) | undefined;
27
27
  }>, {
28
28
  placeholders: string[];
29
29
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
@@ -88,18 +88,18 @@ type __VLS_Slots = {} & {
88
88
  declare const __VLS_base: vue.DefineComponent<ChatProps, {
89
89
  scrollToBottom: () => void;
90
90
  }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
91
+ "load-more": () => any;
91
92
  send: (content: string) => any;
92
93
  "select-contact": (id: string) => any;
93
- "load-more": () => any;
94
94
  "image-preview": (url: string) => any;
95
95
  "file-click": (msg: ChatMessage) => any;
96
96
  "file-upload": () => any;
97
97
  "emoji-click": () => any;
98
98
  resend: (msg: ChatMessage) => any;
99
99
  }, string, vue.PublicProps, Readonly<ChatProps> & Readonly<{
100
+ "onLoad-more"?: (() => any) | undefined;
100
101
  onSend?: ((content: string) => any) | undefined;
101
102
  "onSelect-contact"?: ((id: string) => any) | undefined;
102
- "onLoad-more"?: (() => any) | undefined;
103
103
  "onImage-preview"?: ((url: string) => any) | undefined;
104
104
  "onFile-click"?: ((msg: ChatMessage) => any) | undefined;
105
105
  "onFile-upload"?: (() => any) | undefined;
@@ -88,18 +88,18 @@ type __VLS_Slots = {} & {
88
88
  declare const __VLS_base: vue.DefineComponent<ChatProps, {
89
89
  scrollToBottom: () => void;
90
90
  }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
91
+ "load-more": () => any;
91
92
  send: (content: string) => any;
92
93
  "select-contact": (id: string) => any;
93
- "load-more": () => any;
94
94
  "image-preview": (url: string) => any;
95
95
  "file-click": (msg: ChatMessage) => any;
96
96
  "file-upload": () => any;
97
97
  "emoji-click": () => any;
98
98
  resend: (msg: ChatMessage) => any;
99
99
  }, string, vue.PublicProps, Readonly<ChatProps> & Readonly<{
100
+ "onLoad-more"?: (() => any) | undefined;
100
101
  onSend?: ((content: string) => any) | undefined;
101
102
  "onSelect-contact"?: ((id: string) => any) | undefined;
102
- "onLoad-more"?: (() => any) | undefined;
103
103
  "onImage-preview"?: ((url: string) => any) | undefined;
104
104
  "onFile-click"?: ((msg: ChatMessage) => any) | undefined;
105
105
  "onFile-upload"?: (() => any) | undefined;
@@ -14,11 +14,11 @@ type __VLS_Slots = {} & {
14
14
  trigger?: (props: typeof __VLS_9) => any;
15
15
  };
16
16
  declare const __VLS_base: vue.DefineComponent<Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
17
- "update:modelValue": (value: string) => any;
18
17
  change: (value: string) => any;
18
+ "update:modelValue": (value: string) => any;
19
19
  }, string, vue.PublicProps, Readonly<Props> & Readonly<{
20
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
21
20
  onChange?: ((value: string) => any) | undefined;
21
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
22
22
  }>, {
23
23
  placeholder: string;
24
24
  showLetters: boolean;
@@ -14,11 +14,11 @@ type __VLS_Slots = {} & {
14
14
  trigger?: (props: typeof __VLS_9) => any;
15
15
  };
16
16
  declare const __VLS_base: vue.DefineComponent<Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
17
- "update:modelValue": (value: string) => any;
18
17
  change: (value: string) => any;
18
+ "update:modelValue": (value: string) => any;
19
19
  }, string, vue.PublicProps, Readonly<Props> & Readonly<{
20
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
21
20
  onChange?: ((value: string) => any) | undefined;
21
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
22
22
  }>, {
23
23
  placeholder: string;
24
24
  showLetters: boolean;
@@ -32,9 +32,9 @@ declare const __VLS_export: vue.DefineComponent<Props, {
32
32
  onFullscreen?: ((isFullscreen: boolean) => any) | undefined;
33
33
  }>, {
34
34
  trim: boolean;
35
+ showHeader: boolean;
35
36
  code: string;
36
37
  language: string;
37
- showHeader: boolean;
38
38
  showLineNumbers: boolean;
39
39
  wordWrap: boolean;
40
40
  showFullscreen: boolean;
@@ -93,9 +93,9 @@ declare const __VLS_export: vue.DefineComponent<MapProps, MapExpose, {}, {}, {},
93
93
  }>, {
94
94
  height: string;
95
95
  center: MapCoordinate;
96
+ ariaLabel: string;
96
97
  zoom: number;
97
98
  mapType: MapType;
98
- ariaLabel: string;
99
99
  markers: MapMarker[];
100
100
  amapKey: string;
101
101
  amapLoadTimeout: number;
@@ -93,9 +93,9 @@ declare const __VLS_export: vue.DefineComponent<MapProps, MapExpose, {}, {}, {},
93
93
  }>, {
94
94
  height: string;
95
95
  center: MapCoordinate;
96
+ ariaLabel: string;
96
97
  zoom: number;
97
98
  mapType: MapType;
98
- ariaLabel: string;
99
99
  markers: MapMarker[];
100
100
  amapKey: string;
101
101
  amapLoadTimeout: number;
@@ -0,0 +1 @@
1
+ const e=Symbol(`c-option-value`);function t(e,t){return(Array.isArray(t)?t:[t]).some(e=>typeof e==`boolean`)||e?.some(e=>typeof e.value==`boolean`)===!0}function n(t,n){let r=t?.map(e=>e.value??e.label??e.labelDefault),i=Array.isArray(n)?n:[n],a=new Set([...r??[],...i]),o=new Map;for(let e of[!1,!0]){let t=`__c_option_boolean_${e}__`;for(;a.has(t);)t+=`_`;o.set(e,t),a.add(t)}let s=e=>typeof e==`boolean`?o.get(e):typeof e==`string`||typeof e==`number`?e:null,c=(t,n)=>{if(n!==void 0){if(n&&typeof n==`object`&&Object.prototype.hasOwnProperty.call(n,e)){let t=n[e];if(typeof t==`boolean`)return t}return t}return t===o.get(!1)?!1:t===o.get(!0)?!0:t};return{options:t?.map((t,n)=>({...t,label:t.label??t.labelDefault??``,value:s(r[n])??void 0,[e]:r[n]})),value:Array.isArray(n)?n.map(s).filter(e=>e!==null):s(n),fallbackOption:t=>({value:t,label:String(c(t)),[e]:c(t)}),decode:(e,t)=>Array.isArray(e)?e.map((e,n)=>c(e,Array.isArray(t)?t[n]:void 0)):e===null?null:c(e,t)}}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return n}});
@@ -0,0 +1,9 @@
1
+ //#region src/core/options.d.ts
2
+ /** 受控选项状态:组件只呈现传入值,不识别数据来源或管理外部请求。 */
3
+ interface OptionsState {
4
+ loading?: boolean;
5
+ error?: unknown;
6
+ retry?: () => void | Promise<unknown>;
7
+ }
8
+ //#endregion
9
+ export { OptionsState as t };
@@ -0,0 +1 @@
1
+ const e=Symbol(`c-option-value`);function t(e,t){return(Array.isArray(t)?t:[t]).some(e=>typeof e==`boolean`)||e?.some(e=>typeof e.value==`boolean`)===!0}function n(t,n){let r=t?.map(e=>e.value??e.label??e.labelDefault),i=Array.isArray(n)?n:[n],a=new Set([...r??[],...i]),o=new Map;for(let e of[!1,!0]){let t=`__c_option_boolean_${e}__`;for(;a.has(t);)t+=`_`;o.set(e,t),a.add(t)}let s=e=>typeof e==`boolean`?o.get(e):typeof e==`string`||typeof e==`number`?e:null,c=(t,n)=>{if(n!==void 0){if(n&&typeof n==`object`&&Object.prototype.hasOwnProperty.call(n,e)){let t=n[e];if(typeof t==`boolean`)return t}return t}return t===o.get(!1)?!1:t===o.get(!0)?!0:t};return{options:t?.map((t,n)=>({...t,label:t.label??t.labelDefault??``,value:s(r[n])??void 0,[e]:r[n]})),value:Array.isArray(n)?n.map(s).filter(e=>e!==null):s(n),fallbackOption:t=>({value:t,label:String(c(t)),[e]:c(t)}),decode:(e,t)=>Array.isArray(e)?e.map((e,n)=>c(e,Array.isArray(t)?t[n]:void 0)):e===null?null:c(e,t)}}export{t as n,n as t};