2
0
mirror of https://github.com/tenrok/maska.git synced 2026-05-15 11:59:38 +03:00
Commit Graph

52 Commits

Author SHA1 Message Date
Alexander Shabunevich 07cf2efe48 chore: bump deps 2025-02-01 19:01:52 +03:00
Alexander Shabunevich 2975377813 feat: allow float input 2025-02-01 19:01:19 +03:00
Alexander Shabunevich 7aba7fd0c2 fix: correct checking of the number.unsigned flag
Issue #251
2024-11-28 16:08:11 +03:00
Alexey Vasiliev 52eb516719 Fix alpinejs test 2024-11-19 22:21:20 +02:00
Alexey Vasiliev 52797e46a2 Use AbortController for input event cleanup, lets try figureout alpine issue 2024-11-17 12:05:12 +02:00
Alexey Vasiliev afe60275b0 Use AbortController for input event cleanup 2024-11-17 03:04:31 +02:00
Alexey Vasiliev add8508c3d Use AbortController for input event cleanup 2024-11-17 03:00:29 +02:00
Alexander Shabunevich 1a885ce41d fix: correct check for NaN #228 2024-08-26 21:22:47 +03:00
Alexander Shabunevich f47d4ca65d refactor!: change completed behavior for dynamic mask 2024-07-07 16:50:51 +03:00
Alexander Shabunevich 93265ad59b test: add pt-BR number example 2024-06-29 21:51:13 +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 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 6f4836345c chore: update dependencies and package.json for v3 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 2fb8e9b460 test: add BindModel component 2024-04-11 22:41:55 +03:00
Alexander Shabunevich 9b6f964d59 chore: demo app 2024-04-11 22:41:45 +03:00
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