@guodun/antdv 1.4.2 → 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.
Files changed (34) hide show
  1. package/dist/es/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.mjs +304 -293
  2. package/dist/es/components/contract-signing-location/src/coordinates.mjs +23 -23
  3. package/dist/es/components/contract-signing-location/src/location-rules.mjs +20 -10
  4. package/dist/es/components/contract-signing-location/src/page-layout.mjs +12 -9
  5. package/dist/es/components/contract-signing-location/src/template-source.mjs +2 -0
  6. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.vue.mjs +186 -148
  7. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateTextBubbleMenu.mjs +5 -0
  8. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateTextBubbleMenu.vue.mjs +179 -0
  9. package/dist/es/components/pro-contract-template-designer/src/DesignerPage.vue.mjs +104 -81
  10. package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.mjs +1205 -1035
  11. package/dist/es/components/pro-contract-template-designer/style/index.css +1 -1
  12. package/dist/lib/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.cjs +1 -1
  13. package/dist/lib/components/contract-signing-location/src/coordinates.cjs +1 -1
  14. package/dist/lib/components/contract-signing-location/src/location-rules.cjs +1 -1
  15. package/dist/lib/components/contract-signing-location/src/page-layout.cjs +1 -1
  16. package/dist/lib/components/contract-signing-location/src/template-source.cjs +1 -1
  17. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.vue.cjs +1 -1
  18. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateTextBubbleMenu.cjs +1 -0
  19. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateTextBubbleMenu.vue.cjs +1 -0
  20. package/dist/lib/components/pro-contract-template-designer/src/DesignerPage.vue.cjs +2 -2
  21. package/dist/lib/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.cjs +1 -1
  22. package/dist/lib/components/pro-contract-template-designer/style/index.css +1 -1
  23. package/dist/theme/icon.css +1 -1
  24. package/dist/theme/index.css +1 -1
  25. package/dist/types/components/contract-signing-location/src/coordinates.d.ts +2 -2
  26. package/dist/types/components/contract-signing-location/src/page-layout.d.ts +2 -2
  27. package/dist/types/components/contract-signing-location/src/template-source.d.ts +2 -0
  28. package/dist/types/components/contract-signing-location/src/types.d.ts +3 -0
  29. package/dist/types/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.vue.d.ts +10 -0
  30. package/dist/types/components/pro-contract-template-designer/src/ContractTemplateTextBubbleMenu.vue.d.ts +43 -0
  31. package/dist/types/components/pro-contract-template-designer/src/DesignerPage.vue.d.ts +22 -0
  32. package/dist/types/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.d.ts +90 -0
  33. package/dist/types/components/pro-contract-template-designer/src/utils/context-menu-viewport.d.ts +3 -0
  34. package/package.json +3 -3
@@ -100,47 +100,47 @@ function h(e, t = .5, n = 1.5) {
100
100
  function g(e, t, n = !1) {
101
101
  return !e || n ? !1 : e.signType === "seal" ? !0 : !!t;
102
102
  }
103
- function _(e, t, n, r = 4) {
104
- let i = s(e), a = Math.max(0, S(r, 4)) / Math.max(.01, S(n, 1)), o = i.signWidth, c = i.signHeight, l = y([
103
+ function _(e, t, n, r = 4, i) {
104
+ let a = s(e), o = Math.max(0, S(r, 4)), c = Math.max(.01, S(n, 1)), l = Math.max(1, S(i?.width, 1)), u = Math.max(1, S(i?.height, 1)), d = Math.max(1, S(i?.displayWidth, l)), f = Math.max(1, S(i?.displayHeight, u)), p = o / c * l / d, m = o / c * u / f, h = a.signWidth, g = a.signHeight, _ = y([
105
105
  {
106
- value: i.signLeft,
106
+ value: a.signLeft,
107
107
  toOrigin: (e) => e
108
108
  },
109
109
  {
110
- value: i.signLeft + o,
111
- toOrigin: (e) => e - o
110
+ value: a.signLeft + h,
111
+ toOrigin: (e) => e - h
112
112
  },
113
113
  {
114
- value: i.signLeft + o / 2,
115
- toOrigin: (e) => e - o / 2
114
+ value: a.signLeft + h / 2,
115
+ toOrigin: (e) => e - h / 2
116
116
  }
117
- ], v(t, e, "x"), a), u = y([
117
+ ], v(t, e, "x"), p), b = y([
118
118
  {
119
- value: i.signTop,
119
+ value: a.signTop,
120
120
  toOrigin: (e) => e
121
121
  },
122
122
  {
123
- value: i.signTop + c,
124
- toOrigin: (e) => e - c
123
+ value: a.signTop + g,
124
+ toOrigin: (e) => e - g
125
125
  },
126
126
  {
127
- value: i.signTop + c / 2,
128
- toOrigin: (e) => e - c / 2
127
+ value: a.signTop + g / 2,
128
+ toOrigin: (e) => e - g / 2
129
129
  }
130
- ], v(t, e, "y"), a), d = {
130
+ ], v(t, e, "y"), m), x = {
131
131
  ...e,
132
- signLeft: T(l?.origin ?? i.signLeft),
133
- signTop: T(u?.origin ?? i.signTop)
134
- }, f = [];
135
- return l && f.push({
132
+ signLeft: T(_?.origin ?? a.signLeft),
133
+ signTop: T(b?.origin ?? a.signTop)
134
+ }, C = [];
135
+ return _ && C.push({
136
136
  axis: "x",
137
- position: T(l.guide)
138
- }), u && f.push({
137
+ position: T(_.guide)
138
+ }), b && C.push({
139
139
  axis: "y",
140
- position: T(u.guide)
140
+ position: T(b.guide)
141
141
  }), {
142
- placement: d,
143
- guides: f
142
+ placement: x,
143
+ guides: C
144
144
  };
145
145
  }
146
146
  function v(e, t, n) {
@@ -260,7 +260,7 @@ var w = class extends Error {
260
260
  };
261
261
  function T(e) {
262
262
  return Array.isArray(e) ? e.map((e, t) => {
263
- let n = e && typeof e == "object" ? e : {}, r = String(n.fileId ?? "").trim(), i = E(n.source), a = i?.type === "template" ? D(i.template, i.values) : Array.isArray(n.pages) ? n.pages.map((e, t) => O(e, t)) : [];
263
+ let n = e && typeof e == "object" ? e : {}, r = String(n.fileId ?? "").trim(), i = E(n.source), a = i?.type === "template" ? D(i.template, i.values, n.pages) : Array.isArray(n.pages) ? n.pages.map((e, t) => O(e, t)) : [];
264
264
  return {
265
265
  fileId: r,
266
266
  fileName: String(n.fileName ?? `合同文件 ${t + 1}`),
@@ -278,18 +278,26 @@ function E(e) {
278
278
  ...t.values && typeof t.values == "object" && !Array.isArray(t.values) ? { values: { ...t.values } } : {}
279
279
  } : t.type === "preview" ? { type: "preview" } : void 0;
280
280
  }
281
- function D(e, t) {
282
- return s({
281
+ function D(e, t, n) {
282
+ let r = s({
283
283
  type: "template",
284
284
  template: e,
285
285
  ...t ? { values: t } : {}
286
- }).map((e) => ({
287
- pageIndex: e.pageIndex,
288
- displayPageNumber: e.pageIndex + 1,
289
- pageId: e.pageId,
290
- width: F(e.width, 0),
291
- height: F(e.height, 0)
292
- }));
286
+ }), i = Array.isArray(n) ? n : [];
287
+ return r.map((e) => {
288
+ let t = i.find((t) => I((t && typeof t == "object" ? t : {}).pageIndex, -1) === e.pageIndex), n = t && typeof t == "object" ? t : {}, r = F(e.displayWidth || e.width, 0), a = F(e.displayHeight || e.height, 0);
289
+ return {
290
+ pageIndex: e.pageIndex,
291
+ displayPageNumber: e.pageIndex + 1,
292
+ pageId: e.pageId,
293
+ width: F(n.width, r),
294
+ height: F(n.height, a),
295
+ displayWidth: r,
296
+ displayHeight: a,
297
+ ...n.previewUrl ? { previewUrl: String(n.previewUrl) } : {},
298
+ ...n.thumbnailUrl ? { thumbnailUrl: String(n.thumbnailUrl) } : {}
299
+ };
300
+ });
293
301
  }
294
302
  function O(e, t) {
295
303
  let n = e && typeof e == "object" ? e : {}, r = I(n.pageIndex, t);
@@ -298,6 +306,8 @@ function O(e, t) {
298
306
  displayPageNumber: L(n.displayPageNumber, r + 1),
299
307
  width: F(n.width, 0),
300
308
  height: F(n.height, 0),
309
+ ...F(n.displayWidth, 0) > 0 ? { displayWidth: F(n.displayWidth, 0) } : {},
310
+ ...F(n.displayHeight, 0) > 0 ? { displayHeight: F(n.displayHeight, 0) } : {},
301
311
  ...n.pageId ? { pageId: String(n.pageId) } : {},
302
312
  ...n.previewUrl ? { previewUrl: String(n.previewUrl) } : {},
303
313
  ...n.thumbnailUrl ? { thumbnailUrl: String(n.thumbnailUrl) } : {}
@@ -81,14 +81,17 @@ function c(e, t, n, r = 1) {
81
81
  end: Math.min(e.length - 1, s + c)
82
82
  };
83
83
  }
84
- function l(e, t, n, r, i = 0) {
85
- let a = s(e, r);
86
- if (!a) return;
87
- let o = d(t.find((e) => e.pageIndex === a.pageIndex)), c = f(i, 0);
84
+ function l(t, r, i, a, o = 0) {
85
+ let c = s(t, a);
86
+ if (!c) return;
87
+ let l = r.find((e) => e.pageIndex === c.pageIndex), u = e(l) && l ? {
88
+ width: l.width,
89
+ height: l.height
90
+ } : { ...n }, d = f(o, 0);
88
91
  return {
89
- pageIndex: a.pageIndex,
90
- x: m((n - a.left) * o.width / Math.max(1, a.width) - c),
91
- y: m((r - a.top) * o.height / Math.max(1, a.height) - c)
92
+ pageIndex: c.pageIndex,
93
+ x: m((i - c.left) * u.width / Math.max(1, c.width) - d),
94
+ y: m((a - c.top) * u.height / Math.max(1, c.height) - d)
92
95
  };
93
96
  }
94
97
  function u(e, t) {
@@ -96,8 +99,8 @@ function u(e, t) {
96
99
  }
97
100
  function d(t) {
98
101
  return e(t) && t ? {
99
- width: t.width,
100
- height: t.height
102
+ width: p(t.displayWidth, t.width),
103
+ height: p(t.displayHeight, t.height)
101
104
  } : { ...n };
102
105
  }
103
106
  function f(e, t) {
@@ -27,6 +27,8 @@ function a(n) {
27
27
  title: i.title,
28
28
  width: s.width,
29
29
  height: s.height,
30
+ displayWidth: s.width,
31
+ displayHeight: s.height,
30
32
  contentHtml: i.contentHtml,
31
33
  errors: o.filter((e) => !e.pageId || e.pageId === i.id).map((e) => e.message)
32
34
  }];
@@ -1,8 +1,8 @@
1
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
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, FullscreenExitOutlined as x, FullscreenOutlined as S, ReloadOutlined as C, ZoomInOutlined as w, ZoomOutOutlined as T } from "@ant-design/icons-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
4
  //#region src/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.vue?vue&type=script&setup=true&lang.ts
5
- var E = { class: "gd-contract-template-designer__workspace-meta" }, D = { class: "gd-contract-template-designer__workspace-actions" }, O = { class: "gd-contract-template-designer__workspace-controls" }, k = { class: "gd-contract-template-designer__zoom" }, A = { class: "gd-contract-template-designer__workspace-buttons" }, j = { class: "gd-contract-template-designer__page-decorations-trigger-copy" }, M = /* @__PURE__ */ o({
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
6
  __name: "ContractTemplateDesignerWorkspaceHeader",
7
7
  props: {
8
8
  summary: {},
@@ -16,11 +16,13 @@ var E = { class: "gd-contract-template-designer__workspace-meta" }, D = { class:
16
16
  zoomOutDisabled: { type: Boolean },
17
17
  zoomInDisabled: { type: Boolean },
18
18
  isFullscreen: { type: Boolean },
19
+ immersive: { type: Boolean },
19
20
  pageDecorationsOpen: { type: Boolean },
20
21
  pageDecorationsStudioId: {},
21
22
  pageDecorationsPresetLabel: {},
22
23
  pageDecorationsEnabledCount: {},
23
- pageDecorationsEnabledStates: {}
24
+ pageDecorationsEnabledStates: {},
25
+ chromeControlsId: {}
24
26
  },
25
27
  emits: [
26
28
  "zoomOut",
@@ -28,188 +30,224 @@ var E = { class: "gd-contract-template-designer__workspace-meta" }, D = { class:
28
30
  "fitWidth",
29
31
  "resetZoom",
30
32
  "toggleFullscreen",
33
+ "toggleImmersive",
31
34
  "clear",
32
35
  "validate",
33
36
  "preview",
34
37
  "submitData",
35
- "togglePageDecorations"
38
+ "togglePageDecorations",
39
+ "toggleChrome"
36
40
  ],
37
- setup(o, { expose: M, emit: N }) {
38
- let P = o, F = N, I = l(), L = e(() => [
41
+ setup(o, { expose: P, emit: F }) {
42
+ let I = o, L = F, R = l(), z = e(() => [
39
43
  {
40
44
  key: "header",
41
45
  label: "页眉",
42
- enabled: P.pageDecorationsEnabledStates.header
46
+ enabled: I.pageDecorationsEnabledStates.header
43
47
  },
44
48
  {
45
49
  key: "footer",
46
50
  label: "页脚",
47
- enabled: P.pageDecorationsEnabledStates.footer
51
+ enabled: I.pageDecorationsEnabledStates.footer
48
52
  },
49
53
  {
50
54
  key: "watermark",
51
55
  label: "水印",
52
- enabled: P.pageDecorationsEnabledStates.watermark
56
+ enabled: I.pageDecorationsEnabledStates.watermark
53
57
  }
54
- ]), R = e(() => `页面装饰 · ${P.pageDecorationsPresetLabel} · 启用 ${P.pageDecorationsEnabledCount}/3`), z = e(() => `页面装饰,${P.pageDecorationsPresetLabel},已启用 ${P.pageDecorationsEnabledCount}/3;${L.value.map((e) => `${e.label}${e.enabled ? "已启用" : "未启用"}`).join(",")}`);
55
- return M({ focusPageDecorations: () => I.value?.querySelector(".gd-contract-template-designer__page-decorations-trigger")?.focus() }), (e, l) => (c(), r("header", {
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", {
56
64
  ref_key: "workspaceHeader",
57
- ref: I,
65
+ ref: R,
58
66
  class: "gd-contract-template-designer__workspace-header"
59
- }, [i("div", E, [i("strong", null, u(o.summary), 1), o.showDraftCacheStatus && o.draftCacheStatusText ? (c(), r("small", {
67
+ }, [i("div", O, [i("strong", null, u(o.summary), 1), o.showDraftCacheStatus && o.draftCacheStatusText ? (c(), r("small", {
60
68
  key: 0,
61
69
  class: s(["gd-contract-template-designer__draft-cache-status", o.draftCacheStatusClass])
62
- }, u(o.draftCacheStatusText), 3)) : n("", !0)]), i("div", D, [i("div", O, [i("div", k, [
63
- a(d(m), { title: "缩小" }, {
64
- default: f(() => [a(d(p), {
65
- size: "small",
66
- class: "gd-contract-template-designer__icon-button",
67
- disabled: o.zoomOutDisabled,
68
- "aria-label": "缩小",
69
- onClick: l[0] ||= (e) => F("zoomOut")
70
- }, {
71
- default: f(() => [a(d(T), { "aria-hidden": "true" })]),
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"])]),
72
83
  _: 1
73
- }, 8, ["disabled"])]),
74
- _: 1
75
- }),
76
- i("span", null, u(o.zoomPercent), 1),
77
- a(d(m), { title: "放大" }, {
78
- default: f(() => [a(d(p), {
79
- size: "small",
80
- class: "gd-contract-template-designer__icon-button",
81
- disabled: o.zoomInDisabled,
82
- "aria-label": "放大",
83
- onClick: l[1] ||= (e) => F("zoomIn")
84
- }, {
85
- default: f(() => [a(d(w), { "aria-hidden": "true" })]),
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"])]),
86
97
  _: 1
87
- }, 8, ["disabled"])]),
88
- _: 1
89
- }),
90
- a(d(m), { title: "适应宽度" }, {
91
- default: f(() => [a(d(p), {
92
- size: "small",
93
- class: "gd-contract-template-designer__icon-button",
94
- "aria-label": "适应宽度",
95
- onClick: l[2] ||= (e) => F("fitWidth")
96
- }, {
97
- default: f(() => [a(d(_), { "aria-hidden": "true" })]),
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
+ })]),
98
109
  _: 1
99
- })]),
100
- _: 1
101
- }),
102
- a(d(m), { title: "重置缩放" }, {
103
- default: f(() => [a(d(p), {
104
- size: "small",
105
- class: "gd-contract-template-designer__icon-button",
106
- "aria-label": "重置缩放",
107
- onClick: l[3] ||= (e) => F("resetZoom")
108
- }, {
109
- default: f(() => [a(d(C), { "aria-hidden": "true" })]),
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
+ })]),
110
121
  _: 1
111
- })]),
112
- _: 1
113
- }),
114
- a(d(m), { title: o.isFullscreen ? "退出全屏" : "全屏显示" }, {
115
- default: f(() => [a(d(p), {
116
- size: "small",
117
- class: "gd-contract-template-designer__icon-button",
118
- "aria-label": o.isFullscreen ? "退出全屏" : "全屏显示",
119
- onClick: l[4] ||= (e) => F("toggleFullscreen")
120
- }, {
121
- default: f(() => [o.isFullscreen ? (c(), t(d(x), {
122
- key: 0,
123
- "aria-hidden": "true"
124
- })) : (c(), t(d(S), {
125
- key: 1,
126
- "aria-hidden": "true"
127
- }))]),
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"])]),
128
139
  _: 1
129
- }, 8, ["aria-label"])]),
130
- _: 1
131
- }, 8, ["title"])
132
- ])]), i("div", A, [
133
- o.showClearButton ? (c(), t(d(m), {
134
- key: 0,
135
- title: "清空合同"
136
- }, {
137
- default: f(() => [a(d(p), {
138
- size: "small",
139
- danger: "",
140
- class: "gd-contract-template-designer__icon-button",
141
- disabled: o.readonly,
142
- "aria-label": "清空合同",
143
- onClick: l[5] ||= (e) => F("clear")
144
- }, {
145
- default: f(() => [a(d(y), { "aria-hidden": "true" })]),
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"])]),
146
152
  _: 1
147
- }, 8, ["disabled"])]),
148
- _: 1
149
- })) : n("", !0),
150
- a(d(m), { title: R.value }, {
151
- default: f(() => [a(d(p), {
152
- size: "small",
153
- class: s(["gd-contract-template-designer__page-decorations-trigger", { "is-selected": o.pageDecorationsOpen }]),
154
- "aria-pressed": o.pageDecorationsOpen,
155
- "aria-expanded": o.pageDecorationsOpen,
156
- "aria-controls": o.pageDecorationsStudioId,
157
- "aria-label": z.value,
158
- onClick: l[6] ||= (e) => F("togglePageDecorations")
153
+ })
154
+ ])]),
155
+ i("div", M, [
156
+ o.showClearButton ? (c(), t(d(m), {
157
+ key: 0,
158
+ title: "清空合同"
159
159
  }, {
160
- default: f(() => [a(d(g), { "aria-hidden": "true" }), i("span", j, [l[10] ||= i("span", null, "页面装饰", -1), i("small", null, u(o.pageDecorationsPresetLabel) + " · 启用 " + u(o.pageDecorationsEnabledCount) + "/3", 1)])]),
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"])]),
161
171
  _: 1
162
- }, 8, [
163
- "class",
164
- "aria-pressed",
165
- "aria-expanded",
166
- "aria-controls",
167
- "aria-label"
168
- ])]),
169
- _: 1
170
- }, 8, ["title"]),
171
- a(d(m), { title: "校验" }, {
172
- default: f(() => [a(d(p), {
173
- size: "small",
174
- class: "gd-contract-template-designer__icon-button",
175
- "aria-label": "校验",
176
- onClick: l[7] ||= (e) => F("validate")
177
- }, {
178
- default: f(() => [a(d(h), { "aria-hidden": "true" })]),
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
+ ])]),
179
192
  _: 1
180
- })]),
181
- _: 1
182
- }),
183
- a(d(m), { title: "预览" }, {
184
- default: f(() => [a(d(p), {
185
- size: "small",
186
- type: "primary",
187
- class: "gd-contract-template-designer__icon-button",
188
- "aria-label": "预览",
189
- onClick: l[8] ||= (e) => F("preview")
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: "数据查看"
190
222
  }, {
191
- default: f(() => [a(d(b), { "aria-hidden": "true" })]),
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
+ })]),
192
232
  _: 1
193
- })]),
194
- _: 1
195
- }),
196
- o.showSubmitDataViewer ? (c(), t(d(m), {
197
- key: 1,
198
- title: "数据查看"
199
- }, {
233
+ })) : n("", !0)
234
+ ]),
235
+ a(d(m), { title: "收起工具区" }, {
200
236
  default: f(() => [a(d(p), {
201
237
  size: "small",
202
- class: "gd-contract-template-designer__icon-button",
203
- "aria-label": "数据查看",
204
- onClick: l[9] ||= (e) => F("submitData")
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")
205
243
  }, {
206
- default: f(() => [a(d(v), { "aria-hidden": "true" })]),
244
+ default: f(() => [a(d(T), { "aria-hidden": "true" })]),
207
245
  _: 1
208
- })]),
246
+ }, 8, ["aria-controls"])]),
209
247
  _: 1
210
- })) : n("", !0)
211
- ])])], 512));
248
+ })
249
+ ])], 512));
212
250
  }
213
251
  });
214
252
  //#endregion
215
- export { M as default };
253
+ export { P as default };
@@ -0,0 +1,5 @@
1
+ import e from "./ContractTemplateTextBubbleMenu.vue.mjs";
2
+ //#region src/components/pro-contract-template-designer/src/ContractTemplateTextBubbleMenu.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };