@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,3348 @@
|
|
|
1
|
+
import { uniq } from "es-toolkit/array";
|
|
2
|
+
import { isBoolean, isEqual, isError, isFunction, isNotNil, isNull, isNumber, isString, isUndefined } from "es-toolkit/predicate";
|
|
3
|
+
import sortBy$1 from "es-toolkit/compat/sortBy";
|
|
4
|
+
import isObjectValue from "es-toolkit/compat/isObject";
|
|
5
|
+
import isArray from "es-toolkit/compat/isArray";
|
|
6
|
+
import isFinite from "es-toolkit/compat/isFinite";
|
|
7
|
+
import isInteger from "es-toolkit/compat/isInteger";
|
|
8
|
+
import includes from "es-toolkit/compat/includes";
|
|
9
|
+
import isObjectLike from "es-toolkit/compat/isObjectLike";
|
|
10
|
+
// src/model/validation/schema.ts
|
|
11
|
+
/**
|
|
12
|
+
* @file 基础校验规则:声明闭合结构、可选与可空属性及核心节点形状,使用 JSON Pointer 定位问题。
|
|
13
|
+
* 阅读定位:validation/ · 核心结构、语义与 JSON 边界校验。
|
|
14
|
+
*/
|
|
15
|
+
/** 追加可定位错误,保留同次校验中发现的其他问题。 */
|
|
16
|
+
function issue(issues, path, code, message) {
|
|
17
|
+
issues.push({
|
|
18
|
+
path,
|
|
19
|
+
code,
|
|
20
|
+
message
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
/** 拼接并转义一个 Pointer 片段,字典键中的 / 和 ~ 不会破坏错误路径。 */
|
|
24
|
+
var at = (path, key) => `${path}/${String(key).replace(/~/g, "~0").replace(/\//g, "~1")}`;
|
|
25
|
+
/** 判断结构对象;原型、访问器和 JSON 值合法性由外层 JSON 边界另外检查。 */
|
|
26
|
+
var isObject = (value) => isObjectLike(value) && !isArray(value);
|
|
27
|
+
/** 校验字符串,允许空串作为明确的内容或提示覆盖。 */
|
|
28
|
+
var string = (v, p, e) => {
|
|
29
|
+
if (!isString(v)) issue(e, p, "type", "Expected string");
|
|
30
|
+
};
|
|
31
|
+
/** 校验非空身份/名称字符串,只判断合法性,不 trim 或改写保存值。 */
|
|
32
|
+
var nonempty = (v, p, e) => {
|
|
33
|
+
if (!isString(v) || !v.trim()) issue(e, p, "type", "Expected nonempty string");
|
|
34
|
+
};
|
|
35
|
+
/** 校验真实布尔值,不能把 false 当作未设置,也不隐式转换字符串。 */
|
|
36
|
+
var boolean = (v, p, e) => {
|
|
37
|
+
if (!isBoolean(v)) issue(e, p, "type", "Expected boolean");
|
|
38
|
+
};
|
|
39
|
+
/** 创建有限数值规则,可进一步限制闭区间和整数,不做取整或类型转换。 */
|
|
40
|
+
var number = (minimum = -Infinity, integer = false, maximum = Infinity) => (v, p, e) => {
|
|
41
|
+
if (!isFinite(v) || v < minimum || v > maximum || integer && !isInteger(v)) issue(e, p, "number", `Expected ${integer ? "integer" : "finite number"} in [${minimum}, ${maximum}]`);
|
|
42
|
+
};
|
|
43
|
+
/** 校验严格大于零的尺寸/字号,允许小数。 */
|
|
44
|
+
var positive = (v, p, e) => {
|
|
45
|
+
number(0)(v, p, e);
|
|
46
|
+
if (v === 0) issue(e, p, "number", "Expected positive number");
|
|
47
|
+
};
|
|
48
|
+
/** 创建严格值枚举规则,保留 number/boolean/null 的原始类型。 */
|
|
49
|
+
var oneOf = (...values) => (v, p, e) => {
|
|
50
|
+
if (!includes(values, v)) issue(e, p, "enum", `Expected one of ${values.join(", ")}`);
|
|
51
|
+
};
|
|
52
|
+
/** 标记属性可以缺省;null 需显式声明 nullable,undefined 输入按缺省处理。 */
|
|
53
|
+
var optional = (rule) => ({ optional: rule });
|
|
54
|
+
/** 业务配置的可选项统一允许 null,表示未配置;必填属性及数组元素不因此放宽。 */
|
|
55
|
+
var optionalConfig = (rule) => optional(nullable(rule));
|
|
56
|
+
/** 创建闭合对象规则:缺少必填键、出现未知键都报错,不静默删除或补默认值。 */
|
|
57
|
+
var object = (shape) => (v, p, e) => {
|
|
58
|
+
if (!isObject(v)) {
|
|
59
|
+
issue(e, p, "type", "Expected object");
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
for (const key of Object.keys(v)) if (!Object.hasOwn(shape, key)) issue(e, at(p, key), "unknown_key", "Unknown property");
|
|
63
|
+
for (const [key, entry] of Object.entries(shape)) {
|
|
64
|
+
const rule = isFunction(entry) ? entry : entry.optional;
|
|
65
|
+
if (!Object.hasOwn(v, key)) {
|
|
66
|
+
if (isFunction(entry)) issue(e, at(p, key), "required", "Missing property");
|
|
67
|
+
} else if (!isUndefined(v[key]) || isFunction(entry)) rule(v[key], at(p, key), e);
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
/** 按序校验数组及最小长度;数组顺序本身就是文档的内容顺序。 */
|
|
71
|
+
var array = (rule, minimum = 0) => (v, p, e) => {
|
|
72
|
+
if (!isArray(v)) {
|
|
73
|
+
issue(e, p, "type", "Expected array");
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
if (v.length < minimum) issue(e, p, "length", `Expected at least ${minimum} items`);
|
|
77
|
+
v.forEach((item, i) => rule(item, at(p, i), e));
|
|
78
|
+
};
|
|
79
|
+
/** 校验以非空字符串为键的字典,键就是样式/资源/绑定身份,不在值中再复制 ID。 */
|
|
80
|
+
var record = (rule) => (v, p, e) => {
|
|
81
|
+
if (!isObject(v)) {
|
|
82
|
+
issue(e, p, "type", "Expected dictionary");
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
for (const [key, value] of Object.entries(v)) {
|
|
86
|
+
nonempty(key, at(p, key), e);
|
|
87
|
+
rule(value, at(p, key), e);
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
/** 按字符串判别字段选择联合类型;未知判别值报错而不尝试猜测其他结构。 */
|
|
91
|
+
var tagged = (key, choices) => (v, p, e) => {
|
|
92
|
+
if (!isObject(v)) {
|
|
93
|
+
issue(e, p, "type", "Expected object");
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
const tag = v[key];
|
|
97
|
+
if (!isString(tag) || !Object.hasOwn(choices, tag)) issue(e, at(p, key), "enum", "Unknown discriminator");
|
|
98
|
+
else choices[tag](v, p, e);
|
|
99
|
+
};
|
|
100
|
+
/** 接受显式 null,其他值交由原规则处理,用于区分关闭槽位和缺省回退。 */
|
|
101
|
+
var nullable = (rule) => (v, p, e) => {
|
|
102
|
+
if (!isNull(v)) rule(v, p, e);
|
|
103
|
+
};
|
|
104
|
+
/** 检查插件载荷的对象外形;具体键必须再通过对应注册 schema 校验。 */
|
|
105
|
+
var jsonObject = (v, p, e) => {
|
|
106
|
+
if (!isObject(v)) issue(e, p, "type", "Expected JSON object");
|
|
107
|
+
};
|
|
108
|
+
/** 限定业务扩展名为 namespace:name,隔离核心组件与插件配置。 */
|
|
109
|
+
var extensionName = (v, p, e) => {
|
|
110
|
+
if (!isString(v) || !/^[a-z][a-z0-9-]*:[a-z][a-z0-9-]*$/.test(v)) issue(e, p, "namespace", "Expected namespace:name");
|
|
111
|
+
};
|
|
112
|
+
var o$8 = optional;
|
|
113
|
+
var length = number(0);
|
|
114
|
+
var version = number(1, true);
|
|
115
|
+
var size = object({
|
|
116
|
+
width: positive,
|
|
117
|
+
height: positive
|
|
118
|
+
});
|
|
119
|
+
var insets = object({
|
|
120
|
+
top: length,
|
|
121
|
+
right: length,
|
|
122
|
+
bottom: length,
|
|
123
|
+
left: length
|
|
124
|
+
});
|
|
125
|
+
var language = object({
|
|
126
|
+
primary: o$8(nonempty),
|
|
127
|
+
eastAsia: o$8(nonempty),
|
|
128
|
+
complexScript: o$8(nonempty)
|
|
129
|
+
});
|
|
130
|
+
/** 文字片段、段落默认文字样式及样式表共用同一属性定义。 */
|
|
131
|
+
var textStyleProperties = {
|
|
132
|
+
fontFamily: o$8(object({
|
|
133
|
+
latin: o$8(nonempty),
|
|
134
|
+
latinSupplemental: o$8(nonempty),
|
|
135
|
+
eastAsia: o$8(nonempty),
|
|
136
|
+
complexScript: o$8(nonempty)
|
|
137
|
+
})),
|
|
138
|
+
fontSizePt: o$8(positive),
|
|
139
|
+
complexScriptFontSizePt: o$8(positive),
|
|
140
|
+
fontSizeOptionId: o$8(nonempty),
|
|
141
|
+
bold: o$8(boolean),
|
|
142
|
+
italic: o$8(boolean),
|
|
143
|
+
strike: o$8(boolean),
|
|
144
|
+
doubleStrike: o$8(boolean),
|
|
145
|
+
underline: o$8(oneOf("none", "single", "double", "dotted", "dashed", "wave")),
|
|
146
|
+
textCase: o$8(oneOf("normal", "uppercase")),
|
|
147
|
+
smallCaps: o$8(boolean),
|
|
148
|
+
verticalAlign: o$8(oneOf("baseline", "superscript", "subscript")),
|
|
149
|
+
color: o$8(nonempty),
|
|
150
|
+
highlightColor: o$8(nonempty),
|
|
151
|
+
shading: o$8(object({
|
|
152
|
+
fill: o$8(nonempty),
|
|
153
|
+
color: o$8(nonempty),
|
|
154
|
+
pattern: o$8(nonempty)
|
|
155
|
+
})),
|
|
156
|
+
letterSpacingPx: o$8(number()),
|
|
157
|
+
kerningMinSizePt: o$8(length),
|
|
158
|
+
language: o$8(language)
|
|
159
|
+
};
|
|
160
|
+
/** 闭合文字样式校验与格式补丁共享属性表。 */
|
|
161
|
+
var textStyleRule = object(textStyleProperties);
|
|
162
|
+
/** 段落声明统一使用 px 和区分语义的行距,不包含旧 DOCX 分页元信息。 */
|
|
163
|
+
var paragraphStyleProperties = {
|
|
164
|
+
alignment: o$8(oneOf("left", "center", "right", "justify", "distribute")),
|
|
165
|
+
indentPx: o$8(object({
|
|
166
|
+
left: o$8(number()),
|
|
167
|
+
right: o$8(number()),
|
|
168
|
+
firstLine: o$8(number()),
|
|
169
|
+
hanging: o$8(length)
|
|
170
|
+
})),
|
|
171
|
+
spaceBeforePx: o$8(length),
|
|
172
|
+
spaceAfterPx: o$8(length),
|
|
173
|
+
spaceBeforeAuto: o$8(boolean),
|
|
174
|
+
spaceAfterAuto: o$8(boolean),
|
|
175
|
+
language: o$8(language),
|
|
176
|
+
lineHeight: o$8(tagged("kind", {
|
|
177
|
+
multiple: object({
|
|
178
|
+
kind: oneOf("multiple"),
|
|
179
|
+
value: positive
|
|
180
|
+
}),
|
|
181
|
+
fixed: object({
|
|
182
|
+
kind: oneOf("fixed"),
|
|
183
|
+
valuePx: positive
|
|
184
|
+
}),
|
|
185
|
+
minimum: object({
|
|
186
|
+
kind: oneOf("minimum"),
|
|
187
|
+
valuePx: positive
|
|
188
|
+
})
|
|
189
|
+
}))
|
|
190
|
+
};
|
|
191
|
+
/** 闭合段落样式校验与恢复继承命令共享属性表。 */
|
|
192
|
+
var paragraphStyleRule = object(paragraphStyleProperties);
|
|
193
|
+
var border = object({
|
|
194
|
+
widthPx: length,
|
|
195
|
+
style: oneOf("solid", "dashed", "dotted", "double"),
|
|
196
|
+
color: nonempty
|
|
197
|
+
});
|
|
198
|
+
var borders = object({
|
|
199
|
+
top: o$8(border),
|
|
200
|
+
right: o$8(border),
|
|
201
|
+
bottom: o$8(border),
|
|
202
|
+
left: o$8(border),
|
|
203
|
+
insideH: o$8(border),
|
|
204
|
+
insideV: o$8(border)
|
|
205
|
+
});
|
|
206
|
+
var tableStyle = object({
|
|
207
|
+
alignment: o$8(oneOf("left", "center", "right")),
|
|
208
|
+
indentPx: o$8(number()),
|
|
209
|
+
borders: o$8(borders),
|
|
210
|
+
cellPaddingPx: o$8(insets),
|
|
211
|
+
backgroundColor: o$8(nonempty)
|
|
212
|
+
});
|
|
213
|
+
/** 单元格直接样式的完整校验。 */
|
|
214
|
+
var cellStyleRule = object({
|
|
215
|
+
borders: o$8(borders),
|
|
216
|
+
paddingPx: o$8(insets),
|
|
217
|
+
backgroundColor: o$8(nonempty),
|
|
218
|
+
verticalAlign: o$8(oneOf("top", "center", "bottom"))
|
|
219
|
+
});
|
|
220
|
+
var cellStyle = cellStyleRule;
|
|
221
|
+
var styled = {
|
|
222
|
+
textStyleId: o$8(nonempty),
|
|
223
|
+
textStyle: o$8(textStyleRule)
|
|
224
|
+
};
|
|
225
|
+
var policy = object({
|
|
226
|
+
draggable: o$8(boolean),
|
|
227
|
+
resizable: o$8(boolean),
|
|
228
|
+
copyable: o$8(boolean),
|
|
229
|
+
removable: o$8(boolean),
|
|
230
|
+
droppable: o$8(boolean)
|
|
231
|
+
});
|
|
232
|
+
var configurable = {
|
|
233
|
+
widget: nonempty,
|
|
234
|
+
configVersion: o$8(version),
|
|
235
|
+
config: o$8(jsonObject),
|
|
236
|
+
preferredSizePx: o$8(size),
|
|
237
|
+
policy: o$8(policy),
|
|
238
|
+
...styled
|
|
239
|
+
};
|
|
240
|
+
/** 核心 CellId 范围输入的闭合结构。 */
|
|
241
|
+
var cellRangeRule = object({
|
|
242
|
+
fromCellId: nonempty,
|
|
243
|
+
toCellId: nonempty
|
|
244
|
+
});
|
|
245
|
+
var range$1 = cellRangeRule;
|
|
246
|
+
var slots = object({
|
|
247
|
+
default: o$8(nullable(nonempty)),
|
|
248
|
+
first: o$8(nullable(nonempty)),
|
|
249
|
+
even: o$8(nullable(nonempty))
|
|
250
|
+
});
|
|
251
|
+
/** 延迟访问递归块规则,支持单元格和附属内容,不在模块初始化时展开递归。 */
|
|
252
|
+
var blockList = (v, p, e) => array(blockRule)(v, p, e);
|
|
253
|
+
/** 附属容器的闭合结构,条件与父字段的关系由文档语义校验处理。 */
|
|
254
|
+
var attachmentConditionRule = tagged("kind", {
|
|
255
|
+
boolean: object({
|
|
256
|
+
kind: oneOf("boolean"),
|
|
257
|
+
value: boolean
|
|
258
|
+
}),
|
|
259
|
+
option: object({
|
|
260
|
+
kind: oneOf("option"),
|
|
261
|
+
optionId: nonempty
|
|
262
|
+
})
|
|
263
|
+
});
|
|
264
|
+
/** 附属容器结构,条件与所属字段的引用语义在文档级校验。 */
|
|
265
|
+
var attachmentRule = object({
|
|
266
|
+
id: nonempty,
|
|
267
|
+
kind: oneOf("attachment"),
|
|
268
|
+
when: attachmentConditionRule,
|
|
269
|
+
blocks: blockList
|
|
270
|
+
});
|
|
271
|
+
var inlineRule = tagged("kind", {
|
|
272
|
+
text: object({
|
|
273
|
+
id: nonempty,
|
|
274
|
+
kind: oneOf("text"),
|
|
275
|
+
text: string,
|
|
276
|
+
...styled
|
|
277
|
+
}),
|
|
278
|
+
field: object({
|
|
279
|
+
id: nonempty,
|
|
280
|
+
kind: oneOf("field"),
|
|
281
|
+
bindingId: nonempty,
|
|
282
|
+
...configurable,
|
|
283
|
+
attachments: o$8(array(attachmentRule))
|
|
284
|
+
}),
|
|
285
|
+
image: object({
|
|
286
|
+
id: nonempty,
|
|
287
|
+
kind: oneOf("image"),
|
|
288
|
+
assetId: nonempty,
|
|
289
|
+
alt: o$8(string),
|
|
290
|
+
preferredSizePx: o$8(size),
|
|
291
|
+
fit: o$8(oneOf("contain", "cover", "fill"))
|
|
292
|
+
}),
|
|
293
|
+
pageWidget: object({
|
|
294
|
+
id: nonempty,
|
|
295
|
+
kind: oneOf("pageWidget"),
|
|
296
|
+
...configurable
|
|
297
|
+
}),
|
|
298
|
+
break: object({
|
|
299
|
+
id: nonempty,
|
|
300
|
+
kind: oneOf("break"),
|
|
301
|
+
breakType: oneOf("line", "page")
|
|
302
|
+
})
|
|
303
|
+
});
|
|
304
|
+
/** 列、物理格和行复用同一规则,独立工厂不需要制造临时表格。 */
|
|
305
|
+
var columnRule = object({
|
|
306
|
+
id: nonempty,
|
|
307
|
+
widthPx: o$8(positive)
|
|
308
|
+
});
|
|
309
|
+
/** 单格始终拥有内容数组,空格用空数组表达。 */
|
|
310
|
+
var cellRule = object({
|
|
311
|
+
id: nonempty,
|
|
312
|
+
kind: oneOf("cell"),
|
|
313
|
+
style: o$8(cellStyle),
|
|
314
|
+
blocks: blockList
|
|
315
|
+
});
|
|
316
|
+
/** 完整物理行规则,行高保持明确模式。 */
|
|
317
|
+
/** 物理行高度规则,缺省和明确 auto 不合并。 */
|
|
318
|
+
var rowHeightRule = tagged("kind", {
|
|
319
|
+
auto: object({ kind: oneOf("auto") }),
|
|
320
|
+
minimum: object({
|
|
321
|
+
kind: oneOf("minimum"),
|
|
322
|
+
valuePx: positive
|
|
323
|
+
}),
|
|
324
|
+
fixed: object({
|
|
325
|
+
kind: oneOf("fixed"),
|
|
326
|
+
valuePx: positive
|
|
327
|
+
})
|
|
328
|
+
});
|
|
329
|
+
var rowRule = object({
|
|
330
|
+
id: nonempty,
|
|
331
|
+
kind: oneOf("row"),
|
|
332
|
+
height: o$8(rowHeightRule),
|
|
333
|
+
cells: array(cellRule, 1)
|
|
334
|
+
});
|
|
335
|
+
/** 合并声明的形状,范围语义由同表网格校验。 */
|
|
336
|
+
var mergeRule = object({
|
|
337
|
+
id: nonempty,
|
|
338
|
+
range: range$1
|
|
339
|
+
});
|
|
340
|
+
/** 区域形状共用于独立创建与文档边界,不在节点复制反向关系。 */
|
|
341
|
+
var regionRule = object({
|
|
342
|
+
id: nonempty,
|
|
343
|
+
type: oneOf("table-header", "sub-table-header", "bounded", "bounded-item", "repeating", "2d-table", "check-table", "material-consume-table", "data-group-2d"),
|
|
344
|
+
name: o$8(string),
|
|
345
|
+
range: range$1,
|
|
346
|
+
binding: o$8(object({ pathTemplate: nonempty })),
|
|
347
|
+
configVersion: o$8(version),
|
|
348
|
+
config: o$8(jsonObject),
|
|
349
|
+
variant: o$8(object({
|
|
350
|
+
name: extensionName,
|
|
351
|
+
version,
|
|
352
|
+
config: jsonObject
|
|
353
|
+
})),
|
|
354
|
+
parentRegionId: o$8(nonempty),
|
|
355
|
+
targetRegionId: o$8(nonempty)
|
|
356
|
+
});
|
|
357
|
+
var tableRule = object({
|
|
358
|
+
id: nonempty,
|
|
359
|
+
kind: oneOf("table"),
|
|
360
|
+
tableStyleId: o$8(nonempty),
|
|
361
|
+
style: o$8(tableStyle),
|
|
362
|
+
columns: array(columnRule, 1),
|
|
363
|
+
rows: array(rowRule, 1),
|
|
364
|
+
merges: array(mergeRule),
|
|
365
|
+
regions: array(regionRule)
|
|
366
|
+
});
|
|
367
|
+
var blockRule = tagged("kind", {
|
|
368
|
+
paragraph: object({
|
|
369
|
+
id: nonempty,
|
|
370
|
+
kind: oneOf("paragraph"),
|
|
371
|
+
content: array(inlineRule),
|
|
372
|
+
paragraphStyleId: o$8(nonempty),
|
|
373
|
+
paragraphStyle: o$8(paragraphStyleRule),
|
|
374
|
+
...styled
|
|
375
|
+
}),
|
|
376
|
+
table: tableRule
|
|
377
|
+
});
|
|
378
|
+
/** 为三类样式复用相同定义外形,具体属性保持各自的闭合 schema。 */
|
|
379
|
+
var styleDefinition = (properties, extra = {}) => object({
|
|
380
|
+
name: o$8(string),
|
|
381
|
+
basedOn: o$8(nonempty),
|
|
382
|
+
properties,
|
|
383
|
+
...extra
|
|
384
|
+
});
|
|
385
|
+
/** 字段工厂和文档根复用同一闭合绑定规则,不接受运行时值或重复 ID 字段。 */
|
|
386
|
+
var bindingRule = object({
|
|
387
|
+
pathTemplate: nonempty,
|
|
388
|
+
source: object({
|
|
389
|
+
modelLink: nonempty,
|
|
390
|
+
fieldLink: nonempty,
|
|
391
|
+
fieldType: nonempty,
|
|
392
|
+
businessType: o$8(nonempty),
|
|
393
|
+
refModelKey: o$8(nonempty),
|
|
394
|
+
inputPolicy: o$8(object({
|
|
395
|
+
required: o$8(oneOf(true)),
|
|
396
|
+
disabled: o$8(oneOf(true))
|
|
397
|
+
})),
|
|
398
|
+
recordNumberRole: o$8(oneOf("unique", "link")),
|
|
399
|
+
isLinkedModelField: boolean,
|
|
400
|
+
subFieldKey: o$8(nullable(string)),
|
|
401
|
+
belongingObject: o$8(nullable(string))
|
|
402
|
+
})
|
|
403
|
+
});
|
|
404
|
+
/** 文档与片段共享相同样式字典协议。 */
|
|
405
|
+
var stylesRule = object({
|
|
406
|
+
text: record(styleDefinition(textStyleRule)),
|
|
407
|
+
paragraph: record(styleDefinition(paragraphStyleRule, { textStyleId: o$8(nonempty) })),
|
|
408
|
+
table: record(styleDefinition(tableStyle))
|
|
409
|
+
});
|
|
410
|
+
/** 对象 URL 随浏览器会话销毁,不能作为模板资产;稳定 URL 或资源键仍由调用方管理。 */
|
|
411
|
+
var persistentAssetUrl = (value, path, errors) => {
|
|
412
|
+
nonempty(value, path, errors);
|
|
413
|
+
if (isString(value) && /^blob:/i.test(value.trim())) issue(errors, path, "transient_asset_url", "Blob object URL cannot be persisted as a template asset");
|
|
414
|
+
};
|
|
415
|
+
/** 文档与剪贴片段使用相同资源声明,不下载或复制二进制数据。 */
|
|
416
|
+
var imageAssetRule = object({
|
|
417
|
+
kind: oneOf("image"),
|
|
418
|
+
name: o$8(string),
|
|
419
|
+
source: tagged("kind", {
|
|
420
|
+
url: object({
|
|
421
|
+
kind: oneOf("url"),
|
|
422
|
+
url: persistentAssetUrl
|
|
423
|
+
}),
|
|
424
|
+
resource: object({
|
|
425
|
+
kind: oneOf("resource"),
|
|
426
|
+
key: nonempty
|
|
427
|
+
})
|
|
428
|
+
})
|
|
429
|
+
});
|
|
430
|
+
var assetsRule = record(imageAssetRule);
|
|
431
|
+
/** 章节页面声明供独立工厂和整份文档共用。 */
|
|
432
|
+
var pageSettingsRule = object({
|
|
433
|
+
sizePx: size,
|
|
434
|
+
marginsPx: insets,
|
|
435
|
+
headerDistancePx: o$8(length),
|
|
436
|
+
footerDistancePx: o$8(length),
|
|
437
|
+
gutterPx: o$8(length),
|
|
438
|
+
differentFirstPage: o$8(boolean)
|
|
439
|
+
});
|
|
440
|
+
/** 页眉/页脚内容只保存一次,槽引用在文档级核对。 */
|
|
441
|
+
var partRule = object({
|
|
442
|
+
id: nonempty,
|
|
443
|
+
kind: oneOf("header", "footer"),
|
|
444
|
+
blocks: blockList
|
|
445
|
+
});
|
|
446
|
+
/** 浮层锚点与拥有内容,不包含真实排版页或画布节点。 */
|
|
447
|
+
var overlayRule = object({
|
|
448
|
+
id: nonempty,
|
|
449
|
+
kind: oneOf("overlay"),
|
|
450
|
+
preferredSizePx: o$8(size),
|
|
451
|
+
zIndex: o$8(number(0, true)),
|
|
452
|
+
blocks: blockList,
|
|
453
|
+
anchor: object({
|
|
454
|
+
origin: oneOf("page", "content"),
|
|
455
|
+
offsetPx: object({
|
|
456
|
+
x: number(),
|
|
457
|
+
y: number()
|
|
458
|
+
}),
|
|
459
|
+
target: tagged("kind", {
|
|
460
|
+
everyPage: object({ kind: oneOf("everyPage") }),
|
|
461
|
+
sectionPage: object({
|
|
462
|
+
kind: oneOf("sectionPage"),
|
|
463
|
+
pageNumber: number(1, true)
|
|
464
|
+
})
|
|
465
|
+
})
|
|
466
|
+
})
|
|
467
|
+
});
|
|
468
|
+
/** 单节拥有关系和声明,几何/部件引用在语义校验中核对。 */
|
|
469
|
+
var sectionRule = object({
|
|
470
|
+
id: nonempty,
|
|
471
|
+
kind: oneOf("section"),
|
|
472
|
+
page: pageSettingsRule,
|
|
473
|
+
headerSlots: o$8(slots),
|
|
474
|
+
footerSlots: o$8(slots),
|
|
475
|
+
blocks: blockList,
|
|
476
|
+
overlays: array(overlayRule)
|
|
477
|
+
});
|
|
478
|
+
/** 原生 v1 的闭合根结构;ID/引用环/表格范围等跨对象约束由语义校验补充。 */
|
|
479
|
+
var documentRule = object({
|
|
480
|
+
format: oneOf("gct.document"),
|
|
481
|
+
schemaVersion: oneOf(1),
|
|
482
|
+
id: nonempty,
|
|
483
|
+
kind: oneOf("document"),
|
|
484
|
+
settings: object({
|
|
485
|
+
defaultTextStyleId: nonempty,
|
|
486
|
+
defaultParagraphStyleId: nonempty,
|
|
487
|
+
pageBackground: o$8(nonempty),
|
|
488
|
+
evenOddHeaders: o$8(boolean)
|
|
489
|
+
}),
|
|
490
|
+
styles: stylesRule,
|
|
491
|
+
assets: assetsRule,
|
|
492
|
+
bindings: record(bindingRule),
|
|
493
|
+
business: object({
|
|
494
|
+
schemaVersion: oneOf(1),
|
|
495
|
+
validation: o$8(object({ keepExceptionHighlight: o$8(boolean) })),
|
|
496
|
+
configs: o$8(record(object({
|
|
497
|
+
version,
|
|
498
|
+
value: jsonObject
|
|
499
|
+
})))
|
|
500
|
+
}),
|
|
501
|
+
parts: array(partRule),
|
|
502
|
+
sections: array(sectionRule, 1)
|
|
503
|
+
});
|
|
504
|
+
/** 片段不是缩小版假文档,不制造章节/页面身份来复用校验。 */
|
|
505
|
+
var fragmentRule = object({
|
|
506
|
+
format: oneOf("gct.fragment"),
|
|
507
|
+
schemaVersion: oneOf(1),
|
|
508
|
+
sourceDocumentId: nonempty,
|
|
509
|
+
blocks: blockList,
|
|
510
|
+
styles: stylesRule,
|
|
511
|
+
assets: assetsRule,
|
|
512
|
+
bindings: record(bindingRule)
|
|
513
|
+
});
|
|
514
|
+
/** 差量/属性槽在文档之外增加少量包装,内部守卫为这些层预留固定余量。 */
|
|
515
|
+
var MAX_EDIT_DATA_DEPTH = 508;
|
|
516
|
+
/**
|
|
517
|
+
* 校验局部 JSON;baseDepth 表达真实深度,描述符检查避免执行访问器。
|
|
518
|
+
* 公开对象输入可显式允许省略 undefined 属性;内部复制、日志及数组元素仍使用严格默认值。
|
|
519
|
+
*/
|
|
520
|
+
function validateJsonValue(value, maxDepth = 200, baseDepth = 0, omitUndefinedProperties = false) {
|
|
521
|
+
if (!isInteger(maxDepth) || maxDepth < 1 || maxDepth > 500) throw new RangeError(`maxDepth must be an integer between 1 and 500`);
|
|
522
|
+
if (!isInteger(baseDepth) || baseDepth < 0 || baseDepth > 500) throw new RangeError(`baseDepth must be an integer between 0 and 500`);
|
|
523
|
+
return checkJsonValue(value, maxDepth, baseDepth, omitUndefinedProperties);
|
|
524
|
+
}
|
|
525
|
+
/** 编辑载荷和日志的完整 JSON 守卫;固定包装余量不改变文档提交时的实际深度限制。 @internal */
|
|
526
|
+
function validateEditData(value, omitUndefinedProperties = false) {
|
|
527
|
+
return checkJsonValue(value, MAX_EDIT_DATA_DEPTH, 0, omitUndefinedProperties);
|
|
528
|
+
}
|
|
529
|
+
/** 共用可序列化性、描述符、环和深度遍历,边界调用方分别选择文档或差量的深度。 */
|
|
530
|
+
function checkJsonValue(value, maxDepth, baseDepth, omitUndefinedProperties = false) {
|
|
531
|
+
const issues = [];
|
|
532
|
+
const ancestors = /* @__PURE__ */ new Set();
|
|
533
|
+
/** 沿当前祖先链检测环,允许无环的共享对象;深度限制防止递归溢出。 */
|
|
534
|
+
function visit(v, p, depth) {
|
|
535
|
+
if (depth > maxDepth) {
|
|
536
|
+
issue(issues, p, "depth", `JSON exceeds maxDepth=${maxDepth}`);
|
|
537
|
+
return;
|
|
538
|
+
}
|
|
539
|
+
if (isNull(v) || isString(v) || isBoolean(v)) return;
|
|
540
|
+
if (isNumber(v)) {
|
|
541
|
+
if (!isFinite(v)) issue(issues, p, "json", "Non-finite number");
|
|
542
|
+
return;
|
|
543
|
+
}
|
|
544
|
+
if (!isObjectValue(v) || isFunction(v)) {
|
|
545
|
+
issue(issues, p, "json", "Not a JSON value");
|
|
546
|
+
return;
|
|
547
|
+
}
|
|
548
|
+
if (ancestors.has(v)) {
|
|
549
|
+
issue(issues, p, "json_cycle", "Cyclic object");
|
|
550
|
+
return;
|
|
551
|
+
}
|
|
552
|
+
if (!isArray(v) && Object.getPrototypeOf(v) !== Object.prototype && !isNull(Object.getPrototypeOf(v))) {
|
|
553
|
+
issue(issues, p, "json", "Expected plain object");
|
|
554
|
+
return;
|
|
555
|
+
}
|
|
556
|
+
ancestors.add(v);
|
|
557
|
+
if (isArray(v)) {
|
|
558
|
+
for (let i = 0; i < v.length; i++) if (!Object.hasOwn(v, i)) issue(issues, at(p, i), "json", "Sparse array");
|
|
559
|
+
}
|
|
560
|
+
for (const key of Reflect.ownKeys(v)) {
|
|
561
|
+
if (isArray(v) && key === "length") continue;
|
|
562
|
+
if (!isString(key)) {
|
|
563
|
+
issue(issues, p, "json", "Symbol key");
|
|
564
|
+
continue;
|
|
565
|
+
}
|
|
566
|
+
const descriptor = Object.getOwnPropertyDescriptor(v, key);
|
|
567
|
+
if (!descriptor.enumerable || !Object.hasOwn(descriptor, "value")) {
|
|
568
|
+
issue(issues, at(p, key), "json", "Accessor or non-enumerable property");
|
|
569
|
+
continue;
|
|
570
|
+
}
|
|
571
|
+
if (isArray(v) && (!/^(0|[1-9]\d*)$/.test(key) || Number(key) >= v.length)) {
|
|
572
|
+
issue(issues, at(p, key), "json", "Non-index array property");
|
|
573
|
+
continue;
|
|
574
|
+
}
|
|
575
|
+
if (omitUndefinedProperties && !isArray(v) && isUndefined(descriptor.value)) continue;
|
|
576
|
+
visit(descriptor.value, at(p, key), depth + 1);
|
|
577
|
+
}
|
|
578
|
+
ancestors.delete(v);
|
|
579
|
+
}
|
|
580
|
+
visit(value, "", baseDepth);
|
|
581
|
+
return issues;
|
|
582
|
+
}
|
|
583
|
+
// src/model/editor/editor-data.ts
|
|
584
|
+
/**
|
|
585
|
+
* @file 编辑载荷工具:隔离输入、比较与冻结 JSON、读写属性存在性,以及统一的 ModelEditError。
|
|
586
|
+
* 阅读定位:editor/ · 创建、编辑、事务、差量与历史。
|
|
587
|
+
*/
|
|
588
|
+
/** 编辑前置条件、版本冲突或不允许的结构操作统一抛出此错误;失败事务不会提交。 */
|
|
589
|
+
var ModelEditError = class extends Error {
|
|
590
|
+
code;
|
|
591
|
+
/** 保留机器可判断的错误码,便于宿主区分冲突、非法位置和生命周期错误。 */
|
|
592
|
+
constructor(code, message) {
|
|
593
|
+
super(message);
|
|
594
|
+
this.code = code;
|
|
595
|
+
this.name = "ModelEditError";
|
|
596
|
+
}
|
|
597
|
+
};
|
|
598
|
+
/** 复制已通过 JSON 边界的内部载荷,仅隔离引用;外部输入使用 copyData / copyInputData。 */
|
|
599
|
+
function cloneJsonData(value) {
|
|
600
|
+
return JSON.parse(JSON.stringify(value));
|
|
601
|
+
}
|
|
602
|
+
/** 隔离局部载荷并完整检查 JSON;包装深度不替代文档提交边界,也不用于输入时复制整树。 */
|
|
603
|
+
function copyData(value) {
|
|
604
|
+
const issues = validateEditData(value);
|
|
605
|
+
if (issues.length) throw new ModelEditError("json", `${issues[0].path}: ${issues[0].message}`);
|
|
606
|
+
return cloneJsonData(value);
|
|
607
|
+
}
|
|
608
|
+
/** 隔离公开输入并省略对象中的 undefined;数组元素、访问器、必填根值和非法 JSON 仍拒绝。 */
|
|
609
|
+
function copyInputData(value) {
|
|
610
|
+
const issues = validateEditData(value, true);
|
|
611
|
+
if (issues.length) throw new ModelEditError("json", `${issues[0].path}: ${issues[0].message}`);
|
|
612
|
+
return cloneJsonData(value);
|
|
613
|
+
}
|
|
614
|
+
/** 比较已通过输入边界的 JSON 声明,忽略对象键顺序;不代替 JSON 校验或属性存在性检查。 */
|
|
615
|
+
function equalData(a, b) {
|
|
616
|
+
return isEqual(a, b);
|
|
617
|
+
}
|
|
618
|
+
/** 冻结脱离文档的事件载荷,避免订阅方改坏撤销历史;绝不冻结可编辑文档本身。 */
|
|
619
|
+
function freezeData(value) {
|
|
620
|
+
if (isObjectValue(value) && !isFunction(value) && !Object.isFrozen(value)) {
|
|
621
|
+
Object.values(value).forEach(freezeData);
|
|
622
|
+
Object.freeze(value);
|
|
623
|
+
}
|
|
624
|
+
return value;
|
|
625
|
+
}
|
|
626
|
+
/** 借用已验证对象的属性槽供即时比较;记录操作时由 ModelEditor.record 统一隔离快照。 */
|
|
627
|
+
function readPropertyValue(target, key) {
|
|
628
|
+
return Object.hasOwn(target, key) ? {
|
|
629
|
+
present: true,
|
|
630
|
+
value: target[key]
|
|
631
|
+
} : { present: false };
|
|
632
|
+
}
|
|
633
|
+
/** 写入已预检的属性槽并隔离日志引用,使用自有属性定义避免特殊键触发原型 setter。 */
|
|
634
|
+
function writeProperty(target, key, value) {
|
|
635
|
+
if (!value.present) delete target[key];
|
|
636
|
+
else Object.defineProperty(target, key, {
|
|
637
|
+
value: cloneJsonData(value.value),
|
|
638
|
+
writable: true,
|
|
639
|
+
enumerable: true,
|
|
640
|
+
configurable: true
|
|
641
|
+
});
|
|
642
|
+
}
|
|
643
|
+
// src/model/config/config-references.ts
|
|
644
|
+
/**
|
|
645
|
+
* @file 配置引用契约:只沿 schema 声明的路径读取或重写核心身份,供校验、查询和复制共用。
|
|
646
|
+
* 阅读定位:config/ · 配置注册与显式核心引用。
|
|
647
|
+
*/
|
|
648
|
+
/** 核心引用类别的唯一清单,同时提供 TS 类型与注册时校验。 */
|
|
649
|
+
var configReferenceKinds = [
|
|
650
|
+
"entity",
|
|
651
|
+
"binding",
|
|
652
|
+
"asset",
|
|
653
|
+
"textStyle",
|
|
654
|
+
"paragraphStyle",
|
|
655
|
+
"tableStyle"
|
|
656
|
+
];
|
|
657
|
+
/** 访问声明路径的实际叶子;只沿 own 属性读取,不扫描或猜测其他字符串。 */
|
|
658
|
+
function visitReferences(config, rules, action) {
|
|
659
|
+
const seen = /* @__PURE__ */ new Set();
|
|
660
|
+
/** 根据数组通配符展开一条路径,并在最后核对非空身份。 */
|
|
661
|
+
const visit = (value, rule, depth, path) => {
|
|
662
|
+
if (isNull(value)) return;
|
|
663
|
+
if (!isObjectValue(value) || isFunction(value)) throw new ModelEditError("config_reference", `Reference path crosses a scalar at ${path}`);
|
|
664
|
+
const key = rule.path[depth];
|
|
665
|
+
if (key === "*" && !isArray(value)) throw new ModelEditError("config_reference", `Reference wildcard requires an array at ${path}`);
|
|
666
|
+
const keys = key === "*" ? Object.keys(value) : [key];
|
|
667
|
+
for (const part of keys) {
|
|
668
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, part);
|
|
669
|
+
if (!descriptor) continue;
|
|
670
|
+
if (!("value" in descriptor)) throw new ModelEditError("config_reference", "Reference paths cannot read accessors");
|
|
671
|
+
const child = descriptor.value, next = at(path, part);
|
|
672
|
+
if (depth + 1 < rule.path.length) visit(child, rule, depth + 1, next);
|
|
673
|
+
else if (!isNull(child)) {
|
|
674
|
+
if (!isString(child) || !child.trim()) throw new ModelEditError("config_reference", `Expected nonempty reference at ${next}`);
|
|
675
|
+
if (seen.has(next)) throw new ModelEditError("config_reference", `Overlapping reference declarations at ${next}`);
|
|
676
|
+
seen.add(next);
|
|
677
|
+
action(value, part, next, rule.kind, child);
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
};
|
|
681
|
+
rules.forEach((rule) => visit(config, rule, 0, ""));
|
|
682
|
+
}
|
|
683
|
+
/** 将 schema 中明确声明的引用投影为统一查询目标,不执行业务或读取外部系统。 */
|
|
684
|
+
function readConfigReferences(config, rules) {
|
|
685
|
+
const result = [];
|
|
686
|
+
visitReferences(config, rules, (_parent, _key, path, kind, id) => {
|
|
687
|
+
const target = kind === "entity" || kind === "binding" || kind === "asset" ? {
|
|
688
|
+
kind,
|
|
689
|
+
id
|
|
690
|
+
} : {
|
|
691
|
+
kind: "style",
|
|
692
|
+
styleKind: kind === "textStyle" ? "text" : kind === "paragraphStyle" ? "paragraph" : "table",
|
|
693
|
+
id
|
|
694
|
+
};
|
|
695
|
+
result.push({
|
|
696
|
+
path,
|
|
697
|
+
target
|
|
698
|
+
});
|
|
699
|
+
});
|
|
700
|
+
return result;
|
|
701
|
+
}
|
|
702
|
+
/** 重写已经隔离的配置副本,映射中没有的外部引用保持原值。 */
|
|
703
|
+
function remapConfigReferences(config, rules, maps) {
|
|
704
|
+
visitReferences(config, rules, (parent, key, _path, kind, id) => {
|
|
705
|
+
const mapped = maps[kind]?.get(id);
|
|
706
|
+
if (!isUndefined(mapped)) Object.defineProperty(parent, key, {
|
|
707
|
+
value: mapped,
|
|
708
|
+
writable: true,
|
|
709
|
+
enumerable: true,
|
|
710
|
+
configurable: true
|
|
711
|
+
});
|
|
712
|
+
});
|
|
713
|
+
}
|
|
714
|
+
// src/model/business/field-schema-common.ts
|
|
715
|
+
/**
|
|
716
|
+
* @file 字段校验公共规则:复用字段共性、文本约束、校验细化和字段 schema 构造逻辑。
|
|
717
|
+
* 阅读定位:business/ · 业务配置类型及对应 schema。
|
|
718
|
+
*/
|
|
719
|
+
/** 文本与可输入记录选择器使用同一组闭合约束,避免校验规则逐组件漂移。 */
|
|
720
|
+
var textConstraintProperties = {
|
|
721
|
+
minLength: optionalConfig(number(0, true)),
|
|
722
|
+
maxLength: optionalConfig(number(0, true)),
|
|
723
|
+
regex: optionalConfig(string),
|
|
724
|
+
regexHint: optionalConfig(string)
|
|
725
|
+
};
|
|
726
|
+
/** 校验文本上下限的关系;null 和缺省均不构成限制,零是明确的上限或下限。 */
|
|
727
|
+
var checkTextConstraints = (value, path, errors) => {
|
|
728
|
+
const config = value;
|
|
729
|
+
if (isNotNil(config.minLength) && isNotNil(config.maxLength) && config.minLength > config.maxLength) issue(errors, path, "config_range", "minLength exceeds maxLength");
|
|
730
|
+
};
|
|
731
|
+
/** 所有常用字段共用的闭合属性,默认值和业务专属键由具体 schema 定义。 */
|
|
732
|
+
var fieldConfigProperties = {
|
|
733
|
+
required: optionalConfig(boolean),
|
|
734
|
+
readonly: optionalConfig(boolean),
|
|
735
|
+
disabled: optionalConfig(boolean),
|
|
736
|
+
label: optionalConfig(string),
|
|
737
|
+
designPlaceholder: optionalConfig(string),
|
|
738
|
+
keepExceptionHighlight: optionalConfig(boolean),
|
|
739
|
+
readonlyAction: optionalConfig(oneOf("trace", "sop")),
|
|
740
|
+
placeholder: optionalConfig(string),
|
|
741
|
+
viewState: optionalConfig(oneOf("readonly", "disabled", "auto")),
|
|
742
|
+
cannotInput: optionalConfig(boolean),
|
|
743
|
+
designLocked: optionalConfig(boolean),
|
|
744
|
+
emptySymbol: optionalConfig(string),
|
|
745
|
+
valueChangeSources: optionalConfig(array(nonempty)),
|
|
746
|
+
dependencies: optionalConfig(array(object({
|
|
747
|
+
effect: oneOf("hidden", "readonly", "disabled", "required", "assignment"),
|
|
748
|
+
expression: optionalConfig(string),
|
|
749
|
+
expressionLabel: optionalConfig(string),
|
|
750
|
+
strategy: optionalConfig(oneOf("alwaysCover", "notCovered")),
|
|
751
|
+
value: optionalConfig(boolean)
|
|
752
|
+
})))
|
|
753
|
+
};
|
|
754
|
+
/** 先检查形状,再运行跨属性规则,避免错误结构进入类型化读取。 */
|
|
755
|
+
function refine(shape, check) {
|
|
756
|
+
return (value, path, errors) => {
|
|
757
|
+
const before = errors.length;
|
|
758
|
+
shape(value, path, errors);
|
|
759
|
+
if (errors.length === before) check(value, path, errors);
|
|
760
|
+
};
|
|
761
|
+
}
|
|
762
|
+
/** 组合共同依赖规则和业务专属语义,复用同一套作用唯一性与赋值策略检查。 */
|
|
763
|
+
function fieldRule(shape, check) {
|
|
764
|
+
return refine(shape, (value, path, errors) => {
|
|
765
|
+
const effects = /* @__PURE__ */ new Set();
|
|
766
|
+
const config = value;
|
|
767
|
+
config.dependencies?.forEach((dependency, i) => {
|
|
768
|
+
if (effects.has(dependency.effect)) issue(errors, `${path}/dependencies/${i}`, "dependency_duplicate", "Duplicate dependency effect");
|
|
769
|
+
effects.add(dependency.effect);
|
|
770
|
+
if (isNotNil(dependency.strategy) && dependency.effect !== "assignment") issue(errors, `${path}/dependencies/${i}/strategy`, "dependency_strategy", "Only assignment accepts strategy");
|
|
771
|
+
});
|
|
772
|
+
const sources = config.valueChangeSources;
|
|
773
|
+
if (sources && new Set(sources).size !== sources.length) issue(errors, `${path}/valueChangeSources`, "data_source_duplicate", "Duplicate source key");
|
|
774
|
+
check?.(value, path, errors);
|
|
775
|
+
});
|
|
776
|
+
}
|
|
777
|
+
// src/model/business/material-schema.ts
|
|
778
|
+
/**
|
|
779
|
+
* @file 物耗与对象初始化校验:检查设计配置及对象唯一性,不保存接口记录快照。
|
|
780
|
+
* 阅读定位:business/ · 业务配置类型及对应 schema。
|
|
781
|
+
*/
|
|
782
|
+
var o$7 = optionalConfig;
|
|
783
|
+
var formula = object({
|
|
784
|
+
expression: o$7(string),
|
|
785
|
+
label: o$7(string)
|
|
786
|
+
});
|
|
787
|
+
var product = {
|
|
788
|
+
productId: o$7(string),
|
|
789
|
+
quantity: o$7(number(0))
|
|
790
|
+
};
|
|
791
|
+
var loading = {
|
|
792
|
+
loading: o$7(oneOf("by_lot", "by_number", "view")),
|
|
793
|
+
stock: o$7(object({
|
|
794
|
+
enabled: o$7(boolean),
|
|
795
|
+
source: o$7(oneOf("common", "custom")),
|
|
796
|
+
warehouseId: o$7(string),
|
|
797
|
+
locationId: o$7(string),
|
|
798
|
+
overrides: o$7(array(object({
|
|
799
|
+
shopfloorId: o$7(string),
|
|
800
|
+
warehouseId: o$7(string),
|
|
801
|
+
locationId: o$7(string)
|
|
802
|
+
})))
|
|
803
|
+
})),
|
|
804
|
+
quantityValidation: o$7(object({
|
|
805
|
+
enabled: o$7(boolean),
|
|
806
|
+
operator: o$7(oneOf("eq", "gte", "lte", "bounds")),
|
|
807
|
+
maximum: o$7(formula),
|
|
808
|
+
minimum: o$7(formula)
|
|
809
|
+
}))
|
|
810
|
+
};
|
|
811
|
+
var barcode = object({
|
|
812
|
+
disabled: o$7(boolean),
|
|
813
|
+
parameter: o$7(oneOf("lot", "uniqueCode")),
|
|
814
|
+
ruleId: o$7(string),
|
|
815
|
+
mappings: o$7(array(object({
|
|
816
|
+
barcodeField: o$7(string),
|
|
817
|
+
fieldPaths: o$7(array(nonempty))
|
|
818
|
+
})))
|
|
819
|
+
});
|
|
820
|
+
var requiredQuantity = object({
|
|
821
|
+
mode: o$7(oneOf("lotQty", "productQty", "custom")),
|
|
822
|
+
productionFieldKey: o$7(string)
|
|
823
|
+
});
|
|
824
|
+
/** 初值是明确的 JSON 常量载荷;动态字段键不放宽外围配置白名单。 */
|
|
825
|
+
var literal$1 = (value, path, errors) => {
|
|
826
|
+
for (const error of validateJsonValue(value, 500)) issue(errors, `${path}${error.path}`, error.code, error.message);
|
|
827
|
+
};
|
|
828
|
+
/** 对象声明的字段键唯一,避免后写配置覆盖前一项;主表初值仍保持原先的填空语义。 */
|
|
829
|
+
var materialObjectRule = object({
|
|
830
|
+
objectFieldKey: nonempty,
|
|
831
|
+
values: o$7(record(literal$1)),
|
|
832
|
+
barcode: o$7(barcode),
|
|
833
|
+
mode: o$7(oneOf("record", "bom")),
|
|
834
|
+
customPolicy: o$7(boolean),
|
|
835
|
+
policy: o$7(object(loading))
|
|
836
|
+
});
|
|
837
|
+
/** 同一对象只能初始化一次,不把业务键认作文档节点身份。 */
|
|
838
|
+
var checkMaterialObjects = (value, path, errors) => {
|
|
839
|
+
const config = value, seen = /* @__PURE__ */ new Set();
|
|
840
|
+
config.objects?.forEach((item, i) => {
|
|
841
|
+
if (seen.has(item.objectFieldKey)) issue(errors, `${path}/objects/${i}/objectFieldKey`, "material_object_duplicate", "Duplicate material object initialization");
|
|
842
|
+
seen.add(item.objectFieldKey);
|
|
843
|
+
});
|
|
844
|
+
};
|
|
845
|
+
/** 明细业务身份与字段地址不要求在画布上出现,不注册为核心引用。 */
|
|
846
|
+
var materialTableSchema = {
|
|
847
|
+
scope: "variant",
|
|
848
|
+
name: "edhr:material-consume",
|
|
849
|
+
version: 1,
|
|
850
|
+
regionTypes: ["material-consume-table"],
|
|
851
|
+
referencePaths: [],
|
|
852
|
+
rule: refine(object({
|
|
853
|
+
mode: o$7(oneOf("record", "bom")),
|
|
854
|
+
loadingModel: o$7(boolean),
|
|
855
|
+
initialize: o$7(boolean),
|
|
856
|
+
customMaterials: o$7(boolean),
|
|
857
|
+
sequential: o$7(boolean),
|
|
858
|
+
barcode: o$7(barcode),
|
|
859
|
+
requiredQuantity: o$7(requiredQuantity),
|
|
860
|
+
entries: o$7(array(object({
|
|
861
|
+
...product,
|
|
862
|
+
...loading,
|
|
863
|
+
required: o$7(boolean),
|
|
864
|
+
barcode: o$7(barcode),
|
|
865
|
+
requiredQuantity: o$7(requiredQuantity),
|
|
866
|
+
substitutes: o$7(object({
|
|
867
|
+
enabled: o$7(boolean),
|
|
868
|
+
strategy: o$7(oneOf("only_one", "mixing")),
|
|
869
|
+
materials: o$7(array(object(product)))
|
|
870
|
+
})),
|
|
871
|
+
lotMixing: o$7(object({
|
|
872
|
+
enabled: o$7(boolean),
|
|
873
|
+
limit: o$7(number(0, true))
|
|
874
|
+
})),
|
|
875
|
+
specifiedLots: o$7(object({
|
|
876
|
+
enabled: o$7(boolean),
|
|
877
|
+
entries: o$7(array(object({
|
|
878
|
+
name: o$7(string),
|
|
879
|
+
productionIdentificationId: o$7(string)
|
|
880
|
+
})))
|
|
881
|
+
}))
|
|
882
|
+
})))
|
|
883
|
+
}), (value, path, errors) => {
|
|
884
|
+
const config = value, products = /* @__PURE__ */ new Set();
|
|
885
|
+
config.entries?.forEach((entry, i) => {
|
|
886
|
+
if (entry.productId && products.has(entry.productId)) issue(errors, `${path}/entries/${i}/productId`, "material_product_duplicate", "Duplicate BOM material");
|
|
887
|
+
if (entry.productId) products.add(entry.productId);
|
|
888
|
+
const substitutes = /* @__PURE__ */ new Set();
|
|
889
|
+
entry.substitutes?.materials?.forEach((material, j) => {
|
|
890
|
+
if (material.productId && (material.productId === entry.productId || substitutes.has(material.productId))) issue(errors, `${path}/entries/${i}/substitutes/materials/${j}/productId`, "material_substitute_duplicate", "Duplicate substitute or main material");
|
|
891
|
+
if (material.productId) substitutes.add(material.productId);
|
|
892
|
+
});
|
|
893
|
+
});
|
|
894
|
+
})
|
|
895
|
+
};
|
|
896
|
+
// src/model/business/relation-schema.ts
|
|
897
|
+
/**
|
|
898
|
+
* @file 关联业务校验:约束人员、部门、记录关联与 SOP 版本配置,检查集合身份和展示列。
|
|
899
|
+
* 阅读定位:business/ · 业务配置类型及对应 schema。
|
|
900
|
+
*/
|
|
901
|
+
var o$6 = optionalConfig;
|
|
902
|
+
/** 校验集合身份与显示列唯一性,不自动去重从而改变设计顺序。 */
|
|
903
|
+
var checkRelation = (value, path, errors) => {
|
|
904
|
+
const config = value;
|
|
905
|
+
checkTextConstraints(value, path, errors);
|
|
906
|
+
for (const [name, keys] of [
|
|
907
|
+
["searchFields", config.searchFields],
|
|
908
|
+
["displayFields", config.displayFields?.map((column) => column.key)],
|
|
909
|
+
["autofill/rules", config.autofill?.rules.map((rule) => rule.id)]
|
|
910
|
+
]) if (keys && uniq(keys ?? []).length !== keys.length) issue(errors, `${path}/${name}`, "relation_duplicate", "Duplicate relation declaration");
|
|
911
|
+
};
|
|
912
|
+
var relationRule = fieldRule(object({
|
|
913
|
+
...fieldConfigProperties,
|
|
914
|
+
...textConstraintProperties,
|
|
915
|
+
defaultValue: o$6(string),
|
|
916
|
+
hideSingleVersion: o$6(boolean),
|
|
917
|
+
searchFields: o$6(array(nonempty)),
|
|
918
|
+
displayFields: o$6(array(object({
|
|
919
|
+
key: nonempty,
|
|
920
|
+
label: string,
|
|
921
|
+
locked: o$6(boolean),
|
|
922
|
+
modelPath: o$6(array(nonempty))
|
|
923
|
+
}))),
|
|
924
|
+
barcodeParsing: o$6(object({
|
|
925
|
+
ruleId: o$6(nonempty),
|
|
926
|
+
fills: o$6(array(object({
|
|
927
|
+
source: o$6(string),
|
|
928
|
+
targets: o$6(array(object({
|
|
929
|
+
modelKey: nonempty,
|
|
930
|
+
fieldKey: nonempty
|
|
931
|
+
})))
|
|
932
|
+
})))
|
|
933
|
+
})),
|
|
934
|
+
deviceFilter: o$6(object({
|
|
935
|
+
enabled: boolean,
|
|
936
|
+
groupId: o$6(nonempty)
|
|
937
|
+
})),
|
|
938
|
+
associationFilter: o$6(object({
|
|
939
|
+
enabled: boolean,
|
|
940
|
+
source: o$6(object({
|
|
941
|
+
fieldKey: nonempty,
|
|
942
|
+
subFieldKey: o$6(nonempty),
|
|
943
|
+
fieldType: o$6(oneOf("mfg_order", "material_no"))
|
|
944
|
+
}))
|
|
945
|
+
})),
|
|
946
|
+
autofill: o$6(object({
|
|
947
|
+
enabled: boolean,
|
|
948
|
+
rules: array(object({
|
|
949
|
+
id: nonempty,
|
|
950
|
+
source: nonempty,
|
|
951
|
+
target: object({
|
|
952
|
+
modelKey: nonempty,
|
|
953
|
+
fieldKey: nonempty,
|
|
954
|
+
subFieldKey: o$6(nonempty),
|
|
955
|
+
fieldType: o$6(nonempty)
|
|
956
|
+
})
|
|
957
|
+
}))
|
|
958
|
+
}))
|
|
959
|
+
}), checkRelation);
|
|
960
|
+
/** 人员/部门、记录关联和 SOP 版本的纯声明 schema,不注册业务请求或 Vue 状态。 */
|
|
961
|
+
var relationFieldSchemas = [
|
|
962
|
+
{
|
|
963
|
+
referencePaths: [],
|
|
964
|
+
scope: "field",
|
|
965
|
+
name: "user",
|
|
966
|
+
version: 1,
|
|
967
|
+
rule: fieldRule(object({
|
|
968
|
+
...fieldConfigProperties,
|
|
969
|
+
defaultValue: o$6(oneOf("current-user"))
|
|
970
|
+
}))
|
|
971
|
+
},
|
|
972
|
+
{
|
|
973
|
+
referencePaths: [],
|
|
974
|
+
scope: "field",
|
|
975
|
+
name: "org",
|
|
976
|
+
version: 1,
|
|
977
|
+
rule: fieldRule(object({
|
|
978
|
+
...fieldConfigProperties,
|
|
979
|
+
defaultValue: o$6(oneOf("current-org"))
|
|
980
|
+
}))
|
|
981
|
+
},
|
|
982
|
+
...["relation", "rdo-relation"].map((name) => ({
|
|
983
|
+
referencePaths: [],
|
|
984
|
+
scope: "field",
|
|
985
|
+
name,
|
|
986
|
+
version: 1,
|
|
987
|
+
rule: relationRule
|
|
988
|
+
})),
|
|
989
|
+
{
|
|
990
|
+
referencePaths: [],
|
|
991
|
+
scope: "field",
|
|
992
|
+
name: "sop-version",
|
|
993
|
+
version: 1,
|
|
994
|
+
rule: fieldRule(object({
|
|
995
|
+
...fieldConfigProperties,
|
|
996
|
+
defaultValue: o$6(string),
|
|
997
|
+
sopId: o$6(nonempty),
|
|
998
|
+
refModelKey: o$6(nonempty)
|
|
999
|
+
})),
|
|
1000
|
+
defaultConfig: { refModelKey: "em_document" }
|
|
1001
|
+
}
|
|
1002
|
+
];
|
|
1003
|
+
// src/model/business/table-variants.ts
|
|
1004
|
+
/** 当前注册业务表的唯一能力清单,声明本身不可变。 */
|
|
1005
|
+
var repeatingTableVariants = Object.freeze([
|
|
1006
|
+
{
|
|
1007
|
+
name: "edhr:warehouse-in",
|
|
1008
|
+
barcode: true,
|
|
1009
|
+
inventory: false
|
|
1010
|
+
},
|
|
1011
|
+
{
|
|
1012
|
+
name: "edhr:warehouse-inbound",
|
|
1013
|
+
barcode: false,
|
|
1014
|
+
inventory: false
|
|
1015
|
+
},
|
|
1016
|
+
{
|
|
1017
|
+
name: "edhr:warehouse-out",
|
|
1018
|
+
barcode: true,
|
|
1019
|
+
inventory: false
|
|
1020
|
+
},
|
|
1021
|
+
{
|
|
1022
|
+
name: "edhr:warehouse-outbound",
|
|
1023
|
+
barcode: false,
|
|
1024
|
+
inventory: false
|
|
1025
|
+
},
|
|
1026
|
+
{
|
|
1027
|
+
name: "edhr:warehouse-in-out",
|
|
1028
|
+
barcode: false,
|
|
1029
|
+
inventory: false
|
|
1030
|
+
},
|
|
1031
|
+
{
|
|
1032
|
+
name: "edhr:warehouse-allocate",
|
|
1033
|
+
barcode: true,
|
|
1034
|
+
inventory: false
|
|
1035
|
+
},
|
|
1036
|
+
{
|
|
1037
|
+
name: "edhr:warehouse-inventory",
|
|
1038
|
+
barcode: true,
|
|
1039
|
+
inventory: true
|
|
1040
|
+
},
|
|
1041
|
+
{
|
|
1042
|
+
name: "edhr:part-stocktake",
|
|
1043
|
+
barcode: false,
|
|
1044
|
+
inventory: false
|
|
1045
|
+
},
|
|
1046
|
+
{
|
|
1047
|
+
name: "edhr:device-part-consume",
|
|
1048
|
+
barcode: false,
|
|
1049
|
+
inventory: false
|
|
1050
|
+
},
|
|
1051
|
+
{
|
|
1052
|
+
name: "edhr:material-balance",
|
|
1053
|
+
barcode: false,
|
|
1054
|
+
inventory: false
|
|
1055
|
+
},
|
|
1056
|
+
{
|
|
1057
|
+
name: "edhr:material-requisition",
|
|
1058
|
+
barcode: false,
|
|
1059
|
+
inventory: false
|
|
1060
|
+
},
|
|
1061
|
+
{
|
|
1062
|
+
name: "edhr:material-substitution",
|
|
1063
|
+
barcode: true,
|
|
1064
|
+
inventory: false
|
|
1065
|
+
},
|
|
1066
|
+
{
|
|
1067
|
+
name: "edhr:entrust-steril-batch-list",
|
|
1068
|
+
barcode: true,
|
|
1069
|
+
inventory: false
|
|
1070
|
+
},
|
|
1071
|
+
{
|
|
1072
|
+
name: "edhr:pretreatment-list",
|
|
1073
|
+
barcode: true,
|
|
1074
|
+
inventory: false
|
|
1075
|
+
}
|
|
1076
|
+
].map((definition) => Object.freeze(definition)));
|
|
1077
|
+
/** 普通动态表、出入库明细和物料平衡沿用快速填报默认值。 */
|
|
1078
|
+
function repeatingTableSettings(name) {
|
|
1079
|
+
return {
|
|
1080
|
+
quickFill: name === void 0 || name === "edhr:warehouse-in-out" || name === "edhr:material-balance",
|
|
1081
|
+
confirmBeforeDelete: name !== "edhr:material-balance"
|
|
1082
|
+
};
|
|
1083
|
+
}
|
|
1084
|
+
// src/model/business/business-schema.ts
|
|
1085
|
+
/**
|
|
1086
|
+
* @file 基础业务 schema 汇总:注册常用字段与表格变体,校验范围、选项、上传和签名等声明。
|
|
1087
|
+
* 阅读定位:business/ · 业务配置类型及对应 schema。
|
|
1088
|
+
*/
|
|
1089
|
+
var o$5 = optionalConfig;
|
|
1090
|
+
/** 业务值允许字符串或有限数值,避免迁移时损失十进制精度。 */
|
|
1091
|
+
var scalar = (v, p, e) => {
|
|
1092
|
+
if (!isString(v) && !isFinite(v)) issue(e, p, "type", "Expected string or finite number");
|
|
1093
|
+
};
|
|
1094
|
+
/** 枚举值只允许 JSON 标量,不接受对象和运行时状态。 */
|
|
1095
|
+
var optionValue = (v, p, e) => {
|
|
1096
|
+
if (!isBoolean(v)) scalar(v, p, e);
|
|
1097
|
+
};
|
|
1098
|
+
var operator = oneOf("le", "lt", "ge", "gt");
|
|
1099
|
+
var boundValues = {
|
|
1100
|
+
value: o$5(scalar),
|
|
1101
|
+
expression: o$5(string),
|
|
1102
|
+
label: o$5(string)
|
|
1103
|
+
};
|
|
1104
|
+
var bound = tagged("kind", {
|
|
1105
|
+
none: object({
|
|
1106
|
+
kind: oneOf("none"),
|
|
1107
|
+
...boundValues,
|
|
1108
|
+
operator: o$5(operator)
|
|
1109
|
+
}),
|
|
1110
|
+
fixed: object({
|
|
1111
|
+
kind: oneOf("fixed"),
|
|
1112
|
+
...boundValues,
|
|
1113
|
+
operator
|
|
1114
|
+
}),
|
|
1115
|
+
expression: object({
|
|
1116
|
+
kind: oneOf("expression"),
|
|
1117
|
+
...boundValues,
|
|
1118
|
+
operator
|
|
1119
|
+
})
|
|
1120
|
+
});
|
|
1121
|
+
var range = refine(object({
|
|
1122
|
+
enabled: boolean,
|
|
1123
|
+
minimum: o$5(bound),
|
|
1124
|
+
maximum: o$5(bound)
|
|
1125
|
+
}), checkRange);
|
|
1126
|
+
var presentation = object({
|
|
1127
|
+
renderAs: o$5(oneOf("radio", "checkbox", "select")),
|
|
1128
|
+
iconLabelSpacePx: o$5(number(0)),
|
|
1129
|
+
labelPosition: o$5(oneOf("before", "after")),
|
|
1130
|
+
direction: o$5(oneOf("portrait", "landscape")),
|
|
1131
|
+
optionSpacingPx: o$5(number(0))
|
|
1132
|
+
});
|
|
1133
|
+
var upload = {
|
|
1134
|
+
maxCount: o$5(number(1, true)),
|
|
1135
|
+
maxSizeMb: o$5(positive),
|
|
1136
|
+
showFileName: o$5(boolean),
|
|
1137
|
+
acceptTypes: o$5(array(nonempty))
|
|
1138
|
+
};
|
|
1139
|
+
/** 图片自适应仅允许单张声明;不在 model 中求布局或强行修改上传数量。 */
|
|
1140
|
+
var checkImage = (v, p, e) => {
|
|
1141
|
+
const c = v;
|
|
1142
|
+
if (c.displayMode === "adaptive" && !isUndefined(c.maxCount) && !isNull(c.maxCount) && c.maxCount !== 1) issue(e, `${p}/maxCount`, "image_count", "Adaptive image field accepts one image");
|
|
1143
|
+
};
|
|
1144
|
+
/** 校验签名规则局部身份和目标存储类型,不读取业务记录或执行填充。 */
|
|
1145
|
+
var checkSignature$1 = (v, p, e) => {
|
|
1146
|
+
const c = v, ids = /* @__PURE__ */ new Set();
|
|
1147
|
+
c.autofill?.rules.forEach((rule, i) => {
|
|
1148
|
+
const path = `${p}/autofill/rules/${i}`;
|
|
1149
|
+
if (ids.has(rule.id)) issue(e, `${path}/id`, "duplicate_id", "Duplicate signature fill rule");
|
|
1150
|
+
ids.add(rule.id);
|
|
1151
|
+
const types = rule.source === "username" ? ["user", "user_multi"] : [
|
|
1152
|
+
"date",
|
|
1153
|
+
"time",
|
|
1154
|
+
"date_time"
|
|
1155
|
+
];
|
|
1156
|
+
if (!includes(types, rule.target.fieldType)) issue(e, `${path}/target/fieldType`, "signature_target", "Signature property and target type differ");
|
|
1157
|
+
});
|
|
1158
|
+
};
|
|
1159
|
+
/** 下界和上界只能使用对应方向的运算符;可直接比较的数值端点不能倒置。 */
|
|
1160
|
+
function checkRange(v, p, e) {
|
|
1161
|
+
const c = v;
|
|
1162
|
+
if (c.minimum?.operator != null && !includes(["ge", "gt"], c.minimum.operator)) issue(e, `${p}/minimum/operator`, "config_range", "Minimum needs ge/gt");
|
|
1163
|
+
if (c.maximum?.operator != null && !includes(["le", "lt"], c.maximum.operator)) issue(e, `${p}/maximum/operator`, "config_range", "Maximum needs le/lt");
|
|
1164
|
+
if (c.minimum?.kind === "fixed" && c.maximum?.kind === "fixed" && isNumber(c.minimum.value) && isNumber(c.maximum.value)) {
|
|
1165
|
+
if (c.minimum.value > c.maximum.value || c.minimum.value === c.maximum.value && (c.minimum.operator === "gt" || c.maximum.operator === "lt")) issue(e, p, "config_range", "Fixed range is empty");
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
/** 数值简单区间与完整范围声明互斥,避免双重数据源。 */
|
|
1169
|
+
var checkNumber = (v, p, e) => {
|
|
1170
|
+
const c = v;
|
|
1171
|
+
if (isNotNil(c.minimum) && isNotNil(c.maximum) && c.minimum > c.maximum) issue(e, p, "config_range", "minimum exceeds maximum");
|
|
1172
|
+
if (c.range && (isNotNil(c.minimum) || isNotNil(c.maximum))) issue(e, p, "config_conflict", "Use range or minimum/maximum");
|
|
1173
|
+
const values = [
|
|
1174
|
+
c.defaultValue,
|
|
1175
|
+
c.range?.minimum?.value,
|
|
1176
|
+
c.range?.maximum?.value
|
|
1177
|
+
];
|
|
1178
|
+
for (const value of values) if (isString(value) && value !== "" && !/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/.test(value)) issue(e, p, "config_number", "Expected decimal text");
|
|
1179
|
+
};
|
|
1180
|
+
/** 校验默认选项只引用本字段,且单选最多只有一个默认值。 */
|
|
1181
|
+
var checkChoice = (v, p, e) => {
|
|
1182
|
+
const c = v, ids = new Set(c.options.map((option) => option.id));
|
|
1183
|
+
const defaults = c.defaultOptionIds ?? [];
|
|
1184
|
+
if (ids.size !== c.options.length) issue(e, `${p}/options`, "duplicate_id", "Duplicate option ID");
|
|
1185
|
+
if (uniq(defaults).length !== defaults.length) issue(e, `${p}/defaultOptionIds`, "duplicate_id", "Duplicate default option");
|
|
1186
|
+
if (!c.multiple && defaults.length > 1) issue(e, `${p}/defaultOptionIds`, "config_choice", "Single choice accepts one default");
|
|
1187
|
+
defaults.forEach((id, i) => {
|
|
1188
|
+
if (!ids.has(id)) issue(e, `${p}/defaultOptionIds/${i}`, "reference", "Missing option");
|
|
1189
|
+
});
|
|
1190
|
+
};
|
|
1191
|
+
/** 常用字段的闭合业务 schema,不接收 computedOptions 等运行时缓存。 */
|
|
1192
|
+
var fieldSchemas = [
|
|
1193
|
+
...relationFieldSchemas,
|
|
1194
|
+
{
|
|
1195
|
+
referencePaths: [],
|
|
1196
|
+
scope: "field",
|
|
1197
|
+
name: "input",
|
|
1198
|
+
version: 1,
|
|
1199
|
+
rule: fieldRule(object({
|
|
1200
|
+
...fieldConfigProperties,
|
|
1201
|
+
placeholder: o$5(string),
|
|
1202
|
+
multiline: o$5(boolean),
|
|
1203
|
+
defaultValue: o$5(string),
|
|
1204
|
+
...textConstraintProperties
|
|
1205
|
+
}), checkTextConstraints)
|
|
1206
|
+
},
|
|
1207
|
+
{
|
|
1208
|
+
referencePaths: [],
|
|
1209
|
+
scope: "field",
|
|
1210
|
+
name: "number",
|
|
1211
|
+
version: 1,
|
|
1212
|
+
rule: fieldRule(object({
|
|
1213
|
+
...fieldConfigProperties,
|
|
1214
|
+
placeholder: o$5(string),
|
|
1215
|
+
defaultValue: o$5(scalar),
|
|
1216
|
+
decimalPlaces: o$5(number(0, true, 14)),
|
|
1217
|
+
rounding: o$5(oneOf("truncate", "half-up", "half-even")),
|
|
1218
|
+
displayMode: o$5(oneOf("origin", "percent")),
|
|
1219
|
+
minimum: o$5(number()),
|
|
1220
|
+
maximum: o$5(number()),
|
|
1221
|
+
range: o$5(range),
|
|
1222
|
+
formTemplate: o$5(object({
|
|
1223
|
+
refId: o$5(nonempty),
|
|
1224
|
+
parentSelection: o$5(oneOf("parent", "default-version"))
|
|
1225
|
+
}))
|
|
1226
|
+
}), checkNumber)
|
|
1227
|
+
},
|
|
1228
|
+
...[
|
|
1229
|
+
"date",
|
|
1230
|
+
"time",
|
|
1231
|
+
"date-time"
|
|
1232
|
+
].map((name) => ({
|
|
1233
|
+
referencePaths: [],
|
|
1234
|
+
scope: "field",
|
|
1235
|
+
name,
|
|
1236
|
+
version: 1,
|
|
1237
|
+
rule: fieldRule(object({
|
|
1238
|
+
...fieldConfigProperties,
|
|
1239
|
+
placeholder: o$5(string),
|
|
1240
|
+
defaultValue: o$5(string),
|
|
1241
|
+
defaultSystemValue: o$5(boolean),
|
|
1242
|
+
timePrecision: o$5(oneOf("hours", "minutes", "seconds")),
|
|
1243
|
+
format: o$5(object({
|
|
1244
|
+
customEnabled: o$5(boolean),
|
|
1245
|
+
separator: o$5(string),
|
|
1246
|
+
template: o$5(string),
|
|
1247
|
+
custom: o$5(string)
|
|
1248
|
+
})),
|
|
1249
|
+
range: o$5(range)
|
|
1250
|
+
}))
|
|
1251
|
+
})),
|
|
1252
|
+
{
|
|
1253
|
+
referencePaths: [],
|
|
1254
|
+
scope: "field",
|
|
1255
|
+
name: "checkbox",
|
|
1256
|
+
version: 1,
|
|
1257
|
+
rule: fieldRule(object({
|
|
1258
|
+
...fieldConfigProperties,
|
|
1259
|
+
defaultValue: o$5(boolean),
|
|
1260
|
+
trueLabel: o$5(string),
|
|
1261
|
+
falseLabel: o$5(string),
|
|
1262
|
+
showMode: o$5(oneOf("onlyTrue", "onlyFalse", "both")),
|
|
1263
|
+
presentation: o$5(presentation)
|
|
1264
|
+
}))
|
|
1265
|
+
},
|
|
1266
|
+
{
|
|
1267
|
+
referencePaths: [],
|
|
1268
|
+
scope: "field",
|
|
1269
|
+
name: "choice",
|
|
1270
|
+
version: 1,
|
|
1271
|
+
rule: fieldRule(object({
|
|
1272
|
+
...fieldConfigProperties,
|
|
1273
|
+
multiple: o$5(boolean),
|
|
1274
|
+
options: array(object({
|
|
1275
|
+
id: nonempty,
|
|
1276
|
+
label: string,
|
|
1277
|
+
value: optionValue,
|
|
1278
|
+
display: o$5(boolean)
|
|
1279
|
+
})),
|
|
1280
|
+
defaultOptionIds: o$5(array(nonempty)),
|
|
1281
|
+
presentation: o$5(presentation)
|
|
1282
|
+
}), checkChoice)
|
|
1283
|
+
},
|
|
1284
|
+
{
|
|
1285
|
+
referencePaths: [],
|
|
1286
|
+
scope: "field",
|
|
1287
|
+
name: "file",
|
|
1288
|
+
version: 1,
|
|
1289
|
+
rule: fieldRule(object({
|
|
1290
|
+
...fieldConfigProperties,
|
|
1291
|
+
...upload
|
|
1292
|
+
}))
|
|
1293
|
+
},
|
|
1294
|
+
{
|
|
1295
|
+
referencePaths: [],
|
|
1296
|
+
scope: "field",
|
|
1297
|
+
name: "image",
|
|
1298
|
+
version: 1,
|
|
1299
|
+
rule: fieldRule(object({
|
|
1300
|
+
...fieldConfigProperties,
|
|
1301
|
+
...upload,
|
|
1302
|
+
displayMode: o$5(oneOf("custom", "adaptive"))
|
|
1303
|
+
}), checkImage)
|
|
1304
|
+
},
|
|
1305
|
+
{
|
|
1306
|
+
referencePaths: [],
|
|
1307
|
+
scope: "field",
|
|
1308
|
+
name: "seal",
|
|
1309
|
+
version: 1,
|
|
1310
|
+
rule: fieldRule(object({
|
|
1311
|
+
...fieldConfigProperties,
|
|
1312
|
+
sourceId: o$5(nonempty),
|
|
1313
|
+
sourceName: o$5(string),
|
|
1314
|
+
diameterMm: o$5(positive)
|
|
1315
|
+
})),
|
|
1316
|
+
defaultConfig: {
|
|
1317
|
+
diameterMm: 42,
|
|
1318
|
+
keepExceptionHighlight: true
|
|
1319
|
+
},
|
|
1320
|
+
defaultPolicy: { draggable: true }
|
|
1321
|
+
},
|
|
1322
|
+
{
|
|
1323
|
+
scope: "field",
|
|
1324
|
+
name: "signature",
|
|
1325
|
+
version: 1,
|
|
1326
|
+
rule: fieldRule(object({
|
|
1327
|
+
...fieldConfigProperties,
|
|
1328
|
+
multiple: o$5(boolean),
|
|
1329
|
+
multipleConfigurable: o$5(boolean),
|
|
1330
|
+
format: o$5(oneOf("name", "date", "date-time")),
|
|
1331
|
+
displayDirection: o$5(oneOf("vertical", "horizontal")),
|
|
1332
|
+
fallback: o$5(oneOf("name", "name-and-date")),
|
|
1333
|
+
imageDirection: o$5(oneOf("horizontal", "vertical")),
|
|
1334
|
+
autofill: o$5(object({
|
|
1335
|
+
enabled: boolean,
|
|
1336
|
+
rules: array(object({
|
|
1337
|
+
id: nonempty,
|
|
1338
|
+
source: oneOf("username", "time"),
|
|
1339
|
+
target: object({
|
|
1340
|
+
modelKey: nonempty,
|
|
1341
|
+
fieldKey: nonempty,
|
|
1342
|
+
subFieldKey: o$5(nonempty),
|
|
1343
|
+
fieldType: nonempty
|
|
1344
|
+
})
|
|
1345
|
+
}))
|
|
1346
|
+
}))
|
|
1347
|
+
}), checkSignature$1),
|
|
1348
|
+
referencePaths: [],
|
|
1349
|
+
defaultConfig: {
|
|
1350
|
+
multiple: true,
|
|
1351
|
+
multipleConfigurable: true,
|
|
1352
|
+
format: "name",
|
|
1353
|
+
displayDirection: "vertical",
|
|
1354
|
+
fallback: "name",
|
|
1355
|
+
imageDirection: "horizontal"
|
|
1356
|
+
}
|
|
1357
|
+
}
|
|
1358
|
+
];
|
|
1359
|
+
/** 常用业务表变体,物耗声明复用 material-schema,不接受任意属性透传。 */
|
|
1360
|
+
var tableVariantSchemas = [materialTableSchema, ...repeatingTableVariants.map((definition) => ({
|
|
1361
|
+
referencePaths: [],
|
|
1362
|
+
scope: "variant",
|
|
1363
|
+
name: definition.name,
|
|
1364
|
+
version: 1,
|
|
1365
|
+
regionTypes: ["repeating"],
|
|
1366
|
+
rule: object({
|
|
1367
|
+
...definition.barcode ? {
|
|
1368
|
+
barcodeRuleId: o$5(string),
|
|
1369
|
+
disableBarcodeParsing: o$5(boolean),
|
|
1370
|
+
scanParameter: o$5(oneOf("lot", "uniqueCode")),
|
|
1371
|
+
barcodeMappings: o$5(array(object({
|
|
1372
|
+
barcodeField: nonempty,
|
|
1373
|
+
fieldKey: nonempty
|
|
1374
|
+
})))
|
|
1375
|
+
} : {},
|
|
1376
|
+
...definition.inventory ? {
|
|
1377
|
+
autoLoadInventory: o$5(boolean),
|
|
1378
|
+
stocktakeDimension: o$5(oneOf("warehouse_summary", "location_detail"))
|
|
1379
|
+
} : {}
|
|
1380
|
+
})
|
|
1381
|
+
}))];
|
|
1382
|
+
// src/model/business/communication-schema.ts
|
|
1383
|
+
/** @file Word 设计模板的 OCR 和设备互联声明。 */
|
|
1384
|
+
var fields = {
|
|
1385
|
+
deviceField: nonempty,
|
|
1386
|
+
deviceLinkParams: object({
|
|
1387
|
+
code: nonempty,
|
|
1388
|
+
name: string,
|
|
1389
|
+
type: nonempty,
|
|
1390
|
+
remark: optionalConfig(string)
|
|
1391
|
+
}),
|
|
1392
|
+
formField: optionalConfig(nonempty),
|
|
1393
|
+
formFields: optionalConfig(array(string)),
|
|
1394
|
+
isSubField: optionalConfig(boolean),
|
|
1395
|
+
writeBackMode: optionalConfig(oneOf("ROUTINE", "MOUSE_FOCUS"))
|
|
1396
|
+
};
|
|
1397
|
+
/** 设备参数沿 JSON 树保存;子项共用相同映射规则。 */
|
|
1398
|
+
var mapping = (value, path, errors) => object({
|
|
1399
|
+
...fields,
|
|
1400
|
+
children: optionalConfig(array(mapping))
|
|
1401
|
+
})(value, path, errors);
|
|
1402
|
+
/** 配置只存模板声明,运行提示词在平台保存时生成。 */
|
|
1403
|
+
var communicationBusinessSchema = {
|
|
1404
|
+
scope: "business",
|
|
1405
|
+
name: "edhr:communication",
|
|
1406
|
+
version: 1,
|
|
1407
|
+
referencePaths: [],
|
|
1408
|
+
rule: refine(object({ tmpls: optionalConfig(array(tagged("type", {
|
|
1409
|
+
AI_OCR: object({
|
|
1410
|
+
id: nonempty,
|
|
1411
|
+
type: oneOf("AI_OCR"),
|
|
1412
|
+
name: nonempty,
|
|
1413
|
+
deviceName: string,
|
|
1414
|
+
modelPrecision: nonempty,
|
|
1415
|
+
enableAdvancedConfig: boolean,
|
|
1416
|
+
enableDenoise: boolean,
|
|
1417
|
+
denoiseMethod: nonempty,
|
|
1418
|
+
enableContrast: boolean,
|
|
1419
|
+
contrastAlpha: number(1, false, 3),
|
|
1420
|
+
enableBinarize: boolean,
|
|
1421
|
+
binarizeMethod: nonempty,
|
|
1422
|
+
promptMode: oneOf("RECOMMENDED", "NORMAL"),
|
|
1423
|
+
recommendedPrompt: string,
|
|
1424
|
+
extraPrompt: string,
|
|
1425
|
+
identifyParams: array(object({
|
|
1426
|
+
id: nonempty,
|
|
1427
|
+
prompt: optionalConfig(string),
|
|
1428
|
+
formField: optionalConfig(nonempty)
|
|
1429
|
+
}))
|
|
1430
|
+
}),
|
|
1431
|
+
DEVICE_INTERCONNECTION: object({
|
|
1432
|
+
id: nonempty,
|
|
1433
|
+
type: oneOf("DEVICE_INTERCONNECTION"),
|
|
1434
|
+
deviceId: optionalConfig(nonempty),
|
|
1435
|
+
deviceName: optionalConfig(string),
|
|
1436
|
+
fieldMaps: array(mapping)
|
|
1437
|
+
})
|
|
1438
|
+
}))) }), (value, path, errors) => {
|
|
1439
|
+
const { tmpls } = value;
|
|
1440
|
+
const ids = /* @__PURE__ */ new Set();
|
|
1441
|
+
for (const [index, item] of (tmpls ?? []).entries()) {
|
|
1442
|
+
if (ids.has(item.id)) issue(errors, `${path}/tmpls/${index}/id`, "communication_duplicate", "Duplicate communication template identity");
|
|
1443
|
+
ids.add(item.id);
|
|
1444
|
+
}
|
|
1445
|
+
})
|
|
1446
|
+
};
|
|
1447
|
+
// src/model/business/document-signature-schema.ts
|
|
1448
|
+
/**
|
|
1449
|
+
* @file 文档签名互斥校验:检查主表、同行和跨表签名地址及互斥规则。
|
|
1450
|
+
* 阅读定位:business/ · 业务配置类型及对应 schema。
|
|
1451
|
+
*/
|
|
1452
|
+
/** 签名地址每项只表达一个业务路径片段,不在这里解析画布路径或运行时行下标。 */
|
|
1453
|
+
var segment = (value, path, errors) => {
|
|
1454
|
+
nonempty(value, path, errors);
|
|
1455
|
+
if (isString(value) && includes(value, ".")) issue(errors, path, "signature_address", "Signature address must contain one path segment");
|
|
1456
|
+
};
|
|
1457
|
+
var address = object({
|
|
1458
|
+
fieldKey: segment,
|
|
1459
|
+
subFieldKey: optionalConfig(segment)
|
|
1460
|
+
});
|
|
1461
|
+
/** 使用无歧义的二元键检查同一业务字段,主表与子表的同名字段保持独立。 */
|
|
1462
|
+
function addressKey(value) {
|
|
1463
|
+
return JSON.stringify([value.subFieldKey ?? null, value.fieldKey]);
|
|
1464
|
+
}
|
|
1465
|
+
/** 拒绝重复制衡项和字段与自身互斥,避免无法填写的确定性配置错误。 */
|
|
1466
|
+
var checkSignature = (value, path, errors) => {
|
|
1467
|
+
value.rules?.forEach((rule, i) => {
|
|
1468
|
+
const seen = /* @__PURE__ */ new Set(), main = rule.main && addressKey(rule.main);
|
|
1469
|
+
rule.checks?.forEach((check, j) => {
|
|
1470
|
+
const key = addressKey(check), p = `${path}/rules/${i}/checks/${j}`;
|
|
1471
|
+
if (key === main) issue(errors, p, "signature_self", "Signature field cannot be mutually exclusive with itself");
|
|
1472
|
+
if (seen.has(key)) issue(errors, p, "signature_duplicate", "Duplicate signature check field");
|
|
1473
|
+
seen.add(key);
|
|
1474
|
+
});
|
|
1475
|
+
});
|
|
1476
|
+
};
|
|
1477
|
+
/** 签名规则只引用当前表单的业务字段地址,不制造核心实体或持久化运行时签名数据。 */
|
|
1478
|
+
var documentSignatureSchema = {
|
|
1479
|
+
scope: "business",
|
|
1480
|
+
name: "edhr:signature",
|
|
1481
|
+
version: 1,
|
|
1482
|
+
referencePaths: [],
|
|
1483
|
+
rule: refine(object({
|
|
1484
|
+
mutex: optionalConfig(boolean),
|
|
1485
|
+
rules: optionalConfig(array(object({
|
|
1486
|
+
main: optionalConfig(address),
|
|
1487
|
+
checks: optionalConfig(array(address))
|
|
1488
|
+
})))
|
|
1489
|
+
}), checkSignature)
|
|
1490
|
+
};
|
|
1491
|
+
// src/model/business/data-source-schema.ts
|
|
1492
|
+
/**
|
|
1493
|
+
* @file 数源与填充校验:检查来源参数、局部身份、填充引用及持续表单联动环。
|
|
1494
|
+
* 阅读定位:business/ · 业务配置类型及对应 schema。
|
|
1495
|
+
*/
|
|
1496
|
+
var o$4 = optionalConfig;
|
|
1497
|
+
/** 固定 JSON 是明确业务常量,校验可持久化性而不把其中的普通键当作配置属性。 */
|
|
1498
|
+
var literal = (value, path, errors) => {
|
|
1499
|
+
for (const error of validateJsonValue(value, 500)) issue(errors, `${path}${error.path}`, error.code, error.message);
|
|
1500
|
+
};
|
|
1501
|
+
/** 字段/上下文引用沿用现有点分属性访问契约,不执行脚本或接受不可访问的路径段。 */
|
|
1502
|
+
var referencePath = (value, path, errors) => {
|
|
1503
|
+
nonempty(value, path, errors);
|
|
1504
|
+
if (isString(value) && (/\s/.test(value) || value.split(".").some((key) => !key || includes([
|
|
1505
|
+
"__proto__",
|
|
1506
|
+
"prototype",
|
|
1507
|
+
"constructor"
|
|
1508
|
+
], key)))) issue(errors, path, "data_parameter_reference", "Invalid parameter property path");
|
|
1509
|
+
};
|
|
1510
|
+
var parameterValue = tagged("kind", {
|
|
1511
|
+
fixed: object({
|
|
1512
|
+
kind: oneOf("fixed"),
|
|
1513
|
+
value: literal
|
|
1514
|
+
}),
|
|
1515
|
+
context: object({
|
|
1516
|
+
kind: oneOf("context"),
|
|
1517
|
+
path: referencePath
|
|
1518
|
+
}),
|
|
1519
|
+
form: object({
|
|
1520
|
+
kind: oneOf("form"),
|
|
1521
|
+
path: referencePath
|
|
1522
|
+
})
|
|
1523
|
+
});
|
|
1524
|
+
var parameter$1 = object({
|
|
1525
|
+
key: nonempty,
|
|
1526
|
+
value: o$4(parameterValue),
|
|
1527
|
+
label: o$4(string),
|
|
1528
|
+
valueType: o$4(string),
|
|
1529
|
+
required: o$4(boolean)
|
|
1530
|
+
});
|
|
1531
|
+
var conditions = o$4(array(object({
|
|
1532
|
+
fieldKey: o$4(nonempty),
|
|
1533
|
+
value: o$4(parameterValue)
|
|
1534
|
+
})));
|
|
1535
|
+
var common = {
|
|
1536
|
+
key: nonempty,
|
|
1537
|
+
label: o$4(string),
|
|
1538
|
+
result: oneOf("object", "array"),
|
|
1539
|
+
timing: o$4(oneOf("init", "change")),
|
|
1540
|
+
fields: o$4(array(object({
|
|
1541
|
+
key: nonempty,
|
|
1542
|
+
label: string,
|
|
1543
|
+
valueType: o$4(string)
|
|
1544
|
+
})))
|
|
1545
|
+
};
|
|
1546
|
+
/** 六类来源各自闭合,未知接口快照和测试结果不能进入定义。 */
|
|
1547
|
+
var dataSourceRule = tagged("kind", {
|
|
1548
|
+
form: object({
|
|
1549
|
+
...common,
|
|
1550
|
+
kind: oneOf("form"),
|
|
1551
|
+
categoryId: o$4(nonempty),
|
|
1552
|
+
templateId: o$4(nonempty),
|
|
1553
|
+
conditions
|
|
1554
|
+
}),
|
|
1555
|
+
biz: object({
|
|
1556
|
+
...common,
|
|
1557
|
+
kind: oneOf("biz"),
|
|
1558
|
+
serviceId: o$4(nonempty),
|
|
1559
|
+
parameters: o$4(array(parameter$1))
|
|
1560
|
+
}),
|
|
1561
|
+
entity: object({
|
|
1562
|
+
...common,
|
|
1563
|
+
kind: oneOf("entity"),
|
|
1564
|
+
modelKey: o$4(nonempty),
|
|
1565
|
+
conditions
|
|
1566
|
+
}),
|
|
1567
|
+
sql: object({
|
|
1568
|
+
...common,
|
|
1569
|
+
kind: oneOf("sql"),
|
|
1570
|
+
connection: o$4(oneOf("current", "external")),
|
|
1571
|
+
connectionKey: o$4(nonempty),
|
|
1572
|
+
connectionLabel: o$4(nonempty),
|
|
1573
|
+
statement: o$4(string),
|
|
1574
|
+
parameters: o$4(array(parameter$1))
|
|
1575
|
+
}),
|
|
1576
|
+
ipaas: object({
|
|
1577
|
+
...common,
|
|
1578
|
+
kind: oneOf("ipaas"),
|
|
1579
|
+
flowId: o$4(nonempty),
|
|
1580
|
+
timeoutSeconds: o$4(number(1, false, 600)),
|
|
1581
|
+
parameters: o$4(array(parameter$1))
|
|
1582
|
+
}),
|
|
1583
|
+
script: object({
|
|
1584
|
+
...common,
|
|
1585
|
+
kind: oneOf("script"),
|
|
1586
|
+
script: o$4(string)
|
|
1587
|
+
})
|
|
1588
|
+
});
|
|
1589
|
+
/** 填充规则只引用业务路径和本地数源,不复制来源显示名称和目标字段元信息。 */
|
|
1590
|
+
var fieldFillRule = object({
|
|
1591
|
+
id: nonempty,
|
|
1592
|
+
target: nonempty,
|
|
1593
|
+
trigger: oneOf("source-change", "form-init"),
|
|
1594
|
+
source: tagged("kind", {
|
|
1595
|
+
form: object({
|
|
1596
|
+
kind: oneOf("form"),
|
|
1597
|
+
path: nonempty
|
|
1598
|
+
}),
|
|
1599
|
+
context: object({
|
|
1600
|
+
kind: oneOf("context"),
|
|
1601
|
+
path: nonempty
|
|
1602
|
+
}),
|
|
1603
|
+
"data-source": object({
|
|
1604
|
+
kind: oneOf("data-source"),
|
|
1605
|
+
key: nonempty,
|
|
1606
|
+
path: nonempty
|
|
1607
|
+
})
|
|
1608
|
+
})
|
|
1609
|
+
});
|
|
1610
|
+
/** 校验数源的局部身份和显式填充引用,数组结果不会转换成运行时行。 */
|
|
1611
|
+
var checkDataSources = (value, path, errors) => {
|
|
1612
|
+
const config = value, sources = config.sources ?? [], keys = /* @__PURE__ */ new Set();
|
|
1613
|
+
for (const [i, source] of sources.entries()) {
|
|
1614
|
+
const p = `${path}/sources/${i}`;
|
|
1615
|
+
if (keys.has(source.key)) issue(errors, `${p}/key`, "data_source_duplicate", "Duplicate data source key");
|
|
1616
|
+
keys.add(source.key);
|
|
1617
|
+
if (source.fields && uniq(source.fields.map((field) => field.key) ?? []).length !== source.fields.length) issue(errors, `${p}/fields`, "data_field_duplicate", "Duplicate source return field");
|
|
1618
|
+
if (source.kind === "sql" && source.connection !== "external" && isNotNil(source.connectionKey)) issue(errors, p, "data_connection", "Current connection cannot also select an external connection");
|
|
1619
|
+
if ((source.kind === "sql" || source.kind === "ipaas" || source.kind === "biz") && source.parameters && uniq(source.parameters.map((parameter) => parameter.key) ?? []).length !== source.parameters.length) issue(errors, `${p}/parameters`, "data_parameter_duplicate", "Duplicate data source parameter");
|
|
1620
|
+
if (source.kind === "form") {
|
|
1621
|
+
const fields = source.conditions?.flatMap((condition) => condition.fieldKey ? [condition.fieldKey] : []) ?? [];
|
|
1622
|
+
if (uniq(fields ?? []).length !== fields.length || fields.some((field) => !includes([
|
|
1623
|
+
"f_batchNo",
|
|
1624
|
+
"f_mfgOrderCode",
|
|
1625
|
+
"status"
|
|
1626
|
+
], field))) issue(errors, `${p}/conditions`, "data_form_condition", "Unknown or repeated form condition");
|
|
1627
|
+
}
|
|
1628
|
+
}
|
|
1629
|
+
const ids = /* @__PURE__ */ new Set();
|
|
1630
|
+
for (const [i, fill] of (config.fills ?? []).entries()) {
|
|
1631
|
+
if (ids.has(fill.id)) issue(errors, `${path}/fills/${i}/id`, "data_fill_duplicate", "Duplicate field fill identity");
|
|
1632
|
+
ids.add(fill.id);
|
|
1633
|
+
if (fill.source.kind === "data-source" && !keys.has(fill.source.key)) issue(errors, `${path}/fills/${i}/source/key`, "data_source_reference", "Field fill source is missing");
|
|
1634
|
+
}
|
|
1635
|
+
checkFormCycles(config.fills ?? [], `${path}/fills`, errors);
|
|
1636
|
+
};
|
|
1637
|
+
/** 对持续触发的表单填充做静态环检查;初始化一次性填充不形成持续循环。 */
|
|
1638
|
+
function checkFormCycles(fills, path, errors) {
|
|
1639
|
+
const active = fills.filter((fill) => fill.source.kind === "form" && fill.trigger === "source-change"), colors = new Uint8Array(active.length);
|
|
1640
|
+
/** 同一业务属性与其父/子属性的写入会互相影响。 */
|
|
1641
|
+
const related = (left, right) => left === right || left.startsWith(`${right}.`) || right.startsWith(`${left}.`);
|
|
1642
|
+
for (let start = 0; start < active.length; start++) {
|
|
1643
|
+
if (colors[start]) continue;
|
|
1644
|
+
const stack = [[start, 0]];
|
|
1645
|
+
colors[start] = 1;
|
|
1646
|
+
while (stack.length) {
|
|
1647
|
+
const frame = stack[stack.length - 1], source = active[frame[0]];
|
|
1648
|
+
if (frame[1] === active.length) {
|
|
1649
|
+
colors[frame[0]] = 2;
|
|
1650
|
+
stack.pop();
|
|
1651
|
+
continue;
|
|
1652
|
+
}
|
|
1653
|
+
const next = frame[1]++, target = active[next];
|
|
1654
|
+
if (!related(source.target, target.source.path)) continue;
|
|
1655
|
+
if (colors[next] === 1) {
|
|
1656
|
+
issue(errors, path, "data_fill_cycle", "Continuous form field fills contain a cycle");
|
|
1657
|
+
return;
|
|
1658
|
+
}
|
|
1659
|
+
if (!colors[next]) {
|
|
1660
|
+
colors[next] = 1;
|
|
1661
|
+
stack.push([next, 0]);
|
|
1662
|
+
}
|
|
1663
|
+
}
|
|
1664
|
+
}
|
|
1665
|
+
}
|
|
1666
|
+
// src/model/business/initialization-schema.ts
|
|
1667
|
+
/**
|
|
1668
|
+
* @file 初始化业务 schema:组合参数、查询、新数源、填充和对象初始化的声明与关联检查。
|
|
1669
|
+
* 阅读定位:business/ · 业务配置类型及对应 schema。
|
|
1670
|
+
*/
|
|
1671
|
+
var o$3 = optionalConfig;
|
|
1672
|
+
var parameter = object({
|
|
1673
|
+
kind: oneOf("component", "builtin"),
|
|
1674
|
+
key: o$3(string)
|
|
1675
|
+
});
|
|
1676
|
+
var flags = {
|
|
1677
|
+
description: o$3(string),
|
|
1678
|
+
required: o$3(boolean)
|
|
1679
|
+
};
|
|
1680
|
+
/** 递归校验已解码的闭合请求树,直接通过注册表调用时也有明确深度上限。 */
|
|
1681
|
+
function requestNode(value, path, errors, depth) {
|
|
1682
|
+
if (depth > 64) {
|
|
1683
|
+
issue(errors, path, "initial_request_depth", "Request schema exceeds 64 levels");
|
|
1684
|
+
return;
|
|
1685
|
+
}
|
|
1686
|
+
/** 子参数沿用同一深度预算,空定义仍以显式 null 表达。 */
|
|
1687
|
+
const child = (value, path, errors) => requestNode(value, path, errors, depth + 1);
|
|
1688
|
+
nullable(tagged("kind", {
|
|
1689
|
+
object: object({
|
|
1690
|
+
kind: oneOf("object"),
|
|
1691
|
+
...flags,
|
|
1692
|
+
properties: o$3(record(child))
|
|
1693
|
+
}),
|
|
1694
|
+
array: object({
|
|
1695
|
+
kind: oneOf("array"),
|
|
1696
|
+
...flags,
|
|
1697
|
+
item: o$3(child)
|
|
1698
|
+
}),
|
|
1699
|
+
value: object({
|
|
1700
|
+
kind: oneOf("value"),
|
|
1701
|
+
...flags,
|
|
1702
|
+
valueType: oneOf("String", "Integer", "BigDecimal", "Long", "Number", "Boolean"),
|
|
1703
|
+
mode: o$3(oneOf("fixed", "parameter")),
|
|
1704
|
+
value: o$3(string)
|
|
1705
|
+
})
|
|
1706
|
+
}))(value, path, errors);
|
|
1707
|
+
}
|
|
1708
|
+
/** 请求字段与外层来源复用同一个递归规则,不接收任意 JSON 或解析后的实参。 */
|
|
1709
|
+
var request = (value, path, errors) => requestNode(value, path, errors, 0);
|
|
1710
|
+
var source = tagged("kind", {
|
|
1711
|
+
entity: object({
|
|
1712
|
+
kind: oneOf("entity"),
|
|
1713
|
+
modelKey: o$3(nonempty)
|
|
1714
|
+
}),
|
|
1715
|
+
form: object({
|
|
1716
|
+
kind: oneOf("form"),
|
|
1717
|
+
modelKey: o$3(nonempty),
|
|
1718
|
+
templateId: o$3(nonempty),
|
|
1719
|
+
subModel: o$3(boolean)
|
|
1720
|
+
}),
|
|
1721
|
+
sql: object({
|
|
1722
|
+
kind: oneOf("sql"),
|
|
1723
|
+
connectionKey: o$3(nonempty),
|
|
1724
|
+
statement: o$3(string)
|
|
1725
|
+
}),
|
|
1726
|
+
webhook: object({
|
|
1727
|
+
kind: oneOf("webhook"),
|
|
1728
|
+
connectorId: o$3(nonempty),
|
|
1729
|
+
method: o$3(oneOf("GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS")),
|
|
1730
|
+
path: o$3(string),
|
|
1731
|
+
request: o$3(object({
|
|
1732
|
+
headers: o$3(request),
|
|
1733
|
+
body: o$3(request),
|
|
1734
|
+
query: o$3(request),
|
|
1735
|
+
uri: o$3(request)
|
|
1736
|
+
}))
|
|
1737
|
+
}),
|
|
1738
|
+
builtin: object({
|
|
1739
|
+
kind: oneOf("builtin"),
|
|
1740
|
+
key: o$3(nonempty)
|
|
1741
|
+
})
|
|
1742
|
+
});
|
|
1743
|
+
var resultMapping = object({
|
|
1744
|
+
id: nonempty,
|
|
1745
|
+
modelKey: o$3(nonempty),
|
|
1746
|
+
subFieldKey: o$3(nonempty),
|
|
1747
|
+
checkTable: o$3(boolean),
|
|
1748
|
+
fields: o$3(array(object({
|
|
1749
|
+
fieldKey: o$3(nonempty),
|
|
1750
|
+
sourceKey: o$3(string),
|
|
1751
|
+
foreignPath: o$3(nonempty)
|
|
1752
|
+
})))
|
|
1753
|
+
});
|
|
1754
|
+
/** 检查同一配置内身份唯一及来源互斥,不把外部键重写成文档 ID。 */
|
|
1755
|
+
var checkInitialization = (value, path, errors) => {
|
|
1756
|
+
const config = value;
|
|
1757
|
+
checkDataSources(value, path, errors);
|
|
1758
|
+
checkMaterialObjects(value, path, errors);
|
|
1759
|
+
/** 每个列表的身份范围独立,列表顺序不参与身份生成。 */
|
|
1760
|
+
const unique = (ids, p) => {
|
|
1761
|
+
if (ids && uniq(ids ?? []).length !== ids.length) issue(errors, p, "initial_duplicate", "Duplicate initialization identity");
|
|
1762
|
+
};
|
|
1763
|
+
unique(config.parameters?.map((item) => item.id), `${path}/parameters`);
|
|
1764
|
+
unique(config.queries?.map((item) => item.id), `${path}/queries`);
|
|
1765
|
+
for (const [i, mapping] of (config.parameters ?? []).entries()) if (mapping.modelKey && mapping.fields?.some((field) => field.modelKey)) issue(errors, `${path}/parameters/${i}/fields`, "initial_model_source", "Use group modelKey or per-field fallback, not both");
|
|
1766
|
+
config.queries?.forEach((query, i) => {
|
|
1767
|
+
const p = `${path}/queries/${i}`;
|
|
1768
|
+
unique(query.filters?.map((item) => item.id), `${p}/filters`);
|
|
1769
|
+
unique(query.mappings?.map((item) => item.id), `${p}/mappings`);
|
|
1770
|
+
query.mappings?.forEach((mapping, j) => {
|
|
1771
|
+
mapping.fields?.forEach((field, k) => {
|
|
1772
|
+
if (isNotNil(field.sourceKey) && isNotNil(field.foreignPath)) issue(errors, `${p}/mappings/${j}/fields/${k}`, "initial_source_conflict", "Use plain source or foreign path");
|
|
1773
|
+
});
|
|
1774
|
+
});
|
|
1775
|
+
});
|
|
1776
|
+
};
|
|
1777
|
+
/** 初始化业务 schema,参数和来源地址属于业务协议,不声明为核心节点引用。 */
|
|
1778
|
+
var initializationBusinessSchema = {
|
|
1779
|
+
scope: "business",
|
|
1780
|
+
name: "edhr:initialization",
|
|
1781
|
+
version: 1,
|
|
1782
|
+
referencePaths: [],
|
|
1783
|
+
rule: refine(object({
|
|
1784
|
+
objects: o$3(array(materialObjectRule)),
|
|
1785
|
+
parameters: o$3(array(object({
|
|
1786
|
+
id: nonempty,
|
|
1787
|
+
parameter: o$3(parameter),
|
|
1788
|
+
modelKey: o$3(nonempty),
|
|
1789
|
+
subFieldKey: o$3(nonempty),
|
|
1790
|
+
fields: o$3(array(object({
|
|
1791
|
+
fieldKey: o$3(nonempty),
|
|
1792
|
+
fieldType: o$3(nonempty),
|
|
1793
|
+
createType: o$3(oneOf("SYSTEM", "BUILTIN", "USER_DEFINED")),
|
|
1794
|
+
modelKey: o$3(nonempty)
|
|
1795
|
+
})))
|
|
1796
|
+
}))),
|
|
1797
|
+
queries: o$3(array(object({
|
|
1798
|
+
id: nonempty,
|
|
1799
|
+
source: o$3(source),
|
|
1800
|
+
filters: o$3(array(object({
|
|
1801
|
+
id: nonempty,
|
|
1802
|
+
fieldKey: o$3(nonempty),
|
|
1803
|
+
fieldType: o$3(nonempty),
|
|
1804
|
+
operator: o$3(oneOf("eq", "ne", "gt", "lt", "ge", "le", "like", "notLike", "isNull", "isNotNull", "versionEq")),
|
|
1805
|
+
parameter: o$3(parameter)
|
|
1806
|
+
}))),
|
|
1807
|
+
mappings: o$3(array(resultMapping))
|
|
1808
|
+
}))),
|
|
1809
|
+
sources: o$3(array(dataSourceRule)),
|
|
1810
|
+
fills: o$3(array(fieldFillRule))
|
|
1811
|
+
}), checkInitialization)
|
|
1812
|
+
};
|
|
1813
|
+
// src/model/business/document-business-schema.ts
|
|
1814
|
+
/**
|
|
1815
|
+
* @file 文档规则校验:检查判定树、条件类型与单位转换等声明,不执行规则或计算结果。
|
|
1816
|
+
* 阅读定位:business/ · 业务配置类型及对应 schema。
|
|
1817
|
+
*/
|
|
1818
|
+
var o$2 = optionalConfig;
|
|
1819
|
+
var numericTypes = /* @__PURE__ */ new Set([
|
|
1820
|
+
"integer",
|
|
1821
|
+
"long",
|
|
1822
|
+
"double",
|
|
1823
|
+
"decimal"
|
|
1824
|
+
]);
|
|
1825
|
+
var decisionField = refine(object({
|
|
1826
|
+
modelKey: nonempty,
|
|
1827
|
+
fieldKey: nonempty,
|
|
1828
|
+
fieldType: oneOf("integer", "long", "double", "decimal", "option", "enum", "boolean"),
|
|
1829
|
+
subFieldKey: o$2(nonempty),
|
|
1830
|
+
objectFieldKey: o$2(nonempty)
|
|
1831
|
+
}), (value, path, errors) => {
|
|
1832
|
+
const field = value;
|
|
1833
|
+
if (isNotNil(field.subFieldKey) && isNotNil(field.objectFieldKey)) issue(errors, path, "decision_scope", "Decision field cannot belong to a subtable and an object at once");
|
|
1834
|
+
});
|
|
1835
|
+
/** 判定固定值只允许可持久化标量,不接受表达式对象或运行时状态。 */
|
|
1836
|
+
var fixedValue = (value, path, errors) => {
|
|
1837
|
+
if (isNull(value) || isString(value) || isBoolean(value)) return;
|
|
1838
|
+
number()(value, path, errors);
|
|
1839
|
+
};
|
|
1840
|
+
var operand = tagged("kind", {
|
|
1841
|
+
fixed: object({
|
|
1842
|
+
kind: oneOf("fixed"),
|
|
1843
|
+
value: o$2(fixedValue)
|
|
1844
|
+
}),
|
|
1845
|
+
field: object({
|
|
1846
|
+
kind: oneOf("field"),
|
|
1847
|
+
field: o$2(decisionField)
|
|
1848
|
+
})
|
|
1849
|
+
});
|
|
1850
|
+
var condition = refine(object({
|
|
1851
|
+
kind: oneOf("condition"),
|
|
1852
|
+
id: nonempty,
|
|
1853
|
+
left: o$2(decisionField),
|
|
1854
|
+
operator: o$2(oneOf("eq", "ne", "gt", "ge", "lt", "le")),
|
|
1855
|
+
right: o$2(operand)
|
|
1856
|
+
}), checkCondition);
|
|
1857
|
+
/** 按字段存储类型检查运算与右值兼容性;草稿缺项不在 model 中执行完整性提示。 */
|
|
1858
|
+
function checkCondition(value, path, errors) {
|
|
1859
|
+
const node = value, left = node.left;
|
|
1860
|
+
if (!left) return;
|
|
1861
|
+
const numeric = numericTypes.has(left.fieldType);
|
|
1862
|
+
if (node.operator && !numeric && !includes(left.fieldType === "boolean" ? ["eq"] : ["eq", "ne"], node.operator)) issue(errors, `${path}/operator`, "decision_operator", "Operator is incompatible with field type");
|
|
1863
|
+
if (node.right?.kind === "field" && node.right.field) {
|
|
1864
|
+
const right = node.right.field;
|
|
1865
|
+
if (!(numeric ? numericTypes.has(right.fieldType) : left.fieldType === right.fieldType)) issue(errors, `${path}/right/field`, "decision_field_type", "Decision field types differ");
|
|
1866
|
+
}
|
|
1867
|
+
if (node.right?.kind !== "fixed") return;
|
|
1868
|
+
const fixed = node.right.value;
|
|
1869
|
+
if (isUndefined(fixed) || isNull(fixed) || fixed === "") return;
|
|
1870
|
+
if (numeric && !isNumber(fixed) && (!isString(fixed) || !/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/.test(fixed))) issue(errors, `${path}/right/value`, "decision_number", "Expected finite number or decimal text");
|
|
1871
|
+
if (left.fieldType === "boolean" && !isBoolean(fixed)) issue(errors, `${path}/right/value`, "decision_boolean", "Expected boolean fixed value");
|
|
1872
|
+
}
|
|
1873
|
+
/** 递归检查唯一规则树;深度上限独立于画布页数,避免扩展直接校验时无限递归。 */
|
|
1874
|
+
function decisionNode(value, path, errors, depth) {
|
|
1875
|
+
if (depth > 64) {
|
|
1876
|
+
issue(errors, path, "decision_depth", "Decision tree exceeds 64 levels");
|
|
1877
|
+
return;
|
|
1878
|
+
}
|
|
1879
|
+
tagged("kind", {
|
|
1880
|
+
condition,
|
|
1881
|
+
group: object({
|
|
1882
|
+
kind: oneOf("group"),
|
|
1883
|
+
id: nonempty,
|
|
1884
|
+
operator: oneOf("and", "or"),
|
|
1885
|
+
children: array((value, path, errors) => decisionNode(value, path, errors, depth + 1))
|
|
1886
|
+
})
|
|
1887
|
+
})(value, path, errors);
|
|
1888
|
+
}
|
|
1889
|
+
/** 根必须为分组,树内局部身份唯一,不将规则身份登记成文档拥有实体。 */
|
|
1890
|
+
var decisionTree = (value, path, errors) => {
|
|
1891
|
+
const before = errors.length;
|
|
1892
|
+
decisionNode(value, path, errors, 0);
|
|
1893
|
+
if (errors.length !== before) return;
|
|
1894
|
+
const root = value;
|
|
1895
|
+
if (root.kind !== "group") {
|
|
1896
|
+
issue(errors, path, "decision_root", "Decision root must be a group");
|
|
1897
|
+
return;
|
|
1898
|
+
}
|
|
1899
|
+
const pending = [root], ids = /* @__PURE__ */ new Set();
|
|
1900
|
+
while (pending.length) {
|
|
1901
|
+
const node = pending.pop();
|
|
1902
|
+
if (ids.has(node.id)) issue(errors, path, "decision_duplicate", "Duplicate decision node identity");
|
|
1903
|
+
ids.add(node.id);
|
|
1904
|
+
if (node.kind === "group") pending.push(...node.children);
|
|
1905
|
+
}
|
|
1906
|
+
};
|
|
1907
|
+
var conversionMapping = tagged("kind", {
|
|
1908
|
+
unit: object({
|
|
1909
|
+
kind: oneOf("unit"),
|
|
1910
|
+
side: oneOf("source", "target"),
|
|
1911
|
+
unitId: o$2(nonempty),
|
|
1912
|
+
label: o$2(string),
|
|
1913
|
+
fieldKey: o$2(nonempty)
|
|
1914
|
+
}),
|
|
1915
|
+
input: object({
|
|
1916
|
+
kind: oneOf("input"),
|
|
1917
|
+
fieldKey: o$2(nonempty)
|
|
1918
|
+
}),
|
|
1919
|
+
parameter: object({
|
|
1920
|
+
kind: oneOf("parameter"),
|
|
1921
|
+
key: nonempty,
|
|
1922
|
+
target: o$2(object({
|
|
1923
|
+
fieldKey: nonempty,
|
|
1924
|
+
modelKey: o$2(nonempty),
|
|
1925
|
+
subFieldKey: o$2(nonempty)
|
|
1926
|
+
}))
|
|
1927
|
+
})
|
|
1928
|
+
});
|
|
1929
|
+
/** 检查规则及参数作用唯一和同一当前行的子表约束,不从业务字符串猜测文档引用。 */
|
|
1930
|
+
var checkRules = (value, path, errors) => {
|
|
1931
|
+
const config = value, ids = /* @__PURE__ */ new Set();
|
|
1932
|
+
config.unitConversions?.forEach((rule, i) => {
|
|
1933
|
+
const p = `${path}/unitConversions/${i}`, keys = /* @__PURE__ */ new Set(), subfields = /* @__PURE__ */ new Set();
|
|
1934
|
+
if (ids.has(rule.id)) issue(errors, `${p}/id`, "unit_rule_duplicate", "Duplicate unit conversion rule");
|
|
1935
|
+
ids.add(rule.id);
|
|
1936
|
+
rule.mappings?.forEach((map, j) => {
|
|
1937
|
+
const key = map.kind === "unit" ? map.side : map.kind === "input" ? "input" : map.key;
|
|
1938
|
+
if (keys.has(key)) issue(errors, `${p}/mappings/${j}`, "unit_mapping_duplicate", "Duplicate unit conversion mapping");
|
|
1939
|
+
keys.add(key);
|
|
1940
|
+
if (map.kind === "parameter") {
|
|
1941
|
+
if (!/^formulaRuleParam\d+$/.test(map.key)) issue(errors, `${p}/mappings/${j}/key`, "unit_parameter", "Unknown formula parameter key");
|
|
1942
|
+
if (map.target?.subFieldKey) subfields.add(map.target.subFieldKey);
|
|
1943
|
+
}
|
|
1944
|
+
});
|
|
1945
|
+
if (subfields.size > 1) issue(errors, `${p}/mappings`, "unit_subtable", "Unit rule parameters must use the same current subtable");
|
|
1946
|
+
});
|
|
1947
|
+
};
|
|
1948
|
+
/** 文档规则内建 schema;业务地址均不是核心引用,复制无需改写它们。 */
|
|
1949
|
+
var documentBusinessSchemas = [
|
|
1950
|
+
initializationBusinessSchema,
|
|
1951
|
+
communicationBusinessSchema,
|
|
1952
|
+
documentSignatureSchema,
|
|
1953
|
+
{
|
|
1954
|
+
scope: "business",
|
|
1955
|
+
name: "edhr:rules",
|
|
1956
|
+
version: 1,
|
|
1957
|
+
referencePaths: [],
|
|
1958
|
+
rule: refine(object({
|
|
1959
|
+
notification: o$2(object({
|
|
1960
|
+
times: array((value, path, errors) => {
|
|
1961
|
+
if (typeof value !== "string" || !/^([01]\d|2[0-3]):[0-5]\d$/.test(value)) issue(errors, path, "notification_time", "Invalid notification time");
|
|
1962
|
+
}),
|
|
1963
|
+
recipients: array(nonempty),
|
|
1964
|
+
template: (value, path, errors) => {
|
|
1965
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
1966
|
+
issue(errors, path, "notification_template", "Expected message template object");
|
|
1967
|
+
return;
|
|
1968
|
+
}
|
|
1969
|
+
const messages = value.messageInfo;
|
|
1970
|
+
array((item, itemPath, itemErrors) => {
|
|
1971
|
+
if (!item || typeof item !== "object" || Array.isArray(item)) issue(itemErrors, itemPath, "notification_message", "Expected channel message object");
|
|
1972
|
+
else {
|
|
1973
|
+
const content = item.content;
|
|
1974
|
+
if (content != null) string(content, itemPath + "/content", itemErrors);
|
|
1975
|
+
}
|
|
1976
|
+
})(messages, path + "/messageInfo", errors);
|
|
1977
|
+
}
|
|
1978
|
+
})),
|
|
1979
|
+
inspection: o$2(object({
|
|
1980
|
+
enabled: o$2(boolean),
|
|
1981
|
+
prompt: o$2(string),
|
|
1982
|
+
predicate: o$2(decisionTree)
|
|
1983
|
+
})),
|
|
1984
|
+
unitConversions: o$2(array(object({
|
|
1985
|
+
id: nonempty,
|
|
1986
|
+
ruleId: o$2(nonempty),
|
|
1987
|
+
label: o$2(string),
|
|
1988
|
+
expression: o$2(string),
|
|
1989
|
+
productId: o$2(nonempty),
|
|
1990
|
+
productLabel: o$2(string),
|
|
1991
|
+
mappings: o$2(array(conversionMapping))
|
|
1992
|
+
})))
|
|
1993
|
+
}), checkRules)
|
|
1994
|
+
}
|
|
1995
|
+
];
|
|
1996
|
+
// src/model/business/page-widget-schema.ts
|
|
1997
|
+
/**
|
|
1998
|
+
* @file 页面组件 schema:校验八类组件配置及显式绑定或资产引用,不创建绘图对象。
|
|
1999
|
+
* 阅读定位:business/ · 业务配置类型及对应 schema。
|
|
2000
|
+
*/
|
|
2001
|
+
var o$1 = optionalConfig;
|
|
2002
|
+
var content = tagged("kind", {
|
|
2003
|
+
fixed: object({
|
|
2004
|
+
kind: oneOf("fixed"),
|
|
2005
|
+
value: string
|
|
2006
|
+
}),
|
|
2007
|
+
field: object({
|
|
2008
|
+
kind: oneOf("field"),
|
|
2009
|
+
bindingId: o$1(nonempty)
|
|
2010
|
+
}),
|
|
2011
|
+
expression: object({
|
|
2012
|
+
kind: oneOf("expression"),
|
|
2013
|
+
expression: string,
|
|
2014
|
+
label: o$1(string),
|
|
2015
|
+
scope: o$1(string)
|
|
2016
|
+
})
|
|
2017
|
+
});
|
|
2018
|
+
var timeSource = object({
|
|
2019
|
+
useSystemTime: o$1(boolean),
|
|
2020
|
+
field: o$1(object({
|
|
2021
|
+
modelKey: nonempty,
|
|
2022
|
+
fieldKey: nonempty,
|
|
2023
|
+
fieldType: oneOf("date", "time", "date_time"),
|
|
2024
|
+
subModelKey: o$1(nonempty),
|
|
2025
|
+
subFieldKey: o$1(nonempty)
|
|
2026
|
+
}))
|
|
2027
|
+
});
|
|
2028
|
+
/** 三个固定槽是数据语义;两栏的中间槽仍保留,不能按当前视觉数量截断。 */
|
|
2029
|
+
var checkDiagonal = (value, path, errors) => {
|
|
2030
|
+
const slots = value.slots;
|
|
2031
|
+
if (isNotNil(slots) && slots.length !== 3) issue(errors, `${path}/slots`, "diagonal_slots", "Diagonal needs top, middle and bottom slots");
|
|
2032
|
+
};
|
|
2033
|
+
/** 八类页面组件的纯配置,不创建绘图对象或加载图片、条码和公式引擎。 */
|
|
2034
|
+
var pageWidgetSchemas = [
|
|
2035
|
+
{
|
|
2036
|
+
referencePaths: [],
|
|
2037
|
+
scope: "pageWidget",
|
|
2038
|
+
name: "pagination",
|
|
2039
|
+
version: 1,
|
|
2040
|
+
rule: object({ template: nonempty })
|
|
2041
|
+
},
|
|
2042
|
+
{
|
|
2043
|
+
scope: "pageWidget",
|
|
2044
|
+
name: "barcode",
|
|
2045
|
+
version: 1,
|
|
2046
|
+
rule: object({
|
|
2047
|
+
codeType: o$1(oneOf("code39", "code128")),
|
|
2048
|
+
content: o$1(content),
|
|
2049
|
+
alignment: o$1(oneOf("left", "center", "right")),
|
|
2050
|
+
showValue: o$1(boolean)
|
|
2051
|
+
}),
|
|
2052
|
+
defaultConfig: {
|
|
2053
|
+
codeType: "code39",
|
|
2054
|
+
content: {
|
|
2055
|
+
kind: "fixed",
|
|
2056
|
+
value: ""
|
|
2057
|
+
},
|
|
2058
|
+
alignment: "center",
|
|
2059
|
+
showValue: true
|
|
2060
|
+
},
|
|
2061
|
+
referencePaths: [{
|
|
2062
|
+
path: ["content", "bindingId"],
|
|
2063
|
+
kind: "binding"
|
|
2064
|
+
}]
|
|
2065
|
+
},
|
|
2066
|
+
{
|
|
2067
|
+
scope: "pageWidget",
|
|
2068
|
+
name: "qrcode",
|
|
2069
|
+
version: 1,
|
|
2070
|
+
rule: object({
|
|
2071
|
+
codeType: o$1(oneOf("qrcode", "gs1datamatrix")),
|
|
2072
|
+
content: o$1(content)
|
|
2073
|
+
}),
|
|
2074
|
+
defaultConfig: {
|
|
2075
|
+
codeType: "qrcode",
|
|
2076
|
+
content: {
|
|
2077
|
+
kind: "fixed",
|
|
2078
|
+
value: ""
|
|
2079
|
+
}
|
|
2080
|
+
},
|
|
2081
|
+
referencePaths: [{
|
|
2082
|
+
path: ["content", "bindingId"],
|
|
2083
|
+
kind: "binding"
|
|
2084
|
+
}]
|
|
2085
|
+
},
|
|
2086
|
+
{
|
|
2087
|
+
scope: "pageWidget",
|
|
2088
|
+
name: "image",
|
|
2089
|
+
version: 1,
|
|
2090
|
+
rule: object({
|
|
2091
|
+
assetId: o$1(nonempty),
|
|
2092
|
+
sizeMode: o$1(oneOf("responsive", "fixed"))
|
|
2093
|
+
}),
|
|
2094
|
+
defaultConfig: { sizeMode: "responsive" },
|
|
2095
|
+
referencePaths: [{
|
|
2096
|
+
path: ["assetId"],
|
|
2097
|
+
kind: "asset"
|
|
2098
|
+
}]
|
|
2099
|
+
},
|
|
2100
|
+
{
|
|
2101
|
+
referencePaths: [],
|
|
2102
|
+
scope: "pageWidget",
|
|
2103
|
+
name: "line",
|
|
2104
|
+
version: 1,
|
|
2105
|
+
rule: object({
|
|
2106
|
+
direction: o$1(oneOf("horizontal", "vertical")),
|
|
2107
|
+
widthPx: o$1(number(0)),
|
|
2108
|
+
color: o$1(nonempty),
|
|
2109
|
+
style: o$1(oneOf("solid", "dashed", "dotted")),
|
|
2110
|
+
rotationDeg: o$1(number())
|
|
2111
|
+
}),
|
|
2112
|
+
defaultConfig: {
|
|
2113
|
+
direction: "horizontal",
|
|
2114
|
+
widthPx: 1,
|
|
2115
|
+
color: "#000000",
|
|
2116
|
+
style: "solid",
|
|
2117
|
+
rotationDeg: 0
|
|
2118
|
+
}
|
|
2119
|
+
},
|
|
2120
|
+
{
|
|
2121
|
+
referencePaths: [],
|
|
2122
|
+
scope: "pageWidget",
|
|
2123
|
+
name: "serial-number",
|
|
2124
|
+
version: 1,
|
|
2125
|
+
rule: object({
|
|
2126
|
+
initialValue: o$1(number(0, true)),
|
|
2127
|
+
step: o$1(number(0, true))
|
|
2128
|
+
}),
|
|
2129
|
+
defaultConfig: {
|
|
2130
|
+
initialValue: 1,
|
|
2131
|
+
step: 1
|
|
2132
|
+
}
|
|
2133
|
+
},
|
|
2134
|
+
{
|
|
2135
|
+
referencePaths: [],
|
|
2136
|
+
scope: "pageWidget",
|
|
2137
|
+
name: "time-diff",
|
|
2138
|
+
version: 1,
|
|
2139
|
+
rule: object({
|
|
2140
|
+
format: o$1(oneOf("ymdhms", "dhms", "hms", "years", "months", "days", "hours", "minutes", "seconds")),
|
|
2141
|
+
start: o$1(timeSource),
|
|
2142
|
+
end: o$1(timeSource)
|
|
2143
|
+
}),
|
|
2144
|
+
defaultConfig: { format: "dhms" }
|
|
2145
|
+
},
|
|
2146
|
+
{
|
|
2147
|
+
scope: "pageWidget",
|
|
2148
|
+
name: "diagonal",
|
|
2149
|
+
version: 1,
|
|
2150
|
+
rule: refine(object({
|
|
2151
|
+
columns: o$1(oneOf(2, 3)),
|
|
2152
|
+
direction: o$1(oneOf("forward", "backward")),
|
|
2153
|
+
vertex: o$1(oneOf("top-left", "top-right", "bottom-left", "bottom-right")),
|
|
2154
|
+
slots: o$1(array(object({
|
|
2155
|
+
text: string,
|
|
2156
|
+
useField: o$1(boolean),
|
|
2157
|
+
bindingId: o$1(nonempty)
|
|
2158
|
+
}))),
|
|
2159
|
+
labelStyle: o$1(textStyleRule)
|
|
2160
|
+
}), checkDiagonal),
|
|
2161
|
+
defaultConfig: {
|
|
2162
|
+
columns: 2,
|
|
2163
|
+
direction: "forward",
|
|
2164
|
+
vertex: "top-left"
|
|
2165
|
+
},
|
|
2166
|
+
referencePaths: [{
|
|
2167
|
+
path: [
|
|
2168
|
+
"slots",
|
|
2169
|
+
"*",
|
|
2170
|
+
"bindingId"
|
|
2171
|
+
],
|
|
2172
|
+
kind: "binding"
|
|
2173
|
+
}]
|
|
2174
|
+
}
|
|
2175
|
+
];
|
|
2176
|
+
// src/model/config/config-registry.ts
|
|
2177
|
+
/**
|
|
2178
|
+
* @file 版本化业务配置注册表:统一 schema、默认配置、默认能力及显式核心引用契约。
|
|
2179
|
+
* 阅读定位:config/ · 配置注册与显式核心引用。
|
|
2180
|
+
*/
|
|
2181
|
+
var o = optional;
|
|
2182
|
+
var empty = object({});
|
|
2183
|
+
var policyRule = object({
|
|
2184
|
+
draggable: o(boolean),
|
|
2185
|
+
resizable: o(boolean),
|
|
2186
|
+
copyable: o(boolean),
|
|
2187
|
+
removable: o(boolean),
|
|
2188
|
+
droppable: o(boolean)
|
|
2189
|
+
});
|
|
2190
|
+
/** 常用字段沿用现有创建工厂的静态能力,集中注册而不在每次插入时复制。 */
|
|
2191
|
+
var commonFieldPolicy = {
|
|
2192
|
+
draggable: false,
|
|
2193
|
+
resizable: false,
|
|
2194
|
+
copyable: false,
|
|
2195
|
+
removable: false,
|
|
2196
|
+
droppable: false
|
|
2197
|
+
};
|
|
2198
|
+
var builtinSchemas = [
|
|
2199
|
+
...fieldSchemas.map((schema) => ({
|
|
2200
|
+
...schema,
|
|
2201
|
+
defaultPolicy: {
|
|
2202
|
+
...commonFieldPolicy,
|
|
2203
|
+
...schema.defaultPolicy
|
|
2204
|
+
}
|
|
2205
|
+
})),
|
|
2206
|
+
...tableVariantSchemas,
|
|
2207
|
+
...documentBusinessSchemas,
|
|
2208
|
+
...pageWidgetSchemas.map((schema) => ({
|
|
2209
|
+
...schema,
|
|
2210
|
+
defaultPolicy: {
|
|
2211
|
+
...commonFieldPolicy,
|
|
2212
|
+
draggable: true
|
|
2213
|
+
}
|
|
2214
|
+
})),
|
|
2215
|
+
{
|
|
2216
|
+
referencePaths: [],
|
|
2217
|
+
scope: "region",
|
|
2218
|
+
name: "bounded",
|
|
2219
|
+
version: 1,
|
|
2220
|
+
rule: object({
|
|
2221
|
+
autoFill: optionalConfig(boolean),
|
|
2222
|
+
quickFill: optionalConfig(boolean),
|
|
2223
|
+
fillDirection: optionalConfig(oneOf("x", "y")),
|
|
2224
|
+
mainFieldBindings: optionalConfig(array(nonempty)),
|
|
2225
|
+
dataLockControlField: optionalConfig(oneOf("inspector_", "reviewer_"))
|
|
2226
|
+
})
|
|
2227
|
+
},
|
|
2228
|
+
{
|
|
2229
|
+
referencePaths: [],
|
|
2230
|
+
scope: "region",
|
|
2231
|
+
name: "repeating",
|
|
2232
|
+
version: 1,
|
|
2233
|
+
rule: object({
|
|
2234
|
+
quickFill: optionalConfig(boolean),
|
|
2235
|
+
confirmBeforeDelete: optionalConfig(boolean),
|
|
2236
|
+
confirmBeforeDeleteTip: optionalConfig(string)
|
|
2237
|
+
})
|
|
2238
|
+
},
|
|
2239
|
+
...["2d-table", "check-table"].map((name) => ({
|
|
2240
|
+
referencePaths: [],
|
|
2241
|
+
scope: "region",
|
|
2242
|
+
name,
|
|
2243
|
+
version: 1,
|
|
2244
|
+
rule: object({
|
|
2245
|
+
autoFill: optionalConfig(boolean),
|
|
2246
|
+
refColField: optionalConfig(string),
|
|
2247
|
+
refRowField: optionalConfig(string),
|
|
2248
|
+
...name === "check-table" ? {
|
|
2249
|
+
checkDsType: optionalConfig(oneOf("default", "custom")),
|
|
2250
|
+
customCheckDsItems: optionalConfig(array(nonempty))
|
|
2251
|
+
} : {
|
|
2252
|
+
confirmBeforeDelete: optionalConfig(boolean),
|
|
2253
|
+
confirmBeforeDeleteTip: optionalConfig(string)
|
|
2254
|
+
}
|
|
2255
|
+
})
|
|
2256
|
+
})),
|
|
2257
|
+
...[
|
|
2258
|
+
"table-header",
|
|
2259
|
+
"sub-table-header",
|
|
2260
|
+
"bounded-item",
|
|
2261
|
+
"data-group-2d"
|
|
2262
|
+
].map((name) => ({
|
|
2263
|
+
referencePaths: [],
|
|
2264
|
+
scope: "region",
|
|
2265
|
+
name,
|
|
2266
|
+
version: 1,
|
|
2267
|
+
rule: empty
|
|
2268
|
+
})),
|
|
2269
|
+
{
|
|
2270
|
+
referencePaths: [],
|
|
2271
|
+
scope: "region",
|
|
2272
|
+
name: "material-consume-table",
|
|
2273
|
+
version: 1,
|
|
2274
|
+
rule: object({
|
|
2275
|
+
confirmBeforeDelete: optionalConfig(boolean),
|
|
2276
|
+
confirmBeforeDeleteTip: optionalConfig(string)
|
|
2277
|
+
})
|
|
2278
|
+
}
|
|
2279
|
+
];
|
|
2280
|
+
var referencePathsRule = array(object({
|
|
2281
|
+
path: array(nonempty, 1),
|
|
2282
|
+
kind: oneOf(...configReferenceKinds)
|
|
2283
|
+
}));
|
|
2284
|
+
/** 注册定义允许校验函数,但拒绝未知键、访问器和额外持有数据,读取时不执行 getter。 */
|
|
2285
|
+
function checkSchemaDefinition(schema) {
|
|
2286
|
+
if (!isObject(schema) || !includes([Object.prototype, null], Object.getPrototypeOf(schema))) throw new ModelEditError("config_schema", "Expected plain schema definition");
|
|
2287
|
+
const allowed = [
|
|
2288
|
+
"scope",
|
|
2289
|
+
"name",
|
|
2290
|
+
"version",
|
|
2291
|
+
"rule",
|
|
2292
|
+
"referencePaths",
|
|
2293
|
+
"defaultConfig",
|
|
2294
|
+
"defaultPolicy",
|
|
2295
|
+
"regionTypes"
|
|
2296
|
+
];
|
|
2297
|
+
for (const key of Reflect.ownKeys(schema)) {
|
|
2298
|
+
const descriptor = Object.getOwnPropertyDescriptor(schema, key);
|
|
2299
|
+
if (!isString(key) || !includes(allowed, key) || !descriptor.enumerable || !("value" in descriptor)) throw new ModelEditError("config_schema", `Unknown or non-data schema property: ${String(key)}`);
|
|
2300
|
+
}
|
|
2301
|
+
if (!includes([
|
|
2302
|
+
"field",
|
|
2303
|
+
"pageWidget",
|
|
2304
|
+
"region",
|
|
2305
|
+
"variant",
|
|
2306
|
+
"business"
|
|
2307
|
+
], schema.scope) || !isString(schema.name) || !schema.name.trim() || !isFunction(schema.rule)) throw new ModelEditError("config_schema", "Invalid schema scope, name or validation rule");
|
|
2308
|
+
if (!isArray(schema.referencePaths)) throw new ModelEditError("config_reference", "Schema must declare referencePaths, including an empty array for no references");
|
|
2309
|
+
if (schema.scope !== "variant" && Object.hasOwn(schema, "regionTypes")) throw new ModelEditError("config_schema", "Only variants declare regionTypes");
|
|
2310
|
+
}
|
|
2311
|
+
/** 提前拒绝重复、前缀和数组通配符重叠;同一配置叶子必须只有一种核心引用语义。 */
|
|
2312
|
+
function checkReferencePaths(paths) {
|
|
2313
|
+
const errors = [];
|
|
2314
|
+
referencePathsRule(paths, "/referencePaths", errors);
|
|
2315
|
+
if (errors.length) throw new ModelEditError("config_reference", `${errors[0].path}: ${errors[0].message}`);
|
|
2316
|
+
/** 星号只匹配数组索引,不把普通对象键错误地当作数组元素。 */
|
|
2317
|
+
const compatible = (left, right) => left === right || left === "*" && /^(0|[1-9]\d*)$/.test(right) || right === "*" && /^(0|[1-9]\d*)$/.test(left);
|
|
2318
|
+
paths.forEach((item, i) => {
|
|
2319
|
+
if (item.path[0] === "*") throw new ModelEditError("config_reference", "Config root is an object, not an array");
|
|
2320
|
+
for (const other of paths.slice(0, i)) if (item.path.slice(0, Math.min(item.path.length, other.path.length)).every((part, j) => compatible(part, other.path[j]))) throw new ModelEditError("config_reference", "Overlapping config reference declarations");
|
|
2321
|
+
});
|
|
2322
|
+
}
|
|
2323
|
+
/** 不可变的会话配置依赖;校验函数须纯净,引用只使用同一套显式路径。 */
|
|
2324
|
+
var ConfigRegistry = class {
|
|
2325
|
+
schemas = /* @__PURE__ */ new Map();
|
|
2326
|
+
/** 注册定义中是否存在实体引用,普通文档文字合并无需扫描全树。 */
|
|
2327
|
+
entityPaths = false;
|
|
2328
|
+
/** 注册闭合配置校验,拒绝重复 schema;兼容区域列表在此复制以隔离调用方。 */
|
|
2329
|
+
constructor(extensions = []) {
|
|
2330
|
+
for (const schema of [...builtinSchemas, ...extensions]) {
|
|
2331
|
+
checkSchemaDefinition(schema);
|
|
2332
|
+
if (!isInteger(schema.version) || schema.version < 1) throw new Error("Invalid config schema version");
|
|
2333
|
+
if (schema.scope === "variant" && (!isArray(schema.regionTypes) || !schema.regionTypes.length || schema.regionTypes.some((type) => !isString(type) || !type.trim()) || uniq(schema.regionTypes ?? []).length !== schema.regionTypes.length)) throw new Error("Variant schema needs supported regionTypes");
|
|
2334
|
+
if (includes(extensions, schema)) {
|
|
2335
|
+
const errors = [];
|
|
2336
|
+
extensionName(schema.name, "", errors);
|
|
2337
|
+
if (errors.length) throw new Error(`Extension schema must use namespace:name: ${schema.name}`);
|
|
2338
|
+
}
|
|
2339
|
+
const key = this.key(schema.scope, schema.name, schema.version);
|
|
2340
|
+
if (this.schemas.has(key)) throw new Error(`Duplicate config schema: ${key}`);
|
|
2341
|
+
const referencePaths = freezeData(copyData(schema.referencePaths));
|
|
2342
|
+
checkReferencePaths(referencePaths);
|
|
2343
|
+
const defaults = isUndefined(schema.defaultConfig) ? void 0 : copyData(schema.defaultConfig);
|
|
2344
|
+
const policy = isUndefined(schema.defaultPolicy) ? void 0 : copyData(schema.defaultPolicy);
|
|
2345
|
+
const issues = [];
|
|
2346
|
+
if (!isUndefined(defaults)) schema.rule(defaults, "/defaultConfig", issues);
|
|
2347
|
+
if (!isUndefined(policy)) {
|
|
2348
|
+
if (schema.scope !== "field" && schema.scope !== "pageWidget") throw new ModelEditError("policy_scope", "Only fields/page widgets have defaultPolicy");
|
|
2349
|
+
policyRule(policy, "/defaultPolicy", issues);
|
|
2350
|
+
}
|
|
2351
|
+
if (issues.length) throw new ModelEditError("config_defaults", `${issues[0].path}: ${issues[0].message}`);
|
|
2352
|
+
if (referencePaths.some((reference) => reference.kind === "entity")) this.entityPaths = true;
|
|
2353
|
+
if (defaults && readConfigReferences(defaults, referencePaths).length) throw new ModelEditError("config_defaults", "Static defaults cannot reference document identities");
|
|
2354
|
+
const registered = {
|
|
2355
|
+
...schema,
|
|
2356
|
+
...isUndefined(defaults) ? {} : { defaultConfig: freezeData(defaults) },
|
|
2357
|
+
...isUndefined(policy) ? {} : { defaultPolicy: freezeData(policy) },
|
|
2358
|
+
referencePaths
|
|
2359
|
+
};
|
|
2360
|
+
this.schemas.set(key, schema.scope === "variant" ? {
|
|
2361
|
+
...registered,
|
|
2362
|
+
scope: "variant",
|
|
2363
|
+
regionTypes: [...schema.regionTypes]
|
|
2364
|
+
} : {
|
|
2365
|
+
...registered,
|
|
2366
|
+
scope: schema.scope
|
|
2367
|
+
});
|
|
2368
|
+
}
|
|
2369
|
+
}
|
|
2370
|
+
/** 解析版本对应的静态配置;浅层实例覆盖保留 false/0/null,嵌套对象整体替换。 */
|
|
2371
|
+
resolveConfig(scope, name, version, config = {}) {
|
|
2372
|
+
const schema = this.requireSchema(scope, name, version);
|
|
2373
|
+
const explicit = copyInputData(config);
|
|
2374
|
+
if (!isObject(explicit)) throw new ModelEditError("field_config", "config must be an object");
|
|
2375
|
+
const resolved = {
|
|
2376
|
+
...schema.defaultConfig,
|
|
2377
|
+
...explicit
|
|
2378
|
+
};
|
|
2379
|
+
const issues = [];
|
|
2380
|
+
schema.rule(resolved, "/config", issues);
|
|
2381
|
+
if (issues.length) throw new ModelEditError("config_defaults", `${issues[0].path}: ${issues[0].message}`);
|
|
2382
|
+
freezeData(resolved);
|
|
2383
|
+
return resolved;
|
|
2384
|
+
}
|
|
2385
|
+
/** 解析组件静态能力覆盖;未注册默认值的能力仍缺省,不执行权限或模式判断。 */
|
|
2386
|
+
resolvePolicy(scope, name, version, policy = {}) {
|
|
2387
|
+
const schema = this.requireSchema(scope, name, version);
|
|
2388
|
+
const explicit = copyInputData(policy), issues = [];
|
|
2389
|
+
policyRule(explicit, "/policy", issues);
|
|
2390
|
+
if (issues.length) throw new ModelEditError("policy", `${issues[0].path}: ${issues[0].message}`);
|
|
2391
|
+
return freezeData({
|
|
2392
|
+
...schema.defaultPolicy,
|
|
2393
|
+
...explicit
|
|
2394
|
+
});
|
|
2395
|
+
}
|
|
2396
|
+
/** 按使用范围和版本校验配置,variant 另检查其支持的区域类型。 */
|
|
2397
|
+
validate(scope, name, version, config, path, issues, regionType) {
|
|
2398
|
+
const schema = this.schemas.get(this.key(scope, name, version));
|
|
2399
|
+
if (!schema) {
|
|
2400
|
+
issue(issues, path, "unsupported_config", `Unregistered ${scope} schema ${name}@${version}`);
|
|
2401
|
+
return;
|
|
2402
|
+
}
|
|
2403
|
+
if (schema.scope === "variant" && !includes(schema.regionTypes, regionType)) issue(issues, path, "variant_type", `Variant ${name} is incompatible with region ${regionType}`);
|
|
2404
|
+
schema.rule(config, path, issues);
|
|
2405
|
+
}
|
|
2406
|
+
/** 读取实际配置中的显式核心引用,用于校验、查询、资源生命周期和片段闭包。 */
|
|
2407
|
+
getReferences(scope, name, version, config) {
|
|
2408
|
+
return freezeData(readConfigReferences(config, this.requireSchema(scope, name, version).referencePaths));
|
|
2409
|
+
}
|
|
2410
|
+
/** 没有声明实体引用的注册表允许文字归一化直接跳过反向扫描。 */
|
|
2411
|
+
hasEntityReferences() {
|
|
2412
|
+
return this.entityPaths;
|
|
2413
|
+
}
|
|
2414
|
+
/** 隔离配置后按同一契约重映射实体或字典引用;复制、文字归一和片段导入共用此入口。 */
|
|
2415
|
+
remapConfig(scope, name, version, config, maps) {
|
|
2416
|
+
const schema = this.requireSchema(scope, name, version), copied = copyData(config);
|
|
2417
|
+
remapConfigReferences(copied, schema.referencePaths, maps);
|
|
2418
|
+
return copied;
|
|
2419
|
+
}
|
|
2420
|
+
/** 使用复合键隔离同名但不同范围/版本的业务 schema。 */
|
|
2421
|
+
key(scope, name, version) {
|
|
2422
|
+
return `${scope}/${name}@${version}`;
|
|
2423
|
+
}
|
|
2424
|
+
/** 只按范围、名字和明确版本取定义,禁止回退到其他插件或版本。 */
|
|
2425
|
+
requireSchema(scope, name, version) {
|
|
2426
|
+
const schema = this.schemas.get(this.key(scope, name, version));
|
|
2427
|
+
if (!schema) throw new ModelEditError("unsupported_config", `Unregistered ${scope} schema ${name}@${version}`);
|
|
2428
|
+
return schema;
|
|
2429
|
+
}
|
|
2430
|
+
};
|
|
2431
|
+
// src/model/validation/validation.ts
|
|
2432
|
+
/**
|
|
2433
|
+
* @file 文档语义校验:检查身份、引用、样式继承、表格与附属内容,并提供编辑提交的局部或完整校验。
|
|
2434
|
+
* 阅读定位:validation/ · 核心结构、语义与 JSON 边界校验。
|
|
2435
|
+
*/
|
|
2436
|
+
/** 按物理行列比较范围包含关系,不受合并从格显示状态影响。 */
|
|
2437
|
+
var contains = (a, b) => a.top <= b.top && a.left <= b.left && a.bottom >= b.bottom && a.right >= b.right;
|
|
2438
|
+
/** 判断两个闭合矩形是否占用共同物理格,用于合并和业务区域重叠检查。 */
|
|
2439
|
+
var intersects = (a, b) => a.top <= b.bottom && b.top <= a.bottom && a.left <= b.right && b.left <= a.right;
|
|
2440
|
+
/** 这些区域按整行展开;列范围不相交也不能共用物理行。 */
|
|
2441
|
+
var repeatingRowTypes = [
|
|
2442
|
+
"repeating",
|
|
2443
|
+
"2d-table",
|
|
2444
|
+
"check-table",
|
|
2445
|
+
"material-consume-table"
|
|
2446
|
+
];
|
|
2447
|
+
var businessTypes = /* @__PURE__ */ new Set(["bounded", ...repeatingRowTypes]);
|
|
2448
|
+
/** 检查拥有内容中的表格,附属字段不能绕过业务格/合并从格的嵌套限制。 */
|
|
2449
|
+
function hasTable(blocks) {
|
|
2450
|
+
return blocks.some((block) => block.kind === "table" || block.content.some((inline) => inline.kind === "field" && inline.attachments?.some((attachment) => hasTable(attachment.blocks))));
|
|
2451
|
+
}
|
|
2452
|
+
/** 工厂与整文档共用字段局部条件规则;调用前必须完成结构检查及对应配置形状检查。 */
|
|
2453
|
+
function validateFieldConditions(node, path, errors, configValid) {
|
|
2454
|
+
const optionIds = /* @__PURE__ */ new Set();
|
|
2455
|
+
if (node.widget === "choice" && configValid) node.config.options.forEach((option, i) => {
|
|
2456
|
+
if (optionIds.has(option.id)) issue(errors, `${path}/config/options/${i}/id`, "duplicate_id", "Duplicate option ID in field");
|
|
2457
|
+
optionIds.add(option.id);
|
|
2458
|
+
});
|
|
2459
|
+
const conditions = /* @__PURE__ */ new Set();
|
|
2460
|
+
node.attachments?.forEach((attachment, i) => {
|
|
2461
|
+
const p = `${path}/attachments/${i}`, when = attachment.when;
|
|
2462
|
+
if (when.kind === "option") {
|
|
2463
|
+
if (node.widget !== "choice" || !optionIds.has(when.optionId)) issue(errors, `${p}/when/optionId`, "reference", "Attachment must reference an option of this choice field");
|
|
2464
|
+
} else if (node.widget !== "checkbox") issue(errors, `${p}/when`, "attachment_condition", "Boolean attachment requires checkbox");
|
|
2465
|
+
const key = when.kind === "option" ? `option:${when.optionId}` : `boolean:${when.value}`;
|
|
2466
|
+
if (conditions.has(key)) issue(errors, `${p}/when`, "attachment_condition", "Duplicate attachment condition");
|
|
2467
|
+
conditions.add(key);
|
|
2468
|
+
});
|
|
2469
|
+
}
|
|
2470
|
+
/** 对明确类别的引用检查存在性,不让其他字典中同名的 ID 代替目标。 */
|
|
2471
|
+
function validateConfigTarget(reference, document, hasEntity, errors) {
|
|
2472
|
+
const target = reference.target;
|
|
2473
|
+
if (!(target.kind === "entity" ? hasEntity(target.id) : target.kind === "binding" ? Object.hasOwn(document.bindings, target.id) : target.kind === "asset" ? Object.hasOwn(document.assets, target.id) : target.kind === "style" ? Object.hasOwn(document.styles[target.styleKind], target.id) : false)) issue(errors, reference.path, "reference", `Missing ${target.kind} reference: ${target.id}`);
|
|
2474
|
+
}
|
|
2475
|
+
/** 已验证文档仅修改字段 config 时的等价局部检查;拥有关系和其他声明必须未变。 @internal */
|
|
2476
|
+
function validateFieldConfigEdit(node, path, document, registry, hasEntity, maxDepth = 200) {
|
|
2477
|
+
const errors = [];
|
|
2478
|
+
if (!isUndefined(node.config)) {
|
|
2479
|
+
const configPath = `${path}/config`, depth = configPath.split("/").length - 1;
|
|
2480
|
+
errors.push(...validateJsonValue(node.config, maxDepth, depth).map((error) => ({
|
|
2481
|
+
...error,
|
|
2482
|
+
path: `${configPath}${error.path}`
|
|
2483
|
+
})));
|
|
2484
|
+
}
|
|
2485
|
+
if (errors.length) return errors;
|
|
2486
|
+
registry.validate("field", node.widget, node.configVersion ?? 1, node.config ?? {}, `${path}/config`, errors);
|
|
2487
|
+
if (errors.length) return errors;
|
|
2488
|
+
validateFieldConditions(node, path, errors, true);
|
|
2489
|
+
try {
|
|
2490
|
+
for (const reference of registry.getReferences("field", node.widget, node.configVersion ?? 1, node.config ?? {})) validateConfigTarget({
|
|
2491
|
+
...reference,
|
|
2492
|
+
path: `${path}/config${reference.path}`
|
|
2493
|
+
}, document, hasEntity, errors);
|
|
2494
|
+
} catch (error) {
|
|
2495
|
+
issue(errors, `${path}/config`, "config_reference", isError(error) ? error.message : "Invalid config reference contract");
|
|
2496
|
+
}
|
|
2497
|
+
return errors;
|
|
2498
|
+
}
|
|
2499
|
+
/** 在结构通过后校验全局身份及跨对象语义;不把这些临时索引留在文档对象上。 */
|
|
2500
|
+
function validateReferences(doc, registry, errors) {
|
|
2501
|
+
const ids = /* @__PURE__ */ new Map();
|
|
2502
|
+
const configReferences = [];
|
|
2503
|
+
const parts = new Map((doc.format === "gct.document" ? doc.parts : []).map((part) => [part.id, part]));
|
|
2504
|
+
/** 登记全局拥有实体 ID,重复时同时指出第一次声明的位置。 */
|
|
2505
|
+
function id(value, path) {
|
|
2506
|
+
const previous = ids.get(value);
|
|
2507
|
+
if (!isUndefined(previous)) issue(errors, path, "duplicate_id", `ID already declared at ${previous}`);
|
|
2508
|
+
else ids.set(value, path);
|
|
2509
|
+
}
|
|
2510
|
+
/** 检查可选引用在指定类别字典中存在,不能用其他类别的同名身份代替。 */
|
|
2511
|
+
function ref(value, dictionary, path) {
|
|
2512
|
+
if (!isUndefined(value) && !Object.hasOwn(dictionary, value)) issue(errors, path, "reference", `Missing reference: ${value}`);
|
|
2513
|
+
}
|
|
2514
|
+
/** 形状通过后收集配置的显式引用,待拥有身份全部登记后统一核对。 */
|
|
2515
|
+
function businessConfig(scope, name, version, value, path, regionType) {
|
|
2516
|
+
const before = errors.length;
|
|
2517
|
+
registry.validate(scope, name, version, value, path, errors, regionType);
|
|
2518
|
+
if (errors.length !== before) return;
|
|
2519
|
+
try {
|
|
2520
|
+
configReferences.push(...registry.getReferences(scope, name, version, value).map((reference) => ({
|
|
2521
|
+
...reference,
|
|
2522
|
+
path: `${path}${reference.path}`
|
|
2523
|
+
})));
|
|
2524
|
+
} catch (error) {
|
|
2525
|
+
issue(errors, path, "config_reference", isError(error) ? error.message : "Invalid config reference contract");
|
|
2526
|
+
}
|
|
2527
|
+
}
|
|
2528
|
+
/** 拒绝悬挂的配置引用;文档拥有身份与各类字典独立检查。 */
|
|
2529
|
+
function checkConfigReferences() {
|
|
2530
|
+
for (const reference of configReferences) validateConfigTarget(reference, doc, (id) => ids.has(id), errors);
|
|
2531
|
+
}
|
|
2532
|
+
/** 统一检查文字样式引用,段落和行内节点复用同一字典。 */
|
|
2533
|
+
function textStyle(node, path) {
|
|
2534
|
+
ref(node.textStyleId, doc.styles.text, at(path, "textStyleId"));
|
|
2535
|
+
}
|
|
2536
|
+
/** 校验组件配置及扩展版本;返回成功后调用方才可按具体配置类型读取。 */
|
|
2537
|
+
function config(node, scope, path) {
|
|
2538
|
+
const before = errors.length;
|
|
2539
|
+
if (includes(node.widget, ":")) {
|
|
2540
|
+
extensionName(node.widget, at(path, "widget"), errors);
|
|
2541
|
+
if (isUndefined(node.configVersion)) issue(errors, at(path, "configVersion"), "required", "Extension needs explicit configVersion");
|
|
2542
|
+
}
|
|
2543
|
+
businessConfig(scope, node.widget, node.configVersion ?? 1, node.config ?? {}, at(path, "config"));
|
|
2544
|
+
return errors.length === before;
|
|
2545
|
+
}
|
|
2546
|
+
/** 检查字段绑定、局部选项 ID 和附属条件,并递归检查附属块的身份与结构。 */
|
|
2547
|
+
function field(node, path, tableDepth) {
|
|
2548
|
+
const configValid = config(node, "field", path);
|
|
2549
|
+
ref(node.bindingId, doc.bindings, at(path, "bindingId"));
|
|
2550
|
+
validateFieldConditions(node, path, errors, configValid);
|
|
2551
|
+
node.attachments?.forEach((attachment, i) => {
|
|
2552
|
+
const p = `${path}/attachments/${i}`;
|
|
2553
|
+
id(attachment.id, `${p}/id`);
|
|
2554
|
+
blocks(attachment.blocks, `${p}/blocks`, tableDepth);
|
|
2555
|
+
});
|
|
2556
|
+
}
|
|
2557
|
+
/** 按行内语义分派引用检查,普通文字不会被拆成逐字符节点。 */
|
|
2558
|
+
function paragraph(node, path, tableDepth) {
|
|
2559
|
+
textStyle(node, path);
|
|
2560
|
+
ref(node.paragraphStyleId, doc.styles.paragraph, `${path}/paragraphStyleId`);
|
|
2561
|
+
node.content.forEach((inline, i) => {
|
|
2562
|
+
const p = `${path}/content/${i}`;
|
|
2563
|
+
id(inline.id, `${p}/id`);
|
|
2564
|
+
if ("textStyleId" in inline) textStyle(inline, p);
|
|
2565
|
+
if (inline.kind === "field") field(inline, p, tableDepth);
|
|
2566
|
+
if (inline.kind === "image") ref(inline.assetId, doc.assets, `${p}/assetId`);
|
|
2567
|
+
if (inline.kind === "pageWidget") config(inline, "pageWidget", p);
|
|
2568
|
+
});
|
|
2569
|
+
}
|
|
2570
|
+
/** 检查矩形物理网格、合并、区域关系与嵌套约束,保留合并从格的原内容。 */
|
|
2571
|
+
function table(node, path, tableDepth) {
|
|
2572
|
+
if (tableDepth > 1) issue(errors, path, "nested_table", "Only one nested table level is supported in v1");
|
|
2573
|
+
ref(node.tableStyleId, doc.styles.table, `${path}/tableStyleId`);
|
|
2574
|
+
const cells = /* @__PURE__ */ new Map();
|
|
2575
|
+
node.columns.forEach((column, i) => id(column.id, `${path}/columns/${i}/id`));
|
|
2576
|
+
node.rows.forEach((row, r) => {
|
|
2577
|
+
const p = `${path}/rows/${r}`;
|
|
2578
|
+
id(row.id, `${p}/id`);
|
|
2579
|
+
if (row.cells.length !== node.columns.length) issue(errors, `${p}/cells`, "grid", "Physical cell count must match columns, including merge slaves");
|
|
2580
|
+
row.cells.forEach((cell, c) => {
|
|
2581
|
+
const cp = `${p}/cells/${c}`;
|
|
2582
|
+
id(cell.id, `${cp}/id`);
|
|
2583
|
+
cells.set(cell.id, {
|
|
2584
|
+
row: r,
|
|
2585
|
+
col: c,
|
|
2586
|
+
cell,
|
|
2587
|
+
path: cp
|
|
2588
|
+
});
|
|
2589
|
+
blocks(cell.blocks, `${cp}/blocks`, tableDepth + 1);
|
|
2590
|
+
});
|
|
2591
|
+
});
|
|
2592
|
+
/** 将本表 CellId 端点解析为矩形;跨表引用或倒置范围只报错,不纠正数据。 */
|
|
2593
|
+
function rectangle(range, p) {
|
|
2594
|
+
const from = cells.get(range.fromCellId), to = cells.get(range.toCellId);
|
|
2595
|
+
if (!from) issue(errors, `${p}/fromCellId`, "reference", "Range start is not a cell in this table");
|
|
2596
|
+
if (!to) issue(errors, `${p}/toCellId`, "reference", "Range end is not a cell in this table");
|
|
2597
|
+
if (!from || !to) return;
|
|
2598
|
+
if (from.row > to.row || from.col > to.col) {
|
|
2599
|
+
issue(errors, p, "range", "Range must run from top-left to bottom-right");
|
|
2600
|
+
return;
|
|
2601
|
+
}
|
|
2602
|
+
return {
|
|
2603
|
+
top: from.row,
|
|
2604
|
+
left: from.col,
|
|
2605
|
+
bottom: to.row,
|
|
2606
|
+
right: to.col
|
|
2607
|
+
};
|
|
2608
|
+
}
|
|
2609
|
+
const merges = [];
|
|
2610
|
+
node.merges.forEach((merge, i) => {
|
|
2611
|
+
const p = `${path}/merges/${i}`;
|
|
2612
|
+
id(merge.id, `${p}/id`);
|
|
2613
|
+
const rect = rectangle(merge.range, `${p}/range`);
|
|
2614
|
+
if (!rect) return;
|
|
2615
|
+
if (rect.top === rect.bottom && rect.left === rect.right) issue(errors, `${p}/range`, "merge", "Merge must contain more than one cell");
|
|
2616
|
+
if (merges.some((other) => intersects(other, rect))) issue(errors, `${p}/range`, "merge_overlap", "Merge ranges overlap");
|
|
2617
|
+
merges.push(rect);
|
|
2618
|
+
});
|
|
2619
|
+
const regions = new Map(node.regions.map((region) => [region.id, region]));
|
|
2620
|
+
const regionRects = /* @__PURE__ */ new Map();
|
|
2621
|
+
node.regions.forEach((region, i) => {
|
|
2622
|
+
const p = `${path}/regions/${i}`;
|
|
2623
|
+
id(region.id, `${p}/id`);
|
|
2624
|
+
const rect = rectangle(region.range, `${p}/range`);
|
|
2625
|
+
if (rect) regionRects.set(region.id, rect);
|
|
2626
|
+
businessConfig("region", region.type, region.configVersion ?? 1, region.config ?? {}, `${p}/config`);
|
|
2627
|
+
if (region.variant) businessConfig("variant", region.variant.name, region.variant.version, region.variant.config, `${p}/variant/config`, region.type);
|
|
2628
|
+
if (businessTypes.has(region.type) && !region.binding) issue(errors, `${p}/binding`, "required", "Business region needs a data binding");
|
|
2629
|
+
if (region.type === "material-consume-table" && !region.variant) issue(errors, `${p}/variant`, "required", "Material consume settings require a registered business variant");
|
|
2630
|
+
});
|
|
2631
|
+
const businessRects = [];
|
|
2632
|
+
const repeatingRows = [];
|
|
2633
|
+
node.regions.forEach((region, i) => {
|
|
2634
|
+
const p = `${path}/regions/${i}`;
|
|
2635
|
+
const rect = regionRects.get(region.id);
|
|
2636
|
+
const parent = isUndefined(region.parentRegionId) ? void 0 : regions.get(region.parentRegionId);
|
|
2637
|
+
const childType = region.type === "bounded-item" || region.type === "data-group-2d";
|
|
2638
|
+
if (childType && !parent) issue(errors, `${p}/parentRegionId`, "reference", "Item/data group needs a parent region in the same table");
|
|
2639
|
+
if (!childType && !isUndefined(region.parentRegionId)) issue(errors, `${p}/parentRegionId`, "region_parent", "Only item/data group regions have a parent");
|
|
2640
|
+
if (parent) {
|
|
2641
|
+
if (!(region.type === "bounded-item" ? parent.type === "bounded" : region.type === "data-group-2d" && (parent.type === "2d-table" || parent.type === "check-table"))) issue(errors, `${p}/parentRegionId`, "region_parent", "Incompatible parent region type");
|
|
2642
|
+
const parentRect = regionRects.get(parent.id);
|
|
2643
|
+
const validChild = rect && parentRect && (region.type === "data-group-2d" ? rect.left >= parentRect.left && rect.right <= parentRect.right && rect.top <= parentRect.bottom && rect.bottom >= parentRect.top : contains(parentRect, rect));
|
|
2644
|
+
if (rect && parentRect && !validChild) issue(errors, `${p}/range`, "region_containment", region.type === "data-group-2d" ? "Data group columns must be inside its parent and its rows must intersect the body" : "Child region must be inside parent range");
|
|
2645
|
+
}
|
|
2646
|
+
if (region.type === "sub-table-header") {
|
|
2647
|
+
const target = isUndefined(region.targetRegionId) ? void 0 : regions.get(region.targetRegionId);
|
|
2648
|
+
if (!target || !businessTypes.has(target.type)) issue(errors, `${p}/targetRegionId`, "reference", "Subtable header must target a business region in the same table");
|
|
2649
|
+
} else if (!isUndefined(region.targetRegionId)) issue(errors, `${p}/targetRegionId`, "region_target", "Only subtable headers have a target");
|
|
2650
|
+
if (businessTypes.has(region.type) && rect) {
|
|
2651
|
+
if (businessRects.some((other) => intersects(other, rect))) issue(errors, `${p}/range`, "region_overlap", "Business regions overlap");
|
|
2652
|
+
businessRects.push(rect);
|
|
2653
|
+
if (repeatingRowTypes.includes(region.type)) {
|
|
2654
|
+
if (repeatingRows.some((other) => rect.top <= other.bottom && other.top <= rect.bottom)) issue(errors, `${p}/range`, "region_row_overlap", "同一行不能放置两个重复业务区");
|
|
2655
|
+
repeatingRows.push(rect);
|
|
2656
|
+
}
|
|
2657
|
+
}
|
|
2658
|
+
if (rect) {
|
|
2659
|
+
for (const merge of merges) if (intersects(rect, merge) && !contains(rect, merge)) issue(errors, `${p}/range`, "region_merge", "Region cuts through a merged cell");
|
|
2660
|
+
}
|
|
2661
|
+
let current = region;
|
|
2662
|
+
const seen = /* @__PURE__ */ new Set();
|
|
2663
|
+
while (current) {
|
|
2664
|
+
if (seen.has(current.id)) {
|
|
2665
|
+
issue(errors, `${p}/parentRegionId`, "reference_cycle", "Region parent cycle");
|
|
2666
|
+
break;
|
|
2667
|
+
}
|
|
2668
|
+
seen.add(current.id);
|
|
2669
|
+
current = isUndefined(current.parentRegionId) ? void 0 : regions.get(current.parentRegionId);
|
|
2670
|
+
}
|
|
2671
|
+
});
|
|
2672
|
+
for (const { row, col, cell, path: cp } of cells.values()) {
|
|
2673
|
+
if (!hasTable(cell.blocks)) continue;
|
|
2674
|
+
const point = {
|
|
2675
|
+
top: row,
|
|
2676
|
+
bottom: row,
|
|
2677
|
+
left: col,
|
|
2678
|
+
right: col
|
|
2679
|
+
};
|
|
2680
|
+
if (businessRects.some((rect) => contains(rect, point))) issue(errors, `${cp}/blocks`, "nested_table", "Nested tables are unsupported in business regions");
|
|
2681
|
+
}
|
|
2682
|
+
}
|
|
2683
|
+
/** 遍历拥有块并登记身份,跨表/跨部件引用不会被当成拥有关系重复展开。 */
|
|
2684
|
+
function blocks(nodes, path, tableDepth) {
|
|
2685
|
+
nodes.forEach((node, i) => {
|
|
2686
|
+
const p = `${path}/${i}`;
|
|
2687
|
+
id(node.id, `${p}/id`);
|
|
2688
|
+
if (node.kind === "paragraph") paragraph(node, p, tableDepth);
|
|
2689
|
+
else table(node, p, tableDepth);
|
|
2690
|
+
});
|
|
2691
|
+
}
|
|
2692
|
+
if (doc.format === "gct.document") {
|
|
2693
|
+
id(doc.id, "/id");
|
|
2694
|
+
ref(doc.settings.defaultTextStyleId, doc.styles.text, "/settings/defaultTextStyleId");
|
|
2695
|
+
ref(doc.settings.defaultParagraphStyleId, doc.styles.paragraph, "/settings/defaultParagraphStyleId");
|
|
2696
|
+
}
|
|
2697
|
+
for (const kind of [
|
|
2698
|
+
"text",
|
|
2699
|
+
"paragraph",
|
|
2700
|
+
"table"
|
|
2701
|
+
]) {
|
|
2702
|
+
const dictionary = doc.styles[kind];
|
|
2703
|
+
for (const [key, style] of Object.entries(dictionary)) {
|
|
2704
|
+
const p = at(`/styles/${kind}`, key);
|
|
2705
|
+
ref(style.basedOn, dictionary, `${p}/basedOn`);
|
|
2706
|
+
if ("textStyleId" in style) ref(style.textStyleId, doc.styles.text, `${p}/textStyleId`);
|
|
2707
|
+
const seen = /* @__PURE__ */ new Set();
|
|
2708
|
+
let current = key;
|
|
2709
|
+
while (!isUndefined(current) && Object.hasOwn(dictionary, current)) {
|
|
2710
|
+
if (seen.has(current)) {
|
|
2711
|
+
issue(errors, `${p}/basedOn`, "reference_cycle", "Style inheritance cycle");
|
|
2712
|
+
break;
|
|
2713
|
+
}
|
|
2714
|
+
seen.add(current);
|
|
2715
|
+
current = dictionary[current].basedOn;
|
|
2716
|
+
}
|
|
2717
|
+
}
|
|
2718
|
+
}
|
|
2719
|
+
if (doc.format === "gct.fragment") {
|
|
2720
|
+
blocks(doc.blocks, "/blocks", 0);
|
|
2721
|
+
checkConfigReferences();
|
|
2722
|
+
return;
|
|
2723
|
+
}
|
|
2724
|
+
for (const [name, config] of Object.entries(doc.business.configs ?? {})) {
|
|
2725
|
+
if (!config) continue;
|
|
2726
|
+
const p = at("/business/configs", name);
|
|
2727
|
+
extensionName(name, p, errors);
|
|
2728
|
+
businessConfig("business", name, config.version, config.value, `${p}/value`);
|
|
2729
|
+
}
|
|
2730
|
+
doc.parts.forEach((part, i) => {
|
|
2731
|
+
id(part.id, `/parts/${i}/id`);
|
|
2732
|
+
blocks(part.blocks, `/parts/${i}/blocks`, 0);
|
|
2733
|
+
});
|
|
2734
|
+
doc.sections.forEach((section, i) => {
|
|
2735
|
+
const p = `/sections/${i}`;
|
|
2736
|
+
id(section.id, `${p}/id`);
|
|
2737
|
+
const page = section.page;
|
|
2738
|
+
if (page.marginsPx.left + page.marginsPx.right + (page.gutterPx ?? 0) >= page.sizePx.width || page.marginsPx.top + page.marginsPx.bottom >= page.sizePx.height) issue(errors, `${p}/page`, "page_geometry", "Page margins leave no content area");
|
|
2739
|
+
for (const [slotKind, slots] of [["header", section.headerSlots], ["footer", section.footerSlots]]) for (const [slot, partId] of Object.entries(slots ?? {})) {
|
|
2740
|
+
if (isNull(partId)) continue;
|
|
2741
|
+
if (parts.get(partId)?.kind !== slotKind) issue(errors, `${p}/${slotKind}Slots/${slot}`, "reference", `Expected ${slotKind} part`);
|
|
2742
|
+
}
|
|
2743
|
+
blocks(section.blocks, `${p}/blocks`, 0);
|
|
2744
|
+
section.overlays.forEach((overlay, j) => {
|
|
2745
|
+
id(overlay.id, `${p}/overlays/${j}/id`);
|
|
2746
|
+
blocks(overlay.blocks, `${p}/overlays/${j}/blocks`, 0);
|
|
2747
|
+
});
|
|
2748
|
+
});
|
|
2749
|
+
checkConfigReferences();
|
|
2750
|
+
}
|
|
2751
|
+
/** JSON 边界通过后共用完整结构和全局语义检查,不向公共入口提供跳过校验的选项。 */
|
|
2752
|
+
function validateDocumentStructure(value, options) {
|
|
2753
|
+
const issues = [];
|
|
2754
|
+
documentRule(value, "", issues);
|
|
2755
|
+
if (issues.length) return {
|
|
2756
|
+
valid: false,
|
|
2757
|
+
issues
|
|
2758
|
+
};
|
|
2759
|
+
const document = value;
|
|
2760
|
+
validateReferences(document, options.registry ?? new ConfigRegistry(), issues);
|
|
2761
|
+
return issues.length ? {
|
|
2762
|
+
valid: false,
|
|
2763
|
+
issues
|
|
2764
|
+
} : {
|
|
2765
|
+
valid: true,
|
|
2766
|
+
document,
|
|
2767
|
+
issues: []
|
|
2768
|
+
};
|
|
2769
|
+
}
|
|
2770
|
+
/**
|
|
2771
|
+
* 编辑器专用提交检查:已打开文档及操作载荷均已通过 JSON 边界,只复查最终改值和插入子树的真实深度。
|
|
2772
|
+
* 操作引擎保证数组稠密、属性为普通可枚举数据及写入隔离;结构、配置和跨对象语义仍完整检查。
|
|
2773
|
+
* 必须检查最终存活节点;事务中删除、重设或移动的中间载荷不能代替最终文档。 @internal
|
|
2774
|
+
*/
|
|
2775
|
+
function validateDocumentEdit(document, operations, engine, options) {
|
|
2776
|
+
const values = /* @__PURE__ */ new Map(), entities = /* @__PURE__ */ new Map(), maxDepth = options.maxDepth ?? 200;
|
|
2777
|
+
for (const operation of operations) {
|
|
2778
|
+
if (operation.kind === "text") continue;
|
|
2779
|
+
if (operation.kind === "business") {
|
|
2780
|
+
const configs = document.business.configs;
|
|
2781
|
+
if (configs && Object.hasOwn(configs, operation.name)) values.set(at("/business/configs", operation.name), configs[operation.name]);
|
|
2782
|
+
} else if (operation.kind === "dictionary") {
|
|
2783
|
+
const dictionary = engine.dictionary(operation.dictionary);
|
|
2784
|
+
if (Object.hasOwn(dictionary, operation.key)) values.set(at(`/${operation.dictionary.replace(".", "/")}`, operation.key), dictionary[operation.key]);
|
|
2785
|
+
} else if (operation.kind === "set") {
|
|
2786
|
+
if (!isNull(entities.get(operation.nodeId))) {
|
|
2787
|
+
const keys = entities.get(operation.nodeId) ?? /* @__PURE__ */ new Set();
|
|
2788
|
+
keys.add(operation.key);
|
|
2789
|
+
entities.set(operation.nodeId, keys);
|
|
2790
|
+
}
|
|
2791
|
+
} else for (const inserted of operation.insert) {
|
|
2792
|
+
const id = inserted.id;
|
|
2793
|
+
entities.set(id, null);
|
|
2794
|
+
}
|
|
2795
|
+
}
|
|
2796
|
+
const surviving = [...entities.keys()].filter((id) => engine.index.get(id)), paths = engine.index.paths(surviving);
|
|
2797
|
+
for (const id of surviving) {
|
|
2798
|
+
const node = engine.index.require(id).node, keys = entities.get(id), path = paths.get(id);
|
|
2799
|
+
if (isNull(keys)) values.set(path, node);
|
|
2800
|
+
else for (const key of keys) if (Object.hasOwn(node, key)) values.set(at(path, key), node[key]);
|
|
2801
|
+
}
|
|
2802
|
+
const issues = [], checked = /* @__PURE__ */ new Set();
|
|
2803
|
+
/** 用绝对路径检查局部值,越界时保持公共全量校验相同的错误路径和错误码。 */
|
|
2804
|
+
function check(value, path) {
|
|
2805
|
+
const depth = path.split("/").length - 1;
|
|
2806
|
+
if (depth > maxDepth) issue(issues, path, "depth", `JSON exceeds maxDepth=${maxDepth}`);
|
|
2807
|
+
else issues.push(...validateJsonValue(value, maxDepth, depth).map((error) => ({
|
|
2808
|
+
...error,
|
|
2809
|
+
path: `${path}${error.path}`
|
|
2810
|
+
})));
|
|
2811
|
+
}
|
|
2812
|
+
for (const path of sortBy$1([...values.keys()], [(path) => path.length])) {
|
|
2813
|
+
let ancestor = path;
|
|
2814
|
+
while (ancestor && !checked.has(ancestor)) ancestor = ancestor.slice(0, ancestor.lastIndexOf("/"));
|
|
2815
|
+
if (checked.has(ancestor)) continue;
|
|
2816
|
+
check(values.get(path), path);
|
|
2817
|
+
checked.add(path);
|
|
2818
|
+
}
|
|
2819
|
+
return issues.length ? {
|
|
2820
|
+
valid: false,
|
|
2821
|
+
issues
|
|
2822
|
+
} : validateDocumentStructure(document, options);
|
|
2823
|
+
}
|
|
2824
|
+
/** 依次执行 JSON 边界、闭合结构和语义校验;成功返回同一对象,不复制或修复数据。 */
|
|
2825
|
+
function validateDocument(value, options = {}) {
|
|
2826
|
+
const issues = validateJsonValue(value, options.maxDepth, 0, true);
|
|
2827
|
+
return issues.length ? {
|
|
2828
|
+
valid: false,
|
|
2829
|
+
issues
|
|
2830
|
+
} : validateDocumentStructure(value, options);
|
|
2831
|
+
}
|
|
2832
|
+
/** 用同一套节点、配置和跨引用规则校验剪贴片段,不创建临时文档或伪造身份。 */
|
|
2833
|
+
function validateFragment(value, options = {}) {
|
|
2834
|
+
const issues = validateJsonValue(value, options.maxDepth, 0, true);
|
|
2835
|
+
if (issues.length) return {
|
|
2836
|
+
valid: false,
|
|
2837
|
+
issues
|
|
2838
|
+
};
|
|
2839
|
+
fragmentRule(value, "", issues);
|
|
2840
|
+
if (issues.length) return {
|
|
2841
|
+
valid: false,
|
|
2842
|
+
issues
|
|
2843
|
+
};
|
|
2844
|
+
const fragment = value;
|
|
2845
|
+
validateReferences(fragment, options.registry ?? new ConfigRegistry(), issues);
|
|
2846
|
+
return issues.length ? {
|
|
2847
|
+
valid: false,
|
|
2848
|
+
issues
|
|
2849
|
+
} : {
|
|
2850
|
+
valid: true,
|
|
2851
|
+
fragment,
|
|
2852
|
+
issues: []
|
|
2853
|
+
};
|
|
2854
|
+
}
|
|
2855
|
+
// src/model/serialization/codec.ts
|
|
2856
|
+
/**
|
|
2857
|
+
* @file 原生文档读写边界:解析字符串、读取对象、保存同形 JSON,并统一抛出结构化校验错误。
|
|
2858
|
+
* 阅读定位:serialization/ · 原生文档和片段的读写边界。
|
|
2859
|
+
*/
|
|
2860
|
+
var DocumentValidationError = class extends Error {
|
|
2861
|
+
issues;
|
|
2862
|
+
/** 将全部结构化错误保留在异常上,message 只提供便于日志阅读的路径摘要。 */
|
|
2863
|
+
constructor(issues) {
|
|
2864
|
+
super(issues.map((issue) => `${issue.path || "/"}: ${issue.message}`).join("\n"));
|
|
2865
|
+
this.name = "DocumentValidationError";
|
|
2866
|
+
this.issues = issues;
|
|
2867
|
+
}
|
|
2868
|
+
};
|
|
2869
|
+
/** 统一读取/保存边界校验,失败抛出结构化错误;不修改或自动修复输入。 */
|
|
2870
|
+
function checked(value, options) {
|
|
2871
|
+
const result = validateDocument(value, options);
|
|
2872
|
+
if (!result.valid) throw new DocumentValidationError(result.issues);
|
|
2873
|
+
return result.document;
|
|
2874
|
+
}
|
|
2875
|
+
/** 读取文件字符串并校验原生协议;保留原 ID,语法错误也转换为结构化异常。 */
|
|
2876
|
+
function parseDocument(json, options) {
|
|
2877
|
+
let value;
|
|
2878
|
+
try {
|
|
2879
|
+
value = JSON.parse(json);
|
|
2880
|
+
} catch {
|
|
2881
|
+
throw new DocumentValidationError([{
|
|
2882
|
+
path: "",
|
|
2883
|
+
code: "json_syntax",
|
|
2884
|
+
message: "Invalid JSON document"
|
|
2885
|
+
}]);
|
|
2886
|
+
}
|
|
2887
|
+
return checked(value, options);
|
|
2888
|
+
}
|
|
2889
|
+
/** 读取 API 对象并隔离调用者持有的数据;内存和保存仍使用同一种结构。 */
|
|
2890
|
+
function readDocument(value, options) {
|
|
2891
|
+
return JSON.parse(JSON.stringify(checked(value, options)));
|
|
2892
|
+
}
|
|
2893
|
+
/** 保存前校验同形文档;不转 XML,不夹带索引/历史,也不展开继承默认配置。 */
|
|
2894
|
+
function serializeDocument(document, options) {
|
|
2895
|
+
checked(document, options);
|
|
2896
|
+
return JSON.stringify(document, null, options?.space);
|
|
2897
|
+
}
|
|
2898
|
+
// src/model/editor/factory-validation.ts
|
|
2899
|
+
/**
|
|
2900
|
+
* @file 创建与删除参数校验:拒绝未知选项,统一字段绑定来源、删除策略及局部载荷检查。
|
|
2901
|
+
* 阅读定位:editor/ · 创建、编辑、事务、差量与历史。
|
|
2902
|
+
*/
|
|
2903
|
+
/** 所有高层删除入口使用同一组布尔选项,false 明确保留候选定义,未知键直接拒绝。 */
|
|
2904
|
+
function readRemovalOptions(input) {
|
|
2905
|
+
const value = readFactoryOptions(input, ["removeUnusedBindings", "removeUnusedAssets"]);
|
|
2906
|
+
checkFactoryValue(value, object({
|
|
2907
|
+
removeUnusedBindings: optional(boolean),
|
|
2908
|
+
removeUnusedAssets: optional(boolean)
|
|
2909
|
+
}));
|
|
2910
|
+
return value;
|
|
2911
|
+
}
|
|
2912
|
+
/** 按现有协议规则检查局部值,失败携带完整结构化诊断。 */
|
|
2913
|
+
function checkFactoryValue(value, rule, path = "") {
|
|
2914
|
+
const issues = [];
|
|
2915
|
+
rule(value, path, issues);
|
|
2916
|
+
if (issues.length) throw new DocumentValidationError(issues);
|
|
2917
|
+
}
|
|
2918
|
+
/** 已完成 JSON 隔离的内部参数只核对对象形状和允许的键,不再复制。 */
|
|
2919
|
+
function checkFactoryOptions(value, keys) {
|
|
2920
|
+
if (!isObject(value)) throw new ModelEditError("factory_options", "Expected plain options object");
|
|
2921
|
+
for (const key of Object.keys(value)) if (!includes(keys, key)) throw new ModelEditError("factory_options", `Unknown option: ${key}`);
|
|
2922
|
+
return value;
|
|
2923
|
+
}
|
|
2924
|
+
/** 公开参数先隔离 JSON,再核对原始键,未知键即使值为 undefined 也不静默丢弃。 */
|
|
2925
|
+
function readFactoryOptions(input, keys) {
|
|
2926
|
+
const value = copyInputData(input);
|
|
2927
|
+
checkFactoryOptions(input, keys);
|
|
2928
|
+
return value;
|
|
2929
|
+
}
|
|
2930
|
+
/** 绑定参数只允许一个来源,返回隔离后的明确声明或已有引用。 */
|
|
2931
|
+
function readFieldBinding(input) {
|
|
2932
|
+
return checkFieldBinding(readFactoryOptions(input, ["binding", "bindingId"]));
|
|
2933
|
+
}
|
|
2934
|
+
/** 已隔离的字段声明只检查绑定来源及其业务结构。 */
|
|
2935
|
+
function checkFieldBinding(value) {
|
|
2936
|
+
if (Object.hasOwn(value, "binding") === Object.hasOwn(value, "bindingId")) throw new ModelEditError("binding_input", "Provide binding or bindingId");
|
|
2937
|
+
if ("binding" in value) checkFactoryValue(value.binding, bindingRule, "/binding");
|
|
2938
|
+
else checkFactoryValue(value.bindingId, nonempty, "/bindingId");
|
|
2939
|
+
return value;
|
|
2940
|
+
}
|
|
2941
|
+
// src/model/editor/NodeFactory.ts
|
|
2942
|
+
/**
|
|
2943
|
+
* @file 节点工厂:构造节点及必要的绑定或资产增量;插入文档和记录历史由编辑器负责。
|
|
2944
|
+
* 阅读定位:editor/ · 创建、编辑、事务、差量与历史。
|
|
2945
|
+
*/
|
|
2946
|
+
/** 普通常用字段的明确白名单,不根据业务字段名猜测组件。 */
|
|
2947
|
+
var commonFieldWidgets = [
|
|
2948
|
+
"input",
|
|
2949
|
+
"number",
|
|
2950
|
+
"checkbox",
|
|
2951
|
+
"choice",
|
|
2952
|
+
"date",
|
|
2953
|
+
"time",
|
|
2954
|
+
"date-time",
|
|
2955
|
+
"file",
|
|
2956
|
+
"image",
|
|
2957
|
+
"seal",
|
|
2958
|
+
"signature",
|
|
2959
|
+
"user",
|
|
2960
|
+
"org",
|
|
2961
|
+
"relation",
|
|
2962
|
+
"rdo-relation",
|
|
2963
|
+
"sop-version"
|
|
2964
|
+
];
|
|
2965
|
+
var textKeys = ["textStyleId", "textStyle"];
|
|
2966
|
+
var appearanceKeys = [
|
|
2967
|
+
...textKeys,
|
|
2968
|
+
"preferredSizePx",
|
|
2969
|
+
"policy",
|
|
2970
|
+
"attachments"
|
|
2971
|
+
];
|
|
2972
|
+
/** 只负责构造普通节点数据;一个工厂服务一批创建,不给每个节点再套类。 */
|
|
2973
|
+
var NodeFactory = class {
|
|
2974
|
+
/** 创建过的身份,防止外部工厂重复分配;不持有生成节点。 */
|
|
2975
|
+
issued = /* @__PURE__ */ new Set();
|
|
2976
|
+
/** 唯一的外部分配入口,销毁时释放闭包。 */
|
|
2977
|
+
createId;
|
|
2978
|
+
/** 闭合配置依赖,不保存计算结果。 */
|
|
2979
|
+
registry;
|
|
2980
|
+
/** 依赖外部 ID 工厂;不创建随机身份、默认文档或运行时包装。 */
|
|
2981
|
+
constructor(options) {
|
|
2982
|
+
if (!isFunction(options.createId)) throw new ModelEditError("id_factory", "createId is required");
|
|
2983
|
+
this.createId = options.createId;
|
|
2984
|
+
this.registry = options.registry ?? new ConfigRegistry();
|
|
2985
|
+
}
|
|
2986
|
+
/** 创建完整文字片段,不按字符拆对象;显式样式与调用方数据隔离。 */
|
|
2987
|
+
createText(text, options = {}) {
|
|
2988
|
+
const copied = readFactoryOptions(options, textKeys);
|
|
2989
|
+
return this.checkNode({
|
|
2990
|
+
id: this.allocateId(),
|
|
2991
|
+
kind: "text",
|
|
2992
|
+
text,
|
|
2993
|
+
...copied
|
|
2994
|
+
});
|
|
2995
|
+
}
|
|
2996
|
+
/** 创建空段或已有行内内容的段落,不生成空白占位符或展开默认样式。 */
|
|
2997
|
+
createParagraph(options = {}) {
|
|
2998
|
+
const copied = readFactoryOptions(options, [
|
|
2999
|
+
...textKeys,
|
|
3000
|
+
"paragraphStyleId",
|
|
3001
|
+
"paragraphStyle",
|
|
3002
|
+
"content"
|
|
3003
|
+
]);
|
|
3004
|
+
if (!isUndefined(copied.content) && !isArray(copied.content)) throw new ModelEditError("factory_options", "content must be an array");
|
|
3005
|
+
return this.checkNode({
|
|
3006
|
+
...copied,
|
|
3007
|
+
id: this.allocateId(),
|
|
3008
|
+
kind: "paragraph",
|
|
3009
|
+
content: [...copied.content ?? []]
|
|
3010
|
+
});
|
|
3011
|
+
}
|
|
3012
|
+
/** 创建完整矩形物理网格;空格用空 blocks 表达,不凭空增加段落和文字。 */
|
|
3013
|
+
createTable(options) {
|
|
3014
|
+
const copied = readFactoryOptions(options, [
|
|
3015
|
+
"rowCount",
|
|
3016
|
+
"columnCount",
|
|
3017
|
+
"columnWidthsPx",
|
|
3018
|
+
"rowHeight",
|
|
3019
|
+
"tableStyleId",
|
|
3020
|
+
"style",
|
|
3021
|
+
"cellStyle"
|
|
3022
|
+
]);
|
|
3023
|
+
for (const count of [copied.rowCount, copied.columnCount]) if (!isInteger(count) || count < 1) throw new ModelEditError("table_size", "Table dimensions must be positive integers");
|
|
3024
|
+
if (!isUndefined(copied.columnWidthsPx) && (!isArray(copied.columnWidthsPx) || copied.columnWidthsPx.length !== copied.columnCount)) throw new ModelEditError("table_size", "Column widths must match columnCount");
|
|
3025
|
+
const node = {
|
|
3026
|
+
id: this.allocateId(),
|
|
3027
|
+
kind: "table",
|
|
3028
|
+
columns: [],
|
|
3029
|
+
rows: [],
|
|
3030
|
+
merges: [],
|
|
3031
|
+
regions: [],
|
|
3032
|
+
...isUndefined(copied.tableStyleId) ? {} : { tableStyleId: copied.tableStyleId },
|
|
3033
|
+
...isUndefined(copied.style) ? {} : { style: copied.style }
|
|
3034
|
+
};
|
|
3035
|
+
for (let col = 0; col < copied.columnCount; col++) node.columns.push({
|
|
3036
|
+
id: this.allocateId(),
|
|
3037
|
+
...isUndefined(copied.columnWidthsPx) ? {} : { widthPx: copied.columnWidthsPx[col] }
|
|
3038
|
+
});
|
|
3039
|
+
for (let row = 0; row < copied.rowCount; row++) node.rows.push(this.createEmptyRow(copied.columnCount, isUndefined(copied.rowHeight) ? void 0 : cloneJsonData(copied.rowHeight), copied.cellStyle));
|
|
3040
|
+
return this.checkNode(node);
|
|
3041
|
+
}
|
|
3042
|
+
/** 创建实际新格,不为内部检查分配段落或表格身份。 */
|
|
3043
|
+
createCell(options = {}) {
|
|
3044
|
+
const copied = readFactoryOptions(options, ["blocks", "style"]);
|
|
3045
|
+
if (!isUndefined(copied.blocks) && !isArray(copied.blocks)) throw new ModelEditError("factory_options", "blocks must be an array");
|
|
3046
|
+
return this.checkNode({
|
|
3047
|
+
id: this.allocateId(),
|
|
3048
|
+
kind: "cell",
|
|
3049
|
+
blocks: [...copied.blocks ?? []],
|
|
3050
|
+
...isUndefined(copied.style) ? {} : { style: copied.style }
|
|
3051
|
+
}, cellRule);
|
|
3052
|
+
}
|
|
3053
|
+
/** 创建完整物理行及空格,所有实际实体只分配一次身份。 */
|
|
3054
|
+
createRow(options) {
|
|
3055
|
+
const copied = readFactoryOptions(options, [
|
|
3056
|
+
"columnCount",
|
|
3057
|
+
"height",
|
|
3058
|
+
"cellStyle"
|
|
3059
|
+
]);
|
|
3060
|
+
if (!isInteger(copied.columnCount) || copied.columnCount < 1) throw new ModelEditError("table_size", "columnCount must be a positive integer");
|
|
3061
|
+
return this.checkNode(this.createEmptyRow(copied.columnCount, copied.height, copied.cellStyle), rowRule);
|
|
3062
|
+
}
|
|
3063
|
+
/** 创建列宽的唯一声明,不在各格重复保存宽度。 */
|
|
3064
|
+
createColumn(options = {}) {
|
|
3065
|
+
const copied = readFactoryOptions(options, ["widthPx"]);
|
|
3066
|
+
return this.checkNode({
|
|
3067
|
+
id: this.allocateId(),
|
|
3068
|
+
...copied
|
|
3069
|
+
}, columnRule);
|
|
3070
|
+
}
|
|
3071
|
+
/** 创建合并范围,主从格关系仍在查询时从物理网格派生。 */
|
|
3072
|
+
createMerge(range) {
|
|
3073
|
+
return this.checkNode({
|
|
3074
|
+
id: this.allocateId(),
|
|
3075
|
+
range: copyData(range)
|
|
3076
|
+
}, mergeRule);
|
|
3077
|
+
}
|
|
3078
|
+
/** 创建已注册业务区域声明,不生成单元格上的反向标记。 */
|
|
3079
|
+
createRegion(options) {
|
|
3080
|
+
const copied = readFactoryOptions(options, [
|
|
3081
|
+
"type",
|
|
3082
|
+
"name",
|
|
3083
|
+
"range",
|
|
3084
|
+
"binding",
|
|
3085
|
+
"configVersion",
|
|
3086
|
+
"config",
|
|
3087
|
+
"variant",
|
|
3088
|
+
"parentRegionId",
|
|
3089
|
+
"targetRegionId"
|
|
3090
|
+
]);
|
|
3091
|
+
return this.checkNode({
|
|
3092
|
+
id: this.allocateId(),
|
|
3093
|
+
...copied
|
|
3094
|
+
}, regionRule);
|
|
3095
|
+
}
|
|
3096
|
+
/** 创建常用或注册扩展字段及绑定增量;choice 只补必需 options,扩展必须明确配置版本。 */
|
|
3097
|
+
createField(options) {
|
|
3098
|
+
const copied = readFactoryOptions(options, [
|
|
3099
|
+
"widget",
|
|
3100
|
+
"config",
|
|
3101
|
+
"configVersion",
|
|
3102
|
+
"binding",
|
|
3103
|
+
"bindingId",
|
|
3104
|
+
...appearanceKeys
|
|
3105
|
+
]);
|
|
3106
|
+
if (!isString(copied.widget) || !includes(commonFieldWidgets, copied.widget) && !includes(copied.widget, ":")) throw new ModelEditError("field_widget", "Expected common or registered field widget");
|
|
3107
|
+
if (!isUndefined(copied.config) && (isNull(copied.config) || !isObjectValue(copied.config) || isFunction(copied.config) || isArray(copied.config))) throw new ModelEditError("field_config", "config must be an object");
|
|
3108
|
+
const input = checkFieldBinding(copied);
|
|
3109
|
+
const bindings = Object.create(null);
|
|
3110
|
+
const bindingId = "binding" in input ? this.allocateId() : input.bindingId;
|
|
3111
|
+
if ("binding" in input) bindings[bindingId] = input.binding;
|
|
3112
|
+
const config = copied.widget === "choice" ? {
|
|
3113
|
+
...copied.config,
|
|
3114
|
+
options: copied.config?.options ?? []
|
|
3115
|
+
} : copied.config;
|
|
3116
|
+
const node = {
|
|
3117
|
+
id: this.allocateId(),
|
|
3118
|
+
kind: "field",
|
|
3119
|
+
widget: copied.widget,
|
|
3120
|
+
bindingId,
|
|
3121
|
+
...Object.hasOwn(copied, "configVersion") ? { configVersion: copied.configVersion } : {},
|
|
3122
|
+
...isUndefined(config) ? {} : { config }
|
|
3123
|
+
};
|
|
3124
|
+
for (const key of appearanceKeys) if (Object.hasOwn(copied, key)) Object.defineProperty(node, key, {
|
|
3125
|
+
value: copied[key],
|
|
3126
|
+
enumerable: true,
|
|
3127
|
+
configurable: true,
|
|
3128
|
+
writable: true
|
|
3129
|
+
});
|
|
3130
|
+
return {
|
|
3131
|
+
node: this.checkNode(node),
|
|
3132
|
+
bindings
|
|
3133
|
+
};
|
|
3134
|
+
}
|
|
3135
|
+
/** 创建图片及局部资产增量,明确引用不复制资源,不读取或下载二进制文件。 */
|
|
3136
|
+
createImage(options) {
|
|
3137
|
+
const copied = readFactoryOptions(options, [
|
|
3138
|
+
"asset",
|
|
3139
|
+
"assetId",
|
|
3140
|
+
"alt",
|
|
3141
|
+
"preferredSizePx",
|
|
3142
|
+
"fit"
|
|
3143
|
+
]);
|
|
3144
|
+
if (Object.hasOwn(copied, "asset") === Object.hasOwn(copied, "assetId")) throw new ModelEditError("asset_input", "Provide asset or assetId");
|
|
3145
|
+
const assets = Object.create(null);
|
|
3146
|
+
let assetId;
|
|
3147
|
+
if ("asset" in copied) {
|
|
3148
|
+
checkFactoryValue(copied.asset, imageAssetRule, "/asset");
|
|
3149
|
+
assetId = this.allocateId();
|
|
3150
|
+
assets[assetId] = copied.asset;
|
|
3151
|
+
} else {
|
|
3152
|
+
checkFactoryValue(copied.assetId, nonempty, "/assetId");
|
|
3153
|
+
assetId = copied.assetId;
|
|
3154
|
+
}
|
|
3155
|
+
const node = {
|
|
3156
|
+
id: this.allocateId(),
|
|
3157
|
+
kind: "image",
|
|
3158
|
+
assetId,
|
|
3159
|
+
...isUndefined(copied.alt) ? {} : { alt: copied.alt },
|
|
3160
|
+
...isUndefined(copied.fit) ? {} : { fit: copied.fit },
|
|
3161
|
+
...isUndefined(copied.preferredSizePx) ? {} : { preferredSizePx: copied.preferredSizePx }
|
|
3162
|
+
};
|
|
3163
|
+
return {
|
|
3164
|
+
node: this.checkNode(node),
|
|
3165
|
+
assets
|
|
3166
|
+
};
|
|
3167
|
+
}
|
|
3168
|
+
/** 创建页码或已注册的页面组件,配置和默认能力仍由同一注册表解释。 */
|
|
3169
|
+
createPageWidget(options) {
|
|
3170
|
+
const copied = readFactoryOptions(options, [
|
|
3171
|
+
"widget",
|
|
3172
|
+
"config",
|
|
3173
|
+
"configVersion",
|
|
3174
|
+
...textKeys,
|
|
3175
|
+
"preferredSizePx",
|
|
3176
|
+
"policy"
|
|
3177
|
+
]);
|
|
3178
|
+
return this.checkNode({
|
|
3179
|
+
id: this.allocateId(),
|
|
3180
|
+
kind: "pageWidget",
|
|
3181
|
+
...copied
|
|
3182
|
+
});
|
|
3183
|
+
}
|
|
3184
|
+
/** 创建显式换行或分页,不把自动排版结果保存进模型。 */
|
|
3185
|
+
createBreak(breakType) {
|
|
3186
|
+
return this.checkNode({
|
|
3187
|
+
id: this.allocateId(),
|
|
3188
|
+
kind: "break",
|
|
3189
|
+
breakType
|
|
3190
|
+
});
|
|
3191
|
+
}
|
|
3192
|
+
/** 创建共享页眉/页脚拥有内容,不为各章节重复创建同一部件。 */
|
|
3193
|
+
createPart(kind, options = {}) {
|
|
3194
|
+
const copied = readFactoryOptions(options, ["blocks"]);
|
|
3195
|
+
if (!isUndefined(copied.blocks) && !isArray(copied.blocks)) throw new ModelEditError("factory_options", "blocks must be an array");
|
|
3196
|
+
return this.checkNode({
|
|
3197
|
+
id: this.allocateId(),
|
|
3198
|
+
kind,
|
|
3199
|
+
blocks: [...copied.blocks ?? []]
|
|
3200
|
+
}, partRule);
|
|
3201
|
+
}
|
|
3202
|
+
/** 创建锚定浮层,优先尺寸与层级均只保存调用方明确设置的值。 */
|
|
3203
|
+
createOverlay(options) {
|
|
3204
|
+
const copied = readFactoryOptions(options, [
|
|
3205
|
+
"anchor",
|
|
3206
|
+
"blocks",
|
|
3207
|
+
"preferredSizePx",
|
|
3208
|
+
"zIndex"
|
|
3209
|
+
]);
|
|
3210
|
+
if (!isUndefined(copied.blocks) && !isArray(copied.blocks)) throw new ModelEditError("factory_options", "blocks must be an array");
|
|
3211
|
+
return this.checkNode({
|
|
3212
|
+
...copied,
|
|
3213
|
+
id: this.allocateId(),
|
|
3214
|
+
kind: "overlay",
|
|
3215
|
+
blocks: [...copied.blocks ?? []]
|
|
3216
|
+
}, overlayRule);
|
|
3217
|
+
}
|
|
3218
|
+
/** 创建实际章节及已有拥有内容,不默认生成空段落、部件或分页对象。 */
|
|
3219
|
+
createSection(options) {
|
|
3220
|
+
const copied = readFactoryOptions(options, [
|
|
3221
|
+
"page",
|
|
3222
|
+
"headerSlots",
|
|
3223
|
+
"footerSlots",
|
|
3224
|
+
"blocks",
|
|
3225
|
+
"overlays"
|
|
3226
|
+
]);
|
|
3227
|
+
for (const value of [copied.blocks, copied.overlays]) if (!isUndefined(value) && !isArray(value)) throw new ModelEditError("factory_options", "Owned content must be an array");
|
|
3228
|
+
return this.checkNode({
|
|
3229
|
+
...copied,
|
|
3230
|
+
id: this.allocateId(),
|
|
3231
|
+
kind: "section",
|
|
3232
|
+
blocks: [...copied.blocks ?? []],
|
|
3233
|
+
overlays: [...copied.overlays ?? []]
|
|
3234
|
+
}, sectionRule);
|
|
3235
|
+
}
|
|
3236
|
+
/** 创建一个新选项;局部 ID 在默认项和附属条件中复用,不保存 defaultSelected 副本。 */
|
|
3237
|
+
createChoiceOption(options) {
|
|
3238
|
+
const copied = readFactoryOptions(options, [
|
|
3239
|
+
"label",
|
|
3240
|
+
"value",
|
|
3241
|
+
"display"
|
|
3242
|
+
]);
|
|
3243
|
+
const option = {
|
|
3244
|
+
id: this.allocateId(),
|
|
3245
|
+
...copied
|
|
3246
|
+
};
|
|
3247
|
+
const issues = [];
|
|
3248
|
+
this.registry.validate("field", "choice", 1, { options: [option] }, "/config", issues);
|
|
3249
|
+
if (issues.length) throw new DocumentValidationError(issues);
|
|
3250
|
+
return option;
|
|
3251
|
+
}
|
|
3252
|
+
/** 创建附属内容容器,条件与父字段是否匹配由编辑器提交时检查。 */
|
|
3253
|
+
createAttachment(when, blocks = []) {
|
|
3254
|
+
const node = {
|
|
3255
|
+
id: this.allocateId(),
|
|
3256
|
+
kind: "attachment",
|
|
3257
|
+
when: copyData(when),
|
|
3258
|
+
blocks: copyInputData([...blocks])
|
|
3259
|
+
};
|
|
3260
|
+
return this.checkNode(node);
|
|
3261
|
+
}
|
|
3262
|
+
/** 释放身份集合与外部回调,已有返回节点不受影响。 */
|
|
3263
|
+
dispose() {
|
|
3264
|
+
this.issued.clear();
|
|
3265
|
+
this.createId = void 0;
|
|
3266
|
+
this.registry = void 0;
|
|
3267
|
+
}
|
|
3268
|
+
/** 为一个新实体分配身份;坏工厂直接失败,不循环猜测或重试。 */
|
|
3269
|
+
allocateId() {
|
|
3270
|
+
this.requireRegistry();
|
|
3271
|
+
const id = this.createId();
|
|
3272
|
+
checkFactoryValue(id, nonempty, "/id");
|
|
3273
|
+
if (this.issued.has(id)) throw new ModelEditError("id_factory", "createId returned a duplicate ID");
|
|
3274
|
+
this.issued.add(id);
|
|
3275
|
+
return id;
|
|
3276
|
+
}
|
|
3277
|
+
/** 仅构造已隔离参数的空行;createRow/createTable 在返回前统一校验完整子树。 */
|
|
3278
|
+
createEmptyRow(columnCount, height, cellStyle) {
|
|
3279
|
+
const row = {
|
|
3280
|
+
id: this.allocateId(),
|
|
3281
|
+
kind: "row",
|
|
3282
|
+
cells: [],
|
|
3283
|
+
...isUndefined(height) ? {} : { height }
|
|
3284
|
+
};
|
|
3285
|
+
for (let column = 0; column < columnCount; column++) row.cells.push({
|
|
3286
|
+
id: this.allocateId(),
|
|
3287
|
+
kind: "cell",
|
|
3288
|
+
blocks: [],
|
|
3289
|
+
...isUndefined(cellStyle) ? {} : { style: cloneJsonData(cellStyle) }
|
|
3290
|
+
});
|
|
3291
|
+
return row;
|
|
3292
|
+
}
|
|
3293
|
+
/** 工厂销毁后明确拒绝所有创建。 */
|
|
3294
|
+
requireRegistry() {
|
|
3295
|
+
if (!this.registry || !this.createId) throw new ModelEditError("disposed", "NodeFactory is disposed");
|
|
3296
|
+
return this.registry;
|
|
3297
|
+
}
|
|
3298
|
+
/** 检查局部形状、拥有身份与业务配置;外部样式、资产和绑定引用在插入时整体校验。 */
|
|
3299
|
+
checkNode(node, rule) {
|
|
3300
|
+
const registry = this.requireRegistry();
|
|
3301
|
+
const kind = "kind" in node ? node.kind : void 0;
|
|
3302
|
+
checkFactoryValue(node, rule ?? (kind === "attachment" ? attachmentRule : kind === "paragraph" || kind === "table" ? blockRule : inlineRule));
|
|
3303
|
+
const issues = [], ids = /* @__PURE__ */ new Set();
|
|
3304
|
+
/** 遍历新建子树的拥有关系,不展开共享定义。 */
|
|
3305
|
+
const visit = (value, path = "") => {
|
|
3306
|
+
const item = value;
|
|
3307
|
+
if (ids.has(item.id)) issues.push({
|
|
3308
|
+
path: `${path}/id`,
|
|
3309
|
+
code: "duplicate_id",
|
|
3310
|
+
message: `Duplicate ID: ${item.id}`
|
|
3311
|
+
});
|
|
3312
|
+
ids.add(item.id);
|
|
3313
|
+
if (item.kind === "field" || item.kind === "pageWidget") {
|
|
3314
|
+
const before = issues.length;
|
|
3315
|
+
const field = value;
|
|
3316
|
+
registry.validate(field.kind, field.widget, field.configVersion ?? 1, field.config ?? {}, `${path}/config`, issues);
|
|
3317
|
+
if (includes(field.widget, ":") && isUndefined(field.configVersion)) issues.push({
|
|
3318
|
+
path: `${path}/configVersion`,
|
|
3319
|
+
code: "required",
|
|
3320
|
+
message: "Extension needs explicit configVersion"
|
|
3321
|
+
});
|
|
3322
|
+
if (item.kind === "field") validateFieldConditions(value, path, issues, issues.length === before);
|
|
3323
|
+
}
|
|
3324
|
+
if ("type" in item && "range" in item) {
|
|
3325
|
+
const region = value;
|
|
3326
|
+
registry.validate("region", region.type, region.configVersion ?? 1, region.config ?? {}, `${path}/config`, issues);
|
|
3327
|
+
if (region.variant) registry.validate("variant", region.variant.name, region.variant.version, region.variant.config, `${path}/variant/config`, issues, region.type);
|
|
3328
|
+
}
|
|
3329
|
+
for (const key of [
|
|
3330
|
+
"content",
|
|
3331
|
+
"rows",
|
|
3332
|
+
"cells",
|
|
3333
|
+
"columns",
|
|
3334
|
+
"merges",
|
|
3335
|
+
"regions",
|
|
3336
|
+
"blocks",
|
|
3337
|
+
"attachments",
|
|
3338
|
+
"overlays"
|
|
3339
|
+
]) item[key]?.forEach((child, i) => visit(child, `${path}/${key}/${i}`));
|
|
3340
|
+
};
|
|
3341
|
+
visit(node);
|
|
3342
|
+
if (issues.length) throw new DocumentValidationError(issues);
|
|
3343
|
+
return node;
|
|
3344
|
+
}
|
|
3345
|
+
};
|
|
3346
|
+
export { string as $, writeProperty as A, isObject as B, ModelEditError as C, equalData as D, copyInputData as E, boolean as F, oneOf as G, nullable as H, cellRangeRule as I, paragraphStyleProperties as J, optional as K, cellStyleRule as L, array as M, at as N, freezeData as O, attachmentConditionRule as P, rowHeightRule as Q, extensionName as R, repeatingTableVariants as S, copyData as T, number as U, nonempty as V, object as W, positive as X, paragraphStyleRule as Y, record as Z, documentBusinessSchemas as _, readFactoryOptions as a, tableVariantSchemas as b, DocumentValidationError as c, serializeDocument as d, tagged as et, validateDocument as f, ConfigRegistry as g, validateFragment as h, checkFactoryValue as i, validateEditData as j, readPropertyValue as k, parseDocument as l, validateFieldConfigEdit as m, commonFieldWidgets as n, textStyleRule as nt, readFieldBinding as o, validateDocumentEdit as p, optionalConfig as q, checkFactoryOptions as r, readRemovalOptions as s, NodeFactory as t, textStyleProperties as tt, readDocument as u, communicationBusinessSchema as v, cloneJsonData as w, repeatingTableSettings as x, fieldSchemas as y, imageAssetRule as z };
|
|
3347
|
+
|
|
3348
|
+
//# sourceMappingURL=NodeFactory-D9gVGSok.js.map
|