Release v2.0.0
2.0.0 (2024-01-22)
⚠ BREAKING CHANGES
- core: merge
MaskitoElementPredicate
&MaskitoElementPredicateAsync
into single type (#757)
Before:
import {
MaskitoElementPredicate,
MaskitoElementPredicateAsync,
} from '@maskito/core';
const syncPredicate: MaskitoElementPredicate = element =>
element.querySelectorAll('input')[1]!;
const asyncPredicate: MaskitoElementPredicateAsync = async element =>
Promise.resolve(element.querySelectorAll('input')[1]!);
After:
import {MaskitoElementPredicate} from '@maskito/core';
const syncPredicate: MaskitoElementPredicate = element =>
element.querySelectorAll('input')[1]!;
const asyncPredicate: MaskitoElementPredicate = async element =>
Promise.resolve(element.querySelectorAll('input')[1]!);
- core: remove value's calibration on initialization + new
maskitoInitialCalibrationPlugin
(#778)
Before: execution of new Maskito(element, options)
immediately invokes sync mask calibration.
After: no initial calibration. Maskito calibrates textfield's value only on user's interactions. Developer can enable previous behaviour by using maskitoInitialCalibrationPlugin
.
Why: The previous implementation is not so flexible as required. Sometimes the such initial calibration is not required for developer, and developer wants calibration to work only on user's interactions. The new way allows to select: use maskitoInitialCalibrationPlugin
or not.
Learn more: https://maskito.dev/core-concepts/plugins#initial-calibration
- kit: delete deprecated
separator
forDateRange
(usedateSeparator
instead) (#790)
Before:
import {maskitoDateRangeOptionsGenerator} from '@maskito/kit';
const options = maskitoDateRangeOptionsGenerator({
mode: 'mm/dd/yyyy',
separator: '/', // <-------- deprecated
rangeSeparator: ' ~ ',
});
After:
import {maskitoDateRangeOptionsGenerator} from '@maskito/kit';
const options = maskitoDateRangeOptionsGenerator({
mode: 'mm/dd/yyyy',
dateSeparator: '/',
rangeSeparator: ' ~ ',
});
- angular: deprecate
MaskitoModule
(use standaloneMaskitoDirective
,MaskitoCVA
,MaskitoPipe
) (#754)
🚀 More features
- core: new built-in
maskitoStrictCompositionPlugin
(#881) - kit:
Number
allows to enter full width numbers (#864)
🐛 Bug Fixes
- core: drop some excess dispatches of
Input
-event (#882) - kit: add
{bubbles:true}
forinput
events inside all built-in plugins to supportReactSyntheticEvent
(#806) - kit:
Number
has problems when prefix/postfix includesdecimalSeparator
symbol (#874) (#816) (#921) - kit:
Placeholder
is not compatible withmaskitoEventHandler
+focus
/blur
events (#928)