ngx-mask 14.0.2 → 14.2.1
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/README.md +1 -1
- package/esm2020/lib/mask-applier.service.mjs +3 -3
- package/esm2020/lib/mask.directive.mjs +4 -4
- package/esm2020/lib/mask.pipe.mjs +3 -3
- package/esm2020/lib/mask.service.mjs +9 -8
- package/esm2020/lib/ngx-mask.module.mjs +4 -4
- package/fesm2015/ngx-mask.mjs +21 -20
- package/fesm2015/ngx-mask.mjs.map +1 -1
- package/fesm2020/ngx-mask.mjs +21 -20
- package/fesm2020/ngx-mask.mjs.map +1 -1
- package/lib/mask.directive.d.ts +2 -2
- package/lib/mask.service.d.ts +1 -0
- package/package.json +3 -5
package/fesm2015/ngx-mask.mjs
CHANGED
|
@@ -590,9 +590,9 @@ class MaskApplierService {
|
|
|
590
590
|
}));
|
|
591
591
|
}
|
|
592
592
|
}
|
|
593
|
-
MaskApplierService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
594
|
-
MaskApplierService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.
|
|
595
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
593
|
+
MaskApplierService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: MaskApplierService, deps: [{ token: config }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
594
|
+
MaskApplierService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: MaskApplierService });
|
|
595
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: MaskApplierService, decorators: [{
|
|
596
596
|
type: Injectable
|
|
597
597
|
}], ctorParameters: function () {
|
|
598
598
|
return [{ type: undefined, decorators: [{
|
|
@@ -949,15 +949,16 @@ class MaskService extends MaskApplierService {
|
|
|
949
949
|
_regExpForRemove(specialCharactersForRemove) {
|
|
950
950
|
return new RegExp(specialCharactersForRemove.map((item) => `\\${item}`).join('|'), 'gi');
|
|
951
951
|
}
|
|
952
|
+
_replaceDecimalMarkerToDot(value) {
|
|
953
|
+
const markers = Array.isArray(this.decimalMarker) ? this.decimalMarker : [this.decimalMarker];
|
|
954
|
+
return value.replace(this._regExpForRemove(markers), '.');
|
|
955
|
+
}
|
|
952
956
|
_checkSymbols(result) {
|
|
953
957
|
if (result === '') {
|
|
954
958
|
return result;
|
|
955
959
|
}
|
|
956
960
|
const separatorPrecision = this._retrieveSeparatorPrecision(this.maskExpression);
|
|
957
|
-
|
|
958
|
-
if (this.decimalMarker !== '.' && !Array.isArray(this.decimalMarker)) {
|
|
959
|
-
separatorValue = separatorValue.replace(this.decimalMarker, '.');
|
|
960
|
-
}
|
|
961
|
+
const separatorValue = this._replaceDecimalMarkerToDot(this._retrieveSeparatorValue(result));
|
|
961
962
|
if (!this.isNumberValue) {
|
|
962
963
|
return separatorValue;
|
|
963
964
|
}
|
|
@@ -983,9 +984,9 @@ class MaskService extends MaskApplierService {
|
|
|
983
984
|
return Number(separatorValue);
|
|
984
985
|
}
|
|
985
986
|
}
|
|
986
|
-
MaskService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
987
|
-
MaskService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.
|
|
988
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
987
|
+
MaskService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: MaskService, deps: [{ token: DOCUMENT }, { token: config }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
988
|
+
MaskService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: MaskService });
|
|
989
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: MaskService, decorators: [{
|
|
989
990
|
type: Injectable
|
|
990
991
|
}], ctorParameters: function () {
|
|
991
992
|
return [{ type: undefined, decorators: [{
|
|
@@ -1495,8 +1496,8 @@ class MaskDirective {
|
|
|
1495
1496
|
}
|
|
1496
1497
|
}
|
|
1497
1498
|
}
|
|
1498
|
-
MaskDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
1499
|
-
MaskDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.
|
|
1499
|
+
MaskDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: MaskDirective, deps: [{ token: DOCUMENT }, { token: MaskService }, { token: config }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1500
|
+
MaskDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.1", 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: [
|
|
1500
1501
|
{
|
|
1501
1502
|
provide: NG_VALUE_ACCESSOR,
|
|
1502
1503
|
useExisting: forwardRef(() => MaskDirective),
|
|
@@ -1509,7 +1510,7 @@ MaskDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version:
|
|
|
1509
1510
|
},
|
|
1510
1511
|
MaskService,
|
|
1511
1512
|
], exportAs: ["mask", "ngxMask"], usesOnChanges: true, ngImport: i0 });
|
|
1512
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
1513
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: MaskDirective, decorators: [{
|
|
1513
1514
|
type: Directive,
|
|
1514
1515
|
args: [{
|
|
1515
1516
|
selector: 'input[mask], textarea[mask]',
|
|
@@ -1614,9 +1615,9 @@ class MaskPipe {
|
|
|
1614
1615
|
return this._maskService.applyMaskWithPattern(`${value}`, mask);
|
|
1615
1616
|
}
|
|
1616
1617
|
}
|
|
1617
|
-
MaskPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
1618
|
-
MaskPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.
|
|
1619
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
1618
|
+
MaskPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: MaskPipe, deps: [{ token: MaskApplierService }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1619
|
+
MaskPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: MaskPipe, name: "mask" });
|
|
1620
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: MaskPipe, decorators: [{
|
|
1620
1621
|
type: Pipe,
|
|
1621
1622
|
args: [{
|
|
1622
1623
|
name: 'mask',
|
|
@@ -1659,10 +1660,10 @@ class NgxMaskModule {
|
|
|
1659
1660
|
};
|
|
1660
1661
|
}
|
|
1661
1662
|
}
|
|
1662
|
-
NgxMaskModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
1663
|
-
NgxMaskModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.
|
|
1664
|
-
NgxMaskModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.
|
|
1665
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
1663
|
+
NgxMaskModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: NgxMaskModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1664
|
+
NgxMaskModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: NgxMaskModule, declarations: [MaskDirective, MaskPipe], exports: [MaskDirective, MaskPipe] });
|
|
1665
|
+
NgxMaskModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: NgxMaskModule });
|
|
1666
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: NgxMaskModule, decorators: [{
|
|
1666
1667
|
type: NgModule,
|
|
1667
1668
|
args: [{
|
|
1668
1669
|
exports: [MaskDirective, MaskPipe],
|