Package io.kvision.progress

Bootstrap progress bar component.

Types

Bounds
Link copied to clipboard
data class Bounds<T>(min: T, max: T)
Generic progress bounds.
ContentGenerator
Link copied to clipboard
fun fun interface ContentGenerator<T>
Generic interface for progress content generator.
FormatFractionContentGenerator
Link copied to clipboard
class FormatFractionContentGenerator(numberFormat: Intl.NumberFormat) : ContentGenerator<Number>
Uses a Intl.NumberFormat to format the fraction of a value within bounds.
FormatNumberValueContentGenerator
Link copied to clipboard
class FormatNumberValueContentGenerator(numberFormat: Intl.NumberFormat) : ContentGenerator<Number>
Uses a Intl.NumberFormat to format a value.
NumberProgressBarTag
Link copied to clipboard
class NumberProgressBarTag(progress: Progress<out Number>, initialValue: Number, contentGenerator: ContentGenerator<Number>, bgColor: BsBgColor?, className: String?, init: NumberProgressBarTag.() -> Unit?) : ProgressBarTag<Number>
An implementation of the @see ProgressBarTag, which works with plain old numbers
Progress
Link copied to clipboard
class Progress<T>(bounds: Bounds<T>, className: String?, init: Progress<T>.() -> Unit?) : SimplePanel
The Bootstrap progress
ProgressBarTag
Link copied to clipboard
abstract class ProgressBarTag<T>(className: String?, bgColor: BsBgColor?) : Div
A base class for the progress bar tag.

Functions

fraction
Link copied to clipboard
fun Bounds<out Number>.fraction(value: Double): Double
Calculate fraction for the given value and bounds.
progress
Link copied to clipboard
fun <T> Container.progress(bounds: Bounds<T>, className: String? = null, init: Progress<T>.() -> Unit? = null): Progress<T>
DSL builder extension function.
fun Container.progress(min: Number = 0, max: Number = 100, className: String? = null, init: Progress<Number>.() -> Unit? = null): Progress<Number>
DSL builder extension function.
progressNumeric
Link copied to clipboard
fun Progress<out Number>.progressNumeric(initialValue: Number = 0, contentGenerator: ContentGenerator<Number> = ContentGenerator { _, _, _ -> }, bgColor: BsBgColor? = null, className: String? = null, init: NumberProgressBarTag.() -> Unit? = null): NumberProgressBarTag