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?, classes: Set<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>, classes: Set<String>, init: Progress<T>.() -> Unit?) : SimplePanel
The Bootstrap progress
ProgressBarTag
Link copied to clipboard
abstract class ProgressBarTag<T>(classes: Set<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>, classes: Set<String> = setOf(), init: Progress<T>.() -> Unit? = null): Progress<T>
DSL builder extension function.
fun <T, S> Container.progress(state: ObservableState<S>, bounds: Bounds<T>, classes: Set<String> = setOf(), init: Progress<T>.(S) -> Unit): Progress<T>
DSL builder extension function for observable state.
fun Container.progress(min: Number = 0, max: Number = 100, classes: Set<String> = setOf(), init: Progress<Number>.() -> Unit? = null): Progress<Number>
DSL builder extension function.
fun <S> Container.progress(state: ObservableState<S>, min: Number = 0, max: Number = 100, classes: Set<String> = setOf(), init: Progress<Number>.(S) -> Unit): Progress<Number>
DSL builder extension function for observable state.
progressNumeric
Link copied to clipboard
fun Progress<out Number>.progressNumeric(initialValue: Number = 0, contentGenerator: ContentGenerator<Number> = ContentGenerator { _, _, _ -> }, bgColor: BsBgColor? = null, classes: Set<String> = setOf(), init: NumberProgressBarTag.() -> Unit? = null): NumberProgressBarTag