Skip to content

Latest commit

 

History

History
1549 lines (776 loc) · 28.8 KB

PropertyDialog.md

File metadata and controls

1549 lines (776 loc) · 28.8 KB

@serenity-is/corelib / PropertyDialog

Class: PropertyDialog<TItem, P>

Extends

Type Parameters

TItem

P

Constructors

new PropertyDialog()

new PropertyDialog<TItem, P>(props?): PropertyDialog<TItem, P>

Parameters

props?

WidgetProps<P>

Returns

PropertyDialog<TItem, P>

Overrides

BaseDialog.constructor

Defined in

src/ui/dialogs/propertydialog.tsx:19

Properties

dialog

protected dialog: Dialog

Inherited from

BaseDialog.dialog

Defined in

src/ui/dialogs/basedialog.tsx:20


domNode

readonly domNode: HTMLElement

Inherited from

BaseDialog.domNode

Defined in

src/ui/widgets/widget.ts:17


idPrefix

readonly idPrefix: string

Inherited from

BaseDialog.idPrefix

Defined in

src/ui/widgets/widget.ts:16


options

protected readonly options: WidgetProps<P>

Inherited from

BaseDialog.options

Defined in

src/ui/widgets/widget.ts:14


propertyGrid

protected propertyGrid: PropertyGrid<PropertyGridOptions>

Defined in

src/ui/dialogs/propertydialog.tsx:193


propertyItemsData

protected propertyItemsData: PropertyItemsData

Defined in

src/ui/dialogs/propertydialog.tsx:15


tabs

protected tabs: Fluent<HTMLElement>

Inherited from

BaseDialog.tabs

Defined in

src/ui/dialogs/basedialog.tsx:17


toolbar

protected toolbar: Toolbar<ToolbarOptions>

Inherited from

BaseDialog.toolbar

Defined in

src/ui/dialogs/basedialog.tsx:18


uniqueName

readonly uniqueName: string

Inherited from

BaseDialog.uniqueName

Defined in

src/ui/widgets/widget.ts:15


validator

protected validator: any

Inherited from

BaseDialog.validator

Defined in

src/ui/dialogs/basedialog.tsx:19


isComponent

readonly static isComponent: true = true

Inherited from

BaseDialog.isComponent

Defined in

src/ui/widgets/widget.ts:223


typeInfo

static typeInfo: ClassTypeInfo<"Serenity.Widget">

Inherited from

BaseDialog.typeInfo

Defined in

src/ui/widgets/widget.ts:11

Accessors

dialogTitle

Get Signature

get dialogTitle(): string

Returns

string

Set Signature

set dialogTitle(value): void

Parameters
value

string

Returns

void

Inherited from

BaseDialog.dialogTitle

Defined in

src/ui/dialogs/basedialog.tsx:210


element

Get Signature

get element(): Fluent<HTMLElement>

Returns a Fluent(this.domNode) object

Returns

Fluent<HTMLElement>

Inherited from

BaseDialog.element

Defined in

src/ui/widgets/widget.ts:63


entity

Get Signature

get entity(): TItem

Returns

TItem

Set Signature

set entity(value): void

Parameters
value

TItem

Returns

void

Defined in

src/ui/dialogs/propertydialog.tsx:170


entityId

Get Signature

get entityId(): any

Returns

any

Set Signature

set entityId(value): void

Parameters
value

any

Returns

void

Defined in

src/ui/dialogs/propertydialog.tsx:178


props

Get Signature

get props(): WidgetProps<P>

Returns

WidgetProps<P>

Inherited from

BaseDialog.props

Defined in

src/ui/widgets/widget.ts:207

Methods

addCssClass()

protected addCssClass(): void

Returns

void

Inherited from

BaseDialog.addCssClass

Defined in

src/ui/dialogs/basedialog.tsx:57


addValidationRule()

Call Signature

addValidationRule(rule, uniqueName?): void

Parameters
rule

(input) => string

uniqueName?

string

Returns

void

Inherited from

BaseDialog.addValidationRule

Defined in

src/ui/widgets/widget.ts:99

Call Signature

addValidationRule(uniqueName, rule): void

Parameters
uniqueName

string

rule

(input) => string

Returns

void

Inherited from

BaseDialog.addValidationRule

Defined in

src/ui/widgets/widget.ts:100


afterInit()

protected afterInit(): void

Returns

void

Defined in

src/ui/dialogs/propertydialog.tsx:33


afterRender()

protected afterRender(callback): void

Parameters

callback

() => void

Returns

void

Inherited from

BaseDialog.afterRender

Defined in

src/ui/widgets/widget.ts:146


arrange()

arrange(): void

Returns

void

Inherited from

BaseDialog.arrange

Defined in

src/ui/dialogs/basedialog.tsx:183


byId()

protected byId<TElement>(id): Fluent<TElement>

Type Parameters

TElement extends HTMLElement = HTMLElement

Parameters

id

string

Returns

Fluent<TElement>

Inherited from

BaseDialog.byId

Defined in

src/ui/widgets/widget.ts:106


cancelClick()

protected cancelClick(): void

Returns

void

Defined in

src/ui/dialogs/propertydialog.tsx:83


change()

change(handler): void

Parameters

handler

(e) => void

Returns

void

Inherited from

BaseDialog.change

Defined in

src/ui/widgets/widget.ts:118


changeSelect2()

changeSelect2(handler): void

Parameters

handler

(e) => void

Returns

void

Inherited from

BaseDialog.changeSelect2

Defined in

src/ui/widgets/widget.ts:122


deferRender()

protected deferRender(): boolean

Returns

boolean

Inherited from

BaseDialog.deferRender

Defined in

src/ui/widgets/widget.ts:71


destroy()

destroy(): void

Returns

void

Overrides

BaseDialog.destroy

Defined in

src/ui/dialogs/propertydialog.tsx:40


dialogClose()

dialogClose(result?): void

Parameters

result?

string

Returns

void

Inherited from

BaseDialog.dialogClose

Defined in

src/ui/dialogs/basedialog.tsx:206


dialogOpen()

dialogOpen(asPanel?): void

Parameters

asPanel?

boolean

Returns

void

Inherited from

BaseDialog.dialogOpen

Defined in

src/ui/dialogs/basedialog.tsx:120


findById()

protected findById<TElement>(id): TElement

Type Parameters

TElement extends HTMLElement = HTMLElement

Parameters

id

string

Returns

TElement

Inherited from

BaseDialog.findById

Defined in

src/ui/widgets/widget.ts:110


getCssClass()

protected getCssClass(): string

Returns

string

Inherited from

BaseDialog.getCssClass

Defined in

src/ui/widgets/widget.ts:75


getCustomAttribute()

protected getCustomAttribute<TAttr>(attrType, inherit): TAttr

Type Parameters

TAttr

Parameters

attrType

(...args) => TAttr

inherit

boolean = true

Returns

TAttr

Inherited from

BaseDialog.getCustomAttribute

Defined in

src/ui/widgets/widget.ts:142


getDialogButtons()

protected getDialogButtons(): DialogButton[]

Returns

DialogButton[]

Overrides

BaseDialog.getDialogButtons

Defined in

src/ui/dialogs/propertydialog.tsx:55


getDialogOptions()

protected getDialogOptions(): DialogOptions

Returns

DialogOptions

Overrides

BaseDialog.getDialogOptions

Defined in

src/ui/dialogs/propertydialog.tsx:49


getFormKey()

protected getFormKey(): string

Returns

string

Defined in

src/ui/dialogs/propertydialog.tsx:96


getGridField()

getGridField(): Fluent<HTMLElement>

Returns

Fluent<HTMLElement>

Inherited from

BaseDialog.getGridField

Defined in

src/ui/widgets/widget.ts:114


getInitialDialogTitle()

protected getInitialDialogTitle(): string

Returns

string

Inherited from

BaseDialog.getInitialDialogTitle

Defined in

src/ui/dialogs/basedialog.tsx:61


getPropertyGridOptions()

protected getPropertyGridOptions(): PropertyGridOptions

Returns

PropertyGridOptions

Defined in

src/ui/dialogs/propertydialog.tsx:117


getPropertyItems()

protected getPropertyItems(): PropertyItem[]

Returns

PropertyItem[]

Defined in

src/ui/dialogs/propertydialog.tsx:126


getPropertyItemsData()

protected getPropertyItemsData(): PropertyItemsData

Returns

PropertyItemsData

Defined in

src/ui/dialogs/propertydialog.tsx:130


getPropertyItemsDataAsync()

protected getPropertyItemsDataAsync(): Promise<PropertyItemsData>

Returns

Promise<PropertyItemsData>

Defined in

src/ui/dialogs/propertydialog.tsx:149


getSaveEntity()

protected getSaveEntity(): TItem

Returns

TItem

Defined in

src/ui/dialogs/propertydialog.tsx:158


getToolbarButtons()

protected getToolbarButtons(): ToolButton[]

Returns

ToolButton[]

Inherited from

BaseDialog.getToolbarButtons

Defined in

src/ui/dialogs/basedialog.tsx:148


getValidatorOptions()

protected getValidatorOptions(): any

Returns

any

Inherited from

BaseDialog.getValidatorOptions

Defined in

src/ui/dialogs/basedialog.tsx:163


handleResponsive()

protected handleResponsive(): void

Returns

void

Inherited from

BaseDialog.handleResponsive

Defined in

src/ui/dialogs/basedialog.tsx:226


init()

init(): this

Returns

this

Inherited from

BaseDialog.init

Defined in

src/ui/widgets/widget.ts:157


initDialog()

protected initDialog(): void

Returns

void

Inherited from

BaseDialog.initDialog

Defined in

src/ui/dialogs/basedialog.tsx:97


initPropertyGrid()

protected initPropertyGrid(): void

Returns

void

Defined in

src/ui/dialogs/propertydialog.tsx:87


initTabs()

protected initTabs(): void

Returns

void

Inherited from

BaseDialog.initTabs

Defined in

src/ui/dialogs/basedialog.tsx:219


initToolbar()

protected initToolbar(): void

Returns

void

Inherited from

BaseDialog.initToolbar

Defined in

src/ui/dialogs/basedialog.tsx:152


initUIDialog()

protected initUIDialog(): void

Returns

void

Inherited from

BaseDialog.initUIDialog

Defined in

src/ui/dialogs/basedialog.tsx:106


initValidator()

protected initValidator(): void

Returns

void

Inherited from

BaseDialog.initValidator

Defined in

src/ui/dialogs/basedialog.tsx:167


internalRenderContents()

internalRenderContents(): void

Returns

void

Inherited from

BaseDialog.internalRenderContents

Defined in

src/ui/widgets/widget.ts:177


isClosable()

protected isClosable(): boolean

Returns

boolean

Defined in

src/ui/dialogs/propertydialog.tsx:16


isStatic()

protected isStatic(): boolean

Returns

boolean

Defined in

src/ui/dialogs/propertydialog.tsx:17


isStaticPanel()

protected isStaticPanel(): boolean

Returns

boolean

Inherited from

BaseDialog.isStaticPanel

Defined in

src/ui/dialogs/basedialog.tsx:65


legacyTemplateRender()

protected legacyTemplateRender(): boolean

Returns

boolean

Inherited from

BaseDialog.legacyTemplateRender

Defined in

src/ui/widgets/widget.ts:194


loadInitialEntity()

protected loadInitialEntity(): void

Returns

void

Defined in

src/ui/dialogs/propertydialog.tsx:166


okClick()

protected okClick(): void

Returns

void

Defined in

src/ui/dialogs/propertydialog.tsx:71


okClickValidated()

protected okClickValidated(): void

Returns

void

Defined in

src/ui/dialogs/propertydialog.tsx:79


onClose()

onClose(handler, opt?): void

Attaches a dialog/modal/panel close event handler. See Dialog.close for more info.

Parameters

handler

(result?, e?) => void

opt?
opt.before

boolean

opt.oneOff

boolean

Returns

void

Inherited from

BaseDialog.onClose

Defined in

src/ui/dialogs/basedialog.tsx:139


onDialogClose()

protected onDialogClose(result?): void

Parameters

result?

string

Returns

void

Inherited from

BaseDialog.onDialogClose

Defined in

src/ui/dialogs/basedialog.tsx:189


onDialogOpen()

protected onDialogOpen(): void

Returns

void

Inherited from

BaseDialog.onDialogOpen

Defined in

src/ui/dialogs/basedialog.tsx:131


onOpen()

onOpen(handler, opt?): void

Attaches a dialog/modal/panel open event handler. See Dialog.open for more info.

Parameters

handler

(e?) => void

opt?
opt.before

boolean

opt.oneOff

boolean

Returns

void

Inherited from

BaseDialog.onOpen

Defined in

src/ui/dialogs/basedialog.tsx:144


propertyItemsReady()

protected propertyItemsReady(itemsData): void

Parameters

itemsData

PropertyItemsData

Returns

void

Defined in

src/ui/dialogs/propertydialog.tsx:27


render()

render(): any

Returns the main element for this widget or the document fragment. As widgets may get their elements from props unlike regular JSX widgets, this method should not be overridden. Override renderContents() instead.

Returns

any

Inherited from

BaseDialog.render

Defined in

src/ui/widgets/widget.ts:167


renderContents()

protected renderContents(): any

Returns

any

Overrides

BaseDialog.renderContents

Defined in

src/ui/dialogs/propertydialog.tsx:195


resetValidation()

protected resetValidation(): void

Returns

void

Inherited from

BaseDialog.resetValidation

Defined in

src/ui/dialogs/basedialog.tsx:175


syncOrAsyncThen()

protected syncOrAsyncThen<T>(syncMethod, asyncMethod, then): void

Type Parameters

T

Parameters

syncMethod

() => T

asyncMethod

() => PromiseLike<T>

then

(v) => void

Returns

void

Inherited from

BaseDialog.syncOrAsyncThen

Defined in

src/ui/widgets/widget.ts:211


updateTitle()

protected updateTitle(): void

Returns

void

Defined in

src/ui/dialogs/propertydialog.tsx:190


useAsync()

protected useAsync(): boolean

Returns

boolean

Defined in

src/ui/dialogs/propertydialog.tsx:36


useIdPrefix()

protected useIdPrefix(): IdPrefixType

Returns

IdPrefixType

Inherited from

BaseDialog.useIdPrefix

Defined in

src/ui/widgets/widget.ts:218


validateBeforeSave()

protected validateBeforeSave(): boolean

Returns

boolean

Defined in

src/ui/dialogs/propertydialog.tsx:186


validateForm()

protected validateForm(): boolean

Returns

boolean

Inherited from

BaseDialog.validateForm

Defined in

src/ui/dialogs/basedialog.tsx:179


create()

static create<TWidget, P>(params): TWidget

Type Parameters

TWidget extends Widget<P>

P

Parameters

params

CreateWidgetParams<TWidget, P>

Returns

TWidget

Inherited from

BaseDialog.create

Defined in

src/ui/widgets/widget.ts:130


createDefaultElement()

static createDefaultElement(): HTMLDivElement

Returns

HTMLDivElement

Inherited from

BaseDialog.createDefaultElement

Defined in

src/ui/dialogs/basedialog.tsx:15


getWidgetName()

static getWidgetName(type): string

Parameters

type

Function

Returns

string

Inherited from

BaseDialog.getWidgetName

Defined in

src/ui/widgets/widget.ts:95