ngx-mask 14.2.2 → 14.2.4

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.
@@ -27,7 +27,7 @@ export declare class MaskApplierService {
27
27
  private _shift;
28
28
  constructor(_config: IConfig);
29
29
  applyMaskWithPattern(inputValue: string, maskAndPattern: [string, IConfig['patterns']]): string;
30
- applyMask(inputValue: string | object | boolean | null | undefined, maskExpression: string, position?: number, justPasted?: boolean, backspaced?: boolean, cb?: Function): string;
30
+ applyMask(inputValue: string | object | boolean | null | undefined, maskExpression: string, position?: number, justPasted?: boolean, backspaced?: boolean, cb?: (...args: any[]) => any): string;
31
31
  _findSpecialChar(inputSymbol: string): undefined | string;
32
32
  protected _checkSymbolMask(inputSymbol: string, maskSymbol: string): boolean;
33
33
  private _formatWithSeparators;
@@ -8,7 +8,7 @@ export declare class MaskDirective implements ControlValueAccessor, OnChanges, V
8
8
  private document;
9
9
  _maskService: MaskService;
10
10
  protected _config: IConfig;
11
- maskExpression: string;
11
+ maskExpression: string | undefined | null;
12
12
  specialCharacters: IConfig['specialCharacters'];
13
13
  patterns: IConfig['patterns'];
14
14
  prefix: IConfig['prefix'];
@@ -36,13 +36,13 @@ export declare class MaskDirective implements ControlValueAccessor, OnChanges, V
36
36
  private _code;
37
37
  private _maskExpressionArray;
38
38
  private _justPasted;
39
- constructor(document: any, _maskService: MaskService, _config: IConfig);
39
+ constructor(document: Document, _maskService: MaskService, _config: IConfig);
40
40
  onChange: (_: any) => void;
41
41
  onTouch: () => void;
42
42
  ngOnChanges(changes: SimpleChanges): void;
43
43
  validate({ value }: FormControl): ValidationErrors | null;
44
44
  onPaste(): void;
45
- onModelChange(value: any): void;
45
+ onModelChange(value: string | undefined | null | number): void;
46
46
  onInput(e: CustomKeyboardEvent): void;
47
47
  onBlur(): void;
48
48
  onClick(e: MouseEvent | CustomKeyboardEvent): void;
@@ -52,8 +52,8 @@ export declare class MaskDirective implements ControlValueAccessor, OnChanges, V
52
52
  value: string | number;
53
53
  disable?: boolean;
54
54
  }): Promise<void>;
55
- registerOnChange(fn: any): void;
56
- registerOnTouched(fn: any): void;
55
+ registerOnChange(fn: typeof this.onChange): void;
56
+ registerOnTouched(fn: typeof this.onTouch): void;
57
57
  private _getActiveElement;
58
58
  checkSelectionOnDeletion(el: HTMLInputElement): void;
59
59
  /** It disables the input element */
@@ -21,10 +21,10 @@ export declare class MaskService extends MaskApplierService {
21
21
  maskChanged: boolean;
22
22
  triggerOnMaskChange: boolean;
23
23
  onChange: (_: any) => void;
24
- constructor(document: any, _config: IConfig, _elementRef: ElementRef, _renderer: Renderer2);
25
- applyMask(inputValue: string, maskExpression: string, position?: number, justPasted?: boolean, backspaced?: boolean, cb?: Function): string;
24
+ constructor(document: Document, _config: IConfig, _elementRef: ElementRef, _renderer: Renderer2);
25
+ applyMask(inputValue: string, maskExpression: string, position?: number, justPasted?: boolean, backspaced?: boolean, cb?: (...args: any[]) => any): string;
26
26
  private _numberSkipedSymbols;
27
- applyValueChanges(position: number, justPasted: boolean, backspaced: boolean, cb?: Function): void;
27
+ applyValueChanges(position: number, justPasted: boolean, backspaced: boolean, cb?: (...args: any[]) => any): void;
28
28
  hideInput(inputValue: string, maskExpression: string): string;
29
29
  getActualValue(res: string): string;
30
30
  shiftTypedSymbols(inputValue: string): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngx-mask",
3
- "version": "14.2.2",
3
+ "version": "14.2.4",
4
4
  "description": "awesome ngx mask",
5
5
  "keywords": [
6
6
  "ng2-mask",