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