ngx-mask 13.1.13 → 14.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/esm2020/lib/mask-applier.service.mjs +8 -4
- package/esm2020/lib/mask.directive.mjs +5 -5
- package/esm2020/lib/mask.pipe.mjs +3 -3
- package/esm2020/lib/mask.service.mjs +3 -3
- package/esm2020/lib/ngx-mask.module.mjs +4 -4
- package/fesm2015/ngx-mask.mjs +21 -17
- package/fesm2015/ngx-mask.mjs.map +1 -1
- package/fesm2020/ngx-mask.mjs +21 -17
- package/fesm2020/ngx-mask.mjs.map +1 -1
- package/lib/mask.directive.d.ts +3 -3
- package/lib/mask.pipe.d.ts +1 -1
- package/package.json +3 -3
- package/ngx-mask.d.ts +0 -5
package/fesm2020/ngx-mask.mjs
CHANGED
|
@@ -459,6 +459,10 @@ class MaskApplierService {
|
|
|
459
459
|
result += inputSymbol;
|
|
460
460
|
cursor++;
|
|
461
461
|
}
|
|
462
|
+
else if (inputSymbol === ' ' && maskExpression[cursor] === ' ') {
|
|
463
|
+
result += inputSymbol;
|
|
464
|
+
cursor++;
|
|
465
|
+
}
|
|
462
466
|
else if (this.maskSpecialCharacters.indexOf(maskExpression[cursor]) !== -1) {
|
|
463
467
|
result += maskExpression[cursor];
|
|
464
468
|
cursor++;
|
|
@@ -573,9 +577,9 @@ class MaskApplierService {
|
|
|
573
577
|
: value === comparedValue;
|
|
574
578
|
}
|
|
575
579
|
}
|
|
576
|
-
MaskApplierService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
577
|
-
MaskApplierService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
578
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
580
|
+
MaskApplierService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: MaskApplierService, deps: [{ token: config }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
581
|
+
MaskApplierService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: MaskApplierService });
|
|
582
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: MaskApplierService, decorators: [{
|
|
579
583
|
type: Injectable
|
|
580
584
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
581
585
|
type: Inject,
|
|
@@ -960,9 +964,9 @@ class MaskService extends MaskApplierService {
|
|
|
960
964
|
return Number(separatorValue);
|
|
961
965
|
}
|
|
962
966
|
}
|
|
963
|
-
MaskService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
964
|
-
MaskService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
965
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
967
|
+
MaskService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: MaskService, deps: [{ token: DOCUMENT }, { token: config }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
968
|
+
MaskService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: MaskService });
|
|
969
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: MaskService, decorators: [{
|
|
966
970
|
type: Injectable
|
|
967
971
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
968
972
|
type: Inject,
|
|
@@ -1174,7 +1178,7 @@ class MaskDirective {
|
|
|
1174
1178
|
}
|
|
1175
1179
|
onModelChange(value) {
|
|
1176
1180
|
// on form reset we need to update the actualValue
|
|
1177
|
-
if (
|
|
1181
|
+
if ((value === '' || value === null || value === undefined) && this._maskService.actualValue) {
|
|
1178
1182
|
this._maskService.actualValue = this._maskService.getActualValue('');
|
|
1179
1183
|
}
|
|
1180
1184
|
}
|
|
@@ -1465,8 +1469,8 @@ class MaskDirective {
|
|
|
1465
1469
|
}
|
|
1466
1470
|
}
|
|
1467
1471
|
}
|
|
1468
|
-
MaskDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1469
|
-
MaskDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
1472
|
+
MaskDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: MaskDirective, deps: [{ token: DOCUMENT }, { token: MaskService }, { token: config }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1473
|
+
MaskDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.0", type: MaskDirective, selector: "input[mask], textarea[mask]", inputs: { maskExpression: ["mask", "maskExpression"], specialCharacters: "specialCharacters", patterns: "patterns", prefix: "prefix", suffix: "suffix", thousandSeparator: "thousandSeparator", decimalMarker: "decimalMarker", dropSpecialCharacters: "dropSpecialCharacters", hiddenInput: "hiddenInput", showMaskTyped: "showMaskTyped", placeHolderCharacter: "placeHolderCharacter", shownMaskExpression: "shownMaskExpression", showTemplate: "showTemplate", clearIfNotMatch: "clearIfNotMatch", validation: "validation", separatorLimit: "separatorLimit", allowNegativeNumbers: "allowNegativeNumbers", leadZeroDateTime: "leadZeroDateTime", triggerOnMaskChange: "triggerOnMaskChange" }, outputs: { maskFilled: "maskFilled" }, host: { listeners: { "paste": "onPaste()", "ngModelChange": "onModelChange($event)", "input": "onInput($event)", "blur": "onBlur()", "click": "onClick($event)", "keydown": "onKeyDown($event)" } }, providers: [
|
|
1470
1474
|
{
|
|
1471
1475
|
provide: NG_VALUE_ACCESSOR,
|
|
1472
1476
|
useExisting: forwardRef(() => MaskDirective),
|
|
@@ -1479,7 +1483,7 @@ MaskDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version:
|
|
|
1479
1483
|
},
|
|
1480
1484
|
MaskService,
|
|
1481
1485
|
], exportAs: ["mask", "ngxMask"], usesOnChanges: true, ngImport: i0 });
|
|
1482
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1486
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: MaskDirective, decorators: [{
|
|
1483
1487
|
type: Directive,
|
|
1484
1488
|
args: [{
|
|
1485
1489
|
selector: 'input[mask], textarea[mask]',
|
|
@@ -1582,9 +1586,9 @@ class MaskPipe {
|
|
|
1582
1586
|
return this._maskService.applyMaskWithPattern(`${value}`, mask);
|
|
1583
1587
|
}
|
|
1584
1588
|
}
|
|
1585
|
-
MaskPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1586
|
-
MaskPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "
|
|
1587
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1589
|
+
MaskPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: MaskPipe, deps: [{ token: MaskApplierService }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1590
|
+
MaskPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.0.0", ngImport: i0, type: MaskPipe, name: "mask" });
|
|
1591
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: MaskPipe, decorators: [{
|
|
1588
1592
|
type: Pipe,
|
|
1589
1593
|
args: [{
|
|
1590
1594
|
name: 'mask',
|
|
@@ -1628,10 +1632,10 @@ class NgxMaskModule {
|
|
|
1628
1632
|
};
|
|
1629
1633
|
}
|
|
1630
1634
|
}
|
|
1631
|
-
NgxMaskModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1632
|
-
NgxMaskModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
1633
|
-
NgxMaskModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1634
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1635
|
+
NgxMaskModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: NgxMaskModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1636
|
+
NgxMaskModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.0", ngImport: i0, type: NgxMaskModule, declarations: [MaskDirective, MaskPipe], exports: [MaskDirective, MaskPipe] });
|
|
1637
|
+
NgxMaskModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: NgxMaskModule });
|
|
1638
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: NgxMaskModule, decorators: [{
|
|
1635
1639
|
type: NgModule,
|
|
1636
1640
|
args: [{
|
|
1637
1641
|
exports: [MaskDirective, MaskPipe],
|