From 0365722f8549ee93918be99da1b9f901cf0b2c8d Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Fri, 13 Mar 2020 01:05:20 +0100 Subject: API documentation for KVision 3.5.2 --- .../-upload-input/index.html | 773 +++++---------------- 1 file changed, 155 insertions(+), 618 deletions(-) (limited to 'api/pl.treksoft.kvision.form.upload/-upload-input/index.html') diff --git a/api/pl.treksoft.kvision.form.upload/-upload-input/index.html b/api/pl.treksoft.kvision.form.upload/-upload-input/index.html index 53010c07..88d46a15 100644 --- a/api/pl.treksoft.kvision.form.upload/-upload-input/index.html +++ b/api/pl.treksoft.kvision.form.upload/-upload-input/index.html @@ -8,14 +8,15 @@ kvision / pl.treksoft.kvision.form.upload / UploadInput

UploadInput

-open class UploadInput : Widget, FormInput +(js) open class UploadInput : Widget, FormInput

The file upload component.

Constructors

@@ -27,303 +28,193 @@ +var allowedFileExtensions: Set<String>? +var allowedFileTypes: Set<String>? +var browseOnZoneClick: Boolean +open var disabled: Boolean +var dropZoneEnabled: Boolean +var explorerTheme: Boolean +var multiple: Boolean +open var name: String? +var preferIconicPreview: Boolean +var required: Boolean +var showBrowse: Boolean +var showCancel: Boolean +var showCaption: Boolean +var showPreview: Boolean +var showRemove: Boolean +var showUpload: Boolean +open var size: InputSize? +var uploadExtraData: ((String, Int) -> dynamic)? +var uploadUrl: String? +open var validationStatus: ValidationStatus? - - -
-

<init>

+(js) +

<init>

UploadInput(uploadUrl: String? = null, multiple: Boolean = false, classes: Set<String> = setOf())
-

allowedFileExtensions

+(js) +

allowedFileExtensions

-var allowedFileExtensions: Set<String>?

Allowed file extensions.

-
-

allowedFileTypes

+(js) +

allowedFileTypes

-var allowedFileTypes: Set<String>?

Allowed file types.

-
-

browseOnZoneClick

+(js) +

browseOnZoneClick

-var browseOnZoneClick: Boolean

Determines if the click on the preview zone opens file browse window.

-
-

disabled

+(js) +

disabled

-open var disabled: Boolean

Determines if the field is disabled.

-
-

dropZoneEnabled

+(js) +

dropZoneEnabled

-var dropZoneEnabled: Boolean

Determines if Drag&Drop zone is enabled.

-
-

explorerTheme

+(js) +

explorerTheme

-var explorerTheme: Boolean

Determines if the explorer theme is used.

-
-

multiple

+(js) +

multiple

-var multiple: Boolean

Determines if multiple file upload is supported.

-
-

name

+(js) +

name

-open var name: String?

The name attribute of the generated HTML input element.

-
-

preferIconicPreview

+(js) +

preferIconicPreview

-var preferIconicPreview: Boolean

Determines if the iconic preview is prefered.

-
-

required

+(js) +

required

-var required: Boolean

Determines if the input selection is required.

-
-

showBrowse

+(js) +

showBrowse

-var showBrowse: Boolean

Determines if the file browse button is shown.

-
-

showCancel

+(js) +

showCancel

-var showCancel: Boolean

Determines if the cancel button is shown.

-
-

showCaption

+(js) +

showCaption

-var showCaption: Boolean

Determines if the caption is shown.

-
-

showPreview

+(js) +

showPreview

-var showPreview: Boolean

Determines if the preview is shown.

-
-

showRemove

+(js) +

showRemove

-var showRemove: Boolean

Determines if the remove button is shown.

-
-

showUpload

+(js) +

showUpload

-var showUpload: Boolean

Determines if the upload button is shown.

-
-

size

+(js) +

size

-open var size: InputSize?

The size of the input (currently not working)

-
-

uploadExtraData

+(js) +

uploadExtraData

-var uploadExtraData: ((String, Int) -> dynamic)?

The extra data that will be passed as data to the AJAX server call via POST.

-
-

uploadUrl

+(js) +

uploadUrl

-var uploadUrl: String?

The optional URL for the upload processing action. If not set the upload button action will default to form submission.

-
-

validationStatus

+(js) +

validationStatus

-open var validationStatus: ValidationStatus?

The validation status of the input.

-
-

value

+(js) +

value

-var value: List<KFile>?

File input value.

-
-

Inherited Properties

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +var value: List<KFile>?
-

draggable

-
-var draggable: Boolean? -

Determines if the current widget is draggable.

-
-

eventTarget

-
-var eventTarget: Widget?
-

id

-
-var id: String? -

An ID attribute of generated HTML element.

-
-

lastLanguage

-
-var lastLanguage: String?
-

parent

-
-open var parent: Container? -

Parent of the current component.

-
-

popoverOptions

-
-var popoverOptions: PopoverOptions?
-

role

-
-var role: String? -

A role attribute of generated HTML element.

-
-

surroundingSpan

-
-var surroundingSpan: Boolean
-

tabindex

-
-var tabindex: Int? -

A tabindex attribute of generated HTML element.

-
-

title

-
-var title: String? -

A title attribute of generated HTML element.

-
-

tooltipOptions

-
-var tooltipOptions: TooltipOptions?
-

visible

-
-open var visible: Boolean -

Visibility state of the current component.

-
-

vnode

-
-var vnode: VNode?
@@ -332,498 +223,138 @@ If not set the upload button action will default to form submission.

-

afterDestroy

+(js) +

afterDestroy

-open fun afterDestroy(): Unit

Method called after destroying Snabbdom vnode.

- +open fun afterDestroy(): Unit -

afterInsert

+(js) +

afterInsert

-open fun afterInsert(node: VNode): Unit

Method called after inserting Snabbdom vnode into the DOM.

- +open fun afterInsert(node: VNode): Unit -

blur

+(js) +

blur

-open fun blur(): Unit

Makes the input element blur.

- +open fun blur(): Unit -

cancel

+(js) +

cancel

-open fun cancel(): Unit

Cancel an ongoing ajax upload (only for ajax mode).

- +open fun cancel(): Unit -

clearInput

+(js) +

clearInput

-open fun clearInput(): Unit

Clears the file input control (including the native input).

- +open fun clearInput(): Unit -

focus

+(js) +

focus

-open fun focus(): Unit

Makes the input element focused.

- +open fun focus(): Unit -

getNativeFile

+(js) +

getNativeFile

-fun getNativeFile(kFile: KFile): File?

Returns the native JavaScript File object.

- +fun getNativeFile(kFile: KFile): File? -

getSnAttrs

+(js) +

getSnAttrs

-open fun getSnAttrs(): List<StringPair>

Returns list of element attributes in the form of a List.

- +open fun getSnAttrs(): List<StringPair> -

getSnClass

+(js) +

getSnClass

-open fun getSnClass(): List<StringBoolPair>

Returns list of CSS class names for current widget in the form of a List.

- +open fun getSnClass(): List<StringBoolPair> -

getValueAsString

+(js) +

getValueAsString

-fun getValueAsString(): String?

Returns the value of the file input control as a String.

- +fun getValueAsString(): String? -

lock

+(js) +

lock

-open fun lock(): Unit

Locks the file input (disabling all buttons except a cancel button).

- +open fun lock(): Unit -

render

+(js) +

render

-open fun render(): VNode

Renders current component as a Snabbdom vnode.

- +open fun render(): VNode -

resetInput

+(js) +

resetInput

-open fun resetInput(): Unit

Resets the file input control.

- +open fun resetInput(): Unit -

unlock

+(js) +

unlock

-open fun unlock(): Unit

Unlocks the file input.

- +open fun unlock(): Unit -

upload

+(js) +

upload

-open fun upload(): Unit

Trigger ajax upload (only for ajax mode).

- - - - -

Inherited Functions

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

addCssClass

-
-open fun addCssClass(css: String): Widget -

Adds given value to the set of CSS classes generated in html code of current component.

-
-

addCssStyle

-
-open fun addCssStyle(css: Style): Widget -

Adds given style object to the set of CSS classes generated in html code of current component.

-
-

addSurroundingCssClass

-
-open fun addSurroundingCssClass(css: String): Widget -

Adds given value to the set of CSS classes generated in html code of parent component.

-
-

addSurroundingCssStyle

-
-open fun addSurroundingCssStyle(css: Style): Widget -

Adds given style object to the set of CSS classes generated in html code of parent component.

-
-

afterCreate

-
-open fun afterCreate(node: VNode): Unit -

Method called after creating Snabbdom vnode.

-
-

clearDragDropData

-
-open fun clearDragDropData(): Unit -

Clears D&D data for the current widget. It also makes it not draggable.

-
-

disablePopover

-
-open fun disablePopover(): Widget -

Disables popover for the current widget.

-
-

disableTooltip

-
-open fun disableTooltip(): Widget -

Disables tooltip for the current widget.

-
-

dispatchEvent

-
-open fun dispatchEvent(type: String, eventInitDict: CustomEventInit): Boolean?
-

enablePopover

-
-open fun enablePopover(options: PopoverOptions = PopoverOptions()): Widget -

Enables popover for the current widget.

-
-

enableTooltip

-
-open fun enableTooltip(options: TooltipOptions = TooltipOptions()): Widget -

Enables tooltip for the current widget.

-
-

getAttribute

-
-open fun getAttribute(name: String): String? -

Returns the value of an additional attribute.

-
-

getElement

-
-open fun getElement(): Node? -

Returns DOM element bound to the current component.

-
-

getElementJQuery

-
-open fun getElementJQuery(): JQuery? -

Returns JQuery element bound to the current component.

-
-

getElementJQueryD

-
-open fun getElementJQueryD(): dynamic -

Returns JQuery element bound to the current component as a dynamic type.

-
-

getSnHooks

-
-open fun getSnHooks(): Hooks? -

Returns list of hooks in the form of a Snabbdom Hooks object.

-
-

getSnOn

-
-open fun getSnOn(): On? -

Returns list of event handlers in the form of a Snabbdom On object.

-
-

hide

-
-open fun hide(): Widget -

Makes current widget invisible.

-
-

hidePopover

-
-open fun hidePopover(): Widget -

Hides popover for the current widget.

-
-

hideTooltip

-
-open fun hideTooltip(): Widget -

Hides tooltip for the current widget.

-
-

refreshOnUpdate

-
-fun <T> refreshOnUpdate(refreshFunction: (T) -> Unit = { this.refresh() }): Widget.RefreshDelegateProvider<T>
-fun <T> refreshOnUpdate(initialValue: T, refreshFunction: (T) -> Unit = { this.refresh() }): Widget.RefreshDelegateProvider<T>
-

removeAttribute

-
-open fun removeAttribute(name: String): Widget -

Removes the value of additional attribute.

-
-

removeCssClass

-
-open fun removeCssClass(css: String): Widget -

Removes given value from the set of CSS classes generated in html code of current component.

-
-

removeCssStyle

-
-open fun removeCssStyle(css: Style): Widget -

Removes given style object from the set of CSS classes generated in html code of current component.

-
-

removeEventListener

-
-open fun removeEventListener(id: Int): Widget -

Removes event listener from current widget.

-
-

removeEventListeners

-
-open fun removeEventListeners(): Widget -

Removes all event listeners from current widget.

-
-

removeSurroundingCssClass

-
-open fun removeSurroundingCssClass(css: String): Widget -

Removes given value from the set of CSS classes generated in html code of parent component.

-
-

removeSurroundingCssStyle

-
-open fun removeSurroundingCssStyle(css: Style): Widget -

Removes given style object from the set of CSS classes generated in html code of parent component.

-
-

render

-
-open fun render(elementName: String): VNode
-open fun render(elementName: String, children: Array<dynamic>): VNode -

Renders current component as a Snabbdom vnode.

-
-

setAttribute

-
-open fun setAttribute(name: String, value: String): Widget -

Sets the value of additional attribute.

-
-