@guodun/antdv 1.5.2 → 1.6.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.
- package/dist/es/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.mjs +1 -1
- package/dist/es/components/contract-signing-location/src/template-source.mjs +16 -16
- package/dist/es/components/contract-signing-location/style/index.css +1 -1
- package/dist/es/components/dept-selector/index.mjs +1 -1
- package/dist/es/components/dept-selector/src/DeptSelector.mjs +5 -0
- package/dist/es/components/dept-selector/src/DeptSelector.vue.mjs +90 -0
- package/dist/es/components/dept-selector/src/style/index.mjs +1 -0
- package/dist/es/components/dept-selector/src/types.mjs +4 -0
- package/dist/es/components/index.mjs +5 -3
- package/dist/es/components/plus-upload/apis/plus-upload.api.mjs +19 -9
- package/dist/es/components/plus-upload/hook/usePlusUpload.mjs +9 -9
- package/dist/es/components/plus-upload/src/plus-upload.vue.mjs +1 -1
- package/dist/es/components/plus-upload/src/types.mjs +4 -0
- package/dist/es/components/pro-contract-template-designer/index.mjs +2 -2
- package/dist/es/components/pro-contract-template-designer/src/{ContractTemplatePreviewSigningLayer.mjs → ContractTemplateAuthoringBar.mjs} +2 -2
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateAuthoringBar.vue.mjs +168 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateControlLibrary.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateControlLibrary.vue.mjs +120 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerInspector.vue.mjs +382 -459
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerSidebar.vue.mjs +278 -122
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerToolbar.vue.mjs +463 -315
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.vue.mjs +76 -75
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateFindReplace.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateFindReplace.vue.mjs +164 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsInspector.vue.mjs +380 -393
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsPageMap.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsPageMap.vue.mjs +108 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsPresetPicker.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsPresetPicker.vue.mjs +73 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsStudio.vue.mjs +109 -53
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePanelTabs.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePanelTabs.vue.mjs +52 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePreviewModal.vue.mjs +10 -14
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue.mjs +49 -58
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateTextContextMenu.vue.mjs +119 -196
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateVariableAdvanced.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateVariableAdvanced.vue.mjs +115 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateVariableDataModal.vue.mjs +43 -43
- package/dist/es/components/pro-contract-template-designer/src/DesignerPage.vue.mjs +224 -257
- package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.mjs +1169 -1324
- package/dist/es/components/pro-contract-template-designer/src/{SigningPlacementInspector.mjs → SigningLayoutCustomModal.mjs} +2 -2
- package/dist/es/components/pro-contract-template-designer/src/SigningLayoutCustomModal.vue.mjs +110 -0
- package/dist/es/components/pro-contract-template-designer/src/SigningLayoutPresetPicker.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/SigningLayoutPresetPicker.vue.mjs +98 -0
- package/dist/es/components/pro-contract-template-designer/src/{SigningPlacementLayer.mjs → SigningLayoutPreview.mjs} +2 -2
- package/dist/es/components/pro-contract-template-designer/src/SigningLayoutPreview.vue.mjs +51 -0
- package/dist/es/components/pro-contract-template-designer/src/composables/use-designer-files.mjs +1 -2
- package/dist/es/components/pro-contract-template-designer/src/composables/use-draft-cache-session.mjs +2 -3
- package/dist/es/components/pro-contract-template-designer/src/composables/use-page-authoring.mjs +43 -0
- package/dist/es/components/pro-contract-template-designer/src/composables/use-template-authoring.mjs +99 -0
- package/dist/es/components/pro-contract-template-designer/src/composables/use-template-designer.mjs +128 -168
- package/dist/es/components/pro-contract-template-designer/src/composables/use-template-draft-cache.mjs +1 -1
- package/dist/es/components/pro-contract-template-designer/src/composables/use-template-files.mjs +7 -11
- package/dist/es/components/pro-contract-template-designer/src/composables/use-toolbar-overflow.mjs +30 -19
- package/dist/es/components/pro-contract-template-designer/src/constants.mjs +36 -25
- package/dist/es/components/pro-contract-template-designer/src/extensions/SigningMarkNodeView.mjs +7 -0
- package/dist/es/components/pro-contract-template-designer/src/extensions/SigningMarkNodeView.vue.mjs +192 -0
- package/dist/es/components/pro-contract-template-designer/src/extensions/SigningMarkNodeView.vue_vue_type_style_index_0_scoped_a2a8e01a_lang.css +1 -0
- package/dist/es/components/pro-contract-template-designer/src/extensions/authoring-search.mjs +43 -0
- package/dist/es/components/pro-contract-template-designer/src/extensions/editor-extensions.mjs +138 -91
- package/dist/es/components/pro-contract-template-designer/src/extensions/signing-mark.mjs +92 -0
- package/dist/es/components/pro-contract-template-designer/src/extensions/word-paste.mjs +62 -34
- package/dist/es/components/pro-contract-template-designer/src/utils/authoring-search.mjs +59 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/authoring-shortcuts.mjs +14 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/clause-snippets.mjs +56 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/clipboard.mjs +24 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/document-outline.mjs +45 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/panel-search.mjs +7 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/signing-layout-presets.mjs +235 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/signing-mark.mjs +152 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/template-tool-icons.mjs +22 -20
- package/dist/es/components/pro-contract-template-designer/src/utils/toolbar-overflow.mjs +5 -1
- package/dist/es/components/pro-contract-template-designer/style/index.css +1 -1
- package/dist/es/components/pro-dynamic-tags/src/index.vue.mjs +74 -48
- package/dist/es/components/pro-selector/index.mjs +6 -5
- package/dist/es/components/pro-selector/src/ProUserSelector.mjs +5 -0
- package/dist/es/components/pro-selector/src/ProUserSelector.vue.mjs +95 -0
- package/dist/es/components/pro-selector/src/ProUserSelectorDrilldown.mjs +5 -0
- package/dist/es/components/pro-selector/src/ProUserSelectorDrilldown.vue.mjs +20 -0
- package/dist/es/components/pro-selector/src/components/user.mjs +38 -52
- package/dist/es/components/pro-selector/src/types.mjs +9 -0
- package/dist/es/components/pro-selector/style/index.mjs +1 -0
- package/dist/es/components/pro-selector-group/index.mjs +1 -1
- package/dist/es/components/pro-selector-group/src/index.vue.mjs +71 -142
- package/dist/es/components/pro-selector-group/src/style/index.mjs +1 -0
- package/dist/es/components/pro-selector-group/src/utils/index.mjs +16 -28
- package/dist/es/components/role-selector/index.mjs +2 -2
- package/dist/es/components/role-selector/src/RoleSelector.mjs +5 -0
- package/dist/es/components/role-selector/src/RoleSelector.vue.mjs +90 -0
- package/dist/es/components/role-selector/src/style/index.mjs +1 -0
- package/dist/es/components/role-selector/src/types.mjs +4 -0
- package/dist/es/components/selector-core/components/DepartmentTree.mjs +5 -0
- package/dist/es/components/selector-core/components/DepartmentTree.vue.mjs +141 -0
- package/dist/es/components/selector-core/components/EntityRow.mjs +5 -0
- package/dist/es/components/selector-core/components/EntityRow.vue.mjs +84 -0
- package/dist/es/components/selector-core/components/HighlightText.mjs +5 -0
- package/dist/es/components/selector-core/components/HighlightText.vue.mjs +19 -0
- package/dist/es/components/selector-core/components/PanelFeedback.mjs +5 -0
- package/dist/es/components/selector-core/components/PanelFeedback.vue.mjs +61 -0
- package/dist/es/components/selector-core/components/PeoplePane.mjs +5 -0
- package/dist/es/components/selector-core/components/PeoplePane.vue.mjs +237 -0
- package/dist/es/components/selector-core/components/RolePane.mjs +5 -0
- package/dist/es/components/selector-core/components/RolePane.vue.mjs +87 -0
- package/dist/es/components/selector-core/components/SelectionSummary.mjs +5 -0
- package/dist/es/components/selector-core/components/SelectionSummary.vue.mjs +73 -0
- package/dist/es/components/selector-core/components/SelectorDialog.mjs +5 -0
- package/dist/es/components/selector-core/components/SelectorDialog.vue.mjs +351 -0
- package/dist/es/components/selector-core/model.mjs +114 -0
- package/dist/es/components/selector-core/useSelectorData.mjs +87 -0
- package/dist/es/index.mjs +82 -80
- package/dist/es/node_modules/@tiptap/pm/dist/history/index.mjs +1 -0
- package/dist/es/node_modules/orderedmap/dist/index.mjs +67 -0
- package/dist/es/node_modules/prosemirror-history/dist/index.mjs +226 -0
- package/dist/es/node_modules/prosemirror-model/dist/index.mjs +1128 -0
- package/dist/es/node_modules/prosemirror-state/dist/index.mjs +325 -0
- package/dist/es/node_modules/prosemirror-transform/dist/index.mjs +1055 -0
- package/dist/es/node_modules/rope-sequence/dist/index.mjs +83 -0
- package/dist/lib/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.cjs +1 -1
- package/dist/lib/components/contract-signing-location/src/template-source.cjs +1 -1
- package/dist/lib/components/contract-signing-location/style/index.css +1 -1
- package/dist/lib/components/dept-selector/index.cjs +1 -1
- package/dist/lib/components/dept-selector/src/DeptSelector.cjs +1 -0
- package/dist/lib/components/dept-selector/src/DeptSelector.vue.cjs +1 -0
- package/dist/lib/components/dept-selector/src/style/index.cjs +1 -1
- package/dist/lib/components/dept-selector/src/types.cjs +1 -1
- package/dist/lib/components/index.cjs +1 -1
- package/dist/lib/components/plus-upload/apis/plus-upload.api.cjs +1 -1
- package/dist/lib/components/plus-upload/hook/usePlusUpload.cjs +1 -1
- package/dist/lib/components/plus-upload/src/plus-upload.vue.cjs +1 -1
- package/dist/lib/components/plus-upload/src/types.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/index.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateAuthoringBar.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateAuthoringBar.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateControlLibrary.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateControlLibrary.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerInspector.vue.cjs +2 -2
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerSidebar.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerToolbar.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateFindReplace.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateFindReplace.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsInspector.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsPageMap.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsPageMap.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsPresetPicker.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsPresetPicker.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsStudio.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePanelTabs.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePanelTabs.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePreviewModal.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateTextContextMenu.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateVariableAdvanced.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateVariableAdvanced.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateVariableDataModal.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/DesignerPage.vue.cjs +2 -2
- package/dist/lib/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/SigningLayoutCustomModal.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/SigningLayoutCustomModal.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/SigningLayoutPresetPicker.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/SigningLayoutPresetPicker.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/SigningLayoutPreview.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/SigningLayoutPreview.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/composables/use-designer-files.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/composables/use-draft-cache-session.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/composables/use-page-authoring.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/composables/use-template-authoring.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/composables/use-template-designer.cjs +4 -4
- package/dist/lib/components/pro-contract-template-designer/src/composables/use-template-draft-cache.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/composables/use-template-files.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/composables/use-toolbar-overflow.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/constants.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/extensions/SigningMarkNodeView.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/extensions/SigningMarkNodeView.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/extensions/SigningMarkNodeView.vue_vue_type_style_index_0_scoped_a2a8e01a_lang.css +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/extensions/authoring-search.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/extensions/editor-extensions.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/extensions/signing-mark.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/extensions/word-paste.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/utils/authoring-search.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/authoring-shortcuts.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/clause-snippets.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/clipboard.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/document-outline.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/panel-search.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/signing-layout-presets.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/signing-mark.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/template-tool-icons.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/utils/toolbar-overflow.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/style/index.css +1 -1
- package/dist/lib/components/pro-dynamic-tags/src/index.vue.cjs +1 -1
- package/dist/lib/components/pro-selector/index.cjs +1 -1
- package/dist/lib/components/pro-selector/src/ProUserSelector.cjs +1 -0
- package/dist/lib/components/pro-selector/src/ProUserSelector.vue.cjs +1 -0
- package/dist/lib/components/pro-selector/src/ProUserSelectorDrilldown.cjs +1 -0
- package/dist/lib/components/pro-selector/src/ProUserSelectorDrilldown.vue.cjs +1 -0
- package/dist/lib/components/pro-selector/src/components/user.cjs +1 -1
- package/dist/lib/components/pro-selector/src/types.cjs +1 -1
- package/dist/lib/components/pro-selector/style/index.cjs +1 -1
- package/dist/lib/components/pro-selector-group/index.cjs +1 -1
- package/dist/lib/components/pro-selector-group/src/index.vue.cjs +1 -1
- package/dist/lib/components/pro-selector-group/src/style/index.cjs +1 -1
- package/dist/lib/components/pro-selector-group/src/utils/index.cjs +1 -1
- package/dist/lib/components/role-selector/index.cjs +1 -1
- package/dist/lib/components/role-selector/src/RoleSelector.cjs +1 -0
- package/dist/lib/components/role-selector/src/RoleSelector.vue.cjs +1 -0
- package/dist/lib/components/role-selector/src/style/index.cjs +1 -1
- package/dist/lib/components/role-selector/src/types.cjs +1 -1
- package/dist/lib/components/selector-core/components/DepartmentTree.cjs +1 -0
- package/dist/lib/components/selector-core/components/DepartmentTree.vue.cjs +1 -0
- package/dist/lib/components/selector-core/components/EntityRow.cjs +1 -0
- package/dist/lib/components/selector-core/components/EntityRow.vue.cjs +1 -0
- package/dist/lib/components/selector-core/components/HighlightText.cjs +1 -0
- package/dist/lib/components/selector-core/components/HighlightText.vue.cjs +1 -0
- package/dist/lib/components/selector-core/components/PanelFeedback.cjs +1 -0
- package/dist/lib/components/selector-core/components/PanelFeedback.vue.cjs +1 -0
- package/dist/lib/components/selector-core/components/PeoplePane.cjs +1 -0
- package/dist/lib/components/selector-core/components/PeoplePane.vue.cjs +1 -0
- package/dist/lib/components/selector-core/components/RolePane.cjs +1 -0
- package/dist/lib/components/selector-core/components/RolePane.vue.cjs +1 -0
- package/dist/lib/components/selector-core/components/SelectionSummary.cjs +1 -0
- package/dist/lib/components/selector-core/components/SelectionSummary.vue.cjs +1 -0
- package/dist/lib/components/selector-core/components/SelectorDialog.cjs +1 -0
- package/dist/lib/components/selector-core/components/SelectorDialog.vue.cjs +1 -0
- package/dist/lib/components/selector-core/model.cjs +1 -0
- package/dist/lib/components/selector-core/useSelectorData.cjs +1 -0
- package/dist/lib/index.cjs +1 -1
- package/dist/lib/node_modules/@tiptap/pm/dist/history/index.cjs +1 -0
- package/dist/lib/node_modules/orderedmap/dist/index.cjs +1 -0
- package/dist/lib/node_modules/prosemirror-history/dist/index.cjs +1 -0
- package/dist/lib/node_modules/prosemirror-model/dist/index.cjs +2 -0
- package/dist/lib/node_modules/prosemirror-state/dist/index.cjs +1 -0
- package/dist/lib/node_modules/prosemirror-transform/dist/index.cjs +2 -0
- package/dist/lib/node_modules/rope-sequence/dist/index.cjs +1 -0
- package/dist/theme/contract-signing-location.css +1 -1
- package/dist/theme/dept-selector.css +1 -1
- package/dist/theme/icon.css +1 -1
- package/dist/theme/index.css +1 -1
- package/dist/theme/pro-dynamic-tags.css +1 -1
- package/dist/theme/pro-modal.css +1 -1
- package/dist/theme/pro-selector-group.css +1 -1
- package/dist/theme/pro-selector.css +1 -1
- package/dist/theme/role-selector.css +1 -1
- package/dist/theme/selector-core.css +1 -0
- package/dist/types/components/contract-signing-location/src/ContractSigningLocation.vue.d.ts +3 -3
- package/dist/types/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.d.ts +2 -2
- package/dist/types/components/dept-selector/index.d.ts +156 -45
- package/dist/types/components/dept-selector/src/{dept.d.ts → DeptSelector.vue.d.ts} +38 -15
- package/dist/types/components/dept-selector/src/types.d.ts +10 -2
- package/dist/types/components/plus-upload/apis/plus-upload.api.d.ts +15 -0
- package/dist/types/components/plus-upload/hook/usePlusUpload.d.ts +1 -1
- package/dist/types/components/plus-upload/index.d.ts +21 -3
- package/dist/types/components/plus-upload/src/plus-upload.vue.d.ts +11 -1
- package/dist/types/components/plus-upload/src/types.d.ts +4 -0
- package/dist/types/components/pro-contract-template-designer/index.d.ts +2 -1
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateAuthoringBar.vue.d.ts +106 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateControlLibrary.vue.d.ts +18 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateDesignerInspector.vue.d.ts +5 -42
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateDesignerSidebar.vue.d.ts +9 -11
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateDesignerToolbar.vue.d.ts +44 -5
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.vue.d.ts +18 -1
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateFindReplace.vue.d.ts +37 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsPageMap.vue.d.ts +29 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplatePageDecorationsPresetPicker.vue.d.ts +16 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplatePanelTabs.vue.d.ts +15 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplatePreviewModal.vue.d.ts +1 -4
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue.d.ts +1 -2
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateTextContextMenu.vue.d.ts +1 -29
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateVariableAdvanced.vue.d.ts +14 -0
- package/dist/types/components/pro-contract-template-designer/src/DesignerPage.vue.d.ts +13 -29
- package/dist/types/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.d.ts +260 -121
- package/dist/types/components/pro-contract-template-designer/src/SigningLayoutCustomModal.vue.d.ts +15 -0
- package/dist/types/components/pro-contract-template-designer/src/SigningLayoutPresetPicker.vue.d.ts +19 -0
- package/dist/types/components/pro-contract-template-designer/src/{ContractTemplatePreviewSigningLayer.vue.d.ts → SigningLayoutPreview.vue.d.ts} +2 -3
- package/dist/types/components/pro-contract-template-designer/src/composables/use-designer-files.d.ts +1 -4
- package/dist/types/components/pro-contract-template-designer/src/composables/use-draft-cache-session.d.ts +1 -5
- package/dist/types/components/pro-contract-template-designer/src/composables/use-page-authoring.d.ts +13 -0
- package/dist/types/components/pro-contract-template-designer/src/composables/use-template-authoring.d.ts +44 -0
- package/dist/types/components/pro-contract-template-designer/src/composables/use-template-designer.d.ts +4 -20
- package/dist/types/components/pro-contract-template-designer/src/composables/use-template-draft-cache.d.ts +1 -1
- package/dist/types/components/pro-contract-template-designer/src/composables/use-template-files.d.ts +1 -2
- package/dist/types/components/pro-contract-template-designer/src/composables/use-toolbar-overflow.d.ts +1 -1
- package/dist/types/components/pro-contract-template-designer/src/constants.d.ts +20 -1
- package/dist/types/components/pro-contract-template-designer/src/extensions/SigningMarkNodeView.vue.d.ts +5 -0
- package/dist/types/components/pro-contract-template-designer/src/extensions/authoring-search.d.ts +12 -0
- package/dist/types/components/pro-contract-template-designer/src/extensions/editor-extensions.d.ts +2 -0
- package/dist/types/components/pro-contract-template-designer/src/extensions/signing-mark.d.ts +16 -0
- package/dist/types/components/pro-contract-template-designer/src/extensions/word-paste.d.ts +2 -0
- package/dist/types/components/pro-contract-template-designer/src/types.d.ts +64 -77
- package/dist/types/components/pro-contract-template-designer/src/utils/authoring-search.d.ts +23 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/authoring-shortcuts.d.ts +3 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/clause-snippets.d.ts +10 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/clipboard.d.ts +7 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/document-outline.d.ts +20 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/panel-search.d.ts +2 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/signing-layout-presets.d.ts +49 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/signing-mark.d.ts +57 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/template-tool-icons.d.ts +4 -4
- package/dist/types/components/pro-contract-template-designer/src/utils/toolbar-overflow.d.ts +2 -2
- package/dist/types/components/pro-dynamic-tags/src/index.vue.d.ts +1 -0
- package/dist/types/components/pro-dynamic-tags/src/types.d.ts +9 -0
- package/dist/types/components/pro-menu-tree/index.d.ts +2 -2
- package/dist/types/components/pro-menu-tree/src/pro-menu-tree.d.ts +2 -2
- package/dist/types/components/pro-selector/index.d.ts +851 -13
- package/dist/types/components/pro-selector/src/{pro-user.d.ts → ProUserSelector.vue.d.ts} +50 -12
- package/dist/types/components/pro-selector/src/ProUserSelectorDrilldown.vue.d.ts +447 -0
- package/dist/types/components/pro-selector/src/components/user.d.ts +2 -2
- package/dist/types/components/pro-selector/src/types.d.ts +16 -0
- package/dist/types/components/pro-selector-group/index.d.ts +63 -13
- package/dist/types/components/pro-selector-group/src/index.vue.d.ts +21 -4
- package/dist/types/components/pro-selector-group/src/types.d.ts +6 -0
- package/dist/types/components/pro-selector-group/src/utils/index.d.ts +4 -2
- package/dist/types/components/role-selector/index.d.ts +276 -86
- package/dist/types/components/role-selector/src/{role.d.ts → RoleSelector.vue.d.ts} +37 -13
- package/dist/types/components/role-selector/src/types.d.ts +10 -2
- package/dist/types/components/selector-core/components/DepartmentTree.vue.d.ts +22 -0
- package/dist/types/components/selector-core/components/EntityRow.vue.d.ts +21 -0
- package/dist/types/components/selector-core/components/HighlightText.vue.d.ts +6 -0
- package/dist/types/components/selector-core/components/PanelFeedback.vue.d.ts +28 -0
- package/dist/types/components/selector-core/components/PeoplePane.vue.d.ts +31 -0
- package/dist/types/components/selector-core/components/RolePane.vue.d.ts +19 -0
- package/dist/types/components/selector-core/components/SelectionSummary.vue.d.ts +14 -0
- package/dist/types/components/selector-core/components/SelectorDialog.vue.d.ts +48 -0
- package/dist/types/components/selector-core/model.d.ts +75 -0
- package/dist/types/components/selector-core/useSelectorData.d.ts +104 -0
- package/global.d.ts +4 -0
- package/package.json +5 -3
- package/dist/es/components/dept-selector/src/dept.mjs +0 -294
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePreviewSigningLayer.vue.mjs +0 -42
- package/dist/es/components/pro-contract-template-designer/src/SigningPlacementInspector.vue.mjs +0 -141
- package/dist/es/components/pro-contract-template-designer/src/SigningPlacementLayer.vue.mjs +0 -151
- package/dist/es/components/pro-contract-template-designer/src/composables/use-signing-placement-editor.mjs +0 -79
- package/dist/es/components/pro-contract-template-designer/src/utils/signing-placement.mjs +0 -293
- package/dist/es/components/pro-selector/src/components/org-tree.mjs +0 -223
- package/dist/es/components/pro-selector/src/pro-user.mjs +0 -167
- package/dist/es/components/pro-selector/src/utils/orgTree.mjs +0 -50
- package/dist/es/components/pro-selector-group/src/compoents/dept-tree.mjs +0 -5
- package/dist/es/components/pro-selector-group/src/compoents/dept-tree.vue.mjs +0 -127
- package/dist/es/components/pro-selector-group/src/compoents/dept.mjs +0 -5
- package/dist/es/components/pro-selector-group/src/compoents/dept.vue.mjs +0 -52
- package/dist/es/components/pro-selector-group/src/compoents/index.mjs +0 -3
- package/dist/es/components/pro-selector-group/src/compoents/role.mjs +0 -5
- package/dist/es/components/pro-selector-group/src/compoents/role.vue.mjs +0 -120
- package/dist/es/components/pro-selector-group/src/compoents/select-box.mjs +0 -5
- package/dist/es/components/pro-selector-group/src/compoents/select-box.vue.mjs +0 -59
- package/dist/es/components/pro-selector-group/src/compoents/user.mjs +0 -5
- package/dist/es/components/pro-selector-group/src/compoents/user.vue.mjs +0 -154
- package/dist/es/components/pro-selector-group/src/hooks/useApi.mjs +0 -76
- package/dist/es/components/role-selector/src/role.mjs +0 -217
- package/dist/lib/components/dept-selector/src/dept.cjs +0 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePreviewSigningLayer.cjs +0 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePreviewSigningLayer.vue.cjs +0 -1
- package/dist/lib/components/pro-contract-template-designer/src/SigningPlacementInspector.cjs +0 -1
- package/dist/lib/components/pro-contract-template-designer/src/SigningPlacementInspector.vue.cjs +0 -1
- package/dist/lib/components/pro-contract-template-designer/src/SigningPlacementLayer.cjs +0 -1
- package/dist/lib/components/pro-contract-template-designer/src/SigningPlacementLayer.vue.cjs +0 -1
- package/dist/lib/components/pro-contract-template-designer/src/composables/use-signing-placement-editor.cjs +0 -1
- package/dist/lib/components/pro-contract-template-designer/src/utils/signing-placement.cjs +0 -1
- package/dist/lib/components/pro-selector/src/components/org-tree.cjs +0 -1
- package/dist/lib/components/pro-selector/src/pro-user.cjs +0 -1
- package/dist/lib/components/pro-selector/src/utils/orgTree.cjs +0 -1
- package/dist/lib/components/pro-selector-group/src/compoents/dept-tree.cjs +0 -1
- package/dist/lib/components/pro-selector-group/src/compoents/dept-tree.vue.cjs +0 -1
- package/dist/lib/components/pro-selector-group/src/compoents/dept.cjs +0 -1
- package/dist/lib/components/pro-selector-group/src/compoents/dept.vue.cjs +0 -1
- package/dist/lib/components/pro-selector-group/src/compoents/index.cjs +0 -1
- package/dist/lib/components/pro-selector-group/src/compoents/role.cjs +0 -1
- package/dist/lib/components/pro-selector-group/src/compoents/role.vue.cjs +0 -1
- package/dist/lib/components/pro-selector-group/src/compoents/select-box.cjs +0 -1
- package/dist/lib/components/pro-selector-group/src/compoents/select-box.vue.cjs +0 -1
- package/dist/lib/components/pro-selector-group/src/compoents/user.cjs +0 -1
- package/dist/lib/components/pro-selector-group/src/compoents/user.vue.cjs +0 -1
- package/dist/lib/components/pro-selector-group/src/hooks/useApi.cjs +0 -1
- package/dist/lib/components/role-selector/src/role.cjs +0 -1
- package/dist/types/components/pro-contract-template-designer/src/SigningPlacementInspector.vue.d.ts +0 -17
- package/dist/types/components/pro-contract-template-designer/src/SigningPlacementLayer.vue.d.ts +0 -19
- package/dist/types/components/pro-contract-template-designer/src/composables/use-signing-placement-editor.d.ts +0 -49
- package/dist/types/components/pro-contract-template-designer/src/utils/signing-placement.d.ts +0 -105
- package/dist/types/components/pro-selector/src/components/org-tree.d.ts +0 -45
- package/dist/types/components/pro-selector/src/util.d.ts +0 -26
- package/dist/types/components/pro-selector-group/src/compoents/dept-tree.vue.d.ts +0 -12
- package/dist/types/components/pro-selector-group/src/compoents/dept.vue.d.ts +0 -11
- package/dist/types/components/pro-selector-group/src/compoents/index.d.ts +0 -3
- package/dist/types/components/pro-selector-group/src/compoents/role.vue.d.ts +0 -11
- package/dist/types/components/pro-selector-group/src/compoents/select-box.vue.d.ts +0 -15
- package/dist/types/components/pro-selector-group/src/compoents/user.vue.d.ts +0 -12
- package/dist/types/components/pro-selector-group/src/hooks/useApi.d.ts +0 -112
package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.mjs
CHANGED
|
@@ -1,52 +1,54 @@
|
|
|
1
1
|
import { CONTRACT_BLOCK_STYLES as e, DEFAULT_CONTRACT_FONT_FAMILY as t, DEFAULT_FONT_SIZE_PRESETS as n, DEFAULT_TEXT_ALIGN_OPTIONS as r, resolveFontFamilyOptions as i } from "./constants.mjs";
|
|
2
2
|
import { collectPageDecorationVariableKeys as a, normalizePageDecorations as o, resolvePageDecorationPreset as ee, resolvePageDecorationValidationPath as te, rewritePageDecorationVariableTokens as ne } from "./utils/page-decorations.mjs";
|
|
3
3
|
import { isContractTemplateFieldType as re } from "./types.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { inferContextVariableLabel as
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
4
|
+
import { DEFAULT_ADVANCED_CHOICE_FIELD_TYPES as ie, DEFAULT_BUILTIN_SELECTOR_FIELD_TYPES as ae, DEFAULT_CUSTOM_FIELD_TYPES as oe, DEFAULT_FIELD_STYLE as se, DEFAULT_FIELD_TYPES as s, DEFAULT_PAGE_SIZE as ce, buildTemplatePreviewPages as le, cloneTemplateValue as c, collectTemplateValueVariableKeys as ue, constrainTemplatePageSizes as de, createBlankPage as fe, createBlankTemplate as pe, createDefaultPage as me, createTemplateVariable as he, exportTemplateValue as ge, getFieldOption as _e, getPageSizeKey as ve, normalizeContractTemplateMaxPages as ye, normalizePageSizeOptions as be, normalizeTemplateValue as xe, resolvePageSize as Se, syncTemplateVariablesWithPages as Ce, validateContractTemplateVariableKey as we, validateTemplateValue as Te } from "./composables/use-template-designer.mjs";
|
|
5
|
+
import { isSafeContractImageUrl as Ee } from "./utils/image-url.mjs";
|
|
6
|
+
import { buildTemplateVariableData as De } from "./utils/template-renderer.mjs";
|
|
7
|
+
import { useFitWidthZoom as Oe } from "./composables/use-fit-width-zoom.mjs";
|
|
8
|
+
import { normalizeContractImageDimension as ke, processContractImageFile as Ae } from "./utils/content-image.mjs";
|
|
9
|
+
import { SIGNING_LAYOUT_PRESETS as je, SIGNING_LAYOUT_PRESET_KEYS as Me, isSigningLayoutPresetKey as Ne } from "./utils/signing-layout-presets.mjs";
|
|
10
|
+
import { inferContextVariableLabel as Pe, resolveContextVariableWidth as Fe } from "./utils/context-variable.mjs";
|
|
11
|
+
import Ie from "./DesignerPage.mjs";
|
|
12
|
+
import Le from "./TableContextMenu.mjs";
|
|
13
|
+
import Re from "./ContractTemplateDesignerWorkspaceHeader.mjs";
|
|
14
|
+
import { resolveFieldTypeIcon as ze } from "./utils/template-tool-icons.mjs";
|
|
15
|
+
import Be from "./ContractTemplateDesignerToolbar.mjs";
|
|
16
|
+
import Ve from "./ContractTemplateAuthoringBar.mjs";
|
|
17
|
+
import { useTemplateAuthoring as He } from "./composables/use-template-authoring.mjs";
|
|
18
|
+
import Ue from "./ContractTemplateTextContextMenu.mjs";
|
|
19
|
+
import We from "./ContractTemplateTextBubbleMenu.mjs";
|
|
20
|
+
import Ge from "./ContractTemplateImageContextMenu.mjs";
|
|
21
|
+
import Ke from "./ContractTemplatePreviewModal.mjs";
|
|
22
|
+
import qe from "./ContractTemplateSubmitDataModal.mjs";
|
|
23
|
+
import Je from "./ContractTemplateVariableDataModal.mjs";
|
|
24
|
+
import Ye from "./SigningLayoutCustomModal.mjs";
|
|
25
|
+
import { DEFAULT_DRAFT_CACHE_INTERVAL as Xe, DEFAULT_DRAFT_CACHE_KEY as Ze, DEFAULT_DRAFT_CACHE_MAX_BYTES as l, createDraftCacheStatus as Qe, formatDraftCacheSavedAt as $e } from "./composables/use-template-draft-cache.mjs";
|
|
26
|
+
import { useAutoPagination as et } from "./composables/use-auto-pagination.mjs";
|
|
27
|
+
import { resolveSetActiveFileIdOptions as tt } from "./composables/use-designer-files.mjs";
|
|
28
|
+
import { cloneContractTemplateFiles as u, constrainContractTemplateFiles as nt, createContractTemplateFile as rt, exportContractTemplateFiles as it, moveContractTemplateFile as at, normalizeContractTemplateFiles as ot, removeContractTemplateFile as st, renameContractTemplateFile as ct, replaceContractTemplateFile as lt, resolveContractTemplateActiveFileId as ut } from "./composables/use-template-files.mjs";
|
|
29
|
+
import { useDraftCacheSession as dt } from "./composables/use-draft-cache-session.mjs";
|
|
30
|
+
import ft from "./ContractTemplateFileBar.mjs";
|
|
31
|
+
import pt from "./ContractTemplateDesignerSidebar.mjs";
|
|
32
|
+
import mt from "./ContractTemplateDesignerInspector.mjs";
|
|
33
|
+
import ht from "./ContractTemplatePageDecorationsStudio.mjs";
|
|
32
34
|
import { serializeFingerprint as d } from "./utils/serialize-fingerprint.mjs";
|
|
33
|
-
import { isSameEditorState as
|
|
34
|
-
import { clampContextMenuPosition as
|
|
35
|
-
import { Fragment as
|
|
36
|
-
import { Alert as
|
|
37
|
-
import { useElementSize as
|
|
38
|
-
import { CompressOutlined as
|
|
35
|
+
import { isSameEditorState as gt } from "./utils/editor-state.mjs";
|
|
36
|
+
import { clampContextMenuPosition as _t, clampContextMenuToElement as vt } from "./utils/context-menu-viewport.mjs";
|
|
37
|
+
import { Fragment as yt, Teleport as bt, computed as f, createBlock as xt, createCommentVNode as p, createElementBlock as St, createElementVNode as m, createVNode as h, defineComponent as g, isRef as Ct, nextTick as _, normalizeClass as wt, normalizeStyle as Tt, onBeforeUnmount as Et, onMounted as Dt, openBlock as v, ref as y, renderList as Ot, toDisplayString as kt, unref as b, useId as At, vShow as jt, watch as x, withCtx as Mt, withDirectives as Nt } from "vue";
|
|
38
|
+
import { Alert as Pt, Modal as Ft, Tooltip as It, message as Lt } from "ant-design-vue";
|
|
39
|
+
import { useElementSize as Rt } from "@vueuse/core";
|
|
40
|
+
import { CompressOutlined as zt, DownOutlined as Bt } from "@ant-design/icons-vue";
|
|
39
41
|
//#region src/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue?vue&type=script&setup=true&lang.ts
|
|
40
|
-
var
|
|
42
|
+
var Vt = {
|
|
41
43
|
key: 2,
|
|
42
44
|
class: "gd-contract-template-designer__validation"
|
|
43
|
-
},
|
|
45
|
+
}, Ht = {
|
|
44
46
|
key: 0,
|
|
45
47
|
class: "gd-contract-template-designer__validation-list"
|
|
46
|
-
},
|
|
48
|
+
}, Ut = ["onClick"], Wt = {
|
|
47
49
|
class: "gd-contract-template-designer__sr-status",
|
|
48
50
|
"aria-live": "polite"
|
|
49
|
-
},
|
|
51
|
+
}, Gt = .5, Kt = 1.5, qt = .1, Jt = 120, Yt = 128, Xt = 108, Zt = 48, Qt = 24, $t = 10, en = 48, tn = 8, nn = /* @__PURE__ */ g({
|
|
50
52
|
name: "ProContractTemplateDesigner",
|
|
51
53
|
__name: "ProContractTemplateDesigner",
|
|
52
54
|
props: {
|
|
@@ -62,12 +64,13 @@ var Kt = {
|
|
|
62
64
|
default: !1
|
|
63
65
|
},
|
|
64
66
|
height: { default: 760 },
|
|
65
|
-
pageSize: { default: () =>
|
|
67
|
+
pageSize: { default: () => ce },
|
|
66
68
|
pageSizeOptions: {},
|
|
67
69
|
maxPages: { default: 20 },
|
|
68
70
|
imageCompression: { type: [Object, Boolean] },
|
|
69
71
|
imageUpload: {},
|
|
70
72
|
variableTypes: { default: () => s },
|
|
73
|
+
signingLayoutPresets: {},
|
|
71
74
|
showAdvancedChoiceControls: {
|
|
72
75
|
type: Boolean,
|
|
73
76
|
default: !1
|
|
@@ -80,7 +83,7 @@ var Kt = {
|
|
|
80
83
|
type: Boolean,
|
|
81
84
|
default: !1
|
|
82
85
|
},
|
|
83
|
-
defaultVariableStyle: { default: () =>
|
|
86
|
+
defaultVariableStyle: { default: () => se },
|
|
84
87
|
fontFamilies: { default: void 0 },
|
|
85
88
|
fontFamilyMode: { default: "append" },
|
|
86
89
|
contractFontBaseUrl: { default: void 0 },
|
|
@@ -96,16 +99,12 @@ var Kt = {
|
|
|
96
99
|
type: Boolean,
|
|
97
100
|
default: !0
|
|
98
101
|
},
|
|
99
|
-
showSigningPlacementTools: {
|
|
100
|
-
type: Boolean,
|
|
101
|
-
default: !1
|
|
102
|
-
},
|
|
103
102
|
enableDraftCache: {
|
|
104
103
|
type: Boolean,
|
|
105
104
|
default: !0
|
|
106
105
|
},
|
|
107
|
-
draftCacheKey: { default:
|
|
108
|
-
draftCacheInterval: { default:
|
|
106
|
+
draftCacheKey: { default: Ze },
|
|
107
|
+
draftCacheInterval: { default: Xe },
|
|
109
108
|
draftCacheMaxBytes: { default: l },
|
|
110
109
|
showDraftCacheStatus: {
|
|
111
110
|
type: Boolean,
|
|
@@ -126,71 +125,58 @@ var Kt = {
|
|
|
126
125
|
"validate",
|
|
127
126
|
"draft-cache-change",
|
|
128
127
|
"page-limit",
|
|
129
|
-
"image-error"
|
|
130
|
-
"signing-placement-add",
|
|
131
|
-
"signing-placement-change",
|
|
132
|
-
"signing-placement-remove",
|
|
133
|
-
"signing-placement-select"
|
|
128
|
+
"image-error"
|
|
134
129
|
],
|
|
135
|
-
setup(s, { expose:
|
|
136
|
-
let l = s,
|
|
137
|
-
|
|
138
|
-
if (
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
} catch {
|
|
142
|
-
return [];
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
function yn(e, t) {
|
|
146
|
-
return Object.fromEntries(e.map((e, n) => [e.id, vn(t?.[n]?.template ?? e.template)]));
|
|
147
|
-
}
|
|
148
|
-
let bn = "", xn = "", Sn = v(!1), x = f(() => Sn.value || Array.isArray(l.files)), Cn = st(l.files, l.modelValue, l.pageSize), wn = rt(Cn, l.pageSizeOptions), Tn = x.value ? wn.files : Cn, En = dt(Tn, l.activeFileId), S = v(Tn), C = v(En), Dn = Tn.find((e) => e.id === En) ?? Tn[0], w = v(yn(Tn, Array.isArray(l.files) ? l.files : l.modelValue ? [{ template: l.modelValue }] : void 0)), T = v(w.value[En] ?? vn(Dn?.template)), On = ke(Dn?.template ?? l.modelValue, l.pageSize), kn = ye(On, l.pageSizeOptions), E = v(kn.value);
|
|
149
|
-
if (x.value) {
|
|
150
|
-
if (S.value = ut(S.value, C.value, kn.value), d(S.value) !== d(Cn)) {
|
|
151
|
-
let e = u(S.value);
|
|
152
|
-
bn = d(e), h("update:files", e), h("files-change", u(e));
|
|
130
|
+
setup(s, { expose: Xe, emit: Ze }) {
|
|
131
|
+
let l = s, g = Ze, nn = f(() => ({ height: typeof l.height == "number" ? `${l.height}px` : l.height })), rn = y(), an = y(), on = y(), sn = y(), cn = y(), ln = `gd-contract-template-page-decorations-studio-${At()}`, un = `gd-contract-template-workspace-chrome-${At()}`, dn = y(), fn = y(), pn = y(), mn = "", hn = "", gn = y(!1), S = f(() => gn.value || Array.isArray(l.files)), _n = ot(l.files, l.modelValue, l.pageSize), vn = nt(_n, l.pageSizeOptions), yn = S.value ? vn.files : _n, bn = ut(yn, l.activeFileId), C = y(yn), w = y(bn), xn = xe((yn.find((e) => e.id === bn) ?? yn[0])?.template ?? l.modelValue, l.pageSize), T = y(de(xn, l.pageSizeOptions));
|
|
132
|
+
if (S.value) {
|
|
133
|
+
if (C.value = lt(C.value, w.value, T.value), d(C.value) !== d(_n)) {
|
|
134
|
+
let e = u(C.value);
|
|
135
|
+
mn = d(e), g("update:files", e), g("files-change", u(e));
|
|
153
136
|
}
|
|
154
|
-
} else l.modelValue && d(
|
|
155
|
-
let
|
|
137
|
+
} else l.modelValue && d(T.value) !== d(xn) && (hn = d(T.value), g("update:modelValue", c(T.value)), g("change", c(T.value)));
|
|
138
|
+
let E = y(""), D = y(T.value.pages[0]?.id ?? ""), O = y(!1), k = y([]), A = /* @__PURE__ */ new Map(), Sn = y(!1), Cn = y(""), wn = y(!1), Tn = y(), En = y(), Dn = y(""), On = y(!1), kn = y(""), An = y(!1), jn = y({
|
|
156
139
|
values: {},
|
|
157
140
|
variables: []
|
|
158
|
-
}),
|
|
141
|
+
}), j = y(1), M = y(!1), Mn = y(!1), Nn = y(!1), N = y(!1), Pn = y(!1), Fn = y(), P = y(!1), In = y("header"), Ln = y(!1), Rn = y({}), zn = y(""), F = y(!1), I = y(!1), Bn = y(!1), Vn = y(!1), Hn = y(!1), Un = y(!1), Wn = y(!1), Gn = y(""), Kn = y(), qn = y(), Jn = y(""), Yn = y(!1), L = y(), Xn = y(), R = y(), Zn = y(), Qn = y(!1), $n, er = y(!1), tr, nr = y(!1), rr = y(""), z = y(), ir = y(), B = y(), ar = y(), or = y(), sr = y(), V = y(""), H = y(Qe("idle", "暂无本地草稿")), cr = y({
|
|
159
142
|
rows: 3,
|
|
160
143
|
cols: 3,
|
|
161
144
|
withHeaderRow: !0
|
|
162
|
-
}),
|
|
145
|
+
}), lr = /* @__PURE__ */ new WeakSet(), ur = [".gd-contract-template-designer__page-decorations-select-popup", ".gd-contract-template-designer__page-decorations-dropdown-popup"].join(","), dr, fr, pr = !1, mr = !1, hr, U = f(() => l.readonly || l.disabled), { panel: gr, query: _r, replacement: vr, matchCase: yr, matches: br, currentIndex: xr, currentMatch: Sr, feedback: Cr, highlightQuery: wr, open: Tr, close: Er, navigate: Dr, replaceCurrent: Or, replaceAll: kr, insertSnippet: Ar, handleKeydown: jr } = He({
|
|
146
|
+
pages: () => T.value.pages,
|
|
147
|
+
fileId: () => w.value,
|
|
148
|
+
readonly: () => U.value,
|
|
149
|
+
root: () => rn.value,
|
|
150
|
+
pageRefs: A,
|
|
151
|
+
activatePage: xo,
|
|
152
|
+
beforeOpen: () => {
|
|
153
|
+
$(), ls(), N.value = !1;
|
|
154
|
+
},
|
|
155
|
+
focusPanel: () => pn.value?.focusPanel(),
|
|
156
|
+
focusTrigger: (e) => pn.value?.focusTrigger(e),
|
|
157
|
+
command: Z
|
|
158
|
+
}), Mr = f(() => !!(L.value || gr.value || z.value || B.value || F.value || I.value || Ln.value || Bn.value || Vn.value || Hn.value || Un.value || Wn.value)), Nr = f(() => !!l.enableDraftCache && !U.value), Pr = f(() => C.value.find((e) => e.id === w.value) ?? C.value[0]), Fr = f(() => Tn.value ? le(Tn.value) : []), Ir = f(() => (En.value ?? []).map((e) => ({
|
|
163
159
|
file: e,
|
|
164
|
-
pages:
|
|
165
|
-
}))),
|
|
166
|
-
let
|
|
167
|
-
return {
|
|
168
|
-
|
|
169
|
-
label: ae[e.type],
|
|
170
|
-
detail: `${ae[e.type]} · 第 ${Math.max(0, t) + 1} 页`
|
|
171
|
-
};
|
|
172
|
-
})), jr = f(() => {
|
|
173
|
-
let e = kr.value?.pageId;
|
|
174
|
-
return Yi(E.value.pages.find((t) => t.id === e));
|
|
175
|
-
}), q = f(() => E.value.pages.find((e) => e.id === k.value) ?? E.value.pages[0]), Mr = f(() => Ae(q.value?.pageSize, E.value.pageSize)), Nr = f(() => A.value && j.value.length === 0), Pr = f(() => A.value ? Nr.value ? "校验通过,正文变量与变量配置一致" : `发现 ${j.value.length} 个校验问题` : ""), Fr = f(() => {
|
|
176
|
-
let e = q.value?.title || "合同正文";
|
|
177
|
-
return `${x.value && wr.value ? `${wr.value.name} · ` : ""}${e} · ${Mr.value.label} · 共 ${E.value.pages.length} 页`;
|
|
178
|
-
}), Ir = f(() => ({
|
|
160
|
+
pages: le(e.template)
|
|
161
|
+
}))), Lr = f(() => Ir.value.find((e) => e.file.id === Dn.value) ?? Ir.value[0]), W = f(() => T.value.pages.find((e) => e.id === D.value) ?? T.value.pages[0]), Rr = f(() => Se(W.value?.pageSize, T.value.pageSize)), zr = f(() => O.value && k.value.length === 0), Br = f(() => O.value ? zr.value ? "校验通过,正文变量与变量配置一致" : `发现 ${k.value.length} 个校验问题` : ""), Vr = f(() => {
|
|
162
|
+
let e = W.value?.title || "合同正文";
|
|
163
|
+
return `${S.value && Pr.value ? `${Pr.value.name} · ` : ""}${e} · ${Rr.value.label} · 共 ${T.value.pages.length} 页`;
|
|
164
|
+
}), Hr = f(() => ({
|
|
179
165
|
none: "无装饰",
|
|
180
166
|
"page-number": "标准页码",
|
|
181
167
|
"internal-review": "内部审阅",
|
|
182
168
|
draft: "草稿",
|
|
183
169
|
custom: "自定义"
|
|
184
|
-
})[ee(
|
|
185
|
-
let e = o(
|
|
170
|
+
})[ee(T.value.pageDecorations)]), Ur = f(() => {
|
|
171
|
+
let e = o(T.value.pageDecorations);
|
|
186
172
|
return {
|
|
187
173
|
header: e.header.enabled,
|
|
188
174
|
footer: e.footer.enabled,
|
|
189
175
|
watermark: e.watermark.enabled
|
|
190
176
|
};
|
|
191
|
-
}),
|
|
192
|
-
switch (
|
|
193
|
-
case "saved": return `草稿已缓存 ${
|
|
177
|
+
}), Wr = f(() => Object.values(Ur.value).filter(Boolean).length), Gr = f(() => {
|
|
178
|
+
switch (H.value.type) {
|
|
179
|
+
case "saved": return `草稿已缓存 ${$e(H.value.savedAt)}`;
|
|
194
180
|
case "restored": return "已恢复本地草稿";
|
|
195
181
|
case "too-large": return "草稿过大,未缓存";
|
|
196
182
|
case "unavailable":
|
|
@@ -199,23 +185,23 @@ var Kt = {
|
|
|
199
185
|
case "cleared": return "草稿缓存已清理";
|
|
200
186
|
default: return "";
|
|
201
187
|
}
|
|
202
|
-
}),
|
|
203
|
-
"is-success":
|
|
204
|
-
"is-warning":
|
|
205
|
-
"is-error":
|
|
206
|
-
})),
|
|
188
|
+
}), Kr = f(() => ({
|
|
189
|
+
"is-success": H.value.type === "saved" || H.value.type === "restored",
|
|
190
|
+
"is-warning": H.value.type === "too-large",
|
|
191
|
+
"is-error": H.value.type === "unavailable" || H.value.type === "read-failed" || H.value.type === "write-failed"
|
|
192
|
+
})), qr = f(() => `${Math.round(j.value * 100)}%`), Jr = f(() => i(l.fontFamilies, l.fontFamilyMode)), Yr = f(() => Jr.value.map((e) => ({
|
|
207
193
|
label: e.label,
|
|
208
194
|
value: e.value
|
|
209
|
-
}))),
|
|
195
|
+
}))), Xr = r, Zr = [...e.map((e) => ({
|
|
210
196
|
label: e.label,
|
|
211
197
|
value: e.format
|
|
212
|
-
}))],
|
|
198
|
+
}))], Qr = [{
|
|
213
199
|
label: "实线",
|
|
214
200
|
value: "solid"
|
|
215
201
|
}, {
|
|
216
202
|
label: "虚线",
|
|
217
203
|
value: "dashed"
|
|
218
|
-
}],
|
|
204
|
+
}], $r = [
|
|
219
205
|
{
|
|
220
206
|
label: "完整显示",
|
|
221
207
|
value: "contain"
|
|
@@ -228,85 +214,67 @@ var Kt = {
|
|
|
228
214
|
label: "拉伸填充",
|
|
229
215
|
value: "fill"
|
|
230
216
|
}
|
|
231
|
-
],
|
|
217
|
+
], ei = f(() => be(l.pageSizeOptions)), ti = f(() => ei.value.map((e) => ({
|
|
232
218
|
label: `${e.label} · ${e.width} × ${e.height}`,
|
|
233
|
-
value:
|
|
234
|
-
}))),
|
|
219
|
+
value: ve(e)
|
|
220
|
+
}))), ni = f(() => ve(Rr.value)), ri = f(() => l.draftCacheKey), G = f(() => T.value.variables.find((e) => e.key === E.value)), ii = f(() => {
|
|
235
221
|
let e = [
|
|
236
222
|
...l.variableTypes,
|
|
237
|
-
...l.showAdvancedChoiceControls ?
|
|
238
|
-
...l.showBuiltinSelectorControls ?
|
|
239
|
-
...l.showCustomControls ?
|
|
223
|
+
...l.showAdvancedChoiceControls ? ie : [],
|
|
224
|
+
...l.showBuiltinSelectorControls ? ae : [],
|
|
225
|
+
...l.showCustomControls ? oe : []
|
|
240
226
|
].filter((e) => re(e?.type));
|
|
241
227
|
return Array.from(new Map(e.map((e) => [e.type, e])).values());
|
|
242
|
-
}),
|
|
228
|
+
}), ai = f(() => {
|
|
229
|
+
let e = [...Me.map((e) => je[e]), ...(l.signingLayoutPresets ?? []).filter((e) => !!e?.key)];
|
|
230
|
+
return Array.from(new Map(e.map((e) => [e.key, e])).values());
|
|
231
|
+
}), oi = f(() => ii.value.map((e) => ({
|
|
243
232
|
...e,
|
|
244
|
-
icon:
|
|
233
|
+
icon: ze(e.type),
|
|
245
234
|
group: e.type === "select" || e.type === "radio" ? "advanced-choice" : e.type.endsWith("-selector") ? "builtin-selector" : e.type === "custom" ? "custom" : "basic"
|
|
246
|
-
}))),
|
|
247
|
-
let e =
|
|
248
|
-
return Array.from(a(
|
|
249
|
-
}), { scheduleAutoPaginate:
|
|
250
|
-
templateValue:
|
|
251
|
-
readonlyState:
|
|
252
|
-
isAutoPaginating:
|
|
253
|
-
pendingPaginationPageId:
|
|
254
|
-
activePageId:
|
|
255
|
-
normalizedMaxPages:
|
|
256
|
-
pageRefs:
|
|
257
|
-
syncPageEditors:
|
|
258
|
-
commitBodyChange:
|
|
259
|
-
getPageSize:
|
|
260
|
-
notifyPageLimit:
|
|
261
|
-
}), {
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
readonly: () => l.readonly,
|
|
269
|
-
disabled: () => l.disabled,
|
|
270
|
-
showSigningPlacementTools: () => !!l.showSigningPlacementTools,
|
|
271
|
-
getPageSize: Yi,
|
|
272
|
-
getVisiblePosition: (e, t) => M.get(e)?.getVisibleSigningPlacementPosition(t),
|
|
273
|
-
commitSigningPlacements: ta,
|
|
274
|
-
selectSigningPlacement: Q,
|
|
275
|
-
emitAdd: (e) => h("signing-placement-add", e),
|
|
276
|
-
emitChange: (e) => h("signing-placement-change", e),
|
|
277
|
-
emitRemove: (e) => h("signing-placement-remove", e)
|
|
278
|
-
}), { saveDraftCache: di, loadDraftCache: fi, clearDraftCache: pi, restoreDraftCacheIfNeeded: mi, stopDraftCacheTimer: hi, restartDraftCacheTimer: gi, resetDraftFingerprint: _i } = ft({
|
|
279
|
-
draftCacheWritable: Cr,
|
|
280
|
-
multipleFilesMode: x,
|
|
281
|
-
filesValue: S,
|
|
282
|
-
activeFileIdValue: C,
|
|
283
|
-
templateValue: E,
|
|
284
|
-
draftCacheKey: Tr,
|
|
235
|
+
}))), si = f(() => ye(l.maxPages)), ci = f(() => T.value.pages.length >= si.value), li = f(() => {
|
|
236
|
+
let e = ue(T.value);
|
|
237
|
+
return Array.from(a(T.value.pageDecorations)).filter((t) => !e.has(t));
|
|
238
|
+
}), { scheduleAutoPaginate: K } = et({
|
|
239
|
+
templateValue: T,
|
|
240
|
+
readonlyState: U,
|
|
241
|
+
isAutoPaginating: Sn,
|
|
242
|
+
pendingPaginationPageId: Cn,
|
|
243
|
+
activePageId: D,
|
|
244
|
+
normalizedMaxPages: si,
|
|
245
|
+
pageRefs: A,
|
|
246
|
+
syncPageEditors: Mi,
|
|
247
|
+
commitBodyChange: Ji,
|
|
248
|
+
getPageSize: Xi,
|
|
249
|
+
notifyPageLimit: Qi
|
|
250
|
+
}), { saveDraftCache: ui, loadDraftCache: di, clearDraftCache: fi, restoreDraftCacheIfNeeded: pi, stopDraftCacheTimer: mi, restartDraftCacheTimer: hi, resetDraftFingerprint: gi } = dt({
|
|
251
|
+
draftCacheWritable: Nr,
|
|
252
|
+
multipleFilesMode: S,
|
|
253
|
+
filesValue: C,
|
|
254
|
+
activeFileIdValue: w,
|
|
255
|
+
templateValue: T,
|
|
256
|
+
draftCacheKey: ri,
|
|
285
257
|
draftCacheInterval: () => l.draftCacheInterval,
|
|
286
258
|
draftCacheMaxBytes: () => l.draftCacheMaxBytes,
|
|
287
259
|
pageSize: () => l.pageSize,
|
|
288
260
|
pageSizeOptions: () => l.pageSizeOptions,
|
|
289
|
-
syncActiveFileSnapshot:
|
|
290
|
-
syncPageEditors:
|
|
291
|
-
setActiveFileId:
|
|
292
|
-
emitFilesChange:
|
|
261
|
+
syncActiveFileSnapshot: J,
|
|
262
|
+
syncPageEditors: Mi,
|
|
263
|
+
setActiveFileId: Ri,
|
|
264
|
+
emitFilesChange: Y,
|
|
293
265
|
commit: X,
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
activePageId: k,
|
|
301
|
-
selectedVariableKey: D
|
|
302
|
-
}), vi = f(() => {
|
|
303
|
-
let e = lr.value.trim().toLowerCase(), t = E.value.variables;
|
|
266
|
+
updateDraftCacheStatus: zi,
|
|
267
|
+
scheduleAutoPaginate: K,
|
|
268
|
+
activePageId: D,
|
|
269
|
+
selectedVariableKey: E
|
|
270
|
+
}), _i = f(() => {
|
|
271
|
+
let e = rr.value.trim().toLowerCase(), t = T.value.variables;
|
|
304
272
|
return e ? t.filter((t) => t.label.toLowerCase().includes(e) || t.key.toLowerCase().includes(e)) : t;
|
|
305
|
-
}),
|
|
273
|
+
}), vi = f(() => Math.max(Zt, Rr.value.width - Yt)), yi = f(() => Math.max(Qt, Rr.value.height - Xt)), q = f(() => Rn.value[D.value] ?? Di()), bi = f(() => q.value.hasMixedBlockFormats ? void 0 : q.value.currentHeadingLevel ?? "paragraph"), xi = f(() => q.value.fontFamily || t), Si = f(() => q.value.fontSize ?? se.fontSize ?? 14), Ci = f(() => q.value.textColor || se.color || "#1f2937"), wi = f(() => G.value?.style?.fontFamily || se.fontFamily || t), Ti = f(() => {
|
|
306
274
|
let e = n.map((e) => ({
|
|
307
275
|
label: `${e}px`,
|
|
308
276
|
value: e
|
|
309
|
-
})), t =
|
|
277
|
+
})), t = ji(Si.value), r = ji(zn.value), i = /* @__PURE__ */ new Map();
|
|
310
278
|
return r && !n.includes(r) && i.set(r, {
|
|
311
279
|
label: `使用 ${r}px`,
|
|
312
280
|
value: r
|
|
@@ -315,86 +283,78 @@ var Kt = {
|
|
|
315
283
|
value: t
|
|
316
284
|
}), [...Array.from(i.values()), ...e];
|
|
317
285
|
});
|
|
318
|
-
|
|
319
|
-
if (!e ||
|
|
320
|
-
let t =
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
[C.value]: T.value
|
|
324
|
-
}, E.value = r, S.value = ut(S.value, C.value, r), k.value = r.pages[0]?.id ?? "", D.value = "", O.value = "", J(k.value)), d(r) !== d(t) && (xn = a, h("update:modelValue", c(r)), h("change", c(r)), Zi(n.resizedSigningPlacementIds, r));
|
|
325
|
-
}, { deep: !0 }), b(() => l.files, (e) => {
|
|
286
|
+
x(() => l.modelValue, (e) => {
|
|
287
|
+
if (!e || S.value) return;
|
|
288
|
+
let t = xe(e, l.pageSize), n = de(t, l.pageSizeOptions), r = d(n) !== d(T.value), i = d(n), a = i === hn;
|
|
289
|
+
a && (hn = ""), (r || !a) && (T.value = n, C.value = lt(C.value, w.value, n), D.value = n.pages[0]?.id ?? "", E.value = "", K(D.value)), d(n) !== d(t) && (hn = i, g("update:modelValue", c(n)), g("change", c(n)));
|
|
290
|
+
}, { deep: !0 }), x(() => l.files, (e) => {
|
|
326
291
|
if (!Array.isArray(e)) return;
|
|
327
|
-
let t =
|
|
328
|
-
|
|
329
|
-
let
|
|
330
|
-
if (r === i ?
|
|
292
|
+
let t = ot(e, void 0, l.pageSize), n = nt(t, l.pageSizeOptions).files, r = d(n), i = d(C.value);
|
|
293
|
+
r === mn && (mn = "");
|
|
294
|
+
let a = ut(n, l.activeFileId || w.value);
|
|
295
|
+
if (r === i ? a !== w.value && Ri(a, {
|
|
331
296
|
syncCurrent: !1,
|
|
332
297
|
shouldEmit: !1
|
|
333
|
-
}) : (
|
|
298
|
+
}) : (C.value = n, Ri(a, {
|
|
334
299
|
syncCurrent: !1,
|
|
335
300
|
shouldEmit: !1,
|
|
336
|
-
forceRefresh: !0
|
|
337
|
-
persistCurrentErrors: !1
|
|
301
|
+
forceRefresh: !0
|
|
338
302
|
})), r !== d(t)) {
|
|
339
303
|
let e = u(n);
|
|
340
|
-
|
|
304
|
+
mn = d(e), g("update:files", e), g("files-change", u(e));
|
|
341
305
|
}
|
|
342
|
-
}, { deep: !0 }),
|
|
343
|
-
!
|
|
306
|
+
}, { deep: !0 }), x(() => l.activeFileId, (e) => {
|
|
307
|
+
!S.value || !e || e === w.value || Ri(e, {
|
|
344
308
|
syncCurrent: !0,
|
|
345
309
|
shouldEmit: !1
|
|
346
310
|
});
|
|
347
311
|
});
|
|
348
|
-
function
|
|
349
|
-
let n = d(
|
|
350
|
-
|
|
351
|
-
let { files: r
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
if (x.value) {
|
|
358
|
-
Oi(e, t), J(k.value);
|
|
312
|
+
function Ei(e, t) {
|
|
313
|
+
let n = d(C.value);
|
|
314
|
+
J(!1);
|
|
315
|
+
let { files: r } = nt(ot(C.value, void 0, e), t), i = d(r) !== n, a = r.find((e) => e.id === w.value);
|
|
316
|
+
return a && d(a.template) !== d(T.value) && (T.value = c(a.template)), i && (O.value = !1, k.value = [], Y(r, "")), i;
|
|
317
|
+
}
|
|
318
|
+
x([() => l.pageSize, () => l.pageSizeOptions], ([e, t]) => {
|
|
319
|
+
if (S.value) {
|
|
320
|
+
Ei(e, t), K(D.value);
|
|
359
321
|
return;
|
|
360
322
|
}
|
|
361
|
-
let n =
|
|
362
|
-
d(n
|
|
363
|
-
}, { deep: !0 }),
|
|
364
|
-
|
|
365
|
-
}),
|
|
366
|
-
e && ($(),
|
|
367
|
-
}),
|
|
368
|
-
|
|
369
|
-
}),
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
323
|
+
let n = de(xe(T.value, e), t);
|
|
324
|
+
d(n) !== d(T.value) && X(n), K(D.value);
|
|
325
|
+
}, { deep: !0 }), x(si, () => {
|
|
326
|
+
K(T.value.pages[0]?.id);
|
|
327
|
+
}), x(U, (e) => {
|
|
328
|
+
e && ($(), F.value = !1, I.value = !1);
|
|
329
|
+
}), x(D, () => {
|
|
330
|
+
R.value = void 0;
|
|
331
|
+
}), x([
|
|
332
|
+
Mr,
|
|
333
|
+
P,
|
|
334
|
+
wn
|
|
373
335
|
], () => {
|
|
374
|
-
|
|
375
|
-
}),
|
|
376
|
-
O.value && !e.some((e) => e.id === O.value) && (O.value = "", h("signing-placement-select", void 0));
|
|
377
|
-
}, { deep: !0 }), b(() => [
|
|
336
|
+
fs();
|
|
337
|
+
}), x(() => [
|
|
378
338
|
l.enableDraftCache,
|
|
379
|
-
|
|
339
|
+
ri.value,
|
|
380
340
|
l.draftCacheInterval,
|
|
381
|
-
|
|
341
|
+
U.value
|
|
382
342
|
], () => {
|
|
383
|
-
|
|
384
|
-
}),
|
|
343
|
+
gi(), hi();
|
|
344
|
+
}), x(M, (e) => {
|
|
385
345
|
if (!(typeof document > "u")) {
|
|
386
346
|
if (e) {
|
|
387
|
-
|
|
347
|
+
dr = document.body.style.overflow, document.body.style.overflow = "hidden";
|
|
388
348
|
return;
|
|
389
349
|
}
|
|
390
|
-
document.body.style.overflow =
|
|
350
|
+
document.body.style.overflow = dr ?? "", dr = void 0;
|
|
391
351
|
}
|
|
392
|
-
}),
|
|
393
|
-
|
|
394
|
-
}),
|
|
395
|
-
|
|
352
|
+
}), Dt(() => {
|
|
353
|
+
pi(), hi(), K(D.value), window.addEventListener("pointerdown", bs, !0), window.addEventListener("pointerup", _s), window.addEventListener("keydown", Cs, !0), window.addEventListener("keydown", ws), window.addEventListener("resize", vs), window.addEventListener("scroll", xs, !0);
|
|
354
|
+
}), Et(() => {
|
|
355
|
+
Pi(), pr = !0, M.value && typeof document < "u" && (document.body.style.overflow = dr ?? ""), window.removeEventListener("pointerdown", bs, !0), window.removeEventListener("pointerup", _s), window.removeEventListener("keydown", Cs, !0), window.removeEventListener("keydown", ws), window.removeEventListener("resize", vs), window.removeEventListener("scroll", xs, !0), tr !== void 0 && cancelAnimationFrame(tr), mi();
|
|
396
356
|
});
|
|
397
|
-
function
|
|
357
|
+
function Di() {
|
|
398
358
|
return {
|
|
399
359
|
isFocused: !1,
|
|
400
360
|
canUndo: !1,
|
|
@@ -407,33 +367,33 @@ var Kt = {
|
|
|
407
367
|
isTableActive: !1,
|
|
408
368
|
textAlign: "left",
|
|
409
369
|
fontFamily: t,
|
|
410
|
-
fontSize:
|
|
411
|
-
textColor:
|
|
370
|
+
fontSize: se.fontSize ?? 14,
|
|
371
|
+
textColor: se.color ?? "#1f2937",
|
|
412
372
|
selectionText: "",
|
|
413
373
|
hasMixedBlockFormats: !1
|
|
414
374
|
};
|
|
415
375
|
}
|
|
416
|
-
function
|
|
376
|
+
function Oi(e) {
|
|
417
377
|
return e === "left" || e === "center" || e === "right";
|
|
418
378
|
}
|
|
419
|
-
function
|
|
379
|
+
function ki(e) {
|
|
420
380
|
return typeof e == "number" && Number.isInteger(e) && e >= 1 && e <= 6;
|
|
421
381
|
}
|
|
422
|
-
function
|
|
382
|
+
function Ai(e, t = Si.value) {
|
|
423
383
|
let n = Number(e);
|
|
424
|
-
return Number.isFinite(n) ? Math.min(
|
|
384
|
+
return Number.isFinite(n) ? Math.min(en, Math.max($t, Math.round(n))) : t;
|
|
425
385
|
}
|
|
426
|
-
function
|
|
386
|
+
function ji(e) {
|
|
427
387
|
let t = String(e || "").trim().match(/(\d+(\.\d+)?)/);
|
|
428
388
|
if (!t) return;
|
|
429
389
|
let n = Number(t[1]);
|
|
430
|
-
if (Number.isFinite(n)) return Math.min(
|
|
390
|
+
if (Number.isFinite(n)) return Math.min(en, Math.max($t, Math.round(n)));
|
|
431
391
|
}
|
|
432
|
-
function
|
|
392
|
+
function Mi(e = T.value) {
|
|
433
393
|
return {
|
|
434
394
|
...e,
|
|
435
395
|
pages: e.pages.map((e) => {
|
|
436
|
-
let t =
|
|
396
|
+
let t = A.get(e.id);
|
|
437
397
|
return {
|
|
438
398
|
...e,
|
|
439
399
|
contentHtml: t?.getHTML() ?? e.contentHtml,
|
|
@@ -442,345 +402,310 @@ var Kt = {
|
|
|
442
402
|
})
|
|
443
403
|
};
|
|
444
404
|
}
|
|
445
|
-
function
|
|
446
|
-
|
|
405
|
+
function Ni() {
|
|
406
|
+
mr = !1, hr &&= (clearTimeout(hr), void 0);
|
|
447
407
|
}
|
|
448
|
-
function
|
|
449
|
-
let e =
|
|
450
|
-
|
|
408
|
+
function Pi() {
|
|
409
|
+
let e = mr;
|
|
410
|
+
Ni(), e && Li();
|
|
451
411
|
}
|
|
452
|
-
function
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
},
|
|
412
|
+
function Fi() {
|
|
413
|
+
mr = !0, hr && clearTimeout(hr), hr = setTimeout(() => {
|
|
414
|
+
hr = void 0, !(!mr || pr) && (mr = !1, Li());
|
|
415
|
+
}, Jt);
|
|
456
416
|
}
|
|
457
|
-
function
|
|
458
|
-
let t =
|
|
417
|
+
function Ii(e) {
|
|
418
|
+
let t = T.value.pages, n = t.findIndex((t) => t.id === e.id);
|
|
459
419
|
if (n < 0) return;
|
|
460
420
|
let r = t[n];
|
|
461
421
|
if (r.contentHtml === e.contentHtml && r.contentJson === e.contentJson && r.title === e.title && r.pageSize === e.pageSize) return;
|
|
462
422
|
let i = t.slice();
|
|
463
|
-
i[n] = e,
|
|
464
|
-
...
|
|
423
|
+
i[n] = e, T.value = {
|
|
424
|
+
...T.value,
|
|
465
425
|
pages: i
|
|
466
426
|
};
|
|
467
427
|
}
|
|
468
|
-
function
|
|
469
|
-
let e =
|
|
470
|
-
|
|
471
|
-
}
|
|
472
|
-
function
|
|
473
|
-
|
|
474
|
-
let t = c(
|
|
475
|
-
if (!
|
|
476
|
-
let n =
|
|
477
|
-
return
|
|
478
|
-
}
|
|
479
|
-
function
|
|
480
|
-
if (!
|
|
428
|
+
function Li() {
|
|
429
|
+
let e = Ce(Mi());
|
|
430
|
+
E.value && !e.variables.some((e) => e.key === E.value) && (E.value = ""), X(e);
|
|
431
|
+
}
|
|
432
|
+
function J(e = !1) {
|
|
433
|
+
Pi();
|
|
434
|
+
let t = c(Mi());
|
|
435
|
+
if (!S.value) return t;
|
|
436
|
+
let n = C.value.find((e) => e.id === w.value)?.template, r = d(n) !== d(t), i = lt(C.value, w.value, t);
|
|
437
|
+
return C.value = i, r && e && Y(i), t;
|
|
438
|
+
}
|
|
439
|
+
function Y(e, t = w.value) {
|
|
440
|
+
if (!S.value) return;
|
|
481
441
|
let n = u(e);
|
|
482
|
-
|
|
442
|
+
C.value = n, mn = d(n), g("update:files", u(n)), g("files-change", u(n));
|
|
483
443
|
let r = n.find((e) => e.id === t);
|
|
484
|
-
r &&
|
|
485
|
-
}
|
|
486
|
-
function
|
|
487
|
-
let { syncCurrent: n, shouldEmit: r, forceRefresh: i
|
|
488
|
-
if (
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
let te = S.value.find((e) => e.id === o);
|
|
493
|
-
te && (C.value = o, E.value = c(te.template), T.value = [...w.value[o] ?? []], D.value = "", O.value = "", k.value = E.value.pages[0]?.id ?? "", qn.value = {}, M.clear(), jn.value = "", A.value = !1, j.value = [], Mn.value = !1, Nn.value = void 0, Pn.value = void 0, _i(), r && ee && h("update:activeFileId", o), n && ee && Cr.value && di(), g(() => {
|
|
494
|
-
J(k.value);
|
|
444
|
+
r && g("file-change", u([r])[0]);
|
|
445
|
+
}
|
|
446
|
+
function Ri(e, t = {}) {
|
|
447
|
+
let { syncCurrent: n, shouldEmit: r, forceRefresh: i } = tt(t), a = ut(C.value, e), o = a !== w.value;
|
|
448
|
+
if (n ? J(!0) : Ni(), !o && !i) return;
|
|
449
|
+
let ee = C.value.find((e) => e.id === a);
|
|
450
|
+
ee && (w.value = a, T.value = c(ee.template), E.value = "", D.value = T.value.pages[0]?.id ?? "", Rn.value = {}, A.clear(), Cn.value = "", O.value = !1, k.value = [], wn.value = !1, Tn.value = void 0, En.value = void 0, gi(), r && o && g("update:activeFileId", a), n && o && Nr.value && ui(), _(() => {
|
|
451
|
+
K(D.value);
|
|
495
452
|
}));
|
|
496
453
|
}
|
|
497
454
|
function X(e) {
|
|
498
|
-
|
|
499
|
-
let t =
|
|
500
|
-
return
|
|
455
|
+
Ni();
|
|
456
|
+
let t = de(xe(e, l.pageSize), l.pageSizeOptions);
|
|
457
|
+
return T.value = t, O.value = !1, k.value = [], S.value ? Y(lt(C.value, w.value, t)) : (C.value = lt(C.value, w.value, t), hn = d(t), g("update:modelValue", c(t)), g("change", c(t))), t;
|
|
458
|
+
}
|
|
459
|
+
function zi(e, t = e.type !== "unchanged") {
|
|
460
|
+
H.value = e, t && g("draft-cache-change", { ...e });
|
|
501
461
|
}
|
|
502
|
-
function
|
|
503
|
-
|
|
462
|
+
function Bi() {
|
|
463
|
+
return { ...H.value };
|
|
504
464
|
}
|
|
505
|
-
function
|
|
506
|
-
|
|
465
|
+
function Vi(e, t) {
|
|
466
|
+
t ? A.set(e, t) : A.delete(e);
|
|
507
467
|
}
|
|
508
|
-
function
|
|
509
|
-
|
|
468
|
+
function Hi(e) {
|
|
469
|
+
$(), Hn.value = !1, Z({
|
|
470
|
+
type: "insert-signing-layout",
|
|
471
|
+
preset: Ne(e.key) ? e.key : void 0,
|
|
472
|
+
options: e.options
|
|
473
|
+
});
|
|
474
|
+
}
|
|
475
|
+
function Ui(e) {
|
|
476
|
+
$(), Z({
|
|
477
|
+
type: "insert-signing-layout",
|
|
478
|
+
options: e
|
|
479
|
+
});
|
|
510
480
|
}
|
|
511
|
-
function
|
|
512
|
-
|
|
481
|
+
function Wi() {
|
|
482
|
+
Hn.value = !1, Wn.value = !0;
|
|
513
483
|
}
|
|
514
484
|
function Gi(e) {
|
|
515
|
-
|
|
485
|
+
$(), Un.value = !1, Z({
|
|
486
|
+
type: "insert-signing-mark",
|
|
487
|
+
mark: { markType: e }
|
|
488
|
+
});
|
|
489
|
+
}
|
|
490
|
+
function Z(e, t = W.value?.id ?? D.value) {
|
|
491
|
+
U.value || A.get(t)?.runCommand(e);
|
|
516
492
|
}
|
|
517
493
|
function Ki(e) {
|
|
518
|
-
|
|
519
|
-
t && (M.get(t)?.focus(), H.value = typeof document < "u" && document.execCommand(e) ? `${e === "copy" ? "已复制" : e === "cut" ? "已剪切" : "已粘贴"}` : "浏览器未授权剪贴板操作,请使用系统快捷键。", $());
|
|
494
|
+
Z(e), $();
|
|
520
495
|
}
|
|
521
496
|
function qi(e) {
|
|
522
|
-
let t =
|
|
523
|
-
|
|
497
|
+
let t = L.value?.pageId;
|
|
498
|
+
t && (A.get(t)?.focus(), V.value = typeof document < "u" && document.execCommand(e) ? `${e === "copy" ? "已复制" : e === "cut" ? "已剪切" : "已粘贴"}` : "浏览器未授权剪贴板操作,请使用系统快捷键。", $());
|
|
524
499
|
}
|
|
525
500
|
function Ji(e) {
|
|
526
|
-
|
|
501
|
+
let t = X(Ce(e));
|
|
502
|
+
return E.value && !t.variables.some((e) => e.key === E.value) && (E.value = ""), t;
|
|
527
503
|
}
|
|
528
504
|
function Yi(e) {
|
|
529
|
-
|
|
505
|
+
Ii(e), Fi(), K(e.id);
|
|
530
506
|
}
|
|
531
507
|
function Xi(e) {
|
|
532
|
-
return
|
|
508
|
+
return Se(e?.pageSize, T.value.pageSize);
|
|
533
509
|
}
|
|
534
|
-
function Zi(e
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
}
|
|
538
|
-
function Q(e) {
|
|
539
|
-
let t = e ? K.value.find((t) => t.id === e) : void 0;
|
|
540
|
-
O.value = t?.id ?? "", t && (D.value = "", k.value = t.pageId), h("signing-placement-select", t ? pt(t) : void 0);
|
|
541
|
-
}
|
|
542
|
-
function Qi(e) {
|
|
543
|
-
Q(e.id);
|
|
544
|
-
}
|
|
545
|
-
function $i(e) {
|
|
546
|
-
let t = new Set(e);
|
|
547
|
-
if (!t.size) return;
|
|
548
|
-
let n = T.value.filter((e) => e.type !== "signing-placement" || !t.has(e.id));
|
|
549
|
-
T.value = n, w.value = {
|
|
550
|
-
...w.value,
|
|
551
|
-
[C.value]: n
|
|
552
|
-
};
|
|
553
|
-
}
|
|
554
|
-
function ea(e) {
|
|
555
|
-
let t = T.value.filter((t) => t.type !== "signing-placement" || t.pageId !== e);
|
|
556
|
-
T.value = t, w.value = {
|
|
557
|
-
...w.value,
|
|
558
|
-
[C.value]: t
|
|
559
|
-
};
|
|
560
|
-
}
|
|
561
|
-
function ta(e, t = []) {
|
|
562
|
-
return $i(t), X({
|
|
563
|
-
...E.value,
|
|
564
|
-
signingPlacements: e
|
|
565
|
-
});
|
|
566
|
-
}
|
|
567
|
-
function na(e) {
|
|
568
|
-
if (W.value || !q.value) return;
|
|
569
|
-
let t = Jr.value.find((t) => Ee(t) === e);
|
|
510
|
+
function Zi(e) {
|
|
511
|
+
if (U.value || !W.value) return;
|
|
512
|
+
let t = ei.value.find((t) => ve(t) === e);
|
|
570
513
|
if (!t) return;
|
|
571
|
-
let n =
|
|
572
|
-
|
|
573
|
-
...
|
|
574
|
-
pages:
|
|
514
|
+
let n = W.value.id, r = Se(t, T.value.pageSize);
|
|
515
|
+
X({
|
|
516
|
+
...T.value,
|
|
517
|
+
pages: T.value.pages.map((e) => e.id === n ? {
|
|
575
518
|
...e,
|
|
576
|
-
pageSize:
|
|
577
|
-
} : e)
|
|
578
|
-
|
|
579
|
-
}), a.filter((e) => e.pageId === n).forEach((e) => h("signing-placement-change", pt(e))), J(n);
|
|
519
|
+
pageSize: r
|
|
520
|
+
} : e)
|
|
521
|
+
}), K(n);
|
|
580
522
|
}
|
|
581
|
-
function
|
|
582
|
-
let t =
|
|
583
|
-
|
|
523
|
+
function Qi(e) {
|
|
524
|
+
let t = si.value;
|
|
525
|
+
V.value = `合同最多支持 ${t} 页`, g("page-limit", t, e);
|
|
584
526
|
}
|
|
585
|
-
function
|
|
586
|
-
if (
|
|
587
|
-
if (
|
|
588
|
-
|
|
527
|
+
function $i() {
|
|
528
|
+
if (U.value) return;
|
|
529
|
+
if (ci.value) {
|
|
530
|
+
Qi("add");
|
|
589
531
|
return;
|
|
590
532
|
}
|
|
591
|
-
let e =
|
|
533
|
+
let e = me(T.value.pages.length + 1, Rr.value);
|
|
592
534
|
X({
|
|
593
|
-
...
|
|
594
|
-
pages: [...
|
|
595
|
-
}),
|
|
596
|
-
}
|
|
597
|
-
function
|
|
598
|
-
if (
|
|
599
|
-
if (
|
|
600
|
-
|
|
535
|
+
...T.value,
|
|
536
|
+
pages: [...T.value.pages, e]
|
|
537
|
+
}), D.value = e.id;
|
|
538
|
+
}
|
|
539
|
+
function ea(e) {
|
|
540
|
+
if (U.value) return;
|
|
541
|
+
if (ci.value) {
|
|
542
|
+
Qi("duplicate");
|
|
601
543
|
return;
|
|
602
544
|
}
|
|
603
|
-
let t =
|
|
545
|
+
let t = T.value.pages.findIndex((t) => t.id === e.id);
|
|
604
546
|
if (t < 0) return;
|
|
605
547
|
let n = c({
|
|
606
548
|
pages: [e],
|
|
607
549
|
variables: [],
|
|
608
|
-
pageSize:
|
|
609
|
-
|
|
610
|
-
}).pages[0], r = be(t + 2, Yi(e), n.contentHtml, n.contentJson);
|
|
550
|
+
pageSize: T.value.pageSize
|
|
551
|
+
}).pages[0], r = fe(t + 2, Xi(e), n.contentHtml, n.contentJson);
|
|
611
552
|
r.title = `${e.title || `第 ${t + 1} 页`}副本`;
|
|
612
|
-
let i = [...
|
|
613
|
-
i.splice(t + 1, 0, r)
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
pageId: r.id
|
|
618
|
-
}));
|
|
619
|
-
X({
|
|
620
|
-
...E.value,
|
|
621
|
-
pages: i,
|
|
622
|
-
signingPlacements: [...K.value, ...a]
|
|
623
|
-
}), k.value = r.id, a.forEach((e) => h("signing-placement-add", pt(e))), a[0] && Q(a[0].id);
|
|
553
|
+
let i = [...T.value.pages];
|
|
554
|
+
i.splice(t + 1, 0, r), X({
|
|
555
|
+
...T.value,
|
|
556
|
+
pages: i
|
|
557
|
+
}), D.value = r.id;
|
|
624
558
|
}
|
|
625
|
-
function
|
|
626
|
-
if (
|
|
627
|
-
let t =
|
|
559
|
+
function ta(e) {
|
|
560
|
+
if (U.value || T.value.pages.length <= 1) return;
|
|
561
|
+
let t = T.value.pages.findIndex((t) => t.id === e.id);
|
|
628
562
|
if (t < 0) return;
|
|
629
|
-
let n =
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
...E.value,
|
|
633
|
-
pages: r,
|
|
634
|
-
signingPlacements: K.value.filter((t) => t.pageId !== e.id)
|
|
563
|
+
let n = T.value.pages.filter((t) => t.id !== e.id), r = Ji({
|
|
564
|
+
...T.value,
|
|
565
|
+
pages: n
|
|
635
566
|
});
|
|
636
|
-
|
|
567
|
+
D.value = r.pages[Math.min(t, r.pages.length - 1)]?.id ?? "";
|
|
637
568
|
}
|
|
638
|
-
function
|
|
639
|
-
|
|
640
|
-
let t = Xi(e.id).length;
|
|
641
|
-
if (!t) {
|
|
642
|
-
oa(e);
|
|
643
|
-
return;
|
|
644
|
-
}
|
|
645
|
-
Bt.confirm({
|
|
569
|
+
function na(e) {
|
|
570
|
+
U.value || T.value.pages.length <= 1 || Ft.confirm({
|
|
646
571
|
title: "删除合同页面",
|
|
647
|
-
content:
|
|
572
|
+
content: "删除页面会同时移除页面正文,是否继续?",
|
|
648
573
|
okText: "确认删除",
|
|
649
574
|
okType: "danger",
|
|
650
575
|
cancelText: "取消",
|
|
651
576
|
onOk: () => {
|
|
652
|
-
|
|
577
|
+
ta(e);
|
|
653
578
|
}
|
|
654
579
|
});
|
|
655
580
|
}
|
|
656
|
-
function
|
|
657
|
-
let t = new Set(
|
|
581
|
+
function ra(e) {
|
|
582
|
+
let t = new Set(T.value.variables.map((e) => e.key)), n = 1;
|
|
658
583
|
for (; t.has(`${e}_${n}`);) n += 1;
|
|
659
584
|
return `${e}_${n}`;
|
|
660
585
|
}
|
|
661
|
-
function
|
|
586
|
+
function ia(e) {
|
|
662
587
|
let t = e.type ?? "text";
|
|
663
|
-
return
|
|
588
|
+
return he({
|
|
664
589
|
...e,
|
|
665
590
|
type: t,
|
|
666
|
-
key: e.key ||
|
|
667
|
-
label: e.label ||
|
|
668
|
-
},
|
|
591
|
+
key: e.key || ra(t),
|
|
592
|
+
label: e.label || _e(t, ii.value).label
|
|
593
|
+
}, ii.value, l.defaultVariableStyle);
|
|
669
594
|
}
|
|
670
|
-
function
|
|
671
|
-
if (
|
|
672
|
-
let r =
|
|
595
|
+
function aa(e, t = W.value?.id ?? T.value.pages[0].id, n) {
|
|
596
|
+
if (U.value) return e;
|
|
597
|
+
let r = A.get(t)?.insertVariable(e, n), i = !T.value.variables.some((t) => t.key === e.key);
|
|
673
598
|
return X({
|
|
674
|
-
...
|
|
675
|
-
pages: r ?
|
|
676
|
-
variables: i ? [...
|
|
677
|
-
}),
|
|
599
|
+
...T.value,
|
|
600
|
+
pages: r ? T.value.pages.map((e) => e.id === r.id ? r : e) : T.value.pages,
|
|
601
|
+
variables: i ? [...T.value.variables, e] : T.value.variables
|
|
602
|
+
}), E.value = e.key, D.value = t, i && g("variable-add", e), K(t), e;
|
|
678
603
|
}
|
|
679
|
-
function
|
|
680
|
-
let { width: t, height: n, ...r } = e, i =
|
|
604
|
+
function oa(e) {
|
|
605
|
+
let { width: t, height: n, ...r } = e, i = ke(t), a = ke(n);
|
|
681
606
|
return {
|
|
682
607
|
...r,
|
|
683
608
|
...i === void 0 ? {} : { width: i },
|
|
684
609
|
...a === void 0 ? {} : { height: a }
|
|
685
610
|
};
|
|
686
611
|
}
|
|
687
|
-
function
|
|
688
|
-
let t =
|
|
612
|
+
function sa(e = {}) {
|
|
613
|
+
let t = ke(Kn.value), n = ke(qn.value);
|
|
689
614
|
return {
|
|
690
615
|
...e,
|
|
691
616
|
...t === void 0 ? {} : { width: t },
|
|
692
617
|
...n === void 0 ? {} : { height: n }
|
|
693
618
|
};
|
|
694
619
|
}
|
|
695
|
-
function
|
|
696
|
-
|
|
620
|
+
function ca() {
|
|
621
|
+
Gn.value = "", Kn.value = void 0, qn.value = void 0, Jn.value = "";
|
|
697
622
|
}
|
|
698
|
-
function
|
|
699
|
-
let r =
|
|
623
|
+
function la(e, t = W.value?.id ?? T.value.pages[0]?.id, n) {
|
|
624
|
+
let r = oa({
|
|
700
625
|
...e,
|
|
701
626
|
src: e.src.trim()
|
|
702
627
|
});
|
|
703
|
-
if (!(
|
|
628
|
+
if (!(U.value || !t || !Ee(r.src) || !r.src || !A.get(t)?.insertContentImage(r, n))) return D.value = t, E.value = "", r.src;
|
|
704
629
|
}
|
|
705
|
-
function
|
|
630
|
+
function ua(e) {
|
|
706
631
|
return e instanceof Error ? e : /* @__PURE__ */ Error("图片处理失败");
|
|
707
632
|
}
|
|
708
|
-
async function
|
|
709
|
-
t === "toolbar" && (
|
|
633
|
+
async function da(e, t) {
|
|
634
|
+
t === "toolbar" && (Yn.value = !0, Jn.value = "");
|
|
710
635
|
try {
|
|
711
|
-
let n = await
|
|
636
|
+
let n = await Ae(e, {
|
|
712
637
|
source: t,
|
|
713
638
|
compression: l.imageCompression,
|
|
714
639
|
upload: l.imageUpload
|
|
715
640
|
});
|
|
716
|
-
return
|
|
641
|
+
return pr ? void 0 : n.src;
|
|
717
642
|
} catch (e) {
|
|
718
|
-
let n =
|
|
719
|
-
t === "toolbar" && (
|
|
643
|
+
let n = ua(e);
|
|
644
|
+
t === "toolbar" && (Jn.value = n.message), V.value = n.message, g("image-error", n, t);
|
|
720
645
|
return;
|
|
721
646
|
} finally {
|
|
722
|
-
t === "toolbar" && (
|
|
647
|
+
t === "toolbar" && (Yn.value = !1);
|
|
723
648
|
}
|
|
724
649
|
}
|
|
725
|
-
let
|
|
726
|
-
function
|
|
650
|
+
let fa = 0;
|
|
651
|
+
function pa(e) {
|
|
727
652
|
let t = e.replacedFontFamilies.filter(Boolean);
|
|
728
653
|
if (!t.length) return;
|
|
729
654
|
let n = Date.now();
|
|
730
|
-
n -
|
|
655
|
+
n - fa < 800 || (fa = n, Lt.info(`已将 ${t.length} 种外部字体(${t.join("、")})统一为合同标准字体,以保证 Mac 与 Windows 排版一致`));
|
|
731
656
|
}
|
|
732
|
-
async function
|
|
733
|
-
return await
|
|
657
|
+
async function ma(e) {
|
|
658
|
+
return await da(e, "paste") ?? null;
|
|
734
659
|
}
|
|
735
|
-
async function
|
|
736
|
-
if (
|
|
737
|
-
let n =
|
|
738
|
-
if (
|
|
739
|
-
if (!i || !
|
|
740
|
-
typeof e == "string" && (
|
|
660
|
+
async function ha(e, t = {}) {
|
|
661
|
+
if (U.value) return;
|
|
662
|
+
let n = W.value?.id ?? T.value.pages[0]?.id, r = n ? A.get(n)?.getSelectionRange() : void 0, i = typeof e == "string" ? e.trim() : await da(e, "toolbar");
|
|
663
|
+
if (pr) return;
|
|
664
|
+
if (!i || !Ee(i)) {
|
|
665
|
+
typeof e == "string" && (Jn.value = "请输入安全的图片 URL");
|
|
741
666
|
return;
|
|
742
667
|
}
|
|
743
|
-
if (n && !
|
|
744
|
-
let a =
|
|
668
|
+
if (n && !A.has(n)) return;
|
|
669
|
+
let a = la({
|
|
745
670
|
...t,
|
|
746
671
|
src: i
|
|
747
672
|
}, n, r);
|
|
748
|
-
return a && (
|
|
673
|
+
return a && (Vn.value = !1, ca(), V.value = "已插入图片"), a;
|
|
749
674
|
}
|
|
750
|
-
function
|
|
751
|
-
|
|
675
|
+
function ga() {
|
|
676
|
+
U.value || Yn.value || ($(), Jn.value = "", fn.value && (fn.value.value = ""), fn.value?.click());
|
|
752
677
|
}
|
|
753
|
-
async function
|
|
678
|
+
async function _a(e) {
|
|
754
679
|
let t = e.target.files?.[0];
|
|
755
|
-
t && await
|
|
680
|
+
t && await ha(t, sa({ alt: t.name }));
|
|
756
681
|
}
|
|
757
|
-
async function
|
|
758
|
-
let e =
|
|
759
|
-
await
|
|
682
|
+
async function va() {
|
|
683
|
+
let e = Gn.value;
|
|
684
|
+
await ha(e, sa());
|
|
760
685
|
}
|
|
761
|
-
function
|
|
762
|
-
|
|
686
|
+
function ya(e) {
|
|
687
|
+
Ra(e), Bn.value = !1;
|
|
763
688
|
}
|
|
764
|
-
function
|
|
765
|
-
$(),
|
|
689
|
+
function ba() {
|
|
690
|
+
$(), $i();
|
|
766
691
|
}
|
|
767
|
-
function
|
|
768
|
-
$(),
|
|
692
|
+
function xa(e, t, n, r) {
|
|
693
|
+
$(), aa(ia({ type: t }), e, {
|
|
769
694
|
left: n,
|
|
770
695
|
top: r
|
|
771
696
|
});
|
|
772
697
|
}
|
|
773
|
-
function
|
|
774
|
-
$(),
|
|
698
|
+
function Sa(e) {
|
|
699
|
+
$(), E.value = e;
|
|
775
700
|
}
|
|
776
|
-
function
|
|
777
|
-
let t =
|
|
701
|
+
function Ca(e) {
|
|
702
|
+
let t = T.value.variables.find((t) => t.id === e.id);
|
|
778
703
|
if (!t) return;
|
|
779
704
|
let n = e.key.trim();
|
|
780
705
|
if (n !== t.key) {
|
|
781
|
-
let t =
|
|
706
|
+
let t = we(n, T.value.variables, e.id);
|
|
782
707
|
if (t) {
|
|
783
|
-
|
|
708
|
+
V.value = t;
|
|
784
709
|
return;
|
|
785
710
|
}
|
|
786
711
|
}
|
|
@@ -788,8 +713,8 @@ var Kt = {
|
|
|
788
713
|
...e,
|
|
789
714
|
key: n
|
|
790
715
|
};
|
|
791
|
-
let r = [...
|
|
792
|
-
|
|
716
|
+
let r = [...T.value.pages], i = t.key, a = "";
|
|
717
|
+
A.forEach((t, n) => {
|
|
793
718
|
let o = t.updateVariable(e, i);
|
|
794
719
|
if (o) {
|
|
795
720
|
a ||= n;
|
|
@@ -797,14 +722,14 @@ var Kt = {
|
|
|
797
722
|
e >= 0 && (r[e] = o);
|
|
798
723
|
}
|
|
799
724
|
}), X({
|
|
800
|
-
...
|
|
725
|
+
...T.value,
|
|
801
726
|
pages: r,
|
|
802
|
-
variables:
|
|
803
|
-
...i !== e.key &&
|
|
804
|
-
}),
|
|
727
|
+
variables: T.value.variables.map((t) => t.id === e.id ? e : t),
|
|
728
|
+
...i !== e.key && T.value.pageDecorations ? { pageDecorations: ne(T.value.pageDecorations, i, e.key) } : {}
|
|
729
|
+
}), E.value = e.key, K(a || D.value);
|
|
805
730
|
}
|
|
806
|
-
function
|
|
807
|
-
G.value &&
|
|
731
|
+
function Q(e) {
|
|
732
|
+
G.value && Ca({
|
|
808
733
|
...G.value,
|
|
809
734
|
...e,
|
|
810
735
|
style: {
|
|
@@ -813,368 +738,338 @@ var Kt = {
|
|
|
813
738
|
}
|
|
814
739
|
});
|
|
815
740
|
}
|
|
816
|
-
function
|
|
817
|
-
|
|
741
|
+
function wa(e) {
|
|
742
|
+
U.value || !G.value || Q({ key: e });
|
|
818
743
|
}
|
|
819
|
-
function
|
|
820
|
-
|
|
821
|
-
...
|
|
744
|
+
function Ta(e) {
|
|
745
|
+
U.value || (X({
|
|
746
|
+
...T.value,
|
|
822
747
|
pageDecorations: o(e)
|
|
823
|
-
}),
|
|
748
|
+
}), K(T.value.pages[0]?.id));
|
|
824
749
|
}
|
|
825
|
-
function
|
|
826
|
-
(e === "left" || e === "center" || e === "right") &&
|
|
750
|
+
function Ea(e) {
|
|
751
|
+
(e === "left" || e === "center" || e === "right") && Q({ style: { textAlign: e } });
|
|
827
752
|
}
|
|
828
|
-
function
|
|
829
|
-
(e === "solid" || e === "dashed") &&
|
|
753
|
+
function Da(e) {
|
|
754
|
+
(e === "solid" || e === "dashed") && Q({ style: { borderStyle: e } });
|
|
830
755
|
}
|
|
831
|
-
function
|
|
832
|
-
(e === "contain" || e === "cover" || e === "fill") &&
|
|
756
|
+
function Oa(e) {
|
|
757
|
+
(e === "contain" || e === "cover" || e === "fill") && Q({ style: { objectFit: e } });
|
|
833
758
|
}
|
|
834
|
-
function
|
|
835
|
-
|
|
759
|
+
function ka(e) {
|
|
760
|
+
Q({ style: e });
|
|
836
761
|
}
|
|
837
|
-
function
|
|
838
|
-
|
|
762
|
+
function Aa(e) {
|
|
763
|
+
ka({ fontFamily: String(e || "").trim() || t });
|
|
839
764
|
}
|
|
840
|
-
function
|
|
841
|
-
|
|
765
|
+
function ja(e) {
|
|
766
|
+
ka({ fontSize: Ai(e, G.value?.style?.fontSize ?? 14) });
|
|
842
767
|
}
|
|
843
|
-
function
|
|
844
|
-
G.value &&
|
|
768
|
+
function Ma(e) {
|
|
769
|
+
G.value && Q({
|
|
845
770
|
multiline: e,
|
|
846
771
|
rows: G.value.rows || 3,
|
|
847
772
|
lineHeight: G.value.lineHeight || 28,
|
|
848
773
|
style: e ? { underline: !0 } : void 0
|
|
849
774
|
});
|
|
850
775
|
}
|
|
851
|
-
function
|
|
852
|
-
G.value &&
|
|
776
|
+
function Na(e) {
|
|
777
|
+
G.value && Q({
|
|
853
778
|
rows: Number(e || 3),
|
|
854
779
|
lineHeight: G.value.lineHeight || 28
|
|
855
780
|
});
|
|
856
781
|
}
|
|
857
|
-
function
|
|
858
|
-
if (
|
|
859
|
-
let t = [...
|
|
860
|
-
|
|
782
|
+
function Pa(e) {
|
|
783
|
+
if (U.value) return;
|
|
784
|
+
let t = [...T.value.pages];
|
|
785
|
+
A.forEach((n, r) => {
|
|
861
786
|
let i = n.removeVariable(e.key);
|
|
862
787
|
if (i) {
|
|
863
788
|
let e = t.findIndex((e) => e.id === r);
|
|
864
789
|
e >= 0 && (t[e] = i);
|
|
865
790
|
}
|
|
866
791
|
}), X({
|
|
867
|
-
...
|
|
792
|
+
...T.value,
|
|
868
793
|
pages: t,
|
|
869
|
-
variables:
|
|
870
|
-
...
|
|
871
|
-
}),
|
|
794
|
+
variables: T.value.variables.filter((t) => t.id !== e.id),
|
|
795
|
+
...T.value.pageDecorations ? { pageDecorations: ne(T.value.pageDecorations, e.key) } : {}
|
|
796
|
+
}), E.value = "";
|
|
872
797
|
}
|
|
873
|
-
function
|
|
874
|
-
let t = (e.trim() || "variable").replace(/\s+/g, "_"), n = new Set(
|
|
798
|
+
function Fa(e) {
|
|
799
|
+
let t = (e.trim() || "variable").replace(/\s+/g, "_"), n = new Set(T.value.variables.map((e) => e.key));
|
|
875
800
|
if (!n.has(t)) return t;
|
|
876
801
|
let r = 2;
|
|
877
802
|
for (; n.has(`${t}_${r}`);) r += 1;
|
|
878
803
|
return `${t}_${r}`;
|
|
879
804
|
}
|
|
880
|
-
function
|
|
881
|
-
|
|
805
|
+
function Ia(e) {
|
|
806
|
+
U.value || aa(he({
|
|
882
807
|
...e,
|
|
883
808
|
id: void 0,
|
|
884
|
-
key:
|
|
809
|
+
key: Fa(`${e.key || e.type}_copy`),
|
|
885
810
|
label: `${e.label}副本`,
|
|
886
811
|
style: { ...e.style }
|
|
887
|
-
},
|
|
812
|
+
}, ii.value, l.defaultVariableStyle));
|
|
888
813
|
}
|
|
889
|
-
function
|
|
890
|
-
return
|
|
814
|
+
function La(e) {
|
|
815
|
+
return U.value ? void 0 : aa(T.value.variables.find((t) => t.key === e.key) ?? he(e, ii.value, l.defaultVariableStyle));
|
|
891
816
|
}
|
|
892
|
-
function
|
|
893
|
-
if (!
|
|
817
|
+
function Ra(e) {
|
|
818
|
+
if (!U.value) return aa(ia({ type: e }));
|
|
894
819
|
}
|
|
895
|
-
function
|
|
896
|
-
if (
|
|
897
|
-
let t =
|
|
820
|
+
function za(e) {
|
|
821
|
+
if (U.value || !re(e)) return;
|
|
822
|
+
let t = L.value, n = ii.value.find((t) => t.type === e);
|
|
898
823
|
if (!t || !n) return;
|
|
899
|
-
let r =
|
|
900
|
-
|
|
824
|
+
let r = Pe(t.leadingText) || n.label, i = Fe(t.selectionWidth, Zt, vi.value), a = Ba();
|
|
825
|
+
aa(ia({
|
|
901
826
|
type: e,
|
|
902
827
|
label: r,
|
|
903
828
|
...i ? { width: i } : {},
|
|
904
829
|
...a ? { style: a } : {}
|
|
905
|
-
}), t.pageId),
|
|
830
|
+
}), t.pageId), V.value = t.hasSelection ? `已将选中内容替换为${n.label}控件` : `已插入${n.label}控件`, $();
|
|
906
831
|
}
|
|
907
|
-
function
|
|
908
|
-
let e =
|
|
832
|
+
function Ba() {
|
|
833
|
+
let e = q.value, t = {};
|
|
909
834
|
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;
|
|
910
835
|
}
|
|
911
|
-
function
|
|
912
|
-
if (
|
|
913
|
-
let t =
|
|
914
|
-
t && (
|
|
836
|
+
function Va(e) {
|
|
837
|
+
if (U.value) return;
|
|
838
|
+
let t = L.value;
|
|
839
|
+
t && (aa(e, t.pageId), V.value = `已绑定到${e.label},沿用原控件尺寸`, $());
|
|
915
840
|
}
|
|
916
|
-
function
|
|
917
|
-
return
|
|
841
|
+
function Ha(e) {
|
|
842
|
+
return _e(e.type && re(e.type) ? e.type : "text", ii.value).label;
|
|
918
843
|
}
|
|
919
|
-
function
|
|
920
|
-
|
|
921
|
-
|
|
844
|
+
function Ua() {
|
|
845
|
+
T.value.variables.length && (nr.value = !0, _(() => {
|
|
846
|
+
ns(), Xn.value?.focusBindSearch();
|
|
922
847
|
}));
|
|
923
848
|
}
|
|
924
|
-
function
|
|
849
|
+
function Wa(e, t) {
|
|
925
850
|
e.dataTransfer?.setData("application/x-gd-contract-variable", t), e.dataTransfer && (e.dataTransfer.effectAllowed = "copy");
|
|
926
851
|
}
|
|
927
|
-
function
|
|
928
|
-
return
|
|
852
|
+
function Ga(e) {
|
|
853
|
+
return j.value = Math.round(Math.min(Kt, Math.max(Gt, Number.isFinite(e) ? e : 1)) * 100) / 100, j.value;
|
|
929
854
|
}
|
|
930
|
-
let { width:
|
|
931
|
-
viewportWidth:
|
|
932
|
-
widestPageWidth: f(() => Math.max(...
|
|
855
|
+
let { width: Ka } = Rt(an), { fitWidth: qa, applyAutoFit: Ja, markUserAdjusted: Ya, userAdjusted: Xa } = Oe({
|
|
856
|
+
viewportWidth: Ka,
|
|
857
|
+
widestPageWidth: f(() => Math.max(...T.value.pages.map((e) => Xi(e).width), ce.width) + 10),
|
|
933
858
|
padding: 48,
|
|
934
|
-
minZoom:
|
|
935
|
-
maxZoom:
|
|
936
|
-
getZoom: () =>
|
|
937
|
-
applyZoom:
|
|
859
|
+
minZoom: Gt,
|
|
860
|
+
maxZoom: Kt,
|
|
861
|
+
getZoom: () => j.value,
|
|
862
|
+
applyZoom: Ga
|
|
863
|
+
});
|
|
864
|
+
function Za(e) {
|
|
865
|
+
return Ya(), Ga(e);
|
|
866
|
+
}
|
|
867
|
+
function Qa() {
|
|
868
|
+
return Ja();
|
|
869
|
+
}
|
|
870
|
+
function $a() {
|
|
871
|
+
return j.value;
|
|
872
|
+
}
|
|
873
|
+
function eo() {
|
|
874
|
+
Za(j.value + qt);
|
|
875
|
+
}
|
|
876
|
+
function to() {
|
|
877
|
+
Za(j.value - qt);
|
|
878
|
+
}
|
|
879
|
+
function no() {
|
|
880
|
+
$(), ls(), M.value = !M.value;
|
|
881
|
+
}
|
|
882
|
+
x(Ka, (e) => {
|
|
883
|
+
Pn.value && !Xa.value && e > 0 && qa();
|
|
938
884
|
});
|
|
939
885
|
function ro(e) {
|
|
940
|
-
|
|
886
|
+
N.value ? dn.value?.focus() : e();
|
|
941
887
|
}
|
|
942
888
|
function io() {
|
|
943
|
-
|
|
889
|
+
$(), ls(), P.value = !1, fr = {
|
|
890
|
+
fullscreen: M.value,
|
|
891
|
+
sidebar: Mn.value,
|
|
892
|
+
inspector: Nn.value,
|
|
893
|
+
chrome: N.value,
|
|
894
|
+
zoom: j.value,
|
|
895
|
+
userAdjusted: Xa.value
|
|
896
|
+
}, M.value = !0, Mn.value = !0, Nn.value = !0, N.value = !0, Pn.value = !0, _(() => {
|
|
897
|
+
U.value ? Fn.value?.focus() : A.get(D.value)?.focus();
|
|
898
|
+
});
|
|
944
899
|
}
|
|
945
900
|
function ao() {
|
|
946
|
-
|
|
901
|
+
let e = fr;
|
|
902
|
+
Pn.value = !1, fr = void 0, e && (M.value = e.fullscreen, Mn.value = e.sidebar, Nn.value = e.inspector, N.value = e.chrome, e.userAdjusted ? Za(e.zoom) : Ja(), _(() => ro(() => sn.value?.focusImmersive())));
|
|
947
903
|
}
|
|
948
904
|
function oo() {
|
|
949
|
-
|
|
905
|
+
Pn.value ? ao() : io();
|
|
950
906
|
}
|
|
951
907
|
function so() {
|
|
952
|
-
|
|
908
|
+
$(), R.value = void 0;
|
|
909
|
+
let e = J(!1);
|
|
910
|
+
S.value ? (En.value = u(C.value), Tn.value = void 0, Dn.value = w.value || C.value[0]?.id || "") : (Tn.value = c(e), En.value = void 0, Dn.value = ""), wn.value = !0;
|
|
953
911
|
}
|
|
954
912
|
function co() {
|
|
955
|
-
|
|
913
|
+
wn.value = !1, Tn.value = void 0, En.value = void 0, Dn.value = "";
|
|
956
914
|
}
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
});
|
|
960
|
-
function lo(e) {
|
|
961
|
-
Hn.value ? gn.value?.focus() : e();
|
|
915
|
+
function lo() {
|
|
916
|
+
return zo();
|
|
962
917
|
}
|
|
963
918
|
function uo() {
|
|
964
|
-
$()
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
inspector: Vn.value,
|
|
968
|
-
chrome: Hn.value,
|
|
969
|
-
zoom: N.value,
|
|
970
|
-
userAdjusted: no.value
|
|
971
|
-
}, P.value = !0, Bn.value = !0, Vn.value = !0, Hn.value = !0, Un.value = !0, g(() => {
|
|
972
|
-
W.value ? Wn.value?.focus() : M.get(k.value)?.focus();
|
|
973
|
-
});
|
|
919
|
+
$();
|
|
920
|
+
let e = lo();
|
|
921
|
+
return kn.value = JSON.stringify(e, null, 2), On.value = !0, e;
|
|
974
922
|
}
|
|
975
923
|
function fo() {
|
|
976
|
-
|
|
977
|
-
Un.value = !1, vr = void 0, e && (P.value = e.fullscreen, Bn.value = e.sidebar, Vn.value = e.inspector, Hn.value = e.chrome, e.userAdjusted ? ro(e.zoom) : eo(), g(() => lo(() => fn.value?.focusImmersive())));
|
|
924
|
+
On.value = !1;
|
|
978
925
|
}
|
|
979
926
|
function po() {
|
|
980
|
-
|
|
927
|
+
return De(J(!1));
|
|
981
928
|
}
|
|
982
929
|
function mo() {
|
|
983
|
-
$()
|
|
984
|
-
let e =
|
|
985
|
-
|
|
930
|
+
$();
|
|
931
|
+
let e = po();
|
|
932
|
+
return jn.value = e, An.value = !0, e;
|
|
986
933
|
}
|
|
987
934
|
function ho() {
|
|
988
|
-
|
|
935
|
+
An.value = !1;
|
|
989
936
|
}
|
|
990
937
|
function go() {
|
|
991
|
-
|
|
992
|
-
}
|
|
993
|
-
function _o() {
|
|
994
|
-
$();
|
|
995
|
-
let e = go();
|
|
996
|
-
return Ln.value = JSON.stringify(e, null, 2), In.value = !0, e;
|
|
997
|
-
}
|
|
998
|
-
function vo() {
|
|
999
|
-
In.value = !1;
|
|
1000
|
-
}
|
|
1001
|
-
function yo() {
|
|
1002
|
-
return Fe(Y(!1));
|
|
1003
|
-
}
|
|
1004
|
-
function bo() {
|
|
1005
|
-
$();
|
|
1006
|
-
let e = yo();
|
|
1007
|
-
return zn.value = e, Rn.value = !0, e;
|
|
1008
|
-
}
|
|
1009
|
-
function xo() {
|
|
1010
|
-
Rn.value = !1;
|
|
1011
|
-
}
|
|
1012
|
-
function So() {
|
|
1013
|
-
$(), z.value = void 0, I.value = !1, L.value = !1;
|
|
1014
|
-
let e = K.value.map(pt);
|
|
1015
|
-
T.value = [], w.value = {
|
|
1016
|
-
...w.value,
|
|
1017
|
-
[C.value]: []
|
|
1018
|
-
};
|
|
1019
|
-
let t = !!O.value;
|
|
1020
|
-
D.value = "", O.value = "", k.value = "", Mn.value = !1, Nn.value = void 0, Pn.value = void 0, In.value = !1, Ln.value = "", Rn.value = !1, zn.value = {
|
|
938
|
+
$(), R.value = void 0, F.value = !1, I.value = !1, E.value = "", D.value = "", wn.value = !1, Tn.value = void 0, En.value = void 0, On.value = !1, kn.value = "", An.value = !1, jn.value = {
|
|
1021
939
|
values: {},
|
|
1022
940
|
variables: []
|
|
1023
|
-
},
|
|
1024
|
-
let
|
|
1025
|
-
return
|
|
941
|
+
}, Rn.value = {}, Cn.value = "";
|
|
942
|
+
let e = X(pe(ce));
|
|
943
|
+
return D.value = e.pages[0]?.id ?? "", c(e);
|
|
1026
944
|
}
|
|
1027
|
-
function
|
|
1028
|
-
|
|
945
|
+
function _o() {
|
|
946
|
+
U.value || ($(), Ft.confirm({
|
|
1029
947
|
title: "清空合同内容",
|
|
1030
|
-
content: "
|
|
948
|
+
content: "将清空全部合同正文、页面和模板变量,仅保留一个空白 A4 合同页。此操作不可撤销。",
|
|
1031
949
|
okText: "确认清空",
|
|
1032
950
|
okType: "danger",
|
|
1033
951
|
cancelText: "取消",
|
|
1034
952
|
onOk: () => {
|
|
1035
|
-
|
|
953
|
+
go();
|
|
1036
954
|
}
|
|
1037
955
|
}));
|
|
1038
956
|
}
|
|
1039
|
-
function
|
|
1040
|
-
let t =
|
|
957
|
+
function vo(e) {
|
|
958
|
+
let t = Mi().pages, n = t.find((e) => e.id === D.value);
|
|
1041
959
|
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}'`));
|
|
1042
960
|
}
|
|
1043
|
-
function
|
|
1044
|
-
$(),
|
|
1045
|
-
let t =
|
|
1046
|
-
t && (
|
|
1047
|
-
|
|
961
|
+
function yo(e) {
|
|
962
|
+
$(), E.value = e.key;
|
|
963
|
+
let t = vo(e);
|
|
964
|
+
t && (D.value = t.id, _(() => {
|
|
965
|
+
A.get(t.id)?.scrollIntoVariable(e.key);
|
|
1048
966
|
}));
|
|
1049
967
|
}
|
|
1050
|
-
function
|
|
1051
|
-
let t =
|
|
1052
|
-
t &&
|
|
968
|
+
function bo(e) {
|
|
969
|
+
let t = T.value.variables.find((t) => t.key === e || t.id === e);
|
|
970
|
+
t && yo(t);
|
|
1053
971
|
}
|
|
1054
|
-
function
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
M.get(t.pageId)?.scrollIntoSigningPlacement(t.id);
|
|
1058
|
-
}));
|
|
1059
|
-
}
|
|
1060
|
-
function Oo(e, t = !0) {
|
|
1061
|
-
$(), k.value = e, t && g(() => {
|
|
1062
|
-
M.get(e)?.scrollIntoPage();
|
|
972
|
+
function xo(e, t = !0) {
|
|
973
|
+
$(), D.value = e, t && _(() => {
|
|
974
|
+
A.get(e)?.scrollIntoPage();
|
|
1063
975
|
});
|
|
1064
976
|
}
|
|
1065
|
-
function
|
|
1066
|
-
|
|
977
|
+
function So(e) {
|
|
978
|
+
xo(e.pageId, !1), A.get(e.pageId)?.focusHeading(e.headingIndex);
|
|
979
|
+
}
|
|
980
|
+
function Co(e) {
|
|
981
|
+
T.value.pages.some((t) => t.id === e) && xo(e);
|
|
1067
982
|
}
|
|
1068
|
-
function
|
|
1069
|
-
if (
|
|
1070
|
-
|
|
983
|
+
function wo() {
|
|
984
|
+
if (P.value) {
|
|
985
|
+
To();
|
|
1071
986
|
return;
|
|
1072
987
|
}
|
|
1073
|
-
|
|
988
|
+
P.value = !0;
|
|
1074
989
|
}
|
|
1075
|
-
function
|
|
1076
|
-
|
|
990
|
+
function To() {
|
|
991
|
+
P.value = !1, _(() => ro(() => sn.value?.focusPageDecorations()));
|
|
1077
992
|
}
|
|
1078
|
-
function
|
|
1079
|
-
return
|
|
993
|
+
function Eo() {
|
|
994
|
+
return Pi(), c(Mi());
|
|
1080
995
|
}
|
|
1081
|
-
function
|
|
1082
|
-
|
|
1083
|
-
...w.value,
|
|
1084
|
-
[C.value]: T.value
|
|
1085
|
-
};
|
|
1086
|
-
let t = X(ke(e, l.pageSize));
|
|
1087
|
-
t.signingPlacements?.some((e) => e.id === O.value) || Q(), J(t.pages[0]?.id);
|
|
996
|
+
function Do(e) {
|
|
997
|
+
K(X(xe(e, l.pageSize)).pages[0]?.id);
|
|
1088
998
|
}
|
|
1089
|
-
function
|
|
1090
|
-
let e =
|
|
1091
|
-
return
|
|
999
|
+
function Oo() {
|
|
1000
|
+
let e = J(!1);
|
|
1001
|
+
return S.value ? u(C.value) : u(lt(C.value, w.value, e));
|
|
1092
1002
|
}
|
|
1093
|
-
function
|
|
1094
|
-
let n =
|
|
1095
|
-
|
|
1003
|
+
function ko(e, t) {
|
|
1004
|
+
let n = nt(ot(e, void 0, l.pageSize), l.pageSizeOptions), r = C.value;
|
|
1005
|
+
gn.value = !0, J(!1), C.value = n.files, Ri(ut(C.value, t ?? w.value), {
|
|
1096
1006
|
syncCurrent: !1,
|
|
1097
1007
|
shouldEmit: !0,
|
|
1098
|
-
forceRefresh: !0
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
return S.value = [...S.value, t], w.value = {
|
|
1107
|
-
...w.value,
|
|
1108
|
-
[t.id]: []
|
|
1109
|
-
}, Bi(S.value, ""), h("file-add", u([t])[0]), Vi(t.id, {
|
|
1008
|
+
forceRefresh: !0
|
|
1009
|
+
}), d(r) !== d(C.value) && Y(C.value, "");
|
|
1010
|
+
}
|
|
1011
|
+
function Ao(e) {
|
|
1012
|
+
if (U.value) return;
|
|
1013
|
+
gn.value = !0, J(!0);
|
|
1014
|
+
let t = rt(e || `合同文件 ${C.value.length + 1}`, l.pageSize);
|
|
1015
|
+
return C.value = [...C.value, t], Y(C.value, ""), g("file-add", u([t])[0]), Ri(t.id, {
|
|
1110
1016
|
syncCurrent: !1,
|
|
1111
1017
|
shouldEmit: !0,
|
|
1112
1018
|
forceRefresh: !0
|
|
1113
1019
|
}), u([t])[0];
|
|
1114
1020
|
}
|
|
1115
|
-
function
|
|
1116
|
-
!
|
|
1117
|
-
}
|
|
1118
|
-
function
|
|
1119
|
-
if (
|
|
1120
|
-
|
|
1121
|
-
let n =
|
|
1122
|
-
if (r) return
|
|
1123
|
-
}
|
|
1124
|
-
function
|
|
1125
|
-
if (
|
|
1126
|
-
|
|
1127
|
-
let t =
|
|
1021
|
+
function jo(e) {
|
|
1022
|
+
!S.value && !C.value.some((t) => t.id === e) || (gn.value = !0, Ri(e));
|
|
1023
|
+
}
|
|
1024
|
+
function Mo(e, t) {
|
|
1025
|
+
if (U.value) return;
|
|
1026
|
+
gn.value = !0, J(!1);
|
|
1027
|
+
let n = ct(C.value, e, t), r = n.find((t) => t.id === e);
|
|
1028
|
+
if (r) return C.value = n, Y(n, e), u([r])[0];
|
|
1029
|
+
}
|
|
1030
|
+
function No(e) {
|
|
1031
|
+
if (U.value || C.value.length <= 1) return;
|
|
1032
|
+
gn.value = !0, J(!1);
|
|
1033
|
+
let t = C.value.find((t) => t.id === e);
|
|
1128
1034
|
if (!t) return;
|
|
1129
|
-
let n =
|
|
1130
|
-
if (n.length
|
|
1131
|
-
S.value = n;
|
|
1132
|
-
let { [e]: r, ...i } = w.value;
|
|
1133
|
-
w.value = i, Bi(n, ""), h("file-remove", u([t])[0]);
|
|
1134
|
-
let a = t.template.signingPlacements ?? [];
|
|
1135
|
-
return a.forEach((e) => h("signing-placement-remove", pt(e))), a.some((e) => e.id === O.value) && h("signing-placement-select", void 0), C.value === e && Vi(dt(n, n[0]?.id), {
|
|
1035
|
+
let n = st(C.value, e);
|
|
1036
|
+
if (n.length !== C.value.length) return C.value = n, Y(n, ""), g("file-remove", u([t])[0]), w.value === e && Ri(ut(n, n[0]?.id), {
|
|
1136
1037
|
syncCurrent: !1,
|
|
1137
1038
|
shouldEmit: !0,
|
|
1138
|
-
forceRefresh: !0
|
|
1139
|
-
persistCurrentErrors: !1
|
|
1039
|
+
forceRefresh: !0
|
|
1140
1040
|
}), u([t])[0];
|
|
1141
1041
|
}
|
|
1142
|
-
function
|
|
1143
|
-
if (
|
|
1144
|
-
let t =
|
|
1145
|
-
|
|
1146
|
-
let n = t.template.signingPlacements?.length ?? 0;
|
|
1147
|
-
Bt.confirm({
|
|
1042
|
+
function Po(e) {
|
|
1043
|
+
if (U.value || C.value.length <= 1) return;
|
|
1044
|
+
let t = C.value.find((t) => t.id === e);
|
|
1045
|
+
t && Ft.confirm({
|
|
1148
1046
|
title: "删除合同文件",
|
|
1149
|
-
content:
|
|
1047
|
+
content: `删除“${t.name}”后,其正文和变量将无法恢复,是否继续?`,
|
|
1150
1048
|
okText: "确认删除",
|
|
1151
1049
|
okType: "danger",
|
|
1152
1050
|
cancelText: "取消",
|
|
1153
1051
|
onOk: () => {
|
|
1154
|
-
|
|
1052
|
+
No(e);
|
|
1155
1053
|
}
|
|
1156
1054
|
});
|
|
1157
1055
|
}
|
|
1158
|
-
function
|
|
1159
|
-
if (
|
|
1160
|
-
|
|
1161
|
-
let n =
|
|
1162
|
-
if (!(!a || n === i)) return
|
|
1163
|
-
}
|
|
1164
|
-
function
|
|
1165
|
-
|
|
1166
|
-
let e =
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
}));
|
|
1172
|
-
}) : [...T.value, ...Ne(Pi(), { maxPages: ei.value })]);
|
|
1173
|
-
return j.value = e, A.value = !0, h("validate", e), e;
|
|
1056
|
+
function Fo(e, t) {
|
|
1057
|
+
if (U.value) return;
|
|
1058
|
+
gn.value = !0, J(!1);
|
|
1059
|
+
let n = C.value.findIndex((t) => t.id === e), r = at(C.value, e, t), i = r.findIndex((t) => t.id === e), a = r[i];
|
|
1060
|
+
if (!(!a || n === i)) return C.value = r, Y(r, ""), g("file-move", u([a])[0], n, i), u([a])[0];
|
|
1061
|
+
}
|
|
1062
|
+
function Io() {
|
|
1063
|
+
J(!1);
|
|
1064
|
+
let e = Vo(S.value ? C.value.flatMap((e) => Te(e.template, { maxPages: si.value }).map((t) => ({
|
|
1065
|
+
...t,
|
|
1066
|
+
fileId: e.id
|
|
1067
|
+
}))) : Te(Mi(), { maxPages: si.value }));
|
|
1068
|
+
return k.value = e, O.value = !0, g("validate", e), e;
|
|
1174
1069
|
}
|
|
1175
|
-
function
|
|
1176
|
-
if (e.fileId && e.fileId !==
|
|
1177
|
-
|
|
1070
|
+
function Lo(e) {
|
|
1071
|
+
if (e.fileId && e.fileId !== w.value) {
|
|
1072
|
+
jo(e.fileId), _(() => Lo({
|
|
1178
1073
|
...e,
|
|
1179
1074
|
fileId: void 0
|
|
1180
1075
|
}));
|
|
@@ -1182,93 +1077,70 @@ var Kt = {
|
|
|
1182
1077
|
}
|
|
1183
1078
|
let t = te(e);
|
|
1184
1079
|
if (t) {
|
|
1185
|
-
|
|
1080
|
+
P.value = !0, _(() => cn.value?.focusField(t));
|
|
1186
1081
|
return;
|
|
1187
1082
|
}
|
|
1188
|
-
if (e.type === "signing-placement") {
|
|
1189
|
-
let t = K.value.find((t) => t.id === e.id);
|
|
1190
|
-
if (t) {
|
|
1191
|
-
Oo(t.pageId), Q(t.id);
|
|
1192
|
-
return;
|
|
1193
|
-
}
|
|
1194
|
-
}
|
|
1195
1083
|
if (e.variableKey) {
|
|
1196
|
-
|
|
1084
|
+
bo(e.variableKey);
|
|
1197
1085
|
return;
|
|
1198
1086
|
}
|
|
1199
1087
|
if (e.pageId) {
|
|
1200
|
-
|
|
1088
|
+
Co(e.pageId);
|
|
1201
1089
|
return;
|
|
1202
1090
|
}
|
|
1203
|
-
let n =
|
|
1091
|
+
let n = T.value.variables.find((t) => t.id === e.id || t.key === e.id);
|
|
1204
1092
|
if (n) {
|
|
1205
|
-
|
|
1093
|
+
yo(n);
|
|
1206
1094
|
return;
|
|
1207
1095
|
}
|
|
1208
|
-
|
|
1209
|
-
}
|
|
1210
|
-
function Wo(e) {
|
|
1211
|
-
return te(e) ? "页面装饰" : e.type === "signing-placement" ? "签署位置" : e.type === "variable" ? "变量" : "字段";
|
|
1096
|
+
T.value.pages.some((t) => t.id === e.id) && xo(e.id);
|
|
1212
1097
|
}
|
|
1213
|
-
function
|
|
1214
|
-
return
|
|
1098
|
+
function Ro(e) {
|
|
1099
|
+
return te(e) ? "页面装饰" : e.type === "variable" ? "变量" : "字段";
|
|
1215
1100
|
}
|
|
1216
|
-
function
|
|
1217
|
-
|
|
1218
|
-
return at(x.value ? S.value : ut(S.value, C.value, e));
|
|
1101
|
+
function zo() {
|
|
1102
|
+
return Pi(), ge(Mi());
|
|
1219
1103
|
}
|
|
1220
|
-
function
|
|
1221
|
-
let
|
|
1222
|
-
|
|
1223
|
-
let n = _e(t, T.value);
|
|
1224
|
-
if (n.length) throw new ie(n);
|
|
1225
|
-
return e(t);
|
|
1226
|
-
} catch (e) {
|
|
1227
|
-
throw e instanceof ie && (j.value = [...e.errors], A.value = !0, h("validate", [...e.errors])), e;
|
|
1228
|
-
}
|
|
1229
|
-
}
|
|
1230
|
-
function Jo(e) {
|
|
1231
|
-
return qo((t) => se(t, e));
|
|
1232
|
-
}
|
|
1233
|
-
function Yo(e) {
|
|
1234
|
-
return qo((t) => oe(t, e));
|
|
1104
|
+
function Bo() {
|
|
1105
|
+
let e = J(!1);
|
|
1106
|
+
return it(S.value ? C.value : lt(C.value, w.value, e));
|
|
1235
1107
|
}
|
|
1236
|
-
function
|
|
1108
|
+
function Vo(e) {
|
|
1237
1109
|
let t = /* @__PURE__ */ new Set();
|
|
1238
1110
|
return e.filter((e) => {
|
|
1239
1111
|
let n = `${e.fileId ?? ""}|${e.code ?? ""}|${e.id}|${e.pageId ?? ""}|${e.message}`;
|
|
1240
1112
|
return t.has(n) ? !1 : (t.add(n), !0);
|
|
1241
1113
|
});
|
|
1242
1114
|
}
|
|
1243
|
-
function
|
|
1244
|
-
|
|
1115
|
+
function Ho(e) {
|
|
1116
|
+
k.value = [...e], O.value = !0;
|
|
1245
1117
|
}
|
|
1246
|
-
function
|
|
1247
|
-
|
|
1118
|
+
function Uo() {
|
|
1119
|
+
k.value = [], O.value = !1;
|
|
1248
1120
|
}
|
|
1249
|
-
function
|
|
1250
|
-
|
|
1121
|
+
function Wo() {
|
|
1122
|
+
A.get(W.value?.id ?? D.value)?.focus();
|
|
1251
1123
|
}
|
|
1252
|
-
function
|
|
1253
|
-
|
|
1124
|
+
function Go(e) {
|
|
1125
|
+
Oi(e) && Z({
|
|
1254
1126
|
type: "set-text-align",
|
|
1255
1127
|
value: e
|
|
1256
1128
|
});
|
|
1257
1129
|
}
|
|
1258
|
-
function
|
|
1259
|
-
(e === "paragraph" ||
|
|
1130
|
+
function Ko(e) {
|
|
1131
|
+
(e === "paragraph" || ki(e)) && Z({
|
|
1260
1132
|
type: "apply-block-style",
|
|
1261
1133
|
format: e
|
|
1262
1134
|
});
|
|
1263
1135
|
}
|
|
1264
|
-
function
|
|
1265
|
-
let t =
|
|
1136
|
+
function qo(e) {
|
|
1137
|
+
let t = ji(e);
|
|
1266
1138
|
t && (Z({
|
|
1267
1139
|
type: "set-font-size",
|
|
1268
1140
|
value: t
|
|
1269
|
-
}),
|
|
1141
|
+
}), zn.value = "");
|
|
1270
1142
|
}
|
|
1271
|
-
function
|
|
1143
|
+
function Jo(e) {
|
|
1272
1144
|
let t = String(e || "").trim();
|
|
1273
1145
|
if (!t) {
|
|
1274
1146
|
Z({ type: "unset-font-family" });
|
|
@@ -1279,241 +1151,241 @@ var Kt = {
|
|
|
1279
1151
|
value: t
|
|
1280
1152
|
});
|
|
1281
1153
|
}
|
|
1282
|
-
function
|
|
1283
|
-
|
|
1154
|
+
function Yo(e) {
|
|
1155
|
+
Xo(e.target?.value ?? "");
|
|
1284
1156
|
}
|
|
1285
|
-
function
|
|
1157
|
+
function Xo(e) {
|
|
1286
1158
|
let t = e.trim();
|
|
1287
1159
|
t && Z({
|
|
1288
1160
|
type: "set-color",
|
|
1289
1161
|
value: t
|
|
1290
1162
|
});
|
|
1291
1163
|
}
|
|
1292
|
-
function
|
|
1293
|
-
|
|
1164
|
+
function Zo(e) {
|
|
1165
|
+
zn.value = e;
|
|
1294
1166
|
}
|
|
1295
|
-
function
|
|
1296
|
-
|
|
1167
|
+
function Qo() {
|
|
1168
|
+
zn.value.trim() && qo(zn.value);
|
|
1297
1169
|
}
|
|
1298
|
-
function
|
|
1299
|
-
e.key === "Enter" && (e.preventDefault(),
|
|
1170
|
+
function $o(e) {
|
|
1171
|
+
e.key === "Enter" && (e.preventDefault(), Qo());
|
|
1300
1172
|
}
|
|
1301
|
-
function
|
|
1302
|
-
e || (
|
|
1173
|
+
function es(e) {
|
|
1174
|
+
e || (Qo(), zn.value = "");
|
|
1303
1175
|
}
|
|
1304
|
-
function
|
|
1305
|
-
if (
|
|
1306
|
-
|
|
1307
|
-
let t =
|
|
1308
|
-
|
|
1176
|
+
function ts(e) {
|
|
1177
|
+
if (U.value) return;
|
|
1178
|
+
D.value = e.pageId, F.value = !1, I.value = !1, z.value = void 0, B.value = void 0, nr.value = !1, rr.value = "";
|
|
1179
|
+
let t = _t(e.clientX, e.clientY, 304, 300);
|
|
1180
|
+
L.value = {
|
|
1309
1181
|
pageId: e.pageId,
|
|
1310
1182
|
x: t.x,
|
|
1311
1183
|
y: t.y,
|
|
1312
1184
|
hasSelection: e.hasSelection,
|
|
1313
1185
|
selectionWidth: e.selectionWidth,
|
|
1314
1186
|
leadingText: e.leadingText
|
|
1315
|
-
},
|
|
1316
|
-
|
|
1187
|
+
}, _(() => {
|
|
1188
|
+
ns(), Xn.value?.focusFirstButton();
|
|
1317
1189
|
});
|
|
1318
1190
|
}
|
|
1319
|
-
function
|
|
1320
|
-
let e =
|
|
1191
|
+
function ns() {
|
|
1192
|
+
let e = Xn.value?.getMenuElement(), t = L.value;
|
|
1321
1193
|
if (!e || !t) return;
|
|
1322
|
-
let n =
|
|
1323
|
-
|
|
1194
|
+
let n = vt(t.x, t.y, e);
|
|
1195
|
+
L.value = {
|
|
1324
1196
|
...t,
|
|
1325
1197
|
x: n.x,
|
|
1326
1198
|
y: n.y
|
|
1327
1199
|
};
|
|
1328
1200
|
}
|
|
1329
|
-
function
|
|
1330
|
-
if (
|
|
1331
|
-
|
|
1332
|
-
let t =
|
|
1333
|
-
|
|
1201
|
+
function rs(e) {
|
|
1202
|
+
if (U.value) return;
|
|
1203
|
+
D.value = e.pageId, F.value = !1, I.value = !1, L.value = void 0, B.value = void 0;
|
|
1204
|
+
let t = _t(e.clientX, e.clientY, 248, 400);
|
|
1205
|
+
z.value = {
|
|
1334
1206
|
...e,
|
|
1335
1207
|
x: t.x,
|
|
1336
1208
|
y: t.y
|
|
1337
|
-
},
|
|
1338
|
-
let e =
|
|
1209
|
+
}, _(() => {
|
|
1210
|
+
let e = ir.value?.getMenuElement(), t = z.value;
|
|
1339
1211
|
if (e && t) {
|
|
1340
|
-
let n =
|
|
1341
|
-
|
|
1212
|
+
let n = vt(t.x, t.y, e);
|
|
1213
|
+
z.value = {
|
|
1342
1214
|
...t,
|
|
1343
1215
|
x: n.x,
|
|
1344
1216
|
y: n.y
|
|
1345
1217
|
};
|
|
1346
1218
|
}
|
|
1347
|
-
|
|
1219
|
+
ir.value?.focusFirstItem();
|
|
1348
1220
|
});
|
|
1349
1221
|
}
|
|
1350
|
-
function
|
|
1351
|
-
if (
|
|
1352
|
-
|
|
1353
|
-
let t =
|
|
1354
|
-
|
|
1222
|
+
function is(e) {
|
|
1223
|
+
if (U.value) return;
|
|
1224
|
+
D.value = e.pageId, F.value = !1, I.value = !1, L.value = void 0, z.value = void 0, or.value = e.image.width, sr.value = e.image.height, E.value = "";
|
|
1225
|
+
let t = _t(e.clientX, e.clientY, 288, 196);
|
|
1226
|
+
B.value = {
|
|
1355
1227
|
pageId: e.pageId,
|
|
1356
1228
|
image: e.image,
|
|
1357
1229
|
x: t.x,
|
|
1358
1230
|
y: t.y
|
|
1359
|
-
},
|
|
1360
|
-
|
|
1231
|
+
}, _(() => {
|
|
1232
|
+
as(), ar.value?.getMenuElement()?.querySelector("input, button:not(:disabled)")?.focus();
|
|
1361
1233
|
});
|
|
1362
1234
|
}
|
|
1363
|
-
function
|
|
1364
|
-
let e =
|
|
1235
|
+
function as() {
|
|
1236
|
+
let e = ar.value?.getMenuElement(), t = B.value;
|
|
1365
1237
|
if (!e || !t) return;
|
|
1366
|
-
let n =
|
|
1367
|
-
|
|
1238
|
+
let n = vt(t.x, t.y, e);
|
|
1239
|
+
B.value = {
|
|
1368
1240
|
...t,
|
|
1369
1241
|
x: n.x,
|
|
1370
1242
|
y: n.y
|
|
1371
1243
|
};
|
|
1372
1244
|
}
|
|
1373
|
-
function
|
|
1374
|
-
let e =
|
|
1375
|
-
!e ||
|
|
1376
|
-
width:
|
|
1377
|
-
height:
|
|
1378
|
-
}) && (
|
|
1245
|
+
function os() {
|
|
1246
|
+
let e = B.value;
|
|
1247
|
+
!e || U.value || (A.get(e.pageId)?.updateSelectedContentImage({
|
|
1248
|
+
width: ke(or.value),
|
|
1249
|
+
height: ke(sr.value)
|
|
1250
|
+
}) && (V.value = "已更新图片尺寸"), $());
|
|
1379
1251
|
}
|
|
1380
|
-
function
|
|
1381
|
-
let e =
|
|
1382
|
-
!e ||
|
|
1252
|
+
function ss() {
|
|
1253
|
+
let e = B.value;
|
|
1254
|
+
!e || U.value || (A.get(e.pageId)?.updateSelectedContentImage({
|
|
1383
1255
|
width: void 0,
|
|
1384
1256
|
height: void 0
|
|
1385
|
-
}) && (
|
|
1257
|
+
}) && (V.value = "已恢复图片自然尺寸"), $());
|
|
1386
1258
|
}
|
|
1387
|
-
function
|
|
1388
|
-
e.type === "table" ?
|
|
1259
|
+
function cs(e) {
|
|
1260
|
+
e.type === "table" ? rs(e) : e.type === "image" ? is(e) : ts(e);
|
|
1389
1261
|
}
|
|
1390
1262
|
function $() {
|
|
1391
|
-
|
|
1263
|
+
L.value = void 0, z.value = void 0, B.value = void 0, nr.value = !1, rr.value = "";
|
|
1392
1264
|
}
|
|
1393
|
-
function
|
|
1394
|
-
I.value = !1,
|
|
1265
|
+
function ls() {
|
|
1266
|
+
Er(!1), F.value = !1, I.value = !1, Ln.value = !1, Bn.value = !1, Vn.value = !1, Hn.value = !1, Un.value = !1;
|
|
1395
1267
|
}
|
|
1396
|
-
function
|
|
1397
|
-
|
|
1268
|
+
function us() {
|
|
1269
|
+
ls(), N.value = !N.value, _(() => ro(() => sn.value?.focusChromeToggle()));
|
|
1398
1270
|
}
|
|
1399
|
-
let
|
|
1271
|
+
let ds = [
|
|
1400
1272
|
".gd-contract-template-designer__context-menu",
|
|
1401
1273
|
".gd-contract-template-designer__bubble-menu",
|
|
1402
1274
|
".gd-contract-template-designer__bubble-menu-popup"
|
|
1403
1275
|
].join(",");
|
|
1404
|
-
function
|
|
1405
|
-
let e =
|
|
1276
|
+
function fs() {
|
|
1277
|
+
let e = U.value || er.value || Qn.value || Mr.value || P.value || wn.value, t = D.value, n = e ? void 0 : A.get(t)?.getSelectionViewportRect();
|
|
1406
1278
|
if (!n) {
|
|
1407
|
-
|
|
1279
|
+
R.value = void 0;
|
|
1408
1280
|
return;
|
|
1409
1281
|
}
|
|
1410
|
-
let r = n.top - 40 -
|
|
1411
|
-
|
|
1282
|
+
let r = n.top - 40 - tn, i = r >= 12 ? r : n.bottom + tn, a = _t((n.left + n.right) / 2 - 380 / 2, i, 380, 40);
|
|
1283
|
+
R.value = {
|
|
1412
1284
|
pageId: t,
|
|
1413
1285
|
x: a.x,
|
|
1414
1286
|
y: a.y
|
|
1415
|
-
},
|
|
1287
|
+
}, _(() => ps(n));
|
|
1416
1288
|
}
|
|
1417
|
-
function
|
|
1418
|
-
let t =
|
|
1289
|
+
function ps(e) {
|
|
1290
|
+
let t = Zn.value?.getMenuElement(), n = R.value;
|
|
1419
1291
|
if (!t || !n) return;
|
|
1420
|
-
let r = t.getBoundingClientRect(), i = e.top - r.height -
|
|
1421
|
-
|
|
1292
|
+
let r = t.getBoundingClientRect(), i = e.top - r.height - tn, a = i >= 12 ? i : e.bottom + tn, o = vt((e.left + e.right) / 2 - r.width / 2, a, t);
|
|
1293
|
+
R.value = {
|
|
1422
1294
|
...n,
|
|
1423
1295
|
x: o.x,
|
|
1424
1296
|
y: o.y
|
|
1425
1297
|
};
|
|
1426
1298
|
}
|
|
1427
|
-
function
|
|
1428
|
-
let e =
|
|
1429
|
-
|
|
1299
|
+
function ms() {
|
|
1300
|
+
let e = R.value?.pageId ?? D.value, t = A.get(e)?.getSelectionRange();
|
|
1301
|
+
$n = t ? {
|
|
1430
1302
|
pageId: e,
|
|
1431
1303
|
...t
|
|
1432
|
-
} : void 0,
|
|
1304
|
+
} : void 0, Qn.value = !0, R.value = void 0;
|
|
1433
1305
|
}
|
|
1434
|
-
function
|
|
1435
|
-
if (!
|
|
1436
|
-
let t =
|
|
1437
|
-
t && n && t.pageId === e && t.from === n.from && t.to === n.to || (
|
|
1306
|
+
function hs(e) {
|
|
1307
|
+
if (!Qn.value) return;
|
|
1308
|
+
let t = $n, n = A.get(e)?.getSelectionRange();
|
|
1309
|
+
t && n && t.pageId === e && t.from === n.from && t.to === n.to || (Qn.value = !1, $n = void 0);
|
|
1438
1310
|
}
|
|
1439
|
-
function
|
|
1440
|
-
!
|
|
1441
|
-
|
|
1311
|
+
function gs() {
|
|
1312
|
+
!R.value || tr !== void 0 || (tr = requestAnimationFrame(() => {
|
|
1313
|
+
tr = void 0, fs();
|
|
1442
1314
|
}));
|
|
1443
1315
|
}
|
|
1444
|
-
function
|
|
1445
|
-
|
|
1316
|
+
function _s() {
|
|
1317
|
+
er.value && (er.value = !1, fs());
|
|
1446
1318
|
}
|
|
1447
|
-
function
|
|
1448
|
-
$(),
|
|
1319
|
+
function vs() {
|
|
1320
|
+
$(), gs();
|
|
1449
1321
|
}
|
|
1450
|
-
function
|
|
1451
|
-
|
|
1322
|
+
function ys(e, t) {
|
|
1323
|
+
A.get(R.value?.pageId ?? D.value)?.requestTextContextMenu(e, t);
|
|
1452
1324
|
}
|
|
1453
|
-
function
|
|
1454
|
-
let t = e.target instanceof
|
|
1455
|
-
t?.closest(".ProseMirror") && (
|
|
1325
|
+
function bs(e) {
|
|
1326
|
+
let t = e.target instanceof Element ? e.target : null;
|
|
1327
|
+
t?.closest(".ProseMirror") && (er.value = !0, R.value = void 0), !(!L.value && !z.value && !B.value && !R.value) && (t?.closest(ds) || ($(), R.value && ms()));
|
|
1456
1328
|
}
|
|
1457
|
-
function
|
|
1458
|
-
(e.target instanceof Element ? e.target : null)?.closest(
|
|
1329
|
+
function xs(e) {
|
|
1330
|
+
(e.target instanceof Element ? e.target : null)?.closest(ds) || ($(), gs());
|
|
1459
1331
|
}
|
|
1460
|
-
function
|
|
1461
|
-
let t =
|
|
1332
|
+
function Ss(e) {
|
|
1333
|
+
let t = rn.value;
|
|
1462
1334
|
if (!t || typeof document > "u") return !1;
|
|
1463
1335
|
let n = e.target instanceof Node ? e.target : void 0, r = document.activeElement;
|
|
1464
1336
|
return !!(n && t.contains(n) || r && t.contains(r) || n instanceof Element && n.closest(".gd-contract-template-designer__context-menu"));
|
|
1465
1337
|
}
|
|
1466
|
-
function
|
|
1467
|
-
if (e.key !== "Escape" || !
|
|
1468
|
-
let t =
|
|
1338
|
+
function Cs(e) {
|
|
1339
|
+
if (e.key !== "Escape" || !P.value || typeof document > "u") return;
|
|
1340
|
+
let t = rn.value?.querySelector(".gd-contract-template-designer__page-decorations-studio");
|
|
1469
1341
|
if (!t) return;
|
|
1470
|
-
let n = e.target instanceof Element ? e.target : null, r = document.activeElement instanceof Element ? document.activeElement : null, i = !!(n?.closest(
|
|
1342
|
+
let n = e.target instanceof Element ? e.target : null, r = document.activeElement instanceof Element ? document.activeElement : null, i = !!(n?.closest(ur) || r?.closest(ur)), a = !!(n && t.contains(n) || r && t.contains(r)), o = !!t.querySelector(".ant-select-open, .ant-dropdown-open");
|
|
1471
1343
|
if (i || a && o) {
|
|
1472
|
-
|
|
1344
|
+
lr.add(e);
|
|
1473
1345
|
return;
|
|
1474
1346
|
}
|
|
1475
|
-
!
|
|
1347
|
+
!Mr.value && (a || e.target === document) && (e.preventDefault(), e.stopPropagation(), To());
|
|
1476
1348
|
}
|
|
1477
|
-
function
|
|
1349
|
+
function ws(e) {
|
|
1478
1350
|
if ((e.ctrlKey || e.metaKey) && !e.altKey && e.key.toLowerCase() === "s") {
|
|
1479
|
-
if (!
|
|
1480
|
-
e.preventDefault(),
|
|
1351
|
+
if (!Nr.value || !Ss(e)) return;
|
|
1352
|
+
e.preventDefault(), ui();
|
|
1481
1353
|
return;
|
|
1482
1354
|
}
|
|
1483
1355
|
if (e.key === "Escape") {
|
|
1484
|
-
if (
|
|
1485
|
-
|
|
1356
|
+
if (lr.has(e)) {
|
|
1357
|
+
lr.delete(e);
|
|
1486
1358
|
return;
|
|
1487
1359
|
}
|
|
1488
|
-
let t =
|
|
1489
|
-
if (!t &&
|
|
1490
|
-
if (
|
|
1491
|
-
|
|
1360
|
+
let t = Mr.value, n = t || P.value;
|
|
1361
|
+
if (!t && P.value && To(), $(), ls(), n && e.stopPropagation(), !n) {
|
|
1362
|
+
if (R.value) {
|
|
1363
|
+
ms(), e.stopPropagation();
|
|
1492
1364
|
return;
|
|
1493
1365
|
}
|
|
1494
|
-
|
|
1366
|
+
Pn.value ? ao() : M.value = !1;
|
|
1495
1367
|
}
|
|
1496
1368
|
}
|
|
1497
1369
|
}
|
|
1498
|
-
function
|
|
1499
|
-
e ===
|
|
1500
|
-
let n =
|
|
1501
|
-
n &&
|
|
1502
|
-
...
|
|
1370
|
+
function Ts(e, t) {
|
|
1371
|
+
e === D.value && t.selectedContentImage && (E.value = ""), e === D.value && (hs(e), fs());
|
|
1372
|
+
let n = Rn.value[e];
|
|
1373
|
+
n && gt(n, t) || (Rn.value = {
|
|
1374
|
+
...Rn.value,
|
|
1503
1375
|
[e]: t
|
|
1504
1376
|
});
|
|
1505
1377
|
}
|
|
1506
|
-
function
|
|
1378
|
+
function Es(e = cr.value.rows, t = cr.value.cols) {
|
|
1507
1379
|
Z({
|
|
1508
1380
|
type: "insert-table",
|
|
1509
1381
|
options: {
|
|
1510
1382
|
rows: Math.min(10, Math.max(1, Math.round(Number(e) || 3))),
|
|
1511
1383
|
cols: Math.min(10, Math.max(1, Math.round(Number(t) || 3))),
|
|
1512
|
-
withHeaderRow: !!
|
|
1384
|
+
withHeaderRow: !!cr.value.withHeaderRow
|
|
1513
1385
|
}
|
|
1514
|
-
}),
|
|
1386
|
+
}), F.value = !1, $();
|
|
1515
1387
|
}
|
|
1516
|
-
let
|
|
1388
|
+
let Ds = {
|
|
1517
1389
|
"delete-table-row": {
|
|
1518
1390
|
label: "删除当前行",
|
|
1519
1391
|
countKey: "deleteRow"
|
|
@@ -1527,34 +1399,34 @@ var Kt = {
|
|
|
1527
1399
|
countKey: "deleteTable"
|
|
1528
1400
|
}
|
|
1529
1401
|
};
|
|
1530
|
-
function
|
|
1531
|
-
let t =
|
|
1402
|
+
function Os(e) {
|
|
1403
|
+
let t = z.value;
|
|
1532
1404
|
if (!t) return;
|
|
1533
1405
|
let n = () => {
|
|
1534
1406
|
Z(e, t.pageId), $();
|
|
1535
|
-
}, r =
|
|
1407
|
+
}, r = Ds[e.type];
|
|
1536
1408
|
if (!r) {
|
|
1537
1409
|
n();
|
|
1538
1410
|
return;
|
|
1539
1411
|
}
|
|
1540
1412
|
let i = t.affectedVariableCounts[r.countKey];
|
|
1541
|
-
$(),
|
|
1413
|
+
$(), Ft.confirm({
|
|
1542
1414
|
title: r.label,
|
|
1543
1415
|
content: i ? `此操作将移除 ${i} 个正文变量节点,是否继续?` : "此操作将修改表格结构,是否继续?",
|
|
1544
1416
|
okText: "确认",
|
|
1545
1417
|
okType: "danger",
|
|
1546
1418
|
cancelText: "取消",
|
|
1547
1419
|
onOk: n,
|
|
1548
|
-
onCancel: () =>
|
|
1420
|
+
onCancel: () => A.get(t.pageId)?.focus()
|
|
1549
1421
|
});
|
|
1550
1422
|
}
|
|
1551
|
-
function
|
|
1552
|
-
let t =
|
|
1423
|
+
function ks(e) {
|
|
1424
|
+
let t = ir.value?.getMenuElement();
|
|
1553
1425
|
if (!t) return;
|
|
1554
1426
|
if (e.key === "Escape") {
|
|
1555
1427
|
e.preventDefault(), e.stopPropagation();
|
|
1556
|
-
let t =
|
|
1557
|
-
$(),
|
|
1428
|
+
let t = z.value?.pageId;
|
|
1429
|
+
$(), A.get(t ?? "")?.focus();
|
|
1558
1430
|
return;
|
|
1559
1431
|
}
|
|
1560
1432
|
let n = Array.from(t.querySelectorAll("button:not(:disabled)"));
|
|
@@ -1572,130 +1444,120 @@ var Kt = {
|
|
|
1572
1444
|
let r = (Math.max(0, n.indexOf(document.activeElement)) + (e.key === "ArrowUp" || e.key === "ArrowLeft" ? -1 : 1) + n.length) % n.length;
|
|
1573
1445
|
e.preventDefault(), n[r]?.focus();
|
|
1574
1446
|
}
|
|
1575
|
-
function
|
|
1447
|
+
function As(e) {
|
|
1576
1448
|
if (e.key !== "Escape") return;
|
|
1577
1449
|
e.preventDefault(), e.stopPropagation();
|
|
1578
|
-
let t =
|
|
1579
|
-
$(),
|
|
1450
|
+
let t = L.value?.pageId;
|
|
1451
|
+
$(), A.get(t ?? "")?.focus();
|
|
1580
1452
|
}
|
|
1581
|
-
function
|
|
1453
|
+
function js(e) {
|
|
1582
1454
|
if (e.key !== "Escape") return;
|
|
1583
1455
|
e.preventDefault(), e.stopPropagation();
|
|
1584
|
-
let t =
|
|
1585
|
-
$(),
|
|
1586
|
-
}
|
|
1587
|
-
function
|
|
1588
|
-
Z({ type: e }),
|
|
1589
|
-
}
|
|
1590
|
-
return
|
|
1591
|
-
getValue:
|
|
1592
|
-
setValue:
|
|
1593
|
-
getFiles:
|
|
1594
|
-
setFiles:
|
|
1595
|
-
addFile:
|
|
1596
|
-
selectFile:
|
|
1597
|
-
renameFile:
|
|
1598
|
-
removeFile:
|
|
1599
|
-
moveFile:
|
|
1600
|
-
validate:
|
|
1601
|
-
exportTemplate:
|
|
1602
|
-
exportFiles:
|
|
1603
|
-
getSubmitData:
|
|
1604
|
-
clearTemplate:
|
|
1605
|
-
saveDraftCache:
|
|
1606
|
-
loadDraftCache:
|
|
1607
|
-
clearDraftCache:
|
|
1608
|
-
getDraftCacheStatus:
|
|
1609
|
-
insertVariable:
|
|
1610
|
-
insertImage:
|
|
1611
|
-
focus:
|
|
1612
|
-
openPreview:
|
|
1613
|
-
closePreview:
|
|
1614
|
-
openSubmitDataViewer:
|
|
1615
|
-
closeSubmitDataViewer:
|
|
1616
|
-
getVariableData:
|
|
1617
|
-
openVariableDataViewer:
|
|
1618
|
-
closeVariableDataViewer:
|
|
1619
|
-
setServerValidationErrors:
|
|
1620
|
-
clearValidationErrors:
|
|
1621
|
-
scrollToVariable:
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
insertSigningPlacement: ri,
|
|
1629
|
-
selectSigningPlacement: Q,
|
|
1630
|
-
buildLocationRules: Jo,
|
|
1631
|
-
buildContractLocationRules: Yo
|
|
1632
|
-
}), (e, t) => (_(), Ot("div", {
|
|
1456
|
+
let t = B.value?.pageId;
|
|
1457
|
+
$(), A.get(t ?? "")?.focus();
|
|
1458
|
+
}
|
|
1459
|
+
function Ms(e) {
|
|
1460
|
+
Z({ type: e }), I.value = !1, $();
|
|
1461
|
+
}
|
|
1462
|
+
return Xe({
|
|
1463
|
+
getValue: Eo,
|
|
1464
|
+
setValue: Do,
|
|
1465
|
+
getFiles: Oo,
|
|
1466
|
+
setFiles: ko,
|
|
1467
|
+
addFile: Ao,
|
|
1468
|
+
selectFile: jo,
|
|
1469
|
+
renameFile: Mo,
|
|
1470
|
+
removeFile: No,
|
|
1471
|
+
moveFile: Fo,
|
|
1472
|
+
validate: Io,
|
|
1473
|
+
exportTemplate: zo,
|
|
1474
|
+
exportFiles: Bo,
|
|
1475
|
+
getSubmitData: lo,
|
|
1476
|
+
clearTemplate: go,
|
|
1477
|
+
saveDraftCache: ui,
|
|
1478
|
+
loadDraftCache: di,
|
|
1479
|
+
clearDraftCache: fi,
|
|
1480
|
+
getDraftCacheStatus: Bi,
|
|
1481
|
+
insertVariable: La,
|
|
1482
|
+
insertImage: ha,
|
|
1483
|
+
focus: Wo,
|
|
1484
|
+
openPreview: so,
|
|
1485
|
+
closePreview: co,
|
|
1486
|
+
openSubmitDataViewer: uo,
|
|
1487
|
+
closeSubmitDataViewer: fo,
|
|
1488
|
+
getVariableData: po,
|
|
1489
|
+
openVariableDataViewer: mo,
|
|
1490
|
+
closeVariableDataViewer: ho,
|
|
1491
|
+
setServerValidationErrors: Ho,
|
|
1492
|
+
clearValidationErrors: Uo,
|
|
1493
|
+
scrollToVariable: bo,
|
|
1494
|
+
scrollToPage: Co,
|
|
1495
|
+
setZoom: Za,
|
|
1496
|
+
resetZoom: Qa,
|
|
1497
|
+
getZoom: $a,
|
|
1498
|
+
fitWidth: qa
|
|
1499
|
+
}), (e, t) => (v(), St("div", {
|
|
1633
1500
|
ref_key: "designerElement",
|
|
1634
|
-
ref:
|
|
1635
|
-
class:
|
|
1501
|
+
ref: rn,
|
|
1502
|
+
class: wt(["gd-contract-template-designer", {
|
|
1636
1503
|
"is-disabled": s.disabled,
|
|
1637
|
-
"is-readonly":
|
|
1638
|
-
"is-fullscreen":
|
|
1639
|
-
"is-immersive":
|
|
1504
|
+
"is-readonly": U.value,
|
|
1505
|
+
"is-fullscreen": M.value,
|
|
1506
|
+
"is-immersive": Pn.value
|
|
1640
1507
|
}]),
|
|
1641
|
-
style:
|
|
1508
|
+
style: Tt(nn.value),
|
|
1509
|
+
onKeydownCapture: t[31] ||= (...e) => b(jr) && b(jr)(...e)
|
|
1642
1510
|
}, [
|
|
1643
|
-
|
|
1511
|
+
S.value ? (v(), xt(ft, {
|
|
1644
1512
|
key: 0,
|
|
1645
|
-
files:
|
|
1646
|
-
"active-file-id":
|
|
1647
|
-
readonly:
|
|
1648
|
-
onSelect:
|
|
1649
|
-
onAdd: t[0] ||= (e) =>
|
|
1650
|
-
onRename:
|
|
1651
|
-
onRemove:
|
|
1652
|
-
onMove:
|
|
1513
|
+
files: C.value,
|
|
1514
|
+
"active-file-id": w.value,
|
|
1515
|
+
readonly: U.value,
|
|
1516
|
+
onSelect: jo,
|
|
1517
|
+
onAdd: t[0] ||= (e) => Ao(),
|
|
1518
|
+
onRename: Mo,
|
|
1519
|
+
onRemove: Po,
|
|
1520
|
+
onMove: Fo
|
|
1653
1521
|
}, null, 8, [
|
|
1654
1522
|
"files",
|
|
1655
1523
|
"active-file-id",
|
|
1656
1524
|
"readonly"
|
|
1657
|
-
])) :
|
|
1658
|
-
|
|
1659
|
-
"is-sidebar-collapsed":
|
|
1660
|
-
"is-inspector-collapsed":
|
|
1525
|
+
])) : p("", !0),
|
|
1526
|
+
m("div", { class: wt(["gd-contract-template-designer__layout", {
|
|
1527
|
+
"is-sidebar-collapsed": Mn.value,
|
|
1528
|
+
"is-inspector-collapsed": Nn.value
|
|
1661
1529
|
}]) }, [
|
|
1662
|
-
|
|
1663
|
-
collapsed:
|
|
1664
|
-
pages:
|
|
1665
|
-
variables:
|
|
1666
|
-
"decoration-variable-keys":
|
|
1667
|
-
"
|
|
1668
|
-
"
|
|
1669
|
-
"
|
|
1670
|
-
"
|
|
1671
|
-
"
|
|
1672
|
-
"page-
|
|
1673
|
-
"
|
|
1674
|
-
"
|
|
1675
|
-
"
|
|
1676
|
-
|
|
1677
|
-
"
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
onRemovePage: sa,
|
|
1687
|
-
onPatchPageFormat: na,
|
|
1688
|
-
onScrollToVariable: To,
|
|
1689
|
-
onScrollToSigningPlacement: Do
|
|
1530
|
+
h(pt, {
|
|
1531
|
+
collapsed: Mn.value,
|
|
1532
|
+
pages: T.value.pages,
|
|
1533
|
+
variables: T.value.variables,
|
|
1534
|
+
"decoration-variable-keys": li.value,
|
|
1535
|
+
"active-page-id": D.value,
|
|
1536
|
+
"selected-variable-key": E.value,
|
|
1537
|
+
"normalized-max-pages": si.value,
|
|
1538
|
+
"page-limit-reached": ci.value,
|
|
1539
|
+
"selected-page": W.value,
|
|
1540
|
+
"selected-page-size": Rr.value,
|
|
1541
|
+
"normalized-page-size-options": ei.value,
|
|
1542
|
+
"page-size-options": ti.value,
|
|
1543
|
+
"selected-page-size-option-value": ni.value,
|
|
1544
|
+
readonly: U.value,
|
|
1545
|
+
"get-page-size": Xi,
|
|
1546
|
+
onToggle: t[1] ||= (e) => Mn.value = !Mn.value,
|
|
1547
|
+
onAddPage: $i,
|
|
1548
|
+
onActivatePage: xo,
|
|
1549
|
+
onNavigateOutline: So,
|
|
1550
|
+
onDuplicatePage: ea,
|
|
1551
|
+
onRemovePage: na,
|
|
1552
|
+
onPatchPageFormat: Zi,
|
|
1553
|
+
onScrollToVariable: yo
|
|
1690
1554
|
}, null, 8, [
|
|
1691
1555
|
"collapsed",
|
|
1692
1556
|
"pages",
|
|
1693
1557
|
"variables",
|
|
1694
1558
|
"decoration-variable-keys",
|
|
1695
|
-
"signing-placement-navigation-items",
|
|
1696
1559
|
"active-page-id",
|
|
1697
1560
|
"selected-variable-key",
|
|
1698
|
-
"selected-signing-placement-id",
|
|
1699
1561
|
"normalized-max-pages",
|
|
1700
1562
|
"page-limit-reached",
|
|
1701
1563
|
"selected-page",
|
|
@@ -1703,53 +1565,92 @@ var Kt = {
|
|
|
1703
1565
|
"normalized-page-size-options",
|
|
1704
1566
|
"page-size-options",
|
|
1705
1567
|
"selected-page-size-option-value",
|
|
1706
|
-
"show-signing-placement-tools",
|
|
1707
1568
|
"readonly"
|
|
1708
1569
|
]),
|
|
1709
|
-
|
|
1570
|
+
m("main", {
|
|
1710
1571
|
ref_key: "workspaceElement",
|
|
1711
|
-
ref:
|
|
1572
|
+
ref: on,
|
|
1712
1573
|
class: "gd-contract-template-designer__workspace"
|
|
1713
1574
|
}, [
|
|
1714
|
-
|
|
1715
|
-
id:
|
|
1575
|
+
Nt(m("div", {
|
|
1576
|
+
id: un,
|
|
1716
1577
|
class: "gd-contract-template-designer__workspace-chrome"
|
|
1717
|
-
}, [
|
|
1578
|
+
}, [h(Re, {
|
|
1718
1579
|
ref_key: "workspaceHeaderElement",
|
|
1719
|
-
ref:
|
|
1720
|
-
summary:
|
|
1721
|
-
"draft-cache-status-text":
|
|
1722
|
-
"draft-cache-status-class":
|
|
1580
|
+
ref: sn,
|
|
1581
|
+
summary: Vr.value,
|
|
1582
|
+
"draft-cache-status-text": Gr.value,
|
|
1583
|
+
"draft-cache-status-class": Kr.value,
|
|
1723
1584
|
"show-draft-cache-status": s.showDraftCacheStatus,
|
|
1724
1585
|
"show-clear-button": s.showClearButton,
|
|
1725
1586
|
"show-submit-data-viewer": s.showSubmitDataViewer,
|
|
1726
1587
|
"show-variable-data-viewer": s.showVariableDataViewer,
|
|
1727
|
-
readonly:
|
|
1728
|
-
"zoom-percent":
|
|
1729
|
-
"zoom-out-disabled":
|
|
1730
|
-
"zoom-in-disabled":
|
|
1731
|
-
"is-fullscreen":
|
|
1732
|
-
immersive:
|
|
1733
|
-
"page-decorations-open":
|
|
1734
|
-
"page-decorations-studio-id":
|
|
1735
|
-
"page-decorations-preset-label":
|
|
1736
|
-
"page-decorations-enabled-count":
|
|
1737
|
-
"page-decorations-enabled-states":
|
|
1738
|
-
"chrome-controls-id":
|
|
1739
|
-
onZoomOut:
|
|
1740
|
-
onZoomIn:
|
|
1741
|
-
onFitWidth:
|
|
1742
|
-
onResetZoom:
|
|
1743
|
-
onToggleFullscreen:
|
|
1744
|
-
onToggleImmersive:
|
|
1745
|
-
onClear:
|
|
1746
|
-
onValidate:
|
|
1747
|
-
onPreview:
|
|
1748
|
-
onSubmitData:
|
|
1749
|
-
onVariableData:
|
|
1750
|
-
onTogglePageDecorations:
|
|
1751
|
-
onToggleChrome:
|
|
1752
|
-
},
|
|
1588
|
+
readonly: U.value,
|
|
1589
|
+
"zoom-percent": qr.value,
|
|
1590
|
+
"zoom-out-disabled": j.value <= Gt,
|
|
1591
|
+
"zoom-in-disabled": j.value >= Kt,
|
|
1592
|
+
"is-fullscreen": M.value,
|
|
1593
|
+
immersive: Pn.value,
|
|
1594
|
+
"page-decorations-open": P.value,
|
|
1595
|
+
"page-decorations-studio-id": ln,
|
|
1596
|
+
"page-decorations-preset-label": Hr.value,
|
|
1597
|
+
"page-decorations-enabled-count": Wr.value,
|
|
1598
|
+
"page-decorations-enabled-states": Ur.value,
|
|
1599
|
+
"chrome-controls-id": un,
|
|
1600
|
+
onZoomOut: to,
|
|
1601
|
+
onZoomIn: eo,
|
|
1602
|
+
onFitWidth: b(qa),
|
|
1603
|
+
onResetZoom: Qa,
|
|
1604
|
+
onToggleFullscreen: no,
|
|
1605
|
+
onToggleImmersive: oo,
|
|
1606
|
+
onClear: _o,
|
|
1607
|
+
onValidate: Io,
|
|
1608
|
+
onPreview: so,
|
|
1609
|
+
onSubmitData: uo,
|
|
1610
|
+
onVariableData: mo,
|
|
1611
|
+
onTogglePageDecorations: wo,
|
|
1612
|
+
onToggleChrome: us
|
|
1613
|
+
}, {
|
|
1614
|
+
authoring: Mt(() => [h(Ve, {
|
|
1615
|
+
ref_key: "authoringBarElement",
|
|
1616
|
+
ref: pn,
|
|
1617
|
+
compact: "",
|
|
1618
|
+
query: b(_r),
|
|
1619
|
+
"onUpdate:query": t[2] ||= (e) => Ct(_r) ? _r.value = e : null,
|
|
1620
|
+
replacement: b(vr),
|
|
1621
|
+
"onUpdate:replacement": t[3] ||= (e) => Ct(vr) ? vr.value = e : null,
|
|
1622
|
+
"match-case": b(yr),
|
|
1623
|
+
"onUpdate:matchCase": t[4] ||= (e) => Ct(yr) ? yr.value = e : null,
|
|
1624
|
+
panel: b(gr),
|
|
1625
|
+
readonly: U.value,
|
|
1626
|
+
total: b(br).length,
|
|
1627
|
+
"current-index": b(xr),
|
|
1628
|
+
"current-page": b(Sr) ? b(Sr).pageIndex + 1 : void 0,
|
|
1629
|
+
feedback: b(Cr),
|
|
1630
|
+
onOpen: b(Tr),
|
|
1631
|
+
onClose: t[5] ||= (e) => b(Er)(),
|
|
1632
|
+
onNavigate: b(Dr),
|
|
1633
|
+
onReplaceCurrent: b(Or),
|
|
1634
|
+
onReplaceAll: b(kr),
|
|
1635
|
+
onInsertSnippet: b(Ar)
|
|
1636
|
+
}, null, 8, [
|
|
1637
|
+
"query",
|
|
1638
|
+
"replacement",
|
|
1639
|
+
"match-case",
|
|
1640
|
+
"panel",
|
|
1641
|
+
"readonly",
|
|
1642
|
+
"total",
|
|
1643
|
+
"current-index",
|
|
1644
|
+
"current-page",
|
|
1645
|
+
"feedback",
|
|
1646
|
+
"onOpen",
|
|
1647
|
+
"onNavigate",
|
|
1648
|
+
"onReplaceCurrent",
|
|
1649
|
+
"onReplaceAll",
|
|
1650
|
+
"onInsertSnippet"
|
|
1651
|
+
])]),
|
|
1652
|
+
_: 1
|
|
1653
|
+
}, 8, [
|
|
1753
1654
|
"summary",
|
|
1754
1655
|
"draft-cache-status-text",
|
|
1755
1656
|
"draft-cache-status-class",
|
|
@@ -1768,154 +1669,135 @@ var Kt = {
|
|
|
1768
1669
|
"page-decorations-enabled-count",
|
|
1769
1670
|
"page-decorations-enabled-states",
|
|
1770
1671
|
"onFitWidth"
|
|
1771
|
-
]),
|
|
1772
|
-
"variable-insert-popover-open":
|
|
1773
|
-
"onUpdate:variableInsertPopoverOpen": t[
|
|
1774
|
-
"
|
|
1775
|
-
"onUpdate:
|
|
1776
|
-
"
|
|
1777
|
-
"onUpdate:
|
|
1778
|
-
"image-insert-
|
|
1779
|
-
"onUpdate:
|
|
1780
|
-
"image-insert-
|
|
1781
|
-
"onUpdate:
|
|
1782
|
-
"
|
|
1783
|
-
"onUpdate:
|
|
1784
|
-
"
|
|
1785
|
-
"onUpdate:
|
|
1786
|
-
"table-insert-
|
|
1787
|
-
"onUpdate:
|
|
1788
|
-
"
|
|
1789
|
-
"onUpdate:
|
|
1790
|
-
|
|
1791
|
-
"
|
|
1792
|
-
"
|
|
1793
|
-
"
|
|
1794
|
-
|
|
1795
|
-
"
|
|
1796
|
-
"
|
|
1797
|
-
"
|
|
1798
|
-
"
|
|
1799
|
-
"current-editor-
|
|
1800
|
-
"
|
|
1801
|
-
"
|
|
1802
|
-
"
|
|
1803
|
-
"
|
|
1804
|
-
"
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
"readonly",
|
|
1832
|
-
"editor-state",
|
|
1833
|
-
"current-block-format",
|
|
1834
|
-
"font-family-select-options",
|
|
1835
|
-
"current-editor-font-family",
|
|
1836
|
-
"font-size-preset-options",
|
|
1837
|
-
"current-editor-font-size",
|
|
1838
|
-
"editor-font-size-search-value",
|
|
1839
|
-
"current-editor-text-color",
|
|
1840
|
-
"body-control-tool-items",
|
|
1841
|
-
"page-limit-reached",
|
|
1842
|
-
"normalized-max-pages",
|
|
1843
|
-
"image-processing",
|
|
1844
|
-
"image-insert-error"
|
|
1845
|
-
])], 512), [[It, !Hn.value]]),
|
|
1846
|
-
Hn.value ? (_(), Et(y(Vt), {
|
|
1672
|
+
]), h(Be, {
|
|
1673
|
+
"variable-insert-popover-open": Bn.value,
|
|
1674
|
+
"onUpdate:variableInsertPopoverOpen": t[6] ||= (e) => Bn.value = e,
|
|
1675
|
+
"signing-layout-popover-open": Hn.value,
|
|
1676
|
+
"onUpdate:signingLayoutPopoverOpen": t[7] ||= (e) => Hn.value = e,
|
|
1677
|
+
"signing-mark-popover-open": Un.value,
|
|
1678
|
+
"onUpdate:signingMarkPopoverOpen": t[8] ||= (e) => Un.value = e,
|
|
1679
|
+
"image-insert-popover-open": Vn.value,
|
|
1680
|
+
"onUpdate:imageInsertPopoverOpen": t[9] ||= (e) => Vn.value = e,
|
|
1681
|
+
"image-insert-url": Gn.value,
|
|
1682
|
+
"onUpdate:imageInsertUrl": t[10] ||= (e) => Gn.value = e,
|
|
1683
|
+
"image-insert-width": Kn.value,
|
|
1684
|
+
"onUpdate:imageInsertWidth": t[11] ||= (e) => Kn.value = e,
|
|
1685
|
+
"image-insert-height": qn.value,
|
|
1686
|
+
"onUpdate:imageInsertHeight": t[12] ||= (e) => qn.value = e,
|
|
1687
|
+
"table-insert-popover-open": F.value,
|
|
1688
|
+
"onUpdate:tableInsertPopoverOpen": t[13] ||= (e) => F.value = e,
|
|
1689
|
+
"table-actions-popover-open": I.value,
|
|
1690
|
+
"onUpdate:tableActionsPopoverOpen": t[14] ||= (e) => I.value = e,
|
|
1691
|
+
"table-insert-draft": cr.value,
|
|
1692
|
+
"onUpdate:tableInsertDraft": t[15] ||= (e) => cr.value = e,
|
|
1693
|
+
"toolbar-more-open": Ln.value,
|
|
1694
|
+
"onUpdate:toolbarMoreOpen": t[16] ||= (e) => Ln.value = e,
|
|
1695
|
+
readonly: U.value,
|
|
1696
|
+
"editor-state": q.value,
|
|
1697
|
+
"current-block-format": bi.value,
|
|
1698
|
+
"block-format-options": Zr,
|
|
1699
|
+
"font-family-select-options": Yr.value,
|
|
1700
|
+
"current-editor-font-family": xi.value,
|
|
1701
|
+
"font-size-preset-options": Ti.value,
|
|
1702
|
+
"current-editor-font-size": Si.value,
|
|
1703
|
+
"editor-font-size-search-value": zn.value,
|
|
1704
|
+
"current-editor-text-color": Ci.value,
|
|
1705
|
+
"body-control-tool-items": oi.value,
|
|
1706
|
+
"signing-layout-presets": ai.value,
|
|
1707
|
+
"page-limit-reached": ci.value,
|
|
1708
|
+
"normalized-max-pages": si.value,
|
|
1709
|
+
"image-processing": Yn.value,
|
|
1710
|
+
"image-insert-error": Jn.value,
|
|
1711
|
+
onCommand: t[17] ||= (e) => Z(e),
|
|
1712
|
+
onPatchBlockFormat: Ko,
|
|
1713
|
+
onPatchFontFamily: Jo,
|
|
1714
|
+
onPatchFontSize: qo,
|
|
1715
|
+
onPatchColor: Yo,
|
|
1716
|
+
onPatchTextAlign: Go,
|
|
1717
|
+
onInsertVariable: ya,
|
|
1718
|
+
onInsertSigningLayout: Hi,
|
|
1719
|
+
onInsertSigningMark: Gi,
|
|
1720
|
+
onOpenSigningLayoutCustom: Wi,
|
|
1721
|
+
onOpenImageFile: ga,
|
|
1722
|
+
onInsertImageUrl: va,
|
|
1723
|
+
onAddPage: $i,
|
|
1724
|
+
onInsertTable: Es,
|
|
1725
|
+
onTableAction: Ms,
|
|
1726
|
+
onFontSizeSearch: Zo,
|
|
1727
|
+
onFontSizeCommit: Qo,
|
|
1728
|
+
onFontSizeDropdownChange: es,
|
|
1729
|
+
onFontSizeKeydown: $o
|
|
1730
|
+
}, null, 8, /* @__PURE__ */ "variable-insert-popover-open.signing-layout-popover-open.signing-mark-popover-open.image-insert-popover-open.image-insert-url.image-insert-width.image-insert-height.table-insert-popover-open.table-actions-popover-open.table-insert-draft.toolbar-more-open.readonly.editor-state.current-block-format.font-family-select-options.current-editor-font-family.font-size-preset-options.current-editor-font-size.editor-font-size-search-value.current-editor-text-color.body-control-tool-items.signing-layout-presets.page-limit-reached.normalized-max-pages.image-processing.image-insert-error".split("."))], 512), [[jt, !N.value]]),
|
|
1731
|
+
N.value ? (v(), xt(b(It), {
|
|
1847
1732
|
key: 0,
|
|
1848
1733
|
title: "展开工具区"
|
|
1849
1734
|
}, {
|
|
1850
|
-
default:
|
|
1735
|
+
default: Mt(() => [m("button", {
|
|
1851
1736
|
ref_key: "workspaceChromeHandleElement",
|
|
1852
|
-
ref:
|
|
1737
|
+
ref: dn,
|
|
1853
1738
|
type: "button",
|
|
1854
1739
|
class: "gd-contract-template-designer__workspace-chrome-handle",
|
|
1855
1740
|
"aria-label": "展开工具区",
|
|
1856
1741
|
"aria-expanded": !1,
|
|
1857
|
-
"aria-controls":
|
|
1858
|
-
onClick:
|
|
1859
|
-
}, [
|
|
1742
|
+
"aria-controls": un,
|
|
1743
|
+
onClick: us
|
|
1744
|
+
}, [h(b(Bt), { "aria-hidden": "true" })], 512)]),
|
|
1860
1745
|
_: 1
|
|
1861
|
-
})) :
|
|
1862
|
-
|
|
1746
|
+
})) : p("", !0),
|
|
1747
|
+
Pn.value && !P.value ? (v(), St("button", {
|
|
1863
1748
|
key: 1,
|
|
1864
1749
|
ref_key: "immersiveExitElement",
|
|
1865
|
-
ref:
|
|
1750
|
+
ref: Fn,
|
|
1866
1751
|
type: "button",
|
|
1867
1752
|
class: "gd-contract-template-designer__immersive-exit",
|
|
1868
1753
|
"aria-label": "退出沉浸写作",
|
|
1869
|
-
onClick:
|
|
1754
|
+
onClick: ao
|
|
1870
1755
|
}, [
|
|
1871
|
-
|
|
1872
|
-
t[
|
|
1873
|
-
t[
|
|
1874
|
-
], 512)) :
|
|
1875
|
-
|
|
1876
|
-
type:
|
|
1877
|
-
message:
|
|
1756
|
+
h(b(zt), { "aria-hidden": "true" }),
|
|
1757
|
+
t[32] ||= m("span", { class: "gd-contract-template-designer__immersive-exit-label" }, "退出沉浸", -1),
|
|
1758
|
+
t[33] ||= m("kbd", null, "Esc", -1)
|
|
1759
|
+
], 512)) : p("", !0),
|
|
1760
|
+
O.value ? (v(), St("section", Vt, [h(b(Pt), {
|
|
1761
|
+
type: zr.value ? "success" : "error",
|
|
1762
|
+
message: Br.value,
|
|
1878
1763
|
"show-icon": ""
|
|
1879
|
-
}, null, 8, ["type", "message"]),
|
|
1764
|
+
}, null, 8, ["type", "message"]), k.value.length ? (v(), St("div", Ht, [(v(!0), St(yt, null, Ot(k.value, (e) => (v(), St("button", {
|
|
1880
1765
|
key: `${e.id}-${e.message}`,
|
|
1881
1766
|
type: "button",
|
|
1882
1767
|
class: "gd-contract-template-designer__validation-item",
|
|
1883
|
-
onClick: (t) =>
|
|
1884
|
-
}, [
|
|
1885
|
-
|
|
1768
|
+
onClick: (t) => Lo(e)
|
|
1769
|
+
}, [m("span", null, kt(e.message), 1), m("small", null, kt(Ro(e)), 1)], 8, Ut))), 128))])) : p("", !0)])) : p("", !0),
|
|
1770
|
+
m("div", {
|
|
1886
1771
|
ref_key: "canvasElement",
|
|
1887
|
-
ref:
|
|
1772
|
+
ref: an,
|
|
1888
1773
|
class: "gd-contract-template-designer__canvas"
|
|
1889
|
-
}, [(
|
|
1890
|
-
key: `${
|
|
1774
|
+
}, [(v(!0), St(yt, null, Ot(T.value.pages, (e, n) => (v(), xt(Ie, {
|
|
1775
|
+
key: `${w.value}:${e.id}`,
|
|
1891
1776
|
ref_for: !0,
|
|
1892
|
-
ref: (t) =>
|
|
1777
|
+
ref: (t) => Vi(e.id, t),
|
|
1893
1778
|
page: e,
|
|
1894
1779
|
"page-index": n,
|
|
1895
|
-
"page-size":
|
|
1896
|
-
"page-decorations":
|
|
1897
|
-
"total-pages":
|
|
1898
|
-
variables:
|
|
1899
|
-
"selected-variable-key":
|
|
1900
|
-
|
|
1901
|
-
"selected-signing-placement-id": O.value,
|
|
1902
|
-
active: k.value === e.id,
|
|
1780
|
+
"page-size": Xi(e),
|
|
1781
|
+
"page-decorations": T.value.pageDecorations,
|
|
1782
|
+
"total-pages": T.value.pages.length,
|
|
1783
|
+
variables: T.value.variables,
|
|
1784
|
+
"selected-variable-key": E.value,
|
|
1785
|
+
active: D.value === e.id,
|
|
1903
1786
|
readonly: s.readonly,
|
|
1904
1787
|
disabled: s.disabled,
|
|
1905
|
-
zoom:
|
|
1906
|
-
"process-image-file":
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
onVariableMoveBlocked: t[13] ||= (e) => H.value = "变量只能在当前页内移动,跨页移动尚未支持。"
|
|
1788
|
+
zoom: j.value,
|
|
1789
|
+
"process-image-file": ma,
|
|
1790
|
+
"search-query": b(wr),
|
|
1791
|
+
"search-match-case": b(yr),
|
|
1792
|
+
"active-search-match": b(Sr)?.pageId === e.id ? b(Sr) : void 0,
|
|
1793
|
+
onPageUpdate: Yi,
|
|
1794
|
+
onVariableDrop: xa,
|
|
1795
|
+
onVariableSelect: Sa,
|
|
1796
|
+
onEditorFocus: t[18] ||= (e) => xo(e, !1),
|
|
1797
|
+
onEditorStateChange: Ts,
|
|
1798
|
+
onEditorContextMenu: cs,
|
|
1799
|
+
onWordPaste: pa,
|
|
1800
|
+
onVariableMoveBlocked: t[19] ||= (e) => V.value = "变量只能在当前页内移动,跨页移动尚未支持。"
|
|
1919
1801
|
}, null, 8, [
|
|
1920
1802
|
"page",
|
|
1921
1803
|
"page-index",
|
|
@@ -1924,94 +1806,52 @@ var Kt = {
|
|
|
1924
1806
|
"total-pages",
|
|
1925
1807
|
"variables",
|
|
1926
1808
|
"selected-variable-key",
|
|
1927
|
-
"signing-placements",
|
|
1928
|
-
"selected-signing-placement-id",
|
|
1929
1809
|
"active",
|
|
1930
1810
|
"readonly",
|
|
1931
1811
|
"disabled",
|
|
1932
1812
|
"zoom",
|
|
1933
|
-
"
|
|
1934
|
-
"
|
|
1935
|
-
"
|
|
1936
|
-
]))), 128))], 512)
|
|
1937
|
-
Rt(m(bt, {
|
|
1938
|
-
ref_key: "pageDecorationsStudioElement",
|
|
1939
|
-
ref: pn,
|
|
1940
|
-
id: mn,
|
|
1941
|
-
open: F.value,
|
|
1942
|
-
decorations: E.value.pageDecorations,
|
|
1943
|
-
variables: E.value.variables,
|
|
1944
|
-
"font-family-options": Ur.value,
|
|
1945
|
-
readonly: s.readonly,
|
|
1946
|
-
disabled: s.disabled,
|
|
1947
|
-
"active-tab": Gn.value,
|
|
1948
|
-
"onUpdate:activeTab": t[14] ||= (e) => Gn.value = e,
|
|
1949
|
-
onChange: ja,
|
|
1950
|
-
onClose: jo
|
|
1951
|
-
}, null, 8, [
|
|
1952
|
-
"open",
|
|
1953
|
-
"decorations",
|
|
1954
|
-
"variables",
|
|
1955
|
-
"font-family-options",
|
|
1956
|
-
"readonly",
|
|
1957
|
-
"disabled",
|
|
1958
|
-
"active-tab"
|
|
1959
|
-
]), [[It, F.value]])
|
|
1813
|
+
"search-query",
|
|
1814
|
+
"search-match-case",
|
|
1815
|
+
"active-search-match"
|
|
1816
|
+
]))), 128))], 512)
|
|
1960
1817
|
], 512),
|
|
1961
|
-
|
|
1962
|
-
collapsed:
|
|
1818
|
+
h(mt, {
|
|
1819
|
+
collapsed: Nn.value,
|
|
1963
1820
|
readonly: s.readonly,
|
|
1964
1821
|
disabled: s.disabled,
|
|
1965
|
-
"
|
|
1966
|
-
"body-control-tool-items": $r.value,
|
|
1967
|
-
"signing-placement-tools": Zr.value,
|
|
1968
|
-
"signing-placements": K.value,
|
|
1969
|
-
"selected-signing-placement": kr.value,
|
|
1970
|
-
"selected-signing-placement-page-size": jr.value,
|
|
1822
|
+
"body-control-tool-items": oi.value,
|
|
1971
1823
|
"selected-variable": G.value,
|
|
1972
|
-
variables:
|
|
1973
|
-
"current-variable-font-family":
|
|
1974
|
-
"font-family-select-options":
|
|
1975
|
-
"text-align-options":
|
|
1976
|
-
"border-style-options":
|
|
1977
|
-
"object-fit-options":
|
|
1978
|
-
"selected-variable-width-max":
|
|
1979
|
-
"selected-variable-height-max":
|
|
1980
|
-
"min-font-size":
|
|
1981
|
-
"max-font-size":
|
|
1982
|
-
"default-multiline-rows":
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
onPatchMultiline: Ra,
|
|
1999
|
-
onPatchRows: za,
|
|
2000
|
-
onPatchFontFamily: Ia,
|
|
2001
|
-
onPatchFontSize: La,
|
|
2002
|
-
onPatchTextAlign: Ma,
|
|
2003
|
-
onPatchBorderStyle: Na,
|
|
2004
|
-
onPatchObjectFit: Pa
|
|
1824
|
+
variables: T.value.variables,
|
|
1825
|
+
"current-variable-font-family": wi.value,
|
|
1826
|
+
"font-family-select-options": Yr.value,
|
|
1827
|
+
"text-align-options": b(Xr),
|
|
1828
|
+
"border-style-options": Qr,
|
|
1829
|
+
"object-fit-options": $r,
|
|
1830
|
+
"selected-variable-width-max": vi.value,
|
|
1831
|
+
"selected-variable-height-max": yi.value,
|
|
1832
|
+
"min-font-size": $t,
|
|
1833
|
+
"max-font-size": en,
|
|
1834
|
+
"default-multiline-rows": b(3),
|
|
1835
|
+
onToggle: t[20] ||= (e) => Nn.value = !Nn.value,
|
|
1836
|
+
onVariableDragStart: Wa,
|
|
1837
|
+
onInsertVariable: Ra,
|
|
1838
|
+
onDuplicateVariable: Ia,
|
|
1839
|
+
onRemoveVariable: Pa,
|
|
1840
|
+
onPatchVariable: Q,
|
|
1841
|
+
onRenameVariable: wa,
|
|
1842
|
+
onPatchStyle: ka,
|
|
1843
|
+
onPatchMultiline: Ma,
|
|
1844
|
+
onPatchRows: Na,
|
|
1845
|
+
onPatchFontFamily: Aa,
|
|
1846
|
+
onPatchFontSize: ja,
|
|
1847
|
+
onPatchTextAlign: Ea,
|
|
1848
|
+
onPatchBorderStyle: Da,
|
|
1849
|
+
onPatchObjectFit: Oa
|
|
2005
1850
|
}, null, 8, [
|
|
2006
1851
|
"collapsed",
|
|
2007
1852
|
"readonly",
|
|
2008
1853
|
"disabled",
|
|
2009
|
-
"show-signing-placement-tools",
|
|
2010
1854
|
"body-control-tool-items",
|
|
2011
|
-
"signing-placement-tools",
|
|
2012
|
-
"signing-placements",
|
|
2013
|
-
"selected-signing-placement",
|
|
2014
|
-
"selected-signing-placement-page-size",
|
|
2015
1855
|
"selected-variable",
|
|
2016
1856
|
"variables",
|
|
2017
1857
|
"current-variable-font-family",
|
|
@@ -2019,91 +1859,96 @@ var Kt = {
|
|
|
2019
1859
|
"text-align-options",
|
|
2020
1860
|
"selected-variable-width-max",
|
|
2021
1861
|
"selected-variable-height-max",
|
|
2022
|
-
"default-multiline-rows"
|
|
2023
|
-
"resolve-signing-placement-type-icon",
|
|
2024
|
-
"signing-placement-type-labels",
|
|
2025
|
-
"onSigningPlacementDragStart",
|
|
2026
|
-
"onInsertSigningPlacement",
|
|
2027
|
-
"onPatchSigningPlacement"
|
|
1862
|
+
"default-multiline-rows"
|
|
2028
1863
|
])
|
|
2029
1864
|
], 2),
|
|
2030
|
-
(
|
|
2031
|
-
|
|
1865
|
+
Nt(h(ht, {
|
|
1866
|
+
ref_key: "pageDecorationsStudioElement",
|
|
1867
|
+
ref: cn,
|
|
1868
|
+
id: ln,
|
|
1869
|
+
open: P.value,
|
|
1870
|
+
decorations: T.value.pageDecorations,
|
|
1871
|
+
variables: T.value.variables,
|
|
1872
|
+
"font-family-options": Yr.value,
|
|
1873
|
+
readonly: s.readonly,
|
|
1874
|
+
disabled: s.disabled,
|
|
1875
|
+
"active-tab": In.value,
|
|
1876
|
+
"onUpdate:activeTab": t[21] ||= (e) => In.value = e,
|
|
1877
|
+
onChange: Ta,
|
|
1878
|
+
onClose: To
|
|
1879
|
+
}, null, 8, [
|
|
1880
|
+
"open",
|
|
1881
|
+
"decorations",
|
|
1882
|
+
"variables",
|
|
1883
|
+
"font-family-options",
|
|
1884
|
+
"readonly",
|
|
1885
|
+
"disabled",
|
|
1886
|
+
"active-tab"
|
|
1887
|
+
]), [[jt, P.value]]),
|
|
1888
|
+
(v(), xt(bt, { to: "body" }, [
|
|
1889
|
+
z.value ? (v(), xt(Le, {
|
|
2032
1890
|
key: 0,
|
|
2033
1891
|
ref_key: "tableContextMenuElement",
|
|
2034
|
-
ref:
|
|
2035
|
-
capabilities:
|
|
2036
|
-
"active-alignment":
|
|
2037
|
-
style:
|
|
2038
|
-
left: `${
|
|
2039
|
-
top: `${
|
|
1892
|
+
ref: ir,
|
|
1893
|
+
capabilities: z.value.capabilities,
|
|
1894
|
+
"active-alignment": z.value.activeAlignment,
|
|
1895
|
+
style: Tt({
|
|
1896
|
+
left: `${z.value.x}px`,
|
|
1897
|
+
top: `${z.value.y}px`
|
|
2040
1898
|
}),
|
|
2041
|
-
onExecute:
|
|
2042
|
-
onKeydown:
|
|
1899
|
+
onExecute: Os,
|
|
1900
|
+
onKeydown: ks
|
|
2043
1901
|
}, null, 8, [
|
|
2044
1902
|
"capabilities",
|
|
2045
1903
|
"active-alignment",
|
|
2046
1904
|
"style"
|
|
2047
|
-
])) :
|
|
2048
|
-
|
|
1905
|
+
])) : p("", !0),
|
|
1906
|
+
B.value ? (v(), xt(Ge, {
|
|
2049
1907
|
key: 1,
|
|
2050
1908
|
ref_key: "imageContextMenuElement",
|
|
2051
|
-
ref:
|
|
2052
|
-
width:
|
|
2053
|
-
"onUpdate:width": t[
|
|
2054
|
-
height:
|
|
2055
|
-
"onUpdate:height": t[
|
|
2056
|
-
x:
|
|
2057
|
-
y:
|
|
2058
|
-
readonly:
|
|
2059
|
-
onRestore:
|
|
2060
|
-
onApply:
|
|
2061
|
-
onKeydown:
|
|
1909
|
+
ref: ar,
|
|
1910
|
+
width: or.value,
|
|
1911
|
+
"onUpdate:width": t[22] ||= (e) => or.value = e,
|
|
1912
|
+
height: sr.value,
|
|
1913
|
+
"onUpdate:height": t[23] ||= (e) => sr.value = e,
|
|
1914
|
+
x: B.value.x,
|
|
1915
|
+
y: B.value.y,
|
|
1916
|
+
readonly: U.value,
|
|
1917
|
+
onRestore: ss,
|
|
1918
|
+
onApply: os,
|
|
1919
|
+
onKeydown: js
|
|
2062
1920
|
}, null, 8, [
|
|
2063
1921
|
"width",
|
|
2064
1922
|
"height",
|
|
2065
1923
|
"x",
|
|
2066
1924
|
"y",
|
|
2067
1925
|
"readonly"
|
|
2068
|
-
])) :
|
|
2069
|
-
|
|
1926
|
+
])) : p("", !0),
|
|
1927
|
+
L.value ? (v(), xt(Ue, {
|
|
2070
1928
|
key: 2,
|
|
2071
1929
|
ref_key: "textContextMenuElement",
|
|
2072
|
-
ref:
|
|
2073
|
-
"bind-open":
|
|
2074
|
-
"onUpdate:bindOpen": t[
|
|
2075
|
-
"bind-keyword":
|
|
2076
|
-
"onUpdate:bindKeyword": t[
|
|
2077
|
-
x:
|
|
2078
|
-
y:
|
|
2079
|
-
"has-selection":
|
|
2080
|
-
"editor-state":
|
|
2081
|
-
"
|
|
2082
|
-
"
|
|
2083
|
-
"
|
|
2084
|
-
"
|
|
2085
|
-
"
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
onOpenImage: xa,
|
|
2095
|
-
onAddPage: Ta,
|
|
2096
|
-
onInsertVariable: Ga,
|
|
2097
|
-
onBindVariable: qa,
|
|
2098
|
-
onOpenBindPanel: Ya,
|
|
2099
|
-
onKeydown: zs,
|
|
2100
|
-
onPatchFontSize: ns,
|
|
2101
|
-
onPatchTextAlign: es,
|
|
2102
|
-
onPatchColor: as,
|
|
2103
|
-
onFontSizeSearch: os,
|
|
2104
|
-
onFontSizeCommit: ss,
|
|
2105
|
-
onFontSizeDropdownChange: ls,
|
|
2106
|
-
onFontSizeKeydown: cs
|
|
1930
|
+
ref: Xn,
|
|
1931
|
+
"bind-open": nr.value,
|
|
1932
|
+
"onUpdate:bindOpen": t[24] ||= (e) => nr.value = e,
|
|
1933
|
+
"bind-keyword": rr.value,
|
|
1934
|
+
"onUpdate:bindKeyword": t[25] ||= (e) => rr.value = e,
|
|
1935
|
+
x: L.value.x,
|
|
1936
|
+
y: L.value.y,
|
|
1937
|
+
"has-selection": L.value.hasSelection,
|
|
1938
|
+
"editor-state": q.value,
|
|
1939
|
+
"current-editor-text-color": Ci.value,
|
|
1940
|
+
"body-control-tool-items": oi.value,
|
|
1941
|
+
"text-menu-bindable-variables": _i.value,
|
|
1942
|
+
"variables-count": T.value.variables.length,
|
|
1943
|
+
"resolve-bind-variable-type-label": Ha,
|
|
1944
|
+
onCommand: Ki,
|
|
1945
|
+
onClipboard: qi,
|
|
1946
|
+
onAddPage: ba,
|
|
1947
|
+
onInsertVariable: za,
|
|
1948
|
+
onBindVariable: Va,
|
|
1949
|
+
onOpenBindPanel: Ua,
|
|
1950
|
+
onKeydown: As,
|
|
1951
|
+
onPatchColor: Xo
|
|
2107
1952
|
}, null, 8, [
|
|
2108
1953
|
"bind-open",
|
|
2109
1954
|
"bind-keyword",
|
|
@@ -2111,38 +1956,32 @@ var Kt = {
|
|
|
2111
1956
|
"y",
|
|
2112
1957
|
"has-selection",
|
|
2113
1958
|
"editor-state",
|
|
2114
|
-
"font-size-preset-options",
|
|
2115
|
-
"current-editor-font-size",
|
|
2116
|
-
"editor-font-size-search-value",
|
|
2117
|
-
"text-align-options",
|
|
2118
1959
|
"current-editor-text-color",
|
|
2119
1960
|
"body-control-tool-items",
|
|
2120
1961
|
"text-menu-bindable-variables",
|
|
2121
|
-
"page-limit-reached",
|
|
2122
|
-
"table-insert-draft",
|
|
2123
1962
|
"variables-count"
|
|
2124
|
-
])) :
|
|
2125
|
-
|
|
1963
|
+
])) : p("", !0),
|
|
1964
|
+
R.value ? (v(), xt(We, {
|
|
2126
1965
|
key: 3,
|
|
2127
1966
|
ref_key: "textBubbleElement",
|
|
2128
|
-
ref:
|
|
2129
|
-
x:
|
|
2130
|
-
y:
|
|
2131
|
-
"editor-state":
|
|
2132
|
-
"font-size-preset-options":
|
|
2133
|
-
"current-editor-font-size":
|
|
2134
|
-
"editor-font-size-search-value":
|
|
2135
|
-
"current-editor-text-color":
|
|
2136
|
-
"text-align-options":
|
|
1967
|
+
ref: Zn,
|
|
1968
|
+
x: R.value.x,
|
|
1969
|
+
y: R.value.y,
|
|
1970
|
+
"editor-state": q.value,
|
|
1971
|
+
"font-size-preset-options": Ti.value,
|
|
1972
|
+
"current-editor-font-size": Si.value,
|
|
1973
|
+
"editor-font-size-search-value": zn.value,
|
|
1974
|
+
"current-editor-text-color": Ci.value,
|
|
1975
|
+
"text-align-options": b(Xr),
|
|
2137
1976
|
onCommand: Z,
|
|
2138
|
-
onPatchFontSize:
|
|
2139
|
-
onPatchTextAlign:
|
|
2140
|
-
onPatchColor:
|
|
2141
|
-
onFontSizeSearch:
|
|
2142
|
-
onFontSizeCommit:
|
|
2143
|
-
onFontSizeDropdownChange:
|
|
2144
|
-
onFontSizeKeydown:
|
|
2145
|
-
onMore:
|
|
1977
|
+
onPatchFontSize: qo,
|
|
1978
|
+
onPatchTextAlign: Go,
|
|
1979
|
+
onPatchColor: Xo,
|
|
1980
|
+
onFontSizeSearch: Zo,
|
|
1981
|
+
onFontSizeCommit: Qo,
|
|
1982
|
+
onFontSizeDropdownChange: es,
|
|
1983
|
+
onFontSizeKeydown: $o,
|
|
1984
|
+
onMore: ys
|
|
2146
1985
|
}, null, 8, [
|
|
2147
1986
|
"x",
|
|
2148
1987
|
"y",
|
|
@@ -2152,29 +1991,29 @@ var Kt = {
|
|
|
2152
1991
|
"editor-font-size-search-value",
|
|
2153
1992
|
"current-editor-text-color",
|
|
2154
1993
|
"text-align-options"
|
|
2155
|
-
])) :
|
|
1994
|
+
])) : p("", !0)
|
|
2156
1995
|
])),
|
|
2157
|
-
|
|
1996
|
+
m("input", {
|
|
2158
1997
|
ref_key: "imageFileInputElement",
|
|
2159
|
-
ref:
|
|
1998
|
+
ref: fn,
|
|
2160
1999
|
class: "gd-contract-template-designer__hidden-file-input",
|
|
2161
2000
|
type: "file",
|
|
2162
2001
|
accept: "image/png,image/jpeg,image/webp,image/gif,image/bmp",
|
|
2163
2002
|
tabindex: "-1",
|
|
2164
2003
|
"aria-hidden": "true",
|
|
2165
|
-
onChange:
|
|
2004
|
+
onChange: _a
|
|
2166
2005
|
}, null, 544),
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
open:
|
|
2170
|
-
"onUpdate:open": t[
|
|
2171
|
-
"preview-pages":
|
|
2172
|
-
"preview-file-groups":
|
|
2173
|
-
"preview-active-group":
|
|
2174
|
-
"preview-snapshot":
|
|
2006
|
+
m("span", Wt, kt(V.value), 1),
|
|
2007
|
+
h(Ke, {
|
|
2008
|
+
open: wn.value,
|
|
2009
|
+
"onUpdate:open": t[26] ||= (e) => wn.value = e,
|
|
2010
|
+
"preview-pages": Fr.value,
|
|
2011
|
+
"preview-file-groups": Ir.value,
|
|
2012
|
+
"preview-active-group": Lr.value,
|
|
2013
|
+
"preview-snapshot": Tn.value,
|
|
2175
2014
|
"font-base-url": s.contractFontBaseUrl,
|
|
2176
|
-
onCancel:
|
|
2177
|
-
onSelectFile: t[
|
|
2015
|
+
onCancel: co,
|
|
2016
|
+
onSelectFile: t[27] ||= (e) => Dn.value = e
|
|
2178
2017
|
}, null, 8, [
|
|
2179
2018
|
"open",
|
|
2180
2019
|
"preview-pages",
|
|
@@ -2183,25 +2022,31 @@ var Kt = {
|
|
|
2183
2022
|
"preview-snapshot",
|
|
2184
2023
|
"font-base-url"
|
|
2185
2024
|
]),
|
|
2186
|
-
|
|
2187
|
-
open:
|
|
2188
|
-
"onUpdate:open": t[
|
|
2189
|
-
json:
|
|
2190
|
-
onCancel:
|
|
2025
|
+
h(qe, {
|
|
2026
|
+
open: On.value,
|
|
2027
|
+
"onUpdate:open": t[28] ||= (e) => On.value = e,
|
|
2028
|
+
json: kn.value,
|
|
2029
|
+
onCancel: fo
|
|
2191
2030
|
}, null, 8, ["open", "json"]),
|
|
2192
|
-
|
|
2193
|
-
open:
|
|
2194
|
-
"onUpdate:open": t[
|
|
2195
|
-
data:
|
|
2196
|
-
"file-name":
|
|
2197
|
-
onCancel:
|
|
2031
|
+
h(Je, {
|
|
2032
|
+
open: An.value,
|
|
2033
|
+
"onUpdate:open": t[29] ||= (e) => An.value = e,
|
|
2034
|
+
data: jn.value,
|
|
2035
|
+
"file-name": Pr.value?.name,
|
|
2036
|
+
onCancel: ho
|
|
2198
2037
|
}, null, 8, [
|
|
2199
2038
|
"open",
|
|
2200
2039
|
"data",
|
|
2201
2040
|
"file-name"
|
|
2202
|
-
])
|
|
2203
|
-
|
|
2041
|
+
]),
|
|
2042
|
+
h(Ye, {
|
|
2043
|
+
open: Wn.value,
|
|
2044
|
+
"onUpdate:open": t[30] ||= (e) => Wn.value = e,
|
|
2045
|
+
disabled: U.value,
|
|
2046
|
+
onInsert: Ui
|
|
2047
|
+
}, null, 8, ["open", "disabled"])
|
|
2048
|
+
], 38));
|
|
2204
2049
|
}
|
|
2205
2050
|
});
|
|
2206
2051
|
//#endregion
|
|
2207
|
-
export {
|
|
2052
|
+
export { nn as default };
|