@guodun/antdv 1.4.0 → 1.4.2

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 (128) hide show
  1. package/dist/es/components/contract-signing-location/src/ContractSigningLocation.vue.mjs +8 -1
  2. package/dist/es/components/contract-signing-location/src/ContractSigningLocationInspector.vue.mjs +3 -2
  3. package/dist/es/components/pro-contract-signing-flow/src/ContractSigningFlowInspector.vue.mjs +4 -1
  4. package/dist/es/components/pro-contract-signing-flow/src/ProContractSigningFlow.vue.mjs +67 -66
  5. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerInspector.vue.mjs +208 -180
  6. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerSidebar.vue.mjs +2 -1
  7. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerToolbar.mjs +5 -0
  8. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerToolbar.vue.mjs +690 -0
  9. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.mjs +5 -0
  10. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.vue.mjs +215 -0
  11. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateImageContextMenu.mjs +5 -0
  12. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateImageContextMenu.vue.mjs +87 -0
  13. package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePageDecorations.mjs +5 -0
  14. package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePageDecorations.vue.mjs +98 -0
  15. package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsInspector.mjs +5 -0
  16. package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsInspector.vue.mjs +550 -0
  17. package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsStudio.mjs +5 -0
  18. package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsStudio.vue.mjs +117 -0
  19. package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePreviewModal.mjs +5 -0
  20. package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePreviewModal.vue.mjs +96 -0
  21. package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue.mjs +51 -26
  22. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateRendererPage.vue.mjs +56 -33
  23. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateSubmitDataModal.mjs +5 -0
  24. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateSubmitDataModal.vue.mjs +29 -0
  25. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateTextContextMenu.mjs +5 -0
  26. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateTextContextMenu.vue.mjs +390 -0
  27. package/dist/es/components/pro-contract-template-designer/src/DesignerPage.vue.mjs +313 -267
  28. package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.mjs +1278 -2293
  29. package/dist/es/components/pro-contract-template-designer/src/composables/use-auto-pagination.mjs +71 -0
  30. package/dist/es/components/pro-contract-template-designer/src/composables/use-designer-files.mjs +11 -0
  31. package/dist/es/components/pro-contract-template-designer/src/composables/use-draft-cache-session.mjs +111 -0
  32. package/dist/es/components/pro-contract-template-designer/src/composables/use-signing-placement-editor.mjs +79 -0
  33. package/dist/es/components/pro-contract-template-designer/src/composables/use-template-designer.mjs +189 -160
  34. package/dist/es/components/pro-contract-template-designer/src/composables/use-template-files.mjs +35 -22
  35. package/dist/es/components/pro-contract-template-designer/src/composables/use-toolbar-overflow.mjs +71 -0
  36. package/dist/es/components/pro-contract-template-designer/src/constants.mjs +71 -10
  37. package/dist/es/components/pro-contract-template-designer/src/extensions/editor-extensions.mjs +1 -0
  38. package/dist/es/components/pro-contract-template-designer/src/utils/block-style.mjs +43 -0
  39. package/dist/es/components/pro-contract-template-designer/src/utils/context-menu-viewport.mjs +13 -0
  40. package/dist/es/components/pro-contract-template-designer/src/utils/editor-state.mjs +7 -0
  41. package/dist/es/components/pro-contract-template-designer/src/utils/page-decorations.mjs +398 -0
  42. package/dist/es/components/pro-contract-template-designer/src/utils/serialize-fingerprint.mjs +6 -0
  43. package/dist/es/components/pro-contract-template-designer/src/utils/template-renderer.mjs +88 -72
  44. package/dist/es/components/pro-contract-template-designer/style/index.css +1 -1
  45. package/dist/es/index.mjs +20 -20
  46. package/dist/lib/components/contract-signing-location/src/ContractSigningLocation.vue.cjs +1 -1
  47. package/dist/lib/components/contract-signing-location/src/ContractSigningLocationInspector.vue.cjs +1 -1
  48. package/dist/lib/components/pro-contract-signing-flow/src/ContractSigningFlowInspector.vue.cjs +1 -1
  49. package/dist/lib/components/pro-contract-signing-flow/src/ProContractSigningFlow.vue.cjs +1 -1
  50. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerInspector.vue.cjs +1 -1
  51. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerSidebar.vue.cjs +1 -1
  52. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerToolbar.cjs +1 -0
  53. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerToolbar.vue.cjs +1 -0
  54. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.cjs +1 -0
  55. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.vue.cjs +1 -0
  56. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateImageContextMenu.cjs +1 -0
  57. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateImageContextMenu.vue.cjs +1 -0
  58. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePageDecorations.cjs +1 -0
  59. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePageDecorations.vue.cjs +1 -0
  60. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsInspector.cjs +1 -0
  61. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsInspector.vue.cjs +1 -0
  62. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsStudio.cjs +1 -0
  63. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsStudio.vue.cjs +1 -0
  64. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePreviewModal.cjs +1 -0
  65. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePreviewModal.vue.cjs +1 -0
  66. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue.cjs +1 -1
  67. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateRendererPage.vue.cjs +1 -1
  68. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateSubmitDataModal.cjs +1 -0
  69. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateSubmitDataModal.vue.cjs +1 -0
  70. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateTextContextMenu.cjs +1 -0
  71. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateTextContextMenu.vue.cjs +1 -0
  72. package/dist/lib/components/pro-contract-template-designer/src/DesignerPage.vue.cjs +2 -2
  73. package/dist/lib/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.cjs +1 -1
  74. package/dist/lib/components/pro-contract-template-designer/src/composables/use-auto-pagination.cjs +1 -0
  75. package/dist/lib/components/pro-contract-template-designer/src/composables/use-designer-files.cjs +1 -0
  76. package/dist/lib/components/pro-contract-template-designer/src/composables/use-draft-cache-session.cjs +1 -0
  77. package/dist/lib/components/pro-contract-template-designer/src/composables/use-signing-placement-editor.cjs +1 -0
  78. package/dist/lib/components/pro-contract-template-designer/src/composables/use-template-designer.cjs +4 -4
  79. package/dist/lib/components/pro-contract-template-designer/src/composables/use-template-files.cjs +2 -2
  80. package/dist/lib/components/pro-contract-template-designer/src/composables/use-toolbar-overflow.cjs +1 -0
  81. package/dist/lib/components/pro-contract-template-designer/src/constants.cjs +1 -1
  82. package/dist/lib/components/pro-contract-template-designer/src/extensions/editor-extensions.cjs +1 -1
  83. package/dist/lib/components/pro-contract-template-designer/src/utils/block-style.cjs +1 -0
  84. package/dist/lib/components/pro-contract-template-designer/src/utils/context-menu-viewport.cjs +1 -0
  85. package/dist/lib/components/pro-contract-template-designer/src/utils/editor-state.cjs +1 -0
  86. package/dist/lib/components/pro-contract-template-designer/src/utils/page-decorations.cjs +1 -0
  87. package/dist/lib/components/pro-contract-template-designer/src/utils/serialize-fingerprint.cjs +1 -0
  88. package/dist/lib/components/pro-contract-template-designer/src/utils/template-renderer.cjs +3 -3
  89. package/dist/lib/components/pro-contract-template-designer/style/index.css +1 -1
  90. package/dist/lib/index.cjs +1 -1
  91. package/dist/theme/icon.css +1 -1
  92. package/dist/theme/index.css +1 -1
  93. package/dist/types/components/contract-signing-location/src/ContractSigningLocation.vue.d.ts +1 -0
  94. package/dist/types/components/contract-signing-location/src/ContractSigningLocationInspector.vue.d.ts +1 -0
  95. package/dist/types/components/contract-signing-location/src/types.d.ts +2 -0
  96. package/dist/types/components/pro-contract-signing-flow/src/types.d.ts +2 -0
  97. package/dist/types/components/pro-contract-template-designer/src/ContractTemplateDesignerInspector.vue.d.ts +3 -0
  98. package/dist/types/components/pro-contract-template-designer/src/ContractTemplateDesignerSidebar.vue.d.ts +1 -0
  99. package/dist/types/components/pro-contract-template-designer/src/ContractTemplateDesignerToolbar.vue.d.ts +104 -0
  100. package/dist/types/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.vue.d.ts +50 -0
  101. package/dist/types/components/pro-contract-template-designer/src/ContractTemplateImageContextMenu.vue.d.ts +27 -0
  102. package/dist/types/components/pro-contract-template-designer/src/ContractTemplatePageDecorations.vue.d.ts +13 -0
  103. package/dist/types/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsInspector.vue.d.ts +28 -0
  104. package/dist/types/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsStudio.vue.d.ts +77 -0
  105. package/dist/types/components/pro-contract-template-designer/src/ContractTemplatePreviewModal.vue.d.ts +36 -0
  106. package/dist/types/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue.d.ts +5 -1
  107. package/dist/types/components/pro-contract-template-designer/src/ContractTemplateRendererHeader.vue.d.ts +4 -4
  108. package/dist/types/components/pro-contract-template-designer/src/ContractTemplateRendererToolbar.vue.d.ts +4 -4
  109. package/dist/types/components/pro-contract-template-designer/src/ContractTemplateSubmitDataModal.vue.d.ts +12 -0
  110. package/dist/types/components/pro-contract-template-designer/src/ContractTemplateTextContextMenu.vue.d.ts +77 -0
  111. package/dist/types/components/pro-contract-template-designer/src/DesignerPage.vue.d.ts +8 -32
  112. package/dist/types/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.d.ts +366 -12
  113. package/dist/types/components/pro-contract-template-designer/src/composables/use-auto-pagination.d.ts +43 -0
  114. package/dist/types/components/pro-contract-template-designer/src/composables/use-designer-files.d.ts +22 -0
  115. package/dist/types/components/pro-contract-template-designer/src/composables/use-draft-cache-session.d.ts +41 -0
  116. package/dist/types/components/pro-contract-template-designer/src/composables/use-signing-placement-editor.d.ts +49 -0
  117. package/dist/types/components/pro-contract-template-designer/src/composables/use-template-designer.d.ts +15 -1
  118. package/dist/types/components/pro-contract-template-designer/src/composables/use-template-files.d.ts +13 -0
  119. package/dist/types/components/pro-contract-template-designer/src/composables/use-toolbar-overflow.d.ts +19 -0
  120. package/dist/types/components/pro-contract-template-designer/src/constants.d.ts +7 -1
  121. package/dist/types/components/pro-contract-template-designer/src/types.d.ts +89 -0
  122. package/dist/types/components/pro-contract-template-designer/src/utils/block-style.d.ts +4 -0
  123. package/dist/types/components/pro-contract-template-designer/src/utils/context-menu-viewport.d.ts +22 -0
  124. package/dist/types/components/pro-contract-template-designer/src/utils/editor-state.d.ts +8 -0
  125. package/dist/types/components/pro-contract-template-designer/src/utils/page-decorations.d.ts +90 -0
  126. package/dist/types/components/pro-contract-template-designer/src/utils/serialize-fingerprint.d.ts +8 -0
  127. package/dist/types/components/pro-contract-template-designer/src/utils/template-renderer.d.ts +4 -1
  128. package/package.json +3 -3
@@ -0,0 +1,390 @@
1
+ import { Fragment as e, createBlock as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createVNode as a, defineComponent as o, mergeModels as s, normalizeClass as c, normalizeStyle as l, openBlock as u, ref as d, renderList as f, resolveDynamicComponent as p, toDisplayString as m, unref as h, useModel as g, withCtx as _ } from "vue";
2
+ import { Button as v, Input as ee, Select as y, Tooltip as b } from "ant-design-vue";
3
+ import { BoldOutlined as te, ClearOutlined as ne, CopyOutlined as x, DownOutlined as S, FileAddOutlined as C, FormatPainterOutlined as w, ItalicOutlined as T, MinusOutlined as E, OrderedListOutlined as D, PictureOutlined as O, RedoOutlined as k, ScissorOutlined as A, TableOutlined as j, UnderlineOutlined as M, UndoOutlined as N, UnorderedListOutlined as P } from "@ant-design/icons-vue";
4
+ //#region src/components/pro-contract-template-designer/src/ContractTemplateTextContextMenu.vue?vue&type=script&setup=true&lang.ts
5
+ var F = {
6
+ class: "gd-contract-template-designer__text-menu-row",
7
+ role: "group",
8
+ "aria-label": "编辑历史与剪贴板"
9
+ }, I = {
10
+ key: 0,
11
+ class: "gd-contract-template-designer__text-menu-quick-insert",
12
+ role: "group",
13
+ "aria-label": "光标处插入"
14
+ }, L = {
15
+ class: "gd-contract-template-designer__text-menu-row gd-contract-template-designer__text-menu-row--controls",
16
+ role: "group",
17
+ "aria-label": "文字样式"
18
+ }, re = ["value"], R = ["aria-label"], z = { class: "gd-contract-template-designer__text-menu-control-head" }, B = { class: "gd-contract-template-designer__text-menu-control-options" }, V = ["aria-label", "onClick"], H = ["disabled"], U = {
19
+ class: "gd-contract-template-designer__text-menu-bind-list",
20
+ role: "listbox",
21
+ "aria-label": "已有正文控件"
22
+ }, W = ["onClick"], G = { class: "gd-contract-template-designer__text-menu-bind-item-label" }, K = { class: "gd-contract-template-designer__text-menu-bind-item-meta" }, q = {
23
+ key: 0,
24
+ class: "gd-contract-template-designer__text-menu-bind-empty"
25
+ }, J = {
26
+ class: "gd-contract-template-designer__text-menu-row",
27
+ role: "group",
28
+ "aria-label": "常用格式与列表"
29
+ }, Y = {
30
+ class: "gd-contract-template-designer__text-menu-row gd-contract-template-designer__text-menu-row--cleanup",
31
+ role: "group",
32
+ "aria-label": "清理格式"
33
+ }, X = /* @__PURE__ */ o({
34
+ name: "ContractTemplateTextContextMenu",
35
+ __name: "ContractTemplateTextContextMenu",
36
+ props: /* @__PURE__ */ s({
37
+ x: {},
38
+ y: {},
39
+ hasSelection: { type: Boolean },
40
+ editorState: {},
41
+ fontSizePresetOptions: {},
42
+ currentEditorFontSize: {},
43
+ editorFontSizeSearchValue: {},
44
+ textAlignOptions: {},
45
+ currentEditorTextColor: {},
46
+ bodyControlToolItems: {},
47
+ textMenuBindableVariables: {},
48
+ pageLimitReached: { type: Boolean },
49
+ tableInsertDraft: {},
50
+ variablesCount: {},
51
+ resolveBindVariableTypeLabel: { type: Function }
52
+ }, {
53
+ bindOpen: {
54
+ type: Boolean,
55
+ default: !1
56
+ },
57
+ bindOpenModifiers: {},
58
+ bindKeyword: { default: "" },
59
+ bindKeywordModifiers: {}
60
+ }),
61
+ emits: /* @__PURE__ */ s([
62
+ "command",
63
+ "clipboard",
64
+ "open-image",
65
+ "add-page",
66
+ "insert-variable",
67
+ "bind-variable",
68
+ "open-bind-panel",
69
+ "keydown",
70
+ "patch-font-size",
71
+ "patch-text-align",
72
+ "patch-color",
73
+ "font-size-search",
74
+ "font-size-commit",
75
+ "font-size-dropdown-change",
76
+ "font-size-keydown"
77
+ ], ["update:bindOpen", "update:bindKeyword"]),
78
+ setup(o, { expose: s, emit: X }) {
79
+ let ie = g(o, "bindOpen"), Z = g(o, "bindKeyword"), Q = X, $ = d();
80
+ return s({
81
+ getMenuElement: () => $.value,
82
+ focusBindSearch: () => {
83
+ $.value?.querySelector(".gd-contract-template-designer__text-menu-bind-search input")?.focus();
84
+ },
85
+ focusFirstButton: () => {
86
+ $.value?.querySelector("button:not(:disabled)")?.focus();
87
+ }
88
+ }), (s, d) => (u(), r("div", {
89
+ ref_key: "menuElement",
90
+ ref: $,
91
+ class: "gd-contract-template-designer__context-menu gd-contract-template-designer__text-context-menu",
92
+ style: l({
93
+ left: `${o.x}px`,
94
+ top: `${o.y}px`
95
+ }),
96
+ role: "toolbar",
97
+ "aria-label": "正文快捷操作",
98
+ onKeydown: d[26] ||= (e) => Q("keydown", e)
99
+ }, [
100
+ i("div", F, [
101
+ a(h(b), { title: "撤销" }, {
102
+ default: _(() => [a(h(v), {
103
+ size: "small",
104
+ class: "gd-contract-template-designer__text-menu-icon-button",
105
+ disabled: !o.editorState.canUndo,
106
+ "aria-label": "撤销",
107
+ onClick: d[0] ||= (e) => Q("command", { type: "undo" })
108
+ }, {
109
+ default: _(() => [a(h(N), { "aria-hidden": "true" })]),
110
+ _: 1
111
+ }, 8, ["disabled"])]),
112
+ _: 1
113
+ }),
114
+ a(h(b), { title: "重做" }, {
115
+ default: _(() => [a(h(v), {
116
+ size: "small",
117
+ class: "gd-contract-template-designer__text-menu-icon-button",
118
+ disabled: !o.editorState.canRedo,
119
+ "aria-label": "重做",
120
+ onClick: d[1] ||= (e) => Q("command", { type: "redo" })
121
+ }, {
122
+ default: _(() => [a(h(k), { "aria-hidden": "true" })]),
123
+ _: 1
124
+ }, 8, ["disabled"])]),
125
+ _: 1
126
+ }),
127
+ d[27] ||= i("span", {
128
+ class: "gd-contract-template-designer__text-menu-divider",
129
+ "aria-hidden": "true"
130
+ }, null, -1),
131
+ o.hasSelection ? (u(), t(h(b), {
132
+ key: 0,
133
+ title: "复制"
134
+ }, {
135
+ default: _(() => [a(h(v), {
136
+ size: "small",
137
+ class: "gd-contract-template-designer__text-menu-icon-button",
138
+ "aria-label": "复制",
139
+ onClick: d[2] ||= (e) => Q("clipboard", "copy")
140
+ }, {
141
+ default: _(() => [a(h(x), { "aria-hidden": "true" })]),
142
+ _: 1
143
+ })]),
144
+ _: 1
145
+ })) : n("", !0),
146
+ o.hasSelection ? (u(), t(h(b), {
147
+ key: 1,
148
+ title: "剪切"
149
+ }, {
150
+ default: _(() => [a(h(v), {
151
+ size: "small",
152
+ class: "gd-contract-template-designer__text-menu-icon-button",
153
+ "aria-label": "剪切",
154
+ onClick: d[3] ||= (e) => Q("clipboard", "cut")
155
+ }, {
156
+ default: _(() => [a(h(A), { "aria-hidden": "true" })]),
157
+ _: 1
158
+ })]),
159
+ _: 1
160
+ })) : n("", !0),
161
+ a(h(b), { title: "粘贴" }, {
162
+ default: _(() => [a(h(v), {
163
+ size: "small",
164
+ class: "gd-contract-template-designer__text-menu-icon-button",
165
+ "aria-label": "粘贴",
166
+ onClick: d[4] ||= (e) => Q("clipboard", "paste")
167
+ }, {
168
+ default: _(() => [a(h(x), { "aria-hidden": "true" })]),
169
+ _: 1
170
+ })]),
171
+ _: 1
172
+ })
173
+ ]),
174
+ o.hasSelection ? n("", !0) : (u(), r("div", I, [
175
+ a(h(v), {
176
+ size: "small",
177
+ onClick: d[5] ||= (e) => Q("open-image")
178
+ }, {
179
+ default: _(() => [a(h(O), { "aria-hidden": "true" }), d[28] ||= i("span", null, "图片", -1)]),
180
+ _: 1
181
+ }),
182
+ a(h(v), {
183
+ size: "small",
184
+ onClick: d[6] ||= (e) => Q("command", {
185
+ type: "insert-table",
186
+ options: o.tableInsertDraft
187
+ })
188
+ }, {
189
+ default: _(() => [a(h(j), { "aria-hidden": "true" }), d[29] ||= i("span", null, "表格", -1)]),
190
+ _: 1
191
+ }),
192
+ a(h(v), {
193
+ size: "small",
194
+ onClick: d[7] ||= (e) => Q("command", { type: "insert-horizontal-rule" })
195
+ }, {
196
+ default: _(() => [a(h(E), { "aria-hidden": "true" }), d[30] ||= i("span", null, "分隔线", -1)]),
197
+ _: 1
198
+ }),
199
+ a(h(v), {
200
+ size: "small",
201
+ disabled: o.pageLimitReached,
202
+ onClick: d[8] ||= (e) => Q("add-page")
203
+ }, {
204
+ default: _(() => [a(h(C), { "aria-hidden": "true" }), d[31] ||= i("span", null, "新页面", -1)]),
205
+ _: 1
206
+ }, 8, ["disabled"]),
207
+ a(h(v), {
208
+ size: "small",
209
+ onClick: d[9] ||= (e) => Q("command", { type: "select-all" })
210
+ }, {
211
+ default: _(() => [...d[32] ||= [i("span", null, "全选正文", -1)]]),
212
+ _: 1
213
+ })
214
+ ])),
215
+ i("div", L, [
216
+ a(h(y), {
217
+ class: "gd-contract-template-designer__context-menu-field gd-contract-template-designer__text-menu-font-size",
218
+ value: o.currentEditorFontSize,
219
+ options: o.fontSizePresetOptions,
220
+ "show-search": "",
221
+ "filter-option": !1,
222
+ "search-value": o.editorFontSizeSearchValue,
223
+ onBlur: d[10] ||= (e) => Q("font-size-commit"),
224
+ onChange: d[11] ||= (e) => Q("patch-font-size", e),
225
+ onDropdownVisibleChange: d[12] ||= (e) => Q("font-size-dropdown-change", e),
226
+ onInputKeyDown: d[13] ||= (e) => Q("font-size-keydown", e),
227
+ onSearch: d[14] ||= (e) => Q("font-size-search", e)
228
+ }, null, 8, [
229
+ "value",
230
+ "options",
231
+ "search-value"
232
+ ]),
233
+ a(h(y), {
234
+ class: "gd-contract-template-designer__context-menu-field gd-contract-template-designer__text-menu-alignment",
235
+ value: o.editorState.textAlign,
236
+ options: o.textAlignOptions,
237
+ onChange: d[15] ||= (e) => Q("patch-text-align", e)
238
+ }, null, 8, ["value", "options"]),
239
+ a(h(b), { title: "文字颜色" }, {
240
+ default: _(() => [i("input", {
241
+ class: "gd-contract-template-designer__context-menu-color",
242
+ type: "color",
243
+ "aria-label": "文字颜色",
244
+ value: o.currentEditorTextColor,
245
+ onInput: d[16] ||= (e) => Q("patch-color", e.target.value)
246
+ }, null, 40, re)]),
247
+ _: 1
248
+ })
249
+ ]),
250
+ i("div", {
251
+ class: "gd-contract-template-designer__text-menu-control-group",
252
+ role: "group",
253
+ "aria-label": o.hasSelection ? "转换为正文控件" : "插入正文控件"
254
+ }, [
255
+ i("div", z, [i("strong", null, m(o.hasSelection ? "转换为正文控件" : "插入正文控件"), 1), i("span", null, m(o.hasSelection ? "替换选中内容" : "在光标处插入"), 1)]),
256
+ i("div", B, [(u(!0), r(e, null, f(o.bodyControlToolItems, (e) => (u(), t(h(b), {
257
+ key: e.type,
258
+ title: o.hasSelection ? `转换为${e.label}控件` : `插入${e.label}控件`
259
+ }, {
260
+ default: _(() => [i("button", {
261
+ type: "button",
262
+ class: "gd-contract-template-designer__text-menu-control-option",
263
+ "aria-label": o.hasSelection ? `转换为${e.label}控件` : `插入${e.label}控件`,
264
+ onClick: (t) => Q("insert-variable", e.type)
265
+ }, [(u(), t(p(e.icon), { "aria-hidden": "true" })), i("span", null, m(e.label), 1)], 8, V)]),
266
+ _: 2
267
+ }, 1032, ["title"]))), 128))]),
268
+ ie.value ? (u(), r(e, { key: 1 }, [a(h(ee), {
269
+ value: Z.value,
270
+ "onUpdate:value": d[18] ||= (e) => Z.value = e,
271
+ class: "gd-contract-template-designer__text-menu-bind-search",
272
+ size: "small",
273
+ "allow-clear": "",
274
+ placeholder: "搜索已有控件",
275
+ "aria-label": "搜索已有控件"
276
+ }, null, 8, ["value"]), i("div", U, [(u(!0), r(e, null, f(o.textMenuBindableVariables, (e) => (u(), r("button", {
277
+ key: e.id,
278
+ type: "button",
279
+ class: "gd-contract-template-designer__text-menu-bind-item",
280
+ role: "option",
281
+ onClick: (t) => Q("bind-variable", e)
282
+ }, [i("span", G, m(e.label), 1), i("span", K, m(o.resolveBindVariableTypeLabel(e)) + " · " + m(e.key), 1)], 8, W))), 128)), o.textMenuBindableVariables.length ? n("", !0) : (u(), r("p", q, " 暂无已有控件 "))])], 64)) : (u(), r("button", {
283
+ key: 0,
284
+ type: "button",
285
+ class: "gd-contract-template-designer__text-menu-bind-toggle",
286
+ disabled: !o.variablesCount,
287
+ "aria-expanded": !1,
288
+ "aria-label": "绑定已有控件",
289
+ onClick: d[17] ||= (e) => Q("open-bind-panel")
290
+ }, [d[33] ||= i("span", null, "绑定已有", -1), a(h(S), { "aria-hidden": "true" })], 8, H))
291
+ ], 8, R),
292
+ i("div", J, [
293
+ a(h(b), { title: "加粗" }, {
294
+ default: _(() => [a(h(v), {
295
+ size: "small",
296
+ class: c(["gd-contract-template-designer__text-menu-icon-button", { "is-selected": o.editorState.isBold }]),
297
+ "aria-pressed": o.editorState.isBold,
298
+ "aria-label": "加粗",
299
+ onClick: d[19] ||= (e) => Q("command", { type: "toggle-bold" })
300
+ }, {
301
+ default: _(() => [a(h(te), { "aria-hidden": "true" })]),
302
+ _: 1
303
+ }, 8, ["class", "aria-pressed"])]),
304
+ _: 1
305
+ }),
306
+ a(h(b), { title: "斜体" }, {
307
+ default: _(() => [a(h(v), {
308
+ size: "small",
309
+ class: c(["gd-contract-template-designer__text-menu-icon-button", { "is-selected": o.editorState.isItalic }]),
310
+ "aria-pressed": o.editorState.isItalic,
311
+ "aria-label": "斜体",
312
+ onClick: d[20] ||= (e) => Q("command", { type: "toggle-italic" })
313
+ }, {
314
+ default: _(() => [a(h(T), { "aria-hidden": "true" })]),
315
+ _: 1
316
+ }, 8, ["class", "aria-pressed"])]),
317
+ _: 1
318
+ }),
319
+ a(h(b), { title: "下划线" }, {
320
+ default: _(() => [a(h(v), {
321
+ size: "small",
322
+ class: c(["gd-contract-template-designer__text-menu-icon-button", { "is-selected": o.editorState.isUnderline }]),
323
+ "aria-pressed": o.editorState.isUnderline,
324
+ "aria-label": "下划线",
325
+ onClick: d[21] ||= (e) => Q("command", { type: "toggle-underline" })
326
+ }, {
327
+ default: _(() => [a(h(M), { "aria-hidden": "true" })]),
328
+ _: 1
329
+ }, 8, ["class", "aria-pressed"])]),
330
+ _: 1
331
+ }),
332
+ d[34] ||= i("span", {
333
+ class: "gd-contract-template-designer__text-menu-divider",
334
+ "aria-hidden": "true"
335
+ }, null, -1),
336
+ a(h(b), { title: "有序列表" }, {
337
+ default: _(() => [a(h(v), {
338
+ size: "small",
339
+ class: c(["gd-contract-template-designer__text-menu-icon-button", { "is-selected": o.editorState.isOrderedList }]),
340
+ "aria-pressed": o.editorState.isOrderedList,
341
+ "aria-label": "有序列表",
342
+ onClick: d[22] ||= (e) => Q("command", { type: "toggle-ordered-list" })
343
+ }, {
344
+ default: _(() => [a(h(D), { "aria-hidden": "true" })]),
345
+ _: 1
346
+ }, 8, ["class", "aria-pressed"])]),
347
+ _: 1
348
+ }),
349
+ a(h(b), { title: "无序列表" }, {
350
+ default: _(() => [a(h(v), {
351
+ size: "small",
352
+ class: c(["gd-contract-template-designer__text-menu-icon-button", { "is-selected": o.editorState.isBulletList }]),
353
+ "aria-pressed": o.editorState.isBulletList,
354
+ "aria-label": "无序列表",
355
+ onClick: d[23] ||= (e) => Q("command", { type: "toggle-bullet-list" })
356
+ }, {
357
+ default: _(() => [a(h(P), { "aria-hidden": "true" })]),
358
+ _: 1
359
+ }, 8, ["class", "aria-pressed"])]),
360
+ _: 1
361
+ })
362
+ ]),
363
+ i("div", Y, [a(h(b), { title: "清除文字格式" }, {
364
+ default: _(() => [a(h(v), {
365
+ size: "small",
366
+ class: "gd-contract-template-designer__text-menu-clear-action",
367
+ "aria-label": "清除文字格式",
368
+ onClick: d[24] ||= (e) => Q("command", { type: "clear-text-format" })
369
+ }, {
370
+ default: _(() => [a(h(ne), { "aria-hidden": "true" }), d[35] ||= i("span", null, "清文字", -1)]),
371
+ _: 1
372
+ })]),
373
+ _: 1
374
+ }), a(h(b), { title: "清除段落格式" }, {
375
+ default: _(() => [a(h(v), {
376
+ size: "small",
377
+ class: "gd-contract-template-designer__text-menu-clear-action",
378
+ "aria-label": "清除段落格式",
379
+ onClick: d[25] ||= (e) => Q("command", { type: "clear-block-format" })
380
+ }, {
381
+ default: _(() => [a(h(w), { "aria-hidden": "true" }), d[36] ||= i("span", null, "清段落", -1)]),
382
+ _: 1
383
+ })]),
384
+ _: 1
385
+ })])
386
+ ], 36));
387
+ }
388
+ });
389
+ //#endregion
390
+ export { X as default };