mapa-library-ui 1.6.2 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/fesm2022/mapa-library-ui-src-lib-components-capability.mjs +322 -168
  2. package/fesm2022/mapa-library-ui-src-lib-components-capability.mjs.map +1 -1
  3. package/fesm2022/mapa-library-ui-src-lib-components-chart.mjs +318 -166
  4. package/fesm2022/mapa-library-ui-src-lib-components-chart.mjs.map +1 -1
  5. package/fesm2022/mapa-library-ui-src-lib-components-datepicker-range.mjs +80 -6
  6. package/fesm2022/mapa-library-ui-src-lib-components-datepicker-range.mjs.map +1 -1
  7. package/fesm2022/mapa-library-ui-src-lib-components-datepicker.mjs +80 -6
  8. package/fesm2022/mapa-library-ui-src-lib-components-datepicker.mjs.map +1 -1
  9. package/fesm2022/mapa-library-ui-src-lib-components-dropdown-tree.mjs +318 -166
  10. package/fesm2022/mapa-library-ui-src-lib-components-dropdown-tree.mjs.map +1 -1
  11. package/fesm2022/mapa-library-ui-src-lib-components-dropdown.mjs +320 -168
  12. package/fesm2022/mapa-library-ui-src-lib-components-dropdown.mjs.map +1 -1
  13. package/fesm2022/mapa-library-ui-src-lib-components-filters.mjs +320 -163
  14. package/fesm2022/mapa-library-ui-src-lib-components-filters.mjs.map +1 -1
  15. package/fesm2022/mapa-library-ui-src-lib-components-form.mjs +332 -176
  16. package/fesm2022/mapa-library-ui-src-lib-components-form.mjs.map +1 -1
  17. package/fesm2022/mapa-library-ui-src-lib-components-group-report.mjs +2 -2
  18. package/fesm2022/mapa-library-ui-src-lib-components-group-report.mjs.map +1 -1
  19. package/fesm2022/mapa-library-ui-src-lib-components-input.mjs +78 -4
  20. package/fesm2022/mapa-library-ui-src-lib-components-input.mjs.map +1 -1
  21. package/fesm2022/mapa-library-ui-src-lib-components-scale-parameterization.mjs +78 -4
  22. package/fesm2022/mapa-library-ui-src-lib-components-scale-parameterization.mjs.map +1 -1
  23. package/fesm2022/mapa-library-ui-src-lib-components-scale.mjs +76 -2
  24. package/fesm2022/mapa-library-ui-src-lib-components-scale.mjs.map +1 -1
  25. package/fesm2022/mapa-library-ui-src-lib-components-table.mjs +79 -4
  26. package/fesm2022/mapa-library-ui-src-lib-components-table.mjs.map +1 -1
  27. package/fesm2022/mapa-library-ui-src-lib-components-textarea.mjs +78 -4
  28. package/fesm2022/mapa-library-ui-src-lib-components-textarea.mjs.map +1 -1
  29. package/fesm2022/mapa-library-ui-src-lib-components-warning.mjs +76 -2
  30. package/fesm2022/mapa-library-ui-src-lib-components-warning.mjs.map +1 -1
  31. package/fesm2022/mapa-library-ui-src-lib-core-guards-authorize-guard.mjs +1 -0
  32. package/fesm2022/mapa-library-ui-src-lib-core-guards-authorize-guard.mjs.map +1 -1
  33. package/fesm2022/mapa-library-ui.mjs +391 -412
  34. package/fesm2022/mapa-library-ui.mjs.map +1 -1
  35. package/index.d.ts +50 -73
  36. package/mapa-library-ui-1.7.0.tgz +0 -0
  37. package/package.json +1 -9
  38. package/src/lib/components/capability/index.d.ts +71 -55
  39. package/src/lib/components/dropdown/index.d.ts +51 -55
  40. package/src/lib/core/guards/authorize-guard/index.d.ts +2 -1
  41. package/fesm2022/mapa-library-ui-src-lib-components-dropdown-v2.mjs +0 -303
  42. package/fesm2022/mapa-library-ui-src-lib-components-dropdown-v2.mjs.map +0 -1
  43. package/mapa-library-ui-1.6.2.tgz +0 -0
  44. package/src/lib/components/dropdown-v2/index.d.ts +0 -165
@@ -1,23 +1,19 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, Output, Input, Component, InjectionToken, inject, Injector, signal, Optional, Inject, Injectable, SecurityContext, Pipe, DestroyRef, forwardRef, ViewChild, ChangeDetectionStrategy, Self, Directive } from '@angular/core';
2
+ import { EventEmitter, Output, Input, Component, InjectionToken, inject, Injector, signal, Optional, Inject, Injectable, SecurityContext, Pipe, ChangeDetectorRef, DestroyRef, forwardRef, HostListener, ViewChild, ChangeDetectionStrategy, Self, Directive } from '@angular/core';
3
3
  import * as i2$1 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
5
  import * as i1 from '@angular/material/icon';
6
6
  import { MatIconModule } from '@angular/material/icon';
7
7
  import * as i2 from '@angular/platform-browser';
8
8
  import * as i2$2 from '@angular/forms';
9
- import { ReactiveFormsModule, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
9
+ import { ReactiveFormsModule, NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
10
10
  import * as i2$3 from '@angular/material/checkbox';
11
11
  import { MatCheckboxModule } from '@angular/material/checkbox';
12
+ import { CdkConnectedOverlay, CdkOverlayOrigin } from '@angular/cdk/overlay';
12
13
  import { toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
14
+ import { merge, fromEvent } from 'rxjs';
13
15
  import * as i3 from '@angular/material/form-field';
14
- import { MatFormFieldModule, MAT_FORM_FIELD_DEFAULT_OPTIONS } from '@angular/material/form-field';
15
- import * as i7 from '@angular/material/select';
16
- import { MatSelectModule, MAT_SELECT_CONFIG } from '@angular/material/select';
17
- import * as i8 from 'ngx-mat-select-search';
18
- import { NgxMatSelectSearchModule } from 'ngx-mat-select-search';
19
- import { ReplaySubject, fromEvent } from 'rxjs';
20
- import { getMapaUiTexts } from 'mapa-frontend-i18n';
16
+ import { MatFormFieldModule } from '@angular/material/form-field';
21
17
  import * as i1$1 from '@angular/material/input';
22
18
  import { MatInputModule } from '@angular/material/input';
23
19
  import { NgxMaskDirective, provideNgxMask } from 'ngx-mask';
@@ -90,8 +86,83 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
90
86
  */
91
87
 
92
88
  const MAPA_UI_TEXTS = new InjectionToken("MAPA_UI_TEXTS");
89
+ function formatPaginatorRange(page, pageSize, length) {
90
+ if (length === 0 || pageSize === 0) {
91
+ return `0 de ${length}`;
92
+ }
93
+ const safeLength = Math.max(length, 0);
94
+ const startIndex = page * pageSize;
95
+ const endIndex = startIndex < safeLength
96
+ ? Math.min(startIndex + pageSize, safeLength)
97
+ : startIndex + pageSize;
98
+ return `${startIndex + 1} - ${endIndex} de ${safeLength}`;
99
+ }
100
+ function formatPaginatorShowingRange(page, pageSize, length) {
101
+ if (length === 0 || pageSize === 0) {
102
+ return "Mostrando 0 - 0 de 0 item";
103
+ }
104
+ const safeLength = Math.max(length, 0);
105
+ const startIndex = page * pageSize;
106
+ const endIndex = startIndex < safeLength
107
+ ? Math.min(startIndex + pageSize, safeLength)
108
+ : startIndex + pageSize;
109
+ const itemLabel = safeLength === 1 ? "item" : "itens";
110
+ return `Mostrando ${startIndex + 1} - ${endIndex} de ${safeLength} ${itemLabel}`;
111
+ }
112
+ const DEFAULT_MAPA_UI_TEXTS = {
113
+ common: {
114
+ selectAll: "Selecionar todos",
115
+ },
116
+ filters: {
117
+ clear: "Limpar filtros",
118
+ submit: "Filtrar",
119
+ },
120
+ datepicker: {
121
+ startDatePlaceholder: "Data inicial",
122
+ endDatePlaceholder: "Data final",
123
+ },
124
+ capability: {
125
+ groupAverageTitle: "Média geral do grupo",
126
+ individualAverageTitle: "Média geral do indivíduo",
127
+ conceptTitle: "Conceito",
128
+ resultTitle: "Resultado",
129
+ positiveIndicatorsTitle: "Indicadores positivos",
130
+ negativeIndicatorsTitle: "Indicadores negativos",
131
+ riskIndicatorsTitle: "Indicadores de risco",
132
+ precipitationRiskTitle: "Risco de acidente por precipitação",
133
+ negligenceRiskTitle: "Risco de acidente por negligência",
134
+ negativeDirectionLabel: "Direção Negativa |",
135
+ positiveDirectionLabel: "Direção Positiva |",
136
+ },
137
+ paginator: {
138
+ itemsPerPage: "Itens por página",
139
+ nextPage: "Próxima página",
140
+ previousPage: "Página anterior",
141
+ rangeLabel: formatPaginatorRange,
142
+ showingRangeLabel: formatPaginatorShowingRange,
143
+ },
144
+ warning: {
145
+ lowReliabilityTitle: "Nível baixo de confiabilidade no(s) teste(s):",
146
+ expirationLimitTitle: "O prazo de validade do(s) teste(s) está no limite:",
147
+ },
148
+ table: {
149
+ emptyTitle: "Não foram encontrados resultados",
150
+ emptySubtitle: "",
151
+ },
152
+ validation: {
153
+ cnpj: "CNPJ inválido",
154
+ cpf: "CPF inválido",
155
+ email: "E-mail inválido",
156
+ max: (context) => `O valor máximo permitido é ${context?.max ?? ""}`.trim(),
157
+ maxLength: (context) => `O máximo permitido é ${context?.requiredLength ?? ""} caracteres`.trim(),
158
+ min: (context) => `O valor mínimo permitido é ${context?.min ?? ""}`.trim(),
159
+ minLength: (context) => `O mínimo permitido é ${context?.requiredLength ?? ""} caracteres`.trim(),
160
+ pattern: "Formato inválido",
161
+ required: "Campo obrigatório",
162
+ },
163
+ };
93
164
  function getDefaultTexts() {
94
- return getMapaUiTexts("pt-BR");
165
+ return DEFAULT_MAPA_UI_TEXTS;
95
166
  }
96
167
  function mergeMapaUiTexts(customTexts) {
97
168
  const defaults = getDefaultTexts();
@@ -277,221 +348,307 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
277
348
  }], ctorParameters: () => [{ type: HtmlSanitizerService }] });
278
349
 
279
350
  class MapaDropdownComponent {
280
- constructor(i18n, cdr) {
281
- this.i18n = i18n;
282
- this.cdr = cdr;
283
- this.openedChange = new EventEmitter();
284
- this.filteredOptions = new ReplaySubject(1);
285
- this.filteredGroups = new ReplaySubject(1);
286
- this.filteredOptionsCache = [];
287
- this.filteredGroupCache = [];
351
+ constructor() {
352
+ this.i18n = inject(MapaI18nService);
353
+ this.cdr = inject(ChangeDetectorRef);
288
354
  this.destroyRef = inject(DestroyRef);
289
- this.isIndeterminate = false;
290
- this.isChecked = false;
291
- this.isOptionsGroup = false;
355
+ this.isOpenState = signal(false, ...(ngDevMode ? [{ debugName: "isOpenState" }] : []));
356
+ this.overlayWidthState = signal(0, ...(ngDevMode ? [{ debugName: "overlayWidthState" }] : []));
357
+ this.openedChange = new EventEmitter();
358
+ this.overlayPositions = [
359
+ {
360
+ originX: "start",
361
+ originY: "bottom",
362
+ overlayX: "start",
363
+ overlayY: "top",
364
+ offsetY: 8,
365
+ },
366
+ {
367
+ originX: "start",
368
+ originY: "top",
369
+ overlayX: "start",
370
+ overlayY: "bottom",
371
+ offsetY: -8,
372
+ },
373
+ ];
374
+ }
375
+ set formControl(control) {
376
+ this.formControlChanges?.unsubscribe();
377
+ this.formControlValue = control;
378
+ this.formControlChanges = merge(control.valueChanges, control.statusChanges)
379
+ .pipe(takeUntilDestroyed(this.destroyRef))
380
+ .subscribe(() => this.cdr.markForCheck());
381
+ }
382
+ get formControl() {
383
+ return this.formControlValue;
292
384
  }
293
385
  writeValue(_value) {
294
- // No-op: inner <mat-select [formControl]="formControl"> handles binding.
386
+ // The inner control is bound directly through the formControl input.
295
387
  }
296
388
  registerOnChange(_fn) {
297
- // No-op.
389
+ // Changes are propagated by the supplied formControl.
298
390
  }
299
391
  registerOnTouched(_fn) {
300
- // No-op.
392
+ // Touch state is propagated by the supplied formControl.
301
393
  }
302
394
  setDisabledState(_isDisabled) {
303
- // No-op.
395
+ // Disabled state is propagated by the supplied formControl.
304
396
  }
305
- get texts() {
306
- return this.i18n.textsSignal();
397
+ isOpen() {
398
+ return this.isOpenState();
307
399
  }
308
- get selectAllLabel() {
309
- return this.texts.common.selectAll;
400
+ overlayWidth() {
401
+ return this.overlayWidthState();
402
+ }
403
+ isMultiple() {
404
+ return !!this.element.multiple;
405
+ }
406
+ isDisabled() {
407
+ return !!this.formControl?.disabled;
408
+ }
409
+ hasGroups() {
410
+ return this.isElementGroup(this.element.options?.[0]);
310
411
  }
311
- get selectedOptions() {
412
+ selectedOptions() {
312
413
  const value = this.formControl?.value;
313
414
  if (Array.isArray(value)) {
314
415
  return value.filter((option) => this.isElementOption(option));
315
416
  }
316
417
  return this.isElementOption(value) ? [value] : [];
317
418
  }
318
- ngOnInit() {
319
- this.setOptions();
320
- this.element.search?.formControl?.valueChanges
321
- .pipe(takeUntilDestroyed(this.destroyRef))
322
- .subscribe(() => {
323
- this.filterOptions();
324
- this.setToggleAllCheckboxState();
325
- this.cdr.markForCheck();
326
- });
419
+ selectedLabel() {
420
+ const selected = this.selectedOptions();
421
+ if (!selected.length) {
422
+ return this.element.placeholder || "";
423
+ }
424
+ return selected.map((option) => option.value).join(", ");
327
425
  }
328
- ngAfterViewInit() {
329
- Promise.resolve().then(() => this.cdr.detectChanges());
330
- }
331
- ngOnChanges(changes) {
332
- if (changes["element"]?.previousValue !== undefined &&
333
- changes["element"].previousValue?.controlType === "dropdown" &&
334
- changes["element"].previousValue?.options !==
335
- changes["element"].currentValue?.options) {
336
- this.element.options = changes["element"].currentValue.options;
337
- this.setOptions();
338
- this.cdr.markForCheck();
426
+ isOptionSelected(option) {
427
+ return this.selectedOptions().some((selected) => selected.key === option.key);
428
+ }
429
+ hasValue() {
430
+ return this.selectedOptions().length > 0;
431
+ }
432
+ get selectAllLabel() {
433
+ return this.i18n.textsSignal().common.selectAll;
434
+ }
435
+ isAllSelected() {
436
+ const options = this.visibleOptions();
437
+ return (options.length > 0 &&
438
+ options.every((option) => this.isOptionSelected(option)));
439
+ }
440
+ isIndeterminate() {
441
+ const options = this.visibleOptions();
442
+ const selectedCount = options.filter((option) => this.isOptionSelected(option)).length;
443
+ return selectedCount > 0 && selectedCount < options.length;
444
+ }
445
+ toggleSelectAll() {
446
+ if (this.isDisabled()) {
447
+ return;
448
+ }
449
+ const options = this.visibleOptions();
450
+ const next = this.isAllSelected() ? [] : options.slice();
451
+ this.formControl.setValue(next);
452
+ this.markControlAsChanged();
453
+ }
454
+ options() {
455
+ if (this.hasGroups()) {
456
+ return this.element.options.flatMap((group) => group.options);
457
+ }
458
+ return this.element.options ?? [];
459
+ }
460
+ filteredOptions() {
461
+ const options = this.hasGroups() ? [] : this.options();
462
+ const searchTerm = this.normalizedSearchTerm();
463
+ if (!searchTerm) {
464
+ return options;
339
465
  }
466
+ return options.filter((option) => this.normalizeValue(option.value).includes(searchTerm));
340
467
  }
341
- setOptions() {
342
- this.isOptionsGroup = this.isElementGroup(this.element.options[0]);
343
- if (this.isOptionsGroup) {
344
- this.filteredGroupCache = this.element.options.slice();
345
- this.filteredGroups.next(this.filteredGroupCache);
346
- this.cdr.markForCheck();
468
+ filteredGroups() {
469
+ if (!this.hasGroups()) {
470
+ return [];
471
+ }
472
+ const groups = this.element.options;
473
+ const searchTerm = this.normalizedSearchTerm();
474
+ if (!searchTerm) {
475
+ return groups;
476
+ }
477
+ return groups
478
+ .map((group) => ({
479
+ label: group.label,
480
+ options: this.normalizeValue(group.label).includes(searchTerm)
481
+ ? group.options
482
+ : group.options.filter((option) => this.normalizeValue(option.value).includes(searchTerm)),
483
+ }))
484
+ .filter((group) => group.options.length > 0);
485
+ }
486
+ visibleOptions() {
487
+ return this.hasGroups()
488
+ ? this.filteredGroups().flatMap((group) => group.options)
489
+ : this.filteredOptions();
490
+ }
491
+ hasSearch() {
492
+ return !!this.searchControl;
493
+ }
494
+ searchPlaceholder() {
495
+ return this.element.search?.placeholder ?? "";
496
+ }
497
+ emptyStateLabel() {
498
+ return this.element.search?.noEntriesFoundLabel ?? "";
499
+ }
500
+ shouldShowError() {
501
+ return (this.formControl.invalid &&
502
+ (this.formControl.dirty || this.formControl.touched));
503
+ }
504
+ optionPadding(option) {
505
+ const level = Math.max(0, option.childrenLevel ?? 0);
506
+ return level === 0 ? 16 : 10 + level * 20;
507
+ }
508
+ toggleDropdown() {
509
+ if (this.isDisabled()) {
347
510
  return;
348
511
  }
349
- this.filteredOptionsCache = this.element.options.slice();
350
- this.filteredOptions.next(this.filteredOptionsCache);
351
- this.cdr.markForCheck();
352
- }
353
- filterOptionsFromGroup(group, value) {
354
- const filterValue = this.normalizeValue(value);
355
- return this.normalizeValue(group.label).includes(filterValue)
356
- ? group.options
357
- : group.options.filter((item) => this.normalizeValue(item.value).includes(filterValue));
358
- }
359
- filterOptions() {
360
- if (!this.element.options) {
512
+ const isOpening = !this.isOpenState();
513
+ this.setOpenState(isOpening);
514
+ if (isOpening) {
515
+ this.overlayWidthState.set(this.triggerButton?.nativeElement.offsetWidth ?? 0);
516
+ this.searchControl?.setValue("", { emitEvent: true });
517
+ setTimeout(() => {
518
+ this.triggerButton?.nativeElement.blur();
519
+ this.searchInput?.nativeElement.focus();
520
+ this.searchInput?.nativeElement.select();
521
+ });
361
522
  return;
362
523
  }
363
- const search = this.normalizeValue(this.element.search?.formControl?.value);
364
- if (this.isOptionsGroup) {
365
- const groups = this.element.options;
366
- this.filteredGroupCache = groups
367
- .map((group) => ({
368
- label: group.label,
369
- options: this.filterOptionsFromGroup(group, search),
370
- }))
371
- .filter((group) => group.options.length > 0);
372
- this.filteredGroups.next(this.filteredGroupCache);
524
+ this.markAsTouchedIfEmpty();
525
+ }
526
+ selectOption(option) {
527
+ if (this.isDisabled()) {
373
528
  return;
374
529
  }
375
- const options = this.element.options;
376
- if (!search) {
377
- this.filteredOptionsCache = options.slice();
378
- this.filteredOptions.next(this.filteredOptionsCache);
530
+ if (this.isMultiple()) {
531
+ this.toggleOption(option);
379
532
  return;
380
533
  }
381
- this.filteredOptionsCache = options.filter((option) => this.normalizeValue(option.value).includes(search));
382
- this.filteredOptions.next(this.filteredOptionsCache);
534
+ this.formControl.setValue(option);
535
+ this.markControlAsChanged();
536
+ this.closeDropdown();
383
537
  }
384
- normalizeValue(value) {
385
- return (value ?? "")
386
- .normalize("NFD")
387
- .replace(/[\u0300-\u036f]/g, "")
388
- .toLowerCase();
538
+ clearValue(event) {
539
+ event.stopPropagation();
540
+ if (this.isDisabled()) {
541
+ return;
542
+ }
543
+ this.formControl.setValue(this.isMultiple() ? [] : null);
544
+ this.markControlAsChanged();
389
545
  }
390
- triggerOpenedChange(event) {
391
- this.openedChange.emit(event);
546
+ closeDropdown() {
547
+ if (this.isOpenState()) {
548
+ this.setOpenState(false);
549
+ }
550
+ this.searchControl?.setValue("", { emitEvent: true });
551
+ this.markAsTouchedIfEmpty();
392
552
  }
393
- setToggleAllCheckboxState() {
394
- const search = this.normalizeValue(this.element.search?.formControl?.value);
395
- if (!search) {
396
- this.isIndeterminate = false;
397
- this.isChecked = false;
553
+ handleOverlayOutsideClick(event) {
554
+ if (this.triggerButton?.nativeElement.contains(event.target)) {
398
555
  return;
399
556
  }
400
- const filteredLength = this.filteredOptionsCache.filter((option) => this.normalizeValue(option.value).includes(search)).length;
401
- this.isIndeterminate =
402
- filteredLength > 0 && filteredLength < this.filteredOptionsCache.length;
403
- this.isChecked =
404
- filteredLength > 0 && filteredLength === this.filteredOptionsCache.length;
405
- this.cdr.markForCheck();
406
- }
407
- toggleSelectAll(event) {
408
- if (this.isOptionsGroup) {
409
- const groupOptions = this.filteredGroupCache.reduce((accumulator, group) => accumulator.concat(group.options), []);
410
- this.formControl?.patchValue(event.checked ? groupOptions : []);
411
- return;
557
+ this.closeDropdown();
558
+ }
559
+ handleWindowResize() {
560
+ if (this.isOpenState()) {
561
+ this.overlayWidthState.set(this.triggerButton?.nativeElement.offsetWidth ?? 0);
412
562
  }
413
- this.formControl?.patchValue(event.checked ? this.filteredOptionsCache : []);
414
563
  }
415
- isElementGroup(object) {
416
- return !!object && "label" in object && "options" in object;
564
+ get searchControl() {
565
+ return (this.element.search?.formControl ?? this.formControlSearch);
417
566
  }
418
- isElementOption(object) {
419
- return (!!object &&
420
- typeof object === "object" &&
421
- "key" in object &&
422
- "value" in object);
567
+ toggleOption(option) {
568
+ const current = this.selectedOptions();
569
+ const next = this.isOptionSelected(option)
570
+ ? current.filter((selected) => selected.key !== option.key)
571
+ : [...current, option];
572
+ this.formControl.setValue(next);
573
+ this.markControlAsChanged();
423
574
  }
424
- compareFn(c1, c2) {
425
- return c1 && c2 ? c1.key === c2.key : c1 === c2;
575
+ normalizedSearchTerm() {
576
+ return this.normalizeValue(this.searchControl?.value?.trim());
426
577
  }
427
- hasValue() {
428
- const value = this.formControl?.value;
429
- return Array.isArray(value) ? value.length > 0 : this.isElementOption(value);
578
+ normalizeValue(value) {
579
+ return (value ?? "")
580
+ .normalize("NFD")
581
+ .replace(/[\u0300-\u036f]/g, "")
582
+ .toLocaleLowerCase();
430
583
  }
431
- clearValue(event) {
432
- event.stopPropagation();
433
- this.formControl.setValue(null);
434
- this.cdr.markForCheck();
584
+ isElementGroup(value) {
585
+ return !!value && "label" in value && "options" in value;
435
586
  }
436
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaDropdownComponent, deps: [{ token: MapaI18nService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
437
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.21", type: MapaDropdownComponent, isStandalone: true, selector: "mapa-dropdown", inputs: { formControl: "formControl", formControlSearch: "formControlSearch", element: "element", border: "border" }, outputs: { openedChange: "openedChange" }, providers: [
438
- {
439
- provide: MAT_SELECT_CONFIG,
440
- useValue: { overlayPanelClass: "mapa-overlay-dropdown" },
441
- },
442
- {
443
- provide: MAT_FORM_FIELD_DEFAULT_OPTIONS,
444
- useValue: { appearance: "outline" },
445
- },
587
+ isElementOption(value) {
588
+ return (!!value &&
589
+ typeof value === "object" &&
590
+ "key" in value &&
591
+ "value" in value);
592
+ }
593
+ markControlAsChanged() {
594
+ this.formControl.markAsDirty();
595
+ this.formControl.markAsTouched();
596
+ }
597
+ markAsTouchedIfEmpty() {
598
+ if (!this.hasValue()) {
599
+ this.formControl.markAsTouched();
600
+ }
601
+ }
602
+ setOpenState(isOpen) {
603
+ this.isOpenState.set(isOpen);
604
+ this.openedChange.emit(isOpen);
605
+ }
606
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
607
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.21", type: MapaDropdownComponent, isStandalone: true, selector: "mapa-dropdown", inputs: { element: "element", formControl: "formControl", formControlSearch: "formControlSearch", border: "border" }, outputs: { openedChange: "openedChange" }, host: { listeners: { "window:resize": "handleWindowResize()" } }, providers: [
446
608
  {
447
609
  provide: NG_VALUE_ACCESSOR,
448
610
  useExisting: forwardRef(() => MapaDropdownComponent),
449
611
  multi: true,
450
612
  },
451
- ], viewQueries: [{ propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "@if (element) {\n @if (element.label) {\n <label class=\"mapa-dropdown__label\">\n {{ element.label }}\n </label>\n }\n <div class=\"mapa-form--inline\">\n <mat-form-field\n appearance=\"outline\"\n class=\"mapa-dropdown\"\n [class.mapa-dropdown--highlight]=\"border === 'highlight'\"\n [class.mapa-dropdown--soft-border]=\"border === 'soft'\"\n [class.mapa-dropdown--tag]=\"border === 'tag'\"\n [class.mapa-dropdown--labeled]=\"!!element.label\"\n >\n <mat-select\n #dropdown\n ngDefaultControl\n [formControl]=\"formControl\"\n [multiple]=\"element.multiple\"\n [placeholder]=\"element.placeholder || ''\"\n [compareWith]=\"compareFn\"\n (openedChange)=\"triggerOpenedChange($event)\"\n >\n @if (element.search) {\n <mat-option class=\"mapa-dropdown__search\">\n @if (element.search.formControl) {\n <ngx-mat-select-search\n [showToggleAllCheckbox]=\"element.search.toggleAllCheckbox!\"\n [formControl]=\"element.search.formControl\"\n [placeholderLabel]=\"element.search.placeholder || ''\"\n i18n-placeholderLabel\n [noEntriesFoundLabel]=\"element.search.noEntriesFoundLabel || ''\"\n ></ngx-mat-select-search>\n }\n </mat-option>\n }\n @if (element.multiple) {\n <mat-option class=\"mapa-dropdown__option--select-all\">\n <mat-checkbox\n class=\"mat-option\"\n [indeterminate]=\"isIndeterminate\"\n [checked]=\"isChecked\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"toggleSelectAll($event)\"\n >\n {{ selectAllLabel }}\n </mat-checkbox>\n </mat-option>\n }\n @if (isOptionsGroup) {\n @if (filteredGroups | async; as groups) {\n @for (group of groups; track group.label) {\n <mat-optgroup [label]=\"group.label\">\n @for (option of group.options; track option.key) {\n <mat-option\n [value]=\"option\"\n [ngClass]=\"[\n 'mapa-dropdown__option--children-level-' + option.childrenLevel,\n ]\"\n >\n <span [innerHTML]=\"option.value | safeHtml\"></span>\n </mat-option>\n }\n </mat-optgroup>\n }\n }\n } @else {\n @if (filteredOptions | async; as options) {\n @for (option of options; track option.key) {\n <mat-option\n [value]=\"option\"\n [ngClass]=\"[\n 'mapa-dropdown__option mapa-dropdown__option--children-level-' +\n option.childrenLevel,\n ]\"\n >\n <span\n class=\"mapa-dropdown__option-value\"\n [innerHTML]=\"option.value | safeHtml\"\n ></span>\n </mat-option>\n }\n }\n }\n\n @for (option of selectedOptions; track option.key) {\n <mat-option\n hidden\n [value]=\"option\"\n [ngClass]=\"[\n 'mapa-dropdown__option--children-level-' + option.childrenLevel,\n ]\"\n >\n <span [innerHTML]=\"option.value | safeHtml\"></span>\n </mat-option>\n }\n </mat-select>\n @if (element.hint) {\n <mat-hint>{{ element.hint }}</mat-hint>\n }\n <mat-error>\n <mapa-form-errors\n [control]=\"formControl\"\n [errors]=\"element.errors\"\n ></mapa-form-errors>\n </mat-error>\n @if (hasValue() && !formControl.disabled && element.clearValue) {\n <mat-icon\n (click)=\"clearValue($event)\"\n class=\"mapa-input--close\"\n >close</mat-icon\n >\n }\n </mat-form-field>\n @if (element.actionButton) {\n <div class=\"mapa-form--action\">\n <mapa-button\n color=\"basic\"\n (click)=\"element.actionButton.action.emit(true)\"\n >\n {{ element.actionButton.label }}\n </mapa-button>\n </div>\n }\n </div>\n}\n", styles: [":host ::ng-deep .mapa-dropdown{max-width:min-content;min-width:235px}:host ::ng-deep .mapa-dropdown .mat-mdc-select{font-family:var(--mapa-font-body, \"Asap\", \"Roboto\", \"Inter\", sans-serif)!important}:host ::ng-deep .mapa-dropdown .mat-icon{display:flex;justify-content:center;align-items:center;position:absolute;right:28px!important;top:18px!important;z-index:1}:host ::ng-deep .mapa-dropdown__label{font-family:var(--mapa-font-heading, \"Asap\", \"Inter\", sans-serif);display:block;font-size:12px;font-style:normal;font-weight:600;line-height:16px;text-transform:uppercase;margin-bottom:16px}:host ::ng-deep .mapa-dropdown--highlight .mat-mdc-text-field-wrapper{border-radius:16px}:host ::ng-deep .mapa-dropdown--highlight .mdc-notched-outline{border-radius:16px!important}:host ::ng-deep .mapa-dropdown--highlight .mdc-notched-outline .mdc-notched-outline__leading,:host ::ng-deep .mapa-dropdown--highlight .mdc-notched-outline .mdc-notched-outline__trailing{border-width:2px!important;border-color:#eedb2a!important}:host ::ng-deep .mapa-dropdown--highlight .mdc-notched-outline .mdc-notched-outline__leading{display:none!important}:host ::ng-deep .mapa-dropdown--highlight .mdc-notched-outline .mdc-notched-outline__trailing{border-radius:16px!important;border-left-style:solid!important}:host ::ng-deep .mapa-dropdown--soft-border .mdc-notched-outline .mdc-notched-outline__leading,:host ::ng-deep .mapa-dropdown--soft-border .mdc-notched-outline .mdc-notched-outline__trailing{border-width:1px!important}:host ::ng-deep .mapa-dropdown--tag .mat-mdc-text-field-wrapper{border-radius:16px}:host ::ng-deep .mapa-dropdown--tag .mdc-notched-outline{border-radius:16px!important;height:42px!important}:host ::ng-deep .mapa-dropdown--tag .mdc-notched-outline .mdc-notched-outline__leading,:host ::ng-deep .mapa-dropdown--tag .mdc-notched-outline .mdc-notched-outline__trailing{border-width:1px!important;border-color:#cdcdcd}:host ::ng-deep .mapa-dropdown--tag .mdc-notched-outline .mdc-notched-outline__leading{display:none!important}:host ::ng-deep .mapa-dropdown--tag .mdc-notched-outline .mdc-notched-outline__trailing{border-radius:16px!important;border-left-style:solid!important}:host ::ng-deep .mapa-dropdown .mat-mdc-text-field-wrapper{background-color:#fff;border-radius:8px}:host ::ng-deep .mapa-dropdown .mat-mdc-text-field-wrapper.mdc-text-field--outlined{padding-left:unset!important;padding-right:unset!important}:host ::ng-deep .mapa-dropdown .mdc-notched-outline{background-color:transparent;border-radius:8px;pointer-events:none;z-index:0}:host ::ng-deep .mapa-dropdown .mdc-notched-outline .mdc-notched-outline__leading,:host ::ng-deep .mapa-dropdown .mdc-notched-outline .mdc-notched-outline__trailing{border-width:2px}:host ::ng-deep .mapa-dropdown .mat-mdc-form-field-flex{display:flex;align-items:center;height:48px;position:relative}:host ::ng-deep .mapa-dropdown .mat-mdc-select-trigger{min-width:50px;padding-top:unset!important;height:unset!important;position:relative;z-index:1}:host ::ng-deep .mapa-dropdown .mat-mdc-select-value-text{display:block;width:90%}:host ::ng-deep .mapa-dropdown .mat-mdc-select-arrow-wrapper{transform:none!important;align-items:center;position:relative;z-index:1}:host ::ng-deep .mapa-dropdown .mat-mdc-select-arrow{border:unset;color:#50575e}:host ::ng-deep .mapa-dropdown .mat-mdc-select-arrow:before,:host ::ng-deep .mapa-dropdown .mat-mdc-select-arrow:after{content:none!important}:host ::ng-deep .mapa-dropdown .mat-mdc-select-arrow svg{display:block!important;fill:currentColor}:host ::ng-deep .mapa-dropdown .mat-mdc-form-field-error-wrapper,:host ::ng-deep .mapa-dropdown .mat-mdc-form-field-hint-wrapper,:host ::ng-deep .mapa-dropdown .mat-mdc-form-field-subscript-wrapper{padding:0!important}:host ::ng-deep .mapa-dropdown [aria-expanded=true] .mat-mdc-select-arrow{margin:0}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel{border-radius:8px;min-width:calc(100% + 24px)!important}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option,::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mdc-list-item__primary-text{font-family:var(--mapa-font-body, \"Asap\", \"Roboto\", \"Inter\", sans-serif)!important;font-size:16px;font-style:normal;font-weight:400;line-height:2em;height:2em;color:#50575e}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option.mapa-dropdown__option,::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option.mapa-dropdown__option--select-all,::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option[class*=mapa-dropdown__option--children-level-]{height:auto!important;align-items:start!important}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option.mapa-dropdown__option .mat-pseudo-checkbox,::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option.mapa-dropdown__option--select-all .mat-pseudo-checkbox,::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option[class*=mapa-dropdown__option--children-level-] .mat-pseudo-checkbox{margin:7px 7px 7px 0!important}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option.mapa-dropdown__option .mdc-list-item__primary-text,::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option.mapa-dropdown__option--select-all .mdc-list-item__primary-text,::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option[class*=mapa-dropdown__option--children-level-] .mdc-list-item__primary-text{height:auto!important}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mapa-dropdown__option-value{text-wrap:auto}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option.mapa-dropdown__option--children-level-1{padding-left:30px!important}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option.mapa-dropdown__option--children-level-2{padding-left:50px!important}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option.mapa-dropdown__option--children-level-3{padding-left:70px!important}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option.mapa-dropdown__option--children-level-4{padding-left:90px!important}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option.mapa-dropdown__option--children-level-5{padding-left:100px!important}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option.mapa-dropdown__option--children-level-6{padding-left:120px!important}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option.mapa-dropdown__option--select-all{padding-left:5px!important}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option.mapa-dropdown__option--select-all .mat-pseudo-checkbox{display:none!important}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option[aria-disabled=true].contains-mat-select-search{align-items:flex-start;background:#f6f7f7;height:auto!important;min-height:80px;padding:16px 8px!important}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option[aria-disabled=true].contains-mat-select-search .mdc-list-item__primary-text{width:100%}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option[aria-disabled=true].contains-mat-select-search .mat-select-search-inner{background:transparent!important;background-color:transparent!important;border:unset;border-radius:0;box-shadow:none!important;inset:0 auto auto 0;overflow:visible;position:relative;width:100%!important}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option[aria-disabled=true].contains-mat-select-search .mat-select-search-inner-row{align-items:center;background:transparent;display:flex;position:relative}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option[aria-disabled=true].contains-mat-select-search .mat-select-search-hidden{background:transparent!important;background-color:transparent!important;border:unset!important;height:0!important;line-height:0!important;padding:0!important}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option[aria-disabled=true].contains-mat-select-search .mat-select-search-toggle-all-checkbox{padding-left:8px!important}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option[aria-disabled=true].contains-mat-select-search .mat-select-search-input{background-color:#fff!important;border:2px solid #a7aaad!important;border-radius:8px!important;height:28px!important;line-height:24px!important;padding:0 48px 0 12px!important;width:100%}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option[aria-disabled=true].contains-mat-select-search .mat-select-search-input::placeholder{color:#c3c4c7!important}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option[aria-disabled=true].contains-mat-select-search .mat-select-search-clear{top:50%;transform:translateY(-50%)}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option[aria-disabled=true].contains-mat-select-search .mat-divider{margin:0}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option[aria-disabled=true].contains-mat-select-search.mat-mdc-option-active,::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option[aria-disabled=true].contains-mat-select-search:hover{background:#f6f7f7}::ng-deep .mapa-overlay-dropdown .mat-pseudo-checkbox{color:#c3c4c7!important}::ng-deep .mapa-overlay-dropdown .mdc-checkbox__background{border-color:#c3c4c7!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$2.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: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i2$3.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: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i7.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i7.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i7.MatOptgroup, selector: "mat-optgroup", inputs: ["label", "disabled"], exportAs: ["matOptgroup"] }, { kind: "ngmodule", type: NgxMatSelectSearchModule }, { kind: "component", type: i8.MatSelectSearchComponent, selector: "ngx-mat-select-search", inputs: ["placeholderLabel", "type", "closeIcon", "closeSvgIcon", "noEntriesFoundLabel", "clearSearchInput", "searching", "disableInitialFocus", "enableClearOnEscapePressed", "preventHomeEndKeyPropagation", "disableScrollToActiveOnOptionsChanged", "ariaLabel", "showToggleAllCheckbox", "toggleAllCheckboxChecked", "toggleAllCheckboxIndeterminate", "toggleAllCheckboxTooltipMessage", "toggleAllCheckboxTooltipPosition", "hideClearSearchButton", "alwaysRestoreSelectedOptionsMulti", "recreateValuesArray"], outputs: ["toggleAll"] }, { kind: "component", type: ButtonComponent, selector: "mapa-button", inputs: ["color", "disabled"], outputs: ["clicked"] }, { kind: "component", type: MapaFormErrorsComponent, selector: "mapa-form-errors", inputs: ["control", "errors"] }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
613
+ ], viewQueries: [{ propertyName: "triggerButton", first: true, predicate: ["triggerButton"], descendants: true }, { propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true }], ngImport: i0, template: "<div\n class=\"mapa-dropdown\"\n [class.mapa-dropdown--open]=\"isOpen()\"\n [class.mapa-dropdown--invalid]=\"shouldShowError()\"\n [class.mapa-dropdown--disabled]=\"isDisabled()\"\n [class.mapa-dropdown--highlight]=\"border === 'highlight'\"\n [class.mapa-dropdown--soft-border]=\"border === 'soft'\"\n [class.mapa-dropdown--tag]=\"border === 'tag'\"\n>\n @if (element.label) {\n <label class=\"mapa-dropdown__label\" [attr.for]=\"element.key || null\">\n {{ element.label }}\n </label>\n }\n\n <div class=\"mapa-dropdown__field-row\">\n <button\n #triggerButton\n cdkOverlayOrigin\n #origin=\"cdkOverlayOrigin\"\n class=\"mapa-dropdown__trigger\"\n [class.mapa-dropdown__trigger--clearable]=\"hasValue() && element.clearValue\"\n [id]=\"element.key || null\"\n type=\"button\"\n [disabled]=\"isDisabled()\"\n (click)=\"toggleDropdown()\"\n [attr.aria-expanded]=\"isOpen()\"\n aria-haspopup=\"listbox\"\n >\n <span\n class=\"mapa-dropdown__trigger-text\"\n [class.mapa-dropdown__trigger-text--placeholder]=\"!hasValue()\"\n [innerHTML]=\"selectedLabel() | safeHtml\"\n ></span>\n @if (hasValue() && !isDisabled() && element.clearValue) {\n <span\n class=\"mapa-dropdown__clear\"\n role=\"button\"\n aria-label=\"Limpar\"\n (click)=\"clearValue($event)\"\n >\n &times;\n </span>\n }\n </button>\n\n @if (element.actionButton) {\n <mapa-button\n class=\"mapa-dropdown__action\"\n color=\"basic\"\n (clicked)=\"element.actionButton.action.emit(true)\"\n >\n {{ element.actionButton.label }}\n </mapa-button>\n }\n </div>\n\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions\"\n [cdkConnectedOverlayWidth]=\"overlayWidth()\"\n cdkConnectedOverlayPanelClass=\"mapa-dropdown__overlay-pane\"\n (overlayOutsideClick)=\"handleOverlayOutsideClick($event)\"\n >\n <div class=\"mapa-dropdown__panel\">\n @if (hasSearch()) {\n <input\n #searchInput\n class=\"mapa-dropdown__search-input\"\n type=\"text\"\n [formControl]=\"searchControl!\"\n [placeholder]=\"searchPlaceholder()\"\n />\n }\n\n <div class=\"mapa-dropdown__options\" role=\"listbox\">\n @if (isMultiple() && visibleOptions().length) {\n <button\n class=\"mapa-dropdown__option mapa-dropdown__option--select-all\"\n type=\"button\"\n (click)=\"toggleSelectAll()\"\n >\n <input\n class=\"mapa-dropdown__checkbox\"\n type=\"checkbox\"\n [checked]=\"isAllSelected()\"\n [indeterminate]=\"isIndeterminate()\"\n (click)=\"$event.stopPropagation(); toggleSelectAll()\"\n />\n {{ selectAllLabel }}\n </button>\n }\n\n @if (hasGroups()) {\n @for (group of filteredGroups(); track group.label) {\n <div class=\"mapa-dropdown__group\" role=\"group\">\n <p class=\"mapa-dropdown__group-label\">{{ group.label }}</p>\n @for (option of group.options; track option.key) {\n <button\n class=\"mapa-dropdown__option\"\n [class.mapa-dropdown__option--selected]=\"isOptionSelected(option)\"\n [style.padding-left.px]=\"optionPadding(option)\"\n type=\"button\"\n (click)=\"selectOption(option)\"\n >\n @if (isMultiple()) {\n <input\n class=\"mapa-dropdown__checkbox\"\n type=\"checkbox\"\n [checked]=\"isOptionSelected(option)\"\n (click)=\"$event.stopPropagation(); selectOption(option)\"\n />\n }\n <span [innerHTML]=\"option.value | safeHtml\"></span>\n </button>\n }\n </div>\n }\n } @else {\n @for (option of filteredOptions(); track option.key) {\n <button\n class=\"mapa-dropdown__option\"\n [class.mapa-dropdown__option--selected]=\"isOptionSelected(option)\"\n [style.padding-left.px]=\"optionPadding(option)\"\n type=\"button\"\n (click)=\"selectOption(option)\"\n >\n @if (isMultiple()) {\n <input\n class=\"mapa-dropdown__checkbox\"\n type=\"checkbox\"\n [checked]=\"isOptionSelected(option)\"\n (click)=\"$event.stopPropagation(); selectOption(option)\"\n />\n }\n <span [innerHTML]=\"option.value | safeHtml\"></span>\n </button>\n }\n }\n\n @if (!visibleOptions().length) {\n <p class=\"mapa-dropdown__empty-state\">\n {{ emptyStateLabel() }}\n </p>\n }\n </div>\n </div>\n </ng-template>\n\n @if (shouldShowError()) {\n <p class=\"mapa-dropdown__error\">\n <mapa-form-errors\n [control]=\"formControl\"\n [errors]=\"element.errors\"\n ></mapa-form-errors>\n </p>\n } @else if (element.hint) {\n <p class=\"mapa-dropdown__hint\">{{ element.hint }}</p>\n }\n</div>\n", styles: [":host{position:relative;display:inline-block;max-width:min-content;min-width:310px;box-sizing:border-box}.mapa-dropdown{width:100%}.mapa-dropdown__label{display:inline-block;margin-bottom:8px;color:var(--mapa-color-ink, #1a1a1a);font-family:var(--mapa-font-heading, \"Asap\", sans-serif);font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}.mapa-dropdown__field-row{display:flex;align-items:center;gap:24px;min-width:0}.mapa-dropdown__trigger,.mapa-dropdown__search-input,.mapa-dropdown__option{width:100%;min-height:48px;padding:12px 16px;border:0;background:var(--mapa-color-surface, #ffffff);color:var(--mapa-color-ink, #1a1a1a);font-family:var(--mapa-font-body, \"Asap\", sans-serif);font-size:16px;line-height:24px}.mapa-dropdown__trigger:focus,.mapa-dropdown__search-input:focus,.mapa-dropdown__option:focus{outline:none}.mapa-dropdown__trigger::placeholder,.mapa-dropdown__search-input::placeholder,.mapa-dropdown__option::placeholder{color:var(--mapa-color-muted, #555555)}.mapa-dropdown__trigger{position:relative;display:flex;flex:1 1 auto;align-items:center;min-width:0;padding-right:46px;border:1px solid var(--mapa-color-border, rgba(26, 26, 26, .18));border-radius:var(--mapa-radius-sm, 12px);text-align:left;cursor:pointer;transition:border-color .2s ease,box-shadow .2s ease,background-color .2s ease}.mapa-dropdown__trigger--clearable{padding-right:70px}.mapa-dropdown__trigger:after{content:\"\";position:absolute;top:50%;right:18px;width:9px;height:9px;border-right:2px solid var(--mapa-color-ink, #1a1a1a);border-bottom:2px solid var(--mapa-color-ink, #1a1a1a);transform:translateY(-70%) rotate(45deg);transition:transform .2s ease;pointer-events:none}.mapa-dropdown__trigger:disabled{background:var(--mapa-color-disabled-surface, #f6f7f7);color:var(--mapa-color-muted, #555555);cursor:not-allowed}.mapa-dropdown__trigger:disabled:after{opacity:.5}.mapa-dropdown--open .mapa-dropdown__trigger,.mapa-dropdown__trigger:focus{border-color:var(--mapa-color-accent, #ff560b);box-shadow:0 0 0 3px #ff560b1f}.mapa-dropdown--open .mapa-dropdown__trigger:after{transform:translateY(-20%) rotate(-135deg)}.mapa-dropdown--highlight .mapa-dropdown__trigger{border:2px solid #eedb2a;border-radius:16px}.mapa-dropdown--tag .mapa-dropdown__trigger{border-radius:16px}.mapa-dropdown__trigger-text{display:block;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--mapa-color-ink, #1a1a1a)}.mapa-dropdown__trigger-text--placeholder{color:var(--mapa-color-muted, #CFC4C7)}.mapa-dropdown__clear{position:absolute;top:50%;right:40px;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:50%;color:var(--mapa-color-muted, #555555);font-size:16px;line-height:1;cursor:pointer}.mapa-dropdown__clear:hover{background:#1a1a1a14;color:var(--mapa-color-ink, #1a1a1a)}.mapa-dropdown__action{flex:none}.mapa-dropdown__checkbox{flex:none;width:16px;height:16px;margin-right:12px;accent-color:var(--mapa-color-accent, #ff560b)}.mapa-dropdown__panel{width:100%;overflow:hidden;border:1px solid var(--mapa-color-border-soft, rgba(26, 26, 26, .08));border-radius:var(--mapa-radius-md, 16px);background:var(--mapa-color-surface, #ffffff);box-shadow:var(--mapa-shadow-panel, 0 18px 40px rgba(26, 26, 26, .08))}.mapa-dropdown__search-input{border-bottom:1px solid var(--mapa-color-border-soft, rgba(26, 26, 26, .08))}.mapa-dropdown__options{max-height:240px;overflow-y:auto;background:var(--mapa-color-surface, #ffffff)}.mapa-dropdown__group-label{margin:0;padding:10px 16px 6px;color:var(--mapa-color-muted, #555555);font-family:var(--mapa-font-body, \"Asap\", sans-serif);font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase}.mapa-dropdown__option{display:flex;align-items:center;min-height:44px;text-align:left;cursor:pointer;transition:background-color .2s ease,color .2s ease}.mapa-dropdown__option:hover{background:#ff560b14}.mapa-dropdown__option--selected{background:#ff560b1f;color:var(--mapa-color-accent, #ff560b)}.mapa-dropdown__option--select-all{border-bottom:1px solid var(--mapa-color-border-soft, rgba(26, 26, 26, .08));font-weight:600}.mapa-dropdown__empty-state{margin:0;padding:14px 16px;color:var(--mapa-color-muted, #555555);font-size:14px;line-height:20px}.mapa-dropdown--invalid .mapa-dropdown__trigger{border-color:#b54242;box-shadow:0 0 0 3px #b542421f}.mapa-dropdown__hint,.mapa-dropdown__error{display:block;margin:8px 0 0;padding-left:4px;font-size:13px;line-height:18px}.mapa-dropdown__hint{color:var(--mapa-color-muted, #555555)}.mapa-dropdown__error{color:#b54242}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.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: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "component", type: ButtonComponent, selector: "mapa-button", inputs: ["color", "disabled"], outputs: ["clicked"] }, { kind: "component", type: MapaFormErrorsComponent, selector: "mapa-form-errors", inputs: ["control", "errors"] }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
452
614
  }
453
615
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaDropdownComponent, decorators: [{
454
616
  type: Component,
455
- args: [{ selector: "mapa-dropdown", changeDetection: ChangeDetectionStrategy.OnPush, imports: [
456
- CommonModule,
457
- FormsModule,
617
+ args: [{ selector: "mapa-dropdown", standalone: true, imports: [
458
618
  ReactiveFormsModule,
459
- MatCheckboxModule,
460
- MatFormFieldModule,
461
- MatIconModule,
462
- MatSelectModule,
463
- NgxMatSelectSearchModule,
619
+ CdkConnectedOverlay,
620
+ CdkOverlayOrigin,
464
621
  ButtonComponent,
465
622
  MapaFormErrorsComponent,
466
623
  SafeHtmlPipe,
467
624
  ], providers: [
468
- {
469
- provide: MAT_SELECT_CONFIG,
470
- useValue: { overlayPanelClass: "mapa-overlay-dropdown" },
471
- },
472
- {
473
- provide: MAT_FORM_FIELD_DEFAULT_OPTIONS,
474
- useValue: { appearance: "outline" },
475
- },
476
625
  {
477
626
  provide: NG_VALUE_ACCESSOR,
478
627
  useExisting: forwardRef(() => MapaDropdownComponent),
479
628
  multi: true,
480
629
  },
481
- ], standalone: true, template: "@if (element) {\n @if (element.label) {\n <label class=\"mapa-dropdown__label\">\n {{ element.label }}\n </label>\n }\n <div class=\"mapa-form--inline\">\n <mat-form-field\n appearance=\"outline\"\n class=\"mapa-dropdown\"\n [class.mapa-dropdown--highlight]=\"border === 'highlight'\"\n [class.mapa-dropdown--soft-border]=\"border === 'soft'\"\n [class.mapa-dropdown--tag]=\"border === 'tag'\"\n [class.mapa-dropdown--labeled]=\"!!element.label\"\n >\n <mat-select\n #dropdown\n ngDefaultControl\n [formControl]=\"formControl\"\n [multiple]=\"element.multiple\"\n [placeholder]=\"element.placeholder || ''\"\n [compareWith]=\"compareFn\"\n (openedChange)=\"triggerOpenedChange($event)\"\n >\n @if (element.search) {\n <mat-option class=\"mapa-dropdown__search\">\n @if (element.search.formControl) {\n <ngx-mat-select-search\n [showToggleAllCheckbox]=\"element.search.toggleAllCheckbox!\"\n [formControl]=\"element.search.formControl\"\n [placeholderLabel]=\"element.search.placeholder || ''\"\n i18n-placeholderLabel\n [noEntriesFoundLabel]=\"element.search.noEntriesFoundLabel || ''\"\n ></ngx-mat-select-search>\n }\n </mat-option>\n }\n @if (element.multiple) {\n <mat-option class=\"mapa-dropdown__option--select-all\">\n <mat-checkbox\n class=\"mat-option\"\n [indeterminate]=\"isIndeterminate\"\n [checked]=\"isChecked\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"toggleSelectAll($event)\"\n >\n {{ selectAllLabel }}\n </mat-checkbox>\n </mat-option>\n }\n @if (isOptionsGroup) {\n @if (filteredGroups | async; as groups) {\n @for (group of groups; track group.label) {\n <mat-optgroup [label]=\"group.label\">\n @for (option of group.options; track option.key) {\n <mat-option\n [value]=\"option\"\n [ngClass]=\"[\n 'mapa-dropdown__option--children-level-' + option.childrenLevel,\n ]\"\n >\n <span [innerHTML]=\"option.value | safeHtml\"></span>\n </mat-option>\n }\n </mat-optgroup>\n }\n }\n } @else {\n @if (filteredOptions | async; as options) {\n @for (option of options; track option.key) {\n <mat-option\n [value]=\"option\"\n [ngClass]=\"[\n 'mapa-dropdown__option mapa-dropdown__option--children-level-' +\n option.childrenLevel,\n ]\"\n >\n <span\n class=\"mapa-dropdown__option-value\"\n [innerHTML]=\"option.value | safeHtml\"\n ></span>\n </mat-option>\n }\n }\n }\n\n @for (option of selectedOptions; track option.key) {\n <mat-option\n hidden\n [value]=\"option\"\n [ngClass]=\"[\n 'mapa-dropdown__option--children-level-' + option.childrenLevel,\n ]\"\n >\n <span [innerHTML]=\"option.value | safeHtml\"></span>\n </mat-option>\n }\n </mat-select>\n @if (element.hint) {\n <mat-hint>{{ element.hint }}</mat-hint>\n }\n <mat-error>\n <mapa-form-errors\n [control]=\"formControl\"\n [errors]=\"element.errors\"\n ></mapa-form-errors>\n </mat-error>\n @if (hasValue() && !formControl.disabled && element.clearValue) {\n <mat-icon\n (click)=\"clearValue($event)\"\n class=\"mapa-input--close\"\n >close</mat-icon\n >\n }\n </mat-form-field>\n @if (element.actionButton) {\n <div class=\"mapa-form--action\">\n <mapa-button\n color=\"basic\"\n (click)=\"element.actionButton.action.emit(true)\"\n >\n {{ element.actionButton.label }}\n </mapa-button>\n </div>\n }\n </div>\n}\n", styles: [":host ::ng-deep .mapa-dropdown{max-width:min-content;min-width:235px}:host ::ng-deep .mapa-dropdown .mat-mdc-select{font-family:var(--mapa-font-body, \"Asap\", \"Roboto\", \"Inter\", sans-serif)!important}:host ::ng-deep .mapa-dropdown .mat-icon{display:flex;justify-content:center;align-items:center;position:absolute;right:28px!important;top:18px!important;z-index:1}:host ::ng-deep .mapa-dropdown__label{font-family:var(--mapa-font-heading, \"Asap\", \"Inter\", sans-serif);display:block;font-size:12px;font-style:normal;font-weight:600;line-height:16px;text-transform:uppercase;margin-bottom:16px}:host ::ng-deep .mapa-dropdown--highlight .mat-mdc-text-field-wrapper{border-radius:16px}:host ::ng-deep .mapa-dropdown--highlight .mdc-notched-outline{border-radius:16px!important}:host ::ng-deep .mapa-dropdown--highlight .mdc-notched-outline .mdc-notched-outline__leading,:host ::ng-deep .mapa-dropdown--highlight .mdc-notched-outline .mdc-notched-outline__trailing{border-width:2px!important;border-color:#eedb2a!important}:host ::ng-deep .mapa-dropdown--highlight .mdc-notched-outline .mdc-notched-outline__leading{display:none!important}:host ::ng-deep .mapa-dropdown--highlight .mdc-notched-outline .mdc-notched-outline__trailing{border-radius:16px!important;border-left-style:solid!important}:host ::ng-deep .mapa-dropdown--soft-border .mdc-notched-outline .mdc-notched-outline__leading,:host ::ng-deep .mapa-dropdown--soft-border .mdc-notched-outline .mdc-notched-outline__trailing{border-width:1px!important}:host ::ng-deep .mapa-dropdown--tag .mat-mdc-text-field-wrapper{border-radius:16px}:host ::ng-deep .mapa-dropdown--tag .mdc-notched-outline{border-radius:16px!important;height:42px!important}:host ::ng-deep .mapa-dropdown--tag .mdc-notched-outline .mdc-notched-outline__leading,:host ::ng-deep .mapa-dropdown--tag .mdc-notched-outline .mdc-notched-outline__trailing{border-width:1px!important;border-color:#cdcdcd}:host ::ng-deep .mapa-dropdown--tag .mdc-notched-outline .mdc-notched-outline__leading{display:none!important}:host ::ng-deep .mapa-dropdown--tag .mdc-notched-outline .mdc-notched-outline__trailing{border-radius:16px!important;border-left-style:solid!important}:host ::ng-deep .mapa-dropdown .mat-mdc-text-field-wrapper{background-color:#fff;border-radius:8px}:host ::ng-deep .mapa-dropdown .mat-mdc-text-field-wrapper.mdc-text-field--outlined{padding-left:unset!important;padding-right:unset!important}:host ::ng-deep .mapa-dropdown .mdc-notched-outline{background-color:transparent;border-radius:8px;pointer-events:none;z-index:0}:host ::ng-deep .mapa-dropdown .mdc-notched-outline .mdc-notched-outline__leading,:host ::ng-deep .mapa-dropdown .mdc-notched-outline .mdc-notched-outline__trailing{border-width:2px}:host ::ng-deep .mapa-dropdown .mat-mdc-form-field-flex{display:flex;align-items:center;height:48px;position:relative}:host ::ng-deep .mapa-dropdown .mat-mdc-select-trigger{min-width:50px;padding-top:unset!important;height:unset!important;position:relative;z-index:1}:host ::ng-deep .mapa-dropdown .mat-mdc-select-value-text{display:block;width:90%}:host ::ng-deep .mapa-dropdown .mat-mdc-select-arrow-wrapper{transform:none!important;align-items:center;position:relative;z-index:1}:host ::ng-deep .mapa-dropdown .mat-mdc-select-arrow{border:unset;color:#50575e}:host ::ng-deep .mapa-dropdown .mat-mdc-select-arrow:before,:host ::ng-deep .mapa-dropdown .mat-mdc-select-arrow:after{content:none!important}:host ::ng-deep .mapa-dropdown .mat-mdc-select-arrow svg{display:block!important;fill:currentColor}:host ::ng-deep .mapa-dropdown .mat-mdc-form-field-error-wrapper,:host ::ng-deep .mapa-dropdown .mat-mdc-form-field-hint-wrapper,:host ::ng-deep .mapa-dropdown .mat-mdc-form-field-subscript-wrapper{padding:0!important}:host ::ng-deep .mapa-dropdown [aria-expanded=true] .mat-mdc-select-arrow{margin:0}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel{border-radius:8px;min-width:calc(100% + 24px)!important}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option,::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mdc-list-item__primary-text{font-family:var(--mapa-font-body, \"Asap\", \"Roboto\", \"Inter\", sans-serif)!important;font-size:16px;font-style:normal;font-weight:400;line-height:2em;height:2em;color:#50575e}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option.mapa-dropdown__option,::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option.mapa-dropdown__option--select-all,::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option[class*=mapa-dropdown__option--children-level-]{height:auto!important;align-items:start!important}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option.mapa-dropdown__option .mat-pseudo-checkbox,::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option.mapa-dropdown__option--select-all .mat-pseudo-checkbox,::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option[class*=mapa-dropdown__option--children-level-] .mat-pseudo-checkbox{margin:7px 7px 7px 0!important}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option.mapa-dropdown__option .mdc-list-item__primary-text,::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option.mapa-dropdown__option--select-all .mdc-list-item__primary-text,::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option[class*=mapa-dropdown__option--children-level-] .mdc-list-item__primary-text{height:auto!important}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mapa-dropdown__option-value{text-wrap:auto}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option.mapa-dropdown__option--children-level-1{padding-left:30px!important}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option.mapa-dropdown__option--children-level-2{padding-left:50px!important}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option.mapa-dropdown__option--children-level-3{padding-left:70px!important}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option.mapa-dropdown__option--children-level-4{padding-left:90px!important}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option.mapa-dropdown__option--children-level-5{padding-left:100px!important}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option.mapa-dropdown__option--children-level-6{padding-left:120px!important}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option.mapa-dropdown__option--select-all{padding-left:5px!important}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option.mapa-dropdown__option--select-all .mat-pseudo-checkbox{display:none!important}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option[aria-disabled=true].contains-mat-select-search{align-items:flex-start;background:#f6f7f7;height:auto!important;min-height:80px;padding:16px 8px!important}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option[aria-disabled=true].contains-mat-select-search .mdc-list-item__primary-text{width:100%}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option[aria-disabled=true].contains-mat-select-search .mat-select-search-inner{background:transparent!important;background-color:transparent!important;border:unset;border-radius:0;box-shadow:none!important;inset:0 auto auto 0;overflow:visible;position:relative;width:100%!important}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option[aria-disabled=true].contains-mat-select-search .mat-select-search-inner-row{align-items:center;background:transparent;display:flex;position:relative}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option[aria-disabled=true].contains-mat-select-search .mat-select-search-hidden{background:transparent!important;background-color:transparent!important;border:unset!important;height:0!important;line-height:0!important;padding:0!important}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option[aria-disabled=true].contains-mat-select-search .mat-select-search-toggle-all-checkbox{padding-left:8px!important}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option[aria-disabled=true].contains-mat-select-search .mat-select-search-input{background-color:#fff!important;border:2px solid #a7aaad!important;border-radius:8px!important;height:28px!important;line-height:24px!important;padding:0 48px 0 12px!important;width:100%}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option[aria-disabled=true].contains-mat-select-search .mat-select-search-input::placeholder{color:#c3c4c7!important}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option[aria-disabled=true].contains-mat-select-search .mat-select-search-clear{top:50%;transform:translateY(-50%)}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option[aria-disabled=true].contains-mat-select-search .mat-divider{margin:0}::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option[aria-disabled=true].contains-mat-select-search.mat-mdc-option-active,::ng-deep .mapa-overlay-dropdown .mat-mdc-select-panel .mat-mdc-option[aria-disabled=true].contains-mat-select-search:hover{background:#f6f7f7}::ng-deep .mapa-overlay-dropdown .mat-pseudo-checkbox{color:#c3c4c7!important}::ng-deep .mapa-overlay-dropdown .mdc-checkbox__background{border-color:#c3c4c7!important}\n"] }]
482
- }], ctorParameters: () => [{ type: MapaI18nService }, { type: i0.ChangeDetectorRef }], propDecorators: { formControl: [{
483
- type: Input
630
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"mapa-dropdown\"\n [class.mapa-dropdown--open]=\"isOpen()\"\n [class.mapa-dropdown--invalid]=\"shouldShowError()\"\n [class.mapa-dropdown--disabled]=\"isDisabled()\"\n [class.mapa-dropdown--highlight]=\"border === 'highlight'\"\n [class.mapa-dropdown--soft-border]=\"border === 'soft'\"\n [class.mapa-dropdown--tag]=\"border === 'tag'\"\n>\n @if (element.label) {\n <label class=\"mapa-dropdown__label\" [attr.for]=\"element.key || null\">\n {{ element.label }}\n </label>\n }\n\n <div class=\"mapa-dropdown__field-row\">\n <button\n #triggerButton\n cdkOverlayOrigin\n #origin=\"cdkOverlayOrigin\"\n class=\"mapa-dropdown__trigger\"\n [class.mapa-dropdown__trigger--clearable]=\"hasValue() && element.clearValue\"\n [id]=\"element.key || null\"\n type=\"button\"\n [disabled]=\"isDisabled()\"\n (click)=\"toggleDropdown()\"\n [attr.aria-expanded]=\"isOpen()\"\n aria-haspopup=\"listbox\"\n >\n <span\n class=\"mapa-dropdown__trigger-text\"\n [class.mapa-dropdown__trigger-text--placeholder]=\"!hasValue()\"\n [innerHTML]=\"selectedLabel() | safeHtml\"\n ></span>\n @if (hasValue() && !isDisabled() && element.clearValue) {\n <span\n class=\"mapa-dropdown__clear\"\n role=\"button\"\n aria-label=\"Limpar\"\n (click)=\"clearValue($event)\"\n >\n &times;\n </span>\n }\n </button>\n\n @if (element.actionButton) {\n <mapa-button\n class=\"mapa-dropdown__action\"\n color=\"basic\"\n (clicked)=\"element.actionButton.action.emit(true)\"\n >\n {{ element.actionButton.label }}\n </mapa-button>\n }\n </div>\n\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions\"\n [cdkConnectedOverlayWidth]=\"overlayWidth()\"\n cdkConnectedOverlayPanelClass=\"mapa-dropdown__overlay-pane\"\n (overlayOutsideClick)=\"handleOverlayOutsideClick($event)\"\n >\n <div class=\"mapa-dropdown__panel\">\n @if (hasSearch()) {\n <input\n #searchInput\n class=\"mapa-dropdown__search-input\"\n type=\"text\"\n [formControl]=\"searchControl!\"\n [placeholder]=\"searchPlaceholder()\"\n />\n }\n\n <div class=\"mapa-dropdown__options\" role=\"listbox\">\n @if (isMultiple() && visibleOptions().length) {\n <button\n class=\"mapa-dropdown__option mapa-dropdown__option--select-all\"\n type=\"button\"\n (click)=\"toggleSelectAll()\"\n >\n <input\n class=\"mapa-dropdown__checkbox\"\n type=\"checkbox\"\n [checked]=\"isAllSelected()\"\n [indeterminate]=\"isIndeterminate()\"\n (click)=\"$event.stopPropagation(); toggleSelectAll()\"\n />\n {{ selectAllLabel }}\n </button>\n }\n\n @if (hasGroups()) {\n @for (group of filteredGroups(); track group.label) {\n <div class=\"mapa-dropdown__group\" role=\"group\">\n <p class=\"mapa-dropdown__group-label\">{{ group.label }}</p>\n @for (option of group.options; track option.key) {\n <button\n class=\"mapa-dropdown__option\"\n [class.mapa-dropdown__option--selected]=\"isOptionSelected(option)\"\n [style.padding-left.px]=\"optionPadding(option)\"\n type=\"button\"\n (click)=\"selectOption(option)\"\n >\n @if (isMultiple()) {\n <input\n class=\"mapa-dropdown__checkbox\"\n type=\"checkbox\"\n [checked]=\"isOptionSelected(option)\"\n (click)=\"$event.stopPropagation(); selectOption(option)\"\n />\n }\n <span [innerHTML]=\"option.value | safeHtml\"></span>\n </button>\n }\n </div>\n }\n } @else {\n @for (option of filteredOptions(); track option.key) {\n <button\n class=\"mapa-dropdown__option\"\n [class.mapa-dropdown__option--selected]=\"isOptionSelected(option)\"\n [style.padding-left.px]=\"optionPadding(option)\"\n type=\"button\"\n (click)=\"selectOption(option)\"\n >\n @if (isMultiple()) {\n <input\n class=\"mapa-dropdown__checkbox\"\n type=\"checkbox\"\n [checked]=\"isOptionSelected(option)\"\n (click)=\"$event.stopPropagation(); selectOption(option)\"\n />\n }\n <span [innerHTML]=\"option.value | safeHtml\"></span>\n </button>\n }\n }\n\n @if (!visibleOptions().length) {\n <p class=\"mapa-dropdown__empty-state\">\n {{ emptyStateLabel() }}\n </p>\n }\n </div>\n </div>\n </ng-template>\n\n @if (shouldShowError()) {\n <p class=\"mapa-dropdown__error\">\n <mapa-form-errors\n [control]=\"formControl\"\n [errors]=\"element.errors\"\n ></mapa-form-errors>\n </p>\n } @else if (element.hint) {\n <p class=\"mapa-dropdown__hint\">{{ element.hint }}</p>\n }\n</div>\n", styles: [":host{position:relative;display:inline-block;max-width:min-content;min-width:310px;box-sizing:border-box}.mapa-dropdown{width:100%}.mapa-dropdown__label{display:inline-block;margin-bottom:8px;color:var(--mapa-color-ink, #1a1a1a);font-family:var(--mapa-font-heading, \"Asap\", sans-serif);font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}.mapa-dropdown__field-row{display:flex;align-items:center;gap:24px;min-width:0}.mapa-dropdown__trigger,.mapa-dropdown__search-input,.mapa-dropdown__option{width:100%;min-height:48px;padding:12px 16px;border:0;background:var(--mapa-color-surface, #ffffff);color:var(--mapa-color-ink, #1a1a1a);font-family:var(--mapa-font-body, \"Asap\", sans-serif);font-size:16px;line-height:24px}.mapa-dropdown__trigger:focus,.mapa-dropdown__search-input:focus,.mapa-dropdown__option:focus{outline:none}.mapa-dropdown__trigger::placeholder,.mapa-dropdown__search-input::placeholder,.mapa-dropdown__option::placeholder{color:var(--mapa-color-muted, #555555)}.mapa-dropdown__trigger{position:relative;display:flex;flex:1 1 auto;align-items:center;min-width:0;padding-right:46px;border:1px solid var(--mapa-color-border, rgba(26, 26, 26, .18));border-radius:var(--mapa-radius-sm, 12px);text-align:left;cursor:pointer;transition:border-color .2s ease,box-shadow .2s ease,background-color .2s ease}.mapa-dropdown__trigger--clearable{padding-right:70px}.mapa-dropdown__trigger:after{content:\"\";position:absolute;top:50%;right:18px;width:9px;height:9px;border-right:2px solid var(--mapa-color-ink, #1a1a1a);border-bottom:2px solid var(--mapa-color-ink, #1a1a1a);transform:translateY(-70%) rotate(45deg);transition:transform .2s ease;pointer-events:none}.mapa-dropdown__trigger:disabled{background:var(--mapa-color-disabled-surface, #f6f7f7);color:var(--mapa-color-muted, #555555);cursor:not-allowed}.mapa-dropdown__trigger:disabled:after{opacity:.5}.mapa-dropdown--open .mapa-dropdown__trigger,.mapa-dropdown__trigger:focus{border-color:var(--mapa-color-accent, #ff560b);box-shadow:0 0 0 3px #ff560b1f}.mapa-dropdown--open .mapa-dropdown__trigger:after{transform:translateY(-20%) rotate(-135deg)}.mapa-dropdown--highlight .mapa-dropdown__trigger{border:2px solid #eedb2a;border-radius:16px}.mapa-dropdown--tag .mapa-dropdown__trigger{border-radius:16px}.mapa-dropdown__trigger-text{display:block;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--mapa-color-ink, #1a1a1a)}.mapa-dropdown__trigger-text--placeholder{color:var(--mapa-color-muted, #CFC4C7)}.mapa-dropdown__clear{position:absolute;top:50%;right:40px;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:50%;color:var(--mapa-color-muted, #555555);font-size:16px;line-height:1;cursor:pointer}.mapa-dropdown__clear:hover{background:#1a1a1a14;color:var(--mapa-color-ink, #1a1a1a)}.mapa-dropdown__action{flex:none}.mapa-dropdown__checkbox{flex:none;width:16px;height:16px;margin-right:12px;accent-color:var(--mapa-color-accent, #ff560b)}.mapa-dropdown__panel{width:100%;overflow:hidden;border:1px solid var(--mapa-color-border-soft, rgba(26, 26, 26, .08));border-radius:var(--mapa-radius-md, 16px);background:var(--mapa-color-surface, #ffffff);box-shadow:var(--mapa-shadow-panel, 0 18px 40px rgba(26, 26, 26, .08))}.mapa-dropdown__search-input{border-bottom:1px solid var(--mapa-color-border-soft, rgba(26, 26, 26, .08))}.mapa-dropdown__options{max-height:240px;overflow-y:auto;background:var(--mapa-color-surface, #ffffff)}.mapa-dropdown__group-label{margin:0;padding:10px 16px 6px;color:var(--mapa-color-muted, #555555);font-family:var(--mapa-font-body, \"Asap\", sans-serif);font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase}.mapa-dropdown__option{display:flex;align-items:center;min-height:44px;text-align:left;cursor:pointer;transition:background-color .2s ease,color .2s ease}.mapa-dropdown__option:hover{background:#ff560b14}.mapa-dropdown__option--selected{background:#ff560b1f;color:var(--mapa-color-accent, #ff560b)}.mapa-dropdown__option--select-all{border-bottom:1px solid var(--mapa-color-border-soft, rgba(26, 26, 26, .08));font-weight:600}.mapa-dropdown__empty-state{margin:0;padding:14px 16px;color:var(--mapa-color-muted, #555555);font-size:14px;line-height:20px}.mapa-dropdown--invalid .mapa-dropdown__trigger{border-color:#b54242;box-shadow:0 0 0 3px #b542421f}.mapa-dropdown__hint,.mapa-dropdown__error{display:block;margin:8px 0 0;padding-left:4px;font-size:13px;line-height:18px}.mapa-dropdown__hint{color:var(--mapa-color-muted, #555555)}.mapa-dropdown__error{color:#b54242}\n"] }]
631
+ }], propDecorators: { element: [{
632
+ type: Input,
633
+ args: [{ required: true }]
634
+ }], formControl: [{
635
+ type: Input,
636
+ args: [{ required: true }]
484
637
  }], formControlSearch: [{
485
638
  type: Input
486
- }], element: [{
487
- type: Input
488
639
  }], border: [{
489
640
  type: Input
490
641
  }], openedChange: [{
491
642
  type: Output
492
- }], dropdown: [{
643
+ }], triggerButton: [{
644
+ type: ViewChild,
645
+ args: ["triggerButton"]
646
+ }], searchInput: [{
493
647
  type: ViewChild,
494
- args: ["dropdown", { static: true }]
648
+ args: ["searchInput"]
649
+ }], handleWindowResize: [{
650
+ type: HostListener,
651
+ args: ["window:resize"]
495
652
  }] } });
496
653
 
497
654
  /*
@@ -624,7 +781,7 @@ class MapaInputComponent {
624
781
  useExisting: forwardRef(() => MapaInputComponent),
625
782
  multi: true,
626
783
  },
627
- ], ngImport: i0, template: "<label *ngIf=\"element.label\" class=\"mapa-input__label\">\n {{ element.label }}\n</label>\n<div class=\"mapa-form--inline\">\n <mat-form-field\n class=\"mapa-input\"\n appearance=\"outline\"\n subscriptSizing=\"dynamic\"\n >\n <mat-icon *ngIf=\"element.prefix\" class=\"mapa-input--prefix\" matPrefix>\n {{ element.prefix }}\n </mat-icon>\n <input\n *ngIf=\"element.autosize\"\n matInput\n matInputAutosize\n [matInputAutosizeMinWidth]=\"element.autosizeMinWidth!\"\n [matInputAutosizeMaxWidth]=\"element.autosizeMaxWidth!\"\n [formControl]=\"formControl\"\n [placeholder]=\"element.placeholder || element.label\"\n [maxlength]=\"element.maxLength\"\n (keydown.enter)=\"suffixEmit()\"\n [type]=\"type\"\n [mask]=\"element.mask\"\n thousandSeparator=\".\"\n decimalMarker=\",\"\n [autocomplete]=\"element.autocomplete\"\n [readOnly]=\"element.readonly\"\n />\n <input\n matInput\n *ngIf=\"!element.autosize\"\n [formControl]=\"formControl\"\n [placeholder]=\"element.placeholder || element.label\"\n [maxlength]=\"element.maxLength\"\n (keydown.enter)=\"suffixEmit()\"\n [type]=\"type\"\n [mask]=\"element.mask\"\n [autocomplete]=\"element.autocomplete\"\n [readOnly]=\"element.readonly\"\n />\n <mat-icon\n *ngIf=\"hasValue() && !formControl.disabled && element.clearValue\"\n (click)=\"clearValue()\"\n class=\"mapa-input--close\"\n matSuffix\n >close</mat-icon\n >\n <mat-icon\n *ngIf=\"element.suffix\"\n class=\"mapa-input--suffix\"\n matSuffix\n (click)=\"suffix.emit()\"\n >\n {{ element.suffix }}\n </mat-icon>\n <mat-hint *ngIf=\"element.hint\">{{ element.hint }}</mat-hint>\n <mat-error>\n <mapa-form-errors\n [control]=\"formControl\"\n [errors]=\"element.errors\"\n ></mapa-form-errors>\n </mat-error>\n </mat-form-field>\n\n <div *ngIf=\"element.actionButton\" class=\"mapa-form--action\">\n <mapa-button\n color=\"basic\"\n (clicked)=\"element.actionButton.action.emit(true)\"\n >\n {{ element.actionButton.label }}\n </mapa-button>\n </div>\n</div>\n", styles: [".mapa-input__label{font-family:var(--mapa-font-heading, \"Asap\", \"Inter\", sans-serif);display:block;font-size:12px;font-style:normal;font-weight:600;line-height:16px;text-transform:uppercase;margin-bottom:16px}:host ::ng-deep .mapa-input .mat-mdc-form-field-error-wrapper,:host ::ng-deep .mapa-input .mat-mdc-form-field-hint-wrapper,:host ::ng-deep .mapa-input .mat-mdc-form-field-subscript-wrapper{padding:0!important}:host ::ng-deep .mapa-input .mat-mdc-input-element{font-family:var(--mapa-font-body, \"Asap\", \"Roboto\", \"Inter\", sans-serif);font-size:16px;font-style:normal;font-weight:400}:host ::ng-deep .mapa-input .mat-mdc-text-field-wrapper{background-color:#fff;border-radius:8px;height:48px}:host ::ng-deep .mapa-input .mat-mdc-text-field-wrapper.mdc-text-field--outlined{padding-left:unset!important;padding-right:unset!important}:host ::ng-deep .mapa-input .mdc-notched-outline{background-color:transparent;border-radius:8px}:host ::ng-deep .mapa-input .mdc-text-field--outlined .mat-mdc-form-field-infix{padding-bottom:12px;padding-top:16px;--mat-form-field-container-height: 48px}:host ::ng-deep .mapa-input .mdc-text-field--outlined{--mat-form-field-outlined-container-shape: 8px;--mat-form-field-outlined-outline-width: 2px}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix{display:flex}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix .mapa-input--close{padding:unset}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix .mapa-input--suffix{padding:0 0 0 8px}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix .mat-icon:last-child{padding-right:12px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$2.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: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: NgxMaskDirective, selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "clearIfNotMatch", "validation", "separatorLimit", "allowNegativeNumbers", "leadZeroDateTime", "leadZero", "triggerOnMaskChange", "apm", "inputTransformFn", "outputTransformFn", "keepCharacterPositions", "instantPrefix"], outputs: ["maskFilled"], exportAs: ["mask", "ngxMask"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i1$1.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: "component", type: ButtonComponent, selector: "mapa-button", inputs: ["color", "disabled"], outputs: ["clicked"] }, { kind: "directive", type: MatInputAutosizeDirective, selector: "[matInputAutosize]", inputs: ["matInputAutosizeMaxWidth", "matInputAutosizeMinWidth", "matInputAutosizeFontStyle"] }, { kind: "component", type: MapaFormErrorsComponent, selector: "mapa-form-errors", inputs: ["control", "errors"] }] }); }
784
+ ], ngImport: i0, template: "<label *ngIf=\"element.label\" class=\"mapa-input__label\">\n {{ element.label }}\n</label>\n<div class=\"mapa-form--inline\">\n <mat-form-field\n class=\"mapa-input\"\n [class.mapa-input--autosize]=\"element.autosize\"\n appearance=\"outline\"\n subscriptSizing=\"dynamic\"\n >\n <mat-icon *ngIf=\"element.prefix\" class=\"mapa-input--prefix\" matPrefix>\n {{ element.prefix }}\n </mat-icon>\n <input\n *ngIf=\"element.autosize\"\n matInput\n matInputAutosize\n [matInputAutosizeMinWidth]=\"element.autosizeMinWidth!\"\n [matInputAutosizeMaxWidth]=\"element.autosizeMaxWidth!\"\n [formControl]=\"formControl\"\n [placeholder]=\"element.placeholder || element.label\"\n [maxlength]=\"element.maxLength\"\n (keydown.enter)=\"suffixEmit()\"\n [type]=\"type\"\n [mask]=\"element.mask\"\n thousandSeparator=\".\"\n decimalMarker=\",\"\n [autocomplete]=\"element.autocomplete\"\n [readOnly]=\"element.readonly\"\n />\n <input\n matInput\n *ngIf=\"!element.autosize\"\n [formControl]=\"formControl\"\n [placeholder]=\"element.placeholder || element.label\"\n [maxlength]=\"element.maxLength\"\n (keydown.enter)=\"suffixEmit()\"\n [type]=\"type\"\n [mask]=\"element.mask\"\n [autocomplete]=\"element.autocomplete\"\n [readOnly]=\"element.readonly\"\n />\n <button\n *ngIf=\"hasValue() && !formControl.disabled && element.clearValue\"\n type=\"button\"\n matSuffix\n aria-label=\"Limpar\"\n (click)=\"clearValue()\"\n class=\"mapa-input--close\"\n >\n &times;\n </button>\n <mat-icon\n *ngIf=\"element.suffix\"\n class=\"mapa-input--suffix\"\n matSuffix\n (click)=\"suffix.emit()\"\n >\n {{ element.suffix }}\n </mat-icon>\n <mat-hint *ngIf=\"element.hint\">{{ element.hint }}</mat-hint>\n <mat-error>\n <mapa-form-errors\n [control]=\"formControl\"\n [errors]=\"element.errors\"\n ></mapa-form-errors>\n </mat-error>\n </mat-form-field>\n\n <div *ngIf=\"element.actionButton\" class=\"mapa-form--action\">\n <mapa-button\n color=\"basic\"\n (clicked)=\"element.actionButton.action.emit(true)\"\n >\n {{ element.actionButton.label }}\n </mapa-button>\n </div>\n</div>\n", styles: [".mapa-input{width:310px;min-width:310px;box-sizing:border-box}.mapa-input--autosize{width:auto}.mapa-input__label{font-family:var(--mapa-font-heading, \"Asap\", \"Inter\", sans-serif);display:block;font-size:12px;font-style:normal;font-weight:600;line-height:16px;text-transform:uppercase;margin-bottom:16px}:host ::ng-deep .mapa-input .mat-mdc-form-field-error-wrapper,:host ::ng-deep .mapa-input .mat-mdc-form-field-hint-wrapper,:host ::ng-deep .mapa-input .mat-mdc-form-field-subscript-wrapper{padding:0!important}:host ::ng-deep .mapa-input .mat-mdc-form-field-error{margin:8px 0 0;padding-left:4px;color:#b54242;font-size:13px;line-height:18px}:host ::ng-deep .mapa-input .mat-mdc-form-field-error:before{display:none}:host ::ng-deep .mapa-input .mat-mdc-form-field-hint{display:block;margin:8px 0 0;padding-left:4px;color:var(--mapa-color-muted, #555555);font-size:13px;line-height:18px}:host ::ng-deep .mapa-input .mat-mdc-form-field-hint:before{display:none}:host ::ng-deep .mapa-input .mat-mdc-input-element{font-family:var(--mapa-font-body, \"Asap\", \"Roboto\", \"Inter\", sans-serif);font-size:16px;font-style:normal;font-weight:400}:host ::ng-deep .mapa-input .mat-mdc-form-field-flex{height:48px!important}:host ::ng-deep .mapa-input .mat-mdc-text-field-wrapper{background-color:var(--mapa-color-surface, #ffffff);border-radius:var(--mapa-radius-sm, 12px);height:48px}:host ::ng-deep .mapa-input .mat-mdc-text-field-wrapper.mdc-text-field--outlined{padding-left:unset!important;padding-right:unset!important}:host ::ng-deep .mapa-input .mdc-notched-outline{background-color:transparent;border-radius:var(--mapa-radius-sm, 12px)}:host ::ng-deep .mapa-input .mdc-text-field--outlined .mat-mdc-form-field-infix{padding-bottom:12px;padding-top:16px;--mat-form-field-container-height: 48px}:host ::ng-deep .mapa-input .mdc-text-field--outlined{--mat-form-field-outlined-container-shape: var(--mapa-radius-sm, 12px);--mat-form-field-outlined-outline-color: var( --mapa-color-border, rgba(26, 26, 26, .18) );--mat-form-field-outlined-hover-outline-color: var( --mapa-color-border, rgba(26, 26, 26, .18) );--mat-form-field-outlined-focus-outline-color: var( --mapa-color-accent, #ff560b );--mat-form-field-outlined-outline-width: 1px;--mat-form-field-outlined-focus-outline-width: 1px}:host ::ng-deep .mapa-input .mdc-notched-outline__leading,:host ::ng-deep .mapa-input .mdc-notched-outline__notch,:host ::ng-deep .mapa-input .mdc-notched-outline__trailing{border-width:1px!important}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix{display:flex}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix .mapa-input--close{display:flex;flex:0 0 20px;align-items:center;justify-content:center;width:20px;height:20px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--mapa-color-muted, #555555);font-family:inherit;font-size:16px;line-height:1;cursor:pointer}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix .mapa-input--close:hover{background:#1a1a1a14;color:var(--mapa-color-ink, #1a1a1a)}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix .mapa-input--close:last-child{margin-right:12px}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix .mapa-input--suffix{padding:0 0 0 8px}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix .mat-icon:last-child{padding-right:12px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$2.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: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: NgxMaskDirective, selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "clearIfNotMatch", "validation", "separatorLimit", "allowNegativeNumbers", "leadZeroDateTime", "leadZero", "triggerOnMaskChange", "apm", "inputTransformFn", "outputTransformFn", "keepCharacterPositions", "instantPrefix"], outputs: ["maskFilled"], exportAs: ["mask", "ngxMask"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i1$1.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: "component", type: ButtonComponent, selector: "mapa-button", inputs: ["color", "disabled"], outputs: ["clicked"] }, { kind: "directive", type: MatInputAutosizeDirective, selector: "[matInputAutosize]", inputs: ["matInputAutosizeMaxWidth", "matInputAutosizeMinWidth", "matInputAutosizeFontStyle"] }, { kind: "component", type: MapaFormErrorsComponent, selector: "mapa-form-errors", inputs: ["control", "errors"] }] }); }
628
785
  }
629
786
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaInputComponent, decorators: [{
630
787
  type: Component,
@@ -646,7 +803,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
646
803
  useExisting: forwardRef(() => MapaInputComponent),
647
804
  multi: true,
648
805
  },
649
- ], standalone: true, template: "<label *ngIf=\"element.label\" class=\"mapa-input__label\">\n {{ element.label }}\n</label>\n<div class=\"mapa-form--inline\">\n <mat-form-field\n class=\"mapa-input\"\n appearance=\"outline\"\n subscriptSizing=\"dynamic\"\n >\n <mat-icon *ngIf=\"element.prefix\" class=\"mapa-input--prefix\" matPrefix>\n {{ element.prefix }}\n </mat-icon>\n <input\n *ngIf=\"element.autosize\"\n matInput\n matInputAutosize\n [matInputAutosizeMinWidth]=\"element.autosizeMinWidth!\"\n [matInputAutosizeMaxWidth]=\"element.autosizeMaxWidth!\"\n [formControl]=\"formControl\"\n [placeholder]=\"element.placeholder || element.label\"\n [maxlength]=\"element.maxLength\"\n (keydown.enter)=\"suffixEmit()\"\n [type]=\"type\"\n [mask]=\"element.mask\"\n thousandSeparator=\".\"\n decimalMarker=\",\"\n [autocomplete]=\"element.autocomplete\"\n [readOnly]=\"element.readonly\"\n />\n <input\n matInput\n *ngIf=\"!element.autosize\"\n [formControl]=\"formControl\"\n [placeholder]=\"element.placeholder || element.label\"\n [maxlength]=\"element.maxLength\"\n (keydown.enter)=\"suffixEmit()\"\n [type]=\"type\"\n [mask]=\"element.mask\"\n [autocomplete]=\"element.autocomplete\"\n [readOnly]=\"element.readonly\"\n />\n <mat-icon\n *ngIf=\"hasValue() && !formControl.disabled && element.clearValue\"\n (click)=\"clearValue()\"\n class=\"mapa-input--close\"\n matSuffix\n >close</mat-icon\n >\n <mat-icon\n *ngIf=\"element.suffix\"\n class=\"mapa-input--suffix\"\n matSuffix\n (click)=\"suffix.emit()\"\n >\n {{ element.suffix }}\n </mat-icon>\n <mat-hint *ngIf=\"element.hint\">{{ element.hint }}</mat-hint>\n <mat-error>\n <mapa-form-errors\n [control]=\"formControl\"\n [errors]=\"element.errors\"\n ></mapa-form-errors>\n </mat-error>\n </mat-form-field>\n\n <div *ngIf=\"element.actionButton\" class=\"mapa-form--action\">\n <mapa-button\n color=\"basic\"\n (clicked)=\"element.actionButton.action.emit(true)\"\n >\n {{ element.actionButton.label }}\n </mapa-button>\n </div>\n</div>\n", styles: [".mapa-input__label{font-family:var(--mapa-font-heading, \"Asap\", \"Inter\", sans-serif);display:block;font-size:12px;font-style:normal;font-weight:600;line-height:16px;text-transform:uppercase;margin-bottom:16px}:host ::ng-deep .mapa-input .mat-mdc-form-field-error-wrapper,:host ::ng-deep .mapa-input .mat-mdc-form-field-hint-wrapper,:host ::ng-deep .mapa-input .mat-mdc-form-field-subscript-wrapper{padding:0!important}:host ::ng-deep .mapa-input .mat-mdc-input-element{font-family:var(--mapa-font-body, \"Asap\", \"Roboto\", \"Inter\", sans-serif);font-size:16px;font-style:normal;font-weight:400}:host ::ng-deep .mapa-input .mat-mdc-text-field-wrapper{background-color:#fff;border-radius:8px;height:48px}:host ::ng-deep .mapa-input .mat-mdc-text-field-wrapper.mdc-text-field--outlined{padding-left:unset!important;padding-right:unset!important}:host ::ng-deep .mapa-input .mdc-notched-outline{background-color:transparent;border-radius:8px}:host ::ng-deep .mapa-input .mdc-text-field--outlined .mat-mdc-form-field-infix{padding-bottom:12px;padding-top:16px;--mat-form-field-container-height: 48px}:host ::ng-deep .mapa-input .mdc-text-field--outlined{--mat-form-field-outlined-container-shape: 8px;--mat-form-field-outlined-outline-width: 2px}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix{display:flex}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix .mapa-input--close{padding:unset}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix .mapa-input--suffix{padding:0 0 0 8px}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix .mat-icon:last-child{padding-right:12px}\n"] }]
806
+ ], standalone: true, template: "<label *ngIf=\"element.label\" class=\"mapa-input__label\">\n {{ element.label }}\n</label>\n<div class=\"mapa-form--inline\">\n <mat-form-field\n class=\"mapa-input\"\n [class.mapa-input--autosize]=\"element.autosize\"\n appearance=\"outline\"\n subscriptSizing=\"dynamic\"\n >\n <mat-icon *ngIf=\"element.prefix\" class=\"mapa-input--prefix\" matPrefix>\n {{ element.prefix }}\n </mat-icon>\n <input\n *ngIf=\"element.autosize\"\n matInput\n matInputAutosize\n [matInputAutosizeMinWidth]=\"element.autosizeMinWidth!\"\n [matInputAutosizeMaxWidth]=\"element.autosizeMaxWidth!\"\n [formControl]=\"formControl\"\n [placeholder]=\"element.placeholder || element.label\"\n [maxlength]=\"element.maxLength\"\n (keydown.enter)=\"suffixEmit()\"\n [type]=\"type\"\n [mask]=\"element.mask\"\n thousandSeparator=\".\"\n decimalMarker=\",\"\n [autocomplete]=\"element.autocomplete\"\n [readOnly]=\"element.readonly\"\n />\n <input\n matInput\n *ngIf=\"!element.autosize\"\n [formControl]=\"formControl\"\n [placeholder]=\"element.placeholder || element.label\"\n [maxlength]=\"element.maxLength\"\n (keydown.enter)=\"suffixEmit()\"\n [type]=\"type\"\n [mask]=\"element.mask\"\n [autocomplete]=\"element.autocomplete\"\n [readOnly]=\"element.readonly\"\n />\n <button\n *ngIf=\"hasValue() && !formControl.disabled && element.clearValue\"\n type=\"button\"\n matSuffix\n aria-label=\"Limpar\"\n (click)=\"clearValue()\"\n class=\"mapa-input--close\"\n >\n &times;\n </button>\n <mat-icon\n *ngIf=\"element.suffix\"\n class=\"mapa-input--suffix\"\n matSuffix\n (click)=\"suffix.emit()\"\n >\n {{ element.suffix }}\n </mat-icon>\n <mat-hint *ngIf=\"element.hint\">{{ element.hint }}</mat-hint>\n <mat-error>\n <mapa-form-errors\n [control]=\"formControl\"\n [errors]=\"element.errors\"\n ></mapa-form-errors>\n </mat-error>\n </mat-form-field>\n\n <div *ngIf=\"element.actionButton\" class=\"mapa-form--action\">\n <mapa-button\n color=\"basic\"\n (clicked)=\"element.actionButton.action.emit(true)\"\n >\n {{ element.actionButton.label }}\n </mapa-button>\n </div>\n</div>\n", styles: [".mapa-input{width:310px;min-width:310px;box-sizing:border-box}.mapa-input--autosize{width:auto}.mapa-input__label{font-family:var(--mapa-font-heading, \"Asap\", \"Inter\", sans-serif);display:block;font-size:12px;font-style:normal;font-weight:600;line-height:16px;text-transform:uppercase;margin-bottom:16px}:host ::ng-deep .mapa-input .mat-mdc-form-field-error-wrapper,:host ::ng-deep .mapa-input .mat-mdc-form-field-hint-wrapper,:host ::ng-deep .mapa-input .mat-mdc-form-field-subscript-wrapper{padding:0!important}:host ::ng-deep .mapa-input .mat-mdc-form-field-error{margin:8px 0 0;padding-left:4px;color:#b54242;font-size:13px;line-height:18px}:host ::ng-deep .mapa-input .mat-mdc-form-field-error:before{display:none}:host ::ng-deep .mapa-input .mat-mdc-form-field-hint{display:block;margin:8px 0 0;padding-left:4px;color:var(--mapa-color-muted, #555555);font-size:13px;line-height:18px}:host ::ng-deep .mapa-input .mat-mdc-form-field-hint:before{display:none}:host ::ng-deep .mapa-input .mat-mdc-input-element{font-family:var(--mapa-font-body, \"Asap\", \"Roboto\", \"Inter\", sans-serif);font-size:16px;font-style:normal;font-weight:400}:host ::ng-deep .mapa-input .mat-mdc-form-field-flex{height:48px!important}:host ::ng-deep .mapa-input .mat-mdc-text-field-wrapper{background-color:var(--mapa-color-surface, #ffffff);border-radius:var(--mapa-radius-sm, 12px);height:48px}:host ::ng-deep .mapa-input .mat-mdc-text-field-wrapper.mdc-text-field--outlined{padding-left:unset!important;padding-right:unset!important}:host ::ng-deep .mapa-input .mdc-notched-outline{background-color:transparent;border-radius:var(--mapa-radius-sm, 12px)}:host ::ng-deep .mapa-input .mdc-text-field--outlined .mat-mdc-form-field-infix{padding-bottom:12px;padding-top:16px;--mat-form-field-container-height: 48px}:host ::ng-deep .mapa-input .mdc-text-field--outlined{--mat-form-field-outlined-container-shape: var(--mapa-radius-sm, 12px);--mat-form-field-outlined-outline-color: var( --mapa-color-border, rgba(26, 26, 26, .18) );--mat-form-field-outlined-hover-outline-color: var( --mapa-color-border, rgba(26, 26, 26, .18) );--mat-form-field-outlined-focus-outline-color: var( --mapa-color-accent, #ff560b );--mat-form-field-outlined-outline-width: 1px;--mat-form-field-outlined-focus-outline-width: 1px}:host ::ng-deep .mapa-input .mdc-notched-outline__leading,:host ::ng-deep .mapa-input .mdc-notched-outline__notch,:host ::ng-deep .mapa-input .mdc-notched-outline__trailing{border-width:1px!important}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix{display:flex}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix .mapa-input--close{display:flex;flex:0 0 20px;align-items:center;justify-content:center;width:20px;height:20px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--mapa-color-muted, #555555);font-family:inherit;font-size:16px;line-height:1;cursor:pointer}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix .mapa-input--close:hover{background:#1a1a1a14;color:var(--mapa-color-ink, #1a1a1a)}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix .mapa-input--close:last-child{margin-right:12px}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix .mapa-input--suffix{padding:0 0 0 8px}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix .mat-icon:last-child{padding-right:12px}\n"] }]
650
807
  }], propDecorators: { formControl: [{
651
808
  type: Input
652
809
  }], element: [{
@@ -685,7 +842,7 @@ class FiltersComponent {
685
842
  this.selectedValues.emit(this.form.getRawValue());
686
843
  }
687
844
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: FiltersComponent, deps: [{ token: MapaI18nService }], target: i0.ɵɵFactoryTarget.Component }); }
688
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.21", type: FiltersComponent, isStandalone: true, selector: "mapa-filters", inputs: { form: "form", elements: "elements" }, outputs: { selectedValues: "selectedValues" }, ngImport: i0, template: "<div class=\"filter\">\n <div *ngFor=\"let filter of elements\">\n <div *ngIf=\"filter.controlType === 'checkbox'\" class=\"filter__item--resizable\">\n <mapa-checkbox [formControl]=\"getFormControl(filter.key)\"></mapa-checkbox>\n </div>\n <div *ngIf=\"filter.controlType === 'dropdown'\" class=\"filter__item--resizable\">\n <mapa-dropdown\n [formControl]=\"getFormControl(filter.key)\"\n [element]=\"filter\"\n ></mapa-dropdown>\n </div>\n <div *ngIf=\"filter.controlType === 'input'\" class=\"filter__item\">\n <mapa-input\n [formControl]=\"getFormControl(filter.key)\"\n [element]=\"filter\"\n ></mapa-input>\n </div>\n </div>\n <div class=\"filter__item\">\n <mapa-button [color]=\"'basic'\" (clicked)=\"clearFilters()\">\n {{ clearFiltersLabel }}\n </mapa-button>\n <mapa-button\n [color]=\"'primary'\"\n [disabled]=\"!!form.invalid\"\n (clicked)=\"emitSelectedValues()\"\n >\n {{ submitFiltersLabel }}\n </mapa-button>\n </div>\n</div>\n\n", styles: [".filter{display:flex;align-items:flex-end;flex-wrap:wrap;background-color:#f6f7f7;padding:32px;width:100%;gap:30px}.filter__item,.filter__item--resizable{display:flex;align-items:flex-end}.filter .mapa-dropdown{max-width:none;min-width:10vw}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: ButtonComponent, selector: "mapa-button", inputs: ["color", "disabled"], outputs: ["clicked"] }, { kind: "component", type: CheckboxComponent, selector: "mapa-checkbox", inputs: ["color", "formControl"] }, { kind: "component", type: MapaDropdownComponent, selector: "mapa-dropdown", inputs: ["formControl", "formControlSearch", "element", "border"], outputs: ["openedChange"] }, { kind: "component", type: MapaInputComponent, selector: "mapa-input", inputs: ["formControl", "element", "type"], outputs: ["suffix"] }] }); }
845
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.21", type: FiltersComponent, isStandalone: true, selector: "mapa-filters", inputs: { form: "form", elements: "elements" }, outputs: { selectedValues: "selectedValues" }, ngImport: i0, template: "<div class=\"filter\">\n <div *ngFor=\"let filter of elements\">\n <div *ngIf=\"filter.controlType === 'checkbox'\" class=\"filter__item--resizable\">\n <mapa-checkbox [formControl]=\"getFormControl(filter.key)\"></mapa-checkbox>\n </div>\n <div *ngIf=\"filter.controlType === 'dropdown'\" class=\"filter__item--resizable\">\n <mapa-dropdown\n [formControl]=\"getFormControl(filter.key)\"\n [element]=\"filter\"\n ></mapa-dropdown>\n </div>\n <div *ngIf=\"filter.controlType === 'input'\" class=\"filter__item\">\n <mapa-input\n [formControl]=\"getFormControl(filter.key)\"\n [element]=\"filter\"\n ></mapa-input>\n </div>\n </div>\n <div class=\"filter__item\">\n <mapa-button [color]=\"'basic'\" (clicked)=\"clearFilters()\">\n {{ clearFiltersLabel }}\n </mapa-button>\n <mapa-button\n [color]=\"'primary'\"\n [disabled]=\"!!form.invalid\"\n (clicked)=\"emitSelectedValues()\"\n >\n {{ submitFiltersLabel }}\n </mapa-button>\n </div>\n</div>\n\n", styles: [".filter{display:flex;align-items:flex-end;flex-wrap:wrap;background-color:#f6f7f7;padding:32px;width:100%;gap:30px}.filter__item,.filter__item--resizable{display:flex;align-items:flex-end}.filter mapa-dropdown{display:block;max-width:none;min-width:10vw}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: ButtonComponent, selector: "mapa-button", inputs: ["color", "disabled"], outputs: ["clicked"] }, { kind: "component", type: CheckboxComponent, selector: "mapa-checkbox", inputs: ["color", "formControl"] }, { kind: "component", type: MapaDropdownComponent, selector: "mapa-dropdown", inputs: ["element", "formControl", "formControlSearch", "border"], outputs: ["openedChange"] }, { kind: "component", type: MapaInputComponent, selector: "mapa-input", inputs: ["formControl", "element", "type"], outputs: ["suffix"] }] }); }
689
846
  }
690
847
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: FiltersComponent, decorators: [{
691
848
  type: Component,
@@ -696,7 +853,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
696
853
  CheckboxComponent,
697
854
  MapaDropdownComponent,
698
855
  MapaInputComponent,
699
- ], standalone: true, template: "<div class=\"filter\">\n <div *ngFor=\"let filter of elements\">\n <div *ngIf=\"filter.controlType === 'checkbox'\" class=\"filter__item--resizable\">\n <mapa-checkbox [formControl]=\"getFormControl(filter.key)\"></mapa-checkbox>\n </div>\n <div *ngIf=\"filter.controlType === 'dropdown'\" class=\"filter__item--resizable\">\n <mapa-dropdown\n [formControl]=\"getFormControl(filter.key)\"\n [element]=\"filter\"\n ></mapa-dropdown>\n </div>\n <div *ngIf=\"filter.controlType === 'input'\" class=\"filter__item\">\n <mapa-input\n [formControl]=\"getFormControl(filter.key)\"\n [element]=\"filter\"\n ></mapa-input>\n </div>\n </div>\n <div class=\"filter__item\">\n <mapa-button [color]=\"'basic'\" (clicked)=\"clearFilters()\">\n {{ clearFiltersLabel }}\n </mapa-button>\n <mapa-button\n [color]=\"'primary'\"\n [disabled]=\"!!form.invalid\"\n (clicked)=\"emitSelectedValues()\"\n >\n {{ submitFiltersLabel }}\n </mapa-button>\n </div>\n</div>\n\n", styles: [".filter{display:flex;align-items:flex-end;flex-wrap:wrap;background-color:#f6f7f7;padding:32px;width:100%;gap:30px}.filter__item,.filter__item--resizable{display:flex;align-items:flex-end}.filter .mapa-dropdown{max-width:none;min-width:10vw}\n"] }]
856
+ ], standalone: true, template: "<div class=\"filter\">\n <div *ngFor=\"let filter of elements\">\n <div *ngIf=\"filter.controlType === 'checkbox'\" class=\"filter__item--resizable\">\n <mapa-checkbox [formControl]=\"getFormControl(filter.key)\"></mapa-checkbox>\n </div>\n <div *ngIf=\"filter.controlType === 'dropdown'\" class=\"filter__item--resizable\">\n <mapa-dropdown\n [formControl]=\"getFormControl(filter.key)\"\n [element]=\"filter\"\n ></mapa-dropdown>\n </div>\n <div *ngIf=\"filter.controlType === 'input'\" class=\"filter__item\">\n <mapa-input\n [formControl]=\"getFormControl(filter.key)\"\n [element]=\"filter\"\n ></mapa-input>\n </div>\n </div>\n <div class=\"filter__item\">\n <mapa-button [color]=\"'basic'\" (clicked)=\"clearFilters()\">\n {{ clearFiltersLabel }}\n </mapa-button>\n <mapa-button\n [color]=\"'primary'\"\n [disabled]=\"!!form.invalid\"\n (clicked)=\"emitSelectedValues()\"\n >\n {{ submitFiltersLabel }}\n </mapa-button>\n </div>\n</div>\n\n", styles: [".filter{display:flex;align-items:flex-end;flex-wrap:wrap;background-color:#f6f7f7;padding:32px;width:100%;gap:30px}.filter__item,.filter__item--resizable{display:flex;align-items:flex-end}.filter mapa-dropdown{display:block;max-width:none;min-width:10vw}\n"] }]
700
857
  }], ctorParameters: () => [{ type: MapaI18nService }], propDecorators: { form: [{
701
858
  type: Input
702
859
  }], elements: [{