Alexander Shabunevich
500fd1d6cf
test: warning about input type
2024-04-11 21:49:14 +03:00
Alexander Shabunevich
12ce5da3f5
chore: rename directive.test to vue.test
2024-04-09 22:29:57 +03:00
Alexander Shabunevich
f26128d19b
test: additional tests for cursor position
2024-04-09 22:29:42 +03:00
Alexander Shabunevich
1e50a2a259
refactor: MaskInput rework
...
- abort controller for events
- refactor onInput
- remove beforeinputEvent
- new cursor position fix
2024-04-09 21:24:41 +03:00
Alexander Shabunevich
243b8445a2
test: fix tests for new eager mode
2024-04-06 12:00:02 +03:00
Alexander Shabunevich
ce1243abcd
fix!: change eager mask behavior
...
Now eager mask take into account a hardcoded symbols
2024-04-06 10:13:31 +03:00
Alexander Shabunevich
dee8f2eaf2
test: additional check for callbacks with binding
2024-03-30 15:15:31 +03:00
Alexander Shabunevich
cd1e9f3564
feat!: rework for v3
...
- new directive format: pass options as value, bound as argument with modifiers
- update and checkValue methods in MaskInput
2024-03-30 12:39:22 +03:00
Ilya Semenov
a38e8a2512
Replace "binded" with "bound"
2024-02-13 13:56:56 +07:00
Andre Asselin
222f2df70a
Fix #183 Multiple modifier breaks other custom tokens
...
When a token with multiple:true does not match the next character, we need to determine if it matched any previous characters or not.
If it hasn't matched any characters yet, then we skip the invalid input character and remain on the same token.
If it has matched 1 or more input characters, then we advance to the next token, but stay on the same input character.
The old code had several issues with this. I replaced it with a simple flag (multipleMatched) that is set to true whenever a token with multiple==true matches an input character, and can then be tested when a token with multiple==true doesn't match an input character.
2024-01-09 18:27:18 -05:00
Alexander Shabunevich
d718a16509
Fixed tests
2023-07-10 23:30:42 +03:00
Alexander Shabunevich
f73c21b5fa
Revert "allow custom escape character"
...
This reverts commit e078efd695 .
2023-04-21 14:27:47 +03:00
Dan Wilson
e078efd695
allow custom escape character
2023-04-18 14:00:50 -06:00
Alexander Shabunevich
359f446d72
Make directive change async for correct eager mode
...
Fix #133 where eager mask used with v-model
2023-02-11 16:12:15 +03:00
Alexander Shabunevich
056b6fb855
Fix eager mask bug #128
2023-01-29 16:59:24 +03:00
Alexander Shabunevich
ea47223566
Fix bug with onMaska detail payload
2023-01-29 16:27:58 +03:00
Alexander Shabunevich
8325a46f8f
Tests code formating
2023-01-21 12:29:27 +03:00
Alexander Shabunevich
b97c7c3165
Fix bug with hooks order
2023-01-21 12:29:09 +03:00
Alexander Shabunevich
3b44a9b4a9
Update masked input on binded value change
2022-12-24 17:49:08 +03:00
Alexander Shabunevich
289fc8ff43
Optimize directive work
2022-12-09 13:32:46 +03:00
Alexander Shabunevich
32bbbcf3da
Parse input opts logic moved from MaskInput
2022-12-09 13:29:41 +03:00
Alexander Shabunevich
547f1711e8
Refactor Mask options
...
Allow to pass null mask for disable masking
2022-12-09 11:54:20 +03:00
Alexander Shabunevich
57f4f44959
Callback onMaska now can accept array
...
To make it possible use callback with binded value
2022-12-07 11:41:59 +03:00
Alexander Shabunevich
454dddd4dd
Directive could be applied to parent of input element
2022-12-07 11:41:59 +03:00
Alexander Shabunevich
31c286bb6b
New version code prepare
2022-12-04 17:05:23 +03:00
Yury Mamedov
0cf4d7c7b8
#51 Added test,
...
switched jest env to jsdom,
lint fixed
2021-11-10 01:28:55 +03:00
Alexander Shabunevich
d07191a458
#27 Fix escaped token at the end
2021-05-28 15:43:54 +03:00
Alexander Shabunevich
b6266789e5
Fixed bug with dynamic mask boundaries
2021-02-23 13:59:32 +03:00
Sergey Luschik
dd90143364
Added custom transform function support alongside uppercase and lowercase
...
Added tests to an upcoming functionality
Fixed several lint issues manually
Added "lint:fix" npm script
Made it available to use 'uppercase' or 'lowercase' alongside custom transform function & applied several tests editions
2020-10-09 01:46:28 +03:00
Alexander Shabunevich
26234704f0
Now the masked symbol is shown immediately
2020-09-28 13:02:45 +03:00
Alexander Shabunevich
558b1a60d2
Add dynamic mask
2019-12-07 21:44:32 +03:00
Alexander Shabunevich
748af7c332
Fix code that process rest of the mask
2019-12-05 19:33:06 +03:00
Alexander Shabunevich
9e9be04de7
Cleanup of mask.js code
2019-12-04 13:35:00 +03:00
Alexander Shabunevich
0690000a62
Initial commit
2019-09-25 15:22:31 +03:00