Skip to content

Latest commit

 

History

History
1496 lines (856 loc) · 40.5 KB

File metadata and controls

1496 lines (856 loc) · 40.5 KB

22.0.2(2026-07-20)

Feature

  • Secure date input (#1574) — hiddenInput now conceals day/month digits too (d/M tokens), not just X-typed placeholder digits; e.g. mask="d0/M0/0000" with [hiddenInput]="true" displays **/**/2024 while the form control keeps the real date

Fix

  • Fix (#1488) — the caret-shift-past-separator fix for overflowing leadZeroDateTime date/time fields now works for any date/time mask (M0/00, Hh:m0, etc.), not only the flagship d0/M0/0000
  • Fix (#1634) — separator masks with outputTransformFn no longer emit the raw formatted display string on blur; the blur-time leadZero reformat now routes through the same transform pipeline as every typing-time emission, so FormControl keeps receiving the transformed (e.g. numeric) value
  • Fix (#1633) — setDisabledState now writes the native disabled DOM property synchronously; an initially-disabled FormControl no longer briefly (or persistently) leaves the native input enabled due to the deferred queueMicrotask write racing Angular Forms' synchronous init
  • Regression coverage (#1632) — added unit and Cypress tests locking in that retyping into a keepCharacterPositions slot cleared by Backspace (e.g. date mask d0/M0/0000) fills from the first typed keystroke; already fixed by prior keepCharacterPositions corrections, no source change needed

22.0.0(2026-07-03)

Feature

  • Angular 22 support (#1617) — built and tested against Angular 22.0.5
  • All dependencies updated to their latest versions (exact pins)
  • Custom named mask aliases (#1376, #1091) — provideNgxMask({ maskAliases: { PHONE_BR: '(00) 00000-0000' } }), works in directive and pipe, supports || multi-masks
  • Banking typing mode (#733, #1414, #1315) — opt-in typeFromDecimals config: digits type from the decimal end, ATM style (50.050.575.73)
  • Default value on blur (#1435) — defaultValueOnBlur input/config: empty inputs receive a masked fallback on blur without marking the form dirty
  • Configuration docs overhaul (#1529) — explicit standalone vs environment vs NgModule setup guide in USAGE/README

Fix

  • Fix (#1250) — typing a second decimal marker is rejected as a no-op instead of mangling the value (123,456,789.20 stays intact)
  • Fix (#1590) — showMaskTyped skeleton render no longer echoes '' into the model during programmatic writes, fixing lost initial values in nested custom form controls
  • Pin (#1593) — integer-part deletion keeping the decimal part and caret is now covered by dedicated regression tests (behavior fixed in 21.1.0)
  • Fix (#1513) — leadZeroDateTime no longer injects a spurious zero into months for year-first masks (0000-M0-d0: 199012211990-12-21)

Breaking

  • Requires Angular 22 (peerDependencies: ^22.0.0) and Node.js ≥ 22.22.3 / ≥ 24.15.0 / ≥ 26

21.1.0(2026-07-02)

Feature

  • Add CPF_CNPJ_ALPHA alphanumeric CNPJ mask (PR #1592)
  • Signal Forms ([formField]) fully supported: initial values, disabled schema, dynamic masks, validation — verified equivalent to Reactive and Template-driven across all mask types

Fix

  • Fix (#1601) — relax FormValueControl surface; no more conflicts with native required/readonly
  • Fix (#1560) — onChange no longer fires during writeValue; programmatic setValue/patchValue keeps the form pristine
  • Fix (#1532) — separator mask without explicit precision no longer throws toFixed() RangeError
  • Fix (#1607, #1614) — directive no longer overrides FormControl disabled state on init; initially-disabled controls stay disabled
  • Fix (#1355, #1578) — deleting the leading digit of a separator value no longer collapses remaining zeros (1,000,000000,000, consistent for all lengths)
  • Fix (#1512) — an explicitly bound empty [specialCharacters]="[]" is respected instead of silently falling back to defaults
  • Fix (#1551) — pasting a value starting with doubled prefix characters no longer strips a prefix occurrence (regression from 18.0.1)
  • Fix (#1571) — caret lands at the end after pasting into a separator mask with a prefix
  • Fix (#1347) — multi-character placeHolderCharacter now emits a one-time warning (single character required)
  • Fix (#1527, #1543, #1544, #1545, #1489) — keepCharacterPositions overhaul: works without showMaskTyped, mid-value deletion leaves placeholder gaps, selection replacement preserves layout, keystrokes are no longer eaten at special-character boundaries, plays well with leadZeroDateTime
  • Fix (#1615) — programmatically-set values the mask cannot process at all (e.g. sentinel strings) pass through verbatim instead of being mangled (regression from 18.0.4)
  • Fix (#1547) — pasting values containing both . and , with the default array decimalMarker no longer drops digits (last marker wins as decimal)
  • Fix (#1516) — deleting digits before the decimal marker keeps the decimal part (0.05.05, no more silent value corruption)
  • Fix (#1572) — caret lands after the decimal marker when typing . with a prefix and leadZero
  • Fix (#1611) — pasted/pre-populated dates parse correctly in month-first masks (M0/d0/0000: 0107194101/07/1941)
  • Fix (#1612) — hiddenInput with a custom pattern symbol no longer deletes two characters on a single backspace
  • Fix (#1498) — masks with multiple leading literals (+(000)...) auto-fill them again on the first typed character (regression from v17)
  • Fix (#1492) — numeric FormControl values in exponential notation (7e-7, 1e21) expand to plain decimals instead of rendering garbage
  • Fix (#1567) — values beyond IEEE-754 precision (>15 significant digits) no longer get corrupted by rounding (999999999999999.99 stays exact)
  • Fix (#1504) — selection replacement works when the value contains a literal *
  • Fix (#1350) — select-all + Backspace clears the input in one press (deterministic clear, fixes Firefox)
  • Fix (#1583) — || alternation masks validate short values that complete a shorter alternative (1||0,N: single 0 is valid again)
  • Fix (#1523) — date masks with digit tokens abutting M0/d0 (00M0d0, 0000M0d0) no longer misread year digits as day/month
  • Fix (#1519) — non-special placeHolderCharacter (e.g. X) no longer leaks into the unmasked model value
  • Fix (#1495) — initial values colliding with the suffix text ('00' with suffix=":00") render instead of being stripped
  • Fix (#1573) — formatting no longer depends on the OS/browser locale (Edge with non-US regional settings altered values); configured markers are always authoritative
  • Fix (#1379) — an empty mask is a true passthrough: no programmatic value rewrites, native browser validation works
  • Fix (#1305, #1264) — initial values render synchronously, so Material floating labels float on init
  • Fix (#1293, #1497) — Android/Samsung IME: numeric masks process composition input live (model no longer stale until blur), deletions are detected via InputEvent.inputType (backspace works without keydown info)
  • Fix (#1515) — leading-optional masks (999SSS) validate correctly: mandatory tokens are position-aware enforced instead of always passing
  • Fix signal forms initial value rendering unmasked for literal-inserting masks (date/time/separator)
  • Fix signal forms FormField echo corrupting masks with ambiguous unmasked form (IP)

Breaking

  • NgxMaskDirective no longer exposes errors, dirty, invalid, pending, readonly, required, name inputs (Signal Forms surface reduced to value/disabled/touched)

21.0.1(2026-01-29)

fix

21.0.0(2026-01-28)

fix

20.0.3(2025-08-01)

fix

20.0.2(2025-07-31)

fix

20.0.1(2025-07-31)

fix

20.0.0(2025-07-22)

Feature

  • update ng 20.x

19.0.7(2024-12-20)

Contributing

19.0.6(2024-12-20)

Fix

19.0.5(2024-12-20)

Fix

19.0.4(2024-12-13)

Feature

  • add input property instantPrefix

Fix

19.0.3(2024-12-05)

Contributing Fix

Fix

19.0.2(2024-12-03)

Fix

19.0.1(2024-11-29)

Feature

  • change @Input to input in NgxMaskDirective
  • change @Output output in NgxMaskDirective
  • change variables to signals in NgxMaskDirective

19.0.0(2024-11-22)

Feature

  • update ng 19.x

18.0.4(2024-11-11)

Fix

18.0.3(2024-11-05)

Fix

18.0.2(2024-11-01)

Fix

18.0.1(2024-10-29)

Breaking Changes

  • rename "IConfig" to "NgxMaskConfig"
  • rename "optionsConfig" to "NgxMaskOptions"
  • change interface to type

Fix

17.1.8(2024-07-16)

Fix

17.1.8(2024-07-16)

Fix

17.1.7(2024-07-18)

Fix

17.1.6(2024-07-16)

Fix

17.1.5(2024-07-16)

Fix

17.1.4(2024-07-16)

Fix

17.1.3(2024-07-16)

Fix

17.1.2(2024-07-15)

Fix

17.1.1(2024-07-05)

Fix

17.1.0(2024-07-05)

Fix

17.0.9(2024-07-02)

Fix

17.0.8(2024-04-30)

Fix

17.0.7(2024-03-28)

Fix

17.0.6(2024-03-27)

Fix

17.0.5(2024-03-25)

Fix

17.0.4(2023-12-01)

Feat

  • update v16.4.2
  • update v15.2.3
  • update v14.3.3
  • update v13.2.2

17.0.3(2023-11-30)

Feat

  • update dependencies

17.0.2(2023-11-29)

Feat

  • update dependencies

17.0.2(2023-11-29)

Fix

17.0.1(2023-11-28)

Fix

17.0.0(2023-11-08)

Feature

  • update ng 17.x

Feature 16.4.2

  • Upgrade version 16.4.2 with more fixes since version 17.x.x

16.4.1(2023-11-08)

Fix

16.4.0(2023-11-07)

Fix

16.3.9(2023-10-02)

Fix

16.3.8(2023-09-18)

Fix

  • Change README.md
  • Fix (#1242)

16.3.7(2023-09-18)

Fix

16.3.6(2023-09-15)

Fix

16.3.5(2023-09-14)

Fix

16.3.4(2023-09-13)

Feat

  • update version

16.3.3(2023-09-13)

Fix

16.3.2(2023-09-13)

Fix

16.3.1(2023-09-01)

Fix

16.3.0(2023-08-28)

Fix

16.2.9(2023-08-08)

Fix

16.2.7(2023-08-08)

Fix

16.2.6(2023-08-03)

Fix

16.2.5(2023-07-24)

Fix

16.2.4(2023-07-12)

Fix

16.2.3(2023-07-05)

Fix

16.2.2(2023-07-03)

Fix

16.2.1(2023-06-30)

Fix

16.2.0(2023-06-27)

Fix

16.1.9(2023-06-21)

Fix

16.1.8(2023-06-19)

Fix

16.1.7(2023-06-14)

Fix

16.1.6(2023-06-14)

Fix

16.1.5(2023-06-13)

Fix

16.1.4(2023-06-13)

Fix

16.1.3(2023-06-08)

Fix

16.1.2(2023-06-05)

Fix

16.1.1(2023-06-05)

Fix

16.1.0(2023-06-01)

Fix

16.0.9(2023-05-24)

Fix

16.0.8(2023-05-29)

Fix

16.0.7(2023-05-26)

Fix

16.0.6(2023-05-25)

Fix

16.0.5(2023-05-24)

Fix

16.0.4(2023-05-19)

Fix

16.0.3(2023-05-18)

Fix

16.0.2(2023-05-16)

Fix

16.0.1(2023-05-16)

Fix

16.0.0(2023-05-13)

Feature

  • update ng 16.x

Feature 15.2.3

  • Upgrade version 15.2.3 with more fixes since version 17.x.x

Feature 15.2.1

  • Upgrade version 15.2.1 with more fixes since version 16.x.x

15.1.5(2023-05-12)

Fix

15.1.4(2023-05-09)

Fix

15.1.3(2023-05-02)

Fix

15.1.2(2023-03-27)

Fix

15.1.1(2023-04-23)

Fix

  • Close non public API

15.1.0(2023-03-10)

Fix

15.0.3(2023-02-20)

Fix

15.0.2(2022-12-26)

Fix

  • Fix README.md

15.0.1(2022-26-12)

Fix

  • separate provideEnvironmentNgxMask and provideNgxMask

15.0.0(2022-19-12)

Fix

  • update ng 15.x
  • usage new standalone API

Feature 14.3.3

  • Upgrade version 15.2.2 with more fixes since version 17.x.x

Feature 14.3.2

  • Upgrade version 14.3.2 with more fixes since version 16.x.x
  • Change MaskPipe => NgxMaskPipe
  • Change MaskService => NgxMaskService
  • Change MaskApplierService => NgxMaskApplierService
  • Change MaskDirective => NgxMaskMaskDirective

14.2.4(2022-10-27)

Fix

  • Fix (#1039)
  • new code and styles linting rules formatting

14.2.3(2022-09-16)

Fix

14.2.2(2022-09-13)

Fix

14.2.1(2022-09-11)

Fix

  • package build process

14.2.0(2022-09-11)

Fix

  • update ng 14.2.1
  • Fix (#1029)

14.0.3(2022-06-21)

Fix

14.0.2(2022-06-09)

14.0.1(2022-06-06)

14.0.0(2022-06-05)

Feature

  • Update to Angular 14

Feature 13.3.2

  • Upgrade version 13.2.2 with more fixes since version 17.x.x

Feature 13.2.1

  • Upgrade version 13.2.1 with more fixes since version 16.x.x
  • Change MaskPipe => NgxMaskPipe
  • Change MaskService => NgxMaskService
  • Change MaskApplierService => NgxMaskApplierService
  • Change MaskDirective => NgxMaskMaskDirective

13.1.15(2022-05-29)

Fix

13.1.14(2022-05-17)

Fix

13.1.13(2022-05-09)

Fix

13.1.12(2022-04-27)

Fix

  • Fixed issue where active elements within a shadowRoot would not be found by mask
  • Fix (#909)

13.1.11 (2022-04-25)

Fix

13.1.10 (2022-04-18)

Fix

13.1.9 (2022-04-13)

Fix

13.1.8 (2022-04-08)

Feature

  • Added lowercase and uppercase mask support
  • Feature (#947)

13.1.6 (2022-04-04)

Fix

  • Ghost characters shown in input when toggling mask on/off
  • Fix (#897)

13.1.5 (2022-04-03)

Fix

13.1.4 (2022-03-30)

Feature

  • Function maskFilled is added
  • Feature (#917)

13.1.3 (2022-03-28)

Features and fixes

feature (#940) Fixed (#965)

13.1.2 (2022-01-20)

Features

  • added triggerOnMaskChange, allow mask change to trigger onChange

13.1.1 (2022-01-12)

Fixes

  • Revision for separator logic.
  • Set default decimalMarker to [".",","] instead "."

13.1.0 (2021-12-30)

Features

  • Enable non-zero-selections
  • Deletion of special mask character moves just the cursor instead of deleting the character next to it

Test/CI fixes

  • Enable cypress component testing

13.0.1 (2021-12-15)

Test/CI fixes

  • the same that in 13.0.0
  • fix test
  • fix CI

13.0.0 (2021-11-28)

Angular 13 release

  • up all dependencies to latest
  • move from tslint to eslint
  • add more strict rules for tsconfig and code quality config
  • build library with IVY and new angular package structure

12.0.0 (2021-05-19)

Bug Fixes

Fixed (#875) Fixed (#892) Fixed (#861) Fixed (#893)

11.1.5 (2020-03-19)

Bug Fixes

Fixed (#864) (#863) (#706)

11.1.4 (2020-11-26)

Bug Fixes

Remove complet mask if part of it is deleted (#831)

11.1.3 (2020-11-25)

Bug Fixes

Now backspace no leaves special characters (#692) (831)

11.1.2 (2020-11-24)

Bug Fixes

DropSpecialCharacters false also should return prefix (#686) (830)

11.1.1 (2020-11-24)

Bug Fixes

Number cast bug. Now if model value number mask should return type number (#791) (#702) (829)

11.1.0 (2020-11-23)

Bug Fixes

Copy paste event should work as expected (#765) (827)

11.0.1 (2020-11-15)

Bug Fixes

Difinition for form control with `{value, disable} should work (#803) (826)

Update to Angular 11

Change directive selector to restrict to input and textarea tags

Fix for #721 - prevent entering dots when decimal marker is comma

Fix for #715 - mark fields as touched on blur on form fields with an empty mask Fix for #711 - stop fields being marked as dirty after a form reset

Feature: Library updated to Angular 9 Feature: Can pass empty string for thousandSeparator if do not want any separation Fix: allowNegativeNumbers works correctly when set as true or false. If false, entering a hyphen will not be allowed Fix: stop cursor jumping around when mask is set as empty

Fix for #657 - showMaskTyped option now works correctly when set in the config Fix for #665 - validateTime mark field as invalid immediately if value is null Feature: Added new error page for handling 404's, and new bugs page for being a playground for bug fixing Breaking change: Made validation error return an object named mask. If you were previously checking for a validation error named 'Mask error' then it will need changing to just 'mask'.

Fix for #369 - add thousandSeparator to separator pipe Fix for #381 - add support to negative number in separator mask

Fix for #560 - do not overwrite the mask available patterns when patterns attribute passed in value is a falsey value i.e null/undefined/false Fix for #620 - allow delete button to work when at beginning of input and no prefix exists Fix for #621 - validation config value now works correctly

Fix for #614 - export everything from config

Fix for #580 - honour the special characters that user may have specified, and prevent runtime exception occuring Project folder structure converted over to follow Angular CLI way of libraries

Fix for #590 - Problem if prefix last char is not a number

Placeholder can now be customised

bugs fix

update separator

bugs fix [refs: #554, #580, #582]

bugs fix [refs: #579, #576, #561]

Update date and time masks [refs: #571, #567, #572, #564, #558, #573]

minor bug fixes

minor bug fixes

Issues fix

Bugs fix

Fix Backspace on empty input causes cursor to jump after entering a value

Bugfix

Fix returned value when input value type is number

Added decimal percent, fix suffix prevents decimals

Added polyfill for IE11

Fix decimals

Readme update

Secure input and bugs fix

Bugs fix

[7.6.4 coma_separator] (2019-03-13)

Bugs fix

[7.6.0 coma_separator] (2019-03-11)

Feature: added default validation

[7.5.0 coma_separator] (2019-03-11)

Bugs fix: fix minutes validation, '-' in separator, decimal part in separator and fix issues with FF/IE

[7.4.6 coma_separator] (2019-02-15)

Fix coma_separator behavior

[7.4.5 dependencies] (2019-02-15)

Update dev and prod dependencies

[7.3.4 decimals values separator] (2019-01-17)

Added coma_separator

[7.3.3 decimals values separator] (2019-01-08)

Added decimals values for separator and dot_separator

[7.3.1 update separator] (2018-12-19)

Now separator can separate by dots

[7.3.0 feature percent] (2018-12-14)

Added validation for percent

[7.2.0 feature 24 hour forma] (2018-12-12)

Added valid 24 hour format mask and update separator

[7.1.0 feature thousand separator] (2018-12-11)

Added new mask that separates number by thousands

[7.0.4 fix multiple mask] (2018-12-11)

Fix multiple mask when you use the same symbols bettwen *

[7.0.3 hotfix] (2018-12-10)

hotfix

[7.0.2 update of sufix] (2018-12-10)

sufix appears while you inputing data

you can use sufix along with '*'

You can used new specialCharacters 'quotes'

You can pass into mask pattern with brackets

Fixed pattern '*'

You can select and delete value.

You can pass array of expression and custom Pattern to pipe

Fixed when page is loaded the mask is visible

Fixed writeValue in directive

Added ability to use MaskPipe/NgxMaskService inside component

Added poliffyls for IE

Added support for using 'showMaskTyped' property to see mask while typing Resolved issues

Update of demo version Added support to pass in value of type number or string Resolved issues

Add support for prefix

Add [ and ] as defoult symbols for mask

Fix shift for cursor and updated all dependencies

Add support for optional character in input '?'

Add support for multicharacter input '*'

Updated all dependencies and remove usages of rxjs