@main-class/componentes 3.2.4 → 3.2.6

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.
Files changed (84) hide show
  1. package/package.json +1 -1
  2. package/crud/index.d.ts +0 -7
  3. package/crud/src/abstract-consulta-paginada-component.d.ts +0 -24
  4. package/crud/src/abstract-edicao-component.d.ts +0 -19
  5. package/crud/src/abstract-edicao-modal-component.d.ts +0 -19
  6. package/crud/src/query/query-field/query-field.component.d.ts +0 -37
  7. package/crud/src/query/query-form-field/query-form-field.component.d.ts +0 -11
  8. package/crud/src/query/query-form.component.d.ts +0 -23
  9. package/crud/src/query/query-modal-form/query-modal-form.component.d.ts +0 -13
  10. package/dialog/index.d.ts +0 -10
  11. package/dialog/src/dialog-confirmacao/dialog-confirmacao.component.d.ts +0 -23
  12. package/dialog/src/dialog-iframe/dialog-iframe.component.d.ts +0 -21
  13. package/dialog/src/dialog-sidebar/modal-template/modal-body.directive.d.ts +0 -9
  14. package/dialog/src/dialog-sidebar/modal-template/modal-close.directive.d.ts +0 -9
  15. package/dialog/src/dialog-sidebar/modal-template/modal-footer.directive.d.ts +0 -6
  16. package/dialog/src/dialog-sidebar/modal-template/modal-header.directive.d.ts +0 -6
  17. package/dialog/src/dialog-sidebar/modal-template/modal-template.component.d.ts +0 -12
  18. package/dialog/src/dialog-sidebar/modal.component.d.ts +0 -8
  19. package/dialog/src/dialog-sidebar/sidebar-modal-ref.d.ts +0 -17
  20. package/dialog/src/dialog.service.d.ts +0 -26
  21. package/fesm2022/main-class-componentes-crud.mjs +0 -458
  22. package/fesm2022/main-class-componentes-crud.mjs.map +0 -1
  23. package/fesm2022/main-class-componentes-dialog.mjs +0 -393
  24. package/fesm2022/main-class-componentes-dialog.mjs.map +0 -1
  25. package/fesm2022/main-class-componentes-form.mjs +0 -209
  26. package/fesm2022/main-class-componentes-form.mjs.map +0 -1
  27. package/fesm2022/main-class-componentes-input.mjs +0 -1812
  28. package/fesm2022/main-class-componentes-input.mjs.map +0 -1
  29. package/fesm2022/main-class-componentes-loader.mjs +0 -213
  30. package/fesm2022/main-class-componentes-loader.mjs.map +0 -1
  31. package/fesm2022/main-class-componentes-pipe.mjs +0 -27
  32. package/fesm2022/main-class-componentes-pipe.mjs.map +0 -1
  33. package/fesm2022/main-class-componentes-table.mjs +0 -443
  34. package/fesm2022/main-class-componentes-table.mjs.map +0 -1
  35. package/form/index.d.ts +0 -3
  36. package/form/src/form.component.d.ts +0 -24
  37. package/form/src/mensagens-erro/mensagens-erro.component.d.ts +0 -17
  38. package/form/src/single-click.directive.d.ts +0 -13
  39. package/input/index.d.ts +0 -25
  40. package/input/src/abstract-mat-form-field-control.d.ts +0 -48
  41. package/input/src/abstract-mat-form-field-select-control.d.ts +0 -28
  42. package/input/src/input-currency/input-currency.component.d.ts +0 -11
  43. package/input/src/input-datetime/input-datetime.component.d.ts +0 -24
  44. package/input/src/input-fileupload/input-fileupload.component.d.ts +0 -69
  45. package/input/src/input-fileupload/input-fileupload.directive.d.ts +0 -8
  46. package/input/src/input-mask/input-cep.component.d.ts +0 -7
  47. package/input/src/input-mask/input-cnpj.component.d.ts +0 -7
  48. package/input/src/input-mask/input-cpf-cnpj.component.d.ts +0 -8
  49. package/input/src/input-mask/input-cpf.component.d.ts +0 -7
  50. package/input/src/input-mask/input-mask.component.d.ts +0 -18
  51. package/input/src/input-mask/input-phone.component.d.ts +0 -7
  52. package/input/src/input-telefone-internacional/input-telefone-internacional-validator.directive.d.ts +0 -8
  53. package/input/src/input-telefone-internacional/input-telefone-internacional.component.d.ts +0 -21
  54. package/input/src/option-checkbox/all-option-checkbox.component.d.ts +0 -18
  55. package/input/src/option-checkbox/node-pool.d.ts +0 -23
  56. package/input/src/option-checkbox/option-checkbox-group.component.d.ts +0 -25
  57. package/input/src/option-checkbox/option-checkbox.component.d.ts +0 -23
  58. package/input/src/option-checkbox/option-checkbox.service.d.ts +0 -16
  59. package/input/src/option-checkbox/option-node.d.ts +0 -13
  60. package/input/src/select-autocomplete/select-autocomplete.component.d.ts +0 -17
  61. package/input/src/select-chips/select-chips.component.d.ts +0 -11
  62. package/input/src/select-many-checkbox/select-many-checkbox.component.d.ts +0 -10
  63. package/input/src/select-option/delegate-option-provider.directive.d.ts +0 -13
  64. package/input/src/select-option/select-option-provider.d.ts +0 -10
  65. package/input/src/select-option/select-option.component.d.ts +0 -10
  66. package/input/src/select-option/select-option.d.ts +0 -4
  67. package/input/src/select-radio/select-radio.component.d.ts +0 -8
  68. package/loader/index.d.ts +0 -2
  69. package/loader/src/loader.component.d.ts +0 -25
  70. package/loader/src/loader.service.d.ts +0 -20
  71. package/pipe/index.d.ts +0 -1
  72. package/pipe/src/nome-resumido.pipe.d.ts +0 -7
  73. package/table/index.d.ts +0 -9
  74. package/table/src/column/column-cell.directive.d.ts +0 -8
  75. package/table/src/column/column-footer.directive.d.ts +0 -8
  76. package/table/src/column/column-header.directive.d.ts +0 -8
  77. package/table/src/column/column.directive.d.ts +0 -16
  78. package/table/src/numeric-paginator/numeric-paginator.component.d.ts +0 -6
  79. package/table/src/paginated-table/paginated-table.component.d.ts +0 -58
  80. package/table/src/paginator-i18n.d.ts +0 -8
  81. package/table/src/table/table.component.d.ts +0 -39
  82. package/table/src/td/td.component.d.ts +0 -8
  83. package/table/src/th/th.component.d.ts +0 -8
  84. package/table/src/undefined-paginator/undefined-paginator.component.d.ts +0 -25
@@ -1,1812 +0,0 @@
1
- import * as i1 from '@angular/forms';
2
- import { NgControl, FormGroupDirective, FormControl, FormsModule, NG_VALUE_ACCESSOR, NG_VALIDATORS, ReactiveFormsModule } from '@angular/forms';
3
- import { Subject, BehaviorSubject, concat, of, debounceTime, Observable, combineLatest } from 'rxjs';
4
- import * as i0 from '@angular/core';
5
- import { inject, Input, HostBinding, ViewChild, Component, InjectionToken, QueryList, ContentChildren, forwardRef, LOCALE_ID, EventEmitter, Output, Optional, Self, Inject, Directive, Injectable } from '@angular/core';
6
- import * as i1$2 from '@angular/material/core';
7
- import { ErrorStateMatcher, MAT_DATE_LOCALE } from '@angular/material/core';
8
- import { coerceBooleanProperty } from '@angular/cdk/coercion';
9
- import { map, switchMap } from 'rxjs/operators';
10
- import { MatInput } from '@angular/material/input';
11
- import { monetarioMask } from '@main-class/componentes/misc';
12
- import { MatFormFieldControl, MatPrefix, MatSuffix } from '@angular/material/form-field';
13
- import * as i1$1 from '@mat-datetimepicker/core';
14
- import { MAT_DATETIME_FORMATS, DatetimeAdapter, MatDatetimepickerModule } from '@mat-datetimepicker/core';
15
- import { MatMomentDatetimeModule, MomentDatetimeAdapter } from '@mat-datetimepicker/moment';
16
- import moment from 'moment';
17
- import { ARQUIVO_MANAGER_SERVICE, PreviewArquivoComponent, DownloadArquivoDirective } from '@main-class/componentes/arquivo';
18
- import { MatChipGrid, MatChip, MatChipInput } from '@angular/material/chips';
19
- import { NgClass, AsyncPipe, NgStyle } from '@angular/common';
20
- import { MatProgressSpinner } from '@angular/material/progress-spinner';
21
- import { MatIcon } from '@angular/material/icon';
22
- import { MatIconButton } from '@angular/material/button';
23
- import { MatTooltip } from '@angular/material/tooltip';
24
- import { MatCheckbox } from '@angular/material/checkbox';
25
- import { MatAutocompleteTrigger, MatAutocomplete, MatOption } from '@angular/material/autocomplete';
26
- import { MatRadioGroup, MatRadioButton } from '@angular/material/radio';
27
- import * as i1$3 from 'lac-mat-tel-input';
28
- import { LacMatTelInputModule, phoneNumberValidator } from 'lac-mat-tel-input';
29
-
30
- class AbstractMatFormFieldControl {
31
- errorStateMatcher = inject(ErrorStateMatcher);
32
- ngControl = inject(NgControl, { optional: true, self: true });
33
- parentFormGroup = inject(FormGroupDirective, { optional: true });
34
- static nextId = 0;
35
- $value;
36
- $placeholder = '';
37
- $disabled = false;
38
- $required = false;
39
- focused = false;
40
- input;
41
- stateChanges = new Subject();
42
- id = `custom-input-${AbstractMatFormFieldControl.nextId++}`;
43
- describedBy = '';
44
- onChange = (val) => {
45
- };
46
- onTouched = () => {
47
- };
48
- get value() {
49
- return this.$value;
50
- }
51
- set value(value) {
52
- this.$value = value;
53
- this.onChange(value);
54
- this.stateChanges.next();
55
- }
56
- get empty() {
57
- return !this.value;
58
- }
59
- get autofilled() {
60
- return false;
61
- }
62
- get userAriaDescribedBy() {
63
- return undefined;
64
- }
65
- get disableAutomaticLabeling() {
66
- return undefined;
67
- }
68
- onContainerClick(event) {
69
- }
70
- ngOnInit() {
71
- if (this.ngControl != null) {
72
- this.ngControl.valueAccessor = this;
73
- }
74
- }
75
- get shouldLabelFloat() {
76
- return !this.empty || (this.input && this.input.nativeElement.value) || this.focused;
77
- }
78
- get placeholder() {
79
- return this.$placeholder;
80
- }
81
- set placeholder(plh) {
82
- this.$placeholder = plh;
83
- this.stateChanges.next();
84
- }
85
- get required() {
86
- return this.$required;
87
- }
88
- set required(value) {
89
- this.$required = coerceBooleanProperty(value);
90
- this.stateChanges.next();
91
- }
92
- get disabled() {
93
- return this.$disabled;
94
- }
95
- set disabled(value) {
96
- this.$disabled = coerceBooleanProperty(value);
97
- this.stateChanges.next();
98
- }
99
- get errorState() {
100
- return this.errorStateMatcher.isErrorState(this.ngControl?.control, this.parentFormGroup);
101
- }
102
- get controlType() {
103
- return 'custom-input';
104
- }
105
- setDescribedByIds(ids) {
106
- this.describedBy = ids.join(' ');
107
- }
108
- ngOnDestroy() {
109
- this.stateChanges.complete();
110
- }
111
- registerOnTouched(fn) {
112
- this.onTouched = fn;
113
- }
114
- registerOnChange(fn) {
115
- this.onChange = fn;
116
- }
117
- setDisabledState(isDisabled) {
118
- this.disabled = isDisabled;
119
- }
120
- writeValue(value) {
121
- this.$value = value;
122
- }
123
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AbstractMatFormFieldControl, deps: [], target: i0.ɵɵFactoryTarget.Component });
124
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: AbstractMatFormFieldControl, isStandalone: true, selector: "ng-component", inputs: { placeholder: "placeholder", required: "required", disabled: "disabled" }, host: { properties: { "id": "this.id", "attr.aria-describedby": "this.describedBy", "class.floating": "this.shouldLabelFloat" } }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: '', isInline: true });
125
- }
126
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AbstractMatFormFieldControl, decorators: [{
127
- type: Component,
128
- args: [{
129
- template: ''
130
- }]
131
- }], propDecorators: { input: [{
132
- type: ViewChild,
133
- args: ['input']
134
- }], id: [{
135
- type: HostBinding
136
- }], describedBy: [{
137
- type: HostBinding,
138
- args: ['attr.aria-describedby']
139
- }], shouldLabelFloat: [{
140
- type: HostBinding,
141
- args: ['class.floating']
142
- }], placeholder: [{
143
- type: Input
144
- }], required: [{
145
- type: Input
146
- }], disabled: [{
147
- type: Input
148
- }] } });
149
-
150
- const SELECT_OPTION_PROVIDER = new InjectionToken('mainclass.SELECT_OPTION_PROVIDER');
151
-
152
- class SelectOptionComponent {
153
- value;
154
- $label;
155
- set label(label) {
156
- this.$label = label !== null && label !== undefined ? String(label) : undefined;
157
- }
158
- get label() {
159
- return this.$label;
160
- }
161
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SelectOptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
162
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: SelectOptionComponent, isStandalone: true, selector: "mcl-select-option", inputs: { value: "value", label: "label" }, ngImport: i0, template: "", styles: [""] });
163
- }
164
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SelectOptionComponent, decorators: [{
165
- type: Component,
166
- args: [{ selector: 'mcl-select-option', imports: [], template: "" }]
167
- }], propDecorators: { value: [{
168
- type: Input
169
- }], label: [{
170
- type: Input
171
- }] } });
172
-
173
- class AbstractMatFormFieldSelectControl extends AbstractMatFormFieldControl {
174
- optionProvider = inject(SELECT_OPTION_PROVIDER, { self: true, optional: true });
175
- optionsSubscription;
176
- $args = new BehaviorSubject(undefined);
177
- wvt;
178
- filteredOptions;
179
- control = new FormControl('');
180
- trackBy = (val) => val;
181
- options = new QueryList();
182
- defaultOptionProvider = {
183
- type: () => 'object',
184
- label: (value) => {
185
- return this.options.find(op => this.doTrackBy(op.value) === this.doTrackBy(value))?.label || '';
186
- },
187
- provide: (search) => {
188
- return concat(of({}), this.options.changes).pipe(map(() => {
189
- return this.options.filter(op => {
190
- if (!search || typeof search !== 'string') {
191
- return true;
192
- }
193
- if (op.label !== undefined && op.label !== null) {
194
- return String(op.label).toLowerCase()?.indexOf(search.toLowerCase()) >= 0;
195
- }
196
- return false;
197
- });
198
- }));
199
- }
200
- };
201
- doTrackBy(val) {
202
- if (this.optionProvider && this.optionProvider.trackBy) {
203
- return this.optionProvider.trackBy(val);
204
- }
205
- return this.trackBy(val);
206
- }
207
- set args(args) {
208
- this.$args.next(args);
209
- }
210
- ngAfterContentInit() {
211
- this.filteredOptions = concat(of(''), this.control.valueChanges).pipe(debounceTime(300), switchMap(value => {
212
- return (this.optionProvider || this.defaultOptionProvider).provide(value);
213
- }));
214
- this.optionsSubscription = this.options.changes.subscribe(() => {
215
- if (this.value !== undefined && this.value !== null) {
216
- this.control.setValue((this.optionProvider || this.defaultOptionProvider).label(this.value));
217
- }
218
- });
219
- this.options.notifyOnChanges();
220
- }
221
- ngOnDestroy() {
222
- super.ngOnDestroy();
223
- this.optionsSubscription?.unsubscribe();
224
- }
225
- seleciona(event) {
226
- this.doSeleciona(event.option.value);
227
- }
228
- doSeleciona(value) {
229
- this.onTouched();
230
- if (value) {
231
- this.value = value;
232
- this.control.setValue((this.optionProvider || this.defaultOptionProvider).label(value));
233
- }
234
- else {
235
- this.value = undefined;
236
- this.control.setValue('');
237
- }
238
- this.stateChanges.next();
239
- }
240
- writeValue(value) {
241
- clearTimeout(this.wvt);
242
- this.wvt = setTimeout(() => {
243
- super.writeValue(value);
244
- if (value) {
245
- this.control.setValue((this.optionProvider || this.defaultOptionProvider).label(value));
246
- }
247
- else {
248
- this.control.setValue('');
249
- }
250
- }, 150);
251
- }
252
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AbstractMatFormFieldSelectControl, deps: null, target: i0.ɵɵFactoryTarget.Component });
253
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: AbstractMatFormFieldSelectControl, isStandalone: true, selector: "ng-component", inputs: { trackBy: "trackBy", args: "args" }, queries: [{ propertyName: "options", predicate: SelectOptionComponent }], usesInheritance: true, ngImport: i0, template: '', isInline: true });
254
- }
255
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AbstractMatFormFieldSelectControl, decorators: [{
256
- type: Component,
257
- args: [{
258
- template: ''
259
- }]
260
- }], propDecorators: { trackBy: [{
261
- type: Input
262
- }], options: [{
263
- type: ContentChildren,
264
- args: [SelectOptionComponent]
265
- }], args: [{
266
- type: Input
267
- }] } });
268
-
269
- class InputCurrencyComponent extends AbstractMatFormFieldControl {
270
- get value() {
271
- return super.value;
272
- }
273
- set value(value) {
274
- const unformatted = this.removeMask(value);
275
- if (unformatted) {
276
- super.value = unformatted;
277
- this.input.nativeElement.text = this.applyMask(unformatted);
278
- }
279
- }
280
- applyMask(value) {
281
- if (value) {
282
- return monetarioMask(value);
283
- }
284
- return undefined;
285
- }
286
- removeMask(value) {
287
- if (value) {
288
- return monetarioMask(value, '', '', '.');
289
- }
290
- return undefined;
291
- }
292
- writeValue(value) {
293
- super.writeValue(value);
294
- const masked = this.applyMask(value);
295
- if (masked !== this.value) {
296
- this.input.nativeElement.text = masked;
297
- }
298
- }
299
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputCurrencyComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
300
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: InputCurrencyComponent, isStandalone: true, selector: "mcl-input[currency]", providers: [{
301
- provide: NG_VALUE_ACCESSOR,
302
- useExisting: forwardRef(() => InputCurrencyComponent),
303
- multi: true
304
- }], usesInheritance: true, ngImport: i0, template: "<input matInput [(ngModel)]=\"value\"\n [placeholder]=\"placeholder\"\n (focusin)=\"onTouched()\"/>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }] });
305
- }
306
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputCurrencyComponent, decorators: [{
307
- type: Component,
308
- args: [{ selector: 'mcl-input[currency]', imports: [
309
- FormsModule,
310
- MatInput
311
- ], providers: [{
312
- provide: NG_VALUE_ACCESSOR,
313
- useExisting: forwardRef(() => InputCurrencyComponent),
314
- multi: true
315
- }], template: "<input matInput [(ngModel)]=\"value\"\n [placeholder]=\"placeholder\"\n (focusin)=\"onTouched()\"/>\n" }]
316
- }] });
317
-
318
- class InputMaskComponent extends AbstractMatFormFieldControl {
319
- /**
320
- * Example ###.###
321
- * @private
322
- */
323
- $mask;
324
- keepMask;
325
- get value() {
326
- return super.value;
327
- }
328
- set value(value) {
329
- const unformatted = this.removeMask(value);
330
- if (unformatted) {
331
- super.value = this.keepMask ? this.applyMask(unformatted) : unformatted;
332
- this.input.nativeElement.text = this.applyMask(unformatted);
333
- }
334
- }
335
- set mask(mask) {
336
- if (this.$mask !== mask) {
337
- this.$mask = mask;
338
- this.writeValue(this.value);
339
- }
340
- }
341
- applyMask(value) {
342
- if (value && this.$mask) {
343
- value = this.removeMask(value);
344
- let result = '';
345
- for (let im = 0, iv = 0; im < this.$mask.length && iv < value.length; im++) {
346
- if (this.$mask[im] === '#') {
347
- result += value[iv];
348
- iv++;
349
- }
350
- else {
351
- result += this.$mask[im];
352
- }
353
- }
354
- return result;
355
- }
356
- return "";
357
- }
358
- removeMask(value) {
359
- if (typeof value === "number") {
360
- value = String(value).padStart(this.$mask?.replace(/[^#]/, '')?.length || 0, '0');
361
- }
362
- if (value) {
363
- return value.replaceAll(/\D+/g, '');
364
- }
365
- return undefined;
366
- }
367
- writeValue(value) {
368
- super.writeValue(value);
369
- const masked = this.applyMask(value);
370
- if (masked !== this.value) {
371
- this.input.nativeElement.text = masked;
372
- }
373
- }
374
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputMaskComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
375
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: InputMaskComponent, isStandalone: true, selector: "mcl-input[mask]", inputs: { keepMask: "keepMask", mask: "mask" }, providers: [
376
- {
377
- provide: MatFormFieldControl,
378
- useExisting: InputMaskComponent
379
- }
380
- ], usesInheritance: true, ngImport: i0, template: "<input matInput [(ngModel)]=\"value\" #input\n [placeholder]=\"placeholder\"\n (focusin)=\"onTouched()\"/>\n", styles: [""], dependencies: [{ kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
381
- }
382
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputMaskComponent, decorators: [{
383
- type: Component,
384
- args: [{ selector: 'mcl-input[mask]', imports: [
385
- MatInput,
386
- FormsModule
387
- ], providers: [
388
- {
389
- provide: MatFormFieldControl,
390
- useExisting: InputMaskComponent
391
- }
392
- ], template: "<input matInput [(ngModel)]=\"value\" #input\n [placeholder]=\"placeholder\"\n (focusin)=\"onTouched()\"/>\n" }]
393
- }], propDecorators: { keepMask: [{
394
- type: Input
395
- }], mask: [{
396
- type: Input
397
- }] } });
398
-
399
- class InputDatetimeComponent extends AbstractMatFormFieldControl {
400
- formats = inject(MAT_DATETIME_FORMATS);
401
- adapter = inject(DatetimeAdapter);
402
- type = 'date';
403
- readonly;
404
- name;
405
- picker;
406
- innerValue;
407
- $maskedValue;
408
- get empty() {
409
- return !this.$maskedValue;
410
- }
411
- get maskedValue() {
412
- return this.$maskedValue;
413
- }
414
- set maskedValue(maskedValue) {
415
- if (this.$maskedValue !== maskedValue) {
416
- this.onTouched();
417
- this.$maskedValue = maskedValue;
418
- if (maskedValue) {
419
- if (maskedValue.match(new RegExp(`^${this.mask.replace(/#/g, '\\d')}$`))) {
420
- this.innerValue = this.adapter.parse(maskedValue, this.format)?.toDate();
421
- }
422
- else {
423
- this.innerValue = undefined;
424
- }
425
- }
426
- else {
427
- this.innerValue = undefined;
428
- }
429
- this.onChange(this.innerValue);
430
- this.stateChanges.next();
431
- }
432
- }
433
- get mask() {
434
- switch (this.type) {
435
- case 'date':
436
- return '##/##/####';
437
- case 'time':
438
- return '##:##';
439
- }
440
- return '##/##/#### ##:##';
441
- }
442
- get format() {
443
- switch (this.type) {
444
- case 'date':
445
- return this.formats.display.dateInput;
446
- case 'time':
447
- return this.formats.display.timeInput;
448
- }
449
- return this.formats.display.datetimeInput;
450
- }
451
- get value() {
452
- return this.innerValue;
453
- }
454
- set value(value) {
455
- if (this.innerValue !== value) {
456
- this.onTouched();
457
- if (value) {
458
- this.innerValue = value instanceof Date ? value : value.toDate();
459
- this.$maskedValue = this.adapter.format(moment(this.innerValue), this.format);
460
- }
461
- else {
462
- this.innerValue = undefined;
463
- this.$maskedValue = '';
464
- }
465
- this.onChange(this.innerValue);
466
- this.stateChanges.next();
467
- }
468
- }
469
- writeValue(value) {
470
- this.innerValue = value;
471
- if (value) {
472
- this.$maskedValue = this.adapter.format(moment(value), this.format);
473
- }
474
- else {
475
- this.$maskedValue = '';
476
- }
477
- this.stateChanges.next();
478
- }
479
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputDatetimeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
480
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: InputDatetimeComponent, isStandalone: true, selector: "mcl-input-datetime", inputs: { type: "type", readonly: "readonly", name: "name" }, providers: [
481
- {
482
- provide: MatFormFieldControl,
483
- useExisting: InputDatetimeComponent
484
- },
485
- { provide: MAT_DATE_LOCALE, useExisting: LOCALE_ID },
486
- {
487
- provide: DatetimeAdapter,
488
- useClass: MomentDatetimeAdapter
489
- },
490
- {
491
- provide: MAT_DATETIME_FORMATS,
492
- useValue: {
493
- parse: {
494
- dateInput: 'L',
495
- monthInput: 'MMMM',
496
- timeInput: 'LT',
497
- datetimeInput: 'L LT'
498
- },
499
- display: {
500
- dateInput: 'L',
501
- monthInput: 'MMMM',
502
- datetimeInput: 'L LT',
503
- timeInput: 'LT',
504
- monthYearLabel: 'MMM YYYY',
505
- dateA11yLabel: 'LL',
506
- monthYearA11yLabel: 'MMMM YYYY',
507
- popupHeaderDateLabel: 'ddd, DD MMM'
508
- }
509
- }
510
- }
511
- ], viewQueries: [{ propertyName: "picker", first: true, predicate: ["pickerData"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"dateinput\">\n <mcl-input [disabled]=\"disabled\" ngModel\n [(ngModel)]=\"maskedValue\" [mask]=\"mask\"\n (focus)=\"focused = true\" (blur)=\"focused = false\" [keepMask]=\"true\"\n />\n <mat-datetimepicker [disabled]=\"disabled || readonly\"\n [type]=\"type\" #pickerData></mat-datetimepicker>\n <mat-datetimepicker-toggle [for]=\"pickerData\"></mat-datetimepicker-toggle>\n</div>\n<input class=\"hidden\" [(ngModel)]=\"value\" [matDatetimepicker]=\"pickerData\" />\n", styles: [".dateinput{display:flex}.dateinput input{flex:1 1 auto}.dateinput mat-datetimepicker-toggle{margin:-16px 0 -6px}.hidden{display:none}\n"], dependencies: [{ kind: "ngmodule", type: MatDatetimepickerModule }, { kind: "component", type: i1$1.MatDatetimepickerComponent, selector: "mat-datetimepicker", inputs: ["multiYearSelector", "twelvehour", "startView", "mode", "timeInterval", "ariaNextMonthLabel", "ariaPrevMonthLabel", "ariaNextYearLabel", "ariaPrevYearLabel", "preventSameDateTimeSelection", "panelClass", "startAt", "openOnFocus", "type", "touchUi", "disabled"], outputs: ["selectedChanged", "opened", "closed", "viewChanged"], exportAs: ["matDatetimepicker"] }, { kind: "component", type: i1$1.MatDatetimepickerToggleComponent, selector: "mat-datetimepicker-toggle", inputs: ["for", "disabled"], exportAs: ["matDatetimepickerToggle"] }, { kind: "directive", type: i1$1.MatDatetimepickerInputDirective, selector: "input[matDatetimepicker]", inputs: ["matDatetimepicker", "matDatepickerFilter", "value", "min", "max", "disabled"], outputs: ["dateChange", "dateInput"], exportAs: ["matDatepickerInput"] }, { kind: "ngmodule", type: MatMomentDatetimeModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: InputMaskComponent, selector: "mcl-input[mask]", inputs: ["keepMask", "mask"] }] });
512
- }
513
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputDatetimeComponent, decorators: [{
514
- type: Component,
515
- args: [{ selector: 'mcl-input-datetime', imports: [
516
- MatDatetimepickerModule,
517
- MatMomentDatetimeModule,
518
- FormsModule,
519
- InputMaskComponent
520
- ], providers: [
521
- {
522
- provide: MatFormFieldControl,
523
- useExisting: InputDatetimeComponent
524
- },
525
- { provide: MAT_DATE_LOCALE, useExisting: LOCALE_ID },
526
- {
527
- provide: DatetimeAdapter,
528
- useClass: MomentDatetimeAdapter
529
- },
530
- {
531
- provide: MAT_DATETIME_FORMATS,
532
- useValue: {
533
- parse: {
534
- dateInput: 'L',
535
- monthInput: 'MMMM',
536
- timeInput: 'LT',
537
- datetimeInput: 'L LT'
538
- },
539
- display: {
540
- dateInput: 'L',
541
- monthInput: 'MMMM',
542
- datetimeInput: 'L LT',
543
- timeInput: 'LT',
544
- monthYearLabel: 'MMM YYYY',
545
- dateA11yLabel: 'LL',
546
- monthYearA11yLabel: 'MMMM YYYY',
547
- popupHeaderDateLabel: 'ddd, DD MMM'
548
- }
549
- }
550
- }
551
- ], template: "<div class=\"dateinput\">\n <mcl-input [disabled]=\"disabled\" ngModel\n [(ngModel)]=\"maskedValue\" [mask]=\"mask\"\n (focus)=\"focused = true\" (blur)=\"focused = false\" [keepMask]=\"true\"\n />\n <mat-datetimepicker [disabled]=\"disabled || readonly\"\n [type]=\"type\" #pickerData></mat-datetimepicker>\n <mat-datetimepicker-toggle [for]=\"pickerData\"></mat-datetimepicker-toggle>\n</div>\n<input class=\"hidden\" [(ngModel)]=\"value\" [matDatetimepicker]=\"pickerData\" />\n", styles: [".dateinput{display:flex}.dateinput input{flex:1 1 auto}.dateinput mat-datetimepicker-toggle{margin:-16px 0 -6px}.hidden{display:none}\n"] }]
552
- }], propDecorators: { type: [{
553
- type: Input
554
- }], readonly: [{
555
- type: Input
556
- }], name: [{
557
- type: Input
558
- }], picker: [{
559
- type: ViewChild,
560
- args: ['pickerData']
561
- }] } });
562
-
563
- class InputFileUploadComponent {
564
- errorStateMatcher;
565
- ngControl;
566
- parentForm;
567
- changeDetectorRef;
568
- parentFormGroup;
569
- arquivoService;
570
- static nextId = 0;
571
- $placeholder = '';
572
- $disabled = false;
573
- $required = false;
574
- value;
575
- multiple;
576
- limite;
577
- accept;
578
- template = 'preview';
579
- agrupadores;
580
- input;
581
- selectCancel = new EventEmitter();
582
- stateChanges = new Subject();
583
- change = new EventEmitter();
584
- id = `input-fileupload-${InputFileUploadComponent.nextId++}`;
585
- describedBy = '';
586
- constructor(errorStateMatcher, ngControl, parentForm, changeDetectorRef, parentFormGroup, arquivoService) {
587
- this.errorStateMatcher = errorStateMatcher;
588
- this.ngControl = ngControl;
589
- this.parentForm = parentForm;
590
- this.changeDetectorRef = changeDetectorRef;
591
- this.parentFormGroup = parentFormGroup;
592
- this.arquivoService = arquivoService;
593
- if (this.ngControl != null) {
594
- this.ngControl.valueAccessor = this;
595
- }
596
- }
597
- onChange = (val) => {
598
- };
599
- onTouched = () => {
600
- };
601
- get focused() {
602
- return this.value && (this.multiple ? this.value.find((a) => a.loading) : this.value.loading);
603
- }
604
- get empty() {
605
- return !this.value;
606
- }
607
- onContainerClick(event) {
608
- // Não necessário
609
- }
610
- get shouldLabelFloat() {
611
- return true;
612
- }
613
- get placeholder() {
614
- return this.$placeholder;
615
- }
616
- set placeholder(plh) {
617
- this.$placeholder = plh;
618
- this.stateChanges.next();
619
- }
620
- get required() {
621
- return this.$required;
622
- }
623
- set required(value) {
624
- this.$required = coerceBooleanProperty(value);
625
- this.stateChanges.next();
626
- }
627
- get disabled() {
628
- return this.$disabled;
629
- }
630
- set disabled(value) {
631
- this.$disabled = coerceBooleanProperty(value);
632
- this.stateChanges.next();
633
- }
634
- get errorState() {
635
- return this.errorStateMatcher.isErrorState(this.ngControl.control, this.parentFormGroup || this.parentForm);
636
- }
637
- get controlType() {
638
- return 'input-fileupload';
639
- }
640
- setDescribedByIds(ids) {
641
- this.describedBy = ids.join(' ');
642
- }
643
- ngOnDestroy() {
644
- this.stateChanges.complete();
645
- }
646
- upload(arquivo) {
647
- return new Observable(observer => {
648
- if (!this.validaFormato(arquivo.nome)) {
649
- arquivo.error = { fileFormat: true };
650
- observer.error('Formato inválido');
651
- this.onChange(this.value);
652
- this.change.emit(this.value);
653
- this.stateChanges.next();
654
- return;
655
- }
656
- if (this.limite) {
657
- const total = this.parseLimite();
658
- if ((arquivo.length || 0) > total) {
659
- arquivo.error = {
660
- fileSize: {
661
- limite: this.limite,
662
- }
663
- };
664
- observer.error('Tamanho inválido');
665
- this.onChange(this.value);
666
- this.change.emit(this.value);
667
- this.stateChanges.next();
668
- return;
669
- }
670
- }
671
- this.arquivoService.upload(arquivo.file, ...(this.agrupadores || []))
672
- .subscribe({
673
- next: event => {
674
- if (event.type === 'conclusao') {
675
- arquivo.progresso = undefined;
676
- if (this.multiple) {
677
- this.value = [
678
- ...(this.value || []).map((a) => a === arquivo ? event.attachment : a)
679
- ];
680
- this.onChange(this.value);
681
- this.change.emit(this.value);
682
- this.stateChanges.next();
683
- }
684
- else {
685
- this.value = event.attachment;
686
- this.onChange(event.attachment);
687
- this.change.emit(event.attachment);
688
- this.stateChanges.next();
689
- }
690
- observer.next(null);
691
- observer.complete();
692
- }
693
- else if (event.type === 'progresso') {
694
- arquivo.progresso = event.progresso;
695
- this.stateChanges.next();
696
- }
697
- },
698
- error: err => {
699
- arquivo.error = { fileError: true };
700
- this.onChange(this.value);
701
- this.change.emit(this.value);
702
- this.stateChanges.next();
703
- observer.error(err);
704
- }
705
- });
706
- });
707
- }
708
- parseLimite() {
709
- let total = Number(this.limite.replace(/\D+/g, ''));
710
- if (this.limite.toUpperCase().indexOf('GB') >= 0) {
711
- total = total * 1024 * 1024 * 1024;
712
- }
713
- if (this.limite.toUpperCase().indexOf('MB') >= 0) {
714
- total = total * 1024 * 1024;
715
- }
716
- if (this.limite.toUpperCase().indexOf('KB') >= 0) {
717
- total = total * 1024;
718
- }
719
- return total;
720
- }
721
- validaFormato(filename) {
722
- if (this.accept) {
723
- let formats = [];
724
- if (typeof this.accept === 'string') {
725
- formats = [this.accept];
726
- }
727
- else {
728
- formats = this.accept;
729
- }
730
- for (const format of formats) {
731
- if (filename.toLowerCase().indexOf(format.toLowerCase()) === filename.length - format.length) {
732
- return true;
733
- }
734
- }
735
- return false;
736
- }
737
- return true;
738
- }
739
- uploadNext() {
740
- if (this.multiple) {
741
- if (this.value) {
742
- for (const item of this.value) {
743
- if (item.loading && !item.error) {
744
- this.upload(item).subscribe(() => this.uploadNext(), err => this.uploadNext());
745
- break;
746
- }
747
- }
748
- }
749
- }
750
- else if (this.value && this.value.loading && !this.value.error) {
751
- this.upload(this.value).subscribe(() => this.uploadNext(), err => this.uploadNext());
752
- }
753
- }
754
- onFileChange(event) {
755
- this.onTouched();
756
- if (event.target.files && event.target.files.length) {
757
- if (this.multiple) {
758
- const arqs = [];
759
- for (const file of event.target.files) {
760
- arqs.push({
761
- file,
762
- loading: true,
763
- nome: file.name,
764
- length: file.size,
765
- });
766
- }
767
- this.value = [
768
- ...(this.value || []),
769
- ...arqs
770
- ];
771
- this.onChange(this.value);
772
- this.change.emit(this.value);
773
- this.stateChanges.next();
774
- }
775
- else {
776
- this.value = {
777
- file: event.target.files[0],
778
- length: event.target.files[0].size,
779
- loading: true,
780
- nome: event.target.files[0].name
781
- };
782
- this.onChange(this.value);
783
- this.change.emit(this.value);
784
- this.stateChanges.next();
785
- }
786
- this.uploadNext();
787
- }
788
- else {
789
- this.selectCancel.emit();
790
- }
791
- event.target.value = '';
792
- }
793
- openFileChooser() {
794
- if (!this.disabled) {
795
- this.input.nativeElement.click();
796
- }
797
- }
798
- async remover(arquivo) {
799
- if (this.value) {
800
- if (this.multiple) {
801
- if (Array.isArray(this.value)) {
802
- this.value.splice(this.value.indexOf(arquivo), 1);
803
- if (this.value.length) {
804
- this.value = [...this.value];
805
- this.onChange(this.value);
806
- this.change.emit(this.value);
807
- this.stateChanges.next();
808
- }
809
- else {
810
- this.value = undefined;
811
- this.onChange(undefined);
812
- this.change.emit(undefined);
813
- this.stateChanges.next();
814
- }
815
- }
816
- }
817
- else {
818
- this.value = undefined;
819
- this.onChange(undefined);
820
- this.change.emit(undefined);
821
- this.stateChanges.next();
822
- }
823
- }
824
- }
825
- registerOnTouched(fn) {
826
- this.onTouched = fn;
827
- }
828
- registerOnChange(fn) {
829
- this.onChange = fn;
830
- }
831
- setDisabledState(isDisabled) {
832
- this.disabled = isDisabled;
833
- }
834
- writeValue(obj) {
835
- if (obj) {
836
- if (this.multiple) {
837
- this.value = obj.map((a) => typeof a === 'string' ? { url: a } : a);
838
- this.stateChanges.next();
839
- }
840
- else if (typeof obj === 'string') {
841
- this.value = { url: obj };
842
- this.stateChanges.next();
843
- }
844
- else {
845
- this.value = obj;
846
- this.stateChanges.next();
847
- }
848
- }
849
- else {
850
- this.value = obj;
851
- this.stateChanges.next();
852
- }
853
- }
854
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputFileUploadComponent, deps: [{ token: i1$2.ErrorStateMatcher }, { token: i1.NgControl, optional: true, self: true }, { token: i1.NgForm, optional: true }, { token: i0.ChangeDetectorRef }, { token: i1.FormGroupDirective, optional: true }, { token: ARQUIVO_MANAGER_SERVICE }], target: i0.ɵɵFactoryTarget.Component });
855
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.5", type: InputFileUploadComponent, isStandalone: true, selector: "mcl-input-fileupload", inputs: { multiple: "multiple", limite: "limite", accept: "accept", template: "template", agrupadores: "agrupadores", placeholder: "placeholder", required: "required", disabled: "disabled" }, outputs: { selectCancel: "selectCancel", stateChanges: "change", change: "change" }, host: { properties: { "id": "this.id", "attr.aria-describedby": "this.describedBy", "class.floating": "this.shouldLabelFloat" } }, providers: [
856
- {
857
- provide: MatFormFieldControl,
858
- useExisting: InputFileUploadComponent
859
- }
860
- ], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "@if (multiple && template == 'chips') {\r\n <div class=\"chips\">\r\n @if (value?.length) {\r\n <mat-chip-grid>\r\n @for (arquivo of value; track arquivo) {\r\n <mat-chip [ngClass]=\"{'error':arquivo.loading && arquivo.error,'success':!arquivo.loading}\">\r\n @if (arquivo.loading && !arquivo.error) {\r\n <mat-spinner [value]=\"arquivo.progresso\" [diameter]=\"24\"></mat-spinner>\r\n }\r\n @if (arquivo.loading && arquivo.error) {\r\n <mat-icon class=\"error\">remove_circle_outline</mat-icon>\r\n }\r\n @if (!arquivo.loading) {\r\n <mat-icon class=\"success\">check_circle_outline</mat-icon>\r\n }\r\n {{ arquivo.nome || arquivo.filename }}\r\n @if (!disabled) {\r\n <a (click)=\"remover(arquivo)\" href=\"javascript:void(0)\">\r\n <mat-icon>close</mat-icon>\r\n </a>\r\n }\r\n </mat-chip>\r\n }\r\n </mat-chip-grid>\r\n }\r\n\r\n @if (value?.length && !disabled) {\r\n <hr/>\r\n }\r\n\r\n @if (!disabled) {\r\n <input type=\"file\" (change)=\"onFileChange($event)\" #input [multiple]=\"multiple\"/>\r\n }\r\n </div>\r\n}\r\n\r\n@if (multiple && template == 'preview') {\r\n <div class=\"previews\">\r\n @if (value?.length) {\r\n <div fxLayout=\"row wrap\" fxLayoutGap=\"20px\" fxFlexAlign=\"center\">\r\n @for (arquivo of value; track arquivo) {\r\n <div>\r\n <div class=\"preview\" [ngClass]=\"{'error':arquivo.loading && arquivo.error,'success':!arquivo.loading}\">\r\n <mcl-preview-arquivo [group]=\"value\" [arquivo]=\"arquivo\"></mcl-preview-arquivo>\r\n\r\n @if (!disabled) {\r\n <div class=\"footer\">\r\n @if (arquivo.loading && !arquivo.error) {\r\n <mat-spinner [value]=\"arquivo.progresso\" [diameter]=\"24\"\r\n ></mat-spinner>\r\n }\r\n @if (arquivo.loading && arquivo.error) {\r\n <mat-icon class=\"error\">remove_circle_outline</mat-icon>\r\n }\r\n @if (!arquivo.loading) {\r\n <mat-icon class=\"success\">check_circle_outline</mat-icon>\r\n }\r\n <span>{{ arquivo.nome || arquivo.filename }}</span>\r\n @if (!disabled) {\r\n <a (click)=\"remover(arquivo)\" href=\"javascript:void(0)\">\r\n <mat-icon>close</mat-icon>\r\n </a>\r\n }\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n\r\n </div>\r\n }\r\n\r\n @if (value?.length && !disabled) {\r\n <hr/>\r\n }\r\n\r\n @if (!disabled) {\r\n <input type=\"file\" (change)=\"onFileChange($event)\" #input [multiple]=\"multiple\"/>\r\n }\r\n </div>\r\n}\r\n\r\n@if (template == 'manual') {\r\n <div>\r\n <input type=\"file\" [disabled]=\"disabled\" (change)=\"onFileChange($event)\" #input\r\n [multiple]=\"multiple\" style=\"display: none\"/>\r\n </div>\r\n}\r\n\r\n@if (!multiple && template != 'manual') {\r\n <input #input type=\"file\" style=\"display: none\"\r\n (change)=\"onFileChange($event)\"/>\r\n\r\n <div class=\"input\">\r\n @if (!value) {\r\n <button mat-icon-button type=\"button\"\r\n (click)=\"openFileChooser()\"\r\n matPrefix>\r\n <mat-icon>attach_file</mat-icon>\r\n </button>\r\n }\r\n @if (value && !value.loading && !value.error) {\r\n <button mat-icon-button type=\"button\"\r\n [mclDownloadArquivo]=\"value\"\r\n matPrefix>\r\n <mat-icon>download</mat-icon>\r\n </button>\r\n }\r\n @if (value?.error) {\r\n <button mat-icon-button type=\"button\" matPrefixdisabled>\r\n <mat-icon>warning</mat-icon>\r\n </button>\r\n }\r\n @if (value?.loading && !value?.error) {\r\n <button mat-icon-button type=\"button\" matPrefix disabled>\r\n <mat-spinner [value]=\"value.progresso\"\r\n [diameter]=\"24\"></mat-spinner>\r\n </button>\r\n }\r\n @if (!value) {\r\n <input matInput readonly (click)=\"openFileChooser()\" [required]=\"required\"\r\n value=\"Selecione um arquivo...\"/>\r\n }\r\n @if (value && value.loading && !value.error) {\r\n <input matInput readonly [required]=\"required\"\r\n value=\"Submetendo arquivo...\"/>\r\n }\r\n @if (value && value.error) {\r\n <input matInput readonly [required]=\"required\"\r\n [value]=\"value?.nome || value?.filename\"/>\r\n }\r\n @if (value && !value.loading) {\r\n <input matInput readonly [mclDownloadArquivo]=\"value\" [required]=\"required\"\r\n [value]=\"value?.nome || value?.filename\"/>\r\n }\r\n @if (value && (!value.loading || value?.error) && !disabled) {\r\n <button mat-icon-button type=\"button\" matSuffix\r\n matTooltip=\"Remover\" (click)=\"remover(value)\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n}\r\n", styles: ["span{opacity:0;transition:opacity .2s}:host.floating span{opacity:1}mat-chip>mat-spinner,mat-chip>mat-icon,.preview .footer>mat-spinner,.preview .footer>mat-icon{margin-right:5px;vertical-align:middle}mat-chip a,.preview .footer a{padding:5px}mat-chip a mat-icon,.preview .footer a mat-icon{margin-left:10px;vertical-align:middle}mat-chip.error,.preview.error{color:red}mat-chip.success,.preview.success{color:green}.preview{text-align:center;width:200px;overflow:hidden;margin:0 auto 20px}.preview mcl-preview-arquivo{margin:auto;display:block}.preview .footer{display:flex;text-align:left}.preview .footer span{flex:1 1 auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.preview .footer mat-icon,.preview .footer a{flex:1}.input{display:flex}.input input{flex:1 1 auto}\n"], dependencies: [{ kind: "component", type: MatChipGrid, selector: "mat-chip-grid", inputs: ["disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "component", type: MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["role", "id", "aria-label", "aria-description", "value", "color", "removable", "highlighted", "disableRipple", "disabled"], outputs: ["removed", "destroyed"], exportAs: ["matChip"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: PreviewArquivoComponent, selector: "mcl-preview-arquivo", inputs: ["showLoading", "height", "width", "group", "arquivo"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "directive", type: MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: DownloadArquivoDirective, selector: "[mclDownloadArquivo]", inputs: ["mclDownloadArquivo", "target"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }] });
861
- }
862
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputFileUploadComponent, decorators: [{
863
- type: Component,
864
- args: [{ selector: 'mcl-input-fileupload', imports: [
865
- MatChipGrid,
866
- MatChip,
867
- NgClass,
868
- MatProgressSpinner,
869
- MatIcon,
870
- PreviewArquivoComponent,
871
- MatIconButton,
872
- MatPrefix,
873
- DownloadArquivoDirective,
874
- MatInput,
875
- MatTooltip,
876
- MatSuffix
877
- ], providers: [
878
- {
879
- provide: MatFormFieldControl,
880
- useExisting: InputFileUploadComponent
881
- }
882
- ], template: "@if (multiple && template == 'chips') {\r\n <div class=\"chips\">\r\n @if (value?.length) {\r\n <mat-chip-grid>\r\n @for (arquivo of value; track arquivo) {\r\n <mat-chip [ngClass]=\"{'error':arquivo.loading && arquivo.error,'success':!arquivo.loading}\">\r\n @if (arquivo.loading && !arquivo.error) {\r\n <mat-spinner [value]=\"arquivo.progresso\" [diameter]=\"24\"></mat-spinner>\r\n }\r\n @if (arquivo.loading && arquivo.error) {\r\n <mat-icon class=\"error\">remove_circle_outline</mat-icon>\r\n }\r\n @if (!arquivo.loading) {\r\n <mat-icon class=\"success\">check_circle_outline</mat-icon>\r\n }\r\n {{ arquivo.nome || arquivo.filename }}\r\n @if (!disabled) {\r\n <a (click)=\"remover(arquivo)\" href=\"javascript:void(0)\">\r\n <mat-icon>close</mat-icon>\r\n </a>\r\n }\r\n </mat-chip>\r\n }\r\n </mat-chip-grid>\r\n }\r\n\r\n @if (value?.length && !disabled) {\r\n <hr/>\r\n }\r\n\r\n @if (!disabled) {\r\n <input type=\"file\" (change)=\"onFileChange($event)\" #input [multiple]=\"multiple\"/>\r\n }\r\n </div>\r\n}\r\n\r\n@if (multiple && template == 'preview') {\r\n <div class=\"previews\">\r\n @if (value?.length) {\r\n <div fxLayout=\"row wrap\" fxLayoutGap=\"20px\" fxFlexAlign=\"center\">\r\n @for (arquivo of value; track arquivo) {\r\n <div>\r\n <div class=\"preview\" [ngClass]=\"{'error':arquivo.loading && arquivo.error,'success':!arquivo.loading}\">\r\n <mcl-preview-arquivo [group]=\"value\" [arquivo]=\"arquivo\"></mcl-preview-arquivo>\r\n\r\n @if (!disabled) {\r\n <div class=\"footer\">\r\n @if (arquivo.loading && !arquivo.error) {\r\n <mat-spinner [value]=\"arquivo.progresso\" [diameter]=\"24\"\r\n ></mat-spinner>\r\n }\r\n @if (arquivo.loading && arquivo.error) {\r\n <mat-icon class=\"error\">remove_circle_outline</mat-icon>\r\n }\r\n @if (!arquivo.loading) {\r\n <mat-icon class=\"success\">check_circle_outline</mat-icon>\r\n }\r\n <span>{{ arquivo.nome || arquivo.filename }}</span>\r\n @if (!disabled) {\r\n <a (click)=\"remover(arquivo)\" href=\"javascript:void(0)\">\r\n <mat-icon>close</mat-icon>\r\n </a>\r\n }\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n\r\n </div>\r\n }\r\n\r\n @if (value?.length && !disabled) {\r\n <hr/>\r\n }\r\n\r\n @if (!disabled) {\r\n <input type=\"file\" (change)=\"onFileChange($event)\" #input [multiple]=\"multiple\"/>\r\n }\r\n </div>\r\n}\r\n\r\n@if (template == 'manual') {\r\n <div>\r\n <input type=\"file\" [disabled]=\"disabled\" (change)=\"onFileChange($event)\" #input\r\n [multiple]=\"multiple\" style=\"display: none\"/>\r\n </div>\r\n}\r\n\r\n@if (!multiple && template != 'manual') {\r\n <input #input type=\"file\" style=\"display: none\"\r\n (change)=\"onFileChange($event)\"/>\r\n\r\n <div class=\"input\">\r\n @if (!value) {\r\n <button mat-icon-button type=\"button\"\r\n (click)=\"openFileChooser()\"\r\n matPrefix>\r\n <mat-icon>attach_file</mat-icon>\r\n </button>\r\n }\r\n @if (value && !value.loading && !value.error) {\r\n <button mat-icon-button type=\"button\"\r\n [mclDownloadArquivo]=\"value\"\r\n matPrefix>\r\n <mat-icon>download</mat-icon>\r\n </button>\r\n }\r\n @if (value?.error) {\r\n <button mat-icon-button type=\"button\" matPrefixdisabled>\r\n <mat-icon>warning</mat-icon>\r\n </button>\r\n }\r\n @if (value?.loading && !value?.error) {\r\n <button mat-icon-button type=\"button\" matPrefix disabled>\r\n <mat-spinner [value]=\"value.progresso\"\r\n [diameter]=\"24\"></mat-spinner>\r\n </button>\r\n }\r\n @if (!value) {\r\n <input matInput readonly (click)=\"openFileChooser()\" [required]=\"required\"\r\n value=\"Selecione um arquivo...\"/>\r\n }\r\n @if (value && value.loading && !value.error) {\r\n <input matInput readonly [required]=\"required\"\r\n value=\"Submetendo arquivo...\"/>\r\n }\r\n @if (value && value.error) {\r\n <input matInput readonly [required]=\"required\"\r\n [value]=\"value?.nome || value?.filename\"/>\r\n }\r\n @if (value && !value.loading) {\r\n <input matInput readonly [mclDownloadArquivo]=\"value\" [required]=\"required\"\r\n [value]=\"value?.nome || value?.filename\"/>\r\n }\r\n @if (value && (!value.loading || value?.error) && !disabled) {\r\n <button mat-icon-button type=\"button\" matSuffix\r\n matTooltip=\"Remover\" (click)=\"remover(value)\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n}\r\n", styles: ["span{opacity:0;transition:opacity .2s}:host.floating span{opacity:1}mat-chip>mat-spinner,mat-chip>mat-icon,.preview .footer>mat-spinner,.preview .footer>mat-icon{margin-right:5px;vertical-align:middle}mat-chip a,.preview .footer a{padding:5px}mat-chip a mat-icon,.preview .footer a mat-icon{margin-left:10px;vertical-align:middle}mat-chip.error,.preview.error{color:red}mat-chip.success,.preview.success{color:green}.preview{text-align:center;width:200px;overflow:hidden;margin:0 auto 20px}.preview mcl-preview-arquivo{margin:auto;display:block}.preview .footer{display:flex;text-align:left}.preview .footer span{flex:1 1 auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.preview .footer mat-icon,.preview .footer a{flex:1}.input{display:flex}.input input{flex:1 1 auto}\n"] }]
883
- }], ctorParameters: () => [{ type: i1$2.ErrorStateMatcher }, { type: i1.NgControl, decorators: [{
884
- type: Optional
885
- }, {
886
- type: Self
887
- }] }, { type: i1.NgForm, decorators: [{
888
- type: Optional
889
- }] }, { type: i0.ChangeDetectorRef }, { type: i1.FormGroupDirective, decorators: [{
890
- type: Optional
891
- }] }, { type: undefined, decorators: [{
892
- type: Inject,
893
- args: [ARQUIVO_MANAGER_SERVICE]
894
- }] }], propDecorators: { multiple: [{
895
- type: Input
896
- }], limite: [{
897
- type: Input
898
- }], accept: [{
899
- type: Input
900
- }], template: [{
901
- type: Input
902
- }], agrupadores: [{
903
- type: Input
904
- }], input: [{
905
- type: ViewChild,
906
- args: ['input']
907
- }], selectCancel: [{
908
- type: Output
909
- }], stateChanges: [{
910
- type: Output,
911
- args: ['change']
912
- }], change: [{
913
- type: Output
914
- }], id: [{
915
- type: HostBinding
916
- }], describedBy: [{
917
- type: HostBinding,
918
- args: ['attr.aria-describedby']
919
- }], shouldLabelFloat: [{
920
- type: HostBinding,
921
- args: ['class.floating']
922
- }], placeholder: [{
923
- type: Input
924
- }], required: [{
925
- type: Input
926
- }], disabled: [{
927
- type: Input
928
- }] } });
929
-
930
- class InputFileUploadValidatorDirective {
931
- multiple = false;
932
- validate(control) {
933
- if (control.value) {
934
- if (this.multiple && Array.isArray(control.value)) {
935
- const error = control.value.find(a => a.loading && a.error);
936
- if (error) {
937
- return error.error;
938
- }
939
- if (control.value.find(a => a.loading)) {
940
- return { fileUploading: true };
941
- }
942
- }
943
- else if (control.value.loading && control.value.error) {
944
- return control.value.error;
945
- }
946
- else if (control.value.loading) {
947
- return { fileUploading: true };
948
- }
949
- }
950
- return null;
951
- }
952
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputFileUploadValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
953
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.5", type: InputFileUploadValidatorDirective, isStandalone: true, selector: "mcl-input-fileupload,[mclFileupload]", inputs: { multiple: "multiple" }, providers: [{ provide: NG_VALIDATORS, useExisting: InputFileUploadValidatorDirective, multi: true }], ngImport: i0 });
954
- }
955
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputFileUploadValidatorDirective, decorators: [{
956
- type: Directive,
957
- args: [{
958
- selector: 'mcl-input-fileupload,[mclFileupload]',
959
- providers: [{ provide: NG_VALIDATORS, useExisting: InputFileUploadValidatorDirective, multi: true }]
960
- }]
961
- }], propDecorators: { multiple: [{
962
- type: Input
963
- }] } });
964
-
965
- class InputCnpjComponent extends InputMaskComponent {
966
- constructor() {
967
- super();
968
- this.mask = '##.###.###/####-##';
969
- }
970
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputCnpjComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
971
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: InputCnpjComponent, isStandalone: true, selector: "mcl-input[cnpj]", providers: [
972
- {
973
- provide: MatFormFieldControl,
974
- useExisting: InputCnpjComponent
975
- }
976
- ], usesInheritance: true, ngImport: i0, template: "<input matInput [(ngModel)]=\"value\" #input\n [placeholder]=\"placeholder\"\n (focusin)=\"onTouched()\"/>\n", styles: [""], dependencies: [{ kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
977
- }
978
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputCnpjComponent, decorators: [{
979
- type: Component,
980
- args: [{ selector: 'mcl-input[cnpj]', imports: [
981
- MatInput,
982
- FormsModule
983
- ], providers: [
984
- {
985
- provide: MatFormFieldControl,
986
- useExisting: InputCnpjComponent
987
- }
988
- ], template: "<input matInput [(ngModel)]=\"value\" #input\n [placeholder]=\"placeholder\"\n (focusin)=\"onTouched()\"/>\n" }]
989
- }], ctorParameters: () => [] });
990
-
991
- class InputCepComponent extends InputMaskComponent {
992
- constructor() {
993
- super();
994
- this.mask = '##.###-###';
995
- }
996
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputCepComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
997
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: InputCepComponent, isStandalone: true, selector: "mcl-input[cep]", providers: [
998
- {
999
- provide: MatFormFieldControl,
1000
- useExisting: InputCepComponent
1001
- }
1002
- ], usesInheritance: true, ngImport: i0, template: "<input matInput [(ngModel)]=\"value\" #input\n [placeholder]=\"placeholder\"\n (focusin)=\"onTouched()\"/>\n", styles: [""], dependencies: [{ kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
1003
- }
1004
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputCepComponent, decorators: [{
1005
- type: Component,
1006
- args: [{ selector: 'mcl-input[cep]', imports: [
1007
- MatInput,
1008
- FormsModule
1009
- ], providers: [
1010
- {
1011
- provide: MatFormFieldControl,
1012
- useExisting: InputCepComponent
1013
- }
1014
- ], template: "<input matInput [(ngModel)]=\"value\" #input\n [placeholder]=\"placeholder\"\n (focusin)=\"onTouched()\"/>\n" }]
1015
- }], ctorParameters: () => [] });
1016
-
1017
- class InputCpfCnpjComponent extends InputMaskComponent {
1018
- get value() {
1019
- return super.value;
1020
- }
1021
- set value(value) {
1022
- const unmasked = this.removeMask(value);
1023
- if (!!unmasked) {
1024
- if (unmasked.length > 11) {
1025
- this.mask = '##.###.###/####-##';
1026
- }
1027
- else {
1028
- this.mask = '###.###.###-##';
1029
- }
1030
- super.value = value;
1031
- }
1032
- }
1033
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputCpfCnpjComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1034
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: InputCpfCnpjComponent, isStandalone: true, selector: "mcl-input[cpfCnpj]", providers: [
1035
- {
1036
- provide: MatFormFieldControl,
1037
- useExisting: InputCpfCnpjComponent
1038
- }
1039
- ], usesInheritance: true, ngImport: i0, template: "<input matInput [(ngModel)]=\"value\" #input\n [placeholder]=\"placeholder\"\n (focusin)=\"onTouched()\"/>\n", styles: [""], dependencies: [{ kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
1040
- }
1041
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputCpfCnpjComponent, decorators: [{
1042
- type: Component,
1043
- args: [{ selector: 'mcl-input[cpfCnpj]', imports: [
1044
- MatInput,
1045
- FormsModule
1046
- ], providers: [
1047
- {
1048
- provide: MatFormFieldControl,
1049
- useExisting: InputCpfCnpjComponent
1050
- }
1051
- ], template: "<input matInput [(ngModel)]=\"value\" #input\n [placeholder]=\"placeholder\"\n (focusin)=\"onTouched()\"/>\n" }]
1052
- }] });
1053
-
1054
- class InputCpfComponent extends InputMaskComponent {
1055
- constructor() {
1056
- super();
1057
- this.mask = '###.###.###-##';
1058
- }
1059
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputCpfComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1060
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: InputCpfComponent, isStandalone: true, selector: "mcl-input[cpf]", providers: [
1061
- {
1062
- provide: MatFormFieldControl,
1063
- useExisting: InputCpfComponent
1064
- }
1065
- ], usesInheritance: true, ngImport: i0, template: "<input matInput [(ngModel)]=\"value\" #input\n [placeholder]=\"placeholder\"\n (focusin)=\"onTouched()\"/>\n", styles: [""], dependencies: [{ kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
1066
- }
1067
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputCpfComponent, decorators: [{
1068
- type: Component,
1069
- args: [{ selector: 'mcl-input[cpf]', imports: [
1070
- MatInput,
1071
- FormsModule
1072
- ], providers: [
1073
- {
1074
- provide: MatFormFieldControl,
1075
- useExisting: InputCpfComponent
1076
- }
1077
- ], template: "<input matInput [(ngModel)]=\"value\" #input\n [placeholder]=\"placeholder\"\n (focusin)=\"onTouched()\"/>\n" }]
1078
- }], ctorParameters: () => [] });
1079
-
1080
- class InputPhoneComponent extends InputMaskComponent {
1081
- applyMask(value) {
1082
- if (value) {
1083
- const unmasked = this.removeMask(value);
1084
- if (unmasked.length > 2 && unmasked[2] === '9') {
1085
- this.mask = '(##) #####-####';
1086
- }
1087
- else {
1088
- this.mask = '(##) ####-####';
1089
- }
1090
- }
1091
- return super.applyMask(value);
1092
- }
1093
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputPhoneComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1094
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: InputPhoneComponent, isStandalone: true, selector: "mcl-input[phone]", providers: [
1095
- {
1096
- provide: MatFormFieldControl,
1097
- useExisting: InputPhoneComponent
1098
- }
1099
- ], usesInheritance: true, ngImport: i0, template: "<input matInput [(ngModel)]=\"value\" #input\n [placeholder]=\"placeholder\"\n (focusin)=\"onTouched()\"/>\n", styles: [""], dependencies: [{ kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
1100
- }
1101
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputPhoneComponent, decorators: [{
1102
- type: Component,
1103
- args: [{ selector: 'mcl-input[phone]', imports: [
1104
- MatInput,
1105
- FormsModule
1106
- ], providers: [
1107
- {
1108
- provide: MatFormFieldControl,
1109
- useExisting: InputPhoneComponent
1110
- }
1111
- ], template: "<input matInput [(ngModel)]=\"value\" #input\n [placeholder]=\"placeholder\"\n (focusin)=\"onTouched()\"/>\n" }]
1112
- }] });
1113
-
1114
- class OptionNode {
1115
- pool;
1116
- value;
1117
- subject;
1118
- constructor(pool, value, selected = false) {
1119
- this.pool = pool;
1120
- this.value = value;
1121
- this.subject = new BehaviorSubject(selected);
1122
- }
1123
- get model() {
1124
- return this.pool.model();
1125
- }
1126
- get observable() {
1127
- return this.subject;
1128
- }
1129
- setSelected(selected) {
1130
- this.subject.next(selected);
1131
- }
1132
- dispose() {
1133
- this.subject.complete();
1134
- }
1135
- touched() {
1136
- this.pool.touched();
1137
- }
1138
- }
1139
-
1140
- class NodePool {
1141
- name;
1142
- _nodes = new BehaviorSubject([]);
1143
- _touch = new Subject();
1144
- _groups = [];
1145
- constructor(name) {
1146
- this.name = name;
1147
- }
1148
- model() {
1149
- return this._nodes
1150
- .pipe(switchMap(ns => combineLatest(ns
1151
- .map(n => n.observable
1152
- .pipe(map(selected => ({
1153
- selected,
1154
- value: n.value
1155
- })))))))
1156
- .pipe(map(ops => {
1157
- const model = ops.filter(o => o.selected).map(o => o.value);
1158
- return model.length ? model : undefined;
1159
- }));
1160
- }
1161
- touch() {
1162
- return this._touch;
1163
- }
1164
- all() {
1165
- return this._nodes
1166
- .pipe(switchMap(ns => combineLatest(ns
1167
- .map(n => n.observable))))
1168
- .pipe(map(ops => {
1169
- if (ops.length) {
1170
- const first = ops[0];
1171
- for (const o of ops) {
1172
- if (o !== first) {
1173
- return false;
1174
- }
1175
- }
1176
- return !!first;
1177
- }
1178
- return false;
1179
- }));
1180
- }
1181
- get empty() {
1182
- return !this._nodes.value.length && !this._groups.length;
1183
- }
1184
- dispose() {
1185
- this._nodes.complete();
1186
- this._touch.complete();
1187
- }
1188
- touched() {
1189
- this._touch.next(undefined);
1190
- }
1191
- register(value) {
1192
- const selected = !!this.lastValues && this.lastValues.indexOf(value) >= 0;
1193
- const node = new OptionNode(this, value, selected);
1194
- this._nodes.next([
1195
- ...this._nodes.value,
1196
- node
1197
- ]);
1198
- return node;
1199
- }
1200
- unregister(node) {
1201
- this._nodes.next(this._nodes.value.filter(n => n !== node));
1202
- node.dispose();
1203
- }
1204
- registerGroup(group) {
1205
- this._groups.push(group);
1206
- }
1207
- unregisterGroup(group) {
1208
- this._groups.splice(this._groups.indexOf(group), 1);
1209
- }
1210
- lastValues = [];
1211
- writeValue(values) {
1212
- if (values !== this.lastValues) {
1213
- this.lastValues = values || [];
1214
- if (values) {
1215
- this._nodes.value.forEach(n => {
1216
- n.setSelected(values.indexOf(n.value) >= 0);
1217
- });
1218
- }
1219
- else {
1220
- this._nodes.value.forEach(n => {
1221
- n.setSelected(false);
1222
- });
1223
- }
1224
- }
1225
- }
1226
- setAll(selected) {
1227
- this._nodes.value.forEach(m => m.setSelected(selected));
1228
- }
1229
- }
1230
-
1231
- class OptionCheckboxService {
1232
- nodes = {};
1233
- getPool(name) {
1234
- if (!this.nodes[name]) {
1235
- this.nodes[name] = new NodePool(name);
1236
- }
1237
- return this.nodes[name];
1238
- }
1239
- registerGroup(name, group) {
1240
- const pool = this.getPool(name);
1241
- pool.registerGroup(group);
1242
- return pool;
1243
- }
1244
- unregisterGroup(name, group) {
1245
- if (this.nodes[name]) {
1246
- this.nodes[name].unregisterGroup(group);
1247
- if (this.nodes[name].empty) {
1248
- this.nodes[name].dispose();
1249
- delete this.nodes[name];
1250
- }
1251
- }
1252
- }
1253
- unregister(name, node) {
1254
- if (this.nodes[name]) {
1255
- this.nodes[name].unregister(node);
1256
- if (this.nodes[name].empty) {
1257
- this.nodes[name].dispose();
1258
- delete this.nodes[name];
1259
- }
1260
- }
1261
- }
1262
- register(name, value) {
1263
- return this.getPool(name).register(value);
1264
- }
1265
- setAll(name, selected) {
1266
- if (this.nodes[name]) {
1267
- this.nodes[name].setAll(selected);
1268
- }
1269
- }
1270
- writeValue(name, model) {
1271
- this.getPool(name)?.writeValue(model);
1272
- }
1273
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: OptionCheckboxService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1274
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: OptionCheckboxService, providedIn: 'root' });
1275
- }
1276
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: OptionCheckboxService, decorators: [{
1277
- type: Injectable,
1278
- args: [{
1279
- providedIn: 'root'
1280
- }]
1281
- }] });
1282
-
1283
- class AllOptionCheckboxComponent {
1284
- fotonOptionCheckboxService;
1285
- _name;
1286
- disabled = false;
1287
- change = new EventEmitter();
1288
- selected;
1289
- pool;
1290
- constructor(fotonOptionCheckboxService) {
1291
- this.fotonOptionCheckboxService = fotonOptionCheckboxService;
1292
- }
1293
- get name() {
1294
- return this._name;
1295
- }
1296
- set name(name) {
1297
- this._name = name;
1298
- this.pool = this.fotonOptionCheckboxService.getPool(name);
1299
- this.selected = this.pool.all();
1300
- }
1301
- setSelected(selected) {
1302
- this.pool?.touched();
1303
- this.fotonOptionCheckboxService.setAll(this.name, selected);
1304
- this.change.emit();
1305
- }
1306
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AllOptionCheckboxComponent, deps: [{ token: OptionCheckboxService }], target: i0.ɵɵFactoryTarget.Component });
1307
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: AllOptionCheckboxComponent, isStandalone: true, selector: "mcl-option-checkbox[select-all-option]", inputs: { disabled: "disabled", name: "name" }, outputs: { change: "change" }, ngImport: i0, template: "<mat-checkbox [disabled]=\"disabled\"\n [ngModel]=\"selected | async\"\n (ngModelChange)=\"setSelected($event)\"\n [indeterminate]=\"(selected | async) === undefined\" >\n <ng-content></ng-content>\n</mat-checkbox>\n", dependencies: [{ kind: "component", type: MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: AsyncPipe, name: "async" }] });
1308
- }
1309
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AllOptionCheckboxComponent, decorators: [{
1310
- type: Component,
1311
- args: [{ selector: 'mcl-option-checkbox[select-all-option]', imports: [
1312
- MatCheckbox,
1313
- FormsModule,
1314
- AsyncPipe
1315
- ], template: "<mat-checkbox [disabled]=\"disabled\"\n [ngModel]=\"selected | async\"\n (ngModelChange)=\"setSelected($event)\"\n [indeterminate]=\"(selected | async) === undefined\" >\n <ng-content></ng-content>\n</mat-checkbox>\n" }]
1316
- }], ctorParameters: () => [{ type: OptionCheckboxService }], propDecorators: { disabled: [{
1317
- type: Input
1318
- }], change: [{
1319
- type: Output
1320
- }], name: [{
1321
- type: Input
1322
- }] } });
1323
-
1324
- class OptionCheckboxComponent {
1325
- fotonOptionCheckboxService;
1326
- _name;
1327
- _value;
1328
- node;
1329
- selected;
1330
- disabled = false;
1331
- change = new EventEmitter();
1332
- constructor(fotonOptionCheckboxService) {
1333
- this.fotonOptionCheckboxService = fotonOptionCheckboxService;
1334
- }
1335
- setSelected(selected) {
1336
- if (this.node) {
1337
- this.node.touched();
1338
- this.node.setSelected(selected);
1339
- this.change.emit();
1340
- }
1341
- }
1342
- get value() {
1343
- return this.node ? this.node.value : undefined;
1344
- }
1345
- set value(v) {
1346
- if (v != this.value) {
1347
- if (this.node) {
1348
- this.node.value = v;
1349
- }
1350
- else {
1351
- this._value = v;
1352
- }
1353
- }
1354
- }
1355
- get name() {
1356
- return this._name;
1357
- }
1358
- set name(n) {
1359
- if (n !== this.name && !this.node) {
1360
- this.node = this.fotonOptionCheckboxService.register(n, this._value);
1361
- this.selected = this.node.observable;
1362
- this._name = n;
1363
- }
1364
- }
1365
- onBlur() {
1366
- }
1367
- ngOnDestroy() {
1368
- this.fotonOptionCheckboxService.unregister(this.name, this.node);
1369
- }
1370
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: OptionCheckboxComponent, deps: [{ token: OptionCheckboxService }], target: i0.ɵɵFactoryTarget.Component });
1371
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: OptionCheckboxComponent, isStandalone: true, selector: "mcl-option-checkbox:not([select-all-option])", inputs: { disabled: "disabled", value: "value", name: "name" }, outputs: { change: "change" }, ngImport: i0, template: "<mat-checkbox [disabled]=\"disabled\"\n [ngModel]=\"selected | async\"\n (ngModelChange)=\"setSelected($event)\"\n [indeterminate]=\"(selected | async) === undefined\" >\n <ng-content></ng-content>\n</mat-checkbox>\n", dependencies: [{ kind: "component", type: MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: AsyncPipe, name: "async" }] });
1372
- }
1373
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: OptionCheckboxComponent, decorators: [{
1374
- type: Component,
1375
- args: [{ selector: 'mcl-option-checkbox:not([select-all-option])', imports: [
1376
- MatCheckbox,
1377
- FormsModule,
1378
- AsyncPipe
1379
- ], template: "<mat-checkbox [disabled]=\"disabled\"\n [ngModel]=\"selected | async\"\n (ngModelChange)=\"setSelected($event)\"\n [indeterminate]=\"(selected | async) === undefined\" >\n <ng-content></ng-content>\n</mat-checkbox>\n" }]
1380
- }], ctorParameters: () => [{ type: OptionCheckboxService }], propDecorators: { disabled: [{
1381
- type: Input
1382
- }], change: [{
1383
- type: Output
1384
- }], value: [{
1385
- type: Input
1386
- }], name: [{
1387
- type: Input
1388
- }] } });
1389
-
1390
- class OptionCheckboxGroupComponent {
1391
- optionCheckboxService;
1392
- callbackTimeout;
1393
- _name;
1394
- pool;
1395
- disabled = false;
1396
- change = new EventEmitter();
1397
- touched = new EventEmitter();
1398
- constructor(optionCheckboxService) {
1399
- this.optionCheckboxService = optionCheckboxService;
1400
- }
1401
- onTouchedCallback = () => {
1402
- };
1403
- onChangeCallback = () => {
1404
- };
1405
- get name() {
1406
- return this._name;
1407
- }
1408
- set name(n) {
1409
- if (n !== this.name && !this.pool) {
1410
- this.pool = this.optionCheckboxService.registerGroup(n, this);
1411
- this.pool.touch().subscribe(() => {
1412
- this.onTouchedCallback();
1413
- this.touched.emit();
1414
- });
1415
- this.pool.model().subscribe(model => {
1416
- clearTimeout(this.callbackTimeout);
1417
- this.callbackTimeout = setTimeout(() => {
1418
- this.onChangeCallback(model);
1419
- this.change.emit(model);
1420
- });
1421
- });
1422
- this._name = n;
1423
- }
1424
- }
1425
- onBlur() {
1426
- }
1427
- ngOnDestroy() {
1428
- this.optionCheckboxService.unregisterGroup(this.name, this);
1429
- }
1430
- writeValue(value) {
1431
- this.optionCheckboxService.writeValue(this.name, value);
1432
- }
1433
- registerOnChange(fn) {
1434
- this.onChangeCallback = fn;
1435
- }
1436
- registerOnTouched(fn) {
1437
- this.onTouchedCallback = fn;
1438
- }
1439
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: OptionCheckboxGroupComponent, deps: [{ token: OptionCheckboxService }], target: i0.ɵɵFactoryTarget.Component });
1440
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: OptionCheckboxGroupComponent, isStandalone: true, selector: "mcl-option-checkbox-group", inputs: { disabled: "disabled", name: "name" }, outputs: { change: "change", touched: "touched" }, providers: [
1441
- {
1442
- provide: NG_VALUE_ACCESSOR,
1443
- useExisting: OptionCheckboxGroupComponent,
1444
- multi: true
1445
- }
1446
- ], ngImport: i0, template: '', isInline: true });
1447
- }
1448
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: OptionCheckboxGroupComponent, decorators: [{
1449
- type: Component,
1450
- args: [{
1451
- selector: 'mcl-option-checkbox-group',
1452
- template: '',
1453
- providers: [
1454
- {
1455
- provide: NG_VALUE_ACCESSOR,
1456
- useExisting: OptionCheckboxGroupComponent,
1457
- multi: true
1458
- }
1459
- ]
1460
- }]
1461
- }], ctorParameters: () => [{ type: OptionCheckboxService }], propDecorators: { disabled: [{
1462
- type: Input
1463
- }], change: [{
1464
- type: Output
1465
- }], touched: [{
1466
- type: Output
1467
- }], name: [{
1468
- type: Input
1469
- }] } });
1470
-
1471
- class SelectChipsComponent extends AbstractMatFormFieldSelectControl {
1472
- add(event) {
1473
- this.onTouched();
1474
- const value = event.value;
1475
- if (!!value) {
1476
- this.value = [
1477
- ...(this.value || []),
1478
- value
1479
- ];
1480
- this.onChange(this.value);
1481
- }
1482
- }
1483
- remove(item) {
1484
- this.onTouched();
1485
- if (this.value) {
1486
- const index = this.value.indexOf(item);
1487
- if (index >= 0) {
1488
- this.value.splice(index, 1);
1489
- }
1490
- if (!this.value.length) {
1491
- this.value = undefined;
1492
- }
1493
- this.onChange(this.value);
1494
- }
1495
- }
1496
- selected(event) {
1497
- this.onTouched();
1498
- if (!this.value || !this.value.find((v) => v === event.option.value)) {
1499
- this.value = [
1500
- ...(this.value || []),
1501
- event.option.value
1502
- ];
1503
- this.onChange(this.value);
1504
- }
1505
- this.control.setValue('');
1506
- }
1507
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SelectChipsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1508
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.5", type: SelectChipsComponent, isStandalone: true, selector: "mcl-select-chips", providers: [
1509
- {
1510
- provide: MatFormFieldControl,
1511
- useExisting: SelectChipsComponent
1512
- }
1513
- ], usesInheritance: true, ngImport: i0, template: "<mat-chip-grid #chipList>\n @for (item of value; track doTrackBy(value)) {\n <mat-chip\n [removable]=\"!disabled\"\n (removed)=\"remove(item)\">\n {{ item }}\n @if (!disabled) {\n <mat-icon matChipRemove>cancel</mat-icon>\n }\n </mat-chip>\n }\n <input\n [placeholder]=\"placeholder\" required\n (focusin)=\"focused = true\"\n (focusout)=\"focused = false\"\n [formControl]=\"control\"\n [matAutocomplete]=\"filterAutocomplete\"\n [matChipInputFor]=\"chipList\"\n (matChipInputTokenEnd)=\"add($event)\">\n</mat-chip-grid>\n<mat-autocomplete #filterAutocomplete=\"matAutocomplete\" (optionSelected)=\"selected($event)\">\n @for (opcao of filteredOptions | async; track doTrackBy(opcao.value)) {\n <mat-option [value]=\"opcao.value\">\n {{ opcao.label }}\n </mat-option>\n }\n</mat-autocomplete>\n", styles: [""], dependencies: [{ kind: "component", type: MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["role", "id", "aria-label", "aria-description", "value", "color", "removable", "highlighted", "disableRipple", "disabled"], outputs: ["removed", "destroyed"], exportAs: ["matChip"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "directive", type: MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "component", type: MatChipGrid, selector: "mat-chip-grid", inputs: ["disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }] });
1514
- }
1515
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SelectChipsComponent, decorators: [{
1516
- type: Component,
1517
- args: [{ selector: 'mcl-select-chips', imports: [
1518
- MatChip,
1519
- MatIcon,
1520
- ReactiveFormsModule,
1521
- MatAutocompleteTrigger,
1522
- MatChipInput,
1523
- MatChipGrid,
1524
- AsyncPipe,
1525
- MatAutocomplete,
1526
- MatOption,
1527
- ], providers: [
1528
- {
1529
- provide: MatFormFieldControl,
1530
- useExisting: SelectChipsComponent
1531
- }
1532
- ], template: "<mat-chip-grid #chipList>\n @for (item of value; track doTrackBy(value)) {\n <mat-chip\n [removable]=\"!disabled\"\n (removed)=\"remove(item)\">\n {{ item }}\n @if (!disabled) {\n <mat-icon matChipRemove>cancel</mat-icon>\n }\n </mat-chip>\n }\n <input\n [placeholder]=\"placeholder\" required\n (focusin)=\"focused = true\"\n (focusout)=\"focused = false\"\n [formControl]=\"control\"\n [matAutocomplete]=\"filterAutocomplete\"\n [matChipInputFor]=\"chipList\"\n (matChipInputTokenEnd)=\"add($event)\">\n</mat-chip-grid>\n<mat-autocomplete #filterAutocomplete=\"matAutocomplete\" (optionSelected)=\"selected($event)\">\n @for (opcao of filteredOptions | async; track doTrackBy(opcao.value)) {\n <mat-option [value]=\"opcao.value\">\n {{ opcao.label }}\n </mat-option>\n }\n</mat-autocomplete>\n" }]
1533
- }] });
1534
-
1535
- class SelectAutocompleteComponent extends AbstractMatFormFieldSelectControl {
1536
- readonly;
1537
- select = new EventEmitter();
1538
- blur = new EventEmitter();
1539
- get shouldLabelFloat() {
1540
- return this.focused || !this.empty;
1541
- }
1542
- get empty() {
1543
- return !this.value;
1544
- }
1545
- onFocus() {
1546
- this.focused = true;
1547
- this.stateChanges.next();
1548
- }
1549
- onBlur() {
1550
- this.focused = false;
1551
- this.stateChanges.next();
1552
- this.blur.emit();
1553
- }
1554
- didTouch() {
1555
- this.onTouched();
1556
- }
1557
- ngOnDestroy() {
1558
- super.ngOnDestroy();
1559
- this.optionsSubscription?.unsubscribe();
1560
- }
1561
- setDisabledState(isDisabled) {
1562
- this.disabled = isDisabled;
1563
- if (isDisabled) {
1564
- this.control.disable();
1565
- }
1566
- else {
1567
- this.control.enable();
1568
- }
1569
- }
1570
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SelectAutocompleteComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1571
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.5", type: SelectAutocompleteComponent, isStandalone: true, selector: "mcl-select-autocomplete", inputs: { readonly: "readonly" }, outputs: { select: "select", blur: "blur" }, providers: [
1572
- {
1573
- provide: MatFormFieldControl,
1574
- useExisting: SelectAutocompleteComponent
1575
- }
1576
- ], usesInheritance: true, ngImport: i0, template: "<input matInput name=\"autocomplete\" autocomplete=\"off\"\n [formControl]=\"control\" [matAutocomplete]=\"autocompleteGeneric\"\n (keyup)=\"didTouch()\" (focus)=\"onFocus()\" (blur)=\"onBlur()\"\n [disabled]=\"disabled\" [readonly]=\"readonly\"/>\n<mat-autocomplete #autocompleteGeneric=\"matAutocomplete\"\n (optionSelected)=\"seleciona($event)\">\n @for (opcao of filteredOptions | async; track doTrackBy(opcao.value)) {\n <mat-option [value]=\"opcao.value\">\n {{ opcao.label }}\n </mat-option>\n }\n</mat-autocomplete>\n", styles: [".mat-option{line-height:inherit;height:inherit}h3{color:#333;margin:5px;white-space:nowrap;font-size:16px}p{color:#666;margin:5px;white-space:nowrap;font-size:12px}\n"], dependencies: [{ kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "pipe", type: AsyncPipe, name: "async" }] });
1577
- }
1578
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SelectAutocompleteComponent, decorators: [{
1579
- type: Component,
1580
- args: [{ selector: 'mcl-select-autocomplete', imports: [
1581
- MatInput,
1582
- MatAutocompleteTrigger,
1583
- ReactiveFormsModule,
1584
- MatAutocomplete,
1585
- MatOption,
1586
- AsyncPipe
1587
- ], providers: [
1588
- {
1589
- provide: MatFormFieldControl,
1590
- useExisting: SelectAutocompleteComponent
1591
- }
1592
- ], template: "<input matInput name=\"autocomplete\" autocomplete=\"off\"\n [formControl]=\"control\" [matAutocomplete]=\"autocompleteGeneric\"\n (keyup)=\"didTouch()\" (focus)=\"onFocus()\" (blur)=\"onBlur()\"\n [disabled]=\"disabled\" [readonly]=\"readonly\"/>\n<mat-autocomplete #autocompleteGeneric=\"matAutocomplete\"\n (optionSelected)=\"seleciona($event)\">\n @for (opcao of filteredOptions | async; track doTrackBy(opcao.value)) {\n <mat-option [value]=\"opcao.value\">\n {{ opcao.label }}\n </mat-option>\n }\n</mat-autocomplete>\n", styles: [".mat-option{line-height:inherit;height:inherit}h3{color:#333;margin:5px;white-space:nowrap;font-size:16px}p{color:#666;margin:5px;white-space:nowrap;font-size:12px}\n"] }]
1593
- }], propDecorators: { readonly: [{
1594
- type: Input
1595
- }], select: [{
1596
- type: Output
1597
- }], blur: [{
1598
- type: Output
1599
- }] } });
1600
-
1601
- class DelegateOptionProviderDirective {
1602
- delegate;
1603
- type() {
1604
- return this.delegate?.type() || 'string';
1605
- }
1606
- provide(search) {
1607
- return this.delegate.provide(search);
1608
- }
1609
- label(value) {
1610
- return this.delegate.label(value);
1611
- }
1612
- trackBy(value) {
1613
- if (!!this.delegate?.trackBy) {
1614
- return this.delegate.trackBy(value);
1615
- }
1616
- return value;
1617
- }
1618
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: DelegateOptionProviderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1619
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.5", type: DelegateOptionProviderDirective, isStandalone: true, selector: "mcl-select-autocomplete[delegate]", inputs: { delegate: "delegate" }, providers: [{
1620
- provide: SELECT_OPTION_PROVIDER,
1621
- useExisting: DelegateOptionProviderDirective,
1622
- }], ngImport: i0 });
1623
- }
1624
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: DelegateOptionProviderDirective, decorators: [{
1625
- type: Directive,
1626
- args: [{
1627
- selector: 'mcl-select-autocomplete[delegate]',
1628
- providers: [{
1629
- provide: SELECT_OPTION_PROVIDER,
1630
- useExisting: DelegateOptionProviderDirective,
1631
- }]
1632
- }]
1633
- }], propDecorators: { delegate: [{
1634
- type: Input
1635
- }] } });
1636
-
1637
- class SelectManyCheckboxComponent extends AbstractMatFormFieldSelectControl {
1638
- layout = 'grid';
1639
- layoutColumns = 3;
1640
- selected(value) {
1641
- return !!this.value?.find((v) => v === value);
1642
- }
1643
- change(value, checked) {
1644
- if (checked) {
1645
- if (!this.selected(value)) {
1646
- this.value = [
1647
- ...(this.value || []),
1648
- value
1649
- ];
1650
- }
1651
- }
1652
- else if (this.selected(value)) {
1653
- this.value = [
1654
- ...(this.value || []).filter((v) => v !== value),
1655
- ];
1656
- }
1657
- }
1658
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SelectManyCheckboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1659
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.5", type: SelectManyCheckboxComponent, isStandalone: true, selector: "mcl-select-many-checkbox", inputs: { layout: "layout", layoutColumns: "layoutColumns" }, providers: [
1660
- {
1661
- provide: MatFormFieldControl,
1662
- useExisting: SelectManyCheckboxComponent
1663
- }
1664
- ], usesInheritance: true, ngImport: i0, template: "<div class=\"mat-checkbox-container\"\n [ngClass]=\"{'vertical':layout === 'vertical','horizontal':layout ==='horizontal','grid': layout === 'grid' }\"\n [ngStyle]=\"{'max-height': layout === 'grid' ? ((((filteredOptions | async)!.length / layoutColumns) + 1) * 40) + 'px' : undefined}\">\n @for (opcao of filteredOptions | async; track doTrackBy(opcao.value)) {\n <mat-checkbox\n [required]=\"required\"\n [disabled]=\"disabled\"\n [checked]=\"selected(opcao.value)\"\n (change)=\"change(opcao.value, $event.checked)\">\n {{ opcao.label }}\n </mat-checkbox>\n }\n</div>\n", styles: [".mat-checkbox-container{display:flex;flex-wrap:wrap}.mat-checkbox-container.horizontal{flex-direction:row}.mat-checkbox-container.vertical,.mat-checkbox-container.grid{flex-direction:column}.mat-checkbox-container mat-checkbox{flex:1;padding:5px 5px 10px 0}@media (max-width: 750px){.mat-checkbox-container{max-height:none!important}.mat-checkbox-container.horizontal,.mat-checkbox-container.vertical,.mat-checkbox-container.grid{flex-direction:column}}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "pipe", type: AsyncPipe, name: "async" }] });
1665
- }
1666
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SelectManyCheckboxComponent, decorators: [{
1667
- type: Component,
1668
- args: [{ selector: 'mcl-select-many-checkbox', imports: [
1669
- NgClass,
1670
- NgStyle,
1671
- MatCheckbox,
1672
- AsyncPipe
1673
- ], providers: [
1674
- {
1675
- provide: MatFormFieldControl,
1676
- useExisting: SelectManyCheckboxComponent
1677
- }
1678
- ], template: "<div class=\"mat-checkbox-container\"\n [ngClass]=\"{'vertical':layout === 'vertical','horizontal':layout ==='horizontal','grid': layout === 'grid' }\"\n [ngStyle]=\"{'max-height': layout === 'grid' ? ((((filteredOptions | async)!.length / layoutColumns) + 1) * 40) + 'px' : undefined}\">\n @for (opcao of filteredOptions | async; track doTrackBy(opcao.value)) {\n <mat-checkbox\n [required]=\"required\"\n [disabled]=\"disabled\"\n [checked]=\"selected(opcao.value)\"\n (change)=\"change(opcao.value, $event.checked)\">\n {{ opcao.label }}\n </mat-checkbox>\n }\n</div>\n", styles: [".mat-checkbox-container{display:flex;flex-wrap:wrap}.mat-checkbox-container.horizontal{flex-direction:row}.mat-checkbox-container.vertical,.mat-checkbox-container.grid{flex-direction:column}.mat-checkbox-container mat-checkbox{flex:1;padding:5px 5px 10px 0}@media (max-width: 750px){.mat-checkbox-container{max-height:none!important}.mat-checkbox-container.horizontal,.mat-checkbox-container.vertical,.mat-checkbox-container.grid{flex-direction:column}}\n"] }]
1679
- }], propDecorators: { layout: [{
1680
- type: Input
1681
- }], layoutColumns: [{
1682
- type: Input
1683
- }] } });
1684
-
1685
- class SelectRadioComponent extends AbstractMatFormFieldSelectControl {
1686
- layout = 'vertical';
1687
- get shouldLabelFloat() {
1688
- return true;
1689
- }
1690
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SelectRadioComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1691
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.5", type: SelectRadioComponent, isStandalone: true, selector: "mcl-select-radio", inputs: { layout: "layout" }, providers: [
1692
- {
1693
- provide: MatFormFieldControl,
1694
- useExisting: SelectRadioComponent
1695
- }
1696
- ], usesInheritance: true, ngImport: i0, template: "<mat-radio-group\n [ngClass]=\"{'vertical':layout === 'vertical','horizontal':layout ==='horizontal'}\"\n [required]=\"required\"\n [disabled]=\"disabled\"\n [(ngModel)]=\"value\">\n\n @for (opcao of filteredOptions | async; track doTrackBy(opcao.value)) {\n <mat-radio-button [value]=\"opcao.value\">{{ opcao.label }}</mat-radio-button>\n }\n\n</mat-radio-group>\n", styles: ["mat-radio-group{display:flex}mat-radio-group.horizontal{flex-direction:row}mat-radio-group.vertical{flex-direction:column}mat-radio-group mat-radio-button{flex:1}@media (max-width: 750px){mat-radio-group.horizontal,mat-radio-group.vertical{flex-direction:column}mat-radio-group.horizontal mat-radio-button,mat-radio-group.vertical mat-radio-button{margin:10px 0}}\n"], dependencies: [{ kind: "directive", type: MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "pipe", type: AsyncPipe, name: "async" }] });
1697
- }
1698
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SelectRadioComponent, decorators: [{
1699
- type: Component,
1700
- args: [{ selector: 'mcl-select-radio', imports: [
1701
- MatRadioGroup,
1702
- NgClass,
1703
- FormsModule,
1704
- MatRadioButton,
1705
- AsyncPipe
1706
- ], providers: [
1707
- {
1708
- provide: MatFormFieldControl,
1709
- useExisting: SelectRadioComponent
1710
- }
1711
- ], template: "<mat-radio-group\n [ngClass]=\"{'vertical':layout === 'vertical','horizontal':layout ==='horizontal'}\"\n [required]=\"required\"\n [disabled]=\"disabled\"\n [(ngModel)]=\"value\">\n\n @for (opcao of filteredOptions | async; track doTrackBy(opcao.value)) {\n <mat-radio-button [value]=\"opcao.value\">{{ opcao.label }}</mat-radio-button>\n }\n\n</mat-radio-group>\n", styles: ["mat-radio-group{display:flex}mat-radio-group.horizontal{flex-direction:row}mat-radio-group.vertical{flex-direction:column}mat-radio-group mat-radio-button{flex:1}@media (max-width: 750px){mat-radio-group.horizontal,mat-radio-group.vertical{flex-direction:column}mat-radio-group.horizontal mat-radio-button,mat-radio-group.vertical mat-radio-button{margin:10px 0}}\n"] }]
1712
- }], propDecorators: { layout: [{
1713
- type: Input
1714
- }] } });
1715
-
1716
- class InputTelefoneInternacionalComponent extends AbstractMatFormFieldControl {
1717
- preferredContries = ['br'];
1718
- readonly;
1719
- blur = new EventEmitter();
1720
- alwaysShowCountry = false;
1721
- telInput;
1722
- $innerValue;
1723
- get value() {
1724
- return this.$innerValue;
1725
- }
1726
- set value(value) {
1727
- this.$innerValue = value;
1728
- this.stateChanges.next();
1729
- this.onChange(value?.replace(/[^\d+]/g, ''));
1730
- }
1731
- get shouldLabelFloat() {
1732
- return this.focused || !this.empty || this.alwaysShowCountry;
1733
- }
1734
- get empty() {
1735
- return !this.value;
1736
- }
1737
- onFocus() {
1738
- this.focused = true;
1739
- this.stateChanges.next();
1740
- }
1741
- onBlur() {
1742
- this.focused = false;
1743
- this.stateChanges.next();
1744
- this.blur.emit();
1745
- }
1746
- writeValue(value) {
1747
- this.value = value;
1748
- }
1749
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputTelefoneInternacionalComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1750
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: InputTelefoneInternacionalComponent, isStandalone: true, selector: "mcl-input-telefone-intl", inputs: { preferredContries: "preferredContries", readonly: "readonly", alwaysShowCountry: "alwaysShowCountry" }, outputs: { blur: "blur" }, providers: [
1751
- {
1752
- provide: MatFormFieldControl,
1753
- useExisting: InputTelefoneInternacionalComponent
1754
- },
1755
- ], viewQueries: [{ propertyName: "telInput", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"input\">\n <lac-mat-country-selector\n [ngClass]=\"{'hidden': !focused && !value && !alwaysShowCountry}\"\n [preferredCountries]=\"preferredContries\"\n [selectorFor]=\"input\"\n searchPlaceholder=\"Filtrar paises...\"></lac-mat-country-selector>\n <lac-mat-tel-input #input\n [(ngModel)]=\"value\"\n (focusin)=\"onFocus()\" (focusout)=\"onBlur()\"></lac-mat-tel-input>\n</div>\n", styles: [".input{display:flex;align-items:center;margin:-8px 0;gap:8px}.input lac-mat-country-selector{transition:.3s}.input lac-mat-country-selector.hidden{opacity:0}.input lac-mat-tel-input{flex:1 1 auto}\n"], dependencies: [{ kind: "ngmodule", type: LacMatTelInputModule }, { kind: "component", type: i1$3.LacMatTelInputComponent, selector: "lac-mat-tel-input", inputs: ["required", "disabled", "internationalFormat"], outputs: ["blur"] }, { kind: "component", type: i1$3.LacMatCountrySelectorComponent, selector: "lac-mat-country-selector", inputs: ["selectorFor", "preferredCountries", "onlyCountries", "showDialCode", "disableSearch", "searchPlaceholder"], outputs: ["change"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
1756
- }
1757
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputTelefoneInternacionalComponent, decorators: [{
1758
- type: Component,
1759
- args: [{ selector: 'mcl-input-telefone-intl', imports: [
1760
- LacMatTelInputModule,
1761
- NgClass,
1762
- FormsModule
1763
- ], providers: [
1764
- {
1765
- provide: MatFormFieldControl,
1766
- useExisting: InputTelefoneInternacionalComponent
1767
- },
1768
- ], template: "<div class=\"input\">\n <lac-mat-country-selector\n [ngClass]=\"{'hidden': !focused && !value && !alwaysShowCountry}\"\n [preferredCountries]=\"preferredContries\"\n [selectorFor]=\"input\"\n searchPlaceholder=\"Filtrar paises...\"></lac-mat-country-selector>\n <lac-mat-tel-input #input\n [(ngModel)]=\"value\"\n (focusin)=\"onFocus()\" (focusout)=\"onBlur()\"></lac-mat-tel-input>\n</div>\n", styles: [".input{display:flex;align-items:center;margin:-8px 0;gap:8px}.input lac-mat-country-selector{transition:.3s}.input lac-mat-country-selector.hidden{opacity:0}.input lac-mat-tel-input{flex:1 1 auto}\n"] }]
1769
- }], propDecorators: { preferredContries: [{
1770
- type: Input
1771
- }], readonly: [{
1772
- type: Input
1773
- }], blur: [{
1774
- type: Output
1775
- }], alwaysShowCountry: [{
1776
- type: Input
1777
- }], telInput: [{
1778
- type: ViewChild,
1779
- args: ['input']
1780
- }] } });
1781
-
1782
- class InputTelefoneInternacionalValidatorDirective {
1783
- constructor() {
1784
- }
1785
- validate(control) {
1786
- return phoneNumberValidator(control);
1787
- }
1788
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputTelefoneInternacionalValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1789
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.5", type: InputTelefoneInternacionalValidatorDirective, isStandalone: true, selector: "mcl-input-telefone-intl,[mclInputTelefoneIntl]", providers: [{
1790
- provide: NG_VALIDATORS,
1791
- useExisting: InputTelefoneInternacionalValidatorDirective,
1792
- multi: true,
1793
- }], ngImport: i0 });
1794
- }
1795
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputTelefoneInternacionalValidatorDirective, decorators: [{
1796
- type: Directive,
1797
- args: [{
1798
- selector: 'mcl-input-telefone-intl,[mclInputTelefoneIntl]',
1799
- providers: [{
1800
- provide: NG_VALIDATORS,
1801
- useExisting: InputTelefoneInternacionalValidatorDirective,
1802
- multi: true,
1803
- }]
1804
- }]
1805
- }], ctorParameters: () => [] });
1806
-
1807
- /**
1808
- * Generated bundle index. Do not edit.
1809
- */
1810
-
1811
- export { AbstractMatFormFieldControl, AbstractMatFormFieldSelectControl, AllOptionCheckboxComponent, DelegateOptionProviderDirective, InputCepComponent, InputCnpjComponent, InputCpfCnpjComponent, InputCpfComponent, InputCurrencyComponent, InputDatetimeComponent, InputFileUploadComponent, InputFileUploadValidatorDirective, InputMaskComponent, InputPhoneComponent, InputTelefoneInternacionalComponent, InputTelefoneInternacionalValidatorDirective, OptionCheckboxComponent, OptionCheckboxGroupComponent, SELECT_OPTION_PROVIDER, SelectAutocompleteComponent, SelectChipsComponent, SelectManyCheckboxComponent, SelectOptionComponent, SelectRadioComponent };
1812
- //# sourceMappingURL=main-class-componentes-input.mjs.map