matcha-components 19.108.0 → 19.110.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/matcha-components.mjs +22 -4217
- package/fesm2022/matcha-components.mjs.map +1 -1
- package/lib/matcha-components.module.d.ts +23 -24
- package/package.json +1 -1
- package/public-api.d.ts +0 -2
- package/lib/matcha-input-phone/all-countries.d.ts +0 -8
- package/lib/matcha-input-phone/input-phone.component.d.ts +0 -69
- package/lib/matcha-input-phone/input-phone.module.d.ts +0 -11
- package/lib/matcha-input-phone/lib/custom-keyboard-event.d.ts +0 -1
- package/lib/matcha-input-phone/lib/ngx-mask-applier.service.d.ts +0 -55
- package/lib/matcha-input-phone/lib/ngx-mask-expression.enum.d.ts +0 -43
- package/lib/matcha-input-phone/lib/ngx-mask.config.d.ts +0 -40
- package/lib/matcha-input-phone/lib/ngx-mask.directive.d.ts +0 -78
- package/lib/matcha-input-phone/lib/ngx-mask.module.d.ts +0 -11
- package/lib/matcha-input-phone/lib/ngx-mask.pipe.d.ts +0 -13
- package/lib/matcha-input-phone/lib/ngx-mask.service.d.ts +0 -83
|
@@ -17,31 +17,30 @@ import * as i15 from "./matcha-hint-text/hint.module";
|
|
|
17
17
|
import * as i16 from "./matcha-icon/icon.module";
|
|
18
18
|
import * as i17 from "./matcha-infinite-scroll/matcha-infinite-scroll.module";
|
|
19
19
|
import * as i18 from "./matcha-input/input.module";
|
|
20
|
-
import * as i19 from "./matcha-
|
|
21
|
-
import * as i20 from "./matcha-
|
|
22
|
-
import * as i21 from "./matcha-
|
|
23
|
-
import * as i22 from "./matcha-
|
|
24
|
-
import * as i23 from "./matcha-
|
|
25
|
-
import * as i24 from "./matcha-
|
|
26
|
-
import * as i25 from "./matcha-
|
|
27
|
-
import * as i26 from "./matcha-
|
|
28
|
-
import * as i27 from "./matcha-
|
|
29
|
-
import * as i28 from "./matcha-
|
|
30
|
-
import * as i29 from "./matcha-
|
|
31
|
-
import * as i30 from "./matcha-
|
|
32
|
-
import * as i31 from "./matcha-
|
|
33
|
-
import * as i32 from "./matcha-
|
|
34
|
-
import * as i33 from "./matcha-
|
|
35
|
-
import * as i34 from "./matcha-
|
|
36
|
-
import * as i35 from "./matcha-
|
|
37
|
-
import * as i36 from "./matcha-
|
|
38
|
-
import * as i37 from "./matcha-
|
|
39
|
-
import * as i38 from "./matcha-
|
|
40
|
-
import * as i39 from "./matcha-
|
|
41
|
-
import * as i40 from "./matcha-
|
|
42
|
-
import * as i41 from "./matcha-time/time.module";
|
|
20
|
+
import * as i19 from "./matcha-masonry/masonry.module";
|
|
21
|
+
import * as i20 from "./matcha-menu/menu.module";
|
|
22
|
+
import * as i21 from "./matcha-modal/matcha-modal.module";
|
|
23
|
+
import * as i22 from "./matcha-paginator/paginator.module";
|
|
24
|
+
import * as i23 from "./matcha-progress-bar/progress-bar.module";
|
|
25
|
+
import * as i24 from "./matcha-radio-button/radio-button.module";
|
|
26
|
+
import * as i25 from "./matcha-ripple/ripple.module";
|
|
27
|
+
import * as i26 from "./matcha-select/select.module";
|
|
28
|
+
import * as i27 from "./matcha-sidenav/sidenav.module";
|
|
29
|
+
import * as i28 from "./matcha-slide-toggle/slide-toggle.module";
|
|
30
|
+
import * as i29 from "./matcha-slider/slider.module";
|
|
31
|
+
import * as i30 from "./matcha-snackbar/snack-bar.module";
|
|
32
|
+
import * as i31 from "./matcha-sort-header/sort-header.module";
|
|
33
|
+
import * as i32 from "./matcha-spin/spin.module";
|
|
34
|
+
import * as i33 from "./matcha-stepper/stepper.module";
|
|
35
|
+
import * as i34 from "./matcha-table/table.module";
|
|
36
|
+
import * as i35 from "./matcha-tabs/tabs.module";
|
|
37
|
+
import * as i36 from "./matcha-title/title.module";
|
|
38
|
+
import * as i37 from "./matcha-tooltip/tooltip.module";
|
|
39
|
+
import * as i38 from "./matcha-tree/tree.module";
|
|
40
|
+
import * as i39 from "./matcha-date/date.module";
|
|
41
|
+
import * as i40 from "./matcha-time/time.module";
|
|
43
42
|
export declare class MatchaComponentsModule {
|
|
44
43
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatchaComponentsModule, never>;
|
|
45
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<MatchaComponentsModule, [typeof i1.MatchaOverflowDraggableComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i3.ReactiveFormsModule, typeof i4.MatchaAccordionModule, typeof i5.MatchaBadgeModule, typeof i6.MatchaButtonModule, typeof i7.MatchaButtonToggleModule, typeof i8.MatchaCardModule, typeof i9.MatchaCheckboxModule, typeof i10.MatchaChipsModule, typeof i11.MatchaDatepickerModule, typeof i12.MatchaDividerModule, typeof i13.MatchaElevationModule, typeof i14.MatchaFormFieldModule, typeof i15.MatchaHintTextModule, typeof i16.MatchaIconModule, typeof i17.MatchaInfiniteScrollModule, typeof i18.MatchaInputModule, typeof i19.
|
|
44
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<MatchaComponentsModule, [typeof i1.MatchaOverflowDraggableComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i3.ReactiveFormsModule, typeof i4.MatchaAccordionModule, typeof i5.MatchaBadgeModule, typeof i6.MatchaButtonModule, typeof i7.MatchaButtonToggleModule, typeof i8.MatchaCardModule, typeof i9.MatchaCheckboxModule, typeof i10.MatchaChipsModule, typeof i11.MatchaDatepickerModule, typeof i12.MatchaDividerModule, typeof i13.MatchaElevationModule, typeof i14.MatchaFormFieldModule, typeof i15.MatchaHintTextModule, typeof i16.MatchaIconModule, typeof i17.MatchaInfiniteScrollModule, typeof i18.MatchaInputModule, typeof i19.MatchaMasonryModule, typeof i20.MatchaMenuModule, typeof i21.MatchaModalModule, typeof i22.MatchaPaginatorModule, typeof i23.MatchaProgressBarModule, typeof i24.MatchaRadioButtonModule, typeof i25.MatchaRippleModule, typeof i26.MatchaSelectModule, typeof i27.MatchaSidenavModule, typeof i28.MatchaSlideToggleModule, typeof i29.MatchaSliderModule, typeof i30.MatchaSnackBarModule, typeof i31.MatchaSortHeaderModule, typeof i32.MatchaSpinModule, typeof i33.MatchaStepperModule, typeof i34.MatchaTableModule, typeof i35.MatchaTabsModule, typeof i36.MatchaTitleModule, typeof i37.MatchaTooltipModule, typeof i38.MatchaTreeModule, typeof i39.MatchaDateModule, typeof i40.MatchaTimeModule], [typeof i4.MatchaAccordionModule, typeof i5.MatchaBadgeModule, typeof i6.MatchaButtonModule, typeof i7.MatchaButtonToggleModule, typeof i8.MatchaCardModule, typeof i9.MatchaCheckboxModule, typeof i10.MatchaChipsModule, typeof i11.MatchaDatepickerModule, typeof i12.MatchaDividerModule, typeof i13.MatchaElevationModule, typeof i14.MatchaFormFieldModule, typeof i15.MatchaHintTextModule, typeof i16.MatchaIconModule, typeof i17.MatchaInfiniteScrollModule, typeof i18.MatchaInputModule, typeof i19.MatchaMasonryModule, typeof i20.MatchaMenuModule, typeof i21.MatchaModalModule, typeof i22.MatchaPaginatorModule, typeof i23.MatchaProgressBarModule, typeof i24.MatchaRadioButtonModule, typeof i25.MatchaRippleModule, typeof i26.MatchaSelectModule, typeof i27.MatchaSidenavModule, typeof i28.MatchaSlideToggleModule, typeof i29.MatchaSliderModule, typeof i30.MatchaSnackBarModule, typeof i31.MatchaSortHeaderModule, typeof i32.MatchaSpinModule, typeof i33.MatchaStepperModule, typeof i34.MatchaTableModule, typeof i35.MatchaTabsModule, typeof i36.MatchaTitleModule, typeof i37.MatchaTooltipModule, typeof i38.MatchaTreeModule, typeof i39.MatchaDateModule, typeof i40.MatchaTimeModule]>;
|
|
46
45
|
static ɵinj: i0.ɵɵInjectorDeclaration<MatchaComponentsModule>;
|
|
47
46
|
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -34,7 +34,6 @@ export * from './lib/matcha-tabs/tabs/tabs.component';
|
|
|
34
34
|
export * from './lib/matcha-tabs/tab-item/tab-item.component';
|
|
35
35
|
export * from './lib/matcha-date/date/date.component';
|
|
36
36
|
export * from './lib/matcha-time/time/time.component';
|
|
37
|
-
export * from './lib/matcha-input-phone/input-phone.component';
|
|
38
37
|
export * from './lib/matcha-stepper/step/step.component';
|
|
39
38
|
export * from './lib/matcha-stepper/stepper/stepper.component';
|
|
40
39
|
export * from './lib/matcha-stepper/stepper-content/stepper-content.component';
|
|
@@ -77,7 +76,6 @@ export * from './lib/matcha-tree/tree.module';
|
|
|
77
76
|
export * from './lib/matcha-ripple/ripple.module';
|
|
78
77
|
export * from './lib/matcha-spin/spin.module';
|
|
79
78
|
export * from './lib/matcha-hint-text/hint.module';
|
|
80
|
-
export * from './lib/matcha-input-phone/input-phone.module';
|
|
81
79
|
export * from './lib/matcha-modal/modal.service';
|
|
82
80
|
export * from './lib/matcha-modal/overlay.service';
|
|
83
81
|
export * from './lib/matcha-date/date.module';
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Componente MatchaInputPhone
|
|
3
|
-
*
|
|
4
|
-
* Componente Angular para entrada de telefone internacional com seleção de país, máscara dinâmica e exibição de bandeira.
|
|
5
|
-
*
|
|
6
|
-
* Funcionalidades:
|
|
7
|
-
* - Seleção de país com dropdown e bandeira.
|
|
8
|
-
* - Máscara dinâmica de acordo com o país e DDD digitado.
|
|
9
|
-
* - Suporte a diferentes formatos de telefone (fixo/celular) para o Brasil.
|
|
10
|
-
* - Emissão de evento ao alterar o valor do telefone.
|
|
11
|
-
* - Inicialização automática pelo valor informado ou pelo idioma do navegador.
|
|
12
|
-
*
|
|
13
|
-
* Inputs:
|
|
14
|
-
* - fallbackMask: string - Máscara padrão caso não seja encontrada uma específica.
|
|
15
|
-
* - label: string - Rótulo do campo (padrão: 'Telefone').
|
|
16
|
-
* - value: string - Valor inicial do telefone (com ou sem DDI).
|
|
17
|
-
*
|
|
18
|
-
* Outputs:
|
|
19
|
-
* - onChange: EventEmitter<string> - Emite o valor do telefone completo (com DDI) ao alterar.
|
|
20
|
-
*
|
|
21
|
-
* ViewChild:
|
|
22
|
-
* - inputSelector: ElementRef - Referência ao container do input (usado para fechar o dropdown).
|
|
23
|
-
* - phoneRef: ElementRef - Referência ao input do telefone.
|
|
24
|
-
*
|
|
25
|
-
* Métodos principais:
|
|
26
|
-
* - ngOnInit: Inicializa o componente pelo valor ou idioma.
|
|
27
|
-
* - ngOnChanges: Atualiza o valor ao receber novo input externo.
|
|
28
|
-
* - initCountryPhone: Inicializa país e máscara pelo valor do telefone.
|
|
29
|
-
* - selectMaskForDialCode: Seleciona a máscara conforme país e DDD.
|
|
30
|
-
* - selectCountry: Troca o país selecionado e atualiza máscara.
|
|
31
|
-
* - onInput: Atualiza máscara e emite evento ao digitar.
|
|
32
|
-
* - toggleDropdown: Abre/fecha o dropdown de países.
|
|
33
|
-
*/
|
|
34
|
-
import { Renderer2, OnChanges, OnDestroy, OnInit, SimpleChanges, ElementRef, EventEmitter, ChangeDetectorRef } from '@angular/core';
|
|
35
|
-
import * as i0 from "@angular/core";
|
|
36
|
-
export declare class MatchaInputPhoneComponent implements OnInit, OnDestroy, OnChanges {
|
|
37
|
-
private renderer;
|
|
38
|
-
private cdr;
|
|
39
|
-
inputSelector: ElementRef;
|
|
40
|
-
phoneRef: ElementRef;
|
|
41
|
-
fallbackMask: string;
|
|
42
|
-
value?: string;
|
|
43
|
-
onChange: EventEmitter<string>;
|
|
44
|
-
typeMask: string;
|
|
45
|
-
labelHover: string;
|
|
46
|
-
allCountries: any[];
|
|
47
|
-
isOpen: boolean;
|
|
48
|
-
selectedCountry: any;
|
|
49
|
-
inputValueModel: string;
|
|
50
|
-
private clickListener;
|
|
51
|
-
isInitialized: boolean;
|
|
52
|
-
constructor(renderer: Renderer2, cdr: ChangeDetectorRef);
|
|
53
|
-
ngOnInit(): void;
|
|
54
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
55
|
-
initCountryPhone(phone: string): void;
|
|
56
|
-
private setCountryAndInputValue;
|
|
57
|
-
private matchCountryAndSetInputValue;
|
|
58
|
-
private getMatchingCountry;
|
|
59
|
-
private matchAreaCodeAndSetInputValue;
|
|
60
|
-
selectMaskForDialCode(inputDigits: string, targetValuePhone?: string): void;
|
|
61
|
-
initCountrylanguageNavigator(): void;
|
|
62
|
-
selectCountry(country: any): void;
|
|
63
|
-
toggleDropdown(): void;
|
|
64
|
-
private removeClickListener;
|
|
65
|
-
onInput(event: any): void;
|
|
66
|
-
ngOnDestroy(): void;
|
|
67
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MatchaInputPhoneComponent, never>;
|
|
68
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MatchaInputPhoneComponent, "matcha-input-phone", never, { "fallbackMask": { "alias": "fallbackMask"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "onChange": "onChange"; }, never, never, false, never>;
|
|
69
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./input-phone.component";
|
|
3
|
-
import * as i2 from "@angular/common";
|
|
4
|
-
import * as i3 from "../matcha-form-field/matcha-form-field.module";
|
|
5
|
-
import * as i4 from "@angular/forms";
|
|
6
|
-
import * as i5 from "./lib/ngx-mask.module";
|
|
7
|
-
export declare class MatchaInputPhoneModule {
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MatchaInputPhoneModule, never>;
|
|
9
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<MatchaInputPhoneModule, [typeof i1.MatchaInputPhoneComponent], [typeof i2.CommonModule, typeof i3.MatchaFormFieldModule, typeof i4.FormsModule, typeof i5.NgxMaskModule], [typeof i1.MatchaInputPhoneComponent]>;
|
|
10
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<MatchaInputPhoneModule>;
|
|
11
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type CustomKeyboardEvent = KeyboardEvent;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import type { NgxMaskConfig } from './ngx-mask.config';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class NgxMaskApplierService {
|
|
4
|
-
protected _config: NgxMaskConfig;
|
|
5
|
-
dropSpecialCharacters: NgxMaskConfig['dropSpecialCharacters'];
|
|
6
|
-
hiddenInput: NgxMaskConfig['hiddenInput'];
|
|
7
|
-
clearIfNotMatch: NgxMaskConfig['clearIfNotMatch'];
|
|
8
|
-
specialCharacters: NgxMaskConfig['specialCharacters'];
|
|
9
|
-
patterns: NgxMaskConfig['patterns'];
|
|
10
|
-
prefix: NgxMaskConfig['prefix'];
|
|
11
|
-
suffix: NgxMaskConfig['suffix'];
|
|
12
|
-
thousandSeparator: NgxMaskConfig['thousandSeparator'];
|
|
13
|
-
decimalMarker: NgxMaskConfig['decimalMarker'];
|
|
14
|
-
customPattern: NgxMaskConfig['patterns'];
|
|
15
|
-
showMaskTyped: NgxMaskConfig['showMaskTyped'];
|
|
16
|
-
placeHolderCharacter: NgxMaskConfig['placeHolderCharacter'];
|
|
17
|
-
validation: NgxMaskConfig['validation'];
|
|
18
|
-
separatorLimit: NgxMaskConfig['separatorLimit'];
|
|
19
|
-
allowNegativeNumbers: NgxMaskConfig['allowNegativeNumbers'];
|
|
20
|
-
leadZeroDateTime: NgxMaskConfig['leadZeroDateTime'];
|
|
21
|
-
leadZero: NgxMaskConfig['leadZero'];
|
|
22
|
-
apm: NgxMaskConfig['apm'];
|
|
23
|
-
inputTransformFn: NgxMaskConfig['inputTransformFn'] | null;
|
|
24
|
-
outputTransformFn: NgxMaskConfig['outputTransformFn'] | null;
|
|
25
|
-
keepCharacterPositions: NgxMaskConfig['keepCharacterPositions'];
|
|
26
|
-
instantPrefix: NgxMaskConfig['instantPrefix'];
|
|
27
|
-
triggerOnMaskChange: NgxMaskConfig['triggerOnMaskChange'];
|
|
28
|
-
private _shift;
|
|
29
|
-
plusOnePosition: boolean;
|
|
30
|
-
maskExpression: string;
|
|
31
|
-
actualValue: string;
|
|
32
|
-
showKeepCharacterExp: string;
|
|
33
|
-
shownMaskExpression: NgxMaskConfig['shownMaskExpression'];
|
|
34
|
-
deletedSpecialCharacter: boolean;
|
|
35
|
-
ipError?: boolean;
|
|
36
|
-
cpfCnpjError?: boolean;
|
|
37
|
-
applyMask(inputValue: string | object | boolean | null | undefined, maskExpression: string, position?: number, justPasted?: boolean, backspaced?: boolean, cb?: (...args: any[]) => any): string;
|
|
38
|
-
_findDropSpecialChar(inputSymbol: string): undefined | string;
|
|
39
|
-
_findSpecialChar(inputSymbol: string): undefined | string;
|
|
40
|
-
_checkSymbolMask(inputSymbol: string, maskSymbol: string): boolean;
|
|
41
|
-
private _formatWithSeparators;
|
|
42
|
-
private percentage;
|
|
43
|
-
getPrecision: (maskExpression: string) => number;
|
|
44
|
-
private checkAndRemoveSuffix;
|
|
45
|
-
private checkInputPrecision;
|
|
46
|
-
private _stripToDecimal;
|
|
47
|
-
private _charToRegExpExpression;
|
|
48
|
-
private _shiftStep;
|
|
49
|
-
protected _compareOrIncludes<T>(value: T, comparedValue: T | T[], excludedValue: T): boolean;
|
|
50
|
-
private _validIP;
|
|
51
|
-
private _splitPercentZero;
|
|
52
|
-
private _findFirstNonZeroAndDecimalIndex;
|
|
53
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgxMaskApplierService, never>;
|
|
54
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<NgxMaskApplierService>;
|
|
55
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
export declare const enum MaskExpression {
|
|
2
|
-
SEPARATOR = "separator",
|
|
3
|
-
PERCENT = "percent",
|
|
4
|
-
IP = "IP",
|
|
5
|
-
CPF_CNPJ = "CPF_CNPJ",
|
|
6
|
-
MONTH = "M",
|
|
7
|
-
MONTHS = "M0",
|
|
8
|
-
MINUTE = "m",
|
|
9
|
-
HOUR = "h",
|
|
10
|
-
HOURS = "H",
|
|
11
|
-
MINUTES = "m0",
|
|
12
|
-
HOURS_HOUR = "Hh",
|
|
13
|
-
SECONDS = "s0",
|
|
14
|
-
HOURS_MINUTES_SECONDS = "Hh:m0:s0",
|
|
15
|
-
EMAIL_MASK = "A*@A*.A*",
|
|
16
|
-
HOURS_MINUTES = "Hh:m0",
|
|
17
|
-
MINUTES_SECONDS = "m0:s0",
|
|
18
|
-
DAYS_MONTHS_YEARS = "d0/M0/0000",
|
|
19
|
-
DAYS_MONTHS = "d0/M0",
|
|
20
|
-
DAYS = "d0",
|
|
21
|
-
DAY = "d",
|
|
22
|
-
SECOND = "s",
|
|
23
|
-
LETTER_S = "S",
|
|
24
|
-
DOT = ".",
|
|
25
|
-
COMMA = ",",
|
|
26
|
-
CURLY_BRACKETS_LEFT = "{",
|
|
27
|
-
CURLY_BRACKETS_RIGHT = "}",
|
|
28
|
-
MINUS = "-",
|
|
29
|
-
OR = "||",
|
|
30
|
-
HASH = "#",
|
|
31
|
-
EMPTY_STRING = "",
|
|
32
|
-
SYMBOL_STAR = "*",
|
|
33
|
-
SYMBOL_QUESTION = "?",
|
|
34
|
-
SLASH = "/",
|
|
35
|
-
WHITE_SPACE = " ",
|
|
36
|
-
NUMBER_ZERO = "0",
|
|
37
|
-
NUMBER_NINE = "9",
|
|
38
|
-
BACKSPACE = "Backspace",
|
|
39
|
-
DELETE = "Delete",
|
|
40
|
-
ARROW_LEFT = "ArrowLeft",
|
|
41
|
-
ARROW_UP = "ArrowUp",
|
|
42
|
-
DOUBLE_ZERO = "00"
|
|
43
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { EventEmitter, InjectionToken } from '@angular/core';
|
|
2
|
-
export type InputTransformFn = (value: unknown) => string | number;
|
|
3
|
-
export type OutputTransformFn = (value: string | number | undefined | null) => unknown;
|
|
4
|
-
export type NgxMaskConfig = {
|
|
5
|
-
suffix: string;
|
|
6
|
-
prefix: string;
|
|
7
|
-
thousandSeparator: string;
|
|
8
|
-
decimalMarker: '.' | ',' | ['.', ','];
|
|
9
|
-
clearIfNotMatch: boolean;
|
|
10
|
-
showMaskTyped: boolean;
|
|
11
|
-
placeHolderCharacter: string;
|
|
12
|
-
shownMaskExpression: string;
|
|
13
|
-
specialCharacters: string[] | readonly string[];
|
|
14
|
-
dropSpecialCharacters: boolean | string[] | readonly string[];
|
|
15
|
-
hiddenInput: boolean;
|
|
16
|
-
validation: boolean;
|
|
17
|
-
instantPrefix: boolean;
|
|
18
|
-
separatorLimit: string;
|
|
19
|
-
apm: boolean;
|
|
20
|
-
allowNegativeNumbers: boolean;
|
|
21
|
-
leadZeroDateTime: boolean;
|
|
22
|
-
leadZero: boolean;
|
|
23
|
-
triggerOnMaskChange: boolean;
|
|
24
|
-
keepCharacterPositions: boolean;
|
|
25
|
-
inputTransformFn: InputTransformFn;
|
|
26
|
-
outputTransformFn: OutputTransformFn;
|
|
27
|
-
maskFilled: EventEmitter<void>;
|
|
28
|
-
patterns: Record<string, {
|
|
29
|
-
pattern: RegExp;
|
|
30
|
-
optional?: boolean;
|
|
31
|
-
symbol?: string;
|
|
32
|
-
}>;
|
|
33
|
-
};
|
|
34
|
-
export type NgxMaskOptions = Partial<NgxMaskConfig>;
|
|
35
|
-
export declare const NGX_MASK_CONFIG: InjectionToken<NgxMaskConfig>;
|
|
36
|
-
export declare const NEW_CONFIG: InjectionToken<NgxMaskConfig>;
|
|
37
|
-
export declare const INITIAL_CONFIG: InjectionToken<NgxMaskConfig>;
|
|
38
|
-
export declare const initialConfig: NgxMaskConfig;
|
|
39
|
-
export declare const timeMasks: string[];
|
|
40
|
-
export declare const withoutValidation: string[];
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import type { OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
-
import type { ControlValueAccessor, FormControl, ValidationErrors, Validator } from '@angular/forms';
|
|
3
|
-
import type { CustomKeyboardEvent } from './custom-keyboard-event';
|
|
4
|
-
import type { NgxMaskConfig } from './ngx-mask.config';
|
|
5
|
-
import { NgxMaskService } from './ngx-mask.service';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class NgxMaskDirective implements ControlValueAccessor, OnChanges, Validator {
|
|
8
|
-
mask: import("@angular/core").InputSignal<string | null | undefined>;
|
|
9
|
-
specialCharacters: import("@angular/core").InputSignal<string[] | readonly string[]>;
|
|
10
|
-
patterns: import("@angular/core").InputSignal<Record<string, {
|
|
11
|
-
pattern: RegExp;
|
|
12
|
-
optional?: boolean;
|
|
13
|
-
symbol?: string;
|
|
14
|
-
}>>;
|
|
15
|
-
prefix: import("@angular/core").InputSignal<string>;
|
|
16
|
-
suffix: import("@angular/core").InputSignal<string>;
|
|
17
|
-
thousandSeparator: import("@angular/core").InputSignal<string>;
|
|
18
|
-
decimalMarker: import("@angular/core").InputSignal<"," | "." | [".", ","]>;
|
|
19
|
-
dropSpecialCharacters: import("@angular/core").InputSignal<boolean | string[] | readonly string[] | null>;
|
|
20
|
-
hiddenInput: import("@angular/core").InputSignal<boolean | null>;
|
|
21
|
-
showMaskTyped: import("@angular/core").InputSignal<boolean | null>;
|
|
22
|
-
placeHolderCharacter: import("@angular/core").InputSignal<string | null>;
|
|
23
|
-
shownMaskExpression: import("@angular/core").InputSignal<string | null>;
|
|
24
|
-
clearIfNotMatch: import("@angular/core").InputSignal<boolean | null>;
|
|
25
|
-
validation: import("@angular/core").InputSignal<boolean | null>;
|
|
26
|
-
separatorLimit: import("@angular/core").InputSignal<string | null>;
|
|
27
|
-
allowNegativeNumbers: import("@angular/core").InputSignal<boolean | null>;
|
|
28
|
-
leadZeroDateTime: import("@angular/core").InputSignal<boolean | null>;
|
|
29
|
-
leadZero: import("@angular/core").InputSignal<boolean | null>;
|
|
30
|
-
triggerOnMaskChange: import("@angular/core").InputSignal<boolean | null>;
|
|
31
|
-
apm: import("@angular/core").InputSignal<boolean | null>;
|
|
32
|
-
inputTransformFn: import("@angular/core").InputSignal<import("./ngx-mask.config").InputTransformFn | null>;
|
|
33
|
-
outputTransformFn: import("@angular/core").InputSignal<import("./ngx-mask.config").OutputTransformFn | null>;
|
|
34
|
-
keepCharacterPositions: import("@angular/core").InputSignal<boolean | null>;
|
|
35
|
-
instantPrefix: import("@angular/core").InputSignal<boolean | null>;
|
|
36
|
-
maskFilled: import("@angular/core").OutputEmitterRef<void>;
|
|
37
|
-
private _maskValue;
|
|
38
|
-
private _inputValue;
|
|
39
|
-
private _position;
|
|
40
|
-
private _code;
|
|
41
|
-
private _maskExpressionArray;
|
|
42
|
-
private _justPasted;
|
|
43
|
-
private _isFocused;
|
|
44
|
-
/**For IME composition event */
|
|
45
|
-
private _isComposing;
|
|
46
|
-
_maskService: NgxMaskService;
|
|
47
|
-
private readonly document;
|
|
48
|
-
protected _config: NgxMaskConfig;
|
|
49
|
-
onChange: (_: any) => void;
|
|
50
|
-
onTouch: () => void;
|
|
51
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
52
|
-
validate({ value }: FormControl): ValidationErrors | null;
|
|
53
|
-
onPaste(): void;
|
|
54
|
-
onFocus(): void;
|
|
55
|
-
onModelChange(value: string | undefined | null | number): void;
|
|
56
|
-
onInput(e: CustomKeyboardEvent): void;
|
|
57
|
-
onCompositionStart(): void;
|
|
58
|
-
onCompositionEnd(e: CustomKeyboardEvent): void;
|
|
59
|
-
onBlur(e: CustomKeyboardEvent): void;
|
|
60
|
-
onClick(e: MouseEvent | CustomKeyboardEvent): void;
|
|
61
|
-
onKeyDown(e: CustomKeyboardEvent): void;
|
|
62
|
-
/** It writes the value in the input */
|
|
63
|
-
writeValue(controlValue: unknown): Promise<void>;
|
|
64
|
-
registerOnChange(fn: typeof this.onChange): void;
|
|
65
|
-
registerOnTouched(fn: typeof this.onTouch): void;
|
|
66
|
-
private _getActiveElement;
|
|
67
|
-
checkSelectionOnDeletion(el: HTMLInputElement): void;
|
|
68
|
-
/** It disables the input element */
|
|
69
|
-
setDisabledState(isDisabled: boolean): void;
|
|
70
|
-
private _applyMask;
|
|
71
|
-
private _validateTime;
|
|
72
|
-
private _getActualInputLength;
|
|
73
|
-
private _createValidationError;
|
|
74
|
-
private _setMask;
|
|
75
|
-
private _areAllCharactersInEachStringSame;
|
|
76
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgxMaskDirective, never>;
|
|
77
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<NgxMaskDirective, "input[mask], textarea[mask]", ["mask", "ngxMask"], { "mask": { "alias": "mask"; "required": false; "isSignal": true; }; "specialCharacters": { "alias": "specialCharacters"; "required": false; "isSignal": true; }; "patterns": { "alias": "patterns"; "required": false; "isSignal": true; }; "prefix": { "alias": "prefix"; "required": false; "isSignal": true; }; "suffix": { "alias": "suffix"; "required": false; "isSignal": true; }; "thousandSeparator": { "alias": "thousandSeparator"; "required": false; "isSignal": true; }; "decimalMarker": { "alias": "decimalMarker"; "required": false; "isSignal": true; }; "dropSpecialCharacters": { "alias": "dropSpecialCharacters"; "required": false; "isSignal": true; }; "hiddenInput": { "alias": "hiddenInput"; "required": false; "isSignal": true; }; "showMaskTyped": { "alias": "showMaskTyped"; "required": false; "isSignal": true; }; "placeHolderCharacter": { "alias": "placeHolderCharacter"; "required": false; "isSignal": true; }; "shownMaskExpression": { "alias": "shownMaskExpression"; "required": false; "isSignal": true; }; "clearIfNotMatch": { "alias": "clearIfNotMatch"; "required": false; "isSignal": true; }; "validation": { "alias": "validation"; "required": false; "isSignal": true; }; "separatorLimit": { "alias": "separatorLimit"; "required": false; "isSignal": true; }; "allowNegativeNumbers": { "alias": "allowNegativeNumbers"; "required": false; "isSignal": true; }; "leadZeroDateTime": { "alias": "leadZeroDateTime"; "required": false; "isSignal": true; }; "leadZero": { "alias": "leadZero"; "required": false; "isSignal": true; }; "triggerOnMaskChange": { "alias": "triggerOnMaskChange"; "required": false; "isSignal": true; }; "apm": { "alias": "apm"; "required": false; "isSignal": true; }; "inputTransformFn": { "alias": "inputTransformFn"; "required": false; "isSignal": true; }; "outputTransformFn": { "alias": "outputTransformFn"; "required": false; "isSignal": true; }; "keepCharacterPositions": { "alias": "keepCharacterPositions"; "required": false; "isSignal": true; }; "instantPrefix": { "alias": "instantPrefix"; "required": false; "isSignal": true; }; }, { "maskFilled": "maskFilled"; }, never, never, false, never>;
|
|
78
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { NgxMaskOptions } from './ngx-mask.config';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "./ngx-mask.directive";
|
|
4
|
-
import * as i2 from "./ngx-mask.pipe";
|
|
5
|
-
import * as i3 from "@angular/common";
|
|
6
|
-
export declare const options: NgxMaskOptions;
|
|
7
|
-
export declare class NgxMaskModule {
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgxMaskModule, never>;
|
|
9
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxMaskModule, [typeof i1.NgxMaskDirective, typeof i2.NgxMaskPipe], [typeof i3.CommonModule], [typeof i1.NgxMaskDirective, typeof i2.NgxMaskPipe]>;
|
|
10
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<NgxMaskModule>;
|
|
11
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { PipeTransform } from '@angular/core';
|
|
2
|
-
import type { NgxMaskConfig } from './ngx-mask.config';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class NgxMaskPipe implements PipeTransform {
|
|
5
|
-
private readonly defaultOptions;
|
|
6
|
-
private readonly _maskService;
|
|
7
|
-
private _maskExpressionArray;
|
|
8
|
-
private mask;
|
|
9
|
-
transform(value: string | number, mask: string, { patterns, ...config }?: Partial<NgxMaskConfig>): string;
|
|
10
|
-
private _setMask;
|
|
11
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgxMaskPipe, never>;
|
|
12
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<NgxMaskPipe, "mask", false>;
|
|
13
|
-
}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { ElementRef } from '@angular/core';
|
|
2
|
-
import type { NgxMaskConfig } from './ngx-mask.config';
|
|
3
|
-
import { NgxMaskApplierService } from './ngx-mask-applier.service';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class NgxMaskService extends NgxMaskApplierService {
|
|
6
|
-
isNumberValue: boolean;
|
|
7
|
-
maskIsShown: string;
|
|
8
|
-
selStart: number | null;
|
|
9
|
-
selEnd: number | null;
|
|
10
|
-
maskChanged: boolean;
|
|
11
|
-
maskExpressionArray: string[];
|
|
12
|
-
previousValue: string;
|
|
13
|
-
currentValue: string;
|
|
14
|
-
/**
|
|
15
|
-
* Whether we are currently in writeValue function, in this case when applying the mask we don't want to trigger onChange function,
|
|
16
|
-
* since writeValue should be a one way only process of writing the DOM value based on the Angular model value.
|
|
17
|
-
*/
|
|
18
|
-
writingValue: boolean;
|
|
19
|
-
private _emitValue;
|
|
20
|
-
private _start;
|
|
21
|
-
private _end;
|
|
22
|
-
onChange: (_: any) => void;
|
|
23
|
-
readonly _elementRef: ElementRef<any> | null;
|
|
24
|
-
private readonly document;
|
|
25
|
-
protected _config: NgxMaskConfig;
|
|
26
|
-
private readonly _renderer;
|
|
27
|
-
/**
|
|
28
|
-
* Applies the mask to the input value.
|
|
29
|
-
* @param inputValue The input value to be masked.
|
|
30
|
-
* @param maskExpression The mask expression to apply.
|
|
31
|
-
* @param position The position in the input value.
|
|
32
|
-
* @param justPasted Whether the value was just pasted.
|
|
33
|
-
* @param backspaced Whether the value was backspaced.
|
|
34
|
-
* @param cb Callback function.
|
|
35
|
-
* @returns The masked value.
|
|
36
|
-
*/
|
|
37
|
-
applyMask(inputValue: string, maskExpression: string, position?: number, justPasted?: boolean, backspaced?: boolean, cb?: (...args: any[]) => any): string;
|
|
38
|
-
private _numberSkipedSymbols;
|
|
39
|
-
applyValueChanges(position: number, justPasted: boolean, backspaced: boolean, cb?: (...args: any[]) => any): void;
|
|
40
|
-
hideInput(inputValue: string, maskExpression: string): string;
|
|
41
|
-
getActualValue(res: string): string;
|
|
42
|
-
shiftTypedSymbols(inputValue: string): string;
|
|
43
|
-
/**
|
|
44
|
-
* Convert number value to string
|
|
45
|
-
* 3.1415 -> '3.1415'
|
|
46
|
-
* 1e-7 -> '0.0000001'
|
|
47
|
-
*/
|
|
48
|
-
numberToString(value: number | string): string;
|
|
49
|
-
showMaskInInput(inputVal?: string): string;
|
|
50
|
-
clearIfNotMatchFn(): void;
|
|
51
|
-
set formElementProperty([name, value]: [string, string | boolean]);
|
|
52
|
-
checkDropSpecialCharAmount(mask: string): number;
|
|
53
|
-
removeMask(inputValue: string): string;
|
|
54
|
-
private _checkForIp;
|
|
55
|
-
private _checkForCpfCnpj;
|
|
56
|
-
/**
|
|
57
|
-
* Recursively determine the current active element by navigating the Shadow DOM until the Active Element is found.
|
|
58
|
-
*/
|
|
59
|
-
private _getActiveElement;
|
|
60
|
-
/**
|
|
61
|
-
* Propogates the input value back to the Angular model by triggering the onChange function. It won't do this if writingValue
|
|
62
|
-
* is true. If that is true it means we are currently in the writeValue function, which is supposed to only update the actual
|
|
63
|
-
* DOM element based on the Angular model value. It should be a one way process, i.e. writeValue should not be modifying the Angular
|
|
64
|
-
* model value too. Therefore, we don't trigger onChange in this scenario.
|
|
65
|
-
* @param inputValue the current form input value
|
|
66
|
-
*/
|
|
67
|
-
private formControlResult;
|
|
68
|
-
private _toNumber;
|
|
69
|
-
private _removeMask;
|
|
70
|
-
private _removePrefix;
|
|
71
|
-
private _removeSuffix;
|
|
72
|
-
private _retrieveSeparatorValue;
|
|
73
|
-
private _regExpForRemove;
|
|
74
|
-
private _replaceDecimalMarkerToDot;
|
|
75
|
-
_checkSymbols(result: string): string | number | undefined | null;
|
|
76
|
-
private _checkPatternForSpace;
|
|
77
|
-
private _retrieveSeparatorPrecision;
|
|
78
|
-
_checkPrecision(separatorExpression: string, separatorValue: string): number | string;
|
|
79
|
-
_repeatPatternSymbols(maskExp: string): string;
|
|
80
|
-
currentLocaleDecimalMarker(): string;
|
|
81
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgxMaskService, never>;
|
|
82
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<NgxMaskService>;
|
|
83
|
-
}
|