Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

autonumeric

Package Overview
Dependencies
Maintainers
2
Versions
145
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

autonumeric - npm Package Versions

1
15

4.0.0-beta.8

Diff

Changelog

Source

4.0.0-beta.8

  • Fix issue #248 Create the autoNumeric organization, and move the repository to it
acd
published 4.0.0-beta.7 •

Changelog

Source

4.0.0-beta.7

  • Fix issue #427 autoUnformat() converts digitGroupSeparator set to . as the decimal character
  • Modify AutoNumeric.unformat() so that 'real' javascript number are always directly returned, without taking into account the options passed (as it was supposed to do previously).
  • Correctly take into account the number of decimal places, the negative brackets, rounding and the suffix text options when unformatting with AutoNumeric.unformat().
  • Complete the AutoNumeric.unformat() unit tests.
  • Modify _removeBrackets() so that we can only remove the brackets, without reordering the negative sign, currency symbol and value according to the settings.
acd
published 4.0.0-beta.6 •

Changelog

Source

4.0.0-beta.6

  • Fix issue #414 Changing the value of an element from negative to positive is not possible for some specific configuration of brackets, for the second time.
  • Remove the need to keep an ambiguous settings.trailingNegative variable, that was used for other things that its names suggests.
  • Extract the _isTrailingNegative test to its own function.
  • Fix _convertToNumericString() to make it remove the suffixText as well.
  • Use array destructuring to simplify the _setValueParts() function.
  • Remove the attribute newValue polluting this, which allow to explicitly pass the needed information.
  • Merge this.settings.hasFocus into this.isFocused.
  • Remove the need for the this.settings.strip variable.
  • Modify the event listener from 'focusin' to 'focus', in order to prepare for the merge of _onFocusInAndMouseEnter() and _onFocus() handlers.
  • Modify _cleanLeadingTrailingZeros() so that the trailing zeroes if correctly done, even if leadingZero is set to keep.
  • Rename _cleanLeadingTrailingZeros() to _trimLeadingAndTrailingZeros().
  • Change the _addGroupSeparators() signature so that the focused state is explicitly passed as a parameter, instead of piggy-backing on the settings object.
  • Add a _setTrailingNegativeSignInfo() function that parse the settings and initialize once the this.isTrailingNegative property if the negative sign should be trailing for negative values.
  • Rename the leftOrAll parameter from _stripAllNonNumberCharacters() to a more meaningful stripZeros.
  • Simplify a test in _truncateDecimalPlaces().
  • Rename _skipAlways() to _processNonPrintableKeysAndShortcuts().
  • Add cases to the helper function isNegative() to make it more efficient.
  • Add a new isNegativeWithBrackets() helper function that tests if the given value is a negative with brackets.
acd
published 4.0.0-beta.5 •

Changelog

Source

4.0.0-beta.5

  • Fix issue #416 Add support for changing the element style based on rules
  • Add the styleRules option that allows to modify the element style based on the raw value, but also to call any callbacks whenever this raw value change
  • Reorganize the set() 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().
acd
published 4.0.0-beta.4 •

Changelog

Source

4.0.0-beta.4

  • Fix issue #409 Do not add decimal padding when a number without decimals has been inserted
  • Fix an issue when you have 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.
  • Fix issue #418 Complete the documentation with the AutoNumeric event lifecycle
acd
published 4.0.0-beta.3 •

Changelog

Source

4.0.0-beta.3

  • Fix issue #415 Support undo and redo actions
  • Add a new historySize option that allows to set how many undo states each AutoNumeric object should keep in memory.
  • Always use the _setRawValue() function to set the rawValue ; directly setting this.settings.rawValue = 'foo' is not allowed anymore.
  • Modify the set() function signature by allowing to pass a third parameter to prevent saving the changed state to the history table.
  • Update the keyName enumeration with the capitalized letters.
  • Upgrade the getElementSelection() helper function in order to support contenteditable-enabled elements and hidden inputs.
  • Add an arrayTrim() helper function that trim the start of an array.
  • Create undo/redo end-to-end tests.
  • Reorganize the set() function to keep logical steps together.
  • Rename the old autoFormat.autoNumeric event to the already used autoNumeric:formatted to keep the names consistent.
  • Sort the option list in the _convertOldOptionsToNewOnes() function.
  • Fix issue #423 leadingZero set to keep does not keep the leading zeros under Chrome
acd
published 2.0.10 •

Changelog

Source

2.0.10

  • Fix issue #417 Error thrown in PhantomJS 2.1.1 on Linux under CI Environment
  • Fix the end-to-end tests for issue #403
  • Fix the webdriver.io configuration for the links to jQuery and AutoNumeric libraries
acd
published 4.0.0-beta.2 •

Changelog

Source

4.0.0-beta.2

  • Fix issue #413 Manage the drag 'n drop event so that the text dropped in the AutoNumeric element gets formatted accordingly
acd
published 4.0.0-beta.1 •

Changelog

Source

4.0.0-beta.1

  • Up the current next version to v4 instead of v3, just because.
  • Add unit tests for the new options.* methods
  • Fix the issue where having emptyInputBehavior equal to always would not reformat the AutoNumeric element correctly if its value is set to the empty string ''.
  • Fix the issue where having emptyInputBehavior equal to zero would not reformat the AutoNumeric element correctly if its value is set to the empty string ''.
  • Fix the _mergeCurrencySignNegativePositiveSignAndValue() function that did not manage all negativePositiveSignPlacement combinations.
  • Simplify the _mergeCurrencySignNegativePositiveSignAndValue() function.
  • Add function chaining to the options.* methods.
acd
published 3.0.0-beta.14 •

Changelog

Source

3.0.0-beta.14

  • Add unit tests for the new global.* features
  • Fix issue #412 Using set('') does not respect the emptyInputBehavior option when it's set to 'always'
  • Add a createLocalList option which allow to control whether a local list of AutoNumeric objects should be saved on initializations.
  • Add a global.update() function to update the settings on a local list.
  • Modify the global.clear() function to be able to force a clear call.
  • Add a global.nuke() function to remove then delete the local list DOM element from the DOM.
  • Update the global.clear() function signature with the clear() one.
  • Fix the global.addObject() function that did not update the local list of the added element.
  • Fix the 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.
  • Fix the 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.
  • Fix the global.empty() function to match the removeObject behavior.
  • Simplify the init() method by removing a negation in one of its parameter.
  • Fix the 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).
  • Add an end-to-end test for the remove() method.
  • Add a _hasLocalList() method that tests if the AutoNumeric element has a local list and that it has at least one element in it (itself usually).
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc