@argusvane/datum-form-test 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/NOTICE +26 -0
- package/README.md +52 -2
- package/bin/datum-form-test.mjs +11 -0
- package/dist/bundle-size.txt +3 -0
- package/dist/cli.mjs +3 -0
- package/dist/datum-form-test.LICENSE.txt +510 -0
- package/dist/index.mjs +68728 -0
- package/dist/types/engine/form-engine/agent/builder/agent-texts-en.d.ts +53 -0
- package/dist/types/engine/form-engine/builder/controller/builder-controller.d.ts +2534 -0
- package/dist/types/engine/form-engine/builder/controller/dependents.d.ts +122 -0
- package/dist/types/engine/form-engine/builder/controller/language-edits.d.ts +48 -0
- package/dist/types/engine/form-engine/builder/controller/simulated-options.d.ts +20 -0
- package/dist/types/engine/form-engine/builder/controller/translation-rules.d.ts +71 -0
- package/dist/types/engine/form-engine/builder/controller/try-submission.d.ts +45 -0
- package/dist/types/engine/form-engine/builder/data/data-loader.d.ts +6 -0
- package/dist/types/engine/form-engine/builder/data/data-model-import.d.ts +119 -0
- package/dist/types/engine/form-engine/builder/data/data-model-plan.d.ts +52 -0
- package/dist/types/engine/form-engine/builder/data/data-surface.d.ts +139 -0
- package/dist/types/engine/form-engine/builder/data/data-texts-en.d.ts +205 -0
- package/dist/types/engine/form-engine/builder/data/schema-rows.d.ts +56 -0
- package/dist/types/engine/form-engine/builder/data-model/compare.d.ts +37 -0
- package/dist/types/engine/form-engine/builder/data-model/data-model.d.ts +113 -0
- package/dist/types/engine/form-engine/builder/data-model/example.d.ts +6 -0
- package/dist/types/engine/form-engine/builder/data-model/from-form.d.ts +43 -0
- package/dist/types/engine/form-engine/builder/data-model/from-json-schema.d.ts +22 -0
- package/dist/types/engine/form-engine/builder/data-model/from-sample.d.ts +13 -0
- package/dist/types/engine/form-engine/builder/data-model/generate.d.ts +101 -0
- package/dist/types/engine/form-engine/builder/data-model/index.d.ts +10 -0
- package/dist/types/engine/form-engine/builder/data-model/mapping.d.ts +26 -0
- package/dist/types/engine/form-engine/builder/data-model/read-input.d.ts +39 -0
- package/dist/types/engine/form-engine/builder/data-model/to-json-schema.d.ts +10 -0
- package/dist/types/engine/form-engine/builder/definition-budget.d.ts +27 -0
- package/dist/types/engine/form-engine/builder/drag-drop/html5-drag-drop.d.ts +57 -0
- package/dist/types/engine/form-engine/builder/drag-drop/move-legality.d.ts +23 -0
- package/dist/types/engine/form-engine/builder/drag-drop/move-texts-en.d.ts +22 -0
- package/dist/types/engine/form-engine/builder/drag-drop/move-ui.d.ts +72 -0
- package/dist/types/engine/form-engine/builder/form-tests/tests-accept.d.ts +18 -0
- package/dist/types/engine/form-engine/builder/form-tests/tests-add-step.d.ts +51 -0
- package/dist/types/engine/form-engine/builder/form-tests/tests-completions.d.ts +66 -0
- package/dist/types/engine/form-engine/builder/form-tests/tests-coverage.d.ts +32 -0
- package/dist/types/engine/form-engine/builder/form-tests/tests-editor-loader.d.ts +10 -0
- package/dist/types/engine/form-engine/builder/form-tests/tests-editor-texts-en.d.ts +72 -0
- package/dist/types/engine/form-engine/builder/form-tests/tests-editor.d.ts +50 -0
- package/dist/types/engine/form-engine/builder/form-tests/tests-model.d.ts +422 -0
- package/dist/types/engine/form-engine/builder/form-tests/tests-panel-styles.d.ts +8 -0
- package/dist/types/engine/form-engine/builder/form-tests/tests-panel-texts-en.d.ts +174 -0
- package/dist/types/engine/form-engine/builder/form-tests/tests-record.d.ts +55 -0
- package/dist/types/engine/form-engine/builder/form-tests/tests-rename.d.ts +93 -0
- package/dist/types/engine/form-engine/builder/form-tests/tests-rules.d.ts +42 -0
- package/dist/types/engine/form-engine/builder/form-tests/tests-runner.d.ts +2 -0
- package/dist/types/engine/form-engine/builder/form-tests/tests-scaffold.d.ts +13 -0
- package/dist/types/engine/form-engine/builder/form-tests/tests-textarea.d.ts +88 -0
- package/dist/types/engine/form-engine/builder/form-tests/tests-texts-en.d.ts +222 -0
- package/dist/types/engine/form-engine/builder/form-tests/tests-words.d.ts +12 -0
- package/dist/types/engine/form-engine/builder/formula/feel-functions.d.ts +98 -0
- package/dist/types/engine/form-engine/builder/formula/feel-print.d.ts +47 -0
- package/dist/types/engine/form-engine/builder/formula/formula-editor-loader.d.ts +16 -0
- package/dist/types/engine/form-engine/builder/formula/formula-editor-styles.d.ts +19 -0
- package/dist/types/engine/form-engine/builder/formula/formula-editor.d.ts +104 -0
- package/dist/types/engine/form-engine/builder/formula/formula-fields.d.ts +44 -0
- package/dist/types/engine/form-engine/builder/formula/formula-textarea.d.ts +75 -0
- package/dist/types/engine/form-engine/builder/formula/formula-texts-en.d.ts +18 -0
- package/dist/types/engine/form-engine/builder/formula/rename.d.ts +98 -0
- package/dist/types/engine/form-engine/builder/history/command-history.d.ts +31 -0
- package/dist/types/engine/form-engine/builder/history/form-steps-on-page.d.ts +104 -0
- package/dist/types/engine/form-engine/builder/history/rename-step.d.ts +68 -0
- package/dist/types/engine/form-engine/builder/index.d.ts +48 -0
- package/dist/types/engine/form-engine/builder/journey-designer/journey-authoring-texts-en.d.ts +20 -0
- package/dist/types/engine/form-engine/builder/journey-designer/journey-authoring.d.ts +119 -0
- package/dist/types/engine/form-engine/builder/journey-designer/journey-builder-mode.d.ts +385 -0
- package/dist/types/engine/form-engine/builder/journey-designer/journey-catalog.d.ts +212 -0
- package/dist/types/engine/form-engine/builder/journey-designer/journey-checks.d.ts +175 -0
- package/dist/types/engine/form-engine/builder/journey-designer/journey-components.d.ts +183 -0
- package/dist/types/engine/form-engine/builder/journey-designer/journey-config-rename.d.ts +43 -0
- package/dist/types/engine/form-engine/builder/journey-designer/journey-designer-panels.d.ts +67 -0
- package/dist/types/engine/form-engine/builder/journey-designer/journey-designer.d.ts +296 -0
- package/dist/types/engine/form-engine/builder/journey-designer/journey-finding-words.d.ts +30 -0
- package/dist/types/engine/form-engine/builder/journey-designer/journey-findings.d.ts +74 -0
- package/dist/types/engine/form-engine/builder/journey-designer/journey-from-form.d.ts +89 -0
- package/dist/types/engine/form-engine/builder/journey-designer/journey-mode-loader.d.ts +19 -0
- package/dist/types/engine/form-engine/builder/journey-designer/journey-mode-model.d.ts +100 -0
- package/dist/types/engine/form-engine/builder/journey-designer/journey-preview-texts-en.d.ts +28 -0
- package/dist/types/engine/form-engine/builder/journey-designer/journey-preview.d.ts +163 -0
- package/dist/types/engine/form-engine/builder/journey-designer/journey-references.d.ts +104 -0
- package/dist/types/engine/form-engine/builder/journey-designer/journey-texts-en.d.ts +151 -0
- package/dist/types/engine/form-engine/builder/journey-designer/journey-texts.d.ts +51 -0
- package/dist/types/engine/form-engine/builder/journey-designer/journey-tree.d.ts +139 -0
- package/dist/types/engine/form-engine/builder/journey-designer/journey-try-map.d.ts +49 -0
- package/dist/types/engine/form-engine/builder/journey-designer/step-canvas-adapter.d.ts +253 -0
- package/dist/types/engine/form-engine/builder/journey-designer/step-history.d.ts +71 -0
- package/dist/types/engine/form-engine/builder/journey-designer/step-review.d.ts +79 -0
- package/dist/types/engine/form-engine/builder/journey-designer/step-view.d.ts +75 -0
- package/dist/types/engine/form-engine/builder/journey-map/journey-map-layout.d.ts +135 -0
- package/dist/types/engine/form-engine/builder/journey-map/journey-map-model.d.ts +346 -0
- package/dist/types/engine/form-engine/builder/journey-map/journey-map-preferences.d.ts +30 -0
- package/dist/types/engine/form-engine/builder/journey-map/journey-map-styles.d.ts +32 -0
- package/dist/types/engine/form-engine/builder/journey-map/journey-map-svg.d.ts +17 -0
- package/dist/types/engine/form-engine/builder/journey-map/journey-map-texts-en.d.ts +138 -0
- package/dist/types/engine/form-engine/builder/journey-map/journey-map.d.ts +138 -0
- package/dist/types/engine/form-engine/builder/languages/engine-texts.d.ts +19 -0
- package/dist/types/engine/form-engine/builder/languages/exchange.d.ts +199 -0
- package/dist/types/engine/form-engine/builder/languages/languages-cells.d.ts +106 -0
- package/dist/types/engine/form-engine/builder/languages/languages-exchange-dialog.d.ts +58 -0
- package/dist/types/engine/form-engine/builder/languages/languages-exchange-texts-en.d.ts +101 -0
- package/dist/types/engine/form-engine/builder/languages/languages-loader.d.ts +7 -0
- package/dist/types/engine/form-engine/builder/languages/languages-model.d.ts +180 -0
- package/dist/types/engine/form-engine/builder/languages/languages-surface.d.ts +418 -0
- package/dist/types/engine/form-engine/builder/languages/languages-texts-en.d.ts +174 -0
- package/dist/types/engine/form-engine/builder/logic/builder-texts.d.ts +1127 -0
- package/dist/types/engine/form-engine/builder/logic/coverage.d.ts +86 -0
- package/dist/types/engine/form-engine/builder/logic/index.d.ts +5 -0
- package/dist/types/engine/form-engine/builder/logic/logic-journey-host.d.ts +92 -0
- package/dist/types/engine/form-engine/builder/logic/logic-loader.d.ts +7 -0
- package/dist/types/engine/form-engine/builder/logic/logic-model.d.ts +158 -0
- package/dist/types/engine/form-engine/builder/logic/logic-surface.d.ts +359 -0
- package/dist/types/engine/form-engine/builder/logic/logic-texts-en.d.ts +216 -0
- package/dist/types/engine/form-engine/builder/logic/logic-types.d.ts +183 -0
- package/dist/types/engine/form-engine/builder/overview/overview-loader.d.ts +7 -0
- package/dist/types/engine/form-engine/builder/overview/overview-surface.d.ts +84 -0
- package/dist/types/engine/form-engine/builder/overview/overview-texts-en.d.ts +27 -0
- package/dist/types/engine/form-engine/builder/palette/command-palette.d.ts +46 -0
- package/dist/types/engine/form-engine/builder/palette/palette-filter.d.ts +37 -0
- package/dist/types/engine/form-engine/builder/palette/palette-loader.d.ts +6 -0
- package/dist/types/engine/form-engine/builder/palette/palette-texts-en.d.ts +18 -0
- package/dist/types/engine/form-engine/builder/pdf-designer/layout-bindings.d.ts +13 -0
- package/dist/types/engine/form-engine/builder/pdf-designer/layout-catalog.d.ts +108 -0
- package/dist/types/engine/form-engine/builder/pdf-designer/layout-conditions.d.ts +172 -0
- package/dist/types/engine/form-engine/builder/pdf-designer/pdf-builder-mode.d.ts +406 -0
- package/dist/types/engine/form-engine/builder/pdf-designer/pdf-canvas-adapters.d.ts +55 -0
- package/dist/types/engine/form-engine/builder/pdf-designer/pdf-designer-chunk.d.ts +13 -0
- package/dist/types/engine/form-engine/builder/pdf-designer/pdf-designer-loader.d.ts +10 -0
- package/dist/types/engine/form-engine/builder/pdf-designer/pdf-designer-panels.d.ts +89 -0
- package/dist/types/engine/form-engine/builder/pdf-designer/pdf-designer.d.ts +95 -0
- package/dist/types/engine/form-engine/builder/pdf-designer/pdf-layout-texts.d.ts +86 -0
- package/dist/types/engine/form-engine/builder/pdf-designer/pdf-mode-loader.d.ts +17 -0
- package/dist/types/engine/form-engine/builder/pdf-designer/pdf-mode-model.d.ts +88 -0
- package/dist/types/engine/form-engine/builder/pdf-designer/pdf-panel-styles.d.ts +1 -0
- package/dist/types/engine/form-engine/builder/pdf-designer/pdf-template-designer.d.ts +139 -0
- package/dist/types/engine/form-engine/builder/pdf-designer/pdf-template-source.d.ts +22 -0
- package/dist/types/engine/form-engine/builder/pdf-designer/pdf-texts-en.d.ts +405 -0
- package/dist/types/engine/form-engine/builder/pdf-designer/template-mode.d.ts +186 -0
- package/dist/types/engine/form-engine/builder/pdf-designer/template-pages.d.ts +57 -0
- package/dist/types/engine/form-engine/builder/popover-place.d.ts +14 -0
- package/dist/types/engine/form-engine/builder/preview/builder-preview-runtime.d.ts +284 -0
- package/dist/types/engine/form-engine/builder/print/print-breaks.d.ts +46 -0
- package/dist/types/engine/form-engine/builder/print/print-loader.d.ts +6 -0
- package/dist/types/engine/form-engine/builder/print/print-preview.d.ts +121 -0
- package/dist/types/engine/form-engine/builder/print/print-samples.d.ts +43 -0
- package/dist/types/engine/form-engine/builder/print/print-settings-model.d.ts +138 -0
- package/dist/types/engine/form-engine/builder/print/print-styles.d.ts +1 -0
- package/dist/types/engine/form-engine/builder/print/print-surface.d.ts +284 -0
- package/dist/types/engine/form-engine/builder/print/print-texts-en.d.ts +104 -0
- package/dist/types/engine/form-engine/builder/property-editor/component-editor-context.d.ts +8 -0
- package/dist/types/engine/form-engine/builder/property-editor/component-json.d.ts +83 -0
- package/dist/types/engine/form-engine/builder/property-editor/condition-words.d.ts +26 -0
- package/dist/types/engine/form-engine/builder/property-editor/css-classes.d.ts +84 -0
- package/dist/types/engine/form-engine/builder/property-editor/editor-composer.d.ts +9 -0
- package/dist/types/engine/form-engine/builder/property-editor/inspector-model.d.ts +376 -0
- package/dist/types/engine/form-engine/builder/property-editor/rule-source.d.ts +8 -0
- package/dist/types/engine/form-engine/builder/property-editor/rules-model.d.ts +179 -0
- package/dist/types/engine/form-engine/builder/tree-editor/nested-tree-view.d.ts +43 -0
- package/dist/types/engine/form-engine/builder/tree-editor/slot-constraints.d.ts +17 -0
- package/dist/types/engine/form-engine/builder/tree-editor/tree-editor.d.ts +185 -0
- package/dist/types/engine/form-engine/builder/web-component/assistants-settings.d.ts +43 -0
- package/dist/types/engine/form-engine/builder/web-component/builder-chrome-panel.d.ts +179 -0
- package/dist/types/engine/form-engine/builder/web-component/builder-features.d.ts +97 -0
- package/dist/types/engine/form-engine/builder/web-component/builder-form-fields-panel.d.ts +42 -0
- package/dist/types/engine/form-engine/builder/web-component/builder-modes.d.ts +704 -0
- package/dist/types/engine/form-engine/builder/web-component/builder-outline.d.ts +24 -0
- package/dist/types/engine/form-engine/builder/web-component/builder-panels.d.ts +1872 -0
- package/dist/types/engine/form-engine/builder/web-component/builder-shared.d.ts +917 -0
- package/dist/types/engine/form-engine/builder/web-component/builder-tests-panel.d.ts +454 -0
- package/dist/types/engine/form-engine/builder/web-component/builder-theme-registry.d.ts +36 -0
- package/dist/types/engine/form-engine/builder/web-component/builder-variables-panel.d.ts +158 -0
- package/dist/types/engine/form-engine/builder/web-component/canvas-hooks.d.ts +53 -0
- package/dist/types/engine/form-engine/builder/web-component/chrome-panel-loader.d.ts +17 -0
- package/dist/types/engine/form-engine/builder/web-component/default-builder-element.d.ts +2012 -0
- package/dist/types/engine/form-engine/builder/web-component/definition-size.d.ts +12 -0
- package/dist/types/engine/form-engine/builder/web-component/dialog-frame.d.ts +36 -0
- package/dist/types/engine/form-engine/builder/web-component/formula-settings.d.ts +31 -0
- package/dist/types/engine/form-engine/builder/web-component/host-control-styles.d.ts +38 -0
- package/dist/types/engine/form-engine/builder/web-component/json-viewer-loader.d.ts +18 -0
- package/dist/types/engine/form-engine/builder/web-component/json-viewer.d.ts +38 -0
- package/dist/types/engine/form-engine/builder/web-component/modal-place.d.ts +55 -0
- package/dist/types/engine/form-engine/builder/web-component/palette-glyphs.d.ts +14 -0
- package/dist/types/engine/form-engine/builder/web-component/panel-memory.d.ts +68 -0
- package/dist/types/engine/form-engine/builder/web-component/phone-menu.d.ts +67 -0
- package/dist/types/engine/form-engine/builder/web-component/phone-styles.d.ts +30 -0
- package/dist/types/engine/form-engine/builder/web-component/remote-images.d.ts +25 -0
- package/dist/types/engine/form-engine/builder/web-component/sheet-gestures.d.ts +59 -0
- package/dist/types/engine/form-engine/builder/web-component/starter-submit.d.ts +14 -0
- package/dist/types/engine/form-engine/builder/web-component/studio-dark-theme.d.ts +22 -0
- package/dist/types/engine/form-engine/builder/web-component/studio-tokens.d.ts +46 -0
- package/dist/types/engine/form-engine/builder/web-component/surface-sheet.d.ts +31 -0
- package/dist/types/engine/form-engine/builder/web-component/tests-panel-loader.d.ts +17 -0
- package/dist/types/engine/form-engine/builder/web-component/toolbar-roving.d.ts +21 -0
- package/dist/types/engine/form-engine/builder/web-component/try-it-types.d.ts +262 -0
- package/dist/types/engine/form-engine/builder/web-component/try-it.d.ts +85 -0
- package/dist/types/engine/form-engine/builder/web-component/try-texts-en.d.ts +64 -0
- package/dist/types/engine/form-engine/builder/web-component/variables-panel-loader.d.ts +17 -0
- package/dist/types/engine/form-engine/core/accessibility/accessibility-semantics.d.ts +51 -0
- package/dist/types/engine/form-engine/core/accessibility/keyboard-navigation.d.ts +8 -0
- package/dist/types/engine/form-engine/core/crypto/sha256.d.ts +18 -0
- package/dist/types/engine/form-engine/core/errors/error-navigation.d.ts +14 -0
- package/dist/types/engine/form-engine/core/errors/form-error.d.ts +32 -0
- package/dist/types/engine/form-engine/core/events/event-bus.d.ts +18 -0
- package/dist/types/engine/form-engine/core/events/event-types.d.ts +236 -0
- package/dist/types/engine/form-engine/core/events/hooks.d.ts +107 -0
- package/dist/types/engine/form-engine/core/expressions/compile.d.ts +565 -0
- package/dist/types/engine/form-engine/core/expressions/condition-shape.d.ts +11 -0
- package/dist/types/engine/form-engine/core/expressions/definition-structure.d.ts +329 -0
- package/dist/types/engine/form-engine/core/expressions/expression.d.ts +102 -0
- package/dist/types/engine/form-engine/core/expressions/formula-types.d.ts +114 -0
- package/dist/types/engine/form-engine/core/expressions/formula.d.ts +150 -0
- package/dist/types/engine/form-engine/core/expressions/function-docs.d.ts +13 -0
- package/dist/types/engine/form-engine/core/expressions/function-table.d.ts +396 -0
- package/dist/types/engine/form-engine/core/expressions/inspect.d.ts +292 -0
- package/dist/types/engine/form-engine/core/form-tests/form-test-lint.d.ts +28 -0
- package/dist/types/engine/form-engine/core/form-tests/form-test-parse.d.ts +200 -0
- package/dist/types/engine/form-engine/core/form-tests/form-test-read.d.ts +11 -0
- package/dist/types/engine/form-engine/core/form-tests/form-test-run.d.ts +58 -0
- package/dist/types/engine/form-engine/core/form-tests/form-test-types.d.ts +413 -0
- package/dist/types/engine/form-engine/core/form-tests/index.d.ts +7 -0
- package/dist/types/engine/form-engine/core/index.d.ts +75 -0
- package/dist/types/engine/form-engine/core/journey/journey-diagnostics.d.ts +249 -0
- package/dist/types/engine/form-engine/core/journey/journey-flow.d.ts +77 -0
- package/dist/types/engine/form-engine/core/journey/journey-path.d.ts +213 -0
- package/dist/types/engine/form-engine/core/journey/journey-server-check.d.ts +66 -0
- package/dist/types/engine/form-engine/core/journey/journey-shared.d.ts +39 -0
- package/dist/types/engine/form-engine/core/journey/journey-types.d.ts +246 -0
- package/dist/types/engine/form-engine/core/journey/presentation.d.ts +163 -0
- package/dist/types/engine/form-engine/core/journey/worked-out-text.d.ts +10 -0
- package/dist/types/engine/form-engine/core/localization/form-texts.d.ts +283 -0
- package/dist/types/engine/form-engine/core/localization/locale-documents.d.ts +74 -0
- package/dist/types/engine/form-engine/core/localization/localized-text.d.ts +21 -0
- package/dist/types/engine/form-engine/core/localization/supported-locales.d.ts +49 -0
- package/dist/types/engine/form-engine/core/localization/translations.d.ts +312 -0
- package/dist/types/engine/form-engine/core/localization/validation-messages.d.ts +120 -0
- package/dist/types/engine/form-engine/core/schema/agent-tools-setting.d.ts +5 -0
- package/dist/types/engine/form-engine/core/schema/answer-kinds.d.ts +92 -0
- package/dist/types/engine/form-engine/core/schema/button-group.d.ts +24 -0
- package/dist/types/engine/form-engine/core/schema/button.d.ts +75 -0
- package/dist/types/engine/form-engine/core/schema/collection.d.ts +29 -0
- package/dist/types/engine/form-engine/core/schema/component-classes.d.ts +26 -0
- package/dist/types/engine/form-engine/core/schema/component-kinds.d.ts +76 -0
- package/dist/types/engine/form-engine/core/schema/contracts.d.ts +614 -0
- package/dist/types/engine/form-engine/core/schema/control-hints.d.ts +45 -0
- package/dist/types/engine/form-engine/core/schema/data-grid.d.ts +138 -0
- package/dist/types/engine/form-engine/core/schema/data-source-capability.d.ts +20 -0
- package/dist/types/engine/form-engine/core/schema/file-upload.d.ts +114 -0
- package/dist/types/engine/form-engine/core/schema/form-chrome.d.ts +301 -0
- package/dist/types/engine/form-engine/core/schema/grid.d.ts +88 -0
- package/dist/types/engine/form-engine/core/schema/image.d.ts +19 -0
- package/dist/types/engine/form-engine/core/schema/inline-options.d.ts +69 -0
- package/dist/types/engine/form-engine/core/schema/journey.d.ts +336 -0
- package/dist/types/engine/form-engine/core/schema/legend-mark.d.ts +10 -0
- package/dist/types/engine/form-engine/core/schema/length-limits.d.ts +33 -0
- package/dist/types/engine/form-engine/core/schema/pattern-validity.d.ts +2 -0
- package/dist/types/engine/form-engine/core/schema/pdf-layout-read.d.ts +508 -0
- package/dist/types/engine/form-engine/core/schema/pdf-layout-table.d.ts +25 -0
- package/dist/types/engine/form-engine/core/schema/pdf-layout.d.ts +224 -0
- package/dist/types/engine/form-engine/core/schema/pdf-renditions.d.ts +46 -0
- package/dist/types/engine/form-engine/core/schema/pdf-signature-configuration.d.ts +6 -0
- package/dist/types/engine/form-engine/core/schema/print.d.ts +76 -0
- package/dist/types/engine/form-engine/core/schema/signature.d.ts +13 -0
- package/dist/types/engine/form-engine/core/schema/static-html.d.ts +44 -0
- package/dist/types/engine/form-engine/core/schema/steps.d.ts +28 -0
- package/dist/types/engine/form-engine/core/schema/types.d.ts +186 -0
- package/dist/types/engine/form-engine/core/schema/validate-on-setting.d.ts +16 -0
- package/dist/types/engine/form-engine/core/state/answer-shape.d.ts +28 -0
- package/dist/types/engine/form-engine/core/state/effective-state.d.ts +42 -0
- package/dist/types/engine/form-engine/core/state/form-state.d.ts +160 -0
- package/dist/types/engine/form-engine/core/state/hidden-value-policy.d.ts +34 -0
- package/dist/types/engine/form-engine/core/state/host-context.d.ts +24 -0
- package/dist/types/engine/form-engine/core/state/semantic-state.d.ts +19 -0
- package/dist/types/engine/form-engine/core/state/submittable-fold.d.ts +460 -0
- package/dist/types/engine/form-engine/core/submission/canonical-submission.d.ts +62 -0
- package/dist/types/engine/form-engine/core/submission/envelope-completeness.d.ts +20 -0
- package/dist/types/engine/form-engine/core/submission/form-notice.d.ts +43 -0
- package/dist/types/engine/form-engine/core/submission/jcs.d.ts +20 -0
- package/dist/types/engine/form-engine/core/submission/signing.d.ts +110 -0
- package/dist/types/engine/form-engine/core/submission/submission-file.d.ts +34 -0
- package/dist/types/engine/form-engine/core/submission/submission-handler.d.ts +25 -0
- package/dist/types/engine/form-engine/core/submission/submission-modes.d.ts +11 -0
- package/dist/types/engine/form-engine/core/submission/webauthn-assertion.d.ts +41 -0
- package/dist/types/engine/form-engine/core/text/placeholders.d.ts +20 -0
- package/dist/types/engine/form-engine/core/text/spreadsheet-cell.d.ts +14 -0
- package/dist/types/engine/form-engine/core/tree/component-id.d.ts +14 -0
- package/dist/types/engine/form-engine/core/tree/component-path.d.ts +6 -0
- package/dist/types/engine/form-engine/core/tree/component-tree.d.ts +60 -0
- package/dist/types/engine/form-engine/core/tree/data-scope.d.ts +151 -0
- package/dist/types/engine/form-engine/core/tree/nesting.d.ts +10 -0
- package/dist/types/engine/form-engine/core/tree/prototype-names.d.ts +6 -0
- package/dist/types/engine/form-engine/data/client/client-data-source-runtime.d.ts +7 -0
- package/dist/types/engine/form-engine/data/client/registered-client-data-source-runtime.d.ts +6 -0
- package/dist/types/engine/form-engine/data/host/data-source-set.d.ts +46 -0
- package/dist/types/engine/form-engine/data/index.d.ts +9 -0
- package/dist/types/engine/form-engine/data/providers/data-source-provider-registry.d.ts +11 -0
- package/dist/types/engine/form-engine/data/providers/registered-data-source-runtime.d.ts +10 -0
- package/dist/types/engine/form-engine/data/providers/remote-data-source-provider.d.ts +30 -0
- package/dist/types/engine/form-engine/data/providers/static-data-source-provider.d.ts +20 -0
- package/dist/types/engine/form-engine/data/server/registered-server-data-source-runtime.d.ts +6 -0
- package/dist/types/engine/form-engine/data/server/server-data-source-runtime.d.ts +7 -0
- package/dist/types/engine/form-engine/index.d.ts +29 -0
- package/dist/types/engine/form-engine/persistence/core/draft-compatibility.d.ts +22 -0
- package/dist/types/engine/form-engine/persistence/core/draft-store.d.ts +96 -0
- package/dist/types/engine/form-engine/persistence/file-draft/draft-file.d.ts +3 -0
- package/dist/types/engine/form-engine/persistence/index.d.ts +7 -0
- package/dist/types/engine/form-engine/persistence/indexeddb/indexeddb-draft-store.d.ts +15 -0
- package/dist/types/engine/form-engine/persistence/local-storage/browser-local-draft-store.d.ts +22 -0
- package/dist/types/engine/form-engine/persistence/local-storage/in-memory-draft-store.d.ts +8 -0
- package/dist/types/engine/form-engine/persistence/server/server-draft-store.d.ts +15 -0
- package/dist/types/engine/form-engine/plugins/component-adapters.d.ts +66 -0
- package/dist/types/engine/form-engine/plugins/index.d.ts +4 -0
- package/dist/types/engine/form-engine/plugins/lifecycle/plugin-lifecycle.d.ts +11 -0
- package/dist/types/engine/form-engine/plugins/manifest/load-plugin-manifest.d.ts +23 -0
- package/dist/types/engine/form-engine/plugins/platform/plugin-platform.d.ts +81 -0
- package/dist/types/engine/form-engine/registry/capabilities/drawing-capabilities.d.ts +52 -0
- package/dist/types/engine/form-engine/registry/capabilities/field-capabilities.d.ts +205 -0
- package/dist/types/engine/form-engine/registry/components/component-registry.d.ts +9 -0
- package/dist/types/engine/form-engine/registry/data-sources/data-source-registry.d.ts +9 -0
- package/dist/types/engine/form-engine/registry/engine-component-types.d.ts +20 -0
- package/dist/types/engine/form-engine/registry/engine-version.d.ts +5 -0
- package/dist/types/engine/form-engine/registry/formula-functions/formula-function-registry.d.ts +33 -0
- package/dist/types/engine/form-engine/registry/index.d.ts +13 -0
- package/dist/types/engine/form-engine/registry/kinds.d.ts +83 -0
- package/dist/types/engine/form-engine/registry/pdf/pdf-rendition-registry.d.ts +15 -0
- package/dist/types/engine/form-engine/registry/plugins/plugin-registry.d.ts +14 -0
- package/dist/types/engine/form-engine/registry/submission/submission-handler-registry.d.ts +7 -0
- package/dist/types/engine/form-engine/registry/validators/validator-registry.d.ts +6 -0
- package/dist/types/engine/form-engine/registry/version-range.d.ts +15 -0
- package/dist/types/engine/form-engine/registry/versioned-theme-registry.d.ts +30 -0
- package/dist/types/engine/form-engine/registry/versioning.d.ts +5 -0
- package/dist/types/engine/form-engine/render/core/component-model.d.ts +292 -0
- package/dist/types/engine/form-engine/render/core/component-options.d.ts +58 -0
- package/dist/types/engine/form-engine/render/core/css-rules.d.ts +68 -0
- package/dist/types/engine/form-engine/render/core/error-accessibility.d.ts +23 -0
- package/dist/types/engine/form-engine/render/core/error-summary.d.ts +62 -0
- package/dist/types/engine/form-engine/render/core/error-wording.d.ts +104 -0
- package/dist/types/engine/form-engine/render/core/escape-html.d.ts +2 -0
- package/dist/types/engine/form-engine/render/core/file-storage.d.ts +59 -0
- package/dist/types/engine/form-engine/render/core/host-data-sources.d.ts +44 -0
- package/dist/types/engine/form-engine/render/core/journey-render-kit-default.d.ts +5 -0
- package/dist/types/engine/form-engine/render/core/journey-render-kit-eager.d.ts +10 -0
- package/dist/types/engine/form-engine/render/core/journey-render-kit-factory.d.ts +13 -0
- package/dist/types/engine/form-engine/render/core/journey-render-kit.d.ts +61 -0
- package/dist/types/engine/form-engine/render/core/journey-render.d.ts +132 -0
- package/dist/types/engine/form-engine/render/core/journey-review-kit-eager.d.ts +9 -0
- package/dist/types/engine/form-engine/render/core/journey-review-kit.d.ts +33 -0
- package/dist/types/engine/form-engine/render/core/journey-review.d.ts +134 -0
- package/dist/types/engine/form-engine/render/core/presentation-tree.d.ts +374 -0
- package/dist/types/engine/form-engine/render/core/print-options.d.ts +89 -0
- package/dist/types/engine/form-engine/render/core/render-contracts.d.ts +7 -0
- package/dist/types/engine/form-engine/render/core/render-orchestrator.d.ts +139 -0
- package/dist/types/engine/form-engine/render/core/render-policy.d.ts +52 -0
- package/dist/types/engine/form-engine/render/core/runtime-render-bridge.d.ts +154 -0
- package/dist/types/engine/form-engine/render/core/scalar-text.d.ts +10 -0
- package/dist/types/engine/form-engine/render/core/tab-slots.d.ts +25 -0
- package/dist/types/engine/form-engine/render/core/token-style-vars.d.ts +45 -0
- package/dist/types/engine/form-engine/render/icons/builtin-icons.d.ts +24 -0
- package/dist/types/engine/form-engine/render/icons/icon-names.d.ts +67 -0
- package/dist/types/engine/form-engine/render/icons/icon-set.d.ts +102 -0
- package/dist/types/engine/form-engine/render/index.d.ts +68 -0
- package/dist/types/engine/form-engine/render/live/announcer.d.ts +10 -0
- package/dist/types/engine/form-engine/render/live/assets-feature.d.ts +12 -0
- package/dist/types/engine/form-engine/render/live/assets-policy.d.ts +6 -0
- package/dist/types/engine/form-engine/render/live/assets.d.ts +109 -0
- package/dist/types/engine/form-engine/render/live/binding-registry.d.ts +46 -0
- package/dist/types/engine/form-engine/render/live/buttons.d.ts +12 -0
- package/dist/types/engine/form-engine/render/live/chrome.d.ts +15 -0
- package/dist/types/engine/form-engine/render/live/component-text.d.ts +10 -0
- package/dist/types/engine/form-engine/render/live/contract.d.ts +1267 -0
- package/dist/types/engine/form-engine/render/live/data-grid.d.ts +51 -0
- package/dist/types/engine/form-engine/render/live/datum/buttons.d.ts +44 -0
- package/dist/types/engine/form-engine/render/live/datum/choice-fields.d.ts +8 -0
- package/dist/types/engine/form-engine/render/live/datum/chrome-files.d.ts +43 -0
- package/dist/types/engine/form-engine/render/live/datum/chrome.d.ts +49 -0
- package/dist/types/engine/form-engine/render/live/datum/container-kit.d.ts +66 -0
- package/dist/types/engine/form-engine/render/live/datum/containers.d.ts +25 -0
- package/dist/types/engine/form-engine/render/live/datum/content.d.ts +5 -0
- package/dist/types/engine/form-engine/render/live/datum/css.d.ts +40 -0
- package/dist/types/engine/form-engine/render/live/datum/date.d.ts +66 -0
- package/dist/types/engine/form-engine/render/live/datum/default-tokens.d.ts +30 -0
- package/dist/types/engine/form-engine/render/live/datum/field-scaffold.d.ts +131 -0
- package/dist/types/engine/form-engine/render/live/datum/file.d.ts +6 -0
- package/dist/types/engine/form-engine/render/live/datum/frames.d.ts +33 -0
- package/dist/types/engine/form-engine/render/live/datum/grid.d.ts +26 -0
- package/dist/types/engine/form-engine/render/live/datum/groups.d.ts +45 -0
- package/dist/types/engine/form-engine/render/live/datum/icons.d.ts +18 -0
- package/dist/types/engine/form-engine/render/live/datum/leaf-kit.d.ts +17 -0
- package/dist/types/engine/form-engine/render/live/datum/month-names.d.ts +2 -0
- package/dist/types/engine/form-engine/render/live/datum/notice.d.ts +25 -0
- package/dist/types/engine/form-engine/render/live/datum/options.d.ts +133 -0
- package/dist/types/engine/form-engine/render/live/datum/page.d.ts +13 -0
- package/dist/types/engine/form-engine/render/live/datum/parts.d.ts +120 -0
- package/dist/types/engine/form-engine/render/live/datum/signature.d.ts +25 -0
- package/dist/types/engine/form-engine/render/live/datum/steps.d.ts +30 -0
- package/dist/types/engine/form-engine/render/live/datum/summary.d.ts +26 -0
- package/dist/types/engine/form-engine/render/live/datum/tabs.d.ts +23 -0
- package/dist/types/engine/form-engine/render/live/datum/text-fields.d.ts +7 -0
- package/dist/types/engine/form-engine/render/live/datum/tokens.d.ts +1030 -0
- package/dist/types/engine/form-engine/render/live/error-target.d.ts +12 -0
- package/dist/types/engine/form-engine/render/live/field-preview.d.ts +22 -0
- package/dist/types/engine/form-engine/render/live/fields.d.ts +26 -0
- package/dist/types/engine/form-engine/render/live/files.d.ts +20 -0
- package/dist/types/engine/form-engine/render/live/form-notices.d.ts +17 -0
- package/dist/types/engine/form-engine/render/live/guards.d.ts +37 -0
- package/dist/types/engine/form-engine/render/live/journey-page.d.ts +45 -0
- package/dist/types/engine/form-engine/render/live/journey-review.d.ts +50 -0
- package/dist/types/engine/form-engine/render/live/lit.d.ts +48 -0
- package/dist/types/engine/form-engine/render/live/look-classes.d.ts +27 -0
- package/dist/types/engine/form-engine/render/live/media-labels.d.ts +16 -0
- package/dist/types/engine/form-engine/render/live/mount.d.ts +450 -0
- package/dist/types/engine/form-engine/render/live/notices.d.ts +3 -0
- package/dist/types/engine/form-engine/render/live/readonly-sizing.d.ts +14 -0
- package/dist/types/engine/form-engine/render/live/renderer.d.ts +12 -0
- package/dist/types/engine/form-engine/render/live/sources.d.ts +4 -0
- package/dist/types/engine/form-engine/render/live/steps.d.ts +6 -0
- package/dist/types/engine/form-engine/render/live/summary.d.ts +33 -0
- package/dist/types/engine/form-engine/render/live/tabs.d.ts +8 -0
- package/dist/types/engine/form-engine/render/live/tooltips.d.ts +30 -0
- package/dist/types/engine/form-engine/render/pdf/default-layout.d.ts +51 -0
- package/dist/types/engine/form-engine/render/pdf/pdf-abi.d.ts +819 -0
- package/dist/types/engine/form-engine/render/pdf/pdf-agent-signer.d.ts +92 -0
- package/dist/types/engine/form-engine/render/pdf/pdf-attachments.d.ts +76 -0
- package/dist/types/engine/form-engine/render/pdf/pdf-components.d.ts +282 -0
- package/dist/types/engine/form-engine/render/pdf/pdf-designer-styles.d.ts +12 -0
- package/dist/types/engine/form-engine/render/pdf/pdf-document.d.ts +412 -0
- package/dist/types/engine/form-engine/render/pdf/pdf-layout-selection.d.ts +54 -0
- package/dist/types/engine/form-engine/render/pdf/pdf-pages.d.ts +25 -0
- package/dist/types/engine/form-engine/render/pdf/pdf-provider.d.ts +219 -0
- package/dist/types/engine/form-engine/render/pdf/pdf-render-mode.d.ts +2 -0
- package/dist/types/engine/form-engine/render/pdf/pdf-render-model.d.ts +124 -0
- package/dist/types/engine/form-engine/render/pdf/pdf-renditions.d.ts +160 -0
- package/dist/types/engine/form-engine/render/pdf/pdf-service.d.ts +161 -0
- package/dist/types/engine/form-engine/render/pdf/pdf-signer.d.ts +26 -0
- package/dist/types/engine/form-engine/render/pdf/pdf-template-components.d.ts +168 -0
- package/dist/types/engine/form-engine/render/pdf/pdf-template-constants.d.ts +14 -0
- package/dist/types/engine/form-engine/render/pdf/pdf-template.d.ts +84 -0
- package/dist/types/engine/form-engine/render/pdf/pdf-text-addresses.d.ts +20 -0
- package/dist/types/engine/form-engine/render/pdf/pdf-theme-defaults.d.ts +410 -0
- package/dist/types/engine/form-engine/render/pdf/pdf-theme-registry.d.ts +25 -0
- package/dist/types/engine/form-engine/render/pdf/pdf-theme.d.ts +91 -0
- package/dist/types/engine/form-engine/render/pdf/pdf-values.d.ts +47 -0
- package/dist/types/engine/form-engine/render/pdf/standard-renditions.d.ts +33 -0
- package/dist/types/engine/form-engine/render/pdf/template-text.d.ts +52 -0
- package/dist/types/engine/form-engine/render/print/answer-text.d.ts +3 -0
- package/dist/types/engine/form-engine/render/print/basic.d.ts +18 -0
- package/dist/types/engine/form-engine/render/print/datum.d.ts +2 -0
- package/dist/types/engine/form-engine/render/print/document.d.ts +65 -0
- package/dist/types/engine/form-engine/render/print/field-answer.d.ts +47 -0
- package/dist/types/engine/form-engine/render/print/index.d.ts +12 -0
- package/dist/types/engine/form-engine/render/print/model.d.ts +346 -0
- package/dist/types/engine/form-engine/render/print/safe-html.d.ts +41 -0
- package/dist/types/engine/form-engine/render/print/slot-text.d.ts +30 -0
- package/dist/types/engine/form-engine/render/print/theme.d.ts +86 -0
- package/dist/types/engine/form-engine/render/react/interactive-renderer.d.ts +9 -0
- package/dist/types/engine/form-engine/render/readonly/readonly-renderer.d.ts +12 -0
- package/dist/types/engine/form-engine/render/web-component/custom-element-base.d.ts +3 -0
- package/dist/types/engine/form-engine/render/web-component/form-features.d.ts +76 -0
- package/dist/types/engine/form-engine/render/web-component/form-host-element.d.ts +310 -0
- package/dist/types/engine/form-engine/render/web-component/form-renderer-element.d.ts +846 -0
- package/dist/types/engine/form-engine/render/web-component/locale-select-element.d.ts +24 -0
- package/dist/types/engine/form-engine/render/web-component/pdf-download.d.ts +75 -0
- package/dist/types/engine/form-engine/render/web-component/print-frame.d.ts +85 -0
- package/dist/types/engine/form-engine/render/web-component/print-pipeline.d.ts +11 -0
- package/dist/types/engine/form-engine/render/web-component/print-policy.d.ts +2 -0
- package/dist/types/engine/form-engine/render/web-component/submission-download.d.ts +47 -0
- package/dist/types/engine/form-engine/render/web-component/typed-answers.d.ts +26 -0
- package/dist/types/engine/form-engine/render/webauthn/assertion.d.ts +69 -0
- package/dist/types/engine/form-engine/render/webauthn/authenticator-data.d.ts +21 -0
- package/dist/types/engine/form-engine/render/webauthn/errors.d.ts +30 -0
- package/dist/types/engine/form-engine/render/webauthn/registration-verify.d.ts +44 -0
- package/dist/types/engine/form-engine/render/webauthn/registration.d.ts +77 -0
- package/dist/types/engine/form-engine/render/webauthn/signal.d.ts +27 -0
- package/dist/types/engine/form-engine/render/webauthn/signing-provider.d.ts +70 -0
- package/dist/types/engine/form-engine/rules/dependencies/calculation-cycle.d.ts +25 -0
- package/dist/types/engine/form-engine/rules/dependencies/dependency-extractor.d.ts +9 -0
- package/dist/types/engine/form-engine/rules/dependencies/dependency-graph.d.ts +26 -0
- package/dist/types/engine/form-engine/rules/evaluator/evaluator.d.ts +209 -0
- package/dist/types/engine/form-engine/rules/evaluator/functions-date.d.ts +26 -0
- package/dist/types/engine/form-engine/rules/evaluator/functions-list.d.ts +28 -0
- package/dist/types/engine/form-engine/rules/evaluator/functions-number.d.ts +6 -0
- package/dist/types/engine/form-engine/rules/evaluator/functions-text.d.ts +23 -0
- package/dist/types/engine/form-engine/runtime/browser/collection-runtime.d.ts +34 -0
- package/dist/types/engine/form-engine/runtime/browser/draft-read.d.ts +27 -0
- package/dist/types/engine/form-engine/runtime/browser/form-runtime.d.ts +1470 -0
- package/dist/types/engine/form-engine/runtime/browser/form-test-runtime-driver.d.ts +83 -0
- package/dist/types/engine/form-engine/runtime/browser/journey/journey-action.d.ts +42 -0
- package/dist/types/engine/form-engine/runtime/browser/journey/journey-navigation.d.ts +200 -0
- package/dist/types/engine/form-engine/runtime/browser/journey/journey-presentation-overlay.d.ts +69 -0
- package/dist/types/engine/form-engine/runtime/browser/journey/journey-server-checks.d.ts +89 -0
- package/dist/types/engine/form-engine/runtime/browser/journey-engine-eager.d.ts +11 -0
- package/dist/types/engine/form-engine/runtime/browser/journey-engine.d.ts +462 -0
- package/dist/types/engine/form-engine/runtime/browser/path-validation-runs.d.ts +91 -0
- package/dist/types/engine/form-engine/runtime/browser/runtime-orchestrator.d.ts +530 -0
- package/dist/types/engine/form-engine/runtime/browser/submission-key.d.ts +12 -0
- package/dist/types/engine/form-engine/runtime/index.d.ts +8 -0
- package/dist/types/engine/form-engine/validation/core/error-store.d.ts +70 -0
- package/dist/types/engine/form-engine/validation/core/field-constraints.d.ts +293 -0
- package/dist/types/engine/form-engine/validation/core/test-vectors.d.ts +20 -0
- package/dist/types/engine/form-engine/validation/core/validation-pipeline.d.ts +65 -0
- package/dist/types/engine/form-engine/validation/parity/browser-adapter.d.ts +4 -0
- package/dist/types/engine/form-engine/validation/parity/formula-function-parity.d.ts +27 -0
- package/dist/types/engine/form-engine/validation/parity/index.d.ts +7 -0
- package/dist/types/engine/form-engine/validation/parity/parity-runner.d.ts +21 -0
- package/dist/types/engine/form-engine/validation/parity/runtime-adapter.d.ts +9 -0
- package/dist/types/engine/form-engine/validation/parity/server-adapter.d.ts +7 -0
- package/dist/types/engine/form-engine/validation/parity/vectors.d.ts +28 -0
- package/dist/types/engine/form-engine/validation/parity/wasm-adapter.d.ts +9 -0
- package/dist/types/engine/form-engine/validation/server/server-validation.d.ts +49 -0
- package/dist/types/engine/form-engine/validation/wasm/form-test-kernel-driver.d.ts +95 -0
- package/dist/types/engine/form-engine/validation/wasm/in-process-host.d.ts +56 -0
- package/dist/types/engine/form-engine/validation/wasm/portable-kernel.d.ts +1926 -0
- package/dist/types/engine/form-engine/validation/wasm/portable-options.d.ts +282 -0
- package/dist/types/engine/form-engine/validation/wasm/wasm-validation-host.d.ts +429 -0
- package/dist/types/engine/form-engine/verification/gate-inputs.d.ts +26 -0
- package/dist/types/engine/form-engine/verification/release-gates.d.ts +32 -0
- package/dist/types/engine/form-engine/verification/telemetry-bridge.d.ts +15 -0
- package/dist/types/engine/form-engine/verification/telemetry-sinks.d.ts +13 -0
- package/dist/types/engine/form-engine/verification/telemetry.d.ts +29 -0
- package/dist/types/packages/form-test/src/api.d.ts +75 -0
- package/dist/types/packages/form-test/src/args.d.ts +27 -0
- package/dist/types/packages/form-test/src/cli.d.ts +10 -0
- package/dist/types/packages/form-test/src/coverage.d.ts +11 -0
- package/dist/types/packages/form-test/src/drivers.d.ts +23 -0
- package/dist/types/packages/form-test/src/exit-codes.d.ts +17 -0
- package/dist/types/packages/form-test/src/index.d.ts +28 -0
- package/dist/types/packages/form-test/src/load.d.ts +25 -0
- package/dist/types/packages/form-test/src/parity.d.ts +14 -0
- package/dist/types/packages/form-test/src/report/json.d.ts +7 -0
- package/dist/types/packages/form-test/src/report/junit.d.ts +14 -0
- package/dist/types/packages/form-test/src/report/markdown.d.ts +14 -0
- package/dist/types/packages/form-test/src/report/model.d.ts +137 -0
- package/dist/types/packages/form-test/src/report/schema.d.ts +449 -0
- package/dist/types/packages/form-test/src/report/words.d.ts +48 -0
- package/dist/types/packages/form-test/src/run.d.ts +15 -0
- package/dist/types/packages/form-test/src/version.d.ts +3 -0
- package/dist/types/packages/form-test/src/vitest.d.ts +43 -0
- package/dist/types/packages/quickjs-wasm-host/src/fresh-sandbox-host.d.ts +70 -0
- package/dist/types/packages/quickjs-wasm-host/src/heap-recycle.d.ts +44 -0
- package/dist/types/packages/quickjs-wasm-host/src/index.d.ts +4 -0
- package/dist/types/packages/quickjs-wasm-host/src/program-host.d.ts +179 -0
- package/dist/types/packages/quickjs-wasm-host/src/quickjs-wasm-host-adapter.d.ts +218 -0
- package/dist/types/packages/quickjs-wasm-host/src/sandbox-program.d.ts +108 -0
- package/dist/vitest.mjs +189 -0
- package/fixtures/clock.json +35 -0
- package/fixtures/failing.datum-test +2 -0
- package/fixtures/main.datum-test +17 -0
- package/fixtures/main.json +435 -0
- package/package.json +93 -4
|
@@ -0,0 +1,1470 @@
|
|
|
1
|
+
import type { AccessibilityConfiguration, FormDefinition, LocalizationConfiguration } from "../../core/schema/types.js";
|
|
2
|
+
import type { PdfConfiguration } from "../../core/schema/pdf-layout.js";
|
|
3
|
+
import { type Journey, type JourneyConfiguration, type JourneyHostChoice } from "../../core/schema/journey.js";
|
|
4
|
+
import type { JourneyNavigationResult, JourneyServerValidator, JourneyTrace, JourneyView } from "../../core/journey/journey-types.js";
|
|
5
|
+
import type { PresentationIndex } from "../../core/journey/presentation.js";
|
|
6
|
+
import { type JourneyEngine } from "./journey-engine.js";
|
|
7
|
+
import type { AgentProvenance, FormHooks } from "../../core/events/hooks.js";
|
|
8
|
+
import { EventBus } from "../../core/events/event-bus.js";
|
|
9
|
+
import { type SetValueOptions } from "../../core/events/event-types.js";
|
|
10
|
+
import { type FormState } from "../../core/state/form-state.js";
|
|
11
|
+
import type { EffectiveNodeState } from "../../core/state/effective-state.js";
|
|
12
|
+
import { ComponentTree } from "../../core/tree/component-tree.js";
|
|
13
|
+
import type { JourneyActionOutcome, JourneyActionPage } from "./journey/journey-action.js";
|
|
14
|
+
import { type SemanticStateResolver } from "./runtime-orchestrator.js";
|
|
15
|
+
import { type DraftStore, type FormDraftSummary } from "../../persistence/core/draft-store.js";
|
|
16
|
+
import { type DraftCompatibilityPolicy } from "../../persistence/core/draft-compatibility.js";
|
|
17
|
+
import { type CanonicalSubmission, type SubmissionVersionContext } from "../../core/submission/canonical-submission.js";
|
|
18
|
+
import { SubmissionModeRegistry } from "../../core/submission/submission-modes.js";
|
|
19
|
+
import type { SubmissionHandlerRegistry } from "../../registry/submission/submission-handler-registry.js";
|
|
20
|
+
import { type SignedSubmissionDocument, type SigningProvider, type SignatureResult, type SubmissionSigningOptions } from "../../core/submission/signing.js";
|
|
21
|
+
import type { ComponentRegistry } from "../../registry/components/component-registry.js";
|
|
22
|
+
import type { PdfRenditionRegistry } from "../../registry/pdf/pdf-rendition-registry.js";
|
|
23
|
+
import type { FormTranslations } from "../../core/localization/translations.js";
|
|
24
|
+
import type { ComponentDefinition, DataSourceResult, DataSourceRuntime, FormPlugin, TranslationCatalog } from "../../core/schema/contracts.js";
|
|
25
|
+
import type { FormError, HostError } from "../../core/errors/form-error.js";
|
|
26
|
+
import type { ComponentNode } from "../../core/schema/types.js";
|
|
27
|
+
import type { FormDraft } from "../../persistence/core/draft-store.js";
|
|
28
|
+
import { PluginPlatform, type PluginPlatformResult } from "../../plugins/platform/plugin-platform.js";
|
|
29
|
+
import { ValidationPipeline } from "../../validation/core/validation-pipeline.js";
|
|
30
|
+
import type { FieldInputState } from "../../core/schema/answer-kinds.js";
|
|
31
|
+
import { ErrorStore } from "../../validation/core/error-store.js";
|
|
32
|
+
import { WasmValidationHost, type WasmSandboxPolicy, type WasmLogLevel, type WasmUnknownFieldsMode } from "../../validation/wasm/wasm-validation-host.js";
|
|
33
|
+
import { ServerValidationRunner } from "../../validation/server/server-validation.js";
|
|
34
|
+
import type { PluginRegistry } from "../../registry/plugins/plugin-registry.js";
|
|
35
|
+
import type { FormulaErrorPolicy } from "../../core/expressions/expression.js";
|
|
36
|
+
import type { FormulaFunctionSignature, FormulaProblem } from "../../core/expressions/formula-types.js";
|
|
37
|
+
import type { FormulaFunctionRegistry } from "../../registry/formula-functions/formula-function-registry.js";
|
|
38
|
+
/**
|
|
39
|
+
* The definition the runtime refuses under `formulaErrors: "fail"`: a rule whose formula does
|
|
40
|
+
* not parse, or a scope a rule may not take. `problems` lists each, in document order, as the
|
|
41
|
+
* compile step found them (`kernelCompileDefinition`).
|
|
42
|
+
*/
|
|
43
|
+
export declare class FormulaError extends Error {
|
|
44
|
+
readonly formId: string;
|
|
45
|
+
readonly problems: FormulaProblem[];
|
|
46
|
+
constructor(formId: string, problems: FormulaProblem[]);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* A submit refused because another one, asking for something else, is still in flight: the
|
|
50
|
+
* runtime runs one submission at a time, and only an identical call may join it.
|
|
51
|
+
*/
|
|
52
|
+
export declare class SubmitBusyError extends Error {
|
|
53
|
+
readonly code = "submission.busy";
|
|
54
|
+
readonly formId: string;
|
|
55
|
+
/** The mode of the submission in flight. */
|
|
56
|
+
readonly modeId: string;
|
|
57
|
+
constructor(formId: string, modeId: string);
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* An answer refused as it is written: a value that is not a scalar (an object, a list, a
|
|
61
|
+
* function) for a field whose control holds one value (`SCALAR_ANSWER_TYPES`: a text box, a text
|
|
62
|
+
* area, a number or date control, a select, a radio group, a lone checkbox), in a row of a
|
|
63
|
+
* collection too. Such a value is no answer a person could give, and the renderer could not draw
|
|
64
|
+
* it. `setValue` throws it, `setValues` lists it among its failures, `addRow` and `addRows`
|
|
65
|
+
* throw it for a new row's cell, and `hydrateFromDraft` leaves such an answer out and reports
|
|
66
|
+
* it, restoring the rest.
|
|
67
|
+
*/
|
|
68
|
+
export declare class NonScalarAnswerError extends Error {
|
|
69
|
+
readonly code = "value.notScalar";
|
|
70
|
+
readonly formId: string;
|
|
71
|
+
/** The value path written. */
|
|
72
|
+
readonly path: string;
|
|
73
|
+
readonly componentId: string;
|
|
74
|
+
readonly componentType: string;
|
|
75
|
+
constructor(formId: string, path: string, componentId: string, componentType: string);
|
|
76
|
+
}
|
|
77
|
+
/** What {@link FormRuntime.hydrateFromDraft} restored without: each answer left out, and why. */
|
|
78
|
+
export interface DraftRestoreResult {
|
|
79
|
+
dropped: Array<{
|
|
80
|
+
path: string;
|
|
81
|
+
error: NonScalarAnswerError;
|
|
82
|
+
}>;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* A date as the calendar day it falls on where the code runs, `YYYY-MM-DD`: the day a person
|
|
86
|
+
* filling the form would name. Never `toISOString`, which names the UTC day and is a day off
|
|
87
|
+
* in the evening or the morning for everyone east or west of it.
|
|
88
|
+
*/
|
|
89
|
+
export declare function localCalendarDate(date: Date): string;
|
|
90
|
+
/**
|
|
91
|
+
* The name and arity of each formula function a plugin declares (`FormPlugin.formulaFunctions`),
|
|
92
|
+
* as the parser checks a call: what `FormulaFunctionRegistry.signatures()` answers once the
|
|
93
|
+
* plugins are installed, read from the declarations alone.
|
|
94
|
+
*/
|
|
95
|
+
export declare function pluginFormulaSignatures(plugins: readonly FormPlugin[]): FormulaFunctionSignature[];
|
|
96
|
+
/**
|
|
97
|
+
* A definition compiled for a runtime: every formula replaced by its tree, in a copy, with
|
|
98
|
+
* the problems found (`kernelCompileDefinition`). The parser checks calls against the
|
|
99
|
+
* built-in functions plus whatever `functions` adds: signatures already worked out, or the
|
|
100
|
+
* plugins whose declarations hold them.
|
|
101
|
+
*/
|
|
102
|
+
export declare function compileFormDefinition(definition: FormDefinition, functions?: {
|
|
103
|
+
signatures?: readonly FormulaFunctionSignature[];
|
|
104
|
+
plugins?: readonly FormPlugin[];
|
|
105
|
+
/** `"allow"` lets a literal `matches` pattern of a catastrophic shape compile; default `"refuse"`. */
|
|
106
|
+
riskyPatterns?: "refuse" | "allow" | undefined;
|
|
107
|
+
}): {
|
|
108
|
+
definition: FormDefinition;
|
|
109
|
+
problems: FormulaProblem[];
|
|
110
|
+
warnings: FormulaProblem[];
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
113
|
+
* Runtime-level version identity captured into drafts on save. Mirrors the client half of
|
|
114
|
+
* {@link SubmissionVersionContext} without submission-time server fields.
|
|
115
|
+
*/
|
|
116
|
+
export interface RuntimeVersionContext {
|
|
117
|
+
formVersion: string;
|
|
118
|
+
schemaVersion: string;
|
|
119
|
+
rendererVersion: string;
|
|
120
|
+
}
|
|
121
|
+
export interface FormRuntimeDependencies {
|
|
122
|
+
eventBus?: EventBus;
|
|
123
|
+
hooks?: FormHooks;
|
|
124
|
+
validationPipeline: ValidationPipeline;
|
|
125
|
+
submissionModes: SubmissionModeRegistry;
|
|
126
|
+
wasmValidationHost?: WasmValidationHost;
|
|
127
|
+
/**
|
|
128
|
+
* Resolves the deterministic external-data snapshot injected into the wasm validation
|
|
129
|
+
* context: the host gathers whatever data-source results validation needs —
|
|
130
|
+
* the sandbox itself never fetches. Every key must be allowlisted via
|
|
131
|
+
* {@link wasmPolicy}'s `allowedExternalDataKeys` or the run is rejected at the ABI.
|
|
132
|
+
*/
|
|
133
|
+
wasmExternalDataProvider?: (context: {
|
|
134
|
+
formId: string;
|
|
135
|
+
values: Record<string, unknown>;
|
|
136
|
+
locale?: string;
|
|
137
|
+
}) => Promise<Record<string, unknown>>;
|
|
138
|
+
/**
|
|
139
|
+
* Policy for wasm validation runs. Privileges must remain all-`false` (the host throws
|
|
140
|
+
* otherwise); this exists so a host can set `allowedExternalDataKeys` for the data its
|
|
141
|
+
* {@link wasmExternalDataProvider} injects. Defaults to `WasmValidationHost.STRICT_POLICY`.
|
|
142
|
+
*/
|
|
143
|
+
wasmPolicy?: WasmSandboxPolicy;
|
|
144
|
+
/**
|
|
145
|
+
* Default for what the sandbox does with submitted keys the schema does not define:
|
|
146
|
+
* `"strip"` (silently removed — the default), `"keep"`, or `"reject"` (blocks with
|
|
147
|
+
* `unknown_field` errors). Overridable per call via `submit()`'s `options`.
|
|
148
|
+
*/
|
|
149
|
+
wasmUnknownFields?: WasmUnknownFieldsMode;
|
|
150
|
+
/**
|
|
151
|
+
* Default for what the sandbox's run log keeps: `"off"`, `"error"`, `"warn"`
|
|
152
|
+
* (the kernel's own default), `"info"` or `"debug"`. The log comes back on
|
|
153
|
+
* `WASM_VALIDATION_COMPLETED` as `response.logs`. Overridable per call via `submit()`'s
|
|
154
|
+
* `options`.
|
|
155
|
+
*/
|
|
156
|
+
wasmLogLevel?: WasmLogLevel;
|
|
157
|
+
serverValidationRunner?: ServerValidationRunner;
|
|
158
|
+
dataSources?: DataSourceRuntime;
|
|
159
|
+
pluginRegistry?: PluginRegistry;
|
|
160
|
+
pluginPlatform?: PluginPlatform;
|
|
161
|
+
/**
|
|
162
|
+
* Post-acceptance submission handlers invoked after `SUBMISSION_COMPLETED`. Handlers
|
|
163
|
+
* contributed by installed plugins (via `pluginPlatform`) are appended to these.
|
|
164
|
+
*/
|
|
165
|
+
submissionHandlerRegistry?: SubmissionHandlerRegistry;
|
|
166
|
+
draftStore?: DraftStore;
|
|
167
|
+
versionContext?: RuntimeVersionContext;
|
|
168
|
+
semanticStateResolver?: SemanticStateResolver;
|
|
169
|
+
hostContext?: Record<string, unknown>;
|
|
170
|
+
/** Supplies the service bag passed to server validation hooks (policy-guarded by the runner). */
|
|
171
|
+
serverServicesProvider?: () => Record<string, unknown>;
|
|
172
|
+
/** Required for submission modes with `sign === true`: the default signer, the one a signing mode forces. */
|
|
173
|
+
signingProvider?: SigningProvider;
|
|
174
|
+
/**
|
|
175
|
+
* Further signers a submission may name by id (`SubmitOptions.signWith`, a button's
|
|
176
|
+
* `signature` option): a WebAuthn provider beside a server-side one. The default
|
|
177
|
+
* `signingProvider` is reachable by its id too.
|
|
178
|
+
*/
|
|
179
|
+
signingProviders?: SigningProvider[];
|
|
180
|
+
/**
|
|
181
|
+
* The provider every submission signs with when the call names none ("signature required"): a submission signs whether or not its mode does, and a missing
|
|
182
|
+
* provider refuses it (`signing.providerMissing`) — never delivered unsigned. A call's own
|
|
183
|
+
* `signWith` (a button's `signature` option) still wins.
|
|
184
|
+
*/
|
|
185
|
+
signWith?: string;
|
|
186
|
+
/**
|
|
187
|
+
* How submissions are signed — what is hashed, where the signatures land, in
|
|
188
|
+
* which canonical text (`"jcs"` by default) — and the signing statement the signer
|
|
189
|
+
* agrees to, signed with the document. The default is embedded, over the whole envelope.
|
|
190
|
+
*/
|
|
191
|
+
signing?: SubmissionSigningOptions;
|
|
192
|
+
/** Used to auto-populate `client.components` manifest entries during submit. */
|
|
193
|
+
componentRegistry?: ComponentRegistry;
|
|
194
|
+
/** Which of the host's form versions `hydrateFromDraft` takes a draft from; the schema version must always match. */
|
|
195
|
+
draftCompatibilityPolicy?: DraftCompatibilityPolicy;
|
|
196
|
+
/**
|
|
197
|
+
* The host's translations of the form's texts, sourced by the host — fetched,
|
|
198
|
+
* bundled, read from a database, however it likes — and handed to the runtime ready-made, in
|
|
199
|
+
* the shape of the definition's own `translations` map (locale → kind → owner → property,
|
|
200
|
+
* string leaves). The runtime never fetches translations itself: supplying (or not supplying)
|
|
201
|
+
* this is the whole translation-loading story. Resolution order per text: the catalog's entry
|
|
202
|
+
* for the locale, the definition's own, then the default-language string.
|
|
203
|
+
*/
|
|
204
|
+
translationCatalog?: TranslationCatalog;
|
|
205
|
+
/**
|
|
206
|
+
* The PDF layouts this runtime renders under, for a host that keeps them
|
|
207
|
+
* outside the definition — a layout designer editing them while the form runs, a layout
|
|
208
|
+
* library shared by several forms. A function is read on every render, so the layouts
|
|
209
|
+
* may change without rebuilding the runtime (and losing what has been typed). Absent, the
|
|
210
|
+
* definition's own `pdf` block applies.
|
|
211
|
+
*/
|
|
212
|
+
pdfConfiguration?: PdfConfiguration | (() => PdfConfiguration | undefined);
|
|
213
|
+
/**
|
|
214
|
+
* The journeys this runtime runs, in place of the definition's own `journey`
|
|
215
|
+
* block — for a builder previewing journeys while they are edited. A function is read on
|
|
216
|
+
* every recompute, so a page or a route may change without rebuilding the runtime. Only a
|
|
217
|
+
* preview should set it: a server judges a submission by the definition's journeys, so a
|
|
218
|
+
* form in service keeps them there.
|
|
219
|
+
*/
|
|
220
|
+
journeyConfiguration?: JourneyConfiguration | (() => JourneyConfiguration | undefined);
|
|
221
|
+
/**
|
|
222
|
+
* Which journey the form opens as, when the host says: a journey's id, `"form"`
|
|
223
|
+
* for the whole form on one page, or `"journey"` for the definition's default journey even
|
|
224
|
+
* when the definition opens as a form. Absent, the definition decides. A journey the form
|
|
225
|
+
* does not have is warned about once and the definition decides instead.
|
|
226
|
+
*/
|
|
227
|
+
journey?: JourneyHostChoice;
|
|
228
|
+
/**
|
|
229
|
+
* The page the journey opens on — a resume point. Honoured only when the page is reachable
|
|
230
|
+
* (on the path, at or before the first page not yet completed). Nothing is completed when a
|
|
231
|
+
* journey starts, so at first that is the first page alone; a later page is kept until a
|
|
232
|
+
* draft is restored (`hydrateFromDraft`) whose completed pages reach it, and the journey then
|
|
233
|
+
* opens on it rather than on the draft's own page. The person's first move forgets it.
|
|
234
|
+
*/
|
|
235
|
+
page?: string;
|
|
236
|
+
/**
|
|
237
|
+
* The host's way to its server for the checks a journey asks for: a page's on
|
|
238
|
+
* Continue (`validation.server`) and the whole journey's when it is submitted
|
|
239
|
+
* (`validation.end: "server"`). The definition says when a check runs; this says how.
|
|
240
|
+
* Without one, a check the journey asks for counts as the server being unavailable (and the
|
|
241
|
+
* console says once how to set one), so a host that forgot the wiring never ships unchecked
|
|
242
|
+
* journeys. {@link FormRuntime.setJourneyServerValidator} replaces it without a rebuild.
|
|
243
|
+
*/
|
|
244
|
+
journeyServerValidator?: JourneyServerValidator;
|
|
245
|
+
/**
|
|
246
|
+
* The version context a journey's check stamps into the submission envelope it hands the
|
|
247
|
+
* validator (`document`, which `createFetchJourneyValidator` posts to a Datum host), enriched
|
|
248
|
+
* and canonicalized as {@link FormRuntime.submit} does with its own. Absent: checks carry no
|
|
249
|
+
* envelope. `submit` takes its version context from its caller, never from here.
|
|
250
|
+
*/
|
|
251
|
+
submissionVersionContext?: SubmissionVersionContext;
|
|
252
|
+
/**
|
|
253
|
+
* How long a check against the host's server may take before it counts as unavailable, in
|
|
254
|
+
* milliseconds. Absent: 10000. `0`: no limit (the validator's own, if it has one).
|
|
255
|
+
*/
|
|
256
|
+
journeyServerValidationTimeoutMs?: number;
|
|
257
|
+
/**
|
|
258
|
+
* The journey machinery this runtime asks: the path, the ownership, a page's view,
|
|
259
|
+
* a move's checks, a server check's key. Absent, the default engine
|
|
260
|
+
* (`setDefaultJourneyEngine`; the Noop one until a host sets another), which has no
|
|
261
|
+
* journeys: a definition that declares some is warned about once and runs as one page.
|
|
262
|
+
* `<datum-form>` passes the engine it loaded; a host building runtimes itself passes
|
|
263
|
+
* `EagerJourneyEngine` or sets it as the default once at startup.
|
|
264
|
+
*/
|
|
265
|
+
journeyEngine?: JourneyEngine;
|
|
266
|
+
/**
|
|
267
|
+
* How long a data source may take to answer before it counts as failed, in milliseconds:
|
|
268
|
+
* the request ends with an error naming the source, which the renderer draws
|
|
269
|
+
* under the field and reports as `datum-error`. Absent: 15000. `0`: no limit.
|
|
270
|
+
*/
|
|
271
|
+
dataSourceTimeoutMs?: number;
|
|
272
|
+
/**
|
|
273
|
+
* What the runtime does with a rule whose formula does not parse, or a scope a rule may not
|
|
274
|
+
* take: `"fail"` (the default) refuses the definition
|
|
275
|
+
* (the constructor throws a {@link FormulaError}); `"warn"`, the explicit opt-in for preview
|
|
276
|
+
* and staging, drops the rule, says so on the console and publishes `FORMULA_INVALID`.
|
|
277
|
+
* Overrides the form's own `root.configuration.formulaErrors`; absent, the form's word, else
|
|
278
|
+
* `"fail"`. A `submit()` may say otherwise for the sandbox's run
|
|
279
|
+
* (`SubmitOptions.formulaErrors`).
|
|
280
|
+
*/
|
|
281
|
+
formulaErrors?: FormulaErrorPolicy;
|
|
282
|
+
/**
|
|
283
|
+
* What the runtime does with a regular expression of a catastrophic shape (a repeat of a repeat
|
|
284
|
+
* such as `(x+)+`, a repeated back-reference; `kernelRegexRisky`): `"refuse"` (the default)
|
|
285
|
+
* reads a literal `matches` pattern as a formula problem (`pattern.risky`, judged by
|
|
286
|
+
* `formulaErrors`) and does not run a field's `pattern` of that shape; `"allow"` runs them.
|
|
287
|
+
* What a submit tells the sandbox, which judges by the same word.
|
|
288
|
+
*/
|
|
289
|
+
riskyPatterns?: "refuse" | "allow";
|
|
290
|
+
/**
|
|
291
|
+
* The calendar day the rules read (`today()`, `age()`), as `YYYY-MM-DD`, or a function read
|
|
292
|
+
* at the top of every recompute. Absent: the day where the code runs
|
|
293
|
+
* ({@link localCalendarDate}). What the sandbox is told at submit, so a server given no day
|
|
294
|
+
* of its own judges by the browser's.
|
|
295
|
+
*/
|
|
296
|
+
today?: string | (() => string);
|
|
297
|
+
/**
|
|
298
|
+
* Formula functions beyond the plugin platform's: a host wiring functions without
|
|
299
|
+
* a platform registers them here. The platform's registry (`pluginPlatform.formulaFunctions`)
|
|
300
|
+
* is read as well; the two must not share a name.
|
|
301
|
+
*/
|
|
302
|
+
formulaFunctions?: FormulaFunctionRegistry;
|
|
303
|
+
}
|
|
304
|
+
export interface DataSourceResolutionRequest {
|
|
305
|
+
componentId: string;
|
|
306
|
+
sourcePropertyPath?: string;
|
|
307
|
+
query?: Record<string, unknown>;
|
|
308
|
+
}
|
|
309
|
+
export interface SubmitOptions {
|
|
310
|
+
/**
|
|
311
|
+
* Per-submission override of the sandbox's unknown-submitted-fields policy (see
|
|
312
|
+
* `FormRuntimeDependencies.wasmUnknownFields`). Only meaningful when a
|
|
313
|
+
* `wasmValidationHost` is configured.
|
|
314
|
+
*/
|
|
315
|
+
wasmUnknownFields?: WasmUnknownFieldsMode;
|
|
316
|
+
/** Per-submission override of what the sandbox's run log keeps (see `FormRuntimeDependencies.wasmLogLevel`). */
|
|
317
|
+
wasmLogLevel?: WasmLogLevel;
|
|
318
|
+
/** Per-submission override of the sandbox's formula policy (see `FormRuntimeDependencies.formulaErrors`). */
|
|
319
|
+
formulaErrors?: FormulaErrorPolicy;
|
|
320
|
+
/**
|
|
321
|
+
* Sign this submission with the provider of that id — what a button's
|
|
322
|
+
* `signature: "webauthn"` option asks for — whether or not the mode signs. An id no
|
|
323
|
+
* provider carries is refused as `signing.providerMissing`.
|
|
324
|
+
*/
|
|
325
|
+
signWith?: string;
|
|
326
|
+
/** Per-submission override of the signing format and statement (see `FormRuntimeDependencies.signing`). */
|
|
327
|
+
signing?: SubmissionSigningOptions;
|
|
328
|
+
/** The component that triggered the submission, handed to the signing provider. */
|
|
329
|
+
trigger?: {
|
|
330
|
+
componentId?: string;
|
|
331
|
+
};
|
|
332
|
+
/**
|
|
333
|
+
* `"skip"` leaves out the journey's check against the host's server at its end —
|
|
334
|
+
* what a download button asks, so a person offline can still keep their answers. Absent:
|
|
335
|
+
* the check runs whenever the journey asks for it.
|
|
336
|
+
*/
|
|
337
|
+
journeyEndCheck?: "skip";
|
|
338
|
+
/**
|
|
339
|
+
* The page's account of the answers the agent tools wrote, as the caller
|
|
340
|
+
* worked it out (the `<datum-form>` element; a runtime driven without one, its agent host).
|
|
341
|
+
* The runtime does not know agents: it puts a frozen copy into the `beforeSubmit` and
|
|
342
|
+
* `afterSubmit` hook contexts as `agent` and nowhere else, not the envelope, the signing
|
|
343
|
+
* request, the value transforms or a draft. Absent, the contexts carry no `agent`.
|
|
344
|
+
*/
|
|
345
|
+
agent?: AgentProvenance;
|
|
346
|
+
}
|
|
347
|
+
export interface SubmitResult {
|
|
348
|
+
accepted: boolean;
|
|
349
|
+
errors: ReturnType<ErrorStore["listAll"]>;
|
|
350
|
+
canonicalSubmission?: CanonicalSubmission;
|
|
351
|
+
signatures?: SignatureResult[];
|
|
352
|
+
/**
|
|
353
|
+
* Under the `"wrapper"` placement: the document to deliver — the envelope untouched
|
|
354
|
+
* as `payload`, the signatures beside it. Absent under `"embedded"`, where the signatures are
|
|
355
|
+
* on `canonicalSubmission` itself.
|
|
356
|
+
*/
|
|
357
|
+
signed?: SignedSubmissionDocument;
|
|
358
|
+
/**
|
|
359
|
+
* Delivery failures from post-acceptance submission handlers. Present only when a handler
|
|
360
|
+
* threw; the submission is still `accepted: true` (delivery failure does not un-accept).
|
|
361
|
+
*/
|
|
362
|
+
handlerErrors?: Array<{
|
|
363
|
+
id: string;
|
|
364
|
+
message: string;
|
|
365
|
+
}>;
|
|
366
|
+
/**
|
|
367
|
+
* The attempt's key, on an accepted submission: a version 4 UUID minted when the
|
|
368
|
+
* attempt started, the same for a second call that joined it. What the page sends beside the
|
|
369
|
+
* document in the receiving service's body, and sends again unchanged when it retries the
|
|
370
|
+
* delivery, so the service keeps one record per attempt rather than one per set of answers.
|
|
371
|
+
*/
|
|
372
|
+
submissionKey?: string;
|
|
373
|
+
}
|
|
374
|
+
/** What {@link FormRuntime.checkValues} is asked: a page to keep to, and the sandbox overrides `submit` takes. */
|
|
375
|
+
export interface CheckValuesOptions extends Pick<SubmitOptions, "wasmUnknownFields" | "wasmLogLevel" | "formulaErrors"> {
|
|
376
|
+
/**
|
|
377
|
+
* A page of the running journey: only the errors on its components are kept, as
|
|
378
|
+
* `validate({ page })` keeps them, and of the sandbox's those on no component too, bar
|
|
379
|
+
* `journey.exit` (the exit is the path's verdict, not the page's). Absent: the whole form,
|
|
380
|
+
* with an exit path refused first, as `submit` refuses it.
|
|
381
|
+
*/
|
|
382
|
+
page?: string;
|
|
383
|
+
}
|
|
384
|
+
/** What {@link FormRuntime.checkValues} found. */
|
|
385
|
+
export interface CheckValuesResult {
|
|
386
|
+
/** Whether a submit over these answers would be refused: an error that blocks was found. */
|
|
387
|
+
refused: boolean;
|
|
388
|
+
/**
|
|
389
|
+
* The errors the check that refused raised, as `submit` returns them: the pipeline's, the
|
|
390
|
+
* exit's or the sandbox's. With nothing refused, the pipeline's and the sandbox's that do not
|
|
391
|
+
* block (warnings, information).
|
|
392
|
+
*/
|
|
393
|
+
errors: FormError[];
|
|
394
|
+
/** Which check refused: the pipeline (`"validation"`), the journey's exit path, or the sandbox. Absent when nothing did. */
|
|
395
|
+
refusedBy?: "validation" | "journey" | "wasm";
|
|
396
|
+
}
|
|
397
|
+
export interface NavigationResult {
|
|
398
|
+
ok: boolean;
|
|
399
|
+
currentStepId: string | undefined;
|
|
400
|
+
reason?: string;
|
|
401
|
+
}
|
|
402
|
+
export declare class FormRuntime {
|
|
403
|
+
private readonly stateStore;
|
|
404
|
+
private readonly eventBus;
|
|
405
|
+
private hooks;
|
|
406
|
+
/** The host's pipeline, with the installed plugins' validators appended (see {@link installedPlugins}). */
|
|
407
|
+
private validationPipeline;
|
|
408
|
+
private readonly submissionModes;
|
|
409
|
+
private readonly wasmValidationHost;
|
|
410
|
+
private readonly wasmExternalDataProvider;
|
|
411
|
+
private readonly wasmPolicy;
|
|
412
|
+
private readonly wasmUnknownFields;
|
|
413
|
+
private readonly wasmLogLevel;
|
|
414
|
+
private readonly serverValidationRunner;
|
|
415
|
+
private readonly dataSources;
|
|
416
|
+
private readonly draftStore;
|
|
417
|
+
private readonly versionContext;
|
|
418
|
+
private readonly submissionVersionContext;
|
|
419
|
+
private readonly serverServicesProvider;
|
|
420
|
+
private readonly signingProvider;
|
|
421
|
+
private readonly signingProviders;
|
|
422
|
+
private readonly signingFormat;
|
|
423
|
+
private readonly signingStatement;
|
|
424
|
+
private readonly defaultSignWith;
|
|
425
|
+
private readonly componentRegistry;
|
|
426
|
+
/** The installed plugins' PDF renditions, from the platform's registry. */
|
|
427
|
+
private readonly pluginPdfRenditions;
|
|
428
|
+
private readonly draftCompatibilityPolicy;
|
|
429
|
+
private readonly pluginRegistryRef;
|
|
430
|
+
private readonly pluginPlatformRef;
|
|
431
|
+
/** The submission in flight and what it was asked, so a second call can join or be refused. */
|
|
432
|
+
private submitInFlight;
|
|
433
|
+
/**
|
|
434
|
+
* How many of the host's hooks a submission in flight is waiting on (a hook series or the
|
|
435
|
+
* transforms). A submit asked meanwhile may come from one of them, and joining would have the
|
|
436
|
+
* run wait on itself, so it is refused instead. Delivery is not counted: a double click while
|
|
437
|
+
* the handlers post is the join's very case.
|
|
438
|
+
*/
|
|
439
|
+
private submitCallbacksRunning;
|
|
440
|
+
/** Post-acceptance handlers: from `submissionHandlerRegistry` then installed plugins. */
|
|
441
|
+
private readonly submissionHandlers;
|
|
442
|
+
/** What the plugin platform installed for this runtime, when one was given. */
|
|
443
|
+
private installedPluginsResult;
|
|
444
|
+
private readonly tree;
|
|
445
|
+
private readonly orchestrator;
|
|
446
|
+
private readonly errorStore;
|
|
447
|
+
private readonly collectionRuntime;
|
|
448
|
+
/** collectionPath -> its binding metadata. */
|
|
449
|
+
private readonly collections;
|
|
450
|
+
/** Host-supplied at construction; see {@link translationCatalog}. */
|
|
451
|
+
private translationCatalogValue;
|
|
452
|
+
/** Host-supplied at construction; see {@link FormRuntimeDependencies.pdfConfiguration}. */
|
|
453
|
+
private readonly pdfConfigurationSource;
|
|
454
|
+
/** Host-supplied at construction; see {@link FormRuntimeDependencies.journeyConfiguration}. */
|
|
455
|
+
private readonly journeyConfigurationSource;
|
|
456
|
+
/** The journey machinery: the dependency, else the default engine at construction. */
|
|
457
|
+
private readonly journeyEngine;
|
|
458
|
+
/** See {@link FormRuntimeDependencies.dataSourceTimeoutMs}. */
|
|
459
|
+
private readonly dataSourceTimeoutMs;
|
|
460
|
+
/** The last configuration read and its usable journeys, so a recompute does not re-read them. */
|
|
461
|
+
private journeysRead;
|
|
462
|
+
/** The last PDF override read and its compiled copy, so a render does not compile it again. */
|
|
463
|
+
private pdfRead;
|
|
464
|
+
/** The journey's moves: the engine's, bound to this runtime once it is built. */
|
|
465
|
+
private readonly journeyNavigation;
|
|
466
|
+
/** The journey's checks against the host's server: the engine's, bound to this runtime once it is built. */
|
|
467
|
+
private readonly journeyChecks;
|
|
468
|
+
/**
|
|
469
|
+
* Each stored server error (a host's `setErrors`, a page's check, the end check) -> its
|
|
470
|
+
* field's answers when it was stored. The error stands through the page's own re-validation
|
|
471
|
+
* until the answer changes: the server said it, and only the server unsays it.
|
|
472
|
+
*/
|
|
473
|
+
private readonly serverErrorAnswers;
|
|
474
|
+
/** The form-level errors a page's check left, owned by that page: gone when the page changes. */
|
|
475
|
+
private readonly pageOwnedErrors;
|
|
476
|
+
/** Each field of a repeating section's entries -> its key within an entry, read once when needed. */
|
|
477
|
+
private rowKeys;
|
|
478
|
+
/** What the controls know that the stored values cannot say, by value path ({@link setInputState}). */
|
|
479
|
+
private readonly inputStates;
|
|
480
|
+
/**
|
|
481
|
+
* Checks of single value paths and per-field pending state: the path tokens that make an
|
|
482
|
+
* older check of a path stale, the checks still out (a submit and a journey's Continue wait
|
|
483
|
+
* for them), and `validation.pending` in the state, announced as `VALIDATION_PENDING_CHANGED`.
|
|
484
|
+
*/
|
|
485
|
+
private readonly pathRuns;
|
|
486
|
+
/** Whether a submission has begun checking the answers: every field then counts as one the person tried to go on from ({@link validatePath}). */
|
|
487
|
+
private submitAttempted;
|
|
488
|
+
/**
|
|
489
|
+
* The components a Continue (a journey page's, a steps container's scoped run) has checked:
|
|
490
|
+
* their fields count as ones the person tried to go on from, so {@link validatePath} checks
|
|
491
|
+
* them as they are committed even before an error shows.
|
|
492
|
+
*/
|
|
493
|
+
private readonly attemptedComponents;
|
|
494
|
+
/**
|
|
495
|
+
* After a journey draft is restored, the components of the pages it had already continued from
|
|
496
|
+
* (`completedPagesScope`): attempted too, as if those Continues had been pressed in this session.
|
|
497
|
+
*/
|
|
498
|
+
private attemptedOnResume;
|
|
499
|
+
/**
|
|
500
|
+
* The definition as the runtime reads it: the author's, compiled (every formula a tree, in a
|
|
501
|
+
* copy: {@link compileFormDefinition}). The author's object ({@link authored}) is never
|
|
502
|
+
* changed; a host hashes it and hands it to a server as it is.
|
|
503
|
+
*/
|
|
504
|
+
private readonly form;
|
|
505
|
+
/** The definition as the host gave it. */
|
|
506
|
+
private readonly authored;
|
|
507
|
+
/** The compile step's problems, in document order (empty under a clean definition). */
|
|
508
|
+
private readonly problems;
|
|
509
|
+
/** The policy the compile was judged by: the host's word, else the form's, else `"warn"`. */
|
|
510
|
+
private readonly formulaPolicy;
|
|
511
|
+
/** The host's own word on the policy, when it gave one: what a submit tells the sandbox. */
|
|
512
|
+
private readonly hostFormulaErrors;
|
|
513
|
+
/** The host's word on risky regular expressions (`FormRuntimeDependencies.riskyPatterns`), when it gave one. */
|
|
514
|
+
private readonly hostRiskyPatterns;
|
|
515
|
+
/** The plugin formula functions on every rule context, by name. */
|
|
516
|
+
private readonly formulaFunctionsByName;
|
|
517
|
+
/** The parser's signatures: the built-ins' plus the wired plugins'. */
|
|
518
|
+
private readonly signatures;
|
|
519
|
+
/** The day the rules read; see {@link today}. */
|
|
520
|
+
private readonly todayOf;
|
|
521
|
+
/** What `host.` reads, when the host supplied it (`deps.hostContext`, {@link setHostContext}); see {@link hostContext}. */
|
|
522
|
+
private hostContextValue;
|
|
523
|
+
constructor(definition: FormDefinition, deps: FormRuntimeDependencies);
|
|
524
|
+
/** The plugin platform's install, or the plain registry's lifecycle: hooks, handlers, validators, events. */
|
|
525
|
+
private installPlugins;
|
|
526
|
+
/**
|
|
527
|
+
* Says what the compile found, under `"warn"`: one console line per problem, and one
|
|
528
|
+
* `FORMULA_INVALID` event carrying them all. `source` names what was compiled: the
|
|
529
|
+
* definition, or a host's journey or PDF override.
|
|
530
|
+
*/
|
|
531
|
+
private reportFormulaProblems;
|
|
532
|
+
/**
|
|
533
|
+
* The calendar day the rules read (`today()`, `age()`), `YYYY-MM-DD`: the host's
|
|
534
|
+
* (`FormRuntimeDependencies.today`), else the day where the code runs. Read once per
|
|
535
|
+
* recompute by the orchestrator, and told to the sandbox at submit.
|
|
536
|
+
*/
|
|
537
|
+
today(): string;
|
|
538
|
+
/**
|
|
539
|
+
* What the rules' `host.` paths read, as the host supplied it (`FormRuntimeDependencies.hostContext`,
|
|
540
|
+
* {@link setHostContext}); `undefined` when it supplied none, and then `host.` reads nothing.
|
|
541
|
+
*/
|
|
542
|
+
hostContext(): Record<string, unknown> | undefined;
|
|
543
|
+
/**
|
|
544
|
+
* Replaces what `host.` reads and works the form out again in place: every visibility,
|
|
545
|
+
* requiredness, check, calculation and journey placement follows the new values, and the
|
|
546
|
+
* answers typed so far stay. `undefined` clears it (`host.` reads nothing). The values are the
|
|
547
|
+
* page's, for display: they travel in no submission, and a server judges with its own.
|
|
548
|
+
*/
|
|
549
|
+
setHostContext(hostContext: Record<string, unknown> | undefined): void;
|
|
550
|
+
/**
|
|
551
|
+
* The definition as the host gave it: the author's object, never changed and never a copy,
|
|
552
|
+
* so a host that hashes, stores or hands on what it gets back has exactly what it handed in
|
|
553
|
+
* (a server judges the same bytes). The runtime itself reads a compiled copy of it (every
|
|
554
|
+
* formula a tree: {@link compileFormDefinition}), which {@link formRoot}, the component tree
|
|
555
|
+
* and the journeys expose; that copy is not this.
|
|
556
|
+
*/
|
|
557
|
+
definition(): FormDefinition;
|
|
558
|
+
/** The problems the definition's compile found, in document order; empty under a clean definition. */
|
|
559
|
+
formulaProblems(): readonly FormulaProblem[];
|
|
560
|
+
/** The policy the definition's formulas were judged by (`FormRuntimeDependencies.formulaErrors`, else the form's, else `"fail"`). */
|
|
561
|
+
formulaErrorPolicy(): FormulaErrorPolicy;
|
|
562
|
+
/** The host-supplied translation catalog (`deps.translationCatalog`), if any. */
|
|
563
|
+
translationCatalog(): TranslationCatalog | undefined;
|
|
564
|
+
/**
|
|
565
|
+
* The definition's own translations (`FormDefinition.translations`), if it has any:
|
|
566
|
+
* what the renderer words every authored text from, beside {@link translationCatalog}.
|
|
567
|
+
*/
|
|
568
|
+
translations(): FormTranslations | undefined;
|
|
569
|
+
/** The form's own `localization` block (default and supported locales), if it declares one. */
|
|
570
|
+
localization(): LocalizationConfiguration | undefined;
|
|
571
|
+
/** The form's own `accessibility` block (whether the first error takes focus), if it declares one. */
|
|
572
|
+
accessibility(): AccessibilityConfiguration | undefined;
|
|
573
|
+
/**
|
|
574
|
+
* The form's own `pdf` block — its PDF layouts — if it declares one, or the
|
|
575
|
+
* host's override, compiled (every layout condition and expression source a tree, in a copy
|
|
576
|
+
* read once per override object; its problems reported under the runtime's policy, never
|
|
577
|
+
* refused: an override is a preview).
|
|
578
|
+
*/
|
|
579
|
+
pdfConfiguration(): PdfConfiguration | undefined;
|
|
580
|
+
/**
|
|
581
|
+
* The form's journeys block: the host's override when it gave one
|
|
582
|
+
* ({@link FormRuntimeDependencies.journeyConfiguration}), else the definition's own.
|
|
583
|
+
*/
|
|
584
|
+
journeyConfiguration(): JourneyConfiguration | undefined;
|
|
585
|
+
/**
|
|
586
|
+
* The form's usable journeys, in order. A host's override
|
|
587
|
+
* ({@link FormRuntimeDependencies.journeyConfiguration}) is compiled first, once per
|
|
588
|
+
* configuration object (every page and route condition, every worked-out value a tree, in a
|
|
589
|
+
* copy); its problems are reported under the runtime's policy, never refused, since an
|
|
590
|
+
* override is a preview. The definition's own journeys were compiled with the definition.
|
|
591
|
+
*/
|
|
592
|
+
journeys(): Journey[];
|
|
593
|
+
/** The definition's id, which names a submission file and a PDF. */
|
|
594
|
+
formId(): string;
|
|
595
|
+
/**
|
|
596
|
+
* Where a PDF's rendition lookup looks beyond the engine's built-ins: the
|
|
597
|
+
* registry the component definitions live in, for the renditions a definition declares
|
|
598
|
+
* (`ComponentDefinition.pdf`), and the installed plugins' contributions
|
|
599
|
+
* (`FormPlugin.pdfRenditions`). `renderFormPdf` builds its resolver from these when the
|
|
600
|
+
* host hands it none.
|
|
601
|
+
*/
|
|
602
|
+
pdfRenditionSources(): {
|
|
603
|
+
components?: ComponentRegistry | undefined;
|
|
604
|
+
renditions?: PdfRenditionRegistry | undefined;
|
|
605
|
+
};
|
|
606
|
+
/**
|
|
607
|
+
* The component definitions the runtime was built with (the latest of each type in its
|
|
608
|
+
* registry; none without one): what a form element draws a host's or a plugin's own types with
|
|
609
|
+
* (`ComponentDefinition.adapter`). The same array until the runtime is rebuilt.
|
|
610
|
+
*/
|
|
611
|
+
componentDefinitions(): readonly ComponentDefinition[];
|
|
612
|
+
private componentDefinitionsList;
|
|
613
|
+
/**
|
|
614
|
+
* What the plugin platform installed for this runtime — the ids installed, initialized
|
|
615
|
+
* and rejected, and the merged contributions (hooks, submission handlers, validators, the
|
|
616
|
+
* sandbox modules a host wires into its WASM validation host) — or `undefined` when the
|
|
617
|
+
* runtime was built without a platform.
|
|
618
|
+
*/
|
|
619
|
+
installedPlugins(): PluginPlatformResult | undefined;
|
|
620
|
+
state(): FormState;
|
|
621
|
+
errors(): FormError[];
|
|
622
|
+
/** Per-container `{ own, descendants }` error counts from the last validation. */
|
|
623
|
+
containerErrorCounts(): Map<string, import("../../validation/core/error-store.js").ContainerErrorCount>;
|
|
624
|
+
/** Error summary (count + component ids) for a wizard step / tab subtree. */
|
|
625
|
+
stepErrorSummary(stepId: string): import("../../validation/core/error-store.js").StepErrorSummary;
|
|
626
|
+
events(): EventBus;
|
|
627
|
+
/**
|
|
628
|
+
* Effective semantic state for a component from the latest recompute — a form component's
|
|
629
|
+
* from the fold, or, while a presentation runs, one of its own nodes' from the
|
|
630
|
+
* overlay: an alias and a worked-out value's copy take the form field's state, any other own
|
|
631
|
+
* node its own rules' on a page the path takes.
|
|
632
|
+
*/
|
|
633
|
+
effectiveState(componentId: string): EffectiveNodeState | undefined;
|
|
634
|
+
/**
|
|
635
|
+
* Whether a component is required as of the last recompute: its
|
|
636
|
+
* `configuration.required`, OR its `rules.requiredWhen` holding over the submittable view —
|
|
637
|
+
* the rule adds to the tick, never removes it. Before the hidden-required policy: a hidden
|
|
638
|
+
* field can be required here and still not held to it (`effectiveState`'s `requiredApplies`).
|
|
639
|
+
* A field that is only ticked, with no rule, is not required.
|
|
640
|
+
*/
|
|
641
|
+
isRequired(componentId: string): boolean;
|
|
642
|
+
/**
|
|
643
|
+
* Effective semantic state for every component from the last recompute (for renderers): the
|
|
644
|
+
* form's components in document order, then — while a presentation runs — its own
|
|
645
|
+
* nodes and reference placeholders in the presentation's order.
|
|
646
|
+
*/
|
|
647
|
+
effectiveStatesMap(): ReadonlyMap<string, EffectiveNodeState>;
|
|
648
|
+
/**
|
|
649
|
+
* The answers as a submission would carry them, keyed by value path, from the last recompute:
|
|
650
|
+
* the shared fold's submittable view — journey placement and the hidden-value
|
|
651
|
+
* policy applied, calculations included, each answer as its JSON carries it (a calculation's
|
|
652
|
+
* `NaN` as `null`; a cleared answer holds `undefined`, which JSON leaves out). What a PDF
|
|
653
|
+
* layout's `when` reads; a server reads the same answers from the submission it
|
|
654
|
+
* judged. A copy.
|
|
655
|
+
*/
|
|
656
|
+
submittableValues(): Record<string, unknown>;
|
|
657
|
+
/**
|
|
658
|
+
* The answers as stored, keyed by value path, without the ones a presentation's own fields
|
|
659
|
+
* hold: every key of `state().values` but those that start with `@` and that the
|
|
660
|
+
* form does not define. What anything that leaves the browser, or is handed to host code that
|
|
661
|
+
* may send it on, is built from; the hidden-value policy is not applied
|
|
662
|
+
* ({@link submittableValues} applies it). A copy.
|
|
663
|
+
*/
|
|
664
|
+
formValues(): Record<string, unknown>;
|
|
665
|
+
/**
|
|
666
|
+
* The answers as stored, form values only, with the hidden-value policy applied: a hidden
|
|
667
|
+
* answer left out of the submission is not here, a cleared one holds `undefined`, a retained
|
|
668
|
+
* one is as typed. Keyed by value path like {@link formValues}, an empty row's keys kept. What
|
|
669
|
+
* a PDF and a printed copy are made from, so neither shows an answer the submission leaves out
|
|
670
|
+
* (the server prints the submission it judged). A copy; the state keeps every answer.
|
|
671
|
+
*/
|
|
672
|
+
printableValues(): Record<string, unknown>;
|
|
673
|
+
/**
|
|
674
|
+
* The running presentation's own answers, keyed by own field id: what its fields
|
|
675
|
+
* that fill no form field hold, as stored under `@<presentation id>.<id>`. They stay in the
|
|
676
|
+
* browser — kept in drafts, never submitted — so a host that wants one reads it here. A field
|
|
677
|
+
* left unanswered is absent; an alias is not listed (its answer is the form field's); `{}`
|
|
678
|
+
* when no presentation runs or it owns no such field.
|
|
679
|
+
*/
|
|
680
|
+
presentationValues(): Record<string, unknown>;
|
|
681
|
+
/**
|
|
682
|
+
* The index of the running journey's own nodes — its aliases, worked-out values,
|
|
683
|
+
* reference placeholders and where each node stands — or `undefined` when no journey runs or
|
|
684
|
+
* the journey holds component ids alone. Read-only: the runtime's own copy.
|
|
685
|
+
*/
|
|
686
|
+
presentationIndex(): PresentationIndex | undefined;
|
|
687
|
+
/**
|
|
688
|
+
* Where the answer of a node the running presentation owns is stored: an alias
|
|
689
|
+
* and a worked-out value's copy at the value path of the form field they fill or show, any
|
|
690
|
+
* other own node at `@<presentation id>.<id>`. `undefined` for a reference's placeholder, for
|
|
691
|
+
* a form component, and when no presentation runs.
|
|
692
|
+
*/
|
|
693
|
+
presentationValuePathOf(id: string): string | undefined;
|
|
694
|
+
/**
|
|
695
|
+
* What a live journey page is drawn from while the journey holds nodes of its own:
|
|
696
|
+
* the form's root with one more slot, the last
|
|
697
|
+
* (`PRESENTATION_SLOT`, `"@presentation"`), holding the data-scoping container
|
|
698
|
+
* `@<presentation id>` with the presentation's usable own entries — so a tree's own path
|
|
699
|
+
* builder gives every own field `@<presentation id>.<id>`. In it a worked-out value is a
|
|
700
|
+
* read-only copy of the form field it sets (that field's type and configuration under the
|
|
701
|
+
* node's own label, `configuration.presentation = { kind: "worked-out", to }`), and a
|
|
702
|
+
* reference inside an own layout is a placeholder (`type: "journey-field"`,
|
|
703
|
+
* `configuration.componentId`, id `@<presentation id>/ref-<n>`) for the renderer to replace
|
|
704
|
+
* with the form component it names. `tree` is a `ComponentTree` over `root`.
|
|
705
|
+
*
|
|
706
|
+
* `undefined` when no journey runs, or the running one lists component ids alone. For the
|
|
707
|
+
* page being filled in only: a review, a printed copy and a PDF draw {@link formRoot}.
|
|
708
|
+
*/
|
|
709
|
+
journeyRenderRoot(): {
|
|
710
|
+
root: ComponentNode;
|
|
711
|
+
tree: ComponentTree;
|
|
712
|
+
} | undefined;
|
|
713
|
+
/**
|
|
714
|
+
* {@link isRequired} for every component but the root, in document order, from the last
|
|
715
|
+
* recompute: `required` OR `requiredWhen`, before the hidden-required policy. What
|
|
716
|
+
* the renderer's required marker reads (`runtime-render-bridge.ts`). While a presentation
|
|
717
|
+
* runs its own nodes follow the form's: an own field by its own Required or
|
|
718
|
+
* Required-when, an alias by its own or the form field's, a worked-out value's copy by the
|
|
719
|
+
* form field's.
|
|
720
|
+
*/
|
|
721
|
+
requiredMap(): ReadonlyMap<string, boolean>;
|
|
722
|
+
/**
|
|
723
|
+
* The components whose Validate rule (`rules.validWhen`) does not hold over the
|
|
724
|
+
* answers, id -> `true`, from the last recompute: the field-constraints stage's
|
|
725
|
+
* `invalidComponents`, the browser-only twin of {@link requiredMap}. Builder Try it reads it
|
|
726
|
+
* for every kind of session, so a failing rule is flagged the same way in a mode's runtime.
|
|
727
|
+
*/
|
|
728
|
+
invalidMap(): Record<string, boolean>;
|
|
729
|
+
/**
|
|
730
|
+
* Each data grid's row-count bounds from the last recompute, grid id ->
|
|
731
|
+
* `{ minRows, maxRows }`: the fixed bounds of its configuration with its `rules.minRows` /
|
|
732
|
+
* `rules.maxRows` laid over them where they came to a whole number. What the renderer
|
|
733
|
+
* disables Add and Remove at, what {@link addRow} refuses to go past, and what the
|
|
734
|
+
* field-constraints stage counts the rows against (`dataGridRowBounds`).
|
|
735
|
+
*/
|
|
736
|
+
dataGridRowBounds(): Record<string, {
|
|
737
|
+
minRows: number;
|
|
738
|
+
maxRows: number | undefined;
|
|
739
|
+
}>;
|
|
740
|
+
/** The runtime's component tree (read model for renderers / error navigation). */
|
|
741
|
+
componentTree(): ComponentTree;
|
|
742
|
+
/**
|
|
743
|
+
* The canonical form root node as the runtime reads it: the compiled copy's root, the same
|
|
744
|
+
* object the component tree, the effective states and the journeys' ownership are built
|
|
745
|
+
* from, so a renderer or a host that walks it and looks nodes up again finds the ones the
|
|
746
|
+
* runtime holds ({@link componentTree}). Its `configuration` objects are the author's own
|
|
747
|
+
* (the compile shares them and copies only `rules` and the children lists). The author's
|
|
748
|
+
* root, for hashing or handing on, is {@link definition}'s.
|
|
749
|
+
*/
|
|
750
|
+
formRoot(): ComponentNode;
|
|
751
|
+
/** Wizard step component ids in document order. */
|
|
752
|
+
wizardSteps(): string[];
|
|
753
|
+
private recompute;
|
|
754
|
+
private registerCollections;
|
|
755
|
+
/**
|
|
756
|
+
* Opens every data grid with its starting rows (`initialRows`) when the answers
|
|
757
|
+
* hold none of its entries: empty rows, each holding a key per field so the row is counted
|
|
758
|
+
* and checked as one (see {@link writeEntryKeys}). Not marked dirty: nobody typed anything.
|
|
759
|
+
*/
|
|
760
|
+
private seedInitialRows;
|
|
761
|
+
/** A row with every field of the collection's entries present and unanswered. */
|
|
762
|
+
private emptyRow;
|
|
763
|
+
/**
|
|
764
|
+
* Gives every entry of a collection a key for each of its fields, `undefined` where it holds
|
|
765
|
+
* no answer: an empty row is then a row to everything that reads the answers by
|
|
766
|
+
* key — the renderer's row count, the field constraints' per-entry checks and row count, the
|
|
767
|
+
* per-row calculations — as it is to the kernel, which is sent the row whole
|
|
768
|
+
* ({@link withRowsWhole}). An undefined answer is left out of everything that crosses JSON.
|
|
769
|
+
*/
|
|
770
|
+
private writeEntryKeys;
|
|
771
|
+
/**
|
|
772
|
+
* Seeds the collection runtime from the entries the answers hold (a draft put back):
|
|
773
|
+
* each collection's rows rebuilt from its `collection[i].field` keys, then a grid with none
|
|
774
|
+
* opened with its starting rows again.
|
|
775
|
+
*/
|
|
776
|
+
private reseedCollections;
|
|
777
|
+
/**
|
|
778
|
+
* A collection's rows as the answers hold them: one object per entry the
|
|
779
|
+
* collection runtime counts, each with a key per field of the entry and every
|
|
780
|
+
* `collection[i].field` answer the state holds for it — the per-row calculations' values
|
|
781
|
+
* included, which the orchestrator writes into the state alone. What {@link rows} and the
|
|
782
|
+
* settled change after a row operation report.
|
|
783
|
+
*/
|
|
784
|
+
private rowsFromState;
|
|
785
|
+
/**
|
|
786
|
+
* One row posted whole, read as the runtime keys an entry: a plain object under a
|
|
787
|
+
* key that leads on to fields of the entry (a data-scoping container, `address: { city }`)
|
|
788
|
+
* is read a level further (`address.city`), anything else is the answer, as the kernel reads
|
|
789
|
+
* rows posted whole (`kernelFlattenRows`).
|
|
790
|
+
*/
|
|
791
|
+
private flattenRow;
|
|
792
|
+
/**
|
|
793
|
+
* A collection's rows written whole at its path (`setValues({ items: [{ sku: "A" }, {}] })`,
|
|
794
|
+
* a prefill or a host's record): they become its entries — in the collection
|
|
795
|
+
* runtime and as the state's `items[i].…` keys, a key per field of every row — and no answer
|
|
796
|
+
* is kept at the bare path, so the form draws, checks and posts them as rows.
|
|
797
|
+
*/
|
|
798
|
+
private replaceRows;
|
|
799
|
+
/**
|
|
800
|
+
* Answers about to be put in wholesale (a draft) with every collection's rows posted whole
|
|
801
|
+
* (`items: [...]`) read as the entries' keys, as {@link replaceRows} reads them; a
|
|
802
|
+
* list beside flat keys of its own is dropped, the flat keys winning as in the kernel.
|
|
803
|
+
*/
|
|
804
|
+
private withRowListsAsKeys;
|
|
805
|
+
/**
|
|
806
|
+
* The answers as sent to a server, every collection's entries posted as one list at its path:
|
|
807
|
+
* `items: [{ sku: "A" }, {}]` in place of its `items[i].…` keys, an
|
|
808
|
+
* empty row as `{}` and no row as `[]`, so the sandbox kernel reads every row the person saw
|
|
809
|
+
* and counts what the browser drew. `drawn` is the answers as stored with the hidden-value
|
|
810
|
+
* policy applied: the rows the person saw, which `values` (the sandbox's sanitized answers,
|
|
811
|
+
* a transform's) may hold no key for when a row is empty. A collection that does not submit
|
|
812
|
+
* (hidden and excluded, or cleared) is posted only if `values` still holds an answer of it,
|
|
813
|
+
* and then as a list too. Flat entry keys are never posted; a form without a collection gets
|
|
814
|
+
* `values` back as it is.
|
|
815
|
+
*/
|
|
816
|
+
private withRowsWhole;
|
|
817
|
+
/**
|
|
818
|
+
* The rows the person saw: the answers as stored, form values only, with
|
|
819
|
+
* the hidden-value policy applied. Read once per submission, for the sandbox's context, a
|
|
820
|
+
* server check and the envelope alike.
|
|
821
|
+
*/
|
|
822
|
+
private drawnRowsView;
|
|
823
|
+
/** How many entries of a collection the answers hold a key for (an empty row's keys included). */
|
|
824
|
+
private drawnEntryCount;
|
|
825
|
+
private syncCollectionValuesToState;
|
|
826
|
+
private publishCollectionChanged;
|
|
827
|
+
/**
|
|
828
|
+
* A row added, removed or moved is a settled change of the collection's value: a final write at the collection path, published once the recompute after it has
|
|
829
|
+
* worked out the rows' calculations, so a host listening for changes hears it once, with the
|
|
830
|
+
* answers as they now stand.
|
|
831
|
+
*/
|
|
832
|
+
private publishCollectionValue;
|
|
833
|
+
private requireCollection;
|
|
834
|
+
/**
|
|
835
|
+
* Current row values for a registered collection, as the answers hold them: each row's
|
|
836
|
+
* calculated values included.
|
|
837
|
+
*/
|
|
838
|
+
rows(collectionPath: string): Record<string, unknown>[];
|
|
839
|
+
/**
|
|
840
|
+
* Refuses `adding` rows past the most a collection may hold, as the Add button is
|
|
841
|
+
* disabled there: a data grid's maximum as of the last recompute (its formula's, else its
|
|
842
|
+
* fixed one), else the cap every collection is drawn to.
|
|
843
|
+
*/
|
|
844
|
+
private assertRowRoom;
|
|
845
|
+
/**
|
|
846
|
+
* The stable keys of a collection's rows, in row order: one per entry, kept while the entry
|
|
847
|
+
* is moved or the rows around it are added or removed, new for every entry of a draft or a
|
|
848
|
+
* whole list put in. An identity for a renderer to key its row elements by; never part of
|
|
849
|
+
* the answers or of any value that crosses JSON.
|
|
850
|
+
*/
|
|
851
|
+
entryKeys(collectionPath: string): readonly string[];
|
|
852
|
+
/** {@link entryKeys} of every registered collection, by collection path (what the render model is built with). */
|
|
853
|
+
entryKeysByCollection(): ReadonlyMap<string, readonly string[]>;
|
|
854
|
+
rowContext(collectionPath: string, rowIndex: number): import("../../core/schema/collection.js").RowContext;
|
|
855
|
+
/**
|
|
856
|
+
* Appends a row; honours `operations.add`. Returns the new row index. Throws a
|
|
857
|
+
* {@link NonScalarAnswerError} for a cell that is not a scalar in a field that holds one value,
|
|
858
|
+
* as a write of that cell would, before the row is added.
|
|
859
|
+
*/
|
|
860
|
+
addRow(collectionPath: string, row?: Record<string, unknown>): number;
|
|
861
|
+
/**
|
|
862
|
+
* Appends several rows like as many {@link addRow} calls, syncing the answers, publishing
|
|
863
|
+
* the change and recomputing once for all of them: an import of hundreds of rows would
|
|
864
|
+
* otherwise fold the whole form once per row. Returns the new rows' indices. A row with a cell
|
|
865
|
+
* {@link addRow} refuses refuses the whole call, before any row is added.
|
|
866
|
+
*/
|
|
867
|
+
addRows(collectionPath: string, rows: ReadonlyArray<Record<string, unknown>>): number[];
|
|
868
|
+
removeRow(collectionPath: string, rowIndex: number): void;
|
|
869
|
+
reorderRow(collectionPath: string, fromIndex: number, toIndex: number): void;
|
|
870
|
+
resolveDataSource(request: DataSourceResolutionRequest): Promise<DataSourceResult | undefined>;
|
|
871
|
+
/**
|
|
872
|
+
* The snapshot the sandbox holds source-backed choice answers to: each data
|
|
873
|
+
* source a choice of the form names, loaded now with no query (the whole list, not a filtered
|
|
874
|
+
* one) over the same timeout the renderer used. A source that is not wired, throws, times out,
|
|
875
|
+
* or answers something other than a list is absent from the snapshot, which the kernel reads
|
|
876
|
+
* as "unavailable" and refuses the answers that pick from it. `undefined` when the form names
|
|
877
|
+
* no source.
|
|
878
|
+
*/
|
|
879
|
+
private resolveOptionSnapshot;
|
|
880
|
+
/** One source item for the sandbox's snapshot: texts resolved for `locale`, anything else as given. */
|
|
881
|
+
private snapshotItem;
|
|
882
|
+
/** `pending`, or a rejection once the data source timeout has passed; the timer never outlives the answer. */
|
|
883
|
+
private withinDataSourceTimeout;
|
|
884
|
+
/**
|
|
885
|
+
* Writes a value and publishes `COMPONENT_CHANGED`. `interim` marks a write from a control
|
|
886
|
+
* still being edited — a keystroke — so a host reporting changes can wait for the
|
|
887
|
+
* `COMPONENT_COMMITTED` that `commitValue` publishes once the control is left.
|
|
888
|
+
* The store, the rules and the repaint see every write either way.
|
|
889
|
+
*
|
|
890
|
+
* A write of the answer already stored changes nothing, so it publishes nothing and
|
|
891
|
+
* recomputes nothing: a listener that writes back a normalised value (trimmed, upper-cased)
|
|
892
|
+
* hears its own write once and stops there, where an event for every write would call it
|
|
893
|
+
* again for ever. Throws a {@link NonScalarAnswerError} for a value that is not a scalar in a
|
|
894
|
+
* field that holds one value, before anything is written.
|
|
895
|
+
*/
|
|
896
|
+
setValue(path: string, value: unknown, options?: SetValueOptions): void;
|
|
897
|
+
/**
|
|
898
|
+
* Writes several answers like as many {@link setValue} calls, with one recompute at the end
|
|
899
|
+
* instead of one per answer: a host prefilling a large record would otherwise fold the whole
|
|
900
|
+
* form once per key. A write that throws (a {@link NonScalarAnswerError} among them) is
|
|
901
|
+
* skipped and handed back (its path and the error) with the rest still written. An answer
|
|
902
|
+
* already stored is neither written again nor reported.
|
|
903
|
+
*/
|
|
904
|
+
setValues(values: Record<string, unknown>): Array<{
|
|
905
|
+
path: string;
|
|
906
|
+
error: unknown;
|
|
907
|
+
}>;
|
|
908
|
+
/** Writes one answer (or a collection's rows whole) and publishes it; `false` when it was already stored, and nothing happened. */
|
|
909
|
+
private writeValue;
|
|
910
|
+
/**
|
|
911
|
+
* Whether `value` is the answer already stored at `key`, so writing it would change nothing.
|
|
912
|
+
* Never while the control there says something its stored answer cannot: a write
|
|
913
|
+
* then replaces what the control said, though the answer stays the same.
|
|
914
|
+
*/
|
|
915
|
+
private answerStored;
|
|
916
|
+
/**
|
|
917
|
+
* Whether `rows` are the rows the collection already holds, cell for cell as the runtime keys
|
|
918
|
+
* them (the per-row calculations' values included), so writing them whole would change
|
|
919
|
+
* nothing. Never while a control in the rows says something its stored answer cannot,
|
|
920
|
+
* nor while the answers hold an entry the collection does not count, which the
|
|
921
|
+
* write would clear.
|
|
922
|
+
*/
|
|
923
|
+
private rowsStored;
|
|
924
|
+
/**
|
|
925
|
+
* Refuses, before anything is written, a row whose cell is not a scalar in a field that holds
|
|
926
|
+
* one value, naming the cell by the index the row will take (`first` for the first of `rows`).
|
|
927
|
+
*/
|
|
928
|
+
private assertScalarCells;
|
|
929
|
+
/** Each collection path -> its row fields (`sku`, `address.city`) -> the field's component. */
|
|
930
|
+
private rowFieldNodes;
|
|
931
|
+
/**
|
|
932
|
+
* The component of a field that holds one value whose answer is stored at `key` — a field of
|
|
933
|
+
* the form, or a field of a collection's entry (`items[0].sku`) — or `undefined` for any other
|
|
934
|
+
* key (a checkbox group, a file field, a plugin's type, a host's extra).
|
|
935
|
+
*/
|
|
936
|
+
private singleValueFieldAt;
|
|
937
|
+
/** The failure a non-scalar answer for a single-valued field is, or `undefined` when `value` may be stored at `key`. */
|
|
938
|
+
private nonScalarAnswer;
|
|
939
|
+
private assertScalarAnswer;
|
|
940
|
+
/** One answer written at its key, mirrored into its collection when it is an entry's field. */
|
|
941
|
+
private writeOne;
|
|
942
|
+
/**
|
|
943
|
+
* Reports that the control editing `path` has been left, publishing `COMPONENT_COMMITTED`
|
|
944
|
+
* with the value it holds. Writes nothing and recomputes nothing: the interim
|
|
945
|
+
* `setValue` calls before it already did.
|
|
946
|
+
*/
|
|
947
|
+
commitValue(path: string): void;
|
|
948
|
+
/**
|
|
949
|
+
* Records what the control at the value path `path` knows that its stored answer cannot say
|
|
950
|
+
* — a date typed in part (`incomplete`, with the parts still empty) or a number
|
|
951
|
+
* box holding text the browser could not read (`badInput`) — or forgets it (`undefined`).
|
|
952
|
+
* The renderer calls it right after it writes the empty answer such a control stores. The
|
|
953
|
+
* next validation raises `dateIncomplete` or `number` for that empty answer in place of
|
|
954
|
+
* `required`. Client-only: never in a draft, the envelope or a server check. Forgotten when
|
|
955
|
+
* any answer is written to the path, empty included (so a host's write replaces what the
|
|
956
|
+
* control said), when a draft is loaded, and when a journey is left or another started.
|
|
957
|
+
* Writes nothing and publishes nothing.
|
|
958
|
+
*/
|
|
959
|
+
setInputState(path: string, state: FieldInputState | undefined): void;
|
|
960
|
+
/** What {@link setInputState} last recorded for the value path `path`, if it still holds. */
|
|
961
|
+
inputState(path: string): FieldInputState | undefined;
|
|
962
|
+
/**
|
|
963
|
+
* Composes a date answer from the boxes it is typed into (year, month, day) and writes it.
|
|
964
|
+
* All-or-nothing: with every part present the answer is `YYYY-MM-DD` (year padded to four
|
|
965
|
+
* digits, month and day to two); with any part missing it is the empty string, so an
|
|
966
|
+
* incomplete date stores nothing a half-typed value could fail on. The month may be a name
|
|
967
|
+
* in the form's language or English ("Feb", "February", {@link readTypedMonth}) and is
|
|
968
|
+
* stored as its number; a name that cannot be read is kept as typed, for validation to call
|
|
969
|
+
* not a real date. The answer is written only when it differs from the one stored, so a
|
|
970
|
+
* keystroke that changes nothing the store holds does not repaint.
|
|
971
|
+
*
|
|
972
|
+
* After the write, which forgets what the control said, a date typed in part
|
|
973
|
+
* records which parts are still empty ({@link setInputState} `incomplete`), so validation
|
|
974
|
+
* names them; whole, or empty again, it records nothing. Returns the composed answer.
|
|
975
|
+
* `options` go to the write ({@link setValue}).
|
|
976
|
+
*/
|
|
977
|
+
setDateParts(path: string, parts: {
|
|
978
|
+
readonly year?: string | undefined;
|
|
979
|
+
readonly month?: string | undefined;
|
|
980
|
+
readonly day?: string | undefined;
|
|
981
|
+
}, options?: SetValueOptions): string;
|
|
982
|
+
/** Counts the locale-switch re-validations; a run holding an older number is stale. */
|
|
983
|
+
private revalidationRun;
|
|
984
|
+
setLocale(locale: string): void;
|
|
985
|
+
/**
|
|
986
|
+
* After a locale switch, validation runs again for the fields already showing errors, so a
|
|
987
|
+
* message a custom or plugin validator worded in the old locale is worded afresh. Untouched
|
|
988
|
+
* fields stay untouched. Fire-and-forget: the switch itself is synchronous.
|
|
989
|
+
*/
|
|
990
|
+
private revalidateShownErrors;
|
|
991
|
+
/**
|
|
992
|
+
* Puts a stored draft's answers, place and journey back into the form. Before anything
|
|
993
|
+
* changes it throws a {@link DraftError}: `draft.formMismatch` for a draft of another form,
|
|
994
|
+
* `draft.incompatible` for a version the compatibility policy refuses, `draft.malformed` for
|
|
995
|
+
* one with no answers to give (a caller branches on the code, never on the
|
|
996
|
+
* message).
|
|
997
|
+
*
|
|
998
|
+
* An answer `setValue` would refuse (a {@link NonScalarAnswerError}: an object or a list for
|
|
999
|
+
* a field that holds one value) is left out and the rest restored: it resolves with each
|
|
1000
|
+
* one dropped, and `DRAFT_LOADED` names their paths as `dropped`.
|
|
1001
|
+
*/
|
|
1002
|
+
hydrateFromDraft(draft: FormDraft): Promise<DraftRestoreResult>;
|
|
1003
|
+
/**
|
|
1004
|
+
* Builds a draft from the current state and persists it through the configured
|
|
1005
|
+
* {@link DraftStore}. Requires `draftStore` and `versionContext` dependencies.
|
|
1006
|
+
*/
|
|
1007
|
+
saveDraft(draftId?: string): Promise<FormDraftSummary>;
|
|
1008
|
+
private static readonly STEP_TYPES;
|
|
1009
|
+
private wizardStepIds;
|
|
1010
|
+
canNavigate(toStepId: string): boolean;
|
|
1011
|
+
/**
|
|
1012
|
+
* Navigates the wizard to `toStepId`. Runs `beforeNavigation` hooks (which may throw to
|
|
1013
|
+
* veto), moves the current step, recomputes, and emits `NAVIGATION_*` events.
|
|
1014
|
+
*/
|
|
1015
|
+
navigate(toStepId: string): Promise<NavigationResult>;
|
|
1016
|
+
next(): Promise<NavigationResult>;
|
|
1017
|
+
back(): Promise<NavigationResult>;
|
|
1018
|
+
private step;
|
|
1019
|
+
/**
|
|
1020
|
+
* Validates the form. With `scope`, only the errors on that component and its
|
|
1021
|
+
* descendants are kept — what a multi-step form's Continue button asks before it advances:
|
|
1022
|
+
* the step in front of the person, not the ones still to come. The stored errors are
|
|
1023
|
+
* replaced either way, so a scoped run clears what an earlier run found elsewhere; the
|
|
1024
|
+
* submit runs unscoped and finds it again.
|
|
1025
|
+
*
|
|
1026
|
+
* With `page`, only the errors on the components of that page of the running
|
|
1027
|
+
* journey are kept, and they replace only that page's: what Continue on a journey page
|
|
1028
|
+
* asks, leaving the errors other pages hold where they are. An error the host's server
|
|
1029
|
+
* reported on one of the page's answers stays until that answer changes: the page's own
|
|
1030
|
+
* validation cannot unsay the server. `page` wins over `scope`.
|
|
1031
|
+
*/
|
|
1032
|
+
validate(options?: {
|
|
1033
|
+
scope?: string;
|
|
1034
|
+
page?: string;
|
|
1035
|
+
}): Promise<ReturnType<ErrorStore["listAll"]>>;
|
|
1036
|
+
/**
|
|
1037
|
+
* One validation run: the whole pipeline over the current answers, the hidden-validation
|
|
1038
|
+
* and hidden-required policy applied, then — with `keep` — narrowed to the components it
|
|
1039
|
+
* accepts. The result replaces the stored errors, or with `within` only those on its
|
|
1040
|
+
* components, bar the ones a server reported on answers not changed since.
|
|
1041
|
+
*
|
|
1042
|
+
* With `foldCheck` (a whole-form run, a journey page's), a fold that did not settle adds one
|
|
1043
|
+
* blocking form-level `fold.unsettled`: with no one submittable view there is
|
|
1044
|
+
* nothing to judge the answers by, and the kernel, handed the last pass's view, may well
|
|
1045
|
+
* settle somewhere else — so a submit refuses before the sandbox and the envelope, and
|
|
1046
|
+
* Continue refuses on every page. A steps container's scoped run is left as it was.
|
|
1047
|
+
*/
|
|
1048
|
+
private runValidation;
|
|
1049
|
+
/** `VALIDATION_FAILED` for a run that threw after its `VALIDATION_STARTED`. */
|
|
1050
|
+
private publishValidationFailed;
|
|
1051
|
+
private runValidationOnce;
|
|
1052
|
+
/** The context a validation run hands its stages and hooks: the answers as they stand in `state`. */
|
|
1053
|
+
private validationContext;
|
|
1054
|
+
/**
|
|
1055
|
+
* What one validation run finds, before anything is stored: the pipeline over `context`, the
|
|
1056
|
+
* running presentation's own fields, the hidden-validation / hidden-required policy, `keep`,
|
|
1057
|
+
* and with `foldCheck` the form-level errors of a fold, a rule or a mapping that did not
|
|
1058
|
+
* settle. Writes nothing and fires nothing: `runValidation` stores and announces it,
|
|
1059
|
+
* `checkValues` only reports it.
|
|
1060
|
+
*/
|
|
1061
|
+
private validationErrors;
|
|
1062
|
+
/** The data grids' bounds as a context's `dataGridRowBounds`, or nothing on a form without a grid. */
|
|
1063
|
+
private gridBoundsContext;
|
|
1064
|
+
/** The recorded input states as a context's `inputStates`, or nothing when there are none. */
|
|
1065
|
+
private inputStatesContext;
|
|
1066
|
+
/** The value paths an async validation stage is judging right now (`state().validation.pending`), as a copy. */
|
|
1067
|
+
pendingPaths(): ReadonlySet<string>;
|
|
1068
|
+
/**
|
|
1069
|
+
* One check of the value path `path` under the path's token — what a check of one field as it
|
|
1070
|
+
* is left runs on: the current answers recomputed, the pipeline's `runFor` over them with the
|
|
1071
|
+
* run's abort `signal` in the context, the path pending while an async stage declaring it runs.
|
|
1072
|
+
* A newer check of the same path makes this one stale: its signal aborts, and `commit` is never
|
|
1073
|
+
* called. Otherwise `commit` is handed the pipeline's result, the state it judged and the
|
|
1074
|
+
* context, synchronously, while the run still holds the token; writing the errors is the
|
|
1075
|
+
* commit's. The check stays in flight until it settles, so `submit()` and a journey's
|
|
1076
|
+
* Continue wait for it. With `ownFields` (a path of the running presentation's own fields)
|
|
1077
|
+
* the presentation's own-field errors are judged too, apart from the pipeline, as a
|
|
1078
|
+
* whole-form run does; they come back as `own`.
|
|
1079
|
+
*
|
|
1080
|
+
* Answers written some other way while the check runs (a host's or an agent's `setValue`, a
|
|
1081
|
+
* row removed or moved) take no token, so the check is also dropped — `commit` not called —
|
|
1082
|
+
* when the answer at the path, or for a collection's entry the entry at that index, is no
|
|
1083
|
+
* longer the one it judged: its verdict is about an answer that is not there any more.
|
|
1084
|
+
*/
|
|
1085
|
+
private checkPath;
|
|
1086
|
+
/**
|
|
1087
|
+
* The entries a value path lies in, as `collection#entry key`: `items[1].sku` names
|
|
1088
|
+
* whichever entry is second now, and its key tells it apart from the one that moved up into its
|
|
1089
|
+
* place. Empty for a path in no collection.
|
|
1090
|
+
*/
|
|
1091
|
+
private entriesHolding;
|
|
1092
|
+
/**
|
|
1093
|
+
* Checks the answer at the value path `path` as it is committed (the leave-field check): what
|
|
1094
|
+
* the path's own stages find replaces what was shown on that path, and nothing else moves.
|
|
1095
|
+
*
|
|
1096
|
+
* Whether it checks at all follows the form root's `configuration.validateOn`. With
|
|
1097
|
+
* `"commitAfterError"` (the default) it checks when the path already shows an error — the
|
|
1098
|
+
* server's included — or when the person already tried to go on from it (a submit, or the
|
|
1099
|
+
* Continue of the journey page or the steps container the field is on); never on first blur.
|
|
1100
|
+
* With `"submit"` it checks nothing. Skipped, it returns the stored errors as they stand.
|
|
1101
|
+
*
|
|
1102
|
+
* It runs the deterministic stages and the async stages that declare the path
|
|
1103
|
+
* ({@link ValidationPipeline.runFor}), under the path's token: a newer check of the same path
|
|
1104
|
+
* aborts this one and this one's errors are dropped, and `submit()` and a journey's Continue
|
|
1105
|
+
* wait for it. Only errors whose `FormError.path` is `path` are replaced — `items[1].sku`
|
|
1106
|
+
* leaves `items[0].sku` alone, and no error is picked by component id. An error the host's
|
|
1107
|
+
* server reported on this path stands while its answers are the ones it was reported against,
|
|
1108
|
+
* and goes with the first check after they change, in a single-page form and a journey alike.
|
|
1109
|
+
* `beforeValidation` and `afterValidation` do not run (they belong to `validate` and
|
|
1110
|
+
* `submit`); `VALIDATION_STARTED` and `VALIDATION_COMPLETED` carry `paths: [path]`, and
|
|
1111
|
+
* `VALIDATION_COMPLETED` is not published for a check a newer one replaced, nor for one whose
|
|
1112
|
+
* answer was replaced some other way while it ran (a draft loaded, a row removed or moved, a
|
|
1113
|
+
* host's `setValue`): such a check writes nothing.
|
|
1114
|
+
*/
|
|
1115
|
+
validatePath(path: string): Promise<ReturnType<ErrorStore["listAll"]>>;
|
|
1116
|
+
/** {@link validatePath}'s check of `key` and, while it is current, its write. */
|
|
1117
|
+
private checkPathAndStore;
|
|
1118
|
+
/** Whether a committed answer at `key` is checked now: the form's `validateOn`, then an error shown or a go-on attempted. */
|
|
1119
|
+
private checksOnCommit;
|
|
1120
|
+
/** Calls off the checks of one field still out on the entries of `collectionPath`: its rows were removed, moved or replaced. */
|
|
1121
|
+
private callOffEntryChecks;
|
|
1122
|
+
/**
|
|
1123
|
+
* Whether the stored `error` is about the value path `key`: its own `path` is `key` — never
|
|
1124
|
+
* the path of a row beside it, never a component's id. A server error that names a component
|
|
1125
|
+
* and no path (`setErrors({ componentId })`) is on the path that component's answer is stored
|
|
1126
|
+
* at, so a check of that path can take it back once the answer changed.
|
|
1127
|
+
*/
|
|
1128
|
+
private errorIsOnPath;
|
|
1129
|
+
/** A path's pending flag flipped: into the state, then announced. */
|
|
1130
|
+
private pendingChanged;
|
|
1131
|
+
/**
|
|
1132
|
+
* Drops what a presentation's own validation left — its own fields' errors and an
|
|
1133
|
+
* unsettled worked-out value — when the presentation is left or another journey starts: they
|
|
1134
|
+
* are about fields no longer asked. With the presentation being left (`left`), also every
|
|
1135
|
+
* error, whatever its source — a host's, a server's — on one of its own nodes: nothing asks
|
|
1136
|
+
* such a node any more, and no later validation would replace it.
|
|
1137
|
+
*/
|
|
1138
|
+
private dropPresentationErrors;
|
|
1139
|
+
/** A component and every descendant of it, for a scoped validation. */
|
|
1140
|
+
private scopedComponentIds;
|
|
1141
|
+
/**
|
|
1142
|
+
* Records a step as completed: what a multi-step form's Continue button does
|
|
1143
|
+
* once the step validated clean, before it navigates on. The indicator draws it from the
|
|
1144
|
+
* navigation state on the next render; no event, since a navigation follows.
|
|
1145
|
+
*/
|
|
1146
|
+
markStepCompleted(stepId: string): void;
|
|
1147
|
+
/**
|
|
1148
|
+
* The journey running, with its ownership worked out — `undefined` when the form is being
|
|
1149
|
+
* filled on one page, or the journey it names has gone from the configuration.
|
|
1150
|
+
*/
|
|
1151
|
+
private activeJourney;
|
|
1152
|
+
/**
|
|
1153
|
+
* The page being shown, as a renderer needs it: where it sits on the path, where Back goes,
|
|
1154
|
+
* whether it is the last, what it draws. `undefined` when no journey runs.
|
|
1155
|
+
*/
|
|
1156
|
+
journeyView(): JourneyView | undefined;
|
|
1157
|
+
/**
|
|
1158
|
+
* The path the running journey takes for the answers as they stand: the pages on it and why
|
|
1159
|
+
* each way was taken (a route or the fall-through). What a builder's
|
|
1160
|
+
* Try it draws the way taken from; `undefined` when no journey runs. Read from the last
|
|
1161
|
+
* recompute, never worked out again.
|
|
1162
|
+
*/
|
|
1163
|
+
journeyTrace(): JourneyTrace | undefined;
|
|
1164
|
+
/**
|
|
1165
|
+
* Starts a journey — the one named, else the definition's default — on its first page, or
|
|
1166
|
+
* on `pageId` when that page is reachable. Replaces any journey running, and forgets what it
|
|
1167
|
+
* had completed and what the host's server passed. Synchronous and hook-free: starting is the
|
|
1168
|
+
* runtime's move, not the person's.
|
|
1169
|
+
*
|
|
1170
|
+
* Nothing is completed when a journey starts, so the only page reachable then is the first:
|
|
1171
|
+
* a later `pageId` is kept as a resume point instead, and a draft restored before the person
|
|
1172
|
+
* moves (`hydrateFromDraft`) opens on it when the draft's completed pages reach it. The
|
|
1173
|
+
* result's `pageId` is the page actually opened.
|
|
1174
|
+
*/
|
|
1175
|
+
startJourney(journeyId?: string, options?: {
|
|
1176
|
+
pageId?: string;
|
|
1177
|
+
}): JourneyNavigationResult;
|
|
1178
|
+
/**
|
|
1179
|
+
* Stops the journey: the whole form is in play again, on one page. Answers are kept; a page's
|
|
1180
|
+
* check still out at the server is called off, and what the server passed is forgotten.
|
|
1181
|
+
*/
|
|
1182
|
+
leaveJourney(): void;
|
|
1183
|
+
/**
|
|
1184
|
+
* Re-reads the journey configuration and works the path out again — for a host whose
|
|
1185
|
+
* `journeyConfiguration` function now returns something else (a preview being edited).
|
|
1186
|
+
* A value change does this anyway.
|
|
1187
|
+
*/
|
|
1188
|
+
refreshJourney(): void;
|
|
1189
|
+
/**
|
|
1190
|
+
* Replaces the host's way to its server — `<datum-form>`'s `serverValidator` or
|
|
1191
|
+
* `validate-url` changing — without rebuilding the runtime and losing what has been typed.
|
|
1192
|
+
* What the old one passed is forgotten; a check already out finishes with it. `undefined`
|
|
1193
|
+
* removes it, and a check the journey asks for then counts as unavailable.
|
|
1194
|
+
*/
|
|
1195
|
+
setJourneyServerValidator(validator?: JourneyServerValidator): void;
|
|
1196
|
+
/**
|
|
1197
|
+
* Continue: checks the page as its `validation` says — its own answers (`continue: "page"`,
|
|
1198
|
+
* the default) and then the host's server (`server: true`) — and moves to the next page on
|
|
1199
|
+
* the path. A deferred page (`continue: "defer"`) moves on unchecked, unless it holds an
|
|
1200
|
+
* error that blocks: then it is validated, so a fix can be confirmed. The last page submits
|
|
1201
|
+
* rather than continues (`"at-end"`); an exit page does neither (`"exit"`). A second call
|
|
1202
|
+
* while one is still out is refused (`"pending"`).
|
|
1203
|
+
*/
|
|
1204
|
+
nextPage(): Promise<JourneyNavigationResult>;
|
|
1205
|
+
/**
|
|
1206
|
+
* A journey page's action, decided here so no renderer carries the rule: Continue
|
|
1207
|
+
* on any page but the last ({@link nextPage}); on the last page the page's own submit or
|
|
1208
|
+
* download button when it holds one, else the journey's Submit, which names the answers to
|
|
1209
|
+
* send ({@link submittableValues}) for the submit that follows, whose end check against the
|
|
1210
|
+
* host's server runs over those same values. An exit page has no action, and nothing is done
|
|
1211
|
+
* while a server check is out. See {@link JourneyActionOutcome}.
|
|
1212
|
+
*/
|
|
1213
|
+
journeyAction(page: JourneyActionPage): Promise<JourneyActionOutcome>;
|
|
1214
|
+
/**
|
|
1215
|
+
* Back: the page before this one on the path as the answers stand now. Nothing is validated.
|
|
1216
|
+
* Calls off the page's check still out at the server; refused (`"pending"`) while a submit's
|
|
1217
|
+
* check at the journey's end is out.
|
|
1218
|
+
*/
|
|
1219
|
+
previousPage(): Promise<JourneyNavigationResult>;
|
|
1220
|
+
/**
|
|
1221
|
+
* Goes to a page of the path. A `"jump"` (the default) goes only to a page at or before the
|
|
1222
|
+
* first one not yet completed, and runs `beforePageChange`; an `"error"` move goes to any
|
|
1223
|
+
* page on the path, at once and without hooks — what a renderer does to show an error
|
|
1224
|
+
* where it is. Either calls off the page's check still out at the server; both are refused
|
|
1225
|
+
* (`"pending"`) while a submit's check at the journey's end is out.
|
|
1226
|
+
*
|
|
1227
|
+
* A `"change"` move is a review page's Change link: from a review page only, to a page on the
|
|
1228
|
+
* path the person has completed, with `beforePageChange`; it records the review page as the
|
|
1229
|
+
* return target, so Continue and Back from there go to the first page on the path not yet
|
|
1230
|
+
* completed, else back to the review page (`JourneyView.returning`).
|
|
1231
|
+
*
|
|
1232
|
+
* The `"error"` move is a host-only seam: `<datum-form>`'s `goToPage` takes
|
|
1233
|
+
* no direction and never makes it, and a host must not use `beforePageChange` or the frontier as
|
|
1234
|
+
* a gate against a script that holds the runtime. The gate is the server's fold of the answers.
|
|
1235
|
+
*/
|
|
1236
|
+
goToPage(pageId: string, options?: {
|
|
1237
|
+
direction?: "jump" | "error" | "change";
|
|
1238
|
+
}): Promise<JourneyNavigationResult>;
|
|
1239
|
+
/**
|
|
1240
|
+
* Runs `beforePageChange` — the runtime's hook runner — for a move the person asked for:
|
|
1241
|
+
* `undefined`, at once, when no hook is set, so the move is made in the same turn;
|
|
1242
|
+
* else whether a hook vetoed it by throwing. The journey's moves re-check the target after it.
|
|
1243
|
+
*/
|
|
1244
|
+
private runBeforePageChange;
|
|
1245
|
+
/**
|
|
1246
|
+
* The error store's half of keeping the stored errors to the journey's path (the journey's
|
|
1247
|
+
* moves decide when: the path changed, or another journey started): gone
|
|
1248
|
+
* are the errors the hidden-validation policy would no longer let through, bar what a server
|
|
1249
|
+
* said about a component whose answer is still submitted.
|
|
1250
|
+
*/
|
|
1251
|
+
private dropErrorsOffPath;
|
|
1252
|
+
/**
|
|
1253
|
+
* Every component a page holds: its listed components and their subtrees and, for a
|
|
1254
|
+
* presentation, its own nodes, the form components they reference, and the form
|
|
1255
|
+
* fields they fill or work out.
|
|
1256
|
+
*/
|
|
1257
|
+
private pageComponentIds;
|
|
1258
|
+
/**
|
|
1259
|
+
* Whether a page's components hold an error that blocks — bar, without `withServerErrors`,
|
|
1260
|
+
* the ones the host's server reported, for a Continue about to ask it again — or the form's
|
|
1261
|
+
* rules did not settle (`fold.unsettled`), which blocks every page. The server's errors are
|
|
1262
|
+
* known by where they came from (a host's `setErrors`, a page's check, the end check: the
|
|
1263
|
+
* ones {@link rememberServerErrors} recorded), never by `source`: a host's own pipeline
|
|
1264
|
+
* stage may call its errors `"server"`, and those are the page's own, which always block.
|
|
1265
|
+
*/
|
|
1266
|
+
private pageHoldsBlockingError;
|
|
1267
|
+
/**
|
|
1268
|
+
* The component a value path belongs to: the one stored there, else the nearest
|
|
1269
|
+
* one above it, found by trimming the path from the right — an entry of a repeating section
|
|
1270
|
+
* (`order.items[0].sku`) to the section's field keyed so, a key under a data-scoping
|
|
1271
|
+
* container to the container. The runtime's one way from a path to a page: a data key, or a
|
|
1272
|
+
* container that names its data other than its id, never misplaces an error. A key an own
|
|
1273
|
+
* field of the running presentation is stored at (`@<presentation id>.<id>`) names
|
|
1274
|
+
* that field; an alias's answer is at the form field's path, so it names the form field.
|
|
1275
|
+
*/
|
|
1276
|
+
private componentIdForValuePath;
|
|
1277
|
+
/** The field of a repeating section's entries that `rest` (`[0].sku`) names, when the section has one keyed so. */
|
|
1278
|
+
private entryFieldOf;
|
|
1279
|
+
/**
|
|
1280
|
+
* A page's check into the store. The page's slice becomes what its own validation
|
|
1281
|
+
* just found, warnings included, plus the server's word; what the server said about the page
|
|
1282
|
+
* before — on its components, or the form-level entries a page's check left — gives way.
|
|
1283
|
+
* The reply's form-level entries are the page's, until the page changes. What the server said
|
|
1284
|
+
* is known by where it came from, not by `source`: the errors a pipeline stage calling itself
|
|
1285
|
+
* `"server"` just found are the page's own, and are merged with the reply, never wiped by it.
|
|
1286
|
+
*/
|
|
1287
|
+
private storePageCheck;
|
|
1288
|
+
/**
|
|
1289
|
+
* The page's "could not check" error, in place of any before it (the one the page already
|
|
1290
|
+
* shows with the same code). The page's earlier server errors stand: nothing unsaid them.
|
|
1291
|
+
*/
|
|
1292
|
+
private showPageUnavailable;
|
|
1293
|
+
/** Drops the form-level errors a page's check left — the page they were about is no longer shown. */
|
|
1294
|
+
private dropPageOwnedErrors;
|
|
1295
|
+
/**
|
|
1296
|
+
* Records each server error's answers as they stand: the error then stands
|
|
1297
|
+
* through the page's own re-validation until they change.
|
|
1298
|
+
*/
|
|
1299
|
+
private rememberServerErrors;
|
|
1300
|
+
/** Whether a server error's answers are the ones it was reported against. */
|
|
1301
|
+
private serverErrorStands;
|
|
1302
|
+
/**
|
|
1303
|
+
* What an error's field holds, as text: the answer at its value path and everything under it
|
|
1304
|
+
* (a container's fields, a repeating section's entries). An error naming a component takes in
|
|
1305
|
+
* the answers of its whole subtree — a fieldset or a panel stores nothing of its own, its
|
|
1306
|
+
* fields do — and, for a field of a repeating section, that field in every entry
|
|
1307
|
+
* (`items[0].sku`), where its answers actually live. Otherwise such an error would read "{}"
|
|
1308
|
+
* for good and never stop standing, whatever the person changed. `undefined` for an error
|
|
1309
|
+
* naming no field.
|
|
1310
|
+
*/
|
|
1311
|
+
private answersOf;
|
|
1312
|
+
/**
|
|
1313
|
+
* The keys a field of a repeating section holds its answers at — `items[0].sku`,
|
|
1314
|
+
* `items[1].sku`, and anything under them — as a pattern; `undefined` for a component in no
|
|
1315
|
+
* section. The section is the nearest one above the field: a section nested in another keeps
|
|
1316
|
+
* its entries at its own collection path, and its fields are keyed relative to it.
|
|
1317
|
+
*/
|
|
1318
|
+
private entryKeyPattern;
|
|
1319
|
+
/** Announces the store as it stands, after a journey check changed it outside a validation run. */
|
|
1320
|
+
private publishStoredErrors;
|
|
1321
|
+
/**
|
|
1322
|
+
* Takes the person to the earliest page on the path holding an error that blocks — the
|
|
1323
|
+
* journey's move; the errors are the store's. An error is placed by its component,
|
|
1324
|
+
* else by its value path's (never by a guess from the path's first segment: a data key or a
|
|
1325
|
+
* data-scoping container names its data other than its id).
|
|
1326
|
+
*/
|
|
1327
|
+
private revealErrorPage;
|
|
1328
|
+
/**
|
|
1329
|
+
* A submit whose journey's path ends at an exit page: refused before anything
|
|
1330
|
+
* touches the answers. `undefined` when the path ends anywhere else, or no journey runs.
|
|
1331
|
+
*/
|
|
1332
|
+
private refuseExitPath;
|
|
1333
|
+
/**
|
|
1334
|
+
* The error a journey's path ending at an exit page refuses a submit with, stored
|
|
1335
|
+
* nowhere; `undefined` when the path ends anywhere else, or no journey runs.
|
|
1336
|
+
*/
|
|
1337
|
+
private exitPathErrors;
|
|
1338
|
+
private publishSubmissionFailed;
|
|
1339
|
+
/**
|
|
1340
|
+
* A restored journey's validation: the pages already continued from, not the page the
|
|
1341
|
+
* person comes back to, and not a deferred page (the journey engine says which).
|
|
1342
|
+
*/
|
|
1343
|
+
private validateCompletedPages;
|
|
1344
|
+
/**
|
|
1345
|
+
* Replaces the form's errors with ones the host learned outside validation: a server's
|
|
1346
|
+
* verdict on a delivered submission, typically, which arrives after `submit()` has
|
|
1347
|
+
* accepted and returned. They are stored and announced exactly as a validation stage's
|
|
1348
|
+
* errors are (`ERRORS_CHANGED`), so a renderer shows them inline and in its summary; an
|
|
1349
|
+
* entry with no `componentId` is a form-level error the summary lists on its own.
|
|
1350
|
+
*
|
|
1351
|
+
* Replaces rather than merges: the store is empty after an accepted submit, and the next
|
|
1352
|
+
* `validate()` or `submit()` replaces these in turn, which is the intended lifecycle. On a
|
|
1353
|
+
* journey page, though, an error from the server (`source` absent or `"server"`) stands
|
|
1354
|
+
* through the page's own validation until its answer changes.
|
|
1355
|
+
* `setErrors([])` clears. Returns what was stored, as `errors()` now reports it.
|
|
1356
|
+
*/
|
|
1357
|
+
setErrors(errors: HostError[]): FormError[];
|
|
1358
|
+
/**
|
|
1359
|
+
* A host's errors as the form stores them: `stage: "host"` (or the stage given — a
|
|
1360
|
+
* journey's check's are `"journey-server"`), `source` defaulting to `"server"`.
|
|
1361
|
+
*/
|
|
1362
|
+
private fromHostErrors;
|
|
1363
|
+
/**
|
|
1364
|
+
* A dry run of a submit's checks (the browser's form-test driver's `check` and the
|
|
1365
|
+
* page check behind its `continue`): what `submit` under a mode that validates would find over
|
|
1366
|
+
* the answers as they stand — a journey's exit path, the validation pipeline with the hidden
|
|
1367
|
+
* policy and the fold's own checks, then the sandbox (`wasmValidationHost`) over the envelope's
|
|
1368
|
+
* values with the data sources' option snapshot, the strict policy and the unknown-fields
|
|
1369
|
+
* setting, so an answer outside a choice's options, a server rule or a shape bound refuses
|
|
1370
|
+
* here as it does at a submit. The first check that blocks ends it, as in `submit`.
|
|
1371
|
+
*
|
|
1372
|
+
* Changes nothing: no state, no stored error, no submission state, no validity; no hook
|
|
1373
|
+
* (`beforeValidation`, `afterValidation`, `beforeSubmit`, the value transforms), no handler
|
|
1374
|
+
* and no event but the recompute's (the fold worked out over the answers as stored, as
|
|
1375
|
+
* `validate` and `submit` start). So the answers are judged as stored, not as a transform
|
|
1376
|
+
* would change them.
|
|
1377
|
+
* The host's own checks are not asked either — `serverValidation` and the journey's checks
|
|
1378
|
+
* against the host's server — only what runs in the browser and its sandbox; the external
|
|
1379
|
+
* data provider and the data sources are read as a submit reads them.
|
|
1380
|
+
*
|
|
1381
|
+
* With `page`, only that journey page's errors are kept (see {@link CheckValuesOptions.page})
|
|
1382
|
+
* and the exit path is not checked: what Continue on the page would refuse for.
|
|
1383
|
+
*/
|
|
1384
|
+
checkValues(options?: CheckValuesOptions): Promise<CheckValuesResult>;
|
|
1385
|
+
/**
|
|
1386
|
+
* The sandbox's check of the answers a submit sends, shared by `submit` and
|
|
1387
|
+
* `checkValues`: the envelope's values built from `values`, the run, and the browser's hidden
|
|
1388
|
+
* policy over what it reports. Stores nothing and announces nothing: `submit` publishes the
|
|
1389
|
+
* exchange and acts on it.
|
|
1390
|
+
*/
|
|
1391
|
+
private runWasmCheck;
|
|
1392
|
+
/**
|
|
1393
|
+
* Sends the answers through `modeId`. One submission runs at a time: a second call while one
|
|
1394
|
+
* is in flight joins it when it asks for the same thing (a double click), and is refused with a
|
|
1395
|
+
* {@link SubmitBusyError} when it asks for anything else, which would otherwise be answered
|
|
1396
|
+
* with the first one's result or deliver twice.
|
|
1397
|
+
*/
|
|
1398
|
+
submit(modeId: string, versionContext: SubmissionVersionContext, options?: SubmitOptions): Promise<SubmitResult>;
|
|
1399
|
+
/**
|
|
1400
|
+
* Whether a submission in flight is waiting on one of the host's hooks right now. A submit
|
|
1401
|
+
* asked meanwhile may come from that hook, and joining it would have the run wait on itself:
|
|
1402
|
+
* a caller that joins at its own level (the `<datum-form>` element) refuses instead.
|
|
1403
|
+
*/
|
|
1404
|
+
submitWaitsOnHost(): boolean;
|
|
1405
|
+
/**
|
|
1406
|
+
* Waits on a host hook (a hook series or the transforms). With `counted` (a series of the
|
|
1407
|
+
* submission's own: its hooks, its transforms, its validation) and a submission in flight, it
|
|
1408
|
+
* counts as one the run is waiting on, so a submit asked from inside it is refused rather than
|
|
1409
|
+
* joined (see {@link submit}). A series someone else started meanwhile (a page's validate(), a
|
|
1410
|
+
* language switch's revalidation) is not the submission's and never counts. No hook set,
|
|
1411
|
+
* nothing to wait on: a second call then still joins.
|
|
1412
|
+
*
|
|
1413
|
+
* Not counting, it hands back the run's own promise: an extra wrapper would add turns between
|
|
1414
|
+
* the events a page move publishes, and the renderer would paint once for each gap.
|
|
1415
|
+
*/
|
|
1416
|
+
private hostCallback;
|
|
1417
|
+
/**
|
|
1418
|
+
* One submission, which never stays `submitting` past its end: whatever throws part way (a
|
|
1419
|
+
* hook, a pipeline stage, a server runner) settles it back to `idle` and is reported once as
|
|
1420
|
+
* the host's failure before the caller sees the throw. A submission that already settled is
|
|
1421
|
+
* left as it is: a stage's refusal published its own failure, and an `afterSubmit` hook that
|
|
1422
|
+
* throws does so after the answers were accepted.
|
|
1423
|
+
*/
|
|
1424
|
+
private submitSettled;
|
|
1425
|
+
private runSubmit;
|
|
1426
|
+
/**
|
|
1427
|
+
* A stage's rejection of the submission, handed to the renderer: the errors go into the
|
|
1428
|
+
* store and ERRORS_CHANGED announces them, so the summary (and any field they name)
|
|
1429
|
+
* redraws through the renderer's existing pull model. A stage that only returned its errors
|
|
1430
|
+
* from `submit()` left the form looking as if nothing had happened — a signing failure
|
|
1431
|
+
* showed in the host's result panel and nowhere on the form. The stage's own
|
|
1432
|
+
* SUBMISSION_* event is the caller's, published after this.
|
|
1433
|
+
*/
|
|
1434
|
+
private rejectSubmission;
|
|
1435
|
+
/** The signer for this submission: the id the call named (any provider carries it), else the mode's default. */
|
|
1436
|
+
private resolveSigningProvider;
|
|
1437
|
+
private runSubmissionHandlers;
|
|
1438
|
+
private formComponentTypes;
|
|
1439
|
+
private installedPluginVersions;
|
|
1440
|
+
/** The canonical envelope over `values`: Submit's, and a journey check's `document`. */
|
|
1441
|
+
private submissionEnvelope;
|
|
1442
|
+
/**
|
|
1443
|
+
* The envelope a journey's check hands its validator: the request's answers, locale and
|
|
1444
|
+
* journey under the host's version context, enriched as Submit enriches its own, so a Datum
|
|
1445
|
+
* host judges the check over the document it would be sent. The form's version is the
|
|
1446
|
+
* request's (the one a submit in progress names).
|
|
1447
|
+
*/
|
|
1448
|
+
private journeyCheckDocument;
|
|
1449
|
+
private enrichVersionContext;
|
|
1450
|
+
private signatureParticipants;
|
|
1451
|
+
/**
|
|
1452
|
+
* Hidden-validation / hidden-required policy filter. Drops errors on nodes whose
|
|
1453
|
+
* effective state says validation must not run, and `required`-coded errors on nodes
|
|
1454
|
+
* where requiredness does not apply.
|
|
1455
|
+
*
|
|
1456
|
+
* Hiding relaxes "required", not the shape of an answer that is still submitted:
|
|
1457
|
+
* on a node not validated whose answer is submitted as given (`submitValue`, not cleared),
|
|
1458
|
+
* the field-constraints stage's length, pattern, file size and type errors pass — the
|
|
1459
|
+
* validation kernel holds the same answer to the same constraints, and a client choosing
|
|
1460
|
+
* the answer that hides a field must not be able to store anything in it. `required`, and
|
|
1461
|
+
* every other stage's errors (a plugin's, a custom one), stay dropped. The renderer lists such
|
|
1462
|
+
* an error in the summary, since its field is not shown. What a control says about an empty
|
|
1463
|
+
* answer (`dateIncomplete`, a `number` marked `badInput`) is not a shape: it goes
|
|
1464
|
+
* whenever the component is not visible, whatever its hidden-validation behaviour says — a
|
|
1465
|
+
* control nobody sees has nothing to tell the person, and a server never hears it.
|
|
1466
|
+
*/
|
|
1467
|
+
private errorPassesHiddenPolicy;
|
|
1468
|
+
private findComponentById;
|
|
1469
|
+
private readConfigurationPath;
|
|
1470
|
+
}
|