Skip to content

Commit

Permalink
v13
Browse files Browse the repository at this point in the history
  • Loading branch information
andriikamaldinov1 committed Sep 21, 2023
1 parent 79753a0 commit 5b3582a
Show file tree
Hide file tree
Showing 13 changed files with 375 additions and 433 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 13.2.0(2023-09-19)
# 13.2.1(2023-09-19)

### Feature

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-mask",
"version": "13.2.0",
"version": "13.2.1",
"description": "Awesome ngx mask",
"license": "MIT",
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion projects/ngx-mask-lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-mask",
"version": "13.2.0",
"version": "13.2.1-test",
"description": "awesome ngx mask",
"keywords": [
"ng2-mask",
Expand Down
2 changes: 0 additions & 2 deletions projects/ngx-mask-lib/src/lib/ngx-mask-applier.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import { MaskExpression } from './ngx-mask-expression.enum';

@Injectable()
export class NgxMaskApplierService {
// protected _config = inject<IConfig>(NGX_MASK_CONFIG);

public dropSpecialCharacters: IConfig['dropSpecialCharacters'];

public hiddenInput: IConfig['hiddenInput'];
Expand Down
9 changes: 2 additions & 7 deletions projects/ngx-mask-lib/src/lib/ngx-mask.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import { MaskExpression } from './ngx-mask-expression.enum';
},
NgxMaskService,
],
exportAs: 'mask,ngxMask',
})
export class NgxMaskDirective implements ControlValueAccessor, OnChanges, Validator {
// eslint-disable-next-line @angular-eslint/no-input-rename
Expand Down Expand Up @@ -109,12 +110,6 @@ export class NgxMaskDirective implements ControlValueAccessor, OnChanges, Valida
/**For IME composition event */
private _isComposing = false;

// private readonly document = inject(DOCUMENT);

// public _maskService = inject(NgxMaskService, { self: true });

// protected _config = inject<IConfig>(NGX_MASK_CONFIG);

public constructor(
// tslint:disable-next-line
@Inject(DOCUMENT) private document: any,
Expand Down Expand Up @@ -869,7 +864,7 @@ export class NgxMaskDirective implements ControlValueAccessor, OnChanges, Valida
// // eslint-disable-next-line no-param-reassign
controlValue = controlValue.value;
}
console.log('decimal', this._maskService.decimalMarker);

if (controlValue !== null) {
// eslint-disable-next-line no-param-reassign
controlValue = this.inputTransformFn
Expand Down
2 changes: 1 addition & 1 deletion projects/ngx-mask-lib/src/lib/ngx-mask.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { MaskExpression } from './ngx-mask-expression.enum';
pure: true,
})
export class NgxMaskPipe implements PipeTransform {
public constructor(private _maskService: NgxMaskService) {}
public constructor(public _maskService: NgxMaskService) {}

private readonly defaultOptions: Partial<IConfig> = {};

Expand Down
19 changes: 4 additions & 15 deletions projects/ngx-mask-lib/src/lib/ngx-mask.service.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ElementRef, Inject, Injectable, Renderer2 } from '@angular/core';
import { ElementRef, Inject, Injectable, Optional, Renderer2 } from '@angular/core';
import { DOCUMENT } from '@angular/common';

import { NGX_MASK_CONFIG, IConfig } from './ngx-mask.config';
Expand Down Expand Up @@ -35,28 +35,17 @@ export class NgxMaskService extends NgxMaskApplierService {
private _previousValue = '';

private _currentValue = '';

// eslint-disable-next-line @typescript-eslint/no-empty-function, @typescript-eslint/no-explicit-any
public onChange = (_: any) => {};

// private readonly document = inject(DOCUMENT);
//
// protected override _config = inject<IConfig>(NGX_MASK_CONFIG);
//
// private readonly _elementRef = inject(ElementRef);
//
// private readonly _renderer = inject(Renderer2);

protected _formElement: HTMLInputElement;

public constructor(
// tslint:disable-next-line
@Inject(DOCUMENT) private document: any,
@Inject(NGX_MASK_CONFIG) protected override _config: IConfig,
private _elementRef: ElementRef,
private _renderer: Renderer2
@Optional() private _elementRef: ElementRef,
@Optional() private _renderer: Renderer2
) {
super(_config);
this._formElement = this._elementRef.nativeElement;
}

// eslint-disable-next-line complexity
Expand Down
Loading

0 comments on commit 5b3582a

Please sign in to comment.