@serenity-is/corelib / ImageUploadEditor

Class: ImageUploadEditor<P>

Type parameters

Name Type
P extends ImageUploadEditorOptions = ImageUploadEditorOptions

Hierarchy

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new ImageUploadEditor<P>(props): ImageUploadEditor<P>

Type parameters

Name Type
P extends ImageUploadEditorOptions = ImageUploadEditorOptions

Parameters

Name Type
props EditorProps<P>

Returns

ImageUploadEditor<P>

Overrides

FileUploadEditor.constructor

Defined in

src/ui/editors/uploadeditors.ts:267

Properties

domNode

Readonly domNode: HTMLElement

Inherited from

FileUploadEditor.domNode

Defined in

src/ui/widgets/widget.ts:18


entity

Protected entity: UploadedFile

Inherited from

FileUploadEditor.entity

Defined in

src/ui/editors/uploadeditors.ts:257


fileSymbols

Protected fileSymbols: Fluent<HTMLElement>

Inherited from

FileUploadEditor.fileSymbols

Defined in

src/ui/editors/uploadeditors.ts:260


hiddenInput

Protected hiddenInput: Fluent<HTMLElement>

Inherited from

FileUploadEditor.hiddenInput

Defined in

src/ui/editors/uploadeditors.ts:262


idPrefix

Readonly idPrefix: string

Inherited from

FileUploadEditor.idPrefix

Defined in

src/ui/widgets/widget.ts:17


options

Protected Readonly options: WidgetProps<EditorProps<P>>

Inherited from

FileUploadEditor.options

Defined in

src/ui/widgets/widget.ts:15


progress

Protected progress: Fluent<HTMLElement>

Inherited from

FileUploadEditor.progress

Defined in

src/ui/editors/uploadeditors.ts:259


toolbar

Protected toolbar: Toolbar<ToolbarOptions>

Inherited from

FileUploadEditor.toolbar

Defined in

src/ui/editors/uploadeditors.ts:258


uniqueName

Protected Readonly uniqueName: string

Inherited from

FileUploadEditor.uniqueName

Defined in

src/ui/widgets/widget.ts:16


uploadInput

Protected uploadInput: Fluent<HTMLElement>

Inherited from

FileUploadEditor.uploadInput

Defined in

src/ui/editors/uploadeditors.ts:261


typeInfo

Static typeInfo: ClassTypeInfo<"Serenity.EditorWidget">

Inherited from

FileUploadEditor.typeInfo

Defined in

src/ui/widgets/widget.ts:202

Accessors

element

get element(): Fluent<HTMLElement>

Returns a Fluent(this.domNode) object

Returns

Fluent<HTMLElement>

Inherited from

FileUploadEditor.element

Defined in

src/ui/widgets/widget.ts:67


props

get props(): WidgetProps<P>

Returns

WidgetProps<P>

Inherited from

FileUploadEditor.props

Defined in

src/ui/widgets/widget.ts:182


value

get value(): UploadedFile

Returns

UploadedFile

Inherited from

FileUploadEditor.value

Defined in

src/ui/editors/uploadeditors.ts:187

set value(v): void

Parameters

Name Type
v UploadedFile

Returns

void

Inherited from

FileUploadEditor.value

Defined in

src/ui/editors/uploadeditors.ts:226

Methods

addCssClass

addCssClass(): void

Returns

void

Inherited from

FileUploadEditor.addCssClass

Defined in

src/ui/widgets/widget.ts:71


addFileButtonText

addFileButtonText(): string

Returns

string

Inherited from

FileUploadEditor.addFileButtonText

Defined in

src/ui/editors/uploadeditors.ts:91


addValidationRule

addValidationRule(rule, uniqueName?): void

Parameters

Name Type
rule (input: HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement) => string
uniqueName? string

Returns

void

Inherited from

FileUploadEditor.addValidationRule

Defined in

src/ui/widgets/widget.ts:99

addValidationRule(uniqueName, rule): void

Parameters

Name Type
uniqueName string
rule (input: HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement) => string

Returns

void

Inherited from

FileUploadEditor.addValidationRule

Defined in

src/ui/widgets/widget.ts:100


change

change(handler): void

Parameters

Name Type
handler (e: Event) => void

Returns

void

Inherited from

FileUploadEditor.change

Defined in

src/ui/widgets/widget.ts:114


changeSelect2

changeSelect2(handler): void

Parameters

Name Type
handler (e: Event) => void

Returns

void

Inherited from

FileUploadEditor.changeSelect2

Defined in

src/ui/widgets/widget.ts:118


destroy

destroy(): void

Returns

void

Inherited from

FileUploadEditor.destroy

Defined in

src/ui/widgets/widget.ts:49


getCssClass

getCssClass(): string

Returns

string

Inherited from

FileUploadEditor.getCssClass

Defined in

src/ui/widgets/widget.ts:75


getCustomAttribute

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

Type parameters

Name
TAttr

Parameters

Name Type Default value
attrType (...args: any[]) => TAttr undefined
inherit boolean true

Returns

TAttr

Inherited from

FileUploadEditor.getCustomAttribute

Defined in

src/ui/widgets/widget.ts:138


getEditValue

getEditValue(property, target): void

Parameters

Name Type
property PropertyItem
target any

Returns

void

Inherited from

FileUploadEditor.getEditValue

Defined in

src/ui/editors/uploadeditors.ts:230


getFieldElement

getFieldElement(): HTMLElement

Returns

HTMLElement

Inherited from

FileUploadEditor.getFieldElement

Defined in

src/ui/widgets/widget.ts:106


getGridField

getGridField(): Fluent<HTMLElement>

Returns

Fluent<HTMLElement>

Inherited from

FileUploadEditor.getGridField

Defined in

src/ui/widgets/widget.ts:110


getToolButtons

getToolButtons(): ToolButton[]

Returns

ToolButton[]

Inherited from

FileUploadEditor.getToolButtons

Defined in

src/ui/editors/uploadeditors.ts:95


getUploadInputOptions

getUploadInputOptions(): UploadInputOptions

Returns

UploadInputOptions

Inherited from

FileUploadEditor.getUploadInputOptions

Defined in

src/ui/editors/uploadeditors.ts:64


get_readOnly

get_readOnly(): boolean

Returns

boolean

Inherited from

FileUploadEditor.get_readOnly

Defined in

src/ui/editors/uploadeditors.ts:145


get_required

get_required(): boolean

Returns

boolean

Inherited from

FileUploadEditor.get_required

Defined in

src/ui/editors/uploadeditors.ts:171


get_value

get_value(): UploadedFile

Returns

UploadedFile

Inherited from

FileUploadEditor.get_value

Defined in

src/ui/editors/uploadeditors.ts:179


init

init(): this

Returns

this

Inherited from

FileUploadEditor.init

Defined in

src/ui/widgets/widget.ts:146


internalInit

internalInit(): void

Returns

void

Inherited from

FileUploadEditor.internalInit

Defined in

src/ui/widgets/widget.ts:142


internalRenderContents

internalRenderContents(): void

Returns

void

Inherited from

FileUploadEditor.internalRenderContents

Defined in

src/ui/widgets/widget.ts:169


populate

populate(): void

Returns

void

Inherited from

FileUploadEditor.populate

Defined in

src/ui/editors/uploadeditors.ts:120


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

FileUploadEditor.render

Defined in

src/ui/widgets/widget.ts:159


renderContents

renderContents(): any

Returns

any

Inherited from

FileUploadEditor.renderContents

Defined in

src/ui/widgets/widget.ts:178


setEditValue

setEditValue(source, property): void

Parameters

Name Type
source any
property PropertyItem

Returns

void

Inherited from

FileUploadEditor.setEditValue

Defined in

src/ui/editors/uploadeditors.ts:234


set_readOnly

set_readOnly(value): void

Parameters

Name Type
value boolean

Returns

void

Inherited from

FileUploadEditor.set_readOnly

Defined in

src/ui/editors/uploadeditors.ts:149


set_required

set_required(value): void

Parameters

Name Type
value boolean

Returns

void

Inherited from

FileUploadEditor.set_required

Defined in

src/ui/editors/uploadeditors.ts:175


set_value

set_value(value): void

Parameters

Name Type
value UploadedFile

Returns

void

Inherited from

FileUploadEditor.set_value

Defined in

src/ui/editors/uploadeditors.ts:191


syncOrAsyncThen

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

Type parameters

Name
T

Parameters

Name Type
syncMethod () => T
asyncMethod () => PromiseLike<T>
then (v: T) => void

Returns

void

Inherited from

FileUploadEditor.syncOrAsyncThen

Defined in

src/ui/widgets/widget.ts:186


updateInterface

updateInterface(): void

Returns

void

Inherited from

FileUploadEditor.updateInterface

Defined in

src/ui/editors/uploadeditors.ts:137


useIdPrefix

useIdPrefix(): IdPrefixType

Returns

IdPrefixType

Inherited from

FileUploadEditor.useIdPrefix

Defined in

src/ui/widgets/widget.ts:193


create

create<TWidget, P>(params): TWidget

Type parameters

Name Type
TWidget extends Widget<P>
P P

Parameters

Name Type
params CreateWidgetParams<TWidget, P>

Returns

TWidget

Inherited from

FileUploadEditor.create

Defined in

src/ui/widgets/widget.ts:126


createDefaultElement

createDefaultElement(): HTMLElement

Returns

HTMLElement

Inherited from

FileUploadEditor.createDefaultElement

Defined in

src/ui/widgets/widget.ts:60


getWidgetName

getWidgetName(type): string

Parameters

Name Type
type Function

Returns

string

Inherited from

FileUploadEditor.getWidgetName

Defined in

src/ui/widgets/widget.ts:95