Alexander Shabunevich
7aba7fd0c2
fix: correct checking of the number.unsigned flag
...
Issue #251
2024-11-28 16:08:11 +03:00
Alexey Vasiliev
add8508c3d
Use AbortController for input event cleanup
2024-11-17 03:00:29 +02:00
Alexander Shabunevich
6550be3719
fix: safari autofill bug
...
Safari doesn't fire input event on autofill of the fields like phone.
But there is a custom event with e.bubbles = true
and on our own custom event e.bubbles = false. So we can filter
Safari autofill event for the correct mask processing.
2024-10-04 17:59:05 +03:00
Alexander Shabunevich
1a885ce41d
fix: correct check for NaN #228
2024-08-26 21:22:47 +03:00
Alexander Shabunevich
acf44ff8ae
fix: additional check for isTrusted event
...
See issue #227
2024-08-23 12:45:41 +03:00
Alexander Shabunevich
75f7562016
chore: bump deps
2024-07-07 16:50:58 +03:00
Alexander Shabunevich
f47d4ca65d
refactor!: change completed behavior for dynamic mask
2024-07-07 16:50:51 +03:00
Alexander Shabunevich
488a52f760
feat: simple mode for mask directive
...
Allow string passing to set a mask without data-maska attribute
2024-06-12 17:52:55 +03:00
Alexander Shabunevich
e6b2799880
fix(vue): use defineExpose to set argument value
2024-06-11 10:17:10 +03:00
Alexander Shabunevich
cbccf3115f
chore: fix import path
2024-06-03 22:31:39 +03:00
Alexander Shabunevich
9b454e996a
refactor: move to single package
2024-06-02 16:49:41 +03:00
Alexander Shabunevich
4de44ef888
feat!: separate packages
2024-04-17 19:31:22 +03:00
Alexander Shabunevich
685f477fe1
style: code format
2024-04-14 14:13:15 +03:00
Alexander Shabunevich
bdcdecc301
chore: move docs demo app to root folder
2024-04-14 12:54:18 +03:00
Alexander Shabunevich
88d92b2753
fix: change event abort to manual event removing
...
Because happy-dom can't handle event abortion and test do not passing
2024-04-14 12:54:18 +03:00
Alexander Shabunevich
04bd6b249c
fix: correct binding.value check in vue directive
2024-04-14 12:54:18 +03:00
Alexander Shabunevich
9257950422
chore: rename mask-input.ts to input.ts
2024-04-14 12:09:36 +03:00
Alexander Shabunevich
f01cacb046
style: code format
2024-04-11 22:13:16 +03:00
Alexander Shabunevich
9943a17fd1
style: code format
2024-04-11 21:37:42 +03:00
Alexander Shabunevich
e01e66a7c9
chore: rename directive.js to vue.js
2024-04-11 21:32:15 +03:00
Alexander Shabunevich
7159eb3460
chore: fix lint warnings
2024-04-11 21:30:28 +03:00
Alexander Shabunevich
7273dc73a4
feat: console warning on non-supported input type
2024-04-11 21:22: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
150ee77c48
fix: rework updating value
2024-04-06 11:59:33 +03:00
Alexander Shabunevich
81a748e891
style: code format
2024-04-06 10:17:11 +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
00f7caede8
fix: check input value on every update
...
For better handling value change without directive, like vanilla case
2024-03-30 15:08:44 +03:00
Alexander Shabunevich
816c49c466
style: code formating
2024-03-30 15:07: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
Ilya Machnev
7ad5792858
Update directive.ts
2023-08-01 10:49:55 +08:00
Ilya Machnev
c8998d6bf5
Return if input type equals file
...
Direcitve doesnt work on inputs with type set to 'file', it throws error when value changes
2023-08-01 10:45:01 +08: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
c12b5c3840
Code format
2023-04-10 22:26:11 +03:00
Dan Wilson
f0e638c804
avoid re-rendering input and therefore entering infinite update loop
2023-04-04 16:32:40 -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
df99482c70
Rename needUpdate method to needUpdateOptions
2023-02-11 16:04:57 +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
e30084d232
Demo of money format simplified
2023-01-23 15:59:52 +03:00
Alexander Shabunevich
80b41d9d29
Demo styles fixes
2023-01-21 12:30:47 +03:00
Alexander Shabunevich
f06bbf529a
Demo updated: add example with number format
2023-01-21 12:30:36 +03:00
Alexander Shabunevich
b97c7c3165
Fix bug with hooks order
2023-01-21 12:29:09 +03:00
Alexander Shabunevich
4300883a93
Code format
2023-01-21 00:25:31 +03:00
Alexander Shabunevich
6135d0a193
Fix setSelectionRange error for inputs of some types
2023-01-12 23:55:43 +03:00
Alexander Shabunevich
95384f90c6
Fix #115
2022-12-30 12:13:30 +03:00
Alexander Shabunevich
3b44a9b4a9
Update masked input on binded value change
2022-12-24 17:49:08 +03:00
Alexander Shabunevich
dee541684b
Add example with simple money format
2022-12-16 17:56:02 +03:00