@gct-paas/word 0.2.45-beta.0 → 1.0.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/README.md +455 -306
- package/dist/browser.js +1 -0
- package/dist/chunks/ModelEditor-GzaLnnX8.js +4621 -0
- package/dist/chunks/ModelEditor-GzaLnnX8.js.map +1 -0
- package/dist/chunks/NodeFactory-D9gVGSok.js +3348 -0
- package/dist/chunks/NodeFactory-D9gVGSok.js.map +1 -0
- package/dist/chunks/abortable-D4G3Ib7H.js +66 -0
- package/dist/chunks/abortable-D4G3Ib7H.js.map +1 -0
- package/dist/chunks/browser-CP0ycXqN.js +14038 -0
- package/dist/chunks/browser-CP0ycXqN.js.map +1 -0
- package/dist/chunks/change-set-DNOw1FXo.js +133 -0
- package/dist/chunks/change-set-DNOw1FXo.js.map +1 -0
- package/dist/chunks/fields-CAcm6X98.js +672 -0
- package/dist/chunks/fields-CAcm6X98.js.map +1 -0
- package/dist/chunks/sdk-DH5c-Bbt.js +33885 -0
- package/dist/chunks/sdk-DH5c-Bbt.js.map +1 -0
- package/dist/chunks/table-borders-Dwuj7lFp.js +50 -0
- package/dist/chunks/table-borders-Dwuj7lFp.js.map +1 -0
- package/dist/chunks/templates-Djcl21k4.js +57 -0
- package/dist/chunks/templates-Djcl21k4.js.map +1 -0
- package/dist/chunks/types-XXuIIZ9e.js +3046 -0
- package/dist/chunks/types-XXuIIZ9e.js.map +1 -0
- package/dist/chunks/word-fonts-BA_Tyfnj.js +14 -0
- package/dist/chunks/word-fonts-BA_Tyfnj.js.map +1 -0
- package/dist/docx.js +1310 -0
- package/dist/docx.js.map +1 -0
- package/dist/index.js +7 -0
- package/dist/pdf.js +181 -0
- package/dist/pdf.js.map +1 -0
- package/dist/platform.js +63 -0
- package/dist/platform.js.map +1 -0
- package/dist/style.css +10917 -0
- package/dist/types/adapters/browser/abortable.d.ts +2 -0
- package/dist/types/adapters/browser/canvas/CanvasPages.d.ts +43 -0
- package/dist/types/adapters/browser/canvas/field-background.d.ts +10 -0
- package/dist/types/adapters/browser/canvas/paint-border.d.ts +5 -0
- package/dist/types/adapters/browser/canvas/paint-code.d.ts +5 -0
- package/dist/types/adapters/browser/canvas/paint-context.d.ts +24 -0
- package/dist/types/adapters/browser/canvas/paint-decorations.d.ts +5 -0
- package/dist/types/adapters/browser/canvas/paint-field.d.ts +5 -0
- package/dist/types/adapters/browser/canvas/paint-guides.d.ts +8 -0
- package/dist/types/adapters/browser/canvas/paint-image.d.ts +6 -0
- package/dist/types/adapters/browser/canvas/paint-page-widget.d.ts +5 -0
- package/dist/types/adapters/browser/canvas/paint-page.d.ts +20 -0
- package/dist/types/adapters/browser/canvas/paint-pixels.d.ts +11 -0
- package/dist/types/adapters/browser/canvas/paint-seal.d.ts +5 -0
- package/dist/types/adapters/browser/canvas/paint-table.d.ts +7 -0
- package/dist/types/adapters/browser/canvas/paint-widget-placeholder.d.ts +6 -0
- package/dist/types/adapters/browser/canvas/types.d.ts +52 -0
- package/dist/types/adapters/browser/fonts/NativeFontResources.d.ts +43 -0
- package/dist/types/adapters/browser/fonts/types.d.ts +35 -0
- package/dist/types/adapters/browser/images/CanvasImageResources.d.ts +52 -0
- package/dist/types/adapters/browser/images/layout-images.d.ts +6 -0
- package/dist/types/adapters/browser/images/load-browser-image.d.ts +4 -0
- package/dist/types/adapters/browser/images/types.d.ts +32 -0
- package/dist/types/adapters/browser/index.d.ts +74 -0
- package/dist/types/adapters/browser/input/CanvasOptionInput.d.ts +39 -0
- package/dist/types/adapters/browser/input/CanvasTextInput.d.ts +123 -0
- package/dist/types/adapters/browser/input/ChoiceFieldInput.d.ts +35 -0
- package/dist/types/adapters/browser/input/FieldInputValidation.d.ts +8 -0
- package/dist/types/adapters/browser/input/InlineFieldInput.d.ts +101 -0
- package/dist/types/adapters/browser/input/SignatureFieldInput.d.ts +57 -0
- package/dist/types/adapters/browser/input/attach-canvas-text-input.d.ts +13 -0
- package/dist/types/adapters/browser/input/business/BusinessFieldInput.d.ts +36 -0
- package/dist/types/adapters/browser/input/business/FieldDialog.d.ts +32 -0
- package/dist/types/adapters/browser/input/business/FieldPopover.d.ts +31 -0
- package/dist/types/adapters/browser/input/business/ReferenceFieldInput.d.ts +55 -0
- package/dist/types/adapters/browser/input/business/ResourceCamera.d.ts +19 -0
- package/dist/types/adapters/browser/input/business/ResourceFieldInput.d.ts +80 -0
- package/dist/types/adapters/browser/input/business/ResourceFieldPreview.d.ts +21 -0
- package/dist/types/adapters/browser/input/business/ResourceFileSizes.d.ts +7 -0
- package/dist/types/adapters/browser/input/business/SealFieldInput.d.ts +59 -0
- package/dist/types/adapters/browser/input/business/TemporalFieldInput.d.ts +30 -0
- package/dist/types/adapters/browser/input/business/dialog-renderer.d.ts +19 -0
- package/dist/types/adapters/browser/input/business/materials/CanvasMaterialTableActions.d.ts +40 -0
- package/dist/types/adapters/browser/input/business/materials/CanvasMaterialsPanel.d.ts +55 -0
- package/dist/types/adapters/browser/input/business/materials/attach-canvas-materials.d.ts +13 -0
- package/dist/types/adapters/browser/input/business/resource-file-icon.d.ts +1 -0
- package/dist/types/adapters/browser/input/business/tables/CanvasBusinessTableActions.d.ts +34 -0
- package/dist/types/adapters/browser/input/business/tables/CanvasBusinessTablePanel.d.ts +59 -0
- package/dist/types/adapters/browser/input/business/tables/CanvasQuickFillDialog.d.ts +69 -0
- package/dist/types/adapters/browser/input/business/tables/CanvasTableScanDialog.d.ts +89 -0
- package/dist/types/adapters/browser/input/business/tables/attach-canvas-business-table.d.ts +13 -0
- package/dist/types/adapters/browser/input/business/tables/fixed-quick-fill-grid.d.ts +19 -0
- package/dist/types/adapters/browser/input/business/tables/table-action-anchors.d.ts +20 -0
- package/dist/types/adapters/browser/input/business/tables/table-actions-renderer.d.ts +45 -0
- package/dist/types/adapters/browser/input/choice-geometry.d.ts +19 -0
- package/dist/types/adapters/browser/input/clipboard/html-style.d.ts +9 -0
- package/dist/types/adapters/browser/input/clipboard/html.d.ts +4 -0
- package/dist/types/adapters/browser/input/clipboard/images.d.ts +3 -0
- package/dist/types/adapters/browser/input/design/CanvasFieldDrag.d.ts +70 -0
- package/dist/types/adapters/browser/input/design/PalettePointerDrag.d.ts +57 -0
- package/dist/types/adapters/browser/input/design/attach-canvas-field-drag.d.ts +13 -0
- package/dist/types/adapters/browser/input/design/catalog/CanvasFieldCatalogPanel.d.ts +95 -0
- package/dist/types/adapters/browser/input/design/catalog/attach-canvas-field-catalog.d.ts +13 -0
- package/dist/types/adapters/browser/input/design/catalog/catalog-field-icon.d.ts +5 -0
- package/dist/types/adapters/browser/input/design/fields/CanvasFieldDesignPanel.d.ts +71 -0
- package/dist/types/adapters/browser/input/design/fields/ChoiceOptionsPanel.d.ts +35 -0
- package/dist/types/adapters/browser/input/design/fields/FieldAttachmentsPanel.d.ts +31 -0
- package/dist/types/adapters/browser/input/design/fields/attach-canvas-field-design.d.ts +13 -0
- package/dist/types/adapters/browser/input/design/fields/controls.d.ts +21 -0
- package/dist/types/adapters/browser/input/design/fields/rules/FieldRulesPanel.d.ts +24 -0
- package/dist/types/adapters/browser/input/design/fields/rules/settings.d.ts +3 -0
- package/dist/types/adapters/browser/input/design/format/CanvasFormatPanel.d.ts +73 -0
- package/dist/types/adapters/browser/input/design/format/attach-canvas-format.d.ts +13 -0
- package/dist/types/adapters/browser/input/design/format/controls.d.ts +22 -0
- package/dist/types/adapters/browser/input/design/objects/CanvasObjectHandles.d.ts +42 -0
- package/dist/types/adapters/browser/input/design/objects/attach-canvas-object-handles.d.ts +13 -0
- package/dist/types/adapters/browser/input/design/objects/gesture-types.d.ts +52 -0
- package/dist/types/adapters/browser/input/design/objects/paint-object-handles.d.ts +6 -0
- package/dist/types/adapters/browser/input/design/objects/project-object-gesture.d.ts +4 -0
- package/dist/types/adapters/browser/input/design/objects/resize-geometry.d.ts +7 -0
- package/dist/types/adapters/browser/input/design/objects/types.d.ts +18 -0
- package/dist/types/adapters/browser/input/design/settings/StructuredSettingsPanel.d.ts +56 -0
- package/dist/types/adapters/browser/input/design/settings/builders.d.ts +16 -0
- package/dist/types/adapters/browser/input/design/settings/types.d.ts +57 -0
- package/dist/types/adapters/browser/input/design/tables/CanvasTableDesignPanel.d.ts +63 -0
- package/dist/types/adapters/browser/input/design/tables/CanvasTableEdges.d.ts +56 -0
- package/dist/types/adapters/browser/input/design/tables/attach-canvas-table-design.d.ts +13 -0
- package/dist/types/adapters/browser/input/design/tables/regions/CanvasRegionDesignPanel.d.ts +84 -0
- package/dist/types/adapters/browser/input/design/tables/regions/CanvasTableRegionMarks.d.ts +29 -0
- package/dist/types/adapters/browser/input/design/tables/regions/attach-canvas-region-design.d.ts +13 -0
- package/dist/types/adapters/browser/input/design/tables/regions/metadata-form.d.ts +26 -0
- package/dist/types/adapters/browser/input/design/tables/regions/settings.d.ts +4 -0
- package/dist/types/adapters/browser/input/design/tables/table-context-menu.d.ts +3 -0
- package/dist/types/adapters/browser/input/design/types.d.ts +33 -0
- package/dist/types/adapters/browser/input/field-geometry.d.ts +50 -0
- package/dist/types/adapters/browser/input/geometry.d.ts +39 -0
- package/dist/types/adapters/browser/input/history/CanvasHistoryMarks.d.ts +41 -0
- package/dist/types/adapters/browser/input/history/types.d.ts +10 -0
- package/dist/types/adapters/browser/input/overlay-layer.d.ts +3 -0
- package/dist/types/adapters/browser/input/scrolling.d.ts +24 -0
- package/dist/types/adapters/browser/input/signature-panel.d.ts +23 -0
- package/dist/types/adapters/browser/input/text-overlay.d.ts +7 -0
- package/dist/types/adapters/browser/input/types.d.ts +89 -0
- package/dist/types/adapters/browser/input/validation/CanvasValidationMarks.d.ts +15 -0
- package/dist/types/adapters/browser/input/validation/CanvasValidationPanel.d.ts +116 -0
- package/dist/types/adapters/browser/input/validation/attach-canvas-validation-panel.d.ts +13 -0
- package/dist/types/adapters/browser/input/word-error-text.d.ts +6 -0
- package/dist/types/adapters/browser/print/print-pages.d.ts +12 -0
- package/dist/types/adapters/browser/print/record-page.d.ts +5 -0
- package/dist/types/adapters/browser/text/CanvasTextMeasurer.d.ts +27 -0
- package/dist/types/adapters/browser/text/apply-text-style.d.ts +5 -0
- package/dist/types/adapters/browser/text/types.d.ts +3 -0
- package/dist/types/adapters/browser/viewport.d.ts +7 -0
- package/dist/types/adapters/document/DocumentFontPreparation.d.ts +31 -0
- package/dist/types/adapters/document/WordCanvasHost.d.ts +131 -0
- package/dist/types/adapters/document/communication-values.d.ts +8 -0
- package/dist/types/adapters/document/field-options.d.ts +114 -0
- package/dist/types/adapters/document/types.d.ts +143 -0
- package/dist/types/adapters/platform/association-products.d.ts +12 -0
- package/dist/types/adapters/platform/barcode-rules.d.ts +24 -0
- package/dist/types/adapters/platform/business-formulas.d.ts +11 -0
- package/dist/types/adapters/platform/business-response.d.ts +2 -0
- package/dist/types/adapters/platform/device-reference-filter.d.ts +7 -0
- package/dist/types/adapters/platform/directory-references.d.ts +3 -0
- package/dist/types/adapters/platform/docx.d.ts +3 -0
- package/dist/types/adapters/platform/field-catalog/catalog.d.ts +12 -0
- package/dist/types/adapters/platform/field-catalog/field-business-rules.d.ts +28 -0
- package/dist/types/adapters/platform/field-catalog/field-definition.d.ts +14 -0
- package/dist/types/adapters/platform/field-catalog/field-options.d.ts +3 -0
- package/dist/types/adapters/platform/field-catalog/table-model-types.d.ts +5 -0
- package/dist/types/adapters/platform/field-defaults.d.ts +3 -0
- package/dist/types/adapters/platform/field-dialogs.d.ts +79 -0
- package/dist/types/adapters/platform/fill-ports.d.ts +23 -0
- package/dist/types/adapters/platform/fonts.d.ts +3 -0
- package/dist/types/adapters/platform/form-history-schema.d.ts +18 -0
- package/dist/types/adapters/platform/form-instance-actions.d.ts +51 -0
- package/dist/types/adapters/platform/form-instance-communication.d.ts +10 -0
- package/dist/types/adapters/platform/form-instance-data.d.ts +6 -0
- package/dist/types/adapters/platform/form-instance-history-view.d.ts +22 -0
- package/dist/types/adapters/platform/form-instance-history.d.ts +12 -0
- package/dist/types/adapters/platform/form-instance.d.ts +37 -0
- package/dist/types/adapters/platform/formula-functions.d.ts +90 -0
- package/dist/types/adapters/platform/formula-variables.d.ts +15 -0
- package/dist/types/adapters/platform/index.d.ts +2 -0
- package/dist/types/adapters/platform/lot-display-label.d.ts +4 -0
- package/dist/types/adapters/platform/material-instance.d.ts +24 -0
- package/dist/types/adapters/platform/material-services.d.ts +6 -0
- package/dist/types/adapters/platform/page-image.d.ts +8 -0
- package/dist/types/adapters/platform/product-release-lots.d.ts +3 -0
- package/dist/types/adapters/platform/readonly-records.d.ts +40 -0
- package/dist/types/adapters/platform/reference-columns.d.ts +21 -0
- package/dist/types/adapters/platform/reference-policies.d.ts +9 -0
- package/dist/types/adapters/platform/reference-read-scope.d.ts +26 -0
- package/dist/types/adapters/platform/reference-restrictions.d.ts +13 -0
- package/dist/types/adapters/platform/reference-source-policy.d.ts +12 -0
- package/dist/types/adapters/platform/reference-version-label.d.ts +4 -0
- package/dist/types/adapters/platform/rule-settings.d.ts +65 -0
- package/dist/types/adapters/platform/source-catalog.d.ts +39 -0
- package/dist/types/adapters/platform/source-executor.d.ts +3 -0
- package/dist/types/adapters/platform/source-ipaas.d.ts +14 -0
- package/dist/types/adapters/platform/special-field-values.d.ts +3 -0
- package/dist/types/adapters/platform/substitution-records.d.ts +11 -0
- package/dist/types/adapters/platform/table-references.d.ts +17 -0
- package/dist/types/adapters/platform/table-scan.d.ts +3 -0
- package/dist/types/adapters/platform/template-business-fields.d.ts +24 -0
- package/dist/types/adapters/platform/template-fields.d.ts +15 -0
- package/dist/types/adapters/platform/templates.d.ts +23 -0
- package/dist/types/adapters/platform/validation-model-names.d.ts +3 -0
- package/dist/types/adapters/platform/withdrawn-form-change.d.ts +15 -0
- package/dist/types/adapters/vue/BusinessTableActions.vue.d.ts +10 -0
- package/dist/types/adapters/vue/ChoiceFieldPanel.vue.d.ts +11 -0
- package/dist/types/adapters/vue/FieldSelectActions.vue.d.ts +31 -0
- package/dist/types/adapters/vue/GctWordPrintRenderer.vue.d.ts +33 -0
- package/dist/types/adapters/vue/GctWordTemplateComparison.vue.d.ts +6 -0
- package/dist/types/adapters/vue/GctWordTemplateDesigner.vue.d.ts +46 -0
- package/dist/types/adapters/vue/GctWordTemplatePreview.vue.d.ts +42 -0
- package/dist/types/adapters/vue/ReferenceFieldPanel.vue.d.ts +9 -0
- package/dist/types/adapters/vue/SignatureCardReader.vue.d.ts +8 -0
- package/dist/types/adapters/vue/SignatureFieldPanel.vue.d.ts +12 -0
- package/dist/types/adapters/vue/WordAttachmentList.vue.d.ts +10 -0
- package/dist/types/adapters/vue/WordDesigner.d.ts +99 -0
- package/dist/types/adapters/vue/WordDocumentLoading.vue.d.ts +8 -0
- package/dist/types/adapters/vue/WordPdfExportOptions.vue.d.ts +7 -0
- package/dist/types/adapters/vue/WordRenderer.d.ts +81 -0
- package/dist/types/adapters/vue/WordShortcutHelp.vue.d.ts +3 -0
- package/dist/types/adapters/vue/WordShortcutReference.vue.d.ts +3 -0
- package/dist/types/adapters/vue/WordTemplateImportStatus.vue.d.ts +6 -0
- package/dist/types/adapters/vue/business-table-actions.d.ts +2 -0
- package/dist/types/adapters/vue/choice-field-panel.d.ts +2 -0
- package/dist/types/adapters/vue/data-properties/WordCommunicationActions.vue.d.ts +32 -0
- package/dist/types/adapters/vue/data-properties/WordDataProperties.vue.d.ts +35 -0
- package/dist/types/adapters/vue/data-properties/WordObjectInitDialog.vue.d.ts +21 -0
- package/dist/types/adapters/vue/data-properties/WordObjectUserSelect.vue.d.ts +14 -0
- package/dist/types/adapters/vue/data-properties/WordOcrCamera.vue.d.ts +11 -0
- package/dist/types/adapters/vue/data-properties/WordOcrHistory.vue.d.ts +9 -0
- package/dist/types/adapters/vue/data-properties/WordRuntimeDataSources.vue.d.ts +8 -0
- package/dist/types/adapters/vue/data-properties/data-options.d.ts +8 -0
- package/dist/types/adapters/vue/data-properties/useWordFormCommunication.d.ts +32 -0
- package/dist/types/adapters/vue/data-properties/word-device-connections.d.ts +37 -0
- package/dist/types/adapters/vue/data-properties/word-object-ports.d.ts +5 -0
- package/dist/types/adapters/vue/data-properties/word-ocr-camera.d.ts +3 -0
- package/dist/types/adapters/vue/data-properties/word-source-ports.d.ts +4 -0
- package/dist/types/adapters/vue/field-dialog.d.ts +2 -0
- package/dist/types/adapters/vue/field-properties/FieldAttachmentList.vue.d.ts +17 -0
- package/dist/types/adapters/vue/field-properties/FieldAttributeValue.vue.d.ts +21 -0
- package/dist/types/adapters/vue/field-properties/FieldAutofill.vue.d.ts +14 -0
- package/dist/types/adapters/vue/field-properties/FieldAutofillDialog.vue.d.ts +21 -0
- package/dist/types/adapters/vue/field-properties/FieldBarcodeRules.vue.d.ts +13 -0
- package/dist/types/adapters/vue/field-properties/FieldBarcodeRulesDialog.vue.d.ts +17 -0
- package/dist/types/adapters/vue/field-properties/FieldChoiceOptionDialog.vue.d.ts +17 -0
- package/dist/types/adapters/vue/field-properties/FieldCommonRegex.vue.d.ts +16 -0
- package/dist/types/adapters/vue/field-properties/FieldDateSettings.vue.d.ts +9 -0
- package/dist/types/adapters/vue/field-properties/FieldDependencies.vue.d.ts +15 -0
- package/dist/types/adapters/vue/field-properties/FieldDependencyDialog.vue.d.ts +24 -0
- package/dist/types/adapters/vue/field-properties/FieldLabelHelp.vue.d.ts +25 -0
- package/dist/types/adapters/vue/field-properties/FieldOptionIcon.vue.d.ts +9 -0
- package/dist/types/adapters/vue/field-properties/FieldOptions.vue.d.ts +11 -0
- package/dist/types/adapters/vue/field-properties/FieldPropertyControl.vue.d.ts +14 -0
- package/dist/types/adapters/vue/field-properties/FieldRangeBound.vue.d.ts +18 -0
- package/dist/types/adapters/vue/field-properties/FieldRangeFormula.vue.d.ts +20 -0
- package/dist/types/adapters/vue/field-properties/FieldRangeSettings.vue.d.ts +12 -0
- package/dist/types/adapters/vue/field-properties/FieldRecordSelect.vue.d.ts +23 -0
- package/dist/types/adapters/vue/field-properties/FieldRegexEditor.vue.d.ts +16 -0
- package/dist/types/adapters/vue/field-properties/FieldRelationSettings.vue.d.ts +15 -0
- package/dist/types/adapters/vue/field-properties/FieldResourceSettings.vue.d.ts +12 -0
- package/dist/types/adapters/vue/field-properties/FieldSignatureDisplay.vue.d.ts +12 -0
- package/dist/types/adapters/vue/field-properties/FieldSignatureSettings.vue.d.ts +15 -0
- package/dist/types/adapters/vue/field-properties/FieldSpecialSettings.vue.d.ts +11 -0
- package/dist/types/adapters/vue/field-properties/FieldTemplateSelect.vue.d.ts +14 -0
- package/dist/types/adapters/vue/field-properties/FieldTextValidation.vue.d.ts +11 -0
- package/dist/types/adapters/vue/field-properties/WordFieldProperties.vue.d.ts +14 -0
- package/dist/types/adapters/vue/field-properties/field-autofill-presets.d.ts +14 -0
- package/dist/types/adapters/vue/field-properties/field-number-settings.d.ts +12 -0
- package/dist/types/adapters/vue/field-properties/field-panel-metadata.d.ts +15 -0
- package/dist/types/adapters/vue/field-properties/field-property-policy.d.ts +16 -0
- package/dist/types/adapters/vue/field-properties/field-rule-trees.d.ts +12 -0
- package/dist/types/adapters/vue/field-properties/field-targets.d.ts +20 -0
- package/dist/types/adapters/vue/field-type-label.d.ts +2 -0
- package/dist/types/adapters/vue/icons/paper.d.ts +23 -0
- package/dist/types/adapters/vue/icons/toolkit.d.ts +19 -0
- package/dist/types/adapters/vue/index.d.ts +26 -0
- package/dist/types/adapters/vue/open-template-comparison.d.ts +4 -0
- package/dist/types/adapters/vue/page-widget-properties/WidgetFieldDrop.vue.d.ts +20 -0
- package/dist/types/adapters/vue/page-widget-properties/WidgetImageUpload.vue.d.ts +16 -0
- package/dist/types/adapters/vue/page-widget-properties/WidgetLabelStyle.vue.d.ts +13 -0
- package/dist/types/adapters/vue/page-widget-properties/WidgetNumber.vue.d.ts +22 -0
- package/dist/types/adapters/vue/page-widget-properties/WidgetSize.vue.d.ts +21 -0
- package/dist/types/adapters/vue/page-widget-properties/WidgetTextArea.vue.d.ts +17 -0
- package/dist/types/adapters/vue/page-widget-properties/WordPageWidgetProperties.vue.d.ts +20 -0
- package/dist/types/adapters/vue/page-widget-properties/widget-options.d.ts +212 -0
- package/dist/types/adapters/vue/reference-field-options.d.ts +5 -0
- package/dist/types/adapters/vue/reference-field-panel.d.ts +2 -0
- package/dist/types/adapters/vue/region-properties/MaterialBomEntryDialog.vue.d.ts +16 -0
- package/dist/types/adapters/vue/region-properties/WordBusinessRegion.vue.d.ts +24 -0
- package/dist/types/adapters/vue/region-properties/WordMaterialTableSettings.vue.d.ts +17 -0
- package/dist/types/adapters/vue/region-properties/WordRegionConfirmDelete.vue.d.ts +9 -0
- package/dist/types/adapters/vue/region-properties/WordRegionGridInfo.vue.d.ts +13 -0
- package/dist/types/adapters/vue/region-properties/WordRepeatingTableSettings.vue.d.ts +24 -0
- package/dist/types/adapters/vue/renderWordWorkspace.d.ts +38 -0
- package/dist/types/adapters/vue/rule-properties/DecisionRuleGroup.vue.d.ts +21 -0
- package/dist/types/adapters/vue/rule-properties/InspectionRuleDialog.vue.d.ts +15 -0
- package/dist/types/adapters/vue/rule-properties/NotificationFieldPicker.vue.d.ts +13 -0
- package/dist/types/adapters/vue/rule-properties/NotificationRuleDialog.vue.d.ts +17 -0
- package/dist/types/adapters/vue/rule-properties/RuleFieldSelect.vue.d.ts +16 -0
- package/dist/types/adapters/vue/rule-properties/UnitConversionDialog.vue.d.ts +15 -0
- package/dist/types/adapters/vue/rule-properties/WordRuleProperties.vue.d.ts +18 -0
- package/dist/types/adapters/vue/rule-properties/inspection-prompt.d.ts +3 -0
- package/dist/types/adapters/vue/rule-properties/rule-draft.d.ts +9 -0
- package/dist/types/adapters/vue/signature-field-panel.d.ts +2 -0
- package/dist/types/adapters/vue/template-properties/SignatureRulesDialog.vue.d.ts +16 -0
- package/dist/types/adapters/vue/template-properties/WordFormSettings.vue.d.ts +12 -0
- package/dist/types/adapters/vue/temporal-field-panel.d.ts +2 -0
- package/dist/types/adapters/vue/types.d.ts +152 -0
- package/dist/types/adapters/vue/useGctTableAccess.d.ts +10 -0
- package/dist/types/adapters/vue/useGctWordInstance.d.ts +69 -0
- package/dist/types/adapters/vue/useWordWorkspace.d.ts +190 -0
- package/dist/types/adapters/vue/word-data-console.d.ts +27 -0
- package/dist/types/adapters/vue/word-designer-chrome.d.ts +16 -0
- package/dist/types/adapters/vue/word-designer-page.d.ts +10 -0
- package/dist/types/adapters/vue/word-designer-table-dialogs.d.ts +14 -0
- package/dist/types/adapters/vue/word-designer-table-menu.d.ts +23 -0
- package/dist/types/adapters/vue/word-instance-credentials.d.ts +3 -0
- package/dist/types/adapters/vue/word-readonly-browse.d.ts +16 -0
- package/dist/types/data/DataManager.d.ts +143 -0
- package/dist/types/data/index.d.ts +7 -0
- package/dist/types/data/paths/derived.d.ts +22 -0
- package/dist/types/data/paths/relations.d.ts +5 -0
- package/dist/types/data/post-change-pipeline.d.ts +30 -0
- package/dist/types/data/rows/active.d.ts +6 -0
- package/dist/types/data/services/DataChangeCoordinator.d.ts +60 -0
- package/dist/types/data/services/DataDefaults.d.ts +41 -0
- package/dist/types/data/services/DataDependencies.d.ts +40 -0
- package/dist/types/data/services/DataInitialization.d.ts +24 -0
- package/dist/types/data/services/DataMatrix.d.ts +45 -0
- package/dist/types/data/services/DataRows.d.ts +25 -0
- package/dist/types/data/services/DataRuntimeConfiguration.d.ts +21 -0
- package/dist/types/data/services/DataValues.d.ts +47 -0
- package/dist/types/data/services/DataWriteBatch.d.ts +14 -0
- package/dist/types/data/services/JsonDataPaths.d.ts +25 -0
- package/dist/types/data/services/context.d.ts +34 -0
- package/dist/types/data/services/create-data-services.d.ts +5 -0
- package/dist/types/data/services/lifetime.d.ts +26 -0
- package/dist/types/data/types/configuration.d.ts +21 -0
- package/dist/types/data/types/manager.d.ts +51 -0
- package/dist/types/data/types/rules.d.ts +42 -0
- package/dist/types/data/types/values.d.ts +46 -0
- package/dist/types/data/value-semantics/classify.d.ts +17 -0
- package/dist/types/data/value-semantics/collection.d.ts +17 -0
- package/dist/types/data/value-semantics/index.d.ts +7 -0
- package/dist/types/data/value-semantics/policy.d.ts +13 -0
- package/dist/types/data/value-semantics/scalars.d.ts +20 -0
- package/dist/types/data/value-semantics/types.d.ts +76 -0
- package/dist/types/data/value-semantics/validation.d.ts +16 -0
- package/dist/types/import/docx/content.d.ts +38 -0
- package/dist/types/import/docx/index.d.ts +4 -0
- package/dist/types/import/docx/math-image.d.ts +9 -0
- package/dist/types/import/docx/mathml.d.ts +3 -0
- package/dist/types/import/docx/numbering.d.ts +26 -0
- package/dist/types/import/docx/source.d.ts +40 -0
- package/dist/types/import/docx/styles.d.ts +33 -0
- package/dist/types/import/docx/tables.d.ts +7 -0
- package/dist/types/import/docx/types.d.ts +30 -0
- package/dist/types/layout/cache/BoundedMeasurementCache.d.ts +37 -0
- package/dist/types/layout/cache/ControlMeasurementCache.d.ts +33 -0
- package/dist/types/layout/cache/DocumentLayoutWorkspace.d.ts +47 -0
- package/dist/types/layout/cache/ParagraphMeasurementCache.d.ts +41 -0
- package/dist/types/layout/cache/TableMeasurementCache.d.ts +40 -0
- package/dist/types/layout/cache/TextMeasurementCache.d.ts +26 -0
- package/dist/types/layout/cache/data.d.ts +5 -0
- package/dist/types/layout/cache/environment.d.ts +25 -0
- package/dist/types/layout/cache/style-key.d.ts +8 -0
- package/dist/types/layout/cache/table-key.d.ts +9 -0
- package/dist/types/layout/coordinates.d.ts +10 -0
- package/dist/types/layout/engine/DocumentLayoutBuilder.d.ts +15 -0
- package/dist/types/layout/engine/atoms/code-widgets.d.ts +16 -0
- package/dist/types/layout/engine/atoms/control-decoration.d.ts +6 -0
- package/dist/types/layout/engine/atoms/control-flow.d.ts +8 -0
- package/dist/types/layout/engine/atoms/diagonal.d.ts +28 -0
- package/dist/types/layout/engine/atoms/field-control-window.d.ts +6 -0
- package/dist/types/layout/engine/atoms/field-control.d.ts +53 -0
- package/dist/types/layout/engine/atoms/fit-atomic.d.ts +23 -0
- package/dist/types/layout/engine/atoms/images.d.ts +10 -0
- package/dist/types/layout/engine/atoms/leading-image.d.ts +5 -0
- package/dist/types/layout/engine/atoms/page-widgets.d.ts +69 -0
- package/dist/types/layout/engine/atoms/seals.d.ts +7 -0
- package/dist/types/layout/engine/atoms/signatures.d.ts +7 -0
- package/dist/types/layout/engine/blocks/measure-blocks.d.ts +54 -0
- package/dist/types/layout/engine/blocks/place-blocks.d.ts +26 -0
- package/dist/types/layout/engine/context.d.ts +67 -0
- package/dist/types/layout/engine/measurement.d.ts +5 -0
- package/dist/types/layout/engine/pages/finalize-codes.d.ts +5 -0
- package/dist/types/layout/engine/pages/overlay-pages.d.ts +8 -0
- package/dist/types/layout/engine/pages/overlays.d.ts +5 -0
- package/dist/types/layout/engine/pages/page-regions.d.ts +29 -0
- package/dist/types/layout/engine/pagination/content-flow.d.ts +92 -0
- package/dist/types/layout/engine/pagination/content-page-break.d.ts +4 -0
- package/dist/types/layout/engine/pagination/line-flow.d.ts +85 -0
- package/dist/types/layout/engine/pagination/page.d.ts +14 -0
- package/dist/types/layout/engine/pagination/paragraph-pagination.d.ts +6 -0
- package/dist/types/layout/engine/pagination/place-line.d.ts +8 -0
- package/dist/types/layout/engine/pagination/placement-occurrence.d.ts +7 -0
- package/dist/types/layout/engine/pagination/placement-window.d.ts +17 -0
- package/dist/types/layout/engine/paragraph/justify-line.d.ts +6 -0
- package/dist/types/layout/engine/paragraph/paragraph-lines.d.ts +5 -0
- package/dist/types/layout/engine/paragraph/paragraph-sources.d.ts +72 -0
- package/dist/types/layout/engine/paragraph/prepare-paragraph.d.ts +29 -0
- package/dist/types/layout/engine/paragraph/text-vertical.d.ts +11 -0
- package/dist/types/layout/engine/paragraph/types.d.ts +223 -0
- package/dist/types/layout/engine/tables/cell-images.d.ts +4 -0
- package/dist/types/layout/engine/tables/fit-cell-content.d.ts +12 -0
- package/dist/types/layout/engine/tables/measure-table.d.ts +10 -0
- package/dist/types/layout/engine/tables/place-table-page.d.ts +6 -0
- package/dist/types/layout/engine/tables/place-table-window.d.ts +18 -0
- package/dist/types/layout/engine/tables/row-flow.d.ts +108 -0
- package/dist/types/layout/engine/tables/table-border-plan.d.ts +42 -0
- package/dist/types/layout/engine/tables/table-borders.d.ts +17 -0
- package/dist/types/layout/engine/tables/table-column-sizing.d.ts +12 -0
- package/dist/types/layout/engine/tables/table-flow-index.d.ts +49 -0
- package/dist/types/layout/engine/tables/table-flow.d.ts +91 -0
- package/dist/types/layout/engine/tables/table-headers.d.ts +6 -0
- package/dist/types/layout/engine/tables/table-pagination.d.ts +7 -0
- package/dist/types/layout/engine/tables/table-presentation-groups.d.ts +11 -0
- package/dist/types/layout/engine/tables/table-row-sizing.d.ts +31 -0
- package/dist/types/layout/engine/tables/table-types.d.ts +101 -0
- package/dist/types/layout/errors.d.ts +10 -0
- package/dist/types/layout/geometry/rectangles.d.ts +8 -0
- package/dist/types/layout/geometry/text.d.ts +16 -0
- package/dist/types/layout/guards.d.ts +57 -0
- package/dist/types/layout/image-source.d.ts +4 -0
- package/dist/types/layout/incremental/IncrementalPaginationWorkspace.d.ts +86 -0
- package/dist/types/layout/incremental/eligibility.d.ts +35 -0
- package/dist/types/layout/incremental/invalidation.d.ts +6 -0
- package/dist/types/layout/incremental/recorder.d.ts +34 -0
- package/dist/types/layout/incremental/replay.d.ts +6 -0
- package/dist/types/layout/incremental/table-pagination.d.ts +13 -0
- package/dist/types/layout/incremental/types.d.ts +127 -0
- package/dist/types/layout/index.d.ts +32 -0
- package/dist/types/layout/instances/table-grid.d.ts +9 -0
- package/dist/types/layout/ports/input.d.ts +87 -0
- package/dist/types/layout/ports/measurement.d.ts +37 -0
- package/dist/types/layout/ports/presentation.d.ts +131 -0
- package/dist/types/layout/query/LayoutQuery.d.ts +59 -0
- package/dist/types/layout/query/cache/QueryIndexWorkspace.d.ts +50 -0
- package/dist/types/layout/query/cache/immutable.d.ts +3 -0
- package/dist/types/layout/query/cache/types.d.ts +69 -0
- package/dist/types/layout/query/fragment-styles.d.ts +7 -0
- package/dist/types/layout/query/index-instances.d.ts +4 -0
- package/dist/types/layout/query/index-result.d.ts +36 -0
- package/dist/types/layout/query/validation.d.ts +26 -0
- package/dist/types/layout/session/LayoutSession.d.ts +80 -0
- package/dist/types/layout/session/errors.d.ts +22 -0
- package/dist/types/layout/session/registrations.d.ts +23 -0
- package/dist/types/layout/source.d.ts +13 -0
- package/dist/types/layout/styles/resolve-text-style.d.ts +8 -0
- package/dist/types/layout/synchronous.d.ts +3 -0
- package/dist/types/layout/types/cache.d.ts +24 -0
- package/dist/types/layout/types/endpoint.d.ts +16 -0
- package/dist/types/layout/types/fragments.d.ts +179 -0
- package/dist/types/layout/types/geometry.d.ts +37 -0
- package/dist/types/layout/types/identity.d.ts +66 -0
- package/dist/types/layout/types/presentation/codes.d.ts +64 -0
- package/dist/types/layout/types/presentation/controls.d.ts +202 -0
- package/dist/types/layout/types/presentation/images.d.ts +30 -0
- package/dist/types/layout/types/presentation/overlays.d.ts +74 -0
- package/dist/types/layout/types/presentation/seals.d.ts +24 -0
- package/dist/types/layout/types/presentation/signatures.d.ts +20 -0
- package/dist/types/layout/types/presentation/widgets.d.ts +74 -0
- package/dist/types/layout/types/query.d.ts +139 -0
- package/dist/types/layout/types/result.d.ts +80 -0
- package/dist/types/layout/types/session.d.ts +61 -0
- package/dist/types/layout/types/source.d.ts +88 -0
- package/dist/types/layout/types/text.d.ts +35 -0
- package/dist/types/layout/units.d.ts +15 -0
- package/dist/types/layout/versions.d.ts +9 -0
- package/dist/types/model/business/business-schema.d.ts +9 -0
- package/dist/types/model/business/business-types.d.ts +326 -0
- package/dist/types/model/business/communication-schema.d.ts +3 -0
- package/dist/types/model/business/data-source-schema.d.ts +11 -0
- package/dist/types/model/business/data-source-types.d.ts +134 -0
- package/dist/types/model/business/document-business-schema.d.ts +7 -0
- package/dist/types/model/business/document-business-types.d.ts +170 -0
- package/dist/types/model/business/document-signature-schema.d.ts +7 -0
- package/dist/types/model/business/exception-highlight.d.ts +4 -0
- package/dist/types/model/business/field-schema-common.d.ts +35 -0
- package/dist/types/model/business/initialization-schema.d.ts +7 -0
- package/dist/types/model/business/initialization-types.d.ts +167 -0
- package/dist/types/model/business/material-schema.d.ts +12 -0
- package/dist/types/model/business/material-types.d.ts +154 -0
- package/dist/types/model/business/number-minimum.d.ts +2 -0
- package/dist/types/model/business/page-widget-schema.d.ts +7 -0
- package/dist/types/model/business/page-widget-types.d.ts +144 -0
- package/dist/types/model/business/product-autofill.d.ts +16 -0
- package/dist/types/model/business/relation-schema.d.ts +7 -0
- package/dist/types/model/business/relation-types.d.ts +110 -0
- package/dist/types/model/business/table-field-defaults.d.ts +14 -0
- package/dist/types/model/business/table-variants.d.ts +21 -0
- package/dist/types/model/config/config-references.d.ts +30 -0
- package/dist/types/model/config/config-registry.d.ts +34 -0
- package/dist/types/model/config/config-types.d.ts +29 -0
- package/dist/types/model/config/config-uses.d.ts +22 -0
- package/dist/types/model/editor/ModelEditor.d.ts +209 -0
- package/dist/types/model/editor/NodeEditor.d.ts +80 -0
- package/dist/types/model/editor/NodeFactory.d.ts +65 -0
- package/dist/types/model/editor/RangeEditor.d.ts +97 -0
- package/dist/types/model/editor/TableEditor.d.ts +76 -0
- package/dist/types/model/editor/cell-paste.d.ts +5 -0
- package/dist/types/model/editor/change-set-types.d.ts +169 -0
- package/dist/types/model/editor/change-set-validation.d.ts +7 -0
- package/dist/types/model/editor/change-set.d.ts +11 -0
- package/dist/types/model/editor/content-fragment.d.ts +6 -0
- package/dist/types/model/editor/create-document.d.ts +20 -0
- package/dist/types/model/editor/cross-container-edit.d.ts +16 -0
- package/dist/types/model/editor/editing-context.d.ts +54 -0
- package/dist/types/model/editor/editor-data.d.ts +25 -0
- package/dist/types/model/editor/factory-types.d.ts +172 -0
- package/dist/types/model/editor/factory-validation.d.ts +18 -0
- package/dist/types/model/editor/format-update.d.ts +9 -0
- package/dist/types/model/editor/fragment-appearance.d.ts +4 -0
- package/dist/types/model/editor/fragment-data.d.ts +18 -0
- package/dist/types/model/editor/history-types.d.ts +8 -0
- package/dist/types/model/editor/model-editor-types.d.ts +59 -0
- package/dist/types/model/editor/node-edit-types.d.ts +146 -0
- package/dist/types/model/editor/operation-engine.d.ts +29 -0
- package/dist/types/model/editor/range-edit-types.d.ts +93 -0
- package/dist/types/model/editor/section-copy.d.ts +5 -0
- package/dist/types/model/editor/table-edit-types.d.ts +75 -0
- package/dist/types/model/editor/table-fragment.d.ts +6 -0
- package/dist/types/model/index.d.ts +42 -0
- package/dist/types/model/query/ModelQuery.d.ts +114 -0
- package/dist/types/model/query/compare-field-configurations.d.ts +47 -0
- package/dist/types/model/query/content-tree.d.ts +36 -0
- package/dist/types/model/query/derive-style.d.ts +6 -0
- package/dist/types/model/query/document-comparison/compare-document-content.d.ts +8 -0
- package/dist/types/model/query/document-comparison/matching.d.ts +7 -0
- package/dist/types/model/query/document-comparison/normalize.d.ts +4 -0
- package/dist/types/model/query/document-comparison/projection.d.ts +10 -0
- package/dist/types/model/query/document-comparison/types.d.ts +79 -0
- package/dist/types/model/query/entity-index.d.ts +55 -0
- package/dist/types/model/query/normalize-binding.d.ts +5 -0
- package/dist/types/model/query/query-types.d.ts +211 -0
- package/dist/types/model/query/reference-query.d.ts +17 -0
- package/dist/types/model/query/section-copy-roots.d.ts +4 -0
- package/dist/types/model/query/section-removal.d.ts +4 -0
- package/dist/types/model/query/table-geometry.d.ts +24 -0
- package/dist/types/model/query/table-query.d.ts +24 -0
- package/dist/types/model/query/template-save-validation.d.ts +13 -0
- package/dist/types/model/serialization/codec.d.ts +21 -0
- package/dist/types/model/serialization/fragment-types.d.ts +37 -0
- package/dist/types/model/serialization/fragment.d.ts +10 -0
- package/dist/types/model/types/content.d.ts +59 -0
- package/dist/types/model/types/document.d.ts +54 -0
- package/dist/types/model/types/fields.d.ts +145 -0
- package/dist/types/model/types/primitives.d.ts +61 -0
- package/dist/types/model/types/resources.d.ts +54 -0
- package/dist/types/model/types/sections.d.ts +91 -0
- package/dist/types/model/types/styles.d.ts +185 -0
- package/dist/types/model/types/tables.d.ts +110 -0
- package/dist/types/model/types/widgets.d.ts +49 -0
- package/dist/types/model/types.d.ts +19 -0
- package/dist/types/model/validation/json-data.d.ts +23 -0
- package/dist/types/model/validation/schema.d.ts +126 -0
- package/dist/types/model/validation/validation.d.ts +45 -0
- package/dist/types/output/pdf/encode-pdf.d.ts +9 -0
- package/dist/types/output/pdf/index.d.ts +4 -0
- package/dist/types/runtime/form/NativeBusinessFields.d.ts +149 -0
- package/dist/types/runtime/form/NativeDataServices.d.ts +76 -0
- package/dist/types/runtime/form/attach-session-data.d.ts +6 -0
- package/dist/types/runtime/form/business/attachments/NativeResources.d.ts +37 -0
- package/dist/types/runtime/form/business/attachments/index.d.ts +3 -0
- package/dist/types/runtime/form/business/attachments/types.d.ts +57 -0
- package/dist/types/runtime/form/business/attachments/values.d.ts +19 -0
- package/dist/types/runtime/form/business/authentication-value.d.ts +4 -0
- package/dist/types/runtime/form/business/browse/action-values.d.ts +9 -0
- package/dist/types/runtime/form/business/document-rules/inspection.d.ts +4 -0
- package/dist/types/runtime/form/business/inspection/NativeCheckFields.d.ts +34 -0
- package/dist/types/runtime/form/business/inspection/NativeInspectionInitialization.d.ts +66 -0
- package/dist/types/runtime/form/business/inspection/identity.d.ts +11 -0
- package/dist/types/runtime/form/business/inspection/index.d.ts +3 -0
- package/dist/types/runtime/form/business/inspection/types.d.ts +40 -0
- package/dist/types/runtime/form/business/materials/NativeMaterialInitialization.d.ts +42 -0
- package/dist/types/runtime/form/business/materials/NativeMaterialObjects.d.ts +36 -0
- package/dist/types/runtime/form/business/materials/NativeMaterialSelection.d.ts +48 -0
- package/dist/types/runtime/form/business/materials/NativeMaterials.d.ts +94 -0
- package/dist/types/runtime/form/business/materials/conversion/NativeMaterialConversions.d.ts +73 -0
- package/dist/types/runtime/form/business/materials/conversion/plan.d.ts +45 -0
- package/dist/types/runtime/form/business/materials/conversion/types.d.ts +39 -0
- package/dist/types/runtime/form/business/materials/entries.d.ts +7 -0
- package/dist/types/runtime/form/business/materials/groups.d.ts +5 -0
- package/dist/types/runtime/form/business/materials/index.d.ts +13 -0
- package/dist/types/runtime/form/business/materials/object-fields.d.ts +15 -0
- package/dist/types/runtime/form/business/materials/rows/NativeMaterialEditing.d.ts +54 -0
- package/dist/types/runtime/form/business/materials/rows/NativeMaterialRows.d.ts +54 -0
- package/dist/types/runtime/form/business/materials/rows/append-row.d.ts +6 -0
- package/dist/types/runtime/form/business/materials/rows/types.d.ts +36 -0
- package/dist/types/runtime/form/business/materials/scan/NativeMaterialScan.d.ts +29 -0
- package/dist/types/runtime/form/business/materials/scan/barcode.d.ts +19 -0
- package/dist/types/runtime/form/business/materials/scan/plan.d.ts +21 -0
- package/dist/types/runtime/form/business/materials/scan/types.d.ts +86 -0
- package/dist/types/runtime/form/business/materials/scan/write.d.ts +6 -0
- package/dist/types/runtime/form/business/materials/selection-policy.d.ts +12 -0
- package/dist/types/runtime/form/business/materials/table-access.d.ts +13 -0
- package/dist/types/runtime/form/business/materials/task-context.d.ts +26 -0
- package/dist/types/runtime/form/business/materials/types.d.ts +145 -0
- package/dist/types/runtime/form/business/materials/validation/NativeMaterialActions.d.ts +52 -0
- package/dist/types/runtime/form/business/materials/validation/NativeMaterialTableValidator.d.ts +42 -0
- package/dist/types/runtime/form/business/materials/validation/NativeMaterialValidator.d.ts +43 -0
- package/dist/types/runtime/form/business/materials/validation/group.d.ts +46 -0
- package/dist/types/runtime/form/business/materials/validation/lot.d.ts +10 -0
- package/dist/types/runtime/form/business/materials/validation/object-types.d.ts +66 -0
- package/dist/types/runtime/form/business/materials/validation/object.d.ts +24 -0
- package/dist/types/runtime/form/business/materials/validation/quantity.d.ts +18 -0
- package/dist/types/runtime/form/business/materials/validation/sequence.d.ts +9 -0
- package/dist/types/runtime/form/business/materials/validation/table-plan.d.ts +19 -0
- package/dist/types/runtime/form/business/materials/validation/table-types.d.ts +28 -0
- package/dist/types/runtime/form/business/materials/validation/types.d.ts +121 -0
- package/dist/types/runtime/form/business/objects/index.d.ts +2 -0
- package/dist/types/runtime/form/business/objects/submission.d.ts +5 -0
- package/dist/types/runtime/form/business/objects/targets.d.ts +6 -0
- package/dist/types/runtime/form/business/references/NativeReferenceScanner.d.ts +46 -0
- package/dist/types/runtime/form/business/references/NativeReferences.d.ts +124 -0
- package/dist/types/runtime/form/business/references/groups.d.ts +18 -0
- package/dist/types/runtime/form/business/references/id-changes.d.ts +3 -0
- package/dist/types/runtime/form/business/references/index.d.ts +5 -0
- package/dist/types/runtime/form/business/references/lot-values.d.ts +16 -0
- package/dist/types/runtime/form/business/references/read-scopes.d.ts +25 -0
- package/dist/types/runtime/form/business/references/records.d.ts +13 -0
- package/dist/types/runtime/form/business/references/scan-mapping.d.ts +9 -0
- package/dist/types/runtime/form/business/references/scan-types.d.ts +36 -0
- package/dist/types/runtime/form/business/references/types.d.ts +186 -0
- package/dist/types/runtime/form/business/references/validation.d.ts +19 -0
- package/dist/types/runtime/form/business/references/values.d.ts +19 -0
- package/dist/types/runtime/form/business/seals/NativeSeals.d.ts +47 -0
- package/dist/types/runtime/form/business/seals/index.d.ts +4 -0
- package/dist/types/runtime/form/business/seals/position-validators.d.ts +9 -0
- package/dist/types/runtime/form/business/seals/source.d.ts +5 -0
- package/dist/types/runtime/form/business/seals/types.d.ts +68 -0
- package/dist/types/runtime/form/business/seals/value-contract.d.ts +15 -0
- package/dist/types/runtime/form/business/seals/values.d.ts +10 -0
- package/dist/types/runtime/form/business/signatures/NativeSignatures.d.ts +51 -0
- package/dist/types/runtime/form/business/signatures/autofill.d.ts +9 -0
- package/dist/types/runtime/form/business/signatures/device-signature-lock.d.ts +10 -0
- package/dist/types/runtime/form/business/signatures/index.d.ts +4 -0
- package/dist/types/runtime/form/business/signatures/mutex.d.ts +16 -0
- package/dist/types/runtime/form/business/signatures/types.d.ts +59 -0
- package/dist/types/runtime/form/business/signatures/validation.d.ts +43 -0
- package/dist/types/runtime/form/business/signatures/values.d.ts +19 -0
- package/dist/types/runtime/form/business/tables/NativeBusinessTables.d.ts +34 -0
- package/dist/types/runtime/form/business/tables/NativeTableQuickFill.d.ts +28 -0
- package/dist/types/runtime/form/business/tables/enrichers.d.ts +4 -0
- package/dist/types/runtime/form/business/tables/fields/access.d.ts +6 -0
- package/dist/types/runtime/form/business/tables/fields/clear-policies.d.ts +16 -0
- package/dist/types/runtime/form/business/tables/fields/clear-updates.d.ts +5 -0
- package/dist/types/runtime/form/business/tables/fields/context.d.ts +35 -0
- package/dist/types/runtime/form/business/tables/fields/location-link.d.ts +15 -0
- package/dist/types/runtime/form/business/tables/fields/selection-types.d.ts +88 -0
- package/dist/types/runtime/form/business/tables/fields/selection.d.ts +22 -0
- package/dist/types/runtime/form/business/tables/index.d.ts +12 -0
- package/dist/types/runtime/form/business/tables/initialization/NativeTableInitialization.d.ts +39 -0
- package/dist/types/runtime/form/business/tables/initialization/context-assignments.d.ts +7 -0
- package/dist/types/runtime/form/business/tables/initialization/rows.d.ts +5 -0
- package/dist/types/runtime/form/business/tables/initialization/types.d.ts +64 -0
- package/dist/types/runtime/form/business/tables/inventory-records.d.ts +48 -0
- package/dist/types/runtime/form/business/tables/inventory-values.d.ts +3 -0
- package/dist/types/runtime/form/business/tables/quantities.d.ts +4 -0
- package/dist/types/runtime/form/business/tables/quick-fill-layout.d.ts +5 -0
- package/dist/types/runtime/form/business/tables/quick-fill-matrix.d.ts +27 -0
- package/dist/types/runtime/form/business/tables/quick-fill-types.d.ts +79 -0
- package/dist/types/runtime/form/business/tables/quick-fill-values.d.ts +4 -0
- package/dist/types/runtime/form/business/tables/row-fields.d.ts +17 -0
- package/dist/types/runtime/form/business/tables/scan/NativeTableScan.d.ts +24 -0
- package/dist/types/runtime/form/business/tables/scan/plan.d.ts +39 -0
- package/dist/types/runtime/form/business/tables/scan/types.d.ts +132 -0
- package/dist/types/runtime/form/business/tables/scan/values.d.ts +3 -0
- package/dist/types/runtime/form/business/tables/scan/variants.d.ts +5 -0
- package/dist/types/runtime/form/business/tables/submission-notices.d.ts +3 -0
- package/dist/types/runtime/form/business/tables/types.d.ts +103 -0
- package/dist/types/runtime/form/contracts/services.d.ts +51 -0
- package/dist/types/runtime/form/enrichers.d.ts +5 -0
- package/dist/types/runtime/form/fields/actions.d.ts +4 -0
- package/dist/types/runtime/form/fields/adapters/value-helpers.d.ts +8 -0
- package/dist/types/runtime/form/fields/adapters/values.d.ts +14 -0
- package/dist/types/runtime/form/fields/contracts/actions.d.ts +29 -0
- package/dist/types/runtime/form/fields/contracts/behavior.d.ts +97 -0
- package/dist/types/runtime/form/fields/contracts/declarations.d.ts +47 -0
- package/dist/types/runtime/form/fields/contracts/state.d.ts +49 -0
- package/dist/types/runtime/form/fields/core/NativeDataQuery.d.ts +135 -0
- package/dist/types/runtime/form/fields/core/NativeDataRuntime.d.ts +52 -0
- package/dist/types/runtime/form/fields/core/declaration-changes.d.ts +4 -0
- package/dist/types/runtime/form/fields/core/index.d.ts +7 -0
- package/dist/types/runtime/form/fields/core/participation/conditions.d.ts +9 -0
- package/dist/types/runtime/form/fields/core/participation/snapshot.d.ts +3 -0
- package/dist/types/runtime/form/fields/core/participation/targets.d.ts +4 -0
- package/dist/types/runtime/form/fields/core/participation/types.d.ts +61 -0
- package/dist/types/runtime/form/fields/core/paths.d.ts +33 -0
- package/dist/types/runtime/form/fields/core/query/model-policies.d.ts +19 -0
- package/dist/types/runtime/form/fields/core/rules/CommonFieldRules.d.ts +56 -0
- package/dist/types/runtime/form/fields/core/rules/companion-updates.d.ts +4 -0
- package/dist/types/runtime/form/fields/core/rules/enrichers.d.ts +5 -0
- package/dist/types/runtime/form/fields/core/rules/state.d.ts +9 -0
- package/dist/types/runtime/form/fields/core/rules/types.d.ts +34 -0
- package/dist/types/runtime/form/fields/core/rules/values.d.ts +11 -0
- package/dist/types/runtime/form/fields/core/runtime-paths.d.ts +5 -0
- package/dist/types/runtime/form/fields/core/table-slots.d.ts +26 -0
- package/dist/types/runtime/form/fields/core/tables/bounded-projection.d.ts +24 -0
- package/dist/types/runtime/form/fields/core/tables/matrix-projection.d.ts +46 -0
- package/dist/types/runtime/form/fields/core/tables/matrix-references.d.ts +4 -0
- package/dist/types/runtime/form/fields/core/types.d.ts +27 -0
- package/dist/types/runtime/form/fields/core/value-encoding.d.ts +7 -0
- package/dist/types/runtime/form/fields/declarations.d.ts +15 -0
- package/dist/types/runtime/form/fields/index.d.ts +4 -0
- package/dist/types/runtime/form/fields/semantics/numbers.d.ts +30 -0
- package/dist/types/runtime/form/fields/semantics/values.d.ts +14 -0
- package/dist/types/runtime/form/fills/NativeFieldFills.d.ts +68 -0
- package/dist/types/runtime/form/fills/index.d.ts +3 -0
- package/dist/types/runtime/form/fills/paths.d.ts +14 -0
- package/dist/types/runtime/form/fills/protection.d.ts +5 -0
- package/dist/types/runtime/form/fills/targets.d.ts +69 -0
- package/dist/types/runtime/form/fills/types.d.ts +44 -0
- package/dist/types/runtime/form/index.d.ts +20 -0
- package/dist/types/runtime/form/initialization/declarations.d.ts +11 -0
- package/dist/types/runtime/form/initialization/index.d.ts +4 -0
- package/dist/types/runtime/form/initialization/parameter-values.d.ts +4 -0
- package/dist/types/runtime/form/initialization/parameters/NativeParameterInitializer.d.ts +24 -0
- package/dist/types/runtime/form/initialization/parameters/index.d.ts +3 -0
- package/dist/types/runtime/form/initialization/parameters/targets.d.ts +7 -0
- package/dist/types/runtime/form/initialization/parameters/types.d.ts +93 -0
- package/dist/types/runtime/form/initialization/parameters/values.d.ts +2 -0
- package/dist/types/runtime/form/initialization/policy.d.ts +31 -0
- package/dist/types/runtime/form/initialization/queries/NativeDataInitializer.d.ts +37 -0
- package/dist/types/runtime/form/initialization/queries/index.d.ts +3 -0
- package/dist/types/runtime/form/initialization/queries/plan.d.ts +30 -0
- package/dist/types/runtime/form/initialization/queries/request.d.ts +22 -0
- package/dist/types/runtime/form/initialization/queries/run.d.ts +29 -0
- package/dist/types/runtime/form/initialization/queries/types.d.ts +162 -0
- package/dist/types/runtime/form/initialization/special-field-values.d.ts +18 -0
- package/dist/types/runtime/form/shared/barcodes.d.ts +4 -0
- package/dist/types/runtime/form/shared/capabilities.d.ts +18 -0
- package/dist/types/runtime/form/shared/identity.d.ts +2 -0
- package/dist/types/runtime/form/shared/requests.d.ts +4 -0
- package/dist/types/runtime/form/shared/row.d.ts +8 -0
- package/dist/types/runtime/form/shared/runtime-request.d.ts +6 -0
- package/dist/types/runtime/form/sources/NativeDataSources.d.ts +87 -0
- package/dist/types/runtime/form/sources/definitions.d.ts +9 -0
- package/dist/types/runtime/form/sources/errors.d.ts +6 -0
- package/dist/types/runtime/form/sources/index.d.ts +6 -0
- package/dist/types/runtime/form/sources/job.d.ts +116 -0
- package/dist/types/runtime/form/sources/parameters.d.ts +8 -0
- package/dist/types/runtime/form/sources/preview.d.ts +13 -0
- package/dist/types/runtime/form/sources/script.d.ts +32 -0
- package/dist/types/runtime/form/sources/types.d.ts +92 -0
- package/dist/types/runtime/form/sources/values.d.ts +13 -0
- package/dist/types/runtime/form/submission/NativeSubmissionCoordinator.d.ts +30 -0
- package/dist/types/runtime/form/submission/capture.d.ts +4 -0
- package/dist/types/runtime/form/submission/clean-data.d.ts +3 -0
- package/dist/types/runtime/form/submission/coordinator-types.d.ts +99 -0
- package/dist/types/runtime/form/submission/create-submission-data.d.ts +4 -0
- package/dist/types/runtime/form/submission/index.d.ts +5 -0
- package/dist/types/runtime/form/submission/matrix-records.d.ts +10 -0
- package/dist/types/runtime/form/submission/types.d.ts +60 -0
- package/dist/types/runtime/form/types.d.ts +46 -0
- package/dist/types/runtime/form/validation/NativeFieldValidation.d.ts +45 -0
- package/dist/types/runtime/form/validation/NativeValidator.d.ts +24 -0
- package/dist/types/runtime/form/validation/admission.d.ts +27 -0
- package/dist/types/runtime/form/validation/description.d.ts +5 -0
- package/dist/types/runtime/form/validation/empty.d.ts +2 -0
- package/dist/types/runtime/form/validation/index.d.ts +3 -0
- package/dist/types/runtime/form/validation/rules.d.ts +8 -0
- package/dist/types/runtime/form/validation/targets.d.ts +4 -0
- package/dist/types/runtime/form/validation/types.d.ts +104 -0
- package/dist/types/runtime/interaction/EditorController.d.ts +242 -0
- package/dist/types/runtime/interaction/attach-native-interaction.d.ts +13 -0
- package/dist/types/runtime/interaction/browse/EditorReadonlyActions.d.ts +34 -0
- package/dist/types/runtime/interaction/browse/media-preview.d.ts +4 -0
- package/dist/types/runtime/interaction/browse/types.d.ts +114 -0
- package/dist/types/runtime/interaction/business/EditorBusinessFields.d.ts +49 -0
- package/dist/types/runtime/interaction/business/materials/EditorMaterials.d.ts +36 -0
- package/dist/types/runtime/interaction/business/materials/types.d.ts +61 -0
- package/dist/types/runtime/interaction/business/state.d.ts +7 -0
- package/dist/types/runtime/interaction/business/tables/EditorBusinessTables.d.ts +55 -0
- package/dist/types/runtime/interaction/business/tables/types.d.ts +33 -0
- package/dist/types/runtime/interaction/business/types.d.ts +104 -0
- package/dist/types/runtime/interaction/clipboard/bindings.d.ts +8 -0
- package/dist/types/runtime/interaction/clipboard/external.d.ts +37 -0
- package/dist/types/runtime/interaction/clipboard/fragment.d.ts +19 -0
- package/dist/types/runtime/interaction/clipboard/table.d.ts +14 -0
- package/dist/types/runtime/interaction/clipboard/types.d.ts +27 -0
- package/dist/types/runtime/interaction/design/EditorDesign.d.ts +35 -0
- package/dist/types/runtime/interaction/design/catalog/EditorFieldCatalog.d.ts +57 -0
- package/dist/types/runtime/interaction/design/catalog/catalog-page.d.ts +5 -0
- package/dist/types/runtime/interaction/design/catalog/types.d.ts +91 -0
- package/dist/types/runtime/interaction/design/field-drop.d.ts +16 -0
- package/dist/types/runtime/interaction/design/fields/EditorFieldDesign.d.ts +54 -0
- package/dist/types/runtime/interaction/design/fields/adaptive-image-cell.d.ts +4 -0
- package/dist/types/runtime/interaction/design/fields/field-content.d.ts +6 -0
- package/dist/types/runtime/interaction/design/fields/field-defaults.d.ts +3 -0
- package/dist/types/runtime/interaction/design/fields/field-placement.d.ts +10 -0
- package/dist/types/runtime/interaction/design/fields/types.d.ts +92 -0
- package/dist/types/runtime/interaction/design/format/EditorFormat.d.ts +40 -0
- package/dist/types/runtime/interaction/design/format/input-format.d.ts +15 -0
- package/dist/types/runtime/interaction/design/format/property-format.d.ts +6 -0
- package/dist/types/runtime/interaction/design/format/summary.d.ts +6 -0
- package/dist/types/runtime/interaction/design/format/types.d.ts +73 -0
- package/dist/types/runtime/interaction/design/objects/EditorObjects.d.ts +944 -0
- package/dist/types/runtime/interaction/design/objects/geometry.d.ts +3 -0
- package/dist/types/runtime/interaction/design/objects/inline-relocation.d.ts +190 -0
- package/dist/types/runtime/interaction/design/objects/selection.d.ts +18 -0
- package/dist/types/runtime/interaction/design/objects/types.d.ts +80 -0
- package/dist/types/runtime/interaction/design/tables/EditorTableDesign.d.ts +78 -0
- package/dist/types/runtime/interaction/design/tables/pointer-selection.d.ts +14 -0
- package/dist/types/runtime/interaction/design/tables/regions/EditorTableRegions.d.ts +52 -0
- package/dist/types/runtime/interaction/design/tables/regions/definition.d.ts +8 -0
- package/dist/types/runtime/interaction/design/tables/regions/definitions.d.ts +27 -0
- package/dist/types/runtime/interaction/design/tables/regions/placement.d.ts +12 -0
- package/dist/types/runtime/interaction/design/tables/regions/types.d.ts +68 -0
- package/dist/types/runtime/interaction/design/tables/selection.d.ts +82 -0
- package/dist/types/runtime/interaction/design/tables/table-format.d.ts +24 -0
- package/dist/types/runtime/interaction/design/tables/types.d.ts +87 -0
- package/dist/types/runtime/interaction/design/types.d.ts +28 -0
- package/dist/types/runtime/interaction/design/widgets/EditorPageWidgets.d.ts +734 -0
- package/dist/types/runtime/interaction/design/widgets/types.d.ts +36 -0
- package/dist/types/runtime/interaction/editing-policy.d.ts +8 -0
- package/dist/types/runtime/interaction/editor-diagnostic.d.ts +10 -0
- package/dist/types/runtime/interaction/field-choice.d.ts +57 -0
- package/dist/types/runtime/interaction/field-commands.d.ts +11 -0
- package/dist/types/runtime/interaction/field-navigation.d.ts +5 -0
- package/dist/types/runtime/interaction/field-option-hit.d.ts +4 -0
- package/dist/types/runtime/interaction/field-signature.d.ts +41 -0
- package/dist/types/runtime/interaction/field-text.d.ts +34 -0
- package/dist/types/runtime/interaction/field-value-guard.d.ts +16 -0
- package/dist/types/runtime/interaction/index.d.ts +55 -0
- package/dist/types/runtime/interaction/selection-history.d.ts +16 -0
- package/dist/types/runtime/interaction/text/TextFlow.d.ts +133 -0
- package/dist/types/runtime/interaction/text/apply-text-edit.d.ts +7 -0
- package/dist/types/runtime/interaction/text/navigation.d.ts +17 -0
- package/dist/types/runtime/interaction/text/selection-state.d.ts +18 -0
- package/dist/types/runtime/interaction/text/types.d.ts +39 -0
- package/dist/types/runtime/interaction/types.d.ts +146 -0
- package/dist/types/runtime/interaction/validation/placements.d.ts +6 -0
- package/dist/types/runtime/interaction/validation/types.d.ts +28 -0
- package/dist/types/runtime/layout/attach-session-layout.d.ts +6 -0
- package/dist/types/runtime/layout/index.d.ts +3 -0
- package/dist/types/runtime/layout/types.d.ts +28 -0
- package/dist/types/runtime/presentation/NativeLayoutPresentation.d.ts +40 -0
- package/dist/types/runtime/presentation/async.d.ts +3 -0
- package/dist/types/runtime/presentation/attach-native-layout.d.ts +16 -0
- package/dist/types/runtime/presentation/fields/NativeFieldPresenter.d.ts +67 -0
- package/dist/types/runtime/presentation/fields/appearance.d.ts +20 -0
- package/dist/types/runtime/presentation/fields/attachment-icon.d.ts +2 -0
- package/dist/types/runtime/presentation/fields/signatures.d.ts +5 -0
- package/dist/types/runtime/presentation/fields/theme.d.ts +56 -0
- package/dist/types/runtime/presentation/index.d.ts +6 -0
- package/dist/types/runtime/presentation/seals/NativeSealPresenter.d.ts +32 -0
- package/dist/types/runtime/presentation/seals/geometry.d.ts +5 -0
- package/dist/types/runtime/presentation/seals/presentation.d.ts +5 -0
- package/dist/types/runtime/presentation/settle-data-layout.d.ts +11 -0
- package/dist/types/runtime/presentation/tables/AxisOccurrenceIndex.d.ts +29 -0
- package/dist/types/runtime/presentation/tables/NativeTableInstances.d.ts +43 -0
- package/dist/types/runtime/presentation/tables/TableGridProjector.d.ts +29 -0
- package/dist/types/runtime/presentation/tables/TableValueResolver.d.ts +40 -0
- package/dist/types/runtime/presentation/tables/material-cells.d.ts +4 -0
- package/dist/types/runtime/presentation/tables/row-occurrences.d.ts +25 -0
- package/dist/types/runtime/presentation/tables/table-axis.d.ts +5 -0
- package/dist/types/runtime/presentation/tables/types.d.ts +49 -0
- package/dist/types/runtime/presentation/types.d.ts +47 -0
- package/dist/types/runtime/presentation/widgets/NativeCodeEncoder.d.ts +21 -0
- package/dist/types/runtime/presentation/widgets/NativeCodeWidgets.d.ts +54 -0
- package/dist/types/runtime/presentation/widgets/NativePageWidgetPresenter.d.ts +86 -0
- package/dist/types/runtime/presentation/widgets/formula-input.d.ts +11 -0
- package/dist/types/runtime/presentation/widgets/time-difference.d.ts +8 -0
- package/dist/types/runtime/presentation/widgets/value.d.ts +15 -0
- package/dist/types/runtime/session/DocumentSession.d.ts +89 -0
- package/dist/types/runtime/session/ResourceScope.d.ts +12 -0
- package/dist/types/runtime/session/changes.d.ts +38 -0
- package/dist/types/runtime/session/handle.d.ts +12 -0
- package/dist/types/runtime/session/index.d.ts +8 -0
- package/dist/types/runtime/session/signals.d.ts +10 -0
- package/dist/types/runtime/session/tasks.d.ts +41 -0
- package/dist/types/runtime/session/types.d.ts +125 -0
- package/dist/types/runtime/session/versions.d.ts +10 -0
- package/dist/types/sdk/index.d.ts +9 -0
- package/dist/types/shared/async/abortable.d.ts +3 -0
- package/dist/types/shared/drawing.d.ts +76 -0
- package/dist/types/shared/form-config/communication/CommunicationIcon.vue.d.ts +24 -0
- package/dist/types/shared/form-config/communication/CommunicationPanel.vue.d.ts +16 -0
- package/dist/types/shared/form-config/communication/DeviceCommunicationDraft.vue.d.ts +16 -0
- package/dist/types/shared/form-config/communication/DeviceFieldMapping.vue.d.ts +17 -0
- package/dist/types/shared/form-config/communication/DeviceParameterCard.vue.d.ts +24 -0
- package/dist/types/shared/form-config/communication/DevicePickerDialog.vue.d.ts +11 -0
- package/dist/types/shared/form-config/communication/DeviceTemplateEditor.vue.d.ts +13 -0
- package/dist/types/shared/form-config/communication/OcrTemplateEditor.vue.d.ts +34 -0
- package/dist/types/shared/form-config/communication/templates.d.ts +10 -0
- package/dist/types/shared/form-config/communication/types.d.ts +81 -0
- package/dist/types/shared/form-config/data/context/BuiltinContextCard.vue.d.ts +7 -0
- package/dist/types/shared/form-config/data/context/options.d.ts +24 -0
- package/dist/types/shared/form-config/data/fills/FieldFillDialog.vue.d.ts +17 -0
- package/dist/types/shared/form-config/data/fills/FieldFills.vue.d.ts +32 -0
- package/dist/types/shared/form-config/data/fills/options.d.ts +39 -0
- package/dist/types/shared/form-config/data/objects/ObjectInitializationEditor.vue.d.ts +73 -0
- package/dist/types/shared/form-config/data/objects/ObjectInitializationList.vue.d.ts +30 -0
- package/dist/types/shared/form-config/data/objects/ObjectStockSettings.vue.d.ts +19 -0
- package/dist/types/shared/form-config/data/objects/types.d.ts +98 -0
- package/dist/types/shared/form-config/data/sources/analysis/index.d.ts +13 -0
- package/dist/types/shared/form-config/data/sources/components/DataSourceDrawer.vue.d.ts +19 -0
- package/dist/types/shared/form-config/data/sources/components/DataSourceList.vue.d.ts +32 -0
- package/dist/types/shared/form-config/data/sources/components/SourceConfigStep.vue.d.ts +13 -0
- package/dist/types/shared/form-config/data/sources/components/SourceFieldPicker.vue.d.ts +17 -0
- package/dist/types/shared/form-config/data/sources/components/SourceFieldTable.vue.d.ts +27 -0
- package/dist/types/shared/form-config/data/sources/components/SourceTypeTag.vue.d.ts +7 -0
- package/dist/types/shared/form-config/data/sources/options.d.ts +53 -0
- package/dist/types/shared/form-config/data/sources/ports.d.ts +35 -0
- package/dist/types/shared/form-config/data/sources/types.d.ts +125 -0
- package/dist/types/shared/form-config/data/sources/useDataSourceDraft.d.ts +97 -0
- package/dist/types/shared/form-config/data/sources/validation.d.ts +5 -0
- package/dist/types/shared/form-config/index.d.ts +20 -0
- package/dist/types/shared/platform-gct/communication.d.ts +67 -0
- package/dist/types/shared/platform-gct/data-sources.d.ts +24 -0
- package/dist/types/shared/platform-gct/fields/field-icons.d.ts +3 -0
- package/dist/types/shared/platform-gct/fields/field-types.d.ts +485 -0
- package/dist/types/shared/platform-gct/fields/form-models.d.ts +81 -0
- package/dist/types/shared/platform-gct/fields/index.d.ts +6 -0
- package/dist/types/shared/platform-gct/fields/options.d.ts +39 -0
- package/dist/types/shared/platform-gct/form-credentials.d.ts +35 -0
- package/dist/types/shared/platform-gct/form-instances.d.ts +68 -0
- package/dist/types/shared/platform-gct/notification.d.ts +15 -0
- package/dist/types/shared/platform-gct/record-values.d.ts +5 -0
- package/dist/types/shared/platform-gct/records.d.ts +49 -0
- package/dist/types/shared/platform-gct/templates.d.ts +70 -0
- package/dist/types/shared/platform-gct/vue/useGctDhrLicense.d.ts +26 -0
- package/dist/types/shared/table-borders.d.ts +8 -0
- package/dist/types/shared/text/tsv.d.ts +21 -0
- package/dist/types/shared/text/word-fonts.d.ts +4 -0
- package/dist/types/shared/ui/breadcrumb/src/breadcrumb-item.vue.d.ts +24 -0
- package/dist/types/shared/ui/breadcrumb/src/breadcrumb.vue.d.ts +8 -0
- package/dist/types/shared/ui/button/src/button.type.d.ts +9 -0
- package/dist/types/shared/ui/button/src/button.vue.d.ts +25 -0
- package/dist/types/shared/ui/calendar/src/calendar.vue.d.ts +32 -0
- package/dist/types/shared/ui/calendar/src/time.vue.d.ts +22 -0
- package/dist/types/shared/ui/calendar/src/utils/index.d.ts +32 -0
- package/dist/types/shared/ui/checkbox/src/checkbox-group.vue.d.ts +30 -0
- package/dist/types/shared/ui/checkbox/src/checkbox.vue.d.ts +28 -0
- package/dist/types/shared/ui/collapse/src/collapse.vue.d.ts +25 -0
- package/dist/types/shared/ui/color-picker/src/ColorPicker.vue.d.ts +37 -0
- package/dist/types/shared/ui/date-time-picker/src/DateTimePicker.vue.d.ts +36 -0
- package/dist/types/shared/ui/divider/src/divider.d.ts +7 -0
- package/dist/types/shared/ui/divider/src/divider.vue.d.ts +13 -0
- package/dist/types/shared/ui/dropdown/src/dropdown-basic-select.vue.d.ts +93 -0
- package/dist/types/shared/ui/dropdown/src/dropdown-group-select.vue.d.ts +29 -0
- package/dist/types/shared/ui/dropdown/src/dropdown.vue.d.ts +4 -0
- package/dist/types/shared/ui/dropdown/src/types/index.d.ts +38 -0
- package/dist/types/shared/ui/empty/src/empty.vue.d.ts +10 -0
- package/dist/types/shared/ui/form-item/src/form-item.vue.d.ts +36 -0
- package/dist/types/shared/ui/icon/src/icon.vue.d.ts +25 -0
- package/dist/types/shared/ui/icons/color.d.ts +4 -0
- package/dist/types/shared/ui/image-viewer/index.d.ts +17 -0
- package/dist/types/shared/ui/index.d.ts +31 -0
- package/dist/types/shared/ui/input/src/input-number.vue.d.ts +72 -0
- package/dist/types/shared/ui/input/src/input.vue.d.ts +71 -0
- package/dist/types/shared/ui/input/src/text-area.vue.d.ts +59 -0
- package/dist/types/shared/ui/input/src/types/index.d.ts +55 -0
- package/dist/types/shared/ui/layout/src/layout.vue.d.ts +21 -0
- package/dist/types/shared/ui/loading/src/loading.vue.d.ts +3 -0
- package/dist/types/shared/ui/message/src/Message.vue.d.ts +23 -0
- package/dist/types/shared/ui/message/src/message.d.ts +19 -0
- package/dist/types/shared/ui/modal/index.d.ts +4 -0
- package/dist/types/shared/ui/modal/src/ConfirmTip.vue.d.ts +6 -0
- package/dist/types/shared/ui/modal/src/DialogActionButton.vue.d.ts +30 -0
- package/dist/types/shared/ui/modal/src/DialogActionIcon.vue.d.ts +12 -0
- package/dist/types/shared/ui/modal/src/ModalRoot.vue.d.ts +25 -0
- package/dist/types/shared/ui/modal/src/index.d.ts +8 -0
- package/dist/types/shared/ui/modal/src/modal.type.d.ts +57 -0
- package/dist/types/shared/ui/radio/src/radio-group.vue.d.ts +31 -0
- package/dist/types/shared/ui/radio/src/radio.vue.d.ts +28 -0
- package/dist/types/shared/ui/scrollbar/src/bar.d.ts +28 -0
- package/dist/types/shared/ui/scrollbar/src/scrollbar.vue.d.ts +104 -0
- package/dist/types/shared/ui/scrollbar/src/types.d.ts +3 -0
- package/dist/types/shared/ui/scrollbar/src/util.d.ts +23 -0
- package/dist/types/shared/ui/segment-slider/src/segment-slider.vue.d.ts +44 -0
- package/dist/types/shared/ui/select/index.d.ts +3 -0
- package/dist/types/shared/ui/select/src/measure-select-columns.d.ts +2 -0
- package/dist/types/shared/ui/select/src/select-control.vue.d.ts +71 -0
- package/dist/types/shared/ui/select/src/select-option-label.vue.d.ts +20 -0
- package/dist/types/shared/ui/select/src/select-page-footer.vue.d.ts +17 -0
- package/dist/types/shared/ui/select/src/select-surface.vue.d.ts +26 -0
- package/dist/types/shared/ui/select/src/select.types.d.ts +96 -0
- package/dist/types/shared/ui/select/src/unified-select.vue.d.ts +68 -0
- package/dist/types/shared/ui/select/src/use-select-columns.d.ts +22 -0
- package/dist/types/shared/ui/select/src/use-select-pages.d.ts +30 -0
- package/dist/types/shared/ui/slider/src/slider.vue.d.ts +22 -0
- package/dist/types/shared/ui/switch/src/switch.vue.d.ts +18 -0
- package/dist/types/shared/ui/table/index.d.ts +2 -0
- package/dist/types/shared/ui/table/src/table.type.d.ts +24 -0
- package/dist/types/shared/ui/table/src/table.vue.d.ts +51 -0
- package/dist/types/shared/ui/table-select/index.d.ts +3 -0
- package/dist/types/shared/ui/table-select/src/table-select-pagination.vue.d.ts +19 -0
- package/dist/types/shared/ui/table-select/src/types.d.ts +30 -0
- package/dist/types/shared/ui/table-select/src/unified-table-select.vue.d.ts +64 -0
- package/dist/types/shared/ui/tooltip/src/tooltip.vue.d.ts +4 -0
- package/dist/types/shared/ui/tree/index.d.ts +2 -0
- package/dist/types/shared/ui/tree/src/tree-node.vue.d.ts +15 -0
- package/dist/types/shared/ui/tree/src/tree.vue.d.ts +19 -0
- package/dist/types/shared/ui/tree-select/index.d.ts +2 -0
- package/dist/types/shared/ui/tree-select/src/filter-tree-select-nodes.d.ts +5 -0
- package/dist/types/shared/ui/tree-select/src/types.d.ts +32 -0
- package/dist/types/shared/ui/tree-select/src/unified-tree-select.vue.d.ts +149 -0
- package/dist/types/shared/ui/utils/event-util.d.ts +4 -0
- package/dist/types/shared/ui/utils/search-match-text.vue.d.ts +7 -0
- package/dist/vue.js +44674 -0
- package/dist/vue.js.map +1 -0
- package/package.json +86 -93
- package/LICENSE +0 -9
- package/dist/assets/svgs/table/index.d.ts +0 -38
- package/dist/assets/svgs/toolkit/index.d.ts +0 -10
- package/dist/assets/theme/field-state.d.ts +0 -74
- package/dist/assets/theme/index.d.ts +0 -1
- package/dist/base/avatar/index.d.ts +0 -1
- package/dist/base/avatar/src/Avatar.vue.d.ts +0 -9
- package/dist/base/avatar/src/utils/useFile.d.ts +0 -3
- package/dist/base/breadcrumb/src/breadcrumb-item.vue.d.ts +0 -26
- package/dist/base/breadcrumb/src/breadcrumb.vue.d.ts +0 -7
- package/dist/base/button/src/button.type.d.ts +0 -9
- package/dist/base/button/src/button.vue.d.ts +0 -26
- package/dist/base/calendar/src/calendar.vue.d.ts +0 -24
- package/dist/base/calendar/src/time.vue.d.ts +0 -19
- package/dist/base/calendar/src/utils/index.d.ts +0 -25
- package/dist/base/checkbox/src/checkbox-group.vue.d.ts +0 -32
- package/dist/base/checkbox/src/checkbox.vue.d.ts +0 -30
- package/dist/base/collapse/src/collapse.vue.d.ts +0 -30
- package/dist/base/color-picker/src/ColorPicker.vue.d.ts +0 -88
- package/dist/base/date-time-picker/src/DateTimePicker.vue.d.ts +0 -27
- package/dist/base/divider/src/divider.d.ts +0 -7
- package/dist/base/divider/src/divider.vue.d.ts +0 -19
- package/dist/base/dropdown/src/dropdown-basic-select.vue.d.ts +0 -100
- package/dist/base/dropdown/src/dropdown-group-select.vue.d.ts +0 -45
- package/dist/base/dropdown/src/dropdown.vue.d.ts +0 -2
- package/dist/base/empty/src/empty.vue.d.ts +0 -9
- package/dist/base/form-item/src/form-item.vue.d.ts +0 -35
- package/dist/base/icon/src/icon.vue.d.ts +0 -12
- package/dist/base/image-upload/index.d.ts +0 -1
- package/dist/base/image-upload/src/image-upload.type.d.ts +0 -8
- package/dist/base/image-upload/src/image-upload.vue.d.ts +0 -16
- package/dist/base/index.d.ts +0 -31
- package/dist/base/input/src/input-number.vue.d.ts +0 -63
- package/dist/base/input/src/input.vue.d.ts +0 -76
- package/dist/base/input/src/text-area.vue.d.ts +0 -65
- package/dist/base/layout/src/layout.vue.d.ts +0 -23
- package/dist/base/loading/src/loading.vue.d.ts +0 -2
- package/dist/base/message/src/Message.vue.d.ts +0 -20
- package/dist/base/message/src/message.d.ts +0 -17
- package/dist/base/modal/index.d.ts +0 -2
- package/dist/base/modal/src/ConfirmTip.vue.d.ts +0 -5
- package/dist/base/modal/src/ModalRoot.vue.d.ts +0 -25
- package/dist/base/modal/src/index.d.ts +0 -7
- package/dist/base/modal/src/modal.type.d.ts +0 -47
- package/dist/base/radio/src/radio-group.vue.d.ts +0 -33
- package/dist/base/radio/src/radio.vue.d.ts +0 -28
- package/dist/base/rdo-tree-select/index.d.ts +0 -3
- package/dist/base/rdo-tree-select/src/display.d.ts +0 -12
- package/dist/base/rdo-tree-select/src/rdo-tree-select-more.vue.d.ts +0 -15
- package/dist/base/rdo-tree-select/src/rdo-tree-select-node.vue.d.ts +0 -17
- package/dist/base/rdo-tree-select/src/rdo-tree-select-panel.vue.d.ts +0 -25
- package/dist/base/rdo-tree-select/src/rdo-tree-select.vue.d.ts +0 -47
- package/dist/base/rdo-tree-select/src/types.d.ts +0 -23
- package/dist/base/rdo-tree-select/src/use-rdo-tree-options.d.ts +0 -59
- package/dist/base/scrollbar/src/bar.d.ts +0 -14
- package/dist/base/scrollbar/src/scrollbar.vue.d.ts +0 -92
- package/dist/base/scrollbar/src/util.d.ts +0 -8
- package/dist/base/segment-slider/src/segment-slider.vue.d.ts +0 -29
- package/dist/base/select/index.d.ts +0 -2
- package/dist/base/select/src/basic-select.vue.d.ts +0 -134
- package/dist/base/select/src/searchable-select.vue.d.ts +0 -55
- package/dist/base/slider/src/slider.vue.d.ts +0 -22
- package/dist/base/switch/src/switch.vue.d.ts +0 -17
- package/dist/base/table/index.d.ts +0 -1
- package/dist/base/table/src/table.type.d.ts +0 -19
- package/dist/base/table/src/table.vue.d.ts +0 -48
- package/dist/base/time-picker/index.d.ts +0 -1
- package/dist/base/time-picker/src/TimePicker.vue.d.ts +0 -29
- package/dist/base/tooltip/src/tooltip.vue.d.ts +0 -2
- package/dist/base/tree/index.d.ts +0 -1
- package/dist/base/tree/src/tree-node.vue.d.ts +0 -14
- package/dist/base/tree/src/tree.vue.d.ts +0 -18
- package/dist/base/tree-select/index.d.ts +0 -1
- package/dist/base/tree-select/src/tree-select.vue.d.ts +0 -45
- package/dist/base/utils/asset-helper-util.d.ts +0 -68
- package/dist/base/utils/dom-util.d.ts +0 -35
- package/dist/base/utils/event-util.d.ts +0 -3
- package/dist/base/utils/image-size-util.d.ts +0 -55
- package/dist/capabilities/base/BaseRegistry.d.ts +0 -36
- package/dist/capabilities/base/BaseService.d.ts +0 -19
- package/dist/capabilities/component-registry/index.d.ts +0 -3
- package/dist/capabilities/component-registry/registry.d.ts +0 -8
- package/dist/capabilities/component-registry/service.d.ts +0 -8
- package/dist/capabilities/component-registry/types.d.ts +0 -4
- package/dist/capabilities/field-manifest/index.d.ts +0 -3
- package/dist/capabilities/field-manifest/registry.d.ts +0 -7
- package/dist/capabilities/field-manifest/service.d.ts +0 -10
- package/dist/capabilities/field-manifest/types.d.ts +0 -31
- package/dist/capabilities/model-field-runtime/engine/FieldEngine.d.ts +0 -14
- package/dist/capabilities/model-field-runtime/index.d.ts +0 -7
- package/dist/capabilities/model-field-runtime/provider/FieldProviderBase.d.ts +0 -15
- package/dist/capabilities/model-field-runtime/provider/FieldProviderRuntime.d.ts +0 -24
- package/dist/capabilities/model-field-runtime/provider/ModelProviderBase.d.ts +0 -21
- package/dist/capabilities/model-field-runtime/registry/FieldRegistry.d.ts +0 -9
- package/dist/capabilities/model-field-runtime/registry/ModelRegistry.d.ts +0 -9
- package/dist/capabilities/model-field-runtime/runtime/FieldScope.d.ts +0 -21
- package/dist/capabilities/model-field-runtime/service/FieldService.d.ts +0 -21
- package/dist/capabilities/model-field-runtime/service/ModelService.d.ts +0 -12
- package/dist/capabilities/model-field-runtime/types/field.d.ts +0 -56
- package/dist/capabilities/model-field-runtime/types/instance.d.ts +0 -31
- package/dist/capabilities/model-field-runtime/types/model.d.ts +0 -17
- package/dist/capabilities/model-field-runtime/types/paper-widget.d.ts +0 -10
- package/dist/capabilities/panel/config/registry.d.ts +0 -7
- package/dist/capabilities/panel/config/service.d.ts +0 -6
- package/dist/capabilities/panel/config/types.d.ts +0 -10
- package/dist/capabilities/panel/router/registry.d.ts +0 -8
- package/dist/capabilities/panel/router/service.d.ts +0 -8
- package/dist/capabilities/panel/router/types.d.ts +0 -8
- package/dist/capabilities/panel/schema/registry.d.ts +0 -7
- package/dist/capabilities/panel/schema/service.d.ts +0 -6
- package/dist/capabilities/panel/schema/types.d.ts +0 -24
- package/dist/capabilities/paper-widget-manifest/index.d.ts +0 -3
- package/dist/capabilities/paper-widget-manifest/registry.d.ts +0 -7
- package/dist/capabilities/paper-widget-manifest/service.d.ts +0 -9
- package/dist/capabilities/paper-widget-manifest/types.d.ts +0 -31
- package/dist/capabilities/utils/index.d.ts +0 -1
- package/dist/core/command/CommandManager.d.ts +0 -21
- package/dist/core/command/InputComposition.d.ts +0 -22
- package/dist/core/command/base/CommandBase.d.ts +0 -217
- package/dist/core/command/base/FloatingFieldCommand.d.ts +0 -9
- package/dist/core/command/base/SetStyleBase.d.ts +0 -45
- package/dist/core/command/commandMapBuilder.d.ts +0 -7
- package/dist/core/command/commands/Backspace.d.ts +0 -60
- package/dist/core/command/commands/CommitValidateNumber.d.ts +0 -10
- package/dist/core/command/commands/Delete.d.ts +0 -57
- package/dist/core/command/commands/DeleteBoundedItem.d.ts +0 -12
- package/dist/core/command/commands/DeleteCol.d.ts +0 -12
- package/dist/core/command/commands/DeleteDataGroup2D.d.ts +0 -12
- package/dist/core/command/commands/DeleteRow.d.ts +0 -12
- package/dist/core/command/commands/DeleteSubTable.d.ts +0 -10
- package/dist/core/command/commands/DeleteTable.d.ts +0 -11
- package/dist/core/command/commands/DeleteTableHeader.d.ts +0 -12
- package/dist/core/command/commands/Enter.d.ts +0 -9
- package/dist/core/command/commands/InsertCol.d.ts +0 -17
- package/dist/core/command/commands/InsertField.d.ts +0 -69
- package/dist/core/command/commands/InsertFloatingField.d.ts +0 -9
- package/dist/core/command/commands/InsertFloatingOverlay.d.ts +0 -9
- package/dist/core/command/commands/InsertImage.d.ts +0 -24
- package/dist/core/command/commands/InsertPaperWidget.d.ts +0 -19
- package/dist/core/command/commands/InsertRow.d.ts +0 -17
- package/dist/core/command/commands/InsertTable.d.ts +0 -12
- package/dist/core/command/commands/InsertText.d.ts +0 -15
- package/dist/core/command/commands/MergeCells.d.ts +0 -18
- package/dist/core/command/commands/MoveFloatingField.d.ts +0 -10
- package/dist/core/command/commands/RemoveFloatingField.d.ts +0 -12
- package/dist/core/command/commands/ResizeCol.d.ts +0 -7
- package/dist/core/command/commands/ResizeImage.d.ts +0 -7
- package/dist/core/command/commands/ResizeOverlayLayout.d.ts +0 -7
- package/dist/core/command/commands/ResizeRow.d.ts +0 -7
- package/dist/core/command/commands/Set2DTable.d.ts +0 -7
- package/dist/core/command/commands/SetAlign.d.ts +0 -18
- package/dist/core/command/commands/SetBold.d.ts +0 -12
- package/dist/core/command/commands/SetBounded.d.ts +0 -7
- package/dist/core/command/commands/SetBoundedItem.d.ts +0 -23
- package/dist/core/command/commands/SetCheckTable.d.ts +0 -7
- package/dist/core/command/commands/SetColor.d.ts +0 -11
- package/dist/core/command/commands/SetDataGroup2D.d.ts +0 -17
- package/dist/core/command/commands/SetFont.d.ts +0 -12
- package/dist/core/command/commands/SetFontSize.d.ts +0 -11
- package/dist/core/command/commands/SetHeaderFooterConfig.d.ts +0 -11
- package/dist/core/command/commands/SetHighlight.d.ts +0 -11
- package/dist/core/command/commands/SetItalic.d.ts +0 -11
- package/dist/core/command/commands/SetMaterialConsumeTable.d.ts +0 -7
- package/dist/core/command/commands/SetOrient.d.ts +0 -10
- package/dist/core/command/commands/SetPadding.d.ts +0 -10
- package/dist/core/command/commands/SetRepeating.d.ts +0 -7
- package/dist/core/command/commands/SetStrike.d.ts +0 -11
- package/dist/core/command/commands/SetSubTableHeader.d.ts +0 -8
- package/dist/core/command/commands/SetTableBorder.d.ts +0 -14
- package/dist/core/command/commands/SetTableHeader.d.ts +0 -7
- package/dist/core/command/commands/SetUnderline.d.ts +0 -11
- package/dist/core/command/commands/SetWsecSize.d.ts +0 -10
- package/dist/core/command/commands/Snapshot.d.ts +0 -12
- package/dist/core/command/commands/UnmergeCells.d.ts +0 -22
- package/dist/core/command/types.d.ts +0 -291
- package/dist/core/constants/common.d.ts +0 -1
- package/dist/core/constants/component.d.ts +0 -27
- package/dist/core/constants/doc-mode.d.ts +0 -10
- package/dist/core/constants/index.d.ts +0 -5
- package/dist/core/constants/paper.d.ts +0 -37
- package/dist/core/constants/table.d.ts +0 -11
- package/dist/core/cursor/CursorController.d.ts +0 -71
- package/dist/core/cursor/CursorManager.d.ts +0 -46
- package/dist/core/cursor/composables/useCursorSelection.d.ts +0 -88
- package/dist/core/cursor/hit/HitHandlerRegistry.d.ts +0 -19
- package/dist/core/cursor/hit/InlineImageHitHandler.d.ts +0 -6
- package/dist/core/cursor/hit/OverlayLayoutHitHandler.d.ts +0 -9
- package/dist/core/cursor/hit/PageHitHandler.d.ts +0 -9
- package/dist/core/cursor/hit/ParagraphHitHandler.d.ts +0 -9
- package/dist/core/cursor/hit/TableCellHitHandler.d.ts +0 -9
- package/dist/core/cursor/hit/TextHitHandler.d.ts +0 -7
- package/dist/core/cursor/hit/index.d.ts +0 -2
- package/dist/core/cursor/hit/types.d.ts +0 -55
- package/dist/core/cursor/layout/baseMeta.d.ts +0 -15
- package/dist/core/cursor/layout/intervals.d.ts +0 -25
- package/dist/core/cursor/layout/textOffsets.d.ts +0 -13
- package/dist/core/cursor/logic/getCursorCoords.d.ts +0 -10
- package/dist/core/cursor/logic/getCursorTextRawList.d.ts +0 -2
- package/dist/core/cursor/logic/getSelectionRects.d.ts +0 -19
- package/dist/core/cursor/logic/index.d.ts +0 -22
- package/dist/core/cursor/logic/layoutNavigation.d.ts +0 -28
- package/dist/core/cursor/logic/resolveCursorState.d.ts +0 -24
- package/dist/core/cursor/logic/selectionAnalyzer.d.ts +0 -48
- package/dist/core/cursor/movement/MovementRegistry.d.ts +0 -20
- package/dist/core/cursor/movement/index.d.ts +0 -4
- package/dist/core/cursor/movement/types.d.ts +0 -11
- package/dist/core/cursor/render/cursor-overlay.vue.d.ts +0 -2
- package/dist/core/cursor/render/cursor-renderer.vue.d.ts +0 -18
- package/dist/core/cursor/render/hidden-input.vue.d.ts +0 -21
- package/dist/core/cursor/render/selection-renderer.vue.d.ts +0 -14
- package/dist/core/cursor/session/CursorDragSession.d.ts +0 -28
- package/dist/core/cursor/types/cursor.d.ts +0 -52
- package/dist/core/data/DataManager.d.ts +0 -407
- package/dist/core/data/enrichers/build-field-enrichers.d.ts +0 -16
- package/dist/core/data/enrichers/companion-enricher.d.ts +0 -26
- package/dist/core/data/enrichers/enrich-design-defaults.d.ts +0 -19
- package/dist/core/data/enrichers/enrich-utils.d.ts +0 -6
- package/dist/core/data/enrichers/hydrate-utils.d.ts +0 -6
- package/dist/core/data/enrichers/hyperlink-enricher.d.ts +0 -14
- package/dist/core/data/enrichers/id-enricher.d.ts +0 -9
- package/dist/core/data/enrichers/inspection-module-qty-enricher.d.ts +0 -19
- package/dist/core/data/enrichers/label-enricher.d.ts +0 -25
- package/dist/core/data/enrichers/label-resolve.d.ts +0 -40
- package/dist/core/data/enrichers/lot-parent-label-enricher.d.ts +0 -12
- package/dist/core/data/enrichers/of-inst-num-enricher.d.ts +0 -23
- package/dist/core/data/enrichers/operation-receive-qty-enricher.d.ts +0 -19
- package/dist/core/data/enrichers/received-qty-enricher.d.ts +0 -4
- package/dist/core/data/enrichers/static-label-enrichers.d.ts +0 -9
- package/dist/core/data/enrichers/udi-enricher.d.ts +0 -23
- package/dist/core/data/formula/business-functions.d.ts +0 -10
- package/dist/core/data/formula/calculate-formula.d.ts +0 -5
- package/dist/core/data/formula/formula-params-cache.d.ts +0 -15
- package/dist/core/data/index.d.ts +0 -11
- package/dist/core/data/initialization.d.ts +0 -26
- package/dist/core/data/paths/field-paths.d.ts +0 -20
- package/dist/core/data/paths/path-templates.d.ts +0 -2
- package/dist/core/data/paths/subtable-path.d.ts +0 -44
- package/dist/core/data/post-change-pipeline.d.ts +0 -37
- package/dist/core/data/submit/form-state.d.ts +0 -29
- package/dist/core/data/subtable/row.d.ts +0 -27
- package/dist/core/data/types/change.d.ts +0 -17
- package/dist/core/data/types/enricher.d.ts +0 -13
- package/dist/core/data/types/index.d.ts +0 -4
- package/dist/core/data/types/pipeline.d.ts +0 -23
- package/dist/core/data/types/runtime-config.d.ts +0 -23
- package/dist/core/data/updates/field-updates.d.ts +0 -32
- package/dist/core/event/DocumentEventBridge.d.ts +0 -58
- package/dist/core/event/EventBus.d.ts +0 -8
- package/dist/core/event/EventManager.d.ts +0 -37
- package/dist/core/event/Transaction.d.ts +0 -11
- package/dist/core/event/handlers/IMEHandler.d.ts +0 -23
- package/dist/core/event/handlers/InteractionHandler.d.ts +0 -18
- package/dist/core/event/handlers/KonvaHandler.d.ts +0 -21
- package/dist/core/event/handlers/TouchHandler.example.d.ts +0 -24
- package/dist/core/event/handlers/index.d.ts +0 -3
- package/dist/core/event/types.d.ts +0 -68
- package/dist/core/index.d.ts +0 -37
- package/dist/core/interaction/InteractionController.d.ts +0 -78
- package/dist/core/interaction/InteractionManager.d.ts +0 -23
- package/dist/core/interaction/InteractionPolicy.d.ts +0 -23
- package/dist/core/interaction/types.d.ts +0 -57
- package/dist/core/interaction/useInteraction.d.ts +0 -67
- package/dist/core/layout/LayoutContext.d.ts +0 -62
- package/dist/core/layout/LayoutManager.d.ts +0 -44
- package/dist/core/layout/LayoutMapper.d.ts +0 -96
- package/dist/core/layout/attach-field/AttachFieldContext.d.ts +0 -59
- package/dist/core/layout/attach-field/index.d.ts +0 -2
- package/dist/core/layout/attach-field/types.d.ts +0 -20
- package/dist/core/layout/handlers/FieldHandler.d.ts +0 -7
- package/dist/core/layout/handlers/InlineImageLayoutHandler.d.ts +0 -10
- package/dist/core/layout/handlers/PageWidgetHandler.d.ts +0 -5
- package/dist/core/layout/handlers/RunHandlerBase.d.ts +0 -13
- package/dist/core/layout/handlers/TextHandler.d.ts +0 -17
- package/dist/core/layout/handlers/fields/AttachFieldHandler.d.ts +0 -10
- package/dist/core/layout/handlers/fields/AttachmentHandler.d.ts +0 -12
- package/dist/core/layout/handlers/fields/FieldBaseHandler.d.ts +0 -103
- package/dist/core/layout/handlers/fields/FieldImageHandler.d.ts +0 -27
- package/dist/core/layout/handlers/fields/InputHandler.d.ts +0 -6
- package/dist/core/layout/handlers/fields/OptionHandler.d.ts +0 -18
- package/dist/core/layout/handlers/fields/SignatureHandler.d.ts +0 -25
- package/dist/core/layout/handlers/fields/index.d.ts +0 -7
- package/dist/core/layout/handlers/fields/signature-decoration-layout.d.ts +0 -14
- package/dist/core/layout/handlers/index.d.ts +0 -4
- package/dist/core/layout/handlers/pageWidgets/BarcodeHandler.d.ts +0 -11
- package/dist/core/layout/handlers/pageWidgets/DefaultHandler.d.ts +0 -4
- package/dist/core/layout/handlers/pageWidgets/DiagonalHandler.d.ts +0 -4
- package/dist/core/layout/handlers/pageWidgets/LineHandler.d.ts +0 -4
- package/dist/core/layout/handlers/pageWidgets/PageWidgetImageHandler.d.ts +0 -5
- package/dist/core/layout/handlers/pageWidgets/PaginationHandler.d.ts +0 -7
- package/dist/core/layout/handlers/pageWidgets/QrCodeHandler.d.ts +0 -4
- package/dist/core/layout/handlers/pageWidgets/SerialNumberHandler.d.ts +0 -4
- package/dist/core/layout/handlers/pageWidgets/TimeDiffHandler.d.ts +0 -17
- package/dist/core/layout/handlers/pageWidgets/WidgetBaseHandler.d.ts +0 -19
- package/dist/core/layout/handlers/pageWidgets/index.d.ts +0 -9
- package/dist/core/layout/image/adaptive-image-cell.d.ts +0 -47
- package/dist/core/layout/logic/LayoutBuilder.d.ts +0 -36
- package/dist/core/layout/logic/LayoutGeometry.d.ts +0 -16
- package/dist/core/layout/logic/ModelBuilder.d.ts +0 -2
- package/dist/core/layout/providers/TableInfoProvider.d.ts +0 -30
- package/dist/core/layout/providers/index.d.ts +0 -4
- package/dist/core/layout/shared/helpers.d.ts +0 -27
- package/dist/core/layout/shared/unit-converter.d.ts +0 -206
- package/dist/core/layout/table/link-sub-table-layout.d.ts +0 -27
- package/dist/core/layout/table/split-table.d.ts +0 -144
- package/dist/core/layout/table/table-expand.d.ts +0 -143
- package/dist/core/layout/types/index.d.ts +0 -147
- package/dist/core/model/DocModel.d.ts +0 -88
- package/dist/core/model/base/ModelGroup.d.ts +0 -116
- package/dist/core/model/base/ModelNode.d.ts +0 -70
- package/dist/core/model/base/RefManager.d.ts +0 -50
- package/dist/core/model/base/index.d.ts +0 -3
- package/dist/core/model/capability/index.d.ts +0 -11
- package/dist/core/model/document/Wbackground.d.ts +0 -22
- package/dist/core/model/document/Wbody.d.ts +0 -39
- package/dist/core/model/document/Wdocument.d.ts +0 -40
- package/dist/core/model/document/Wp.d.ts +0 -72
- package/dist/core/model/document/WpPr.d.ts +0 -113
- package/dist/core/model/document/WrField.d.ts +0 -8
- package/dist/core/model/document/WrImage.d.ts +0 -73
- package/dist/core/model/document/WrPageWidget.d.ts +0 -8
- package/dist/core/model/document/WrPr.d.ts +0 -117
- package/dist/core/model/document/WrText.d.ts +0 -139
- package/dist/core/model/document/WsecPr.d.ts +0 -193
- package/dist/core/model/document/Wtbl/Calculation.d.ts +0 -45
- package/dist/core/model/document/Wtbl/CellIterator.d.ts +0 -18
- package/dist/core/model/document/Wtbl/RegionManager.d.ts +0 -77
- package/dist/core/model/document/Wtbl/RowColumnOps.d.ts +0 -94
- package/dist/core/model/document/Wtbl/Serialization.d.ts +0 -57
- package/dist/core/model/document/Wtbl.d.ts +0 -134
- package/dist/core/model/document/WtblPr.d.ts +0 -73
- package/dist/core/model/document/Wtc.d.ts +0 -184
- package/dist/core/model/document/Wtr.d.ts +0 -47
- package/dist/core/model/document/WtrPr.d.ts +0 -67
- package/dist/core/model/document/index.d.ts +0 -16
- package/dist/core/model/document/resolvers/ParagraphStyleResolver.d.ts +0 -48
- package/dist/core/model/document/resolvers/TextStyleResolver.d.ts +0 -50
- package/dist/core/model/document/resolvers/index.d.ts +0 -2
- package/dist/core/model/document/utils/ensure-paragraphs-around-tables.d.ts +0 -18
- package/dist/core/model/document/wtcRegionRef.d.ts +0 -63
- package/dist/core/model/font-usage.d.ts +0 -22
- package/dist/core/model/footers/Wfooter.d.ts +0 -46
- package/dist/core/model/footers/Wfooters.d.ts +0 -42
- package/dist/core/model/headers/Wheader.d.ts +0 -46
- package/dist/core/model/headers/Wheaders.d.ts +0 -45
- package/dist/core/model/helpers.d.ts +0 -36
- package/dist/core/model/images/Wimages.d.ts +0 -79
- package/dist/core/model/images/index.d.ts +0 -2
- package/dist/core/model/index.d.ts +0 -20
- package/dist/core/model/logic/base/Region.d.ts +0 -31
- package/dist/core/model/logic/header/SubTableHeaderRegion.d.ts +0 -19
- package/dist/core/model/logic/header/TableHeaderRegion.d.ts +0 -16
- package/dist/core/model/logic/index.d.ts +0 -20
- package/dist/core/model/logic/subtable/bounded/BoundedItemRegion.d.ts +0 -15
- package/dist/core/model/logic/subtable/bounded/BoundedRegion.d.ts +0 -48
- package/dist/core/model/logic/subtable/link/CheckTableRegion.d.ts +0 -11
- package/dist/core/model/logic/subtable/link/DataGroup2DRegion.d.ts +0 -15
- package/dist/core/model/logic/subtable/link/LinkSubTableRegion.d.ts +0 -48
- package/dist/core/model/logic/subtable/link/_2DTableRegion.d.ts +0 -11
- package/dist/core/model/logic/subtable/repeating/MaterialConsumeTableRegion.d.ts +0 -44
- package/dist/core/model/logic/subtable/repeating/RepeatingRegion.d.ts +0 -101
- package/dist/core/model/logic/subtable/shared/dataGroupSlotCount.d.ts +0 -54
- package/dist/core/model/logic/subtable/shared/itemRegionOps.d.ts +0 -11
- package/dist/core/model/logic/subtable/shared/merged-table-range.d.ts +0 -4
- package/dist/core/model/logic/subtable/shared/regionValuePath.d.ts +0 -8
- package/dist/core/model/logic/types.d.ts +0 -11
- package/dist/core/model/overlays/Wlayout.d.ts +0 -74
- package/dist/core/model/overlays/Woverlay.d.ts +0 -41
- package/dist/core/model/overlays/Woverlays.d.ts +0 -45
- package/dist/core/model/settings/Wsettings.d.ts +0 -47
- package/dist/core/model/styles/WdocDefaults.d.ts +0 -23
- package/dist/core/model/styles/WparagraphProperties.d.ts +0 -42
- package/dist/core/model/styles/WrunProperties.d.ts +0 -43
- package/dist/core/model/styles/WstyleDefinition.d.ts +0 -38
- package/dist/core/model/styles/Wstyles.d.ts +0 -52
- package/dist/core/model/styles/index.d.ts +0 -5
- package/dist/core/model/templates/footer.template.d.ts +0 -75
- package/dist/core/model/templates/header.template.d.ts +0 -75
- package/dist/core/model/templates/image.template.d.ts +0 -259
- package/dist/core/model/templates/layout.template.d.ts +0 -66
- package/dist/core/model/templates/overlay.template.d.ts +0 -22
- package/dist/core/model/templates/paragraph.template.d.ts +0 -46
- package/dist/core/model/templates/table.template.d.ts +0 -66
- package/dist/core/model/templates/tableCell.template.d.ts +0 -44
- package/dist/core/model/templates/tableRow.template.d.ts +0 -13
- package/dist/core/model/templates/trPr.template.d.ts +0 -19
- package/dist/core/model/types/element.d.ts +0 -11
- package/dist/core/model/types/index.d.ts +0 -4
- package/dist/core/model/types/raw.d.ts +0 -20
- package/dist/core/model/types/region.d.ts +0 -12
- package/dist/core/model/types/style.d.ts +0 -57
- package/dist/core/model/types/table-border.d.ts +0 -18
- package/dist/core/runtime/DocumentRuntimeManager.d.ts +0 -38
- package/dist/core/table/border-selection.d.ts +0 -9
- package/dist/core/table/borders.d.ts +0 -42
- package/dist/core/view/Doc.d.ts +0 -160
- package/dist/core/view/Page.d.ts +0 -73
- package/dist/core/view/Paragraph.d.ts +0 -55
- package/dist/core/view/Section.d.ts +0 -74
- package/dist/core/view/Table.d.ts +0 -46
- package/dist/core/view/TableCell.d.ts +0 -60
- package/dist/core/view/TableRow.d.ts +0 -26
- package/dist/core/view/base/BandContainer.d.ts +0 -49
- package/dist/core/view/base/LayoutGroup.d.ts +0 -122
- package/dist/core/view/base/LayoutNode.d.ts +0 -77
- package/dist/core/view/base/OverlayContainer.d.ts +0 -31
- package/dist/core/view/base/OverlayLayout.d.ts +0 -19
- package/dist/core/view/base/index.d.ts +0 -4
- package/dist/core/view/context/DocPubApiContext.d.ts +0 -20
- package/dist/core/view/runs/ImageRun.d.ts +0 -60
- package/dist/core/view/runs/ImageWidget.d.ts +0 -40
- package/dist/core/view/runs/TextRun.d.ts +0 -140
- package/dist/core/view/runs/TextWidget.d.ts +0 -59
- package/dist/core/view/types/index.d.ts +0 -26
- package/dist/core/view/types/layout-node-by-component.d.ts +0 -38
- package/dist/core/view/utils/EventUtil.d.ts +0 -22
- package/dist/core/view/utils/TextUtil.d.ts +0 -122
- package/dist/core/widget/hyperlink.d.ts +0 -12
- package/dist/core/widget/index.d.ts +0 -5
- package/dist/core/widget/state.d.ts +0 -61
- package/dist/core/widget/types.d.ts +0 -190
- package/dist/domain/active/active-types.d.ts +0 -82
- package/dist/domain/constants/enum/device.d.ts +0 -26
- package/dist/domain/constants/enum/form.d.ts +0 -56
- package/dist/domain/constants/enum/image.d.ts +0 -15
- package/dist/domain/constants/enum/index.d.ts +0 -9
- package/dist/domain/constants/enum/lot.d.ts +0 -16
- package/dist/domain/constants/enum/product.d.ts +0 -9
- package/dist/domain/constants/enum/production-identification.d.ts +0 -19
- package/dist/domain/constants/enum/signature.d.ts +0 -44
- package/dist/domain/constants/enum/view.d.ts +0 -91
- package/dist/domain/constants/enum/widget.d.ts +0 -60
- package/dist/domain/constants/options.d.ts +0 -35
- package/dist/domain/device/device-query.d.ts +0 -10
- package/dist/domain/document-business/business/product-release/profile.d.ts +0 -2
- package/dist/domain/document-business/business/product-release/service.d.ts +0 -2
- package/dist/domain/document-business/index.d.ts +0 -2
- package/dist/domain/document-business/registry.d.ts +0 -2
- package/dist/domain/document-business/runtime/field-query-runtime.d.ts +0 -4
- package/dist/domain/document-business/types.d.ts +0 -24
- package/dist/domain/document-rule/index.d.ts +0 -3
- package/dist/domain/document-rule/runtime/decision-rule-evaluator.d.ts +0 -13
- package/dist/domain/document-rule/runtime/document-rule-runtime.d.ts +0 -19
- package/dist/domain/document-rule/types.d.ts +0 -50
- package/dist/domain/field/attach-field.d.ts +0 -15
- package/dist/domain/field/field-props-schema-type.d.ts +0 -94
- package/dist/domain/field/field-type.d.ts +0 -846
- package/dist/domain/field/form-value.d.ts +0 -104
- package/dist/domain/field/index.d.ts +0 -1
- package/dist/domain/field/lot-display-label.d.ts +0 -2
- package/dist/domain/field/option-spacing.d.ts +0 -8
- package/dist/domain/field/query-filter.d.ts +0 -15
- package/dist/domain/field/seal/seal-binding.d.ts +0 -19
- package/dist/domain/field/seal/seal-display.d.ts +0 -34
- package/dist/domain/field/seal/seal-value.d.ts +0 -39
- package/dist/domain/model/model-type.d.ts +0 -16
- package/dist/domain/object/date-object/index.d.ts +0 -4
- package/dist/domain/object/date-object/profile/field-keys.d.ts +0 -19
- package/dist/domain/object/date-object/profile/fields.d.ts +0 -2
- package/dist/domain/object/date-object/profile/index.d.ts +0 -3
- package/dist/domain/object/date-object/runtime/date-object-context.d.ts +0 -41
- package/dist/domain/object/date-object/runtime/date-object-runtime.d.ts +0 -41
- package/dist/domain/object/date-object/runtime/fetch-records.d.ts +0 -16
- package/dist/domain/object/date-object/runtime/object-handlers.d.ts +0 -6
- package/dist/domain/object/date-object/runtime/re-inspection-date.d.ts +0 -49
- package/dist/domain/object/date-object/runtime/row-change-handlers.d.ts +0 -6
- package/dist/domain/object/date-object/types.d.ts +0 -48
- package/dist/domain/paper-widget/paper-widget-props-schema-type.d.ts +0 -2
- package/dist/domain/table/business/check/check-table/actions/fetch-check-items.d.ts +0 -12
- package/dist/domain/table/business/check/check-table/actions/index.d.ts +0 -1
- package/dist/domain/table/business/check/check-table/front-config.d.ts +0 -21
- package/dist/domain/table/business/check/check-table/index.d.ts +0 -6
- package/dist/domain/table/business/check/check-table/profile/index.d.ts +0 -3
- package/dist/domain/table/business/check/check-table/runtime/check-table-dyn-value.d.ts +0 -20
- package/dist/domain/table/business/check/check-table/runtime/check-table-label-enricher.d.ts +0 -4
- package/dist/domain/table/business/check/check-table/runtime/expand-runtime-json.d.ts +0 -16
- package/dist/domain/table/business/check/check-table/runtime/index.d.ts +0 -5
- package/dist/domain/table/business/check/check-table/runtime/map-check-table-item-infos.d.ts +0 -9
- package/dist/domain/table/business/check/check-table/runtime/prepare-check-table-init.d.ts +0 -22
- package/dist/domain/table/business/check/check-table/runtime/register-handlers.d.ts +0 -1
- package/dist/domain/table/business/check/check-table/types.d.ts +0 -34
- package/dist/domain/table/business/device/maintenance/index.d.ts +0 -1
- package/dist/domain/table/business/device/maintenance/profile/field-keys.d.ts +0 -9
- package/dist/domain/table/business/device/maintenance/profile/fields.d.ts +0 -2
- package/dist/domain/table/business/device/maintenance/profile/index.d.ts +0 -3
- package/dist/domain/table/business/device/point-inspection/index.d.ts +0 -1
- package/dist/domain/table/business/device/point-inspection/profile/field-keys.d.ts +0 -9
- package/dist/domain/table/business/device/point-inspection/profile/fields.d.ts +0 -2
- package/dist/domain/table/business/device/point-inspection/profile/index.d.ts +0 -3
- package/dist/domain/table/business/device/runtime/device-signature-lock-engine.d.ts +0 -13
- package/dist/domain/table/business/device/signature-lock.d.ts +0 -26
- package/dist/domain/table/business/material/material-balance/actions/fetch-material-consume-data.d.ts +0 -7
- package/dist/domain/table/business/material/material-balance/actions/index.d.ts +0 -3
- package/dist/domain/table/business/material/material-balance/actions/open-consume-modal.d.ts +0 -7
- package/dist/domain/table/business/material/material-balance/components/material-consume-modal.vue.d.ts +0 -6
- package/dist/domain/table/business/material/material-balance/index.d.ts +0 -2
- package/dist/domain/table/business/material/material-balance/profile/field-keys.d.ts +0 -25
- package/dist/domain/table/business/material/material-balance/profile/fields.d.ts +0 -2
- package/dist/domain/table/business/material/material-balance/profile/index.d.ts +0 -4
- package/dist/domain/table/business/material/material-balance/runtime/register-handlers.d.ts +0 -1
- package/dist/domain/table/business/material/material-balance/runtime/use-consume-modal-cleanup.d.ts +0 -3
- package/dist/domain/table/business/material/material-consume/index.d.ts +0 -2
- package/dist/domain/table/business/material/material-consume/profile/fields.d.ts +0 -2
- package/dist/domain/table/business/material/material-consume/profile/index.d.ts +0 -4
- package/dist/domain/table/business/material/material-consume/profile/product-fields.d.ts +0 -6
- package/dist/domain/table/business/material/material-consume/runtime/register-handlers.d.ts +0 -1
- package/dist/domain/table/business/material/material-consume/runtime/row-change-handlers.d.ts +0 -2
- package/dist/domain/table/business/material/material-requisition/index.d.ts +0 -2
- package/dist/domain/table/business/material/material-requisition/profile/field-keys.d.ts +0 -34
- package/dist/domain/table/business/material/material-requisition/profile/fields.d.ts +0 -2
- package/dist/domain/table/business/material/material-requisition/profile/index.d.ts +0 -4
- package/dist/domain/table/business/material/material-requisition/runtime/register-handlers.d.ts +0 -1
- package/dist/domain/table/business/material/material-requisition/runtime/row-change-handlers.d.ts +0 -5
- package/dist/domain/table/business/material/material-substitution/actions/scan.d.ts +0 -3
- package/dist/domain/table/business/material/material-substitution/index.d.ts +0 -3
- package/dist/domain/table/business/material/material-substitution/profile/field-keys.d.ts +0 -41
- package/dist/domain/table/business/material/material-substitution/profile/fields.d.ts +0 -2
- package/dist/domain/table/business/material/material-substitution/profile/index.d.ts +0 -4
- package/dist/domain/table/business/material/material-substitution/runtime/register-handlers.d.ts +0 -1
- package/dist/domain/table/business/material/material-substitution/runtime/row-change-handlers.d.ts +0 -6
- package/dist/domain/table/business/material/material-substitution/runtime/scan-fill.d.ts +0 -4
- package/dist/domain/table/business/material/types.d.ts +0 -201
- package/dist/domain/table/business/preprocess/pretreatment-list/actions/index.d.ts +0 -1
- package/dist/domain/table/business/preprocess/pretreatment-list/actions/scan.d.ts +0 -6
- package/dist/domain/table/business/preprocess/pretreatment-list/index.d.ts +0 -2
- package/dist/domain/table/business/preprocess/pretreatment-list/profile/field-keys.d.ts +0 -45
- package/dist/domain/table/business/preprocess/pretreatment-list/profile/fields.d.ts +0 -2
- package/dist/domain/table/business/preprocess/pretreatment-list/profile/index.d.ts +0 -3
- package/dist/domain/table/business/preprocess/pretreatment-list/runtime/register-handlers.d.ts +0 -1
- package/dist/domain/table/business/preprocess/pretreatment-list/runtime/row-change-handlers.d.ts +0 -25
- package/dist/domain/table/business/shared/production-container-hyperlink-enricher.d.ts +0 -7
- package/dist/domain/table/business/shared/production-identification-scan-api.d.ts +0 -17
- package/dist/domain/table/business/shared/scan-action.d.ts +0 -43
- package/dist/domain/table/business/sterilize/entrust-steril-batch-list/actions/index.d.ts +0 -1
- package/dist/domain/table/business/sterilize/entrust-steril-batch-list/actions/scan.d.ts +0 -6
- package/dist/domain/table/business/sterilize/entrust-steril-batch-list/index.d.ts +0 -2
- package/dist/domain/table/business/sterilize/entrust-steril-batch-list/profile/field-keys.d.ts +0 -26
- package/dist/domain/table/business/sterilize/entrust-steril-batch-list/profile/fields.d.ts +0 -2
- package/dist/domain/table/business/sterilize/entrust-steril-batch-list/profile/index.d.ts +0 -3
- package/dist/domain/table/business/sterilize/entrust-steril-batch-list/runtime/register-handlers.d.ts +0 -1
- package/dist/domain/table/business/sterilize/entrust-steril-batch-list/runtime/row-change-handlers.d.ts +0 -5
- package/dist/domain/table/business/warehouse/device-part-consume/index.d.ts +0 -2
- package/dist/domain/table/business/warehouse/device-part-consume/profile/field-keys.d.ts +0 -35
- package/dist/domain/table/business/warehouse/device-part-consume/profile/fields.d.ts +0 -2
- package/dist/domain/table/business/warehouse/device-part-consume/profile/index.d.ts +0 -3
- package/dist/domain/table/business/warehouse/device-part-consume/runtime/register-handlers.d.ts +0 -1
- package/dist/domain/table/business/warehouse/device-part-consume/runtime/row-change-handlers.d.ts +0 -3
- package/dist/domain/table/business/warehouse/part-stocktake/index.d.ts +0 -2
- package/dist/domain/table/business/warehouse/part-stocktake/profile/field-keys.d.ts +0 -38
- package/dist/domain/table/business/warehouse/part-stocktake/profile/fields.d.ts +0 -2
- package/dist/domain/table/business/warehouse/part-stocktake/profile/index.d.ts +0 -3
- package/dist/domain/table/business/warehouse/part-stocktake/runtime/register-handlers.d.ts +0 -1
- package/dist/domain/table/business/warehouse/part-stocktake/runtime/row-change-handlers.d.ts +0 -6
- package/dist/domain/table/business/warehouse/shared/inventory-scan-api.d.ts +0 -19
- package/dist/domain/table/business/warehouse/shared/inventory-scan-columns.d.ts +0 -6
- package/dist/domain/table/business/warehouse/warehouse-allocate/actions/index.d.ts +0 -1
- package/dist/domain/table/business/warehouse/warehouse-allocate/actions/scan.d.ts +0 -8
- package/dist/domain/table/business/warehouse/warehouse-allocate/index.d.ts +0 -2
- package/dist/domain/table/business/warehouse/warehouse-allocate/profile/field-keys.d.ts +0 -46
- package/dist/domain/table/business/warehouse/warehouse-allocate/profile/fields.d.ts +0 -2
- package/dist/domain/table/business/warehouse/warehouse-allocate/profile/index.d.ts +0 -3
- package/dist/domain/table/business/warehouse/warehouse-allocate/runtime/before-btn-click.d.ts +0 -5
- package/dist/domain/table/business/warehouse/warehouse-allocate/runtime/register-handlers.d.ts +0 -1
- package/dist/domain/table/business/warehouse/warehouse-allocate/runtime/row-change-handlers.d.ts +0 -6
- package/dist/domain/table/business/warehouse/warehouse-in/actions/index.d.ts +0 -1
- package/dist/domain/table/business/warehouse/warehouse-in/actions/scan.d.ts +0 -3
- package/dist/domain/table/business/warehouse/warehouse-in/index.d.ts +0 -3
- package/dist/domain/table/business/warehouse/warehouse-in/profile/field-keys.d.ts +0 -45
- package/dist/domain/table/business/warehouse/warehouse-in/profile/fields.d.ts +0 -2
- package/dist/domain/table/business/warehouse/warehouse-in/profile/index.d.ts +0 -3
- package/dist/domain/table/business/warehouse/warehouse-in/runtime/register-handlers.d.ts +0 -1
- package/dist/domain/table/business/warehouse/warehouse-in/runtime/row-change-handlers.d.ts +0 -12
- package/dist/domain/table/business/warehouse/warehouse-in-out/index.d.ts +0 -2
- package/dist/domain/table/business/warehouse/warehouse-in-out/profile/field-keys.d.ts +0 -8
- package/dist/domain/table/business/warehouse/warehouse-in-out/profile/fields.d.ts +0 -2
- package/dist/domain/table/business/warehouse/warehouse-in-out/profile/index.d.ts +0 -2
- package/dist/domain/table/business/warehouse/warehouse-inbound/index.d.ts +0 -2
- package/dist/domain/table/business/warehouse/warehouse-inbound/profile/field-keys.d.ts +0 -32
- package/dist/domain/table/business/warehouse/warehouse-inbound/profile/fields.d.ts +0 -2
- package/dist/domain/table/business/warehouse/warehouse-inbound/profile/index.d.ts +0 -3
- package/dist/domain/table/business/warehouse/warehouse-inbound/runtime/register-handlers.d.ts +0 -1
- package/dist/domain/table/business/warehouse/warehouse-inbound/runtime/row-change-handlers.d.ts +0 -2
- package/dist/domain/table/business/warehouse/warehouse-inventory/actions/index.d.ts +0 -1
- package/dist/domain/table/business/warehouse/warehouse-inventory/actions/scan.d.ts +0 -9
- package/dist/domain/table/business/warehouse/warehouse-inventory/index.d.ts +0 -4
- package/dist/domain/table/business/warehouse/warehouse-inventory/profile/api.d.ts +0 -3
- package/dist/domain/table/business/warehouse/warehouse-inventory/profile/field-keys.d.ts +0 -54
- package/dist/domain/table/business/warehouse/warehouse-inventory/profile/fields.d.ts +0 -2
- package/dist/domain/table/business/warehouse/warehouse-inventory/profile/index.d.ts +0 -4
- package/dist/domain/table/business/warehouse/warehouse-inventory/runtime/index.d.ts +0 -2
- package/dist/domain/table/business/warehouse/warehouse-inventory/runtime/register-handlers.d.ts +0 -1
- package/dist/domain/table/business/warehouse/warehouse-inventory/runtime/row-change-handlers.d.ts +0 -6
- package/dist/domain/table/business/warehouse/warehouse-inventory/runtime/stocktake-calc.d.ts +0 -23
- package/dist/domain/table/business/warehouse/warehouse-inventory/runtime/stocktake-dimension.d.ts +0 -10
- package/dist/domain/table/business/warehouse/warehouse-inventory/types.d.ts +0 -35
- package/dist/domain/table/business/warehouse/warehouse-out/actions/index.d.ts +0 -1
- package/dist/domain/table/business/warehouse/warehouse-out/actions/scan.d.ts +0 -7
- package/dist/domain/table/business/warehouse/warehouse-out/index.d.ts +0 -3
- package/dist/domain/table/business/warehouse/warehouse-out/profile/field-keys.d.ts +0 -44
- package/dist/domain/table/business/warehouse/warehouse-out/profile/fields.d.ts +0 -2
- package/dist/domain/table/business/warehouse/warehouse-out/profile/index.d.ts +0 -3
- package/dist/domain/table/business/warehouse/warehouse-out/runtime/register-handlers.d.ts +0 -1
- package/dist/domain/table/business/warehouse/warehouse-out/runtime/row-change-handlers.d.ts +0 -5
- package/dist/domain/table/business/warehouse/warehouse-outbound/index.d.ts +0 -2
- package/dist/domain/table/business/warehouse/warehouse-outbound/profile/field-keys.d.ts +0 -34
- package/dist/domain/table/business/warehouse/warehouse-outbound/profile/fields.d.ts +0 -2
- package/dist/domain/table/business/warehouse/warehouse-outbound/profile/index.d.ts +0 -3
- package/dist/domain/table/business/warehouse/warehouse-outbound/runtime/register-handlers.d.ts +0 -1
- package/dist/domain/table/business/warehouse/warehouse-outbound/runtime/row-change-handlers.d.ts +0 -2
- package/dist/domain/table/data/dynamic-table/index.d.ts +0 -2
- package/dist/domain/table/data/dynamic-table/profile/index.d.ts +0 -3
- package/dist/domain/table/data/fixed-table/index.d.ts +0 -2
- package/dist/domain/table/data/fixed-table/profile/index.d.ts +0 -3
- package/dist/domain/table/data/two-d-table/index.d.ts +0 -2
- package/dist/domain/table/data/two-d-table/profile/index.d.ts +0 -3
- package/dist/domain/table/design/autofill-expander.d.ts +0 -22
- package/dist/domain/table/design/hooks/on-bounded-default-props.d.ts +0 -3
- package/dist/domain/table/design/hooks/on-field-attach.d.ts +0 -19
- package/dist/domain/table/design/hooks/on-repeating-default-props.d.ts +0 -3
- package/dist/domain/table/design/hooks/on-subtable-create.d.ts +0 -22
- package/dist/domain/table/design/label.d.ts +0 -2
- package/dist/domain/table/design/ribbon-options.d.ts +0 -17
- package/dist/domain/table/design/sub-model-matcher.d.ts +0 -21
- package/dist/domain/table/design/theme/region-item-theme.d.ts +0 -6
- package/dist/domain/table/design/theme/table-theme.d.ts +0 -12
- package/dist/domain/table/design/validate-nested-table-insert.d.ts +0 -3
- package/dist/domain/table/design/validate-nested-table-region.d.ts +0 -31
- package/dist/domain/table/design/validate-table-selection.d.ts +0 -36
- package/dist/domain/table/index.d.ts +0 -20
- package/dist/domain/table/registry.d.ts +0 -22
- package/dist/domain/table/runtime/api/biz-service-api.d.ts +0 -12
- package/dist/domain/table/runtime/engines/init-load-engine.d.ts +0 -18
- package/dist/domain/table/runtime/engines/linkage-engine.d.ts +0 -72
- package/dist/domain/table/runtime/engines/main-field-bind-engine.d.ts +0 -9
- package/dist/domain/table/runtime/engines/remote-sync-engine.d.ts +0 -37
- package/dist/domain/table/runtime/engines/row-runtime-engine.d.ts +0 -19
- package/dist/domain/table/runtime/engines/rule-engine.d.ts +0 -35
- package/dist/domain/table/runtime/option-fill-updates.d.ts +0 -6
- package/dist/domain/table/runtime/row-change-utils.d.ts +0 -25
- package/dist/domain/table/runtime/runtime-handlers.d.ts +0 -76
- package/dist/domain/table/runtime/table-runtime-context.d.ts +0 -58
- package/dist/domain/table/runtime/table-runtime-utils.d.ts +0 -30
- package/dist/domain/table/runtime/table-runtime.d.ts +0 -84
- package/dist/domain/table/types.d.ts +0 -539
- package/dist/index.d.ts +0 -5
- package/dist/index.es.js +0 -216349
- package/dist/runtime/_register_/composables/index.d.ts +0 -4
- package/dist/runtime/_register_/composables/panel/useActivePanel.d.ts +0 -18
- package/dist/runtime/_register_/composables/useModelData.d.ts +0 -13
- package/dist/runtime/_register_/composables/useModelLoader.d.ts +0 -10
- package/dist/runtime/_register_/composables/useModelState.d.ts +0 -9
- package/dist/runtime/_register_/context/DesignSuiteContext.d.ts +0 -37
- package/dist/runtime/_register_/context/InteractionContext.d.ts +0 -2
- package/dist/runtime/_register_/context/index.d.ts +0 -2
- package/dist/runtime/_register_/hooks/index.d.ts +0 -1
- package/dist/runtime/_register_/hooks/useRegisterSuite.d.ts +0 -6
- package/dist/runtime/_register_/index.d.ts +0 -4
- package/dist/runtime/_register_/runtime/SuiteRuntime.d.ts +0 -45
- package/dist/runtime/canvas/__common__/context-menu/index.type.d.ts +0 -9
- package/dist/runtime/canvas/__common__/context-menu/index.vue.d.ts +0 -8
- package/dist/runtime/canvas/__common__/context-menu/resolve-table-context.d.ts +0 -10
- package/dist/runtime/canvas/__common__/context-menu/resolve-table-menu-index.d.ts +0 -9
- package/dist/runtime/canvas/__common__/context-menu/table-menu.vue.d.ts +0 -7
- package/dist/runtime/canvas/__common__/widget-component.vue.d.ts +0 -9
- package/dist/runtime/canvas/__common__/widget-container/index.vue.d.ts +0 -13
- package/dist/runtime/canvas/__common__/widget-container/overlay-design.vue.d.ts +0 -33
- package/dist/runtime/canvas/__common__/widget-container/overlay-icon.vue.d.ts +0 -5
- package/dist/runtime/canvas/__common__/widget-container/overlay-layer.vue.d.ts +0 -42
- package/dist/runtime/canvas/__common__/widget-container/overlay-render.vue.d.ts +0 -102
- package/dist/runtime/canvas/constants/base-attrs.d.ts +0 -10
- package/dist/runtime/canvas/constants/index.d.ts +0 -1
- package/dist/runtime/canvas/doc-layout.vue.d.ts +0 -34
- package/dist/runtime/canvas/index.d.ts +0 -2
- package/dist/runtime/canvas/inline-image/inline-image.vue.d.ts +0 -7
- package/dist/runtime/canvas/inline-image/resize-box.vue.d.ts +0 -32
- package/dist/runtime/canvas/node/index.d.ts +0 -3
- package/dist/runtime/canvas/node/overlay-layout.vue.d.ts +0 -6
- package/dist/runtime/canvas/node/paragraph.vue.d.ts +0 -6
- package/dist/runtime/canvas/node/seal-overlay.vue.d.ts +0 -6
- package/dist/runtime/canvas/node/text-character.vue.d.ts +0 -9
- package/dist/runtime/canvas/overlay/page-overlay-group.vue.d.ts +0 -8
- package/dist/runtime/canvas/paper/header-footer-guides.vue.d.ts +0 -6
- package/dist/runtime/canvas/paper/inner-corner-mark.vue.d.ts +0 -6
- package/dist/runtime/canvas/paper/paper-group.vue.d.ts +0 -18
- package/dist/runtime/canvas/paper/paper-hit-rect.vue.d.ts +0 -7
- package/dist/runtime/canvas/paper/themes.d.ts +0 -37
- package/dist/runtime/canvas/print-capture.d.ts +0 -12
- package/dist/runtime/canvas/table/design/table-action-overlay/index.vue.d.ts +0 -20
- package/dist/runtime/canvas/table/design/table-cell-highlight.vue.d.ts +0 -14
- package/dist/runtime/canvas/table/design/table-guide-line.vue.d.ts +0 -11
- package/dist/runtime/canvas/table/design/table-structure-overlay/dynamic-label.vue.d.ts +0 -17
- package/dist/runtime/canvas/table/design/table-structure-overlay/index.vue.d.ts +0 -9
- package/dist/runtime/canvas/table/design/table-structure-overlay/outline-lines.vue.d.ts +0 -9
- package/dist/runtime/canvas/table/design/table-structure-overlay/placeholder-label.vue.d.ts +0 -10
- package/dist/runtime/canvas/table/render/label-parse-rule/index.d.ts +0 -2
- package/dist/runtime/canvas/table/render/label-parse-rule/type.d.ts +0 -62
- package/dist/runtime/canvas/table/render/label-parse-rule/useLabelParsingRules.d.ts +0 -39
- package/dist/runtime/canvas/table/render/material-consume/bom-validator.d.ts +0 -324
- package/dist/runtime/canvas/table/render/material-consume/context-key.d.ts +0 -6
- package/dist/runtime/canvas/table/render/material-consume/derived-qty.d.ts +0 -5
- package/dist/runtime/canvas/table/render/material-consume/index.d.ts +0 -5
- package/dist/runtime/canvas/table/render/material-consume/initial-product-autofill.d.ts +0 -6
- package/dist/runtime/canvas/table/render/material-consume/material-consume-group-merge.d.ts +0 -47
- package/dist/runtime/canvas/table/render/material-consume/material-consume-table-controller.d.ts +0 -361
- package/dist/runtime/canvas/table/render/material-consume/material-consume.util.d.ts +0 -15
- package/dist/runtime/canvas/table/render/material-consume/object-product-autofill.d.ts +0 -25
- package/dist/runtime/canvas/table/render/material-consume/product-autofill.d.ts +0 -7
- package/dist/runtime/canvas/table/render/material-consume/product-id-query.d.ts +0 -31
- package/dist/runtime/canvas/table/render/material-consume/product-source.d.ts +0 -4
- package/dist/runtime/canvas/table/render/material-consume/scan-fill.d.ts +0 -15
- package/dist/runtime/canvas/table/render/material-consume/scan-validator.d.ts +0 -192
- package/dist/runtime/canvas/table/render/material-consume/service.d.ts +0 -87
- package/dist/runtime/canvas/table/render/material-consume/tmpl-bom-controller.d.ts +0 -83
- package/dist/runtime/canvas/table/render/material-consume/transform.d.ts +0 -12
- package/dist/runtime/canvas/table/render/material-consume/uom-convert-runtime.d.ts +0 -51
- package/dist/runtime/canvas/table/render/table-structure-overlay/index.vue.d.ts +0 -9
- package/dist/runtime/canvas/table/render/table-structure-overlay/sub-table-action/bounded-table-action.vue.d.ts +0 -10
- package/dist/runtime/canvas/table/render/table-structure-overlay/sub-table-action/business-scan-menu.d.ts +0 -12
- package/dist/runtime/canvas/table/render/table-structure-overlay/sub-table-action/fixed-quick-fill-layout.d.ts +0 -30
- package/dist/runtime/canvas/table/render/table-structure-overlay/sub-table-action/index.d.ts +0 -3
- package/dist/runtime/canvas/table/render/table-structure-overlay/sub-table-action/quick-fill.util.d.ts +0 -32
- package/dist/runtime/canvas/table/render/table-structure-overlay/sub-table-action/repeating-table-action.vue.d.ts +0 -10
- package/dist/runtime/canvas/table/shared/resolve-cell-row-change-style.d.ts +0 -34
- package/dist/runtime/canvas/table/shared/table-background.vue.d.ts +0 -6
- package/dist/runtime/canvas/table/shared/table-cell.vue.d.ts +0 -6
- package/dist/runtime/canvas/table/shared/table-form-change-overlay.vue.d.ts +0 -6
- package/dist/runtime/canvas/table/shared/table-lines.vue.d.ts +0 -12
- package/dist/runtime/canvas/table/table-design.vue.d.ts +0 -12
- package/dist/runtime/canvas/table/table-presentation.d.ts +0 -16
- package/dist/runtime/canvas/table/table-render.vue.d.ts +0 -11
- package/dist/runtime/canvas/table/table.vue.d.ts +0 -6
- package/dist/runtime/canvas/table/utils/index.d.ts +0 -48
- package/dist/runtime/canvas/table/utils/paint-table-borders.d.ts +0 -4
- package/dist/runtime/canvas/table/utils/useTableSelection.d.ts +0 -70
- package/dist/runtime/canvas/types/index.d.ts +0 -4
- package/dist/runtime/designer/main/editable-canvas.vue.d.ts +0 -50
- package/dist/runtime/designer/panel/panel-breadcrumb-separator.vue.d.ts +0 -2
- package/dist/runtime/designer/panel/panel-nav.d.ts +0 -13
- package/dist/runtime/designer/panel/panel.vue.d.ts +0 -2
- package/dist/runtime/designer/ribbon/common/button-icon.vue.d.ts +0 -13
- package/dist/runtime/designer/ribbon/components/insert-table-form-modal.vue.d.ts +0 -17
- package/dist/runtime/designer/ribbon/components/marker-color-select.vue.d.ts +0 -77
- package/dist/runtime/designer/ribbon/components/set-table-header-form-modal.vue.d.ts +0 -18
- package/dist/runtime/designer/ribbon/components/sub-table-form-modal.vue.d.ts +0 -25
- package/dist/runtime/designer/ribbon/components/table-ribbon-group.vue.d.ts +0 -2
- package/dist/runtime/designer/ribbon/components/text-color-select.vue.d.ts +0 -93
- package/dist/runtime/designer/ribbon/constant/color.d.ts +0 -62
- package/dist/runtime/designer/ribbon/constant/font.d.ts +0 -40
- package/dist/runtime/designer/ribbon/constant/word.d.ts +0 -26
- package/dist/runtime/designer/ribbon/hooks/useDhrEdition.d.ts +0 -7
- package/dist/runtime/designer/ribbon/ribbon.vue.d.ts +0 -2
- package/dist/runtime/designer/ribbon/svg/bj-marker-svg.vue.d.ts +0 -7
- package/dist/runtime/designer/ribbon/svg/color-wheel-svg.vue.d.ts +0 -2
- package/dist/runtime/designer/ribbon/svg/font-color-svg.vue.d.ts +0 -7
- package/dist/runtime/designer/ribbon/svg/table/table-svg-icon.vue.d.ts +0 -11
- package/dist/runtime/designer/ribbon/svg/table-border-icon.vue.d.ts +0 -6
- package/dist/runtime/designer/ribbon/tabs/word-tab.vue.d.ts +0 -2
- package/dist/runtime/designer/toolkit/renderer/add-field-btn.vue.d.ts +0 -8
- package/dist/runtime/designer/toolkit/renderer/field-palette/field-palette.vue.d.ts +0 -15
- package/dist/runtime/designer/toolkit/renderer/field-palette/index.d.ts +0 -14
- package/dist/runtime/designer/toolkit/renderer/toolkit-content-fields.vue.d.ts +0 -4
- package/dist/runtime/designer/toolkit/renderer/toolkit-content-widgets.vue.d.ts +0 -2
- package/dist/runtime/designer/toolkit/svg/toolkit-svg-icon.vue.d.ts +0 -9
- package/dist/runtime/designer/toolkit/toolkit-item.vue.d.ts +0 -51
- package/dist/runtime/designer/toolkit/toolkit.vue.d.ts +0 -221
- package/dist/runtime/factories/createDesignWidgetFactory.d.ts +0 -21
- package/dist/runtime/factories/modules/useSpecificConfig.d.ts +0 -2
- package/dist/runtime/factories/useDependency.d.ts +0 -5
- package/dist/runtime/factories/useWidgetInitializer.d.ts +0 -13
- package/dist/runtime/factories/useWidgetRenderData.d.ts +0 -52
- package/dist/runtime/interface/change-diff.d.ts +0 -24
- package/dist/runtime/interface/computed.d.ts +0 -42
- package/dist/runtime/interface/context-defaults.d.ts +0 -9
- package/dist/runtime/interface/data.d.ts +0 -45
- package/dist/runtime/interface/fetchers.d.ts +0 -110
- package/dist/runtime/interface/form-change-row.d.ts +0 -78
- package/dist/runtime/interface/render.d.ts +0 -45
- package/dist/runtime/interface/sterilization-date.d.ts +0 -9
- package/dist/runtime/interface/validate-designer-default.d.ts +0 -5
- package/dist/runtime/renderer/dialogs/device-scan/device-scan-dialog.vue.d.ts +0 -199
- package/dist/runtime/renderer/dialogs/device-scan/submit-device-scan.d.ts +0 -29
- package/dist/runtime/renderer/dialogs/dialog-container.vue.d.ts +0 -21
- package/dist/runtime/renderer/dialogs/document-rule-prompt/document-rule-prompt.vue.d.ts +0 -5
- package/dist/runtime/renderer/dialogs/document-rule-prompt/open-document-rule-prompt.d.ts +0 -2
- package/dist/runtime/renderer/dialogs/e-sop-view/open-e-sop-view.d.ts +0 -3
- package/dist/runtime/renderer/dialogs/field-hyperlink/open-field-hyperlink.d.ts +0 -2
- package/dist/runtime/renderer/dialogs/seal/open-seal-flow.d.ts +0 -3
- package/dist/runtime/renderer/dialogs/seal/seal-api.d.ts +0 -17
- package/dist/runtime/renderer/dialogs/seal/seal-confirm-dialog.vue.d.ts +0 -7
- package/dist/runtime/renderer/dialogs/seal/seal-runtime.d.ts +0 -30
- package/dist/runtime/renderer/dialogs/seal/types.d.ts +0 -17
- package/dist/runtime/renderer/dialogs/seal/use-seal-confirm.d.ts +0 -27
- package/dist/runtime/renderer/dialogs/signature/authentication/signature-authentication.vue.d.ts +0 -27
- package/dist/runtime/renderer/dialogs/signature/authentication/types.d.ts +0 -30
- package/dist/runtime/renderer/dialogs/signature/authentication/useSignatureAuthentication.d.ts +0 -29
- package/dist/runtime/renderer/dialogs/signature/card-signer.vue.d.ts +0 -14
- package/dist/runtime/renderer/dialogs/signature/logic.d.ts +0 -27
- package/dist/runtime/renderer/dialogs/signature/security-config.d.ts +0 -6
- package/dist/runtime/renderer/dialogs/signature/signature-autofill-runtime.d.ts +0 -14
- package/dist/runtime/renderer/dialogs/signature/signature-dialog.vue.d.ts +0 -76
- package/dist/runtime/renderer/dialogs/signature/validate-signature-config.d.ts +0 -5
- package/dist/runtime/renderer/dialogs/upload-file/base-upload-file.vue.d.ts +0 -20
- package/dist/runtime/renderer/dialogs/upload-file/upload-file-dialog.vue.d.ts +0 -54
- package/dist/runtime/renderer/dialogs/upload-image/base-upload-image.vue.d.ts +0 -21
- package/dist/runtime/renderer/dialogs/upload-image/upload-image-dialog.vue.d.ts +0 -55
- package/dist/runtime/renderer/dropdowns/components/datetime-dropdown.vue.d.ts +0 -11
- package/dist/runtime/renderer/dropdowns/components/dropdown-container.vue.d.ts +0 -25
- package/dist/runtime/renderer/dropdowns/components/option-dropdown.vue.d.ts +0 -197
- package/dist/runtime/renderer/dropdowns/components/tables/columns/base/selection.d.ts +0 -14
- package/dist/runtime/renderer/dropdowns/components/tables/columns/business/biz.d.ts +0 -33
- package/dist/runtime/renderer/dropdowns/components/tables/columns/business/device.d.ts +0 -11
- package/dist/runtime/renderer/dropdowns/components/tables/columns/business/group.d.ts +0 -44
- package/dist/runtime/renderer/dropdowns/components/tables/columns/business/lot2sn.d.ts +0 -11
- package/dist/runtime/renderer/dropdowns/components/tables/columns/business/material-consume-history.d.ts +0 -17
- package/dist/runtime/renderer/dropdowns/components/tables/columns/business/mfg-order.d.ts +0 -11
- package/dist/runtime/renderer/dropdowns/components/tables/columns/business/part-inventory-ndo.d.ts +0 -11
- package/dist/runtime/renderer/dropdowns/components/tables/columns/business/part-ndo.d.ts +0 -11
- package/dist/runtime/renderer/dropdowns/components/tables/columns/business/product-ndo.d.ts +0 -23
- package/dist/runtime/renderer/dropdowns/components/tables/columns/business/rdo-ref.d.ts +0 -22
- package/dist/runtime/renderer/dropdowns/components/tables/columns/business/ref.d.ts +0 -11
- package/dist/runtime/renderer/dropdowns/components/tables/columns/business/route-operation.d.ts +0 -11
- package/dist/runtime/renderer/dropdowns/components/tables/columns/columns.d.ts +0 -58
- package/dist/runtime/renderer/dropdowns/components/tables/component/base-vxe-table.vue.d.ts +0 -72
- package/dist/runtime/renderer/dropdowns/components/tables/component/device-type-select.vue.d.ts +0 -11
- package/dist/runtime/renderer/dropdowns/components/tables/component/pagination-control.vue.d.ts +0 -14
- package/dist/runtime/renderer/dropdowns/components/tables/component/rdo-version-name-tag.vue.d.ts +0 -11
- package/dist/runtime/renderer/dropdowns/components/tables/composables/useMaterialSubstitutionSource.d.ts +0 -7
- package/dist/runtime/renderer/dropdowns/components/tables/composables/useSearchEnter.d.ts +0 -18
- package/dist/runtime/renderer/dropdowns/components/tables/composables/useSelectTable.d.ts +0 -103
- package/dist/runtime/renderer/dropdowns/components/tables/composables/useTableDropdown.d.ts +0 -29
- package/dist/runtime/renderer/dropdowns/components/tables/rdo-table-dropdown.vue.d.ts +0 -313
- package/dist/runtime/renderer/dropdowns/components/tables/strategy/merge-select-source.d.ts +0 -10
- package/dist/runtime/renderer/dropdowns/components/tables/strategy/selectStrategy.d.ts +0 -70
- package/dist/runtime/renderer/dropdowns/components/tables/table-dropdown.vue.d.ts +0 -308
- package/dist/runtime/renderer/dropdowns/components/tables/table-option-dropdown.vue.d.ts +0 -338
- package/dist/runtime/renderer/dropdowns/components/tables/utils/assoc-filter.d.ts +0 -17
- package/dist/runtime/renderer/dropdowns/components/tables/utils/quick-search.d.ts +0 -32
- package/dist/runtime/renderer/dropdowns/components/time-dropdown.vue.d.ts +0 -11
- package/dist/runtime/renderer/dropdowns/components/tree/tree-dropdown.vue.d.ts +0 -196
- package/dist/runtime/renderer/dropdowns/components/tree/tree-node.vue.d.ts +0 -17
- package/dist/runtime/renderer/dropdowns/composables/useDropdownSearchFocus.d.ts +0 -9
- package/dist/runtime/renderer/dropdowns/composables/useDropdownViewportSize.d.ts +0 -7
- package/dist/runtime/renderer/dropdowns/factories/dropdown-factory.d.ts +0 -25
- package/dist/runtime/renderer/dropdowns/factories/index.d.ts +0 -2
- package/dist/runtime/renderer/field-preview/active-preview.d.ts +0 -7
- package/dist/runtime/renderer/field-preview/attachment-file-popover.vue.d.ts +0 -8
- package/dist/runtime/renderer/field-preview/field-preview-overlay.vue.d.ts +0 -34
- package/dist/runtime/renderer/field-preview/image-preview-popover.vue.d.ts +0 -7
- package/dist/runtime/renderer/field-preview/index.d.ts +0 -4
- package/dist/runtime/renderer/field-preview/types.d.ts +0 -5
- package/dist/runtime/renderer/main/preview-canvas.vue.d.ts +0 -54
- package/dist/runtime/renderer/validation/validation-comment-item.vue.d.ts +0 -14
- package/dist/runtime/renderer/validation/validation-comment-layer.vue.d.ts +0 -2
- package/dist/runtime/validation/admission.d.ts +0 -29
- package/dist/runtime/validation/createValidateFactory.d.ts +0 -14
- package/dist/runtime/validation/index.d.ts +0 -6
- package/dist/runtime/validation/layout.d.ts +0 -35
- package/dist/runtime/validation/merge.d.ts +0 -3
- package/dist/runtime/validation/state.d.ts +0 -41
- package/dist/runtime/validation/useFormValidator.d.ts +0 -25
- package/dist/sdk/doc-runtime/composables/useDocController.d.ts +0 -16
- package/dist/sdk/doc-runtime/composables/useDocLooperAutoSaveNotify.d.ts +0 -24
- package/dist/sdk/doc-runtime/composables/useDocOperations.d.ts +0 -74
- package/dist/sdk/doc-runtime/composables/useDocRuntimeProvider.d.ts +0 -19
- package/dist/sdk/doc-runtime/composables/useDocSuite.d.ts +0 -20
- package/dist/sdk/doc-runtime/composables/useDocumentRulePrompt.d.ts +0 -3
- package/dist/sdk/doc-runtime/composables/useValidationFullSync.d.ts +0 -15
- package/dist/sdk/doc-runtime/device-link/resolve-field-focus-context.d.ts +0 -15
- package/dist/sdk/doc-runtime/device-link/useDeviceFieldFocusBridge.d.ts +0 -7
- package/dist/sdk/doc-runtime/device-link/useFormTmplAndModelInit.d.ts +0 -15
- package/dist/sdk/doc-runtime/device-link/useFormTmplConfig.d.ts +0 -10
- package/dist/sdk/doc-runtime/factories/document-initializer.d.ts +0 -67
- package/dist/sdk/doc-runtime/factories/document-request-strategy.d.ts +0 -3
- package/dist/sdk/doc-runtime/factories/runtime-data-sources.d.ts +0 -39
- package/dist/sdk/doc-runtime/factories/runtime-json-builder.d.ts +0 -13
- package/dist/sdk/doc-runtime/factories/useDocumentFactory.d.ts +0 -109
- package/dist/sdk/doc-runtime/factories/value-change-data-sources.d.ts +0 -7
- package/dist/sdk/doc-runtime/queries/template-placed-fields.d.ts +0 -7
- package/dist/sdk/doc-runtime/useWord.d.ts +0 -22
- package/dist/sdk/doc-runtime/utils/sub-field-config.d.ts +0 -9
- package/dist/sdk/doc-runtime/utils/wait-for-data-settle.d.ts +0 -8
- package/dist/sdk/doc-runtime/validators/validate-designer.d.ts +0 -4
- package/dist/sdk/doc-runtime/validators/validate-doc-designer.d.ts +0 -4
- package/dist/sdk/engine/index.d.ts +0 -19
- package/dist/sdk/index.d.ts +0 -15
- package/dist/sdk/plugins/index.d.ts +0 -17
- package/dist/sdk/plugins/register-panel-schemas.d.ts +0 -9
- package/dist/sdk/setup.d.ts +0 -66
- package/dist/sdk/types/action-button.d.ts +0 -43
- package/dist/sdk/types/designer-validation.d.ts +0 -16
- package/dist/sdk/types/field-model-query.d.ts +0 -26
- package/dist/sdk/types/form-tmpl-config.types.d.ts +0 -123
- package/dist/sdk/types/index.d.ts +0 -308
- package/dist/sdk/types/placed-form-field.d.ts +0 -6
- package/dist/sdk/vue/index.d.ts +0 -13
- package/dist/sdk/vue/layouts/doc-design-layout.vue.d.ts +0 -7
- package/dist/sdk/vue/layouts/doc-render-layout.vue.d.ts +0 -69
- package/dist/suites/edhr/component/gct-seal-render.vue.d.ts +0 -7
- package/dist/suites/edhr/component/index.d.ts +0 -2
- package/dist/suites/edhr/component/resolve-field-render-colors.d.ts +0 -33
- package/dist/suites/edhr/component/resolve-marker-color.d.ts +0 -7
- package/dist/suites/edhr/component/use-marker-render-colors.d.ts +0 -7
- package/dist/suites/edhr/index.d.ts +0 -3
- package/dist/suites/edhr/manifest/field/_common_/basic.d.ts +0 -113
- package/dist/suites/edhr/manifest/field/basic/boolean-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/basic/date-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/basic/date-time-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/basic/decimal-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/basic/double-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/basic/integer-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/basic/long-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/basic/long-text-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/basic/text-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/basic/time-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/business/destructive-test-qty-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/business/good-qty-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/business/inspection-module-qty-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/business/inspection-qty-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/business/material-check-qty-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/business/not-good-group-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/business/not-good-qty-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/business/not-good-reason-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/business/of-inst-num-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/business/operation-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/business/operation-output-qty-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/business/operation-receive-qty-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/business/product-check-qty-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/business/product-release-qty-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/business/production-date-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/business/production-qty-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/business/quantity-received-qty-manifest.d.ts +0 -3
- package/dist/suites/edhr/manifest/field/business/report-end-time-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/business/report-start-time-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/business/reporter-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/business/routing-operation-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/business/scrap-group-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/business/scrap-material-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/business/scrap-material-no-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/business/scrap-qty-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/business/scrap-reason-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/business/udi-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/business/work-hours-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/index.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/logic/attachment-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/logic/e-sop-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/logic/e-sop-version-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/logic/image-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/logic/model-relation-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/logic/option-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/logic/option-multi-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/logic/org-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/logic/org-multi-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/logic/ref-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/logic/seal-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/logic/signature-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/logic/user-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/logic/user-multi-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/material/location-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/material/stocktake-status-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/material/target-warehouse-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/material/warehouse-manager-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/material/warehouse-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/material/warehouse-receipt-date-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/material/warehouse-receipt-no-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/object-type/date-object-manifest.d.ts +0 -3
- package/dist/suites/edhr/manifest/field/object-type/device-parameter-object-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/object-type/inspection-parameter-object-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/object-type/material-consume-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/object-type/object-type-manifest.d.ts +0 -3
- package/dist/suites/edhr/manifest/field/object-type/process-parameter-object-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/object-type/qty-consumed-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/object-type/qty-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/object-type/qty-required-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/object-type/re-inspection-date-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/object-type/validity-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/trace/device-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/trace/external-reference-no-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/trace/inspection-container-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/trace/material-container-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/trace/material-no-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/trace/mfg-order-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/trace/order-no-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/trace/product-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/trace/production-container-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/trace/record-no-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/trace/related-lot-no-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/trace/shopfloor-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/trace/sterilization-container-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/trace/sterilization-date-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/field/trace/trace-date-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/index.d.ts +0 -2
- package/dist/suites/edhr/manifest/paper-widget/_common_/basic.d.ts +0 -10
- package/dist/suites/edhr/manifest/paper-widget/basic/barcode-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/paper-widget/basic/diagonal-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/paper-widget/basic/image-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/paper-widget/basic/line-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/paper-widget/basic/pagination-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/paper-widget/basic/qrcode-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/paper-widget/basic/serialnumber-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/paper-widget/basic/timediff-manifest.d.ts +0 -2
- package/dist/suites/edhr/manifest/paper-widget/index.d.ts +0 -2
- package/dist/suites/edhr/model-field-runtime/field-provider.d.ts +0 -21
- package/dist/suites/edhr/model-field-runtime/model-provider.d.ts +0 -10
- package/dist/suites/edhr/panel-config/field/file/upload.d.ts +0 -25
- package/dist/suites/edhr/panel-config/index.d.ts +0 -5
- package/dist/suites/edhr/panel-router/index.d.ts +0 -2
- package/dist/suites/edhr/panel-schema/2d-table/2DSubTablePanel.vue.d.ts +0 -8
- package/dist/suites/edhr/panel-schema/2d-table/2d-table.basic.d.ts +0 -1
- package/dist/suites/edhr/panel-schema/_shared/BoundedSubTablePanel.vue.d.ts +0 -8
- package/dist/suites/edhr/panel-schema/_shared/RepeatingSubTablePanel.vue.d.ts +0 -8
- package/dist/suites/edhr/panel-schema/_shared/create-table-panel-schema.d.ts +0 -3
- package/dist/suites/edhr/panel-schema/_shared/data-group-2d-title.d.ts +0 -7
- package/dist/suites/edhr/panel-schema/check-table/CheckTablePanel.vue.d.ts +0 -8
- package/dist/suites/edhr/panel-schema/check-table/add-ds-btn.vue.d.ts +0 -14
- package/dist/suites/edhr/panel-schema/check-table/check-table.basic.d.ts +0 -1
- package/dist/suites/edhr/panel-schema/data-group/DataGroupPanel.vue.d.ts +0 -8
- package/dist/suites/edhr/panel-schema/data-group/data-group.basic.d.ts +0 -14
- package/dist/suites/edhr/panel-schema/data-group-2d/DataGroup2DPanel.vue.d.ts +0 -8
- package/dist/suites/edhr/panel-schema/data-group-2d/data-group-2d.basic.d.ts +0 -16
- package/dist/suites/edhr/panel-schema/data-init/DataInitPanel.vue.d.ts +0 -2
- package/dist/suites/edhr/panel-schema/data-init/add-button.vue.d.ts +0 -11
- package/dist/suites/edhr/panel-schema/data-init/common/add-builtin-field/add-builtin-field-modal.vue.d.ts +0 -10
- package/dist/suites/edhr/panel-schema/data-init/common/add-builtin-field/add-builtin-field-select.vue.d.ts +0 -10
- package/dist/suites/edhr/panel-schema/data-init/common/add-builtin-param/add-builtin-param-modal.vue.d.ts +0 -10
- package/dist/suites/edhr/panel-schema/data-init/common/add-builtin-param/add-builtin-param-select.vue.d.ts +0 -11
- package/dist/suites/edhr/panel-schema/data-init/common/add-field/add-field-modal.vue.d.ts +0 -25
- package/dist/suites/edhr/panel-schema/data-init/common/add-field/add-field-select.vue.d.ts +0 -19
- package/dist/suites/edhr/panel-schema/data-init/common/add-field/useField.d.ts +0 -22
- package/dist/suites/edhr/panel-schema/data-init/common/add-ipaas/ipaas-param-config.vue.d.ts +0 -10
- package/dist/suites/edhr/panel-schema/data-init/common/add-online-form-model/online-form-model-select.vue.d.ts +0 -12
- package/dist/suites/edhr/panel-schema/data-init/common/add-sql/add-sql-input.vue.d.ts +0 -11
- package/dist/suites/edhr/panel-schema/data-init/common/add-sql/add-sql-modal.vue.d.ts +0 -7
- package/dist/suites/edhr/panel-schema/data-init/common/data-source-field-map.vue.d.ts +0 -11
- package/dist/suites/edhr/panel-schema/data-init/common/data-source-model-link.vue.d.ts +0 -39
- package/dist/suites/edhr/panel-schema/data-init/common/data-source-title.vue.d.ts +0 -19
- package/dist/suites/edhr/panel-schema/data-init/common/param-field-link.vue.d.ts +0 -10
- package/dist/suites/edhr/panel-schema/data-init/common/param-key-select.vue.d.ts +0 -18
- package/dist/suites/edhr/panel-schema/data-init/data-init.basic.d.ts +0 -5
- package/dist/suites/edhr/panel-schema/data-init/material-consume-object/bom-validator.d.ts +0 -71
- package/dist/suites/edhr/panel-schema/data-init/material-consume-object/index.d.ts +0 -3
- package/dist/suites/edhr/panel-schema/data-init/material-consume-object/linkage.d.ts +0 -76
- package/dist/suites/edhr/panel-schema/data-init/material-consume-object/use-tmpl-bom.d.ts +0 -13
- package/dist/suites/edhr/panel-schema/data-init/object-init/object-init.vue.d.ts +0 -11
- package/dist/suites/edhr/panel-schema/data-init/utils/index.d.ts +0 -215
- package/dist/suites/edhr/panel-schema/data-init/utils/json-param-logic.d.ts +0 -53
- package/dist/suites/edhr/panel-schema/data-init/utils/json-schema.d.ts +0 -18
- package/dist/suites/edhr/panel-schema/data-init/utils/sql.d.ts +0 -4
- package/dist/suites/edhr/panel-schema/dynamic-table/dynamic-table.basic.d.ts +0 -1
- package/dist/suites/edhr/panel-schema/entrust-steril-batch-list-table/entrust-steril-batch-list-table.basic.d.ts +0 -1
- package/dist/suites/edhr/panel-schema/field/FieldPanel.vue.d.ts +0 -6
- package/dist/suites/edhr/panel-schema/field/field-attribute-value.vue.d.ts +0 -26
- package/dist/suites/edhr/panel-schema/field/field-panel-chevron.vue.d.ts +0 -5
- package/dist/suites/edhr/panel-schema/field/field-panel-text-icon.vue.d.ts +0 -2
- package/dist/suites/edhr/panel-schema/field/field.basic.d.ts +0 -14
- package/dist/suites/edhr/panel-schema/fixed-table/fixed-table.basic.d.ts +0 -1
- package/dist/suites/edhr/panel-schema/index.d.ts +0 -101
- package/dist/suites/edhr/panel-schema/material-balance-table/material-balance-table.basic.d.ts +0 -1
- package/dist/suites/edhr/panel-schema/material-consume-table/MaterialConsumeTablePanel.vue.d.ts +0 -8
- package/dist/suites/edhr/panel-schema/material-consume-table/bom-entry-editor.vue.d.ts +0 -14
- package/dist/suites/edhr/panel-schema/material-consume-table/bom-product-name.vue.d.ts +0 -7
- package/dist/suites/edhr/panel-schema/material-consume-table/material-consume-table.basic.d.ts +0 -1
- package/dist/suites/edhr/panel-schema/material-consume-table/parse-rule-add-btn.vue.d.ts +0 -13
- package/dist/suites/edhr/panel-schema/material-consume-table/parse-rule-editor.vue.d.ts +0 -13
- package/dist/suites/edhr/panel-schema/material-consume-table/use-product-translate.d.ts +0 -3
- package/dist/suites/edhr/panel-schema/material-requisition-table/material-requisition-table.basic.d.ts +0 -1
- package/dist/suites/edhr/panel-schema/material-substitution-table/material-substitution-table.basic.d.ts +0 -1
- package/dist/suites/edhr/panel-schema/paper/PaperPanel.vue.d.ts +0 -2
- package/dist/suites/edhr/panel-schema/paper/modules/keep-exception-config.vue.d.ts +0 -2
- package/dist/suites/edhr/panel-schema/paper/modules/page-size-config/index.d.ts +0 -12
- package/dist/suites/edhr/panel-schema/paper/modules/page-size-config/page-size-config.vue.d.ts +0 -6
- package/dist/suites/edhr/panel-schema/paper/modules/signature-config.vue.d.ts +0 -2
- package/dist/suites/edhr/panel-schema/paper/modules/table-setting-config.vue.d.ts +0 -2
- package/dist/suites/edhr/panel-schema/paper/paper.basic.d.ts +0 -5
- package/dist/suites/edhr/panel-schema/paper-header-footer/PaperHeaderFooterPanel.vue.d.ts +0 -2
- package/dist/suites/edhr/panel-schema/paper-header-footer/paper-header-footer.basic.d.ts +0 -5
- package/dist/suites/edhr/panel-schema/paper-widget/PaperWidgetPanel.vue.d.ts +0 -8
- package/dist/suites/edhr/panel-schema/paper-widget/paper-widget.basic.d.ts +0 -11
- package/dist/suites/edhr/panel-schema/pretreatment-list-table/pretreatment-list-table.basic.d.ts +0 -1
- package/dist/suites/edhr/panel-schema/rule/RulePanel.vue.d.ts +0 -2
- package/dist/suites/edhr/panel-schema/rule/components/add-rule-button.vue.d.ts +0 -13
- package/dist/suites/edhr/panel-schema/rule/components/decision-rule-condition.vue.d.ts +0 -19
- package/dist/suites/edhr/panel-schema/rule/components/decision-rule-group.vue.d.ts +0 -16
- package/dist/suites/edhr/panel-schema/rule/components/field-map-row.vue.d.ts +0 -35
- package/dist/suites/edhr/panel-schema/rule/components/rule-item-card.vue.d.ts +0 -12
- package/dist/suites/edhr/panel-schema/rule/components/rule-section.vue.d.ts +0 -11
- package/dist/suites/edhr/panel-schema/rule/constants/builtin-field-maps.d.ts +0 -10
- package/dist/suites/edhr/panel-schema/rule/message-config/message-rule-modal.vue.d.ts +0 -12
- package/dist/suites/edhr/panel-schema/rule/message-config/message-rule.d.ts +0 -22
- package/dist/suites/edhr/panel-schema/rule/message-config/message-time-picker.vue.d.ts +0 -18
- package/dist/suites/edhr/panel-schema/rule/message-config/with-word-message-rule-fields.d.ts +0 -5
- package/dist/suites/edhr/panel-schema/rule/modals/inspection-decision-modal.vue.d.ts +0 -11
- package/dist/suites/edhr/panel-schema/rule/modals/open-inspection-decision-modal.d.ts +0 -8
- package/dist/suites/edhr/panel-schema/rule/modals/open-rule-modal.d.ts +0 -2
- package/dist/suites/edhr/panel-schema/rule/modals/unit-field-map-modal.vue.d.ts +0 -11
- package/dist/suites/edhr/panel-schema/rule/rule.basic.d.ts +0 -5
- package/dist/suites/edhr/panel-schema/rule/types.d.ts +0 -52
- package/dist/suites/edhr/panel-schema/rule/use-rules-config.d.ts +0 -70
- package/dist/suites/edhr/panel-schema/rule/utils/decision-rule.d.ts +0 -34
- package/dist/suites/edhr/panel-schema/rule/utils/rule-field-map.d.ts +0 -31
- package/dist/suites/edhr/panel-schema/rule/utils/uom-convert-rule.d.ts +0 -28
- package/dist/suites/edhr/panel-schema/table-header/TableHeaderPanel.vue.d.ts +0 -8
- package/dist/suites/edhr/panel-schema/table-header/table-header.basic.d.ts +0 -11
- package/dist/suites/edhr/panel-schema/warehouse-allocate-table/warehouse-allocate-table.basic.d.ts +0 -1
- package/dist/suites/edhr/panel-schema/warehouse-in-out-table/warehouse-in-out-table.basic.d.ts +0 -1
- package/dist/suites/edhr/panel-schema/warehouse-in-table/warehouse-in-table.basic.d.ts +0 -1
- package/dist/suites/edhr/panel-schema/warehouse-inventory-table/warehouse-inventory-table.basic.d.ts +0 -1
- package/dist/suites/edhr/panel-schema/warehouse-out-table/warehouse-out-table.basic.d.ts +0 -1
- package/dist/suites/eqm/index.d.ts +0 -3
- package/dist/suites/eqm/panel-router/index.d.ts +0 -2
- package/dist/suites/eqm/panel-schema/device-part-consume-table/device-part-consume-table.basic.d.ts +0 -1
- package/dist/suites/eqm/panel-schema/index.d.ts +0 -7
- package/dist/suites/eqm/panel-schema/part-stocktake-table/part-stocktake-table.basic.d.ts +0 -1
- package/dist/suites/eqm/panel-schema/warehouse-inbound-table/warehouse-inbound-table.basic.d.ts +0 -1
- package/dist/suites/eqm/panel-schema/warehouse-outbound-table/warehouse-outbound-table.basic.d.ts +0 -1
- package/dist/suites/medpro/index.d.ts +0 -1
- package/dist/suites/shared/components/option-control-colors.d.ts +0 -14
- package/dist/suites/shared/hooks/panel-props-source.d.ts +0 -36
- package/dist/suites/shared/hooks/useAttachedFieldActivate.d.ts +0 -6
- package/dist/suites/shared/hooks/useFieldPanel.d.ts +0 -8
- package/dist/suites/shared/hooks/useFieldPanelMeta.d.ts +0 -11
- package/dist/suites/shared/hooks/usePanelProps.d.ts +0 -19
- package/dist/suites/shared/hooks/useSubTablePanelBase.d.ts +0 -14
- package/dist/suites/shared/icon/landscape-icon.vue.d.ts +0 -2
- package/dist/suites/shared/icon/portrait-icon.vue.d.ts +0 -2
- package/dist/suites/shared/index.d.ts +0 -1
- package/dist/suites/shared/panel/config/editor/FormNumberEditor.vue.d.ts +0 -11
- package/dist/suites/shared/panel/config/editor/assoc-filter-editor/utils.d.ts +0 -9
- package/dist/suites/shared/panel/config/editor/attach-fields-editor/resolve-attach-field.d.ts +0 -5
- package/dist/suites/shared/panel/config/editor/attach-fields-editor/types.d.ts +0 -13
- package/dist/suites/shared/panel/config/editor/date-format-editor/logic.d.ts +0 -37
- package/dist/suites/shared/panel/config/editor/display-fields-editor/display-fields-editor.vue.d.ts +0 -16
- package/dist/suites/shared/panel/config/editor/display-fields-editor/display-fields.util.d.ts +0 -19
- package/dist/suites/shared/panel/config/editor/display-fields-editor/index.d.ts +0 -3
- package/dist/suites/shared/panel/config/editor/enum-opt-editor/types.d.ts +0 -15
- package/dist/suites/shared/panel/config/editor/field-config-visibility.d.ts +0 -2
- package/dist/suites/shared/panel/config/editor/qrcode-parse-editor/barcode-parsing-rules-group-editor.vue.d.ts +0 -28
- package/dist/suites/shared/panel/config/editor/qrcode-parse-editor/barcode-parsing-rules-string-editor.vue.d.ts +0 -21
- package/dist/suites/shared/panel/config/editor/qrcode-parse-editor/qrcode-parse-editor.vue.d.ts +0 -17
- package/dist/suites/shared/panel/config/editor/qrcode-parse-editor/qrcode-parse-modal.vue.d.ts +0 -20
- package/dist/suites/shared/panel/config/editor/qrcode-parse-editor/types.d.ts +0 -18
- package/dist/suites/shared/panel/config/editor/qrcode-parse-editor/utils.d.ts +0 -38
- package/dist/suites/shared/panel/config/editor/quick-search-editor/quick-search.util.d.ts +0 -13
- package/dist/suites/shared/panel/config/editor/ref-autofill-editor/autofill-runtime.d.ts +0 -19
- package/dist/suites/shared/panel/config/editor/ref-autofill-editor/field-tree-node.vue.d.ts +0 -21
- package/dist/suites/shared/panel/config/editor/ref-autofill-editor/field-tree-select.vue.d.ts +0 -30
- package/dist/suites/shared/panel/config/editor/ref-autofill-editor/field-tree-utils.d.ts +0 -22
- package/dist/suites/shared/panel/config/editor/ref-autofill-editor/from-field-tree-utils.d.ts +0 -5
- package/dist/suites/shared/panel/config/editor/ref-autofill-editor/to-field-tree-utils.d.ts +0 -19
- package/dist/suites/shared/panel/config/editor/ref-autofill-editor/types.d.ts +0 -24
- package/dist/suites/shared/panel/config/editor/ref-autofill-editor/utils.d.ts +0 -12
- package/dist/suites/shared/panel/config/editor/regex-editor/common-regex-api.d.ts +0 -11
- package/dist/suites/shared/panel/config/editor/regex-editor/types.d.ts +0 -8
- package/dist/suites/shared/panel/config/editor/single-field-editor/types.d.ts +0 -9
- package/dist/suites/shared/panel/modules/confirm-before-delete-config.vue.d.ts +0 -5
- package/dist/suites/shared/panel/modules/field-dependency-module/field-dependency-modal.vue.d.ts +0 -30
- package/dist/suites/shared/panel/modules/field-dependency-module/field-dependency-module.vue.d.ts +0 -9
- package/dist/suites/shared/panel/modules/field-dependency-module/types.d.ts +0 -19
- package/dist/suites/shared/panel/modules/field-formula-module/field-formula-module.vue.d.ts +0 -16
- package/dist/suites/shared/panel/modules/field-formula-module/formula-field-options.d.ts +0 -2
- package/dist/suites/shared/panel/modules/online-form-tmpl-module/online-form-tmpl-utils.d.ts +0 -3
- package/dist/suites/shared/panel/modules/orientation-module.vue.d.ts +0 -10
- package/dist/suites/shared/panel/modules/padding-setting-module.vue.d.ts +0 -14
- package/dist/suites/shared/panel/modules/quick-fill-config.vue.d.ts +0 -6
- package/dist/suites/shared/panel/modules/sub-table-basic-info.vue.d.ts +0 -31
- package/dist/suites/shared/panel/modules/sub-table-grid-info.vue.d.ts +0 -12
- package/dist/suites/shared/panel/modules/table-setting-module.vue.d.ts +0 -11
- package/dist/suites/shared/panel/types/formula.type.d.ts +0 -140
- package/dist/suites/shared/panel/utils/default-value-visibility.d.ts +0 -3
- package/dist/suites/shared/panel/utils/open-design-modal.d.ts +0 -7
- package/dist/suites/shared/suite-features.d.ts +0 -19
- package/dist/utils/adapters/ServiceUtil.d.ts +0 -76
- package/dist/utils/adapters/TriggerUtil.d.ts +0 -27
- package/dist/utils/adapters/api.d.ts +0 -7
- package/dist/utils/composables/useDragLine.d.ts +0 -18
- package/dist/utils/composables/useHighlightSearch.d.ts +0 -5
- package/dist/utils/composables/useHoverDelay.d.ts +0 -5
- package/dist/utils/composables/useLatestRequest.d.ts +0 -6
- package/dist/utils/composables/usePagesToPdf.d.ts +0 -19
- package/dist/utils/fonts/cjk-font-catalog.d.ts +0 -50
- package/dist/utils/fonts/ensure-document-fonts.d.ts +0 -12
- package/dist/utils/func/base-formula-functions.d.ts +0 -8
- package/dist/utils/func/calc-used-fields.d.ts +0 -32
- package/dist/utils/func/click.d.ts +0 -13
- package/dist/utils/func/core.d.ts +0 -150
- package/dist/utils/func/dragdrop.d.ts +0 -40
- package/dist/utils/func/field.d.ts +0 -13
- package/dist/utils/func/file.d.ts +0 -2
- package/dist/utils/func/number-util.d.ts +0 -9
- package/dist/utils/func/withRequestCache.d.ts +0 -95
- package/dist/utils/pdf/collect-page-draw-ops.d.ts +0 -5
- package/dist/utils/pdf/collect-seal-draw-ops.d.ts +0 -4
- package/dist/utils/pdf/collect-widget-draw-ops.d.ts +0 -12
- package/dist/utils/pdf/export-vector-pdf.d.ts +0 -11
- package/dist/utils/pdf/pdf-page-painter.d.ts +0 -3
- package/dist/utils/pdf/resolve-field-text-style.d.ts +0 -12
- package/dist/utils/pdf/resolve-paper-widget-value.d.ts +0 -4
- package/dist/utils/pdf/resolve-pdf-text-baseline.d.ts +0 -11
- package/dist/utils/pdf/types.d.ts +0 -80
- package/dist/utils/symbol/contextKey.d.ts +0 -11
- package/dist/word.css +0 -15814
- package/vite/index.d.ts +0 -17
- package/vite/index.mjs +0 -39
- /package/dist/{domain/table/business/check/check-table/profile → types/runtime/form/business/inspection}/field-keys.d.ts +0 -0
- /package/dist/{domain/field/material-lot-validation.d.ts → types/runtime/form/business/materials/validation/lot-kind.d.ts} +0 -0
- /package/dist/{core/data/submit/fields.d.ts → types/runtime/form/submission/excluded-fields.d.ts} +0 -0
- /package/dist/{base → types/shared/ui}/breadcrumb/index.d.ts +0 -0
- /package/dist/{base → types/shared/ui}/button/index.d.ts +0 -0
- /package/dist/{base → types/shared/ui}/calendar/index.d.ts +0 -0
- /package/dist/{base → types/shared/ui}/calendar/src/constant/index.d.ts +0 -0
- /package/dist/{base → types/shared/ui}/checkbox/index.d.ts +0 -0
- /package/dist/{base → types/shared/ui}/collapse/index.d.ts +0 -0
- /package/dist/{base → types/shared/ui}/color-picker/index.d.ts +0 -0
- /package/dist/{base → types/shared/ui}/color-picker/src/constant/index.d.ts +0 -0
- /package/dist/{base → types/shared/ui}/date-time-picker/index.d.ts +0 -0
- /package/dist/{base → types/shared/ui}/divider/index.d.ts +0 -0
- /package/dist/{base → types/shared/ui}/dropdown/index.d.ts +0 -0
- /package/dist/{base → types/shared/ui}/empty/index.d.ts +0 -0
- /package/dist/{base → types/shared/ui}/empty/src/empty.d.ts +0 -0
- /package/dist/{base → types/shared/ui}/form-item/index.d.ts +0 -0
- /package/dist/{base → types/shared/ui}/icon/index.d.ts +0 -0
- /package/dist/{base → types/shared/ui}/input/index.d.ts +0 -0
- /package/dist/{base → types/shared/ui}/layout/index.d.ts +0 -0
- /package/dist/{base → types/shared/ui}/loading/index.d.ts +0 -0
- /package/dist/{base → types/shared/ui}/message/index.d.ts +0 -0
- /package/dist/{base → types/shared/ui}/radio/index.d.ts +0 -0
- /package/dist/{base → types/shared/ui}/scrollbar/index.d.ts +0 -0
- /package/dist/{base → types/shared/ui}/segment-slider/index.d.ts +0 -0
- /package/dist/{base → types/shared/ui}/slider/index.d.ts +0 -0
- /package/dist/{domain/index.d.ts → types/shared/ui/stylesheet.d.ts} +0 -0
- /package/dist/{base → types/shared/ui}/switch/index.d.ts +0 -0
- /package/dist/{base → types/shared/ui}/tooltip/index.d.ts +0 -0
- /package/dist/{base → types/shared/ui}/tree/src/tree.type.d.ts +0 -0
- /package/dist/{domain/object/date-object/runtime/register-handlers.d.ts → types/shared/ui/utils/popper-themes.d.ts} +0 -0
|
@@ -0,0 +1,3046 @@
|
|
|
1
|
+
import { a as contentBlockLeaves, l as contentRoot, r as mapTextPosition, s as contentLeaves } from "./change-set-DNOw1FXo.js";
|
|
2
|
+
import { E as copyInputData, K as optional, O as freezeData, S as repeatingTableVariants, U as number, W as object, X as positive, a as readFactoryOptions, i as checkFactoryValue, n as commonFieldWidgets } from "./NodeFactory-D9gVGSok.js";
|
|
3
|
+
import { uniq } from "es-toolkit/array";
|
|
4
|
+
import { isEqual, isPlainObject } from "es-toolkit/predicate";
|
|
5
|
+
import { isPlainObject as isPlainObject$1 } from "es-toolkit";
|
|
6
|
+
import BigNumber from "bignumber.js";
|
|
7
|
+
import { pick } from "es-toolkit/object";
|
|
8
|
+
import { clamp } from "es-toolkit/math";
|
|
9
|
+
import sortedIndex from "es-toolkit/compat/sortedIndex";
|
|
10
|
+
import sortedIndexBy from "es-toolkit/compat/sortedIndexBy";
|
|
11
|
+
import dayjs from "dayjs";
|
|
12
|
+
// src/layout/guards.ts
|
|
13
|
+
/** 错误只保留固定说明,不携带原文、业务记录或模型快照。 */
|
|
14
|
+
var LayoutContractError = class extends Error {
|
|
15
|
+
/** 可聚合的固定原因。 */
|
|
16
|
+
code;
|
|
17
|
+
/** 创建中文契约错误。 */
|
|
18
|
+
constructor(code, message) {
|
|
19
|
+
super(message);
|
|
20
|
+
this.name = "LayoutContractError";
|
|
21
|
+
this.code = code;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
/** 验证逻辑数值,不用零或默认值掩盖 NaN、Infinity 和溢出。 */
|
|
25
|
+
function assertFiniteLayoutNumber(value, label) {
|
|
26
|
+
if (!Number.isFinite(value)) throw new LayoutContractError("invalid_number", label + "必须是有限数值");
|
|
27
|
+
}
|
|
28
|
+
/** 尺寸可以为零,但不能为负或非有限数。 */
|
|
29
|
+
function assertLayoutSize(width, height) {
|
|
30
|
+
if (!Number.isFinite(width) || !Number.isFinite(height) || width < 0 || height < 0) throw new LayoutContractError("invalid_size", "排版宽高必须是有限非负数");
|
|
31
|
+
}
|
|
32
|
+
/** 无状态字素分割器只按需创建,不在模块加载时要求浏览器或字体环境。 */
|
|
33
|
+
var graphemes;
|
|
34
|
+
/** 候选与最终测量共用的字体及方向检查,不执行字素扫描。 */
|
|
35
|
+
function assertLayoutTextMeasureRequest(request) {
|
|
36
|
+
const style = request?.style;
|
|
37
|
+
if (typeof request?.text !== "string" || request?.direction !== "ltr" && request?.direction !== "rtl" || !style || typeof style.fontFamily !== "string" || !style.fontFamily.trim() || !Number.isFinite(style.fontSizePx) || style.fontSizePx <= 0 || !Number.isFinite(style.fontWeight) || style.fontWeight <= 0 || !Number.isFinite(style.letterSpacingPx) || style.fontStyle !== "normal" && style.fontStyle !== "italic") throw new LayoutContractError("invalid_text_request", "文字测量需要有效单向文字、已准备字体和有限逻辑字号");
|
|
38
|
+
}
|
|
39
|
+
/** 检查适配器最终测量,不用于每次候选宽度探测,不修改或冻结借用值。 */
|
|
40
|
+
function assertLayoutTextMeasurement(request, measurement) {
|
|
41
|
+
assertLayoutTextMeasureRequest(request);
|
|
42
|
+
if (!measurement || ![
|
|
43
|
+
measurement.advanceWidth,
|
|
44
|
+
measurement.ascent,
|
|
45
|
+
measurement.descent
|
|
46
|
+
].every((value) => Number.isFinite(value) && value >= 0) || !Number.isFinite(measurement.ascent + measurement.descent)) throw new LayoutContractError("invalid_text_measurement", "文字推进和字体框必须是有限非负数");
|
|
47
|
+
/** 所有停靠错误使用同一不携带原文的说明。 */
|
|
48
|
+
const invalid = () => {
|
|
49
|
+
throw new LayoutContractError("invalid_caret_map", "文字停靠点必须覆盖全部字素边界并与方向、推进宽度一致");
|
|
50
|
+
};
|
|
51
|
+
if (!measurement.caretMap) invalid();
|
|
52
|
+
const { offsets, x } = measurement.caretMap;
|
|
53
|
+
if (!Array.isArray(offsets) || !Array.isArray(x) || offsets.length !== x.length || offsets[0] !== 0) invalid();
|
|
54
|
+
const expected = [0];
|
|
55
|
+
graphemes ??= new Intl.Segmenter(void 0, { granularity: "grapheme" });
|
|
56
|
+
for (const segment of graphemes.segment(request.text)) expected.push(segment.index + segment.segment.length);
|
|
57
|
+
if (offsets.length !== expected.length) invalid();
|
|
58
|
+
for (let index = 0; index < offsets.length; index++) {
|
|
59
|
+
const coordinate = x[index];
|
|
60
|
+
if (offsets[index] !== expected[index] || !Number.isFinite(coordinate) || coordinate < 0 || coordinate > measurement.advanceWidth || index > 0 && (request.direction === "ltr" ? coordinate < x[index - 1] : coordinate > x[index - 1])) invalid();
|
|
61
|
+
}
|
|
62
|
+
const first = request.direction === "ltr" ? 0 : measurement.advanceWidth, last = request.direction === "ltr" ? measurement.advanceWidth : 0;
|
|
63
|
+
if (x[0] !== first || x.at(-1) !== last) invalid();
|
|
64
|
+
}
|
|
65
|
+
// src/layout/image-source.ts
|
|
66
|
+
/** 同一会话按真实来源去重,不从节点 ID 或业务路径拼出资源 URL。 */
|
|
67
|
+
function layoutImageSourceKey(source) {
|
|
68
|
+
return JSON.stringify([source.kind, source.kind === "url" ? source.url : source.key]);
|
|
69
|
+
}
|
|
70
|
+
// src/layout/versions.ts
|
|
71
|
+
/** 文档、打开与独立视图必须始终属于当前排版会话。 */
|
|
72
|
+
function sameLayoutIdentity(left, right) {
|
|
73
|
+
return left.documentId === right.documentId && left.sessionId === right.sessionId && left.viewId === right.viewId;
|
|
74
|
+
}
|
|
75
|
+
/** 输入和候选必须精确匹配全部版本,包括本轮构建尝试序号。 */
|
|
76
|
+
function sameLayoutVersion(left, right) {
|
|
77
|
+
return sameLayoutIdentity(left, right) && left.modelRevision === right.modelRevision && left.dataRevision === right.dataRevision && left.environmentRevision === right.environmentRevision && left.layoutRevision === right.layoutRevision;
|
|
78
|
+
}
|
|
79
|
+
/** 只复制协议中的版本标量,不把结构类型允许的额外载荷带入缓存或快照。 */
|
|
80
|
+
function snapshotLayoutVersion(version) {
|
|
81
|
+
return Object.freeze({
|
|
82
|
+
documentId: version.documentId,
|
|
83
|
+
sessionId: version.sessionId,
|
|
84
|
+
viewId: version.viewId,
|
|
85
|
+
modelRevision: version.modelRevision,
|
|
86
|
+
dataRevision: version.dataRevision,
|
|
87
|
+
environmentRevision: version.environmentRevision,
|
|
88
|
+
layoutRevision: version.layoutRevision
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
// src/shared/text/tsv.ts
|
|
92
|
+
/** @file 电子表格纯文字剪贴解析,不依赖 DOM、业务数据或字段协议。 */
|
|
93
|
+
/** 画布剪贴统一限制原文和物理矩形的规模。 */
|
|
94
|
+
var tsvClipboardLimits = Object.freeze({
|
|
95
|
+
characters: 2e6,
|
|
96
|
+
rows: 200,
|
|
97
|
+
columns: 100,
|
|
98
|
+
cells: 1e4
|
|
99
|
+
});
|
|
100
|
+
/** 支持 TSV、CRLF、引号内换行/制表和双引号转义,只去除最后的记录分隔符。 */
|
|
101
|
+
function parseTsv(text, limits) {
|
|
102
|
+
if (text.length > (limits.characters ?? 2e6)) throw Error("粘贴内容过大");
|
|
103
|
+
const rows = [];
|
|
104
|
+
let row = [], cell = "", quoted = false, closed = false;
|
|
105
|
+
/** 列数在追加时检查,超宽输入不先分配整批。 */
|
|
106
|
+
const finishCell = () => {
|
|
107
|
+
row.push(cell);
|
|
108
|
+
if (row.length > limits.columns) throw Error("粘贴列数超过可填写列");
|
|
109
|
+
cell = "";
|
|
110
|
+
closed = false;
|
|
111
|
+
};
|
|
112
|
+
/** 行数在追加时检查,超高输入不先分配整批。 */
|
|
113
|
+
const finishRow = () => {
|
|
114
|
+
finishCell();
|
|
115
|
+
rows.push(row);
|
|
116
|
+
if (rows.length > limits.rows) throw Error("粘贴行数超过可填写容量");
|
|
117
|
+
row = [];
|
|
118
|
+
};
|
|
119
|
+
for (let index = 0; index < text.length; index++) {
|
|
120
|
+
const char = text[index];
|
|
121
|
+
if (quoted) {
|
|
122
|
+
if (char === "\"") {
|
|
123
|
+
if (text[index + 1] === "\"") {
|
|
124
|
+
cell += "\"";
|
|
125
|
+
index++;
|
|
126
|
+
} else {
|
|
127
|
+
quoted = false;
|
|
128
|
+
closed = true;
|
|
129
|
+
}
|
|
130
|
+
} else cell += char;
|
|
131
|
+
continue;
|
|
132
|
+
}
|
|
133
|
+
if (char === "\"" && cell === "" && !closed) {
|
|
134
|
+
quoted = true;
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
137
|
+
if (char === " ") {
|
|
138
|
+
finishCell();
|
|
139
|
+
continue;
|
|
140
|
+
}
|
|
141
|
+
if (char === "\r" || char === "\n") {
|
|
142
|
+
if (char === "\r" && text[index + 1] === "\n") index++;
|
|
143
|
+
finishRow();
|
|
144
|
+
continue;
|
|
145
|
+
}
|
|
146
|
+
if (closed) throw Error("粘贴内容的引号格式不正确");
|
|
147
|
+
cell += char;
|
|
148
|
+
}
|
|
149
|
+
if (quoted) throw Error("粘贴内容的引号没有闭合");
|
|
150
|
+
if (cell !== "" || row.length || !rows.length || closed) finishRow();
|
|
151
|
+
return rows;
|
|
152
|
+
}
|
|
153
|
+
/** 输出可被电子表格还原的 TSV,保留引号、分隔符及尾部空行。 */
|
|
154
|
+
function formatTsv(rows) {
|
|
155
|
+
return rows.map((row) => row.map((cell) => cell === "" || /["\t\r\n]/.test(cell) ? "\"" + cell.replaceAll("\"", "\"\"") + "\"" : cell).join(" ")).join("\n");
|
|
156
|
+
}
|
|
157
|
+
// src/runtime/interaction/clipboard/types.ts
|
|
158
|
+
/** eform 原生片段的浏览器剪贴格式。 */
|
|
159
|
+
var wordClipboardType = "application/x-gct-word-fragment+json";
|
|
160
|
+
// src/data/value-semantics/classify.ts
|
|
161
|
+
/** 只识别实际数字;字符串 NaN/Infinity 仍按文字或字段自己的数字格式规则解释。 */
|
|
162
|
+
function isInvalidDataNumber(value) {
|
|
163
|
+
return typeof value === "number" && !Number.isFinite(value);
|
|
164
|
+
}
|
|
165
|
+
/** 尚未初始化是唯一允许自动回落初值的值状态。 */
|
|
166
|
+
function isUninitializedDataValue(value) {
|
|
167
|
+
return value === void 0;
|
|
168
|
+
}
|
|
169
|
+
/** null、空串和空集合均是空内容;0 与 false 始终有效。 */
|
|
170
|
+
function classifyDataValue(value, options = {}) {
|
|
171
|
+
if (isUninitializedDataValue(value)) return "uninitialized";
|
|
172
|
+
if (isInvalidDataNumber(value)) return "invalid-number";
|
|
173
|
+
if (value === null || value === "") return "empty";
|
|
174
|
+
if (typeof value === "string" && options.whitespace === "empty" && value.trim() === "") return "empty";
|
|
175
|
+
if (Array.isArray(value)) return value.length === 0 ? "empty" : "value";
|
|
176
|
+
if (value instanceof Map || value instanceof Set) return value.size === 0 ? "empty" : "value";
|
|
177
|
+
if (options.emptyObject && value !== null && typeof value === "object" && !(value instanceof Date) && Object.keys(value).length === 0) return "empty";
|
|
178
|
+
return "value";
|
|
179
|
+
}
|
|
180
|
+
/** 保留原值的一次分类,不在分类阶段发生默认值替换。 */
|
|
181
|
+
function dataValueState(value, options) {
|
|
182
|
+
return {
|
|
183
|
+
kind: classifyDataValue(value, options),
|
|
184
|
+
value
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
/** 部分更新只读取自有属性;缺少键与显式 undefined 可以分别判断。 */
|
|
188
|
+
function readDataValueInput(record, key) {
|
|
189
|
+
const present = record !== null && typeof record === "object" && Object.hasOwn(record, key);
|
|
190
|
+
return {
|
|
191
|
+
present,
|
|
192
|
+
value: present ? Reflect.get(record, key) : void 0
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
/** 普通展示和标签的空内容判断不删除空白文本,也不把无效数字当成空值。 */
|
|
196
|
+
function isEmptyDataValue(value, options) {
|
|
197
|
+
const kind = classifyDataValue(value, options);
|
|
198
|
+
return kind === "uninitialized" || kind === "empty";
|
|
199
|
+
}
|
|
200
|
+
/** 必填与普通存储采用不同场景策略;空白文本默认不满足必填。 */
|
|
201
|
+
function isRequiredDataValueMissing(value) {
|
|
202
|
+
return isEmptyDataValue(value, {
|
|
203
|
+
whitespace: "empty",
|
|
204
|
+
emptyObject: true
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
/** 已清空或标量父层不能被子字段的默认值、初始化或映射隐式重建。 */
|
|
208
|
+
function isClosedDataContainer(value) {
|
|
209
|
+
return !isUninitializedDataValue(value) && (value === null || typeof value !== "object");
|
|
210
|
+
}
|
|
211
|
+
// src/data/value-semantics/validation.ts
|
|
212
|
+
/** 值策略错误只保留稳定路径与原因,不持有填写数据或接口原记录。 */
|
|
213
|
+
var DataValueError = class extends Error {
|
|
214
|
+
/** 可安全汇总的问题。 */
|
|
215
|
+
issue;
|
|
216
|
+
/** 创建固定说明,避免将用户的整份值串进错误信息。 */
|
|
217
|
+
constructor(issue) {
|
|
218
|
+
super(issue.code === "non-finite-number" ? `字段 ${issue.path} 包含无效数字,不能写入或保存` : issue.code === "unsafe-number" ? `字段 ${issue.path} 的数字超出安全精度,请传入精确数字文本` : `字段 ${issue.path} 不是有效数字文本`);
|
|
219
|
+
this.name = "DataValueError";
|
|
220
|
+
this.issue = Object.freeze({ ...issue });
|
|
221
|
+
}
|
|
222
|
+
};
|
|
223
|
+
/** 构造数字问题时只保存标量原因。 */
|
|
224
|
+
function numberIssue(value, path) {
|
|
225
|
+
return {
|
|
226
|
+
code: "non-finite-number",
|
|
227
|
+
path,
|
|
228
|
+
reason: Number.isNaN(value) ? "nan" : value > 0 ? "positive-infinity" : "negative-infinity"
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
/** 遍历实际 JSON 容器检测无效数字,支持重复引用与循环,不执行 getter 或遍历实例内部状态。 */
|
|
232
|
+
function findInvalidDataNumbers(value, path = "$") {
|
|
233
|
+
const issues = [], pending = [{
|
|
234
|
+
value,
|
|
235
|
+
path
|
|
236
|
+
}], seen = /* @__PURE__ */ new WeakSet();
|
|
237
|
+
while (pending.length) {
|
|
238
|
+
const current = pending.pop();
|
|
239
|
+
if (typeof current.value === "number" && isInvalidDataNumber(current.value)) {
|
|
240
|
+
issues.push(numberIssue(current.value, current.path));
|
|
241
|
+
continue;
|
|
242
|
+
}
|
|
243
|
+
if (!current.value || typeof current.value !== "object" || seen.has(current.value) || !Array.isArray(current.value) && !isPlainObject$1(current.value)) continue;
|
|
244
|
+
seen.add(current.value);
|
|
245
|
+
for (const [key, descriptor] of Object.entries(Object.getOwnPropertyDescriptors(current.value))) {
|
|
246
|
+
if (!descriptor.enumerable || !Object.hasOwn(descriptor, "value")) continue;
|
|
247
|
+
const childPath = Array.isArray(current.value) ? `${current.path}[${key}]` : `${current.path}.${key}`;
|
|
248
|
+
pending.push({
|
|
249
|
+
value: descriptor.value,
|
|
250
|
+
path: childPath
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
return issues;
|
|
255
|
+
}
|
|
256
|
+
/** 写入、默认值、公式及保存共用的无效数字边界,不以 JSON.stringify 的隐式 null 替换代替检查。 */
|
|
257
|
+
function assertValidDataValue(value, path = "$") {
|
|
258
|
+
if (value === null || typeof value !== "object") {
|
|
259
|
+
if (typeof value === "number" && isInvalidDataNumber(value)) throw new DataValueError(numberIssue(value, path));
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
262
|
+
const issue = findInvalidDataNumbers(value, path)[0];
|
|
263
|
+
if (issue) throw new DataValueError(issue);
|
|
264
|
+
}
|
|
265
|
+
/** 数字字段自身解析失败时使用同一错误协议;普通文本不经过此入口。 */
|
|
266
|
+
function invalidDataNumberText(path = "$") {
|
|
267
|
+
throw new DataValueError({
|
|
268
|
+
code: "invalid-number-text",
|
|
269
|
+
path,
|
|
270
|
+
reason: "invalid-text"
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
/** 从异步聚合错误和 cause 中提取值问题,只返回隔离的标量诊断,不暴露整份来源数据。 */
|
|
274
|
+
function dataValueIssuesFromError(error) {
|
|
275
|
+
const issues = [], pending = [error], seen = /* @__PURE__ */ new WeakSet();
|
|
276
|
+
while (pending.length) {
|
|
277
|
+
const current = pending.pop();
|
|
278
|
+
if (!(current instanceof Error) || seen.has(current)) continue;
|
|
279
|
+
seen.add(current);
|
|
280
|
+
if (current instanceof DataValueError) {
|
|
281
|
+
issues.push({ ...current.issue });
|
|
282
|
+
continue;
|
|
283
|
+
}
|
|
284
|
+
if (current instanceof AggregateError) pending.push(...current.errors);
|
|
285
|
+
if (current.cause !== void 0) pending.push(current.cause);
|
|
286
|
+
}
|
|
287
|
+
return issues;
|
|
288
|
+
}
|
|
289
|
+
// src/data/value-semantics/policy.ts
|
|
290
|
+
/** 只有 undefined 使用默认值,null、空串、空集合、0 和 false 原样保留。 */
|
|
291
|
+
function resolveDataDefault(value, initial) {
|
|
292
|
+
return isUninitializedDataValue(value) ? initial : value;
|
|
293
|
+
}
|
|
294
|
+
/** 默认值读取可以包含克隆或解析,只在尚未初始化时实际调用。 */
|
|
295
|
+
function resolveDataDefaultFrom(value, initial) {
|
|
296
|
+
return isUninitializedDataValue(value) ? initial() : value;
|
|
297
|
+
}
|
|
298
|
+
/** 初值只补尚未初始化的目标;显式 null 也是可以提供的初值,不等于没有提供。 */
|
|
299
|
+
function shouldInitializeDataValue(current, incoming) {
|
|
300
|
+
return isUninitializedDataValue(current) && !isUninitializedDataValue(incoming);
|
|
301
|
+
}
|
|
302
|
+
/** 每次新建逻辑空集合,不共享可变数组;文本空内容保留空字符串。 */
|
|
303
|
+
function emptyDataValue(shape = "scalar") {
|
|
304
|
+
return shape === "collection" ? [] : shape === "text" ? "" : null;
|
|
305
|
+
}
|
|
306
|
+
/** 字段声明了存储编码时使用明确的协议空值,未声明则使用逻辑空值。 */
|
|
307
|
+
function emptyFor(options) {
|
|
308
|
+
return isUninitializedDataValue(options.encodedEmptyValue) ? emptyDataValue(options.emptyShape) : options.encodedEmptyValue;
|
|
309
|
+
}
|
|
310
|
+
/** 更新意图在知道业务操作的入口解释,不让一个 undefined 同时表示清空、忽略和重置。 */
|
|
311
|
+
function resolveDataValueUpdate(input, current, options, path = "$") {
|
|
312
|
+
if (options.intent === "clear") return {
|
|
313
|
+
action: "write",
|
|
314
|
+
value: emptyFor(options)
|
|
315
|
+
};
|
|
316
|
+
if (options.intent === "reset") return {
|
|
317
|
+
action: "write",
|
|
318
|
+
value: void 0
|
|
319
|
+
};
|
|
320
|
+
if (options.intent === "initialize" && !isUninitializedDataValue(current)) return {
|
|
321
|
+
action: "skip",
|
|
322
|
+
reason: "already-initialized"
|
|
323
|
+
};
|
|
324
|
+
if (!input.present || isUninitializedDataValue(input.value)) {
|
|
325
|
+
if (options.intent === "mapping") return {
|
|
326
|
+
action: "write",
|
|
327
|
+
value: emptyFor(options)
|
|
328
|
+
};
|
|
329
|
+
return {
|
|
330
|
+
action: "skip",
|
|
331
|
+
reason: input.present ? "undefined" : "missing"
|
|
332
|
+
};
|
|
333
|
+
}
|
|
334
|
+
try {
|
|
335
|
+
assertValidDataValue(input.value, path);
|
|
336
|
+
} catch (error) {
|
|
337
|
+
if (!(error instanceof DataValueError) || options.invalidNumber === void 0 || options.invalidNumber === "reject") throw error;
|
|
338
|
+
return options.invalidNumber === "skip" ? {
|
|
339
|
+
action: "skip",
|
|
340
|
+
reason: "invalid-number"
|
|
341
|
+
} : {
|
|
342
|
+
action: "write",
|
|
343
|
+
value: emptyFor(options)
|
|
344
|
+
};
|
|
345
|
+
}
|
|
346
|
+
return {
|
|
347
|
+
action: "write",
|
|
348
|
+
value: input.value
|
|
349
|
+
};
|
|
350
|
+
}
|
|
351
|
+
/** 展示先应用仅 undefined 回落的规则,再保留分类供渲染选择占位和错误样式。 */
|
|
352
|
+
function resolveDataDisplay(value, initial) {
|
|
353
|
+
const resolved = resolveDataDefault(value, initial);
|
|
354
|
+
return {
|
|
355
|
+
kind: classifyDataValue(resolved),
|
|
356
|
+
value: resolved
|
|
357
|
+
};
|
|
358
|
+
}
|
|
359
|
+
// src/data/value-semantics/collection.ts
|
|
360
|
+
/** 各编码协议共用空值和无效数字规则,编码不会改写传入集合。 */
|
|
361
|
+
function encodeDataCollection(values, options) {
|
|
362
|
+
if (!Array.isArray(values)) throw new Error("集合编码只接受数组");
|
|
363
|
+
assertValidDataValue(values);
|
|
364
|
+
if (!values.length && options.empty === "null") return null;
|
|
365
|
+
if (options.encoding === "array") return [...values];
|
|
366
|
+
if (!values.length && (options.empty === "null" || options.empty === void 0 && options.encoding === "comma-text")) return emptyDataValue();
|
|
367
|
+
if (options.encoding === "json-text") return JSON.stringify(values);
|
|
368
|
+
if (values.some((value) => ![
|
|
369
|
+
"string",
|
|
370
|
+
"number",
|
|
371
|
+
"boolean"
|
|
372
|
+
].includes(typeof value))) throw new Error("逗号集合只接受已经验证的标量值");
|
|
373
|
+
return values.map(String).join(",");
|
|
374
|
+
}
|
|
375
|
+
// src/data/value-semantics/scalars.ts
|
|
376
|
+
/** @file 布尔解释与参数数字精度规则;不读取字段、模板或全局业务状态。 */
|
|
377
|
+
/** 只识别明确的真假协议;undefined 也用于表示无法识别,严格写入入口需另行拒绝。 */
|
|
378
|
+
function readDataBoolean(value) {
|
|
379
|
+
if (isUninitializedDataValue(value)) return void 0;
|
|
380
|
+
if (isEmptyDataValue(value)) return null;
|
|
381
|
+
if (value === true || value === 1 || value === "true" || value === "1") return true;
|
|
382
|
+
if (value === false || value === 0 || value === "false" || value === "0") return false;
|
|
383
|
+
}
|
|
384
|
+
/** 明确的布尔写入统一拒绝未知文本,不用 Boolean(value) 把任意非空内容变成 true。 */
|
|
385
|
+
function normalizeDataBoolean(value, path = "$") {
|
|
386
|
+
assertValidDataValue(value, path);
|
|
387
|
+
const parsed = readDataBoolean(value);
|
|
388
|
+
if (parsed === void 0 && !isUninitializedDataValue(value)) throw new Error(`字段 ${path} 的布尔值只接受 true、false、1、0 或明确空值`);
|
|
389
|
+
return parsed;
|
|
390
|
+
}
|
|
391
|
+
/** 仅按已确认协议编码新写入;undefined 保留操作意图,签名/印章继续使用专用授权入口。 */
|
|
392
|
+
function encodeDataFieldValue(value, encoding, path = "$") {
|
|
393
|
+
assertValidDataValue(value, path);
|
|
394
|
+
if (isUninitializedDataValue(value) || encoding === "plain") return value;
|
|
395
|
+
if (encoding === "boolean") return normalizeDataBoolean(value, path);
|
|
396
|
+
if (isEmptyDataValue(value)) return null;
|
|
397
|
+
return encodeDataCollection(Array.isArray(value) ? value : [value], { encoding: "comma-text" });
|
|
398
|
+
}
|
|
399
|
+
/** 已经超出安全精度的整数不能靠字符串化修复;仅已知数字字段入口调用,不清洗普通业务对象。 */
|
|
400
|
+
function assertDataNumberPrecision(value, path = "$") {
|
|
401
|
+
if (typeof value === "number" && Number.isInteger(value) && !Number.isSafeInteger(value)) throw new DataValueError({
|
|
402
|
+
code: "unsafe-number",
|
|
403
|
+
path,
|
|
404
|
+
reason: "unsafe-integer"
|
|
405
|
+
});
|
|
406
|
+
}
|
|
407
|
+
/** 参数与绑定共用数字种类判定,避免自定义转换器绕过原值和结果的精度防护。 */
|
|
408
|
+
function dataParameterNumberKind(fieldType) {
|
|
409
|
+
if ([
|
|
410
|
+
"integer",
|
|
411
|
+
"long",
|
|
412
|
+
"of_inst_num"
|
|
413
|
+
].includes(fieldType ?? "")) return "integer";
|
|
414
|
+
if ([
|
|
415
|
+
"double",
|
|
416
|
+
"decimal",
|
|
417
|
+
"work_hours",
|
|
418
|
+
"production_qty",
|
|
419
|
+
"product_release_qty",
|
|
420
|
+
"inspection_qty",
|
|
421
|
+
"inspection_module_qty"
|
|
422
|
+
].includes(fieldType ?? "")) return "decimal";
|
|
423
|
+
}
|
|
424
|
+
/** 参数只在可安全且精确往返时转 JS number;大整数、高精度小数及溢出/下溢文本保留精确前缀。 */
|
|
425
|
+
function normalizeDataParameterNumber(value, kind, path = "$") {
|
|
426
|
+
assertValidDataValue(value, path);
|
|
427
|
+
if (isUninitializedDataValue(value) || value === null) return value;
|
|
428
|
+
if (isEmptyDataValue(value, { whitespace: "empty" })) return null;
|
|
429
|
+
if (typeof value !== "string" && typeof value !== "number") return invalidDataNumberText(path);
|
|
430
|
+
assertDataNumberPrecision(value, path);
|
|
431
|
+
const prefix = String(value).trim().match(kind === "integer" ? /^[+-]?(?:0[xX][\da-fA-F]+|\d+)/ : /^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?/)?.[0];
|
|
432
|
+
if (!prefix) return invalidDataNumberText(path);
|
|
433
|
+
const parsed = new BigNumber(prefix);
|
|
434
|
+
if (!parsed.isFinite()) return invalidDataNumberText(path);
|
|
435
|
+
const candidate = parsed.toNumber();
|
|
436
|
+
if (Number.isFinite(candidate) && (!parsed.isInteger() || Number.isSafeInteger(candidate)) && new BigNumber(candidate).isEqualTo(parsed)) return candidate;
|
|
437
|
+
return kind === "integer" ? parsed.toFixed(0) : prefix;
|
|
438
|
+
}
|
|
439
|
+
/** 枚举存储只接收当前选项,单选保留原值类型,多选使用后端逗号文本协议。 */
|
|
440
|
+
function encodeDataChoice(value, multiple, options, path = "$") {
|
|
441
|
+
assertValidDataValue(value, path);
|
|
442
|
+
if (isUninitializedDataValue(value)) return void 0;
|
|
443
|
+
if (isEmptyDataValue(value)) return null;
|
|
444
|
+
const values = Array.isArray(value) ? value : multiple && typeof value === "string" ? value.split(",") : [value];
|
|
445
|
+
if (!multiple && values.length > 1) throw new Error(`字段 ${path} 的单选值不能包含多项`);
|
|
446
|
+
const selected = values.map((item) => options.find((option) => String(option.value) === String(item)));
|
|
447
|
+
if (selected.some((option) => !option)) throw new Error(`字段 ${path} 的选择值不在当前选项中`);
|
|
448
|
+
return multiple ? encodeDataCollection(selected.map((option) => option.value), { encoding: "comma-text" }) : selected[0]?.value ?? null;
|
|
449
|
+
}
|
|
450
|
+
// src/runtime/form/fields/declarations.ts
|
|
451
|
+
/** 静态字段直接引用原声明;业务行为只替换解释结果,不伪造原生节点。 */
|
|
452
|
+
function fieldBehavior(declaration) {
|
|
453
|
+
return declaration.behavior ?? nativeFieldBehavior(declaration.field);
|
|
454
|
+
}
|
|
455
|
+
/** 原位文本输入按实际配置决定;未配置 SOP 的版本仍保留自身声明和版本文本协议。 */
|
|
456
|
+
function isFieldTextInput(field) {
|
|
457
|
+
return field.widget === "input" || field.widget === "number" || field.widget === "sop-version" && !field.config?.sopId?.trim();
|
|
458
|
+
}
|
|
459
|
+
/** 是否为当前直接消费的常用字段,未知扩展交由对应插件处理。 */
|
|
460
|
+
function isCommonField(declaration) {
|
|
461
|
+
return [
|
|
462
|
+
"input",
|
|
463
|
+
"number",
|
|
464
|
+
"checkbox",
|
|
465
|
+
"choice",
|
|
466
|
+
"date",
|
|
467
|
+
"time",
|
|
468
|
+
"date-time",
|
|
469
|
+
"user",
|
|
470
|
+
"org",
|
|
471
|
+
"file",
|
|
472
|
+
"image",
|
|
473
|
+
"signature",
|
|
474
|
+
"seal",
|
|
475
|
+
"relation",
|
|
476
|
+
"rdo-relation",
|
|
477
|
+
"sop-version"
|
|
478
|
+
].includes(declaration.field.widget);
|
|
479
|
+
}
|
|
480
|
+
/** 已验证的内置字段声明只在此边界窄化一次,避免编辑器重复比较递归只读节点联合。 */
|
|
481
|
+
function commonFieldDeclaration(value) {
|
|
482
|
+
return value && isCommonField(value) ? value : void 0;
|
|
483
|
+
}
|
|
484
|
+
/** 原生字段只借用节点自身配置,不把同行业务覆盖混入核心的原生声明。 */
|
|
485
|
+
function nativeFieldBehavior(field) {
|
|
486
|
+
return field;
|
|
487
|
+
}
|
|
488
|
+
// src/runtime/form/business/attachments/values.ts
|
|
489
|
+
/** @file 资源字段协议和上传限制,沿用稳定 URL 及逗号列表,不保存浏览器 File/Blob。 */
|
|
490
|
+
/** 检验 image/attachment 与原生 image/file 使用相同业务资源语义。 */
|
|
491
|
+
function resourceBehavior(field) {
|
|
492
|
+
return field.widget === "image" || field.widget === "file";
|
|
493
|
+
}
|
|
494
|
+
/** 读取稳定业务引用;历史非法形态由校验报告,不自动 JSON 化或改写。 */
|
|
495
|
+
function resourceValues(value) {
|
|
496
|
+
if (value === null || value === void 0 || value === "") return [];
|
|
497
|
+
return (Array.isArray(value) ? value : typeof value === "string" ? value.split(",") : [value]).map((item) => {
|
|
498
|
+
if (typeof item !== "string" || !item.trim() || item.includes(",") || /^(?:blob:|data:|javascript:|vbscript:)/i.test(item.trimStart())) throw new Error("资源值必须是可保存的资源地址或引用");
|
|
499
|
+
return item;
|
|
500
|
+
});
|
|
501
|
+
}
|
|
502
|
+
/** 只在用户明确写入时规范化;空选择为 null,已有零项/数组在普通读取中不改变。 */
|
|
503
|
+
function normalizeResourceValue(value) {
|
|
504
|
+
if (isUninitializedDataValue(value)) return void 0;
|
|
505
|
+
return encodeDataCollection(resourceValues(value), { encoding: "comma-text" });
|
|
506
|
+
}
|
|
507
|
+
/** 资源文件名仅用于显示,查询参数和 URL 编码不作为画布文字。 */
|
|
508
|
+
function resourceName(value) {
|
|
509
|
+
const name = value.split(/[?#]/)[0].split("/").at(-1) || "资源";
|
|
510
|
+
try {
|
|
511
|
+
return decodeURIComponent(name);
|
|
512
|
+
} catch {
|
|
513
|
+
return name;
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
/** 缺省限制沿用旧上传对话框,不能把 null 偷换成另一套业务限制。 */
|
|
517
|
+
function resourceLimits(declaration) {
|
|
518
|
+
const field = fieldBehavior(declaration);
|
|
519
|
+
if (field.widget !== "image" && field.widget !== "file") throw new Error("当前不是图片或附件字段");
|
|
520
|
+
const config = field.config, image = field.widget === "image";
|
|
521
|
+
return {
|
|
522
|
+
maxCount: image && field.config?.displayMode === "adaptive" ? 1 : config?.maxCount ?? 50,
|
|
523
|
+
maxSizeMb: config?.maxSizeMb ?? (image ? 20 : 500),
|
|
524
|
+
accept: (config?.acceptTypes?.length ? config.acceptTypes : image ? [
|
|
525
|
+
"jpg",
|
|
526
|
+
"jpeg",
|
|
527
|
+
"png",
|
|
528
|
+
"bmp"
|
|
529
|
+
] : []).map((item) => item.trim().toLowerCase())
|
|
530
|
+
};
|
|
531
|
+
}
|
|
532
|
+
/** 选中整批文件先校验,避免只上传前一部分后才发现数量超限。 */
|
|
533
|
+
function validateResourceFiles(limits, files, currentCount) {
|
|
534
|
+
if (currentCount + files.length > limits.maxCount) throw new Error(`最多上传 ${limits.maxCount} 个资源`);
|
|
535
|
+
for (const file of files) {
|
|
536
|
+
if (file.name.includes(",")) throw new Error("文件名不能包含逗号");
|
|
537
|
+
if (file.size > limits.maxSizeMb * 1024 * 1024) throw new Error(`文件大小不能超过 ${limits.maxSizeMb}MB`);
|
|
538
|
+
const suffix = file.name.split(".").at(-1)?.toLowerCase() ?? "", extension = suffix === "jpeg" ? "jpg" : suffix;
|
|
539
|
+
if (limits.accept.length && !limits.accept.some((item) => {
|
|
540
|
+
if (item.includes("/")) return item.endsWith("/*") ? file.type.toLowerCase().startsWith(item.slice(0, -1)) : file.type.toLowerCase() === item;
|
|
541
|
+
const expected = item.replace(/^\./, "");
|
|
542
|
+
return extension === (expected === "jpeg" ? "jpg" : expected);
|
|
543
|
+
})) throw new Error("文件格式不符合当前字段限制");
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
/** 保留原生绑定和实际业务路径,不用布局片段或旧 WidgetMeta 构造上传参数。 */
|
|
547
|
+
function resourceContext(declaration, path) {
|
|
548
|
+
const kind = fieldBehavior(declaration).widget;
|
|
549
|
+
if (kind !== "image" && kind !== "file") throw new Error("当前不是业务资源字段");
|
|
550
|
+
return {
|
|
551
|
+
kind,
|
|
552
|
+
fieldId: declaration.field.id,
|
|
553
|
+
valuePath: path,
|
|
554
|
+
binding: declaration.binding
|
|
555
|
+
};
|
|
556
|
+
}
|
|
557
|
+
/** 预览只允许被动 HTTP/根相对地址或控件自己管理的 blob,不让持久化值成为脚本链接。 */
|
|
558
|
+
function resourceUrl(value, base) {
|
|
559
|
+
if (!value) return void 0;
|
|
560
|
+
try {
|
|
561
|
+
const url = new URL(value, base);
|
|
562
|
+
return [
|
|
563
|
+
"http:",
|
|
564
|
+
"https:",
|
|
565
|
+
"blob:"
|
|
566
|
+
].includes(url.protocol) ? url.href : void 0;
|
|
567
|
+
} catch {
|
|
568
|
+
return;
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
// src/runtime/form/business/signatures/values.ts
|
|
572
|
+
/** @file 签名值解析与展示,不在打开模板时修复或覆盖历史业务数据。 */
|
|
573
|
+
/** 沿用 JSON 数组字符串协议;异常值显式报告,不把它当成空值重新保存。 */
|
|
574
|
+
function signatureValues(value) {
|
|
575
|
+
if (value === void 0 || value === null || value === "") return [];
|
|
576
|
+
const parsed = typeof value === "string" ? JSON.parse(value) : value;
|
|
577
|
+
if (!Array.isArray(parsed) || parsed.some((item) => !isPlainObject(item) || item.username !== void 0 && typeof item.username !== "string" || item.url !== void 0 && typeof item.url !== "string" || item.userId !== void 0 && typeof item.userId !== "string" || item.time !== void 0 && (typeof item.time !== "number" || !Number.isFinite(item.time)) || !item.username && !item.url)) throw new Error("签名值不是有效的签署记录数组");
|
|
578
|
+
return parsed;
|
|
579
|
+
}
|
|
580
|
+
/** 认证结果只保留持久化白名单,宿主意外带回的凭据或预览字段不会写入业务值。 */
|
|
581
|
+
function authenticatedSignature(value) {
|
|
582
|
+
if (!value || ![
|
|
583
|
+
"userId",
|
|
584
|
+
"username",
|
|
585
|
+
"historyId"
|
|
586
|
+
].every((key) => typeof value[key] === "string" && String(value[key]).trim()) || typeof value.url !== "string" || /^(?:blob:|data:)/i.test(value.url) || typeof value.time !== "number" || !Number.isFinite(value.time) || value.signatureImageDirection !== void 0 && !["horizontal", "vertical"].includes(value.signatureImageDirection)) throw new Error("签署服务没有返回完整、可保存的认证记录");
|
|
587
|
+
return Object.freeze(pick(value, [
|
|
588
|
+
"url",
|
|
589
|
+
"time",
|
|
590
|
+
"historyId",
|
|
591
|
+
"username",
|
|
592
|
+
"userId",
|
|
593
|
+
"signatureImageDirection"
|
|
594
|
+
]));
|
|
595
|
+
}
|
|
596
|
+
/** 纯文字摘要用于只读和异常展示,不把 JSON 原文绘制到画布。 */
|
|
597
|
+
function signatureText(value) {
|
|
598
|
+
try {
|
|
599
|
+
return signatureValues(value).map((item) => item.username || "签名").join("、");
|
|
600
|
+
} catch {
|
|
601
|
+
return "签名值格式异常";
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
// src/runtime/form/business/references/lot-values.ts
|
|
605
|
+
/** @file 批次业务值保存名称,实际选择身份使用独立 ID,不能按普通关联值解释。 */
|
|
606
|
+
/** 这些专用批次业务保存真实名称,选择身份使用独立 ID。 */
|
|
607
|
+
var namedLotBusinessTypes = /* @__PURE__ */ new Set([
|
|
608
|
+
"related_lot_no",
|
|
609
|
+
"scrap_material_no",
|
|
610
|
+
"material_container",
|
|
611
|
+
"sterilization_container"
|
|
612
|
+
]);
|
|
613
|
+
/** 通用物料批次使用独立存储类型;专用业务批次由各自规则处理。 */
|
|
614
|
+
function isMaterialLotBinding(source) {
|
|
615
|
+
return source.fieldType === "material_no" && source.businessType === void 0;
|
|
616
|
+
}
|
|
617
|
+
/** 通用物料批次及明确声明的专用批次按名称保存。 */
|
|
618
|
+
function isNamedLotBinding(source) {
|
|
619
|
+
return source.businessType === void 0 ? isMaterialLotBinding(source) : namedLotBusinessTypes.has(source.businessType);
|
|
620
|
+
}
|
|
621
|
+
/** 确认只捕获必要标量,后续状态请求不能被来源原地改记录或额外接口包装影响。 */
|
|
622
|
+
function nativeSelectedReferenceValue(value) {
|
|
623
|
+
if (!value) throw new Error("批次信息不完整或已变化,请重新选择");
|
|
624
|
+
return {
|
|
625
|
+
id: value.id,
|
|
626
|
+
value: value.value,
|
|
627
|
+
label: value.label,
|
|
628
|
+
productId: value.productId,
|
|
629
|
+
productLabel: value.productLabel
|
|
630
|
+
};
|
|
631
|
+
}
|
|
632
|
+
/** 业务批次类型来自绑定,普通文本或其他关联不改变现有存储协议。 */
|
|
633
|
+
function lotReference(declaration) {
|
|
634
|
+
return fieldBehavior(declaration).widget === "relation" && isNamedLotBinding(declaration.binding.source);
|
|
635
|
+
}
|
|
636
|
+
/** 批次名称允许逗号等普通文本,只有明确清空规范化为 null,数组不是名称。 */
|
|
637
|
+
function normalizeLotName(value) {
|
|
638
|
+
if (value == null || value === "") return null;
|
|
639
|
+
if (typeof value !== "string") throw new Error("批次业务值必须是批次名称文本");
|
|
640
|
+
return value;
|
|
641
|
+
}
|
|
642
|
+
/** 控件/属性请求按实际 ID 工作;没有名称的历史残留 ID 不能冒充已选择批次。 */
|
|
643
|
+
function referenceInputIdentity(declaration, value, companionId) {
|
|
644
|
+
return lotReference(declaration) ? typeof value !== "string" || value === "" ? void 0 : companionId : value;
|
|
645
|
+
}
|
|
646
|
+
// src/runtime/form/business/objects/targets.ts
|
|
647
|
+
/** 业务键只能表示一个根属性,不能把配置当任意访问路径。 */
|
|
648
|
+
function nativeObjectKey(key) {
|
|
649
|
+
return !!key && ![
|
|
650
|
+
".",
|
|
651
|
+
"[",
|
|
652
|
+
"]",
|
|
653
|
+
"$",
|
|
654
|
+
":"
|
|
655
|
+
].some((part) => key.includes(part)) && ![
|
|
656
|
+
"__proto__",
|
|
657
|
+
"prototype",
|
|
658
|
+
"constructor"
|
|
659
|
+
].includes(key);
|
|
660
|
+
}
|
|
661
|
+
/** 对象子字段的来源必须是同一主模型根字段,关联字段和子表不能激活对象初值。 */
|
|
662
|
+
function nativeObjectRootField(field, objectKey) {
|
|
663
|
+
const { source, pathTemplate } = field.binding;
|
|
664
|
+
return source.belongingObject === objectKey && !source.subFieldKey && !source.isLinkedModelField && nativeObjectKey(source.fieldLink) && pathTemplate === `$.${source.fieldLink}`;
|
|
665
|
+
}
|
|
666
|
+
// src/runtime/form/business/references/scan-mapping.ts
|
|
667
|
+
/** @file 通用关联条码映射只解释当前主表或当前行,不借页面下标或任意路径访问。 */
|
|
668
|
+
/** 只有业务身份明确的设备和产品才提供关联扫码。 */
|
|
669
|
+
function isReferenceScanField(declaration) {
|
|
670
|
+
const { businessType } = declaration.binding.source;
|
|
671
|
+
return businessType === "device" || businessType === "product";
|
|
672
|
+
}
|
|
673
|
+
/** 按实际源位置枚举目标,等待期间也用这些地址检测用户所有权变化。 */
|
|
674
|
+
function referenceScanPaths(declaration, path) {
|
|
675
|
+
const field = fieldBehavior(declaration);
|
|
676
|
+
if (field.widget !== "relation" && field.widget !== "rdo-relation") return [];
|
|
677
|
+
const prefix = path.slice(0, path.lastIndexOf(".") + 1);
|
|
678
|
+
return [...new Set((field.config?.barcodeParsing?.fills ?? []).flatMap((fill) => (fill.targets ?? []).map((target) => {
|
|
679
|
+
if (!nativeObjectKey(target.fieldKey)) throw new Error("条码映射目标不是有效业务字段");
|
|
680
|
+
const current = prefix + target.fieldKey;
|
|
681
|
+
if (current === path) throw new Error("条码映射不能覆盖关联字段自身");
|
|
682
|
+
return current;
|
|
683
|
+
})))];
|
|
684
|
+
}
|
|
685
|
+
/** 先验证全部映射再返回更新,原型、跨模型或同一目标的冲突值不能部分写入。 */
|
|
686
|
+
function referenceScanUpdates(declaration, path, modelKey, values) {
|
|
687
|
+
const field = fieldBehavior(declaration), result = {};
|
|
688
|
+
if (field.widget !== "relation" && field.widget !== "rdo-relation") throw new Error("当前不是可扫码关联字段");
|
|
689
|
+
referenceScanPaths(declaration, path);
|
|
690
|
+
const prefix = path.slice(0, path.lastIndexOf(".") + 1);
|
|
691
|
+
for (const fill of field.config?.barcodeParsing?.fills ?? []) {
|
|
692
|
+
if (!fill.source || !Object.hasOwn(values, fill.source) || values[fill.source] === void 0) continue;
|
|
693
|
+
const value = values[fill.source];
|
|
694
|
+
if (value !== null && typeof value !== "string" && (typeof value !== "number" || !Number.isFinite(value))) throw new Error("条码映射只支持有限标量或 null");
|
|
695
|
+
for (const target of fill.targets ?? []) {
|
|
696
|
+
if (target.modelKey !== modelKey && target.modelKey !== declaration.binding.source.modelLink) throw new Error("条码映射目标不属于当前业务模型");
|
|
697
|
+
if ([
|
|
698
|
+
"id",
|
|
699
|
+
"id_",
|
|
700
|
+
"front_row_key_",
|
|
701
|
+
"deleted_",
|
|
702
|
+
"is_confirmed_",
|
|
703
|
+
"bom_entry_id_"
|
|
704
|
+
].includes(target.fieldKey) || [
|
|
705
|
+
"_DICT",
|
|
706
|
+
"_ID",
|
|
707
|
+
"_MCTABLE",
|
|
708
|
+
"_scanFallback"
|
|
709
|
+
].includes(target.fieldKey) || target.fieldKey.startsWith("__")) throw new Error("条码映射不能覆盖身份、确认或内部属性");
|
|
710
|
+
const current = prefix + target.fieldKey;
|
|
711
|
+
if (Object.hasOwn(result, current) && result[current] !== value) throw new Error("条码映射对同一目标产生冲突值");
|
|
712
|
+
result[current] = value;
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
return result;
|
|
716
|
+
}
|
|
717
|
+
// src/runtime/form/business/references/values.ts
|
|
718
|
+
/** @file 关联 ID 的存储语义,人员/组织名称和界面候选不冒充实际业务值。 */
|
|
719
|
+
/** 是否为人员/组织运行行为,源字段可以仍是检验表的原生 input。 */
|
|
720
|
+
function referenceBehavior(field) {
|
|
721
|
+
return [
|
|
722
|
+
"user",
|
|
723
|
+
"org",
|
|
724
|
+
"relation",
|
|
725
|
+
"rdo-relation",
|
|
726
|
+
"sop-version"
|
|
727
|
+
].includes(field.widget);
|
|
728
|
+
}
|
|
729
|
+
/** 记录属性填充与人员、组织和纯版本文本分开解释。 */
|
|
730
|
+
function recordReference(field) {
|
|
731
|
+
return field.widget === "relation" || field.widget === "rdo-relation";
|
|
732
|
+
}
|
|
733
|
+
/** SOP 保存版本原文,其余关联沿用单 ID 或逗号多选协议。 */
|
|
734
|
+
function referenceValueIds(declaration, value) {
|
|
735
|
+
if (fieldKind(declaration) !== "sop-version") return referenceIds(value, referenceMultiple(declaration));
|
|
736
|
+
if (value == null || value === "") return [];
|
|
737
|
+
const item = Array.isArray(value) && value.length <= 1 ? value[0] : value;
|
|
738
|
+
if (item === void 0) return [];
|
|
739
|
+
if (typeof item !== "string") throw new Error("SOP 版本只接受版本文本");
|
|
740
|
+
return [item];
|
|
741
|
+
}
|
|
742
|
+
/** 实际行为可能来自业务行,不以源节点类别猜选择器。 */
|
|
743
|
+
function fieldKind(declaration) {
|
|
744
|
+
return fieldBehavior(declaration).widget;
|
|
745
|
+
}
|
|
746
|
+
/** 多选由实际检验类型或原生绑定存储类型决定,不往 UserConfig/OrgConfig 复制声明。 */
|
|
747
|
+
function referenceMultiple(declaration) {
|
|
748
|
+
return ["user_multi", "org_multi"].includes(declaration.behavior?.valueType ?? declaration.binding.source.fieldType);
|
|
749
|
+
}
|
|
750
|
+
/** 保留选择顺序;undefined/null/空串表示未选择,数字零可以作为有效业务身份。 */
|
|
751
|
+
function referenceIds(value, multiple) {
|
|
752
|
+
if (value === void 0 || value === null || value === "") return [];
|
|
753
|
+
const values = Array.isArray(value) ? value : multiple && typeof value === "string" ? value.split(",").filter((id) => id !== "") : [value];
|
|
754
|
+
if (!multiple && values.length > 1) throw new Error("单选关联字段只能选择一个身份");
|
|
755
|
+
const ids = values.map((id) => {
|
|
756
|
+
if (typeof id !== "string" && typeof id !== "number" || typeof id === "number" && !Number.isFinite(id)) throw new Error("关联字段只接受业务 ID");
|
|
757
|
+
const text = String(id);
|
|
758
|
+
if (!text.trim() || text.includes(",")) throw new Error("关联身份不能为空或包含多选分隔符");
|
|
759
|
+
return text;
|
|
760
|
+
});
|
|
761
|
+
return uniq(ids);
|
|
762
|
+
}
|
|
763
|
+
/** 写入现有单 ID/逗号多选协议;清空为 null,不把名称或 JSON 字符串写成身份。 */
|
|
764
|
+
function normalizeReferenceValue(declaration, value) {
|
|
765
|
+
if (isUninitializedDataValue(value)) return void 0;
|
|
766
|
+
if (lotReference(declaration)) return normalizeLotName(value);
|
|
767
|
+
return encodeDataCollection(referenceValueIds(declaration, value), { encoding: "comma-text" });
|
|
768
|
+
}
|
|
769
|
+
/** 从真实原生声明构造窄定位,不携带原生节点树或业务对象。 */
|
|
770
|
+
function referenceContext(declaration, path) {
|
|
771
|
+
const field = fieldBehavior(declaration), kind = field.widget;
|
|
772
|
+
if (!referenceBehavior(field)) throw new Error("当前字段不是已接入的关联选择器");
|
|
773
|
+
return {
|
|
774
|
+
kind,
|
|
775
|
+
fieldId: declaration.field.id,
|
|
776
|
+
valuePath: path,
|
|
777
|
+
multiple: referenceMultiple(declaration),
|
|
778
|
+
binding: declaration.binding,
|
|
779
|
+
...kind === "relation" || kind === "rdo-relation" || kind === "sop-version" ? { config: field.config } : {}
|
|
780
|
+
};
|
|
781
|
+
}
|
|
782
|
+
/** 候选服务返回值只保留明确属性,防止将完整接口记录存进活动控件。 */
|
|
783
|
+
function referenceOptions(items, allowVersionText = false) {
|
|
784
|
+
const seen = /* @__PURE__ */ new Set();
|
|
785
|
+
return items.map((item) => {
|
|
786
|
+
if (!item || typeof item.id !== "string" || !item.id || !allowVersionText && referenceIds(item.id, false).length !== 1 || typeof item.label !== "string" || item.group !== void 0 && (typeof item.group.id !== "string" || !item.group.id || typeof item.group.label !== "string" || item.group.cells !== void 0 && (!Array.isArray(item.group.cells) || item.group.cells.some((cell) => typeof cell !== "string"))) || item.version !== void 0 && (!item.version || typeof item.version.label !== "string" || item.version.isDefault !== void 0 && typeof item.version.isDefault !== "boolean" || item.version.columnIndex !== void 0 && (!Number.isSafeInteger(item.version.columnIndex) || item.version.columnIndex < -1)) || item.cells !== void 0 && (!Array.isArray(item.cells) || item.cells.some((cell) => typeof cell !== "string")) || seen.has(item.id)) throw new Error("关联候选缺少有效且唯一的 ID/名称");
|
|
787
|
+
seen.add(item.id);
|
|
788
|
+
return {
|
|
789
|
+
id: item.id,
|
|
790
|
+
label: item.label,
|
|
791
|
+
...item.hasChildren ? { hasChildren: true } : {},
|
|
792
|
+
...item.selectable === false ? { selectable: false } : {},
|
|
793
|
+
...item.cells ? { cells: [...item.cells] } : {},
|
|
794
|
+
...item.group ? { group: {
|
|
795
|
+
id: item.group.id,
|
|
796
|
+
label: item.group.label,
|
|
797
|
+
...item.group.cells ? { cells: [...item.group.cells] } : {}
|
|
798
|
+
} } : {},
|
|
799
|
+
...item.version ? { version: {
|
|
800
|
+
label: item.version.label,
|
|
801
|
+
...item.version.columnIndex !== void 0 ? { columnIndex: item.version.columnIndex } : {},
|
|
802
|
+
...item.version.isDefault !== void 0 ? { isDefault: item.version.isDefault } : {}
|
|
803
|
+
} } : {}
|
|
804
|
+
};
|
|
805
|
+
});
|
|
806
|
+
}
|
|
807
|
+
// src/runtime/form/business/seals/value-contract.ts
|
|
808
|
+
/** 持久化印章记录只接受普通对象或JSON对象文本。 */
|
|
809
|
+
function parseSealValue(raw) {
|
|
810
|
+
try {
|
|
811
|
+
const value = typeof raw === "string" ? JSON.parse(raw) : raw;
|
|
812
|
+
return value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
|
|
813
|
+
} catch {
|
|
814
|
+
return;
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
/** 检查位置协议本身,不猜测实际页面是否存在。 */
|
|
818
|
+
function isSealPosition(value) {
|
|
819
|
+
if (!value || typeof value !== "object") return false;
|
|
820
|
+
const p = value;
|
|
821
|
+
return typeof p.sheetId === "string" && !!p.sheetId && Number.isSafeInteger(p.pageIndex) && p.pageIndex >= 0 && Number.isFinite(p.leftMm) && p.leftMm >= 0 && Number.isFinite(p.topMm) && p.topMm >= 0;
|
|
822
|
+
}
|
|
823
|
+
// src/runtime/form/business/seals/values.ts
|
|
824
|
+
/** @file 印章记录的原生读取与认证白名单;历史值只在明确操作时改变。 */
|
|
825
|
+
/** 现行业务协议的七个持久化字段,不包含认证凭据或预览 URL。 */
|
|
826
|
+
var sealStampKeys = [
|
|
827
|
+
"sealId",
|
|
828
|
+
"sealName",
|
|
829
|
+
"sealType",
|
|
830
|
+
"sealImage",
|
|
831
|
+
"sealUserId",
|
|
832
|
+
"sealUserName",
|
|
833
|
+
"sealUserTime"
|
|
834
|
+
];
|
|
835
|
+
/** 原生模板可以提供缺省位置;显式存在的坏位置仍保持异常,不静默修复。 */
|
|
836
|
+
function nativeSealValueKind(value) {
|
|
837
|
+
if (value == null || value === "") return "empty";
|
|
838
|
+
const record = parseSealValue(value);
|
|
839
|
+
if (!record || !isPlainObject(record) || record.sealPosition !== void 0 && !isSealPosition(record.sealPosition)) return "invalid";
|
|
840
|
+
if (sealStampKeys.every((key) => record[key] === void 0 || record[key] === "")) return "empty";
|
|
841
|
+
return sealStampKeys.every((key) => typeof record[key] === "string" && !!record[key]) ? "stamped" : "invalid";
|
|
842
|
+
}
|
|
843
|
+
/** 服务返回的印章必须完整且来源一致,额外密码或临时字段不会保存。 */
|
|
844
|
+
function authenticatedSeal(value, sourceId) {
|
|
845
|
+
if (!value || value.sealId !== sourceId || !sealStampKeys.every((key) => typeof value[key] === "string" && value[key].trim()) || /^(?:blob:|data:)/i.test(value.sealImage)) throw new Error("印章认证结果不完整、来源不符或图片引用无法保存");
|
|
846
|
+
return Object.freeze(pick(value, sealStampKeys));
|
|
847
|
+
}
|
|
848
|
+
/** 摘要不会将完整 JSON 或未知对象字符串画到画布上。 */
|
|
849
|
+
function nativeSealText(value) {
|
|
850
|
+
const kind = nativeSealValueKind(value);
|
|
851
|
+
return kind === "empty" ? "" : kind === "invalid" ? "印章值格式异常" : String(parseSealValue(value).sealName);
|
|
852
|
+
}
|
|
853
|
+
// src/layout/units.ts
|
|
854
|
+
/** @file 文档 pt/mm 与排版逻辑 px 的唯一换算入口,不包含缩放或设备像素比。 */
|
|
855
|
+
/** 一个物理英寸对应的逻辑像素,不随屏幕 DPR 或缩放变化。 */
|
|
856
|
+
var LAYOUT_PIXELS_PER_INCH = 96;
|
|
857
|
+
/** 一个物理英寸的排版点数。 */
|
|
858
|
+
var LAYOUT_POINTS_PER_INCH = 72;
|
|
859
|
+
/** 一个物理英寸的毫米数。 */
|
|
860
|
+
var LAYOUT_MILLIMETERS_PER_INCH = 25.4;
|
|
861
|
+
/** 换算保留小数和负偏移,输入与结果都检查有限性。 */
|
|
862
|
+
function convert(value, ratio) {
|
|
863
|
+
assertFiniteLayoutNumber(value, "输入尺寸");
|
|
864
|
+
const result = value * ratio;
|
|
865
|
+
assertFiniteLayoutNumber(result, "换算结果");
|
|
866
|
+
return result;
|
|
867
|
+
}
|
|
868
|
+
/** 将 model 字号或排版点值换算为逻辑 px。 */
|
|
869
|
+
function pointsToLayoutPx(value) {
|
|
870
|
+
return convert(value, 96 / 72);
|
|
871
|
+
}
|
|
872
|
+
/** 将逻辑 px 换算为排版点,不提前舍入。 */
|
|
873
|
+
function layoutPxToPoints(value) {
|
|
874
|
+
return convert(value, 72 / 96);
|
|
875
|
+
}
|
|
876
|
+
/** 将业务毫米位置换算为逻辑 px,负偏移保持。 */
|
|
877
|
+
function millimetersToLayoutPx(value) {
|
|
878
|
+
return convert(value, 96 / LAYOUT_MILLIMETERS_PER_INCH);
|
|
879
|
+
}
|
|
880
|
+
/** 将逻辑 px 换算为业务毫米,不混入当前视图缩放。 */
|
|
881
|
+
function layoutPxToMillimeters(value) {
|
|
882
|
+
return convert(value, LAYOUT_MILLIMETERS_PER_INCH / 96);
|
|
883
|
+
}
|
|
884
|
+
// src/layout/source.ts
|
|
885
|
+
/** 取得逻辑位置的原生来源拥有者。 */
|
|
886
|
+
function positionSourceId(position) {
|
|
887
|
+
if (position.kind === "paragraphBoundary") return position.paragraphId;
|
|
888
|
+
if (position.kind === "blockBoundary") return position.parentId;
|
|
889
|
+
return position.kind === "valueText" ? position.ownerNodeId : position.nodeId;
|
|
890
|
+
}
|
|
891
|
+
/** 比较编辑域,不因两个实例有同一原生 ID 就跨域命中。 */
|
|
892
|
+
function sameDomain(left, right) {
|
|
893
|
+
return left.kind === right.kind && left.nodeId === right.nodeId;
|
|
894
|
+
}
|
|
895
|
+
/** 比较逻辑地址的几何位置;编辑 affinity 不改变当前几何。 */
|
|
896
|
+
function samePosition(left, right) {
|
|
897
|
+
if (left.kind !== right.kind) return false;
|
|
898
|
+
switch (left.kind) {
|
|
899
|
+
case "text": return right.kind === "text" && left.nodeId === right.nodeId && left.offset === right.offset;
|
|
900
|
+
case "valueText": return right.kind === "valueText" && left.ownerNodeId === right.ownerNodeId && left.displayKey === right.displayKey && left.offset === right.offset;
|
|
901
|
+
case "nodeBoundary": return right.kind === "nodeBoundary" && left.nodeId === right.nodeId && left.side === right.side;
|
|
902
|
+
case "blockBoundary": return right.kind === "blockBoundary" && left.parentId === right.parentId && left.index === right.index;
|
|
903
|
+
case "paragraphBoundary": return right.kind === "paragraphBoundary" && left.paragraphId === right.paragraphId && left.index === right.index;
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
/** 取得文字片段的原生来源拥有者。 */
|
|
907
|
+
function textSourceId(source) {
|
|
908
|
+
return source.kind === "modelText" ? source.nodeId : source.ownerNodeId;
|
|
909
|
+
}
|
|
910
|
+
/** 判断两个区间是否来自同一类文字,不把生成文字转换成原生文字。 */
|
|
911
|
+
function sameTextSource(left, right) {
|
|
912
|
+
if (left.kind !== right.kind || textSourceId(left) !== textSourceId(right)) return false;
|
|
913
|
+
return left.kind === "modelText" || right.kind !== "modelText" && left.displayKey === right.displayKey;
|
|
914
|
+
}
|
|
915
|
+
// src/layout/geometry/text.ts
|
|
916
|
+
/** @file 精确文字映射与页面内几何,支持单向 LTR/RTL 片段。 */
|
|
917
|
+
/** 求点到占位矩形的平方距离;矩形内部及边界为零。 */
|
|
918
|
+
function rectDistance(point, frame) {
|
|
919
|
+
const dx = point.x - clamp(point.x, frame.x, frame.x + frame.width);
|
|
920
|
+
const dy = point.y - clamp(point.y, frame.y, frame.y + frame.height);
|
|
921
|
+
return dx * dx + dy * dy;
|
|
922
|
+
}
|
|
923
|
+
/** 只解析明确可编辑的文字位置,拒绝把标签或页码偏移传入正文编辑。 */
|
|
924
|
+
function textPosition(fragment, offset) {
|
|
925
|
+
const source = fragment.source;
|
|
926
|
+
if (source.kind === "modelText") return {
|
|
927
|
+
kind: "text",
|
|
928
|
+
nodeId: source.nodeId,
|
|
929
|
+
offset
|
|
930
|
+
};
|
|
931
|
+
if (source.kind === "displayText" && source.editable) return {
|
|
932
|
+
kind: "valueText",
|
|
933
|
+
ownerNodeId: source.ownerNodeId,
|
|
934
|
+
displayKey: source.displayKey,
|
|
935
|
+
offset
|
|
936
|
+
};
|
|
937
|
+
}
|
|
938
|
+
/** 根据显式停靠点返回内部横坐标,不把任意 UTF-16 偏移自动吸附。 */
|
|
939
|
+
function positionX(fragment, position) {
|
|
940
|
+
if (fragment.kind === "anchor") return samePosition(fragment.position, position) ? 0 : void 0;
|
|
941
|
+
if (fragment.kind === "atom") {
|
|
942
|
+
if (position.kind !== "nodeBoundary" || position.nodeId !== fragment.nodeId) return void 0;
|
|
943
|
+
return position.side === "before" === (fragment.direction === "ltr") ? 0 : fragment.frame.width;
|
|
944
|
+
}
|
|
945
|
+
if (position.kind !== "text" && position.kind !== "valueText") return void 0;
|
|
946
|
+
const expected = textPosition(fragment, position.offset);
|
|
947
|
+
if (!expected || !samePosition(expected, position)) return void 0;
|
|
948
|
+
const index = sourceBoundaryIndex(fragment, position.offset);
|
|
949
|
+
return index === void 0 ? void 0 : fragment.caretMap.x[index];
|
|
950
|
+
}
|
|
951
|
+
/** 点选时在生产端给出的合法边界中寻找最近位置,长度变化和 emoji 均不按字符数推算。 */
|
|
952
|
+
function hitPosition(fragment, pageX, visible) {
|
|
953
|
+
if (fragment.kind === "anchor") return fragment.position;
|
|
954
|
+
if (fragment.kind === "atom") {
|
|
955
|
+
if (visible) {
|
|
956
|
+
const beforeX = fragment.direction === "ltr" ? fragment.frame.x : fragment.frame.x + fragment.frame.width;
|
|
957
|
+
const afterX = fragment.direction === "ltr" ? fragment.frame.x + fragment.frame.width : fragment.frame.x;
|
|
958
|
+
const beforeVisible = beforeX >= visible.x && beforeX <= visible.x + visible.width;
|
|
959
|
+
const afterVisible = afterX >= visible.x && afterX <= visible.x + visible.width;
|
|
960
|
+
if (!beforeVisible && !afterVisible) return void 0;
|
|
961
|
+
if (!beforeVisible || !afterVisible) return {
|
|
962
|
+
kind: "nodeBoundary",
|
|
963
|
+
nodeId: fragment.nodeId,
|
|
964
|
+
side: beforeVisible ? "before" : "after"
|
|
965
|
+
};
|
|
966
|
+
}
|
|
967
|
+
const atLeft = pageX - fragment.frame.x <= fragment.frame.width / 2;
|
|
968
|
+
return {
|
|
969
|
+
kind: "nodeBoundary",
|
|
970
|
+
nodeId: fragment.nodeId,
|
|
971
|
+
side: atLeft === (fragment.direction === "ltr") ? "before" : "after"
|
|
972
|
+
};
|
|
973
|
+
}
|
|
974
|
+
const xs = fragment.caretMap.x, sign = fragment.direction === "ltr" ? 1 : -1;
|
|
975
|
+
const localX = (visible ? clamp(pageX, visible.x, visible.x + visible.width) : pageX) - fragment.frame.x;
|
|
976
|
+
const rank = (value) => value * sign;
|
|
977
|
+
const insertion = sortedIndexBy(xs, localX, rank);
|
|
978
|
+
let offset, distance = Infinity;
|
|
979
|
+
for (const index of [insertion - 1, insertion]) {
|
|
980
|
+
if (index < 0 || index >= xs.length) continue;
|
|
981
|
+
const x = xs[index], absolute = fragment.frame.x + x;
|
|
982
|
+
if (visible && (absolute < visible.x || absolute > visible.x + visible.width)) continue;
|
|
983
|
+
const current = Math.abs(x - localX);
|
|
984
|
+
if (offset === void 0 || current < distance) {
|
|
985
|
+
distance = current;
|
|
986
|
+
offset = fragment.caretMap.offsets[sortedIndexBy(xs, x, rank)];
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
return offset === void 0 ? void 0 : textPosition(fragment, offset);
|
|
990
|
+
}
|
|
991
|
+
/** 从当前位置所在片段边界得到软换行停靠偏好,不改变编辑 affinity。 */
|
|
992
|
+
function visualAffinity(fragment, position) {
|
|
993
|
+
if (fragment.kind !== "text" || position.kind !== "text" && position.kind !== "valueText") return void 0;
|
|
994
|
+
if (position.offset === fragment.source.from) return "downstream";
|
|
995
|
+
return position.offset === fragment.source.to ? "upstream" : void 0;
|
|
996
|
+
}
|
|
997
|
+
/** 从有序源偏移二分查找精确字素边界;不把非法 UTF-16 偏移自动吸附。 */
|
|
998
|
+
function sourceBoundaryIndex(fragment, offset) {
|
|
999
|
+
const index = sortedIndex(fragment.caretMap.offsets, offset);
|
|
1000
|
+
return fragment.caretMap.offsets[index] === offset ? index : void 0;
|
|
1001
|
+
}
|
|
1002
|
+
// src/runtime/interaction/text/TextFlow.ts
|
|
1003
|
+
/** @file 逻辑文字流:按当前 model 解释位置与选区,不保存分页路径或逐字对象。 */
|
|
1004
|
+
/** 字素分割算法可共享,不保存任何文档或分割结果。 */
|
|
1005
|
+
var segmenter = new Intl.Segmenter(void 0, { granularity: "grapheme" });
|
|
1006
|
+
/** 词边界只在按词导航/删除时读取,不创建持久的单词节点。 */
|
|
1007
|
+
var words = new Intl.Segmenter(void 0, { granularity: "word" });
|
|
1008
|
+
/** 无法将当前位置解释成普通文档文字时的明确交互错误。 */
|
|
1009
|
+
var TextFlowError = class extends Error {
|
|
1010
|
+
/** 稳定错误代码,方便宿主区分交互边界与内部故障。 */
|
|
1011
|
+
code = "text_flow_boundary";
|
|
1012
|
+
/** 记录当前尚不支持或已失效的位置。 */
|
|
1013
|
+
constructor(message) {
|
|
1014
|
+
super(message);
|
|
1015
|
+
this.name = "TextFlowError";
|
|
1016
|
+
}
|
|
1017
|
+
};
|
|
1018
|
+
/** 同步读取当前提交的逻辑流,实例不跨事件或 await 持有。 */
|
|
1019
|
+
var TextFlow = class {
|
|
1020
|
+
model;
|
|
1021
|
+
layout;
|
|
1022
|
+
presentationCurrent;
|
|
1023
|
+
/** 与本次读取一致的原生视图。 */
|
|
1024
|
+
constructor(model, layout, presentationCurrent = true) {
|
|
1025
|
+
this.model = model;
|
|
1026
|
+
this.layout = layout;
|
|
1027
|
+
this.presentationCurrent = presentationCurrent;
|
|
1028
|
+
}
|
|
1029
|
+
/** 验证位置所属编辑域,再转换成实际模型位置;禁止把填报值当正文编辑。 */
|
|
1030
|
+
resolve(endpoint) {
|
|
1031
|
+
const position = endpoint.position, query = this.model.query;
|
|
1032
|
+
if (position.kind === "valueText") throw new TextFlowError("填报值需要通过运行数据编辑接口处理");
|
|
1033
|
+
const id = position.kind === "blockBoundary" ? position.parentId : position.kind === "paragraphBoundary" ? position.paragraphId : position.nodeId;
|
|
1034
|
+
const context = query.getContext(id);
|
|
1035
|
+
const domain = endpoint.domain;
|
|
1036
|
+
if (domain.kind === "fieldValue" || domain.kind === "document" && (domain.nodeId !== this.model.document.id || context.partId || context.overlayId) || domain.kind === "part" && context.partId !== domain.nodeId || domain.kind === "overlay" && context.overlayId !== domain.nodeId) throw new TextFlowError("逻辑位置与当前编辑域不一致");
|
|
1037
|
+
if (position.kind === "blockBoundary") {
|
|
1038
|
+
const owner = query.getEntity(position.parentId);
|
|
1039
|
+
if (!owner || !("blocks" in owner) || owner.blocks.length !== 0 || !Number.isInteger(position.index) || position.index < 0 || position.index > owner.blocks.length) throw new TextFlowError("块集合插入位置已失效");
|
|
1040
|
+
return {
|
|
1041
|
+
kind: "blockGap",
|
|
1042
|
+
parentId: position.parentId,
|
|
1043
|
+
index: position.index
|
|
1044
|
+
};
|
|
1045
|
+
}
|
|
1046
|
+
const paragraphId = context.paragraphId;
|
|
1047
|
+
const paragraph = paragraphId ? query.getEntity(paragraphId, "paragraph") : void 0;
|
|
1048
|
+
const location = paragraph && query.getLocation(paragraph.id);
|
|
1049
|
+
if (!paragraph || location?.collection !== "blocks" || location.parentId === void 0 || location.index === void 0) throw new TextFlowError("当前位置不属于可编辑段落");
|
|
1050
|
+
let index, offset = 0;
|
|
1051
|
+
if (position.kind === "paragraphBoundary") index = position.index;
|
|
1052
|
+
else {
|
|
1053
|
+
const at = query.getLocation(position.nodeId);
|
|
1054
|
+
if (at?.parentId !== paragraph.id || at.collection !== "content" || at.index === void 0) throw new TextFlowError("行内来源已失效");
|
|
1055
|
+
index = at.index;
|
|
1056
|
+
if (position.kind === "nodeBoundary") index += position.side === "after" ? 1 : 0;
|
|
1057
|
+
else {
|
|
1058
|
+
const node = paragraph.content[index];
|
|
1059
|
+
if (node?.kind !== "text" || position.offset < 0 || position.offset > node.text.length || !Number.isInteger(position.offset) || position.offset < node.text.length && segmenter.segment(node.text).containing(position.offset)?.index !== position.offset) throw new TextFlowError("文字偏移不是合法字素边界");
|
|
1060
|
+
offset = position.offset;
|
|
1061
|
+
if (offset === node.text.length && offset > 0) {
|
|
1062
|
+
index++;
|
|
1063
|
+
offset = 0;
|
|
1064
|
+
}
|
|
1065
|
+
}
|
|
1066
|
+
}
|
|
1067
|
+
if (!Number.isInteger(index) || index < 0 || index > paragraph.content.length) throw new TextFlowError("段落间隙已失效");
|
|
1068
|
+
return {
|
|
1069
|
+
kind: "paragraph",
|
|
1070
|
+
parentId: location.parentId,
|
|
1071
|
+
blockIndex: location.index,
|
|
1072
|
+
paragraph,
|
|
1073
|
+
point: {
|
|
1074
|
+
paragraphId: paragraph.id,
|
|
1075
|
+
index,
|
|
1076
|
+
...offset > 0 ? { offset } : {}
|
|
1077
|
+
}
|
|
1078
|
+
};
|
|
1079
|
+
}
|
|
1080
|
+
/** 将命令返回的内容位置恢复成真实来源,优先相邻文字,空段才使用段落锚点。 */
|
|
1081
|
+
endpoint(point, base) {
|
|
1082
|
+
const paragraph = this.model.query.getEntity(point.paragraphId, "paragraph");
|
|
1083
|
+
if (!paragraph) throw new TextFlowError("命令返回的段落已不存在");
|
|
1084
|
+
const node = paragraph.content[point.index], previous = paragraph.content[point.index - 1];
|
|
1085
|
+
const position = node?.kind === "text" ? {
|
|
1086
|
+
kind: "text",
|
|
1087
|
+
nodeId: node.id,
|
|
1088
|
+
offset: point.offset ?? 0
|
|
1089
|
+
} : point.offset !== void 0 ? (() => {
|
|
1090
|
+
throw new TextFlowError("命令偏移没有对应文字");
|
|
1091
|
+
})() : previous?.kind === "text" ? {
|
|
1092
|
+
kind: "text",
|
|
1093
|
+
nodeId: previous.id,
|
|
1094
|
+
offset: previous.text.length
|
|
1095
|
+
} : node ? {
|
|
1096
|
+
kind: "nodeBoundary",
|
|
1097
|
+
nodeId: node.id,
|
|
1098
|
+
side: "before"
|
|
1099
|
+
} : previous ? {
|
|
1100
|
+
kind: "nodeBoundary",
|
|
1101
|
+
nodeId: previous.id,
|
|
1102
|
+
side: "after"
|
|
1103
|
+
} : {
|
|
1104
|
+
kind: "paragraphBoundary",
|
|
1105
|
+
paragraphId: paragraph.id,
|
|
1106
|
+
index: 0
|
|
1107
|
+
};
|
|
1108
|
+
const result = {
|
|
1109
|
+
...base,
|
|
1110
|
+
position,
|
|
1111
|
+
visualAffinity: "downstream",
|
|
1112
|
+
visualFragmentId: void 0
|
|
1113
|
+
};
|
|
1114
|
+
return this.retarget(result, base);
|
|
1115
|
+
}
|
|
1116
|
+
/** 以当前结果的显式实例描述定位新来源,优先同一次表头/页部件发生。 */
|
|
1117
|
+
retarget(initial, base) {
|
|
1118
|
+
let result = initial;
|
|
1119
|
+
const position = result.position;
|
|
1120
|
+
if (this.layout) {
|
|
1121
|
+
const candidates = this.layout.findBySource({ nodeId: positionSourceId(position) });
|
|
1122
|
+
if (!candidates.some((fragment) => fragment.instanceKey === base.instanceKey)) {
|
|
1123
|
+
const ancestors = this.instanceAncestors(base.instanceKey);
|
|
1124
|
+
let score = -1;
|
|
1125
|
+
for (const fragment of candidates) {
|
|
1126
|
+
const candidate = {
|
|
1127
|
+
...result,
|
|
1128
|
+
instanceKey: fragment.instanceKey
|
|
1129
|
+
};
|
|
1130
|
+
if (!this.sameScope(base, candidate)) continue;
|
|
1131
|
+
const chain = this.instanceAncestors(fragment.instanceKey), common = chain.findIndex((key) => ancestors.includes(key)), next = common < 0 ? 0 : chain.length - common;
|
|
1132
|
+
if (next > score) {
|
|
1133
|
+
result = candidate;
|
|
1134
|
+
score = next;
|
|
1135
|
+
}
|
|
1136
|
+
}
|
|
1137
|
+
}
|
|
1138
|
+
}
|
|
1139
|
+
this.resolve(result);
|
|
1140
|
+
return result;
|
|
1141
|
+
}
|
|
1142
|
+
/** 结构变化后把间隙归一到可显示来源;新组合字素中的偏移按跟随方向吸附。 */
|
|
1143
|
+
canonical(endpoint, snap = false) {
|
|
1144
|
+
let value = endpoint;
|
|
1145
|
+
if (snap && value.position.kind === "text") {
|
|
1146
|
+
const position = value.position, node = this.model.query.getEntity(position.nodeId, "text");
|
|
1147
|
+
if (node && position.offset > 0 && position.offset < node.text.length) {
|
|
1148
|
+
const item = segmenter.segment(node.text).containing(position.offset);
|
|
1149
|
+
if (item && item.index !== position.offset) value = {
|
|
1150
|
+
...value,
|
|
1151
|
+
position: {
|
|
1152
|
+
...position,
|
|
1153
|
+
offset: position.affinity === "before" ? item.index : item.index + item.segment.length
|
|
1154
|
+
}
|
|
1155
|
+
};
|
|
1156
|
+
}
|
|
1157
|
+
}
|
|
1158
|
+
const at = this.resolve(value);
|
|
1159
|
+
return value.position.kind === "paragraphBoundary" && at.kind === "paragraph" ? {
|
|
1160
|
+
...this.endpoint(at.point, value),
|
|
1161
|
+
visualAffinity: value.visualAffinity
|
|
1162
|
+
} : value;
|
|
1163
|
+
}
|
|
1164
|
+
/** 新内容发布后按来源和原编辑范围绑定实际实例,原业务 UID/页部件范围不匹配时不猜别的副本。 */
|
|
1165
|
+
bindPublishedEndpoint(endpoint) {
|
|
1166
|
+
return this.retarget(endpoint, endpoint);
|
|
1167
|
+
}
|
|
1168
|
+
/** 按 model 的块/行内顺序归一,不用页面坐标判断选区前后。 */
|
|
1169
|
+
ordered(selection) {
|
|
1170
|
+
if (!this.sameScope(selection.anchor, selection.focus)) throw new TextFlowError("普通文字选区不能跨编辑域或展示实例");
|
|
1171
|
+
let from = this.resolve(selection.anchor), to = this.resolve(selection.focus);
|
|
1172
|
+
const compare = this.compareTargets(from, to);
|
|
1173
|
+
if (compare > 0) [from, to] = [to, from];
|
|
1174
|
+
return {
|
|
1175
|
+
from,
|
|
1176
|
+
to,
|
|
1177
|
+
collapsed: compare === 0
|
|
1178
|
+
};
|
|
1179
|
+
}
|
|
1180
|
+
/** 比较同一编辑域内的两个逻辑位置,供拖选判断扩展方向。 */
|
|
1181
|
+
compareEndpoints(anchor, focus) {
|
|
1182
|
+
return this.compareTargets(this.resolve(anchor), this.resolve(focus));
|
|
1183
|
+
}
|
|
1184
|
+
/** 找到物理格内可见内容的首尾,空格保留原生块间隙。 */
|
|
1185
|
+
cellBoundary(cellId, end, base) {
|
|
1186
|
+
const cell = this.model.query.getEntity(cellId, "cell");
|
|
1187
|
+
if (!cell) return;
|
|
1188
|
+
let boundary;
|
|
1189
|
+
for (const leaf of contentBlockLeaves(cell.id, cell.blocks)) {
|
|
1190
|
+
const endpoint = this.leafEndpoint(leaf, end, base);
|
|
1191
|
+
if (!this.isPresented(endpoint)) continue;
|
|
1192
|
+
boundary = endpoint;
|
|
1193
|
+
if (!end) break;
|
|
1194
|
+
}
|
|
1195
|
+
return boundary;
|
|
1196
|
+
}
|
|
1197
|
+
/** 从已归一目标恢复源端点,空集合仍保持块间隙,不为选择创建段落。 */
|
|
1198
|
+
endpointForTarget(target, base) {
|
|
1199
|
+
return target.kind === "paragraph" ? this.endpoint(target.point, base) : this.retarget({
|
|
1200
|
+
...base,
|
|
1201
|
+
position: {
|
|
1202
|
+
kind: "blockBoundary",
|
|
1203
|
+
parentId: target.parentId,
|
|
1204
|
+
index: target.index
|
|
1205
|
+
},
|
|
1206
|
+
visualAffinity: void 0,
|
|
1207
|
+
visualFragmentId: void 0
|
|
1208
|
+
}, base);
|
|
1209
|
+
}
|
|
1210
|
+
/** 左右移动真实字素或原子边界;段末可进入同编辑根的章节和普通单元格。 */
|
|
1211
|
+
step(endpoint, direction) {
|
|
1212
|
+
const at = this.resolve(endpoint);
|
|
1213
|
+
if (at.kind === "blockGap") return this.adjacent(endpoint, direction);
|
|
1214
|
+
const { paragraph, point } = at;
|
|
1215
|
+
let index = point.index, offset = point.offset ?? 0;
|
|
1216
|
+
if (direction === 1) while (index < paragraph.content.length) {
|
|
1217
|
+
const node = paragraph.content[index];
|
|
1218
|
+
if (node.kind === "text" && offset < node.text.length) {
|
|
1219
|
+
const next = segmenter.segment(node.text).containing(offset);
|
|
1220
|
+
return this.endpoint({
|
|
1221
|
+
paragraphId: paragraph.id,
|
|
1222
|
+
index,
|
|
1223
|
+
offset: next.index + next.segment.length
|
|
1224
|
+
}, endpoint);
|
|
1225
|
+
}
|
|
1226
|
+
if (node.kind !== "text") return this.endpoint({
|
|
1227
|
+
paragraphId: paragraph.id,
|
|
1228
|
+
index: index + 1
|
|
1229
|
+
}, endpoint);
|
|
1230
|
+
index++;
|
|
1231
|
+
offset = 0;
|
|
1232
|
+
}
|
|
1233
|
+
else {
|
|
1234
|
+
if (offset > 0) {
|
|
1235
|
+
const node = paragraph.content[index];
|
|
1236
|
+
if (node.kind === "text") return this.endpoint({
|
|
1237
|
+
paragraphId: paragraph.id,
|
|
1238
|
+
index,
|
|
1239
|
+
offset: segmenter.segment(node.text).containing(offset - 1).index
|
|
1240
|
+
}, endpoint);
|
|
1241
|
+
}
|
|
1242
|
+
while (index > 0) {
|
|
1243
|
+
const node = paragraph.content[--index];
|
|
1244
|
+
if (node.kind !== "text") return this.endpoint({
|
|
1245
|
+
paragraphId: paragraph.id,
|
|
1246
|
+
index
|
|
1247
|
+
}, endpoint);
|
|
1248
|
+
if (node.text.length) return this.endpoint({
|
|
1249
|
+
paragraphId: paragraph.id,
|
|
1250
|
+
index,
|
|
1251
|
+
offset: segmenter.segment(node.text).containing(node.text.length - 1).index
|
|
1252
|
+
}, endpoint);
|
|
1253
|
+
}
|
|
1254
|
+
}
|
|
1255
|
+
const sibling = this.blocks(at.parentId)[at.blockIndex + direction];
|
|
1256
|
+
if (sibling?.kind === "paragraph") {
|
|
1257
|
+
const candidate = this.endpoint({
|
|
1258
|
+
paragraphId: sibling.id,
|
|
1259
|
+
index: direction === 1 ? 0 : sibling.content.length
|
|
1260
|
+
}, endpoint);
|
|
1261
|
+
if (this.sameScope(endpoint, candidate) && this.isPresented(candidate)) return candidate;
|
|
1262
|
+
}
|
|
1263
|
+
return this.adjacent(endpoint, direction);
|
|
1264
|
+
}
|
|
1265
|
+
/** 只在真实容器边界寻找相邻叶子,空格不需要创建段落也能进入和离开。 */
|
|
1266
|
+
adjacent(endpoint, direction) {
|
|
1267
|
+
const current = this.resolve(endpoint), id = current.kind === "paragraph" ? current.paragraph.id : current.parentId;
|
|
1268
|
+
let previous, passed = false;
|
|
1269
|
+
for (const leaf of contentLeaves(this.root(endpoint))) {
|
|
1270
|
+
if ((leaf.kind === "paragraph" ? leaf.id : leaf.ownerId) === id) {
|
|
1271
|
+
if (direction === -1) return previous ? this.leafEndpoint(previous, true, endpoint) : endpoint;
|
|
1272
|
+
passed = true;
|
|
1273
|
+
continue;
|
|
1274
|
+
}
|
|
1275
|
+
const candidate = this.leafEndpoint(leaf, direction === -1, endpoint);
|
|
1276
|
+
if (!this.sameScope(endpoint, candidate) || !this.isPresented(candidate)) continue;
|
|
1277
|
+
if (passed) return candidate;
|
|
1278
|
+
previous = leaf;
|
|
1279
|
+
}
|
|
1280
|
+
return endpoint;
|
|
1281
|
+
}
|
|
1282
|
+
/** 段落映射到源文字,空容器映射到真实块间隙,两者均按实际实例重定位。 */
|
|
1283
|
+
leafEndpoint(leaf, end, base) {
|
|
1284
|
+
return leaf.kind === "paragraph" ? this.endpoint({
|
|
1285
|
+
paragraphId: leaf.id,
|
|
1286
|
+
index: end ? leaf.content.length : 0
|
|
1287
|
+
}, base) : this.retarget({
|
|
1288
|
+
...base,
|
|
1289
|
+
position: {
|
|
1290
|
+
kind: "blockBoundary",
|
|
1291
|
+
parentId: leaf.ownerId,
|
|
1292
|
+
index: 0
|
|
1293
|
+
},
|
|
1294
|
+
visualAffinity: void 0,
|
|
1295
|
+
visualFragmentId: void 0
|
|
1296
|
+
}, base);
|
|
1297
|
+
}
|
|
1298
|
+
/** 按词移动,先跳过相邻空白,再定位当前脚本的真实词边界。 */
|
|
1299
|
+
wordStep(endpoint, direction) {
|
|
1300
|
+
const at = this.resolve(endpoint);
|
|
1301
|
+
if (at.kind !== "paragraph") return endpoint;
|
|
1302
|
+
const text = at.paragraph.content.map((node) => node.kind === "text" ? node.text : "").join("");
|
|
1303
|
+
let units = at.point.offset ?? 0;
|
|
1304
|
+
for (let index = 0; index < at.point.index; index++) {
|
|
1305
|
+
const node = at.paragraph.content[index];
|
|
1306
|
+
units += node.kind === "text" ? node.text.length : 1;
|
|
1307
|
+
}
|
|
1308
|
+
if (direction === -1 && units === 0 || direction === 1 && units === text.length) return this.step(endpoint, direction);
|
|
1309
|
+
const segments = words.segment(text);
|
|
1310
|
+
let segment = segments.containing(direction === 1 ? units : units - 1);
|
|
1311
|
+
if (direction === -1) {
|
|
1312
|
+
while (/^\s+$/.test(segment.segment) && segment.index > 0) segment = segments.containing(segment.index - 1);
|
|
1313
|
+
units = segment.index;
|
|
1314
|
+
} else {
|
|
1315
|
+
units = segment.index + segment.segment.length;
|
|
1316
|
+
while (units < text.length) {
|
|
1317
|
+
segment = segments.containing(units);
|
|
1318
|
+
if (!/^\s+$/.test(segment.segment)) break;
|
|
1319
|
+
units = segment.index + segment.segment.length;
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1322
|
+
for (const [index, node] of at.paragraph.content.entries()) {
|
|
1323
|
+
const length = node.kind === "text" ? node.text.length : 1;
|
|
1324
|
+
if (units <= length) return this.endpoint({
|
|
1325
|
+
paragraphId: at.paragraph.id,
|
|
1326
|
+
index: node.kind !== "text" && units > 0 ? index + 1 : index,
|
|
1327
|
+
...node.kind === "text" ? { offset: units } : {}
|
|
1328
|
+
}, endpoint);
|
|
1329
|
+
units -= length;
|
|
1330
|
+
}
|
|
1331
|
+
return this.endpoint({
|
|
1332
|
+
paragraphId: at.paragraph.id,
|
|
1333
|
+
index: at.paragraph.content.length
|
|
1334
|
+
}, endpoint);
|
|
1335
|
+
}
|
|
1336
|
+
/** 返回当前编辑根的真实首尾;正文包括章节和格,业务行及页部件发生保持隔离。 */
|
|
1337
|
+
bounds(endpoint) {
|
|
1338
|
+
let first, last;
|
|
1339
|
+
for (const leaf of contentLeaves(this.root(endpoint))) {
|
|
1340
|
+
const start = this.leafEndpoint(leaf, false, endpoint);
|
|
1341
|
+
if (!this.sameScope(endpoint, start) || !this.isPresented(start)) continue;
|
|
1342
|
+
first ??= start;
|
|
1343
|
+
last = this.leafEndpoint(leaf, true, start);
|
|
1344
|
+
}
|
|
1345
|
+
return {
|
|
1346
|
+
kind: "text",
|
|
1347
|
+
anchor: first ?? endpoint,
|
|
1348
|
+
focus: last ?? endpoint
|
|
1349
|
+
};
|
|
1350
|
+
}
|
|
1351
|
+
/** 记录删除后的局部回退依据,不捕获完整 paragraph 或 document。 */
|
|
1352
|
+
fallback(endpoint) {
|
|
1353
|
+
const at = this.resolve(endpoint);
|
|
1354
|
+
return {
|
|
1355
|
+
parentId: at.parentId,
|
|
1356
|
+
blockIndex: at.kind === "paragraph" ? at.blockIndex : at.index,
|
|
1357
|
+
...at.kind === "paragraph" ? {
|
|
1358
|
+
paragraphId: at.paragraph.id,
|
|
1359
|
+
inlineIndex: at.point.index
|
|
1360
|
+
} : {}
|
|
1361
|
+
};
|
|
1362
|
+
}
|
|
1363
|
+
/** 原实体删除后停在最近仍存在的段落,空集合仍保留插入地址。 */
|
|
1364
|
+
recover(fallback, base) {
|
|
1365
|
+
const owner = this.model.query.getEntity(fallback.parentId);
|
|
1366
|
+
if (!owner || !("blocks" in owner)) return void 0;
|
|
1367
|
+
const previous = fallback.paragraphId && this.model.query.getEntity(fallback.paragraphId, "paragraph");
|
|
1368
|
+
if (previous && this.model.query.getLocation(previous.id)?.parentId === owner.id) return this.endpoint({
|
|
1369
|
+
paragraphId: previous.id,
|
|
1370
|
+
index: Math.min(fallback.inlineIndex ?? 0, previous.content.length)
|
|
1371
|
+
}, base);
|
|
1372
|
+
const paragraphs = owner.blocks.filter((block) => block.kind === "paragraph");
|
|
1373
|
+
const at = owner.blocks[Math.min(fallback.blockIndex, owner.blocks.length - 1)];
|
|
1374
|
+
const paragraph = at?.kind === "paragraph" ? at : paragraphs.at(-1);
|
|
1375
|
+
if (paragraph) return this.endpoint({
|
|
1376
|
+
paragraphId: paragraph.id,
|
|
1377
|
+
index: 0
|
|
1378
|
+
}, base);
|
|
1379
|
+
if (owner.blocks.length) return void 0;
|
|
1380
|
+
return {
|
|
1381
|
+
...base,
|
|
1382
|
+
position: {
|
|
1383
|
+
kind: "blockBoundary",
|
|
1384
|
+
parentId: owner.id,
|
|
1385
|
+
index: 0
|
|
1386
|
+
},
|
|
1387
|
+
visualAffinity: void 0
|
|
1388
|
+
};
|
|
1389
|
+
}
|
|
1390
|
+
/** 从真实内容范围导出最小文字/原子选择来源;不按视觉片段数量选择字符。 */
|
|
1391
|
+
projection(selection, projectRow) {
|
|
1392
|
+
const { from, to, collapsed } = this.ordered(selection);
|
|
1393
|
+
const spans = [], nodes = [], paragraphEnds = [];
|
|
1394
|
+
if (collapsed) return {
|
|
1395
|
+
spans,
|
|
1396
|
+
nodes,
|
|
1397
|
+
paragraphEnds
|
|
1398
|
+
};
|
|
1399
|
+
for (const block of this.selectedLeaves(from, to, selection.anchor)) {
|
|
1400
|
+
const base = this.leafEndpoint(block, false, selection.anchor);
|
|
1401
|
+
if (projectRow?.(base)) continue;
|
|
1402
|
+
if (block.kind === "emptyContent") {
|
|
1403
|
+
paragraphEnds.push(base);
|
|
1404
|
+
continue;
|
|
1405
|
+
}
|
|
1406
|
+
const inlines = block.content;
|
|
1407
|
+
for (const [index, node] of inlines.entries()) {
|
|
1408
|
+
const range = selectedInline(node, index, block.kind === "paragraph" && from.kind === "paragraph" && block.id === from.paragraph.id ? from.point : void 0, block.kind === "paragraph" && to.kind === "paragraph" && block.id === to.paragraph.id ? to.point : void 0);
|
|
1409
|
+
if (range.from >= range.to) continue;
|
|
1410
|
+
if (node.kind === "text") spans.push({
|
|
1411
|
+
instanceKey: base.instanceKey,
|
|
1412
|
+
source: {
|
|
1413
|
+
kind: "modelText",
|
|
1414
|
+
nodeId: node.id,
|
|
1415
|
+
...range
|
|
1416
|
+
}
|
|
1417
|
+
});
|
|
1418
|
+
else nodes.push({
|
|
1419
|
+
instanceKey: base.instanceKey,
|
|
1420
|
+
nodeId: node.id
|
|
1421
|
+
});
|
|
1422
|
+
}
|
|
1423
|
+
if (to.kind !== "paragraph" || block.id !== to.paragraph.id) paragraphEnds.push(this.endpoint({
|
|
1424
|
+
paragraphId: block.id,
|
|
1425
|
+
index: block.content.length
|
|
1426
|
+
}, base));
|
|
1427
|
+
}
|
|
1428
|
+
return {
|
|
1429
|
+
spans,
|
|
1430
|
+
nodes,
|
|
1431
|
+
paragraphEnds
|
|
1432
|
+
};
|
|
1433
|
+
}
|
|
1434
|
+
/** 派生实际触达的段落范围与空集合;末端恰为下一段起点时不修改下一段。 */
|
|
1435
|
+
*formatTargets(selection) {
|
|
1436
|
+
const { from, to, collapsed } = this.ordered(selection);
|
|
1437
|
+
if (collapsed) {
|
|
1438
|
+
yield from.kind === "blockGap" ? from : {
|
|
1439
|
+
from: from.point,
|
|
1440
|
+
to: from.point
|
|
1441
|
+
};
|
|
1442
|
+
return;
|
|
1443
|
+
}
|
|
1444
|
+
for (const leaf of this.selectedLeaves(from, to, selection.anchor)) {
|
|
1445
|
+
if (leaf.kind === "emptyContent") {
|
|
1446
|
+
yield {
|
|
1447
|
+
kind: "blockGap",
|
|
1448
|
+
parentId: leaf.ownerId,
|
|
1449
|
+
index: 0
|
|
1450
|
+
};
|
|
1451
|
+
continue;
|
|
1452
|
+
}
|
|
1453
|
+
if (!collapsed && to.kind === "paragraph" && leaf.id === to.paragraph.id && leaf.id !== (from.kind === "paragraph" ? from.paragraph.id : void 0) && to.point.index === 0 && !to.point.offset) break;
|
|
1454
|
+
yield {
|
|
1455
|
+
from: from.kind === "paragraph" && leaf.id === from.paragraph.id ? from.point : {
|
|
1456
|
+
paragraphId: leaf.id,
|
|
1457
|
+
index: 0
|
|
1458
|
+
},
|
|
1459
|
+
to: to.kind === "paragraph" && leaf.id === to.paragraph.id ? to.point : {
|
|
1460
|
+
paragraphId: leaf.id,
|
|
1461
|
+
index: leaf.content.length
|
|
1462
|
+
}
|
|
1463
|
+
};
|
|
1464
|
+
}
|
|
1465
|
+
}
|
|
1466
|
+
/** 复制当前普通文字选区,段落之间保留换行,原子内容暂用对象占位符。 */
|
|
1467
|
+
text(selection) {
|
|
1468
|
+
const { from, to, collapsed } = this.ordered(selection);
|
|
1469
|
+
if (collapsed) return "";
|
|
1470
|
+
const parts = [];
|
|
1471
|
+
let previous;
|
|
1472
|
+
for (const block of this.selectedLeaves(from, to, selection.anchor)) {
|
|
1473
|
+
const id = block.kind === "paragraph" ? block.id : block.ownerId, content = [];
|
|
1474
|
+
const inlines = block.kind === "paragraph" ? block.content : [];
|
|
1475
|
+
for (const [index, node] of inlines.entries()) {
|
|
1476
|
+
const range = selectedInline(node, index, block.kind === "paragraph" && from.kind === "paragraph" && block.id === from.paragraph.id ? from.point : void 0, block.kind === "paragraph" && to.kind === "paragraph" && block.id === to.paragraph.id ? to.point : void 0);
|
|
1477
|
+
if (range.from < range.to) content.push(node.kind === "text" ? node.text.slice(range.from, range.to) : node.kind === "break" ? node.breakType === "page" ? "\f" : "\n" : "");
|
|
1478
|
+
}
|
|
1479
|
+
if (previous) {
|
|
1480
|
+
const a = this.model.query.getContext(previous).cellId, b = this.model.query.getContext(id).cellId;
|
|
1481
|
+
parts.push(a && b && a !== b && this.model.query.getLocation(a)?.parentId === this.model.query.getLocation(b)?.parentId ? " " : "\n");
|
|
1482
|
+
}
|
|
1483
|
+
parts.push(content.join(""));
|
|
1484
|
+
previous = id;
|
|
1485
|
+
}
|
|
1486
|
+
return parts.join("");
|
|
1487
|
+
}
|
|
1488
|
+
/** 同编辑域和内容根内允许跨物理容器,业务行上下文与重复页部件仍隔离。 */
|
|
1489
|
+
sameScope(a, b) {
|
|
1490
|
+
if (!sameDomain(a.domain, b.domain) || this.root(a).id !== this.root(b).id) return false;
|
|
1491
|
+
if (a.instanceKey === b.instanceKey) return true;
|
|
1492
|
+
if (!this.layout) return false;
|
|
1493
|
+
return this.instanceScope(a) === this.instanceScope(b);
|
|
1494
|
+
}
|
|
1495
|
+
/** 只按当前来源找展示,不让键盘进入合并从格或完全未展示的条件内容。 */
|
|
1496
|
+
isPresented(endpoint) {
|
|
1497
|
+
return !this.layout || !this.presentationCurrent || this.layout.findBySource({
|
|
1498
|
+
nodeId: positionSourceId(endpoint.position),
|
|
1499
|
+
instanceKey: endpoint.instanceKey
|
|
1500
|
+
}).length > 0;
|
|
1501
|
+
}
|
|
1502
|
+
/** 从近到远借用短实例父链,不拆不透明 key,不缓存完整路径。 */
|
|
1503
|
+
instanceAncestors(key) {
|
|
1504
|
+
const result = [];
|
|
1505
|
+
for (let current = this.layout?.getInstance(key); current; current = current.parentKey ? this.layout?.getInstance(current.parentKey) : void 0) result.push(current.key);
|
|
1506
|
+
return result;
|
|
1507
|
+
}
|
|
1508
|
+
/** 业务上下文用稳定身份比较,indexHint 不是行身份;普通正文以域为范围。 */
|
|
1509
|
+
instanceScope(endpoint) {
|
|
1510
|
+
const instance = this.layout?.getInstance(endpoint.instanceKey);
|
|
1511
|
+
if (!instance) return endpoint.instanceKey;
|
|
1512
|
+
const context = instance.dataContext;
|
|
1513
|
+
if (context) {
|
|
1514
|
+
const rows = [];
|
|
1515
|
+
for (let row = context; row; row = row.parent) rows.push([
|
|
1516
|
+
row.regionId,
|
|
1517
|
+
row.axis,
|
|
1518
|
+
row.templateRegionId,
|
|
1519
|
+
row.rowKey
|
|
1520
|
+
]);
|
|
1521
|
+
return JSON.stringify(rows);
|
|
1522
|
+
}
|
|
1523
|
+
for (const key of this.instanceAncestors(instance.key)) {
|
|
1524
|
+
const current = this.layout.getInstance(key);
|
|
1525
|
+
if (current.segment?.kind === "part" || current.segment?.kind === "overlay") return key;
|
|
1526
|
+
}
|
|
1527
|
+
return JSON.stringify(endpoint.domain);
|
|
1528
|
+
}
|
|
1529
|
+
/** 读取真实拥有根,字段附属内容不因展示在正文中而与其外部合并。 */
|
|
1530
|
+
root(endpoint) {
|
|
1531
|
+
return contentRoot(positionSourceId(endpoint.position), (id) => {
|
|
1532
|
+
const node = this.model.query.getEntity(id);
|
|
1533
|
+
if (!node) throw new TextFlowError("内容来源已不存在");
|
|
1534
|
+
return {
|
|
1535
|
+
node,
|
|
1536
|
+
parentId: this.model.query.getLocation(id)?.parentId
|
|
1537
|
+
};
|
|
1538
|
+
});
|
|
1539
|
+
}
|
|
1540
|
+
/** 比较真实段落或空集合的位置;仅跨容器时才读取从根到叶的少量数组下标。 */
|
|
1541
|
+
compareTargets(a, b) {
|
|
1542
|
+
if (a.kind === "paragraph" && b.kind === "paragraph" && a.parentId === b.parentId) return a.blockIndex - b.blockIndex || a.point.index - b.point.index || (a.point.offset ?? 0) - (b.point.offset ?? 0);
|
|
1543
|
+
if (a.kind === "blockGap" && b.kind === "blockGap" && a.parentId === b.parentId) return a.index - b.index;
|
|
1544
|
+
/** 当前同步查询的结构路径,离开命令立即释放。 */
|
|
1545
|
+
const path = (target) => {
|
|
1546
|
+
const result = target.kind === "blockGap" ? [target.index] : [target.point.offset ?? 0, target.point.index];
|
|
1547
|
+
const id = target.kind === "paragraph" ? target.paragraph.id : target.parentId;
|
|
1548
|
+
for (let at = this.model.query.getLocation(id); at?.parentId; at = this.model.query.getLocation(at.parentId)) if (at.index !== void 0) result.push(at.index);
|
|
1549
|
+
return result.reverse();
|
|
1550
|
+
};
|
|
1551
|
+
const left = path(a), right = path(b);
|
|
1552
|
+
for (let i = 0; i < Math.min(left.length, right.length); i++) if (left[i] !== right[i]) return left[i] - right[i];
|
|
1553
|
+
return left.length - right.length;
|
|
1554
|
+
}
|
|
1555
|
+
/** 只在范围投影或复制时顺序遍历;普通字素移动不展平整个文档。 */
|
|
1556
|
+
*selectedLeaves(from, to, base) {
|
|
1557
|
+
let inside = false;
|
|
1558
|
+
const fromId = from.kind === "paragraph" ? from.paragraph.id : from.parentId, toId = to.kind === "paragraph" ? to.paragraph.id : to.parentId;
|
|
1559
|
+
for (const leaf of contentLeaves(this.root(base))) {
|
|
1560
|
+
const id = leaf.kind === "paragraph" ? leaf.id : leaf.ownerId;
|
|
1561
|
+
if (id === fromId) inside = true;
|
|
1562
|
+
if (inside) yield leaf;
|
|
1563
|
+
if (id === toId) return;
|
|
1564
|
+
}
|
|
1565
|
+
}
|
|
1566
|
+
/** 按拥有者直接读取 blocks,只保留当前同步读取的数组引用。 */
|
|
1567
|
+
blocks(parentId) {
|
|
1568
|
+
const owner = this.model.query.getEntity(parentId);
|
|
1569
|
+
if (!owner || !("blocks" in owner)) throw new TextFlowError("文字流拥有者已不存在");
|
|
1570
|
+
return owner.blocks;
|
|
1571
|
+
}
|
|
1572
|
+
};
|
|
1573
|
+
/** 按当前行内下标切出源范围,非文字节点始终只占一个原子单位。 */
|
|
1574
|
+
function selectedInline(node, index, start, end) {
|
|
1575
|
+
const size = node.kind === "text" ? node.text.length : 1;
|
|
1576
|
+
return {
|
|
1577
|
+
from: start && index < start.index ? size : start && index === start.index ? start.offset ?? 0 : 0,
|
|
1578
|
+
to: end && index > end.index ? 0 : end && index === end.index ? end.offset ?? 0 : size
|
|
1579
|
+
};
|
|
1580
|
+
}
|
|
1581
|
+
// src/runtime/interaction/field-commands.ts
|
|
1582
|
+
/** @file 字段焦点到现有业务入口的分流,绝不把填写值写到 model 或复制数据协议。 */
|
|
1583
|
+
/** 被动查询允许正常退出已删除、隐藏或被替换的字段;写入入口继续使用严格解析。 */
|
|
1584
|
+
function readFieldTarget(form, snapshot, selection) {
|
|
1585
|
+
const instance = snapshot.query.getInstance(selection.instanceKey);
|
|
1586
|
+
if (!instance || !snapshot.query.findBySource({
|
|
1587
|
+
nodeId: selection.fieldId,
|
|
1588
|
+
instanceKey: selection.instanceKey
|
|
1589
|
+
}).length || !form.presentation.fields.valuePath(selection.fieldId, instance)) return void 0;
|
|
1590
|
+
const target = form.presentation.fields.target(selection.fieldId, instance);
|
|
1591
|
+
return (!target.state.active || !target.state.visible) && !target.state.pending ? void 0 : target;
|
|
1592
|
+
}
|
|
1593
|
+
/** 通过当前实例、可见来源和稳定行身份解析真实目标;过期行不能转写相同下标的新行。 */
|
|
1594
|
+
function resolveFieldTarget(form, snapshot, selection) {
|
|
1595
|
+
const instance = snapshot.query.getInstance(selection.instanceKey);
|
|
1596
|
+
if (!instance || !snapshot.query.findBySource({
|
|
1597
|
+
nodeId: selection.fieldId,
|
|
1598
|
+
instanceKey: selection.instanceKey
|
|
1599
|
+
}).length) throw new TextFlowError("字段展示发生已失效");
|
|
1600
|
+
const target = form.presentation.fields.target(selection.fieldId, instance);
|
|
1601
|
+
if ((!target.state.active || !target.state.visible) && !target.state.pending || !target.valuePath) throw new TextFlowError("字段当前不可见或业务行已失效");
|
|
1602
|
+
return target;
|
|
1603
|
+
}
|
|
1604
|
+
/** 普通值交给原字段编码器和业务写入处理,签章、上传和关联必须使用已有专门入口。 */
|
|
1605
|
+
function writeFieldValue(form, snapshot, selection, value) {
|
|
1606
|
+
const target = resolveFieldTarget(form, snapshot, selection);
|
|
1607
|
+
if (!target.state.editable) throw new TextFlowError("当前字段不可编辑或规则尚未准备");
|
|
1608
|
+
const behavior = fieldBehavior(target.declaration);
|
|
1609
|
+
if (!isFieldTextInput(behavior) && ![
|
|
1610
|
+
"checkbox",
|
|
1611
|
+
"choice",
|
|
1612
|
+
"date",
|
|
1613
|
+
"time",
|
|
1614
|
+
"date-time"
|
|
1615
|
+
].includes(behavior.widget)) throw new TextFlowError("此字段需要使用专门的选择、上传或认证业务入口");
|
|
1616
|
+
return form.services.fields.writeValue(selection.fieldId, target.valuePath, value);
|
|
1617
|
+
}
|
|
1618
|
+
/** 先解除所有回调再执行完成通知,允许重入或关闭。 */
|
|
1619
|
+
function finishFieldRefresh(slot, failed, error) {
|
|
1620
|
+
const success = slot.success, failure = slot.failure;
|
|
1621
|
+
slot.success = void 0;
|
|
1622
|
+
slot.failure = void 0;
|
|
1623
|
+
try {
|
|
1624
|
+
if (failed) failure?.(error);
|
|
1625
|
+
else success?.();
|
|
1626
|
+
} catch (cause) {
|
|
1627
|
+
if (!failed) try {
|
|
1628
|
+
failure?.(cause);
|
|
1629
|
+
} catch {}
|
|
1630
|
+
}
|
|
1631
|
+
}
|
|
1632
|
+
/** Promise 处理器在独立作用域仅捕获可撤销槽,不捕获借用服务或文档树。 */
|
|
1633
|
+
function fieldRefreshHandlers(slot) {
|
|
1634
|
+
return [() => finishFieldRefresh(slot, false), (error) => finishFieldRefresh(slot, true, error)];
|
|
1635
|
+
}
|
|
1636
|
+
/** 在暂时未就绪的业务规则稳定后补发一次焦点核对;不是轮询,也不自行重新排版。 */
|
|
1637
|
+
function afterFieldSettlement(form, success, failure) {
|
|
1638
|
+
const slot = {
|
|
1639
|
+
success,
|
|
1640
|
+
failure
|
|
1641
|
+
};
|
|
1642
|
+
form.services.whenSettled().then(...fieldRefreshHandlers(slot));
|
|
1643
|
+
return () => {
|
|
1644
|
+
slot.success = void 0;
|
|
1645
|
+
slot.failure = void 0;
|
|
1646
|
+
};
|
|
1647
|
+
}
|
|
1648
|
+
// src/runtime/interaction/field-value-guard.ts
|
|
1649
|
+
/** @file 原位字段控件共用的激活/配置/原值比较,不保存页面、绑定路径或第二份数据。 */
|
|
1650
|
+
/** 只比较当前字段相关状态,不因其他字段改变而错误撤销活动控件。 */
|
|
1651
|
+
function sameFieldValueGuard(current, expected) {
|
|
1652
|
+
return !!current && current.selection === expected.selection && current.modelRevision === expected.modelRevision && current.behaviorRevision === expected.behaviorRevision && current.widget === expected.widget && isEqual(current.value, expected.value);
|
|
1653
|
+
}
|
|
1654
|
+
// src/runtime/interaction/business/state.ts
|
|
1655
|
+
/** @file 只在同步边界借用字段与排版,返回当前面板需要的最小投影。 */
|
|
1656
|
+
/** 活动业务字段的读取不执行远程请求、默认值填充或重排。 */
|
|
1657
|
+
function readBusinessField(handle, options, selection) {
|
|
1658
|
+
const snapshot = options.layout.getSnapshot();
|
|
1659
|
+
if (!snapshot || !options.form || options.environment().mode !== "fill") return;
|
|
1660
|
+
const target = resolveFieldTarget(options.form, snapshot, selection), field = fieldBehavior(target.declaration), base = {
|
|
1661
|
+
selection,
|
|
1662
|
+
widget: field.widget,
|
|
1663
|
+
label: field.config?.label ?? target.declaration.binding.source.fieldLink,
|
|
1664
|
+
valuePath: target.valuePath,
|
|
1665
|
+
value: target.value,
|
|
1666
|
+
modelRevision: handle.getModelRevision(),
|
|
1667
|
+
behaviorRevision: field.revision ?? 0,
|
|
1668
|
+
editable: target.state.editable,
|
|
1669
|
+
pending: target.state.pending,
|
|
1670
|
+
invalid: false
|
|
1671
|
+
};
|
|
1672
|
+
if (field.widget === "date" || field.widget === "time" || field.widget === "date-time") return Object.freeze({
|
|
1673
|
+
...base,
|
|
1674
|
+
widget: field.widget,
|
|
1675
|
+
invalid: target.value != null && typeof target.value !== "string",
|
|
1676
|
+
text: typeof target.value === "string" ? target.value : "",
|
|
1677
|
+
precision: field.config?.timePrecision ?? "seconds"
|
|
1678
|
+
});
|
|
1679
|
+
if (isFieldTextInput(field)) return;
|
|
1680
|
+
if (referenceBehavior(field)) {
|
|
1681
|
+
let ids = [], invalid = false;
|
|
1682
|
+
try {
|
|
1683
|
+
ids = referenceValueIds(target.declaration, options.form.services.fields.referenceIdentity(selection.fieldId, base.valuePath));
|
|
1684
|
+
} catch {
|
|
1685
|
+
invalid = true;
|
|
1686
|
+
}
|
|
1687
|
+
const record = field.widget === "relation" || field.widget === "rdo-relation";
|
|
1688
|
+
const presentation = record ? options.form.services.fields.referencePresentation(selection.fieldId, base.valuePath) : void 0;
|
|
1689
|
+
return Object.freeze({
|
|
1690
|
+
...base,
|
|
1691
|
+
widget: field.widget,
|
|
1692
|
+
invalid,
|
|
1693
|
+
ids: Object.freeze(ids),
|
|
1694
|
+
multiple: referenceMultiple(target.declaration),
|
|
1695
|
+
...presentation,
|
|
1696
|
+
columns: Object.freeze([...presentation?.columns ?? []]),
|
|
1697
|
+
...options.form.services.fields.canEnterLot(selection.fieldId, base.valuePath) ? { canEnterLot: true } : {},
|
|
1698
|
+
canScan: record && !!field.config?.barcodeParsing?.ruleId && isReferenceScanField(target.declaration)
|
|
1699
|
+
});
|
|
1700
|
+
}
|
|
1701
|
+
if (field.widget === "image" || field.widget === "file") {
|
|
1702
|
+
let values = [], invalid = false;
|
|
1703
|
+
try {
|
|
1704
|
+
values = resourceValues(target.value);
|
|
1705
|
+
} catch {
|
|
1706
|
+
invalid = true;
|
|
1707
|
+
}
|
|
1708
|
+
const limits = resourceLimits(target.declaration);
|
|
1709
|
+
return Object.freeze({
|
|
1710
|
+
...base,
|
|
1711
|
+
widget: field.widget,
|
|
1712
|
+
invalid,
|
|
1713
|
+
values: Object.freeze(values),
|
|
1714
|
+
limits: Object.freeze({
|
|
1715
|
+
...limits,
|
|
1716
|
+
accept: Object.freeze([...limits.accept])
|
|
1717
|
+
})
|
|
1718
|
+
});
|
|
1719
|
+
}
|
|
1720
|
+
if (field.widget !== "seal") return;
|
|
1721
|
+
const current = options.layout.getCurrentSnapshot(), pages = current?.result.pages.map((page, index) => Object.freeze({
|
|
1722
|
+
pageId: page.id,
|
|
1723
|
+
sectionId: page.sectionId,
|
|
1724
|
+
sectionPageIndex: page.sectionPageIndex,
|
|
1725
|
+
number: index + 1
|
|
1726
|
+
})) ?? [];
|
|
1727
|
+
const saved = parseSealValue(target.value)?.sealPosition, kind = nativeSealValueKind(target.value);
|
|
1728
|
+
let position;
|
|
1729
|
+
if (isSealPosition(saved)) {
|
|
1730
|
+
const page = pages.find((page) => page.sectionId === saved.sheetId && page.sectionPageIndex === saved.pageIndex);
|
|
1731
|
+
if (page) position = Object.freeze({
|
|
1732
|
+
pageId: page.pageId,
|
|
1733
|
+
leftMm: saved.leftMm,
|
|
1734
|
+
topMm: saved.topMm
|
|
1735
|
+
});
|
|
1736
|
+
} else if (saved === void 0 && current) {
|
|
1737
|
+
const fragment = current.query.findBySource({
|
|
1738
|
+
nodeId: selection.fieldId,
|
|
1739
|
+
instanceKey: selection.instanceKey
|
|
1740
|
+
})[0];
|
|
1741
|
+
if (fragment) {
|
|
1742
|
+
let frame = fragment.frame;
|
|
1743
|
+
for (let id = current.query.getParentId(fragment.id); id; id = current.query.getParentId(id)) {
|
|
1744
|
+
const node = current.query.getFragment(id);
|
|
1745
|
+
if (node?.kind === "overlay") {
|
|
1746
|
+
frame = node.frame;
|
|
1747
|
+
break;
|
|
1748
|
+
}
|
|
1749
|
+
}
|
|
1750
|
+
const pageId = current.query.getFragmentPageId(fragment.id);
|
|
1751
|
+
position = Object.freeze({
|
|
1752
|
+
pageId,
|
|
1753
|
+
leftMm: layoutPxToMillimeters(frame.x),
|
|
1754
|
+
topMm: layoutPxToMillimeters(frame.y)
|
|
1755
|
+
});
|
|
1756
|
+
}
|
|
1757
|
+
}
|
|
1758
|
+
return Object.freeze({
|
|
1759
|
+
...base,
|
|
1760
|
+
widget: "seal",
|
|
1761
|
+
invalid: kind === "invalid",
|
|
1762
|
+
stamped: kind === "stamped",
|
|
1763
|
+
summary: nativeSealText(target.value),
|
|
1764
|
+
pages: Object.freeze(pages),
|
|
1765
|
+
position
|
|
1766
|
+
});
|
|
1767
|
+
}
|
|
1768
|
+
/** 业务行、旁存关联身份及上传限制也参加旧面板比较;布局几何另在印章动作时校验。 */
|
|
1769
|
+
function sameBusinessField(current, expected) {
|
|
1770
|
+
if (!current || !sameFieldValueGuard(current, expected) || current.valuePath !== expected.valuePath) return false;
|
|
1771
|
+
if ("ids" in current && "ids" in expected) return current.multiple === expected.multiple && isEqual(current.ids, expected.ids) && isEqual(current.columns, expected.columns) && current.showSelection === expected.showSelection && current.tree === expected.tree && current.searchable === expected.searchable && isEqual(current.filters, expected.filters);
|
|
1772
|
+
if ("limits" in current && "limits" in expected) return isEqual(current.limits, expected.limits);
|
|
1773
|
+
return true;
|
|
1774
|
+
}
|
|
1775
|
+
// src/runtime/form/fields/semantics/values.ts
|
|
1776
|
+
/** @file 字段默认值和本地选项的共享纯规则,不读取会话、行数据或具体业务服务。 */
|
|
1777
|
+
/** 保留选项的原始值,只有声明为多选的逗号文本才拆分。 */
|
|
1778
|
+
function choiceValues(value, multiple) {
|
|
1779
|
+
return Array.isArray(value) ? value : multiple && typeof value === "string" ? value.split(",") : [value];
|
|
1780
|
+
}
|
|
1781
|
+
/** 用于条件与校验的选中集合;null 不匹配文本 null,零和 false 保留。 */
|
|
1782
|
+
function choiceSelection(value, multiple) {
|
|
1783
|
+
if (value == null) return /* @__PURE__ */ new Set();
|
|
1784
|
+
return new Set(choiceValues(multiple && !Array.isArray(value) ? String(value) : value, multiple).filter((item) => item != null).map(String));
|
|
1785
|
+
}
|
|
1786
|
+
/** 真假别名为空白时显示默认名称,普通别名保持原文。 */
|
|
1787
|
+
function resolveBooleanOptionLabel(label, value) {
|
|
1788
|
+
return typeof label === "string" && label.trim() !== "" ? label : value ? "真" : "假";
|
|
1789
|
+
}
|
|
1790
|
+
/** 按本地时间和声明精度得到存储文字,调用方决定时钟与缓存生命周期。 */
|
|
1791
|
+
function systemDate(widget, precision, now) {
|
|
1792
|
+
if (widget === "date") return dayjs(now).format("YYYY-MM-DD");
|
|
1793
|
+
let date = dayjs(now).millisecond(0);
|
|
1794
|
+
if (precision === "hours") date = date.minute(0).second(0);
|
|
1795
|
+
else if (precision === "minutes") date = date.second(0);
|
|
1796
|
+
return date.format(widget === "time" ? "HH:mm:ss" : "YYYY-MM-DD HH:mm:ss");
|
|
1797
|
+
}
|
|
1798
|
+
/** 根据有效字段行为读取初值;null 表示未配置,日期求值不进入 model。 */
|
|
1799
|
+
function fieldBehaviorDefault(field, now) {
|
|
1800
|
+
if ([
|
|
1801
|
+
"user",
|
|
1802
|
+
"org",
|
|
1803
|
+
"file",
|
|
1804
|
+
"image"
|
|
1805
|
+
].includes(field.widget)) return field.initialValue;
|
|
1806
|
+
if (field.widget === "choice") {
|
|
1807
|
+
const selected = (field.config.defaultOptionIds ?? []).map((id) => field.config.options.find((option) => option.id === id)).filter((option) => option !== void 0);
|
|
1808
|
+
if (!selected.length) return void 0;
|
|
1809
|
+
return field.config.multiple ? encodeDataCollection(selected.map((option) => option.value), { encoding: "comma-text" }) : selected[0].value;
|
|
1810
|
+
}
|
|
1811
|
+
if ((field.widget === "date" || field.widget === "time" || field.widget === "date-time") && field.config?.defaultSystemValue) return systemDate(field.widget, field.config.timePrecision, now ?? /* @__PURE__ */ new Date());
|
|
1812
|
+
return field.config && "defaultValue" in field.config ? field.config.defaultValue ?? void 0 : void 0;
|
|
1813
|
+
}
|
|
1814
|
+
/** 只从真假和枚举的本地配置解析标签;远程名称由业务服务另行提供。 */
|
|
1815
|
+
function fieldBehaviorLabel(field, value) {
|
|
1816
|
+
if (isEmptyDataValue(value)) return void 0;
|
|
1817
|
+
if (field.widget === "checkbox") {
|
|
1818
|
+
const boolean = readDataBoolean(value);
|
|
1819
|
+
return boolean == null ? void 0 : resolveBooleanOptionLabel(boolean ? field.config?.trueLabel : field.config?.falseLabel, boolean);
|
|
1820
|
+
}
|
|
1821
|
+
if (field.widget !== "choice") return void 0;
|
|
1822
|
+
const labels = choiceValues(value, field.config.multiple === true).map((selected) => field.config.options.find((option) => String(option.value) === String(selected))?.label);
|
|
1823
|
+
return labels.some((label) => label !== void 0) ? labels.map((label) => label ?? "").join(",") : void 0;
|
|
1824
|
+
}
|
|
1825
|
+
// src/runtime/interaction/design/tables/regions/definitions.ts
|
|
1826
|
+
/** @file 业务区域界面名称,变体能力唯一读取原生模型定义,不保存活动文档。 */
|
|
1827
|
+
/** 九类原生区域的最小设计目录,来源和关系仍由原生 schema 校验。 */
|
|
1828
|
+
var designRegionTypes = Object.freeze([
|
|
1829
|
+
{
|
|
1830
|
+
type: "table-header",
|
|
1831
|
+
label: "普通表头",
|
|
1832
|
+
binding: false
|
|
1833
|
+
},
|
|
1834
|
+
{
|
|
1835
|
+
type: "sub-table-header",
|
|
1836
|
+
label: "业务表头",
|
|
1837
|
+
binding: false
|
|
1838
|
+
},
|
|
1839
|
+
{
|
|
1840
|
+
type: "bounded",
|
|
1841
|
+
label: "固定业务表",
|
|
1842
|
+
binding: true
|
|
1843
|
+
},
|
|
1844
|
+
{
|
|
1845
|
+
type: "bounded-item",
|
|
1846
|
+
label: "固定表模板项",
|
|
1847
|
+
binding: false
|
|
1848
|
+
},
|
|
1849
|
+
{
|
|
1850
|
+
type: "repeating",
|
|
1851
|
+
label: "动态业务表",
|
|
1852
|
+
binding: true
|
|
1853
|
+
},
|
|
1854
|
+
{
|
|
1855
|
+
type: "2d-table",
|
|
1856
|
+
label: "二维业务表",
|
|
1857
|
+
binding: true
|
|
1858
|
+
},
|
|
1859
|
+
{
|
|
1860
|
+
type: "check-table",
|
|
1861
|
+
label: "检验表",
|
|
1862
|
+
binding: true
|
|
1863
|
+
},
|
|
1864
|
+
{
|
|
1865
|
+
type: "material-consume-table",
|
|
1866
|
+
label: "物耗表",
|
|
1867
|
+
binding: true
|
|
1868
|
+
},
|
|
1869
|
+
{
|
|
1870
|
+
type: "data-group-2d",
|
|
1871
|
+
label: "二维数据组",
|
|
1872
|
+
binding: false
|
|
1873
|
+
}
|
|
1874
|
+
].map((item) => Object.freeze(item)));
|
|
1875
|
+
/** 业务名称单独属于设计界面,协议能力继续复用 Model 清单。 */
|
|
1876
|
+
var variantNames = {
|
|
1877
|
+
"edhr:warehouse-in": "入库明细表",
|
|
1878
|
+
"edhr:warehouse-inbound": "入库明细表",
|
|
1879
|
+
"edhr:warehouse-out": "出库明细表",
|
|
1880
|
+
"edhr:warehouse-outbound": "出库明细表",
|
|
1881
|
+
"edhr:warehouse-in-out": "出入库明细",
|
|
1882
|
+
"edhr:warehouse-allocate": "库存调拨表",
|
|
1883
|
+
"edhr:warehouse-inventory": "库存盘点表",
|
|
1884
|
+
"edhr:part-stocktake": "库存盘点表",
|
|
1885
|
+
"edhr:device-part-consume": "备件消耗表",
|
|
1886
|
+
"edhr:material-balance": "物料平衡表",
|
|
1887
|
+
"edhr:material-requisition": "产线收料表",
|
|
1888
|
+
"edhr:material-substitution": "物料替换表",
|
|
1889
|
+
"edhr:entrust-steril-batch-list": "生产批次灭菌表",
|
|
1890
|
+
"edhr:pretreatment-list": "产前表"
|
|
1891
|
+
};
|
|
1892
|
+
/** 当前支持的业务来源配置目录,不以目录加载代替真实平台接入。 */
|
|
1893
|
+
var designRegionVariants = Object.freeze([...repeatingTableVariants.map((item) => Object.freeze({
|
|
1894
|
+
...item,
|
|
1895
|
+
type: "repeating",
|
|
1896
|
+
label: variantNames[item.name] ?? item.name
|
|
1897
|
+
})), Object.freeze({
|
|
1898
|
+
name: "edhr:material-consume",
|
|
1899
|
+
label: "物料消耗表",
|
|
1900
|
+
type: "material-consume-table",
|
|
1901
|
+
barcode: true,
|
|
1902
|
+
inventory: false
|
|
1903
|
+
})]);
|
|
1904
|
+
// src/runtime/interaction/editing-policy.ts
|
|
1905
|
+
/** @file 文字范围删除与复制的声明保护,不把工具默认值扩成整份文档锁。 */
|
|
1906
|
+
/** 尊重字段/页组件明确声明的实例保护,不把工具默认值扩大为文档锁。 */
|
|
1907
|
+
function editingAllowed(model, nodeId, capability) {
|
|
1908
|
+
const node = model.query.getEntity(nodeId);
|
|
1909
|
+
if (!node) throw new TextFlowError("操作来源已不存在");
|
|
1910
|
+
if (!("kind" in node) || node.kind !== "field" && node.kind !== "pageWidget") return true;
|
|
1911
|
+
return node.policy?.[capability] !== false;
|
|
1912
|
+
}
|
|
1913
|
+
/** 拥有子树包括附属内容和合并从格,不沿绑定/部件引用扩大保护范围。 */
|
|
1914
|
+
function ownedEditingAllowed(model, rootId, capability) {
|
|
1915
|
+
if (!editingAllowed(model, rootId, capability)) return false;
|
|
1916
|
+
for (const node of model.query.findEntities({
|
|
1917
|
+
rootId,
|
|
1918
|
+
roles: ["field", "pageWidget"]
|
|
1919
|
+
})) if (!editingAllowed(model, node.id, capability)) return false;
|
|
1920
|
+
return true;
|
|
1921
|
+
}
|
|
1922
|
+
/** 按同一只读子树结果执行删除/复制等前置保护,不在事务后补救。 */
|
|
1923
|
+
function assertOwnedEditingAllowed(model, rootId, capability) {
|
|
1924
|
+
if (!ownedEditingAllowed(model, rootId, capability)) throw new TextFlowError(`所选内容不允许${capability === "removable" ? "删除" : capability === "copyable" ? "复制" : "移动"}`);
|
|
1925
|
+
}
|
|
1926
|
+
// src/runtime/interaction/design/fields/adaptive-image-cell.ts
|
|
1927
|
+
/** @file 自适应图片独占单元格,删除和替换整个单元格仍沿用普通命令。 */
|
|
1928
|
+
var adaptiveImageCellMessage = "该单元格为自适应图片字段,不可添加其他内容";
|
|
1929
|
+
function hasAdaptiveImageCell(model, nodeId) {
|
|
1930
|
+
const { query } = model;
|
|
1931
|
+
const cellId = query.getContext(nodeId).cellId;
|
|
1932
|
+
return query.getEntity(cellId ?? nodeId, "cell")?.blocks.some((block) => block.kind === "paragraph" && block.content.some((inline) => inline.kind === "field" && inline.widget === "image" && inline.config?.displayMode === "adaptive")) ?? false;
|
|
1933
|
+
}
|
|
1934
|
+
function assertAdaptiveImageCellWritable(model, nodeId) {
|
|
1935
|
+
if (hasAdaptiveImageCell(model, nodeId)) throw new TextFlowError(adaptiveImageCellMessage);
|
|
1936
|
+
}
|
|
1937
|
+
// src/runtime/interaction/text/selection-state.ts
|
|
1938
|
+
/** @file 选区只读化及 ChangeSet 映射,删除回退只保留少量身份。 */
|
|
1939
|
+
/** 复制少量端点属性并冻结,外部订阅者不能改写交互权威状态。 */
|
|
1940
|
+
function freezeSelection(anchor, focus = anchor, tableRows) {
|
|
1941
|
+
/** 单个端点只包含字符串、数值和枚举,不包含文档树。 */
|
|
1942
|
+
function freezeEndpoint(endpoint) {
|
|
1943
|
+
return Object.freeze({
|
|
1944
|
+
...endpoint,
|
|
1945
|
+
domain: Object.freeze({ ...endpoint.domain }),
|
|
1946
|
+
position: Object.freeze({ ...endpoint.position })
|
|
1947
|
+
});
|
|
1948
|
+
}
|
|
1949
|
+
return Object.freeze({
|
|
1950
|
+
kind: "text",
|
|
1951
|
+
anchor: freezeEndpoint(anchor),
|
|
1952
|
+
focus: freezeEndpoint(focus),
|
|
1953
|
+
...tableRows ? { tableRows } : {}
|
|
1954
|
+
});
|
|
1955
|
+
}
|
|
1956
|
+
/** 捕获当前选区所在流的位置,用于实体删除后的邻近回退。 */
|
|
1957
|
+
function selectionFallbacks(flow, selection) {
|
|
1958
|
+
return {
|
|
1959
|
+
anchor: flow.fallback(selection.anchor),
|
|
1960
|
+
focus: flow.fallback(selection.focus)
|
|
1961
|
+
};
|
|
1962
|
+
}
|
|
1963
|
+
/** 映射两端;组合目标严格失效,普通选区则允许在原流内回退。 */
|
|
1964
|
+
function mapSelection(flow, selection, change, fallbacks, strict = false) {
|
|
1965
|
+
/** 先使用原生文字映射,再处理集合间隙;验证新位置时不读取旧布局。 */
|
|
1966
|
+
function mapEndpoint(endpoint, fallback) {
|
|
1967
|
+
const recovery = fallback && {
|
|
1968
|
+
...fallback,
|
|
1969
|
+
blockIndex: mapGap(fallback.blockIndex, fallback.parentId, "blocks", change),
|
|
1970
|
+
inlineIndex: fallback.paragraphId && fallback.inlineIndex !== void 0 ? mapGap(fallback.inlineIndex, fallback.paragraphId, "content", change) : fallback.inlineIndex
|
|
1971
|
+
};
|
|
1972
|
+
let position = endpoint.position;
|
|
1973
|
+
if (position.kind === "text") {
|
|
1974
|
+
const mapped = mapTextPosition(position, change.positionMaps);
|
|
1975
|
+
if (!mapped) return strict ? void 0 : recovery ? flow.recover(recovery, endpoint) : void 0;
|
|
1976
|
+
position = {
|
|
1977
|
+
kind: "text",
|
|
1978
|
+
...mapped
|
|
1979
|
+
};
|
|
1980
|
+
} else if (position.kind === "paragraphBoundary" || position.kind === "blockBoundary") {
|
|
1981
|
+
const parentId = position.kind === "paragraphBoundary" ? position.paragraphId : position.parentId;
|
|
1982
|
+
const collection = position.kind === "paragraphBoundary" ? "content" : "blocks";
|
|
1983
|
+
const index = mapGap(position.index, parentId, collection, change);
|
|
1984
|
+
position = {
|
|
1985
|
+
...position,
|
|
1986
|
+
index
|
|
1987
|
+
};
|
|
1988
|
+
}
|
|
1989
|
+
try {
|
|
1990
|
+
return flow.canonical({
|
|
1991
|
+
...endpoint,
|
|
1992
|
+
position
|
|
1993
|
+
}, true);
|
|
1994
|
+
} catch {
|
|
1995
|
+
return !strict && recovery ? flow.recover(recovery, endpoint) : void 0;
|
|
1996
|
+
}
|
|
1997
|
+
}
|
|
1998
|
+
const anchor = mapEndpoint(selection.anchor, fallbacks?.anchor), focus = mapEndpoint(selection.focus, fallbacks?.focus);
|
|
1999
|
+
if (!anchor || !focus) return null;
|
|
2000
|
+
const next = freezeSelection(anchor, focus, selection.tableRows);
|
|
2001
|
+
try {
|
|
2002
|
+
flow.ordered(next);
|
|
2003
|
+
return next;
|
|
2004
|
+
} catch {
|
|
2005
|
+
return null;
|
|
2006
|
+
}
|
|
2007
|
+
}
|
|
2008
|
+
/** 按实际 splice 顺序映射间隙和删除回退下标,不复制任何操作载荷。 */
|
|
2009
|
+
function mapGap(initial, parentId, collection, change) {
|
|
2010
|
+
let index = initial;
|
|
2011
|
+
for (const operation of change.operations) if (operation.kind === "splice" && operation.parentId === parentId && operation.collection === collection) {
|
|
2012
|
+
const lengths = operation;
|
|
2013
|
+
const removed = lengths.remove.length, inserted = lengths.insert.length;
|
|
2014
|
+
if (index > operation.index + removed) index += inserted - removed;
|
|
2015
|
+
else if (index >= operation.index) index = operation.index + inserted;
|
|
2016
|
+
}
|
|
2017
|
+
return index;
|
|
2018
|
+
}
|
|
2019
|
+
// src/runtime/interaction/design/field-drop.ts
|
|
2020
|
+
/** @file 行内字段拖入:只解析当前画面,不选择正文、不创建预览节点。 */
|
|
2021
|
+
/** 只隔离本次拖动的组件配置;合法性由创建组件的 Model 工厂校验。 */
|
|
2022
|
+
function snapshotPageWidgetDragDefinition(definition) {
|
|
2023
|
+
const copied = copyInputData(definition);
|
|
2024
|
+
freezeData(copied);
|
|
2025
|
+
return copied;
|
|
2026
|
+
}
|
|
2027
|
+
/** 拖动开始时隔离声明,后续面板修改不改变本次意图;完整字段校验仍由原工厂提交。 */
|
|
2028
|
+
function snapshotFieldDragDefinition(definition) {
|
|
2029
|
+
const copied = copyInputData(definition);
|
|
2030
|
+
if (!copied || typeof copied !== "object" || String(copied.widget) === "seal") throw new TextFlowError("行内拖入不接受印章,印章需要独立浮层");
|
|
2031
|
+
freezeData(copied);
|
|
2032
|
+
return copied;
|
|
2033
|
+
}
|
|
2034
|
+
/** 在同版本、页内可编辑来源上派生轻量落点,拒绝字段值和禁止投放的拥有内容。 */
|
|
2035
|
+
function resolveFieldDrop(model, snapshot, request, allowAdaptiveImageCell = false) {
|
|
2036
|
+
if (!sameLayoutVersion(snapshot.result.version, request.version)) return;
|
|
2037
|
+
const page = snapshot.query.getPage(request.pageId);
|
|
2038
|
+
if (!page || !Number.isFinite(request.x) || !Number.isFinite(request.y) || request.x < 0 || request.y < 0 || request.x > page.width || request.y > page.height) return;
|
|
2039
|
+
const hit = snapshot.query.hitTest({
|
|
2040
|
+
...request,
|
|
2041
|
+
mode: "nearest"
|
|
2042
|
+
});
|
|
2043
|
+
if (!hit?.endpoint) return;
|
|
2044
|
+
try {
|
|
2045
|
+
const endpoint = new TextFlow(model, snapshot.query).canonical(hit.endpoint), position = endpoint.position;
|
|
2046
|
+
if (position.kind === "valueText") return;
|
|
2047
|
+
const id = position.kind === "blockBoundary" ? position.parentId : position.kind === "paragraphBoundary" ? position.paragraphId : position.kind === "nodeBoundary" ? model.query.getLocation(position.nodeId)?.parentId : position.nodeId;
|
|
2048
|
+
if (!id || !editingAllowed(model, id, "droppable") || !allowAdaptiveImageCell && hasAdaptiveImageCell(model, id)) return;
|
|
2049
|
+
for (const owner of model.query.getAncestors(id)) if (!editingAllowed(model, owner.id, "droppable")) return;
|
|
2050
|
+
const caret = snapshot.query.locatePosition(freezeSelection(endpoint).focus);
|
|
2051
|
+
if (!caret || caret.pageId !== request.pageId) return;
|
|
2052
|
+
return caret;
|
|
2053
|
+
} catch (error) {
|
|
2054
|
+
if (error instanceof TextFlowError) return;
|
|
2055
|
+
throw error;
|
|
2056
|
+
}
|
|
2057
|
+
}
|
|
2058
|
+
// src/runtime/interaction/design/fields/field-defaults.ts
|
|
2059
|
+
/** @file 设计器新建字段的初始声明;读取已有模板时不回填缺省属性。 */
|
|
2060
|
+
/** 内置设计字段默认必填,显式字段配置和业务场景约束优先。 */
|
|
2061
|
+
function designFieldDefaults(definition) {
|
|
2062
|
+
if (!commonFieldWidgets.some((widget) => widget === definition.widget) || definition.config?.required !== void 0) return definition;
|
|
2063
|
+
return {
|
|
2064
|
+
...definition,
|
|
2065
|
+
config: {
|
|
2066
|
+
...definition.config,
|
|
2067
|
+
required: true
|
|
2068
|
+
}
|
|
2069
|
+
};
|
|
2070
|
+
}
|
|
2071
|
+
// src/runtime/interaction/design/objects/selection.ts
|
|
2072
|
+
/** @file 单对象与浮层选择复用唯一文字选区,不另存对象焦点或文档缓存。 */
|
|
2073
|
+
/** 只接受完整单原子范围,拒绝夹带文字、多个对象或段落分隔。 */
|
|
2074
|
+
function selectedObject(model, layout, selection) {
|
|
2075
|
+
if (selection?.kind !== "text") return;
|
|
2076
|
+
const flow = new TextFlow(model, layout), range = flow.ordered(selection), { from, to } = range;
|
|
2077
|
+
if (range.collapsed || from.kind !== "paragraph" || to.kind !== "paragraph" || from.paragraph.id !== to.paragraph.id || from.point.offset || to.point.offset || to.point.index !== from.point.index + 1) return;
|
|
2078
|
+
const node = from.paragraph.content[from.point.index];
|
|
2079
|
+
if (!node || ![
|
|
2080
|
+
"field",
|
|
2081
|
+
"image",
|
|
2082
|
+
"pageWidget"
|
|
2083
|
+
].includes(node.kind)) return;
|
|
2084
|
+
const projection = flow.projection(selection), target = projection.nodes[0];
|
|
2085
|
+
if (!target || projection.nodes.length !== 1 || projection.spans.length || projection.paragraphEnds.length) return;
|
|
2086
|
+
return {
|
|
2087
|
+
node,
|
|
2088
|
+
instanceKey: target.instanceKey
|
|
2089
|
+
};
|
|
2090
|
+
}
|
|
2091
|
+
/** 从真实祖先链判定发生归属,不拆 key 或比较数组下标。 */
|
|
2092
|
+
function instanceInside(layout, key, ancestor) {
|
|
2093
|
+
for (let at = layout.getInstance(key); at; at = at.parentKey ? layout.getInstance(at.parentKey) : void 0) if (at.key === ancestor) return true;
|
|
2094
|
+
return false;
|
|
2095
|
+
}
|
|
2096
|
+
/** 验证可见发生后创建真实端点;空浮层也有原生空集合边界。 */
|
|
2097
|
+
function objectSelection(model, layout, target) {
|
|
2098
|
+
const node = model.query.getEntity(target.nodeId), instance = layout.getInstance(target.instanceKey);
|
|
2099
|
+
if (!node || !("kind" in node) || !instance) throw new TextFlowError("对象来源或发生已失效");
|
|
2100
|
+
const fragments = layout.findBySource(target).filter((f) => layout.getFragmentPageId(f.id) === target.pageId && layout.getVisibleFragmentFrame(f.id));
|
|
2101
|
+
if (node.kind === "overlay") {
|
|
2102
|
+
if (!fragments.some((f) => f.kind === "overlay") || instance.domain.kind !== "overlay" || instance.domain.nodeId !== node.id) throw new TextFlowError("浮层发生已失效");
|
|
2103
|
+
const leaf = contentBlockLeaves(node.id, node.blocks).next().value;
|
|
2104
|
+
if (!leaf) throw new TextFlowError("浮层没有有效的内容根");
|
|
2105
|
+
const first = leaf.kind === "paragraph" && leaf.content.length === 1 ? leaf.content[0] : void 0;
|
|
2106
|
+
const contained = (first?.kind === "field" && first.widget === "seal" ? first : void 0) ?? model.query.getFloatingPageWidget(node.id);
|
|
2107
|
+
if (contained) {
|
|
2108
|
+
const fragment = layout.findBySource({ nodeId: contained.id }).find((f) => layout.getFragmentPageId(f.id) === target.pageId && instanceInside(layout, f.instanceKey, target.instanceKey));
|
|
2109
|
+
if (fragment) return objectSelection(model, layout, {
|
|
2110
|
+
nodeId: contained.id,
|
|
2111
|
+
instanceKey: fragment.instanceKey,
|
|
2112
|
+
pageId: target.pageId
|
|
2113
|
+
});
|
|
2114
|
+
}
|
|
2115
|
+
const sourceId = leaf.kind === "emptyContent" ? leaf.ownerId : leaf.id;
|
|
2116
|
+
const fragment = layout.findBySource({ nodeId: sourceId }).find((f) => layout.getFragmentPageId(f.id) === target.pageId && instanceInside(layout, f.instanceKey, target.instanceKey));
|
|
2117
|
+
if (!fragment) throw new TextFlowError("浮层内容未展示");
|
|
2118
|
+
const endpoint = {
|
|
2119
|
+
domain: instance.domain,
|
|
2120
|
+
instanceKey: fragment.instanceKey,
|
|
2121
|
+
position: leaf.kind === "emptyContent" ? {
|
|
2122
|
+
kind: "blockBoundary",
|
|
2123
|
+
parentId: leaf.ownerId,
|
|
2124
|
+
index: 0
|
|
2125
|
+
} : {
|
|
2126
|
+
kind: "paragraphBoundary",
|
|
2127
|
+
paragraphId: leaf.id,
|
|
2128
|
+
index: 0
|
|
2129
|
+
}
|
|
2130
|
+
};
|
|
2131
|
+
return freezeSelection(new TextFlow(model, layout).canonical(endpoint));
|
|
2132
|
+
}
|
|
2133
|
+
if (![
|
|
2134
|
+
"field",
|
|
2135
|
+
"image",
|
|
2136
|
+
"pageWidget"
|
|
2137
|
+
].includes(node.kind) || !fragments.some((f) => f.kind === "atom" || f.kind === "text")) throw new TextFlowError("当前来源不是可见原子对象");
|
|
2138
|
+
const anchor = {
|
|
2139
|
+
domain: instance.domain,
|
|
2140
|
+
instanceKey: instance.key,
|
|
2141
|
+
position: {
|
|
2142
|
+
kind: "nodeBoundary",
|
|
2143
|
+
nodeId: node.id,
|
|
2144
|
+
side: "before"
|
|
2145
|
+
}
|
|
2146
|
+
};
|
|
2147
|
+
const selection = freezeSelection(anchor, {
|
|
2148
|
+
...anchor,
|
|
2149
|
+
position: {
|
|
2150
|
+
...anchor.position,
|
|
2151
|
+
side: "after"
|
|
2152
|
+
}
|
|
2153
|
+
});
|
|
2154
|
+
if (!selectedObject(model, layout, selection)) throw new TextFlowError("对象不属于当前编辑范围");
|
|
2155
|
+
return selection;
|
|
2156
|
+
}
|
|
2157
|
+
// src/runtime/interaction/design/objects/geometry.ts
|
|
2158
|
+
/** @file 当前对象的真实投影和原生策略,不把裁剪框或业务运行位置倒写模板。 */
|
|
2159
|
+
/** 只合并同页真实片段,不拼接跨页长字段。 */
|
|
2160
|
+
function union(rects) {
|
|
2161
|
+
let x = Infinity, y = Infinity, right = -Infinity, bottom = -Infinity;
|
|
2162
|
+
for (const r of rects) {
|
|
2163
|
+
x = Math.min(x, r.x);
|
|
2164
|
+
y = Math.min(y, r.y);
|
|
2165
|
+
right = Math.max(right, r.x + r.width);
|
|
2166
|
+
bottom = Math.max(bottom, r.y + r.height);
|
|
2167
|
+
}
|
|
2168
|
+
return {
|
|
2169
|
+
x,
|
|
2170
|
+
y,
|
|
2171
|
+
width: right - x,
|
|
2172
|
+
height: bottom - y
|
|
2173
|
+
};
|
|
2174
|
+
}
|
|
2175
|
+
/** 裁剪结果可显示选择,但不开放会改变源自然尺寸的把手。 */
|
|
2176
|
+
function complete(a, b) {
|
|
2177
|
+
return [
|
|
2178
|
+
"x",
|
|
2179
|
+
"y",
|
|
2180
|
+
"width",
|
|
2181
|
+
"height"
|
|
2182
|
+
].every((k) => Math.abs(a[k] - b[k]) < .001);
|
|
2183
|
+
}
|
|
2184
|
+
/** 实例锁和拥有子树保护同样适用于整个浮层移动/缩放。 */
|
|
2185
|
+
function allowed(context, id, capability) {
|
|
2186
|
+
const model = context.handle().readModel();
|
|
2187
|
+
if (!ownedEditingAllowed(model, id, capability)) return false;
|
|
2188
|
+
for (const node of model.query.findEntities({
|
|
2189
|
+
rootId: id,
|
|
2190
|
+
includeRoot: true,
|
|
2191
|
+
roles: ["field", "pageWidget"]
|
|
2192
|
+
})) if ("kind" in node && node.kind === "field" && node.config?.designLocked === true || !editingAllowed(model, node.id, capability)) return false;
|
|
2193
|
+
for (const owner of model.query.getAncestors(id)) if ("kind" in owner && owner.kind === "field" && owner.config?.designLocked === true || !editingAllowed(model, owner.id, capability)) return false;
|
|
2194
|
+
return true;
|
|
2195
|
+
}
|
|
2196
|
+
/** 每次从同一活动视图推导小快照,读取不会写默认值或保存模型树。 */
|
|
2197
|
+
function readObject(context, preferredPageId) {
|
|
2198
|
+
const snapshot = context?.layout(true), selection = context?.selection();
|
|
2199
|
+
if (!context || !snapshot || selection?.kind !== "text") return;
|
|
2200
|
+
const handle = context.handle(), model = handle.readModel(), query = snapshot.query, selected = selectedObject(model, query, selection), editable = context.editable();
|
|
2201
|
+
let target;
|
|
2202
|
+
const seal = selected?.node.kind === "field" && selected.node.widget === "seal";
|
|
2203
|
+
const overlayId = selection.focus.domain.kind === "overlay" ? selection.focus.domain.nodeId : void 0;
|
|
2204
|
+
const standalone = overlayId ? model.query.getFloatingPageWidget(overlayId) : void 0;
|
|
2205
|
+
if (selected && !seal && selected.node.id !== standalone?.id) {
|
|
2206
|
+
const all = query.findBySource({
|
|
2207
|
+
nodeId: selected.node.id,
|
|
2208
|
+
instanceKey: selected.instanceKey
|
|
2209
|
+
}).filter((f) => f.kind === "atom" || f.kind === "text");
|
|
2210
|
+
const preferred = preferredPageId ?? query.locatePosition(selection.anchor)?.pageId;
|
|
2211
|
+
const pageId = all.some((f) => query.getFragmentPageId(f.id) === preferred) ? preferred : all[0] && query.getFragmentPageId(all[0].id);
|
|
2212
|
+
if (!pageId) return;
|
|
2213
|
+
const fragments = all.filter((f) => query.getFragmentPageId(f.id) === pageId), visible = fragments.map((f) => query.getVisibleFragmentFrame(f.id)).filter((r) => !!r);
|
|
2214
|
+
if (!visible.length) return;
|
|
2215
|
+
const frame = union(fragments.map((f) => f.frame)), visibleFrame = union(visible), node = selected.node;
|
|
2216
|
+
const gesture = node.kind === "image" ? true : model.query.resolvePolicy(node.id);
|
|
2217
|
+
target = {
|
|
2218
|
+
kind: "inline",
|
|
2219
|
+
inlineRole: node.kind,
|
|
2220
|
+
nodeId: node.id,
|
|
2221
|
+
instanceKey: selected.instanceKey,
|
|
2222
|
+
pageId,
|
|
2223
|
+
frame,
|
|
2224
|
+
visibleFrame,
|
|
2225
|
+
movable: false,
|
|
2226
|
+
contentMovable: editable && allowed(context, node.id, "draggable") && (gesture === true || gesture.draggable === true),
|
|
2227
|
+
resizable: editable && allowed(context, node.id, "resizable") && (gesture === true || gesture.resizable === true) && all.length === fragments.length && fragments.length === visible.length && complete(frame, visibleFrame)
|
|
2228
|
+
};
|
|
2229
|
+
} else if (selection.focus.domain.kind === "overlay" && selection.anchor.domain.nodeId === selection.focus.domain.nodeId) {
|
|
2230
|
+
let instance = query.getInstance(selection.focus.instanceKey);
|
|
2231
|
+
while (instance && instance.segment?.kind !== "overlay") instance = instance.parentKey ? query.getInstance(instance.parentKey) : void 0;
|
|
2232
|
+
if (!instance || instance.segment?.nodeId !== selection.focus.domain.nodeId) return;
|
|
2233
|
+
const fragment = query.findBySource({
|
|
2234
|
+
nodeId: selection.focus.domain.nodeId,
|
|
2235
|
+
instanceKey: instance.key
|
|
2236
|
+
}).find((f) => f.kind === "overlay" && (!preferredPageId || query.getFragmentPageId(f.id) === preferredPageId));
|
|
2237
|
+
const visibleFrame = fragment && query.getVisibleFragmentFrame(fragment.id), pageId = fragment && query.getFragmentPageId(fragment.id);
|
|
2238
|
+
if (fragment?.kind !== "overlay" || !visibleFrame || !pageId) return;
|
|
2239
|
+
target = {
|
|
2240
|
+
kind: "overlay",
|
|
2241
|
+
nodeId: fragment.sourceNodeId,
|
|
2242
|
+
instanceKey: fragment.instanceKey,
|
|
2243
|
+
pageId,
|
|
2244
|
+
frame: fragment.frame,
|
|
2245
|
+
visibleFrame,
|
|
2246
|
+
movable: editable && fragment.positionAuthority === "template" && allowed(context, fragment.sourceNodeId, "draggable"),
|
|
2247
|
+
contentMovable: false,
|
|
2248
|
+
resizable: editable && fragment.sizeAuthority === "template" && !(standalone?.widget === "line" && (standalone.config?.rotationDeg ?? 0) % 180 !== 0) && allowed(context, fragment.sourceNodeId, "resizable") && complete(fragment.frame, visibleFrame)
|
|
2249
|
+
};
|
|
2250
|
+
}
|
|
2251
|
+
if (!target) return;
|
|
2252
|
+
const result = copyInputData({
|
|
2253
|
+
...target,
|
|
2254
|
+
selection,
|
|
2255
|
+
version: snapshot.result.version,
|
|
2256
|
+
sessionId: handle.sessionId,
|
|
2257
|
+
documentId: handle.documentId,
|
|
2258
|
+
modelRevision: handle.getModelRevision(),
|
|
2259
|
+
editable
|
|
2260
|
+
});
|
|
2261
|
+
freezeData(result);
|
|
2262
|
+
return result;
|
|
2263
|
+
}
|
|
2264
|
+
// src/runtime/interaction/design/objects/inline-relocation.ts
|
|
2265
|
+
/** @file 行内移动复用当前文字流和原生结构操作,预览不创建节点或历史。 */
|
|
2266
|
+
/** 来源和目标共享真实内容根/业务发生,不能靠相同模型 ID 跨业务行移动。 */
|
|
2267
|
+
function inlineDestination(context, selection, request) {
|
|
2268
|
+
const snapshot = context.layout(true), model = context.handle().readModel();
|
|
2269
|
+
if (!snapshot) throw new TextFlowError("请等待当前排版完成");
|
|
2270
|
+
const source = selectedObject(model, snapshot.query, selection), page = snapshot.query.getPage(request.pageId);
|
|
2271
|
+
if (!source || !ownedEditingAllowed(model, source.node.id, "draggable")) throw new TextFlowError("当前对象不允许移动");
|
|
2272
|
+
if (!page || !Number.isFinite(request.x) || !Number.isFinite(request.y) || request.x < 0 || request.y < 0 || request.x > page.width || request.y > page.height) throw new TextFlowError("请在当前纸张内选择插入位置");
|
|
2273
|
+
const flow = context.flow(), hit = snapshot.query.hitTest({
|
|
2274
|
+
...request,
|
|
2275
|
+
mode: "nearest"
|
|
2276
|
+
});
|
|
2277
|
+
if (!hit?.endpoint) throw new TextFlowError("没有可编辑的插入位置");
|
|
2278
|
+
const endpoint = flow.canonical(hit.endpoint), target = flow.resolve(endpoint), location = model.query.getLocation(source.node.id), caret = snapshot.query.locatePosition(endpoint);
|
|
2279
|
+
const root = (id) => contentRoot(id, (id) => {
|
|
2280
|
+
const node = model.query.getEntity(id);
|
|
2281
|
+
if (!node) throw new TextFlowError("来源已不存在");
|
|
2282
|
+
return {
|
|
2283
|
+
node,
|
|
2284
|
+
parentId: model.query.getLocation(id)?.parentId
|
|
2285
|
+
};
|
|
2286
|
+
}).id;
|
|
2287
|
+
const targetId = target.kind === "paragraph" ? target.paragraph.id : target.parentId;
|
|
2288
|
+
const shared = sameDomain(selection.anchor.domain, endpoint.domain) && ["part", "overlay"].includes(endpoint.domain.kind) && !snapshot.query.getInstance(selection.anchor.instanceKey)?.dataContext && !snapshot.query.getInstance(endpoint.instanceKey)?.dataContext && root(source.node.id) === root(targetId);
|
|
2289
|
+
if (!flow.sameScope(selection.anchor, endpoint) && !shared) throw new TextFlowError("不能跨编辑域或业务行移动对象");
|
|
2290
|
+
if (!caret || caret.pageId !== page.id || location?.collection !== "content" || !location.parentId || location.index === void 0) throw new TextFlowError("对象或插入位置已失效");
|
|
2291
|
+
for (let id = targetId; id; id = model.query.getLocation(id)?.parentId) {
|
|
2292
|
+
if (id === source.node.id || !editingAllowed(model, id, "droppable")) throw new TextFlowError("目标不允许接收此对象");
|
|
2293
|
+
const owner = model.query.getEntity(id);
|
|
2294
|
+
if (owner && "kind" in owner && owner.kind === "field" && owner.config?.designLocked === true) throw new TextFlowError("目标内容已锁定");
|
|
2295
|
+
}
|
|
2296
|
+
return {
|
|
2297
|
+
sourceId: source.node.id,
|
|
2298
|
+
sourceParent: location.parentId,
|
|
2299
|
+
sourceIndex: location.index,
|
|
2300
|
+
endpoint,
|
|
2301
|
+
target,
|
|
2302
|
+
caret
|
|
2303
|
+
};
|
|
2304
|
+
}
|
|
2305
|
+
/** 松手仅提交一笔结构事务,拆分目标文字、移动原节点、合并同样式文字均属于同一原生历史。 */
|
|
2306
|
+
function relocateInline(context, selection, request) {
|
|
2307
|
+
const plan = inlineDestination(context, selection, request), target = plan.target;
|
|
2308
|
+
if (target.kind === "paragraph" && target.paragraph.id === plan.sourceParent && !target.point.offset && [plan.sourceIndex, plan.sourceIndex + 1].includes(target.point.index)) return null;
|
|
2309
|
+
const splitNode = target.kind === "paragraph" && target.point.offset ? target.paragraph.content[target.point.index] : void 0;
|
|
2310
|
+
if (splitNode && splitNode.kind !== "text") throw new TextFlowError("目标文字偏移无效");
|
|
2311
|
+
return context.execute("移动行内对象", (editor) => {
|
|
2312
|
+
const paragraphId = target.kind === "paragraph" ? target.paragraph.id : editor.insertParagraph({
|
|
2313
|
+
parentId: target.parentId,
|
|
2314
|
+
collection: "blocks",
|
|
2315
|
+
index: target.index
|
|
2316
|
+
}).nodeId;
|
|
2317
|
+
let sourceIndex = plan.sourceIndex, index = target.kind === "paragraph" ? target.point.index : 0;
|
|
2318
|
+
if (splitNode && target.kind === "paragraph") {
|
|
2319
|
+
editor.splitText(splitNode.id, target.point.offset);
|
|
2320
|
+
index++;
|
|
2321
|
+
if (paragraphId === plan.sourceParent && sourceIndex > target.point.index) sourceIndex++;
|
|
2322
|
+
}
|
|
2323
|
+
editor.moveNodes({
|
|
2324
|
+
parentId: plan.sourceParent,
|
|
2325
|
+
collection: "content",
|
|
2326
|
+
index: sourceIndex,
|
|
2327
|
+
count: 1
|
|
2328
|
+
}, {
|
|
2329
|
+
parentId: paragraphId,
|
|
2330
|
+
collection: "content",
|
|
2331
|
+
index
|
|
2332
|
+
});
|
|
2333
|
+
editor.normalizeText(plan.sourceParent);
|
|
2334
|
+
if (paragraphId !== plan.sourceParent) editor.normalizeText(paragraphId);
|
|
2335
|
+
}, () => {
|
|
2336
|
+
const anchor = {
|
|
2337
|
+
domain: plan.endpoint.domain,
|
|
2338
|
+
instanceKey: plan.endpoint.instanceKey,
|
|
2339
|
+
position: {
|
|
2340
|
+
kind: "nodeBoundary",
|
|
2341
|
+
nodeId: plan.sourceId,
|
|
2342
|
+
side: "before"
|
|
2343
|
+
}
|
|
2344
|
+
};
|
|
2345
|
+
return freezeSelection(anchor, {
|
|
2346
|
+
...anchor,
|
|
2347
|
+
position: {
|
|
2348
|
+
...anchor.position,
|
|
2349
|
+
side: "after"
|
|
2350
|
+
}
|
|
2351
|
+
});
|
|
2352
|
+
});
|
|
2353
|
+
}
|
|
2354
|
+
// src/runtime/interaction/design/objects/EditorObjects.ts
|
|
2355
|
+
/** @file 原生对象和印章浮层设计命令,所有写入共享控制器事务、门禁与历史。 */
|
|
2356
|
+
/** 独立印章来源在拖动开始时隔离,不把声明写到系统拖板。 */
|
|
2357
|
+
function snapshotSealDefinition(input) {
|
|
2358
|
+
const result = copyInputData(input);
|
|
2359
|
+
if (!result || result.widget !== "seal") throw new TextFlowError("此入口只创建印章浮层");
|
|
2360
|
+
freezeData(result);
|
|
2361
|
+
return result;
|
|
2362
|
+
}
|
|
2363
|
+
/** 当前一次视图的对象领域,只拥有可清空的窄能力引用。 */
|
|
2364
|
+
var EditorObjects = class {
|
|
2365
|
+
/** 关闭后解除控制器、会话与布局借用。 */
|
|
2366
|
+
context;
|
|
2367
|
+
/** 安装不读取模型、不初始化对象或默认配置。 */
|
|
2368
|
+
constructor(context) {
|
|
2369
|
+
this.context = context;
|
|
2370
|
+
}
|
|
2371
|
+
/** 当前完整原子范围或浮层编辑域派生的隔离几何摘要。 */
|
|
2372
|
+
readCurrent(pageId) {
|
|
2373
|
+
return readObject(this.context, pageId);
|
|
2374
|
+
}
|
|
2375
|
+
/** 明确来源先复核可见发生,再安装唯一逻辑范围。 */
|
|
2376
|
+
select(target) {
|
|
2377
|
+
const context = this.requireContext(), snapshot = context.layout(true);
|
|
2378
|
+
if (!snapshot) throw new TextFlowError("请等待当前排版完成");
|
|
2379
|
+
const selection = objectSelection(context.handle().readModel(), snapshot.query, target);
|
|
2380
|
+
context.selectText(selection.anchor, selection.focus);
|
|
2381
|
+
}
|
|
2382
|
+
/** 在当前已绘制页面精确命中并选择可编辑对象。 */
|
|
2383
|
+
place(request) {
|
|
2384
|
+
if (!this.context?.editable()) return false;
|
|
2385
|
+
const target = this.hit(request, false);
|
|
2386
|
+
if (!target) return false;
|
|
2387
|
+
this.select(target);
|
|
2388
|
+
return true;
|
|
2389
|
+
}
|
|
2390
|
+
/** 引用模式沿用画布几何和浮层顺序,只读取属性对应的对象身份。 */
|
|
2391
|
+
inspect(request) {
|
|
2392
|
+
const target = this.hit(request, true);
|
|
2393
|
+
const context = this.context;
|
|
2394
|
+
const snapshot = context?.layout(true);
|
|
2395
|
+
if (!target || !context || !snapshot) return;
|
|
2396
|
+
const model = context.handle().readModel();
|
|
2397
|
+
try {
|
|
2398
|
+
const { focus } = objectSelection(model, snapshot.query, target);
|
|
2399
|
+
if (focus.position.kind === "nodeBoundary") return {
|
|
2400
|
+
...target,
|
|
2401
|
+
nodeId: focus.position.nodeId,
|
|
2402
|
+
instanceKey: focus.instanceKey
|
|
2403
|
+
};
|
|
2404
|
+
} catch (error) {
|
|
2405
|
+
if (!(error instanceof TextFlowError)) throw error;
|
|
2406
|
+
}
|
|
2407
|
+
}
|
|
2408
|
+
/** 编辑与引用共用裁剪后的可见范围,编辑时将行内组件边缘留给光标。 */
|
|
2409
|
+
hit(request, inspect) {
|
|
2410
|
+
const context = this.context;
|
|
2411
|
+
const snapshot = context?.layout(true);
|
|
2412
|
+
if (!context || !snapshot || !sameLayoutVersion(snapshot.result.version, request.version)) return;
|
|
2413
|
+
const page = snapshot.query.getPage(request.pageId);
|
|
2414
|
+
if (!page || !Number.isFinite(request.x) || !Number.isFinite(request.y)) return;
|
|
2415
|
+
const contains = (r) => request.x >= r.x && request.x <= r.x + r.width && request.y >= r.y && request.y <= r.y + r.height;
|
|
2416
|
+
const overlay = [...page.overlays].reverse().filter((f) => {
|
|
2417
|
+
const visible = snapshot.query.getVisibleFragmentFrame(f.id);
|
|
2418
|
+
return !!visible && contains(visible);
|
|
2419
|
+
}).sort((a, b) => b.zIndex - a.zIndex)[0];
|
|
2420
|
+
if (overlay) return {
|
|
2421
|
+
nodeId: overlay.sourceNodeId,
|
|
2422
|
+
instanceKey: overlay.instanceKey,
|
|
2423
|
+
pageId: page.id
|
|
2424
|
+
};
|
|
2425
|
+
const target = inspect ? request : context.scopePageArea(request);
|
|
2426
|
+
if (!target) return;
|
|
2427
|
+
const hit = snapshot.query.hitTest({
|
|
2428
|
+
...target,
|
|
2429
|
+
mode: "inside"
|
|
2430
|
+
}), fragment = hit?.fragment;
|
|
2431
|
+
const nodeId = fragment?.kind === "atom" && [
|
|
2432
|
+
"image",
|
|
2433
|
+
"field",
|
|
2434
|
+
"pageWidget"
|
|
2435
|
+
].includes(fragment.role) ? fragment.nodeId : fragment?.kind === "text" && fragment.source.kind === "displayText" ? fragment.source.ownerNodeId : void 0;
|
|
2436
|
+
if (!nodeId || fragment?.kind === "atom" && fragment.pageWidget?.kind === "line") {
|
|
2437
|
+
const line = snapshot.query.hitDesignLine(target);
|
|
2438
|
+
return line ? {
|
|
2439
|
+
nodeId: line.nodeId,
|
|
2440
|
+
instanceKey: line.instanceKey,
|
|
2441
|
+
pageId: page.id
|
|
2442
|
+
} : void 0;
|
|
2443
|
+
}
|
|
2444
|
+
if (!fragment) return;
|
|
2445
|
+
if (!inspect && fragment.kind === "atom" && hit.endpoint) {
|
|
2446
|
+
const boundaryX = positionX(fragment, hit.endpoint.position);
|
|
2447
|
+
if (boundaryX !== void 0 && Math.abs(request.x - (fragment.frame.x + boundaryX)) <= Math.min(5, fragment.frame.width / 4)) return;
|
|
2448
|
+
}
|
|
2449
|
+
return {
|
|
2450
|
+
nodeId,
|
|
2451
|
+
instanceKey: fragment.instanceKey,
|
|
2452
|
+
pageId: page.id
|
|
2453
|
+
};
|
|
2454
|
+
}
|
|
2455
|
+
/** 完整投影的缩放只在松手后写明确尺寸,裁剪/运行时尺寸及印章直径不冒充模板尺寸。 */
|
|
2456
|
+
resize(expected, input) {
|
|
2457
|
+
const { context, target } = this.requireTarget(expected), size = readFactoryOptions(input, [
|
|
2458
|
+
"width",
|
|
2459
|
+
"height",
|
|
2460
|
+
"dx",
|
|
2461
|
+
"dy"
|
|
2462
|
+
]);
|
|
2463
|
+
checkFactoryValue(size, object({
|
|
2464
|
+
width: positive,
|
|
2465
|
+
height: positive,
|
|
2466
|
+
dx: optional(number()),
|
|
2467
|
+
dy: optional(number())
|
|
2468
|
+
}));
|
|
2469
|
+
const dx = size.dx ?? 0, dy = size.dy ?? 0;
|
|
2470
|
+
if (!target.resizable || (dx !== 0 || dy !== 0) && !target.movable) throw new TextFlowError("当前对象不允许此缩放方式");
|
|
2471
|
+
if (size.width === target.frame.width && size.height === target.frame.height && dx === 0 && dy === 0) return null;
|
|
2472
|
+
const model = context.handle().readModel(), overlay = target.kind === "overlay" ? model.query.getEntity(target.nodeId, "overlay") : void 0;
|
|
2473
|
+
if (overlay) this.checkVisible(target, {
|
|
2474
|
+
x: target.frame.x + dx,
|
|
2475
|
+
y: target.frame.y + dy,
|
|
2476
|
+
width: size.width,
|
|
2477
|
+
height: size.height
|
|
2478
|
+
});
|
|
2479
|
+
const component = overlay && !overlay.preferredSizePx ? model.query.getFloatingPageWidget(overlay.id) : void 0;
|
|
2480
|
+
return context.execute("缩放对象", (editor) => {
|
|
2481
|
+
const preferredSizePx = {
|
|
2482
|
+
width: size.width,
|
|
2483
|
+
height: size.height
|
|
2484
|
+
};
|
|
2485
|
+
if (!overlay || component) editor.setProperty(component?.id ?? target.nodeId, "preferredSizePx", preferredSizePx);
|
|
2486
|
+
if (overlay && (!component || dx !== 0 || dy !== 0)) editor.nodes.updateOverlay(overlay.id, { set: {
|
|
2487
|
+
...!component ? { preferredSizePx } : {},
|
|
2488
|
+
...dx !== 0 || dy !== 0 ? { anchor: {
|
|
2489
|
+
...overlay.anchor,
|
|
2490
|
+
offsetPx: {
|
|
2491
|
+
x: overlay.anchor.offsetPx.x + dx,
|
|
2492
|
+
y: overlay.anchor.offsetPx.y + dy
|
|
2493
|
+
}
|
|
2494
|
+
} } : {}
|
|
2495
|
+
} });
|
|
2496
|
+
});
|
|
2497
|
+
}
|
|
2498
|
+
/** 浮层按原锚点增量移动,保留页面/内容区原点和每页重复语义。 */
|
|
2499
|
+
move(expected, dx, dy) {
|
|
2500
|
+
const { context, target } = this.requireTarget(expected);
|
|
2501
|
+
checkFactoryValue({
|
|
2502
|
+
dx,
|
|
2503
|
+
dy
|
|
2504
|
+
}, object({
|
|
2505
|
+
dx: number(),
|
|
2506
|
+
dy: number()
|
|
2507
|
+
}));
|
|
2508
|
+
if (!target.movable || target.kind !== "overlay") throw new TextFlowError("行内对象应按正文位置移动");
|
|
2509
|
+
if (dx === 0 && dy === 0) return null;
|
|
2510
|
+
const overlay = context.handle().readModel().query.getEntity(target.nodeId, "overlay");
|
|
2511
|
+
this.checkVisible(target, {
|
|
2512
|
+
...target.frame,
|
|
2513
|
+
x: target.frame.x + dx,
|
|
2514
|
+
y: target.frame.y + dy
|
|
2515
|
+
});
|
|
2516
|
+
return context.execute("移动浮层", (editor) => {
|
|
2517
|
+
editor.nodes.updateOverlay(overlay.id, { set: { anchor: {
|
|
2518
|
+
...overlay.anchor,
|
|
2519
|
+
offsetPx: {
|
|
2520
|
+
x: overlay.anchor.offsetPx.x + dx,
|
|
2521
|
+
y: overlay.anchor.offsetPx.y + dy
|
|
2522
|
+
}
|
|
2523
|
+
} } });
|
|
2524
|
+
});
|
|
2525
|
+
}
|
|
2526
|
+
/** 按目标纸张放置唯一源浮层,跨章节时拥有关系和锚点在同一事务中更新。 */
|
|
2527
|
+
relocate(expected, request, x = request.x, y = request.y) {
|
|
2528
|
+
const { context, target } = this.requireTarget(expected), page = this.requirePage(request).query.getPage(request.pageId);
|
|
2529
|
+
if (target.kind !== "overlay" || !target.movable) throw new TextFlowError("当前对象不允许按页面放置");
|
|
2530
|
+
checkFactoryValue({
|
|
2531
|
+
x,
|
|
2532
|
+
y
|
|
2533
|
+
}, object({
|
|
2534
|
+
x: number(),
|
|
2535
|
+
y: number()
|
|
2536
|
+
}));
|
|
2537
|
+
this.checkVisible({
|
|
2538
|
+
...target,
|
|
2539
|
+
pageId: page.id
|
|
2540
|
+
}, {
|
|
2541
|
+
...target.frame,
|
|
2542
|
+
x,
|
|
2543
|
+
y
|
|
2544
|
+
});
|
|
2545
|
+
const model = context.handle().readModel(), overlay = model.query.getEntity(target.nodeId, "overlay"), location = model.query.getLocation(overlay.id), section = model.query.getEntity(page.sectionId, "section");
|
|
2546
|
+
const origin = overlay.anchor.origin === "content" ? page.contentFrame : {
|
|
2547
|
+
x: 0,
|
|
2548
|
+
y: 0
|
|
2549
|
+
}, anchor = {
|
|
2550
|
+
origin: overlay.anchor.origin,
|
|
2551
|
+
target: overlay.anchor.target.kind === "everyPage" ? { kind: "everyPage" } : {
|
|
2552
|
+
kind: "sectionPage",
|
|
2553
|
+
pageNumber: page.sectionPageIndex + 1
|
|
2554
|
+
},
|
|
2555
|
+
offsetPx: {
|
|
2556
|
+
x: x - origin.x,
|
|
2557
|
+
y: y - origin.y
|
|
2558
|
+
}
|
|
2559
|
+
};
|
|
2560
|
+
return context.execute("放置浮层到目标页", (editor) => {
|
|
2561
|
+
if (location.parentId !== section.id) editor.moveNodes({
|
|
2562
|
+
parentId: location.parentId,
|
|
2563
|
+
collection: "overlays",
|
|
2564
|
+
index: location.index,
|
|
2565
|
+
count: 1
|
|
2566
|
+
}, {
|
|
2567
|
+
parentId: section.id,
|
|
2568
|
+
collection: "overlays",
|
|
2569
|
+
index: section.overlays.length
|
|
2570
|
+
});
|
|
2571
|
+
editor.nodes.updateOverlay(overlay.id, { set: { anchor } });
|
|
2572
|
+
}, () => null);
|
|
2573
|
+
}
|
|
2574
|
+
/** 行内拖动预览只返回实际插入光标,来源/版本或业务范围失效即隐藏。 */
|
|
2575
|
+
previewReorder(expected, request) {
|
|
2576
|
+
try {
|
|
2577
|
+
const { context, target } = this.requireTarget(expected);
|
|
2578
|
+
this.requirePage(request);
|
|
2579
|
+
if (!target.contentMovable) return;
|
|
2580
|
+
const { caret } = inlineDestination(context, target.selection, request);
|
|
2581
|
+
return {
|
|
2582
|
+
pageId: caret.pageId,
|
|
2583
|
+
frame: { ...caret.frame }
|
|
2584
|
+
};
|
|
2585
|
+
} catch (error) {
|
|
2586
|
+
if (error instanceof TextFlowError) return;
|
|
2587
|
+
throw error;
|
|
2588
|
+
}
|
|
2589
|
+
}
|
|
2590
|
+
/** 按同一编辑域的真实插入地址移动原节点,不生成副本或新 ID。 */
|
|
2591
|
+
reorder(expected, request) {
|
|
2592
|
+
const { context, target } = this.requireTarget(expected);
|
|
2593
|
+
this.requirePage(request);
|
|
2594
|
+
if (!target.contentMovable) throw new TextFlowError("当前对象不允许移动");
|
|
2595
|
+
return relocateInline(context, target.selection, request);
|
|
2596
|
+
}
|
|
2597
|
+
/** 在当前目标页新建单一印章浮层,字段配置和绑定仍由原生工厂校验。 */
|
|
2598
|
+
createSeal(request, definition) {
|
|
2599
|
+
const context = this.requireContext(), page = this.requirePage(request).query.getPage(request.pageId), copied = snapshotSealDefinition(definition);
|
|
2600
|
+
if (request.x < 0 || request.y < 0 || request.x > page.width || request.y > page.height) throw new TextFlowError("印章应拖到当前纸张内");
|
|
2601
|
+
let overlayId = "", fieldId = "";
|
|
2602
|
+
context.execute("添加印章浮层", (editor) => {
|
|
2603
|
+
overlayId = editor.nodes.insertOverlay(page.sectionId, { anchor: {
|
|
2604
|
+
origin: "page",
|
|
2605
|
+
target: {
|
|
2606
|
+
kind: "sectionPage",
|
|
2607
|
+
pageNumber: page.sectionPageIndex + 1
|
|
2608
|
+
},
|
|
2609
|
+
offsetPx: {
|
|
2610
|
+
x: request.x,
|
|
2611
|
+
y: request.y
|
|
2612
|
+
}
|
|
2613
|
+
} }).nodeId;
|
|
2614
|
+
const paragraphId = editor.insertParagraph({
|
|
2615
|
+
parentId: overlayId,
|
|
2616
|
+
collection: "blocks",
|
|
2617
|
+
index: 0
|
|
2618
|
+
}).nodeId;
|
|
2619
|
+
fieldId = editor.insertField(paragraphId, { index: 0 }, designFieldDefaults(copied)).nodeId;
|
|
2620
|
+
}, () => null);
|
|
2621
|
+
return Object.freeze({
|
|
2622
|
+
overlayId,
|
|
2623
|
+
fieldId,
|
|
2624
|
+
modelRevision: context.handle().getModelRevision()
|
|
2625
|
+
});
|
|
2626
|
+
}
|
|
2627
|
+
/** 在纸张坐标新建一个组件浮层,在同一节的各页复用此来源。 */
|
|
2628
|
+
createFloatingPageWidget(request, definition) {
|
|
2629
|
+
const context = this.requireContext(), page = this.requirePage(request).query.getPage(request.pageId);
|
|
2630
|
+
if (request.x < 0 || request.y < 0 || request.x >= page.width || request.y >= page.height) throw new TextFlowError("请将浮动组件放在纸张内");
|
|
2631
|
+
if (definition.widget !== "line" && definition.widget !== "pagination") throw new TextFlowError("此入口只支持浮动页码和线条");
|
|
2632
|
+
const options = copyInputData(definition);
|
|
2633
|
+
const preferredSizePx = options.preferredSizePx ?? (options.widget === "line" ? {
|
|
2634
|
+
width: 75,
|
|
2635
|
+
height: 30
|
|
2636
|
+
} : {
|
|
2637
|
+
width: 120,
|
|
2638
|
+
height: 28
|
|
2639
|
+
});
|
|
2640
|
+
let overlayId = "";
|
|
2641
|
+
context.execute("添加浮动组件", (editor) => {
|
|
2642
|
+
overlayId = editor.nodes.insertOverlay(page.sectionId, { anchor: {
|
|
2643
|
+
origin: "page",
|
|
2644
|
+
target: { kind: "everyPage" },
|
|
2645
|
+
offsetPx: {
|
|
2646
|
+
x: request.x,
|
|
2647
|
+
y: request.y
|
|
2648
|
+
}
|
|
2649
|
+
} }).nodeId;
|
|
2650
|
+
const paragraphId = editor.insertParagraph({
|
|
2651
|
+
parentId: overlayId,
|
|
2652
|
+
collection: "blocks",
|
|
2653
|
+
index: 0
|
|
2654
|
+
}, { paragraphStyle: {
|
|
2655
|
+
alignment: "left",
|
|
2656
|
+
spaceBeforePx: 0,
|
|
2657
|
+
spaceAfterPx: 0,
|
|
2658
|
+
indentPx: {
|
|
2659
|
+
left: 0,
|
|
2660
|
+
right: 0,
|
|
2661
|
+
firstLine: 0,
|
|
2662
|
+
hanging: 0
|
|
2663
|
+
},
|
|
2664
|
+
lineHeight: {
|
|
2665
|
+
kind: "multiple",
|
|
2666
|
+
value: 1
|
|
2667
|
+
}
|
|
2668
|
+
} }).nodeId;
|
|
2669
|
+
editor.nodes.insertPageWidget({
|
|
2670
|
+
paragraphId,
|
|
2671
|
+
index: 0
|
|
2672
|
+
}, {
|
|
2673
|
+
...options,
|
|
2674
|
+
preferredSizePx
|
|
2675
|
+
});
|
|
2676
|
+
}, () => null);
|
|
2677
|
+
return Object.freeze({
|
|
2678
|
+
overlayId,
|
|
2679
|
+
modelRevision: context.handle().getModelRevision()
|
|
2680
|
+
});
|
|
2681
|
+
}
|
|
2682
|
+
/** 删除单独选中的浮动组件时连同所属浮层删除,避免留下遮挡纸面的空框。 */
|
|
2683
|
+
removeSelectedFloatingPageWidget() {
|
|
2684
|
+
const context = this.context, selection = context?.selection();
|
|
2685
|
+
if (!context?.editable() || selection?.kind !== "text" || selection.focus.domain.kind !== "overlay") return false;
|
|
2686
|
+
const widget = context.handle().readModel().query.getFloatingPageWidget(selection.focus.domain.nodeId);
|
|
2687
|
+
const a = selection.anchor.position;
|
|
2688
|
+
const b = selection.focus.position;
|
|
2689
|
+
if (!widget || a.kind !== "nodeBoundary" || b.kind !== "nodeBoundary" || a.nodeId !== widget.id || b.nodeId !== widget.id || a.side === b.side) return false;
|
|
2690
|
+
this.removeObject(context, selection.focus.domain.nodeId);
|
|
2691
|
+
return true;
|
|
2692
|
+
}
|
|
2693
|
+
/** 删除明确选中的源对象,尊重整个拥有子树保护并保留原生撤销。 */
|
|
2694
|
+
remove(expected) {
|
|
2695
|
+
const { context, target } = this.requireTarget(expected);
|
|
2696
|
+
return this.removeObject(context, target.nodeId);
|
|
2697
|
+
}
|
|
2698
|
+
/** 使用同一所有权校验删除完整源对象及其内容。 */
|
|
2699
|
+
removeObject(context, nodeId) {
|
|
2700
|
+
assertOwnedEditingAllowed(context.handle().readModel(), nodeId, "removable");
|
|
2701
|
+
return context.execute("删除对象", (editor) => {
|
|
2702
|
+
editor.nodes.removeNode(nodeId);
|
|
2703
|
+
}, () => null);
|
|
2704
|
+
}
|
|
2705
|
+
/** 关闭后旧 API 不继续保留会话、模型或布局。 */
|
|
2706
|
+
dispose() {
|
|
2707
|
+
this.context = void 0;
|
|
2708
|
+
}
|
|
2709
|
+
/** 写入都复核打开身份、完整版本、唯一选择和实时策略,不能静默改成新目标。 */
|
|
2710
|
+
requireTarget(expected) {
|
|
2711
|
+
const context = this.requireContext(), target = readObject(context, expected.pageId);
|
|
2712
|
+
if (!target || target.sessionId !== expected.sessionId || target.documentId !== expected.documentId || target.modelRevision !== expected.modelRevision || target.kind !== expected.kind || target.nodeId !== expected.nodeId || target.instanceKey !== expected.instanceKey || target.pageId !== expected.pageId || !sameLayoutVersion(target.version, expected.version) || !isEqual(target.selection, expected.selection)) throw new TextFlowError("对象、选区或布局已变化,请重新开始操作");
|
|
2713
|
+
return {
|
|
2714
|
+
context,
|
|
2715
|
+
target
|
|
2716
|
+
};
|
|
2717
|
+
}
|
|
2718
|
+
/** 页面命中只接受当前画面版本和有限坐标,不为旧事件抢跑排版。 */
|
|
2719
|
+
requirePage(request) {
|
|
2720
|
+
const snapshot = this.requireContext().layout(true);
|
|
2721
|
+
if (!snapshot || !sameLayoutVersion(snapshot.result.version, request.version) || !snapshot.query.getPage(request.pageId) || !Number.isFinite(request.x) || !Number.isFinite(request.y)) throw new TextFlowError("目标页面或布局已失效");
|
|
2722
|
+
return snapshot;
|
|
2723
|
+
}
|
|
2724
|
+
/** 浮层可部分出纸,但必须在目标页保留可见内容。 */
|
|
2725
|
+
checkVisible(target, frame) {
|
|
2726
|
+
const page = this.context?.layout(true)?.query.getPage(target.pageId);
|
|
2727
|
+
if (!page || frame.x >= page.width || frame.y >= page.height || frame.x + frame.width <= 0 || frame.y + frame.height <= 0) throw new TextFlowError("对象需要在目标纸张内保留可见部分");
|
|
2728
|
+
}
|
|
2729
|
+
/** 模式、权限、输入法和关闭使用控制器现有统一门禁。 */
|
|
2730
|
+
requireContext() {
|
|
2731
|
+
const context = this.context;
|
|
2732
|
+
if (!context?.editable()) throw new TextFlowError("当前状态不允许修改对象设计");
|
|
2733
|
+
return context;
|
|
2734
|
+
}
|
|
2735
|
+
};
|
|
2736
|
+
// src/runtime/interaction/field-choice.ts
|
|
2737
|
+
/** @file 下拉与画布选项共用同步查询及受控选择;选项 ID、业务原值、标签和后端存储协议分别处理。 */
|
|
2738
|
+
/** 下拉只读取对应形态,不重新解释选项或存储值。 */
|
|
2739
|
+
function readFieldChoiceInput(handle, options, selection) {
|
|
2740
|
+
const state = readFieldOptionsInput(handle, options, selection);
|
|
2741
|
+
return state?.renderAs === "select" ? state : void 0;
|
|
2742
|
+
}
|
|
2743
|
+
/** 画布只读取直接选项形态,单选/多选始终来自当前业务声明。 */
|
|
2744
|
+
function readFieldOptionInput(handle, options, selection) {
|
|
2745
|
+
const state = readFieldOptionsInput(handle, options, selection);
|
|
2746
|
+
return state && state.renderAs !== "select" ? state : void 0;
|
|
2747
|
+
}
|
|
2748
|
+
/** 只接受值语义支持的选择原值,禁止控件状态持有任意对象或业务行。 */
|
|
2749
|
+
function choiceValue(value) {
|
|
2750
|
+
const scalar = (item) => item == null || typeof item === "string" || typeof item === "boolean" || typeof item === "number" && Number.isFinite(item);
|
|
2751
|
+
if (scalar(value)) return value;
|
|
2752
|
+
if (Array.isArray(value) && value.every(scalar)) return Object.freeze([...value]);
|
|
2753
|
+
throw new TextFlowError("选择字段当前不是有效的选择值");
|
|
2754
|
+
}
|
|
2755
|
+
/** 借用已发布的字段发生身份读取当前业务配置,不触发排版、加载选项或写入默认值。 */
|
|
2756
|
+
function readFieldOptionsInput(handle, options, selection) {
|
|
2757
|
+
const snapshot = options.layout.getSnapshot();
|
|
2758
|
+
if (!snapshot || !options.form || options.environment().mode !== "fill") return void 0;
|
|
2759
|
+
const target = resolveFieldTarget(options.form, snapshot, selection), field = fieldBehavior(target.declaration);
|
|
2760
|
+
if (field.widget !== "choice" && field.widget !== "checkbox") return void 0;
|
|
2761
|
+
const renderAs = field.config?.presentation?.renderAs ?? (field.widget === "checkbox" ? "radio" : "select");
|
|
2762
|
+
const multiple = field.widget === "choice" && field.config.multiple === true, value = choiceValue(target.value), selected = choiceSelection(value, multiple);
|
|
2763
|
+
const choices = field.widget === "choice" ? field.config.options.map((option) => Object.freeze({
|
|
2764
|
+
id: option.id,
|
|
2765
|
+
label: option.label,
|
|
2766
|
+
value: option.value,
|
|
2767
|
+
visible: option.display !== false,
|
|
2768
|
+
selected: selected.has(String(option.value))
|
|
2769
|
+
})) : [true, false].map((value) => Object.freeze({
|
|
2770
|
+
id: String(value),
|
|
2771
|
+
label: resolveBooleanOptionLabel(value ? field.config?.trueLabel : field.config?.falseLabel, value),
|
|
2772
|
+
value,
|
|
2773
|
+
visible: field.config?.showMode !== (value ? "onlyFalse" : "onlyTrue"),
|
|
2774
|
+
selected: selected.has(String(value))
|
|
2775
|
+
}));
|
|
2776
|
+
const known = new Set(choices.map((option) => String(option.value)));
|
|
2777
|
+
return Object.freeze({
|
|
2778
|
+
selection,
|
|
2779
|
+
modelRevision: handle.getModelRevision(),
|
|
2780
|
+
behaviorRevision: field.revision ?? 0,
|
|
2781
|
+
widget: field.widget,
|
|
2782
|
+
renderAs,
|
|
2783
|
+
value,
|
|
2784
|
+
multiple,
|
|
2785
|
+
options: Object.freeze(choices),
|
|
2786
|
+
unmatched: [...selected].some((value) => !known.has(value)),
|
|
2787
|
+
editable: target.state.editable,
|
|
2788
|
+
pending: target.state.pending
|
|
2789
|
+
});
|
|
2790
|
+
}
|
|
2791
|
+
/** 同一焦点/原值之外,还核对实际选项,业务配置不递增版本时也不能提交旧列表。 */
|
|
2792
|
+
function sameFieldChoiceInput(current, expected) {
|
|
2793
|
+
return !!current && sameFieldValueGuard(current, expected) && current.renderAs === expected.renderAs && current.multiple === expected.multiple && isEqual(current.options, expected.options);
|
|
2794
|
+
}
|
|
2795
|
+
/** 只接受当前合法选项 ID;清空和编码均交给已有业务写入 API,不拼接逗号或标签。 */
|
|
2796
|
+
function writeGuardedFieldChoice(handle, options, selection, expected, selectedIds, write) {
|
|
2797
|
+
if (selection !== expected.selection) throw new TextFlowError("选择字段焦点已改变");
|
|
2798
|
+
const current = readFieldOptionsInput(handle, options, expected.selection);
|
|
2799
|
+
if (!current || !sameFieldChoiceInput(current, expected)) throw new TextFlowError("字段配置或外部值已改变,旧选择已取消");
|
|
2800
|
+
if (!current.editable || current.pending) throw new TextFlowError("当前字段不可编辑或规则尚未准备");
|
|
2801
|
+
if (new Set(selectedIds).size !== selectedIds.length || !current.multiple && selectedIds.length > 1) throw new TextFlowError("选择项数量或身份无效");
|
|
2802
|
+
if (current.multiple && current.unmatched && selectedIds.length) throw new TextFlowError("当前值包含失效选项,请先清空后重新选择");
|
|
2803
|
+
const selected = selectedIds.map((id) => current.options.find((option) => option.id === id));
|
|
2804
|
+
if (selected.some((option) => !option || !option.visible && !option.selected)) throw new TextFlowError("选项已失效或当前不可选");
|
|
2805
|
+
const values = selected.map((option) => option.value);
|
|
2806
|
+
return write(current.multiple ? values : values[0] ?? null);
|
|
2807
|
+
}
|
|
2808
|
+
/** 同一套基值比较同时保护下拉和画布勾选,不另建选项协议。 */
|
|
2809
|
+
var sameFieldOptionInput = sameFieldChoiceInput;
|
|
2810
|
+
/** 按旧交互翻转选项;多选保留已选隐藏项,单选再次点击明确清空。 */
|
|
2811
|
+
function toggledFieldOptionIds(expected, id) {
|
|
2812
|
+
if (expected.multiple && expected.unmatched) throw new TextFlowError("当前值包含失效选项,请先明确清空后重新选择");
|
|
2813
|
+
const option = expected.options.find((item) => item.id === id);
|
|
2814
|
+
if (!option?.visible) throw new TextFlowError("当前选项不可选");
|
|
2815
|
+
return expected.multiple ? expected.options.filter((item) => item.id === id ? !item.selected : item.selected).map((item) => item.id) : option.selected ? [] : [id];
|
|
2816
|
+
}
|
|
2817
|
+
// src/runtime/interaction/field-signature.ts
|
|
2818
|
+
/** @file 签名交互只投影当前记录并复核目标;认证、互斥和回填由原签名服务负责。 */
|
|
2819
|
+
/** 从稳定发生解析当前签名,不加载素材、不认证、不改变原值或排版。 */
|
|
2820
|
+
function readFieldSignatureInput(handle, options, selection) {
|
|
2821
|
+
const snapshot = options.layout.getSnapshot();
|
|
2822
|
+
if (!snapshot || !options.form || options.environment().mode !== "fill") return void 0;
|
|
2823
|
+
const target = resolveFieldTarget(options.form, snapshot, selection), field = fieldBehavior(target.declaration);
|
|
2824
|
+
if (field.widget !== "signature") return void 0;
|
|
2825
|
+
let invalid = false, records = [];
|
|
2826
|
+
try {
|
|
2827
|
+
records = signatureValues(target.value).map((record, index) => Object.freeze({
|
|
2828
|
+
index,
|
|
2829
|
+
username: record.username || "已保存签名",
|
|
2830
|
+
time: record.time,
|
|
2831
|
+
...record.url ? { imageUrl: options.form.services.fields.signatureUrl(selection.fieldId, target.valuePath, record.url) } : {}
|
|
2832
|
+
}));
|
|
2833
|
+
} catch {
|
|
2834
|
+
invalid = true;
|
|
2835
|
+
}
|
|
2836
|
+
return Object.freeze({
|
|
2837
|
+
selection,
|
|
2838
|
+
widget: "signature",
|
|
2839
|
+
inlineAuthorization: options.form.services.fields.signatureAcceptsCredentials(),
|
|
2840
|
+
value: target.value,
|
|
2841
|
+
modelRevision: handle.getModelRevision(),
|
|
2842
|
+
behaviorRevision: field.revision ?? 0,
|
|
2843
|
+
valuePath: target.valuePath,
|
|
2844
|
+
multiple: field.config?.multiple === true,
|
|
2845
|
+
records: Object.freeze(records),
|
|
2846
|
+
invalid,
|
|
2847
|
+
editable: target.state.editable,
|
|
2848
|
+
pending: target.state.pending
|
|
2849
|
+
});
|
|
2850
|
+
}
|
|
2851
|
+
/** 目标路径、配置及原值必须仍属于同一次激活,不能将旧删除下标用于新记录。 */
|
|
2852
|
+
function sameFieldSignatureInput(current, expected) {
|
|
2853
|
+
return !!current && sameFieldValueGuard(current, expected) && current.valuePath === expected.valuePath && current.multiple === expected.multiple;
|
|
2854
|
+
}
|
|
2855
|
+
/** 每次认证、确认和删除前重新核对实际发生与权限,普通字段写入不能代替此入口。 */
|
|
2856
|
+
function assertFieldSignatureInput(handle, options, selection, expected) {
|
|
2857
|
+
if (selection !== expected.selection) throw new TextFlowError("签名焦点已改变");
|
|
2858
|
+
const current = readFieldSignatureInput(handle, options, expected.selection);
|
|
2859
|
+
if (!current || !sameFieldSignatureInput(current, expected)) throw new TextFlowError("签名配置或外部值已改变");
|
|
2860
|
+
if (!current.editable || current.pending || current.invalid) throw new TextFlowError("当前签名不可编辑、规则尚未准备或原值无效");
|
|
2861
|
+
}
|
|
2862
|
+
// src/runtime/form/fields/semantics/numbers.ts
|
|
2863
|
+
/** @file 数值输入、展示和校验共用十进制规则,不读写仓库或依赖浏览器。 */
|
|
2864
|
+
/** 只保存规则及错误说明,不携带填写值。 */
|
|
2865
|
+
var FieldNumberError = class extends Error {
|
|
2866
|
+
code;
|
|
2867
|
+
kind;
|
|
2868
|
+
constructor(code, message, kind = "value") {
|
|
2869
|
+
super(message);
|
|
2870
|
+
this.code = code;
|
|
2871
|
+
this.kind = kind;
|
|
2872
|
+
this.name = "FieldNumberError";
|
|
2873
|
+
}
|
|
2874
|
+
};
|
|
2875
|
+
/** 符号、小数点与未完成指数可继续输入;仅输入过程暂缓,失焦仍须完整校验。 */
|
|
2876
|
+
function isIncompleteFieldNumber(text) {
|
|
2877
|
+
return /^(?:[+-]?\.?|[+-]?(?:\d+(?:\.\d*)?|\.\d+)[eE][+-]?)$/.test(text.trim());
|
|
2878
|
+
}
|
|
2879
|
+
/** 整数不执行隐式截断;定点 0 位仍执行配置的修约,浮动小数保留输入位数。 */
|
|
2880
|
+
function fieldNumberSettings(type, config = {}) {
|
|
2881
|
+
const declared = config.decimalPlaces;
|
|
2882
|
+
if (declared != null && (!Number.isInteger(declared) || declared < 0 || declared > 14)) throw new FieldNumberError("number_precision_configuration", "小数位数必须为 0~14 的整数", "configuration");
|
|
2883
|
+
const integer = [
|
|
2884
|
+
"integer",
|
|
2885
|
+
"long",
|
|
2886
|
+
"of_inst_num"
|
|
2887
|
+
].includes(type);
|
|
2888
|
+
const fixed = ["decimal", "work_hours"].includes(type) || declared != null && config.rounding != null;
|
|
2889
|
+
return {
|
|
2890
|
+
integer,
|
|
2891
|
+
digits: integer ? 0 : fixed ? declared ?? 0 : void 0,
|
|
2892
|
+
maxDigits: type === "integer" ? 10 : 15,
|
|
2893
|
+
...type === "integer" ? { maximum: "2100000000" } : {},
|
|
2894
|
+
rounding: config.rounding === "half-up" ? BigNumber.ROUND_HALF_UP : config.rounding === "half-even" ? BigNumber.ROUND_HALF_EVEN : BigNumber.ROUND_DOWN
|
|
2895
|
+
};
|
|
2896
|
+
}
|
|
2897
|
+
/** 必须完整匹配数值;只接受合法千分位,不能把 12abc、1 2、1,2 悄悄变成其他数。 */
|
|
2898
|
+
function parseNumberText(raw) {
|
|
2899
|
+
let text = raw.trim();
|
|
2900
|
+
if (text.includes(",") || text.includes(",")) {
|
|
2901
|
+
if (!/^[+-]?\d{1,3}(?:[,,]\d{3})+(?:\.\d*)?$/.test(text)) throw new FieldNumberError("number_format", "请输入完整有效的数字");
|
|
2902
|
+
text = text.replace(/[,,]/g, "");
|
|
2903
|
+
}
|
|
2904
|
+
const match = /^([+-]?(?:\d+(?:\.\d*)?|\.\d+))(?:[eE]([+-]?\d+))?$/.exec(text);
|
|
2905
|
+
if (!match) throw new FieldNumberError("number_format", "请输入完整有效的数字");
|
|
2906
|
+
const exponent = Number(match[2] ?? 0);
|
|
2907
|
+
if (!Number.isSafeInteger(exponent) || Math.abs(exponent) > text.length + 30) throw new FieldNumberError("number_digits", "数值最多允许 15 个数字");
|
|
2908
|
+
const value = new BigNumber(text);
|
|
2909
|
+
if (!value.isFinite()) throw new FieldNumberError("number_format", "请输入完整有效的数字");
|
|
2910
|
+
return {
|
|
2911
|
+
value,
|
|
2912
|
+
scale: Math.max(0, (match[1].split(".")[1]?.length ?? 0) - exponent)
|
|
2913
|
+
};
|
|
2914
|
+
}
|
|
2915
|
+
function checkNumberSize(value, digits, settings) {
|
|
2916
|
+
if (Math.max(1, (value.e ?? 0) + 1) + digits > settings.maxDigits) throw new FieldNumberError("number_digits", `数值最多允许 ${settings.maxDigits} 个数字(不含符号和小数点)`);
|
|
2917
|
+
if (settings.maximum && value.isGreaterThan(settings.maximum)) throw new FieldNumberError("number_maximum", "整数不能大于 2100000000");
|
|
2918
|
+
}
|
|
2919
|
+
/** 只返回精确数字文本。位数在修约后再次检查,不截取整数部分或自动封顶。 */
|
|
2920
|
+
function normalizeFieldNumber(raw, settings) {
|
|
2921
|
+
const parsed = parseNumberText(raw);
|
|
2922
|
+
if (settings.integer && !parsed.value.isInteger()) throw new FieldNumberError("number_integer", "请输入整数");
|
|
2923
|
+
const digits = settings.digits ?? parsed.scale;
|
|
2924
|
+
checkNumberSize(parsed.value, digits, settings);
|
|
2925
|
+
const value = settings.digits === void 0 ? parsed.value : parsed.value.decimalPlaces(digits, settings.rounding);
|
|
2926
|
+
checkNumberSize(value, digits, settings);
|
|
2927
|
+
return value.toFixed(digits);
|
|
2928
|
+
}
|
|
2929
|
+
/** 整数与定点小数校验、修约后保存 number;浮动小数保留输入小数位文本。 */
|
|
2930
|
+
function fieldNumberValue(raw, settings) {
|
|
2931
|
+
const text = normalizeFieldNumber(raw, settings);
|
|
2932
|
+
if (settings.digits === void 0) return text;
|
|
2933
|
+
const decimal = new BigNumber(text), value = decimal.toNumber();
|
|
2934
|
+
if (!Number.isFinite(value) || decimal.isInteger() && !Number.isSafeInteger(value) || !new BigNumber(value).isEqualTo(decimal)) throw new FieldNumberError("number_precision", "数值无法安全转换,请检查位数和小数精度");
|
|
2935
|
+
return value === 0 ? 0 : value;
|
|
2936
|
+
}
|
|
2937
|
+
/** number 编辑仍显示十进制与配置尾零;未修约的历史值保留原数字供用户更正。 */
|
|
2938
|
+
function fieldNumberEditText(value, settings) {
|
|
2939
|
+
const decimal = new BigNumber(value), digits = settings.digits;
|
|
2940
|
+
return digits !== void 0 && decimal.decimalPlaces() <= digits ? decimal.toFixed(digits) : decimal.toFixed();
|
|
2941
|
+
}
|
|
2942
|
+
/** 历史数据仅检查,不修写仓库;缺少末尾零不算异常,但有未修约的小数必须提示。 */
|
|
2943
|
+
function validateFieldNumber(raw, settings) {
|
|
2944
|
+
if (typeof raw !== "string" && typeof raw !== "number") throw new FieldNumberError("number_format", "请输入完整有效的数字");
|
|
2945
|
+
const normalized = normalizeFieldNumber(String(raw), settings);
|
|
2946
|
+
if (settings.digits !== void 0 && !new BigNumber(String(raw).replace(/[,,]/g, "")).isEqualTo(normalized)) throw new FieldNumberError("number_precision", `数值需要按 ${settings.digits} 位小数修约`);
|
|
2947
|
+
}
|
|
2948
|
+
/** 展示沿用写入修约;不合规则的历史值完整显示,读取时不改写或截掉内容。 */
|
|
2949
|
+
function fieldNumberText(raw, settings, percent) {
|
|
2950
|
+
const normalized = normalizeFieldNumber(String(raw), settings);
|
|
2951
|
+
if (!percent) return normalized;
|
|
2952
|
+
const value = new BigNumber(normalized).multipliedBy(100);
|
|
2953
|
+
return (settings.digits === void 0 ? value.toFixed() : value.toFixed(settings.digits)) + "%";
|
|
2954
|
+
}
|
|
2955
|
+
// src/runtime/form/validation/description.ts
|
|
2956
|
+
/** @file 校验反馈的字段名称及所属位置,只生成可展示文字,不保留数据或模型。 */
|
|
2957
|
+
function fieldValidationDescription(declaration, path, modelName) {
|
|
2958
|
+
const source = declaration.binding.source;
|
|
2959
|
+
const label = fieldBehavior(declaration).config?.label || source.fieldLink.split(".").at(-1) || "字段";
|
|
2960
|
+
const rows = [...path.matchAll(/\[(\d+)\]/g)].map((match) => Number(match[1]) + 1);
|
|
2961
|
+
const model = source.isLinkedModelField ? "关联模型" : source.subFieldKey ? "子模型" : "主模型";
|
|
2962
|
+
const name = modelName?.trim() || source.subFieldKey;
|
|
2963
|
+
const location = name ? `${model} · ${name}` : model;
|
|
2964
|
+
return {
|
|
2965
|
+
label,
|
|
2966
|
+
context: rows.length ? `${location} · 第 ${rows.join(" / ")} 项` : location
|
|
2967
|
+
};
|
|
2968
|
+
}
|
|
2969
|
+
// src/runtime/interaction/field-text.ts
|
|
2970
|
+
/** @file 活动文本字段的最小同步协议和旧事件保护,不包含 DOM、布局几何或数据副本。 */
|
|
2971
|
+
/** 借用旧实例身份解析当前数据,绝不将旧几何当成有效输入框坐标。 */
|
|
2972
|
+
function readFieldTextInput(handle, options, selection) {
|
|
2973
|
+
const snapshot = options.layout.getSnapshot();
|
|
2974
|
+
if (!snapshot || !options.form || options.environment().mode !== "fill") return void 0;
|
|
2975
|
+
const target = readFieldTarget(options.form, snapshot, selection);
|
|
2976
|
+
if (!target) return void 0;
|
|
2977
|
+
const behavior = fieldBehavior(target.declaration);
|
|
2978
|
+
if (!isFieldTextInput(behavior)) return void 0;
|
|
2979
|
+
const value = target.value;
|
|
2980
|
+
if (value !== null && value !== void 0 && typeof value !== "string" && typeof value !== "number" && typeof value !== "boolean") throw new TextFlowError("文本字段当前不是标量值");
|
|
2981
|
+
if (typeof value === "number" && !Number.isFinite(value)) throw new TextFlowError("字段包含无效数字");
|
|
2982
|
+
let text = value == null ? "" : String(value);
|
|
2983
|
+
if (behavior.widget === "number" && typeof value === "number") try {
|
|
2984
|
+
text = fieldNumberEditText(value, fieldNumberSettings(behavior.valueType ?? target.declaration.binding.source.fieldType, behavior.config));
|
|
2985
|
+
} catch {}
|
|
2986
|
+
return Object.freeze({
|
|
2987
|
+
selection,
|
|
2988
|
+
modelRevision: handle.getModelRevision(),
|
|
2989
|
+
behaviorRevision: behavior.revision ?? 0,
|
|
2990
|
+
widget: behavior.widget,
|
|
2991
|
+
value,
|
|
2992
|
+
text,
|
|
2993
|
+
multiline: behavior.widget === "input" && behavior.config?.multiline === true,
|
|
2994
|
+
editable: target.state.editable,
|
|
2995
|
+
pending: target.state.pending,
|
|
2996
|
+
...target.valuePath ? {
|
|
2997
|
+
validationPath: target.valuePath,
|
|
2998
|
+
validationDescription: fieldValidationDescription(target.declaration, target.valuePath, options.validationModelName?.(target.declaration.binding)),
|
|
2999
|
+
validationMessage: options.form.services.fieldValidation.message(selection.fieldId, target.valuePath)
|
|
3000
|
+
} : {}
|
|
3001
|
+
});
|
|
3002
|
+
}
|
|
3003
|
+
/** 同一同步边界复核源身份、配置与原值,防止重排/换数/切换字段后的迟到覆盖。 */
|
|
3004
|
+
function writeGuardedFieldText(handle, options, selection, expected, text, write) {
|
|
3005
|
+
if (selection !== expected.selection) throw new TextFlowError("字段输入焦点已改变");
|
|
3006
|
+
const current = readFieldTextInput(handle, options, expected.selection);
|
|
3007
|
+
if (!current || !sameFieldTextInput(current, expected)) throw new TextFlowError("字段配置或外部值已改变,旧输入已取消");
|
|
3008
|
+
if (!current.editable) throw new TextFlowError("当前字段不可编辑或规则尚未准备");
|
|
3009
|
+
return write(text);
|
|
3010
|
+
}
|
|
3011
|
+
/** 展示与写入共用同一活动基值判定,不将整份数据版本当成当前字段身份。 */
|
|
3012
|
+
function sameFieldTextInput(current, expected) {
|
|
3013
|
+
return sameFieldValueGuard(current, expected);
|
|
3014
|
+
}
|
|
3015
|
+
/** 当前数字草稿仅用于短期校验;异步前后复核焦点、配置和原值,不把草稿写进仓库。 */
|
|
3016
|
+
async function validateFieldTextDraft(handle, options, selection, expected, text, signal) {
|
|
3017
|
+
if (expected.widget !== "number" && expected.widget !== "input" || !options.form) return;
|
|
3018
|
+
const current = () => {
|
|
3019
|
+
if (signal.aborted || handle.status === "closed" || selection() !== expected.selection) return false;
|
|
3020
|
+
const state = readFieldTextInput(handle, options, expected.selection);
|
|
3021
|
+
return !!state?.editable && sameFieldTextInput(state, expected);
|
|
3022
|
+
};
|
|
3023
|
+
if (!current()) return;
|
|
3024
|
+
const snapshot = options.layout.getSnapshot(), path = snapshot && readFieldTarget(options.form, snapshot, expected.selection)?.valuePath;
|
|
3025
|
+
if (!path) return;
|
|
3026
|
+
while (current()) {
|
|
3027
|
+
const result = await options.form.services.validator.validate({
|
|
3028
|
+
mode: "change",
|
|
3029
|
+
includeRequired: options.form.services.fieldValidation.checksRequired,
|
|
3030
|
+
signal,
|
|
3031
|
+
draft: {
|
|
3032
|
+
fieldId: expected.selection.fieldId,
|
|
3033
|
+
valuePath: path,
|
|
3034
|
+
text
|
|
3035
|
+
}
|
|
3036
|
+
});
|
|
3037
|
+
if (!current()) return;
|
|
3038
|
+
if (result.status !== "stale") return result.issues.map((issue) => issue.message).join(";") || void 0;
|
|
3039
|
+
}
|
|
3040
|
+
}
|
|
3041
|
+
// src/runtime/form/business/tables/types.ts
|
|
3042
|
+
/** 一次明确操作的数量上限,批量复制和插行使用同一门禁。 */
|
|
3043
|
+
var nativeTableRowBatchLimit = 1e3;
|
|
3044
|
+
export { rectDistance as $, assertDataNumberPrecision as $t, selectionFallbacks as A, sameLayoutIdentity as An, nativeObjectKey as At, fieldBehaviorLabel as B, normalizeResourceValue as Bt, snapshotSealDefinition as C, isRequiredDataValueMissing as Cn, referenceContext as Ct, snapshotPageWidgetDragDefinition as D, formatTsv as Dn, isReferenceScanField as Dt, snapshotFieldDragDefinition as E, wordClipboardType as En, referenceValueIds as Et, editingAllowed as F, assertFiniteLayoutNumber as Fn, nativeSelectedReferenceValue as Ft, afterFieldSettlement as G, resourceUrl as Gt, systemDate as H, resourceContext as Ht, designRegionTypes as I, assertLayoutSize as In, referenceInputIdentity as It, writeFieldValue as J, commonFieldDeclaration as Jt, readFieldTarget as K, resourceValues as Kt, designRegionVariants as L, assertLayoutTextMeasureRequest as Ln, authenticatedSignature as Lt, assertAdaptiveImageCellWritable as M, snapshotLayoutVersion as Mn, isMaterialLotBinding as Mt, hasAdaptiveImageCell as N, layoutImageSourceKey as Nn, isNamedLotBinding as Nt, freezeSelection as O, parseTsv as On, referenceScanPaths as Ot, assertOwnedEditingAllowed as P, LayoutContractError as Pn, lotReference as Pt, positionX as Q, nativeFieldBehavior as Qt, choiceSelection as R, assertLayoutTextMeasurement as Rn, signatureText as Rt, EditorObjects as S, isInvalidDataNumber as Sn, referenceBehavior as St, resolveFieldDrop as T, readDataValueInput as Tn, referenceOptions as Tt, readBusinessField as U, resourceLimits as Ut, resolveBooleanOptionLabel as V, resourceBehavior as Vt, sameBusinessField as W, resourceName as Wt, TextFlowError as X, isCommonField as Xt, TextFlow as Y, fieldBehavior as Yt, hitPosition as Z, isFieldTextInput as Zt, readFieldOptionInput as _, invalidDataNumberText as _n, sealStampKeys as _t, writeGuardedFieldText as a, readDataBoolean as an, sameTextSource as at, toggledFieldOptionIds as b, isClosedDataContainer as bn, normalizeReferenceValue as bt, fieldNumberSettings as c, resolveDataDefault as cn, LAYOUT_PIXELS_PER_INCH as ct, isIncompleteFieldNumber as d, resolveDataValueUpdate as dn, layoutPxToPoints as dt, dataParameterNumberKind as en, sourceBoundaryIndex as et, validateFieldNumber as f, shouldInitializeDataValue as fn, millimetersToLayoutPx as ft, readFieldChoiceInput as g, findInvalidDataNumbers as gn, nativeSealValueKind as gt, sameFieldSignatureInput as h, dataValueIssuesFromError as hn, nativeSealText as ht, validateFieldTextDraft as i, normalizeDataParameterNumber as in, samePosition as it, adaptiveImageCellMessage as j, sameLayoutVersion as jn, nativeObjectRootField as jt, mapSelection as k, tsvClipboardLimits as kn, referenceScanUpdates as kt, fieldNumberText as l, resolveDataDefaultFrom as ln, LAYOUT_POINTS_PER_INCH as lt, readFieldSignatureInput as m, assertValidDataValue as mn, authenticatedSeal as mt, readFieldTextInput as n, encodeDataFieldValue as nn, positionSourceId as nt, fieldValidationDescription as o, encodeDataCollection as on, textSourceId as ot, assertFieldSignatureInput as p, DataValueError as pn, pointsToLayoutPx as pt, resolveFieldTarget as q, validateResourceFiles as qt, sameFieldTextInput as r, normalizeDataBoolean as rn, sameDomain as rt, FieldNumberError as s, emptyDataValue as sn, LAYOUT_MILLIMETERS_PER_INCH as st, nativeTableRowBatchLimit as t, encodeDataChoice as tn, visualAffinity as tt, fieldNumberValue as u, resolveDataDisplay as un, layoutPxToMillimeters as ut, sameFieldChoiceInput as v, classifyDataValue as vn, isSealPosition as vt, designFieldDefaults as w, isUninitializedDataValue as wn, referenceIds as wt, writeGuardedFieldChoice as x, isEmptyDataValue as xn, recordReference as xt, sameFieldOptionInput as y, dataValueState as yn, parseSealValue as yt, fieldBehaviorDefault as z, signatureValues as zt };
|
|
3045
|
+
|
|
3046
|
+
//# sourceMappingURL=types-XXuIIZ9e.js.map
|