UIModalController

class UIModalController

extends UIRenderableController

Renderable wrapper for a single component that can be used to display another component as a modal view. The modal component is created immediately after the ShowModal event is emitted, and removed when the CloseModal event is emitted.

Example (preset)

UIModalController.with(
  { placement: UIRenderPlacement.DROPDOWN },
  UIIconButton.with({
    onClick: "+ShowModal",
    icon: "expandDown"
  }),
  UIMenu.with({
    onSelectMenuItem: "selectMenuItem()",
    onBuild() {
      this.builder.clear();
      this.builder.addOption("one", "First option");
      this.builder.addOption("second", "Second option");
      this.builder.addSeparator();
      this.builder.addOption("settings", "Settings...");
      this.builder.setRevealTransition("down-fast");
    }
  })
)

Constructor

(content?: UIRenderable): UIModalController

.modal

UIRenderable

The current modal component to be displayed, as a managed child reference, or undefined if the modal component is currently not displayed.

.placement

UIRenderPlacement

Modal view placement, defaults to Dialog.

.modalShadeOpacity

number

Modal backdrop opacity (0-1).

.modalShadeClickToClose

boolean

True if clicking outside the modal component should close it, defaults to true.

.renderContext

UIRenderContext

Inherited from UIRenderableController.renderContext.

.content

UIRenderable

Inherited from UIRenderableController.content.

.render()

(callback?: RenderCallback<Output<UIRenderable, any>>): void

Inherited from UIRenderableController.render.

.isPresetComponent() protected

(): boolean

Inherited from Component.isPresetComponent.

.getParentComponent()

[1]. (): Component
[2]. <TParent extends Component>(ParentClass: ComponentConstructor<TParent>): TParent

Inherited from Component.getParentComponent.

.getCompositeParent()

<TParent extends Component>(ParentClass?: ComponentConstructor<TParent>): TParent

Inherited from Component.getCompositeParent.

.propagateComponentEvent()

(name: string, inner?: ManagedEvent): void

Inherited from Component.propagateComponentEvent.

.managedId

number

Inherited from ManagedObject.managedId.

.managedState

ManagedState

Inherited from ManagedObject.managedState.

.getReferenceCount() protected

(): number

Inherited from ManagedObject.getReferenceCount.

.getManagedReferrers() protected

(): ManagedObject[]

Inherited from ManagedObject.getManagedReferrers.

.getManagedParent() protected

[1]. (): ManagedObject
[2]. <TParent extends ManagedObject>(ParentClass: ManagedObjectConstructor<TParent>): TParent

Inherited from ManagedObject.getManagedParent.

.emit()

<TEvent extends ManagedEvent = ManagedEvent, TConstructorArgs extends any[] = any[]>(e: string | TEvent | (new (...args: TConstructorArgs) => TEvent), ...constructorArgs: TConstructorArgs): this

Inherited from ManagedObject.emit.

.propagateChildEvents() protected

[1]. (f?: (this: this, e: ManagedEvent, propertyName: string) => void | ManagedEvent | ManagedEvent[]): this
[2]. (...types: (ManagedEvent | (new (...args: any[]) => ManagedEvent))[]): this

Inherited from ManagedObject.propagateChildEvents.

.activateManagedAsync() protected

(): Promise<any>

Inherited from ManagedObject.activateManagedAsync.

.deactivateManagedAsync() protected

(): Promise<void>

Inherited from ManagedObject.deactivateManagedAsync.

.destroyManagedAsync() protected

(): Promise<void>

Inherited from ManagedObject.destroyManagedAsync.

.onManagedStateActivatingAsync() protected

(): Promise<void>

Inherited from ManagedObject.onManagedStateActivatingAsync.

.onManagedStateActiveAsync() protected

(): Promise<void>

Inherited from ManagedObject.onManagedStateActiveAsync.

.onManagedStateDeactivatingAsync() protected

(): Promise<void>

Inherited from ManagedObject.onManagedStateDeactivatingAsync.

.onManagedStateInactiveAsync() protected

(): Promise<void>

Inherited from ManagedObject.onManagedStateInactiveAsync.

.onManagedStateDestroyingAsync() protected

(): Promise<void>

Inherited from ManagedObject.onManagedStateDestroyingAsync.


UIModalController.Presets

UIModalController presets type, for use with Component.with.

.modal

UIRenderableConstructor

Modal component constructor (can also be passed as an additional argument to Component.with).

.placement

UIRenderPlacement

Modal view placement, defaults to Dialog.

.modalShadeOpacity

number

Modal backdrop opacity (0-1), defaults to 0.

.modalShadeClickToClose

boolean

True if clicking outside the modal component should close it, defaults to true.

.onShowModal

ComponentEventHandler<UIModalController, ComponentEvent>

Event handler that is invoked when the modal component is made visible.

.onCloseModal

ComponentEventHandler<UIModalController, ComponentEvent>

Event handler that is invoked when the modal component is removed.