@serenity-is/corelib / ImageUploadEditor
Class: ImageUploadEditor<P>
Type parameters
Name | Type |
---|---|
P |
extends ImageUploadEditorOptions = ImageUploadEditorOptions |
Hierarchy
-
↳
ImageUploadEditor
Table of contents
Constructors
Properties
- domNode
- entity
- fileSymbols
- hiddenInput
- idPrefix
- options
- progress
- toolbar
- uniqueName
- uploadInput
- typeInfo
Accessors
Methods
- addCssClass
- addFileButtonText
- addValidationRule
- change
- changeSelect2
- destroy
- getCssClass
- getCustomAttribute
- getEditValue
- getFieldElement
- getGridField
- getToolButtons
- getUploadInputOptions
- get_readOnly
- get_required
- get_value
- init
- internalInit
- internalRenderContents
- populate
- render
- renderContents
- setEditValue
- set_readOnly
- set_required
- set_value
- syncOrAsyncThen
- updateInterface
- useIdPrefix
- create
- createDefaultElement
- getWidgetName
Constructors
constructor
• new ImageUploadEditor<P
>(props
): ImageUploadEditor
<P
>
Type parameters
Name | Type |
---|---|
P |
extends ImageUploadEditorOptions = ImageUploadEditorOptions |
Parameters
Name | Type |
---|---|
props |
EditorProps <P > |
Returns
Overrides
Defined in
src/ui/editors/uploadeditors.ts:267
Properties
domNode
• Readonly
domNode: HTMLElement
Inherited from
Defined in
entity
• Protected
entity: UploadedFile
Inherited from
Defined in
src/ui/editors/uploadeditors.ts:257
fileSymbols
• Protected
fileSymbols: Fluent
<HTMLElement
>
Inherited from
Defined in
src/ui/editors/uploadeditors.ts:260
hiddenInput
• Protected
hiddenInput: Fluent
<HTMLElement
>
Inherited from
Defined in
src/ui/editors/uploadeditors.ts:262
idPrefix
• Readonly
idPrefix: string
Inherited from
Defined in
options
• Protected
Readonly
options: WidgetProps
<EditorProps
<P
>>
Inherited from
Defined in
progress
• Protected
progress: Fluent
<HTMLElement
>
Inherited from
Defined in
src/ui/editors/uploadeditors.ts:259
toolbar
• Protected
toolbar: Toolbar
<ToolbarOptions
>
Inherited from
Defined in
src/ui/editors/uploadeditors.ts:258
uniqueName
• Protected
Readonly
uniqueName: string
Inherited from
Defined in
uploadInput
• Protected
uploadInput: Fluent
<HTMLElement
>
Inherited from
Defined in
src/ui/editors/uploadeditors.ts:261
typeInfo
▪ Static
typeInfo: ClassTypeInfo
<"Serenity.EditorWidget"
>
Inherited from
Defined in
Accessors
element
• get
element(): Fluent
<HTMLElement
>
Returns a Fluent(this.domNode) object
Returns
Fluent
<HTMLElement
>
Inherited from
FileUploadEditor.element
Defined in
props
• get
props(): WidgetProps
<P
>
Returns
WidgetProps
<P
>
Inherited from
FileUploadEditor.props
Defined in
value
• get
value(): UploadedFile
Returns
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
Defined in
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
▸ addValidationRule(uniqueName
, rule
): void
Parameters
Name | Type |
---|---|
uniqueName |
string |
rule |
(input : HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement ) => string |
Returns
void
Inherited from
FileUploadEditor.addValidationRule
Defined in
change
▸ change(handler
): void
Parameters
Name | Type |
---|---|
handler |
(e : Event ) => void |
Returns
void
Inherited from
Defined in
changeSelect2
▸ changeSelect2(handler
): void
Parameters
Name | Type |
---|---|
handler |
(e : Event ) => void |
Returns
void
Inherited from
FileUploadEditor.changeSelect2
Defined in
destroy
▸ destroy(): void
Returns
void
Inherited from
Defined in
getCssClass
▸ getCssClass(): string
Returns
string
Inherited from
Defined in
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
getEditValue
▸ getEditValue(property
, target
): void
Parameters
Name | Type |
---|---|
property |
PropertyItem |
target |
any |
Returns
void
Inherited from
Defined in
src/ui/editors/uploadeditors.ts:230
getFieldElement
▸ getFieldElement(): HTMLElement
Returns
HTMLElement
Inherited from
FileUploadEditor.getFieldElement
Defined in
getGridField
▸ getGridField(): Fluent
<HTMLElement
>
Returns
Fluent
<HTMLElement
>
Inherited from
Defined in
getToolButtons
▸ getToolButtons(): ToolButton
[]
Returns
Inherited from
FileUploadEditor.getToolButtons
Defined in
src/ui/editors/uploadeditors.ts:95
getUploadInputOptions
▸ getUploadInputOptions(): UploadInputOptions
Returns
Inherited from
FileUploadEditor.getUploadInputOptions
Defined in
src/ui/editors/uploadeditors.ts:64
get_readOnly
▸ get_readOnly(): boolean
Returns
boolean
Inherited from
Defined in
src/ui/editors/uploadeditors.ts:145
get_required
▸ get_required(): boolean
Returns
boolean
Inherited from
Defined in
src/ui/editors/uploadeditors.ts:171
get_value
▸ get_value(): UploadedFile
Returns
Inherited from
Defined in
src/ui/editors/uploadeditors.ts:179
init
▸ init(): this
Returns
this
Inherited from
Defined in
internalInit
▸ internalInit(): void
Returns
void
Inherited from
Defined in
internalRenderContents
▸ internalRenderContents(): void
Returns
void
Inherited from
FileUploadEditor.internalRenderContents
Defined in
populate
▸ populate(): void
Returns
void
Inherited from
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
Defined in
renderContents
▸ renderContents(): any
Returns
any
Inherited from
FileUploadEditor.renderContents
Defined in
setEditValue
▸ setEditValue(source
, property
): void
Parameters
Name | Type |
---|---|
source |
any |
property |
PropertyItem |
Returns
void
Inherited from
Defined in
src/ui/editors/uploadeditors.ts:234
set_readOnly
▸ set_readOnly(value
): void
Parameters
Name | Type |
---|---|
value |
boolean |
Returns
void
Inherited from
Defined in
src/ui/editors/uploadeditors.ts:149
set_required
▸ set_required(value
): void
Parameters
Name | Type |
---|---|
value |
boolean |
Returns
void
Inherited from
Defined in
src/ui/editors/uploadeditors.ts:175
set_value
▸ set_value(value
): void
Parameters
Name | Type |
---|---|
value |
UploadedFile |
Returns
void
Inherited from
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
updateInterface
▸ updateInterface(): void
Returns
void
Inherited from
FileUploadEditor.updateInterface
Defined in
src/ui/editors/uploadeditors.ts:137
useIdPrefix
▸ useIdPrefix(): IdPrefixType
Returns
Inherited from
Defined in
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
Defined in
createDefaultElement
▸ createDefaultElement(): HTMLElement
Returns
HTMLElement
Inherited from
FileUploadEditor.createDefaultElement
Defined in
getWidgetName
▸ getWidgetName(type
): string
Parameters
Name | Type |
---|---|
type |
Function |
Returns
string
Inherited from
FileUploadEditor.getWidgetName