@robot-admin/naive-ui-components 0.17.6 → 0.18.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.
- package/CHANGELOG.md +10 -0
- package/dist/C_AntV.css +10 -10
- package/dist/C_AntV.d.cts +2 -2
- package/dist/C_AntV.d.ts +2 -2
- package/dist/C_AntV2.cjs +1 -1
- package/dist/C_AntV2.js +1 -1
- package/dist/C_Date.cjs +1 -1
- package/dist/C_Date.css +5 -5
- package/dist/C_Date.d.cts +18 -2
- package/dist/C_Date.d.ts +18 -2
- package/dist/C_Date.js +1 -1
- package/dist/C_Date2.cjs +1 -1
- package/dist/C_Date2.js +1 -1
- package/dist/C_Draggable.css +53 -53
- package/dist/C_Draggable.d.cts +2 -2
- package/dist/C_Draggable.d.ts +2 -2
- package/dist/C_Draggable2.cjs +1 -1
- package/dist/C_Draggable2.js +1 -1
- package/dist/C_Editor.d.cts +1 -1
- package/dist/C_Editor.d.ts +1 -1
- package/dist/C_FormModal.d.cts +1 -1
- package/dist/C_FormModal.d.ts +1 -1
- package/dist/C_FormSearch.cjs +1 -1
- package/dist/C_FormSearch.css +52 -52
- package/dist/C_FormSearch.d.cts +18 -2
- package/dist/C_FormSearch.d.ts +18 -2
- package/dist/C_FormSearch.js +1 -1
- package/dist/C_FormSearch2.cjs +1 -1
- package/dist/C_FormSearch2.js +1 -1
- package/dist/C_Guide.d.cts +1 -1
- package/dist/C_Guide.d.ts +1 -1
- package/dist/C_Icon.d.cts +1 -1
- package/dist/C_Icon.d.ts +1 -1
- package/dist/C_Language.d.cts +1 -1
- package/dist/C_Language.d.ts +1 -1
- package/dist/C_Loading.d.cts +1 -1
- package/dist/C_Loading.d.ts +1 -1
- package/dist/C_Login.d.cts +1 -1
- package/dist/C_Login.d.ts +1 -1
- package/dist/C_Markdown.d.cts +1 -1
- package/dist/C_Markdown.d.ts +1 -1
- package/dist/C_Menu.d.ts +1 -1
- package/dist/C_OrgChart.d.cts +1 -1
- package/dist/C_OrgChart.d.ts +1 -1
- package/dist/C_Progress.d.cts +1 -1
- package/dist/C_Progress.d.ts +1 -1
- package/dist/C_Skeleton.d.cts +1 -1
- package/dist/C_Skeleton.d.ts +1 -1
- package/dist/C_Steps.d.cts +1 -1
- package/dist/C_Steps.d.ts +1 -1
- package/dist/C_Table.base.css +144 -155
- package/dist/C_Table.css +144 -155
- package/dist/C_Table.d.cts +2 -2
- package/dist/C_Table.d.ts +6 -6
- package/dist/C_TagsView.d.cts +1 -1
- package/dist/C_TagsView.d.ts +1 -1
- package/dist/C_Theme.d.cts +1 -1
- package/dist/C_Theme.d.ts +1 -1
- package/dist/C_Time.cjs +1 -1
- package/dist/C_Time.css +4 -4
- package/dist/C_Time.d.cts +18 -2
- package/dist/C_Time.d.ts +18 -2
- package/dist/C_Time.js +1 -1
- package/dist/C_Time2.cjs +1 -1
- package/dist/C_Time2.js +1 -1
- package/dist/C_Timeline.d.cts +1 -1
- package/dist/C_Timeline.d.ts +1 -1
- package/dist/C_Transfer.css +26 -26
- package/dist/C_Transfer.d.cts +2 -2
- package/dist/C_Transfer.d.ts +2 -2
- package/dist/C_Transfer2.cjs +1 -1
- package/dist/C_Transfer2.js +1 -1
- package/dist/C_Tree.css +23 -23
- package/dist/C_Tree.d.ts +4 -4
- package/dist/C_Tree2.cjs +1 -1
- package/dist/C_Tree2.js +1 -1
- package/dist/C_VtableGantt.cjs +1 -1
- package/dist/C_VtableGantt.css +31 -31
- package/dist/C_VtableGantt.d.cts +18 -2
- package/dist/C_VtableGantt.d.ts +18 -2
- package/dist/C_VtableGantt.js +1 -1
- package/dist/C_WorkFlow.css +150 -150
- package/dist/C_WorkFlow.d.cts +2 -2
- package/dist/C_WorkFlow.d.ts +2 -2
- package/dist/C_WorkFlow2.cjs +1 -1
- package/dist/C_WorkFlow2.js +1 -1
- package/dist/constants3.d.cts +3 -3
- package/dist/constants3.d.ts +3 -3
- package/dist/constants4.d.cts +8 -8
- package/dist/constants4.d.ts +8 -8
- package/dist/constants5.d.cts +2 -2
- package/dist/constants5.d.ts +2 -2
- package/dist/data.d.cts +10 -10
- package/dist/data.d.ts +10 -10
- package/dist/dateRange.d.cts +197 -0
- package/dist/dateRange.d.ts +197 -0
- package/dist/graphics.cjs +1 -0
- package/dist/graphics.d.cts +837 -0
- package/dist/graphics.d.ts +837 -0
- package/dist/graphics.js +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +47 -43
- package/dist/index.d.ts +47 -44
- 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 +4 -4
- package/dist/index10.vue.d.ts +54 -69
- package/dist/index11.vue.d.cts +54 -69
- package/dist/index11.vue.d.ts +52 -58
- package/dist/index12.vue.d.cts +52 -58
- package/dist/index12.vue.d.ts +124 -50
- package/dist/index13.vue.d.cts +124 -50
- package/dist/index13.vue.d.ts +51 -123
- package/dist/index14.vue.d.cts +51 -123
- package/dist/index14.vue.d.ts +26 -52
- package/dist/index15.vue.d.cts +26 -52
- package/dist/index15.vue.d.ts +12 -26
- package/dist/index16.vue.d.cts +12 -26
- package/dist/index16.vue.d.ts +129 -13
- package/dist/index17.vue.d.cts +129 -13
- package/dist/index17.vue.d.ts +76 -129
- package/dist/index18.vue.d.cts +76 -129
- package/dist/index18.vue.d.ts +65 -75
- package/dist/index19.vue.d.cts +97 -75
- package/dist/index19.vue.d.ts +94 -62
- package/dist/index2.vue.d.cts +2 -2
- package/dist/index2.vue.d.ts +2 -2
- package/dist/index20.vue.d.cts +40 -91
- package/dist/index20.vue.d.ts +40 -91
- package/dist/index21.vue.d.cts +89 -40
- package/dist/index21.vue.d.ts +89 -40
- package/dist/index22.vue.d.cts +37 -95
- package/dist/index22.vue.d.ts +37 -95
- package/dist/index23.vue.d.cts +8 -34
- package/dist/index23.vue.d.ts +8 -34
- package/dist/index24.vue.d.cts +86 -9
- package/dist/index24.vue.d.ts +86 -9
- package/dist/index25.vue.d.cts +99 -654
- package/dist/index25.vue.d.ts +99 -654
- package/dist/index26.vue.d.cts +66 -87
- package/dist/index26.vue.d.ts +66 -87
- package/dist/index3.vue.d.cts +3 -3
- package/dist/index3.vue.d.ts +3 -3
- package/dist/index4.vue.d.cts +3 -3
- package/dist/index6.vue.d.ts +3 -3
- package/dist/index7.vue.d.cts +3 -3
- package/dist/index8.vue.d.ts +2 -2
- package/dist/index9.vue.d.cts +2 -2
- package/dist/index9.vue.d.ts +4 -4
- package/dist/mapUtils.d.cts +1 -1
- package/dist/mapUtils.d.ts +1 -1
- package/dist/presets.d.cts +1 -1
- package/dist/presets.d.ts +1 -1
- package/dist/style.css +499 -510
- package/dist/types.d.ts +51 -0
- package/dist/types2.d.cts +51 -0
- package/dist/useCalendarEvents.d.cts +3 -3
- package/dist/useCalendarEvents.d.ts +3 -3
- package/dist/useCollapsePanel.d.cts +6 -6
- package/dist/useCollapsePanel.d.ts +6 -6
- package/dist/useCropperCore.d.cts +7 -7
- package/dist/useCropperCore.d.ts +7 -7
- package/dist/useDraggableLayout.d.cts +94 -125
- package/dist/useDraggableLayout.d.ts +94 -125
- package/dist/useDynamicFormState.d.cts +21 -8
- package/dist/useDynamicFormState.d.ts +21 -8
- package/dist/useEdgeInteraction.d.cts +10 -5
- package/dist/useEdgeInteraction.d.ts +10 -5
- package/dist/useFullscreen.d.cts +3 -3
- package/dist/useFullscreen.d.ts +3 -3
- package/dist/useInfiniteScroll.d.cts +2 -2
- package/dist/useInfiniteScroll.d.ts +2 -2
- package/dist/useQRCode.d.cts +4 -4
- package/dist/useQRCode.d.ts +4 -4
- package/dist/useSignatureHistory.d.cts +7 -7
- package/dist/useSignatureHistory.d.ts +7 -7
- package/dist/useSplitResize.d.cts +1 -1
- package/dist/useSplitResize.d.ts +1 -1
- package/dist/useTableQuery.cjs +2 -2
- package/dist/useTableQuery.d.cts +473 -463
- package/dist/useTableQuery.d.ts +473 -463
- package/dist/useTableQuery.js +2 -2
- package/dist/useTimeSelection.d.cts +19 -52
- package/dist/useTimeSelection.d.ts +19 -52
- package/dist/useWorkflowValidation.d.cts +534 -155
- package/dist/useWorkflowValidation.d.ts +534 -155
- package/dist/verification.d.cts +2 -2
- package/dist/verification.d.ts +2 -2
- package/docs/guides/usage.en.md +15 -0
- package/docs/guides/usage.md +15 -0
- package/package.json +1 -1
- package/dist/C_VtableGantt2.cjs +0 -1
- package/dist/C_VtableGantt2.js +0 -1
- package/dist/index27.vue.d.cts +0 -111
- package/dist/index27.vue.d.ts +0 -111
- package/dist/index28.vue.d.cts +0 -84
- package/dist/index28.vue.d.ts +0 -84
- package/dist/useSearchState.d.cts +0 -163
- package/dist/useSearchState.d.ts +0 -163
package/dist/index11.vue.d.cts
CHANGED
|
@@ -1,79 +1,64 @@
|
|
|
1
1
|
import * as vue from "vue";
|
|
2
2
|
|
|
3
|
-
//#region src/components/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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];
|
|
39
|
-
}
|
|
40
|
-
interface DateExpose {
|
|
41
|
-
clearAll: () => void;
|
|
17
|
+
readonly?: boolean;
|
|
18
|
+
height?: number;
|
|
19
|
+
theme?: 'light' | 'dark';
|
|
42
20
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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;
|
|
61
54
|
}>, {
|
|
62
|
-
|
|
55
|
+
modelValue: string;
|
|
63
56
|
placeholder: string;
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
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;
|
|
57
|
+
disabled: boolean;
|
|
58
|
+
readonly: boolean;
|
|
59
|
+
height: number;
|
|
60
|
+
theme: "light" | "dark";
|
|
76
61
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
77
62
|
declare const _default: typeof __VLS_export;
|
|
78
63
|
//#endregion
|
|
79
|
-
export {
|
|
64
|
+
export { _default as t };
|
package/dist/index11.vue.d.ts
CHANGED
|
@@ -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/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
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 };
|
package/dist/index12.vue.d.cts
CHANGED
|
@@ -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/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
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 };
|
package/dist/index12.vue.d.ts
CHANGED
|
@@ -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/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
*/
|
|
11
|
-
interface
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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/
|
|
39
|
-
declare const __VLS_export: <
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
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
|
+
close: (currentStep: number) => any;
|
|
102
|
+
start: () => 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
|
+
onClose?: ((currentStep: number) => any) | undefined;
|
|
109
|
+
onStart?: (() => 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 {
|
|
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 };
|