@guodun/antdv 1.2.5 → 1.3.1
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/index.mjs +11 -0
- package/dist/es/components/contract-signing-location/src/ContractSigningLocation.mjs +5 -0
- package/dist/es/components/contract-signing-location/src/ContractSigningLocation.vue.mjs +551 -0
- package/dist/es/components/contract-signing-location/src/ContractSigningLocationCanvas.mjs +5 -0
- package/dist/es/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.mjs +612 -0
- package/dist/es/components/contract-signing-location/src/ContractSigningLocationInspector.mjs +5 -0
- package/dist/es/components/contract-signing-location/src/ContractSigningLocationInspector.vue.mjs +228 -0
- package/dist/es/components/contract-signing-location/src/ContractSigningLocationNavigator.mjs +5 -0
- package/dist/es/components/contract-signing-location/src/ContractSigningLocationNavigator.vue.mjs +71 -0
- package/dist/es/components/contract-signing-location/src/constants.mjs +42 -0
- package/dist/es/components/contract-signing-location/src/coordinates.mjs +182 -0
- package/dist/es/components/contract-signing-location/src/icons.mjs +114 -0
- package/dist/es/components/contract-signing-location/src/location-rules.mjs +296 -0
- package/dist/es/components/contract-signing-location/src/page-layout.mjs +115 -0
- package/dist/es/components/contract-signing-location/src/preview-requests.mjs +25 -0
- package/dist/es/components/contract-signing-location/src/style/index.mjs +1 -0
- package/dist/es/components/contract-signing-location/src/types.mjs +0 -0
- package/dist/es/components/contract-signing-location/style/index.css +1 -0
- package/dist/es/components/contract-signing-location/style/index.mjs +1 -0
- package/dist/es/components/index.mjs +12 -0
- package/dist/es/components/pro-contract-signing-flow/index.mjs +9 -0
- package/dist/es/components/pro-contract-signing-flow/src/ContractSigningFlowCanvas.mjs +5 -0
- package/dist/es/components/pro-contract-signing-flow/src/ContractSigningFlowCanvas.vue.mjs +74 -0
- package/dist/es/components/pro-contract-signing-flow/src/ContractSigningFlowInspector.mjs +5 -0
- package/dist/es/components/pro-contract-signing-flow/src/ContractSigningFlowInspector.vue.mjs +338 -0
- package/dist/es/components/pro-contract-signing-flow/src/ContractSigningFlowNodeCard.mjs +5 -0
- package/dist/es/components/pro-contract-signing-flow/src/ContractSigningFlowNodeCard.vue.mjs +115 -0
- package/dist/es/components/pro-contract-signing-flow/src/ProContractSigningFlow.mjs +5 -0
- package/dist/es/components/pro-contract-signing-flow/src/ProContractSigningFlow.vue.mjs +152 -0
- package/dist/es/components/pro-contract-signing-flow/src/composables/use-contract-signing-flow.mjs +365 -0
- package/dist/es/components/pro-contract-signing-flow/src/constants.mjs +48 -0
- package/dist/es/components/pro-contract-signing-flow/src/types.mjs +0 -0
- package/dist/es/components/pro-contract-signing-flow/style/index.css +1 -0
- package/dist/es/components/pro-contract-signing-flow/style/index.mjs +1 -0
- package/dist/es/components/pro-contract-template-designer/index.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue.mjs +43 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePreviewSigningLayer.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePreviewSigningLayer.vue.mjs +42 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateRendererField.vue.mjs +88 -78
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateRendererHeader.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateRendererHeader.vue.mjs +169 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateRendererToolbar.vue.mjs +18 -7
- package/dist/es/components/pro-contract-template-designer/src/DesignerPage.vue.mjs +522 -318
- package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.mjs +2440 -1166
- package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateRenderer.vue.mjs +320 -198
- package/dist/es/components/pro-contract-template-designer/src/SigningPlacementInspector.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/SigningPlacementInspector.vue.mjs +142 -0
- package/dist/es/components/pro-contract-template-designer/src/SigningPlacementLayer.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/SigningPlacementLayer.vue.mjs +134 -0
- package/dist/es/components/pro-contract-template-designer/src/TableContextMenu.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/TableContextMenu.vue.mjs +189 -0
- package/dist/es/components/pro-contract-template-designer/src/TableSizePicker.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/TableSizePicker.vue.mjs +117 -0
- package/dist/es/components/pro-contract-template-designer/src/composables/use-fit-width-zoom.mjs +33 -0
- package/dist/es/components/pro-contract-template-designer/src/composables/use-template-designer.mjs +334 -322
- 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/extensions/ContentImageNodeView.mjs +7 -0
- package/dist/es/components/pro-contract-template-designer/src/extensions/ContentImageNodeView.vue.mjs +213 -0
- package/dist/es/components/pro-contract-template-designer/src/extensions/ContentImageNodeView.vue_vue_type_style_index_0_scoped_8082f8b4_lang.css +1 -0
- package/dist/es/components/pro-contract-template-designer/src/extensions/editor-extensions.mjs +62 -27
- package/dist/es/components/pro-contract-template-designer/src/extensions/office-content.mjs +241 -0
- package/dist/es/components/pro-contract-template-designer/src/extensions/template-variable.mjs +56 -119
- package/dist/es/components/pro-contract-template-designer/src/extensions/word-paste.mjs +145 -0
- package/dist/es/components/pro-contract-template-designer/src/types.mjs +13 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/content-image.mjs +171 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/context-variable.mjs +17 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/html.mjs +59 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/image-url.mjs +44 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/signing-placement.mjs +292 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/template-renderer.mjs +124 -167
- package/dist/es/components/pro-contract-template-designer/src/utils/template-tool-icons.mjs +28 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/template-variable-render.mjs +1 -1
- package/dist/es/components/pro-contract-template-designer/src/utils/word-paste.mjs +737 -0
- package/dist/es/components/pro-contract-template-designer/style/index.css +1 -1
- package/dist/es/index.mjs +75 -63
- package/dist/lib/components/contract-signing-location/index.cjs +1 -0
- package/dist/lib/components/contract-signing-location/src/ContractSigningLocation.cjs +1 -0
- package/dist/lib/components/contract-signing-location/src/ContractSigningLocation.vue.cjs +1 -0
- package/dist/lib/components/contract-signing-location/src/ContractSigningLocationCanvas.cjs +1 -0
- package/dist/lib/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.cjs +1 -0
- package/dist/lib/components/contract-signing-location/src/ContractSigningLocationInspector.cjs +1 -0
- package/dist/lib/components/contract-signing-location/src/ContractSigningLocationInspector.vue.cjs +1 -0
- package/dist/lib/components/contract-signing-location/src/ContractSigningLocationNavigator.cjs +1 -0
- package/dist/lib/components/contract-signing-location/src/ContractSigningLocationNavigator.vue.cjs +1 -0
- package/dist/lib/components/contract-signing-location/src/constants.cjs +1 -0
- package/dist/lib/components/contract-signing-location/src/coordinates.cjs +1 -0
- package/dist/lib/components/contract-signing-location/src/icons.cjs +1 -0
- package/dist/lib/components/contract-signing-location/src/location-rules.cjs +1 -0
- package/dist/lib/components/contract-signing-location/src/page-layout.cjs +1 -0
- package/dist/lib/components/contract-signing-location/src/preview-requests.cjs +1 -0
- package/dist/lib/components/contract-signing-location/src/style/index.cjs +1 -0
- package/dist/lib/components/contract-signing-location/src/types.cjs +0 -0
- package/dist/lib/components/contract-signing-location/style/index.cjs +1 -0
- package/dist/lib/components/contract-signing-location/style/index.css +1 -0
- package/dist/lib/components/index.cjs +1 -1
- package/dist/lib/components/pro-contract-signing-flow/index.cjs +1 -0
- package/dist/lib/components/pro-contract-signing-flow/src/ContractSigningFlowCanvas.cjs +1 -0
- package/dist/lib/components/pro-contract-signing-flow/src/ContractSigningFlowCanvas.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-signing-flow/src/ContractSigningFlowInspector.cjs +1 -0
- package/dist/lib/components/pro-contract-signing-flow/src/ContractSigningFlowInspector.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-signing-flow/src/ContractSigningFlowNodeCard.cjs +1 -0
- package/dist/lib/components/pro-contract-signing-flow/src/ContractSigningFlowNodeCard.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-signing-flow/src/ProContractSigningFlow.cjs +1 -0
- package/dist/lib/components/pro-contract-signing-flow/src/ProContractSigningFlow.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-signing-flow/src/composables/use-contract-signing-flow.cjs +1 -0
- package/dist/lib/components/pro-contract-signing-flow/src/constants.cjs +1 -0
- package/dist/lib/components/pro-contract-signing-flow/src/types.cjs +0 -0
- package/dist/lib/components/pro-contract-signing-flow/style/index.cjs +1 -0
- package/dist/lib/components/pro-contract-signing-flow/style/index.css +1 -0
- package/dist/lib/components/pro-contract-template-designer/index.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePreviewSigningLayer.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePreviewSigningLayer.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateRendererField.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateRendererHeader.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateRendererHeader.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateRendererToolbar.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/ProContractTemplateRenderer.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/SigningPlacementInspector.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/SigningPlacementInspector.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/SigningPlacementLayer.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/SigningPlacementLayer.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/TableContextMenu.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/TableContextMenu.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/TableSizePicker.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/TableSizePicker.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/composables/use-fit-width-zoom.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/extensions/ContentImageNodeView.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/extensions/ContentImageNodeView.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/extensions/ContentImageNodeView.vue_vue_type_style_index_0_scoped_8082f8b4_lang.css +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/office-content.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/extensions/template-variable.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/extensions/word-paste.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/types.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/content-image.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/context-variable.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/html.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/image-url.cjs +2 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/signing-placement.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/template-renderer.cjs +3 -3
- package/dist/lib/components/pro-contract-template-designer/src/utils/template-tool-icons.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/template-variable-render.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/utils/word-paste.cjs +3 -0
- package/dist/lib/components/pro-contract-template-designer/style/index.css +1 -1
- package/dist/lib/index.cjs +1 -1
- package/dist/theme/contract-signing-location.css +1 -0
- package/dist/theme/icon.css +1 -1
- package/dist/theme/index.css +1 -1
- package/dist/theme/pro-contract-signing-flow.css +1 -0
- package/dist/types/components/contract-signing-location/index.d.ts +9 -0
- package/dist/types/components/contract-signing-location/src/ContractSigningLocation.vue.d.ts +134 -0
- package/dist/types/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.d.ts +49 -0
- package/dist/types/components/contract-signing-location/src/ContractSigningLocationInspector.vue.d.ts +32 -0
- package/dist/types/components/contract-signing-location/src/ContractSigningLocationNavigator.vue.d.ts +13 -0
- package/dist/types/components/contract-signing-location/src/constants.d.ts +40 -0
- package/dist/types/components/contract-signing-location/src/coordinates.d.ts +59 -0
- package/dist/types/components/contract-signing-location/src/icons.d.ts +12 -0
- package/dist/types/components/contract-signing-location/src/location-rules.d.ts +50 -0
- package/dist/types/components/contract-signing-location/src/page-layout.d.ts +49 -0
- package/dist/types/components/contract-signing-location/src/preview-requests.d.ts +8 -0
- package/dist/types/components/contract-signing-location/src/types.d.ts +223 -0
- package/dist/types/{antdv/src/components → components}/hooks/use-basic-app-config.d.ts +2 -2
- package/dist/types/{antdv/src/components → components}/index.d.ts +2 -0
- package/dist/types/components/pro-contract-signing-flow/index.d.ts +7 -0
- package/dist/types/components/pro-contract-signing-flow/src/ContractSigningFlowCanvas.vue.d.ts +42 -0
- package/dist/types/components/pro-contract-signing-flow/src/ContractSigningFlowInspector.vue.d.ts +15 -0
- package/dist/types/components/pro-contract-signing-flow/src/ContractSigningFlowNodeCard.vue.d.ts +19 -0
- package/dist/types/components/pro-contract-signing-flow/src/ProContractSigningFlow.vue.d.ts +59 -0
- package/dist/types/components/pro-contract-signing-flow/src/composables/use-contract-signing-flow.d.ts +217 -0
- package/dist/types/components/pro-contract-signing-flow/src/constants.d.ts +26 -0
- package/dist/types/components/pro-contract-signing-flow/src/types.d.ts +124 -0
- package/dist/types/{antdv/src/components → components}/pro-contract-template-agent/src/ContractTemplateAgentContext.vue.d.ts +1 -1
- package/dist/types/{antdv/src/components → components}/pro-contract-template-agent/src/ContractTemplateAgentPanel.vue.d.ts +5 -5
- package/dist/types/components/pro-contract-template-agent/src/ContractTemplateAgentPreview.vue.d.ts +11 -0
- package/dist/types/{antdv/src/components → components}/pro-contract-template-agent/src/ProContractTemplateAgentWorkbench.vue.d.ts +1 -1
- package/dist/types/{antdv/src/components → components}/pro-contract-template-agent/src/composables/use-contract-template-agent.d.ts +11 -11
- package/dist/types/{antdv/src/components → components}/pro-contract-template-agent/src/types.d.ts +39 -2
- package/dist/types/{antdv/src/components → components}/pro-contract-template-designer/index.d.ts +2 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue.d.ts +9 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplatePreviewSigningLayer.vue.d.ts +7 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateRendererHeader.vue.d.ts +71 -0
- package/dist/types/{antdv/src/components → components}/pro-contract-template-designer/src/ContractTemplateRendererToolbar.vue.d.ts +14 -3
- package/dist/types/components/pro-contract-template-designer/src/DesignerPage.vue.d.ts +197 -0
- package/dist/types/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.d.ts +120 -0
- package/dist/types/{antdv/src/components → components}/pro-contract-template-designer/src/ProContractTemplateRenderer.vue.d.ts +11 -3
- package/dist/types/components/pro-contract-template-designer/src/SigningPlacementInspector.vue.d.ts +17 -0
- package/dist/types/components/pro-contract-template-designer/src/SigningPlacementLayer.vue.d.ts +19 -0
- package/dist/types/components/pro-contract-template-designer/src/TableContextMenu.vue.d.ts +22 -0
- package/dist/types/components/pro-contract-template-designer/src/TableSizePicker.vue.d.ts +23 -0
- package/dist/types/components/pro-contract-template-designer/src/composables/use-fit-width-zoom.d.ts +28 -0
- package/dist/types/components/pro-contract-template-designer/src/composables/use-template-designer.d.ts +139 -0
- package/dist/types/components/pro-contract-template-designer/src/composables/use-template-draft-cache.d.ts +83 -0
- package/dist/types/{antdv/src/components → components}/pro-contract-template-designer/src/constants.d.ts +49 -0
- package/dist/types/components/pro-contract-template-designer/src/extensions/ContentImageNodeView.vue.d.ts +5 -0
- package/dist/types/components/pro-contract-template-designer/src/extensions/editor-extensions.d.ts +16 -0
- package/dist/types/{antdv/src/components → components}/pro-contract-template-designer/src/extensions/font-size.d.ts +6 -0
- package/dist/types/components/pro-contract-template-designer/src/extensions/office-content.d.ts +11 -0
- package/dist/types/{antdv/src/components → components}/pro-contract-template-designer/src/extensions/template-variable.d.ts +17 -2
- package/dist/types/components/pro-contract-template-designer/src/extensions/word-paste.d.ts +25 -0
- package/dist/types/{antdv/src/components → components}/pro-contract-template-designer/src/types.d.ts +253 -23
- package/dist/types/components/pro-contract-template-designer/src/utils/content-image.d.ts +80 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/context-variable.d.ts +37 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/html.d.ts +74 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/image-url.d.ts +6 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/signing-placement.d.ts +105 -0
- package/dist/types/{antdv/src/components → components}/pro-contract-template-designer/src/utils/template-renderer.d.ts +15 -1
- package/dist/types/components/pro-contract-template-designer/src/utils/template-tool-icons.d.ts +12 -0
- package/dist/types/{antdv/src/components → components}/pro-contract-template-designer/src/utils/template-variable-render.d.ts +39 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/word-paste.d.ts +45 -0
- package/dist/types/{antdv/src/components → components}/pro-form-render/src/module/AioArrayInput.vue.d.ts +3 -3
- package/dist/types/{antdv/src/components → components}/pro-form-render/src/module/AioArraySubForm.vue.d.ts +3 -3
- package/dist/types/{antdv/src/components → components}/pro-form-render/src/module/AioKV.vue.d.ts +3 -3
- package/dist/types/{antdv/src/components → components}/pro-form-render/src/module/AioSubForm.vue.d.ts +9 -9
- package/dist/types/{antdv/src/components → components}/pro-selector/src/pro-user.d.ts +3 -3
- package/dist/types/{antdv/src/components → components}/pro-selector-group/src/hooks/useApi.d.ts +1 -1
- package/global.d.ts +2 -0
- package/package.json +13 -8
- package/dist/types/antdv/src/components/pro-contract-template-agent/src/ContractTemplateAgentPreview.vue.d.ts +0 -11
- package/dist/types/antdv/src/components/pro-contract-template-designer/src/DesignerPage.vue.d.ts +0 -79
- package/dist/types/antdv/src/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.d.ts +0 -57
- package/dist/types/antdv/src/components/pro-contract-template-designer/src/composables/use-template-designer.d.ts +0 -41
- package/dist/types/antdv/src/components/pro-contract-template-designer/src/composables/use-template-draft-cache.d.ts +0 -39
- package/dist/types/antdv/src/components/pro-contract-template-designer/src/extensions/editor-extensions.d.ts +0 -9
- package/dist/types/antdv/src/components/pro-contract-template-designer/src/extensions/template-field.d.ts +0 -5
- /package/dist/types/{antdv/src/components → components}/collapse-transtion/hooks/use-collapse-transtion.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/collapse-transtion/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/collapse-transtion/src/collapse-transtion.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/collapse-transtion/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/cover-scroll-bar/hooks/use-has-scroll.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/cover-scroll-bar/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/cover-scroll-bar/src/cover-scroll-bar.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/cover-scroll-bar/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/dept-selector/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/dept-selector/src/dept.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/dept-selector/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/hooks/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/icon/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/icon/src/icon.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/icon/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/plus-upload/apis/plus-upload.api.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/plus-upload/hook/useExtractPlusUpload.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/plus-upload/hook/usePlusUpload.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/plus-upload/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/plus-upload/src/plus-upload.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/plus-upload/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-area/apis/pro-area.api.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-area/hooks/use-pro-area.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-area/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-area/src/ProArea.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-area/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-cell/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-cell/src/index.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-cell/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-cell-group/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-cell-group/src/index.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-cell-group/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-contract-template-agent/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-contract-template-agent/src/composables/use-contract-template-agent-split.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-contract-template-agent/src/composables/use-contract-template-agent-workbench.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-contract-template-agent/src/utils/contract-template-agent-adapter.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-contract-template-designer/src/ContractTemplateRendererField.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-contract-template-designer/src/ContractTemplateRendererPage.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-drawer/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-drawer/src/index.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-drawer/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-dynamic-tags/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-dynamic-tags/src/index.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-dynamic-tags/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-form-render/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-form-render/src/index.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-form-render/src/module/AioDatePicker.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-form-render/src/module/AioInput.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-form-render/src/module/AioInputNumber.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-form-render/src/module/AioKeyValue.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-form-render/src/module/AioSelect.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-form-render/src/module/AioSwitch.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-form-render/src/module/AioTextarea.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-form-render/src/module/AioTimePicker.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-form-render/src/module/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-form-render/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-form-render/src/utils.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-form-render/src/v-model-utils.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-loading/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-loading/src/pro-loading.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-loading/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-menu-tree/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-menu-tree/src/hooks.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-menu-tree/src/pro-menu-tree.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-menu-tree/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-modal/hooks/useProModal.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-modal/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-modal/src/Modal.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-modal/src/ProModal.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-modal/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-overlay/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-overlay/src/pro-overlay.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-picker/apis/pro-picker.api.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-picker/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-picker/src/ProPicker.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-picker/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-selector/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-selector/src/components/org-tree.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-selector/src/components/user.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-selector/src/hooks/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-selector/src/hooks/useUserSelector.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-selector/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-selector/src/util.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-selector/src/utils/orgTree.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-selector-group/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-selector-group/src/compoents/dept-tree.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-selector-group/src/compoents/dept.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-selector-group/src/compoents/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-selector-group/src/compoents/role.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-selector-group/src/compoents/select-box.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-selector-group/src/compoents/user.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-selector-group/src/index.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-selector-group/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-selector-group/src/utils/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-signature/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-signature/src/ProSignature.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-signature/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-table/hooks/use-pro-table.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-table/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-table/src/constants.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-table/src/field/field-date-range/field-date-range.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-table/src/field/field-input/field-input.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-table/src/field/field-radio/field-radio.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-table/src/field/field-select/field-select.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-table/src/field/field.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-table/src/form-render.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-table/src/hooks/use-form.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-table/src/hooks/use-table.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-table/src/pro-table.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-table/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-table/utils.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-tag/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-tag/src/ProTag.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-tag/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-tag-group/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-tag-group/src/ProTagGroup.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-tag-group/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-title/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-title/src/ProTitle.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-title/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-upload/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-upload/src/data.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-upload/src/file-list.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-upload/src/gd-upload.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-upload/src/hooks/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-upload/src/hooks/resType.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-upload/src/hooks/useHttp.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-upload/src/hooks/useUpload.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-upload/src/props.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-upload/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-upload/src/utils/emitter.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-upload/src/utils/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-user-avatar/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-user-avatar/src/index.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-user-avatar/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/pro-user-avatar/src/util.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/role-selector/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/role-selector/src/role.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/role-selector/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/scale-virtual-list/component/scale-virtual-list.vue.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/scale-virtual-list/component/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/scale-virtual-list/hooks/useVirtualList.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/scale-virtual-list/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/scroll-bar/index.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/scroll-bar/src/scroll-bar.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/scroll-bar/src/types.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/utils/install.d.ts +0 -0
- /package/dist/types/{antdv/src/components → components}/utils/tool.d.ts +0 -0
- /package/dist/types/{antdv/src/extract.d.ts → extract.d.ts} +0 -0
- /package/dist/types/{antdv/src/hooks → hooks}/index.d.ts +0 -0
- /package/dist/types/{antdv/src/hooks → hooks}/setup-theme.d.ts +0 -0
- /package/dist/types/{antdv/src/hooks → hooks}/use-namespace/index.d.ts +0 -0
- /package/dist/types/{antdv/src/hooks → hooks}/useModelValue.d.ts +0 -0
- /package/dist/types/{antdv/src/hooks → hooks}/useProForm.d.ts +0 -0
- /package/dist/types/{antdv/src/index.d.ts → index.d.ts} +0 -0
package/dist/es/components/pro-contract-template-designer/src/composables/use-template-designer.mjs
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { DEFAULT_CONTRACT_FONT_FAMILY as e } from "../constants.mjs";
|
|
2
2
|
import { resolveTemplateVariablePresentation as t } from "../utils/template-variable-render.mjs";
|
|
3
|
+
import { canUseDomHtml as n, createElementAttributeReader as r, createTagAttributeReader as i, escapeHtmlAttribute as a, escapeHtmlText as o, forEachHtmlTag as s, readNumberAttribute as c, readOptionalBoolean as l, readOptionalNumber as u, replaceTemplateVariableSpans as d } from "../utils/html.mjs";
|
|
4
|
+
import { isContractTemplateFieldType as ee } from "../types.mjs";
|
|
5
|
+
import { normalizeSigningPlacements as te, validateSigningPlacements as ne } from "../utils/signing-placement.mjs";
|
|
3
6
|
//#region src/components/pro-contract-template-designer/src/composables/use-template-designer.ts
|
|
4
|
-
var
|
|
7
|
+
var f = [
|
|
5
8
|
{
|
|
6
9
|
format: "A0",
|
|
7
10
|
width: 3178,
|
|
@@ -50,7 +53,7 @@ var n = [
|
|
|
50
53
|
height: 1344,
|
|
51
54
|
label: "Legal"
|
|
52
55
|
}
|
|
53
|
-
],
|
|
56
|
+
], p = { ...f[4] }, m = {
|
|
54
57
|
color: "#1f2937",
|
|
55
58
|
background: "transparent",
|
|
56
59
|
fontSize: 14,
|
|
@@ -60,7 +63,12 @@ var n = [
|
|
|
60
63
|
textAlign: "left",
|
|
61
64
|
borderStyle: "solid",
|
|
62
65
|
objectFit: "contain"
|
|
63
|
-
},
|
|
66
|
+
}, h = 3, re = 28, g = "contract-template-renderer-1.0.0", _ = "contract-render-css-1.0.0";
|
|
67
|
+
function ie(e) {
|
|
68
|
+
let t = Number(e);
|
|
69
|
+
return Number.isFinite(t) && t >= 1 ? Math.max(1, Math.floor(t)) : 50;
|
|
70
|
+
}
|
|
71
|
+
var v = [
|
|
64
72
|
{
|
|
65
73
|
type: "text",
|
|
66
74
|
label: "输入框",
|
|
@@ -91,97 +99,110 @@ var n = [
|
|
|
91
99
|
defaultWidth: 96,
|
|
92
100
|
defaultHeight: 28
|
|
93
101
|
}
|
|
94
|
-
],
|
|
95
|
-
function
|
|
96
|
-
return
|
|
97
|
-
}
|
|
98
|
-
function
|
|
99
|
-
|
|
102
|
+
], y = 0;
|
|
103
|
+
function b(e) {
|
|
104
|
+
return y += 1, `${e}-${Date.now().toString(36)}-${y.toString(36)}`;
|
|
105
|
+
}
|
|
106
|
+
function x(e) {
|
|
107
|
+
let t = JSON.parse(JSON.stringify(e));
|
|
108
|
+
return Array.isArray(t.signingPlacements) && (t.signingPlacements = t.signingPlacements.map((e) => ({
|
|
109
|
+
id: e.id,
|
|
110
|
+
pageId: e.pageId,
|
|
111
|
+
type: e.type,
|
|
112
|
+
x: e.x,
|
|
113
|
+
y: e.y,
|
|
114
|
+
width: e.width,
|
|
115
|
+
height: e.height,
|
|
116
|
+
mustSign: e.mustSign,
|
|
117
|
+
...e.sealTypes?.length ? { sealTypes: [...e.sealTypes] } : {}
|
|
118
|
+
}))), t;
|
|
119
|
+
}
|
|
120
|
+
function S(e) {
|
|
121
|
+
return f.find((t) => t.format === e);
|
|
100
122
|
}
|
|
101
|
-
function
|
|
102
|
-
return
|
|
103
|
-
}
|
|
104
|
-
function m(e) {
|
|
105
|
-
if (e) return e.format && e.format !== "Custom" ? e.format : n.find((t) => t.width === e.width && t.height === e.height)?.format;
|
|
123
|
+
function C(e) {
|
|
124
|
+
if (e) return e.format && e.format !== "Custom" ? e.format : f.find((t) => t.width === e.width && t.height === e.height)?.format;
|
|
106
125
|
}
|
|
107
|
-
function
|
|
108
|
-
let n =
|
|
126
|
+
function w(e, t = p) {
|
|
127
|
+
let n = C(t) ?? t.format, r = e?.format ?? C(e) ?? n ?? "Custom", i = r === "Custom" ? void 0 : S(r), a = T(i?.width ?? e?.width, t.width), o = T(i?.height ?? e?.height, t.height);
|
|
109
128
|
return {
|
|
110
|
-
format:
|
|
111
|
-
width:
|
|
112
|
-
height:
|
|
113
|
-
label: e?.label ??
|
|
129
|
+
format: i?.format ?? r,
|
|
130
|
+
width: a,
|
|
131
|
+
height: o,
|
|
132
|
+
label: e?.label ?? i?.label ?? t.label ?? r
|
|
114
133
|
};
|
|
115
134
|
}
|
|
116
|
-
function
|
|
135
|
+
function T(e, t) {
|
|
117
136
|
let n = Number(e);
|
|
118
137
|
return !Number.isFinite(n) || n <= 0 ? t : Math.round(n);
|
|
119
138
|
}
|
|
120
|
-
function
|
|
139
|
+
function E(e = 1, t) {
|
|
121
140
|
return {
|
|
122
|
-
id:
|
|
141
|
+
id: b("page"),
|
|
123
142
|
title: `第 ${e} 页`,
|
|
124
|
-
pageSize: t ?
|
|
143
|
+
pageSize: t ? w(t) : void 0,
|
|
125
144
|
contentHtml: "<p>请输入合同正文,也可以从 WPS / Word 复制内容粘贴到这里。</p>"
|
|
126
145
|
};
|
|
127
146
|
}
|
|
128
|
-
function
|
|
147
|
+
function D(e = 1, t, n = "<p></p>", r) {
|
|
129
148
|
return {
|
|
130
|
-
id:
|
|
149
|
+
id: b("page"),
|
|
131
150
|
title: `第 ${e} 页`,
|
|
132
|
-
pageSize: t ?
|
|
151
|
+
pageSize: t ? w(t) : void 0,
|
|
133
152
|
contentHtml: n,
|
|
134
153
|
contentJson: r
|
|
135
154
|
};
|
|
136
155
|
}
|
|
137
|
-
function
|
|
138
|
-
let t =
|
|
156
|
+
function O(e = p) {
|
|
157
|
+
let t = w(e);
|
|
139
158
|
return {
|
|
140
|
-
pages: [
|
|
159
|
+
pages: [E(1, t)],
|
|
141
160
|
variables: [],
|
|
142
|
-
pageSize: t
|
|
161
|
+
pageSize: t,
|
|
162
|
+
signingPlacements: []
|
|
143
163
|
};
|
|
144
164
|
}
|
|
145
|
-
function
|
|
146
|
-
let t =
|
|
165
|
+
function k(e = p) {
|
|
166
|
+
let t = w(e);
|
|
147
167
|
return {
|
|
148
|
-
pages: [
|
|
168
|
+
pages: [D(1, t, "<p></p>")],
|
|
149
169
|
variables: [],
|
|
150
|
-
pageSize: t
|
|
170
|
+
pageSize: t,
|
|
171
|
+
signingPlacements: []
|
|
151
172
|
};
|
|
152
173
|
}
|
|
153
|
-
function
|
|
154
|
-
return t.find((t) => t.type === e) ??
|
|
174
|
+
function A(e, t = v) {
|
|
175
|
+
return t.find((t) => t.type === e) ?? v[0];
|
|
155
176
|
}
|
|
156
|
-
function
|
|
157
|
-
let r = e.type
|
|
177
|
+
function j(e, t = v, n = {}) {
|
|
178
|
+
let r = e.type === void 0 ? "text" : e.type, i = A(r, t), a = M(r);
|
|
158
179
|
return {
|
|
159
|
-
id: e.id ??
|
|
180
|
+
id: e.id ?? b("variable"),
|
|
160
181
|
key: e.key,
|
|
161
|
-
label: e.label ??
|
|
182
|
+
label: e.label ?? i.label ?? e.key,
|
|
162
183
|
type: r,
|
|
163
|
-
placeholder: e.placeholder ??
|
|
164
|
-
width: Math.max(24, Math.round(e.width ??
|
|
165
|
-
height: Math.max(24, Math.round(e.height ??
|
|
184
|
+
placeholder: e.placeholder ?? a.placeholder ?? "",
|
|
185
|
+
width: Math.max(24, Math.round(e.width ?? i.defaultWidth ?? 140)),
|
|
186
|
+
height: Math.max(24, Math.round(e.height ?? a.height ?? i.defaultHeight ?? 32)),
|
|
166
187
|
required: e.required ?? !1,
|
|
167
188
|
defaultValue: e.defaultValue ?? "",
|
|
168
|
-
format: e.format ??
|
|
169
|
-
precision: e.precision ??
|
|
170
|
-
useGrouping: e.useGrouping ??
|
|
171
|
-
checkedText: e.checkedText ??
|
|
172
|
-
uncheckedText: e.uncheckedText ??
|
|
189
|
+
format: e.format ?? a.format ?? "",
|
|
190
|
+
precision: e.precision ?? a.precision,
|
|
191
|
+
useGrouping: e.useGrouping ?? a.useGrouping,
|
|
192
|
+
checkedText: e.checkedText ?? a.checkedText ?? "",
|
|
193
|
+
uncheckedText: e.uncheckedText ?? a.uncheckedText ?? "",
|
|
173
194
|
multiline: e.multiline ?? !1,
|
|
174
195
|
rows: Math.max(1, Math.round(e.rows ?? 3)),
|
|
175
196
|
lineHeight: Math.max(18, Math.round(e.lineHeight ?? 28)),
|
|
176
197
|
style: {
|
|
177
|
-
...
|
|
178
|
-
...
|
|
198
|
+
...m,
|
|
199
|
+
...a.style,
|
|
179
200
|
...n,
|
|
180
201
|
...e.style
|
|
181
202
|
}
|
|
182
203
|
};
|
|
183
204
|
}
|
|
184
|
-
function
|
|
205
|
+
function M(e) {
|
|
185
206
|
return e === "date" ? {
|
|
186
207
|
placeholder: "年 月 日",
|
|
187
208
|
format: "YYYY年MM月DD日",
|
|
@@ -223,91 +244,137 @@ function ee(e) {
|
|
|
223
244
|
underline: !0
|
|
224
245
|
} };
|
|
225
246
|
}
|
|
226
|
-
function
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
247
|
+
function N(e) {
|
|
248
|
+
return e !== void 0 && !ee(e);
|
|
249
|
+
}
|
|
250
|
+
function P(e, t = p) {
|
|
251
|
+
if (!e) return O(t);
|
|
252
|
+
let n = w(e.pageSize, t), r = (e.pages?.length ? e.pages : [E(1, n)]).map((e, t) => ({
|
|
253
|
+
id: e.id || b("page"),
|
|
230
254
|
title: e.title || `第 ${t + 1} 页`,
|
|
231
|
-
pageSize:
|
|
255
|
+
pageSize: w(e.pageSize, n),
|
|
232
256
|
contentHtml: e.contentHtml || "<p></p>",
|
|
233
257
|
contentJson: e.contentJson
|
|
234
|
-
})),
|
|
258
|
+
})), i = /* @__PURE__ */ new Map(), a = Object.fromEntries(r.map((e) => [e.id, w(e.pageSize, n)]));
|
|
235
259
|
return (e.variables ?? []).forEach((e) => {
|
|
236
|
-
e.key &&
|
|
260
|
+
e.key && i.set(e.key, j({
|
|
237
261
|
...e,
|
|
238
|
-
id: e.id ||
|
|
262
|
+
id: e.id || b("variable")
|
|
239
263
|
}));
|
|
240
|
-
}),
|
|
241
|
-
|
|
242
|
-
|
|
264
|
+
}), r.forEach((e) => {
|
|
265
|
+
G(e).forEach((e) => {
|
|
266
|
+
if (!e.key) return;
|
|
267
|
+
let t = i.get(e.key);
|
|
268
|
+
if (!t) {
|
|
269
|
+
i.set(e.key, j(e));
|
|
270
|
+
return;
|
|
271
|
+
}
|
|
272
|
+
N(e.type) && i.set(e.key, j({
|
|
273
|
+
...t,
|
|
274
|
+
type: e.type
|
|
275
|
+
}));
|
|
243
276
|
});
|
|
244
277
|
}), {
|
|
245
|
-
pages:
|
|
246
|
-
variables: Array.from(
|
|
247
|
-
pageSize: n
|
|
278
|
+
pages: r,
|
|
279
|
+
variables: Array.from(i.values()),
|
|
280
|
+
pageSize: n,
|
|
281
|
+
signingPlacements: te(e.signingPlacements, a, n)
|
|
248
282
|
};
|
|
249
283
|
}
|
|
250
|
-
function
|
|
251
|
-
return e.pages.map((t) => `<section ${
|
|
284
|
+
function ae(e) {
|
|
285
|
+
return e.pages.map((t) => `<section ${U(t, e.pageSize)}>${t.contentHtml}</section>`).join("\n");
|
|
252
286
|
}
|
|
253
|
-
function
|
|
254
|
-
return e.pages.map((t) => `<section ${
|
|
287
|
+
function F(e) {
|
|
288
|
+
return e.pages.map((t) => `<section ${U(t, e.pageSize)}>${ge(t.contentHtml)}</section>`).join("\n");
|
|
255
289
|
}
|
|
256
|
-
function
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
return `<section ${j(n, e.pageSize)} style="width:${r.width}px;min-height:${r.height}px">${i}</section>`;
|
|
290
|
+
function oe(e) {
|
|
291
|
+
return I(e).map(({ page: t, contentHtml: n }) => {
|
|
292
|
+
let r = w(t.pageSize, e.pageSize);
|
|
293
|
+
return `<section ${U(t, e.pageSize)} style="width:${r.width}px;min-height:${r.height}px">${n}</section>`;
|
|
261
294
|
}).join("\n");
|
|
262
295
|
}
|
|
263
|
-
function
|
|
264
|
-
let t =
|
|
296
|
+
function I(e) {
|
|
297
|
+
let t = new Map(e.variables.map((e) => [e.key, e])), n = Array.isArray(e.signingPlacements) ? e.signingPlacements : [];
|
|
298
|
+
return e.pages.map((e) => ({
|
|
299
|
+
page: {
|
|
300
|
+
...e,
|
|
301
|
+
...e.pageSize ? { pageSize: { ...e.pageSize } } : {}
|
|
302
|
+
},
|
|
303
|
+
contentHtml: le(e.contentHtml, t),
|
|
304
|
+
signingPlacements: n.filter((t) => t.pageId === e.id).map((e) => ({
|
|
305
|
+
id: e.id,
|
|
306
|
+
pageId: e.pageId,
|
|
307
|
+
type: e.type,
|
|
308
|
+
x: e.x,
|
|
309
|
+
y: e.y,
|
|
310
|
+
width: e.width,
|
|
311
|
+
height: e.height,
|
|
312
|
+
mustSign: e.mustSign,
|
|
313
|
+
...e.sealTypes?.length ? { sealTypes: [...e.sealTypes] } : {}
|
|
314
|
+
}))
|
|
315
|
+
}));
|
|
316
|
+
}
|
|
317
|
+
function se(e) {
|
|
318
|
+
let t = x(e);
|
|
265
319
|
return {
|
|
266
320
|
...t,
|
|
267
|
-
rendererVersion:
|
|
268
|
-
styleVersion:
|
|
269
|
-
html:
|
|
321
|
+
rendererVersion: g,
|
|
322
|
+
styleVersion: _,
|
|
323
|
+
html: F(t)
|
|
270
324
|
};
|
|
271
325
|
}
|
|
272
|
-
function
|
|
273
|
-
let
|
|
274
|
-
e.
|
|
275
|
-
|
|
326
|
+
function L(e, t = {}) {
|
|
327
|
+
let n = [], r = /* @__PURE__ */ new Map();
|
|
328
|
+
typeof t.maxPages == "number" && e.pages.length > t.maxPages && n.push({
|
|
329
|
+
type: "page",
|
|
330
|
+
id: e.pages[t.maxPages]?.id ?? e.pages.at(-1)?.id ?? "",
|
|
331
|
+
pageId: e.pages[t.maxPages]?.id,
|
|
332
|
+
code: "PAGE_LIMIT_EXCEEDED",
|
|
333
|
+
message: `合同共 ${e.pages.length} 页,超过最多 ${t.maxPages} 页限制`
|
|
334
|
+
}), e.variables.forEach((e) => {
|
|
335
|
+
if (e.key?.trim() || n.push({
|
|
276
336
|
type: "variable",
|
|
277
337
|
id: e.id,
|
|
278
338
|
message: `${e.label || "变量"} 缺少变量标识`
|
|
279
339
|
}), e.key) {
|
|
280
|
-
let
|
|
281
|
-
|
|
340
|
+
let t = r.get(e.key);
|
|
341
|
+
t && t !== e.id && n.push({
|
|
282
342
|
type: "variable",
|
|
283
343
|
id: e.id,
|
|
284
344
|
message: `变量标识 ${e.key} 重复`
|
|
285
|
-
}),
|
|
345
|
+
}), r.set(e.key, e.id);
|
|
286
346
|
}
|
|
347
|
+
N(e.type) && n.push({
|
|
348
|
+
type: "variable",
|
|
349
|
+
id: e.id,
|
|
350
|
+
variableKey: e.key,
|
|
351
|
+
message: `${e.label || e.key || "变量"} 不是正文填写变量`,
|
|
352
|
+
code: "VARIABLE_TYPE_UNSUPPORTED"
|
|
353
|
+
});
|
|
287
354
|
});
|
|
288
|
-
let
|
|
355
|
+
let i = new Set(e.variables.map((e) => e.key).filter(Boolean)), a = /* @__PURE__ */ new Set();
|
|
289
356
|
return e.pages.forEach((e) => {
|
|
290
|
-
|
|
291
|
-
|
|
357
|
+
R(e).forEach((t) => {
|
|
358
|
+
a.add(t), i.has(t) || n.push({
|
|
292
359
|
type: "variable",
|
|
293
360
|
id: e.id,
|
|
294
|
-
message: `正文模板变量 ${
|
|
361
|
+
message: `正文模板变量 ${t} 没有对应变量配置`
|
|
295
362
|
});
|
|
296
363
|
});
|
|
297
364
|
}), e.variables.forEach((e) => {
|
|
298
|
-
e.key && !
|
|
365
|
+
e.key && !a.has(e.key) && n.push({
|
|
299
366
|
type: "variable",
|
|
300
367
|
id: e.id,
|
|
301
368
|
message: `${e.label || e.key} 缺少对应正文变量节点`
|
|
302
369
|
});
|
|
303
|
-
}),
|
|
370
|
+
}), n.push(...ne(e)), n;
|
|
304
371
|
}
|
|
305
|
-
function
|
|
372
|
+
function R(e) {
|
|
306
373
|
let t = /* @__PURE__ */ new Set();
|
|
307
374
|
function n(e) {
|
|
308
375
|
if (!e || typeof e != "object") return;
|
|
309
376
|
let r = e;
|
|
310
|
-
(r.type
|
|
377
|
+
z(r.type) && r.attrs?.key && t.add(r.attrs.key), r.content?.forEach(n);
|
|
311
378
|
}
|
|
312
379
|
n(e.contentJson);
|
|
313
380
|
let r = e.contentHtml || "", i = /data-template-variable=["']true["'][^>]*data-key=["']([^"']+)["']|data-key=["']([^"']+)["'][^>]*data-template-variable=["']true["']/g, a = i.exec(r);
|
|
@@ -317,20 +384,23 @@ function D(e) {
|
|
|
317
384
|
}
|
|
318
385
|
return t;
|
|
319
386
|
}
|
|
320
|
-
function
|
|
387
|
+
function z(e) {
|
|
388
|
+
return e === "templateVariable" || e === "templateField";
|
|
389
|
+
}
|
|
390
|
+
function B(e) {
|
|
321
391
|
let t = /* @__PURE__ */ new Set();
|
|
322
392
|
return e.pages.forEach((e) => {
|
|
323
|
-
|
|
393
|
+
R(e).forEach((e) => t.add(e));
|
|
324
394
|
}), t;
|
|
325
395
|
}
|
|
326
|
-
function
|
|
327
|
-
let t =
|
|
396
|
+
function V(e) {
|
|
397
|
+
let t = B(e);
|
|
328
398
|
return {
|
|
329
399
|
...e,
|
|
330
400
|
variables: e.variables.filter((e) => e.key && t.has(e.key))
|
|
331
401
|
};
|
|
332
402
|
}
|
|
333
|
-
function
|
|
403
|
+
function H(e, t, n) {
|
|
334
404
|
let r = e ?? [];
|
|
335
405
|
if (r.length <= 1 || n <= 0) return;
|
|
336
406
|
let i = Math.min(r.length, t.length), a = -1;
|
|
@@ -347,157 +417,120 @@ function A(e, t, n) {
|
|
|
347
417
|
overflowContent: r.slice(a)
|
|
348
418
|
};
|
|
349
419
|
}
|
|
350
|
-
function
|
|
351
|
-
let n =
|
|
420
|
+
function U(e, t) {
|
|
421
|
+
let n = w(e.pageSize, t);
|
|
352
422
|
return [
|
|
353
423
|
"class=\"gd-contract-template-page\"",
|
|
354
|
-
`data-page-id="${
|
|
355
|
-
`data-page-format="${
|
|
356
|
-
`data-page-label="${
|
|
424
|
+
`data-page-id="${a(e.id)}"`,
|
|
425
|
+
`data-page-format="${a(n.format ?? "Custom")}"`,
|
|
426
|
+
`data-page-label="${a(n.label ?? n.format ?? "自定义")}"`,
|
|
357
427
|
`data-page-width="${n.width}"`,
|
|
358
428
|
`data-page-height="${n.height}"`
|
|
359
429
|
].join(" ");
|
|
360
430
|
}
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
}
|
|
364
|
-
function N(e) {
|
|
365
|
-
return e.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">");
|
|
366
|
-
}
|
|
367
|
-
function P(e) {
|
|
431
|
+
var W = /<span\b[^>]*data-template-variable=["']true["'][^>]*>/g;
|
|
432
|
+
function G(e) {
|
|
368
433
|
let t = /* @__PURE__ */ new Map();
|
|
369
|
-
function
|
|
370
|
-
|
|
434
|
+
function a(e) {
|
|
435
|
+
if (!e.key) return;
|
|
436
|
+
let n = t.get(e.key);
|
|
437
|
+
(!n || N(e.type) && !N(n.type)) && t.set(e.key, e);
|
|
371
438
|
}
|
|
372
|
-
function
|
|
439
|
+
function o(e) {
|
|
373
440
|
if (!e || typeof e != "object") return;
|
|
374
441
|
let t = e;
|
|
375
|
-
t.type === "templateVariable" && typeof t.attrs?.key == "string" &&
|
|
376
|
-
key: t.attrs.key,
|
|
377
|
-
label: typeof t.attrs.label == "string" ? t.attrs.label : t.attrs.key,
|
|
378
|
-
type: $(t.attrs.type) ? t.attrs.type : "text",
|
|
379
|
-
placeholder: typeof t.attrs.placeholder == "string" ? t.attrs.placeholder : "",
|
|
380
|
-
width: Number(t.attrs.width || 160),
|
|
381
|
-
height: Number(t.attrs.height || 32),
|
|
382
|
-
required: t.attrs.required === !0,
|
|
383
|
-
defaultValue: typeof t.attrs.defaultValue == "string" ? t.attrs.defaultValue : "",
|
|
384
|
-
format: typeof t.attrs.format == "string" ? t.attrs.format : "",
|
|
385
|
-
precision: typeof t.attrs.precision == "number" ? t.attrs.precision : void 0,
|
|
386
|
-
useGrouping: typeof t.attrs.useGrouping == "boolean" ? t.attrs.useGrouping : void 0,
|
|
387
|
-
checkedText: typeof t.attrs.checkedText == "string" ? t.attrs.checkedText : "",
|
|
388
|
-
uncheckedText: typeof t.attrs.uncheckedText == "string" ? t.attrs.uncheckedText : "",
|
|
389
|
-
multiline: t.attrs.multiline === !0,
|
|
390
|
-
rows: Number(t.attrs.rows || 3),
|
|
391
|
-
lineHeight: Number(t.attrs.lineHeight || 28),
|
|
392
|
-
style: {
|
|
393
|
-
border: typeof t.attrs.border == "boolean" ? t.attrs.border : void 0,
|
|
394
|
-
underline: typeof t.attrs.underline == "boolean" ? t.attrs.underline : void 0,
|
|
395
|
-
color: typeof t.attrs.color == "string" ? t.attrs.color : void 0,
|
|
396
|
-
background: typeof t.attrs.background == "string" ? t.attrs.background : void 0,
|
|
397
|
-
fontSize: Number(t.attrs.fontSize || 14),
|
|
398
|
-
fontFamily: typeof t.attrs.fontFamily == "string" ? t.attrs.fontFamily : void 0,
|
|
399
|
-
placeholderColor: typeof t.attrs.placeholderColor == "string" ? t.attrs.placeholderColor : void 0,
|
|
400
|
-
lineColor: typeof t.attrs.lineColor == "string" ? t.attrs.lineColor : void 0,
|
|
401
|
-
textAlign: X(t.attrs.textAlign) ? t.attrs.textAlign : void 0,
|
|
402
|
-
borderStyle: Z(t.attrs.borderStyle) ? t.attrs.borderStyle : void 0,
|
|
403
|
-
objectFit: Q(t.attrs.objectFit) ? t.attrs.objectFit : void 0
|
|
404
|
-
}
|
|
405
|
-
}), t.content?.forEach(r);
|
|
442
|
+
t.type === "templateVariable" && typeof t.attrs?.key == "string" && a(ce(t.attrs, t.attrs.key)), t.content?.forEach(o);
|
|
406
443
|
}
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
width: Number(e.dataset.width || 160),
|
|
415
|
-
height: Number(e.dataset.height || 32),
|
|
416
|
-
required: e.dataset.required === "true",
|
|
417
|
-
defaultValue: e.dataset.defaultValue || "",
|
|
418
|
-
format: e.dataset.format || "",
|
|
419
|
-
precision: e.dataset.precision ? Number(e.dataset.precision) : void 0,
|
|
420
|
-
useGrouping: e.dataset.useGrouping ? e.dataset.useGrouping === "true" : void 0,
|
|
421
|
-
checkedText: e.dataset.checkedText || "",
|
|
422
|
-
uncheckedText: e.dataset.uncheckedText || "",
|
|
423
|
-
multiline: e.dataset.multiline === "true",
|
|
424
|
-
rows: Number(e.dataset.rows || 3),
|
|
425
|
-
lineHeight: Number(e.dataset.lineHeight || 28),
|
|
426
|
-
style: {
|
|
427
|
-
border: e.dataset.border ? e.dataset.border === "true" : void 0,
|
|
428
|
-
underline: e.dataset.underline ? e.dataset.underline === "true" : void 0,
|
|
429
|
-
color: e.dataset.color,
|
|
430
|
-
background: e.dataset.background,
|
|
431
|
-
fontSize: Number(e.dataset.fontSize || 14),
|
|
432
|
-
fontFamily: e.dataset.fontFamily,
|
|
433
|
-
placeholderColor: e.dataset.placeholderColor,
|
|
434
|
-
lineColor: e.dataset.lineColor,
|
|
435
|
-
textAlign: X(e.dataset.textAlign) ? e.dataset.textAlign : void 0,
|
|
436
|
-
borderStyle: Z(e.dataset.borderStyle) ? e.dataset.borderStyle : void 0,
|
|
437
|
-
objectFit: Q(e.dataset.objectFit) ? e.dataset.objectFit : void 0
|
|
438
|
-
}
|
|
439
|
-
});
|
|
440
|
-
});
|
|
441
|
-
else {
|
|
442
|
-
let t = /<span\b[^>]*data-template-variable=["']true["'][^>]*>|<span\b[^>]*data-key=["'][^"']+["'][^>]*data-template-variable=["']true["'][^>]*>/g, r = t.exec(e.contentHtml || "");
|
|
443
|
-
for (; r;) {
|
|
444
|
-
let i = r[0], a = F(i, "data-key");
|
|
445
|
-
if (a) {
|
|
446
|
-
let e = F(i, "data-variable-type") || "text";
|
|
447
|
-
n({
|
|
448
|
-
key: a,
|
|
449
|
-
label: F(i, "data-label") || a,
|
|
450
|
-
type: $(e) ? e : "text",
|
|
451
|
-
placeholder: F(i, "data-placeholder") || "",
|
|
452
|
-
width: Number(F(i, "data-width") || 160),
|
|
453
|
-
height: Number(F(i, "data-height") || 32),
|
|
454
|
-
required: F(i, "data-required") === "true",
|
|
455
|
-
defaultValue: F(i, "data-default-value") || "",
|
|
456
|
-
format: F(i, "data-format") || "",
|
|
457
|
-
precision: F(i, "data-precision") ? Number(F(i, "data-precision")) : void 0,
|
|
458
|
-
useGrouping: F(i, "data-use-grouping") ? F(i, "data-use-grouping") === "true" : void 0,
|
|
459
|
-
checkedText: F(i, "data-checked-text") || "",
|
|
460
|
-
uncheckedText: F(i, "data-unchecked-text") || "",
|
|
461
|
-
multiline: F(i, "data-multiline") === "true",
|
|
462
|
-
rows: Number(F(i, "data-rows") || 3),
|
|
463
|
-
lineHeight: Number(F(i, "data-line-height") || 28),
|
|
464
|
-
style: {
|
|
465
|
-
border: I(i, "data-border") ? F(i, "data-border") === "true" : void 0,
|
|
466
|
-
underline: I(i, "data-underline") ? F(i, "data-underline") === "true" : void 0,
|
|
467
|
-
color: F(i, "data-color") || void 0,
|
|
468
|
-
background: F(i, "data-background") || void 0,
|
|
469
|
-
fontSize: Number(F(i, "data-font-size") || 14),
|
|
470
|
-
fontFamily: F(i, "data-font-family") || void 0,
|
|
471
|
-
placeholderColor: F(i, "data-placeholder-color") || void 0,
|
|
472
|
-
lineColor: F(i, "data-line-color") || void 0,
|
|
473
|
-
textAlign: X(F(i, "data-text-align")) ? F(i, "data-text-align") : void 0,
|
|
474
|
-
borderStyle: Z(F(i, "data-border-style")) ? F(i, "data-border-style") : void 0,
|
|
475
|
-
objectFit: Q(F(i, "data-object-fit")) ? F(i, "data-object-fit") : void 0
|
|
476
|
-
}
|
|
477
|
-
});
|
|
478
|
-
}
|
|
479
|
-
r = t.exec(e.contentHtml || "");
|
|
480
|
-
}
|
|
481
|
-
}
|
|
482
|
-
return Array.from(t.values());
|
|
444
|
+
o(e.contentJson);
|
|
445
|
+
let c = e.contentHtml || "";
|
|
446
|
+
return n() ? new DOMParser().parseFromString(c, "text/html").querySelectorAll("[data-template-variable]").forEach((e) => {
|
|
447
|
+
a(K(r(e)));
|
|
448
|
+
}) : s(c, W, (e) => {
|
|
449
|
+
a(K(i(e)));
|
|
450
|
+
}), Array.from(t.values());
|
|
483
451
|
}
|
|
484
|
-
function
|
|
485
|
-
|
|
452
|
+
function K(e) {
|
|
453
|
+
let t = e("data-key") ?? "", n = e("data-variable-type"), r = e("data-precision"), i = e("data-use-grouping");
|
|
454
|
+
return {
|
|
455
|
+
key: t,
|
|
456
|
+
label: e("data-label") ?? t,
|
|
457
|
+
type: n ?? "text",
|
|
458
|
+
placeholder: e("data-placeholder") ?? "",
|
|
459
|
+
width: c(e("data-width"), 160),
|
|
460
|
+
height: c(e("data-height"), 32),
|
|
461
|
+
required: e("data-required") === "true",
|
|
462
|
+
defaultValue: e("data-default-value") ?? "",
|
|
463
|
+
format: e("data-format") ?? "",
|
|
464
|
+
precision: r ? Number(r) : void 0,
|
|
465
|
+
useGrouping: i ? i === "true" : void 0,
|
|
466
|
+
checkedText: e("data-checked-text") ?? "",
|
|
467
|
+
uncheckedText: e("data-unchecked-text") ?? "",
|
|
468
|
+
multiline: e("data-multiline") === "true",
|
|
469
|
+
rows: c(e("data-rows"), 3),
|
|
470
|
+
lineHeight: c(e("data-line-height"), 28),
|
|
471
|
+
style: {
|
|
472
|
+
border: l(e("data-border")),
|
|
473
|
+
underline: l(e("data-underline")),
|
|
474
|
+
color: e("data-color"),
|
|
475
|
+
background: e("data-background"),
|
|
476
|
+
fontSize: c(e("data-font-size"), 14),
|
|
477
|
+
fontFamily: e("data-font-family"),
|
|
478
|
+
placeholderColor: e("data-placeholder-color"),
|
|
479
|
+
lineColor: e("data-line-color"),
|
|
480
|
+
textAlign: Z(e("data-text-align")),
|
|
481
|
+
borderStyle: Q(e("data-border-style")),
|
|
482
|
+
objectFit: $(e("data-object-fit"))
|
|
483
|
+
}
|
|
484
|
+
};
|
|
486
485
|
}
|
|
487
|
-
function
|
|
488
|
-
|
|
486
|
+
function ce(e, t) {
|
|
487
|
+
let n = (t) => typeof e[t] == "string" ? e[t] : void 0;
|
|
488
|
+
return {
|
|
489
|
+
key: t,
|
|
490
|
+
label: n("label") ?? t,
|
|
491
|
+
type: e.type === void 0 ? "text" : e.type,
|
|
492
|
+
placeholder: n("placeholder") ?? "",
|
|
493
|
+
width: c(e.width, 160),
|
|
494
|
+
height: c(e.height, 32),
|
|
495
|
+
required: e.required === !0,
|
|
496
|
+
defaultValue: n("defaultValue") ?? "",
|
|
497
|
+
format: n("format") ?? "",
|
|
498
|
+
precision: typeof e.precision == "number" ? e.precision : void 0,
|
|
499
|
+
useGrouping: typeof e.useGrouping == "boolean" ? e.useGrouping : void 0,
|
|
500
|
+
checkedText: n("checkedText") ?? "",
|
|
501
|
+
uncheckedText: n("uncheckedText") ?? "",
|
|
502
|
+
multiline: e.multiline === !0,
|
|
503
|
+
rows: c(e.rows, 3),
|
|
504
|
+
lineHeight: c(e.lineHeight, 28),
|
|
505
|
+
style: {
|
|
506
|
+
border: typeof e.border == "boolean" ? e.border : void 0,
|
|
507
|
+
underline: typeof e.underline == "boolean" ? e.underline : void 0,
|
|
508
|
+
color: n("color"),
|
|
509
|
+
background: n("background"),
|
|
510
|
+
fontSize: c(e.fontSize, 14),
|
|
511
|
+
fontFamily: n("fontFamily"),
|
|
512
|
+
placeholderColor: n("placeholderColor"),
|
|
513
|
+
lineColor: n("lineColor"),
|
|
514
|
+
textAlign: Z(e.textAlign),
|
|
515
|
+
borderStyle: Q(e.borderStyle),
|
|
516
|
+
objectFit: $(e.objectFit)
|
|
517
|
+
}
|
|
518
|
+
};
|
|
489
519
|
}
|
|
490
|
-
function
|
|
520
|
+
function le(e, t) {
|
|
491
521
|
if (!e) return e;
|
|
492
|
-
if (
|
|
522
|
+
if (n()) {
|
|
493
523
|
let n = new DOMParser().parseFromString(e, "text/html");
|
|
494
|
-
return
|
|
495
|
-
|
|
524
|
+
return ue(n), n.querySelectorAll("[data-template-variable]").forEach((e) => {
|
|
525
|
+
de(e, t);
|
|
496
526
|
}), n.body.innerHTML;
|
|
497
527
|
}
|
|
498
|
-
return
|
|
528
|
+
return d(pe(e), (e, n) => {
|
|
529
|
+
let r = i(n);
|
|
530
|
+
return r("data-key") ? fe(r, t) : e;
|
|
531
|
+
});
|
|
499
532
|
}
|
|
500
|
-
function
|
|
533
|
+
function ue(e) {
|
|
501
534
|
e.querySelectorAll("script,style,meta,link").forEach((e) => e.remove()), e.querySelectorAll("*").forEach((e) => {
|
|
502
535
|
Array.from(e.attributes).forEach((t) => {
|
|
503
536
|
let n = t.name.toLowerCase(), r = t.value;
|
|
@@ -505,133 +538,112 @@ function R(e) {
|
|
|
505
538
|
e.removeAttribute(t.name);
|
|
506
539
|
return;
|
|
507
540
|
}
|
|
508
|
-
if ((n === "href" || n === "src") &&
|
|
541
|
+
if ((n === "href" || n === "src") && J(r)) {
|
|
509
542
|
e.removeAttribute(t.name);
|
|
510
543
|
return;
|
|
511
544
|
}
|
|
512
|
-
n === "style" &&
|
|
545
|
+
n === "style" && Y(r) && e.removeAttribute(t.name);
|
|
513
546
|
});
|
|
514
547
|
});
|
|
515
548
|
}
|
|
516
|
-
function
|
|
517
|
-
let r = e
|
|
549
|
+
function q(e, n) {
|
|
550
|
+
let r = e("data-key") ?? "", i = n.get(r), a = i?.type ?? e("data-variable-type") ?? "text", o = he(a, i?.defaultValue ?? e("data-default-value") ?? ""), s = t({
|
|
518
551
|
type: a,
|
|
519
|
-
width: i?.width ?? e
|
|
520
|
-
height: i?.height ?? e
|
|
552
|
+
width: i?.width ?? e("data-width"),
|
|
553
|
+
height: i?.height ?? e("data-height"),
|
|
521
554
|
defaultValue: o,
|
|
522
|
-
placeholder: i?.placeholder ?? e
|
|
523
|
-
format: i?.format ?? e
|
|
524
|
-
precision: i?.precision ??
|
|
525
|
-
useGrouping: i?.useGrouping ??
|
|
526
|
-
checkedText: i?.checkedText ?? e
|
|
527
|
-
uncheckedText: i?.uncheckedText ?? e
|
|
528
|
-
multiline: i?.multiline ??
|
|
529
|
-
rows: i?.rows ?? e
|
|
530
|
-
lineHeight: i?.lineHeight ?? e
|
|
531
|
-
style:
|
|
555
|
+
placeholder: i?.placeholder ?? e("data-placeholder") ?? "",
|
|
556
|
+
format: i?.format ?? e("data-format") ?? "",
|
|
557
|
+
precision: i?.precision ?? u(e("data-precision")),
|
|
558
|
+
useGrouping: i?.useGrouping ?? l(e("data-use-grouping")),
|
|
559
|
+
checkedText: i?.checkedText ?? e("data-checked-text") ?? "",
|
|
560
|
+
uncheckedText: i?.uncheckedText ?? e("data-unchecked-text") ?? "",
|
|
561
|
+
multiline: i?.multiline ?? l(e("data-multiline")) ?? !1,
|
|
562
|
+
rows: i?.rows ?? e("data-rows"),
|
|
563
|
+
lineHeight: i?.lineHeight ?? e("data-line-height"),
|
|
564
|
+
style: me(i, e)
|
|
532
565
|
});
|
|
533
|
-
e.setAttribute("data-template-variable", "true"), e.setAttribute("data-key", r), e.setAttribute("data-label", i?.label ?? e.dataset.label ?? r), e.setAttribute("data-variable-type", s.type), e.setAttribute("data-width", String(s.width)), e.setAttribute("data-height", String(s.height)), e.setAttribute("data-border", String(s.border)), e.setAttribute("data-underline", String(s.underline)), e.setAttribute("data-color", s.color), e.setAttribute("data-background", s.background), e.setAttribute("data-font-size", String(s.fontSize)), e.setAttribute("data-font-family", s.fontFamily), e.setAttribute("data-placeholder-color", s.placeholderColor), e.setAttribute("data-line-color", s.lineColor), e.setAttribute("data-text-align", s.textAlign), e.setAttribute("data-border-style", s.borderStyle), e.setAttribute("data-object-fit", s.objectFit), e.className = s.classes.join(" "), e.setAttribute("style", s.styleText), e.textContent = s.type === "image" && s.hasDefaultValue ? " " : s.displayText || " ";
|
|
534
|
-
}
|
|
535
|
-
function B(e, n) {
|
|
536
|
-
return e.replace(/<span\b(?=[^>]*data-template-variable=["']true["'])([^>]*)>[\s\S]*?<\/span>/g, (e, r) => {
|
|
537
|
-
let i = F(r, "data-key");
|
|
538
|
-
if (!i) return e;
|
|
539
|
-
let a = n.get(i), o = a?.type ?? F(r, "data-variable-type") ?? "text", s = W(o, a?.defaultValue ?? F(r, "data-default-value")), c = t({
|
|
540
|
-
type: o,
|
|
541
|
-
width: a?.width ?? F(r, "data-width"),
|
|
542
|
-
height: a?.height ?? F(r, "data-height"),
|
|
543
|
-
defaultValue: s,
|
|
544
|
-
placeholder: a?.placeholder ?? F(r, "data-placeholder"),
|
|
545
|
-
format: a?.format ?? F(r, "data-format"),
|
|
546
|
-
precision: a?.precision ?? G(F(r, "data-precision")),
|
|
547
|
-
useGrouping: a?.useGrouping ?? K(F(r, "data-use-grouping")),
|
|
548
|
-
checkedText: a?.checkedText ?? F(r, "data-checked-text"),
|
|
549
|
-
uncheckedText: a?.uncheckedText ?? F(r, "data-unchecked-text"),
|
|
550
|
-
multiline: a?.multiline ?? K(F(r, "data-multiline")) ?? !1,
|
|
551
|
-
rows: a?.rows ?? F(r, "data-rows"),
|
|
552
|
-
lineHeight: a?.lineHeight ?? F(r, "data-line-height"),
|
|
553
|
-
style: U(a, r)
|
|
554
|
-
}), l = c.type === "image" && c.hasDefaultValue ? " " : c.displayText || " ";
|
|
555
|
-
return `<span data-template-variable="true" data-key="${M(i)}" data-label="${M(a?.label ?? (F(r, "data-label") || i))}" data-variable-type="${M(c.type)}" data-width="${c.width}" data-height="${c.height}" data-border="${c.border}" data-underline="${c.underline}" data-font-family="${M(c.fontFamily)}" class="${M(c.classes.join(" "))}" style="${M(c.styleText)}">${N(l)}</span>`;
|
|
556
|
-
});
|
|
557
|
-
}
|
|
558
|
-
function V(e) {
|
|
559
|
-
return e.replace(/<\s*(script|style|meta|link)\b[\s\S]*?<\s*\/\s*\1\s*>/gi, "").replace(/<\s*(meta|link)\b[^>]*>/gi, "").replace(/\s+on[a-z]+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/gi, "").replace(/\s+srcdoc\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/gi, "").replace(/\s+(href|src)\s*=\s*(["'])(.*?)\2/gi, (e, t, n, r) => q(r) ? "" : ` ${t}=${n}${r}${n}`).replace(/\s+style\s*=\s*(["'])(.*?)\1/gi, (e, t, n) => J(n) ? "" : ` style=${t}${n}${t}`);
|
|
560
|
-
}
|
|
561
|
-
function H(e, t) {
|
|
562
566
|
return {
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
fontSize: e?.style?.fontSize ?? G(t.dataset.fontSize),
|
|
568
|
-
fontFamily: e?.style?.fontFamily ?? t.dataset.fontFamily,
|
|
569
|
-
placeholderColor: e?.style?.placeholderColor ?? t.dataset.placeholderColor,
|
|
570
|
-
lineColor: e?.style?.lineColor ?? t.dataset.lineColor,
|
|
571
|
-
textAlign: e?.style?.textAlign ?? (X(t.dataset.textAlign) ? t.dataset.textAlign : void 0),
|
|
572
|
-
borderStyle: e?.style?.borderStyle ?? (Z(t.dataset.borderStyle) ? t.dataset.borderStyle : void 0),
|
|
573
|
-
objectFit: e?.style?.objectFit ?? (Q(t.dataset.objectFit) ? t.dataset.objectFit : void 0)
|
|
567
|
+
key: r,
|
|
568
|
+
label: i?.label ?? e("data-label") ?? r,
|
|
569
|
+
presentation: s,
|
|
570
|
+
text: s.type === "image" && s.hasDefaultValue ? " " : s.displayText || " "
|
|
574
571
|
};
|
|
575
572
|
}
|
|
576
|
-
function
|
|
577
|
-
let
|
|
578
|
-
|
|
579
|
-
border: e?.style?.border ?? K(F(t, "data-border")),
|
|
580
|
-
underline: e?.style?.underline ?? K(F(t, "data-underline")),
|
|
581
|
-
color: e?.style?.color ?? (F(t, "data-color") || void 0),
|
|
582
|
-
background: e?.style?.background ?? (F(t, "data-background") || void 0),
|
|
583
|
-
fontSize: e?.style?.fontSize ?? G(F(t, "data-font-size")),
|
|
584
|
-
fontFamily: e?.style?.fontFamily ?? (F(t, "data-font-family") || void 0),
|
|
585
|
-
placeholderColor: e?.style?.placeholderColor ?? (F(t, "data-placeholder-color") || void 0),
|
|
586
|
-
lineColor: e?.style?.lineColor ?? (F(t, "data-line-color") || void 0),
|
|
587
|
-
textAlign: e?.style?.textAlign ?? (X(n) ? n : void 0),
|
|
588
|
-
borderStyle: e?.style?.borderStyle ?? (Z(r) ? r : void 0),
|
|
589
|
-
objectFit: e?.style?.objectFit ?? (Q(i) ? i : void 0)
|
|
590
|
-
};
|
|
573
|
+
function de(e, t) {
|
|
574
|
+
let { key: n, label: i, presentation: a, text: o } = q(r(e), t);
|
|
575
|
+
e.setAttribute("data-template-variable", "true"), e.setAttribute("data-key", n), e.setAttribute("data-label", i), e.setAttribute("data-variable-type", a.type), e.setAttribute("data-width", String(a.width)), e.setAttribute("data-height", String(a.height)), e.setAttribute("data-border", String(a.border)), e.setAttribute("data-underline", String(a.underline)), e.setAttribute("data-color", a.color), e.setAttribute("data-background", a.background), e.setAttribute("data-font-size", String(a.fontSize)), e.setAttribute("data-font-family", a.fontFamily), e.setAttribute("data-placeholder-color", a.placeholderColor), e.setAttribute("data-line-color", a.lineColor), e.setAttribute("data-text-align", a.textAlign), e.setAttribute("data-border-style", a.borderStyle), e.setAttribute("data-object-fit", a.objectFit), e.className = a.classes.join(" "), e.setAttribute("style", a.styleText), e.textContent = o;
|
|
591
576
|
}
|
|
592
|
-
function
|
|
593
|
-
|
|
577
|
+
function fe(e, t) {
|
|
578
|
+
let { key: n, label: r, presentation: i, text: s } = q(e, t);
|
|
579
|
+
return `<span data-template-variable="true" data-key="${a(n)}" data-label="${a(r)}" data-variable-type="${a(i.type)}" data-width="${i.width}" data-height="${i.height}" data-border="${i.border}" data-underline="${i.underline}" data-font-family="${a(i.fontFamily)}" class="${a(i.classes.join(" "))}" style="${a(i.styleText)}">${o(s)}</span>`;
|
|
594
580
|
}
|
|
595
|
-
function
|
|
596
|
-
|
|
597
|
-
let t = Number(e);
|
|
598
|
-
return Number.isFinite(t) ? t : void 0;
|
|
581
|
+
function pe(e) {
|
|
582
|
+
return e.replace(/<\s*(script|style|meta|link)\b[\s\S]*?<\s*\/\s*\1\s*>/gi, "").replace(/<\s*(meta|link)\b[^>]*>/gi, "").replace(/\s+on[a-z]+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/gi, "").replace(/\s+srcdoc\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/gi, "").replace(/\s+(href|src)\s*=\s*(["'])(.*?)\2/gi, (e, t, n, r) => J(r) ? "" : ` ${t}=${n}${r}${n}`).replace(/\s+style\s*=\s*(["'])(.*?)\1/gi, (e, t, n) => Y(n) ? "" : ` style=${t}${n}${t}`);
|
|
599
583
|
}
|
|
600
|
-
function
|
|
601
|
-
|
|
584
|
+
function me(e, t) {
|
|
585
|
+
return {
|
|
586
|
+
border: e?.style?.border ?? l(t("data-border")),
|
|
587
|
+
underline: e?.style?.underline ?? l(t("data-underline")),
|
|
588
|
+
color: e?.style?.color ?? t("data-color"),
|
|
589
|
+
background: e?.style?.background ?? t("data-background"),
|
|
590
|
+
fontSize: e?.style?.fontSize ?? u(t("data-font-size")),
|
|
591
|
+
fontFamily: e?.style?.fontFamily ?? t("data-font-family"),
|
|
592
|
+
placeholderColor: e?.style?.placeholderColor ?? t("data-placeholder-color"),
|
|
593
|
+
lineColor: e?.style?.lineColor ?? t("data-line-color"),
|
|
594
|
+
textAlign: e?.style?.textAlign ?? Z(t("data-text-align")),
|
|
595
|
+
borderStyle: e?.style?.borderStyle ?? Q(t("data-border-style")),
|
|
596
|
+
objectFit: e?.style?.objectFit ?? $(t("data-object-fit"))
|
|
597
|
+
};
|
|
602
598
|
}
|
|
603
|
-
function
|
|
599
|
+
function he(e, t) {
|
|
600
|
+
return e === "image" && J(t) ? "" : t;
|
|
601
|
+
}
|
|
602
|
+
function J(e) {
|
|
604
603
|
let t = e.trim().replace(/[\u0000-\u001F\s]+/g, "").toLowerCase();
|
|
605
604
|
return t.startsWith("javascript:") || t.startsWith("vbscript:") || t.startsWith("data:") && !t.startsWith("data:image/");
|
|
606
605
|
}
|
|
607
|
-
function
|
|
606
|
+
function Y(e) {
|
|
608
607
|
return /expression\s*\(|javascript:|vbscript:/i.test(e);
|
|
609
608
|
}
|
|
610
|
-
function
|
|
609
|
+
function ge(e) {
|
|
611
610
|
if (!e) return e;
|
|
612
|
-
if (
|
|
611
|
+
if (n()) {
|
|
613
612
|
let t = new DOMParser().parseFromString(e, "text/html");
|
|
614
613
|
return t.querySelectorAll("[data-template-variable]").forEach((e) => {
|
|
615
614
|
let t = e.dataset.key || "";
|
|
616
615
|
t && (e.textContent = `\${{${t}}}`);
|
|
617
616
|
}), t.body.innerHTML;
|
|
618
617
|
}
|
|
619
|
-
return e
|
|
620
|
-
let n =
|
|
618
|
+
return d(e, (e, t) => {
|
|
619
|
+
let n = i(t)("data-key");
|
|
621
620
|
return n ? `<span${t}>\${{${n}}}</span>` : e;
|
|
622
621
|
});
|
|
623
622
|
}
|
|
624
|
-
function
|
|
623
|
+
function _e(e) {
|
|
625
624
|
return e === "left" || e === "center" || e === "right";
|
|
626
625
|
}
|
|
627
|
-
function
|
|
626
|
+
function X(e) {
|
|
628
627
|
return e === "solid" || e === "dashed";
|
|
629
628
|
}
|
|
630
|
-
function
|
|
629
|
+
function ve(e) {
|
|
631
630
|
return e === "contain" || e === "cover" || e === "fill";
|
|
632
631
|
}
|
|
632
|
+
function Z(e) {
|
|
633
|
+
return _e(e) ? e : void 0;
|
|
634
|
+
}
|
|
635
|
+
function Q(e) {
|
|
636
|
+
return X(e) ? e : void 0;
|
|
637
|
+
}
|
|
633
638
|
function $(e) {
|
|
634
|
-
return e
|
|
639
|
+
return ve(e) ? e : void 0;
|
|
640
|
+
}
|
|
641
|
+
function ye(e, t = []) {
|
|
642
|
+
let n = [...t, ...L(e)], r = /* @__PURE__ */ new Set();
|
|
643
|
+
return n.filter((e) => {
|
|
644
|
+
let t = `${e.code ?? ""}|${e.id}|${e.pageId ?? ""}|${e.message}`;
|
|
645
|
+
return r.has(t) ? !1 : (r.add(t), !0);
|
|
646
|
+
});
|
|
635
647
|
}
|
|
636
648
|
//#endregion
|
|
637
|
-
export {
|
|
649
|
+
export { g as CONTRACT_TEMPLATE_RENDERER_VERSION, _ as CONTRACT_TEMPLATE_STYLE_VERSION, m as DEFAULT_FIELD_STYLE, v as DEFAULT_FIELD_TYPES, re as DEFAULT_MULTILINE_LINE_HEIGHT, h as DEFAULT_MULTILINE_ROWS, p as DEFAULT_PAGE_SIZE, f as PAGE_SIZE_OPTIONS, F as buildTemplateExpressionHtml, ae as buildTemplateHtml, oe as buildTemplatePreviewHtml, I as buildTemplatePreviewPages, x as cloneTemplateValue, ye as collectTemplateLocationRuleExportErrors, B as collectTemplateValueVariableKeys, R as collectTemplateVariableKeys, D as createBlankPage, k as createBlankTemplate, E as createDefaultPage, O as createDefaultTemplate, b as createDesignerId, j as createTemplateVariable, se as exportTemplateValue, A as getFieldOption, S as getPageSizeOption, C as inferPageFormat, ie as normalizeContractTemplateMaxPages, P as normalizeTemplateValue, w as resolvePageSize, H as splitPageContentByMeasurements, V as syncTemplateVariablesWithPages, L as validateTemplateValue };
|