@main-class/componentes 3.11.2 → 4.0.0-next.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/README.md +17 -0
- package/fesm2022/main-class-componentes-arquivo.mjs +851 -369
- package/fesm2022/main-class-componentes-arquivo.mjs.map +1 -1
- package/fesm2022/main-class-componentes-core.mjs +288 -240
- package/fesm2022/main-class-componentes-core.mjs.map +1 -1
- package/fesm2022/main-class-componentes-crud.mjs +1004 -546
- package/fesm2022/main-class-componentes-crud.mjs.map +1 -1
- package/fesm2022/main-class-componentes-dialog.mjs +758 -385
- package/fesm2022/main-class-componentes-dialog.mjs.map +1 -1
- package/fesm2022/main-class-componentes-form.mjs +299 -196
- package/fesm2022/main-class-componentes-form.mjs.map +1 -1
- package/fesm2022/main-class-componentes-input.mjs +4143 -2141
- package/fesm2022/main-class-componentes-input.mjs.map +1 -1
- package/fesm2022/main-class-componentes-loader.mjs +262 -212
- package/fesm2022/main-class-componentes-loader.mjs.map +1 -1
- package/fesm2022/main-class-componentes-misc.mjs +508 -354
- package/fesm2022/main-class-componentes-misc.mjs.map +1 -1
- package/fesm2022/main-class-componentes-pipe.mjs +39 -26
- package/fesm2022/main-class-componentes-pipe.mjs.map +1 -1
- package/fesm2022/main-class-componentes-table.mjs +1331 -624
- package/fesm2022/main-class-componentes-table.mjs.map +1 -1
- package/fesm2022/main-class-componentes.mjs +3 -11
- package/fesm2022/main-class-componentes.mjs.map +1 -1
- package/package.json +32 -16
- package/types/main-class-componentes-arquivo.d.ts +190 -0
- package/types/main-class-componentes-core.d.ts +99 -0
- package/types/main-class-componentes-crud.d.ts +172 -0
- package/types/main-class-componentes-dialog.d.ts +125 -0
- package/types/main-class-componentes-form.d.ts +70 -0
- package/types/main-class-componentes-input.d.ts +687 -0
- package/types/main-class-componentes-loader.d.ts +69 -0
- package/types/main-class-componentes-misc.d.ts +87 -0
- package/types/main-class-componentes-pipe.d.ts +10 -0
- package/types/main-class-componentes-table.d.ts +265 -0
- package/types/main-class-componentes.d.ts +4 -0
- package/arquivo/index.d.ts +0 -5
- package/arquivo/src/arquivo-manager.service.d.ts +0 -13
- package/arquivo/src/download-arquivo.directive.d.ts +0 -12
- package/arquivo/src/imagem.directive.d.ts +0 -21
- package/arquivo/src/preview-arquivo/dialog-preview-arquivo/dialog-preview-arquivo.component.d.ts +0 -23
- package/arquivo/src/preview-arquivo/preview-arquivo.component.d.ts +0 -27
- package/core/index.d.ts +0 -4
- package/core/src/criptografia/criptografia.service.d.ts +0 -6
- package/core/src/mensageria/mensageria.service.d.ts +0 -17
- package/core/src/mobile/mobile.service.d.ts +0 -15
- package/core/src/validator/valida-modulo11.service.d.ts +0 -55
- package/crud/index.d.ts +0 -7
- package/crud/src/abstract-consulta-paginada-component.d.ts +0 -24
- package/crud/src/abstract-edicao-component.d.ts +0 -19
- package/crud/src/abstract-edicao-modal-component.d.ts +0 -19
- package/crud/src/query/query-field/query-field.component.d.ts +0 -40
- package/crud/src/query/query-form-field/query-form-field.component.d.ts +0 -12
- package/crud/src/query/query-form.component.d.ts +0 -28
- package/crud/src/query/query-modal-form/query-modal-form.component.d.ts +0 -13
- package/dialog/index.d.ts +0 -10
- package/dialog/src/dialog-confirmacao/dialog-confirmacao.component.d.ts +0 -23
- package/dialog/src/dialog-iframe/dialog-iframe.component.d.ts +0 -21
- package/dialog/src/dialog-sidebar/modal-template/modal-body.directive.d.ts +0 -9
- package/dialog/src/dialog-sidebar/modal-template/modal-close.directive.d.ts +0 -9
- package/dialog/src/dialog-sidebar/modal-template/modal-footer.directive.d.ts +0 -6
- package/dialog/src/dialog-sidebar/modal-template/modal-header.directive.d.ts +0 -6
- package/dialog/src/dialog-sidebar/modal-template/modal-template.component.d.ts +0 -12
- package/dialog/src/dialog-sidebar/modal.component.d.ts +0 -8
- package/dialog/src/dialog-sidebar/sidebar-modal-ref.d.ts +0 -21
- package/dialog/src/dialog.service.d.ts +0 -26
- package/form/index.d.ts +0 -3
- package/form/src/form.component.d.ts +0 -24
- package/form/src/mensagens-erro/mensagens-erro.component.d.ts +0 -17
- package/form/src/single-click.directive.d.ts +0 -13
- package/index.d.ts +0 -5
- package/input/index.d.ts +0 -26
- package/input/src/abstract-control-value-accessor.d.ts +0 -18
- package/input/src/abstract-mat-form-field-control.d.ts +0 -42
- package/input/src/abstract-mat-form-field-select-control.d.ts +0 -31
- package/input/src/input-currency/input-currency.component.d.ts +0 -9
- package/input/src/input-datetime/input-datetime.component.d.ts +0 -32
- package/input/src/input-fileupload/input-fileupload-validator.directive.d.ts +0 -8
- package/input/src/input-fileupload/input-fileupload.component.d.ts +0 -70
- package/input/src/input-mask/documento-validators.d.ts +0 -7
- package/input/src/input-mask/input-cep.component.d.ts +0 -7
- package/input/src/input-mask/input-cnpj.component.d.ts +0 -7
- package/input/src/input-mask/input-cpf-cnpj.component.d.ts +0 -7
- package/input/src/input-mask/input-cpf.component.d.ts +0 -7
- package/input/src/input-mask/input-mask-validator.directive.d.ts +0 -16
- package/input/src/input-mask/input-mask.component.d.ts +0 -24
- package/input/src/input-mask/input-phone.component.d.ts +0 -7
- package/input/src/input-mask/mask-functions.d.ts +0 -2
- package/input/src/input-telefone-internacional/input-telefone-internacional-validator.directive.d.ts +0 -8
- package/input/src/input-telefone-internacional/input-telefone-internacional.component.d.ts +0 -19
- package/input/src/option-checkbox/all-option-checkbox.component.d.ts +0 -18
- package/input/src/option-checkbox/node-pool.d.ts +0 -23
- package/input/src/option-checkbox/option-checkbox-group.component.d.ts +0 -25
- package/input/src/option-checkbox/option-checkbox.component.d.ts +0 -23
- package/input/src/option-checkbox/option-checkbox.service.d.ts +0 -16
- package/input/src/option-checkbox/option-node.d.ts +0 -13
- package/input/src/select-autocomplete/select-autocomplete.component.d.ts +0 -15
- package/input/src/select-chips/select-chips.component.d.ts +0 -12
- package/input/src/select-many-checkbox/select-many-checkbox.component.d.ts +0 -12
- package/input/src/select-option/delegate-option-provider.directive.d.ts +0 -13
- package/input/src/select-option/select-option-provider.d.ts +0 -10
- package/input/src/select-option/select-option.component.d.ts +0 -10
- package/input/src/select-option/select-option.d.ts +0 -4
- package/input/src/select-radio/select-radio.component.d.ts +0 -9
- package/loader/index.d.ts +0 -2
- package/loader/src/loader.component.d.ts +0 -25
- package/loader/src/loader.service.d.ts +0 -20
- package/misc/index.d.ts +0 -12
- package/misc/src/cnpj/cnpj.directive.d.ts +0 -12
- package/misc/src/cnpj/cnpjs.pipe.d.ts +0 -7
- package/misc/src/cpf/cpf.directive.d.ts +0 -12
- package/misc/src/cpf/cpf.pipe.d.ts +0 -7
- package/misc/src/cpf-cnpj/cpf-cnpj.directive.d.ts +0 -12
- package/misc/src/cpf-cnpj/cpf-cnpj.pipe.d.ts +0 -7
- package/misc/src/mask/mask.pipe.d.ts +0 -8
- package/misc/src/monetario/monetario-mask.d.ts +0 -1
- package/misc/src/monetario/monetario.pipe.d.ts +0 -7
- package/misc/src/porcentagem/porcentagem-mask.d.ts +0 -1
- package/misc/src/porcentagem/porcentagem.pipe.d.ts +0 -7
- package/misc/src/telefone/telefone.pipe.d.ts +0 -7
- package/misc/src/unsafe-inner-html/unsafe-inner-html.directive.d.ts +0 -10
- package/pipe/index.d.ts +0 -1
- package/pipe/src/nome-resumido.pipe.d.ts +0 -7
- package/public-api.d.ts +0 -2
- package/table/index.d.ts +0 -10
- package/table/src/column/column-cell.directive.d.ts +0 -8
- package/table/src/column/column-footer.directive.d.ts +0 -8
- package/table/src/column/column-header.directive.d.ts +0 -8
- package/table/src/column/column.directive.d.ts +0 -16
- package/table/src/numeric-paginator/numeric-paginator.component.d.ts +0 -26
- package/table/src/paginated-table/paginated-table.component.d.ts +0 -58
- package/table/src/paginator-i18n.d.ts +0 -8
- package/table/src/table/table.component.d.ts +0 -41
- package/table/src/td/td.component.d.ts +0 -8
- package/table/src/th/th.component.d.ts +0 -8
- package/table/src/undefined-paginator/undefined-paginator.component.d.ts +0 -25
- package/table/src/virtual-paginated-table/virtual-paginated-table.component.d.ts +0 -28
|
@@ -1,363 +1,517 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import { Directive,
|
|
3
|
-
import { NG_VALIDATORS } from
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Directive, ElementRef, Input, Pipe, Sanitizer, Self } from "@angular/core";
|
|
3
|
+
import { NG_VALIDATORS } from "@angular/forms";
|
|
4
|
+
import { ValidaModulo11Service } from "@main-class/componentes/core";
|
|
5
|
+
var CnpjDirective = class CnpjDirective {
|
|
6
|
+
modulo11Service;
|
|
7
|
+
constructor(modulo11Service) {
|
|
8
|
+
this.modulo11Service = modulo11Service;
|
|
9
|
+
}
|
|
10
|
+
validate(control) {
|
|
11
|
+
if (control.value) {
|
|
12
|
+
const unmasked = control.value.replace(/[^0-9a-zA-Z]+/g, "");
|
|
13
|
+
if (unmasked.length !== 14 || !this.modulo11Service.isValidCgc(unmasked)) return { cnpj: true };
|
|
14
|
+
}
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
18
|
+
minVersion: "12.0.0",
|
|
19
|
+
version: "22.3.2",
|
|
20
|
+
ngImport: i0,
|
|
21
|
+
type: CnpjDirective,
|
|
22
|
+
deps: [{ token: ValidaModulo11Service }],
|
|
23
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
24
|
+
});
|
|
25
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
26
|
+
minVersion: "14.0.0",
|
|
27
|
+
version: "22.3.2",
|
|
28
|
+
type: CnpjDirective,
|
|
29
|
+
isStandalone: true,
|
|
30
|
+
selector: "[mclCnpj],[mclModel][cnpj]",
|
|
31
|
+
providers: [{
|
|
32
|
+
provide: NG_VALIDATORS,
|
|
33
|
+
useExisting: CnpjDirective,
|
|
34
|
+
multi: true
|
|
35
|
+
}],
|
|
36
|
+
ngImport: i0
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
40
|
+
minVersion: "12.0.0",
|
|
41
|
+
version: "22.3.2",
|
|
42
|
+
ngImport: i0,
|
|
43
|
+
type: CnpjDirective,
|
|
44
|
+
decorators: [{
|
|
45
|
+
type: Directive,
|
|
46
|
+
args: [{
|
|
47
|
+
selector: "[mclCnpj],[mclModel][cnpj]",
|
|
48
|
+
providers: [{
|
|
49
|
+
provide: NG_VALIDATORS,
|
|
50
|
+
useExisting: CnpjDirective,
|
|
51
|
+
multi: true
|
|
52
|
+
}]
|
|
53
|
+
}]
|
|
54
|
+
}],
|
|
55
|
+
ctorParameters: () => [{ type: ValidaModulo11Service }]
|
|
56
|
+
});
|
|
39
57
|
function doApplyMask(val, mask) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
valorFormatado += mask.charAt(valorFormatado.length);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
else {
|
|
64
|
-
valorFormatado = val;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
return valorFormatado;
|
|
68
|
-
}
|
|
69
|
-
class MaskPipe {
|
|
70
|
-
transform(value, mask) {
|
|
71
|
-
if (!!value) {
|
|
72
|
-
return doApplyMask(value, mask);
|
|
73
|
-
}
|
|
74
|
-
return undefined;
|
|
75
|
-
}
|
|
76
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: MaskPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
77
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.9", ngImport: i0, type: MaskPipe, isStandalone: true, name: "mask" });
|
|
78
|
-
}
|
|
79
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: MaskPipe, decorators: [{
|
|
80
|
-
type: Pipe,
|
|
81
|
-
args: [{
|
|
82
|
-
name: 'mask'
|
|
83
|
-
}]
|
|
84
|
-
}] });
|
|
85
|
-
|
|
86
|
-
class CnpjsPipe {
|
|
87
|
-
transform(value) {
|
|
88
|
-
if (value) {
|
|
89
|
-
return doApplyMask(value, 'AA.AAA.AAA/AAAA-##');
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: CnpjsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
93
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.9", ngImport: i0, type: CnpjsPipe, isStandalone: true, name: "cnpj" });
|
|
94
|
-
}
|
|
95
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: CnpjsPipe, decorators: [{
|
|
96
|
-
type: Pipe,
|
|
97
|
-
args: [{
|
|
98
|
-
name: 'cnpj'
|
|
99
|
-
}]
|
|
100
|
-
}] });
|
|
101
|
-
|
|
102
|
-
class CpfDirective {
|
|
103
|
-
modulo11Service;
|
|
104
|
-
constructor(modulo11Service) {
|
|
105
|
-
this.modulo11Service = modulo11Service;
|
|
106
|
-
}
|
|
107
|
-
validate(control) {
|
|
108
|
-
if (control.value) {
|
|
109
|
-
const unmasked = control.value.replace(/\D+/g, '');
|
|
110
|
-
if (unmasked.length !== 11 || !this.modulo11Service.isValidCpf(unmasked)) {
|
|
111
|
-
return { cpf: true };
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
return null;
|
|
115
|
-
}
|
|
116
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: CpfDirective, deps: [{ token: i1.ValidaModulo11Service }], target: i0.ɵɵFactoryTarget.Directive });
|
|
117
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.9", type: CpfDirective, isStandalone: true, selector: "[mclCpf],[mclModel][cpf]", providers: [{
|
|
118
|
-
provide: NG_VALIDATORS,
|
|
119
|
-
useExisting: CpfDirective,
|
|
120
|
-
multi: true
|
|
121
|
-
}], ngImport: i0 });
|
|
58
|
+
let valorFormatado = "";
|
|
59
|
+
if (val !== null && val !== void 0 && val.length) {
|
|
60
|
+
if (mask) for (let idx = 0; idx < val.length && mask.length > valorFormatado.length;) {
|
|
61
|
+
const maskChar = mask.charAt(valorFormatado.length);
|
|
62
|
+
if (maskChar === "#" || maskChar === "A") {
|
|
63
|
+
const valChar = val.charAt(idx);
|
|
64
|
+
const isNum = valChar.match(/\d/);
|
|
65
|
+
const isAlpha = valChar.match(/[a-zA-Z]/);
|
|
66
|
+
const isWildcard = valChar === "*";
|
|
67
|
+
if (maskChar === "#" && (isNum || isWildcard)) valorFormatado += valChar;
|
|
68
|
+
else if (maskChar === "A" && (isNum || isAlpha || isWildcard)) valorFormatado += valChar;
|
|
69
|
+
idx++;
|
|
70
|
+
} else valorFormatado += mask.charAt(valorFormatado.length);
|
|
71
|
+
}
|
|
72
|
+
else valorFormatado = val;
|
|
73
|
+
}
|
|
74
|
+
return valorFormatado;
|
|
122
75
|
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
}
|
|
144
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
}
|
|
175
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
76
|
+
var MaskPipe = class MaskPipe {
|
|
77
|
+
transform(value, mask) {
|
|
78
|
+
if (!!value) return doApplyMask(value, mask);
|
|
79
|
+
}
|
|
80
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
81
|
+
minVersion: "12.0.0",
|
|
82
|
+
version: "22.3.2",
|
|
83
|
+
ngImport: i0,
|
|
84
|
+
type: MaskPipe,
|
|
85
|
+
deps: [],
|
|
86
|
+
target: i0.ɵɵFactoryTarget.Pipe
|
|
87
|
+
});
|
|
88
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({
|
|
89
|
+
minVersion: "14.0.0",
|
|
90
|
+
version: "22.3.2",
|
|
91
|
+
ngImport: i0,
|
|
92
|
+
type: MaskPipe,
|
|
93
|
+
isStandalone: true,
|
|
94
|
+
name: "mask"
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
98
|
+
minVersion: "12.0.0",
|
|
99
|
+
version: "22.3.2",
|
|
100
|
+
ngImport: i0,
|
|
101
|
+
type: MaskPipe,
|
|
102
|
+
decorators: [{
|
|
103
|
+
type: Pipe,
|
|
104
|
+
args: [{ name: "mask" }]
|
|
105
|
+
}]
|
|
106
|
+
});
|
|
107
|
+
var CnpjsPipe = class CnpjsPipe {
|
|
108
|
+
transform(value) {
|
|
109
|
+
if (value) return doApplyMask(value, "AA.AAA.AAA/AAAA-##");
|
|
110
|
+
}
|
|
111
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
112
|
+
minVersion: "12.0.0",
|
|
113
|
+
version: "22.3.2",
|
|
114
|
+
ngImport: i0,
|
|
115
|
+
type: CnpjsPipe,
|
|
116
|
+
deps: [],
|
|
117
|
+
target: i0.ɵɵFactoryTarget.Pipe
|
|
118
|
+
});
|
|
119
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({
|
|
120
|
+
minVersion: "14.0.0",
|
|
121
|
+
version: "22.3.2",
|
|
122
|
+
ngImport: i0,
|
|
123
|
+
type: CnpjsPipe,
|
|
124
|
+
isStandalone: true,
|
|
125
|
+
name: "cnpj"
|
|
126
|
+
});
|
|
127
|
+
};
|
|
128
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
129
|
+
minVersion: "12.0.0",
|
|
130
|
+
version: "22.3.2",
|
|
131
|
+
ngImport: i0,
|
|
132
|
+
type: CnpjsPipe,
|
|
133
|
+
decorators: [{
|
|
134
|
+
type: Pipe,
|
|
135
|
+
args: [{ name: "cnpj" }]
|
|
136
|
+
}]
|
|
137
|
+
});
|
|
138
|
+
var CpfDirective = class CpfDirective {
|
|
139
|
+
modulo11Service;
|
|
140
|
+
constructor(modulo11Service) {
|
|
141
|
+
this.modulo11Service = modulo11Service;
|
|
142
|
+
}
|
|
143
|
+
validate(control) {
|
|
144
|
+
if (control.value) {
|
|
145
|
+
const unmasked = control.value.replace(/\D+/g, "");
|
|
146
|
+
if (unmasked.length !== 11 || !this.modulo11Service.isValidCpf(unmasked)) return { cpf: true };
|
|
147
|
+
}
|
|
148
|
+
return null;
|
|
149
|
+
}
|
|
150
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
151
|
+
minVersion: "12.0.0",
|
|
152
|
+
version: "22.3.2",
|
|
153
|
+
ngImport: i0,
|
|
154
|
+
type: CpfDirective,
|
|
155
|
+
deps: [{ token: ValidaModulo11Service }],
|
|
156
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
157
|
+
});
|
|
158
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
159
|
+
minVersion: "14.0.0",
|
|
160
|
+
version: "22.3.2",
|
|
161
|
+
type: CpfDirective,
|
|
162
|
+
isStandalone: true,
|
|
163
|
+
selector: "[mclCpf],[mclModel][cpf]",
|
|
164
|
+
providers: [{
|
|
165
|
+
provide: NG_VALIDATORS,
|
|
166
|
+
useExisting: CpfDirective,
|
|
167
|
+
multi: true
|
|
168
|
+
}],
|
|
169
|
+
ngImport: i0
|
|
170
|
+
});
|
|
171
|
+
};
|
|
172
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
173
|
+
minVersion: "12.0.0",
|
|
174
|
+
version: "22.3.2",
|
|
175
|
+
ngImport: i0,
|
|
176
|
+
type: CpfDirective,
|
|
177
|
+
decorators: [{
|
|
178
|
+
type: Directive,
|
|
179
|
+
args: [{
|
|
180
|
+
selector: "[mclCpf],[mclModel][cpf]",
|
|
181
|
+
providers: [{
|
|
182
|
+
provide: NG_VALIDATORS,
|
|
183
|
+
useExisting: CpfDirective,
|
|
184
|
+
multi: true
|
|
185
|
+
}]
|
|
186
|
+
}]
|
|
187
|
+
}],
|
|
188
|
+
ctorParameters: () => [{ type: ValidaModulo11Service }]
|
|
189
|
+
});
|
|
190
|
+
var CpfPipe = class CpfPipe {
|
|
191
|
+
transform(value) {
|
|
192
|
+
if (value) return doApplyMask(value, "###.###.###-##");
|
|
193
|
+
}
|
|
194
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
195
|
+
minVersion: "12.0.0",
|
|
196
|
+
version: "22.3.2",
|
|
197
|
+
ngImport: i0,
|
|
198
|
+
type: CpfPipe,
|
|
199
|
+
deps: [],
|
|
200
|
+
target: i0.ɵɵFactoryTarget.Pipe
|
|
201
|
+
});
|
|
202
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({
|
|
203
|
+
minVersion: "14.0.0",
|
|
204
|
+
version: "22.3.2",
|
|
205
|
+
ngImport: i0,
|
|
206
|
+
type: CpfPipe,
|
|
207
|
+
isStandalone: true,
|
|
208
|
+
name: "cpf"
|
|
209
|
+
});
|
|
210
|
+
};
|
|
211
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
212
|
+
minVersion: "12.0.0",
|
|
213
|
+
version: "22.3.2",
|
|
214
|
+
ngImport: i0,
|
|
215
|
+
type: CpfPipe,
|
|
216
|
+
decorators: [{
|
|
217
|
+
type: Pipe,
|
|
218
|
+
args: [{ name: "cpf" }]
|
|
219
|
+
}]
|
|
220
|
+
});
|
|
221
|
+
var CpfCnpjDirective = class CpfCnpjDirective {
|
|
222
|
+
modulo11Service;
|
|
223
|
+
constructor(modulo11Service) {
|
|
224
|
+
this.modulo11Service = modulo11Service;
|
|
225
|
+
}
|
|
226
|
+
validate(control) {
|
|
227
|
+
if (control.value) {
|
|
228
|
+
const unmasked = control.value.replace(/[^0-9a-zA-Z]+/g, "");
|
|
229
|
+
const unmaskedOnlyDigits = control.value.replace(/\D+/g, "");
|
|
230
|
+
const isValidCpf = unmaskedOnlyDigits.length === 11 && this.modulo11Service.isValidCpf(unmaskedOnlyDigits);
|
|
231
|
+
const isValidCnpj = unmasked.length === 14 && this.modulo11Service.isValidCgc(unmasked);
|
|
232
|
+
if (!isValidCpf && !isValidCnpj) return { cpfCnpj: true };
|
|
233
|
+
}
|
|
234
|
+
return null;
|
|
235
|
+
}
|
|
236
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
237
|
+
minVersion: "12.0.0",
|
|
238
|
+
version: "22.3.2",
|
|
239
|
+
ngImport: i0,
|
|
240
|
+
type: CpfCnpjDirective,
|
|
241
|
+
deps: [{ token: ValidaModulo11Service }],
|
|
242
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
243
|
+
});
|
|
244
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
245
|
+
minVersion: "14.0.0",
|
|
246
|
+
version: "22.3.2",
|
|
247
|
+
type: CpfCnpjDirective,
|
|
248
|
+
isStandalone: true,
|
|
249
|
+
selector: "[mclCpfCnpj],[mclModel][cpfCnpj]",
|
|
250
|
+
providers: [{
|
|
251
|
+
provide: NG_VALIDATORS,
|
|
252
|
+
useExisting: CpfCnpjDirective,
|
|
253
|
+
multi: true
|
|
254
|
+
}],
|
|
255
|
+
ngImport: i0
|
|
256
|
+
});
|
|
257
|
+
};
|
|
258
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
259
|
+
minVersion: "12.0.0",
|
|
260
|
+
version: "22.3.2",
|
|
261
|
+
ngImport: i0,
|
|
262
|
+
type: CpfCnpjDirective,
|
|
263
|
+
decorators: [{
|
|
264
|
+
type: Directive,
|
|
265
|
+
args: [{
|
|
266
|
+
selector: "[mclCpfCnpj],[mclModel][cpfCnpj]",
|
|
267
|
+
providers: [{
|
|
268
|
+
provide: NG_VALIDATORS,
|
|
269
|
+
useExisting: CpfCnpjDirective,
|
|
270
|
+
multi: true
|
|
271
|
+
}]
|
|
272
|
+
}]
|
|
273
|
+
}],
|
|
274
|
+
ctorParameters: () => [{ type: ValidaModulo11Service }]
|
|
275
|
+
});
|
|
276
|
+
var CpfCnpjPipe = class CpfCnpjPipe {
|
|
277
|
+
transform(value) {
|
|
278
|
+
if (value) {
|
|
279
|
+
if (value.length > 11) return doApplyMask(value, "##.###.###/####-##");
|
|
280
|
+
return doApplyMask(value, "###.###.###-##");
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
284
|
+
minVersion: "12.0.0",
|
|
285
|
+
version: "22.3.2",
|
|
286
|
+
ngImport: i0,
|
|
287
|
+
type: CpfCnpjPipe,
|
|
288
|
+
deps: [],
|
|
289
|
+
target: i0.ɵɵFactoryTarget.Pipe
|
|
290
|
+
});
|
|
291
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({
|
|
292
|
+
minVersion: "14.0.0",
|
|
293
|
+
version: "22.3.2",
|
|
294
|
+
ngImport: i0,
|
|
295
|
+
type: CpfCnpjPipe,
|
|
296
|
+
isStandalone: true,
|
|
297
|
+
name: "cpfCnpj"
|
|
298
|
+
});
|
|
299
|
+
};
|
|
300
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
301
|
+
minVersion: "12.0.0",
|
|
302
|
+
version: "22.3.2",
|
|
303
|
+
ngImport: i0,
|
|
304
|
+
type: CpfCnpjPipe,
|
|
305
|
+
decorators: [{
|
|
306
|
+
type: Pipe,
|
|
307
|
+
args: [{ name: "cpfCnpj" }]
|
|
308
|
+
}]
|
|
309
|
+
});
|
|
310
|
+
const monetarioMask = (value, prefixo = "R$", milhar = ".", fracional = ",", mascara = "###.###.###.###.###,##") => {
|
|
311
|
+
if (!value) return;
|
|
312
|
+
let maskedValue = "";
|
|
313
|
+
let valorRestante = value.replace(/\D/g, "").replace(/^0+/, "");
|
|
314
|
+
while (valorRestante.length < mascara.length - mascara.indexOf(",")) valorRestante = "0" + valorRestante;
|
|
315
|
+
for (let i = mascara.length - 1; i >= 0 && valorRestante.length; i--) {
|
|
316
|
+
if (mascara[i] === ".") {
|
|
317
|
+
maskedValue = milhar + maskedValue;
|
|
318
|
+
continue;
|
|
319
|
+
} else if (mascara[i] === ",") {
|
|
320
|
+
maskedValue = fracional + maskedValue;
|
|
321
|
+
continue;
|
|
322
|
+
}
|
|
323
|
+
const ultimoRemovido = removerUltimo$1(valorRestante);
|
|
324
|
+
valorRestante = ultimoRemovido.restante;
|
|
325
|
+
maskedValue = ultimoRemovido.ultimo + maskedValue;
|
|
326
|
+
}
|
|
327
|
+
return prefixo + maskedValue;
|
|
229
328
|
};
|
|
230
329
|
const removerUltimo$1 = (value) => {
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
330
|
+
const tamanho = value.length;
|
|
331
|
+
return {
|
|
332
|
+
ultimo: value.charAt(tamanho - 1),
|
|
333
|
+
restante: value.substring(0, tamanho - 1)
|
|
334
|
+
};
|
|
236
335
|
};
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
336
|
+
var MonetarioPipe = class MonetarioPipe {
|
|
337
|
+
transform(value, symbol = "R$", thousandDivider = ".", fractionalDivider = ",", mascara = "###.###.###.###.###,##") {
|
|
338
|
+
return monetarioMask(value, symbol, thousandDivider, fractionalDivider, mascara);
|
|
339
|
+
}
|
|
340
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
341
|
+
minVersion: "12.0.0",
|
|
342
|
+
version: "22.3.2",
|
|
343
|
+
ngImport: i0,
|
|
344
|
+
type: MonetarioPipe,
|
|
345
|
+
deps: [],
|
|
346
|
+
target: i0.ɵɵFactoryTarget.Pipe
|
|
347
|
+
});
|
|
348
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({
|
|
349
|
+
minVersion: "14.0.0",
|
|
350
|
+
version: "22.3.2",
|
|
351
|
+
ngImport: i0,
|
|
352
|
+
type: MonetarioPipe,
|
|
353
|
+
isStandalone: true,
|
|
354
|
+
name: "mclMonetario"
|
|
355
|
+
});
|
|
356
|
+
};
|
|
357
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
358
|
+
minVersion: "12.0.0",
|
|
359
|
+
version: "22.3.2",
|
|
360
|
+
ngImport: i0,
|
|
361
|
+
type: MonetarioPipe,
|
|
362
|
+
decorators: [{
|
|
363
|
+
type: Pipe,
|
|
364
|
+
args: [{ name: "mclMonetario" }]
|
|
365
|
+
}]
|
|
366
|
+
});
|
|
367
|
+
const porcentagemMask = (value, sufixo = "%", milhar = ".", fracional = ",", mascara = "###.###.###.###.###,##") => {
|
|
368
|
+
if (!value) return;
|
|
369
|
+
let maskedValue = "";
|
|
370
|
+
let valorRestante = value.replace(/\D/g, "").replace(/^0+/, "");
|
|
371
|
+
while (valorRestante.length < 3) valorRestante = "0" + valorRestante;
|
|
372
|
+
for (let i = mascara.length - 1; i >= 0 && valorRestante.length; i--) {
|
|
373
|
+
if (mascara[i] === ".") {
|
|
374
|
+
maskedValue = milhar + maskedValue;
|
|
375
|
+
continue;
|
|
376
|
+
} else if (mascara[i] === ",") {
|
|
377
|
+
maskedValue = fracional + maskedValue;
|
|
378
|
+
continue;
|
|
379
|
+
}
|
|
380
|
+
const ultimoRemovido = removerUltimo(valorRestante);
|
|
381
|
+
valorRestante = ultimoRemovido.restante;
|
|
382
|
+
maskedValue = ultimoRemovido.ultimo + maskedValue;
|
|
383
|
+
}
|
|
384
|
+
return maskedValue + sufixo;
|
|
275
385
|
};
|
|
276
386
|
const removerUltimo = (value) => {
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
387
|
+
const tamanho = value.length;
|
|
388
|
+
return {
|
|
389
|
+
ultimo: value.charAt(tamanho - 1),
|
|
390
|
+
restante: value.substring(0, tamanho - 1)
|
|
391
|
+
};
|
|
282
392
|
};
|
|
393
|
+
var PorcentagemPipe = class PorcentagemPipe {
|
|
394
|
+
transform(value, symbol = "%", thousandDivider = ".", fractionalDivider = ",", mascara = "###.###.###.###.###,##") {
|
|
395
|
+
return porcentagemMask(value, symbol, thousandDivider, fractionalDivider, mascara);
|
|
396
|
+
}
|
|
397
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
398
|
+
minVersion: "12.0.0",
|
|
399
|
+
version: "22.3.2",
|
|
400
|
+
ngImport: i0,
|
|
401
|
+
type: PorcentagemPipe,
|
|
402
|
+
deps: [],
|
|
403
|
+
target: i0.ɵɵFactoryTarget.Pipe
|
|
404
|
+
});
|
|
405
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({
|
|
406
|
+
minVersion: "14.0.0",
|
|
407
|
+
version: "22.3.2",
|
|
408
|
+
ngImport: i0,
|
|
409
|
+
type: PorcentagemPipe,
|
|
410
|
+
isStandalone: true,
|
|
411
|
+
name: "mclPorcentagem"
|
|
412
|
+
});
|
|
413
|
+
};
|
|
414
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
415
|
+
minVersion: "12.0.0",
|
|
416
|
+
version: "22.3.2",
|
|
417
|
+
ngImport: i0,
|
|
418
|
+
type: PorcentagemPipe,
|
|
419
|
+
decorators: [{
|
|
420
|
+
type: Pipe,
|
|
421
|
+
args: [{ name: "mclPorcentagem" }]
|
|
422
|
+
}]
|
|
423
|
+
});
|
|
424
|
+
var TelefonePipe = class TelefonePipe {
|
|
425
|
+
transform(value, ...args) {
|
|
426
|
+
if (!value) return "-";
|
|
427
|
+
value = value.replace(/\D/g, "");
|
|
428
|
+
if (!value || value.length > 11 || value === "0") return "-";
|
|
429
|
+
switch (value.length) {
|
|
430
|
+
case 11: return "(" + value.substring(0, 2) + ") " + value.substring(2, 7) + "-" + value.substring(7);
|
|
431
|
+
case 10: return "(" + value.substring(0, 2) + ") " + value.substring(2, 6) + "-" + value.substring(6);
|
|
432
|
+
case 9: return value.substring(0, 5) + "-" + value.substring(5);
|
|
433
|
+
case 8: return value.substring(0, 4) + "-" + value.substring(4);
|
|
434
|
+
case 2:
|
|
435
|
+
case 3: return "(" + value + ")";
|
|
436
|
+
default: return value;
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
440
|
+
minVersion: "12.0.0",
|
|
441
|
+
version: "22.3.2",
|
|
442
|
+
ngImport: i0,
|
|
443
|
+
type: TelefonePipe,
|
|
444
|
+
deps: [],
|
|
445
|
+
target: i0.ɵɵFactoryTarget.Pipe
|
|
446
|
+
});
|
|
447
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({
|
|
448
|
+
minVersion: "14.0.0",
|
|
449
|
+
version: "22.3.2",
|
|
450
|
+
ngImport: i0,
|
|
451
|
+
type: TelefonePipe,
|
|
452
|
+
isStandalone: true,
|
|
453
|
+
name: "telefone"
|
|
454
|
+
});
|
|
455
|
+
};
|
|
456
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
457
|
+
minVersion: "12.0.0",
|
|
458
|
+
version: "22.3.2",
|
|
459
|
+
ngImport: i0,
|
|
460
|
+
type: TelefonePipe,
|
|
461
|
+
decorators: [{
|
|
462
|
+
type: Pipe,
|
|
463
|
+
args: [{ name: "telefone" }]
|
|
464
|
+
}]
|
|
465
|
+
});
|
|
466
|
+
var UnsafeInnerHtmlDirective = class UnsafeInnerHtmlDirective {
|
|
467
|
+
sanitizer;
|
|
468
|
+
element;
|
|
469
|
+
constructor(sanitizer, element) {
|
|
470
|
+
this.sanitizer = sanitizer;
|
|
471
|
+
this.element = element;
|
|
472
|
+
}
|
|
473
|
+
set unsafeInnerHtml(value) {
|
|
474
|
+
this.element.nativeElement.innerHTML = value || "";
|
|
475
|
+
}
|
|
476
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
477
|
+
minVersion: "12.0.0",
|
|
478
|
+
version: "22.3.2",
|
|
479
|
+
ngImport: i0,
|
|
480
|
+
type: UnsafeInnerHtmlDirective,
|
|
481
|
+
deps: [{ token: Sanitizer }, {
|
|
482
|
+
token: ElementRef,
|
|
483
|
+
self: true
|
|
484
|
+
}],
|
|
485
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
486
|
+
});
|
|
487
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
488
|
+
minVersion: "14.0.0",
|
|
489
|
+
version: "22.3.2",
|
|
490
|
+
type: UnsafeInnerHtmlDirective,
|
|
491
|
+
isStandalone: true,
|
|
492
|
+
selector: "[mclUnsafeInnerHtml]",
|
|
493
|
+
inputs: { unsafeInnerHtml: ["mclUnsafeInnerHtml", "unsafeInnerHtml"] },
|
|
494
|
+
ngImport: i0
|
|
495
|
+
});
|
|
496
|
+
};
|
|
497
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
498
|
+
minVersion: "12.0.0",
|
|
499
|
+
version: "22.3.2",
|
|
500
|
+
ngImport: i0,
|
|
501
|
+
type: UnsafeInnerHtmlDirective,
|
|
502
|
+
decorators: [{
|
|
503
|
+
type: Directive,
|
|
504
|
+
args: [{ selector: "[mclUnsafeInnerHtml]" }]
|
|
505
|
+
}],
|
|
506
|
+
ctorParameters: () => [{ type: Sanitizer }, {
|
|
507
|
+
type: ElementRef,
|
|
508
|
+
decorators: [{ type: Self }]
|
|
509
|
+
}],
|
|
510
|
+
propDecorators: { unsafeInnerHtml: [{
|
|
511
|
+
type: Input,
|
|
512
|
+
args: ["mclUnsafeInnerHtml"]
|
|
513
|
+
}] }
|
|
514
|
+
});
|
|
515
|
+
export { CnpjDirective, CnpjsPipe, CpfCnpjDirective, CpfCnpjPipe, CpfDirective, CpfPipe, MaskPipe, MonetarioPipe, PorcentagemPipe, TelefonePipe, UnsafeInnerHtmlDirective, doApplyMask, monetarioMask, porcentagemMask };
|
|
283
516
|
|
|
284
|
-
class
|
|
285
|
-
transform(value, symbol = '%', thousandDivider = '.', fractionalDivider = ',', mascara = '###.###.###.###.###,##') {
|
|
286
|
-
return porcentagemMask(value, symbol, thousandDivider, fractionalDivider, mascara);
|
|
287
|
-
}
|
|
288
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: PorcentagemPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
289
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.9", ngImport: i0, type: PorcentagemPipe, isStandalone: true, name: "mclPorcentagem" });
|
|
290
|
-
}
|
|
291
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: PorcentagemPipe, decorators: [{
|
|
292
|
-
type: Pipe,
|
|
293
|
-
args: [{
|
|
294
|
-
name: 'mclPorcentagem'
|
|
295
|
-
}]
|
|
296
|
-
}] });
|
|
297
|
-
|
|
298
|
-
class TelefonePipe {
|
|
299
|
-
transform(value, ...args) {
|
|
300
|
-
if (!value) {
|
|
301
|
-
return '-';
|
|
302
|
-
}
|
|
303
|
-
value = value.replace(/\D/g, '');
|
|
304
|
-
if (!value || value.length > 11 || value === '0') {
|
|
305
|
-
return '-';
|
|
306
|
-
}
|
|
307
|
-
switch (value.length) {
|
|
308
|
-
case 11:
|
|
309
|
-
return '(' + value.substring(0, 2) + ') ' + value.substring(2, 7) + '-' + value.substring(7);
|
|
310
|
-
case 10:
|
|
311
|
-
return '(' + value.substring(0, 2) + ') ' + value.substring(2, 6) + '-' + value.substring(6);
|
|
312
|
-
case 9:
|
|
313
|
-
return value.substring(0, 5) + '-' + value.substring(5);
|
|
314
|
-
case 8:
|
|
315
|
-
return value.substring(0, 4) + '-' + value.substring(4);
|
|
316
|
-
case 2:
|
|
317
|
-
case 3:
|
|
318
|
-
return '(' + value + ')';
|
|
319
|
-
default:
|
|
320
|
-
return value;
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TelefonePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
324
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.9", ngImport: i0, type: TelefonePipe, isStandalone: true, name: "telefone" });
|
|
325
|
-
}
|
|
326
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TelefonePipe, decorators: [{
|
|
327
|
-
type: Pipe,
|
|
328
|
-
args: [{
|
|
329
|
-
name: 'telefone'
|
|
330
|
-
}]
|
|
331
|
-
}] });
|
|
332
|
-
|
|
333
|
-
class UnsafeInnerHtmlDirective {
|
|
334
|
-
sanitizer;
|
|
335
|
-
element;
|
|
336
|
-
constructor(sanitizer, element) {
|
|
337
|
-
this.sanitizer = sanitizer;
|
|
338
|
-
this.element = element;
|
|
339
|
-
}
|
|
340
|
-
set unsafeInnerHtml(value) {
|
|
341
|
-
this.element.nativeElement.innerHTML = value || '';
|
|
342
|
-
}
|
|
343
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: UnsafeInnerHtmlDirective, deps: [{ token: i0.Sanitizer }, { token: i0.ElementRef, self: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
344
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.9", type: UnsafeInnerHtmlDirective, isStandalone: true, selector: "[mclUnsafeInnerHtml]", inputs: { unsafeInnerHtml: ["mclUnsafeInnerHtml", "unsafeInnerHtml"] }, ngImport: i0 });
|
|
345
|
-
}
|
|
346
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: UnsafeInnerHtmlDirective, decorators: [{
|
|
347
|
-
type: Directive,
|
|
348
|
-
args: [{
|
|
349
|
-
selector: '[mclUnsafeInnerHtml]'
|
|
350
|
-
}]
|
|
351
|
-
}], ctorParameters: () => [{ type: i0.Sanitizer }, { type: i0.ElementRef, decorators: [{
|
|
352
|
-
type: Self
|
|
353
|
-
}] }], propDecorators: { unsafeInnerHtml: [{
|
|
354
|
-
type: Input,
|
|
355
|
-
args: ['mclUnsafeInnerHtml']
|
|
356
|
-
}] } });
|
|
357
|
-
|
|
358
|
-
/**
|
|
359
|
-
* Generated bundle index. Do not edit.
|
|
360
|
-
*/
|
|
361
|
-
|
|
362
|
-
export { CnpjDirective, CnpjsPipe, CpfCnpjDirective, CpfCnpjPipe, CpfDirective, CpfPipe, MaskPipe, MonetarioPipe, PorcentagemPipe, TelefonePipe, UnsafeInnerHtmlDirective, doApplyMask, monetarioMask };
|
|
363
|
-
//# sourceMappingURL=main-class-componentes-misc.mjs.map
|
|
517
|
+
//# sourceMappingURL=main-class-componentes-misc.mjs.map
|