Skip to content

@serenity-is/corelib / AutoNumericOptions

Interface: AutoNumericOptions

Defined in: src/ui/editors/autonumeric.ts:23

Options controlling AutoNumeric formatting, parsing and display behavior.

Properties

aDec?

optional aDec: string

Defined in: src/ui/editors/autonumeric.ts:29

allowed decimal separator characters period "full stop" = '.' comma = ','

Default

'.'

aForm?

optional aForm: boolean

Defined in: src/ui/editors/autonumeric.ts:45

determine if the default value will be formatted on page ready. true = automatically formats the default value on page ready false = will not format the default value

Default

true

altDec?

optional altDec: string

Defined in: src/ui/editors/autonumeric.ts:39

allow to declare alternative decimal separator which is automatically replaced by aDec developed for countries the use a comma ',' as the decimal character and have keyboards\numeric pads that have a period 'full stop' as the decimal characters (Spain is an example)

Default

null

aNum?

optional aNum: string

Defined in: src/ui/editors/autonumeric.ts:50

allowed numeric values please do not modify

Default

'0123456789'

aPad?

optional aPad: boolean

Defined in: src/ui/editors/autonumeric.ts:77

controls decimal padding aPad: true - always Pad decimals with zeros aPad: false - does not pad with zeros. aPad: some number - pad decimals with zero to number different from mDec thanks to Jonas Johansson for the suggestion

Default

true

aSep?

optional aSep: string

Defined in: src/ui/editors/autonumeric.ts:64

allowed thousand separator characters comma = ',' period "full stop" = '.' apostrophe is escaped = ''' space = ' ' none = '' NOTE: do not use numeric characters

Default

','

aSign?

optional aSign: string

Defined in: src/ui/editors/autonumeric.ts:69

allowed currency symbol Must be in quotes aSign: '\(', a space is allowed aSign: '\) '

Default

''

dGroup?

optional dGroup: string

Defined in: src/ui/editors/autonumeric.ts:84

digital grouping for the thousand separator used in Format dGroup: '2', results in 99,99,99,999 common in India for values less than 1 billion and greater than -1 billion dGroup: '3', results in 999,999,999 default dGroup: '4', results in 9999,9999,9999 used in some Asian countries

Default

'3'

lZero?

optional lZero: string

Defined in: src/ui/editors/autonumeric.ts:93

controls leading zero behavior lZero: 'allow', - allows leading zeros to be entered. Zeros will be truncated when entering additional digits. On focusout zeros will be deleted. lZero: 'deny', - allows only one leading zero on values less than one lZero: 'keep', - allows leading zeros to be entered. on fousout zeros will be retained.

Default

'allow'

mDec?

optional mDec: number

Defined in: src/ui/editors/autonumeric.ts:99

max number of decimal places = used to override decimal places set by the vMin & vMax values value must be enclosed in quotes example mDec: '3', This can also set the value via a call back function mDec: 'css:#

Default

null

mRound?

optional mRound: string

Defined in: src/ui/editors/autonumeric.ts:114

method used for rounding mRound: 'S', Round-Half-Up Symmetric (default) mRound: 'A', Round-Half-Up Asymmetric mRound: 's', Round-Half-Down Symmetric (lower case s) mRound: 'a', Round-Half-Down Asymmetric (lower case a) mRound: 'B', Round-Half-Even "Bankers Rounding" mRound: 'U', Round Up "Round-Away-From-Zero" mRound: 'D', Round Down "Round-Toward-Zero" - same as truncate mRound: 'C', Round to Ceiling "Toward Positive Infinity" mRound: 'F', Round to Floor "Toward Negative Infinity"

Default

'S'

nBracket?

optional nBracket: string

Defined in: src/ui/editors/autonumeric.ts:120

places brackets on negative value -$ 999.99 to (999.99) visible only when the field does NOT have focus the left and right symbols should be enclosed in quotes and separated by a comma nBracket: null, nBracket: '(,)', nBracket: '[,]', nBracket: '<,>' or nBracket: '{,}'

Default

null

pSign?

optional pSign: string

Defined in: src/ui/editors/autonumeric.ts:130

placement of currency sign for prefix pSign: 'p', for suffix pSign: 's',

Default

'p'

vMax?

optional vMax: any

Defined in: src/ui/editors/autonumeric.ts:144

maximum possible value value must be enclosed in quotes and use the period for the decimal point value must be larger than vMin

Default

'9999999999999.99'

vMin?

optional vMin: any

Defined in: src/ui/editors/autonumeric.ts:150

minimum possible value value must be enclosed in quotes and use the period for the decimal point value must be smaller than vMax

Default

'0.00'

wEmpty?

optional wEmpty: string

Defined in: src/ui/editors/autonumeric.ts:157

Displayed on empty string wEmpty: 'empty', - input can be blank wEmpty: 'zero', - displays zero wEmpty: 'sign', - displays the currency sign

Default

'empty'