ngx-mask 22.1.0 → 22.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -29,6 +29,8 @@ var MaskExpression;
29
29
  MaskExpression["SECOND"] = "s";
30
30
  MaskExpression["LETTER_S"] = "S";
31
31
  MaskExpression["DOT"] = ".";
32
+ MaskExpression["NUMPAD_DECIMAL"] = "Decimal";
33
+ MaskExpression["NUMPAD_DECIMAL_CODE"] = "NumpadDecimal";
32
34
  MaskExpression["COMMA"] = ",";
33
35
  MaskExpression["CURLY_BRACKETS_LEFT"] = "{";
34
36
  MaskExpression["CURLY_BRACKETS_RIGHT"] = "}";
@@ -539,9 +541,9 @@ const percentHandler = function (state, params) {
539
541
  (processedValue.match(/[-!$%^&*()_+|~=`{}\[\]:";'<>?,\/.]/) && !backspaced)) {
540
542
  processedValue = this._stripToDecimal(processedValue);
541
543
  const precision = this.getPrecision(state.maskExpression);
542
- processedValue = this.checkInputPrecision(processedValue, precision, this.decimalMarker);
544
+ processedValue = this.checkInputPrecision(processedValue, precision);
543
545
  }
544
- const decimalMarker = typeof this.decimalMarker === 'string' ? this.decimalMarker : MaskExpression.DOT;
546
+ const decimalMarker = this._activeDecimalMarker(processedValue);
545
547
  if (processedValue.indexOf(decimalMarker) > 0 &&
546
548
  !this.percentage(processedValue.substring(0, processedValue.indexOf(decimalMarker)))) {
547
549
  let base = processedValue.substring(0, processedValue.indexOf(decimalMarker) - 1);
@@ -594,15 +596,7 @@ const separatorHandler = function (state, params) {
594
596
  const precision = this.getPrecision(state.maskExpression);
595
597
  let decimalMarker = this.decimalMarker;
596
598
  if (Array.isArray(this.decimalMarker)) {
597
- if (this.actualValue.includes(this.decimalMarker[0]) ||
598
- this.actualValue.includes(this.decimalMarker[1])) {
599
- decimalMarker = this.actualValue.includes(this.decimalMarker[0])
600
- ? this.decimalMarker[0]
601
- : this.decimalMarker[1];
602
- }
603
- else {
604
- decimalMarker = this.decimalMarker.find((dm) => dm !== this.thousandSeparator);
605
- }
599
+ decimalMarker = this._activeDecimalMarker(this.actualValue);
606
600
  }
607
601
  // Issues #733/#1414/#1315: opt-in "banking" typing mode — typed digits fill
608
602
  // the value from the decimal end, ATM/calculator style (5 -> 0.05 -> 0.57
@@ -804,7 +798,7 @@ const separatorHandler = function (state, params) {
804
798
  if (processedValue.match(invalidCharRegexp)) {
805
799
  processedValue = processedValue.substring(0, processedValue.length - 1);
806
800
  }
807
- processedValue = this.checkInputPrecision(processedValue, precision, this.decimalMarker);
801
+ processedValue = this.checkInputPrecision(processedValue, precision);
808
802
  const strForSep = processedValue.replace(new RegExp(thousandSeparatorCharEscaped, 'g'), '');
809
803
  result = this._formatWithSeparators(strForSep, this.thousandSeparator, this.decimalMarker, precision);
810
804
  const commaShift = result.indexOf(MaskExpression.COMMA) - processedValue.indexOf(MaskExpression.COMMA);
@@ -1193,18 +1187,11 @@ class NgxMaskApplierService {
1193
1187
  }
1194
1188
  return inputValue;
1195
1189
  };
1196
- checkInputPrecision = (inputValue, precision, decimalMarker) => {
1190
+ checkInputPrecision = (inputValue, precision) => {
1197
1191
  let processedInputValue = inputValue;
1198
- let processedDecimalMarker = decimalMarker;
1199
1192
  if (precision < Infinity) {
1200
- // With an array decimalMarker (default ['.', ',']), pick the first configured
1201
- // marker that isn't also the thousandSeparator — mirrors the same fallback
1202
- // resolution used in separator.handler.ts (no marker typed yet in this value).
1203
- if (Array.isArray(processedDecimalMarker)) {
1204
- const marker = processedDecimalMarker.find((dm) => dm !== this.thousandSeparator);
1205
- processedDecimalMarker = marker ? marker : processedDecimalMarker[0];
1206
- }
1207
- const precisionRegEx = new RegExp(this._charToRegExpExpression(processedDecimalMarker) + `\\d{${precision}}.*$`);
1193
+ const decimalMarker = this._activeDecimalMarker(inputValue);
1194
+ const precisionRegEx = new RegExp(this._charToRegExpExpression(decimalMarker) + `\\d{${precision}}.*$`);
1208
1195
  const precisionMatch = processedInputValue.match(precisionRegEx);
1209
1196
  const precisionMatchLength = (precisionMatch && precisionMatch[0]?.length) ?? 0;
1210
1197
  if (precisionMatchLength - 1 > precision) {
@@ -1212,7 +1199,7 @@ class NgxMaskApplierService {
1212
1199
  processedInputValue = processedInputValue.substring(0, processedInputValue.length - diff);
1213
1200
  }
1214
1201
  if (precision === 0 &&
1215
- this._compareOrIncludes(processedInputValue[processedInputValue.length - 1], processedDecimalMarker, this.thousandSeparator)) {
1202
+ this._compareOrIncludes(processedInputValue[processedInputValue.length - 1], decimalMarker, this.thousandSeparator)) {
1216
1203
  processedInputValue = processedInputValue.substring(0, processedInputValue.length - 1);
1217
1204
  }
1218
1205
  }
@@ -1260,13 +1247,24 @@ class NgxMaskApplierService {
1260
1247
  return value === MaskExpression.EMPTY_STRING || Number(value.substring(0, 3)) > 255;
1261
1248
  }));
1262
1249
  }
1250
+ /**
1251
+ * The single rule for "which decimal marker is active": the configured marker, or — for an
1252
+ * array — the first configured marker present in `value` that is not the thousandSeparator,
1253
+ * else the first configured marker that is not the thousandSeparator (#1653).
1254
+ */
1255
+ _activeDecimalMarker(value) {
1256
+ if (!Array.isArray(this.decimalMarker)) {
1257
+ return this.decimalMarker;
1258
+ }
1259
+ const candidates = this.decimalMarker.filter((dm) => dm !== this.thousandSeparator);
1260
+ return (candidates.find((dm) => value.includes(dm)) ?? candidates[0] ?? this.decimalMarker[0]);
1261
+ }
1263
1262
  _splitPercentZero(value) {
1264
1263
  if (value === MaskExpression.MINUS && this.allowNegativeNumbers) {
1265
1264
  return value;
1266
1265
  }
1267
- const decimalIndex = typeof this.decimalMarker === 'string'
1268
- ? value.indexOf(this.decimalMarker)
1269
- : value.indexOf(MaskExpression.DOT);
1266
+ const decimal = this._activeDecimalMarker(value);
1267
+ const decimalIndex = value.indexOf(decimal);
1270
1268
  const emptyOrMinus = this.allowNegativeNumbers && value.includes(MaskExpression.MINUS) ? '-' : '';
1271
1269
  if (decimalIndex === -1) {
1272
1270
  const parsedValue = parseInt(emptyOrMinus ? value.slice(1, value.length) : value, 10);
@@ -1278,7 +1276,6 @@ class NgxMaskApplierService {
1278
1276
  const integerPart = parseInt(value.replace('-', '').substring(0, decimalIndex), 10);
1279
1277
  const decimalPart = value.substring(decimalIndex + 1);
1280
1278
  const integerString = isNaN(integerPart) ? '' : integerPart.toString();
1281
- const decimal = typeof this.decimalMarker === 'string' ? this.decimalMarker : MaskExpression.DOT;
1282
1279
  return integerString === MaskExpression.EMPTY_STRING
1283
1280
  ? MaskExpression.EMPTY_STRING
1284
1281
  : `${emptyOrMinus}${integerString}${decimal}${decimalPart}`;
@@ -1304,10 +1301,10 @@ class NgxMaskApplierService {
1304
1301
  nonZeroIndex,
1305
1302
  };
1306
1303
  }
1307
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: NgxMaskApplierService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1308
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: NgxMaskApplierService });
1304
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: NgxMaskApplierService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1305
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: NgxMaskApplierService });
1309
1306
  }
1310
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: NgxMaskApplierService, decorators: [{
1307
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: NgxMaskApplierService, decorators: [{
1311
1308
  type: Injectable
1312
1309
  }] });
1313
1310
 
@@ -2007,7 +2004,10 @@ class NgxMaskService extends NgxMaskApplierService {
2007
2004
  }
2008
2005
  _removeMask(value, specialCharactersForRemove) {
2009
2006
  if (this.maskExpression.startsWith(MaskExpression.PERCENT) &&
2010
- value.includes(MaskExpression.DOT)) {
2007
+ (value.includes(MaskExpression.DOT) ||
2008
+ (Array.isArray(this.decimalMarker) &&
2009
+ value.includes(MaskExpression.COMMA) &&
2010
+ this._activeDecimalMarker(value) === MaskExpression.COMMA))) {
2011
2011
  return value;
2012
2012
  }
2013
2013
  return value
@@ -2063,7 +2063,7 @@ class NgxMaskService extends NgxMaskApplierService {
2063
2063
  return processedResult;
2064
2064
  }
2065
2065
  if (this.maskExpression.startsWith(MaskExpression.PERCENT) &&
2066
- this.decimalMarker === MaskExpression.COMMA) {
2066
+ this._activeDecimalMarker(processedResult) === MaskExpression.COMMA) {
2067
2067
  processedResult = processedResult.replace(MaskExpression.COMMA, MaskExpression.DOT);
2068
2068
  }
2069
2069
  const separatorPrecision = this._retrieveSeparatorPrecision(this.maskExpression);
@@ -2201,10 +2201,10 @@ class NgxMaskService extends NgxMaskApplierService {
2201
2201
  currentLocaleDecimalMarker() {
2202
2202
  return MaskExpression.DOT;
2203
2203
  }
2204
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: NgxMaskService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
2205
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: NgxMaskService });
2204
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: NgxMaskService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
2205
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: NgxMaskService });
2206
2206
  }
2207
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: NgxMaskService, decorators: [{
2207
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: NgxMaskService, decorators: [{
2208
2208
  type: Injectable
2209
2209
  }] });
2210
2210
 
@@ -2295,6 +2295,18 @@ class NgxMaskDirective {
2295
2295
  // config, so no ngOnChanges mirroring into the service is needed (#1435).
2296
2296
  defaultValueOnBlur = input(null, /* @ts-ignore */
2297
2297
  ...(ngDevMode ? [{ debugName: "defaultValueOnBlur" }] : /* istanbul ignore next */ []));
2298
+ /**
2299
+ * Signal Forms `FormValueControl` surface. At runtime `FormField` never drives this model
2300
+ * when the directive is bound (it prefers the `NG_VALUE_ACCESSOR` provided above, see
2301
+ * `_isCvaMode`), but the template type-checker treats any directive owning a `value` model
2302
+ * as the field's custom control and checks the bound field's value type against it (#1640).
2303
+ * The model therefore accepts exactly what `writeValue()` accepts — `string | number | null |
2304
+ * undefined` — so numeric and nullable fields (`signal({ amount: 0 })`,
2305
+ * `signal<number | null>(null)`, `signal<string | null>(null)`) compile under
2306
+ * `strictTemplates`. Values pushed back into the model are always the unmasked string (see
2307
+ * `_propagateToValueModel`), i.e. `value()` / `valueChange` are declared wider than what is
2308
+ * emitted.
2309
+ */
2298
2310
  value = model('', /* @ts-ignore */
2299
2311
  ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
2300
2312
  disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
@@ -2534,7 +2546,10 @@ class NgxMaskDirective {
2534
2546
  }
2535
2547
  }
2536
2548
  if (placeHolderCharacter) {
2537
- this._maskService.placeHolderCharacter = placeHolderCharacter.currentValue;
2549
+ // `null`/`undefined` means "no custom placeholder" (#1643): fall back to the default
2550
+ // instead of storing null, which broke every `.length` read on the service.
2551
+ this._maskService.placeHolderCharacter =
2552
+ placeHolderCharacter.currentValue ?? this._config.placeHolderCharacter;
2538
2553
  if (typeof placeHolderCharacter.currentValue === 'string' &&
2539
2554
  placeHolderCharacter.currentValue.length > 1 &&
2540
2555
  !this._warnedAboutMultiCharPlaceholder) {
@@ -3363,6 +3378,9 @@ class NgxMaskDirective {
3363
3378
  this._setMask();
3364
3379
  const isTextarea = el.tagName.toLowerCase() === 'textarea';
3365
3380
  if (el.type !== 'number') {
3381
+ if (this._insertNumpadDecimalMarker(e, el)) {
3382
+ return;
3383
+ }
3366
3384
  if (e.key === MaskExpression.ARROW_UP && !isTextarea) {
3367
3385
  e.preventDefault();
3368
3386
  }
@@ -3412,7 +3430,15 @@ class NgxMaskDirective {
3412
3430
  // triggers change detection (DOM churn around the input), leaving the
3413
3431
  // model empty but the view untouched until a second Backspace (#1350).
3414
3432
  e.preventDefault();
3415
- const displayValue = this._maskService.applyMask(MaskExpression.EMPTY_STRING, this._maskService.maskExpression, 0, false, true);
3433
+ // The default action (and its input event) is suppressed, so the
3434
+ // inputTransformFn would never see the cleared value; run it here (#1651).
3435
+ const transformedEmpty = this._maskService.inputTransformFn
3436
+ ? this._maskService.inputTransformFn(MaskExpression.EMPTY_STRING)
3437
+ : MaskExpression.EMPTY_STRING;
3438
+ const clearedValue = typeof transformedEmpty === 'string' || typeof transformedEmpty === 'number'
3439
+ ? String(transformedEmpty)
3440
+ : MaskExpression.EMPTY_STRING;
3441
+ const displayValue = this._maskService.applyMask(clearedValue, this._maskService.maskExpression, 0, false, true);
3416
3442
  el.value = displayValue;
3417
3443
  this._inputValue.set(displayValue);
3418
3444
  const caret = Math.min(this._maskService.prefix.length, displayValue.length);
@@ -3434,6 +3460,44 @@ class NgxMaskDirective {
3434
3460
  this._maskService.selEnd = el.selectionEnd;
3435
3461
  }
3436
3462
  }
3463
+ /**
3464
+ * #1641: on layouts whose decimal separator is a comma, the numeric keypad still emits
3465
+ * a period, which a separator mask configured with a comma decimal marker rejects. The
3466
+ * keypad decimal key (`key: 'Decimal'`, or a `.` from `code: 'NumpadDecimal'`) is
3467
+ * therefore turned into the configured marker. Only the keypad key is intercepted: a
3468
+ * period typed on the main keyboard keeps its normal behavior (e.g. as a thousand
3469
+ * separator). Returns true when the key press was handled.
3470
+ */
3471
+ _insertNumpadDecimalMarker(e, el) {
3472
+ const isNumpadDecimal = e.key === MaskExpression.NUMPAD_DECIMAL ||
3473
+ (e.code === MaskExpression.NUMPAD_DECIMAL_CODE && e.key === MaskExpression.DOT);
3474
+ if (!isNumpadDecimal ||
3475
+ e.ctrlKey ||
3476
+ e.metaKey ||
3477
+ e.altKey ||
3478
+ el.readOnly ||
3479
+ !this._maskValue().startsWith(MaskExpression.SEPARATOR)) {
3480
+ return false;
3481
+ }
3482
+ const configuredMarker = this._maskService.decimalMarker;
3483
+ const marker = Array.isArray(configuredMarker)
3484
+ ? configuredMarker.find((item) => item !== this._maskService.thousandSeparator)
3485
+ : configuredMarker;
3486
+ if (marker !== MaskExpression.COMMA) {
3487
+ return false;
3488
+ }
3489
+ const start = el.selectionStart ?? el.value.length;
3490
+ const end = el.selectionEnd ?? start;
3491
+ e.preventDefault();
3492
+ this._code.set(MaskExpression.NUMPAD_DECIMAL_CODE);
3493
+ this._inputValue.set(el.value);
3494
+ this._maskService.selStart = start;
3495
+ this._maskService.selEnd = end;
3496
+ el.value = `${el.value.slice(0, start)}${marker}${el.value.slice(end)}`;
3497
+ el.setSelectionRange(start + 1, start + 1);
3498
+ el.dispatchEvent(new InputEvent('input', { inputType: 'insertText', data: marker, bubbles: true }));
3499
+ return true;
3500
+ }
3437
3501
  /**
3438
3502
  * Restores the control's pristine/untouched state after a writeValue-driven emission.
3439
3503
  *
@@ -3785,7 +3849,9 @@ class NgxMaskDirective {
3785
3849
  : this.prefix()
3786
3850
  ? alternative.length + this.prefix().length
3787
3851
  : alternative.length;
3788
- return processedValue.length >= requiredLength;
3852
+ // Exact match, not `>=`: a longer value must not pass on the strength of a
3853
+ // shorter alternative it has already outgrown (#1645, 7 digits vs `00000 9`).
3854
+ return processedValue.length === requiredLength;
3789
3855
  });
3790
3856
  }
3791
3857
  /**
@@ -3901,8 +3967,8 @@ class NgxMaskDirective {
3901
3967
  return uniqueCharacters.size === 1;
3902
3968
  });
3903
3969
  }
3904
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: NgxMaskDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
3905
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.7", type: NgxMaskDirective, isStandalone: true, selector: "input[mask], textarea[mask]", inputs: { mask: { classPropertyName: "mask", publicName: "mask", isSignal: true, isRequired: false, transformFunction: null }, specialCharacters: { classPropertyName: "specialCharacters", publicName: "specialCharacters", isSignal: true, isRequired: false, transformFunction: null }, patterns: { classPropertyName: "patterns", publicName: "patterns", isSignal: true, isRequired: false, transformFunction: null }, prefix: { classPropertyName: "prefix", publicName: "prefix", isSignal: true, isRequired: false, transformFunction: null }, suffix: { classPropertyName: "suffix", publicName: "suffix", isSignal: true, isRequired: false, transformFunction: null }, thousandSeparator: { classPropertyName: "thousandSeparator", publicName: "thousandSeparator", isSignal: true, isRequired: false, transformFunction: null }, decimalMarker: { classPropertyName: "decimalMarker", publicName: "decimalMarker", isSignal: true, isRequired: false, transformFunction: null }, dropSpecialCharacters: { classPropertyName: "dropSpecialCharacters", publicName: "dropSpecialCharacters", isSignal: true, isRequired: false, transformFunction: null }, hiddenInput: { classPropertyName: "hiddenInput", publicName: "hiddenInput", isSignal: true, isRequired: false, transformFunction: null }, showMaskTyped: { classPropertyName: "showMaskTyped", publicName: "showMaskTyped", isSignal: true, isRequired: false, transformFunction: null }, placeHolderCharacter: { classPropertyName: "placeHolderCharacter", publicName: "placeHolderCharacter", isSignal: true, isRequired: false, transformFunction: null }, shownMaskExpression: { classPropertyName: "shownMaskExpression", publicName: "shownMaskExpression", isSignal: true, isRequired: false, transformFunction: null }, clearIfNotMatch: { classPropertyName: "clearIfNotMatch", publicName: "clearIfNotMatch", isSignal: true, isRequired: false, transformFunction: null }, validation: { classPropertyName: "validation", publicName: "validation", isSignal: true, isRequired: false, transformFunction: null }, separatorLimit: { classPropertyName: "separatorLimit", publicName: "separatorLimit", isSignal: true, isRequired: false, transformFunction: null }, typeFromDecimals: { classPropertyName: "typeFromDecimals", publicName: "typeFromDecimals", isSignal: true, isRequired: false, transformFunction: null }, allowNegativeNumbers: { classPropertyName: "allowNegativeNumbers", publicName: "allowNegativeNumbers", isSignal: true, isRequired: false, transformFunction: null }, leadZeroDateTime: { classPropertyName: "leadZeroDateTime", publicName: "leadZeroDateTime", isSignal: true, isRequired: false, transformFunction: null }, leadZero: { classPropertyName: "leadZero", publicName: "leadZero", isSignal: true, isRequired: false, transformFunction: null }, triggerOnMaskChange: { classPropertyName: "triggerOnMaskChange", publicName: "triggerOnMaskChange", isSignal: true, isRequired: false, transformFunction: null }, apm: { classPropertyName: "apm", publicName: "apm", isSignal: true, isRequired: false, transformFunction: null }, inputTransformFn: { classPropertyName: "inputTransformFn", publicName: "inputTransformFn", isSignal: true, isRequired: false, transformFunction: null }, outputTransformFn: { classPropertyName: "outputTransformFn", publicName: "outputTransformFn", isSignal: true, isRequired: false, transformFunction: null }, keepCharacterPositions: { classPropertyName: "keepCharacterPositions", publicName: "keepCharacterPositions", isSignal: true, isRequired: false, transformFunction: null }, instantPrefix: { classPropertyName: "instantPrefix", publicName: "instantPrefix", isSignal: true, isRequired: false, transformFunction: null }, defaultValueOnBlur: { classPropertyName: "defaultValueOnBlur", publicName: "defaultValueOnBlur", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", touched: "touchedChange", maskFilled: "maskFilled" }, host: { listeners: { "paste": "onPaste()", "focus": "onFocus()", "ngModelChange": "onModelChange($event)", "input": "onInput($event)", "compositionstart": "onCompositionStart()", "compositionend": "onCompositionEnd($event)", "blur": "onBlur($event)", "click": "onClick($event)", "keydown": "onKeyDown($event)" } }, providers: [
3970
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: NgxMaskDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
3971
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.7", type: NgxMaskDirective, isStandalone: true, selector: "input[mask], textarea[mask]", inputs: { mask: { classPropertyName: "mask", publicName: "mask", isSignal: true, isRequired: false, transformFunction: null }, specialCharacters: { classPropertyName: "specialCharacters", publicName: "specialCharacters", isSignal: true, isRequired: false, transformFunction: null }, patterns: { classPropertyName: "patterns", publicName: "patterns", isSignal: true, isRequired: false, transformFunction: null }, prefix: { classPropertyName: "prefix", publicName: "prefix", isSignal: true, isRequired: false, transformFunction: null }, suffix: { classPropertyName: "suffix", publicName: "suffix", isSignal: true, isRequired: false, transformFunction: null }, thousandSeparator: { classPropertyName: "thousandSeparator", publicName: "thousandSeparator", isSignal: true, isRequired: false, transformFunction: null }, decimalMarker: { classPropertyName: "decimalMarker", publicName: "decimalMarker", isSignal: true, isRequired: false, transformFunction: null }, dropSpecialCharacters: { classPropertyName: "dropSpecialCharacters", publicName: "dropSpecialCharacters", isSignal: true, isRequired: false, transformFunction: null }, hiddenInput: { classPropertyName: "hiddenInput", publicName: "hiddenInput", isSignal: true, isRequired: false, transformFunction: null }, showMaskTyped: { classPropertyName: "showMaskTyped", publicName: "showMaskTyped", isSignal: true, isRequired: false, transformFunction: null }, placeHolderCharacter: { classPropertyName: "placeHolderCharacter", publicName: "placeHolderCharacter", isSignal: true, isRequired: false, transformFunction: null }, shownMaskExpression: { classPropertyName: "shownMaskExpression", publicName: "shownMaskExpression", isSignal: true, isRequired: false, transformFunction: null }, clearIfNotMatch: { classPropertyName: "clearIfNotMatch", publicName: "clearIfNotMatch", isSignal: true, isRequired: false, transformFunction: null }, validation: { classPropertyName: "validation", publicName: "validation", isSignal: true, isRequired: false, transformFunction: null }, separatorLimit: { classPropertyName: "separatorLimit", publicName: "separatorLimit", isSignal: true, isRequired: false, transformFunction: null }, typeFromDecimals: { classPropertyName: "typeFromDecimals", publicName: "typeFromDecimals", isSignal: true, isRequired: false, transformFunction: null }, allowNegativeNumbers: { classPropertyName: "allowNegativeNumbers", publicName: "allowNegativeNumbers", isSignal: true, isRequired: false, transformFunction: null }, leadZeroDateTime: { classPropertyName: "leadZeroDateTime", publicName: "leadZeroDateTime", isSignal: true, isRequired: false, transformFunction: null }, leadZero: { classPropertyName: "leadZero", publicName: "leadZero", isSignal: true, isRequired: false, transformFunction: null }, triggerOnMaskChange: { classPropertyName: "triggerOnMaskChange", publicName: "triggerOnMaskChange", isSignal: true, isRequired: false, transformFunction: null }, apm: { classPropertyName: "apm", publicName: "apm", isSignal: true, isRequired: false, transformFunction: null }, inputTransformFn: { classPropertyName: "inputTransformFn", publicName: "inputTransformFn", isSignal: true, isRequired: false, transformFunction: null }, outputTransformFn: { classPropertyName: "outputTransformFn", publicName: "outputTransformFn", isSignal: true, isRequired: false, transformFunction: null }, keepCharacterPositions: { classPropertyName: "keepCharacterPositions", publicName: "keepCharacterPositions", isSignal: true, isRequired: false, transformFunction: null }, instantPrefix: { classPropertyName: "instantPrefix", publicName: "instantPrefix", isSignal: true, isRequired: false, transformFunction: null }, defaultValueOnBlur: { classPropertyName: "defaultValueOnBlur", publicName: "defaultValueOnBlur", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", touched: "touchedChange", maskFilled: "maskFilled" }, host: { listeners: { "paste": "onPaste()", "focus": "onFocus()", "ngModelChange": "onModelChange($event)", "input": "onInput($event)", "compositionstart": "onCompositionStart()", "compositionend": "onCompositionEnd($event)", "blur": "onBlur($event)", "click": "onClick($event)", "keydown": "onKeyDown($event)" } }, providers: [
3906
3972
  {
3907
3973
  provide: NG_VALUE_ACCESSOR,
3908
3974
  useExisting: NgxMaskDirective,
@@ -3916,7 +3982,7 @@ class NgxMaskDirective {
3916
3982
  NgxMaskService,
3917
3983
  ], exportAs: ["mask", "ngxMask"], usesOnChanges: true, ngImport: i0 });
3918
3984
  }
3919
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: NgxMaskDirective, decorators: [{
3985
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: NgxMaskDirective, decorators: [{
3920
3986
  type: Directive,
3921
3987
  args: [{
3922
3988
  selector: 'input[mask], textarea[mask]',
@@ -4054,10 +4120,10 @@ class NgxMaskPipe {
4054
4120
  });
4055
4121
  }
4056
4122
  }
4057
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: NgxMaskPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4058
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.0.7", ngImport: i0, type: NgxMaskPipe, isStandalone: true, name: "mask" });
4123
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: NgxMaskPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4124
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.1.7", ngImport: i0, type: NgxMaskPipe, isStandalone: true, name: "mask" });
4059
4125
  }
4060
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: NgxMaskPipe, decorators: [{
4126
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: NgxMaskPipe, decorators: [{
4061
4127
  type: Pipe,
4062
4128
  args: [{
4063
4129
  name: 'mask',