@guodun/antdv 1.2.5 → 1.3.0

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 (386) hide show
  1. package/dist/es/components/contract-signing-location/index.mjs +11 -0
  2. package/dist/es/components/contract-signing-location/src/ContractSigningLocation.mjs +5 -0
  3. package/dist/es/components/contract-signing-location/src/ContractSigningLocation.vue.mjs +546 -0
  4. package/dist/es/components/contract-signing-location/src/ContractSigningLocationCanvas.mjs +5 -0
  5. package/dist/es/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.mjs +612 -0
  6. package/dist/es/components/contract-signing-location/src/ContractSigningLocationInspector.mjs +5 -0
  7. package/dist/es/components/contract-signing-location/src/ContractSigningLocationInspector.vue.mjs +228 -0
  8. package/dist/es/components/contract-signing-location/src/ContractSigningLocationNavigator.mjs +5 -0
  9. package/dist/es/components/contract-signing-location/src/ContractSigningLocationNavigator.vue.mjs +71 -0
  10. package/dist/es/components/contract-signing-location/src/constants.mjs +42 -0
  11. package/dist/es/components/contract-signing-location/src/coordinates.mjs +182 -0
  12. package/dist/es/components/contract-signing-location/src/icons.mjs +114 -0
  13. package/dist/es/components/contract-signing-location/src/location-rules.mjs +296 -0
  14. package/dist/es/components/contract-signing-location/src/page-layout.mjs +115 -0
  15. package/dist/es/components/contract-signing-location/src/preview-requests.mjs +25 -0
  16. package/dist/es/components/contract-signing-location/src/style/index.mjs +1 -0
  17. package/dist/es/components/contract-signing-location/src/types.mjs +0 -0
  18. package/dist/es/components/contract-signing-location/style/index.css +1 -0
  19. package/dist/es/components/contract-signing-location/style/index.mjs +1 -0
  20. package/dist/es/components/index.mjs +12 -0
  21. package/dist/es/components/pro-contract-signing-flow/index.mjs +9 -0
  22. package/dist/es/components/pro-contract-signing-flow/src/ContractSigningFlowCanvas.mjs +5 -0
  23. package/dist/es/components/pro-contract-signing-flow/src/ContractSigningFlowCanvas.vue.mjs +71 -0
  24. package/dist/es/components/pro-contract-signing-flow/src/ContractSigningFlowInspector.mjs +5 -0
  25. package/dist/es/components/pro-contract-signing-flow/src/ContractSigningFlowInspector.vue.mjs +312 -0
  26. package/dist/es/components/pro-contract-signing-flow/src/ContractSigningFlowNodeCard.mjs +5 -0
  27. package/dist/es/components/pro-contract-signing-flow/src/ContractSigningFlowNodeCard.vue.mjs +115 -0
  28. package/dist/es/components/pro-contract-signing-flow/src/ProContractSigningFlow.mjs +5 -0
  29. package/dist/es/components/pro-contract-signing-flow/src/ProContractSigningFlow.vue.mjs +143 -0
  30. package/dist/es/components/pro-contract-signing-flow/src/composables/use-contract-signing-flow.mjs +365 -0
  31. package/dist/es/components/pro-contract-signing-flow/src/constants.mjs +48 -0
  32. package/dist/es/components/pro-contract-signing-flow/src/types.mjs +0 -0
  33. package/dist/es/components/pro-contract-signing-flow/style/index.css +1 -0
  34. package/dist/es/components/pro-contract-signing-flow/style/index.mjs +1 -0
  35. package/dist/es/components/pro-contract-template-designer/index.mjs +5 -0
  36. package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.mjs +5 -0
  37. package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue.mjs +43 -0
  38. package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePreviewSigningLayer.mjs +5 -0
  39. package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePreviewSigningLayer.vue.mjs +42 -0
  40. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateRendererField.vue.mjs +88 -78
  41. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateRendererHeader.mjs +5 -0
  42. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateRendererHeader.vue.mjs +169 -0
  43. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateRendererToolbar.vue.mjs +18 -7
  44. package/dist/es/components/pro-contract-template-designer/src/DesignerPage.vue.mjs +522 -318
  45. package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.mjs +2436 -1166
  46. package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateRenderer.vue.mjs +320 -198
  47. package/dist/es/components/pro-contract-template-designer/src/SigningPlacementInspector.mjs +5 -0
  48. package/dist/es/components/pro-contract-template-designer/src/SigningPlacementInspector.vue.mjs +142 -0
  49. package/dist/es/components/pro-contract-template-designer/src/SigningPlacementLayer.mjs +5 -0
  50. package/dist/es/components/pro-contract-template-designer/src/SigningPlacementLayer.vue.mjs +134 -0
  51. package/dist/es/components/pro-contract-template-designer/src/TableContextMenu.mjs +5 -0
  52. package/dist/es/components/pro-contract-template-designer/src/TableContextMenu.vue.mjs +189 -0
  53. package/dist/es/components/pro-contract-template-designer/src/TableSizePicker.mjs +5 -0
  54. package/dist/es/components/pro-contract-template-designer/src/TableSizePicker.vue.mjs +117 -0
  55. package/dist/es/components/pro-contract-template-designer/src/composables/use-fit-width-zoom.mjs +33 -0
  56. package/dist/es/components/pro-contract-template-designer/src/composables/use-template-designer.mjs +334 -322
  57. package/dist/es/components/pro-contract-template-designer/src/composables/use-template-draft-cache.mjs +1 -1
  58. package/dist/es/components/pro-contract-template-designer/src/extensions/ContentImageNodeView.mjs +7 -0
  59. package/dist/es/components/pro-contract-template-designer/src/extensions/ContentImageNodeView.vue.mjs +213 -0
  60. package/dist/es/components/pro-contract-template-designer/src/extensions/ContentImageNodeView.vue_vue_type_style_index_0_scoped_8082f8b4_lang.css +1 -0
  61. package/dist/es/components/pro-contract-template-designer/src/extensions/editor-extensions.mjs +62 -27
  62. package/dist/es/components/pro-contract-template-designer/src/extensions/office-content.mjs +241 -0
  63. package/dist/es/components/pro-contract-template-designer/src/extensions/template-variable.mjs +56 -119
  64. package/dist/es/components/pro-contract-template-designer/src/extensions/word-paste.mjs +141 -0
  65. package/dist/es/components/pro-contract-template-designer/src/types.mjs +13 -0
  66. package/dist/es/components/pro-contract-template-designer/src/utils/content-image.mjs +171 -0
  67. package/dist/es/components/pro-contract-template-designer/src/utils/context-variable.mjs +17 -0
  68. package/dist/es/components/pro-contract-template-designer/src/utils/html.mjs +59 -0
  69. package/dist/es/components/pro-contract-template-designer/src/utils/image-url.mjs +44 -0
  70. package/dist/es/components/pro-contract-template-designer/src/utils/signing-placement.mjs +292 -0
  71. package/dist/es/components/pro-contract-template-designer/src/utils/template-renderer.mjs +124 -167
  72. package/dist/es/components/pro-contract-template-designer/src/utils/template-tool-icons.mjs +28 -0
  73. package/dist/es/components/pro-contract-template-designer/src/utils/template-variable-render.mjs +1 -1
  74. package/dist/es/components/pro-contract-template-designer/src/utils/word-paste.mjs +737 -0
  75. package/dist/es/components/pro-contract-template-designer/style/index.css +1 -1
  76. package/dist/es/index.mjs +75 -63
  77. package/dist/lib/components/contract-signing-location/index.cjs +1 -0
  78. package/dist/lib/components/contract-signing-location/src/ContractSigningLocation.cjs +1 -0
  79. package/dist/lib/components/contract-signing-location/src/ContractSigningLocation.vue.cjs +1 -0
  80. package/dist/lib/components/contract-signing-location/src/ContractSigningLocationCanvas.cjs +1 -0
  81. package/dist/lib/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.cjs +1 -0
  82. package/dist/lib/components/contract-signing-location/src/ContractSigningLocationInspector.cjs +1 -0
  83. package/dist/lib/components/contract-signing-location/src/ContractSigningLocationInspector.vue.cjs +1 -0
  84. package/dist/lib/components/contract-signing-location/src/ContractSigningLocationNavigator.cjs +1 -0
  85. package/dist/lib/components/contract-signing-location/src/ContractSigningLocationNavigator.vue.cjs +1 -0
  86. package/dist/lib/components/contract-signing-location/src/constants.cjs +1 -0
  87. package/dist/lib/components/contract-signing-location/src/coordinates.cjs +1 -0
  88. package/dist/lib/components/contract-signing-location/src/icons.cjs +1 -0
  89. package/dist/lib/components/contract-signing-location/src/location-rules.cjs +1 -0
  90. package/dist/lib/components/contract-signing-location/src/page-layout.cjs +1 -0
  91. package/dist/lib/components/contract-signing-location/src/preview-requests.cjs +1 -0
  92. package/dist/lib/components/contract-signing-location/src/style/index.cjs +1 -0
  93. package/dist/lib/components/contract-signing-location/src/types.cjs +0 -0
  94. package/dist/lib/components/contract-signing-location/style/index.cjs +1 -0
  95. package/dist/lib/components/contract-signing-location/style/index.css +1 -0
  96. package/dist/lib/components/index.cjs +1 -1
  97. package/dist/lib/components/pro-contract-signing-flow/index.cjs +1 -0
  98. package/dist/lib/components/pro-contract-signing-flow/src/ContractSigningFlowCanvas.cjs +1 -0
  99. package/dist/lib/components/pro-contract-signing-flow/src/ContractSigningFlowCanvas.vue.cjs +1 -0
  100. package/dist/lib/components/pro-contract-signing-flow/src/ContractSigningFlowInspector.cjs +1 -0
  101. package/dist/lib/components/pro-contract-signing-flow/src/ContractSigningFlowInspector.vue.cjs +1 -0
  102. package/dist/lib/components/pro-contract-signing-flow/src/ContractSigningFlowNodeCard.cjs +1 -0
  103. package/dist/lib/components/pro-contract-signing-flow/src/ContractSigningFlowNodeCard.vue.cjs +1 -0
  104. package/dist/lib/components/pro-contract-signing-flow/src/ProContractSigningFlow.cjs +1 -0
  105. package/dist/lib/components/pro-contract-signing-flow/src/ProContractSigningFlow.vue.cjs +1 -0
  106. package/dist/lib/components/pro-contract-signing-flow/src/composables/use-contract-signing-flow.cjs +1 -0
  107. package/dist/lib/components/pro-contract-signing-flow/src/constants.cjs +1 -0
  108. package/dist/lib/components/pro-contract-signing-flow/src/types.cjs +0 -0
  109. package/dist/lib/components/pro-contract-signing-flow/style/index.cjs +1 -0
  110. package/dist/lib/components/pro-contract-signing-flow/style/index.css +1 -0
  111. package/dist/lib/components/pro-contract-template-designer/index.cjs +1 -1
  112. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.cjs +1 -0
  113. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue.cjs +1 -0
  114. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePreviewSigningLayer.cjs +1 -0
  115. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePreviewSigningLayer.vue.cjs +1 -0
  116. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateRendererField.vue.cjs +1 -1
  117. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateRendererHeader.cjs +1 -0
  118. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateRendererHeader.vue.cjs +1 -0
  119. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateRendererToolbar.vue.cjs +1 -1
  120. package/dist/lib/components/pro-contract-template-designer/src/DesignerPage.vue.cjs +2 -2
  121. package/dist/lib/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.cjs +1 -1
  122. package/dist/lib/components/pro-contract-template-designer/src/ProContractTemplateRenderer.vue.cjs +1 -1
  123. package/dist/lib/components/pro-contract-template-designer/src/SigningPlacementInspector.cjs +1 -0
  124. package/dist/lib/components/pro-contract-template-designer/src/SigningPlacementInspector.vue.cjs +1 -0
  125. package/dist/lib/components/pro-contract-template-designer/src/SigningPlacementLayer.cjs +1 -0
  126. package/dist/lib/components/pro-contract-template-designer/src/SigningPlacementLayer.vue.cjs +1 -0
  127. package/dist/lib/components/pro-contract-template-designer/src/TableContextMenu.cjs +1 -0
  128. package/dist/lib/components/pro-contract-template-designer/src/TableContextMenu.vue.cjs +1 -0
  129. package/dist/lib/components/pro-contract-template-designer/src/TableSizePicker.cjs +1 -0
  130. package/dist/lib/components/pro-contract-template-designer/src/TableSizePicker.vue.cjs +1 -0
  131. package/dist/lib/components/pro-contract-template-designer/src/composables/use-fit-width-zoom.cjs +1 -0
  132. package/dist/lib/components/pro-contract-template-designer/src/composables/use-template-designer.cjs +4 -4
  133. package/dist/lib/components/pro-contract-template-designer/src/composables/use-template-draft-cache.cjs +1 -1
  134. package/dist/lib/components/pro-contract-template-designer/src/extensions/ContentImageNodeView.cjs +1 -0
  135. package/dist/lib/components/pro-contract-template-designer/src/extensions/ContentImageNodeView.vue.cjs +1 -0
  136. package/dist/lib/components/pro-contract-template-designer/src/extensions/ContentImageNodeView.vue_vue_type_style_index_0_scoped_8082f8b4_lang.css +1 -0
  137. package/dist/lib/components/pro-contract-template-designer/src/extensions/editor-extensions.cjs +1 -1
  138. package/dist/lib/components/pro-contract-template-designer/src/extensions/office-content.cjs +1 -0
  139. package/dist/lib/components/pro-contract-template-designer/src/extensions/template-variable.cjs +1 -1
  140. package/dist/lib/components/pro-contract-template-designer/src/extensions/word-paste.cjs +1 -0
  141. package/dist/lib/components/pro-contract-template-designer/src/types.cjs +1 -0
  142. package/dist/lib/components/pro-contract-template-designer/src/utils/content-image.cjs +1 -0
  143. package/dist/lib/components/pro-contract-template-designer/src/utils/context-variable.cjs +1 -0
  144. package/dist/lib/components/pro-contract-template-designer/src/utils/html.cjs +1 -0
  145. package/dist/lib/components/pro-contract-template-designer/src/utils/image-url.cjs +2 -0
  146. package/dist/lib/components/pro-contract-template-designer/src/utils/signing-placement.cjs +1 -0
  147. package/dist/lib/components/pro-contract-template-designer/src/utils/template-renderer.cjs +3 -3
  148. package/dist/lib/components/pro-contract-template-designer/src/utils/template-tool-icons.cjs +1 -0
  149. package/dist/lib/components/pro-contract-template-designer/src/utils/template-variable-render.cjs +1 -1
  150. package/dist/lib/components/pro-contract-template-designer/src/utils/word-paste.cjs +3 -0
  151. package/dist/lib/components/pro-contract-template-designer/style/index.css +1 -1
  152. package/dist/lib/index.cjs +1 -1
  153. package/dist/theme/contract-signing-location.css +1 -0
  154. package/dist/theme/icon.css +1 -1
  155. package/dist/theme/index.css +1 -1
  156. package/dist/theme/pro-contract-signing-flow.css +1 -0
  157. package/dist/types/components/contract-signing-location/index.d.ts +9 -0
  158. package/dist/types/components/contract-signing-location/src/ContractSigningLocation.vue.d.ts +133 -0
  159. package/dist/types/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.d.ts +49 -0
  160. package/dist/types/components/contract-signing-location/src/ContractSigningLocationInspector.vue.d.ts +32 -0
  161. package/dist/types/components/contract-signing-location/src/ContractSigningLocationNavigator.vue.d.ts +13 -0
  162. package/dist/types/components/contract-signing-location/src/constants.d.ts +40 -0
  163. package/dist/types/components/contract-signing-location/src/coordinates.d.ts +59 -0
  164. package/dist/types/components/contract-signing-location/src/icons.d.ts +12 -0
  165. package/dist/types/components/contract-signing-location/src/location-rules.d.ts +50 -0
  166. package/dist/types/components/contract-signing-location/src/page-layout.d.ts +49 -0
  167. package/dist/types/components/contract-signing-location/src/preview-requests.d.ts +8 -0
  168. package/dist/types/components/contract-signing-location/src/types.d.ts +218 -0
  169. package/dist/types/{antdv/src/components → components}/hooks/use-basic-app-config.d.ts +2 -2
  170. package/dist/types/{antdv/src/components → components}/index.d.ts +2 -0
  171. package/dist/types/components/pro-contract-signing-flow/index.d.ts +7 -0
  172. package/dist/types/components/pro-contract-signing-flow/src/ContractSigningFlowCanvas.vue.d.ts +19 -0
  173. package/dist/types/components/pro-contract-signing-flow/src/ContractSigningFlowInspector.vue.d.ts +14 -0
  174. package/dist/types/components/pro-contract-signing-flow/src/ContractSigningFlowNodeCard.vue.d.ts +19 -0
  175. package/dist/types/components/pro-contract-signing-flow/src/ProContractSigningFlow.vue.d.ts +35 -0
  176. package/dist/types/components/pro-contract-signing-flow/src/composables/use-contract-signing-flow.d.ts +213 -0
  177. package/dist/types/components/pro-contract-signing-flow/src/constants.d.ts +26 -0
  178. package/dist/types/components/pro-contract-signing-flow/src/types.d.ts +119 -0
  179. package/dist/types/{antdv/src/components → components}/pro-contract-template-agent/src/ContractTemplateAgentContext.vue.d.ts +1 -1
  180. package/dist/types/{antdv/src/components → components}/pro-contract-template-agent/src/ContractTemplateAgentPanel.vue.d.ts +5 -5
  181. package/dist/types/components/pro-contract-template-agent/src/ContractTemplateAgentPreview.vue.d.ts +11 -0
  182. package/dist/types/{antdv/src/components → components}/pro-contract-template-agent/src/ProContractTemplateAgentWorkbench.vue.d.ts +1 -1
  183. package/dist/types/{antdv/src/components → components}/pro-contract-template-agent/src/composables/use-contract-template-agent.d.ts +11 -11
  184. package/dist/types/{antdv/src/components → components}/pro-contract-template-agent/src/types.d.ts +39 -2
  185. package/dist/types/{antdv/src/components → components}/pro-contract-template-designer/index.d.ts +2 -0
  186. package/dist/types/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue.d.ts +9 -0
  187. package/dist/types/components/pro-contract-template-designer/src/ContractTemplatePreviewSigningLayer.vue.d.ts +7 -0
  188. package/dist/types/components/pro-contract-template-designer/src/ContractTemplateRendererHeader.vue.d.ts +71 -0
  189. package/dist/types/{antdv/src/components → components}/pro-contract-template-designer/src/ContractTemplateRendererToolbar.vue.d.ts +14 -3
  190. package/dist/types/components/pro-contract-template-designer/src/DesignerPage.vue.d.ts +197 -0
  191. package/dist/types/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.d.ts +120 -0
  192. package/dist/types/{antdv/src/components → components}/pro-contract-template-designer/src/ProContractTemplateRenderer.vue.d.ts +11 -3
  193. package/dist/types/components/pro-contract-template-designer/src/SigningPlacementInspector.vue.d.ts +17 -0
  194. package/dist/types/components/pro-contract-template-designer/src/SigningPlacementLayer.vue.d.ts +19 -0
  195. package/dist/types/components/pro-contract-template-designer/src/TableContextMenu.vue.d.ts +22 -0
  196. package/dist/types/components/pro-contract-template-designer/src/TableSizePicker.vue.d.ts +23 -0
  197. package/dist/types/components/pro-contract-template-designer/src/composables/use-fit-width-zoom.d.ts +28 -0
  198. package/dist/types/components/pro-contract-template-designer/src/composables/use-template-designer.d.ts +139 -0
  199. package/dist/types/components/pro-contract-template-designer/src/composables/use-template-draft-cache.d.ts +83 -0
  200. package/dist/types/{antdv/src/components → components}/pro-contract-template-designer/src/constants.d.ts +49 -0
  201. package/dist/types/components/pro-contract-template-designer/src/extensions/ContentImageNodeView.vue.d.ts +5 -0
  202. package/dist/types/components/pro-contract-template-designer/src/extensions/editor-extensions.d.ts +16 -0
  203. package/dist/types/{antdv/src/components → components}/pro-contract-template-designer/src/extensions/font-size.d.ts +6 -0
  204. package/dist/types/components/pro-contract-template-designer/src/extensions/office-content.d.ts +11 -0
  205. package/dist/types/{antdv/src/components → components}/pro-contract-template-designer/src/extensions/template-variable.d.ts +17 -2
  206. package/dist/types/components/pro-contract-template-designer/src/extensions/word-paste.d.ts +25 -0
  207. package/dist/types/{antdv/src/components → components}/pro-contract-template-designer/src/types.d.ts +253 -23
  208. package/dist/types/components/pro-contract-template-designer/src/utils/content-image.d.ts +80 -0
  209. package/dist/types/components/pro-contract-template-designer/src/utils/context-variable.d.ts +37 -0
  210. package/dist/types/components/pro-contract-template-designer/src/utils/html.d.ts +74 -0
  211. package/dist/types/components/pro-contract-template-designer/src/utils/image-url.d.ts +6 -0
  212. package/dist/types/components/pro-contract-template-designer/src/utils/signing-placement.d.ts +105 -0
  213. package/dist/types/{antdv/src/components → components}/pro-contract-template-designer/src/utils/template-renderer.d.ts +15 -1
  214. package/dist/types/components/pro-contract-template-designer/src/utils/template-tool-icons.d.ts +12 -0
  215. package/dist/types/{antdv/src/components → components}/pro-contract-template-designer/src/utils/template-variable-render.d.ts +39 -0
  216. package/dist/types/components/pro-contract-template-designer/src/utils/word-paste.d.ts +43 -0
  217. package/dist/types/{antdv/src/components → components}/pro-form-render/src/module/AioArrayInput.vue.d.ts +3 -3
  218. package/dist/types/{antdv/src/components → components}/pro-form-render/src/module/AioArraySubForm.vue.d.ts +3 -3
  219. package/dist/types/{antdv/src/components → components}/pro-form-render/src/module/AioKV.vue.d.ts +3 -3
  220. package/dist/types/{antdv/src/components → components}/pro-form-render/src/module/AioSubForm.vue.d.ts +9 -9
  221. package/dist/types/{antdv/src/components → components}/pro-selector/src/pro-user.d.ts +3 -3
  222. package/dist/types/{antdv/src/components → components}/pro-selector-group/src/hooks/useApi.d.ts +1 -1
  223. package/global.d.ts +2 -0
  224. package/package.json +13 -8
  225. package/dist/types/antdv/src/components/pro-contract-template-agent/src/ContractTemplateAgentPreview.vue.d.ts +0 -11
  226. package/dist/types/antdv/src/components/pro-contract-template-designer/src/DesignerPage.vue.d.ts +0 -79
  227. package/dist/types/antdv/src/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.d.ts +0 -57
  228. package/dist/types/antdv/src/components/pro-contract-template-designer/src/composables/use-template-designer.d.ts +0 -41
  229. package/dist/types/antdv/src/components/pro-contract-template-designer/src/composables/use-template-draft-cache.d.ts +0 -39
  230. package/dist/types/antdv/src/components/pro-contract-template-designer/src/extensions/editor-extensions.d.ts +0 -9
  231. package/dist/types/antdv/src/components/pro-contract-template-designer/src/extensions/template-field.d.ts +0 -5
  232. /package/dist/types/{antdv/src/components → components}/collapse-transtion/hooks/use-collapse-transtion.d.ts +0 -0
  233. /package/dist/types/{antdv/src/components → components}/collapse-transtion/index.d.ts +0 -0
  234. /package/dist/types/{antdv/src/components → components}/collapse-transtion/src/collapse-transtion.vue.d.ts +0 -0
  235. /package/dist/types/{antdv/src/components → components}/collapse-transtion/src/types.d.ts +0 -0
  236. /package/dist/types/{antdv/src/components → components}/cover-scroll-bar/hooks/use-has-scroll.d.ts +0 -0
  237. /package/dist/types/{antdv/src/components → components}/cover-scroll-bar/index.d.ts +0 -0
  238. /package/dist/types/{antdv/src/components → components}/cover-scroll-bar/src/cover-scroll-bar.d.ts +0 -0
  239. /package/dist/types/{antdv/src/components → components}/cover-scroll-bar/src/types.d.ts +0 -0
  240. /package/dist/types/{antdv/src/components → components}/dept-selector/index.d.ts +0 -0
  241. /package/dist/types/{antdv/src/components → components}/dept-selector/src/dept.d.ts +0 -0
  242. /package/dist/types/{antdv/src/components → components}/dept-selector/src/types.d.ts +0 -0
  243. /package/dist/types/{antdv/src/components → components}/hooks/index.d.ts +0 -0
  244. /package/dist/types/{antdv/src/components → components}/icon/index.d.ts +0 -0
  245. /package/dist/types/{antdv/src/components → components}/icon/src/icon.vue.d.ts +0 -0
  246. /package/dist/types/{antdv/src/components → components}/icon/src/types.d.ts +0 -0
  247. /package/dist/types/{antdv/src/components → components}/plus-upload/apis/plus-upload.api.d.ts +0 -0
  248. /package/dist/types/{antdv/src/components → components}/plus-upload/hook/useExtractPlusUpload.d.ts +0 -0
  249. /package/dist/types/{antdv/src/components → components}/plus-upload/hook/usePlusUpload.d.ts +0 -0
  250. /package/dist/types/{antdv/src/components → components}/plus-upload/index.d.ts +0 -0
  251. /package/dist/types/{antdv/src/components → components}/plus-upload/src/plus-upload.vue.d.ts +0 -0
  252. /package/dist/types/{antdv/src/components → components}/plus-upload/src/types.d.ts +0 -0
  253. /package/dist/types/{antdv/src/components → components}/pro-area/apis/pro-area.api.d.ts +0 -0
  254. /package/dist/types/{antdv/src/components → components}/pro-area/hooks/use-pro-area.d.ts +0 -0
  255. /package/dist/types/{antdv/src/components → components}/pro-area/index.d.ts +0 -0
  256. /package/dist/types/{antdv/src/components → components}/pro-area/src/ProArea.vue.d.ts +0 -0
  257. /package/dist/types/{antdv/src/components → components}/pro-area/src/types.d.ts +0 -0
  258. /package/dist/types/{antdv/src/components → components}/pro-cell/index.d.ts +0 -0
  259. /package/dist/types/{antdv/src/components → components}/pro-cell/src/index.vue.d.ts +0 -0
  260. /package/dist/types/{antdv/src/components → components}/pro-cell/src/types.d.ts +0 -0
  261. /package/dist/types/{antdv/src/components → components}/pro-cell-group/index.d.ts +0 -0
  262. /package/dist/types/{antdv/src/components → components}/pro-cell-group/src/index.vue.d.ts +0 -0
  263. /package/dist/types/{antdv/src/components → components}/pro-cell-group/src/types.d.ts +0 -0
  264. /package/dist/types/{antdv/src/components → components}/pro-contract-template-agent/index.d.ts +0 -0
  265. /package/dist/types/{antdv/src/components → components}/pro-contract-template-agent/src/composables/use-contract-template-agent-split.d.ts +0 -0
  266. /package/dist/types/{antdv/src/components → components}/pro-contract-template-agent/src/composables/use-contract-template-agent-workbench.d.ts +0 -0
  267. /package/dist/types/{antdv/src/components → components}/pro-contract-template-agent/src/utils/contract-template-agent-adapter.d.ts +0 -0
  268. /package/dist/types/{antdv/src/components → components}/pro-contract-template-designer/src/ContractTemplateRendererField.vue.d.ts +0 -0
  269. /package/dist/types/{antdv/src/components → components}/pro-contract-template-designer/src/ContractTemplateRendererPage.vue.d.ts +0 -0
  270. /package/dist/types/{antdv/src/components → components}/pro-drawer/index.d.ts +0 -0
  271. /package/dist/types/{antdv/src/components → components}/pro-drawer/src/index.vue.d.ts +0 -0
  272. /package/dist/types/{antdv/src/components → components}/pro-drawer/src/types.d.ts +0 -0
  273. /package/dist/types/{antdv/src/components → components}/pro-dynamic-tags/index.d.ts +0 -0
  274. /package/dist/types/{antdv/src/components → components}/pro-dynamic-tags/src/index.vue.d.ts +0 -0
  275. /package/dist/types/{antdv/src/components → components}/pro-dynamic-tags/src/types.d.ts +0 -0
  276. /package/dist/types/{antdv/src/components → components}/pro-form-render/index.d.ts +0 -0
  277. /package/dist/types/{antdv/src/components → components}/pro-form-render/src/index.vue.d.ts +0 -0
  278. /package/dist/types/{antdv/src/components → components}/pro-form-render/src/module/AioDatePicker.vue.d.ts +0 -0
  279. /package/dist/types/{antdv/src/components → components}/pro-form-render/src/module/AioInput.vue.d.ts +0 -0
  280. /package/dist/types/{antdv/src/components → components}/pro-form-render/src/module/AioInputNumber.vue.d.ts +0 -0
  281. /package/dist/types/{antdv/src/components → components}/pro-form-render/src/module/AioKeyValue.vue.d.ts +0 -0
  282. /package/dist/types/{antdv/src/components → components}/pro-form-render/src/module/AioSelect.vue.d.ts +0 -0
  283. /package/dist/types/{antdv/src/components → components}/pro-form-render/src/module/AioSwitch.vue.d.ts +0 -0
  284. /package/dist/types/{antdv/src/components → components}/pro-form-render/src/module/AioTextarea.vue.d.ts +0 -0
  285. /package/dist/types/{antdv/src/components → components}/pro-form-render/src/module/AioTimePicker.vue.d.ts +0 -0
  286. /package/dist/types/{antdv/src/components → components}/pro-form-render/src/module/index.d.ts +0 -0
  287. /package/dist/types/{antdv/src/components → components}/pro-form-render/src/types.d.ts +0 -0
  288. /package/dist/types/{antdv/src/components → components}/pro-form-render/src/utils.d.ts +0 -0
  289. /package/dist/types/{antdv/src/components → components}/pro-form-render/src/v-model-utils.d.ts +0 -0
  290. /package/dist/types/{antdv/src/components → components}/pro-loading/index.d.ts +0 -0
  291. /package/dist/types/{antdv/src/components → components}/pro-loading/src/pro-loading.d.ts +0 -0
  292. /package/dist/types/{antdv/src/components → components}/pro-loading/src/types.d.ts +0 -0
  293. /package/dist/types/{antdv/src/components → components}/pro-menu-tree/index.d.ts +0 -0
  294. /package/dist/types/{antdv/src/components → components}/pro-menu-tree/src/hooks.d.ts +0 -0
  295. /package/dist/types/{antdv/src/components → components}/pro-menu-tree/src/pro-menu-tree.d.ts +0 -0
  296. /package/dist/types/{antdv/src/components → components}/pro-menu-tree/src/types.d.ts +0 -0
  297. /package/dist/types/{antdv/src/components → components}/pro-modal/hooks/useProModal.d.ts +0 -0
  298. /package/dist/types/{antdv/src/components → components}/pro-modal/index.d.ts +0 -0
  299. /package/dist/types/{antdv/src/components → components}/pro-modal/src/Modal.d.ts +0 -0
  300. /package/dist/types/{antdv/src/components → components}/pro-modal/src/ProModal.vue.d.ts +0 -0
  301. /package/dist/types/{antdv/src/components → components}/pro-modal/src/types.d.ts +0 -0
  302. /package/dist/types/{antdv/src/components → components}/pro-overlay/index.d.ts +0 -0
  303. /package/dist/types/{antdv/src/components → components}/pro-overlay/src/pro-overlay.vue.d.ts +0 -0
  304. /package/dist/types/{antdv/src/components → components}/pro-picker/apis/pro-picker.api.d.ts +0 -0
  305. /package/dist/types/{antdv/src/components → components}/pro-picker/index.d.ts +0 -0
  306. /package/dist/types/{antdv/src/components → components}/pro-picker/src/ProPicker.vue.d.ts +0 -0
  307. /package/dist/types/{antdv/src/components → components}/pro-picker/src/types.d.ts +0 -0
  308. /package/dist/types/{antdv/src/components → components}/pro-selector/index.d.ts +0 -0
  309. /package/dist/types/{antdv/src/components → components}/pro-selector/src/components/org-tree.d.ts +0 -0
  310. /package/dist/types/{antdv/src/components → components}/pro-selector/src/components/user.d.ts +0 -0
  311. /package/dist/types/{antdv/src/components → components}/pro-selector/src/hooks/index.d.ts +0 -0
  312. /package/dist/types/{antdv/src/components → components}/pro-selector/src/hooks/useUserSelector.d.ts +0 -0
  313. /package/dist/types/{antdv/src/components → components}/pro-selector/src/types.d.ts +0 -0
  314. /package/dist/types/{antdv/src/components → components}/pro-selector/src/util.d.ts +0 -0
  315. /package/dist/types/{antdv/src/components → components}/pro-selector/src/utils/orgTree.d.ts +0 -0
  316. /package/dist/types/{antdv/src/components → components}/pro-selector-group/index.d.ts +0 -0
  317. /package/dist/types/{antdv/src/components → components}/pro-selector-group/src/compoents/dept-tree.vue.d.ts +0 -0
  318. /package/dist/types/{antdv/src/components → components}/pro-selector-group/src/compoents/dept.vue.d.ts +0 -0
  319. /package/dist/types/{antdv/src/components → components}/pro-selector-group/src/compoents/index.d.ts +0 -0
  320. /package/dist/types/{antdv/src/components → components}/pro-selector-group/src/compoents/role.vue.d.ts +0 -0
  321. /package/dist/types/{antdv/src/components → components}/pro-selector-group/src/compoents/select-box.vue.d.ts +0 -0
  322. /package/dist/types/{antdv/src/components → components}/pro-selector-group/src/compoents/user.vue.d.ts +0 -0
  323. /package/dist/types/{antdv/src/components → components}/pro-selector-group/src/index.vue.d.ts +0 -0
  324. /package/dist/types/{antdv/src/components → components}/pro-selector-group/src/types.d.ts +0 -0
  325. /package/dist/types/{antdv/src/components → components}/pro-selector-group/src/utils/index.d.ts +0 -0
  326. /package/dist/types/{antdv/src/components → components}/pro-signature/index.d.ts +0 -0
  327. /package/dist/types/{antdv/src/components → components}/pro-signature/src/ProSignature.vue.d.ts +0 -0
  328. /package/dist/types/{antdv/src/components → components}/pro-signature/src/types.d.ts +0 -0
  329. /package/dist/types/{antdv/src/components → components}/pro-table/hooks/use-pro-table.d.ts +0 -0
  330. /package/dist/types/{antdv/src/components → components}/pro-table/index.d.ts +0 -0
  331. /package/dist/types/{antdv/src/components → components}/pro-table/src/constants.d.ts +0 -0
  332. /package/dist/types/{antdv/src/components → components}/pro-table/src/field/field-date-range/field-date-range.vue.d.ts +0 -0
  333. /package/dist/types/{antdv/src/components → components}/pro-table/src/field/field-input/field-input.vue.d.ts +0 -0
  334. /package/dist/types/{antdv/src/components → components}/pro-table/src/field/field-radio/field-radio.vue.d.ts +0 -0
  335. /package/dist/types/{antdv/src/components → components}/pro-table/src/field/field-select/field-select.vue.d.ts +0 -0
  336. /package/dist/types/{antdv/src/components → components}/pro-table/src/field/field.vue.d.ts +0 -0
  337. /package/dist/types/{antdv/src/components → components}/pro-table/src/form-render.vue.d.ts +0 -0
  338. /package/dist/types/{antdv/src/components → components}/pro-table/src/hooks/use-form.d.ts +0 -0
  339. /package/dist/types/{antdv/src/components → components}/pro-table/src/hooks/use-table.d.ts +0 -0
  340. /package/dist/types/{antdv/src/components → components}/pro-table/src/pro-table.vue.d.ts +0 -0
  341. /package/dist/types/{antdv/src/components → components}/pro-table/src/types.d.ts +0 -0
  342. /package/dist/types/{antdv/src/components → components}/pro-table/utils.d.ts +0 -0
  343. /package/dist/types/{antdv/src/components → components}/pro-tag/index.d.ts +0 -0
  344. /package/dist/types/{antdv/src/components → components}/pro-tag/src/ProTag.vue.d.ts +0 -0
  345. /package/dist/types/{antdv/src/components → components}/pro-tag/src/types.d.ts +0 -0
  346. /package/dist/types/{antdv/src/components → components}/pro-tag-group/index.d.ts +0 -0
  347. /package/dist/types/{antdv/src/components → components}/pro-tag-group/src/ProTagGroup.vue.d.ts +0 -0
  348. /package/dist/types/{antdv/src/components → components}/pro-tag-group/src/types.d.ts +0 -0
  349. /package/dist/types/{antdv/src/components → components}/pro-title/index.d.ts +0 -0
  350. /package/dist/types/{antdv/src/components → components}/pro-title/src/ProTitle.vue.d.ts +0 -0
  351. /package/dist/types/{antdv/src/components → components}/pro-title/src/types.d.ts +0 -0
  352. /package/dist/types/{antdv/src/components → components}/pro-upload/index.d.ts +0 -0
  353. /package/dist/types/{antdv/src/components → components}/pro-upload/src/data.d.ts +0 -0
  354. /package/dist/types/{antdv/src/components → components}/pro-upload/src/file-list.d.ts +0 -0
  355. /package/dist/types/{antdv/src/components → components}/pro-upload/src/gd-upload.d.ts +0 -0
  356. /package/dist/types/{antdv/src/components → components}/pro-upload/src/hooks/index.d.ts +0 -0
  357. /package/dist/types/{antdv/src/components → components}/pro-upload/src/hooks/resType.d.ts +0 -0
  358. /package/dist/types/{antdv/src/components → components}/pro-upload/src/hooks/useHttp.d.ts +0 -0
  359. /package/dist/types/{antdv/src/components → components}/pro-upload/src/hooks/useUpload.d.ts +0 -0
  360. /package/dist/types/{antdv/src/components → components}/pro-upload/src/props.d.ts +0 -0
  361. /package/dist/types/{antdv/src/components → components}/pro-upload/src/types.d.ts +0 -0
  362. /package/dist/types/{antdv/src/components → components}/pro-upload/src/utils/emitter.d.ts +0 -0
  363. /package/dist/types/{antdv/src/components → components}/pro-upload/src/utils/index.d.ts +0 -0
  364. /package/dist/types/{antdv/src/components → components}/pro-user-avatar/index.d.ts +0 -0
  365. /package/dist/types/{antdv/src/components → components}/pro-user-avatar/src/index.vue.d.ts +0 -0
  366. /package/dist/types/{antdv/src/components → components}/pro-user-avatar/src/types.d.ts +0 -0
  367. /package/dist/types/{antdv/src/components → components}/pro-user-avatar/src/util.d.ts +0 -0
  368. /package/dist/types/{antdv/src/components → components}/role-selector/index.d.ts +0 -0
  369. /package/dist/types/{antdv/src/components → components}/role-selector/src/role.d.ts +0 -0
  370. /package/dist/types/{antdv/src/components → components}/role-selector/src/types.d.ts +0 -0
  371. /package/dist/types/{antdv/src/components → components}/scale-virtual-list/component/scale-virtual-list.vue.d.ts +0 -0
  372. /package/dist/types/{antdv/src/components → components}/scale-virtual-list/component/types.d.ts +0 -0
  373. /package/dist/types/{antdv/src/components → components}/scale-virtual-list/hooks/useVirtualList.d.ts +0 -0
  374. /package/dist/types/{antdv/src/components → components}/scale-virtual-list/index.d.ts +0 -0
  375. /package/dist/types/{antdv/src/components → components}/scroll-bar/index.d.ts +0 -0
  376. /package/dist/types/{antdv/src/components → components}/scroll-bar/src/scroll-bar.d.ts +0 -0
  377. /package/dist/types/{antdv/src/components → components}/scroll-bar/src/types.d.ts +0 -0
  378. /package/dist/types/{antdv/src/components → components}/utils/install.d.ts +0 -0
  379. /package/dist/types/{antdv/src/components → components}/utils/tool.d.ts +0 -0
  380. /package/dist/types/{antdv/src/extract.d.ts → extract.d.ts} +0 -0
  381. /package/dist/types/{antdv/src/hooks → hooks}/index.d.ts +0 -0
  382. /package/dist/types/{antdv/src/hooks → hooks}/setup-theme.d.ts +0 -0
  383. /package/dist/types/{antdv/src/hooks → hooks}/use-namespace/index.d.ts +0 -0
  384. /package/dist/types/{antdv/src/hooks → hooks}/useModelValue.d.ts +0 -0
  385. /package/dist/types/{antdv/src/hooks → hooks}/useProForm.d.ts +0 -0
  386. /package/dist/types/{antdv/src/index.d.ts → index.d.ts} +0 -0
@@ -1,60 +1,139 @@
1
- import e from "../../../node_modules/@ant-design/icons-vue/es/icons/AuditOutlined.mjs";
2
- import t from "../../../node_modules/@ant-design/icons-vue/es/icons/BoldOutlined.mjs";
3
- import n from "../../../node_modules/@ant-design/icons-vue/es/icons/ClearOutlined.mjs";
4
- import r from "../../../node_modules/@ant-design/icons-vue/es/icons/CopyOutlined.mjs";
5
- import i from "../../../node_modules/@ant-design/icons-vue/es/icons/DatabaseOutlined.mjs";
6
- import a from "../../../node_modules/@ant-design/icons-vue/es/icons/DeleteOutlined.mjs";
7
- import o from "../../../node_modules/@ant-design/icons-vue/es/icons/EyeOutlined.mjs";
8
- import ee from "../../../node_modules/@ant-design/icons-vue/es/icons/FormatPainterOutlined.mjs";
9
- import te from "../../../node_modules/@ant-design/icons-vue/es/icons/FullscreenExitOutlined.mjs";
10
- import ne from "../../../node_modules/@ant-design/icons-vue/es/icons/FullscreenOutlined.mjs";
11
- import re from "../../../node_modules/@ant-design/icons-vue/es/icons/ItalicOutlined.mjs";
12
- import ie from "../../../node_modules/@ant-design/icons-vue/es/icons/OrderedListOutlined.mjs";
13
- import ae from "../../../node_modules/@ant-design/icons-vue/es/icons/PlusOutlined.mjs";
14
- import oe from "../../../node_modules/@ant-design/icons-vue/es/icons/RedoOutlined.mjs";
15
- import se from "../../../node_modules/@ant-design/icons-vue/es/icons/ReloadOutlined.mjs";
16
- import ce from "../../../node_modules/@ant-design/icons-vue/es/icons/TableOutlined.mjs";
17
- import le from "../../../node_modules/@ant-design/icons-vue/es/icons/UnderlineOutlined.mjs";
18
- import ue from "../../../node_modules/@ant-design/icons-vue/es/icons/UndoOutlined.mjs";
19
- import de from "../../../node_modules/@ant-design/icons-vue/es/icons/UnorderedListOutlined.mjs";
20
- import fe from "../../../node_modules/@ant-design/icons-vue/es/icons/ZoomInOutlined.mjs";
21
- import pe from "../../../node_modules/@ant-design/icons-vue/es/icons/ZoomOutOutlined.mjs";
22
- import { CONTRACT_TEXT_STYLE_PRESETS as me, DEFAULT_CONTRACT_FONT_FAMILY as s, DEFAULT_FONT_SIZE_PRESETS as he, DEFAULT_TEXT_ALIGN_OPTIONS as ge, resolveFontFamilyOptions as _e } from "./constants.mjs";
23
- import { DEFAULT_FIELD_STYLE as ve, DEFAULT_FIELD_TYPES as c, DEFAULT_PAGE_SIZE as ye, PAGE_SIZE_OPTIONS as be, buildTemplatePreviewHtml as xe, cloneTemplateValue as Se, createBlankPage as Ce, createBlankTemplate as we, createDefaultPage as Te, createTemplateVariable as Ee, exportTemplateValue as De, getFieldOption as Oe, getPageSizeOption as ke, normalizeTemplateValue as Ae, resolvePageSize as je, syncTemplateVariablesWithPages as Me, validateTemplateValue as Ne } from "./composables/use-template-designer.mjs";
24
- import Pe from "./DesignerPage.mjs";
25
- import { DEFAULT_DRAFT_CACHE_INTERVAL as Fe, DEFAULT_DRAFT_CACHE_KEY as Ie, DEFAULT_DRAFT_CACHE_MAX_BYTES as l, clearTemplateDraftCache as Le, createDraftCacheStatus as Re, formatDraftCacheSavedAt as ze, getBrowserDraftCacheStorage as Be, isBlankTemplateDraftValue as Ve, loadTemplateDraftCache as He, saveTemplateDraftCache as Ue } from "./composables/use-template-draft-cache.mjs";
26
- import { Fragment as u, computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createTextVNode as g, createVNode as _, defineComponent as We, nextTick as Ge, normalizeClass as Ke, normalizeStyle as qe, onBeforeUnmount as Je, onMounted as Ye, openBlock as v, ref as y, renderList as Xe, toDisplayString as b, unref as x, watch as Ze, withCtx as S } from "vue";
27
- import { Alert as Qe, Button as C, Empty as $e, Input as w, InputNumber as T, Modal as et, Popover as tt, Select as E, Switch as nt, Tag as rt, Tooltip as D } from "ant-design-vue";
1
+ import e from "../../../node_modules/@ant-design/icons-vue/es/icons/AlignCenterOutlined.mjs";
2
+ import t from "../../../node_modules/@ant-design/icons-vue/es/icons/AlignLeftOutlined.mjs";
3
+ import n from "../../../node_modules/@ant-design/icons-vue/es/icons/AlignRightOutlined.mjs";
4
+ import r from "../../../node_modules/@ant-design/icons-vue/es/icons/AuditOutlined.mjs";
5
+ import i from "../../../node_modules/@ant-design/icons-vue/es/icons/BoldOutlined.mjs";
6
+ import a from "../../../node_modules/@ant-design/icons-vue/es/icons/ClearOutlined.mjs";
7
+ import o from "../../../node_modules/@ant-design/icons-vue/es/icons/ColumnWidthOutlined.mjs";
8
+ import ee from "../../../node_modules/@ant-design/icons-vue/es/icons/CopyOutlined.mjs";
9
+ import te from "../../../node_modules/@ant-design/icons-vue/es/icons/DatabaseOutlined.mjs";
10
+ import ne from "../../../node_modules/@ant-design/icons-vue/es/icons/DeleteOutlined.mjs";
11
+ import re from "../../../node_modules/@ant-design/icons-vue/es/icons/DownOutlined.mjs";
12
+ import ie from "../../../node_modules/@ant-design/icons-vue/es/icons/EllipsisOutlined.mjs";
13
+ import ae from "../../../node_modules/@ant-design/icons-vue/es/icons/EyeOutlined.mjs";
14
+ import oe from "../../../node_modules/@ant-design/icons-vue/es/icons/FileAddOutlined.mjs";
15
+ import se from "../../../node_modules/@ant-design/icons-vue/es/icons/FormatPainterOutlined.mjs";
16
+ import ce from "../../../node_modules/@ant-design/icons-vue/es/icons/FullscreenExitOutlined.mjs";
17
+ import le from "../../../node_modules/@ant-design/icons-vue/es/icons/FullscreenOutlined.mjs";
18
+ import ue from "../../../node_modules/@ant-design/icons-vue/es/icons/ItalicOutlined.mjs";
19
+ import de from "../../../node_modules/@ant-design/icons-vue/es/icons/LeftOutlined.mjs";
20
+ import fe from "../../../node_modules/@ant-design/icons-vue/es/icons/MinusOutlined.mjs";
21
+ import pe from "../../../node_modules/@ant-design/icons-vue/es/icons/OrderedListOutlined.mjs";
22
+ import me from "../../../node_modules/@ant-design/icons-vue/es/icons/PictureOutlined.mjs";
23
+ import he from "../../../node_modules/@ant-design/icons-vue/es/icons/PlusOutlined.mjs";
24
+ import ge from "../../../node_modules/@ant-design/icons-vue/es/icons/RedoOutlined.mjs";
25
+ import _e from "../../../node_modules/@ant-design/icons-vue/es/icons/ReloadOutlined.mjs";
26
+ import ve from "../../../node_modules/@ant-design/icons-vue/es/icons/RightOutlined.mjs";
27
+ import ye from "../../../node_modules/@ant-design/icons-vue/es/icons/ScissorOutlined.mjs";
28
+ import be from "../../../node_modules/@ant-design/icons-vue/es/icons/TableOutlined.mjs";
29
+ import xe from "../../../node_modules/@ant-design/icons-vue/es/icons/UnderlineOutlined.mjs";
30
+ import Se from "../../../node_modules/@ant-design/icons-vue/es/icons/UndoOutlined.mjs";
31
+ import Ce from "../../../node_modules/@ant-design/icons-vue/es/icons/UnorderedListOutlined.mjs";
32
+ import we from "../../../node_modules/@ant-design/icons-vue/es/icons/ZoomInOutlined.mjs";
33
+ import Te from "../../../node_modules/@ant-design/icons-vue/es/icons/ZoomOutOutlined.mjs";
34
+ import { useFitWidthZoom as Ee } from "./composables/use-fit-width-zoom.mjs";
35
+ import { CONTRACT_TEXT_STYLE_PRESETS as s, DEFAULT_CONTRACT_FONT_FAMILY as De, DEFAULT_FONT_SIZE_PRESETS as Oe, DEFAULT_TEXT_ALIGN_OPTIONS as ke, resolveFontFamilyOptions as Ae } from "./constants.mjs";
36
+ import { isSafeContractImageUrl as je } from "./utils/image-url.mjs";
37
+ import { MAX_CONTRACT_IMAGE_DIMENSION as Me, normalizeContractImageDimension as Ne, processContractImageFile as Pe } from "./utils/content-image.mjs";
38
+ import { inferContextVariableLabel as Fe, resolveContextVariableWidth as Ie } from "./utils/context-variable.mjs";
39
+ import { isContractTemplateFieldType as Le } from "./types.mjs";
40
+ import { ContractTemplateLocationRuleBuildError as Re, SIGNING_PLACEMENT_MIME as ze, SIGNING_PLACEMENT_TYPE_LABELS as Be, applySigningPlacementPatch as Ve, buildContractLocationRules as He, buildSigningPlacementLocationRules as Ue, canMutateSigningPlacements as We, clampSigningPlacement as Ge, createSigningPlacement as Ke, getSigningPlacementDefaultSize as qe, resolveSigningPlacementToolItems as Je, scaleSigningPlacementToPage as Ye, serializeSigningPlacementDragPayload as Xe } from "./utils/signing-placement.mjs";
41
+ import { DEFAULT_FIELD_STYLE as Ze, DEFAULT_FIELD_TYPES as Qe, DEFAULT_PAGE_SIZE as $e, PAGE_SIZE_OPTIONS as et, buildTemplatePreviewPages as tt, cloneTemplateValue as nt, collectTemplateLocationRuleExportErrors as rt, createBlankPage as it, createBlankTemplate as at, createDefaultPage as ot, createTemplateVariable as st, exportTemplateValue as ct, getFieldOption as lt, getPageSizeOption as ut, normalizeContractTemplateMaxPages as dt, normalizeTemplateValue as ft, resolvePageSize as pt, syncTemplateVariablesWithPages as mt, validateTemplateValue as ht } from "./composables/use-template-designer.mjs";
42
+ import gt from "./DesignerPage.mjs";
43
+ import _t from "./ContractTemplatePreviewPage.mjs";
44
+ import vt from "./TableContextMenu.mjs";
45
+ import yt from "./TableSizePicker.mjs";
46
+ import { DEFAULT_DRAFT_CACHE_INTERVAL as bt, DEFAULT_DRAFT_CACHE_KEY as xt, DEFAULT_DRAFT_CACHE_MAX_BYTES as c, clearTemplateDraftCache as St, createDraftCacheStatus as Ct, formatDraftCacheSavedAt as wt, getBrowserDraftCacheStorage as Tt, isBlankTemplateDraftValue as Et, loadTemplateDraftCache as Dt, saveTemplateDraftCache as Ot } from "./composables/use-template-draft-cache.mjs";
47
+ import kt from "./SigningPlacementInspector.mjs";
48
+ import { resolveFieldTypeIcon as At, resolveSigningPlacementTypeIcon as jt } from "./utils/template-tool-icons.mjs";
49
+ import { Fragment as l, Teleport as Mt, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createTextVNode as h, createVNode as g, defineComponent as _, nextTick as v, normalizeClass as y, normalizeStyle as Nt, onBeforeUnmount as Pt, onMounted as Ft, openBlock as b, ref as x, renderList as S, resolveDynamicComponent as It, toDisplayString as C, unref as w, vShow as Lt, watch as Rt, withCtx as T, withDirectives as zt, withModifiers as Bt } from "vue";
50
+ import { Alert as Vt, Button as E, Empty as Ht, Input as D, InputNumber as Ut, Modal as Wt, Popover as Gt, Select as O, Switch as Kt, Tag as qt, Tooltip as k } from "ant-design-vue";
51
+ import { useElementSize as Jt } from "@vueuse/core";
28
52
  //#region src/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue?vue&type=script&setup=true&lang.ts
29
- var it = { class: "gd-contract-template-designer__sidebar" }, at = { class: "gd-contract-template-designer__panel" }, ot = { class: "gd-contract-template-designer__panel-head" }, st = ["onClick"], ct = {
53
+ var Yt = ["aria-label", "aria-expanded"], Xt = { class: "gd-contract-template-designer__panel-stack" }, Zt = { class: "gd-contract-template-designer__panel gd-contract-template-designer__panel--navigation" }, Qt = { class: "gd-contract-template-designer__panel-head" }, $t = { class: "gd-contract-template-designer__panel-actions" }, en = ["onClick"], tn = { class: "gd-contract-template-designer__page-nav-actions" }, nn = {
30
54
  key: 0,
31
55
  class: "gd-contract-template-designer__page-config"
32
- }, lt = { class: "gd-contract-template-designer__form-row" }, ut = { class: "gd-contract-template-designer__page-size-note" }, dt = { class: "gd-contract-template-designer__panel" }, ft = { class: "gd-contract-template-designer__panel-head" }, pt = ["disabled", "onClick"], mt = { class: "gd-contract-template-designer__workspace" }, ht = { class: "gd-contract-template-designer__workspace-header" }, gt = { class: "gd-contract-template-designer__workspace-meta" }, _t = { class: "gd-contract-template-designer__workspace-actions" }, vt = { class: "gd-contract-template-designer__workspace-controls" }, yt = { class: "gd-contract-template-designer__zoom" }, bt = { class: "gd-contract-template-designer__workspace-buttons" }, xt = { class: "gd-contract-template-designer__toolbar" }, St = { class: "gd-contract-template-designer__toolbar-section gd-contract-template-designer__toolbar-section--main" }, Ct = { class: "gd-contract-template-designer__toolbar-group" }, wt = { class: "gd-contract-template-designer__toolbar-group gd-contract-template-designer__toolbar-group--style" }, Tt = { class: "gd-contract-template-designer__toolbar-group gd-contract-template-designer__toolbar-group--format" }, Et = { class: "gd-contract-template-designer__toolbar-group gd-contract-template-designer__toolbar-group--typography" }, Dt = ["value", "disabled"], Ot = { class: "gd-contract-template-designer__toolbar-group" }, kt = { class: "gd-contract-template-designer__toolbar-group gd-contract-template-designer__toolbar-group--table" }, At = { class: "gd-contract-template-designer__popover" }, jt = { class: "gd-contract-template-designer__grid-form" }, Mt = { class: "gd-contract-template-designer__switch-row" }, Nt = { class: "gd-contract-template-designer__popover-actions" }, Pt = { class: "gd-contract-template-designer__popover" }, Ft = { class: "gd-contract-template-designer__table-actions" }, It = {
56
+ }, rn = { class: "gd-contract-template-designer__form-row" }, an = { class: "gd-contract-template-designer__page-size-note" }, on = { class: "gd-contract-template-designer__panel gd-contract-template-designer__panel--navigation" }, sn = { class: "gd-contract-template-designer__panel-head" }, cn = ["onClick"], ln = { class: "gd-contract-template-designer__panel gd-contract-template-designer__panel--navigation" }, un = { class: "gd-contract-template-designer__panel-head" }, dn = ["onClick"], fn = { class: "gd-contract-template-designer__workspace-header" }, pn = { class: "gd-contract-template-designer__workspace-meta" }, mn = { class: "gd-contract-template-designer__workspace-actions" }, hn = { class: "gd-contract-template-designer__workspace-controls" }, gn = { class: "gd-contract-template-designer__zoom" }, _n = { class: "gd-contract-template-designer__workspace-buttons" }, vn = { class: "gd-contract-template-designer__toolbar" }, yn = { class: "gd-contract-template-designer__toolbar-group" }, bn = { class: "gd-contract-template-designer__toolbar-group gd-contract-template-designer__toolbar-group--style" }, xn = { class: "gd-contract-template-designer__toolbar-group gd-contract-template-designer__toolbar-group--format" }, Sn = { class: "gd-contract-template-designer__toolbar-group gd-contract-template-designer__toolbar-group--insert" }, Cn = { class: "gd-contract-template-designer__popover gd-contract-template-designer__control-insert-popover" }, wn = { class: "gd-contract-template-designer__text-menu-control-options" }, Tn = ["aria-label", "onClick"], En = { class: "gd-contract-template-designer__popover gd-contract-template-designer__image-insert-popover" }, Dn = {
57
+ class: "gd-contract-template-designer__image-size-fields",
58
+ role: "group",
59
+ "aria-label": "图片尺寸"
60
+ }, On = { class: "gd-contract-template-designer__toolbar-more" }, kn = { class: "gd-contract-template-designer__toolbar-extra" }, An = { class: "gd-contract-template-designer__toolbar-group gd-contract-template-designer__toolbar-group--typography" }, jn = ["value", "disabled"], Mn = { class: "gd-contract-template-designer__toolbar-group gd-contract-template-designer__toolbar-group--cleanup" }, Nn = { class: "gd-contract-template-designer__toolbar-group gd-contract-template-designer__toolbar-group--table" }, Pn = { class: "gd-contract-template-designer__popover" }, Fn = { class: "gd-contract-template-designer__switch-row" }, In = { class: "gd-contract-template-designer__popover" }, Ln = { class: "gd-contract-template-designer__table-actions" }, Rn = {
33
61
  key: 0,
34
62
  class: "gd-contract-template-designer__validation"
35
- }, Lt = {
63
+ }, zn = {
36
64
  key: 0,
37
65
  class: "gd-contract-template-designer__validation-list"
38
- }, Rt = ["onClick"], zt = { class: "gd-contract-template-designer__canvas" }, Bt = { class: "gd-contract-template-designer__inspector" }, Vt = { class: "gd-contract-template-designer__panel" }, Ht = [
66
+ }, Bn = ["onClick"], Vn = ["aria-label", "aria-expanded"], Hn = { class: "gd-contract-template-designer__panel-stack" }, Un = { class: "gd-contract-template-designer__panel gd-contract-template-designer__panel--tools" }, Wn = [
39
67
  "disabled",
40
68
  "onDragstart",
41
69
  "onClick"
42
- ], Ut = { class: "gd-contract-template-designer__panel" }, Wt = { class: "gd-contract-template-designer__panel-head" }, Gt = {
70
+ ], Gn = {
71
+ class: "gd-contract-template-designer__tool-item-icon",
72
+ "aria-hidden": "true"
73
+ }, Kn = { class: "gd-contract-template-designer__tool-item-copy" }, qn = {
74
+ key: 0,
75
+ class: "gd-contract-template-designer__panel gd-contract-template-designer__panel--tools"
76
+ }, Jn = { class: "gd-contract-template-designer__panel-head" }, Yn = { class: "gd-contract-template-designer__panel-actions" }, Xn = [
77
+ "disabled",
78
+ "onDragstart",
79
+ "onClick"
80
+ ], Zn = {
81
+ class: "gd-contract-template-designer__tool-item-icon",
82
+ "aria-hidden": "true"
83
+ }, Qn = { class: "gd-contract-template-designer__signing-tool-copy" }, $n = { class: "gd-contract-template-designer__signing-tool-label" }, er = {
84
+ key: 2,
85
+ class: "gd-contract-template-designer__panel gd-contract-template-designer__panel--properties"
86
+ }, tr = { class: "gd-contract-template-designer__panel-head" }, nr = {
43
87
  key: 0,
44
88
  class: "gd-contract-template-designer__panel-actions"
45
- }, Kt = { class: "gd-contract-template-designer__form-row" }, qt = { class: "gd-contract-template-designer__form-row" }, Jt = { class: "gd-contract-template-designer__form-row" }, Yt = { class: "gd-contract-template-designer__form-row" }, Xt = { class: "gd-contract-template-designer__form-row" }, Zt = { class: "gd-contract-template-designer__form-row" }, Qt = {
89
+ }, rr = { class: "gd-contract-template-designer__form-row" }, ir = { class: "gd-contract-template-designer__form-row" }, ar = { class: "gd-contract-template-designer__form-row" }, or = { class: "gd-contract-template-designer__form-row" }, sr = { class: "gd-contract-template-designer__form-row" }, cr = { class: "gd-contract-template-designer__form-row" }, lr = {
46
90
  key: 0,
47
91
  class: "gd-contract-template-designer__switch-grid"
48
- }, $t = { class: "gd-contract-template-designer__switch-row" }, en = {
92
+ }, ur = { class: "gd-contract-template-designer__switch-row" }, dr = {
49
93
  key: 0,
50
94
  class: "gd-contract-template-designer__form-row is-compact"
51
- }, tn = {
95
+ }, fr = {
52
96
  key: 1,
53
97
  class: "gd-contract-template-designer__form-row"
54
- }, nn = { class: "gd-contract-template-designer__form-row" }, rn = { class: "gd-contract-template-designer__form-row" }, an = { class: "gd-contract-template-designer__form-row" }, on = { class: "gd-contract-template-designer__form-row" }, sn = { class: "gd-contract-template-designer__switch-grid" }, cn = { class: "gd-contract-template-designer__switch-row" }, ln = { class: "gd-contract-template-designer__switch-row" }, un = { class: "gd-contract-template-designer__switch-row" }, dn = {
98
+ }, pr = { class: "gd-contract-template-designer__form-row" }, mr = { class: "gd-contract-template-designer__form-row" }, hr = { class: "gd-contract-template-designer__form-row" }, gr = { class: "gd-contract-template-designer__form-row" }, _r = { class: "gd-contract-template-designer__switch-grid" }, vr = { class: "gd-contract-template-designer__switch-row" }, yr = { class: "gd-contract-template-designer__switch-row" }, br = { class: "gd-contract-template-designer__switch-row" }, xr = {
55
99
  key: 0,
56
100
  class: "gd-contract-template-designer__switch-row"
57
- }, fn = { class: "gd-contract-template-designer__form-row" }, pn = { class: "gd-contract-template-designer__form-row" }, mn = { class: "gd-contract-template-designer__form-row" }, hn = ["value", "disabled"], gn = { class: "gd-contract-template-designer__form-row" }, _n = ["value", "disabled"], vn = { class: "gd-contract-template-designer__form-row" }, yn = ["value", "disabled"], bn = { class: "gd-contract-template-designer__form-row" }, xn = { class: "gd-contract-template-designer__form-row" }, Sn = { class: "gd-contract-template-designer__form-row" }, Cn = { class: "gd-contract-template-designer__context-menu-row" }, wn = ["value"], Tn = { class: "gd-contract-template-designer__context-menu-row" }, En = { class: "gd-contract-template-designer__context-menu-row" }, Dn = ["innerHTML"], On = { class: "gd-contract-template-designer__submit-data" }, kn = .5, An = 1.5, jn = .1, Mn = 128, Nn = 108, Pn = 48, Fn = 24, In = 10, Ln = 48, Rn = /* @__PURE__ */ We({
101
+ }, Sr = { class: "gd-contract-template-designer__form-row" }, Cr = { class: "gd-contract-template-designer__form-row" }, wr = { class: "gd-contract-template-designer__form-row" }, Tr = ["value", "disabled"], Er = { class: "gd-contract-template-designer__form-row" }, Dr = ["value", "disabled"], Or = { class: "gd-contract-template-designer__form-row" }, kr = ["value", "disabled"], Ar = { class: "gd-contract-template-designer__form-row" }, jr = { class: "gd-contract-template-designer__form-row" }, Mr = { class: "gd-contract-template-designer__form-row" }, Nr = {
102
+ class: "gd-contract-template-designer__image-size-fields",
103
+ role: "group",
104
+ "aria-label": "图片尺寸"
105
+ }, Pr = { class: "gd-contract-template-designer__popover-actions" }, Fr = {
106
+ class: "gd-contract-template-designer__text-menu-row",
107
+ role: "group",
108
+ "aria-label": "编辑历史与剪贴板"
109
+ }, Ir = {
110
+ key: 0,
111
+ class: "gd-contract-template-designer__text-menu-quick-insert",
112
+ role: "group",
113
+ "aria-label": "光标处插入"
114
+ }, Lr = {
115
+ class: "gd-contract-template-designer__text-menu-row gd-contract-template-designer__text-menu-row--controls",
116
+ role: "group",
117
+ "aria-label": "文字样式"
118
+ }, Rr = ["value"], zr = ["aria-label"], Br = { class: "gd-contract-template-designer__text-menu-control-head" }, Vr = { class: "gd-contract-template-designer__text-menu-control-options" }, Hr = ["aria-label", "onClick"], Ur = ["disabled"], Wr = {
119
+ class: "gd-contract-template-designer__text-menu-bind-list",
120
+ role: "listbox",
121
+ "aria-label": "已有正文控件"
122
+ }, Gr = ["onClick"], Kr = { class: "gd-contract-template-designer__text-menu-bind-item-label" }, qr = { class: "gd-contract-template-designer__text-menu-bind-item-meta" }, Jr = {
123
+ key: 0,
124
+ class: "gd-contract-template-designer__text-menu-bind-empty"
125
+ }, Yr = {
126
+ class: "gd-contract-template-designer__text-menu-row",
127
+ role: "group",
128
+ "aria-label": "常用格式与列表"
129
+ }, Xr = {
130
+ class: "gd-contract-template-designer__text-menu-row gd-contract-template-designer__text-menu-row--cleanup",
131
+ role: "group",
132
+ "aria-label": "清理格式"
133
+ }, Zr = {
134
+ class: "gd-contract-template-designer__sr-status",
135
+ "aria-live": "polite"
136
+ }, Qr = { class: "gd-contract-template-designer__preview" }, $r = { class: "gd-contract-template-designer__submit-data" }, ei = .5, ti = 1.5, ni = .1, ri = 128, ii = 108, ai = 48, oi = 24, si = 10, ci = 48, li = 304, ui = 300, di = 288, fi = 196, A = 12, pi = /* @__PURE__ */ _({
58
137
  name: "ProContractTemplateDesigner",
59
138
  __name: "ProContractTemplateDesigner",
60
139
  props: {
@@ -67,9 +146,12 @@ var it = { class: "gd-contract-template-designer__sidebar" }, at = { class: "gd-
67
146
  type: Boolean,
68
147
  default: !1
69
148
  },
70
- pageSize: { default: () => ye },
71
- variableTypes: { default: () => c },
72
- defaultVariableStyle: { default: () => ve },
149
+ pageSize: { default: () => $e },
150
+ maxPages: { default: 50 },
151
+ imageCompression: { type: [Object, Boolean] },
152
+ imageUpload: {},
153
+ variableTypes: { default: () => Qe },
154
+ defaultVariableStyle: { default: () => Ze },
73
155
  fontFamilies: { default: void 0 },
74
156
  fontFamilyMode: { default: "append" },
75
157
  showSubmitDataViewer: {
@@ -80,13 +162,17 @@ var it = { class: "gd-contract-template-designer__sidebar" }, at = { class: "gd-
80
162
  type: Boolean,
81
163
  default: !0
82
164
  },
165
+ showSigningPlacementTools: {
166
+ type: Boolean,
167
+ default: !1
168
+ },
83
169
  enableDraftCache: {
84
170
  type: Boolean,
85
171
  default: !0
86
172
  },
87
- draftCacheKey: { default: Ie },
88
- draftCacheInterval: { default: Fe },
89
- draftCacheMaxBytes: { default: l },
173
+ draftCacheKey: { default: xt },
174
+ draftCacheInterval: { default: bt },
175
+ draftCacheMaxBytes: { default: c },
90
176
  showDraftCacheStatus: {
91
177
  type: Boolean,
92
178
  default: !0
@@ -97,16 +183,41 @@ var it = { class: "gd-contract-template-designer__sidebar" }, at = { class: "gd-
97
183
  "change",
98
184
  "variable-add",
99
185
  "validate",
100
- "draft-cache-change"
186
+ "draft-cache-change",
187
+ "page-limit",
188
+ "image-error",
189
+ "signing-placement-add",
190
+ "signing-placement-change",
191
+ "signing-placement-remove",
192
+ "signing-placement-select"
101
193
  ],
102
- setup(c, { expose: Fe, emit: Ie }) {
103
- let l = c, We = Ie, Rn = y(), O = y(Ae(l.modelValue, l.pageSize)), k = y(""), A = y(O.value.pages[0]?.id ?? ""), zn = y(!1), j = y([]), M = /* @__PURE__ */ new Map(), Bn = y(!1), Vn = y(""), Hn = y(!1), Un = y(""), Wn = y(!1), Gn = y(""), N = y(1), P = y(!1), Kn = y({}), qn = y(), F = y(""), I = y(!1), L = y(!1), Jn = y(), R = y(Re("idle", "暂无本地草稿")), z = y({
194
+ setup(Qe, { expose: bt, emit: xt }) {
195
+ let c = Qe, _ = xt, pi = x(), mi = x(), hi = x(), gi = x(), _i = x(), vi = x();
196
+ function yi(e) {
197
+ if (!e || !Array.isArray(e.pages) || !Array.isArray(e.signingPlacements)) return [];
198
+ try {
199
+ return ht(e).filter((e) => e.type === "signing-placement");
200
+ } catch {
201
+ return [];
202
+ }
203
+ }
204
+ let bi = x(yi(c.modelValue)), j = x(ft(c.modelValue, c.pageSize)), M = x(""), N = x(""), P = x(j.value.pages[0]?.id ?? ""), xi = x(!1), Si = x([]), F = /* @__PURE__ */ new Map(), Ci = x(!1), wi = x(""), Ti = x(!1), Ei = x(), Di = x(!1), Oi = x(""), I = x(1), ki = x(!1), Ai = x(!1), ji = x(!1), Mi = x(!1), Ni = x({}), Pi = x(), Fi = x(""), L = x(!1), Ii = x(!1), Li = x(!1), Ri = x(!1), zi = x(""), Bi = x(), Vi = x(), Hi = x(""), Ui = x(!1), R = x(), Wi = x(), Gi = x(!1), Ki = x(""), z = x(), qi = x(), B = x(), Ji = x(), Yi = x(), Xi = x(), Zi = x(""), Qi = x(Ct("idle", "暂无本地草稿")), $i = x({
104
205
  rows: 3,
105
206
  cols: 3,
106
207
  withHeaderRow: !0
107
- }), B = d(() => l.readonly || l.disabled), Yn = d(() => !!l.enableDraftCache && !B.value), V = d(() => O.value.variables.find((e) => e.key === k.value)), H = d(() => O.value.pages.find((e) => e.id === A.value) ?? O.value.pages[0]), U = d(() => je(H.value?.pageSize, O.value.pageSize)), Xn = d(() => zn.value && j.value.length === 0), Zn = d(() => zn.value ? Xn.value ? "校验通过,正文变量与变量配置一致" : `发现 ${j.value.length} 个校验问题` : ""), Qn = d(() => `${H.value?.title || "合同正文"} · ${U.value.label} · 共 ${O.value.pages.length} 页`), $n = d(() => {
108
- switch (R.value.type) {
109
- case "saved": return `草稿已缓存 ${ze(R.value.savedAt)}`;
208
+ }), ea, ta, na = "", V = u(() => c.readonly || c.disabled), ra = u(() => !!c.enableDraftCache && !V.value), H = u(() => j.value.variables.find((e) => e.key === M.value)), U = u(() => j.value.signingPlacements ?? []), ia = u(() => Ei.value ? tt(Ei.value) : []), aa = u(() => U.value.find((e) => e.id === N.value)), oa = u(() => U.value.map((e) => {
209
+ let t = j.value.pages.findIndex((t) => t.id === e.pageId);
210
+ return {
211
+ placement: e,
212
+ label: Be[e.type],
213
+ detail: `${Be[e.type]} · 第 ${Math.max(0, t) + 1} 页`
214
+ };
215
+ })), sa = u(() => {
216
+ let e = aa.value?.pageId;
217
+ return Y(j.value.pages.find((t) => t.id === e));
218
+ }), W = u(() => j.value.pages.find((e) => e.id === P.value) ?? j.value.pages[0]), ca = u(() => pt(W.value?.pageSize, j.value.pageSize)), la = u(() => xi.value && Si.value.length === 0), ua = u(() => xi.value ? la.value ? "校验通过,正文变量与变量配置一致" : `发现 ${Si.value.length} 个校验问题` : ""), da = u(() => `${W.value?.title || "合同正文"} · ${ca.value.label} · 共 ${j.value.pages.length} 页`), fa = u(() => {
219
+ switch (Qi.value.type) {
220
+ case "saved": return `草稿已缓存 ${wt(Qi.value.savedAt)}`;
110
221
  case "restored": return "已恢复本地草稿";
111
222
  case "too-large": return "草稿过大,未缓存";
112
223
  case "unavailable":
@@ -115,17 +226,17 @@ var it = { class: "gd-contract-template-designer__sidebar" }, at = { class: "gd-
115
226
  case "cleared": return "草稿缓存已清理";
116
227
  default: return "";
117
228
  }
118
- }), er = d(() => ({
119
- "is-success": R.value.type === "saved" || R.value.type === "restored",
120
- "is-warning": R.value.type === "too-large",
121
- "is-error": R.value.type === "unavailable" || R.value.type === "read-failed" || R.value.type === "write-failed"
122
- })), tr = d(() => `${Math.round(N.value * 100)}%`), nr = d(() => _e(l.fontFamilies, l.fontFamilyMode)), rr = d(() => nr.value.map((e) => ({
229
+ }), pa = u(() => ({
230
+ "is-success": Qi.value.type === "saved" || Qi.value.type === "restored",
231
+ "is-warning": Qi.value.type === "too-large",
232
+ "is-error": Qi.value.type === "unavailable" || Qi.value.type === "read-failed" || Qi.value.type === "write-failed"
233
+ })), ma = u(() => `${Math.round(I.value * 100)}%`), ha = u(() => Ae(c.fontFamilies, c.fontFamilyMode)), ga = u(() => ha.value.map((e) => ({
123
234
  label: e.label,
124
235
  value: e.value
125
- }))), ir = d(() => me.map((e) => ({
236
+ }))), _a = u(() => s.map((e) => ({
126
237
  label: e.label,
127
238
  value: e.key
128
- }))), ar = ge, or = [
239
+ }))), va = ke, ya = [
129
240
  {
130
241
  label: "正文",
131
242
  value: "paragraph"
@@ -154,13 +265,13 @@ var it = { class: "gd-contract-template-designer__sidebar" }, at = { class: "gd-
154
265
  label: "H6",
155
266
  value: 6
156
267
  }
157
- ], sr = [{
268
+ ], ba = [{
158
269
  label: "实线",
159
270
  value: "solid"
160
271
  }, {
161
272
  label: "虚线",
162
273
  value: "dashed"
163
- }], cr = [
274
+ }], xa = [
164
275
  {
165
276
  label: "完整显示",
166
277
  value: "contain"
@@ -173,51 +284,61 @@ var it = { class: "gd-contract-template-designer__sidebar" }, at = { class: "gd-
173
284
  label: "拉伸填充",
174
285
  value: "fill"
175
286
  }
176
- ], lr = be.map((e) => ({
287
+ ], Sa = et.map((e) => ({
177
288
  label: `${e.label} · ${e.width} × ${e.height}`,
178
289
  value: e.format
179
- })), ur, dr, fr = "", pr = d(() => Math.max(Pn, U.value.width - Mn)), mr = d(() => Math.max(Fn, U.value.height - Nn)), W = d(() => Kn.value[A.value] ?? xr()), hr = d(() => W.value.currentHeadingLevel ?? "paragraph"), gr = d(() => W.value.fontFamily || "Noto Serif SC, Source Han Serif SC, Songti SC, STSong, SimSun, serif"), _r = d(() => W.value.fontSize ?? ve.fontSize ?? 14), vr = d(() => W.value.textColor || ve.color || "#1f2937"), yr = d(() => V.value?.style?.fontFamily || ve.fontFamily || "Noto Serif SC, Source Han Serif SC, Songti SC, STSong, SimSun, serif"), br = d(() => {
180
- let e = he.map((e) => ({
290
+ })), Ca = u(() => Je({ showSigningPlacementTools: c.showSigningPlacementTools })), wa = u(() => c.variableTypes.filter((e) => Le(e?.type))), Ta = u(() => wa.value.map((e) => ({
291
+ ...e,
292
+ icon: At(e.type)
293
+ }))), Ea = u(() => dt(c.maxPages)), Da = u(() => j.value.pages.length >= Ea.value), Oa = u(() => {
294
+ let e = Ki.value.trim().toLowerCase(), t = j.value.variables;
295
+ return e ? t.filter((t) => t.label.toLowerCase().includes(e) || t.key.toLowerCase().includes(e)) : t;
296
+ }), ka = u(() => Math.max(ai, ca.value.width - ri)), Aa = u(() => Math.max(oi, ca.value.height - ii)), G = u(() => Ni.value[P.value] ?? La()), ja = u(() => G.value.currentHeadingLevel ?? "paragraph"), Ma = u(() => G.value.fontFamily || "Noto Serif SC, Source Han Serif SC, Songti SC, STSong, SimSun, serif"), Na = u(() => G.value.fontSize ?? Ze.fontSize ?? 14), Pa = u(() => G.value.textColor || Ze.color || "#1f2937"), Fa = u(() => H.value?.style?.fontFamily || Ze.fontFamily || "Noto Serif SC, Source Han Serif SC, Songti SC, STSong, SimSun, serif"), Ia = u(() => {
297
+ let e = Oe.map((e) => ({
181
298
  label: `${e}px`,
182
299
  value: e
183
- })), t = Er(_r.value), n = Er(F.value), r = /* @__PURE__ */ new Map();
184
- return n && !he.includes(n) && r.set(n, {
300
+ })), t = Ha(Na.value), n = Ha(Fi.value), r = /* @__PURE__ */ new Map();
301
+ return n && !Oe.includes(n) && r.set(n, {
185
302
  label: `使用 ${n}px`,
186
303
  value: n
187
- }), t && !he.includes(t) && r.set(t, {
304
+ }), t && !Oe.includes(t) && r.set(t, {
188
305
  label: n === t ? `使用 ${t}px` : `${t}px`,
189
306
  value: t
190
307
  }), [...Array.from(r.values()), ...e];
191
308
  });
192
- Ze(() => l.modelValue, (e) => {
309
+ Rt(() => c.modelValue, (e) => {
193
310
  if (!e) return;
194
- let t = Ae(e, l.pageSize);
195
- JSON.stringify(t) !== JSON.stringify(O.value) && (O.value = t, A.value = t.pages[0]?.id ?? "", k.value = "", Y(A.value));
196
- }, { deep: !0 }), Ze(() => l.pageSize, (e) => {
197
- O.value = Ae(O.value, e), Y(A.value);
198
- }, { deep: !0 }), Ze(B, (e) => {
199
- e && Q();
200
- }), Ze(() => [
201
- l.enableDraftCache,
202
- l.draftCacheKey,
203
- l.draftCacheInterval,
204
- B.value
311
+ let t = ft(e, c.pageSize);
312
+ bi.value = yi(e), JSON.stringify(t) !== JSON.stringify(j.value) && (j.value = t, P.value = t.pages[0]?.id ?? "", M.value = "", N.value = "", bo(P.value));
313
+ }, { deep: !0 }), Rt(() => c.pageSize, (e) => {
314
+ j.value = ft(j.value, e), bo(P.value);
315
+ }, { deep: !0 }), Rt(Ea, () => {
316
+ bo(j.value.pages[0]?.id);
317
+ }), Rt(V, (e) => {
318
+ e && ($(), L.value = !1, Ii.value = !1);
319
+ }), Rt(U, (e) => {
320
+ N.value && !e.some((e) => e.id === N.value) && (N.value = "", _("signing-placement-select", void 0));
321
+ }, { deep: !0 }), Rt(() => [
322
+ c.enableDraftCache,
323
+ c.draftCacheKey,
324
+ c.draftCacheInterval,
325
+ V.value
205
326
  ], () => {
206
- fr = "", Fr();
207
- }), Ze(P, (e) => {
327
+ na = "", Za();
328
+ }), Rt(ki, (e) => {
208
329
  if (!(typeof document > "u")) {
209
330
  if (e) {
210
- ur = document.body.style.overflow, document.body.style.overflow = "hidden";
331
+ ea = document.body.style.overflow, document.body.style.overflow = "hidden";
211
332
  return;
212
333
  }
213
- document.body.style.overflow = ur ?? "", ur = void 0;
334
+ document.body.style.overflow = ea ?? "", ea = void 0;
214
335
  }
215
- }), Ye(() => {
216
- Nr(), Fr(), Y(A.value), window.addEventListener("pointerdown", Yi, !0), window.addEventListener("keydown", Zi), window.addEventListener("resize", Q), window.addEventListener("scroll", Q, !0);
217
- }), Je(() => {
218
- P.value && typeof document < "u" && (document.body.style.overflow = ur ?? ""), window.removeEventListener("pointerdown", Yi, !0), window.removeEventListener("keydown", Zi), window.removeEventListener("resize", Q), window.removeEventListener("scroll", Q, !0), Pr();
336
+ }), Ft(() => {
337
+ Ya(), Za(), bo(P.value), window.addEventListener("pointerdown", vc, !0), window.addEventListener("keydown", bc), window.addEventListener("resize", $), window.addEventListener("scroll", $, !0);
338
+ }), Pt(() => {
339
+ ki.value && typeof document < "u" && (document.body.style.overflow = ea ?? ""), window.removeEventListener("pointerdown", vc, !0), window.removeEventListener("keydown", bc), window.removeEventListener("resize", $), window.removeEventListener("scroll", $, !0), Xa();
219
340
  });
220
- function xr() {
341
+ function La() {
221
342
  return {
222
343
  isFocused: !1,
223
344
  canUndo: !1,
@@ -229,36 +350,36 @@ var it = { class: "gd-contract-template-designer__sidebar" }, at = { class: "gd-
229
350
  isOrderedList: !1,
230
351
  isTableActive: !1,
231
352
  textAlign: "left",
232
- fontFamily: s,
233
- fontSize: ve.fontSize ?? 14,
234
- textColor: ve.color ?? "#1f2937",
353
+ fontFamily: De,
354
+ fontSize: Ze.fontSize ?? 14,
355
+ textColor: Ze.color ?? "#1f2937",
235
356
  selectionText: ""
236
357
  };
237
358
  }
238
- function Sr(e) {
359
+ function Ra(e) {
239
360
  return e === "left" || e === "center" || e === "right";
240
361
  }
241
- function Cr(e) {
362
+ function za(e) {
242
363
  return typeof e == "number" && Number.isInteger(e) && e >= 1 && e <= 6;
243
364
  }
244
- function wr(e) {
245
- return typeof e == "string" && me.some((t) => t.key === e);
365
+ function Ba(e) {
366
+ return typeof e == "string" && s.some((t) => t.key === e);
246
367
  }
247
- function Tr(e, t = _r.value) {
368
+ function Va(e, t = Na.value) {
248
369
  let n = Number(e);
249
- return Number.isFinite(n) ? Math.min(Ln, Math.max(In, Math.round(n))) : t;
370
+ return Number.isFinite(n) ? Math.min(ci, Math.max(si, Math.round(n))) : t;
250
371
  }
251
- function Er(e) {
372
+ function Ha(e) {
252
373
  let t = String(e || "").trim().match(/(\d+(\.\d+)?)/);
253
374
  if (!t) return;
254
375
  let n = Number(t[1]);
255
- if (Number.isFinite(n)) return Math.min(Ln, Math.max(In, Math.round(n)));
376
+ if (Number.isFinite(n)) return Math.min(ci, Math.max(si, Math.round(n)));
256
377
  }
257
- function G(e = O.value) {
378
+ function Ua(e = j.value) {
258
379
  return {
259
380
  ...e,
260
381
  pages: e.pages.map((e) => {
261
- let t = M.get(e.id);
382
+ let t = F.get(e.id);
262
383
  return {
263
384
  ...e,
264
385
  contentHtml: t?.getHTML() ?? e.contentHtml,
@@ -268,133 +389,230 @@ var it = { class: "gd-contract-template-designer__sidebar" }, at = { class: "gd-
268
389
  };
269
390
  }
270
391
  function K(e) {
271
- let t = Ae(e, l.pageSize);
272
- return O.value = t, zn.value = !1, j.value = [], We("update:modelValue", Se(t)), We("change", Se(t)), t;
273
- }
274
- function Dr(e, t = e.type !== "unchanged") {
275
- R.value = e, t && We("draft-cache-change", { ...e });
392
+ let t = ft(e, c.pageSize);
393
+ return j.value = t, xi.value = !1, Si.value = [], _("update:modelValue", nt(t)), _("change", nt(t)), t;
276
394
  }
277
- function Or() {
278
- return Be();
395
+ function Wa(e, t = e.type !== "unchanged") {
396
+ Qi.value = e, t && _("draft-cache-change", { ...e });
279
397
  }
280
- function kr() {
281
- if (!Yn.value) {
282
- let e = Re("unavailable", "草稿缓存未启用");
283
- return Dr(e), e;
398
+ function Ga() {
399
+ if (!ra.value) {
400
+ let e = Ct("unavailable", "草稿缓存未启用");
401
+ return Wa(e), e;
284
402
  }
285
- let e = Ue({
286
- storage: Or(),
287
- key: l.draftCacheKey,
288
- value: Se(G()),
289
- maxBytes: l.draftCacheMaxBytes,
290
- previousValueSerialized: fr
403
+ let e = Ot({
404
+ storage: Tt(),
405
+ key: c.draftCacheKey,
406
+ value: nt(Ua()),
407
+ maxBytes: c.draftCacheMaxBytes,
408
+ previousValueSerialized: na
291
409
  });
292
- return e.valueSerialized && (fr = e.valueSerialized), e.status.type !== "unchanged" && Dr(e.status), e.status;
410
+ return e.valueSerialized && (na = e.valueSerialized), e.status.type !== "unchanged" && Wa(e.status), e.status;
293
411
  }
294
- function Ar() {
295
- let e = He(Or(), l.draftCacheKey);
296
- return e.valueSerialized && (fr = e.valueSerialized), e.status.type !== "idle" && Dr(e.status), e.value ? Se(e.value) : void 0;
412
+ function Ka() {
413
+ let e = Dt(Tt(), c.draftCacheKey);
414
+ return e.valueSerialized && (na = e.valueSerialized), e.status.type !== "idle" && Wa(e.status), e.value ? nt(e.value) : void 0;
297
415
  }
298
- function jr() {
299
- let e = Le(Or(), l.draftCacheKey);
300
- fr = "", Dr(e);
416
+ function qa() {
417
+ let e = St(Tt(), c.draftCacheKey);
418
+ na = "", Wa(e);
301
419
  }
302
- function Mr() {
303
- return { ...R.value };
420
+ function Ja() {
421
+ return { ...Qi.value };
304
422
  }
305
- function Nr() {
306
- if (!Yn.value || !Ve(l.modelValue)) return;
307
- let e = He(Or(), l.draftCacheKey);
308
- if (e.valueSerialized && (fr = e.valueSerialized), e.value) {
309
- A.value = K(e.value).pages[0]?.id ?? "", k.value = "", Y(A.value), Dr(e.status);
423
+ function Ya() {
424
+ if (!ra.value || !Et(c.modelValue)) return;
425
+ let e = Dt(Tt(), c.draftCacheKey);
426
+ if (e.valueSerialized && (na = e.valueSerialized), e.value) {
427
+ P.value = K(e.value).pages[0]?.id ?? "", M.value = "", bo(P.value), Wa(e.status);
310
428
  return;
311
429
  }
312
- e.status.type !== "idle" && e.status.type !== "invalid" && Dr(e.status);
430
+ e.status.type !== "idle" && e.status.type !== "invalid" && Wa(e.status);
313
431
  }
314
- function Pr() {
315
- dr &&= (clearInterval(dr), void 0);
432
+ function Xa() {
433
+ ta &&= (clearInterval(ta), void 0);
316
434
  }
317
- function Fr() {
318
- if (Pr(), !Yn.value || typeof window > "u") return;
319
- let e = Math.max(1e3, Math.round(Number(l.draftCacheInterval) || 5e3));
320
- dr = window.setInterval(() => {
321
- kr();
435
+ function Za() {
436
+ if (Xa(), !ra.value || typeof window > "u") return;
437
+ let e = Math.max(1e3, Math.round(Number(c.draftCacheInterval) || 5e3));
438
+ ta = window.setInterval(() => {
439
+ Ga();
322
440
  }, e);
323
441
  }
324
- function Ir(e, t) {
325
- t ? M.set(e, t) : M.delete(e);
442
+ function Qa(e, t) {
443
+ t ? F.set(e, t) : F.delete(e);
326
444
  }
327
- function q(e) {
328
- B.value || M.get(H.value?.id ?? A.value)?.runCommand(e);
445
+ function q(e, t = W.value?.id ?? P.value) {
446
+ V.value || F.get(t)?.runCommand(e);
329
447
  }
330
448
  function J(e) {
331
- q(e), Q();
449
+ q(e), $();
450
+ }
451
+ function $a(e) {
452
+ let t = R.value?.pageId;
453
+ t && (F.get(t)?.focus(), Zi.value = typeof document < "u" && document.execCommand(e) ? `${e === "copy" ? "已复制" : e === "cut" ? "已剪切" : "已粘贴"}` : "浏览器未授权剪贴板操作,请使用系统快捷键。", $());
454
+ }
455
+ function eo(e) {
456
+ let t = K(mt(e));
457
+ return M.value && !t.variables.some((e) => e.key === M.value) && (M.value = ""), t;
332
458
  }
333
- function Lr(e) {
334
- let t = K(Me(e));
335
- return k.value && !t.variables.some((e) => e.key === k.value) && (k.value = ""), t;
459
+ function to(e) {
460
+ eo({
461
+ ...j.value,
462
+ pages: j.value.pages.map((t) => t.id === e.id ? e : t)
463
+ }), bo(e.id);
336
464
  }
337
- function Rr(e) {
338
- Lr({
339
- ...O.value,
340
- pages: O.value.pages.map((t) => t.id === e.id ? e : t)
341
- }), Y(e.id);
465
+ function Y(e) {
466
+ return pt(e?.pageSize, j.value.pageSize);
342
467
  }
343
- function zr(e) {
344
- return je(e?.pageSize, O.value.pageSize);
468
+ function no(e) {
469
+ return U.value.filter((t) => t.pageId === e);
345
470
  }
346
- function Br(e) {
347
- if (B.value || !H.value) return;
348
- let t = ke(e);
471
+ function X(e) {
472
+ return {
473
+ ...e,
474
+ ...e.sealTypes ? { sealTypes: [...e.sealTypes] } : {}
475
+ };
476
+ }
477
+ function Z(e) {
478
+ let t = e ? U.value.find((t) => t.id === e) : void 0;
479
+ N.value = t?.id ?? "", t && (M.value = "", P.value = t.pageId), _("signing-placement-select", t ? X(t) : void 0);
480
+ }
481
+ function ro(e) {
482
+ Z(e.id);
483
+ }
484
+ function io(e) {
485
+ let t = new Set(e);
486
+ t.size && (bi.value = bi.value.filter((e) => e.type !== "signing-placement" || !t.has(e.id)));
487
+ }
488
+ function ao(e) {
489
+ bi.value = bi.value.filter((t) => t.type !== "signing-placement" || t.pageId !== e);
490
+ }
491
+ function oo(e, t = []) {
492
+ return io(t), K({
493
+ ...j.value,
494
+ signingPlacements: e
495
+ });
496
+ }
497
+ function so(e, t = W.value?.id ?? j.value.pages[0]?.id, n) {
498
+ if (!We(c.readonly, c.disabled) || !t) return;
499
+ let r = j.value.pages.find((e) => e.id === t);
500
+ if (!r) return;
501
+ let i = Ke(e, t, Y(r), { ...n ?? F.get(t)?.getVisibleSigningPlacementPosition(e) });
502
+ return oo([...U.value, i]), P.value = t, Z(i.id), _("signing-placement-add", X(i)), i;
503
+ }
504
+ function co(e, t, n, r) {
505
+ let i = qe(t.type);
506
+ so(t.type, e, {
507
+ x: n - i.width / 2,
508
+ y: r - i.height / 2
509
+ });
510
+ }
511
+ function lo(e) {
512
+ return so(e.type);
513
+ }
514
+ function uo(e, t) {
515
+ if (!We(c.readonly, c.disabled)) {
516
+ e.preventDefault();
517
+ return;
518
+ }
519
+ e.dataTransfer?.setData(ze, Xe(t)), e.dataTransfer && (e.dataTransfer.effectAllowed = "copy");
520
+ }
521
+ function fo(e) {
522
+ if (!We(c.readonly, c.disabled)) return;
523
+ let t = j.value.pages.find((t) => t.id === e.pageId);
349
524
  if (!t) return;
350
- let n = H.value.id;
351
- K({
352
- ...O.value,
353
- pages: O.value.pages.map((e) => e.id === n ? {
525
+ let n = Ge({
526
+ ...e,
527
+ ...e.type === "seal" ? {} : { sealTypes: void 0 }
528
+ }, Y(t));
529
+ oo(U.value.map((e) => e.id === n.id ? n : e), [n.id]), N.value = n.id, _("signing-placement-change", X(n));
530
+ }
531
+ function po(e) {
532
+ let t = aa.value;
533
+ if (!t) return;
534
+ let n = j.value.pages.find((e) => e.id === t.pageId);
535
+ n && fo(Ve(t, e, Y(n)));
536
+ }
537
+ function mo(e = aa.value) {
538
+ if (!We(c.readonly, c.disabled) || !e) return;
539
+ let t = j.value.pages.find((t) => t.id === e.pageId);
540
+ if (!t) return;
541
+ let n = Ke(e.type, e.pageId, Y(t), {
542
+ ...X(e),
543
+ id: void 0,
544
+ x: e.x + 16,
545
+ y: e.y + 16
546
+ });
547
+ oo([...U.value, n]), Z(n.id), _("signing-placement-add", X(n));
548
+ }
549
+ function ho(e = aa.value) {
550
+ !We(c.readonly, c.disabled) || !e || (oo(U.value.filter((t) => t.id !== e.id), [e.id]), N.value === e.id && Z(), _("signing-placement-remove", X(e)));
551
+ }
552
+ function go(e) {
553
+ if (V.value || !W.value) return;
554
+ let t = ut(e);
555
+ if (!t) return;
556
+ let n = W.value.id, r = Y(W.value), i = pt(t, j.value.pageSize), a = U.value.map((e) => e.pageId === n ? Ye(e, r, i) : e);
557
+ io(a.filter((e) => e.pageId === n).map((e) => e.id)), K({
558
+ ...j.value,
559
+ pages: j.value.pages.map((e) => e.id === n ? {
354
560
  ...e,
355
- pageSize: je(t, O.value.pageSize)
356
- } : e)
357
- }), Y(n);
561
+ pageSize: i
562
+ } : e),
563
+ signingPlacements: a
564
+ }), a.filter((e) => e.pageId === n).forEach((e) => _("signing-placement-change", X(e))), bo(n);
358
565
  }
359
- function Vr(e) {
566
+ function _o(e) {
360
567
  return {
361
568
  type: "doc",
362
569
  content: e.length ? e : [{ type: "paragraph" }]
363
570
  };
364
571
  }
365
- function Hr(e) {
572
+ function vo(e) {
366
573
  return e.replace(/<p>\s*(<br>)?\s*<\/p>/gi, "").trim().length === 0;
367
574
  }
368
- function Ur(e, t, n) {
369
- let r = e.contentJson?.content, i = [...t, ...r?.length ? r : []], a = Hr(e.contentHtml || "") ? "" : e.contentHtml;
575
+ function yo(e, t, n) {
576
+ let r = e.contentJson?.content, i = [...t, ...r?.length ? r : []], a = vo(e.contentHtml || "") ? "" : e.contentHtml;
370
577
  return {
371
578
  ...e,
372
579
  contentHtml: `${n}${a}`,
373
- contentJson: Vr(i)
580
+ contentJson: _o(i)
374
581
  };
375
582
  }
376
- function Y(e = A.value) {
377
- B.value || (Vn.value = e, !Bn.value && Ge(() => Wr()));
583
+ function bo(e = P.value) {
584
+ if (V.value) return;
585
+ let t = j.value.pages.findIndex((e) => e.id === wi.value), n = j.value.pages.findIndex((t) => t.id === e);
586
+ (!wi.value || t < 0 || n >= 0 && n < t) && (wi.value = e), !Ci.value && v(() => So());
587
+ }
588
+ function xo(e) {
589
+ let t = Ea.value;
590
+ Zi.value = `合同最多支持 ${t} 页`, _("page-limit", t, e);
378
591
  }
379
- async function Wr() {
380
- if (!Bn.value) {
381
- Bn.value = !0;
592
+ async function So() {
593
+ if (!Ci.value) {
594
+ Ci.value = !0;
382
595
  try {
383
- let e = Vn.value;
384
- Vn.value = "";
385
- let t = 0;
386
- for (; t < 40;) {
387
- await Ge();
388
- let n = G().pages, r = Math.max(0, n.findIndex((t) => t.id === e)), i = !1;
596
+ let e = wi.value;
597
+ wi.value = "";
598
+ let t = 0, n = Math.max(40, Ea.value + 1);
599
+ for (; t < n;) {
600
+ await v();
601
+ let n = Ua().pages, r = Math.max(0, n.findIndex((t) => t.id === e)), i = !1;
389
602
  for (let t = r; t < n.length; t += 1) {
390
- let r = n[t], a = M.get(r.id)?.splitOverflowContent();
603
+ let r = n[t];
604
+ if (t === n.length - 1 && n.length >= Ea.value && F.get(r.id)?.hasOverflowContent()) {
605
+ xo("auto-pagination");
606
+ break;
607
+ }
608
+ let a = F.get(r.id)?.splitOverflowContent();
391
609
  if (!a) continue;
392
- let o = G().pages, ee = o.findIndex((e) => e.id === r.id);
610
+ let o = Ua().pages, ee = o.findIndex((e) => e.id === r.id);
393
611
  if (ee < 0) break;
394
612
  o[ee] = a.page;
395
613
  let te = o[ee + 1];
396
- te ? o[ee + 1] = M.get(te.id)?.prependContent(a.overflowContent) ?? Ur(te, a.overflowContent, a.overflowHtml) : o.push(Ce(o.length + 1, zr(a.page), a.overflowHtml, Vr(a.overflowContent))), Lr({
397
- ...O.value,
614
+ te ? o[ee + 1] = F.get(te.id)?.prependContent(a.overflowContent) ?? yo(te, a.overflowContent, a.overflowHtml) : o.push(it(o.length + 1, Y(a.page), a.overflowHtml, _o(a.overflowContent))), eo({
615
+ ...j.value,
398
616
  pages: o
399
617
  }), e = o[ee + 1]?.id ?? a.page.id, i = !0;
400
618
  break;
@@ -403,53 +621,192 @@ var it = { class: "gd-contract-template-designer__sidebar" }, at = { class: "gd-
403
621
  t += 1;
404
622
  }
405
623
  } finally {
406
- Bn.value = !1, Vn.value && Ge(() => Wr());
624
+ Ci.value = !1, wi.value && v(() => So());
407
625
  }
408
626
  }
409
627
  }
410
- function Gr() {
411
- if (B.value) return;
412
- let e = Te(O.value.pages.length + 1, U.value);
628
+ function Co() {
629
+ if (V.value) return;
630
+ if (Da.value) {
631
+ xo("add");
632
+ return;
633
+ }
634
+ let e = ot(j.value.pages.length + 1, ca.value);
413
635
  K({
414
- ...O.value,
415
- pages: [...O.value.pages, e]
416
- }), A.value = e.id;
636
+ ...j.value,
637
+ pages: [...j.value.pages, e]
638
+ }), P.value = e.id;
639
+ }
640
+ function wo(e) {
641
+ if (V.value) return;
642
+ if (Da.value) {
643
+ xo("duplicate");
644
+ return;
645
+ }
646
+ let t = j.value.pages.findIndex((t) => t.id === e.id);
647
+ if (t < 0) return;
648
+ let n = nt({
649
+ pages: [e],
650
+ variables: [],
651
+ pageSize: j.value.pageSize,
652
+ signingPlacements: []
653
+ }).pages[0], r = it(t + 2, Y(e), n.contentHtml, n.contentJson);
654
+ r.title = `${e.title || `第 ${t + 1} 页`}副本`;
655
+ let i = [...j.value.pages];
656
+ i.splice(t + 1, 0, r);
657
+ let a = no(e.id).map((e) => Ke(e.type, r.id, Y(r), {
658
+ ...X(e),
659
+ id: void 0,
660
+ pageId: r.id
661
+ }));
662
+ K({
663
+ ...j.value,
664
+ pages: i,
665
+ signingPlacements: [...U.value, ...a]
666
+ }), P.value = r.id, a.forEach((e) => _("signing-placement-add", X(e))), a[0] && Z(a[0].id);
667
+ }
668
+ function To(e) {
669
+ if (V.value || j.value.pages.length <= 1) return;
670
+ let t = j.value.pages.findIndex((t) => t.id === e.id);
671
+ if (t < 0) return;
672
+ let n = no(e.id);
673
+ ao(e.id);
674
+ let r = j.value.pages.filter((t) => t.id !== e.id), i = eo({
675
+ ...j.value,
676
+ pages: r,
677
+ signingPlacements: U.value.filter((t) => t.pageId !== e.id)
678
+ });
679
+ P.value = i.pages[Math.min(t, i.pages.length - 1)]?.id ?? "", n.some((e) => e.id === N.value) && Z(), n.forEach((e) => _("signing-placement-remove", X(e)));
417
680
  }
418
- function Kr(e) {
419
- let t = new Set(O.value.variables.map((e) => e.key)), n = 1;
681
+ function Eo(e) {
682
+ if (V.value || j.value.pages.length <= 1) return;
683
+ let t = no(e.id).length;
684
+ if (!t) {
685
+ To(e);
686
+ return;
687
+ }
688
+ Wt.confirm({
689
+ title: "删除合同页面",
690
+ content: `此页包含 ${t} 个签署位置,删除页面会同时移除这些位置,是否继续?`,
691
+ okText: "确认删除",
692
+ okType: "danger",
693
+ cancelText: "取消",
694
+ onOk: () => To(e)
695
+ });
696
+ }
697
+ function Do(e) {
698
+ let t = new Set(j.value.variables.map((e) => e.key)), n = 1;
420
699
  for (; t.has(`${e}_${n}`);) n += 1;
421
700
  return `${e}_${n}`;
422
701
  }
423
- function qr(e) {
702
+ function Oo(e) {
424
703
  let t = e.type ?? "text";
425
- return Ee({
704
+ return st({
426
705
  ...e,
427
706
  type: t,
428
- key: e.key || Kr(t),
429
- label: e.label || Oe(t, l.variableTypes).label
430
- }, l.variableTypes, l.defaultVariableStyle);
707
+ key: e.key || Do(t),
708
+ label: e.label || lt(t, c.variableTypes).label
709
+ }, c.variableTypes, c.defaultVariableStyle);
431
710
  }
432
- function Jr(e, t = H.value?.id ?? O.value.pages[0].id, n) {
433
- if (B.value) return e;
434
- let r = M.get(t)?.insertVariable(e, n), i = !O.value.variables.some((t) => t.key === e.key);
711
+ function ko(e, t = W.value?.id ?? j.value.pages[0].id, n) {
712
+ if (V.value) return e;
713
+ let r = F.get(t)?.insertVariable(e, n), i = !j.value.variables.some((t) => t.key === e.key);
435
714
  return K({
436
- ...O.value,
437
- pages: r ? O.value.pages.map((e) => e.id === r.id ? r : e) : O.value.pages,
438
- variables: i ? [...O.value.variables, e] : O.value.variables
439
- }), k.value = e.key, A.value = t, i && We("variable-add", e), Y(t), e;
715
+ ...j.value,
716
+ pages: r ? j.value.pages.map((e) => e.id === r.id ? r : e) : j.value.pages,
717
+ variables: i ? [...j.value.variables, e] : j.value.variables
718
+ }), M.value = e.key, Z(), P.value = t, i && _("variable-add", e), bo(t), e;
440
719
  }
441
- function Yr(e, t, n, r) {
442
- Q(), Jr(qr({ type: t }), e, {
720
+ function Ao(e) {
721
+ let { width: t, height: n, ...r } = e, i = Ne(t), a = Ne(n);
722
+ return {
723
+ ...r,
724
+ ...i === void 0 ? {} : { width: i },
725
+ ...a === void 0 ? {} : { height: a }
726
+ };
727
+ }
728
+ function jo(e = {}) {
729
+ let t = Ne(Bi.value), n = Ne(Vi.value);
730
+ return {
731
+ ...e,
732
+ ...t === void 0 ? {} : { width: t },
733
+ ...n === void 0 ? {} : { height: n }
734
+ };
735
+ }
736
+ function Mo() {
737
+ zi.value = "", Bi.value = void 0, Vi.value = void 0, Hi.value = "";
738
+ }
739
+ function No(e, t = W.value?.id ?? j.value.pages[0]?.id, n) {
740
+ let r = Ao({
741
+ ...e,
742
+ src: e.src.trim()
743
+ });
744
+ if (!(V.value || !t || !je(r.src) || !r.src || !F.get(t)?.insertContentImage(r, n))) return P.value = t, M.value = "", Z(), r.src;
745
+ }
746
+ function Po(e) {
747
+ return e instanceof Error ? e : /* @__PURE__ */ Error("图片处理失败");
748
+ }
749
+ async function Fo(e, t) {
750
+ t === "toolbar" && (Ui.value = !0, Hi.value = "");
751
+ try {
752
+ return (await Pe(e, {
753
+ source: t,
754
+ compression: c.imageCompression,
755
+ upload: c.imageUpload
756
+ })).src;
757
+ } catch (e) {
758
+ let n = Po(e);
759
+ t === "toolbar" && (Hi.value = n.message), Zi.value = n.message, _("image-error", n, t);
760
+ return;
761
+ } finally {
762
+ t === "toolbar" && (Ui.value = !1);
763
+ }
764
+ }
765
+ async function Io(e) {
766
+ return await Fo(e, "paste") ?? null;
767
+ }
768
+ async function Lo(e, t = {}) {
769
+ if (V.value) return;
770
+ let n = W.value?.id ?? j.value.pages[0]?.id, r = n ? F.get(n)?.getSelectionRange() : void 0, i = typeof e == "string" ? e.trim() : await Fo(e, "toolbar");
771
+ if (!i || !je(i)) {
772
+ typeof e == "string" && (Hi.value = "请输入安全的图片 URL");
773
+ return;
774
+ }
775
+ let a = No({
776
+ ...t,
777
+ src: i
778
+ }, n, r);
779
+ return a && (Ri.value = !1, Mo(), Zi.value = "已插入图片"), a;
780
+ }
781
+ function Ro() {
782
+ V.value || Ui.value || ($(), Hi.value = "", vi.value && (vi.value.value = ""), vi.value?.click());
783
+ }
784
+ async function zo(e) {
785
+ let t = e.target.files?.[0];
786
+ t && await Lo(t, jo({ alt: t.name }));
787
+ }
788
+ async function Bo() {
789
+ let e = zi.value;
790
+ await Lo(e, jo());
791
+ }
792
+ function Vo(e) {
793
+ is(e), Li.value = !1;
794
+ }
795
+ function Ho() {
796
+ $(), Co();
797
+ }
798
+ function Uo(e, t, n, r) {
799
+ $(), ko(Oo({ type: t }), e, {
443
800
  left: n,
444
801
  top: r
445
802
  });
446
803
  }
447
- function Xr(e) {
448
- Q(), k.value = e;
804
+ function Wo(e) {
805
+ $(), M.value = e, Z();
449
806
  }
450
- function Zr(e) {
451
- let t = O.value.variables.find((t) => t.id === e.id), n = [...O.value.pages], r = t?.key ?? e.key, i = "";
452
- M.forEach((t, a) => {
807
+ function Go(e) {
808
+ let t = j.value.variables.find((t) => t.id === e.id), n = [...j.value.pages], r = t?.key ?? e.key, i = "";
809
+ F.forEach((t, a) => {
453
810
  let o = t.updateVariable(e, r);
454
811
  if (o) {
455
812
  i ||= a;
@@ -457,230 +814,350 @@ var it = { class: "gd-contract-template-designer__sidebar" }, at = { class: "gd-
457
814
  e >= 0 && (n[e] = o);
458
815
  }
459
816
  }), K({
460
- ...O.value,
817
+ ...j.value,
461
818
  pages: n,
462
- variables: O.value.variables.map((t) => t.id === e.id ? e : t)
463
- }), k.value = e.key, Y(i || A.value);
819
+ variables: j.value.variables.map((t) => t.id === e.id ? e : t)
820
+ }), M.value = e.key, bo(i || P.value);
464
821
  }
465
- function X(e) {
466
- V.value && Zr({
467
- ...V.value,
822
+ function Q(e) {
823
+ H.value && Go({
824
+ ...H.value,
468
825
  ...e,
469
826
  style: {
470
- ...V.value.style,
827
+ ...H.value.style,
471
828
  ...e.style
472
829
  }
473
830
  });
474
831
  }
475
- function Qr(e) {
476
- (e === "left" || e === "center" || e === "right") && X({ style: { textAlign: e } });
832
+ function Ko(e) {
833
+ (e === "left" || e === "center" || e === "right") && Q({ style: { textAlign: e } });
477
834
  }
478
- function $r(e) {
479
- (e === "solid" || e === "dashed") && X({ style: { borderStyle: e } });
835
+ function qo(e) {
836
+ (e === "solid" || e === "dashed") && Q({ style: { borderStyle: e } });
480
837
  }
481
- function ei(e) {
482
- (e === "contain" || e === "cover" || e === "fill") && X({ style: { objectFit: e } });
838
+ function Jo(e) {
839
+ (e === "contain" || e === "cover" || e === "fill") && Q({ style: { objectFit: e } });
483
840
  }
484
- function Z(e) {
485
- X({ style: e });
841
+ function Yo(e) {
842
+ Q({ style: e });
486
843
  }
487
- function ti(e) {
488
- Z({ fontFamily: String(e || "").trim() || "Noto Serif SC, Source Han Serif SC, Songti SC, STSong, SimSun, serif" });
844
+ function Xo(e) {
845
+ Yo({ fontFamily: String(e || "").trim() || "Noto Serif SC, Source Han Serif SC, Songti SC, STSong, SimSun, serif" });
489
846
  }
490
- function ni(e) {
491
- Z({ fontSize: Tr(e, V.value?.style?.fontSize ?? 14) });
847
+ function Zo(e) {
848
+ Yo({ fontSize: Va(e, H.value?.style?.fontSize ?? 14) });
492
849
  }
493
- function ri(e) {
494
- V.value && X({
850
+ function Qo(e) {
851
+ H.value && Q({
495
852
  multiline: e,
496
- rows: V.value.rows || 3,
497
- lineHeight: V.value.lineHeight || 28,
853
+ rows: H.value.rows || 3,
854
+ lineHeight: H.value.lineHeight || 28,
498
855
  style: e ? { underline: !0 } : void 0
499
856
  });
500
857
  }
501
- function ii(e) {
502
- V.value && X({
858
+ function $o(e) {
859
+ H.value && Q({
503
860
  rows: Number(e || 3),
504
- lineHeight: V.value.lineHeight || 28
861
+ lineHeight: H.value.lineHeight || 28
505
862
  });
506
863
  }
507
- function ai(e) {
508
- if (B.value) return;
509
- let t = [...O.value.pages];
510
- M.forEach((n, r) => {
864
+ function es(e) {
865
+ if (V.value) return;
866
+ let t = [...j.value.pages];
867
+ F.forEach((n, r) => {
511
868
  let i = n.removeVariable(e.key);
512
869
  if (i) {
513
870
  let e = t.findIndex((e) => e.id === r);
514
871
  e >= 0 && (t[e] = i);
515
872
  }
516
873
  }), K({
517
- ...O.value,
874
+ ...j.value,
518
875
  pages: t,
519
- variables: O.value.variables.filter((t) => t.id !== e.id)
520
- }), k.value = "";
876
+ variables: j.value.variables.filter((t) => t.id !== e.id)
877
+ }), M.value = "", N.value = "";
521
878
  }
522
- function oi(e) {
523
- let t = (e.trim() || "variable").replace(/\s+/g, "_"), n = new Set(O.value.variables.map((e) => e.key));
879
+ function ts(e) {
880
+ let t = (e.trim() || "variable").replace(/\s+/g, "_"), n = new Set(j.value.variables.map((e) => e.key));
524
881
  if (!n.has(t)) return t;
525
882
  let r = 2;
526
883
  for (; n.has(`${t}_${r}`);) r += 1;
527
884
  return `${t}_${r}`;
528
885
  }
529
- function si(e) {
530
- B.value || Jr(Ee({
886
+ function ns(e) {
887
+ V.value || ko(st({
531
888
  ...e,
532
889
  id: void 0,
533
- key: oi(`${e.key || e.type}_copy`),
890
+ key: ts(`${e.key || e.type}_copy`),
534
891
  label: `${e.label}副本`,
535
892
  style: { ...e.style }
536
- }, l.variableTypes, l.defaultVariableStyle));
893
+ }, c.variableTypes, c.defaultVariableStyle));
894
+ }
895
+ function rs(e) {
896
+ return V.value ? void 0 : ko(j.value.variables.find((t) => t.key === e.key) ?? st(e, c.variableTypes, c.defaultVariableStyle));
897
+ }
898
+ function is(e) {
899
+ if (!V.value) return ko(Oo({ type: e }));
900
+ }
901
+ function as(e) {
902
+ if (V.value || !Le(e)) return;
903
+ let t = R.value, n = wa.value.find((t) => t.type === e);
904
+ if (!t || !n) return;
905
+ let r = Fe(t.leadingText) || n.label, i = Ie(t.selectionWidth, ai, ka.value), a = os();
906
+ ko(Oo({
907
+ type: e,
908
+ label: r,
909
+ ...i ? { width: i } : {},
910
+ ...a ? { style: a } : {}
911
+ }), t.pageId), Zi.value = t.hasSelection ? `已将选中内容替换为${n.label}控件` : `已插入${n.label}控件`, $();
912
+ }
913
+ function os() {
914
+ let e = G.value, t = {};
915
+ return e.isUnderline && (t.underline = !0), typeof e.fontSize == "number" && Number.isFinite(e.fontSize) && (t.fontSize = e.fontSize), e.fontFamily && (t.fontFamily = e.fontFamily), e.textColor && (t.color = e.textColor), Object.keys(t).length ? t : void 0;
916
+ }
917
+ function ss(e) {
918
+ if (V.value) return;
919
+ let t = R.value;
920
+ t && (ko(e, t.pageId), Zi.value = `已绑定到${e.label},沿用原控件尺寸`, $());
921
+ }
922
+ function cs(e) {
923
+ return lt(e.type && Le(e.type) ? e.type : "text", wa.value).label;
924
+ }
925
+ function ls() {
926
+ j.value.variables.length && (Gi.value = !0, v(() => {
927
+ dc(), Wi.value?.querySelector(".gd-contract-template-designer__text-menu-bind-search input")?.focus();
928
+ }));
537
929
  }
538
- function ci(e) {
539
- return B.value ? void 0 : Jr(O.value.variables.find((t) => t.key === e.key) ?? Ee(e, l.variableTypes, l.defaultVariableStyle));
930
+ function us(e, t) {
931
+ e.dataTransfer?.setData("application/x-gd-contract-variable", t), e.dataTransfer && (e.dataTransfer.effectAllowed = "copy");
540
932
  }
541
- function li(e) {
542
- if (!B.value) return Jr(qr({ type: e }));
933
+ function ds(e) {
934
+ return I.value = Math.round(Math.min(ti, Math.max(ei, Number.isFinite(e) ? e : 1)) * 100) / 100, I.value;
543
935
  }
544
- function ui(e, t) {
545
- e.dataTransfer?.setData("application/x-gd-contract-variable", t), e.dataTransfer && (e.dataTransfer.effectAllowed = "copy");
936
+ let { width: fs } = Jt(mi), { width: ps } = Jt(gi), ms = u(() => Math.max(...j.value.pages.map((e) => Y(e).width), $e.width) + 10), hs = x(!1), gs = x(0);
937
+ function _s() {
938
+ let e = gi.value;
939
+ if (!e) return;
940
+ if (typeof window < "u" && window.matchMedia("(max-width: 760px)").matches) {
941
+ hs.value = !1;
942
+ return;
943
+ }
944
+ let t = e.clientWidth;
945
+ if (!(t <= 0)) {
946
+ if (!hs.value) {
947
+ let n = e.scrollWidth;
948
+ gs.value = n, n > t + 1 && (hs.value = !0);
949
+ return;
950
+ }
951
+ gs.value > 0 && t >= gs.value + 8 && (hs.value = !1);
952
+ }
546
953
  }
547
- function di(e) {
548
- return N.value = Math.round(Math.min(An, Math.max(kn, Number.isFinite(e) ? e : 1)) * 100) / 100, N.value;
954
+ Rt(ps, () => {
955
+ v(_s);
956
+ }, { immediate: !0 }), Ft(() => {
957
+ v(_s), typeof document < "u" && document.fonts?.ready && document.fonts.ready.then(() => {
958
+ gi.value && v(_s);
959
+ });
960
+ });
961
+ let { fitWidth: vs, applyAutoFit: ys, markUserAdjusted: bs } = Ee({
962
+ viewportWidth: fs,
963
+ widestPageWidth: ms,
964
+ padding: 48,
965
+ minZoom: ei,
966
+ maxZoom: ti,
967
+ getZoom: () => I.value,
968
+ applyZoom: ds
969
+ });
970
+ function xs(e) {
971
+ return bs(), ds(e);
549
972
  }
550
- function fi() {
551
- return di(1);
973
+ function Ss() {
974
+ return ys();
552
975
  }
553
- function pi() {
554
- return N.value;
976
+ function Cs() {
977
+ return I.value;
555
978
  }
556
- function mi() {
557
- di(N.value + jn);
979
+ function ws() {
980
+ xs(I.value + ni);
558
981
  }
559
- function hi() {
560
- di(N.value - jn);
982
+ function Ts() {
983
+ xs(I.value - ni);
561
984
  }
562
- function gi() {
563
- Q(), I.value = !1, L.value = !1, P.value = !P.value;
985
+ Rt(hs, (e) => {
986
+ e || (Mi.value = !1, v(_s));
987
+ });
988
+ function Es(e) {
989
+ let t = e.target instanceof HTMLElement ? e.target : null;
990
+ t && (t.closest(".gd-contract-template-designer__toolbar-more, .ant-popover, .ant-select-dropdown") || (Mi.value = !1));
991
+ }
992
+ Rt(Mi, (e) => {
993
+ typeof document > "u" || (e ? document.addEventListener("mousedown", Es, !0) : document.removeEventListener("mousedown", Es, !0));
994
+ }), Pt(() => {
995
+ typeof document < "u" && document.removeEventListener("mousedown", Es, !0);
996
+ });
997
+ function Ds() {
998
+ $(), L.value = !1, Ii.value = !1, Mi.value = !1, ki.value = !ki.value;
564
999
  }
565
- function _i() {
566
- Q(), Un.value = xe(G()), Hn.value = !0;
1000
+ function Os() {
1001
+ $(), Ei.value = nt(Ua()), Ti.value = !0;
567
1002
  }
568
- function vi() {
569
- Hn.value = !1;
1003
+ function ks() {
1004
+ Ti.value = !1, Ei.value = void 0;
570
1005
  }
571
- function yi() {
572
- return Ni();
1006
+ function As() {
1007
+ return Gs();
573
1008
  }
574
- function bi() {
575
- Q();
576
- let e = yi();
577
- return Gn.value = JSON.stringify(e, null, 2), Wn.value = !0, e;
1009
+ function js() {
1010
+ $();
1011
+ let e = As();
1012
+ return Oi.value = JSON.stringify(e, null, 2), Di.value = !0, e;
578
1013
  }
579
- function xi() {
580
- Wn.value = !1;
1014
+ function Ms() {
1015
+ Di.value = !1;
581
1016
  }
582
- function Si() {
583
- Q(), I.value = !1, L.value = !1, k.value = "", A.value = "", Hn.value = !1, Un.value = "", Wn.value = !1, Gn.value = "", Kn.value = {}, Vn.value = "";
584
- let e = K(we(ye));
585
- return A.value = e.pages[0]?.id ?? "", Se(e);
1017
+ function Ns() {
1018
+ $(), L.value = !1, Ii.value = !1;
1019
+ let e = U.value.map(X);
1020
+ bi.value = [];
1021
+ let t = !!N.value;
1022
+ M.value = "", N.value = "", P.value = "", Ti.value = !1, Ei.value = void 0, Di.value = !1, Oi.value = "", Ni.value = {}, wi.value = "";
1023
+ let n = K(at($e));
1024
+ return t && _("signing-placement-select", void 0), e.forEach((e) => _("signing-placement-remove", e)), P.value = n.pages[0]?.id ?? "", nt(n);
586
1025
  }
587
- function Ci() {
588
- B.value || (Q(), et.confirm({
1026
+ function Ps() {
1027
+ V.value || ($(), Wt.confirm({
589
1028
  title: "清空合同内容",
590
- content: "将清空全部合同正文、页面和模板变量,仅保留一个空白 A4 合同页。此操作不可撤销。",
1029
+ content: "将清空全部合同正文、页面、模板变量和签署位置,仅保留一个空白 A4 合同页。此操作不可撤销。",
591
1030
  okText: "确认清空",
592
1031
  okType: "danger",
593
1032
  cancelText: "取消",
594
1033
  onOk: () => {
595
- Si();
1034
+ Ns();
596
1035
  }
597
1036
  }));
598
1037
  }
599
- function wi(e) {
600
- let t = G().pages, n = t.find((e) => e.id === A.value);
1038
+ function Fs(e) {
1039
+ let t = Ua().pages, n = t.find((e) => e.id === P.value);
601
1040
  return (n ? [n, ...t.filter((e) => e.id !== n.id)] : t).find((t) => t.contentHtml.includes(`data-key="${e.key}"`) || t.contentHtml.includes(`data-key='${e.key}'`));
602
1041
  }
603
- function Ti(e) {
604
- Q(), k.value = e.key;
605
- let t = wi(e);
606
- t && (A.value = t.id, Ge(() => {
607
- M.get(t.id)?.scrollIntoVariable(e.key);
1042
+ function Is(e) {
1043
+ $(), M.value = e.key, Z();
1044
+ let t = Fs(e);
1045
+ t && (P.value = t.id, v(() => {
1046
+ F.get(t.id)?.scrollIntoVariable(e.key);
608
1047
  }));
609
1048
  }
610
- function Ei(e) {
611
- let t = O.value.variables.find((t) => t.key === e || t.id === e);
612
- t && Ti(t);
1049
+ function Ls(e) {
1050
+ let t = j.value.variables.find((t) => t.key === e || t.id === e);
1051
+ t && Is(t);
1052
+ }
1053
+ function Rs(e) {
1054
+ let t = U.value.find((t) => t.id === e);
1055
+ t && ($(), M.value = "", P.value = t.pageId, Z(t.id), v(() => {
1056
+ F.get(t.pageId)?.scrollIntoSigningPlacement(t.id);
1057
+ }));
613
1058
  }
614
- function Di(e, t = !0) {
615
- Q(), A.value = e, t && Ge(() => {
616
- M.get(e)?.scrollIntoPage();
1059
+ function zs(e, t = !0) {
1060
+ $(), P.value = e, t && v(() => {
1061
+ F.get(e)?.scrollIntoPage();
617
1062
  });
618
1063
  }
619
- function Oi(e) {
620
- O.value.pages.some((t) => t.id === e) && Di(e);
1064
+ function Bs(e) {
1065
+ j.value.pages.some((t) => t.id === e) && zs(e);
621
1066
  }
622
- function ki() {
623
- return Se(G());
1067
+ function Vs() {
1068
+ return nt(Ua());
624
1069
  }
625
- function Ai(e) {
626
- K(Ae(e, l.pageSize));
1070
+ function Hs(e) {
1071
+ bi.value = yi(e);
1072
+ let t = K(ft(e, c.pageSize));
1073
+ t.signingPlacements?.some((e) => e.id === N.value) || Z(), bo(t.pages[0]?.id);
627
1074
  }
628
- function ji() {
629
- let e = Ne(G());
630
- return j.value = e, zn.value = !0, We("validate", e), e;
1075
+ function Us() {
1076
+ let e = Ys([...bi.value, ...ht(Ua(), { maxPages: Ea.value })]);
1077
+ return Si.value = e, xi.value = !0, _("validate", e), e;
631
1078
  }
632
- function Mi(e) {
1079
+ function Ws(e) {
1080
+ if (e.type === "signing-placement") {
1081
+ let t = U.value.find((t) => t.id === e.id);
1082
+ if (t) {
1083
+ zs(t.pageId), Z(t.id);
1084
+ return;
1085
+ }
1086
+ }
633
1087
  if (e.variableKey) {
634
- Ei(e.variableKey);
1088
+ Ls(e.variableKey);
635
1089
  return;
636
1090
  }
637
1091
  if (e.pageId) {
638
- Oi(e.pageId);
1092
+ Bs(e.pageId);
639
1093
  return;
640
1094
  }
641
- let t = O.value.variables.find((t) => t.id === e.id || t.key === e.id);
1095
+ let t = j.value.variables.find((t) => t.id === e.id || t.key === e.id);
642
1096
  if (t) {
643
- Ti(t);
1097
+ Is(t);
644
1098
  return;
645
1099
  }
646
- O.value.pages.some((t) => t.id === e.id) && Di(e.id);
1100
+ j.value.pages.some((t) => t.id === e.id) && zs(e.id);
1101
+ }
1102
+ function Gs() {
1103
+ return ct(Ua());
1104
+ }
1105
+ function Ks(e) {
1106
+ let t = Ua();
1107
+ try {
1108
+ let n = rt(t, bi.value);
1109
+ if (n.length) throw new Re(n);
1110
+ return e(t);
1111
+ } catch (e) {
1112
+ throw e instanceof Re && (Si.value = [...e.errors], xi.value = !0, _("validate", [...e.errors])), e;
1113
+ }
1114
+ }
1115
+ function qs(e) {
1116
+ return Ks((t) => Ue(t, e));
647
1117
  }
648
- function Ni() {
649
- return De(G());
1118
+ function Js(e) {
1119
+ return Ks((t) => He(t, e));
650
1120
  }
651
- function Pi(e) {
652
- j.value = [...e], zn.value = !0;
1121
+ function Ys(e) {
1122
+ let t = /* @__PURE__ */ new Set();
1123
+ return e.filter((e) => {
1124
+ let n = `${e.code ?? ""}|${e.id}|${e.pageId ?? ""}|${e.message}`;
1125
+ return t.has(n) ? !1 : (t.add(n), !0);
1126
+ });
1127
+ }
1128
+ function Xs(e) {
1129
+ Si.value = [...e], xi.value = !0;
653
1130
  }
654
- function Fi() {
655
- j.value = [], zn.value = !1;
1131
+ function Zs() {
1132
+ Si.value = [], xi.value = !1;
656
1133
  }
657
- function Ii() {
658
- M.get(H.value?.id ?? A.value)?.focus();
1134
+ function Qs() {
1135
+ F.get(W.value?.id ?? P.value)?.focus();
659
1136
  }
660
- function Li(e) {
661
- Sr(e) && q({
1137
+ function $s(e) {
1138
+ Ra(e) && q({
662
1139
  type: "set-text-align",
663
1140
  value: e
664
1141
  });
665
1142
  }
666
- function Ri(e) {
1143
+ function ec(e) {
667
1144
  if (e === "paragraph") {
668
1145
  q({ type: "set-paragraph" });
669
1146
  return;
670
1147
  }
671
- Cr(e) && q({
1148
+ za(e) && q({
672
1149
  type: "set-heading",
673
1150
  level: e
674
1151
  });
675
1152
  }
676
- function zi(e) {
677
- let t = Er(e);
1153
+ function tc(e) {
1154
+ let t = Ha(e);
678
1155
  t && (q({
679
1156
  type: "set-font-size",
680
1157
  value: t
681
- }), F.value = "");
1158
+ }), Fi.value = "");
682
1159
  }
683
- function Bi(e) {
1160
+ function nc(e) {
684
1161
  let t = String(e || "").trim();
685
1162
  if (!t) {
686
1163
  q({ type: "unset-font-family" });
@@ -691,989 +1168,1782 @@ var it = { class: "gd-contract-template-designer__sidebar" }, at = { class: "gd-
691
1168
  value: t
692
1169
  });
693
1170
  }
694
- function Vi(e) {
695
- let t = e.target?.value;
696
- t && q({
697
- type: "set-color",
698
- value: t
699
- });
1171
+ function rc(e) {
1172
+ ic(e.target?.value ?? "");
700
1173
  }
701
- function Hi(e) {
1174
+ function ic(e) {
702
1175
  let t = e.trim();
703
1176
  t && q({
704
1177
  type: "set-color",
705
1178
  value: t
706
1179
  });
707
1180
  }
708
- function Ui(e) {
709
- F.value = e;
1181
+ function ac(e) {
1182
+ Fi.value = e;
710
1183
  }
711
- function Wi() {
712
- F.value.trim() && zi(F.value);
1184
+ function oc() {
1185
+ Fi.value.trim() && tc(Fi.value);
713
1186
  }
714
- function Gi(e) {
715
- e.key === "Enter" && (e.preventDefault(), Wi());
1187
+ function sc(e) {
1188
+ e.key === "Enter" && (e.preventDefault(), oc());
716
1189
  }
717
- function Ki(e) {
718
- e || (Wi(), F.value = "");
1190
+ function cc(e) {
1191
+ e || (oc(), Fi.value = "");
719
1192
  }
720
- function qi(e) {
721
- wr(e) && (q({
1193
+ function lc(e) {
1194
+ Ba(e) && (q({
722
1195
  type: "apply-text-style-preset",
723
1196
  preset: e
724
- }), qn.value = void 0, Q());
1197
+ }), Pi.value = void 0, $());
725
1198
  }
726
- function Ji(e) {
727
- if (B.value) return;
728
- A.value = e.pageId, I.value = !1, L.value = !1;
729
- let t = Math.max(12, Math.min(e.clientX, window.innerWidth - 320)), n = Math.max(12, Math.min(e.clientY, window.innerHeight - 220));
730
- Jn.value = {
1199
+ function uc(e) {
1200
+ if (V.value) return;
1201
+ P.value = e.pageId, L.value = !1, Ii.value = !1, z.value = void 0, B.value = void 0, Gi.value = !1, Ki.value = "";
1202
+ let t = Math.max(A, Math.min(e.clientX, window.innerWidth - li)), n = Math.max(A, Math.min(e.clientY, window.innerHeight - ui));
1203
+ R.value = {
731
1204
  pageId: e.pageId,
732
1205
  x: t,
733
- y: n
1206
+ y: n,
1207
+ hasSelection: e.hasSelection,
1208
+ selectionWidth: e.selectionWidth,
1209
+ leadingText: e.leadingText
1210
+ }, v(() => {
1211
+ dc(), Wi.value?.querySelector("button:not(:disabled)")?.focus();
1212
+ });
1213
+ }
1214
+ function dc() {
1215
+ let e = Wi.value, t = R.value;
1216
+ if (!e || !t) return;
1217
+ let n = e.getBoundingClientRect();
1218
+ R.value = {
1219
+ ...t,
1220
+ x: Math.max(A, Math.min(t.x, window.innerWidth - n.width - A)),
1221
+ y: Math.max(A, Math.min(t.y, window.innerHeight - n.height - A))
734
1222
  };
735
1223
  }
736
- function Q() {
737
- Jn.value = void 0;
1224
+ function fc(e) {
1225
+ V.value || (P.value = e.pageId, L.value = !1, Ii.value = !1, R.value = void 0, B.value = void 0, z.value = {
1226
+ ...e,
1227
+ x: Math.max(8, Math.min(e.clientX, window.innerWidth - 248)),
1228
+ y: Math.max(8, Math.min(e.clientY, window.innerHeight - 400))
1229
+ }, v(() => {
1230
+ let e = qi.value?.getMenuElement(), t = z.value;
1231
+ if (e && t) {
1232
+ let n = e.getBoundingClientRect();
1233
+ z.value = {
1234
+ ...t,
1235
+ x: Math.max(8, Math.min(t.x, window.innerWidth - n.width - 8)),
1236
+ y: Math.max(8, Math.min(t.y, window.innerHeight - n.height - 8))
1237
+ };
1238
+ }
1239
+ qi.value?.focusFirstItem();
1240
+ }));
1241
+ }
1242
+ function pc(e) {
1243
+ V.value || (P.value = e.pageId, L.value = !1, Ii.value = !1, R.value = void 0, z.value = void 0, Yi.value = e.image.width, Xi.value = e.image.height, M.value = "", N.value && Z(), B.value = {
1244
+ pageId: e.pageId,
1245
+ image: e.image,
1246
+ x: Math.max(A, Math.min(e.clientX, window.innerWidth - di)),
1247
+ y: Math.max(A, Math.min(e.clientY, window.innerHeight - fi))
1248
+ }, v(() => {
1249
+ mc(), Ji.value?.querySelector("input, button:not(:disabled)")?.focus();
1250
+ }));
1251
+ }
1252
+ function mc() {
1253
+ let e = Ji.value, t = B.value;
1254
+ if (!e || !t) return;
1255
+ let n = e.getBoundingClientRect();
1256
+ B.value = {
1257
+ ...t,
1258
+ x: Math.max(A, Math.min(t.x, window.innerWidth - n.width - A)),
1259
+ y: Math.max(A, Math.min(t.y, window.innerHeight - n.height - A))
1260
+ };
1261
+ }
1262
+ function hc() {
1263
+ let e = B.value;
1264
+ !e || V.value || (F.get(e.pageId)?.updateSelectedContentImage({
1265
+ width: Ne(Yi.value),
1266
+ height: Ne(Xi.value)
1267
+ }) && (Zi.value = "已更新图片尺寸"), $());
1268
+ }
1269
+ function gc() {
1270
+ let e = B.value;
1271
+ !e || V.value || (F.get(e.pageId)?.updateSelectedContentImage({
1272
+ width: void 0,
1273
+ height: void 0
1274
+ }) && (Zi.value = "已恢复图片自然尺寸"), $());
738
1275
  }
739
- function Yi(e) {
740
- !Jn.value || (e.target instanceof HTMLElement ? e.target : null)?.closest(".gd-contract-template-designer__context-menu") || Q();
1276
+ function _c(e) {
1277
+ e.type === "table" ? fc(e) : e.type === "image" ? pc(e) : uc(e);
741
1278
  }
742
- function Xi(e) {
743
- let t = Rn.value;
1279
+ function $() {
1280
+ R.value = void 0, z.value = void 0, B.value = void 0, Gi.value = !1, Ki.value = "";
1281
+ }
1282
+ function vc(e) {
1283
+ !R.value && !z.value && !B.value || (e.target instanceof HTMLElement ? e.target : null)?.closest(".gd-contract-template-designer__context-menu") || $();
1284
+ }
1285
+ function yc(e) {
1286
+ let t = pi.value;
744
1287
  if (!t || typeof document > "u") return !1;
745
1288
  let n = e.target instanceof Node ? e.target : void 0, r = document.activeElement;
746
- return !!(n && t.contains(n) || r && t.contains(r));
1289
+ return !!(n && t.contains(n) || r && t.contains(r) || n instanceof Element && n.closest(".gd-contract-template-designer__context-menu"));
747
1290
  }
748
- function Zi(e) {
1291
+ function bc(e) {
749
1292
  if ((e.ctrlKey || e.metaKey) && !e.altKey && e.key.toLowerCase() === "s") {
750
- if (!Yn.value || !Xi(e)) return;
751
- e.preventDefault(), kr();
1293
+ if (!ra.value || !yc(e)) return;
1294
+ e.preventDefault(), Ga();
752
1295
  return;
753
1296
  }
754
- e.key === "Escape" && (Q(), I.value = !1, L.value = !1, P.value = !1);
1297
+ e.key === "Escape" && ($(), L.value = !1, Ii.value = !1, ki.value = !1);
755
1298
  }
756
- function Qi(e, t) {
757
- let n = Kn.value[e];
758
- n && JSON.stringify(n) === JSON.stringify(t) || (Kn.value = {
759
- ...Kn.value,
1299
+ function xc(e, t) {
1300
+ e === P.value && t.selectedContentImage && (M.value = "", N.value && Z());
1301
+ let n = Ni.value[e];
1302
+ n && JSON.stringify(n) === JSON.stringify(t) || (Ni.value = {
1303
+ ...Ni.value,
760
1304
  [e]: t
761
1305
  });
762
1306
  }
763
- function $i() {
1307
+ function Sc(e = $i.value.rows, t = $i.value.cols) {
764
1308
  q({
765
1309
  type: "insert-table",
766
1310
  options: {
767
- rows: Math.min(10, Math.max(1, Math.round(Number(z.value.rows) || 3))),
768
- cols: Math.min(10, Math.max(1, Math.round(Number(z.value.cols) || 3))),
769
- withHeaderRow: !!z.value.withHeaderRow
1311
+ rows: Math.min(10, Math.max(1, Math.round(Number(e) || 3))),
1312
+ cols: Math.min(10, Math.max(1, Math.round(Number(t) || 3))),
1313
+ withHeaderRow: !!$i.value.withHeaderRow
770
1314
  }
771
- }), I.value = !1, Q();
772
- }
773
- function $(e) {
774
- q({ type: e }), L.value = !1, Q();
775
- }
776
- return Fe({
777
- getValue: ki,
778
- setValue: Ai,
779
- validate: ji,
780
- exportTemplate: Ni,
781
- getSubmitData: yi,
782
- clearTemplate: Si,
783
- saveDraftCache: kr,
784
- loadDraftCache: Ar,
785
- clearDraftCache: jr,
786
- getDraftCacheStatus: Mr,
787
- insertVariable: ci,
788
- focus: Ii,
789
- openPreview: _i,
790
- closePreview: vi,
791
- openSubmitDataViewer: bi,
792
- closeSubmitDataViewer: xi,
793
- setServerValidationErrors: Pi,
794
- clearValidationErrors: Fi,
795
- scrollToVariable: Ei,
796
- scrollToPage: Oi,
797
- setZoom: di,
798
- resetZoom: fi,
799
- getZoom: pi
800
- }), (me, s) => (v(), m("div", {
1315
+ }), L.value = !1, $();
1316
+ }
1317
+ let Cc = {
1318
+ "delete-table-row": {
1319
+ label: "删除当前行",
1320
+ countKey: "deleteRow"
1321
+ },
1322
+ "delete-table-column": {
1323
+ label: "删除当前列",
1324
+ countKey: "deleteColumn"
1325
+ },
1326
+ "delete-table": {
1327
+ label: "删除表格",
1328
+ countKey: "deleteTable"
1329
+ }
1330
+ };
1331
+ function wc(e) {
1332
+ let t = z.value;
1333
+ if (!t) return;
1334
+ let n = () => {
1335
+ q(e, t.pageId), $();
1336
+ }, r = Cc[e.type];
1337
+ if (!r) {
1338
+ n();
1339
+ return;
1340
+ }
1341
+ let i = t.affectedVariableCounts[r.countKey];
1342
+ $(), Wt.confirm({
1343
+ title: r.label,
1344
+ content: i ? `此操作将移除 ${i} 个正文变量节点,是否继续?` : "此操作将修改表格结构,是否继续?",
1345
+ okText: "确认",
1346
+ okType: "danger",
1347
+ cancelText: "取消",
1348
+ onOk: n,
1349
+ onCancel: () => F.get(t.pageId)?.focus()
1350
+ });
1351
+ }
1352
+ function Tc(e) {
1353
+ let t = qi.value?.getMenuElement();
1354
+ if (!t) return;
1355
+ if (e.key === "Escape") {
1356
+ e.preventDefault();
1357
+ let t = z.value?.pageId;
1358
+ $(), F.get(t ?? "")?.focus();
1359
+ return;
1360
+ }
1361
+ let n = Array.from(t.querySelectorAll("button:not(:disabled)"));
1362
+ if (!n.length) return;
1363
+ if (e.key === "Home" || e.key === "End") {
1364
+ e.preventDefault(), n[e.key === "Home" ? 0 : n.length - 1]?.focus();
1365
+ return;
1366
+ }
1367
+ if (![
1368
+ "ArrowUp",
1369
+ "ArrowDown",
1370
+ "ArrowLeft",
1371
+ "ArrowRight"
1372
+ ].includes(e.key)) return;
1373
+ let r = (Math.max(0, n.indexOf(document.activeElement)) + (e.key === "ArrowUp" || e.key === "ArrowLeft" ? -1 : 1) + n.length) % n.length;
1374
+ e.preventDefault(), n[r]?.focus();
1375
+ }
1376
+ function Ec(e) {
1377
+ if (e.key !== "Escape") return;
1378
+ e.preventDefault();
1379
+ let t = R.value?.pageId;
1380
+ $(), F.get(t ?? "")?.focus();
1381
+ }
1382
+ function Dc(e) {
1383
+ if (e.key !== "Escape") return;
1384
+ e.preventDefault();
1385
+ let t = B.value?.pageId;
1386
+ $(), F.get(t ?? "")?.focus();
1387
+ }
1388
+ function Oc(e) {
1389
+ q({ type: e }), Ii.value = !1, $();
1390
+ }
1391
+ return bt({
1392
+ getValue: Vs,
1393
+ setValue: Hs,
1394
+ validate: Us,
1395
+ exportTemplate: Gs,
1396
+ getSubmitData: As,
1397
+ clearTemplate: Ns,
1398
+ saveDraftCache: Ga,
1399
+ loadDraftCache: Ka,
1400
+ clearDraftCache: qa,
1401
+ getDraftCacheStatus: Ja,
1402
+ insertVariable: rs,
1403
+ insertImage: Lo,
1404
+ focus: Qs,
1405
+ openPreview: Os,
1406
+ closePreview: ks,
1407
+ openSubmitDataViewer: js,
1408
+ closeSubmitDataViewer: Ms,
1409
+ setServerValidationErrors: Xs,
1410
+ clearValidationErrors: Zs,
1411
+ scrollToVariable: Ls,
1412
+ scrollToSigningPlacement: Rs,
1413
+ scrollToPage: Bs,
1414
+ setZoom: xs,
1415
+ resetZoom: Ss,
1416
+ getZoom: Cs,
1417
+ fitWidth: vs,
1418
+ insertSigningPlacement: so,
1419
+ selectSigningPlacement: Z,
1420
+ buildLocationRules: qs,
1421
+ buildContractLocationRules: Js
1422
+ }), (Ee, s) => (b(), p("div", {
801
1423
  ref_key: "designerElement",
802
- ref: Rn,
803
- class: Ke(["gd-contract-template-designer", {
804
- "is-disabled": c.disabled,
805
- "is-readonly": B.value,
806
- "is-fullscreen": P.value
1424
+ ref: pi,
1425
+ class: y(["gd-contract-template-designer", {
1426
+ "is-disabled": Qe.disabled,
1427
+ "is-readonly": V.value,
1428
+ "is-fullscreen": ki.value
807
1429
  }])
808
1430
  }, [
809
- h("aside", it, [h("section", at, [
810
- h("div", ot, [s[56] ||= h("strong", null, "页面", -1), _(x(D), { title: "新增页面" }, {
811
- default: S(() => [_(x(C), {
812
- size: "small",
813
- class: "gd-contract-template-designer__icon-button",
814
- disabled: B.value,
815
- "aria-label": "新增页面",
816
- onClick: Gr
817
- }, {
818
- default: S(() => [_(x(ae), { "aria-hidden": "true" })]),
819
- _: 1
820
- }, 8, ["disabled"])]),
821
- _: 1
822
- })]),
823
- (v(!0), m(u, null, Xe(O.value.pages, (e, t) => (v(), m("button", {
824
- key: e.id,
825
- type: "button",
826
- class: Ke(["gd-contract-template-designer__nav-item", { "is-active": A.value === e.id }]),
827
- onClick: (t) => Di(e.id)
828
- }, [h("span", null, [g(b(e.title || `第 ${t + 1} 页`) + " ", 1), h("small", null, b(zr(e).label), 1)]), _(x(rt), null, {
829
- default: S(() => [g(b(t + 1), 1)]),
830
- _: 2
831
- }, 1024)], 10, st))), 128)),
832
- H.value ? (v(), m("div", ct, [h("label", lt, [s[57] ||= h("span", null, "页面格式", -1), _(x(E), {
833
- value: U.value.format,
834
- options: x(lr),
835
- disabled: B.value,
836
- onChange: Br
837
- }, null, 8, [
838
- "value",
839
- "options",
840
- "disabled"
841
- ])]), h("div", ut, b(U.value.width) + " × " + b(U.value.height), 1)])) : p("", !0)
842
- ]), h("section", dt, [
843
- h("div", ft, [s[58] ||= h("strong", null, "模板变量", -1), _(x(rt), null, {
844
- default: S(() => [g(b(O.value.variables.length), 1)]),
1431
+ m("div", { class: y(["gd-contract-template-designer__layout", {
1432
+ "is-sidebar-collapsed": Ai.value,
1433
+ "is-inspector-collapsed": ji.value
1434
+ }]) }, [
1435
+ m("aside", { class: y(["gd-contract-template-designer__sidebar", { "is-collapsed": Ai.value }]) }, [g(w(k), { title: Ai.value ? "展开页面栏" : "收起页面栏" }, {
1436
+ default: T(() => [m("button", {
1437
+ type: "button",
1438
+ class: "gd-contract-template-designer__panel-handle",
1439
+ "aria-label": Ai.value ? "展开页面栏" : "收起页面栏",
1440
+ "aria-expanded": !Ai.value,
1441
+ onClick: s[0] ||= (e) => Ai.value = !Ai.value
1442
+ }, [Ai.value ? (b(), d(w(ve), {
1443
+ key: 0,
1444
+ "aria-hidden": "true"
1445
+ })) : (b(), d(w(de), {
1446
+ key: 1,
1447
+ "aria-hidden": "true"
1448
+ }))], 8, Yt)]),
845
1449
  _: 1
846
- })]),
847
- O.value.variables.length ? p("", !0) : (v(), f(x($e), {
848
- key: 0,
849
- description: "暂无模板变量",
850
- image: x($e).PRESENTED_IMAGE_SIMPLE
851
- }, null, 8, ["image"])),
852
- (v(!0), m(u, null, Xe(O.value.variables, (e) => (v(), m("button", {
853
- key: e.id,
854
- type: "button",
855
- class: Ke(["gd-contract-template-designer__nav-item", { "is-active": k.value === e.key }]),
856
- disabled: B.value,
857
- onClick: (t) => Ti(e)
858
- }, [h("span", null, b(e.label), 1), h("small", null, b(e.type || "text") + " · " + b(e.key), 1)], 10, pt))), 128))
859
- ])]),
860
- h("main", mt, [
861
- h("header", ht, [h("div", gt, [h("strong", null, b(Qn.value), 1), c.showDraftCacheStatus && $n.value ? (v(), m("small", {
862
- key: 0,
863
- class: Ke(["gd-contract-template-designer__draft-cache-status", er.value])
864
- }, b($n.value), 3)) : p("", !0)]), h("div", _t, [h("div", vt, [h("div", yt, [
865
- _(x(D), { title: "缩小" }, {
866
- default: S(() => [_(x(C), {
867
- size: "small",
868
- class: "gd-contract-template-designer__icon-button",
869
- disabled: N.value <= kn,
870
- "aria-label": "缩小",
871
- onClick: hi
872
- }, {
873
- default: S(() => [_(x(pe), { "aria-hidden": "true" })]),
874
- _: 1
875
- }, 8, ["disabled"])]),
876
- _: 1
877
- }),
878
- h("span", null, b(tr.value), 1),
879
- _(x(D), { title: "放大" }, {
880
- default: S(() => [_(x(C), {
881
- size: "small",
882
- class: "gd-contract-template-designer__icon-button",
883
- disabled: N.value >= An,
884
- "aria-label": "放大",
885
- onClick: mi
886
- }, {
887
- default: S(() => [_(x(fe), { "aria-hidden": "true" })]),
888
- _: 1
889
- }, 8, ["disabled"])]),
890
- _: 1
891
- }),
892
- _(x(D), { title: "重置缩放" }, {
893
- default: S(() => [_(x(C), {
894
- size: "small",
895
- class: "gd-contract-template-designer__icon-button",
896
- "aria-label": "重置缩放",
897
- onClick: fi
898
- }, {
899
- default: S(() => [_(x(se), { "aria-hidden": "true" })]),
1450
+ }, 8, ["title"]), m("div", Xt, [
1451
+ m("section", Zt, [
1452
+ m("div", Qt, [
1453
+ s[81] ||= m("strong", null, "页面", -1),
1454
+ g(w(qt), null, {
1455
+ default: T(() => [h(C(j.value.pages.length) + " / " + C(Ea.value), 1)]),
1456
+ _: 1
1457
+ }),
1458
+ m("div", $t, [g(w(k), { title: Da.value ? `已达 ${Ea.value} 页上限` : "新增页面" }, {
1459
+ default: T(() => [g(w(E), {
1460
+ size: "small",
1461
+ class: "gd-contract-template-designer__icon-button",
1462
+ disabled: V.value || Da.value,
1463
+ "aria-label": "新增页面",
1464
+ onClick: Co
1465
+ }, {
1466
+ default: T(() => [g(w(he), { "aria-hidden": "true" })]),
1467
+ _: 1
1468
+ }, 8, ["disabled"])]),
1469
+ _: 1
1470
+ }, 8, ["title"])])
1471
+ ]),
1472
+ (b(!0), p(l, null, S(j.value.pages, (e, t) => (b(), p("div", {
1473
+ key: e.id,
1474
+ class: "gd-contract-template-designer__page-nav-row"
1475
+ }, [m("button", {
1476
+ type: "button",
1477
+ class: y(["gd-contract-template-designer__nav-item", { "is-active": P.value === e.id }]),
1478
+ onClick: (t) => zs(e.id)
1479
+ }, [m("span", null, [h(C(e.title || `第 ${t + 1} 页`) + " ", 1), m("small", null, C(Y(e).label) + " · " + C(no(e.id).length) + " 个签署位置", 1)]), g(w(qt), null, {
1480
+ default: T(() => [h(C(t + 1), 1)]),
1481
+ _: 2
1482
+ }, 1024)], 10, en), m("div", tn, [g(w(k), { title: "复制页面" }, {
1483
+ default: T(() => [g(w(E), {
1484
+ size: "small",
1485
+ class: "gd-contract-template-designer__icon-button",
1486
+ disabled: V.value || Da.value,
1487
+ "aria-label": "复制页面",
1488
+ onClick: (t) => wo(e)
1489
+ }, {
1490
+ default: T(() => [g(w(ee), { "aria-hidden": "true" })]),
1491
+ _: 1
1492
+ }, 8, ["disabled", "onClick"])]),
1493
+ _: 2
1494
+ }, 1024), g(w(k), { title: "删除页面" }, {
1495
+ default: T(() => [g(w(E), {
1496
+ size: "small",
1497
+ danger: "",
1498
+ class: "gd-contract-template-designer__icon-button",
1499
+ disabled: V.value || j.value.pages.length <= 1,
1500
+ "aria-label": "删除页面",
1501
+ onClick: (t) => Eo(e)
1502
+ }, {
1503
+ default: T(() => [g(w(ne), { "aria-hidden": "true" })]),
1504
+ _: 1
1505
+ }, 8, ["disabled", "onClick"])]),
1506
+ _: 2
1507
+ }, 1024)])]))), 128)),
1508
+ W.value ? (b(), p("div", nn, [m("label", rn, [s[82] ||= m("span", null, "页面格式", -1), g(w(O), {
1509
+ value: ca.value.format,
1510
+ options: w(Sa),
1511
+ disabled: V.value,
1512
+ onChange: go
1513
+ }, null, 8, [
1514
+ "value",
1515
+ "options",
1516
+ "disabled"
1517
+ ])]), m("div", an, C(ca.value.width) + " × " + C(ca.value.height), 1)])) : f("", !0)
1518
+ ]),
1519
+ m("section", on, [
1520
+ m("div", sn, [s[83] ||= m("strong", null, "控件参数", -1), g(w(qt), null, {
1521
+ default: T(() => [h(C(j.value.variables.length), 1)]),
900
1522
  _: 1
901
1523
  })]),
902
- _: 1
903
- }),
904
- _(x(D), { title: P.value ? "退出全屏" : "全屏显示" }, {
905
- default: S(() => [_(x(C), {
906
- size: "small",
907
- class: "gd-contract-template-designer__icon-button",
908
- "aria-label": P.value ? "退出全屏" : "全屏显示",
909
- onClick: gi
910
- }, {
911
- default: S(() => [P.value ? (v(), f(x(te), {
912
- key: 0,
913
- "aria-hidden": "true"
914
- })) : (v(), f(x(ne), {
915
- key: 1,
916
- "aria-hidden": "true"
917
- }))]),
1524
+ j.value.variables.length ? f("", !0) : (b(), d(w(Ht), {
1525
+ key: 0,
1526
+ description: "暂无正文控件",
1527
+ image: w(Ht).PRESENTED_IMAGE_SIMPLE
1528
+ }, null, 8, ["image"])),
1529
+ (b(!0), p(l, null, S(j.value.variables, (e) => (b(), p("button", {
1530
+ key: e.id,
1531
+ type: "button",
1532
+ class: y(["gd-contract-template-designer__nav-item", { "is-active": M.value === e.key }]),
1533
+ onClick: (t) => Is(e)
1534
+ }, [m("span", null, C(e.label), 1), m("small", null, C(e.type || "text") + " · " + C(e.key), 1)], 10, cn))), 128))
1535
+ ]),
1536
+ m("section", ln, [
1537
+ m("div", un, [s[84] ||= m("strong", null, "签署位置", -1), g(w(qt), null, {
1538
+ default: T(() => [h(C(oa.value.length), 1)]),
918
1539
  _: 1
919
- }, 8, ["aria-label"])]),
920
- _: 1
921
- }, 8, ["title"])
922
- ])]), h("div", bt, [
923
- c.showClearButton ? (v(), f(x(D), {
1540
+ })]),
1541
+ oa.value.length ? f("", !0) : (b(), d(w(Ht), {
1542
+ key: 0,
1543
+ description: "暂无签署位置",
1544
+ image: w(Ht).PRESENTED_IMAGE_SIMPLE
1545
+ }, null, 8, ["image"])),
1546
+ (b(!0), p(l, null, S(oa.value, (e) => (b(), p("button", {
1547
+ key: e.placement.id,
1548
+ type: "button",
1549
+ class: y(["gd-contract-template-designer__nav-item", { "is-active": N.value === e.placement.id }]),
1550
+ onClick: (t) => Rs(e.placement.id)
1551
+ }, [m("span", null, C(e.label), 1), m("small", null, C(e.detail) + " · x" + C(e.placement.x) + " y" + C(e.placement.y), 1)], 10, dn))), 128))
1552
+ ])
1553
+ ])], 2),
1554
+ m("main", {
1555
+ ref_key: "workspaceElement",
1556
+ ref: hi,
1557
+ class: "gd-contract-template-designer__workspace"
1558
+ }, [
1559
+ m("header", fn, [m("div", pn, [m("strong", null, C(da.value), 1), Qe.showDraftCacheStatus && fa.value ? (b(), p("small", {
924
1560
  key: 0,
925
- title: "清空合同"
926
- }, {
927
- default: S(() => [_(x(C), {
928
- size: "small",
929
- danger: "",
930
- class: "gd-contract-template-designer__icon-button",
931
- disabled: B.value,
932
- "aria-label": "清空合同",
933
- onClick: Ci
934
- }, {
935
- default: S(() => [_(x(a), { "aria-hidden": "true" })]),
1561
+ class: y(["gd-contract-template-designer__draft-cache-status", pa.value])
1562
+ }, C(fa.value), 3)) : f("", !0)]), m("div", mn, [m("div", hn, [m("div", gn, [
1563
+ g(w(k), { title: "缩小" }, {
1564
+ default: T(() => [g(w(E), {
1565
+ size: "small",
1566
+ class: "gd-contract-template-designer__icon-button",
1567
+ disabled: I.value <= ei,
1568
+ "aria-label": "缩小",
1569
+ onClick: Ts
1570
+ }, {
1571
+ default: T(() => [g(w(Te), { "aria-hidden": "true" })]),
1572
+ _: 1
1573
+ }, 8, ["disabled"])]),
936
1574
  _: 1
937
- }, 8, ["disabled"])]),
938
- _: 1
939
- })) : p("", !0),
940
- _(x(D), { title: "校验" }, {
941
- default: S(() => [_(x(C), {
942
- size: "small",
943
- class: "gd-contract-template-designer__icon-button",
944
- "aria-label": "校验",
945
- onClick: ji
946
- }, {
947
- default: S(() => [_(x(e), { "aria-hidden": "true" })]),
1575
+ }),
1576
+ m("span", null, C(ma.value), 1),
1577
+ g(w(k), { title: "放大" }, {
1578
+ default: T(() => [g(w(E), {
1579
+ size: "small",
1580
+ class: "gd-contract-template-designer__icon-button",
1581
+ disabled: I.value >= ti,
1582
+ "aria-label": "放大",
1583
+ onClick: ws
1584
+ }, {
1585
+ default: T(() => [g(w(we), { "aria-hidden": "true" })]),
1586
+ _: 1
1587
+ }, 8, ["disabled"])]),
948
1588
  _: 1
949
- })]),
950
- _: 1
951
- }),
952
- _(x(D), { title: "预览" }, {
953
- default: S(() => [_(x(C), {
954
- size: "small",
955
- type: "primary",
956
- class: "gd-contract-template-designer__icon-button",
957
- "aria-label": "预览",
958
- onClick: _i
959
- }, {
960
- default: S(() => [_(x(o), { "aria-hidden": "true" })]),
1589
+ }),
1590
+ g(w(k), { title: "适应宽度" }, {
1591
+ default: T(() => [g(w(E), {
1592
+ size: "small",
1593
+ class: "gd-contract-template-designer__icon-button",
1594
+ "aria-label": "适应宽度",
1595
+ onClick: w(vs)
1596
+ }, {
1597
+ default: T(() => [g(w(o), { "aria-hidden": "true" })]),
1598
+ _: 1
1599
+ }, 8, ["onClick"])]),
961
1600
  _: 1
962
- })]),
963
- _: 1
964
- }),
965
- c.showSubmitDataViewer ? (v(), f(x(D), {
966
- key: 1,
967
- title: "数据查看"
968
- }, {
969
- default: S(() => [_(x(C), {
970
- size: "small",
971
- class: "gd-contract-template-designer__icon-button",
972
- "aria-label": "数据查看",
973
- onClick: bi
974
- }, {
975
- default: S(() => [_(x(i), { "aria-hidden": "true" })]),
1601
+ }),
1602
+ g(w(k), { title: "重置缩放" }, {
1603
+ default: T(() => [g(w(E), {
1604
+ size: "small",
1605
+ class: "gd-contract-template-designer__icon-button",
1606
+ "aria-label": "重置缩放",
1607
+ onClick: Ss
1608
+ }, {
1609
+ default: T(() => [g(w(_e), { "aria-hidden": "true" })]),
1610
+ _: 1
1611
+ })]),
976
1612
  _: 1
977
- })]),
978
- _: 1
979
- })) : p("", !0)
980
- ])])]),
981
- h("header", xt, [h("div", St, [
982
- h("div", Ct, [_(x(D), { title: "撤销" }, {
983
- default: S(() => [_(x(C), {
984
- size: "small",
985
- class: "gd-contract-template-designer__icon-button",
986
- disabled: B.value || !W.value.canUndo,
987
- "aria-label": "撤销",
988
- onClick: s[0] ||= (e) => q({ type: "undo" })
989
- }, {
990
- default: S(() => [_(x(ue), { "aria-hidden": "true" })]),
1613
+ }),
1614
+ g(w(k), { title: ki.value ? "退出全屏" : "全屏显示" }, {
1615
+ default: T(() => [g(w(E), {
1616
+ size: "small",
1617
+ class: "gd-contract-template-designer__icon-button",
1618
+ "aria-label": ki.value ? "退出全屏" : "全屏显示",
1619
+ onClick: Ds
1620
+ }, {
1621
+ default: T(() => [ki.value ? (b(), d(w(ce), {
1622
+ key: 0,
1623
+ "aria-hidden": "true"
1624
+ })) : (b(), d(w(le), {
1625
+ key: 1,
1626
+ "aria-hidden": "true"
1627
+ }))]),
1628
+ _: 1
1629
+ }, 8, ["aria-label"])]),
991
1630
  _: 1
992
- }, 8, ["disabled"])]),
993
- _: 1
994
- }), _(x(D), { title: "重做" }, {
995
- default: S(() => [_(x(C), {
996
- size: "small",
997
- class: "gd-contract-template-designer__icon-button",
998
- disabled: B.value || !W.value.canRedo,
999
- "aria-label": "重做",
1000
- onClick: s[1] ||= (e) => q({ type: "redo" })
1631
+ }, 8, ["title"])
1632
+ ])]), m("div", _n, [
1633
+ Qe.showClearButton ? (b(), d(w(k), {
1634
+ key: 0,
1635
+ title: "清空合同"
1001
1636
  }, {
1002
- default: S(() => [_(x(oe), { "aria-hidden": "true" })]),
1637
+ default: T(() => [g(w(E), {
1638
+ size: "small",
1639
+ danger: "",
1640
+ class: "gd-contract-template-designer__icon-button",
1641
+ disabled: V.value,
1642
+ "aria-label": "清空合同",
1643
+ onClick: Ps
1644
+ }, {
1645
+ default: T(() => [g(w(ne), { "aria-hidden": "true" })]),
1646
+ _: 1
1647
+ }, 8, ["disabled"])]),
1003
1648
  _: 1
1004
- }, 8, ["disabled"])]),
1005
- _: 1
1006
- })]),
1007
- h("div", wt, [_(x(E), {
1008
- value: qn.value,
1009
- "onUpdate:value": s[2] ||= (e) => qn.value = e,
1010
- class: "gd-contract-template-designer__toolbar-select",
1011
- options: ir.value,
1012
- placeholder: "合同样式",
1013
- disabled: B.value,
1014
- onChange: qi
1015
- }, null, 8, [
1016
- "value",
1017
- "options",
1018
- "disabled"
1019
- ]), _(x(E), {
1020
- class: "gd-contract-template-designer__toolbar-select",
1021
- value: hr.value,
1022
- options: or,
1023
- disabled: B.value,
1024
- onChange: Ri
1025
- }, null, 8, ["value", "disabled"])]),
1026
- h("div", Tt, [
1027
- _(x(D), { title: "加粗" }, {
1028
- default: S(() => [_(x(C), {
1649
+ })) : f("", !0),
1650
+ g(w(k), { title: "校验" }, {
1651
+ default: T(() => [g(w(E), {
1029
1652
  size: "small",
1030
1653
  class: "gd-contract-template-designer__icon-button",
1031
- type: W.value.isBold ? "primary" : "default",
1032
- disabled: B.value,
1033
- "aria-label": "加粗",
1034
- onClick: s[3] ||= (e) => q({ type: "toggle-bold" })
1654
+ "aria-label": "校验",
1655
+ onClick: Us
1035
1656
  }, {
1036
- default: S(() => [_(x(t), { "aria-hidden": "true" })]),
1657
+ default: T(() => [g(w(r), { "aria-hidden": "true" })]),
1037
1658
  _: 1
1038
- }, 8, ["type", "disabled"])]),
1659
+ })]),
1039
1660
  _: 1
1040
1661
  }),
1041
- _(x(D), { title: "斜体" }, {
1042
- default: S(() => [_(x(C), {
1662
+ g(w(k), { title: "预览" }, {
1663
+ default: T(() => [g(w(E), {
1043
1664
  size: "small",
1665
+ type: "primary",
1044
1666
  class: "gd-contract-template-designer__icon-button",
1045
- type: W.value.isItalic ? "primary" : "default",
1046
- disabled: B.value,
1047
- "aria-label": "斜体",
1048
- onClick: s[4] ||= (e) => q({ type: "toggle-italic" })
1667
+ "aria-label": "预览",
1668
+ onClick: Os
1049
1669
  }, {
1050
- default: S(() => [_(x(re), { "aria-hidden": "true" })]),
1670
+ default: T(() => [g(w(ae), { "aria-hidden": "true" })]),
1051
1671
  _: 1
1052
- }, 8, ["type", "disabled"])]),
1672
+ })]),
1053
1673
  _: 1
1054
1674
  }),
1055
- _(x(D), { title: "下划线" }, {
1056
- default: S(() => [_(x(C), {
1675
+ Qe.showSubmitDataViewer ? (b(), d(w(k), {
1676
+ key: 1,
1677
+ title: "数据查看"
1678
+ }, {
1679
+ default: T(() => [g(w(E), {
1057
1680
  size: "small",
1058
1681
  class: "gd-contract-template-designer__icon-button",
1059
- type: W.value.isUnderline ? "primary" : "default",
1060
- disabled: B.value,
1061
- "aria-label": "下划线",
1062
- onClick: s[5] ||= (e) => q({ type: "toggle-underline" })
1682
+ "aria-label": "数据查看",
1683
+ onClick: js
1063
1684
  }, {
1064
- default: S(() => [_(x(le), { "aria-hidden": "true" })]),
1685
+ default: T(() => [g(w(te), { "aria-hidden": "true" })]),
1065
1686
  _: 1
1066
- }, 8, ["type", "disabled"])]),
1687
+ })]),
1067
1688
  _: 1
1068
- }),
1069
- _(x(D), { title: "编号列表" }, {
1070
- default: S(() => [_(x(C), {
1689
+ })) : f("", !0)
1690
+ ])])]),
1691
+ m("header", vn, [m("div", {
1692
+ ref_key: "toolbarMainElement",
1693
+ ref: gi,
1694
+ class: "gd-contract-template-designer__toolbar-section gd-contract-template-designer__toolbar-section--main"
1695
+ }, [
1696
+ m("div", yn, [g(w(k), { title: "撤销" }, {
1697
+ default: T(() => [g(w(E), {
1071
1698
  size: "small",
1072
1699
  class: "gd-contract-template-designer__icon-button",
1073
- type: W.value.isOrderedList ? "primary" : "default",
1074
- disabled: B.value,
1075
- "aria-label": "编号列表",
1076
- onClick: s[6] ||= (e) => q({ type: "toggle-ordered-list" })
1700
+ disabled: V.value || !G.value.canUndo,
1701
+ "aria-label": "撤销",
1702
+ onClick: s[1] ||= (e) => q({ type: "undo" })
1077
1703
  }, {
1078
- default: S(() => [_(x(ie), { "aria-hidden": "true" })]),
1704
+ default: T(() => [g(w(Se), { "aria-hidden": "true" })]),
1079
1705
  _: 1
1080
- }, 8, ["type", "disabled"])]),
1706
+ }, 8, ["disabled"])]),
1081
1707
  _: 1
1082
- }),
1083
- _(x(D), { title: "项目列表" }, {
1084
- default: S(() => [_(x(C), {
1708
+ }), g(w(k), { title: "重做" }, {
1709
+ default: T(() => [g(w(E), {
1085
1710
  size: "small",
1086
1711
  class: "gd-contract-template-designer__icon-button",
1087
- type: W.value.isBulletList ? "primary" : "default",
1088
- disabled: B.value,
1089
- "aria-label": "项目列表",
1090
- onClick: s[7] ||= (e) => q({ type: "toggle-bullet-list" })
1712
+ disabled: V.value || !G.value.canRedo,
1713
+ "aria-label": "重做",
1714
+ onClick: s[2] ||= (e) => q({ type: "redo" })
1091
1715
  }, {
1092
- default: S(() => [_(x(de), { "aria-hidden": "true" })]),
1716
+ default: T(() => [g(w(ge), { "aria-hidden": "true" })]),
1093
1717
  _: 1
1094
- }, 8, ["type", "disabled"])]),
1718
+ }, 8, ["disabled"])]),
1095
1719
  _: 1
1096
- })
1097
- ]),
1098
- h("div", Et, [
1099
- _(x(E), {
1100
- class: "gd-contract-template-designer__toolbar-select is-wide",
1101
- value: gr.value,
1102
- options: rr.value,
1103
- disabled: B.value,
1104
- onChange: Bi
1105
- }, null, 8, [
1106
- "value",
1107
- "options",
1108
- "disabled"
1109
- ]),
1110
- _(x(E), {
1720
+ })]),
1721
+ m("div", bn, [g(w(O), {
1722
+ value: Pi.value,
1723
+ "onUpdate:value": s[3] ||= (e) => Pi.value = e,
1111
1724
  class: "gd-contract-template-designer__toolbar-select",
1112
- value: _r.value,
1113
- options: br.value,
1114
- "show-search": "",
1115
- "filter-option": !1,
1116
- "search-value": F.value,
1117
- disabled: B.value,
1118
- onBlur: Wi,
1119
- onChange: zi,
1120
- onDropdownVisibleChange: Ki,
1121
- onInputKeyDown: Gi,
1122
- onSearch: Ui
1725
+ options: _a.value,
1726
+ placeholder: "合同样式",
1727
+ disabled: V.value,
1728
+ onChange: lc
1123
1729
  }, null, 8, [
1124
1730
  "value",
1125
1731
  "options",
1126
- "search-value",
1127
1732
  "disabled"
1128
- ]),
1129
- h("input", {
1130
- class: "gd-contract-template-designer__color",
1131
- type: "color",
1132
- value: vr.value,
1133
- disabled: B.value,
1134
- onInput: Vi
1135
- }, null, 40, Dt),
1136
- _(x(E), {
1733
+ ]), g(w(O), {
1137
1734
  class: "gd-contract-template-designer__toolbar-select",
1138
- value: W.value.textAlign,
1139
- options: x(ar),
1140
- disabled: B.value,
1141
- onChange: Li
1142
- }, null, 8, [
1143
- "value",
1144
- "options",
1145
- "disabled"
1146
- ])
1147
- ]),
1148
- h("div", Ot, [_(x(D), { title: "清文字" }, {
1149
- default: S(() => [_(x(C), {
1735
+ value: ja.value,
1736
+ options: ya,
1737
+ disabled: V.value,
1738
+ onChange: ec
1739
+ }, null, 8, ["value", "disabled"])]),
1740
+ m("div", xn, [
1741
+ g(w(k), { title: "加粗" }, {
1742
+ default: T(() => [g(w(E), {
1743
+ size: "small",
1744
+ class: "gd-contract-template-designer__icon-button",
1745
+ type: G.value.isBold ? "primary" : "default",
1746
+ disabled: V.value,
1747
+ "aria-label": "加粗",
1748
+ onClick: s[4] ||= (e) => q({ type: "toggle-bold" })
1749
+ }, {
1750
+ default: T(() => [g(w(i), { "aria-hidden": "true" })]),
1751
+ _: 1
1752
+ }, 8, ["type", "disabled"])]),
1753
+ _: 1
1754
+ }),
1755
+ g(w(k), { title: "斜体" }, {
1756
+ default: T(() => [g(w(E), {
1757
+ size: "small",
1758
+ class: "gd-contract-template-designer__icon-button",
1759
+ type: G.value.isItalic ? "primary" : "default",
1760
+ disabled: V.value,
1761
+ "aria-label": "斜体",
1762
+ onClick: s[5] ||= (e) => q({ type: "toggle-italic" })
1763
+ }, {
1764
+ default: T(() => [g(w(ue), { "aria-hidden": "true" })]),
1765
+ _: 1
1766
+ }, 8, ["type", "disabled"])]),
1767
+ _: 1
1768
+ }),
1769
+ g(w(k), { title: "下划线" }, {
1770
+ default: T(() => [g(w(E), {
1771
+ size: "small",
1772
+ class: "gd-contract-template-designer__icon-button",
1773
+ type: G.value.isUnderline ? "primary" : "default",
1774
+ disabled: V.value,
1775
+ "aria-label": "下划线",
1776
+ onClick: s[6] ||= (e) => q({ type: "toggle-underline" })
1777
+ }, {
1778
+ default: T(() => [g(w(xe), { "aria-hidden": "true" })]),
1779
+ _: 1
1780
+ }, 8, ["type", "disabled"])]),
1781
+ _: 1
1782
+ }),
1783
+ g(w(k), { title: "编号列表" }, {
1784
+ default: T(() => [g(w(E), {
1785
+ size: "small",
1786
+ class: "gd-contract-template-designer__icon-button",
1787
+ type: G.value.isOrderedList ? "primary" : "default",
1788
+ disabled: V.value,
1789
+ "aria-label": "编号列表",
1790
+ onClick: s[7] ||= (e) => q({ type: "toggle-ordered-list" })
1791
+ }, {
1792
+ default: T(() => [g(w(pe), { "aria-hidden": "true" })]),
1793
+ _: 1
1794
+ }, 8, ["type", "disabled"])]),
1795
+ _: 1
1796
+ }),
1797
+ g(w(k), { title: "项目列表" }, {
1798
+ default: T(() => [g(w(E), {
1799
+ size: "small",
1800
+ class: "gd-contract-template-designer__icon-button",
1801
+ type: G.value.isBulletList ? "primary" : "default",
1802
+ disabled: V.value,
1803
+ "aria-label": "项目列表",
1804
+ onClick: s[8] ||= (e) => q({ type: "toggle-bullet-list" })
1805
+ }, {
1806
+ default: T(() => [g(w(Ce), { "aria-hidden": "true" })]),
1807
+ _: 1
1808
+ }, 8, ["type", "disabled"])]),
1809
+ _: 1
1810
+ })
1811
+ ]),
1812
+ m("div", Sn, [
1813
+ g(w(Gt), {
1814
+ open: Li.value,
1815
+ "onUpdate:open": s[9] ||= (e) => Li.value = e,
1816
+ trigger: "click",
1817
+ placement: "bottom"
1818
+ }, {
1819
+ content: T(() => [m("div", Cn, [s[85] ||= m("strong", null, "插入正文控件", -1), m("div", wn, [(b(!0), p(l, null, S(Ta.value, (e) => (b(), d(w(k), {
1820
+ key: e.type,
1821
+ title: `插入${e.label}控件`
1822
+ }, {
1823
+ default: T(() => [m("button", {
1824
+ type: "button",
1825
+ class: "gd-contract-template-designer__text-menu-control-option",
1826
+ "aria-label": `插入${e.label}控件`,
1827
+ onClick: (t) => Vo(e.type)
1828
+ }, [(b(), d(It(e.icon), { "aria-hidden": "true" })), m("span", null, C(e.label), 1)], 8, Tn)]),
1829
+ _: 2
1830
+ }, 1032, ["title"]))), 128))])])]),
1831
+ default: T(() => [g(w(k), { title: "插入正文控件" }, {
1832
+ default: T(() => [g(w(E), {
1833
+ size: "small",
1834
+ class: "gd-contract-template-designer__icon-button",
1835
+ disabled: V.value,
1836
+ "aria-label": "插入正文控件"
1837
+ }, {
1838
+ default: T(() => [g(w(he), { "aria-hidden": "true" })]),
1839
+ _: 1
1840
+ }, 8, ["disabled"])]),
1841
+ _: 1
1842
+ })]),
1843
+ _: 1
1844
+ }, 8, ["open"]),
1845
+ g(w(Gt), {
1846
+ open: Ri.value,
1847
+ "onUpdate:open": s[13] ||= (e) => Ri.value = e,
1848
+ trigger: "click",
1849
+ placement: "bottom"
1850
+ }, {
1851
+ content: T(() => [m("div", En, [
1852
+ s[90] ||= m("strong", null, "插入正文图片", -1),
1853
+ g(w(E), {
1854
+ block: "",
1855
+ loading: Ui.value,
1856
+ disabled: V.value,
1857
+ onClick: Ro
1858
+ }, {
1859
+ default: T(() => [g(w(me), { "aria-hidden": "true" }), s[86] ||= h(" 本地图片 ", -1)]),
1860
+ _: 1
1861
+ }, 8, ["loading", "disabled"]),
1862
+ g(w(D), {
1863
+ value: zi.value,
1864
+ "onUpdate:value": s[10] ||= (e) => zi.value = e,
1865
+ "allow-clear": "",
1866
+ disabled: V.value || Ui.value,
1867
+ placeholder: "https:// 或 data:image/...",
1868
+ "aria-label": "图片 URL",
1869
+ onPressEnter: Bo
1870
+ }, null, 8, ["value", "disabled"]),
1871
+ m("div", Dn, [m("label", null, [s[87] ||= m("span", null, "宽度", -1), g(w(Ut), {
1872
+ value: Bi.value,
1873
+ "onUpdate:value": s[11] ||= (e) => Bi.value = e,
1874
+ min: w(16),
1875
+ max: w(Me),
1876
+ disabled: V.value || Ui.value,
1877
+ placeholder: "自然",
1878
+ "aria-label": "图片宽度"
1879
+ }, null, 8, [
1880
+ "value",
1881
+ "min",
1882
+ "max",
1883
+ "disabled"
1884
+ ])]), m("label", null, [s[88] ||= m("span", null, "高度", -1), g(w(Ut), {
1885
+ value: Vi.value,
1886
+ "onUpdate:value": s[12] ||= (e) => Vi.value = e,
1887
+ min: w(16),
1888
+ max: w(Me),
1889
+ disabled: V.value || Ui.value,
1890
+ placeholder: "自然",
1891
+ "aria-label": "图片高度"
1892
+ }, null, 8, [
1893
+ "value",
1894
+ "min",
1895
+ "max",
1896
+ "disabled"
1897
+ ])])]),
1898
+ g(w(E), {
1899
+ type: "primary",
1900
+ block: "",
1901
+ disabled: V.value || Ui.value || !zi.value.trim(),
1902
+ onClick: Bo
1903
+ }, {
1904
+ default: T(() => [...s[89] ||= [h(" 插入 URL ", -1)]]),
1905
+ _: 1
1906
+ }, 8, ["disabled"]),
1907
+ Hi.value ? (b(), d(w(Vt), {
1908
+ key: 0,
1909
+ type: "error",
1910
+ "show-icon": "",
1911
+ message: Hi.value
1912
+ }, null, 8, ["message"])) : f("", !0)
1913
+ ])]),
1914
+ default: T(() => [g(w(k), { title: "插入图片" }, {
1915
+ default: T(() => [g(w(E), {
1916
+ size: "small",
1917
+ class: "gd-contract-template-designer__icon-button",
1918
+ disabled: V.value,
1919
+ "aria-label": "插入图片"
1920
+ }, {
1921
+ default: T(() => [g(w(me), { "aria-hidden": "true" })]),
1922
+ _: 1
1923
+ }, 8, ["disabled"])]),
1924
+ _: 1
1925
+ })]),
1926
+ _: 1
1927
+ }, 8, ["open"]),
1928
+ g(w(k), { title: "插入分隔线" }, {
1929
+ default: T(() => [g(w(E), {
1930
+ size: "small",
1931
+ class: "gd-contract-template-designer__icon-button",
1932
+ disabled: V.value,
1933
+ "aria-label": "插入分隔线",
1934
+ onClick: s[14] ||= (e) => q({ type: "insert-horizontal-rule" })
1935
+ }, {
1936
+ default: T(() => [g(w(fe), { "aria-hidden": "true" })]),
1937
+ _: 1
1938
+ }, 8, ["disabled"])]),
1939
+ _: 1
1940
+ }),
1941
+ g(w(k), { title: Da.value ? `已达 ${Ea.value} 页上限` : "新增页面" }, {
1942
+ default: T(() => [g(w(E), {
1943
+ size: "small",
1944
+ class: "gd-contract-template-designer__icon-button",
1945
+ disabled: V.value || Da.value,
1946
+ "aria-label": "新增页面",
1947
+ onClick: Co
1948
+ }, {
1949
+ default: T(() => [g(w(oe), { "aria-hidden": "true" })]),
1950
+ _: 1
1951
+ }, 8, ["disabled"])]),
1952
+ _: 1
1953
+ }, 8, ["title"])
1954
+ ]),
1955
+ zt(m("div", On, [g(w(k), { title: "更多工具" }, {
1956
+ default: T(() => [g(w(E), {
1957
+ size: "small",
1958
+ class: y(["gd-contract-template-designer__icon-button", { "is-selected": Mi.value }]),
1959
+ "aria-label": "更多工具",
1960
+ "aria-haspopup": "true",
1961
+ "aria-expanded": Mi.value,
1962
+ onClick: s[15] ||= Bt((e) => Mi.value = !Mi.value, ["stop"])
1963
+ }, {
1964
+ default: T(() => [g(w(ie), { "aria-hidden": "true" })]),
1965
+ _: 1
1966
+ }, 8, ["class", "aria-expanded"])]),
1967
+ _: 1
1968
+ }), zt(m("div", {
1969
+ ref_key: "toolbarExtraOverflowElement",
1970
+ ref: _i,
1971
+ class: "gd-contract-template-designer__toolbar-more-panel",
1972
+ role: "menu",
1973
+ "aria-label": "更多编辑工具"
1974
+ }, null, 512), [[Lt, Mi.value]])], 512), [[Lt, hs.value]]),
1975
+ (b(), d(Mt, {
1976
+ disabled: !hs.value || !_i.value,
1977
+ to: _i.value || "body"
1978
+ }, [m("div", kn, [
1979
+ m("div", An, [
1980
+ g(w(O), {
1981
+ class: "gd-contract-template-designer__toolbar-select is-wide",
1982
+ value: Ma.value,
1983
+ options: ga.value,
1984
+ disabled: V.value,
1985
+ onChange: nc
1986
+ }, null, 8, [
1987
+ "value",
1988
+ "options",
1989
+ "disabled"
1990
+ ]),
1991
+ g(w(O), {
1992
+ class: "gd-contract-template-designer__toolbar-select",
1993
+ value: Na.value,
1994
+ options: Ia.value,
1995
+ "show-search": "",
1996
+ "filter-option": !1,
1997
+ "search-value": Fi.value,
1998
+ disabled: V.value,
1999
+ onBlur: oc,
2000
+ onChange: tc,
2001
+ onDropdownVisibleChange: cc,
2002
+ onInputKeyDown: sc,
2003
+ onSearch: ac
2004
+ }, null, 8, [
2005
+ "value",
2006
+ "options",
2007
+ "search-value",
2008
+ "disabled"
2009
+ ]),
2010
+ m("input", {
2011
+ class: "gd-contract-template-designer__color",
2012
+ type: "color",
2013
+ value: Pa.value,
2014
+ disabled: V.value,
2015
+ onInput: rc
2016
+ }, null, 40, jn),
2017
+ g(w(k), { title: "左对齐" }, {
2018
+ default: T(() => [g(w(E), {
2019
+ size: "small",
2020
+ class: y(["gd-contract-template-designer__icon-button", { "is-selected": G.value.textAlign === "left" }]),
2021
+ type: G.value.textAlign === "left" ? "primary" : "default",
2022
+ disabled: V.value,
2023
+ "aria-label": "左对齐",
2024
+ onClick: s[16] ||= (e) => $s("left")
2025
+ }, {
2026
+ default: T(() => [g(w(t), { "aria-hidden": "true" })]),
2027
+ _: 1
2028
+ }, 8, [
2029
+ "class",
2030
+ "type",
2031
+ "disabled"
2032
+ ])]),
2033
+ _: 1
2034
+ }),
2035
+ g(w(k), { title: "居中对齐" }, {
2036
+ default: T(() => [g(w(E), {
2037
+ size: "small",
2038
+ class: y(["gd-contract-template-designer__icon-button", { "is-selected": G.value.textAlign === "center" }]),
2039
+ type: G.value.textAlign === "center" ? "primary" : "default",
2040
+ disabled: V.value,
2041
+ "aria-label": "居中对齐",
2042
+ onClick: s[17] ||= (e) => $s("center")
2043
+ }, {
2044
+ default: T(() => [g(w(e), { "aria-hidden": "true" })]),
2045
+ _: 1
2046
+ }, 8, [
2047
+ "class",
2048
+ "type",
2049
+ "disabled"
2050
+ ])]),
2051
+ _: 1
2052
+ }),
2053
+ g(w(k), { title: "右对齐" }, {
2054
+ default: T(() => [g(w(E), {
2055
+ size: "small",
2056
+ class: y(["gd-contract-template-designer__icon-button", { "is-selected": G.value.textAlign === "right" }]),
2057
+ type: G.value.textAlign === "right" ? "primary" : "default",
2058
+ disabled: V.value,
2059
+ "aria-label": "右对齐",
2060
+ onClick: s[18] ||= (e) => $s("right")
2061
+ }, {
2062
+ default: T(() => [g(w(n), { "aria-hidden": "true" })]),
2063
+ _: 1
2064
+ }, 8, [
2065
+ "class",
2066
+ "type",
2067
+ "disabled"
2068
+ ])]),
2069
+ _: 1
2070
+ })
2071
+ ]),
2072
+ m("div", Mn, [g(w(k), { title: "清文字" }, {
2073
+ default: T(() => [g(w(E), {
2074
+ size: "small",
2075
+ class: "gd-contract-template-designer__icon-button",
2076
+ disabled: V.value,
2077
+ "aria-label": "清文字",
2078
+ onClick: s[19] ||= (e) => q({ type: "clear-text-format" })
2079
+ }, {
2080
+ default: T(() => [g(w(a), { "aria-hidden": "true" })]),
2081
+ _: 1
2082
+ }, 8, ["disabled"])]),
2083
+ _: 1
2084
+ }), g(w(k), { title: "清段落" }, {
2085
+ default: T(() => [g(w(E), {
2086
+ size: "small",
2087
+ class: "gd-contract-template-designer__icon-button",
2088
+ disabled: V.value,
2089
+ "aria-label": "清段落",
2090
+ onClick: s[20] ||= (e) => q({ type: "clear-block-format" })
2091
+ }, {
2092
+ default: T(() => [g(w(se), { "aria-hidden": "true" })]),
2093
+ _: 1
2094
+ }, 8, ["disabled"])]),
2095
+ _: 1
2096
+ })]),
2097
+ m("div", Nn, [g(w(Gt), {
2098
+ open: L.value,
2099
+ "onUpdate:open": s[24] ||= (e) => L.value = e,
2100
+ trigger: "click",
2101
+ placement: "bottom"
2102
+ }, {
2103
+ content: T(() => [m("div", Pn, [
2104
+ s[92] ||= m("strong", null, "插入表格", -1),
2105
+ g(yt, {
2106
+ disabled: V.value,
2107
+ onSelect: s[21] ||= (e) => Sc(e.rows, e.cols),
2108
+ onClose: s[22] ||= (e) => L.value = !1
2109
+ }, null, 8, ["disabled"]),
2110
+ m("label", Fn, [s[91] ||= m("span", null, "表头行", -1), g(w(Kt), {
2111
+ checked: $i.value.withHeaderRow,
2112
+ "onUpdate:checked": s[23] ||= (e) => $i.value.withHeaderRow = e,
2113
+ disabled: V.value
2114
+ }, null, 8, ["checked", "disabled"])])
2115
+ ])]),
2116
+ default: T(() => [g(w(k), { title: "插入表格" }, {
2117
+ default: T(() => [g(w(E), {
2118
+ size: "small",
2119
+ class: "gd-contract-template-designer__icon-button",
2120
+ disabled: V.value,
2121
+ "aria-label": "插入表格"
2122
+ }, {
2123
+ default: T(() => [g(w(be), { "aria-hidden": "true" })]),
2124
+ _: 1
2125
+ }, 8, ["disabled"])]),
2126
+ _: 1
2127
+ })]),
2128
+ _: 1
2129
+ }, 8, ["open"]), g(w(Gt), {
2130
+ open: Ii.value,
2131
+ "onUpdate:open": s[34] ||= (e) => Ii.value = e,
2132
+ trigger: "click",
2133
+ placement: "bottom"
2134
+ }, {
2135
+ content: T(() => [m("div", In, [s[102] ||= m("strong", null, "表格操作", -1), m("div", Ln, [
2136
+ g(w(E), {
2137
+ size: "small",
2138
+ disabled: V.value,
2139
+ onClick: s[25] ||= (e) => Oc("add-table-row-before")
2140
+ }, {
2141
+ default: T(() => [...s[93] ||= [h(" 上方插行 ", -1)]]),
2142
+ _: 1
2143
+ }, 8, ["disabled"]),
2144
+ g(w(E), {
2145
+ size: "small",
2146
+ disabled: V.value,
2147
+ onClick: s[26] ||= (e) => Oc("add-table-row-after")
2148
+ }, {
2149
+ default: T(() => [...s[94] ||= [h(" 下方插行 ", -1)]]),
2150
+ _: 1
2151
+ }, 8, ["disabled"]),
2152
+ g(w(E), {
2153
+ size: "small",
2154
+ disabled: V.value,
2155
+ onClick: s[27] ||= (e) => Oc("add-table-column-before")
2156
+ }, {
2157
+ default: T(() => [...s[95] ||= [h(" 左侧插列 ", -1)]]),
2158
+ _: 1
2159
+ }, 8, ["disabled"]),
2160
+ g(w(E), {
2161
+ size: "small",
2162
+ disabled: V.value,
2163
+ onClick: s[28] ||= (e) => Oc("add-table-column-after")
2164
+ }, {
2165
+ default: T(() => [...s[96] ||= [h(" 右侧插列 ", -1)]]),
2166
+ _: 1
2167
+ }, 8, ["disabled"]),
2168
+ g(w(E), {
2169
+ size: "small",
2170
+ disabled: V.value,
2171
+ onClick: s[29] ||= (e) => Oc("delete-table-row")
2172
+ }, {
2173
+ default: T(() => [...s[97] ||= [h(" 删除当前行 ", -1)]]),
2174
+ _: 1
2175
+ }, 8, ["disabled"]),
2176
+ g(w(E), {
2177
+ size: "small",
2178
+ disabled: V.value,
2179
+ onClick: s[30] ||= (e) => Oc("delete-table-column")
2180
+ }, {
2181
+ default: T(() => [...s[98] ||= [h(" 删除当前列 ", -1)]]),
2182
+ _: 1
2183
+ }, 8, ["disabled"]),
2184
+ g(w(E), {
2185
+ size: "small",
2186
+ disabled: V.value,
2187
+ onClick: s[31] ||= (e) => Oc("toggle-table-header-row")
2188
+ }, {
2189
+ default: T(() => [...s[99] ||= [h(" 切换表头行 ", -1)]]),
2190
+ _: 1
2191
+ }, 8, ["disabled"]),
2192
+ g(w(E), {
2193
+ size: "small",
2194
+ disabled: V.value,
2195
+ onClick: s[32] ||= (e) => Oc("toggle-table-header-column")
2196
+ }, {
2197
+ default: T(() => [...s[100] ||= [h(" 切换表头列 ", -1)]]),
2198
+ _: 1
2199
+ }, 8, ["disabled"]),
2200
+ g(w(E), {
2201
+ danger: "",
2202
+ size: "small",
2203
+ disabled: V.value,
2204
+ onClick: s[33] ||= (e) => Oc("delete-table")
2205
+ }, {
2206
+ default: T(() => [...s[101] ||= [h(" 删除表格 ", -1)]]),
2207
+ _: 1
2208
+ }, 8, ["disabled"])
2209
+ ])])]),
2210
+ default: T(() => [g(w(k), { title: "表格操作" }, {
2211
+ default: T(() => [g(w(E), {
2212
+ size: "small",
2213
+ class: "gd-contract-template-designer__icon-button",
2214
+ disabled: V.value || !G.value.isTableActive,
2215
+ "aria-label": "表格操作"
2216
+ }, {
2217
+ default: T(() => [g(w(be), { "aria-hidden": "true" })]),
2218
+ _: 1
2219
+ }, 8, ["disabled"])]),
2220
+ _: 1
2221
+ })]),
2222
+ _: 1
2223
+ }, 8, ["open"])])
2224
+ ])], 8, ["disabled", "to"]))
2225
+ ], 512)]),
2226
+ xi.value ? (b(), p("section", Rn, [g(w(Vt), {
2227
+ type: la.value ? "success" : "error",
2228
+ message: ua.value,
2229
+ "show-icon": ""
2230
+ }, null, 8, ["type", "message"]), Si.value.length ? (b(), p("div", zn, [(b(!0), p(l, null, S(Si.value, (e) => (b(), p("button", {
2231
+ key: `${e.id}-${e.message}`,
2232
+ type: "button",
2233
+ class: "gd-contract-template-designer__validation-item",
2234
+ onClick: (t) => Ws(e)
2235
+ }, [m("span", null, C(e.message), 1), m("small", null, C(e.type === "signing-placement" ? "签署位置" : e.type === "variable" ? "变量" : "字段"), 1)], 8, Bn))), 128))])) : f("", !0)])) : f("", !0),
2236
+ m("div", {
2237
+ ref_key: "canvasElement",
2238
+ ref: mi,
2239
+ class: "gd-contract-template-designer__canvas"
2240
+ }, [(b(!0), p(l, null, S(j.value.pages, (e, t) => (b(), d(gt, {
2241
+ key: e.id,
2242
+ ref_for: !0,
2243
+ ref: (t) => Qa(e.id, t),
2244
+ page: e,
2245
+ "page-index": t,
2246
+ "page-size": Y(e),
2247
+ variables: j.value.variables,
2248
+ "selected-variable-key": M.value,
2249
+ "signing-placements": c.showSigningPlacementTools ? no(e.id) : [],
2250
+ "selected-signing-placement-id": N.value,
2251
+ active: P.value === e.id,
2252
+ readonly: Qe.readonly,
2253
+ disabled: Qe.disabled,
2254
+ zoom: I.value,
2255
+ "process-image-file": Io,
2256
+ onPageUpdate: to,
2257
+ onVariableDrop: Uo,
2258
+ onVariableSelect: Wo,
2259
+ onSigningPlacementDrop: co,
2260
+ onSigningPlacementSelect: ro,
2261
+ onSigningPlacementMove: fo,
2262
+ onSigningPlacementRemove: ho,
2263
+ onEditorFocus: s[35] ||= (e) => zs(e, !1),
2264
+ onEditorStateChange: xc,
2265
+ onEditorContextMenu: _c,
2266
+ onVariableMoveBlocked: s[36] ||= (e) => Zi.value = "变量只能在当前页内移动,跨页移动尚未支持。"
2267
+ }, null, 8, [
2268
+ "page",
2269
+ "page-index",
2270
+ "page-size",
2271
+ "variables",
2272
+ "selected-variable-key",
2273
+ "signing-placements",
2274
+ "selected-signing-placement-id",
2275
+ "active",
2276
+ "readonly",
2277
+ "disabled",
2278
+ "zoom"
2279
+ ]))), 128))], 512)
2280
+ ], 512),
2281
+ m("aside", { class: y(["gd-contract-template-designer__inspector", { "is-collapsed": ji.value }]) }, [g(w(k), { title: ji.value ? "展开属性栏" : "收起属性栏" }, {
2282
+ default: T(() => [m("button", {
2283
+ type: "button",
2284
+ class: "gd-contract-template-designer__panel-handle",
2285
+ "aria-label": ji.value ? "展开属性栏" : "收起属性栏",
2286
+ "aria-expanded": !ji.value,
2287
+ onClick: s[37] ||= (e) => ji.value = !ji.value
2288
+ }, [ji.value ? (b(), d(w(de), {
2289
+ key: 0,
2290
+ "aria-hidden": "true"
2291
+ })) : (b(), d(w(ve), {
2292
+ key: 1,
2293
+ "aria-hidden": "true"
2294
+ }))], 8, Vn)]),
2295
+ _: 1
2296
+ }, 8, ["title"]), m("div", Hn, [
2297
+ m("section", Un, [s[104] ||= m("div", { class: "gd-contract-template-designer__panel-head" }, [m("strong", null, "正文控件"), m("span", null, "拖到正文")], -1), (b(!0), p(l, null, S(Ta.value, (e) => (b(), p("button", {
2298
+ key: e.type,
2299
+ type: "button",
2300
+ draggable: "true",
2301
+ class: "gd-contract-template-designer__tool-item",
2302
+ disabled: V.value,
2303
+ onDragstart: (t) => us(t, e.type),
2304
+ onClick: (t) => is(e.type)
2305
+ }, [m("span", Gn, [(b(), d(It(e.icon)))]), m("span", Kn, [m("span", null, C(e.label), 1), s[103] ||= m("small", null, "模板变量", -1)])], 40, Wn))), 128))]),
2306
+ c.showSigningPlacementTools ? (b(), p("section", qn, [m("div", Jn, [s[105] ||= m("strong", null, "签署位置", -1), m("div", Yn, [g(w(qt), null, {
2307
+ default: T(() => [h(C(U.value.length), 1)]),
2308
+ _: 1
2309
+ })])]), (b(!0), p(l, null, S(Ca.value, (e) => (b(), p("button", {
2310
+ key: e.key,
2311
+ type: "button",
2312
+ draggable: "true",
2313
+ class: "gd-contract-template-designer__tool-item gd-contract-template-designer__signing-tool",
2314
+ disabled: V.value,
2315
+ onDragstart: (t) => uo(t, e),
2316
+ onClick: (t) => lo(e)
2317
+ }, [m("span", Zn, [(b(), d(It(w(jt)(e.type))))]), m("span", Qn, [m("span", $n, C(e.label), 1), m("small", null, C(w(Be)[e.type]) + " · 页面坐标", 1)])], 40, Xn))), 128))])) : f("", !0),
2318
+ aa.value ? (b(), d(kt, {
2319
+ key: 1,
2320
+ placement: aa.value,
2321
+ "page-size": sa.value,
2322
+ readonly: Qe.readonly,
2323
+ disabled: Qe.disabled,
2324
+ onUpdate: po,
2325
+ onDuplicate: s[38] ||= (e) => mo(),
2326
+ onRemove: s[39] ||= (e) => ho()
2327
+ }, null, 8, [
2328
+ "placement",
2329
+ "page-size",
2330
+ "readonly",
2331
+ "disabled"
2332
+ ])) : (b(), p("section", er, [m("div", tr, [s[106] ||= m("strong", null, "属性", -1), H.value ? (b(), p("div", nr, [g(w(k), { title: "复制变量" }, {
2333
+ default: T(() => [g(w(E), {
1150
2334
  size: "small",
2335
+ type: "primary",
1151
2336
  class: "gd-contract-template-designer__icon-button",
1152
- disabled: B.value,
1153
- "aria-label": "清文字",
1154
- onClick: s[8] ||= (e) => q({ type: "clear-text-format" })
2337
+ disabled: V.value,
2338
+ "aria-label": "复制变量",
2339
+ onClick: s[40] ||= (e) => ns(H.value)
1155
2340
  }, {
1156
- default: S(() => [_(x(n), { "aria-hidden": "true" })]),
2341
+ default: T(() => [g(w(ee), { "aria-hidden": "true" })]),
1157
2342
  _: 1
1158
2343
  }, 8, ["disabled"])]),
1159
2344
  _: 1
1160
- }), _(x(D), { title: "清段落" }, {
1161
- default: S(() => [_(x(C), {
2345
+ }), g(w(k), { title: "删除变量" }, {
2346
+ default: T(() => [g(w(E), {
2347
+ danger: "",
2348
+ type: "primary",
1162
2349
  size: "small",
1163
2350
  class: "gd-contract-template-designer__icon-button",
1164
- disabled: B.value,
1165
- "aria-label": "清段落",
1166
- onClick: s[9] ||= (e) => q({ type: "clear-block-format" })
2351
+ disabled: V.value,
2352
+ "aria-label": "删除变量",
2353
+ onClick: s[41] ||= (e) => es(H.value)
1167
2354
  }, {
1168
- default: S(() => [_(x(ee), { "aria-hidden": "true" })]),
2355
+ default: T(() => [g(w(ne), { "aria-hidden": "true" })]),
1169
2356
  _: 1
1170
2357
  }, 8, ["disabled"])]),
1171
2358
  _: 1
1172
- })]),
1173
- h("div", kt, [_(x(tt), {
1174
- open: I.value,
1175
- "onUpdate:open": s[14] ||= (e) => I.value = e,
1176
- trigger: "click",
1177
- placement: "bottom"
1178
- }, {
1179
- content: S(() => [h("div", At, [
1180
- s[64] ||= h("strong", null, "插入表格", -1),
1181
- h("div", jt, [h("label", null, [s[59] ||= h("span", null, "行数", -1), _(x(T), {
1182
- value: z.value.rows,
1183
- "onUpdate:value": s[10] ||= (e) => z.value.rows = e,
1184
- min: 1,
1185
- max: 10
1186
- }, null, 8, ["value"])]), h("label", null, [s[60] ||= h("span", null, "列数", -1), _(x(T), {
1187
- value: z.value.cols,
1188
- "onUpdate:value": s[11] ||= (e) => z.value.cols = e,
1189
- min: 1,
1190
- max: 10
1191
- }, null, 8, ["value"])])]),
1192
- h("label", Mt, [s[61] ||= h("span", null, "表头行", -1), _(x(nt), {
1193
- checked: z.value.withHeaderRow,
1194
- "onUpdate:checked": s[12] ||= (e) => z.value.withHeaderRow = e
1195
- }, null, 8, ["checked"])]),
1196
- h("div", Nt, [_(x(C), {
1197
- size: "small",
1198
- onClick: s[13] ||= (e) => I.value = !1
1199
- }, {
1200
- default: S(() => [...s[62] ||= [g(" 取消 ", -1)]]),
1201
- _: 1
1202
- }), _(x(C), {
1203
- size: "small",
1204
- type: "primary",
1205
- onClick: $i
1206
- }, {
1207
- default: S(() => [...s[63] ||= [g(" 插入 ", -1)]]),
1208
- _: 1
1209
- })])
2359
+ })])) : f("", !0)]), H.value ? (b(), p(l, { key: 1 }, [
2360
+ m("label", rr, [s[107] ||= m("span", null, "名称", -1), g(w(D), {
2361
+ value: H.value.label,
2362
+ disabled: V.value,
2363
+ onChange: s[42] ||= (e) => Q({ label: e.target.value })
2364
+ }, null, 8, ["value", "disabled"])]),
2365
+ m("label", ir, [s[108] ||= m("span", null, "变量标识", -1), g(w(D), {
2366
+ value: H.value.key,
2367
+ disabled: ""
2368
+ }, null, 8, ["value"])]),
2369
+ m("label", ar, [s[109] ||= m("span", null, "占位文案", -1), g(w(D), {
2370
+ value: H.value.placeholder,
2371
+ disabled: V.value,
2372
+ onChange: s[43] ||= (e) => Q({ placeholder: e.target.value })
2373
+ }, null, 8, ["value", "disabled"])]),
2374
+ m("label", or, [s[110] ||= m("span", null, "默认值", -1), g(w(D), {
2375
+ value: H.value.defaultValue,
2376
+ disabled: V.value,
2377
+ onChange: s[44] ||= (e) => Q({ defaultValue: e.target.value })
2378
+ }, null, 8, ["value", "disabled"])]),
2379
+ m("label", sr, [s[111] ||= m("span", null, "宽度", -1), g(w(Ut), {
2380
+ value: H.value.width,
2381
+ min: ai,
2382
+ max: ka.value,
2383
+ disabled: V.value,
2384
+ onChange: s[45] ||= (e) => Q({ width: Number(e || ai) })
2385
+ }, null, 8, [
2386
+ "value",
2387
+ "max",
2388
+ "disabled"
1210
2389
  ])]),
1211
- default: S(() => [_(x(D), { title: "插入表格" }, {
1212
- default: S(() => [_(x(C), {
1213
- size: "small",
1214
- class: "gd-contract-template-designer__icon-button",
1215
- disabled: B.value,
1216
- "aria-label": "插入表格"
1217
- }, {
1218
- default: S(() => [_(x(ce), { "aria-hidden": "true" })]),
1219
- _: 1
1220
- }, 8, ["disabled"])]),
1221
- _: 1
1222
- })]),
2390
+ m("label", cr, [s[112] ||= m("span", null, "高度", -1), g(w(Ut), {
2391
+ value: H.value.height,
2392
+ min: oi,
2393
+ max: Aa.value,
2394
+ disabled: V.value,
2395
+ onChange: s[46] ||= (e) => Q({ height: Number(e || oi) })
2396
+ }, null, 8, [
2397
+ "value",
2398
+ "max",
2399
+ "disabled"
2400
+ ])]),
2401
+ H.value.type === "text" ? (b(), p("div", lr, [m("label", ur, [s[113] ||= m("span", null, "多行", -1), g(w(Kt), {
2402
+ checked: !!H.value.multiline,
2403
+ disabled: V.value,
2404
+ onChange: s[47] ||= (e) => Qo(!!e)
2405
+ }, null, 8, ["checked", "disabled"])]), H.value.multiline ? (b(), p("label", dr, [s[114] ||= m("span", null, "行数", -1), g(w(Ut), {
2406
+ value: H.value.rows || w(3),
2407
+ min: 2,
2408
+ max: 12,
2409
+ disabled: V.value,
2410
+ onChange: $o
2411
+ }, null, 8, ["value", "disabled"])])) : f("", !0)])) : f("", !0),
2412
+ H.value.type === "date" ? (b(), p("label", fr, [s[115] ||= m("span", null, "日期格式", -1), g(w(D), {
2413
+ value: H.value.format,
2414
+ disabled: V.value,
2415
+ onChange: s[48] ||= (e) => Q({ format: e.target.value })
2416
+ }, null, 8, ["value", "disabled"])])) : f("", !0),
2417
+ H.value.type === "number" ? (b(), p(l, { key: 2 }, [m("label", pr, [s[116] ||= m("span", null, "数字格式", -1), g(w(D), {
2418
+ value: H.value.format,
2419
+ disabled: V.value,
2420
+ onChange: s[49] ||= (e) => Q({ format: e.target.value })
2421
+ }, null, 8, ["value", "disabled"])]), m("label", mr, [s[117] ||= m("span", null, "小数位", -1), g(w(Ut), {
2422
+ value: H.value.precision,
2423
+ min: 0,
2424
+ max: 6,
2425
+ disabled: V.value,
2426
+ onChange: s[50] ||= (e) => Q({ precision: typeof e == "number" ? e : void 0 })
2427
+ }, null, 8, ["value", "disabled"])])], 64)) : f("", !0),
2428
+ H.value.type === "checkbox" ? (b(), p(l, { key: 3 }, [m("label", hr, [s[118] ||= m("span", null, "勾选文本", -1), g(w(D), {
2429
+ value: H.value.checkedText,
2430
+ disabled: V.value,
2431
+ onChange: s[51] ||= (e) => Q({ checkedText: e.target.value })
2432
+ }, null, 8, ["value", "disabled"])]), m("label", gr, [s[119] ||= m("span", null, "未选文本", -1), g(w(D), {
2433
+ value: H.value.uncheckedText,
2434
+ disabled: V.value,
2435
+ onChange: s[52] ||= (e) => Q({ uncheckedText: e.target.value })
2436
+ }, null, 8, ["value", "disabled"])])], 64)) : f("", !0),
2437
+ m("div", _r, [
2438
+ m("label", vr, [s[120] ||= m("span", null, "必填", -1), g(w(Kt), {
2439
+ checked: H.value.required,
2440
+ disabled: V.value,
2441
+ onChange: s[53] ||= (e) => Q({ required: !!e })
2442
+ }, null, 8, ["checked", "disabled"])]),
2443
+ m("label", yr, [s[121] ||= m("span", null, "边框", -1), g(w(Kt), {
2444
+ checked: !!H.value.style?.border,
2445
+ disabled: V.value,
2446
+ onChange: s[54] ||= (e) => Yo({ border: !!e })
2447
+ }, null, 8, ["checked", "disabled"])]),
2448
+ m("label", br, [s[122] ||= m("span", null, "下划线", -1), g(w(Kt), {
2449
+ checked: !!H.value.style?.underline,
2450
+ disabled: V.value,
2451
+ onChange: s[55] ||= (e) => Yo({ underline: !!e })
2452
+ }, null, 8, ["checked", "disabled"])]),
2453
+ H.value.type === "number" ? (b(), p("label", xr, [s[123] ||= m("span", null, "千分位", -1), g(w(Kt), {
2454
+ checked: H.value.useGrouping !== !1,
2455
+ disabled: V.value,
2456
+ onChange: s[56] ||= (e) => Q({ useGrouping: !!e })
2457
+ }, null, 8, ["checked", "disabled"])])) : f("", !0)
2458
+ ]),
2459
+ m("label", Sr, [s[124] ||= m("span", null, "字体", -1), g(w(O), {
2460
+ value: Fa.value,
2461
+ options: ga.value,
2462
+ disabled: V.value,
2463
+ onChange: Xo
2464
+ }, null, 8, [
2465
+ "value",
2466
+ "options",
2467
+ "disabled"
2468
+ ])]),
2469
+ m("label", Cr, [s[125] ||= m("span", null, "字号", -1), g(w(Ut), {
2470
+ value: H.value.style?.fontSize,
2471
+ min: si,
2472
+ max: ci,
2473
+ disabled: V.value,
2474
+ onChange: Zo
2475
+ }, null, 8, ["value", "disabled"])]),
2476
+ m("label", wr, [s[126] ||= m("span", null, "颜色", -1), m("input", {
2477
+ type: "color",
2478
+ value: H.value.style?.color || "#1f2937",
2479
+ disabled: V.value,
2480
+ onInput: s[57] ||= (e) => Yo({ color: e.target.value })
2481
+ }, null, 40, Tr)]),
2482
+ m("label", Er, [s[127] ||= m("span", null, "占位颜色", -1), m("input", {
2483
+ type: "color",
2484
+ value: H.value.style?.placeholderColor || "#7a818b",
2485
+ disabled: V.value,
2486
+ onInput: s[58] ||= (e) => Yo({ placeholderColor: e.target.value })
2487
+ }, null, 40, Dr)]),
2488
+ m("label", Or, [s[128] ||= m("span", null, "线条颜色", -1), m("input", {
2489
+ type: "color",
2490
+ value: H.value.style?.lineColor || "#565b66",
2491
+ disabled: V.value,
2492
+ onInput: s[59] ||= (e) => Yo({ lineColor: e.target.value })
2493
+ }, null, 40, kr)]),
2494
+ m("label", Ar, [s[129] ||= m("span", null, "文字对齐", -1), g(w(O), {
2495
+ value: H.value.style?.textAlign || "left",
2496
+ options: w(va),
2497
+ disabled: V.value,
2498
+ onChange: Ko
2499
+ }, null, 8, [
2500
+ "value",
2501
+ "options",
2502
+ "disabled"
2503
+ ])]),
2504
+ H.value.type === "image" ? (b(), p(l, { key: 4 }, [m("label", jr, [s[130] ||= m("span", null, "边框样式", -1), g(w(O), {
2505
+ value: H.value.style?.borderStyle || "dashed",
2506
+ options: ba,
2507
+ disabled: V.value,
2508
+ onChange: qo
2509
+ }, null, 8, ["value", "disabled"])]), m("label", Mr, [s[131] ||= m("span", null, "图片适配", -1), g(w(O), {
2510
+ value: H.value.style?.objectFit || "contain",
2511
+ options: xa,
2512
+ disabled: V.value,
2513
+ onChange: Jo
2514
+ }, null, 8, ["value", "disabled"])])], 64)) : f("", !0)
2515
+ ], 64)) : (b(), d(w(Ht), {
2516
+ key: 0,
2517
+ description: "请选择模板变量",
2518
+ image: w(Ht).PRESENTED_IMAGE_SIMPLE
2519
+ }, null, 8, ["image"]))]))
2520
+ ])], 2)
2521
+ ], 2),
2522
+ (b(), d(Mt, { to: "body" }, [
2523
+ z.value ? (b(), d(vt, {
2524
+ key: 0,
2525
+ ref_key: "tableContextMenuElement",
2526
+ ref: qi,
2527
+ capabilities: z.value.capabilities,
2528
+ "active-alignment": z.value.activeAlignment,
2529
+ style: Nt({
2530
+ left: `${z.value.x}px`,
2531
+ top: `${z.value.y}px`
2532
+ }),
2533
+ onExecute: wc,
2534
+ onKeydown: Tc
2535
+ }, null, 8, [
2536
+ "capabilities",
2537
+ "active-alignment",
2538
+ "style"
2539
+ ])) : f("", !0),
2540
+ B.value ? (b(), p("div", {
2541
+ key: 1,
2542
+ ref_key: "imageContextMenuElement",
2543
+ ref: Ji,
2544
+ class: "gd-contract-template-designer__context-menu gd-contract-template-designer__image-context-menu",
2545
+ style: Nt({
2546
+ left: `${B.value.x}px`,
2547
+ top: `${B.value.y}px`
2548
+ }),
2549
+ role: "dialog",
2550
+ "aria-label": "图片尺寸",
2551
+ onKeydown: Dc
2552
+ }, [
2553
+ s[136] ||= m("div", { class: "gd-contract-template-designer__image-context-title" }, [m("strong", null, "图片尺寸"), m("span", null, "单位:px;留空可恢复自然尺寸")], -1),
2554
+ m("div", Nr, [m("label", null, [s[132] ||= m("span", null, "宽度", -1), g(w(Ut), {
2555
+ value: Yi.value,
2556
+ "onUpdate:value": s[60] ||= (e) => Yi.value = e,
2557
+ min: w(16),
2558
+ max: w(Me),
2559
+ disabled: V.value,
2560
+ placeholder: "自然",
2561
+ "aria-label": "图片宽度"
2562
+ }, null, 8, [
2563
+ "value",
2564
+ "min",
2565
+ "max",
2566
+ "disabled"
2567
+ ])]), m("label", null, [s[133] ||= m("span", null, "高度", -1), g(w(Ut), {
2568
+ value: Xi.value,
2569
+ "onUpdate:value": s[61] ||= (e) => Xi.value = e,
2570
+ min: w(16),
2571
+ max: w(Me),
2572
+ disabled: V.value,
2573
+ placeholder: "自然",
2574
+ "aria-label": "图片高度"
2575
+ }, null, 8, [
2576
+ "value",
2577
+ "min",
2578
+ "max",
2579
+ "disabled"
2580
+ ])])]),
2581
+ m("div", Pr, [g(w(E), {
2582
+ size: "small",
2583
+ onClick: gc
2584
+ }, {
2585
+ default: T(() => [...s[134] ||= [h("恢复自然尺寸", -1)]]),
1223
2586
  _: 1
1224
- }, 8, ["open"]), _(x(tt), {
1225
- open: L.value,
1226
- "onUpdate:open": s[24] ||= (e) => L.value = e,
1227
- trigger: "click",
1228
- placement: "bottom"
2587
+ }), g(w(E), {
2588
+ size: "small",
2589
+ type: "primary",
2590
+ onClick: hc
1229
2591
  }, {
1230
- content: S(() => [h("div", Pt, [s[74] ||= h("strong", null, "表格操作", -1), h("div", Ft, [
1231
- _(x(C), {
2592
+ default: T(() => [...s[135] ||= [h("应用", -1)]]),
2593
+ _: 1
2594
+ })])
2595
+ ], 36)) : f("", !0),
2596
+ R.value ? (b(), p("div", {
2597
+ key: 2,
2598
+ ref_key: "textContextMenuElement",
2599
+ ref: Wi,
2600
+ class: "gd-contract-template-designer__context-menu gd-contract-template-designer__text-context-menu",
2601
+ style: Nt({
2602
+ left: `${R.value.x}px`,
2603
+ top: `${R.value.y}px`
2604
+ }),
2605
+ role: "toolbar",
2606
+ "aria-label": "正文快捷操作",
2607
+ onKeydown: Ec
2608
+ }, [
2609
+ m("div", Fr, [
2610
+ g(w(k), { title: "撤销" }, {
2611
+ default: T(() => [g(w(E), {
1232
2612
  size: "small",
1233
- onClick: s[15] ||= (e) => $("add-table-row-before")
2613
+ class: "gd-contract-template-designer__text-menu-icon-button",
2614
+ disabled: !G.value.canUndo,
2615
+ "aria-label": "撤销",
2616
+ onClick: s[62] ||= (e) => J({ type: "undo" })
1234
2617
  }, {
1235
- default: S(() => [...s[65] ||= [g(" 上方插行 ", -1)]]),
2618
+ default: T(() => [g(w(Se), { "aria-hidden": "true" })]),
1236
2619
  _: 1
1237
- }),
1238
- _(x(C), {
2620
+ }, 8, ["disabled"])]),
2621
+ _: 1
2622
+ }),
2623
+ g(w(k), { title: "重做" }, {
2624
+ default: T(() => [g(w(E), {
1239
2625
  size: "small",
1240
- onClick: s[16] ||= (e) => $("add-table-row-after")
2626
+ class: "gd-contract-template-designer__text-menu-icon-button",
2627
+ disabled: !G.value.canRedo,
2628
+ "aria-label": "重做",
2629
+ onClick: s[63] ||= (e) => J({ type: "redo" })
1241
2630
  }, {
1242
- default: S(() => [...s[66] ||= [g(" 下方插行 ", -1)]]),
2631
+ default: T(() => [g(w(ge), { "aria-hidden": "true" })]),
1243
2632
  _: 1
1244
- }),
1245
- _(x(C), {
2633
+ }, 8, ["disabled"])]),
2634
+ _: 1
2635
+ }),
2636
+ s[137] ||= m("span", {
2637
+ class: "gd-contract-template-designer__text-menu-divider",
2638
+ "aria-hidden": "true"
2639
+ }, null, -1),
2640
+ R.value.hasSelection ? (b(), d(w(k), {
2641
+ key: 0,
2642
+ title: "复制"
2643
+ }, {
2644
+ default: T(() => [g(w(E), {
1246
2645
  size: "small",
1247
- onClick: s[17] ||= (e) => $("add-table-column-before")
2646
+ class: "gd-contract-template-designer__text-menu-icon-button",
2647
+ "aria-label": "复制",
2648
+ onClick: s[64] ||= (e) => $a("copy")
1248
2649
  }, {
1249
- default: S(() => [...s[67] ||= [g(" 左侧插列 ", -1)]]),
2650
+ default: T(() => [g(w(ee), { "aria-hidden": "true" })]),
1250
2651
  _: 1
1251
- }),
1252
- _(x(C), {
2652
+ })]),
2653
+ _: 1
2654
+ })) : f("", !0),
2655
+ R.value.hasSelection ? (b(), d(w(k), {
2656
+ key: 1,
2657
+ title: "剪切"
2658
+ }, {
2659
+ default: T(() => [g(w(E), {
1253
2660
  size: "small",
1254
- onClick: s[18] ||= (e) => $("add-table-column-after")
2661
+ class: "gd-contract-template-designer__text-menu-icon-button",
2662
+ "aria-label": "剪切",
2663
+ onClick: s[65] ||= (e) => $a("cut")
1255
2664
  }, {
1256
- default: S(() => [...s[68] ||= [g(" 右侧插列 ", -1)]]),
2665
+ default: T(() => [g(w(ye), { "aria-hidden": "true" })]),
1257
2666
  _: 1
1258
- }),
1259
- _(x(C), {
2667
+ })]),
2668
+ _: 1
2669
+ })) : f("", !0),
2670
+ g(w(k), { title: "粘贴" }, {
2671
+ default: T(() => [g(w(E), {
1260
2672
  size: "small",
1261
- onClick: s[19] ||= (e) => $("delete-table-row")
2673
+ class: "gd-contract-template-designer__text-menu-icon-button",
2674
+ "aria-label": "粘贴",
2675
+ onClick: s[66] ||= (e) => $a("paste")
1262
2676
  }, {
1263
- default: S(() => [...s[69] ||= [g(" 删除当前行 ", -1)]]),
2677
+ default: T(() => [g(w(ee), { "aria-hidden": "true" })]),
1264
2678
  _: 1
1265
- }),
1266
- _(x(C), {
2679
+ })]),
2680
+ _: 1
2681
+ })
2682
+ ]),
2683
+ R.value.hasSelection ? f("", !0) : (b(), p("div", Ir, [
2684
+ g(w(E), {
2685
+ size: "small",
2686
+ onClick: Ro
2687
+ }, {
2688
+ default: T(() => [g(w(me), { "aria-hidden": "true" }), s[138] ||= m("span", null, "图片", -1)]),
2689
+ _: 1
2690
+ }),
2691
+ g(w(E), {
2692
+ size: "small",
2693
+ onClick: s[67] ||= (e) => J({
2694
+ type: "insert-table",
2695
+ options: $i.value
2696
+ })
2697
+ }, {
2698
+ default: T(() => [g(w(be), { "aria-hidden": "true" }), s[139] ||= m("span", null, "表格", -1)]),
2699
+ _: 1
2700
+ }),
2701
+ g(w(E), {
2702
+ size: "small",
2703
+ onClick: s[68] ||= (e) => J({ type: "insert-horizontal-rule" })
2704
+ }, {
2705
+ default: T(() => [g(w(fe), { "aria-hidden": "true" }), s[140] ||= m("span", null, "分隔线", -1)]),
2706
+ _: 1
2707
+ }),
2708
+ g(w(E), {
2709
+ size: "small",
2710
+ disabled: Da.value,
2711
+ onClick: Ho
2712
+ }, {
2713
+ default: T(() => [g(w(oe), { "aria-hidden": "true" }), s[141] ||= m("span", null, "新页面", -1)]),
2714
+ _: 1
2715
+ }, 8, ["disabled"]),
2716
+ g(w(E), {
2717
+ size: "small",
2718
+ onClick: s[69] ||= (e) => J({ type: "select-all" })
2719
+ }, {
2720
+ default: T(() => [...s[142] ||= [m("span", null, "全选正文", -1)]]),
2721
+ _: 1
2722
+ })
2723
+ ])),
2724
+ m("div", Lr, [
2725
+ g(w(O), {
2726
+ class: "gd-contract-template-designer__context-menu-field gd-contract-template-designer__text-menu-font-size",
2727
+ value: Na.value,
2728
+ options: Ia.value,
2729
+ "show-search": "",
2730
+ "filter-option": !1,
2731
+ "search-value": Fi.value,
2732
+ onBlur: oc,
2733
+ onChange: tc,
2734
+ onDropdownVisibleChange: cc,
2735
+ onInputKeyDown: sc,
2736
+ onSearch: ac
2737
+ }, null, 8, [
2738
+ "value",
2739
+ "options",
2740
+ "search-value"
2741
+ ]),
2742
+ g(w(O), {
2743
+ class: "gd-contract-template-designer__context-menu-field gd-contract-template-designer__text-menu-alignment",
2744
+ value: G.value.textAlign,
2745
+ options: w(va),
2746
+ onChange: $s
2747
+ }, null, 8, ["value", "options"]),
2748
+ g(w(k), { title: "文字颜色" }, {
2749
+ default: T(() => [m("input", {
2750
+ class: "gd-contract-template-designer__context-menu-color",
2751
+ type: "color",
2752
+ "aria-label": "文字颜色",
2753
+ value: Pa.value,
2754
+ onInput: s[70] ||= (e) => ic(e.target.value)
2755
+ }, null, 40, Rr)]),
2756
+ _: 1
2757
+ })
2758
+ ]),
2759
+ m("div", {
2760
+ class: "gd-contract-template-designer__text-menu-control-group",
2761
+ role: "group",
2762
+ "aria-label": R.value.hasSelection ? "转换为正文控件" : "插入正文控件"
2763
+ }, [
2764
+ m("div", Br, [m("strong", null, C(R.value.hasSelection ? "转换为正文控件" : "插入正文控件"), 1), m("span", null, C(R.value.hasSelection ? "替换选中内容" : "在光标处插入"), 1)]),
2765
+ m("div", Vr, [(b(!0), p(l, null, S(Ta.value, (e) => (b(), d(w(k), {
2766
+ key: e.type,
2767
+ title: R.value.hasSelection ? `转换为${e.label}控件` : `插入${e.label}控件`
2768
+ }, {
2769
+ default: T(() => [m("button", {
2770
+ type: "button",
2771
+ class: "gd-contract-template-designer__text-menu-control-option",
2772
+ "aria-label": R.value.hasSelection ? `转换为${e.label}控件` : `插入${e.label}控件`,
2773
+ onClick: (t) => as(e.type)
2774
+ }, [(b(), d(It(e.icon), { "aria-hidden": "true" })), m("span", null, C(e.label), 1)], 8, Hr)]),
2775
+ _: 2
2776
+ }, 1032, ["title"]))), 128))]),
2777
+ Gi.value ? (b(), p(l, { key: 1 }, [g(w(D), {
2778
+ value: Ki.value,
2779
+ "onUpdate:value": s[71] ||= (e) => Ki.value = e,
2780
+ class: "gd-contract-template-designer__text-menu-bind-search",
2781
+ size: "small",
2782
+ "allow-clear": "",
2783
+ placeholder: "搜索已有控件",
2784
+ "aria-label": "搜索已有控件"
2785
+ }, null, 8, ["value"]), m("div", Wr, [(b(!0), p(l, null, S(Oa.value, (e) => (b(), p("button", {
2786
+ key: e.id,
2787
+ type: "button",
2788
+ class: "gd-contract-template-designer__text-menu-bind-item",
2789
+ role: "option",
2790
+ onClick: (t) => ss(e)
2791
+ }, [m("span", Kr, C(e.label), 1), m("span", qr, C(cs(e)) + " · " + C(e.key), 1)], 8, Gr))), 128)), Oa.value.length ? f("", !0) : (b(), p("p", Jr, " 暂无已有控件 "))])], 64)) : (b(), p("button", {
2792
+ key: 0,
2793
+ type: "button",
2794
+ class: "gd-contract-template-designer__text-menu-bind-toggle",
2795
+ disabled: !j.value.variables.length,
2796
+ "aria-expanded": !1,
2797
+ "aria-label": "绑定已有控件",
2798
+ onClick: ls
2799
+ }, [s[143] ||= m("span", null, "绑定已有", -1), g(w(re), { "aria-hidden": "true" })], 8, Ur))
2800
+ ], 8, zr),
2801
+ m("div", Yr, [
2802
+ g(w(k), { title: "加粗" }, {
2803
+ default: T(() => [g(w(E), {
1267
2804
  size: "small",
1268
- onClick: s[20] ||= (e) => $("delete-table-column")
2805
+ class: y(["gd-contract-template-designer__text-menu-icon-button", { "is-selected": G.value.isBold }]),
2806
+ "aria-pressed": G.value.isBold,
2807
+ "aria-label": "加粗",
2808
+ onClick: s[72] ||= (e) => J({ type: "toggle-bold" })
1269
2809
  }, {
1270
- default: S(() => [...s[70] ||= [g(" 删除当前列 ", -1)]]),
2810
+ default: T(() => [g(w(i), { "aria-hidden": "true" })]),
1271
2811
  _: 1
1272
- }),
1273
- _(x(C), {
2812
+ }, 8, ["class", "aria-pressed"])]),
2813
+ _: 1
2814
+ }),
2815
+ g(w(k), { title: "斜体" }, {
2816
+ default: T(() => [g(w(E), {
1274
2817
  size: "small",
1275
- onClick: s[21] ||= (e) => $("toggle-table-header-row")
2818
+ class: y(["gd-contract-template-designer__text-menu-icon-button", { "is-selected": G.value.isItalic }]),
2819
+ "aria-pressed": G.value.isItalic,
2820
+ "aria-label": "斜体",
2821
+ onClick: s[73] ||= (e) => J({ type: "toggle-italic" })
1276
2822
  }, {
1277
- default: S(() => [...s[71] ||= [g(" 切换表头行 ", -1)]]),
2823
+ default: T(() => [g(w(ue), { "aria-hidden": "true" })]),
1278
2824
  _: 1
1279
- }),
1280
- _(x(C), {
2825
+ }, 8, ["class", "aria-pressed"])]),
2826
+ _: 1
2827
+ }),
2828
+ g(w(k), { title: "下划线" }, {
2829
+ default: T(() => [g(w(E), {
1281
2830
  size: "small",
1282
- onClick: s[22] ||= (e) => $("toggle-table-header-column")
2831
+ class: y(["gd-contract-template-designer__text-menu-icon-button", { "is-selected": G.value.isUnderline }]),
2832
+ "aria-pressed": G.value.isUnderline,
2833
+ "aria-label": "下划线",
2834
+ onClick: s[74] ||= (e) => J({ type: "toggle-underline" })
1283
2835
  }, {
1284
- default: S(() => [...s[72] ||= [g(" 切换表头列 ", -1)]]),
2836
+ default: T(() => [g(w(xe), { "aria-hidden": "true" })]),
1285
2837
  _: 1
1286
- }),
1287
- _(x(C), {
1288
- danger: "",
2838
+ }, 8, ["class", "aria-pressed"])]),
2839
+ _: 1
2840
+ }),
2841
+ s[144] ||= m("span", {
2842
+ class: "gd-contract-template-designer__text-menu-divider",
2843
+ "aria-hidden": "true"
2844
+ }, null, -1),
2845
+ g(w(k), { title: "有序列表" }, {
2846
+ default: T(() => [g(w(E), {
1289
2847
  size: "small",
1290
- onClick: s[23] ||= (e) => $("delete-table")
2848
+ class: y(["gd-contract-template-designer__text-menu-icon-button", { "is-selected": G.value.isOrderedList }]),
2849
+ "aria-pressed": G.value.isOrderedList,
2850
+ "aria-label": "有序列表",
2851
+ onClick: s[75] ||= (e) => J({ type: "toggle-ordered-list" })
1291
2852
  }, {
1292
- default: S(() => [...s[73] ||= [g(" 删除表格 ", -1)]]),
2853
+ default: T(() => [g(w(pe), { "aria-hidden": "true" })]),
1293
2854
  _: 1
1294
- })
1295
- ])])]),
1296
- default: S(() => [_(x(D), { title: "表格操作" }, {
1297
- default: S(() => [_(x(C), {
2855
+ }, 8, ["class", "aria-pressed"])]),
2856
+ _: 1
2857
+ }),
2858
+ g(w(k), { title: "无序列表" }, {
2859
+ default: T(() => [g(w(E), {
1298
2860
  size: "small",
1299
- class: "gd-contract-template-designer__icon-button",
1300
- disabled: B.value || !W.value.isTableActive,
1301
- "aria-label": "表格操作"
2861
+ class: y(["gd-contract-template-designer__text-menu-icon-button", { "is-selected": G.value.isBulletList }]),
2862
+ "aria-pressed": G.value.isBulletList,
2863
+ "aria-label": "无序列表",
2864
+ onClick: s[76] ||= (e) => J({ type: "toggle-bullet-list" })
1302
2865
  }, {
1303
- default: S(() => [_(x(ce), { "aria-hidden": "true" })]),
2866
+ default: T(() => [g(w(Ce), { "aria-hidden": "true" })]),
1304
2867
  _: 1
1305
- }, 8, ["disabled"])]),
2868
+ }, 8, ["class", "aria-pressed"])]),
1306
2869
  _: 1
1307
- })]),
1308
- _: 1
1309
- }, 8, ["open"])])
1310
- ])]),
1311
- zn.value ? (v(), m("section", It, [_(x(Qe), {
1312
- type: Xn.value ? "success" : "error",
1313
- message: Zn.value,
1314
- "show-icon": ""
1315
- }, null, 8, ["type", "message"]), j.value.length ? (v(), m("div", Lt, [(v(!0), m(u, null, Xe(j.value, (e) => (v(), m("button", {
1316
- key: `${e.id}-${e.message}`,
1317
- type: "button",
1318
- class: "gd-contract-template-designer__validation-item",
1319
- onClick: (t) => Mi(e)
1320
- }, [h("span", null, b(e.message), 1), h("small", null, b(e.type === "variable" ? "变量" : "字段"), 1)], 8, Rt))), 128))])) : p("", !0)])) : p("", !0),
1321
- h("div", zt, [(v(!0), m(u, null, Xe(O.value.pages, (e, t) => (v(), f(Pe, {
1322
- key: e.id,
1323
- ref_for: !0,
1324
- ref: (t) => Ir(e.id, t),
1325
- page: e,
1326
- "page-index": t,
1327
- "page-size": zr(e),
1328
- variables: O.value.variables,
1329
- "selected-variable-key": k.value,
1330
- active: A.value === e.id,
1331
- readonly: c.readonly,
1332
- disabled: c.disabled,
1333
- zoom: N.value,
1334
- onPageUpdate: Rr,
1335
- onVariableDrop: Yr,
1336
- onVariableSelect: Xr,
1337
- onEditorFocus: s[25] ||= (e) => Di(e, !1),
1338
- onEditorStateChange: Qi,
1339
- onEditorContextMenu: Ji
1340
- }, null, 8, [
1341
- "page",
1342
- "page-index",
1343
- "page-size",
1344
- "variables",
1345
- "selected-variable-key",
1346
- "active",
1347
- "readonly",
1348
- "disabled",
1349
- "zoom"
1350
- ]))), 128))])
1351
- ]),
1352
- h("aside", Bt, [h("section", Vt, [s[76] ||= h("div", { class: "gd-contract-template-designer__panel-head" }, [h("strong", null, "控件"), h("span", null, "拖到正文")], -1), (v(!0), m(u, null, Xe(c.variableTypes, (e) => (v(), m("button", {
1353
- key: e.type,
1354
- type: "button",
1355
- draggable: "true",
1356
- class: "gd-contract-template-designer__tool-item",
1357
- disabled: B.value,
1358
- onDragstart: (t) => ui(t, e.type),
1359
- onClick: (t) => li(e.type)
1360
- }, [h("span", null, b(e.label), 1), s[75] ||= h("small", null, "模板变量", -1)], 40, Ht))), 128))]), h("section", Ut, [h("div", Wt, [s[77] ||= h("strong", null, "属性", -1), V.value ? (v(), m("div", Gt, [_(x(D), { title: "复制变量" }, {
1361
- default: S(() => [_(x(C), {
1362
- size: "small",
1363
- type: "primary",
1364
- class: "gd-contract-template-designer__icon-button",
1365
- disabled: B.value,
1366
- "aria-label": "复制变量",
1367
- onClick: s[26] ||= (e) => si(V.value)
1368
- }, {
1369
- default: S(() => [_(x(r), { "aria-hidden": "true" })]),
1370
- _: 1
1371
- }, 8, ["disabled"])]),
1372
- _: 1
1373
- }), _(x(D), { title: "删除变量" }, {
1374
- default: S(() => [_(x(C), {
1375
- danger: "",
1376
- type: "primary",
1377
- size: "small",
1378
- class: "gd-contract-template-designer__icon-button",
1379
- disabled: B.value,
1380
- "aria-label": "删除变量",
1381
- onClick: s[27] ||= (e) => ai(V.value)
1382
- }, {
1383
- default: S(() => [_(x(a), { "aria-hidden": "true" })]),
1384
- _: 1
1385
- }, 8, ["disabled"])]),
1386
- _: 1
1387
- })])) : p("", !0)]), V.value ? (v(), m(u, { key: 1 }, [
1388
- h("label", Kt, [s[78] ||= h("span", null, "名称", -1), _(x(w), {
1389
- value: V.value.label,
1390
- disabled: B.value,
1391
- onChange: s[28] ||= (e) => X({ label: e.target.value })
1392
- }, null, 8, ["value", "disabled"])]),
1393
- h("label", qt, [s[79] ||= h("span", null, "变量标识", -1), _(x(w), {
1394
- value: V.value.key,
1395
- disabled: ""
1396
- }, null, 8, ["value"])]),
1397
- h("label", Jt, [s[80] ||= h("span", null, "占位文案", -1), _(x(w), {
1398
- value: V.value.placeholder,
1399
- disabled: B.value,
1400
- onChange: s[29] ||= (e) => X({ placeholder: e.target.value })
1401
- }, null, 8, ["value", "disabled"])]),
1402
- h("label", Yt, [s[81] ||= h("span", null, "默认值", -1), _(x(w), {
1403
- value: V.value.defaultValue,
1404
- disabled: B.value,
1405
- onChange: s[30] ||= (e) => X({ defaultValue: e.target.value })
1406
- }, null, 8, ["value", "disabled"])]),
1407
- h("label", Xt, [s[82] ||= h("span", null, "宽度", -1), _(x(T), {
1408
- value: V.value.width,
1409
- min: Pn,
1410
- max: pr.value,
1411
- disabled: B.value,
1412
- onChange: s[31] ||= (e) => X({ width: Number(e || Pn) })
1413
- }, null, 8, [
1414
- "value",
1415
- "max",
1416
- "disabled"
1417
- ])]),
1418
- h("label", Zt, [s[83] ||= h("span", null, "高度", -1), _(x(T), {
1419
- value: V.value.height,
1420
- min: Fn,
1421
- max: mr.value,
1422
- disabled: B.value,
1423
- onChange: s[32] ||= (e) => X({ height: Number(e || Fn) })
1424
- }, null, 8, [
1425
- "value",
1426
- "max",
1427
- "disabled"
1428
- ])]),
1429
- V.value.type === "text" ? (v(), m("div", Qt, [h("label", $t, [s[84] ||= h("span", null, "多行", -1), _(x(nt), {
1430
- checked: !!V.value.multiline,
1431
- disabled: B.value,
1432
- onChange: s[33] ||= (e) => ri(!!e)
1433
- }, null, 8, ["checked", "disabled"])]), V.value.multiline ? (v(), m("label", en, [s[85] ||= h("span", null, "行数", -1), _(x(T), {
1434
- value: V.value.rows || x(3),
1435
- min: 2,
1436
- max: 12,
1437
- disabled: B.value,
1438
- onChange: ii
1439
- }, null, 8, ["value", "disabled"])])) : p("", !0)])) : p("", !0),
1440
- V.value.type === "date" ? (v(), m("label", tn, [s[86] ||= h("span", null, "日期格式", -1), _(x(w), {
1441
- value: V.value.format,
1442
- disabled: B.value,
1443
- onChange: s[34] ||= (e) => X({ format: e.target.value })
1444
- }, null, 8, ["value", "disabled"])])) : p("", !0),
1445
- V.value.type === "number" ? (v(), m(u, { key: 2 }, [h("label", nn, [s[87] ||= h("span", null, "数字格式", -1), _(x(w), {
1446
- value: V.value.format,
1447
- disabled: B.value,
1448
- onChange: s[35] ||= (e) => X({ format: e.target.value })
1449
- }, null, 8, ["value", "disabled"])]), h("label", rn, [s[88] ||= h("span", null, "小数位", -1), _(x(T), {
1450
- value: V.value.precision,
1451
- min: 0,
1452
- max: 6,
1453
- disabled: B.value,
1454
- onChange: s[36] ||= (e) => X({ precision: typeof e == "number" ? e : void 0 })
1455
- }, null, 8, ["value", "disabled"])])], 64)) : p("", !0),
1456
- V.value.type === "checkbox" ? (v(), m(u, { key: 3 }, [h("label", an, [s[89] ||= h("span", null, "勾选文本", -1), _(x(w), {
1457
- value: V.value.checkedText,
1458
- disabled: B.value,
1459
- onChange: s[37] ||= (e) => X({ checkedText: e.target.value })
1460
- }, null, 8, ["value", "disabled"])]), h("label", on, [s[90] ||= h("span", null, "未选文本", -1), _(x(w), {
1461
- value: V.value.uncheckedText,
1462
- disabled: B.value,
1463
- onChange: s[38] ||= (e) => X({ uncheckedText: e.target.value })
1464
- }, null, 8, ["value", "disabled"])])], 64)) : p("", !0),
1465
- h("div", sn, [
1466
- h("label", cn, [s[91] ||= h("span", null, "必填", -1), _(x(nt), {
1467
- checked: V.value.required,
1468
- disabled: B.value,
1469
- onChange: s[39] ||= (e) => X({ required: !!e })
1470
- }, null, 8, ["checked", "disabled"])]),
1471
- h("label", ln, [s[92] ||= h("span", null, "边框", -1), _(x(nt), {
1472
- checked: !!V.value.style?.border,
1473
- disabled: B.value,
1474
- onChange: s[40] ||= (e) => Z({ border: !!e })
1475
- }, null, 8, ["checked", "disabled"])]),
1476
- h("label", un, [s[93] ||= h("span", null, "下划线", -1), _(x(nt), {
1477
- checked: !!V.value.style?.underline,
1478
- disabled: B.value,
1479
- onChange: s[41] ||= (e) => Z({ underline: !!e })
1480
- }, null, 8, ["checked", "disabled"])]),
1481
- V.value.type === "number" ? (v(), m("label", dn, [s[94] ||= h("span", null, "千分位", -1), _(x(nt), {
1482
- checked: V.value.useGrouping !== !1,
1483
- disabled: B.value,
1484
- onChange: s[42] ||= (e) => X({ useGrouping: !!e })
1485
- }, null, 8, ["checked", "disabled"])])) : p("", !0)
1486
- ]),
1487
- h("label", fn, [s[95] ||= h("span", null, "字体", -1), _(x(E), {
1488
- value: yr.value,
1489
- options: rr.value,
1490
- disabled: B.value,
1491
- onChange: ti
1492
- }, null, 8, [
1493
- "value",
1494
- "options",
1495
- "disabled"
1496
- ])]),
1497
- h("label", pn, [s[96] ||= h("span", null, "字号", -1), _(x(T), {
1498
- value: V.value.style?.fontSize,
1499
- min: In,
1500
- max: Ln,
1501
- disabled: B.value,
1502
- onChange: ni
1503
- }, null, 8, ["value", "disabled"])]),
1504
- h("label", mn, [s[97] ||= h("span", null, "颜色", -1), h("input", {
1505
- type: "color",
1506
- value: V.value.style?.color || "#1f2937",
1507
- disabled: B.value,
1508
- onInput: s[43] ||= (e) => Z({ color: e.target.value })
1509
- }, null, 40, hn)]),
1510
- h("label", gn, [s[98] ||= h("span", null, "占位颜色", -1), h("input", {
1511
- type: "color",
1512
- value: V.value.style?.placeholderColor || "#7a818b",
1513
- disabled: B.value,
1514
- onInput: s[44] ||= (e) => Z({ placeholderColor: e.target.value })
1515
- }, null, 40, _n)]),
1516
- h("label", vn, [s[99] ||= h("span", null, "线条颜色", -1), h("input", {
1517
- type: "color",
1518
- value: V.value.style?.lineColor || "#565b66",
1519
- disabled: B.value,
1520
- onInput: s[45] ||= (e) => Z({ lineColor: e.target.value })
1521
- }, null, 40, yn)]),
1522
- h("label", bn, [s[100] ||= h("span", null, "文字对齐", -1), _(x(E), {
1523
- value: V.value.style?.textAlign || "left",
1524
- options: x(ar),
1525
- disabled: B.value,
1526
- onChange: Qr
1527
- }, null, 8, [
1528
- "value",
1529
- "options",
1530
- "disabled"
1531
- ])]),
1532
- V.value.type === "image" ? (v(), m(u, { key: 4 }, [h("label", xn, [s[101] ||= h("span", null, "边框样式", -1), _(x(E), {
1533
- value: V.value.style?.borderStyle || "dashed",
1534
- options: sr,
1535
- disabled: B.value,
1536
- onChange: $r
1537
- }, null, 8, ["value", "disabled"])]), h("label", Sn, [s[102] ||= h("span", null, "图片适配", -1), _(x(E), {
1538
- value: V.value.style?.objectFit || "contain",
1539
- options: cr,
1540
- disabled: B.value,
1541
- onChange: ei
1542
- }, null, 8, ["value", "disabled"])])], 64)) : p("", !0)
1543
- ], 64)) : (v(), f(x($e), {
1544
- key: 0,
1545
- description: "请选择模板变量",
1546
- image: x($e).PRESENTED_IMAGE_SIMPLE
1547
- }, null, 8, ["image"]))])]),
1548
- Jn.value ? (v(), m("div", {
1549
- key: 0,
1550
- class: "gd-contract-template-designer__context-menu",
1551
- style: qe({
1552
- left: `${Jn.value.x}px`,
1553
- top: `${Jn.value.y}px`
1554
- })
1555
- }, [
1556
- h("div", Cn, [
1557
- _(x(E), {
1558
- class: "gd-contract-template-designer__context-menu-field",
1559
- value: _r.value,
1560
- options: br.value,
1561
- "show-search": "",
1562
- "filter-option": !1,
1563
- "search-value": F.value,
1564
- onBlur: Wi,
1565
- onChange: zi,
1566
- onDropdownVisibleChange: Ki,
1567
- onInputKeyDown: Gi,
1568
- onSearch: Ui
1569
- }, null, 8, [
1570
- "value",
1571
- "options",
1572
- "search-value"
2870
+ })
1573
2871
  ]),
1574
- _(x(E), {
1575
- class: "gd-contract-template-designer__context-menu-field",
1576
- value: W.value.textAlign,
1577
- options: x(ar),
1578
- onChange: Li
1579
- }, null, 8, ["value", "options"]),
1580
- h("input", {
1581
- class: "gd-contract-template-designer__context-menu-color",
1582
- type: "color",
1583
- value: vr.value,
1584
- onInput: s[46] ||= (e) => Hi(e.target.value)
1585
- }, null, 40, wn)
1586
- ]),
1587
- h("div", Tn, [
1588
- _(x(C), {
1589
- size: "small",
1590
- type: W.value.isBold ? "primary" : "default",
1591
- onClick: s[47] ||= (e) => J({ type: "toggle-bold" })
1592
- }, {
1593
- default: S(() => [...s[103] ||= [g(" 加粗 ", -1)]]),
1594
- _: 1
1595
- }, 8, ["type"]),
1596
- _(x(C), {
1597
- size: "small",
1598
- type: W.value.isItalic ? "primary" : "default",
1599
- onClick: s[48] ||= (e) => J({ type: "toggle-italic" })
1600
- }, {
1601
- default: S(() => [...s[104] ||= [g(" 斜体 ", -1)]]),
1602
- _: 1
1603
- }, 8, ["type"]),
1604
- _(x(C), {
1605
- size: "small",
1606
- type: W.value.isUnderline ? "primary" : "default",
1607
- onClick: s[49] ||= (e) => J({ type: "toggle-underline" })
1608
- }, {
1609
- default: S(() => [...s[105] ||= [g(" 下划线 ", -1)]]),
1610
- _: 1
1611
- }, 8, ["type"])
1612
- ]),
1613
- h("div", En, [
1614
- _(x(C), {
1615
- size: "small",
1616
- type: W.value.isOrderedList ? "primary" : "default",
1617
- onClick: s[50] ||= (e) => J({ type: "toggle-ordered-list" })
1618
- }, {
1619
- default: S(() => [...s[106] ||= [g(" 有序列表 ", -1)]]),
1620
- _: 1
1621
- }, 8, ["type"]),
1622
- _(x(C), {
1623
- size: "small",
1624
- type: W.value.isBulletList ? "primary" : "default",
1625
- onClick: s[51] ||= (e) => J({ type: "toggle-bullet-list" })
1626
- }, {
1627
- default: S(() => [...s[107] ||= [g(" 无序列表 ", -1)]]),
1628
- _: 1
1629
- }, 8, ["type"]),
1630
- _(x(C), {
1631
- size: "small",
1632
- onClick: s[52] ||= (e) => J({ type: "clear-text-format" })
1633
- }, {
1634
- default: S(() => [...s[108] ||= [g(" 清除文字格式 ", -1)]]),
2872
+ m("div", Xr, [g(w(k), { title: "清除文字格式" }, {
2873
+ default: T(() => [g(w(E), {
2874
+ size: "small",
2875
+ class: "gd-contract-template-designer__text-menu-clear-action",
2876
+ "aria-label": "清除文字格式",
2877
+ onClick: s[77] ||= (e) => J({ type: "clear-text-format" })
2878
+ }, {
2879
+ default: T(() => [g(w(a), { "aria-hidden": "true" }), s[145] ||= m("span", null, "清文字", -1)]),
2880
+ _: 1
2881
+ })]),
1635
2882
  _: 1
1636
- }),
1637
- _(x(C), {
1638
- size: "small",
1639
- onClick: s[53] ||= (e) => J({ type: "clear-block-format" })
1640
- }, {
1641
- default: S(() => [...s[109] ||= [g(" 清除块级格式 ", -1)]]),
2883
+ }), g(w(k), { title: "清除段落格式" }, {
2884
+ default: T(() => [g(w(E), {
2885
+ size: "small",
2886
+ class: "gd-contract-template-designer__text-menu-clear-action",
2887
+ "aria-label": "清除段落格式",
2888
+ onClick: s[78] ||= (e) => J({ type: "clear-block-format" })
2889
+ }, {
2890
+ default: T(() => [g(w(se), { "aria-hidden": "true" }), s[146] ||= m("span", null, "清段落", -1)]),
2891
+ _: 1
2892
+ })]),
1642
2893
  _: 1
1643
- })
1644
- ])
1645
- ], 4)) : p("", !0),
1646
- _(x(et), {
1647
- open: Hn.value,
1648
- "onUpdate:open": s[54] ||= (e) => Hn.value = e,
2894
+ })])
2895
+ ], 36)) : f("", !0)
2896
+ ])),
2897
+ m("input", {
2898
+ ref_key: "imageFileInputElement",
2899
+ ref: vi,
2900
+ class: "gd-contract-template-designer__hidden-file-input",
2901
+ type: "file",
2902
+ accept: "image/png,image/jpeg,image/webp,image/gif,image/bmp",
2903
+ tabindex: "-1",
2904
+ "aria-hidden": "true",
2905
+ onChange: zo
2906
+ }, null, 544),
2907
+ m("span", Zr, C(Zi.value), 1),
2908
+ g(w(Wt), {
2909
+ open: Ti.value,
2910
+ "onUpdate:open": s[79] ||= (e) => Ti.value = e,
1649
2911
  title: "模板预览",
1650
2912
  width: "min(1440px, calc(100vw - 32px))",
1651
2913
  centered: "",
1652
2914
  footer: null,
1653
2915
  "wrap-class-name": "gd-contract-template-designer__preview-modal",
1654
- onCancel: vi
2916
+ onCancel: ks
1655
2917
  }, {
1656
- default: S(() => [h("div", {
1657
- class: "gd-contract-template-designer__preview",
1658
- innerHTML: Un.value
1659
- }, null, 8, Dn)]),
2918
+ default: T(() => [m("div", Qr, [(b(!0), p(l, null, S(ia.value, (e) => (b(), d(_t, {
2919
+ key: e.page.id,
2920
+ page: e.page,
2921
+ "fallback-page-size": Ei.value?.pageSize ?? w($e),
2922
+ "content-html": e.contentHtml,
2923
+ "signing-placements": e.signingPlacements
2924
+ }, null, 8, [
2925
+ "page",
2926
+ "fallback-page-size",
2927
+ "content-html",
2928
+ "signing-placements"
2929
+ ]))), 128))])]),
1660
2930
  _: 1
1661
2931
  }, 8, ["open"]),
1662
- _(x(et), {
1663
- open: Wn.value,
1664
- "onUpdate:open": s[55] ||= (e) => Wn.value = e,
2932
+ g(w(Wt), {
2933
+ open: Di.value,
2934
+ "onUpdate:open": s[80] ||= (e) => Di.value = e,
1665
2935
  title: "提交数据查看",
1666
2936
  width: "min(960px, calc(100vw - 48px))",
1667
2937
  centered: "",
1668
2938
  footer: null,
1669
2939
  "wrap-class-name": "gd-contract-template-designer__submit-data-modal",
1670
- onCancel: xi
2940
+ onCancel: Ms
1671
2941
  }, {
1672
- default: S(() => [h("pre", On, b(Gn.value), 1)]),
2942
+ default: T(() => [m("pre", $r, C(Oi.value), 1)]),
1673
2943
  _: 1
1674
2944
  }, 8, ["open"])
1675
2945
  ], 2));
1676
2946
  }
1677
2947
  });
1678
2948
  //#endregion
1679
- export { Rn as default };
2949
+ export { pi as default };