@guodun/antdv 1.4.4 → 1.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/components/contract-signing-location/src/ContractSigningLocation.vue.mjs +85 -85
- package/dist/es/components/dept-selector/src/dept.mjs +170 -142
- package/dist/es/components/index.mjs +1 -0
- package/dist/es/components/pro-contract-template-designer/index.mjs +1 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerInspector.vue.mjs +372 -185
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.vue.mjs +59 -42
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateRendererField.vue.mjs +218 -85
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateVariableDataModal.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateVariableDataModal.vue.mjs +97 -0
- package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.mjs +914 -853
- package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateRenderer.vue.mjs +550 -245
- package/dist/es/components/pro-contract-template-designer/src/composables/use-template-designer.mjs +214 -139
- package/dist/es/components/pro-contract-template-designer/src/extensions/template-variable.mjs +53 -35
- package/dist/es/components/pro-contract-template-designer/src/types.mjs +15 -2
- package/dist/es/components/pro-contract-template-designer/src/utils/advanced-controls.mjs +91 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/template-renderer.mjs +96 -65
- package/dist/es/components/pro-contract-template-designer/src/utils/template-tool-icons.mjs +23 -16
- package/dist/es/components/pro-contract-template-designer/style/index.css +1 -1
- package/dist/es/components/pro-selector/src/components/org-tree.mjs +130 -89
- package/dist/es/components/pro-selector/src/components/user.mjs +34 -26
- package/dist/es/components/pro-selector/src/pro-user.mjs +86 -72
- package/dist/es/components/pro-selector/src/types.mjs +4 -1
- package/dist/es/components/pro-selector/src/utils/orgTree.mjs +5 -2
- package/dist/es/components/pro-selector-group/src/compoents/dept-tree.vue.mjs +92 -65
- package/dist/es/components/pro-selector-group/src/compoents/dept.vue.mjs +3 -3
- package/dist/es/components/pro-selector-group/src/compoents/role.vue.mjs +98 -73
- package/dist/es/components/pro-selector-group/src/compoents/select-box.vue.mjs +12 -9
- package/dist/es/components/pro-selector-group/src/compoents/user.vue.mjs +101 -72
- package/dist/es/components/pro-selector-group/src/hooks/useApi.mjs +39 -22
- package/dist/es/components/pro-selector-group/src/index.vue.mjs +105 -83
- package/dist/es/components/pro-selector-group/src/utils/index.mjs +36 -0
- package/dist/es/components/role-selector/src/role.mjs +134 -120
- package/dist/es/index.mjs +50 -49
- package/dist/lib/components/contract-signing-location/src/ContractSigningLocation.vue.cjs +1 -1
- package/dist/lib/components/dept-selector/src/dept.cjs +1 -1
- package/dist/lib/components/index.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/index.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerInspector.vue.cjs +2 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateRendererField.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateVariableDataModal.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateVariableDataModal.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ProContractTemplateRenderer.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/composables/use-template-designer.cjs +4 -4
- package/dist/lib/components/pro-contract-template-designer/src/extensions/template-variable.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/types.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/utils/advanced-controls.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/src/utils/template-tool-icons.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/style/index.css +1 -1
- package/dist/lib/components/pro-selector/src/components/org-tree.cjs +1 -1
- package/dist/lib/components/pro-selector/src/components/user.cjs +1 -1
- package/dist/lib/components/pro-selector/src/pro-user.cjs +1 -1
- package/dist/lib/components/pro-selector/src/types.cjs +1 -1
- package/dist/lib/components/pro-selector/src/utils/orgTree.cjs +1 -1
- package/dist/lib/components/pro-selector-group/src/compoents/dept-tree.vue.cjs +1 -1
- package/dist/lib/components/pro-selector-group/src/compoents/dept.vue.cjs +1 -1
- package/dist/lib/components/pro-selector-group/src/compoents/role.vue.cjs +1 -1
- package/dist/lib/components/pro-selector-group/src/compoents/select-box.vue.cjs +1 -1
- package/dist/lib/components/pro-selector-group/src/compoents/user.vue.cjs +1 -1
- package/dist/lib/components/pro-selector-group/src/hooks/useApi.cjs +1 -1
- package/dist/lib/components/pro-selector-group/src/index.vue.cjs +1 -1
- package/dist/lib/components/pro-selector-group/src/utils/index.cjs +1 -0
- package/dist/lib/components/role-selector/src/role.cjs +1 -1
- package/dist/lib/index.cjs +1 -1
- package/dist/theme/dept-selector.css +1 -1
- package/dist/theme/icon.css +1 -1
- package/dist/theme/index.css +1 -1
- package/dist/theme/pro-selector-group.css +1 -1
- package/dist/theme/pro-selector.css +1 -1
- package/dist/theme/role-selector.css +1 -1
- package/dist/types/components/contract-signing-location/src/ContractSigningLocation.vue.d.ts +3 -3
- package/dist/types/components/pro-contract-template-designer/index.d.ts +1 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateDesignerInspector.vue.d.ts +1 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.vue.d.ts +3 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateRendererField.vue.d.ts +7 -1
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateVariableDataModal.vue.d.ts +14 -0
- package/dist/types/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.d.ts +13 -1
- package/dist/types/components/pro-contract-template-designer/src/ProContractTemplateRenderer.vue.d.ts +11 -1
- package/dist/types/components/pro-contract-template-designer/src/composables/use-template-designer.d.ts +4 -0
- package/dist/types/components/pro-contract-template-designer/src/extensions/template-variable.d.ts +11 -1
- package/dist/types/components/pro-contract-template-designer/src/types.d.ts +131 -2
- package/dist/types/components/pro-contract-template-designer/src/utils/advanced-controls.d.ts +15 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/template-renderer.d.ts +10 -2
- package/dist/types/components/pro-selector/index.d.ts +9 -0
- package/dist/types/components/pro-selector/src/components/user.d.ts +9 -0
- package/dist/types/components/pro-selector/src/types.d.ts +2 -0
- package/dist/types/components/pro-selector/src/utils/orgTree.d.ts +4 -1
- package/dist/types/components/pro-selector-group/src/compoents/select-box.vue.d.ts +4 -4
- package/dist/types/components/pro-selector-group/src/hooks/useApi.d.ts +6 -1
- package/dist/types/components/pro-selector-group/src/utils/index.d.ts +8 -0
- package/package.json +3 -1
package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.mjs
CHANGED
|
@@ -2,49 +2,51 @@ import { CONTRACT_BLOCK_STYLES as e, DEFAULT_CONTRACT_FONT_FAMILY as t, DEFAULT_
|
|
|
2
2
|
import { collectPageDecorationVariableKeys as a, normalizePageDecorations as o, resolvePageDecorationPreset as ee, resolvePageDecorationValidationPath as te, rewritePageDecorationVariableTokens as ne } from "./utils/page-decorations.mjs";
|
|
3
3
|
import { isContractTemplateFieldType as re } from "./types.mjs";
|
|
4
4
|
import { ContractTemplateLocationRuleBuildError as ie, SIGNING_PLACEMENT_TYPE_LABELS as ae, buildContractLocationRules as oe, buildSigningPlacementLocationRules as se, createSigningPlacement as ce, resolveSigningPlacementToolItems as le, scaleSigningPlacementToPage as ue } from "./utils/signing-placement.mjs";
|
|
5
|
-
import {
|
|
6
|
-
import { isSafeContractImageUrl as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
5
|
+
import { DEFAULT_ADVANCED_CHOICE_FIELD_TYPES as de, DEFAULT_BUILTIN_SELECTOR_FIELD_TYPES as fe, DEFAULT_CUSTOM_FIELD_TYPES as pe, DEFAULT_FIELD_STYLE as me, DEFAULT_FIELD_TYPES as s, DEFAULT_PAGE_SIZE as he, buildTemplatePreviewPages as ge, cloneTemplateValue as c, collectTemplateLocationRuleExportErrors as _e, collectTemplateValueVariableKeys as ve, constrainTemplatePageSizes as ye, createBlankPage as be, createBlankTemplate as xe, createDefaultPage as Se, createTemplateVariable as Ce, exportTemplateValue as we, getFieldOption as Te, getPageSizeKey as Ee, normalizeContractTemplateMaxPages as De, normalizePageSizeOptions as Oe, normalizeTemplateValue as ke, resolvePageSize as Ae, syncTemplateVariablesWithPages as je, validateContractTemplateVariableKey as Me, validateTemplateValue as Ne } from "./composables/use-template-designer.mjs";
|
|
6
|
+
import { isSafeContractImageUrl as Pe } from "./utils/image-url.mjs";
|
|
7
|
+
import { buildTemplateVariableData as Fe } from "./utils/template-renderer.mjs";
|
|
8
|
+
import { useFitWidthZoom as Ie } from "./composables/use-fit-width-zoom.mjs";
|
|
9
|
+
import { normalizeContractImageDimension as Le, processContractImageFile as Re } from "./utils/content-image.mjs";
|
|
10
|
+
import { inferContextVariableLabel as ze, resolveContextVariableWidth as Be } from "./utils/context-variable.mjs";
|
|
11
|
+
import Ve from "./DesignerPage.mjs";
|
|
12
|
+
import He from "./TableContextMenu.mjs";
|
|
13
|
+
import Ue from "./ContractTemplateDesignerWorkspaceHeader.mjs";
|
|
14
|
+
import We from "./ContractTemplateDesignerToolbar.mjs";
|
|
15
|
+
import Ge from "./ContractTemplateTextContextMenu.mjs";
|
|
16
|
+
import Ke from "./ContractTemplateTextBubbleMenu.mjs";
|
|
17
|
+
import qe from "./ContractTemplateImageContextMenu.mjs";
|
|
18
|
+
import Je from "./ContractTemplatePreviewModal.mjs";
|
|
19
|
+
import Ye from "./ContractTemplateSubmitDataModal.mjs";
|
|
20
|
+
import Xe from "./ContractTemplateVariableDataModal.mjs";
|
|
21
|
+
import { DEFAULT_DRAFT_CACHE_INTERVAL as Ze, DEFAULT_DRAFT_CACHE_KEY as Qe, DEFAULT_DRAFT_CACHE_MAX_BYTES as l, createDraftCacheStatus as $e, formatDraftCacheSavedAt as et } from "./composables/use-template-draft-cache.mjs";
|
|
22
|
+
import { useAutoPagination as tt } from "./composables/use-auto-pagination.mjs";
|
|
23
|
+
import { resolveSetActiveFileIdOptions as nt } from "./composables/use-designer-files.mjs";
|
|
24
|
+
import { cloneContractTemplateFiles as u, constrainContractTemplateFiles as rt, createContractTemplateFile as it, exportContractTemplateFiles as at, moveContractTemplateFile as ot, normalizeContractTemplateFiles as st, removeContractTemplateFile as ct, renameContractTemplateFile as lt, replaceContractTemplateFile as ut, resolveContractTemplateActiveFileId as dt } from "./composables/use-template-files.mjs";
|
|
25
|
+
import { useDraftCacheSession as ft } from "./composables/use-draft-cache-session.mjs";
|
|
26
|
+
import { cloneSigningPlacement as pt, useSigningPlacementEditor as mt } from "./composables/use-signing-placement-editor.mjs";
|
|
27
|
+
import { resolveFieldTypeIcon as ht, resolveSigningPlacementTypeIcon as gt } from "./utils/template-tool-icons.mjs";
|
|
28
|
+
import _t from "./ContractTemplateFileBar.mjs";
|
|
29
|
+
import vt from "./ContractTemplateDesignerSidebar.mjs";
|
|
30
|
+
import yt from "./ContractTemplateDesignerInspector.mjs";
|
|
31
|
+
import bt from "./ContractTemplatePageDecorationsStudio.mjs";
|
|
30
32
|
import { serializeFingerprint as d } from "./utils/serialize-fingerprint.mjs";
|
|
31
|
-
import { isSameEditorState as
|
|
32
|
-
import { clampContextMenuPosition as
|
|
33
|
-
import { Fragment as
|
|
34
|
-
import { Alert as
|
|
35
|
-
import { useElementSize as
|
|
36
|
-
import { CompressOutlined as
|
|
33
|
+
import { isSameEditorState as xt } from "./utils/editor-state.mjs";
|
|
34
|
+
import { clampContextMenuPosition as St, clampContextMenuToElement as Ct } from "./utils/context-menu-viewport.mjs";
|
|
35
|
+
import { Fragment as wt, Teleport as Tt, computed as f, createBlock as Et, createCommentVNode as Dt, createElementBlock as Ot, createElementVNode as p, createVNode as m, defineComponent as h, nextTick as g, normalizeClass as kt, normalizeStyle as At, onBeforeUnmount as jt, onMounted as Mt, openBlock as _, ref as v, renderList as Nt, toDisplayString as Pt, unref as y, useId as Ft, vShow as It, watch as b, withCtx as Lt, withDirectives as Rt } from "vue";
|
|
36
|
+
import { Alert as zt, Modal as Bt, Tooltip as Vt } from "ant-design-vue";
|
|
37
|
+
import { useElementSize as Ht } from "@vueuse/core";
|
|
38
|
+
import { CompressOutlined as Ut, DownOutlined as Wt } from "@ant-design/icons-vue";
|
|
37
39
|
//#region src/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue?vue&type=script&setup=true&lang.ts
|
|
38
|
-
var
|
|
40
|
+
var Gt = {
|
|
39
41
|
key: 2,
|
|
40
42
|
class: "gd-contract-template-designer__validation"
|
|
41
|
-
},
|
|
43
|
+
}, Kt = {
|
|
42
44
|
key: 0,
|
|
43
45
|
class: "gd-contract-template-designer__validation-list"
|
|
44
|
-
},
|
|
46
|
+
}, qt = ["onClick"], Jt = {
|
|
45
47
|
class: "gd-contract-template-designer__sr-status",
|
|
46
48
|
"aria-live": "polite"
|
|
47
|
-
},
|
|
49
|
+
}, Yt = .5, Xt = 1.5, Zt = .1, Qt = 120, $t = 128, en = 108, tn = 48, nn = 24, rn = 10, an = 48, on = 8, sn = /* @__PURE__ */ h({
|
|
48
50
|
name: "ProContractTemplateDesigner",
|
|
49
51
|
__name: "ProContractTemplateDesigner",
|
|
50
52
|
props: {
|
|
@@ -60,19 +62,35 @@ var Bt = {
|
|
|
60
62
|
default: !1
|
|
61
63
|
},
|
|
62
64
|
height: { default: 760 },
|
|
63
|
-
pageSize: { default: () =>
|
|
65
|
+
pageSize: { default: () => he },
|
|
64
66
|
pageSizeOptions: {},
|
|
65
67
|
maxPages: { default: 20 },
|
|
66
68
|
imageCompression: { type: [Object, Boolean] },
|
|
67
69
|
imageUpload: {},
|
|
68
70
|
variableTypes: { default: () => s },
|
|
69
|
-
|
|
71
|
+
showAdvancedChoiceControls: {
|
|
72
|
+
type: Boolean,
|
|
73
|
+
default: !1
|
|
74
|
+
},
|
|
75
|
+
showBuiltinSelectorControls: {
|
|
76
|
+
type: Boolean,
|
|
77
|
+
default: !1
|
|
78
|
+
},
|
|
79
|
+
showCustomControls: {
|
|
80
|
+
type: Boolean,
|
|
81
|
+
default: !1
|
|
82
|
+
},
|
|
83
|
+
defaultVariableStyle: { default: () => me },
|
|
70
84
|
fontFamilies: { default: void 0 },
|
|
71
85
|
fontFamilyMode: { default: "append" },
|
|
72
86
|
showSubmitDataViewer: {
|
|
73
87
|
type: Boolean,
|
|
74
88
|
default: !0
|
|
75
89
|
},
|
|
90
|
+
showVariableDataViewer: {
|
|
91
|
+
type: Boolean,
|
|
92
|
+
default: !0
|
|
93
|
+
},
|
|
76
94
|
showClearButton: {
|
|
77
95
|
type: Boolean,
|
|
78
96
|
default: !0
|
|
@@ -85,8 +103,8 @@ var Bt = {
|
|
|
85
103
|
type: Boolean,
|
|
86
104
|
default: !0
|
|
87
105
|
},
|
|
88
|
-
draftCacheKey: { default:
|
|
89
|
-
draftCacheInterval: { default:
|
|
106
|
+
draftCacheKey: { default: Qe },
|
|
107
|
+
draftCacheInterval: { default: Ze },
|
|
90
108
|
draftCacheMaxBytes: { default: l },
|
|
91
109
|
showDraftCacheStatus: {
|
|
92
110
|
type: Boolean,
|
|
@@ -113,62 +131,65 @@ var Bt = {
|
|
|
113
131
|
"signing-placement-remove",
|
|
114
132
|
"signing-placement-select"
|
|
115
133
|
],
|
|
116
|
-
setup(s, { expose:
|
|
117
|
-
let l = s, h =
|
|
118
|
-
function
|
|
134
|
+
setup(s, { expose: Ze, emit: Qe }) {
|
|
135
|
+
let l = s, h = Qe, sn = f(() => ({ height: typeof l.height == "number" ? `${l.height}px` : l.height })), cn = v(), ln = v(), un = v(), dn = v(), fn = v(), pn = `gd-contract-template-page-decorations-studio-${Ft()}`, mn = `gd-contract-template-workspace-chrome-${Ft()}`, hn = v(), gn = v();
|
|
136
|
+
function _n(e) {
|
|
119
137
|
if (!e || !Array.isArray(e.pages) || !Array.isArray(e.signingPlacements)) return [];
|
|
120
138
|
try {
|
|
121
|
-
return
|
|
139
|
+
return Ne(e).filter((e) => e.type === "signing-placement");
|
|
122
140
|
} catch {
|
|
123
141
|
return [];
|
|
124
142
|
}
|
|
125
143
|
}
|
|
126
|
-
function
|
|
127
|
-
return Object.fromEntries(e.map((e, n) => [e.id,
|
|
144
|
+
function vn(e, t) {
|
|
145
|
+
return Object.fromEntries(e.map((e, n) => [e.id, _n(t?.[n]?.template ?? e.template)]));
|
|
128
146
|
}
|
|
129
|
-
let
|
|
147
|
+
let yn = "", bn = "", xn = v(!1), x = f(() => xn.value || Array.isArray(l.files)), Sn = st(l.files, l.modelValue, l.pageSize), Cn = rt(Sn, l.pageSizeOptions), wn = x.value ? Cn.files : Sn, Tn = dt(wn, l.activeFileId), S = v(wn), C = v(Tn), En = wn.find((e) => e.id === Tn) ?? wn[0], w = v(vn(wn, Array.isArray(l.files) ? l.files : l.modelValue ? [{ template: l.modelValue }] : void 0)), T = v(w.value[Tn] ?? _n(En?.template)), Dn = ke(En?.template ?? l.modelValue, l.pageSize), On = ye(Dn, l.pageSizeOptions), E = v(On.value);
|
|
130
148
|
if (x.value) {
|
|
131
|
-
if (S.value =
|
|
149
|
+
if (S.value = ut(S.value, C.value, On.value), d(S.value) !== d(Sn)) {
|
|
132
150
|
let e = u(S.value);
|
|
133
|
-
|
|
151
|
+
yn = d(e), h("update:files", e), h("files-change", u(e));
|
|
134
152
|
}
|
|
135
|
-
} else l.modelValue && d(
|
|
136
|
-
let D = v(""), O = v(""), k = v(E.value.pages[0]?.id ?? ""), A = v(!1), j = v([]), M = /* @__PURE__ */ new Map(),
|
|
153
|
+
} else l.modelValue && d(On.value) !== d(Dn) && (bn = d(On.value), h("update:modelValue", c(On.value)), h("change", c(On.value)), Xi(On.resizedSigningPlacementIds, On.value));
|
|
154
|
+
let D = v(""), O = v(""), k = v(E.value.pages[0]?.id ?? ""), A = v(!1), j = v([]), M = /* @__PURE__ */ new Map(), kn = v(!1), An = v(""), jn = v(!1), Mn = v(), Nn = v(), Pn = v(""), Fn = v(!1), In = v(""), Ln = v(!1), Rn = v({
|
|
155
|
+
values: {},
|
|
156
|
+
variables: []
|
|
157
|
+
}), N = v(1), P = v(!1), zn = v(!1), Bn = v(!1), Vn = v(!1), Hn = v(!1), Un = v(), F = v(!1), Wn = v("header"), Gn = v(!1), Kn = v({}), qn = v(""), I = v(!1), L = v(!1), Jn = v(!1), Yn = v(!1), Xn = v(""), Zn = v(), Qn = v(), $n = v(""), er = v(!1), R = v(), tr = v(), z = v(), nr = v(), rr = v(!1), ir, ar = v(!1), or, sr = v(!1), cr = v(""), B = v(), lr = v(), V = v(), ur = v(), dr = v(), fr = v(), H = v(""), U = v($e("idle", "暂无本地草稿")), pr = v({
|
|
137
158
|
rows: 3,
|
|
138
159
|
cols: 3,
|
|
139
160
|
withHeaderRow: !0
|
|
140
|
-
}),
|
|
161
|
+
}), mr = /* @__PURE__ */ new WeakSet(), hr = [".gd-contract-template-designer__page-decorations-select-popup", ".gd-contract-template-designer__page-decorations-dropdown-popup"].join(","), gr, _r, vr = !1, yr = !1, br, W = f(() => l.readonly || l.disabled), xr = f(() => !!(R.value || B.value || V.value || I.value || L.value || Gn.value || Jn.value || Yn.value)), Sr = f(() => !!l.enableDraftCache && !W.value), Cr = f(() => S.value.find((e) => e.id === C.value) ?? S.value[0]), wr = f(() => l.draftCacheKey), G = f(() => E.value.variables.find((e) => e.key === D.value)), K = f(() => E.value.signingPlacements ?? []), Tr = f(() => Mn.value ? ge(Mn.value) : []), Er = f(() => (Nn.value ?? []).map((e) => ({
|
|
141
162
|
file: e,
|
|
142
|
-
pages:
|
|
143
|
-
}))),
|
|
163
|
+
pages: ge(e.template)
|
|
164
|
+
}))), Dr = f(() => Er.value.find((e) => e.file.id === Pn.value) ?? Er.value[0]), Or = f(() => K.value.find((e) => e.id === O.value)), kr = f(() => K.value.map((e) => {
|
|
144
165
|
let t = E.value.pages.findIndex((t) => t.id === e.pageId);
|
|
145
166
|
return {
|
|
146
167
|
placement: e,
|
|
147
168
|
label: ae[e.type],
|
|
148
169
|
detail: `${ae[e.type]} · 第 ${Math.max(0, t) + 1} 页`
|
|
149
170
|
};
|
|
150
|
-
})),
|
|
151
|
-
let e =
|
|
152
|
-
return
|
|
153
|
-
}), q = f(() => E.value.pages.find((e) => e.id === k.value) ?? E.value.pages[0]),
|
|
171
|
+
})), Ar = f(() => {
|
|
172
|
+
let e = Or.value?.pageId;
|
|
173
|
+
return Ji(E.value.pages.find((t) => t.id === e));
|
|
174
|
+
}), q = f(() => E.value.pages.find((e) => e.id === k.value) ?? E.value.pages[0]), jr = f(() => Ae(q.value?.pageSize, E.value.pageSize)), Mr = f(() => A.value && j.value.length === 0), Nr = f(() => A.value ? Mr.value ? "校验通过,正文变量与变量配置一致" : `发现 ${j.value.length} 个校验问题` : ""), Pr = f(() => {
|
|
154
175
|
let e = q.value?.title || "合同正文";
|
|
155
|
-
return `${x.value &&
|
|
156
|
-
}),
|
|
176
|
+
return `${x.value && Cr.value ? `${Cr.value.name} · ` : ""}${e} · ${jr.value.label} · 共 ${E.value.pages.length} 页`;
|
|
177
|
+
}), Fr = f(() => ({
|
|
157
178
|
none: "无装饰",
|
|
158
179
|
"page-number": "标准页码",
|
|
159
180
|
"internal-review": "内部审阅",
|
|
160
181
|
draft: "草稿",
|
|
161
182
|
custom: "自定义"
|
|
162
|
-
})[ee(E.value.pageDecorations)]),
|
|
183
|
+
})[ee(E.value.pageDecorations)]), Ir = f(() => {
|
|
163
184
|
let e = o(E.value.pageDecorations);
|
|
164
185
|
return {
|
|
165
186
|
header: e.header.enabled,
|
|
166
187
|
footer: e.footer.enabled,
|
|
167
188
|
watermark: e.watermark.enabled
|
|
168
189
|
};
|
|
169
|
-
}),
|
|
190
|
+
}), Lr = f(() => Object.values(Ir.value).filter(Boolean).length), Rr = f(() => {
|
|
170
191
|
switch (U.value.type) {
|
|
171
|
-
case "saved": return `草稿已缓存 ${
|
|
192
|
+
case "saved": return `草稿已缓存 ${et(U.value.savedAt)}`;
|
|
172
193
|
case "restored": return "已恢复本地草稿";
|
|
173
194
|
case "too-large": return "草稿过大,未缓存";
|
|
174
195
|
case "unavailable":
|
|
@@ -177,23 +198,23 @@ var Bt = {
|
|
|
177
198
|
case "cleared": return "草稿缓存已清理";
|
|
178
199
|
default: return "";
|
|
179
200
|
}
|
|
180
|
-
}),
|
|
201
|
+
}), zr = f(() => ({
|
|
181
202
|
"is-success": U.value.type === "saved" || U.value.type === "restored",
|
|
182
203
|
"is-warning": U.value.type === "too-large",
|
|
183
204
|
"is-error": U.value.type === "unavailable" || U.value.type === "read-failed" || U.value.type === "write-failed"
|
|
184
|
-
})),
|
|
205
|
+
})), Br = f(() => `${Math.round(N.value * 100)}%`), Vr = f(() => i(l.fontFamilies, l.fontFamilyMode)), Hr = f(() => Vr.value.map((e) => ({
|
|
185
206
|
label: e.label,
|
|
186
207
|
value: e.value
|
|
187
|
-
}))),
|
|
208
|
+
}))), Ur = r, Wr = [...e.map((e) => ({
|
|
188
209
|
label: e.label,
|
|
189
210
|
value: e.format
|
|
190
|
-
}))],
|
|
211
|
+
}))], Gr = [{
|
|
191
212
|
label: "实线",
|
|
192
213
|
value: "solid"
|
|
193
214
|
}, {
|
|
194
215
|
label: "虚线",
|
|
195
216
|
value: "dashed"
|
|
196
|
-
}],
|
|
217
|
+
}], Kr = [
|
|
197
218
|
{
|
|
198
219
|
label: "完整显示",
|
|
199
220
|
value: "contain"
|
|
@@ -206,76 +227,85 @@ var Bt = {
|
|
|
206
227
|
label: "拉伸填充",
|
|
207
228
|
value: "fill"
|
|
208
229
|
}
|
|
209
|
-
],
|
|
230
|
+
], qr = f(() => Oe(l.pageSizeOptions)), Jr = f(() => qr.value.map((e) => ({
|
|
210
231
|
label: `${e.label} · ${e.width} × ${e.height}`,
|
|
211
|
-
value:
|
|
212
|
-
}))),
|
|
232
|
+
value: Ee(e)
|
|
233
|
+
}))), Yr = f(() => Ee(jr.value)), Xr = f(() => le({ showSigningPlacementTools: l.showSigningPlacementTools })), Zr = f(() => {
|
|
234
|
+
let e = [
|
|
235
|
+
...l.variableTypes,
|
|
236
|
+
...l.showAdvancedChoiceControls ? de : [],
|
|
237
|
+
...l.showBuiltinSelectorControls ? fe : [],
|
|
238
|
+
...l.showCustomControls ? pe : []
|
|
239
|
+
].filter((e) => re(e?.type));
|
|
240
|
+
return Array.from(new Map(e.map((e) => [e.type, e])).values());
|
|
241
|
+
}), Qr = f(() => Zr.value.map((e) => ({
|
|
213
242
|
...e,
|
|
214
|
-
icon:
|
|
215
|
-
|
|
216
|
-
|
|
243
|
+
icon: ht(e.type),
|
|
244
|
+
group: e.type === "select" || e.type === "radio" ? "advanced-choice" : e.type.endsWith("-selector") ? "builtin-selector" : e.type === "custom" ? "custom" : "basic"
|
|
245
|
+
}))), $r = f(() => De(l.maxPages)), ei = f(() => E.value.pages.length >= $r.value), ti = f(() => {
|
|
246
|
+
let e = ve(E.value);
|
|
217
247
|
return Array.from(a(E.value.pageDecorations)).filter((t) => !e.has(t));
|
|
218
|
-
}), { scheduleAutoPaginate: J } =
|
|
248
|
+
}), { scheduleAutoPaginate: J } = tt({
|
|
219
249
|
templateValue: E,
|
|
220
250
|
readonlyState: W,
|
|
221
|
-
isAutoPaginating:
|
|
222
|
-
pendingPaginationPageId:
|
|
251
|
+
isAutoPaginating: kn,
|
|
252
|
+
pendingPaginationPageId: An,
|
|
223
253
|
activePageId: k,
|
|
224
|
-
normalizedMaxPages:
|
|
254
|
+
normalizedMaxPages: $r,
|
|
225
255
|
pageRefs: M,
|
|
226
|
-
syncPageEditors:
|
|
227
|
-
commitBodyChange:
|
|
228
|
-
getPageSize:
|
|
229
|
-
notifyPageLimit:
|
|
230
|
-
}), { insertSigningPlacement:
|
|
256
|
+
syncPageEditors: Ni,
|
|
257
|
+
commitBodyChange: Ki,
|
|
258
|
+
getPageSize: Ji,
|
|
259
|
+
notifyPageLimit: na
|
|
260
|
+
}), { insertSigningPlacement: ni, handleSigningPlacementDrop: ri, insertSigningPlacementTool: ii, handleSigningPlacementDragStart: ai, updateSigningPlacement: oi, patchSelectedSigningPlacement: si, duplicateSigningPlacement: ci, removeSigningPlacement: li } = mt({
|
|
231
261
|
templateValue: E,
|
|
232
262
|
signingPlacements: K,
|
|
233
|
-
selectedSigningPlacement:
|
|
263
|
+
selectedSigningPlacement: Or,
|
|
234
264
|
selectedSigningPlacementId: O,
|
|
235
265
|
selectedPage: q,
|
|
236
266
|
activePageId: k,
|
|
237
267
|
readonly: () => l.readonly,
|
|
238
268
|
disabled: () => l.disabled,
|
|
239
269
|
showSigningPlacementTools: () => !!l.showSigningPlacementTools,
|
|
240
|
-
getPageSize:
|
|
270
|
+
getPageSize: Ji,
|
|
241
271
|
getVisiblePosition: (e, t) => M.get(e)?.getVisibleSigningPlacementPosition(t),
|
|
242
|
-
commitSigningPlacements:
|
|
272
|
+
commitSigningPlacements: ea,
|
|
243
273
|
selectSigningPlacement: Q,
|
|
244
274
|
emitAdd: (e) => h("signing-placement-add", e),
|
|
245
275
|
emitChange: (e) => h("signing-placement-change", e),
|
|
246
276
|
emitRemove: (e) => h("signing-placement-remove", e)
|
|
247
|
-
}), { saveDraftCache:
|
|
248
|
-
draftCacheWritable:
|
|
277
|
+
}), { saveDraftCache: ui, loadDraftCache: di, clearDraftCache: fi, restoreDraftCacheIfNeeded: pi, stopDraftCacheTimer: mi, restartDraftCacheTimer: hi, resetDraftFingerprint: gi } = ft({
|
|
278
|
+
draftCacheWritable: Sr,
|
|
249
279
|
multipleFilesMode: x,
|
|
250
280
|
filesValue: S,
|
|
251
281
|
activeFileIdValue: C,
|
|
252
282
|
templateValue: E,
|
|
253
|
-
draftCacheKey:
|
|
283
|
+
draftCacheKey: wr,
|
|
254
284
|
draftCacheInterval: () => l.draftCacheInterval,
|
|
255
285
|
draftCacheMaxBytes: () => l.draftCacheMaxBytes,
|
|
256
286
|
pageSize: () => l.pageSize,
|
|
257
287
|
pageSizeOptions: () => l.pageSizeOptions,
|
|
258
288
|
syncActiveFileSnapshot: Y,
|
|
259
|
-
syncPageEditors:
|
|
260
|
-
setActiveFileId:
|
|
261
|
-
emitFilesChange:
|
|
289
|
+
syncPageEditors: Ni,
|
|
290
|
+
setActiveFileId: Bi,
|
|
291
|
+
emitFilesChange: zi,
|
|
262
292
|
commit: X,
|
|
263
293
|
setSigningPlacementInputErrorsByFile: (e) => {
|
|
264
294
|
w.value = e;
|
|
265
295
|
},
|
|
266
|
-
buildSigningPlacementInputErrorsByFile:
|
|
267
|
-
updateDraftCacheStatus:
|
|
296
|
+
buildSigningPlacementInputErrorsByFile: vn,
|
|
297
|
+
updateDraftCacheStatus: Vi,
|
|
268
298
|
scheduleAutoPaginate: J,
|
|
269
299
|
activePageId: k,
|
|
270
300
|
selectedVariableKey: D
|
|
271
|
-
}),
|
|
272
|
-
let e =
|
|
301
|
+
}), _i = f(() => {
|
|
302
|
+
let e = cr.value.trim().toLowerCase(), t = E.value.variables;
|
|
273
303
|
return e ? t.filter((t) => t.label.toLowerCase().includes(e) || t.key.toLowerCase().includes(e)) : t;
|
|
274
|
-
}),
|
|
304
|
+
}), vi = f(() => Math.max(tn, jr.value.width - $t)), yi = f(() => Math.max(nn, jr.value.height - en)), bi = f(() => Kn.value[k.value] ?? Oi()), xi = f(() => bi.value.hasMixedBlockFormats ? void 0 : bi.value.currentHeadingLevel ?? "paragraph"), Si = f(() => bi.value.fontFamily || "Noto Serif SC, Source Han Serif SC, Songti SC, STSong, SimSun, serif"), Ci = f(() => bi.value.fontSize ?? me.fontSize ?? 14), wi = f(() => bi.value.textColor || me.color || "#1f2937"), Ti = f(() => G.value?.style?.fontFamily || me.fontFamily || "Noto Serif SC, Source Han Serif SC, Songti SC, STSong, SimSun, serif"), Ei = f(() => {
|
|
275
305
|
let e = n.map((e) => ({
|
|
276
306
|
label: `${e}px`,
|
|
277
307
|
value: e
|
|
278
|
-
})), t =
|
|
308
|
+
})), t = Mi(Ci.value), r = Mi(qn.value), i = /* @__PURE__ */ new Map();
|
|
279
309
|
return r && !n.includes(r) && i.set(r, {
|
|
280
310
|
label: `使用 ${r}px`,
|
|
281
311
|
value: r
|
|
@@ -286,84 +316,84 @@ var Bt = {
|
|
|
286
316
|
});
|
|
287
317
|
b(() => l.modelValue, (e) => {
|
|
288
318
|
if (!e || x.value) return;
|
|
289
|
-
let t =
|
|
290
|
-
o && (
|
|
319
|
+
let t = ke(e, l.pageSize), n = ye(t, l.pageSizeOptions), r = n.value, i = d(r) !== d(E.value), a = d(r), o = a === bn;
|
|
320
|
+
o && (bn = ""), (i || !o) && (T.value = _n(e), w.value = {
|
|
291
321
|
...w.value,
|
|
292
322
|
[C.value]: T.value
|
|
293
|
-
}, E.value = r, S.value =
|
|
323
|
+
}, E.value = r, S.value = ut(S.value, C.value, r), k.value = r.pages[0]?.id ?? "", D.value = "", O.value = "", J(k.value)), d(r) !== d(t) && (bn = a, h("update:modelValue", c(r)), h("change", c(r)), Xi(n.resizedSigningPlacementIds, r));
|
|
294
324
|
}, { deep: !0 }), b(() => l.files, (e) => {
|
|
295
325
|
if (!Array.isArray(e)) return;
|
|
296
|
-
let t =
|
|
297
|
-
a || (w.value =
|
|
298
|
-
let o =
|
|
299
|
-
if (r === i ? o !== C.value &&
|
|
326
|
+
let t = st(e, void 0, l.pageSize), n = rt(t, l.pageSizeOptions).files, r = d(n), i = d(S.value), a = r === yn;
|
|
327
|
+
a || (w.value = vn(n, e)), a && (yn = "");
|
|
328
|
+
let o = dt(n, l.activeFileId || C.value);
|
|
329
|
+
if (r === i ? o !== C.value && Bi(o, {
|
|
300
330
|
syncCurrent: !1,
|
|
301
331
|
shouldEmit: !1
|
|
302
|
-
}) : (S.value = n,
|
|
332
|
+
}) : (S.value = n, Bi(o, {
|
|
303
333
|
syncCurrent: !1,
|
|
304
334
|
shouldEmit: !1,
|
|
305
335
|
forceRefresh: !0,
|
|
306
336
|
persistCurrentErrors: !1
|
|
307
337
|
})), r !== d(t)) {
|
|
308
338
|
let e = u(n);
|
|
309
|
-
|
|
339
|
+
yn = d(e), h("update:files", e), h("files-change", u(e));
|
|
310
340
|
}
|
|
311
341
|
}, { deep: !0 }), b(() => l.activeFileId, (e) => {
|
|
312
|
-
!x.value || !e || e === C.value ||
|
|
342
|
+
!x.value || !e || e === C.value || Bi(e, {
|
|
313
343
|
syncCurrent: !0,
|
|
314
344
|
shouldEmit: !1
|
|
315
345
|
});
|
|
316
346
|
});
|
|
317
|
-
function
|
|
347
|
+
function Di(e, t) {
|
|
318
348
|
let n = d(S.value);
|
|
319
349
|
Y(!1);
|
|
320
|
-
let { files: r, resizedSigningPlacementIds: i } =
|
|
321
|
-
o && d(o.template) !== d(E.value) && (E.value = c(o.template), T.value = [...w.value[C.value] ?? []]), a && (A.value = !1, j.value = [],
|
|
350
|
+
let { files: r, resizedSigningPlacementIds: i } = rt(st(S.value, void 0, e), t), a = d(r) !== n, o = r.find((e) => e.id === C.value);
|
|
351
|
+
o && d(o.template) !== d(E.value) && (E.value = c(o.template), T.value = [...w.value[C.value] ?? []]), a && (A.value = !1, j.value = [], zi(r, ""));
|
|
322
352
|
let ee = i.get(C.value);
|
|
323
|
-
return ee?.length && o &&
|
|
353
|
+
return ee?.length && o && Xi(ee, o.template), a;
|
|
324
354
|
}
|
|
325
355
|
b([() => l.pageSize, () => l.pageSizeOptions], ([e, t]) => {
|
|
326
356
|
if (x.value) {
|
|
327
|
-
|
|
357
|
+
Di(e, t), J(k.value);
|
|
328
358
|
return;
|
|
329
359
|
}
|
|
330
|
-
let n =
|
|
360
|
+
let n = ye(ke(E.value, e), t);
|
|
331
361
|
d(n.value) !== d(E.value) && X(n.value), J(k.value);
|
|
332
|
-
}, { deep: !0 }), b(
|
|
362
|
+
}, { deep: !0 }), b($r, () => {
|
|
333
363
|
J(E.value.pages[0]?.id);
|
|
334
364
|
}), b(W, (e) => {
|
|
335
365
|
e && ($(), I.value = !1, L.value = !1);
|
|
336
366
|
}), b(k, () => {
|
|
337
367
|
z.value = void 0;
|
|
338
368
|
}), b([
|
|
339
|
-
|
|
369
|
+
xr,
|
|
340
370
|
F,
|
|
341
|
-
|
|
371
|
+
jn
|
|
342
372
|
], () => {
|
|
343
|
-
|
|
373
|
+
vs();
|
|
344
374
|
}), b(K, (e) => {
|
|
345
375
|
O.value && !e.some((e) => e.id === O.value) && (O.value = "", h("signing-placement-select", void 0));
|
|
346
376
|
}, { deep: !0 }), b(() => [
|
|
347
377
|
l.enableDraftCache,
|
|
348
|
-
|
|
378
|
+
wr.value,
|
|
349
379
|
l.draftCacheInterval,
|
|
350
380
|
W.value
|
|
351
381
|
], () => {
|
|
352
|
-
|
|
382
|
+
gi(), hi();
|
|
353
383
|
}), b(P, (e) => {
|
|
354
384
|
if (!(typeof document > "u")) {
|
|
355
385
|
if (e) {
|
|
356
|
-
|
|
386
|
+
gr = document.body.style.overflow, document.body.style.overflow = "hidden";
|
|
357
387
|
return;
|
|
358
388
|
}
|
|
359
|
-
document.body.style.overflow =
|
|
389
|
+
document.body.style.overflow = gr ?? "", gr = void 0;
|
|
360
390
|
}
|
|
361
|
-
}),
|
|
362
|
-
|
|
363
|
-
}),
|
|
364
|
-
|
|
391
|
+
}), Mt(() => {
|
|
392
|
+
pi(), hi(), J(k.value), window.addEventListener("pointerdown", Es, !0), window.addEventListener("pointerup", Cs), window.addEventListener("keydown", ks, !0), window.addEventListener("keydown", As), window.addEventListener("resize", ws), window.addEventListener("scroll", Ds, !0);
|
|
393
|
+
}), jt(() => {
|
|
394
|
+
Fi(), vr = !0, P.value && typeof document < "u" && (document.body.style.overflow = gr ?? ""), window.removeEventListener("pointerdown", Es, !0), window.removeEventListener("pointerup", Cs), window.removeEventListener("keydown", ks, !0), window.removeEventListener("keydown", As), window.removeEventListener("resize", ws), window.removeEventListener("scroll", Ds, !0), or !== void 0 && cancelAnimationFrame(or), mi();
|
|
365
395
|
});
|
|
366
|
-
function
|
|
396
|
+
function Oi() {
|
|
367
397
|
return {
|
|
368
398
|
isFocused: !1,
|
|
369
399
|
canUndo: !1,
|
|
@@ -376,29 +406,29 @@ var Bt = {
|
|
|
376
406
|
isTableActive: !1,
|
|
377
407
|
textAlign: "left",
|
|
378
408
|
fontFamily: t,
|
|
379
|
-
fontSize:
|
|
380
|
-
textColor:
|
|
409
|
+
fontSize: me.fontSize ?? 14,
|
|
410
|
+
textColor: me.color ?? "#1f2937",
|
|
381
411
|
selectionText: "",
|
|
382
412
|
hasMixedBlockFormats: !1
|
|
383
413
|
};
|
|
384
414
|
}
|
|
385
|
-
function
|
|
415
|
+
function ki(e) {
|
|
386
416
|
return e === "left" || e === "center" || e === "right";
|
|
387
417
|
}
|
|
388
|
-
function
|
|
418
|
+
function Ai(e) {
|
|
389
419
|
return typeof e == "number" && Number.isInteger(e) && e >= 1 && e <= 6;
|
|
390
420
|
}
|
|
391
|
-
function
|
|
421
|
+
function ji(e, t = Ci.value) {
|
|
392
422
|
let n = Number(e);
|
|
393
|
-
return Number.isFinite(n) ? Math.min(
|
|
423
|
+
return Number.isFinite(n) ? Math.min(an, Math.max(rn, Math.round(n))) : t;
|
|
394
424
|
}
|
|
395
|
-
function
|
|
425
|
+
function Mi(e) {
|
|
396
426
|
let t = String(e || "").trim().match(/(\d+(\.\d+)?)/);
|
|
397
427
|
if (!t) return;
|
|
398
428
|
let n = Number(t[1]);
|
|
399
|
-
if (Number.isFinite(n)) return Math.min(
|
|
429
|
+
if (Number.isFinite(n)) return Math.min(an, Math.max(rn, Math.round(n)));
|
|
400
430
|
}
|
|
401
|
-
function
|
|
431
|
+
function Ni(e = E.value) {
|
|
402
432
|
return {
|
|
403
433
|
...e,
|
|
404
434
|
pages: e.pages.map((e) => {
|
|
@@ -411,19 +441,19 @@ var Bt = {
|
|
|
411
441
|
})
|
|
412
442
|
};
|
|
413
443
|
}
|
|
414
|
-
function
|
|
415
|
-
|
|
444
|
+
function Pi() {
|
|
445
|
+
yr = !1, br &&= (clearTimeout(br), void 0);
|
|
416
446
|
}
|
|
417
|
-
function
|
|
418
|
-
let e =
|
|
419
|
-
|
|
447
|
+
function Fi() {
|
|
448
|
+
let e = yr;
|
|
449
|
+
Pi(), e && Ri();
|
|
420
450
|
}
|
|
421
|
-
function
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
},
|
|
451
|
+
function Ii() {
|
|
452
|
+
yr = !0, br && clearTimeout(br), br = setTimeout(() => {
|
|
453
|
+
br = void 0, !(!yr || vr) && (yr = !1, Ri());
|
|
454
|
+
}, Qt);
|
|
425
455
|
}
|
|
426
|
-
function
|
|
456
|
+
function Li(e) {
|
|
427
457
|
let t = E.value.pages, n = t.findIndex((t) => t.id === e.id);
|
|
428
458
|
if (n < 0) return;
|
|
429
459
|
let r = t[n];
|
|
@@ -434,84 +464,84 @@ var Bt = {
|
|
|
434
464
|
pages: i
|
|
435
465
|
};
|
|
436
466
|
}
|
|
437
|
-
function
|
|
438
|
-
let e =
|
|
467
|
+
function Ri() {
|
|
468
|
+
let e = je(Ni());
|
|
439
469
|
D.value && !e.variables.some((e) => e.key === D.value) && (D.value = ""), X(e);
|
|
440
470
|
}
|
|
441
471
|
function Y(e = !1) {
|
|
442
|
-
|
|
443
|
-
let t = c(
|
|
472
|
+
Fi();
|
|
473
|
+
let t = c(Ni());
|
|
444
474
|
if (!x.value) return t;
|
|
445
|
-
let n = S.value.find((e) => e.id === C.value)?.template, r = d(n) !== d(t), i =
|
|
446
|
-
return S.value = i, r && e &&
|
|
475
|
+
let n = S.value.find((e) => e.id === C.value)?.template, r = d(n) !== d(t), i = ut(S.value, C.value, t);
|
|
476
|
+
return S.value = i, r && e && zi(i), t;
|
|
447
477
|
}
|
|
448
|
-
function
|
|
478
|
+
function zi(e, t = C.value) {
|
|
449
479
|
if (!x.value) return;
|
|
450
480
|
let n = u(e);
|
|
451
|
-
S.value = n,
|
|
481
|
+
S.value = n, yn = d(n), h("update:files", u(n)), h("files-change", u(n));
|
|
452
482
|
let r = n.find((e) => e.id === t);
|
|
453
483
|
r && h("file-change", u([r])[0]);
|
|
454
484
|
}
|
|
455
|
-
function
|
|
456
|
-
let { syncCurrent: n, shouldEmit: r, forceRefresh: i, persistCurrentErrors: a } =
|
|
485
|
+
function Bi(e, t = {}) {
|
|
486
|
+
let { syncCurrent: n, shouldEmit: r, forceRefresh: i, persistCurrentErrors: a } = nt(t), o = dt(S.value, e), ee = o !== C.value;
|
|
457
487
|
if (a && x.value && C.value && (w.value = {
|
|
458
488
|
...w.value,
|
|
459
489
|
[C.value]: [...T.value]
|
|
460
|
-
}), n ? Y(!0) :
|
|
490
|
+
}), n ? Y(!0) : Pi(), !ee && !i) return;
|
|
461
491
|
let te = S.value.find((e) => e.id === o);
|
|
462
|
-
te && (C.value = o, E.value = c(te.template), T.value = [...w.value[o] ?? []], D.value = "", O.value = "", k.value = E.value.pages[0]?.id ?? "",
|
|
492
|
+
te && (C.value = o, E.value = c(te.template), T.value = [...w.value[o] ?? []], D.value = "", O.value = "", k.value = E.value.pages[0]?.id ?? "", Kn.value = {}, M.clear(), An.value = "", A.value = !1, j.value = [], jn.value = !1, Mn.value = void 0, Nn.value = void 0, gi(), r && ee && h("update:activeFileId", o), n && ee && Sr.value && ui(), g(() => {
|
|
463
493
|
J(k.value);
|
|
464
494
|
}));
|
|
465
495
|
}
|
|
466
496
|
function X(e) {
|
|
467
|
-
|
|
468
|
-
let t =
|
|
469
|
-
return E.value = n, A.value = !1, j.value = [], x.value ?
|
|
497
|
+
Pi();
|
|
498
|
+
let t = ye(ke(e, l.pageSize), l.pageSizeOptions), n = t.value;
|
|
499
|
+
return E.value = n, A.value = !1, j.value = [], x.value ? zi(ut(S.value, C.value, n)) : (S.value = ut(S.value, C.value, n), bn = d(n), h("update:modelValue", c(n)), h("change", c(n))), Xi(t.resizedSigningPlacementIds, n), n;
|
|
470
500
|
}
|
|
471
|
-
function
|
|
501
|
+
function Vi(e, t = e.type !== "unchanged") {
|
|
472
502
|
U.value = e, t && h("draft-cache-change", { ...e });
|
|
473
503
|
}
|
|
474
|
-
function
|
|
504
|
+
function Hi() {
|
|
475
505
|
return { ...U.value };
|
|
476
506
|
}
|
|
477
|
-
function
|
|
507
|
+
function Ui(e, t) {
|
|
478
508
|
t ? M.set(e, t) : M.delete(e);
|
|
479
509
|
}
|
|
480
510
|
function Z(e, t = q.value?.id ?? k.value) {
|
|
481
511
|
W.value || M.get(t)?.runCommand(e);
|
|
482
512
|
}
|
|
483
|
-
function
|
|
513
|
+
function Wi(e) {
|
|
484
514
|
Z(e), $();
|
|
485
515
|
}
|
|
486
|
-
function
|
|
516
|
+
function Gi(e) {
|
|
487
517
|
let t = R.value?.pageId;
|
|
488
518
|
t && (M.get(t)?.focus(), H.value = typeof document < "u" && document.execCommand(e) ? `${e === "copy" ? "已复制" : e === "cut" ? "已剪切" : "已粘贴"}` : "浏览器未授权剪贴板操作,请使用系统快捷键。", $());
|
|
489
519
|
}
|
|
490
|
-
function
|
|
491
|
-
let t = X(
|
|
520
|
+
function Ki(e) {
|
|
521
|
+
let t = X(je(e));
|
|
492
522
|
return D.value && !t.variables.some((e) => e.key === D.value) && (D.value = ""), t;
|
|
493
523
|
}
|
|
494
|
-
function
|
|
495
|
-
|
|
524
|
+
function qi(e) {
|
|
525
|
+
Li(e), Ii(), J(e.id);
|
|
496
526
|
}
|
|
497
|
-
function
|
|
498
|
-
return
|
|
527
|
+
function Ji(e) {
|
|
528
|
+
return Ae(e?.pageSize, E.value.pageSize);
|
|
499
529
|
}
|
|
500
|
-
function
|
|
530
|
+
function Yi(e) {
|
|
501
531
|
return K.value.filter((t) => t.pageId === e);
|
|
502
532
|
}
|
|
503
|
-
function
|
|
533
|
+
function Xi(e, t = E.value) {
|
|
504
534
|
let n = new Set(e);
|
|
505
|
-
n.size && (
|
|
535
|
+
n.size && (Qi(n), (t.signingPlacements ?? []).filter((e) => n.has(e.id)).forEach((e) => h("signing-placement-change", pt(e))));
|
|
506
536
|
}
|
|
507
537
|
function Q(e) {
|
|
508
538
|
let t = e ? K.value.find((t) => t.id === e) : void 0;
|
|
509
|
-
O.value = t?.id ?? "", t && (D.value = "", k.value = t.pageId), h("signing-placement-select", t ?
|
|
539
|
+
O.value = t?.id ?? "", t && (D.value = "", k.value = t.pageId), h("signing-placement-select", t ? pt(t) : void 0);
|
|
510
540
|
}
|
|
511
|
-
function
|
|
541
|
+
function Zi(e) {
|
|
512
542
|
Q(e.id);
|
|
513
543
|
}
|
|
514
|
-
function
|
|
544
|
+
function Qi(e) {
|
|
515
545
|
let t = new Set(e);
|
|
516
546
|
if (!t.size) return;
|
|
517
547
|
let n = T.value.filter((e) => e.type !== "signing-placement" || !t.has(e.id));
|
|
@@ -520,53 +550,53 @@ var Bt = {
|
|
|
520
550
|
[C.value]: n
|
|
521
551
|
};
|
|
522
552
|
}
|
|
523
|
-
function
|
|
553
|
+
function $i(e) {
|
|
524
554
|
let t = T.value.filter((t) => t.type !== "signing-placement" || t.pageId !== e);
|
|
525
555
|
T.value = t, w.value = {
|
|
526
556
|
...w.value,
|
|
527
557
|
[C.value]: t
|
|
528
558
|
};
|
|
529
559
|
}
|
|
530
|
-
function
|
|
531
|
-
return
|
|
560
|
+
function ea(e, t = []) {
|
|
561
|
+
return Qi(t), X({
|
|
532
562
|
...E.value,
|
|
533
563
|
signingPlacements: e
|
|
534
564
|
});
|
|
535
565
|
}
|
|
536
|
-
function
|
|
566
|
+
function ta(e) {
|
|
537
567
|
if (W.value || !q.value) return;
|
|
538
|
-
let t =
|
|
568
|
+
let t = qr.value.find((t) => Ee(t) === e);
|
|
539
569
|
if (!t) return;
|
|
540
|
-
let n = q.value.id, r =
|
|
541
|
-
|
|
570
|
+
let n = q.value.id, r = Ji(q.value), i = Ae(t, E.value.pageSize), a = K.value.map((e) => e.pageId === n ? ue(e, r, i) : e);
|
|
571
|
+
Qi(a.filter((e) => e.pageId === n).map((e) => e.id)), X({
|
|
542
572
|
...E.value,
|
|
543
573
|
pages: E.value.pages.map((e) => e.id === n ? {
|
|
544
574
|
...e,
|
|
545
575
|
pageSize: i
|
|
546
576
|
} : e),
|
|
547
577
|
signingPlacements: a
|
|
548
|
-
}), a.filter((e) => e.pageId === n).forEach((e) => h("signing-placement-change",
|
|
578
|
+
}), a.filter((e) => e.pageId === n).forEach((e) => h("signing-placement-change", pt(e))), J(n);
|
|
549
579
|
}
|
|
550
|
-
function
|
|
551
|
-
let t =
|
|
580
|
+
function na(e) {
|
|
581
|
+
let t = $r.value;
|
|
552
582
|
H.value = `合同最多支持 ${t} 页`, h("page-limit", t, e);
|
|
553
583
|
}
|
|
554
|
-
function
|
|
584
|
+
function ra() {
|
|
555
585
|
if (W.value) return;
|
|
556
|
-
if (
|
|
557
|
-
|
|
586
|
+
if (ei.value) {
|
|
587
|
+
na("add");
|
|
558
588
|
return;
|
|
559
589
|
}
|
|
560
|
-
let e =
|
|
590
|
+
let e = Se(E.value.pages.length + 1, jr.value);
|
|
561
591
|
X({
|
|
562
592
|
...E.value,
|
|
563
593
|
pages: [...E.value.pages, e]
|
|
564
594
|
}), k.value = e.id;
|
|
565
595
|
}
|
|
566
|
-
function
|
|
596
|
+
function ia(e) {
|
|
567
597
|
if (W.value) return;
|
|
568
|
-
if (
|
|
569
|
-
|
|
598
|
+
if (ei.value) {
|
|
599
|
+
na("duplicate");
|
|
570
600
|
return;
|
|
571
601
|
}
|
|
572
602
|
let t = E.value.pages.findIndex((t) => t.id === e.id);
|
|
@@ -576,12 +606,12 @@ var Bt = {
|
|
|
576
606
|
variables: [],
|
|
577
607
|
pageSize: E.value.pageSize,
|
|
578
608
|
signingPlacements: []
|
|
579
|
-
}).pages[0], r =
|
|
609
|
+
}).pages[0], r = be(t + 2, Ji(e), n.contentHtml, n.contentJson);
|
|
580
610
|
r.title = `${e.title || `第 ${t + 1} 页`}副本`;
|
|
581
611
|
let i = [...E.value.pages];
|
|
582
612
|
i.splice(t + 1, 0, r);
|
|
583
|
-
let a =
|
|
584
|
-
...
|
|
613
|
+
let a = Yi(e.id).map((e) => ce(e.type, r.id, Ji(r), {
|
|
614
|
+
...pt(e),
|
|
585
615
|
id: void 0,
|
|
586
616
|
pageId: r.id
|
|
587
617
|
}));
|
|
@@ -589,54 +619,54 @@ var Bt = {
|
|
|
589
619
|
...E.value,
|
|
590
620
|
pages: i,
|
|
591
621
|
signingPlacements: [...K.value, ...a]
|
|
592
|
-
}), k.value = r.id, a.forEach((e) => h("signing-placement-add",
|
|
622
|
+
}), k.value = r.id, a.forEach((e) => h("signing-placement-add", pt(e))), a[0] && Q(a[0].id);
|
|
593
623
|
}
|
|
594
|
-
function
|
|
624
|
+
function aa(e) {
|
|
595
625
|
if (W.value || E.value.pages.length <= 1) return;
|
|
596
626
|
let t = E.value.pages.findIndex((t) => t.id === e.id);
|
|
597
627
|
if (t < 0) return;
|
|
598
|
-
let n =
|
|
599
|
-
|
|
600
|
-
let r = E.value.pages.filter((t) => t.id !== e.id), i =
|
|
628
|
+
let n = Yi(e.id);
|
|
629
|
+
$i(e.id);
|
|
630
|
+
let r = E.value.pages.filter((t) => t.id !== e.id), i = Ki({
|
|
601
631
|
...E.value,
|
|
602
632
|
pages: r,
|
|
603
633
|
signingPlacements: K.value.filter((t) => t.pageId !== e.id)
|
|
604
634
|
});
|
|
605
|
-
k.value = i.pages[Math.min(t, i.pages.length - 1)]?.id ?? "", n.some((e) => e.id === O.value) && Q(), n.forEach((e) => h("signing-placement-remove",
|
|
635
|
+
k.value = i.pages[Math.min(t, i.pages.length - 1)]?.id ?? "", n.some((e) => e.id === O.value) && Q(), n.forEach((e) => h("signing-placement-remove", pt(e)));
|
|
606
636
|
}
|
|
607
|
-
function
|
|
637
|
+
function oa(e) {
|
|
608
638
|
if (W.value || E.value.pages.length <= 1) return;
|
|
609
|
-
let t =
|
|
639
|
+
let t = Yi(e.id).length;
|
|
610
640
|
if (!t) {
|
|
611
|
-
|
|
641
|
+
aa(e);
|
|
612
642
|
return;
|
|
613
643
|
}
|
|
614
|
-
|
|
644
|
+
Bt.confirm({
|
|
615
645
|
title: "删除合同页面",
|
|
616
646
|
content: `此页包含 ${t} 个签署位置,删除页面会同时移除这些位置,是否继续?`,
|
|
617
647
|
okText: "确认删除",
|
|
618
648
|
okType: "danger",
|
|
619
649
|
cancelText: "取消",
|
|
620
650
|
onOk: () => {
|
|
621
|
-
|
|
651
|
+
aa(e);
|
|
622
652
|
}
|
|
623
653
|
});
|
|
624
654
|
}
|
|
625
|
-
function
|
|
655
|
+
function sa(e) {
|
|
626
656
|
let t = new Set(E.value.variables.map((e) => e.key)), n = 1;
|
|
627
657
|
for (; t.has(`${e}_${n}`);) n += 1;
|
|
628
658
|
return `${e}_${n}`;
|
|
629
659
|
}
|
|
630
|
-
function
|
|
660
|
+
function ca(e) {
|
|
631
661
|
let t = e.type ?? "text";
|
|
632
|
-
return
|
|
662
|
+
return Ce({
|
|
633
663
|
...e,
|
|
634
664
|
type: t,
|
|
635
|
-
key: e.key ||
|
|
636
|
-
label: e.label ||
|
|
637
|
-
},
|
|
665
|
+
key: e.key || sa(t),
|
|
666
|
+
label: e.label || Te(t, Zr.value).label
|
|
667
|
+
}, Zr.value, l.defaultVariableStyle);
|
|
638
668
|
}
|
|
639
|
-
function
|
|
669
|
+
function la(e, t = q.value?.id ?? E.value.pages[0].id, n) {
|
|
640
670
|
if (W.value) return e;
|
|
641
671
|
let r = M.get(t)?.insertVariable(e, n), i = !E.value.variables.some((t) => t.key === e.key);
|
|
642
672
|
return X({
|
|
@@ -645,102 +675,102 @@ var Bt = {
|
|
|
645
675
|
variables: i ? [...E.value.variables, e] : E.value.variables
|
|
646
676
|
}), D.value = e.key, Q(), k.value = t, i && h("variable-add", e), J(t), e;
|
|
647
677
|
}
|
|
648
|
-
function
|
|
649
|
-
let { width: t, height: n, ...r } = e, i =
|
|
678
|
+
function ua(e) {
|
|
679
|
+
let { width: t, height: n, ...r } = e, i = Le(t), a = Le(n);
|
|
650
680
|
return {
|
|
651
681
|
...r,
|
|
652
682
|
...i === void 0 ? {} : { width: i },
|
|
653
683
|
...a === void 0 ? {} : { height: a }
|
|
654
684
|
};
|
|
655
685
|
}
|
|
656
|
-
function
|
|
657
|
-
let t =
|
|
686
|
+
function da(e = {}) {
|
|
687
|
+
let t = Le(Zn.value), n = Le(Qn.value);
|
|
658
688
|
return {
|
|
659
689
|
...e,
|
|
660
690
|
...t === void 0 ? {} : { width: t },
|
|
661
691
|
...n === void 0 ? {} : { height: n }
|
|
662
692
|
};
|
|
663
693
|
}
|
|
664
|
-
function
|
|
665
|
-
|
|
694
|
+
function fa() {
|
|
695
|
+
Xn.value = "", Zn.value = void 0, Qn.value = void 0, $n.value = "";
|
|
666
696
|
}
|
|
667
|
-
function
|
|
668
|
-
let r =
|
|
697
|
+
function pa(e, t = q.value?.id ?? E.value.pages[0]?.id, n) {
|
|
698
|
+
let r = ua({
|
|
669
699
|
...e,
|
|
670
700
|
src: e.src.trim()
|
|
671
701
|
});
|
|
672
|
-
if (!(W.value || !t || !
|
|
702
|
+
if (!(W.value || !t || !Pe(r.src) || !r.src || !M.get(t)?.insertContentImage(r, n))) return k.value = t, D.value = "", Q(), r.src;
|
|
673
703
|
}
|
|
674
|
-
function
|
|
704
|
+
function ma(e) {
|
|
675
705
|
return e instanceof Error ? e : /* @__PURE__ */ Error("图片处理失败");
|
|
676
706
|
}
|
|
677
|
-
async function
|
|
678
|
-
t === "toolbar" && (
|
|
707
|
+
async function ha(e, t) {
|
|
708
|
+
t === "toolbar" && (er.value = !0, $n.value = "");
|
|
679
709
|
try {
|
|
680
|
-
let n = await
|
|
710
|
+
let n = await Re(e, {
|
|
681
711
|
source: t,
|
|
682
712
|
compression: l.imageCompression,
|
|
683
713
|
upload: l.imageUpload
|
|
684
714
|
});
|
|
685
|
-
return
|
|
715
|
+
return vr ? void 0 : n.src;
|
|
686
716
|
} catch (e) {
|
|
687
|
-
let n =
|
|
688
|
-
t === "toolbar" && (
|
|
717
|
+
let n = ma(e);
|
|
718
|
+
t === "toolbar" && ($n.value = n.message), H.value = n.message, h("image-error", n, t);
|
|
689
719
|
return;
|
|
690
720
|
} finally {
|
|
691
|
-
t === "toolbar" && (
|
|
721
|
+
t === "toolbar" && (er.value = !1);
|
|
692
722
|
}
|
|
693
723
|
}
|
|
694
|
-
async function
|
|
695
|
-
return await
|
|
724
|
+
async function ga(e) {
|
|
725
|
+
return await ha(e, "paste") ?? null;
|
|
696
726
|
}
|
|
697
|
-
async function
|
|
727
|
+
async function _a(e, t = {}) {
|
|
698
728
|
if (W.value) return;
|
|
699
|
-
let n = q.value?.id ?? E.value.pages[0]?.id, r = n ? M.get(n)?.getSelectionRange() : void 0, i = typeof e == "string" ? e.trim() : await
|
|
700
|
-
if (
|
|
701
|
-
if (!i || !
|
|
702
|
-
typeof e == "string" && (
|
|
729
|
+
let n = q.value?.id ?? E.value.pages[0]?.id, r = n ? M.get(n)?.getSelectionRange() : void 0, i = typeof e == "string" ? e.trim() : await ha(e, "toolbar");
|
|
730
|
+
if (vr) return;
|
|
731
|
+
if (!i || !Pe(i)) {
|
|
732
|
+
typeof e == "string" && ($n.value = "请输入安全的图片 URL");
|
|
703
733
|
return;
|
|
704
734
|
}
|
|
705
735
|
if (n && !M.has(n)) return;
|
|
706
|
-
let a =
|
|
736
|
+
let a = pa({
|
|
707
737
|
...t,
|
|
708
738
|
src: i
|
|
709
739
|
}, n, r);
|
|
710
|
-
return a && (
|
|
740
|
+
return a && (Yn.value = !1, fa(), H.value = "已插入图片"), a;
|
|
711
741
|
}
|
|
712
|
-
function
|
|
713
|
-
W.value ||
|
|
742
|
+
function va() {
|
|
743
|
+
W.value || er.value || ($(), $n.value = "", gn.value && (gn.value.value = ""), gn.value?.click());
|
|
714
744
|
}
|
|
715
|
-
async function
|
|
745
|
+
async function ya(e) {
|
|
716
746
|
let t = e.target.files?.[0];
|
|
717
|
-
t && await
|
|
747
|
+
t && await _a(t, da({ alt: t.name }));
|
|
718
748
|
}
|
|
719
|
-
async function
|
|
720
|
-
let e =
|
|
721
|
-
await
|
|
749
|
+
async function ba() {
|
|
750
|
+
let e = Xn.value;
|
|
751
|
+
await _a(e, da());
|
|
722
752
|
}
|
|
723
|
-
function
|
|
724
|
-
|
|
753
|
+
function xa(e) {
|
|
754
|
+
Va(e), Jn.value = !1;
|
|
725
755
|
}
|
|
726
|
-
function
|
|
727
|
-
$(),
|
|
756
|
+
function Sa() {
|
|
757
|
+
$(), ra();
|
|
728
758
|
}
|
|
729
|
-
function
|
|
730
|
-
$(),
|
|
759
|
+
function Ca(e, t, n, r) {
|
|
760
|
+
$(), la(ca({ type: t }), e, {
|
|
731
761
|
left: n,
|
|
732
762
|
top: r
|
|
733
763
|
});
|
|
734
764
|
}
|
|
735
|
-
function
|
|
765
|
+
function wa(e) {
|
|
736
766
|
$(), D.value = e, Q();
|
|
737
767
|
}
|
|
738
|
-
function
|
|
768
|
+
function Ta(e) {
|
|
739
769
|
let t = E.value.variables.find((t) => t.id === e.id);
|
|
740
770
|
if (!t) return;
|
|
741
771
|
let n = e.key.trim();
|
|
742
772
|
if (n !== t.key) {
|
|
743
|
-
let t =
|
|
773
|
+
let t = Me(n, E.value.variables, e.id);
|
|
744
774
|
if (t) {
|
|
745
775
|
H.value = t;
|
|
746
776
|
return;
|
|
@@ -765,8 +795,8 @@ var Bt = {
|
|
|
765
795
|
...i !== e.key && E.value.pageDecorations ? { pageDecorations: ne(E.value.pageDecorations, i, e.key) } : {}
|
|
766
796
|
}), D.value = e.key, J(a || k.value);
|
|
767
797
|
}
|
|
768
|
-
function
|
|
769
|
-
G.value &&
|
|
798
|
+
function Ea(e) {
|
|
799
|
+
G.value && Ta({
|
|
770
800
|
...G.value,
|
|
771
801
|
...e,
|
|
772
802
|
style: {
|
|
@@ -775,48 +805,48 @@ var Bt = {
|
|
|
775
805
|
}
|
|
776
806
|
});
|
|
777
807
|
}
|
|
778
|
-
function
|
|
779
|
-
W.value || !G.value ||
|
|
808
|
+
function Da(e) {
|
|
809
|
+
W.value || !G.value || Ea({ key: e });
|
|
780
810
|
}
|
|
781
|
-
function
|
|
811
|
+
function Oa(e) {
|
|
782
812
|
W.value || (X({
|
|
783
813
|
...E.value,
|
|
784
814
|
pageDecorations: o(e)
|
|
785
815
|
}), J(E.value.pages[0]?.id));
|
|
786
816
|
}
|
|
787
|
-
function
|
|
788
|
-
(e === "left" || e === "center" || e === "right") &&
|
|
817
|
+
function ka(e) {
|
|
818
|
+
(e === "left" || e === "center" || e === "right") && Ea({ style: { textAlign: e } });
|
|
789
819
|
}
|
|
790
|
-
function
|
|
791
|
-
(e === "solid" || e === "dashed") &&
|
|
820
|
+
function Aa(e) {
|
|
821
|
+
(e === "solid" || e === "dashed") && Ea({ style: { borderStyle: e } });
|
|
792
822
|
}
|
|
793
|
-
function
|
|
794
|
-
(e === "contain" || e === "cover" || e === "fill") &&
|
|
823
|
+
function ja(e) {
|
|
824
|
+
(e === "contain" || e === "cover" || e === "fill") && Ea({ style: { objectFit: e } });
|
|
795
825
|
}
|
|
796
|
-
function
|
|
797
|
-
|
|
826
|
+
function Ma(e) {
|
|
827
|
+
Ea({ style: e });
|
|
798
828
|
}
|
|
799
|
-
function
|
|
800
|
-
|
|
829
|
+
function Na(e) {
|
|
830
|
+
Ma({ fontFamily: String(e || "").trim() || "Noto Serif SC, Source Han Serif SC, Songti SC, STSong, SimSun, serif" });
|
|
801
831
|
}
|
|
802
|
-
function
|
|
803
|
-
|
|
832
|
+
function Pa(e) {
|
|
833
|
+
Ma({ fontSize: ji(e, G.value?.style?.fontSize ?? 14) });
|
|
804
834
|
}
|
|
805
|
-
function
|
|
806
|
-
G.value &&
|
|
835
|
+
function Fa(e) {
|
|
836
|
+
G.value && Ea({
|
|
807
837
|
multiline: e,
|
|
808
838
|
rows: G.value.rows || 3,
|
|
809
839
|
lineHeight: G.value.lineHeight || 28,
|
|
810
840
|
style: e ? { underline: !0 } : void 0
|
|
811
841
|
});
|
|
812
842
|
}
|
|
813
|
-
function
|
|
814
|
-
G.value &&
|
|
843
|
+
function Ia(e) {
|
|
844
|
+
G.value && Ea({
|
|
815
845
|
rows: Number(e || 3),
|
|
816
846
|
lineHeight: G.value.lineHeight || 28
|
|
817
847
|
});
|
|
818
848
|
}
|
|
819
|
-
function
|
|
849
|
+
function La(e) {
|
|
820
850
|
if (W.value) return;
|
|
821
851
|
let t = [...E.value.pages];
|
|
822
852
|
M.forEach((n, r) => {
|
|
@@ -832,297 +862,311 @@ var Bt = {
|
|
|
832
862
|
...E.value.pageDecorations ? { pageDecorations: ne(E.value.pageDecorations, e.key) } : {}
|
|
833
863
|
}), D.value = "", O.value = "";
|
|
834
864
|
}
|
|
835
|
-
function
|
|
865
|
+
function Ra(e) {
|
|
836
866
|
let t = (e.trim() || "variable").replace(/\s+/g, "_"), n = new Set(E.value.variables.map((e) => e.key));
|
|
837
867
|
if (!n.has(t)) return t;
|
|
838
868
|
let r = 2;
|
|
839
869
|
for (; n.has(`${t}_${r}`);) r += 1;
|
|
840
870
|
return `${t}_${r}`;
|
|
841
871
|
}
|
|
842
|
-
function
|
|
843
|
-
W.value ||
|
|
872
|
+
function za(e) {
|
|
873
|
+
W.value || la(Ce({
|
|
844
874
|
...e,
|
|
845
875
|
id: void 0,
|
|
846
|
-
key:
|
|
876
|
+
key: Ra(`${e.key || e.type}_copy`),
|
|
847
877
|
label: `${e.label}副本`,
|
|
848
878
|
style: { ...e.style }
|
|
849
|
-
},
|
|
879
|
+
}, Zr.value, l.defaultVariableStyle));
|
|
850
880
|
}
|
|
851
|
-
function
|
|
852
|
-
return W.value ? void 0 :
|
|
881
|
+
function Ba(e) {
|
|
882
|
+
return W.value ? void 0 : la(E.value.variables.find((t) => t.key === e.key) ?? Ce(e, Zr.value, l.defaultVariableStyle));
|
|
853
883
|
}
|
|
854
|
-
function
|
|
855
|
-
if (!W.value) return
|
|
884
|
+
function Va(e) {
|
|
885
|
+
if (!W.value) return la(ca({ type: e }));
|
|
856
886
|
}
|
|
857
|
-
function
|
|
887
|
+
function Ha(e) {
|
|
858
888
|
if (W.value || !re(e)) return;
|
|
859
|
-
let t = R.value, n =
|
|
889
|
+
let t = R.value, n = Zr.value.find((t) => t.type === e);
|
|
860
890
|
if (!t || !n) return;
|
|
861
|
-
let r =
|
|
862
|
-
|
|
891
|
+
let r = ze(t.leadingText) || n.label, i = Be(t.selectionWidth, tn, vi.value), a = Ua();
|
|
892
|
+
la(ca({
|
|
863
893
|
type: e,
|
|
864
894
|
label: r,
|
|
865
895
|
...i ? { width: i } : {},
|
|
866
896
|
...a ? { style: a } : {}
|
|
867
897
|
}), t.pageId), H.value = t.hasSelection ? `已将选中内容替换为${n.label}控件` : `已插入${n.label}控件`, $();
|
|
868
898
|
}
|
|
869
|
-
function
|
|
870
|
-
let e =
|
|
899
|
+
function Ua() {
|
|
900
|
+
let e = bi.value, t = {};
|
|
871
901
|
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;
|
|
872
902
|
}
|
|
873
|
-
function
|
|
903
|
+
function Wa(e) {
|
|
874
904
|
if (W.value) return;
|
|
875
905
|
let t = R.value;
|
|
876
|
-
t && (
|
|
906
|
+
t && (la(e, t.pageId), H.value = `已绑定到${e.label},沿用原控件尺寸`, $());
|
|
877
907
|
}
|
|
878
|
-
function
|
|
879
|
-
return
|
|
908
|
+
function Ga(e) {
|
|
909
|
+
return Te(e.type && re(e.type) ? e.type : "text", Zr.value).label;
|
|
880
910
|
}
|
|
881
|
-
function
|
|
882
|
-
E.value.variables.length && (
|
|
883
|
-
|
|
911
|
+
function Ka() {
|
|
912
|
+
E.value.variables.length && (sr.value = !0, g(() => {
|
|
913
|
+
cs(), tr.value?.focusBindSearch();
|
|
884
914
|
}));
|
|
885
915
|
}
|
|
886
|
-
function
|
|
916
|
+
function qa(e, t) {
|
|
887
917
|
e.dataTransfer?.setData("application/x-gd-contract-variable", t), e.dataTransfer && (e.dataTransfer.effectAllowed = "copy");
|
|
888
918
|
}
|
|
889
|
-
function
|
|
890
|
-
return N.value = Math.round(Math.min(
|
|
919
|
+
function Ja(e) {
|
|
920
|
+
return N.value = Math.round(Math.min(Xt, Math.max(Yt, Number.isFinite(e) ? e : 1)) * 100) / 100, N.value;
|
|
891
921
|
}
|
|
892
|
-
let { width:
|
|
893
|
-
viewportWidth:
|
|
894
|
-
widestPageWidth: f(() => Math.max(...E.value.pages.map((e) =>
|
|
922
|
+
let { width: Ya } = Ht(ln), { fitWidth: Xa, applyAutoFit: Za, markUserAdjusted: Qa, userAdjusted: $a } = Ie({
|
|
923
|
+
viewportWidth: Ya,
|
|
924
|
+
widestPageWidth: f(() => Math.max(...E.value.pages.map((e) => Ji(e).width), he.width) + 10),
|
|
895
925
|
padding: 48,
|
|
896
|
-
minZoom:
|
|
897
|
-
maxZoom:
|
|
926
|
+
minZoom: Yt,
|
|
927
|
+
maxZoom: Xt,
|
|
898
928
|
getZoom: () => N.value,
|
|
899
|
-
applyZoom:
|
|
929
|
+
applyZoom: Ja
|
|
900
930
|
});
|
|
901
|
-
function
|
|
902
|
-
return
|
|
931
|
+
function eo(e) {
|
|
932
|
+
return Qa(), Ja(e);
|
|
903
933
|
}
|
|
904
|
-
function
|
|
905
|
-
return
|
|
934
|
+
function to() {
|
|
935
|
+
return Za();
|
|
906
936
|
}
|
|
907
|
-
function
|
|
937
|
+
function no() {
|
|
908
938
|
return N.value;
|
|
909
939
|
}
|
|
910
|
-
function
|
|
911
|
-
|
|
940
|
+
function ro() {
|
|
941
|
+
eo(N.value + Zt);
|
|
912
942
|
}
|
|
913
|
-
function
|
|
914
|
-
|
|
943
|
+
function io() {
|
|
944
|
+
eo(N.value - Zt);
|
|
915
945
|
}
|
|
916
|
-
function
|
|
917
|
-
$(), I.value = !1, L.value = !1,
|
|
946
|
+
function ao() {
|
|
947
|
+
$(), I.value = !1, L.value = !1, Gn.value = !1, P.value = !P.value;
|
|
918
948
|
}
|
|
919
|
-
b(
|
|
920
|
-
|
|
949
|
+
b(Ya, (e) => {
|
|
950
|
+
Hn.value && !$a.value && e > 0 && Xa();
|
|
921
951
|
});
|
|
922
|
-
function
|
|
923
|
-
|
|
952
|
+
function oo(e) {
|
|
953
|
+
Vn.value ? hn.value?.focus() : e();
|
|
924
954
|
}
|
|
925
|
-
function
|
|
926
|
-
$(),
|
|
955
|
+
function so() {
|
|
956
|
+
$(), hs(), F.value = !1, _r = {
|
|
927
957
|
fullscreen: P.value,
|
|
928
|
-
sidebar:
|
|
929
|
-
inspector:
|
|
930
|
-
chrome:
|
|
958
|
+
sidebar: zn.value,
|
|
959
|
+
inspector: Bn.value,
|
|
960
|
+
chrome: Vn.value,
|
|
931
961
|
zoom: N.value,
|
|
932
|
-
userAdjusted:
|
|
933
|
-
}, P.value = !0,
|
|
934
|
-
W.value ?
|
|
962
|
+
userAdjusted: $a.value
|
|
963
|
+
}, P.value = !0, zn.value = !0, Bn.value = !0, Vn.value = !0, Hn.value = !0, g(() => {
|
|
964
|
+
W.value ? Un.value?.focus() : M.get(k.value)?.focus();
|
|
935
965
|
});
|
|
936
966
|
}
|
|
937
|
-
function
|
|
938
|
-
let e =
|
|
939
|
-
|
|
967
|
+
function co() {
|
|
968
|
+
let e = _r;
|
|
969
|
+
Hn.value = !1, _r = void 0, e && (P.value = e.fullscreen, zn.value = e.sidebar, Bn.value = e.inspector, Vn.value = e.chrome, e.userAdjusted ? eo(e.zoom) : Za(), g(() => oo(() => dn.value?.focusImmersive())));
|
|
940
970
|
}
|
|
941
|
-
function
|
|
942
|
-
|
|
971
|
+
function lo() {
|
|
972
|
+
Hn.value ? co() : so();
|
|
943
973
|
}
|
|
944
|
-
function
|
|
974
|
+
function uo() {
|
|
945
975
|
$(), z.value = void 0;
|
|
946
976
|
let e = Y(!1);
|
|
947
|
-
x.value ? (
|
|
977
|
+
x.value ? (Nn.value = u(S.value), Mn.value = void 0, Pn.value = C.value || S.value[0]?.id || "") : (Mn.value = c(e), Nn.value = void 0, Pn.value = ""), jn.value = !0;
|
|
948
978
|
}
|
|
949
|
-
function
|
|
950
|
-
|
|
979
|
+
function fo() {
|
|
980
|
+
jn.value = !1, Mn.value = void 0, Nn.value = void 0, Pn.value = "";
|
|
951
981
|
}
|
|
952
|
-
function
|
|
953
|
-
return
|
|
982
|
+
function po() {
|
|
983
|
+
return Ho();
|
|
954
984
|
}
|
|
955
|
-
function
|
|
985
|
+
function mo() {
|
|
956
986
|
$();
|
|
957
|
-
let e =
|
|
958
|
-
return
|
|
987
|
+
let e = po();
|
|
988
|
+
return In.value = JSON.stringify(e, null, 2), Fn.value = !0, e;
|
|
959
989
|
}
|
|
960
|
-
function
|
|
961
|
-
|
|
990
|
+
function ho() {
|
|
991
|
+
Fn.value = !1;
|
|
962
992
|
}
|
|
963
|
-
function
|
|
993
|
+
function go() {
|
|
994
|
+
return Fe(Y(!1));
|
|
995
|
+
}
|
|
996
|
+
function _o() {
|
|
997
|
+
$();
|
|
998
|
+
let e = go();
|
|
999
|
+
return Rn.value = e, Ln.value = !0, e;
|
|
1000
|
+
}
|
|
1001
|
+
function vo() {
|
|
1002
|
+
Ln.value = !1;
|
|
1003
|
+
}
|
|
1004
|
+
function yo() {
|
|
964
1005
|
$(), z.value = void 0, I.value = !1, L.value = !1;
|
|
965
|
-
let e = K.value.map(
|
|
1006
|
+
let e = K.value.map(pt);
|
|
966
1007
|
T.value = [], w.value = {
|
|
967
1008
|
...w.value,
|
|
968
1009
|
[C.value]: []
|
|
969
1010
|
};
|
|
970
1011
|
let t = !!O.value;
|
|
971
|
-
D.value = "", O.value = "", k.value = "",
|
|
972
|
-
|
|
1012
|
+
D.value = "", O.value = "", k.value = "", jn.value = !1, Mn.value = void 0, Nn.value = void 0, Fn.value = !1, In.value = "", Ln.value = !1, Rn.value = {
|
|
1013
|
+
values: {},
|
|
1014
|
+
variables: []
|
|
1015
|
+
}, Kn.value = {}, An.value = "";
|
|
1016
|
+
let n = X(xe(he));
|
|
973
1017
|
return t && h("signing-placement-select", void 0), e.forEach((e) => h("signing-placement-remove", e)), k.value = n.pages[0]?.id ?? "", c(n);
|
|
974
1018
|
}
|
|
975
|
-
function
|
|
976
|
-
W.value || ($(),
|
|
1019
|
+
function bo() {
|
|
1020
|
+
W.value || ($(), Bt.confirm({
|
|
977
1021
|
title: "清空合同内容",
|
|
978
1022
|
content: "将清空全部合同正文、页面、模板变量和签署位置,仅保留一个空白 A4 合同页。此操作不可撤销。",
|
|
979
1023
|
okText: "确认清空",
|
|
980
1024
|
okType: "danger",
|
|
981
1025
|
cancelText: "取消",
|
|
982
1026
|
onOk: () => {
|
|
983
|
-
|
|
1027
|
+
yo();
|
|
984
1028
|
}
|
|
985
1029
|
}));
|
|
986
1030
|
}
|
|
987
|
-
function
|
|
988
|
-
let t =
|
|
1031
|
+
function xo(e) {
|
|
1032
|
+
let t = Ni().pages, n = t.find((e) => e.id === k.value);
|
|
989
1033
|
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}'`));
|
|
990
1034
|
}
|
|
991
|
-
function
|
|
1035
|
+
function So(e) {
|
|
992
1036
|
$(), D.value = e.key, Q();
|
|
993
|
-
let t =
|
|
1037
|
+
let t = xo(e);
|
|
994
1038
|
t && (k.value = t.id, g(() => {
|
|
995
1039
|
M.get(t.id)?.scrollIntoVariable(e.key);
|
|
996
1040
|
}));
|
|
997
1041
|
}
|
|
998
|
-
function
|
|
1042
|
+
function Co(e) {
|
|
999
1043
|
let t = E.value.variables.find((t) => t.key === e || t.id === e);
|
|
1000
|
-
t &&
|
|
1044
|
+
t && So(t);
|
|
1001
1045
|
}
|
|
1002
|
-
function
|
|
1046
|
+
function wo(e) {
|
|
1003
1047
|
let t = K.value.find((t) => t.id === e);
|
|
1004
1048
|
t && ($(), D.value = "", k.value = t.pageId, Q(t.id), g(() => {
|
|
1005
1049
|
M.get(t.pageId)?.scrollIntoSigningPlacement(t.id);
|
|
1006
1050
|
}));
|
|
1007
1051
|
}
|
|
1008
|
-
function
|
|
1052
|
+
function To(e, t = !0) {
|
|
1009
1053
|
$(), k.value = e, t && g(() => {
|
|
1010
1054
|
M.get(e)?.scrollIntoPage();
|
|
1011
1055
|
});
|
|
1012
1056
|
}
|
|
1013
|
-
function
|
|
1014
|
-
E.value.pages.some((t) => t.id === e) &&
|
|
1057
|
+
function Eo(e) {
|
|
1058
|
+
E.value.pages.some((t) => t.id === e) && To(e);
|
|
1015
1059
|
}
|
|
1016
|
-
function
|
|
1060
|
+
function Do() {
|
|
1017
1061
|
if (F.value) {
|
|
1018
|
-
|
|
1062
|
+
Oo();
|
|
1019
1063
|
return;
|
|
1020
1064
|
}
|
|
1021
1065
|
F.value = !0;
|
|
1022
1066
|
}
|
|
1023
|
-
function
|
|
1024
|
-
F.value = !1, g(() =>
|
|
1067
|
+
function Oo() {
|
|
1068
|
+
F.value = !1, g(() => oo(() => dn.value?.focusPageDecorations()));
|
|
1025
1069
|
}
|
|
1026
|
-
function
|
|
1027
|
-
return
|
|
1070
|
+
function ko() {
|
|
1071
|
+
return Fi(), c(Ni());
|
|
1028
1072
|
}
|
|
1029
|
-
function
|
|
1030
|
-
T.value =
|
|
1073
|
+
function Ao(e) {
|
|
1074
|
+
T.value = _n(e), w.value = {
|
|
1031
1075
|
...w.value,
|
|
1032
1076
|
[C.value]: T.value
|
|
1033
1077
|
};
|
|
1034
|
-
let t = X(
|
|
1078
|
+
let t = X(ke(e, l.pageSize));
|
|
1035
1079
|
t.signingPlacements?.some((e) => e.id === O.value) || Q(), J(t.pages[0]?.id);
|
|
1036
1080
|
}
|
|
1037
|
-
function
|
|
1081
|
+
function jo() {
|
|
1038
1082
|
let e = Y(!1);
|
|
1039
|
-
return x.value ? u(S.value) : u(
|
|
1083
|
+
return x.value ? u(S.value) : u(ut(S.value, C.value, e));
|
|
1040
1084
|
}
|
|
1041
|
-
function
|
|
1042
|
-
let n =
|
|
1043
|
-
|
|
1085
|
+
function Mo(e, t) {
|
|
1086
|
+
let n = rt(st(e, void 0, l.pageSize), l.pageSizeOptions), r = S.value;
|
|
1087
|
+
xn.value = !0, Y(!1), S.value = n.files, w.value = vn(n.files, e), Bi(dt(S.value, t ?? C.value), {
|
|
1044
1088
|
syncCurrent: !1,
|
|
1045
1089
|
shouldEmit: !0,
|
|
1046
1090
|
forceRefresh: !0,
|
|
1047
1091
|
persistCurrentErrors: !1
|
|
1048
|
-
}), d(r) !== d(S.value) &&
|
|
1092
|
+
}), d(r) !== d(S.value) && zi(S.value, "");
|
|
1049
1093
|
}
|
|
1050
|
-
function
|
|
1094
|
+
function No(e) {
|
|
1051
1095
|
if (W.value) return;
|
|
1052
|
-
|
|
1053
|
-
let t =
|
|
1096
|
+
xn.value = !0, Y(!0);
|
|
1097
|
+
let t = it(e || `合同文件 ${S.value.length + 1}`, l.pageSize);
|
|
1054
1098
|
return S.value = [...S.value, t], w.value = {
|
|
1055
1099
|
...w.value,
|
|
1056
1100
|
[t.id]: []
|
|
1057
|
-
},
|
|
1101
|
+
}, zi(S.value, ""), h("file-add", u([t])[0]), Bi(t.id, {
|
|
1058
1102
|
syncCurrent: !1,
|
|
1059
1103
|
shouldEmit: !0,
|
|
1060
1104
|
forceRefresh: !0
|
|
1061
1105
|
}), u([t])[0];
|
|
1062
1106
|
}
|
|
1063
|
-
function
|
|
1064
|
-
!x.value && !S.value.some((t) => t.id === e) || (
|
|
1107
|
+
function Po(e) {
|
|
1108
|
+
!x.value && !S.value.some((t) => t.id === e) || (xn.value = !0, Bi(e));
|
|
1065
1109
|
}
|
|
1066
|
-
function
|
|
1110
|
+
function Fo(e, t) {
|
|
1067
1111
|
if (W.value) return;
|
|
1068
|
-
|
|
1069
|
-
let n =
|
|
1070
|
-
if (r) return S.value = n,
|
|
1112
|
+
xn.value = !0, Y(!1);
|
|
1113
|
+
let n = lt(S.value, e, t), r = n.find((t) => t.id === e);
|
|
1114
|
+
if (r) return S.value = n, zi(n, e), u([r])[0];
|
|
1071
1115
|
}
|
|
1072
|
-
function
|
|
1116
|
+
function Io(e) {
|
|
1073
1117
|
if (W.value || S.value.length <= 1) return;
|
|
1074
|
-
|
|
1118
|
+
xn.value = !0, Y(!1);
|
|
1075
1119
|
let t = S.value.find((t) => t.id === e);
|
|
1076
1120
|
if (!t) return;
|
|
1077
|
-
let n =
|
|
1121
|
+
let n = ct(S.value, e);
|
|
1078
1122
|
if (n.length === S.value.length) return;
|
|
1079
1123
|
S.value = n;
|
|
1080
1124
|
let { [e]: r, ...i } = w.value;
|
|
1081
|
-
w.value = i,
|
|
1125
|
+
w.value = i, zi(n, ""), h("file-remove", u([t])[0]);
|
|
1082
1126
|
let a = t.template.signingPlacements ?? [];
|
|
1083
|
-
return a.forEach((e) => h("signing-placement-remove",
|
|
1127
|
+
return a.forEach((e) => h("signing-placement-remove", pt(e))), a.some((e) => e.id === O.value) && h("signing-placement-select", void 0), C.value === e && Bi(dt(n, n[0]?.id), {
|
|
1084
1128
|
syncCurrent: !1,
|
|
1085
1129
|
shouldEmit: !0,
|
|
1086
1130
|
forceRefresh: !0,
|
|
1087
1131
|
persistCurrentErrors: !1
|
|
1088
1132
|
}), u([t])[0];
|
|
1089
1133
|
}
|
|
1090
|
-
function
|
|
1134
|
+
function Lo(e) {
|
|
1091
1135
|
if (W.value || S.value.length <= 1) return;
|
|
1092
1136
|
let t = S.value.find((t) => t.id === e);
|
|
1093
1137
|
if (!t) return;
|
|
1094
1138
|
let n = t.template.signingPlacements?.length ?? 0;
|
|
1095
|
-
|
|
1139
|
+
Bt.confirm({
|
|
1096
1140
|
title: "删除合同文件",
|
|
1097
1141
|
content: n ? `“${t.name}”包含 ${n} 个签署位置,删除后文件内正文、变量和签署位置都会移除,是否继续?` : `删除“${t.name}”后,其正文和变量将无法恢复,是否继续?`,
|
|
1098
1142
|
okText: "确认删除",
|
|
1099
1143
|
okType: "danger",
|
|
1100
1144
|
cancelText: "取消",
|
|
1101
1145
|
onOk: () => {
|
|
1102
|
-
|
|
1146
|
+
Io(e);
|
|
1103
1147
|
}
|
|
1104
1148
|
});
|
|
1105
1149
|
}
|
|
1106
|
-
function
|
|
1150
|
+
function Ro(e, t) {
|
|
1107
1151
|
if (W.value) return;
|
|
1108
|
-
|
|
1109
|
-
let n = S.value.findIndex((t) => t.id === e), r =
|
|
1110
|
-
if (!(!a || n === i)) return S.value = r,
|
|
1152
|
+
xn.value = !0, Y(!1);
|
|
1153
|
+
let n = S.value.findIndex((t) => t.id === e), r = ot(S.value, e, t), i = r.findIndex((t) => t.id === e), a = r[i];
|
|
1154
|
+
if (!(!a || n === i)) return S.value = r, zi(r, ""), h("file-move", u([a])[0], n, i), u([a])[0];
|
|
1111
1155
|
}
|
|
1112
|
-
function
|
|
1156
|
+
function zo() {
|
|
1113
1157
|
Y(!1);
|
|
1114
|
-
let e =
|
|
1115
|
-
let t =
|
|
1158
|
+
let e = qo(x.value ? S.value.flatMap((e) => {
|
|
1159
|
+
let t = Ne(e.template, { maxPages: $r.value });
|
|
1116
1160
|
return [...w.value[e.id] ?? [], ...t].map((t) => ({
|
|
1117
1161
|
...t,
|
|
1118
1162
|
fileId: e.id
|
|
1119
1163
|
}));
|
|
1120
|
-
}) : [...T.value, ...
|
|
1164
|
+
}) : [...T.value, ...Ne(Ni(), { maxPages: $r.value })]);
|
|
1121
1165
|
return j.value = e, A.value = !0, h("validate", e), e;
|
|
1122
1166
|
}
|
|
1123
|
-
function
|
|
1167
|
+
function Bo(e) {
|
|
1124
1168
|
if (e.fileId && e.fileId !== C.value) {
|
|
1125
|
-
|
|
1169
|
+
Po(e.fileId), g(() => Bo({
|
|
1126
1170
|
...e,
|
|
1127
1171
|
fileId: void 0
|
|
1128
1172
|
}));
|
|
@@ -1130,93 +1174,93 @@ var Bt = {
|
|
|
1130
1174
|
}
|
|
1131
1175
|
let t = te(e);
|
|
1132
1176
|
if (t) {
|
|
1133
|
-
F.value = !0, g(() =>
|
|
1177
|
+
F.value = !0, g(() => fn.value?.focusField(t));
|
|
1134
1178
|
return;
|
|
1135
1179
|
}
|
|
1136
1180
|
if (e.type === "signing-placement") {
|
|
1137
1181
|
let t = K.value.find((t) => t.id === e.id);
|
|
1138
1182
|
if (t) {
|
|
1139
|
-
|
|
1183
|
+
To(t.pageId), Q(t.id);
|
|
1140
1184
|
return;
|
|
1141
1185
|
}
|
|
1142
1186
|
}
|
|
1143
1187
|
if (e.variableKey) {
|
|
1144
|
-
|
|
1188
|
+
Co(e.variableKey);
|
|
1145
1189
|
return;
|
|
1146
1190
|
}
|
|
1147
1191
|
if (e.pageId) {
|
|
1148
|
-
|
|
1192
|
+
Eo(e.pageId);
|
|
1149
1193
|
return;
|
|
1150
1194
|
}
|
|
1151
1195
|
let n = E.value.variables.find((t) => t.id === e.id || t.key === e.id);
|
|
1152
1196
|
if (n) {
|
|
1153
|
-
|
|
1197
|
+
So(n);
|
|
1154
1198
|
return;
|
|
1155
1199
|
}
|
|
1156
|
-
E.value.pages.some((t) => t.id === e.id) &&
|
|
1200
|
+
E.value.pages.some((t) => t.id === e.id) && To(e.id);
|
|
1157
1201
|
}
|
|
1158
|
-
function
|
|
1202
|
+
function Vo(e) {
|
|
1159
1203
|
return te(e) ? "页面装饰" : e.type === "signing-placement" ? "签署位置" : e.type === "variable" ? "变量" : "字段";
|
|
1160
1204
|
}
|
|
1161
|
-
function
|
|
1162
|
-
return
|
|
1205
|
+
function Ho() {
|
|
1206
|
+
return Fi(), we(Ni());
|
|
1163
1207
|
}
|
|
1164
|
-
function
|
|
1208
|
+
function Uo() {
|
|
1165
1209
|
let e = Y(!1);
|
|
1166
|
-
return
|
|
1210
|
+
return at(x.value ? S.value : ut(S.value, C.value, e));
|
|
1167
1211
|
}
|
|
1168
|
-
function
|
|
1169
|
-
let t =
|
|
1212
|
+
function Wo(e) {
|
|
1213
|
+
let t = Ni();
|
|
1170
1214
|
try {
|
|
1171
|
-
let n =
|
|
1215
|
+
let n = _e(t, T.value);
|
|
1172
1216
|
if (n.length) throw new ie(n);
|
|
1173
1217
|
return e(t);
|
|
1174
1218
|
} catch (e) {
|
|
1175
1219
|
throw e instanceof ie && (j.value = [...e.errors], A.value = !0, h("validate", [...e.errors])), e;
|
|
1176
1220
|
}
|
|
1177
1221
|
}
|
|
1178
|
-
function
|
|
1179
|
-
return
|
|
1222
|
+
function Go(e) {
|
|
1223
|
+
return Wo((t) => se(t, e));
|
|
1180
1224
|
}
|
|
1181
|
-
function
|
|
1182
|
-
return
|
|
1225
|
+
function Ko(e) {
|
|
1226
|
+
return Wo((t) => oe(t, e));
|
|
1183
1227
|
}
|
|
1184
|
-
function
|
|
1228
|
+
function qo(e) {
|
|
1185
1229
|
let t = /* @__PURE__ */ new Set();
|
|
1186
1230
|
return e.filter((e) => {
|
|
1187
1231
|
let n = `${e.fileId ?? ""}|${e.code ?? ""}|${e.id}|${e.pageId ?? ""}|${e.message}`;
|
|
1188
1232
|
return t.has(n) ? !1 : (t.add(n), !0);
|
|
1189
1233
|
});
|
|
1190
1234
|
}
|
|
1191
|
-
function
|
|
1235
|
+
function Jo(e) {
|
|
1192
1236
|
j.value = [...e], A.value = !0;
|
|
1193
1237
|
}
|
|
1194
|
-
function
|
|
1238
|
+
function Yo() {
|
|
1195
1239
|
j.value = [], A.value = !1;
|
|
1196
1240
|
}
|
|
1197
|
-
function
|
|
1241
|
+
function Xo() {
|
|
1198
1242
|
M.get(q.value?.id ?? k.value)?.focus();
|
|
1199
1243
|
}
|
|
1200
|
-
function
|
|
1201
|
-
|
|
1244
|
+
function Zo(e) {
|
|
1245
|
+
ki(e) && Z({
|
|
1202
1246
|
type: "set-text-align",
|
|
1203
1247
|
value: e
|
|
1204
1248
|
});
|
|
1205
1249
|
}
|
|
1206
|
-
function
|
|
1207
|
-
(e === "paragraph" ||
|
|
1250
|
+
function Qo(e) {
|
|
1251
|
+
(e === "paragraph" || Ai(e)) && Z({
|
|
1208
1252
|
type: "apply-block-style",
|
|
1209
1253
|
format: e
|
|
1210
1254
|
});
|
|
1211
1255
|
}
|
|
1212
|
-
function
|
|
1213
|
-
let t =
|
|
1256
|
+
function $o(e) {
|
|
1257
|
+
let t = Mi(e);
|
|
1214
1258
|
t && (Z({
|
|
1215
1259
|
type: "set-font-size",
|
|
1216
1260
|
value: t
|
|
1217
|
-
}),
|
|
1261
|
+
}), qn.value = "");
|
|
1218
1262
|
}
|
|
1219
|
-
function
|
|
1263
|
+
function es(e) {
|
|
1220
1264
|
let t = String(e || "").trim();
|
|
1221
1265
|
if (!t) {
|
|
1222
1266
|
Z({ type: "unset-font-family" });
|
|
@@ -1227,32 +1271,32 @@ var Bt = {
|
|
|
1227
1271
|
value: t
|
|
1228
1272
|
});
|
|
1229
1273
|
}
|
|
1230
|
-
function
|
|
1231
|
-
|
|
1274
|
+
function ts(e) {
|
|
1275
|
+
ns(e.target?.value ?? "");
|
|
1232
1276
|
}
|
|
1233
|
-
function
|
|
1277
|
+
function ns(e) {
|
|
1234
1278
|
let t = e.trim();
|
|
1235
1279
|
t && Z({
|
|
1236
1280
|
type: "set-color",
|
|
1237
1281
|
value: t
|
|
1238
1282
|
});
|
|
1239
1283
|
}
|
|
1240
|
-
function
|
|
1241
|
-
|
|
1284
|
+
function rs(e) {
|
|
1285
|
+
qn.value = e;
|
|
1242
1286
|
}
|
|
1243
|
-
function
|
|
1244
|
-
|
|
1287
|
+
function is() {
|
|
1288
|
+
qn.value.trim() && $o(qn.value);
|
|
1245
1289
|
}
|
|
1246
|
-
function
|
|
1247
|
-
e.key === "Enter" && (e.preventDefault(),
|
|
1290
|
+
function as(e) {
|
|
1291
|
+
e.key === "Enter" && (e.preventDefault(), is());
|
|
1248
1292
|
}
|
|
1249
|
-
function
|
|
1250
|
-
e || (
|
|
1293
|
+
function os(e) {
|
|
1294
|
+
e || (is(), qn.value = "");
|
|
1251
1295
|
}
|
|
1252
|
-
function
|
|
1296
|
+
function ss(e) {
|
|
1253
1297
|
if (W.value) return;
|
|
1254
|
-
k.value = e.pageId, I.value = !1, L.value = !1, B.value = void 0, V.value = void 0,
|
|
1255
|
-
let t =
|
|
1298
|
+
k.value = e.pageId, I.value = !1, L.value = !1, B.value = void 0, V.value = void 0, sr.value = !1, cr.value = "";
|
|
1299
|
+
let t = St(e.clientX, e.clientY, 304, 300);
|
|
1256
1300
|
R.value = {
|
|
1257
1301
|
pageId: e.pageId,
|
|
1258
1302
|
x: t.x,
|
|
@@ -1261,207 +1305,207 @@ var Bt = {
|
|
|
1261
1305
|
selectionWidth: e.selectionWidth,
|
|
1262
1306
|
leadingText: e.leadingText
|
|
1263
1307
|
}, g(() => {
|
|
1264
|
-
|
|
1308
|
+
cs(), tr.value?.focusFirstButton();
|
|
1265
1309
|
});
|
|
1266
1310
|
}
|
|
1267
|
-
function
|
|
1268
|
-
let e =
|
|
1311
|
+
function cs() {
|
|
1312
|
+
let e = tr.value?.getMenuElement(), t = R.value;
|
|
1269
1313
|
if (!e || !t) return;
|
|
1270
|
-
let n =
|
|
1314
|
+
let n = Ct(t.x, t.y, e);
|
|
1271
1315
|
R.value = {
|
|
1272
1316
|
...t,
|
|
1273
1317
|
x: n.x,
|
|
1274
1318
|
y: n.y
|
|
1275
1319
|
};
|
|
1276
1320
|
}
|
|
1277
|
-
function
|
|
1321
|
+
function ls(e) {
|
|
1278
1322
|
if (W.value) return;
|
|
1279
1323
|
k.value = e.pageId, I.value = !1, L.value = !1, R.value = void 0, V.value = void 0;
|
|
1280
|
-
let t =
|
|
1324
|
+
let t = St(e.clientX, e.clientY, 248, 400);
|
|
1281
1325
|
B.value = {
|
|
1282
1326
|
...e,
|
|
1283
1327
|
x: t.x,
|
|
1284
1328
|
y: t.y
|
|
1285
1329
|
}, g(() => {
|
|
1286
|
-
let e =
|
|
1330
|
+
let e = lr.value?.getMenuElement(), t = B.value;
|
|
1287
1331
|
if (e && t) {
|
|
1288
|
-
let n =
|
|
1332
|
+
let n = Ct(t.x, t.y, e);
|
|
1289
1333
|
B.value = {
|
|
1290
1334
|
...t,
|
|
1291
1335
|
x: n.x,
|
|
1292
1336
|
y: n.y
|
|
1293
1337
|
};
|
|
1294
1338
|
}
|
|
1295
|
-
|
|
1339
|
+
lr.value?.focusFirstItem();
|
|
1296
1340
|
});
|
|
1297
1341
|
}
|
|
1298
|
-
function
|
|
1342
|
+
function us(e) {
|
|
1299
1343
|
if (W.value) return;
|
|
1300
|
-
k.value = e.pageId, I.value = !1, L.value = !1, R.value = void 0, B.value = void 0,
|
|
1301
|
-
let t =
|
|
1344
|
+
k.value = e.pageId, I.value = !1, L.value = !1, R.value = void 0, B.value = void 0, dr.value = e.image.width, fr.value = e.image.height, D.value = "", O.value && Q();
|
|
1345
|
+
let t = St(e.clientX, e.clientY, 288, 196);
|
|
1302
1346
|
V.value = {
|
|
1303
1347
|
pageId: e.pageId,
|
|
1304
1348
|
image: e.image,
|
|
1305
1349
|
x: t.x,
|
|
1306
1350
|
y: t.y
|
|
1307
1351
|
}, g(() => {
|
|
1308
|
-
|
|
1352
|
+
ds(), ur.value?.getMenuElement()?.querySelector("input, button:not(:disabled)")?.focus();
|
|
1309
1353
|
});
|
|
1310
1354
|
}
|
|
1311
|
-
function
|
|
1312
|
-
let e =
|
|
1355
|
+
function ds() {
|
|
1356
|
+
let e = ur.value?.getMenuElement(), t = V.value;
|
|
1313
1357
|
if (!e || !t) return;
|
|
1314
|
-
let n =
|
|
1358
|
+
let n = Ct(t.x, t.y, e);
|
|
1315
1359
|
V.value = {
|
|
1316
1360
|
...t,
|
|
1317
1361
|
x: n.x,
|
|
1318
1362
|
y: n.y
|
|
1319
1363
|
};
|
|
1320
1364
|
}
|
|
1321
|
-
function
|
|
1365
|
+
function fs() {
|
|
1322
1366
|
let e = V.value;
|
|
1323
1367
|
!e || W.value || (M.get(e.pageId)?.updateSelectedContentImage({
|
|
1324
|
-
width:
|
|
1325
|
-
height:
|
|
1368
|
+
width: Le(dr.value),
|
|
1369
|
+
height: Le(fr.value)
|
|
1326
1370
|
}) && (H.value = "已更新图片尺寸"), $());
|
|
1327
1371
|
}
|
|
1328
|
-
function
|
|
1372
|
+
function ps() {
|
|
1329
1373
|
let e = V.value;
|
|
1330
1374
|
!e || W.value || (M.get(e.pageId)?.updateSelectedContentImage({
|
|
1331
1375
|
width: void 0,
|
|
1332
1376
|
height: void 0
|
|
1333
1377
|
}) && (H.value = "已恢复图片自然尺寸"), $());
|
|
1334
1378
|
}
|
|
1335
|
-
function
|
|
1336
|
-
e.type === "table" ?
|
|
1379
|
+
function ms(e) {
|
|
1380
|
+
e.type === "table" ? ls(e) : e.type === "image" ? us(e) : ss(e);
|
|
1337
1381
|
}
|
|
1338
1382
|
function $() {
|
|
1339
|
-
R.value = void 0, B.value = void 0, V.value = void 0,
|
|
1383
|
+
R.value = void 0, B.value = void 0, V.value = void 0, sr.value = !1, cr.value = "";
|
|
1340
1384
|
}
|
|
1341
|
-
function
|
|
1342
|
-
I.value = !1, L.value = !1,
|
|
1385
|
+
function hs() {
|
|
1386
|
+
I.value = !1, L.value = !1, Gn.value = !1, Jn.value = !1, Yn.value = !1;
|
|
1343
1387
|
}
|
|
1344
|
-
function
|
|
1345
|
-
|
|
1388
|
+
function gs() {
|
|
1389
|
+
hs(), Vn.value = !Vn.value, g(() => oo(() => dn.value?.focusChromeToggle()));
|
|
1346
1390
|
}
|
|
1347
|
-
let
|
|
1391
|
+
let _s = [
|
|
1348
1392
|
".gd-contract-template-designer__context-menu",
|
|
1349
1393
|
".gd-contract-template-designer__bubble-menu",
|
|
1350
1394
|
".gd-contract-template-designer__bubble-menu-popup"
|
|
1351
1395
|
].join(",");
|
|
1352
|
-
function
|
|
1353
|
-
let e = W.value ||
|
|
1396
|
+
function vs() {
|
|
1397
|
+
let e = W.value || ar.value || rr.value || xr.value || F.value || jn.value, t = k.value, n = e ? void 0 : M.get(t)?.getSelectionViewportRect();
|
|
1354
1398
|
if (!n) {
|
|
1355
1399
|
z.value = void 0;
|
|
1356
1400
|
return;
|
|
1357
1401
|
}
|
|
1358
|
-
let r = n.top - 40 -
|
|
1402
|
+
let r = n.top - 40 - on, i = r >= 12 ? r : n.bottom + on, a = St((n.left + n.right) / 2 - 380 / 2, i, 380, 40);
|
|
1359
1403
|
z.value = {
|
|
1360
1404
|
pageId: t,
|
|
1361
1405
|
x: a.x,
|
|
1362
1406
|
y: a.y
|
|
1363
|
-
}, g(() =>
|
|
1407
|
+
}, g(() => ys(n));
|
|
1364
1408
|
}
|
|
1365
|
-
function
|
|
1366
|
-
let t =
|
|
1409
|
+
function ys(e) {
|
|
1410
|
+
let t = nr.value?.getMenuElement(), n = z.value;
|
|
1367
1411
|
if (!t || !n) return;
|
|
1368
|
-
let r = t.getBoundingClientRect(), i = e.top - r.height -
|
|
1412
|
+
let r = t.getBoundingClientRect(), i = e.top - r.height - on, a = i >= 12 ? i : e.bottom + on, o = Ct((e.left + e.right) / 2 - r.width / 2, a, t);
|
|
1369
1413
|
z.value = {
|
|
1370
1414
|
...n,
|
|
1371
1415
|
x: o.x,
|
|
1372
1416
|
y: o.y
|
|
1373
1417
|
};
|
|
1374
1418
|
}
|
|
1375
|
-
function
|
|
1419
|
+
function bs() {
|
|
1376
1420
|
let e = z.value?.pageId ?? k.value, t = M.get(e)?.getSelectionRange();
|
|
1377
|
-
|
|
1421
|
+
ir = t ? {
|
|
1378
1422
|
pageId: e,
|
|
1379
1423
|
...t
|
|
1380
|
-
} : void 0,
|
|
1424
|
+
} : void 0, rr.value = !0, z.value = void 0;
|
|
1381
1425
|
}
|
|
1382
|
-
function
|
|
1383
|
-
if (!
|
|
1384
|
-
let t =
|
|
1385
|
-
t && n && t.pageId === e && t.from === n.from && t.to === n.to || (
|
|
1426
|
+
function xs(e) {
|
|
1427
|
+
if (!rr.value) return;
|
|
1428
|
+
let t = ir, n = M.get(e)?.getSelectionRange();
|
|
1429
|
+
t && n && t.pageId === e && t.from === n.from && t.to === n.to || (rr.value = !1, ir = void 0);
|
|
1386
1430
|
}
|
|
1387
|
-
function
|
|
1388
|
-
!z.value ||
|
|
1389
|
-
|
|
1431
|
+
function Ss() {
|
|
1432
|
+
!z.value || or !== void 0 || (or = requestAnimationFrame(() => {
|
|
1433
|
+
or = void 0, vs();
|
|
1390
1434
|
}));
|
|
1391
1435
|
}
|
|
1392
|
-
function
|
|
1393
|
-
|
|
1436
|
+
function Cs() {
|
|
1437
|
+
ar.value && (ar.value = !1, vs());
|
|
1394
1438
|
}
|
|
1395
|
-
function
|
|
1396
|
-
$(),
|
|
1439
|
+
function ws() {
|
|
1440
|
+
$(), Ss();
|
|
1397
1441
|
}
|
|
1398
|
-
function
|
|
1442
|
+
function Ts(e, t) {
|
|
1399
1443
|
M.get(z.value?.pageId ?? k.value)?.requestTextContextMenu(e, t);
|
|
1400
1444
|
}
|
|
1401
|
-
function
|
|
1445
|
+
function Es(e) {
|
|
1402
1446
|
let t = e.target instanceof HTMLElement ? e.target : null;
|
|
1403
|
-
t?.closest(".ProseMirror") && (
|
|
1447
|
+
t?.closest(".ProseMirror") && (ar.value = !0, z.value = void 0), !(!R.value && !B.value && !V.value && !z.value) && (t?.closest(_s) || ($(), z.value && bs()));
|
|
1404
1448
|
}
|
|
1405
|
-
function
|
|
1406
|
-
(e.target instanceof Element ? e.target : null)?.closest(
|
|
1449
|
+
function Ds(e) {
|
|
1450
|
+
(e.target instanceof Element ? e.target : null)?.closest(_s) || ($(), Ss());
|
|
1407
1451
|
}
|
|
1408
|
-
function
|
|
1409
|
-
let t =
|
|
1452
|
+
function Os(e) {
|
|
1453
|
+
let t = cn.value;
|
|
1410
1454
|
if (!t || typeof document > "u") return !1;
|
|
1411
1455
|
let n = e.target instanceof Node ? e.target : void 0, r = document.activeElement;
|
|
1412
1456
|
return !!(n && t.contains(n) || r && t.contains(r) || n instanceof Element && n.closest(".gd-contract-template-designer__context-menu"));
|
|
1413
1457
|
}
|
|
1414
|
-
function
|
|
1458
|
+
function ks(e) {
|
|
1415
1459
|
if (e.key !== "Escape" || !F.value || typeof document > "u") return;
|
|
1416
|
-
let t =
|
|
1460
|
+
let t = cn.value?.querySelector(".gd-contract-template-designer__page-decorations-studio");
|
|
1417
1461
|
if (!t) return;
|
|
1418
|
-
let n = e.target instanceof Element ? e.target : null, r = document.activeElement instanceof Element ? document.activeElement : null, i = !!(n?.closest(
|
|
1462
|
+
let n = e.target instanceof Element ? e.target : null, r = document.activeElement instanceof Element ? document.activeElement : null, i = !!(n?.closest(hr) || r?.closest(hr)), a = !!(n && t.contains(n) || r && t.contains(r)), o = !!t.querySelector(".ant-select-open, .ant-dropdown-open");
|
|
1419
1463
|
if (i || a && o) {
|
|
1420
|
-
|
|
1464
|
+
mr.add(e);
|
|
1421
1465
|
return;
|
|
1422
1466
|
}
|
|
1423
|
-
!
|
|
1467
|
+
!xr.value && (a || e.target === document) && (e.preventDefault(), e.stopPropagation(), Oo());
|
|
1424
1468
|
}
|
|
1425
|
-
function
|
|
1469
|
+
function As(e) {
|
|
1426
1470
|
if ((e.ctrlKey || e.metaKey) && !e.altKey && e.key.toLowerCase() === "s") {
|
|
1427
|
-
if (!
|
|
1428
|
-
e.preventDefault(),
|
|
1471
|
+
if (!Sr.value || !Os(e)) return;
|
|
1472
|
+
e.preventDefault(), ui();
|
|
1429
1473
|
return;
|
|
1430
1474
|
}
|
|
1431
1475
|
if (e.key === "Escape") {
|
|
1432
|
-
if (
|
|
1433
|
-
|
|
1476
|
+
if (mr.has(e)) {
|
|
1477
|
+
mr.delete(e);
|
|
1434
1478
|
return;
|
|
1435
1479
|
}
|
|
1436
|
-
let t =
|
|
1437
|
-
if (!t && F.value &&
|
|
1480
|
+
let t = xr.value, n = t || F.value;
|
|
1481
|
+
if (!t && F.value && Oo(), $(), hs(), n && e.stopPropagation(), !n) {
|
|
1438
1482
|
if (z.value) {
|
|
1439
|
-
|
|
1483
|
+
bs(), e.stopPropagation();
|
|
1440
1484
|
return;
|
|
1441
1485
|
}
|
|
1442
|
-
|
|
1486
|
+
Hn.value ? co() : P.value = !1;
|
|
1443
1487
|
}
|
|
1444
1488
|
}
|
|
1445
1489
|
}
|
|
1446
|
-
function
|
|
1447
|
-
e === k.value && t.selectedContentImage && (D.value = "", O.value && Q()), e === k.value && (
|
|
1448
|
-
let n =
|
|
1449
|
-
n &&
|
|
1450
|
-
...
|
|
1490
|
+
function js(e, t) {
|
|
1491
|
+
e === k.value && t.selectedContentImage && (D.value = "", O.value && Q()), e === k.value && (xs(e), vs());
|
|
1492
|
+
let n = Kn.value[e];
|
|
1493
|
+
n && xt(n, t) || (Kn.value = {
|
|
1494
|
+
...Kn.value,
|
|
1451
1495
|
[e]: t
|
|
1452
1496
|
});
|
|
1453
1497
|
}
|
|
1454
|
-
function
|
|
1498
|
+
function Ms(e = pr.value.rows, t = pr.value.cols) {
|
|
1455
1499
|
Z({
|
|
1456
1500
|
type: "insert-table",
|
|
1457
1501
|
options: {
|
|
1458
1502
|
rows: Math.min(10, Math.max(1, Math.round(Number(e) || 3))),
|
|
1459
1503
|
cols: Math.min(10, Math.max(1, Math.round(Number(t) || 3))),
|
|
1460
|
-
withHeaderRow: !!
|
|
1504
|
+
withHeaderRow: !!pr.value.withHeaderRow
|
|
1461
1505
|
}
|
|
1462
1506
|
}), I.value = !1, $();
|
|
1463
1507
|
}
|
|
1464
|
-
let
|
|
1508
|
+
let Ns = {
|
|
1465
1509
|
"delete-table-row": {
|
|
1466
1510
|
label: "删除当前行",
|
|
1467
1511
|
countKey: "deleteRow"
|
|
@@ -1475,18 +1519,18 @@ var Bt = {
|
|
|
1475
1519
|
countKey: "deleteTable"
|
|
1476
1520
|
}
|
|
1477
1521
|
};
|
|
1478
|
-
function
|
|
1522
|
+
function Ps(e) {
|
|
1479
1523
|
let t = B.value;
|
|
1480
1524
|
if (!t) return;
|
|
1481
1525
|
let n = () => {
|
|
1482
1526
|
Z(e, t.pageId), $();
|
|
1483
|
-
}, r =
|
|
1527
|
+
}, r = Ns[e.type];
|
|
1484
1528
|
if (!r) {
|
|
1485
1529
|
n();
|
|
1486
1530
|
return;
|
|
1487
1531
|
}
|
|
1488
1532
|
let i = t.affectedVariableCounts[r.countKey];
|
|
1489
|
-
$(),
|
|
1533
|
+
$(), Bt.confirm({
|
|
1490
1534
|
title: r.label,
|
|
1491
1535
|
content: i ? `此操作将移除 ${i} 个正文变量节点,是否继续?` : "此操作将修改表格结构,是否继续?",
|
|
1492
1536
|
okText: "确认",
|
|
@@ -1496,8 +1540,8 @@ var Bt = {
|
|
|
1496
1540
|
onCancel: () => M.get(t.pageId)?.focus()
|
|
1497
1541
|
});
|
|
1498
1542
|
}
|
|
1499
|
-
function
|
|
1500
|
-
let t =
|
|
1543
|
+
function Fs(e) {
|
|
1544
|
+
let t = lr.value?.getMenuElement();
|
|
1501
1545
|
if (!t) return;
|
|
1502
1546
|
if (e.key === "Escape") {
|
|
1503
1547
|
e.preventDefault(), e.stopPropagation();
|
|
@@ -1520,118 +1564,121 @@ var Bt = {
|
|
|
1520
1564
|
let r = (Math.max(0, n.indexOf(document.activeElement)) + (e.key === "ArrowUp" || e.key === "ArrowLeft" ? -1 : 1) + n.length) % n.length;
|
|
1521
1565
|
e.preventDefault(), n[r]?.focus();
|
|
1522
1566
|
}
|
|
1523
|
-
function
|
|
1567
|
+
function Is(e) {
|
|
1524
1568
|
if (e.key !== "Escape") return;
|
|
1525
1569
|
e.preventDefault(), e.stopPropagation();
|
|
1526
1570
|
let t = R.value?.pageId;
|
|
1527
1571
|
$(), M.get(t ?? "")?.focus();
|
|
1528
1572
|
}
|
|
1529
|
-
function
|
|
1573
|
+
function Ls(e) {
|
|
1530
1574
|
if (e.key !== "Escape") return;
|
|
1531
1575
|
e.preventDefault(), e.stopPropagation();
|
|
1532
1576
|
let t = V.value?.pageId;
|
|
1533
1577
|
$(), M.get(t ?? "")?.focus();
|
|
1534
1578
|
}
|
|
1535
|
-
function
|
|
1579
|
+
function Rs(e) {
|
|
1536
1580
|
Z({ type: e }), L.value = !1, $();
|
|
1537
1581
|
}
|
|
1538
|
-
return
|
|
1539
|
-
getValue:
|
|
1540
|
-
setValue:
|
|
1541
|
-
getFiles:
|
|
1542
|
-
setFiles:
|
|
1543
|
-
addFile:
|
|
1544
|
-
selectFile:
|
|
1545
|
-
renameFile:
|
|
1546
|
-
removeFile:
|
|
1547
|
-
moveFile:
|
|
1548
|
-
validate:
|
|
1549
|
-
exportTemplate:
|
|
1550
|
-
exportFiles:
|
|
1551
|
-
getSubmitData:
|
|
1552
|
-
clearTemplate:
|
|
1553
|
-
saveDraftCache:
|
|
1554
|
-
loadDraftCache:
|
|
1555
|
-
clearDraftCache:
|
|
1556
|
-
getDraftCacheStatus:
|
|
1557
|
-
insertVariable:
|
|
1558
|
-
insertImage:
|
|
1559
|
-
focus:
|
|
1560
|
-
openPreview:
|
|
1561
|
-
closePreview:
|
|
1562
|
-
openSubmitDataViewer:
|
|
1563
|
-
closeSubmitDataViewer:
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1582
|
+
return Ze({
|
|
1583
|
+
getValue: ko,
|
|
1584
|
+
setValue: Ao,
|
|
1585
|
+
getFiles: jo,
|
|
1586
|
+
setFiles: Mo,
|
|
1587
|
+
addFile: No,
|
|
1588
|
+
selectFile: Po,
|
|
1589
|
+
renameFile: Fo,
|
|
1590
|
+
removeFile: Io,
|
|
1591
|
+
moveFile: Ro,
|
|
1592
|
+
validate: zo,
|
|
1593
|
+
exportTemplate: Ho,
|
|
1594
|
+
exportFiles: Uo,
|
|
1595
|
+
getSubmitData: po,
|
|
1596
|
+
clearTemplate: yo,
|
|
1597
|
+
saveDraftCache: ui,
|
|
1598
|
+
loadDraftCache: di,
|
|
1599
|
+
clearDraftCache: fi,
|
|
1600
|
+
getDraftCacheStatus: Hi,
|
|
1601
|
+
insertVariable: Ba,
|
|
1602
|
+
insertImage: _a,
|
|
1603
|
+
focus: Xo,
|
|
1604
|
+
openPreview: uo,
|
|
1605
|
+
closePreview: fo,
|
|
1606
|
+
openSubmitDataViewer: mo,
|
|
1607
|
+
closeSubmitDataViewer: ho,
|
|
1608
|
+
getVariableData: go,
|
|
1609
|
+
openVariableDataViewer: _o,
|
|
1610
|
+
closeVariableDataViewer: vo,
|
|
1611
|
+
setServerValidationErrors: Jo,
|
|
1612
|
+
clearValidationErrors: Yo,
|
|
1613
|
+
scrollToVariable: Co,
|
|
1614
|
+
scrollToSigningPlacement: wo,
|
|
1615
|
+
scrollToPage: Eo,
|
|
1616
|
+
setZoom: eo,
|
|
1617
|
+
resetZoom: to,
|
|
1618
|
+
getZoom: no,
|
|
1619
|
+
fitWidth: Xa,
|
|
1620
|
+
insertSigningPlacement: ni,
|
|
1574
1621
|
selectSigningPlacement: Q,
|
|
1575
|
-
buildLocationRules:
|
|
1576
|
-
buildContractLocationRules:
|
|
1577
|
-
}), (e, t) => (_(),
|
|
1622
|
+
buildLocationRules: Go,
|
|
1623
|
+
buildContractLocationRules: Ko
|
|
1624
|
+
}), (e, t) => (_(), Ot("div", {
|
|
1578
1625
|
ref_key: "designerElement",
|
|
1579
|
-
ref:
|
|
1580
|
-
class:
|
|
1626
|
+
ref: cn,
|
|
1627
|
+
class: kt(["gd-contract-template-designer", {
|
|
1581
1628
|
"is-disabled": s.disabled,
|
|
1582
1629
|
"is-readonly": W.value,
|
|
1583
1630
|
"is-fullscreen": P.value,
|
|
1584
|
-
"is-immersive":
|
|
1631
|
+
"is-immersive": Hn.value
|
|
1585
1632
|
}]),
|
|
1586
|
-
style:
|
|
1633
|
+
style: At(sn.value)
|
|
1587
1634
|
}, [
|
|
1588
|
-
x.value ? (_(),
|
|
1635
|
+
x.value ? (_(), Et(_t, {
|
|
1589
1636
|
key: 0,
|
|
1590
1637
|
files: S.value,
|
|
1591
1638
|
"active-file-id": C.value,
|
|
1592
1639
|
readonly: W.value,
|
|
1593
|
-
onSelect:
|
|
1594
|
-
onAdd: t[0] ||= (e) =>
|
|
1595
|
-
onRename:
|
|
1596
|
-
onRemove:
|
|
1597
|
-
onMove:
|
|
1640
|
+
onSelect: Po,
|
|
1641
|
+
onAdd: t[0] ||= (e) => No(),
|
|
1642
|
+
onRename: Fo,
|
|
1643
|
+
onRemove: Lo,
|
|
1644
|
+
onMove: Ro
|
|
1598
1645
|
}, null, 8, [
|
|
1599
1646
|
"files",
|
|
1600
1647
|
"active-file-id",
|
|
1601
1648
|
"readonly"
|
|
1602
|
-
])) :
|
|
1603
|
-
p("div", { class:
|
|
1604
|
-
"is-sidebar-collapsed":
|
|
1605
|
-
"is-inspector-collapsed":
|
|
1649
|
+
])) : Dt("", !0),
|
|
1650
|
+
p("div", { class: kt(["gd-contract-template-designer__layout", {
|
|
1651
|
+
"is-sidebar-collapsed": zn.value,
|
|
1652
|
+
"is-inspector-collapsed": Bn.value
|
|
1606
1653
|
}]) }, [
|
|
1607
|
-
m(
|
|
1608
|
-
collapsed:
|
|
1654
|
+
m(vt, {
|
|
1655
|
+
collapsed: zn.value,
|
|
1609
1656
|
pages: E.value.pages,
|
|
1610
1657
|
variables: E.value.variables,
|
|
1611
|
-
"decoration-variable-keys":
|
|
1612
|
-
"signing-placement-navigation-items":
|
|
1658
|
+
"decoration-variable-keys": ti.value,
|
|
1659
|
+
"signing-placement-navigation-items": kr.value,
|
|
1613
1660
|
"active-page-id": k.value,
|
|
1614
1661
|
"selected-variable-key": D.value,
|
|
1615
1662
|
"selected-signing-placement-id": O.value,
|
|
1616
|
-
"normalized-max-pages":
|
|
1617
|
-
"page-limit-reached":
|
|
1663
|
+
"normalized-max-pages": $r.value,
|
|
1664
|
+
"page-limit-reached": ei.value,
|
|
1618
1665
|
"selected-page": q.value,
|
|
1619
|
-
"selected-page-size":
|
|
1620
|
-
"normalized-page-size-options":
|
|
1621
|
-
"page-size-options":
|
|
1622
|
-
"selected-page-size-option-value":
|
|
1666
|
+
"selected-page-size": jr.value,
|
|
1667
|
+
"normalized-page-size-options": qr.value,
|
|
1668
|
+
"page-size-options": Jr.value,
|
|
1669
|
+
"selected-page-size-option-value": Yr.value,
|
|
1623
1670
|
"show-signing-placement-tools": l.showSigningPlacementTools,
|
|
1624
1671
|
readonly: W.value,
|
|
1625
|
-
"get-page-size":
|
|
1626
|
-
"get-page-signing-placements":
|
|
1627
|
-
onToggle: t[1] ||= (e) =>
|
|
1628
|
-
onAddPage:
|
|
1629
|
-
onActivatePage:
|
|
1630
|
-
onDuplicatePage:
|
|
1631
|
-
onRemovePage:
|
|
1632
|
-
onPatchPageFormat:
|
|
1633
|
-
onScrollToVariable:
|
|
1634
|
-
onScrollToSigningPlacement:
|
|
1672
|
+
"get-page-size": Ji,
|
|
1673
|
+
"get-page-signing-placements": Yi,
|
|
1674
|
+
onToggle: t[1] ||= (e) => zn.value = !zn.value,
|
|
1675
|
+
onAddPage: ra,
|
|
1676
|
+
onActivatePage: To,
|
|
1677
|
+
onDuplicatePage: ia,
|
|
1678
|
+
onRemovePage: oa,
|
|
1679
|
+
onPatchPageFormat: ta,
|
|
1680
|
+
onScrollToVariable: So,
|
|
1681
|
+
onScrollToSigningPlacement: wo
|
|
1635
1682
|
}, null, 8, [
|
|
1636
1683
|
"collapsed",
|
|
1637
1684
|
"pages",
|
|
@@ -1653,45 +1700,47 @@ var Bt = {
|
|
|
1653
1700
|
]),
|
|
1654
1701
|
p("main", {
|
|
1655
1702
|
ref_key: "workspaceElement",
|
|
1656
|
-
ref:
|
|
1703
|
+
ref: un,
|
|
1657
1704
|
class: "gd-contract-template-designer__workspace"
|
|
1658
1705
|
}, [
|
|
1659
|
-
|
|
1660
|
-
id:
|
|
1706
|
+
Rt(p("div", {
|
|
1707
|
+
id: mn,
|
|
1661
1708
|
class: "gd-contract-template-designer__workspace-chrome"
|
|
1662
|
-
}, [m(
|
|
1709
|
+
}, [m(Ue, {
|
|
1663
1710
|
ref_key: "workspaceHeaderElement",
|
|
1664
|
-
ref:
|
|
1665
|
-
summary:
|
|
1666
|
-
"draft-cache-status-text":
|
|
1667
|
-
"draft-cache-status-class":
|
|
1711
|
+
ref: dn,
|
|
1712
|
+
summary: Pr.value,
|
|
1713
|
+
"draft-cache-status-text": Rr.value,
|
|
1714
|
+
"draft-cache-status-class": zr.value,
|
|
1668
1715
|
"show-draft-cache-status": s.showDraftCacheStatus,
|
|
1669
1716
|
"show-clear-button": s.showClearButton,
|
|
1670
1717
|
"show-submit-data-viewer": s.showSubmitDataViewer,
|
|
1718
|
+
"show-variable-data-viewer": s.showVariableDataViewer,
|
|
1671
1719
|
readonly: W.value,
|
|
1672
|
-
"zoom-percent":
|
|
1673
|
-
"zoom-out-disabled": N.value <=
|
|
1674
|
-
"zoom-in-disabled": N.value >=
|
|
1720
|
+
"zoom-percent": Br.value,
|
|
1721
|
+
"zoom-out-disabled": N.value <= Yt,
|
|
1722
|
+
"zoom-in-disabled": N.value >= Xt,
|
|
1675
1723
|
"is-fullscreen": P.value,
|
|
1676
|
-
immersive:
|
|
1724
|
+
immersive: Hn.value,
|
|
1677
1725
|
"page-decorations-open": F.value,
|
|
1678
|
-
"page-decorations-studio-id":
|
|
1679
|
-
"page-decorations-preset-label":
|
|
1680
|
-
"page-decorations-enabled-count":
|
|
1681
|
-
"page-decorations-enabled-states":
|
|
1682
|
-
"chrome-controls-id":
|
|
1683
|
-
onZoomOut:
|
|
1684
|
-
onZoomIn:
|
|
1685
|
-
onFitWidth: y(
|
|
1686
|
-
onResetZoom:
|
|
1687
|
-
onToggleFullscreen:
|
|
1688
|
-
onToggleImmersive:
|
|
1689
|
-
onClear:
|
|
1690
|
-
onValidate:
|
|
1691
|
-
onPreview:
|
|
1692
|
-
onSubmitData:
|
|
1693
|
-
|
|
1694
|
-
|
|
1726
|
+
"page-decorations-studio-id": pn,
|
|
1727
|
+
"page-decorations-preset-label": Fr.value,
|
|
1728
|
+
"page-decorations-enabled-count": Lr.value,
|
|
1729
|
+
"page-decorations-enabled-states": Ir.value,
|
|
1730
|
+
"chrome-controls-id": mn,
|
|
1731
|
+
onZoomOut: io,
|
|
1732
|
+
onZoomIn: ro,
|
|
1733
|
+
onFitWidth: y(Xa),
|
|
1734
|
+
onResetZoom: to,
|
|
1735
|
+
onToggleFullscreen: ao,
|
|
1736
|
+
onToggleImmersive: lo,
|
|
1737
|
+
onClear: bo,
|
|
1738
|
+
onValidate: zo,
|
|
1739
|
+
onPreview: uo,
|
|
1740
|
+
onSubmitData: mo,
|
|
1741
|
+
onVariableData: _o,
|
|
1742
|
+
onTogglePageDecorations: Do,
|
|
1743
|
+
onToggleChrome: gs
|
|
1695
1744
|
}, null, 8, [
|
|
1696
1745
|
"summary",
|
|
1697
1746
|
"draft-cache-status-text",
|
|
@@ -1699,6 +1748,7 @@ var Bt = {
|
|
|
1699
1748
|
"show-draft-cache-status",
|
|
1700
1749
|
"show-clear-button",
|
|
1701
1750
|
"show-submit-data-viewer",
|
|
1751
|
+
"show-variable-data-viewer",
|
|
1702
1752
|
"readonly",
|
|
1703
1753
|
"zoom-percent",
|
|
1704
1754
|
"zoom-out-disabled",
|
|
@@ -1710,56 +1760,56 @@ var Bt = {
|
|
|
1710
1760
|
"page-decorations-enabled-count",
|
|
1711
1761
|
"page-decorations-enabled-states",
|
|
1712
1762
|
"onFitWidth"
|
|
1713
|
-
]), m(
|
|
1714
|
-
"variable-insert-popover-open":
|
|
1715
|
-
"onUpdate:variableInsertPopoverOpen": t[2] ||= (e) =>
|
|
1716
|
-
"image-insert-popover-open":
|
|
1717
|
-
"onUpdate:imageInsertPopoverOpen": t[3] ||= (e) =>
|
|
1718
|
-
"image-insert-url":
|
|
1719
|
-
"onUpdate:imageInsertUrl": t[4] ||= (e) =>
|
|
1720
|
-
"image-insert-width":
|
|
1721
|
-
"onUpdate:imageInsertWidth": t[5] ||= (e) =>
|
|
1722
|
-
"image-insert-height":
|
|
1723
|
-
"onUpdate:imageInsertHeight": t[6] ||= (e) =>
|
|
1763
|
+
]), m(We, {
|
|
1764
|
+
"variable-insert-popover-open": Jn.value,
|
|
1765
|
+
"onUpdate:variableInsertPopoverOpen": t[2] ||= (e) => Jn.value = e,
|
|
1766
|
+
"image-insert-popover-open": Yn.value,
|
|
1767
|
+
"onUpdate:imageInsertPopoverOpen": t[3] ||= (e) => Yn.value = e,
|
|
1768
|
+
"image-insert-url": Xn.value,
|
|
1769
|
+
"onUpdate:imageInsertUrl": t[4] ||= (e) => Xn.value = e,
|
|
1770
|
+
"image-insert-width": Zn.value,
|
|
1771
|
+
"onUpdate:imageInsertWidth": t[5] ||= (e) => Zn.value = e,
|
|
1772
|
+
"image-insert-height": Qn.value,
|
|
1773
|
+
"onUpdate:imageInsertHeight": t[6] ||= (e) => Qn.value = e,
|
|
1724
1774
|
"table-insert-popover-open": I.value,
|
|
1725
1775
|
"onUpdate:tableInsertPopoverOpen": t[7] ||= (e) => I.value = e,
|
|
1726
1776
|
"table-actions-popover-open": L.value,
|
|
1727
1777
|
"onUpdate:tableActionsPopoverOpen": t[8] ||= (e) => L.value = e,
|
|
1728
|
-
"table-insert-draft":
|
|
1729
|
-
"onUpdate:tableInsertDraft": t[9] ||= (e) =>
|
|
1730
|
-
"toolbar-more-open":
|
|
1731
|
-
"onUpdate:toolbarMoreOpen": t[10] ||= (e) =>
|
|
1778
|
+
"table-insert-draft": pr.value,
|
|
1779
|
+
"onUpdate:tableInsertDraft": t[9] ||= (e) => pr.value = e,
|
|
1780
|
+
"toolbar-more-open": Gn.value,
|
|
1781
|
+
"onUpdate:toolbarMoreOpen": t[10] ||= (e) => Gn.value = e,
|
|
1732
1782
|
readonly: W.value,
|
|
1733
|
-
"editor-state":
|
|
1734
|
-
"current-block-format":
|
|
1735
|
-
"block-format-options":
|
|
1736
|
-
"font-family-select-options":
|
|
1737
|
-
"current-editor-font-family":
|
|
1738
|
-
"font-size-preset-options":
|
|
1739
|
-
"current-editor-font-size":
|
|
1740
|
-
"editor-font-size-search-value":
|
|
1741
|
-
"current-editor-text-color":
|
|
1742
|
-
"body-control-tool-items":
|
|
1743
|
-
"page-limit-reached":
|
|
1744
|
-
"normalized-max-pages":
|
|
1745
|
-
"image-processing":
|
|
1746
|
-
"image-insert-error":
|
|
1783
|
+
"editor-state": bi.value,
|
|
1784
|
+
"current-block-format": xi.value,
|
|
1785
|
+
"block-format-options": Wr,
|
|
1786
|
+
"font-family-select-options": Hr.value,
|
|
1787
|
+
"current-editor-font-family": Si.value,
|
|
1788
|
+
"font-size-preset-options": Ei.value,
|
|
1789
|
+
"current-editor-font-size": Ci.value,
|
|
1790
|
+
"editor-font-size-search-value": qn.value,
|
|
1791
|
+
"current-editor-text-color": wi.value,
|
|
1792
|
+
"body-control-tool-items": Qr.value,
|
|
1793
|
+
"page-limit-reached": ei.value,
|
|
1794
|
+
"normalized-max-pages": $r.value,
|
|
1795
|
+
"image-processing": er.value,
|
|
1796
|
+
"image-insert-error": $n.value,
|
|
1747
1797
|
onCommand: t[11] ||= (e) => Z(e),
|
|
1748
|
-
onPatchBlockFormat:
|
|
1749
|
-
onPatchFontFamily:
|
|
1750
|
-
onPatchFontSize:
|
|
1751
|
-
onPatchColor:
|
|
1752
|
-
onPatchTextAlign:
|
|
1753
|
-
onInsertVariable:
|
|
1754
|
-
onOpenImageFile:
|
|
1755
|
-
onInsertImageUrl:
|
|
1756
|
-
onAddPage:
|
|
1757
|
-
onInsertTable:
|
|
1758
|
-
onTableAction:
|
|
1759
|
-
onFontSizeSearch:
|
|
1760
|
-
onFontSizeCommit:
|
|
1761
|
-
onFontSizeDropdownChange:
|
|
1762
|
-
onFontSizeKeydown:
|
|
1798
|
+
onPatchBlockFormat: Qo,
|
|
1799
|
+
onPatchFontFamily: es,
|
|
1800
|
+
onPatchFontSize: $o,
|
|
1801
|
+
onPatchColor: ts,
|
|
1802
|
+
onPatchTextAlign: Zo,
|
|
1803
|
+
onInsertVariable: xa,
|
|
1804
|
+
onOpenImageFile: va,
|
|
1805
|
+
onInsertImageUrl: ba,
|
|
1806
|
+
onAddPage: ra,
|
|
1807
|
+
onInsertTable: Ms,
|
|
1808
|
+
onTableAction: Rs,
|
|
1809
|
+
onFontSizeSearch: rs,
|
|
1810
|
+
onFontSizeCommit: is,
|
|
1811
|
+
onFontSizeDropdownChange: os,
|
|
1812
|
+
onFontSizeKeydown: as
|
|
1763
1813
|
}, null, 8, [
|
|
1764
1814
|
"variable-insert-popover-open",
|
|
1765
1815
|
"image-insert-popover-open",
|
|
@@ -1784,78 +1834,78 @@ var Bt = {
|
|
|
1784
1834
|
"normalized-max-pages",
|
|
1785
1835
|
"image-processing",
|
|
1786
1836
|
"image-insert-error"
|
|
1787
|
-
])], 512), [[
|
|
1788
|
-
|
|
1837
|
+
])], 512), [[It, !Vn.value]]),
|
|
1838
|
+
Vn.value ? (_(), Et(y(Vt), {
|
|
1789
1839
|
key: 0,
|
|
1790
1840
|
title: "展开工具区"
|
|
1791
1841
|
}, {
|
|
1792
|
-
default:
|
|
1842
|
+
default: Lt(() => [p("button", {
|
|
1793
1843
|
ref_key: "workspaceChromeHandleElement",
|
|
1794
|
-
ref:
|
|
1844
|
+
ref: hn,
|
|
1795
1845
|
type: "button",
|
|
1796
1846
|
class: "gd-contract-template-designer__workspace-chrome-handle",
|
|
1797
1847
|
"aria-label": "展开工具区",
|
|
1798
1848
|
"aria-expanded": !1,
|
|
1799
|
-
"aria-controls":
|
|
1800
|
-
onClick:
|
|
1801
|
-
}, [m(y(
|
|
1849
|
+
"aria-controls": mn,
|
|
1850
|
+
onClick: gs
|
|
1851
|
+
}, [m(y(Wt), { "aria-hidden": "true" })], 512)]),
|
|
1802
1852
|
_: 1
|
|
1803
|
-
})) :
|
|
1804
|
-
|
|
1853
|
+
})) : Dt("", !0),
|
|
1854
|
+
Hn.value && !F.value ? (_(), Ot("button", {
|
|
1805
1855
|
key: 1,
|
|
1806
1856
|
ref_key: "immersiveExitElement",
|
|
1807
|
-
ref:
|
|
1857
|
+
ref: Un,
|
|
1808
1858
|
type: "button",
|
|
1809
1859
|
class: "gd-contract-template-designer__immersive-exit",
|
|
1810
1860
|
"aria-label": "退出沉浸写作",
|
|
1811
|
-
onClick:
|
|
1861
|
+
onClick: co
|
|
1812
1862
|
}, [
|
|
1813
|
-
m(y(
|
|
1814
|
-
t[
|
|
1815
|
-
t[
|
|
1816
|
-
], 512)) :
|
|
1817
|
-
A.value ? (_(),
|
|
1818
|
-
type:
|
|
1819
|
-
message:
|
|
1863
|
+
m(y(Ut), { "aria-hidden": "true" }),
|
|
1864
|
+
t[26] ||= p("span", { class: "gd-contract-template-designer__immersive-exit-label" }, "退出沉浸", -1),
|
|
1865
|
+
t[27] ||= p("kbd", null, "Esc", -1)
|
|
1866
|
+
], 512)) : Dt("", !0),
|
|
1867
|
+
A.value ? (_(), Ot("section", Gt, [m(y(zt), {
|
|
1868
|
+
type: Mr.value ? "success" : "error",
|
|
1869
|
+
message: Nr.value,
|
|
1820
1870
|
"show-icon": ""
|
|
1821
|
-
}, null, 8, ["type", "message"]), j.value.length ? (_(),
|
|
1871
|
+
}, null, 8, ["type", "message"]), j.value.length ? (_(), Ot("div", Kt, [(_(!0), Ot(wt, null, Nt(j.value, (e) => (_(), Ot("button", {
|
|
1822
1872
|
key: `${e.id}-${e.message}`,
|
|
1823
1873
|
type: "button",
|
|
1824
1874
|
class: "gd-contract-template-designer__validation-item",
|
|
1825
|
-
onClick: (t) =>
|
|
1826
|
-
}, [p("span", null,
|
|
1875
|
+
onClick: (t) => Bo(e)
|
|
1876
|
+
}, [p("span", null, Pt(e.message), 1), p("small", null, Pt(Vo(e)), 1)], 8, qt))), 128))])) : Dt("", !0)])) : Dt("", !0),
|
|
1827
1877
|
p("div", {
|
|
1828
1878
|
ref_key: "canvasElement",
|
|
1829
|
-
ref:
|
|
1879
|
+
ref: ln,
|
|
1830
1880
|
class: "gd-contract-template-designer__canvas"
|
|
1831
|
-
}, [(_(!0),
|
|
1881
|
+
}, [(_(!0), Ot(wt, null, Nt(E.value.pages, (e, n) => (_(), Et(Ve, {
|
|
1832
1882
|
key: `${C.value}:${e.id}`,
|
|
1833
1883
|
ref_for: !0,
|
|
1834
|
-
ref: (t) =>
|
|
1884
|
+
ref: (t) => Ui(e.id, t),
|
|
1835
1885
|
page: e,
|
|
1836
1886
|
"page-index": n,
|
|
1837
|
-
"page-size":
|
|
1887
|
+
"page-size": Ji(e),
|
|
1838
1888
|
"page-decorations": E.value.pageDecorations,
|
|
1839
1889
|
"total-pages": E.value.pages.length,
|
|
1840
1890
|
variables: E.value.variables,
|
|
1841
1891
|
"selected-variable-key": D.value,
|
|
1842
|
-
"signing-placements": l.showSigningPlacementTools ?
|
|
1892
|
+
"signing-placements": l.showSigningPlacementTools ? Yi(e.id) : [],
|
|
1843
1893
|
"selected-signing-placement-id": O.value,
|
|
1844
1894
|
active: k.value === e.id,
|
|
1845
1895
|
readonly: s.readonly,
|
|
1846
1896
|
disabled: s.disabled,
|
|
1847
1897
|
zoom: N.value,
|
|
1848
|
-
"process-image-file":
|
|
1849
|
-
onPageUpdate:
|
|
1850
|
-
onVariableDrop:
|
|
1851
|
-
onVariableSelect:
|
|
1852
|
-
onSigningPlacementDrop: y(
|
|
1853
|
-
onSigningPlacementSelect:
|
|
1854
|
-
onSigningPlacementMove: y(
|
|
1855
|
-
onSigningPlacementRemove: y(
|
|
1856
|
-
onEditorFocus: t[12] ||= (e) =>
|
|
1857
|
-
onEditorStateChange:
|
|
1858
|
-
onEditorContextMenu:
|
|
1898
|
+
"process-image-file": ga,
|
|
1899
|
+
onPageUpdate: qi,
|
|
1900
|
+
onVariableDrop: Ca,
|
|
1901
|
+
onVariableSelect: wa,
|
|
1902
|
+
onSigningPlacementDrop: y(ri),
|
|
1903
|
+
onSigningPlacementSelect: Zi,
|
|
1904
|
+
onSigningPlacementMove: y(oi),
|
|
1905
|
+
onSigningPlacementRemove: y(li),
|
|
1906
|
+
onEditorFocus: t[12] ||= (e) => To(e, !1),
|
|
1907
|
+
onEditorStateChange: js,
|
|
1908
|
+
onEditorContextMenu: ms,
|
|
1859
1909
|
onVariableMoveBlocked: t[13] ||= (e) => H.value = "变量只能在当前页内移动,跨页移动尚未支持。"
|
|
1860
1910
|
}, null, 8, [
|
|
1861
1911
|
"page",
|
|
@@ -1875,20 +1925,20 @@ var Bt = {
|
|
|
1875
1925
|
"onSigningPlacementMove",
|
|
1876
1926
|
"onSigningPlacementRemove"
|
|
1877
1927
|
]))), 128))], 512),
|
|
1878
|
-
|
|
1928
|
+
Rt(m(bt, {
|
|
1879
1929
|
ref_key: "pageDecorationsStudioElement",
|
|
1880
|
-
ref:
|
|
1881
|
-
id:
|
|
1930
|
+
ref: fn,
|
|
1931
|
+
id: pn,
|
|
1882
1932
|
open: F.value,
|
|
1883
1933
|
decorations: E.value.pageDecorations,
|
|
1884
1934
|
variables: E.value.variables,
|
|
1885
|
-
"font-family-options":
|
|
1935
|
+
"font-family-options": Hr.value,
|
|
1886
1936
|
readonly: s.readonly,
|
|
1887
1937
|
disabled: s.disabled,
|
|
1888
|
-
"active-tab":
|
|
1889
|
-
"onUpdate:activeTab": t[14] ||= (e) =>
|
|
1890
|
-
onChange:
|
|
1891
|
-
onClose:
|
|
1938
|
+
"active-tab": Wn.value,
|
|
1939
|
+
"onUpdate:activeTab": t[14] ||= (e) => Wn.value = e,
|
|
1940
|
+
onChange: Oa,
|
|
1941
|
+
onClose: Oo
|
|
1892
1942
|
}, null, 8, [
|
|
1893
1943
|
"open",
|
|
1894
1944
|
"decorations",
|
|
@@ -1897,52 +1947,52 @@ var Bt = {
|
|
|
1897
1947
|
"readonly",
|
|
1898
1948
|
"disabled",
|
|
1899
1949
|
"active-tab"
|
|
1900
|
-
]), [[
|
|
1950
|
+
]), [[It, F.value]])
|
|
1901
1951
|
], 512),
|
|
1902
|
-
m(
|
|
1903
|
-
collapsed:
|
|
1952
|
+
m(yt, {
|
|
1953
|
+
collapsed: Bn.value,
|
|
1904
1954
|
readonly: s.readonly,
|
|
1905
1955
|
disabled: s.disabled,
|
|
1906
1956
|
"show-signing-placement-tools": l.showSigningPlacementTools,
|
|
1907
|
-
"body-control-tool-items":
|
|
1908
|
-
"signing-placement-tools":
|
|
1957
|
+
"body-control-tool-items": Qr.value,
|
|
1958
|
+
"signing-placement-tools": Xr.value,
|
|
1909
1959
|
"signing-placements": K.value,
|
|
1910
|
-
"selected-signing-placement":
|
|
1911
|
-
"selected-signing-placement-page-size":
|
|
1960
|
+
"selected-signing-placement": Or.value,
|
|
1961
|
+
"selected-signing-placement-page-size": Ar.value,
|
|
1912
1962
|
"selected-variable": G.value,
|
|
1913
1963
|
variables: E.value.variables,
|
|
1914
|
-
"current-variable-font-family":
|
|
1915
|
-
"font-family-select-options":
|
|
1916
|
-
"text-align-options": y(
|
|
1917
|
-
"border-style-options":
|
|
1918
|
-
"object-fit-options":
|
|
1919
|
-
"selected-variable-width-max":
|
|
1920
|
-
"selected-variable-height-max":
|
|
1921
|
-
"min-font-size":
|
|
1922
|
-
"max-font-size":
|
|
1964
|
+
"current-variable-font-family": Ti.value,
|
|
1965
|
+
"font-family-select-options": Hr.value,
|
|
1966
|
+
"text-align-options": y(Ur),
|
|
1967
|
+
"border-style-options": Gr,
|
|
1968
|
+
"object-fit-options": Kr,
|
|
1969
|
+
"selected-variable-width-max": vi.value,
|
|
1970
|
+
"selected-variable-height-max": yi.value,
|
|
1971
|
+
"min-font-size": rn,
|
|
1972
|
+
"max-font-size": an,
|
|
1923
1973
|
"default-multiline-rows": y(3),
|
|
1924
|
-
"resolve-signing-placement-type-icon": y(
|
|
1974
|
+
"resolve-signing-placement-type-icon": y(gt),
|
|
1925
1975
|
"signing-placement-type-labels": y(ae),
|
|
1926
|
-
onToggle: t[15] ||= (e) =>
|
|
1927
|
-
onVariableDragStart:
|
|
1928
|
-
onInsertVariable:
|
|
1929
|
-
onSigningPlacementDragStart: y(
|
|
1930
|
-
onInsertSigningPlacement: y(
|
|
1931
|
-
onPatchSigningPlacement: y(
|
|
1932
|
-
onDuplicateSigningPlacement: t[16] ||= (e) => y(
|
|
1933
|
-
onRemoveSigningPlacement: t[17] ||= (e) => y(
|
|
1934
|
-
onDuplicateVariable:
|
|
1935
|
-
onRemoveVariable:
|
|
1936
|
-
onPatchVariable:
|
|
1937
|
-
onRenameVariable:
|
|
1938
|
-
onPatchStyle:
|
|
1939
|
-
onPatchMultiline:
|
|
1940
|
-
onPatchRows:
|
|
1941
|
-
onPatchFontFamily:
|
|
1942
|
-
onPatchFontSize:
|
|
1943
|
-
onPatchTextAlign:
|
|
1944
|
-
onPatchBorderStyle:
|
|
1945
|
-
onPatchObjectFit:
|
|
1976
|
+
onToggle: t[15] ||= (e) => Bn.value = !Bn.value,
|
|
1977
|
+
onVariableDragStart: qa,
|
|
1978
|
+
onInsertVariable: Va,
|
|
1979
|
+
onSigningPlacementDragStart: y(ai),
|
|
1980
|
+
onInsertSigningPlacement: y(ii),
|
|
1981
|
+
onPatchSigningPlacement: y(si),
|
|
1982
|
+
onDuplicateSigningPlacement: t[16] ||= (e) => y(ci)(),
|
|
1983
|
+
onRemoveSigningPlacement: t[17] ||= (e) => y(li)(),
|
|
1984
|
+
onDuplicateVariable: za,
|
|
1985
|
+
onRemoveVariable: La,
|
|
1986
|
+
onPatchVariable: Ea,
|
|
1987
|
+
onRenameVariable: Da,
|
|
1988
|
+
onPatchStyle: Ma,
|
|
1989
|
+
onPatchMultiline: Fa,
|
|
1990
|
+
onPatchRows: Ia,
|
|
1991
|
+
onPatchFontFamily: Na,
|
|
1992
|
+
onPatchFontSize: Pa,
|
|
1993
|
+
onPatchTextAlign: ka,
|
|
1994
|
+
onPatchBorderStyle: Aa,
|
|
1995
|
+
onPatchObjectFit: ja
|
|
1946
1996
|
}, null, 8, [
|
|
1947
1997
|
"collapsed",
|
|
1948
1998
|
"readonly",
|
|
@@ -1968,83 +2018,83 @@ var Bt = {
|
|
|
1968
2018
|
"onPatchSigningPlacement"
|
|
1969
2019
|
])
|
|
1970
2020
|
], 2),
|
|
1971
|
-
(_(),
|
|
1972
|
-
B.value ? (_(),
|
|
2021
|
+
(_(), Et(Tt, { to: "body" }, [
|
|
2022
|
+
B.value ? (_(), Et(He, {
|
|
1973
2023
|
key: 0,
|
|
1974
2024
|
ref_key: "tableContextMenuElement",
|
|
1975
|
-
ref:
|
|
2025
|
+
ref: lr,
|
|
1976
2026
|
capabilities: B.value.capabilities,
|
|
1977
2027
|
"active-alignment": B.value.activeAlignment,
|
|
1978
|
-
style:
|
|
2028
|
+
style: At({
|
|
1979
2029
|
left: `${B.value.x}px`,
|
|
1980
2030
|
top: `${B.value.y}px`
|
|
1981
2031
|
}),
|
|
1982
|
-
onExecute:
|
|
1983
|
-
onKeydown:
|
|
2032
|
+
onExecute: Ps,
|
|
2033
|
+
onKeydown: Fs
|
|
1984
2034
|
}, null, 8, [
|
|
1985
2035
|
"capabilities",
|
|
1986
2036
|
"active-alignment",
|
|
1987
2037
|
"style"
|
|
1988
|
-
])) :
|
|
1989
|
-
V.value ? (_(),
|
|
2038
|
+
])) : Dt("", !0),
|
|
2039
|
+
V.value ? (_(), Et(qe, {
|
|
1990
2040
|
key: 1,
|
|
1991
2041
|
ref_key: "imageContextMenuElement",
|
|
1992
|
-
ref:
|
|
1993
|
-
width:
|
|
1994
|
-
"onUpdate:width": t[18] ||= (e) =>
|
|
1995
|
-
height:
|
|
1996
|
-
"onUpdate:height": t[19] ||= (e) =>
|
|
2042
|
+
ref: ur,
|
|
2043
|
+
width: dr.value,
|
|
2044
|
+
"onUpdate:width": t[18] ||= (e) => dr.value = e,
|
|
2045
|
+
height: fr.value,
|
|
2046
|
+
"onUpdate:height": t[19] ||= (e) => fr.value = e,
|
|
1997
2047
|
x: V.value.x,
|
|
1998
2048
|
y: V.value.y,
|
|
1999
2049
|
readonly: W.value,
|
|
2000
|
-
onRestore:
|
|
2001
|
-
onApply:
|
|
2002
|
-
onKeydown:
|
|
2050
|
+
onRestore: ps,
|
|
2051
|
+
onApply: fs,
|
|
2052
|
+
onKeydown: Ls
|
|
2003
2053
|
}, null, 8, [
|
|
2004
2054
|
"width",
|
|
2005
2055
|
"height",
|
|
2006
2056
|
"x",
|
|
2007
2057
|
"y",
|
|
2008
2058
|
"readonly"
|
|
2009
|
-
])) :
|
|
2010
|
-
R.value ? (_(),
|
|
2059
|
+
])) : Dt("", !0),
|
|
2060
|
+
R.value ? (_(), Et(Ge, {
|
|
2011
2061
|
key: 2,
|
|
2012
2062
|
ref_key: "textContextMenuElement",
|
|
2013
|
-
ref:
|
|
2014
|
-
"bind-open":
|
|
2015
|
-
"onUpdate:bindOpen": t[20] ||= (e) =>
|
|
2016
|
-
"bind-keyword":
|
|
2017
|
-
"onUpdate:bindKeyword": t[21] ||= (e) =>
|
|
2063
|
+
ref: tr,
|
|
2064
|
+
"bind-open": sr.value,
|
|
2065
|
+
"onUpdate:bindOpen": t[20] ||= (e) => sr.value = e,
|
|
2066
|
+
"bind-keyword": cr.value,
|
|
2067
|
+
"onUpdate:bindKeyword": t[21] ||= (e) => cr.value = e,
|
|
2018
2068
|
x: R.value.x,
|
|
2019
2069
|
y: R.value.y,
|
|
2020
2070
|
"has-selection": R.value.hasSelection,
|
|
2021
|
-
"editor-state":
|
|
2022
|
-
"font-size-preset-options":
|
|
2023
|
-
"current-editor-font-size":
|
|
2024
|
-
"editor-font-size-search-value":
|
|
2025
|
-
"text-align-options": y(
|
|
2026
|
-
"current-editor-text-color":
|
|
2027
|
-
"body-control-tool-items":
|
|
2028
|
-
"text-menu-bindable-variables":
|
|
2029
|
-
"page-limit-reached":
|
|
2030
|
-
"table-insert-draft":
|
|
2071
|
+
"editor-state": bi.value,
|
|
2072
|
+
"font-size-preset-options": Ei.value,
|
|
2073
|
+
"current-editor-font-size": Ci.value,
|
|
2074
|
+
"editor-font-size-search-value": qn.value,
|
|
2075
|
+
"text-align-options": y(Ur),
|
|
2076
|
+
"current-editor-text-color": wi.value,
|
|
2077
|
+
"body-control-tool-items": Qr.value,
|
|
2078
|
+
"text-menu-bindable-variables": _i.value,
|
|
2079
|
+
"page-limit-reached": ei.value,
|
|
2080
|
+
"table-insert-draft": pr.value,
|
|
2031
2081
|
"variables-count": E.value.variables.length,
|
|
2032
|
-
"resolve-bind-variable-type-label":
|
|
2033
|
-
onCommand:
|
|
2034
|
-
onClipboard:
|
|
2035
|
-
onOpenImage:
|
|
2036
|
-
onAddPage:
|
|
2037
|
-
onInsertVariable:
|
|
2038
|
-
onBindVariable:
|
|
2039
|
-
onOpenBindPanel:
|
|
2040
|
-
onKeydown:
|
|
2041
|
-
onPatchFontSize:
|
|
2042
|
-
onPatchTextAlign:
|
|
2043
|
-
onPatchColor:
|
|
2044
|
-
onFontSizeSearch:
|
|
2045
|
-
onFontSizeCommit:
|
|
2046
|
-
onFontSizeDropdownChange:
|
|
2047
|
-
onFontSizeKeydown:
|
|
2082
|
+
"resolve-bind-variable-type-label": Ga,
|
|
2083
|
+
onCommand: Wi,
|
|
2084
|
+
onClipboard: Gi,
|
|
2085
|
+
onOpenImage: va,
|
|
2086
|
+
onAddPage: Sa,
|
|
2087
|
+
onInsertVariable: Ha,
|
|
2088
|
+
onBindVariable: Wa,
|
|
2089
|
+
onOpenBindPanel: Ka,
|
|
2090
|
+
onKeydown: Is,
|
|
2091
|
+
onPatchFontSize: $o,
|
|
2092
|
+
onPatchTextAlign: Zo,
|
|
2093
|
+
onPatchColor: ns,
|
|
2094
|
+
onFontSizeSearch: rs,
|
|
2095
|
+
onFontSizeCommit: is,
|
|
2096
|
+
onFontSizeDropdownChange: os,
|
|
2097
|
+
onFontSizeKeydown: as
|
|
2048
2098
|
}, null, 8, [
|
|
2049
2099
|
"bind-open",
|
|
2050
2100
|
"bind-keyword",
|
|
@@ -2062,28 +2112,28 @@ var Bt = {
|
|
|
2062
2112
|
"page-limit-reached",
|
|
2063
2113
|
"table-insert-draft",
|
|
2064
2114
|
"variables-count"
|
|
2065
|
-
])) :
|
|
2066
|
-
z.value ? (_(),
|
|
2115
|
+
])) : Dt("", !0),
|
|
2116
|
+
z.value ? (_(), Et(Ke, {
|
|
2067
2117
|
key: 3,
|
|
2068
2118
|
ref_key: "textBubbleElement",
|
|
2069
|
-
ref:
|
|
2119
|
+
ref: nr,
|
|
2070
2120
|
x: z.value.x,
|
|
2071
2121
|
y: z.value.y,
|
|
2072
|
-
"editor-state":
|
|
2073
|
-
"font-size-preset-options":
|
|
2074
|
-
"current-editor-font-size":
|
|
2075
|
-
"editor-font-size-search-value":
|
|
2076
|
-
"current-editor-text-color":
|
|
2077
|
-
"text-align-options": y(
|
|
2122
|
+
"editor-state": bi.value,
|
|
2123
|
+
"font-size-preset-options": Ei.value,
|
|
2124
|
+
"current-editor-font-size": Ci.value,
|
|
2125
|
+
"editor-font-size-search-value": qn.value,
|
|
2126
|
+
"current-editor-text-color": wi.value,
|
|
2127
|
+
"text-align-options": y(Ur),
|
|
2078
2128
|
onCommand: Z,
|
|
2079
|
-
onPatchFontSize:
|
|
2080
|
-
onPatchTextAlign:
|
|
2081
|
-
onPatchColor:
|
|
2082
|
-
onFontSizeSearch:
|
|
2083
|
-
onFontSizeCommit:
|
|
2084
|
-
onFontSizeDropdownChange:
|
|
2085
|
-
onFontSizeKeydown:
|
|
2086
|
-
onMore:
|
|
2129
|
+
onPatchFontSize: $o,
|
|
2130
|
+
onPatchTextAlign: Zo,
|
|
2131
|
+
onPatchColor: ns,
|
|
2132
|
+
onFontSizeSearch: rs,
|
|
2133
|
+
onFontSizeCommit: is,
|
|
2134
|
+
onFontSizeDropdownChange: os,
|
|
2135
|
+
onFontSizeKeydown: as,
|
|
2136
|
+
onMore: Ts
|
|
2087
2137
|
}, null, 8, [
|
|
2088
2138
|
"x",
|
|
2089
2139
|
"y",
|
|
@@ -2093,28 +2143,28 @@ var Bt = {
|
|
|
2093
2143
|
"editor-font-size-search-value",
|
|
2094
2144
|
"current-editor-text-color",
|
|
2095
2145
|
"text-align-options"
|
|
2096
|
-
])) :
|
|
2146
|
+
])) : Dt("", !0)
|
|
2097
2147
|
])),
|
|
2098
2148
|
p("input", {
|
|
2099
2149
|
ref_key: "imageFileInputElement",
|
|
2100
|
-
ref:
|
|
2150
|
+
ref: gn,
|
|
2101
2151
|
class: "gd-contract-template-designer__hidden-file-input",
|
|
2102
2152
|
type: "file",
|
|
2103
2153
|
accept: "image/png,image/jpeg,image/webp,image/gif,image/bmp",
|
|
2104
2154
|
tabindex: "-1",
|
|
2105
2155
|
"aria-hidden": "true",
|
|
2106
|
-
onChange:
|
|
2156
|
+
onChange: ya
|
|
2107
2157
|
}, null, 544),
|
|
2108
|
-
p("span",
|
|
2109
|
-
m(
|
|
2110
|
-
open:
|
|
2111
|
-
"onUpdate:open": t[22] ||= (e) =>
|
|
2112
|
-
"preview-pages":
|
|
2113
|
-
"preview-file-groups":
|
|
2114
|
-
"preview-active-group":
|
|
2115
|
-
"preview-snapshot":
|
|
2116
|
-
onCancel:
|
|
2117
|
-
onSelectFile: t[23] ||= (e) =>
|
|
2158
|
+
p("span", Jt, Pt(H.value), 1),
|
|
2159
|
+
m(Je, {
|
|
2160
|
+
open: jn.value,
|
|
2161
|
+
"onUpdate:open": t[22] ||= (e) => jn.value = e,
|
|
2162
|
+
"preview-pages": Tr.value,
|
|
2163
|
+
"preview-file-groups": Er.value,
|
|
2164
|
+
"preview-active-group": Dr.value,
|
|
2165
|
+
"preview-snapshot": Mn.value,
|
|
2166
|
+
onCancel: fo,
|
|
2167
|
+
onSelectFile: t[23] ||= (e) => Pn.value = e
|
|
2118
2168
|
}, null, 8, [
|
|
2119
2169
|
"open",
|
|
2120
2170
|
"preview-pages",
|
|
@@ -2122,14 +2172,25 @@ var Bt = {
|
|
|
2122
2172
|
"preview-active-group",
|
|
2123
2173
|
"preview-snapshot"
|
|
2124
2174
|
]),
|
|
2125
|
-
m(
|
|
2126
|
-
open:
|
|
2127
|
-
"onUpdate:open": t[24] ||= (e) =>
|
|
2128
|
-
json:
|
|
2129
|
-
onCancel:
|
|
2130
|
-
}, null, 8, ["open", "json"])
|
|
2175
|
+
m(Ye, {
|
|
2176
|
+
open: Fn.value,
|
|
2177
|
+
"onUpdate:open": t[24] ||= (e) => Fn.value = e,
|
|
2178
|
+
json: In.value,
|
|
2179
|
+
onCancel: ho
|
|
2180
|
+
}, null, 8, ["open", "json"]),
|
|
2181
|
+
m(Xe, {
|
|
2182
|
+
open: Ln.value,
|
|
2183
|
+
"onUpdate:open": t[25] ||= (e) => Ln.value = e,
|
|
2184
|
+
data: Rn.value,
|
|
2185
|
+
"file-name": Cr.value?.name,
|
|
2186
|
+
onCancel: vo
|
|
2187
|
+
}, null, 8, [
|
|
2188
|
+
"open",
|
|
2189
|
+
"data",
|
|
2190
|
+
"file-name"
|
|
2191
|
+
])
|
|
2131
2192
|
], 6));
|
|
2132
2193
|
}
|
|
2133
2194
|
});
|
|
2134
2195
|
//#endregion
|
|
2135
|
-
export {
|
|
2196
|
+
export { sn as default };
|