Skip to content

Commit e855ae3

Browse files
Updates the documentation with the new option introduced in 4.8.0
Updates the changelog and the CDN information
1 parent db5f2c7 commit e855ae3

File tree

4 files changed

+21
-4
lines changed

4 files changed

+21
-4
lines changed

docs/Changelog/CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@
22

33
### v4
44

5+
#### 4.8.1
6+
+ Fixes #763 Copyright banner in the minimized distribution file is undefined
7+
+ Removes unused wdio script from package.json
8+
9+
#### 4.8.0
10+
+ Adds #709 Feature request: Disallow toggling the negative/positive sign with '+' and '-' keypress
11+
+ This adds a new option `negativePositiveSignBehavior` for the managing the '-' and '+' key behavior
12+
+ Setting `negativePositiveSignBehavior` to `true` will allow the toggling, while setting it to `false` will disable it; this means that when hitting the '-' key, the value will always be set to its negative value, and hitting the '+' key will always set the element to its positive value (given the minimum and maximum value allows this)
13+
+ Do note that the default behavior is changed in this version, where toggling between the positive and negative value with the '-' or '+' keys is not activated by default. If you want to use the previous behavior, please set `negativePositiveSignBehavior: AutoNumeric.options.negativePositiveSignBehavior.toggle` in your options' configuration.
14+
+ Updates the existing end-to-end tests that relied on the toggle behavior
15+
+ Fixes the incorrect error message when setting an invalid `positiveSignCharacter` option
16+
+ Attempts to fix the 'node: 18' error from Travis CI
17+
518
#### 4.7.0
619
+ Fixes #719 Feature request: Up and down arrow keys behavior matching standard number input
720
+ Adds 2 new options to control how the up and down arrow keys behave: `modifyValueOnUpDownArrow` and `upDownStep`

docs/Documentation/configuration options.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ Below are listed in alphabetical order the options that you can pass an AutoNume
4141
| `modifyValueOnUpDownArrow` | Determine if the element value can be incremented / decremented with the up and down arrow keys. The keys behavior is modified with the `upDownStep` option. | `true` |
4242
| `modifyValueOnWheel` | Determine if the element value can be incremented / decremented with the mouse wheel. The wheel behavior is modified with the `wheelStep` option. | `true` |
4343
| `negativeBracketsTypeOnBlur` | Adds brackets `[]`, parenthesis `()`, curly braces `{}`, chevrons `<>`, angle brackets `〈〉`, Japanese quotation marks `「」`, half brackets `⸤⸥`, white square brackets `⟦⟧`, quotation marks `‹›` or guillemets `«»` on negative values when unfocused. The value must be formatted like `'<leftBracket>,<rightBracket>'`. | `null` |
44+
| `negativePositiveSignBehavior` | Defines if the negative sign should be toggled when hitting the negative or positive key multiple times | `false` |
4445
| `negativePositiveSignPlacement` | Placement of negative/positive sign relative to the currency symbol (possible options are `l` (left), `r` (right), `p` (prefix) and `s` (suffix)) | `null` |
4546
| `negativeSignCharacter` | Defines the negative sign character to use | `'-'` |
4647
| `noEventListeners` | Defines if the element should have event listeners activated on it.<br>*Note: Setting this to `true` will prevent any format to be applied once the user starts modifying the element value. This is unlikely what you want.* | `false` |

docs/Documentation/how to use.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@ Simply include **autoNumeric** in your html `<header>` tag.<br>No other files or
44
```html
55
<script src="autoNumeric.min.js" type="text/javascript"></script>
66
<!-- ...or, you may also directly use a CDN :-->
7-
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
7+
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
8+
<!-- ...or -->
9+
<script src="https://cdnjs.cloudflare.com/ajax/libs/autonumeric/4.8.1/autoNumeric.min.js"></script>
810
<!-- ...or -->
911
<script src="https://unpkg.com/autonumeric"></script>
12+
<!-- ...or any other CDN. -->
1013
```
1114

1215
## In another script

docs/Documentation/installation.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
You can install autoNumeric with your preferred dependency manager:
1+
You can install AutoNumeric with your preferred dependency manager:
22

33
=== "Latest version"
44
```sh title="With `yarn`"
@@ -10,10 +10,10 @@ You can install autoNumeric with your preferred dependency manager:
1010

1111
=== "Stable version"
1212
```sh title="With `yarn`"
13-
yarn add autonumeric@4.2.0
13+
yarn add autonumeric@4.6.2
1414
```
1515
```sh title="With `npm`"
16-
npm install autonumeric@4.2.0 --save
16+
npm install autonumeric@4.6.2 --save
1717
```
1818

1919
[^1]: [Yarn](https://yarnpkg.com/) website

0 commit comments

Comments
 (0)