- Fixes #24 VueAutonumeric value prop validator should accept strings
- Fixes #14 The
readOnly
option is not respected for non-input tags (contenteditable
is always set totrue
)
- Fixes #18 Require of AutoNumeric is ES6 module and not the distribution version
- Fix how using vue-autonumeric with a CDN did not work since the external library it searched was in lowercase.
- Update the documentation about using
vue-autonumeric
in an ES6 module setup with Webpack
Important note:
- We need to use
<npmPath>: 'AutoNumeric'
in thevue-autonumeric
's webpack configuration since we want the user to be able to just use a CDN link to the AutoNumeric library and make surevue-autonumeric
will correctly use this name (since it's exported asAutoNumeric
, with this case). - However if you are using
vue-autonumeric
in an ES6 module setup with a bundling tool (ie. Webpack), then you'll need to declare in your project an alias so that Webpack will know how to recognize the correct library name case.- The alias configuration example for Webpack:
resolve: {
extensions: ['.js', '.vue', '.json'],
alias : {
'~' : resolve('node_modules'),
'@' : resolve('src'),
'AutoNumeric': resolve('node_modules/autonumeric/dist/autoNumeric.min'),
},
},
- Fixes #15 Prop Validation Returns Error if Empty String
- Fixes #16 build fails on linux
- Fix the npm bundle size
- It included a superfluous
.tag.gz
of the component generated bynpm pack
, for testing purpose
- Fixes #13 Not working on mobile devices / userInteraction is never set to true on touch devices (iOS / Android)
- Replace the user interaction tracking system with a simple one where the component AutoNumeric
rawValue
is compared to the watched newvalue
.
- Simplify how the
rawValue
decimal places are set- In
v1.1.*
, whenever the options were changed, the number of decimal places for therawValue
was calculated based of the previous options, and not only the new given options. - This was useful when two vue-autonumeric components shared the same v-model, but different options that have different values for the
rawValue
decimal places count. - For instance if one of the
vue-autonumeric
component had adecimalPlaces
option set to2
, and another set to5
, then when the user modified the value of one of those components, vue-autonumeric would detect a programmatic value change in the other component (since it did not come from a user interaction), and it would then useset()
to set the new value. - The first component would drop the additional decimal places when using
set()
...which in turn would make the other components aware of that new value change, and the second component would then use that new cropped value as well. - However, this special decimal places management is complexifying the code quite a bit, and is not 100% effective since some use cases were difficult, if even possible, to manage.
- This
rawValueDecimalPlaces
hack is now reverted to a more sane and legible code. - From now on, the user will have to explicitly declare the
rawValueDecimalPlaces
value when updating the options, if he does not want to lose the precision when switching options.
- In
- Fix the case of the AutoNumeric import name in the webpack configuration
- Fix issue #10 When using an object to modify both the
:value
and:options
props, the options is not always modified before the value - Fix the issue where updating the
options
to new ones with a higherdecimalPlacesRawValue
loses the additional decimal places - Now allows to update the
options
by passing an array of options (with objects and predefined option names) - When the
options
andvalue
are both set at the same time,vue-autonumeric
now always update theoptions
first, before setting thevalue
.- This allows to use objects with the value and a predefined option name to modify the vue-autonumeric component.
- Note: There is a known bug; if you use multiple
vue-autonumeric
component sharing the samev-model
but different options, changing the value/option may not work correctly.- This is due to the fact that when vue-autonumeric detects a value change, it
set()
it since it does not come from a user interaction. - However if one of the
vue-autonumeric
component has adecimalPlaces
option set to2
, and another set to5
, then the first component will drop the additional decimal places when usingset()
...which in turn will make the other component aware of that new value change, and the second component will then use that new cropped value as well.
- This is due to the fact that when vue-autonumeric detects a value change, it
- Fix issue #9 Modifying the
options
will always lose the decimal places precision after2
places- This happens since
resetOnOptions
temporarily resets the configuration to the default one, which set thedecimalPlaces
option to2
.
- This happens since
- Fix issue #8 Add a new
resetOnOptions
props so that updating theoptions
one first reset to the default options - Add a
resetOnOptions
props set thetrue
by default so that updating theoptions
prop first call.options.reset()
- This is useful when using predefined option names that do not declare all the options. For instance when switching from
'integer'
to'euro'
, thedecimalPlaces
was not set from0
to2
and you had to first update to the default configuration. - Now by default all options update will reset to the default options first. This can be avoided by setting
resetOnOptions
to false before changing theoptions
value.
- This is useful when using predefined option names that do not declare all the options. For instance when switching from
- Fix issue #2 Allow the component to generate any supported Html element instead of only
<input>
- Fix the component size issue which bundled the whole
AutoNumeric
library - Update the documentation with how to install the component, depending if the AutoNumeric library should be bundled or not
- Fix importing issues with the
AutoNumeric
library - Complete the documentation on how to install and use the component
- Add a link to the examples page and its source in the Readme
- Fix the example script imports by removing the unneeded AutoNumeric link
- Fix issue #4 Error when building with webpack 2 on linux
- Fix issue #3 Update the value when the
:options
prop is modified
- Rename the component source from
Autonumeric
toVueAutonumeric
to prevent confusion with theAutoNumeric
library - Update the examples source accordingly
- Update the readme with badges
- Update the readme with more detailed installation instructions
- Fix the examples in the readme and update the Codepen link
- Release the version
v1.0.0
of the vue-autoNumeric component