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>? = null, callback: (DragEvent) -> Unit): Unit
+Sets the current widget as a D&D drop target. + |
+
+ + | +
+open fun setDropTargetData(format: String, callback: (String?) -> Unit): Unit
+Sets the current widget as a D&D drop target with helper callback accepting String data. + |
+
+ + | +
+open fun <T : Widget> setEventListener(block: SnOn<T>.() -> Unit): Widget
+Sets an event listener for current widget, keeping the actual type of component. +open fun setEventListener(block: SnOn<Widget>.() -> Unit): Widget
+Sets an event listener for current widget. + |
+
+ + | +
+open fun show(): Widget
+Makes current widget visible. + |
+
+ + | +
+open fun toggleVisible(): Widget
+Toggles visibility of current widget. + |
+
+ + | +
+fun Container.uploadInput(uploadUrl: String? = null, multiple: Boolean = false, classes: Set<String> = setOf(), init: UploadInput.() -> Unit = null): UploadInput
+DSL builder extension function. + |
+
open fun lock(): Unit
+Locks the file input (disabling all buttons except a cancel button).
+ + diff --git a/api/pl.treksoft.kvision.form.upload/-upload-input/multiple.html b/api/pl.treksoft.kvision.form.upload/-upload-input/multiple.html new file mode 100644 index 00000000..395dd1b9 --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload-input/multiple.html @@ -0,0 +1,21 @@ + + + +var multiple: Boolean
+Determines if multiple file upload is supported.
+Getter
+
Determines if multiple file upload is supported.
+ +Setter
+
Determines if multiple file upload is supported.
+ + + diff --git a/api/pl.treksoft.kvision.form.upload/-upload-input/name.html b/api/pl.treksoft.kvision.form.upload/-upload-input/name.html new file mode 100644 index 00000000..c173a4dd --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload-input/name.html @@ -0,0 +1,22 @@ + + + +open var name: String?
+Overrides FormInput.name
+The name attribute of the generated HTML input element.
+Getter
+
The name attribute of the generated HTML input element.
+ +Setter
+
The name attribute of the generated HTML input element.
+ + + diff --git a/api/pl.treksoft.kvision.form.upload/-upload-input/prefer-iconic-preview.html b/api/pl.treksoft.kvision.form.upload/-upload-input/prefer-iconic-preview.html new file mode 100644 index 00000000..517a7fc2 --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload-input/prefer-iconic-preview.html @@ -0,0 +1,21 @@ + + + +var preferIconicPreview: Boolean
+Determines if the iconic preview is prefered.
+Getter
+
Determines if the iconic preview is prefered.
+ +Setter
+
Determines if the iconic preview is prefered.
+ + + diff --git a/api/pl.treksoft.kvision.form.upload/-upload-input/render.html b/api/pl.treksoft.kvision.form.upload/-upload-input/render.html new file mode 100644 index 00000000..f02ecef7 --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload-input/render.html @@ -0,0 +1,18 @@ + + + +protected open fun render(): VNode
+Overrides Widget.render
+Renders current component as a Snabbdom vnode.
+Return
+Snabbdom vnode
var required: Boolean
+Determines if the input selection is required.
+Getter
+
Determines if the input selection is required.
+ +Setter
+
Determines if the input selection is required.
+ + + diff --git a/api/pl.treksoft.kvision.form.upload/-upload-input/reset-input.html b/api/pl.treksoft.kvision.form.upload/-upload-input/reset-input.html new file mode 100644 index 00000000..404849de --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload-input/reset-input.html @@ -0,0 +1,15 @@ + + + +open fun resetInput(): Unit
+Resets the file input control.
+ + diff --git a/api/pl.treksoft.kvision.form.upload/-upload-input/show-browse.html b/api/pl.treksoft.kvision.form.upload/-upload-input/show-browse.html new file mode 100644 index 00000000..8deba1ce --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload-input/show-browse.html @@ -0,0 +1,21 @@ + + + +var showBrowse: Boolean
+Determines if the file browse button is shown.
+Getter
+
Determines if the file browse button is shown.
+ +Setter
+
Determines if the file browse button is shown.
+ + + diff --git a/api/pl.treksoft.kvision.form.upload/-upload-input/show-cancel.html b/api/pl.treksoft.kvision.form.upload/-upload-input/show-cancel.html new file mode 100644 index 00000000..96f45595 --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload-input/show-cancel.html @@ -0,0 +1,21 @@ + + + +var showCancel: Boolean
+Determines if the cancel button is shown.
+Getter
+
Determines if the cancel button is shown.
+ +Setter
+
Determines if the cancel button is shown.
+ + + diff --git a/api/pl.treksoft.kvision.form.upload/-upload-input/show-caption.html b/api/pl.treksoft.kvision.form.upload/-upload-input/show-caption.html new file mode 100644 index 00000000..90429bd5 --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload-input/show-caption.html @@ -0,0 +1,21 @@ + + + +var showCaption: Boolean
+Determines if the caption is shown.
+Getter
+
Determines if the caption is shown.
+ +Setter
+
Determines if the caption is shown.
+ + + diff --git a/api/pl.treksoft.kvision.form.upload/-upload-input/show-preview.html b/api/pl.treksoft.kvision.form.upload/-upload-input/show-preview.html new file mode 100644 index 00000000..7025fd2c --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload-input/show-preview.html @@ -0,0 +1,21 @@ + + + +var showPreview: Boolean
+Determines if the preview is shown.
+Getter
+
Determines if the preview is shown.
+ +Setter
+
Determines if the preview is shown.
+ + + diff --git a/api/pl.treksoft.kvision.form.upload/-upload-input/show-remove.html b/api/pl.treksoft.kvision.form.upload/-upload-input/show-remove.html new file mode 100644 index 00000000..1847fbcb --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload-input/show-remove.html @@ -0,0 +1,21 @@ + + + +var showRemove: Boolean
+Determines if the remove button is shown.
+Getter
+
Determines if the remove button is shown.
+ +Setter
+
Determines if the remove button is shown.
+ + + diff --git a/api/pl.treksoft.kvision.form.upload/-upload-input/show-upload.html b/api/pl.treksoft.kvision.form.upload/-upload-input/show-upload.html new file mode 100644 index 00000000..da388c67 --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload-input/show-upload.html @@ -0,0 +1,21 @@ + + + +var showUpload: Boolean
+Determines if the upload button is shown.
+Getter
+
Determines if the upload button is shown.
+ +Setter
+
Determines if the upload button is shown.
+ + + diff --git a/api/pl.treksoft.kvision.form.upload/-upload-input/size.html b/api/pl.treksoft.kvision.form.upload/-upload-input/size.html new file mode 100644 index 00000000..bfac42c8 --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload-input/size.html @@ -0,0 +1,22 @@ + + + +open var size: InputSize?
+Overrides FormInput.size
+The size of the input (currently not working)
+Getter
+
The size of the input (currently not working)
+ +Setter
+
The size of the input (currently not working)
+ + + diff --git a/api/pl.treksoft.kvision.form.upload/-upload-input/unlock.html b/api/pl.treksoft.kvision.form.upload/-upload-input/unlock.html new file mode 100644 index 00000000..511efc6c --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload-input/unlock.html @@ -0,0 +1,15 @@ + + + +open fun unlock(): Unit
+Unlocks the file input.
+ + diff --git a/api/pl.treksoft.kvision.form.upload/-upload-input/upload-extra-data.html b/api/pl.treksoft.kvision.form.upload/-upload-input/upload-extra-data.html new file mode 100644 index 00000000..5b033440 --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload-input/upload-extra-data.html @@ -0,0 +1,21 @@ + + + +var uploadExtraData: (String, Int) -> dynamic
+The extra data that will be passed as data to the AJAX server call via POST.
+Getter
+
The extra data that will be passed as data to the AJAX server call via POST.
+ +Setter
+
The extra data that will be passed as data to the AJAX server call via POST.
+ + + diff --git a/api/pl.treksoft.kvision.form.upload/-upload-input/upload-input.html b/api/pl.treksoft.kvision.form.upload/-upload-input/upload-input.html new file mode 100644 index 00000000..c5711044 --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload-input/upload-input.html @@ -0,0 +1,16 @@ + + + +fun Container.uploadInput(uploadUrl: String? = null, multiple: Boolean = false, classes: Set<String> = setOf(), init: UploadInput.() -> Unit = null): UploadInput
+DSL builder extension function.
+It takes the same parameters as the constructor of the built component.
+ + diff --git a/api/pl.treksoft.kvision.form.upload/-upload-input/upload-url.html b/api/pl.treksoft.kvision.form.upload/-upload-input/upload-url.html new file mode 100644 index 00000000..1f1ef5bb --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload-input/upload-url.html @@ -0,0 +1,24 @@ + + + +var uploadUrl: String?
+The optional URL for the upload processing action. +If not set the upload button action will default to form submission.
+Getter
+
The optional URL for the upload processing action. +If not set the upload button action will default to form submission.
+ +Setter
+
The optional URL for the upload processing action. +If not set the upload button action will default to form submission.
+ + + diff --git a/api/pl.treksoft.kvision.form.upload/-upload-input/upload.html b/api/pl.treksoft.kvision.form.upload/-upload-input/upload.html new file mode 100644 index 00000000..0cbcaa23 --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload-input/upload.html @@ -0,0 +1,15 @@ + + + +open fun upload(): Unit
+Trigger ajax upload (only for ajax mode).
+ + diff --git a/api/pl.treksoft.kvision.form.upload/-upload-input/value.html b/api/pl.treksoft.kvision.form.upload/-upload-input/value.html new file mode 100644 index 00000000..a740df1a --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload-input/value.html @@ -0,0 +1,15 @@ + + + +var value: List<File>?
+File input value.
+ + diff --git a/api/pl.treksoft.kvision.form.upload/-upload/-init-.html b/api/pl.treksoft.kvision.form.upload/-upload/-init-.html new file mode 100644 index 00000000..bec7108c --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload/-init-.html @@ -0,0 +1,25 @@ + + + +Upload(uploadUrl: String? = null, multiple: Boolean = false, label: String? = null, rich: Boolean = false)
+
+uploadUrl
- the optional URL for the upload processing action
+multiple
- determines if multiple file upload is supported
+label
- label text bound to the input element
+rich
- determines if label can contain HTML code
Constructor
+
var allowedFileExtensions: Set<String>?
+Allowed file extensions.
+ + diff --git a/api/pl.treksoft.kvision.form.upload/-upload/allowed-file-types.html b/api/pl.treksoft.kvision.form.upload/-upload/allowed-file-types.html new file mode 100644 index 00000000..12c4dfb1 --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload/allowed-file-types.html @@ -0,0 +1,15 @@ + + + +var allowedFileTypes: Set<String>?
+Allowed file types.
+ + diff --git a/api/pl.treksoft.kvision.form.upload/-upload/blur.html b/api/pl.treksoft.kvision.form.upload/-upload/blur.html new file mode 100644 index 00000000..c7ba847d --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload/blur.html @@ -0,0 +1,16 @@ + + + +open fun blur(): Unit
+Overrides FormControl.blur
+Makes the input element blur.
+ + diff --git a/api/pl.treksoft.kvision.form.upload/-upload/browse-on-zone-click.html b/api/pl.treksoft.kvision.form.upload/-upload/browse-on-zone-click.html new file mode 100644 index 00000000..1873f506 --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload/browse-on-zone-click.html @@ -0,0 +1,15 @@ + + + +var browseOnZoneClick: Boolean
+Determines if the click on the preview zone opens file browse window.
+ + diff --git a/api/pl.treksoft.kvision.form.upload/-upload/cancel.html b/api/pl.treksoft.kvision.form.upload/-upload/cancel.html new file mode 100644 index 00000000..a82213e1 --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload/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/clear-input.html b/api/pl.treksoft.kvision.form.upload/-upload/clear-input.html new file mode 100644 index 00000000..4955cd4a --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload/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/drop-zone-enabled.html b/api/pl.treksoft.kvision.form.upload/-upload/drop-zone-enabled.html new file mode 100644 index 00000000..b7cee858 --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload/drop-zone-enabled.html @@ -0,0 +1,15 @@ + + + +var dropZoneEnabled: Boolean
+Determines if Drag&Drop zone is enabled.
+ + diff --git a/api/pl.treksoft.kvision.form.upload/-upload/explorer-theme.html b/api/pl.treksoft.kvision.form.upload/-upload/explorer-theme.html new file mode 100644 index 00000000..8527ed91 --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload/explorer-theme.html @@ -0,0 +1,15 @@ + + + +var explorerTheme: Boolean
+Determines if the explorer theme is used.
+ + diff --git a/api/pl.treksoft.kvision.form.upload/-upload/flabel.html b/api/pl.treksoft.kvision.form.upload/-upload/flabel.html new file mode 100644 index 00000000..fccd517f --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload/flabel.html @@ -0,0 +1,16 @@ + + + +val flabel: FieldLabel
+Overrides FormControl.flabel
+Form field label.
+ + diff --git a/api/pl.treksoft.kvision.form.upload/-upload/focus.html b/api/pl.treksoft.kvision.form.upload/-upload/focus.html new file mode 100644 index 00000000..573c4456 --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload/focus.html @@ -0,0 +1,16 @@ + + + +open fun focus(): Unit
+Overrides FormControl.focus
+Makes the input element focused.
+ + diff --git a/api/pl.treksoft.kvision.form.upload/-upload/get-sn-class.html b/api/pl.treksoft.kvision.form.upload/-upload/get-sn-class.html new file mode 100644 index 00000000..e4baedc4 --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload/get-sn-class.html @@ -0,0 +1,18 @@ + + + +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
open fun getValueAsString(): String?
+Overrides FilesFormControl.getValueAsString
+Returns the value of the control as a String.
+ + diff --git a/api/pl.treksoft.kvision.form.upload/-upload/idc.html b/api/pl.treksoft.kvision.form.upload/-upload/idc.html new file mode 100644 index 00000000..a8f3d7ed --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload/idc.html @@ -0,0 +1,14 @@ + + + +protected val idc: String
+
+
diff --git a/api/pl.treksoft.kvision.form.upload/-upload/index.html b/api/pl.treksoft.kvision.form.upload/-upload/index.html
new file mode 100644
index 00000000..157d652a
--- /dev/null
+++ b/api/pl.treksoft.kvision.form.upload/-upload/index.html
@@ -0,0 +1,461 @@
+
+
+
+open class Upload : SimplePanel, FilesFormControl
+The form field file upload component.
++ + | +
+Upload(uploadUrl: String? = null, multiple: Boolean = false, label: String? = null, rich: Boolean = false) |
+
+ + | +
+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. + |
+
+ + | +
+var dropZoneEnabled: Boolean
+Determines if Drag&Drop zone is enabled. + |
+
+ + | +
+var explorerTheme: Boolean
+Determines if the explorer theme is used. + |
+
+ + | +
+val flabel: FieldLabel
+Form field label. + |
+
+ + | +
+val idc: String |
+
+ + | +
+val input: UploadInput
+The actual input component. + |
+
+ + | +
+var label: String?
+The label text bound to the spinner input element. + |
+
+ + | +
+var multiple: Boolean
+Determines if multiple file upload is supported. + |
+
+ + | +
+var preferIconicPreview: Boolean
+Determines if the iconic preview is prefered. + |
+
+ + | +
+var required: Boolean
+Determines if the input selection is required. + |
+
+ + | +
+var rich: Boolean
+Determines if label can contain HTML code. + |
+
+ + | +
+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. + |
+
+ + | +
+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. + |
+
+ + | +
+val validationInfo: HelpBlock
+Validation info component. + |
+
+ + | +
+open var value: List<File>?
+File input value. + |
+
+ + | +
+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 getSnClass(): List<StringBoolPair>
+Returns list of CSS class names for current widget in the form of a List. + |
+
+ + | +
+open fun getValueAsString(): String?
+Returns the value of the control as a String. + |
+
+ + | +
+open fun lock(): Unit
+Locks the file input (disabling all buttons except a cancel button). + |
+
+ + | +
+open fun removeEventListeners(): Widget
+Removes all event listeners from current widget. + |
+
+ + | +
+open fun resetInput(): Unit
+Resets the file input control. + |
+
+ + | +
+open fun <T : Widget> setEventListener(block: SnOn<T>.() -> Unit): Widget
+Sets an event listener for current widget, keeping the actual type of component. +open fun setEventListener(block: SnOn<Widget>.() -> Unit): Widget
+Sets an event listener for current widget. + |
+
+ + | +
+open fun unlock(): Unit
+Unlocks the file input. + |
+
+ + | +
+open fun upload(): Unit
+Trigger ajax upload (only for ajax mode). + |
+
+ + | +
+open fun add(child: Component): SimplePanel
+Adds given component to the current container. + |
+
+ + | +
+open fun addAll(children: List<Component>): SimplePanel
+Adds a list of components to the current container. + |
+
+ + | +
+fun addInternal(child: Component): SimplePanel
+Protected and final method to add given component to the current container. + |
+
+ + | +
+open fun childrenVNodes(): Array<VNode>
+Returns the array of the children Snabbdom vnodes. + |
+
+ + | +
+open fun getChildren(): List<Component>
+Returns a list of children of the current container. + |
+
+ + | +
+open fun getValue(): List<File>?
+Returns the value of the control. + |
+
+ + | +
+open fun remove(child: Component): SimplePanel
+Removes given component from the current container. + |
+
+ + | +
+open fun removeAll(): SimplePanel
+Removes all children from the current container. + |
+
+ + | +
+open fun render(): VNode
+Renders current component as a Snabbdom vnode. + |
+
+ + | +
+open fun setValue(v: Any?): Unit
+Sets the value of the control. + |
+
+ + | +
+fun Container.upload(uploadUrl: String? = null, multiple: Boolean = false, label: String? = null, rich: Boolean = false, init: Upload.() -> Unit = null): Upload
+DSL builder extension function. + |
+
val input: UploadInput
+Overrides FormControl.input
+The actual input component.
+ + diff --git a/api/pl.treksoft.kvision.form.upload/-upload/label.html b/api/pl.treksoft.kvision.form.upload/-upload/label.html new file mode 100644 index 00000000..d1851263 --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload/label.html @@ -0,0 +1,15 @@ + + + +var label: String?
+The label text bound to the spinner input element.
+ + diff --git a/api/pl.treksoft.kvision.form.upload/-upload/lock.html b/api/pl.treksoft.kvision.form.upload/-upload/lock.html new file mode 100644 index 00000000..33cf8bd6 --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload/lock.html @@ -0,0 +1,15 @@ + + + +open fun lock(): Unit
+Locks the file input (disabling all buttons except a cancel button).
+ + diff --git a/api/pl.treksoft.kvision.form.upload/-upload/multiple.html b/api/pl.treksoft.kvision.form.upload/-upload/multiple.html new file mode 100644 index 00000000..aa51660c --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload/multiple.html @@ -0,0 +1,15 @@ + + + +var multiple: Boolean
+Determines if multiple file upload is supported.
+ + diff --git a/api/pl.treksoft.kvision.form.upload/-upload/prefer-iconic-preview.html b/api/pl.treksoft.kvision.form.upload/-upload/prefer-iconic-preview.html new file mode 100644 index 00000000..71e715bb --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload/prefer-iconic-preview.html @@ -0,0 +1,15 @@ + + + +var preferIconicPreview: Boolean
+Determines if the iconic preview is prefered.
+ + diff --git a/api/pl.treksoft.kvision.form.upload/-upload/remove-event-listeners.html b/api/pl.treksoft.kvision.form.upload/-upload/remove-event-listeners.html new file mode 100644 index 00000000..804b2aa2 --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload/remove-event-listeners.html @@ -0,0 +1,18 @@ + + + +open fun removeEventListeners(): Widget
+Overrides Widget.removeEventListeners
+Removes all event listeners from current widget.
+Return
+current widget
var required: Boolean
+Determines if the input selection is required.
+ + diff --git a/api/pl.treksoft.kvision.form.upload/-upload/reset-input.html b/api/pl.treksoft.kvision.form.upload/-upload/reset-input.html new file mode 100644 index 00000000..00f1e2f8 --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload/reset-input.html @@ -0,0 +1,15 @@ + + + +open fun resetInput(): Unit
+Resets the file input control.
+ + diff --git a/api/pl.treksoft.kvision.form.upload/-upload/rich.html b/api/pl.treksoft.kvision.form.upload/-upload/rich.html new file mode 100644 index 00000000..1ae8819e --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload/rich.html @@ -0,0 +1,15 @@ + + + +var rich: Boolean
+Determines if label can contain HTML code.
+ + diff --git a/api/pl.treksoft.kvision.form.upload/-upload/set-event-listener.html b/api/pl.treksoft.kvision.form.upload/-upload/set-event-listener.html new file mode 100644 index 00000000..1e133847 --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload/set-event-listener.html @@ -0,0 +1,54 @@ + + + +open fun <T : Widget> setEventListener(block: SnOn<T>.() -> Unit): Widget
+Overrides Widget.setEventListener
+Sets an event listener for current widget, keeping the actual type of component.
+Return
+
current widget
+ + +Example:
+ + + button.setEventListener<Button> {
+ dblclick = {
+ Alert.show("Button double clicked!")
+ // self is of type Button here
+ }
+ }
+
+open fun setEventListener(block: SnOn<Widget>.() -> Unit): Widget
+Overrides Widget.setEventListener
+Sets an event listener for current widget.
+Return
+
current widget
+ + +Example:
+ + + button.setEventListener {
+ dblclick = {
+ Alert.show("Button double clicked!")
+ // self is of type Widget here
+ }
+ }
+
+
diff --git a/api/pl.treksoft.kvision.form.upload/-upload/show-browse.html b/api/pl.treksoft.kvision.form.upload/-upload/show-browse.html
new file mode 100644
index 00000000..356f8cc3
--- /dev/null
+++ b/api/pl.treksoft.kvision.form.upload/-upload/show-browse.html
@@ -0,0 +1,15 @@
+
+
+
+var showBrowse: Boolean
+Determines if the file browse button is shown.
+ + diff --git a/api/pl.treksoft.kvision.form.upload/-upload/show-cancel.html b/api/pl.treksoft.kvision.form.upload/-upload/show-cancel.html new file mode 100644 index 00000000..6784c5e2 --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload/show-cancel.html @@ -0,0 +1,15 @@ + + + +var showCancel: Boolean
+Determines if the cancel button is shown.
+ + diff --git a/api/pl.treksoft.kvision.form.upload/-upload/show-caption.html b/api/pl.treksoft.kvision.form.upload/-upload/show-caption.html new file mode 100644 index 00000000..6a61f972 --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload/show-caption.html @@ -0,0 +1,15 @@ + + + +var showCaption: Boolean
+Determines if the caption is shown.
+ + diff --git a/api/pl.treksoft.kvision.form.upload/-upload/show-preview.html b/api/pl.treksoft.kvision.form.upload/-upload/show-preview.html new file mode 100644 index 00000000..04327037 --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload/show-preview.html @@ -0,0 +1,15 @@ + + + +var showPreview: Boolean
+Determines if the preview is shown.
+ + diff --git a/api/pl.treksoft.kvision.form.upload/-upload/show-remove.html b/api/pl.treksoft.kvision.form.upload/-upload/show-remove.html new file mode 100644 index 00000000..75d29416 --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload/show-remove.html @@ -0,0 +1,15 @@ + + + +var showRemove: Boolean
+Determines if the remove button is shown.
+ + diff --git a/api/pl.treksoft.kvision.form.upload/-upload/show-upload.html b/api/pl.treksoft.kvision.form.upload/-upload/show-upload.html new file mode 100644 index 00000000..34898831 --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload/show-upload.html @@ -0,0 +1,15 @@ + + + +var showUpload: Boolean
+Determines if the upload button is shown.
+ + diff --git a/api/pl.treksoft.kvision.form.upload/-upload/unlock.html b/api/pl.treksoft.kvision.form.upload/-upload/unlock.html new file mode 100644 index 00000000..9054c6fe --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload/unlock.html @@ -0,0 +1,15 @@ + + + +open fun unlock(): Unit
+Unlocks the file input.
+ + diff --git a/api/pl.treksoft.kvision.form.upload/-upload/upload-extra-data.html b/api/pl.treksoft.kvision.form.upload/-upload/upload-extra-data.html new file mode 100644 index 00000000..2f161eb2 --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload/upload-extra-data.html @@ -0,0 +1,15 @@ + + + +var uploadExtraData: (String, Int) -> dynamic
+The extra data that will be passed as data to the AJAX server call via POST.
+ + diff --git a/api/pl.treksoft.kvision.form.upload/-upload/upload-url.html b/api/pl.treksoft.kvision.form.upload/-upload/upload-url.html new file mode 100644 index 00000000..4dc61eb3 --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload/upload-url.html @@ -0,0 +1,16 @@ + + + +var uploadUrl: String?
+The optional URL for the upload processing action. +If not set the upload button action will default to form submission.
+ + diff --git a/api/pl.treksoft.kvision.form.upload/-upload/upload.html b/api/pl.treksoft.kvision.form.upload/-upload/upload.html new file mode 100644 index 00000000..b81d1c6c --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload/upload.html @@ -0,0 +1,19 @@ + + + +open fun upload(): Unit
+Trigger ajax upload (only for ajax mode).
+ +fun Container.upload(uploadUrl: String? = null, multiple: Boolean = false, label: String? = null, rich: Boolean = false, init: Upload.() -> Unit = null): Upload
+DSL builder extension function.
+It takes the same parameters as the constructor of the built component.
+ + diff --git a/api/pl.treksoft.kvision.form.upload/-upload/validation-info.html b/api/pl.treksoft.kvision.form.upload/-upload/validation-info.html new file mode 100644 index 00000000..c66192ee --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload/validation-info.html @@ -0,0 +1,16 @@ + + + +val validationInfo: HelpBlock
+Overrides FormControl.validationInfo
+Validation info component.
+ + diff --git a/api/pl.treksoft.kvision.form.upload/-upload/value.html b/api/pl.treksoft.kvision.form.upload/-upload/value.html new file mode 100644 index 00000000..30d1105f --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/-upload/value.html @@ -0,0 +1,16 @@ + + + +open var value: List<File>?
+Overrides FilesFormControl.value
+File input value.
+ + diff --git a/api/pl.treksoft.kvision.form.upload/index.html b/api/pl.treksoft.kvision.form.upload/index.html new file mode 100644 index 00000000..bb4120a9 --- /dev/null +++ b/api/pl.treksoft.kvision.form.upload/index.html @@ -0,0 +1,36 @@ + + + +Full-featured file upload component with drag & drop, preview and AJAX upload mode.
++ + | +
+open class Upload : SimplePanel, FilesFormControl
+The form field file upload component. + |
+
+ + | +
+open class UploadInput : Widget, FormInput
+The file upload component. + |
+