@guodun/antdv 1.4.1 → 1.4.2
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/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 +215 -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/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 +313 -267
- package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.mjs +1278 -2293
- 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/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/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/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 +50 -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/ContractTemplateTextContextMenu.vue.d.ts +77 -0
- package/dist/types/components/pro-contract-template-designer/src/DesignerPage.vue.d.ts +8 -32
- package/dist/types/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.d.ts +366 -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 +22 -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 +1 -1
package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.mjs
CHANGED
|
@@ -1,98 +1,48 @@
|
|
|
1
1
|
import { isContractTemplateFieldType as e } from "./types.mjs";
|
|
2
|
-
import { ContractTemplateLocationRuleBuildError as t,
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
2
|
+
import { ContractTemplateLocationRuleBuildError as t, SIGNING_PLACEMENT_TYPE_LABELS as n, buildContractLocationRules as r, buildSigningPlacementLocationRules as i, createSigningPlacement as a, resolveSigningPlacementToolItems as o, scaleSigningPlacementToPage as ee } from "./utils/signing-placement.mjs";
|
|
3
|
+
import { CONTRACT_BLOCK_STYLES as te, DEFAULT_CONTRACT_FONT_FAMILY as ne, DEFAULT_FONT_SIZE_PRESETS as re, DEFAULT_TEXT_ALIGN_OPTIONS as ie, resolveFontFamilyOptions as ae } from "./constants.mjs";
|
|
4
|
+
import { collectPageDecorationVariableKeys as oe, normalizePageDecorations as se, resolvePageDecorationPreset as ce, resolvePageDecorationValidationPath as le, rewritePageDecorationVariableTokens as ue } from "./utils/page-decorations.mjs";
|
|
5
|
+
import { DEFAULT_FIELD_STYLE as de, DEFAULT_FIELD_TYPES as s, DEFAULT_PAGE_SIZE as fe, buildTemplatePreviewPages as pe, cloneTemplateValue as c, collectTemplateLocationRuleExportErrors as me, collectTemplateValueVariableKeys as he, constrainTemplatePageSizes as ge, createBlankPage as _e, createBlankTemplate as ve, createDefaultPage as ye, createTemplateVariable as be, exportTemplateValue as xe, getFieldOption as Se, getPageSizeKey as Ce, normalizeContractTemplateMaxPages as we, normalizePageSizeOptions as Te, normalizeTemplateValue as Ee, resolvePageSize as De, syncTemplateVariablesWithPages as Oe, validateContractTemplateVariableKey as ke, validateTemplateValue as Ae } from "./composables/use-template-designer.mjs";
|
|
6
|
+
import { isSafeContractImageUrl as je } from "./utils/image-url.mjs";
|
|
7
|
+
import { useFitWidthZoom as Me } from "./composables/use-fit-width-zoom.mjs";
|
|
8
|
+
import { normalizeContractImageDimension as Ne, processContractImageFile as Pe } from "./utils/content-image.mjs";
|
|
8
9
|
import { inferContextVariableLabel as Fe, resolveContextVariableWidth as Ie } from "./utils/context-variable.mjs";
|
|
9
10
|
import Le from "./DesignerPage.mjs";
|
|
10
|
-
import Re from "./
|
|
11
|
-
import ze from "./
|
|
12
|
-
import Be from "./
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
11
|
+
import Re from "./TableContextMenu.mjs";
|
|
12
|
+
import ze from "./ContractTemplateDesignerWorkspaceHeader.mjs";
|
|
13
|
+
import Be from "./ContractTemplateDesignerToolbar.mjs";
|
|
14
|
+
import Ve from "./ContractTemplateTextContextMenu.mjs";
|
|
15
|
+
import He from "./ContractTemplateImageContextMenu.mjs";
|
|
16
|
+
import Ue from "./ContractTemplatePreviewModal.mjs";
|
|
17
|
+
import We from "./ContractTemplateSubmitDataModal.mjs";
|
|
18
|
+
import { DEFAULT_DRAFT_CACHE_INTERVAL as Ge, DEFAULT_DRAFT_CACHE_KEY as Ke, DEFAULT_DRAFT_CACHE_MAX_BYTES as l, createDraftCacheStatus as qe, formatDraftCacheSavedAt as Je } from "./composables/use-template-draft-cache.mjs";
|
|
19
|
+
import { useAutoPagination as Ye } from "./composables/use-auto-pagination.mjs";
|
|
20
|
+
import { resolveSetActiveFileIdOptions as Xe } from "./composables/use-designer-files.mjs";
|
|
21
|
+
import { cloneContractTemplateFiles as u, constrainContractTemplateFiles as Ze, createContractTemplateFile as Qe, exportContractTemplateFiles as $e, moveContractTemplateFile as et, normalizeContractTemplateFiles as tt, removeContractTemplateFile as nt, renameContractTemplateFile as rt, replaceContractTemplateFile as it, resolveContractTemplateActiveFileId as at } from "./composables/use-template-files.mjs";
|
|
22
|
+
import { useDraftCacheSession as ot } from "./composables/use-draft-cache-session.mjs";
|
|
23
|
+
import { cloneSigningPlacement as st, useSigningPlacementEditor as ct } from "./composables/use-signing-placement-editor.mjs";
|
|
24
|
+
import { resolveFieldTypeIcon as lt, resolveSigningPlacementTypeIcon as ut } from "./utils/template-tool-icons.mjs";
|
|
25
|
+
import dt from "./ContractTemplateFileBar.mjs";
|
|
26
|
+
import ft from "./ContractTemplateDesignerSidebar.mjs";
|
|
27
|
+
import pt from "./ContractTemplateDesignerInspector.mjs";
|
|
28
|
+
import mt from "./ContractTemplatePageDecorationsStudio.mjs";
|
|
29
|
+
import { serializeFingerprint as d } from "./utils/serialize-fingerprint.mjs";
|
|
30
|
+
import { isSameEditorState as ht } from "./utils/editor-state.mjs";
|
|
31
|
+
import { clampContextMenuPosition as gt, clampContextMenuToElement as _t } from "./utils/context-menu-viewport.mjs";
|
|
32
|
+
import { Fragment as vt, Teleport as yt, computed as f, createBlock as bt, createCommentVNode as xt, createElementBlock as St, createElementVNode as Ct, createVNode as wt, defineComponent as p, nextTick as m, normalizeClass as Tt, normalizeStyle as Et, onBeforeUnmount as Dt, onMounted as Ot, openBlock as h, ref as g, renderList as kt, toDisplayString as At, unref as _, useId as jt, vShow as Mt, watch as v, withDirectives as Nt } from "vue";
|
|
33
|
+
import { Alert as Pt, Modal as Ft } from "ant-design-vue";
|
|
34
|
+
import { useElementSize as It } from "@vueuse/core";
|
|
24
35
|
//#region src/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue?vue&type=script&setup=true&lang.ts
|
|
25
|
-
var
|
|
26
|
-
class: "gd-contract-template-designer__toolbar-group gd-contract-template-designer__toolbar-group--insert",
|
|
27
|
-
"data-toolbar-overflow-key": "insert"
|
|
28
|
-
}, Sn = { class: "gd-contract-template-designer__popover gd-contract-template-designer__control-insert-popover" }, Cn = { class: "gd-contract-template-designer__text-menu-control-options" }, wn = ["aria-label", "onClick"], Tn = { class: "gd-contract-template-designer__popover gd-contract-template-designer__image-insert-popover" }, En = {
|
|
29
|
-
class: "gd-contract-template-designer__image-size-fields",
|
|
30
|
-
role: "group",
|
|
31
|
-
"aria-label": "图片尺寸"
|
|
32
|
-
}, Dn = {
|
|
33
|
-
class: "gd-contract-template-designer__toolbar-group gd-contract-template-designer__toolbar-group--typography",
|
|
34
|
-
"data-toolbar-overflow-key": "typography"
|
|
35
|
-
}, On = ["value", "disabled"], kn = {
|
|
36
|
-
class: "gd-contract-template-designer__toolbar-group gd-contract-template-designer__toolbar-group--cleanup",
|
|
37
|
-
"data-toolbar-overflow-key": "cleanup"
|
|
38
|
-
}, An = {
|
|
39
|
-
class: "gd-contract-template-designer__toolbar-group gd-contract-template-designer__toolbar-group--table",
|
|
40
|
-
"data-toolbar-overflow-key": "table"
|
|
41
|
-
}, jn = { class: "gd-contract-template-designer__popover" }, Mn = { class: "gd-contract-template-designer__switch-row" }, Nn = { class: "gd-contract-template-designer__popover" }, Pn = { class: "gd-contract-template-designer__table-actions" }, Fn = {
|
|
42
|
-
class: "gd-contract-template-designer__toolbar-more-panel",
|
|
43
|
-
role: "menu",
|
|
44
|
-
"aria-label": "更多编辑工具"
|
|
45
|
-
}, In = { class: "gd-contract-template-designer__toolbar-more-section" }, Ln = { class: "gd-contract-template-designer__toolbar-more-section" }, Rn = { class: "gd-contract-template-designer__toolbar-more-section" }, zn = { class: "gd-contract-template-designer__toolbar-more-section" }, Bn = {
|
|
36
|
+
var Lt = {
|
|
46
37
|
key: 0,
|
|
47
38
|
class: "gd-contract-template-designer__validation"
|
|
48
|
-
},
|
|
39
|
+
}, Rt = {
|
|
49
40
|
key: 0,
|
|
50
41
|
class: "gd-contract-template-designer__validation-list"
|
|
51
|
-
},
|
|
52
|
-
class: "gd-contract-template-designer__image-size-fields",
|
|
53
|
-
role: "group",
|
|
54
|
-
"aria-label": "图片尺寸"
|
|
55
|
-
}, Wn = { class: "gd-contract-template-designer__popover-actions" }, Gn = {
|
|
56
|
-
class: "gd-contract-template-designer__text-menu-row",
|
|
57
|
-
role: "group",
|
|
58
|
-
"aria-label": "编辑历史与剪贴板"
|
|
59
|
-
}, Kn = {
|
|
60
|
-
key: 0,
|
|
61
|
-
class: "gd-contract-template-designer__text-menu-quick-insert",
|
|
62
|
-
role: "group",
|
|
63
|
-
"aria-label": "光标处插入"
|
|
64
|
-
}, qn = {
|
|
65
|
-
class: "gd-contract-template-designer__text-menu-row gd-contract-template-designer__text-menu-row--controls",
|
|
66
|
-
role: "group",
|
|
67
|
-
"aria-label": "文字样式"
|
|
68
|
-
}, Jn = ["value"], Yn = ["aria-label"], Xn = { class: "gd-contract-template-designer__text-menu-control-head" }, Zn = { class: "gd-contract-template-designer__text-menu-control-options" }, Qn = ["aria-label", "onClick"], $n = ["disabled"], er = {
|
|
69
|
-
class: "gd-contract-template-designer__text-menu-bind-list",
|
|
70
|
-
role: "listbox",
|
|
71
|
-
"aria-label": "已有正文控件"
|
|
72
|
-
}, tr = ["onClick"], nr = { class: "gd-contract-template-designer__text-menu-bind-item-label" }, rr = { class: "gd-contract-template-designer__text-menu-bind-item-meta" }, ir = {
|
|
73
|
-
key: 0,
|
|
74
|
-
class: "gd-contract-template-designer__text-menu-bind-empty"
|
|
75
|
-
}, ar = {
|
|
76
|
-
class: "gd-contract-template-designer__text-menu-row",
|
|
77
|
-
role: "group",
|
|
78
|
-
"aria-label": "常用格式与列表"
|
|
79
|
-
}, or = {
|
|
80
|
-
class: "gd-contract-template-designer__text-menu-row gd-contract-template-designer__text-menu-row--cleanup",
|
|
81
|
-
role: "group",
|
|
82
|
-
"aria-label": "清理格式"
|
|
83
|
-
}, sr = {
|
|
42
|
+
}, zt = ["onClick"], Bt = {
|
|
84
43
|
class: "gd-contract-template-designer__sr-status",
|
|
85
44
|
"aria-live": "polite"
|
|
86
|
-
},
|
|
87
|
-
key: 0,
|
|
88
|
-
class: "gd-contract-template-designer__preview-layout"
|
|
89
|
-
}, lr = {
|
|
90
|
-
class: "gd-contract-template-designer__preview-file-nav",
|
|
91
|
-
"aria-label": "合同文件预览切换"
|
|
92
|
-
}, ur = ["aria-current", "onClick"], dr = {
|
|
93
|
-
key: 0,
|
|
94
|
-
class: "gd-contract-template-designer__preview-file"
|
|
95
|
-
}, fr = { class: "gd-contract-template-designer__preview-file-title" }, pr = { class: "gd-contract-template-designer__submit-data" }, mr = .5, hr = 1.5, gr = .1, _r = 128, vr = 108, yr = 48, br = 24, xr = 10, Sr = 48, Cr = 304, wr = 300, Tr = 288, Er = 196, O = 12, Dr = 43, Or = 6, kr = 4, Ar = /* @__PURE__ */ v({
|
|
45
|
+
}, Vt = .5, Ht = 1.5, Ut = .1, Wt = 120, Gt = 128, Kt = 108, qt = 48, Jt = 24, Yt = 10, Xt = 48, Zt = /* @__PURE__ */ p({
|
|
96
46
|
name: "ProContractTemplateDesigner",
|
|
97
47
|
__name: "ProContractTemplateDesigner",
|
|
98
48
|
props: {
|
|
@@ -108,12 +58,12 @@ var dn = { class: "gd-contract-template-designer__workspace-header" }, fn = { cl
|
|
|
108
58
|
default: !1
|
|
109
59
|
},
|
|
110
60
|
height: { default: 760 },
|
|
111
|
-
pageSize: { default: () =>
|
|
61
|
+
pageSize: { default: () => fe },
|
|
112
62
|
pageSizeOptions: {},
|
|
113
63
|
maxPages: { default: 20 },
|
|
114
64
|
imageCompression: { type: [Object, Boolean] },
|
|
115
65
|
imageUpload: {},
|
|
116
|
-
variableTypes: { default: () =>
|
|
66
|
+
variableTypes: { default: () => s },
|
|
117
67
|
defaultVariableStyle: { default: () => de },
|
|
118
68
|
fontFamilies: { default: void 0 },
|
|
119
69
|
fontFamilyMode: { default: "append" },
|
|
@@ -133,8 +83,8 @@ var dn = { class: "gd-contract-template-designer__workspace-header" }, fn = { cl
|
|
|
133
83
|
type: Boolean,
|
|
134
84
|
default: !0
|
|
135
85
|
},
|
|
136
|
-
draftCacheKey: { default:
|
|
137
|
-
draftCacheInterval: { default:
|
|
86
|
+
draftCacheKey: { default: Ke },
|
|
87
|
+
draftCacheInterval: { default: Ge },
|
|
138
88
|
draftCacheMaxBytes: { default: l },
|
|
139
89
|
showDraftCacheStatus: {
|
|
140
90
|
type: Boolean,
|
|
@@ -161,62 +111,62 @@ var dn = { class: "gd-contract-template-designer__workspace-header" }, fn = { cl
|
|
|
161
111
|
"signing-placement-remove",
|
|
162
112
|
"signing-placement-select"
|
|
163
113
|
],
|
|
164
|
-
setup(
|
|
165
|
-
let l =
|
|
166
|
-
function
|
|
114
|
+
setup(s, { expose: Ge, emit: Ke }) {
|
|
115
|
+
let l = s, p = Ke, Zt = f(() => ({ height: typeof l.height == "number" ? `${l.height}px` : l.height })), Qt = g(), $t = g(), en = g(), tn = g(), nn = g(), rn = `gd-contract-template-page-decorations-studio-${jt()}`, an = g();
|
|
116
|
+
function on(e) {
|
|
167
117
|
if (!e || !Array.isArray(e.pages) || !Array.isArray(e.signingPlacements)) return [];
|
|
168
118
|
try {
|
|
169
|
-
return
|
|
119
|
+
return Ae(e).filter((e) => e.type === "signing-placement");
|
|
170
120
|
} catch {
|
|
171
121
|
return [];
|
|
172
122
|
}
|
|
173
123
|
}
|
|
174
|
-
function
|
|
175
|
-
return Object.fromEntries(e.map((e, n) => [e.id,
|
|
176
|
-
}
|
|
177
|
-
function Ur(e, t) {
|
|
178
|
-
let n = /* @__PURE__ */ new Map();
|
|
179
|
-
return {
|
|
180
|
-
files: e.map((e) => {
|
|
181
|
-
let r = ge(e.template, t);
|
|
182
|
-
return r.resizedSigningPlacementIds.length && n.set(e.id, r.resizedSigningPlacementIds), {
|
|
183
|
-
...e,
|
|
184
|
-
template: r.value
|
|
185
|
-
};
|
|
186
|
-
}),
|
|
187
|
-
resizedSigningPlacementIds: n
|
|
188
|
-
};
|
|
124
|
+
function sn(e, t) {
|
|
125
|
+
return Object.fromEntries(e.map((e, n) => [e.id, on(t?.[n]?.template ?? e.template)]));
|
|
189
126
|
}
|
|
190
|
-
let
|
|
191
|
-
if (
|
|
192
|
-
if (
|
|
193
|
-
let e = u(
|
|
194
|
-
|
|
127
|
+
let cn = "", ln = "", un = g(!1), y = f(() => un.value || Array.isArray(l.files)), dn = tt(l.files, l.modelValue, l.pageSize), fn = Ze(dn, l.pageSizeOptions), pn = y.value ? fn.files : dn, mn = at(pn, l.activeFileId), b = g(pn), x = g(mn), hn = pn.find((e) => e.id === mn) ?? pn[0], S = g(sn(pn, Array.isArray(l.files) ? l.files : l.modelValue ? [{ template: l.modelValue }] : void 0)), C = g(S.value[mn] ?? on(hn?.template)), gn = Ee(hn?.template ?? l.modelValue, l.pageSize), _n = ge(gn, l.pageSizeOptions), w = g(_n.value);
|
|
128
|
+
if (y.value) {
|
|
129
|
+
if (b.value = it(b.value, x.value, _n.value), d(b.value) !== d(dn)) {
|
|
130
|
+
let e = u(b.value);
|
|
131
|
+
cn = d(e), p("update:files", e), p("files-change", u(e));
|
|
195
132
|
}
|
|
196
|
-
} else l.modelValue &&
|
|
197
|
-
let
|
|
133
|
+
} else l.modelValue && d(_n.value) !== d(gn) && (ln = d(_n.value), p("update:modelValue", c(_n.value)), p("change", c(_n.value)), wi(_n.resizedSigningPlacementIds, _n.value));
|
|
134
|
+
let T = g(""), E = g(""), D = g(w.value.pages[0]?.id ?? ""), O = g(!1), k = g([]), A = /* @__PURE__ */ new Map(), vn = g(!1), yn = g(""), bn = g(!1), j = g(), xn = g(), Sn = g(""), Cn = g(!1), wn = g(""), M = g(1), Tn = g(!1), En = g(!1), Dn = g(!1), N = g(!1), On = g("header"), kn = g(!1), An = g({}), jn = g(""), P = g(!1), F = g(!1), Mn = g(!1), Nn = g(!1), Pn = g(""), Fn = g(), In = g(), Ln = g(""), Rn = g(!1), I = g(), zn = g(), Bn = g(!1), Vn = g(""), L = g(), Hn = g(), R = g(), Un = g(), Wn = g(), Gn = g(), z = g(""), B = g(qe("idle", "暂无本地草稿")), Kn = g({
|
|
198
135
|
rows: 3,
|
|
199
136
|
cols: 3,
|
|
200
137
|
withHeaderRow: !0
|
|
201
|
-
}),
|
|
138
|
+
}), qn = /* @__PURE__ */ new WeakSet(), Jn = [".gd-contract-template-designer__page-decorations-select-popup", ".gd-contract-template-designer__page-decorations-dropdown-popup"].join(","), Yn, Xn = !1, Zn = !1, Qn, V = f(() => l.readonly || l.disabled), $n = f(() => !!l.enableDraftCache && !V.value), er = f(() => b.value.find((e) => e.id === x.value) ?? b.value[0]), tr = f(() => l.draftCacheKey), H = f(() => w.value.variables.find((e) => e.key === T.value)), U = f(() => w.value.signingPlacements ?? []), nr = f(() => j.value ? pe(j.value) : []), rr = f(() => (xn.value ?? []).map((e) => ({
|
|
202
139
|
file: e,
|
|
203
|
-
pages:
|
|
204
|
-
}))),
|
|
205
|
-
let t =
|
|
140
|
+
pages: pe(e.template)
|
|
141
|
+
}))), ir = f(() => rr.value.find((e) => e.file.id === Sn.value) ?? rr.value[0]), ar = f(() => U.value.find((e) => e.id === E.value)), or = f(() => U.value.map((e) => {
|
|
142
|
+
let t = w.value.pages.findIndex((t) => t.id === e.pageId);
|
|
206
143
|
return {
|
|
207
144
|
placement: e,
|
|
208
|
-
label:
|
|
209
|
-
detail: `${
|
|
145
|
+
label: n[e.type],
|
|
146
|
+
detail: `${n[e.type]} · 第 ${Math.max(0, t) + 1} 页`
|
|
210
147
|
};
|
|
211
|
-
})),
|
|
212
|
-
let e =
|
|
213
|
-
return
|
|
214
|
-
}), W =
|
|
148
|
+
})), sr = f(() => {
|
|
149
|
+
let e = ar.value?.pageId;
|
|
150
|
+
return Z(w.value.pages.find((t) => t.id === e));
|
|
151
|
+
}), W = f(() => w.value.pages.find((e) => e.id === D.value) ?? w.value.pages[0]), cr = f(() => De(W.value?.pageSize, w.value.pageSize)), lr = f(() => O.value && k.value.length === 0), ur = f(() => O.value ? lr.value ? "校验通过,正文变量与变量配置一致" : `发现 ${k.value.length} 个校验问题` : ""), dr = f(() => {
|
|
215
152
|
let e = W.value?.title || "合同正文";
|
|
216
|
-
return `${
|
|
217
|
-
}),
|
|
218
|
-
|
|
219
|
-
|
|
153
|
+
return `${y.value && er.value ? `${er.value.name} · ` : ""}${e} · ${cr.value.label} · 共 ${w.value.pages.length} 页`;
|
|
154
|
+
}), fr = f(() => ({
|
|
155
|
+
none: "无装饰",
|
|
156
|
+
"page-number": "标准页码",
|
|
157
|
+
"internal-review": "内部审阅",
|
|
158
|
+
draft: "草稿",
|
|
159
|
+
custom: "自定义"
|
|
160
|
+
})[ce(w.value.pageDecorations)]), pr = f(() => {
|
|
161
|
+
let e = se(w.value.pageDecorations);
|
|
162
|
+
return {
|
|
163
|
+
header: e.header.enabled,
|
|
164
|
+
footer: e.footer.enabled,
|
|
165
|
+
watermark: e.watermark.enabled
|
|
166
|
+
};
|
|
167
|
+
}), mr = f(() => Object.values(pr.value).filter(Boolean).length), hr = f(() => {
|
|
168
|
+
switch (B.value.type) {
|
|
169
|
+
case "saved": return `草稿已缓存 ${Je(B.value.savedAt)}`;
|
|
220
170
|
case "restored": return "已恢复本地草稿";
|
|
221
171
|
case "too-large": return "草稿过大,未缓存";
|
|
222
172
|
case "unavailable":
|
|
@@ -225,52 +175,23 @@ var dn = { class: "gd-contract-template-designer__workspace-header" }, fn = { cl
|
|
|
225
175
|
case "cleared": return "草稿缓存已清理";
|
|
226
176
|
default: return "";
|
|
227
177
|
}
|
|
228
|
-
}),
|
|
229
|
-
"is-success":
|
|
230
|
-
"is-warning":
|
|
231
|
-
"is-error":
|
|
232
|
-
})),
|
|
178
|
+
}), gr = f(() => ({
|
|
179
|
+
"is-success": B.value.type === "saved" || B.value.type === "restored",
|
|
180
|
+
"is-warning": B.value.type === "too-large",
|
|
181
|
+
"is-error": B.value.type === "unavailable" || B.value.type === "read-failed" || B.value.type === "write-failed"
|
|
182
|
+
})), _r = f(() => `${Math.round(M.value * 100)}%`), vr = f(() => ae(l.fontFamilies, l.fontFamilyMode)), yr = f(() => vr.value.map((e) => ({
|
|
233
183
|
label: e.label,
|
|
234
184
|
value: e.value
|
|
235
|
-
}))),
|
|
185
|
+
}))), br = ie, xr = [...te.map((e) => ({
|
|
236
186
|
label: e.label,
|
|
237
|
-
value: e.
|
|
238
|
-
}))
|
|
239
|
-
{
|
|
240
|
-
label: "正文",
|
|
241
|
-
value: "paragraph"
|
|
242
|
-
},
|
|
243
|
-
{
|
|
244
|
-
label: "H1",
|
|
245
|
-
value: 1
|
|
246
|
-
},
|
|
247
|
-
{
|
|
248
|
-
label: "H2",
|
|
249
|
-
value: 2
|
|
250
|
-
},
|
|
251
|
-
{
|
|
252
|
-
label: "H3",
|
|
253
|
-
value: 3
|
|
254
|
-
},
|
|
255
|
-
{
|
|
256
|
-
label: "H4",
|
|
257
|
-
value: 4
|
|
258
|
-
},
|
|
259
|
-
{
|
|
260
|
-
label: "H5",
|
|
261
|
-
value: 5
|
|
262
|
-
},
|
|
263
|
-
{
|
|
264
|
-
label: "H6",
|
|
265
|
-
value: 6
|
|
266
|
-
}
|
|
267
|
-
], ca = [{
|
|
187
|
+
value: e.format
|
|
188
|
+
}))], Sr = [{
|
|
268
189
|
label: "实线",
|
|
269
190
|
value: "solid"
|
|
270
191
|
}, {
|
|
271
192
|
label: "虚线",
|
|
272
193
|
value: "dashed"
|
|
273
|
-
}],
|
|
194
|
+
}], Cr = [
|
|
274
195
|
{
|
|
275
196
|
label: "完整显示",
|
|
276
197
|
value: "contain"
|
|
@@ -283,89 +204,156 @@ var dn = { class: "gd-contract-template-designer__workspace-header" }, fn = { cl
|
|
|
283
204
|
label: "拉伸填充",
|
|
284
205
|
value: "fill"
|
|
285
206
|
}
|
|
286
|
-
],
|
|
207
|
+
], wr = f(() => Te(l.pageSizeOptions)), Tr = f(() => wr.value.map((e) => ({
|
|
287
208
|
label: `${e.label} · ${e.width} × ${e.height}`,
|
|
288
209
|
value: Ce(e)
|
|
289
|
-
}))),
|
|
210
|
+
}))), Er = f(() => Ce(cr.value)), Dr = f(() => o({ showSigningPlacementTools: l.showSigningPlacementTools })), Or = f(() => l.variableTypes.filter((t) => e(t?.type))), kr = f(() => Or.value.map((e) => ({
|
|
290
211
|
...e,
|
|
291
|
-
icon:
|
|
292
|
-
}))),
|
|
293
|
-
let e =
|
|
212
|
+
icon: lt(e.type)
|
|
213
|
+
}))), Ar = f(() => we(l.maxPages)), jr = f(() => w.value.pages.length >= Ar.value), Mr = f(() => {
|
|
214
|
+
let e = he(w.value);
|
|
215
|
+
return Array.from(oe(w.value.pageDecorations)).filter((t) => !e.has(t));
|
|
216
|
+
}), { scheduleAutoPaginate: G } = Ye({
|
|
217
|
+
templateValue: w,
|
|
218
|
+
readonlyState: V,
|
|
219
|
+
isAutoPaginating: vn,
|
|
220
|
+
pendingPaginationPageId: yn,
|
|
221
|
+
activePageId: D,
|
|
222
|
+
normalizedMaxPages: Ar,
|
|
223
|
+
pageRefs: A,
|
|
224
|
+
syncPageEditors: K,
|
|
225
|
+
commitBodyChange: xi,
|
|
226
|
+
getPageSize: Z,
|
|
227
|
+
notifyPageLimit: Ai
|
|
228
|
+
}), { insertSigningPlacement: Nr, handleSigningPlacementDrop: Pr, insertSigningPlacementTool: Fr, handleSigningPlacementDragStart: Ir, updateSigningPlacement: Lr, patchSelectedSigningPlacement: Rr, duplicateSigningPlacement: zr, removeSigningPlacement: Br } = ct({
|
|
229
|
+
templateValue: w,
|
|
230
|
+
signingPlacements: U,
|
|
231
|
+
selectedSigningPlacement: ar,
|
|
232
|
+
selectedSigningPlacementId: E,
|
|
233
|
+
selectedPage: W,
|
|
234
|
+
activePageId: D,
|
|
235
|
+
readonly: () => l.readonly,
|
|
236
|
+
disabled: () => l.disabled,
|
|
237
|
+
showSigningPlacementTools: () => !!l.showSigningPlacementTools,
|
|
238
|
+
getPageSize: Z,
|
|
239
|
+
getVisiblePosition: (e, t) => A.get(e)?.getVisibleSigningPlacementPosition(t),
|
|
240
|
+
commitSigningPlacements: Oi,
|
|
241
|
+
selectSigningPlacement: Q,
|
|
242
|
+
emitAdd: (e) => p("signing-placement-add", e),
|
|
243
|
+
emitChange: (e) => p("signing-placement-change", e),
|
|
244
|
+
emitRemove: (e) => p("signing-placement-remove", e)
|
|
245
|
+
}), { saveDraftCache: Vr, loadDraftCache: Hr, clearDraftCache: Ur, restoreDraftCacheIfNeeded: Wr, stopDraftCacheTimer: Gr, restartDraftCacheTimer: Kr, resetDraftFingerprint: qr } = ot({
|
|
246
|
+
draftCacheWritable: $n,
|
|
247
|
+
multipleFilesMode: y,
|
|
248
|
+
filesValue: b,
|
|
249
|
+
activeFileIdValue: x,
|
|
250
|
+
templateValue: w,
|
|
251
|
+
draftCacheKey: tr,
|
|
252
|
+
draftCacheInterval: () => l.draftCacheInterval,
|
|
253
|
+
draftCacheMaxBytes: () => l.draftCacheMaxBytes,
|
|
254
|
+
pageSize: () => l.pageSize,
|
|
255
|
+
pageSizeOptions: () => l.pageSizeOptions,
|
|
256
|
+
syncActiveFileSnapshot: q,
|
|
257
|
+
syncPageEditors: K,
|
|
258
|
+
setActiveFileId: hi,
|
|
259
|
+
emitFilesChange: J,
|
|
260
|
+
commit: Y,
|
|
261
|
+
setSigningPlacementInputErrorsByFile: (e) => {
|
|
262
|
+
S.value = e;
|
|
263
|
+
},
|
|
264
|
+
buildSigningPlacementInputErrorsByFile: sn,
|
|
265
|
+
updateDraftCacheStatus: gi,
|
|
266
|
+
scheduleAutoPaginate: G,
|
|
267
|
+
activePageId: D,
|
|
268
|
+
selectedVariableKey: T
|
|
269
|
+
}), Jr = f(() => {
|
|
270
|
+
let e = Vn.value.trim().toLowerCase(), t = w.value.variables;
|
|
294
271
|
return e ? t.filter((t) => t.label.toLowerCase().includes(e) || t.key.toLowerCase().includes(e)) : t;
|
|
295
|
-
}),
|
|
296
|
-
let e =
|
|
272
|
+
}), Yr = f(() => Math.max(qt, cr.value.width - Gt)), Xr = f(() => Math.max(Jt, cr.value.height - Kt)), Zr = f(() => An.value[D.value] ?? ai()), Qr = f(() => Zr.value.hasMixedBlockFormats ? void 0 : Zr.value.currentHeadingLevel ?? "paragraph"), $r = f(() => Zr.value.fontFamily || "Noto Serif SC, Source Han Serif SC, Songti SC, STSong, SimSun, serif"), ei = f(() => Zr.value.fontSize ?? de.fontSize ?? 14), ti = f(() => Zr.value.textColor || de.color || "#1f2937"), ni = f(() => H.value?.style?.fontFamily || de.fontFamily || "Noto Serif SC, Source Han Serif SC, Songti SC, STSong, SimSun, serif"), ri = f(() => {
|
|
273
|
+
let e = re.map((e) => ({
|
|
297
274
|
label: `${e}px`,
|
|
298
275
|
value: e
|
|
299
|
-
})), t =
|
|
300
|
-
return n && !
|
|
276
|
+
})), t = li(ei.value), n = li(jn.value), r = /* @__PURE__ */ new Map();
|
|
277
|
+
return n && !re.includes(n) && r.set(n, {
|
|
301
278
|
label: `使用 ${n}px`,
|
|
302
279
|
value: n
|
|
303
|
-
}), t && !
|
|
280
|
+
}), t && !re.includes(t) && r.set(t, {
|
|
304
281
|
label: n === t ? `使用 ${t}px` : `${t}px`,
|
|
305
282
|
value: t
|
|
306
283
|
}), [...Array.from(r.values()), ...e];
|
|
307
284
|
});
|
|
308
|
-
|
|
309
|
-
if (!e ||
|
|
310
|
-
let t = Ee(e, l.pageSize), n = ge(t, l.pageSizeOptions), r = n.value, i =
|
|
311
|
-
o && (
|
|
312
|
-
...
|
|
313
|
-
[
|
|
314
|
-
},
|
|
315
|
-
}, { deep: !0 }),
|
|
285
|
+
v(() => l.modelValue, (e) => {
|
|
286
|
+
if (!e || y.value) return;
|
|
287
|
+
let t = Ee(e, l.pageSize), n = ge(t, l.pageSizeOptions), r = n.value, i = d(r) !== d(w.value), a = d(r), o = a === ln;
|
|
288
|
+
o && (ln = ""), (i || !o) && (C.value = on(e), S.value = {
|
|
289
|
+
...S.value,
|
|
290
|
+
[x.value]: C.value
|
|
291
|
+
}, w.value = r, b.value = it(b.value, x.value, r), D.value = r.pages[0]?.id ?? "", T.value = "", E.value = "", G(D.value)), d(r) !== d(t) && (ln = a, p("update:modelValue", c(r)), p("change", c(r)), wi(n.resizedSigningPlacementIds, r));
|
|
292
|
+
}, { deep: !0 }), v(() => l.files, (e) => {
|
|
316
293
|
if (!Array.isArray(e)) return;
|
|
317
|
-
let t =
|
|
318
|
-
a || (
|
|
319
|
-
let o =
|
|
320
|
-
if (r === i ? o !==
|
|
294
|
+
let t = tt(e, void 0, l.pageSize), n = Ze(t, l.pageSizeOptions).files, r = d(n), i = d(b.value), a = r === cn;
|
|
295
|
+
a || (S.value = sn(n, e)), a && (cn = "");
|
|
296
|
+
let o = at(n, l.activeFileId || x.value);
|
|
297
|
+
if (r === i ? o !== x.value && hi(o, {
|
|
298
|
+
syncCurrent: !1,
|
|
299
|
+
shouldEmit: !1
|
|
300
|
+
}) : (b.value = n, hi(o, {
|
|
301
|
+
syncCurrent: !1,
|
|
302
|
+
shouldEmit: !1,
|
|
303
|
+
forceRefresh: !0,
|
|
304
|
+
persistCurrentErrors: !1
|
|
305
|
+
})), r !== d(t)) {
|
|
321
306
|
let e = u(n);
|
|
322
|
-
|
|
307
|
+
cn = d(e), p("update:files", e), p("files-change", u(e));
|
|
323
308
|
}
|
|
324
|
-
}, { deep: !0 }),
|
|
325
|
-
!
|
|
309
|
+
}, { deep: !0 }), v(() => l.activeFileId, (e) => {
|
|
310
|
+
!y.value || !e || e === x.value || hi(e, {
|
|
311
|
+
syncCurrent: !0,
|
|
312
|
+
shouldEmit: !1
|
|
313
|
+
});
|
|
326
314
|
});
|
|
327
|
-
function
|
|
328
|
-
let n =
|
|
329
|
-
|
|
330
|
-
let { files: r, resizedSigningPlacementIds: i } =
|
|
331
|
-
o &&
|
|
332
|
-
let
|
|
333
|
-
return
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
if (
|
|
337
|
-
|
|
315
|
+
function ii(e, t) {
|
|
316
|
+
let n = d(b.value);
|
|
317
|
+
q(!1);
|
|
318
|
+
let { files: r, resizedSigningPlacementIds: i } = Ze(tt(b.value, void 0, e), t), a = d(r) !== n, o = r.find((e) => e.id === x.value);
|
|
319
|
+
o && d(o.template) !== d(w.value) && (w.value = c(o.template), C.value = [...S.value[x.value] ?? []]), a && (O.value = !1, k.value = [], J(r, ""));
|
|
320
|
+
let ee = i.get(x.value);
|
|
321
|
+
return ee?.length && o && wi(ee, o.template), a;
|
|
322
|
+
}
|
|
323
|
+
v([() => l.pageSize, () => l.pageSizeOptions], ([e, t]) => {
|
|
324
|
+
if (y.value) {
|
|
325
|
+
ii(e, t), G(D.value);
|
|
338
326
|
return;
|
|
339
327
|
}
|
|
340
|
-
let n = ge(Ee(
|
|
341
|
-
|
|
342
|
-
}, { deep: !0 }),
|
|
343
|
-
|
|
344
|
-
}),
|
|
345
|
-
e && ($(),
|
|
346
|
-
}),
|
|
347
|
-
|
|
348
|
-
}, { deep: !0 }),
|
|
328
|
+
let n = ge(Ee(w.value, e), t);
|
|
329
|
+
d(n.value) !== d(w.value) && Y(n.value), G(D.value);
|
|
330
|
+
}, { deep: !0 }), v(Ar, () => {
|
|
331
|
+
G(w.value.pages[0]?.id);
|
|
332
|
+
}), v(V, (e) => {
|
|
333
|
+
e && ($(), P.value = !1, F.value = !1);
|
|
334
|
+
}), v(U, (e) => {
|
|
335
|
+
E.value && !e.some((e) => e.id === E.value) && (E.value = "", p("signing-placement-select", void 0));
|
|
336
|
+
}, { deep: !0 }), v(() => [
|
|
349
337
|
l.enableDraftCache,
|
|
350
|
-
|
|
338
|
+
tr.value,
|
|
351
339
|
l.draftCacheInterval,
|
|
352
|
-
|
|
340
|
+
V.value
|
|
353
341
|
], () => {
|
|
354
|
-
|
|
355
|
-
}),
|
|
342
|
+
qr(), Kr();
|
|
343
|
+
}), v(Tn, (e) => {
|
|
356
344
|
if (!(typeof document > "u")) {
|
|
357
345
|
if (e) {
|
|
358
|
-
|
|
346
|
+
Yn = document.body.style.overflow, document.body.style.overflow = "hidden";
|
|
359
347
|
return;
|
|
360
348
|
}
|
|
361
|
-
document.body.style.overflow =
|
|
349
|
+
document.body.style.overflow = Yn ?? "", Yn = void 0;
|
|
362
350
|
}
|
|
363
|
-
}),
|
|
364
|
-
|
|
365
|
-
}),
|
|
366
|
-
di.value && typeof document < "u" && (document.body.style.overflow =
|
|
351
|
+
}), Ot(() => {
|
|
352
|
+
Wr(), Kr(), G(D.value), window.addEventListener("pointerdown", Fo, !0), window.addEventListener("keydown", Ro, !0), window.addEventListener("keydown", zo), window.addEventListener("resize", $), window.addEventListener("scroll", Io, !0);
|
|
353
|
+
}), Dt(() => {
|
|
354
|
+
di(), Xn = !0, Tn.value && typeof document < "u" && (document.body.style.overflow = Yn ?? ""), window.removeEventListener("pointerdown", Fo, !0), window.removeEventListener("keydown", Ro, !0), window.removeEventListener("keydown", zo), window.removeEventListener("resize", $), window.removeEventListener("scroll", Io, !0), Gr();
|
|
367
355
|
});
|
|
368
|
-
function
|
|
356
|
+
function ai() {
|
|
369
357
|
return {
|
|
370
358
|
isFocused: !1,
|
|
371
359
|
canUndo: !1,
|
|
@@ -377,36 +365,34 @@ var dn = { class: "gd-contract-template-designer__workspace-header" }, fn = { cl
|
|
|
377
365
|
isOrderedList: !1,
|
|
378
366
|
isTableActive: !1,
|
|
379
367
|
textAlign: "left",
|
|
380
|
-
fontFamily:
|
|
368
|
+
fontFamily: ne,
|
|
381
369
|
fontSize: de.fontSize ?? 14,
|
|
382
370
|
textColor: de.color ?? "#1f2937",
|
|
383
|
-
selectionText: ""
|
|
371
|
+
selectionText: "",
|
|
372
|
+
hasMixedBlockFormats: !1
|
|
384
373
|
};
|
|
385
374
|
}
|
|
386
|
-
function
|
|
375
|
+
function oi(e) {
|
|
387
376
|
return e === "left" || e === "center" || e === "right";
|
|
388
377
|
}
|
|
389
|
-
function
|
|
378
|
+
function si(e) {
|
|
390
379
|
return typeof e == "number" && Number.isInteger(e) && e >= 1 && e <= 6;
|
|
391
380
|
}
|
|
392
|
-
function
|
|
393
|
-
return typeof e == "string" && oe.some((t) => t.key === e);
|
|
394
|
-
}
|
|
395
|
-
function Ma(e, t = Ca.value) {
|
|
381
|
+
function ci(e, t = ei.value) {
|
|
396
382
|
let n = Number(e);
|
|
397
|
-
return Number.isFinite(n) ? Math.min(
|
|
383
|
+
return Number.isFinite(n) ? Math.min(Xt, Math.max(Yt, Math.round(n))) : t;
|
|
398
384
|
}
|
|
399
|
-
function
|
|
385
|
+
function li(e) {
|
|
400
386
|
let t = String(e || "").trim().match(/(\d+(\.\d+)?)/);
|
|
401
387
|
if (!t) return;
|
|
402
388
|
let n = Number(t[1]);
|
|
403
|
-
if (Number.isFinite(n)) return Math.min(
|
|
389
|
+
if (Number.isFinite(n)) return Math.min(Xt, Math.max(Yt, Math.round(n)));
|
|
404
390
|
}
|
|
405
|
-
function
|
|
391
|
+
function K(e = w.value) {
|
|
406
392
|
return {
|
|
407
393
|
...e,
|
|
408
394
|
pages: e.pages.map((e) => {
|
|
409
|
-
let t =
|
|
395
|
+
let t = A.get(e.id);
|
|
410
396
|
return {
|
|
411
397
|
...e,
|
|
412
398
|
contentHtml: t?.getHTML() ?? e.contentHtml,
|
|
@@ -415,408 +401,241 @@ var dn = { class: "gd-contract-template-designer__workspace-header" }, fn = { cl
|
|
|
415
401
|
})
|
|
416
402
|
};
|
|
417
403
|
}
|
|
418
|
-
function
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
404
|
+
function ui() {
|
|
405
|
+
Zn = !1, Qn &&= (clearTimeout(Qn), void 0);
|
|
406
|
+
}
|
|
407
|
+
function di() {
|
|
408
|
+
let e = Zn;
|
|
409
|
+
ui(), e && mi();
|
|
410
|
+
}
|
|
411
|
+
function fi() {
|
|
412
|
+
Zn = !0, Qn && clearTimeout(Qn), Qn = setTimeout(() => {
|
|
413
|
+
Qn = void 0, !(!Zn || Xn) && (Zn = !1, mi());
|
|
414
|
+
}, Wt);
|
|
415
|
+
}
|
|
416
|
+
function pi(e) {
|
|
417
|
+
let t = w.value.pages, n = t.findIndex((t) => t.id === e.id);
|
|
418
|
+
if (n < 0) return;
|
|
419
|
+
let r = t[n];
|
|
420
|
+
if (r.contentHtml === e.contentHtml && r.contentJson === e.contentJson && r.title === e.title && r.pageSize === e.pageSize) return;
|
|
421
|
+
let i = t.slice();
|
|
422
|
+
i[n] = e, w.value = {
|
|
423
|
+
...w.value,
|
|
424
|
+
pages: i
|
|
425
|
+
};
|
|
426
|
+
}
|
|
427
|
+
function mi() {
|
|
428
|
+
let e = Oe(K());
|
|
429
|
+
T.value && !e.variables.some((e) => e.key === T.value) && (T.value = ""), Y(e);
|
|
423
430
|
}
|
|
424
|
-
function
|
|
425
|
-
|
|
431
|
+
function q(e = !1) {
|
|
432
|
+
di();
|
|
433
|
+
let t = c(K());
|
|
434
|
+
if (!y.value) return t;
|
|
435
|
+
let n = b.value.find((e) => e.id === x.value)?.template, r = d(n) !== d(t), i = it(b.value, x.value, t);
|
|
436
|
+
return b.value = i, r && e && J(i), t;
|
|
437
|
+
}
|
|
438
|
+
function J(e, t = x.value) {
|
|
439
|
+
if (!y.value) return;
|
|
426
440
|
let n = u(e);
|
|
427
|
-
|
|
441
|
+
b.value = n, cn = d(n), p("update:files", u(n)), p("files-change", u(n));
|
|
428
442
|
let r = n.find((e) => e.id === t);
|
|
429
|
-
r &&
|
|
430
|
-
}
|
|
431
|
-
function
|
|
432
|
-
let a =
|
|
433
|
-
if (
|
|
434
|
-
...
|
|
435
|
-
[
|
|
436
|
-
}),
|
|
437
|
-
let
|
|
438
|
-
|
|
439
|
-
|
|
443
|
+
r && p("file-change", u([r])[0]);
|
|
444
|
+
}
|
|
445
|
+
function hi(e, t = {}) {
|
|
446
|
+
let { syncCurrent: n, shouldEmit: r, forceRefresh: i, persistCurrentErrors: a } = Xe(t), o = at(b.value, e), ee = o !== x.value;
|
|
447
|
+
if (a && y.value && x.value && (S.value = {
|
|
448
|
+
...S.value,
|
|
449
|
+
[x.value]: [...C.value]
|
|
450
|
+
}), n ? q(!0) : ui(), !ee && !i) return;
|
|
451
|
+
let te = b.value.find((e) => e.id === o);
|
|
452
|
+
te && (x.value = o, w.value = c(te.template), C.value = [...S.value[o] ?? []], T.value = "", E.value = "", D.value = w.value.pages[0]?.id ?? "", An.value = {}, A.clear(), yn.value = "", O.value = !1, k.value = [], bn.value = !1, j.value = void 0, xn.value = void 0, qr(), r && ee && p("update:activeFileId", o), n && ee && $n.value && Vr(), m(() => {
|
|
453
|
+
G(D.value);
|
|
440
454
|
}));
|
|
441
455
|
}
|
|
442
|
-
function
|
|
456
|
+
function Y(e) {
|
|
457
|
+
ui();
|
|
443
458
|
let t = ge(Ee(e, l.pageSize), l.pageSizeOptions), n = t.value;
|
|
444
|
-
return
|
|
459
|
+
return w.value = n, O.value = !1, k.value = [], y.value ? J(it(b.value, x.value, n)) : (b.value = it(b.value, x.value, n), ln = d(n), p("update:modelValue", c(n)), p("change", c(n))), wi(t.resizedSigningPlacementIds, n), n;
|
|
445
460
|
}
|
|
446
|
-
function
|
|
447
|
-
|
|
461
|
+
function gi(e, t = e.type !== "unchanged") {
|
|
462
|
+
B.value = e, t && p("draft-cache-change", { ...e });
|
|
448
463
|
}
|
|
449
|
-
function
|
|
450
|
-
|
|
451
|
-
let e = We("unavailable", "草稿缓存未启用");
|
|
452
|
-
return La(e), e;
|
|
453
|
-
}
|
|
454
|
-
let e = Ke();
|
|
455
|
-
k.value && K(!1);
|
|
456
|
-
let t = k.value ? Qe({
|
|
457
|
-
storage: e,
|
|
458
|
-
key: Hi.value,
|
|
459
|
-
value: {
|
|
460
|
-
files: u(A.value),
|
|
461
|
-
activeFileId: j.value
|
|
462
|
-
},
|
|
463
|
-
maxBytes: l.draftCacheMaxBytes,
|
|
464
|
-
previousValueSerialized: zi
|
|
465
|
-
}) : Ze({
|
|
466
|
-
storage: e,
|
|
467
|
-
key: Hi.value,
|
|
468
|
-
value: c(Pa()),
|
|
469
|
-
maxBytes: l.draftCacheMaxBytes,
|
|
470
|
-
previousValueSerialized: zi
|
|
471
|
-
});
|
|
472
|
-
return t.valueSerialized && (zi = t.valueSerialized), t.status.type !== "unchanged" && La(t.status), t.status;
|
|
464
|
+
function _i() {
|
|
465
|
+
return { ...B.value };
|
|
473
466
|
}
|
|
474
|
-
function
|
|
475
|
-
|
|
476
|
-
let e = Xe(Ke(), Hi.value);
|
|
477
|
-
e.valueSerialized && (zi = e.valueSerialized), e.status.type !== "idle" && La(e.status);
|
|
478
|
-
let t = ot(e.value?.files ?? [], e.value?.activeFileId), n = e.value?.files.find((e) => e.id === t)?.template;
|
|
479
|
-
return n ? c(n) : void 0;
|
|
480
|
-
}
|
|
481
|
-
let e = Ye(Ke(), Hi.value);
|
|
482
|
-
return e.valueSerialized && (zi = e.valueSerialized), e.status.type !== "idle" && La(e.status), e.value ? c(e.value) : void 0;
|
|
483
|
-
}
|
|
484
|
-
function Ba() {
|
|
485
|
-
let e = Ue(Ke(), Hi.value);
|
|
486
|
-
zi = "", La(e);
|
|
487
|
-
}
|
|
488
|
-
function Va() {
|
|
489
|
-
return { ...Fi.value };
|
|
490
|
-
}
|
|
491
|
-
function Ha() {
|
|
492
|
-
if (!Bi.value) return;
|
|
493
|
-
if (k.value) {
|
|
494
|
-
if (!Je({
|
|
495
|
-
files: u(A.value),
|
|
496
|
-
activeFileId: j.value
|
|
497
|
-
})) return;
|
|
498
|
-
let e = Xe(Ke(), Hi.value);
|
|
499
|
-
if (e.valueSerialized && (zi = e.valueSerialized), e.value) {
|
|
500
|
-
let t = Ur(nt(e.value.files, void 0, l.pageSize), l.pageSizeOptions);
|
|
501
|
-
A.value = t.files, M.value = Hr(t.files, e.value.files), Ia(ot(A.value, e.value.activeFileId), !1, !0, !0, !1), Fa(A.value, ""), La(e.status);
|
|
502
|
-
return;
|
|
503
|
-
}
|
|
504
|
-
e.status.type !== "idle" && e.status.type !== "invalid" && La(e.status);
|
|
505
|
-
return;
|
|
506
|
-
}
|
|
507
|
-
if (!qe(P.value)) return;
|
|
508
|
-
let e = Ye(Ke(), Hi.value);
|
|
509
|
-
if (e.valueSerialized && (zi = e.valueSerialized), e.value) {
|
|
510
|
-
L.value = q(e.value).pages[0]?.id ?? "", F.value = "", mo(L.value), La(e.status);
|
|
511
|
-
return;
|
|
512
|
-
}
|
|
513
|
-
e.status.type !== "idle" && e.status.type !== "invalid" && La(e.status);
|
|
514
|
-
}
|
|
515
|
-
function Ua() {
|
|
516
|
-
Ri &&= (clearInterval(Ri), void 0);
|
|
467
|
+
function vi(e, t) {
|
|
468
|
+
t ? A.set(e, t) : A.delete(e);
|
|
517
469
|
}
|
|
518
|
-
function
|
|
519
|
-
|
|
520
|
-
let e = Math.max(1e3, Math.round(Number(l.draftCacheInterval) || 5e3));
|
|
521
|
-
Ri = window.setInterval(() => {
|
|
522
|
-
Ra();
|
|
523
|
-
}, e);
|
|
470
|
+
function X(e, t = W.value?.id ?? D.value) {
|
|
471
|
+
V.value || A.get(t)?.runCommand(e);
|
|
524
472
|
}
|
|
525
|
-
function
|
|
526
|
-
|
|
527
|
-
}
|
|
528
|
-
function J(e, t = W.value?.id ?? L.value) {
|
|
529
|
-
H.value || R.get(t)?.runCommand(e);
|
|
530
|
-
}
|
|
531
|
-
function Y(e) {
|
|
532
|
-
J(e), $();
|
|
473
|
+
function yi(e) {
|
|
474
|
+
X(e), $();
|
|
533
475
|
}
|
|
534
|
-
function
|
|
535
|
-
let t =
|
|
536
|
-
t && (
|
|
476
|
+
function bi(e) {
|
|
477
|
+
let t = I.value?.pageId;
|
|
478
|
+
t && (A.get(t)?.focus(), z.value = typeof document < "u" && document.execCommand(e) ? `${e === "copy" ? "已复制" : e === "cut" ? "已剪切" : "已粘贴"}` : "浏览器未授权剪贴板操作,请使用系统快捷键。", $());
|
|
537
479
|
}
|
|
538
|
-
function
|
|
539
|
-
let t =
|
|
540
|
-
return
|
|
480
|
+
function xi(e) {
|
|
481
|
+
let t = Y(Oe(e));
|
|
482
|
+
return T.value && !t.variables.some((e) => e.key === T.value) && (T.value = ""), t;
|
|
541
483
|
}
|
|
542
|
-
function
|
|
543
|
-
|
|
544
|
-
...P.value,
|
|
545
|
-
pages: P.value.pages.map((t) => t.id === e.id ? e : t)
|
|
546
|
-
}), mo(e.id);
|
|
484
|
+
function Si(e) {
|
|
485
|
+
pi(e), fi(), G(e.id);
|
|
547
486
|
}
|
|
548
|
-
function
|
|
549
|
-
return De(e?.pageSize,
|
|
487
|
+
function Z(e) {
|
|
488
|
+
return De(e?.pageSize, w.value.pageSize);
|
|
550
489
|
}
|
|
551
|
-
function
|
|
490
|
+
function Ci(e) {
|
|
552
491
|
return U.value.filter((t) => t.pageId === e);
|
|
553
492
|
}
|
|
554
|
-
function
|
|
555
|
-
return {
|
|
556
|
-
...e,
|
|
557
|
-
...e.sealTypes ? { sealTypes: [...e.sealTypes] } : {}
|
|
558
|
-
};
|
|
559
|
-
}
|
|
560
|
-
function Xa(e, t = P.value) {
|
|
493
|
+
function wi(e, t = w.value) {
|
|
561
494
|
let n = new Set(e);
|
|
562
|
-
n.size && (
|
|
495
|
+
n.size && (Ei(n), (t.signingPlacements ?? []).filter((e) => n.has(e.id)).forEach((e) => p("signing-placement-change", st(e))));
|
|
563
496
|
}
|
|
564
497
|
function Q(e) {
|
|
565
498
|
let t = e ? U.value.find((t) => t.id === e) : void 0;
|
|
566
|
-
|
|
499
|
+
E.value = t?.id ?? "", t && (T.value = "", D.value = t.pageId), p("signing-placement-select", t ? st(t) : void 0);
|
|
567
500
|
}
|
|
568
|
-
function
|
|
501
|
+
function Ti(e) {
|
|
569
502
|
Q(e.id);
|
|
570
503
|
}
|
|
571
|
-
function
|
|
504
|
+
function Ei(e) {
|
|
572
505
|
let t = new Set(e);
|
|
573
506
|
if (!t.size) return;
|
|
574
|
-
let n =
|
|
575
|
-
|
|
576
|
-
...
|
|
577
|
-
[
|
|
507
|
+
let n = C.value.filter((e) => e.type !== "signing-placement" || !t.has(e.id));
|
|
508
|
+
C.value = n, S.value = {
|
|
509
|
+
...S.value,
|
|
510
|
+
[x.value]: n
|
|
578
511
|
};
|
|
579
512
|
}
|
|
580
|
-
function
|
|
581
|
-
let t =
|
|
582
|
-
|
|
583
|
-
...
|
|
584
|
-
[
|
|
513
|
+
function Di(e) {
|
|
514
|
+
let t = C.value.filter((t) => t.type !== "signing-placement" || t.pageId !== e);
|
|
515
|
+
C.value = t, S.value = {
|
|
516
|
+
...S.value,
|
|
517
|
+
[x.value]: t
|
|
585
518
|
};
|
|
586
519
|
}
|
|
587
|
-
function
|
|
588
|
-
return
|
|
589
|
-
...
|
|
520
|
+
function Oi(e, t = []) {
|
|
521
|
+
return Ei(t), Y({
|
|
522
|
+
...w.value,
|
|
590
523
|
signingPlacements: e
|
|
591
524
|
});
|
|
592
525
|
}
|
|
593
|
-
function
|
|
594
|
-
if (
|
|
595
|
-
let
|
|
596
|
-
if (!r) return;
|
|
597
|
-
let i = te(e, t, X(r), { ...n ?? R.get(t)?.getVisibleSigningPlacementPosition(e) });
|
|
598
|
-
return eo([...U.value, i]), L.value = t, Q(i.id), v("signing-placement-add", Z(i)), i;
|
|
599
|
-
}
|
|
600
|
-
function no(e, t, n, r) {
|
|
601
|
-
if (!l.showSigningPlacementTools) return;
|
|
602
|
-
let i = ne(t.type);
|
|
603
|
-
to(t.type, e, {
|
|
604
|
-
x: n - i.width / 2,
|
|
605
|
-
y: r - i.height / 2
|
|
606
|
-
});
|
|
607
|
-
}
|
|
608
|
-
function ro(e) {
|
|
609
|
-
return to(e.type);
|
|
610
|
-
}
|
|
611
|
-
function io(e, t) {
|
|
612
|
-
if (!s(l.readonly, l.disabled)) {
|
|
613
|
-
e.preventDefault();
|
|
614
|
-
return;
|
|
615
|
-
}
|
|
616
|
-
e.dataTransfer?.setData(n, ae(t)), e.dataTransfer && (e.dataTransfer.effectAllowed = "copy");
|
|
617
|
-
}
|
|
618
|
-
function ao(e) {
|
|
619
|
-
if (!s(l.readonly, l.disabled)) return;
|
|
620
|
-
let t = P.value.pages.find((t) => t.id === e.pageId);
|
|
621
|
-
if (!t) return;
|
|
622
|
-
let n = ee({
|
|
623
|
-
...e,
|
|
624
|
-
...e.type === "seal" ? {} : { sealTypes: void 0 }
|
|
625
|
-
}, X(t));
|
|
626
|
-
eo(U.value.map((e) => e.id === n.id ? n : e), [n.id]), I.value = n.id, v("signing-placement-change", Z(n));
|
|
627
|
-
}
|
|
628
|
-
function oo(e) {
|
|
629
|
-
let t = qi.value;
|
|
526
|
+
function ki(e) {
|
|
527
|
+
if (V.value || !W.value) return;
|
|
528
|
+
let t = wr.value.find((t) => Ce(t) === e);
|
|
630
529
|
if (!t) return;
|
|
631
|
-
let n =
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
if (!s(l.readonly, l.disabled) || !e) return;
|
|
636
|
-
let t = P.value.pages.find((t) => t.id === e.pageId);
|
|
637
|
-
if (!t) return;
|
|
638
|
-
let n = te(e.type, e.pageId, X(t), {
|
|
639
|
-
...Z(e),
|
|
640
|
-
id: void 0,
|
|
641
|
-
x: e.x + 16,
|
|
642
|
-
y: e.y + 16
|
|
643
|
-
});
|
|
644
|
-
eo([...U.value, n]), Q(n.id), v("signing-placement-add", Z(n));
|
|
645
|
-
}
|
|
646
|
-
function co(e = qi.value) {
|
|
647
|
-
!s(l.readonly, l.disabled) || !e || (eo(U.value.filter((t) => t.id !== e.id), [e.id]), I.value === e.id && Q(), v("signing-placement-remove", Z(e)));
|
|
648
|
-
}
|
|
649
|
-
function lo(e) {
|
|
650
|
-
if (H.value || !W.value) return;
|
|
651
|
-
let t = ua.value.find((t) => Ce(t) === e);
|
|
652
|
-
if (!t) return;
|
|
653
|
-
let n = W.value.id, r = X(W.value), i = De(t, P.value.pageSize), a = U.value.map((e) => e.pageId === n ? ie(e, r, i) : e);
|
|
654
|
-
Qa(a.filter((e) => e.pageId === n).map((e) => e.id)), q({
|
|
655
|
-
...P.value,
|
|
656
|
-
pages: P.value.pages.map((e) => e.id === n ? {
|
|
530
|
+
let n = W.value.id, r = Z(W.value), i = De(t, w.value.pageSize), a = U.value.map((e) => e.pageId === n ? ee(e, r, i) : e);
|
|
531
|
+
Ei(a.filter((e) => e.pageId === n).map((e) => e.id)), Y({
|
|
532
|
+
...w.value,
|
|
533
|
+
pages: w.value.pages.map((e) => e.id === n ? {
|
|
657
534
|
...e,
|
|
658
535
|
pageSize: i
|
|
659
536
|
} : e),
|
|
660
537
|
signingPlacements: a
|
|
661
|
-
}), a.filter((e) => e.pageId === n).forEach((e) =>
|
|
662
|
-
}
|
|
663
|
-
function uo(e) {
|
|
664
|
-
return {
|
|
665
|
-
type: "doc",
|
|
666
|
-
content: e.length ? e : [{ type: "paragraph" }]
|
|
667
|
-
};
|
|
668
|
-
}
|
|
669
|
-
function fo(e) {
|
|
670
|
-
return e.replace(/<p>\s*(<br>)?\s*<\/p>/gi, "").trim().length === 0;
|
|
538
|
+
}), a.filter((e) => e.pageId === n).forEach((e) => p("signing-placement-change", st(e))), G(n);
|
|
671
539
|
}
|
|
672
|
-
function
|
|
673
|
-
let
|
|
674
|
-
|
|
675
|
-
...e,
|
|
676
|
-
contentHtml: `${n}${a}`,
|
|
677
|
-
contentJson: uo(i)
|
|
678
|
-
};
|
|
679
|
-
}
|
|
680
|
-
function mo(e = L.value) {
|
|
681
|
-
if (H.value) return;
|
|
682
|
-
let t = P.value.pages.findIndex((e) => e.id === ri.value), n = P.value.pages.findIndex((t) => t.id === e);
|
|
683
|
-
(!ri.value || t < 0 || n >= 0 && n < t) && (ri.value = e), !ni.value && y(() => go());
|
|
684
|
-
}
|
|
685
|
-
function ho(e) {
|
|
686
|
-
let t = ga.value;
|
|
687
|
-
Pi.value = `合同最多支持 ${t} 页`, v("page-limit", t, e);
|
|
688
|
-
}
|
|
689
|
-
async function go() {
|
|
690
|
-
if (!ni.value) {
|
|
691
|
-
ni.value = !0;
|
|
692
|
-
try {
|
|
693
|
-
let e = ri.value;
|
|
694
|
-
ri.value = "";
|
|
695
|
-
let t = 0, n = Math.max(40, ga.value + 1);
|
|
696
|
-
for (; t < n;) {
|
|
697
|
-
await y();
|
|
698
|
-
let n = Pa().pages, r = Math.max(0, n.findIndex((t) => t.id === e)), i = !1;
|
|
699
|
-
for (let t = r; t < n.length; t += 1) {
|
|
700
|
-
let r = n[t];
|
|
701
|
-
if (t === n.length - 1 && n.length >= ga.value && R.get(r.id)?.hasOverflowContent()) {
|
|
702
|
-
ho("auto-pagination");
|
|
703
|
-
break;
|
|
704
|
-
}
|
|
705
|
-
let a = R.get(r.id)?.splitOverflowContent();
|
|
706
|
-
if (!a) continue;
|
|
707
|
-
let o = Pa().pages, s = o.findIndex((e) => e.id === r.id);
|
|
708
|
-
if (s < 0) break;
|
|
709
|
-
o[s] = a.page;
|
|
710
|
-
let ee = o[s + 1];
|
|
711
|
-
ee ? o[s + 1] = R.get(ee.id)?.prependContent(a.overflowContent) ?? po(ee, a.overflowContent, a.overflowHtml) : o.push(_e(o.length + 1, X(a.page), a.overflowHtml, uo(a.overflowContent))), qa({
|
|
712
|
-
...P.value,
|
|
713
|
-
pages: o
|
|
714
|
-
}), e = o[s + 1]?.id ?? a.page.id, i = !0;
|
|
715
|
-
break;
|
|
716
|
-
}
|
|
717
|
-
if (!i) break;
|
|
718
|
-
t += 1;
|
|
719
|
-
}
|
|
720
|
-
} finally {
|
|
721
|
-
ni.value = !1, ri.value && y(() => go());
|
|
722
|
-
}
|
|
723
|
-
}
|
|
540
|
+
function Ai(e) {
|
|
541
|
+
let t = Ar.value;
|
|
542
|
+
z.value = `合同最多支持 ${t} 页`, p("page-limit", t, e);
|
|
724
543
|
}
|
|
725
|
-
function
|
|
726
|
-
if (
|
|
727
|
-
if (
|
|
728
|
-
|
|
544
|
+
function ji() {
|
|
545
|
+
if (V.value) return;
|
|
546
|
+
if (jr.value) {
|
|
547
|
+
Ai("add");
|
|
729
548
|
return;
|
|
730
549
|
}
|
|
731
|
-
let e = ye(
|
|
732
|
-
|
|
733
|
-
...
|
|
734
|
-
pages: [...
|
|
735
|
-
}),
|
|
736
|
-
}
|
|
737
|
-
function
|
|
738
|
-
if (
|
|
739
|
-
if (
|
|
740
|
-
|
|
550
|
+
let e = ye(w.value.pages.length + 1, cr.value);
|
|
551
|
+
Y({
|
|
552
|
+
...w.value,
|
|
553
|
+
pages: [...w.value.pages, e]
|
|
554
|
+
}), D.value = e.id;
|
|
555
|
+
}
|
|
556
|
+
function Mi(e) {
|
|
557
|
+
if (V.value) return;
|
|
558
|
+
if (jr.value) {
|
|
559
|
+
Ai("duplicate");
|
|
741
560
|
return;
|
|
742
561
|
}
|
|
743
|
-
let t =
|
|
562
|
+
let t = w.value.pages.findIndex((t) => t.id === e.id);
|
|
744
563
|
if (t < 0) return;
|
|
745
564
|
let n = c({
|
|
746
565
|
pages: [e],
|
|
747
566
|
variables: [],
|
|
748
|
-
pageSize:
|
|
567
|
+
pageSize: w.value.pageSize,
|
|
749
568
|
signingPlacements: []
|
|
750
|
-
}).pages[0], r = _e(t + 2,
|
|
569
|
+
}).pages[0], r = _e(t + 2, Z(e), n.contentHtml, n.contentJson);
|
|
751
570
|
r.title = `${e.title || `第 ${t + 1} 页`}副本`;
|
|
752
|
-
let i = [...
|
|
571
|
+
let i = [...w.value.pages];
|
|
753
572
|
i.splice(t + 1, 0, r);
|
|
754
|
-
let
|
|
755
|
-
...
|
|
573
|
+
let o = Ci(e.id).map((e) => a(e.type, r.id, Z(r), {
|
|
574
|
+
...st(e),
|
|
756
575
|
id: void 0,
|
|
757
576
|
pageId: r.id
|
|
758
577
|
}));
|
|
759
|
-
|
|
760
|
-
...
|
|
578
|
+
Y({
|
|
579
|
+
...w.value,
|
|
761
580
|
pages: i,
|
|
762
|
-
signingPlacements: [...U.value, ...
|
|
763
|
-
}),
|
|
581
|
+
signingPlacements: [...U.value, ...o]
|
|
582
|
+
}), D.value = r.id, o.forEach((e) => p("signing-placement-add", st(e))), o[0] && Q(o[0].id);
|
|
764
583
|
}
|
|
765
|
-
function
|
|
766
|
-
if (
|
|
767
|
-
let t =
|
|
584
|
+
function Ni(e) {
|
|
585
|
+
if (V.value || w.value.pages.length <= 1) return;
|
|
586
|
+
let t = w.value.pages.findIndex((t) => t.id === e.id);
|
|
768
587
|
if (t < 0) return;
|
|
769
|
-
let n =
|
|
770
|
-
|
|
771
|
-
let r =
|
|
772
|
-
...
|
|
588
|
+
let n = Ci(e.id);
|
|
589
|
+
Di(e.id);
|
|
590
|
+
let r = w.value.pages.filter((t) => t.id !== e.id), i = xi({
|
|
591
|
+
...w.value,
|
|
773
592
|
pages: r,
|
|
774
593
|
signingPlacements: U.value.filter((t) => t.pageId !== e.id)
|
|
775
594
|
});
|
|
776
|
-
|
|
595
|
+
D.value = i.pages[Math.min(t, i.pages.length - 1)]?.id ?? "", n.some((e) => e.id === E.value) && Q(), n.forEach((e) => p("signing-placement-remove", st(e)));
|
|
777
596
|
}
|
|
778
|
-
function
|
|
779
|
-
if (
|
|
780
|
-
let t =
|
|
597
|
+
function Pi(e) {
|
|
598
|
+
if (V.value || w.value.pages.length <= 1) return;
|
|
599
|
+
let t = Ci(e.id).length;
|
|
781
600
|
if (!t) {
|
|
782
|
-
|
|
601
|
+
Ni(e);
|
|
783
602
|
return;
|
|
784
603
|
}
|
|
785
|
-
|
|
604
|
+
Ft.confirm({
|
|
786
605
|
title: "删除合同页面",
|
|
787
606
|
content: `此页包含 ${t} 个签署位置,删除页面会同时移除这些位置,是否继续?`,
|
|
788
607
|
okText: "确认删除",
|
|
789
608
|
okType: "danger",
|
|
790
609
|
cancelText: "取消",
|
|
791
610
|
onOk: () => {
|
|
792
|
-
|
|
611
|
+
Ni(e);
|
|
793
612
|
}
|
|
794
613
|
});
|
|
795
614
|
}
|
|
796
|
-
function
|
|
797
|
-
let t = new Set(
|
|
615
|
+
function Fi(e) {
|
|
616
|
+
let t = new Set(w.value.variables.map((e) => e.key)), n = 1;
|
|
798
617
|
for (; t.has(`${e}_${n}`);) n += 1;
|
|
799
618
|
return `${e}_${n}`;
|
|
800
619
|
}
|
|
801
|
-
function
|
|
620
|
+
function Ii(e) {
|
|
802
621
|
let t = e.type ?? "text";
|
|
803
622
|
return be({
|
|
804
623
|
...e,
|
|
805
624
|
type: t,
|
|
806
|
-
key: e.key ||
|
|
625
|
+
key: e.key || Fi(t),
|
|
807
626
|
label: e.label || Se(t, l.variableTypes).label
|
|
808
627
|
}, l.variableTypes, l.defaultVariableStyle);
|
|
809
628
|
}
|
|
810
|
-
function
|
|
811
|
-
if (
|
|
812
|
-
let r =
|
|
813
|
-
return
|
|
814
|
-
...
|
|
815
|
-
pages: r ?
|
|
816
|
-
variables: i ? [...
|
|
817
|
-
}),
|
|
629
|
+
function Li(e, t = W.value?.id ?? w.value.pages[0].id, n) {
|
|
630
|
+
if (V.value) return e;
|
|
631
|
+
let r = A.get(t)?.insertVariable(e, n), i = !w.value.variables.some((t) => t.key === e.key);
|
|
632
|
+
return Y({
|
|
633
|
+
...w.value,
|
|
634
|
+
pages: r ? w.value.pages.map((e) => e.id === r.id ? r : e) : w.value.pages,
|
|
635
|
+
variables: i ? [...w.value.variables, e] : w.value.variables
|
|
636
|
+
}), T.value = e.key, Q(), D.value = t, i && p("variable-add", e), G(t), e;
|
|
818
637
|
}
|
|
819
|
-
function
|
|
638
|
+
function Ri(e) {
|
|
820
639
|
let { width: t, height: n, ...r } = e, i = Ne(t), a = Ne(n);
|
|
821
640
|
return {
|
|
822
641
|
...r,
|
|
@@ -824,709 +643,723 @@ var dn = { class: "gd-contract-template-designer__workspace-header" }, fn = { cl
|
|
|
824
643
|
...a === void 0 ? {} : { height: a }
|
|
825
644
|
};
|
|
826
645
|
}
|
|
827
|
-
function
|
|
828
|
-
let t = Ne(
|
|
646
|
+
function zi(e = {}) {
|
|
647
|
+
let t = Ne(Fn.value), n = Ne(In.value);
|
|
829
648
|
return {
|
|
830
649
|
...e,
|
|
831
650
|
...t === void 0 ? {} : { width: t },
|
|
832
651
|
...n === void 0 ? {} : { height: n }
|
|
833
652
|
};
|
|
834
653
|
}
|
|
835
|
-
function
|
|
836
|
-
|
|
654
|
+
function Bi() {
|
|
655
|
+
Pn.value = "", Fn.value = void 0, In.value = void 0, Ln.value = "";
|
|
837
656
|
}
|
|
838
|
-
function
|
|
839
|
-
let r =
|
|
657
|
+
function Vi(e, t = W.value?.id ?? w.value.pages[0]?.id, n) {
|
|
658
|
+
let r = Ri({
|
|
840
659
|
...e,
|
|
841
660
|
src: e.src.trim()
|
|
842
661
|
});
|
|
843
|
-
if (!(
|
|
662
|
+
if (!(V.value || !t || !je(r.src) || !r.src || !A.get(t)?.insertContentImage(r, n))) return D.value = t, T.value = "", Q(), r.src;
|
|
844
663
|
}
|
|
845
|
-
function
|
|
664
|
+
function Hi(e) {
|
|
846
665
|
return e instanceof Error ? e : /* @__PURE__ */ Error("图片处理失败");
|
|
847
666
|
}
|
|
848
|
-
async function
|
|
849
|
-
t === "toolbar" && (
|
|
667
|
+
async function Ui(e, t) {
|
|
668
|
+
t === "toolbar" && (Rn.value = !0, Ln.value = "");
|
|
850
669
|
try {
|
|
851
|
-
|
|
670
|
+
let n = await Pe(e, {
|
|
852
671
|
source: t,
|
|
853
672
|
compression: l.imageCompression,
|
|
854
673
|
upload: l.imageUpload
|
|
855
|
-
})
|
|
674
|
+
});
|
|
675
|
+
return Xn ? void 0 : n.src;
|
|
856
676
|
} catch (e) {
|
|
857
|
-
let n =
|
|
858
|
-
t === "toolbar" && (
|
|
677
|
+
let n = Hi(e);
|
|
678
|
+
t === "toolbar" && (Ln.value = n.message), z.value = n.message, p("image-error", n, t);
|
|
859
679
|
return;
|
|
860
680
|
} finally {
|
|
861
|
-
t === "toolbar" && (
|
|
681
|
+
t === "toolbar" && (Rn.value = !1);
|
|
862
682
|
}
|
|
863
683
|
}
|
|
864
|
-
async function
|
|
865
|
-
return await
|
|
684
|
+
async function Wi(e) {
|
|
685
|
+
return await Ui(e, "paste") ?? null;
|
|
866
686
|
}
|
|
867
|
-
async function
|
|
868
|
-
if (
|
|
869
|
-
let n = W.value?.id ??
|
|
870
|
-
if (
|
|
871
|
-
|
|
687
|
+
async function Gi(e, t = {}) {
|
|
688
|
+
if (V.value) return;
|
|
689
|
+
let n = W.value?.id ?? w.value.pages[0]?.id, r = n ? A.get(n)?.getSelectionRange() : void 0, i = typeof e == "string" ? e.trim() : await Ui(e, "toolbar");
|
|
690
|
+
if (Xn) return;
|
|
691
|
+
if (!i || !je(i)) {
|
|
692
|
+
typeof e == "string" && (Ln.value = "请输入安全的图片 URL");
|
|
872
693
|
return;
|
|
873
694
|
}
|
|
874
|
-
|
|
695
|
+
if (n && !A.has(n)) return;
|
|
696
|
+
let a = Vi({
|
|
875
697
|
...t,
|
|
876
698
|
src: i
|
|
877
699
|
}, n, r);
|
|
878
|
-
return a && (
|
|
700
|
+
return a && (Nn.value = !1, Bi(), z.value = "已插入图片"), a;
|
|
879
701
|
}
|
|
880
|
-
function
|
|
881
|
-
|
|
702
|
+
function Ki() {
|
|
703
|
+
V.value || Rn.value || ($(), Ln.value = "", an.value && (an.value.value = ""), an.value?.click());
|
|
882
704
|
}
|
|
883
|
-
async function
|
|
705
|
+
async function qi(e) {
|
|
884
706
|
let t = e.target.files?.[0];
|
|
885
|
-
t && await
|
|
707
|
+
t && await Gi(t, zi({ alt: t.name }));
|
|
886
708
|
}
|
|
887
|
-
async function
|
|
888
|
-
let e =
|
|
889
|
-
await
|
|
709
|
+
async function Ji() {
|
|
710
|
+
let e = Pn.value;
|
|
711
|
+
await Gi(e, zi());
|
|
890
712
|
}
|
|
891
|
-
function
|
|
892
|
-
|
|
713
|
+
function Yi(e) {
|
|
714
|
+
ha(e), Mn.value = !1;
|
|
893
715
|
}
|
|
894
|
-
function
|
|
895
|
-
$(),
|
|
716
|
+
function Xi() {
|
|
717
|
+
$(), ji();
|
|
896
718
|
}
|
|
897
|
-
function
|
|
898
|
-
$(),
|
|
719
|
+
function Zi(e, t, n, r) {
|
|
720
|
+
$(), Li(Ii({ type: t }), e, {
|
|
899
721
|
left: n,
|
|
900
722
|
top: r
|
|
901
723
|
});
|
|
902
724
|
}
|
|
903
|
-
function
|
|
904
|
-
$(),
|
|
725
|
+
function Qi(e) {
|
|
726
|
+
$(), T.value = e, Q();
|
|
905
727
|
}
|
|
906
|
-
function
|
|
907
|
-
let t =
|
|
908
|
-
|
|
909
|
-
|
|
728
|
+
function $i(e) {
|
|
729
|
+
let t = w.value.variables.find((t) => t.id === e.id);
|
|
730
|
+
if (!t) return;
|
|
731
|
+
let n = e.key.trim();
|
|
732
|
+
if (n !== t.key) {
|
|
733
|
+
let t = ke(n, w.value.variables, e.id);
|
|
734
|
+
if (t) {
|
|
735
|
+
z.value = t;
|
|
736
|
+
return;
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
e = {
|
|
740
|
+
...e,
|
|
741
|
+
key: n
|
|
742
|
+
};
|
|
743
|
+
let r = [...w.value.pages], i = t.key, a = "";
|
|
744
|
+
A.forEach((t, n) => {
|
|
745
|
+
let o = t.updateVariable(e, i);
|
|
910
746
|
if (o) {
|
|
911
|
-
|
|
912
|
-
let e =
|
|
913
|
-
e >= 0 && (
|
|
747
|
+
a ||= n;
|
|
748
|
+
let e = r.findIndex((e) => e.id === n);
|
|
749
|
+
e >= 0 && (r[e] = o);
|
|
914
750
|
}
|
|
915
|
-
}),
|
|
916
|
-
...
|
|
917
|
-
pages:
|
|
918
|
-
variables:
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
751
|
+
}), Y({
|
|
752
|
+
...w.value,
|
|
753
|
+
pages: r,
|
|
754
|
+
variables: w.value.variables.map((t) => t.id === e.id ? e : t),
|
|
755
|
+
...i !== e.key && w.value.pageDecorations ? { pageDecorations: ue(w.value.pageDecorations, i, e.key) } : {}
|
|
756
|
+
}), T.value = e.key, G(a || D.value);
|
|
757
|
+
}
|
|
758
|
+
function ea(e) {
|
|
759
|
+
H.value && $i({
|
|
760
|
+
...H.value,
|
|
924
761
|
...e,
|
|
925
762
|
style: {
|
|
926
|
-
...
|
|
763
|
+
...H.value.style,
|
|
927
764
|
...e.style
|
|
928
765
|
}
|
|
929
766
|
});
|
|
930
767
|
}
|
|
931
|
-
function
|
|
932
|
-
|
|
768
|
+
function ta(e) {
|
|
769
|
+
V.value || !H.value || ea({ key: e });
|
|
933
770
|
}
|
|
934
|
-
function
|
|
935
|
-
|
|
771
|
+
function na(e) {
|
|
772
|
+
V.value || (Y({
|
|
773
|
+
...w.value,
|
|
774
|
+
pageDecorations: se(e)
|
|
775
|
+
}), G(w.value.pages[0]?.id));
|
|
936
776
|
}
|
|
937
|
-
function
|
|
938
|
-
(e === "
|
|
777
|
+
function ra(e) {
|
|
778
|
+
(e === "left" || e === "center" || e === "right") && ea({ style: { textAlign: e } });
|
|
939
779
|
}
|
|
940
|
-
function
|
|
941
|
-
|
|
780
|
+
function ia(e) {
|
|
781
|
+
(e === "solid" || e === "dashed") && ea({ style: { borderStyle: e } });
|
|
942
782
|
}
|
|
943
|
-
function
|
|
944
|
-
|
|
783
|
+
function aa(e) {
|
|
784
|
+
(e === "contain" || e === "cover" || e === "fill") && ea({ style: { objectFit: e } });
|
|
945
785
|
}
|
|
946
|
-
function
|
|
947
|
-
|
|
786
|
+
function oa(e) {
|
|
787
|
+
ea({ style: e });
|
|
948
788
|
}
|
|
949
|
-
function
|
|
950
|
-
|
|
789
|
+
function sa(e) {
|
|
790
|
+
oa({ fontFamily: String(e || "").trim() || "Noto Serif SC, Source Han Serif SC, Songti SC, STSong, SimSun, serif" });
|
|
791
|
+
}
|
|
792
|
+
function ca(e) {
|
|
793
|
+
oa({ fontSize: ci(e, H.value?.style?.fontSize ?? 14) });
|
|
794
|
+
}
|
|
795
|
+
function la(e) {
|
|
796
|
+
H.value && ea({
|
|
951
797
|
multiline: e,
|
|
952
|
-
rows:
|
|
953
|
-
lineHeight:
|
|
798
|
+
rows: H.value.rows || 3,
|
|
799
|
+
lineHeight: H.value.lineHeight || 28,
|
|
954
800
|
style: e ? { underline: !0 } : void 0
|
|
955
801
|
});
|
|
956
802
|
}
|
|
957
|
-
function
|
|
958
|
-
|
|
803
|
+
function ua(e) {
|
|
804
|
+
H.value && ea({
|
|
959
805
|
rows: Number(e || 3),
|
|
960
|
-
lineHeight:
|
|
806
|
+
lineHeight: H.value.lineHeight || 28
|
|
961
807
|
});
|
|
962
808
|
}
|
|
963
|
-
function
|
|
964
|
-
if (
|
|
965
|
-
let t = [...
|
|
966
|
-
|
|
809
|
+
function da(e) {
|
|
810
|
+
if (V.value) return;
|
|
811
|
+
let t = [...w.value.pages];
|
|
812
|
+
A.forEach((n, r) => {
|
|
967
813
|
let i = n.removeVariable(e.key);
|
|
968
814
|
if (i) {
|
|
969
815
|
let e = t.findIndex((e) => e.id === r);
|
|
970
816
|
e >= 0 && (t[e] = i);
|
|
971
817
|
}
|
|
972
|
-
}),
|
|
973
|
-
...
|
|
818
|
+
}), Y({
|
|
819
|
+
...w.value,
|
|
974
820
|
pages: t,
|
|
975
|
-
variables:
|
|
976
|
-
|
|
821
|
+
variables: w.value.variables.filter((t) => t.id !== e.id),
|
|
822
|
+
...w.value.pageDecorations ? { pageDecorations: ue(w.value.pageDecorations, e.key) } : {}
|
|
823
|
+
}), T.value = "", E.value = "";
|
|
977
824
|
}
|
|
978
|
-
function
|
|
979
|
-
let t = (e.trim() || "variable").replace(/\s+/g, "_"), n = new Set(
|
|
825
|
+
function fa(e) {
|
|
826
|
+
let t = (e.trim() || "variable").replace(/\s+/g, "_"), n = new Set(w.value.variables.map((e) => e.key));
|
|
980
827
|
if (!n.has(t)) return t;
|
|
981
828
|
let r = 2;
|
|
982
829
|
for (; n.has(`${t}_${r}`);) r += 1;
|
|
983
830
|
return `${t}_${r}`;
|
|
984
831
|
}
|
|
985
|
-
function
|
|
986
|
-
|
|
832
|
+
function pa(e) {
|
|
833
|
+
V.value || Li(be({
|
|
987
834
|
...e,
|
|
988
835
|
id: void 0,
|
|
989
|
-
key:
|
|
836
|
+
key: fa(`${e.key || e.type}_copy`),
|
|
990
837
|
label: `${e.label}副本`,
|
|
991
838
|
style: { ...e.style }
|
|
992
839
|
}, l.variableTypes, l.defaultVariableStyle));
|
|
993
840
|
}
|
|
994
|
-
function
|
|
995
|
-
return
|
|
841
|
+
function ma(e) {
|
|
842
|
+
return V.value ? void 0 : Li(w.value.variables.find((t) => t.key === e.key) ?? be(e, l.variableTypes, l.defaultVariableStyle));
|
|
996
843
|
}
|
|
997
|
-
function
|
|
998
|
-
if (!
|
|
844
|
+
function ha(e) {
|
|
845
|
+
if (!V.value) return Li(Ii({ type: e }));
|
|
999
846
|
}
|
|
1000
|
-
function
|
|
1001
|
-
if (
|
|
1002
|
-
let n =
|
|
847
|
+
function ga(t) {
|
|
848
|
+
if (V.value || !e(t)) return;
|
|
849
|
+
let n = I.value, r = Or.value.find((e) => e.type === t);
|
|
1003
850
|
if (!n || !r) return;
|
|
1004
|
-
let i = Fe(n.leadingText) || r.label, a = Ie(n.selectionWidth,
|
|
1005
|
-
|
|
851
|
+
let i = Fe(n.leadingText) || r.label, a = Ie(n.selectionWidth, qt, Yr.value), o = _a();
|
|
852
|
+
Li(Ii({
|
|
1006
853
|
type: t,
|
|
1007
854
|
label: i,
|
|
1008
855
|
...a ? { width: a } : {},
|
|
1009
856
|
...o ? { style: o } : {}
|
|
1010
|
-
}), n.pageId),
|
|
857
|
+
}), n.pageId), z.value = n.hasSelection ? `已将选中内容替换为${r.label}控件` : `已插入${r.label}控件`, $();
|
|
1011
858
|
}
|
|
1012
|
-
function
|
|
1013
|
-
let e =
|
|
859
|
+
function _a() {
|
|
860
|
+
let e = Zr.value, t = {};
|
|
1014
861
|
return e.isUnderline && (t.underline = !0), typeof e.fontSize == "number" && Number.isFinite(e.fontSize) && (t.fontSize = e.fontSize), e.fontFamily && (t.fontFamily = e.fontFamily), e.textColor && (t.color = e.textColor), Object.keys(t).length ? t : void 0;
|
|
1015
862
|
}
|
|
1016
|
-
function
|
|
1017
|
-
if (
|
|
1018
|
-
let t =
|
|
1019
|
-
t && (
|
|
863
|
+
function va(e) {
|
|
864
|
+
if (V.value) return;
|
|
865
|
+
let t = I.value;
|
|
866
|
+
t && (Li(e, t.pageId), z.value = `已绑定到${e.label},沿用原控件尺寸`, $());
|
|
1020
867
|
}
|
|
1021
|
-
function
|
|
1022
|
-
return Se(t.type && e(t.type) ? t.type : "text",
|
|
868
|
+
function ya(t) {
|
|
869
|
+
return Se(t.type && e(t.type) ? t.type : "text", Or.value).label;
|
|
1023
870
|
}
|
|
1024
|
-
function
|
|
1025
|
-
|
|
1026
|
-
|
|
871
|
+
function ba() {
|
|
872
|
+
w.value.variables.length && (Bn.value = !0, m(() => {
|
|
873
|
+
Oo(), zn.value?.focusBindSearch();
|
|
1027
874
|
}));
|
|
1028
875
|
}
|
|
1029
|
-
function
|
|
876
|
+
function xa(e, t) {
|
|
1030
877
|
e.dataTransfer?.setData("application/x-gd-contract-variable", t), e.dataTransfer && (e.dataTransfer.effectAllowed = "copy");
|
|
1031
878
|
}
|
|
1032
|
-
function
|
|
1033
|
-
return
|
|
1034
|
-
}
|
|
1035
|
-
let { width: ss } = Mt(Mr), { width: cs } = Mt(Pr), ls = d(() => Math.max(...P.value.pages.map((e) => X(e).width), pe.width) + 10), us = S([]), ds = /* @__PURE__ */ new Map(), fs = 0, ps = d(() => us.value.length > 0);
|
|
1036
|
-
function ms(e) {
|
|
1037
|
-
return us.value.includes(e);
|
|
879
|
+
function Sa(e) {
|
|
880
|
+
return M.value = Math.round(Math.min(Ht, Math.max(Vt, Number.isFinite(e) ? e : 1)) * 100) / 100, M.value;
|
|
1038
881
|
}
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
}
|
|
1043
|
-
function gs(e = 0) {
|
|
1044
|
-
let t = Pr.value;
|
|
1045
|
-
if (!t) return;
|
|
1046
|
-
if (typeof window < "u" && window.matchMedia("(max-width: 760px)").matches) {
|
|
1047
|
-
hs([], e);
|
|
1048
|
-
return;
|
|
1049
|
-
}
|
|
1050
|
-
let n = t.clientWidth;
|
|
1051
|
-
if (n <= 0) return;
|
|
1052
|
-
let r = Fr.value, i = 0;
|
|
1053
|
-
for (let e of Array.from(t.children)) {
|
|
1054
|
-
if (!(e instanceof HTMLElement)) continue;
|
|
1055
|
-
if (e === r) {
|
|
1056
|
-
e.offsetWidth > 0 && (fs = e.offsetWidth);
|
|
1057
|
-
continue;
|
|
1058
|
-
}
|
|
1059
|
-
let t = e.dataset.toolbarOverflowKey;
|
|
1060
|
-
if (t) {
|
|
1061
|
-
e.offsetWidth > 0 && ds.set(t, e.offsetWidth);
|
|
1062
|
-
continue;
|
|
1063
|
-
}
|
|
1064
|
-
i += e.offsetWidth;
|
|
1065
|
-
}
|
|
1066
|
-
let a = Object.fromEntries(ft.map((e) => [e, ds.get(e) ?? 0]));
|
|
1067
|
-
hs(pt({
|
|
1068
|
-
availableWidth: n,
|
|
1069
|
-
fixedWidth: i,
|
|
1070
|
-
groupWidths: a,
|
|
1071
|
-
moreWidth: fs || Dr,
|
|
1072
|
-
buffer: Or
|
|
1073
|
-
}), e);
|
|
1074
|
-
}
|
|
1075
|
-
St([
|
|
1076
|
-
cs,
|
|
1077
|
-
xa,
|
|
1078
|
-
gi,
|
|
1079
|
-
Sa,
|
|
1080
|
-
Ca,
|
|
1081
|
-
H
|
|
1082
|
-
], () => {
|
|
1083
|
-
y(() => gs());
|
|
1084
|
-
}, { immediate: !0 }), vt(() => {
|
|
1085
|
-
y(() => gs()), typeof document < "u" && document.fonts?.ready && document.fonts.ready.then(() => {
|
|
1086
|
-
Pr.value && y(() => gs());
|
|
1087
|
-
});
|
|
1088
|
-
});
|
|
1089
|
-
let { fitWidth: _s, applyAutoFit: vs, markUserAdjusted: ys } = je({
|
|
1090
|
-
viewportWidth: ss,
|
|
1091
|
-
widestPageWidth: ls,
|
|
882
|
+
let { width: Ca } = It($t), { fitWidth: wa, applyAutoFit: Ta, markUserAdjusted: Ea } = Me({
|
|
883
|
+
viewportWidth: Ca,
|
|
884
|
+
widestPageWidth: f(() => Math.max(...w.value.pages.map((e) => Z(e).width), fe.width) + 10),
|
|
1092
885
|
padding: 48,
|
|
1093
|
-
minZoom:
|
|
1094
|
-
maxZoom:
|
|
1095
|
-
getZoom: () =>
|
|
1096
|
-
applyZoom:
|
|
886
|
+
minZoom: Vt,
|
|
887
|
+
maxZoom: Ht,
|
|
888
|
+
getZoom: () => M.value,
|
|
889
|
+
applyZoom: Sa
|
|
1097
890
|
});
|
|
1098
|
-
function
|
|
1099
|
-
return
|
|
891
|
+
function Da(e) {
|
|
892
|
+
return Ea(), Sa(e);
|
|
1100
893
|
}
|
|
1101
|
-
function
|
|
1102
|
-
return
|
|
1103
|
-
}
|
|
1104
|
-
function Ss() {
|
|
1105
|
-
return ui.value;
|
|
894
|
+
function Oa() {
|
|
895
|
+
return Ta();
|
|
1106
896
|
}
|
|
1107
|
-
function
|
|
1108
|
-
|
|
897
|
+
function ka() {
|
|
898
|
+
return M.value;
|
|
1109
899
|
}
|
|
1110
|
-
function
|
|
1111
|
-
|
|
900
|
+
function Aa() {
|
|
901
|
+
Da(M.value + Ut);
|
|
1112
902
|
}
|
|
1113
|
-
function
|
|
1114
|
-
|
|
1115
|
-
t && (t.closest(".gd-contract-template-designer__toolbar-more, .ant-popover, .ant-select-dropdown") || (mi.value = !1));
|
|
903
|
+
function ja() {
|
|
904
|
+
Da(M.value - Ut);
|
|
1116
905
|
}
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
}), _t(() => {
|
|
1120
|
-
typeof document < "u" && document.removeEventListener("mousedown", Ts, !0);
|
|
1121
|
-
});
|
|
1122
|
-
function Es() {
|
|
1123
|
-
$(), vi.value = !1, yi.value = !1, mi.value = !1, di.value = !di.value;
|
|
906
|
+
function Ma() {
|
|
907
|
+
$(), P.value = !1, F.value = !1, kn.value = !1, Tn.value = !Tn.value;
|
|
1124
908
|
}
|
|
1125
|
-
function
|
|
909
|
+
function Na() {
|
|
1126
910
|
$();
|
|
1127
|
-
let e =
|
|
1128
|
-
|
|
911
|
+
let e = q(!1);
|
|
912
|
+
y.value ? (xn.value = u(b.value), j.value = void 0, Sn.value = x.value || b.value[0]?.id || "") : (j.value = c(e), xn.value = void 0, Sn.value = ""), bn.value = !0;
|
|
1129
913
|
}
|
|
1130
|
-
function
|
|
1131
|
-
|
|
914
|
+
function Pa() {
|
|
915
|
+
bn.value = !1, j.value = void 0, xn.value = void 0, Sn.value = "";
|
|
1132
916
|
}
|
|
1133
|
-
function
|
|
1134
|
-
return
|
|
917
|
+
function Fa() {
|
|
918
|
+
return so();
|
|
1135
919
|
}
|
|
1136
|
-
function
|
|
920
|
+
function Ia() {
|
|
1137
921
|
$();
|
|
1138
|
-
let e =
|
|
1139
|
-
return
|
|
1140
|
-
}
|
|
1141
|
-
function
|
|
1142
|
-
|
|
1143
|
-
}
|
|
1144
|
-
function
|
|
1145
|
-
$(),
|
|
1146
|
-
let e = U.value.map(
|
|
1147
|
-
|
|
1148
|
-
...
|
|
1149
|
-
[
|
|
922
|
+
let e = Fa();
|
|
923
|
+
return wn.value = JSON.stringify(e, null, 2), Cn.value = !0, e;
|
|
924
|
+
}
|
|
925
|
+
function La() {
|
|
926
|
+
Cn.value = !1;
|
|
927
|
+
}
|
|
928
|
+
function Ra() {
|
|
929
|
+
$(), P.value = !1, F.value = !1;
|
|
930
|
+
let e = U.value.map(st);
|
|
931
|
+
C.value = [], S.value = {
|
|
932
|
+
...S.value,
|
|
933
|
+
[x.value]: []
|
|
1150
934
|
};
|
|
1151
|
-
let t = !!
|
|
1152
|
-
|
|
1153
|
-
let n =
|
|
1154
|
-
return t &&
|
|
935
|
+
let t = !!E.value;
|
|
936
|
+
T.value = "", E.value = "", D.value = "", bn.value = !1, j.value = void 0, xn.value = void 0, Cn.value = !1, wn.value = "", An.value = {}, yn.value = "";
|
|
937
|
+
let n = Y(ve(fe));
|
|
938
|
+
return t && p("signing-placement-select", void 0), e.forEach((e) => p("signing-placement-remove", e)), D.value = n.pages[0]?.id ?? "", c(n);
|
|
1155
939
|
}
|
|
1156
|
-
function
|
|
1157
|
-
|
|
940
|
+
function za() {
|
|
941
|
+
V.value || ($(), Ft.confirm({
|
|
1158
942
|
title: "清空合同内容",
|
|
1159
943
|
content: "将清空全部合同正文、页面、模板变量和签署位置,仅保留一个空白 A4 合同页。此操作不可撤销。",
|
|
1160
944
|
okText: "确认清空",
|
|
1161
945
|
okType: "danger",
|
|
1162
946
|
cancelText: "取消",
|
|
1163
947
|
onOk: () => {
|
|
1164
|
-
|
|
948
|
+
Ra();
|
|
1165
949
|
}
|
|
1166
950
|
}));
|
|
1167
951
|
}
|
|
1168
|
-
function
|
|
1169
|
-
let t =
|
|
952
|
+
function Ba(e) {
|
|
953
|
+
let t = K().pages, n = t.find((e) => e.id === D.value);
|
|
1170
954
|
return (n ? [n, ...t.filter((e) => e.id !== n.id)] : t).find((t) => t.contentHtml.includes(`data-key="${e.key}"`) || t.contentHtml.includes(`data-key='${e.key}'`));
|
|
1171
955
|
}
|
|
1172
|
-
function
|
|
1173
|
-
$(),
|
|
1174
|
-
let t =
|
|
1175
|
-
t && (
|
|
1176
|
-
|
|
956
|
+
function Va(e) {
|
|
957
|
+
$(), T.value = e.key, Q();
|
|
958
|
+
let t = Ba(e);
|
|
959
|
+
t && (D.value = t.id, m(() => {
|
|
960
|
+
A.get(t.id)?.scrollIntoVariable(e.key);
|
|
1177
961
|
}));
|
|
1178
962
|
}
|
|
1179
|
-
function
|
|
1180
|
-
let t =
|
|
1181
|
-
t &&
|
|
963
|
+
function Ha(e) {
|
|
964
|
+
let t = w.value.variables.find((t) => t.key === e || t.id === e);
|
|
965
|
+
t && Va(t);
|
|
1182
966
|
}
|
|
1183
|
-
function
|
|
967
|
+
function Ua(e) {
|
|
1184
968
|
let t = U.value.find((t) => t.id === e);
|
|
1185
|
-
t && ($(),
|
|
1186
|
-
|
|
969
|
+
t && ($(), T.value = "", D.value = t.pageId, Q(t.id), m(() => {
|
|
970
|
+
A.get(t.pageId)?.scrollIntoSigningPlacement(t.id);
|
|
1187
971
|
}));
|
|
1188
972
|
}
|
|
1189
|
-
function
|
|
1190
|
-
$(),
|
|
1191
|
-
|
|
973
|
+
function Wa(e, t = !0) {
|
|
974
|
+
$(), D.value = e, t && m(() => {
|
|
975
|
+
A.get(e)?.scrollIntoPage();
|
|
1192
976
|
});
|
|
1193
977
|
}
|
|
1194
|
-
function
|
|
1195
|
-
|
|
978
|
+
function Ga(e) {
|
|
979
|
+
w.value.pages.some((t) => t.id === e) && Wa(e);
|
|
980
|
+
}
|
|
981
|
+
function Ka() {
|
|
982
|
+
if (N.value) {
|
|
983
|
+
qa();
|
|
984
|
+
return;
|
|
985
|
+
}
|
|
986
|
+
N.value = !0;
|
|
987
|
+
}
|
|
988
|
+
function qa() {
|
|
989
|
+
N.value = !1, m(() => tn.value?.focusPageDecorations());
|
|
1196
990
|
}
|
|
1197
|
-
function
|
|
1198
|
-
return c(
|
|
991
|
+
function Ja() {
|
|
992
|
+
return di(), c(K());
|
|
1199
993
|
}
|
|
1200
|
-
function
|
|
1201
|
-
|
|
1202
|
-
...
|
|
1203
|
-
[
|
|
994
|
+
function Ya(e) {
|
|
995
|
+
C.value = on(e), S.value = {
|
|
996
|
+
...S.value,
|
|
997
|
+
[x.value]: C.value
|
|
1204
998
|
};
|
|
1205
|
-
let t =
|
|
1206
|
-
t.signingPlacements?.some((e) => e.id ===
|
|
1207
|
-
}
|
|
1208
|
-
function
|
|
1209
|
-
let e =
|
|
1210
|
-
return
|
|
1211
|
-
}
|
|
1212
|
-
function
|
|
1213
|
-
let n =
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
return A.value = [...A.value, t], M.value = {
|
|
1221
|
-
...M.value,
|
|
1222
|
-
[t.id]: []
|
|
1223
|
-
}, Fa(A.value, ""), v("file-add", u([t])[0]), Ia(t.id, !1, !0, !0), u([t])[0];
|
|
999
|
+
let t = Y(Ee(e, l.pageSize));
|
|
1000
|
+
t.signingPlacements?.some((e) => e.id === E.value) || Q(), G(t.pages[0]?.id);
|
|
1001
|
+
}
|
|
1002
|
+
function Xa() {
|
|
1003
|
+
let e = q(!1);
|
|
1004
|
+
return y.value ? u(b.value) : u(it(b.value, x.value, e));
|
|
1005
|
+
}
|
|
1006
|
+
function Za(e, t) {
|
|
1007
|
+
let n = Ze(tt(e, void 0, l.pageSize), l.pageSizeOptions), r = b.value;
|
|
1008
|
+
un.value = !0, q(!1), b.value = n.files, S.value = sn(n.files, e), hi(at(b.value, t ?? x.value), {
|
|
1009
|
+
syncCurrent: !1,
|
|
1010
|
+
shouldEmit: !0,
|
|
1011
|
+
forceRefresh: !0,
|
|
1012
|
+
persistCurrentErrors: !1
|
|
1013
|
+
}), d(r) !== d(b.value) && J(b.value, "");
|
|
1224
1014
|
}
|
|
1225
|
-
function
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1015
|
+
function Qa(e) {
|
|
1016
|
+
if (V.value) return;
|
|
1017
|
+
un.value = !0, q(!0);
|
|
1018
|
+
let t = Qe(e || `合同文件 ${b.value.length + 1}`, l.pageSize);
|
|
1019
|
+
return b.value = [...b.value, t], S.value = {
|
|
1020
|
+
...S.value,
|
|
1021
|
+
[t.id]: []
|
|
1022
|
+
}, J(b.value, ""), p("file-add", u([t])[0]), hi(t.id, {
|
|
1023
|
+
syncCurrent: !1,
|
|
1024
|
+
shouldEmit: !0,
|
|
1025
|
+
forceRefresh: !0
|
|
1026
|
+
}), u([t])[0];
|
|
1233
1027
|
}
|
|
1234
|
-
function
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1028
|
+
function $a(e) {
|
|
1029
|
+
!y.value && !b.value.some((t) => t.id === e) || (un.value = !0, hi(e));
|
|
1030
|
+
}
|
|
1031
|
+
function eo(e, t) {
|
|
1032
|
+
if (V.value) return;
|
|
1033
|
+
un.value = !0, q(!1);
|
|
1034
|
+
let n = rt(b.value, e, t), r = n.find((t) => t.id === e);
|
|
1035
|
+
if (r) return b.value = n, J(n, e), u([r])[0];
|
|
1036
|
+
}
|
|
1037
|
+
function to(e) {
|
|
1038
|
+
if (V.value || b.value.length <= 1) return;
|
|
1039
|
+
un.value = !0, q(!1);
|
|
1040
|
+
let t = b.value.find((t) => t.id === e);
|
|
1238
1041
|
if (!t) return;
|
|
1239
|
-
let n =
|
|
1240
|
-
if (n.length ===
|
|
1241
|
-
|
|
1242
|
-
let { [e]: r, ...i } =
|
|
1243
|
-
|
|
1042
|
+
let n = nt(b.value, e);
|
|
1043
|
+
if (n.length === b.value.length) return;
|
|
1044
|
+
b.value = n;
|
|
1045
|
+
let { [e]: r, ...i } = S.value;
|
|
1046
|
+
S.value = i, J(n, ""), p("file-remove", u([t])[0]);
|
|
1244
1047
|
let a = t.template.signingPlacements ?? [];
|
|
1245
|
-
return a.forEach((e) =>
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1048
|
+
return a.forEach((e) => p("signing-placement-remove", st(e))), a.some((e) => e.id === E.value) && p("signing-placement-select", void 0), x.value === e && hi(at(n, n[0]?.id), {
|
|
1049
|
+
syncCurrent: !1,
|
|
1050
|
+
shouldEmit: !0,
|
|
1051
|
+
forceRefresh: !0,
|
|
1052
|
+
persistCurrentErrors: !1
|
|
1053
|
+
}), u([t])[0];
|
|
1054
|
+
}
|
|
1055
|
+
function no(e) {
|
|
1056
|
+
if (V.value || b.value.length <= 1) return;
|
|
1057
|
+
let t = b.value.find((t) => t.id === e);
|
|
1250
1058
|
if (!t) return;
|
|
1251
1059
|
let n = t.template.signingPlacements?.length ?? 0;
|
|
1252
|
-
|
|
1060
|
+
Ft.confirm({
|
|
1253
1061
|
title: "删除合同文件",
|
|
1254
1062
|
content: n ? `“${t.name}”包含 ${n} 个签署位置,删除后文件内正文、变量和签署位置都会移除,是否继续?` : `删除“${t.name}”后,其正文和变量将无法恢复,是否继续?`,
|
|
1255
1063
|
okText: "确认删除",
|
|
1256
1064
|
okType: "danger",
|
|
1257
1065
|
cancelText: "取消",
|
|
1258
1066
|
onOk: () => {
|
|
1259
|
-
|
|
1067
|
+
to(e);
|
|
1260
1068
|
}
|
|
1261
1069
|
});
|
|
1262
1070
|
}
|
|
1263
|
-
function
|
|
1264
|
-
if (
|
|
1265
|
-
|
|
1266
|
-
let n =
|
|
1267
|
-
if (!(!a || n === i)) return
|
|
1268
|
-
}
|
|
1269
|
-
function
|
|
1270
|
-
|
|
1271
|
-
let e =
|
|
1272
|
-
let t =
|
|
1273
|
-
return [...
|
|
1071
|
+
function ro(e, t) {
|
|
1072
|
+
if (V.value) return;
|
|
1073
|
+
un.value = !0, q(!1);
|
|
1074
|
+
let n = b.value.findIndex((t) => t.id === e), r = et(b.value, e, t), i = r.findIndex((t) => t.id === e), a = r[i];
|
|
1075
|
+
if (!(!a || n === i)) return b.value = r, J(r, ""), p("file-move", u([a])[0], n, i), u([a])[0];
|
|
1076
|
+
}
|
|
1077
|
+
function io() {
|
|
1078
|
+
q(!1);
|
|
1079
|
+
let e = po(y.value ? b.value.flatMap((e) => {
|
|
1080
|
+
let t = Ae(e.template, { maxPages: Ar.value });
|
|
1081
|
+
return [...S.value[e.id] ?? [], ...t].map((t) => ({
|
|
1274
1082
|
...t,
|
|
1275
1083
|
fileId: e.id
|
|
1276
1084
|
}));
|
|
1277
|
-
}) : [...
|
|
1278
|
-
return
|
|
1085
|
+
}) : [...C.value, ...Ae(K(), { maxPages: Ar.value })]);
|
|
1086
|
+
return k.value = e, O.value = !0, p("validate", e), e;
|
|
1279
1087
|
}
|
|
1280
|
-
function
|
|
1281
|
-
if (e.fileId && e.fileId !==
|
|
1282
|
-
|
|
1088
|
+
function ao(e) {
|
|
1089
|
+
if (e.fileId && e.fileId !== x.value) {
|
|
1090
|
+
$a(e.fileId), m(() => ao({
|
|
1283
1091
|
...e,
|
|
1284
1092
|
fileId: void 0
|
|
1285
1093
|
}));
|
|
1286
1094
|
return;
|
|
1287
1095
|
}
|
|
1096
|
+
let t = le(e);
|
|
1097
|
+
if (t) {
|
|
1098
|
+
N.value = !0, m(() => nn.value?.focusField(t));
|
|
1099
|
+
return;
|
|
1100
|
+
}
|
|
1288
1101
|
if (e.type === "signing-placement") {
|
|
1289
1102
|
let t = U.value.find((t) => t.id === e.id);
|
|
1290
1103
|
if (t) {
|
|
1291
|
-
|
|
1104
|
+
Wa(t.pageId), Q(t.id);
|
|
1292
1105
|
return;
|
|
1293
1106
|
}
|
|
1294
1107
|
}
|
|
1295
1108
|
if (e.variableKey) {
|
|
1296
|
-
|
|
1109
|
+
Ha(e.variableKey);
|
|
1297
1110
|
return;
|
|
1298
1111
|
}
|
|
1299
1112
|
if (e.pageId) {
|
|
1300
|
-
|
|
1113
|
+
Ga(e.pageId);
|
|
1301
1114
|
return;
|
|
1302
1115
|
}
|
|
1303
|
-
let
|
|
1304
|
-
if (
|
|
1305
|
-
|
|
1116
|
+
let n = w.value.variables.find((t) => t.id === e.id || t.key === e.id);
|
|
1117
|
+
if (n) {
|
|
1118
|
+
Va(n);
|
|
1306
1119
|
return;
|
|
1307
1120
|
}
|
|
1308
|
-
|
|
1121
|
+
w.value.pages.some((t) => t.id === e.id) && Wa(e.id);
|
|
1309
1122
|
}
|
|
1310
|
-
function
|
|
1311
|
-
return
|
|
1123
|
+
function oo(e) {
|
|
1124
|
+
return le(e) ? "页面装饰" : e.type === "signing-placement" ? "签署位置" : e.type === "variable" ? "变量" : "字段";
|
|
1125
|
+
}
|
|
1126
|
+
function so() {
|
|
1127
|
+
return di(), xe(K());
|
|
1312
1128
|
}
|
|
1313
|
-
function
|
|
1314
|
-
let e =
|
|
1315
|
-
return
|
|
1129
|
+
function co() {
|
|
1130
|
+
let e = q(!1);
|
|
1131
|
+
return $e(y.value ? b.value : it(b.value, x.value, e));
|
|
1316
1132
|
}
|
|
1317
|
-
function
|
|
1318
|
-
let n =
|
|
1133
|
+
function lo(e) {
|
|
1134
|
+
let n = K();
|
|
1319
1135
|
try {
|
|
1320
|
-
let r =
|
|
1136
|
+
let r = me(n, C.value);
|
|
1321
1137
|
if (r.length) throw new t(r);
|
|
1322
1138
|
return e(n);
|
|
1323
1139
|
} catch (e) {
|
|
1324
|
-
throw e instanceof t && (
|
|
1140
|
+
throw e instanceof t && (k.value = [...e.errors], O.value = !0, p("validate", [...e.errors])), e;
|
|
1325
1141
|
}
|
|
1326
1142
|
}
|
|
1327
|
-
function
|
|
1328
|
-
return
|
|
1143
|
+
function uo(e) {
|
|
1144
|
+
return lo((t) => i(t, e));
|
|
1329
1145
|
}
|
|
1330
|
-
function
|
|
1331
|
-
return
|
|
1146
|
+
function fo(e) {
|
|
1147
|
+
return lo((t) => r(t, e));
|
|
1332
1148
|
}
|
|
1333
|
-
function
|
|
1149
|
+
function po(e) {
|
|
1334
1150
|
let t = /* @__PURE__ */ new Set();
|
|
1335
1151
|
return e.filter((e) => {
|
|
1336
1152
|
let n = `${e.fileId ?? ""}|${e.code ?? ""}|${e.id}|${e.pageId ?? ""}|${e.message}`;
|
|
1337
1153
|
return t.has(n) ? !1 : (t.add(n), !0);
|
|
1338
1154
|
});
|
|
1339
1155
|
}
|
|
1340
|
-
function
|
|
1341
|
-
|
|
1156
|
+
function mo(e) {
|
|
1157
|
+
k.value = [...e], O.value = !0;
|
|
1342
1158
|
}
|
|
1343
|
-
function
|
|
1344
|
-
|
|
1159
|
+
function ho() {
|
|
1160
|
+
k.value = [], O.value = !1;
|
|
1345
1161
|
}
|
|
1346
|
-
function
|
|
1347
|
-
|
|
1162
|
+
function go() {
|
|
1163
|
+
A.get(W.value?.id ?? D.value)?.focus();
|
|
1348
1164
|
}
|
|
1349
|
-
function
|
|
1350
|
-
|
|
1165
|
+
function _o(e) {
|
|
1166
|
+
oi(e) && X({
|
|
1351
1167
|
type: "set-text-align",
|
|
1352
1168
|
value: e
|
|
1353
1169
|
});
|
|
1354
1170
|
}
|
|
1355
|
-
function
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
}
|
|
1360
|
-
Aa(e) && J({
|
|
1361
|
-
type: "set-heading",
|
|
1362
|
-
level: e
|
|
1171
|
+
function vo(e) {
|
|
1172
|
+
(e === "paragraph" || si(e)) && X({
|
|
1173
|
+
type: "apply-block-style",
|
|
1174
|
+
format: e
|
|
1363
1175
|
});
|
|
1364
1176
|
}
|
|
1365
|
-
function
|
|
1366
|
-
let t =
|
|
1367
|
-
t && (
|
|
1177
|
+
function yo(e) {
|
|
1178
|
+
let t = li(e);
|
|
1179
|
+
t && (X({
|
|
1368
1180
|
type: "set-font-size",
|
|
1369
1181
|
value: t
|
|
1370
|
-
}),
|
|
1182
|
+
}), jn.value = "");
|
|
1371
1183
|
}
|
|
1372
|
-
function
|
|
1184
|
+
function bo(e) {
|
|
1373
1185
|
let t = String(e || "").trim();
|
|
1374
1186
|
if (!t) {
|
|
1375
|
-
|
|
1187
|
+
X({ type: "unset-font-family" });
|
|
1376
1188
|
return;
|
|
1377
1189
|
}
|
|
1378
|
-
|
|
1190
|
+
X({
|
|
1379
1191
|
type: "set-font-family",
|
|
1380
1192
|
value: t
|
|
1381
1193
|
});
|
|
1382
1194
|
}
|
|
1383
|
-
function
|
|
1384
|
-
|
|
1195
|
+
function xo(e) {
|
|
1196
|
+
So(e.target?.value ?? "");
|
|
1385
1197
|
}
|
|
1386
|
-
function
|
|
1198
|
+
function So(e) {
|
|
1387
1199
|
let t = e.trim();
|
|
1388
|
-
t &&
|
|
1200
|
+
t && X({
|
|
1389
1201
|
type: "set-color",
|
|
1390
1202
|
value: t
|
|
1391
1203
|
});
|
|
1392
1204
|
}
|
|
1393
|
-
function
|
|
1394
|
-
|
|
1395
|
-
}
|
|
1396
|
-
function mc() {
|
|
1397
|
-
_i.value.trim() && lc(_i.value);
|
|
1205
|
+
function Co(e) {
|
|
1206
|
+
jn.value = e;
|
|
1398
1207
|
}
|
|
1399
|
-
function
|
|
1400
|
-
|
|
1208
|
+
function wo() {
|
|
1209
|
+
jn.value.trim() && yo(jn.value);
|
|
1401
1210
|
}
|
|
1402
|
-
function
|
|
1403
|
-
e
|
|
1211
|
+
function To(e) {
|
|
1212
|
+
e.key === "Enter" && (e.preventDefault(), wo());
|
|
1404
1213
|
}
|
|
1405
|
-
function
|
|
1406
|
-
|
|
1407
|
-
type: "apply-text-style-preset",
|
|
1408
|
-
preset: e
|
|
1409
|
-
}), gi.value = void 0, $());
|
|
1214
|
+
function Eo(e) {
|
|
1215
|
+
e || (wo(), jn.value = "");
|
|
1410
1216
|
}
|
|
1411
|
-
function
|
|
1412
|
-
if (
|
|
1413
|
-
|
|
1414
|
-
let t =
|
|
1415
|
-
|
|
1217
|
+
function Do(e) {
|
|
1218
|
+
if (V.value) return;
|
|
1219
|
+
D.value = e.pageId, P.value = !1, F.value = !1, L.value = void 0, R.value = void 0, Bn.value = !1, Vn.value = "";
|
|
1220
|
+
let t = gt(e.clientX, e.clientY, 304, 300);
|
|
1221
|
+
I.value = {
|
|
1416
1222
|
pageId: e.pageId,
|
|
1417
|
-
x: t,
|
|
1418
|
-
y:
|
|
1223
|
+
x: t.x,
|
|
1224
|
+
y: t.y,
|
|
1419
1225
|
hasSelection: e.hasSelection,
|
|
1420
1226
|
selectionWidth: e.selectionWidth,
|
|
1421
1227
|
leadingText: e.leadingText
|
|
1422
|
-
},
|
|
1423
|
-
|
|
1228
|
+
}, m(() => {
|
|
1229
|
+
Oo(), zn.value?.focusFirstButton();
|
|
1424
1230
|
});
|
|
1425
1231
|
}
|
|
1426
|
-
function
|
|
1427
|
-
let e =
|
|
1232
|
+
function Oo() {
|
|
1233
|
+
let e = zn.value?.getMenuElement(), t = I.value;
|
|
1428
1234
|
if (!e || !t) return;
|
|
1429
|
-
let n = e
|
|
1430
|
-
|
|
1235
|
+
let n = _t(t.x, t.y, e);
|
|
1236
|
+
I.value = {
|
|
1431
1237
|
...t,
|
|
1432
|
-
x:
|
|
1433
|
-
y:
|
|
1238
|
+
x: n.x,
|
|
1239
|
+
y: n.y
|
|
1434
1240
|
};
|
|
1435
1241
|
}
|
|
1436
|
-
function
|
|
1437
|
-
|
|
1242
|
+
function ko(e) {
|
|
1243
|
+
if (V.value) return;
|
|
1244
|
+
D.value = e.pageId, P.value = !1, F.value = !1, I.value = void 0, R.value = void 0;
|
|
1245
|
+
let t = gt(e.clientX, e.clientY, 248, 400);
|
|
1246
|
+
L.value = {
|
|
1438
1247
|
...e,
|
|
1439
|
-
x:
|
|
1440
|
-
y:
|
|
1441
|
-
},
|
|
1442
|
-
let e =
|
|
1248
|
+
x: t.x,
|
|
1249
|
+
y: t.y
|
|
1250
|
+
}, m(() => {
|
|
1251
|
+
let e = Hn.value?.getMenuElement(), t = L.value;
|
|
1443
1252
|
if (e && t) {
|
|
1444
|
-
let n = e
|
|
1445
|
-
|
|
1253
|
+
let n = _t(t.x, t.y, e);
|
|
1254
|
+
L.value = {
|
|
1446
1255
|
...t,
|
|
1447
|
-
x:
|
|
1448
|
-
y:
|
|
1256
|
+
x: n.x,
|
|
1257
|
+
y: n.y
|
|
1449
1258
|
};
|
|
1450
1259
|
}
|
|
1451
|
-
|
|
1452
|
-
})
|
|
1260
|
+
Hn.value?.focusFirstItem();
|
|
1261
|
+
});
|
|
1453
1262
|
}
|
|
1454
|
-
function
|
|
1455
|
-
|
|
1263
|
+
function Ao(e) {
|
|
1264
|
+
if (V.value) return;
|
|
1265
|
+
D.value = e.pageId, P.value = !1, F.value = !1, I.value = void 0, L.value = void 0, Wn.value = e.image.width, Gn.value = e.image.height, T.value = "", E.value && Q();
|
|
1266
|
+
let t = gt(e.clientX, e.clientY, 288, 196);
|
|
1267
|
+
R.value = {
|
|
1456
1268
|
pageId: e.pageId,
|
|
1457
1269
|
image: e.image,
|
|
1458
|
-
x:
|
|
1459
|
-
y:
|
|
1460
|
-
},
|
|
1461
|
-
|
|
1462
|
-
})
|
|
1270
|
+
x: t.x,
|
|
1271
|
+
y: t.y
|
|
1272
|
+
}, m(() => {
|
|
1273
|
+
jo(), Un.value?.getMenuElement()?.querySelector("input, button:not(:disabled)")?.focus();
|
|
1274
|
+
});
|
|
1463
1275
|
}
|
|
1464
|
-
function
|
|
1465
|
-
let e =
|
|
1276
|
+
function jo() {
|
|
1277
|
+
let e = Un.value?.getMenuElement(), t = R.value;
|
|
1466
1278
|
if (!e || !t) return;
|
|
1467
|
-
let n = e
|
|
1468
|
-
|
|
1279
|
+
let n = _t(t.x, t.y, e);
|
|
1280
|
+
R.value = {
|
|
1469
1281
|
...t,
|
|
1470
|
-
x:
|
|
1471
|
-
y:
|
|
1282
|
+
x: n.x,
|
|
1283
|
+
y: n.y
|
|
1472
1284
|
};
|
|
1473
1285
|
}
|
|
1474
|
-
function
|
|
1475
|
-
let e =
|
|
1476
|
-
!e ||
|
|
1477
|
-
width: Ne(
|
|
1478
|
-
height: Ne(
|
|
1479
|
-
}) && (
|
|
1480
|
-
}
|
|
1481
|
-
function
|
|
1482
|
-
let e =
|
|
1483
|
-
!e ||
|
|
1286
|
+
function Mo() {
|
|
1287
|
+
let e = R.value;
|
|
1288
|
+
!e || V.value || (A.get(e.pageId)?.updateSelectedContentImage({
|
|
1289
|
+
width: Ne(Wn.value),
|
|
1290
|
+
height: Ne(Gn.value)
|
|
1291
|
+
}) && (z.value = "已更新图片尺寸"), $());
|
|
1292
|
+
}
|
|
1293
|
+
function No() {
|
|
1294
|
+
let e = R.value;
|
|
1295
|
+
!e || V.value || (A.get(e.pageId)?.updateSelectedContentImage({
|
|
1484
1296
|
width: void 0,
|
|
1485
1297
|
height: void 0
|
|
1486
|
-
}) && (
|
|
1298
|
+
}) && (z.value = "已恢复图片自然尺寸"), $());
|
|
1487
1299
|
}
|
|
1488
|
-
function
|
|
1489
|
-
e.type === "table" ?
|
|
1300
|
+
function Po(e) {
|
|
1301
|
+
e.type === "table" ? ko(e) : e.type === "image" ? Ao(e) : Do(e);
|
|
1490
1302
|
}
|
|
1491
1303
|
function $() {
|
|
1492
|
-
|
|
1304
|
+
I.value = void 0, L.value = void 0, R.value = void 0, Bn.value = !1, Vn.value = "";
|
|
1305
|
+
}
|
|
1306
|
+
function Fo(e) {
|
|
1307
|
+
!I.value && !L.value && !R.value || (e.target instanceof HTMLElement ? e.target : null)?.closest(".gd-contract-template-designer__context-menu") || $();
|
|
1493
1308
|
}
|
|
1494
|
-
function
|
|
1495
|
-
|
|
1309
|
+
function Io(e) {
|
|
1310
|
+
(e.target instanceof Element ? e.target : null)?.closest(".gd-contract-template-designer__context-menu") || $();
|
|
1496
1311
|
}
|
|
1497
|
-
function
|
|
1498
|
-
let t =
|
|
1312
|
+
function Lo(e) {
|
|
1313
|
+
let t = Qt.value;
|
|
1499
1314
|
if (!t || typeof document > "u") return !1;
|
|
1500
1315
|
let n = e.target instanceof Node ? e.target : void 0, r = document.activeElement;
|
|
1501
1316
|
return !!(n && t.contains(n) || r && t.contains(r) || n instanceof Element && n.closest(".gd-contract-template-designer__context-menu"));
|
|
1502
1317
|
}
|
|
1503
|
-
function
|
|
1318
|
+
function Ro(e) {
|
|
1319
|
+
if (e.key !== "Escape" || !N.value || typeof document > "u") return;
|
|
1320
|
+
let t = Qt.value?.querySelector(".gd-contract-template-designer__page-decorations-studio");
|
|
1321
|
+
if (!t) return;
|
|
1322
|
+
let n = e.target instanceof Element ? e.target : null, r = document.activeElement instanceof Element ? document.activeElement : null, i = !!(n?.closest(Jn) || r?.closest(Jn)), a = !!(n && t.contains(n) || r && t.contains(r)), o = !!t.querySelector(".ant-select-open, .ant-dropdown-open");
|
|
1323
|
+
if (i || a && o) {
|
|
1324
|
+
qn.add(e);
|
|
1325
|
+
return;
|
|
1326
|
+
}
|
|
1327
|
+
!(I.value || L.value || R.value || P.value || F.value || kn.value || Mn.value || Nn.value) && (a || e.target === document) && (e.preventDefault(), e.stopPropagation(), qa());
|
|
1328
|
+
}
|
|
1329
|
+
function zo(e) {
|
|
1504
1330
|
if ((e.ctrlKey || e.metaKey) && !e.altKey && e.key.toLowerCase() === "s") {
|
|
1505
|
-
if (
|
|
1506
|
-
e.preventDefault(),
|
|
1331
|
+
if (!$n.value || !Lo(e)) return;
|
|
1332
|
+
e.preventDefault(), Vr();
|
|
1507
1333
|
return;
|
|
1508
1334
|
}
|
|
1509
|
-
e.key === "Escape"
|
|
1335
|
+
if (e.key === "Escape") {
|
|
1336
|
+
if (qn.has(e)) {
|
|
1337
|
+
qn.delete(e);
|
|
1338
|
+
return;
|
|
1339
|
+
}
|
|
1340
|
+
let t = !!(I.value || L.value || R.value || P.value || F.value || kn.value || Mn.value || Nn.value), n = t || N.value;
|
|
1341
|
+
!t && N.value && qa(), $(), P.value = !1, F.value = !1, kn.value = !1, Mn.value = !1, Nn.value = !1, n && e.stopPropagation(), n || (Tn.value = !1);
|
|
1342
|
+
}
|
|
1510
1343
|
}
|
|
1511
|
-
function
|
|
1512
|
-
e ===
|
|
1513
|
-
let n =
|
|
1514
|
-
n &&
|
|
1515
|
-
...
|
|
1344
|
+
function Bo(e, t) {
|
|
1345
|
+
e === D.value && t.selectedContentImage && (T.value = "", E.value && Q());
|
|
1346
|
+
let n = An.value[e];
|
|
1347
|
+
n && ht(n, t) || (An.value = {
|
|
1348
|
+
...An.value,
|
|
1516
1349
|
[e]: t
|
|
1517
1350
|
});
|
|
1518
1351
|
}
|
|
1519
|
-
function
|
|
1520
|
-
|
|
1352
|
+
function Vo(e = Kn.value.rows, t = Kn.value.cols) {
|
|
1353
|
+
X({
|
|
1521
1354
|
type: "insert-table",
|
|
1522
1355
|
options: {
|
|
1523
1356
|
rows: Math.min(10, Math.max(1, Math.round(Number(e) || 3))),
|
|
1524
1357
|
cols: Math.min(10, Math.max(1, Math.round(Number(t) || 3))),
|
|
1525
|
-
withHeaderRow: !!
|
|
1358
|
+
withHeaderRow: !!Kn.value.withHeaderRow
|
|
1526
1359
|
}
|
|
1527
|
-
}),
|
|
1360
|
+
}), P.value = !1, $();
|
|
1528
1361
|
}
|
|
1529
|
-
let
|
|
1362
|
+
let Ho = {
|
|
1530
1363
|
"delete-table-row": {
|
|
1531
1364
|
label: "删除当前行",
|
|
1532
1365
|
countKey: "deleteRow"
|
|
@@ -1540,34 +1373,34 @@ var dn = { class: "gd-contract-template-designer__workspace-header" }, fn = { cl
|
|
|
1540
1373
|
countKey: "deleteTable"
|
|
1541
1374
|
}
|
|
1542
1375
|
};
|
|
1543
|
-
function
|
|
1544
|
-
let t =
|
|
1376
|
+
function Uo(e) {
|
|
1377
|
+
let t = L.value;
|
|
1545
1378
|
if (!t) return;
|
|
1546
1379
|
let n = () => {
|
|
1547
|
-
|
|
1548
|
-
}, r =
|
|
1380
|
+
X(e, t.pageId), $();
|
|
1381
|
+
}, r = Ho[e.type];
|
|
1549
1382
|
if (!r) {
|
|
1550
1383
|
n();
|
|
1551
1384
|
return;
|
|
1552
1385
|
}
|
|
1553
1386
|
let i = t.affectedVariableCounts[r.countKey];
|
|
1554
|
-
$(),
|
|
1387
|
+
$(), Ft.confirm({
|
|
1555
1388
|
title: r.label,
|
|
1556
1389
|
content: i ? `此操作将移除 ${i} 个正文变量节点,是否继续?` : "此操作将修改表格结构,是否继续?",
|
|
1557
1390
|
okText: "确认",
|
|
1558
1391
|
okType: "danger",
|
|
1559
1392
|
cancelText: "取消",
|
|
1560
1393
|
onOk: n,
|
|
1561
|
-
onCancel: () =>
|
|
1394
|
+
onCancel: () => A.get(t.pageId)?.focus()
|
|
1562
1395
|
});
|
|
1563
1396
|
}
|
|
1564
|
-
function
|
|
1565
|
-
let t =
|
|
1397
|
+
function Wo(e) {
|
|
1398
|
+
let t = Hn.value?.getMenuElement();
|
|
1566
1399
|
if (!t) return;
|
|
1567
1400
|
if (e.key === "Escape") {
|
|
1568
|
-
e.preventDefault();
|
|
1569
|
-
let t =
|
|
1570
|
-
$(),
|
|
1401
|
+
e.preventDefault(), e.stopPropagation();
|
|
1402
|
+
let t = L.value?.pageId;
|
|
1403
|
+
$(), A.get(t ?? "")?.focus();
|
|
1571
1404
|
return;
|
|
1572
1405
|
}
|
|
1573
1406
|
let n = Array.from(t.querySelectorAll("button:not(:disabled)"));
|
|
@@ -1585,120 +1418,122 @@ var dn = { class: "gd-contract-template-designer__workspace-header" }, fn = { cl
|
|
|
1585
1418
|
let r = (Math.max(0, n.indexOf(document.activeElement)) + (e.key === "ArrowUp" || e.key === "ArrowLeft" ? -1 : 1) + n.length) % n.length;
|
|
1586
1419
|
e.preventDefault(), n[r]?.focus();
|
|
1587
1420
|
}
|
|
1588
|
-
function
|
|
1421
|
+
function Go(e) {
|
|
1589
1422
|
if (e.key !== "Escape") return;
|
|
1590
|
-
e.preventDefault();
|
|
1591
|
-
let t =
|
|
1592
|
-
$(),
|
|
1423
|
+
e.preventDefault(), e.stopPropagation();
|
|
1424
|
+
let t = I.value?.pageId;
|
|
1425
|
+
$(), A.get(t ?? "")?.focus();
|
|
1593
1426
|
}
|
|
1594
|
-
function
|
|
1427
|
+
function Ko(e) {
|
|
1595
1428
|
if (e.key !== "Escape") return;
|
|
1596
|
-
e.preventDefault();
|
|
1597
|
-
let t =
|
|
1598
|
-
$(),
|
|
1599
|
-
}
|
|
1600
|
-
function
|
|
1601
|
-
|
|
1602
|
-
}
|
|
1603
|
-
return
|
|
1604
|
-
getValue:
|
|
1605
|
-
setValue:
|
|
1606
|
-
getFiles:
|
|
1607
|
-
setFiles:
|
|
1608
|
-
addFile:
|
|
1609
|
-
selectFile:
|
|
1610
|
-
renameFile:
|
|
1611
|
-
removeFile:
|
|
1612
|
-
moveFile:
|
|
1613
|
-
validate:
|
|
1614
|
-
exportTemplate:
|
|
1615
|
-
exportFiles:
|
|
1616
|
-
getSubmitData:
|
|
1617
|
-
clearTemplate:
|
|
1618
|
-
saveDraftCache:
|
|
1619
|
-
loadDraftCache:
|
|
1620
|
-
clearDraftCache:
|
|
1621
|
-
getDraftCacheStatus:
|
|
1622
|
-
insertVariable:
|
|
1623
|
-
insertImage:
|
|
1624
|
-
focus:
|
|
1625
|
-
openPreview:
|
|
1626
|
-
closePreview:
|
|
1627
|
-
openSubmitDataViewer:
|
|
1628
|
-
closeSubmitDataViewer:
|
|
1629
|
-
setServerValidationErrors:
|
|
1630
|
-
clearValidationErrors:
|
|
1631
|
-
scrollToVariable:
|
|
1632
|
-
scrollToSigningPlacement:
|
|
1633
|
-
scrollToPage:
|
|
1634
|
-
setZoom:
|
|
1635
|
-
resetZoom:
|
|
1636
|
-
getZoom:
|
|
1637
|
-
fitWidth:
|
|
1638
|
-
insertSigningPlacement:
|
|
1429
|
+
e.preventDefault(), e.stopPropagation();
|
|
1430
|
+
let t = R.value?.pageId;
|
|
1431
|
+
$(), A.get(t ?? "")?.focus();
|
|
1432
|
+
}
|
|
1433
|
+
function qo(e) {
|
|
1434
|
+
X({ type: e }), F.value = !1, $();
|
|
1435
|
+
}
|
|
1436
|
+
return Ge({
|
|
1437
|
+
getValue: Ja,
|
|
1438
|
+
setValue: Ya,
|
|
1439
|
+
getFiles: Xa,
|
|
1440
|
+
setFiles: Za,
|
|
1441
|
+
addFile: Qa,
|
|
1442
|
+
selectFile: $a,
|
|
1443
|
+
renameFile: eo,
|
|
1444
|
+
removeFile: to,
|
|
1445
|
+
moveFile: ro,
|
|
1446
|
+
validate: io,
|
|
1447
|
+
exportTemplate: so,
|
|
1448
|
+
exportFiles: co,
|
|
1449
|
+
getSubmitData: Fa,
|
|
1450
|
+
clearTemplate: Ra,
|
|
1451
|
+
saveDraftCache: Vr,
|
|
1452
|
+
loadDraftCache: Hr,
|
|
1453
|
+
clearDraftCache: Ur,
|
|
1454
|
+
getDraftCacheStatus: _i,
|
|
1455
|
+
insertVariable: ma,
|
|
1456
|
+
insertImage: Gi,
|
|
1457
|
+
focus: go,
|
|
1458
|
+
openPreview: Na,
|
|
1459
|
+
closePreview: Pa,
|
|
1460
|
+
openSubmitDataViewer: Ia,
|
|
1461
|
+
closeSubmitDataViewer: La,
|
|
1462
|
+
setServerValidationErrors: mo,
|
|
1463
|
+
clearValidationErrors: ho,
|
|
1464
|
+
scrollToVariable: Ha,
|
|
1465
|
+
scrollToSigningPlacement: Ua,
|
|
1466
|
+
scrollToPage: Ga,
|
|
1467
|
+
setZoom: Da,
|
|
1468
|
+
resetZoom: Oa,
|
|
1469
|
+
getZoom: ka,
|
|
1470
|
+
fitWidth: wa,
|
|
1471
|
+
insertSigningPlacement: Nr,
|
|
1639
1472
|
selectSigningPlacement: Q,
|
|
1640
|
-
buildLocationRules:
|
|
1641
|
-
buildContractLocationRules:
|
|
1642
|
-
}), (e, t) => (
|
|
1473
|
+
buildLocationRules: uo,
|
|
1474
|
+
buildContractLocationRules: fo
|
|
1475
|
+
}), (e, t) => (h(), St("div", {
|
|
1643
1476
|
ref_key: "designerElement",
|
|
1644
|
-
ref:
|
|
1645
|
-
class:
|
|
1646
|
-
"is-disabled":
|
|
1647
|
-
"is-readonly":
|
|
1648
|
-
"is-fullscreen":
|
|
1477
|
+
ref: Qt,
|
|
1478
|
+
class: Tt(["gd-contract-template-designer", {
|
|
1479
|
+
"is-disabled": s.disabled,
|
|
1480
|
+
"is-readonly": V.value,
|
|
1481
|
+
"is-fullscreen": Tn.value
|
|
1649
1482
|
}]),
|
|
1650
|
-
style:
|
|
1483
|
+
style: Et(Zt.value)
|
|
1651
1484
|
}, [
|
|
1652
|
-
|
|
1485
|
+
y.value ? (h(), bt(dt, {
|
|
1653
1486
|
key: 0,
|
|
1654
|
-
files:
|
|
1655
|
-
"active-file-id":
|
|
1656
|
-
readonly:
|
|
1657
|
-
onSelect:
|
|
1658
|
-
onAdd: t[0] ||= (e) =>
|
|
1659
|
-
onRename:
|
|
1660
|
-
onRemove:
|
|
1661
|
-
onMove:
|
|
1487
|
+
files: b.value,
|
|
1488
|
+
"active-file-id": x.value,
|
|
1489
|
+
readonly: V.value,
|
|
1490
|
+
onSelect: $a,
|
|
1491
|
+
onAdd: t[0] ||= (e) => Qa(),
|
|
1492
|
+
onRename: eo,
|
|
1493
|
+
onRemove: no,
|
|
1494
|
+
onMove: ro
|
|
1662
1495
|
}, null, 8, [
|
|
1663
1496
|
"files",
|
|
1664
1497
|
"active-file-id",
|
|
1665
1498
|
"readonly"
|
|
1666
|
-
])) :
|
|
1667
|
-
|
|
1668
|
-
"is-sidebar-collapsed":
|
|
1669
|
-
"is-inspector-collapsed":
|
|
1499
|
+
])) : xt("", !0),
|
|
1500
|
+
Ct("div", { class: Tt(["gd-contract-template-designer__layout", {
|
|
1501
|
+
"is-sidebar-collapsed": En.value,
|
|
1502
|
+
"is-inspector-collapsed": Dn.value
|
|
1670
1503
|
}]) }, [
|
|
1671
|
-
|
|
1672
|
-
collapsed:
|
|
1673
|
-
pages:
|
|
1674
|
-
variables:
|
|
1675
|
-
"
|
|
1676
|
-
"
|
|
1677
|
-
"
|
|
1678
|
-
"selected-
|
|
1679
|
-
"
|
|
1680
|
-
"
|
|
1504
|
+
wt(ft, {
|
|
1505
|
+
collapsed: En.value,
|
|
1506
|
+
pages: w.value.pages,
|
|
1507
|
+
variables: w.value.variables,
|
|
1508
|
+
"decoration-variable-keys": Mr.value,
|
|
1509
|
+
"signing-placement-navigation-items": or.value,
|
|
1510
|
+
"active-page-id": D.value,
|
|
1511
|
+
"selected-variable-key": T.value,
|
|
1512
|
+
"selected-signing-placement-id": E.value,
|
|
1513
|
+
"normalized-max-pages": Ar.value,
|
|
1514
|
+
"page-limit-reached": jr.value,
|
|
1681
1515
|
"selected-page": W.value,
|
|
1682
|
-
"selected-page-size":
|
|
1683
|
-
"normalized-page-size-options":
|
|
1684
|
-
"page-size-options":
|
|
1685
|
-
"selected-page-size-option-value":
|
|
1516
|
+
"selected-page-size": cr.value,
|
|
1517
|
+
"normalized-page-size-options": wr.value,
|
|
1518
|
+
"page-size-options": Tr.value,
|
|
1519
|
+
"selected-page-size-option-value": Er.value,
|
|
1686
1520
|
"show-signing-placement-tools": l.showSigningPlacementTools,
|
|
1687
|
-
readonly:
|
|
1688
|
-
"get-page-size":
|
|
1689
|
-
"get-page-signing-placements":
|
|
1690
|
-
onToggle: t[1] ||= (e) =>
|
|
1691
|
-
onAddPage:
|
|
1692
|
-
onActivatePage:
|
|
1693
|
-
onDuplicatePage:
|
|
1694
|
-
onRemovePage:
|
|
1695
|
-
onPatchPageFormat:
|
|
1696
|
-
onScrollToVariable:
|
|
1697
|
-
onScrollToSigningPlacement:
|
|
1521
|
+
readonly: V.value,
|
|
1522
|
+
"get-page-size": Z,
|
|
1523
|
+
"get-page-signing-placements": Ci,
|
|
1524
|
+
onToggle: t[1] ||= (e) => En.value = !En.value,
|
|
1525
|
+
onAddPage: ji,
|
|
1526
|
+
onActivatePage: Wa,
|
|
1527
|
+
onDuplicatePage: Mi,
|
|
1528
|
+
onRemovePage: Pi,
|
|
1529
|
+
onPatchPageFormat: ki,
|
|
1530
|
+
onScrollToVariable: Va,
|
|
1531
|
+
onScrollToSigningPlacement: Ua
|
|
1698
1532
|
}, null, 8, [
|
|
1699
1533
|
"collapsed",
|
|
1700
1534
|
"pages",
|
|
1701
1535
|
"variables",
|
|
1536
|
+
"decoration-variable-keys",
|
|
1702
1537
|
"signing-placement-navigation-items",
|
|
1703
1538
|
"active-page-id",
|
|
1704
1539
|
"selected-variable-key",
|
|
@@ -1713,749 +1548,182 @@ var dn = { class: "gd-contract-template-designer__workspace-header" }, fn = { cl
|
|
|
1713
1548
|
"show-signing-placement-tools",
|
|
1714
1549
|
"readonly"
|
|
1715
1550
|
]),
|
|
1716
|
-
|
|
1551
|
+
Ct("main", {
|
|
1717
1552
|
ref_key: "workspaceElement",
|
|
1718
|
-
ref:
|
|
1553
|
+
ref: en,
|
|
1719
1554
|
class: "gd-contract-template-designer__workspace"
|
|
1720
1555
|
}, [
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
}, {
|
|
1847
|
-
default: T(() => [_(w(Vt), { "aria-hidden": "true" })]),
|
|
1848
|
-
_: 1
|
|
1849
|
-
})]),
|
|
1850
|
-
_: 1
|
|
1851
|
-
})) : p("", !0)
|
|
1852
|
-
])])]),
|
|
1853
|
-
h("header", _n, [h("div", {
|
|
1854
|
-
ref_key: "toolbarMainElement",
|
|
1855
|
-
ref: Pr,
|
|
1856
|
-
class: "gd-contract-template-designer__toolbar-section gd-contract-template-designer__toolbar-section--main"
|
|
1857
|
-
}, [
|
|
1858
|
-
h("div", vn, [_(w(D), { title: "撤销" }, {
|
|
1859
|
-
default: T(() => [_(w(E), {
|
|
1860
|
-
size: "small",
|
|
1861
|
-
class: "gd-contract-template-designer__icon-button",
|
|
1862
|
-
disabled: H.value || !G.value.canUndo,
|
|
1863
|
-
"aria-label": "撤销",
|
|
1864
|
-
onClick: t[2] ||= (e) => J({ type: "undo" })
|
|
1865
|
-
}, {
|
|
1866
|
-
default: T(() => [_(w(sn), { "aria-hidden": "true" })]),
|
|
1867
|
-
_: 1
|
|
1868
|
-
}, 8, ["disabled"])]),
|
|
1869
|
-
_: 1
|
|
1870
|
-
}), _(w(D), { title: "重做" }, {
|
|
1871
|
-
default: T(() => [_(w(E), {
|
|
1872
|
-
size: "small",
|
|
1873
|
-
class: "gd-contract-template-designer__icon-button",
|
|
1874
|
-
disabled: H.value || !G.value.canRedo,
|
|
1875
|
-
"aria-label": "重做",
|
|
1876
|
-
onClick: t[3] ||= (e) => J({ type: "redo" })
|
|
1877
|
-
}, {
|
|
1878
|
-
default: T(() => [_(w(tn), { "aria-hidden": "true" })]),
|
|
1879
|
-
_: 1
|
|
1880
|
-
}, 8, ["disabled"])]),
|
|
1881
|
-
_: 1
|
|
1882
|
-
})]),
|
|
1883
|
-
h("div", yn, [_(w(At), {
|
|
1884
|
-
value: gi.value,
|
|
1885
|
-
"onUpdate:value": t[4] ||= (e) => gi.value = e,
|
|
1886
|
-
class: "gd-contract-template-designer__toolbar-select",
|
|
1887
|
-
options: aa.value,
|
|
1888
|
-
placeholder: "合同样式",
|
|
1889
|
-
disabled: H.value,
|
|
1890
|
-
onChange: _c
|
|
1891
|
-
}, null, 8, [
|
|
1892
|
-
"value",
|
|
1893
|
-
"options",
|
|
1894
|
-
"disabled"
|
|
1895
|
-
]), _(w(At), {
|
|
1896
|
-
class: "gd-contract-template-designer__toolbar-select",
|
|
1897
|
-
value: xa.value,
|
|
1898
|
-
options: sa,
|
|
1899
|
-
disabled: H.value,
|
|
1900
|
-
onChange: cc
|
|
1901
|
-
}, null, 8, ["value", "disabled"])]),
|
|
1902
|
-
h("div", bn, [
|
|
1903
|
-
_(w(D), { title: "加粗" }, {
|
|
1904
|
-
default: T(() => [_(w(E), {
|
|
1905
|
-
size: "small",
|
|
1906
|
-
class: "gd-contract-template-designer__icon-button",
|
|
1907
|
-
type: G.value.isBold ? "primary" : "default",
|
|
1908
|
-
disabled: H.value,
|
|
1909
|
-
"aria-label": "加粗",
|
|
1910
|
-
onClick: t[5] ||= (e) => J({ type: "toggle-bold" })
|
|
1911
|
-
}, {
|
|
1912
|
-
default: T(() => [_(w(Lt), { "aria-hidden": "true" })]),
|
|
1913
|
-
_: 1
|
|
1914
|
-
}, 8, ["type", "disabled"])]),
|
|
1915
|
-
_: 1
|
|
1916
|
-
}),
|
|
1917
|
-
_(w(D), { title: "斜体" }, {
|
|
1918
|
-
default: T(() => [_(w(E), {
|
|
1919
|
-
size: "small",
|
|
1920
|
-
class: "gd-contract-template-designer__icon-button",
|
|
1921
|
-
type: G.value.isItalic ? "primary" : "default",
|
|
1922
|
-
disabled: H.value,
|
|
1923
|
-
"aria-label": "斜体",
|
|
1924
|
-
onClick: t[6] ||= (e) => J({ type: "toggle-italic" })
|
|
1925
|
-
}, {
|
|
1926
|
-
default: T(() => [_(w(Xt), { "aria-hidden": "true" })]),
|
|
1927
|
-
_: 1
|
|
1928
|
-
}, 8, ["type", "disabled"])]),
|
|
1929
|
-
_: 1
|
|
1930
|
-
}),
|
|
1931
|
-
_(w(D), { title: "下划线" }, {
|
|
1932
|
-
default: T(() => [_(w(E), {
|
|
1933
|
-
size: "small",
|
|
1934
|
-
class: "gd-contract-template-designer__icon-button",
|
|
1935
|
-
type: G.value.isUnderline ? "primary" : "default",
|
|
1936
|
-
disabled: H.value,
|
|
1937
|
-
"aria-label": "下划线",
|
|
1938
|
-
onClick: t[7] ||= (e) => J({ type: "toggle-underline" })
|
|
1939
|
-
}, {
|
|
1940
|
-
default: T(() => [_(w(on), { "aria-hidden": "true" })]),
|
|
1941
|
-
_: 1
|
|
1942
|
-
}, 8, ["type", "disabled"])]),
|
|
1943
|
-
_: 1
|
|
1944
|
-
}),
|
|
1945
|
-
_(w(D), { title: "编号列表" }, {
|
|
1946
|
-
default: T(() => [_(w(E), {
|
|
1947
|
-
size: "small",
|
|
1948
|
-
class: "gd-contract-template-designer__icon-button",
|
|
1949
|
-
type: G.value.isOrderedList ? "primary" : "default",
|
|
1950
|
-
disabled: H.value,
|
|
1951
|
-
"aria-label": "编号列表",
|
|
1952
|
-
onClick: t[8] ||= (e) => J({ type: "toggle-ordered-list" })
|
|
1953
|
-
}, {
|
|
1954
|
-
default: T(() => [_(w(Qt), { "aria-hidden": "true" })]),
|
|
1955
|
-
_: 1
|
|
1956
|
-
}, 8, ["type", "disabled"])]),
|
|
1957
|
-
_: 1
|
|
1958
|
-
}),
|
|
1959
|
-
_(w(D), { title: "项目列表" }, {
|
|
1960
|
-
default: T(() => [_(w(E), {
|
|
1961
|
-
size: "small",
|
|
1962
|
-
class: "gd-contract-template-designer__icon-button",
|
|
1963
|
-
type: G.value.isBulletList ? "primary" : "default",
|
|
1964
|
-
disabled: H.value,
|
|
1965
|
-
"aria-label": "项目列表",
|
|
1966
|
-
onClick: t[9] ||= (e) => J({ type: "toggle-bullet-list" })
|
|
1967
|
-
}, {
|
|
1968
|
-
default: T(() => [_(w(cn), { "aria-hidden": "true" })]),
|
|
1969
|
-
_: 1
|
|
1970
|
-
}, 8, ["type", "disabled"])]),
|
|
1971
|
-
_: 1
|
|
1972
|
-
})
|
|
1973
|
-
]),
|
|
1974
|
-
(x(), f(ht, {
|
|
1975
|
-
disabled: !ms("insert") || !Ir.value,
|
|
1976
|
-
to: Ir.value || "body"
|
|
1977
|
-
}, [h("div", xn, [
|
|
1978
|
-
_(w(kt), {
|
|
1979
|
-
open: bi.value,
|
|
1980
|
-
"onUpdate:open": t[10] ||= (e) => bi.value = e,
|
|
1981
|
-
trigger: "click",
|
|
1982
|
-
placement: "bottom"
|
|
1983
|
-
}, {
|
|
1984
|
-
content: T(() => [h("div", Sn, [t[62] ||= h("strong", null, "插入正文控件", -1), h("div", Cn, [(x(!0), m(mt, null, yt(ha.value, (e) => (x(), f(w(D), {
|
|
1985
|
-
key: e.type,
|
|
1986
|
-
title: `插入${e.label}控件`
|
|
1987
|
-
}, {
|
|
1988
|
-
default: T(() => [h("button", {
|
|
1989
|
-
type: "button",
|
|
1990
|
-
class: "gd-contract-template-designer__text-menu-control-option",
|
|
1991
|
-
"aria-label": `插入${e.label}控件`,
|
|
1992
|
-
onClick: (t) => Fo(e.type)
|
|
1993
|
-
}, [(x(), f(bt(e.icon), { "aria-hidden": "true" })), h("span", null, C(e.label), 1)], 8, wn)]),
|
|
1994
|
-
_: 2
|
|
1995
|
-
}, 1032, ["title"]))), 128))])])]),
|
|
1996
|
-
default: T(() => [_(w(D), { title: "插入正文控件" }, {
|
|
1997
|
-
default: T(() => [_(w(E), {
|
|
1998
|
-
size: "small",
|
|
1999
|
-
class: "gd-contract-template-designer__icon-button",
|
|
2000
|
-
disabled: H.value,
|
|
2001
|
-
"aria-label": "插入正文控件"
|
|
2002
|
-
}, {
|
|
2003
|
-
default: T(() => [_(w(en), { "aria-hidden": "true" })]),
|
|
2004
|
-
_: 1
|
|
2005
|
-
}, 8, ["disabled"])]),
|
|
2006
|
-
_: 1
|
|
2007
|
-
})]),
|
|
2008
|
-
_: 1
|
|
2009
|
-
}, 8, ["open"]),
|
|
2010
|
-
_(w(kt), {
|
|
2011
|
-
open: xi.value,
|
|
2012
|
-
"onUpdate:open": t[14] ||= (e) => xi.value = e,
|
|
2013
|
-
trigger: "click",
|
|
2014
|
-
placement: "bottom"
|
|
2015
|
-
}, {
|
|
2016
|
-
content: T(() => [h("div", Tn, [
|
|
2017
|
-
t[67] ||= h("strong", null, "插入正文图片", -1),
|
|
2018
|
-
_(w(E), {
|
|
2019
|
-
block: "",
|
|
2020
|
-
loading: Ei.value,
|
|
2021
|
-
disabled: H.value,
|
|
2022
|
-
onClick: Mo
|
|
2023
|
-
}, {
|
|
2024
|
-
default: T(() => [_(w($t), { "aria-hidden": "true" }), t[63] ||= g(" 本地图片 ", -1)]),
|
|
2025
|
-
_: 1
|
|
2026
|
-
}, 8, ["loading", "disabled"]),
|
|
2027
|
-
_(w(Et), {
|
|
2028
|
-
value: Si.value,
|
|
2029
|
-
"onUpdate:value": t[11] ||= (e) => Si.value = e,
|
|
2030
|
-
"allow-clear": "",
|
|
2031
|
-
disabled: H.value || Ei.value,
|
|
2032
|
-
placeholder: "https:// 或 data:image/...",
|
|
2033
|
-
"aria-label": "图片 URL",
|
|
2034
|
-
onPressEnter: Po
|
|
2035
|
-
}, null, 8, ["value", "disabled"]),
|
|
2036
|
-
h("div", En, [h("label", null, [t[64] ||= h("span", null, "宽度", -1), _(w(Dt), {
|
|
2037
|
-
value: Ci.value,
|
|
2038
|
-
"onUpdate:value": t[12] ||= (e) => Ci.value = e,
|
|
2039
|
-
min: w(16),
|
|
2040
|
-
max: w(Me),
|
|
2041
|
-
disabled: H.value || Ei.value,
|
|
2042
|
-
placeholder: "自然",
|
|
2043
|
-
"aria-label": "图片宽度"
|
|
2044
|
-
}, null, 8, [
|
|
2045
|
-
"value",
|
|
2046
|
-
"min",
|
|
2047
|
-
"max",
|
|
2048
|
-
"disabled"
|
|
2049
|
-
])]), h("label", null, [t[65] ||= h("span", null, "高度", -1), _(w(Dt), {
|
|
2050
|
-
value: wi.value,
|
|
2051
|
-
"onUpdate:value": t[13] ||= (e) => wi.value = e,
|
|
2052
|
-
min: w(16),
|
|
2053
|
-
max: w(Me),
|
|
2054
|
-
disabled: H.value || Ei.value,
|
|
2055
|
-
placeholder: "自然",
|
|
2056
|
-
"aria-label": "图片高度"
|
|
2057
|
-
}, null, 8, [
|
|
2058
|
-
"value",
|
|
2059
|
-
"min",
|
|
2060
|
-
"max",
|
|
2061
|
-
"disabled"
|
|
2062
|
-
])])]),
|
|
2063
|
-
_(w(E), {
|
|
2064
|
-
type: "primary",
|
|
2065
|
-
block: "",
|
|
2066
|
-
disabled: H.value || Ei.value || !Si.value.trim(),
|
|
2067
|
-
onClick: Po
|
|
2068
|
-
}, {
|
|
2069
|
-
default: T(() => [...t[66] ||= [g(" 插入 URL ", -1)]]),
|
|
2070
|
-
_: 1
|
|
2071
|
-
}, 8, ["disabled"]),
|
|
2072
|
-
Ti.value ? (x(), f(w(Tt), {
|
|
2073
|
-
key: 0,
|
|
2074
|
-
type: "error",
|
|
2075
|
-
"show-icon": "",
|
|
2076
|
-
message: Ti.value
|
|
2077
|
-
}, null, 8, ["message"])) : p("", !0)
|
|
2078
|
-
])]),
|
|
2079
|
-
default: T(() => [_(w(D), { title: "插入图片" }, {
|
|
2080
|
-
default: T(() => [_(w(E), {
|
|
2081
|
-
size: "small",
|
|
2082
|
-
class: "gd-contract-template-designer__icon-button",
|
|
2083
|
-
disabled: H.value,
|
|
2084
|
-
"aria-label": "插入图片"
|
|
2085
|
-
}, {
|
|
2086
|
-
default: T(() => [_(w($t), { "aria-hidden": "true" })]),
|
|
2087
|
-
_: 1
|
|
2088
|
-
}, 8, ["disabled"])]),
|
|
2089
|
-
_: 1
|
|
2090
|
-
})]),
|
|
2091
|
-
_: 1
|
|
2092
|
-
}, 8, ["open"]),
|
|
2093
|
-
_(w(D), { title: "插入分隔线" }, {
|
|
2094
|
-
default: T(() => [_(w(E), {
|
|
2095
|
-
size: "small",
|
|
2096
|
-
class: "gd-contract-template-designer__icon-button",
|
|
2097
|
-
disabled: H.value,
|
|
2098
|
-
"aria-label": "插入分隔线",
|
|
2099
|
-
onClick: t[15] ||= (e) => J({ type: "insert-horizontal-rule" })
|
|
2100
|
-
}, {
|
|
2101
|
-
default: T(() => [_(w(Zt), { "aria-hidden": "true" })]),
|
|
2102
|
-
_: 1
|
|
2103
|
-
}, 8, ["disabled"])]),
|
|
2104
|
-
_: 1
|
|
2105
|
-
}),
|
|
2106
|
-
_(w(D), { title: _a.value ? `已达 ${ga.value} 页上限` : "新增页面" }, {
|
|
2107
|
-
default: T(() => [_(w(E), {
|
|
2108
|
-
size: "small",
|
|
2109
|
-
class: "gd-contract-template-designer__icon-button",
|
|
2110
|
-
disabled: H.value || _a.value,
|
|
2111
|
-
"aria-label": "新增页面",
|
|
2112
|
-
onClick: _o
|
|
2113
|
-
}, {
|
|
2114
|
-
default: T(() => [_(w(Kt), { "aria-hidden": "true" })]),
|
|
2115
|
-
_: 1
|
|
2116
|
-
}, 8, ["disabled"])]),
|
|
2117
|
-
_: 1
|
|
2118
|
-
}, 8, ["title"])
|
|
2119
|
-
])], 8, ["disabled", "to"])),
|
|
2120
|
-
(x(), f(ht, {
|
|
2121
|
-
disabled: !ms("typography") || !Lr.value,
|
|
2122
|
-
to: Lr.value || "body"
|
|
2123
|
-
}, [h("div", Dn, [
|
|
2124
|
-
_(w(At), {
|
|
2125
|
-
class: "gd-contract-template-designer__toolbar-select is-wide",
|
|
2126
|
-
value: Sa.value,
|
|
2127
|
-
options: ia.value,
|
|
2128
|
-
disabled: H.value,
|
|
2129
|
-
onChange: uc
|
|
2130
|
-
}, null, 8, [
|
|
2131
|
-
"value",
|
|
2132
|
-
"options",
|
|
2133
|
-
"disabled"
|
|
2134
|
-
]),
|
|
2135
|
-
_(w(At), {
|
|
2136
|
-
class: "gd-contract-template-designer__toolbar-select",
|
|
2137
|
-
value: Ca.value,
|
|
2138
|
-
options: Ea.value,
|
|
2139
|
-
"show-search": "",
|
|
2140
|
-
"filter-option": !1,
|
|
2141
|
-
"search-value": _i.value,
|
|
2142
|
-
disabled: H.value,
|
|
2143
|
-
onBlur: mc,
|
|
2144
|
-
onChange: lc,
|
|
2145
|
-
onDropdownVisibleChange: gc,
|
|
2146
|
-
onInputKeyDown: hc,
|
|
2147
|
-
onSearch: pc
|
|
2148
|
-
}, null, 8, [
|
|
2149
|
-
"value",
|
|
2150
|
-
"options",
|
|
2151
|
-
"search-value",
|
|
2152
|
-
"disabled"
|
|
2153
|
-
]),
|
|
2154
|
-
h("input", {
|
|
2155
|
-
class: "gd-contract-template-designer__color",
|
|
2156
|
-
type: "color",
|
|
2157
|
-
value: wa.value,
|
|
2158
|
-
disabled: H.value,
|
|
2159
|
-
onInput: dc
|
|
2160
|
-
}, null, 40, On),
|
|
2161
|
-
_(w(D), { title: "左对齐" }, {
|
|
2162
|
-
default: T(() => [_(w(E), {
|
|
2163
|
-
size: "small",
|
|
2164
|
-
class: b(["gd-contract-template-designer__icon-button", { "is-selected": G.value.textAlign === "left" }]),
|
|
2165
|
-
type: G.value.textAlign === "left" ? "primary" : "default",
|
|
2166
|
-
disabled: H.value,
|
|
2167
|
-
"aria-label": "左对齐",
|
|
2168
|
-
onClick: t[16] ||= (e) => sc("left")
|
|
2169
|
-
}, {
|
|
2170
|
-
default: T(() => [_(w(Pt), { "aria-hidden": "true" })]),
|
|
2171
|
-
_: 1
|
|
2172
|
-
}, 8, [
|
|
2173
|
-
"class",
|
|
2174
|
-
"type",
|
|
2175
|
-
"disabled"
|
|
2176
|
-
])]),
|
|
2177
|
-
_: 1
|
|
2178
|
-
}),
|
|
2179
|
-
_(w(D), { title: "居中对齐" }, {
|
|
2180
|
-
default: T(() => [_(w(E), {
|
|
2181
|
-
size: "small",
|
|
2182
|
-
class: b(["gd-contract-template-designer__icon-button", { "is-selected": G.value.textAlign === "center" }]),
|
|
2183
|
-
type: G.value.textAlign === "center" ? "primary" : "default",
|
|
2184
|
-
disabled: H.value,
|
|
2185
|
-
"aria-label": "居中对齐",
|
|
2186
|
-
onClick: t[17] ||= (e) => sc("center")
|
|
2187
|
-
}, {
|
|
2188
|
-
default: T(() => [_(w(Nt), { "aria-hidden": "true" })]),
|
|
2189
|
-
_: 1
|
|
2190
|
-
}, 8, [
|
|
2191
|
-
"class",
|
|
2192
|
-
"type",
|
|
2193
|
-
"disabled"
|
|
2194
|
-
])]),
|
|
2195
|
-
_: 1
|
|
2196
|
-
}),
|
|
2197
|
-
_(w(D), { title: "右对齐" }, {
|
|
2198
|
-
default: T(() => [_(w(E), {
|
|
2199
|
-
size: "small",
|
|
2200
|
-
class: b(["gd-contract-template-designer__icon-button", { "is-selected": G.value.textAlign === "right" }]),
|
|
2201
|
-
type: G.value.textAlign === "right" ? "primary" : "default",
|
|
2202
|
-
disabled: H.value,
|
|
2203
|
-
"aria-label": "右对齐",
|
|
2204
|
-
onClick: t[18] ||= (e) => sc("right")
|
|
2205
|
-
}, {
|
|
2206
|
-
default: T(() => [_(w(Ft), { "aria-hidden": "true" })]),
|
|
2207
|
-
_: 1
|
|
2208
|
-
}, 8, [
|
|
2209
|
-
"class",
|
|
2210
|
-
"type",
|
|
2211
|
-
"disabled"
|
|
2212
|
-
])]),
|
|
2213
|
-
_: 1
|
|
2214
|
-
})
|
|
2215
|
-
])], 8, ["disabled", "to"])),
|
|
2216
|
-
(x(), f(ht, {
|
|
2217
|
-
disabled: !ms("cleanup") || !Rr.value,
|
|
2218
|
-
to: Rr.value || "body"
|
|
2219
|
-
}, [h("div", kn, [_(w(D), { title: "清文字" }, {
|
|
2220
|
-
default: T(() => [_(w(E), {
|
|
2221
|
-
size: "small",
|
|
2222
|
-
class: "gd-contract-template-designer__icon-button",
|
|
2223
|
-
disabled: H.value,
|
|
2224
|
-
"aria-label": "清文字",
|
|
2225
|
-
onClick: t[19] ||= (e) => J({ type: "clear-text-format" })
|
|
2226
|
-
}, {
|
|
2227
|
-
default: T(() => [_(w(Rt), { "aria-hidden": "true" })]),
|
|
2228
|
-
_: 1
|
|
2229
|
-
}, 8, ["disabled"])]),
|
|
2230
|
-
_: 1
|
|
2231
|
-
}), _(w(D), { title: "清段落" }, {
|
|
2232
|
-
default: T(() => [_(w(E), {
|
|
2233
|
-
size: "small",
|
|
2234
|
-
class: "gd-contract-template-designer__icon-button",
|
|
2235
|
-
disabled: H.value,
|
|
2236
|
-
"aria-label": "清段落",
|
|
2237
|
-
onClick: t[20] ||= (e) => J({ type: "clear-block-format" })
|
|
2238
|
-
}, {
|
|
2239
|
-
default: T(() => [_(w(qt), { "aria-hidden": "true" })]),
|
|
2240
|
-
_: 1
|
|
2241
|
-
}, 8, ["disabled"])]),
|
|
2242
|
-
_: 1
|
|
2243
|
-
})])], 8, ["disabled", "to"])),
|
|
2244
|
-
(x(), f(ht, {
|
|
2245
|
-
disabled: !ms("table") || !zr.value,
|
|
2246
|
-
to: zr.value || "body"
|
|
2247
|
-
}, [h("div", An, [_(w(kt), {
|
|
2248
|
-
open: vi.value,
|
|
2249
|
-
"onUpdate:open": t[24] ||= (e) => vi.value = e,
|
|
2250
|
-
trigger: "click",
|
|
2251
|
-
placement: "bottom"
|
|
2252
|
-
}, {
|
|
2253
|
-
content: T(() => [h("div", jn, [
|
|
2254
|
-
t[69] ||= h("strong", null, "插入表格", -1),
|
|
2255
|
-
_(Be, {
|
|
2256
|
-
disabled: H.value,
|
|
2257
|
-
onSelect: t[21] ||= (e) => Ac(e.rows, e.cols),
|
|
2258
|
-
onClose: t[22] ||= (e) => vi.value = !1
|
|
2259
|
-
}, null, 8, ["disabled"]),
|
|
2260
|
-
h("label", Mn, [t[68] ||= h("span", null, "表头行", -1), _(w(jt), {
|
|
2261
|
-
checked: Ii.value.withHeaderRow,
|
|
2262
|
-
"onUpdate:checked": t[23] ||= (e) => Ii.value.withHeaderRow = e,
|
|
2263
|
-
disabled: H.value
|
|
2264
|
-
}, null, 8, ["checked", "disabled"])])
|
|
2265
|
-
])]),
|
|
2266
|
-
default: T(() => [_(w(D), { title: "插入表格" }, {
|
|
2267
|
-
default: T(() => [_(w(E), {
|
|
2268
|
-
size: "small",
|
|
2269
|
-
class: "gd-contract-template-designer__icon-button",
|
|
2270
|
-
disabled: H.value,
|
|
2271
|
-
"aria-label": "插入表格"
|
|
2272
|
-
}, {
|
|
2273
|
-
default: T(() => [_(w(an), { "aria-hidden": "true" })]),
|
|
2274
|
-
_: 1
|
|
2275
|
-
}, 8, ["disabled"])]),
|
|
2276
|
-
_: 1
|
|
2277
|
-
})]),
|
|
2278
|
-
_: 1
|
|
2279
|
-
}, 8, ["open"]), _(w(kt), {
|
|
2280
|
-
open: yi.value,
|
|
2281
|
-
"onUpdate:open": t[34] ||= (e) => yi.value = e,
|
|
2282
|
-
trigger: "click",
|
|
2283
|
-
placement: "bottom"
|
|
2284
|
-
}, {
|
|
2285
|
-
content: T(() => [h("div", Nn, [t[79] ||= h("strong", null, "表格操作", -1), h("div", Pn, [
|
|
2286
|
-
_(w(E), {
|
|
2287
|
-
size: "small",
|
|
2288
|
-
disabled: H.value,
|
|
2289
|
-
onClick: t[25] ||= (e) => Ic("add-table-row-before")
|
|
2290
|
-
}, {
|
|
2291
|
-
default: T(() => [...t[70] ||= [g(" 上方插行 ", -1)]]),
|
|
2292
|
-
_: 1
|
|
2293
|
-
}, 8, ["disabled"]),
|
|
2294
|
-
_(w(E), {
|
|
2295
|
-
size: "small",
|
|
2296
|
-
disabled: H.value,
|
|
2297
|
-
onClick: t[26] ||= (e) => Ic("add-table-row-after")
|
|
2298
|
-
}, {
|
|
2299
|
-
default: T(() => [...t[71] ||= [g(" 下方插行 ", -1)]]),
|
|
2300
|
-
_: 1
|
|
2301
|
-
}, 8, ["disabled"]),
|
|
2302
|
-
_(w(E), {
|
|
2303
|
-
size: "small",
|
|
2304
|
-
disabled: H.value,
|
|
2305
|
-
onClick: t[27] ||= (e) => Ic("add-table-column-before")
|
|
2306
|
-
}, {
|
|
2307
|
-
default: T(() => [...t[72] ||= [g(" 左侧插列 ", -1)]]),
|
|
2308
|
-
_: 1
|
|
2309
|
-
}, 8, ["disabled"]),
|
|
2310
|
-
_(w(E), {
|
|
2311
|
-
size: "small",
|
|
2312
|
-
disabled: H.value,
|
|
2313
|
-
onClick: t[28] ||= (e) => Ic("add-table-column-after")
|
|
2314
|
-
}, {
|
|
2315
|
-
default: T(() => [...t[73] ||= [g(" 右侧插列 ", -1)]]),
|
|
2316
|
-
_: 1
|
|
2317
|
-
}, 8, ["disabled"]),
|
|
2318
|
-
_(w(E), {
|
|
2319
|
-
size: "small",
|
|
2320
|
-
disabled: H.value,
|
|
2321
|
-
onClick: t[29] ||= (e) => Ic("delete-table-row")
|
|
2322
|
-
}, {
|
|
2323
|
-
default: T(() => [...t[74] ||= [g(" 删除当前行 ", -1)]]),
|
|
2324
|
-
_: 1
|
|
2325
|
-
}, 8, ["disabled"]),
|
|
2326
|
-
_(w(E), {
|
|
2327
|
-
size: "small",
|
|
2328
|
-
disabled: H.value,
|
|
2329
|
-
onClick: t[30] ||= (e) => Ic("delete-table-column")
|
|
2330
|
-
}, {
|
|
2331
|
-
default: T(() => [...t[75] ||= [g(" 删除当前列 ", -1)]]),
|
|
2332
|
-
_: 1
|
|
2333
|
-
}, 8, ["disabled"]),
|
|
2334
|
-
_(w(E), {
|
|
2335
|
-
size: "small",
|
|
2336
|
-
disabled: H.value,
|
|
2337
|
-
onClick: t[31] ||= (e) => Ic("toggle-table-header-row")
|
|
2338
|
-
}, {
|
|
2339
|
-
default: T(() => [...t[76] ||= [g(" 切换表头行 ", -1)]]),
|
|
2340
|
-
_: 1
|
|
2341
|
-
}, 8, ["disabled"]),
|
|
2342
|
-
_(w(E), {
|
|
2343
|
-
size: "small",
|
|
2344
|
-
disabled: H.value,
|
|
2345
|
-
onClick: t[32] ||= (e) => Ic("toggle-table-header-column")
|
|
2346
|
-
}, {
|
|
2347
|
-
default: T(() => [...t[77] ||= [g(" 切换表头列 ", -1)]]),
|
|
2348
|
-
_: 1
|
|
2349
|
-
}, 8, ["disabled"]),
|
|
2350
|
-
_(w(E), {
|
|
2351
|
-
danger: "",
|
|
2352
|
-
size: "small",
|
|
2353
|
-
disabled: H.value,
|
|
2354
|
-
onClick: t[33] ||= (e) => Ic("delete-table")
|
|
2355
|
-
}, {
|
|
2356
|
-
default: T(() => [...t[78] ||= [g(" 删除表格 ", -1)]]),
|
|
2357
|
-
_: 1
|
|
2358
|
-
}, 8, ["disabled"])
|
|
2359
|
-
])])]),
|
|
2360
|
-
default: T(() => [_(w(D), { title: "表格操作" }, {
|
|
2361
|
-
default: T(() => [_(w(E), {
|
|
2362
|
-
size: "small",
|
|
2363
|
-
class: "gd-contract-template-designer__icon-button",
|
|
2364
|
-
disabled: H.value || !G.value.isTableActive,
|
|
2365
|
-
"aria-label": "表格操作"
|
|
2366
|
-
}, {
|
|
2367
|
-
default: T(() => [_(w(an), { "aria-hidden": "true" })]),
|
|
2368
|
-
_: 1
|
|
2369
|
-
}, 8, ["disabled"])]),
|
|
2370
|
-
_: 1
|
|
2371
|
-
})]),
|
|
2372
|
-
_: 1
|
|
2373
|
-
}, 8, ["open"])])], 8, ["disabled", "to"])),
|
|
2374
|
-
Ct(h("div", {
|
|
2375
|
-
ref_key: "toolbarMoreElement",
|
|
2376
|
-
ref: Fr,
|
|
2377
|
-
class: "gd-contract-template-designer__toolbar-more"
|
|
2378
|
-
}, [_(w(D), { title: "更多工具" }, {
|
|
2379
|
-
default: T(() => [_(w(E), {
|
|
2380
|
-
size: "small",
|
|
2381
|
-
class: b(["gd-contract-template-designer__icon-button", { "is-selected": mi.value }]),
|
|
2382
|
-
"aria-label": "更多工具",
|
|
2383
|
-
"aria-haspopup": "true",
|
|
2384
|
-
"aria-expanded": mi.value,
|
|
2385
|
-
onClick: t[35] ||= wt((e) => mi.value = !mi.value, ["stop"])
|
|
2386
|
-
}, {
|
|
2387
|
-
default: T(() => [_(w(Wt), { "aria-hidden": "true" })]),
|
|
2388
|
-
_: 1
|
|
2389
|
-
}, 8, ["class", "aria-expanded"])]),
|
|
2390
|
-
_: 1
|
|
2391
|
-
}), Ct(h("div", Fn, [
|
|
2392
|
-
Ct(h("div", In, [t[80] ||= h("span", { class: "gd-contract-template-designer__toolbar-more-title" }, "插入", -1), h("div", {
|
|
2393
|
-
ref_key: "toolbarInsertSlotElement",
|
|
2394
|
-
ref: Ir,
|
|
2395
|
-
class: "gd-contract-template-designer__toolbar-more-slot"
|
|
2396
|
-
}, null, 512)], 512), [[xt, ms("insert")]]),
|
|
2397
|
-
Ct(h("div", Ln, [t[81] ||= h("span", { class: "gd-contract-template-designer__toolbar-more-title" }, "文字排版", -1), h("div", {
|
|
2398
|
-
ref_key: "toolbarTypographySlotElement",
|
|
2399
|
-
ref: Lr,
|
|
2400
|
-
class: "gd-contract-template-designer__toolbar-more-slot"
|
|
2401
|
-
}, null, 512)], 512), [[xt, ms("typography")]]),
|
|
2402
|
-
Ct(h("div", Rn, [t[82] ||= h("span", { class: "gd-contract-template-designer__toolbar-more-title" }, "清除格式", -1), h("div", {
|
|
2403
|
-
ref_key: "toolbarCleanupSlotElement",
|
|
2404
|
-
ref: Rr,
|
|
2405
|
-
class: "gd-contract-template-designer__toolbar-more-slot"
|
|
2406
|
-
}, null, 512)], 512), [[xt, ms("cleanup")]]),
|
|
2407
|
-
Ct(h("div", zn, [t[83] ||= h("span", { class: "gd-contract-template-designer__toolbar-more-title" }, "表格", -1), h("div", {
|
|
2408
|
-
ref_key: "toolbarTableSlotElement",
|
|
2409
|
-
ref: zr,
|
|
2410
|
-
class: "gd-contract-template-designer__toolbar-more-slot"
|
|
2411
|
-
}, null, 512)], 512), [[xt, ms("table")]])
|
|
2412
|
-
], 512), [[xt, mi.value]])], 512), [[xt, ps.value]])
|
|
2413
|
-
], 512)]),
|
|
2414
|
-
ei.value ? (x(), m("section", Bn, [_(w(Tt), {
|
|
2415
|
-
type: Zi.value ? "success" : "error",
|
|
2416
|
-
message: Qi.value,
|
|
1556
|
+
wt(ze, {
|
|
1557
|
+
ref_key: "workspaceHeaderElement",
|
|
1558
|
+
ref: tn,
|
|
1559
|
+
summary: dr.value,
|
|
1560
|
+
"draft-cache-status-text": hr.value,
|
|
1561
|
+
"draft-cache-status-class": gr.value,
|
|
1562
|
+
"show-draft-cache-status": s.showDraftCacheStatus,
|
|
1563
|
+
"show-clear-button": s.showClearButton,
|
|
1564
|
+
"show-submit-data-viewer": s.showSubmitDataViewer,
|
|
1565
|
+
readonly: V.value,
|
|
1566
|
+
"zoom-percent": _r.value,
|
|
1567
|
+
"zoom-out-disabled": M.value <= Vt,
|
|
1568
|
+
"zoom-in-disabled": M.value >= Ht,
|
|
1569
|
+
"is-fullscreen": Tn.value,
|
|
1570
|
+
"page-decorations-open": N.value,
|
|
1571
|
+
"page-decorations-studio-id": rn,
|
|
1572
|
+
"page-decorations-preset-label": fr.value,
|
|
1573
|
+
"page-decorations-enabled-count": mr.value,
|
|
1574
|
+
"page-decorations-enabled-states": pr.value,
|
|
1575
|
+
onZoomOut: ja,
|
|
1576
|
+
onZoomIn: Aa,
|
|
1577
|
+
onFitWidth: _(wa),
|
|
1578
|
+
onResetZoom: Oa,
|
|
1579
|
+
onToggleFullscreen: Ma,
|
|
1580
|
+
onClear: za,
|
|
1581
|
+
onValidate: io,
|
|
1582
|
+
onPreview: Na,
|
|
1583
|
+
onSubmitData: Ia,
|
|
1584
|
+
onTogglePageDecorations: Ka
|
|
1585
|
+
}, null, 8, [
|
|
1586
|
+
"summary",
|
|
1587
|
+
"draft-cache-status-text",
|
|
1588
|
+
"draft-cache-status-class",
|
|
1589
|
+
"show-draft-cache-status",
|
|
1590
|
+
"show-clear-button",
|
|
1591
|
+
"show-submit-data-viewer",
|
|
1592
|
+
"readonly",
|
|
1593
|
+
"zoom-percent",
|
|
1594
|
+
"zoom-out-disabled",
|
|
1595
|
+
"zoom-in-disabled",
|
|
1596
|
+
"is-fullscreen",
|
|
1597
|
+
"page-decorations-open",
|
|
1598
|
+
"page-decorations-preset-label",
|
|
1599
|
+
"page-decorations-enabled-count",
|
|
1600
|
+
"page-decorations-enabled-states",
|
|
1601
|
+
"onFitWidth"
|
|
1602
|
+
]),
|
|
1603
|
+
wt(Be, {
|
|
1604
|
+
"variable-insert-popover-open": Mn.value,
|
|
1605
|
+
"onUpdate:variableInsertPopoverOpen": t[2] ||= (e) => Mn.value = e,
|
|
1606
|
+
"image-insert-popover-open": Nn.value,
|
|
1607
|
+
"onUpdate:imageInsertPopoverOpen": t[3] ||= (e) => Nn.value = e,
|
|
1608
|
+
"image-insert-url": Pn.value,
|
|
1609
|
+
"onUpdate:imageInsertUrl": t[4] ||= (e) => Pn.value = e,
|
|
1610
|
+
"image-insert-width": Fn.value,
|
|
1611
|
+
"onUpdate:imageInsertWidth": t[5] ||= (e) => Fn.value = e,
|
|
1612
|
+
"image-insert-height": In.value,
|
|
1613
|
+
"onUpdate:imageInsertHeight": t[6] ||= (e) => In.value = e,
|
|
1614
|
+
"table-insert-popover-open": P.value,
|
|
1615
|
+
"onUpdate:tableInsertPopoverOpen": t[7] ||= (e) => P.value = e,
|
|
1616
|
+
"table-actions-popover-open": F.value,
|
|
1617
|
+
"onUpdate:tableActionsPopoverOpen": t[8] ||= (e) => F.value = e,
|
|
1618
|
+
"table-insert-draft": Kn.value,
|
|
1619
|
+
"onUpdate:tableInsertDraft": t[9] ||= (e) => Kn.value = e,
|
|
1620
|
+
"toolbar-more-open": kn.value,
|
|
1621
|
+
"onUpdate:toolbarMoreOpen": t[10] ||= (e) => kn.value = e,
|
|
1622
|
+
readonly: V.value,
|
|
1623
|
+
"editor-state": Zr.value,
|
|
1624
|
+
"current-block-format": Qr.value,
|
|
1625
|
+
"block-format-options": xr,
|
|
1626
|
+
"font-family-select-options": yr.value,
|
|
1627
|
+
"current-editor-font-family": $r.value,
|
|
1628
|
+
"font-size-preset-options": ri.value,
|
|
1629
|
+
"current-editor-font-size": ei.value,
|
|
1630
|
+
"editor-font-size-search-value": jn.value,
|
|
1631
|
+
"current-editor-text-color": ti.value,
|
|
1632
|
+
"body-control-tool-items": kr.value,
|
|
1633
|
+
"page-limit-reached": jr.value,
|
|
1634
|
+
"normalized-max-pages": Ar.value,
|
|
1635
|
+
"image-processing": Rn.value,
|
|
1636
|
+
"image-insert-error": Ln.value,
|
|
1637
|
+
onCommand: t[11] ||= (e) => X(e),
|
|
1638
|
+
onPatchBlockFormat: vo,
|
|
1639
|
+
onPatchFontFamily: bo,
|
|
1640
|
+
onPatchFontSize: yo,
|
|
1641
|
+
onPatchColor: xo,
|
|
1642
|
+
onPatchTextAlign: _o,
|
|
1643
|
+
onInsertVariable: Yi,
|
|
1644
|
+
onOpenImageFile: Ki,
|
|
1645
|
+
onInsertImageUrl: Ji,
|
|
1646
|
+
onAddPage: ji,
|
|
1647
|
+
onInsertTable: Vo,
|
|
1648
|
+
onTableAction: qo,
|
|
1649
|
+
onFontSizeSearch: Co,
|
|
1650
|
+
onFontSizeCommit: wo,
|
|
1651
|
+
onFontSizeDropdownChange: Eo,
|
|
1652
|
+
onFontSizeKeydown: To
|
|
1653
|
+
}, null, 8, [
|
|
1654
|
+
"variable-insert-popover-open",
|
|
1655
|
+
"image-insert-popover-open",
|
|
1656
|
+
"image-insert-url",
|
|
1657
|
+
"image-insert-width",
|
|
1658
|
+
"image-insert-height",
|
|
1659
|
+
"table-insert-popover-open",
|
|
1660
|
+
"table-actions-popover-open",
|
|
1661
|
+
"table-insert-draft",
|
|
1662
|
+
"toolbar-more-open",
|
|
1663
|
+
"readonly",
|
|
1664
|
+
"editor-state",
|
|
1665
|
+
"current-block-format",
|
|
1666
|
+
"font-family-select-options",
|
|
1667
|
+
"current-editor-font-family",
|
|
1668
|
+
"font-size-preset-options",
|
|
1669
|
+
"current-editor-font-size",
|
|
1670
|
+
"editor-font-size-search-value",
|
|
1671
|
+
"current-editor-text-color",
|
|
1672
|
+
"body-control-tool-items",
|
|
1673
|
+
"page-limit-reached",
|
|
1674
|
+
"normalized-max-pages",
|
|
1675
|
+
"image-processing",
|
|
1676
|
+
"image-insert-error"
|
|
1677
|
+
]),
|
|
1678
|
+
O.value ? (h(), St("section", Lt, [wt(_(Pt), {
|
|
1679
|
+
type: lr.value ? "success" : "error",
|
|
1680
|
+
message: ur.value,
|
|
2417
1681
|
"show-icon": ""
|
|
2418
|
-
}, null, 8, ["type", "message"]),
|
|
1682
|
+
}, null, 8, ["type", "message"]), k.value.length ? (h(), St("div", Rt, [(h(!0), St(vt, null, kt(k.value, (e) => (h(), St("button", {
|
|
2419
1683
|
key: `${e.id}-${e.message}`,
|
|
2420
1684
|
type: "button",
|
|
2421
1685
|
class: "gd-contract-template-designer__validation-item",
|
|
2422
|
-
onClick: (t) =>
|
|
2423
|
-
}, [
|
|
2424
|
-
|
|
1686
|
+
onClick: (t) => ao(e)
|
|
1687
|
+
}, [Ct("span", null, At(e.message), 1), Ct("small", null, At(oo(e)), 1)], 8, zt))), 128))])) : xt("", !0)])) : xt("", !0),
|
|
1688
|
+
Ct("div", {
|
|
2425
1689
|
ref_key: "canvasElement",
|
|
2426
|
-
ref:
|
|
1690
|
+
ref: $t,
|
|
2427
1691
|
class: "gd-contract-template-designer__canvas"
|
|
2428
|
-
}, [(
|
|
2429
|
-
key: `${
|
|
1692
|
+
}, [(h(!0), St(vt, null, kt(w.value.pages, (e, n) => (h(), bt(Le, {
|
|
1693
|
+
key: `${x.value}:${e.id}`,
|
|
2430
1694
|
ref_for: !0,
|
|
2431
|
-
ref: (t) =>
|
|
1695
|
+
ref: (t) => vi(e.id, t),
|
|
2432
1696
|
page: e,
|
|
2433
1697
|
"page-index": n,
|
|
2434
|
-
"page-size":
|
|
2435
|
-
|
|
2436
|
-
"
|
|
2437
|
-
|
|
2438
|
-
"selected-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
1698
|
+
"page-size": Z(e),
|
|
1699
|
+
"page-decorations": w.value.pageDecorations,
|
|
1700
|
+
"total-pages": w.value.pages.length,
|
|
1701
|
+
variables: w.value.variables,
|
|
1702
|
+
"selected-variable-key": T.value,
|
|
1703
|
+
"signing-placements": l.showSigningPlacementTools ? Ci(e.id) : [],
|
|
1704
|
+
"selected-signing-placement-id": E.value,
|
|
1705
|
+
active: D.value === e.id,
|
|
1706
|
+
readonly: s.readonly,
|
|
1707
|
+
disabled: s.disabled,
|
|
1708
|
+
zoom: M.value,
|
|
1709
|
+
"process-image-file": Wi,
|
|
1710
|
+
onPageUpdate: Si,
|
|
1711
|
+
onVariableDrop: Zi,
|
|
1712
|
+
onVariableSelect: Qi,
|
|
1713
|
+
onSigningPlacementDrop: _(Pr),
|
|
1714
|
+
onSigningPlacementSelect: Ti,
|
|
1715
|
+
onSigningPlacementMove: _(Lr),
|
|
1716
|
+
onSigningPlacementRemove: _(Br),
|
|
1717
|
+
onEditorFocus: t[12] ||= (e) => Wa(e, !1),
|
|
1718
|
+
onEditorStateChange: Bo,
|
|
1719
|
+
onEditorContextMenu: Po,
|
|
1720
|
+
onVariableMoveBlocked: t[13] ||= (e) => z.value = "变量只能在当前页内移动,跨页移动尚未支持。"
|
|
2455
1721
|
}, null, 8, [
|
|
2456
1722
|
"page",
|
|
2457
1723
|
"page-index",
|
|
2458
1724
|
"page-size",
|
|
1725
|
+
"page-decorations",
|
|
1726
|
+
"total-pages",
|
|
2459
1727
|
"variables",
|
|
2460
1728
|
"selected-variable-key",
|
|
2461
1729
|
"signing-placements",
|
|
@@ -2463,51 +1731,79 @@ var dn = { class: "gd-contract-template-designer__workspace-header" }, fn = { cl
|
|
|
2463
1731
|
"active",
|
|
2464
1732
|
"readonly",
|
|
2465
1733
|
"disabled",
|
|
2466
|
-
"zoom"
|
|
2467
|
-
|
|
1734
|
+
"zoom",
|
|
1735
|
+
"onSigningPlacementDrop",
|
|
1736
|
+
"onSigningPlacementMove",
|
|
1737
|
+
"onSigningPlacementRemove"
|
|
1738
|
+
]))), 128))], 512),
|
|
1739
|
+
Nt(wt(mt, {
|
|
1740
|
+
ref_key: "pageDecorationsStudioElement",
|
|
1741
|
+
ref: nn,
|
|
1742
|
+
id: rn,
|
|
1743
|
+
open: N.value,
|
|
1744
|
+
decorations: w.value.pageDecorations,
|
|
1745
|
+
variables: w.value.variables,
|
|
1746
|
+
"font-family-options": yr.value,
|
|
1747
|
+
readonly: s.readonly,
|
|
1748
|
+
disabled: s.disabled,
|
|
1749
|
+
"active-tab": On.value,
|
|
1750
|
+
"onUpdate:activeTab": t[14] ||= (e) => On.value = e,
|
|
1751
|
+
onChange: na,
|
|
1752
|
+
onClose: qa
|
|
1753
|
+
}, null, 8, [
|
|
1754
|
+
"open",
|
|
1755
|
+
"decorations",
|
|
1756
|
+
"variables",
|
|
1757
|
+
"font-family-options",
|
|
1758
|
+
"readonly",
|
|
1759
|
+
"disabled",
|
|
1760
|
+
"active-tab"
|
|
1761
|
+
]), [[Mt, N.value]])
|
|
2468
1762
|
], 512),
|
|
2469
|
-
|
|
2470
|
-
collapsed:
|
|
2471
|
-
readonly:
|
|
2472
|
-
disabled:
|
|
1763
|
+
wt(pt, {
|
|
1764
|
+
collapsed: Dn.value,
|
|
1765
|
+
readonly: s.readonly,
|
|
1766
|
+
disabled: s.disabled,
|
|
2473
1767
|
"show-signing-placement-tools": l.showSigningPlacementTools,
|
|
2474
|
-
"body-control-tool-items":
|
|
2475
|
-
"signing-placement-tools":
|
|
1768
|
+
"body-control-tool-items": kr.value,
|
|
1769
|
+
"signing-placement-tools": Dr.value,
|
|
2476
1770
|
"signing-placements": U.value,
|
|
2477
|
-
"selected-signing-placement":
|
|
2478
|
-
"selected-signing-placement-page-size":
|
|
2479
|
-
"selected-variable":
|
|
2480
|
-
|
|
2481
|
-
"font-family
|
|
2482
|
-
"
|
|
2483
|
-
"
|
|
2484
|
-
"
|
|
2485
|
-
"
|
|
2486
|
-
"selected-variable-
|
|
2487
|
-
"
|
|
2488
|
-
"
|
|
2489
|
-
"
|
|
2490
|
-
"
|
|
2491
|
-
"signing-placement-type-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
1771
|
+
"selected-signing-placement": ar.value,
|
|
1772
|
+
"selected-signing-placement-page-size": sr.value,
|
|
1773
|
+
"selected-variable": H.value,
|
|
1774
|
+
variables: w.value.variables,
|
|
1775
|
+
"current-variable-font-family": ni.value,
|
|
1776
|
+
"font-family-select-options": yr.value,
|
|
1777
|
+
"text-align-options": _(br),
|
|
1778
|
+
"border-style-options": Sr,
|
|
1779
|
+
"object-fit-options": Cr,
|
|
1780
|
+
"selected-variable-width-max": Yr.value,
|
|
1781
|
+
"selected-variable-height-max": Xr.value,
|
|
1782
|
+
"min-font-size": Yt,
|
|
1783
|
+
"max-font-size": Xt,
|
|
1784
|
+
"default-multiline-rows": _(3),
|
|
1785
|
+
"resolve-signing-placement-type-icon": _(ut),
|
|
1786
|
+
"signing-placement-type-labels": _(n),
|
|
1787
|
+
onToggle: t[15] ||= (e) => Dn.value = !Dn.value,
|
|
1788
|
+
onVariableDragStart: xa,
|
|
1789
|
+
onInsertVariable: ha,
|
|
1790
|
+
onSigningPlacementDragStart: _(Ir),
|
|
1791
|
+
onInsertSigningPlacement: _(Fr),
|
|
1792
|
+
onPatchSigningPlacement: _(Rr),
|
|
1793
|
+
onDuplicateSigningPlacement: t[16] ||= (e) => _(zr)(),
|
|
1794
|
+
onRemoveSigningPlacement: t[17] ||= (e) => _(Br)(),
|
|
1795
|
+
onDuplicateVariable: pa,
|
|
1796
|
+
onRemoveVariable: da,
|
|
1797
|
+
onPatchVariable: ea,
|
|
1798
|
+
onRenameVariable: ta,
|
|
1799
|
+
onPatchStyle: oa,
|
|
1800
|
+
onPatchMultiline: la,
|
|
1801
|
+
onPatchRows: ua,
|
|
1802
|
+
onPatchFontFamily: sa,
|
|
1803
|
+
onPatchFontSize: ca,
|
|
1804
|
+
onPatchTextAlign: ra,
|
|
1805
|
+
onPatchBorderStyle: ia,
|
|
1806
|
+
onPatchObjectFit: aa
|
|
2511
1807
|
}, null, 8, [
|
|
2512
1808
|
"collapsed",
|
|
2513
1809
|
"readonly",
|
|
@@ -2519,6 +1815,7 @@ var dn = { class: "gd-contract-template-designer__workspace-header" }, fn = { cl
|
|
|
2519
1815
|
"selected-signing-placement",
|
|
2520
1816
|
"selected-signing-placement-page-size",
|
|
2521
1817
|
"selected-variable",
|
|
1818
|
+
"variables",
|
|
2522
1819
|
"current-variable-font-family",
|
|
2523
1820
|
"font-family-select-options",
|
|
2524
1821
|
"text-align-options",
|
|
@@ -2526,455 +1823,143 @@ var dn = { class: "gd-contract-template-designer__workspace-header" }, fn = { cl
|
|
|
2526
1823
|
"selected-variable-height-max",
|
|
2527
1824
|
"default-multiline-rows",
|
|
2528
1825
|
"resolve-signing-placement-type-icon",
|
|
2529
|
-
"signing-placement-type-labels"
|
|
1826
|
+
"signing-placement-type-labels",
|
|
1827
|
+
"onSigningPlacementDragStart",
|
|
1828
|
+
"onInsertSigningPlacement",
|
|
1829
|
+
"onPatchSigningPlacement"
|
|
2530
1830
|
])
|
|
2531
1831
|
], 2),
|
|
2532
|
-
(
|
|
2533
|
-
|
|
1832
|
+
(h(), bt(yt, { to: "body" }, [
|
|
1833
|
+
L.value ? (h(), bt(Re, {
|
|
2534
1834
|
key: 0,
|
|
2535
1835
|
ref_key: "tableContextMenuElement",
|
|
2536
|
-
ref:
|
|
2537
|
-
capabilities:
|
|
2538
|
-
"active-alignment":
|
|
2539
|
-
style:
|
|
2540
|
-
left: `${
|
|
2541
|
-
top: `${
|
|
1836
|
+
ref: Hn,
|
|
1837
|
+
capabilities: L.value.capabilities,
|
|
1838
|
+
"active-alignment": L.value.activeAlignment,
|
|
1839
|
+
style: Et({
|
|
1840
|
+
left: `${L.value.x}px`,
|
|
1841
|
+
top: `${L.value.y}px`
|
|
2542
1842
|
}),
|
|
2543
|
-
onExecute:
|
|
2544
|
-
onKeydown:
|
|
1843
|
+
onExecute: Uo,
|
|
1844
|
+
onKeydown: Wo
|
|
2545
1845
|
}, null, 8, [
|
|
2546
1846
|
"capabilities",
|
|
2547
1847
|
"active-alignment",
|
|
2548
1848
|
"style"
|
|
2549
|
-
])) :
|
|
2550
|
-
|
|
1849
|
+
])) : xt("", !0),
|
|
1850
|
+
R.value ? (h(), bt(He, {
|
|
2551
1851
|
key: 1,
|
|
2552
1852
|
ref_key: "imageContextMenuElement",
|
|
2553
|
-
ref:
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
}, null, 8, [
|
|
2573
|
-
"value",
|
|
2574
|
-
"min",
|
|
2575
|
-
"max",
|
|
2576
|
-
"disabled"
|
|
2577
|
-
])]), h("label", null, [t[85] ||= h("span", null, "高度", -1), _(w(Dt), {
|
|
2578
|
-
value: Ni.value,
|
|
2579
|
-
"onUpdate:value": t[42] ||= (e) => Ni.value = e,
|
|
2580
|
-
min: w(16),
|
|
2581
|
-
max: w(Me),
|
|
2582
|
-
disabled: H.value,
|
|
2583
|
-
placeholder: "自然",
|
|
2584
|
-
"aria-label": "图片高度"
|
|
2585
|
-
}, null, 8, [
|
|
2586
|
-
"value",
|
|
2587
|
-
"min",
|
|
2588
|
-
"max",
|
|
2589
|
-
"disabled"
|
|
2590
|
-
])])]),
|
|
2591
|
-
h("div", Wn, [_(w(E), {
|
|
2592
|
-
size: "small",
|
|
2593
|
-
onClick: wc
|
|
2594
|
-
}, {
|
|
2595
|
-
default: T(() => [...t[86] ||= [g("恢复自然尺寸", -1)]]),
|
|
2596
|
-
_: 1
|
|
2597
|
-
}), _(w(E), {
|
|
2598
|
-
size: "small",
|
|
2599
|
-
type: "primary",
|
|
2600
|
-
onClick: Cc
|
|
2601
|
-
}, {
|
|
2602
|
-
default: T(() => [...t[87] ||= [g("应用", -1)]]),
|
|
2603
|
-
_: 1
|
|
2604
|
-
})])
|
|
2605
|
-
], 36)) : p("", !0),
|
|
2606
|
-
z.value ? (x(), m("div", {
|
|
1853
|
+
ref: Un,
|
|
1854
|
+
width: Wn.value,
|
|
1855
|
+
"onUpdate:width": t[18] ||= (e) => Wn.value = e,
|
|
1856
|
+
height: Gn.value,
|
|
1857
|
+
"onUpdate:height": t[19] ||= (e) => Gn.value = e,
|
|
1858
|
+
x: R.value.x,
|
|
1859
|
+
y: R.value.y,
|
|
1860
|
+
readonly: V.value,
|
|
1861
|
+
onRestore: No,
|
|
1862
|
+
onApply: Mo,
|
|
1863
|
+
onKeydown: Ko
|
|
1864
|
+
}, null, 8, [
|
|
1865
|
+
"width",
|
|
1866
|
+
"height",
|
|
1867
|
+
"x",
|
|
1868
|
+
"y",
|
|
1869
|
+
"readonly"
|
|
1870
|
+
])) : xt("", !0),
|
|
1871
|
+
I.value ? (h(), bt(Ve, {
|
|
2607
1872
|
key: 2,
|
|
2608
1873
|
ref_key: "textContextMenuElement",
|
|
2609
|
-
ref:
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
"
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
})]),
|
|
2663
|
-
_: 1
|
|
2664
|
-
})) : p("", !0),
|
|
2665
|
-
z.value.hasSelection ? (x(), f(w(D), {
|
|
2666
|
-
key: 1,
|
|
2667
|
-
title: "剪切"
|
|
2668
|
-
}, {
|
|
2669
|
-
default: T(() => [_(w(E), {
|
|
2670
|
-
size: "small",
|
|
2671
|
-
class: "gd-contract-template-designer__text-menu-icon-button",
|
|
2672
|
-
"aria-label": "剪切",
|
|
2673
|
-
onClick: t[46] ||= (e) => Ka("cut")
|
|
2674
|
-
}, {
|
|
2675
|
-
default: T(() => [_(w(rn), { "aria-hidden": "true" })]),
|
|
2676
|
-
_: 1
|
|
2677
|
-
})]),
|
|
2678
|
-
_: 1
|
|
2679
|
-
})) : p("", !0),
|
|
2680
|
-
_(w(D), { title: "粘贴" }, {
|
|
2681
|
-
default: T(() => [_(w(E), {
|
|
2682
|
-
size: "small",
|
|
2683
|
-
class: "gd-contract-template-designer__text-menu-icon-button",
|
|
2684
|
-
"aria-label": "粘贴",
|
|
2685
|
-
onClick: t[47] ||= (e) => Ka("paste")
|
|
2686
|
-
}, {
|
|
2687
|
-
default: T(() => [_(w(Bt), { "aria-hidden": "true" })]),
|
|
2688
|
-
_: 1
|
|
2689
|
-
})]),
|
|
2690
|
-
_: 1
|
|
2691
|
-
})
|
|
2692
|
-
]),
|
|
2693
|
-
z.value.hasSelection ? p("", !0) : (x(), m("div", Kn, [
|
|
2694
|
-
_(w(E), {
|
|
2695
|
-
size: "small",
|
|
2696
|
-
onClick: Mo
|
|
2697
|
-
}, {
|
|
2698
|
-
default: T(() => [_(w($t), { "aria-hidden": "true" }), t[90] ||= h("span", null, "图片", -1)]),
|
|
2699
|
-
_: 1
|
|
2700
|
-
}),
|
|
2701
|
-
_(w(E), {
|
|
2702
|
-
size: "small",
|
|
2703
|
-
onClick: t[48] ||= (e) => Y({
|
|
2704
|
-
type: "insert-table",
|
|
2705
|
-
options: Ii.value
|
|
2706
|
-
})
|
|
2707
|
-
}, {
|
|
2708
|
-
default: T(() => [_(w(an), { "aria-hidden": "true" }), t[91] ||= h("span", null, "表格", -1)]),
|
|
2709
|
-
_: 1
|
|
2710
|
-
}),
|
|
2711
|
-
_(w(E), {
|
|
2712
|
-
size: "small",
|
|
2713
|
-
onClick: t[49] ||= (e) => Y({ type: "insert-horizontal-rule" })
|
|
2714
|
-
}, {
|
|
2715
|
-
default: T(() => [_(w(Zt), { "aria-hidden": "true" }), t[92] ||= h("span", null, "分隔线", -1)]),
|
|
2716
|
-
_: 1
|
|
2717
|
-
}),
|
|
2718
|
-
_(w(E), {
|
|
2719
|
-
size: "small",
|
|
2720
|
-
disabled: _a.value,
|
|
2721
|
-
onClick: Io
|
|
2722
|
-
}, {
|
|
2723
|
-
default: T(() => [_(w(Kt), { "aria-hidden": "true" }), t[93] ||= h("span", null, "新页面", -1)]),
|
|
2724
|
-
_: 1
|
|
2725
|
-
}, 8, ["disabled"]),
|
|
2726
|
-
_(w(E), {
|
|
2727
|
-
size: "small",
|
|
2728
|
-
onClick: t[50] ||= (e) => Y({ type: "select-all" })
|
|
2729
|
-
}, {
|
|
2730
|
-
default: T(() => [...t[94] ||= [h("span", null, "全选正文", -1)]]),
|
|
2731
|
-
_: 1
|
|
2732
|
-
})
|
|
2733
|
-
])),
|
|
2734
|
-
h("div", qn, [
|
|
2735
|
-
_(w(At), {
|
|
2736
|
-
class: "gd-contract-template-designer__context-menu-field gd-contract-template-designer__text-menu-font-size",
|
|
2737
|
-
value: Ca.value,
|
|
2738
|
-
options: Ea.value,
|
|
2739
|
-
"show-search": "",
|
|
2740
|
-
"filter-option": !1,
|
|
2741
|
-
"search-value": _i.value,
|
|
2742
|
-
onBlur: mc,
|
|
2743
|
-
onChange: lc,
|
|
2744
|
-
onDropdownVisibleChange: gc,
|
|
2745
|
-
onInputKeyDown: hc,
|
|
2746
|
-
onSearch: pc
|
|
2747
|
-
}, null, 8, [
|
|
2748
|
-
"value",
|
|
2749
|
-
"options",
|
|
2750
|
-
"search-value"
|
|
2751
|
-
]),
|
|
2752
|
-
_(w(At), {
|
|
2753
|
-
class: "gd-contract-template-designer__context-menu-field gd-contract-template-designer__text-menu-alignment",
|
|
2754
|
-
value: G.value.textAlign,
|
|
2755
|
-
options: w(oa),
|
|
2756
|
-
onChange: sc
|
|
2757
|
-
}, null, 8, ["value", "options"]),
|
|
2758
|
-
_(w(D), { title: "文字颜色" }, {
|
|
2759
|
-
default: T(() => [h("input", {
|
|
2760
|
-
class: "gd-contract-template-designer__context-menu-color",
|
|
2761
|
-
type: "color",
|
|
2762
|
-
"aria-label": "文字颜色",
|
|
2763
|
-
value: wa.value,
|
|
2764
|
-
onInput: t[51] ||= (e) => fc(e.target.value)
|
|
2765
|
-
}, null, 40, Jn)]),
|
|
2766
|
-
_: 1
|
|
2767
|
-
})
|
|
2768
|
-
]),
|
|
2769
|
-
h("div", {
|
|
2770
|
-
class: "gd-contract-template-designer__text-menu-control-group",
|
|
2771
|
-
role: "group",
|
|
2772
|
-
"aria-label": z.value.hasSelection ? "转换为正文控件" : "插入正文控件"
|
|
2773
|
-
}, [
|
|
2774
|
-
h("div", Xn, [h("strong", null, C(z.value.hasSelection ? "转换为正文控件" : "插入正文控件"), 1), h("span", null, C(z.value.hasSelection ? "替换选中内容" : "在光标处插入"), 1)]),
|
|
2775
|
-
h("div", Zn, [(x(!0), m(mt, null, yt(ha.value, (e) => (x(), f(w(D), {
|
|
2776
|
-
key: e.type,
|
|
2777
|
-
title: z.value.hasSelection ? `转换为${e.label}控件` : `插入${e.label}控件`
|
|
2778
|
-
}, {
|
|
2779
|
-
default: T(() => [h("button", {
|
|
2780
|
-
type: "button",
|
|
2781
|
-
class: "gd-contract-template-designer__text-menu-control-option",
|
|
2782
|
-
"aria-label": z.value.hasSelection ? `转换为${e.label}控件` : `插入${e.label}控件`,
|
|
2783
|
-
onClick: (t) => es(e.type)
|
|
2784
|
-
}, [(x(), f(bt(e.icon), { "aria-hidden": "true" })), h("span", null, C(e.label), 1)], 8, Qn)]),
|
|
2785
|
-
_: 2
|
|
2786
|
-
}, 1032, ["title"]))), 128))]),
|
|
2787
|
-
Oi.value ? (x(), m(mt, { key: 1 }, [_(w(Et), {
|
|
2788
|
-
value: ki.value,
|
|
2789
|
-
"onUpdate:value": t[52] ||= (e) => ki.value = e,
|
|
2790
|
-
class: "gd-contract-template-designer__text-menu-bind-search",
|
|
2791
|
-
size: "small",
|
|
2792
|
-
"allow-clear": "",
|
|
2793
|
-
placeholder: "搜索已有控件",
|
|
2794
|
-
"aria-label": "搜索已有控件"
|
|
2795
|
-
}, null, 8, ["value"]), h("div", er, [(x(!0), m(mt, null, yt(va.value, (e) => (x(), m("button", {
|
|
2796
|
-
key: e.id,
|
|
2797
|
-
type: "button",
|
|
2798
|
-
class: "gd-contract-template-designer__text-menu-bind-item",
|
|
2799
|
-
role: "option",
|
|
2800
|
-
onClick: (t) => ns(e)
|
|
2801
|
-
}, [h("span", nr, C(e.label), 1), h("span", rr, C(rs(e)) + " · " + C(e.key), 1)], 8, tr))), 128)), va.value.length ? p("", !0) : (x(), m("p", ir, " 暂无已有控件 "))])], 64)) : (x(), m("button", {
|
|
2802
|
-
key: 0,
|
|
2803
|
-
type: "button",
|
|
2804
|
-
class: "gd-contract-template-designer__text-menu-bind-toggle",
|
|
2805
|
-
disabled: !P.value.variables.length,
|
|
2806
|
-
"aria-expanded": !1,
|
|
2807
|
-
"aria-label": "绑定已有控件",
|
|
2808
|
-
onClick: is
|
|
2809
|
-
}, [t[95] ||= h("span", null, "绑定已有", -1), _(w(Ut), { "aria-hidden": "true" })], 8, $n))
|
|
2810
|
-
], 8, Yn),
|
|
2811
|
-
h("div", ar, [
|
|
2812
|
-
_(w(D), { title: "加粗" }, {
|
|
2813
|
-
default: T(() => [_(w(E), {
|
|
2814
|
-
size: "small",
|
|
2815
|
-
class: b(["gd-contract-template-designer__text-menu-icon-button", { "is-selected": G.value.isBold }]),
|
|
2816
|
-
"aria-pressed": G.value.isBold,
|
|
2817
|
-
"aria-label": "加粗",
|
|
2818
|
-
onClick: t[53] ||= (e) => Y({ type: "toggle-bold" })
|
|
2819
|
-
}, {
|
|
2820
|
-
default: T(() => [_(w(Lt), { "aria-hidden": "true" })]),
|
|
2821
|
-
_: 1
|
|
2822
|
-
}, 8, ["class", "aria-pressed"])]),
|
|
2823
|
-
_: 1
|
|
2824
|
-
}),
|
|
2825
|
-
_(w(D), { title: "斜体" }, {
|
|
2826
|
-
default: T(() => [_(w(E), {
|
|
2827
|
-
size: "small",
|
|
2828
|
-
class: b(["gd-contract-template-designer__text-menu-icon-button", { "is-selected": G.value.isItalic }]),
|
|
2829
|
-
"aria-pressed": G.value.isItalic,
|
|
2830
|
-
"aria-label": "斜体",
|
|
2831
|
-
onClick: t[54] ||= (e) => Y({ type: "toggle-italic" })
|
|
2832
|
-
}, {
|
|
2833
|
-
default: T(() => [_(w(Xt), { "aria-hidden": "true" })]),
|
|
2834
|
-
_: 1
|
|
2835
|
-
}, 8, ["class", "aria-pressed"])]),
|
|
2836
|
-
_: 1
|
|
2837
|
-
}),
|
|
2838
|
-
_(w(D), { title: "下划线" }, {
|
|
2839
|
-
default: T(() => [_(w(E), {
|
|
2840
|
-
size: "small",
|
|
2841
|
-
class: b(["gd-contract-template-designer__text-menu-icon-button", { "is-selected": G.value.isUnderline }]),
|
|
2842
|
-
"aria-pressed": G.value.isUnderline,
|
|
2843
|
-
"aria-label": "下划线",
|
|
2844
|
-
onClick: t[55] ||= (e) => Y({ type: "toggle-underline" })
|
|
2845
|
-
}, {
|
|
2846
|
-
default: T(() => [_(w(on), { "aria-hidden": "true" })]),
|
|
2847
|
-
_: 1
|
|
2848
|
-
}, 8, ["class", "aria-pressed"])]),
|
|
2849
|
-
_: 1
|
|
2850
|
-
}),
|
|
2851
|
-
t[96] ||= h("span", {
|
|
2852
|
-
class: "gd-contract-template-designer__text-menu-divider",
|
|
2853
|
-
"aria-hidden": "true"
|
|
2854
|
-
}, null, -1),
|
|
2855
|
-
_(w(D), { title: "有序列表" }, {
|
|
2856
|
-
default: T(() => [_(w(E), {
|
|
2857
|
-
size: "small",
|
|
2858
|
-
class: b(["gd-contract-template-designer__text-menu-icon-button", { "is-selected": G.value.isOrderedList }]),
|
|
2859
|
-
"aria-pressed": G.value.isOrderedList,
|
|
2860
|
-
"aria-label": "有序列表",
|
|
2861
|
-
onClick: t[56] ||= (e) => Y({ type: "toggle-ordered-list" })
|
|
2862
|
-
}, {
|
|
2863
|
-
default: T(() => [_(w(Qt), { "aria-hidden": "true" })]),
|
|
2864
|
-
_: 1
|
|
2865
|
-
}, 8, ["class", "aria-pressed"])]),
|
|
2866
|
-
_: 1
|
|
2867
|
-
}),
|
|
2868
|
-
_(w(D), { title: "无序列表" }, {
|
|
2869
|
-
default: T(() => [_(w(E), {
|
|
2870
|
-
size: "small",
|
|
2871
|
-
class: b(["gd-contract-template-designer__text-menu-icon-button", { "is-selected": G.value.isBulletList }]),
|
|
2872
|
-
"aria-pressed": G.value.isBulletList,
|
|
2873
|
-
"aria-label": "无序列表",
|
|
2874
|
-
onClick: t[57] ||= (e) => Y({ type: "toggle-bullet-list" })
|
|
2875
|
-
}, {
|
|
2876
|
-
default: T(() => [_(w(cn), { "aria-hidden": "true" })]),
|
|
2877
|
-
_: 1
|
|
2878
|
-
}, 8, ["class", "aria-pressed"])]),
|
|
2879
|
-
_: 1
|
|
2880
|
-
})
|
|
2881
|
-
]),
|
|
2882
|
-
h("div", or, [_(w(D), { title: "清除文字格式" }, {
|
|
2883
|
-
default: T(() => [_(w(E), {
|
|
2884
|
-
size: "small",
|
|
2885
|
-
class: "gd-contract-template-designer__text-menu-clear-action",
|
|
2886
|
-
"aria-label": "清除文字格式",
|
|
2887
|
-
onClick: t[58] ||= (e) => Y({ type: "clear-text-format" })
|
|
2888
|
-
}, {
|
|
2889
|
-
default: T(() => [_(w(Rt), { "aria-hidden": "true" }), t[97] ||= h("span", null, "清文字", -1)]),
|
|
2890
|
-
_: 1
|
|
2891
|
-
})]),
|
|
2892
|
-
_: 1
|
|
2893
|
-
}), _(w(D), { title: "清除段落格式" }, {
|
|
2894
|
-
default: T(() => [_(w(E), {
|
|
2895
|
-
size: "small",
|
|
2896
|
-
class: "gd-contract-template-designer__text-menu-clear-action",
|
|
2897
|
-
"aria-label": "清除段落格式",
|
|
2898
|
-
onClick: t[59] ||= (e) => Y({ type: "clear-block-format" })
|
|
2899
|
-
}, {
|
|
2900
|
-
default: T(() => [_(w(qt), { "aria-hidden": "true" }), t[98] ||= h("span", null, "清段落", -1)]),
|
|
2901
|
-
_: 1
|
|
2902
|
-
})]),
|
|
2903
|
-
_: 1
|
|
2904
|
-
})])
|
|
2905
|
-
], 36)) : p("", !0)
|
|
1874
|
+
ref: zn,
|
|
1875
|
+
"bind-open": Bn.value,
|
|
1876
|
+
"onUpdate:bindOpen": t[20] ||= (e) => Bn.value = e,
|
|
1877
|
+
"bind-keyword": Vn.value,
|
|
1878
|
+
"onUpdate:bindKeyword": t[21] ||= (e) => Vn.value = e,
|
|
1879
|
+
x: I.value.x,
|
|
1880
|
+
y: I.value.y,
|
|
1881
|
+
"has-selection": I.value.hasSelection,
|
|
1882
|
+
"editor-state": Zr.value,
|
|
1883
|
+
"font-size-preset-options": ri.value,
|
|
1884
|
+
"current-editor-font-size": ei.value,
|
|
1885
|
+
"editor-font-size-search-value": jn.value,
|
|
1886
|
+
"text-align-options": _(br),
|
|
1887
|
+
"current-editor-text-color": ti.value,
|
|
1888
|
+
"body-control-tool-items": kr.value,
|
|
1889
|
+
"text-menu-bindable-variables": Jr.value,
|
|
1890
|
+
"page-limit-reached": jr.value,
|
|
1891
|
+
"table-insert-draft": Kn.value,
|
|
1892
|
+
"variables-count": w.value.variables.length,
|
|
1893
|
+
"resolve-bind-variable-type-label": ya,
|
|
1894
|
+
onCommand: yi,
|
|
1895
|
+
onClipboard: bi,
|
|
1896
|
+
onOpenImage: Ki,
|
|
1897
|
+
onAddPage: Xi,
|
|
1898
|
+
onInsertVariable: ga,
|
|
1899
|
+
onBindVariable: va,
|
|
1900
|
+
onOpenBindPanel: ba,
|
|
1901
|
+
onKeydown: Go,
|
|
1902
|
+
onPatchFontSize: yo,
|
|
1903
|
+
onPatchTextAlign: _o,
|
|
1904
|
+
onPatchColor: So,
|
|
1905
|
+
onFontSizeSearch: Co,
|
|
1906
|
+
onFontSizeCommit: wo,
|
|
1907
|
+
onFontSizeDropdownChange: Eo,
|
|
1908
|
+
onFontSizeKeydown: To
|
|
1909
|
+
}, null, 8, [
|
|
1910
|
+
"bind-open",
|
|
1911
|
+
"bind-keyword",
|
|
1912
|
+
"x",
|
|
1913
|
+
"y",
|
|
1914
|
+
"has-selection",
|
|
1915
|
+
"editor-state",
|
|
1916
|
+
"font-size-preset-options",
|
|
1917
|
+
"current-editor-font-size",
|
|
1918
|
+
"editor-font-size-search-value",
|
|
1919
|
+
"text-align-options",
|
|
1920
|
+
"current-editor-text-color",
|
|
1921
|
+
"body-control-tool-items",
|
|
1922
|
+
"text-menu-bindable-variables",
|
|
1923
|
+
"page-limit-reached",
|
|
1924
|
+
"table-insert-draft",
|
|
1925
|
+
"variables-count"
|
|
1926
|
+
])) : xt("", !0)
|
|
2906
1927
|
])),
|
|
2907
|
-
|
|
1928
|
+
Ct("input", {
|
|
2908
1929
|
ref_key: "imageFileInputElement",
|
|
2909
|
-
ref:
|
|
1930
|
+
ref: an,
|
|
2910
1931
|
class: "gd-contract-template-designer__hidden-file-input",
|
|
2911
1932
|
type: "file",
|
|
2912
1933
|
accept: "image/png,image/jpeg,image/webp,image/gif,image/bmp",
|
|
2913
1934
|
tabindex: "-1",
|
|
2914
1935
|
"aria-hidden": "true",
|
|
2915
|
-
onChange:
|
|
1936
|
+
onChange: qi
|
|
2916
1937
|
}, null, 544),
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
open:
|
|
2920
|
-
"onUpdate:open": t[
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
},
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
page: e.page,
|
|
2941
|
-
"fallback-page-size": Ki.value.file.template.pageSize,
|
|
2942
|
-
"content-html": e.contentHtml,
|
|
2943
|
-
"signing-placements": e.signingPlacements
|
|
2944
|
-
}, null, 8, [
|
|
2945
|
-
"page",
|
|
2946
|
-
"fallback-page-size",
|
|
2947
|
-
"content-html",
|
|
2948
|
-
"signing-placements"
|
|
2949
|
-
]))), 128))])) : p("", !0)])) : (x(!0), m(mt, { key: 1 }, yt(Wi.value, (e) => (x(), f(Re, {
|
|
2950
|
-
key: e.page.id,
|
|
2951
|
-
page: e.page,
|
|
2952
|
-
"fallback-page-size": ai.value?.pageSize ?? w(pe),
|
|
2953
|
-
"content-html": e.contentHtml,
|
|
2954
|
-
"signing-placements": e.signingPlacements
|
|
2955
|
-
}, null, 8, [
|
|
2956
|
-
"page",
|
|
2957
|
-
"fallback-page-size",
|
|
2958
|
-
"content-html",
|
|
2959
|
-
"signing-placements"
|
|
2960
|
-
]))), 128))], 2)]),
|
|
2961
|
-
_: 1
|
|
2962
|
-
}, 8, ["open"]),
|
|
2963
|
-
_(w(Ot), {
|
|
2964
|
-
open: ci.value,
|
|
2965
|
-
"onUpdate:open": t[61] ||= (e) => ci.value = e,
|
|
2966
|
-
title: "提交数据查看",
|
|
2967
|
-
width: "min(960px, calc(100vw - 48px))",
|
|
2968
|
-
centered: "",
|
|
2969
|
-
footer: null,
|
|
2970
|
-
"wrap-class-name": "gd-contract-template-designer__submit-data-modal",
|
|
2971
|
-
onCancel: js
|
|
2972
|
-
}, {
|
|
2973
|
-
default: T(() => [h("pre", pr, C(li.value), 1)]),
|
|
2974
|
-
_: 1
|
|
2975
|
-
}, 8, ["open"])
|
|
1938
|
+
Ct("span", Bt, At(z.value), 1),
|
|
1939
|
+
wt(Ue, {
|
|
1940
|
+
open: bn.value,
|
|
1941
|
+
"onUpdate:open": t[22] ||= (e) => bn.value = e,
|
|
1942
|
+
"preview-pages": nr.value,
|
|
1943
|
+
"preview-file-groups": rr.value,
|
|
1944
|
+
"preview-active-group": ir.value,
|
|
1945
|
+
"preview-snapshot": j.value,
|
|
1946
|
+
onCancel: Pa,
|
|
1947
|
+
onSelectFile: t[23] ||= (e) => Sn.value = e
|
|
1948
|
+
}, null, 8, [
|
|
1949
|
+
"open",
|
|
1950
|
+
"preview-pages",
|
|
1951
|
+
"preview-file-groups",
|
|
1952
|
+
"preview-active-group",
|
|
1953
|
+
"preview-snapshot"
|
|
1954
|
+
]),
|
|
1955
|
+
wt(We, {
|
|
1956
|
+
open: Cn.value,
|
|
1957
|
+
"onUpdate:open": t[24] ||= (e) => Cn.value = e,
|
|
1958
|
+
json: wn.value,
|
|
1959
|
+
onCancel: La
|
|
1960
|
+
}, null, 8, ["open", "json"])
|
|
2976
1961
|
], 6));
|
|
2977
1962
|
}
|
|
2978
1963
|
});
|
|
2979
1964
|
//#endregion
|
|
2980
|
-
export {
|
|
1965
|
+
export { Zt as default };
|