Usage
Signature:
interface ProgressElement
Typescript Import Format
//To typecheck the element APIs, import as below.
import { ProgressElement } from "ojs/ojprogress";
//For the transpiled javascript to load the element's module, import as below
import "ojs/ojprogress";
For additional information visit:
Note: Application logic should not interact with the component's properties or invoke its methods until the BusyContext indicates that the component is ready for interaction.
Styling Classes
-
.oj-progress-bar-embedded
-
Optional class that can be set on a oj-progress bar element to style an embedded progress bar within a web application or dialog.
Example
<div class='oj-web-applayout-page'> <header class='oj-web-applayout-header'> < <oj-progress class='oj-progress-bar-embedded' value='{{loadingValue}}'> </oj-progress> </div>
-
.oj-progress-bar-end-label
-
Optional class that can be set on a div after the oj-progress element. This div contains the end text to display underneath the oj-progress bar.
Example
<div class='oj-web-applayout-page'> <header class='oj-web-applayout-header'> < <oj-progress class='oj-progress-bar-embedded' value='{{loadingValue}}'> <div class='oj-progress-bar-start-label'>0% </div> <div class='oj-progress-bar-end-label'>100% </div> </oj-progress> </div>
-
.oj-progress-bar-start-label
-
Optional class that can be set on a div after the oj-progress element. This div contains the start text to display underneath the oj-progress bar.
Example
<div class='oj-web-applayout-page'> <header class='oj-web-applayout-header'> < <oj-progress class='oj-progress-bar-embedded' value='{{loadingValue}}'> <div class='oj-progress-bar-start-label'>0% </div> <div class='oj-progress-bar-end-label'>100% </div> </oj-progress> </div>
Slots
JET components that allow child content support slots. Please see the slots section of the JET component overview doc for more information on allowed slot content and slot types.
Attributes
-
max :number
-
The maximum allowed value. The element's max attribute is used if it is provided, otherwise the default value of 100 is used.
- Default Value:
100
Names
Item Name Property max
Property change event maxChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-max-changed
-
translations :object|null
-
A collection of translated resources from the translation bundle, or
null
if this component has no resources. Resources may be accessed and overridden individually or collectively, as seen in the examples.If the component does not contain any translatable resource, the default value of this attribute will be
null
. If not, an object containing all resources relevant to the component.If this component has translations, their documentation immediately follows this doc entry.
Names
Item Name Property translations
Property change event translationsChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-translations-changed
-
translations.aria-indeterminate-progress-text :string
-
Accessible text read by a screen reader while an indeterminate oj-progress is in progress.
See the translations attribute for usage examples.
- Default Value:
"In Progress"
- Since:
- 4.0.0
Names
Item Name Property translations.ariaIndeterminateProgressText
-
type :"bar"|"circle"
-
The shape of the Progress.
- Default Value:
"bar"
- Since:
- 3.0
Supported Values:
Value Description bar
displays progress in a rectangular horizontal meter circle
displays progress in a circular meter Names
Item Name Property type
Property change event typeChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-type-changed
-
value :number
-
The value of the Progress. The element's value attribute is used if it is provided, otherwise the default value of 0 is used. For indeterminate Progress, set value to -1.
- Default Value:
0
- Supports writeback:
true
Names
Item Name Property value
Property change event valueChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-value-changed
Methods
-
getProperty(property) : {any}
-
Retrieves the value of a property or a subproperty. The return type will be the same as the type of the property as specified in this API document. If the method is invoked with an incorrect property/subproperty name, it returns undefined.
Parameters:
Name Type Description property
string The property name to get. Supports dot notation for subproperty access. - Since:
- 4.0.0
Returns:
- Type
- any
Example
let subpropValue = myComponent.getProperty('complexProperty.subProperty1.subProperty2');
-
refresh : {void}
-
Refreshes the component.
Returns:
- Type
- void
-
setProperties(properties) : {void}
-
Performs a batch set of properties. The type of value for each property being set must match the type of the property as specified in this API document.
Parameters:
Name Type Description properties
Object An object containing the property and value pairs to set. - Since:
- 4.0.0
Returns:
- Type
- void
Example
myComponent.setProperties({"prop1": "value1", "prop2.subprop": "value2", "prop3": "value3"});
-
setProperty(property, value) : {void}
-
Sets a property or a subproperty (of a complex property) and notifies the component of the change, triggering a [property]Changed event. The value should be of the same type as the type of the attribute mentioned in this API document.
Parameters:
Name Type Description property
string The property name to set. Supports dot notation for subproperty access. value
any The new value to set the property to. - Since:
- 4.0.0
Returns:
- Type
- void
Example
myComponent.setProperty('complexProperty.subProperty1.subProperty2', "someValue");