mapa-library-ui 0.71.0 → 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.
- package/esm2020/lib/core/interfaces/element-option.interface.mjs +1 -1
- package/esm2020/src/lib/components/capability/lib/components/dropdown/src/dropdown.component.mjs +20 -10
- package/esm2020/src/lib/components/capability/lib/components/dropdown/src/dropdown.module.mjs +5 -1
- package/esm2020/src/lib/components/capability/lib/core/interfaces/element-option.interface.mjs +1 -1
- package/esm2020/src/lib/components/chart/lib/components/dropdown/src/dropdown.component.mjs +20 -10
- package/esm2020/src/lib/components/chart/lib/components/dropdown/src/dropdown.module.mjs +5 -1
- package/esm2020/src/lib/components/chart/lib/core/interfaces/element-option.interface.mjs +1 -1
- package/esm2020/src/lib/components/dropdown/lib/components/dropdown/src/dropdown.component.mjs +20 -10
- package/esm2020/src/lib/components/dropdown/lib/components/dropdown/src/dropdown.module.mjs +5 -1
- package/esm2020/src/lib/components/dropdown/lib/components/dropdown-tree/src/dropdown.component.mjs +38 -263
- package/esm2020/src/lib/components/dropdown/lib/components/dropdown-tree/src/dropdown.module.mjs +5 -1
- package/esm2020/src/lib/components/dropdown/lib/core/elements/index.mjs +10 -0
- package/esm2020/src/lib/components/dropdown/lib/core/elements/input-text.mjs +8 -0
- package/esm2020/src/lib/components/dropdown/lib/core/elements/radio-button.mjs +8 -0
- package/esm2020/src/lib/components/dropdown/lib/core/elements/slide-toggle.mjs +8 -0
- package/esm2020/src/lib/components/dropdown/lib/core/elements/textarea.mjs +8 -0
- package/esm2020/src/lib/components/dropdown/lib/core/interfaces/button-icon.interface.mjs +2 -0
- package/esm2020/src/lib/components/dropdown/lib/core/interfaces/chart-options.interface.mjs +2 -0
- package/esm2020/src/lib/components/dropdown/lib/core/interfaces/classification.interface.mjs +2 -0
- package/esm2020/src/lib/components/dropdown/lib/core/interfaces/dialog-data.interface.mjs +2 -0
- package/esm2020/src/lib/components/dropdown/lib/core/interfaces/element-option.interface.mjs +1 -1
- package/esm2020/src/lib/components/dropdown/lib/core/interfaces/index.mjs +7 -0
- package/esm2020/src/lib/components/dropdown/lib/core/interfaces/table-column.interface.mjs +2 -0
- package/esm2020/src/lib/components/dropdown/lib/core/interfaces/table-row-click-event.interface.mjs +2 -0
- package/esm2020/src/lib/components/dropdown-tree/lib/components/dropdown/src/dropdown.component.mjs +20 -10
- package/esm2020/src/lib/components/dropdown-tree/lib/components/dropdown/src/dropdown.module.mjs +5 -1
- package/esm2020/src/lib/components/dropdown-tree/lib/components/dropdown-tree/src/dropdown.component.mjs +38 -263
- package/esm2020/src/lib/components/dropdown-tree/lib/components/dropdown-tree/src/dropdown.module.mjs +5 -1
- package/esm2020/src/lib/components/dropdown-tree/lib/core/elements/index.mjs +10 -0
- package/esm2020/src/lib/components/dropdown-tree/lib/core/elements/input-text.mjs +8 -0
- package/esm2020/src/lib/components/dropdown-tree/lib/core/elements/radio-button.mjs +8 -0
- package/esm2020/src/lib/components/dropdown-tree/lib/core/elements/slide-toggle.mjs +8 -0
- package/esm2020/src/lib/components/dropdown-tree/lib/core/elements/textarea.mjs +8 -0
- package/esm2020/src/lib/components/dropdown-tree/lib/core/interfaces/button-icon.interface.mjs +2 -0
- package/esm2020/src/lib/components/dropdown-tree/lib/core/interfaces/chart-options.interface.mjs +2 -0
- package/esm2020/src/lib/components/dropdown-tree/lib/core/interfaces/classification.interface.mjs +2 -0
- package/esm2020/src/lib/components/dropdown-tree/lib/core/interfaces/dialog-data.interface.mjs +2 -0
- package/esm2020/src/lib/components/dropdown-tree/lib/core/interfaces/element-option.interface.mjs +1 -1
- package/esm2020/src/lib/components/dropdown-tree/lib/core/interfaces/index.mjs +7 -0
- package/esm2020/src/lib/components/dropdown-tree/lib/core/interfaces/table-column.interface.mjs +2 -0
- package/esm2020/src/lib/components/dropdown-tree/lib/core/interfaces/table-row-click-event.interface.mjs +2 -0
- package/esm2020/src/lib/components/form/lib/core/interfaces/element-option.interface.mjs +1 -1
- package/esm2020/src/lib/components/group-report/lib/components/dropdown/src/dropdown.component.mjs +20 -10
- package/esm2020/src/lib/components/group-report/lib/components/dropdown/src/dropdown.module.mjs +5 -1
- package/esm2020/src/lib/components/group-report/lib/core/interfaces/element-option.interface.mjs +1 -1
- package/esm2020/src/lib/components/nav-list/lib/core/interfaces/element-option.interface.mjs +1 -1
- package/esm2020/src/lib/components/radio-button/lib/core/interfaces/element-option.interface.mjs +1 -1
- package/esm2020/src/lib/components/scale/lib/components/dropdown/src/dropdown.component.mjs +20 -10
- package/esm2020/src/lib/components/scale/lib/components/dropdown/src/dropdown.module.mjs +5 -1
- package/esm2020/src/lib/components/scale/lib/core/interfaces/element-option.interface.mjs +1 -1
- package/esm2020/src/lib/components/scale-parameterization/lib/components/dropdown/src/dropdown.component.mjs +20 -10
- package/esm2020/src/lib/components/scale-parameterization/lib/components/dropdown/src/dropdown.module.mjs +5 -1
- package/esm2020/src/lib/components/scale-parameterization/lib/core/interfaces/element-option.interface.mjs +1 -1
- package/esm2020/src/lib/components/slide-toggle/lib/core/interfaces/element-option.interface.mjs +1 -1
- package/esm2020/src/lib/components/textarea/lib/core/interfaces/element-option.interface.mjs +1 -1
- package/fesm2015/mapa-library-ui-src-lib-components-capability.mjs +25 -10
- package/fesm2015/mapa-library-ui-src-lib-components-capability.mjs.map +1 -1
- package/fesm2015/mapa-library-ui-src-lib-components-chart.mjs +23 -8
- package/fesm2015/mapa-library-ui-src-lib-components-chart.mjs.map +1 -1
- package/fesm2015/mapa-library-ui-src-lib-components-dropdown-tree.mjs +62 -334
- package/fesm2015/mapa-library-ui-src-lib-components-dropdown-tree.mjs.map +1 -1
- package/fesm2015/mapa-library-ui-src-lib-components-dropdown.mjs +62 -334
- package/fesm2015/mapa-library-ui-src-lib-components-dropdown.mjs.map +1 -1
- package/fesm2015/mapa-library-ui-src-lib-components-scale-parameterization.mjs +25 -10
- package/fesm2015/mapa-library-ui-src-lib-components-scale-parameterization.mjs.map +1 -1
- package/fesm2020/mapa-library-ui-src-lib-components-capability.mjs +24 -10
- package/fesm2020/mapa-library-ui-src-lib-components-capability.mjs.map +1 -1
- package/fesm2020/mapa-library-ui-src-lib-components-chart.mjs +22 -8
- package/fesm2020/mapa-library-ui-src-lib-components-chart.mjs.map +1 -1
- package/fesm2020/mapa-library-ui-src-lib-components-dropdown-tree.mjs +63 -323
- package/fesm2020/mapa-library-ui-src-lib-components-dropdown-tree.mjs.map +1 -1
- package/fesm2020/mapa-library-ui-src-lib-components-dropdown.mjs +63 -323
- package/fesm2020/mapa-library-ui-src-lib-components-dropdown.mjs.map +1 -1
- package/fesm2020/mapa-library-ui-src-lib-components-scale-parameterization.mjs +24 -10
- package/fesm2020/mapa-library-ui-src-lib-components-scale-parameterization.mjs.map +1 -1
- package/lib/core/interfaces/element-option.interface.d.ts +1 -0
- package/mapa-library-ui-0.72.0.tgz +0 -0
- package/package.json +1 -1
- package/src/lib/components/capability/lib/components/dropdown/src/dropdown.component.d.ts +3 -1
- package/src/lib/components/capability/lib/components/dropdown/src/dropdown.module.d.ts +7 -6
- package/src/lib/components/capability/lib/core/interfaces/element-option.interface.d.ts +1 -0
- package/src/lib/components/chart/lib/components/dropdown/src/dropdown.component.d.ts +3 -1
- package/src/lib/components/chart/lib/components/dropdown/src/dropdown.module.d.ts +7 -6
- package/src/lib/components/chart/lib/core/interfaces/element-option.interface.d.ts +1 -0
- package/src/lib/components/dropdown/lib/components/dropdown/src/dropdown.component.d.ts +3 -1
- package/src/lib/components/dropdown/lib/components/dropdown/src/dropdown.module.d.ts +7 -6
- package/src/lib/components/dropdown/lib/components/dropdown-tree/src/dropdown.component.d.ts +8 -67
- package/src/lib/components/dropdown/lib/components/dropdown-tree/src/dropdown.module.d.ts +10 -9
- package/src/lib/components/dropdown/lib/core/elements/index.d.ts +9 -0
- package/src/lib/components/dropdown/lib/core/elements/input-text.d.ts +4 -0
- package/src/lib/components/dropdown/lib/core/elements/radio-button.d.ts +4 -0
- package/src/lib/components/dropdown/lib/core/elements/slide-toggle.d.ts +4 -0
- package/src/lib/components/dropdown/lib/core/elements/textarea.d.ts +4 -0
- package/src/lib/components/dropdown/lib/core/interfaces/button-icon.interface.d.ts +6 -0
- package/src/lib/components/dropdown/lib/core/interfaces/chart-options.interface.d.ts +19 -0
- package/src/lib/components/dropdown/lib/core/interfaces/classification.interface.d.ts +6 -0
- package/src/lib/components/dropdown/lib/core/interfaces/dialog-data.interface.d.ts +11 -0
- package/src/lib/components/dropdown/lib/core/interfaces/element-option.interface.d.ts +1 -0
- package/src/lib/components/dropdown/lib/core/interfaces/index.d.ts +6 -0
- package/src/lib/components/dropdown/lib/core/interfaces/table-column.interface.d.ts +19 -0
- package/src/lib/components/dropdown/lib/core/interfaces/table-row-click-event.interface.d.ts +4 -0
- package/src/lib/components/dropdown-tree/lib/components/dropdown/src/dropdown.component.d.ts +3 -1
- package/src/lib/components/dropdown-tree/lib/components/dropdown/src/dropdown.module.d.ts +7 -6
- package/src/lib/components/dropdown-tree/lib/components/dropdown-tree/src/dropdown.component.d.ts +8 -67
- package/src/lib/components/dropdown-tree/lib/components/dropdown-tree/src/dropdown.module.d.ts +10 -9
- package/src/lib/components/dropdown-tree/lib/core/elements/index.d.ts +9 -0
- package/src/lib/components/dropdown-tree/lib/core/elements/input-text.d.ts +4 -0
- package/src/lib/components/dropdown-tree/lib/core/elements/radio-button.d.ts +4 -0
- package/src/lib/components/dropdown-tree/lib/core/elements/slide-toggle.d.ts +4 -0
- package/src/lib/components/dropdown-tree/lib/core/elements/textarea.d.ts +4 -0
- package/src/lib/components/dropdown-tree/lib/core/interfaces/button-icon.interface.d.ts +6 -0
- package/src/lib/components/dropdown-tree/lib/core/interfaces/chart-options.interface.d.ts +19 -0
- package/src/lib/components/dropdown-tree/lib/core/interfaces/classification.interface.d.ts +6 -0
- package/src/lib/components/dropdown-tree/lib/core/interfaces/dialog-data.interface.d.ts +11 -0
- package/src/lib/components/dropdown-tree/lib/core/interfaces/element-option.interface.d.ts +1 -0
- package/src/lib/components/dropdown-tree/lib/core/interfaces/index.d.ts +6 -0
- package/src/lib/components/dropdown-tree/lib/core/interfaces/table-column.interface.d.ts +19 -0
- package/src/lib/components/dropdown-tree/lib/core/interfaces/table-row-click-event.interface.d.ts +4 -0
- package/src/lib/components/form/lib/core/interfaces/element-option.interface.d.ts +1 -0
- package/src/lib/components/group-report/lib/components/dropdown/src/dropdown.component.d.ts +3 -1
- package/src/lib/components/group-report/lib/components/dropdown/src/dropdown.module.d.ts +7 -6
- package/src/lib/components/group-report/lib/core/interfaces/element-option.interface.d.ts +1 -0
- package/src/lib/components/nav-list/lib/core/interfaces/element-option.interface.d.ts +1 -0
- package/src/lib/components/radio-button/lib/core/interfaces/element-option.interface.d.ts +1 -0
- package/src/lib/components/scale/lib/components/dropdown/src/dropdown.component.d.ts +3 -1
- package/src/lib/components/scale/lib/components/dropdown/src/dropdown.module.d.ts +7 -6
- package/src/lib/components/scale/lib/core/interfaces/element-option.interface.d.ts +1 -0
- package/src/lib/components/scale-parameterization/lib/components/dropdown/src/dropdown.component.d.ts +3 -1
- package/src/lib/components/scale-parameterization/lib/components/dropdown/src/dropdown.module.d.ts +7 -6
- package/src/lib/components/scale-parameterization/lib/core/interfaces/element-option.interface.d.ts +1 -0
- package/src/lib/components/slide-toggle/lib/core/interfaces/element-option.interface.d.ts +1 -0
- package/src/lib/components/textarea/lib/core/interfaces/element-option.interface.d.ts +1 -0
- package/esm2020/src/lib/components/dropdown/lib/components/dropdown-tree/src/checklist-database.mjs +0 -58
- package/esm2020/src/lib/components/dropdown-tree/lib/components/dropdown-tree/src/checklist-database.mjs +0 -58
- package/mapa-library-ui-0.71.0.tgz +0 -0
- package/src/lib/components/dropdown/lib/components/dropdown-tree/src/checklist-database.d.ts +0 -13
- 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
|
|
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
|
|
8
|
-
import { FormsModule, ReactiveFormsModule
|
|
9
|
-
import * as
|
|
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
|
|
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
|
|
15
|
+
import * as i7 from '@angular/material/select';
|
|
14
16
|
import { MatSelectModule, MAT_SELECT_CONFIG } from '@angular/material/select';
|
|
15
|
-
import * as
|
|
16
|
-
import * as
|
|
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
|
|
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 = {}) {
|
|
@@ -198,7 +191,8 @@ class MapaDropdownComponent {
|
|
|
198
191
|
filteredLength === this.filteredOptionsCache.length;
|
|
199
192
|
}
|
|
200
193
|
}
|
|
201
|
-
toggleSelectAll(
|
|
194
|
+
toggleSelectAll(event) {
|
|
195
|
+
const selectAllValue = event.checked;
|
|
202
196
|
this.filteredOptions.subscribe((options) => {
|
|
203
197
|
var _a, _b;
|
|
204
198
|
if (selectAllValue) {
|
|
@@ -218,6 +212,15 @@ class MapaDropdownComponent {
|
|
|
218
212
|
}
|
|
219
213
|
});
|
|
220
214
|
}
|
|
215
|
+
toggleSelection(change) {
|
|
216
|
+
var _a, _b;
|
|
217
|
+
if (change.checked) {
|
|
218
|
+
(_a = this.formControl) === null || _a === void 0 ? void 0 : _a.setValue(this.filteredOptions);
|
|
219
|
+
}
|
|
220
|
+
else {
|
|
221
|
+
(_b = this.formControl) === null || _b === void 0 ? void 0 : _b.setValue([]);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
221
224
|
isElementGroup(object) {
|
|
222
225
|
try {
|
|
223
226
|
return (object.label !== undefined &&
|
|
@@ -239,10 +242,10 @@ class MapaDropdownComponent {
|
|
|
239
242
|
}
|
|
240
243
|
}
|
|
241
244
|
MapaDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapaDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
242
|
-
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 });
|
|
245
|
+
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 });
|
|
243
246
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapaDropdownComponent, decorators: [{
|
|
244
247
|
type: Component,
|
|
245
|
-
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 [
|
|
248
|
+
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"] }]
|
|
246
249
|
}], ctorParameters: function () { return []; }, propDecorators: { formControl: [{
|
|
247
250
|
type: Input
|
|
248
251
|
}], formControlSearch: [{
|
|
@@ -281,6 +284,7 @@ MapaDropdownModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", vers
|
|
|
281
284
|
FormsModule,
|
|
282
285
|
ReactiveFormsModule,
|
|
283
286
|
MatButtonModule,
|
|
287
|
+
MatCheckboxModule,
|
|
284
288
|
MapaButtonModule,
|
|
285
289
|
MatListModule,
|
|
286
290
|
MatIconModule,
|
|
@@ -299,6 +303,7 @@ MapaDropdownModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", vers
|
|
|
299
303
|
FormsModule,
|
|
300
304
|
ReactiveFormsModule,
|
|
301
305
|
MatButtonModule,
|
|
306
|
+
MatCheckboxModule,
|
|
302
307
|
MapaButtonModule,
|
|
303
308
|
MatListModule,
|
|
304
309
|
MatIconModule,
|
|
@@ -314,6 +319,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
314
319
|
FormsModule,
|
|
315
320
|
ReactiveFormsModule,
|
|
316
321
|
MatButtonModule,
|
|
322
|
+
MatCheckboxModule,
|
|
317
323
|
MapaButtonModule,
|
|
318
324
|
MatListModule,
|
|
319
325
|
MatIconModule,
|
|
@@ -337,62 +343,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
337
343
|
* Public API Surface of mapa-library-ui dropdown
|
|
338
344
|
*/
|
|
339
345
|
|
|
340
|
-
class ChecklistDatabase {
|
|
341
|
-
get data() {
|
|
342
|
-
return this.dataChange.value;
|
|
343
|
-
}
|
|
344
|
-
constructor() {
|
|
345
|
-
this.dataChange = new BehaviorSubject([]);
|
|
346
|
-
}
|
|
347
|
-
initialize(treeData) {
|
|
348
|
-
this.treeData = treeData;
|
|
349
|
-
// Build the tree nodes from Json object. The result is a list of `TodoItemNode` with nested
|
|
350
|
-
// file node as children.
|
|
351
|
-
const data = treeData;
|
|
352
|
-
// Notify the change.
|
|
353
|
-
this.dataChange.next(data);
|
|
354
|
-
}
|
|
355
|
-
filter(filterText) {
|
|
356
|
-
let filteredTreeData;
|
|
357
|
-
if (filterText) {
|
|
358
|
-
// Filter the tree
|
|
359
|
-
function filter(array, text) {
|
|
360
|
-
const getChildren = (result, object) => {
|
|
361
|
-
var _a, _b;
|
|
362
|
-
if (((_a = object.value) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(text === null || text === void 0 ? void 0 : text.toLowerCase())) ||
|
|
363
|
-
((_b = object.children) === null || _b === void 0 ? void 0 : _b.some((child) => { var _a; return (_a = child.value) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(text === null || text === void 0 ? void 0 : text.toLowerCase()); }))) {
|
|
364
|
-
result.push(object);
|
|
365
|
-
return result;
|
|
366
|
-
}
|
|
367
|
-
if (Array.isArray(object.children) && object.children.length > 0) {
|
|
368
|
-
const children = object.children.reduce(getChildren, []);
|
|
369
|
-
if (children.length)
|
|
370
|
-
result.push(Object.assign(Object.assign({}, object), { children }));
|
|
371
|
-
}
|
|
372
|
-
return result;
|
|
373
|
-
};
|
|
374
|
-
return array.reduce(getChildren, []);
|
|
375
|
-
}
|
|
376
|
-
filteredTreeData = filter(this.treeData, filterText);
|
|
377
|
-
}
|
|
378
|
-
else {
|
|
379
|
-
// Return the initial tree
|
|
380
|
-
filteredTreeData = this.treeData;
|
|
381
|
-
}
|
|
382
|
-
// Build the tree nodes from Json object. The result is a list of `TodoItemNode` with nested
|
|
383
|
-
// file node as children.
|
|
384
|
-
const data = filteredTreeData;
|
|
385
|
-
// Notify the change.
|
|
386
|
-
this.dataChange.next(data);
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
ChecklistDatabase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChecklistDatabase, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
390
|
-
ChecklistDatabase.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChecklistDatabase, providedIn: "root" });
|
|
391
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChecklistDatabase, decorators: [{
|
|
392
|
-
type: Injectable,
|
|
393
|
-
args: [{ providedIn: "root" }]
|
|
394
|
-
}], ctorParameters: function () { return []; } });
|
|
395
|
-
|
|
396
346
|
class DataNode {
|
|
397
347
|
constructor() { }
|
|
398
348
|
}
|
|
@@ -401,273 +351,48 @@ class DataFlatNode {
|
|
|
401
351
|
constructor() { }
|
|
402
352
|
}
|
|
403
353
|
class MapaDropdownTreeComponent {
|
|
404
|
-
constructor(_database) {
|
|
405
|
-
this._database = _database;
|
|
406
|
-
this.isMenuExpanded = false;
|
|
407
|
-
/** Map from flat node to nested node. This helps us finding the nested node to be modified */
|
|
408
|
-
this.flatNodeMap = new Map();
|
|
409
|
-
/** Map from nested node to flattened node. This helps us to keep the same object for selection */
|
|
410
|
-
this.nestedNodeMap = new Map();
|
|
411
|
-
/** A selected parent node to be inserted */
|
|
412
|
-
this.selectedParent = null;
|
|
413
|
-
/** The new item's name */
|
|
414
|
-
this.newItemName = '';
|
|
415
|
-
/** The selection for checklist */
|
|
416
|
-
this.checklistSelection = new SelectionModel(true);
|
|
417
|
-
/// Filtering
|
|
418
|
-
this.myControl = new FormControl();
|
|
419
|
-
this.options = [];
|
|
420
|
-
this.getLevel = (node) => node.level;
|
|
421
|
-
this.isExpandable = (node) => node.expandable;
|
|
422
|
-
this.getChildren = (node) => node.children;
|
|
423
|
-
this.hasChild = (_, _nodeData) => _nodeData.expandable;
|
|
424
|
-
this.hasNoContent = (_, _nodeData) => _nodeData.value === '';
|
|
425
|
-
/**
|
|
426
|
-
* Transformer to convert nested node to flat node. Record the nodes in maps for later use.
|
|
427
|
-
*/
|
|
428
|
-
this.transformer = (node, level) => {
|
|
429
|
-
const existingNode = this.nestedNodeMap.get(node);
|
|
430
|
-
const flatNode = existingNode && existingNode.value === node.value
|
|
431
|
-
? existingNode
|
|
432
|
-
: new DataFlatNode();
|
|
433
|
-
flatNode.key = node.key;
|
|
434
|
-
flatNode.value = node.value;
|
|
435
|
-
flatNode.level = level;
|
|
436
|
-
flatNode.expandable = !!node.children;
|
|
437
|
-
this.flatNodeMap.set(flatNode, node);
|
|
438
|
-
this.nestedNodeMap.set(node, flatNode);
|
|
439
|
-
return flatNode;
|
|
440
|
-
};
|
|
441
|
-
}
|
|
442
354
|
ngOnInit() {
|
|
443
|
-
|
|
444
|
-
this.
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
this.
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
: {
|
|
460
|
-
value: selection.source.selected[0].value,
|
|
461
|
-
key: selection.source.selected[0].key,
|
|
462
|
-
}, { emitEvent: false });
|
|
463
|
-
}
|
|
464
|
-
});
|
|
465
|
-
(_a = this.formGroup.get(this.element.key)) === null || _a === void 0 ? void 0 : _a.valueChanges.subscribe((value) => {
|
|
466
|
-
var _a;
|
|
467
|
-
if (value) {
|
|
468
|
-
if (this.element.multiple) {
|
|
469
|
-
const allValuesKeys = this.element.multiple
|
|
470
|
-
? value.map((item) => item.key)
|
|
471
|
-
: [value.key];
|
|
472
|
-
this.treeControl.dataNodes.map((node) => {
|
|
473
|
-
if (allValuesKeys.includes(node.key)) {
|
|
474
|
-
if (this.element.multiple && node.level === 0) {
|
|
475
|
-
this.todoItemSelectionToggle(node);
|
|
476
|
-
}
|
|
477
|
-
else {
|
|
478
|
-
this.todoLeafItemSelectionToggle(node);
|
|
479
|
-
}
|
|
480
|
-
}
|
|
481
|
-
});
|
|
482
|
-
}
|
|
483
|
-
else {
|
|
484
|
-
this.selectSingleItem((_a = this.treeControl.dataNodes) === null || _a === void 0 ? void 0 : _a.find((node) => node.key === value.key));
|
|
485
|
-
}
|
|
355
|
+
const options = this.formatTree(this.element.tree);
|
|
356
|
+
this.elementOption = Object.assign(Object.assign({}, this.element), { options });
|
|
357
|
+
}
|
|
358
|
+
getFormControl(element) {
|
|
359
|
+
return this.formGroup.get(element.key);
|
|
360
|
+
}
|
|
361
|
+
formatTree(tree, childrenLevel = 0) {
|
|
362
|
+
const options = [];
|
|
363
|
+
tree.map((item) => {
|
|
364
|
+
options.push({
|
|
365
|
+
value: item.value,
|
|
366
|
+
key: item.key,
|
|
367
|
+
childrenLevel,
|
|
368
|
+
});
|
|
369
|
+
if (item.children) {
|
|
370
|
+
options.push(...this.formatTree(this.formatTreeChildren(item.children, childrenLevel + 1), childrenLevel + 1));
|
|
486
371
|
}
|
|
487
372
|
});
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
}
|
|
498
|
-
else {
|
|
499
|
-
this.checklistSelection.select(node);
|
|
500
|
-
}
|
|
501
|
-
this.checklistSelection.toggle(node);
|
|
502
|
-
const descendants = this.treeControl.getDescendants(node);
|
|
503
|
-
this.checklistSelection.select(...descendants);
|
|
504
|
-
if (checked) {
|
|
505
|
-
descendants.every((child) => this.checklistSelection.deselect(child));
|
|
506
|
-
}
|
|
507
|
-
else {
|
|
508
|
-
descendants.every((child) => this.checklistSelection.select(child));
|
|
509
|
-
}
|
|
373
|
+
return options;
|
|
374
|
+
}
|
|
375
|
+
formatTreeChildren(children, childrenLevel) {
|
|
376
|
+
const options = [];
|
|
377
|
+
children.map((item) => {
|
|
378
|
+
options.push({
|
|
379
|
+
value: item.value,
|
|
380
|
+
key: item.key,
|
|
381
|
+
childrenLevel,
|
|
382
|
+
});
|
|
510
383
|
});
|
|
511
|
-
|
|
512
|
-
clearAll() {
|
|
513
|
-
var _a, _b;
|
|
514
|
-
this.checklistSelection.clear();
|
|
515
|
-
if (this.element.multiple) {
|
|
516
|
-
(_a = this.formGroup.get(this.element.key)) === null || _a === void 0 ? void 0 : _a.patchValue([]);
|
|
517
|
-
this.toggleAllCheckbox.checked = false;
|
|
518
|
-
}
|
|
519
|
-
else {
|
|
520
|
-
(_b = this.formGroup.get(this.element.key)) === null || _b === void 0 ? void 0 : _b.patchValue(null);
|
|
521
|
-
}
|
|
522
|
-
}
|
|
523
|
-
onPanelChange() {
|
|
524
|
-
this.isMenuExpanded = !this.isMenuExpanded;
|
|
525
|
-
}
|
|
526
|
-
filter(array, text) {
|
|
527
|
-
const getNodes = (result, object) => {
|
|
528
|
-
var _a;
|
|
529
|
-
if ((_a = object.name) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(text)) {
|
|
530
|
-
result.push(object);
|
|
531
|
-
return result;
|
|
532
|
-
}
|
|
533
|
-
if (Array.isArray(object.children)) {
|
|
534
|
-
const children = object.children.reduce(getNodes, []);
|
|
535
|
-
if (children.length)
|
|
536
|
-
result.push(Object.assign(Object.assign({}, object), { children }));
|
|
537
|
-
}
|
|
538
|
-
return result;
|
|
539
|
-
};
|
|
540
|
-
this.element.tree = array.reduce(getNodes, []);
|
|
541
|
-
}
|
|
542
|
-
/** Whether all the descendants of the node are selected. */
|
|
543
|
-
descendantsAllSelected(node) {
|
|
544
|
-
const descendants = this.treeControl.getDescendants(node);
|
|
545
|
-
const descAllSelected = descendants.every((child) => this.checklistSelection.isSelected(child));
|
|
546
|
-
return descAllSelected;
|
|
547
|
-
}
|
|
548
|
-
/** Whether part of the descendants are selected */
|
|
549
|
-
descendantsPartiallySelected(node) {
|
|
550
|
-
const descendants = this.treeControl.getDescendants(node);
|
|
551
|
-
const result = descendants.some((child) => this.checklistSelection.isSelected(child));
|
|
552
|
-
return result && !this.descendantsAllSelected(node);
|
|
553
|
-
}
|
|
554
|
-
/** Toggle the to-do item selection. Select/deselect all the descendants node */
|
|
555
|
-
todoItemSelectionToggle(node) {
|
|
556
|
-
this.checklistSelection.toggle(node);
|
|
557
|
-
if (this.element.checkChildren) {
|
|
558
|
-
const descendants = this.treeControl.getDescendants(node);
|
|
559
|
-
this.checklistSelection.isSelected(node)
|
|
560
|
-
? this.checklistSelection.select(...descendants)
|
|
561
|
-
: this.checklistSelection.deselect(...descendants);
|
|
562
|
-
// Force update for the parent
|
|
563
|
-
descendants.every((child) => this.checklistSelection.isSelected(child));
|
|
564
|
-
this.checkAllParentsSelection(node);
|
|
565
|
-
}
|
|
566
|
-
}
|
|
567
|
-
/** Toggle a leaf to-do item selection. Check all the parents to see if they changed */
|
|
568
|
-
todoLeafItemSelectionToggle(node) {
|
|
569
|
-
this.checklistSelection.toggle(node);
|
|
570
|
-
this.checkAllParentsSelection(node);
|
|
571
|
-
}
|
|
572
|
-
/* Checks all the parents when a leaf node is selected/unselected */
|
|
573
|
-
checkAllParentsSelection(node) {
|
|
574
|
-
let parent = this.getParentNode(node);
|
|
575
|
-
while (parent) {
|
|
576
|
-
this.checkRootNodeSelection(parent);
|
|
577
|
-
parent = this.getParentNode(parent);
|
|
578
|
-
}
|
|
579
|
-
}
|
|
580
|
-
/** Check root node checked state and change it accordingly */
|
|
581
|
-
checkRootNodeSelection(node) {
|
|
582
|
-
const nodeSelected = this.checklistSelection.isSelected(node);
|
|
583
|
-
const descendants = this.treeControl.getDescendants(node);
|
|
584
|
-
const descAllSelected = descendants.every((child) => this.checklistSelection.isSelected(child));
|
|
585
|
-
if (nodeSelected && !descAllSelected) {
|
|
586
|
-
this.checklistSelection.deselect(node);
|
|
587
|
-
}
|
|
588
|
-
else if (!nodeSelected && descAllSelected) {
|
|
589
|
-
this.checklistSelection.select(node);
|
|
590
|
-
}
|
|
591
|
-
}
|
|
592
|
-
/* Get the parent node of a node */
|
|
593
|
-
getParentNode(node) {
|
|
594
|
-
const currentLevel = this.getLevel(node);
|
|
595
|
-
if (currentLevel < 1) {
|
|
596
|
-
return null;
|
|
597
|
-
}
|
|
598
|
-
const startIndex = this.treeControl.dataNodes.indexOf(node) - 1;
|
|
599
|
-
for (let i = startIndex; i >= 0; i--) {
|
|
600
|
-
const currentNode = this.treeControl.dataNodes[i];
|
|
601
|
-
if (this.getLevel(currentNode) < currentLevel) {
|
|
602
|
-
return currentNode;
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
|
-
return null;
|
|
606
|
-
}
|
|
607
|
-
getSelectedItems() {
|
|
608
|
-
if (!this.checklistSelection.selected.length)
|
|
609
|
-
return this.element.placeholder || '';
|
|
610
|
-
return this.checklistSelection.selected ? this.checklistSelection.selected
|
|
611
|
-
.map((s) => (s === null || s === void 0 ? void 0 : s.value) || s || '')
|
|
612
|
-
.join(',')
|
|
613
|
-
.toString()
|
|
614
|
-
.replace(/\,/g, ', ') : this.element.placeholder || '';
|
|
615
|
-
}
|
|
616
|
-
filterChanged(event) {
|
|
617
|
-
var _a;
|
|
618
|
-
const filterText = (_a = event.target) === null || _a === void 0 ? void 0 : _a.value;
|
|
619
|
-
// ChecklistDatabase.filter method which actually filters the tree and gives back a tree structure
|
|
620
|
-
this._database.filter(filterText);
|
|
621
|
-
}
|
|
622
|
-
clearSearchValue() {
|
|
623
|
-
var _a, _b;
|
|
624
|
-
(_b = (_a = this.element.search) === null || _a === void 0 ? void 0 : _a.formControl) === null || _b === void 0 ? void 0 : _b.setValue('');
|
|
625
|
-
this._database.filter('');
|
|
626
|
-
}
|
|
627
|
-
selectSingleItem(node) {
|
|
628
|
-
var _a;
|
|
629
|
-
this.checklistSelection.clear();
|
|
630
|
-
this.checklistSelection.select(node);
|
|
631
|
-
(_a = this.formGroup
|
|
632
|
-
.get(this.element.key)) === null || _a === void 0 ? void 0 : _a.patchValue({ value: node.value, key: node.key }, { emitEvent: false });
|
|
633
|
-
this.trigger.closeMenu();
|
|
634
|
-
}
|
|
635
|
-
hasValue() {
|
|
636
|
-
var _a;
|
|
637
|
-
return !!((_a = this.formGroup.get(this.element.key)) === null || _a === void 0 ? void 0 : _a.value);
|
|
638
|
-
}
|
|
639
|
-
clearValue(event) {
|
|
640
|
-
var _a;
|
|
641
|
-
event.stopPropagation();
|
|
642
|
-
(_a = this.formGroup.get(this.element.key)) === null || _a === void 0 ? void 0 : _a.patchValue(null);
|
|
643
|
-
this.checklistSelection.clear();
|
|
644
|
-
}
|
|
645
|
-
isAllNodeSelected() {
|
|
646
|
-
return !!(this.treeControl.dataNodes.length ===
|
|
647
|
-
this.checklistSelection.selected.length);
|
|
384
|
+
return options;
|
|
648
385
|
}
|
|
649
386
|
}
|
|
650
|
-
MapaDropdownTreeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapaDropdownTreeComponent, deps: [
|
|
651
|
-
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)\">\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)\">\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 });
|
|
387
|
+
MapaDropdownTreeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapaDropdownTreeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
388
|
+
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 });
|
|
652
389
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapaDropdownTreeComponent, decorators: [{
|
|
653
390
|
type: Component,
|
|
654
|
-
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)\">\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)\">\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"] }]
|
|
655
|
-
}],
|
|
391
|
+
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"] }]
|
|
392
|
+
}], propDecorators: { formGroup: [{
|
|
656
393
|
type: Input
|
|
657
394
|
}], element: [{
|
|
658
395
|
type: Input
|
|
659
|
-
}], autocomplete: [{
|
|
660
|
-
type: ViewChild,
|
|
661
|
-
args: ['auto']
|
|
662
|
-
}], tree: [{
|
|
663
|
-
type: ViewChild,
|
|
664
|
-
args: ['tree']
|
|
665
|
-
}], trigger: [{
|
|
666
|
-
type: ViewChild,
|
|
667
|
-
args: [MatMenuTrigger]
|
|
668
|
-
}], toggleAllCheckbox: [{
|
|
669
|
-
type: ViewChild,
|
|
670
|
-
args: ['toggleAllCheckbox']
|
|
671
396
|
}] } });
|
|
672
397
|
|
|
673
398
|
class MapaDropdownTreeModule {
|
|
@@ -678,6 +403,7 @@ MapaDropdownTreeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0",
|
|
|
678
403
|
ReactiveFormsModule,
|
|
679
404
|
MatButtonModule,
|
|
680
405
|
MapaButtonModule,
|
|
406
|
+
MapaDropdownModule,
|
|
681
407
|
MatListModule,
|
|
682
408
|
MatIconModule,
|
|
683
409
|
MatInputModule,
|
|
@@ -700,6 +426,7 @@ MapaDropdownTreeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0",
|
|
|
700
426
|
ReactiveFormsModule,
|
|
701
427
|
MatButtonModule,
|
|
702
428
|
MapaButtonModule,
|
|
429
|
+
MapaDropdownModule,
|
|
703
430
|
MatListModule,
|
|
704
431
|
MatIconModule,
|
|
705
432
|
MatInputModule,
|
|
@@ -719,6 +446,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
719
446
|
ReactiveFormsModule,
|
|
720
447
|
MatButtonModule,
|
|
721
448
|
MapaButtonModule,
|
|
449
|
+
MapaDropdownModule,
|
|
722
450
|
MatListModule,
|
|
723
451
|
MatIconModule,
|
|
724
452
|
MatInputModule,
|