mlform 0.1.23 → 0.1.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +98 -229
- package/dist/builtins-jvAitKUC.js +560 -0
- package/dist/{design-Dr7o4rR9.js → design-D8zce4Mh.js} +13 -12
- package/dist/mlform/builtins.mjs +2 -2
- package/dist/mlform/design.mjs +1 -1
- package/dist/mlform/kit.mjs +435 -275
- package/dist/mlform/primitives.mjs +2 -2
- package/dist/mlform/runtime.mjs +1 -1
- package/dist/mlform/schema.mjs +1 -1
- package/dist/{primitives-ljp3c5R8.js → primitives-ChLgMFl9.js} +452 -450
- package/dist/{runtime-BQsOz8iz.js → runtime-B_vnmwya.js} +9 -9
- package/dist/{schema-BI-Ia-h9.js → schema-C34LJ8aV.js} +5 -5
- package/dist/types/{src/builtins → builtins}/definitions/collections.d.ts +12 -12
- package/dist/types/{src/builtins → builtins}/definitions/fields/boolean.d.ts +1 -1
- package/dist/types/{src/builtins → builtins}/definitions/fields/category.d.ts +1 -1
- package/dist/types/{src/builtins → builtins}/definitions/fields/date.d.ts +1 -1
- package/dist/types/{src/builtins → builtins}/definitions/fields/long-text.d.ts +1 -1
- package/dist/types/{src/builtins → builtins}/definitions/fields/mapped-category.d.ts +1 -1
- package/dist/types/{src/builtins → builtins}/definitions/fields/multi-choice.d.ts +1 -1
- package/dist/types/{src/builtins → builtins}/definitions/fields/number.d.ts +1 -1
- package/dist/types/{src/builtins → builtins}/definitions/fields/onehot-category.d.ts +1 -1
- package/dist/types/{src/builtins → builtins}/definitions/fields/rating.d.ts +1 -1
- package/dist/types/{src/builtins → builtins}/definitions/fields/series-helpers.d.ts +4 -4
- package/dist/types/{src/builtins → builtins}/definitions/fields/single-choice.d.ts +1 -1
- package/dist/types/{src/builtins → builtins}/definitions/fields/text.d.ts +1 -1
- package/dist/types/{src/builtins → builtins}/definitions/reports/classifier.d.ts +1 -1
- package/dist/types/{src/builtins → builtins}/definitions/reports/regressor.d.ts +1 -1
- package/dist/types/{src/builtins → builtins}/definitions/shared.d.ts +3 -28
- package/dist/types/{src/builtins → builtins}/index.d.ts +2 -3
- package/dist/types/{src/builtins → builtins}/mapped-category-behavior.d.ts +1 -1
- package/dist/types/builtins/registry.d.ts +2 -0
- package/dist/types/kit/builtin-presenters.d.ts +2 -0
- package/dist/types/{src/kit → kit}/defaults.d.ts +3 -3
- package/dist/types/{src/kit → kit}/index.d.ts +3 -0
- package/dist/types/{src/kit → kit}/kinds/define-field-kind.d.ts +4 -3
- package/dist/types/{src/kit → kit}/kinds/define-report-kind.d.ts +4 -3
- package/dist/types/kit/kinds/register-kind.d.ts +6 -0
- package/dist/types/{src/kit → kit}/layout-helpers.d.ts +1 -1
- package/dist/types/{src/kit → kit}/layout-node-render.d.ts +1 -1
- package/dist/types/{src/kit → kit}/layout-root.d.ts +1 -1
- package/dist/types/{src/kit → kit}/layout-utils.d.ts +1 -1
- package/dist/types/{src/kit → kit}/layout.d.ts +1 -1
- package/dist/types/{src/kit → kit}/mount-types.d.ts +5 -3
- package/dist/types/kit/plugin.d.ts +19 -0
- package/dist/types/kit/registry-pack.d.ts +16 -0
- package/dist/types/{src/kit → kit}/tabs-root.d.ts +1 -1
- package/dist/types/{src/kit → kit}/view-core-types.d.ts +4 -2
- package/dist/types/{src/kit → kit}/view-navigation.d.ts +1 -1
- package/dist/types/{src/kit → kit}/view-snapshot-cache.d.ts +2 -2
- package/dist/types/{src/kit → kit}/view-snapshot.d.ts +2 -2
- package/dist/types/{src/kit → kit}/wizard-root.d.ts +1 -1
- package/dist/types/{src/primitives → primitives}/descriptors/registry.d.ts +2 -1
- package/dist/types/{src/primitives → primitives}/index.d.ts +1 -1
- package/dist/types/primitives/mount-form.d.ts +4 -0
- package/dist/types/{src/runtime → runtime}/errors.d.ts +1 -1
- package/dist/types/{src/runtime → runtime}/runtime-behaviors.d.ts +1 -1
- package/dist/types/{src/runtime → runtime}/submission/request.d.ts +1 -1
- package/dist/types/{src/runtime → runtime}/submission/types.d.ts +1 -1
- package/dist/types/{src/runtime → runtime}/types/behavior.d.ts +2 -2
- package/dist/types/{src/runtime → runtime}/types/field.d.ts +3 -3
- package/dist/types/{src/runtime → runtime}/types/form.d.ts +3 -2
- package/dist/types/{src/runtime → runtime}/types/index.d.ts +1 -0
- package/dist/types/{src/runtime → runtime}/types/registry.d.ts +1 -1
- package/dist/types/{src/runtime → runtime}/types/report.d.ts +5 -5
- package/dist/types/runtime/types/status.d.ts +1 -0
- package/dist/types/{src/runtime → runtime}/types/transport.d.ts +5 -5
- package/dist/types/{src/runtime → runtime}/validation/form.d.ts +1 -1
- package/dist/types/{src/schema → schema}/index.d.ts +1 -0
- package/dist/types/{src/schema → schema}/mapped-to.d.ts +2 -6
- package/dist/types/{src/schema → schema}/normalize.d.ts +2 -1
- package/dist/types/{src/schema → schema}/registry.d.ts +3 -1
- package/dist/types/{src/schema → schema}/types/field.d.ts +1 -1
- package/dist/types/schema/types/mapping.d.ts +6 -0
- package/dist/types/{src/schema → schema}/types/report.d.ts +1 -1
- package/dist/types/{src/schema → schema}/types/submit.d.ts +1 -1
- package/dist/types/{src/schema → schema}/validation.d.ts +2 -1
- package/dist/types/{src/transport → transport}/types.d.ts +1 -1
- package/package.json +27 -20
- package/dist/builtins-rkxD-h7K.js +0 -749
- package/dist/types/src/builtins/registry-pack.d.ts +0 -10
- package/dist/types/src/kit/kinds/register-kind.d.ts +0 -5
- package/dist/types/src/primitives/mount-form.d.ts +0 -4
- /package/dist/types/{src/builtins → builtins}/constants.d.ts +0 -0
- /package/dist/types/{src/builtins → builtins}/definitions/fields/series.d.ts +0 -0
- /package/dist/types/{src/builtins → builtins}/definitions/fields/value-helpers.d.ts +0 -0
- /package/dist/types/{src/builtins → builtins}/definitions/index.d.ts +0 -0
- /package/dist/types/{src/design → design}/constants.d.ts +0 -0
- /package/dist/types/{src/design → design}/contract/component-keys.d.ts +0 -0
- /package/dist/types/{src/design → design}/contract/component-tokens.d.ts +0 -0
- /package/dist/types/{src/design → design}/contract/global-tokens.d.ts +0 -0
- /package/dist/types/{src/design → design}/contract/index.d.ts +0 -0
- /package/dist/types/{src/design → design}/contract/token-keys.d.ts +0 -0
- /package/dist/types/{src/design → design}/index.d.ts +0 -0
- /package/dist/types/{src/design → design}/recipes/collections.d.ts +0 -0
- /package/dist/types/{src/design → design}/recipes/contrast.d.ts +0 -0
- /package/dist/types/{src/design → design}/recipes/default.d.ts +0 -0
- /package/dist/types/{src/design → design}/recipes/index.d.ts +0 -0
- /package/dist/types/{src/design → design}/recipes/minimal.d.ts +0 -0
- /package/dist/types/{src/design → design}/recipes/soft.d.ts +0 -0
- /package/dist/types/{src/design → design}/registry/builtins.d.ts +0 -0
- /package/dist/types/{src/design → design}/registry/create-registry.d.ts +0 -0
- /package/dist/types/{src/design → design}/registry/deep-freeze.d.ts +0 -0
- /package/dist/types/{src/design → design}/registry/define-recipe.d.ts +0 -0
- /package/dist/types/{src/design → design}/registry/define-theme.d.ts +0 -0
- /package/dist/types/{src/design → design}/registry/define-token-maps.d.ts +0 -0
- /package/dist/types/{src/design → design}/registry/index.d.ts +0 -0
- /package/dist/types/{src/design → design}/resolve/diagnostics.d.ts +0 -0
- /package/dist/types/{src/design → design}/resolve/index.d.ts +0 -0
- /package/dist/types/{src/design → design}/resolve/merge-config.d.ts +0 -0
- /package/dist/types/{src/design → design}/resolve/migrate-tokens.d.ts +0 -0
- /package/dist/types/{src/design → design}/resolve/resolve-design.d.ts +0 -0
- /package/dist/types/{src/design → design}/resolve/resolve-mode.d.ts +0 -0
- /package/dist/types/{src/design → design}/resolve/resolve-recipe.d.ts +0 -0
- /package/dist/types/{src/design → design}/resolve/resolve-theme.d.ts +0 -0
- /package/dist/types/{src/design → design}/resolve/resolve-tokens.d.ts +0 -0
- /package/dist/types/{src/design → design}/runtime/apply-tokens.d.ts +0 -0
- /package/dist/types/{src/design → design}/runtime/attach-design.d.ts +0 -0
- /package/dist/types/{src/design → design}/runtime/controller-helpers.d.ts +0 -0
- /package/dist/types/{src/design → design}/runtime/create-stylesheet.d.ts +0 -0
- /package/dist/types/{src/design → design}/runtime/declarations.d.ts +0 -0
- /package/dist/types/{src/design → design}/runtime/design-controller.d.ts +0 -0
- /package/dist/types/{src/design → design}/runtime/fingerprint.d.ts +0 -0
- /package/dist/types/{src/design → design}/runtime/host-observer.d.ts +0 -0
- /package/dist/types/{src/design → design}/runtime/host-state.d.ts +0 -0
- /package/dist/types/{src/design → design}/runtime/hydrate-design.d.ts +0 -0
- /package/dist/types/{src/design → design}/runtime/hydration-state.d.ts +0 -0
- /package/dist/types/{src/design → design}/runtime/index.d.ts +0 -0
- /package/dist/types/{src/design → design}/runtime/inherited-scheme.d.ts +0 -0
- /package/dist/types/{src/design → design}/runtime/media.d.ts +0 -0
- /package/dist/types/{src/design → design}/themes/airbnb.d.ts +0 -0
- /package/dist/types/{src/design → design}/themes/clickhouse.d.ts +0 -0
- /package/dist/types/{src/design → design}/themes/cobalt.d.ts +0 -0
- /package/dist/types/{src/design → design}/themes/collections.d.ts +0 -0
- /package/dist/types/{src/design → design}/themes/graphite.d.ts +0 -0
- /package/dist/types/{src/design → design}/themes/index.d.ts +0 -0
- /package/dist/types/{src/design → design}/themes/neutral.d.ts +0 -0
- /package/dist/types/{src/design → design}/themes/sage.d.ts +0 -0
- /package/dist/types/{src/design → design}/themes/sunset.d.ts +0 -0
- /package/dist/types/{src/design → design}/tokens/base.d.ts +0 -0
- /package/dist/types/{src/design → design}/tokens/contrast.d.ts +0 -0
- /package/dist/types/{src/design → design}/tokens/density.d.ts +0 -0
- /package/dist/types/{src/design → design}/tokens/forced-colors.d.ts +0 -0
- /package/dist/types/{src/design → design}/tokens/index.d.ts +0 -0
- /package/dist/types/{src/design → design}/tokens/motion.d.ts +0 -0
- /package/dist/types/{src/design → design}/types.d.ts +0 -0
- /package/dist/types/{src/kit → kit}/constants.d.ts +0 -0
- /package/dist/types/{src/kit → kit}/disclosure-root-styles.d.ts +0 -0
- /package/dist/types/{src/kit → kit}/error-navigation.d.ts +0 -0
- /package/dist/types/{src/kit → kit}/kinds/index.d.ts +0 -0
- /package/dist/types/{src/kit → kit}/layout-node-resolver.d.ts +0 -0
- /package/dist/types/{src/kit → kit}/layout-types.d.ts +0 -0
- /package/dist/types/{src/kit → kit}/mount-form.d.ts +0 -0
- /package/dist/types/{src/kit → kit}/panel-nav.d.ts +0 -0
- /package/dist/types/{src/kit → kit}/step-indicator.d.ts +0 -0
- /package/dist/types/{src/kit → kit}/tabs-root-styles.d.ts +0 -0
- /package/dist/types/{src/kit → kit}/types.d.ts +0 -0
- /package/dist/types/{src/kit → kit}/view-layout-state.d.ts +0 -0
- /package/dist/types/{src/kit → kit}/view-types.d.ts +0 -0
- /package/dist/types/{src/kit → kit}/view.d.ts +0 -0
- /package/dist/types/{src/kit → kit}/wizard-constants.d.ts +0 -0
- /package/dist/types/{src/kit → kit}/wizard-root-styles.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/base-async-report-element.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/base-field-element.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/base-report-element.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/components/declarative-field.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/components/declarative-report.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/components/descriptor-content.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/components/error-focus.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/components/field-frame-feedback.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/components/field-frame-styles.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/components/field-frame.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/components/form-errors.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/components/form-root-presenters.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/components/form-root-split-styles.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/components/form-root-state.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/components/form-root-styles.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/components/form-root-templates.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/components/form-root.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/components/mounted-report.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/components/report-frame.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/components/submit-button.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/components/unsupported-component.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/constants.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/controller-binding.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/controller-types.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/descriptor-resolution.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/descriptors/content.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/descriptors/field.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/descriptors/index.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/descriptors/report.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/fields/boolean-field.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/fields/category-field.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/fields/date-field.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/fields/long-text-field.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/fields/multi-choice-field.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/fields/number-field.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/fields/rating-field.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/fields/series-field-helpers.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/fields/series-field-renderers.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/fields/series-field-styles.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/fields/series-field.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/fields/single-choice-field.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/fields/text-field.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/register.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/registry.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/reports/classifier-report.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/reports/regressor-report.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/request-runner.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/types.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/utils.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/comparison.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/create-runtime-helpers.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/create-runtime.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/equality.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/fields/controller.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/fields/index.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/fields/state-calculations.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/fields/state.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/form.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/index.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/paths.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/reports/controller.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/reports/index.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/runtime-controller.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/runtime-refresh.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/runtime-values.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/state/engine.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/state/index.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/state/snapshots.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/state/store.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/submission/abort.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/submission/create-submitter.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/submission/error-flow.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/submission/index.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/submission/lifecycle.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/submission/multi-backend.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/submission/pipeline.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/submission/report-fetches.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/submission/reports.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/submission/result.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/submission/snapshot.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/submission/submitter.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/submission/transport-response.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/types/pipeline.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/utils.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/validation/conditions.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/validation/field-state.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/validation/field-validator.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/validation/field.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/validation/index.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/values.d.ts +0 -0
- /package/dist/types/{src/schema → schema}/ids.d.ts +0 -0
- /package/dist/types/{src/schema → schema}/onehot-display.d.ts +0 -0
- /package/dist/types/{src/schema → schema}/report-context.d.ts +0 -0
- /package/dist/types/{src/schema → schema}/report-fetch-request.d.ts +0 -0
- /package/dist/types/{src/schema → schema}/types/form.d.ts +0 -0
- /package/dist/types/{src/schema → schema}/types/registry.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/errors.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/fanout.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/index.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/request-runner.d.ts +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as e, b as t, g as n, h as r, l as i, m as a, t as o, v as s, y as c } from "./schema-
|
|
1
|
+
import { a as e, b as t, g as n, h as r, l as i, m as a, t as o, v as s, y as c } from "./schema-C34LJ8aV.js";
|
|
2
2
|
import { a as l, n as u, r as d } from "./transport-KUB3zfW9.js";
|
|
3
3
|
//#region src/runtime/submission/report-fetches.ts
|
|
4
4
|
var f = "Unknown report fetch error.", p = async ({ reports: e, request: t }) => {
|
|
@@ -79,7 +79,7 @@ var f = "Unknown report fetch error.", p = async ({ reports: e, request: t }) =>
|
|
|
79
79
|
if (n?.dirty || n?.touched) return !0;
|
|
80
80
|
}
|
|
81
81
|
return !1;
|
|
82
|
-
}, T = (e, t) => e.config.inactiveFieldPolicy ?? t ?? "omit", E = (e, t) => new g(`${e} definition "${t}" disappeared during form creation.`), D = (e) => typeof e == "object" && !!e && !Array.isArray(e), te = (e) => typeof e == "object" && !!e || typeof e == "function", O = (e) => te(e) && "then" in e && typeof e.then == "function", k = (e) => e == null ? !0 : typeof e == "string" ? e.trim() === "" : Array.isArray(e) ? e.length === 0 : e instanceof Date
|
|
82
|
+
}, T = (e, t) => e.config.inactiveFieldPolicy ?? t ?? "omit", E = (e, t) => new g(`${e} definition "${t}" disappeared during form creation.`), D = (e) => typeof e == "object" && !!e && !Array.isArray(e), te = (e) => typeof e == "object" && !!e || typeof e == "function", O = (e) => te(e) && "then" in e && typeof e.then == "function", k = (e) => e == null ? !0 : typeof e == "string" ? e.trim() === "" : Array.isArray(e) ? e.length === 0 : e instanceof Date && Number.isNaN(e.getTime()), ne = (e) => e, A = (e) => {
|
|
83
83
|
let t = typeof ArrayBuffer < "u" && ArrayBuffer.isView(e), n = typeof ArrayBuffer < "u" && e instanceof ArrayBuffer || typeof SharedArrayBuffer < "u" && e instanceof SharedArrayBuffer, r = typeof Blob < "u" && e instanceof Blob || typeof File < "u" && e instanceof File;
|
|
84
84
|
if (e !== null && (typeof e == "object" || typeof e == "function") && !t && !n && !r && !Object.isFrozen(e)) {
|
|
85
85
|
Object.freeze(e);
|
|
@@ -116,7 +116,7 @@ var f = "Unknown report fetch error.", p = async ({ reports: e, request: t }) =>
|
|
|
116
116
|
}, se = (e) => typeof File < "u" && e instanceof File ? new File([e], e.name, {
|
|
117
117
|
type: e.type,
|
|
118
118
|
lastModified: e.lastModified
|
|
119
|
-
}) : typeof Blob < "u" && e instanceof Blob ? e.slice(0, e.size, e.type) : e, ce = (e, t) => e.length === t.length && e.every((e, n) => e === t[n]), le = (e, t) => e.byteLength === t.byteLength
|
|
119
|
+
}) : typeof Blob < "u" && e instanceof Blob ? e.slice(0, e.size, e.type) : e, ce = (e, t) => e.length === t.length && e.every((e, n) => e === t[n]), le = (e, t) => e.byteLength === t.byteLength && ce(new Uint8Array(e), new Uint8Array(t)), M = (e) => {
|
|
120
120
|
if (e instanceof Date) return new Date(e.getTime());
|
|
121
121
|
if (e instanceof RegExp) return new RegExp(e.source, e.flags);
|
|
122
122
|
if (e instanceof ArrayBuffer) return oe(e);
|
|
@@ -149,7 +149,7 @@ var f = "Unknown report fetch error.", p = async ({ reports: e, request: t }) =>
|
|
|
149
149
|
}
|
|
150
150
|
return n.length === 0;
|
|
151
151
|
}
|
|
152
|
-
if (typeof Blob < "u" && typeof File < "u" && e instanceof Blob && t instanceof Blob) return e.size
|
|
152
|
+
if (typeof Blob < "u" && typeof File < "u" && e instanceof Blob && t instanceof Blob) return e.size !== t.size || e.type !== t.type ? !1 : e instanceof File && t instanceof File ? e.name === t.name && e.lastModified === t.lastModified : !0;
|
|
153
153
|
if (Array.isArray(e) && Array.isArray(t)) return e.length === t.length && e.every((e, n) => N(e, t[n]));
|
|
154
154
|
if (D(e) && D(t)) {
|
|
155
155
|
let n = Object.keys(e), r = Object.keys(t);
|
|
@@ -163,7 +163,7 @@ var f = "Unknown report fetch error.", p = async ({ reports: e, request: t }) =>
|
|
|
163
163
|
}), ue = (e, t) => {
|
|
164
164
|
if (e.config.includeInSubmission === !1) return !1;
|
|
165
165
|
let n = t(e), r = e.state;
|
|
166
|
-
return
|
|
166
|
+
return !!r.visible && !r.disabled || n !== "omit" && n !== "reset-on-hide";
|
|
167
167
|
}, de = (e) => e.kind === "onehot-category" && Array.isArray(e.options), fe = (e, t, n, r) => {
|
|
168
168
|
j(e, ie(t, n), M(r));
|
|
169
169
|
}, pe = (e, t) => {
|
|
@@ -189,7 +189,7 @@ var f = "Unknown report fetch error.", p = async ({ reports: e, request: t }) =>
|
|
|
189
189
|
let t = e.config.displayKey.trim();
|
|
190
190
|
return t.length > 0 ? t : void 0;
|
|
191
191
|
}, he = (e, t, n, r, i) => {
|
|
192
|
-
if (
|
|
192
|
+
if (n.state.visible && r !== void 0) {
|
|
193
193
|
if (t.has(r)) throw Error(`field "${n.id}": duplicate displayKey "${r}".`);
|
|
194
194
|
t.add(r), e[r] = M(i);
|
|
195
195
|
}
|
|
@@ -622,7 +622,7 @@ var f = "Unknown report fetch error.", p = async ({ reports: e, request: t }) =>
|
|
|
622
622
|
reports: a.reports,
|
|
623
623
|
signal: D
|
|
624
624
|
}, l = await n.submit(c);
|
|
625
|
-
if (
|
|
625
|
+
if (_.getCurrentRequestId() !== f || t.getState().lifecycleVersion !== E || D.aborted || _.isAborted(f)) throw S(_.getAbortReason(f));
|
|
626
626
|
let u = Ne(l), d = {
|
|
627
627
|
backend: p,
|
|
628
628
|
...w,
|
|
@@ -666,10 +666,10 @@ var f = "Unknown report fetch error.", p = async ({ reports: e, request: t }) =>
|
|
|
666
666
|
_.reset();
|
|
667
667
|
}
|
|
668
668
|
};
|
|
669
|
-
}, Le = (e) => typeof e == "object" && !!e && !Array.isArray(e), V = (e, t) => Object.is(e, t), Re = (e, t) => e === t
|
|
669
|
+
}, Le = (e) => typeof e == "object" && !!e && !Array.isArray(e), V = (e, t) => Object.is(e, t), Re = (e, t) => e === t || e.length === t.length && e.every((e, n) => Object.is(e, t[n])), ze = (e, t) => {
|
|
670
670
|
if (e === t) return !0;
|
|
671
671
|
let n = Object.keys(e), r = Object.keys(t);
|
|
672
|
-
return n.length === r.length
|
|
672
|
+
return n.length === r.length && n.every((n) => Object.is(e[n], t[n]));
|
|
673
673
|
}, Be = (e, t) => Object.is(e, t) ? !0 : Array.isArray(e) && Array.isArray(t) ? Re(e, t) : Le(e) && Le(t) ? ze(e, t) : !1, Ve = (e) => {
|
|
674
674
|
if (e instanceof Date) return Number.isNaN(e.getTime()) ? null : e.getTime();
|
|
675
675
|
if (typeof e == "number") return Number.isNaN(e) ? null : e;
|
|
@@ -10,7 +10,7 @@ var a = (e) => e.trim().toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/
|
|
|
10
10
|
return Object.values(e).filter((e) => {
|
|
11
11
|
if (typeof e != "string" && typeof e != "number") return !1;
|
|
12
12
|
let t = s(e);
|
|
13
|
-
return r.has(t)
|
|
13
|
+
return !r.has(t) && (r.add(t), !0);
|
|
14
14
|
});
|
|
15
15
|
}, l = (e, t) => {
|
|
16
16
|
if (typeof e == "string" || typeof e == "number") return [{
|
|
@@ -201,7 +201,7 @@ var a = (e) => e.trim().toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/
|
|
|
201
201
|
let n = [], r = (r) => {
|
|
202
202
|
let i = e[r];
|
|
203
203
|
Array.isArray(i) && i.forEach((e, i) => {
|
|
204
|
-
if (
|
|
204
|
+
if (A(e) && typeof e.kind == "string" && ((r === "fields" ? t.getField(e.kind) : t.getReport(e.kind)) || n.push({
|
|
205
205
|
section: r,
|
|
206
206
|
index: i,
|
|
207
207
|
kind: e.kind,
|
|
@@ -212,7 +212,7 @@ var a = (e) => e.trim().toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/
|
|
|
212
212
|
]
|
|
213
213
|
}), r === "fields" && e.kind === "series")) for (let a of ["field1", "field2"]) {
|
|
214
214
|
let o = e[a];
|
|
215
|
-
|
|
215
|
+
A(o) && typeof o.kind == "string" && (t.getField(o.kind) || n.push({
|
|
216
216
|
section: r,
|
|
217
217
|
index: i,
|
|
218
218
|
kind: o.kind,
|
|
@@ -222,7 +222,7 @@ var a = (e) => e.trim().toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/
|
|
|
222
222
|
a,
|
|
223
223
|
"kind"
|
|
224
224
|
]
|
|
225
|
-
});
|
|
225
|
+
}));
|
|
226
226
|
}
|
|
227
227
|
});
|
|
228
228
|
};
|
|
@@ -279,7 +279,7 @@ var a = (e) => e.trim().toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/
|
|
|
279
279
|
code: "invalid-schema"
|
|
280
280
|
}]
|
|
281
281
|
};
|
|
282
|
-
let n = [], r = new Set(["fields", "reports"]);
|
|
282
|
+
let n = [], r = /* @__PURE__ */ new Set(["fields", "reports"]);
|
|
283
283
|
for (let t of Object.keys(e)) r.has(t) || n.push({
|
|
284
284
|
path: [t],
|
|
285
285
|
message: `Unsupported schema property "${t}".`,
|
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
export declare const builtinFieldDefinitions: readonly [import('./shared').BuiltinFieldDefinition<import('
|
|
1
|
+
export declare const builtinFieldDefinitions: readonly [import('./shared').BuiltinFieldDefinition<import('mlform/schema').BaseFieldConfig & {
|
|
2
2
|
kind: "text";
|
|
3
3
|
placeholder?: string;
|
|
4
4
|
minLength?: number;
|
|
5
5
|
maxLength?: number;
|
|
6
6
|
pattern?: string;
|
|
7
|
-
}, string>, import('./shared').BuiltinFieldDefinition<import('
|
|
7
|
+
}, string>, import('./shared').BuiltinFieldDefinition<import('mlform/schema').BaseFieldConfig & {
|
|
8
8
|
kind: "number";
|
|
9
9
|
min?: number;
|
|
10
10
|
max?: number;
|
|
11
11
|
step?: number;
|
|
12
12
|
unit?: string;
|
|
13
13
|
placeholder?: string;
|
|
14
|
-
}, string | number | null>, import('./shared').BuiltinFieldDefinition<import('
|
|
14
|
+
}, string | number | null>, import('./shared').BuiltinFieldDefinition<import('mlform/schema').BaseFieldConfig & {
|
|
15
15
|
kind: "boolean";
|
|
16
16
|
trueLabel?: string;
|
|
17
17
|
falseLabel?: string;
|
|
18
|
-
}, boolean | null>, import('./shared').BuiltinFieldDefinition<import('
|
|
18
|
+
}, boolean | null>, import('./shared').BuiltinFieldDefinition<import('mlform/schema').BaseFieldConfig & {
|
|
19
19
|
kind: "category";
|
|
20
20
|
options: (string | {
|
|
21
21
|
label: string;
|
|
22
22
|
value: string;
|
|
23
23
|
})[];
|
|
24
|
-
}, string | null>, import('./shared').BuiltinFieldDefinition<import('
|
|
24
|
+
}, string | null>, import('./shared').BuiltinFieldDefinition<import('mlform/schema').BaseFieldConfig & {
|
|
25
25
|
kind: "mapped-category";
|
|
26
26
|
options: {
|
|
27
27
|
label: string;
|
|
28
28
|
value: string;
|
|
29
29
|
mapping: Record<string, unknown>;
|
|
30
30
|
}[];
|
|
31
|
-
}, string | null>, import('./shared').BuiltinFieldDefinition<import('.').OneHotCategoryFieldConfig, string | null>, import('./shared').BuiltinFieldDefinition<import('
|
|
31
|
+
}, string | null>, import('./shared').BuiltinFieldDefinition<import('.').OneHotCategoryFieldConfig, string | null>, import('./shared').BuiltinFieldDefinition<import('mlform/schema').BaseFieldConfig & {
|
|
32
32
|
kind: "date";
|
|
33
33
|
min?: string;
|
|
34
34
|
max?: string;
|
|
35
35
|
step?: number;
|
|
36
|
-
}, Date | null>, import('./shared').BuiltinFieldDefinition<import('.').SeriesFieldConfig, import('.').SeriesPoint[]>, import('./shared').BuiltinFieldDefinition<import('
|
|
36
|
+
}, Date | null>, import('./shared').BuiltinFieldDefinition<import('.').SeriesFieldConfig, import('.').SeriesPoint[]>, import('./shared').BuiltinFieldDefinition<import('mlform/schema').BaseFieldConfig & {
|
|
37
37
|
kind: "long-text";
|
|
38
38
|
placeholder?: string;
|
|
39
39
|
minLength?: number;
|
|
40
40
|
maxLength?: number;
|
|
41
41
|
rows?: number;
|
|
42
|
-
}, string>, import('./shared').BuiltinFieldDefinition<import('
|
|
42
|
+
}, string>, import('./shared').BuiltinFieldDefinition<import('mlform/schema').BaseFieldConfig & {
|
|
43
43
|
kind: "single-choice";
|
|
44
44
|
options: (string | {
|
|
45
45
|
label: string;
|
|
46
46
|
value: string;
|
|
47
47
|
})[];
|
|
48
48
|
layout?: "horizontal" | "vertical";
|
|
49
|
-
}, string | null>, import('./shared').BuiltinFieldDefinition<import('
|
|
49
|
+
}, string | null>, import('./shared').BuiltinFieldDefinition<import('mlform/schema').BaseFieldConfig & {
|
|
50
50
|
kind: "multi-choice";
|
|
51
51
|
options: (string | {
|
|
52
52
|
label: string;
|
|
53
53
|
value: string;
|
|
54
54
|
})[];
|
|
55
55
|
layout?: "horizontal" | "vertical";
|
|
56
|
-
}, string[]>, import('./shared').BuiltinFieldDefinition<import('
|
|
56
|
+
}, string[]>, import('./shared').BuiltinFieldDefinition<import('mlform/schema').BaseFieldConfig & {
|
|
57
57
|
kind: "rating";
|
|
58
58
|
min?: number;
|
|
59
59
|
max: number;
|
|
60
60
|
step?: number;
|
|
61
61
|
}, number | null>];
|
|
62
|
-
export declare const builtinReportDefinitions: readonly [import('./shared').BuiltinReportDefinition<import('
|
|
62
|
+
export declare const builtinReportDefinitions: readonly [import('./shared').BuiltinReportDefinition<import('mlform/schema').BaseReportConfig & {
|
|
63
63
|
kind: "classifier";
|
|
64
64
|
labels?: string[];
|
|
65
65
|
showClassProbabilities?: boolean;
|
|
66
|
-
}>, import('./shared').BuiltinReportDefinition<import('
|
|
66
|
+
}>, import('./shared').BuiltinReportDefinition<import('mlform/schema').BaseReportConfig & {
|
|
67
67
|
kind: "regressor";
|
|
68
68
|
unit?: string;
|
|
69
69
|
precision?: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseFieldConfig } from '
|
|
1
|
+
import { BaseFieldConfig } from 'mlform/schema';
|
|
2
2
|
import * as z from "zod";
|
|
3
3
|
export type SeriesPoint = {
|
|
4
4
|
field1: unknown;
|
|
@@ -30,9 +30,9 @@ export declare const seriesFieldSchema: z.ZodObject<{
|
|
|
30
30
|
disabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
31
31
|
hidden: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
32
32
|
readOnly: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
33
|
-
disabledWhen: z.ZodOptional<z.ZodUnion<readonly [z.ZodCustom<(context: unknown) => boolean, (context: unknown) => boolean>, z.ZodType<import('
|
|
34
|
-
hiddenWhen: z.ZodOptional<z.ZodUnion<readonly [z.ZodCustom<(context: unknown) => boolean, (context: unknown) => boolean>, z.ZodType<import('
|
|
35
|
-
readOnlyWhen: z.ZodOptional<z.ZodUnion<readonly [z.ZodCustom<(context: unknown) => boolean, (context: unknown) => boolean>, z.ZodType<import('
|
|
33
|
+
disabledWhen: z.ZodOptional<z.ZodUnion<readonly [z.ZodCustom<(context: unknown) => boolean, (context: unknown) => boolean>, z.ZodType<import('mlform/schema').DeclarativeFieldCondition, unknown, z.core.$ZodTypeInternals<import('mlform/schema').DeclarativeFieldCondition, unknown>>]>>;
|
|
34
|
+
hiddenWhen: z.ZodOptional<z.ZodUnion<readonly [z.ZodCustom<(context: unknown) => boolean, (context: unknown) => boolean>, z.ZodType<import('mlform/schema').DeclarativeFieldCondition, unknown, z.core.$ZodTypeInternals<import('mlform/schema').DeclarativeFieldCondition, unknown>>]>>;
|
|
35
|
+
readOnlyWhen: z.ZodOptional<z.ZodUnion<readonly [z.ZodCustom<(context: unknown) => boolean, (context: unknown) => boolean>, z.ZodType<import('mlform/schema').DeclarativeFieldCondition, unknown, z.core.$ZodTypeInternals<import('mlform/schema').DeclarativeFieldCondition, unknown>>]>>;
|
|
36
36
|
asyncValidationDebounceMs: z.ZodOptional<z.ZodNumber>;
|
|
37
37
|
inactiveFieldPolicy: z.ZodOptional<z.ZodEnum<{
|
|
38
38
|
include: "include";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { BaseFieldConfig, BaseReportConfig, DeclarativeFieldCondition, FieldConfig, FieldDefinition,
|
|
2
|
-
import { FieldDescriptor, ReportDescriptor } from '../../../primitives';
|
|
1
|
+
import { BaseFieldConfig, BaseReportConfig, DeclarativeFieldCondition, FieldConfig, FieldDefinition, ReportConfig, ReportDefinition } from 'mlform/schema';
|
|
3
2
|
import * as z from "zod";
|
|
4
3
|
export declare const uiSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
5
4
|
export declare const mappedToSchema: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>>]>>;
|
|
@@ -39,31 +38,7 @@ export declare const optionSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject
|
|
|
39
38
|
label: z.ZodString;
|
|
40
39
|
value: z.ZodString;
|
|
41
40
|
}, z.core.$strip>]>;
|
|
42
|
-
export declare const makeFieldDescriptor: (component: string, config: NormalizedFieldConfig, valueExtras: Record<string, unknown>) => {
|
|
43
|
-
component: string;
|
|
44
|
-
props: {
|
|
45
|
-
id: string;
|
|
46
|
-
kind: string;
|
|
47
|
-
label: string;
|
|
48
|
-
description: string;
|
|
49
|
-
showDescriptionInline: boolean;
|
|
50
|
-
required: boolean;
|
|
51
|
-
disabled: boolean;
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
41
|
export type BuiltinFieldConfig = BaseFieldConfig;
|
|
55
42
|
export type BuiltinReportConfig = BaseReportConfig;
|
|
56
|
-
export type BuiltinFieldDefinition<TConfig extends FieldConfig = FieldConfig, TValue = unknown> = FieldDefinition<TConfig, TValue
|
|
57
|
-
|
|
58
|
-
fieldId: string;
|
|
59
|
-
state: import('../../../schema').FieldStateSnapshot;
|
|
60
|
-
}) => FieldDescriptor;
|
|
61
|
-
};
|
|
62
|
-
export type BuiltinReportDefinition<TConfig extends ReportConfig = ReportConfig> = ReportDefinition<TConfig> & {
|
|
63
|
-
describe: (config: import('../../../schema').NormalizedReportConfig<TConfig>, context: {
|
|
64
|
-
reportId: string;
|
|
65
|
-
state: import('../../../schema').ReportStateSnapshot;
|
|
66
|
-
payload: unknown;
|
|
67
|
-
result: SubmitResult | null;
|
|
68
|
-
}) => ReportDescriptor | null;
|
|
69
|
-
};
|
|
43
|
+
export type BuiltinFieldDefinition<TConfig extends FieldConfig = FieldConfig, TValue = unknown> = FieldDefinition<TConfig, TValue>;
|
|
44
|
+
export type BuiltinReportDefinition<TConfig extends ReportConfig = ReportConfig> = ReportDefinition<TConfig>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export * from './constants';
|
|
2
|
-
export { booleanFieldDefinition, categoryFieldDefinition, classifierReportDefinition, dateFieldDefinition, longTextFieldDefinition, mappedCategoryFieldDefinition, multiChoiceFieldDefinition, numberFieldDefinition, oneHotCategoryFieldDefinition, ratingFieldDefinition, regressorReportDefinition, seriesFieldDefinition, singleChoiceFieldDefinition, textFieldDefinition, } from './definitions';
|
|
2
|
+
export { booleanFieldDefinition, categoryFieldDefinition, classifierReportDefinition, dateFieldDefinition, longTextFieldDefinition, mappedCategoryFieldDefinition, multiChoiceFieldDefinition, numberFieldDefinition, oneHotCategoryFieldDefinition, ratingFieldDefinition, regressorReportDefinition, seriesFieldDefinition, singleChoiceFieldDefinition, textFieldDefinition, builtinFieldDefinitions, builtinReportDefinitions, } from './definitions';
|
|
3
3
|
export type { BuiltinFieldConfig, BuiltinFieldDefinition, BuiltinReportConfig, BuiltinReportDefinition, SeriesFieldConfig, OneHotCategoryFieldConfig, OneHotCategoryOption, SeriesPoint, SeriesSubFieldConfig, } from './definitions';
|
|
4
4
|
export { createMappedCategoryBehavior } from './mapped-category-behavior';
|
|
5
|
-
export { createBuiltinMlRegistry
|
|
6
|
-
export type { MlRegistryPack } from './registry-pack';
|
|
5
|
+
export { createBuiltinMlRegistry } from './registry';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { RuntimeBehavior } from '
|
|
1
|
+
import { RuntimeBehavior } from 'mlform/runtime';
|
|
2
2
|
export declare const createMappedCategoryBehavior: () => RuntimeBehavior;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DesignSystemConfig, DesignSystemRegistry } from '
|
|
2
|
-
import { Registry } from '
|
|
3
|
-
import { PrimitiveRegistry } from '
|
|
1
|
+
import { DesignSystemConfig, DesignSystemRegistry } from 'mlform/design';
|
|
2
|
+
import { Registry } from 'mlform/schema';
|
|
3
|
+
import { PrimitiveRegistry } from 'mlform/primitives';
|
|
4
4
|
import { KitLabels } from './types';
|
|
5
5
|
export declare const defaultKitLabels: Required<KitLabels>;
|
|
6
6
|
export declare const defaultKitDesignSystem: DesignSystemConfig;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
export { defaultKitDesignSystem, defaultKitLabels } from './defaults';
|
|
2
|
+
export { createBuiltinDescriptorRegistry } from './builtin-presenters';
|
|
2
3
|
export { collectLayoutReferences, flattenLayoutNodes, walkLayoutNodes } from './layout-utils';
|
|
3
4
|
export { mountForm, unmountForm } from './mount-form';
|
|
4
5
|
export { createFormView } from './view';
|
|
5
6
|
export { defineFieldKind, defineReportKind } from './kinds';
|
|
7
|
+
export { defineMlformPlugin } from './plugin';
|
|
6
8
|
export { registerDefinedFieldKind, registerDefinedReportKind } from './kinds';
|
|
7
9
|
export type { DeclarativeFieldKind, DeclarativeReportKind, DefinedFieldKind, DefinedReportKind, ReportMountCleanup, ReportMountContext, ReportRenderSpec, ReportRenderSpecContext, } from './kinds';
|
|
10
|
+
export type { MlformFieldKind, MlformPlugin, MlformReportKind } from './plugin';
|
|
8
11
|
export type { CreateFormViewOptions, DisclosureState, FormLayoutConfig, FormLayoutFieldNode, FormLayoutGroupNode, FormLayoutNode, FormLayoutReportNode, FormLayoutSectionNode, FormViewController, FormViewFieldItem, FormViewReportItem, FormViewSnapshot, FormViewState, KitDesignSystemSnapshot, KitLabels, MountFormOptions, MountedForm, PanelState, ResolvedFormLayout, ResolvedFormLayoutFieldNode, ResolvedFormLayoutGroupNode, ResolvedFormLayoutNode, ResolvedFormLayoutReportNode, ResolvedFormLayoutSectionNode, ResolvedTabLayout, ResolvedTabsLayout, TabsLayoutConfig, TabsState, TabLayoutConfig, WizardLayoutConfig, WizardState, WizardStepConfig, } from './types';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { FieldConfig, FieldDefinition, FieldValidationFnContext, FieldValueAdapter, NormalizedFieldConfig } from '
|
|
2
|
-
import { FieldDescriptor, FieldDescriptorContext, FieldPresenter, FieldRenderSpec } from '
|
|
1
|
+
import { FieldConfig, FieldDefinition, FieldValidationFnContext, FieldValueAdapter, NormalizedFieldConfig } from 'mlform/schema';
|
|
2
|
+
import { FieldDescriptor, FieldDescriptorContext, FieldPresenter, FieldRenderSpec } from 'mlform/primitives';
|
|
3
3
|
import { ZodType } from 'zod';
|
|
4
|
+
import { MlformFieldKind } from '../plugin';
|
|
4
5
|
export interface DeclarativeFieldKind<TConfig extends FieldConfig = FieldConfig, TValue = unknown> {
|
|
5
6
|
kind: string;
|
|
6
7
|
schema: ZodType<TConfig>;
|
|
@@ -8,7 +9,7 @@ export interface DeclarativeFieldKind<TConfig extends FieldConfig = FieldConfig,
|
|
|
8
9
|
validate?: (context: FieldValidationFnContext<TConfig, TValue>) => string[] | PromiseLike<string[]>;
|
|
9
10
|
render: FieldRenderSpec<TConfig, TValue>;
|
|
10
11
|
}
|
|
11
|
-
export type DefinedFieldKind<TConfig extends FieldConfig, TValue> = {
|
|
12
|
+
export type DefinedFieldKind<TConfig extends FieldConfig, TValue> = MlformFieldKind & {
|
|
12
13
|
kind: string;
|
|
13
14
|
schema: import('zod').ZodType<TConfig>;
|
|
14
15
|
getDefaultValue?: (config: TConfig) => TValue;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { NormalizedReportConfig, ReportConfig, ReportDefinition, ReportFetchFactory, ReportResolveContext, ReportStateSnapshot, SubmitResult } from '
|
|
2
|
-
import { ReportDescriptor, ReportDescriptorContext, ReportPresenter, DescriptorContent, DescriptorSummary } from '
|
|
1
|
+
import { NormalizedReportConfig, ReportConfig, ReportDefinition, ReportFetchFactory, ReportResolveContext, ReportStateSnapshot, SubmitResult } from 'mlform/schema';
|
|
2
|
+
import { ReportDescriptor, ReportDescriptorContext, ReportPresenter, DescriptorContent, DescriptorSummary } from 'mlform/primitives';
|
|
3
3
|
import { ZodType } from 'zod';
|
|
4
|
+
import { MlformReportKind } from '../plugin';
|
|
4
5
|
export interface ReportRenderSpecContext<TConfig extends ReportConfig = ReportConfig, TPayload = unknown> {
|
|
5
6
|
config: NormalizedReportConfig<TConfig>;
|
|
6
7
|
report: NormalizedReportConfig<TConfig>;
|
|
@@ -29,7 +30,7 @@ export interface DeclarativeReportKind<TConfig extends ReportConfig = ReportConf
|
|
|
29
30
|
resolve?: (context: ReportResolveContext<TConfig>) => unknown;
|
|
30
31
|
render: ReportRenderSpec<TConfig, TPayload>;
|
|
31
32
|
}
|
|
32
|
-
export type DefinedReportKind<TConfig extends ReportConfig, _TPayload> = {
|
|
33
|
+
export type DefinedReportKind<TConfig extends ReportConfig, _TPayload> = MlformReportKind & {
|
|
33
34
|
kind: string;
|
|
34
35
|
schema: import('zod').ZodType<TConfig>;
|
|
35
36
|
payloadSchema?: ReportDefinition<TConfig>["payloadSchema"];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Registry } from 'mlform/schema';
|
|
2
|
+
import { PrimitiveDescriptorRegistry } from 'mlform/primitives';
|
|
3
|
+
import { DefinedFieldKind } from './define-field-kind';
|
|
4
|
+
import { DefinedReportKind } from './define-report-kind';
|
|
5
|
+
export declare const registerDefinedFieldKind: <TConfig extends import('mlform/schema').FieldConfig, TValue>(registry: Registry, descriptorRegistry: PrimitiveDescriptorRegistry, kind: DefinedFieldKind<TConfig, TValue>) => void;
|
|
6
|
+
export declare const registerDefinedReportKind: <TConfig extends import('mlform/schema').ReportConfig>(registry: Registry, descriptorRegistry: PrimitiveDescriptorRegistry, kind: DefinedReportKind<TConfig, unknown>) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { nothing, TemplateResult } from 'lit';
|
|
2
|
-
import { PrimitiveRegistry, PrimitiveText } from '
|
|
2
|
+
import { PrimitiveRegistry, PrimitiveText } from 'mlform/primitives';
|
|
3
3
|
import { FormViewController, FormViewSnapshot, ResolvedFormLayoutNode } from './types';
|
|
4
4
|
type RenderLayoutNodeOptions = {
|
|
5
5
|
node: ResolvedFormLayoutNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
-
import { PrimitiveRegistry, PrimitiveText } from '
|
|
2
|
+
import { PrimitiveRegistry, PrimitiveText } from 'mlform/primitives';
|
|
3
3
|
import { kitTagNames } from './constants';
|
|
4
4
|
import { FormViewController } from './types';
|
|
5
5
|
export declare class KitSinglePageElement extends LitElement {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FieldController, ReportController } from '
|
|
1
|
+
import { FieldController, ReportController } from 'mlform/runtime';
|
|
2
2
|
import { LayoutReferenceMaps } from './layout-helpers';
|
|
3
3
|
import { FormLayoutConfig, ResolvedFormLayout } from './types';
|
|
4
4
|
export interface ResolvedLayoutResult {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { AttachedDesignSystem, DesignSystemConfig, DesignSystemRegistry, ResolvedDesignSystem } from '
|
|
2
|
-
import { FormController, FormHooks, FormSchema, FormValidator, InactiveFieldPolicy, Registry, RuntimeBehavior, Transport } from '
|
|
3
|
-
import { PrimitiveContainerStrategy, PrimitiveRegistry, PrimitiveReportTransport, PrimitiveTextOverrides, PrimitiveDescriptorRegistry } from '
|
|
1
|
+
import { AttachedDesignSystem, DesignSystemConfig, DesignSystemRegistry, ResolvedDesignSystem } from 'mlform/design';
|
|
2
|
+
import { FormController, FormHooks, FormSchema, FormValidator, InactiveFieldPolicy, Registry, RuntimeBehavior, Transport } from 'mlform/runtime';
|
|
3
|
+
import { PrimitiveContainerStrategy, PrimitiveRegistry, PrimitiveReportTransport, PrimitiveTextOverrides, PrimitiveDescriptorRegistry } from 'mlform/primitives';
|
|
4
4
|
import { FormLayoutConfig } from './layout-types';
|
|
5
|
+
import { MlformPlugin } from './plugin';
|
|
5
6
|
export type MountedReportFetchMode = "lazy" | "all" | "none";
|
|
6
7
|
export interface KitDesignSystemSnapshot extends Omit<DesignSystemConfig, "mode" | "theme" | "recipe"> {
|
|
7
8
|
mode: NonNullable<DesignSystemConfig["mode"]>;
|
|
@@ -21,6 +22,7 @@ export interface MountFormOptions {
|
|
|
21
22
|
registry?: Registry;
|
|
22
23
|
descriptorRegistry?: PrimitiveDescriptorRegistry;
|
|
23
24
|
behaviors?: RuntimeBehavior[];
|
|
25
|
+
plugins?: readonly MlformPlugin[];
|
|
24
26
|
primitiveRegistry?: PrimitiveRegistry;
|
|
25
27
|
designSystemRegistry?: DesignSystemRegistry;
|
|
26
28
|
designSystem?: DesignSystemConfig;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PrimitiveDescriptorRegistry } from 'mlform/primitives';
|
|
2
|
+
import { RuntimeBehavior } from 'mlform/runtime';
|
|
3
|
+
import { Registry } from 'mlform/schema';
|
|
4
|
+
export interface MlformFieldKind {
|
|
5
|
+
readonly category: "field";
|
|
6
|
+
readonly kind: string;
|
|
7
|
+
register(registry: Registry, descriptorRegistry: PrimitiveDescriptorRegistry): void;
|
|
8
|
+
}
|
|
9
|
+
export interface MlformReportKind {
|
|
10
|
+
readonly category: "report";
|
|
11
|
+
readonly kind: string;
|
|
12
|
+
register(registry: Registry, descriptorRegistry: PrimitiveDescriptorRegistry): void;
|
|
13
|
+
}
|
|
14
|
+
export interface MlformPlugin {
|
|
15
|
+
readonly fields?: readonly MlformFieldKind[];
|
|
16
|
+
readonly reports?: readonly MlformReportKind[];
|
|
17
|
+
readonly behaviors?: readonly RuntimeBehavior[];
|
|
18
|
+
}
|
|
19
|
+
export declare const defineMlformPlugin: (plugin: MlformPlugin) => MlformPlugin;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PrimitiveDescriptorRegistry } from 'mlform/primitives';
|
|
2
|
+
import { RuntimeBehavior } from 'mlform/runtime';
|
|
3
|
+
import { Registry } from 'mlform/schema';
|
|
4
|
+
import { MlformPlugin } from './plugin';
|
|
5
|
+
export interface KitRegistryPack {
|
|
6
|
+
registry: Registry;
|
|
7
|
+
descriptorRegistry: PrimitiveDescriptorRegistry;
|
|
8
|
+
behaviors: RuntimeBehavior[];
|
|
9
|
+
}
|
|
10
|
+
export interface ResolveKitRegistryPackOptions {
|
|
11
|
+
registry?: Registry;
|
|
12
|
+
descriptorRegistry?: PrimitiveDescriptorRegistry;
|
|
13
|
+
behaviors?: RuntimeBehavior[];
|
|
14
|
+
plugins?: readonly MlformPlugin[];
|
|
15
|
+
}
|
|
16
|
+
export declare const resolveKitRegistryPack: (options: ResolveKitRegistryPackOptions) => KitRegistryPack;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
-
import { PrimitiveRegistry, PrimitiveText } from '
|
|
2
|
+
import { PrimitiveRegistry, PrimitiveText } from 'mlform/primitives';
|
|
3
3
|
import { kitTagNames } from './constants';
|
|
4
4
|
import { FormViewController } from './types';
|
|
5
5
|
export declare class KitTabsElement extends LitElement {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { FieldDescriptor, PrimitiveDescriptorRegistry, ReportDescriptor } from '
|
|
2
|
-
import { FieldController, FieldStateSnapshot, FormController, FormHooks, FormSchema, FormState, FormValidationResult, FormValidator, InactiveFieldPolicy, Registry, ReportController, ReportStateSnapshot, RuntimeBehavior, PipelineResult, SubmitOptions, SubmitResult, Transport } from '
|
|
1
|
+
import { FieldDescriptor, PrimitiveDescriptorRegistry, ReportDescriptor } from 'mlform/primitives';
|
|
2
|
+
import { FieldController, FieldStateSnapshot, FormController, FormHooks, FormSchema, FormState, FormValidationResult, FormValidator, InactiveFieldPolicy, Registry, ReportController, ReportStateSnapshot, RuntimeBehavior, PipelineResult, SubmitOptions, SubmitResult, Transport } from 'mlform/runtime';
|
|
3
3
|
import { LayoutReferences } from './layout-utils';
|
|
4
4
|
import { FormLayoutConfig, ResolvedFormLayout, ResolvedFormLayoutNode } from './layout-types';
|
|
5
5
|
import { PanelState } from './panel-nav';
|
|
6
6
|
import { MountedReportFetchMode } from './mount-types';
|
|
7
|
+
import { MlformPlugin } from './plugin';
|
|
7
8
|
export interface WizardState {
|
|
8
9
|
stepIndex: number;
|
|
9
10
|
stepCount: number;
|
|
@@ -68,6 +69,7 @@ export interface CreateFormViewOptions {
|
|
|
68
69
|
registry?: Registry;
|
|
69
70
|
descriptorRegistry?: PrimitiveDescriptorRegistry;
|
|
70
71
|
behaviors?: RuntimeBehavior[];
|
|
72
|
+
plugins?: readonly MlformPlugin[];
|
|
71
73
|
initialValues?: Record<string, unknown>;
|
|
72
74
|
validators?: FormValidator[];
|
|
73
75
|
hooks?: FormHooks;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FormController } from '
|
|
1
|
+
import { FormController } from 'mlform/runtime';
|
|
2
2
|
import { ResolvedLayoutResult } from './layout';
|
|
3
3
|
import { ResolvedFormLayoutNode } from './types';
|
|
4
4
|
export declare const validateCurrentWizardStep: (form: FormController, resolvedLayout: ResolvedLayoutResult, stepIndex: number) => Promise<boolean>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PrimitiveDescriptorRegistry } from '
|
|
2
|
-
import { FormController } from '
|
|
1
|
+
import { PrimitiveDescriptorRegistry } from 'mlform/primitives';
|
|
2
|
+
import { FormController } from 'mlform/runtime';
|
|
3
3
|
import { ResolvedLayoutResult } from './layout';
|
|
4
4
|
import { FormViewSnapshot } from './types';
|
|
5
5
|
type SnapshotCacheOptions = {
|