@umbraco-cms/backoffice
    Preparing search index...

    Interface UmbModalContext<ModalData, ModalValue>

    This mixin enables a web-component to host controllers. This enables controllers to be added to the life cycle of this element.

    interface UmbModalContext<
        ModalData extends { [key: string]: any } = { [key: string]: any },
        ModalValue = any,
    > {
        _host: UmbControllerHost;
        alias: string | UmbModalToken<ModalData, ModalValue>;
        backdropBackground?: string;
        data: ModalData;
        element?: ElementLoaderProperty<UUIModalElement>;
        key: string;
        router: IRouterSlot<any, any> | null;
        size: Observable<string>;
        type: UmbModalType;
        value: Observable<ModalValue>;
        view: UmbViewController;
        get controllerAlias(): UmbControllerAlias;
        _internal_removeCurrentModal(): Promise<void>;
        _internal_setCurrentModalPath(path: string): void;
        addEventListener(
            type: string,
            callback: EventListenerOrEventListenerObject | null,
            options?: boolean | AddEventListenerOptions,
        ): void;
        addUmbController(controller: UmbController): void;
        consumeContext<
            BaseType extends UmbContextMinimal = UmbContextMinimal,
            ResultType extends UmbContextMinimal = BaseType,
        >(
            alias: string | UmbContextToken<BaseType, ResultType>,
            callback: UmbContextCallback<ResultType>,
        ): UmbContextConsumerController<BaseType, ResultType>;
        destroy(): void;
        dispatchEvent(event: Event): boolean;
        forceResolve(): void;
        getContext<
            BaseType extends UmbContextMinimal = UmbContextMinimal,
            ResultType extends UmbContextMinimal = BaseType,
        >(
            alias: string | UmbContextToken<BaseType, ResultType>,
            options?: UmbClassGetContextOptions,
        ): Promise<ResultType | undefined>;
        getHostElement(): Element;
        getUmbControllers(
            filterMethod: (ctrl: UmbController) => boolean,
        ): UmbController[];
        getValue(): ModalValue;
        hasUmbController(controller: UmbController): boolean;
        hostConnected(): void;
        hostDisconnected(): void;
        isResolved(): boolean;
        observe<
            ObservableType extends Observable<T>
            | undefined,
            T,
            SpecificT = UmbObserverValueType<ObservableType>,
            SpecificR = ObservableType extends undefined
                ? UmbObserverController<SpecificT>
                | undefined
                : UmbObserverController<SpecificT>,
        >(
            source: ObservableType,
            callback?: ObserverCallback<UmbObserverValueType<ObservableType>>,
            controllerAlias?: UmbControllerAlias | null,
        ): SpecificR;
        onSubmit(): Promise<ModalValue>;
        provideContext<R extends UmbContextMinimal = UmbContextMinimal>(
            alias: string | UmbContextToken<R, R>,
            instance: R,
        ): UmbContextProviderController<R>;
        reject(reason?: UmbModalRejectReason): void;
        removeEventListener(
            type: string,
            callback: EventListenerOrEventListenerObject | null,
            options?: boolean | EventListenerOptions,
        ): void;
        removeUmbController(controller: UmbController): void;
        removeUmbControllerByAlias(unique: UmbControllerAlias): void;
        setModalSize(size: UUIModalSidebarSize): void;
        setValue(value: ModalValue): void;
        submit(): void;
        updateValue(partialValue: Partial<ModalValue>): void;
    }

    Type Parameters

    • ModalData extends { [key: string]: any } = { [key: string]: any }
    • ModalValue = any

    Hierarchy (View Summary)

    Index

    Properties

    backdropBackground?: string
    data: ModalData
    element?: ElementLoaderProperty<UUIModalElement>
    key: string
    router: IRouterSlot<any, any> | null = null
    size: Observable<string> = ...
    type: UmbModalType = 'dialog'

    Accessors

    Methods

    • The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.

      MDN Reference

      Parameters

      • type: string
      • callback: EventListenerOrEventListenerObject | null
      • Optionaloptions: boolean | AddEventListenerOptions

      Returns void

    • The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually with dispatchEvent().

      MDN Reference

      Parameters

      • event: Event

      Returns boolean

    • The removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target. The event listener to be removed is identified using a combination of the event type, the event listener function itself, and various optional options that may affect the matching process; see Matching event listeners for removal.

      MDN Reference

      Parameters

      • type: string
      • callback: EventListenerOrEventListenerObject | null
      • Optionaloptions: boolean | EventListenerOptions

      Returns void