@guodun/antdv 1.3.2 → 1.4.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/dist/es/components/contract-signing-location/index.mjs +1 -0
- package/dist/es/components/contract-signing-location/src/ContractSigningLocation.vue.mjs +304 -289
- package/dist/es/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.mjs +337 -326
- package/dist/es/components/contract-signing-location/src/ContractSigningLocationNavigator.vue.mjs +41 -33
- package/dist/es/components/contract-signing-location/src/ContractSigningTemplatePage.mjs +5 -0
- package/dist/es/components/contract-signing-location/src/ContractSigningTemplatePage.vue.mjs +23 -0
- package/dist/es/components/contract-signing-location/src/location-rules.mjs +115 -77
- package/dist/es/components/contract-signing-location/src/template-source.mjs +85 -0
- package/dist/es/components/contract-signing-location/style/index.css +1 -1
- package/dist/es/components/index.mjs +8 -6
- package/dist/es/components/pro-contract-signing-flow/src/ContractSigningFlowCanvas.vue.mjs +164 -57
- package/dist/es/components/pro-contract-signing-flow/src/ContractSigningFlowInspector.vue.mjs +128 -125
- package/dist/es/components/pro-contract-signing-flow/src/ContractSigningFlowNodeCard.vue.mjs +75 -49
- package/dist/es/components/pro-contract-signing-flow/src/ProContractSigningFlow.vue.mjs +135 -91
- package/dist/es/components/pro-contract-signing-flow/src/constants.mjs +25 -5
- package/dist/es/components/pro-contract-signing-flow/style/index.css +1 -1
- package/dist/es/components/pro-contract-template-designer/index.mjs +5 -4
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerInspector.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerInspector.vue.mjs +347 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerSidebar.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerSidebar.vue.mjs +171 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateFileBar.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateFileBar.vue.mjs +166 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateRendererField.vue.mjs +4 -4
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateRendererValidation.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateRendererValidation.vue.mjs +36 -0
- package/dist/es/components/pro-contract-template-designer/src/DesignerPage.vue.mjs +202 -202
- package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.mjs +1591 -1612
- package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateRenderer.vue.mjs +235 -239
- package/dist/es/components/pro-contract-template-designer/src/SigningPlacementLayer.vue.mjs +16 -16
- package/dist/es/components/pro-contract-template-designer/src/composables/use-template-designer.mjs +166 -166
- package/dist/es/components/pro-contract-template-designer/src/composables/use-template-draft-cache.mjs +100 -33
- package/dist/es/components/pro-contract-template-designer/src/composables/use-template-files.mjs +77 -0
- package/dist/es/components/pro-contract-template-designer/src/extensions/word-paste.mjs +23 -23
- package/dist/es/components/pro-contract-template-designer/src/utils/file-tabs.mjs +14 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/template-renderer.mjs +121 -121
- package/dist/es/components/pro-contract-template-designer/src/utils/toolbar-overflow.mjs +19 -0
- package/dist/es/components/pro-contract-template-designer/style/index.css +1 -1
- package/dist/es/index.mjs +23 -21
- package/dist/lib/components/contract-signing-location/index.cjs +1 -1
- package/dist/lib/components/contract-signing-location/src/ContractSigningLocation.vue.cjs +1 -1
- package/dist/lib/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.cjs +1 -1
- package/dist/lib/components/contract-signing-location/src/ContractSigningLocationNavigator.vue.cjs +1 -1
- package/dist/lib/components/contract-signing-location/src/ContractSigningTemplatePage.cjs +1 -0
- package/dist/lib/components/contract-signing-location/src/ContractSigningTemplatePage.vue.cjs +1 -0
- package/dist/lib/components/contract-signing-location/src/location-rules.cjs +1 -1
- package/dist/lib/components/contract-signing-location/src/template-source.cjs +1 -0
- package/dist/lib/components/contract-signing-location/style/index.css +1 -1
- package/dist/lib/components/index.cjs +1 -1
- package/dist/lib/components/pro-contract-signing-flow/src/ContractSigningFlowCanvas.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-signing-flow/src/ContractSigningFlowInspector.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-signing-flow/src/ContractSigningFlowNodeCard.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-signing-flow/src/ProContractSigningFlow.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-signing-flow/src/constants.cjs +1 -1
- package/dist/lib/components/pro-contract-signing-flow/style/index.css +1 -1
- package/dist/lib/components/pro-contract-template-designer/index.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerInspector.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerInspector.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerSidebar.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerSidebar.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateFileBar.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateFileBar.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateRendererField.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateRendererValidation.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateRendererValidation.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/DesignerPage.vue.cjs +2 -2
- package/dist/lib/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ProContractTemplateRenderer.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/SigningPlacementLayer.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/composables/use-template-designer.cjs +2 -2
- package/dist/lib/components/pro-contract-template-designer/src/composables/use-template-draft-cache.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/composables/use-template-files.cjs +2 -0
- package/dist/lib/components/pro-contract-template-designer/src/extensions/word-paste.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/utils/file-tabs.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/template-renderer.cjs +2 -2
- package/dist/lib/components/pro-contract-template-designer/src/utils/toolbar-overflow.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/style/index.css +1 -1
- package/dist/lib/index.cjs +1 -1
- package/dist/theme/contract-signing-location.css +1 -1
- package/dist/theme/icon.css +1 -1
- package/dist/theme/index.css +1 -1
- package/dist/theme/pro-contract-signing-flow.css +1 -1
- package/dist/types/components/contract-signing-location/index.d.ts +1 -0
- package/dist/types/components/contract-signing-location/src/ContractSigningLocation.vue.d.ts +3 -1
- package/dist/types/components/contract-signing-location/src/ContractSigningLocationInspector.vue.d.ts +2 -2
- package/dist/types/components/contract-signing-location/src/ContractSigningTemplatePage.vue.d.ts +6 -0
- package/dist/types/components/contract-signing-location/src/location-rules.d.ts +3 -3
- package/dist/types/components/contract-signing-location/src/template-source.d.ts +20 -0
- package/dist/types/components/contract-signing-location/src/types.d.ts +47 -2
- package/dist/types/components/pro-contract-signing-flow/src/ContractSigningFlowCanvas.vue.d.ts +19 -3
- package/dist/types/components/pro-contract-signing-flow/src/ProContractSigningFlow.vue.d.ts +223 -2
- package/dist/types/components/pro-contract-signing-flow/src/constants.d.ts +15 -0
- package/dist/types/components/pro-contract-signing-flow/src/types.d.ts +12 -0
- package/dist/types/components/pro-contract-template-designer/index.d.ts +1 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateDesignerInspector.vue.d.ts +103 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateDesignerSidebar.vue.d.ts +48 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateFileBar.vue.d.ts +231 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateRendererValidation.vue.d.ts +15 -0
- package/dist/types/components/pro-contract-template-designer/src/DesignerPage.vue.d.ts +1 -1
- package/dist/types/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.d.ts +25 -2
- package/dist/types/components/pro-contract-template-designer/src/SigningPlacementInspector.vue.d.ts +2 -2
- package/dist/types/components/pro-contract-template-designer/src/composables/use-template-designer.d.ts +1 -1
- package/dist/types/components/pro-contract-template-designer/src/composables/use-template-draft-cache.d.ts +29 -1
- package/dist/types/components/pro-contract-template-designer/src/composables/use-template-files.d.ts +24 -0
- package/dist/types/components/pro-contract-template-designer/src/constants.d.ts +2 -2
- package/dist/types/components/pro-contract-template-designer/src/types.d.ts +59 -1
- package/dist/types/components/pro-contract-template-designer/src/utils/file-tabs.d.ts +3 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/toolbar-overflow.d.ts +11 -0
- package/package.json +2 -1
|
@@ -3,6 +3,7 @@ import { default as ProContractTemplateDesigner } from './src/ProContractTemplat
|
|
|
3
3
|
import { default as ProContractTemplateRenderer } from './src/ProContractTemplateRenderer.vue';
|
|
4
4
|
export * from './src/types';
|
|
5
5
|
export * from './src/composables/use-template-designer';
|
|
6
|
+
export * from './src/composables/use-template-files';
|
|
6
7
|
export * from './src/composables/use-template-draft-cache';
|
|
7
8
|
export * from './src/utils/template-renderer';
|
|
8
9
|
export * from './src/utils/signing-placement';
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { ContractTemplateFieldStyle, ContractTemplateFieldType, ContractTemplatePageSize, ContractTemplateSigningPlacement, ContractTemplateVariable } from './types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
collapsed: boolean;
|
|
4
|
+
readonly: boolean;
|
|
5
|
+
disabled: boolean;
|
|
6
|
+
showSigningPlacementTools: boolean;
|
|
7
|
+
bodyControlToolItems: Array<{
|
|
8
|
+
type: ContractTemplateFieldType;
|
|
9
|
+
label: string;
|
|
10
|
+
icon: unknown;
|
|
11
|
+
}>;
|
|
12
|
+
signingPlacementTools: Array<{
|
|
13
|
+
key: string;
|
|
14
|
+
type: ContractTemplateSigningPlacement['type'];
|
|
15
|
+
label: string;
|
|
16
|
+
}>;
|
|
17
|
+
signingPlacements: ContractTemplateSigningPlacement[];
|
|
18
|
+
selectedSigningPlacement?: ContractTemplateSigningPlacement;
|
|
19
|
+
selectedSigningPlacementPageSize: ContractTemplatePageSize;
|
|
20
|
+
selectedVariable?: ContractTemplateVariable;
|
|
21
|
+
currentVariableFontFamily: string;
|
|
22
|
+
fontFamilySelectOptions: Array<{
|
|
23
|
+
label: string;
|
|
24
|
+
value: string;
|
|
25
|
+
}>;
|
|
26
|
+
textAlignOptions: Array<{
|
|
27
|
+
label: string;
|
|
28
|
+
value: string;
|
|
29
|
+
}>;
|
|
30
|
+
borderStyleOptions: Array<{
|
|
31
|
+
label: string;
|
|
32
|
+
value: string;
|
|
33
|
+
}>;
|
|
34
|
+
objectFitOptions: Array<{
|
|
35
|
+
label: string;
|
|
36
|
+
value: string;
|
|
37
|
+
}>;
|
|
38
|
+
selectedVariableWidthMax: number;
|
|
39
|
+
selectedVariableHeightMax: number;
|
|
40
|
+
minFontSize: number;
|
|
41
|
+
maxFontSize: number;
|
|
42
|
+
defaultMultilineRows: number;
|
|
43
|
+
resolveSigningPlacementTypeIcon: (type: ContractTemplateSigningPlacement['type']) => unknown;
|
|
44
|
+
signingPlacementTypeLabels: Record<string, string>;
|
|
45
|
+
};
|
|
46
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
47
|
+
toggle: () => any;
|
|
48
|
+
insertVariable: (type: ContractTemplateFieldType) => any;
|
|
49
|
+
removeVariable: (variable: ContractTemplateVariable) => any;
|
|
50
|
+
variableDragStart: (event: DragEvent, type: ContractTemplateFieldType) => any;
|
|
51
|
+
signingPlacementDragStart: (event: DragEvent, item: {
|
|
52
|
+
key: string;
|
|
53
|
+
type: ContractTemplateSigningPlacement["type"];
|
|
54
|
+
label: string;
|
|
55
|
+
}) => any;
|
|
56
|
+
insertSigningPlacement: (item: {
|
|
57
|
+
key: string;
|
|
58
|
+
type: ContractTemplateSigningPlacement["type"];
|
|
59
|
+
label: string;
|
|
60
|
+
}) => any;
|
|
61
|
+
patchSigningPlacement: (patch: Partial<ContractTemplateSigningPlacement>) => any;
|
|
62
|
+
duplicateSigningPlacement: () => any;
|
|
63
|
+
removeSigningPlacement: () => any;
|
|
64
|
+
duplicateVariable: (variable: ContractTemplateVariable) => any;
|
|
65
|
+
patchVariable: (patch: Partial<ContractTemplateVariable>) => any;
|
|
66
|
+
patchStyle: (patch: ContractTemplateFieldStyle) => any;
|
|
67
|
+
patchMultiline: (checked: boolean) => any;
|
|
68
|
+
patchRows: (value: unknown) => any;
|
|
69
|
+
patchFontFamily: (value: unknown) => any;
|
|
70
|
+
patchFontSize: (value: unknown) => any;
|
|
71
|
+
patchTextAlign: (value: unknown) => any;
|
|
72
|
+
patchBorderStyle: (value: unknown) => any;
|
|
73
|
+
patchObjectFit: (value: unknown) => any;
|
|
74
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
75
|
+
onToggle?: (() => any) | undefined;
|
|
76
|
+
onInsertVariable?: ((type: ContractTemplateFieldType) => any) | undefined;
|
|
77
|
+
onRemoveVariable?: ((variable: ContractTemplateVariable) => any) | undefined;
|
|
78
|
+
onVariableDragStart?: ((event: DragEvent, type: ContractTemplateFieldType) => any) | undefined;
|
|
79
|
+
onSigningPlacementDragStart?: ((event: DragEvent, item: {
|
|
80
|
+
key: string;
|
|
81
|
+
type: ContractTemplateSigningPlacement["type"];
|
|
82
|
+
label: string;
|
|
83
|
+
}) => any) | undefined;
|
|
84
|
+
onInsertSigningPlacement?: ((item: {
|
|
85
|
+
key: string;
|
|
86
|
+
type: ContractTemplateSigningPlacement["type"];
|
|
87
|
+
label: string;
|
|
88
|
+
}) => any) | undefined;
|
|
89
|
+
onPatchSigningPlacement?: ((patch: Partial<ContractTemplateSigningPlacement>) => any) | undefined;
|
|
90
|
+
onDuplicateSigningPlacement?: (() => any) | undefined;
|
|
91
|
+
onRemoveSigningPlacement?: (() => any) | undefined;
|
|
92
|
+
onDuplicateVariable?: ((variable: ContractTemplateVariable) => any) | undefined;
|
|
93
|
+
onPatchVariable?: ((patch: Partial<ContractTemplateVariable>) => any) | undefined;
|
|
94
|
+
onPatchStyle?: ((patch: ContractTemplateFieldStyle) => any) | undefined;
|
|
95
|
+
onPatchMultiline?: ((checked: boolean) => any) | undefined;
|
|
96
|
+
onPatchRows?: ((value: unknown) => any) | undefined;
|
|
97
|
+
onPatchFontFamily?: ((value: unknown) => any) | undefined;
|
|
98
|
+
onPatchFontSize?: ((value: unknown) => any) | undefined;
|
|
99
|
+
onPatchTextAlign?: ((value: unknown) => any) | undefined;
|
|
100
|
+
onPatchBorderStyle?: ((value: unknown) => any) | undefined;
|
|
101
|
+
onPatchObjectFit?: ((value: unknown) => any) | undefined;
|
|
102
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLElement>;
|
|
103
|
+
export default _default;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ContractTemplatePage, ContractTemplatePageSize, ContractTemplateSigningPlacement, ContractTemplateVariable } from './types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
collapsed: boolean;
|
|
4
|
+
pages: ContractTemplatePage[];
|
|
5
|
+
variables: ContractTemplateVariable[];
|
|
6
|
+
signingPlacementNavigationItems: Array<{
|
|
7
|
+
placement: ContractTemplateSigningPlacement;
|
|
8
|
+
label: string;
|
|
9
|
+
detail: string;
|
|
10
|
+
}>;
|
|
11
|
+
activePageId: string;
|
|
12
|
+
selectedVariableKey: string;
|
|
13
|
+
selectedSigningPlacementId: string;
|
|
14
|
+
normalizedMaxPages: number;
|
|
15
|
+
pageLimitReached: boolean;
|
|
16
|
+
selectedPage?: ContractTemplatePage;
|
|
17
|
+
selectedPageSize: ContractTemplatePageSize;
|
|
18
|
+
normalizedPageSizeOptions: ContractTemplatePageSize[];
|
|
19
|
+
pageSizeOptions: Array<{
|
|
20
|
+
label: string;
|
|
21
|
+
value: string;
|
|
22
|
+
}>;
|
|
23
|
+
selectedPageSizeOptionValue: string;
|
|
24
|
+
showSigningPlacementTools: boolean;
|
|
25
|
+
readonly: boolean;
|
|
26
|
+
getPageSize: (page?: ContractTemplatePage) => ContractTemplatePageSize;
|
|
27
|
+
getPageSigningPlacements: (pageId: string) => ContractTemplateSigningPlacement[];
|
|
28
|
+
};
|
|
29
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
30
|
+
toggle: () => any;
|
|
31
|
+
addPage: () => any;
|
|
32
|
+
activatePage: (pageId: string) => any;
|
|
33
|
+
duplicatePage: (page: ContractTemplatePage) => any;
|
|
34
|
+
removePage: (page: ContractTemplatePage) => any;
|
|
35
|
+
patchPageFormat: (value: unknown) => any;
|
|
36
|
+
scrollToVariable: (variable: ContractTemplateVariable) => any;
|
|
37
|
+
scrollToSigningPlacement: (placementId: string) => any;
|
|
38
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
39
|
+
onToggle?: (() => any) | undefined;
|
|
40
|
+
onAddPage?: (() => any) | undefined;
|
|
41
|
+
onActivatePage?: ((pageId: string) => any) | undefined;
|
|
42
|
+
onDuplicatePage?: ((page: ContractTemplatePage) => any) | undefined;
|
|
43
|
+
onRemovePage?: ((page: ContractTemplatePage) => any) | undefined;
|
|
44
|
+
onPatchPageFormat?: ((value: unknown) => any) | undefined;
|
|
45
|
+
onScrollToVariable?: ((variable: ContractTemplateVariable) => any) | undefined;
|
|
46
|
+
onScrollToSigningPlacement?: ((placementId: string) => any) | undefined;
|
|
47
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLElement>;
|
|
48
|
+
export default _default;
|
package/dist/types/components/pro-contract-template-designer/src/ContractTemplateFileBar.vue.d.ts
ADDED
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import { ContractTemplateFile } from './types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
files: ContractTemplateFile[];
|
|
4
|
+
activeFileId: string;
|
|
5
|
+
readonly: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
8
|
+
add: () => any;
|
|
9
|
+
select: (fileId: string) => any;
|
|
10
|
+
remove: (fileId: string) => any;
|
|
11
|
+
move: (fileId: string, direction: 1 | -1) => any;
|
|
12
|
+
rename: (fileId: string, name: string) => any;
|
|
13
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
14
|
+
onAdd?: (() => any) | undefined;
|
|
15
|
+
onSelect?: ((fileId: string) => any) | undefined;
|
|
16
|
+
onRemove?: ((fileId: string) => any) | undefined;
|
|
17
|
+
onMove?: ((fileId: string, direction: 1 | -1) => any) | undefined;
|
|
18
|
+
onRename?: ((fileId: string, name: string) => any) | undefined;
|
|
19
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
20
|
+
renameInput: (import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<Omit<{
|
|
21
|
+
id: StringConstructor;
|
|
22
|
+
placeholder: {
|
|
23
|
+
type: import('vue').PropType<string | number>;
|
|
24
|
+
};
|
|
25
|
+
autocomplete: StringConstructor;
|
|
26
|
+
type: {
|
|
27
|
+
type: import('vue').PropType<"number" | "reset" | "submit" | "button" | "time" | "image" | "text" | "search" | "hidden" | "color" | "checkbox" | "radio" | "range" | "date" | "url" | "email" | "week" | "month" | "datetime-local" | "file" | "password" | "tel">;
|
|
28
|
+
default: "number" | "reset" | "submit" | "button" | "time" | "image" | "text" | "search" | "hidden" | "color" | "checkbox" | "radio" | "range" | "date" | "url" | "email" | "week" | "month" | "datetime-local" | "file" | "password" | "tel";
|
|
29
|
+
};
|
|
30
|
+
name: StringConstructor;
|
|
31
|
+
size: {
|
|
32
|
+
type: import('vue').PropType<import('ant-design-vue/es/button').SizeType>;
|
|
33
|
+
};
|
|
34
|
+
autofocus: {
|
|
35
|
+
type: BooleanConstructor;
|
|
36
|
+
default: any;
|
|
37
|
+
};
|
|
38
|
+
lazy: {
|
|
39
|
+
type: BooleanConstructor;
|
|
40
|
+
default: boolean;
|
|
41
|
+
};
|
|
42
|
+
maxlength: NumberConstructor;
|
|
43
|
+
loading: {
|
|
44
|
+
type: BooleanConstructor;
|
|
45
|
+
default: any;
|
|
46
|
+
};
|
|
47
|
+
bordered: {
|
|
48
|
+
type: BooleanConstructor;
|
|
49
|
+
default: any;
|
|
50
|
+
};
|
|
51
|
+
showCount: {
|
|
52
|
+
type: import('vue').PropType<boolean | import('ant-design-vue/es/vc-input/inputProps').ShowCountProps>;
|
|
53
|
+
};
|
|
54
|
+
htmlSize: NumberConstructor;
|
|
55
|
+
onPressEnter: import('vue').PropType<import('ant-design-vue/es/_util/EventInterface').KeyboardEventHandler>;
|
|
56
|
+
onKeydown: import('vue').PropType<import('ant-design-vue/es/_util/EventInterface').KeyboardEventHandler>;
|
|
57
|
+
onKeyup: import('vue').PropType<import('ant-design-vue/es/_util/EventInterface').KeyboardEventHandler>;
|
|
58
|
+
onFocus: import('vue').PropType<import('ant-design-vue/es/_util/EventInterface').FocusEventHandler>;
|
|
59
|
+
onBlur: import('vue').PropType<import('ant-design-vue/es/_util/EventInterface').FocusEventHandler>;
|
|
60
|
+
onChange: import('vue').PropType<import('ant-design-vue/es/_util/EventInterface').ChangeEventHandler>;
|
|
61
|
+
onInput: import('vue').PropType<import('ant-design-vue/es/_util/EventInterface').ChangeEventHandler>;
|
|
62
|
+
'onUpdate:value': import('vue').PropType<(val: string) => void>;
|
|
63
|
+
onCompositionstart: import('vue').PropType<import('ant-design-vue/es/_util/EventInterface').CompositionEventHandler>;
|
|
64
|
+
onCompositionend: import('vue').PropType<import('ant-design-vue/es/_util/EventInterface').CompositionEventHandler>;
|
|
65
|
+
valueModifiers: ObjectConstructor;
|
|
66
|
+
hidden: {
|
|
67
|
+
type: BooleanConstructor;
|
|
68
|
+
default: any;
|
|
69
|
+
};
|
|
70
|
+
status: import('vue').PropType<"" | "error" | "warning">;
|
|
71
|
+
value: {
|
|
72
|
+
type: import('vue').PropType<string | number>;
|
|
73
|
+
default: any;
|
|
74
|
+
};
|
|
75
|
+
defaultValue: {
|
|
76
|
+
type: import('vue').PropType<string | number>;
|
|
77
|
+
default: any;
|
|
78
|
+
};
|
|
79
|
+
inputElement: import('vue-types').VueTypeValidableDef<any>;
|
|
80
|
+
prefixCls: StringConstructor;
|
|
81
|
+
disabled: {
|
|
82
|
+
type: BooleanConstructor;
|
|
83
|
+
default: any;
|
|
84
|
+
};
|
|
85
|
+
focused: {
|
|
86
|
+
type: BooleanConstructor;
|
|
87
|
+
default: any;
|
|
88
|
+
};
|
|
89
|
+
triggerFocus: import('vue').PropType<() => void>;
|
|
90
|
+
readonly: {
|
|
91
|
+
type: BooleanConstructor;
|
|
92
|
+
default: any;
|
|
93
|
+
};
|
|
94
|
+
handleReset: import('vue').PropType<import('ant-design-vue/es/_util/EventInterface').MouseEventHandler>;
|
|
95
|
+
addonBefore: import('vue-types').VueTypeValidableDef<any>;
|
|
96
|
+
addonAfter: import('vue-types').VueTypeValidableDef<any>;
|
|
97
|
+
prefix: import('vue-types').VueTypeValidableDef<any>;
|
|
98
|
+
suffix: import('vue-types').VueTypeValidableDef<any>;
|
|
99
|
+
clearIcon: import('vue-types').VueTypeValidableDef<any>;
|
|
100
|
+
affixWrapperClassName: StringConstructor;
|
|
101
|
+
groupClassName: StringConstructor;
|
|
102
|
+
wrapperClassName: StringConstructor;
|
|
103
|
+
inputClassName: StringConstructor;
|
|
104
|
+
allowClear: {
|
|
105
|
+
type: BooleanConstructor;
|
|
106
|
+
default: any;
|
|
107
|
+
};
|
|
108
|
+
}, "wrapperClassName" | "affixWrapperClassName" | "groupClassName" | "inputClassName">>> & Readonly<{}>, () => import('ant-design-vue/es/_util/type').VueNode, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
|
|
109
|
+
value: string | number;
|
|
110
|
+
type: "number" | "reset" | "submit" | "button" | "time" | "image" | "text" | "search" | "hidden" | "color" | "checkbox" | "radio" | "range" | "date" | "url" | "email" | "week" | "month" | "datetime-local" | "file" | "password" | "tel";
|
|
111
|
+
focused: boolean;
|
|
112
|
+
hidden: boolean;
|
|
113
|
+
disabled: boolean;
|
|
114
|
+
autofocus: boolean;
|
|
115
|
+
readonly: boolean;
|
|
116
|
+
defaultValue: string | number;
|
|
117
|
+
loading: boolean;
|
|
118
|
+
lazy: boolean;
|
|
119
|
+
bordered: boolean;
|
|
120
|
+
allowClear: boolean;
|
|
121
|
+
}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
122
|
+
P: {};
|
|
123
|
+
B: {};
|
|
124
|
+
D: {};
|
|
125
|
+
C: {};
|
|
126
|
+
M: {};
|
|
127
|
+
Defaults: {};
|
|
128
|
+
}, Readonly<import('vue').ExtractPropTypes<Omit<{
|
|
129
|
+
id: StringConstructor;
|
|
130
|
+
placeholder: {
|
|
131
|
+
type: import('vue').PropType<string | number>;
|
|
132
|
+
};
|
|
133
|
+
autocomplete: StringConstructor;
|
|
134
|
+
type: {
|
|
135
|
+
type: import('vue').PropType<"number" | "reset" | "submit" | "button" | "time" | "image" | "text" | "search" | "hidden" | "color" | "checkbox" | "radio" | "range" | "date" | "url" | "email" | "week" | "month" | "datetime-local" | "file" | "password" | "tel">;
|
|
136
|
+
default: "number" | "reset" | "submit" | "button" | "time" | "image" | "text" | "search" | "hidden" | "color" | "checkbox" | "radio" | "range" | "date" | "url" | "email" | "week" | "month" | "datetime-local" | "file" | "password" | "tel";
|
|
137
|
+
};
|
|
138
|
+
name: StringConstructor;
|
|
139
|
+
size: {
|
|
140
|
+
type: import('vue').PropType<import('ant-design-vue/es/button').SizeType>;
|
|
141
|
+
};
|
|
142
|
+
autofocus: {
|
|
143
|
+
type: BooleanConstructor;
|
|
144
|
+
default: any;
|
|
145
|
+
};
|
|
146
|
+
lazy: {
|
|
147
|
+
type: BooleanConstructor;
|
|
148
|
+
default: boolean;
|
|
149
|
+
};
|
|
150
|
+
maxlength: NumberConstructor;
|
|
151
|
+
loading: {
|
|
152
|
+
type: BooleanConstructor;
|
|
153
|
+
default: any;
|
|
154
|
+
};
|
|
155
|
+
bordered: {
|
|
156
|
+
type: BooleanConstructor;
|
|
157
|
+
default: any;
|
|
158
|
+
};
|
|
159
|
+
showCount: {
|
|
160
|
+
type: import('vue').PropType<boolean | import('ant-design-vue/es/vc-input/inputProps').ShowCountProps>;
|
|
161
|
+
};
|
|
162
|
+
htmlSize: NumberConstructor;
|
|
163
|
+
onPressEnter: import('vue').PropType<import('ant-design-vue/es/_util/EventInterface').KeyboardEventHandler>;
|
|
164
|
+
onKeydown: import('vue').PropType<import('ant-design-vue/es/_util/EventInterface').KeyboardEventHandler>;
|
|
165
|
+
onKeyup: import('vue').PropType<import('ant-design-vue/es/_util/EventInterface').KeyboardEventHandler>;
|
|
166
|
+
onFocus: import('vue').PropType<import('ant-design-vue/es/_util/EventInterface').FocusEventHandler>;
|
|
167
|
+
onBlur: import('vue').PropType<import('ant-design-vue/es/_util/EventInterface').FocusEventHandler>;
|
|
168
|
+
onChange: import('vue').PropType<import('ant-design-vue/es/_util/EventInterface').ChangeEventHandler>;
|
|
169
|
+
onInput: import('vue').PropType<import('ant-design-vue/es/_util/EventInterface').ChangeEventHandler>;
|
|
170
|
+
'onUpdate:value': import('vue').PropType<(val: string) => void>;
|
|
171
|
+
onCompositionstart: import('vue').PropType<import('ant-design-vue/es/_util/EventInterface').CompositionEventHandler>;
|
|
172
|
+
onCompositionend: import('vue').PropType<import('ant-design-vue/es/_util/EventInterface').CompositionEventHandler>;
|
|
173
|
+
valueModifiers: ObjectConstructor;
|
|
174
|
+
hidden: {
|
|
175
|
+
type: BooleanConstructor;
|
|
176
|
+
default: any;
|
|
177
|
+
};
|
|
178
|
+
status: import('vue').PropType<"" | "error" | "warning">;
|
|
179
|
+
value: {
|
|
180
|
+
type: import('vue').PropType<string | number>;
|
|
181
|
+
default: any;
|
|
182
|
+
};
|
|
183
|
+
defaultValue: {
|
|
184
|
+
type: import('vue').PropType<string | number>;
|
|
185
|
+
default: any;
|
|
186
|
+
};
|
|
187
|
+
inputElement: import('vue-types').VueTypeValidableDef<any>;
|
|
188
|
+
prefixCls: StringConstructor;
|
|
189
|
+
disabled: {
|
|
190
|
+
type: BooleanConstructor;
|
|
191
|
+
default: any;
|
|
192
|
+
};
|
|
193
|
+
focused: {
|
|
194
|
+
type: BooleanConstructor;
|
|
195
|
+
default: any;
|
|
196
|
+
};
|
|
197
|
+
triggerFocus: import('vue').PropType<() => void>;
|
|
198
|
+
readonly: {
|
|
199
|
+
type: BooleanConstructor;
|
|
200
|
+
default: any;
|
|
201
|
+
};
|
|
202
|
+
handleReset: import('vue').PropType<import('ant-design-vue/es/_util/EventInterface').MouseEventHandler>;
|
|
203
|
+
addonBefore: import('vue-types').VueTypeValidableDef<any>;
|
|
204
|
+
addonAfter: import('vue-types').VueTypeValidableDef<any>;
|
|
205
|
+
prefix: import('vue-types').VueTypeValidableDef<any>;
|
|
206
|
+
suffix: import('vue-types').VueTypeValidableDef<any>;
|
|
207
|
+
clearIcon: import('vue-types').VueTypeValidableDef<any>;
|
|
208
|
+
affixWrapperClassName: StringConstructor;
|
|
209
|
+
groupClassName: StringConstructor;
|
|
210
|
+
wrapperClassName: StringConstructor;
|
|
211
|
+
inputClassName: StringConstructor;
|
|
212
|
+
allowClear: {
|
|
213
|
+
type: BooleanConstructor;
|
|
214
|
+
default: any;
|
|
215
|
+
};
|
|
216
|
+
}, "wrapperClassName" | "affixWrapperClassName" | "groupClassName" | "inputClassName">>> & Readonly<{}>, () => import('ant-design-vue/es/_util/type').VueNode, {}, {}, {}, {
|
|
217
|
+
value: string | number;
|
|
218
|
+
type: "number" | "reset" | "submit" | "button" | "time" | "image" | "text" | "search" | "hidden" | "color" | "checkbox" | "radio" | "range" | "date" | "url" | "email" | "week" | "month" | "datetime-local" | "file" | "password" | "tel";
|
|
219
|
+
focused: boolean;
|
|
220
|
+
hidden: boolean;
|
|
221
|
+
disabled: boolean;
|
|
222
|
+
autofocus: boolean;
|
|
223
|
+
readonly: boolean;
|
|
224
|
+
defaultValue: string | number;
|
|
225
|
+
loading: boolean;
|
|
226
|
+
lazy: boolean;
|
|
227
|
+
bordered: boolean;
|
|
228
|
+
allowClear: boolean;
|
|
229
|
+
}> | null)[];
|
|
230
|
+
}, HTMLElement>;
|
|
231
|
+
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ContractTemplateValidationError } from './types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
passed: boolean;
|
|
4
|
+
summary: string;
|
|
5
|
+
errors: ContractTemplateValidationError[];
|
|
6
|
+
expanded: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
9
|
+
toggle: () => any;
|
|
10
|
+
focusError: (error: ContractTemplateValidationError) => any;
|
|
11
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
12
|
+
onToggle?: (() => any) | undefined;
|
|
13
|
+
onFocusError?: ((error: ContractTemplateValidationError) => any) | undefined;
|
|
14
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
15
|
+
export default _default;
|
|
@@ -187,8 +187,8 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
|
187
187
|
readonly: boolean;
|
|
188
188
|
active: boolean;
|
|
189
189
|
zoom: number;
|
|
190
|
-
processImageFile: (file: File) => Promise<string | null>;
|
|
191
190
|
signingPlacements: ContractTemplateSigningPlacement[];
|
|
191
|
+
processImageFile: (file: File) => Promise<string | null>;
|
|
192
192
|
selectedVariableKey: string;
|
|
193
193
|
selectedSigningPlacementId: string;
|
|
194
194
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
@@ -1,10 +1,18 @@
|
|
|
1
|
-
import { ContractTemplateContentImage, ContractTemplateData, ContractLocationRule, ContractTemplateDesignerProps, ContractTemplateDraftCacheStatus, ContractTemplateEditorCommand, ContractTemplateEditorTextAlign, ContractTemplateFieldStyle, ContractTemplatePageSize, ContractTemplateLocationRule, ContractTemplateLocationRuleOptions, ContractTemplateSigningPlacement, ContractTemplateSigningPlacementType, ContractTemplateTableCommandCapabilities, ContractTemplateValidationError, ContractTemplateVariable } from './types';
|
|
1
|
+
import { ContractTemplateContentImage, ContractTemplateData, ContractTemplateFile, ContractTemplateFilesExportResult, ContractLocationRule, ContractTemplateDesignerProps, ContractTemplateDraftCacheStatus, ContractTemplateEditorCommand, ContractTemplateEditorTextAlign, ContractTemplateFieldStyle, ContractTemplatePageSize, ContractTemplateLocationRule, ContractTemplateLocationRuleOptions, ContractTemplateSigningPlacement, ContractTemplateSigningPlacementType, ContractTemplateTableCommandCapabilities, ContractTemplateValidationError, ContractTemplateVariable } from './types';
|
|
2
2
|
import { ContractTemplateImageSource } from './utils/content-image';
|
|
3
3
|
declare const _default: import('vue').DefineComponent<ContractTemplateDesignerProps, {
|
|
4
4
|
getValue: () => ContractTemplateData;
|
|
5
5
|
setValue: (value: ContractTemplateData) => void;
|
|
6
|
+
getFiles: () => ContractTemplateFile[];
|
|
7
|
+
setFiles: (files: ContractTemplateFile[], activeFileId?: string) => void;
|
|
8
|
+
addFile: (name?: string) => ContractTemplateFile | undefined;
|
|
9
|
+
selectFile: (fileId: string) => void;
|
|
10
|
+
renameFile: (fileId: string, name: string) => ContractTemplateFile | undefined;
|
|
11
|
+
removeFile: (fileId: string) => ContractTemplateFile | undefined;
|
|
12
|
+
moveFile: (fileId: string, direction: -1 | 1) => ContractTemplateFile | undefined;
|
|
6
13
|
validate: () => ContractTemplateValidationError[];
|
|
7
14
|
exportTemplate: () => import('./types').ContractTemplateExportResult;
|
|
15
|
+
exportFiles: () => ContractTemplateFilesExportResult;
|
|
8
16
|
getSubmitData: () => import('./types').ContractTemplateExportResult;
|
|
9
17
|
clearTemplate: () => ContractTemplateData;
|
|
10
18
|
saveDraftCache: () => ContractTemplateDraftCacheStatus;
|
|
@@ -38,8 +46,15 @@ declare const _default: import('vue').DefineComponent<ContractTemplateDesignerPr
|
|
|
38
46
|
validate: (errors: ContractTemplateValidationError[]) => any;
|
|
39
47
|
"update:modelValue": (value: ContractTemplateData) => any;
|
|
40
48
|
change: (value: ContractTemplateData) => any;
|
|
49
|
+
"file-change": (file: ContractTemplateFile) => any;
|
|
41
50
|
"signing-placement-select": (placement: ContractTemplateSigningPlacement | undefined) => any;
|
|
42
51
|
"signing-placement-remove": (placement: ContractTemplateSigningPlacement) => any;
|
|
52
|
+
"update:files": (files: ContractTemplateFile[]) => any;
|
|
53
|
+
"update:activeFileId": (fileId: string) => any;
|
|
54
|
+
"files-change": (files: ContractTemplateFile[]) => any;
|
|
55
|
+
"file-add": (file: ContractTemplateFile) => any;
|
|
56
|
+
"file-remove": (file: ContractTemplateFile) => any;
|
|
57
|
+
"file-move": (file: ContractTemplateFile, fromIndex: number, toIndex: number) => any;
|
|
43
58
|
"variable-add": (variable: ContractTemplateVariable) => any;
|
|
44
59
|
"draft-cache-change": (status: ContractTemplateDraftCacheStatus) => any;
|
|
45
60
|
"page-limit": (maxPages: number, source: "add" | "duplicate" | "auto-pagination") => any;
|
|
@@ -50,8 +65,15 @@ declare const _default: import('vue').DefineComponent<ContractTemplateDesignerPr
|
|
|
50
65
|
onValidate?: ((errors: ContractTemplateValidationError[]) => any) | undefined;
|
|
51
66
|
"onUpdate:modelValue"?: ((value: ContractTemplateData) => any) | undefined;
|
|
52
67
|
onChange?: ((value: ContractTemplateData) => any) | undefined;
|
|
68
|
+
"onFile-change"?: ((file: ContractTemplateFile) => any) | undefined;
|
|
53
69
|
"onSigning-placement-select"?: ((placement: ContractTemplateSigningPlacement | undefined) => any) | undefined;
|
|
54
70
|
"onSigning-placement-remove"?: ((placement: ContractTemplateSigningPlacement) => any) | undefined;
|
|
71
|
+
"onUpdate:files"?: ((files: ContractTemplateFile[]) => any) | undefined;
|
|
72
|
+
"onUpdate:activeFileId"?: ((fileId: string) => any) | undefined;
|
|
73
|
+
"onFiles-change"?: ((files: ContractTemplateFile[]) => any) | undefined;
|
|
74
|
+
"onFile-add"?: ((file: ContractTemplateFile) => any) | undefined;
|
|
75
|
+
"onFile-remove"?: ((file: ContractTemplateFile) => any) | undefined;
|
|
76
|
+
"onFile-move"?: ((file: ContractTemplateFile, fromIndex: number, toIndex: number) => any) | undefined;
|
|
55
77
|
"onVariable-add"?: ((variable: ContractTemplateVariable) => any) | undefined;
|
|
56
78
|
"onDraft-cache-change"?: ((status: ContractTemplateDraftCacheStatus) => any) | undefined;
|
|
57
79
|
"onPage-limit"?: ((maxPages: number, source: "add" | "duplicate" | "auto-pagination") => any) | undefined;
|
|
@@ -64,6 +86,7 @@ declare const _default: import('vue').DefineComponent<ContractTemplateDesignerPr
|
|
|
64
86
|
height: string | number;
|
|
65
87
|
readonly: boolean;
|
|
66
88
|
pageSize: ContractTemplatePageSize;
|
|
89
|
+
showSigningPlacementTools: boolean;
|
|
67
90
|
maxPages: number;
|
|
68
91
|
variableTypes: import('./types').ContractTemplateFieldTypeOption[];
|
|
69
92
|
defaultVariableStyle: ContractTemplateFieldStyle;
|
|
@@ -71,7 +94,6 @@ declare const _default: import('vue').DefineComponent<ContractTemplateDesignerPr
|
|
|
71
94
|
fontFamilyMode: import('./types').ContractTemplateFontFamilyMode;
|
|
72
95
|
showSubmitDataViewer: boolean;
|
|
73
96
|
showClearButton: boolean;
|
|
74
|
-
showSigningPlacementTools: boolean;
|
|
75
97
|
enableDraftCache: boolean;
|
|
76
98
|
draftCacheKey: string;
|
|
77
99
|
draftCacheInterval: number;
|
|
@@ -82,6 +104,7 @@ declare const _default: import('vue').DefineComponent<ContractTemplateDesignerPr
|
|
|
82
104
|
workspaceElement: HTMLElement;
|
|
83
105
|
toolbarMainElement: HTMLDivElement;
|
|
84
106
|
toolbarMoreElement: HTMLDivElement;
|
|
107
|
+
toolbarInsertSlotElement: HTMLDivElement;
|
|
85
108
|
toolbarTypographySlotElement: HTMLDivElement;
|
|
86
109
|
toolbarCleanupSlotElement: HTMLDivElement;
|
|
87
110
|
toolbarTableSlotElement: HTMLDivElement;
|
package/dist/types/components/pro-contract-template-designer/src/SigningPlacementInspector.vue.d.ts
CHANGED
|
@@ -7,11 +7,11 @@ type __VLS_Props = {
|
|
|
7
7
|
};
|
|
8
8
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
9
9
|
remove: () => any;
|
|
10
|
-
update: (patch: Partial<ContractTemplateSigningPlacement>) => any;
|
|
11
10
|
duplicate: () => any;
|
|
11
|
+
update: (patch: Partial<ContractTemplateSigningPlacement>) => any;
|
|
12
12
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
13
13
|
onRemove?: (() => any) | undefined;
|
|
14
|
-
onUpdate?: ((patch: Partial<ContractTemplateSigningPlacement>) => any) | undefined;
|
|
15
14
|
onDuplicate?: (() => any) | undefined;
|
|
15
|
+
onUpdate?: ((patch: Partial<ContractTemplateSigningPlacement>) => any) | undefined;
|
|
16
16
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLElement>;
|
|
17
17
|
export default _default;
|
|
@@ -14,7 +14,7 @@ export declare const DEFAULT_MULTILINE_LINE_HEIGHT = 28;
|
|
|
14
14
|
export declare const CONTRACT_TEMPLATE_RENDERER_VERSION = "contract-template-renderer-1.0.0";
|
|
15
15
|
/** 合同渲染 CSS 版本快照,用于服务端 PDF 复现。 */
|
|
16
16
|
export declare const CONTRACT_TEMPLATE_STYLE_VERSION = "contract-render-css-1.0.0";
|
|
17
|
-
/** 页数配置只接受正整数;非法值回落到默认
|
|
17
|
+
/** 页数配置只接受正整数;非法值回落到默认 20 页。 */
|
|
18
18
|
export declare function normalizeContractTemplateMaxPages(value: unknown): number;
|
|
19
19
|
/** 正文可插入的变量类型及其默认尺寸。 */
|
|
20
20
|
export declare const DEFAULT_FIELD_TYPES: ContractTemplateFieldTypeOption[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ContractTemplateData, ContractTemplateDraftCacheStatus } from '../types';
|
|
1
|
+
import { ContractTemplateData, ContractTemplateDraftCacheStatus, ContractTemplateFile } from '../types';
|
|
2
2
|
/**
|
|
3
3
|
* 合同模板草稿的本地缓存层。
|
|
4
4
|
*
|
|
@@ -8,6 +8,7 @@ import { ContractTemplateData, ContractTemplateDraftCacheStatus } from '../types
|
|
|
8
8
|
*/
|
|
9
9
|
/** 载荷版本号。结构变更时递增,读到旧版本一律按不兼容丢弃,避免反序列化出半截数据。 */
|
|
10
10
|
export declare const CONTRACT_TEMPLATE_DRAFT_CACHE_VERSION = 1;
|
|
11
|
+
export declare const CONTRACT_TEMPLATE_FILES_DRAFT_CACHE_VERSION = 1;
|
|
11
12
|
export declare const DEFAULT_DRAFT_CACHE_KEY = "gd-antdv:pro-contract-template-designer:draft";
|
|
12
13
|
/** 自动缓存间隔,5s 是编辑手感与写盘频率的折中。 */
|
|
13
14
|
export declare const DEFAULT_DRAFT_CACHE_INTERVAL = 5000;
|
|
@@ -43,6 +44,28 @@ export interface LoadTemplateDraftCacheResult {
|
|
|
43
44
|
value?: ContractTemplateData;
|
|
44
45
|
valueSerialized?: string;
|
|
45
46
|
}
|
|
47
|
+
export interface ContractTemplateFilesDraftCacheValue {
|
|
48
|
+
files: ContractTemplateFile[];
|
|
49
|
+
activeFileId: string;
|
|
50
|
+
}
|
|
51
|
+
export interface ContractTemplateFilesDraftCachePayload {
|
|
52
|
+
kind: 'files';
|
|
53
|
+
version: number;
|
|
54
|
+
savedAt: number;
|
|
55
|
+
value: ContractTemplateFilesDraftCacheValue;
|
|
56
|
+
}
|
|
57
|
+
export interface SaveTemplateFilesDraftCacheOptions {
|
|
58
|
+
storage?: ContractTemplateDraftCacheStorage;
|
|
59
|
+
key: string;
|
|
60
|
+
value: ContractTemplateFilesDraftCacheValue;
|
|
61
|
+
maxBytes: number;
|
|
62
|
+
previousValueSerialized?: string;
|
|
63
|
+
}
|
|
64
|
+
export interface LoadTemplateFilesDraftCacheResult {
|
|
65
|
+
status: ContractTemplateDraftCacheStatus;
|
|
66
|
+
value?: ContractTemplateFilesDraftCacheValue;
|
|
67
|
+
valueSerialized?: string;
|
|
68
|
+
}
|
|
46
69
|
/**
|
|
47
70
|
* 探测可用的 localStorage。
|
|
48
71
|
*
|
|
@@ -64,6 +87,8 @@ export declare function formatDraftCacheSavedAt(savedAt?: number): string;
|
|
|
64
87
|
* 重新序列化、重新超限,白白消耗一次 JSON.stringify。
|
|
65
88
|
*/
|
|
66
89
|
export declare function saveTemplateDraftCache(options: SaveTemplateDraftCacheOptions): SaveTemplateDraftCacheResult;
|
|
90
|
+
/** 多文件模式以单个 envelope 保存名称、顺序、全部正文与当前文件。 */
|
|
91
|
+
export declare function saveTemplateFilesDraftCache(options: SaveTemplateFilesDraftCacheOptions): SaveTemplateDraftCacheResult;
|
|
67
92
|
/**
|
|
68
93
|
* 读取草稿。
|
|
69
94
|
*
|
|
@@ -71,6 +96,7 @@ export declare function saveTemplateDraftCache(options: SaveTemplateDraftCacheOp
|
|
|
71
96
|
* 有但解析不了或版本不对(invalid)——只有第二种是正常状态,不该提示异常。
|
|
72
97
|
*/
|
|
73
98
|
export declare function loadTemplateDraftCache(storage: ContractTemplateDraftCacheStorage | undefined, key: string): LoadTemplateDraftCacheResult;
|
|
99
|
+
export declare function loadTemplateFilesDraftCache(storage: ContractTemplateDraftCacheStorage | undefined, key: string): LoadTemplateFilesDraftCacheResult;
|
|
74
100
|
/** 清理草稿。删除失败同样只回报状态,不影响后续编辑。 */
|
|
75
101
|
export declare function clearTemplateDraftCache(storage: ContractTemplateDraftCacheStorage | undefined, key: string): ContractTemplateDraftCacheStatus;
|
|
76
102
|
/**
|
|
@@ -81,3 +107,5 @@ export declare function clearTemplateDraftCache(storage: ContractTemplateDraftCa
|
|
|
81
107
|
* 判定条件:无变量、只有一页、无签署位置,且这一页正文 HTML 与 JSON 都是空的。
|
|
82
108
|
*/
|
|
83
109
|
export declare function isBlankTemplateDraftValue(value: ContractTemplateData | undefined): boolean;
|
|
110
|
+
/** 仅当当前每份文件都为空时才自动恢复多文件草稿,避免覆盖宿主已有正文。 */
|
|
111
|
+
export declare function isBlankTemplateFilesDraftValue(value: ContractTemplateFilesDraftCacheValue | undefined): boolean;
|
package/dist/types/components/pro-contract-template-designer/src/composables/use-template-files.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ContractTemplateData, ContractTemplateFile, ContractTemplateFilesExportResult, ContractTemplatePageSize } from '../types';
|
|
2
|
+
/** 深拷贝多文件数据,避免宿主与设计器共享嵌套页面引用。 */
|
|
3
|
+
export declare function cloneContractTemplateFiles(files: ContractTemplateFile[]): {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
template: ContractTemplateData;
|
|
7
|
+
}[];
|
|
8
|
+
export declare function createContractTemplateFile(name?: string, pageSize?: ContractTemplatePageSize): ContractTemplateFile;
|
|
9
|
+
/**
|
|
10
|
+
* 归一化文件 id、名称和内部模板。
|
|
11
|
+
* 重复/空 id 只在编辑态补成稳定新 id,外部数据不会被原地改写。
|
|
12
|
+
*/
|
|
13
|
+
export declare function normalizeContractTemplateFiles(input: ContractTemplateFile[] | undefined, fallbackTemplate?: ContractTemplateData, pageSize?: ContractTemplatePageSize): ContractTemplateFile[];
|
|
14
|
+
/** 当前 id 不可用时稳定回退第一份文件,空数组返回空字符串。 */
|
|
15
|
+
export declare function resolveContractTemplateActiveFileId(files: ContractTemplateFile[], activeFileId?: string): string;
|
|
16
|
+
/** 不可变替换一份文件的模板;找不到 id 时保持原数组内容。 */
|
|
17
|
+
export declare function replaceContractTemplateFile(files: ContractTemplateFile[], fileId: string, template: ContractTemplateData): ContractTemplateFile[];
|
|
18
|
+
/** 文件名去首尾空白;空名称沿用旧名称,避免生成不可识别的空标签。 */
|
|
19
|
+
export declare function renameContractTemplateFile(files: ContractTemplateFile[], fileId: string, name: string): ContractTemplateFile[];
|
|
20
|
+
/** 至少保留一份文件;无法删除时返回原顺序的浅拷贝。 */
|
|
21
|
+
export declare function removeContractTemplateFile(files: ContractTemplateFile[], fileId: string): ContractTemplateFile[];
|
|
22
|
+
/** 按相邻方向移动文件,越界或找不到文件时保持原顺序。 */
|
|
23
|
+
export declare function moveContractTemplateFile(files: ContractTemplateFile[], fileId: string, direction: -1 | 1): ContractTemplateFile[];
|
|
24
|
+
export declare function exportContractTemplateFiles(files: ContractTemplateFile[]): ContractTemplateFilesExportResult;
|
|
@@ -10,8 +10,8 @@ export declare const DEFAULT_CONTRACT_FONT_FAMILY = "Noto Serif SC, Source Han S
|
|
|
10
10
|
export declare const DEFAULT_FONT_FAMILY_OPTIONS: ContractTemplateFontFamilyOption[];
|
|
11
11
|
/** 字号下拉的预设档位;不在此列表里的字号仍可手动输入,由工具栏临时补进选项。 */
|
|
12
12
|
export declare const DEFAULT_FONT_SIZE_PRESETS: number[];
|
|
13
|
-
/**
|
|
14
|
-
export declare const DEFAULT_CONTRACT_MAX_PAGES =
|
|
13
|
+
/** 单份合同文件的默认页数上限;组件使用方可通过 maxPages 调整。 */
|
|
14
|
+
export declare const DEFAULT_CONTRACT_MAX_PAGES = 20;
|
|
15
15
|
/** 对齐方式选项。合同排版不使用两端对齐,因此只有左 / 中 / 右三档。 */
|
|
16
16
|
export declare const DEFAULT_TEXT_ALIGN_OPTIONS: Array<{
|
|
17
17
|
label: string;
|