@robot-admin/naive-ui-components 0.17.6 → 0.19.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 (204) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/C_AntV.css +10 -10
  3. package/dist/C_AntV.d.cts +2 -2
  4. package/dist/C_AntV.d.ts +2 -2
  5. package/dist/C_AntV2.cjs +1 -1
  6. package/dist/C_AntV2.js +1 -1
  7. package/dist/C_Date.cjs +1 -1
  8. package/dist/C_Date.css +5 -5
  9. package/dist/C_Date.d.cts +18 -2
  10. package/dist/C_Date.d.ts +18 -2
  11. package/dist/C_Date.js +1 -1
  12. package/dist/C_Date2.cjs +1 -1
  13. package/dist/C_Date2.js +1 -1
  14. package/dist/C_Draggable.css +53 -53
  15. package/dist/C_Draggable.d.cts +2 -2
  16. package/dist/C_Draggable.d.ts +2 -2
  17. package/dist/C_Draggable2.cjs +1 -1
  18. package/dist/C_Draggable2.js +1 -1
  19. package/dist/C_Editor.d.cts +1 -1
  20. package/dist/C_Editor.d.ts +1 -1
  21. package/dist/C_Form.cjs +1 -1
  22. package/dist/C_FormModal.d.cts +1 -1
  23. package/dist/C_FormModal.d.ts +1 -1
  24. package/dist/C_FormSearch.cjs +1 -1
  25. package/dist/C_FormSearch.css +52 -52
  26. package/dist/C_FormSearch.d.cts +18 -2
  27. package/dist/C_FormSearch.d.ts +18 -2
  28. package/dist/C_FormSearch.js +1 -1
  29. package/dist/C_FormSearch2.cjs +1 -1
  30. package/dist/C_FormSearch2.js +1 -1
  31. package/dist/C_Guide.d.cts +1 -1
  32. package/dist/C_Guide.d.ts +1 -1
  33. package/dist/C_Icon.d.cts +1 -1
  34. package/dist/C_Icon.d.ts +1 -1
  35. package/dist/C_Language.d.cts +1 -1
  36. package/dist/C_Language.d.ts +1 -1
  37. package/dist/C_Loading.d.cts +1 -1
  38. package/dist/C_Loading.d.ts +1 -1
  39. package/dist/C_Login.d.cts +1 -1
  40. package/dist/C_Login.d.ts +1 -1
  41. package/dist/C_Markdown.d.cts +1 -1
  42. package/dist/C_Markdown.d.ts +1 -1
  43. package/dist/C_Menu.d.ts +1 -1
  44. package/dist/C_OrgChart.d.cts +1 -1
  45. package/dist/C_OrgChart.d.ts +1 -1
  46. package/dist/C_Progress.d.cts +1 -1
  47. package/dist/C_Progress.d.ts +1 -1
  48. package/dist/C_Skeleton.d.cts +1 -1
  49. package/dist/C_Skeleton.d.ts +1 -1
  50. package/dist/C_Steps.d.cts +1 -1
  51. package/dist/C_Steps.d.ts +1 -1
  52. package/dist/C_Table.base.css +144 -155
  53. package/dist/C_Table.css +144 -155
  54. package/dist/C_Table.d.cts +2 -2
  55. package/dist/C_Table.d.ts +6 -6
  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_Time.cjs +1 -1
  61. package/dist/C_Time.css +4 -4
  62. package/dist/C_Time.d.cts +18 -2
  63. package/dist/C_Time.d.ts +18 -2
  64. package/dist/C_Time.js +1 -1
  65. package/dist/C_Time2.cjs +1 -1
  66. package/dist/C_Time2.js +1 -1
  67. package/dist/C_Timeline.d.cts +1 -1
  68. package/dist/C_Timeline.d.ts +1 -1
  69. package/dist/C_Transfer.css +26 -26
  70. package/dist/C_Transfer.d.cts +2 -2
  71. package/dist/C_Transfer.d.ts +2 -2
  72. package/dist/C_Transfer2.cjs +1 -1
  73. package/dist/C_Transfer2.js +1 -1
  74. package/dist/C_Tree.css +23 -23
  75. package/dist/C_Tree.d.ts +4 -4
  76. package/dist/C_Tree2.cjs +1 -1
  77. package/dist/C_Tree2.js +1 -1
  78. package/dist/C_VtableGantt.cjs +1 -1
  79. package/dist/C_VtableGantt.css +31 -31
  80. package/dist/C_VtableGantt.d.cts +18 -2
  81. package/dist/C_VtableGantt.d.ts +18 -2
  82. package/dist/C_VtableGantt.js +1 -1
  83. package/dist/C_WorkFlow.css +150 -150
  84. package/dist/C_WorkFlow.d.cts +2 -2
  85. package/dist/C_WorkFlow.d.ts +2 -2
  86. package/dist/C_WorkFlow2.cjs +1 -1
  87. package/dist/C_WorkFlow2.js +1 -1
  88. package/dist/constants3.d.cts +6 -6
  89. package/dist/constants3.d.ts +6 -6
  90. package/dist/constants4.d.cts +7 -7
  91. package/dist/constants4.d.ts +7 -7
  92. package/dist/constants5.d.cts +2 -2
  93. package/dist/constants5.d.ts +2 -2
  94. package/dist/data.d.cts +7 -7
  95. package/dist/data.d.ts +7 -7
  96. package/dist/dateRange.d.cts +197 -0
  97. package/dist/dateRange.d.ts +197 -0
  98. package/dist/formValidation.cjs +1 -1
  99. package/dist/formValidation.js +1 -1
  100. package/dist/graphics.cjs +1 -0
  101. package/dist/graphics.d.cts +837 -0
  102. package/dist/graphics.d.ts +837 -0
  103. package/dist/graphics.js +1 -0
  104. package/dist/helpers.cjs +1 -1
  105. package/dist/index.cjs +1 -1
  106. package/dist/index.d.cts +47 -43
  107. package/dist/index.d.ts +47 -44
  108. package/dist/index.js +1 -1
  109. package/dist/index.vue.d.cts +4 -4
  110. package/dist/index.vue.d.ts +4 -4
  111. package/dist/index10.vue.d.cts +3 -3
  112. package/dist/index10.vue.d.ts +53 -68
  113. package/dist/index11.vue.d.cts +53 -68
  114. package/dist/index11.vue.d.ts +52 -58
  115. package/dist/index12.vue.d.cts +52 -58
  116. package/dist/index12.vue.d.ts +124 -50
  117. package/dist/index13.vue.d.cts +124 -50
  118. package/dist/index13.vue.d.ts +51 -123
  119. package/dist/index14.vue.d.cts +51 -123
  120. package/dist/index14.vue.d.ts +26 -52
  121. package/dist/index15.vue.d.cts +26 -52
  122. package/dist/index15.vue.d.ts +12 -26
  123. package/dist/index16.vue.d.cts +12 -26
  124. package/dist/index16.vue.d.ts +129 -13
  125. package/dist/index17.vue.d.cts +129 -13
  126. package/dist/index17.vue.d.ts +76 -129
  127. package/dist/index18.vue.d.cts +76 -129
  128. package/dist/index18.vue.d.ts +65 -75
  129. package/dist/index19.vue.d.cts +97 -75
  130. package/dist/index19.vue.d.ts +94 -62
  131. package/dist/index2.vue.d.cts +2 -2
  132. package/dist/index2.vue.d.ts +2 -2
  133. package/dist/index20.vue.d.cts +40 -91
  134. package/dist/index20.vue.d.ts +40 -91
  135. package/dist/index21.vue.d.cts +89 -40
  136. package/dist/index21.vue.d.ts +89 -40
  137. package/dist/index22.vue.d.cts +37 -95
  138. package/dist/index22.vue.d.ts +37 -95
  139. package/dist/index23.vue.d.cts +8 -34
  140. package/dist/index23.vue.d.ts +8 -34
  141. package/dist/index24.vue.d.cts +86 -9
  142. package/dist/index24.vue.d.ts +86 -9
  143. package/dist/index25.vue.d.cts +99 -654
  144. package/dist/index25.vue.d.ts +99 -654
  145. package/dist/index26.vue.d.cts +66 -87
  146. package/dist/index26.vue.d.ts +66 -87
  147. package/dist/index3.vue.d.cts +2 -2
  148. package/dist/index3.vue.d.ts +2 -2
  149. package/dist/index4.vue.d.cts +3 -3
  150. package/dist/index6.vue.d.ts +3 -3
  151. package/dist/index7.vue.d.cts +3 -3
  152. package/dist/index8.vue.d.ts +4 -4
  153. package/dist/index9.vue.d.cts +4 -4
  154. package/dist/index9.vue.d.ts +3 -3
  155. package/dist/mapUtils.d.cts +3 -3
  156. package/dist/mapUtils.d.ts +3 -3
  157. package/dist/presets.d.cts +5 -3
  158. package/dist/presets.d.ts +5 -3
  159. package/dist/style.css +499 -510
  160. package/dist/types.d.ts +51 -0
  161. package/dist/types2.d.cts +51 -0
  162. package/dist/useCalendarEvents.d.cts +2 -2
  163. package/dist/useCalendarEvents.d.ts +2 -2
  164. package/dist/useCollapsePanel.d.cts +4 -4
  165. package/dist/useCollapsePanel.d.ts +4 -4
  166. package/dist/useCropperCore.d.cts +9 -9
  167. package/dist/useCropperCore.d.ts +9 -9
  168. package/dist/useDraggableLayout.d.cts +94 -125
  169. package/dist/useDraggableLayout.d.ts +94 -125
  170. package/dist/useDynamicFormState.d.cts +23 -15
  171. package/dist/useDynamicFormState.d.ts +23 -15
  172. package/dist/useEdgeInteraction.d.cts +10 -5
  173. package/dist/useEdgeInteraction.d.ts +10 -5
  174. package/dist/useFullscreen.d.cts +3 -3
  175. package/dist/useFullscreen.d.ts +3 -3
  176. package/dist/useInfiniteScroll.d.cts +2 -2
  177. package/dist/useInfiniteScroll.d.ts +2 -2
  178. package/dist/useQRCode.d.cts +4 -4
  179. package/dist/useQRCode.d.ts +4 -4
  180. package/dist/useSignatureHistory.d.cts +3 -3
  181. package/dist/useSignatureHistory.d.ts +3 -3
  182. package/dist/useSplitResize.d.cts +6 -6
  183. package/dist/useSplitResize.d.ts +6 -6
  184. package/dist/useTableQuery.cjs +2 -2
  185. package/dist/useTableQuery.d.cts +490 -519
  186. package/dist/useTableQuery.d.ts +490 -519
  187. package/dist/useTableQuery.js +2 -2
  188. package/dist/useTimeSelection.d.cts +19 -52
  189. package/dist/useTimeSelection.d.ts +19 -52
  190. package/dist/useWorkflowValidation.d.cts +495 -116
  191. package/dist/useWorkflowValidation.d.ts +495 -116
  192. package/dist/verification.d.cts +4 -4
  193. package/dist/verification.d.ts +4 -4
  194. package/docs/guides/usage.en.md +18 -1
  195. package/docs/guides/usage.md +18 -1
  196. package/package.json +2 -2
  197. package/dist/C_VtableGantt2.cjs +0 -1
  198. package/dist/C_VtableGantt2.js +0 -1
  199. package/dist/index27.vue.d.cts +0 -111
  200. package/dist/index27.vue.d.ts +0 -111
  201. package/dist/index28.vue.d.cts +0 -84
  202. package/dist/index28.vue.d.ts +0 -84
  203. package/dist/useSearchState.d.cts +0 -163
  204. package/dist/useSearchState.d.ts +0 -163
@@ -1,79 +1,64 @@
1
1
  import * as vue from "vue";
2
2
 
3
- //#region src/components/C_Date/types.d.ts
4
- type DatePickerMode = 'date' | 'datetime' | 'daterange' | 'datetimerange' | 'smart-range';
5
- type DateValue = string | null;
6
- type DateRangeValue = [string, string] | null;
7
- type DateModelValue = DateValue | DateRangeValue;
8
- interface DateProps {
9
- modelValue?: DateModelValue;
10
- mode?: DatePickerMode;
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;
11
15
  placeholder?: string;
12
- startPlaceholder?: string;
13
- endPlaceholder?: string;
14
16
  disabled?: boolean;
15
- disabledBeforeToday?: boolean;
16
- disabledAfterToday?: boolean;
17
- valueFormat?: string;
18
- startDateProps?: Record<string, unknown>;
19
- endDateProps?: Record<string, unknown>;
20
- /** @deprecated Use modelValue. */
21
- singleDate?: DateValue;
22
- /** @deprecated Use modelValue. */
23
- singleDateTime?: DateValue;
24
- /** @deprecated Use modelValue. */
25
- dateRange?: DateRangeValue;
26
- /** @deprecated Use modelValue. */
27
- dateTimeRange?: DateRangeValue;
28
- /** @deprecated Use modelValue. */
29
- smartRange?: DateRangeValue;
30
- }
31
- interface DateEmits {
32
- 'update:modelValue': [value: DateModelValue];
33
- 'update:singleDate': [value: DateValue];
34
- 'update:singleDateTime': [value: DateValue];
35
- 'update:dateRange': [value: DateRangeValue];
36
- 'update:dateTimeRange': [value: DateRangeValue];
37
- 'update:smartRange': [value: DateRangeValue];
38
- change: [value: DateModelValue];
17
+ readonly?: boolean;
18
+ height?: number;
19
+ theme?: 'light' | 'dark';
39
20
  }
40
- interface DateExpose {
41
- clearAll: () => void;
42
- }
43
- //#endregion
44
- //#region src/components/C_Date/index.vue.d.ts
45
- declare const __VLS_export: vue.DefineComponent<DateProps, DateExpose, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
46
- "update:modelValue": (value: DateModelValue) => any;
47
- change: (value: DateModelValue) => any;
48
- "update:singleDate": (value: DateValue) => any;
49
- "update:singleDateTime": (value: DateValue) => any;
50
- "update:dateRange": (value: DateRangeValue) => any;
51
- "update:dateTimeRange": (value: DateRangeValue) => any;
52
- "update:smartRange": (value: DateRangeValue) => any;
53
- }, string, vue.PublicProps, Readonly<DateProps> & Readonly<{
54
- "onUpdate:modelValue"?: ((value: DateModelValue) => any) | undefined;
55
- onChange?: ((value: DateModelValue) => any) | undefined;
56
- "onUpdate:singleDate"?: ((value: DateValue) => any) | undefined;
57
- "onUpdate:singleDateTime"?: ((value: DateValue) => any) | undefined;
58
- "onUpdate:dateRange"?: ((value: DateRangeValue) => any) | undefined;
59
- "onUpdate:dateTimeRange"?: ((value: DateRangeValue) => any) | undefined;
60
- "onUpdate:smartRange"?: ((value: DateRangeValue) => any) | undefined;
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;
61
54
  }>, {
55
+ modelValue: string;
56
+ height: number;
62
57
  disabled: boolean;
58
+ theme: "light" | "dark";
63
59
  placeholder: string;
64
- mode: DatePickerMode;
65
- startPlaceholder: string;
66
- endPlaceholder: string;
67
- disabledBeforeToday: boolean;
68
- disabledAfterToday: boolean;
69
- startDateProps: Record<string, unknown>;
70
- endDateProps: Record<string, unknown>;
71
- singleDate: DateValue;
72
- singleDateTime: DateValue;
73
- dateRange: DateRangeValue;
74
- dateTimeRange: DateRangeValue;
75
- smartRange: DateRangeValue;
60
+ readonly: boolean;
76
61
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
77
62
  declare const _default: typeof __VLS_export;
78
63
  //#endregion
79
- export { DatePickerMode as a, DateValue as c, DateModelValue as i, DateEmits as n, DateProps as o, DateExpose as r, DateRangeValue as s, _default as t };
64
+ export { _default as t };
@@ -1,64 +1,58 @@
1
+ import { D as FormConfig, X as FormOption, Z as FormRecord, ut as SubmitEventPayload } from "./useDynamicFormState.js";
1
2
  import * as vue from "vue";
3
+ import { ComputedRef, Ref } 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_FormModal/types.d.ts
6
+ type FormModalMode = 'create' | 'edit';
7
+ /**
8
+ * Structural editor contract. It intentionally does not depend on request-core,
9
+ * so any headless CRUD implementation can drive the modal.
10
+ */
11
+ interface FormModalEditor<T extends object = FormRecord> {
12
+ visible: Ref<boolean>;
13
+ mode: Ref<FormModalMode>;
14
+ model: Ref<T | null>;
15
+ title: Ref<string>;
16
+ loading: Ref<boolean> | ComputedRef<boolean>;
17
+ setModel(model: T): void;
18
+ close(): void;
19
+ submit(model?: T): Promise<boolean>;
11
20
  }
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';
21
+ interface FormModalProps<T extends object = FormRecord> {
22
+ editor: FormModalEditor<T>;
23
+ options: FormOption<T>[];
24
+ config?: FormConfig<T>;
25
+ width?: number | string;
26
+ createText?: string;
27
+ saveText?: string;
28
+ cancelText?: string;
29
+ closable?: boolean;
30
+ maskClosable?: boolean;
31
+ closeOnEsc?: boolean;
20
32
  }
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
- height: number;
57
- disabled: boolean;
58
- placeholder: string;
59
- theme: "light" | "dark";
60
- readonly: boolean;
61
- }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
33
+ interface FormModalEmits<T extends object = FormRecord> {
34
+ submit: [payload: SubmitEventPayload<T>, saved: boolean];
35
+ close: [];
36
+ }
37
+ //#endregion
38
+ //#region src/components/C_FormModal/index.vue.d.ts
39
+ 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<{
40
+ props: vue.PublicProps & __VLS_PrettifyLocal<FormModalProps<T> & {
41
+ onClose?: (() => any) | undefined;
42
+ onSubmit?: ((payload: SubmitEventPayload<T>, saved: boolean) => any) | undefined;
43
+ }> & (typeof globalThis extends {
44
+ __VLS_PROPS_FALLBACK: infer P;
45
+ } ? P : {});
46
+ expose: (exposed: {}) => void;
47
+ attrs: any;
48
+ slots: {
49
+ [x: string]: ((props: any) => any) | undefined;
50
+ };
51
+ emit: ((evt: "close") => void) & ((evt: "submit", payload: SubmitEventPayload<T>, saved: boolean) => void);
52
+ }>) => vue.VNode & {
53
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
54
+ };
62
55
  declare const _default: typeof __VLS_export;
56
+ type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K] } : { [K in keyof T as K]: T[K] }) & {};
63
57
  //#endregion
64
- export { _default as t };
58
+ export { FormModalProps as a, FormModalMode as i, FormModalEditor as n, FormModalEmits as r, _default as t };
@@ -1,64 +1,58 @@
1
+ import { D as FormConfig, X as FormOption, Z as FormRecord, ut as SubmitEventPayload } from "./useDynamicFormState.cjs";
1
2
  import * as vue from "vue";
3
+ import { ComputedRef, Ref } 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_FormModal/types.d.ts
6
+ type FormModalMode = 'create' | 'edit';
7
+ /**
8
+ * Structural editor contract. It intentionally does not depend on request-core,
9
+ * so any headless CRUD implementation can drive the modal.
10
+ */
11
+ interface FormModalEditor<T extends object = FormRecord> {
12
+ visible: Ref<boolean>;
13
+ mode: Ref<FormModalMode>;
14
+ model: Ref<T | null>;
15
+ title: Ref<string>;
16
+ loading: Ref<boolean> | ComputedRef<boolean>;
17
+ setModel(model: T): void;
18
+ close(): void;
19
+ submit(model?: T): Promise<boolean>;
11
20
  }
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';
21
+ interface FormModalProps<T extends object = FormRecord> {
22
+ editor: FormModalEditor<T>;
23
+ options: FormOption<T>[];
24
+ config?: FormConfig<T>;
25
+ width?: number | string;
26
+ createText?: string;
27
+ saveText?: string;
28
+ cancelText?: string;
29
+ closable?: boolean;
30
+ maskClosable?: boolean;
31
+ closeOnEsc?: boolean;
20
32
  }
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
- height: number;
57
- disabled: boolean;
58
- placeholder: string;
59
- theme: "light" | "dark";
60
- readonly: boolean;
61
- }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
33
+ interface FormModalEmits<T extends object = FormRecord> {
34
+ submit: [payload: SubmitEventPayload<T>, saved: boolean];
35
+ close: [];
36
+ }
37
+ //#endregion
38
+ //#region src/components/C_FormModal/index.vue.d.ts
39
+ 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<{
40
+ props: vue.PublicProps & __VLS_PrettifyLocal<FormModalProps<T> & {
41
+ onClose?: (() => any) | undefined;
42
+ onSubmit?: ((payload: SubmitEventPayload<T>, saved: boolean) => any) | undefined;
43
+ }> & (typeof globalThis extends {
44
+ __VLS_PROPS_FALLBACK: infer P;
45
+ } ? P : {});
46
+ expose: (exposed: {}) => void;
47
+ attrs: any;
48
+ slots: {
49
+ [x: string]: ((props: any) => any) | undefined;
50
+ };
51
+ emit: ((evt: "close") => void) & ((evt: "submit", payload: SubmitEventPayload<T>, saved: boolean) => void);
52
+ }>) => vue.VNode & {
53
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
54
+ };
62
55
  declare const _default: typeof __VLS_export;
56
+ type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K] } : { [K in keyof T as K]: T[K] }) & {};
63
57
  //#endregion
64
- export { _default as t };
58
+ export { FormModalProps as a, FormModalMode as i, FormModalEditor as n, FormModalEmits as r, _default as t };
@@ -1,58 +1,132 @@
1
- import { D as FormConfig, X as FormOption, Z as FormRecord, ut as SubmitEventPayload } from "./useDynamicFormState.js";
2
1
  import * as vue from "vue";
3
- import { ComputedRef, Ref } from "vue";
4
2
 
5
- //#region src/components/C_FormModal/types.d.ts
6
- type FormModalMode = 'create' | 'edit';
7
- /**
8
- * Structural editor contract. It intentionally does not depend on request-core,
9
- * so any headless CRUD implementation can drive the modal.
10
- */
11
- interface FormModalEditor<T extends object = FormRecord> {
12
- visible: Ref<boolean>;
13
- mode: Ref<FormModalMode>;
14
- model: Ref<T | null>;
15
- title: Ref<string>;
16
- loading: Ref<boolean> | ComputedRef<boolean>;
17
- setModel(model: T): void;
18
- close(): void;
19
- submit(model?: T): Promise<boolean>;
3
+ //#region src/components/C_Guide/types.d.ts
4
+ /** 通用功能示意图,不包含宿主业务数据。 */
5
+ type GuideIllustration = 'navigation' | 'search' | 'tabs' | 'account' | 'overview' | 'notification' | 'fullscreen' | 'language' | 'theme' | 'settings';
6
+ /** 可使用选择器、真实元素或动态解析函数定位目标。 */
7
+ type GuideTarget = string | Element | (() => Element | null | undefined);
8
+ /** 引导实例公开方法,用于宿主在路由变化时主动停止等场景。 */
9
+ interface GuideExpose {
10
+ startGuide: (force?: boolean) => Promise<void>;
11
+ stopGuide: () => void;
12
+ resetCompleted: () => void;
13
+ isCompleted: () => boolean;
20
14
  }
21
- interface FormModalProps<T extends object = FormRecord> {
22
- editor: FormModalEditor<T>;
23
- options: FormOption<T>[];
24
- config?: FormConfig<T>;
25
- width?: number | string;
26
- createText?: string;
27
- saveText?: string;
28
- cancelText?: string;
29
- closable?: boolean;
30
- maskClosable?: boolean;
31
- closeOnEsc?: boolean;
15
+ /** 引导步骤定义 */
16
+ interface GuideStep {
17
+ /** 目标元素;不传时可展示居中的欢迎步骤。 */
18
+ element?: GuideTarget;
19
+ /** 弹出层配置 */
20
+ popover: {
21
+ title: string;
22
+ description: string;
23
+ side?: 'top' | 'right' | 'bottom' | 'left'; /** 可选的轻量示意图,使用组件主题色。 */
24
+ illustration?: GuideIllustration;
25
+ };
26
+ /** 步骤所属分组(用于步骤分组展示) */
27
+ group?: string;
28
+ /** 进入此步骤前的回调 */
29
+ onHighlightStarted?: (element: Element | undefined, step: GuideStep) => void;
30
+ /** 离开此步骤后的回调 */
31
+ onDeselected?: (element: Element | undefined, step: GuideStep) => void;
32
+ /** 是否跳过此步骤的条件 */
33
+ skipIf?: () => boolean;
34
+ }
35
+ /** 引导主题配置 */
36
+ interface GuideTheme {
37
+ /** 弹层背景色 */
38
+ popoverBgColor?: string;
39
+ /** 弹层文字色 */
40
+ popoverTextColor?: string;
41
+ /** 按钮主色 */
42
+ primaryColor?: string;
43
+ /** 遮罩层透明度 */
44
+ overlayOpacity?: number;
45
+ /** 弹层圆角 */
46
+ borderRadius?: string;
32
47
  }
33
- interface FormModalEmits<T extends object = FormRecord> {
34
- submit: [payload: SubmitEventPayload<T>, saved: boolean];
35
- close: [];
48
+ /** 引导持久化配置 */
49
+ interface GuidePersistence {
50
+ /** 是否启用持久化(记住已完成的引导) */
51
+ enabled?: boolean;
52
+ /** 持久化 key 前缀 */
53
+ keyPrefix?: string;
54
+ }
55
+ /** C_Guide Props */
56
+ interface GuideProps {
57
+ /** 引导步骤 */
58
+ steps?: GuideStep[];
59
+ /** 完成按钮文字 */
60
+ doneBtnText?: string;
61
+ /** 下一步按钮文字 */
62
+ nextBtnText?: string;
63
+ /** 上一步按钮文字 */
64
+ prevBtnText?: string;
65
+ /** 是否显示跳过按钮;allowClose 为 false 时不显示,默认 true。 */
66
+ showSkipButton?: boolean;
67
+ /** 跳过按钮文字,默认“跳过引导”。 */
68
+ skipBtnText?: string;
69
+ /** 是否显示进度条 */
70
+ showProgress?: boolean;
71
+ /** 是否启用键盘导航(← → Esc) */
72
+ keyboard?: boolean;
73
+ /** 是否启用动画 */
74
+ animate?: boolean;
75
+ /** 是否允许点击遮罩关闭 */
76
+ allowClose?: boolean;
77
+ /** 自动跳过不存在或不可见的目标,默认 true。 */
78
+ skipMissingElements?: boolean;
79
+ /** 主题配置 */
80
+ theme?: GuideTheme;
81
+ /** 持久化配置 */
82
+ persistence?: GuidePersistence;
83
+ /** 弹层自定义 CSS 类 */
84
+ popoverClass?: string;
85
+ /** 是否显示触发按钮(设为 false 则仅通过 expose 的 startGuide 触发) */
86
+ showTrigger?: boolean;
87
+ /** 触发按钮的 tooltip 文字 */
88
+ triggerTooltip?: string;
89
+ /** 触发按钮图标 */
90
+ triggerIcon?: string;
36
91
  }
37
92
  //#endregion
38
- //#region src/components/C_FormModal/index.vue.d.ts
39
- 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<{
40
- props: vue.PublicProps & __VLS_PrettifyLocal<FormModalProps<T> & {
41
- onClose?: (() => any) | undefined;
42
- onSubmit?: ((payload: SubmitEventPayload<T>, saved: boolean) => any) | undefined;
43
- }> & (typeof globalThis extends {
44
- __VLS_PROPS_FALLBACK: infer P;
45
- } ? P : {});
46
- expose: (exposed: {}) => void;
47
- attrs: any;
48
- slots: {
49
- [x: string]: ((props: any) => any) | undefined;
50
- };
51
- emit: ((evt: "close") => void) & ((evt: "submit", payload: SubmitEventPayload<T>, saved: boolean) => void);
52
- }>) => vue.VNode & {
53
- __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
54
- };
93
+ //#region src/components/C_Guide/index.vue.d.ts
94
+ declare const __VLS_export: vue.DefineComponent<GuideProps, {
95
+ startGuide: (force?: boolean) => Promise<void>;
96
+ stopGuide: () => void;
97
+ resetCompleted: () => void;
98
+ isCompleted: () => boolean;
99
+ }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
100
+ error: (error: unknown) => any;
101
+ start: () => any;
102
+ close: (currentStep: number) => any;
103
+ complete: () => any;
104
+ skip: (currentStep: number) => any;
105
+ "step-change": (stepIndex: number, step: GuideStep) => any;
106
+ }, string, vue.PublicProps, Readonly<GuideProps> & Readonly<{
107
+ onError?: ((error: unknown) => any) | undefined;
108
+ onStart?: (() => any) | undefined;
109
+ onClose?: ((currentStep: number) => any) | undefined;
110
+ onComplete?: (() => any) | undefined;
111
+ onSkip?: ((currentStep: number) => any) | undefined;
112
+ "onStep-change"?: ((stepIndex: number, step: GuideStep) => any) | undefined;
113
+ }>, {
114
+ keyboard: boolean;
115
+ steps: GuideStep[];
116
+ doneBtnText: string;
117
+ nextBtnText: string;
118
+ prevBtnText: string;
119
+ showSkipButton: boolean;
120
+ skipBtnText: string;
121
+ showProgress: boolean;
122
+ animate: boolean;
123
+ allowClose: boolean;
124
+ skipMissingElements: boolean;
125
+ popoverClass: string;
126
+ showTrigger: boolean;
127
+ triggerTooltip: string;
128
+ triggerIcon: string;
129
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
55
130
  declare const _default: typeof __VLS_export;
56
- type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K] } : { [K in keyof T as K]: T[K] }) & {};
57
131
  //#endregion
58
- export { FormModalProps as a, FormModalMode as i, FormModalEditor as n, FormModalEmits as r, _default as t };
132
+ export { GuideProps as a, GuideTheme as c, GuidePersistence as i, GuideExpose as n, GuideStep as o, GuideIllustration as r, GuideTarget as s, _default as t };