@guodun/antdv 1.4.3 → 1.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.mjs +1 -1
- package/dist/es/components/contract-signing-location/src/ContractSigningTemplatePage.vue.mjs +66 -13
- package/dist/es/components/contract-signing-location/src/constants.mjs +27 -17
- package/dist/es/components/contract-signing-location/src/location-rules.mjs +2 -2
- package/dist/es/components/contract-signing-location/src/template-source.mjs +52 -36
- package/dist/es/components/contract-signing-location/style/index.css +1 -1
- package/dist/es/components/index.mjs +1 -1
- package/dist/es/components/pro-contract-template-designer/index.mjs +1 -1
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue.mjs +4 -4
- package/dist/es/components/pro-contract-template-designer/src/DesignerPage.vue.mjs +50 -50
- package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.mjs +50 -50
- package/dist/es/components/pro-contract-template-designer/src/composables/use-template-designer.mjs +34 -34
- package/dist/es/components/pro-contract-template-designer/src/utils/page-decorations.mjs +17 -17
- package/dist/es/components/pro-contract-template-designer/src/utils/signing-placement.mjs +14 -14
- package/dist/es/components/pro-contract-template-designer/src/utils/template-renderer.mjs +89 -89
- package/dist/es/components/pro-contract-template-designer/style/index.css +1 -1
- package/dist/es/index.mjs +25 -25
- 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/src/constants.cjs +1 -1
- package/dist/lib/components/contract-signing-location/src/location-rules.cjs +1 -1
- package/dist/lib/components/contract-signing-location/src/template-source.cjs +1 -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/ContractTemplatePreviewPage.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/composables/use-template-designer.cjs +3 -3
- 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/signing-placement.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/utils/template-renderer.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/ContractSigningTemplatePage.vue.d.ts +3 -1
- package/dist/types/components/contract-signing-location/src/constants.d.ts +18 -0
- package/dist/types/components/contract-signing-location/src/coordinates.d.ts +6 -0
- package/dist/types/components/contract-signing-location/src/template-source.d.ts +17 -0
- package/package.json +3 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { CONTRACT_TEXT_STYLE_PRESETS as e } from "./constants.mjs";
|
|
2
|
+
import { CONTRACT_PAGE_BASE_PADDING as t, getPageDecorationSafePadding as n, hasEnabledPageFooter as r, hasEnabledPageHeader as i, normalizePageDecorations as a } from "./utils/page-decorations.mjs";
|
|
3
|
+
import o from "./ContractTemplatePageDecorations.mjs";
|
|
4
|
+
import { SIGNING_PLACEMENT_MIME as s, canMutateSigningPlacements as c, getSigningPlacementDefaultSize as ee, parseSigningPlacementDragPayload as te } from "./utils/signing-placement.mjs";
|
|
5
|
+
import { DEFAULT_FIELD_STYLE as ne, resolvePageSize as re, splitPageContentByMeasurements as ie } from "./composables/use-template-designer.mjs";
|
|
6
|
+
import { buildTemplateVariableAttrs as l, insertTemplateVariableNode as ae } from "./extensions/template-variable.mjs";
|
|
6
7
|
import { normalizeContractImageDimension as u } from "./utils/content-image.mjs";
|
|
7
|
-
import { createEditorExtensions as
|
|
8
|
+
import { createEditorExtensions as oe, runContractTemplateEditorCommand as d } from "./extensions/editor-extensions.mjs";
|
|
8
9
|
import { resolveEditorContextMenuKind as f } from "./utils/context-variable.mjs";
|
|
9
|
-
import { applyContractTemplateBlockStyle as
|
|
10
|
-
import
|
|
11
|
-
import ce from "./ContractTemplatePageDecorations.mjs";
|
|
10
|
+
import { applyContractTemplateBlockStyle as se } from "./utils/block-style.mjs";
|
|
11
|
+
import ce from "./SigningPlacementLayer.mjs";
|
|
12
12
|
import { computed as p, createBlock as le, createCommentVNode as ue, createElementBlock as de, createElementVNode as m, createVNode as h, defineComponent as g, nextTick as fe, normalizeClass as pe, normalizeStyle as _, onBeforeUnmount as me, openBlock as v, ref as he, toDisplayString as y, unref as b, watch as x, withModifiers as ge } from "vue";
|
|
13
13
|
import { EditorContent as _e, useEditor as ve } from "@tiptap/vue-3";
|
|
14
14
|
import { generateHTML as ye } from "@tiptap/core";
|
|
@@ -60,7 +60,7 @@ var Ce = { class: "gd-contract-template-designer__page-title" }, w = "applicatio
|
|
|
60
60
|
"editor-context-menu"
|
|
61
61
|
],
|
|
62
62
|
setup(g, { expose: T, emit: Te }) {
|
|
63
|
-
let E = g, D = Te, O = p(() => E.readonly || E.disabled), k = he(), A =
|
|
63
|
+
let E = g, D = Te, O = p(() => E.readonly || E.disabled), k = he(), A = oe("请输入合同正文,或从 WPS / Word 粘贴合同内容", {
|
|
64
64
|
processImageFile: E.processImageFile,
|
|
65
65
|
getZoom: () => Math.max(.1, E.zoom || 1)
|
|
66
66
|
}), j = ve({
|
|
@@ -397,18 +397,18 @@ var Ce = { class: "gd-contract-template-designer__page-title" }, w = "applicatio
|
|
|
397
397
|
!j.value || e === j.value.getHTML() || (j.value.commands.setContent(e || "<p></p>", { emitUpdate: !1 }), U());
|
|
398
398
|
});
|
|
399
399
|
let He = p(() => {
|
|
400
|
-
let e =
|
|
400
|
+
let e = a(E.pageDecorations), o = E.pageIndex + 1, s = i(e, o) ? n(e.header) : t.top, c = r(e, o) ? n(e.footer) : t.bottom;
|
|
401
401
|
return {
|
|
402
402
|
width: `${E.pageSize.width}px`,
|
|
403
403
|
height: `${E.pageSize.height}px`,
|
|
404
|
-
paddingTop: `${
|
|
405
|
-
paddingBottom: `${
|
|
406
|
-
"--gd-contract-page-content-height": `${Math.max(120, E.pageSize.height -
|
|
404
|
+
paddingTop: `${s}px`,
|
|
405
|
+
paddingBottom: `${c}px`,
|
|
406
|
+
"--gd-contract-page-content-height": `${Math.max(120, E.pageSize.height - s - c)}px`
|
|
407
407
|
};
|
|
408
408
|
}), W = p(() => Math.max(.1, E.zoom || 1)), Ue = p(() => ({
|
|
409
409
|
width: `${Math.ceil((E.pageSize.width + 10) * W.value)}px`,
|
|
410
410
|
height: `${Math.ceil((E.pageSize.height + 40) * W.value)}px`
|
|
411
|
-
})), We = p(() => ({ "--gd-contract-page-zoom": String(W.value) })), Ge = p(() =>
|
|
411
|
+
})), We = p(() => ({ "--gd-contract-page-zoom": String(W.value) })), Ge = p(() => re(E.pageSize));
|
|
412
412
|
function G(e, t) {
|
|
413
413
|
let n = k.value?.getBoundingClientRect();
|
|
414
414
|
return n ? {
|
|
@@ -420,40 +420,40 @@ var Ce = { class: "gd-contract-template-designer__page-title" }, w = "applicatio
|
|
|
420
420
|
};
|
|
421
421
|
}
|
|
422
422
|
function Ke(e) {
|
|
423
|
-
let t = k.value?.getBoundingClientRect(),
|
|
424
|
-
if (!t || !
|
|
425
|
-
x: Math.max(0, (E.pageSize.width -
|
|
426
|
-
y: Math.max(0, (E.pageSize.height -
|
|
423
|
+
let t = k.value?.getBoundingClientRect(), n = k.value?.closest(".gd-contract-template-designer__canvas")?.getBoundingClientRect(), r = ee(e);
|
|
424
|
+
if (!t || !n) return {
|
|
425
|
+
x: Math.max(0, (E.pageSize.width - r.width) / 2),
|
|
426
|
+
y: Math.max(0, (E.pageSize.height - r.height) / 2)
|
|
427
427
|
};
|
|
428
|
-
let
|
|
428
|
+
let i = Math.max(t.left, n.left), a = Math.max(t.top, n.top), o = Math.min(t.right, n.right), s = Math.min(t.bottom, n.bottom), c = G(o > i ? (i + o) / 2 : (t.left + t.right) / 2, s > a ? (a + s) / 2 : (t.top + t.bottom) / 2);
|
|
429
429
|
return {
|
|
430
|
-
x:
|
|
431
|
-
y:
|
|
430
|
+
x: c.x - r.width / 2,
|
|
431
|
+
y: c.y - r.height / 2
|
|
432
432
|
};
|
|
433
433
|
}
|
|
434
|
-
function qe(
|
|
435
|
-
if (!
|
|
436
|
-
|
|
434
|
+
function qe(e) {
|
|
435
|
+
if (!c(E.readonly, E.disabled)) {
|
|
436
|
+
e.preventDefault(), e.stopPropagation();
|
|
437
437
|
return;
|
|
438
438
|
}
|
|
439
|
-
let
|
|
440
|
-
if (
|
|
441
|
-
|
|
442
|
-
let
|
|
443
|
-
D("signing-placement-drop", E.page.id,
|
|
439
|
+
let t = te(e.dataTransfer?.getData(s));
|
|
440
|
+
if (t) {
|
|
441
|
+
e.preventDefault(), e.stopPropagation();
|
|
442
|
+
let n = G(e.clientX, e.clientY);
|
|
443
|
+
D("signing-placement-drop", E.page.id, t, n.x, n.y);
|
|
444
444
|
return;
|
|
445
445
|
}
|
|
446
|
-
let
|
|
447
|
-
if (
|
|
448
|
-
|
|
446
|
+
let n = e.dataTransfer?.getData("application/x-gd-contract-variable");
|
|
447
|
+
if (n) {
|
|
448
|
+
e.preventDefault(), e.stopPropagation(), D("variable-drop", E.page.id, n, e.clientX, e.clientY);
|
|
449
449
|
return;
|
|
450
450
|
}
|
|
451
|
-
let
|
|
452
|
-
|
|
451
|
+
let r = e.dataTransfer?.getData(w);
|
|
452
|
+
r && r !== E.page.id && (e.preventDefault(), e.stopPropagation(), D("variable-move-blocked", E.page.id));
|
|
453
453
|
}
|
|
454
454
|
function Je(e, t) {
|
|
455
455
|
let n = j.value;
|
|
456
|
-
return n ? (
|
|
456
|
+
return n ? (ae(n, e, t ? n.view.posAtCoords(t)?.pos : void 0), $(), K()) : void 0;
|
|
457
457
|
}
|
|
458
458
|
function Ye(e, t) {
|
|
459
459
|
let n = j.value;
|
|
@@ -504,13 +504,13 @@ var Ce = { class: "gd-contract-template-designer__page-title" }, w = "applicatio
|
|
|
504
504
|
}
|
|
505
505
|
function et() {
|
|
506
506
|
if (E.pageDecorations) {
|
|
507
|
-
let e =
|
|
508
|
-
return Math.max(120, E.pageSize.height -
|
|
507
|
+
let e = a(E.pageDecorations), o = E.pageIndex + 1, s = i(e, o) ? n(e.header) : t.top, c = r(e, o) ? n(e.footer) : t.bottom;
|
|
508
|
+
return Math.max(120, E.pageSize.height - s - c);
|
|
509
509
|
}
|
|
510
510
|
let e = k.value;
|
|
511
511
|
if (!e) return E.pageSize.height - 108;
|
|
512
|
-
let
|
|
513
|
-
return Math.max(120, E.pageSize.height -
|
|
512
|
+
let o = window.getComputedStyle(e), s = Number.parseFloat(o.paddingTop) || 0, c = Number.parseFloat(o.paddingBottom) || 0;
|
|
513
|
+
return Math.max(120, E.pageSize.height - s - c);
|
|
514
514
|
}
|
|
515
515
|
function tt() {
|
|
516
516
|
let e = k.value?.querySelector(".gd-contract-template-designer__editor-prose");
|
|
@@ -525,7 +525,7 @@ var Ce = { class: "gd-contract-template-designer__page-title" }, w = "applicatio
|
|
|
525
525
|
});
|
|
526
526
|
}
|
|
527
527
|
function J() {
|
|
528
|
-
return j.value ?
|
|
528
|
+
return j.value ? ie(j.value.getJSON().content, tt(), et()) : void 0;
|
|
529
529
|
}
|
|
530
530
|
function nt() {
|
|
531
531
|
return !!J();
|
|
@@ -555,7 +555,7 @@ var Ce = { class: "gd-contract-template-designer__page-title" }, w = "applicatio
|
|
|
555
555
|
}
|
|
556
556
|
function X(e, t = e.key) {
|
|
557
557
|
if (!j.value) return;
|
|
558
|
-
let n =
|
|
558
|
+
let n = l(e), r = !1;
|
|
559
559
|
return j.value.commands.command(({ tr: e, state: i, dispatch: a }) => (Y(i.doc, t).forEach(({ node: t, pos: i }) => {
|
|
560
560
|
e.setNodeMarkup(i, void 0, {
|
|
561
561
|
...t.attrs,
|
|
@@ -600,11 +600,11 @@ var Ce = { class: "gd-contract-template-designer__page-title" }, w = "applicatio
|
|
|
600
600
|
function $() {
|
|
601
601
|
Z(), Q(E.selectedVariableKey)?.classList.add("is-active");
|
|
602
602
|
}
|
|
603
|
-
function ct(
|
|
604
|
-
let
|
|
605
|
-
if (!
|
|
606
|
-
let
|
|
607
|
-
|
|
603
|
+
function ct(t) {
|
|
604
|
+
let n = e.find((e) => e.key === t), r = j.value;
|
|
605
|
+
if (!n || !r) return;
|
|
606
|
+
let i = r.chain().focus().clearNodes();
|
|
607
|
+
n.headingLevel ? i.setHeading({ level: n.headingLevel }) : i.setParagraph(), i.unsetAllMarks().unsetTextAlign().unsetFontSize().unsetFontFamily().unsetColor().setTextAlign(n.textAlign).setFontSize(`${n.fontSize}px`).setFontFamily(n.fontFamily || "Noto Serif SC, Source Han Serif SC, Songti SC, STSong, SimSun, serif").setColor(ne.color || "#1f2937"), n.bold ? i.setBold() : i.unsetBold(), n.italic ? i.setItalic() : i.unsetItalic(), n.underline ? i.setUnderline() : i.unsetUnderline(), i.run();
|
|
608
608
|
}
|
|
609
609
|
x([() => E.selectedVariableKey, () => E.variables], () => {
|
|
610
610
|
fe($);
|
|
@@ -613,7 +613,7 @@ var Ce = { class: "gd-contract-template-designer__page-title" }, w = "applicatio
|
|
|
613
613
|
flush: "post"
|
|
614
614
|
});
|
|
615
615
|
function lt(e) {
|
|
616
|
-
e.type === "apply-block-style" ? j.value &&
|
|
616
|
+
e.type === "apply-block-style" ? j.value && se(j.value, e.format) : e.type === "apply-text-style-preset" ? ct(e.preset) : d(j.value, e), U();
|
|
617
617
|
}
|
|
618
618
|
function ut() {
|
|
619
619
|
j.value?.commands.focus();
|
|
@@ -679,7 +679,7 @@ var Ce = { class: "gd-contract-template-designer__page-title" }, w = "applicatio
|
|
|
679
679
|
onDrop: qe,
|
|
680
680
|
onClick: t[4] ||= (e) => D("editor-focus", g.page.id)
|
|
681
681
|
}, [
|
|
682
|
-
h(
|
|
682
|
+
h(o, {
|
|
683
683
|
decorations: g.pageDecorations,
|
|
684
684
|
"page-number": g.pageIndex + 1,
|
|
685
685
|
"total-pages": g.totalPages,
|
|
@@ -695,7 +695,7 @@ var Ce = { class: "gd-contract-template-designer__page-title" }, w = "applicatio
|
|
|
695
695
|
class: "gd-contract-template-page__content",
|
|
696
696
|
editor: b(j)
|
|
697
697
|
}, null, 8, ["editor"])) : ue("", !0),
|
|
698
|
-
h(
|
|
698
|
+
h(ce, {
|
|
699
699
|
"page-size": g.pageSize,
|
|
700
700
|
placements: g.signingPlacements,
|
|
701
701
|
"selected-id": g.selectedSigningPlacementId,
|
package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { CONTRACT_BLOCK_STYLES as e, DEFAULT_CONTRACT_FONT_FAMILY as t, DEFAULT_FONT_SIZE_PRESETS as n, DEFAULT_TEXT_ALIGN_OPTIONS as r, resolveFontFamilyOptions as i } from "./constants.mjs";
|
|
2
|
+
import { collectPageDecorationVariableKeys as a, normalizePageDecorations as o, resolvePageDecorationPreset as ee, resolvePageDecorationValidationPath as te, rewritePageDecorationVariableTokens as ne } from "./utils/page-decorations.mjs";
|
|
3
|
+
import { isContractTemplateFieldType as re } from "./types.mjs";
|
|
4
|
+
import { ContractTemplateLocationRuleBuildError as ie, SIGNING_PLACEMENT_TYPE_LABELS as ae, buildContractLocationRules as oe, buildSigningPlacementLocationRules as se, createSigningPlacement as ce, resolveSigningPlacementToolItems as le, scaleSigningPlacementToPage as ue } from "./utils/signing-placement.mjs";
|
|
5
5
|
import { DEFAULT_FIELD_STYLE as de, DEFAULT_FIELD_TYPES as s, DEFAULT_PAGE_SIZE as fe, buildTemplatePreviewPages as pe, cloneTemplateValue as c, collectTemplateLocationRuleExportErrors as me, collectTemplateValueVariableKeys as he, constrainTemplatePageSizes as ge, createBlankPage as _e, createBlankTemplate as ve, createDefaultPage as ye, createTemplateVariable as be, exportTemplateValue as xe, getFieldOption as Se, getPageSizeKey as Ce, normalizeContractTemplateMaxPages as we, normalizePageSizeOptions as Te, normalizeTemplateValue as Ee, resolvePageSize as De, syncTemplateVariablesWithPages as Oe, validateContractTemplateVariableKey as ke, validateTemplateValue as Ae } from "./composables/use-template-designer.mjs";
|
|
6
6
|
import { isSafeContractImageUrl as je } from "./utils/image-url.mjs";
|
|
7
7
|
import { useFitWidthZoom as Me } from "./composables/use-fit-width-zoom.mjs";
|
|
@@ -144,8 +144,8 @@ var Bt = {
|
|
|
144
144
|
let t = E.value.pages.findIndex((t) => t.id === e.pageId);
|
|
145
145
|
return {
|
|
146
146
|
placement: e,
|
|
147
|
-
label:
|
|
148
|
-
detail: `${
|
|
147
|
+
label: ae[e.type],
|
|
148
|
+
detail: `${ae[e.type]} · 第 ${Math.max(0, t) + 1} 页`
|
|
149
149
|
};
|
|
150
150
|
})), Cr = f(() => {
|
|
151
151
|
let e = xr.value?.pageId;
|
|
@@ -159,8 +159,8 @@ var Bt = {
|
|
|
159
159
|
"internal-review": "内部审阅",
|
|
160
160
|
draft: "草稿",
|
|
161
161
|
custom: "自定义"
|
|
162
|
-
})[
|
|
163
|
-
let e =
|
|
162
|
+
})[ee(E.value.pageDecorations)]), kr = f(() => {
|
|
163
|
+
let e = o(E.value.pageDecorations);
|
|
164
164
|
return {
|
|
165
165
|
header: e.header.enabled,
|
|
166
166
|
footer: e.footer.enabled,
|
|
@@ -181,10 +181,10 @@ var Bt = {
|
|
|
181
181
|
"is-success": U.value.type === "saved" || U.value.type === "restored",
|
|
182
182
|
"is-warning": U.value.type === "too-large",
|
|
183
183
|
"is-error": U.value.type === "unavailable" || U.value.type === "read-failed" || U.value.type === "write-failed"
|
|
184
|
-
})), Nr = f(() => `${Math.round(N.value * 100)}%`), Pr = f(() =>
|
|
184
|
+
})), Nr = f(() => `${Math.round(N.value * 100)}%`), Pr = f(() => i(l.fontFamilies, l.fontFamilyMode)), Fr = f(() => Pr.value.map((e) => ({
|
|
185
185
|
label: e.label,
|
|
186
186
|
value: e.value
|
|
187
|
-
}))), Ir =
|
|
187
|
+
}))), Ir = r, Lr = [...e.map((e) => ({
|
|
188
188
|
label: e.label,
|
|
189
189
|
value: e.format
|
|
190
190
|
}))], Rr = [{
|
|
@@ -209,12 +209,12 @@ var Bt = {
|
|
|
209
209
|
], Br = f(() => Te(l.pageSizeOptions)), Vr = f(() => Br.value.map((e) => ({
|
|
210
210
|
label: `${e.label} · ${e.width} × ${e.height}`,
|
|
211
211
|
value: Ce(e)
|
|
212
|
-
}))), Hr = f(() => Ce(wr.value)), Ur = f(() =>
|
|
212
|
+
}))), Hr = f(() => Ce(wr.value)), Ur = f(() => le({ showSigningPlacementTools: l.showSigningPlacementTools })), Wr = f(() => l.variableTypes.filter((e) => re(e?.type))), Gr = f(() => Wr.value.map((e) => ({
|
|
213
213
|
...e,
|
|
214
214
|
icon: ut(e.type)
|
|
215
215
|
}))), Kr = f(() => we(l.maxPages)), qr = f(() => E.value.pages.length >= Kr.value), Jr = f(() => {
|
|
216
216
|
let e = he(E.value);
|
|
217
|
-
return Array.from(
|
|
217
|
+
return Array.from(a(E.value.pageDecorations)).filter((t) => !e.has(t));
|
|
218
218
|
}), { scheduleAutoPaginate: J } = Xe({
|
|
219
219
|
templateValue: E,
|
|
220
220
|
readonlyState: W,
|
|
@@ -272,17 +272,17 @@ var Bt = {
|
|
|
272
272
|
let e = tr.value.trim().toLowerCase(), t = E.value.variables;
|
|
273
273
|
return e ? t.filter((t) => t.label.toLowerCase().includes(e) || t.key.toLowerCase().includes(e)) : t;
|
|
274
274
|
}), di = f(() => Math.max(Xt, wr.value.width - Jt)), fi = f(() => Math.max(Zt, wr.value.height - Yt)), pi = f(() => zn.value[k.value] ?? xi()), mi = f(() => pi.value.hasMixedBlockFormats ? void 0 : pi.value.currentHeadingLevel ?? "paragraph"), hi = f(() => pi.value.fontFamily || "Noto Serif SC, Source Han Serif SC, Songti SC, STSong, SimSun, serif"), gi = f(() => pi.value.fontSize ?? de.fontSize ?? 14), _i = f(() => pi.value.textColor || de.color || "#1f2937"), vi = f(() => G.value?.style?.fontFamily || de.fontFamily || "Noto Serif SC, Source Han Serif SC, Songti SC, STSong, SimSun, serif"), yi = f(() => {
|
|
275
|
-
let e =
|
|
275
|
+
let e = n.map((e) => ({
|
|
276
276
|
label: `${e}px`,
|
|
277
277
|
value: e
|
|
278
|
-
})), t = Ti(gi.value),
|
|
279
|
-
return
|
|
280
|
-
label: `使用 ${
|
|
281
|
-
value:
|
|
282
|
-
}), t && !
|
|
283
|
-
label:
|
|
278
|
+
})), t = Ti(gi.value), r = Ti(Bn.value), i = /* @__PURE__ */ new Map();
|
|
279
|
+
return r && !n.includes(r) && i.set(r, {
|
|
280
|
+
label: `使用 ${r}px`,
|
|
281
|
+
value: r
|
|
282
|
+
}), t && !n.includes(t) && i.set(t, {
|
|
283
|
+
label: r === t ? `使用 ${t}px` : `${t}px`,
|
|
284
284
|
value: t
|
|
285
|
-
}), [...Array.from(
|
|
285
|
+
}), [...Array.from(i.values()), ...e];
|
|
286
286
|
});
|
|
287
287
|
b(() => l.modelValue, (e) => {
|
|
288
288
|
if (!e || x.value) return;
|
|
@@ -375,7 +375,7 @@ var Bt = {
|
|
|
375
375
|
isOrderedList: !1,
|
|
376
376
|
isTableActive: !1,
|
|
377
377
|
textAlign: "left",
|
|
378
|
-
fontFamily:
|
|
378
|
+
fontFamily: t,
|
|
379
379
|
fontSize: de.fontSize ?? 14,
|
|
380
380
|
textColor: de.color ?? "#1f2937",
|
|
381
381
|
selectionText: "",
|
|
@@ -537,7 +537,7 @@ var Bt = {
|
|
|
537
537
|
if (W.value || !q.value) return;
|
|
538
538
|
let t = Br.value.find((t) => Ce(t) === e);
|
|
539
539
|
if (!t) return;
|
|
540
|
-
let n = q.value.id, r = Vi(q.value), i = De(t, E.value.pageSize), a = K.value.map((e) => e.pageId === n ?
|
|
540
|
+
let n = q.value.id, r = Vi(q.value), i = De(t, E.value.pageSize), a = K.value.map((e) => e.pageId === n ? ue(e, r, i) : e);
|
|
541
541
|
Gi(a.filter((e) => e.pageId === n).map((e) => e.id)), X({
|
|
542
542
|
...E.value,
|
|
543
543
|
pages: E.value.pages.map((e) => e.id === n ? {
|
|
@@ -580,7 +580,7 @@ var Bt = {
|
|
|
580
580
|
r.title = `${e.title || `第 ${t + 1} 页`}副本`;
|
|
581
581
|
let i = [...E.value.pages];
|
|
582
582
|
i.splice(t + 1, 0, r);
|
|
583
|
-
let
|
|
583
|
+
let a = Hi(e.id).map((e) => ce(e.type, r.id, Vi(r), {
|
|
584
584
|
...ct(e),
|
|
585
585
|
id: void 0,
|
|
586
586
|
pageId: r.id
|
|
@@ -588,8 +588,8 @@ var Bt = {
|
|
|
588
588
|
X({
|
|
589
589
|
...E.value,
|
|
590
590
|
pages: i,
|
|
591
|
-
signingPlacements: [...K.value, ...
|
|
592
|
-
}), k.value = r.id,
|
|
591
|
+
signingPlacements: [...K.value, ...a]
|
|
592
|
+
}), k.value = r.id, a.forEach((e) => h("signing-placement-add", ct(e))), a[0] && Q(a[0].id);
|
|
593
593
|
}
|
|
594
594
|
function Qi(e) {
|
|
595
595
|
if (W.value || E.value.pages.length <= 1) return;
|
|
@@ -762,7 +762,7 @@ var Bt = {
|
|
|
762
762
|
...E.value,
|
|
763
763
|
pages: r,
|
|
764
764
|
variables: E.value.variables.map((t) => t.id === e.id ? e : t),
|
|
765
|
-
...i !== e.key && E.value.pageDecorations ? { pageDecorations:
|
|
765
|
+
...i !== e.key && E.value.pageDecorations ? { pageDecorations: ne(E.value.pageDecorations, i, e.key) } : {}
|
|
766
766
|
}), D.value = e.key, J(a || k.value);
|
|
767
767
|
}
|
|
768
768
|
function ya(e) {
|
|
@@ -781,7 +781,7 @@ var Bt = {
|
|
|
781
781
|
function xa(e) {
|
|
782
782
|
W.value || (X({
|
|
783
783
|
...E.value,
|
|
784
|
-
pageDecorations:
|
|
784
|
+
pageDecorations: o(e)
|
|
785
785
|
}), J(E.value.pages[0]?.id));
|
|
786
786
|
}
|
|
787
787
|
function Sa(e) {
|
|
@@ -829,7 +829,7 @@ var Bt = {
|
|
|
829
829
|
...E.value,
|
|
830
830
|
pages: t,
|
|
831
831
|
variables: E.value.variables.filter((t) => t.id !== e.id),
|
|
832
|
-
...E.value.pageDecorations ? { pageDecorations:
|
|
832
|
+
...E.value.pageDecorations ? { pageDecorations: ne(E.value.pageDecorations, e.key) } : {}
|
|
833
833
|
}), D.value = "", O.value = "";
|
|
834
834
|
}
|
|
835
835
|
function ja(e) {
|
|
@@ -854,17 +854,17 @@ var Bt = {
|
|
|
854
854
|
function Pa(e) {
|
|
855
855
|
if (!W.value) return na(ta({ type: e }));
|
|
856
856
|
}
|
|
857
|
-
function Fa(
|
|
858
|
-
if (W.value || !e
|
|
859
|
-
let
|
|
860
|
-
if (!
|
|
861
|
-
let
|
|
857
|
+
function Fa(e) {
|
|
858
|
+
if (W.value || !re(e)) return;
|
|
859
|
+
let t = R.value, n = Wr.value.find((t) => t.type === e);
|
|
860
|
+
if (!t || !n) return;
|
|
861
|
+
let r = Fe(t.leadingText) || n.label, i = Ie(t.selectionWidth, Xt, di.value), a = Ia();
|
|
862
862
|
na(ta({
|
|
863
|
-
type:
|
|
864
|
-
label:
|
|
865
|
-
...
|
|
866
|
-
...
|
|
867
|
-
}),
|
|
863
|
+
type: e,
|
|
864
|
+
label: r,
|
|
865
|
+
...i ? { width: i } : {},
|
|
866
|
+
...a ? { style: a } : {}
|
|
867
|
+
}), t.pageId), H.value = t.hasSelection ? `已将选中内容替换为${n.label}控件` : `已插入${n.label}控件`, $();
|
|
868
868
|
}
|
|
869
869
|
function Ia() {
|
|
870
870
|
let e = pi.value, t = {};
|
|
@@ -875,8 +875,8 @@ var Bt = {
|
|
|
875
875
|
let t = R.value;
|
|
876
876
|
t && (na(e, t.pageId), H.value = `已绑定到${e.label},沿用原控件尺寸`, $());
|
|
877
877
|
}
|
|
878
|
-
function Ra(
|
|
879
|
-
return Se(
|
|
878
|
+
function Ra(e) {
|
|
879
|
+
return Se(e.type && re(e.type) ? e.type : "text", Wr.value).label;
|
|
880
880
|
}
|
|
881
881
|
function za() {
|
|
882
882
|
E.value.variables.length && (er.value = !0, g(() => {
|
|
@@ -1128,7 +1128,7 @@ var Bt = {
|
|
|
1128
1128
|
}));
|
|
1129
1129
|
return;
|
|
1130
1130
|
}
|
|
1131
|
-
let t =
|
|
1131
|
+
let t = te(e);
|
|
1132
1132
|
if (t) {
|
|
1133
1133
|
F.value = !0, g(() => sn.value?.focusField(t));
|
|
1134
1134
|
return;
|
|
@@ -1156,7 +1156,7 @@ var Bt = {
|
|
|
1156
1156
|
E.value.pages.some((t) => t.id === e.id) && ho(e.id);
|
|
1157
1157
|
}
|
|
1158
1158
|
function jo(e) {
|
|
1159
|
-
return
|
|
1159
|
+
return te(e) ? "页面装饰" : e.type === "signing-placement" ? "签署位置" : e.type === "variable" ? "变量" : "字段";
|
|
1160
1160
|
}
|
|
1161
1161
|
function Mo() {
|
|
1162
1162
|
return Oi(), xe(Ei());
|
|
@@ -1166,20 +1166,20 @@ var Bt = {
|
|
|
1166
1166
|
return et(x.value ? S.value : at(S.value, C.value, e));
|
|
1167
1167
|
}
|
|
1168
1168
|
function Po(e) {
|
|
1169
|
-
let
|
|
1169
|
+
let t = Ei();
|
|
1170
1170
|
try {
|
|
1171
|
-
let
|
|
1172
|
-
if (
|
|
1173
|
-
return e(
|
|
1171
|
+
let n = me(t, T.value);
|
|
1172
|
+
if (n.length) throw new ie(n);
|
|
1173
|
+
return e(t);
|
|
1174
1174
|
} catch (e) {
|
|
1175
|
-
throw e instanceof
|
|
1175
|
+
throw e instanceof ie && (j.value = [...e.errors], A.value = !0, h("validate", [...e.errors])), e;
|
|
1176
1176
|
}
|
|
1177
1177
|
}
|
|
1178
1178
|
function Fo(e) {
|
|
1179
|
-
return Po((t) =>
|
|
1179
|
+
return Po((t) => se(t, e));
|
|
1180
1180
|
}
|
|
1181
1181
|
function Io(e) {
|
|
1182
|
-
return Po((t) =>
|
|
1182
|
+
return Po((t) => oe(t, e));
|
|
1183
1183
|
}
|
|
1184
1184
|
function Lo(e) {
|
|
1185
1185
|
let t = /* @__PURE__ */ new Set();
|
|
@@ -1922,7 +1922,7 @@ var Bt = {
|
|
|
1922
1922
|
"max-font-size": $t,
|
|
1923
1923
|
"default-multiline-rows": y(3),
|
|
1924
1924
|
"resolve-signing-placement-type-icon": y(dt),
|
|
1925
|
-
"signing-placement-type-labels": y(
|
|
1925
|
+
"signing-placement-type-labels": y(ae),
|
|
1926
1926
|
onToggle: t[15] ||= (e) => Nn.value = !Nn.value,
|
|
1927
1927
|
onVariableDragStart: Ba,
|
|
1928
1928
|
onInsertVariable: Pa,
|
package/dist/es/components/pro-contract-template-designer/src/composables/use-template-designer.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DEFAULT_CONTRACT_FONT_FAMILY as e } from "../constants.mjs";
|
|
2
2
|
import { canUseDomHtml as t, createElementAttributeReader as n, createTagAttributeReader as r, escapeHtmlAttribute as i, escapeHtmlText as a, forEachHtmlTag as o, readNumberAttribute as s, readOptionalBoolean as c, readOptionalNumber as l, replaceTemplateVariableSpans as u } from "../utils/html.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import { resolveTemplateVariablePresentation as ee } from "../utils/template-variable-render.mjs";
|
|
4
|
+
import { buildPageDecorationClassNames as te, buildPageDecorationsHtml as d, collectPageDecorationVariableKeys as f, normalizePageDecorations as p, validatePageDecorations as m } from "../utils/page-decorations.mjs";
|
|
5
|
+
import { isContractTemplateFieldType as ne } from "../types.mjs";
|
|
6
|
+
import { normalizeSigningPlacements as re, scaleSigningPlacementToPage as ie, validateSigningPlacements as ae } from "../utils/signing-placement.mjs";
|
|
7
7
|
//#region src/components/pro-contract-template-designer/src/composables/use-template-designer.ts
|
|
8
8
|
var h = [
|
|
9
9
|
{
|
|
@@ -58,26 +58,26 @@ var h = [
|
|
|
58
58
|
color: "#1f2937",
|
|
59
59
|
background: "transparent",
|
|
60
60
|
fontSize: 14,
|
|
61
|
-
fontFamily:
|
|
61
|
+
fontFamily: e,
|
|
62
62
|
placeholderColor: "#7a818b",
|
|
63
63
|
lineColor: "#565b66",
|
|
64
64
|
textAlign: "left",
|
|
65
65
|
borderStyle: "solid",
|
|
66
66
|
objectFit: "contain"
|
|
67
|
-
}, oe = 3, se = 28, v = "contract-template-renderer-1.0.0", y = "contract-render-css-1.0.0", b = /^[A-Za-z][A-Za-z0-9_]{1,63}$/,
|
|
67
|
+
}, oe = 3, se = 28, v = "contract-template-renderer-1.0.0", y = "contract-render-css-1.0.0", b = /^[A-Za-z][A-Za-z0-9_]{1,63}$/, x = new Set([
|
|
68
68
|
"pageNumber",
|
|
69
69
|
"totalPages",
|
|
70
70
|
"rendererVersion"
|
|
71
71
|
]);
|
|
72
|
-
function
|
|
72
|
+
function S(e, t, n) {
|
|
73
73
|
let r = typeof e == "string" ? e.trim() : "";
|
|
74
|
-
return r ? b.test(r) ?
|
|
74
|
+
return r ? b.test(r) ? x.has(r) ? `${r} 是系统保留标识` : t.some((e) => e.id !== n && e.key.trim() === r) ? `变量标识 ${r} 已存在` : "" : "变量标识需以字母开头,仅包含字母、数字和下划线,长度为 2~64 位" : "请输入变量标识";
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function ce(e) {
|
|
77
77
|
let t = Number(e);
|
|
78
78
|
return Number.isFinite(t) && t >= 1 ? Math.max(1, Math.floor(t)) : 20;
|
|
79
79
|
}
|
|
80
|
-
var
|
|
80
|
+
var C = [
|
|
81
81
|
{
|
|
82
82
|
type: "text",
|
|
83
83
|
label: "输入框",
|
|
@@ -108,11 +108,11 @@ var S = [
|
|
|
108
108
|
defaultWidth: 96,
|
|
109
109
|
defaultHeight: 28
|
|
110
110
|
}
|
|
111
|
-
],
|
|
112
|
-
function w(e) {
|
|
113
|
-
return C += 1, `${e}-${Date.now().toString(36)}-${C.toString(36)}`;
|
|
114
|
-
}
|
|
111
|
+
], w = 0;
|
|
115
112
|
function T(e) {
|
|
113
|
+
return w += 1, `${e}-${Date.now().toString(36)}-${w.toString(36)}`;
|
|
114
|
+
}
|
|
115
|
+
function le(e) {
|
|
116
116
|
let t = JSON.parse(JSON.stringify(e));
|
|
117
117
|
return Array.isArray(t.signingPlacements) && (t.signingPlacements = t.signingPlacements.map((e) => ({
|
|
118
118
|
id: e.id,
|
|
@@ -191,7 +191,7 @@ function ue(e, t) {
|
|
|
191
191
|
};
|
|
192
192
|
}), c = [], l = (e.signingPlacements ?? []).map((e) => {
|
|
193
193
|
let t = o.get(e.pageId);
|
|
194
|
-
return t ? (c.push(e.id),
|
|
194
|
+
return t ? (c.push(e.id), ie(e, t.source, t.target)) : e;
|
|
195
195
|
});
|
|
196
196
|
return {
|
|
197
197
|
value: {
|
|
@@ -209,7 +209,7 @@ function M(e, t) {
|
|
|
209
209
|
}
|
|
210
210
|
function N(e = 1, t) {
|
|
211
211
|
return {
|
|
212
|
-
id:
|
|
212
|
+
id: T("page"),
|
|
213
213
|
title: `第 ${e} 页`,
|
|
214
214
|
pageSize: t ? O(t) : void 0,
|
|
215
215
|
contentHtml: "<p>请输入合同正文。</p>"
|
|
@@ -217,7 +217,7 @@ function N(e = 1, t) {
|
|
|
217
217
|
}
|
|
218
218
|
function P(e = 1, t, n = "<p></p>", r) {
|
|
219
219
|
return {
|
|
220
|
-
id:
|
|
220
|
+
id: T("page"),
|
|
221
221
|
title: `第 ${e} 页`,
|
|
222
222
|
pageSize: t ? O(t) : void 0,
|
|
223
223
|
contentHtml: n,
|
|
@@ -242,13 +242,13 @@ function de(e = g) {
|
|
|
242
242
|
signingPlacements: []
|
|
243
243
|
};
|
|
244
244
|
}
|
|
245
|
-
function I(e, t =
|
|
246
|
-
return t.find((t) => t.type === e) ??
|
|
245
|
+
function I(e, t = C) {
|
|
246
|
+
return t.find((t) => t.type === e) ?? C[0];
|
|
247
247
|
}
|
|
248
|
-
function L(e, t =
|
|
248
|
+
function L(e, t = C, n = {}) {
|
|
249
249
|
let r = e.type === void 0 ? "text" : e.type, i = I(r, t), a = fe(r);
|
|
250
250
|
return {
|
|
251
|
-
id: e.id ??
|
|
251
|
+
id: e.id ?? T("variable"),
|
|
252
252
|
key: e.key,
|
|
253
253
|
label: e.label ?? i.label ?? e.key,
|
|
254
254
|
type: r,
|
|
@@ -315,13 +315,13 @@ function fe(e) {
|
|
|
315
315
|
underline: !0
|
|
316
316
|
} };
|
|
317
317
|
}
|
|
318
|
-
function R(
|
|
319
|
-
return
|
|
318
|
+
function R(e) {
|
|
319
|
+
return e !== void 0 && !ne(e);
|
|
320
320
|
}
|
|
321
321
|
function pe(e, t = g) {
|
|
322
322
|
if (!e) return F(t);
|
|
323
323
|
let n = O(e.pageSize, t), r = (e.pages?.length ? e.pages : [N(1, n)]).map((e, t) => ({
|
|
324
|
-
id: e.id ||
|
|
324
|
+
id: e.id || T("page"),
|
|
325
325
|
title: e.title || `第 ${t + 1} 页`,
|
|
326
326
|
pageSize: O(e.pageSize, n),
|
|
327
327
|
contentHtml: e.contentHtml || "<p></p>",
|
|
@@ -330,7 +330,7 @@ function pe(e, t = g) {
|
|
|
330
330
|
return (e.variables ?? []).forEach((e) => {
|
|
331
331
|
let t = L({
|
|
332
332
|
...e,
|
|
333
|
-
id: e.id ||
|
|
333
|
+
id: e.id || T("variable")
|
|
334
334
|
});
|
|
335
335
|
i.push(t), t.key && a.set(t.key, t);
|
|
336
336
|
}), r.forEach((e) => {
|
|
@@ -356,7 +356,7 @@ function pe(e, t = g) {
|
|
|
356
356
|
pages: r,
|
|
357
357
|
variables: i,
|
|
358
358
|
pageSize: n,
|
|
359
|
-
signingPlacements:
|
|
359
|
+
signingPlacements: re(e.signingPlacements, o, n),
|
|
360
360
|
...e.pageDecorations ? { pageDecorations: p(e.pageDecorations) } : {}
|
|
361
361
|
};
|
|
362
362
|
}
|
|
@@ -401,7 +401,7 @@ var V = class extends Error {
|
|
|
401
401
|
function ge(e) {
|
|
402
402
|
let t = m(e.pageDecorations, e.variables);
|
|
403
403
|
if (t.length) throw new V(t);
|
|
404
|
-
let n =
|
|
404
|
+
let n = le(e);
|
|
405
405
|
return n.pageDecorations &&= p(n.pageDecorations), {
|
|
406
406
|
...n,
|
|
407
407
|
rendererVersion: v,
|
|
@@ -418,7 +418,7 @@ function H(e, t = {}) {
|
|
|
418
418
|
code: "PAGE_LIMIT_EXCEEDED",
|
|
419
419
|
message: `合同共 ${e.pages.length} 页,超过最多 ${t.maxPages} 页限制`
|
|
420
420
|
}), e.variables.forEach((t) => {
|
|
421
|
-
let i =
|
|
421
|
+
let i = S(t.key, e.variables, t.id), a = !!t.key?.trim() && e.variables.some((e) => e.id !== t.id && e.key.trim() === t.key.trim());
|
|
422
422
|
i && (!a || t.key !== t.key.trim()) && n.push({
|
|
423
423
|
type: "variable",
|
|
424
424
|
id: t.id,
|
|
@@ -454,7 +454,7 @@ function H(e, t = {}) {
|
|
|
454
454
|
id: e.id,
|
|
455
455
|
message: `${e.label || e.key} 缺少对应正文变量节点`
|
|
456
456
|
});
|
|
457
|
-
}), n.push(...m(e.pageDecorations, e.variables)), n.push(...
|
|
457
|
+
}), n.push(...m(e.pageDecorations, e.variables)), n.push(...ae(e)), n;
|
|
458
458
|
}
|
|
459
459
|
function U(e) {
|
|
460
460
|
let t = /* @__PURE__ */ new Set();
|
|
@@ -484,7 +484,7 @@ function ve(e) {
|
|
|
484
484
|
let t = W(e), n = f(e.pageDecorations);
|
|
485
485
|
return {
|
|
486
486
|
...e,
|
|
487
|
-
variables: e.variables.filter((r) =>
|
|
487
|
+
variables: e.variables.filter((r) => S(r.key, e.variables, r.id) ? !0 : t.has(r.key) || n.has(r.key))
|
|
488
488
|
};
|
|
489
489
|
}
|
|
490
490
|
function ye(e, t, n) {
|
|
@@ -511,7 +511,7 @@ function G(e, t, n, r, i) {
|
|
|
511
511
|
function K(e, t, n, r = 1) {
|
|
512
512
|
let a = O(e.pageSize, t);
|
|
513
513
|
return [
|
|
514
|
-
`class="${
|
|
514
|
+
`class="${te(n, r)}"`,
|
|
515
515
|
`data-page-id="${i(e.id)}"`,
|
|
516
516
|
`data-page-format="${i(a.format ?? "Custom")}"`,
|
|
517
517
|
`data-page-label="${i(a.label ?? a.format ?? "自定义")}"`,
|
|
@@ -638,7 +638,7 @@ function we(e) {
|
|
|
638
638
|
});
|
|
639
639
|
}
|
|
640
640
|
function J(e, t) {
|
|
641
|
-
let n = e("data-key") ?? "", r = t.get(n), i = r?.type ?? e("data-variable-type") ?? "text", a = ke(i, r?.defaultValue ?? e("data-default-value") ?? ""), o =
|
|
641
|
+
let n = e("data-key") ?? "", r = t.get(n), i = r?.type ?? e("data-variable-type") ?? "text", a = ke(i, r?.defaultValue ?? e("data-default-value") ?? ""), o = ee({
|
|
642
642
|
type: i,
|
|
643
643
|
width: r?.width ?? e("data-width"),
|
|
644
644
|
height: r?.height ?? e("data-height"),
|
|
@@ -737,4 +737,4 @@ function Pe(e, t = []) {
|
|
|
737
737
|
});
|
|
738
738
|
}
|
|
739
739
|
//#endregion
|
|
740
|
-
export { v as CONTRACT_TEMPLATE_RENDERER_VERSION,
|
|
740
|
+
export { v as CONTRACT_TEMPLATE_RENDERER_VERSION, x as CONTRACT_TEMPLATE_RESERVED_VARIABLE_KEYS, y as CONTRACT_TEMPLATE_STYLE_VERSION, b as CONTRACT_TEMPLATE_VARIABLE_KEY_PATTERN, V as ContractTemplatePageDecorationValidationError, _ as DEFAULT_FIELD_STYLE, C as DEFAULT_FIELD_TYPES, se as DEFAULT_MULTILINE_LINE_HEIGHT, oe as DEFAULT_MULTILINE_ROWS, g as DEFAULT_PAGE_SIZE, h as PAGE_SIZE_OPTIONS, z as buildTemplateExpressionHtml, me as buildTemplateHtml, he as buildTemplatePreviewHtml, B as buildTemplatePreviewPages, le as cloneTemplateValue, Pe as collectTemplateLocationRuleExportErrors, W as collectTemplateValueVariableKeys, U as collectTemplateVariableKeys, ue as constrainTemplatePageSizes, P as createBlankPage, de as createBlankTemplate, N as createDefaultPage, F as createDefaultTemplate, T as createDesignerId, L as createTemplateVariable, ge as exportTemplateValue, j as findPageSizeOption, I as getFieldOption, k as getPageSizeKey, E as getPageSizeOption, D as inferPageFormat, ce as normalizeContractTemplateMaxPages, A as normalizePageSizeOptions, pe as normalizeTemplateValue, O as resolvePageSize, ye as splitPageContentByMeasurements, ve as syncTemplateVariablesWithPages, S as validateContractTemplateVariableKey, H as validateTemplateValue };
|