Interface TJSDialogData
buttons: {
[key: string]: TJSDialogButtonData;
};
content: string | TJSSvelteConfig;
default: string;
draggable: boolean;
focusAuto: boolean;
focusFirst: boolean;
focusKeep: boolean;
minimizable: boolean;
modal: boolean;
modalOptions: TJSDialogModalOptions;
notifyError: boolean;
onClose: string | ((data?: {
application?: TJSDialog;
}) => any);
rejectClose: boolean;
resizable: boolean;
resolveId: boolean;
title: string;
transition: TJSDialogTransitionOptions;
zIndex: number;
clone(): TJSDialogOptions;
get(accessor: string, defaultValue?: any): any;
merge(data: TJSDialogOptions): void;
replace(data: any): void;
set(accessor: string, value: any): boolean;
}
Accessors
buttons
- get buttons(): {
[key: string]: TJSDialogButtonData;
} Returns {
[key: string]: TJSDialogButtonData;
}The dialog button configuration.
[key: string]: TJSDialogButtonData
- set buttons(buttons): void
Set the dialog button configuration.
Parameters
- buttons: {
[key: string]: TJSDialogButtonData;
}New dialog button configuration.
[key: string]: TJSDialogButtonData
Returns void
- buttons: {
content
- get content(): string | TJSSvelteConfig
Returns string | TJSSvelteConfig
The Svelte configuration object or HTML string content.
- set content(content): void
Set the Svelte configuration object or HTML string content.
Parameters
- content: string | TJSSvelteConfig
New Svelte configuration object or HTML string content.
Returns void
- content: string | TJSSvelteConfig
default
- get default(): string
Returns string
The default button ID to focus initially.
- set default(newDefault): void
Set the default button ID to focus initially.
Parameters
- newDefault: string
New default button ID to focus initially.
Returns void
- newDefault: string
draggable
- get draggable(): boolean
Returns boolean
The dialog draggable state; draggable when true.
- set draggable(draggable): void
Set the dialog state; draggable when true.
Parameters
- draggable: boolean
New dialog draggable state; draggable when true.
Returns void
- draggable: boolean
focusAuto
- get focusAuto(): boolean
Returns boolean
When true auto-management of app focus is enabled.
- set focusAuto(focusAuto): void
Set the dialog auto-management of app focus.
Parameters
- focusAuto: boolean
New dialog auto-management of app focus.
Returns void
- focusAuto: boolean
focusFirst
- get focusFirst(): boolean
Returns boolean
When true the first focusable element that isn't a button is focused.
- set focusFirst(focusFirst): void
Set the dialog first focusable element state.
Parameters
- focusFirst: boolean
New dialog first focusable element state.
Returns void
- focusFirst: boolean
focusKeep
- get focusKeep(): boolean
Returns boolean
When
focusAuto
andfocusKeep
is true; keeps internal focus.- set focusKeep(focusKeep): void
Set the dialog
focusKeep
state. WhenfocusAuto
andfocusKeep
is true; keeps internal focus.Parameters
- focusKeep: boolean
New dialog
focusKeep
state.
Returns void
- focusKeep: boolean
minimizable
- get minimizable(): boolean
Returns boolean
When true the dialog is minimizable.
- set minimizable(minimizable): void
Set the dialog
minimizable
state. When true the dialog is minimizable.Parameters
- minimizable: boolean
New dialog
minimizable
state.
Returns void
- minimizable: boolean
modal
- get modal(): boolean
Returns boolean
When true a modal dialog is displayed.
- set modal(modal): void
Set the dialog
modal
state. When true a modal dialog is displayed.Parameters
- modal: boolean
New dialog
modal
state.
Returns void
- modal: boolean
modalOptions
- get modalOptions(): TJSDialogModalOptions
Returns TJSDialogModalOptions
Additional options for modal dialog display.
- set modalOptions(modalOptions): void
Set additional options for modal dialog display.
Parameters
- modalOptions: TJSDialogModalOptions
New additional options for modal dialog display.
Returns void
- modalOptions: TJSDialogModalOptions
notifyError
- get notifyError(): boolean
Returns boolean
When true and an error is raised in dialog callback functions post a UI error notification.
- set notifyError(notifyError): void
Set the dialog
notifyError
state. When true and an error is raised in dialog callback functions post a UI error notification.Parameters
- notifyError: boolean
New dialog
notifyError
state.
Returns void
- notifyError: boolean
onClose
- 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 content Svelte component is invoked.
- set onClose(onClose): void
Set callback invoked when dialog is closed; no button option selected. When defined as a string any matching function by name exported from content Svelte component is invoked..
Parameters
- onClose: string | ((data?: {
application?: TJSDialog;
}) => any)New dialog
onClose
state.
Returns void
- onClose: string | ((data?: {
rejectClose
- 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 anyonClose
function is invoked and any result that is undefined will cause the Promise to then be rejected..- set rejectClose(rejectClose): void
Set the dialog
rejectClose
state.Parameters
- rejectClose: boolean
New dialog
rejectClose
state.
Returns void
- rejectClose: boolean
resizable
- get resizable(): boolean
Returns boolean
When true the dialog is resizable.
- set resizable(resizable): void
Set the dialog
resizable
state. When true the dialog is resizable.Parameters
- resizable: boolean
New dialog
resizable
state.
Returns void
- resizable: boolean
resolveId
- 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): 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
- resolveId: boolean
title
- get title(): string
Returns string
The dialog window title.
- set title(title): void
Set the dialog window title.
Parameters
- title: string
New dialog window title.
Returns void
- title: string
transition
- get transition(): TJSDialogTransitionOptions
Returns TJSDialogTransitionOptions
Transition options for the dialog.
- set transition(transition): void
Set transition options for the dialog.
Parameters
- transition: TJSDialogTransitionOptions
New transition options for the dialog.
Returns void
- transition: TJSDialogTransitionOptions
zIndex
- get zIndex(): number
Returns number
A specific z-index for the dialog. Pass null for the dialog to act like other applications in regard bringing to top when activated.
- set zIndex(zIndex): void
Set specific z-index for the dialog.
Parameters
- zIndex: number
New z-index for the dialog.
Returns void
- zIndex: number
Methods
clone
- clone(): TJSDialogOptions
Provides a cloned copy of the dialog data. Note: The content attribute is not cloned as complex / props may be present.
Returns TJSDialogOptions
A clone of the dialog data.
get
- get(accessor, defaultValue?): any
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 format the accessor string with
.
between entries to walk.Parameters
- accessor: string
The path / key to set. You can set multiple levels.
Optional
defaultValue: anyA default value returned if the accessor is not found.
Returns any
Value at the accessor.
- accessor: string
merge
- merge(data): void
Parameters
- data: TJSDialogOptions
Merge provided data object into Dialog data.
Returns void
- data: TJSDialogOptions
replace
set
- set(accessor, value): boolean
Provides a way to safely set this dialogs data given an accessor string which describes the entries to walk. To access deeper entries into the object 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.
- accessor: string
Provides storage for all dialog options through individual accessors and
get
,merge
,replace
andset
methods that safely access and update data changed to the mounted DialogShell component reactively.