Wagtail client-side components
    Preparing search index...

    Controls the upgrade notification component to request the latest version of Wagtail and presents a message to the user if the current version is out of date.

    Expected JSON payload:

    {
    "version": "2.15.2",
    "url": "https://docs.wagtail.io/en/stable/releases/2.15.2.html",
    "minorUrl": "https://docs.wagtail.io/en/stable/releases/2.15.html",
    "lts": {
    "version": "2.12.8",
    "url": "https://docs.wagtail.io/en/stable/releases/2.12.8.html",
    "minorUrl": "https://docs.wagtail.io/en/stable/releases/2.12.html"
    }
    }
    <div
    data-controller="w-upgrade"
    data-w-upgrade-current-version-value="6.3.1"
    data-w-upgrade-url-value="https://path.to/latest.txt"
    >
    <p>A new version of Wagtail is available!</p>
    </div>

    Hierarchy

    Index

    Constructors

    • Parameters

      • context: Context

      Returns UpgradeController

    Properties

    context: Context
    currentVersionValue: string
    dismissTarget: HTMLElement
    hasDismissTarget: boolean
    hasLatestVersionTarget: boolean
    hasLinkTarget: boolean
    latestVersionTarget: HTMLElement
    linkTarget: HTMLElement
    ltsOnlyValue: any
    urlValue: string
    blessings: (<T>(constructor: Constructor<T>) => any)[]
    outlets: string[]
    targets: string[] = ...
    values: {
        currentVersion: StringConstructor;
        ltsOnly: { default: boolean; type: BooleanConstructor };
        url: { default: string; type: StringConstructor };
    } = ...

    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