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