mapa-library-ui 2.1.1 → 2.2.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/README.md +85 -5
- package/fesm2022/mapa-library-ui-src-lib-components-breadcrumb.mjs +10 -2
- package/fesm2022/mapa-library-ui-src-lib-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-button.mjs +8 -2
- package/fesm2022/mapa-library-ui-src-lib-components-button.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-capability.mjs +48 -3
- package/fesm2022/mapa-library-ui-src-lib-components-capability.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-chart.mjs +48 -3
- package/fesm2022/mapa-library-ui-src-lib-components-chart.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-datepicker.mjs +39 -0
- package/fesm2022/mapa-library-ui-src-lib-components-datepicker.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-dialog.mjs +9 -3
- package/fesm2022/mapa-library-ui-src-lib-components-dialog.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-dropdown-tree.mjs +48 -3
- package/fesm2022/mapa-library-ui-src-lib-components-dropdown-tree.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-dropdown.mjs +48 -3
- package/fesm2022/mapa-library-ui-src-lib-components-dropdown.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-filters.mjs +50 -5
- package/fesm2022/mapa-library-ui-src-lib-components-filters.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-form.mjs +49 -4
- package/fesm2022/mapa-library-ui-src-lib-components-form.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-group-report.mjs +197 -150
- package/fesm2022/mapa-library-ui-src-lib-components-group-report.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-input.mjs +48 -3
- package/fesm2022/mapa-library-ui-src-lib-components-input.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-scale-parameterization.mjs +39 -0
- package/fesm2022/mapa-library-ui-src-lib-components-scale-parameterization.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-scale.mjs +39 -0
- package/fesm2022/mapa-library-ui-src-lib-components-scale.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-table.mjs +46 -4
- package/fesm2022/mapa-library-ui-src-lib-components-table.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-textarea.mjs +39 -0
- package/fesm2022/mapa-library-ui-src-lib-components-textarea.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-warning.mjs +39 -0
- package/fesm2022/mapa-library-ui-src-lib-components-warning.mjs.map +1 -1
- package/fesm2022/mapa-library-ui.mjs +797 -25
- package/fesm2022/mapa-library-ui.mjs.map +1 -1
- package/index.d.ts +451 -4
- package/mapa-library-ui-2.2.0.tgz +0 -0
- package/package.json +50 -2
- package/src/lib/components/breadcrumb/index.d.ts +3 -1
- package/src/lib/components/button/index.d.ts +3 -1
- package/src/lib/components/capability/index.d.ts +4 -1
- package/src/lib/components/dialog/index.d.ts +3 -1
- package/src/lib/components/filters/index.d.ts +3 -1
- package/src/lib/components/form/index.d.ts +3 -1
- package/src/lib/components/group-report/index.d.ts +2 -0
- package/src/lib/components/scale/index.d.ts +1 -0
- package/src/lib/components/scale-parameterization/index.d.ts +1 -0
- package/src/lib/components/table/index.d.ts +2 -0
- package/mapa-library-ui-2.1.1.tgz +0 -0
|
@@ -27,21 +27,27 @@ import * as i1$2 from '@angular/platform-browser';
|
|
|
27
27
|
|
|
28
28
|
class ButtonComponent {
|
|
29
29
|
constructor() {
|
|
30
|
+
this.shape = 'pill';
|
|
31
|
+
this.fullWidth = false;
|
|
30
32
|
this.clicked = new EventEmitter();
|
|
31
33
|
}
|
|
32
34
|
onClick() {
|
|
33
35
|
this.clicked.emit();
|
|
34
36
|
}
|
|
35
37
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
36
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.21", type: ButtonComponent, isStandalone: true, selector: "mapa-button", inputs: { color: "color", disabled: "disabled" }, outputs: { clicked: "clicked" }, ngImport: i0, template: "<button\n class=\"mapa-button\"\n (click)=\"onClick()\"\n [class.primary]=\"color === 'primary'\"\n [class.accent]=\"color === 'accent'\"\n [class.basic]=\"color === 'basic'\"\n [disabled]=\"disabled\"\n>\n <ng-content></ng-content>\n</button
|
|
38
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.21", type: ButtonComponent, isStandalone: true, selector: "mapa-button", inputs: { color: "color", disabled: "disabled", shape: "shape", fullWidth: "fullWidth" }, outputs: { clicked: "clicked" }, ngImport: i0, template: "<button\n class=\"mapa-button\"\n (click)=\"onClick()\"\n [class.primary]=\"color === 'primary'\"\n [class.accent]=\"color === 'accent'\"\n [class.basic]=\"color === 'basic'\"\n [class.mapa-button--rounded]=\"shape === 'rounded'\"\n [class.mapa-button--full-width]=\"fullWidth\"\n [disabled]=\"disabled\"\n>\n <ng-content></ng-content>\n</button>\n", styles: [".mapa-button{display:flex;padding:14px 42px;justify-content:center;align-items:center;gap:10px;border-radius:28px;border:none;font-family:var(--mapa-font-body, \"Asap\", \"Roboto\", \"Inter\", sans-serif);font-weight:500;cursor:pointer;transform-origin:center;transition:transform .2s ease-in-out}.mapa-button:active{transform:scale(.98)}.mapa-button:disabled{color:#aeb4b8;background-color:#f1f3f4;cursor:not-allowed}.mapa-button.basic{color:#ea561d;background-color:transparent}.mapa-button.accent{border:2px solid #ea561d;color:#ea561d;background-color:#fff}.mapa-button.primary{background-color:#ea561d;color:#fff}.mapa-button--rounded{border-radius:6px}.mapa-button--full-width{width:100%}.mapa-button:focus-visible{outline:3px solid rgba(255,86,11,.28);outline-offset:2px}\n"] }); }
|
|
37
39
|
}
|
|
38
40
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
39
41
|
type: Component,
|
|
40
|
-
args: [{ selector: 'mapa-button', standalone: true, template: "<button\n class=\"mapa-button\"\n (click)=\"onClick()\"\n [class.primary]=\"color === 'primary'\"\n [class.accent]=\"color === 'accent'\"\n [class.basic]=\"color === 'basic'\"\n [disabled]=\"disabled\"\n>\n <ng-content></ng-content>\n</button
|
|
42
|
+
args: [{ selector: 'mapa-button', standalone: true, template: "<button\n class=\"mapa-button\"\n (click)=\"onClick()\"\n [class.primary]=\"color === 'primary'\"\n [class.accent]=\"color === 'accent'\"\n [class.basic]=\"color === 'basic'\"\n [class.mapa-button--rounded]=\"shape === 'rounded'\"\n [class.mapa-button--full-width]=\"fullWidth\"\n [disabled]=\"disabled\"\n>\n <ng-content></ng-content>\n</button>\n", styles: [".mapa-button{display:flex;padding:14px 42px;justify-content:center;align-items:center;gap:10px;border-radius:28px;border:none;font-family:var(--mapa-font-body, \"Asap\", \"Roboto\", \"Inter\", sans-serif);font-weight:500;cursor:pointer;transform-origin:center;transition:transform .2s ease-in-out}.mapa-button:active{transform:scale(.98)}.mapa-button:disabled{color:#aeb4b8;background-color:#f1f3f4;cursor:not-allowed}.mapa-button.basic{color:#ea561d;background-color:transparent}.mapa-button.accent{border:2px solid #ea561d;color:#ea561d;background-color:#fff}.mapa-button.primary{background-color:#ea561d;color:#fff}.mapa-button--rounded{border-radius:6px}.mapa-button--full-width{width:100%}.mapa-button:focus-visible{outline:3px solid rgba(255,86,11,.28);outline-offset:2px}\n"] }]
|
|
41
43
|
}], propDecorators: { color: [{
|
|
42
44
|
type: Input
|
|
43
45
|
}], disabled: [{
|
|
44
46
|
type: Input
|
|
47
|
+
}], shape: [{
|
|
48
|
+
type: Input
|
|
49
|
+
}], fullWidth: [{
|
|
50
|
+
type: Input
|
|
45
51
|
}], clicked: [{
|
|
46
52
|
type: Output
|
|
47
53
|
}] } });
|
|
@@ -74,6 +80,9 @@ function formatPaginatorShowingRange(page, pageSize, length) {
|
|
|
74
80
|
const itemLabel = safeLength === 1 ? 'item' : 'itens';
|
|
75
81
|
return `Mostrando ${startIndex + 1} - ${endIndex} de ${safeLength} ${itemLabel}`;
|
|
76
82
|
}
|
|
83
|
+
function formatItemCount(count) {
|
|
84
|
+
return `${count} ${count === 1 ? 'item' : 'itens'}`;
|
|
85
|
+
}
|
|
77
86
|
const DEFAULT_MAPA_UI_TEXTS = {
|
|
78
87
|
common: {
|
|
79
88
|
selectAll: 'Selecionar todos',
|
|
@@ -100,6 +109,41 @@ const DEFAULT_MAPA_UI_TEXTS = {
|
|
|
100
109
|
negativeDirectionLabel: 'Direção Negativa |',
|
|
101
110
|
positiveDirectionLabel: 'Direção Positiva |',
|
|
102
111
|
},
|
|
112
|
+
report: {
|
|
113
|
+
summarized: 'Resumida',
|
|
114
|
+
detailed: 'Detalhada',
|
|
115
|
+
list: 'Lista',
|
|
116
|
+
chart: 'Gráfico',
|
|
117
|
+
viewModeLabel: 'Modo de visualização',
|
|
118
|
+
readingInformationTitle: 'Informações de leitura',
|
|
119
|
+
dimensionTitle: 'Dimensão',
|
|
120
|
+
conceptTitle: 'Conceito',
|
|
121
|
+
classificationTitle: 'Classificação',
|
|
122
|
+
resultReadingTitle: 'Leitura do resultado',
|
|
123
|
+
resultTitle: 'Resultado',
|
|
124
|
+
globalAverageTitle: 'Média global',
|
|
125
|
+
factorsTitle: 'Fatores relativos à organização e ao trabalho',
|
|
126
|
+
strongPointsTitle: 'Pontos fortes',
|
|
127
|
+
attentionPointsTitle: 'Pontos de atenção',
|
|
128
|
+
vulnerabilitiesTitle: 'Vulnerabilidades socioemocionais',
|
|
129
|
+
positiveDirectionLabel: 'Direção positiva',
|
|
130
|
+
negativeDirectionLabel: 'Direção negativa',
|
|
131
|
+
lowerIntensityLabel: 'Menos intensamente',
|
|
132
|
+
higherIntensityLabel: 'Mais intensamente',
|
|
133
|
+
noClassification: 'Sem classificação',
|
|
134
|
+
emptyState: 'Não há resultados disponíveis para esta seção.',
|
|
135
|
+
interpretationTitle: 'Interpretação',
|
|
136
|
+
detailedListLabel: 'Lista detalhada',
|
|
137
|
+
groupAverageTitle: 'Média geral do grupo',
|
|
138
|
+
groupDistributionLabel: 'Distribuição do grupo',
|
|
139
|
+
overallPercentageTitle: '% Geral',
|
|
140
|
+
scaleConceptTitle: 'Conceito da escala',
|
|
141
|
+
psychosocialFactorsTitle: 'Fatores psicossociais',
|
|
142
|
+
editConclusionLabel: 'Editar conclusão',
|
|
143
|
+
meterLabel: (name, value) => `${name}: ${value}%`,
|
|
144
|
+
gaugeLabel: (name, value) => `${name}: ${value}%`,
|
|
145
|
+
itemCountLabel: formatItemCount,
|
|
146
|
+
},
|
|
103
147
|
paginator: {
|
|
104
148
|
itemsPerPage: 'Itens por página',
|
|
105
149
|
nextPage: 'Próxima página',
|
|
@@ -143,6 +187,7 @@ function mergeMapaUiTexts(customTexts) {
|
|
|
143
187
|
filters: { ...defaults.filters, ...(customTexts?.filters ?? {}) },
|
|
144
188
|
datepicker: { ...defaults.datepicker, ...(customTexts?.datepicker ?? {}) },
|
|
145
189
|
capability: { ...defaults.capability, ...(customTexts?.capability ?? {}) },
|
|
190
|
+
report: { ...defaults.report, ...(customTexts?.report ?? {}) },
|
|
146
191
|
paginator: { ...defaults.paginator, ...(customTexts?.paginator ?? {}) },
|
|
147
192
|
warning: { ...defaults.warning, ...(customTexts?.warning ?? {}) },
|
|
148
193
|
table: { ...defaults.table, ...(customTexts?.table ?? {}) },
|
|
@@ -540,7 +585,7 @@ class MapaInputComponent {
|
|
|
540
585
|
useExisting: forwardRef(() => MapaInputComponent),
|
|
541
586
|
multi: true,
|
|
542
587
|
},
|
|
543
|
-
], ngImport: i0, template: "<label *ngIf=\"element.label\" class=\"mapa-input__label\">\n {{ element.label }}\n</label>\n<div class=\"mapa-form--inline\">\n <mat-form-field\n class=\"mapa-input\"\n [class.mapa-input--autosize]=\"element.autosize\"\n appearance=\"outline\"\n subscriptSizing=\"dynamic\"\n >\n <mat-icon *ngIf=\"element.prefix\" class=\"mapa-input--prefix\" matPrefix>\n {{ element.prefix }}\n </mat-icon>\n <input\n *ngIf=\"element.autosize\"\n matInput\n matInputAutosize\n [matInputAutosizeMinWidth]=\"element.autosizeMinWidth!\"\n [matInputAutosizeMaxWidth]=\"element.autosizeMaxWidth!\"\n [formControl]=\"formControl\"\n [placeholder]=\"element.placeholder || element.label\"\n [maxlength]=\"element.maxLength\"\n (keydown.enter)=\"suffixEmit()\"\n [type]=\"type\"\n [mask]=\"element.mask\"\n thousandSeparator=\".\"\n decimalMarker=\",\"\n [autocomplete]=\"element.autocomplete\"\n [readOnly]=\"element.readonly\"\n />\n <input\n matInput\n *ngIf=\"!element.autosize\"\n [formControl]=\"formControl\"\n [placeholder]=\"element.placeholder || element.label\"\n [maxlength]=\"element.maxLength\"\n (keydown.enter)=\"suffixEmit()\"\n [type]=\"type\"\n [mask]=\"element.mask\"\n [autocomplete]=\"element.autocomplete\"\n [readOnly]=\"element.readonly\"\n />\n <button\n *ngIf=\"hasValue() && !formControl.disabled && element.clearValue\"\n type=\"button\"\n tabindex=\"-1\"\n matSuffix\n aria-label=\"Limpar\"\n (click)=\"clearValue()\"\n class=\"mapa-input--close\"\n >\n ×\n </button>\n <mat-icon\n *ngIf=\"element.suffix\"\n class=\"mapa-input--suffix\"\n matSuffix\n (click)=\"suffix.emit()\"\n >\n {{ element.suffix }}\n </mat-icon>\n <mat-hint *ngIf=\"element.hint\">{{ element.hint }}</mat-hint>\n <mat-error>\n <mapa-form-errors\n [control]=\"formControl\"\n [errors]=\"element.errors\"\n ></mapa-form-errors>\n </mat-error>\n </mat-form-field>\n\n <div *ngIf=\"element.actionButton\" class=\"mapa-form--action\">\n <mapa-button\n color=\"basic\"\n (clicked)=\"element.actionButton.action.emit(true)\"\n >\n {{ element.actionButton.label }}\n </mapa-button>\n </div>\n</div>\n", styles: [":host{display:inline-block;max-width:100%;min-width:0;box-sizing:border-box}.mapa-input{width:310px;max-width:100%;min-width:0;box-sizing:border-box}.mapa-input--autosize{width:auto;--mapa-input-autosize-preferred-width: 310px}.mapa-input__label{font-family:var(--mapa-font-heading, \"Asap\", \"Inter\", sans-serif);display:block;font-size:12px;font-style:normal;font-weight:600;line-height:16px;text-transform:uppercase;margin-bottom:16px}:host ::ng-deep .mapa-input--autosize .mat-mdc-form-field-infix{overflow:hidden}:host ::ng-deep .mapa-input .mat-mdc-form-field-error-wrapper,:host ::ng-deep .mapa-input .mat-mdc-form-field-hint-wrapper,:host ::ng-deep .mapa-input .mat-mdc-form-field-subscript-wrapper{padding:0!important}:host ::ng-deep .mapa-input .mat-mdc-form-field-error{margin:8px 0 0;padding-left:4px;color:#b54242;font-size:13px;line-height:18px}:host ::ng-deep .mapa-input .mat-mdc-form-field-error:before{display:none}:host ::ng-deep .mapa-input .mat-mdc-form-field-hint{display:block;margin:8px 0 0;padding-left:4px;color:var(--mapa-color-muted, #555555);font-size:13px;line-height:18px}:host ::ng-deep .mapa-input .mat-mdc-form-field-hint:before{display:none}:host ::ng-deep .mapa-input .mat-mdc-input-element{font-family:var(--mapa-font-body, \"Asap\", \"Roboto\", \"Inter\", sans-serif);font-size:16px;font-style:normal;font-weight:400}:host ::ng-deep .mapa-input .mat-mdc-form-field-flex{height:48px!important}:host ::ng-deep .mapa-input .mat-mdc-text-field-wrapper{background-color:var(--mapa-color-surface, #ffffff);border-radius:var(--mapa-radius-sm, 12px);height:48px}:host ::ng-deep .mapa-input .mat-mdc-text-field-wrapper.mdc-text-field--outlined{padding-left:unset!important;padding-right:unset!important}:host ::ng-deep .mapa-input .mdc-notched-outline{background-color:transparent;border-radius:var(--mapa-radius-sm, 12px)}:host ::ng-deep .mapa-input .mdc-text-field--outlined .mat-mdc-form-field-infix{padding-bottom:12px;padding-top:16px;--mat-form-field-container-height: 48px}:host ::ng-deep .mapa-input .mdc-text-field--outlined{--mat-form-field-outlined-container-shape: var(--mapa-radius-sm, 12px);--mat-form-field-outlined-outline-color: var( --mapa-color-border, rgba(26, 26, 26, .18) );--mat-form-field-outlined-hover-outline-color: var( --mapa-color-border, rgba(26, 26, 26, .18) );--mat-form-field-outlined-focus-outline-color: var( --mapa-color-accent, #ff560b );--mat-form-field-outlined-outline-width: 1px;--mat-form-field-outlined-focus-outline-width: 1px}:host ::ng-deep .mapa-input .mdc-notched-outline__leading,:host ::ng-deep .mapa-input .mdc-notched-outline__notch,:host ::ng-deep .mapa-input .mdc-notched-outline__trailing{border-width:1px!important}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix{display:flex}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix .mapa-input--close{display:flex;flex:0 0 20px;align-items:center;justify-content:center;width:20px;height:20px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--mapa-color-muted, #555555);font-family:inherit;font-size:16px;line-height:1;cursor:pointer}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix .mapa-input--close:hover{background:#1a1a1a14;color:var(--mapa-color-ink, #1a1a1a)}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix .mapa-input--close:last-child{margin-right:12px}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix .mapa-input--suffix{padding:0 0 0 8px}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix .mat-icon:last-child{padding-right:12px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { 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.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: NgxMaskDirective, selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "clearIfNotMatch", "validation", "separatorLimit", "allowNegativeNumbers", "leadZeroDateTime", "leadZero", "triggerOnMaskChange", "apm", "inputTransformFn", "outputTransformFn", "keepCharacterPositions", "instantPrefix"], outputs: ["maskFilled"], exportAs: ["mask", "ngxMask"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i1$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: ButtonComponent, selector: "mapa-button", inputs: ["color", "disabled"], outputs: ["clicked"] }, { kind: "directive", type: MatInputAutosizeDirective, selector: "[matInputAutosize]", inputs: ["matInputAutosizeMaxWidth", "matInputAutosizeMinWidth", "matInputAutosizeFontStyle"] }, { kind: "directive", type: MapaMaskAutofillSyncDirective, selector: "input[mask], textarea[mask]", inputs: ["mapaMaskAutofillSync"], exportAs: ["mapaMaskAutofillSync"] }, { kind: "component", type: MapaFormErrorsComponent, selector: "mapa-form-errors", inputs: ["control", "errors"] }] }); }
|
|
588
|
+
], ngImport: i0, template: "<label *ngIf=\"element.label\" class=\"mapa-input__label\">\n {{ element.label }}\n</label>\n<div class=\"mapa-form--inline\">\n <mat-form-field\n class=\"mapa-input\"\n [class.mapa-input--autosize]=\"element.autosize\"\n appearance=\"outline\"\n subscriptSizing=\"dynamic\"\n >\n <mat-icon *ngIf=\"element.prefix\" class=\"mapa-input--prefix\" matPrefix>\n {{ element.prefix }}\n </mat-icon>\n <input\n *ngIf=\"element.autosize\"\n matInput\n matInputAutosize\n [matInputAutosizeMinWidth]=\"element.autosizeMinWidth!\"\n [matInputAutosizeMaxWidth]=\"element.autosizeMaxWidth!\"\n [formControl]=\"formControl\"\n [placeholder]=\"element.placeholder || element.label\"\n [maxlength]=\"element.maxLength\"\n (keydown.enter)=\"suffixEmit()\"\n [type]=\"type\"\n [mask]=\"element.mask\"\n thousandSeparator=\".\"\n decimalMarker=\",\"\n [autocomplete]=\"element.autocomplete\"\n [readOnly]=\"element.readonly\"\n />\n <input\n matInput\n *ngIf=\"!element.autosize\"\n [formControl]=\"formControl\"\n [placeholder]=\"element.placeholder || element.label\"\n [maxlength]=\"element.maxLength\"\n (keydown.enter)=\"suffixEmit()\"\n [type]=\"type\"\n [mask]=\"element.mask\"\n [autocomplete]=\"element.autocomplete\"\n [readOnly]=\"element.readonly\"\n />\n <button\n *ngIf=\"hasValue() && !formControl.disabled && element.clearValue\"\n type=\"button\"\n tabindex=\"-1\"\n matSuffix\n aria-label=\"Limpar\"\n (click)=\"clearValue()\"\n class=\"mapa-input--close\"\n >\n ×\n </button>\n <mat-icon\n *ngIf=\"element.suffix\"\n class=\"mapa-input--suffix\"\n matSuffix\n (click)=\"suffix.emit()\"\n >\n {{ element.suffix }}\n </mat-icon>\n <mat-hint *ngIf=\"element.hint\">{{ element.hint }}</mat-hint>\n <mat-error>\n <mapa-form-errors\n [control]=\"formControl\"\n [errors]=\"element.errors\"\n ></mapa-form-errors>\n </mat-error>\n </mat-form-field>\n\n <div *ngIf=\"element.actionButton\" class=\"mapa-form--action\">\n <mapa-button\n color=\"basic\"\n (clicked)=\"element.actionButton.action.emit(true)\"\n >\n {{ element.actionButton.label }}\n </mapa-button>\n </div>\n</div>\n", styles: [":host{display:inline-block;max-width:100%;min-width:0;box-sizing:border-box}.mapa-input{width:310px;max-width:100%;min-width:0;box-sizing:border-box}.mapa-input--autosize{width:auto;--mapa-input-autosize-preferred-width: 310px}.mapa-input__label{font-family:var(--mapa-font-heading, \"Asap\", \"Inter\", sans-serif);display:block;font-size:12px;font-style:normal;font-weight:600;line-height:16px;text-transform:uppercase;margin-bottom:16px}:host ::ng-deep .mapa-input--autosize .mat-mdc-form-field-infix{overflow:hidden}:host ::ng-deep .mapa-input .mat-mdc-form-field-error-wrapper,:host ::ng-deep .mapa-input .mat-mdc-form-field-hint-wrapper,:host ::ng-deep .mapa-input .mat-mdc-form-field-subscript-wrapper{padding:0!important}:host ::ng-deep .mapa-input .mat-mdc-form-field-error{margin:8px 0 0;padding-left:4px;color:#b54242;font-size:13px;line-height:18px}:host ::ng-deep .mapa-input .mat-mdc-form-field-error:before{display:none}:host ::ng-deep .mapa-input .mat-mdc-form-field-hint{display:block;margin:8px 0 0;padding-left:4px;color:var(--mapa-color-muted, #555555);font-size:13px;line-height:18px}:host ::ng-deep .mapa-input .mat-mdc-form-field-hint:before{display:none}:host ::ng-deep .mapa-input .mat-mdc-input-element{font-family:var(--mapa-font-body, \"Asap\", \"Roboto\", \"Inter\", sans-serif);font-size:16px;font-style:normal;font-weight:400}:host ::ng-deep .mapa-input .mat-mdc-form-field-flex{height:48px!important}:host ::ng-deep .mapa-input .mat-mdc-text-field-wrapper{background-color:var(--mapa-color-surface, #ffffff);border-radius:var(--mapa-radius-sm, 12px);height:48px}:host ::ng-deep .mapa-input .mat-mdc-text-field-wrapper.mdc-text-field--outlined{padding-left:unset!important;padding-right:unset!important}:host ::ng-deep .mapa-input .mdc-notched-outline{background-color:transparent;border-radius:var(--mapa-radius-sm, 12px)}:host ::ng-deep .mapa-input .mdc-text-field--outlined .mat-mdc-form-field-infix{padding-bottom:12px;padding-top:16px;--mat-form-field-container-height: 48px}:host ::ng-deep .mapa-input .mdc-text-field--outlined{--mat-form-field-outlined-container-shape: var(--mapa-radius-sm, 12px);--mat-form-field-outlined-outline-color: var( --mapa-color-border, rgba(26, 26, 26, .18) );--mat-form-field-outlined-hover-outline-color: var( --mapa-color-border, rgba(26, 26, 26, .18) );--mat-form-field-outlined-focus-outline-color: var( --mapa-color-accent, #ff560b );--mat-form-field-outlined-outline-width: 1px;--mat-form-field-outlined-focus-outline-width: 1px}:host ::ng-deep .mapa-input .mdc-notched-outline__leading,:host ::ng-deep .mapa-input .mdc-notched-outline__notch,:host ::ng-deep .mapa-input .mdc-notched-outline__trailing{border-width:1px!important}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix{display:flex}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix .mapa-input--close{display:flex;flex:0 0 20px;align-items:center;justify-content:center;width:20px;height:20px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--mapa-color-muted, #555555);font-family:inherit;font-size:16px;line-height:1;cursor:pointer}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix .mapa-input--close:hover{background:#1a1a1a14;color:var(--mapa-color-ink, #1a1a1a)}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix .mapa-input--close:last-child{margin-right:12px}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix .mapa-input--suffix{padding:0 0 0 8px}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix .mat-icon:last-child{padding-right:12px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { 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.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: NgxMaskDirective, selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "clearIfNotMatch", "validation", "separatorLimit", "allowNegativeNumbers", "leadZeroDateTime", "leadZero", "triggerOnMaskChange", "apm", "inputTransformFn", "outputTransformFn", "keepCharacterPositions", "instantPrefix"], outputs: ["maskFilled"], exportAs: ["mask", "ngxMask"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i1$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: ButtonComponent, selector: "mapa-button", inputs: ["color", "disabled", "shape", "fullWidth"], outputs: ["clicked"] }, { kind: "directive", type: MatInputAutosizeDirective, selector: "[matInputAutosize]", inputs: ["matInputAutosizeMaxWidth", "matInputAutosizeMinWidth", "matInputAutosizeFontStyle"] }, { kind: "directive", type: MapaMaskAutofillSyncDirective, selector: "input[mask], textarea[mask]", inputs: ["mapaMaskAutofillSync"], exportAs: ["mapaMaskAutofillSync"] }, { kind: "component", type: MapaFormErrorsComponent, selector: "mapa-form-errors", inputs: ["control", "errors"] }] }); }
|
|
544
589
|
}
|
|
545
590
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaInputComponent, decorators: [{
|
|
546
591
|
type: Component,
|
|
@@ -1872,7 +1917,7 @@ class MapaDropdownComponent {
|
|
|
1872
1917
|
useExisting: forwardRef(() => MapaDropdownComponent),
|
|
1873
1918
|
multi: true,
|
|
1874
1919
|
},
|
|
1875
|
-
], viewQueries: [{ propertyName: "triggerButton", first: true, predicate: ["triggerButton"], descendants: true }, { propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true }], ngImport: i0, template: "<div\n class=\"mapa-dropdown\"\n [class.mapa-dropdown--open]=\"isOpen()\"\n [class.mapa-dropdown--invalid]=\"shouldShowError()\"\n [class.mapa-dropdown--disabled]=\"isDisabled()\"\n [class.mapa-dropdown--highlight]=\"border === 'highlight'\"\n [class.mapa-dropdown--soft-border]=\"border === 'soft'\"\n [class.mapa-dropdown--tag]=\"border === 'tag'\"\n>\n @if (element.label) {\n <label class=\"mapa-dropdown__label\" [attr.for]=\"element.key || null\">\n {{ element.label }}\n </label>\n }\n\n <div class=\"mapa-dropdown__field-row\">\n <button\n #triggerButton\n cdkOverlayOrigin\n #origin=\"cdkOverlayOrigin\"\n class=\"mapa-dropdown__trigger\"\n [class.mapa-dropdown__trigger--clearable]=\"hasValue() && element.clearValue\"\n [id]=\"element.key || null\"\n type=\"button\"\n [disabled]=\"isDisabled()\"\n (click)=\"toggleDropdown()\"\n [attr.aria-expanded]=\"isOpen()\"\n aria-haspopup=\"listbox\"\n >\n <span\n class=\"mapa-dropdown__trigger-text\"\n [class.mapa-dropdown__trigger-text--placeholder]=\"!hasValue()\"\n [innerHTML]=\"selectedLabel() | safeHtml\"\n ></span>\n @if (hasValue() && !isDisabled() && element.clearValue) {\n <span\n class=\"mapa-dropdown__clear\"\n role=\"button\"\n aria-label=\"Limpar\"\n (click)=\"clearValue($event)\"\n >\n ×\n </span>\n }\n </button>\n\n @if (element.actionButton) {\n <mapa-button\n class=\"mapa-dropdown__action\"\n color=\"basic\"\n (clicked)=\"element.actionButton.action.emit(true)\"\n >\n {{ element.actionButton.label }}\n </mapa-button>\n }\n </div>\n\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions\"\n [cdkConnectedOverlayWidth]=\"overlayWidth()\"\n cdkConnectedOverlayPanelClass=\"mapa-dropdown__overlay-pane\"\n (overlayOutsideClick)=\"handleOverlayOutsideClick($event)\"\n >\n <div class=\"mapa-dropdown__panel\">\n @if (hasSearch()) {\n <input\n #searchInput\n class=\"mapa-dropdown__search-input\"\n type=\"text\"\n [formControl]=\"searchControl!\"\n [placeholder]=\"searchPlaceholder()\"\n />\n }\n\n <div class=\"mapa-dropdown__options\" role=\"listbox\">\n @if (isMultiple() && visibleOptions().length) {\n <button\n class=\"mapa-dropdown__option mapa-dropdown__option--select-all\"\n type=\"button\"\n (click)=\"toggleSelectAll()\"\n >\n <input\n class=\"mapa-dropdown__checkbox\"\n type=\"checkbox\"\n [checked]=\"isAllSelected()\"\n [indeterminate]=\"isIndeterminate()\"\n (click)=\"$event.stopPropagation(); toggleSelectAll()\"\n />\n {{ selectAllLabel }}\n </button>\n }\n\n @if (hasGroups()) {\n @for (group of filteredGroups(); track group.label) {\n <div class=\"mapa-dropdown__group\" role=\"group\">\n <p class=\"mapa-dropdown__group-label\">{{ group.label }}</p>\n @for (option of group.options; track option.key) {\n <button\n class=\"mapa-dropdown__option\"\n [class.mapa-dropdown__option--selected]=\"isOptionSelected(option)\"\n [style.padding-left.px]=\"optionPadding(option)\"\n type=\"button\"\n (click)=\"selectOption(option)\"\n >\n @if (isMultiple()) {\n <input\n class=\"mapa-dropdown__checkbox\"\n type=\"checkbox\"\n [checked]=\"isOptionSelected(option)\"\n (click)=\"$event.stopPropagation(); selectOption(option)\"\n />\n }\n <span [innerHTML]=\"option.value | safeHtml\"></span>\n </button>\n }\n </div>\n }\n } @else {\n @for (option of filteredOptions(); track option.key) {\n <button\n class=\"mapa-dropdown__option\"\n [class.mapa-dropdown__option--selected]=\"isOptionSelected(option)\"\n [style.padding-left.px]=\"optionPadding(option)\"\n type=\"button\"\n (click)=\"selectOption(option)\"\n >\n @if (isMultiple()) {\n <input\n class=\"mapa-dropdown__checkbox\"\n type=\"checkbox\"\n [checked]=\"isOptionSelected(option)\"\n (click)=\"$event.stopPropagation(); selectOption(option)\"\n />\n }\n <span [innerHTML]=\"option.value | safeHtml\"></span>\n </button>\n }\n }\n\n @if (!visibleOptions().length) {\n <p class=\"mapa-dropdown__empty-state\">\n {{ emptyStateLabel() }}\n </p>\n }\n </div>\n </div>\n </ng-template>\n\n @if (shouldShowError()) {\n <p class=\"mapa-dropdown__error\">\n <mapa-form-errors\n [control]=\"formControl\"\n [errors]=\"element.errors\"\n ></mapa-form-errors>\n </p>\n } @else if (element.hint) {\n <p class=\"mapa-dropdown__hint\">{{ element.hint }}</p>\n }\n</div>\n", styles: [":host{position:relative;display:inline-block;width:310px;max-width:100%;min-width:0;box-sizing:border-box}.mapa-dropdown{width:100%}.mapa-dropdown__label{display:inline-block;margin-bottom:8px;color:var(--mapa-color-ink, #1a1a1a);font-family:var(--mapa-font-heading, \"Asap\", sans-serif);font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}.mapa-dropdown__field-row{display:flex;align-items:center;gap:24px;min-width:0}.mapa-dropdown__trigger,.mapa-dropdown__search-input,.mapa-dropdown__option{width:100%;min-height:48px;padding:12px 16px;border:0;background:var(--mapa-color-surface, #ffffff);color:var(--mapa-color-ink, #1a1a1a);font-family:var(--mapa-font-body, \"Asap\", sans-serif);font-size:16px;line-height:24px}.mapa-dropdown__trigger:focus,.mapa-dropdown__search-input:focus,.mapa-dropdown__option:focus{outline:none}.mapa-dropdown__trigger::placeholder,.mapa-dropdown__search-input::placeholder,.mapa-dropdown__option::placeholder{color:var(--mapa-color-muted, #555555)}.mapa-dropdown__trigger{position:relative;display:flex;flex:1 1 auto;align-items:center;min-width:0;padding-right:46px;border:1px solid var(--mapa-color-border, rgba(26, 26, 26, .18));border-radius:var(--mapa-radius-sm, 12px);text-align:left;cursor:pointer;transition:border-color .2s ease,box-shadow .2s ease,background-color .2s ease}.mapa-dropdown__trigger--clearable{padding-right:70px}.mapa-dropdown__trigger:after{content:\"\";position:absolute;top:50%;right:18px;width:9px;height:9px;border-right:2px solid var(--mapa-color-ink, #1a1a1a);border-bottom:2px solid var(--mapa-color-ink, #1a1a1a);transform:translateY(-70%) rotate(45deg);transition:transform .2s ease;pointer-events:none}.mapa-dropdown__trigger:disabled{background:var(--mapa-color-disabled-surface, #f6f7f7);color:var(--mapa-color-muted, #555555);cursor:not-allowed}.mapa-dropdown__trigger:disabled:after{opacity:.5}.mapa-dropdown--open .mapa-dropdown__trigger,.mapa-dropdown__trigger:focus{border-color:var(--mapa-color-accent, #ff560b);box-shadow:0 0 0 3px #ff560b1f}.mapa-dropdown--open .mapa-dropdown__trigger:after{transform:translateY(-20%) rotate(-135deg)}.mapa-dropdown--highlight .mapa-dropdown__trigger{border:2px solid #eedb2a;border-radius:16px}.mapa-dropdown--tag .mapa-dropdown__trigger{border-radius:16px}.mapa-dropdown__trigger-text{display:block;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--mapa-color-ink, #1a1a1a)}.mapa-dropdown__trigger-text--placeholder{color:var(--mapa-color-muted, #CFC4C7)}.mapa-dropdown__clear{position:absolute;top:50%;right:40px;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:50%;color:var(--mapa-color-muted, #555555);font-size:16px;line-height:1;cursor:pointer}.mapa-dropdown__clear:hover{background:#1a1a1a14;color:var(--mapa-color-ink, #1a1a1a)}.mapa-dropdown__action{flex:none}.mapa-dropdown__checkbox{flex:none;width:16px;height:16px;margin-right:12px;accent-color:var(--mapa-color-accent, #ff560b)}.mapa-dropdown__panel{width:100%;overflow:hidden;border:1px solid var(--mapa-color-border-soft, rgba(26, 26, 26, .08));border-radius:var(--mapa-radius-md, 16px);background:var(--mapa-color-surface, #ffffff);box-shadow:var(--mapa-shadow-panel, 0 18px 40px rgba(26, 26, 26, .08))}.mapa-dropdown__search-input{border-bottom:1px solid var(--mapa-color-border-soft, rgba(26, 26, 26, .08))}.mapa-dropdown__options{max-height:240px;overflow-y:auto;background:var(--mapa-color-surface, #ffffff)}.mapa-dropdown__group-label{margin:0;padding:10px 16px 6px;color:var(--mapa-color-muted, #555555);font-family:var(--mapa-font-body, \"Asap\", sans-serif);font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase}.mapa-dropdown__option{display:flex;align-items:center;min-height:44px;text-align:left;cursor:pointer;transition:background-color .2s ease,color .2s ease}.mapa-dropdown__option:hover{background:#ff560b14}.mapa-dropdown__option--selected{background:#ff560b1f;color:var(--mapa-color-accent, #ff560b)}.mapa-dropdown__option--select-all{border-bottom:1px solid var(--mapa-color-border-soft, rgba(26, 26, 26, .08));font-weight:600}.mapa-dropdown__empty-state{margin:0;padding:14px 16px;color:var(--mapa-color-muted, #555555);font-size:14px;line-height:20px}.mapa-dropdown--invalid .mapa-dropdown__trigger{border-color:#b54242;box-shadow:0 0 0 3px #b542421f}.mapa-dropdown__hint,.mapa-dropdown__error{display:block;margin:8px 0 0;padding-left:4px;font-size:13px;line-height:18px}.mapa-dropdown__hint{color:var(--mapa-color-muted, #555555)}.mapa-dropdown__error{color:#b54242}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.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: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "component", type: ButtonComponent, selector: "mapa-button", inputs: ["color", "disabled"], outputs: ["clicked"] }, { kind: "component", type: MapaFormErrorsComponent, selector: "mapa-form-errors", inputs: ["control", "errors"] }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1920
|
+
], viewQueries: [{ propertyName: "triggerButton", first: true, predicate: ["triggerButton"], descendants: true }, { propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true }], ngImport: i0, template: "<div\n class=\"mapa-dropdown\"\n [class.mapa-dropdown--open]=\"isOpen()\"\n [class.mapa-dropdown--invalid]=\"shouldShowError()\"\n [class.mapa-dropdown--disabled]=\"isDisabled()\"\n [class.mapa-dropdown--highlight]=\"border === 'highlight'\"\n [class.mapa-dropdown--soft-border]=\"border === 'soft'\"\n [class.mapa-dropdown--tag]=\"border === 'tag'\"\n>\n @if (element.label) {\n <label class=\"mapa-dropdown__label\" [attr.for]=\"element.key || null\">\n {{ element.label }}\n </label>\n }\n\n <div class=\"mapa-dropdown__field-row\">\n <button\n #triggerButton\n cdkOverlayOrigin\n #origin=\"cdkOverlayOrigin\"\n class=\"mapa-dropdown__trigger\"\n [class.mapa-dropdown__trigger--clearable]=\"hasValue() && element.clearValue\"\n [id]=\"element.key || null\"\n type=\"button\"\n [disabled]=\"isDisabled()\"\n (click)=\"toggleDropdown()\"\n [attr.aria-expanded]=\"isOpen()\"\n aria-haspopup=\"listbox\"\n >\n <span\n class=\"mapa-dropdown__trigger-text\"\n [class.mapa-dropdown__trigger-text--placeholder]=\"!hasValue()\"\n [innerHTML]=\"selectedLabel() | safeHtml\"\n ></span>\n @if (hasValue() && !isDisabled() && element.clearValue) {\n <span\n class=\"mapa-dropdown__clear\"\n role=\"button\"\n aria-label=\"Limpar\"\n (click)=\"clearValue($event)\"\n >\n ×\n </span>\n }\n </button>\n\n @if (element.actionButton) {\n <mapa-button\n class=\"mapa-dropdown__action\"\n color=\"basic\"\n (clicked)=\"element.actionButton.action.emit(true)\"\n >\n {{ element.actionButton.label }}\n </mapa-button>\n }\n </div>\n\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions\"\n [cdkConnectedOverlayWidth]=\"overlayWidth()\"\n cdkConnectedOverlayPanelClass=\"mapa-dropdown__overlay-pane\"\n (overlayOutsideClick)=\"handleOverlayOutsideClick($event)\"\n >\n <div class=\"mapa-dropdown__panel\">\n @if (hasSearch()) {\n <input\n #searchInput\n class=\"mapa-dropdown__search-input\"\n type=\"text\"\n [formControl]=\"searchControl!\"\n [placeholder]=\"searchPlaceholder()\"\n />\n }\n\n <div class=\"mapa-dropdown__options\" role=\"listbox\">\n @if (isMultiple() && visibleOptions().length) {\n <button\n class=\"mapa-dropdown__option mapa-dropdown__option--select-all\"\n type=\"button\"\n (click)=\"toggleSelectAll()\"\n >\n <input\n class=\"mapa-dropdown__checkbox\"\n type=\"checkbox\"\n [checked]=\"isAllSelected()\"\n [indeterminate]=\"isIndeterminate()\"\n (click)=\"$event.stopPropagation(); toggleSelectAll()\"\n />\n {{ selectAllLabel }}\n </button>\n }\n\n @if (hasGroups()) {\n @for (group of filteredGroups(); track group.label) {\n <div class=\"mapa-dropdown__group\" role=\"group\">\n <p class=\"mapa-dropdown__group-label\">{{ group.label }}</p>\n @for (option of group.options; track option.key) {\n <button\n class=\"mapa-dropdown__option\"\n [class.mapa-dropdown__option--selected]=\"isOptionSelected(option)\"\n [style.padding-left.px]=\"optionPadding(option)\"\n type=\"button\"\n (click)=\"selectOption(option)\"\n >\n @if (isMultiple()) {\n <input\n class=\"mapa-dropdown__checkbox\"\n type=\"checkbox\"\n [checked]=\"isOptionSelected(option)\"\n (click)=\"$event.stopPropagation(); selectOption(option)\"\n />\n }\n <span [innerHTML]=\"option.value | safeHtml\"></span>\n </button>\n }\n </div>\n }\n } @else {\n @for (option of filteredOptions(); track option.key) {\n <button\n class=\"mapa-dropdown__option\"\n [class.mapa-dropdown__option--selected]=\"isOptionSelected(option)\"\n [style.padding-left.px]=\"optionPadding(option)\"\n type=\"button\"\n (click)=\"selectOption(option)\"\n >\n @if (isMultiple()) {\n <input\n class=\"mapa-dropdown__checkbox\"\n type=\"checkbox\"\n [checked]=\"isOptionSelected(option)\"\n (click)=\"$event.stopPropagation(); selectOption(option)\"\n />\n }\n <span [innerHTML]=\"option.value | safeHtml\"></span>\n </button>\n }\n }\n\n @if (!visibleOptions().length) {\n <p class=\"mapa-dropdown__empty-state\">\n {{ emptyStateLabel() }}\n </p>\n }\n </div>\n </div>\n </ng-template>\n\n @if (shouldShowError()) {\n <p class=\"mapa-dropdown__error\">\n <mapa-form-errors\n [control]=\"formControl\"\n [errors]=\"element.errors\"\n ></mapa-form-errors>\n </p>\n } @else if (element.hint) {\n <p class=\"mapa-dropdown__hint\">{{ element.hint }}</p>\n }\n</div>\n", styles: [":host{position:relative;display:inline-block;width:310px;max-width:100%;min-width:0;box-sizing:border-box}.mapa-dropdown{width:100%}.mapa-dropdown__label{display:inline-block;margin-bottom:8px;color:var(--mapa-color-ink, #1a1a1a);font-family:var(--mapa-font-heading, \"Asap\", sans-serif);font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}.mapa-dropdown__field-row{display:flex;align-items:center;gap:24px;min-width:0}.mapa-dropdown__trigger,.mapa-dropdown__search-input,.mapa-dropdown__option{width:100%;min-height:48px;padding:12px 16px;border:0;background:var(--mapa-color-surface, #ffffff);color:var(--mapa-color-ink, #1a1a1a);font-family:var(--mapa-font-body, \"Asap\", sans-serif);font-size:16px;line-height:24px}.mapa-dropdown__trigger:focus,.mapa-dropdown__search-input:focus,.mapa-dropdown__option:focus{outline:none}.mapa-dropdown__trigger::placeholder,.mapa-dropdown__search-input::placeholder,.mapa-dropdown__option::placeholder{color:var(--mapa-color-muted, #555555)}.mapa-dropdown__trigger{position:relative;display:flex;flex:1 1 auto;align-items:center;min-width:0;padding-right:46px;border:1px solid var(--mapa-color-border, rgba(26, 26, 26, .18));border-radius:var(--mapa-radius-sm, 12px);text-align:left;cursor:pointer;transition:border-color .2s ease,box-shadow .2s ease,background-color .2s ease}.mapa-dropdown__trigger--clearable{padding-right:70px}.mapa-dropdown__trigger:after{content:\"\";position:absolute;top:50%;right:18px;width:9px;height:9px;border-right:2px solid var(--mapa-color-ink, #1a1a1a);border-bottom:2px solid var(--mapa-color-ink, #1a1a1a);transform:translateY(-70%) rotate(45deg);transition:transform .2s ease;pointer-events:none}.mapa-dropdown__trigger:disabled{background:var(--mapa-color-disabled-surface, #f6f7f7);color:var(--mapa-color-muted, #555555);cursor:not-allowed}.mapa-dropdown__trigger:disabled:after{opacity:.5}.mapa-dropdown--open .mapa-dropdown__trigger,.mapa-dropdown__trigger:focus{border-color:var(--mapa-color-accent, #ff560b);box-shadow:0 0 0 3px #ff560b1f}.mapa-dropdown--open .mapa-dropdown__trigger:after{transform:translateY(-20%) rotate(-135deg)}.mapa-dropdown--highlight .mapa-dropdown__trigger{border:2px solid #eedb2a;border-radius:16px}.mapa-dropdown--tag .mapa-dropdown__trigger{border-radius:16px}.mapa-dropdown__trigger-text{display:block;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--mapa-color-ink, #1a1a1a)}.mapa-dropdown__trigger-text--placeholder{color:var(--mapa-color-muted, #CFC4C7)}.mapa-dropdown__clear{position:absolute;top:50%;right:40px;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:50%;color:var(--mapa-color-muted, #555555);font-size:16px;line-height:1;cursor:pointer}.mapa-dropdown__clear:hover{background:#1a1a1a14;color:var(--mapa-color-ink, #1a1a1a)}.mapa-dropdown__action{flex:none}.mapa-dropdown__checkbox{flex:none;width:16px;height:16px;margin-right:12px;accent-color:var(--mapa-color-accent, #ff560b)}.mapa-dropdown__panel{width:100%;overflow:hidden;border:1px solid var(--mapa-color-border-soft, rgba(26, 26, 26, .08));border-radius:var(--mapa-radius-md, 16px);background:var(--mapa-color-surface, #ffffff);box-shadow:var(--mapa-shadow-panel, 0 18px 40px rgba(26, 26, 26, .08))}.mapa-dropdown__search-input{border-bottom:1px solid var(--mapa-color-border-soft, rgba(26, 26, 26, .08))}.mapa-dropdown__options{max-height:240px;overflow-y:auto;background:var(--mapa-color-surface, #ffffff)}.mapa-dropdown__group-label{margin:0;padding:10px 16px 6px;color:var(--mapa-color-muted, #555555);font-family:var(--mapa-font-body, \"Asap\", sans-serif);font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase}.mapa-dropdown__option{display:flex;align-items:center;min-height:44px;text-align:left;cursor:pointer;transition:background-color .2s ease,color .2s ease}.mapa-dropdown__option:hover{background:#ff560b14}.mapa-dropdown__option--selected{background:#ff560b1f;color:var(--mapa-color-accent, #ff560b)}.mapa-dropdown__option--select-all{border-bottom:1px solid var(--mapa-color-border-soft, rgba(26, 26, 26, .08));font-weight:600}.mapa-dropdown__empty-state{margin:0;padding:14px 16px;color:var(--mapa-color-muted, #555555);font-size:14px;line-height:20px}.mapa-dropdown--invalid .mapa-dropdown__trigger{border-color:#b54242;box-shadow:0 0 0 3px #b542421f}.mapa-dropdown__hint,.mapa-dropdown__error{display:block;margin:8px 0 0;padding-left:4px;font-size:13px;line-height:18px}.mapa-dropdown__hint{color:var(--mapa-color-muted, #555555)}.mapa-dropdown__error{color:#b54242}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.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: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "component", type: ButtonComponent, selector: "mapa-button", inputs: ["color", "disabled", "shape", "fullWidth"], outputs: ["clicked"] }, { kind: "component", type: MapaFormErrorsComponent, selector: "mapa-form-errors", inputs: ["control", "errors"] }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1876
1921
|
}
|
|
1877
1922
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaDropdownComponent, decorators: [{
|
|
1878
1923
|
type: Component,
|