ngx-mask 20.0.2 → 21.0.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.
- package/fesm2022/ngx-mask.mjs +115 -27
- package/fesm2022/ngx-mask.mjs.map +1 -1
- package/package.json +3 -3
- package/{index.d.ts → types/ngx-mask.d.ts} +31 -12
package/fesm2022/ngx-mask.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, EventEmitter, inject, Injectable, ElementRef, Renderer2, makeEnvironmentProviders, input, output, signal, HostListener, Directive, Pipe } from '@angular/core';
|
|
2
|
+
import { InjectionToken, EventEmitter, inject, Injectable, ElementRef, Renderer2, makeEnvironmentProviders, input, model, output, signal, effect, untracked, HostListener, Directive, Pipe } from '@angular/core';
|
|
3
3
|
import { DOCUMENT } from '@angular/common';
|
|
4
4
|
import { NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';
|
|
5
5
|
|
|
@@ -906,10 +906,10 @@ class NgxMaskApplierService {
|
|
|
906
906
|
nonZeroIndex,
|
|
907
907
|
};
|
|
908
908
|
}
|
|
909
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
910
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
909
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxMaskApplierService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
910
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxMaskApplierService });
|
|
911
911
|
}
|
|
912
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
912
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxMaskApplierService, decorators: [{
|
|
913
913
|
type: Injectable
|
|
914
914
|
}] });
|
|
915
915
|
|
|
@@ -927,6 +927,7 @@ class NgxMaskService extends NgxMaskApplierService {
|
|
|
927
927
|
* since writeValue should be a one way only process of writing the DOM value based on the Angular model value.
|
|
928
928
|
*/
|
|
929
929
|
writingValue = false;
|
|
930
|
+
isInitialized = false;
|
|
930
931
|
_emitValue = false;
|
|
931
932
|
_start;
|
|
932
933
|
_end;
|
|
@@ -1113,12 +1114,20 @@ class NgxMaskService extends NgxMaskApplierService {
|
|
|
1113
1114
|
this.currentValue = result;
|
|
1114
1115
|
this._emitValue =
|
|
1115
1116
|
this.previousValue !== this.currentValue ||
|
|
1116
|
-
(newInputValue !== this.currentValue && this.writingValue) ||
|
|
1117
1117
|
(this.previousValue === this.currentValue && justPasted);
|
|
1118
1118
|
}
|
|
1119
1119
|
// Propagate the input value back to the Angular model
|
|
1120
|
-
//
|
|
1121
|
-
|
|
1120
|
+
// Only emit if:
|
|
1121
|
+
// 1. _emitValue is true (value changed), AND
|
|
1122
|
+
// 2. Either mask didn't change, OR triggerOnMaskChange is true
|
|
1123
|
+
const shouldEmit = this._emitValue && (!this.maskChanged || this.triggerOnMaskChange);
|
|
1124
|
+
if (shouldEmit) {
|
|
1125
|
+
this.formControlResult(result);
|
|
1126
|
+
}
|
|
1127
|
+
// Reset maskChanged flag even if we didn't emit
|
|
1128
|
+
if (this.maskChanged && !this.triggerOnMaskChange) {
|
|
1129
|
+
this.maskChanged = false;
|
|
1130
|
+
}
|
|
1122
1131
|
// Handle hidden input and showMaskTyped
|
|
1123
1132
|
if (!this.showMaskTyped || (this.showMaskTyped && this.hiddenInput)) {
|
|
1124
1133
|
if (this.hiddenInput) {
|
|
@@ -1275,8 +1284,12 @@ class NgxMaskService extends NgxMaskApplierService {
|
|
|
1275
1284
|
if (!this._renderer || !this._elementRef) {
|
|
1276
1285
|
return;
|
|
1277
1286
|
}
|
|
1278
|
-
//
|
|
1279
|
-
|
|
1287
|
+
// Use queueMicrotask to defer DOM updates to next microtask.
|
|
1288
|
+
// This prevents ExpressionChangedAfterItHasBeenCheckedError
|
|
1289
|
+
// and ensures proper timing with Angular's change detection.
|
|
1290
|
+
queueMicrotask(() => {
|
|
1291
|
+
this._renderer?.setProperty(this._elementRef?.nativeElement, name, value);
|
|
1292
|
+
});
|
|
1280
1293
|
}
|
|
1281
1294
|
checkDropSpecialCharAmount(mask) {
|
|
1282
1295
|
const chars = mask
|
|
@@ -1391,6 +1404,9 @@ class NgxMaskService extends NgxMaskApplierService {
|
|
|
1391
1404
|
: (v) => v;
|
|
1392
1405
|
this.writingValue = false;
|
|
1393
1406
|
this.maskChanged = false;
|
|
1407
|
+
if (!this.isInitialized && this._emitValue) {
|
|
1408
|
+
return;
|
|
1409
|
+
}
|
|
1394
1410
|
if (Array.isArray(this.dropSpecialCharacters)) {
|
|
1395
1411
|
this.onChange(outputTransformFn(this._toNumber(this._checkSymbols(this._removeMask(this._removeSuffix(this._removePrefix(inputValue)), this.dropSpecialCharacters)))));
|
|
1396
1412
|
}
|
|
@@ -1456,7 +1472,15 @@ class NgxMaskService extends NgxMaskApplierService {
|
|
|
1456
1472
|
return this._removeMask(result, specialCharacters);
|
|
1457
1473
|
}
|
|
1458
1474
|
_regExpForRemove(specialCharactersForRemove) {
|
|
1459
|
-
return new RegExp(specialCharactersForRemove
|
|
1475
|
+
return new RegExp(specialCharactersForRemove
|
|
1476
|
+
.map((item) => {
|
|
1477
|
+
// Only escape characters that have special meaning in regex
|
|
1478
|
+
if (/[.*+?^${}()|[\]\\/-]/.test(item)) {
|
|
1479
|
+
return `\\${item}`;
|
|
1480
|
+
}
|
|
1481
|
+
return item;
|
|
1482
|
+
})
|
|
1483
|
+
.join('|'), 'gi');
|
|
1460
1484
|
}
|
|
1461
1485
|
_replaceDecimalMarkerToDot(value) {
|
|
1462
1486
|
const markers = Array.isArray(this.decimalMarker)
|
|
@@ -1555,10 +1579,10 @@ class NgxMaskService extends NgxMaskApplierService {
|
|
|
1555
1579
|
currentLocaleDecimalMarker() {
|
|
1556
1580
|
return (1.1).toLocaleString().substring(1, 2);
|
|
1557
1581
|
}
|
|
1558
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1559
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1582
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxMaskService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
1583
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxMaskService });
|
|
1560
1584
|
}
|
|
1561
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1585
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxMaskService, decorators: [{
|
|
1562
1586
|
type: Injectable
|
|
1563
1587
|
}] });
|
|
1564
1588
|
|
|
@@ -1594,6 +1618,7 @@ function provideEnvironmentNgxMask(configValue) {
|
|
|
1594
1618
|
}
|
|
1595
1619
|
|
|
1596
1620
|
class NgxMaskDirective {
|
|
1621
|
+
// ===== Mask Configuration Inputs =====
|
|
1597
1622
|
mask = input('', ...(ngDevMode ? [{ debugName: "mask" }] : []));
|
|
1598
1623
|
specialCharacters = input([], ...(ngDevMode ? [{ debugName: "specialCharacters" }] : []));
|
|
1599
1624
|
patterns = input({}, ...(ngDevMode ? [{ debugName: "patterns" }] : []));
|
|
@@ -1618,6 +1643,16 @@ class NgxMaskDirective {
|
|
|
1618
1643
|
outputTransformFn = input(null, ...(ngDevMode ? [{ debugName: "outputTransformFn" }] : []));
|
|
1619
1644
|
keepCharacterPositions = input(null, ...(ngDevMode ? [{ debugName: "keepCharacterPositions" }] : []));
|
|
1620
1645
|
instantPrefix = input(null, ...(ngDevMode ? [{ debugName: "instantPrefix" }] : []));
|
|
1646
|
+
value = model('', ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
1647
|
+
errors = input([], ...(ngDevMode ? [{ debugName: "errors" }] : []));
|
|
1648
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
1649
|
+
touched = model(false, ...(ngDevMode ? [{ debugName: "touched" }] : []));
|
|
1650
|
+
dirty = input(false, ...(ngDevMode ? [{ debugName: "dirty" }] : []));
|
|
1651
|
+
invalid = input(false, ...(ngDevMode ? [{ debugName: "invalid" }] : []));
|
|
1652
|
+
pending = input(false, ...(ngDevMode ? [{ debugName: "pending" }] : []));
|
|
1653
|
+
readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly" }] : []));
|
|
1654
|
+
required = input(false, ...(ngDevMode ? [{ debugName: "required" }] : []));
|
|
1655
|
+
name = input('', ...(ngDevMode ? [{ debugName: "name" }] : []));
|
|
1621
1656
|
maskFilled = output();
|
|
1622
1657
|
_maskValue = signal('', ...(ngDevMode ? [{ debugName: "_maskValue" }] : []));
|
|
1623
1658
|
_inputValue = signal('', ...(ngDevMode ? [{ debugName: "_inputValue" }] : []));
|
|
@@ -1626,8 +1661,10 @@ class NgxMaskDirective {
|
|
|
1626
1661
|
_maskExpressionArray = signal([], ...(ngDevMode ? [{ debugName: "_maskExpressionArray" }] : []));
|
|
1627
1662
|
_justPasted = signal(false, ...(ngDevMode ? [{ debugName: "_justPasted" }] : []));
|
|
1628
1663
|
_isFocused = signal(false, ...(ngDevMode ? [{ debugName: "_isFocused" }] : []));
|
|
1629
|
-
/**For IME composition event */
|
|
1664
|
+
/** For IME composition event */
|
|
1630
1665
|
_isComposing = signal(false, ...(ngDevMode ? [{ debugName: "_isComposing" }] : []));
|
|
1666
|
+
/** Track if we're using Signal Forms mode */
|
|
1667
|
+
_isSignalFormsMode = signal(false, ...(ngDevMode ? [{ debugName: "_isSignalFormsMode" }] : []));
|
|
1631
1668
|
_maskService = inject(NgxMaskService, { self: true });
|
|
1632
1669
|
document = inject(DOCUMENT);
|
|
1633
1670
|
_config = inject(NGX_MASK_CONFIG);
|
|
@@ -1635,6 +1672,29 @@ class NgxMaskDirective {
|
|
|
1635
1672
|
onChange = (_) => { };
|
|
1636
1673
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
1637
1674
|
onTouch = () => { };
|
|
1675
|
+
constructor() {
|
|
1676
|
+
effect(() => {
|
|
1677
|
+
const signalValue = this.value();
|
|
1678
|
+
if (this._isSignalFormsMode() && signalValue !== untracked(() => this._inputValue())) {
|
|
1679
|
+
untracked(() => {
|
|
1680
|
+
this.writeValue(signalValue);
|
|
1681
|
+
});
|
|
1682
|
+
}
|
|
1683
|
+
});
|
|
1684
|
+
effect(() => {
|
|
1685
|
+
const isDisabled = this.disabled();
|
|
1686
|
+
untracked(() => {
|
|
1687
|
+
this.setDisabledState(isDisabled);
|
|
1688
|
+
});
|
|
1689
|
+
});
|
|
1690
|
+
}
|
|
1691
|
+
ngOnInit() {
|
|
1692
|
+
// Detect if we're being used with Signal Forms
|
|
1693
|
+
// Signal Forms will set the value model from outside
|
|
1694
|
+
if (this.value() !== '') {
|
|
1695
|
+
this._isSignalFormsMode.set(true);
|
|
1696
|
+
}
|
|
1697
|
+
}
|
|
1638
1698
|
ngOnChanges(changes) {
|
|
1639
1699
|
const { mask, specialCharacters, patterns, prefix, suffix, thousandSeparator, decimalMarker, dropSpecialCharacters, hiddenInput, showMaskTyped, placeHolderCharacter, shownMaskExpression, clearIfNotMatch, validation, separatorLimit, allowNegativeNumbers, leadZeroDateTime, leadZero, triggerOnMaskChange, apm, inputTransformFn, outputTransformFn, keepCharacterPositions, instantPrefix, } = changes;
|
|
1640
1700
|
if (mask) {
|
|
@@ -1901,6 +1961,7 @@ class NgxMaskDirective {
|
|
|
1901
1961
|
}
|
|
1902
1962
|
}
|
|
1903
1963
|
onInput(e) {
|
|
1964
|
+
this._maskService.isInitialized = true;
|
|
1904
1965
|
// If IME is composing text, we wait for the composed text.
|
|
1905
1966
|
if (this._isComposing()) {
|
|
1906
1967
|
return;
|
|
@@ -2193,14 +2254,15 @@ class NgxMaskDirective {
|
|
|
2193
2254
|
el.selectionEnd = this._getActualInputLength();
|
|
2194
2255
|
}
|
|
2195
2256
|
}
|
|
2196
|
-
onKeyDown(
|
|
2257
|
+
onKeyDown(event) {
|
|
2258
|
+
const e = event;
|
|
2197
2259
|
if (!this._maskValue()) {
|
|
2198
2260
|
return;
|
|
2199
2261
|
}
|
|
2200
2262
|
if (this._isComposing()) {
|
|
2201
2263
|
// User finalize their choice from IME composition, so trigger onInput() for the composed text.
|
|
2202
2264
|
if (e.key === 'Enter') {
|
|
2203
|
-
this.onCompositionEnd(
|
|
2265
|
+
this.onCompositionEnd(event);
|
|
2204
2266
|
}
|
|
2205
2267
|
return;
|
|
2206
2268
|
}
|
|
@@ -2340,9 +2402,11 @@ class NgxMaskDirective {
|
|
|
2340
2402
|
];
|
|
2341
2403
|
// Let the service know we've finished writing value
|
|
2342
2404
|
this._maskService.writingValue = false;
|
|
2405
|
+
this._maskService.isInitialized = true;
|
|
2343
2406
|
}
|
|
2344
2407
|
else {
|
|
2345
2408
|
this._maskService.formElementProperty = ['value', inputValue];
|
|
2409
|
+
this._maskService.isInitialized = true;
|
|
2346
2410
|
}
|
|
2347
2411
|
this._inputValue.set(inputValue);
|
|
2348
2412
|
}
|
|
@@ -2352,10 +2416,34 @@ class NgxMaskDirective {
|
|
|
2352
2416
|
}
|
|
2353
2417
|
}
|
|
2354
2418
|
registerOnChange(fn) {
|
|
2355
|
-
|
|
2419
|
+
// Wrap the original onChange to also update Signal Forms value
|
|
2420
|
+
const originalFn = fn;
|
|
2421
|
+
this._maskService.onChange = this.onChange = (value) => {
|
|
2422
|
+
originalFn(value);
|
|
2423
|
+
// Update Signal Forms value model if in use
|
|
2424
|
+
if (this._isSignalFormsMode()) {
|
|
2425
|
+
const stringValue = value === null || typeof value === 'undefined' ? '' : String(value);
|
|
2426
|
+
if (this.value() !== stringValue) {
|
|
2427
|
+
this.value.set(stringValue);
|
|
2428
|
+
}
|
|
2429
|
+
}
|
|
2430
|
+
};
|
|
2356
2431
|
}
|
|
2357
2432
|
registerOnTouched(fn) {
|
|
2358
|
-
this.onTouch =
|
|
2433
|
+
this.onTouch = () => {
|
|
2434
|
+
fn();
|
|
2435
|
+
// Update Signal Forms touched state
|
|
2436
|
+
if (this._isSignalFormsMode() && !this.touched()) {
|
|
2437
|
+
this.touched.set(true);
|
|
2438
|
+
}
|
|
2439
|
+
};
|
|
2440
|
+
}
|
|
2441
|
+
/**
|
|
2442
|
+
* Focus the input element.
|
|
2443
|
+
* Required by FormValueControl interface for Signal Forms.
|
|
2444
|
+
*/
|
|
2445
|
+
focus() {
|
|
2446
|
+
this._maskService._elementRef?.nativeElement?.focus();
|
|
2359
2447
|
}
|
|
2360
2448
|
_getActiveElement(document = this.document) {
|
|
2361
2449
|
const shadowRootEl = document?.activeElement?.shadowRoot;
|
|
@@ -2467,8 +2555,8 @@ class NgxMaskDirective {
|
|
|
2467
2555
|
return uniqueCharacters.size === 1;
|
|
2468
2556
|
});
|
|
2469
2557
|
}
|
|
2470
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2471
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
2558
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxMaskDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2559
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.1", 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 }, 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 }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", 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 }, dirty: { classPropertyName: "dirty", publicName: "dirty", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, pending: { classPropertyName: "pending", publicName: "pending", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", 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: [
|
|
2472
2560
|
{
|
|
2473
2561
|
provide: NG_VALUE_ACCESSOR,
|
|
2474
2562
|
useExisting: NgxMaskDirective,
|
|
@@ -2482,7 +2570,7 @@ class NgxMaskDirective {
|
|
|
2482
2570
|
NgxMaskService,
|
|
2483
2571
|
], exportAs: ["mask", "ngxMask"], usesOnChanges: true, ngImport: i0 });
|
|
2484
2572
|
}
|
|
2485
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2573
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxMaskDirective, decorators: [{
|
|
2486
2574
|
type: Directive,
|
|
2487
2575
|
args: [{
|
|
2488
2576
|
selector: 'input[mask], textarea[mask]',
|
|
@@ -2502,12 +2590,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImpor
|
|
|
2502
2590
|
],
|
|
2503
2591
|
exportAs: 'mask,ngxMask',
|
|
2504
2592
|
}]
|
|
2505
|
-
}], propDecorators: { onPaste: [{
|
|
2593
|
+
}], ctorParameters: () => [], propDecorators: { mask: [{ type: i0.Input, args: [{ isSignal: true, alias: "mask", required: false }] }], specialCharacters: [{ type: i0.Input, args: [{ isSignal: true, alias: "specialCharacters", required: false }] }], patterns: [{ type: i0.Input, args: [{ isSignal: true, alias: "patterns", required: false }] }], prefix: [{ type: i0.Input, args: [{ isSignal: true, alias: "prefix", required: false }] }], suffix: [{ type: i0.Input, args: [{ isSignal: true, alias: "suffix", required: false }] }], thousandSeparator: [{ type: i0.Input, args: [{ isSignal: true, alias: "thousandSeparator", required: false }] }], decimalMarker: [{ type: i0.Input, args: [{ isSignal: true, alias: "decimalMarker", required: false }] }], dropSpecialCharacters: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropSpecialCharacters", required: false }] }], hiddenInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "hiddenInput", required: false }] }], showMaskTyped: [{ type: i0.Input, args: [{ isSignal: true, alias: "showMaskTyped", required: false }] }], placeHolderCharacter: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeHolderCharacter", required: false }] }], shownMaskExpression: [{ type: i0.Input, args: [{ isSignal: true, alias: "shownMaskExpression", required: false }] }], clearIfNotMatch: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearIfNotMatch", required: false }] }], validation: [{ type: i0.Input, args: [{ isSignal: true, alias: "validation", required: false }] }], separatorLimit: [{ type: i0.Input, args: [{ isSignal: true, alias: "separatorLimit", required: false }] }], allowNegativeNumbers: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowNegativeNumbers", required: false }] }], leadZeroDateTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "leadZeroDateTime", required: false }] }], leadZero: [{ type: i0.Input, args: [{ isSignal: true, alias: "leadZero", required: false }] }], triggerOnMaskChange: [{ type: i0.Input, args: [{ isSignal: true, alias: "triggerOnMaskChange", required: false }] }], apm: [{ type: i0.Input, args: [{ isSignal: true, alias: "apm", required: false }] }], inputTransformFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputTransformFn", required: false }] }], outputTransformFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "outputTransformFn", required: false }] }], keepCharacterPositions: [{ type: i0.Input, args: [{ isSignal: true, alias: "keepCharacterPositions", required: false }] }], instantPrefix: [{ type: i0.Input, args: [{ isSignal: true, alias: "instantPrefix", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }, { type: i0.Output, args: ["touchedChange"] }], dirty: [{ type: i0.Input, args: [{ isSignal: true, alias: "dirty", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], pending: [{ type: i0.Input, args: [{ isSignal: true, alias: "pending", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], maskFilled: [{ type: i0.Output, args: ["maskFilled"] }], onPaste: [{
|
|
2506
2594
|
type: HostListener,
|
|
2507
2595
|
args: ['paste']
|
|
2508
2596
|
}], onFocus: [{
|
|
2509
2597
|
type: HostListener,
|
|
2510
|
-
args: ['focus'
|
|
2598
|
+
args: ['focus']
|
|
2511
2599
|
}], onModelChange: [{
|
|
2512
2600
|
type: HostListener,
|
|
2513
2601
|
args: ['ngModelChange', ['$event']]
|
|
@@ -2516,7 +2604,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImpor
|
|
|
2516
2604
|
args: ['input', ['$event']]
|
|
2517
2605
|
}], onCompositionStart: [{
|
|
2518
2606
|
type: HostListener,
|
|
2519
|
-
args: ['compositionstart'
|
|
2607
|
+
args: ['compositionstart']
|
|
2520
2608
|
}], onCompositionEnd: [{
|
|
2521
2609
|
type: HostListener,
|
|
2522
2610
|
args: ['compositionend', ['$event']]
|
|
@@ -2615,10 +2703,10 @@ class NgxMaskPipe {
|
|
|
2615
2703
|
});
|
|
2616
2704
|
}
|
|
2617
2705
|
}
|
|
2618
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2619
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
2706
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxMaskPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2707
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.1.1", ngImport: i0, type: NgxMaskPipe, isStandalone: true, name: "mask" });
|
|
2620
2708
|
}
|
|
2621
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2709
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxMaskPipe, decorators: [{
|
|
2622
2710
|
type: Pipe,
|
|
2623
2711
|
args: [{
|
|
2624
2712
|
name: 'mask',
|