@guodun/antdv 1.4.1 → 1.4.3
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/src/ContractSigningLocationCanvas.vue.mjs +304 -293
- package/dist/es/components/contract-signing-location/src/coordinates.mjs +23 -23
- package/dist/es/components/contract-signing-location/src/location-rules.mjs +20 -10
- package/dist/es/components/contract-signing-location/src/page-layout.mjs +12 -9
- package/dist/es/components/contract-signing-location/src/template-source.mjs +2 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerInspector.vue.mjs +208 -180
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerSidebar.vue.mjs +2 -1
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerToolbar.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerToolbar.vue.mjs +690 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.vue.mjs +253 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateImageContextMenu.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateImageContextMenu.vue.mjs +87 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePageDecorations.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePageDecorations.vue.mjs +98 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsInspector.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsInspector.vue.mjs +550 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsStudio.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsStudio.vue.mjs +117 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePreviewModal.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePreviewModal.vue.mjs +96 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue.mjs +51 -26
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateRendererPage.vue.mjs +56 -33
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateSubmitDataModal.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateSubmitDataModal.vue.mjs +29 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateTextBubbleMenu.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateTextBubbleMenu.vue.mjs +179 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateTextContextMenu.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateTextContextMenu.vue.mjs +390 -0
- package/dist/es/components/pro-contract-template-designer/src/DesignerPage.vue.mjs +332 -263
- package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.mjs +1442 -2287
- package/dist/es/components/pro-contract-template-designer/src/composables/use-auto-pagination.mjs +71 -0
- package/dist/es/components/pro-contract-template-designer/src/composables/use-designer-files.mjs +11 -0
- package/dist/es/components/pro-contract-template-designer/src/composables/use-draft-cache-session.mjs +111 -0
- package/dist/es/components/pro-contract-template-designer/src/composables/use-signing-placement-editor.mjs +79 -0
- package/dist/es/components/pro-contract-template-designer/src/composables/use-template-designer.mjs +189 -160
- package/dist/es/components/pro-contract-template-designer/src/composables/use-template-files.mjs +35 -22
- package/dist/es/components/pro-contract-template-designer/src/composables/use-toolbar-overflow.mjs +71 -0
- package/dist/es/components/pro-contract-template-designer/src/constants.mjs +71 -10
- package/dist/es/components/pro-contract-template-designer/src/extensions/editor-extensions.mjs +1 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/block-style.mjs +43 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/context-menu-viewport.mjs +13 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/editor-state.mjs +7 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/page-decorations.mjs +398 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/serialize-fingerprint.mjs +6 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/template-renderer.mjs +88 -72
- package/dist/es/components/pro-contract-template-designer/style/index.css +1 -1
- package/dist/es/index.mjs +20 -20
- package/dist/lib/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.cjs +1 -1
- package/dist/lib/components/contract-signing-location/src/coordinates.cjs +1 -1
- package/dist/lib/components/contract-signing-location/src/location-rules.cjs +1 -1
- package/dist/lib/components/contract-signing-location/src/page-layout.cjs +1 -1
- package/dist/lib/components/contract-signing-location/src/template-source.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerInspector.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerSidebar.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerToolbar.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerToolbar.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateImageContextMenu.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateImageContextMenu.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePageDecorations.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePageDecorations.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsInspector.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsInspector.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsStudio.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsStudio.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePreviewModal.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePreviewModal.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateRendererPage.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateSubmitDataModal.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateSubmitDataModal.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateTextBubbleMenu.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateTextBubbleMenu.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateTextContextMenu.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateTextContextMenu.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/composables/use-auto-pagination.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/composables/use-designer-files.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/composables/use-draft-cache-session.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/composables/use-signing-placement-editor.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/composables/use-template-designer.cjs +4 -4
- package/dist/lib/components/pro-contract-template-designer/src/composables/use-template-files.cjs +2 -2
- package/dist/lib/components/pro-contract-template-designer/src/composables/use-toolbar-overflow.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/constants.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/extensions/editor-extensions.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/utils/block-style.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/context-menu-viewport.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/editor-state.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/page-decorations.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/serialize-fingerprint.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/template-renderer.cjs +3 -3
- package/dist/lib/components/pro-contract-template-designer/style/index.css +1 -1
- package/dist/lib/index.cjs +1 -1
- package/dist/theme/icon.css +1 -1
- package/dist/theme/index.css +1 -1
- package/dist/types/components/contract-signing-location/src/coordinates.d.ts +2 -2
- package/dist/types/components/contract-signing-location/src/page-layout.d.ts +2 -2
- package/dist/types/components/contract-signing-location/src/template-source.d.ts +2 -0
- package/dist/types/components/contract-signing-location/src/types.d.ts +3 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateDesignerInspector.vue.d.ts +3 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateDesignerSidebar.vue.d.ts +1 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateDesignerToolbar.vue.d.ts +104 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.vue.d.ts +60 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateImageContextMenu.vue.d.ts +27 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplatePageDecorations.vue.d.ts +13 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsInspector.vue.d.ts +28 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsStudio.vue.d.ts +77 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplatePreviewModal.vue.d.ts +36 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue.d.ts +5 -1
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateRendererHeader.vue.d.ts +4 -4
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateRendererToolbar.vue.d.ts +4 -4
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateSubmitDataModal.vue.d.ts +12 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateTextBubbleMenu.vue.d.ts +43 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateTextContextMenu.vue.d.ts +77 -0
- package/dist/types/components/pro-contract-template-designer/src/DesignerPage.vue.d.ts +30 -32
- package/dist/types/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.d.ts +456 -12
- package/dist/types/components/pro-contract-template-designer/src/composables/use-auto-pagination.d.ts +43 -0
- package/dist/types/components/pro-contract-template-designer/src/composables/use-designer-files.d.ts +22 -0
- package/dist/types/components/pro-contract-template-designer/src/composables/use-draft-cache-session.d.ts +41 -0
- package/dist/types/components/pro-contract-template-designer/src/composables/use-signing-placement-editor.d.ts +49 -0
- package/dist/types/components/pro-contract-template-designer/src/composables/use-template-designer.d.ts +15 -1
- package/dist/types/components/pro-contract-template-designer/src/composables/use-template-files.d.ts +13 -0
- package/dist/types/components/pro-contract-template-designer/src/composables/use-toolbar-overflow.d.ts +19 -0
- package/dist/types/components/pro-contract-template-designer/src/constants.d.ts +7 -1
- package/dist/types/components/pro-contract-template-designer/src/types.d.ts +89 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/block-style.d.ts +4 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/context-menu-viewport.d.ts +25 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/editor-state.d.ts +8 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/page-decorations.d.ts +90 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/serialize-fingerprint.d.ts +8 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/template-renderer.d.ts +4 -1
- package/package.json +3 -3
|
@@ -1,38 +1,12 @@
|
|
|
1
1
|
import { JSONContent } from '@tiptap/core';
|
|
2
|
-
import { ContractTemplateEditorCommand,
|
|
2
|
+
import { ContractTemplateEditorCommand, ContractTemplateEditorContextMenuPayload, ContractTemplateEditorState, ContractTemplateContentImage, ContractTemplateFieldType, ContractTemplatePage, ContractTemplatePageDecorations, ContractTemplatePageSize, ContractTemplateSigningPlacement, ContractTemplateSigningPlacementType, ContractTemplateTableCommandCapabilities, ContractTemplateVariable } from './types';
|
|
3
3
|
import { ContractTemplateSigningPlacementDragPayload } from './utils/signing-placement';
|
|
4
|
-
/** 右键菜单载荷:图片节点优先,其次按既有规则落到正文或表格菜单。 */
|
|
5
|
-
type EditorContextMenuPayload = {
|
|
6
|
-
type: 'text';
|
|
7
|
-
pageId: string;
|
|
8
|
-
clientX: number;
|
|
9
|
-
clientY: number;
|
|
10
|
-
hasSelection: boolean;
|
|
11
|
-
selectionWidth?: number;
|
|
12
|
-
leadingText?: string;
|
|
13
|
-
} | {
|
|
14
|
-
type: 'image';
|
|
15
|
-
pageId: string;
|
|
16
|
-
clientX: number;
|
|
17
|
-
clientY: number;
|
|
18
|
-
image: ContractTemplateSelectedContentImage;
|
|
19
|
-
} | {
|
|
20
|
-
type: 'table';
|
|
21
|
-
pageId: string;
|
|
22
|
-
clientX: number;
|
|
23
|
-
clientY: number;
|
|
24
|
-
capabilities: ContractTemplateTableCommandCapabilities;
|
|
25
|
-
activeAlignment: ContractTemplateEditorTextAlign | 'mixed';
|
|
26
|
-
affectedVariableCounts: {
|
|
27
|
-
deleteRow: number;
|
|
28
|
-
deleteColumn: number;
|
|
29
|
-
deleteTable: number;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
4
|
type __VLS_Props = {
|
|
33
5
|
page: ContractTemplatePage;
|
|
34
6
|
pageIndex: number;
|
|
35
7
|
pageSize: ContractTemplatePageSize;
|
|
8
|
+
pageDecorations?: ContractTemplatePageDecorations;
|
|
9
|
+
totalPages?: number;
|
|
36
10
|
variables: ContractTemplateVariable[];
|
|
37
11
|
selectedVariableKey?: string;
|
|
38
12
|
active?: boolean;
|
|
@@ -43,6 +17,19 @@ type __VLS_Props = {
|
|
|
43
17
|
selectedSigningPlacementId?: string;
|
|
44
18
|
processImageFile?: (file: File) => Promise<string | null>;
|
|
45
19
|
};
|
|
20
|
+
/**
|
|
21
|
+
* 选区在视口坐标下的包围盒;供选区气泡工具条定位。
|
|
22
|
+
*
|
|
23
|
+
* 「哪种选区不配气泡」的判断收在这里:空选区、`CellSelection`、`NodeSelection`
|
|
24
|
+
* 一律返回 `undefined`,父组件就不用再去猜 `isTableActive` 的语义
|
|
25
|
+
* (光标只是落在表格里时它也为真,那种情况气泡应该照常出现)。
|
|
26
|
+
*/
|
|
27
|
+
declare function getSelectionViewportRect(): {
|
|
28
|
+
top: number;
|
|
29
|
+
bottom: number;
|
|
30
|
+
left: number;
|
|
31
|
+
right: number;
|
|
32
|
+
} | undefined;
|
|
46
33
|
/**
|
|
47
34
|
* 探测每个表格命令当前是否可用,用于禁用右键菜单里不适用的项。
|
|
48
35
|
*
|
|
@@ -57,6 +44,13 @@ declare function getTableCommandCapabilities(): ContractTemplateTableCommandCapa
|
|
|
57
44
|
* 但事务不会被提交到 view,因此这里只是「试算」,编辑器内容保持不变。
|
|
58
45
|
*/
|
|
59
46
|
declare function getAffectedVariableCount(action: 'delete-table-row' | 'delete-table-column' | 'delete-table'): number;
|
|
47
|
+
/**
|
|
48
|
+
* 由选区气泡的「更多」调起完整正文右键菜单。
|
|
49
|
+
*
|
|
50
|
+
* 走同一条 `emitTextContextMenu` 通道,选区宽度与前置文字仍在页面内一次算好,
|
|
51
|
+
* 父组件不需要为气泡再拼一份会漂移的载荷。
|
|
52
|
+
*/
|
|
53
|
+
declare function requestTextContextMenu(clientX: number, clientY: number): void;
|
|
60
54
|
/**
|
|
61
55
|
* 汇总工具栏需要的编辑器状态。
|
|
62
56
|
*
|
|
@@ -127,7 +121,7 @@ declare function removeVariable(variableKey: string): ContractTemplatePage | und
|
|
|
127
121
|
declare function scrollIntoVariable(variableKey: string): boolean;
|
|
128
122
|
/** 滚动到指定签署位置;签署层在正文之外,只能按 `data-signing-placement-id` 找。 */
|
|
129
123
|
declare function scrollIntoSigningPlacement(placementId: string): boolean;
|
|
130
|
-
/**
|
|
124
|
+
/** 执行一条编辑器命令;段落样式与历史预设保留各自的兼容实现。 */
|
|
131
125
|
declare function runCommand(command: ContractTemplateEditorCommand): void;
|
|
132
126
|
declare function focus(): void;
|
|
133
127
|
declare function getJSON(): JSONContent | undefined;
|
|
@@ -148,6 +142,8 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
|
148
142
|
insertContentImage: typeof insertContentImage;
|
|
149
143
|
updateSelectedContentImage: typeof updateSelectedContentImage;
|
|
150
144
|
getSelectionRange: typeof getSelectionRange;
|
|
145
|
+
getSelectionViewportRect: typeof getSelectionViewportRect;
|
|
146
|
+
requestTextContextMenu: typeof requestTextContextMenu;
|
|
151
147
|
hasOverflowContent: typeof hasOverflowContent;
|
|
152
148
|
updateVariable: typeof updateVariable;
|
|
153
149
|
removeVariable: typeof removeVariable;
|
|
@@ -169,7 +165,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
|
169
165
|
"variable-move-blocked": (pageId: string) => any;
|
|
170
166
|
"editor-focus": (pageId: string) => any;
|
|
171
167
|
"editor-state-change": (pageId: string, state: ContractTemplateEditorState) => any;
|
|
172
|
-
"editor-context-menu": (payload:
|
|
168
|
+
"editor-context-menu": (payload: ContractTemplateEditorContextMenuPayload) => any;
|
|
173
169
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
174
170
|
"onPage-update"?: ((page: ContractTemplatePage) => any) | undefined;
|
|
175
171
|
"onVariable-drop"?: ((pageId: string, type: ContractTemplateFieldType, clientX: number, clientY: number) => any) | undefined;
|
|
@@ -181,12 +177,14 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
|
181
177
|
"onVariable-move-blocked"?: ((pageId: string) => any) | undefined;
|
|
182
178
|
"onEditor-focus"?: ((pageId: string) => any) | undefined;
|
|
183
179
|
"onEditor-state-change"?: ((pageId: string, state: ContractTemplateEditorState) => any) | undefined;
|
|
184
|
-
"onEditor-context-menu"?: ((payload:
|
|
180
|
+
"onEditor-context-menu"?: ((payload: ContractTemplateEditorContextMenuPayload) => any) | undefined;
|
|
185
181
|
}>, {
|
|
186
182
|
disabled: boolean;
|
|
187
183
|
readonly: boolean;
|
|
188
184
|
active: boolean;
|
|
189
185
|
zoom: number;
|
|
186
|
+
totalPages: number;
|
|
187
|
+
pageDecorations: ContractTemplatePageDecorations;
|
|
190
188
|
signingPlacements: ContractTemplateSigningPlacement[];
|
|
191
189
|
processImageFile: (file: File) => Promise<string | null>;
|
|
192
190
|
selectedVariableKey: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ContractTemplateContentImage, ContractTemplateData, ContractTemplateFile, ContractTemplateFilesExportResult, 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, ContractTemplateEditorState, ContractTemplateEditorTextAlign, ContractTemplateFieldStyle, ContractTemplateFieldType, ContractTemplatePageDecorations, ContractTemplatePageSize, ContractTemplateLocationRule, ContractTemplateLocationRuleOptions, ContractTemplateSigningPlacement, ContractTemplateSigningPlacementType, ContractTemplateTableInsertOptions, 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;
|
|
@@ -86,29 +86,225 @@ declare const _default: import('vue').DefineComponent<ContractTemplateDesignerPr
|
|
|
86
86
|
height: string | number;
|
|
87
87
|
readonly: boolean;
|
|
88
88
|
pageSize: ContractTemplatePageSize;
|
|
89
|
+
showDraftCacheStatus: boolean;
|
|
90
|
+
showClearButton: boolean;
|
|
91
|
+
showSubmitDataViewer: boolean;
|
|
89
92
|
showSigningPlacementTools: boolean;
|
|
90
93
|
maxPages: number;
|
|
91
94
|
variableTypes: import('./types').ContractTemplateFieldTypeOption[];
|
|
92
95
|
defaultVariableStyle: ContractTemplateFieldStyle;
|
|
93
96
|
fontFamilies: import('./types').ContractTemplateFontFamilyOption[];
|
|
94
97
|
fontFamilyMode: import('./types').ContractTemplateFontFamilyMode;
|
|
95
|
-
showSubmitDataViewer: boolean;
|
|
96
|
-
showClearButton: boolean;
|
|
97
98
|
enableDraftCache: boolean;
|
|
98
99
|
draftCacheKey: string;
|
|
99
100
|
draftCacheInterval: number;
|
|
100
101
|
draftCacheMaxBytes: number;
|
|
101
|
-
showDraftCacheStatus: boolean;
|
|
102
102
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
103
103
|
designerElement: HTMLDivElement;
|
|
104
104
|
workspaceElement: HTMLElement;
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
105
|
+
workspaceHeaderElement: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
106
|
+
summary: string;
|
|
107
|
+
draftCacheStatusText: string;
|
|
108
|
+
draftCacheStatusClass: Record<string, boolean>;
|
|
109
|
+
showDraftCacheStatus: boolean;
|
|
110
|
+
showClearButton: boolean;
|
|
111
|
+
showSubmitDataViewer: boolean;
|
|
112
|
+
readonly: boolean;
|
|
113
|
+
zoomPercent: string;
|
|
114
|
+
zoomOutDisabled: boolean;
|
|
115
|
+
zoomInDisabled: boolean;
|
|
116
|
+
isFullscreen: boolean;
|
|
117
|
+
immersive: boolean;
|
|
118
|
+
pageDecorationsOpen: boolean;
|
|
119
|
+
pageDecorationsStudioId: string;
|
|
120
|
+
pageDecorationsPresetLabel: string;
|
|
121
|
+
pageDecorationsEnabledCount: number;
|
|
122
|
+
pageDecorationsEnabledStates: {
|
|
123
|
+
header: boolean;
|
|
124
|
+
footer: boolean;
|
|
125
|
+
watermark: boolean;
|
|
126
|
+
};
|
|
127
|
+
chromeControlsId: string;
|
|
128
|
+
}> & Readonly<{
|
|
129
|
+
onClear?: (() => any) | undefined;
|
|
130
|
+
onValidate?: (() => any) | undefined;
|
|
131
|
+
onPreview?: (() => any) | undefined;
|
|
132
|
+
onFitWidth?: (() => any) | undefined;
|
|
133
|
+
onZoomOut?: (() => any) | undefined;
|
|
134
|
+
onZoomIn?: (() => any) | undefined;
|
|
135
|
+
onResetZoom?: (() => any) | undefined;
|
|
136
|
+
onToggleFullscreen?: (() => any) | undefined;
|
|
137
|
+
onToggleImmersive?: (() => any) | undefined;
|
|
138
|
+
onSubmitData?: (() => any) | undefined;
|
|
139
|
+
onTogglePageDecorations?: (() => any) | undefined;
|
|
140
|
+
onToggleChrome?: (() => any) | undefined;
|
|
141
|
+
}>, {
|
|
142
|
+
focusPageDecorations: () => void | undefined;
|
|
143
|
+
focusImmersive: () => void | undefined;
|
|
144
|
+
focusChromeToggle: () => void | undefined;
|
|
145
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
146
|
+
clear: () => any;
|
|
147
|
+
validate: () => any;
|
|
148
|
+
preview: () => any;
|
|
149
|
+
fitWidth: () => any;
|
|
150
|
+
zoomOut: () => any;
|
|
151
|
+
zoomIn: () => any;
|
|
152
|
+
resetZoom: () => any;
|
|
153
|
+
toggleFullscreen: () => any;
|
|
154
|
+
toggleImmersive: () => any;
|
|
155
|
+
submitData: () => any;
|
|
156
|
+
togglePageDecorations: () => any;
|
|
157
|
+
toggleChrome: () => any;
|
|
158
|
+
}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
159
|
+
workspaceHeader: HTMLElement;
|
|
160
|
+
}, HTMLElement, import('vue').ComponentProvideOptions, {
|
|
161
|
+
P: {};
|
|
162
|
+
B: {};
|
|
163
|
+
D: {};
|
|
164
|
+
C: {};
|
|
165
|
+
M: {};
|
|
166
|
+
Defaults: {};
|
|
167
|
+
}, Readonly<{
|
|
168
|
+
summary: string;
|
|
169
|
+
draftCacheStatusText: string;
|
|
170
|
+
draftCacheStatusClass: Record<string, boolean>;
|
|
171
|
+
showDraftCacheStatus: boolean;
|
|
172
|
+
showClearButton: boolean;
|
|
173
|
+
showSubmitDataViewer: boolean;
|
|
174
|
+
readonly: boolean;
|
|
175
|
+
zoomPercent: string;
|
|
176
|
+
zoomOutDisabled: boolean;
|
|
177
|
+
zoomInDisabled: boolean;
|
|
178
|
+
isFullscreen: boolean;
|
|
179
|
+
immersive: boolean;
|
|
180
|
+
pageDecorationsOpen: boolean;
|
|
181
|
+
pageDecorationsStudioId: string;
|
|
182
|
+
pageDecorationsPresetLabel: string;
|
|
183
|
+
pageDecorationsEnabledCount: number;
|
|
184
|
+
pageDecorationsEnabledStates: {
|
|
185
|
+
header: boolean;
|
|
186
|
+
footer: boolean;
|
|
187
|
+
watermark: boolean;
|
|
188
|
+
};
|
|
189
|
+
chromeControlsId: string;
|
|
190
|
+
}> & Readonly<{
|
|
191
|
+
onClear?: (() => any) | undefined;
|
|
192
|
+
onValidate?: (() => any) | undefined;
|
|
193
|
+
onPreview?: (() => any) | undefined;
|
|
194
|
+
onFitWidth?: (() => any) | undefined;
|
|
195
|
+
onZoomOut?: (() => any) | undefined;
|
|
196
|
+
onZoomIn?: (() => any) | undefined;
|
|
197
|
+
onResetZoom?: (() => any) | undefined;
|
|
198
|
+
onToggleFullscreen?: (() => any) | undefined;
|
|
199
|
+
onToggleImmersive?: (() => any) | undefined;
|
|
200
|
+
onSubmitData?: (() => any) | undefined;
|
|
201
|
+
onTogglePageDecorations?: (() => any) | undefined;
|
|
202
|
+
onToggleChrome?: (() => any) | undefined;
|
|
203
|
+
}>, {
|
|
204
|
+
focusPageDecorations: () => void | undefined;
|
|
205
|
+
focusImmersive: () => void | undefined;
|
|
206
|
+
focusChromeToggle: () => void | undefined;
|
|
207
|
+
}, {}, {}, {}, {}> | null;
|
|
208
|
+
workspaceChromeHandleElement: HTMLButtonElement;
|
|
209
|
+
immersiveExitElement: HTMLButtonElement;
|
|
111
210
|
canvasElement: HTMLDivElement;
|
|
211
|
+
pageDecorationsStudioElement: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
212
|
+
id?: string;
|
|
213
|
+
open: boolean;
|
|
214
|
+
decorations?: ContractTemplatePageDecorations;
|
|
215
|
+
variables: ContractTemplateVariable[];
|
|
216
|
+
fontFamilyOptions: Array<{
|
|
217
|
+
label: string;
|
|
218
|
+
value: string;
|
|
219
|
+
}>;
|
|
220
|
+
readonly: boolean;
|
|
221
|
+
disabled: boolean;
|
|
222
|
+
activeTab?: "header" | "footer" | "watermark";
|
|
223
|
+
}> & Readonly<{
|
|
224
|
+
onChange?: ((value: ContractTemplatePageDecorations) => any) | undefined;
|
|
225
|
+
onClose?: (() => any) | undefined;
|
|
226
|
+
"onUpdate:activeTab"?: ((value: "footer" | "header" | "watermark") => any) | undefined;
|
|
227
|
+
}>, {
|
|
228
|
+
focusField: (path: import('./utils/page-decorations').ContractTemplatePageDecorationFieldPath) => Promise<void>;
|
|
229
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
230
|
+
change: (value: ContractTemplatePageDecorations) => any;
|
|
231
|
+
close: () => any;
|
|
232
|
+
"update:activeTab": (value: "footer" | "header" | "watermark") => any;
|
|
233
|
+
}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
234
|
+
studioRoot: HTMLElement;
|
|
235
|
+
inspectorRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
236
|
+
decorations?: ContractTemplatePageDecorations;
|
|
237
|
+
variables: ContractTemplateVariable[];
|
|
238
|
+
fontFamilyOptions: Array<{
|
|
239
|
+
label: string;
|
|
240
|
+
value: string;
|
|
241
|
+
}>;
|
|
242
|
+
readonly: boolean;
|
|
243
|
+
disabled: boolean;
|
|
244
|
+
activeTab?: "header" | "footer" | "watermark";
|
|
245
|
+
embedded?: boolean;
|
|
246
|
+
}> & Readonly<{
|
|
247
|
+
onChange?: ((value: ContractTemplatePageDecorations) => any) | undefined;
|
|
248
|
+
"onUpdate:activeTab"?: ((value: "footer" | "header" | "watermark") => any) | undefined;
|
|
249
|
+
}>, {
|
|
250
|
+
resetToDefault: () => void;
|
|
251
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
252
|
+
change: (value: ContractTemplatePageDecorations) => any;
|
|
253
|
+
"update:activeTab": (value: "footer" | "header" | "watermark") => any;
|
|
254
|
+
}, import('vue').PublicProps, {
|
|
255
|
+
embedded: boolean;
|
|
256
|
+
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLElement, import('vue').ComponentProvideOptions, {
|
|
257
|
+
P: {};
|
|
258
|
+
B: {};
|
|
259
|
+
D: {};
|
|
260
|
+
C: {};
|
|
261
|
+
M: {};
|
|
262
|
+
Defaults: {};
|
|
263
|
+
}, Readonly<{
|
|
264
|
+
decorations?: ContractTemplatePageDecorations;
|
|
265
|
+
variables: ContractTemplateVariable[];
|
|
266
|
+
fontFamilyOptions: Array<{
|
|
267
|
+
label: string;
|
|
268
|
+
value: string;
|
|
269
|
+
}>;
|
|
270
|
+
readonly: boolean;
|
|
271
|
+
disabled: boolean;
|
|
272
|
+
activeTab?: "header" | "footer" | "watermark";
|
|
273
|
+
embedded?: boolean;
|
|
274
|
+
}> & Readonly<{
|
|
275
|
+
onChange?: ((value: ContractTemplatePageDecorations) => any) | undefined;
|
|
276
|
+
"onUpdate:activeTab"?: ((value: "footer" | "header" | "watermark") => any) | undefined;
|
|
277
|
+
}>, {
|
|
278
|
+
resetToDefault: () => void;
|
|
279
|
+
}, {}, {}, {}, {
|
|
280
|
+
embedded: boolean;
|
|
281
|
+
}> | null;
|
|
282
|
+
}, HTMLElement, import('vue').ComponentProvideOptions, {
|
|
283
|
+
P: {};
|
|
284
|
+
B: {};
|
|
285
|
+
D: {};
|
|
286
|
+
C: {};
|
|
287
|
+
M: {};
|
|
288
|
+
Defaults: {};
|
|
289
|
+
}, Readonly<{
|
|
290
|
+
id?: string;
|
|
291
|
+
open: boolean;
|
|
292
|
+
decorations?: ContractTemplatePageDecorations;
|
|
293
|
+
variables: ContractTemplateVariable[];
|
|
294
|
+
fontFamilyOptions: Array<{
|
|
295
|
+
label: string;
|
|
296
|
+
value: string;
|
|
297
|
+
}>;
|
|
298
|
+
readonly: boolean;
|
|
299
|
+
disabled: boolean;
|
|
300
|
+
activeTab?: "header" | "footer" | "watermark";
|
|
301
|
+
}> & Readonly<{
|
|
302
|
+
onChange?: ((value: ContractTemplatePageDecorations) => any) | undefined;
|
|
303
|
+
onClose?: (() => any) | undefined;
|
|
304
|
+
"onUpdate:activeTab"?: ((value: "footer" | "header" | "watermark") => any) | undefined;
|
|
305
|
+
}>, {
|
|
306
|
+
focusField: (path: import('./utils/page-decorations').ContractTemplatePageDecorationFieldPath) => Promise<void>;
|
|
307
|
+
}, {}, {}, {}, {}> | null;
|
|
112
308
|
tableContextMenuElement: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
113
309
|
capabilities: ContractTemplateTableCommandCapabilities;
|
|
114
310
|
activeAlignment: ContractTemplateEditorTextAlign | "mixed";
|
|
@@ -140,8 +336,256 @@ declare const _default: import('vue').DefineComponent<ContractTemplateDesignerPr
|
|
|
140
336
|
focusFirstItem: () => void;
|
|
141
337
|
getMenuElement: () => HTMLElement | undefined;
|
|
142
338
|
}, {}, {}, {}, {}> | null;
|
|
143
|
-
imageContextMenuElement:
|
|
144
|
-
|
|
339
|
+
imageContextMenuElement: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
340
|
+
width?: number | undefined;
|
|
341
|
+
height?: number | undefined;
|
|
342
|
+
} & {
|
|
343
|
+
x: number;
|
|
344
|
+
y: number;
|
|
345
|
+
readonly: boolean;
|
|
346
|
+
}> & Readonly<{
|
|
347
|
+
onKeydown?: ((event: KeyboardEvent) => any) | undefined;
|
|
348
|
+
onRestore?: (() => any) | undefined;
|
|
349
|
+
onApply?: (() => any) | undefined;
|
|
350
|
+
"onUpdate:width"?: ((value: number | undefined) => any) | undefined;
|
|
351
|
+
"onUpdate:height"?: ((value: number | undefined) => any) | undefined;
|
|
352
|
+
}>, {
|
|
353
|
+
getMenuElement: () => HTMLElement | undefined;
|
|
354
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
355
|
+
keydown: (event: KeyboardEvent) => any;
|
|
356
|
+
restore: () => any;
|
|
357
|
+
apply: () => any;
|
|
358
|
+
"update:width": (value: number | undefined) => any;
|
|
359
|
+
"update:height": (value: number | undefined) => any;
|
|
360
|
+
}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
361
|
+
menuElement: HTMLDivElement;
|
|
362
|
+
}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
363
|
+
P: {};
|
|
364
|
+
B: {};
|
|
365
|
+
D: {};
|
|
366
|
+
C: {};
|
|
367
|
+
M: {};
|
|
368
|
+
Defaults: {};
|
|
369
|
+
}, Readonly<{
|
|
370
|
+
width?: number | undefined;
|
|
371
|
+
height?: number | undefined;
|
|
372
|
+
} & {
|
|
373
|
+
x: number;
|
|
374
|
+
y: number;
|
|
375
|
+
readonly: boolean;
|
|
376
|
+
}> & Readonly<{
|
|
377
|
+
onKeydown?: ((event: KeyboardEvent) => any) | undefined;
|
|
378
|
+
onRestore?: (() => any) | undefined;
|
|
379
|
+
onApply?: (() => any) | undefined;
|
|
380
|
+
"onUpdate:width"?: ((value: number | undefined) => any) | undefined;
|
|
381
|
+
"onUpdate:height"?: ((value: number | undefined) => any) | undefined;
|
|
382
|
+
}>, {
|
|
383
|
+
getMenuElement: () => HTMLElement | undefined;
|
|
384
|
+
}, {}, {}, {}, {}> | null;
|
|
385
|
+
textContextMenuElement: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
386
|
+
bindOpen?: boolean;
|
|
387
|
+
bindKeyword?: string;
|
|
388
|
+
} & {
|
|
389
|
+
x: number;
|
|
390
|
+
y: number;
|
|
391
|
+
hasSelection: boolean;
|
|
392
|
+
editorState: ContractTemplateEditorState;
|
|
393
|
+
fontSizePresetOptions: Array<{
|
|
394
|
+
label: string;
|
|
395
|
+
value: number | string;
|
|
396
|
+
}>;
|
|
397
|
+
currentEditorFontSize: number;
|
|
398
|
+
editorFontSizeSearchValue: string;
|
|
399
|
+
textAlignOptions: Array<{
|
|
400
|
+
label: string;
|
|
401
|
+
value: ContractTemplateEditorTextAlign;
|
|
402
|
+
}>;
|
|
403
|
+
currentEditorTextColor: string;
|
|
404
|
+
bodyControlToolItems: Array<{
|
|
405
|
+
type: ContractTemplateFieldType;
|
|
406
|
+
label: string;
|
|
407
|
+
icon: import('vue').Component;
|
|
408
|
+
}>;
|
|
409
|
+
textMenuBindableVariables: ContractTemplateVariable[];
|
|
410
|
+
pageLimitReached: boolean;
|
|
411
|
+
tableInsertDraft: ContractTemplateTableInsertOptions;
|
|
412
|
+
variablesCount: number;
|
|
413
|
+
resolveBindVariableTypeLabel: (variable: ContractTemplateVariable) => string;
|
|
414
|
+
}> & Readonly<{
|
|
415
|
+
onKeydown?: ((event: KeyboardEvent) => any) | undefined;
|
|
416
|
+
onCommand?: ((command: ContractTemplateEditorCommand) => any) | undefined;
|
|
417
|
+
"onPatch-font-size"?: ((value: unknown) => any) | undefined;
|
|
418
|
+
"onPatch-color"?: ((value: string) => any) | undefined;
|
|
419
|
+
"onPatch-text-align"?: ((value: unknown) => any) | undefined;
|
|
420
|
+
"onInsert-variable"?: ((type: ContractTemplateFieldType) => any) | undefined;
|
|
421
|
+
"onAdd-page"?: (() => any) | undefined;
|
|
422
|
+
"onFont-size-search"?: ((value: string) => any) | undefined;
|
|
423
|
+
"onFont-size-commit"?: (() => any) | undefined;
|
|
424
|
+
"onFont-size-dropdown-change"?: ((open: boolean) => any) | undefined;
|
|
425
|
+
"onFont-size-keydown"?: ((event: KeyboardEvent) => any) | undefined;
|
|
426
|
+
onClipboard?: ((command: "copy" | "cut" | "paste") => any) | undefined;
|
|
427
|
+
"onOpen-image"?: (() => any) | undefined;
|
|
428
|
+
"onBind-variable"?: ((variable: ContractTemplateVariable) => any) | undefined;
|
|
429
|
+
"onOpen-bind-panel"?: (() => any) | undefined;
|
|
430
|
+
"onUpdate:bindOpen"?: ((value: boolean) => any) | undefined;
|
|
431
|
+
"onUpdate:bindKeyword"?: ((value: string) => any) | undefined;
|
|
432
|
+
}>, {
|
|
433
|
+
getMenuElement: () => HTMLElement | undefined;
|
|
434
|
+
focusBindSearch: () => void;
|
|
435
|
+
focusFirstButton: () => void;
|
|
436
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
437
|
+
keydown: (event: KeyboardEvent) => any;
|
|
438
|
+
command: (command: ContractTemplateEditorCommand) => any;
|
|
439
|
+
"patch-font-size": (value: unknown) => any;
|
|
440
|
+
"patch-color": (value: string) => any;
|
|
441
|
+
"patch-text-align": (value: unknown) => any;
|
|
442
|
+
"insert-variable": (type: ContractTemplateFieldType) => any;
|
|
443
|
+
"add-page": () => any;
|
|
444
|
+
"font-size-search": (value: string) => any;
|
|
445
|
+
"font-size-commit": () => any;
|
|
446
|
+
"font-size-dropdown-change": (open: boolean) => any;
|
|
447
|
+
"font-size-keydown": (event: KeyboardEvent) => any;
|
|
448
|
+
clipboard: (command: "copy" | "cut" | "paste") => any;
|
|
449
|
+
"open-image": () => any;
|
|
450
|
+
"bind-variable": (variable: ContractTemplateVariable) => any;
|
|
451
|
+
"open-bind-panel": () => any;
|
|
452
|
+
"update:bindOpen": (value: boolean) => any;
|
|
453
|
+
"update:bindKeyword": (value: string) => any;
|
|
454
|
+
}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
455
|
+
menuElement: HTMLDivElement;
|
|
456
|
+
}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
457
|
+
P: {};
|
|
458
|
+
B: {};
|
|
459
|
+
D: {};
|
|
460
|
+
C: {};
|
|
461
|
+
M: {};
|
|
462
|
+
Defaults: {};
|
|
463
|
+
}, Readonly<{
|
|
464
|
+
bindOpen?: boolean;
|
|
465
|
+
bindKeyword?: string;
|
|
466
|
+
} & {
|
|
467
|
+
x: number;
|
|
468
|
+
y: number;
|
|
469
|
+
hasSelection: boolean;
|
|
470
|
+
editorState: ContractTemplateEditorState;
|
|
471
|
+
fontSizePresetOptions: Array<{
|
|
472
|
+
label: string;
|
|
473
|
+
value: number | string;
|
|
474
|
+
}>;
|
|
475
|
+
currentEditorFontSize: number;
|
|
476
|
+
editorFontSizeSearchValue: string;
|
|
477
|
+
textAlignOptions: Array<{
|
|
478
|
+
label: string;
|
|
479
|
+
value: ContractTemplateEditorTextAlign;
|
|
480
|
+
}>;
|
|
481
|
+
currentEditorTextColor: string;
|
|
482
|
+
bodyControlToolItems: Array<{
|
|
483
|
+
type: ContractTemplateFieldType;
|
|
484
|
+
label: string;
|
|
485
|
+
icon: import('vue').Component;
|
|
486
|
+
}>;
|
|
487
|
+
textMenuBindableVariables: ContractTemplateVariable[];
|
|
488
|
+
pageLimitReached: boolean;
|
|
489
|
+
tableInsertDraft: ContractTemplateTableInsertOptions;
|
|
490
|
+
variablesCount: number;
|
|
491
|
+
resolveBindVariableTypeLabel: (variable: ContractTemplateVariable) => string;
|
|
492
|
+
}> & Readonly<{
|
|
493
|
+
onKeydown?: ((event: KeyboardEvent) => any) | undefined;
|
|
494
|
+
onCommand?: ((command: ContractTemplateEditorCommand) => any) | undefined;
|
|
495
|
+
"onPatch-font-size"?: ((value: unknown) => any) | undefined;
|
|
496
|
+
"onPatch-color"?: ((value: string) => any) | undefined;
|
|
497
|
+
"onPatch-text-align"?: ((value: unknown) => any) | undefined;
|
|
498
|
+
"onInsert-variable"?: ((type: ContractTemplateFieldType) => any) | undefined;
|
|
499
|
+
"onAdd-page"?: (() => any) | undefined;
|
|
500
|
+
"onFont-size-search"?: ((value: string) => any) | undefined;
|
|
501
|
+
"onFont-size-commit"?: (() => any) | undefined;
|
|
502
|
+
"onFont-size-dropdown-change"?: ((open: boolean) => any) | undefined;
|
|
503
|
+
"onFont-size-keydown"?: ((event: KeyboardEvent) => any) | undefined;
|
|
504
|
+
onClipboard?: ((command: "copy" | "cut" | "paste") => any) | undefined;
|
|
505
|
+
"onOpen-image"?: (() => any) | undefined;
|
|
506
|
+
"onBind-variable"?: ((variable: ContractTemplateVariable) => any) | undefined;
|
|
507
|
+
"onOpen-bind-panel"?: (() => any) | undefined;
|
|
508
|
+
"onUpdate:bindOpen"?: ((value: boolean) => any) | undefined;
|
|
509
|
+
"onUpdate:bindKeyword"?: ((value: string) => any) | undefined;
|
|
510
|
+
}>, {
|
|
511
|
+
getMenuElement: () => HTMLElement | undefined;
|
|
512
|
+
focusBindSearch: () => void;
|
|
513
|
+
focusFirstButton: () => void;
|
|
514
|
+
}, {}, {}, {}, {}> | null;
|
|
515
|
+
textBubbleElement: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
516
|
+
x: number;
|
|
517
|
+
y: number;
|
|
518
|
+
editorState: ContractTemplateEditorState;
|
|
519
|
+
fontSizePresetOptions: Array<{
|
|
520
|
+
label: string;
|
|
521
|
+
value: number | string;
|
|
522
|
+
}>;
|
|
523
|
+
currentEditorFontSize: number;
|
|
524
|
+
editorFontSizeSearchValue: string;
|
|
525
|
+
currentEditorTextColor: string;
|
|
526
|
+
textAlignOptions: Array<{
|
|
527
|
+
label: string;
|
|
528
|
+
value: ContractTemplateEditorTextAlign;
|
|
529
|
+
}>;
|
|
530
|
+
}> & Readonly<{
|
|
531
|
+
onMore?: ((clientX: number, clientY: number) => any) | undefined;
|
|
532
|
+
onCommand?: ((command: ContractTemplateEditorCommand) => any) | undefined;
|
|
533
|
+
"onPatch-font-size"?: ((value: unknown) => any) | undefined;
|
|
534
|
+
"onPatch-color"?: ((value: string) => any) | undefined;
|
|
535
|
+
"onPatch-text-align"?: ((value: unknown) => any) | undefined;
|
|
536
|
+
"onFont-size-search"?: ((value: string) => any) | undefined;
|
|
537
|
+
"onFont-size-commit"?: (() => any) | undefined;
|
|
538
|
+
"onFont-size-dropdown-change"?: ((open: boolean) => any) | undefined;
|
|
539
|
+
"onFont-size-keydown"?: ((event: KeyboardEvent) => any) | undefined;
|
|
540
|
+
}>, {
|
|
541
|
+
getMenuElement: () => HTMLElement | undefined;
|
|
542
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
543
|
+
more: (clientX: number, clientY: number) => any;
|
|
544
|
+
command: (command: ContractTemplateEditorCommand) => any;
|
|
545
|
+
"patch-font-size": (value: unknown) => any;
|
|
546
|
+
"patch-color": (value: string) => any;
|
|
547
|
+
"patch-text-align": (value: unknown) => any;
|
|
548
|
+
"font-size-search": (value: string) => any;
|
|
549
|
+
"font-size-commit": () => any;
|
|
550
|
+
"font-size-dropdown-change": (open: boolean) => any;
|
|
551
|
+
"font-size-keydown": (event: KeyboardEvent) => any;
|
|
552
|
+
}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
553
|
+
menuElement: HTMLDivElement;
|
|
554
|
+
}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
555
|
+
P: {};
|
|
556
|
+
B: {};
|
|
557
|
+
D: {};
|
|
558
|
+
C: {};
|
|
559
|
+
M: {};
|
|
560
|
+
Defaults: {};
|
|
561
|
+
}, Readonly<{
|
|
562
|
+
x: number;
|
|
563
|
+
y: number;
|
|
564
|
+
editorState: ContractTemplateEditorState;
|
|
565
|
+
fontSizePresetOptions: Array<{
|
|
566
|
+
label: string;
|
|
567
|
+
value: number | string;
|
|
568
|
+
}>;
|
|
569
|
+
currentEditorFontSize: number;
|
|
570
|
+
editorFontSizeSearchValue: string;
|
|
571
|
+
currentEditorTextColor: string;
|
|
572
|
+
textAlignOptions: Array<{
|
|
573
|
+
label: string;
|
|
574
|
+
value: ContractTemplateEditorTextAlign;
|
|
575
|
+
}>;
|
|
576
|
+
}> & Readonly<{
|
|
577
|
+
onMore?: ((clientX: number, clientY: number) => any) | undefined;
|
|
578
|
+
onCommand?: ((command: ContractTemplateEditorCommand) => any) | undefined;
|
|
579
|
+
"onPatch-font-size"?: ((value: unknown) => any) | undefined;
|
|
580
|
+
"onPatch-color"?: ((value: string) => any) | undefined;
|
|
581
|
+
"onPatch-text-align"?: ((value: unknown) => any) | undefined;
|
|
582
|
+
"onFont-size-search"?: ((value: string) => any) | undefined;
|
|
583
|
+
"onFont-size-commit"?: (() => any) | undefined;
|
|
584
|
+
"onFont-size-dropdown-change"?: ((open: boolean) => any) | undefined;
|
|
585
|
+
"onFont-size-keydown"?: ((event: KeyboardEvent) => any) | undefined;
|
|
586
|
+
}>, {
|
|
587
|
+
getMenuElement: () => HTMLElement | undefined;
|
|
588
|
+
}, {}, {}, {}, {}> | null;
|
|
145
589
|
imageFileInputElement: HTMLInputElement;
|
|
146
590
|
}, HTMLDivElement>;
|
|
147
591
|
export default _default;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ComputedRef, Ref } from 'vue';
|
|
2
|
+
import { JSONContent } from '@tiptap/core';
|
|
3
|
+
import { ContractTemplateData, ContractTemplatePage, ContractTemplatePageSize } from '../types';
|
|
4
|
+
export interface AutoPaginationPageRef {
|
|
5
|
+
hasOverflowContent: () => boolean;
|
|
6
|
+
splitOverflowContent: () => {
|
|
7
|
+
page: ContractTemplatePage;
|
|
8
|
+
overflowContent: JSONContent[];
|
|
9
|
+
overflowHtml: string;
|
|
10
|
+
} | undefined;
|
|
11
|
+
prependContent: (content: JSONContent[]) => ContractTemplatePage | undefined;
|
|
12
|
+
}
|
|
13
|
+
declare function createDocContent(content: JSONContent[]): ContractTemplatePage['contentJson'];
|
|
14
|
+
/**
|
|
15
|
+
* 把上一页溢出的内容插到本页开头(页面组件不可用时的纯数据兜底路径)。
|
|
16
|
+
*
|
|
17
|
+
* 本页原本是空白时丢掉它的占位 HTML,否则拼接后会多出一个空段落。
|
|
18
|
+
*/
|
|
19
|
+
export declare function prependOverflowToPageData(page: ContractTemplatePage, overflowContent: JSONContent[], overflowHtml: string): ContractTemplatePage;
|
|
20
|
+
/**
|
|
21
|
+
* 自动分页编排:登记待办、测量 DOM、连锁切页。
|
|
22
|
+
*
|
|
23
|
+
* 正文真源在各页 Tiptap;本 composable 只调度循环,不自己改坐标。
|
|
24
|
+
*/
|
|
25
|
+
export declare function useAutoPagination(options: {
|
|
26
|
+
templateValue: Ref<ContractTemplateData>;
|
|
27
|
+
readonlyState: Ref<boolean> | ComputedRef<boolean>;
|
|
28
|
+
isAutoPaginating: Ref<boolean>;
|
|
29
|
+
pendingPaginationPageId: Ref<string>;
|
|
30
|
+
activePageId: Ref<string>;
|
|
31
|
+
normalizedMaxPages: Ref<number> | ComputedRef<number>;
|
|
32
|
+
pageRefs: Map<string, AutoPaginationPageRef>;
|
|
33
|
+
syncPageEditors: () => ContractTemplateData;
|
|
34
|
+
commitBodyChange: (nextValue: ContractTemplateData) => ContractTemplateData;
|
|
35
|
+
getPageSize: (page?: ContractTemplatePage) => ContractTemplatePageSize;
|
|
36
|
+
notifyPageLimit: (source: 'add' | 'duplicate' | 'auto-pagination') => void;
|
|
37
|
+
}): {
|
|
38
|
+
scheduleAutoPaginate: (pageId?: string) => void;
|
|
39
|
+
runAutoPagination: () => Promise<void>;
|
|
40
|
+
createDocContent: typeof createDocContent;
|
|
41
|
+
prependOverflowToPageData: typeof prependOverflowToPageData;
|
|
42
|
+
};
|
|
43
|
+
export {};
|