@vef-framework-react/form-editor 2.24.1 → 2.26.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/dist/cjs/editor/canvas/canvas-field.cjs +1 -1
- package/dist/cjs/editor/data-source-apis.cjs +1 -0
- package/dist/cjs/editor/footer/footer.cjs +1 -1
- package/dist/cjs/editor/form-config/form-config-drawer.cjs +1 -1
- package/dist/cjs/editor/form-editor.cjs +1 -1
- package/dist/cjs/editor/host-validation.cjs +1 -0
- package/dist/cjs/editor/issue-location.cjs +1 -0
- package/dist/cjs/editor/preview-runtime-context.cjs +1 -1
- package/dist/cjs/editor/properties/entries/linkage/action-editor.cjs +2 -2
- package/dist/cjs/editor/properties/entries/linkage/condition-editor.cjs +1 -1
- package/dist/cjs/editor/properties/entries/linkage/styles.cjs +1 -1
- package/dist/cjs/editor/properties/entries/options-source/index.cjs +1 -1
- package/dist/cjs/editor/properties/form-data-sources-panel.cjs +1 -1
- package/dist/cjs/editor/properties/option-editors.cjs +1 -1
- package/dist/cjs/editor/properties/remote-option-source-editor.cjs +1 -0
- package/dist/cjs/editor/properties/remote-request-editor.cjs +1 -0
- package/dist/cjs/editor/properties/system-variables-panel.cjs +1 -0
- package/dist/cjs/editor/styles.cjs +1 -1
- package/dist/cjs/editor/toolbar/toolbar.cjs +2 -2
- package/dist/cjs/editor/validation-summary.cjs +1 -1
- package/dist/cjs/engine/linkage/default-evaluator.cjs +1 -1
- package/dist/cjs/engine/linkage/operators.cjs +1 -1
- package/dist/cjs/engine/linkage/scope.cjs +1 -0
- package/dist/cjs/engine/linkage/source-tracking.cjs +1 -1
- package/dist/cjs/engine/linkage/validator.cjs +1 -1
- package/dist/cjs/engine/option-mapping.cjs +1 -0
- package/dist/cjs/engine/schema/edit-ops.cjs +1 -1
- package/dist/cjs/engine/schema/reconcile.cjs +1 -1
- package/dist/cjs/engine/validation.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/render/data-source-context.cjs +1 -1
- package/dist/cjs/render/form-renderer.cjs +1 -1
- package/dist/es/components/button/index.js +1 -1
- package/dist/es/components/checkbox-group-field/index.js +1 -1
- package/dist/es/components/code-editor/code-editor-input.js +1 -1
- package/dist/es/components/code-editor/index.js +1 -1
- package/dist/es/components/containers/index.js +1 -1
- package/dist/es/components/date-field/index.js +1 -1
- package/dist/es/components/display/index.js +1 -1
- package/dist/es/components/field-entries.js +1 -1
- package/dist/es/components/mobile/alert-block.js +1 -1
- package/dist/es/components/mobile/button.js +1 -1
- package/dist/es/components/mobile/checkbox-group.js +1 -1
- package/dist/es/components/mobile/date-adapters.js +1 -1
- package/dist/es/components/mobile/date.js +1 -1
- package/dist/es/components/mobile/daterange.js +1 -1
- package/dist/es/components/mobile/datetime.js +1 -1
- package/dist/es/components/mobile/definitions.js +1 -1
- package/dist/es/components/mobile/divider.js +1 -1
- package/dist/es/components/mobile/input-cell.js +1 -1
- package/dist/es/components/mobile/number.js +1 -1
- package/dist/es/components/mobile/option-group.js +1 -1
- package/dist/es/components/mobile/paragraph.js +1 -1
- package/dist/es/components/mobile/picker-trigger.js +1 -1
- package/dist/es/components/mobile/radio.js +1 -1
- package/dist/es/components/mobile/scope.js +1 -1
- package/dist/es/components/mobile/select.js +1 -1
- package/dist/es/components/mobile/switch.js +1 -1
- package/dist/es/components/mobile/textarea.js +1 -1
- package/dist/es/components/mobile/textfield.js +1 -1
- package/dist/es/components/mobile/theme.js +1 -1
- package/dist/es/components/number-field/index.js +1 -1
- package/dist/es/components/radio-field/index.js +1 -1
- package/dist/es/components/select-field/index.js +1 -1
- package/dist/es/components/switch-field/index.js +1 -1
- package/dist/es/components/textarea-field/index.js +1 -1
- package/dist/es/components/textfield/index.js +1 -1
- package/dist/es/components/upload-field/index.js +1 -1
- package/dist/es/editor/canvas/canvas-field.js +28 -27
- package/dist/es/editor/canvas/canvas.js +1 -1
- package/dist/es/editor/canvas/container-drag-chip.js +1 -1
- package/dist/es/editor/canvas/drop-indicator.js +1 -1
- package/dist/es/editor/canvas/drop-zones.js +1 -1
- package/dist/es/editor/canvas/json-split-view.js +1 -1
- package/dist/es/editor/canvas/mobile-seed-state.js +1 -1
- package/dist/es/editor/canvas/phone-frame.js +1 -1
- package/dist/es/editor/canvas/subform-column-eligibility.js +1 -1
- package/dist/es/editor/canvas/subform-table-cell.js +1 -1
- package/dist/es/editor/canvas/use-scroll-selection-into-view.js +1 -1
- package/dist/es/editor/context-sources.js +1 -1
- package/dist/es/editor/data-source-apis.js +30 -0
- package/dist/es/editor/dnd.js +1 -1
- package/dist/es/editor/editor-layout-context.js +1 -1
- package/dist/es/editor/footer/footer.js +119 -82
- package/dist/es/editor/form-config/form-basics-tab.js +1 -1
- package/dist/es/editor/form-config/form-config-drawer.js +120 -99
- package/dist/es/editor/form-config/linkage-overview.js +1 -1
- package/dist/es/editor/form-config/outline-tab.js +1 -1
- package/dist/es/editor/form-editor.js +113 -105
- package/dist/es/editor/host-validation.js +17 -0
- package/dist/es/editor/issue-location.js +127 -0
- package/dist/es/editor/palette/field-groups.js +1 -1
- package/dist/es/editor/palette/palette-group.js +1 -1
- package/dist/es/editor/palette/palette-item.js +1 -1
- package/dist/es/editor/palette/palette-panel.js +1 -1
- package/dist/es/editor/preview-effects.js +1 -1
- package/dist/es/editor/preview-runtime-context.js +58 -18
- package/dist/es/editor/properties/block-layout-section.js +1 -1
- package/dist/es/editor/properties/container-properties.js +1 -1
- package/dist/es/editor/properties/dynamic-value-editor.js +1 -1
- package/dist/es/editor/properties/entries/built-ins.js +1 -1
- package/dist/es/editor/properties/entries/checkbox-entry.js +1 -1
- package/dist/es/editor/properties/entries/coerce.js +1 -1
- package/dist/es/editor/properties/entries/entry-field.js +1 -1
- package/dist/es/editor/properties/entries/icon-entry.js +1 -1
- package/dist/es/editor/properties/entries/index.js +1 -1
- package/dist/es/editor/properties/entries/key-entry.js +1 -1
- package/dist/es/editor/properties/entries/linkage/action-editor.js +24 -40
- package/dist/es/editor/properties/entries/linkage/actions-editor.js +1 -1
- package/dist/es/editor/properties/entries/linkage/condition-editor.js +13 -12
- package/dist/es/editor/properties/entries/linkage/container-linkage-section.js +1 -1
- package/dist/es/editor/properties/entries/linkage/expression-input.js +1 -1
- package/dist/es/editor/properties/entries/linkage/index.js +1 -1
- package/dist/es/editor/properties/entries/linkage/linkage-rules-entry.js +1 -1
- package/dist/es/editor/properties/entries/linkage/mutators.js +1 -1
- package/dist/es/editor/properties/entries/linkage/options.js +1 -1
- package/dist/es/editor/properties/entries/linkage/rule-diagnostics.js +1 -1
- package/dist/es/editor/properties/entries/linkage/rule-list-editor.js +1 -1
- package/dist/es/editor/properties/entries/linkage/styles.js +42 -49
- package/dist/es/editor/properties/entries/linkage/trigger-editor.js +1 -1
- package/dist/es/editor/properties/entries/linkage/use-linkage-editor-model.js +1 -1
- package/dist/es/editor/properties/entries/linkage/use-stable-options.js +1 -1
- package/dist/es/editor/properties/entries/number-entry.js +1 -1
- package/dist/es/editor/properties/entries/options-source/index.js +7 -6
- package/dist/es/editor/properties/entries/options-source/source-mutators.js +1 -1
- package/dist/es/editor/properties/entries/select-entry.js +1 -1
- package/dist/es/editor/properties/entries/text-entry.js +1 -1
- package/dist/es/editor/properties/form-data-sources-panel.js +44 -36
- package/dist/es/editor/properties/form-linkage-panel.js +1 -1
- package/dist/es/editor/properties/form-variables-panel.js +1 -1
- package/dist/es/editor/properties/option-editors.js +87 -252
- package/dist/es/editor/properties/panel-header.js +1 -1
- package/dist/es/editor/properties/properties-empty.js +1 -1
- package/dist/es/editor/properties/properties-header.js +1 -1
- package/dist/es/editor/properties/properties-panel.js +1 -1
- package/dist/es/editor/properties/properties-provider.js +1 -1
- package/dist/es/editor/properties/properties-tabs.js +1 -1
- package/dist/es/editor/properties/remote-option-source-editor.js +207 -0
- package/dist/es/editor/properties/remote-request-editor.js +357 -0
- package/dist/es/editor/properties/system-variables-panel.js +114 -0
- package/dist/es/editor/properties/use-confirmable-kind-switch.js +1 -1
- package/dist/es/editor/remove-node-confirm.js +1 -1
- package/dist/es/editor/schema-apply.js +1 -1
- package/dist/es/editor/styles.js +6 -6
- package/dist/es/editor/toolbar/notify.js +1 -1
- package/dist/es/editor/toolbar/schema-io.js +1 -1
- package/dist/es/editor/toolbar/toolbar.js +175 -171
- package/dist/es/editor/use-editor-shortcuts.js +1 -1
- package/dist/es/editor/validation-summary.js +130 -48
- package/dist/es/engine/assert-never.js +1 -1
- package/dist/es/engine/conversion/index.js +1 -1
- package/dist/es/engine/data-source-params.js +1 -1
- package/dist/es/engine/ids.js +1 -1
- package/dist/es/engine/keys.js +1 -1
- package/dist/es/engine/linkage/cycle.js +1 -1
- package/dist/es/engine/linkage/default-evaluator.js +38 -27
- package/dist/es/engine/linkage/effects.js +1 -1
- package/dist/es/engine/linkage/evaluator.js +1 -1
- package/dist/es/engine/linkage/index.js +1 -1
- package/dist/es/engine/linkage/operators.js +20 -44
- package/dist/es/engine/linkage/scope.js +84 -0
- package/dist/es/engine/linkage/shape.js +1 -1
- package/dist/es/engine/linkage/source-tracking.js +19 -15
- package/dist/es/engine/linkage/taxonomy.js +1 -1
- package/dist/es/engine/linkage/validator.js +101 -81
- package/dist/es/engine/option-mapping.js +18 -0
- package/dist/es/engine/registry/defaults-mobile.js +1 -1
- package/dist/es/engine/registry/defaults.js +1 -1
- package/dist/es/engine/registry/form-field-registry.js +1 -1
- package/dist/es/engine/schema/column-type.js +1 -1
- package/dist/es/engine/schema/edit-ops.js +84 -83
- package/dist/es/engine/schema/mutate.js +1 -1
- package/dist/es/engine/schema/nodes.js +1 -1
- package/dist/es/engine/schema/permission-bridge.js +1 -1
- package/dist/es/engine/schema/presentation.js +1 -1
- package/dist/es/engine/schema/reconcile.js +55 -51
- package/dist/es/engine/schema/removal-impact.js +1 -1
- package/dist/es/engine/schema/rewrite.js +1 -1
- package/dist/es/engine/schema/validate.js +1 -1
- package/dist/es/engine/schema/walk.js +1 -1
- package/dist/es/engine/validation.js +8 -4
- package/dist/es/icons.js +1 -1
- package/dist/es/index.js +49 -48
- package/dist/es/render/chrome/mobile-chrome.js +1 -1
- package/dist/es/render/chrome/pc-chrome.js +1 -1
- package/dist/es/render/chrome/subform-shell.js +1 -1
- package/dist/es/render/data-source-context.js +44 -43
- package/dist/es/render/data-source-param-scope.js +1 -1
- package/dist/es/render/flex-style.js +1 -1
- package/dist/es/render/form-field.js +1 -1
- package/dist/es/render/form-renderer.js +184 -180
- package/dist/es/render/grid-style.js +1 -1
- package/dist/es/render/parts/field-shell.js +1 -1
- package/dist/es/render/parts/label.js +1 -1
- package/dist/es/render/parts/option-order.js +1 -1
- package/dist/es/render/parts/options-status.js +1 -1
- package/dist/es/render/stack-style.js +1 -1
- package/dist/es/render/subform-columns.js +1 -1
- package/dist/es/render/submit.js +1 -1
- package/dist/es/runtime/effects.js +1 -1
- package/dist/es/runtime/field-write.js +1 -1
- package/dist/es/runtime/resolve-scope-values.js +1 -1
- package/dist/es/runtime/runtime-context.js +1 -1
- package/dist/es/runtime/runtime-state-controller.js +1 -1
- package/dist/es/runtime/stabilize-state-map.js +1 -1
- package/dist/es/store/engine-provider.js +1 -1
- package/dist/es/store/form-store.js +1 -1
- package/dist/es/types/chrome.js +1 -1
- package/dist/es/types/component.js +1 -1
- package/dist/es/types/data-source.js +1 -1
- package/dist/es/types/dynamic-value.js +1 -1
- package/dist/es/types/index.js +1 -1
- package/dist/es/types/linkage.js +1 -1
- package/dist/es/types/properties.js +1 -1
- package/dist/es/types/schema.js +1 -1
- package/dist/types/editor/data-source-apis.d.ts +24 -0
- package/dist/types/editor/form-editor.d.ts +33 -9
- package/dist/types/editor/host-validation.d.ts +20 -0
- package/dist/types/editor/issue-location.d.ts +43 -0
- package/dist/types/editor/preview-runtime-context.d.ts +27 -2
- package/dist/types/editor/properties/entries/linkage/styles.d.ts +0 -1
- package/dist/types/editor/properties/option-editors.d.ts +1 -12
- package/dist/types/editor/properties/remote-option-source-editor.d.ts +15 -0
- package/dist/types/editor/properties/remote-request-editor.d.ts +70 -0
- package/dist/types/editor/properties/system-variables-panel.d.ts +8 -0
- package/dist/types/editor/styles.d.ts +2 -2
- package/dist/types/editor/validation-summary.d.ts +37 -14
- package/dist/types/engine/linkage/scope.d.ts +73 -0
- package/dist/types/engine/linkage/source-tracking.d.ts +3 -3
- package/dist/types/engine/option-mapping.d.ts +9 -0
- package/dist/types/engine/validation.d.ts +27 -8
- package/dist/types/index.d.ts +3 -1
- package/dist/types/render/form-renderer.d.ts +4 -3
- package/dist/types/types/data-source.d.ts +64 -0
- package/dist/types/types/linkage.d.ts +34 -16
- package/package.json +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.26.0 made by Venus | 2026-10-13T17:03:48.101Z */
|
|
2
2
|
import { Label as e } from "./label.js";
|
|
3
3
|
import { Fragment as t, jsx as n, jsxs as r } from "@emotion/react/jsx-runtime";
|
|
4
4
|
import { css as i } from "@emotion/react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.26.0 made by Venus | 2026-10-13T17:03:48.101Z */
|
|
2
2
|
import { jsx as e, jsxs as t } from "@emotion/react/jsx-runtime";
|
|
3
3
|
import { css as n } from "@emotion/react";
|
|
4
4
|
import { globalCssVars as r } from "@vef-framework-react/components";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.26.0 made by Venus | 2026-10-13T17:03:48.101Z */
|
|
2
2
|
//#region src/render/parts/option-order.ts
|
|
3
3
|
function e(e, t) {
|
|
4
4
|
let n = new Map(t.map((e, t) => [e.value, t]));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.26.0 made by Venus | 2026-10-13T17:03:48.101Z */
|
|
2
2
|
import { errorTextCss as e, helperTextCss as t } from "./field-shell.js";
|
|
3
3
|
import { jsx as n } from "@emotion/react/jsx-runtime";
|
|
4
4
|
//#region src/render/parts/options-status.tsx
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.26.0 made by Venus | 2026-10-13T17:03:48.101Z */
|
|
2
2
|
import { DEFAULT_GAP_SCALE as e } from "../types/schema.js";
|
|
3
3
|
//#region src/render/stack-style.ts
|
|
4
4
|
var t = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.26.0 made by Venus | 2026-10-13T17:03:48.101Z */
|
|
2
2
|
import { isContainerNode as e } from "../engine/schema/walk.js";
|
|
3
3
|
import { isKeyedField as t, isValidatableField as n } from "../engine/keys.js";
|
|
4
4
|
import { validateKeyedFieldValue as r } from "./submit.js";
|
package/dist/es/render/submit.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.26.0 made by Venus | 2026-10-13T17:03:48.101Z */
|
|
2
2
|
import { containerBodies as e } from "../engine/schema/nodes.js";
|
|
3
3
|
import { isContainerNode as t, isLeafField as n, nodeLabel as r, walkNodes as i } from "../engine/schema/walk.js";
|
|
4
4
|
import { isKeyedField as a, isKeyedNode as o, isValidatableField as s } from "../engine/keys.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.26.0 made by Venus | 2026-10-13T17:03:48.101Z */
|
|
2
2
|
import { isRootScope as e, walkFields as t } from "../engine/schema/walk.js";
|
|
3
3
|
import { resolveRequestParams as n } from "../engine/data-source-params.js";
|
|
4
4
|
import { resolveLinkageEvaluators as r } from "../engine/linkage/default-evaluator.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.26.0 made by Venus | 2026-10-13T17:03:48.101Z */
|
|
2
2
|
import { getFieldPermission as e, isWritableFieldPermission as t } from "../engine/linkage/evaluator.js";
|
|
3
3
|
import { isDeepEqual as n } from "@vef-framework-react/shared";
|
|
4
4
|
//#region src/runtime/field-write.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.26.0 made by Venus | 2026-10-13T17:03:48.101Z */
|
|
2
2
|
//#region src/runtime/resolve-scope-values.ts
|
|
3
3
|
function e(e, t) {
|
|
4
4
|
if (t === "") return e;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.26.0 made by Venus | 2026-10-13T17:03:48.101Z */
|
|
2
2
|
import { emptyRuntimeState as e } from "../engine/linkage/evaluator.js";
|
|
3
3
|
import { createContextWithSelector as t } from "@vef-framework-react/core";
|
|
4
4
|
//#region src/runtime/runtime-context.tsx
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.26.0 made by Venus | 2026-10-13T17:03:48.101Z */
|
|
2
2
|
import { isRootScope as e, walkFields as t } from "../engine/schema/walk.js";
|
|
3
3
|
import { isKeyedField as n } from "../engine/keys.js";
|
|
4
4
|
import { evaluateRuntimeStates as r } from "../engine/linkage/evaluator.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.26.0 made by Venus | 2026-10-13T17:03:48.101Z */
|
|
2
2
|
import { isDeepEqual as e } from "@vef-framework-react/shared";
|
|
3
3
|
//#region src/runtime/stabilize-state-map.ts
|
|
4
4
|
function t(t, n) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.26.0 made by Venus | 2026-10-13T17:03:48.101Z */
|
|
2
2
|
import { jsx as e } from "@emotion/react/jsx-runtime";
|
|
3
3
|
import { createContext as t, use as n, useCallback as r, useSyncExternalStore as i } from "react";
|
|
4
4
|
//#region src/store/engine-provider.tsx
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.26.0 made by Venus | 2026-10-13T17:03:48.101Z */
|
|
2
2
|
import { createId as e, idPrefixForType as t } from "../engine/ids.js";
|
|
3
3
|
import { createEmptySchema as n } from "../engine/schema/nodes.js";
|
|
4
4
|
import { countFields as r, findField as i, findNode as a, findScope as o, scopeEquals as s, walkFields as c, walkNodes as l } from "../engine/schema/walk.js";
|
package/dist/es/types/chrome.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.26.0 made by Venus | 2026-10-13T17:03:48.101Z */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.26.0 made by Venus | 2026-10-13T17:03:48.101Z */
|
|
2
2
|
//#region src/types/data-source.ts
|
|
3
3
|
var e = { resolve: () => Promise.resolve([]) };
|
|
4
4
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.26.0 made by Venus | 2026-10-13T17:03:48.101Z */
|
|
2
2
|
//#region src/types/dynamic-value.ts
|
|
3
3
|
function e(e) {
|
|
4
4
|
if (typeof e != "object" || !e) return !1;
|
package/dist/es/types/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.26.0 made by Venus | 2026-10-13T17:03:48.101Z */
|
|
2
2
|
import { defineContainerDefinition as e, defineFieldDefinition as t } from "./component.js";
|
|
3
3
|
import { noopDataSourceResolver as n } from "./data-source.js";
|
|
4
4
|
import { isDynamicValue as r } from "./dynamic-value.js";
|
package/dist/es/types/linkage.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! @vef-framework-react/form-editor v2.
|
|
1
|
+
/*! @vef-framework-react/form-editor v2.26.0 made by Venus | 2026-10-13T17:03:48.101Z */
|
package/dist/es/types/schema.js
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { DataSourceApi, RemoteDataSourceRequest } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Publishes the host's API catalog to the remote option-source editors, which
|
|
5
|
+
* offer it as a picker. Design-time metadata only — the runtime reads the
|
|
6
|
+
* request stored in the schema, never this catalog.
|
|
7
|
+
*/
|
|
8
|
+
export declare function DataSourceApisProvider({ apis, children }: {
|
|
9
|
+
apis: DataSourceApi[] | undefined;
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
}): ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* The host's API catalog, empty when none was provided.
|
|
14
|
+
*/
|
|
15
|
+
export declare function useDataSourceApis(): DataSourceApi[];
|
|
16
|
+
/**
|
|
17
|
+
* The identity of an endpoint: what a stored request and a catalog entry are
|
|
18
|
+
* matched on. An omitted version and an empty one are the same endpoint.
|
|
19
|
+
*/
|
|
20
|
+
export declare function endpointKey(endpoint: Pick<RemoteDataSourceRequest, "action" | "resource" | "version">): string;
|
|
21
|
+
/**
|
|
22
|
+
* The catalog entry a stored request was picked from, if any.
|
|
23
|
+
*/
|
|
24
|
+
export declare function findDataSourceApi(apis: readonly DataSourceApi[], request: RemoteDataSourceRequest): DataSourceApi | undefined;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ReactElement, ReactNode, Ref } from 'react';
|
|
2
2
|
import { DeviceRegistries, FormFieldRegistry } from '../engine/registry/form-field-registry';
|
|
3
3
|
import { EditorDeviceMode, EditorViewMode } from '../store/form-store';
|
|
4
|
-
import { DataSourceResolver, EvaluationContext, FormSchema, LinkageContextSource, LinkageEvaluators } from '../types';
|
|
4
|
+
import { DataSourceApi, DataSourceResolver, EvaluationContext, FormSchema, LinkageContextSource, LinkageEvaluators } from '../types';
|
|
5
|
+
import { SchemaValidator } from './host-validation';
|
|
5
6
|
import { ToolbarBrand, Toolbar } from './toolbar/toolbar';
|
|
6
7
|
import { PalettePanel } from './palette/palette-panel';
|
|
7
8
|
import { PropertiesPanel } from './properties/properties-panel';
|
|
@@ -51,18 +52,41 @@ export interface FormEditorProviderProps {
|
|
|
51
52
|
*/
|
|
52
53
|
dataSourceResolver?: DataSourceResolver;
|
|
53
54
|
/**
|
|
54
|
-
*
|
|
55
|
-
* the
|
|
55
|
+
* The host's catalog of option APIs. Remote option sources then lead with a
|
|
56
|
+
* picker — the designer chooses "部门列表" and binds its declared parameters
|
|
57
|
+
* instead of typing an endpoint and a field mapping — with "自定义接口" kept
|
|
58
|
+
* for anything else. Design-time only: a pick is stored as the request
|
|
59
|
+
* itself, so the runtime resolves it through `dataSourceResolver` exactly as
|
|
60
|
+
* it does a hand-typed one.
|
|
61
|
+
*/
|
|
62
|
+
dataSourceApis?: DataSourceApi[];
|
|
63
|
+
/**
|
|
64
|
+
* Host evaluation scope (`$user` / `$node` / `$applicant` / `$globals`,
|
|
65
|
+
* variable overrides), forwarded to the live preview so host-context
|
|
66
|
+
* expressions evaluate truthfully. Values the designer enters as preview
|
|
67
|
+
* samples in the variables panel layer over it.
|
|
56
68
|
*/
|
|
57
69
|
evaluationContext?: EvaluationContext;
|
|
58
70
|
/**
|
|
59
|
-
* Host-declared
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
71
|
+
* Host-declared context properties — the form's system variables — e.g.
|
|
72
|
+
* `{ key: "$applicant.departmentId", label: "发起人部门 ID" }`. The variables
|
|
73
|
+
* panel lists them (with preview samples) and the visual condition builder
|
|
74
|
+
* offers them as leaf-condition sources beside the form's own fields. Pure
|
|
75
|
+
* design-time metadata: the runtime resolves the path against the live
|
|
76
|
+
* evaluation context whether or not it was declared here.
|
|
64
77
|
*/
|
|
65
78
|
contextSources?: LinkageContextSource[];
|
|
79
|
+
/**
|
|
80
|
+
* The host's own checks of the schema, layered over the editor's structural
|
|
81
|
+
* validation — a downstream contract the editor cannot know about (an
|
|
82
|
+
* approval backend rejecting some field types, say). Called only for a
|
|
83
|
+
* schema free of structural errors, it returns host-specific issues, which
|
|
84
|
+
* join the editor's in the footer diagnostics (each one clickable to its
|
|
85
|
+
* location — a field-key chain path such as `lines.price` locates the field)
|
|
86
|
+
* and in the publish gate, where an error blocks like a structural one.
|
|
87
|
+
* Pass a stable function: a new identity re-runs validation.
|
|
88
|
+
*/
|
|
89
|
+
validate?: SchemaValidator;
|
|
66
90
|
onSchemaChange?: (schema: FormSchema) => void;
|
|
67
91
|
/**
|
|
68
92
|
* Curated imperative handle — lets a host shell read/replace the schema and
|
|
@@ -80,7 +104,7 @@ export interface FormEditorProviderProps {
|
|
|
80
104
|
* render; updating them afterwards has no effect (editor state is bootstrapped
|
|
81
105
|
* once per mount — use {@link FormEditorApi.setSchema} to replace the schema).
|
|
82
106
|
*/
|
|
83
|
-
export declare function FormEditorProvider({ apiRef, children, contextSources, dataSourceResolver, evaluators, evaluationContext, initialSchema, onSchemaChange, registries: registriesProp, registry: registryProp }: FormEditorProviderProps): ReactElement;
|
|
107
|
+
export declare function FormEditorProvider({ apiRef, children, contextSources, dataSourceApis, dataSourceResolver, evaluators, evaluationContext, initialSchema, onSchemaChange, registries: registriesProp, registry: registryProp, validate }: FormEditorProviderProps): ReactElement;
|
|
84
108
|
export interface FormEditorShellProps {
|
|
85
109
|
children: ReactNode;
|
|
86
110
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { SchemaIssue } from '../engine/validation';
|
|
3
|
+
import { FormSchema } from '../types';
|
|
4
|
+
/**
|
|
5
|
+
* A host's own checks of a schema, layered over the editor's structural
|
|
6
|
+
* validation — a downstream contract the editor cannot know about, such as an
|
|
7
|
+
* approval backend that rejects some field types. It receives only schemas
|
|
8
|
+
* the structural pass found free of errors, so it may assume a well-formed
|
|
9
|
+
* tree, and returns host-specific issues only (the structural ones are the
|
|
10
|
+
* editor's).
|
|
11
|
+
*/
|
|
12
|
+
export type SchemaValidator = (schema: FormSchema) => readonly SchemaIssue[];
|
|
13
|
+
export declare function HostValidationProvider({ children, validate }: {
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
validate: SchemaValidator | undefined;
|
|
16
|
+
}): ReactElement;
|
|
17
|
+
/**
|
|
18
|
+
* The host's validator, or `undefined` when it supplies none.
|
|
19
|
+
*/
|
|
20
|
+
export declare function useHostValidation(): SchemaValidator | undefined;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { SchemaIssue } from '../engine/validation';
|
|
2
|
+
import { FormConfigTabId } from '../store/form-store';
|
|
3
|
+
import { FormSchema, PresentationDevice } from '../types';
|
|
4
|
+
/**
|
|
5
|
+
* Where a diagnostic can be shown: a node of one device's tree, or the
|
|
6
|
+
* form-config tab that edits the form-level part it is about.
|
|
7
|
+
*/
|
|
8
|
+
export type IssueTarget = {
|
|
9
|
+
kind: "node";
|
|
10
|
+
device: PresentationDevice;
|
|
11
|
+
nodeId: string;
|
|
12
|
+
} | {
|
|
13
|
+
kind: "tab";
|
|
14
|
+
tab: FormConfigTabId;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Resolve a diagnostic's `path` to what the designer should be shown, or
|
|
18
|
+
* `undefined` when it names nothing that can be shown (the schema envelope, a
|
|
19
|
+
* node or key that no longer exists).
|
|
20
|
+
*/
|
|
21
|
+
export declare function locateIssue(path: string, schema: FormSchema, device: PresentationDevice): IssueTarget | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Where a diagnostic is, in the designer's own words — the field it is about
|
|
24
|
+
* (`金额`, `移动端 · 备注`) or the form-config entry (`数据源「部门」`,
|
|
25
|
+
* `表单联动`) — or `undefined` when the path names nothing the designer shows.
|
|
26
|
+
* A raw path such as `presentations.pc.children[3].key` is for a developer;
|
|
27
|
+
* the designer reading the issue list wants the name they gave the thing.
|
|
28
|
+
*/
|
|
29
|
+
export declare function describeIssueLocation(path: string, schema: FormSchema, device: PresentationDevice): string | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Describes a diagnostic's location against the live schema (see
|
|
32
|
+
* {@link describeIssueLocation}). Reads the store when called, so the
|
|
33
|
+
* describer itself is stable.
|
|
34
|
+
*/
|
|
35
|
+
export declare function useIssueDescriber(): (issue: SchemaIssue) => string | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Resolves a diagnostic to the action that shows it — selecting the node it is
|
|
38
|
+
* about (switching device when needed; the canvas scrolls a selection into
|
|
39
|
+
* view) or opening the form-config tab that edits it — or `undefined` when it
|
|
40
|
+
* cannot be shown. Reads the store when called, so the resolver itself is
|
|
41
|
+
* stable and never re-renders a list on schema edits.
|
|
42
|
+
*/
|
|
43
|
+
export declare function useIssueNavigator(): (issue: SchemaIssue) => (() => void) | undefined;
|
|
@@ -4,14 +4,34 @@ import { DataSourceResolver, EvaluationContext, LinkageEvaluators } from '../typ
|
|
|
4
4
|
* Host-injected runtime capabilities the editor's live preview (and JSON split
|
|
5
5
|
* render) need so the in-designer `FormRenderer` behaves like the deployed form:
|
|
6
6
|
* remote / ref data sources resolve, a custom linkage engine runs, and the host
|
|
7
|
-
* evaluation scope (`$user` / `$node`) is present.
|
|
8
|
-
* `FormRendererProps` already exposes; the editor only
|
|
7
|
+
* evaluation scope (`$user` / `$node` / `$applicant` / `$globals`) is present.
|
|
8
|
+
* Mirrors the slots `FormRendererProps` already exposes; the editor only
|
|
9
|
+
* forwards them.
|
|
9
10
|
*/
|
|
10
11
|
export interface PreviewRuntime {
|
|
11
12
|
evaluators?: LinkageEvaluators;
|
|
12
13
|
dataSourceResolver?: DataSourceResolver;
|
|
13
14
|
evaluationContext?: EvaluationContext;
|
|
14
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* The designer's preview samples for the host's system variables, keyed by
|
|
18
|
+
* scope path (`$applicant.departmentId`). Design-time only: they never enter
|
|
19
|
+
* the schema, and they exist so a rule about the initiator can be tried in the
|
|
20
|
+
* preview before any real initiator exists.
|
|
21
|
+
*/
|
|
22
|
+
export interface PreviewSamples {
|
|
23
|
+
samples: ReadonlyMap<string, string>;
|
|
24
|
+
/**
|
|
25
|
+
* Set a sample, or clear it with an empty string.
|
|
26
|
+
*/
|
|
27
|
+
setSample: (path: string, value: string) => void;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Publishes the preview runtime: the host's capabilities, with the designer's
|
|
31
|
+
* samples laid over the host evaluation context. Only samples for currently
|
|
32
|
+
* declared system variables apply, so a variable the host stops declaring
|
|
33
|
+
* cannot keep steering the preview from a panel that no longer shows it.
|
|
34
|
+
*/
|
|
15
35
|
export declare function PreviewRuntimeProvider({ children, value }: {
|
|
16
36
|
children: ReactNode;
|
|
17
37
|
value: PreviewRuntime;
|
|
@@ -21,3 +41,8 @@ export declare function PreviewRuntimeProvider({ children, value }: {
|
|
|
21
41
|
* falls back to the renderer's own no-op default).
|
|
22
42
|
*/
|
|
23
43
|
export declare function usePreviewRuntime(): PreviewRuntime;
|
|
44
|
+
/**
|
|
45
|
+
* The designer's preview samples and their setter. Outside a provider the
|
|
46
|
+
* samples are empty and setting one does nothing.
|
|
47
|
+
*/
|
|
48
|
+
export declare function usePreviewSamples(): PreviewSamples;
|
|
@@ -40,7 +40,6 @@ export declare const actionCardCss: SerializedStyles;
|
|
|
40
40
|
export declare const actionHeaderCss: SerializedStyles;
|
|
41
41
|
export declare const actionDeleteCss: SerializedStyles;
|
|
42
42
|
export declare const valueEditorCss: SerializedStyles;
|
|
43
|
-
export declare const apiFieldsCss: SerializedStyles;
|
|
44
43
|
export declare const selectStyle: {
|
|
45
44
|
readonly width: "100%";
|
|
46
45
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DragEndEvent } from '@vef-framework-react/core';
|
|
2
2
|
import { ReactElement } from 'react';
|
|
3
|
-
import { FieldOption
|
|
3
|
+
import { FieldOption } from '../../types';
|
|
4
4
|
export interface OptionListEditorProps {
|
|
5
5
|
options: FieldOption[];
|
|
6
6
|
onChange: (next: FieldOption[]) => void;
|
|
@@ -33,14 +33,3 @@ export declare function reorderOptionRows(options: FieldOption[], rowIds: string
|
|
|
33
33
|
* a focused cell may briefly pin to the wrong logical row.
|
|
34
34
|
*/
|
|
35
35
|
export declare function OptionListEditor({ onChange, options }: OptionListEditorProps): ReactElement;
|
|
36
|
-
export interface RemoteRequestFieldsProps {
|
|
37
|
-
request: RemoteDataSourceRequest;
|
|
38
|
-
mapping: RemoteOptionMapping | undefined;
|
|
39
|
-
onChange: (request: RemoteDataSourceRequest, mapping: RemoteOptionMapping | undefined) => void;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* The resource / action / labelKey / valueKey editor for a remote option
|
|
43
|
-
* request. Shared by the field option-source entry and the form-global
|
|
44
|
-
* data-source panel; an all-empty mapping is normalized back to `undefined`.
|
|
45
|
-
*/
|
|
46
|
-
export declare function RemoteRequestFields({ mapping, onChange, request }: RemoteRequestFieldsProps): ReactElement;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { RemoteDataSourceRequest, RemoteOptionMapping } from '../../types';
|
|
3
|
+
export interface RemoteOptionSourceEditorProps {
|
|
4
|
+
request: RemoteDataSourceRequest;
|
|
5
|
+
mapping: RemoteOptionMapping | undefined;
|
|
6
|
+
onChange: (request: RemoteDataSourceRequest, mapping: RemoteOptionMapping | undefined) => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Editor for a remote option source — a form-global data source or a field's
|
|
10
|
+
* inline one. With a host API catalog it leads with a picker, so a designer
|
|
11
|
+
* chooses "部门列表" and binds its declared parameters instead of typing an
|
|
12
|
+
* endpoint and a field mapping; "自定义接口" (and every source without a
|
|
13
|
+
* catalog) keeps the hand-entered request.
|
|
14
|
+
*/
|
|
15
|
+
export declare function RemoteOptionSourceEditor({ mapping, onChange, request }: RemoteOptionSourceEditorProps): ReactElement;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { DataSourceApiParam, RemoteDataSourceRequest } from '../../types';
|
|
3
|
+
import { SerializedStyles } from '@emotion/react';
|
|
4
|
+
export declare const requestGridCss: SerializedStyles;
|
|
5
|
+
/**
|
|
6
|
+
* The vertical rhythm of a whole request editor: its groups sit further apart
|
|
7
|
+
* than the controls inside a group.
|
|
8
|
+
*/
|
|
9
|
+
export declare const requestEditorCss: SerializedStyles;
|
|
10
|
+
type RequestParams = RemoteDataSourceRequest["params"];
|
|
11
|
+
/**
|
|
12
|
+
* A request with its params replaced, omitting the key when there are none.
|
|
13
|
+
*/
|
|
14
|
+
export declare function withRequestParams(request: RemoteDataSourceRequest, params: RequestParams): RemoteDataSourceRequest;
|
|
15
|
+
export interface RequestSectionProps {
|
|
16
|
+
title: string;
|
|
17
|
+
hint?: ReactNode;
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* One part of a request — its field mapping, its parameters — under a quiet
|
|
22
|
+
* caption, so the editor reads as a few named groups rather than one run of
|
|
23
|
+
* inputs.
|
|
24
|
+
*/
|
|
25
|
+
export declare function RequestSection({ children, hint, title }: RequestSectionProps): ReactElement;
|
|
26
|
+
/**
|
|
27
|
+
* A control under a small caption. A placeholder is no label: it vanishes the
|
|
28
|
+
* moment the field holds a value, and `md/staff` beside `find_options` no
|
|
29
|
+
* longer says which box is the resource.
|
|
30
|
+
*/
|
|
31
|
+
export declare function LabeledControl({ children, label }: {
|
|
32
|
+
label: string;
|
|
33
|
+
children: ReactNode;
|
|
34
|
+
}): ReactElement;
|
|
35
|
+
export interface RequestParamsEditorProps {
|
|
36
|
+
params: RequestParams;
|
|
37
|
+
/**
|
|
38
|
+
* The parameters an API declares: listed first, under their names and
|
|
39
|
+
* labels, with only the value to bind. Free rows follow either way.
|
|
40
|
+
*/
|
|
41
|
+
declared?: readonly DataSourceApiParam[];
|
|
42
|
+
onChange: (params: RequestParams) => void;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Editor for a request's parameters. Each value is a fixed literal or an
|
|
46
|
+
* expression evaluated against the live form, which is what makes a cascading
|
|
47
|
+
* select work.
|
|
48
|
+
*
|
|
49
|
+
* The `params` record is the only source of truth for a named parameter. A
|
|
50
|
+
* name is draft-buffered and committed on blur / Enter, and only once it is
|
|
51
|
+
* non-blank and held by no other parameter — so a rename in progress can never
|
|
52
|
+
* collapse two rows into one record key (and lose a value) or store a param
|
|
53
|
+
* named `""`. An unbound declared parameter is omitted rather than sent empty:
|
|
54
|
+
* an empty filter is not "no filter".
|
|
55
|
+
*/
|
|
56
|
+
export declare function RequestParamsEditor({ declared, onChange, params }: RequestParamsEditorProps): ReactElement;
|
|
57
|
+
export interface RemoteRequestEditorProps {
|
|
58
|
+
request: RemoteDataSourceRequest;
|
|
59
|
+
onChange: (request: RemoteDataSourceRequest) => void;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* The hand-entered endpoint: resource / action / version.
|
|
63
|
+
*/
|
|
64
|
+
export declare function RequestEndpointFields({ onChange, request }: RemoteRequestEditorProps): ReactElement;
|
|
65
|
+
/**
|
|
66
|
+
* Hand-entered endpoint plus its parameters — the editor for an `api_call`
|
|
67
|
+
* action's request.
|
|
68
|
+
*/
|
|
69
|
+
export declare function RemoteRequestEditor({ onChange, request }: RemoteRequestEditorProps): ReactElement;
|
|
70
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The host-injected system variables (`contextSources`): read-only values such
|
|
4
|
+
* as the initiator's department, listed so a designer can see what exists,
|
|
5
|
+
* copy the path an expression reads, and try a rule in the preview with a
|
|
6
|
+
* sample value. Renders nothing when the host declares none.
|
|
7
|
+
*/
|
|
8
|
+
export declare function SystemVariablesPanel(): ReactElement | null;
|
|
@@ -8,14 +8,14 @@ import { SerializedStyles } from '@emotion/react';
|
|
|
8
8
|
*
|
|
9
9
|
* Two layouts are supported (see `editor-layout-context.tsx`):
|
|
10
10
|
* - docked: palette 296, properties 400
|
|
11
|
-
* - drawer: the palette collapses to an icon rail and the properties panel
|
|
11
|
+
* - drawer (properties 360): the palette collapses to an icon rail and the properties panel
|
|
12
12
|
* floats over the canvas's right edge, so the canvas keeps real width
|
|
13
13
|
* inside narrow hosts (wizard steps, split panes).
|
|
14
14
|
*/
|
|
15
15
|
export declare const PALETTE_DOCK_WIDTH = 296;
|
|
16
16
|
export declare const PALETTE_DOCK_WIDTH_DRAWER = 64;
|
|
17
17
|
export declare const PROPERTIES_PANEL_WIDTH = 400;
|
|
18
|
-
export declare const PROPERTIES_PANEL_WIDTH_DRAWER =
|
|
18
|
+
export declare const PROPERTIES_PANEL_WIDTH_DRAWER = 360;
|
|
19
19
|
export declare const paletteDockCss: SerializedStyles;
|
|
20
20
|
/**
|
|
21
21
|
* Docked properties workbench on the right edge of the workspace — the mirror
|
|
@@ -1,19 +1,42 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
2
|
+
import { DeviceRegistries } from '../engine/registry/form-field-registry';
|
|
3
|
+
import { SchemaIssue } from '../engine/validation';
|
|
4
|
+
import { FormSchema } from '../types';
|
|
5
|
+
import { SchemaValidator } from './host-validation';
|
|
6
|
+
/**
|
|
7
|
+
* Everything the editor knows to be wrong with a schema: its structural
|
|
8
|
+
* validation, then — only for a schema free of structural errors, which is
|
|
9
|
+
* all a host validator is promised — the host's own checks.
|
|
10
|
+
*/
|
|
11
|
+
export declare function collectSchemaIssues(schema: FormSchema, registries: DeviceRegistries, validate: SchemaValidator | undefined): SchemaIssue[];
|
|
6
12
|
/**
|
|
7
|
-
* The live schema's
|
|
8
|
-
* footer chip). Deferred: the urgent render after a
|
|
9
|
-
* the
|
|
10
|
-
* latency never pays for diagnostics. One pass per schema
|
|
11
|
-
* keyed on the deferred schema reference.
|
|
13
|
+
* The live schema's issues — structural and the host's — for passive
|
|
14
|
+
* diagnostic surfaces (the footer chip). Deferred: the urgent render after a
|
|
15
|
+
* keystroke ships first and the validation pass follows at transition
|
|
16
|
+
* priority, so typing latency never pays for diagnostics. One pass per schema
|
|
17
|
+
* version — `useMemo` keyed on the deferred schema reference.
|
|
12
18
|
*/
|
|
13
|
-
export declare function useSchemaIssues():
|
|
19
|
+
export declare function useSchemaIssues(): SchemaIssue[];
|
|
20
|
+
export interface IssueListProps {
|
|
21
|
+
issues: readonly SchemaIssue[];
|
|
22
|
+
/**
|
|
23
|
+
* Where an issue is, in the designer's words — the field's name, the data
|
|
24
|
+
* source's — shown under its message in place of the raw path, which stays
|
|
25
|
+
* available as the location's tooltip. An issue it has no words for shows
|
|
26
|
+
* its path.
|
|
27
|
+
*/
|
|
28
|
+
describeLocation?: (issue: SchemaIssue) => string | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Turns the list into a navigator: every issue is listed, and each one that
|
|
31
|
+
* resolves to an action renders as a button running it — the footer's "take
|
|
32
|
+
* me to the problem". Without it the list is a read-only summary of the first
|
|
33
|
+
* few issues, for confirm dialogs.
|
|
34
|
+
*/
|
|
35
|
+
resolveAction?: (issue: SchemaIssue) => (() => void) | undefined;
|
|
36
|
+
}
|
|
14
37
|
/**
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
38
|
+
* The issue list every diagnostic surface shares — the publish confirmation and
|
|
39
|
+
* the footer navigator — so a problem reads the same wherever it is shown: the
|
|
40
|
+
* message, then where it is.
|
|
18
41
|
*/
|
|
19
|
-
export declare function IssueList({ issues }: IssueListProps): ReactElement;
|
|
42
|
+
export declare function IssueList({ describeLocation, issues, resolveAction }: IssueListProps): ReactElement;
|