Classes for formatting and parsing quantity values.


Name Description  
BaseUnitFormattingSettingsProvider This abstract class reacts to changes in the "active" iModel and updates the QuantityFormatter overrides and active  
LocalUnitFormatProvider Implementation of BaseUnitFormattingSettingsProvider that stores and retrieves data in local storage.  
QuantityFormatter Class that supports formatting quantity values into strings and parsing strings into quantity values.  


Name Description  
UNIT_EXTRA_DATA Additional unit data such alternate display label not found in the Units Schema  


Name Description  
QuantityType Defines standard format types for tools that need to display measurements to user.  

Global Functions

Name Description  
getQuantityTypeKey Function to return a QuantityTypeKey given either a QuantityType enum value or a string.  
isCheckboxFormatPropEditorSpec CheckboxFormatPropEditorSpec type guard.  
isCustomQuantityTypeDefinition CustomQuantityTypeDefinition type guard.  
isTextInputFormatPropEditorSpec TextInputFormatPropEditorSpec type guard.  
isTextSelectFormatPropEditorSpec TextSelectFormatPropEditorSpec type guard.  


Name Description  
CheckboxFormatPropEditorSpec CheckboxFormatPropEditorSpec defines getter and setter method for a boolean property editor.  
CustomFormatPropEditorSpec Properties that define an EditorSpec for editing a custom formatting property that is stored in the "custom" property in the FormatProps.  
CustomQuantityTypeDefinition CustomQuantityTypeDefinition interface is used to define a Custom quantity type that can be registered with the QuantityFormatter.  
FormatterParserSpecsProvider Interface that defines the functions required to be implemented to provide custom formatting and parsing of a custom quantity type.  
FormattingUnitSystemChangedArgs Arguments sent to FormattingUnitSystemChanged event listeners.  
OverrideFormatEntry Override format entries can define formats for any of the different unit systems.  
QuantityFormatOverridesChangedArgs Arguments sent to UnitFormattingSettingsProvider when overrides are changed.  
QuantityFormatsChangedArgs Arguments sent to QuantityFormatsChanged event listeners.  
QuantityTypeDefinition This interface supplies the definition of a standard quantity type that is registered with the QuantityFormatter.  
TextInputFormatPropEditorSpec TextInputFormatPropEditorSpec defines getter and setter method for a text input property editor.  
TextSelectFormatPropEditorSpec TextSelectFormatPropEditorSpec defines getter and setter method for a Select/Dropdown property editor.  
UnitFormattingSettingsProvider The UnitFormattingSettingsProvider interface is used to store and retrieve override FormatProps and Presentation Unit System  

Type Aliases

Name Description  
QuantityTypeArg Used to uniquely identify the type or quantity.  
QuantityTypeKey String used to uniquely identify a QuantityType in the quantity registry.  
UnitNameKey String used to uniquely identify a UnitProp.  

Last Updated: 21 June, 2024