mapa-library-ui 0.71.1 → 0.72.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 (137) hide show
  1. package/esm2020/lib/core/interfaces/element-option.interface.mjs +1 -1
  2. package/esm2020/src/lib/components/capability/lib/components/dropdown/src/dropdown.component.mjs +20 -10
  3. package/esm2020/src/lib/components/capability/lib/components/dropdown/src/dropdown.module.mjs +5 -1
  4. package/esm2020/src/lib/components/capability/lib/core/interfaces/element-option.interface.mjs +1 -1
  5. package/esm2020/src/lib/components/chart/lib/components/dropdown/src/dropdown.component.mjs +20 -10
  6. package/esm2020/src/lib/components/chart/lib/components/dropdown/src/dropdown.module.mjs +5 -1
  7. package/esm2020/src/lib/components/chart/lib/core/interfaces/element-option.interface.mjs +1 -1
  8. package/esm2020/src/lib/components/dropdown/lib/components/dropdown/src/dropdown.component.mjs +20 -10
  9. package/esm2020/src/lib/components/dropdown/lib/components/dropdown/src/dropdown.module.mjs +5 -1
  10. package/esm2020/src/lib/components/dropdown/lib/components/dropdown-tree/src/dropdown.component.mjs +38 -263
  11. package/esm2020/src/lib/components/dropdown/lib/components/dropdown-tree/src/dropdown.module.mjs +5 -1
  12. package/esm2020/src/lib/components/dropdown/lib/core/elements/index.mjs +10 -0
  13. package/esm2020/src/lib/components/dropdown/lib/core/elements/input-text.mjs +8 -0
  14. package/esm2020/src/lib/components/dropdown/lib/core/elements/radio-button.mjs +8 -0
  15. package/esm2020/src/lib/components/dropdown/lib/core/elements/slide-toggle.mjs +8 -0
  16. package/esm2020/src/lib/components/dropdown/lib/core/elements/textarea.mjs +8 -0
  17. package/esm2020/src/lib/components/dropdown/lib/core/interfaces/button-icon.interface.mjs +2 -0
  18. package/esm2020/src/lib/components/dropdown/lib/core/interfaces/chart-options.interface.mjs +2 -0
  19. package/esm2020/src/lib/components/dropdown/lib/core/interfaces/classification.interface.mjs +2 -0
  20. package/esm2020/src/lib/components/dropdown/lib/core/interfaces/dialog-data.interface.mjs +2 -0
  21. package/esm2020/src/lib/components/dropdown/lib/core/interfaces/element-option.interface.mjs +1 -1
  22. package/esm2020/src/lib/components/dropdown/lib/core/interfaces/index.mjs +7 -0
  23. package/esm2020/src/lib/components/dropdown/lib/core/interfaces/table-column.interface.mjs +2 -0
  24. package/esm2020/src/lib/components/dropdown/lib/core/interfaces/table-row-click-event.interface.mjs +2 -0
  25. package/esm2020/src/lib/components/dropdown-tree/lib/components/dropdown/src/dropdown.component.mjs +20 -10
  26. package/esm2020/src/lib/components/dropdown-tree/lib/components/dropdown/src/dropdown.module.mjs +5 -1
  27. package/esm2020/src/lib/components/dropdown-tree/lib/components/dropdown-tree/src/dropdown.component.mjs +38 -263
  28. package/esm2020/src/lib/components/dropdown-tree/lib/components/dropdown-tree/src/dropdown.module.mjs +5 -1
  29. package/esm2020/src/lib/components/dropdown-tree/lib/core/elements/index.mjs +10 -0
  30. package/esm2020/src/lib/components/dropdown-tree/lib/core/elements/input-text.mjs +8 -0
  31. package/esm2020/src/lib/components/dropdown-tree/lib/core/elements/radio-button.mjs +8 -0
  32. package/esm2020/src/lib/components/dropdown-tree/lib/core/elements/slide-toggle.mjs +8 -0
  33. package/esm2020/src/lib/components/dropdown-tree/lib/core/elements/textarea.mjs +8 -0
  34. package/esm2020/src/lib/components/dropdown-tree/lib/core/interfaces/button-icon.interface.mjs +2 -0
  35. package/esm2020/src/lib/components/dropdown-tree/lib/core/interfaces/chart-options.interface.mjs +2 -0
  36. package/esm2020/src/lib/components/dropdown-tree/lib/core/interfaces/classification.interface.mjs +2 -0
  37. package/esm2020/src/lib/components/dropdown-tree/lib/core/interfaces/dialog-data.interface.mjs +2 -0
  38. package/esm2020/src/lib/components/dropdown-tree/lib/core/interfaces/element-option.interface.mjs +1 -1
  39. package/esm2020/src/lib/components/dropdown-tree/lib/core/interfaces/index.mjs +7 -0
  40. package/esm2020/src/lib/components/dropdown-tree/lib/core/interfaces/table-column.interface.mjs +2 -0
  41. package/esm2020/src/lib/components/dropdown-tree/lib/core/interfaces/table-row-click-event.interface.mjs +2 -0
  42. package/esm2020/src/lib/components/form/lib/core/interfaces/element-option.interface.mjs +1 -1
  43. package/esm2020/src/lib/components/group-report/lib/components/dropdown/src/dropdown.component.mjs +20 -10
  44. package/esm2020/src/lib/components/group-report/lib/components/dropdown/src/dropdown.module.mjs +5 -1
  45. package/esm2020/src/lib/components/group-report/lib/core/interfaces/element-option.interface.mjs +1 -1
  46. package/esm2020/src/lib/components/nav-list/lib/core/interfaces/element-option.interface.mjs +1 -1
  47. package/esm2020/src/lib/components/radio-button/lib/core/interfaces/element-option.interface.mjs +1 -1
  48. package/esm2020/src/lib/components/scale/lib/components/dropdown/src/dropdown.component.mjs +20 -10
  49. package/esm2020/src/lib/components/scale/lib/components/dropdown/src/dropdown.module.mjs +5 -1
  50. package/esm2020/src/lib/components/scale/lib/core/interfaces/element-option.interface.mjs +1 -1
  51. package/esm2020/src/lib/components/scale-parameterization/lib/components/dropdown/src/dropdown.component.mjs +20 -10
  52. package/esm2020/src/lib/components/scale-parameterization/lib/components/dropdown/src/dropdown.module.mjs +5 -1
  53. package/esm2020/src/lib/components/scale-parameterization/lib/core/interfaces/element-option.interface.mjs +1 -1
  54. package/esm2020/src/lib/components/slide-toggle/lib/core/interfaces/element-option.interface.mjs +1 -1
  55. package/esm2020/src/lib/components/textarea/lib/core/interfaces/element-option.interface.mjs +1 -1
  56. package/fesm2015/mapa-library-ui-src-lib-components-capability.mjs +25 -10
  57. package/fesm2015/mapa-library-ui-src-lib-components-capability.mjs.map +1 -1
  58. package/fesm2015/mapa-library-ui-src-lib-components-chart.mjs +23 -8
  59. package/fesm2015/mapa-library-ui-src-lib-components-chart.mjs.map +1 -1
  60. package/fesm2015/mapa-library-ui-src-lib-components-dropdown-tree.mjs +62 -334
  61. package/fesm2015/mapa-library-ui-src-lib-components-dropdown-tree.mjs.map +1 -1
  62. package/fesm2015/mapa-library-ui-src-lib-components-dropdown.mjs +62 -334
  63. package/fesm2015/mapa-library-ui-src-lib-components-dropdown.mjs.map +1 -1
  64. package/fesm2015/mapa-library-ui-src-lib-components-scale-parameterization.mjs +25 -10
  65. package/fesm2015/mapa-library-ui-src-lib-components-scale-parameterization.mjs.map +1 -1
  66. package/fesm2020/mapa-library-ui-src-lib-components-capability.mjs +24 -10
  67. package/fesm2020/mapa-library-ui-src-lib-components-capability.mjs.map +1 -1
  68. package/fesm2020/mapa-library-ui-src-lib-components-chart.mjs +22 -8
  69. package/fesm2020/mapa-library-ui-src-lib-components-chart.mjs.map +1 -1
  70. package/fesm2020/mapa-library-ui-src-lib-components-dropdown-tree.mjs +63 -323
  71. package/fesm2020/mapa-library-ui-src-lib-components-dropdown-tree.mjs.map +1 -1
  72. package/fesm2020/mapa-library-ui-src-lib-components-dropdown.mjs +63 -323
  73. package/fesm2020/mapa-library-ui-src-lib-components-dropdown.mjs.map +1 -1
  74. package/fesm2020/mapa-library-ui-src-lib-components-scale-parameterization.mjs +24 -10
  75. package/fesm2020/mapa-library-ui-src-lib-components-scale-parameterization.mjs.map +1 -1
  76. package/lib/core/interfaces/element-option.interface.d.ts +1 -0
  77. package/mapa-library-ui-0.72.0.tgz +0 -0
  78. package/package.json +1 -1
  79. package/src/lib/components/capability/lib/components/dropdown/src/dropdown.component.d.ts +3 -1
  80. package/src/lib/components/capability/lib/components/dropdown/src/dropdown.module.d.ts +7 -6
  81. package/src/lib/components/capability/lib/core/interfaces/element-option.interface.d.ts +1 -0
  82. package/src/lib/components/chart/lib/components/dropdown/src/dropdown.component.d.ts +3 -1
  83. package/src/lib/components/chart/lib/components/dropdown/src/dropdown.module.d.ts +7 -6
  84. package/src/lib/components/chart/lib/core/interfaces/element-option.interface.d.ts +1 -0
  85. package/src/lib/components/dropdown/lib/components/dropdown/src/dropdown.component.d.ts +3 -1
  86. package/src/lib/components/dropdown/lib/components/dropdown/src/dropdown.module.d.ts +7 -6
  87. package/src/lib/components/dropdown/lib/components/dropdown-tree/src/dropdown.component.d.ts +8 -67
  88. package/src/lib/components/dropdown/lib/components/dropdown-tree/src/dropdown.module.d.ts +10 -9
  89. package/src/lib/components/dropdown/lib/core/elements/index.d.ts +9 -0
  90. package/src/lib/components/dropdown/lib/core/elements/input-text.d.ts +4 -0
  91. package/src/lib/components/dropdown/lib/core/elements/radio-button.d.ts +4 -0
  92. package/src/lib/components/dropdown/lib/core/elements/slide-toggle.d.ts +4 -0
  93. package/src/lib/components/dropdown/lib/core/elements/textarea.d.ts +4 -0
  94. package/src/lib/components/dropdown/lib/core/interfaces/button-icon.interface.d.ts +6 -0
  95. package/src/lib/components/dropdown/lib/core/interfaces/chart-options.interface.d.ts +19 -0
  96. package/src/lib/components/dropdown/lib/core/interfaces/classification.interface.d.ts +6 -0
  97. package/src/lib/components/dropdown/lib/core/interfaces/dialog-data.interface.d.ts +11 -0
  98. package/src/lib/components/dropdown/lib/core/interfaces/element-option.interface.d.ts +1 -0
  99. package/src/lib/components/dropdown/lib/core/interfaces/index.d.ts +6 -0
  100. package/src/lib/components/dropdown/lib/core/interfaces/table-column.interface.d.ts +19 -0
  101. package/src/lib/components/dropdown/lib/core/interfaces/table-row-click-event.interface.d.ts +4 -0
  102. package/src/lib/components/dropdown-tree/lib/components/dropdown/src/dropdown.component.d.ts +3 -1
  103. package/src/lib/components/dropdown-tree/lib/components/dropdown/src/dropdown.module.d.ts +7 -6
  104. package/src/lib/components/dropdown-tree/lib/components/dropdown-tree/src/dropdown.component.d.ts +8 -67
  105. package/src/lib/components/dropdown-tree/lib/components/dropdown-tree/src/dropdown.module.d.ts +10 -9
  106. package/src/lib/components/dropdown-tree/lib/core/elements/index.d.ts +9 -0
  107. package/src/lib/components/dropdown-tree/lib/core/elements/input-text.d.ts +4 -0
  108. package/src/lib/components/dropdown-tree/lib/core/elements/radio-button.d.ts +4 -0
  109. package/src/lib/components/dropdown-tree/lib/core/elements/slide-toggle.d.ts +4 -0
  110. package/src/lib/components/dropdown-tree/lib/core/elements/textarea.d.ts +4 -0
  111. package/src/lib/components/dropdown-tree/lib/core/interfaces/button-icon.interface.d.ts +6 -0
  112. package/src/lib/components/dropdown-tree/lib/core/interfaces/chart-options.interface.d.ts +19 -0
  113. package/src/lib/components/dropdown-tree/lib/core/interfaces/classification.interface.d.ts +6 -0
  114. package/src/lib/components/dropdown-tree/lib/core/interfaces/dialog-data.interface.d.ts +11 -0
  115. package/src/lib/components/dropdown-tree/lib/core/interfaces/element-option.interface.d.ts +1 -0
  116. package/src/lib/components/dropdown-tree/lib/core/interfaces/index.d.ts +6 -0
  117. package/src/lib/components/dropdown-tree/lib/core/interfaces/table-column.interface.d.ts +19 -0
  118. package/src/lib/components/dropdown-tree/lib/core/interfaces/table-row-click-event.interface.d.ts +4 -0
  119. package/src/lib/components/form/lib/core/interfaces/element-option.interface.d.ts +1 -0
  120. package/src/lib/components/group-report/lib/components/dropdown/src/dropdown.component.d.ts +3 -1
  121. package/src/lib/components/group-report/lib/components/dropdown/src/dropdown.module.d.ts +7 -6
  122. package/src/lib/components/group-report/lib/core/interfaces/element-option.interface.d.ts +1 -0
  123. package/src/lib/components/nav-list/lib/core/interfaces/element-option.interface.d.ts +1 -0
  124. package/src/lib/components/radio-button/lib/core/interfaces/element-option.interface.d.ts +1 -0
  125. package/src/lib/components/scale/lib/components/dropdown/src/dropdown.component.d.ts +3 -1
  126. package/src/lib/components/scale/lib/components/dropdown/src/dropdown.module.d.ts +7 -6
  127. package/src/lib/components/scale/lib/core/interfaces/element-option.interface.d.ts +1 -0
  128. package/src/lib/components/scale-parameterization/lib/components/dropdown/src/dropdown.component.d.ts +3 -1
  129. package/src/lib/components/scale-parameterization/lib/components/dropdown/src/dropdown.module.d.ts +7 -6
  130. package/src/lib/components/scale-parameterization/lib/core/interfaces/element-option.interface.d.ts +1 -0
  131. package/src/lib/components/slide-toggle/lib/core/interfaces/element-option.interface.d.ts +1 -0
  132. package/src/lib/components/textarea/lib/core/interfaces/element-option.interface.d.ts +1 -0
  133. package/esm2020/src/lib/components/dropdown/lib/components/dropdown-tree/src/checklist-database.mjs +0 -58
  134. package/esm2020/src/lib/components/dropdown-tree/lib/components/dropdown-tree/src/checklist-database.mjs +0 -58
  135. package/mapa-library-ui-0.71.1.tgz +0 -0
  136. package/src/lib/components/dropdown/lib/components/dropdown-tree/src/checklist-database.d.ts +0 -13
  137. package/src/lib/components/dropdown-tree/lib/components/dropdown-tree/src/checklist-database.d.ts +0 -13
@@ -1,35 +1,28 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, Component, Input, Output, ViewEncapsulation, ViewChild, NgModule, Injectable } from '@angular/core';
2
+ import { EventEmitter, Component, Input, Output, ViewEncapsulation, ViewChild, NgModule } from '@angular/core';
3
3
  import { ReplaySubject } from 'rxjs/internal/ReplaySubject';
4
4
  import { Subject } from 'rxjs/internal/Subject';
5
5
  import * as i1 from '@angular/common';
6
6
  import { CommonModule } from '@angular/common';
7
- import * as i3 from '@angular/forms';
8
- import { FormsModule, ReactiveFormsModule, FormControl } from '@angular/forms';
9
- import * as i4 from '@angular/material/icon';
7
+ import * as i2 from '@angular/forms';
8
+ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
9
+ import * as i3 from '@angular/material/checkbox';
10
+ import { MatCheckboxModule } from '@angular/material/checkbox';
11
+ import * as i5 from '@angular/material/icon';
10
12
  import { MatIconModule } from '@angular/material/icon';
11
- import * as i5 from '@angular/material/form-field';
13
+ import * as i6 from '@angular/material/form-field';
12
14
  import { MAT_FORM_FIELD_DEFAULT_OPTIONS } from '@angular/material/form-field';
13
- import * as i6 from '@angular/material/select';
15
+ import * as i7 from '@angular/material/select';
14
16
  import { MatSelectModule, MAT_SELECT_CONFIG } from '@angular/material/select';
15
- import * as i7 from '@angular/material/core';
16
- import * as i8 from 'ngx-mat-select-search';
17
+ import * as i8 from '@angular/material/core';
18
+ import * as i9 from 'ngx-mat-select-search';
17
19
  import { NgxMatSelectSearchModule } from 'ngx-mat-select-search';
18
20
  import { MatListModule } from '@angular/material/list';
19
- import * as i4$1 from '@angular/material/button';
20
21
  import { MatButtonModule } from '@angular/material/button';
21
- import { SelectionModel } from '@angular/cdk/collections';
22
- import { FlatTreeControl } from '@angular/cdk/tree';
23
- import * as i8$1 from '@angular/material/tree';
24
- import { MatTreeFlattener, MatTreeFlatDataSource, MatTreeModule } from '@angular/material/tree';
25
- import * as i10 from '@angular/material/menu';
26
- import { MatMenuTrigger, MatMenuModule, MAT_MENU_DEFAULT_OPTIONS } from '@angular/material/menu';
27
- import { BehaviorSubject } from 'rxjs';
28
- import * as i7$1 from '@angular/material/input';
29
22
  import { MatInputModule } from '@angular/material/input';
30
- import * as i9 from '@angular/material/checkbox';
31
- import { MatCheckboxModule } from '@angular/material/checkbox';
23
+ import { MatTreeModule } from '@angular/material/tree';
32
24
  import { MatAutocompleteModule } from '@angular/material/autocomplete';
25
+ import { MatMenuModule, MAT_MENU_DEFAULT_OPTIONS } from '@angular/material/menu';
33
26
 
34
27
  class ElementBase {
35
28
  constructor(options = {}) {
@@ -195,7 +188,8 @@ class MapaDropdownComponent {
195
188
  filteredLength === this.filteredOptionsCache.length;
196
189
  }
197
190
  }
198
- toggleSelectAll(selectAllValue) {
191
+ toggleSelectAll(event) {
192
+ const selectAllValue = event.checked;
199
193
  this.filteredOptions.subscribe((options) => {
200
194
  if (selectAllValue) {
201
195
  this.formControl?.patchValue(options);
@@ -213,6 +207,14 @@ class MapaDropdownComponent {
213
207
  }
214
208
  });
215
209
  }
210
+ toggleSelection(change) {
211
+ if (change.checked) {
212
+ this.formControl?.setValue(this.filteredOptions);
213
+ }
214
+ else {
215
+ this.formControl?.setValue([]);
216
+ }
217
+ }
216
218
  isElementGroup(object) {
217
219
  try {
218
220
  return (object.label !== undefined &&
@@ -234,10 +236,10 @@ class MapaDropdownComponent {
234
236
  }
235
237
  }
236
238
  MapaDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapaDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
237
- MapaDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: MapaDropdownComponent, selector: "mapa-dropdown", inputs: { formControl: "formControl", formControlSearch: "formControlSearch", element: "element", border: "border" }, viewQueries: [{ propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"element\">\n <label *ngIf=\"element.label\" class=\"mapa-dropdown__label\">\n {{ element.label }}\n </label>\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 >\n <mat-option *ngIf=\"element.search\" class=\"mapa-dropdown__search\">\n <ngx-mat-select-search\n *ngIf=\"element.search.formControl\"\n [showToggleAllCheckbox]=\"element.search.toggleAllCheckbox!\"\n [formControl]=\"element.search.formControl\"\n [placeholderLabel]=\"element.search.placeholder || ''\"\n i18n-placeholderLabel\n [noEntriesFoundLabel]=\"element.search.noEntriesFoundLabel || ''\"\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate\"\n [toggleAllCheckboxChecked]=\"isChecked\"\n (toggleAll)=\"toggleSelectAll($event)\"\n ></ngx-mat-select-search>\n </mat-option>\n\n <ng-container *ngIf=\"isOptionsGroup; else isElementOptions\">\n <mat-optgroup\n *ngFor=\"let group of filteredGroups | async\"\n [label]=\"group.label\"\n >\n <mat-option *ngFor=\"let option of group.options\" [value]=\"option\">\n {{ option.value }}\n </mat-option>\n </mat-optgroup>\n </ng-container>\n <ng-template #isElementOptions>\n <mat-option\n *ngFor=\"let option of filteredOptions | async\"\n [value]=\"option\"\n >\n {{ option.value }}\n </mat-option>\n </ng-template>\n \n <mat-option\n *ngFor=\"let option of selectedOptions\"\n hidden\n [value]=\"option\"\n >\n {{ option.value }}\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"element.hint\">{{ element.hint }}</mat-hint>\n <mat-error *ngIf=\"formControl?.hasError('required')\">\n {{ element.errors?.required }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('minlength')\">\n {{ element.errors?.minlength }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('cpf')\">\n {{ element.errors?.cpf }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('cnpj')\">\n {{ element.errors?.cnpj }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('email')\">\n {{ element.errors?.email }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('pattern')\">\n {{ element.errors?.pattern }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('min')\">\n {{ element.errors?.min }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('max')\">\n {{ element.errors?.max }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('minLength')\">\n {{ element.errors?.minLength }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('maxLength')\">\n {{ element.errors?.maxLength }}\n </mat-error>\n <mat-icon\n *ngIf=\"hasValue() && !formControl.disabled && element.clearValue\"\n (click)=\"clearValue($event)\"\n class=\"mapa-input--close\"\n >close</mat-icon\n >\n </mat-form-field>\n <div *ngIf=\"element.actionButton\" 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 </div>\n</div>\n", styles: [".mapa-dropdown{max-width:min-content;min-width:235px}.mapa-dropdown .mat-select{font-family:Inter,sans-serif!important}.mapa-dropdown .mat-icon{display:flex;justify-content:center;align-items:center;position:absolute;right:32px;top:4px}.mapa-dropdown__label{display:block;font-size:12px;font-style:normal;font-weight:600;line-height:16px;text-transform:uppercase;margin-bottom:16px}.mapa-dropdown--highlight .mat-form-field-outline{border-radius:16px!important}.mapa-dropdown--highlight .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown--highlight .mat-form-field-outline .mat-form-field-outline-end{border-width:2px!important;border-color:#eedb2a!important}.mapa-dropdown--highlight .mat-form-field-outline .mat-form-field-outline-start{display:none!important}.mapa-dropdown--highlight .mat-form-field-outline .mat-form-field-outline-end{border-radius:16px!important;border-left-style:solid!important}.mapa-dropdown--soft-border .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown--soft-border .mat-form-field-outline .mat-form-field-outline-end{border-width:1px!important}.mapa-dropdown--tag .mat-form-field-outline{border-radius:16px!important;height:42px!important}.mapa-dropdown--tag .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown--tag .mat-form-field-outline .mat-form-field-outline-end{border-width:1px!important;border-color:#cdcdcd}.mapa-dropdown--tag .mat-form-field-outline .mat-form-field-outline-start{display:none!important}.mapa-dropdown--tag .mat-form-field-outline .mat-form-field-outline-end{border-radius:16px!important;border-left-style:solid!important}.mapa-dropdown .mat-form-field-outline{background-color:#fff;border-radius:8px}.mapa-dropdown .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown .mat-form-field-outline .mat-form-field-outline-end{border-width:2px}.mapa-dropdown .mat-form-field-flex{display:flex;align-items:center;height:48px}.mapa-dropdown .mat-form-field-infix{border-top:unset!important;padding:unset!important;position:relative}.mapa-dropdown .mat-select-trigger{min-width:50px;padding-top:.3em;height:unset!important}.mapa-dropdown .mat-select-value-text{display:block;width:90%}.mapa-dropdown .mat-select-arrow-wrapper{transform:none!important}.mapa-dropdown .mat-select-arrow{border:unset}.mapa-dropdown .mat-select-arrow:before,.mapa-dropdown .mat-select-arrow:after{content:\"\";display:block;margin-top:-4px;position:absolute;right:10px;top:50%;width:0;border:solid black;border-width:0 2px 2px 0;padding:3px;transform:rotate(45deg);-webkit-transform:rotate(45deg)}.mapa-dropdown .mat-form-field-subscript-wrapper{padding:0!important}.mapa-dropdown [aria-expanded=true] .mat-select-arrow{margin:6px 0 0}.mapa-dropdown [aria-expanded=true] .mat-select-arrow:before,.mapa-dropdown [aria-expanded=true] .mat-select-arrow:after{transform:rotate(-135deg)!important;-webkit-transform:rotate(-135deg)!important}.mapa-overlay-dropdown{transform:translate(-16px) translateY(36px)!important}.mapa-overlay-dropdown .mat-select-panel{border-radius:8px;min-width:calc(100% + 24px)!important}.mapa-overlay-dropdown .mat-select-panel .mat-option,.mapa-overlay-dropdown .mat-select-panel .mat-option-text{font-family:Inter,sans-serif!important;font-size:16px;font-style:normal;font-weight:400;line-height:2em;height:2em;color:#50575e}.mapa-overlay-dropdown .mat-select-panel .mat-option[aria-disabled=true].contains-mat-select-search{height:48px}.mapa-overlay-dropdown .mat-select-panel .mat-select-search-inside-mat-option .mat-select-search-input{background-color:#fff;border:2px solid #a7aaad;border-radius:6px;margin:8px;height:2.3em!important;line-height:2.3em!important;width:96%}.mapa-overlay-dropdown .mat-select-panel .mat-select-search-input{padding:8px 53px 8px 8px!important}.mapa-overlay-dropdown .mat-select-panel .mat-select-search-inner{background-color:#f6f7f7}.mapa-overlay-dropdown .mat-pseudo-checkbox{color:#c3c4c7!important}.mapa-overlay-dropdown .mat-checkbox-frame{border-color:#c3c4c7!important}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.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: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i5.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "component", type: i6.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i7.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i7.MatOptgroup, selector: "mat-optgroup", inputs: ["disabled"], exportAs: ["matOptgroup"] }, { 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"], outputs: ["toggleAll"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], encapsulation: i0.ViewEncapsulation.None });
239
+ MapaDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: MapaDropdownComponent, selector: "mapa-dropdown", inputs: { formControl: "formControl", formControlSearch: "formControlSearch", element: "element", border: "border" }, viewQueries: [{ propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"element\">\n <label *ngIf=\"element.label\" class=\"mapa-dropdown__label\">\n {{ element.label }}\n </label>\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 >\n <mat-option *ngIf=\"element.search\" class=\"mapa-dropdown__search\">\n <ngx-mat-select-search\n *ngIf=\"element.search.formControl\"\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 </mat-option>\n <mat-option\n *ngIf=\"element.multiple\"\n class=\"mapa-dropdown__option--select-all\"\n >\n <mat-checkbox\n class=\"mat-option\"\n [indeterminate]=\"isIndeterminate\"\n [checked]=\"isChecked\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"toggleSelectAll($event)\"\n >\n Selecionar todos\n </mat-checkbox>\n </mat-option>\n <ng-container *ngIf=\"isOptionsGroup; else isElementOptions\">\n <mat-optgroup\n *ngFor=\"let group of filteredGroups | async\"\n [label]=\"group.label\"\n >\n <mat-option\n *ngFor=\"let option of group.options\"\n [value]=\"option\"\n [ngClass]=\"[\n 'mapa-dropdown__option--children-level-' + option.childrenLevel\n ]\"\n >\n <span [innerHTML]=\"option.value\"></span>\n </mat-option>\n </mat-optgroup>\n </ng-container>\n <ng-template #isElementOptions>\n <mat-option\n *ngFor=\"let option of filteredOptions | async\"\n [value]=\"option\"\n [ngClass]=\"[\n 'mapa-dropdown__option--children-level-' + option.childrenLevel\n ]\"\n >\n <span [innerHTML]=\"option.value\"></span>\n </mat-option>\n </ng-template>\n\n <mat-option\n *ngFor=\"let option of selectedOptions\"\n hidden\n [value]=\"option\"\n [ngClass]=\"[\n 'mapa-dropdown__option--children-level-' + option.childrenLevel\n ]\"\n >\n <span [innerHTML]=\"option.value\"></span>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"element.hint\">{{ element.hint }}</mat-hint>\n <mat-error *ngIf=\"formControl?.hasError('required')\">\n {{ element.errors?.required }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('minlength')\">\n {{ element.errors?.minlength }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('cpf')\">\n {{ element.errors?.cpf }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('cnpj')\">\n {{ element.errors?.cnpj }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('email')\">\n {{ element.errors?.email }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('pattern')\">\n {{ element.errors?.pattern }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('min')\">\n {{ element.errors?.min }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('max')\">\n {{ element.errors?.max }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('minLength')\">\n {{ element.errors?.minLength }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('maxLength')\">\n {{ element.errors?.maxLength }}\n </mat-error>\n <mat-icon\n *ngIf=\"hasValue() && !formControl.disabled && element.clearValue\"\n (click)=\"clearValue($event)\"\n class=\"mapa-input--close\"\n >close</mat-icon\n >\n </mat-form-field>\n <div *ngIf=\"element.actionButton\" 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 </div>\n</div>\n", styles: [".mapa-dropdown{max-width:min-content;min-width:235px}.mapa-dropdown .mat-select{font-family:Inter,sans-serif!important}.mapa-dropdown .mat-icon{display:flex;justify-content:center;align-items:center;position:absolute;right:32px;top:4px}.mapa-dropdown__label{display:block;font-size:12px;font-style:normal;font-weight:600;line-height:16px;text-transform:uppercase;margin-bottom:16px}.mapa-dropdown__option--children-level-1{padding-left:30px!important}.mapa-dropdown__option--children-level-2{padding-left:50px!important}.mapa-dropdown__option--children-level-3{padding-left:70px!important}.mapa-dropdown__option--children-level-4{padding-left:90px!important}.mapa-dropdown__option--children-level-5{padding-left:100px!important}.mapa-dropdown__option--children-level-6{padding-left:120px!important}.mapa-dropdown__option--select-all .mat-pseudo-checkbox{display:none!important}.mapa-dropdown__option--select-all .mat-checkbox{padding:0!important}.mapa-dropdown--highlight .mat-form-field-outline{border-radius:16px!important}.mapa-dropdown--highlight .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown--highlight .mat-form-field-outline .mat-form-field-outline-end{border-width:2px!important;border-color:#eedb2a!important}.mapa-dropdown--highlight .mat-form-field-outline .mat-form-field-outline-start{display:none!important}.mapa-dropdown--highlight .mat-form-field-outline .mat-form-field-outline-end{border-radius:16px!important;border-left-style:solid!important}.mapa-dropdown--soft-border .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown--soft-border .mat-form-field-outline .mat-form-field-outline-end{border-width:1px!important}.mapa-dropdown--tag .mat-form-field-outline{border-radius:16px!important;height:42px!important}.mapa-dropdown--tag .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown--tag .mat-form-field-outline .mat-form-field-outline-end{border-width:1px!important;border-color:#cdcdcd}.mapa-dropdown--tag .mat-form-field-outline .mat-form-field-outline-start{display:none!important}.mapa-dropdown--tag .mat-form-field-outline .mat-form-field-outline-end{border-radius:16px!important;border-left-style:solid!important}.mapa-dropdown .mat-form-field-outline{background-color:#fff;border-radius:8px}.mapa-dropdown .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown .mat-form-field-outline .mat-form-field-outline-end{border-width:2px}.mapa-dropdown .mat-form-field-flex{display:flex;align-items:center;height:48px}.mapa-dropdown .mat-form-field-infix{border-top:unset!important;padding:unset!important;position:relative}.mapa-dropdown .mat-select-trigger{min-width:50px;padding-top:.3em;height:unset!important}.mapa-dropdown .mat-select-value-text{display:block;width:90%}.mapa-dropdown .mat-select-arrow-wrapper{transform:none!important}.mapa-dropdown .mat-select-arrow{border:unset}.mapa-dropdown .mat-select-arrow:before,.mapa-dropdown .mat-select-arrow:after{content:\"\";display:block;margin-top:-4px;position:absolute;right:10px;top:50%;width:0;border:solid black;border-width:0 2px 2px 0;padding:3px;transform:rotate(45deg);-webkit-transform:rotate(45deg)}.mapa-dropdown .mat-form-field-subscript-wrapper{padding:0!important}.mapa-dropdown [aria-expanded=true] .mat-select-arrow{margin:6px 0 0}.mapa-dropdown [aria-expanded=true] .mat-select-arrow:before,.mapa-dropdown [aria-expanded=true] .mat-select-arrow:after{transform:rotate(-135deg)!important;-webkit-transform:rotate(-135deg)!important}.mapa-overlay-dropdown{transform:translate(-16px) translateY(36px)!important}.mapa-overlay-dropdown .mat-select-panel{border-radius:8px;min-width:calc(100% + 24px)!important}.mapa-overlay-dropdown .mat-select-panel .mat-option,.mapa-overlay-dropdown .mat-select-panel .mat-option-text{font-family:Inter,sans-serif!important;font-size:16px;font-style:normal;font-weight:400;line-height:2em;height:2em;color:#50575e}.mapa-overlay-dropdown .mat-select-panel .mat-option[aria-disabled=true].contains-mat-select-search{height:48px}.mapa-overlay-dropdown .mat-select-panel .mat-select-search-inside-mat-option .mat-select-search-input{background-color:#fff;border:2px solid #a7aaad;border-radius:6px;margin:8px;height:2.3em!important;line-height:2.3em!important;width:96%}.mapa-overlay-dropdown .mat-select-panel .mat-select-search-input{padding:8px 53px 8px 8px!important}.mapa-overlay-dropdown .mat-select-panel .mat-select-search-inner{background-color:#f6f7f7}.mapa-overlay-dropdown .mat-pseudo-checkbox{color:#c3c4c7!important}.mapa-overlay-dropdown .mat-checkbox-frame{border-color:#c3c4c7!important}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i3.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: ButtonComponent, selector: "mapa-button", inputs: ["color", "disabled"], outputs: ["clicked"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i6.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "component", type: i7.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i8.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i8.MatOptgroup, selector: "mat-optgroup", inputs: ["disabled"], exportAs: ["matOptgroup"] }, { kind: "component", type: i9.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"], outputs: ["toggleAll"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], encapsulation: i0.ViewEncapsulation.None });
238
240
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapaDropdownComponent, decorators: [{
239
241
  type: Component,
240
- args: [{ selector: "mapa-dropdown", encapsulation: ViewEncapsulation.None, template: "<div *ngIf=\"element\">\n <label *ngIf=\"element.label\" class=\"mapa-dropdown__label\">\n {{ element.label }}\n </label>\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 >\n <mat-option *ngIf=\"element.search\" class=\"mapa-dropdown__search\">\n <ngx-mat-select-search\n *ngIf=\"element.search.formControl\"\n [showToggleAllCheckbox]=\"element.search.toggleAllCheckbox!\"\n [formControl]=\"element.search.formControl\"\n [placeholderLabel]=\"element.search.placeholder || ''\"\n i18n-placeholderLabel\n [noEntriesFoundLabel]=\"element.search.noEntriesFoundLabel || ''\"\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate\"\n [toggleAllCheckboxChecked]=\"isChecked\"\n (toggleAll)=\"toggleSelectAll($event)\"\n ></ngx-mat-select-search>\n </mat-option>\n\n <ng-container *ngIf=\"isOptionsGroup; else isElementOptions\">\n <mat-optgroup\n *ngFor=\"let group of filteredGroups | async\"\n [label]=\"group.label\"\n >\n <mat-option *ngFor=\"let option of group.options\" [value]=\"option\">\n {{ option.value }}\n </mat-option>\n </mat-optgroup>\n </ng-container>\n <ng-template #isElementOptions>\n <mat-option\n *ngFor=\"let option of filteredOptions | async\"\n [value]=\"option\"\n >\n {{ option.value }}\n </mat-option>\n </ng-template>\n \n <mat-option\n *ngFor=\"let option of selectedOptions\"\n hidden\n [value]=\"option\"\n >\n {{ option.value }}\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"element.hint\">{{ element.hint }}</mat-hint>\n <mat-error *ngIf=\"formControl?.hasError('required')\">\n {{ element.errors?.required }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('minlength')\">\n {{ element.errors?.minlength }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('cpf')\">\n {{ element.errors?.cpf }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('cnpj')\">\n {{ element.errors?.cnpj }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('email')\">\n {{ element.errors?.email }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('pattern')\">\n {{ element.errors?.pattern }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('min')\">\n {{ element.errors?.min }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('max')\">\n {{ element.errors?.max }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('minLength')\">\n {{ element.errors?.minLength }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('maxLength')\">\n {{ element.errors?.maxLength }}\n </mat-error>\n <mat-icon\n *ngIf=\"hasValue() && !formControl.disabled && element.clearValue\"\n (click)=\"clearValue($event)\"\n class=\"mapa-input--close\"\n >close</mat-icon\n >\n </mat-form-field>\n <div *ngIf=\"element.actionButton\" 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 </div>\n</div>\n", styles: [".mapa-dropdown{max-width:min-content;min-width:235px}.mapa-dropdown .mat-select{font-family:Inter,sans-serif!important}.mapa-dropdown .mat-icon{display:flex;justify-content:center;align-items:center;position:absolute;right:32px;top:4px}.mapa-dropdown__label{display:block;font-size:12px;font-style:normal;font-weight:600;line-height:16px;text-transform:uppercase;margin-bottom:16px}.mapa-dropdown--highlight .mat-form-field-outline{border-radius:16px!important}.mapa-dropdown--highlight .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown--highlight .mat-form-field-outline .mat-form-field-outline-end{border-width:2px!important;border-color:#eedb2a!important}.mapa-dropdown--highlight .mat-form-field-outline .mat-form-field-outline-start{display:none!important}.mapa-dropdown--highlight .mat-form-field-outline .mat-form-field-outline-end{border-radius:16px!important;border-left-style:solid!important}.mapa-dropdown--soft-border .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown--soft-border .mat-form-field-outline .mat-form-field-outline-end{border-width:1px!important}.mapa-dropdown--tag .mat-form-field-outline{border-radius:16px!important;height:42px!important}.mapa-dropdown--tag .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown--tag .mat-form-field-outline .mat-form-field-outline-end{border-width:1px!important;border-color:#cdcdcd}.mapa-dropdown--tag .mat-form-field-outline .mat-form-field-outline-start{display:none!important}.mapa-dropdown--tag .mat-form-field-outline .mat-form-field-outline-end{border-radius:16px!important;border-left-style:solid!important}.mapa-dropdown .mat-form-field-outline{background-color:#fff;border-radius:8px}.mapa-dropdown .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown .mat-form-field-outline .mat-form-field-outline-end{border-width:2px}.mapa-dropdown .mat-form-field-flex{display:flex;align-items:center;height:48px}.mapa-dropdown .mat-form-field-infix{border-top:unset!important;padding:unset!important;position:relative}.mapa-dropdown .mat-select-trigger{min-width:50px;padding-top:.3em;height:unset!important}.mapa-dropdown .mat-select-value-text{display:block;width:90%}.mapa-dropdown .mat-select-arrow-wrapper{transform:none!important}.mapa-dropdown .mat-select-arrow{border:unset}.mapa-dropdown .mat-select-arrow:before,.mapa-dropdown .mat-select-arrow:after{content:\"\";display:block;margin-top:-4px;position:absolute;right:10px;top:50%;width:0;border:solid black;border-width:0 2px 2px 0;padding:3px;transform:rotate(45deg);-webkit-transform:rotate(45deg)}.mapa-dropdown .mat-form-field-subscript-wrapper{padding:0!important}.mapa-dropdown [aria-expanded=true] .mat-select-arrow{margin:6px 0 0}.mapa-dropdown [aria-expanded=true] .mat-select-arrow:before,.mapa-dropdown [aria-expanded=true] .mat-select-arrow:after{transform:rotate(-135deg)!important;-webkit-transform:rotate(-135deg)!important}.mapa-overlay-dropdown{transform:translate(-16px) translateY(36px)!important}.mapa-overlay-dropdown .mat-select-panel{border-radius:8px;min-width:calc(100% + 24px)!important}.mapa-overlay-dropdown .mat-select-panel .mat-option,.mapa-overlay-dropdown .mat-select-panel .mat-option-text{font-family:Inter,sans-serif!important;font-size:16px;font-style:normal;font-weight:400;line-height:2em;height:2em;color:#50575e}.mapa-overlay-dropdown .mat-select-panel .mat-option[aria-disabled=true].contains-mat-select-search{height:48px}.mapa-overlay-dropdown .mat-select-panel .mat-select-search-inside-mat-option .mat-select-search-input{background-color:#fff;border:2px solid #a7aaad;border-radius:6px;margin:8px;height:2.3em!important;line-height:2.3em!important;width:96%}.mapa-overlay-dropdown .mat-select-panel .mat-select-search-input{padding:8px 53px 8px 8px!important}.mapa-overlay-dropdown .mat-select-panel .mat-select-search-inner{background-color:#f6f7f7}.mapa-overlay-dropdown .mat-pseudo-checkbox{color:#c3c4c7!important}.mapa-overlay-dropdown .mat-checkbox-frame{border-color:#c3c4c7!important}\n"] }]
242
+ args: [{ selector: "mapa-dropdown", encapsulation: ViewEncapsulation.None, template: "<div *ngIf=\"element\">\n <label *ngIf=\"element.label\" class=\"mapa-dropdown__label\">\n {{ element.label }}\n </label>\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 >\n <mat-option *ngIf=\"element.search\" class=\"mapa-dropdown__search\">\n <ngx-mat-select-search\n *ngIf=\"element.search.formControl\"\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 </mat-option>\n <mat-option\n *ngIf=\"element.multiple\"\n class=\"mapa-dropdown__option--select-all\"\n >\n <mat-checkbox\n class=\"mat-option\"\n [indeterminate]=\"isIndeterminate\"\n [checked]=\"isChecked\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"toggleSelectAll($event)\"\n >\n Selecionar todos\n </mat-checkbox>\n </mat-option>\n <ng-container *ngIf=\"isOptionsGroup; else isElementOptions\">\n <mat-optgroup\n *ngFor=\"let group of filteredGroups | async\"\n [label]=\"group.label\"\n >\n <mat-option\n *ngFor=\"let option of group.options\"\n [value]=\"option\"\n [ngClass]=\"[\n 'mapa-dropdown__option--children-level-' + option.childrenLevel\n ]\"\n >\n <span [innerHTML]=\"option.value\"></span>\n </mat-option>\n </mat-optgroup>\n </ng-container>\n <ng-template #isElementOptions>\n <mat-option\n *ngFor=\"let option of filteredOptions | async\"\n [value]=\"option\"\n [ngClass]=\"[\n 'mapa-dropdown__option--children-level-' + option.childrenLevel\n ]\"\n >\n <span [innerHTML]=\"option.value\"></span>\n </mat-option>\n </ng-template>\n\n <mat-option\n *ngFor=\"let option of selectedOptions\"\n hidden\n [value]=\"option\"\n [ngClass]=\"[\n 'mapa-dropdown__option--children-level-' + option.childrenLevel\n ]\"\n >\n <span [innerHTML]=\"option.value\"></span>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"element.hint\">{{ element.hint }}</mat-hint>\n <mat-error *ngIf=\"formControl?.hasError('required')\">\n {{ element.errors?.required }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('minlength')\">\n {{ element.errors?.minlength }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('cpf')\">\n {{ element.errors?.cpf }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('cnpj')\">\n {{ element.errors?.cnpj }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('email')\">\n {{ element.errors?.email }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('pattern')\">\n {{ element.errors?.pattern }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('min')\">\n {{ element.errors?.min }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('max')\">\n {{ element.errors?.max }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('minLength')\">\n {{ element.errors?.minLength }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('maxLength')\">\n {{ element.errors?.maxLength }}\n </mat-error>\n <mat-icon\n *ngIf=\"hasValue() && !formControl.disabled && element.clearValue\"\n (click)=\"clearValue($event)\"\n class=\"mapa-input--close\"\n >close</mat-icon\n >\n </mat-form-field>\n <div *ngIf=\"element.actionButton\" 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 </div>\n</div>\n", styles: [".mapa-dropdown{max-width:min-content;min-width:235px}.mapa-dropdown .mat-select{font-family:Inter,sans-serif!important}.mapa-dropdown .mat-icon{display:flex;justify-content:center;align-items:center;position:absolute;right:32px;top:4px}.mapa-dropdown__label{display:block;font-size:12px;font-style:normal;font-weight:600;line-height:16px;text-transform:uppercase;margin-bottom:16px}.mapa-dropdown__option--children-level-1{padding-left:30px!important}.mapa-dropdown__option--children-level-2{padding-left:50px!important}.mapa-dropdown__option--children-level-3{padding-left:70px!important}.mapa-dropdown__option--children-level-4{padding-left:90px!important}.mapa-dropdown__option--children-level-5{padding-left:100px!important}.mapa-dropdown__option--children-level-6{padding-left:120px!important}.mapa-dropdown__option--select-all .mat-pseudo-checkbox{display:none!important}.mapa-dropdown__option--select-all .mat-checkbox{padding:0!important}.mapa-dropdown--highlight .mat-form-field-outline{border-radius:16px!important}.mapa-dropdown--highlight .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown--highlight .mat-form-field-outline .mat-form-field-outline-end{border-width:2px!important;border-color:#eedb2a!important}.mapa-dropdown--highlight .mat-form-field-outline .mat-form-field-outline-start{display:none!important}.mapa-dropdown--highlight .mat-form-field-outline .mat-form-field-outline-end{border-radius:16px!important;border-left-style:solid!important}.mapa-dropdown--soft-border .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown--soft-border .mat-form-field-outline .mat-form-field-outline-end{border-width:1px!important}.mapa-dropdown--tag .mat-form-field-outline{border-radius:16px!important;height:42px!important}.mapa-dropdown--tag .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown--tag .mat-form-field-outline .mat-form-field-outline-end{border-width:1px!important;border-color:#cdcdcd}.mapa-dropdown--tag .mat-form-field-outline .mat-form-field-outline-start{display:none!important}.mapa-dropdown--tag .mat-form-field-outline .mat-form-field-outline-end{border-radius:16px!important;border-left-style:solid!important}.mapa-dropdown .mat-form-field-outline{background-color:#fff;border-radius:8px}.mapa-dropdown .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown .mat-form-field-outline .mat-form-field-outline-end{border-width:2px}.mapa-dropdown .mat-form-field-flex{display:flex;align-items:center;height:48px}.mapa-dropdown .mat-form-field-infix{border-top:unset!important;padding:unset!important;position:relative}.mapa-dropdown .mat-select-trigger{min-width:50px;padding-top:.3em;height:unset!important}.mapa-dropdown .mat-select-value-text{display:block;width:90%}.mapa-dropdown .mat-select-arrow-wrapper{transform:none!important}.mapa-dropdown .mat-select-arrow{border:unset}.mapa-dropdown .mat-select-arrow:before,.mapa-dropdown .mat-select-arrow:after{content:\"\";display:block;margin-top:-4px;position:absolute;right:10px;top:50%;width:0;border:solid black;border-width:0 2px 2px 0;padding:3px;transform:rotate(45deg);-webkit-transform:rotate(45deg)}.mapa-dropdown .mat-form-field-subscript-wrapper{padding:0!important}.mapa-dropdown [aria-expanded=true] .mat-select-arrow{margin:6px 0 0}.mapa-dropdown [aria-expanded=true] .mat-select-arrow:before,.mapa-dropdown [aria-expanded=true] .mat-select-arrow:after{transform:rotate(-135deg)!important;-webkit-transform:rotate(-135deg)!important}.mapa-overlay-dropdown{transform:translate(-16px) translateY(36px)!important}.mapa-overlay-dropdown .mat-select-panel{border-radius:8px;min-width:calc(100% + 24px)!important}.mapa-overlay-dropdown .mat-select-panel .mat-option,.mapa-overlay-dropdown .mat-select-panel .mat-option-text{font-family:Inter,sans-serif!important;font-size:16px;font-style:normal;font-weight:400;line-height:2em;height:2em;color:#50575e}.mapa-overlay-dropdown .mat-select-panel .mat-option[aria-disabled=true].contains-mat-select-search{height:48px}.mapa-overlay-dropdown .mat-select-panel .mat-select-search-inside-mat-option .mat-select-search-input{background-color:#fff;border:2px solid #a7aaad;border-radius:6px;margin:8px;height:2.3em!important;line-height:2.3em!important;width:96%}.mapa-overlay-dropdown .mat-select-panel .mat-select-search-input{padding:8px 53px 8px 8px!important}.mapa-overlay-dropdown .mat-select-panel .mat-select-search-inner{background-color:#f6f7f7}.mapa-overlay-dropdown .mat-pseudo-checkbox{color:#c3c4c7!important}.mapa-overlay-dropdown .mat-checkbox-frame{border-color:#c3c4c7!important}\n"] }]
241
243
  }], ctorParameters: function () { return []; }, propDecorators: { formControl: [{
242
244
  type: Input
243
245
  }], formControlSearch: [{
@@ -276,6 +278,7 @@ MapaDropdownModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", vers
276
278
  FormsModule,
277
279
  ReactiveFormsModule,
278
280
  MatButtonModule,
281
+ MatCheckboxModule,
279
282
  MapaButtonModule,
280
283
  MatListModule,
281
284
  MatIconModule,
@@ -294,6 +297,7 @@ MapaDropdownModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", vers
294
297
  FormsModule,
295
298
  ReactiveFormsModule,
296
299
  MatButtonModule,
300
+ MatCheckboxModule,
297
301
  MapaButtonModule,
298
302
  MatListModule,
299
303
  MatIconModule,
@@ -309,6 +313,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
309
313
  FormsModule,
310
314
  ReactiveFormsModule,
311
315
  MatButtonModule,
316
+ MatCheckboxModule,
312
317
  MapaButtonModule,
313
318
  MatListModule,
314
319
  MatIconModule,
@@ -332,61 +337,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
332
337
  * Public API Surface of mapa-library-ui dropdown
333
338
  */
334
339
 
335
- class ChecklistDatabase {
336
- get data() {
337
- return this.dataChange.value;
338
- }
339
- constructor() {
340
- this.dataChange = new BehaviorSubject([]);
341
- }
342
- initialize(treeData) {
343
- this.treeData = treeData;
344
- // Build the tree nodes from Json object. The result is a list of `TodoItemNode` with nested
345
- // file node as children.
346
- const data = treeData;
347
- // Notify the change.
348
- this.dataChange.next(data);
349
- }
350
- filter(filterText) {
351
- let filteredTreeData;
352
- if (filterText) {
353
- // Filter the tree
354
- function filter(array, text) {
355
- const getChildren = (result, object) => {
356
- if (object.value?.toLowerCase().includes(text?.toLowerCase()) ||
357
- object.children?.some((child) => child.value?.toLowerCase().includes(text?.toLowerCase()))) {
358
- result.push(object);
359
- return result;
360
- }
361
- if (Array.isArray(object.children) && object.children.length > 0) {
362
- const children = object.children.reduce(getChildren, []);
363
- if (children.length)
364
- result.push({ ...object, children });
365
- }
366
- return result;
367
- };
368
- return array.reduce(getChildren, []);
369
- }
370
- filteredTreeData = filter(this.treeData, filterText);
371
- }
372
- else {
373
- // Return the initial tree
374
- filteredTreeData = this.treeData;
375
- }
376
- // Build the tree nodes from Json object. The result is a list of `TodoItemNode` with nested
377
- // file node as children.
378
- const data = filteredTreeData;
379
- // Notify the change.
380
- this.dataChange.next(data);
381
- }
382
- }
383
- ChecklistDatabase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChecklistDatabase, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
384
- ChecklistDatabase.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChecklistDatabase, providedIn: "root" });
385
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChecklistDatabase, decorators: [{
386
- type: Injectable,
387
- args: [{ providedIn: "root" }]
388
- }], ctorParameters: function () { return []; } });
389
-
390
340
  class DataNode {
391
341
  constructor() { }
392
342
  }
@@ -395,264 +345,51 @@ class DataFlatNode {
395
345
  constructor() { }
396
346
  }
397
347
  class MapaDropdownTreeComponent {
398
- constructor(_database) {
399
- this._database = _database;
400
- this.isMenuExpanded = false;
401
- /** Map from flat node to nested node. This helps us finding the nested node to be modified */
402
- this.flatNodeMap = new Map();
403
- /** Map from nested node to flattened node. This helps us to keep the same object for selection */
404
- this.nestedNodeMap = new Map();
405
- /** A selected parent node to be inserted */
406
- this.selectedParent = null;
407
- /** The new item's name */
408
- this.newItemName = '';
409
- /** The selection for checklist */
410
- this.checklistSelection = new SelectionModel(true);
411
- /// Filtering
412
- this.myControl = new FormControl();
413
- this.options = [];
414
- this.getLevel = (node) => node.level;
415
- this.isExpandable = (node) => node.expandable;
416
- this.getChildren = (node) => node.children;
417
- this.hasChild = (_, _nodeData) => _nodeData.expandable;
418
- this.hasNoContent = (_, _nodeData) => _nodeData.value === '';
419
- /**
420
- * Transformer to convert nested node to flat node. Record the nodes in maps for later use.
421
- */
422
- this.transformer = (node, level) => {
423
- const existingNode = this.nestedNodeMap.get(node);
424
- const flatNode = existingNode && existingNode.value === node.value
425
- ? existingNode
426
- : new DataFlatNode();
427
- flatNode.key = node.key;
428
- flatNode.value = node.value;
429
- flatNode.level = level;
430
- flatNode.expandable = !!node.children;
431
- this.flatNodeMap.set(flatNode, node);
432
- this.nestedNodeMap.set(node, flatNode);
433
- return flatNode;
434
- };
435
- }
436
348
  ngOnInit() {
437
- this._database.initialize(this.element.tree);
438
- this.treeFlattener = new MatTreeFlattener(this.transformer, this.getLevel, this.isExpandable, this.getChildren);
439
- this.treeControl = new FlatTreeControl(this.getLevel, this.isExpandable);
440
- this.dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
441
- this._database.dataChange.subscribe((data) => {
442
- this.dataSource.data = data;
443
- this.treeControl.expandAll();
444
- });
445
- this.checklistSelection.changed.subscribe((selection) => {
446
- if (selection.source.selected.length > 0) {
447
- this.formGroup.get(this.element.key)?.patchValue(this.element.multiple
448
- ? selection.source.selected.map((checked) => {
449
- return { value: checked.value, key: checked.key };
450
- })
451
- : {
452
- value: selection.source.selected[0].value,
453
- key: selection.source.selected[0].key,
454
- }, { emitEvent: false });
455
- }
456
- });
457
- this.formGroup.get(this.element.key)?.valueChanges.subscribe((value) => {
458
- if (value) {
459
- if (this.element.multiple) {
460
- const allValuesKeys = this.element.multiple
461
- ? value.map((item) => item.key)
462
- : [value.key];
463
- this.treeControl.dataNodes.map((node) => {
464
- if (allValuesKeys.includes(node.key)) {
465
- if (this.element.multiple && node.level === 0) {
466
- this.todoItemSelectionToggle(node);
467
- }
468
- else {
469
- this.todoLeafItemSelectionToggle(node);
470
- }
471
- }
472
- });
473
- }
474
- else {
475
- this.selectSingleItem(this.treeControl.dataNodes?.find((node) => node.key === value.key));
476
- }
477
- }
478
- });
479
- }
480
- ngAfterViewInit() {
481
- this.treeControl.expandAll();
482
- }
483
- toggleAll(event) {
484
- const checked = event.checked;
485
- this.treeControl.dataNodes.map((node) => {
486
- if (checked) {
487
- this.checklistSelection.deselect(node);
488
- }
489
- else {
490
- this.checklistSelection.select(node);
491
- }
492
- this.checklistSelection.toggle(node);
493
- const descendants = this.treeControl.getDescendants(node);
494
- this.checklistSelection.select(...descendants);
495
- if (checked) {
496
- descendants.every((child) => this.checklistSelection.deselect(child));
497
- }
498
- else {
499
- descendants.every((child) => this.checklistSelection.select(child));
500
- }
501
- });
502
- }
503
- clearAll() {
504
- this.checklistSelection.clear();
505
- if (this.element.multiple) {
506
- this.formGroup.get(this.element.key)?.patchValue([]);
507
- this.toggleAllCheckbox.checked = false;
508
- }
509
- else {
510
- this.formGroup.get(this.element.key)?.patchValue(null);
511
- }
512
- }
513
- onPanelChange() {
514
- this.isMenuExpanded = !this.isMenuExpanded;
515
- }
516
- filter(array, text) {
517
- const getNodes = (result, object) => {
518
- if (object.name?.toLowerCase().includes(text)) {
519
- result.push(object);
520
- return result;
521
- }
522
- if (Array.isArray(object.children)) {
523
- const children = object.children.reduce(getNodes, []);
524
- if (children.length)
525
- result.push({ ...object, children });
526
- }
527
- return result;
349
+ const options = this.formatTree(this.element.tree);
350
+ this.elementOption = {
351
+ ...this.element,
352
+ options,
528
353
  };
529
- this.element.tree = array.reduce(getNodes, []);
530
354
  }
531
- /** Whether all the descendants of the node are selected. */
532
- descendantsAllSelected(node) {
533
- const descendants = this.treeControl.getDescendants(node);
534
- const descAllSelected = descendants.every((child) => this.checklistSelection.isSelected(child));
535
- return descAllSelected;
355
+ getFormControl(element) {
356
+ return this.formGroup.get(element.key);
536
357
  }
537
- /** Whether part of the descendants are selected */
538
- descendantsPartiallySelected(node) {
539
- const descendants = this.treeControl.getDescendants(node);
540
- const result = descendants.some((child) => this.checklistSelection.isSelected(child));
541
- return result && !this.descendantsAllSelected(node);
542
- }
543
- /** Toggle the to-do item selection. Select/deselect all the descendants node */
544
- todoItemSelectionToggle(node) {
545
- this.checklistSelection.toggle(node);
546
- if (this.element.checkChildren) {
547
- const descendants = this.treeControl.getDescendants(node);
548
- this.checklistSelection.isSelected(node)
549
- ? this.checklistSelection.select(...descendants)
550
- : this.checklistSelection.deselect(...descendants);
551
- // Force update for the parent
552
- descendants.every((child) => this.checklistSelection.isSelected(child));
553
- this.checkAllParentsSelection(node);
554
- }
555
- }
556
- /** Toggle a leaf to-do item selection. Check all the parents to see if they changed */
557
- todoLeafItemSelectionToggle(node) {
558
- this.checklistSelection.toggle(node);
559
- this.checkAllParentsSelection(node);
560
- }
561
- /* Checks all the parents when a leaf node is selected/unselected */
562
- checkAllParentsSelection(node) {
563
- let parent = this.getParentNode(node);
564
- while (parent) {
565
- this.checkRootNodeSelection(parent);
566
- parent = this.getParentNode(parent);
567
- }
568
- }
569
- /** Check root node checked state and change it accordingly */
570
- checkRootNodeSelection(node) {
571
- const nodeSelected = this.checklistSelection.isSelected(node);
572
- const descendants = this.treeControl.getDescendants(node);
573
- const descAllSelected = descendants.every((child) => this.checklistSelection.isSelected(child));
574
- if (nodeSelected && !descAllSelected) {
575
- this.checklistSelection.deselect(node);
576
- }
577
- else if (!nodeSelected && descAllSelected) {
578
- this.checklistSelection.select(node);
579
- }
580
- }
581
- /* Get the parent node of a node */
582
- getParentNode(node) {
583
- const currentLevel = this.getLevel(node);
584
- if (currentLevel < 1) {
585
- return null;
586
- }
587
- const startIndex = this.treeControl.dataNodes.indexOf(node) - 1;
588
- for (let i = startIndex; i >= 0; i--) {
589
- const currentNode = this.treeControl.dataNodes[i];
590
- if (this.getLevel(currentNode) < currentLevel) {
591
- return currentNode;
358
+ formatTree(tree, childrenLevel = 0) {
359
+ const options = [];
360
+ tree.map((item) => {
361
+ options.push({
362
+ value: item.value,
363
+ key: item.key,
364
+ childrenLevel,
365
+ });
366
+ if (item.children) {
367
+ options.push(...this.formatTree(this.formatTreeChildren(item.children, childrenLevel + 1), childrenLevel + 1));
592
368
  }
593
- }
594
- return null;
595
- }
596
- getSelectedItems() {
597
- if (!this.checklistSelection.selected.length)
598
- return this.element.placeholder || '';
599
- return this.checklistSelection.selected ? this.checklistSelection.selected
600
- .map((s) => s?.value || s || '')
601
- .join(',')
602
- .toString()
603
- .replace(/\,/g, ', ') : this.element.placeholder || '';
604
- }
605
- filterChanged(event) {
606
- const filterText = event.target?.value;
607
- // ChecklistDatabase.filter method which actually filters the tree and gives back a tree structure
608
- this._database.filter(filterText);
609
- }
610
- clearSearchValue() {
611
- this.element.search?.formControl?.setValue('');
612
- this._database.filter('');
613
- }
614
- selectSingleItem(node, emitEvent = false) {
615
- this.checklistSelection.clear();
616
- this.checklistSelection.select(node);
617
- this.formGroup
618
- .get(this.element.key)
619
- ?.patchValue({ value: node.value, key: node.key }, { emitEvent });
620
- this.trigger.closeMenu();
621
- }
622
- hasValue() {
623
- return !!this.formGroup.get(this.element.key)?.value;
624
- }
625
- clearValue(event) {
626
- event.stopPropagation();
627
- this.formGroup.get(this.element.key)?.patchValue(null);
628
- this.checklistSelection.clear();
629
- }
630
- isAllNodeSelected() {
631
- return !!(this.treeControl.dataNodes.length ===
632
- this.checklistSelection.selected.length);
369
+ });
370
+ return options;
371
+ }
372
+ formatTreeChildren(children, childrenLevel) {
373
+ const options = [];
374
+ children.map((item) => {
375
+ options.push({
376
+ value: item.value,
377
+ key: item.key,
378
+ childrenLevel,
379
+ });
380
+ });
381
+ return options;
633
382
  }
634
383
  }
635
- MapaDropdownTreeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapaDropdownTreeComponent, deps: [{ token: ChecklistDatabase }], target: i0.ɵɵFactoryTarget.Component });
636
- MapaDropdownTreeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: MapaDropdownTreeComponent, selector: "mapa-dropdown-tree", inputs: { formGroup: "formGroup", element: "element" }, viewQueries: [{ propertyName: "autocomplete", first: true, predicate: ["auto"], descendants: true }, { propertyName: "tree", first: true, predicate: ["tree"], descendants: true }, { propertyName: "trigger", first: true, predicate: MatMenuTrigger, descendants: true }, { propertyName: "toggleAllCheckbox", first: true, predicate: ["toggleAllCheckbox"], descendants: true }], ngImport: i0, template: "<form\n [formGroup]=\"formGroup\"\n *ngIf=\"formGroup && element\"\n class=\"mapa-dropdown-tree\"\n>\n <label *ngIf=\"element.label\" class=\"mapa-dropdown-tree__label\">\n {{ element.label }}\n </label>\n <button\n class=\"mapa-dropdown-tree__dropdown\"\n #menuOption=\"matMenuTrigger\"\n [matMenuTriggerFor]=\"menu\"\n >\n <div class=\"mapa-dropdown-tree__dropdown--value\">\n {{ getSelectedItems() }}\n </div>\n\n <mat-icon *ngIf=\"hasValue()\" (click)=\"clearValue($event)\" matSuffix\n >close</mat-icon\n >\n <mat-icon>\n {{ menuOption.menuOpen ? 'keyboard_arrow_up' : 'keyboard_arrow_down' }}\n </mat-icon>\n </button>\n \n <div class=\"mapa-dropdown-tree__hint\" *ngIf=\"element.hint\">{{ element.hint }}</div>\n \n <mat-menu #menu=\"matMenu\">\n <div (click)=\"$event.stopPropagation()\">\n <div class=\"mapa-dropdown-tree__search\" *ngIf=\"element.search\">\n <mat-form-field appearance=\"outline\">\n <input\n matInput\n #searchInput\n [formControl]=\"element.search?.formControl!\"\n [placeholder]=\"element.search?.placeholder || ''\"\n (keydown)=\"$event.stopPropagation()\"\n (keyup)=\"filterChanged($event)\"\n />\n <mat-icon\n *ngIf=\"!!element.search?.formControl?.value && !element.search?.formControl?.disabled\"\n (click)=\"clearSearchValue()\"\n matSuffix\n >close</mat-icon\n >\n </mat-form-field>\n </div>\n <section [formGroup]=\"formGroup\">\n <label\n *ngIf=\"element.multiple === true\"\n class=\"mapa-dropdown-tree__toggle-all mapa-dropdown-tree__checkbox\"\n >\n <mat-checkbox\n #toggleAllCheckbox\n class=\"checklist-leaf-node\"\n (change)=\"toggleAll($event)\"\n [checked]=\"isAllNodeSelected()\"\n [indeterminate]=\"!isAllNodeSelected() && checklistSelection.hasValue()\"\n color=\"accent\"\n >Selecionar todos</mat-checkbox\n >\n </label>\n\n <mat-tree [dataSource]=\"dataSource\" [treeControl]=\"treeControl\">\n <mat-tree-node\n *matTreeNodeDef=\"let node\"\n matTreeNodePadding\n matTreeNodePaddingIndent=\"13\"\n [class.mapa-dropdown-tree__checkbox--checked]=\"checklistSelection.isSelected(node)\"\n >\n <label class=\"mapa-dropdown-tree__checkbox\">\n <button mat-icon-button disabled></button>\n <!-- LEAF CHECKBOX -->\n <mat-checkbox\n *ngIf=\"element.multiple === true; else noCheckbox\"\n class=\"checklist-leaf-node\"\n [checked]=\"checklistSelection.isSelected(node)\"\n (change)=\"todoLeafItemSelectionToggle(node)\"\n color=\"accent\"\n >{{node.value}}</mat-checkbox\n >\n <ng-template #noCheckbox>\n <div (click)=\"selectSingleItem(node, true)\">\n {{node.value}}\n </div>\n </ng-template>\n </label>\n </mat-tree-node>\n\n <mat-tree-node\n *matTreeNodeDef=\"let node; when: hasChild\"\n matTreeNodePadding\n matTreeNodePaddingIndent=\"13\"\n [class.mapa-dropdown-tree__checkbox--checked]=\"checklistSelection.isSelected(node)\"\n >\n <label class=\"mapa-dropdown-tree__checkbox\">\n <!-- <button\n mat-icon-button\n matTreeNodeToggle\n [attr.aria-label]=\"'toggle ' + node.filename\"\n >\n <mat-icon class=\"mat-icon-rtl-mirror\">\n {{treeControl.isExpanded(node) ? 'expand_more' :\n 'chevron_right'}}\n </mat-icon>\n </button> -->\n <!-- [checked]=\"descendantsAllSelected(node)\" -->\n <!-- PARENT CHECKBOX -->\n <mat-checkbox\n *ngIf=\"element.multiple === true; else noCheckbox\"\n [checked]=\"checklistSelection.isSelected(node)\"\n [indeterminate]=\"descendantsPartiallySelected(node)\"\n (change)=\"todoItemSelectionToggle(node)\"\n color=\"accent\"\n >\n {{node.value}}</mat-checkbox\n >\n <ng-template #noCheckbox>\n <div (click)=\"selectSingleItem(node, true)\">\n {{node.value}}\n </div>\n </ng-template>\n </label>\n </mat-tree-node>\n </mat-tree>\n </section>\n <button\n *ngIf=\"element.multiple === true\"\n mat-button\n class=\"mapa-dropdown-tree__button\"\n color=\"primary\"\n (click)=\"clearAll()\"\n >\n Limpar todos\n </button>\n </div>\n </mat-menu>\n</form>\n", styles: [".mapa-dropdown-tree{min-width:235px;max-width:none;width:100%!important;margin-bottom:24px}.mapa-dropdown-tree .mat-select{font-family:Inter,sans-serif!important}.mapa-dropdown-tree__hint{font-size:12px;font-style:normal;font-weight:400;line-height:16px;color:#77838f;margin-bottom:16px}.mapa-dropdown-tree__toggle-all .checklist-leaf-node{padding:16px 0}.mapa-dropdown-tree__label,.mapa-dropdown-tree__checkbox{display:block;font-style:normal;font-weight:400;line-height:16px;width:100%;padding:0 16px}.mapa-dropdown-tree__label div,.mapa-dropdown-tree__checkbox div{width:100%}.mapa-dropdown-tree__label--checked,.mapa-dropdown-tree__checkbox--checked{background:rgba(0,0,0,.12)}.mapa-dropdown-tree__checkbox{font-size:16px;padding:0 16px}.mapa-dropdown-tree__label{padding:0!important;font-size:12px!important;font-weight:600!important;margin-bottom:16px;text-transform:uppercase}.mapa-dropdown-tree__dropdown{display:flex;align-items:center;justify-content:flex-start;background-color:#fff;width:100%;border:2px solid #a7aaad;border-radius:8px;padding:10px 12px;margin-bottom:8px}.mapa-dropdown-tree__dropdown--value{flex-grow:1;font-family:Inter,sans-serif!important;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:300px}.mapa-dropdown-tree__button{background:#fff;border-top:1px solid #dcdcde!important;color:#ea561d;font-family:Inter,sans-serif;font-size:16px;font-style:normal;font-weight:500;line-height:28px;padding:9px;text-align:left!important;width:100%}.mapa-dropdown-tree__button .mat-button-wrapper{color:#ea561d!important;padding:4px 8px}.mapa-dropdown-tree__search{display:flex;align-items:center;justify-content:flex-start;background:#f6f7f7;width:100%;padding:10px 0 16px 16px!important}.mapa-dropdown-tree__search .mat-input-element{padding:4px 0}.mapa-dropdown-tree__search .mat-form-field{width:94%}.mapa-dropdown-tree__search .mat-form-field-wrapper{padding-bottom:unset!important}.mapa-dropdown-tree__search .mat-form-field-outline{background:white;border-radius:8px}.mapa-dropdown-tree__search .mat-form-field-appearance-outline .mat-form-field-infix{border-top:unset!important;padding:.7em 0 .5em}.mapa-dropdown-tree__clean{background:white;border-top:1px solid #dcdcde;bottom:0%;height:36px;position:absolute;width:100%;z-index:9999}.mapa-dropdown-tree__clean button{text-align:left;height:36px;width:100%}.mapa-dropdown-tree--highlight .mat-form-field-outline{border-radius:16px!important}.mapa-dropdown-tree--highlight .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown-tree--highlight .mat-form-field-outline .mat-form-field-outline-end{border-width:2px!important;border-color:#eedb2a!important}.mapa-dropdown-tree--highlight .mat-form-field-outline .mat-form-field-outline-start{display:none!important}.mapa-dropdown-tree--highlight .mat-form-field-outline .mat-form-field-outline-end{border-radius:16px!important;border-left-style:solid!important}.mapa-dropdown-tree--soft-border .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown-tree--soft-border .mat-form-field-outline .mat-form-field-outline-end{border-width:1px!important}.mapa-dropdown-tree--tag .mat-form-field-outline{border-radius:16px!important;height:42px!important}.mapa-dropdown-tree--tag .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown-tree--tag .mat-form-field-outline .mat-form-field-outline-end{border-width:1px!important;border-color:#cdcdcd}.mapa-dropdown-tree--tag .mat-form-field-outline .mat-form-field-outline-start{display:none!important}.mapa-dropdown-tree--tag .mat-form-field-outline .mat-form-field-outline-end{border-radius:16px!important;border-left-style:solid!important}.mapa-dropdown-tree .mat-form-field-outline{background-color:#fff;border-radius:8px}.mapa-dropdown-tree .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown-tree .mat-form-field-outline .mat-form-field-outline-end{border-width:2px}.mapa-dropdown-tree .mat-form-field-wrapper{padding-bottom:unset!important}.mapa-dropdown-tree .mat-form-field-flex{display:flex;align-items:center;height:48px}.mapa-dropdown-tree .mat-form-field-infix{border-top:unset!important;padding:unset!important;position:relative}.mapa-dropdown-tree .mat-select-trigger{min-width:50px;padding-top:.3em;height:unset!important}.mapa-dropdown-tree .mat-select-value-text{display:block;width:90%}.mapa-dropdown-tree .mat-select-arrow-wrapper{transform:none!important}.mapa-dropdown-tree .mat-select-arrow{border:unset}.mapa-dropdown-tree .mat-select-arrow:before,.mapa-dropdown-tree .mat-select-arrow:after{content:\"\";display:block;margin-top:-4px;position:absolute;right:10px;top:50%;width:0;border:solid black;border-width:0 2px 2px 0;padding:3px;transform:rotate(45deg);-webkit-transform:rotate(45deg)}.mapa-dropdown-tree [aria-expanded=true] .mat-select-arrow{margin:6px 0 0}.mapa-dropdown-tree [aria-expanded=true] .mat-select-arrow:before,.mapa-dropdown-tree [aria-expanded=true] .mat-select-arrow:after{transform:rotate(-135deg)!important;-webkit-transform:rotate(-135deg)!important}.mapa-overlay-dropdown-tree .mat-checkbox-label{color:#77838f!important;font-size:16px!important;font-style:normal;font-weight:400}.mapa-overlay-dropdown-tree .mat-menu-panel{width:100%;max-width:none!important;overflow:hidden}.mapa-overlay-dropdown-tree .mat-input-element{font-family:Inter,sans-serif;font-size:14px}.mapa-overlay-dropdown-tree .mat-menu-content{padding-bottom:unset!important;padding-top:unset!important}.mapa-overlay-dropdown-tree .mat-tree{display:flex;gap:8px;flex-direction:column;max-height:260px;padding-bottom:24px;overflow-y:auto}.mapa-overlay-dropdown-tree .mat-tree-node{color:#50575e!important}.mapa-overlay-dropdown-tree ul{padding-inline-start:20px!important;margin-block-start:0px!important;margin-block-end:0px!important;gap:8px}.mapa-overlay-dropdown-tree .tree-toggle,.mapa-overlay-dropdown-tree .mat-tree .mat-focus-indicator{display:none}.mapa-overlay-dropdown-tree .mat-tree .mat-tree-node{min-height:28px!important;padding:4px 0;flex:unset!important}.mapa-overlay-dropdown-tree .mat-tree .mat-tree-node:hover{background:rgba(0,0,0,.04)}.mapa-overlay-dropdown-tree .mat-select-tree-hide{display:block!important}.mapa-overlay-dropdown-tree .mat-autocomplete-panel .mat-option{padding:unset!important}.mapa-overlay-dropdown-tree .mat-select-panel{border-radius:8px;min-width:calc(100% + 24px)!important}.mapa-overlay-dropdown-tree .mat-select-panel .mat-option,.mapa-overlay-dropdown-tree .mat-select-panel .mat-option-text{font-family:Inter,sans-serif!important;font-size:16px;font-style:normal;font-weight:400;line-height:2em;height:2em;color:#50575e}.mapa-overlay-dropdown-tree .mapa-dropdown__search.mat-option{display:flex;padding:16px 8px!important;flex-direction:column;justify-content:center;align-items:center;gap:10px;align-self:stretch;background:#f6f7f7;height:unset!important}.mapa-overlay-dropdown-tree .mapa-dropdown__search.mat-option .mat-select-search-inside-mat-option{height:unset!important;line-height:unset!important}.mapa-overlay-dropdown-tree .mapa-dropdown__search.mat-option .mat-select-search-clear{top:-3px!important}.mapa-overlay-dropdown-tree .mapa-dropdown__search.mat-option .mat-select-search-inner{top:8px;border:2px solid #a7aaad;border-radius:8px!important;width:100%!important}.mapa-overlay-dropdown-tree .mapa-dropdown__search.mat-option .mat-select-search-toggle-all-checkbox{padding-left:8px!important}.mapa-overlay-dropdown-tree .mapa-dropdown__search.mat-option .mat-select-search-input{padding:8px 8px 8px 6px!important;height:unset!important;line-height:unset!important}.mapa-overlay-dropdown-tree .mapa-dropdown__search.mat-option .mat-select-search-input::placeholder{color:#c3c4c7!important}.mapa-overlay-dropdown-tree .mapa-dropdown__search .mat-option-text{width:100%}.mapa-overlay-dropdown-tree .mat-pseudo-checkbox{color:#c3c4c7!important}.mapa-overlay-dropdown-tree .mat-checkbox-frame{border-color:#c3c4c7!important}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i4$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i7$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"], exportAs: ["matInput"] }, { kind: "directive", type: i8$1.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { kind: "directive", type: i8$1.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { kind: "component", type: i8$1.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { kind: "directive", type: i8$1.MatTreeNode, selector: "mat-tree-node", inputs: ["role", "disabled", "tabIndex"], exportAs: ["matTreeNode"] }, { kind: "component", type: i9.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i10.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "directive", type: i10.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }], encapsulation: i0.ViewEncapsulation.None });
384
+ MapaDropdownTreeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapaDropdownTreeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
385
+ MapaDropdownTreeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: MapaDropdownTreeComponent, selector: "mapa-dropdown-tree", inputs: { formGroup: "formGroup", element: "element" }, ngImport: i0, template: "<section [formGroup]=\"formGroup\" *ngIf=\"elementOption\">\n <mapa-dropdown\n [formControl]=\"getFormControl(element)\"\n [element]=\"elementOption\"\n ></mapa-dropdown>\n</section>\n", styles: [".mapa-dropdown-tree{min-width:235px;max-width:none;width:100%!important;margin-bottom:24px}.mapa-dropdown-tree .mat-select{font-family:Inter,sans-serif!important}.mapa-dropdown-tree__hint{font-size:12px;font-style:normal;font-weight:400;line-height:16px;color:#77838f;margin-bottom:16px}.mapa-dropdown-tree__toggle-all .checklist-leaf-node{padding:16px 0}.mapa-dropdown-tree__label,.mapa-dropdown-tree__checkbox{display:block;font-style:normal;font-weight:400;line-height:16px;width:100%;padding:0 16px}.mapa-dropdown-tree__label div,.mapa-dropdown-tree__checkbox div{width:100%}.mapa-dropdown-tree__label--checked,.mapa-dropdown-tree__checkbox--checked{background:rgba(0,0,0,.12)}.mapa-dropdown-tree__checkbox{font-size:16px;padding:0 16px}.mapa-dropdown-tree__label{padding:0!important;font-size:12px!important;font-weight:600!important;margin-bottom:16px;text-transform:uppercase}.mapa-dropdown-tree__dropdown{display:flex;align-items:center;justify-content:flex-start;background-color:#fff;width:100%;border:2px solid #a7aaad;border-radius:8px;padding:10px 12px;margin-bottom:8px}.mapa-dropdown-tree__dropdown--value{flex-grow:1;font-family:Inter,sans-serif!important;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:300px}.mapa-dropdown-tree__button{background:#fff;border-top:1px solid #dcdcde!important;color:#ea561d;font-family:Inter,sans-serif;font-size:16px;font-style:normal;font-weight:500;line-height:28px;padding:9px;text-align:left!important;width:100%}.mapa-dropdown-tree__button .mat-button-wrapper{color:#ea561d!important;padding:4px 8px}.mapa-dropdown-tree__search{display:flex;align-items:center;justify-content:flex-start;background:#f6f7f7;width:100%;padding:10px 0 16px 16px!important}.mapa-dropdown-tree__search .mat-input-element{padding:4px 0}.mapa-dropdown-tree__search .mat-form-field{width:94%}.mapa-dropdown-tree__search .mat-form-field-wrapper{padding-bottom:unset!important}.mapa-dropdown-tree__search .mat-form-field-outline{background:white;border-radius:8px}.mapa-dropdown-tree__search .mat-form-field-appearance-outline .mat-form-field-infix{border-top:unset!important;padding:.7em 0 .5em}.mapa-dropdown-tree__clean{background:white;border-top:1px solid #dcdcde;bottom:0%;height:36px;position:absolute;width:100%;z-index:9999}.mapa-dropdown-tree__clean button{text-align:left;height:36px;width:100%}.mapa-dropdown-tree--highlight .mat-form-field-outline{border-radius:16px!important}.mapa-dropdown-tree--highlight .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown-tree--highlight .mat-form-field-outline .mat-form-field-outline-end{border-width:2px!important;border-color:#eedb2a!important}.mapa-dropdown-tree--highlight .mat-form-field-outline .mat-form-field-outline-start{display:none!important}.mapa-dropdown-tree--highlight .mat-form-field-outline .mat-form-field-outline-end{border-radius:16px!important;border-left-style:solid!important}.mapa-dropdown-tree--soft-border .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown-tree--soft-border .mat-form-field-outline .mat-form-field-outline-end{border-width:1px!important}.mapa-dropdown-tree--tag .mat-form-field-outline{border-radius:16px!important;height:42px!important}.mapa-dropdown-tree--tag .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown-tree--tag .mat-form-field-outline .mat-form-field-outline-end{border-width:1px!important;border-color:#cdcdcd}.mapa-dropdown-tree--tag .mat-form-field-outline .mat-form-field-outline-start{display:none!important}.mapa-dropdown-tree--tag .mat-form-field-outline .mat-form-field-outline-end{border-radius:16px!important;border-left-style:solid!important}.mapa-dropdown-tree .mat-form-field-outline{background-color:#fff;border-radius:8px}.mapa-dropdown-tree .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown-tree .mat-form-field-outline .mat-form-field-outline-end{border-width:2px}.mapa-dropdown-tree .mat-form-field-wrapper{padding-bottom:unset!important}.mapa-dropdown-tree .mat-form-field-flex{display:flex;align-items:center;height:48px}.mapa-dropdown-tree .mat-form-field-infix{border-top:unset!important;padding:unset!important;position:relative}.mapa-dropdown-tree .mat-select-trigger{min-width:50px;padding-top:.3em;height:unset!important}.mapa-dropdown-tree .mat-select-value-text{display:block;width:90%}.mapa-dropdown-tree .mat-select-arrow-wrapper{transform:none!important}.mapa-dropdown-tree .mat-select-arrow{border:unset}.mapa-dropdown-tree .mat-select-arrow:before,.mapa-dropdown-tree .mat-select-arrow:after{content:\"\";display:block;margin-top:-4px;position:absolute;right:10px;top:50%;width:0;border:solid black;border-width:0 2px 2px 0;padding:3px;transform:rotate(45deg);-webkit-transform:rotate(45deg)}.mapa-dropdown-tree [aria-expanded=true] .mat-select-arrow{margin:6px 0 0}.mapa-dropdown-tree [aria-expanded=true] .mat-select-arrow:before,.mapa-dropdown-tree [aria-expanded=true] .mat-select-arrow:after{transform:rotate(-135deg)!important;-webkit-transform:rotate(-135deg)!important}.mapa-overlay-dropdown-tree .mat-checkbox-label{color:#77838f!important;font-size:16px!important;font-style:normal;font-weight:400}.mapa-overlay-dropdown-tree .mat-menu-panel{width:100%;max-width:none!important;overflow:hidden}.mapa-overlay-dropdown-tree .mat-input-element{font-family:Inter,sans-serif;font-size:14px}.mapa-overlay-dropdown-tree .mat-menu-content{padding-bottom:unset!important;padding-top:unset!important}.mapa-overlay-dropdown-tree .mat-tree{display:flex;gap:8px;flex-direction:column;max-height:260px;padding-bottom:24px;overflow-y:auto}.mapa-overlay-dropdown-tree .mat-tree-node{color:#50575e!important}.mapa-overlay-dropdown-tree ul{padding-inline-start:20px!important;margin-block-start:0px!important;margin-block-end:0px!important;gap:8px}.mapa-overlay-dropdown-tree .tree-toggle,.mapa-overlay-dropdown-tree .mat-tree .mat-focus-indicator{display:none}.mapa-overlay-dropdown-tree .mat-tree .mat-tree-node{min-height:28px!important;padding:4px 0;flex:unset!important}.mapa-overlay-dropdown-tree .mat-tree .mat-tree-node:hover{background:rgba(0,0,0,.04)}.mapa-overlay-dropdown-tree .mat-select-tree-hide{display:block!important}.mapa-overlay-dropdown-tree .mat-autocomplete-panel .mat-option{padding:unset!important}.mapa-overlay-dropdown-tree .mat-select-panel{border-radius:8px;min-width:calc(100% + 24px)!important}.mapa-overlay-dropdown-tree .mat-select-panel .mat-option,.mapa-overlay-dropdown-tree .mat-select-panel .mat-option-text{font-family:Inter,sans-serif!important;font-size:16px;font-style:normal;font-weight:400;line-height:2em;height:2em;color:#50575e}.mapa-overlay-dropdown-tree .mapa-dropdown__search.mat-option{display:flex;padding:16px 8px!important;flex-direction:column;justify-content:center;align-items:center;gap:10px;align-self:stretch;background:#f6f7f7;height:unset!important}.mapa-overlay-dropdown-tree .mapa-dropdown__search.mat-option .mat-select-search-inside-mat-option{height:unset!important;line-height:unset!important}.mapa-overlay-dropdown-tree .mapa-dropdown__search.mat-option .mat-select-search-clear{top:-3px!important}.mapa-overlay-dropdown-tree .mapa-dropdown__search.mat-option .mat-select-search-inner{top:8px;border:2px solid #a7aaad;border-radius:8px!important;width:100%!important}.mapa-overlay-dropdown-tree .mapa-dropdown__search.mat-option .mat-select-search-toggle-all-checkbox{padding-left:8px!important}.mapa-overlay-dropdown-tree .mapa-dropdown__search.mat-option .mat-select-search-input{padding:8px 8px 8px 6px!important;height:unset!important;line-height:unset!important}.mapa-overlay-dropdown-tree .mapa-dropdown__search.mat-option .mat-select-search-input::placeholder{color:#c3c4c7!important}.mapa-overlay-dropdown-tree .mapa-dropdown__search .mat-option-text{width:100%}.mapa-overlay-dropdown-tree .mat-pseudo-checkbox{color:#c3c4c7!important}.mapa-overlay-dropdown-tree .mat-checkbox-frame{border-color:#c3c4c7!important}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: MapaDropdownComponent, selector: "mapa-dropdown", inputs: ["formControl", "formControlSearch", "element", "border"] }], encapsulation: i0.ViewEncapsulation.None });
637
386
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapaDropdownTreeComponent, decorators: [{
638
387
  type: Component,
639
- args: [{ selector: 'mapa-dropdown-tree', encapsulation: ViewEncapsulation.None, template: "<form\n [formGroup]=\"formGroup\"\n *ngIf=\"formGroup && element\"\n class=\"mapa-dropdown-tree\"\n>\n <label *ngIf=\"element.label\" class=\"mapa-dropdown-tree__label\">\n {{ element.label }}\n </label>\n <button\n class=\"mapa-dropdown-tree__dropdown\"\n #menuOption=\"matMenuTrigger\"\n [matMenuTriggerFor]=\"menu\"\n >\n <div class=\"mapa-dropdown-tree__dropdown--value\">\n {{ getSelectedItems() }}\n </div>\n\n <mat-icon *ngIf=\"hasValue()\" (click)=\"clearValue($event)\" matSuffix\n >close</mat-icon\n >\n <mat-icon>\n {{ menuOption.menuOpen ? 'keyboard_arrow_up' : 'keyboard_arrow_down' }}\n </mat-icon>\n </button>\n \n <div class=\"mapa-dropdown-tree__hint\" *ngIf=\"element.hint\">{{ element.hint }}</div>\n \n <mat-menu #menu=\"matMenu\">\n <div (click)=\"$event.stopPropagation()\">\n <div class=\"mapa-dropdown-tree__search\" *ngIf=\"element.search\">\n <mat-form-field appearance=\"outline\">\n <input\n matInput\n #searchInput\n [formControl]=\"element.search?.formControl!\"\n [placeholder]=\"element.search?.placeholder || ''\"\n (keydown)=\"$event.stopPropagation()\"\n (keyup)=\"filterChanged($event)\"\n />\n <mat-icon\n *ngIf=\"!!element.search?.formControl?.value && !element.search?.formControl?.disabled\"\n (click)=\"clearSearchValue()\"\n matSuffix\n >close</mat-icon\n >\n </mat-form-field>\n </div>\n <section [formGroup]=\"formGroup\">\n <label\n *ngIf=\"element.multiple === true\"\n class=\"mapa-dropdown-tree__toggle-all mapa-dropdown-tree__checkbox\"\n >\n <mat-checkbox\n #toggleAllCheckbox\n class=\"checklist-leaf-node\"\n (change)=\"toggleAll($event)\"\n [checked]=\"isAllNodeSelected()\"\n [indeterminate]=\"!isAllNodeSelected() && checklistSelection.hasValue()\"\n color=\"accent\"\n >Selecionar todos</mat-checkbox\n >\n </label>\n\n <mat-tree [dataSource]=\"dataSource\" [treeControl]=\"treeControl\">\n <mat-tree-node\n *matTreeNodeDef=\"let node\"\n matTreeNodePadding\n matTreeNodePaddingIndent=\"13\"\n [class.mapa-dropdown-tree__checkbox--checked]=\"checklistSelection.isSelected(node)\"\n >\n <label class=\"mapa-dropdown-tree__checkbox\">\n <button mat-icon-button disabled></button>\n <!-- LEAF CHECKBOX -->\n <mat-checkbox\n *ngIf=\"element.multiple === true; else noCheckbox\"\n class=\"checklist-leaf-node\"\n [checked]=\"checklistSelection.isSelected(node)\"\n (change)=\"todoLeafItemSelectionToggle(node)\"\n color=\"accent\"\n >{{node.value}}</mat-checkbox\n >\n <ng-template #noCheckbox>\n <div (click)=\"selectSingleItem(node, true)\">\n {{node.value}}\n </div>\n </ng-template>\n </label>\n </mat-tree-node>\n\n <mat-tree-node\n *matTreeNodeDef=\"let node; when: hasChild\"\n matTreeNodePadding\n matTreeNodePaddingIndent=\"13\"\n [class.mapa-dropdown-tree__checkbox--checked]=\"checklistSelection.isSelected(node)\"\n >\n <label class=\"mapa-dropdown-tree__checkbox\">\n <!-- <button\n mat-icon-button\n matTreeNodeToggle\n [attr.aria-label]=\"'toggle ' + node.filename\"\n >\n <mat-icon class=\"mat-icon-rtl-mirror\">\n {{treeControl.isExpanded(node) ? 'expand_more' :\n 'chevron_right'}}\n </mat-icon>\n </button> -->\n <!-- [checked]=\"descendantsAllSelected(node)\" -->\n <!-- PARENT CHECKBOX -->\n <mat-checkbox\n *ngIf=\"element.multiple === true; else noCheckbox\"\n [checked]=\"checklistSelection.isSelected(node)\"\n [indeterminate]=\"descendantsPartiallySelected(node)\"\n (change)=\"todoItemSelectionToggle(node)\"\n color=\"accent\"\n >\n {{node.value}}</mat-checkbox\n >\n <ng-template #noCheckbox>\n <div (click)=\"selectSingleItem(node, true)\">\n {{node.value}}\n </div>\n </ng-template>\n </label>\n </mat-tree-node>\n </mat-tree>\n </section>\n <button\n *ngIf=\"element.multiple === true\"\n mat-button\n class=\"mapa-dropdown-tree__button\"\n color=\"primary\"\n (click)=\"clearAll()\"\n >\n Limpar todos\n </button>\n </div>\n </mat-menu>\n</form>\n", styles: [".mapa-dropdown-tree{min-width:235px;max-width:none;width:100%!important;margin-bottom:24px}.mapa-dropdown-tree .mat-select{font-family:Inter,sans-serif!important}.mapa-dropdown-tree__hint{font-size:12px;font-style:normal;font-weight:400;line-height:16px;color:#77838f;margin-bottom:16px}.mapa-dropdown-tree__toggle-all .checklist-leaf-node{padding:16px 0}.mapa-dropdown-tree__label,.mapa-dropdown-tree__checkbox{display:block;font-style:normal;font-weight:400;line-height:16px;width:100%;padding:0 16px}.mapa-dropdown-tree__label div,.mapa-dropdown-tree__checkbox div{width:100%}.mapa-dropdown-tree__label--checked,.mapa-dropdown-tree__checkbox--checked{background:rgba(0,0,0,.12)}.mapa-dropdown-tree__checkbox{font-size:16px;padding:0 16px}.mapa-dropdown-tree__label{padding:0!important;font-size:12px!important;font-weight:600!important;margin-bottom:16px;text-transform:uppercase}.mapa-dropdown-tree__dropdown{display:flex;align-items:center;justify-content:flex-start;background-color:#fff;width:100%;border:2px solid #a7aaad;border-radius:8px;padding:10px 12px;margin-bottom:8px}.mapa-dropdown-tree__dropdown--value{flex-grow:1;font-family:Inter,sans-serif!important;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:300px}.mapa-dropdown-tree__button{background:#fff;border-top:1px solid #dcdcde!important;color:#ea561d;font-family:Inter,sans-serif;font-size:16px;font-style:normal;font-weight:500;line-height:28px;padding:9px;text-align:left!important;width:100%}.mapa-dropdown-tree__button .mat-button-wrapper{color:#ea561d!important;padding:4px 8px}.mapa-dropdown-tree__search{display:flex;align-items:center;justify-content:flex-start;background:#f6f7f7;width:100%;padding:10px 0 16px 16px!important}.mapa-dropdown-tree__search .mat-input-element{padding:4px 0}.mapa-dropdown-tree__search .mat-form-field{width:94%}.mapa-dropdown-tree__search .mat-form-field-wrapper{padding-bottom:unset!important}.mapa-dropdown-tree__search .mat-form-field-outline{background:white;border-radius:8px}.mapa-dropdown-tree__search .mat-form-field-appearance-outline .mat-form-field-infix{border-top:unset!important;padding:.7em 0 .5em}.mapa-dropdown-tree__clean{background:white;border-top:1px solid #dcdcde;bottom:0%;height:36px;position:absolute;width:100%;z-index:9999}.mapa-dropdown-tree__clean button{text-align:left;height:36px;width:100%}.mapa-dropdown-tree--highlight .mat-form-field-outline{border-radius:16px!important}.mapa-dropdown-tree--highlight .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown-tree--highlight .mat-form-field-outline .mat-form-field-outline-end{border-width:2px!important;border-color:#eedb2a!important}.mapa-dropdown-tree--highlight .mat-form-field-outline .mat-form-field-outline-start{display:none!important}.mapa-dropdown-tree--highlight .mat-form-field-outline .mat-form-field-outline-end{border-radius:16px!important;border-left-style:solid!important}.mapa-dropdown-tree--soft-border .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown-tree--soft-border .mat-form-field-outline .mat-form-field-outline-end{border-width:1px!important}.mapa-dropdown-tree--tag .mat-form-field-outline{border-radius:16px!important;height:42px!important}.mapa-dropdown-tree--tag .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown-tree--tag .mat-form-field-outline .mat-form-field-outline-end{border-width:1px!important;border-color:#cdcdcd}.mapa-dropdown-tree--tag .mat-form-field-outline .mat-form-field-outline-start{display:none!important}.mapa-dropdown-tree--tag .mat-form-field-outline .mat-form-field-outline-end{border-radius:16px!important;border-left-style:solid!important}.mapa-dropdown-tree .mat-form-field-outline{background-color:#fff;border-radius:8px}.mapa-dropdown-tree .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown-tree .mat-form-field-outline .mat-form-field-outline-end{border-width:2px}.mapa-dropdown-tree .mat-form-field-wrapper{padding-bottom:unset!important}.mapa-dropdown-tree .mat-form-field-flex{display:flex;align-items:center;height:48px}.mapa-dropdown-tree .mat-form-field-infix{border-top:unset!important;padding:unset!important;position:relative}.mapa-dropdown-tree .mat-select-trigger{min-width:50px;padding-top:.3em;height:unset!important}.mapa-dropdown-tree .mat-select-value-text{display:block;width:90%}.mapa-dropdown-tree .mat-select-arrow-wrapper{transform:none!important}.mapa-dropdown-tree .mat-select-arrow{border:unset}.mapa-dropdown-tree .mat-select-arrow:before,.mapa-dropdown-tree .mat-select-arrow:after{content:\"\";display:block;margin-top:-4px;position:absolute;right:10px;top:50%;width:0;border:solid black;border-width:0 2px 2px 0;padding:3px;transform:rotate(45deg);-webkit-transform:rotate(45deg)}.mapa-dropdown-tree [aria-expanded=true] .mat-select-arrow{margin:6px 0 0}.mapa-dropdown-tree [aria-expanded=true] .mat-select-arrow:before,.mapa-dropdown-tree [aria-expanded=true] .mat-select-arrow:after{transform:rotate(-135deg)!important;-webkit-transform:rotate(-135deg)!important}.mapa-overlay-dropdown-tree .mat-checkbox-label{color:#77838f!important;font-size:16px!important;font-style:normal;font-weight:400}.mapa-overlay-dropdown-tree .mat-menu-panel{width:100%;max-width:none!important;overflow:hidden}.mapa-overlay-dropdown-tree .mat-input-element{font-family:Inter,sans-serif;font-size:14px}.mapa-overlay-dropdown-tree .mat-menu-content{padding-bottom:unset!important;padding-top:unset!important}.mapa-overlay-dropdown-tree .mat-tree{display:flex;gap:8px;flex-direction:column;max-height:260px;padding-bottom:24px;overflow-y:auto}.mapa-overlay-dropdown-tree .mat-tree-node{color:#50575e!important}.mapa-overlay-dropdown-tree ul{padding-inline-start:20px!important;margin-block-start:0px!important;margin-block-end:0px!important;gap:8px}.mapa-overlay-dropdown-tree .tree-toggle,.mapa-overlay-dropdown-tree .mat-tree .mat-focus-indicator{display:none}.mapa-overlay-dropdown-tree .mat-tree .mat-tree-node{min-height:28px!important;padding:4px 0;flex:unset!important}.mapa-overlay-dropdown-tree .mat-tree .mat-tree-node:hover{background:rgba(0,0,0,.04)}.mapa-overlay-dropdown-tree .mat-select-tree-hide{display:block!important}.mapa-overlay-dropdown-tree .mat-autocomplete-panel .mat-option{padding:unset!important}.mapa-overlay-dropdown-tree .mat-select-panel{border-radius:8px;min-width:calc(100% + 24px)!important}.mapa-overlay-dropdown-tree .mat-select-panel .mat-option,.mapa-overlay-dropdown-tree .mat-select-panel .mat-option-text{font-family:Inter,sans-serif!important;font-size:16px;font-style:normal;font-weight:400;line-height:2em;height:2em;color:#50575e}.mapa-overlay-dropdown-tree .mapa-dropdown__search.mat-option{display:flex;padding:16px 8px!important;flex-direction:column;justify-content:center;align-items:center;gap:10px;align-self:stretch;background:#f6f7f7;height:unset!important}.mapa-overlay-dropdown-tree .mapa-dropdown__search.mat-option .mat-select-search-inside-mat-option{height:unset!important;line-height:unset!important}.mapa-overlay-dropdown-tree .mapa-dropdown__search.mat-option .mat-select-search-clear{top:-3px!important}.mapa-overlay-dropdown-tree .mapa-dropdown__search.mat-option .mat-select-search-inner{top:8px;border:2px solid #a7aaad;border-radius:8px!important;width:100%!important}.mapa-overlay-dropdown-tree .mapa-dropdown__search.mat-option .mat-select-search-toggle-all-checkbox{padding-left:8px!important}.mapa-overlay-dropdown-tree .mapa-dropdown__search.mat-option .mat-select-search-input{padding:8px 8px 8px 6px!important;height:unset!important;line-height:unset!important}.mapa-overlay-dropdown-tree .mapa-dropdown__search.mat-option .mat-select-search-input::placeholder{color:#c3c4c7!important}.mapa-overlay-dropdown-tree .mapa-dropdown__search .mat-option-text{width:100%}.mapa-overlay-dropdown-tree .mat-pseudo-checkbox{color:#c3c4c7!important}.mapa-overlay-dropdown-tree .mat-checkbox-frame{border-color:#c3c4c7!important}\n"] }]
640
- }], ctorParameters: function () { return [{ type: ChecklistDatabase }]; }, propDecorators: { formGroup: [{
388
+ args: [{ selector: 'mapa-dropdown-tree', encapsulation: ViewEncapsulation.None, template: "<section [formGroup]=\"formGroup\" *ngIf=\"elementOption\">\n <mapa-dropdown\n [formControl]=\"getFormControl(element)\"\n [element]=\"elementOption\"\n ></mapa-dropdown>\n</section>\n", styles: [".mapa-dropdown-tree{min-width:235px;max-width:none;width:100%!important;margin-bottom:24px}.mapa-dropdown-tree .mat-select{font-family:Inter,sans-serif!important}.mapa-dropdown-tree__hint{font-size:12px;font-style:normal;font-weight:400;line-height:16px;color:#77838f;margin-bottom:16px}.mapa-dropdown-tree__toggle-all .checklist-leaf-node{padding:16px 0}.mapa-dropdown-tree__label,.mapa-dropdown-tree__checkbox{display:block;font-style:normal;font-weight:400;line-height:16px;width:100%;padding:0 16px}.mapa-dropdown-tree__label div,.mapa-dropdown-tree__checkbox div{width:100%}.mapa-dropdown-tree__label--checked,.mapa-dropdown-tree__checkbox--checked{background:rgba(0,0,0,.12)}.mapa-dropdown-tree__checkbox{font-size:16px;padding:0 16px}.mapa-dropdown-tree__label{padding:0!important;font-size:12px!important;font-weight:600!important;margin-bottom:16px;text-transform:uppercase}.mapa-dropdown-tree__dropdown{display:flex;align-items:center;justify-content:flex-start;background-color:#fff;width:100%;border:2px solid #a7aaad;border-radius:8px;padding:10px 12px;margin-bottom:8px}.mapa-dropdown-tree__dropdown--value{flex-grow:1;font-family:Inter,sans-serif!important;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:300px}.mapa-dropdown-tree__button{background:#fff;border-top:1px solid #dcdcde!important;color:#ea561d;font-family:Inter,sans-serif;font-size:16px;font-style:normal;font-weight:500;line-height:28px;padding:9px;text-align:left!important;width:100%}.mapa-dropdown-tree__button .mat-button-wrapper{color:#ea561d!important;padding:4px 8px}.mapa-dropdown-tree__search{display:flex;align-items:center;justify-content:flex-start;background:#f6f7f7;width:100%;padding:10px 0 16px 16px!important}.mapa-dropdown-tree__search .mat-input-element{padding:4px 0}.mapa-dropdown-tree__search .mat-form-field{width:94%}.mapa-dropdown-tree__search .mat-form-field-wrapper{padding-bottom:unset!important}.mapa-dropdown-tree__search .mat-form-field-outline{background:white;border-radius:8px}.mapa-dropdown-tree__search .mat-form-field-appearance-outline .mat-form-field-infix{border-top:unset!important;padding:.7em 0 .5em}.mapa-dropdown-tree__clean{background:white;border-top:1px solid #dcdcde;bottom:0%;height:36px;position:absolute;width:100%;z-index:9999}.mapa-dropdown-tree__clean button{text-align:left;height:36px;width:100%}.mapa-dropdown-tree--highlight .mat-form-field-outline{border-radius:16px!important}.mapa-dropdown-tree--highlight .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown-tree--highlight .mat-form-field-outline .mat-form-field-outline-end{border-width:2px!important;border-color:#eedb2a!important}.mapa-dropdown-tree--highlight .mat-form-field-outline .mat-form-field-outline-start{display:none!important}.mapa-dropdown-tree--highlight .mat-form-field-outline .mat-form-field-outline-end{border-radius:16px!important;border-left-style:solid!important}.mapa-dropdown-tree--soft-border .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown-tree--soft-border .mat-form-field-outline .mat-form-field-outline-end{border-width:1px!important}.mapa-dropdown-tree--tag .mat-form-field-outline{border-radius:16px!important;height:42px!important}.mapa-dropdown-tree--tag .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown-tree--tag .mat-form-field-outline .mat-form-field-outline-end{border-width:1px!important;border-color:#cdcdcd}.mapa-dropdown-tree--tag .mat-form-field-outline .mat-form-field-outline-start{display:none!important}.mapa-dropdown-tree--tag .mat-form-field-outline .mat-form-field-outline-end{border-radius:16px!important;border-left-style:solid!important}.mapa-dropdown-tree .mat-form-field-outline{background-color:#fff;border-radius:8px}.mapa-dropdown-tree .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown-tree .mat-form-field-outline .mat-form-field-outline-end{border-width:2px}.mapa-dropdown-tree .mat-form-field-wrapper{padding-bottom:unset!important}.mapa-dropdown-tree .mat-form-field-flex{display:flex;align-items:center;height:48px}.mapa-dropdown-tree .mat-form-field-infix{border-top:unset!important;padding:unset!important;position:relative}.mapa-dropdown-tree .mat-select-trigger{min-width:50px;padding-top:.3em;height:unset!important}.mapa-dropdown-tree .mat-select-value-text{display:block;width:90%}.mapa-dropdown-tree .mat-select-arrow-wrapper{transform:none!important}.mapa-dropdown-tree .mat-select-arrow{border:unset}.mapa-dropdown-tree .mat-select-arrow:before,.mapa-dropdown-tree .mat-select-arrow:after{content:\"\";display:block;margin-top:-4px;position:absolute;right:10px;top:50%;width:0;border:solid black;border-width:0 2px 2px 0;padding:3px;transform:rotate(45deg);-webkit-transform:rotate(45deg)}.mapa-dropdown-tree [aria-expanded=true] .mat-select-arrow{margin:6px 0 0}.mapa-dropdown-tree [aria-expanded=true] .mat-select-arrow:before,.mapa-dropdown-tree [aria-expanded=true] .mat-select-arrow:after{transform:rotate(-135deg)!important;-webkit-transform:rotate(-135deg)!important}.mapa-overlay-dropdown-tree .mat-checkbox-label{color:#77838f!important;font-size:16px!important;font-style:normal;font-weight:400}.mapa-overlay-dropdown-tree .mat-menu-panel{width:100%;max-width:none!important;overflow:hidden}.mapa-overlay-dropdown-tree .mat-input-element{font-family:Inter,sans-serif;font-size:14px}.mapa-overlay-dropdown-tree .mat-menu-content{padding-bottom:unset!important;padding-top:unset!important}.mapa-overlay-dropdown-tree .mat-tree{display:flex;gap:8px;flex-direction:column;max-height:260px;padding-bottom:24px;overflow-y:auto}.mapa-overlay-dropdown-tree .mat-tree-node{color:#50575e!important}.mapa-overlay-dropdown-tree ul{padding-inline-start:20px!important;margin-block-start:0px!important;margin-block-end:0px!important;gap:8px}.mapa-overlay-dropdown-tree .tree-toggle,.mapa-overlay-dropdown-tree .mat-tree .mat-focus-indicator{display:none}.mapa-overlay-dropdown-tree .mat-tree .mat-tree-node{min-height:28px!important;padding:4px 0;flex:unset!important}.mapa-overlay-dropdown-tree .mat-tree .mat-tree-node:hover{background:rgba(0,0,0,.04)}.mapa-overlay-dropdown-tree .mat-select-tree-hide{display:block!important}.mapa-overlay-dropdown-tree .mat-autocomplete-panel .mat-option{padding:unset!important}.mapa-overlay-dropdown-tree .mat-select-panel{border-radius:8px;min-width:calc(100% + 24px)!important}.mapa-overlay-dropdown-tree .mat-select-panel .mat-option,.mapa-overlay-dropdown-tree .mat-select-panel .mat-option-text{font-family:Inter,sans-serif!important;font-size:16px;font-style:normal;font-weight:400;line-height:2em;height:2em;color:#50575e}.mapa-overlay-dropdown-tree .mapa-dropdown__search.mat-option{display:flex;padding:16px 8px!important;flex-direction:column;justify-content:center;align-items:center;gap:10px;align-self:stretch;background:#f6f7f7;height:unset!important}.mapa-overlay-dropdown-tree .mapa-dropdown__search.mat-option .mat-select-search-inside-mat-option{height:unset!important;line-height:unset!important}.mapa-overlay-dropdown-tree .mapa-dropdown__search.mat-option .mat-select-search-clear{top:-3px!important}.mapa-overlay-dropdown-tree .mapa-dropdown__search.mat-option .mat-select-search-inner{top:8px;border:2px solid #a7aaad;border-radius:8px!important;width:100%!important}.mapa-overlay-dropdown-tree .mapa-dropdown__search.mat-option .mat-select-search-toggle-all-checkbox{padding-left:8px!important}.mapa-overlay-dropdown-tree .mapa-dropdown__search.mat-option .mat-select-search-input{padding:8px 8px 8px 6px!important;height:unset!important;line-height:unset!important}.mapa-overlay-dropdown-tree .mapa-dropdown__search.mat-option .mat-select-search-input::placeholder{color:#c3c4c7!important}.mapa-overlay-dropdown-tree .mapa-dropdown__search .mat-option-text{width:100%}.mapa-overlay-dropdown-tree .mat-pseudo-checkbox{color:#c3c4c7!important}.mapa-overlay-dropdown-tree .mat-checkbox-frame{border-color:#c3c4c7!important}\n"] }]
389
+ }], propDecorators: { formGroup: [{
641
390
  type: Input
642
391
  }], element: [{
643
392
  type: Input
644
- }], autocomplete: [{
645
- type: ViewChild,
646
- args: ['auto']
647
- }], tree: [{
648
- type: ViewChild,
649
- args: ['tree']
650
- }], trigger: [{
651
- type: ViewChild,
652
- args: [MatMenuTrigger]
653
- }], toggleAllCheckbox: [{
654
- type: ViewChild,
655
- args: ['toggleAllCheckbox']
656
393
  }] } });
657
394
 
658
395
  class MapaDropdownTreeModule {
@@ -663,6 +400,7 @@ MapaDropdownTreeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0",
663
400
  ReactiveFormsModule,
664
401
  MatButtonModule,
665
402
  MapaButtonModule,
403
+ MapaDropdownModule,
666
404
  MatListModule,
667
405
  MatIconModule,
668
406
  MatInputModule,
@@ -685,6 +423,7 @@ MapaDropdownTreeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0",
685
423
  ReactiveFormsModule,
686
424
  MatButtonModule,
687
425
  MapaButtonModule,
426
+ MapaDropdownModule,
688
427
  MatListModule,
689
428
  MatIconModule,
690
429
  MatInputModule,
@@ -704,6 +443,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
704
443
  ReactiveFormsModule,
705
444
  MatButtonModule,
706
445
  MapaButtonModule,
446
+ MapaDropdownModule,
707
447
  MatListModule,
708
448
  MatIconModule,
709
449
  MatInputModule,