Skip to content

Latest commit

 

History

History
1111 lines (557 loc) · 21.9 KB

ImageUploadEditor.md

File metadata and controls

1111 lines (557 loc) · 21.9 KB

@serenity-is/corelib / ImageUploadEditor

Class: ImageUploadEditor<P>

Extends

Type Parameters

P extends ImageUploadEditorOptions = ImageUploadEditorOptions

Constructors

new ImageUploadEditor()

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

Parameters

props

EditorProps<P>

Returns

ImageUploadEditor<P>

Overrides

FileUploadEditor.constructor

Defined in

src/ui/editors/uploadeditors.tsx:261

Properties

domNode

readonly domNode: HTMLElement

Inherited from

FileUploadEditor.domNode

Defined in

src/ui/widgets/widget.ts:17


entity

protected entity: UploadedFile

Inherited from

FileUploadEditor.entity

Defined in

src/ui/editors/uploadeditors.tsx:251


fileSymbols

protected fileSymbols: HTMLElement

Inherited from

FileUploadEditor.fileSymbols

Defined in

src/ui/editors/uploadeditors.tsx:254


hiddenInput

protected hiddenInput: HTMLInputElement

Inherited from

FileUploadEditor.hiddenInput

Defined in

src/ui/editors/uploadeditors.tsx:256


idPrefix

readonly idPrefix: string

Inherited from

FileUploadEditor.idPrefix

Defined in

src/ui/widgets/widget.ts:16


options

protected readonly options: WidgetProps<EditorProps<P>>

Inherited from

FileUploadEditor.options

Defined in

src/ui/widgets/widget.ts:14


progress

protected progress: HTMLElement

Inherited from

FileUploadEditor.progress

Defined in

src/ui/editors/uploadeditors.tsx:253


toolbar

protected toolbar: Toolbar<ToolbarOptions>

Inherited from

FileUploadEditor.toolbar

Defined in

src/ui/editors/uploadeditors.tsx:252


uniqueName

readonly uniqueName: string

Inherited from

FileUploadEditor.uniqueName

Defined in

src/ui/widgets/widget.ts:15


uploadInput

protected uploadInput: Fluent<HTMLElement>

Inherited from

FileUploadEditor.uploadInput

Defined in

src/ui/editors/uploadeditors.tsx:255


isComponent

readonly static isComponent: true = true

Inherited from

FileUploadEditor.isComponent

Defined in

src/ui/widgets/widget.ts:223


typeInfo

static typeInfo: ClassTypeInfo<"Serenity.EditorWidget">

Inherited from

FileUploadEditor.typeInfo

Defined in

src/ui/editors/editorwidget.ts:17

Accessors

element

Get Signature

get element(): Fluent<HTMLElement>

Returns a Fluent(this.domNode) object

Returns

Fluent<HTMLElement>

Inherited from

FileUploadEditor.element

Defined in

src/ui/widgets/widget.ts:63


props

Get Signature

get props(): WidgetProps<P>

Returns

WidgetProps<P>

Inherited from

FileUploadEditor.props

Defined in

src/ui/widgets/widget.ts:207


readOnly

Get Signature

get readOnly(): boolean

Returns

boolean

Set Signature

set readOnly(value): void

Parameters
value

boolean

Returns

void

Inherited from

FileUploadEditor.readOnly

Defined in

src/ui/editors/editorwidget.ts:23


value

Get Signature

get value(): UploadedFile

Returns

UploadedFile

Set Signature

set value(v): void

Parameters
v

UploadedFile

Returns

void

Inherited from

FileUploadEditor.value

Defined in

src/ui/editors/uploadeditors.tsx:181

Methods

addCssClass()

protected addCssClass(): void

Returns

void

Inherited from

FileUploadEditor.addCssClass

Defined in

src/ui/widgets/widget.ts:67


addFileButtonText()

protected addFileButtonText(): string

Returns

string

Inherited from

FileUploadEditor.addFileButtonText

Defined in

src/ui/editors/uploadeditors.tsx:85


addValidationRule()

Call Signature

addValidationRule(rule, uniqueName?): void

Parameters
rule

(input) => string

uniqueName?

string

Returns

void

Inherited from

FileUploadEditor.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

FileUploadEditor.addValidationRule

Defined in

src/ui/widgets/widget.ts:100


afterRender()

protected afterRender(callback): void

Parameters

callback

() => void

Returns

void

Inherited from

FileUploadEditor.afterRender

Defined in

src/ui/widgets/widget.ts:146


byId()

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

Type Parameters

TElement extends HTMLElement = HTMLElement

Parameters

id

string

Returns

Fluent<TElement>

Inherited from

FileUploadEditor.byId

Defined in

src/ui/widgets/widget.ts:106


change()

change(handler): void

Parameters

handler

(e) => void

Returns

void

Inherited from

FileUploadEditor.change

Defined in

src/ui/widgets/widget.ts:118


changeSelect2()

changeSelect2(handler): void

Parameters

handler

(e) => void

Returns

void

Inherited from

FileUploadEditor.changeSelect2

Defined in

src/ui/widgets/widget.ts:122


deferRender()

protected deferRender(): boolean

Returns

boolean

Inherited from

FileUploadEditor.deferRender

Defined in

src/ui/widgets/widget.ts:71


destroy()

destroy(): void

Returns

void

Inherited from

FileUploadEditor.destroy

Defined in

src/ui/widgets/widget.ts:47


findById()

protected findById<TElement>(id): TElement

Type Parameters

TElement extends HTMLElement = HTMLElement

Parameters

id

string

Returns

TElement

Inherited from

FileUploadEditor.findById

Defined in

src/ui/widgets/widget.ts:110


get_readOnly()

get_readOnly(): boolean

Returns

boolean

Inherited from

FileUploadEditor.get_readOnly

Defined in

src/ui/editors/uploadeditors.tsx:139


get_required()

get_required(): boolean

Returns

boolean

Inherited from

FileUploadEditor.get_required

Defined in

src/ui/editors/uploadeditors.tsx:165


get_value()

get_value(): UploadedFile

Returns

UploadedFile

Inherited from

FileUploadEditor.get_value

Defined in

src/ui/editors/uploadeditors.tsx:173


getCssClass()

protected getCssClass(): string

Returns

string

Inherited from

FileUploadEditor.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

FileUploadEditor.getCustomAttribute

Defined in

src/ui/widgets/widget.ts:142


getEditValue()

getEditValue(property, target): void

Parameters

property

PropertyItem

target

any

Returns

void

Inherited from

FileUploadEditor.getEditValue

Defined in

src/ui/editors/uploadeditors.tsx:224


getGridField()

getGridField(): Fluent<HTMLElement>

Returns

Fluent<HTMLElement>

Inherited from

FileUploadEditor.getGridField

Defined in

src/ui/widgets/widget.ts:114


getToolButtons()

protected getToolButtons(): ToolButton[]

Returns

ToolButton[]

Inherited from

FileUploadEditor.getToolButtons

Defined in

src/ui/editors/uploadeditors.tsx:89


getUploadInputOptions()

protected getUploadInputOptions(): UploadInputOptions

Returns

UploadInputOptions

Inherited from

FileUploadEditor.getUploadInputOptions

Defined in

src/ui/editors/uploadeditors.tsx:58


init()

init(): this

Returns

this

Inherited from

FileUploadEditor.init

Defined in

src/ui/widgets/widget.ts:157


internalRenderContents()

internalRenderContents(): void

Returns

void

Inherited from

FileUploadEditor.internalRenderContents

Defined in

src/ui/widgets/widget.ts:177


legacyTemplateRender()

protected legacyTemplateRender(): boolean

Returns

boolean

Inherited from

FileUploadEditor.legacyTemplateRender

Defined in

src/ui/widgets/widget.ts:194


populate()

protected populate(): void

Returns

void

Inherited from

FileUploadEditor.populate

Defined in

src/ui/editors/uploadeditors.tsx:114


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:167


renderContents()

protected renderContents(): any

Returns

any

Inherited from

FileUploadEditor.renderContents

Defined in

src/ui/widgets/widget.ts:188


set_readOnly()

set_readOnly(value): void

Parameters

value

boolean

Returns

void

Inherited from

FileUploadEditor.set_readOnly

Defined in

src/ui/editors/uploadeditors.tsx:143


set_required()

set_required(value): void

Parameters

value

boolean

Returns

void

Inherited from

FileUploadEditor.set_required

Defined in

src/ui/editors/uploadeditors.tsx:169


set_value()

set_value(value): void

Parameters

value

UploadedFile

Returns

void

Inherited from

FileUploadEditor.set_value

Defined in

src/ui/editors/uploadeditors.tsx:185


setEditValue()

setEditValue(source, property): void

Parameters

source

any

property

PropertyItem

Returns

void

Inherited from

FileUploadEditor.setEditValue

Defined in

src/ui/editors/uploadeditors.tsx:228


syncOrAsyncThen()

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

Type Parameters

T

Parameters

syncMethod

() => T

asyncMethod

() => PromiseLike<T>

then

(v) => void

Returns

void

Inherited from

FileUploadEditor.syncOrAsyncThen

Defined in

src/ui/widgets/widget.ts:211


updateInterface()

protected updateInterface(): void

Returns

void

Inherited from

FileUploadEditor.updateInterface

Defined in

src/ui/editors/uploadeditors.tsx:131


useIdPrefix()

protected useIdPrefix(): IdPrefixType

Returns

IdPrefixType

Inherited from

FileUploadEditor.useIdPrefix

Defined in

src/ui/widgets/widget.ts:218


create()

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

Type Parameters

TWidget extends Widget<P>

P

Parameters

params

CreateWidgetParams<TWidget, P>

Returns

TWidget

Inherited from

FileUploadEditor.create

Defined in

src/ui/widgets/widget.ts:130


createDefaultElement()

static createDefaultElement(): HTMLElement

Returns

HTMLElement

Inherited from

FileUploadEditor.createDefaultElement

Defined in

src/ui/widgets/widget.ts:56


getWidgetName()

static getWidgetName(type): string

Parameters

type

Function

Returns

string

Inherited from

FileUploadEditor.getWidgetName

Defined in

src/ui/widgets/widget.ts:95