@robot-admin/naive-ui-components 0.29.2 → 0.30.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 +3 -1
  3. package/README_EN.md +3 -1
  4. package/dist/C_ActionBar.css +52 -49
  5. package/dist/C_ActionBar2.cjs +1 -1
  6. package/dist/C_ActionBar2.js +1 -1
  7. package/dist/C_DataPicker.cjs +1 -1
  8. package/dist/C_DataPicker.css +29 -28
  9. package/dist/C_DataPicker.d.cts +2 -2
  10. package/dist/C_DataPicker.d.ts +3 -2
  11. package/dist/C_DataPicker.js +1 -1
  12. package/dist/C_Density.d.cts +1 -1
  13. package/dist/C_Density.d.ts +1 -1
  14. package/dist/C_Editor.d.cts +1 -1
  15. package/dist/C_Editor.d.ts +1 -1
  16. package/dist/C_ErrorSummary.d.cts +1 -1
  17. package/dist/C_ErrorSummary.d.ts +1 -1
  18. package/dist/C_FilePreview2.js +1 -1
  19. package/dist/C_Form.d.cts +2 -1
  20. package/dist/C_Form.d.ts +2 -1
  21. package/dist/C_FormModal.css +52 -49
  22. package/dist/C_FormModal.d.cts +1 -1
  23. package/dist/C_FormModal.d.ts +2 -1
  24. package/dist/C_FormSearch.css +66 -66
  25. package/dist/C_Guide.d.cts +1 -1
  26. package/dist/C_Guide.d.ts +1 -1
  27. package/dist/C_Icon.d.cts +1 -1
  28. package/dist/C_Icon.d.ts +1 -1
  29. package/dist/C_Language.d.cts +1 -1
  30. package/dist/C_Language.d.ts +1 -1
  31. package/dist/C_Loading.d.cts +1 -1
  32. package/dist/C_Loading.d.ts +1 -1
  33. package/dist/C_Login.d.cts +1 -1
  34. package/dist/C_Login.d.ts +1 -1
  35. package/dist/C_Markdown.d.cts +1 -1
  36. package/dist/C_Markdown.d.ts +1 -1
  37. package/dist/C_Menu.d.ts +1 -1
  38. package/dist/C_OrgChart.d.cts +1 -1
  39. package/dist/C_OrgChart.d.ts +1 -1
  40. package/dist/C_Progress.d.cts +1 -1
  41. package/dist/C_Progress.d.ts +1 -1
  42. package/dist/C_SectionNav.d.cts +1 -1
  43. package/dist/C_SectionNav.d.ts +1 -1
  44. package/dist/C_Skeleton.d.cts +1 -1
  45. package/dist/C_Skeleton.d.ts +1 -1
  46. package/dist/C_Steps.d.cts +1 -1
  47. package/dist/C_Steps.d.ts +1 -1
  48. package/dist/C_Table.base.css +161 -158
  49. package/dist/C_Table.cjs +1 -1
  50. package/dist/C_Table.css +161 -158
  51. package/dist/C_Table.d.cts +2 -2
  52. package/dist/C_Table.d.ts +7 -6
  53. package/dist/C_Table.js +1 -1
  54. package/dist/C_Table2.cjs +3 -3
  55. package/dist/C_Table2.js +3 -3
  56. package/dist/C_TagsView.d.cts +1 -1
  57. package/dist/C_TagsView.d.ts +1 -1
  58. package/dist/C_Theme.d.cts +1 -1
  59. package/dist/C_Theme.d.ts +1 -1
  60. package/dist/C_Timeline.d.cts +1 -1
  61. package/dist/C_Timeline.d.ts +1 -1
  62. package/dist/C_Transfer.d.cts +1 -1
  63. package/dist/C_Transfer.d.ts +1 -1
  64. package/dist/C_Tree.d.ts +6 -5
  65. package/dist/constants.d.cts +1 -1
  66. package/dist/constants.d.ts +1 -1
  67. package/dist/constants3.d.cts +1 -1
  68. package/dist/constants3.d.ts +1 -1
  69. package/dist/constants4.d.cts +4 -4
  70. package/dist/constants4.d.ts +4 -4
  71. package/dist/data2.d.cts +9 -9
  72. package/dist/data2.d.ts +9 -9
  73. package/dist/dateRange.d.cts +10 -2
  74. package/dist/dateRange.d.ts +10 -2
  75. package/dist/formField.cjs +1 -0
  76. package/dist/formField.d.cts +1179 -0
  77. package/dist/formField.d.ts +1179 -0
  78. package/dist/formField.js +1 -0
  79. package/dist/helpers2.cjs +1 -0
  80. package/dist/helpers2.js +1 -0
  81. package/dist/index.cjs +1 -1
  82. package/dist/index.d.cts +23 -22
  83. package/dist/index.d.ts +24 -23
  84. package/dist/index.js +1 -1
  85. package/dist/index.vue.d.cts +5 -5
  86. package/dist/index.vue.d.ts +5 -5
  87. package/dist/index10.vue.d.cts +3 -3
  88. package/dist/index10.vue.d.ts +3 -3
  89. package/dist/index11.vue.d.cts +3 -3
  90. package/dist/index11.vue.d.ts +13 -1157
  91. package/dist/index12.vue.d.cts +13 -1157
  92. package/dist/index12.vue.d.ts +59 -16
  93. package/dist/index13.vue.d.cts +59 -16
  94. package/dist/index13.vue.d.ts +17 -57
  95. package/dist/index14.vue.d.cts +17 -57
  96. package/dist/index14.vue.d.ts +55 -18
  97. package/dist/index15.vue.d.cts +55 -18
  98. package/dist/index15.vue.d.ts +124 -53
  99. package/dist/index16.vue.d.cts +124 -53
  100. package/dist/index16.vue.d.ts +51 -123
  101. package/dist/index17.vue.d.cts +51 -123
  102. package/dist/index17.vue.d.ts +25 -52
  103. package/dist/index18.vue.d.cts +25 -52
  104. package/dist/index18.vue.d.ts +12 -25
  105. package/dist/index19.vue.d.cts +12 -25
  106. package/dist/index19.vue.d.ts +129 -13
  107. package/dist/index2.vue.d.cts +2 -2
  108. package/dist/index2.vue.d.ts +2 -2
  109. package/dist/index20.vue.d.cts +129 -13
  110. package/dist/index20.vue.d.ts +76 -129
  111. package/dist/index21.vue.d.cts +76 -129
  112. package/dist/index21.vue.d.ts +72 -78
  113. package/dist/index22.vue.d.cts +97 -75
  114. package/dist/index22.vue.d.ts +96 -68
  115. package/dist/index23.vue.d.cts +40 -91
  116. package/dist/index23.vue.d.ts +40 -91
  117. package/dist/index24.vue.d.cts +23 -49
  118. package/dist/index24.vue.d.ts +23 -49
  119. package/dist/index25.vue.d.cts +96 -21
  120. package/dist/index25.vue.d.ts +96 -21
  121. package/dist/index26.vue.d.cts +37 -95
  122. package/dist/index26.vue.d.ts +37 -95
  123. package/dist/index27.vue.d.cts +8 -34
  124. package/dist/index27.vue.d.ts +8 -34
  125. package/dist/index28.vue.d.cts +86 -9
  126. package/dist/index28.vue.d.ts +86 -9
  127. package/dist/index29.vue.d.cts +99 -85
  128. package/dist/index29.vue.d.ts +99 -85
  129. package/dist/index3.vue.d.cts +6 -6
  130. package/dist/index3.vue.d.ts +6 -6
  131. package/dist/index30.vue.d.cts +59 -94
  132. package/dist/index30.vue.d.ts +59 -94
  133. package/dist/index9.vue.d.ts +3 -3
  134. package/dist/mapUtils.d.cts +2 -2
  135. package/dist/mapUtils.d.ts +2 -2
  136. package/dist/presets.d.cts +4 -1
  137. package/dist/presets.d.ts +4 -1
  138. package/dist/rolldown-runtime.js +1 -0
  139. package/dist/serializeSearch.cjs +1 -1
  140. package/dist/serializeSearch.js +1 -1
  141. package/dist/style.css +256 -252
  142. package/dist/useCalendarEvents.d.cts +1 -1
  143. package/dist/useCalendarEvents.d.ts +1 -1
  144. package/dist/useCollapsePanel.d.cts +3 -3
  145. package/dist/useCollapsePanel.d.ts +3 -3
  146. package/dist/useCropperCore.d.cts +4 -4
  147. package/dist/useCropperCore.d.ts +4 -4
  148. package/dist/useDynamicFormState.d.cts +5 -67
  149. package/dist/useDynamicFormState.d.ts +5 -67
  150. package/dist/useEdgeInteraction.d.cts +2 -2
  151. package/dist/useEdgeInteraction.d.ts +2 -2
  152. package/dist/useFormRenderer.d.cts +69 -0
  153. package/dist/useFormRenderer.d.ts +69 -0
  154. package/dist/useFullscreen.d.cts +3 -3
  155. package/dist/useFullscreen.d.ts +3 -3
  156. package/dist/useGlobalSearch.d.cts +1 -1
  157. package/dist/useGlobalSearch.d.ts +1 -1
  158. package/dist/useInfiniteScroll.d.cts +2 -2
  159. package/dist/useInfiniteScroll.d.ts +2 -2
  160. package/dist/useQRCode.d.cts +3 -3
  161. package/dist/useQRCode.d.ts +3 -3
  162. package/dist/useSignatureHistory.d.cts +4 -4
  163. package/dist/useSignatureHistory.d.ts +4 -4
  164. package/dist/useSplitResize.d.cts +9 -9
  165. package/dist/useSplitResize.d.ts +9 -9
  166. package/dist/useTableQuery.d.cts +9 -9
  167. package/dist/useTableQuery.d.ts +9 -9
  168. package/dist/useWorkflowValidation.d.cts +36 -36
  169. package/dist/useWorkflowValidation.d.ts +36 -36
  170. package/dist/verification.d.cts +4 -4
  171. package/dist/verification.d.ts +4 -4
  172. package/dist/{xlsx.js → xlsx2.js} +1 -1
  173. package/docs/guides/data-picker.md +30 -11
  174. package/docs/guides/data-workflows.md +22 -1
  175. package/docs/guides/search-workflows.md +3 -1
  176. package/docs/guides/usage.en.md +15 -15
  177. package/docs/guides/usage.md +15 -15
  178. package/package.json +1 -1
  179. package/dist/C_DataPicker2.cjs +0 -1
  180. package/dist/C_DataPicker2.js +0 -1
  181. package/dist/index31.vue.d.cts +0 -75
  182. package/dist/index31.vue.d.ts +0 -75
@@ -1,21 +1,64 @@
1
- import { t as ComponentDensity } from "./density.js";
2
1
  import * as vue from "vue";
3
2
 
4
- //#region src/components/C_Density/index.vue.d.ts
5
- type __VLS_Props = {
6
- density: ComponentDensity;
7
- };
8
- declare var __VLS_1: {};
9
- type __VLS_Slots = {} & {
10
- default?: (props: typeof __VLS_1) => any;
11
- };
12
- declare const __VLS_base: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
13
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
3
+ //#region src/components/C_Editor/index.vue.d.ts
4
+ interface EditorInstance {
5
+ getHtml(): string;
6
+ setHtml(html: string): void;
7
+ disable(): void;
8
+ enable(): void;
9
+ destroy(): void;
10
+ isDestroyed: boolean;
11
+ }
12
+ interface Props {
13
+ editorId: string;
14
+ modelValue?: string;
15
+ placeholder?: string;
16
+ disabled?: boolean;
17
+ readonly?: boolean;
18
+ height?: number;
19
+ theme?: 'light' | 'dark';
20
+ }
21
+ declare const __VLS_export: vue.DefineComponent<Props, {
22
+ initializeEditor: () => void;
23
+ destroyEditor: () => void;
24
+ setContent: (html: string) => void;
25
+ getContent: () => string;
26
+ handleEditorFocus: () => void;
27
+ handleEditorBlur: () => void;
28
+ editorInstance: Readonly<vue.Ref<{
29
+ readonly getHtml: () => string;
30
+ readonly setHtml: (html: string) => void;
31
+ readonly disable: () => void;
32
+ readonly enable: () => void;
33
+ readonly destroy: () => void;
34
+ readonly isDestroyed: boolean;
35
+ } | null, {
36
+ readonly getHtml: () => string;
37
+ readonly setHtml: (html: string) => void;
38
+ readonly disable: () => void;
39
+ readonly enable: () => void;
40
+ readonly destroy: () => void;
41
+ readonly isDestroyed: boolean;
42
+ } | null>>;
43
+ isInitialized: Readonly<vue.Ref<boolean, boolean>>;
44
+ }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
45
+ "update:modelValue": (value: string) => any;
46
+ error: (error: Error) => any;
47
+ "editor-mounted": (editor: EditorInstance) => any;
48
+ "editor-change": (html: string) => any;
49
+ }, string, vue.PublicProps, Readonly<Props> & Readonly<{
50
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
51
+ onError?: ((error: Error) => any) | undefined;
52
+ "onEditor-mounted"?: ((editor: EditorInstance) => any) | undefined;
53
+ "onEditor-change"?: ((html: string) => any) | undefined;
54
+ }>, {
55
+ modelValue: string;
56
+ readonly: boolean;
57
+ theme: "light" | "dark";
58
+ height: number;
59
+ placeholder: string;
60
+ disabled: boolean;
61
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
14
62
  declare const _default: typeof __VLS_export;
15
- type __VLS_WithSlots<T, S> = T & {
16
- new (): {
17
- $slots: S;
18
- };
19
- };
20
63
  //#endregion
21
64
  export { _default as t };
@@ -1,21 +1,64 @@
1
- import { t as ComponentDensity } from "./density.cjs";
2
1
  import * as vue from "vue";
3
2
 
4
- //#region src/components/C_Density/index.vue.d.ts
5
- type __VLS_Props = {
6
- density: ComponentDensity;
7
- };
8
- declare var __VLS_1: {};
9
- type __VLS_Slots = {} & {
10
- default?: (props: typeof __VLS_1) => any;
11
- };
12
- declare const __VLS_base: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
13
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
3
+ //#region src/components/C_Editor/index.vue.d.ts
4
+ interface EditorInstance {
5
+ getHtml(): string;
6
+ setHtml(html: string): void;
7
+ disable(): void;
8
+ enable(): void;
9
+ destroy(): void;
10
+ isDestroyed: boolean;
11
+ }
12
+ interface Props {
13
+ editorId: string;
14
+ modelValue?: string;
15
+ placeholder?: string;
16
+ disabled?: boolean;
17
+ readonly?: boolean;
18
+ height?: number;
19
+ theme?: 'light' | 'dark';
20
+ }
21
+ declare const __VLS_export: vue.DefineComponent<Props, {
22
+ initializeEditor: () => void;
23
+ destroyEditor: () => void;
24
+ setContent: (html: string) => void;
25
+ getContent: () => string;
26
+ handleEditorFocus: () => void;
27
+ handleEditorBlur: () => void;
28
+ editorInstance: Readonly<vue.Ref<{
29
+ readonly getHtml: () => string;
30
+ readonly setHtml: (html: string) => void;
31
+ readonly disable: () => void;
32
+ readonly enable: () => void;
33
+ readonly destroy: () => void;
34
+ readonly isDestroyed: boolean;
35
+ } | null, {
36
+ readonly getHtml: () => string;
37
+ readonly setHtml: (html: string) => void;
38
+ readonly disable: () => void;
39
+ readonly enable: () => void;
40
+ readonly destroy: () => void;
41
+ readonly isDestroyed: boolean;
42
+ } | null>>;
43
+ isInitialized: Readonly<vue.Ref<boolean, boolean>>;
44
+ }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
45
+ "update:modelValue": (value: string) => any;
46
+ error: (error: Error) => any;
47
+ "editor-mounted": (editor: EditorInstance) => any;
48
+ "editor-change": (html: string) => any;
49
+ }, string, vue.PublicProps, Readonly<Props> & Readonly<{
50
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
51
+ onError?: ((error: Error) => any) | undefined;
52
+ "onEditor-mounted"?: ((editor: EditorInstance) => any) | undefined;
53
+ "onEditor-change"?: ((html: string) => any) | undefined;
54
+ }>, {
55
+ modelValue: string;
56
+ readonly: boolean;
57
+ theme: "light" | "dark";
58
+ height: number;
59
+ placeholder: string;
60
+ disabled: boolean;
61
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
14
62
  declare const _default: typeof __VLS_export;
15
- type __VLS_WithSlots<T, S> = T & {
16
- new (): {
17
- $slots: S;
18
- };
19
- };
20
63
  //#endregion
21
64
  export { _default as t };
@@ -1,64 +1,24 @@
1
+ import { n as ComponentLocale } from "./contracts.js";
2
+ import { t as ValidationIssue } from "./validation.js";
1
3
  import * as vue from "vue";
2
4
 
3
- //#region src/components/C_Editor/index.vue.d.ts
4
- interface EditorInstance {
5
- getHtml(): string;
6
- setHtml(html: string): void;
7
- disable(): void;
8
- enable(): void;
9
- destroy(): void;
10
- isDestroyed: boolean;
5
+ //#region src/components/C_ErrorSummary/types.d.ts
6
+ interface ErrorSummaryProps {
7
+ issues: readonly ValidationIssue[];
8
+ title?: string;
9
+ /** 每页挂载的问题数,默认 8,最大 100,避免大批失败创建大量 DOM。 */
10
+ limit?: number;
11
+ locale?: ComponentLocale;
11
12
  }
12
- interface Props {
13
- editorId: string;
14
- modelValue?: string;
15
- placeholder?: string;
16
- disabled?: boolean;
17
- readonly?: boolean;
18
- height?: number;
19
- theme?: 'light' | 'dark';
20
- }
21
- declare const __VLS_export: vue.DefineComponent<Props, {
22
- initializeEditor: () => void;
23
- destroyEditor: () => void;
24
- setContent: (html: string) => void;
25
- getContent: () => string;
26
- handleEditorFocus: () => void;
27
- handleEditorBlur: () => void;
28
- editorInstance: Readonly<vue.Ref<{
29
- readonly getHtml: () => string;
30
- readonly setHtml: (html: string) => void;
31
- readonly disable: () => void;
32
- readonly enable: () => void;
33
- readonly destroy: () => void;
34
- readonly isDestroyed: boolean;
35
- } | null, {
36
- readonly getHtml: () => string;
37
- readonly setHtml: (html: string) => void;
38
- readonly disable: () => void;
39
- readonly enable: () => void;
40
- readonly destroy: () => void;
41
- readonly isDestroyed: boolean;
42
- } | null>>;
43
- isInitialized: Readonly<vue.Ref<boolean, boolean>>;
44
- }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
45
- "update:modelValue": (value: string) => any;
46
- "editor-mounted": (editor: EditorInstance) => any;
47
- "editor-change": (html: string) => any;
48
- error: (error: Error) => any;
49
- }, string, vue.PublicProps, Readonly<Props> & Readonly<{
50
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
51
- "onEditor-mounted"?: ((editor: EditorInstance) => any) | undefined;
52
- "onEditor-change"?: ((html: string) => any) | undefined;
53
- onError?: ((error: Error) => any) | undefined;
13
+ //#endregion
14
+ //#region src/components/C_ErrorSummary/index.vue.d.ts
15
+ declare const __VLS_export: vue.DefineComponent<ErrorSummaryProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
16
+ navigate: (issue: ValidationIssue) => any;
17
+ }, string, vue.PublicProps, Readonly<ErrorSummaryProps> & Readonly<{
18
+ onNavigate?: ((issue: ValidationIssue) => any) | undefined;
54
19
  }>, {
55
- modelValue: string;
56
- theme: "light" | "dark";
57
- disabled: boolean;
58
- placeholder: string;
59
- readonly: boolean;
60
- height: number;
20
+ limit: number;
61
21
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
62
22
  declare const _default: typeof __VLS_export;
63
23
  //#endregion
64
- export { _default as t };
24
+ export { ErrorSummaryProps as n, _default as t };
@@ -1,64 +1,24 @@
1
+ import { n as ComponentLocale } from "./contracts.cjs";
2
+ import { t as ValidationIssue } from "./validation.cjs";
1
3
  import * as vue from "vue";
2
4
 
3
- //#region src/components/C_Editor/index.vue.d.ts
4
- interface EditorInstance {
5
- getHtml(): string;
6
- setHtml(html: string): void;
7
- disable(): void;
8
- enable(): void;
9
- destroy(): void;
10
- isDestroyed: boolean;
5
+ //#region src/components/C_ErrorSummary/types.d.ts
6
+ interface ErrorSummaryProps {
7
+ issues: readonly ValidationIssue[];
8
+ title?: string;
9
+ /** 每页挂载的问题数,默认 8,最大 100,避免大批失败创建大量 DOM。 */
10
+ limit?: number;
11
+ locale?: ComponentLocale;
11
12
  }
12
- interface Props {
13
- editorId: string;
14
- modelValue?: string;
15
- placeholder?: string;
16
- disabled?: boolean;
17
- readonly?: boolean;
18
- height?: number;
19
- theme?: 'light' | 'dark';
20
- }
21
- declare const __VLS_export: vue.DefineComponent<Props, {
22
- initializeEditor: () => void;
23
- destroyEditor: () => void;
24
- setContent: (html: string) => void;
25
- getContent: () => string;
26
- handleEditorFocus: () => void;
27
- handleEditorBlur: () => void;
28
- editorInstance: Readonly<vue.Ref<{
29
- readonly getHtml: () => string;
30
- readonly setHtml: (html: string) => void;
31
- readonly disable: () => void;
32
- readonly enable: () => void;
33
- readonly destroy: () => void;
34
- readonly isDestroyed: boolean;
35
- } | null, {
36
- readonly getHtml: () => string;
37
- readonly setHtml: (html: string) => void;
38
- readonly disable: () => void;
39
- readonly enable: () => void;
40
- readonly destroy: () => void;
41
- readonly isDestroyed: boolean;
42
- } | null>>;
43
- isInitialized: Readonly<vue.Ref<boolean, boolean>>;
44
- }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
45
- "update:modelValue": (value: string) => any;
46
- "editor-mounted": (editor: EditorInstance) => any;
47
- "editor-change": (html: string) => any;
48
- error: (error: Error) => any;
49
- }, string, vue.PublicProps, Readonly<Props> & Readonly<{
50
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
51
- "onEditor-mounted"?: ((editor: EditorInstance) => any) | undefined;
52
- "onEditor-change"?: ((html: string) => any) | undefined;
53
- onError?: ((error: Error) => any) | undefined;
13
+ //#endregion
14
+ //#region src/components/C_ErrorSummary/index.vue.d.ts
15
+ declare const __VLS_export: vue.DefineComponent<ErrorSummaryProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
16
+ navigate: (issue: ValidationIssue) => any;
17
+ }, string, vue.PublicProps, Readonly<ErrorSummaryProps> & Readonly<{
18
+ onNavigate?: ((issue: ValidationIssue) => any) | undefined;
54
19
  }>, {
55
- modelValue: string;
56
- theme: "light" | "dark";
57
- disabled: boolean;
58
- placeholder: string;
59
- readonly: boolean;
60
- height: number;
20
+ limit: number;
61
21
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
62
22
  declare const _default: typeof __VLS_export;
63
23
  //#endregion
64
- export { _default as t };
24
+ export { ErrorSummaryProps as n, _default as t };
@@ -1,24 +1,61 @@
1
- import { n as ComponentLocale } from "./contracts.js";
2
- import { t as ValidationIssue } from "./validation.js";
1
+ import { E as FormRecord, T as FormOption, n as FormConfig, z as SubmitEventPayload } from "./useFormConfig.js";
2
+ import { r as FormRenderer } from "./useFormRenderer.js";
3
3
  import * as vue from "vue";
4
+ import { ComputedRef, Ref } from "vue";
4
5
 
5
- //#region src/components/C_ErrorSummary/types.d.ts
6
- interface ErrorSummaryProps {
7
- issues: readonly ValidationIssue[];
8
- title?: string;
9
- /** 每页挂载的问题数,默认 8,最大 100,避免大批失败创建大量 DOM。 */
10
- limit?: number;
11
- locale?: ComponentLocale;
6
+ //#region src/components/C_FormModal/types.d.ts
7
+ type FormModalMode = 'create' | 'edit';
8
+ /**
9
+ * Structural editor contract. It intentionally does not depend on request-core,
10
+ * so any headless CRUD implementation can drive the modal.
11
+ */
12
+ interface FormModalEditor<T extends object = FormRecord> {
13
+ visible: Ref<boolean>;
14
+ mode: Ref<FormModalMode>;
15
+ model: Ref<T | null>;
16
+ title: Ref<string>;
17
+ loading: Ref<boolean> | ComputedRef<boolean>;
18
+ setModel(model: T): void;
19
+ close(): void;
20
+ submit(model?: T): Promise<boolean>;
21
+ }
22
+ interface FormModalProps<T extends object = FormRecord> {
23
+ editor: FormModalEditor<T>;
24
+ options: FormOption<T>[];
25
+ config?: FormConfig<T>;
26
+ /** 当前弹窗使用的自定义字段渲染器。 */
27
+ renderers?: Record<string, FormRenderer>;
28
+ width?: number | string;
29
+ createText?: string;
30
+ saveText?: string;
31
+ cancelText?: string;
32
+ closable?: boolean;
33
+ maskClosable?: boolean;
34
+ closeOnEsc?: boolean;
35
+ }
36
+ interface FormModalEmits<T extends object = FormRecord> {
37
+ submit: [payload: SubmitEventPayload<T>, saved: boolean];
38
+ close: [];
12
39
  }
13
40
  //#endregion
14
- //#region src/components/C_ErrorSummary/index.vue.d.ts
15
- declare const __VLS_export: vue.DefineComponent<ErrorSummaryProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
16
- navigate: (issue: ValidationIssue) => any;
17
- }, string, vue.PublicProps, Readonly<ErrorSummaryProps> & Readonly<{
18
- onNavigate?: ((issue: ValidationIssue) => any) | undefined;
19
- }>, {
20
- limit: number;
21
- }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
41
+ //#region src/components/C_FormModal/index.vue.d.ts
42
+ declare const __VLS_export: <T extends object = FormRecord>(__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<{
43
+ props: vue.PublicProps & __VLS_PrettifyLocal<FormModalProps<T> & {
44
+ onSubmit?: ((payload: SubmitEventPayload<T>, saved: boolean) => any) | undefined;
45
+ onClose?: (() => any) | undefined;
46
+ }> & (typeof globalThis extends {
47
+ __VLS_PROPS_FALLBACK: infer P;
48
+ } ? P : {});
49
+ expose: (exposed: {}) => void;
50
+ attrs: any;
51
+ slots: {
52
+ [x: string]: ((props: any) => any) | undefined;
53
+ };
54
+ emit: ((evt: "submit", payload: SubmitEventPayload<T>, saved: boolean) => void) & ((evt: "close") => void);
55
+ }>) => vue.VNode & {
56
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
57
+ };
22
58
  declare const _default: typeof __VLS_export;
59
+ type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K] } : { [K in keyof T as K]: T[K] }) & {};
23
60
  //#endregion
24
- export { ErrorSummaryProps as n, _default as t };
61
+ export { FormModalProps as a, FormModalMode as i, FormModalEditor as n, FormModalEmits as r, _default as t };
@@ -1,24 +1,61 @@
1
- import { n as ComponentLocale } from "./contracts.cjs";
2
- import { t as ValidationIssue } from "./validation.cjs";
1
+ import { E as FormRecord, T as FormOption, n as FormConfig, z as SubmitEventPayload } from "./useFormConfig.cjs";
2
+ import { r as FormRenderer } from "./useFormRenderer.cjs";
3
3
  import * as vue from "vue";
4
+ import { ComputedRef, Ref } from "vue";
4
5
 
5
- //#region src/components/C_ErrorSummary/types.d.ts
6
- interface ErrorSummaryProps {
7
- issues: readonly ValidationIssue[];
8
- title?: string;
9
- /** 每页挂载的问题数,默认 8,最大 100,避免大批失败创建大量 DOM。 */
10
- limit?: number;
11
- locale?: ComponentLocale;
6
+ //#region src/components/C_FormModal/types.d.ts
7
+ type FormModalMode = 'create' | 'edit';
8
+ /**
9
+ * Structural editor contract. It intentionally does not depend on request-core,
10
+ * so any headless CRUD implementation can drive the modal.
11
+ */
12
+ interface FormModalEditor<T extends object = FormRecord> {
13
+ visible: Ref<boolean>;
14
+ mode: Ref<FormModalMode>;
15
+ model: Ref<T | null>;
16
+ title: Ref<string>;
17
+ loading: Ref<boolean> | ComputedRef<boolean>;
18
+ setModel(model: T): void;
19
+ close(): void;
20
+ submit(model?: T): Promise<boolean>;
21
+ }
22
+ interface FormModalProps<T extends object = FormRecord> {
23
+ editor: FormModalEditor<T>;
24
+ options: FormOption<T>[];
25
+ config?: FormConfig<T>;
26
+ /** 当前弹窗使用的自定义字段渲染器。 */
27
+ renderers?: Record<string, FormRenderer>;
28
+ width?: number | string;
29
+ createText?: string;
30
+ saveText?: string;
31
+ cancelText?: string;
32
+ closable?: boolean;
33
+ maskClosable?: boolean;
34
+ closeOnEsc?: boolean;
35
+ }
36
+ interface FormModalEmits<T extends object = FormRecord> {
37
+ submit: [payload: SubmitEventPayload<T>, saved: boolean];
38
+ close: [];
12
39
  }
13
40
  //#endregion
14
- //#region src/components/C_ErrorSummary/index.vue.d.ts
15
- declare const __VLS_export: vue.DefineComponent<ErrorSummaryProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
16
- navigate: (issue: ValidationIssue) => any;
17
- }, string, vue.PublicProps, Readonly<ErrorSummaryProps> & Readonly<{
18
- onNavigate?: ((issue: ValidationIssue) => any) | undefined;
19
- }>, {
20
- limit: number;
21
- }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
41
+ //#region src/components/C_FormModal/index.vue.d.ts
42
+ declare const __VLS_export: <T extends object = FormRecord>(__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<{
43
+ props: vue.PublicProps & __VLS_PrettifyLocal<FormModalProps<T> & {
44
+ onSubmit?: ((payload: SubmitEventPayload<T>, saved: boolean) => any) | undefined;
45
+ onClose?: (() => any) | undefined;
46
+ }> & (typeof globalThis extends {
47
+ __VLS_PROPS_FALLBACK: infer P;
48
+ } ? P : {});
49
+ expose: (exposed: {}) => void;
50
+ attrs: any;
51
+ slots: {
52
+ [x: string]: ((props: any) => any) | undefined;
53
+ };
54
+ emit: ((evt: "submit", payload: SubmitEventPayload<T>, saved: boolean) => void) & ((evt: "close") => void);
55
+ }>) => vue.VNode & {
56
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
57
+ };
22
58
  declare const _default: typeof __VLS_export;
59
+ type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K] } : { [K in keyof T as K]: T[K] }) & {};
23
60
  //#endregion
24
- export { ErrorSummaryProps as n, _default as t };
61
+ export { FormModalProps as a, FormModalMode as i, FormModalEditor as n, FormModalEmits as r, _default as t };