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/index.html | 911 +++++++++------------ 1 file changed, 406 insertions(+), 505 deletions(-) (limited to 'api/pl.treksoft.kvision.form.upload/-upload/index.html') diff --git a/api/pl.treksoft.kvision.form.upload/-upload/index.html b/api/pl.treksoft.kvision.form.upload/-upload/index.html index e4b844ca..f8698c5a 100644 --- a/api/pl.treksoft.kvision.form.upload/-upload/index.html +++ b/api/pl.treksoft.kvision.form.upload/-upload/index.html @@ -8,14 +8,15 @@ kvision / pl.treksoft.kvision.form.upload / Upload

Upload

-open class Upload : SimplePanel, KFilesFormControl +(js) open class Upload : SimplePanel, KFilesFormControl

The form field file upload component.

Constructors

@@ -27,221 +28,210 @@ +var allowedFileExtensions: Set<String>? +var allowedFileTypes: Set<String>? +var browseOnZoneClick: Boolean +var dropZoneEnabled: Boolean +var explorerTheme: Boolean +val flabel: FieldLabel +val input: UploadInput +val invalidFeedback: InvalidFeedback +var label: String? +var multiple: Boolean +var preferIconicPreview: Boolean +var required: Boolean +var rich: Boolean +var showBrowse: Boolean +var showCancel: Boolean +var showCaption: Boolean +var showPreview: Boolean +var showRemove: Boolean +var showUpload: Boolean +var uploadExtraData: ((String, Int) -> dynamic)? +var uploadUrl: String? - - -
-

<init>

+(js) +

<init>

Upload(uploadUrl: String? = null, multiple: Boolean = false, label: String? = null, rich: Boolean = false)
-

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.

-
-

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.

-
-

flabel

+(js) +

flabel

-val flabel: FieldLabel

Form field label.

-
-

idc

+(js) +

idc

val idc: String
-

input

+(js) +

input

-val input: UploadInput

The actual input component.

-
-

invalidFeedback

+(js) +

invalidFeedback

-val invalidFeedback: InvalidFeedback

Invalid feedback component.

-
-

label

+(js) +

label

-var label: String?

The label text bound to the spinner input element.

-
-

multiple

+(js) +

multiple

-var multiple: Boolean

Determines if multiple file upload is supported.

-
-

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.

-
-

rich

+(js) +

rich

-var rich: Boolean

Determines if label can contain HTML code.

-
-

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.

-
-

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.

-
-

value

+(js) +

value

-open var value: List<KFile>?

File input value.

-
-

Inherited Properties

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

children

-
-val children: MutableList<Component>
@@ -250,224 +240,129 @@ If not set the upload button action will default to form submission.

-

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

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

Returns the native JavaScript File object.

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

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

-open fun getValueAsString(): String?

Returns the value of the control as a String.

- +open 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 -

removeEventListener

+(js) +

removeEventListener

-open fun removeEventListener(id: Int): Widget

Removes event listener from current widget.

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

removeEventListeners

+(js) +

removeEventListeners

-open fun removeEventListeners(): Widget

Removes all event listeners from current widget.

- +open fun removeEventListeners(): Widget -

resetInput

+(js) +

resetInput

-open fun resetInput(): Unit

Resets the file input control.

- +open fun resetInput(): Unit -

setEventListener

+(js) +

setEventListener

-open fun <T : Widget> setEventListener(block: SnOn<T>.() -> Unit): Int

Sets an event listener for current widget, keeping the actual type of component.

- +open fun <T : Widget> setEventListener(block: SnOn<T>.() -> Unit): Int -

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

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +open fun upload(): Unit
-

add

-
-open fun add(child: Component): SimplePanel -

Adds given component to the current container.

-
-

addAll

-
-open fun addAll(children: List<Component>): SimplePanel -

Adds a list of components to the current container.

-
-

addInternal

-
-fun addInternal(child: Component): SimplePanel -

Protected and final method to add given component to the current container.

-
-

childrenVNodes

-
-open fun childrenVNodes(): Array<VNode> -

Returns the array of the children Snabbdom vnodes.

-
-

getChildren

-
-open fun getChildren(): List<Component> -

Returns a list of children of the current container.

-
-

getValue

-
-open fun getValue(): List<KFile>? -

Returns the value of the control.

-
-

remove

-
-open fun remove(child: Component): SimplePanel -

Removes given component from the current container.

-
-

removeAll

-
-open fun removeAll(): SimplePanel -

Removes all children from the current container.

-
-

render

-
-open fun render(): VNode -

Renders current component as a Snabbdom vnode.

-
-

setValue

-
-open fun setValue(v: Any?): Unit -

Sets the value of the control.

-
@@ -476,24 +371,27 @@ If not set the upload button action will default to form submission.

-

changeFlow

+(js) +

changeFlow

-val <T : Widget> T.changeFlow: <ERROR CLASS><T> +val <T : Widget> T.changeFlow: Flow<T> -

clickFlow

+(js) +

clickFlow

-val <T : Widget> T.clickFlow: <ERROR CLASS><T> +val <T : Widget> T.clickFlow: Flow<T> -

inputFlow

+(js) +

inputFlow

-val <T : Widget> T.inputFlow: <ERROR CLASS><T> +val <T : Widget> T.inputFlow: Flow<T> @@ -502,867 +400,870 @@ If not set the upload button action will default to form submission.

-

addBsBgColor

+(js) +

addBsBgColor

fun Component.addBsBgColor(bsBgColor: BsBgColor): Unit -

addBsBorder

+(js) +

addBsBorder

fun Component.addBsBorder(vararg bsBorder: BsBorder): Unit -

addBsClearfix

+(js) +

addBsClearfix

fun Component.addBsClearfix(): Unit -

addBsColor

+(js) +

addBsColor

fun Component.addBsColor(bsColor: BsColor): Unit -

addBsRounded

+(js) +

addBsRounded

fun Component.addBsRounded(vararg bsRounded: BsRounded): Unit -

bold

+(js) +

bold

-fun Container.bold(content: String? = null, rich: Boolean = false, align: Align? = null, classes: Set<String> = setOf(), init: (Bold.() -> Unit)? = null): Bold

DSL builder extension function.

- +fun Container.bold(content: String? = null, rich: Boolean = false, align: Align? = null, classes: Set<String> = setOf(), init: (Bold.() -> Unit)? = null): Bold -

button

+(js) +

button

-fun Container.button(text: String, icon: String? = null, style: ButtonStyle = ButtonStyle.PRIMARY, type: ButtonType = ButtonType.BUTTON, disabled: Boolean = false,