Provides storage for all dialog options through individual accessors and get, merge, replace and set methods that safely access and update data changed to the mounted DialogShell component reactively.

interface Data {
    get alwaysOnTop(): boolean;
    set alwaysOnTop(alwaysOnTop: boolean): void;
    get buttons(): { [key: string]: TJSDialog.ButtonData };
    set buttons(buttons: { [key: string]: TJSDialog.ButtonData }): void;
    get content(): | string
    | Embed<SvelteComponent<any, any, any>, { PropsOmit: never }>;
    set content(
        content:
            | string
            | Embed<SvelteComponent<any, any, any>, { PropsOmit: never }>,
    ): void;
    get default(): string;
    set default(newDefault: string): void;
    get draggable(): boolean;
    set draggable(draggable: boolean): void;
    get focusAuto(): boolean;
    set focusAuto(focusAuto: boolean): void;
    get focusFirst(): boolean;
    set focusFirst(focusFirst: boolean): void;
    get focusKeep(): boolean;
    set focusKeep(focusKeep: boolean): void;
    get minimizable(): boolean;
    set minimizable(minimizable: boolean): void;
    get modal(): boolean;
    set modal(modal: boolean): void;
    get modalOptions(): OptionsModal;
    set modalOptions(modalOptions: OptionsModal): void;
    get notifyError(): boolean;
    set notifyError(notifyError: boolean): void;
    get onClose(): string | ((data?: { application?: TJSDialog }) => any);
    set onClose(
        onClose: string | ((data?: { application?: TJSDialog }) => any),
    ): void;
    get rejectClose(): boolean;
    set rejectClose(rejectClose: boolean): void;
    get resizable(): boolean;
    set resizable(resizable: boolean): void;
    get resolveId(): boolean;
    set resolveId(resolveId: boolean): void;
    get title(): string;
    set title(title: string): void;
    get transition(): OptionsTransition;
    set transition(transition: OptionsTransition): void;
    get zIndex(): number;
    set zIndex(zIndex: number): void;
    clone(): OptionsData;
    get(accessor: string, defaultValue?: any): any;
    merge(data: OptionsData): void;
    replace(data: OptionsData): void;
    set(accessor: string, value: any): boolean;
}
Index

Accessors

  • get alwaysOnTop(): boolean

    Returns boolean

    The dialog always on top state.

  • set alwaysOnTop(alwaysOnTop: boolean): void

    Set the dialog always on top state.

    Parameters

    • alwaysOnTop: boolean

      New dialog always on top state.

    Returns void

  • get content(): | string
    | Embed<SvelteComponent<any, any, any>, { PropsOmit: never }>

    Returns string | Embed<SvelteComponent<any, any, any>, { PropsOmit: never }>

    The Svelte configuration object or HTML string content.

  • set content(
        content:
            | string
            | Embed<SvelteComponent<any, any, any>, { PropsOmit: never }>,
    ): void

    Set the Svelte configuration object or HTML string content.

    Parameters

    • content: string | Embed<SvelteComponent<any, any, any>, { PropsOmit: never }>

      New Svelte configuration object or HTML string content.

    Returns void

  • get default(): string

    Returns string

    The default button ID to focus initially.

  • set default(newDefault: string): void

    Set the default button ID to focus initially.

    Parameters

    • newDefault: string

      New default button ID to focus initially.

    Returns void

  • get draggable(): boolean

    Returns boolean

    The dialog draggable state; draggable when true.

  • set draggable(draggable: boolean): void

    Set the dialog state; draggable when true.

    Parameters

    • draggable: boolean

      New dialog draggable state; draggable when true.

    Returns void

  • get focusAuto(): boolean

    Returns boolean

    When true auto-management of app focus is enabled.

  • set focusAuto(focusAuto: boolean): void

    Set the dialog auto-management of app focus.

    Parameters

    • focusAuto: boolean

      New dialog auto-management of app focus.

    Returns void

  • get focusFirst(): boolean

    Returns boolean

    When true the first focusable element that isn't a button is focused.

  • set focusFirst(focusFirst: boolean): void

    Set the dialog first focusable element state.

    Parameters

    • focusFirst: boolean

      New dialog first focusable element state.

    Returns void

  • get focusKeep(): boolean

    Returns boolean

    When focusAuto and focusKeep is true; keeps internal focus.

  • set focusKeep(focusKeep: boolean): void

    Set the dialog focusKeep state. When focusAuto and focusKeep are true, then keep internal focus.

    Parameters

    • focusKeep: boolean

      New dialog focusKeep state.

    Returns void

  • get minimizable(): boolean

    Returns boolean

    When true the dialog is minimizable.

  • set minimizable(minimizable: boolean): void

    Set the dialog minimizable state. When true, the dialog is minimizable.

    Parameters

    • minimizable: boolean

      New dialog minimizable state.

    Returns void

  • get modal(): boolean

    Returns boolean

    When true a modal dialog is displayed.

  • set modal(modal: boolean): void

    Set the dialog modal state. When true, a modal dialog is displayed.

    Parameters

    • modal: boolean

      New dialog modal state.

    Returns void

  • get modalOptions(): OptionsModal

    Returns OptionsModal

    Additional options for modal dialog display.

  • set modalOptions(modalOptions: OptionsModal): void

    Set additional options for modal dialog display.

    Parameters

    • modalOptions: OptionsModal

      New additional options for modal dialog display.

    Returns void

  • get notifyError(): boolean

    Returns boolean

    When true and an error is raised in dialog callback functions post a UI error notification.

  • set notifyError(notifyError: boolean): void

    Set the dialog notifyError state. When true and an error is raised in the dialog, callback functions post a UI error notification.

    Parameters

    • notifyError: boolean

      New dialog notifyError state.

    Returns void

  • get onClose(): string | ((data?: { application?: TJSDialog }) => any)

    Returns string | ((data?: { application?: TJSDialog }) => any)

    Callback invoked when dialog is closed; no button option selected. When defined as a string, any matching function by name exported from the content Svelte component is invoked.

  • set onClose(
        onClose: string | ((data?: { application?: TJSDialog }) => any),
    ): void

    Set callback invoked when the dialog is closed; no button option selected. When defined as a string, any matching function by name exported from the content Svelte component is invoked.

    Parameters

    • onClose: string | ((data?: { application?: TJSDialog }) => any)

      New dialog onClose state.

    Returns void

  • get rejectClose(): boolean

    Returns boolean

    Dialog rejectClose state. When true and a Promise has been created by TJSDialog.wait and the Promise is not in the process of being resolved or rejected on close of the dialog any onClose function is invoked and any result that is undefined will cause the Promise to then be rejected.

  • set rejectClose(rejectClose: boolean): void

    Set the dialog rejectClose state.

    Parameters

    • rejectClose: boolean

      New dialog rejectClose state.

    Returns void

  • get resizable(): boolean

    Returns boolean

    When true the dialog is resizable.

  • set resizable(resizable: boolean): void

    Set the dialog resizable state. When true, the dialog is resizable.

    Parameters

    • resizable: boolean

      New dialog resizable state.

    Returns void

  • get resolveId(): boolean

    Returns boolean

    When true and resolving any Promises and there are undefined results from any button callbacks the button ID is resolved.

  • set resolveId(resolveId: boolean): void

    Set the dialog resolveId state. When true and resolving any Promises and there are undefined results from any button callbacks, the button ID is resolved.

    Parameters

    • resolveId: boolean

      New dialog resolveId state.

    Returns void

  • get title(): string

    Returns string

    The dialog window title.

  • set title(title: string): void

    Set the dialog window title.

    Parameters

    • title: string

      New dialog window title.

    Returns void

  • get zIndex(): number

    Returns number

    A specific z-index for the dialog.

  • set zIndex(zIndex: number): void

    Set specific z-index for the dialog.

    Parameters

    • zIndex: number

      New z-index for the dialog.

    Returns void

Methods

  • Provides a cloned copy of the dialog data. Note: The content attribute is not cloned as complex / props may be present.

    Returns OptionsData

    A clone of the dialog data.

  • Provides a way to safely get this dialogs data given an accessor string which describes the entries to walk. To access deeper entries into the object, then format the accessor string with . between entries to walk.

    Parameters

    • accessor: string

      The path / key to set. You can set multiple levels.

    • OptionaldefaultValue: any

      A default value returned if the accessor is not found.

    Returns any

    Value at the accessor.

  • Parameters

    • data: OptionsData

      Merge provided data object into Dialog data.

    Returns void

  • Replaces all dialog data; this is reactive.

    Parameters

    Returns void

  • Provides a way to safely set this dialog data given an accessor string which describes the entries to walk. To access deeper entries into the object, then format the accessor string with . between entries to walk.

    Automatically, the dialog data will be updated in the associated DialogShell Svelte component.

    Parameters

    • accessor: string

      The path / key to set. You can set multiple levels.

    • value: any

      Value to set.

    Returns boolean

    True if successful.