autonumeric
Advanced tools
Changelog
4.0.0-beta.8
autoNumeric
organization, and move the repository to itChangelog
4.0.0-beta.7
autoUnformat()
converts digitGroupSeparator
set to .
as the decimal characterAutoNumeric.unformat()
so that 'real' javascript number are always directly returned, without taking into account the options passed (as it was supposed to do previously).AutoNumeric.unformat()
.AutoNumeric.unformat()
unit tests._removeBrackets()
so that we can only remove the brackets, without reordering the negative sign, currency symbol and value according to the settings.Changelog
4.0.0-beta.6
settings.trailingNegative
variable, that was used for other things that its names suggests._isTrailingNegative
test to its own function._convertToNumericString()
to make it remove the suffixText
as well._setValueParts()
function.newValue
polluting this
, which allow to explicitly pass the needed information.this.settings.hasFocus
into this.isFocused
.this.settings.strip
variable.'focusin'
to 'focus'
, in order to prepare for the merge of _onFocusInAndMouseEnter()
and _onFocus()
handlers._cleanLeadingTrailingZeros()
so that the trailing zeroes if correctly done, even if leadingZero
is set to keep
._cleanLeadingTrailingZeros()
to _trimLeadingAndTrailingZeros()
._addGroupSeparators()
signature so that the focused state is explicitly passed as a parameter, instead of piggy-backing on the settings object._setTrailingNegativeSignInfo()
function that parse the settings and initialize once the this.isTrailingNegative
property if the negative sign should be trailing for negative values.leftOrAll
parameter from _stripAllNonNumberCharacters()
to a more meaningful stripZeros
._truncateDecimalPlaces()
._skipAlways()
to _processNonPrintableKeysAndShortcuts()
.isNegative()
to make it more efficient.isNegativeWithBrackets()
helper function that tests if the given value is a negative with brackets.Changelog
4.0.0-beta.5
styleRules
option that allows to modify the element style based on the raw value, but also to call any callbacks whenever this raw value changeset()
function so that the formatted value is set before setting the rawValue
. That way if a callback invoked by a styleRules
modify the raw value, it'll be set correctly, since the previous set()
call would have already changed the element value via setElementValue()
.Changelog
4.0.0-beta.4
allowDecimalPadding
set to never
, then if you delete the decimal places leaving the decimal character, it would not drop that dangling decimal character on focus out.Changelog
4.0.0-beta.3
historySize
option that allows to set how many undo states each AutoNumeric object should keep in memory._setRawValue()
function to set the rawValue
; directly setting this.settings.rawValue = 'foo'
is not allowed anymore.set()
function signature by allowing to pass a third parameter to prevent saving the changed state to the history table.keyName
enumeration with the capitalized letters.getElementSelection()
helper function in order to support contenteditable-enabled elements and hidden inputs.arrayTrim()
helper function that trim the start of an array.set()
function to keep logical steps together.autoFormat.autoNumeric
event to the already used autoNumeric:formatted
to keep the names consistent._convertOldOptionsToNewOnes()
function.leadingZero
set to keep
does not keep the leading zeros under ChromeChangelog
2.0.10
Changelog
4.0.0-beta.2
Changelog
4.0.0-beta.1
next
version to v4
instead of v3
, just because.options.*
methodsemptyInputBehavior
equal to always
would not reformat the AutoNumeric element correctly if its value is set to the empty string ''
.emptyInputBehavior
equal to zero
would not reformat the AutoNumeric element correctly if its value is set to the empty string ''
._mergeCurrencySignNegativePositiveSignAndValue()
function that did not manage all negativePositiveSignPlacement
combinations._mergeCurrencySignNegativePositiveSignAndValue()
function.options.*
methods.Changelog
3.0.0-beta.14
global.*
featuresset('')
does not respect the emptyInputBehavior
option when it's set to 'always'
createLocalList
option which allow to control whether a local list of AutoNumeric objects should be saved on initializations.global.update()
function to update the settings on a local list.global.clear()
function to be able to force a clear
call.global.nuke()
function to remove
then delete the local list DOM element from the DOM.global.clear()
function signature with the clear()
one.global.addObject()
function that did not update the local list of the added element.global.addObject()
function so that if it add an AutoNumeric object that already has a local list with multiple other AutoNumeric objects, it merges the list.global.removeObject()
function to make it update all the objects local list. Also add special behaviors when an AutoNumeric element removes itself or another one.global.empty()
function to match the removeObject
behavior.init()
method by removing a negation in one of its parameter.init()
method initialization process by preventing creating a local list, then removing it immediately if the user wanted a detached element. Now, the local list is just not created (Using the createLocalList
option set to false
).remove()
method._hasLocalList()
method that tests if the AutoNumeric element has a local list and that it has at least one element in it (itself usually).