RonaldJerez / vue-input-facade

A lightweight and dependency free input masking library created specific for Vue
https://ronaldjerez.github.io/vue-input-facade/latest/
183 stars 27 forks source link

feat: add 'short' directive modifier #15

Closed tskimmett closed 4 years ago

tskimmett commented 4 years ago

Our use case requires only adding non-masked characters after you have typed a proceeding masked character. This change adds a directive modifier which can be used to set the short property on the masking config object.

Usage:

<input v-facade.short="(###) ###-#### x####" />
RonaldJerez commented 4 years ago

Hi, thanks for the pull request.

The short config was actually only been used internally to determine the masking rule when passing multiple masks, that’s why it was never documented. That logic has changed in the beta and the short option was removed as it was no longer needed. Now that I know someone actually needs it I’ll reintroduce it back in the upcoming 1.2 release.

The code itself looks good, but let me review if exposing this config publicly with the name “short” still makes sense given the new prepend feature in 1.2. Don’t want to release this name and have to change it to something else in 1.2, otherwise it would be a breaking change.

tskimmett commented 4 years ago

I've merged the commits and named it in line with https://www.conventionalcommits.org/en/v1.0.0/

I also made changes to address your feedback.

RonaldJerez commented 4 years ago

:tada: This PR is included in version 1.2.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

tskimmett commented 4 years ago

Thanks a bunch. It's been a pleasure contributing to this repo. Can't say the same for a lot of OSS out there :)

RonaldJerez commented 4 years ago

No problem. Thanks for making the changes so quick.