@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,1872 @@
|
|
|
1
|
+
import { BuilderController, type BuilderChangeEvent, type BuilderChangeReason, type UnsavedChangesPrompt } from "../controller/builder-controller.js";
|
|
2
|
+
import type { BuilderMode, CanvasSurfaceOptions } from "./builder-modes.js";
|
|
3
|
+
import type { PdfConfiguration } from "../../core/schema/pdf-layout.js";
|
|
4
|
+
import { type BuilderTextCatalog } from "../logic/builder-texts.js";
|
|
5
|
+
import { type DefinitionBudget } from "../definition-budget.js";
|
|
6
|
+
import { HTMLElementBase } from "../../render/web-component/custom-element-base.js";
|
|
7
|
+
import { DatumFormRendererElement, type RenderHostRuntime } from "../../render/web-component/form-renderer-element.js";
|
|
8
|
+
import type { PrintTheme } from "../../render/print/theme.js";
|
|
9
|
+
import { BuilderPreviewRuntime } from "../preview/builder-preview-runtime.js";
|
|
10
|
+
import type { CanvasScenarioShowing, TestsAssertSnapshot, TestsCanvasRecording, TestsRecordListener } from "../form-tests/tests-model.js";
|
|
11
|
+
import type { FormulaFunctionSignature } from "../../core/expressions/formula-types.js";
|
|
12
|
+
import type { FormulaFunctionTableRow } from "../../registry/formula-functions/formula-function-registry.js";
|
|
13
|
+
import type { BuilderFormSettingReadOnlyRow, BuilderFormSettingRow, BuilderInspectorAction, BuilderModeChoice, BuilderModeFinding, BuilderModeRules } from "./builder-modes.js";
|
|
14
|
+
import type { TryCheckOutcome, TryItPdfSource, TryItServerChecksSource, TrySubmitOutcome } from "./try-it-types.js";
|
|
15
|
+
import { type IconSet } from "../../render/icons/icon-set.js";
|
|
16
|
+
import { type UnsavedChangesPromptView, type InspectorTab } from "./builder-shared.js";
|
|
17
|
+
/**
|
|
18
|
+
* The unsaved-changes prompt as the properties panel shows it: what the controller is
|
|
19
|
+
* holding, named by the tree view's label so the author can tell which edits these are.
|
|
20
|
+
*/
|
|
21
|
+
export declare function describeUnsavedChanges(controller: BuilderController, prompt: UnsavedChangesPrompt,
|
|
22
|
+
/** What the panel itself could not read for that component (an expression that does not parse). */
|
|
23
|
+
panelProblems?: readonly string[]): UnsavedChangesPromptView;
|
|
24
|
+
export type { BuilderTrySubmitDetail } from "./try-it-types.js";
|
|
25
|
+
/**
|
|
26
|
+
* Detail of `builder-open-panel`: a panel asking the shell to open another one — the Form
|
|
27
|
+
* panel's Header or Footer row opening the Header & footer panel on that region.
|
|
28
|
+
* Composed, so a host that mounts a panel on its own hears it too.
|
|
29
|
+
*/
|
|
30
|
+
export interface BuilderOpenPanelDetail {
|
|
31
|
+
panel: "chrome" | "form";
|
|
32
|
+
/** For the Header & footer panel: the region to put focus in. */
|
|
33
|
+
region?: "header" | "footer";
|
|
34
|
+
/**
|
|
35
|
+
* For the Form panel: go to this problem of the form root's draft (see
|
|
36
|
+
* `BuilderController.problemsOf`), or the first one when it names none — the Header &
|
|
37
|
+
* footer panel's Save shares the root's draft, but the boxes it cannot save past are the
|
|
38
|
+
* Form panel's.
|
|
39
|
+
*/
|
|
40
|
+
problem?: string;
|
|
41
|
+
}
|
|
42
|
+
export declare const DATUM_BUILDER_TOOLBAR_TAG = "datum-builder-toolbar";
|
|
43
|
+
export declare const DATUM_BUILDER_CANVAS_TAG = "datum-builder-canvas";
|
|
44
|
+
export declare const DATUM_BUILDER_PROPERTIES_TAG = "datum-builder-properties";
|
|
45
|
+
export declare const DATUM_BUILDER_FORM_PANEL_TAG = "datum-builder-form-panel";
|
|
46
|
+
/**
|
|
47
|
+
* Base for the independently-usable builder panels. Assign a shared
|
|
48
|
+
* {@link BuilderController} via the `controller` property; the panel re-renders on every
|
|
49
|
+
* controller `change` / `selection`.
|
|
50
|
+
*/
|
|
51
|
+
export declare abstract class BuilderPanelElement extends HTMLElementBase {
|
|
52
|
+
protected readonly root: ShadowRoot;
|
|
53
|
+
protected ctrl: BuilderController | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* Whether the controller on the panel is the builder's own — the form, the primary mode —
|
|
56
|
+
* rather than another mode's. The form-level controls, the properties panel's
|
|
57
|
+
* Localization section and the canvas's locale switcher, edit and read
|
|
58
|
+
* `FormDefinition.localization`, which belongs to the form alone: another mode's tree (a
|
|
59
|
+
* PDF layout) declares the form's locales so its own text is authored per locale, but has
|
|
60
|
+
* no localization of its own to edit. The shell sets this as it re-points the panels; a
|
|
61
|
+
* panel used on its own is the form's.
|
|
62
|
+
*/
|
|
63
|
+
protected primaryValue: boolean;
|
|
64
|
+
private iconsValue;
|
|
65
|
+
private unsub;
|
|
66
|
+
/** What this panel last wrote into its root; see {@link writeMarkup}. */
|
|
67
|
+
private lastMarkup;
|
|
68
|
+
/** Depth of {@link suspendPaints} calls: a caller setting several properties paints once. */
|
|
69
|
+
private suspended;
|
|
70
|
+
/** Set when a paint was skipped, so it is made up as soon as the panel can draw again. */
|
|
71
|
+
private missedPaint;
|
|
72
|
+
/**
|
|
73
|
+
* Where the panel's own Undo and Redo keys go: the shell's one method, which asks
|
|
74
|
+
* the mode's history first (a journey's Step view undoes over the form and the journey). No
|
|
75
|
+
* paint. Unset (a panel used on its own): the panel's controller's own Undo and Redo.
|
|
76
|
+
*/
|
|
77
|
+
historyStep: ((controller: BuilderController, direction: "undo" | "redo") => void) | undefined;
|
|
78
|
+
/** Undo or Redo from the panel's keys: through {@link historyStep} when the shell set one, else on the panel's controller. */
|
|
79
|
+
protected stepHistory(direction: "undo" | "redo"): void;
|
|
80
|
+
/**
|
|
81
|
+
* Paints — unless there is nobody to paint to. A panel behind its strip item is not on
|
|
82
|
+
* screen, and a caller part-way through setting several properties has not finished saying
|
|
83
|
+
* what to draw; either way the paint is skipped and made up the moment the panel can draw
|
|
84
|
+
* again. Everything inside the panel asks for a paint this way, so the panel is drawn once
|
|
85
|
+
* per thing that actually changed rather than once per property that was assigned.
|
|
86
|
+
*/
|
|
87
|
+
protected paint(): void;
|
|
88
|
+
/**
|
|
89
|
+
* Holds this panel's paints until the matching {@link resumePaints}. Synchronous, so a
|
|
90
|
+
* caller that sets a controller, an icon set and a label in a row still leaves the panel
|
|
91
|
+
* painted by the time it returns — just once instead of three times.
|
|
92
|
+
*/
|
|
93
|
+
suspendPaints(): void;
|
|
94
|
+
resumePaints(): void;
|
|
95
|
+
/**
|
|
96
|
+
* What the panel does when its controller reports a change. Every panel repaints by
|
|
97
|
+
* default; one whose content cannot depend on what the change was says so by overriding
|
|
98
|
+
* this, and is spared building markup it would then throw away (see {@link writeMarkup}).
|
|
99
|
+
* The event itself comes along for a panel that reads more than the reason (`live`, a draft
|
|
100
|
+
* write under a box still being typed into, see {@link BuilderChangeEvent}).
|
|
101
|
+
*/
|
|
102
|
+
protected onControllerChange(_reason: BuilderChangeReason, _event?: BuilderChangeEvent): void;
|
|
103
|
+
/** The same, for a change of selection. */
|
|
104
|
+
protected onSelectionChange(): void;
|
|
105
|
+
/** The canvas drew the form and how the selection is drawn moved (`BuilderController.drawingChanged`); nothing to do by default. */
|
|
106
|
+
protected onDrawingChange(): void;
|
|
107
|
+
constructor();
|
|
108
|
+
/**
|
|
109
|
+
* The icon set the panel's chrome is drawn from. Unset, the default set —
|
|
110
|
+
* whatever the page registered with `setDefaultIconSet`, else the engine's own drawings.
|
|
111
|
+
* The shell forwards its `options.icons` here; a panel used on its own takes it directly.
|
|
112
|
+
*/
|
|
113
|
+
set icons(value: IconSet | undefined);
|
|
114
|
+
get icons(): IconSet | undefined;
|
|
115
|
+
/** The set to draw with right now. */
|
|
116
|
+
protected iconSet(): IconSet;
|
|
117
|
+
/** The set's CSS for this panel's shadow root; empty when the set needs none. */
|
|
118
|
+
protected iconCss(): string;
|
|
119
|
+
/** A full repaint by default; a panel whose shell is built once repaints its glyphs instead. */
|
|
120
|
+
protected onIconsChange(): void;
|
|
121
|
+
set controller(controller: BuilderController | undefined);
|
|
122
|
+
get controller(): BuilderController | undefined;
|
|
123
|
+
set primary(value: boolean);
|
|
124
|
+
get primary(): boolean;
|
|
125
|
+
get collapsed(): boolean;
|
|
126
|
+
set collapsed(value: boolean);
|
|
127
|
+
static get observedAttributes(): string[];
|
|
128
|
+
attributeChangedCallback(_name: string): void;
|
|
129
|
+
connectedCallback(): void;
|
|
130
|
+
disconnectedCallback(): void;
|
|
131
|
+
private teardown;
|
|
132
|
+
protected toggleCollapsed(): void;
|
|
133
|
+
/**
|
|
134
|
+
* Writes `markup` into the panel's root, unless that is already exactly what the panel
|
|
135
|
+
* shows — in which case nothing is touched and this answers `false`, so the caller can skip
|
|
136
|
+
* the work that follows a paint (re-binding, restoring focus, mounting an editor).
|
|
137
|
+
*
|
|
138
|
+
* A docked panel hears every change its controller reports, which is every keystroke of a
|
|
139
|
+
* draft edit: the palette redrew its whole catalogue, and the Form panel its
|
|
140
|
+
* whole root, while an author typed a field's label into the inspector. The outline was
|
|
141
|
+
* given a guard of its own for this reason; this is that guard for the rest, and it cannot
|
|
142
|
+
* change what a panel shows, since the markup it skips is the markup already there.
|
|
143
|
+
*/
|
|
144
|
+
protected writeMarkup(markup: string): boolean;
|
|
145
|
+
/** What the panel currently shows, for a caller that must compare before tearing anything down. */
|
|
146
|
+
protected shownMarkup(): string | undefined;
|
|
147
|
+
/** The panel's DOM has moved on from its last markup in place (a typed box's text): the next paint writes the markup whatever it is. */
|
|
148
|
+
protected forgetMarkup(): void;
|
|
149
|
+
protected abstract render(): void;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* A panel's title is a real heading (h2, the level the shell gives its drawers) that looks as the
|
|
153
|
+
* old title div did: the heading's own margins and size are reset, and the strong inside keeps
|
|
154
|
+
* the panel-head look. `panel-title--hidden` keeps the heading for assistive technology when the
|
|
155
|
+
* panel draws no visible title (the Components palette).
|
|
156
|
+
*/
|
|
157
|
+
export declare const PANEL_TITLE_STYLES = "\n .panel-title { margin: 0; font: inherit; color: inherit; }\n .panel-title--hidden {\n position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;\n clip: rect(0 0 0 0); white-space: nowrap; border: 0;\n }\n";
|
|
158
|
+
export declare class DatumBuilderToolbarElement extends BuilderPanelElement {
|
|
159
|
+
private bound;
|
|
160
|
+
/** The one list stop that is in the Tab order (see {@link applyRoving}); a key from {@link paletteKeyOf}. */
|
|
161
|
+
private rovingKey;
|
|
162
|
+
/** Palette groups the author closed, by label, so a repaint does not reopen them. */
|
|
163
|
+
private collapsedGroups;
|
|
164
|
+
/** Live text of the palette's filter box; entries not matching it are left out. */
|
|
165
|
+
private paletteFilter;
|
|
166
|
+
/** The builder's words (the text catalog) for the panel's head and filter. */
|
|
167
|
+
private readonly words;
|
|
168
|
+
/** The builder's own language for its words, not the form's. */
|
|
169
|
+
set textLocale(value: string | undefined);
|
|
170
|
+
/** A host's translations of the builder's words, by key; absent keys fall back to English. */
|
|
171
|
+
set textCatalog(value: BuilderTextCatalog | undefined);
|
|
172
|
+
private wordsFor;
|
|
173
|
+
/**
|
|
174
|
+
* The palette listing under the current filter. A filter match is by visible label or by
|
|
175
|
+
* component type, and while a filter is active every group renders open — a match hidden
|
|
176
|
+
* under a closed heading would read as no match at all (the author's own open/closed
|
|
177
|
+
* memory is untouched and comes back when the box clears).
|
|
178
|
+
*/
|
|
179
|
+
private paletteListHtml;
|
|
180
|
+
/**
|
|
181
|
+
* The catalogue lists what can be *added* to the form. Nothing an author edits, selects or
|
|
182
|
+
* previews changes it, so those changes are dropped here rather than rebuilding a list of
|
|
183
|
+
* every registered component — which a docked palette otherwise did on every keystroke.
|
|
184
|
+
*/
|
|
185
|
+
protected onControllerChange(reason: BuilderChangeReason): void;
|
|
186
|
+
/** The list of types the palette was last drawn from: a change of list is what a preview change is read for. */
|
|
187
|
+
private paintedTypes;
|
|
188
|
+
/** The palette draws nothing about the selection. */
|
|
189
|
+
protected onSelectionChange(): void;
|
|
190
|
+
/**
|
|
191
|
+
* The list stops the arrow keys visit, in reading order: every component button in an open
|
|
192
|
+
* group, and every group heading (the only keyboard way to open a closed group). Items inside
|
|
193
|
+
* a closed group are not stops, since the browser does not draw them.
|
|
194
|
+
*/
|
|
195
|
+
private rovingStops;
|
|
196
|
+
/**
|
|
197
|
+
* One list stop is in the Tab order and the rest are not (a roving tabindex): the one last
|
|
198
|
+
* visited, else the first component button. The state is a key kept on the panel, not the
|
|
199
|
+
* markup, so it survives a repaint, a filter that removes and restores rows, and a group
|
|
200
|
+
* opening or closing. Group headings are never Tab stops unless one is the stop being rested on.
|
|
201
|
+
*/
|
|
202
|
+
private applyRoving;
|
|
203
|
+
/** Moves focus to the canvas, the palette's "Skip to canvas". */
|
|
204
|
+
private skipToCanvas;
|
|
205
|
+
protected render(): void;
|
|
206
|
+
private bind;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* The build-mode canvas. It mounts the real `<datum-form-renderer>` over a
|
|
210
|
+
* {@link BuilderPreviewRuntime}, so what the author sees is what the form renders — the same
|
|
211
|
+
* drawing, binding, layout and conditional-visibility behaviour, produced by the same code
|
|
212
|
+
* (the canvas is not a second renderer). The builder's own contribution is chrome: selection outlines, drag handles and
|
|
213
|
+
* drop zones, injected as the live renderer's canvas hooks (`CanvasHooks`) and styled through the renderer's
|
|
214
|
+
* `extraStyles`, so it never displaces a field from where the live form puts it.
|
|
215
|
+
*/
|
|
216
|
+
/**
|
|
217
|
+
* What Try it tries while a mode's tree is on the canvas: the form, by its own
|
|
218
|
+
* controller, and the mode, for what it adds (`BuilderMode.tryIt`). Set by the shell.
|
|
219
|
+
*/
|
|
220
|
+
export interface CanvasTryForm {
|
|
221
|
+
controller: BuilderController;
|
|
222
|
+
mode: BuilderMode;
|
|
223
|
+
/** The workspace Try it runs in ("journeys", "pdf"): the PDF card leads in "pdf". */
|
|
224
|
+
workspace?: string | undefined;
|
|
225
|
+
}
|
|
226
|
+
export declare class DatumBuilderCanvasElement extends BuilderPanelElement implements TestsCanvasRecording {
|
|
227
|
+
/** The phone tier is the shell's to say: the canvas redraws its chrome when it does. */
|
|
228
|
+
static get observedAttributes(): string[];
|
|
229
|
+
/**
|
|
230
|
+
* Puts keyboard focus on the canvas: the one Tab stop that holds the form's components (the
|
|
231
|
+
* arrow keys walk them from there), so the palette's "Skip to canvas" lands on the first
|
|
232
|
+
* component's neighbourhood without selecting anything. Whether the canvas took it, which it
|
|
233
|
+
* does not while a mode's surface has hidden the sheet.
|
|
234
|
+
*/
|
|
235
|
+
focusCanvasRegion(): boolean;
|
|
236
|
+
private bound;
|
|
237
|
+
private rendererEl;
|
|
238
|
+
private preview;
|
|
239
|
+
/** A mode's own surface, shown in the sheet's place while set (see {@link showSurface}). */
|
|
240
|
+
private surfaceEl;
|
|
241
|
+
private surfaceStyles;
|
|
242
|
+
/**
|
|
243
|
+
* What the surface on the canvas says about the canvas's own tools: whether the
|
|
244
|
+
* bar's zoom tools drive it (and how) and whether Try it applies. Unset while the sheet shows.
|
|
245
|
+
*/
|
|
246
|
+
private surfaceShown;
|
|
247
|
+
/** The active mode's worded actions in the bar (see {@link setModeActions}), and the mode's name for their folded card. */
|
|
248
|
+
private modeActionsValue;
|
|
249
|
+
private modeActionsLabel;
|
|
250
|
+
private modeActionsObserver;
|
|
251
|
+
/** Puts the selection bar's and the canvas bar's one Tab stop right at once (see {@link rovingToolbar}). */
|
|
252
|
+
private syncSelectionTools;
|
|
253
|
+
private syncCanvasTools;
|
|
254
|
+
/** True once the author chose a zoom for this tree; a fixed sheet's auto-fit then stays out of the way. */
|
|
255
|
+
private zoomChosen;
|
|
256
|
+
/** The fixed sheet width last seen, so a different one (another PDF layout) lets the auto-fit act again. */
|
|
257
|
+
private appliedFixedWidth;
|
|
258
|
+
private fitObserver;
|
|
259
|
+
private fitObserved;
|
|
260
|
+
/**
|
|
261
|
+
* Measures the sheet and the room it has: the sheet at its own size, the page's content box.
|
|
262
|
+
* A seam: jsdom has no layout, so a test replaces it with fixed numbers.
|
|
263
|
+
*/
|
|
264
|
+
measureFit: () => {
|
|
265
|
+
sheetWidth: number;
|
|
266
|
+
sheetHeight: number;
|
|
267
|
+
roomWidth: number;
|
|
268
|
+
roomHeight: number;
|
|
269
|
+
};
|
|
270
|
+
/** Reused insertion marker; positioned imperatively during a drag (no innerHTML churn). */
|
|
271
|
+
private marker;
|
|
272
|
+
private activeZone;
|
|
273
|
+
/** Each drawn component's place in its slot, read off the tree while a drag is over a zone. */
|
|
274
|
+
private dragPlaces;
|
|
275
|
+
private dropTarget;
|
|
276
|
+
/** The node whose drag is in flight; the `.db-dragging` class lands on it a tick after
|
|
277
|
+
* `dragstart` (see below), so this must outlive the handler — and be cleared on `dragend`
|
|
278
|
+
* so a drag the browser aborted cannot mark the node after the fact. */
|
|
279
|
+
private dragSourceNode;
|
|
280
|
+
private sheetDrag;
|
|
281
|
+
/**
|
|
282
|
+
* Where the author has moved the sheet from its centred place, in screen pixels (a drag on
|
|
283
|
+
* empty canvas, a middle-button drag, Shift with an arrow key), and the drag in flight. A
|
|
284
|
+
* translate on the sheet, apart from the page's scroll, so the centring and the zoom keep
|
|
285
|
+
* working as they did: Fit puts the sheet back, as does another mode's tree.
|
|
286
|
+
*/
|
|
287
|
+
private panX;
|
|
288
|
+
private panY;
|
|
289
|
+
private panDrag;
|
|
290
|
+
/** The click that ends a pan is part of it: it must not clear the selection. */
|
|
291
|
+
private panEndedAt;
|
|
292
|
+
/** The preview width most recently applied to the sheet, so a mere re-render (selection,
|
|
293
|
+
* typing) never touches the author's scroll position — only a width *change* re-centers. */
|
|
294
|
+
private appliedSheetWidth;
|
|
295
|
+
/** The selection the preview was last asked to show, so only a *change* of selection opens
|
|
296
|
+
* the tab or step it sits on — see {@link render}. */
|
|
297
|
+
private revealedSelectionId;
|
|
298
|
+
/** The controller whose tree the sheet last drew, so a move to another's is drawn in one go — see {@link render}. */
|
|
299
|
+
private paintedController;
|
|
300
|
+
/** That controller's {@link BuilderController.canvasRevision} when last drawn: another is a sheet of another kind over it. */
|
|
301
|
+
private paintedCanvasRevision;
|
|
302
|
+
/** A change since the last paint added a component (and selected it): the paint scrolls it into view. */
|
|
303
|
+
private addedSincePaint;
|
|
304
|
+
/** The scroll that follows an add, until its box is drawn; a later add takes over. */
|
|
305
|
+
private addScroll;
|
|
306
|
+
/** Preview ("Try it"): the form live, the builder's chrome put away. Edit is the default. */
|
|
307
|
+
private previewingValue;
|
|
308
|
+
/** Which optional parts of the canvas exist (the builder's `features`); all of them unless the shell says otherwise. */
|
|
309
|
+
private canvasFeaturesValue;
|
|
310
|
+
/** How the Try it panel shows the form; the panel's other state lives in the chunk. */
|
|
311
|
+
private tryMode;
|
|
312
|
+
private serverChecksValue;
|
|
313
|
+
private tryPdfValue;
|
|
314
|
+
/** The Try it chunk's controller once the chunk is in, the load in flight, and whether the last load failed. */
|
|
315
|
+
private tryIt;
|
|
316
|
+
private tryLoading;
|
|
317
|
+
private tryLoadFailed;
|
|
318
|
+
/** The chunk's CSS, kept so a rebuilt shadow root gets it again (see {@link ensureTryStyles}). */
|
|
319
|
+
private tryCss;
|
|
320
|
+
/** A Try again was pressed: focus moves to the panel's first control when the chunk arrives. */
|
|
321
|
+
private tryRetried;
|
|
322
|
+
/** The plugin formula functions the host wired; see {@link formulaFunctions}. */
|
|
323
|
+
private formulaFunctionsValue;
|
|
324
|
+
private trySettingsControllerValue;
|
|
325
|
+
/** Try it in a mode's workspace: what the shell says is tried there; see {@link tryForm}. */
|
|
326
|
+
private tryFormValue;
|
|
327
|
+
/** The mode's session while Try it runs one (`BuilderModeTryIt.session`). */
|
|
328
|
+
private trySession;
|
|
329
|
+
/** Whether the renderer was handed the form's data sources for a session's runtime, so they come off after. */
|
|
330
|
+
private sessionSources;
|
|
331
|
+
/** The session's runtime whose changes the Try panel follows, and the way to stop following. */
|
|
332
|
+
private sessionWatch;
|
|
333
|
+
/** The mode whose session would not start this Try it: said once, the shared preview tried instead. */
|
|
334
|
+
private sessionFailedFor;
|
|
335
|
+
private tryPdfModeValue;
|
|
336
|
+
/** The zoom of a self-zooming surface (a template's page viewer) as Try it started over it, put back after. */
|
|
337
|
+
private trySurfaceZoom;
|
|
338
|
+
private pdfConfigurationValue;
|
|
339
|
+
/** The host chrome last handed to the renderer, so an unchanged one is not handed again (every assignment repaints). */
|
|
340
|
+
private appliedChrome;
|
|
341
|
+
/** The sheet's zoom: 1 is the form at its own size. The canvas's for the session, never the definition's. */
|
|
342
|
+
private zoomValue;
|
|
343
|
+
/** Which step the stepper shows, per steps container, until the preview's markup says otherwise. */
|
|
344
|
+
private stepperAt;
|
|
345
|
+
/** Watches the preview's markup so a repaint's fields are taken out of the Tab order again in edit mode. */
|
|
346
|
+
private inertWatch;
|
|
347
|
+
/** Stops the remote-picture guard on the renderer's shadow root. */
|
|
348
|
+
private remoteImageGuard;
|
|
349
|
+
private watchedRoot;
|
|
350
|
+
/** Names the document load the canvas shows; a new one is made on every load, so confirmations never carry over. */
|
|
351
|
+
private loadToken;
|
|
352
|
+
private inertQueued;
|
|
353
|
+
/**
|
|
354
|
+
* What the inspector reads of the form this canvas draws (`BuilderController.setDrawingSource`):
|
|
355
|
+
* the mounted form's adapters, the binding's capability answers and the name it draws under.
|
|
356
|
+
*/
|
|
357
|
+
private readonly drawingSource;
|
|
358
|
+
/** What the inspector last read of the selection's drawing, so a draw that moved nothing wakes nothing. */
|
|
359
|
+
private drawingSignal;
|
|
360
|
+
/** The Move to... dialog and the keyboard move mode, once their chunk is in. */
|
|
361
|
+
private mover;
|
|
362
|
+
constructor();
|
|
363
|
+
protected onControllerChange(reason: BuilderChangeReason, event?: BuilderChangeEvent): void;
|
|
364
|
+
/**
|
|
365
|
+
* Brings a component just added into view once the preview draws it: a
|
|
366
|
+
* palette click puts it where the selection is, or at the end of the form, often below the
|
|
367
|
+
* pane. "Nearest", so a drop — under the pointer already — scrolls nothing.
|
|
368
|
+
*/
|
|
369
|
+
private scrollToAdded;
|
|
370
|
+
disconnectedCallback(): void;
|
|
371
|
+
/** How far the sheet is moved from its centred place, in screen pixels. */
|
|
372
|
+
get pan(): {
|
|
373
|
+
x: number;
|
|
374
|
+
y: number;
|
|
375
|
+
};
|
|
376
|
+
/** Moves the sheet to an offset from its centred place, in screen pixels; `(0, 0)` centres it again. */
|
|
377
|
+
panTo(x: number, y: number): void;
|
|
378
|
+
/**
|
|
379
|
+
* How far the sheet may move: always some of it left in the page, so it can never be lost
|
|
380
|
+
* off an edge. `undefined` where nothing is measured (no layout yet), when any offset goes.
|
|
381
|
+
*/
|
|
382
|
+
private panRange;
|
|
383
|
+
/** The offset on the sheet: a translate the zoom would scale, so given in the sheet's own pixels. */
|
|
384
|
+
private applyPan;
|
|
385
|
+
private readonly onPanMove;
|
|
386
|
+
private readonly onPanEnd;
|
|
387
|
+
private endPan;
|
|
388
|
+
/**
|
|
389
|
+
* Live resize while a sheet edge is being dragged. The sheet is centered, so pulling one
|
|
390
|
+
* edge outward widens it on both sides — the width moves by twice the pointer's travel.
|
|
391
|
+
* Styles are written directly here and the result committed to the controller only on
|
|
392
|
+
* release, so the preview is not rebuilt on every mousemove.
|
|
393
|
+
*/
|
|
394
|
+
private readonly onSheetDrag;
|
|
395
|
+
/** Scrolls the page so the sheet sits centered — an over-wide one shows both overflows evenly. */
|
|
396
|
+
/**
|
|
397
|
+
* Opens or puts away the tools a narrow canvas folds behind one button: opening takes focus to
|
|
398
|
+
* the first of them (the bar is one Tab stop, so the card is reached from its button).
|
|
399
|
+
*/
|
|
400
|
+
private toggleCanvasMore;
|
|
401
|
+
/**
|
|
402
|
+
* The active mode's worded actions in the bar, from the shell: the primary one
|
|
403
|
+
* (`data-builder-primary`, Preview PDF) an accent pill before Try it, the others worded tools
|
|
404
|
+
* before the zoom, which a narrow canvas folds behind its one button. The elements are the
|
|
405
|
+
* mode's own, moved here, never copied; `modeLabel` names the folded card.
|
|
406
|
+
*/
|
|
407
|
+
setModeActions(controls: readonly HTMLElement[], modeLabel?: string): void;
|
|
408
|
+
private placeModeActions;
|
|
409
|
+
/** The canvas's zoom, 1 at the form's own size. */
|
|
410
|
+
get zoom(): number;
|
|
411
|
+
/**
|
|
412
|
+
* Zooms the sheet: a scale (held between a quarter and double), or "fit" for the whole sheet
|
|
413
|
+
* in the page, never above its own size. CSS zoom, so the page scrolls the scaled sheet and
|
|
414
|
+
* every click, drop and scroll into view lands where it is drawn. Fit is the one place the
|
|
415
|
+
* canvas measures, when asked.
|
|
416
|
+
*/
|
|
417
|
+
zoomTo(value: number | "fit" | "fit-width"): void;
|
|
418
|
+
/** The sheet and the page's room as they are drawn: the one place the canvas measures. */
|
|
419
|
+
private measureLayout;
|
|
420
|
+
/**
|
|
421
|
+
* A fixed sheet wider than the canvas is zoomed to fit its width, on first show and after each
|
|
422
|
+
* resize, until the author chooses a zoom. A zoom the auto-fit set comes off again
|
|
423
|
+
* when the room allows. A surface (the PDF's pages, the journey map) fits itself.
|
|
424
|
+
*/
|
|
425
|
+
fitIfOverflowing(): void;
|
|
426
|
+
/** The zoom that fits the sheet (its width, or the whole page) in the room, as {@link zoomWith} settles it; undefined unmeasured. */
|
|
427
|
+
private fitFactor;
|
|
428
|
+
/** Steps land on 100% again (1.25 times 0.8 is a hair off 1 in floating point), held between the ends. */
|
|
429
|
+
private settleZoom;
|
|
430
|
+
/** A surface that zooms itself has its own largest factor; the sheet's stops at double. */
|
|
431
|
+
private zoomMax;
|
|
432
|
+
/** Observes the page so a resize fits a fixed sheet again; jsdom has no ResizeObserver. */
|
|
433
|
+
private observeFit;
|
|
434
|
+
private zoomWith;
|
|
435
|
+
/**
|
|
436
|
+
* Makes the Try it controller once the chunk is in: the first Try it loads it, a
|
|
437
|
+
* failed load is reported in the panel with Try again. Resolves to `undefined` when the load failed.
|
|
438
|
+
*/
|
|
439
|
+
private startTry;
|
|
440
|
+
/** The Try it chunk did not load (or could not be made): the panel says so with Try again, and the host hears it. */
|
|
441
|
+
private tryLoadFailedWith;
|
|
442
|
+
/** The results sheet's grabber in step with the shell: its height and words ride on attributes of this element. */
|
|
443
|
+
private syncTryGrab;
|
|
444
|
+
/** The chunk's styles, appended to the shadow root once (the canvas's own sheet carries only the panel's place). */
|
|
445
|
+
private ensureTryStyles;
|
|
446
|
+
/** After Try again, focus follows the panel: the sheet's title on a phone, else the first control. */
|
|
447
|
+
private focusTryPanel;
|
|
448
|
+
/**
|
|
449
|
+
* Draws the Try it panel: the chunk's cards once it is in; until then a note ("Starting Try
|
|
450
|
+
* it…", the journey map's shape), or after a failed load the failure with Try again.
|
|
451
|
+
*/
|
|
452
|
+
private renderTryPanel;
|
|
453
|
+
/** The controller whose Submitting in Try it settings apply: the form's, else the canvas's own. */
|
|
454
|
+
private trySettingsSource;
|
|
455
|
+
private onTryClick;
|
|
456
|
+
/** Says a change in the canvas's live region (the zoom's level, where the selection landed). */
|
|
457
|
+
private announce;
|
|
458
|
+
/**
|
|
459
|
+
* The sheet's width as drawn, on the page for the room it keeps beside an open drawer
|
|
460
|
+
* (CANVAS_PANEL_STYLES): the applied width or the default, a fixed sheet's padding and border
|
|
461
|
+
* around it, times the zoom. Nothing is measured.
|
|
462
|
+
*/
|
|
463
|
+
private syncSheetRoom;
|
|
464
|
+
/** The zoom on the sheet and the bar: the level's readout, and the ends' buttons off. */
|
|
465
|
+
private applyZoom;
|
|
466
|
+
private centerSheetScroll;
|
|
467
|
+
private readonly onSheetDragEnd;
|
|
468
|
+
private ensureMarker;
|
|
469
|
+
private clearDropIndicator;
|
|
470
|
+
/**
|
|
471
|
+
* The shadow root the previewed form lives in. The canvas mounts a real
|
|
472
|
+
* `<datum-form-renderer>`, so the rendered fields sit one boundary deeper than the panel's
|
|
473
|
+
* own root — this is the supported way in for a host that needs to inspect or measure them.
|
|
474
|
+
*/
|
|
475
|
+
previewRoot(): ShadowRoot | undefined;
|
|
476
|
+
/** The design-time runtime backing the preview, once the canvas has a controller. */
|
|
477
|
+
previewRuntime(): BuilderPreviewRuntime | undefined;
|
|
478
|
+
/**
|
|
479
|
+
* Whether the canvas previews the form ("Try it"): its fields take input and
|
|
480
|
+
* its rules run, nothing is selected, and the builder's chrome — outlines, grips, the selection
|
|
481
|
+
* bar — is put away. Off (edit, the default), a field is one click target and the canvas is one
|
|
482
|
+
* Tab stop, its fields out of the Tab order.
|
|
483
|
+
*/
|
|
484
|
+
get previewing(): boolean;
|
|
485
|
+
set previewing(value: boolean);
|
|
486
|
+
/**
|
|
487
|
+
* The optional parts of the canvas that exist (the builder's `features`): the Try it
|
|
488
|
+
* panel (the answers, the checks, Submit, Preview PDF — and its chunk) and the selection bar's
|
|
489
|
+
* Add logic. All of them unless the shell says otherwise. The bar's Edit / Preview toggle is
|
|
490
|
+
* the canvas's own and stays: without `tryIt` it shows the form live, with its rules running,
|
|
491
|
+
* and no panel beside it. Turning the panel off with one up takes it down.
|
|
492
|
+
*/
|
|
493
|
+
get canvasFeatures(): {
|
|
494
|
+
readonly tryIt: boolean;
|
|
495
|
+
readonly logic: boolean;
|
|
496
|
+
};
|
|
497
|
+
set canvasFeatures(value: {
|
|
498
|
+
tryIt?: boolean | undefined;
|
|
499
|
+
logic?: boolean | undefined;
|
|
500
|
+
});
|
|
501
|
+
/**
|
|
502
|
+
* The server's checks the Try it panel can run (a host's WebAssembly sandbox): in
|
|
503
|
+
* hand, or a loader called the first time the author turns the validator on. Unset,
|
|
504
|
+
* the panel says the page provides none and checks in the browser alone.
|
|
505
|
+
*/
|
|
506
|
+
get serverChecks(): TryItServerChecksSource | undefined;
|
|
507
|
+
set serverChecks(value: TryItServerChecksSource | undefined);
|
|
508
|
+
/**
|
|
509
|
+
* The controller whose Submitting in Try it settings the form's Submit follows (the shell sets
|
|
510
|
+
* the form's own); unset, the canvas's.
|
|
511
|
+
*/
|
|
512
|
+
get trySettingsController(): BuilderController | undefined;
|
|
513
|
+
set trySettingsController(value: BuilderController | undefined);
|
|
514
|
+
/**
|
|
515
|
+
* What Try it tries while a mode's tree is on the canvas: the shell sets it as Try
|
|
516
|
+
* it starts there (inside `canvas-preview-change`, which the `previewing` setter dispatches
|
|
517
|
+
* before it paints) and clears it as Try it ends. No paint of its own: the `previewing`
|
|
518
|
+
* setter's paint draws the form in the mode's tree's place, and the mode's tree again after.
|
|
519
|
+
*/
|
|
520
|
+
get tryForm(): CanvasTryForm | undefined;
|
|
521
|
+
set tryForm(value: CanvasTryForm | undefined);
|
|
522
|
+
/**
|
|
523
|
+
* The definition's `pdf` block for Try it's fallback Preview PDF, through the canvas's own
|
|
524
|
+
* renderer: the preview hands it to the PDF it renders, which prints the layout the answers
|
|
525
|
+
* choose. The shell sets one only on a page with no PDF mode, whose
|
|
526
|
+
* `tryIt.pdf` otherwise prints (it alone resolves a layout's templates and images).
|
|
527
|
+
*/
|
|
528
|
+
set pdfConfigurationSource(value: (() => PdfConfiguration | undefined) | undefined);
|
|
529
|
+
get pdfConfigurationSource(): (() => PdfConfiguration | undefined) | undefined;
|
|
530
|
+
/** The mode lending `tryIt.pdf` (the PDF designer), read on every Preview PDF: it prints from every workspace. Set by the shell. */
|
|
531
|
+
set tryPdfMode(value: (() => BuilderMode | undefined) | undefined);
|
|
532
|
+
get tryPdfMode(): (() => BuilderMode | undefined) | undefined;
|
|
533
|
+
/**
|
|
534
|
+
* A mode's session changed what it shows (a journey moved on, restarted, was edited live): the
|
|
535
|
+
* Try panel is drawn again, and the renderer takes the session's runtime when it is a new one.
|
|
536
|
+
*/
|
|
537
|
+
tryRefresh(): void;
|
|
538
|
+
/**
|
|
539
|
+
* Clear answers from outside the Try panel (the PDF preview dialog's Clear): the
|
|
540
|
+
* panel's own when its chunk is in, else the shared store emptied and a session started over.
|
|
541
|
+
*/
|
|
542
|
+
clearTriedAnswers(): void;
|
|
543
|
+
/**
|
|
544
|
+
* The runtime Try it tries now: a mode's session's (a journey's, page by page) while one runs,
|
|
545
|
+
* else the canvas's preview; `undefined` while the canvas edits rather than tries.
|
|
546
|
+
*
|
|
547
|
+
* @internal
|
|
548
|
+
*/
|
|
549
|
+
triedRuntime(): RenderHostRuntime | undefined;
|
|
550
|
+
/**
|
|
551
|
+
* Resolves once what Try it shows is drawn: a mode's session started (a journey's preview, its
|
|
552
|
+
* chunk in, `BuilderTrySession.ready`), then the renderer's paint of it.
|
|
553
|
+
*
|
|
554
|
+
* @internal
|
|
555
|
+
*/
|
|
556
|
+
tryReady(): Promise<void>;
|
|
557
|
+
/**
|
|
558
|
+
* The journey page id of the node a page runs under in the session tried; `undefined` with no
|
|
559
|
+
* session (the preview runs pages under their own ids) or no such page node.
|
|
560
|
+
*
|
|
561
|
+
* @internal
|
|
562
|
+
*/
|
|
563
|
+
tryPageIdOf(nodeId: string): string | undefined;
|
|
564
|
+
/**
|
|
565
|
+
* The node a journey page runs under in the session tried, from its page id; `undefined` with
|
|
566
|
+
* no session or no such page.
|
|
567
|
+
*
|
|
568
|
+
* @internal
|
|
569
|
+
*/
|
|
570
|
+
tryNodeIdOf(pageId: string): string | undefined;
|
|
571
|
+
/**
|
|
572
|
+
* Check now, as the panel's button does (loading the chunk first), with what it found. Rejects
|
|
573
|
+
* with the `try-it` feature off (no chunk is asked for), when the chunk cannot be loaded (the
|
|
574
|
+
* panel then says so with Try again), and when Try it is not on, or ended while the chunk came.
|
|
575
|
+
*
|
|
576
|
+
* @internal
|
|
577
|
+
*/
|
|
578
|
+
agentTryCheck(): Promise<TryCheckOutcome>;
|
|
579
|
+
/**
|
|
580
|
+
* The form's Submit in Try it (loading the chunk first), quiet while the person's focus is
|
|
581
|
+
* outside the canvas; see `TryItController.submitForAgent`. Rejects as
|
|
582
|
+
* {@link agentTryCheck} does: the feature off, the chunk not loaded, Try it not on or ended
|
|
583
|
+
* while the chunk came (as the person's own Submit queued on the load is dropped then).
|
|
584
|
+
*
|
|
585
|
+
* @internal
|
|
586
|
+
*/
|
|
587
|
+
agentTrySubmit(): Promise<TrySubmitOutcome | {
|
|
588
|
+
state: "busy";
|
|
589
|
+
}>;
|
|
590
|
+
/**
|
|
591
|
+
* The Try it controller for an agent's check or Submit: never with the `try-it` feature off (the
|
|
592
|
+
* host left the chunk out), and only while the Try panel is on show once the chunk is
|
|
593
|
+
* in, the rule the person's Submit queued on the load follows (`datum-form-action`): the person
|
|
594
|
+
* may press Back to editing while it comes, and nothing then runs against the editing canvas.
|
|
595
|
+
*
|
|
596
|
+
* @internal
|
|
597
|
+
*/
|
|
598
|
+
private agentTryIt;
|
|
599
|
+
/**
|
|
600
|
+
* The next page change of the form tried takes no focus while the person's focus is outside
|
|
601
|
+
* it (the renderer's `quietNextPageFocus`); the returned release ends the quiet once the move
|
|
602
|
+
* settles. A no-op release while there is no renderer.
|
|
603
|
+
*
|
|
604
|
+
* @internal
|
|
605
|
+
*/
|
|
606
|
+
quietTriedPageFocus(): () => void;
|
|
607
|
+
/**
|
|
608
|
+
* The value path of the box the person is typing in on the form tried (a text box, a text
|
|
609
|
+
* area: `isCaretControl`), while the document has focus and Try it is on; `undefined` otherwise.
|
|
610
|
+
* A select, a checkbox or a button that has focus is not typing.
|
|
611
|
+
*
|
|
612
|
+
* @internal
|
|
613
|
+
*/
|
|
614
|
+
focusedTriedPath(): string | undefined;
|
|
615
|
+
/**
|
|
616
|
+
* Whether the canvas records Try it for the Tests panel (Record).
|
|
617
|
+
*
|
|
618
|
+
* @internal
|
|
619
|
+
*/
|
|
620
|
+
tryRecording(): boolean;
|
|
621
|
+
/**
|
|
622
|
+
* Whether a test's step is on show (Show me).
|
|
623
|
+
*
|
|
624
|
+
* @internal
|
|
625
|
+
*/
|
|
626
|
+
tryShowing(): boolean;
|
|
627
|
+
/**
|
|
628
|
+
* Whether the person turned Try it's server checks on in the panel; `"off"` before the chunk is in.
|
|
629
|
+
*
|
|
630
|
+
* @internal
|
|
631
|
+
*/
|
|
632
|
+
tryServerChecks(): "off" | "on";
|
|
633
|
+
/**
|
|
634
|
+
* Hears every Submit in Try it, the person's and an agent's (`builder-try-submit`), until the
|
|
635
|
+
* returned function is called.
|
|
636
|
+
*
|
|
637
|
+
* @internal
|
|
638
|
+
*/
|
|
639
|
+
onTrySubmit(listener: (outcome: TrySubmitOutcome) => void): () => void;
|
|
640
|
+
/**
|
|
641
|
+
* Where the Try it chunk stands for this canvas: `"off"` with the `try-it` feature off,
|
|
642
|
+
* `"loading"` while a load is in flight, `"failed"` after the last load failed (until a Try
|
|
643
|
+
* again or an agent's call loads it), `"ready"` once its controller is made, or before any
|
|
644
|
+
* load: the first Try it, or an agent's check or Submit, loads it.
|
|
645
|
+
*
|
|
646
|
+
* @internal
|
|
647
|
+
*/
|
|
648
|
+
tryChunkState(): "ready" | "loading" | "failed" | "off";
|
|
649
|
+
/** The test's step on show, handed by the Tests panel; see {@link showScenario}. */
|
|
650
|
+
private showingValue;
|
|
651
|
+
/** The tree the showing was set on: an edit replaces it, and the state shown is then not what the test saw. */
|
|
652
|
+
private showingRoot;
|
|
653
|
+
/** The test's step on show on the canvas, if any (Show me). */
|
|
654
|
+
get scenarioShowing(): CanvasScenarioShowing | undefined;
|
|
655
|
+
/**
|
|
656
|
+
* Shows a test's step on the canvas (Show me): Try it on, the tried
|
|
657
|
+
* answers replaced by the step's `values` (by component id, as the preview's `setValue` takes
|
|
658
|
+
* them), and the Try bar naming the step with Step back, Step forward and Stop showing. The
|
|
659
|
+
* panel owns the replay and calls again with the next step. `undefined` forgets the showing and
|
|
660
|
+
* leaves the answers and Try it as they are. The showing also ends, the panel told once through
|
|
661
|
+
* its `onStop`, on Back to editing and on an edit of the form under it.
|
|
662
|
+
*/
|
|
663
|
+
showScenario(showing: CanvasScenarioShowing | undefined): void;
|
|
664
|
+
/**
|
|
665
|
+
* Gives each collection as many rows as the scenario had at the step, before the answers go in:
|
|
666
|
+
* a row added with nothing typed has no key in the values, and would not be drawn otherwise
|
|
667
|
+
*. Rows past the count (the form's starting rows) are left; a collection the preview
|
|
668
|
+
* cannot add to (no Add, at its maximum, not a collection here) keeps what it has.
|
|
669
|
+
*/
|
|
670
|
+
private seedShowingRows;
|
|
671
|
+
/**
|
|
672
|
+
* Which of a replay's keys the canvas sets: those whose last segment names a component of the
|
|
673
|
+
* tree, by id or data key, and not a calculation's (the rules work its value out
|
|
674
|
+
* from the others, and a value written to it would count as a typed answer). The runtime's own
|
|
675
|
+
* "@" keys are a journey's, not answers.
|
|
676
|
+
*/
|
|
677
|
+
private showingKeys;
|
|
678
|
+
/** Ends the showing and tells the panel once; a re-entrant `showScenario(undefined)` from its `onStop` finds nothing left to end. */
|
|
679
|
+
private endShowing;
|
|
680
|
+
/**
|
|
681
|
+
* After the preview took the tree a paint draws: an edit of the form ends the showing,
|
|
682
|
+
* a tree swapped in whole (Try it over a designer's tree) is where the showing now sits.
|
|
683
|
+
*/
|
|
684
|
+
private followShowingRoot;
|
|
685
|
+
/**
|
|
686
|
+
* Gives the runtimes drawn the host values of Try it's Settings: the canvas's preview, and a
|
|
687
|
+
* mode's session runtime when it takes them (`FormRuntime.setHostContext`; one that does not is
|
|
688
|
+
* left as it is). Each only when its own values differ, so a paint that moved nothing computes
|
|
689
|
+
* nothing again.
|
|
690
|
+
*/
|
|
691
|
+
private applyTryHostContext;
|
|
692
|
+
/** Set while a paint ends a showing, so {@link restoreShowingGivens} waits for the paint to finish. */
|
|
693
|
+
private givensLater;
|
|
694
|
+
/**
|
|
695
|
+
* The givens of the showing on the canvas, as applied: what put them there is undone in
|
|
696
|
+
* reverse when the showing goes, and what the canvas has no seam for is named in the bar.
|
|
697
|
+
*/
|
|
698
|
+
private showingGivens;
|
|
699
|
+
/**
|
|
700
|
+
* Applies a showing's givens where the canvas has a seam: `given options
|
|
701
|
+
* for` as the controller's simulated list for the field's data source, `given locale` as the
|
|
702
|
+
* preview's language, `given today` as the preview's day, `given host` as the host values the
|
|
703
|
+
* rules read (the preview's and a mode's session runtime's, in place of Try it's Settings'
|
|
704
|
+
* while it is shown); each put back when the showing goes. A day or a language has no seam in a
|
|
705
|
+
* mode's session, which runs its own runtime (named in the bar). A step of the same scenario
|
|
706
|
+
* keeps them as applied.
|
|
707
|
+
*/
|
|
708
|
+
private applyShowingGivens;
|
|
709
|
+
/** Puts back what a showing's givens changed, last first. */
|
|
710
|
+
private restoreShowingGivens;
|
|
711
|
+
/** The Tests panel's listener while the canvas records what is done in Try it. */
|
|
712
|
+
private recordingListener;
|
|
713
|
+
/** Whether the canvas records for the Tests panel (Record). */
|
|
714
|
+
get recording(): boolean;
|
|
715
|
+
/**
|
|
716
|
+
* Record: turns Try it on if it is off and reports what the author does
|
|
717
|
+
* in it to `listener` (the Try it chunk turns the tried runtime's settled events into
|
|
718
|
+
* `TestsRecordEvent`s), the Try bar reading "Recording" with Stop recording, until the returned
|
|
719
|
+
* function is called. Stop recording in the bar, Clear answers and Back to editing end it from
|
|
720
|
+
* this side; `canvas-record-change` (bubbling, composed) says so, as it says a start. A second
|
|
721
|
+
* recording replaces the first.
|
|
722
|
+
*/
|
|
723
|
+
recordTry(listener: TestsRecordListener): () => void;
|
|
724
|
+
/** Assert this: the tried runtime's fields, page and last Submit now; `undefined` while Try it is off. */
|
|
725
|
+
assertSnapshot(): TestsAssertSnapshot | undefined;
|
|
726
|
+
/**
|
|
727
|
+
* Whether {@link assertSnapshot} would give a form now, without building one: the Tests panel
|
|
728
|
+
* asks on every paint whether to offer Assert this, and a snapshot is every field's state.
|
|
729
|
+
*/
|
|
730
|
+
get assertReady(): boolean;
|
|
731
|
+
/** Ends the recording, what the chunk held back sent to its listener first, and says so. */
|
|
732
|
+
private endRecording;
|
|
733
|
+
/** Puts back the preview's day after a recording that lent it one; see {@link lendRecordingDay}. */
|
|
734
|
+
private recordingDayUndo;
|
|
735
|
+
/**
|
|
736
|
+
* A recording on a preview with no day runs on the author's calendar day, put back when it ends
|
|
737
|
+
*: the canvas's preview has no day of its own, so a form
|
|
738
|
+
* that reads the clock would be tried with none, and the test written from it could only end
|
|
739
|
+
* `scenario.clockUnset`. With the day lent, the rules on screen read the day the snapshot
|
|
740
|
+
* carries, and the panel writes it as the test's `given today` line. A preview that already
|
|
741
|
+
* has a day keeps it; a mode's session runs a runtime of its own and is left alone.
|
|
742
|
+
*/
|
|
743
|
+
private lendRecordingDay;
|
|
744
|
+
/** The Try panel follows the answers typed into a session's runtime, as it does the preview's. */
|
|
745
|
+
private watchSession;
|
|
746
|
+
/**
|
|
747
|
+
* Ends a mode's session: its form answers, raw as its store holds them
|
|
748
|
+
* (the journey's own "@" keys aside), replace the canvas's, so Form and PDF see what was tried
|
|
749
|
+
* and an answer cleared there stays cleared; then it is disposed.
|
|
750
|
+
*/
|
|
751
|
+
private endTrySession;
|
|
752
|
+
/** What is tried while a mode's tree is on the canvas; `undefined` outside Try it or on the form's own canvas. */
|
|
753
|
+
private tryingForm;
|
|
754
|
+
/** The controller whose tree the sheet draws: the form's while a mode's workspace is tried, else the canvas's. */
|
|
755
|
+
private sheetController;
|
|
756
|
+
/** The surface in the sheet's place, as the bar's tools see it: none while the form is tried over a mode's. */
|
|
757
|
+
private shownSurface;
|
|
758
|
+
/** What the Try it panel's Preview PDF renders with; unset, the panel offers no PDF. */
|
|
759
|
+
get tryPdf(): TryItPdfSource | undefined;
|
|
760
|
+
/**
|
|
761
|
+
* The plugin formula functions the host wired (`FormulaFunctionRegistry`, or anything shaped
|
|
762
|
+
* like one): the canvas preview parses a rule calling one and, when the source carries the
|
|
763
|
+
* evaluators (`functions()`), works it out as the form will. Set by the shell; a source set
|
|
764
|
+
* after the preview was built reaches it too.
|
|
765
|
+
*/
|
|
766
|
+
set formulaFunctions(value: FormulaFunctionsSource | undefined);
|
|
767
|
+
get formulaFunctions(): FormulaFunctionsSource | undefined;
|
|
768
|
+
/** The wired functions' evaluators, when the source carries them; see {@link FormulaFunctionsSource.functions}. */
|
|
769
|
+
private pluginFunctions;
|
|
770
|
+
/** The print theme Try it's Print draws with (the shell's `printTheme`). */
|
|
771
|
+
set printTheme(value: PrintTheme | undefined);
|
|
772
|
+
get printTheme(): PrintTheme | undefined;
|
|
773
|
+
private printThemeValue;
|
|
774
|
+
/** Sets up a renderer of the Print workspace's as this canvas's is drawn: the binding and its files, never written into the form. */
|
|
775
|
+
configurePrintRenderer(renderer: DatumFormRendererElement): void;
|
|
776
|
+
set tryPdf(value: TryItPdfSource | undefined);
|
|
777
|
+
/** Component ids the preview is currently hiding, for the properties panel's Tree tab. */
|
|
778
|
+
hiddenComponentIds(): ReadonlySet<string>;
|
|
779
|
+
protected render(): void;
|
|
780
|
+
/**
|
|
781
|
+
* Puts `data-sheet-scheme` on the renderer when the sheet's scheme differs from the builder's,
|
|
782
|
+
* so CANVAS_CHROME_STYLES re-pins the on-sheet tokens only where the builder's own
|
|
783
|
+
* palette would sit on the wrong paper: a dark builder over a light sheet, or the reverse. The
|
|
784
|
+
* builder's scheme is the inline `--db-color-scheme` the shell writes on this host (absent is
|
|
785
|
+
* light); the sheet's is the scheme the form is drawn in (`canvasColorScheme()`) as the last
|
|
786
|
+
* paint read it. The same scheme leaves the attribute off and the chrome keeps the builder's
|
|
787
|
+
* palette. The shell calls it after it writes the builder's theme, because the builder's scheme can
|
|
788
|
+
* change with no repaint of the canvas.
|
|
789
|
+
*/
|
|
790
|
+
syncSheetScheme(): void;
|
|
791
|
+
/** The scheme the form was drawn in as the last paint read it (`canvasColorScheme()`). */
|
|
792
|
+
private sheetScheme;
|
|
793
|
+
/**
|
|
794
|
+
* The canvas bar (device widths, Try it) and the selection bar, drawn from
|
|
795
|
+
* the controller: in one fixed place each, never attached to a field, so no geometry is measured.
|
|
796
|
+
*/
|
|
797
|
+
private syncCanvasChrome;
|
|
798
|
+
/**
|
|
799
|
+
* The steps container the stepper walks ("Step 2 of 4 · Business details"): the one
|
|
800
|
+
* around the selection, else the form's first. Its steps are its children.
|
|
801
|
+
*/
|
|
802
|
+
private stepperSubject;
|
|
803
|
+
/** The step the preview shows for a container: the step drawn (the renderer draws the shown one), else the one last chosen here. */
|
|
804
|
+
private stepperIndex;
|
|
805
|
+
/**
|
|
806
|
+
* The canvas bar is put away while nothing in it shows (the journey map's surface has its own
|
|
807
|
+
* zoom, no Try it and no steps to walk), so no empty pill is left at the canvas's top corner.
|
|
808
|
+
* The room kept above the page for it goes with it.
|
|
809
|
+
*/
|
|
810
|
+
private syncCanvasBarShown;
|
|
811
|
+
private syncStepper;
|
|
812
|
+
/** Previous or next: the preview opens that step (as its indicator would), the selection stays. */
|
|
813
|
+
private goStep;
|
|
814
|
+
/**
|
|
815
|
+
* Edit mode: every focusable thing in the fields' own markup leaves the Tab
|
|
816
|
+
* order, so the canvas is one Tab stop and the arrow keys walk the components; the pointer is
|
|
817
|
+
* kept off the controls by CSS. Preview puts them all back. Run after every repaint of the preview.
|
|
818
|
+
*/
|
|
819
|
+
private applyEditInertness;
|
|
820
|
+
/**
|
|
821
|
+
* Marks the drop zones on what was just drawn: where the binding drew each slot's
|
|
822
|
+
* components, an empty slot's own zone, the root's. Only while editing: the form previewed or
|
|
823
|
+
* tried is a person's, and takes no drops.
|
|
824
|
+
*/
|
|
825
|
+
private markZones;
|
|
826
|
+
/**
|
|
827
|
+
* The sheet in the form's own page colour (see .canvas-surface): the binding's surface lands
|
|
828
|
+
* on the drawn form inside the renderer's shadow root, so it is read off there after a draw.
|
|
829
|
+
* A transparent form (Datum's light look) leaves the sheet its own white.
|
|
830
|
+
*/
|
|
831
|
+
private syncSheetColour;
|
|
832
|
+
/**
|
|
833
|
+
* Wakes the inspector when the draw that just landed moved how the selection is drawn: its
|
|
834
|
+
* adapter (the first draw of a component just added, a binding picked) or what the binding
|
|
835
|
+
* answers for its type. Said once per change, so a draw that moved nothing repaints nothing.
|
|
836
|
+
*/
|
|
837
|
+
private syncDrawing;
|
|
838
|
+
private queueEditInertness;
|
|
839
|
+
/** The selection bar's and the keyboard's actions on the selected component. */
|
|
840
|
+
/**
|
|
841
|
+
* The selection bar's actions by name (`up`, `down`, `duplicate`, `logic`, `delete`), for the
|
|
842
|
+
* command palette: the same guarded paths, Delete's confirmation included.
|
|
843
|
+
*/
|
|
844
|
+
runAction(action: "up" | "down" | "move" | "duplicate" | "logic" | "delete"): void;
|
|
845
|
+
/** See {@link selectionGuard}. */
|
|
846
|
+
private selectionGuardValue;
|
|
847
|
+
/**
|
|
848
|
+
* What the canvas asks before a request that takes the selection out of the inspector's sight
|
|
849
|
+
*: another selection (a click, a region's click, the keyboard walk, Escape, a click on
|
|
850
|
+
* empty canvas), a removal, Move to.... The shell sets it while the mode on the page inspects
|
|
851
|
+
* on another controller than the canvas's (a form field placed on a journey step, edited on the
|
|
852
|
+
* form's controller): `run` then waits for that component's unsaved edits to be answered in the
|
|
853
|
+
* inspector, which the canvas's own controller knows nothing of. Answers whether `run` ran now.
|
|
854
|
+
* Unset (the Form canvas, a canvas used on its own): every request runs at once, as always.
|
|
855
|
+
* Setting it paints nothing.
|
|
856
|
+
*/
|
|
857
|
+
get selectionGuard(): ((run: () => void) => boolean) | undefined;
|
|
858
|
+
set selectionGuard(value: ((run: () => void) => boolean) | undefined);
|
|
859
|
+
/** Runs `run` through {@link selectionGuard}, or at once without one. */
|
|
860
|
+
private guarded;
|
|
861
|
+
/** See {@link deleteAction}. */
|
|
862
|
+
private deleteActionValue;
|
|
863
|
+
/** Whether the bar's Delete button carries {@link deleteAction}'s words, to be put back when it goes. */
|
|
864
|
+
private deleteRelabelled;
|
|
865
|
+
/**
|
|
866
|
+
* What the selection bar's Delete (and the Delete key) does for the selection named, when a
|
|
867
|
+
* mode says so (`BuilderInspectorAction.deleteLabel`): "Take off this step" for a form
|
|
868
|
+
* field placed on a journey step, run with no delete confirmation (it takes away a placement,
|
|
869
|
+
* one undo step, nothing of the form). The shell sets it for the selection as it moves, `run`
|
|
870
|
+
* already behind its guard. For any other selection, or unset, Delete is as always. Setting it
|
|
871
|
+
* paints nothing: the bar's button is reworded in place.
|
|
872
|
+
*/
|
|
873
|
+
get deleteAction(): {
|
|
874
|
+
componentId: string;
|
|
875
|
+
label: string;
|
|
876
|
+
run(): void;
|
|
877
|
+
} | undefined;
|
|
878
|
+
set deleteAction(value: {
|
|
879
|
+
componentId: string;
|
|
880
|
+
label: string;
|
|
881
|
+
run(): void;
|
|
882
|
+
} | undefined);
|
|
883
|
+
/** The Delete action for the selection now: the mode's (see {@link deleteAction}) when it names it. */
|
|
884
|
+
private deleteActionFor;
|
|
885
|
+
/** Words the bar's Delete as the mode's action for the selection, or puts its own words back. */
|
|
886
|
+
private syncDeleteLabel;
|
|
887
|
+
private runSelectionAction;
|
|
888
|
+
/** Delete asks first, with the inspector's own prompt (it names the subtree that goes with it). */
|
|
889
|
+
private openDeleteConfirm;
|
|
890
|
+
private closeDeleteConfirm;
|
|
891
|
+
/**
|
|
892
|
+
* A choice field's "No options yet": the field is selected through the unsaved-edits
|
|
893
|
+
* guard, the inspector opened as Enter opens it, and its options editor put up. A selection
|
|
894
|
+
* the guard holds (its prompt is up) goes no further.
|
|
895
|
+
*/
|
|
896
|
+
private editOptionsOf;
|
|
897
|
+
/** The component whose "No options yet" was clicked while the unsaved prompt held the selection. */
|
|
898
|
+
private pendingEditOptions;
|
|
899
|
+
protected onSelectionChange(): void;
|
|
900
|
+
private openOptionsEditorOn;
|
|
901
|
+
/**
|
|
902
|
+
* The mover, once its chunk is in: `run` gets it then. A load that fails is forgotten (the
|
|
903
|
+
* module's memo retries), and the canvas is as it was; nothing is said for a key press.
|
|
904
|
+
*/
|
|
905
|
+
private withMover;
|
|
906
|
+
/** What the mover borrows from the canvas: its controller, roots, words and the drag's marker. */
|
|
907
|
+
private moverHost;
|
|
908
|
+
/** Arrow keys walk the components in reading order; the selection says where it landed. */
|
|
909
|
+
private stepSelection;
|
|
910
|
+
/**
|
|
911
|
+
* Selects `componentId` from a click: through the controller's own guard, and first through
|
|
912
|
+
* {@link selectionGuard} when the selection moves. The component already selected is
|
|
913
|
+
* selected again at once, as the controller does.
|
|
914
|
+
*/
|
|
915
|
+
private selectAway;
|
|
916
|
+
/**
|
|
917
|
+
* Shows a mode's surface in the sheet's place — a populated PDF's pages — or,
|
|
918
|
+
* with `undefined`, the sheet again. The page around it keeps scrolling; the panels beside
|
|
919
|
+
* the canvas stay where they are.
|
|
920
|
+
*/
|
|
921
|
+
/**
|
|
922
|
+
* Puts a mode's surface (a PDF's pages) in place of the sheet, with the mode's
|
|
923
|
+
* stylesheet beside it: the surface lands inside this panel's shadow root, which the
|
|
924
|
+
* shell's own copy of that stylesheet does not reach.
|
|
925
|
+
*/
|
|
926
|
+
showSurface(surface: HTMLElement | undefined, styles?: string, options?: CanvasSurfaceOptions): void;
|
|
927
|
+
/** The surface on the canvas right now, if a mode put one there. */
|
|
928
|
+
surface(): HTMLElement | undefined;
|
|
929
|
+
private syncSurface;
|
|
930
|
+
/**
|
|
931
|
+
* The hooks last built and what they were built from: the selection, the slots each
|
|
932
|
+
* component declares, the empty slots' hints and the icon set. A change that leaves all four
|
|
933
|
+
* as they were (a commit of a label the canvas already previewed) reuses them, so the preview
|
|
934
|
+
* is not repainted for decoration that did not move.
|
|
935
|
+
*/
|
|
936
|
+
private hooksMemo;
|
|
937
|
+
/** The page chrome's owner as the last hooks build read it (`canvasRegionOwner`): the name its boxes are drawn with. */
|
|
938
|
+
private regionOwnerNow;
|
|
939
|
+
/** The binding last laid over with a tree's own types, and what it was made from: a new one would mount the form again. */
|
|
940
|
+
private extendedBinding;
|
|
941
|
+
/**
|
|
942
|
+
* What the canvas's form element draws with: the controller's binding under the builder's
|
|
943
|
+
* scheme (a binding, a registered id, or `undefined` for Datum's), with the component
|
|
944
|
+
* definitions' own types laid over it (`ComponentDefinition.adapter`, `componentDrawing`) and
|
|
945
|
+
* the tree's own types (`canvasComponents`, a designer's) over those. The same object while
|
|
946
|
+
* none of that changes, since the element mounts the form again for a new one.
|
|
947
|
+
*/
|
|
948
|
+
private canvasBindingOf;
|
|
949
|
+
/** The builder's words (the text catalog) for this panel's own chrome. */
|
|
950
|
+
private readonly words;
|
|
951
|
+
/** The builder's own language for its words (the text catalog's locale), not the form's. */
|
|
952
|
+
set textLocale(value: string | undefined);
|
|
953
|
+
/** A host's translations of the builder's words, by key; absent keys fall back to English. */
|
|
954
|
+
set textCatalog(value: BuilderTextCatalog | undefined);
|
|
955
|
+
/** The words options: the builder's own locale and catalog when the host set them, else the form's locale. */
|
|
956
|
+
private wordsFor;
|
|
957
|
+
/**
|
|
958
|
+
* The shell is built once, so a change of the builder's words relabels its static controls in
|
|
959
|
+
* place (the dynamic ones, such as the zoom readout and the selection bar, are written again
|
|
960
|
+
* by the next sync) and repaints the preview for the words the chrome draws inside it.
|
|
961
|
+
*/
|
|
962
|
+
private onWordsChanged;
|
|
963
|
+
private relabelShell;
|
|
964
|
+
private buildHooks;
|
|
965
|
+
/**
|
|
966
|
+
* The shell is built once, so a new icon set repaints the toolbar's glyph slots in place
|
|
967
|
+
* (the show-hidden toggle's with the state it shows), refreshes the set's CSS here and in the
|
|
968
|
+
* renderer, and repaints the preview for the drag grips it draws.
|
|
969
|
+
*/
|
|
970
|
+
protected onIconsChange(): void;
|
|
971
|
+
/**
|
|
972
|
+
* Whether a drag carries a builder payload. `dataTransfer.getData` is empty until `drop`
|
|
973
|
+
* (the browser withholds a drag's data while it is in flight), but `types` is readable — so
|
|
974
|
+
* this is the only way to tell one of our drags from a file or a text selection during
|
|
975
|
+
* `dragover`, and it keeps the canvas from swallowing drags that are not ours.
|
|
976
|
+
*/
|
|
977
|
+
private isBuilderDrag;
|
|
978
|
+
/**
|
|
979
|
+
* The root's own drop zone, used when a drag is over the canvas but no closer zone: the
|
|
980
|
+
* first slot the root declares — a form's `content`, a PDF document's `body` — so a drop on
|
|
981
|
+
* blank paper appends to the document. Taking the root's first zone in document order
|
|
982
|
+
* instead put every such drop on the PDF sheet into the header band, which the page draws
|
|
983
|
+
* first. That first zone remains the answer for a root whose slots the tree does not list.
|
|
984
|
+
*/
|
|
985
|
+
private rootDropZone;
|
|
986
|
+
/**
|
|
987
|
+
* Watches the renderer element's shadow root: edit-mode inertness and the remote-picture guard.
|
|
988
|
+
* Runs for every renderer element the canvas creates (a no-controller render drops it and a
|
|
989
|
+
* later render builds another), and again if the root was not there yet; the previous watchers go.
|
|
990
|
+
*/
|
|
991
|
+
private watchRenderer;
|
|
992
|
+
private bind;
|
|
993
|
+
private clearDragging;
|
|
994
|
+
}
|
|
995
|
+
/** What a {@link DatumBuilderPropertiesElement} edits; see its `subject`. */
|
|
996
|
+
export type InspectorSubject = "selection" | "root";
|
|
997
|
+
/** Where the plugin functions a host wired come from: its `FormulaFunctionRegistry`, or anything shaped like one. */
|
|
998
|
+
export interface FormulaFunctionsSource {
|
|
999
|
+
table(): readonly FormulaFunctionTableRow[];
|
|
1000
|
+
signatures(): FormulaFunctionSignature[];
|
|
1001
|
+
/**
|
|
1002
|
+
* The functions' evaluators by name (a `FormulaFunctionRegistry` has them): what the canvas
|
|
1003
|
+
* preview and Logic's Try it evaluate a call to a plugin function with. A source without them
|
|
1004
|
+
* lists and parses the names only, and a call to one works out to nothing while authoring.
|
|
1005
|
+
*/
|
|
1006
|
+
functions?(): Record<string, (args: unknown[]) => unknown>;
|
|
1007
|
+
}
|
|
1008
|
+
/** One mode's rows on the Form panel, as the shell hands them over. */
|
|
1009
|
+
export interface FormPanelModeSettings {
|
|
1010
|
+
mode: string;
|
|
1011
|
+
title: string;
|
|
1012
|
+
rows: readonly BuilderFormSettingRow[];
|
|
1013
|
+
/** Rows that only say something, after the choices: nothing drafted, nothing saved. */
|
|
1014
|
+
readOnlyRows?: readonly BuilderFormSettingReadOnlyRow[] | undefined;
|
|
1015
|
+
}
|
|
1016
|
+
export declare class DatumBuilderPropertiesElement extends BuilderPanelElement {
|
|
1017
|
+
private bound;
|
|
1018
|
+
private tab;
|
|
1019
|
+
/**
|
|
1020
|
+
* The inspector's tab: Properties, Rules, and the rest the inspector offers (the Logic
|
|
1021
|
+
* workspace opens Rules). A tab the inspector does not offer for the current
|
|
1022
|
+
* subject is ignored.
|
|
1023
|
+
*/
|
|
1024
|
+
get inspectorTab(): InspectorTab;
|
|
1025
|
+
set inspectorTab(value: InspectorTab);
|
|
1026
|
+
/**
|
|
1027
|
+
* The subject the open tab was chosen for: another component opens on the Field
|
|
1028
|
+
* tab, so a tab picked for one (the JSON view, Style) is not where the next one opens. The
|
|
1029
|
+
* same component, re-selected or repainted, keeps its tab.
|
|
1030
|
+
*/
|
|
1031
|
+
private tabSubject;
|
|
1032
|
+
private noteTabSubject;
|
|
1033
|
+
/** Focus the first control of the open tab (Enter on the canvas). Whether one took it. */
|
|
1034
|
+
focusFirstField(): boolean;
|
|
1035
|
+
/**
|
|
1036
|
+
* Opens the options editor for `path` on `componentId` when that is what this panel inspects
|
|
1037
|
+
* (the canvas's "No options yet"), as the row's Edit options button does. Whether it opened.
|
|
1038
|
+
*/
|
|
1039
|
+
editOptions(componentId: string, path?: string): boolean;
|
|
1040
|
+
/**
|
|
1041
|
+
* Focus the control after the Label box: the next box, select or button in the
|
|
1042
|
+
* body as drawn now, past the "?" toggles and the section headings, and past what a folded
|
|
1043
|
+
* section or the filter hides. Nothing after it: focus stays on the box.
|
|
1044
|
+
*/
|
|
1045
|
+
private focusAfterLabel;
|
|
1046
|
+
/** Whether the Rules tab is offered; see {@link showRulesTab}. */
|
|
1047
|
+
private showRulesTabValue;
|
|
1048
|
+
/** What the panel edits; see {@link subject}. */
|
|
1049
|
+
protected subjectValue: InspectorSubject;
|
|
1050
|
+
/** What the root panel's heading says it is editing; see {@link settingsLabel}. */
|
|
1051
|
+
private settingsLabelValue;
|
|
1052
|
+
/** The subject's own state as of the last paint; see {@link onControllerChange}. */
|
|
1053
|
+
private subjectKey;
|
|
1054
|
+
/** Whose properties, on which tab, the last paint drew: a repaint of the same keeps the body's scroll. */
|
|
1055
|
+
private paintedView;
|
|
1056
|
+
/** Component awaiting delete confirmation, from the footer or a Tree-tab row. */
|
|
1057
|
+
private pendingDeleteId;
|
|
1058
|
+
/** Whether the tabs' ⋯ menu is open. */
|
|
1059
|
+
private inspectorMenuOpen;
|
|
1060
|
+
private promptsElsewhereValue;
|
|
1061
|
+
/**
|
|
1062
|
+
* Whether another surface draws the unsaved-edits prompt for this panel's subject: the shell
|
|
1063
|
+
* sets it while the inspector steps aside for Logic or Data, whose own
|
|
1064
|
+
* surfaces answer it. A modal opened inside a hidden panel would leave the page inert.
|
|
1065
|
+
*/
|
|
1066
|
+
get promptsElsewhere(): boolean;
|
|
1067
|
+
set promptsElsewhere(value: boolean);
|
|
1068
|
+
/** The mode's buttons for what this panel edits; see {@link modeActions}. */
|
|
1069
|
+
private modeActionsValue;
|
|
1070
|
+
/**
|
|
1071
|
+
* A mode's buttons for what is selected on its canvas (`BuilderMode.inspectorActions`):
|
|
1072
|
+
* drawn at the end of the about card (the ID and "Saves to"), or as the card when it shows
|
|
1073
|
+
* neither, on the Field tab. The shell sets them, each `run` already behind the guard of the
|
|
1074
|
+
* component this panel edits. One with a `deleteLabel` stands in for Delete, so the footer
|
|
1075
|
+
* offers no Delete beside it. Assigning the same buttons (ids and words) again paints nothing.
|
|
1076
|
+
* Empty on a panel used on its own.
|
|
1077
|
+
*/
|
|
1078
|
+
get modeActions(): readonly BuilderInspectorAction[];
|
|
1079
|
+
set modeActions(value: readonly BuilderInspectorAction[]);
|
|
1080
|
+
/** What the mode says needs putting right; see {@link modeFindings}. */
|
|
1081
|
+
private modeFindingsValue;
|
|
1082
|
+
/**
|
|
1083
|
+
* A findings-card fix just pressed (WCAG 2.4.3): the card repaints without the finding it
|
|
1084
|
+
* fixed, the pressed button goes with the old markup, and focus would fall to the page. Once it
|
|
1085
|
+
* has, it goes to the same finding's button while that finding stands (a fix that is still
|
|
1086
|
+
* running), else to the finding now in its place, else to the panel's tab. Dropped once placed,
|
|
1087
|
+
* once the author moves focus elsewhere, or after {@link FINDING_FOCUS_LIFE_MS}.
|
|
1088
|
+
*/
|
|
1089
|
+
private findingFixFocus;
|
|
1090
|
+
/**
|
|
1091
|
+
* The mode's findings card (`BuilderMode.findings`): drawn at the top of
|
|
1092
|
+
* a root panel's Properties tab, errors then warnings. Selecting one runs its `select`, a fix
|
|
1093
|
+
* its `run`. Assigning the same findings (ids, words, fixes) again paints nothing, so a draft
|
|
1094
|
+
* keystroke elsewhere never repaints the panel. Empty on a panel used on its own.
|
|
1095
|
+
*/
|
|
1096
|
+
get modeFindings(): readonly BuilderModeFinding[];
|
|
1097
|
+
set modeFindings(value: readonly BuilderModeFinding[]);
|
|
1098
|
+
/** What the mode lets the root panel choose at once; see {@link modeChoices}. */
|
|
1099
|
+
private modeChoicesValue;
|
|
1100
|
+
/**
|
|
1101
|
+
* The mode's root choices (`BuilderMode.rootChoices`): drawn under the
|
|
1102
|
+
* findings card on a root panel's Properties tab, each a select that commits on change, not on
|
|
1103
|
+
* Apply. Assigning the same choices (ids, words, values) again paints nothing.
|
|
1104
|
+
*/
|
|
1105
|
+
get modeChoices(): readonly BuilderModeChoice[];
|
|
1106
|
+
set modeChoices(value: readonly BuilderModeChoice[]);
|
|
1107
|
+
/** The root choices' markup, or nothing: only on the root panel's Properties tab. */
|
|
1108
|
+
private choicesHtml;
|
|
1109
|
+
/** Focus after a findings-card fix, once it has fallen to the page; see {@link findingFixFocus}. */
|
|
1110
|
+
private placeFindingFocus;
|
|
1111
|
+
/** The findings card's markup, or nothing: only on the root panel's Properties tab, while the mode has findings. */
|
|
1112
|
+
private findingsCardHtml;
|
|
1113
|
+
/** The about card with the mode's buttons at its end (see {@link modeActions}); `body` as it is without any. */
|
|
1114
|
+
private withModeActions;
|
|
1115
|
+
/** Whether one of the mode's buttons stands in for Delete (its `deleteLabel`): the footer then has none. */
|
|
1116
|
+
private modeActionReplacesDelete;
|
|
1117
|
+
/** Whether the shell offers the Languages workspace: the pointer line under a component's texts then offers Open in Languages. */
|
|
1118
|
+
get languagesWorkspace(): boolean;
|
|
1119
|
+
set languagesWorkspace(value: boolean);
|
|
1120
|
+
private languagesWorkspaceValue;
|
|
1121
|
+
/** Which optional parts of the inspector exist (the builder's `features`); all of them unless the shell says otherwise. */
|
|
1122
|
+
private inspectorFeaturesValue;
|
|
1123
|
+
/**
|
|
1124
|
+
* The optional parts of the inspector that exist (the builder's `features`): the JSON
|
|
1125
|
+
* view and editor (so its editor chunk is never fetched), the pointer line under each
|
|
1126
|
+
* component's texts, and the component id with the data key and Saved as lines. All of them unless
|
|
1127
|
+
* the shell says otherwise. Leaving the JSON view out moves a panel left on it to Properties.
|
|
1128
|
+
* `pdf`, `print` and `logic` gate the parts those workspaces own (see
|
|
1129
|
+
* {@link inspectorParts}): the component's On paper group, the Form panel's Formulas
|
|
1130
|
+
* section and the Button's Download as PDF action. The Languages workspace owns no inspector part (its pointer
|
|
1131
|
+
* line is the `translations` feature's), so it has no key here.
|
|
1132
|
+
*/
|
|
1133
|
+
get inspectorFeatures(): {
|
|
1134
|
+
readonly json: boolean;
|
|
1135
|
+
readonly translations: boolean;
|
|
1136
|
+
readonly advancedFields: boolean;
|
|
1137
|
+
readonly headerFooter: boolean;
|
|
1138
|
+
readonly pdf: boolean;
|
|
1139
|
+
readonly print: boolean;
|
|
1140
|
+
readonly logic: boolean;
|
|
1141
|
+
};
|
|
1142
|
+
set inspectorFeatures(value: {
|
|
1143
|
+
json?: boolean | undefined;
|
|
1144
|
+
translations?: boolean | undefined;
|
|
1145
|
+
advancedFields?: boolean | undefined;
|
|
1146
|
+
headerFooter?: boolean | undefined;
|
|
1147
|
+
pdf?: boolean | undefined;
|
|
1148
|
+
print?: boolean | undefined;
|
|
1149
|
+
logic?: boolean | undefined;
|
|
1150
|
+
});
|
|
1151
|
+
/** Property paths the host manages (`managed-settings`): drawn as a "managed by the site" note, not a box. */
|
|
1152
|
+
private managedSettingsValue;
|
|
1153
|
+
get managedSettings(): readonly string[];
|
|
1154
|
+
set managedSettings(value: readonly string[]);
|
|
1155
|
+
/**
|
|
1156
|
+
* The inspector parts the builder's features own (`PropertiesPanelOptions.parts`): the
|
|
1157
|
+
* Button's Download as PDF goes with `pdf`, the On paper group with `print`, Formulas with `logic`. The passkey
|
|
1158
|
+
* signature choice is no builder feature's and stays. Every part on draws what
|
|
1159
|
+
* the panel drew before it was gated.
|
|
1160
|
+
*/
|
|
1161
|
+
private inspectorParts;
|
|
1162
|
+
/** Properties whose "?" description the author expanded, by property path. */
|
|
1163
|
+
private openHelp;
|
|
1164
|
+
/** Property sections the author collapsed, by section id; new sections default open. */
|
|
1165
|
+
private collapsedSections;
|
|
1166
|
+
/** Sections that start folded (a journey's Wording) which the author opened, by section id. */
|
|
1167
|
+
private openedSections;
|
|
1168
|
+
/** Live text of the panel's filter box; rows not matching it are hidden, not removed. */
|
|
1169
|
+
private propertyFilter;
|
|
1170
|
+
/** Whether the footer's list of problems is open (the count opens it when there are several). */
|
|
1171
|
+
private problemListOpen;
|
|
1172
|
+
private rulesState;
|
|
1173
|
+
/** Where the Rules tab's rules come from; see {@link ruleSource}. */
|
|
1174
|
+
private ruleSourceValue;
|
|
1175
|
+
/**
|
|
1176
|
+
* The formula editors over the Logic tab's boxes while they are on screen, by rule key. Every
|
|
1177
|
+
* paint replaces the panel's markup, so they are lifted out before a paint and put back after
|
|
1178
|
+
* it (see {@link mountFormulaEditors}), the way the JSON view's editor is: the same editor,
|
|
1179
|
+
* so the caret, the undo and the suggestions stay while the same node stays in view.
|
|
1180
|
+
*/
|
|
1181
|
+
private formulaEditors;
|
|
1182
|
+
/** The formula editor's chunk: fetched on the first box drawn, kept once it lands, retried on request. */
|
|
1183
|
+
private formulaEditorLoad;
|
|
1184
|
+
private formulaModule;
|
|
1185
|
+
/** The plugin functions a host wired, for the editor's lists and the parser; see {@link formulaFunctions}. */
|
|
1186
|
+
private formulaFunctionsValue;
|
|
1187
|
+
/** What a formula on the subject may read, computed once per paint (see {@link formulaContext}). */
|
|
1188
|
+
private formulaContextMemo;
|
|
1189
|
+
/**
|
|
1190
|
+
* The rule this panel is writing to the draft from a keystroke in its box, for the length of
|
|
1191
|
+
* that write: its own `change` arrives while it is set, and is refreshed in place rather than
|
|
1192
|
+
* painted (see {@link applyFormulaEdit} and {@link onControllerChange}).
|
|
1193
|
+
*/
|
|
1194
|
+
private liveRuleWrite;
|
|
1195
|
+
/** The subject whose plain box is being typed in: its keystrokes are live writes (see applyPropertyEdit). */
|
|
1196
|
+
private liveBoxWrite;
|
|
1197
|
+
/** Set while a live keystroke is waiting for its plain change on focusout. */
|
|
1198
|
+
private liveBoxPending;
|
|
1199
|
+
/** {@link subjectKey} without the dirty parts: a live write may move only those. */
|
|
1200
|
+
private subjectKeyClean;
|
|
1201
|
+
/** A rule written live whose plain `edit` the canvas is still owed; sent when the author leaves the box (see {@link commitFormulaEdit}). */
|
|
1202
|
+
private liveRulePending;
|
|
1203
|
+
/**
|
|
1204
|
+
* A press anywhere on the page not yet released, and what waits for its end (see
|
|
1205
|
+
* {@link afterPress}). `dragging` once it became a drag, which ends on the drop instead.
|
|
1206
|
+
*/
|
|
1207
|
+
private press;
|
|
1208
|
+
/** The box the author last left in this panel, and whose it was: Keep editing goes back to it. */
|
|
1209
|
+
private leftBox;
|
|
1210
|
+
/** The Logic workspace's model once its chunk has landed (see {@link loadLogicModel}); the printed formula stands in until then. */
|
|
1211
|
+
private logicModel;
|
|
1212
|
+
private logicModelAsked;
|
|
1213
|
+
/** When, and for which selection, the Logic model last failed to load: no refetch per keystroke. */
|
|
1214
|
+
private logicModelFailed;
|
|
1215
|
+
/** Whether the host has heard of the failure since the last success (one datum-error per burst). */
|
|
1216
|
+
private logicModelReported;
|
|
1217
|
+
/** Rows other modes add to the Form panel; see {@link modeSettings}. */
|
|
1218
|
+
private modeSettingsValue;
|
|
1219
|
+
private expressionState;
|
|
1220
|
+
/** Why a `file` control refused the last pick, by property path, for the node it belongs to. */
|
|
1221
|
+
private fileState;
|
|
1222
|
+
/**
|
|
1223
|
+
* The controller the working copies above were made against. A node id alone does not tell
|
|
1224
|
+
* one tree from the next: every PDF layout's root is `document`, every populated form's
|
|
1225
|
+
* `template`, so a panel pointed at another layout would carry the last one's
|
|
1226
|
+
* half-written rule over — shown as this layout's, written into it on the next keystroke,
|
|
1227
|
+
* and a JSON box that did not parse holding its Save back.
|
|
1228
|
+
*/
|
|
1229
|
+
private workingController;
|
|
1230
|
+
/**
|
|
1231
|
+
* The inline-options editor while it is open: the working copy of the selected component's
|
|
1232
|
+
* options (see `optionsEditorHtml`). Nothing reaches the form until Apply, which commits it
|
|
1233
|
+
*. `opened` is the rows as the dialog opened on them, what Escape counts changes
|
|
1234
|
+
* against.
|
|
1235
|
+
*/
|
|
1236
|
+
private optionsEditor;
|
|
1237
|
+
/**
|
|
1238
|
+
* The question Escape puts over the options dialog when it holds changes: how
|
|
1239
|
+
* many, and the control the author was on, which Keep editing gives focus back to.
|
|
1240
|
+
*/
|
|
1241
|
+
private optionsDiscard;
|
|
1242
|
+
/**
|
|
1243
|
+
* The JSON view's editor while one is on screen, with the node it shows. Every paint
|
|
1244
|
+
* replaces the panel's markup, so the editor is lifted out before a paint and put back in
|
|
1245
|
+
* the new markup after it (see {@link mountJsonViewer}) — the same editor, so the caret, the
|
|
1246
|
+
* undo and the scroll offset stay while the same node stays in view.
|
|
1247
|
+
*/
|
|
1248
|
+
private jsonViewer;
|
|
1249
|
+
/** What the JSON view's box holds; see {@link JsonWorkingState}. */
|
|
1250
|
+
private jsonState;
|
|
1251
|
+
/** The builder's words (the text catalog) for this panel's own chrome. */
|
|
1252
|
+
private readonly words;
|
|
1253
|
+
/**
|
|
1254
|
+
* What the whole definition would weigh with `extraBytes` more in it, against the most a load
|
|
1255
|
+
* accepts (see `DefinitionBudget`). A file picked into a `file` control is embedded in the
|
|
1256
|
+
* definition as base64, so one that would tip the form past the limit is refused with the
|
|
1257
|
+
* numbers, and the draft is left alone. Absent: nothing is asked.
|
|
1258
|
+
*/
|
|
1259
|
+
embedBudget: ((extraBytes: number) => DefinitionBudget | undefined) | undefined;
|
|
1260
|
+
/**
|
|
1261
|
+
* Where the formula editors' "Formula reference" link goes (the host's `formulaReferenceHref`).
|
|
1262
|
+
* Unset, the editors draw no link: the builder has no documentation page of its own to point at.
|
|
1263
|
+
*/
|
|
1264
|
+
formulaReferenceHref: string | undefined;
|
|
1265
|
+
/** The builder's own language for its words (the text catalog's locale), not the form's. */
|
|
1266
|
+
set textLocale(value: string | undefined);
|
|
1267
|
+
/** A host's translations of the builder's words, by key; absent keys fall back to English. */
|
|
1268
|
+
set textCatalog(value: BuilderTextCatalog | undefined);
|
|
1269
|
+
/** The words options: the builder's own locale and catalog when the host set them, else the form's locale. */
|
|
1270
|
+
private wordsFor;
|
|
1271
|
+
/**
|
|
1272
|
+
* The plugin functions the host wired (`FormulaFunctionRegistry`, or anything with its
|
|
1273
|
+
* `table()` and `signatures()`): listed with the built-ins in the editor's Function menu and
|
|
1274
|
+
* suggestions, and known to the parser so a call to one is no problem. Absent: built-ins only.
|
|
1275
|
+
*/
|
|
1276
|
+
get formulaFunctions(): FormulaFunctionsSource | undefined;
|
|
1277
|
+
set formulaFunctions(value: FormulaFunctionsSource | undefined);
|
|
1278
|
+
/**
|
|
1279
|
+
* Whether the Rules tab is offered. The shell clears it for a mode whose tree carries no
|
|
1280
|
+
* rules anything reads (a PDF layout); a panel left on that tab falls back to
|
|
1281
|
+
* Properties. A panel used on its own offers it.
|
|
1282
|
+
*/
|
|
1283
|
+
set showRulesTab(value: boolean);
|
|
1284
|
+
get showRulesTab(): boolean;
|
|
1285
|
+
/**
|
|
1286
|
+
* Where the Rules tab's rules come from (`BuilderMode.inspector.rules`): which
|
|
1287
|
+
* rules each node type offers, where each is stored, what a condition's field box suggests
|
|
1288
|
+
* and the tab's opening line. Unset: the rules the engine evaluates, in `rules`, as for the
|
|
1289
|
+
* form. A node offered none has no Rules tab, and a panel on it moves to Properties.
|
|
1290
|
+
*/
|
|
1291
|
+
set ruleSource(value: BuilderModeRules | undefined);
|
|
1292
|
+
get ruleSource(): BuilderModeRules | undefined;
|
|
1293
|
+
/**
|
|
1294
|
+
* Rows other builder modes add to the form's settings (`BuilderMode.formSettings`),
|
|
1295
|
+
* drawn by a `"root"` panel on the form's own tree, a section per mode after the form's own.
|
|
1296
|
+
* Their values are drafted on the root, so Save, Cancel and "Unsaved" cover them.
|
|
1297
|
+
*/
|
|
1298
|
+
set modeSettings(value: readonly FormPanelModeSettings[]);
|
|
1299
|
+
get modeSettings(): readonly FormPanelModeSettings[];
|
|
1300
|
+
/**
|
|
1301
|
+
* The rules a node of `nodeType` offers on the Rules tab, from the source or the engine's
|
|
1302
|
+
* own. Given the node, "Required when" is offered only where the fold reads it
|
|
1303
|
+
* ({@link requiredWhenGap}) — unless the node already carries one, which stays on the tab
|
|
1304
|
+
* under a note saying it is never enforced, so the author can see it and take it off.
|
|
1305
|
+
*/
|
|
1306
|
+
private ruleDescriptorsFor;
|
|
1307
|
+
/** The descriptor behind a rule key on `nodeId`'s tab, wherever it came from. */
|
|
1308
|
+
private ruleDescriptorFor;
|
|
1309
|
+
/**
|
|
1310
|
+
* The formula boxes the Field tab itself draws (`formula` controls, such as a PDF area's
|
|
1311
|
+
* "Filled from" formula), each as a rule descriptor addressed by `field:<propertyPath>` and
|
|
1312
|
+
* written to that property: the Rules tab's editor, feedback and live draft seam serve them
|
|
1313
|
+
* unchanged. Empty for a node whose model has none.
|
|
1314
|
+
*/
|
|
1315
|
+
private fieldFormulaDescriptors;
|
|
1316
|
+
/** The `formula` controls of the Field tab as the markup draws them: the draft's rule under a forced formula mode. */
|
|
1317
|
+
private fieldFormulaViews;
|
|
1318
|
+
/** What a field formula's feedback is drawn with: its problem, the tree owner's notes for the property, the editor's state. */
|
|
1319
|
+
private fieldFormulaOptions;
|
|
1320
|
+
/** Whether this panel's subject has any rule to offer: the Rules tab is left out otherwise. */
|
|
1321
|
+
private subjectHasRules;
|
|
1322
|
+
/** The mode's ways out of `nodeId` (a journey's step), which its Logic tab lists. */
|
|
1323
|
+
private waysOf;
|
|
1324
|
+
/**
|
|
1325
|
+
* The inspector's model less the fields a left-out feature owns: without
|
|
1326
|
+
* `advanced-fields` the data key's box is not drawn, and without `header-footer` the root's
|
|
1327
|
+
* Header and Footer rows (their button opens a panel that is not there) are not. The model
|
|
1328
|
+
* itself, untouched, otherwise.
|
|
1329
|
+
*/
|
|
1330
|
+
private shownModel;
|
|
1331
|
+
/**
|
|
1332
|
+
* The suggestion "Suggest: validate as email" is a hint line like the others, drawn
|
|
1333
|
+
* by the shared markup as text; here its words become a button that applies the preset to the
|
|
1334
|
+
* draft, so the one click is also reachable from the keyboard. The line is found by its message,
|
|
1335
|
+
* which the markup escapes the way `esc` does; a panel with no such line returns the html as it was.
|
|
1336
|
+
*/
|
|
1337
|
+
private presetSuggestionButton;
|
|
1338
|
+
/** The rows of every mode that adds to the form's settings, for a root panel on the form. */
|
|
1339
|
+
private shownModeSettings;
|
|
1340
|
+
/**
|
|
1341
|
+
* What the panel edits. `"selection"` — the default, and the shell's right-hand
|
|
1342
|
+
* inspector — edits the selected component and draws nothing at all while there is none,
|
|
1343
|
+
* so the shell can take the column away. `"root"` — the shell's Form panel, opened from the
|
|
1344
|
+
* activity strip — edits the controller's root: the form's own settings, or, on another
|
|
1345
|
+
* mode's tab, that document's. It offers the same three tabs, since the root carries rules
|
|
1346
|
+
* that gate every field under it and its JSON is the whole tree's; what it does not carry
|
|
1347
|
+
* is a collapse chevron (the strip item is the toggle) or Delete (the root cannot be
|
|
1348
|
+
* removed). A head names what it edits, which the inspector leaves to its tabs.
|
|
1349
|
+
*/
|
|
1350
|
+
set subject(value: InspectorSubject);
|
|
1351
|
+
get subject(): InspectorSubject;
|
|
1352
|
+
/**
|
|
1353
|
+
* What a `"root"` panel's heading calls what it edits — "Form" on the builder's own tree,
|
|
1354
|
+
* the document's word ("Layout") on another mode's. Ignored by a `"selection"` panel.
|
|
1355
|
+
*/
|
|
1356
|
+
set settingsLabel(value: string);
|
|
1357
|
+
get settingsLabel(): string;
|
|
1358
|
+
/**
|
|
1359
|
+
* The component this panel is editing: the controller's root, or the selection — which is
|
|
1360
|
+
* `undefined` while nothing is selected, and the panel then has nothing to draw.
|
|
1361
|
+
*/
|
|
1362
|
+
private subjectId;
|
|
1363
|
+
/** The tabs on the strip: every one, or all but Rules — for a mode that keeps none, or a subject offered none. */
|
|
1364
|
+
private inspectorTabs;
|
|
1365
|
+
/** A tab the panel may show: one of its tabs, or the JSON behind the ⋯. */
|
|
1366
|
+
private tabShown;
|
|
1367
|
+
/** The component's name as the outline shows it, for the head over the tabs. */
|
|
1368
|
+
private nodeLabel;
|
|
1369
|
+
/** The type's palette name ("Short text"), else the type itself. */
|
|
1370
|
+
private typeLabel;
|
|
1371
|
+
private toggleInspectorMenu;
|
|
1372
|
+
private syncInspectorMenu;
|
|
1373
|
+
/** How many rules the component carries, for the Logic tab's count. */
|
|
1374
|
+
private ruleCount;
|
|
1375
|
+
private captureFocus;
|
|
1376
|
+
/** Where `element` is, to be found again after a repaint: its key and caret, never the element itself. */
|
|
1377
|
+
private focusOf;
|
|
1378
|
+
/**
|
|
1379
|
+
* Puts the live number box back where the repaint drew its copy, so the caret stays where
|
|
1380
|
+
* the author left it (see {@link FocusedControl.live}). Only while the draft still says what
|
|
1381
|
+
* the box says: after Escape reverts the draft, the fresh copy's value is the one to show.
|
|
1382
|
+
* The copy's attributes come across — bounds, help ids, anything the repaint recomputed.
|
|
1383
|
+
*/
|
|
1384
|
+
private keepLiveControl;
|
|
1385
|
+
/**
|
|
1386
|
+
* After a discard, writes the painted value into any kept live text or number box that still
|
|
1387
|
+
* shows typed text. A keystroke paints nothing (liveBoxWrite), so the revert repaints markup
|
|
1388
|
+
* equal to the current markup, writeMarkup skips the DOM, and the box would keep lying. The
|
|
1389
|
+
* node is never replaced; the markup's value attribute is the painted value.
|
|
1390
|
+
*/
|
|
1391
|
+
private syncBoxesToPainted;
|
|
1392
|
+
private restoreFocus;
|
|
1393
|
+
connectedCallback(): void;
|
|
1394
|
+
disconnectedCallback(): void;
|
|
1395
|
+
private readonly pressListeners;
|
|
1396
|
+
private endPress;
|
|
1397
|
+
/** Runs `run` now, or once the press under way anywhere on the page is over. */
|
|
1398
|
+
private afterPress;
|
|
1399
|
+
/**
|
|
1400
|
+
* Keep editing on the prompt about this panel's draft: the selection stays, and the
|
|
1401
|
+
* author goes back to what holds the Apply back, else to the box they left.
|
|
1402
|
+
*/
|
|
1403
|
+
private keepEditing;
|
|
1404
|
+
/** Takes down every formula editor: the panel draws no body, or has left the page. */
|
|
1405
|
+
private unmountFormulaEditors;
|
|
1406
|
+
/**
|
|
1407
|
+
* Lifts the formula editors out ahead of a repaint, without taking them down, with whether
|
|
1408
|
+
* each had focus and the node it edited, so the paint can put the same editors back (see
|
|
1409
|
+
* {@link mountFormulaEditors}).
|
|
1410
|
+
*/
|
|
1411
|
+
private liftFormulaEditors;
|
|
1412
|
+
/**
|
|
1413
|
+
* Puts a formula editor over every formula box the paint produced (`textarea[data-rule-formula]`).
|
|
1414
|
+
* The textarea stays in the DOM, hidden, so the text is still there for anything that reads
|
|
1415
|
+
* it from the markup and for a repaint to hand back; the editor takes its place on screen.
|
|
1416
|
+
* `lifted` are the editors the paint lifted out: on the same node and rule each goes back in,
|
|
1417
|
+
* its text set to what the box holds (a no-op when the author's typing is what repainted the
|
|
1418
|
+
* panel), with its focus. The rest are taken down, and fresh editors mount once the chunk is
|
|
1419
|
+
* loaded; before it lands, or if it never does, the textarea is the box.
|
|
1420
|
+
*/
|
|
1421
|
+
private mountFormulaEditors;
|
|
1422
|
+
/** A fresh editor over `box`, when the chunk is loaded; else the chunk is asked for, and the box stays the textarea meanwhile. */
|
|
1423
|
+
private mountFormulaEditor;
|
|
1424
|
+
/** The editor says what its textarea says: whether the text parses, and the notes and problem that describe it. */
|
|
1425
|
+
private describeFormulaEditor;
|
|
1426
|
+
/**
|
|
1427
|
+
* Fetches the editor's chunk once; when it lands, the boxes on screen get their editors
|
|
1428
|
+
* (a paint is not needed: the textareas are where they were). A failed fetch is said under
|
|
1429
|
+
* each box with a Retry, which asks again (the loader forgets a rejected load).
|
|
1430
|
+
*/
|
|
1431
|
+
private ensureFormulaEditorModule;
|
|
1432
|
+
/** The editor's chunk did not load (or would not mount): the textareas stay, each with Retry, and the host hears it. */
|
|
1433
|
+
private formulaEditorFailed;
|
|
1434
|
+
/**
|
|
1435
|
+
* What a formula on `nodeId` may read and call: the fields the mode names
|
|
1436
|
+
* (`BuilderModeRules.formulaFields`, else its `fieldOptions` as fields of no particular
|
|
1437
|
+
* kind), or every data-holding leaf of the form but the node itself, labelled as the outline
|
|
1438
|
+
* labels them; the built-ins and the plugin functions the host wired; the parser's
|
|
1439
|
+
* signatures for them. Computed once per paint.
|
|
1440
|
+
*/
|
|
1441
|
+
private formulaContext;
|
|
1442
|
+
/** The parse and the problems of `text` for a rule on `nodeId`, as the editor's lint words them. */
|
|
1443
|
+
private analyseFormula;
|
|
1444
|
+
/** Takes down the JSON view's editor: the panel draws no body, or has left the page. */
|
|
1445
|
+
private unmountJsonViewer;
|
|
1446
|
+
/**
|
|
1447
|
+
* Lifts the JSON view's editor out ahead of a repaint, without taking it down, with where it
|
|
1448
|
+
* was scrolled to, whether it had focus and the node it showed — so the paint can put the
|
|
1449
|
+
* same editor back (see {@link mountJsonViewer}). While the editor's chunk loads, or if it
|
|
1450
|
+
* never does, the box is the plain textarea: its scroll offset is handed back the same way.
|
|
1451
|
+
*/
|
|
1452
|
+
private liftJsonViewer;
|
|
1453
|
+
/**
|
|
1454
|
+
* Puts the JSON view's editor over the `<pre>` (read-only) or `<textarea>` (editable) the markup carries, when the paint produced one. The source stays in the DOM,
|
|
1455
|
+
* hidden, so the JSON is still there for anything that reads it from the markup; the
|
|
1456
|
+
* editor takes its place on screen. `previous` is the editor the paint lifted out: on the
|
|
1457
|
+
* same node it goes back in — its text set to what the box should hold, which is a no-op
|
|
1458
|
+
* when the author's typing is what repainted the panel — with its scroll offset and focus.
|
|
1459
|
+
* Otherwise it is taken down, and a fresh editor mounts once the chunk is loaded.
|
|
1460
|
+
*/
|
|
1461
|
+
private mountJsonViewer;
|
|
1462
|
+
/** The editor says what its textarea says: whether the text applies, and the message that says why not. */
|
|
1463
|
+
private describeJsonViewer;
|
|
1464
|
+
/**
|
|
1465
|
+
* The JSON view's working state for `nodeId`, whose drafted node is `node`: kept while the
|
|
1466
|
+
* draft still gives what the box last agreed with, else started again from the draft — the
|
|
1467
|
+
* first look, another component, or a draft changed somewhere else.
|
|
1468
|
+
*/
|
|
1469
|
+
private jsonWorking;
|
|
1470
|
+
/** Why the JSON view's text does not apply to `nodeId`, if the box holds text for it that does not. */
|
|
1471
|
+
private jsonProblem;
|
|
1472
|
+
/** Whether the JSON view may change `nodeId`'s id: as the Field tab's ID row may. */
|
|
1473
|
+
private jsonIdEditable;
|
|
1474
|
+
/**
|
|
1475
|
+
* An edit in the JSON view: the text is kept as typed, and what it changes goes to
|
|
1476
|
+
* the draft — configuration keys set and removed one by one, then the rules, then the id —
|
|
1477
|
+
* so Apply, Discard and "Unsaved" cover it like any other edit. Text that does not parse, or
|
|
1478
|
+
* is not this component's JSON, writes nothing: the draft keeps the last text that applied,
|
|
1479
|
+
* and the problem is said under the box. The other tabs' working copies for the component
|
|
1480
|
+
* were made against the old values, so they go.
|
|
1481
|
+
*/
|
|
1482
|
+
private applyJsonEdit;
|
|
1483
|
+
/** What the JSON view draws for `nodeId`: the box's text, its name, and why the text does not apply. */
|
|
1484
|
+
private jsonEditView;
|
|
1485
|
+
/** Drops every working copy once the panel edits another controller's tree (see {@link workingController}). */
|
|
1486
|
+
private followController;
|
|
1487
|
+
/** The rules working state for the current selection, reset when the selection or the controller moves. */
|
|
1488
|
+
private rules;
|
|
1489
|
+
/** The expression-control working state for the current selection, reset when it or the controller moves. */
|
|
1490
|
+
private expressions;
|
|
1491
|
+
private fileErrors;
|
|
1492
|
+
/**
|
|
1493
|
+
* A `file` control's pick: the file becomes the attachment envelope embedded files use
|
|
1494
|
+
* (`{ storage: "base64", name, type, size, data }`) and lands on the draft, unless it is not
|
|
1495
|
+
* what the field accepts — then the row says so and the draft is left alone. An ICC profile
|
|
1496
|
+
* field checks the bytes themselves (the `acsp` signature), since a `.icc` extension proves
|
|
1497
|
+
* nothing. The input is reset so the same file can be picked again after a fix.
|
|
1498
|
+
*/
|
|
1499
|
+
private applyFileEdit;
|
|
1500
|
+
/**
|
|
1501
|
+
* A `file` control's select: a ready-made value is written as its envelope, "None" clears
|
|
1502
|
+
* the property, and "Upload a file…" opens the row's picker (the select goes back to what is
|
|
1503
|
+
* set; the pick, if one comes, lands through `applyFileEdit`).
|
|
1504
|
+
*/
|
|
1505
|
+
/**
|
|
1506
|
+
* A row of a value map changed: the object at `path` gets the row's entry set, or
|
|
1507
|
+
* removed on "Same value", and goes to the draft whole — and is removed when it becomes empty,
|
|
1508
|
+
* so a layout never carries `values: {}`. Save lands it as one undo step with the rest of the draft.
|
|
1509
|
+
*/
|
|
1510
|
+
private applyValueMapEdit;
|
|
1511
|
+
/** "Match by order": the map the field offers (answer i to target i) replaces the draft's, in the one edit. */
|
|
1512
|
+
private applyValueMapOrder;
|
|
1513
|
+
/**
|
|
1514
|
+
* A choice in the Format box, or a click on its suggestion: the preset's pattern, and
|
|
1515
|
+
* a default message where the component has none, go to the draft; "Any text" takes them away.
|
|
1516
|
+
* Save lands the pair as one undo step with the rest of the draft, and nothing is written until
|
|
1517
|
+
* the author chooses: the Email keyboard alone only makes the suggestion appear.
|
|
1518
|
+
*/
|
|
1519
|
+
private applyPatternPreset;
|
|
1520
|
+
/**
|
|
1521
|
+
* "Remove stale entries": the entries the field names as matching nothing now leave the draft's
|
|
1522
|
+
* map in the one edit (the others stay; the map goes when none is left). Nothing else prunes
|
|
1523
|
+
* them, and nothing here is deleted without the author pressing it.
|
|
1524
|
+
*/
|
|
1525
|
+
private applyValueMapStale;
|
|
1526
|
+
private applyFileChoice;
|
|
1527
|
+
/**
|
|
1528
|
+
* Everything this panel draws about its subject, cheap enough to compute per change: the
|
|
1529
|
+
* edited node, the errors hanging off it and, on the root, the definition-level blocks that
|
|
1530
|
+
* ride its draft. An `edit` that leaves all of it alone was an edit to some *other*
|
|
1531
|
+
* component — the Form panel sits on the root while a field's label is typed — and this
|
|
1532
|
+
* panel need not compose an inspector model to discover that.
|
|
1533
|
+
*/
|
|
1534
|
+
private subjectStateKeys;
|
|
1535
|
+
/**
|
|
1536
|
+
* What this panel draws of how its subject is drawn on the canvas (the adapter line, the
|
|
1537
|
+
* settings the binding does not draw): compared against what the last paint drew, so a canvas
|
|
1538
|
+
* that drew again with the same answers repaints nothing.
|
|
1539
|
+
*/
|
|
1540
|
+
private drawingKey;
|
|
1541
|
+
/** What {@link drawingKey} said when the panel was last painted. */
|
|
1542
|
+
private paintedDrawingKey;
|
|
1543
|
+
protected onDrawingChange(): void;
|
|
1544
|
+
protected onControllerChange(reason: BuilderChangeReason, event?: BuilderChangeEvent): void;
|
|
1545
|
+
protected render(): void;
|
|
1546
|
+
/**
|
|
1547
|
+
* Shows the keyed-text dialog that is up — the options editor —
|
|
1548
|
+
* modally, like the prompts (see {@link openPrompt}): the dialog is a fresh element after
|
|
1549
|
+
* every repaint, so this runs after each one. Escape — the browser's close request — is
|
|
1550
|
+
* Cancel.
|
|
1551
|
+
*/
|
|
1552
|
+
private openOptionsEditor;
|
|
1553
|
+
/**
|
|
1554
|
+
* The options dialog's discard question, in the same modal `<dialog>` as the
|
|
1555
|
+
* panel's other confirmations; `""` when it is not asked. Focus lands on Keep editing.
|
|
1556
|
+
*/
|
|
1557
|
+
private optionsDiscardHtml;
|
|
1558
|
+
/**
|
|
1559
|
+
* Escape on a keyed-text dialog. The options dialog with changes asks first:
|
|
1560
|
+
* Escape is the easiest key to press by accident, and it took every typed row with it.
|
|
1561
|
+
* Nothing changed: it closes, as Cancel does.
|
|
1562
|
+
*/
|
|
1563
|
+
private escapeActiveDialog;
|
|
1564
|
+
/** Keep editing: the question goes, and focus goes back to the control the author was on. */
|
|
1565
|
+
private keepEditingOptions;
|
|
1566
|
+
/** The keyed-text dialog that is up, for its frame (drag, resize, maximize). */
|
|
1567
|
+
private activeDialog;
|
|
1568
|
+
private closeActiveDialog;
|
|
1569
|
+
/**
|
|
1570
|
+
* The identity numbers of the translation maps (and catalogs) already seen, so the panel's change
|
|
1571
|
+
* key can say "the map is another one" without walking it (the controller replaces the map on
|
|
1572
|
+
* every write).
|
|
1573
|
+
*/
|
|
1574
|
+
private static readonly mapIds;
|
|
1575
|
+
private static nextMapId;
|
|
1576
|
+
/**
|
|
1577
|
+
* What the pointer line under the texts is drawn from, as a cheap key:
|
|
1578
|
+
* the languages the form declares and which map and catalog the coverage reads. Empty for a tree that is
|
|
1579
|
+
* not the form's own, and when the `translations` feature is off.
|
|
1580
|
+
*/
|
|
1581
|
+
private identityOf;
|
|
1582
|
+
private translationCoverageKey;
|
|
1583
|
+
/**
|
|
1584
|
+
* How well the component's texts are translated, one entry per language besides the default
|
|
1585
|
+
* (the pointer line). The counts are the Languages workspace's own
|
|
1586
|
+
* (`translationCoverageOf`), so a text the host's catalog words counts as translated here
|
|
1587
|
+
* as it does in the grid. Empty when the form declares one language, for a tree that is not
|
|
1588
|
+
* the form's own, when the `translations` feature is off, or when the component has no text to
|
|
1589
|
+
* translate. Read from the committed form, as the Languages workspace reads it.
|
|
1590
|
+
*/
|
|
1591
|
+
private translationCoverage;
|
|
1592
|
+
/** Opens the editor on the inspected component's drafted options for `path`. */
|
|
1593
|
+
private startOptionsEditor;
|
|
1594
|
+
/** One inline option as the editor works on it: its label and description, in the default language. */
|
|
1595
|
+
private static optionRow;
|
|
1596
|
+
/**
|
|
1597
|
+
* Opens the same editor on the inspected component's drafted validation messages for
|
|
1598
|
+
* `path`: one row per code, the message as its text. On the form root the
|
|
1599
|
+
* messages are the form's defaults; on a field, that field's own wording.
|
|
1600
|
+
*/
|
|
1601
|
+
private startMessagesEditor;
|
|
1602
|
+
/**
|
|
1603
|
+
* The code chips the messages editor offers: the codes beyond what the
|
|
1604
|
+
* component's own checks raise — those are rows already. On the form, the engine's other
|
|
1605
|
+
* codes and the page's, in view; on a field, all of them behind a "more" disclosure.
|
|
1606
|
+
*/
|
|
1607
|
+
private static messageCodeGroups;
|
|
1608
|
+
/** Which button opened an options or messages editor. */
|
|
1609
|
+
private static optionsOpener;
|
|
1610
|
+
/**
|
|
1611
|
+
* Focus back on the button that opened the editor, so a keyboard user is not dropped at the
|
|
1612
|
+
* top of the panel. That very button (its own attribute and path), not the first opener in
|
|
1613
|
+
* the panel.
|
|
1614
|
+
* The panel keeps its scroll across the repaint; focus must not move it either.
|
|
1615
|
+
*/
|
|
1616
|
+
private focusEditorOpener;
|
|
1617
|
+
private closeOptionsEditor;
|
|
1618
|
+
/**
|
|
1619
|
+
* Rows as the schema stores validation messages: a map from code to its default-language
|
|
1620
|
+
* text. `undefined` for no rows, so an emptied editor leaves no `messages: {}` behind.
|
|
1621
|
+
*/
|
|
1622
|
+
private static messagesToSchema;
|
|
1623
|
+
/** Why the message rows cannot be applied as they stand, or `undefined` when they can. */
|
|
1624
|
+
private static messagesProblem;
|
|
1625
|
+
/**
|
|
1626
|
+
* Rows as the schema stores them: strings in the default language; a description
|
|
1627
|
+
* is written only where the row has one.
|
|
1628
|
+
*/
|
|
1629
|
+
private static optionsToSchema;
|
|
1630
|
+
/** Why the rows cannot be applied as they stand, or `undefined` when they can. */
|
|
1631
|
+
private static optionsProblem;
|
|
1632
|
+
private addOptionRow;
|
|
1633
|
+
private applyOptionsEditor;
|
|
1634
|
+
/**
|
|
1635
|
+
* The add row as Apply finds it: nothing typed, nothing to do; a label, a row
|
|
1636
|
+
* (under its key, or one made from the label); a key with no label, the reason it is not
|
|
1637
|
+
* applied. A key some row already has is refused as Add refuses it.
|
|
1638
|
+
*/
|
|
1639
|
+
private takePendingOptionRow;
|
|
1640
|
+
/**
|
|
1641
|
+
* One option per line of a pasted list, each under a key made from its label,
|
|
1642
|
+
* after the row it was pasted into, or at the end from the add row. The dialog's working
|
|
1643
|
+
* copy only: Apply is still what writes them.
|
|
1644
|
+
*/
|
|
1645
|
+
private pasteOptionList;
|
|
1646
|
+
/**
|
|
1647
|
+
* A keyed-text dialog's Apply: every value straight to the tree as one undo step,
|
|
1648
|
+
* the open draft kept in step by `setProperties`, so the panel shows no "Not applied" for it
|
|
1649
|
+
* and a later Apply of the panel cannot write the old value back. A value the tree already
|
|
1650
|
+
* holds is only set in the draft (no empty undo step). A text inside a list (a header or
|
|
1651
|
+
* footer part, `chrome.header.0.text`) is committed only while that part is the same in the
|
|
1652
|
+
* draft and the form; a part the draft added or moved stays a draft edit, applied with it.
|
|
1653
|
+
*/
|
|
1654
|
+
private commitDialogEdits;
|
|
1655
|
+
/** Whether a dialog's value at `path` can go to the tree on its own (see {@link commitDialogEdits}). */
|
|
1656
|
+
private static commitsStraight;
|
|
1657
|
+
/** The working copy in the schema's own shape, whichever list the dialog is editing. */
|
|
1658
|
+
private editorToSchema;
|
|
1659
|
+
/** Hands the working copy to the browser as an options.json download — the schema's own shape. */
|
|
1660
|
+
private exportOptions;
|
|
1661
|
+
/** Replaces the working copy with an uploaded options document (nothing is applied until Apply). */
|
|
1662
|
+
private importOptions;
|
|
1663
|
+
/**
|
|
1664
|
+
* Remembers where the dialog is and how big it is — once the author has moved it (inline
|
|
1665
|
+
* `left`/`top`) or resized it from the corner (the browser writes inline `width`/`height`) —
|
|
1666
|
+
* so the repaint that follows a row edit draws it back in the same place.
|
|
1667
|
+
*/
|
|
1668
|
+
private captureOptionsFrame;
|
|
1669
|
+
/** Dragging the title bar moves the dialog; its buttons keep their own click behaviour. */
|
|
1670
|
+
private beginOptionsDrag;
|
|
1671
|
+
/** Full viewport, and back to wherever (and however large) the dialog was before. */
|
|
1672
|
+
private toggleOptionsMaximized;
|
|
1673
|
+
/** Routes a click inside the options editor; `true` when it was one. */
|
|
1674
|
+
private handleOptionsClick;
|
|
1675
|
+
/** Typing in the options editor edits the working copy in place — no repaint, so the caret stays. */
|
|
1676
|
+
private handleOptionsInput;
|
|
1677
|
+
/**
|
|
1678
|
+
* Shows the prompt this paint carries (unsaved edits, or a delete) as a modal: `showModal()`
|
|
1679
|
+
* lifts the `<dialog>` into the browser's top layer, above every stacking context on the
|
|
1680
|
+
* page, and makes everything outside it inert — the canvas, the palette, the host's own
|
|
1681
|
+
* chrome — until it is answered. That is what makes it a prompt rather than a notice
|
|
1682
|
+
* something else can be clicked past. A repaint replaces the element, so this runs after
|
|
1683
|
+
* every paint; a DOM without `showModal` (jsdom, a non-browser DOM) still shows the prompt,
|
|
1684
|
+
* just not modally.
|
|
1685
|
+
*/
|
|
1686
|
+
private openPrompt;
|
|
1687
|
+
/** Closes whichever prompt is up without acting on it: Escape, or a browser close request. */
|
|
1688
|
+
private dismissPrompt;
|
|
1689
|
+
/**
|
|
1690
|
+
* Save. Every Save the panel itself raises (the footer, Enter) comes through here, so a
|
|
1691
|
+
* problem in the draft takes the author to its box instead of saving.
|
|
1692
|
+
*/
|
|
1693
|
+
private saveDraft;
|
|
1694
|
+
/**
|
|
1695
|
+
* What holds a Save of `nodeId`'s draft back, in the order the panel shows the boxes — the
|
|
1696
|
+
* id, then the fields section by section, then the rules — each named for the footer's list:
|
|
1697
|
+
* the controller's problems for that component (never another's), and what this panel
|
|
1698
|
+
* itself could not read (an expression or a rule whose JSON does not parse, so Save would
|
|
1699
|
+
* quietly keep the last one that did).
|
|
1700
|
+
*/
|
|
1701
|
+
private panelProblems;
|
|
1702
|
+
/** What keeps Apply from taking `nodeId`'s draft (`applyBlockers`), in the builder's words; empty when Apply is free. */
|
|
1703
|
+
private applyBlockersOf;
|
|
1704
|
+
/** The advice under Label for `nodeId` as drafted (`inspectorWarnings`): never blocking, never counted. */
|
|
1705
|
+
private warningsOf;
|
|
1706
|
+
/** The Pattern the draft of `nodeId` holds when it is of a catastrophic shape (`kernelRegexRisky`), else `undefined`. */
|
|
1707
|
+
private riskyPatternOf;
|
|
1708
|
+
/** What this panel could not read for `nodeId`: expression boxes and rule JSON that do not parse. */
|
|
1709
|
+
private localProblems;
|
|
1710
|
+
/** What the footer's list calls the box a problem sits under: "ID", the field's label, "Rules · Visible when". */
|
|
1711
|
+
private problemLabel;
|
|
1712
|
+
/** The box a problem is about, in the markup as it stands. */
|
|
1713
|
+
private problemElement;
|
|
1714
|
+
/**
|
|
1715
|
+
* Takes the author to a problem: its tab, its section opened, the filter cleared if it hides
|
|
1716
|
+
* the box, the box scrolled into view and focused — so the message under it is read with it —
|
|
1717
|
+
* and what happened said once more in the live region.
|
|
1718
|
+
*/
|
|
1719
|
+
private goToProblem;
|
|
1720
|
+
/**
|
|
1721
|
+
* Goes to a problem of the component this panel edits — the one `target` names, else the
|
|
1722
|
+
* first — as the Save and the footer's count do. The shell calls it on the Form panel for the
|
|
1723
|
+
* Header & footer panel, whose Save shares the root's draft but not these boxes.
|
|
1724
|
+
*/
|
|
1725
|
+
showProblem(target?: string): void;
|
|
1726
|
+
/**
|
|
1727
|
+
* Hides the rows the filter box rules out — hiding rather than re-rendering, so applying
|
|
1728
|
+
* it costs no focus and no state. Matching is by the row's label. A section with no
|
|
1729
|
+
* matching rows disappears with them; one the author collapsed that matches stays visible
|
|
1730
|
+
* (collapsed) rather than being forced open, so the author's own open/closed memory is
|
|
1731
|
+
* never rewritten by a search. A section the tree's owner folds (a journey's Wording)
|
|
1732
|
+
* is not the author's choice: it opens while a search matches inside it, marked
|
|
1733
|
+
* `data-filter-opened` so the open is not remembered, and folds again when the search stops
|
|
1734
|
+
* matching there.
|
|
1735
|
+
*/
|
|
1736
|
+
private applyPropertyFilter;
|
|
1737
|
+
/** The tab's view of every rule: the draft's rule with the working copy laid over it, its problems, its words. */
|
|
1738
|
+
private rulesTabOptions;
|
|
1739
|
+
/** One rule as the tab draws it: the draft's rule under the working copy, its problem, its warnings, its words, its examples. */
|
|
1740
|
+
private ruleView;
|
|
1741
|
+
/**
|
|
1742
|
+
* The rules of `nodeId` whose draft differs from what the form holds and whose formula does
|
|
1743
|
+
* not parse, by rule key: what holds Save back. Read with the functions the host
|
|
1744
|
+
* wired, so a call to a plugin function is no problem here; the controller's own reading
|
|
1745
|
+
* (`problemsOf`, which knows the built-ins only) is laid over it, since it is what refuses
|
|
1746
|
+
* `commitDraft` and the leave guard's Save. Blank text is no rule, not a problem.
|
|
1747
|
+
*/
|
|
1748
|
+
private ruleParseProblems;
|
|
1749
|
+
/** {@link ruleParseProblems} with the controller's reading of `rules:<key>` laid over it: the tab's `errors`. */
|
|
1750
|
+
private ruleSaveProblems;
|
|
1751
|
+
/** The notes under each rule: the tree owner's (a journey route's condition) and the engine's own. */
|
|
1752
|
+
private ruleNotes;
|
|
1753
|
+
/**
|
|
1754
|
+
* Refreshes what one rule says about its text, in place, after a keystroke wrote the draft
|
|
1755
|
+
* (see {@link applyFormulaEdit}): the block under the box (problem line, warnings, "Reads
|
|
1756
|
+
* as", the chips over an empty box), how the box describes itself, and the footer (the
|
|
1757
|
+
* summary above Save, and whether there is anything to apply). The box and the
|
|
1758
|
+
* editor over it are left exactly where they are; nothing else in the panel moved.
|
|
1759
|
+
*/
|
|
1760
|
+
private refreshRuleLive;
|
|
1761
|
+
/** Whether the footer as last drawn showed the draft as waiting to be applied. */
|
|
1762
|
+
private footerDirty;
|
|
1763
|
+
/** Whether the footer was redrawn in place since the panel's markup was last written (see {@link render}). */
|
|
1764
|
+
private footerRedrawn;
|
|
1765
|
+
/** Redraws the footer alone (Apply, Discard, Not applied, the problem summary) after a live write. */
|
|
1766
|
+
private refreshFooterLive;
|
|
1767
|
+
/** The footer under the panel: Discard / Apply with the summary of what holds Apply back. */
|
|
1768
|
+
private footerHtml;
|
|
1769
|
+
/**
|
|
1770
|
+
* The rule in words for the "Reads as" line, worded as the Logic workspace words the same
|
|
1771
|
+
* rule, without its lead ("Show Email when", "Calculate Fee as"): a condition as the Logic
|
|
1772
|
+
* list's sentence (fields as chips, option labels as pills); a value rule as the Logic list's
|
|
1773
|
+
* body, so an `if` reads as its cases ("250 when Employees is more than 10, otherwise 120")
|
|
1774
|
+
* and a literal as its value. A shape the list has no words for (a bare expression such as
|
|
1775
|
+
* `employees * 2`, or a case whose result is one) is the printed formula with labels, as is
|
|
1776
|
+
* every rule until the list's chunk has landed.
|
|
1777
|
+
*/
|
|
1778
|
+
private ruleReads;
|
|
1779
|
+
/**
|
|
1780
|
+
* The Logic workspace's model when its chunk has landed; otherwise asks for it (once per
|
|
1781
|
+
* attempt) and answers nothing, so the caller words the rule as the printed formula. When it
|
|
1782
|
+
* lands, the rules on screen are re-worded in place (no paint: the author may be typing).
|
|
1783
|
+
*/
|
|
1784
|
+
private logicModelNow;
|
|
1785
|
+
/** Three formulas to try over the form's own fields, for an empty box (drawn as "Try one" chips). */
|
|
1786
|
+
private ruleExamples;
|
|
1787
|
+
/**
|
|
1788
|
+
* Drafts `configuration.formulaErrors` on the root. The default (`fail`) over a form that sets
|
|
1789
|
+
* nothing drafts nothing, so choosing it leaves the definition as it was.
|
|
1790
|
+
*/
|
|
1791
|
+
private setFormulaErrors;
|
|
1792
|
+
/**
|
|
1793
|
+
* Drafts `configuration.agentTools` on the root. Not set drafts `""`, which the controller
|
|
1794
|
+
* removes (UNSET_WHEN_EMPTY), so it also clears a committed `off` on Save.
|
|
1795
|
+
*/
|
|
1796
|
+
private setAgentTools;
|
|
1797
|
+
/** Rewrites one field of the drafted {@link FormIdentity}; the other two stay as drafted. */
|
|
1798
|
+
private setIdentityField;
|
|
1799
|
+
/**
|
|
1800
|
+
* The expression a rule holds in the draft: `rules[key]`, or, for a mode's descriptor with a
|
|
1801
|
+
* target, that property of the configuration — never `rules`, which the canvas
|
|
1802
|
+
* would evaluate against the node itself.
|
|
1803
|
+
*/
|
|
1804
|
+
private ruleExpression;
|
|
1805
|
+
/** A rule as the draft stores it (a formula string, a tree, or the object form), or `undefined` for none. */
|
|
1806
|
+
private ruleSourceOf;
|
|
1807
|
+
/**
|
|
1808
|
+
* A rule as the form holds it, the draft set aside: what `composeRuleSource` compares the
|
|
1809
|
+
* box's text against, so a stored tree typed into and typed back is the tree again, and a run
|
|
1810
|
+
* scope chosen over an untouched tree writes `{ expression, run }` rather than a string.
|
|
1811
|
+
*/
|
|
1812
|
+
private committedRuleSourceOf;
|
|
1813
|
+
/**
|
|
1814
|
+
* Writes one rule into the draft, leaving every other rule on the node untouched: into
|
|
1815
|
+
* `rules`, or its target property. `live` marks a keystroke's write (see {@link applyFormulaEdit}).
|
|
1816
|
+
*/
|
|
1817
|
+
private writeRule;
|
|
1818
|
+
/** Where the rule runs as the author has it: the choice made over an empty box, else what the draft says. */
|
|
1819
|
+
private runFor;
|
|
1820
|
+
/**
|
|
1821
|
+
* A keystroke in a rule's box. The text goes to the draft as typed, parseable or not: as the
|
|
1822
|
+
* formula string (or the object form, for a run scope other than both), or as the stored tree
|
|
1823
|
+
* again when the text is that tree printed (`composeRuleSource` against what the form holds).
|
|
1824
|
+
* The draft therefore always equals the box, and a text that does not parse is a problem the
|
|
1825
|
+
* controller reports (`problemsOf`) to Save, the leave guard and any `commitDraft`.
|
|
1826
|
+
* The write is `live`: this panel refreshes the rule's feedback and the footer in place when
|
|
1827
|
+
* its own change comes back ({@link onControllerChange}), the canvas waits, and nothing is
|
|
1828
|
+
* painted; {@link commitFormulaEdit} sends the plain change when the author leaves the box.
|
|
1829
|
+
*/
|
|
1830
|
+
private applyFormulaEdit;
|
|
1831
|
+
/**
|
|
1832
|
+
* A keystroke in a plain box of the panel: the draft takes the text as a live write, so
|
|
1833
|
+
* nothing is painted and the box keeps its focus and caret; {@link commitBoxEdit} sends the
|
|
1834
|
+
* plain change when the author leaves the box.
|
|
1835
|
+
*/
|
|
1836
|
+
private writeBoxLive;
|
|
1837
|
+
/**
|
|
1838
|
+
* A choice on the Style tab: the draft takes the new class list as a live write, so nothing is
|
|
1839
|
+
* painted and the radio or box keeps its focus. The CSS classes box beside it is set to the list
|
|
1840
|
+
* in place and the footer follows through {@link onControllerChange}; the draft is then written
|
|
1841
|
+
* once more, plainly, so the canvas and every other listener catch up (this panel's own state
|
|
1842
|
+
* already says so, so it does not paint for it).
|
|
1843
|
+
*/
|
|
1844
|
+
private writeStyleLive;
|
|
1845
|
+
/** The author left a plain box typed in live: the draft is written once more, plainly, so every listener catches up. */
|
|
1846
|
+
private commitBoxEdit;
|
|
1847
|
+
/**
|
|
1848
|
+
* The author left a rule's box (blur, Enter on a single line, a "Try one" chip): the draft
|
|
1849
|
+
* written live is written once more, plainly, so the canvas and every other listener catch
|
|
1850
|
+
* up with one change. Nothing to do when no live write is outstanding for that rule.
|
|
1851
|
+
*/
|
|
1852
|
+
private commitFormulaEdit;
|
|
1853
|
+
/** The text a rule's box holds now: the draft's rule as the tab opens it. */
|
|
1854
|
+
private formulaTextOf;
|
|
1855
|
+
/** Handles a click inside the Logic tab. Returns false when the click was not ours. */
|
|
1856
|
+
private handleRulesClick;
|
|
1857
|
+
/** Handles input inside the Logic tab. Returns false when the event was not ours. */
|
|
1858
|
+
private handleRulesEdit;
|
|
1859
|
+
private bind;
|
|
1860
|
+
}
|
|
1861
|
+
/**
|
|
1862
|
+
* The activity strip's Form panel: the inspector, fixed to the controller's root.
|
|
1863
|
+
*
|
|
1864
|
+
* A tag of its own rather than a `subject` attribute on the inspector, because the two are
|
|
1865
|
+
* different panels in different columns — a page (or a test) reaching for
|
|
1866
|
+
* `datum-builder-properties` means the inspector, and would otherwise find whichever of the
|
|
1867
|
+
* two came first in the shell's markup.
|
|
1868
|
+
*/
|
|
1869
|
+
export declare class DatumBuilderFormPanelElement extends DatumBuilderPropertiesElement {
|
|
1870
|
+
constructor();
|
|
1871
|
+
}
|
|
1872
|
+
export declare function defineBuilderPanels(): void;
|