Wagtail client-side components
    Preparing search index...

    Adds the ability to unpack a Telepath object and render it on the controlled element. Used to initialize the top-level element of a BlockWidget (the form widget for a StreamField).

    <div
    id="some-id"
    data-controller="w-block"
    data-w-block-data-value='{"_args":["..."], "_type": "wagtail.blocks.StreamBlock"}'
    >
    </div>
    <div
    id="some-id"
    data-controller="w-block"
    data-w-block-data-value='{"_args":["..."], "_type": "wagtail.blocks.StreamBlock"}'
    data-w-block-arguments-value='[[{ type: "paragraph_block", value: "..."}], {messages:["An error..."]}]'
    >
    </div>

    Hierarchy

    Index

    Constructors

    • Parameters

      • context: Context

      Returns BlockController

    Properties

    argumentsValue: string[]

    Array of arguments to pass to the render method of the block [initial value, errors].

    context: Context
    dataValue: object

    Block definition to be passed to telepath.unpack, used to obtain a JavaScript representation of the block.

    blessings: (<T>(constructor: Constructor<T>) => any)[]
    outlets: string[]
    targets: string[]
    values: {
        arguments: { default: never[]; type: ArrayConstructor };
        data: { default: {}; type: ObjectConstructor };
    } = ...

    Accessors

    • get application(): Application

      Returns Application

    • get classes(): ClassMap

      Returns ClassMap

    • get data(): DataMap

      Returns DataMap

    • get element(): ElementType

      Returns ElementType

    • get identifier(): string

      Returns string

    • get outlets(): OutletSet

      Returns OutletSet

    • get scope(): Scope

      Returns Scope

    • get targets(): TargetSet

      Returns TargetSet

    • get shouldLoad(): boolean

      Returns boolean

    Methods

    • Returns void

    • Parameters

      • eventName: string
      • Optional__namedParameters: Partial<
            {
                bubbles: boolean;
                cancelable: boolean;
                detail: Object;
                prefix: string;
                target: Element
                | Window
                | Document;
            },
        >

      Returns CustomEvent<Object>

    • Returns void

    • Parameters

      • _identifier: string
      • _application: Application

      Returns void