packageDocumentation module import { PropertyDescription } from "../properties/Description" ; public export interface DialogItemValue { value ? : number | string | boolean | Date ; displayValue ? : string ; } public export interface EditorPosition { /** Determine the order the row is shown in UI */ rowPriority : number ; /** Determines the column position for the type editor */ columnIndex : number ; deprecated columnSpan ? : number ; } public export interface BaseDialogItem { readonly value : DialogItemValue ; readonly property : PropertyDescription ; readonly isDisabled ? : boolean ; } see See public export interface DialogItem extends BaseDialogItem { readonly editorPosition : EditorPosition ; readonly lockProperty ? : BaseDialogItem ; } public export interface DialogPropertyItem { readonly value : DialogItemValue ; readonly propertyName : string ; } public export interface DialogPropertySyncItem extends DialogPropertyItem { readonly isDisabled ? : boolean ; readonly property ? : PropertyDescription ; } public export class DialogProperty < T > { constructor ( public description , private _value , private _displayValue ? , private _isDisabled ? ) { } public get isDisabled ( ) { return ! ! this . _isDisabled ; } public set isDisabled ( val ) { this . _isDisabled = val ; } public get value ( ) { return this . _value ; } public set value ( val ) { this . _value = val ; } public get name ( ) { return this . description . name ; } public set displayValue ( val ) { this . _displayValue = val ; } public get displayValue ( ) { return this . _displayValue ; } public get dialogItemValue ( ) { if ( typeof this . _value === "string" || typeof this . _value === "number" || typeof this . _value === "undefined" || typeof this . _value === "boolean" || this . _value instanceof Date ) return { value : this . _value , displayValue : this . _displayValue } as DialogItemValue ; throw new Error ( "Not valid primitive type" ) ; } public set dialogItemValue ( val ) { this . _value = val . value as unknown as T ; this . _displayValue = val . displayValue ; } public get syncItem ( ) : DialogPropertySyncItem { const isDisabled = this . _isDisabled ; return { propertyName : this . name , value : this . dialogItemValue , isDisabled } ; } public get item ( ) : DialogPropertyItem { return { propertyName : this . name , value : this . dialogItemValue } ; } public toDialogItem ( editorPosition , lockProperty ? ) { return { value : this . dialogItemValue , property : this . description , editorPosition , isDisabled : this . _isDisabled , lockProperty } ; } }