Skip to content

Release v2.0.0

Compare
Choose a tag to compare
@github-actions github-actions released this 22 Jan 05:45
· 751 commits to main since this release
0cde2c1

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


  • core: bump Firefox browser support (55+ => 87+) (#876) and drop legacy fallbacks for Firefox (#756)

  • kit: delete deprecated separator for DateRange (use dateSeparator 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: bump minimum required Angular version (12+ => 15+) (#710) (#720) (#725)

  • angular: deprecate MaskitoModule (use standalone MaskitoDirective, 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} for input events inside all built-in plugins to support ReactSyntheticEvent (#806)
  • kit: Number has problems when prefix/postfix includes decimalSeparator symbol (#874) (#816) (#921)
  • kit: Placeholder is not compatible with maskitoEventHandler + focus/blur events (#928)