From 806edfceeefe7fda47924f97237974e99fe28a02 Mon Sep 17 00:00:00 2001
From: Robert Jaros
+
+
+ Constructor Overrides Widget.afterDestroy Method called after destroying Snabbdom vnode. Overrides Widget.afterInsert Method called after inserting Snabbdom vnode into the DOM. Allowed file extensions. Getter Allowed file extensions.
+
+<init>
+
+UploadInput(uploadUrl: String? = null, multiple: Boolean = false, classes: Set<String> = setOf())
+Parameters
+uploadUrl - the optional URL for the upload processing actionmultiple - determines if multiple file upload is supportedclasses - a set of CSS class names
+
+
+afterDestroy
+
+protected open fun afterDestroy(): Unit
+
+
+afterInsert
+
+protected open fun afterInsert(node: VNode): Unit
+
+
+allowedFileExtensions
+
+var allowedFileExtensions: Set<String>?
+
+
Setter
+
Allowed file extensions.
+ + + diff --git a/api/pl.treksoft.kvision.form.upload/-upload-input/allowed-file-types.html b/api/pl.treksoft.kvision.form.upload/-upload-input/allowed-file-types.html new file mode 100644 index 00000000..37963eec --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload-input/allowed-file-types.html @@ -0,0 +1,21 @@ + + + +var allowedFileTypes: Set<String>?
+Allowed file types.
+Getter
+
Allowed file types.
+ +Setter
+
Allowed file types.
+ + + diff --git a/api/pl.treksoft.kvision.form.upload/-upload-input/blur.html b/api/pl.treksoft.kvision.form.upload/-upload-input/blur.html new file mode 100644 index 00000000..1bf38673 --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload-input/blur.html @@ -0,0 +1,15 @@ + + + +open fun blur(): Unit
+Makes the input element blur.
+ + diff --git a/api/pl.treksoft.kvision.form.upload/-upload-input/browse-on-zone-click.html b/api/pl.treksoft.kvision.form.upload/-upload-input/browse-on-zone-click.html new file mode 100644 index 00000000..6e60de7c --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload-input/browse-on-zone-click.html @@ -0,0 +1,21 @@ + + + +var browseOnZoneClick: Boolean
+Determines if the click on the preview zone opens file browse window.
+Getter
+
Determines if the click on the preview zone opens file browse window.
+ +Setter
+
Determines if the click on the preview zone opens file browse window.
+ + + diff --git a/api/pl.treksoft.kvision.form.upload/-upload-input/cancel.html b/api/pl.treksoft.kvision.form.upload/-upload-input/cancel.html new file mode 100644 index 00000000..808fd4f6 --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload-input/cancel.html @@ -0,0 +1,15 @@ + + + +open fun cancel(): Unit
+Cancel an ongoing ajax upload (only for ajax mode).
+ + diff --git a/api/pl.treksoft.kvision.form.upload/-upload-input/clear-input.html b/api/pl.treksoft.kvision.form.upload/-upload-input/clear-input.html new file mode 100644 index 00000000..a814b493 --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload-input/clear-input.html @@ -0,0 +1,15 @@ + + + +open fun clearInput(): Unit
+Clears the file input control (including the native input).
+ + diff --git a/api/pl.treksoft.kvision.form.upload/-upload-input/disabled.html b/api/pl.treksoft.kvision.form.upload/-upload-input/disabled.html new file mode 100644 index 00000000..17d36121 --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload-input/disabled.html @@ -0,0 +1,22 @@ + + + +open var disabled: Boolean
+Overrides FormInput.disabled
+Determines if the field is disabled.
+Getter
+
Determines if the field is disabled.
+ +Setter
+
Determines if the field is disabled.
+ + + diff --git a/api/pl.treksoft.kvision.form.upload/-upload-input/drop-zone-enabled.html b/api/pl.treksoft.kvision.form.upload/-upload-input/drop-zone-enabled.html new file mode 100644 index 00000000..b8488a76 --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload-input/drop-zone-enabled.html @@ -0,0 +1,21 @@ + + + +var dropZoneEnabled: Boolean
+Determines if Drag&Drop zone is enabled.
+Getter
+
Determines if Drag&Drop zone is enabled.
+ +Setter
+
Determines if Drag&Drop zone is enabled.
+ + + diff --git a/api/pl.treksoft.kvision.form.upload/-upload-input/explorer-theme.html b/api/pl.treksoft.kvision.form.upload/-upload-input/explorer-theme.html new file mode 100644 index 00000000..0b99c0b9 --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload-input/explorer-theme.html @@ -0,0 +1,21 @@ + + + +var explorerTheme: Boolean
+Determines if the explorer theme is used.
+Getter
+
Determines if the explorer theme is used.
+ +Setter
+
Determines if the explorer theme is used.
+ + + diff --git a/api/pl.treksoft.kvision.form.upload/-upload-input/focus.html b/api/pl.treksoft.kvision.form.upload/-upload-input/focus.html new file mode 100644 index 00000000..67e0b9d1 --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload-input/focus.html @@ -0,0 +1,15 @@ + + + +open fun focus(): Unit
+Makes the input element focused.
+ + diff --git a/api/pl.treksoft.kvision.form.upload/-upload-input/get-sn-attrs.html b/api/pl.treksoft.kvision.form.upload/-upload-input/get-sn-attrs.html new file mode 100644 index 00000000..022a8470 --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload-input/get-sn-attrs.html @@ -0,0 +1,18 @@ + + + +protected open fun getSnAttrs(): List<StringPair>
+Overrides Widget.getSnAttrs
+Returns list of element attributes in the form of a List.
+Return
+list of element attributes
protected open fun getSnClass(): List<StringBoolPair>
+Overrides Widget.getSnClass
+Returns list of CSS class names for current widget in the form of a List.
+Return
+list of CSS class names
fun getValueAsString(): String?
+Returns the value of the file input control as a String.
+Return
+value as a String
open class UploadInput : Widget, FormInput
+The file upload component.
+| + + | +
+UploadInput(uploadUrl: String? = null, multiple: Boolean = false, classes: Set<String> = setOf()) |
+
| + + | +
+var allowedFileExtensions: Set<String>?
+Allowed file extensions. + |
+
| + + | +
+var allowedFileTypes: Set<String>?
+Allowed file types. + |
+
| + + | +
+var browseOnZoneClick: Boolean
+Determines if the click on the preview zone opens file browse window. + |
+
| + + | +
+open var disabled: Boolean
+Determines if the field is disabled. + |
+
| + + | +
+var dropZoneEnabled: Boolean
+Determines if Drag&Drop zone is enabled. + |
+
| + + | +
+var explorerTheme: Boolean
+Determines if the explorer theme is used. + |
+
| + + | +
+var multiple: Boolean
+Determines if multiple file upload is supported. + |
+
| + + | +
+open var name: String?
+The name attribute of the generated HTML input element. + |
+
| + + | +
+var preferIconicPreview: Boolean
+Determines if the iconic preview is prefered. + |
+
| + + | +
+var required: Boolean
+Determines if the input selection is required. + |
+
| + + | +
+var showBrowse: Boolean
+Determines if the file browse button is shown. + |
+
| + + | +
+var showCancel: Boolean
+Determines if the cancel button is shown. + |
+
| + + | +
+var showCaption: Boolean
+Determines if the caption is shown. + |
+
| + + | +
+var showPreview: Boolean
+Determines if the preview is shown. + |
+
| + + | +
+var showRemove: Boolean
+Determines if the remove button is shown. + |
+
| + + | +
+var showUpload: Boolean
+Determines if the upload button is shown. + |
+
| + + | +
+open var size: InputSize?
+The size of the input (currently not working) + |
+
| + + | +
+var uploadExtraData: (String, Int) -> dynamic
+The extra data that will be passed as data to the AJAX server call via POST. + |
+
| + + | +
+var uploadUrl: String?
+The optional URL for the upload processing action. +If not set the upload button action will default to form submission. + |
+
| + + | +
+var value: List<File>?
+File input value. + |
+
| + + | +
+var draggable: Boolean?
+Determines if the current widget is draggable. + |
+
| + + | +
+var id: String?
+An ID attribute of generated HTML element. + |
+
| + + | +
+open var parent: Container?
+Parent of the current component. + |
+
| + + | +
+var role: String?
+A role attribute of generated HTML element. + |
+
| + + | +
+var title: String?
+A title attribute of generated HTML element. + |
+
| + + | +
+open var visible: Boolean
+Visibility state of the current component. + |
+
| + + | +
+open fun afterDestroy(): Unit
+Method called after destroying Snabbdom vnode. + |
+
| + + | +
+open fun afterInsert(node: VNode): Unit
+Method called after inserting Snabbdom vnode into the DOM. + |
+
| + + | +
+open fun blur(): Unit
+Makes the input element blur. + |
+
| + + | +
+open fun cancel(): Unit
+Cancel an ongoing ajax upload (only for ajax mode). + |
+
| + + | +
+open fun clearInput(): Unit
+Clears the file input control (including the native input). + |
+
| + + | +
+open fun focus(): Unit
+Makes the input element focused. + |
+
| + + | +
+open fun getSnAttrs(): List<StringPair>
+Returns list of element attributes in the form of a List. + |
+
| + + | +
+open fun getSnClass(): List<StringBoolPair>
+Returns list of CSS class names for current widget in the form of a List. + |
+
| + + | +
+fun getValueAsString(): String?
+Returns the value of the file input control as a String. + |
+
| + + | +
+open fun lock(): Unit
+Locks the file input (disabling all buttons except a cancel button). + |
+
| + + | +
+open fun render(): VNode
+Renders current component as a Snabbdom vnode. + |
+
| + + | +
+open fun resetInput(): Unit
+Resets the file input control. + |
+
| + + | +
+open fun unlock(): Unit
+Unlocks the file input. + |
+
| + + | +
+open fun upload(): Unit
+Trigger ajax upload (only for ajax mode). + |
+
| + + | +
+open fun addCssClass(css: String): Widget
+Adds given value to the set of CSS classes generated in html code of current component. + |
+
| + + | +
+open fun addSurroundingCssClass(css: String): Widget
+Adds given value to the set of CSS classes generated in html code of parent component. + |
+
| + + | +
+open fun afterCreate(node: VNode): Unit
+Method called after creating Snabbdom vnode. + |
+
| + + | +
+open fun afterPostpatch(node: VNode): Unit
+Method called after updating Snabbdom vnode. + |
+
| + + | +
+open fun clearDragDropData(): Unit
+Clears D&D data for the current widget. It also makes it not draggable. + |
+
| + + | +
+open fun getElement(): Node?
+Returns DOM element bound to the current component. + |
+
| + + | +
+open fun getElementJQuery(): JQuery?
+Returns JQuery element bound to the current component. + |
+
| + + | +
+open fun getElementJQueryD(): dynamic
+Returns JQuery element bound to the current component as a dynamic type. + |
+
| + + | +
+open fun getSnHooks(): Hooks?
+Returns list of hooks in the form of a Snabbdom Hooks object. + |
+
| + + | +
+open fun getSnOn(): On?
+Returns list of event handlers in the form of a Snabbdom On object. + |
+
| + + | +
+open fun hide(): Widget
+Makes current widget invisible. + |
+
| + + | +
+open fun removeCssClass(css: String): Widget
+Removes given value from the set of CSS classes generated in html code of current component. + |
+
| + + | +
+open fun removeEventListeners(): Widget
+Removes all event listeners from current widget. + |
+
| + + | +
+open fun removeSurroundingCssClass(css: String): Widget
+Removes given value from the set of CSS classes generated in html code of parent component. + |
+
| + + | +
+open fun render(elementName: String): VNode+ open fun render(elementName: String, children: Array<dynamic>): VNode
+Renders current component as a Snabbdom vnode. + |
+
| + + | +
+open fun setContextMenu(contextMenu: ContextMenu): Widget
+Sets context menu for the current widget. + |
+
| + + | +
+open fun setDragDropData(format: String, data: String): Unit
+Sets D&D data for the current widget. It also makes it draggable. + |
+
| + + | +
+open fun setDropTarget(format: String, callback: (DragEvent) -> Unit): Unit+ open fun setDropTarget(formats: Set<String>? |