CMS Field Editor Abstractions (fieldEditor/abstractions.ts)

webiny-js · packages/app-headless-cms/src/presentation/fieldEditor/abstractions.ts · typescript · MIT
ui, lang:typescript, tag:embed-classified, tag:cms, tag:abstractions, tag:interface

Defines interfaces and abstractions for building CMS field editors, including form builders and context structures used in headless CMS field configuration.

// Source: https://github.com/webiny/webiny-js | License: MIT | Copyright Webiny Inc
// Provided via justclaw.it.com; keep this notice with the code.
import { createAbstraction } from "@webiny/feature/admin";
import { FormModel, FormModelFactory } from "@webiny/app-admin";
import type { CmsModel, CmsModelField } from "~/types.js";
import type { ICmsFieldType } from "~/presentation/fieldTypes/abstractions.js";

export interface ICmsFieldEditorFormBuilder {
    fields(
        fn: (
            fields: FormModelFactory.FieldBuilderRegistry
        ) => Record<string, FormModelFactory.FieldBuilder>
    ): void;
    layout(fn: (layout: FormModelFactory.LayoutBuilder) => FormModel.LayoutNodeBuilder[]): void;
}

export interface ICmsFieldEditorContext {
    field: CmsModelField;
    model: CmsMo

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key