Members

(constant) maxGap :number

Maximum allowed gap in rem units.

Type:
  • number

(constant) maxMargin :number

Maximum allowed margin in rem units.

Type:
  • number

(constant) maxPadding :number

Maximum allowed padding in rem units.

Type:
  • number

Methods

checkCssSupport() → {boolean}

Checks whether the current browser version sipports a CSS feature.

Returns:

True if the browser supports the feature, otherwise returns false.

Type: 
boolean

formatOptionsString(optionItemsString) → {Array.<object>}

Formats the options string into an array of option objects.

Parameters:
NameTypeDescription
optionItemsStringAny

The option items to be formatted.For example, text1|value1

Returns:

The formatted options array.

Type: 
Array.<object>

generateGapStyles() → {string}

Generates CSS styles for gap classes.

Returns:
  • The generated CSS styles for gap.
Type: 
string

generateMarginStyles() → {string}

Generates CSS styles for margin classes.

Returns:
  • The generated CSS styles for margin.
Type: 
string

generateOptionsString(optionItemsString, errorCallback, componentName) → {Array.<object>}

Formats the options string into an array of option objects.

Parameters:
NameTypeDescription
optionItemsStringAny

The option items to be formatted.For example, text1|value1

errorCallbackFunc

The error handling function.

componentNameString

The name of the target component.

Returns:

The formatted options array.

Type: 
Array.<object>

generatePaddingStyles() → {string}

Generates CSS styles for padding classes.

Returns:
  • The generated CSS styles for padding.
Type: 
string

getDecimalPlaces(num) → {number}

Counts the number of decimal places in a given number.

Parameters:
NameTypeDescription
numnumber

The number to be evaluated. For example, 123.456.

Returns:

The number of decimal places. Returns 0 if there are no decimal places.

Type: 
number
Examples
// Returns 3
getDecimalPlaces(123.456);
// Returns 6
getDecimalPlaces(123.456789);
// Returns 0
getDecimalPlaces(123);

initDynamicOptions(optionItems, optionsConfig, successCallback) → {Array.<object>}

dynamicOptions function to get options based on the configuration. If the mode is 'fixed', it formats the provided optionItems string. Otherwise, it retrieves the options from a variable path.

Parameters:
NameTypeDescription
optionItemsAny

The option items to be formatted.For example, text1|value1

optionsConfigobject

The configuration for dynamic options.

successCallbackFunc

The success handling function.

Returns:

The formatted options array.

Type: 
Array.<object>

(async) monitorControllerState(value)

Monitors and triggers the controller state event.

Parameters:
NameTypeDescription
valuestring

The controller state to set.

(async) monitorExecutionState(value)

Monitors and triggers the execution state event.

Parameters:
NameTypeDescription
valuestring

The execution state to set.

(async) monitorOpMode(value)

Monitors and triggers the operation mode event.

Parameters:
NameTypeDescription
valuestring

The operation mode to set.