@guodun/antdv 1.4.1 → 1.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.mjs +304 -293
- package/dist/es/components/contract-signing-location/src/coordinates.mjs +23 -23
- package/dist/es/components/contract-signing-location/src/location-rules.mjs +20 -10
- package/dist/es/components/contract-signing-location/src/page-layout.mjs +12 -9
- package/dist/es/components/contract-signing-location/src/template-source.mjs +2 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerInspector.vue.mjs +208 -180
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerSidebar.vue.mjs +2 -1
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerToolbar.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerToolbar.vue.mjs +690 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.vue.mjs +253 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateImageContextMenu.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateImageContextMenu.vue.mjs +87 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePageDecorations.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePageDecorations.vue.mjs +98 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsInspector.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsInspector.vue.mjs +550 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsStudio.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsStudio.vue.mjs +117 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePreviewModal.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePreviewModal.vue.mjs +96 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue.mjs +51 -26
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateRendererPage.vue.mjs +56 -33
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateSubmitDataModal.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateSubmitDataModal.vue.mjs +29 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateTextBubbleMenu.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateTextBubbleMenu.vue.mjs +179 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateTextContextMenu.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateTextContextMenu.vue.mjs +390 -0
- package/dist/es/components/pro-contract-template-designer/src/DesignerPage.vue.mjs +332 -263
- package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.mjs +1442 -2287
- package/dist/es/components/pro-contract-template-designer/src/composables/use-auto-pagination.mjs +71 -0
- package/dist/es/components/pro-contract-template-designer/src/composables/use-designer-files.mjs +11 -0
- package/dist/es/components/pro-contract-template-designer/src/composables/use-draft-cache-session.mjs +111 -0
- package/dist/es/components/pro-contract-template-designer/src/composables/use-signing-placement-editor.mjs +79 -0
- package/dist/es/components/pro-contract-template-designer/src/composables/use-template-designer.mjs +189 -160
- package/dist/es/components/pro-contract-template-designer/src/composables/use-template-files.mjs +35 -22
- package/dist/es/components/pro-contract-template-designer/src/composables/use-toolbar-overflow.mjs +71 -0
- package/dist/es/components/pro-contract-template-designer/src/constants.mjs +71 -10
- package/dist/es/components/pro-contract-template-designer/src/extensions/editor-extensions.mjs +1 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/block-style.mjs +43 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/context-menu-viewport.mjs +13 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/editor-state.mjs +7 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/page-decorations.mjs +398 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/serialize-fingerprint.mjs +6 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/template-renderer.mjs +88 -72
- package/dist/es/components/pro-contract-template-designer/style/index.css +1 -1
- package/dist/es/index.mjs +20 -20
- package/dist/lib/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.cjs +1 -1
- package/dist/lib/components/contract-signing-location/src/coordinates.cjs +1 -1
- package/dist/lib/components/contract-signing-location/src/location-rules.cjs +1 -1
- package/dist/lib/components/contract-signing-location/src/page-layout.cjs +1 -1
- package/dist/lib/components/contract-signing-location/src/template-source.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerInspector.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerSidebar.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerToolbar.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerToolbar.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateImageContextMenu.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateImageContextMenu.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePageDecorations.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePageDecorations.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsInspector.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsInspector.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsStudio.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsStudio.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePreviewModal.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePreviewModal.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateRendererPage.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateSubmitDataModal.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateSubmitDataModal.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateTextBubbleMenu.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateTextBubbleMenu.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateTextContextMenu.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateTextContextMenu.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/DesignerPage.vue.cjs +2 -2
- package/dist/lib/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/composables/use-auto-pagination.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/composables/use-designer-files.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/composables/use-draft-cache-session.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/composables/use-signing-placement-editor.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/composables/use-template-designer.cjs +4 -4
- package/dist/lib/components/pro-contract-template-designer/src/composables/use-template-files.cjs +2 -2
- package/dist/lib/components/pro-contract-template-designer/src/composables/use-toolbar-overflow.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/constants.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/extensions/editor-extensions.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/utils/block-style.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/context-menu-viewport.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/editor-state.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/page-decorations.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/serialize-fingerprint.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/template-renderer.cjs +3 -3
- package/dist/lib/components/pro-contract-template-designer/style/index.css +1 -1
- package/dist/lib/index.cjs +1 -1
- package/dist/theme/icon.css +1 -1
- package/dist/theme/index.css +1 -1
- package/dist/types/components/contract-signing-location/src/coordinates.d.ts +2 -2
- package/dist/types/components/contract-signing-location/src/page-layout.d.ts +2 -2
- package/dist/types/components/contract-signing-location/src/template-source.d.ts +2 -0
- package/dist/types/components/contract-signing-location/src/types.d.ts +3 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateDesignerInspector.vue.d.ts +3 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateDesignerSidebar.vue.d.ts +1 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateDesignerToolbar.vue.d.ts +104 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.vue.d.ts +60 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateImageContextMenu.vue.d.ts +27 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplatePageDecorations.vue.d.ts +13 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsInspector.vue.d.ts +28 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsStudio.vue.d.ts +77 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplatePreviewModal.vue.d.ts +36 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue.d.ts +5 -1
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateRendererHeader.vue.d.ts +4 -4
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateRendererToolbar.vue.d.ts +4 -4
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateSubmitDataModal.vue.d.ts +12 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateTextBubbleMenu.vue.d.ts +43 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateTextContextMenu.vue.d.ts +77 -0
- package/dist/types/components/pro-contract-template-designer/src/DesignerPage.vue.d.ts +30 -32
- package/dist/types/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.d.ts +456 -12
- package/dist/types/components/pro-contract-template-designer/src/composables/use-auto-pagination.d.ts +43 -0
- package/dist/types/components/pro-contract-template-designer/src/composables/use-designer-files.d.ts +22 -0
- package/dist/types/components/pro-contract-template-designer/src/composables/use-draft-cache-session.d.ts +41 -0
- package/dist/types/components/pro-contract-template-designer/src/composables/use-signing-placement-editor.d.ts +49 -0
- package/dist/types/components/pro-contract-template-designer/src/composables/use-template-designer.d.ts +15 -1
- package/dist/types/components/pro-contract-template-designer/src/composables/use-template-files.d.ts +13 -0
- package/dist/types/components/pro-contract-template-designer/src/composables/use-toolbar-overflow.d.ts +19 -0
- package/dist/types/components/pro-contract-template-designer/src/constants.d.ts +7 -1
- package/dist/types/components/pro-contract-template-designer/src/types.d.ts +89 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/block-style.d.ts +4 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/context-menu-viewport.d.ts +25 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/editor-state.d.ts +8 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/page-decorations.d.ts +90 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/serialize-fingerprint.d.ts +8 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/template-renderer.d.ts +4 -1
- package/package.json +3 -3
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
import { computed as e, createBlock as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createVNode as a, defineComponent as o, normalizeClass as s, openBlock as c, ref as l, toDisplayString as u, unref as d, withCtx as f } from "vue";
|
|
2
|
+
import { Button as p, Tooltip as m } from "ant-design-vue";
|
|
3
|
+
import { AuditOutlined as h, BgColorsOutlined as g, ColumnWidthOutlined as _, DatabaseOutlined as v, DeleteOutlined as y, EyeOutlined as b, FormOutlined as x, FullscreenExitOutlined as S, FullscreenOutlined as C, ReloadOutlined as w, UpOutlined as T, ZoomInOutlined as E, ZoomOutOutlined as D } from "@ant-design/icons-vue";
|
|
4
|
+
//#region src/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var O = { class: "gd-contract-template-designer__workspace-meta" }, k = { class: "gd-contract-template-designer__workspace-actions" }, A = { class: "gd-contract-template-designer__workspace-controls" }, j = { class: "gd-contract-template-designer__zoom" }, M = { class: "gd-contract-template-designer__workspace-buttons" }, N = { class: "gd-contract-template-designer__page-decorations-trigger-copy" }, P = /* @__PURE__ */ o({
|
|
6
|
+
__name: "ContractTemplateDesignerWorkspaceHeader",
|
|
7
|
+
props: {
|
|
8
|
+
summary: {},
|
|
9
|
+
draftCacheStatusText: {},
|
|
10
|
+
draftCacheStatusClass: {},
|
|
11
|
+
showDraftCacheStatus: { type: Boolean },
|
|
12
|
+
showClearButton: { type: Boolean },
|
|
13
|
+
showSubmitDataViewer: { type: Boolean },
|
|
14
|
+
readonly: { type: Boolean },
|
|
15
|
+
zoomPercent: {},
|
|
16
|
+
zoomOutDisabled: { type: Boolean },
|
|
17
|
+
zoomInDisabled: { type: Boolean },
|
|
18
|
+
isFullscreen: { type: Boolean },
|
|
19
|
+
immersive: { type: Boolean },
|
|
20
|
+
pageDecorationsOpen: { type: Boolean },
|
|
21
|
+
pageDecorationsStudioId: {},
|
|
22
|
+
pageDecorationsPresetLabel: {},
|
|
23
|
+
pageDecorationsEnabledCount: {},
|
|
24
|
+
pageDecorationsEnabledStates: {},
|
|
25
|
+
chromeControlsId: {}
|
|
26
|
+
},
|
|
27
|
+
emits: [
|
|
28
|
+
"zoomOut",
|
|
29
|
+
"zoomIn",
|
|
30
|
+
"fitWidth",
|
|
31
|
+
"resetZoom",
|
|
32
|
+
"toggleFullscreen",
|
|
33
|
+
"toggleImmersive",
|
|
34
|
+
"clear",
|
|
35
|
+
"validate",
|
|
36
|
+
"preview",
|
|
37
|
+
"submitData",
|
|
38
|
+
"togglePageDecorations",
|
|
39
|
+
"toggleChrome"
|
|
40
|
+
],
|
|
41
|
+
setup(o, { expose: P, emit: F }) {
|
|
42
|
+
let I = o, L = F, R = l(), z = e(() => [
|
|
43
|
+
{
|
|
44
|
+
key: "header",
|
|
45
|
+
label: "页眉",
|
|
46
|
+
enabled: I.pageDecorationsEnabledStates.header
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
key: "footer",
|
|
50
|
+
label: "页脚",
|
|
51
|
+
enabled: I.pageDecorationsEnabledStates.footer
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
key: "watermark",
|
|
55
|
+
label: "水印",
|
|
56
|
+
enabled: I.pageDecorationsEnabledStates.watermark
|
|
57
|
+
}
|
|
58
|
+
]), B = e(() => `页面装饰 · ${I.pageDecorationsPresetLabel} · 启用 ${I.pageDecorationsEnabledCount}/3`), V = e(() => `页面装饰,${I.pageDecorationsPresetLabel},已启用 ${I.pageDecorationsEnabledCount}/3;${z.value.map((e) => `${e.label}${e.enabled ? "已启用" : "未启用"}`).join(",")}`);
|
|
59
|
+
return P({
|
|
60
|
+
focusPageDecorations: () => R.value?.querySelector(".gd-contract-template-designer__page-decorations-trigger")?.focus(),
|
|
61
|
+
focusImmersive: () => R.value?.querySelector(".gd-contract-template-designer__immersive-trigger")?.focus(),
|
|
62
|
+
focusChromeToggle: () => R.value?.querySelector(".gd-contract-template-designer__workspace-chrome-toggle")?.focus()
|
|
63
|
+
}), (e, l) => (c(), r("header", {
|
|
64
|
+
ref_key: "workspaceHeader",
|
|
65
|
+
ref: R,
|
|
66
|
+
class: "gd-contract-template-designer__workspace-header"
|
|
67
|
+
}, [i("div", O, [i("strong", null, u(o.summary), 1), o.showDraftCacheStatus && o.draftCacheStatusText ? (c(), r("small", {
|
|
68
|
+
key: 0,
|
|
69
|
+
class: s(["gd-contract-template-designer__draft-cache-status", o.draftCacheStatusClass])
|
|
70
|
+
}, u(o.draftCacheStatusText), 3)) : n("", !0)]), i("div", k, [
|
|
71
|
+
i("div", A, [i("div", j, [
|
|
72
|
+
a(d(m), { title: "缩小" }, {
|
|
73
|
+
default: f(() => [a(d(p), {
|
|
74
|
+
size: "small",
|
|
75
|
+
class: "gd-contract-template-designer__icon-button",
|
|
76
|
+
disabled: o.zoomOutDisabled,
|
|
77
|
+
"aria-label": "缩小",
|
|
78
|
+
onClick: l[0] ||= (e) => L("zoomOut")
|
|
79
|
+
}, {
|
|
80
|
+
default: f(() => [a(d(D), { "aria-hidden": "true" })]),
|
|
81
|
+
_: 1
|
|
82
|
+
}, 8, ["disabled"])]),
|
|
83
|
+
_: 1
|
|
84
|
+
}),
|
|
85
|
+
i("span", null, u(o.zoomPercent), 1),
|
|
86
|
+
a(d(m), { title: "放大" }, {
|
|
87
|
+
default: f(() => [a(d(p), {
|
|
88
|
+
size: "small",
|
|
89
|
+
class: "gd-contract-template-designer__icon-button",
|
|
90
|
+
disabled: o.zoomInDisabled,
|
|
91
|
+
"aria-label": "放大",
|
|
92
|
+
onClick: l[1] ||= (e) => L("zoomIn")
|
|
93
|
+
}, {
|
|
94
|
+
default: f(() => [a(d(E), { "aria-hidden": "true" })]),
|
|
95
|
+
_: 1
|
|
96
|
+
}, 8, ["disabled"])]),
|
|
97
|
+
_: 1
|
|
98
|
+
}),
|
|
99
|
+
a(d(m), { title: "适应宽度" }, {
|
|
100
|
+
default: f(() => [a(d(p), {
|
|
101
|
+
size: "small",
|
|
102
|
+
class: "gd-contract-template-designer__icon-button",
|
|
103
|
+
"aria-label": "适应宽度",
|
|
104
|
+
onClick: l[2] ||= (e) => L("fitWidth")
|
|
105
|
+
}, {
|
|
106
|
+
default: f(() => [a(d(_), { "aria-hidden": "true" })]),
|
|
107
|
+
_: 1
|
|
108
|
+
})]),
|
|
109
|
+
_: 1
|
|
110
|
+
}),
|
|
111
|
+
a(d(m), { title: "重置缩放" }, {
|
|
112
|
+
default: f(() => [a(d(p), {
|
|
113
|
+
size: "small",
|
|
114
|
+
class: "gd-contract-template-designer__icon-button",
|
|
115
|
+
"aria-label": "重置缩放",
|
|
116
|
+
onClick: l[3] ||= (e) => L("resetZoom")
|
|
117
|
+
}, {
|
|
118
|
+
default: f(() => [a(d(w), { "aria-hidden": "true" })]),
|
|
119
|
+
_: 1
|
|
120
|
+
})]),
|
|
121
|
+
_: 1
|
|
122
|
+
}),
|
|
123
|
+
a(d(m), { title: o.isFullscreen ? "退出全屏" : "全屏显示" }, {
|
|
124
|
+
default: f(() => [a(d(p), {
|
|
125
|
+
size: "small",
|
|
126
|
+
class: "gd-contract-template-designer__icon-button",
|
|
127
|
+
"aria-label": o.isFullscreen ? "退出全屏" : "全屏显示",
|
|
128
|
+
onClick: l[4] ||= (e) => L("toggleFullscreen")
|
|
129
|
+
}, {
|
|
130
|
+
default: f(() => [o.isFullscreen ? (c(), t(d(S), {
|
|
131
|
+
key: 0,
|
|
132
|
+
"aria-hidden": "true"
|
|
133
|
+
})) : (c(), t(d(C), {
|
|
134
|
+
key: 1,
|
|
135
|
+
"aria-hidden": "true"
|
|
136
|
+
}))]),
|
|
137
|
+
_: 1
|
|
138
|
+
}, 8, ["aria-label"])]),
|
|
139
|
+
_: 1
|
|
140
|
+
}, 8, ["title"]),
|
|
141
|
+
a(d(m), { title: "沉浸写作(只保留写作区)" }, {
|
|
142
|
+
default: f(() => [a(d(p), {
|
|
143
|
+
size: "small",
|
|
144
|
+
class: s(["gd-contract-template-designer__icon-button gd-contract-template-designer__immersive-trigger", { "is-selected": o.immersive }]),
|
|
145
|
+
"aria-pressed": o.immersive,
|
|
146
|
+
"aria-label": "沉浸写作",
|
|
147
|
+
onClick: l[5] ||= (e) => L("toggleImmersive")
|
|
148
|
+
}, {
|
|
149
|
+
default: f(() => [a(d(x), { "aria-hidden": "true" })]),
|
|
150
|
+
_: 1
|
|
151
|
+
}, 8, ["class", "aria-pressed"])]),
|
|
152
|
+
_: 1
|
|
153
|
+
})
|
|
154
|
+
])]),
|
|
155
|
+
i("div", M, [
|
|
156
|
+
o.showClearButton ? (c(), t(d(m), {
|
|
157
|
+
key: 0,
|
|
158
|
+
title: "清空合同"
|
|
159
|
+
}, {
|
|
160
|
+
default: f(() => [a(d(p), {
|
|
161
|
+
size: "small",
|
|
162
|
+
danger: "",
|
|
163
|
+
class: "gd-contract-template-designer__icon-button",
|
|
164
|
+
disabled: o.readonly,
|
|
165
|
+
"aria-label": "清空合同",
|
|
166
|
+
onClick: l[6] ||= (e) => L("clear")
|
|
167
|
+
}, {
|
|
168
|
+
default: f(() => [a(d(y), { "aria-hidden": "true" })]),
|
|
169
|
+
_: 1
|
|
170
|
+
}, 8, ["disabled"])]),
|
|
171
|
+
_: 1
|
|
172
|
+
})) : n("", !0),
|
|
173
|
+
a(d(m), { title: B.value }, {
|
|
174
|
+
default: f(() => [a(d(p), {
|
|
175
|
+
size: "small",
|
|
176
|
+
class: s(["gd-contract-template-designer__page-decorations-trigger", { "is-selected": o.pageDecorationsOpen }]),
|
|
177
|
+
"aria-pressed": o.pageDecorationsOpen,
|
|
178
|
+
"aria-expanded": o.pageDecorationsOpen,
|
|
179
|
+
"aria-controls": o.pageDecorationsStudioId,
|
|
180
|
+
"aria-label": V.value,
|
|
181
|
+
onClick: l[7] ||= (e) => L("togglePageDecorations")
|
|
182
|
+
}, {
|
|
183
|
+
default: f(() => [a(d(g), { "aria-hidden": "true" }), i("span", N, [l[12] ||= i("span", null, "页面装饰", -1), i("small", null, u(o.pageDecorationsPresetLabel) + " · 启用 " + u(o.pageDecorationsEnabledCount) + "/3", 1)])]),
|
|
184
|
+
_: 1
|
|
185
|
+
}, 8, [
|
|
186
|
+
"class",
|
|
187
|
+
"aria-pressed",
|
|
188
|
+
"aria-expanded",
|
|
189
|
+
"aria-controls",
|
|
190
|
+
"aria-label"
|
|
191
|
+
])]),
|
|
192
|
+
_: 1
|
|
193
|
+
}, 8, ["title"]),
|
|
194
|
+
a(d(m), { title: "校验" }, {
|
|
195
|
+
default: f(() => [a(d(p), {
|
|
196
|
+
size: "small",
|
|
197
|
+
class: "gd-contract-template-designer__icon-button",
|
|
198
|
+
"aria-label": "校验",
|
|
199
|
+
onClick: l[8] ||= (e) => L("validate")
|
|
200
|
+
}, {
|
|
201
|
+
default: f(() => [a(d(h), { "aria-hidden": "true" })]),
|
|
202
|
+
_: 1
|
|
203
|
+
})]),
|
|
204
|
+
_: 1
|
|
205
|
+
}),
|
|
206
|
+
a(d(m), { title: "预览" }, {
|
|
207
|
+
default: f(() => [a(d(p), {
|
|
208
|
+
size: "small",
|
|
209
|
+
type: "primary",
|
|
210
|
+
class: "gd-contract-template-designer__icon-button",
|
|
211
|
+
"aria-label": "预览",
|
|
212
|
+
onClick: l[9] ||= (e) => L("preview")
|
|
213
|
+
}, {
|
|
214
|
+
default: f(() => [a(d(b), { "aria-hidden": "true" })]),
|
|
215
|
+
_: 1
|
|
216
|
+
})]),
|
|
217
|
+
_: 1
|
|
218
|
+
}),
|
|
219
|
+
o.showSubmitDataViewer ? (c(), t(d(m), {
|
|
220
|
+
key: 1,
|
|
221
|
+
title: "数据查看"
|
|
222
|
+
}, {
|
|
223
|
+
default: f(() => [a(d(p), {
|
|
224
|
+
size: "small",
|
|
225
|
+
class: "gd-contract-template-designer__icon-button",
|
|
226
|
+
"aria-label": "数据查看",
|
|
227
|
+
onClick: l[10] ||= (e) => L("submitData")
|
|
228
|
+
}, {
|
|
229
|
+
default: f(() => [a(d(v), { "aria-hidden": "true" })]),
|
|
230
|
+
_: 1
|
|
231
|
+
})]),
|
|
232
|
+
_: 1
|
|
233
|
+
})) : n("", !0)
|
|
234
|
+
]),
|
|
235
|
+
a(d(m), { title: "收起工具区" }, {
|
|
236
|
+
default: f(() => [a(d(p), {
|
|
237
|
+
size: "small",
|
|
238
|
+
class: "gd-contract-template-designer__icon-button gd-contract-template-designer__workspace-chrome-toggle",
|
|
239
|
+
"aria-label": "收起工具区",
|
|
240
|
+
"aria-expanded": !0,
|
|
241
|
+
"aria-controls": o.chromeControlsId,
|
|
242
|
+
onClick: l[11] ||= (e) => L("toggleChrome")
|
|
243
|
+
}, {
|
|
244
|
+
default: f(() => [a(d(T), { "aria-hidden": "true" })]),
|
|
245
|
+
_: 1
|
|
246
|
+
}, 8, ["aria-controls"])]),
|
|
247
|
+
_: 1
|
|
248
|
+
})
|
|
249
|
+
])], 512));
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
//#endregion
|
|
253
|
+
export { P as default };
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { MAX_CONTRACT_IMAGE_DIMENSION as e } from "./utils/content-image.mjs";
|
|
2
|
+
import { createElementBlock as t, createElementVNode as n, createTextVNode as r, createVNode as i, defineComponent as a, mergeModels as o, normalizeStyle as s, openBlock as c, ref as l, unref as u, useModel as d, withCtx as f } from "vue";
|
|
3
|
+
import { Button as p, InputNumber as m } from "ant-design-vue";
|
|
4
|
+
//#region src/components/pro-contract-template-designer/src/ContractTemplateImageContextMenu.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var h = {
|
|
6
|
+
class: "gd-contract-template-designer__image-size-fields",
|
|
7
|
+
role: "group",
|
|
8
|
+
"aria-label": "图片尺寸"
|
|
9
|
+
}, g = { class: "gd-contract-template-designer__popover-actions" }, _ = /* @__PURE__ */ a({
|
|
10
|
+
name: "ContractTemplateImageContextMenu",
|
|
11
|
+
__name: "ContractTemplateImageContextMenu",
|
|
12
|
+
props: /* @__PURE__ */ o({
|
|
13
|
+
x: {},
|
|
14
|
+
y: {},
|
|
15
|
+
readonly: { type: Boolean }
|
|
16
|
+
}, {
|
|
17
|
+
width: {},
|
|
18
|
+
widthModifiers: {},
|
|
19
|
+
height: {},
|
|
20
|
+
heightModifiers: {}
|
|
21
|
+
}),
|
|
22
|
+
emits: /* @__PURE__ */ o([
|
|
23
|
+
"restore",
|
|
24
|
+
"apply",
|
|
25
|
+
"keydown"
|
|
26
|
+
], ["update:width", "update:height"]),
|
|
27
|
+
setup(a, { expose: o, emit: _ }) {
|
|
28
|
+
let v = d(a, "width"), y = d(a, "height"), b = _, x = l();
|
|
29
|
+
return o({ getMenuElement: () => x.value }), (o, l) => (c(), t("div", {
|
|
30
|
+
ref_key: "menuElement",
|
|
31
|
+
ref: x,
|
|
32
|
+
class: "gd-contract-template-designer__context-menu gd-contract-template-designer__image-context-menu",
|
|
33
|
+
style: s({
|
|
34
|
+
left: `${a.x}px`,
|
|
35
|
+
top: `${a.y}px`
|
|
36
|
+
}),
|
|
37
|
+
role: "dialog",
|
|
38
|
+
"aria-label": "图片尺寸",
|
|
39
|
+
onKeydown: l[4] ||= (e) => b("keydown", e)
|
|
40
|
+
}, [
|
|
41
|
+
l[9] ||= n("div", { class: "gd-contract-template-designer__image-context-title" }, [n("strong", null, "图片尺寸"), n("span", null, "单位:px;留空可恢复自然尺寸")], -1),
|
|
42
|
+
n("div", h, [n("label", null, [l[5] ||= n("span", null, "宽度", -1), i(u(m), {
|
|
43
|
+
value: v.value,
|
|
44
|
+
"onUpdate:value": l[0] ||= (e) => v.value = e,
|
|
45
|
+
min: u(16),
|
|
46
|
+
max: u(e),
|
|
47
|
+
disabled: a.readonly,
|
|
48
|
+
placeholder: "自然",
|
|
49
|
+
"aria-label": "图片宽度"
|
|
50
|
+
}, null, 8, [
|
|
51
|
+
"value",
|
|
52
|
+
"min",
|
|
53
|
+
"max",
|
|
54
|
+
"disabled"
|
|
55
|
+
])]), n("label", null, [l[6] ||= n("span", null, "高度", -1), i(u(m), {
|
|
56
|
+
value: y.value,
|
|
57
|
+
"onUpdate:value": l[1] ||= (e) => y.value = e,
|
|
58
|
+
min: u(16),
|
|
59
|
+
max: u(e),
|
|
60
|
+
disabled: a.readonly,
|
|
61
|
+
placeholder: "自然",
|
|
62
|
+
"aria-label": "图片高度"
|
|
63
|
+
}, null, 8, [
|
|
64
|
+
"value",
|
|
65
|
+
"min",
|
|
66
|
+
"max",
|
|
67
|
+
"disabled"
|
|
68
|
+
])])]),
|
|
69
|
+
n("div", g, [i(u(p), {
|
|
70
|
+
size: "small",
|
|
71
|
+
onClick: l[2] ||= (e) => b("restore")
|
|
72
|
+
}, {
|
|
73
|
+
default: f(() => [...l[7] ||= [r("恢复自然尺寸", -1)]]),
|
|
74
|
+
_: 1
|
|
75
|
+
}), i(u(p), {
|
|
76
|
+
size: "small",
|
|
77
|
+
type: "primary",
|
|
78
|
+
onClick: l[3] ||= (e) => b("apply")
|
|
79
|
+
}, {
|
|
80
|
+
default: f(() => [...l[8] ||= [r("应用", -1)]]),
|
|
81
|
+
_: 1
|
|
82
|
+
})])
|
|
83
|
+
], 36));
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
//#endregion
|
|
87
|
+
export { _ as default };
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { getWatermarkDensityGrid as e, hasEnabledPageFooter as t, hasEnabledPageHeader as n, hasEnabledPageWatermark as r, normalizePageDecorations as i, parsePageDecorationText as a, resolvePageDecorationTokenText as o } from "./utils/page-decorations.mjs";
|
|
2
|
+
import { Fragment as s, computed as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, defineComponent as f, normalizeClass as p, normalizeStyle as m, openBlock as h, renderList as g, toDisplayString as _ } from "vue";
|
|
3
|
+
//#region src/components/pro-contract-template-designer/src/ContractTemplatePageDecorations.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var v = ["data-watermark-layout", "data-watermark-density"], y = ["data-decoration-offset", "data-decoration-font-size"], b = ["data-decoration-offset", "data-decoration-font-size"], x = /* @__PURE__ */ f({
|
|
5
|
+
name: "ContractTemplatePageDecorations",
|
|
6
|
+
__name: "ContractTemplatePageDecorations",
|
|
7
|
+
props: {
|
|
8
|
+
decorations: {},
|
|
9
|
+
pageNumber: {},
|
|
10
|
+
totalPages: {},
|
|
11
|
+
variables: { default: () => [] },
|
|
12
|
+
values: { default: () => ({}) }
|
|
13
|
+
},
|
|
14
|
+
setup(f) {
|
|
15
|
+
let x = f, S = c(() => i(x.decorations)), C = c(() => n(S.value, x.pageNumber)), w = c(() => t(S.value, x.pageNumber)), T = c(() => r(S.value, x.pageNumber)), E = c(() => e(S.value.watermark.density)), D = c(() => S.value.watermark.layout === "tiled" ? E.value.columns * E.value.rows : 1), O = c(() => ({
|
|
16
|
+
color: S.value.header.color,
|
|
17
|
+
fontFamily: S.value.header.fontFamily,
|
|
18
|
+
fontSize: `${S.value.header.fontSize}px`,
|
|
19
|
+
fontWeight: S.value.header.fontWeight,
|
|
20
|
+
top: `${S.value.header.offset}px`,
|
|
21
|
+
borderBottom: S.value.header.divider.enabled ? `1px solid ${S.value.header.divider.color}` : void 0
|
|
22
|
+
})), k = c(() => ({
|
|
23
|
+
color: S.value.footer.color,
|
|
24
|
+
fontFamily: S.value.footer.fontFamily,
|
|
25
|
+
fontSize: `${S.value.footer.fontSize}px`,
|
|
26
|
+
fontWeight: S.value.footer.fontWeight,
|
|
27
|
+
bottom: `${S.value.footer.offset}px`,
|
|
28
|
+
borderTop: S.value.footer.divider.enabled ? `1px solid ${S.value.footer.divider.color}` : void 0
|
|
29
|
+
})), A = c(() => ({
|
|
30
|
+
"--gd-watermark-columns": E.value.columns,
|
|
31
|
+
"--gd-watermark-rows": E.value.rows
|
|
32
|
+
})), j = c(() => ({
|
|
33
|
+
color: S.value.watermark.color,
|
|
34
|
+
fontSize: `${S.value.watermark.fontSize}px`,
|
|
35
|
+
opacity: S.value.watermark.opacity,
|
|
36
|
+
transform: `rotate(${S.value.watermark.rotation}deg)`
|
|
37
|
+
}));
|
|
38
|
+
function M(e) {
|
|
39
|
+
return a(e).tokens;
|
|
40
|
+
}
|
|
41
|
+
function N(e) {
|
|
42
|
+
return o(e, x.variables, x.values, x.pageNumber, x.totalPages, S.value.pageNumbering.countFirstPage);
|
|
43
|
+
}
|
|
44
|
+
return (e, t) => (h(), u(s, null, [
|
|
45
|
+
T.value ? (h(), u("div", {
|
|
46
|
+
key: 0,
|
|
47
|
+
class: p(["gd-contract-template-page__watermark", [`is-${S.value.watermark.layout}`, `density-${S.value.watermark.density}`]]),
|
|
48
|
+
style: m(A.value),
|
|
49
|
+
"data-watermark-layout": S.value.watermark.layout,
|
|
50
|
+
"data-watermark-density": S.value.watermark.density,
|
|
51
|
+
"aria-hidden": "true"
|
|
52
|
+
}, [(h(!0), u(s, null, g(D.value, (e) => (h(), u("div", {
|
|
53
|
+
key: e,
|
|
54
|
+
class: "gd-contract-template-page__watermark-item",
|
|
55
|
+
style: m(j.value)
|
|
56
|
+
}, [(h(!0), u(s, null, g(M(S.value.watermark.text), (t, n) => (h(), u("span", {
|
|
57
|
+
key: `${e}-${n}`,
|
|
58
|
+
class: p({ "gd-contract-template-page__variable": t.type === "variable" })
|
|
59
|
+
}, _(N(t)), 3))), 128))], 4))), 128))], 14, v)) : l("", !0),
|
|
60
|
+
C.value ? (h(), u("div", {
|
|
61
|
+
key: 1,
|
|
62
|
+
class: "gd-contract-template-page__header",
|
|
63
|
+
style: m(O.value),
|
|
64
|
+
"data-decoration-offset": S.value.header.offset,
|
|
65
|
+
"data-decoration-font-size": S.value.header.fontSize
|
|
66
|
+
}, [(h(), u(s, null, g([
|
|
67
|
+
"left",
|
|
68
|
+
"center",
|
|
69
|
+
"right"
|
|
70
|
+
], (e) => d("div", {
|
|
71
|
+
key: e,
|
|
72
|
+
class: p(["gd-contract-template-page__decoration-slot", `is-${e}`])
|
|
73
|
+
}, [(h(!0), u(s, null, g(M(S.value.header.slots[e]), (e, t) => (h(), u("span", {
|
|
74
|
+
key: t,
|
|
75
|
+
class: p({ "gd-contract-template-page__variable": e.type === "variable" })
|
|
76
|
+
}, _(N(e)), 3))), 128))], 2)), 64))], 12, y)) : l("", !0),
|
|
77
|
+
w.value ? (h(), u("div", {
|
|
78
|
+
key: 2,
|
|
79
|
+
class: "gd-contract-template-page__footer",
|
|
80
|
+
style: m(k.value),
|
|
81
|
+
"data-decoration-offset": S.value.footer.offset,
|
|
82
|
+
"data-decoration-font-size": S.value.footer.fontSize
|
|
83
|
+
}, [(h(), u(s, null, g([
|
|
84
|
+
"left",
|
|
85
|
+
"center",
|
|
86
|
+
"right"
|
|
87
|
+
], (e) => d("div", {
|
|
88
|
+
key: e,
|
|
89
|
+
class: p(["gd-contract-template-page__decoration-slot", `is-${e}`])
|
|
90
|
+
}, [(h(!0), u(s, null, g(M(S.value.footer.slots[e]), (e, t) => (h(), u("span", {
|
|
91
|
+
key: t,
|
|
92
|
+
class: p({ "gd-contract-template-page__variable": e.type === "variable" })
|
|
93
|
+
}, _(N(e)), 3))), 128))], 2)), 64))], 12, b)) : l("", !0)
|
|
94
|
+
], 64));
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
//#endregion
|
|
98
|
+
export { x as default };
|