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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i5 from '@angular/cdk/text-field';
|
|
2
2
|
import { AutofillMonitor } from '@angular/cdk/text-field';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { inject, ElementRef, DestroyRef, booleanAttribute, Input, Directive, Self, Optional, EventEmitter, Output, InjectionToken, Injector, signal, Inject, Injectable, Component, SecurityContext, Pipe, effect, ChangeDetectionStrategy, EnvironmentInjector, createComponent, HostListener, ViewChild, ChangeDetectorRef, forwardRef, TemplateRef, contentChildren } from '@angular/core';
|
|
4
|
+
import { inject, ElementRef, DestroyRef, booleanAttribute, Input, Directive, Self, Optional, EventEmitter, Output, InjectionToken, Injector, signal, Inject, Injectable, Component, SecurityContext, Pipe, effect, ChangeDetectionStrategy, input, computed, EnvironmentInjector, createComponent, HostListener, ViewChild, ChangeDetectorRef, forwardRef, model, output, TemplateRef, contentChildren } from '@angular/core';
|
|
5
5
|
import { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';
|
|
6
6
|
import * as i2 from '@angular/forms';
|
|
7
7
|
import { NgControl, ReactiveFormsModule, NG_VALUE_ACCESSOR, FormGroup, FormControl, FormsModule } from '@angular/forms';
|
|
@@ -29,18 +29,20 @@ import { NgApexchartsModule } from 'ng-apexcharts';
|
|
|
29
29
|
import { CdkConnectedOverlay, CdkOverlayOrigin } from '@angular/cdk/overlay';
|
|
30
30
|
import * as i2$3 from '@angular/material/checkbox';
|
|
31
31
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
32
|
+
import * as i2$4 from '@angular/material/icon';
|
|
33
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
32
34
|
import { NgxsmkDatepickerComponent } from 'ngxsmk-datepicker';
|
|
33
35
|
import * as i1$4 from '@angular/material/dialog';
|
|
34
36
|
import { MAT_DIALOG_DATA, MatDialogModule, MatDialogConfig } from '@angular/material/dialog';
|
|
35
|
-
import * as i1$5 from '@angular/material/icon';
|
|
36
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
37
37
|
import * as i3$2 from '@angular/material/radio';
|
|
38
38
|
import { MatRadioModule } from '@angular/material/radio';
|
|
39
39
|
import * as i3$3 from '@angular/material/slide-toggle';
|
|
40
40
|
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
41
41
|
import * as i3$4 from '@angular/material/menu';
|
|
42
42
|
import { MatMenuModule, MatMenuTrigger } from '@angular/material/menu';
|
|
43
|
-
import * as i1$
|
|
43
|
+
import * as i1$5 from '@angular/common/http';
|
|
44
|
+
import * as i1$6 from '@angular/material/button-toggle';
|
|
45
|
+
import { MatButtonToggleModule } from '@angular/material/button-toggle';
|
|
44
46
|
|
|
45
47
|
class ElementBase {
|
|
46
48
|
constructor(options = {}) {
|
|
@@ -650,6 +652,9 @@ function formatPaginatorShowingRange(page, pageSize, length) {
|
|
|
650
652
|
const itemLabel = safeLength === 1 ? 'item' : 'itens';
|
|
651
653
|
return `Mostrando ${startIndex + 1} - ${endIndex} de ${safeLength} ${itemLabel}`;
|
|
652
654
|
}
|
|
655
|
+
function formatItemCount(count) {
|
|
656
|
+
return `${count} ${count === 1 ? 'item' : 'itens'}`;
|
|
657
|
+
}
|
|
653
658
|
const DEFAULT_MAPA_UI_TEXTS = {
|
|
654
659
|
common: {
|
|
655
660
|
selectAll: 'Selecionar todos',
|
|
@@ -676,6 +681,41 @@ const DEFAULT_MAPA_UI_TEXTS = {
|
|
|
676
681
|
negativeDirectionLabel: 'Direção Negativa |',
|
|
677
682
|
positiveDirectionLabel: 'Direção Positiva |',
|
|
678
683
|
},
|
|
684
|
+
report: {
|
|
685
|
+
summarized: 'Resumida',
|
|
686
|
+
detailed: 'Detalhada',
|
|
687
|
+
list: 'Lista',
|
|
688
|
+
chart: 'Gráfico',
|
|
689
|
+
viewModeLabel: 'Modo de visualização',
|
|
690
|
+
readingInformationTitle: 'Informações de leitura',
|
|
691
|
+
dimensionTitle: 'Dimensão',
|
|
692
|
+
conceptTitle: 'Conceito',
|
|
693
|
+
classificationTitle: 'Classificação',
|
|
694
|
+
resultReadingTitle: 'Leitura do resultado',
|
|
695
|
+
resultTitle: 'Resultado',
|
|
696
|
+
globalAverageTitle: 'Média global',
|
|
697
|
+
factorsTitle: 'Fatores relativos à organização e ao trabalho',
|
|
698
|
+
strongPointsTitle: 'Pontos fortes',
|
|
699
|
+
attentionPointsTitle: 'Pontos de atenção',
|
|
700
|
+
vulnerabilitiesTitle: 'Vulnerabilidades socioemocionais',
|
|
701
|
+
positiveDirectionLabel: 'Direção positiva',
|
|
702
|
+
negativeDirectionLabel: 'Direção negativa',
|
|
703
|
+
lowerIntensityLabel: 'Menos intensamente',
|
|
704
|
+
higherIntensityLabel: 'Mais intensamente',
|
|
705
|
+
noClassification: 'Sem classificação',
|
|
706
|
+
emptyState: 'Não há resultados disponíveis para esta seção.',
|
|
707
|
+
interpretationTitle: 'Interpretação',
|
|
708
|
+
detailedListLabel: 'Lista detalhada',
|
|
709
|
+
groupAverageTitle: 'Média geral do grupo',
|
|
710
|
+
groupDistributionLabel: 'Distribuição do grupo',
|
|
711
|
+
overallPercentageTitle: '% Geral',
|
|
712
|
+
scaleConceptTitle: 'Conceito da escala',
|
|
713
|
+
psychosocialFactorsTitle: 'Fatores psicossociais',
|
|
714
|
+
editConclusionLabel: 'Editar conclusão',
|
|
715
|
+
meterLabel: (name, value) => `${name}: ${value}%`,
|
|
716
|
+
gaugeLabel: (name, value) => `${name}: ${value}%`,
|
|
717
|
+
itemCountLabel: formatItemCount,
|
|
718
|
+
},
|
|
679
719
|
paginator: {
|
|
680
720
|
itemsPerPage: 'Itens por página',
|
|
681
721
|
nextPage: 'Próxima página',
|
|
@@ -719,6 +759,7 @@ function mergeMapaUiTexts(customTexts) {
|
|
|
719
759
|
filters: { ...defaults.filters, ...(customTexts?.filters ?? {}) },
|
|
720
760
|
datepicker: { ...defaults.datepicker, ...(customTexts?.datepicker ?? {}) },
|
|
721
761
|
capability: { ...defaults.capability, ...(customTexts?.capability ?? {}) },
|
|
762
|
+
report: { ...defaults.report, ...(customTexts?.report ?? {}) },
|
|
722
763
|
paginator: { ...defaults.paginator, ...(customTexts?.paginator ?? {}) },
|
|
723
764
|
warning: { ...defaults.warning, ...(customTexts?.warning ?? {}) },
|
|
724
765
|
table: { ...defaults.table, ...(customTexts?.table ?? {}) },
|
|
@@ -5009,14 +5050,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
5009
5050
|
}] } });
|
|
5010
5051
|
|
|
5011
5052
|
class MapaBreadcrumbComponent {
|
|
5053
|
+
constructor() {
|
|
5054
|
+
this.separator = '›';
|
|
5055
|
+
this.ariaLabel = 'Breadcrumb';
|
|
5056
|
+
}
|
|
5012
5057
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaBreadcrumbComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5013
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.21", type: MapaBreadcrumbComponent, isStandalone: true, selector: "mapa-breadcrumb", inputs: { items: "items" }, ngImport: i0, template: "<
|
|
5058
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.21", type: MapaBreadcrumbComponent, isStandalone: true, selector: "mapa-breadcrumb", inputs: { items: "items", separator: "separator", ariaLabel: "ariaLabel" }, ngImport: i0, template: "<nav\n class=\"mapa-breadcrumb\"\n *ngIf=\"items && items.length > 0\"\n [attr.aria-label]=\"ariaLabel\"\n>\n <ol class=\"mapa-breadcrumb__list\">\n <li class=\"mapa-breadcrumb__item\" *ngFor=\"let item of items; let i = index\">\n <a\n *ngIf=\"item.url && i < items.length - 1; else common\"\n [routerLink]=\"item.url\"\n >\n {{ item.title }}\n </a>\n <ng-template #common>\n <span\n [class.mapa-breadcrumb__item--highlight]=\"items.length === i + 1\"\n [attr.aria-current]=\"items.length === i + 1 ? 'page' : null\"\n >{{ item.title }}</span\n >\n </ng-template>\n <span\n class=\"mapa-breadcrumb__separator\"\n *ngIf=\"i < items.length - 1\"\n aria-hidden=\"true\"\n >{{ separator }}</span\n >\n </li>\n </ol>\n</nav>\n", styles: [".mapa-breadcrumb{font-family:var(--mapa-font-heading, \"Asap\", \"Inter\", sans-serif);margin-bottom:32px}.mapa-breadcrumb__list{align-items:center;display:flex;flex-wrap:wrap;list-style:none;margin:0;padding:0}.mapa-breadcrumb__item{align-items:center;color:#657077;display:flex;font-size:12px;font-style:normal;font-weight:400;line-height:16px}.mapa-breadcrumb__item a{text-decoration:none;color:inherit}.mapa-breadcrumb__item a:hover{color:#ff560b;text-decoration:underline;text-underline-offset:3px}.mapa-breadcrumb__item a:focus-visible{border-radius:3px;outline:2px solid #ff8a55;outline-offset:2px}.mapa-breadcrumb__item--highlight{color:#ff560b;font-weight:500}.mapa-breadcrumb__separator{color:#a7b0b5;margin:0 7px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i2$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] }); }
|
|
5014
5059
|
}
|
|
5015
5060
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaBreadcrumbComponent, decorators: [{
|
|
5016
5061
|
type: Component,
|
|
5017
|
-
args: [{ selector:
|
|
5062
|
+
args: [{ selector: 'mapa-breadcrumb', imports: [CommonModule, RouterModule], standalone: true, template: "<nav\n class=\"mapa-breadcrumb\"\n *ngIf=\"items && items.length > 0\"\n [attr.aria-label]=\"ariaLabel\"\n>\n <ol class=\"mapa-breadcrumb__list\">\n <li class=\"mapa-breadcrumb__item\" *ngFor=\"let item of items; let i = index\">\n <a\n *ngIf=\"item.url && i < items.length - 1; else common\"\n [routerLink]=\"item.url\"\n >\n {{ item.title }}\n </a>\n <ng-template #common>\n <span\n [class.mapa-breadcrumb__item--highlight]=\"items.length === i + 1\"\n [attr.aria-current]=\"items.length === i + 1 ? 'page' : null\"\n >{{ item.title }}</span\n >\n </ng-template>\n <span\n class=\"mapa-breadcrumb__separator\"\n *ngIf=\"i < items.length - 1\"\n aria-hidden=\"true\"\n >{{ separator }}</span\n >\n </li>\n </ol>\n</nav>\n", styles: [".mapa-breadcrumb{font-family:var(--mapa-font-heading, \"Asap\", \"Inter\", sans-serif);margin-bottom:32px}.mapa-breadcrumb__list{align-items:center;display:flex;flex-wrap:wrap;list-style:none;margin:0;padding:0}.mapa-breadcrumb__item{align-items:center;color:#657077;display:flex;font-size:12px;font-style:normal;font-weight:400;line-height:16px}.mapa-breadcrumb__item a{text-decoration:none;color:inherit}.mapa-breadcrumb__item a:hover{color:#ff560b;text-decoration:underline;text-underline-offset:3px}.mapa-breadcrumb__item a:focus-visible{border-radius:3px;outline:2px solid #ff8a55;outline-offset:2px}.mapa-breadcrumb__item--highlight{color:#ff560b;font-weight:500}.mapa-breadcrumb__separator{color:#a7b0b5;margin:0 7px}\n"] }]
|
|
5018
5063
|
}], propDecorators: { items: [{
|
|
5019
5064
|
type: Input
|
|
5065
|
+
}], separator: [{
|
|
5066
|
+
type: Input
|
|
5067
|
+
}], ariaLabel: [{
|
|
5068
|
+
type: Input
|
|
5020
5069
|
}] } });
|
|
5021
5070
|
|
|
5022
5071
|
/*
|
|
@@ -5025,21 +5074,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
5025
5074
|
|
|
5026
5075
|
class ButtonComponent {
|
|
5027
5076
|
constructor() {
|
|
5077
|
+
this.shape = 'pill';
|
|
5078
|
+
this.fullWidth = false;
|
|
5028
5079
|
this.clicked = new EventEmitter();
|
|
5029
5080
|
}
|
|
5030
5081
|
onClick() {
|
|
5031
5082
|
this.clicked.emit();
|
|
5032
5083
|
}
|
|
5033
5084
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5034
|
-
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
|
|
5085
|
+
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"] }); }
|
|
5035
5086
|
}
|
|
5036
5087
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
5037
5088
|
type: Component,
|
|
5038
|
-
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
|
|
5089
|
+
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"] }]
|
|
5039
5090
|
}], propDecorators: { color: [{
|
|
5040
5091
|
type: Input
|
|
5041
5092
|
}], disabled: [{
|
|
5042
5093
|
type: Input
|
|
5094
|
+
}], shape: [{
|
|
5095
|
+
type: Input
|
|
5096
|
+
}], fullWidth: [{
|
|
5097
|
+
type: Input
|
|
5043
5098
|
}], clicked: [{
|
|
5044
5099
|
type: Output
|
|
5045
5100
|
}] } });
|
|
@@ -5048,6 +5103,108 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
5048
5103
|
* Public API Surface of mapa-library-ui button
|
|
5049
5104
|
*/
|
|
5050
5105
|
|
|
5106
|
+
class MapaClassificationTagComponent {
|
|
5107
|
+
constructor() {
|
|
5108
|
+
this.i18n = inject(MapaI18nService);
|
|
5109
|
+
this.classification = input(...(ngDevMode ? [undefined, { debugName: "classification" }] : []));
|
|
5110
|
+
this.size = input('small', ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
5111
|
+
this.appearance = input('soft', ...(ngDevMode ? [{ debugName: "appearance" }] : []));
|
|
5112
|
+
this.shape = input('pill', ...(ngDevMode ? [{ debugName: "shape" }] : []));
|
|
5113
|
+
this.casing = input('auto', ...(ngDevMode ? [{ debugName: "casing" }] : []));
|
|
5114
|
+
/** Shown when there is no classification; defaults to the i18n text. */
|
|
5115
|
+
this.fallbackLabel = input(...(ngDevMode ? [undefined, { debugName: "fallbackLabel" }] : []));
|
|
5116
|
+
this.label = computed(() => this.classification()?.classificationName?.trim() ||
|
|
5117
|
+
this.fallbackLabel() ||
|
|
5118
|
+
this.i18n.texts.report.noClassification, ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
5119
|
+
this.background = computed(() => {
|
|
5120
|
+
const classification = this.classification();
|
|
5121
|
+
const explicit = normalizeHex(classification?.classificationBg);
|
|
5122
|
+
const color = normalizeHex(classification?.classificationColor) ?? '#ff560b';
|
|
5123
|
+
if (this.appearance() === 'solid')
|
|
5124
|
+
return color;
|
|
5125
|
+
return explicit ?? mixWithSurface(color, 0.14);
|
|
5126
|
+
}, ...(ngDevMode ? [{ debugName: "background" }] : []));
|
|
5127
|
+
this.foreground = computed(() => {
|
|
5128
|
+
const color = normalizeHex(this.classification()?.classificationColor) ?? '#a63a0a';
|
|
5129
|
+
const background = this.background();
|
|
5130
|
+
if (this.appearance() === 'solid')
|
|
5131
|
+
return readableForeground(background);
|
|
5132
|
+
if (this.appearance() === 'tonal') {
|
|
5133
|
+
return readableTonalForeground(color, background);
|
|
5134
|
+
}
|
|
5135
|
+
return contrast(color, background) >= 4.5 ? color : '#3f484f';
|
|
5136
|
+
}, ...(ngDevMode ? [{ debugName: "foreground" }] : []));
|
|
5137
|
+
this.border = computed(() => {
|
|
5138
|
+
const color = normalizeHex(this.classification()?.classificationColor) ?? '#ff8a55';
|
|
5139
|
+
return this.appearance() === 'solid'
|
|
5140
|
+
? this.background()
|
|
5141
|
+
: mixWithSurface(color, 0.38);
|
|
5142
|
+
}, ...(ngDevMode ? [{ debugName: "border" }] : []));
|
|
5143
|
+
this.usesNaturalCasing = computed(() => this.casing() === 'natural' ||
|
|
5144
|
+
(this.casing() === 'auto' && this.size() === 'large'), ...(ngDevMode ? [{ debugName: "usesNaturalCasing" }] : []));
|
|
5145
|
+
}
|
|
5146
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaClassificationTagComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5147
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.21", type: MapaClassificationTagComponent, isStandalone: true, selector: "mapa-classification-tag", inputs: { classification: { classPropertyName: "classification", publicName: "classification", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, shape: { classPropertyName: "shape", publicName: "shape", isSignal: true, isRequired: false, transformFunction: null }, casing: { classPropertyName: "casing", publicName: "casing", isSignal: true, isRequired: false, transformFunction: null }, fallbackLabel: { classPropertyName: "fallbackLabel", publicName: "fallbackLabel", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<span\n class=\"mapa-classification-tag\"\n [class.mapa-classification-tag--medium]=\"size() === 'medium'\"\n [class.mapa-classification-tag--large]=\"size() === 'large'\"\n [class.mapa-classification-tag--solid]=\"appearance() === 'solid'\"\n [class.mapa-classification-tag--tonal]=\"appearance() === 'tonal'\"\n [class.mapa-classification-tag--rounded]=\"shape() === 'rounded'\"\n [class.mapa-classification-tag--natural-case]=\"usesNaturalCasing()\"\n [style.--mapa-classification-background]=\"background()\"\n [style.--mapa-classification-border]=\"border()\"\n [style.--mapa-classification-foreground]=\"foreground()\"\n >{{ label() }}</span\n>\n", styles: [".mapa-classification-tag{align-items:center;background:var(--mapa-classification-background);border:var(--mapa-classification-tag-border-width, 1px) solid var(--mapa-classification-border);border-radius:var(--mapa-classification-tag-radius, 999px);box-sizing:border-box;color:var(--mapa-classification-foreground);display:inline-flex;font:600 var(--mapa-classification-tag-font-size, 10px)/1.2 var(--mapa-font-body, \"Asap\", sans-serif);justify-content:center;max-width:100%;min-height:22px;min-width:var(--mapa-classification-tag-min-width, 0);overflow-wrap:anywhere;padding:3px 7px;text-align:center;text-transform:uppercase;white-space:normal}.mapa-classification-tag--medium{--mapa-classification-tag-font-size: 11px;min-height:28px;padding:4px 10px}.mapa-classification-tag--large{--mapa-classification-tag-font-size: 12px;min-height:34px;padding:6px 14px}.mapa-classification-tag--rounded{border-radius:var(--mapa-classification-tag-radius, 12px)}.mapa-classification-tag--natural-case{text-transform:none}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5148
|
+
}
|
|
5149
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaClassificationTagComponent, decorators: [{
|
|
5150
|
+
type: Component,
|
|
5151
|
+
args: [{ selector: 'mapa-classification-tag', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<span\n class=\"mapa-classification-tag\"\n [class.mapa-classification-tag--medium]=\"size() === 'medium'\"\n [class.mapa-classification-tag--large]=\"size() === 'large'\"\n [class.mapa-classification-tag--solid]=\"appearance() === 'solid'\"\n [class.mapa-classification-tag--tonal]=\"appearance() === 'tonal'\"\n [class.mapa-classification-tag--rounded]=\"shape() === 'rounded'\"\n [class.mapa-classification-tag--natural-case]=\"usesNaturalCasing()\"\n [style.--mapa-classification-background]=\"background()\"\n [style.--mapa-classification-border]=\"border()\"\n [style.--mapa-classification-foreground]=\"foreground()\"\n >{{ label() }}</span\n>\n", styles: [".mapa-classification-tag{align-items:center;background:var(--mapa-classification-background);border:var(--mapa-classification-tag-border-width, 1px) solid var(--mapa-classification-border);border-radius:var(--mapa-classification-tag-radius, 999px);box-sizing:border-box;color:var(--mapa-classification-foreground);display:inline-flex;font:600 var(--mapa-classification-tag-font-size, 10px)/1.2 var(--mapa-font-body, \"Asap\", sans-serif);justify-content:center;max-width:100%;min-height:22px;min-width:var(--mapa-classification-tag-min-width, 0);overflow-wrap:anywhere;padding:3px 7px;text-align:center;text-transform:uppercase;white-space:normal}.mapa-classification-tag--medium{--mapa-classification-tag-font-size: 11px;min-height:28px;padding:4px 10px}.mapa-classification-tag--large{--mapa-classification-tag-font-size: 12px;min-height:34px;padding:6px 14px}.mapa-classification-tag--rounded{border-radius:var(--mapa-classification-tag-radius, 12px)}.mapa-classification-tag--natural-case{text-transform:none}\n"] }]
|
|
5152
|
+
}], propDecorators: { classification: [{ type: i0.Input, args: [{ isSignal: true, alias: "classification", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], shape: [{ type: i0.Input, args: [{ isSignal: true, alias: "shape", required: false }] }], casing: [{ type: i0.Input, args: [{ isSignal: true, alias: "casing", required: false }] }], fallbackLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "fallbackLabel", required: false }] }] } });
|
|
5153
|
+
function normalizeHex(value) {
|
|
5154
|
+
if (!value)
|
|
5155
|
+
return null;
|
|
5156
|
+
const match = value.trim().match(/^#([\da-f]{3}|[\da-f]{6})$/i);
|
|
5157
|
+
if (!match)
|
|
5158
|
+
return null;
|
|
5159
|
+
const raw = match[1];
|
|
5160
|
+
return raw.length === 3
|
|
5161
|
+
? `#${raw
|
|
5162
|
+
.split('')
|
|
5163
|
+
.map((part) => part + part)
|
|
5164
|
+
.join('')}`.toLowerCase()
|
|
5165
|
+
: `#${raw.toLowerCase()}`;
|
|
5166
|
+
}
|
|
5167
|
+
function rgb(hex) {
|
|
5168
|
+
return [1, 3, 5].map((index) => Number.parseInt(hex.slice(index, index + 2), 16));
|
|
5169
|
+
}
|
|
5170
|
+
function mixWithSurface(hex, amount) {
|
|
5171
|
+
const source = rgb(hex);
|
|
5172
|
+
const surface = [255, 250, 247];
|
|
5173
|
+
const mixed = source.map((channel, index) => Math.round(channel * amount + surface[index] * (1 - amount)));
|
|
5174
|
+
return `#${mixed.map((channel) => channel.toString(16).padStart(2, '0')).join('')}`;
|
|
5175
|
+
}
|
|
5176
|
+
function scaleColor(hex, amount) {
|
|
5177
|
+
return `#${rgb(hex)
|
|
5178
|
+
.map((channel) => Math.round(channel * amount))
|
|
5179
|
+
.map((channel) => channel.toString(16).padStart(2, '0'))
|
|
5180
|
+
.join('')}`;
|
|
5181
|
+
}
|
|
5182
|
+
function luminance(hex) {
|
|
5183
|
+
return rgb(hex)
|
|
5184
|
+
.map((channel) => channel / 255)
|
|
5185
|
+
.map((channel) => channel <= 0.03928 ? channel / 12.92 : ((channel + 0.055) / 1.055) ** 2.4)
|
|
5186
|
+
.reduce((sum, channel, index) => sum + channel * [0.2126, 0.7152, 0.0722][index], 0);
|
|
5187
|
+
}
|
|
5188
|
+
function contrast(first, second) {
|
|
5189
|
+
const values = [luminance(first), luminance(second)].sort((a, b) => b - a);
|
|
5190
|
+
return (values[0] + 0.05) / (values[1] + 0.05);
|
|
5191
|
+
}
|
|
5192
|
+
function readableForeground(background) {
|
|
5193
|
+
return contrast('#263238', background) >= contrast('#fffaf7', background)
|
|
5194
|
+
? '#263238'
|
|
5195
|
+
: '#fffaf7';
|
|
5196
|
+
}
|
|
5197
|
+
function readableTonalForeground(color, background) {
|
|
5198
|
+
if (contrast(color, background) >= 4.5)
|
|
5199
|
+
return color;
|
|
5200
|
+
for (let amount = 0.99; amount > 0; amount -= 0.01) {
|
|
5201
|
+
const candidate = scaleColor(color, amount);
|
|
5202
|
+
if (contrast(candidate, background) >= 4.5)
|
|
5203
|
+
return candidate;
|
|
5204
|
+
}
|
|
5205
|
+
return readableForeground(background);
|
|
5206
|
+
}
|
|
5207
|
+
|
|
5051
5208
|
class ButtonIconComponent {
|
|
5052
5209
|
onClick(data) {
|
|
5053
5210
|
this.clicked.emit(data);
|
|
@@ -6115,7 +6272,7 @@ class MapaDropdownComponent {
|
|
|
6115
6272
|
useExisting: forwardRef(() => MapaDropdownComponent),
|
|
6116
6273
|
multi: true,
|
|
6117
6274
|
},
|
|
6118
|
-
], 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 }); }
|
|
6275
|
+
], 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 }); }
|
|
6119
6276
|
}
|
|
6120
6277
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaDropdownComponent, decorators: [{
|
|
6121
6278
|
type: Component,
|
|
@@ -6286,6 +6443,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
6286
6443
|
* Public API Surface of mapa-library-ui icon
|
|
6287
6444
|
*/
|
|
6288
6445
|
|
|
6446
|
+
let nextConclusionCardId = 0;
|
|
6447
|
+
class MapaConclusionCardComponent {
|
|
6448
|
+
constructor() {
|
|
6449
|
+
this.i18n = inject(MapaI18nService);
|
|
6450
|
+
this.data = input.required(...(ngDevMode ? [{ debugName: "data" }] : []));
|
|
6451
|
+
this.editable = input(false, ...(ngDevMode ? [{ debugName: "editable" }] : []));
|
|
6452
|
+
/** Overrides the edit action label; defaults to the i18n text. */
|
|
6453
|
+
this.editLabel = input(...(ngDevMode ? [undefined, { debugName: "editLabel" }] : []));
|
|
6454
|
+
this.expanded = model(true, ...(ngDevMode ? [{ debugName: "expanded" }] : []));
|
|
6455
|
+
this.edit = output();
|
|
6456
|
+
this.panelId = `mapa-conclusion-card-${nextConclusionCardId++}`;
|
|
6457
|
+
this.editCaption = computed(() => this.editLabel() ?? this.i18n.texts.report.editConclusionLabel, ...(ngDevMode ? [{ debugName: "editCaption" }] : []));
|
|
6458
|
+
this.isOverall = computed(() => this.data().variant === 'overall', ...(ngDevMode ? [{ debugName: "isOverall" }] : []));
|
|
6459
|
+
this.icon = computed(() => this.isOverall() ? 'auto_awesome' : 'article', ...(ngDevMode ? [{ debugName: "icon" }] : []));
|
|
6460
|
+
this.metadata = computed(() => (this.data().metadata ?? []).filter((item) => item.value?.trim()), ...(ngDevMode ? [{ debugName: "metadata" }] : []));
|
|
6461
|
+
this.hasConclusion = computed(() => !!this.data().body?.trim() ||
|
|
6462
|
+
!!this.data().classification ||
|
|
6463
|
+
this.metadata().length > 0, ...(ngDevMode ? [{ debugName: "hasConclusion" }] : []));
|
|
6464
|
+
}
|
|
6465
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaConclusionCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6466
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.21", type: MapaConclusionCardComponent, isStandalone: true, selector: "mapa-conclusion-card", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, editable: { classPropertyName: "editable", publicName: "editable", isSignal: true, isRequired: false, transformFunction: null }, editLabel: { classPropertyName: "editLabel", publicName: "editLabel", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expanded: "expandedChange", edit: "edit" }, ngImport: i0, template: "<article\n class=\"mapa-conclusion-card\"\n [class.mapa-conclusion-card--overall]=\"isOverall()\"\n>\n <header class=\"mapa-conclusion-card__header\">\n <button\n type=\"button\"\n class=\"mapa-conclusion-card__toggle\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-controls]=\"panelId\"\n (click)=\"expanded.set(!expanded())\"\n >\n <span class=\"mapa-conclusion-card__icon\" aria-hidden=\"true\">\n <mat-icon>{{ icon() }}</mat-icon>\n </span>\n <span class=\"mapa-conclusion-card__heading\">\n <strong>{{ data().title }}</strong>\n @if (data().context) {\n <small>{{ data().context }}</small>\n }\n </span>\n <span class=\"mapa-conclusion-card__status\">\n <mapa-classification-tag\n appearance=\"tonal\"\n casing=\"natural\"\n size=\"medium\"\n [classification]=\"data().classification\"\n />\n <mat-icon class=\"mapa-conclusion-card__chevron\" aria-hidden=\"true\">\n {{ expanded() ? 'keyboard_arrow_up' : 'keyboard_arrow_down' }}\n </mat-icon>\n </span>\n </button>\n </header>\n\n @if (expanded()) {\n <div class=\"mapa-conclusion-card__body\" [id]=\"panelId\">\n @if (data().body) {\n <div\n class=\"mapa-conclusion-card__text\"\n [innerHTML]=\"data().body | safeHtml\"\n ></div>\n } @else {\n <p class=\"mapa-conclusion-card__empty\">{{ data().emptyText }}</p>\n }\n @if (metadata().length) {\n <dl class=\"mapa-conclusion-card__metadata\">\n @for (item of metadata(); track item.label) {\n <div>\n <dt>{{ item.label }}</dt>\n <dd [class.mapa-conclusion-card__metadata-value--emphasized]=\"item.emphasized\">\n {{ item.value }}\n </dd>\n </div>\n }\n </dl>\n }\n </div>\n }\n\n @if (editable() && (expanded() || !hasConclusion())) {\n <footer\n class=\"mapa-conclusion-card__actions\"\n [class.mapa-conclusion-card__actions--collapsed]=\"!expanded()\"\n >\n <button\n type=\"button\"\n class=\"mapa-conclusion-card__edit\"\n (click)=\"edit.emit()\"\n >\n <mat-icon aria-hidden=\"true\">\n {{ hasConclusion() ? 'edit' : 'add' }}\n </mat-icon>\n {{ editCaption() }}\n </button>\n </footer>\n }\n</article>\n", styles: [":host{--mapa-report-accent: #ff560b;--mapa-report-accent-soft: #fff0e9;--mapa-report-surface: #fff;--mapa-report-surface-muted: #eef2f3;--mapa-report-border: #e1e5e7;--mapa-report-text: #263238;--mapa-report-muted: #68747a;--mapa-report-pill-width: 104px;--mapa-report-radius: 8px;--mapa-report-space: 20px;color:var(--mapa-report-text);display:block;font-family:var(--mapa-font-body, \"Asap\", \"Roboto\", sans-serif)}.mapa-conclusion-card{--mapa-conclusion-card-divider: #edf1f3;--mapa-conclusion-card-overall-border: #ffb99f;--mapa-conclusion-card-overall-surface: #fffaf7;--mapa-conclusion-card-surface: #fff;background:var(--mapa-conclusion-card-surface);border:1px solid var(--mapa-report-border);border-radius:13px;overflow:clip}.mapa-conclusion-card--overall{background:var(--mapa-conclusion-card-overall-surface);border-color:var(--mapa-conclusion-card-overall-border)}.mapa-conclusion-card__header{align-items:stretch;display:flex}.mapa-conclusion-card__toggle{background:transparent;border:0;color:inherit;cursor:pointer;font-family:inherit}.mapa-conclusion-card__toggle:focus-visible{outline:3px solid rgba(255,86,11,.28);outline-offset:-3px}.mapa-conclusion-card__toggle{align-items:center;display:flex;flex:1;gap:12px;min-width:0;padding:15px 16px;text-align:left}.mapa-conclusion-card__icon{align-items:center;background:#f0f3f4;border-radius:10px;color:#67757d;display:inline-flex;height:34px;justify-content:center;width:34px}.mapa-conclusion-card__icon mat-icon{font-size:17px;height:17px;width:17px}.mapa-conclusion-card--overall .mapa-conclusion-card__icon{background:var(--mapa-report-accent-soft);color:#cf4314}.mapa-conclusion-card__heading{display:grid;gap:3px;min-width:0}.mapa-conclusion-card__heading strong{font-size:14px}.mapa-conclusion-card__heading small{color:var(--mapa-report-muted);font-size:11px}.mapa-conclusion-card__status{align-items:center;display:flex;flex:1 0 auto;gap:10px;min-width:0}.mapa-conclusion-card__status mapa-classification-tag{--mapa-classification-tag-border-width: 0;margin-left:auto}.mapa-conclusion-card__chevron{color:var(--mapa-report-muted);font-size:18px;height:18px;margin-left:auto;width:18px}.mapa-conclusion-card__edit{align-items:center;background:var(--mapa-conclusion-card-surface);border:1px solid var(--mapa-conclusion-card-overall-border);border-radius:8px;color:var(--mapa-report-accent);cursor:pointer;display:inline-flex;font-size:11px;font-weight:650;gap:6px;min-height:34px;padding:0 10px}.mapa-conclusion-card__edit mat-icon{font-size:16px;height:16px;width:16px}.mapa-conclusion-card__edit:focus-visible{outline:3px solid rgba(255,86,11,.28);outline-offset:2px}.mapa-conclusion-card__body{border-top:1px solid var(--mapa-conclusion-card-divider);padding:16px 18px 17px 62px}.mapa-conclusion-card__text,.mapa-conclusion-card__empty{color:var(--mapa-report-muted);font-size:14px;line-height:1.65;margin:0;max-width:930px}.mapa-conclusion-card__text :last-child,.mapa-conclusion-card__empty :last-child{margin-bottom:0}.mapa-conclusion-card__metadata{border-top:1px solid var(--mapa-conclusion-card-divider);display:grid;gap:13px;grid-template-columns:1fr 1fr 1.4fr 1.5fr;margin:16px 0 0;padding-top:13px}.mapa-conclusion-card__metadata div{display:grid;gap:2px}.mapa-conclusion-card__metadata dt{color:var(--mapa-report-muted);font-size:10px;font-weight:700;text-transform:uppercase}.mapa-conclusion-card__metadata dd{font-size:12px;font-weight:600;margin:0}.mapa-conclusion-card__metadata-value--emphasized{color:#cf4314}.mapa-conclusion-card__actions{display:flex;justify-content:flex-end;padding:0 18px 16px 62px}.mapa-conclusion-card__actions--collapsed{border-top:1px solid var(--mapa-conclusion-card-divider);padding:12px 16px}@media(max-width:600px){.mapa-conclusion-card__header{align-items:stretch;flex-direction:column}.mapa-conclusion-card__toggle{align-items:flex-start;display:grid;grid-template-columns:auto minmax(0,1fr)}.mapa-conclusion-card__status{grid-column:2;width:100%}.mapa-conclusion-card__status mapa-classification-tag{margin-left:0}.mapa-conclusion-card__body{padding-left:16px}.mapa-conclusion-card__metadata{grid-template-columns:1fr 1fr}.mapa-conclusion-card__actions{padding-left:16px}}\n"], dependencies: [{ kind: "component", type: MapaClassificationTagComponent, selector: "mapa-classification-tag", inputs: ["classification", "size", "appearance", "shape", "casing", "fallbackLabel"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
6467
|
+
}
|
|
6468
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaConclusionCardComponent, decorators: [{
|
|
6469
|
+
type: Component,
|
|
6470
|
+
args: [{ selector: 'mapa-conclusion-card', standalone: true, imports: [MapaClassificationTagComponent, MatIconModule, SafeHtmlPipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "<article\n class=\"mapa-conclusion-card\"\n [class.mapa-conclusion-card--overall]=\"isOverall()\"\n>\n <header class=\"mapa-conclusion-card__header\">\n <button\n type=\"button\"\n class=\"mapa-conclusion-card__toggle\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-controls]=\"panelId\"\n (click)=\"expanded.set(!expanded())\"\n >\n <span class=\"mapa-conclusion-card__icon\" aria-hidden=\"true\">\n <mat-icon>{{ icon() }}</mat-icon>\n </span>\n <span class=\"mapa-conclusion-card__heading\">\n <strong>{{ data().title }}</strong>\n @if (data().context) {\n <small>{{ data().context }}</small>\n }\n </span>\n <span class=\"mapa-conclusion-card__status\">\n <mapa-classification-tag\n appearance=\"tonal\"\n casing=\"natural\"\n size=\"medium\"\n [classification]=\"data().classification\"\n />\n <mat-icon class=\"mapa-conclusion-card__chevron\" aria-hidden=\"true\">\n {{ expanded() ? 'keyboard_arrow_up' : 'keyboard_arrow_down' }}\n </mat-icon>\n </span>\n </button>\n </header>\n\n @if (expanded()) {\n <div class=\"mapa-conclusion-card__body\" [id]=\"panelId\">\n @if (data().body) {\n <div\n class=\"mapa-conclusion-card__text\"\n [innerHTML]=\"data().body | safeHtml\"\n ></div>\n } @else {\n <p class=\"mapa-conclusion-card__empty\">{{ data().emptyText }}</p>\n }\n @if (metadata().length) {\n <dl class=\"mapa-conclusion-card__metadata\">\n @for (item of metadata(); track item.label) {\n <div>\n <dt>{{ item.label }}</dt>\n <dd [class.mapa-conclusion-card__metadata-value--emphasized]=\"item.emphasized\">\n {{ item.value }}\n </dd>\n </div>\n }\n </dl>\n }\n </div>\n }\n\n @if (editable() && (expanded() || !hasConclusion())) {\n <footer\n class=\"mapa-conclusion-card__actions\"\n [class.mapa-conclusion-card__actions--collapsed]=\"!expanded()\"\n >\n <button\n type=\"button\"\n class=\"mapa-conclusion-card__edit\"\n (click)=\"edit.emit()\"\n >\n <mat-icon aria-hidden=\"true\">\n {{ hasConclusion() ? 'edit' : 'add' }}\n </mat-icon>\n {{ editCaption() }}\n </button>\n </footer>\n }\n</article>\n", styles: [":host{--mapa-report-accent: #ff560b;--mapa-report-accent-soft: #fff0e9;--mapa-report-surface: #fff;--mapa-report-surface-muted: #eef2f3;--mapa-report-border: #e1e5e7;--mapa-report-text: #263238;--mapa-report-muted: #68747a;--mapa-report-pill-width: 104px;--mapa-report-radius: 8px;--mapa-report-space: 20px;color:var(--mapa-report-text);display:block;font-family:var(--mapa-font-body, \"Asap\", \"Roboto\", sans-serif)}.mapa-conclusion-card{--mapa-conclusion-card-divider: #edf1f3;--mapa-conclusion-card-overall-border: #ffb99f;--mapa-conclusion-card-overall-surface: #fffaf7;--mapa-conclusion-card-surface: #fff;background:var(--mapa-conclusion-card-surface);border:1px solid var(--mapa-report-border);border-radius:13px;overflow:clip}.mapa-conclusion-card--overall{background:var(--mapa-conclusion-card-overall-surface);border-color:var(--mapa-conclusion-card-overall-border)}.mapa-conclusion-card__header{align-items:stretch;display:flex}.mapa-conclusion-card__toggle{background:transparent;border:0;color:inherit;cursor:pointer;font-family:inherit}.mapa-conclusion-card__toggle:focus-visible{outline:3px solid rgba(255,86,11,.28);outline-offset:-3px}.mapa-conclusion-card__toggle{align-items:center;display:flex;flex:1;gap:12px;min-width:0;padding:15px 16px;text-align:left}.mapa-conclusion-card__icon{align-items:center;background:#f0f3f4;border-radius:10px;color:#67757d;display:inline-flex;height:34px;justify-content:center;width:34px}.mapa-conclusion-card__icon mat-icon{font-size:17px;height:17px;width:17px}.mapa-conclusion-card--overall .mapa-conclusion-card__icon{background:var(--mapa-report-accent-soft);color:#cf4314}.mapa-conclusion-card__heading{display:grid;gap:3px;min-width:0}.mapa-conclusion-card__heading strong{font-size:14px}.mapa-conclusion-card__heading small{color:var(--mapa-report-muted);font-size:11px}.mapa-conclusion-card__status{align-items:center;display:flex;flex:1 0 auto;gap:10px;min-width:0}.mapa-conclusion-card__status mapa-classification-tag{--mapa-classification-tag-border-width: 0;margin-left:auto}.mapa-conclusion-card__chevron{color:var(--mapa-report-muted);font-size:18px;height:18px;margin-left:auto;width:18px}.mapa-conclusion-card__edit{align-items:center;background:var(--mapa-conclusion-card-surface);border:1px solid var(--mapa-conclusion-card-overall-border);border-radius:8px;color:var(--mapa-report-accent);cursor:pointer;display:inline-flex;font-size:11px;font-weight:650;gap:6px;min-height:34px;padding:0 10px}.mapa-conclusion-card__edit mat-icon{font-size:16px;height:16px;width:16px}.mapa-conclusion-card__edit:focus-visible{outline:3px solid rgba(255,86,11,.28);outline-offset:2px}.mapa-conclusion-card__body{border-top:1px solid var(--mapa-conclusion-card-divider);padding:16px 18px 17px 62px}.mapa-conclusion-card__text,.mapa-conclusion-card__empty{color:var(--mapa-report-muted);font-size:14px;line-height:1.65;margin:0;max-width:930px}.mapa-conclusion-card__text :last-child,.mapa-conclusion-card__empty :last-child{margin-bottom:0}.mapa-conclusion-card__metadata{border-top:1px solid var(--mapa-conclusion-card-divider);display:grid;gap:13px;grid-template-columns:1fr 1fr 1.4fr 1.5fr;margin:16px 0 0;padding-top:13px}.mapa-conclusion-card__metadata div{display:grid;gap:2px}.mapa-conclusion-card__metadata dt{color:var(--mapa-report-muted);font-size:10px;font-weight:700;text-transform:uppercase}.mapa-conclusion-card__metadata dd{font-size:12px;font-weight:600;margin:0}.mapa-conclusion-card__metadata-value--emphasized{color:#cf4314}.mapa-conclusion-card__actions{display:flex;justify-content:flex-end;padding:0 18px 16px 62px}.mapa-conclusion-card__actions--collapsed{border-top:1px solid var(--mapa-conclusion-card-divider);padding:12px 16px}@media(max-width:600px){.mapa-conclusion-card__header{align-items:stretch;flex-direction:column}.mapa-conclusion-card__toggle{align-items:flex-start;display:grid;grid-template-columns:auto minmax(0,1fr)}.mapa-conclusion-card__status{grid-column:2;width:100%}.mapa-conclusion-card__status mapa-classification-tag{margin-left:0}.mapa-conclusion-card__body{padding-left:16px}.mapa-conclusion-card__metadata{grid-template-columns:1fr 1fr}.mapa-conclusion-card__actions{padding-left:16px}}\n"] }]
|
|
6471
|
+
}], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], editable: [{ type: i0.Input, args: [{ isSignal: true, alias: "editable", required: false }] }], editLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "editLabel", required: false }] }], expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }, { type: i0.Output, args: ["expandedChange"] }], edit: [{ type: i0.Output, args: ["edit"] }] } });
|
|
6472
|
+
|
|
6289
6473
|
/**
|
|
6290
6474
|
* Fallback do gatilho de presets. Literal como o `aria-label="Limpar"` que o
|
|
6291
6475
|
* v1 e o `mapa-dropdown` já embarcam — `MapaUiTextGroups["datepicker"]` vem do
|
|
@@ -6879,7 +7063,7 @@ class MapaDialogComponent {
|
|
|
6879
7063
|
this.dataEmitter.emit(this.dialogData);
|
|
6880
7064
|
}
|
|
6881
7065
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaDialogComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1$4.MatDialogRef }, { token: i1$3.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6882
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.21", type: MapaDialogComponent, isStandalone: true, selector: "mapa-dialog", inputs: { isReportRegistration: "isReportRegistration" }, outputs: { dataEmitter: "dataEmitter" }, ngImport: i0, template: "<div class=\"mapa-dialog\">\n <div class=\"dialog-icon\">\n <mat-icon (click)=\"close()\">close</mat-icon>\n </div> \n <mat-dialog-content>\n <img *ngIf=\"imgBase64\" [src]=\"imgBase64\" />\n <h2>\n {{ dialogData.title }}\n </h2>\n <p [innerHTML]=\"htmlDescription | safeHtml\"></p>\n </mat-dialog-content>\n <div *ngIf=\"dialogData.isReportRegistration\">\n <mapa-button color=\"accent\" (click)=\"emitData()\">\n {{ dialogData.button }}\n </mapa-button>\n </div>\n <mat-dialog-actions *ngIf=\"!dialogData.isReportRegistration\" class=\"mapa-dialog__actions\">\n <mapa-button color=\"basic\" (click)=\"close()\" *ngIf=\"dialogData.actions.close\">\n {{ dialogData.actions.close }}\n </mapa-button>\n <mapa-button color=\"primary\" (click)=\"save()\" *ngIf=\"dialogData.actions.save\">\n {{ dialogData.actions.save }}\n </mapa-button>\n </mat-dialog-actions>\n</div>\n\n", styles: [".mapa-dialog{background-color:#f6f7f7!important;border-radius:8px!important;padding:42px!important}.mapa-dialog .dialog-icon{display:flex;margin-left:95%}.mapa-dialog .mat-icon{cursor:pointer;display:flex;position:relative;align-self:flex-end}.mapa-dialog h2{color:#181818;font-family:var(--mapa-font-heading, \"Asap\", \"Inter\", sans-serif);font-size:24px;font-style:normal;font-weight:400;line-height:32px}.mapa-dialog img{padding:39px 11px;width:100%;border-radius:8px;border:1px solid #CDCDCD;background:#fff;margin:30px 0}.mapa-dialog p{color:#50575e;font-family:var(--mapa-font-body, \"Asap\", \"Roboto\", \"Inter\", sans-serif);font-size:16px;font-style:normal;font-weight:500;line-height:28px}.mapa-dialog__actions{justify-content:end}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1$4.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1$4.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type:
|
|
7066
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.21", type: MapaDialogComponent, isStandalone: true, selector: "mapa-dialog", inputs: { isReportRegistration: "isReportRegistration" }, outputs: { dataEmitter: "dataEmitter" }, ngImport: i0, template: "<div class=\"mapa-dialog\">\n <div class=\"dialog-icon\">\n <mat-icon (click)=\"close()\">close</mat-icon>\n </div> \n <mat-dialog-content>\n <img *ngIf=\"imgBase64\" [src]=\"imgBase64\" />\n <h2>\n {{ dialogData.title }}\n </h2>\n <p [innerHTML]=\"htmlDescription | safeHtml\"></p>\n </mat-dialog-content>\n <div *ngIf=\"dialogData.isReportRegistration\">\n <mapa-button color=\"accent\" (click)=\"emitData()\">\n {{ dialogData.button }}\n </mapa-button>\n </div>\n <mat-dialog-actions *ngIf=\"!dialogData.isReportRegistration\" class=\"mapa-dialog__actions\">\n <mapa-button color=\"basic\" (click)=\"close()\" *ngIf=\"dialogData.actions.close\">\n {{ dialogData.actions.close }}\n </mapa-button>\n <mapa-button color=\"primary\" (click)=\"save()\" *ngIf=\"dialogData.actions.save\">\n {{ dialogData.actions.save }}\n </mapa-button>\n </mat-dialog-actions>\n</div>\n\n", styles: [".mapa-dialog{background-color:#f6f7f7!important;border-radius:8px!important;padding:42px!important}.mapa-dialog .dialog-icon{display:flex;margin-left:95%}.mapa-dialog .mat-icon{cursor:pointer;display:flex;position:relative;align-self:flex-end}.mapa-dialog h2{color:#181818;font-family:var(--mapa-font-heading, \"Asap\", \"Inter\", sans-serif);font-size:24px;font-style:normal;font-weight:400;line-height:32px}.mapa-dialog img{padding:39px 11px;width:100%;border-radius:8px;border:1px solid #CDCDCD;background:#fff;margin:30px 0}.mapa-dialog p{color:#50575e;font-family:var(--mapa-font-body, \"Asap\", \"Roboto\", \"Inter\", sans-serif);font-size:16px;font-style:normal;font-weight:500;line-height:28px}.mapa-dialog__actions{justify-content:end}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1$4.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1$4.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: ButtonComponent, selector: "mapa-button", inputs: ["color", "disabled", "shape", "fullWidth"], outputs: ["clicked"] }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }] }); }
|
|
6883
7067
|
}
|
|
6884
7068
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaDialogComponent, decorators: [{
|
|
6885
7069
|
type: Component,
|
|
@@ -7047,7 +7231,7 @@ class MapaInputComponent {
|
|
|
7047
7231
|
useExisting: forwardRef(() => MapaInputComponent),
|
|
7048
7232
|
multi: true,
|
|
7049
7233
|
},
|
|
7050
|
-
], 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$2.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$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i3$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type:
|
|
7234
|
+
], 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$2.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$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i3$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i1.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"] }] }); }
|
|
7051
7235
|
}
|
|
7052
7236
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaInputComponent, decorators: [{
|
|
7053
7237
|
type: Component,
|
|
@@ -7109,7 +7293,7 @@ class FiltersComponent {
|
|
|
7109
7293
|
this.selectedValues.emit(this.form.getRawValue());
|
|
7110
7294
|
}
|
|
7111
7295
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: FiltersComponent, deps: [{ token: MapaI18nService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7112
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.21", type: FiltersComponent, isStandalone: true, selector: "mapa-filters", inputs: { form: "form", elements: "elements" }, outputs: { selectedValues: "selectedValues" }, ngImport: i0, template: "<div class=\"filter\">\n <div *ngFor=\"let filter of elements\">\n <div *ngIf=\"filter.controlType === 'checkbox'\" class=\"filter__item--resizable\">\n <mapa-checkbox [formControl]=\"getFormControl(filter.key)\"></mapa-checkbox>\n </div>\n <div *ngIf=\"filter.controlType === 'dropdown'\" class=\"filter__item--resizable\">\n <mapa-dropdown\n [formControl]=\"getFormControl(filter.key)\"\n [element]=\"filter\"\n ></mapa-dropdown>\n </div>\n <div *ngIf=\"filter.controlType === 'input'\" class=\"filter__item\">\n <mapa-input\n [formControl]=\"getFormControl(filter.key)\"\n [element]=\"filter\"\n ></mapa-input>\n </div>\n </div>\n <div class=\"filter__item\">\n <mapa-button [color]=\"'basic'\" (clicked)=\"clearFilters()\">\n {{ clearFiltersLabel }}\n </mapa-button>\n <mapa-button\n [color]=\"'primary'\"\n [disabled]=\"!!form.invalid\"\n (clicked)=\"emitSelectedValues()\"\n >\n {{ submitFiltersLabel }}\n </mapa-button>\n </div>\n</div>\n\n", styles: [".filter{display:flex;align-items:flex-end;flex-wrap:wrap;background-color:#f6f7f7;padding:32px;width:100%;gap:30px}.filter__item,.filter__item--resizable{display:flex;align-items:flex-end}.filter mapa-dropdown{display:block;max-width:none;min-width:10vw}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { 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: ButtonComponent, selector: "mapa-button", inputs: ["color", "disabled"], outputs: ["clicked"] }, { kind: "component", type: CheckboxComponent, selector: "mapa-checkbox", inputs: ["color", "formControl"] }, { kind: "component", type: MapaDropdownComponent, selector: "mapa-dropdown", inputs: ["element", "formControl", "formControlSearch", "border"], outputs: ["openedChange"] }, { kind: "component", type: MapaInputComponent, selector: "mapa-input", inputs: ["formControl", "element", "type"], outputs: ["suffix"] }] }); }
|
|
7296
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.21", type: FiltersComponent, isStandalone: true, selector: "mapa-filters", inputs: { form: "form", elements: "elements" }, outputs: { selectedValues: "selectedValues" }, ngImport: i0, template: "<div class=\"filter\">\n <div *ngFor=\"let filter of elements\">\n <div *ngIf=\"filter.controlType === 'checkbox'\" class=\"filter__item--resizable\">\n <mapa-checkbox [formControl]=\"getFormControl(filter.key)\"></mapa-checkbox>\n </div>\n <div *ngIf=\"filter.controlType === 'dropdown'\" class=\"filter__item--resizable\">\n <mapa-dropdown\n [formControl]=\"getFormControl(filter.key)\"\n [element]=\"filter\"\n ></mapa-dropdown>\n </div>\n <div *ngIf=\"filter.controlType === 'input'\" class=\"filter__item\">\n <mapa-input\n [formControl]=\"getFormControl(filter.key)\"\n [element]=\"filter\"\n ></mapa-input>\n </div>\n </div>\n <div class=\"filter__item\">\n <mapa-button [color]=\"'basic'\" (clicked)=\"clearFilters()\">\n {{ clearFiltersLabel }}\n </mapa-button>\n <mapa-button\n [color]=\"'primary'\"\n [disabled]=\"!!form.invalid\"\n (clicked)=\"emitSelectedValues()\"\n >\n {{ submitFiltersLabel }}\n </mapa-button>\n </div>\n</div>\n\n", styles: [".filter{display:flex;align-items:flex-end;flex-wrap:wrap;background-color:#f6f7f7;padding:32px;width:100%;gap:30px}.filter__item,.filter__item--resizable{display:flex;align-items:flex-end}.filter mapa-dropdown{display:block;max-width:none;min-width:10vw}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { 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: ButtonComponent, selector: "mapa-button", inputs: ["color", "disabled", "shape", "fullWidth"], outputs: ["clicked"] }, { kind: "component", type: CheckboxComponent, selector: "mapa-checkbox", inputs: ["color", "formControl"] }, { kind: "component", type: MapaDropdownComponent, selector: "mapa-dropdown", inputs: ["element", "formControl", "formControlSearch", "border"], outputs: ["openedChange"] }, { kind: "component", type: MapaInputComponent, selector: "mapa-input", inputs: ["formControl", "element", "type"], outputs: ["suffix"] }] }); }
|
|
7113
7297
|
}
|
|
7114
7298
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: FiltersComponent, decorators: [{
|
|
7115
7299
|
type: Component,
|
|
@@ -7397,13 +7581,13 @@ class MapaSvgIconComponent {
|
|
|
7397
7581
|
.replaceAll('stroke="#181818"', `stroke="${this.color}"`)
|
|
7398
7582
|
.replaceAll('stroke="#7def7b"', `stroke="${this.color}"`);
|
|
7399
7583
|
}
|
|
7400
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaSvgIconComponent, deps: [{ token: i1$
|
|
7584
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaSvgIconComponent, deps: [{ token: i1$5.HttpClient }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7401
7585
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.21", type: MapaSvgIconComponent, isStandalone: true, selector: "mapa-svg-icon", inputs: { name: "name", color: "color" }, usesOnChanges: true, ngImport: i0, template: "<span *ngIf=\"svgIcon\" class=\"mapa__svg-icon\" [innerHTML]=\"svgIcon | safeHtml\"></span>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }] }); }
|
|
7402
7586
|
}
|
|
7403
7587
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaSvgIconComponent, decorators: [{
|
|
7404
7588
|
type: Component,
|
|
7405
7589
|
args: [{ selector: "mapa-svg-icon", standalone: true, imports: [CommonModule, SafeHtmlPipe], template: "<span *ngIf=\"svgIcon\" class=\"mapa__svg-icon\" [innerHTML]=\"svgIcon | safeHtml\"></span>\n" }]
|
|
7406
|
-
}], ctorParameters: () => [{ type: i1$
|
|
7590
|
+
}], ctorParameters: () => [{ type: i1$5.HttpClient }, { type: i0.ChangeDetectorRef }], propDecorators: { name: [{
|
|
7407
7591
|
type: Input
|
|
7408
7592
|
}], color: [{
|
|
7409
7593
|
type: Input
|
|
@@ -7618,9 +7802,12 @@ class MapaTableComponent {
|
|
|
7618
7802
|
return 'descending';
|
|
7619
7803
|
return 'none';
|
|
7620
7804
|
}
|
|
7805
|
+
isSorted(column) {
|
|
7806
|
+
return this.activeSort() === column.key && !!this.activeDirection();
|
|
7807
|
+
}
|
|
7621
7808
|
sortIcon(column) {
|
|
7622
|
-
if (this.
|
|
7623
|
-
return '
|
|
7809
|
+
if (!this.isSorted(column))
|
|
7810
|
+
return 'swap_vert';
|
|
7624
7811
|
return this.activeDirection() === 'asc' ? 'arrow_upward' : 'arrow_downward';
|
|
7625
7812
|
}
|
|
7626
7813
|
changeSort(column) {
|
|
@@ -7812,7 +7999,7 @@ class MapaTableComponent {
|
|
|
7812
7999
|
useFactory: customPaginatorFactory,
|
|
7813
8000
|
deps: [MapaI18nService, Injector],
|
|
7814
8001
|
},
|
|
7815
|
-
], queries: [{ propertyName: "projectedCells", predicate: MapaTableCellDirective, isSignal: true }], ngImport: i0, template: "<section\n class=\"mapa-data-table\"\n [class.mapa-data-table--selectable]=\"isSelectable\"\n>\n <div class=\"mapa-data-table__frame\">\n @if (isLoading) {\n <table class=\"mapa-data-table__table\" aria-hidden=\"true\">\n <thead>\n <tr>\n @if (isSelectable) {\n <th class=\"mapa-data-table__selection-cell\"></th>\n }\n @for (column of columns; track column.key) {\n <th [style.width]=\"skeletonColumnWidth(column)\">\n {{ column.label }}\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of skeletonRows; track row) {\n <tr>\n @if (isSelectable) {\n <td class=\"mapa-data-table__selection-cell\">\n <span\n class=\"mapa-data-table__skeleton mapa-data-table__skeleton--checkbox\"\n ></span>\n </td>\n }\n @for (column of columns; track column.key) {\n <td [style.width]=\"skeletonColumnWidth(column)\">\n <span class=\"mapa-data-table__skeleton\"></span>\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n <span class=\"mapa-data-table__sr-only\" role=\"status\">\n {{ texts.table.loading }}\n </span>\n } @else if (error) {\n <div class=\"mapa-data-table__state\" role=\"alert\">\n <strong>{{ resolvedErrorTitle }}</strong>\n @if (resolvedErrorSubtitle) {\n <span>{{ resolvedErrorSubtitle }}</span>\n }\n @if (retry.observed) {\n <button type=\"button\" (click)=\"retry.emit()\">\n {{ resolvedRetryLabel }}\n </button>\n }\n </div>\n } @else if (visibleData.length > 0) {\n <table class=\"mapa-data-table__table\">\n @if (caption) {\n <caption class=\"mapa-data-table__sr-only\">\n {{\n caption\n }}\n </caption>\n }\n <thead>\n <tr>\n @if (isSelectable) {\n <th class=\"mapa-data-table__selection-cell\">\n @if (showSelectAll) {\n <mat-checkbox\n color=\"primary\"\n [checked]=\"allVisibleSelected()\"\n [indeterminate]=\"someVisibleSelected()\"\n [aria-label]=\"texts.table.selectAllVisible\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"toggleVisibleRows($event.checked)\"\n />\n } @else {\n <span class=\"mapa-data-table__sr-only\">\n {{ texts.table.selectionColumn }}\n </span>\n }\n </th>\n }\n @for (column of columns; track column.key) {\n <th\n [class.mapa-data-table__cell--center]=\"isCenterAligned(column)\"\n [class.mapa-data-table__cell--end]=\"isEndAligned(column)\"\n [style.width]=\"columnWidth(column)\"\n [attr.aria-sort]=\"ariaSort(column)\"\n >\n @if (isSortable(column)) {\n <button\n type=\"button\"\n class=\"mapa-data-table__sort\"\n (click)=\"changeSort(column)\"\n >\n <span [innerHTML]=\"column.label | safeHtml\"></span>\n <mat-icon aria-hidden=\"true\">{{\n sortIcon(column)\n }}</mat-icon>\n </button>\n } @else {\n <span [innerHTML]=\"column.label | safeHtml\"></span>\n }\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of visibleData; track rowIdentity(row, $index)) {\n <tr\n [class.mapa-data-table__row--selected]=\"isSelected(row)\"\n [class.mapa-data-table__row--interactive]=\"rowClick.observed\"\n [attr.tabindex]=\"rowClick.observed ? 0 : null\"\n (click)=\"emitRowInteraction($event, row)\"\n (keydown)=\"emitRowKeyboard($event, row)\"\n >\n @if (isSelectable) {\n <td class=\"mapa-data-table__selection-cell\">\n <mat-checkbox\n color=\"primary\"\n [checked]=\"isSelected(row)\"\n [aria-label]=\"selectionLabel(row)\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"toggleRow(row, $event.checked)\"\n />\n </td>\n }\n @for (column of columns; track column.key) {\n <td\n [attr.data-label]=\"column.label\"\n [class.mapa-data-table__cell--center]=\"\n isCenterAligned(column)\n \"\n [class.mapa-data-table__cell--end]=\"isEndAligned(column)\"\n [style.width]=\"columnWidth(column)\"\n >\n <div\n class=\"mapa-data-table__cell-content\"\n [ngClass]=\"cellClasses(column, row)\"\n >\n @if (cellTemplate(column.key); as template) {\n <ng-container\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"{\n $implicit: row,\n row,\n column,\n }\"\n ></ng-container>\n } @else if (column.key === \"actions\") {\n <div class=\"mapa-data-table__actions\">\n @for (item of getActionItems(row); track item) {\n @if (route(item); as actionRoute) {\n <a\n class=\"mapa-data-table__action\"\n [class.mapa-data-table__action--disabled]=\"\n item.disabled\n \"\n [attr.aria-disabled]=\"\n item.disabled ? 'true' : null\n \"\n [attr.tabindex]=\"item.disabled ? -1 : null\"\n [title]=\"item.text\"\n [routerLink]=\"item.disabled ? null : actionRoute\"\n [queryParams]=\"queryParams(item)\"\n (click)=\"$event.stopPropagation()\"\n >\n @if (item.icon) {\n <mat-icon aria-hidden=\"true\">{{\n item.icon\n }}</mat-icon>\n }\n @if (item.image) {\n <img [src]=\"item.image\" alt=\"\" />\n }\n @if (item.svg) {\n <mapa-svg-icon [name]=\"svgName(item.svg)\" />\n }\n @if (item.showText) {\n <span>{{ item.text }}</span>\n } @else {\n <span class=\"mapa-data-table__sr-only\">{{\n item.text\n }}</span>\n }\n </a>\n } @else {\n <button\n type=\"button\"\n class=\"mapa-data-table__action\"\n [disabled]=\"item.disabled\"\n [title]=\"item.text\"\n (click)=\"emitAction(row, item, $event)\"\n >\n @if (item.icon) {\n <mat-icon aria-hidden=\"true\">{{\n item.icon\n }}</mat-icon>\n }\n @if (item.image) {\n <img [src]=\"item.image\" alt=\"\" />\n }\n @if (item.svg) {\n <mapa-svg-icon [name]=\"svgName(item.svg)\" />\n }\n @if (item.showText) {\n <span>{{ item.text }}</span>\n } @else {\n <span class=\"mapa-data-table__sr-only\">{{\n item.text\n }}</span>\n }\n </button>\n }\n }\n </div>\n } @else if (column.key === \"menu\") {\n @if (getMenuItems(row).length > 0) {\n <button\n type=\"button\"\n class=\"mapa-data-table__menu-trigger\"\n [matMenuTriggerFor]=\"rowMenu\"\n [attr.aria-label]=\"column.label\"\n (click)=\"$event.stopPropagation()\"\n >\n <mat-icon aria-hidden=\"true\">more_vert</mat-icon>\n </button>\n <mat-menu #rowMenu=\"matMenu\">\n @for (item of getMenuItems(row); track item) {\n @if (route(item); as menuRoute) {\n <a\n mat-menu-item\n [disabled]=\"item.disabled\"\n [routerLink]=\"item.disabled ? null : menuRoute\"\n [queryParams]=\"queryParams(item)\"\n (click)=\"$event.stopPropagation()\"\n >\n @if (item.icon) {\n <mat-icon aria-hidden=\"true\">{{\n item.icon\n }}</mat-icon>\n }\n @if (item.image) {\n <img [src]=\"item.image\" alt=\"\" />\n }\n <span>{{ item.text }}</span>\n </a>\n } @else {\n <button\n mat-menu-item\n [disabled]=\"item.disabled\"\n (click)=\"emitAction(row, item, $event)\"\n >\n @if (item.icon) {\n <mat-icon aria-hidden=\"true\">{{\n item.icon\n }}</mat-icon>\n }\n @if (item.image) {\n <img [src]=\"item.image\" alt=\"\" />\n }\n <span>{{ item.text }}</span>\n </button>\n }\n }\n </mat-menu>\n }\n } @else if (dateFormat(column); as format) {\n @if (dateValue(row, column); as value) {\n {{ value | date: format }}\n } @else {\n {{ column.fallback ?? \"-\" }}\n }\n } @else if (column.status) {\n <span\n class=\"mapa-data-table__status\"\n [class.mapa-data-table__status--round]=\"\n column.status.style === 'round'\n \"\n [style.background-color]=\"statusBackground(column, row)\"\n [style.color]=\"statusTextColor(column, row)\"\n [innerHTML]=\"statusLabel(column, row) | safeHtml\"\n ></span>\n } @else {\n <span\n [innerHTML]=\"cellValue(row, column) | safeHtml\"\n ></span>\n }\n </div>\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n } @else if (isFinished) {\n <div class=\"mapa-data-table__state\">\n <strong>{{ resolvedEmptyTitle }}</strong>\n @if (resolvedEmptySubtitle) {\n <span>{{ resolvedEmptySubtitle }}</span>\n }\n </div>\n }\n </div>\n\n @if (shouldShowPaginator) {\n <mat-paginator\n class=\"mapa-data-table__paginator\"\n appBubblePagination\n [appCustomLength]=\"totalCount\"\n [bubblePageIndex]=\"zeroBasedPageIndex\"\n [pageIndex]=\"zeroBasedPageIndex\"\n [showFirstButton]=\"paginatorShowFirstButton\"\n [showLastButton]=\"paginatorShowLastButton\"\n [renderButtonsNumber]=\"paginatorRenderButtonsNumber\"\n [hideDefaultArrows]=\"paginatorHideDefaultArrows\"\n [bubblePageSize]=\"pageSize\"\n [length]=\"totalCount\"\n [pageSize]=\"pageSize\"\n [pageSizeOptions]=\"pageSizeOptions\"\n (page)=\"handlePage($event)\"\n />\n }\n</section>\n", styles: [":host{display:block}.mapa-data-table{color:var(--mapa-color-text, #1a1a1a);font-family:var(--mapa-font-body, Asap, sans-serif)}.mapa-data-table__frame{background:var(--mapa-color-surface, #fff);border:1px solid var(--mapa-color-border, rgba(26, 26, 26, .12));border-radius:14px;overflow-x:auto}.mapa-data-table__table{border-collapse:collapse;width:100%}.mapa-data-table th,.mapa-data-table td{border-bottom:1px solid var(--mapa-color-border-soft, rgba(26, 26, 26, .08));box-sizing:border-box;font-family:inherit;font-size:13px;font-weight:400;padding:.875rem 1rem;text-align:left;vertical-align:middle}.mapa-data-table th{background:var(--mapa-color-surface-muted, #fafbfc);color:var(--mapa-color-text-subtle, #555);font-size:.75rem;font-weight:600;letter-spacing:.02em;text-transform:uppercase;white-space:nowrap}.mapa-data-table td{color:var(--mapa-color-text, #1a1a1a)}.mapa-data-table tbody tr:last-child td{border-bottom:0}.mapa-data-table tbody tr:hover,.mapa-data-table__row--selected{background:var(--mapa-color-primary-soft, #FFF8F4)}.mapa-data-table__row--interactive{cursor:pointer}.mapa-data-table__row--interactive:focus-visible{outline:2px solid var(--mapa-color-primary, #ff560b);outline-offset:-3px}.mapa-data-table__selection-cell{width:4.5rem}.mapa-data-table__cell--center{text-align:center}.mapa-data-table__cell--end{text-align:right}.mapa-data-table__cell-content{min-width:0}.mapa-data-table__cell--ellipsis{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mapa-data-table__cell--no-wrap{white-space:nowrap}.mapa-data-table__cell--wrap{white-space:pre-wrap}.mapa-data-table__sort{align-items:center;background:transparent;border:0;color:inherit;cursor:pointer;display:inline-flex;font:inherit;gap:.25rem;padding:0;text-transform:inherit}.mapa-data-table__sort:focus-visible,.mapa-data-table__state button:focus-visible,.mapa-data-table__action:focus-visible,.mapa-data-table__menu-trigger:focus-visible{outline:2px solid var(--mapa-color-primary-dark, #50575E);outline-offset:3px}.mapa-data-table__sort mat-icon{font-size:1rem;height:1rem;width:1rem}.mapa-data-table__actions{align-items:center;display:inline-flex;gap:.5rem}.mapa-data-table__action,.mapa-data-table__menu-trigger{align-items:center;background:transparent;border:0;border-radius:6px;color:var(--mapa-color-primary-dark, #50575E);cursor:pointer;display:inline-flex;font:inherit;gap:.375rem;justify-content:center;min-height:36px;min-width:36px;padding:.375rem;text-decoration:none}.mapa-data-table__action:hover,.mapa-data-table__menu-trigger:hover{background:var(--mapa-color-primary-soft, #FFF8F4)}.mapa-data-table__action:disabled,.mapa-data-table__action--disabled{cursor:not-allowed;opacity:.45}.mapa-data-table__action img,.mapa-data-table__menu-trigger img{height:1.25rem;width:1.25rem}.mapa-data-table__status{border-radius:4px;display:inline-flex;padding:.25rem .5rem;white-space:nowrap}.mapa-data-table__status--round{border-radius:999px}.mapa-data-table__state{align-items:center;color:var(--mapa-color-text-subtle, #555);display:flex;flex-direction:column;gap:.625rem;justify-content:center;min-height:150px;padding:1.5rem;text-align:center}.mapa-data-table__state strong{color:var(--mapa-color-text, #1a1a1a)}.mapa-data-table__state button{background:var(--mapa-color-surface-warm, #fffaf6);border:1px solid var(--mapa-color-border, rgba(26, 26, 26, .12));border-radius:10px;color:var(--mapa-color-text, #1a1a1a);cursor:pointer;font:inherit;min-height:40px;padding:.5rem .875rem}.mapa-data-table__skeleton{animation:mapa-data-table-shimmer 1.2s linear infinite;background:linear-gradient(90deg,#f0f2f4 25%,#e6e9ec,#f0f2f4 75%);background-size:200% 100%;border-radius:8px;display:block;height:1rem;max-width:14rem}.mapa-data-table__skeleton--checkbox{border-radius:3px;height:1.125rem;width:1.125rem}.mapa-data-table__sr-only{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}:host ::ng-deep .mapa-data-table__paginator{background:transparent;color:var(--mapa-color-text-subtle, #555);font-family:var(--mapa-font-body, Asap, sans-serif)}:host ::ng-deep .mapa-data-table__paginator .mat-mdc-paginator-container{justify-content:space-between;min-height:72px}:host ::ng-deep .mapa-data-table__paginator .mat-mdc-paginator-page-size{margin-right:min(10vw,8rem)}:host ::ng-deep .mapa-data-table__paginator .custom-paginator-container,:host ::ng-deep .mapa-data-table__paginator .g-bubble-container{align-items:center;display:flex;justify-content:flex-end}:host ::ng-deep .mapa-data-table__paginator .g-bubble-container{gap:.5rem}:host ::ng-deep .mapa-data-table__paginator .g-bubble{align-items:center;background:transparent;border:0;border-radius:4px;color:var(--mapa-color-text-subtle, #555);cursor:pointer;display:flex;font:inherit;justify-content:center;min-height:24px;min-width:24px;padding:1px 6px}:host ::ng-deep .mapa-data-table__paginator .g-bubble:hover{background:var(--mapa-color-border-soft, rgba(26, 26, 26, .08))}:host ::ng-deep .mapa-data-table__paginator .g-bubble:focus-visible{outline:2px solid var(--mapa-color-primary, #ff560b);outline-offset:2px}:host ::ng-deep .mapa-data-table__paginator .g-bubble__active{background:var(--mapa-color-primary-dark, #cf482b);color:var(--mapa-color-surface, #fff)}:host ::ng-deep .mapa-data-table__paginator .custom-paginator-counter{color:var(--mapa-color-text-subtle, #555);margin:0 .25rem 0 .625rem;white-space:nowrap}@media(max-width:760px){.mapa-data-table__frame{border:0;overflow:visible}.mapa-data-table thead{display:none}.mapa-data-table tbody{display:grid;gap:.75rem}.mapa-data-table tr{border:1px solid var(--mapa-color-border, rgba(26, 26, 26, .12));border-radius:12px;display:grid;grid-template-columns:minmax(0,1fr);padding:.75rem}.mapa-data-table--selectable tr{grid-template-columns:auto minmax(0,1fr)}.mapa-data-table td{border:0;grid-column:1;padding:.375rem .5rem;text-align:left;width:auto}.mapa-data-table--selectable td:not(.mapa-data-table__selection-cell){grid-column:2}.mapa-data-table td:not(.mapa-data-table__selection-cell):before{color:var(--mapa-color-text-subtle, #555);content:attr(data-label);display:block;font-size:.6875rem;font-weight:600;text-transform:uppercase}.mapa-data-table__selection-cell{grid-column:1;grid-row:1/span 20;width:auto}:host ::ng-deep .mapa-data-table__paginator .mat-mdc-paginator-container,:host ::ng-deep .mapa-data-table__paginator .mat-mdc-paginator-range-actions{justify-content:center}:host ::ng-deep .mapa-data-table__paginator .mat-mdc-paginator-container{gap:.75rem;padding:.75rem 0}:host ::ng-deep .mapa-data-table__paginator .mat-mdc-paginator-page-size{margin-right:0}:host ::ng-deep .mapa-data-table__paginator .mat-mdc-paginator-range-label{padding:.5rem 0;text-align:center;width:100%}}@media(prefers-reduced-motion:reduce){.mapa-data-table__skeleton{animation:none}}@keyframes mapa-data-table-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}\n"], dependencies: [{ kind: "directive", type: BubblePaginationDirective, selector: "[appBubblePagination], [appStylePaginatorMv]", inputs: ["showFirstButton", "showLastButton", "renderButtonsNumber", "appCustomLength", "hideDefaultArrows", "bubblePageIndex", "bubblePageSize"], outputs: ["pageIndexChangeEmitter"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i2$3.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i3$4.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i3$4.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i3$4.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i1$1.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "component", type: MapaSvgIconComponent, selector: "mapa-svg-icon", inputs: ["name", "color"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "pipe", type: DatePipe, name: "date" }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
8002
|
+
], queries: [{ propertyName: "projectedCells", predicate: MapaTableCellDirective, isSignal: true }], ngImport: i0, template: "<section\n class=\"mapa-data-table\"\n [class.mapa-data-table--selectable]=\"isSelectable\"\n>\n <div class=\"mapa-data-table__frame\">\n @if (isLoading) {\n <table class=\"mapa-data-table__table\" aria-hidden=\"true\">\n <thead>\n <tr>\n @if (isSelectable) {\n <th class=\"mapa-data-table__selection-cell\"></th>\n }\n @for (column of columns; track column.key) {\n <th [style.width]=\"skeletonColumnWidth(column)\">\n {{ column.label }}\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of skeletonRows; track row) {\n <tr>\n @if (isSelectable) {\n <td class=\"mapa-data-table__selection-cell\">\n <span\n class=\"mapa-data-table__skeleton mapa-data-table__skeleton--checkbox\"\n ></span>\n </td>\n }\n @for (column of columns; track column.key) {\n <td [style.width]=\"skeletonColumnWidth(column)\">\n <span class=\"mapa-data-table__skeleton\"></span>\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n <span class=\"mapa-data-table__sr-only\" role=\"status\">\n {{ texts.table.loading }}\n </span>\n } @else if (error) {\n <div class=\"mapa-data-table__state\" role=\"alert\">\n <strong>{{ resolvedErrorTitle }}</strong>\n @if (resolvedErrorSubtitle) {\n <span>{{ resolvedErrorSubtitle }}</span>\n }\n @if (retry.observed) {\n <button type=\"button\" (click)=\"retry.emit()\">\n {{ resolvedRetryLabel }}\n </button>\n }\n </div>\n } @else if (visibleData.length > 0) {\n <table class=\"mapa-data-table__table\">\n @if (caption) {\n <caption class=\"mapa-data-table__sr-only\">\n {{\n caption\n }}\n </caption>\n }\n <thead>\n <tr>\n @if (isSelectable) {\n <th class=\"mapa-data-table__selection-cell\">\n @if (showSelectAll) {\n <mat-checkbox\n color=\"primary\"\n [checked]=\"allVisibleSelected()\"\n [indeterminate]=\"someVisibleSelected()\"\n [aria-label]=\"texts.table.selectAllVisible\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"toggleVisibleRows($event.checked)\"\n />\n } @else {\n <span class=\"mapa-data-table__sr-only\">\n {{ texts.table.selectionColumn }}\n </span>\n }\n </th>\n }\n @for (column of columns; track column.key) {\n <th\n [class.mapa-data-table__cell--center]=\"isCenterAligned(column)\"\n [class.mapa-data-table__cell--end]=\"isEndAligned(column)\"\n [class.mapa-data-table__header--sortable]=\"isSortable(column)\"\n [class.mapa-data-table__header--sorted]=\"isSorted(column)\"\n [style.width]=\"columnWidth(column)\"\n [attr.aria-sort]=\"ariaSort(column)\"\n >\n @if (isSortable(column)) {\n <button\n type=\"button\"\n class=\"mapa-data-table__sort\"\n (click)=\"changeSort(column)\"\n >\n <span [innerHTML]=\"column.label | safeHtml\"></span>\n <mat-icon aria-hidden=\"true\">{{\n sortIcon(column)\n }}</mat-icon>\n </button>\n } @else {\n <span [innerHTML]=\"column.label | safeHtml\"></span>\n }\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of visibleData; track rowIdentity(row, $index)) {\n <tr\n [class.mapa-data-table__row--selected]=\"isSelected(row)\"\n [class.mapa-data-table__row--interactive]=\"rowClick.observed\"\n [attr.tabindex]=\"rowClick.observed ? 0 : null\"\n (click)=\"emitRowInteraction($event, row)\"\n (keydown)=\"emitRowKeyboard($event, row)\"\n >\n @if (isSelectable) {\n <td class=\"mapa-data-table__selection-cell\">\n <mat-checkbox\n color=\"primary\"\n [checked]=\"isSelected(row)\"\n [aria-label]=\"selectionLabel(row)\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"toggleRow(row, $event.checked)\"\n />\n </td>\n }\n @for (column of columns; track column.key) {\n <td\n [attr.data-label]=\"column.label\"\n [class.mapa-data-table__cell--center]=\"\n isCenterAligned(column)\n \"\n [class.mapa-data-table__cell--end]=\"isEndAligned(column)\"\n [style.width]=\"columnWidth(column)\"\n >\n <div\n class=\"mapa-data-table__cell-content\"\n [ngClass]=\"cellClasses(column, row)\"\n >\n @if (cellTemplate(column.key); as template) {\n <ng-container\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"{\n $implicit: row,\n row,\n column,\n }\"\n ></ng-container>\n } @else if (column.key === \"actions\") {\n <div class=\"mapa-data-table__actions\">\n @for (item of getActionItems(row); track item) {\n @if (route(item); as actionRoute) {\n <a\n class=\"mapa-data-table__action\"\n [class.mapa-data-table__action--disabled]=\"\n item.disabled\n \"\n [attr.aria-disabled]=\"\n item.disabled ? 'true' : null\n \"\n [attr.tabindex]=\"item.disabled ? -1 : null\"\n [title]=\"item.text\"\n [routerLink]=\"item.disabled ? null : actionRoute\"\n [queryParams]=\"queryParams(item)\"\n (click)=\"$event.stopPropagation()\"\n >\n @if (item.icon) {\n <mat-icon aria-hidden=\"true\">{{\n item.icon\n }}</mat-icon>\n }\n @if (item.image) {\n <img [src]=\"item.image\" alt=\"\" />\n }\n @if (item.svg) {\n <mapa-svg-icon [name]=\"svgName(item.svg)\" />\n }\n @if (item.showText) {\n <span>{{ item.text }}</span>\n } @else {\n <span class=\"mapa-data-table__sr-only\">{{\n item.text\n }}</span>\n }\n </a>\n } @else {\n <button\n type=\"button\"\n class=\"mapa-data-table__action\"\n [disabled]=\"item.disabled\"\n [title]=\"item.text\"\n (click)=\"emitAction(row, item, $event)\"\n >\n @if (item.icon) {\n <mat-icon aria-hidden=\"true\">{{\n item.icon\n }}</mat-icon>\n }\n @if (item.image) {\n <img [src]=\"item.image\" alt=\"\" />\n }\n @if (item.svg) {\n <mapa-svg-icon [name]=\"svgName(item.svg)\" />\n }\n @if (item.showText) {\n <span>{{ item.text }}</span>\n } @else {\n <span class=\"mapa-data-table__sr-only\">{{\n item.text\n }}</span>\n }\n </button>\n }\n }\n </div>\n } @else if (column.key === \"menu\") {\n @if (getMenuItems(row).length > 0) {\n <button\n type=\"button\"\n class=\"mapa-data-table__menu-trigger\"\n [matMenuTriggerFor]=\"rowMenu\"\n [attr.aria-label]=\"column.label\"\n (click)=\"$event.stopPropagation()\"\n >\n <mat-icon aria-hidden=\"true\">more_vert</mat-icon>\n </button>\n <mat-menu #rowMenu=\"matMenu\">\n @for (item of getMenuItems(row); track item) {\n @if (route(item); as menuRoute) {\n <a\n mat-menu-item\n [disabled]=\"item.disabled\"\n [routerLink]=\"item.disabled ? null : menuRoute\"\n [queryParams]=\"queryParams(item)\"\n (click)=\"$event.stopPropagation()\"\n >\n @if (item.icon) {\n <mat-icon aria-hidden=\"true\">{{\n item.icon\n }}</mat-icon>\n }\n @if (item.image) {\n <img [src]=\"item.image\" alt=\"\" />\n }\n <span>{{ item.text }}</span>\n </a>\n } @else {\n <button\n mat-menu-item\n [disabled]=\"item.disabled\"\n (click)=\"emitAction(row, item, $event)\"\n >\n @if (item.icon) {\n <mat-icon aria-hidden=\"true\">{{\n item.icon\n }}</mat-icon>\n }\n @if (item.image) {\n <img [src]=\"item.image\" alt=\"\" />\n }\n <span>{{ item.text }}</span>\n </button>\n }\n }\n </mat-menu>\n }\n } @else if (dateFormat(column); as format) {\n @if (dateValue(row, column); as value) {\n {{ value | date: format }}\n } @else {\n {{ column.fallback ?? \"-\" }}\n }\n } @else if (column.status) {\n <span\n class=\"mapa-data-table__status\"\n [class.mapa-data-table__status--round]=\"\n column.status.style === 'round'\n \"\n [style.background-color]=\"statusBackground(column, row)\"\n [style.color]=\"statusTextColor(column, row)\"\n [innerHTML]=\"statusLabel(column, row) | safeHtml\"\n ></span>\n } @else {\n <span\n [innerHTML]=\"cellValue(row, column) | safeHtml\"\n ></span>\n }\n </div>\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n } @else if (isFinished) {\n <div class=\"mapa-data-table__state\">\n <strong>{{ resolvedEmptyTitle }}</strong>\n @if (resolvedEmptySubtitle) {\n <span>{{ resolvedEmptySubtitle }}</span>\n }\n </div>\n }\n </div>\n\n @if (shouldShowPaginator) {\n <mat-paginator\n class=\"mapa-data-table__paginator\"\n appBubblePagination\n [appCustomLength]=\"totalCount\"\n [bubblePageIndex]=\"zeroBasedPageIndex\"\n [pageIndex]=\"zeroBasedPageIndex\"\n [showFirstButton]=\"paginatorShowFirstButton\"\n [showLastButton]=\"paginatorShowLastButton\"\n [renderButtonsNumber]=\"paginatorRenderButtonsNumber\"\n [hideDefaultArrows]=\"paginatorHideDefaultArrows\"\n [bubblePageSize]=\"pageSize\"\n [length]=\"totalCount\"\n [pageSize]=\"pageSize\"\n [pageSizeOptions]=\"pageSizeOptions\"\n (page)=\"handlePage($event)\"\n />\n }\n</section>\n", styles: [":host{display:block}.mapa-data-table{color:var(--mapa-color-text, #1a1a1a);font-family:var(--mapa-font-body, Asap, sans-serif)}.mapa-data-table__frame{background:var(--mapa-color-surface, #fff);border:1px solid var(--mapa-color-border, rgba(26, 26, 26, .12));border-radius:14px;overflow-x:auto;scrollbar-color:var(--mapa-color-scrollbar, #dbe0e4) transparent;scrollbar-width:thin}.mapa-data-table__frame::-webkit-scrollbar{height:8px;width:8px}.mapa-data-table__frame::-webkit-scrollbar-track,.mapa-data-table__frame::-webkit-scrollbar-corner{background:transparent}.mapa-data-table__frame::-webkit-scrollbar-thumb{background:var(--mapa-color-scrollbar, #dbe0e4);border-radius:999px}.mapa-data-table__frame::-webkit-scrollbar-thumb:hover{background:var(--mapa-color-scrollbar-hover, #c6ced4)}.mapa-data-table__frame::-webkit-scrollbar-button{display:none;height:0;width:0}.mapa-data-table__table{border-collapse:collapse;width:100%}.mapa-data-table th,.mapa-data-table td{border-bottom:1px solid var(--mapa-color-border-soft, rgba(26, 26, 26, .08));box-sizing:border-box;font-family:inherit;font-size:13px;font-weight:400;padding:.875rem 1rem;text-align:left;vertical-align:middle}.mapa-data-table th{background:var(--mapa-color-surface-muted, #fafbfc);color:var(--mapa-color-text-subtle, #555);font-size:.75rem;font-weight:600;letter-spacing:.02em;text-transform:uppercase;white-space:nowrap}.mapa-data-table td{color:var(--mapa-color-text, #1a1a1a)}.mapa-data-table tbody tr:last-child td{border-bottom:0}.mapa-data-table tbody tr:hover,.mapa-data-table__row--selected{background:var(--mapa-color-primary-soft, #FFF8F4)}.mapa-data-table__row--interactive{cursor:pointer}.mapa-data-table__row--interactive:focus-visible{outline:2px solid var(--mapa-color-primary, #ff560b);outline-offset:-3px}.mapa-data-table__selection-cell{width:4.5rem}.mapa-data-table__cell--center{text-align:center}.mapa-data-table__cell--end{text-align:right}.mapa-data-table__cell-content{min-width:0}.mapa-data-table__cell--ellipsis{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mapa-data-table__cell--no-wrap{white-space:nowrap}.mapa-data-table__cell--wrap{white-space:pre-wrap}.mapa-data-table th.mapa-data-table__header--sortable{transition:background-color .15s ease}.mapa-data-table th.mapa-data-table__header--sortable:hover{background:var(--mapa-color-primary-soft, #fff8f4);color:var(--mapa-color-primary-dark, #d94021)}.mapa-data-table__header--sorted .mapa-data-table__sort{color:var(--mapa-color-text, #1a1a1a)}.mapa-data-table__sort{align-items:center;background:transparent;border:0;border-radius:4px;color:inherit;cursor:pointer;display:inline-flex;font:inherit;gap:.25rem;letter-spacing:inherit;padding:0;text-transform:inherit;transition:color .15s ease}.mapa-data-table__state button:focus-visible,.mapa-data-table__action:focus-visible,.mapa-data-table__menu-trigger:focus-visible{outline:2px solid var(--mapa-color-primary-dark, #50575E);outline-offset:3px}.mapa-data-table__sort:focus-visible{outline:2px solid var(--mapa-color-primary-dark, #50575e);outline-offset:-2px}.mapa-data-table__sort mat-icon{color:var(--mapa-color-icon-subtle, #9da5aa);font-size:.875rem;height:.875rem;transition:color .15s ease;width:.875rem}.mapa-data-table__header--sortable:hover .mapa-data-table__sort mat-icon,.mapa-data-table__header--sorted .mapa-data-table__sort mat-icon{color:currentcolor}.mapa-data-table__actions{align-items:center;display:inline-flex;gap:.5rem}.mapa-data-table__action,.mapa-data-table__menu-trigger{align-items:center;background:transparent;border:0;border-radius:6px;color:var(--mapa-color-primary-dark, #50575E);cursor:pointer;display:inline-flex;font:inherit;gap:.375rem;justify-content:center;min-height:36px;min-width:36px;padding:.375rem;text-decoration:none}.mapa-data-table__action mat-icon,.mapa-data-table__menu-trigger mat-icon{color:#50575e}.mapa-data-table__action:hover,.mapa-data-table__menu-trigger:hover{background:var(--mapa-color-primary-soft, #FFF8F4)}.mapa-data-table__action:disabled,.mapa-data-table__action--disabled{cursor:not-allowed;opacity:.45}.mapa-data-table__action img,.mapa-data-table__menu-trigger img{height:1.25rem;width:1.25rem}.mapa-data-table__status{border-radius:4px;display:inline-flex;padding:.25rem .5rem;white-space:nowrap}.mapa-data-table__status--round{border-radius:999px}.mapa-data-table__state{align-items:center;color:var(--mapa-color-text-subtle, #555);display:flex;flex-direction:column;gap:.625rem;justify-content:center;min-height:150px;padding:1.5rem;text-align:center}.mapa-data-table__state strong{color:var(--mapa-color-text, #1a1a1a)}.mapa-data-table__state button{background:var(--mapa-color-surface-warm, #fffaf6);border:1px solid var(--mapa-color-border, rgba(26, 26, 26, .12));border-radius:10px;color:var(--mapa-color-text, #1a1a1a);cursor:pointer;font:inherit;min-height:40px;padding:.5rem .875rem}.mapa-data-table__skeleton{animation:mapa-data-table-shimmer 1.2s linear infinite;background:linear-gradient(90deg,#f0f2f4 25%,#e6e9ec,#f0f2f4 75%);background-size:200% 100%;border-radius:8px;display:block;height:1rem;max-width:14rem}.mapa-data-table__skeleton--checkbox{border-radius:3px;height:1.125rem;width:1.125rem}.mapa-data-table__sr-only{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}:host ::ng-deep .mapa-data-table__paginator{background:transparent;color:var(--mapa-color-text-subtle, #555);font-family:var(--mapa-font-body, Asap, sans-serif)}:host ::ng-deep .mapa-data-table__paginator .mat-mdc-paginator-container{justify-content:space-between;min-height:72px}:host ::ng-deep .mapa-data-table__paginator .mat-mdc-paginator-page-size{margin-right:min(10vw,8rem)}:host ::ng-deep .mapa-data-table__paginator .custom-paginator-container,:host ::ng-deep .mapa-data-table__paginator .g-bubble-container{align-items:center;display:flex;justify-content:flex-end}:host ::ng-deep .mapa-data-table__paginator .g-bubble-container{gap:.5rem}:host ::ng-deep .mapa-data-table__paginator .g-bubble{align-items:center;background:transparent;border:0;border-radius:4px;color:var(--mapa-color-text-subtle, #555);cursor:pointer;display:flex;font:inherit;justify-content:center;min-height:24px;min-width:24px;padding:1px 6px}:host ::ng-deep .mapa-data-table__paginator .g-bubble:hover{background:var(--mapa-color-border-soft, rgba(26, 26, 26, .08))}:host ::ng-deep .mapa-data-table__paginator .g-bubble:focus-visible{outline:2px solid var(--mapa-color-primary, #ff560b);outline-offset:2px}:host ::ng-deep .mapa-data-table__paginator .g-bubble__active{background:var(--mapa-color-primary-dark, #cf482b);color:var(--mapa-color-surface, #fff)}:host ::ng-deep .mapa-data-table__paginator .custom-paginator-counter{color:var(--mapa-color-text-subtle, #555);margin:0 .25rem 0 .625rem;white-space:nowrap}@media(max-width:760px){.mapa-data-table__frame{border:0;overflow:visible}.mapa-data-table thead{display:none}.mapa-data-table tbody{display:grid;gap:.75rem}.mapa-data-table tr{border:1px solid var(--mapa-color-border, rgba(26, 26, 26, .12));border-radius:12px;display:grid;grid-template-columns:minmax(0,1fr);padding:.75rem}.mapa-data-table--selectable tr{grid-template-columns:auto minmax(0,1fr)}.mapa-data-table td{border:0;grid-column:1;padding:.375rem .5rem;text-align:left;width:auto}.mapa-data-table--selectable td:not(.mapa-data-table__selection-cell){grid-column:2}.mapa-data-table td:not(.mapa-data-table__selection-cell):before{color:var(--mapa-color-text-subtle, #555);content:attr(data-label);display:block;font-size:.6875rem;font-weight:600;text-transform:uppercase}.mapa-data-table__selection-cell{grid-column:1;grid-row:1/span 20;width:auto}:host ::ng-deep .mapa-data-table__paginator .mat-mdc-paginator-container,:host ::ng-deep .mapa-data-table__paginator .mat-mdc-paginator-range-actions{justify-content:center}:host ::ng-deep .mapa-data-table__paginator .mat-mdc-paginator-container{gap:.75rem;padding:.75rem 0}:host ::ng-deep .mapa-data-table__paginator .mat-mdc-paginator-page-size{margin-right:0}:host ::ng-deep .mapa-data-table__paginator .mat-mdc-paginator-range-label{padding:.5rem 0;text-align:center;width:100%}}@media(prefers-reduced-motion:reduce){.mapa-data-table__skeleton{animation:none}}@keyframes mapa-data-table-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}\n"], dependencies: [{ kind: "directive", type: BubblePaginationDirective, selector: "[appBubblePagination], [appStylePaginatorMv]", inputs: ["showFirstButton", "showLastButton", "renderButtonsNumber", "appCustomLength", "hideDefaultArrows", "bubblePageIndex", "bubblePageSize"], outputs: ["pageIndexChangeEmitter"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i2$3.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i3$4.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i3$4.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i3$4.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i1$1.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "component", type: MapaSvgIconComponent, selector: "mapa-svg-icon", inputs: ["name", "color"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "pipe", type: DatePipe, name: "date" }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
7816
8003
|
}
|
|
7817
8004
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaTableComponent, decorators: [{
|
|
7818
8005
|
type: Component,
|
|
@@ -7834,7 +8021,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
7834
8021
|
useFactory: customPaginatorFactory,
|
|
7835
8022
|
deps: [MapaI18nService, Injector],
|
|
7836
8023
|
},
|
|
7837
|
-
], standalone: true, template: "<section\n class=\"mapa-data-table\"\n [class.mapa-data-table--selectable]=\"isSelectable\"\n>\n <div class=\"mapa-data-table__frame\">\n @if (isLoading) {\n <table class=\"mapa-data-table__table\" aria-hidden=\"true\">\n <thead>\n <tr>\n @if (isSelectable) {\n <th class=\"mapa-data-table__selection-cell\"></th>\n }\n @for (column of columns; track column.key) {\n <th [style.width]=\"skeletonColumnWidth(column)\">\n {{ column.label }}\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of skeletonRows; track row) {\n <tr>\n @if (isSelectable) {\n <td class=\"mapa-data-table__selection-cell\">\n <span\n class=\"mapa-data-table__skeleton mapa-data-table__skeleton--checkbox\"\n ></span>\n </td>\n }\n @for (column of columns; track column.key) {\n <td [style.width]=\"skeletonColumnWidth(column)\">\n <span class=\"mapa-data-table__skeleton\"></span>\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n <span class=\"mapa-data-table__sr-only\" role=\"status\">\n {{ texts.table.loading }}\n </span>\n } @else if (error) {\n <div class=\"mapa-data-table__state\" role=\"alert\">\n <strong>{{ resolvedErrorTitle }}</strong>\n @if (resolvedErrorSubtitle) {\n <span>{{ resolvedErrorSubtitle }}</span>\n }\n @if (retry.observed) {\n <button type=\"button\" (click)=\"retry.emit()\">\n {{ resolvedRetryLabel }}\n </button>\n }\n </div>\n } @else if (visibleData.length > 0) {\n <table class=\"mapa-data-table__table\">\n @if (caption) {\n <caption class=\"mapa-data-table__sr-only\">\n {{\n caption\n }}\n </caption>\n }\n <thead>\n <tr>\n @if (isSelectable) {\n <th class=\"mapa-data-table__selection-cell\">\n @if (showSelectAll) {\n <mat-checkbox\n color=\"primary\"\n [checked]=\"allVisibleSelected()\"\n [indeterminate]=\"someVisibleSelected()\"\n [aria-label]=\"texts.table.selectAllVisible\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"toggleVisibleRows($event.checked)\"\n />\n } @else {\n <span class=\"mapa-data-table__sr-only\">\n {{ texts.table.selectionColumn }}\n </span>\n }\n </th>\n }\n @for (column of columns; track column.key) {\n <th\n [class.mapa-data-table__cell--center]=\"isCenterAligned(column)\"\n [class.mapa-data-table__cell--end]=\"isEndAligned(column)\"\n [style.width]=\"columnWidth(column)\"\n [attr.aria-sort]=\"ariaSort(column)\"\n >\n @if (isSortable(column)) {\n <button\n type=\"button\"\n class=\"mapa-data-table__sort\"\n (click)=\"changeSort(column)\"\n >\n <span [innerHTML]=\"column.label | safeHtml\"></span>\n <mat-icon aria-hidden=\"true\">{{\n sortIcon(column)\n }}</mat-icon>\n </button>\n } @else {\n <span [innerHTML]=\"column.label | safeHtml\"></span>\n }\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of visibleData; track rowIdentity(row, $index)) {\n <tr\n [class.mapa-data-table__row--selected]=\"isSelected(row)\"\n [class.mapa-data-table__row--interactive]=\"rowClick.observed\"\n [attr.tabindex]=\"rowClick.observed ? 0 : null\"\n (click)=\"emitRowInteraction($event, row)\"\n (keydown)=\"emitRowKeyboard($event, row)\"\n >\n @if (isSelectable) {\n <td class=\"mapa-data-table__selection-cell\">\n <mat-checkbox\n color=\"primary\"\n [checked]=\"isSelected(row)\"\n [aria-label]=\"selectionLabel(row)\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"toggleRow(row, $event.checked)\"\n />\n </td>\n }\n @for (column of columns; track column.key) {\n <td\n [attr.data-label]=\"column.label\"\n [class.mapa-data-table__cell--center]=\"\n isCenterAligned(column)\n \"\n [class.mapa-data-table__cell--end]=\"isEndAligned(column)\"\n [style.width]=\"columnWidth(column)\"\n >\n <div\n class=\"mapa-data-table__cell-content\"\n [ngClass]=\"cellClasses(column, row)\"\n >\n @if (cellTemplate(column.key); as template) {\n <ng-container\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"{\n $implicit: row,\n row,\n column,\n }\"\n ></ng-container>\n } @else if (column.key === \"actions\") {\n <div class=\"mapa-data-table__actions\">\n @for (item of getActionItems(row); track item) {\n @if (route(item); as actionRoute) {\n <a\n class=\"mapa-data-table__action\"\n [class.mapa-data-table__action--disabled]=\"\n item.disabled\n \"\n [attr.aria-disabled]=\"\n item.disabled ? 'true' : null\n \"\n [attr.tabindex]=\"item.disabled ? -1 : null\"\n [title]=\"item.text\"\n [routerLink]=\"item.disabled ? null : actionRoute\"\n [queryParams]=\"queryParams(item)\"\n (click)=\"$event.stopPropagation()\"\n >\n @if (item.icon) {\n <mat-icon aria-hidden=\"true\">{{\n item.icon\n }}</mat-icon>\n }\n @if (item.image) {\n <img [src]=\"item.image\" alt=\"\" />\n }\n @if (item.svg) {\n <mapa-svg-icon [name]=\"svgName(item.svg)\" />\n }\n @if (item.showText) {\n <span>{{ item.text }}</span>\n } @else {\n <span class=\"mapa-data-table__sr-only\">{{\n item.text\n }}</span>\n }\n </a>\n } @else {\n <button\n type=\"button\"\n class=\"mapa-data-table__action\"\n [disabled]=\"item.disabled\"\n [title]=\"item.text\"\n (click)=\"emitAction(row, item, $event)\"\n >\n @if (item.icon) {\n <mat-icon aria-hidden=\"true\">{{\n item.icon\n }}</mat-icon>\n }\n @if (item.image) {\n <img [src]=\"item.image\" alt=\"\" />\n }\n @if (item.svg) {\n <mapa-svg-icon [name]=\"svgName(item.svg)\" />\n }\n @if (item.showText) {\n <span>{{ item.text }}</span>\n } @else {\n <span class=\"mapa-data-table__sr-only\">{{\n item.text\n }}</span>\n }\n </button>\n }\n }\n </div>\n } @else if (column.key === \"menu\") {\n @if (getMenuItems(row).length > 0) {\n <button\n type=\"button\"\n class=\"mapa-data-table__menu-trigger\"\n [matMenuTriggerFor]=\"rowMenu\"\n [attr.aria-label]=\"column.label\"\n (click)=\"$event.stopPropagation()\"\n >\n <mat-icon aria-hidden=\"true\">more_vert</mat-icon>\n </button>\n <mat-menu #rowMenu=\"matMenu\">\n @for (item of getMenuItems(row); track item) {\n @if (route(item); as menuRoute) {\n <a\n mat-menu-item\n [disabled]=\"item.disabled\"\n [routerLink]=\"item.disabled ? null : menuRoute\"\n [queryParams]=\"queryParams(item)\"\n (click)=\"$event.stopPropagation()\"\n >\n @if (item.icon) {\n <mat-icon aria-hidden=\"true\">{{\n item.icon\n }}</mat-icon>\n }\n @if (item.image) {\n <img [src]=\"item.image\" alt=\"\" />\n }\n <span>{{ item.text }}</span>\n </a>\n } @else {\n <button\n mat-menu-item\n [disabled]=\"item.disabled\"\n (click)=\"emitAction(row, item, $event)\"\n >\n @if (item.icon) {\n <mat-icon aria-hidden=\"true\">{{\n item.icon\n }}</mat-icon>\n }\n @if (item.image) {\n <img [src]=\"item.image\" alt=\"\" />\n }\n <span>{{ item.text }}</span>\n </button>\n }\n }\n </mat-menu>\n }\n } @else if (dateFormat(column); as format) {\n @if (dateValue(row, column); as value) {\n {{ value | date: format }}\n } @else {\n {{ column.fallback ?? \"-\" }}\n }\n } @else if (column.status) {\n <span\n class=\"mapa-data-table__status\"\n [class.mapa-data-table__status--round]=\"\n column.status.style === 'round'\n \"\n [style.background-color]=\"statusBackground(column, row)\"\n [style.color]=\"statusTextColor(column, row)\"\n [innerHTML]=\"statusLabel(column, row) | safeHtml\"\n ></span>\n } @else {\n <span\n [innerHTML]=\"cellValue(row, column) | safeHtml\"\n ></span>\n }\n </div>\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n } @else if (isFinished) {\n <div class=\"mapa-data-table__state\">\n <strong>{{ resolvedEmptyTitle }}</strong>\n @if (resolvedEmptySubtitle) {\n <span>{{ resolvedEmptySubtitle }}</span>\n }\n </div>\n }\n </div>\n\n @if (shouldShowPaginator) {\n <mat-paginator\n class=\"mapa-data-table__paginator\"\n appBubblePagination\n [appCustomLength]=\"totalCount\"\n [bubblePageIndex]=\"zeroBasedPageIndex\"\n [pageIndex]=\"zeroBasedPageIndex\"\n [showFirstButton]=\"paginatorShowFirstButton\"\n [showLastButton]=\"paginatorShowLastButton\"\n [renderButtonsNumber]=\"paginatorRenderButtonsNumber\"\n [hideDefaultArrows]=\"paginatorHideDefaultArrows\"\n [bubblePageSize]=\"pageSize\"\n [length]=\"totalCount\"\n [pageSize]=\"pageSize\"\n [pageSizeOptions]=\"pageSizeOptions\"\n (page)=\"handlePage($event)\"\n />\n }\n</section>\n", styles: [":host{display:block}.mapa-data-table{color:var(--mapa-color-text, #1a1a1a);font-family:var(--mapa-font-body, Asap, sans-serif)}.mapa-data-table__frame{background:var(--mapa-color-surface, #fff);border:1px solid var(--mapa-color-border, rgba(26, 26, 26, .12));border-radius:14px;overflow-x:auto}.mapa-data-table__table{border-collapse:collapse;width:100%}.mapa-data-table th,.mapa-data-table td{border-bottom:1px solid var(--mapa-color-border-soft, rgba(26, 26, 26, .08));box-sizing:border-box;font-family:inherit;font-size:13px;font-weight:400;padding:.875rem 1rem;text-align:left;vertical-align:middle}.mapa-data-table th{background:var(--mapa-color-surface-muted, #fafbfc);color:var(--mapa-color-text-subtle, #555);font-size:.75rem;font-weight:600;letter-spacing:.02em;text-transform:uppercase;white-space:nowrap}.mapa-data-table td{color:var(--mapa-color-text, #1a1a1a)}.mapa-data-table tbody tr:last-child td{border-bottom:0}.mapa-data-table tbody tr:hover,.mapa-data-table__row--selected{background:var(--mapa-color-primary-soft, #FFF8F4)}.mapa-data-table__row--interactive{cursor:pointer}.mapa-data-table__row--interactive:focus-visible{outline:2px solid var(--mapa-color-primary, #ff560b);outline-offset:-3px}.mapa-data-table__selection-cell{width:4.5rem}.mapa-data-table__cell--center{text-align:center}.mapa-data-table__cell--end{text-align:right}.mapa-data-table__cell-content{min-width:0}.mapa-data-table__cell--ellipsis{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mapa-data-table__cell--no-wrap{white-space:nowrap}.mapa-data-table__cell--wrap{white-space:pre-wrap}.mapa-data-table__sort{align-items:center;background:transparent;border:0;color:inherit;cursor:pointer;display:inline-flex;font:inherit;gap:.25rem;padding:0;text-transform:inherit}.mapa-data-table__sort:focus-visible,.mapa-data-table__state button:focus-visible,.mapa-data-table__action:focus-visible,.mapa-data-table__menu-trigger:focus-visible{outline:2px solid var(--mapa-color-primary-dark, #50575E);outline-offset:3px}.mapa-data-table__sort mat-icon{font-size:1rem;height:1rem;width:1rem}.mapa-data-table__actions{align-items:center;display:inline-flex;gap:.5rem}.mapa-data-table__action,.mapa-data-table__menu-trigger{align-items:center;background:transparent;border:0;border-radius:6px;color:var(--mapa-color-primary-dark, #50575E);cursor:pointer;display:inline-flex;font:inherit;gap:.375rem;justify-content:center;min-height:36px;min-width:36px;padding:.375rem;text-decoration:none}.mapa-data-table__action:hover,.mapa-data-table__menu-trigger:hover{background:var(--mapa-color-primary-soft, #FFF8F4)}.mapa-data-table__action:disabled,.mapa-data-table__action--disabled{cursor:not-allowed;opacity:.45}.mapa-data-table__action img,.mapa-data-table__menu-trigger img{height:1.25rem;width:1.25rem}.mapa-data-table__status{border-radius:4px;display:inline-flex;padding:.25rem .5rem;white-space:nowrap}.mapa-data-table__status--round{border-radius:999px}.mapa-data-table__state{align-items:center;color:var(--mapa-color-text-subtle, #555);display:flex;flex-direction:column;gap:.625rem;justify-content:center;min-height:150px;padding:1.5rem;text-align:center}.mapa-data-table__state strong{color:var(--mapa-color-text, #1a1a1a)}.mapa-data-table__state button{background:var(--mapa-color-surface-warm, #fffaf6);border:1px solid var(--mapa-color-border, rgba(26, 26, 26, .12));border-radius:10px;color:var(--mapa-color-text, #1a1a1a);cursor:pointer;font:inherit;min-height:40px;padding:.5rem .875rem}.mapa-data-table__skeleton{animation:mapa-data-table-shimmer 1.2s linear infinite;background:linear-gradient(90deg,#f0f2f4 25%,#e6e9ec,#f0f2f4 75%);background-size:200% 100%;border-radius:8px;display:block;height:1rem;max-width:14rem}.mapa-data-table__skeleton--checkbox{border-radius:3px;height:1.125rem;width:1.125rem}.mapa-data-table__sr-only{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}:host ::ng-deep .mapa-data-table__paginator{background:transparent;color:var(--mapa-color-text-subtle, #555);font-family:var(--mapa-font-body, Asap, sans-serif)}:host ::ng-deep .mapa-data-table__paginator .mat-mdc-paginator-container{justify-content:space-between;min-height:72px}:host ::ng-deep .mapa-data-table__paginator .mat-mdc-paginator-page-size{margin-right:min(10vw,8rem)}:host ::ng-deep .mapa-data-table__paginator .custom-paginator-container,:host ::ng-deep .mapa-data-table__paginator .g-bubble-container{align-items:center;display:flex;justify-content:flex-end}:host ::ng-deep .mapa-data-table__paginator .g-bubble-container{gap:.5rem}:host ::ng-deep .mapa-data-table__paginator .g-bubble{align-items:center;background:transparent;border:0;border-radius:4px;color:var(--mapa-color-text-subtle, #555);cursor:pointer;display:flex;font:inherit;justify-content:center;min-height:24px;min-width:24px;padding:1px 6px}:host ::ng-deep .mapa-data-table__paginator .g-bubble:hover{background:var(--mapa-color-border-soft, rgba(26, 26, 26, .08))}:host ::ng-deep .mapa-data-table__paginator .g-bubble:focus-visible{outline:2px solid var(--mapa-color-primary, #ff560b);outline-offset:2px}:host ::ng-deep .mapa-data-table__paginator .g-bubble__active{background:var(--mapa-color-primary-dark, #cf482b);color:var(--mapa-color-surface, #fff)}:host ::ng-deep .mapa-data-table__paginator .custom-paginator-counter{color:var(--mapa-color-text-subtle, #555);margin:0 .25rem 0 .625rem;white-space:nowrap}@media(max-width:760px){.mapa-data-table__frame{border:0;overflow:visible}.mapa-data-table thead{display:none}.mapa-data-table tbody{display:grid;gap:.75rem}.mapa-data-table tr{border:1px solid var(--mapa-color-border, rgba(26, 26, 26, .12));border-radius:12px;display:grid;grid-template-columns:minmax(0,1fr);padding:.75rem}.mapa-data-table--selectable tr{grid-template-columns:auto minmax(0,1fr)}.mapa-data-table td{border:0;grid-column:1;padding:.375rem .5rem;text-align:left;width:auto}.mapa-data-table--selectable td:not(.mapa-data-table__selection-cell){grid-column:2}.mapa-data-table td:not(.mapa-data-table__selection-cell):before{color:var(--mapa-color-text-subtle, #555);content:attr(data-label);display:block;font-size:.6875rem;font-weight:600;text-transform:uppercase}.mapa-data-table__selection-cell{grid-column:1;grid-row:1/span 20;width:auto}:host ::ng-deep .mapa-data-table__paginator .mat-mdc-paginator-container,:host ::ng-deep .mapa-data-table__paginator .mat-mdc-paginator-range-actions{justify-content:center}:host ::ng-deep .mapa-data-table__paginator .mat-mdc-paginator-container{gap:.75rem;padding:.75rem 0}:host ::ng-deep .mapa-data-table__paginator .mat-mdc-paginator-page-size{margin-right:0}:host ::ng-deep .mapa-data-table__paginator .mat-mdc-paginator-range-label{padding:.5rem 0;text-align:center;width:100%}}@media(prefers-reduced-motion:reduce){.mapa-data-table__skeleton{animation:none}}@keyframes mapa-data-table-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}\n"] }]
|
|
8024
|
+
], standalone: true, template: "<section\n class=\"mapa-data-table\"\n [class.mapa-data-table--selectable]=\"isSelectable\"\n>\n <div class=\"mapa-data-table__frame\">\n @if (isLoading) {\n <table class=\"mapa-data-table__table\" aria-hidden=\"true\">\n <thead>\n <tr>\n @if (isSelectable) {\n <th class=\"mapa-data-table__selection-cell\"></th>\n }\n @for (column of columns; track column.key) {\n <th [style.width]=\"skeletonColumnWidth(column)\">\n {{ column.label }}\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of skeletonRows; track row) {\n <tr>\n @if (isSelectable) {\n <td class=\"mapa-data-table__selection-cell\">\n <span\n class=\"mapa-data-table__skeleton mapa-data-table__skeleton--checkbox\"\n ></span>\n </td>\n }\n @for (column of columns; track column.key) {\n <td [style.width]=\"skeletonColumnWidth(column)\">\n <span class=\"mapa-data-table__skeleton\"></span>\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n <span class=\"mapa-data-table__sr-only\" role=\"status\">\n {{ texts.table.loading }}\n </span>\n } @else if (error) {\n <div class=\"mapa-data-table__state\" role=\"alert\">\n <strong>{{ resolvedErrorTitle }}</strong>\n @if (resolvedErrorSubtitle) {\n <span>{{ resolvedErrorSubtitle }}</span>\n }\n @if (retry.observed) {\n <button type=\"button\" (click)=\"retry.emit()\">\n {{ resolvedRetryLabel }}\n </button>\n }\n </div>\n } @else if (visibleData.length > 0) {\n <table class=\"mapa-data-table__table\">\n @if (caption) {\n <caption class=\"mapa-data-table__sr-only\">\n {{\n caption\n }}\n </caption>\n }\n <thead>\n <tr>\n @if (isSelectable) {\n <th class=\"mapa-data-table__selection-cell\">\n @if (showSelectAll) {\n <mat-checkbox\n color=\"primary\"\n [checked]=\"allVisibleSelected()\"\n [indeterminate]=\"someVisibleSelected()\"\n [aria-label]=\"texts.table.selectAllVisible\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"toggleVisibleRows($event.checked)\"\n />\n } @else {\n <span class=\"mapa-data-table__sr-only\">\n {{ texts.table.selectionColumn }}\n </span>\n }\n </th>\n }\n @for (column of columns; track column.key) {\n <th\n [class.mapa-data-table__cell--center]=\"isCenterAligned(column)\"\n [class.mapa-data-table__cell--end]=\"isEndAligned(column)\"\n [class.mapa-data-table__header--sortable]=\"isSortable(column)\"\n [class.mapa-data-table__header--sorted]=\"isSorted(column)\"\n [style.width]=\"columnWidth(column)\"\n [attr.aria-sort]=\"ariaSort(column)\"\n >\n @if (isSortable(column)) {\n <button\n type=\"button\"\n class=\"mapa-data-table__sort\"\n (click)=\"changeSort(column)\"\n >\n <span [innerHTML]=\"column.label | safeHtml\"></span>\n <mat-icon aria-hidden=\"true\">{{\n sortIcon(column)\n }}</mat-icon>\n </button>\n } @else {\n <span [innerHTML]=\"column.label | safeHtml\"></span>\n }\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of visibleData; track rowIdentity(row, $index)) {\n <tr\n [class.mapa-data-table__row--selected]=\"isSelected(row)\"\n [class.mapa-data-table__row--interactive]=\"rowClick.observed\"\n [attr.tabindex]=\"rowClick.observed ? 0 : null\"\n (click)=\"emitRowInteraction($event, row)\"\n (keydown)=\"emitRowKeyboard($event, row)\"\n >\n @if (isSelectable) {\n <td class=\"mapa-data-table__selection-cell\">\n <mat-checkbox\n color=\"primary\"\n [checked]=\"isSelected(row)\"\n [aria-label]=\"selectionLabel(row)\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"toggleRow(row, $event.checked)\"\n />\n </td>\n }\n @for (column of columns; track column.key) {\n <td\n [attr.data-label]=\"column.label\"\n [class.mapa-data-table__cell--center]=\"\n isCenterAligned(column)\n \"\n [class.mapa-data-table__cell--end]=\"isEndAligned(column)\"\n [style.width]=\"columnWidth(column)\"\n >\n <div\n class=\"mapa-data-table__cell-content\"\n [ngClass]=\"cellClasses(column, row)\"\n >\n @if (cellTemplate(column.key); as template) {\n <ng-container\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"{\n $implicit: row,\n row,\n column,\n }\"\n ></ng-container>\n } @else if (column.key === \"actions\") {\n <div class=\"mapa-data-table__actions\">\n @for (item of getActionItems(row); track item) {\n @if (route(item); as actionRoute) {\n <a\n class=\"mapa-data-table__action\"\n [class.mapa-data-table__action--disabled]=\"\n item.disabled\n \"\n [attr.aria-disabled]=\"\n item.disabled ? 'true' : null\n \"\n [attr.tabindex]=\"item.disabled ? -1 : null\"\n [title]=\"item.text\"\n [routerLink]=\"item.disabled ? null : actionRoute\"\n [queryParams]=\"queryParams(item)\"\n (click)=\"$event.stopPropagation()\"\n >\n @if (item.icon) {\n <mat-icon aria-hidden=\"true\">{{\n item.icon\n }}</mat-icon>\n }\n @if (item.image) {\n <img [src]=\"item.image\" alt=\"\" />\n }\n @if (item.svg) {\n <mapa-svg-icon [name]=\"svgName(item.svg)\" />\n }\n @if (item.showText) {\n <span>{{ item.text }}</span>\n } @else {\n <span class=\"mapa-data-table__sr-only\">{{\n item.text\n }}</span>\n }\n </a>\n } @else {\n <button\n type=\"button\"\n class=\"mapa-data-table__action\"\n [disabled]=\"item.disabled\"\n [title]=\"item.text\"\n (click)=\"emitAction(row, item, $event)\"\n >\n @if (item.icon) {\n <mat-icon aria-hidden=\"true\">{{\n item.icon\n }}</mat-icon>\n }\n @if (item.image) {\n <img [src]=\"item.image\" alt=\"\" />\n }\n @if (item.svg) {\n <mapa-svg-icon [name]=\"svgName(item.svg)\" />\n }\n @if (item.showText) {\n <span>{{ item.text }}</span>\n } @else {\n <span class=\"mapa-data-table__sr-only\">{{\n item.text\n }}</span>\n }\n </button>\n }\n }\n </div>\n } @else if (column.key === \"menu\") {\n @if (getMenuItems(row).length > 0) {\n <button\n type=\"button\"\n class=\"mapa-data-table__menu-trigger\"\n [matMenuTriggerFor]=\"rowMenu\"\n [attr.aria-label]=\"column.label\"\n (click)=\"$event.stopPropagation()\"\n >\n <mat-icon aria-hidden=\"true\">more_vert</mat-icon>\n </button>\n <mat-menu #rowMenu=\"matMenu\">\n @for (item of getMenuItems(row); track item) {\n @if (route(item); as menuRoute) {\n <a\n mat-menu-item\n [disabled]=\"item.disabled\"\n [routerLink]=\"item.disabled ? null : menuRoute\"\n [queryParams]=\"queryParams(item)\"\n (click)=\"$event.stopPropagation()\"\n >\n @if (item.icon) {\n <mat-icon aria-hidden=\"true\">{{\n item.icon\n }}</mat-icon>\n }\n @if (item.image) {\n <img [src]=\"item.image\" alt=\"\" />\n }\n <span>{{ item.text }}</span>\n </a>\n } @else {\n <button\n mat-menu-item\n [disabled]=\"item.disabled\"\n (click)=\"emitAction(row, item, $event)\"\n >\n @if (item.icon) {\n <mat-icon aria-hidden=\"true\">{{\n item.icon\n }}</mat-icon>\n }\n @if (item.image) {\n <img [src]=\"item.image\" alt=\"\" />\n }\n <span>{{ item.text }}</span>\n </button>\n }\n }\n </mat-menu>\n }\n } @else if (dateFormat(column); as format) {\n @if (dateValue(row, column); as value) {\n {{ value | date: format }}\n } @else {\n {{ column.fallback ?? \"-\" }}\n }\n } @else if (column.status) {\n <span\n class=\"mapa-data-table__status\"\n [class.mapa-data-table__status--round]=\"\n column.status.style === 'round'\n \"\n [style.background-color]=\"statusBackground(column, row)\"\n [style.color]=\"statusTextColor(column, row)\"\n [innerHTML]=\"statusLabel(column, row) | safeHtml\"\n ></span>\n } @else {\n <span\n [innerHTML]=\"cellValue(row, column) | safeHtml\"\n ></span>\n }\n </div>\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n } @else if (isFinished) {\n <div class=\"mapa-data-table__state\">\n <strong>{{ resolvedEmptyTitle }}</strong>\n @if (resolvedEmptySubtitle) {\n <span>{{ resolvedEmptySubtitle }}</span>\n }\n </div>\n }\n </div>\n\n @if (shouldShowPaginator) {\n <mat-paginator\n class=\"mapa-data-table__paginator\"\n appBubblePagination\n [appCustomLength]=\"totalCount\"\n [bubblePageIndex]=\"zeroBasedPageIndex\"\n [pageIndex]=\"zeroBasedPageIndex\"\n [showFirstButton]=\"paginatorShowFirstButton\"\n [showLastButton]=\"paginatorShowLastButton\"\n [renderButtonsNumber]=\"paginatorRenderButtonsNumber\"\n [hideDefaultArrows]=\"paginatorHideDefaultArrows\"\n [bubblePageSize]=\"pageSize\"\n [length]=\"totalCount\"\n [pageSize]=\"pageSize\"\n [pageSizeOptions]=\"pageSizeOptions\"\n (page)=\"handlePage($event)\"\n />\n }\n</section>\n", styles: [":host{display:block}.mapa-data-table{color:var(--mapa-color-text, #1a1a1a);font-family:var(--mapa-font-body, Asap, sans-serif)}.mapa-data-table__frame{background:var(--mapa-color-surface, #fff);border:1px solid var(--mapa-color-border, rgba(26, 26, 26, .12));border-radius:14px;overflow-x:auto;scrollbar-color:var(--mapa-color-scrollbar, #dbe0e4) transparent;scrollbar-width:thin}.mapa-data-table__frame::-webkit-scrollbar{height:8px;width:8px}.mapa-data-table__frame::-webkit-scrollbar-track,.mapa-data-table__frame::-webkit-scrollbar-corner{background:transparent}.mapa-data-table__frame::-webkit-scrollbar-thumb{background:var(--mapa-color-scrollbar, #dbe0e4);border-radius:999px}.mapa-data-table__frame::-webkit-scrollbar-thumb:hover{background:var(--mapa-color-scrollbar-hover, #c6ced4)}.mapa-data-table__frame::-webkit-scrollbar-button{display:none;height:0;width:0}.mapa-data-table__table{border-collapse:collapse;width:100%}.mapa-data-table th,.mapa-data-table td{border-bottom:1px solid var(--mapa-color-border-soft, rgba(26, 26, 26, .08));box-sizing:border-box;font-family:inherit;font-size:13px;font-weight:400;padding:.875rem 1rem;text-align:left;vertical-align:middle}.mapa-data-table th{background:var(--mapa-color-surface-muted, #fafbfc);color:var(--mapa-color-text-subtle, #555);font-size:.75rem;font-weight:600;letter-spacing:.02em;text-transform:uppercase;white-space:nowrap}.mapa-data-table td{color:var(--mapa-color-text, #1a1a1a)}.mapa-data-table tbody tr:last-child td{border-bottom:0}.mapa-data-table tbody tr:hover,.mapa-data-table__row--selected{background:var(--mapa-color-primary-soft, #FFF8F4)}.mapa-data-table__row--interactive{cursor:pointer}.mapa-data-table__row--interactive:focus-visible{outline:2px solid var(--mapa-color-primary, #ff560b);outline-offset:-3px}.mapa-data-table__selection-cell{width:4.5rem}.mapa-data-table__cell--center{text-align:center}.mapa-data-table__cell--end{text-align:right}.mapa-data-table__cell-content{min-width:0}.mapa-data-table__cell--ellipsis{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mapa-data-table__cell--no-wrap{white-space:nowrap}.mapa-data-table__cell--wrap{white-space:pre-wrap}.mapa-data-table th.mapa-data-table__header--sortable{transition:background-color .15s ease}.mapa-data-table th.mapa-data-table__header--sortable:hover{background:var(--mapa-color-primary-soft, #fff8f4);color:var(--mapa-color-primary-dark, #d94021)}.mapa-data-table__header--sorted .mapa-data-table__sort{color:var(--mapa-color-text, #1a1a1a)}.mapa-data-table__sort{align-items:center;background:transparent;border:0;border-radius:4px;color:inherit;cursor:pointer;display:inline-flex;font:inherit;gap:.25rem;letter-spacing:inherit;padding:0;text-transform:inherit;transition:color .15s ease}.mapa-data-table__state button:focus-visible,.mapa-data-table__action:focus-visible,.mapa-data-table__menu-trigger:focus-visible{outline:2px solid var(--mapa-color-primary-dark, #50575E);outline-offset:3px}.mapa-data-table__sort:focus-visible{outline:2px solid var(--mapa-color-primary-dark, #50575e);outline-offset:-2px}.mapa-data-table__sort mat-icon{color:var(--mapa-color-icon-subtle, #9da5aa);font-size:.875rem;height:.875rem;transition:color .15s ease;width:.875rem}.mapa-data-table__header--sortable:hover .mapa-data-table__sort mat-icon,.mapa-data-table__header--sorted .mapa-data-table__sort mat-icon{color:currentcolor}.mapa-data-table__actions{align-items:center;display:inline-flex;gap:.5rem}.mapa-data-table__action,.mapa-data-table__menu-trigger{align-items:center;background:transparent;border:0;border-radius:6px;color:var(--mapa-color-primary-dark, #50575E);cursor:pointer;display:inline-flex;font:inherit;gap:.375rem;justify-content:center;min-height:36px;min-width:36px;padding:.375rem;text-decoration:none}.mapa-data-table__action mat-icon,.mapa-data-table__menu-trigger mat-icon{color:#50575e}.mapa-data-table__action:hover,.mapa-data-table__menu-trigger:hover{background:var(--mapa-color-primary-soft, #FFF8F4)}.mapa-data-table__action:disabled,.mapa-data-table__action--disabled{cursor:not-allowed;opacity:.45}.mapa-data-table__action img,.mapa-data-table__menu-trigger img{height:1.25rem;width:1.25rem}.mapa-data-table__status{border-radius:4px;display:inline-flex;padding:.25rem .5rem;white-space:nowrap}.mapa-data-table__status--round{border-radius:999px}.mapa-data-table__state{align-items:center;color:var(--mapa-color-text-subtle, #555);display:flex;flex-direction:column;gap:.625rem;justify-content:center;min-height:150px;padding:1.5rem;text-align:center}.mapa-data-table__state strong{color:var(--mapa-color-text, #1a1a1a)}.mapa-data-table__state button{background:var(--mapa-color-surface-warm, #fffaf6);border:1px solid var(--mapa-color-border, rgba(26, 26, 26, .12));border-radius:10px;color:var(--mapa-color-text, #1a1a1a);cursor:pointer;font:inherit;min-height:40px;padding:.5rem .875rem}.mapa-data-table__skeleton{animation:mapa-data-table-shimmer 1.2s linear infinite;background:linear-gradient(90deg,#f0f2f4 25%,#e6e9ec,#f0f2f4 75%);background-size:200% 100%;border-radius:8px;display:block;height:1rem;max-width:14rem}.mapa-data-table__skeleton--checkbox{border-radius:3px;height:1.125rem;width:1.125rem}.mapa-data-table__sr-only{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}:host ::ng-deep .mapa-data-table__paginator{background:transparent;color:var(--mapa-color-text-subtle, #555);font-family:var(--mapa-font-body, Asap, sans-serif)}:host ::ng-deep .mapa-data-table__paginator .mat-mdc-paginator-container{justify-content:space-between;min-height:72px}:host ::ng-deep .mapa-data-table__paginator .mat-mdc-paginator-page-size{margin-right:min(10vw,8rem)}:host ::ng-deep .mapa-data-table__paginator .custom-paginator-container,:host ::ng-deep .mapa-data-table__paginator .g-bubble-container{align-items:center;display:flex;justify-content:flex-end}:host ::ng-deep .mapa-data-table__paginator .g-bubble-container{gap:.5rem}:host ::ng-deep .mapa-data-table__paginator .g-bubble{align-items:center;background:transparent;border:0;border-radius:4px;color:var(--mapa-color-text-subtle, #555);cursor:pointer;display:flex;font:inherit;justify-content:center;min-height:24px;min-width:24px;padding:1px 6px}:host ::ng-deep .mapa-data-table__paginator .g-bubble:hover{background:var(--mapa-color-border-soft, rgba(26, 26, 26, .08))}:host ::ng-deep .mapa-data-table__paginator .g-bubble:focus-visible{outline:2px solid var(--mapa-color-primary, #ff560b);outline-offset:2px}:host ::ng-deep .mapa-data-table__paginator .g-bubble__active{background:var(--mapa-color-primary-dark, #cf482b);color:var(--mapa-color-surface, #fff)}:host ::ng-deep .mapa-data-table__paginator .custom-paginator-counter{color:var(--mapa-color-text-subtle, #555);margin:0 .25rem 0 .625rem;white-space:nowrap}@media(max-width:760px){.mapa-data-table__frame{border:0;overflow:visible}.mapa-data-table thead{display:none}.mapa-data-table tbody{display:grid;gap:.75rem}.mapa-data-table tr{border:1px solid var(--mapa-color-border, rgba(26, 26, 26, .12));border-radius:12px;display:grid;grid-template-columns:minmax(0,1fr);padding:.75rem}.mapa-data-table--selectable tr{grid-template-columns:auto minmax(0,1fr)}.mapa-data-table td{border:0;grid-column:1;padding:.375rem .5rem;text-align:left;width:auto}.mapa-data-table--selectable td:not(.mapa-data-table__selection-cell){grid-column:2}.mapa-data-table td:not(.mapa-data-table__selection-cell):before{color:var(--mapa-color-text-subtle, #555);content:attr(data-label);display:block;font-size:.6875rem;font-weight:600;text-transform:uppercase}.mapa-data-table__selection-cell{grid-column:1;grid-row:1/span 20;width:auto}:host ::ng-deep .mapa-data-table__paginator .mat-mdc-paginator-container,:host ::ng-deep .mapa-data-table__paginator .mat-mdc-paginator-range-actions{justify-content:center}:host ::ng-deep .mapa-data-table__paginator .mat-mdc-paginator-container{gap:.75rem;padding:.75rem 0}:host ::ng-deep .mapa-data-table__paginator .mat-mdc-paginator-page-size{margin-right:0}:host ::ng-deep .mapa-data-table__paginator .mat-mdc-paginator-range-label{padding:.5rem 0;text-align:center;width:100%}}@media(prefers-reduced-motion:reduce){.mapa-data-table__skeleton{animation:none}}@keyframes mapa-data-table-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}\n"] }]
|
|
7838
8025
|
}], propDecorators: { columns: [{
|
|
7839
8026
|
type: Input
|
|
7840
8027
|
}], data: [{
|
|
@@ -7933,6 +8120,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
7933
8120
|
|
|
7934
8121
|
class MapaGroupReportComponent {
|
|
7935
8122
|
constructor() {
|
|
8123
|
+
this.i18n = inject(MapaI18nService);
|
|
7936
8124
|
this.groupReport = [];
|
|
7937
8125
|
this.showGroupReportGeneral = false;
|
|
7938
8126
|
this.onSortChange = new EventEmitter();
|
|
@@ -8002,7 +8190,11 @@ class MapaGroupReportComponent {
|
|
|
8002
8190
|
];
|
|
8003
8191
|
const existingKeys = new Set(['name']);
|
|
8004
8192
|
if (this.showGroupReportGeneral) {
|
|
8005
|
-
columns.push({
|
|
8193
|
+
columns.push({
|
|
8194
|
+
key: 'general',
|
|
8195
|
+
label: this.i18n.texts.report.overallPercentageTitle,
|
|
8196
|
+
sortable: false,
|
|
8197
|
+
});
|
|
8006
8198
|
existingKeys.add('general');
|
|
8007
8199
|
}
|
|
8008
8200
|
this.groupReport.forEach((reportItem) => {
|
|
@@ -8090,13 +8282,13 @@ class IconComponent {
|
|
|
8090
8282
|
registerCustomIcons(svg) {
|
|
8091
8283
|
this.matIconRegistry.addSvgIcon(svg, this.domSanitizer.bypassSecurityTrustResourceUrl(`../../../../assets/${svg}.svg`));
|
|
8092
8284
|
}
|
|
8093
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: IconComponent, deps: [{ token:
|
|
8094
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.21", type: IconComponent, isStandalone: true, selector: "mapa-icon", inputs: { svg: "svg" }, usesOnChanges: true, ngImport: i0, template: "<mat-icon *ngIf=\"svg\" [svgIcon]=\"svg\"></mat-icon>\n<mat-icon *ngIf=\"!svg\"><ng-content></ng-content></mat-icon>\n", styles: [".mat-icon{color:#f5704b}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type:
|
|
8285
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: IconComponent, deps: [{ token: i2$4.MatIconRegistry }, { token: i1$3.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8286
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.21", type: IconComponent, isStandalone: true, selector: "mapa-icon", inputs: { svg: "svg" }, usesOnChanges: true, ngImport: i0, template: "<mat-icon *ngIf=\"svg\" [svgIcon]=\"svg\"></mat-icon>\n<mat-icon *ngIf=\"!svg\"><ng-content></ng-content></mat-icon>\n", styles: [".mat-icon{color:#f5704b}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
|
|
8095
8287
|
}
|
|
8096
8288
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: IconComponent, decorators: [{
|
|
8097
8289
|
type: Component,
|
|
8098
8290
|
args: [{ selector: 'mapa-icon', standalone: true, imports: [CommonModule, MatIconModule], template: "<mat-icon *ngIf=\"svg\" [svgIcon]=\"svg\"></mat-icon>\n<mat-icon *ngIf=\"!svg\"><ng-content></ng-content></mat-icon>\n", styles: [".mat-icon{color:#f5704b}\n"] }]
|
|
8099
|
-
}], ctorParameters: () => [{ type:
|
|
8291
|
+
}], ctorParameters: () => [{ type: i2$4.MatIconRegistry }, { type: i1$3.DomSanitizer }], propDecorators: { svg: [{
|
|
8100
8292
|
type: Input
|
|
8101
8293
|
}] } });
|
|
8102
8294
|
|
|
@@ -8116,7 +8308,7 @@ class MapaMenuComponent {
|
|
|
8116
8308
|
this.emitMenu.emit({ action: item.action, data: this.data });
|
|
8117
8309
|
}
|
|
8118
8310
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8119
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.21", type: MapaMenuComponent, isStandalone: true, selector: "mapa-menu", inputs: { items: "items", data: "data" }, outputs: { emitMenu: "emitMenu" }, viewQueries: [{ propertyName: "trigger", first: true, predicate: MatMenuTrigger, descendants: true }], ngImport: i0, template: "<mat-menu #menu=\"matMenu\" class=\"mapa-menu\">\n <button\n *ngFor=\"let item of items\"\n mat-menu-item\n (click)=\"clickMenu(item)\"\n class=\"mapa-menu__item\"\n [class.mapa-menu__item--disabled]=\"item.disabled\"\n >\n <mat-icon *ngIf=\"item.icon\">{{item.icon}}</mat-icon>\n <img *ngIf=\"item.image\" [src]=\"item.image\" />\n <span>{{item.text}}</span>\n </button>\n</mat-menu>\n\n<img\n class=\"outside-menu-icon\"\n src=\"assets/images/icons/ThreePoints.svg\"\n (click)=\"toggleMenu()\"\n [matMenuTriggerFor]=\"menu\"\n/>\n", styles: [".outside-menu-icon{color:#50575e;display:flex;align-items:center;justify-content:center}.mat-mdc-menu-content mat-icon{color:var(--Grey-Grey-60, #50575e);font-size:16px;line-height:28px}.mapa-menu__item{display:flex;align-items:center}.mapa-menu__item img{margin-right:8px}.mapa-menu__item--disabled{opacity:.45;cursor:not-allowed}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type:
|
|
8311
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.21", type: MapaMenuComponent, isStandalone: true, selector: "mapa-menu", inputs: { items: "items", data: "data" }, outputs: { emitMenu: "emitMenu" }, viewQueries: [{ propertyName: "trigger", first: true, predicate: MatMenuTrigger, descendants: true }], ngImport: i0, template: "<mat-menu #menu=\"matMenu\" class=\"mapa-menu\">\n <button\n *ngFor=\"let item of items\"\n mat-menu-item\n (click)=\"clickMenu(item)\"\n class=\"mapa-menu__item\"\n [class.mapa-menu__item--disabled]=\"item.disabled\"\n >\n <mat-icon *ngIf=\"item.icon\">{{item.icon}}</mat-icon>\n <img *ngIf=\"item.image\" [src]=\"item.image\" />\n <span>{{item.text}}</span>\n </button>\n</mat-menu>\n\n<img\n class=\"outside-menu-icon\"\n src=\"assets/images/icons/ThreePoints.svg\"\n (click)=\"toggleMenu()\"\n [matMenuTriggerFor]=\"menu\"\n/>\n", styles: [".outside-menu-icon{color:#50575e;display:flex;align-items:center;justify-content:center}.mat-mdc-menu-content mat-icon{color:var(--Grey-Grey-60, #50575e);font-size:16px;line-height:28px}.mapa-menu__item{display:flex;align-items:center}.mapa-menu__item img{margin-right:8px}.mapa-menu__item--disabled{opacity:.45;cursor:not-allowed}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i3$4.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i3$4.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i3$4.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }] }); }
|
|
8120
8312
|
}
|
|
8121
8313
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaMenuComponent, decorators: [{
|
|
8122
8314
|
type: Component,
|
|
@@ -8209,7 +8401,7 @@ class ReportItemComponent {
|
|
|
8209
8401
|
this.clicked.emit(item.id);
|
|
8210
8402
|
}
|
|
8211
8403
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: ReportItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8212
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.21", type: ReportItemComponent, isStandalone: true, selector: "mapa-report-item", inputs: { itemData: "itemData", menuItems: "menuItems" }, outputs: { clicked: "clicked", emitMenu: "emitMenu" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"report-item\">\n <div class=\"report-icon\">\n <mat-icon class=\"material-icons\">{{ icon }}</mat-icon>\n </div>\n <div class=\"report-text\">\n <h1>\n {{ description }}\n </h1>\n </div>\n <div class=\"report-button\">\n <div class=\"report-circle\" *ngIf=\"resolvedMenuItems.length > 0\">\n <mat-icon [matMenuTriggerFor]=\"menu\">more_vert</mat-icon>\n <mat-menu #menu=\"matMenu\">\n <button\n mat-menu-item\n *ngFor=\"let item of resolvedMenuItems\"\n (click)=\"onClick(item.action)\"\n >\n <mat-icon *ngIf=\"item.icon\">{{ item.icon }}</mat-icon>\n <img *ngIf=\"item.image\" [src]=\"item.image\" />\n <span>{{ item.text }}</span>\n </button>\n </mat-menu>\n </div>\n </div>\n</div>\n", styles: [".report-item{margin:24px 48px;height:161px;display:flex;border-radius:16px;border:1px solid #CDCDCD}.report-item .report-icon{width:25%;border-radius:16px 0 0 16px;background:#fdefea}.report-item .report-icon .mat-icon{width:123px;height:123px;font-size:123px;color:#ea561d;padding:20px 42px}.report-item .report-text{background:var(--GlobalColors-Neutral-20, #F9F9F9);width:100%;padding:0 16px}.report-item .report-text h1{color:#000;font-family:var(--mapa-font-heading, \"Asap\", \"Inter\", sans-serif);font-size:20px;font-style:normal;font-weight:400;line-height:28px;margin-top:25px}.report-item .report-text li{color:var #000;font-family:var(--mapa-font-body, \"Asap\", \"Roboto\", \"Inter\", sans-serif);font-size:16px;font-style:normal;font-weight:400;line-height:24px;margin-top:10px}.report-item .report-button{width:4vw;align-items:flex-end;border-radius:50%;margin-top:10px}.report-item .report-button .report-circle{background-color:#fff;border-radius:50%;display:flex;align-items:center;margin-right:10px}.report-item .report-button .mat-icon{width:20px;height:20px;font-size:20px;margin:5px;color:#ea561d}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type:
|
|
8404
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.21", type: ReportItemComponent, isStandalone: true, selector: "mapa-report-item", inputs: { itemData: "itemData", menuItems: "menuItems" }, outputs: { clicked: "clicked", emitMenu: "emitMenu" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"report-item\">\n <div class=\"report-icon\">\n <mat-icon class=\"material-icons\">{{ icon }}</mat-icon>\n </div>\n <div class=\"report-text\">\n <h1>\n {{ description }}\n </h1>\n </div>\n <div class=\"report-button\">\n <div class=\"report-circle\" *ngIf=\"resolvedMenuItems.length > 0\">\n <mat-icon [matMenuTriggerFor]=\"menu\">more_vert</mat-icon>\n <mat-menu #menu=\"matMenu\">\n <button\n mat-menu-item\n *ngFor=\"let item of resolvedMenuItems\"\n (click)=\"onClick(item.action)\"\n >\n <mat-icon *ngIf=\"item.icon\">{{ item.icon }}</mat-icon>\n <img *ngIf=\"item.image\" [src]=\"item.image\" />\n <span>{{ item.text }}</span>\n </button>\n </mat-menu>\n </div>\n </div>\n</div>\n", styles: [".report-item{margin:24px 48px;height:161px;display:flex;border-radius:16px;border:1px solid #CDCDCD}.report-item .report-icon{width:25%;border-radius:16px 0 0 16px;background:#fdefea}.report-item .report-icon .mat-icon{width:123px;height:123px;font-size:123px;color:#ea561d;padding:20px 42px}.report-item .report-text{background:var(--GlobalColors-Neutral-20, #F9F9F9);width:100%;padding:0 16px}.report-item .report-text h1{color:#000;font-family:var(--mapa-font-heading, \"Asap\", \"Inter\", sans-serif);font-size:20px;font-style:normal;font-weight:400;line-height:28px;margin-top:25px}.report-item .report-text li{color:var #000;font-family:var(--mapa-font-body, \"Asap\", \"Roboto\", \"Inter\", sans-serif);font-size:16px;font-style:normal;font-weight:400;line-height:24px;margin-top:10px}.report-item .report-button{width:4vw;align-items:flex-end;border-radius:50%;margin-top:10px}.report-item .report-button .report-circle{background-color:#fff;border-radius:50%;display:flex;align-items:center;margin-right:10px}.report-item .report-button .mat-icon{width:20px;height:20px;font-size:20px;margin:5px;color:#ea561d}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i3$4.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i3$4.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i3$4.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }] }); }
|
|
8213
8405
|
}
|
|
8214
8406
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: ReportItemComponent, decorators: [{
|
|
8215
8407
|
type: Component,
|
|
@@ -8228,6 +8420,586 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
8228
8420
|
* Public API Surface of mapa-library-ui report-item
|
|
8229
8421
|
*/
|
|
8230
8422
|
|
|
8423
|
+
class MapaResultTrackComponent {
|
|
8424
|
+
constructor() {
|
|
8425
|
+
this.i18n = inject(MapaI18nService);
|
|
8426
|
+
this.name = input.required(...(ngDevMode ? [{ debugName: "name" }] : []));
|
|
8427
|
+
this.value = input.required(...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
8428
|
+
this.color = input('#ff560b', ...(ngDevMode ? [{ debugName: "color" }] : []));
|
|
8429
|
+
this.mode = input('linear', ...(ngDevMode ? [{ debugName: "mode" }] : []));
|
|
8430
|
+
this.appearance = input('rounded', ...(ngDevMode ? [{ debugName: "appearance" }] : []));
|
|
8431
|
+
this.direction = input('positive', ...(ngDevMode ? [{ debugName: "direction" }] : []));
|
|
8432
|
+
this.showValue = input(true, ...(ngDevMode ? [{ debugName: "showValue" }] : []));
|
|
8433
|
+
this.ariaLabel = input(...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : []));
|
|
8434
|
+
this.safeValue = computed(() => clamp(this.value()), ...(ngDevMode ? [{ debugName: "safeValue" }] : []));
|
|
8435
|
+
this.fillLeft = computed(() => {
|
|
8436
|
+
if (this.mode() === 'linear')
|
|
8437
|
+
return 0;
|
|
8438
|
+
return this.direction() === 'negative' ? 50 - this.safeValue() / 2 : 50;
|
|
8439
|
+
}, ...(ngDevMode ? [{ debugName: "fillLeft" }] : []));
|
|
8440
|
+
this.fillWidth = computed(() => this.mode() === 'linear' ? this.safeValue() : this.safeValue() / 2, ...(ngDevMode ? [{ debugName: "fillWidth" }] : []));
|
|
8441
|
+
this.badgePosition = computed(() => {
|
|
8442
|
+
if (this.mode() === 'linear')
|
|
8443
|
+
return this.safeValue();
|
|
8444
|
+
return this.direction() === 'negative'
|
|
8445
|
+
? 50 - this.safeValue() / 2
|
|
8446
|
+
: 50 + this.safeValue() / 2;
|
|
8447
|
+
}, ...(ngDevMode ? [{ debugName: "badgePosition" }] : []));
|
|
8448
|
+
this.label = computed(() => this.ariaLabel() ??
|
|
8449
|
+
this.i18n.texts.report.meterLabel(this.name(), this.safeValue()), ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
8450
|
+
}
|
|
8451
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaResultTrackComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8452
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.21", type: MapaResultTrackComponent, isStandalone: true, selector: "mapa-result-track", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, showValue: { classPropertyName: "showValue", publicName: "showValue", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\n class=\"mapa-result-track\"\n [class.mapa-result-track--plain]=\"!showValue()\"\n [class.mapa-result-track--segmented]=\"appearance() === 'segmented'\"\n role=\"meter\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-valuenow]=\"safeValue()\"\n [attr.aria-label]=\"label()\"\n [style.--mapa-result-color]=\"color()\"\n [style.--mapa-result-left]=\"fillLeft() + '%'\"\n [style.--mapa-result-width]=\"fillWidth() + '%'\"\n [style.--mapa-result-position]=\"badgePosition() + '%'\"\n>\n <span class=\"mapa-result-track__rail\" aria-hidden=\"true\">\n @if (mode() === \"diverging\") {\n <span class=\"mapa-result-track__midpoint\"></span>\n }\n <span\n class=\"mapa-result-track__fill\"\n [class.negative]=\"mode() === 'diverging' && direction() === 'negative'\"\n [class.positive]=\"mode() === 'diverging' && direction() === 'positive'\"\n ></span>\n </span>\n @if (showValue()) {\n <span class=\"mapa-result-track__badge\" aria-hidden=\"true\"\n >{{ safeValue() }}%</span\n >\n }\n</div>\n", styles: [".mapa-result-track{--mapa-result-badge-height: 24px;--mapa-result-fill-height: calc(var(--mapa-result-track-height, 14px) - 2px);min-height:28px;padding:10px 0 8px;position:relative}.mapa-result-track .negative{border-top-right-radius:0%;border-bottom-right-radius:0%}.mapa-result-track .positive{border-top-left-radius:0%;border-bottom-left-radius:0%}.mapa-result-track__rail{background:#e7ebed;border-radius:999px;display:block;height:var(--mapa-result-track-height, 14px);overflow:visible;position:relative}.mapa-result-track__fill{background:var(--mapa-result-color);border-radius:999px;height:var(--mapa-result-fill-height);left:var(--mapa-result-left);position:absolute;top:50%;transform:translateY(-50%);width:var(--mapa-result-width)}.mapa-result-track__midpoint{background:#aeb7bc;height:10px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:1px}.mapa-result-track__badge{align-items:center;background:#fff;border:2px solid var(--mapa-result-color);border-radius:999px;box-sizing:border-box;display:inline-flex;font:650 10px/1 var(--mapa-font-body, \"Asap\", sans-serif);height:var(--mapa-result-badge-height);justify-content:center;left:clamp(18px,var(--mapa-result-position),100% - 18px);min-width:34px;padding:0 5px;position:absolute;text-align:center;top:6px;transform:translate(-50%);z-index:1}.mapa-result-track--plain{min-height:0;padding:0}.mapa-result-track--segmented{--mapa-result-badge-height: 22px;--mapa-result-fill-height: 12px;min-height:24px;padding:3px 0}.mapa-result-track--segmented .mapa-result-track__rail{background:repeating-linear-gradient(90deg,#fff 0 calc(20% - 1px),#d9e0e3 calc(20% - 1px) 20%);border:1px solid #d9e0e3;border-radius:0;height:18px}.mapa-result-track--segmented .mapa-result-track__fill{border-radius:0}.mapa-result-track--segmented .mapa-result-track__badge{background:#fff;border-width:1px;min-width:29px;padding:0 4px;top:50%;transform:translate(-50%,-50%)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
8453
|
+
}
|
|
8454
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaResultTrackComponent, decorators: [{
|
|
8455
|
+
type: Component,
|
|
8456
|
+
args: [{ selector: 'mapa-result-track', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"mapa-result-track\"\n [class.mapa-result-track--plain]=\"!showValue()\"\n [class.mapa-result-track--segmented]=\"appearance() === 'segmented'\"\n role=\"meter\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-valuenow]=\"safeValue()\"\n [attr.aria-label]=\"label()\"\n [style.--mapa-result-color]=\"color()\"\n [style.--mapa-result-left]=\"fillLeft() + '%'\"\n [style.--mapa-result-width]=\"fillWidth() + '%'\"\n [style.--mapa-result-position]=\"badgePosition() + '%'\"\n>\n <span class=\"mapa-result-track__rail\" aria-hidden=\"true\">\n @if (mode() === \"diverging\") {\n <span class=\"mapa-result-track__midpoint\"></span>\n }\n <span\n class=\"mapa-result-track__fill\"\n [class.negative]=\"mode() === 'diverging' && direction() === 'negative'\"\n [class.positive]=\"mode() === 'diverging' && direction() === 'positive'\"\n ></span>\n </span>\n @if (showValue()) {\n <span class=\"mapa-result-track__badge\" aria-hidden=\"true\"\n >{{ safeValue() }}%</span\n >\n }\n</div>\n", styles: [".mapa-result-track{--mapa-result-badge-height: 24px;--mapa-result-fill-height: calc(var(--mapa-result-track-height, 14px) - 2px);min-height:28px;padding:10px 0 8px;position:relative}.mapa-result-track .negative{border-top-right-radius:0%;border-bottom-right-radius:0%}.mapa-result-track .positive{border-top-left-radius:0%;border-bottom-left-radius:0%}.mapa-result-track__rail{background:#e7ebed;border-radius:999px;display:block;height:var(--mapa-result-track-height, 14px);overflow:visible;position:relative}.mapa-result-track__fill{background:var(--mapa-result-color);border-radius:999px;height:var(--mapa-result-fill-height);left:var(--mapa-result-left);position:absolute;top:50%;transform:translateY(-50%);width:var(--mapa-result-width)}.mapa-result-track__midpoint{background:#aeb7bc;height:10px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:1px}.mapa-result-track__badge{align-items:center;background:#fff;border:2px solid var(--mapa-result-color);border-radius:999px;box-sizing:border-box;display:inline-flex;font:650 10px/1 var(--mapa-font-body, \"Asap\", sans-serif);height:var(--mapa-result-badge-height);justify-content:center;left:clamp(18px,var(--mapa-result-position),100% - 18px);min-width:34px;padding:0 5px;position:absolute;text-align:center;top:6px;transform:translate(-50%);z-index:1}.mapa-result-track--plain{min-height:0;padding:0}.mapa-result-track--segmented{--mapa-result-badge-height: 22px;--mapa-result-fill-height: 12px;min-height:24px;padding:3px 0}.mapa-result-track--segmented .mapa-result-track__rail{background:repeating-linear-gradient(90deg,#fff 0 calc(20% - 1px),#d9e0e3 calc(20% - 1px) 20%);border:1px solid #d9e0e3;border-radius:0;height:18px}.mapa-result-track--segmented .mapa-result-track__fill{border-radius:0}.mapa-result-track--segmented .mapa-result-track__badge{background:#fff;border-width:1px;min-width:29px;padding:0 4px;top:50%;transform:translate(-50%,-50%)}\n"] }]
|
|
8457
|
+
}], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], direction: [{ type: i0.Input, args: [{ isSignal: true, alias: "direction", required: false }] }], showValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "showValue", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }] } });
|
|
8458
|
+
function clamp(value) {
|
|
8459
|
+
if (!Number.isFinite(value))
|
|
8460
|
+
return 0;
|
|
8461
|
+
return Math.min(100, Math.max(0, Math.round(value)));
|
|
8462
|
+
}
|
|
8463
|
+
|
|
8464
|
+
class MapaReportGroupProfileWidgetComponent {
|
|
8465
|
+
constructor() {
|
|
8466
|
+
this.i18n = inject(MapaI18nService);
|
|
8467
|
+
this.heading = input(...(ngDevMode ? [undefined, { debugName: "heading" }] : []));
|
|
8468
|
+
this.data = input(...(ngDevMode ? [undefined, { debugName: "data" }] : []));
|
|
8469
|
+
this.palette = input('current', ...(ngDevMode ? [{ debugName: "palette" }] : []));
|
|
8470
|
+
this.showAverage = input(true, ...(ngDevMode ? [{ debugName: "showAverage" }] : []));
|
|
8471
|
+
this.showLegend = input(true, ...(ngDevMode ? [{ debugName: "showLegend" }] : []));
|
|
8472
|
+
/** Overrides the legend derived from the slice classifications. */
|
|
8473
|
+
this.legend = input(...(ngDevMode ? [undefined, { debugName: "legend" }] : []));
|
|
8474
|
+
/** Overrides the caption above each pill; defaults to the i18n text. */
|
|
8475
|
+
this.distributionLabel = input(...(ngDevMode ? [undefined, { debugName: "distributionLabel" }] : []));
|
|
8476
|
+
/** Overrides the group average caption; defaults to the i18n text. */
|
|
8477
|
+
this.averageLabel = input(...(ngDevMode ? [undefined, { debugName: "averageLabel" }] : []));
|
|
8478
|
+
this.distributionCaption = computed(() => this.distributionLabel() ?? this.i18n.texts.report.groupDistributionLabel, ...(ngDevMode ? [{ debugName: "distributionCaption" }] : []));
|
|
8479
|
+
this.averageCaption = computed(() => this.averageLabel() ?? this.i18n.texts.report.groupAverageTitle, ...(ngDevMode ? [{ debugName: "averageCaption" }] : []));
|
|
8480
|
+
this.dimensions = computed(() => this.data()?.dimensions ?? [], ...(ngDevMode ? [{ debugName: "dimensions" }] : []));
|
|
8481
|
+
this.average = computed(() => {
|
|
8482
|
+
const value = this.data()?.average;
|
|
8483
|
+
return typeof value === 'number' && Number.isFinite(value)
|
|
8484
|
+
? Math.min(100, Math.max(0, value))
|
|
8485
|
+
: null;
|
|
8486
|
+
}, ...(ngDevMode ? [{ debugName: "average" }] : []));
|
|
8487
|
+
/** The track only takes whole percentages; the caption keeps the precision. */
|
|
8488
|
+
this.averageText = computed(() => {
|
|
8489
|
+
const value = this.average();
|
|
8490
|
+
if (value === null)
|
|
8491
|
+
return '';
|
|
8492
|
+
return `${Number.isInteger(value) ? value : value.toFixed(1)}%`;
|
|
8493
|
+
}, ...(ngDevMode ? [{ debugName: "averageText" }] : []));
|
|
8494
|
+
this.legendItems = computed(() => {
|
|
8495
|
+
const explicit = this.legend();
|
|
8496
|
+
if (explicit)
|
|
8497
|
+
return explicit;
|
|
8498
|
+
const items = new Map();
|
|
8499
|
+
// Only the slices the pill actually draws deserve a legend entry.
|
|
8500
|
+
for (const dimension of this.dimensions()) {
|
|
8501
|
+
for (const slice of this.slices(dimension)) {
|
|
8502
|
+
const label = this.sliceLabel(slice);
|
|
8503
|
+
const color = this.sliceColor(slice);
|
|
8504
|
+
if (!label || !color)
|
|
8505
|
+
continue;
|
|
8506
|
+
const key = String(slice.classification?.classificationId ?? slice.id ?? label);
|
|
8507
|
+
if (!items.has(key))
|
|
8508
|
+
items.set(key, { id: key, label, color });
|
|
8509
|
+
}
|
|
8510
|
+
}
|
|
8511
|
+
return [...items.values()];
|
|
8512
|
+
}, ...(ngDevMode ? [{ debugName: "legendItems" }] : []));
|
|
8513
|
+
}
|
|
8514
|
+
/** Zero-width slices would still cost a pill seam, so they are dropped. */
|
|
8515
|
+
slices(dimension) {
|
|
8516
|
+
return (dimension.slices ?? []).filter((slice) => this.width(slice) > 0);
|
|
8517
|
+
}
|
|
8518
|
+
width(slice) {
|
|
8519
|
+
const value = slice.value;
|
|
8520
|
+
if (!Number.isFinite(value))
|
|
8521
|
+
return 0;
|
|
8522
|
+
return Math.min(100, Math.max(0, value));
|
|
8523
|
+
}
|
|
8524
|
+
sliceColor(slice) {
|
|
8525
|
+
return (slice.color ?? slice.classification?.classificationColor ?? '#c3ccd1');
|
|
8526
|
+
}
|
|
8527
|
+
sliceLabel(slice) {
|
|
8528
|
+
return slice.label ?? slice.classification?.classificationName ?? '';
|
|
8529
|
+
}
|
|
8530
|
+
sliceValue(slice) {
|
|
8531
|
+
const value = this.width(slice);
|
|
8532
|
+
return `${Number.isInteger(value) ? value : value.toFixed(1)}%`;
|
|
8533
|
+
}
|
|
8534
|
+
sliceTitle(slice) {
|
|
8535
|
+
const label = this.sliceLabel(slice);
|
|
8536
|
+
return label
|
|
8537
|
+
? `${label}: ${this.sliceValue(slice)}`
|
|
8538
|
+
: this.sliceValue(slice);
|
|
8539
|
+
}
|
|
8540
|
+
/** The values line above each pill, in the same order as the slices. */
|
|
8541
|
+
valuesLabel(dimension) {
|
|
8542
|
+
return this.slices(dimension)
|
|
8543
|
+
.map((slice) => this.sliceValue(slice))
|
|
8544
|
+
.join(' · ');
|
|
8545
|
+
}
|
|
8546
|
+
pillLabel(dimension) {
|
|
8547
|
+
return `${dimension.name}: ${this.valuesLabel(dimension)}`;
|
|
8548
|
+
}
|
|
8549
|
+
direction(dimension) {
|
|
8550
|
+
return dimension?.direction ?? this.data()?.direction;
|
|
8551
|
+
}
|
|
8552
|
+
directionArrow(dimension) {
|
|
8553
|
+
return this.direction(dimension) === 'negative' ? '↓' : '↑';
|
|
8554
|
+
}
|
|
8555
|
+
directionLabel(dimension) {
|
|
8556
|
+
return this.direction(dimension) === 'negative'
|
|
8557
|
+
? this.i18n.texts.report.negativeDirectionLabel
|
|
8558
|
+
: this.i18n.texts.report.positiveDirectionLabel;
|
|
8559
|
+
}
|
|
8560
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaReportGroupProfileWidgetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8561
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.21", type: MapaReportGroupProfileWidgetComponent, isStandalone: true, selector: "mapa-report-group-profile-widget", inputs: { heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, palette: { classPropertyName: "palette", publicName: "palette", isSignal: true, isRequired: false, transformFunction: null }, showAverage: { classPropertyName: "showAverage", publicName: "showAverage", isSignal: true, isRequired: false, transformFunction: null }, showLegend: { classPropertyName: "showLegend", publicName: "showLegend", isSignal: true, isRequired: false, transformFunction: null }, legend: { classPropertyName: "legend", publicName: "legend", isSignal: true, isRequired: false, transformFunction: null }, distributionLabel: { classPropertyName: "distributionLabel", publicName: "distributionLabel", isSignal: true, isRequired: false, transformFunction: null }, averageLabel: { classPropertyName: "averageLabel", publicName: "averageLabel", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<section class=\"mapa-report-widget\" [attr.data-palette]=\"palette()\">\n @if (heading(); as head) {\n <header class=\"mapa-report-widget__header\">\n <div class=\"mapa-report-widget__heading\">\n <h2>{{ head.title }}</h2>\n @if (head.description) {\n <p>{{ head.description }}</p>\n }\n </div>\n </header>\n }\n\n <div class=\"mapa-report-group-profile__filters\">\n <ng-content select=\"[mapaReportGroupProfileFilters]\"></ng-content>\n </div>\n\n @if (!dimensions().length) {\n <p class=\"mapa-report-widget__empty\">{{ i18n.texts.report.emptyState }}</p>\n } @else {\n <header class=\"mapa-report-group-profile__scale\">\n <h3>\n {{ data()?.name }}\n @if (direction()) {\n <span\n class=\"mapa-direction-indicator\"\n [attr.title]=\"directionLabel()\"\n [attr.aria-label]=\"directionLabel()\"\n >{{ directionArrow() }}</span\n >\n }\n </h3>\n @if (showAverage() && average() !== null) {\n <div class=\"mapa-report-group-profile__average\">\n <span class=\"mapa-report-group-profile__average-label\">{{\n averageCaption()\n }}</span>\n <div class=\"mapa-report-group-profile__average-value\">\n <mapa-result-track\n [name]=\"averageCaption()\"\n [showValue]=\"false\"\n [value]=\"average()!\"\n />\n <strong>{{ averageText() }}</strong>\n </div>\n </div>\n }\n </header>\n\n <div class=\"mapa-report-group-profile__rows\">\n @for (dimension of dimensions(); track dimension.id ?? dimension.name) {\n <article class=\"mapa-report-group-profile__row\">\n <h4 class=\"mapa-report-group-profile__row-name\">\n {{ dimension.name }}\n @if (direction(dimension)) {\n <span\n class=\"mapa-direction-indicator\"\n [attr.title]=\"directionLabel(dimension)\"\n [attr.aria-label]=\"directionLabel(dimension)\"\n >{{ directionArrow(dimension) }}</span\n >\n }\n </h4>\n <div class=\"mapa-report-group-profile__bar\">\n <div class=\"mapa-report-group-profile__values\">\n <span>{{ distributionCaption() }}</span>\n <b>{{ valuesLabel(dimension) }}</b>\n </div>\n <div\n class=\"mapa-report-group-profile__pill\"\n role=\"img\"\n [attr.aria-label]=\"pillLabel(dimension)\"\n >\n @for (slice of slices(dimension); track $index) {\n <span\n class=\"mapa-report-group-profile__slice\"\n [class.mapa-report-group-profile__slice--highlighted]=\"\n slice.highlighted\n \"\n [style.width.%]=\"width(slice)\"\n [style.background-color]=\"sliceColor(slice)\"\n [attr.title]=\"sliceTitle(slice)\"\n ></span>\n }\n </div>\n </div>\n </article>\n }\n </div>\n\n @if (showLegend() && legendItems().length) {\n <ul class=\"mapa-report-group-profile__legend\">\n @for (item of legendItems(); track item.id ?? item.label) {\n <li>\n <i\n class=\"mapa-report-group-profile__swatch\"\n [style.background-color]=\"item.color\"\n aria-hidden=\"true\"\n ></i>\n {{ item.label }}\n </li>\n }\n </ul>\n }\n }\n</section>\n", styles: ["@charset \"UTF-8\";:host{--mapa-report-accent: #ff560b;--mapa-report-accent-soft: #fff0e9;--mapa-report-surface: #fff;--mapa-report-surface-muted: #eef2f3;--mapa-report-border: #e1e5e7;--mapa-report-text: #263238;--mapa-report-muted: #68747a;--mapa-report-pill-width: 104px;--mapa-report-radius: 8px;--mapa-report-space: 20px;color:var(--mapa-report-text);display:block;font-family:var(--mapa-font-body, \"Asap\", \"Roboto\", sans-serif)}.mapa-report-widget{display:grid;gap:var(--mapa-report-space)}.mapa-report-widget__header{align-items:flex-start;display:flex;gap:16px;justify-content:space-between}.mapa-report-widget__heading{max-width:72ch}.mapa-report-widget__heading h2{color:var(--mapa-report-accent);font-size:20px;font-weight:650;line-height:1.25;margin:0}.mapa-report-widget__heading p{color:var(--mapa-report-muted);font-size:13px;line-height:1.5;margin:5px 0 0}.mapa-report-widget__modes{--mat-button-toggle-background-color: var(--mapa-report-surface);--mat-button-toggle-divider-color: #cbd5da;--mat-button-toggle-height: 32px;--mat-button-toggle-label-text-font: var( --mapa-font-body, \"Asap\", sans-serif );--mat-button-toggle-label-text-size: 13px;--mat-button-toggle-label-text-weight: 500;--mat-button-toggle-selected-state-background-color: #59636a;--mat-button-toggle-selected-state-text-color: #fffaf7;--mat-button-toggle-shape: 4px;--mat-button-toggle-text-color: #344b5e;border:1px solid #cbd5da;border-radius:4px;flex:0 0 auto;overflow:hidden}.mapa-report-widget__modes mat-button-toggle{font:500 13px/1 var(--mapa-font-body, \"Asap\", sans-serif)}.mapa-report-widget__modes mat-icon{font-size:14px;height:14px;margin-right:5px;width:14px}.mapa-report-widget__empty{color:var(--mapa-report-muted);margin:0;padding:24px 0;text-align:center}@media(max-width:760px){.mapa-report-widget__header{align-items:stretch;flex-direction:column}.mapa-report-widget__modes{align-self:flex-start}}.mapa-direction-indicator{background:var(--mapa-report-surface, var(--mapa-color-surface, #fafbfc));border:1px solid currentColor;border-radius:50%;box-sizing:border-box;color:var(--mapa-report-muted, var(--mapa-color-text-subtle, #68747a));display:inline-grid;flex:0 0 20px;font-size:11px;font-weight:700;height:20px;line-height:1;place-items:center;width:20px}:host{--mapa-report-pill-height: 21px;--mapa-report-line-soft: #edf1f3}.mapa-report-group-profile__filters{border-bottom:1px solid var(--mapa-report-border);display:grid;gap:12px;grid-auto-columns:minmax(0,1fr);grid-auto-flow:column;padding-bottom:var(--mapa-report-space)}.mapa-report-group-profile__filters:empty{display:none}.mapa-report-group-profile__scale{align-items:center;display:flex;flex-wrap:wrap;gap:18px;justify-content:space-between}.mapa-report-group-profile__scale h3{align-items:center;display:flex;font-size:26px;font-weight:500;gap:8px;letter-spacing:-.02em;line-height:1.15;margin:0}.mapa-report-group-profile__average{border:1px solid var(--mapa-report-border);border-radius:var(--mapa-report-radius);min-width:230px;padding:10px 14px}.mapa-report-group-profile__average-label{color:var(--mapa-report-muted);display:block;font-size:10px;font-weight:700;letter-spacing:.04em;text-transform:uppercase}.mapa-report-group-profile__average-value{align-items:center;display:flex;gap:10px}.mapa-report-group-profile__average-value mapa-result-track{--mapa-result-track-height: 8px;flex:1}.mapa-report-group-profile__average-value strong{font-size:20px;font-weight:500}.mapa-report-group-profile__rows{display:grid}.mapa-report-group-profile__row{align-items:center;border-top:1px solid var(--mapa-report-line-soft);display:grid;gap:16px;grid-template-columns:minmax(120px,20%) minmax(0,1fr);padding:15px 0}.mapa-report-group-profile__row-name{align-items:center;display:flex;font-size:14px;font-weight:500;gap:7px;margin:0}.mapa-report-group-profile__bar{min-width:0}.mapa-report-group-profile__values{color:var(--mapa-report-muted);display:flex;font-size:11px;gap:12px;justify-content:space-between;margin-bottom:5px}.mapa-report-group-profile__values b{color:var(--mapa-report-text);font-weight:600;text-align:right}.mapa-report-group-profile__pill{background:var(--mapa-report-surface-muted);border-radius:999px;display:flex;gap:2px;height:var(--mapa-report-pill-height);overflow:hidden;width:100%}.mapa-report-group-profile__slice{display:block;flex:0 1 auto;height:100%;min-width:8px;overflow:hidden}.mapa-report-group-profile__slice--highlighted{align-items:center;display:flex;justify-content:center}.mapa-report-group-profile__slice--highlighted:after{color:var(--mapa-report-surface);content:\"\\25bc\";font-size:9px;line-height:1}.mapa-report-group-profile__legend{display:flex;flex-wrap:wrap;gap:8px 16px;list-style:none;margin:0;padding:0}.mapa-report-group-profile__legend li{align-items:center;color:var(--mapa-report-muted);display:inline-flex;font-size:12px;gap:6px}.mapa-report-group-profile__swatch{border-radius:999px;flex:0 0 auto;height:10px;width:10px}:host ::ng-deep .mapa-report-group-profile__filters>*{min-width:0;width:100%}@media(max-width:760px){.mapa-report-group-profile__filters{grid-auto-flow:row}.mapa-report-group-profile__average{min-width:0;width:100%}.mapa-report-group-profile__row{gap:8px;grid-template-columns:minmax(0,1fr)}}\n"], dependencies: [{ kind: "component", type: MapaResultTrackComponent, selector: "mapa-result-track", inputs: ["name", "value", "color", "mode", "appearance", "direction", "showValue", "ariaLabel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
8562
|
+
}
|
|
8563
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaReportGroupProfileWidgetComponent, decorators: [{
|
|
8564
|
+
type: Component,
|
|
8565
|
+
args: [{ selector: 'mapa-report-group-profile-widget', standalone: true, imports: [MapaResultTrackComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<section class=\"mapa-report-widget\" [attr.data-palette]=\"palette()\">\n @if (heading(); as head) {\n <header class=\"mapa-report-widget__header\">\n <div class=\"mapa-report-widget__heading\">\n <h2>{{ head.title }}</h2>\n @if (head.description) {\n <p>{{ head.description }}</p>\n }\n </div>\n </header>\n }\n\n <div class=\"mapa-report-group-profile__filters\">\n <ng-content select=\"[mapaReportGroupProfileFilters]\"></ng-content>\n </div>\n\n @if (!dimensions().length) {\n <p class=\"mapa-report-widget__empty\">{{ i18n.texts.report.emptyState }}</p>\n } @else {\n <header class=\"mapa-report-group-profile__scale\">\n <h3>\n {{ data()?.name }}\n @if (direction()) {\n <span\n class=\"mapa-direction-indicator\"\n [attr.title]=\"directionLabel()\"\n [attr.aria-label]=\"directionLabel()\"\n >{{ directionArrow() }}</span\n >\n }\n </h3>\n @if (showAverage() && average() !== null) {\n <div class=\"mapa-report-group-profile__average\">\n <span class=\"mapa-report-group-profile__average-label\">{{\n averageCaption()\n }}</span>\n <div class=\"mapa-report-group-profile__average-value\">\n <mapa-result-track\n [name]=\"averageCaption()\"\n [showValue]=\"false\"\n [value]=\"average()!\"\n />\n <strong>{{ averageText() }}</strong>\n </div>\n </div>\n }\n </header>\n\n <div class=\"mapa-report-group-profile__rows\">\n @for (dimension of dimensions(); track dimension.id ?? dimension.name) {\n <article class=\"mapa-report-group-profile__row\">\n <h4 class=\"mapa-report-group-profile__row-name\">\n {{ dimension.name }}\n @if (direction(dimension)) {\n <span\n class=\"mapa-direction-indicator\"\n [attr.title]=\"directionLabel(dimension)\"\n [attr.aria-label]=\"directionLabel(dimension)\"\n >{{ directionArrow(dimension) }}</span\n >\n }\n </h4>\n <div class=\"mapa-report-group-profile__bar\">\n <div class=\"mapa-report-group-profile__values\">\n <span>{{ distributionCaption() }}</span>\n <b>{{ valuesLabel(dimension) }}</b>\n </div>\n <div\n class=\"mapa-report-group-profile__pill\"\n role=\"img\"\n [attr.aria-label]=\"pillLabel(dimension)\"\n >\n @for (slice of slices(dimension); track $index) {\n <span\n class=\"mapa-report-group-profile__slice\"\n [class.mapa-report-group-profile__slice--highlighted]=\"\n slice.highlighted\n \"\n [style.width.%]=\"width(slice)\"\n [style.background-color]=\"sliceColor(slice)\"\n [attr.title]=\"sliceTitle(slice)\"\n ></span>\n }\n </div>\n </div>\n </article>\n }\n </div>\n\n @if (showLegend() && legendItems().length) {\n <ul class=\"mapa-report-group-profile__legend\">\n @for (item of legendItems(); track item.id ?? item.label) {\n <li>\n <i\n class=\"mapa-report-group-profile__swatch\"\n [style.background-color]=\"item.color\"\n aria-hidden=\"true\"\n ></i>\n {{ item.label }}\n </li>\n }\n </ul>\n }\n }\n</section>\n", styles: ["@charset \"UTF-8\";:host{--mapa-report-accent: #ff560b;--mapa-report-accent-soft: #fff0e9;--mapa-report-surface: #fff;--mapa-report-surface-muted: #eef2f3;--mapa-report-border: #e1e5e7;--mapa-report-text: #263238;--mapa-report-muted: #68747a;--mapa-report-pill-width: 104px;--mapa-report-radius: 8px;--mapa-report-space: 20px;color:var(--mapa-report-text);display:block;font-family:var(--mapa-font-body, \"Asap\", \"Roboto\", sans-serif)}.mapa-report-widget{display:grid;gap:var(--mapa-report-space)}.mapa-report-widget__header{align-items:flex-start;display:flex;gap:16px;justify-content:space-between}.mapa-report-widget__heading{max-width:72ch}.mapa-report-widget__heading h2{color:var(--mapa-report-accent);font-size:20px;font-weight:650;line-height:1.25;margin:0}.mapa-report-widget__heading p{color:var(--mapa-report-muted);font-size:13px;line-height:1.5;margin:5px 0 0}.mapa-report-widget__modes{--mat-button-toggle-background-color: var(--mapa-report-surface);--mat-button-toggle-divider-color: #cbd5da;--mat-button-toggle-height: 32px;--mat-button-toggle-label-text-font: var( --mapa-font-body, \"Asap\", sans-serif );--mat-button-toggle-label-text-size: 13px;--mat-button-toggle-label-text-weight: 500;--mat-button-toggle-selected-state-background-color: #59636a;--mat-button-toggle-selected-state-text-color: #fffaf7;--mat-button-toggle-shape: 4px;--mat-button-toggle-text-color: #344b5e;border:1px solid #cbd5da;border-radius:4px;flex:0 0 auto;overflow:hidden}.mapa-report-widget__modes mat-button-toggle{font:500 13px/1 var(--mapa-font-body, \"Asap\", sans-serif)}.mapa-report-widget__modes mat-icon{font-size:14px;height:14px;margin-right:5px;width:14px}.mapa-report-widget__empty{color:var(--mapa-report-muted);margin:0;padding:24px 0;text-align:center}@media(max-width:760px){.mapa-report-widget__header{align-items:stretch;flex-direction:column}.mapa-report-widget__modes{align-self:flex-start}}.mapa-direction-indicator{background:var(--mapa-report-surface, var(--mapa-color-surface, #fafbfc));border:1px solid currentColor;border-radius:50%;box-sizing:border-box;color:var(--mapa-report-muted, var(--mapa-color-text-subtle, #68747a));display:inline-grid;flex:0 0 20px;font-size:11px;font-weight:700;height:20px;line-height:1;place-items:center;width:20px}:host{--mapa-report-pill-height: 21px;--mapa-report-line-soft: #edf1f3}.mapa-report-group-profile__filters{border-bottom:1px solid var(--mapa-report-border);display:grid;gap:12px;grid-auto-columns:minmax(0,1fr);grid-auto-flow:column;padding-bottom:var(--mapa-report-space)}.mapa-report-group-profile__filters:empty{display:none}.mapa-report-group-profile__scale{align-items:center;display:flex;flex-wrap:wrap;gap:18px;justify-content:space-between}.mapa-report-group-profile__scale h3{align-items:center;display:flex;font-size:26px;font-weight:500;gap:8px;letter-spacing:-.02em;line-height:1.15;margin:0}.mapa-report-group-profile__average{border:1px solid var(--mapa-report-border);border-radius:var(--mapa-report-radius);min-width:230px;padding:10px 14px}.mapa-report-group-profile__average-label{color:var(--mapa-report-muted);display:block;font-size:10px;font-weight:700;letter-spacing:.04em;text-transform:uppercase}.mapa-report-group-profile__average-value{align-items:center;display:flex;gap:10px}.mapa-report-group-profile__average-value mapa-result-track{--mapa-result-track-height: 8px;flex:1}.mapa-report-group-profile__average-value strong{font-size:20px;font-weight:500}.mapa-report-group-profile__rows{display:grid}.mapa-report-group-profile__row{align-items:center;border-top:1px solid var(--mapa-report-line-soft);display:grid;gap:16px;grid-template-columns:minmax(120px,20%) minmax(0,1fr);padding:15px 0}.mapa-report-group-profile__row-name{align-items:center;display:flex;font-size:14px;font-weight:500;gap:7px;margin:0}.mapa-report-group-profile__bar{min-width:0}.mapa-report-group-profile__values{color:var(--mapa-report-muted);display:flex;font-size:11px;gap:12px;justify-content:space-between;margin-bottom:5px}.mapa-report-group-profile__values b{color:var(--mapa-report-text);font-weight:600;text-align:right}.mapa-report-group-profile__pill{background:var(--mapa-report-surface-muted);border-radius:999px;display:flex;gap:2px;height:var(--mapa-report-pill-height);overflow:hidden;width:100%}.mapa-report-group-profile__slice{display:block;flex:0 1 auto;height:100%;min-width:8px;overflow:hidden}.mapa-report-group-profile__slice--highlighted{align-items:center;display:flex;justify-content:center}.mapa-report-group-profile__slice--highlighted:after{color:var(--mapa-report-surface);content:\"\\25bc\";font-size:9px;line-height:1}.mapa-report-group-profile__legend{display:flex;flex-wrap:wrap;gap:8px 16px;list-style:none;margin:0;padding:0}.mapa-report-group-profile__legend li{align-items:center;color:var(--mapa-report-muted);display:inline-flex;font-size:12px;gap:6px}.mapa-report-group-profile__swatch{border-radius:999px;flex:0 0 auto;height:10px;width:10px}:host ::ng-deep .mapa-report-group-profile__filters>*{min-width:0;width:100%}@media(max-width:760px){.mapa-report-group-profile__filters{grid-auto-flow:row}.mapa-report-group-profile__average{min-width:0;width:100%}.mapa-report-group-profile__row{gap:8px;grid-template-columns:minmax(0,1fr)}}\n"] }]
|
|
8566
|
+
}], propDecorators: { heading: [{ type: i0.Input, args: [{ isSignal: true, alias: "heading", required: false }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], palette: [{ type: i0.Input, args: [{ isSignal: true, alias: "palette", required: false }] }], showAverage: [{ type: i0.Input, args: [{ isSignal: true, alias: "showAverage", required: false }] }], showLegend: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLegend", required: false }] }], legend: [{ type: i0.Input, args: [{ isSignal: true, alias: "legend", required: false }] }], distributionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "distributionLabel", required: false }] }], averageLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "averageLabel", required: false }] }] } });
|
|
8567
|
+
|
|
8568
|
+
class MapaReportLegendComponent {
|
|
8569
|
+
constructor() {
|
|
8570
|
+
this.i18n = inject(MapaI18nService);
|
|
8571
|
+
this.title = input(...(ngDevMode ? [undefined, { debugName: "title" }] : []));
|
|
8572
|
+
this.intro = input(...(ngDevMode ? [undefined, { debugName: "intro" }] : []));
|
|
8573
|
+
this.groupsTitle = input(...(ngDevMode ? [undefined, { debugName: "groupsTitle" }] : []));
|
|
8574
|
+
this.groups = input([], ...(ngDevMode ? [{ debugName: "groups" }] : []));
|
|
8575
|
+
this.expanded = input(false, ...(ngDevMode ? [{ debugName: "expanded" }] : []));
|
|
8576
|
+
this.appearance = input('default', ...(ngDevMode ? [{ debugName: "appearance" }] : []));
|
|
8577
|
+
}
|
|
8578
|
+
directionArrow(direction) {
|
|
8579
|
+
return direction === 'negative' ? '↓' : '↑';
|
|
8580
|
+
}
|
|
8581
|
+
directionLabel(direction) {
|
|
8582
|
+
return direction === 'negative'
|
|
8583
|
+
? this.i18n.texts.report.negativeDirectionLabel
|
|
8584
|
+
: this.i18n.texts.report.positiveDirectionLabel;
|
|
8585
|
+
}
|
|
8586
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaReportLegendComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8587
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.21", type: MapaReportLegendComponent, isStandalone: true, selector: "mapa-report-legend", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, intro: { classPropertyName: "intro", publicName: "intro", isSignal: true, isRequired: false, transformFunction: null }, groupsTitle: { classPropertyName: "groupsTitle", publicName: "groupsTitle", isSignal: true, isRequired: false, transformFunction: null }, groups: { classPropertyName: "groups", publicName: "groups", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<details\n class=\"mapa-report-legend\"\n [class.mapa-report-legend--psychosocial]=\"appearance() === 'psychosocial'\"\n [open]=\"expanded()\"\n>\n <summary>{{ title() || i18n.texts.report.readingInformationTitle }}</summary>\n <div class=\"mapa-report-legend__content\">\n @if (intro()) {\n <p class=\"mapa-report-legend__intro\">{{ intro() }}</p>\n }\n\n @if (groupsTitle()) {\n <h3 class=\"mapa-report-legend__groups-title\">{{ groupsTitle() }}</h3>\n }\n\n @if (appearance() === \"psychosocial\") {\n <div class=\"mapa-report-legend__groups\">\n @for (group of groups(); track group.id ?? $index) {\n <section class=\"mapa-report-legend__group\">\n <div class=\"mapa-report-legend__direction\">\n <h3>\n @if (group.direction) {\n <span class=\"mapa-direction-indicator\" aria-hidden=\"true\">{{\n directionArrow(group.direction)\n }}</span>\n }\n {{ group.title || directionLabel(group.direction) }}\n </h3>\n @if (group.description) {\n <p>{{ group.description }}</p>\n }\n </div>\n <div class=\"mapa-report-legend__table\">\n <div class=\"mapa-report-legend__columns\" aria-hidden=\"true\">\n <span>{{ i18n.texts.report.classificationTitle }}</span>\n <span>{{ i18n.texts.report.interpretationTitle }}</span>\n </div>\n <ul>\n @for (item of group.items; track item.id ?? $index) {\n <li>\n <span class=\"mapa-report-legend__classification\">\n <i\n class=\"mapa-report-legend__swatch\"\n [class.mapa-report-legend__swatch--empty]=\"\n !(\n item.classification?.classificationColor ||\n item.color\n )\n \"\n [style.background-color]=\"\n item.classification?.classificationColor || item.color\n \"\n aria-hidden=\"true\"\n ></i>\n <strong>{{\n item.classification?.classificationName || item.label\n }}</strong>\n @if (item.range) {\n <small>{{ item.range }}</small>\n }\n </span>\n @if (item.description) {\n <span class=\"mapa-report-legend__item-copy\">{{\n item.description\n }}</span>\n }\n </li>\n }\n </ul>\n </div>\n </section>\n }\n </div>\n } @else {\n <div class=\"mapa-report-legend__groups\">\n @for (group of groups(); track group.id ?? $index) {\n <section class=\"mapa-report-legend__group\">\n <h3>{{ group.title || directionLabel(group.direction) }}</h3>\n @if (group.description) {\n <p class=\"mapa-report-legend__group-description\">\n {{ group.description }}\n </p>\n }\n <ul>\n @for (item of group.items; track item.id ?? $index) {\n <li>\n <mapa-classification-tag\n [classification]=\"\n item.classification || {\n classificationName: item.label,\n classificationColor: item.color,\n }\n \"\n />\n <span class=\"mapa-report-legend__item-copy\">\n @if (item.range) {\n <strong>{{ item.range }}</strong>\n }\n @if (item.description) {\n <span>{{ item.description }}</span>\n }\n </span>\n </li>\n }\n </ul>\n </section>\n }\n </div>\n }\n </div>\n</details>\n", styles: ["@charset \"UTF-8\";:host{--mapa-report-accent: #ff560b;--mapa-report-accent-soft: #fff0e9;--mapa-report-surface: #fff;--mapa-report-surface-muted: #eef2f3;--mapa-report-border: #e1e5e7;--mapa-report-text: #263238;--mapa-report-muted: #68747a;--mapa-report-pill-width: 104px;--mapa-report-radius: 8px;--mapa-report-space: 20px;color:var(--mapa-report-text);display:block;font-family:var(--mapa-font-body, \"Asap\", \"Roboto\", sans-serif)}.mapa-direction-indicator{background:var(--mapa-report-surface, var(--mapa-color-surface, #fafbfc));border:1px solid currentColor;border-radius:50%;box-sizing:border-box;color:var(--mapa-report-muted, var(--mapa-color-text-subtle, #68747a));display:inline-grid;flex:0 0 20px;font-size:11px;font-weight:700;height:20px;line-height:1;place-items:center;width:20px}.mapa-report-legend{border:1px solid var(--mapa-report-border);border-radius:var(--mapa-report-radius);overflow:clip}.mapa-report-legend summary{background:#f8f9f9;cursor:pointer;font-size:13px;font-weight:650;list-style-position:inside;padding:12px 14px}.mapa-report-legend summary:focus-visible{outline:3px solid rgba(255,86,11,.28);outline-offset:-3px}.mapa-report-legend__content{background:var(--mapa-report-surface-muted);padding:16px}.mapa-report-legend__intro{color:var(--mapa-report-muted);font-size:12px;line-height:1.55;margin:0 0 14px;max-width:72ch}.mapa-report-legend__groups-title{font-size:14px;margin:0 0 14px}.mapa-report-legend__groups{display:grid;gap:12px;grid-template-columns:repeat(2,minmax(0,1fr))}.mapa-report-legend__group{background:var(--mapa-report-surface);border:1px solid var(--mapa-report-border);border-radius:6px;padding:12px}.mapa-report-legend__group>h3{font-size:12px;margin:0 0 10px}.mapa-report-legend__group>ul{display:grid;gap:8px;list-style:none;margin:0;padding:0}.mapa-report-legend__group>ul>li{align-items:center;display:grid;gap:10px;grid-template-columns:minmax(86px,auto) 1fr}.mapa-report-legend__group-description{color:var(--mapa-report-muted);font-size:11px;line-height:1.45;margin:-4px 0 10px}.mapa-report-legend__item-copy{color:var(--mapa-report-muted);display:grid;font-size:11px;gap:2px;line-height:1.35}.mapa-report-legend__item-copy strong{color:var(--mapa-report-text)}.mapa-report-legend--psychosocial{border-radius:12px}.mapa-report-legend--psychosocial summary{align-items:center;display:flex;font-size:14px;justify-content:space-between;list-style:none;padding:16px 18px}.mapa-report-legend--psychosocial summary::-webkit-details-marker{display:none}.mapa-report-legend--psychosocial summary:after{color:#84919a;content:\"\\2304\";font-size:14px;line-height:1}.mapa-report-legend--psychosocial[open] summary:after{content:\"\\2303\"}.mapa-report-legend--psychosocial .mapa-report-legend__content{border-top:1px solid var(--mapa-report-border);padding:20px}.mapa-report-legend--psychosocial .mapa-report-legend__intro{font-size:14px;margin-bottom:18px;max-width:none}.mapa-report-legend--psychosocial .mapa-report-legend__groups{gap:20px}.mapa-report-legend--psychosocial .mapa-report-legend__group{background:transparent;border:0;border-radius:0;display:grid;gap:18px;min-width:0;padding:0}.mapa-report-legend--psychosocial .mapa-report-legend__direction{display:grid;gap:9px}.mapa-report-legend--psychosocial .mapa-report-legend__direction h3{align-items:center;display:flex;font-size:14px;gap:8px;margin:0}.mapa-report-legend--psychosocial .mapa-report-legend__direction p{color:var(--mapa-report-muted);font-size:12px;line-height:1.5;margin:0}.mapa-report-legend--psychosocial .mapa-report-legend__table{background:var(--mapa-report-surface);border:1px solid var(--mapa-report-border);border-radius:10px;overflow:hidden}.mapa-report-legend--psychosocial .mapa-report-legend__table ul{display:grid;list-style:none;margin:0;padding:0}.mapa-report-legend--psychosocial .mapa-report-legend__table li{align-items:center;display:grid;gap:12px;grid-template-columns:100px 1fr;min-height:38px;padding:8px 11px}.mapa-report-legend--psychosocial .mapa-report-legend__table li+li{border-top:1px solid var(--mapa-report-border)}.mapa-report-legend--psychosocial .mapa-report-legend__columns{background:#f3f5f6;color:#84919a;display:grid;font-size:9px;font-weight:800;gap:12px;grid-template-columns:100px 1fr;letter-spacing:.04em;padding:10px 11px 8px;text-transform:uppercase}.mapa-report-legend--psychosocial .mapa-report-legend__classification{align-items:center;display:grid;font-size:11px;gap:2px 7px;grid-template-columns:7px 1fr;min-width:0}.mapa-report-legend--psychosocial .mapa-report-legend__classification strong{color:var(--mapa-report-text)}.mapa-report-legend--psychosocial .mapa-report-legend__classification small{color:var(--mapa-report-muted);grid-column:2}.mapa-report-legend--psychosocial .mapa-report-legend__swatch{align-self:stretch;border-radius:3px;grid-row:1/span 2;min-height:22px}.mapa-report-legend--psychosocial .mapa-report-legend__swatch--empty{background:var(--mapa-report-surface);border:1px solid #cfd7dc;position:relative}.mapa-report-legend--psychosocial .mapa-report-legend__item-copy{display:block}@media(max-width:760px){.mapa-report-legend__groups{grid-template-columns:1fr}.mapa-report-legend__group>ul>li{align-items:start;grid-template-columns:1fr}.mapa-report-legend--psychosocial .mapa-report-legend__content{padding:16px}.mapa-report-legend--psychosocial .mapa-report-legend__table li{align-items:center;grid-template-columns:100px 1fr}}\n"], dependencies: [{ kind: "component", type: MapaClassificationTagComponent, selector: "mapa-classification-tag", inputs: ["classification", "size", "appearance", "shape", "casing", "fallbackLabel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
8588
|
+
}
|
|
8589
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaReportLegendComponent, decorators: [{
|
|
8590
|
+
type: Component,
|
|
8591
|
+
args: [{ selector: 'mapa-report-legend', standalone: true, imports: [MapaClassificationTagComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<details\n class=\"mapa-report-legend\"\n [class.mapa-report-legend--psychosocial]=\"appearance() === 'psychosocial'\"\n [open]=\"expanded()\"\n>\n <summary>{{ title() || i18n.texts.report.readingInformationTitle }}</summary>\n <div class=\"mapa-report-legend__content\">\n @if (intro()) {\n <p class=\"mapa-report-legend__intro\">{{ intro() }}</p>\n }\n\n @if (groupsTitle()) {\n <h3 class=\"mapa-report-legend__groups-title\">{{ groupsTitle() }}</h3>\n }\n\n @if (appearance() === \"psychosocial\") {\n <div class=\"mapa-report-legend__groups\">\n @for (group of groups(); track group.id ?? $index) {\n <section class=\"mapa-report-legend__group\">\n <div class=\"mapa-report-legend__direction\">\n <h3>\n @if (group.direction) {\n <span class=\"mapa-direction-indicator\" aria-hidden=\"true\">{{\n directionArrow(group.direction)\n }}</span>\n }\n {{ group.title || directionLabel(group.direction) }}\n </h3>\n @if (group.description) {\n <p>{{ group.description }}</p>\n }\n </div>\n <div class=\"mapa-report-legend__table\">\n <div class=\"mapa-report-legend__columns\" aria-hidden=\"true\">\n <span>{{ i18n.texts.report.classificationTitle }}</span>\n <span>{{ i18n.texts.report.interpretationTitle }}</span>\n </div>\n <ul>\n @for (item of group.items; track item.id ?? $index) {\n <li>\n <span class=\"mapa-report-legend__classification\">\n <i\n class=\"mapa-report-legend__swatch\"\n [class.mapa-report-legend__swatch--empty]=\"\n !(\n item.classification?.classificationColor ||\n item.color\n )\n \"\n [style.background-color]=\"\n item.classification?.classificationColor || item.color\n \"\n aria-hidden=\"true\"\n ></i>\n <strong>{{\n item.classification?.classificationName || item.label\n }}</strong>\n @if (item.range) {\n <small>{{ item.range }}</small>\n }\n </span>\n @if (item.description) {\n <span class=\"mapa-report-legend__item-copy\">{{\n item.description\n }}</span>\n }\n </li>\n }\n </ul>\n </div>\n </section>\n }\n </div>\n } @else {\n <div class=\"mapa-report-legend__groups\">\n @for (group of groups(); track group.id ?? $index) {\n <section class=\"mapa-report-legend__group\">\n <h3>{{ group.title || directionLabel(group.direction) }}</h3>\n @if (group.description) {\n <p class=\"mapa-report-legend__group-description\">\n {{ group.description }}\n </p>\n }\n <ul>\n @for (item of group.items; track item.id ?? $index) {\n <li>\n <mapa-classification-tag\n [classification]=\"\n item.classification || {\n classificationName: item.label,\n classificationColor: item.color,\n }\n \"\n />\n <span class=\"mapa-report-legend__item-copy\">\n @if (item.range) {\n <strong>{{ item.range }}</strong>\n }\n @if (item.description) {\n <span>{{ item.description }}</span>\n }\n </span>\n </li>\n }\n </ul>\n </section>\n }\n </div>\n }\n </div>\n</details>\n", styles: ["@charset \"UTF-8\";:host{--mapa-report-accent: #ff560b;--mapa-report-accent-soft: #fff0e9;--mapa-report-surface: #fff;--mapa-report-surface-muted: #eef2f3;--mapa-report-border: #e1e5e7;--mapa-report-text: #263238;--mapa-report-muted: #68747a;--mapa-report-pill-width: 104px;--mapa-report-radius: 8px;--mapa-report-space: 20px;color:var(--mapa-report-text);display:block;font-family:var(--mapa-font-body, \"Asap\", \"Roboto\", sans-serif)}.mapa-direction-indicator{background:var(--mapa-report-surface, var(--mapa-color-surface, #fafbfc));border:1px solid currentColor;border-radius:50%;box-sizing:border-box;color:var(--mapa-report-muted, var(--mapa-color-text-subtle, #68747a));display:inline-grid;flex:0 0 20px;font-size:11px;font-weight:700;height:20px;line-height:1;place-items:center;width:20px}.mapa-report-legend{border:1px solid var(--mapa-report-border);border-radius:var(--mapa-report-radius);overflow:clip}.mapa-report-legend summary{background:#f8f9f9;cursor:pointer;font-size:13px;font-weight:650;list-style-position:inside;padding:12px 14px}.mapa-report-legend summary:focus-visible{outline:3px solid rgba(255,86,11,.28);outline-offset:-3px}.mapa-report-legend__content{background:var(--mapa-report-surface-muted);padding:16px}.mapa-report-legend__intro{color:var(--mapa-report-muted);font-size:12px;line-height:1.55;margin:0 0 14px;max-width:72ch}.mapa-report-legend__groups-title{font-size:14px;margin:0 0 14px}.mapa-report-legend__groups{display:grid;gap:12px;grid-template-columns:repeat(2,minmax(0,1fr))}.mapa-report-legend__group{background:var(--mapa-report-surface);border:1px solid var(--mapa-report-border);border-radius:6px;padding:12px}.mapa-report-legend__group>h3{font-size:12px;margin:0 0 10px}.mapa-report-legend__group>ul{display:grid;gap:8px;list-style:none;margin:0;padding:0}.mapa-report-legend__group>ul>li{align-items:center;display:grid;gap:10px;grid-template-columns:minmax(86px,auto) 1fr}.mapa-report-legend__group-description{color:var(--mapa-report-muted);font-size:11px;line-height:1.45;margin:-4px 0 10px}.mapa-report-legend__item-copy{color:var(--mapa-report-muted);display:grid;font-size:11px;gap:2px;line-height:1.35}.mapa-report-legend__item-copy strong{color:var(--mapa-report-text)}.mapa-report-legend--psychosocial{border-radius:12px}.mapa-report-legend--psychosocial summary{align-items:center;display:flex;font-size:14px;justify-content:space-between;list-style:none;padding:16px 18px}.mapa-report-legend--psychosocial summary::-webkit-details-marker{display:none}.mapa-report-legend--psychosocial summary:after{color:#84919a;content:\"\\2304\";font-size:14px;line-height:1}.mapa-report-legend--psychosocial[open] summary:after{content:\"\\2303\"}.mapa-report-legend--psychosocial .mapa-report-legend__content{border-top:1px solid var(--mapa-report-border);padding:20px}.mapa-report-legend--psychosocial .mapa-report-legend__intro{font-size:14px;margin-bottom:18px;max-width:none}.mapa-report-legend--psychosocial .mapa-report-legend__groups{gap:20px}.mapa-report-legend--psychosocial .mapa-report-legend__group{background:transparent;border:0;border-radius:0;display:grid;gap:18px;min-width:0;padding:0}.mapa-report-legend--psychosocial .mapa-report-legend__direction{display:grid;gap:9px}.mapa-report-legend--psychosocial .mapa-report-legend__direction h3{align-items:center;display:flex;font-size:14px;gap:8px;margin:0}.mapa-report-legend--psychosocial .mapa-report-legend__direction p{color:var(--mapa-report-muted);font-size:12px;line-height:1.5;margin:0}.mapa-report-legend--psychosocial .mapa-report-legend__table{background:var(--mapa-report-surface);border:1px solid var(--mapa-report-border);border-radius:10px;overflow:hidden}.mapa-report-legend--psychosocial .mapa-report-legend__table ul{display:grid;list-style:none;margin:0;padding:0}.mapa-report-legend--psychosocial .mapa-report-legend__table li{align-items:center;display:grid;gap:12px;grid-template-columns:100px 1fr;min-height:38px;padding:8px 11px}.mapa-report-legend--psychosocial .mapa-report-legend__table li+li{border-top:1px solid var(--mapa-report-border)}.mapa-report-legend--psychosocial .mapa-report-legend__columns{background:#f3f5f6;color:#84919a;display:grid;font-size:9px;font-weight:800;gap:12px;grid-template-columns:100px 1fr;letter-spacing:.04em;padding:10px 11px 8px;text-transform:uppercase}.mapa-report-legend--psychosocial .mapa-report-legend__classification{align-items:center;display:grid;font-size:11px;gap:2px 7px;grid-template-columns:7px 1fr;min-width:0}.mapa-report-legend--psychosocial .mapa-report-legend__classification strong{color:var(--mapa-report-text)}.mapa-report-legend--psychosocial .mapa-report-legend__classification small{color:var(--mapa-report-muted);grid-column:2}.mapa-report-legend--psychosocial .mapa-report-legend__swatch{align-self:stretch;border-radius:3px;grid-row:1/span 2;min-height:22px}.mapa-report-legend--psychosocial .mapa-report-legend__swatch--empty{background:var(--mapa-report-surface);border:1px solid #cfd7dc;position:relative}.mapa-report-legend--psychosocial .mapa-report-legend__item-copy{display:block}@media(max-width:760px){.mapa-report-legend__groups{grid-template-columns:1fr}.mapa-report-legend__group>ul>li{align-items:start;grid-template-columns:1fr}.mapa-report-legend--psychosocial .mapa-report-legend__content{padding:16px}.mapa-report-legend--psychosocial .mapa-report-legend__table li{align-items:center;grid-template-columns:100px 1fr}}\n"] }]
|
|
8592
|
+
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], intro: [{ type: i0.Input, args: [{ isSignal: true, alias: "intro", required: false }] }], groupsTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupsTitle", required: false }] }], groups: [{ type: i0.Input, args: [{ isSignal: true, alias: "groups", required: false }] }], expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }] } });
|
|
8593
|
+
|
|
8594
|
+
class MapaReportIndicatorsWidgetComponent {
|
|
8595
|
+
constructor() {
|
|
8596
|
+
this.i18n = inject(MapaI18nService);
|
|
8597
|
+
this.heading = input.required(...(ngDevMode ? [{ debugName: "heading" }] : []));
|
|
8598
|
+
this.groups = input([], ...(ngDevMode ? [{ debugName: "groups" }] : []));
|
|
8599
|
+
this.legendGroups = input([], ...(ngDevMode ? [{ debugName: "legendGroups" }] : []));
|
|
8600
|
+
this.legendTitle = input(...(ngDevMode ? [undefined, { debugName: "legendTitle" }] : []));
|
|
8601
|
+
this.legendIntro = input(...(ngDevMode ? [undefined, { debugName: "legendIntro" }] : []));
|
|
8602
|
+
this.legendExpanded = input(false, ...(ngDevMode ? [{ debugName: "legendExpanded" }] : []));
|
|
8603
|
+
/** Overrides the detailed toggle label; defaults to the i18n text. */
|
|
8604
|
+
this.detailedViewLabel = input(...(ngDevMode ? [undefined, { debugName: "detailedViewLabel" }] : []));
|
|
8605
|
+
/** Overrides the narrow-screen detailed toggle label. */
|
|
8606
|
+
this.compactDetailedViewLabel = input(...(ngDevMode ? [undefined, { debugName: "compactDetailedViewLabel" }] : []));
|
|
8607
|
+
this.palette = input('current', ...(ngDevMode ? [{ debugName: "palette" }] : []));
|
|
8608
|
+
this.mode = model('list', ...(ngDevMode ? [{ debugName: "mode" }] : []));
|
|
8609
|
+
this.detailedViewCaption = computed(() => this.detailedViewLabel() ?? this.i18n.texts.report.detailedListLabel, ...(ngDevMode ? [{ debugName: "detailedViewCaption" }] : []));
|
|
8610
|
+
this.compactDetailedViewCaption = computed(() => this.compactDetailedViewLabel() ?? this.i18n.texts.report.detailed, ...(ngDevMode ? [{ debugName: "compactDetailedViewCaption" }] : []));
|
|
8611
|
+
this.indicators = computed(() => this.groups().flatMap((group) => group.indicators), ...(ngDevMode ? [{ debugName: "indicators" }] : []));
|
|
8612
|
+
this.indicatorColumns = computed(() => {
|
|
8613
|
+
const columns = [[], [], []];
|
|
8614
|
+
this.groups().forEach((group) => {
|
|
8615
|
+
columns[indicatorColumn(group) - 1].push(group);
|
|
8616
|
+
});
|
|
8617
|
+
return columns.filter((column) => column.length > 0);
|
|
8618
|
+
}, ...(ngDevMode ? [{ debugName: "indicatorColumns" }] : []));
|
|
8619
|
+
}
|
|
8620
|
+
color(indicator) {
|
|
8621
|
+
return (indicator.classification?.classificationColor ??
|
|
8622
|
+
(indicator.direction === 'negative' ? '#e84d68' : '#2c93dc'));
|
|
8623
|
+
}
|
|
8624
|
+
value(indicator) {
|
|
8625
|
+
const value = indicator.value ?? 0;
|
|
8626
|
+
return Number.isFinite(value)
|
|
8627
|
+
? Math.min(100, Math.max(0, Math.round(value)))
|
|
8628
|
+
: 0;
|
|
8629
|
+
}
|
|
8630
|
+
foreground(indicator) {
|
|
8631
|
+
const match = this.color(indicator)
|
|
8632
|
+
.trim()
|
|
8633
|
+
.match(/^#([\da-f]{3}|[\da-f]{6})$/i);
|
|
8634
|
+
if (!match)
|
|
8635
|
+
return '#1d3140';
|
|
8636
|
+
const raw = match[1].length === 3
|
|
8637
|
+
? match[1]
|
|
8638
|
+
.split('')
|
|
8639
|
+
.map((part) => part + part)
|
|
8640
|
+
.join('')
|
|
8641
|
+
: match[1];
|
|
8642
|
+
const [red, green, blue] = [0, 2, 4].map((index) => Number.parseInt(raw.slice(index, index + 2), 16));
|
|
8643
|
+
const luminance = (red * 299 + green * 587 + blue * 114) / 255000;
|
|
8644
|
+
return luminance > 0.64 ? '#1d3140' : '#fffaf7';
|
|
8645
|
+
}
|
|
8646
|
+
directionArrow(indicator) {
|
|
8647
|
+
return indicator.direction === 'negative' ? '↓' : '↑';
|
|
8648
|
+
}
|
|
8649
|
+
directionLabel(indicator) {
|
|
8650
|
+
return indicator.direction === 'negative'
|
|
8651
|
+
? this.i18n.texts.report.negativeDirectionLabel
|
|
8652
|
+
: this.i18n.texts.report.positiveDirectionLabel;
|
|
8653
|
+
}
|
|
8654
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaReportIndicatorsWidgetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8655
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.21", type: MapaReportIndicatorsWidgetComponent, isStandalone: true, selector: "mapa-report-indicators-widget", inputs: { heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: true, transformFunction: null }, groups: { classPropertyName: "groups", publicName: "groups", isSignal: true, isRequired: false, transformFunction: null }, legendGroups: { classPropertyName: "legendGroups", publicName: "legendGroups", isSignal: true, isRequired: false, transformFunction: null }, legendTitle: { classPropertyName: "legendTitle", publicName: "legendTitle", isSignal: true, isRequired: false, transformFunction: null }, legendIntro: { classPropertyName: "legendIntro", publicName: "legendIntro", isSignal: true, isRequired: false, transformFunction: null }, legendExpanded: { classPropertyName: "legendExpanded", publicName: "legendExpanded", isSignal: true, isRequired: false, transformFunction: null }, detailedViewLabel: { classPropertyName: "detailedViewLabel", publicName: "detailedViewLabel", isSignal: true, isRequired: false, transformFunction: null }, compactDetailedViewLabel: { classPropertyName: "compactDetailedViewLabel", publicName: "compactDetailedViewLabel", isSignal: true, isRequired: false, transformFunction: null }, palette: { classPropertyName: "palette", publicName: "palette", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { mode: "modeChange" }, ngImport: i0, template: "<section class=\"mapa-report-widget\" [attr.data-palette]=\"palette()\">\n <header class=\"mapa-report-widget__header\">\n <div class=\"mapa-report-widget__heading\">\n <h2>{{ heading().title }}</h2>\n @if (heading().description) {\n <p>{{ heading().description }}</p>\n }\n </div>\n <mat-button-toggle-group\n class=\"mapa-report-widget__modes\"\n hideSingleSelectionIndicator\n [attr.aria-label]=\"i18n.texts.report.viewModeLabel\"\n [value]=\"mode()\"\n (change)=\"mode.set($event.value)\"\n >\n <mat-button-toggle value=\"list\">\n <span class=\"mapa-report-indicator__mode-icon\" aria-hidden=\"true\"\n >\u25A5</span\n >\n {{ i18n.texts.report.list }}\n </mat-button-toggle>\n <mat-button-toggle value=\"chart\">\n <span class=\"mapa-report-indicator__mode-icon\" aria-hidden=\"true\"\n >\u25A6</span\n >\n {{ i18n.texts.report.chart }}\n </mat-button-toggle>\n <mat-button-toggle value=\"detailed\">\n <span class=\"mapa-report-indicator__mode-icon\" aria-hidden=\"true\"\n >\u25A4</span\n >\n <span\n class=\"mapa-report-indicator__mode-label mapa-report-indicator__mode-label--full\"\n >{{ detailedViewCaption() }}</span\n >\n <span\n class=\"mapa-report-indicator__mode-label mapa-report-indicator__mode-label--compact\"\n >{{ compactDetailedViewCaption() }}</span\n >\n </mat-button-toggle>\n </mat-button-toggle-group>\n </header>\n\n @if (legendGroups().length || legendIntro()) {\n <mapa-report-legend\n appearance=\"psychosocial\"\n [expanded]=\"legendExpanded()\"\n [groups]=\"legendGroups()\"\n [intro]=\"legendIntro()\"\n [title]=\"legendTitle()\"\n />\n }\n\n @if (!indicators().length) {\n <p class=\"mapa-report-widget__empty\">{{ i18n.texts.report.emptyState }}</p>\n } @else if (mode() === \"list\") {\n <div\n class=\"mapa-report-indicators mapa-report-indicators--list\"\n [class.mapa-report-indicators--single-column]=\"\n indicatorColumns().length === 1\n \"\n [class.mapa-report-indicators--two-columns]=\"\n indicatorColumns().length === 2\n \"\n >\n @for (column of indicatorColumns(); track $index) {\n <div class=\"mapa-report-indicators__column\">\n @for (group of column; track group.id) {\n <section\n class=\"mapa-report-indicator-group mapa-report-indicator-group--list\"\n >\n <h3>{{ group.name }}</h3>\n <div class=\"mapa-report-indicator-group__list\">\n @for (indicator of group.indicators; track indicator.id) {\n <article\n class=\"mapa-report-indicator mapa-report-indicator--list\"\n [style.--mapa-indicator-background]=\"color(indicator)\"\n [style.--mapa-indicator-foreground]=\"foreground(indicator)\"\n >\n <span\n class=\"mapa-direction-indicator\"\n [attr.aria-label]=\"directionLabel(indicator)\"\n >{{ directionArrow(indicator) }}</span\n >\n <h4>{{ indicator.name }}</h4>\n <strong>{{ value(indicator) }}%</strong>\n </article>\n }\n </div>\n </section>\n }\n </div>\n }\n </div>\n } @else {\n <div class=\"mapa-report-indicators mapa-report-indicators--rows\">\n @for (group of groups(); track group.id) {\n <section\n class=\"mapa-report-indicator-group mapa-report-indicator-group--rows\"\n >\n <h3>{{ group.name }}</h3>\n <div class=\"mapa-report-indicator-group__rows\">\n @for (indicator of group.indicators; track indicator.id) {\n <article class=\"mapa-report-indicator mapa-report-indicator--row\">\n <div class=\"mapa-report-indicator__graph\">\n <div class=\"mapa-report-indicator__name\">\n <span\n class=\"mapa-direction-indicator\"\n [attr.aria-label]=\"directionLabel(indicator)\"\n >{{ directionArrow(indicator) }}</span\n >\n <h4>{{ indicator.name }}</h4>\n </div>\n <mapa-classification-tag\n appearance=\"solid\"\n [classification]=\"indicator.classification\"\n />\n <mapa-result-track\n appearance=\"segmented\"\n mode=\"linear\"\n [color]=\"color(indicator)\"\n [name]=\"indicator.name\"\n [value]=\"value(indicator)\"\n />\n <strong class=\"mapa-report-indicator__percent\"\n >{{ value(indicator) }}%</strong\n >\n </div>\n\n @if (mode() === \"detailed\" && indicator.concept) {\n <div class=\"mapa-report-indicator__detail\">\n <strong>{{ i18n.texts.report.conceptTitle }}:</strong>\n <div [innerHTML]=\"indicator.concept | safeHtml\"></div>\n </div>\n }\n @if (mode() === \"detailed\" && indicator.description) {\n <div class=\"mapa-report-indicator__detail\">\n <strong>{{ i18n.texts.report.resultTitle }}:</strong>\n <div [innerHTML]=\"indicator.description | safeHtml\"></div>\n </div>\n }\n </article>\n }\n </div>\n </section>\n }\n </div>\n }\n</section>\n", styles: [":host{--mapa-report-accent: #ff560b;--mapa-report-accent-soft: #fff0e9;--mapa-report-surface: #fff;--mapa-report-surface-muted: #eef2f3;--mapa-report-border: #e1e5e7;--mapa-report-text: #263238;--mapa-report-muted: #68747a;--mapa-report-pill-width: 104px;--mapa-report-radius: 8px;--mapa-report-space: 20px;color:var(--mapa-report-text);display:block;font-family:var(--mapa-font-body, \"Asap\", \"Roboto\", sans-serif)}.mapa-report-widget{display:grid;gap:var(--mapa-report-space)}.mapa-report-widget__header{align-items:flex-start;display:flex;gap:16px;justify-content:space-between}.mapa-report-widget__heading{max-width:72ch}.mapa-report-widget__heading h2{color:var(--mapa-report-accent);font-size:20px;font-weight:650;line-height:1.25;margin:0}.mapa-report-widget__heading p{color:var(--mapa-report-muted);font-size:13px;line-height:1.5;margin:5px 0 0}.mapa-report-widget__modes{--mat-button-toggle-background-color: var(--mapa-report-surface);--mat-button-toggle-divider-color: #cbd5da;--mat-button-toggle-height: 32px;--mat-button-toggle-label-text-font: var( --mapa-font-body, \"Asap\", sans-serif );--mat-button-toggle-label-text-size: 13px;--mat-button-toggle-label-text-weight: 500;--mat-button-toggle-selected-state-background-color: #59636a;--mat-button-toggle-selected-state-text-color: #fffaf7;--mat-button-toggle-shape: 4px;--mat-button-toggle-text-color: #344b5e;border:1px solid #cbd5da;border-radius:4px;flex:0 0 auto;overflow:hidden}.mapa-report-widget__modes mat-button-toggle{font:500 13px/1 var(--mapa-font-body, \"Asap\", sans-serif)}.mapa-report-widget__modes mat-icon{font-size:14px;height:14px;margin-right:5px;width:14px}.mapa-report-widget__empty{color:var(--mapa-report-muted);margin:0;padding:24px 0;text-align:center}@media(max-width:760px){.mapa-report-widget__header{align-items:stretch;flex-direction:column}.mapa-report-widget__modes{align-self:flex-start}}.mapa-direction-indicator{background:var(--mapa-report-surface, var(--mapa-color-surface, #fafbfc));border:1px solid currentColor;border-radius:50%;box-sizing:border-box;color:var(--mapa-report-muted, var(--mapa-color-text-subtle, #68747a));display:inline-grid;flex:0 0 20px;font-size:11px;font-weight:700;height:20px;line-height:1;place-items:center;width:20px}.mapa-report-indicators{display:grid;gap:20px}.mapa-report-indicators--list{align-items:start;grid-template-columns:repeat(3,minmax(0,1fr))}.mapa-report-indicators--single-column{grid-template-columns:1fr}.mapa-report-indicators--two-columns{grid-template-columns:repeat(2,minmax(0,1fr))}.mapa-report-indicators--rows{padding-top:2px}.mapa-report-indicators__column{display:grid;gap:23px;min-width:0}.mapa-report-indicator-group{min-width:0}.mapa-report-indicator-group>h3{color:var(--mapa-report-text);font-size:15px;font-weight:600;line-height:1.3;margin:0 0 11px}.mapa-report-indicator-group__list{display:grid;gap:8px}.mapa-report-indicator-group__rows{background:var(--mapa-report-surface);border:1px solid var(--mapa-report-border);border-radius:12px;overflow:hidden}.mapa-report-indicator{min-width:0}.mapa-report-indicator--list{align-items:center;background:var(--mapa-indicator-background);border:1px solid rgba(26,26,26,.08);border-radius:9px;color:var(--mapa-indicator-foreground);display:grid;gap:9px;grid-template-columns:20px minmax(0,1fr) auto;min-height:38px;padding:5px 10px 5px 9px}.mapa-report-indicator--list h4{font-size:12px;font-weight:400;line-height:1.25;margin:0;overflow-wrap:anywhere}.mapa-report-indicator--list>strong{align-items:center;background:#fff;border:1px solid rgba(99,114,124,.16);border-radius:999px;color:#1f3850;display:inline-flex;font-size:10px;font-weight:600;height:25px;justify-content:center;min-width:38px;padding:0 6px}.mapa-report-indicator--row{padding:13px 13px 14px}.mapa-report-indicator--row+.mapa-report-indicator--row{border-top:1px solid var(--mapa-report-border)}.mapa-report-indicator__graph{align-items:center;display:grid;gap:14px;grid-template-columns:minmax(0,250px) var(--mapa-report-pill-width) minmax(0,1fr) 42px}.mapa-report-indicator__name{align-items:center;color:var(--mapa-report-text);display:flex;gap:7px;min-width:0}.mapa-report-indicator__name h4{font-size:12px;font-weight:400;line-height:1.25;margin:0;overflow-wrap:anywhere}.mapa-report-indicator__graph mapa-classification-tag{--mapa-classification-tag-min-width: var(--mapa-report-pill-width);justify-self:start;max-width:var(--mapa-report-pill-width)}.mapa-report-indicator__percent{color:#1f3850;font-size:12px;font-weight:400;text-align:right}.mapa-report-indicator__mode-label--compact{display:none}.mapa-report-indicator__detail{border-top:1px solid var(--mapa-report-border);color:var(--mapa-report-muted);display:flex;font-size:11px;gap:4px;line-height:1.45;margin-top:11px;padding-top:10px}.mapa-report-indicator__detail>strong{color:var(--mapa-report-text);flex:0 0 auto;font-weight:600}.mapa-report-indicator__detail div{min-width:0}.mapa-report-indicator__detail :last-child{margin-bottom:0}@media(max-width:760px){.mapa-report-indicator__graph{gap:8px;grid-template-columns:minmax(0,1fr) var(--mapa-report-pill-width) 40px}.mapa-report-indicator__graph mapa-result-track{grid-column:1/-1;grid-row:2;margin-top:3px}}@media(max-width:560px){.mapa-report-widget__modes{--mat-button-toggle-label-text-size: 11px;align-self:stretch;display:flex}.mapa-report-widget__modes mat-button-toggle{flex:1 1 0;font:500 10px/1 var(--mapa-font-body, \"Asap\", sans-serif);min-width:0}.mapa-report-indicator__mode-icon,.mapa-report-indicator__mode-label--full{display:none}.mapa-report-indicator__mode-label--compact{display:inline}.mapa-report-indicators--list:not(.mapa-report-indicators--single-column){grid-template-columns:1fr}.mapa-report-indicator--list{min-height:36px}.mapa-report-indicator--row{padding:12px}.mapa-report-indicator__detail{display:block}.mapa-report-indicator__detail>strong{display:block;margin-bottom:3px}}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonToggleModule }, { kind: "directive", type: i1$6.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled", "disabledInteractive", "hideSingleSelectionIndicator", "hideMultipleSelectionIndicator"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i1$6.MatButtonToggle, selector: "mat-button-toggle", inputs: ["aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "disableRipple", "appearance", "checked", "disabled", "disabledInteractive"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "component", type: MapaClassificationTagComponent, selector: "mapa-classification-tag", inputs: ["classification", "size", "appearance", "shape", "casing", "fallbackLabel"] }, { kind: "component", type: MapaReportLegendComponent, selector: "mapa-report-legend", inputs: ["title", "intro", "groupsTitle", "groups", "expanded", "appearance"] }, { kind: "component", type: MapaResultTrackComponent, selector: "mapa-result-track", inputs: ["name", "value", "color", "mode", "appearance", "direction", "showValue", "ariaLabel"] }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
8656
|
+
}
|
|
8657
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaReportIndicatorsWidgetComponent, decorators: [{
|
|
8658
|
+
type: Component,
|
|
8659
|
+
args: [{ selector: 'mapa-report-indicators-widget', standalone: true, imports: [
|
|
8660
|
+
MatButtonToggleModule,
|
|
8661
|
+
MapaClassificationTagComponent,
|
|
8662
|
+
MapaReportLegendComponent,
|
|
8663
|
+
MapaResultTrackComponent,
|
|
8664
|
+
SafeHtmlPipe,
|
|
8665
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<section class=\"mapa-report-widget\" [attr.data-palette]=\"palette()\">\n <header class=\"mapa-report-widget__header\">\n <div class=\"mapa-report-widget__heading\">\n <h2>{{ heading().title }}</h2>\n @if (heading().description) {\n <p>{{ heading().description }}</p>\n }\n </div>\n <mat-button-toggle-group\n class=\"mapa-report-widget__modes\"\n hideSingleSelectionIndicator\n [attr.aria-label]=\"i18n.texts.report.viewModeLabel\"\n [value]=\"mode()\"\n (change)=\"mode.set($event.value)\"\n >\n <mat-button-toggle value=\"list\">\n <span class=\"mapa-report-indicator__mode-icon\" aria-hidden=\"true\"\n >\u25A5</span\n >\n {{ i18n.texts.report.list }}\n </mat-button-toggle>\n <mat-button-toggle value=\"chart\">\n <span class=\"mapa-report-indicator__mode-icon\" aria-hidden=\"true\"\n >\u25A6</span\n >\n {{ i18n.texts.report.chart }}\n </mat-button-toggle>\n <mat-button-toggle value=\"detailed\">\n <span class=\"mapa-report-indicator__mode-icon\" aria-hidden=\"true\"\n >\u25A4</span\n >\n <span\n class=\"mapa-report-indicator__mode-label mapa-report-indicator__mode-label--full\"\n >{{ detailedViewCaption() }}</span\n >\n <span\n class=\"mapa-report-indicator__mode-label mapa-report-indicator__mode-label--compact\"\n >{{ compactDetailedViewCaption() }}</span\n >\n </mat-button-toggle>\n </mat-button-toggle-group>\n </header>\n\n @if (legendGroups().length || legendIntro()) {\n <mapa-report-legend\n appearance=\"psychosocial\"\n [expanded]=\"legendExpanded()\"\n [groups]=\"legendGroups()\"\n [intro]=\"legendIntro()\"\n [title]=\"legendTitle()\"\n />\n }\n\n @if (!indicators().length) {\n <p class=\"mapa-report-widget__empty\">{{ i18n.texts.report.emptyState }}</p>\n } @else if (mode() === \"list\") {\n <div\n class=\"mapa-report-indicators mapa-report-indicators--list\"\n [class.mapa-report-indicators--single-column]=\"\n indicatorColumns().length === 1\n \"\n [class.mapa-report-indicators--two-columns]=\"\n indicatorColumns().length === 2\n \"\n >\n @for (column of indicatorColumns(); track $index) {\n <div class=\"mapa-report-indicators__column\">\n @for (group of column; track group.id) {\n <section\n class=\"mapa-report-indicator-group mapa-report-indicator-group--list\"\n >\n <h3>{{ group.name }}</h3>\n <div class=\"mapa-report-indicator-group__list\">\n @for (indicator of group.indicators; track indicator.id) {\n <article\n class=\"mapa-report-indicator mapa-report-indicator--list\"\n [style.--mapa-indicator-background]=\"color(indicator)\"\n [style.--mapa-indicator-foreground]=\"foreground(indicator)\"\n >\n <span\n class=\"mapa-direction-indicator\"\n [attr.aria-label]=\"directionLabel(indicator)\"\n >{{ directionArrow(indicator) }}</span\n >\n <h4>{{ indicator.name }}</h4>\n <strong>{{ value(indicator) }}%</strong>\n </article>\n }\n </div>\n </section>\n }\n </div>\n }\n </div>\n } @else {\n <div class=\"mapa-report-indicators mapa-report-indicators--rows\">\n @for (group of groups(); track group.id) {\n <section\n class=\"mapa-report-indicator-group mapa-report-indicator-group--rows\"\n >\n <h3>{{ group.name }}</h3>\n <div class=\"mapa-report-indicator-group__rows\">\n @for (indicator of group.indicators; track indicator.id) {\n <article class=\"mapa-report-indicator mapa-report-indicator--row\">\n <div class=\"mapa-report-indicator__graph\">\n <div class=\"mapa-report-indicator__name\">\n <span\n class=\"mapa-direction-indicator\"\n [attr.aria-label]=\"directionLabel(indicator)\"\n >{{ directionArrow(indicator) }}</span\n >\n <h4>{{ indicator.name }}</h4>\n </div>\n <mapa-classification-tag\n appearance=\"solid\"\n [classification]=\"indicator.classification\"\n />\n <mapa-result-track\n appearance=\"segmented\"\n mode=\"linear\"\n [color]=\"color(indicator)\"\n [name]=\"indicator.name\"\n [value]=\"value(indicator)\"\n />\n <strong class=\"mapa-report-indicator__percent\"\n >{{ value(indicator) }}%</strong\n >\n </div>\n\n @if (mode() === \"detailed\" && indicator.concept) {\n <div class=\"mapa-report-indicator__detail\">\n <strong>{{ i18n.texts.report.conceptTitle }}:</strong>\n <div [innerHTML]=\"indicator.concept | safeHtml\"></div>\n </div>\n }\n @if (mode() === \"detailed\" && indicator.description) {\n <div class=\"mapa-report-indicator__detail\">\n <strong>{{ i18n.texts.report.resultTitle }}:</strong>\n <div [innerHTML]=\"indicator.description | safeHtml\"></div>\n </div>\n }\n </article>\n }\n </div>\n </section>\n }\n </div>\n }\n</section>\n", styles: [":host{--mapa-report-accent: #ff560b;--mapa-report-accent-soft: #fff0e9;--mapa-report-surface: #fff;--mapa-report-surface-muted: #eef2f3;--mapa-report-border: #e1e5e7;--mapa-report-text: #263238;--mapa-report-muted: #68747a;--mapa-report-pill-width: 104px;--mapa-report-radius: 8px;--mapa-report-space: 20px;color:var(--mapa-report-text);display:block;font-family:var(--mapa-font-body, \"Asap\", \"Roboto\", sans-serif)}.mapa-report-widget{display:grid;gap:var(--mapa-report-space)}.mapa-report-widget__header{align-items:flex-start;display:flex;gap:16px;justify-content:space-between}.mapa-report-widget__heading{max-width:72ch}.mapa-report-widget__heading h2{color:var(--mapa-report-accent);font-size:20px;font-weight:650;line-height:1.25;margin:0}.mapa-report-widget__heading p{color:var(--mapa-report-muted);font-size:13px;line-height:1.5;margin:5px 0 0}.mapa-report-widget__modes{--mat-button-toggle-background-color: var(--mapa-report-surface);--mat-button-toggle-divider-color: #cbd5da;--mat-button-toggle-height: 32px;--mat-button-toggle-label-text-font: var( --mapa-font-body, \"Asap\", sans-serif );--mat-button-toggle-label-text-size: 13px;--mat-button-toggle-label-text-weight: 500;--mat-button-toggle-selected-state-background-color: #59636a;--mat-button-toggle-selected-state-text-color: #fffaf7;--mat-button-toggle-shape: 4px;--mat-button-toggle-text-color: #344b5e;border:1px solid #cbd5da;border-radius:4px;flex:0 0 auto;overflow:hidden}.mapa-report-widget__modes mat-button-toggle{font:500 13px/1 var(--mapa-font-body, \"Asap\", sans-serif)}.mapa-report-widget__modes mat-icon{font-size:14px;height:14px;margin-right:5px;width:14px}.mapa-report-widget__empty{color:var(--mapa-report-muted);margin:0;padding:24px 0;text-align:center}@media(max-width:760px){.mapa-report-widget__header{align-items:stretch;flex-direction:column}.mapa-report-widget__modes{align-self:flex-start}}.mapa-direction-indicator{background:var(--mapa-report-surface, var(--mapa-color-surface, #fafbfc));border:1px solid currentColor;border-radius:50%;box-sizing:border-box;color:var(--mapa-report-muted, var(--mapa-color-text-subtle, #68747a));display:inline-grid;flex:0 0 20px;font-size:11px;font-weight:700;height:20px;line-height:1;place-items:center;width:20px}.mapa-report-indicators{display:grid;gap:20px}.mapa-report-indicators--list{align-items:start;grid-template-columns:repeat(3,minmax(0,1fr))}.mapa-report-indicators--single-column{grid-template-columns:1fr}.mapa-report-indicators--two-columns{grid-template-columns:repeat(2,minmax(0,1fr))}.mapa-report-indicators--rows{padding-top:2px}.mapa-report-indicators__column{display:grid;gap:23px;min-width:0}.mapa-report-indicator-group{min-width:0}.mapa-report-indicator-group>h3{color:var(--mapa-report-text);font-size:15px;font-weight:600;line-height:1.3;margin:0 0 11px}.mapa-report-indicator-group__list{display:grid;gap:8px}.mapa-report-indicator-group__rows{background:var(--mapa-report-surface);border:1px solid var(--mapa-report-border);border-radius:12px;overflow:hidden}.mapa-report-indicator{min-width:0}.mapa-report-indicator--list{align-items:center;background:var(--mapa-indicator-background);border:1px solid rgba(26,26,26,.08);border-radius:9px;color:var(--mapa-indicator-foreground);display:grid;gap:9px;grid-template-columns:20px minmax(0,1fr) auto;min-height:38px;padding:5px 10px 5px 9px}.mapa-report-indicator--list h4{font-size:12px;font-weight:400;line-height:1.25;margin:0;overflow-wrap:anywhere}.mapa-report-indicator--list>strong{align-items:center;background:#fff;border:1px solid rgba(99,114,124,.16);border-radius:999px;color:#1f3850;display:inline-flex;font-size:10px;font-weight:600;height:25px;justify-content:center;min-width:38px;padding:0 6px}.mapa-report-indicator--row{padding:13px 13px 14px}.mapa-report-indicator--row+.mapa-report-indicator--row{border-top:1px solid var(--mapa-report-border)}.mapa-report-indicator__graph{align-items:center;display:grid;gap:14px;grid-template-columns:minmax(0,250px) var(--mapa-report-pill-width) minmax(0,1fr) 42px}.mapa-report-indicator__name{align-items:center;color:var(--mapa-report-text);display:flex;gap:7px;min-width:0}.mapa-report-indicator__name h4{font-size:12px;font-weight:400;line-height:1.25;margin:0;overflow-wrap:anywhere}.mapa-report-indicator__graph mapa-classification-tag{--mapa-classification-tag-min-width: var(--mapa-report-pill-width);justify-self:start;max-width:var(--mapa-report-pill-width)}.mapa-report-indicator__percent{color:#1f3850;font-size:12px;font-weight:400;text-align:right}.mapa-report-indicator__mode-label--compact{display:none}.mapa-report-indicator__detail{border-top:1px solid var(--mapa-report-border);color:var(--mapa-report-muted);display:flex;font-size:11px;gap:4px;line-height:1.45;margin-top:11px;padding-top:10px}.mapa-report-indicator__detail>strong{color:var(--mapa-report-text);flex:0 0 auto;font-weight:600}.mapa-report-indicator__detail div{min-width:0}.mapa-report-indicator__detail :last-child{margin-bottom:0}@media(max-width:760px){.mapa-report-indicator__graph{gap:8px;grid-template-columns:minmax(0,1fr) var(--mapa-report-pill-width) 40px}.mapa-report-indicator__graph mapa-result-track{grid-column:1/-1;grid-row:2;margin-top:3px}}@media(max-width:560px){.mapa-report-widget__modes{--mat-button-toggle-label-text-size: 11px;align-self:stretch;display:flex}.mapa-report-widget__modes mat-button-toggle{flex:1 1 0;font:500 10px/1 var(--mapa-font-body, \"Asap\", sans-serif);min-width:0}.mapa-report-indicator__mode-icon,.mapa-report-indicator__mode-label--full{display:none}.mapa-report-indicator__mode-label--compact{display:inline}.mapa-report-indicators--list:not(.mapa-report-indicators--single-column){grid-template-columns:1fr}.mapa-report-indicator--list{min-height:36px}.mapa-report-indicator--row{padding:12px}.mapa-report-indicator__detail{display:block}.mapa-report-indicator__detail>strong{display:block;margin-bottom:3px}}\n"] }]
|
|
8666
|
+
}], propDecorators: { heading: [{ type: i0.Input, args: [{ isSignal: true, alias: "heading", required: true }] }], groups: [{ type: i0.Input, args: [{ isSignal: true, alias: "groups", required: false }] }], legendGroups: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendGroups", required: false }] }], legendTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendTitle", required: false }] }], legendIntro: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendIntro", required: false }] }], legendExpanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendExpanded", required: false }] }], detailedViewLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "detailedViewLabel", required: false }] }], compactDetailedViewLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "compactDetailedViewLabel", required: false }] }], palette: [{ type: i0.Input, args: [{ isSignal: true, alias: "palette", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }, { type: i0.Output, args: ["modeChange"] }] } });
|
|
8667
|
+
function indicatorColumn(group) {
|
|
8668
|
+
const name = group.name
|
|
8669
|
+
.normalize('NFD')
|
|
8670
|
+
.replace(/[\u0300-\u036f]/g, '')
|
|
8671
|
+
.toLowerCase();
|
|
8672
|
+
if (/\bpositiv[oa]s?\b/.test(name))
|
|
8673
|
+
return 1;
|
|
8674
|
+
if (/\bnegativ[oa]s?\b/.test(name))
|
|
8675
|
+
return 2;
|
|
8676
|
+
return 3;
|
|
8677
|
+
}
|
|
8678
|
+
|
|
8679
|
+
class MapaReportScaleWidgetComponent {
|
|
8680
|
+
constructor() {
|
|
8681
|
+
this.i18n = inject(MapaI18nService);
|
|
8682
|
+
this.heading = input.required(...(ngDevMode ? [{ debugName: "heading" }] : []));
|
|
8683
|
+
this.groups = input([], ...(ngDevMode ? [{ debugName: "groups" }] : []));
|
|
8684
|
+
this.legendGroups = input([], ...(ngDevMode ? [{ debugName: "legendGroups" }] : []));
|
|
8685
|
+
this.legendTitle = input(...(ngDevMode ? [undefined, { debugName: "legendTitle" }] : []));
|
|
8686
|
+
this.legendIntro = input(...(ngDevMode ? [undefined, { debugName: "legendIntro" }] : []));
|
|
8687
|
+
this.legendGroupsTitle = input(...(ngDevMode ? [undefined, { debugName: "legendGroupsTitle" }] : []));
|
|
8688
|
+
this.legendExpanded = input(false, ...(ngDevMode ? [{ debugName: "legendExpanded" }] : []));
|
|
8689
|
+
this.palette = input('current', ...(ngDevMode ? [{ debugName: "palette" }] : []));
|
|
8690
|
+
this.mode = model('summarized', ...(ngDevMode ? [{ debugName: "mode" }] : []));
|
|
8691
|
+
this.scales = computed(() => this.groups().flatMap((group) => group.scales), ...(ngDevMode ? [{ debugName: "scales" }] : []));
|
|
8692
|
+
}
|
|
8693
|
+
color(scale) {
|
|
8694
|
+
return (scale.classification?.classificationColor ??
|
|
8695
|
+
(scale.direction === 'negative' ? '#e84d68' : '#2c93dc'));
|
|
8696
|
+
}
|
|
8697
|
+
value(scale) {
|
|
8698
|
+
const value = scale.value ?? 0;
|
|
8699
|
+
return Number.isFinite(value)
|
|
8700
|
+
? Math.min(100, Math.max(0, Math.round(value)))
|
|
8701
|
+
: 0;
|
|
8702
|
+
}
|
|
8703
|
+
direction(dimension, scale) {
|
|
8704
|
+
return dimension.direction ?? scale?.direction ?? 'positive';
|
|
8705
|
+
}
|
|
8706
|
+
directionArrow(dimension, scale) {
|
|
8707
|
+
return this.direction(dimension, scale) === 'negative' ? '↓' : '↑';
|
|
8708
|
+
}
|
|
8709
|
+
directionLabel(dimension, scale) {
|
|
8710
|
+
return this.direction(dimension, scale) === 'negative'
|
|
8711
|
+
? this.i18n.texts.report.negativeDirectionLabel
|
|
8712
|
+
: this.i18n.texts.report.positiveDirectionLabel;
|
|
8713
|
+
}
|
|
8714
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaReportScaleWidgetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8715
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.21", type: MapaReportScaleWidgetComponent, isStandalone: true, selector: "mapa-report-scale-widget", inputs: { heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: true, transformFunction: null }, groups: { classPropertyName: "groups", publicName: "groups", isSignal: true, isRequired: false, transformFunction: null }, legendGroups: { classPropertyName: "legendGroups", publicName: "legendGroups", isSignal: true, isRequired: false, transformFunction: null }, legendTitle: { classPropertyName: "legendTitle", publicName: "legendTitle", isSignal: true, isRequired: false, transformFunction: null }, legendIntro: { classPropertyName: "legendIntro", publicName: "legendIntro", isSignal: true, isRequired: false, transformFunction: null }, legendGroupsTitle: { classPropertyName: "legendGroupsTitle", publicName: "legendGroupsTitle", isSignal: true, isRequired: false, transformFunction: null }, legendExpanded: { classPropertyName: "legendExpanded", publicName: "legendExpanded", isSignal: true, isRequired: false, transformFunction: null }, palette: { classPropertyName: "palette", publicName: "palette", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { mode: "modeChange" }, ngImport: i0, template: "<section class=\"mapa-report-widget\" [attr.data-palette]=\"palette()\">\n <header class=\"mapa-report-widget__header\">\n <div class=\"mapa-report-widget__heading\">\n <h2>{{ heading().title }}</h2>\n @if (heading().description) {\n <p>{{ heading().description }}</p>\n }\n </div>\n <mat-button-toggle-group\n class=\"mapa-report-widget__modes\"\n hideSingleSelectionIndicator\n [attr.aria-label]=\"i18n.texts.report.viewModeLabel\"\n [value]=\"mode()\"\n (change)=\"mode.set($event.value)\"\n >\n <mat-button-toggle value=\"summarized\">\n <span class=\"mapa-report-scale__mode-icon\" aria-hidden=\"true\">\u25A5</span>\n {{ i18n.texts.report.summarized }}\n </mat-button-toggle>\n <mat-button-toggle value=\"detailed\">\n <span class=\"mapa-report-scale__mode-icon\" aria-hidden=\"true\">\u25A4</span>\n {{ i18n.texts.report.detailed }}\n </mat-button-toggle>\n </mat-button-toggle-group>\n </header>\n\n @if (legendGroups().length || legendIntro()) {\n <mapa-report-legend\n appearance=\"psychosocial\"\n [expanded]=\"legendExpanded()\"\n [groups]=\"legendGroups()\"\n [groupsTitle]=\"legendGroupsTitle()\"\n [intro]=\"legendIntro()\"\n [title]=\"legendTitle()\"\n />\n }\n\n @if (!scales().length) {\n <p class=\"mapa-report-widget__empty\">{{ i18n.texts.report.emptyState }}</p>\n } @else if (mode() === \"summarized\") {\n <div class=\"mapa-report-scales mapa-report-scales--summary\">\n @for (group of groups(); track group.id) {\n <section class=\"mapa-report-scale-group\">\n @if (group.name) {\n <div class=\"mapa-report-scale-group__head\">\n <h3>{{ group.name }}</h3>\n </div>\n }\n <div class=\"mapa-report-scale-group__grid\">\n @for (scale of group.scales; track scale.id) {\n <article\n class=\"mapa-report-scale-card mapa-report-scale-card--summary\"\n >\n <header class=\"mapa-report-scale-card__head\">\n <h4>{{ scale.name }}</h4>\n <mapa-classification-tag\n appearance=\"solid\"\n [classification]=\"scale.classification\"\n />\n </header>\n @if (scale.value !== undefined) {\n <div class=\"mapa-report-scale-card__score\">\n <mapa-result-track\n [color]=\"color(scale)\"\n [direction]=\"direction(scale)\"\n [name]=\"scale.name\"\n [showValue]=\"false\"\n [value]=\"scale.value\"\n />\n <span class=\"mapa-report-scale-card__percent\"\n >{{ value(scale) }}%</span\n >\n </div>\n }\n @if (scale.dimensions?.length) {\n <ul class=\"mapa-report-scale-card__dimensions\">\n @for (dimension of scale.dimensions; track dimension.id) {\n <li>\n <span class=\"mapa-report-scale-card__dimension-name\">\n <span\n class=\"mapa-direction-indicator\"\n [attr.aria-label]=\"directionLabel(dimension, scale)\"\n >{{ directionArrow(dimension, scale) }}</span\n >\n <span>{{ dimension.name }}</span>\n </span>\n <mapa-classification-tag\n appearance=\"solid\"\n [classification]=\"dimension.classification\"\n />\n </li>\n }\n </ul>\n }\n </article>\n }\n </div>\n </section>\n }\n </div>\n } @else {\n <div class=\"mapa-report-scales mapa-report-scales--detailed\">\n @for (group of groups(); track group.id) {\n <section class=\"mapa-report-scale-group\">\n @if (group.name) {\n <div class=\"mapa-report-scale-group__head\">\n <h3>{{ group.name }}</h3>\n </div>\n }\n <div class=\"mapa-report-scale-group__rows\">\n @for (scale of group.scales; track scale.id) {\n <article\n class=\"mapa-report-scale-card mapa-report-scale-card--detailed\"\n >\n <header class=\"mapa-report-scale-card__head\">\n <div class=\"mapa-report-scale-card__title\">\n <h4>{{ scale.name }}</h4>\n <mapa-classification-tag\n appearance=\"solid\"\n [classification]=\"scale.classification\"\n />\n </div>\n @if (scale.value !== undefined) {\n <div class=\"mapa-report-scale-card__score\">\n <mapa-result-track\n [color]=\"color(scale)\"\n [direction]=\"direction(scale)\"\n [name]=\"scale.name\"\n [showValue]=\"false\"\n [value]=\"scale.value\"\n />\n <span class=\"mapa-report-scale-card__percent\"\n >{{ value(scale) }}%</span\n >\n </div>\n }\n </header>\n @if (scale.concept) {\n <section class=\"mapa-report-scale-card__concept\">\n <h5>{{ i18n.texts.report.conceptTitle }}:</h5>\n <div [innerHTML]=\"scale.concept | safeHtml\"></div>\n </section>\n }\n @if (scale.dimensions?.length) {\n <ul class=\"mapa-report-scale-card__dimension-list\">\n @for (dimension of scale.dimensions; track dimension.id) {\n <li>\n <span class=\"mapa-report-scale-card__dimension-name\">\n <span\n class=\"mapa-direction-indicator\"\n [attr.aria-label]=\"directionLabel(dimension, scale)\"\n >{{ directionArrow(dimension, scale) }}</span\n >\n <span>{{ dimension.name }}</span>\n </span>\n <mapa-classification-tag\n appearance=\"solid\"\n [classification]=\"dimension.classification\"\n />\n @if (dimension.description) {\n <div\n class=\"mapa-report-scale-card__copy\"\n [innerHTML]=\"dimension.description | safeHtml\"\n ></div>\n }\n </li>\n }\n </ul>\n }\n </article>\n }\n </div>\n </section>\n }\n </div>\n }\n</section>\n", styles: [":host{--mapa-report-accent: #ff560b;--mapa-report-accent-soft: #fff0e9;--mapa-report-surface: #fff;--mapa-report-surface-muted: #eef2f3;--mapa-report-border: #e1e5e7;--mapa-report-text: #263238;--mapa-report-muted: #68747a;--mapa-report-pill-width: 104px;--mapa-report-radius: 8px;--mapa-report-space: 20px;color:var(--mapa-report-text);display:block;font-family:var(--mapa-font-body, \"Asap\", \"Roboto\", sans-serif)}.mapa-report-widget{display:grid;gap:var(--mapa-report-space)}.mapa-report-widget__header{align-items:flex-start;display:flex;gap:16px;justify-content:space-between}.mapa-report-widget__heading{max-width:72ch}.mapa-report-widget__heading h2{color:var(--mapa-report-accent);font-size:20px;font-weight:650;line-height:1.25;margin:0}.mapa-report-widget__heading p{color:var(--mapa-report-muted);font-size:13px;line-height:1.5;margin:5px 0 0}.mapa-report-widget__modes{--mat-button-toggle-background-color: var(--mapa-report-surface);--mat-button-toggle-divider-color: #cbd5da;--mat-button-toggle-height: 32px;--mat-button-toggle-label-text-font: var( --mapa-font-body, \"Asap\", sans-serif );--mat-button-toggle-label-text-size: 13px;--mat-button-toggle-label-text-weight: 500;--mat-button-toggle-selected-state-background-color: #59636a;--mat-button-toggle-selected-state-text-color: #fffaf7;--mat-button-toggle-shape: 4px;--mat-button-toggle-text-color: #344b5e;border:1px solid #cbd5da;border-radius:4px;flex:0 0 auto;overflow:hidden}.mapa-report-widget__modes mat-button-toggle{font:500 13px/1 var(--mapa-font-body, \"Asap\", sans-serif)}.mapa-report-widget__modes mat-icon{font-size:14px;height:14px;margin-right:5px;width:14px}.mapa-report-widget__empty{color:var(--mapa-report-muted);margin:0;padding:24px 0;text-align:center}@media(max-width:760px){.mapa-report-widget__header{align-items:stretch;flex-direction:column}.mapa-report-widget__modes{align-self:flex-start}}.mapa-direction-indicator{background:var(--mapa-report-surface, var(--mapa-color-surface, #fafbfc));border:1px solid currentColor;border-radius:50%;box-sizing:border-box;color:var(--mapa-report-muted, var(--mapa-color-text-subtle, #68747a));display:inline-grid;flex:0 0 20px;font-size:11px;font-weight:700;height:20px;line-height:1;place-items:center;width:20px}:host{--mapa-report-line-soft: #edf1f3;--mapa-report-surface-soft: #fafbfc;--mapa-report-card-radius: 10px}.mapa-report-scale__mode-icon{font-size:12px;margin-right:5px}.mapa-report-scales{display:grid;gap:26px}.mapa-report-scale-group{min-width:0}.mapa-report-scale-group__head{align-items:center;border-bottom:1px solid var(--mapa-report-border);display:flex;gap:11px;margin:0 0 14px;padding:2px 2px 12px}.mapa-report-scale-group__head:before{background:var(--mapa-report-accent);border-radius:4px;content:\"\";flex:0 0 4px;height:24px;width:4px}.mapa-report-scale-group__head h3{font-size:18px;font-weight:600;letter-spacing:-.2px;line-height:1.25;margin:0}.mapa-report-scale-group__grid{align-items:start;display:grid;gap:14px;grid-template-columns:repeat(3,minmax(0,1fr))}.mapa-report-scale-group__rows{display:grid;gap:14px}.mapa-report-scale-card{background:var(--mapa-report-surface);border:1px solid var(--mapa-report-border);border-radius:var(--mapa-report-card-radius);min-width:0}.mapa-report-scale-card mapa-classification-tag{--mapa-classification-tag-min-width: var(--mapa-report-pill-width);flex:0 0 auto;max-width:var(--mapa-report-pill-width)}.mapa-report-scale-card__score{align-items:center;display:flex;gap:9px}.mapa-report-scale-card__score mapa-result-track{flex:1;min-width:0}.mapa-report-scale-card__percent{color:#1f3850;font-size:15px;line-height:1.1}.mapa-report-scale-card__dimension-name{align-items:center;display:flex;gap:7px;min-width:0}.mapa-report-scale-card__dimension-name span:last-child{overflow-wrap:anywhere}.mapa-report-scale-card--summary{padding:16px 14px 13px}.mapa-report-scale-card--summary .mapa-report-scale-card__head{align-items:flex-start;display:flex;gap:10px;justify-content:space-between;min-height:39px}.mapa-report-scale-card--summary .mapa-report-scale-card__head h4{color:#234b68;font-size:16px;font-weight:500;line-height:1.2;margin:0}.mapa-report-scale-card--summary .mapa-report-scale-card__score{margin:15px 0 13px}.mapa-report-scale-card--summary .mapa-report-scale-card__score mapa-result-track{--mapa-result-track-height: 7px}.mapa-report-scale-card--summary .mapa-report-scale-card__dimensions{border-top:1px solid var(--mapa-report-line-soft);display:grid;gap:7px;list-style:none;margin:0;padding:12px 0 0}.mapa-report-scale-card--summary .mapa-report-scale-card__dimensions li{align-items:center;background:var(--mapa-report-surface-soft);border:1px solid var(--mapa-report-line-soft);border-radius:9px;display:grid;gap:8px;grid-template-columns:minmax(0,1fr) auto;min-height:39px;padding:8px 9px}.mapa-report-scale-card--summary .mapa-report-scale-card__dimension-name{color:#3f5870;font-size:11px;line-height:1.25}.mapa-report-scale-card--detailed{padding:21px 20px 18px}.mapa-report-scale-card--detailed .mapa-report-scale-card__head{align-items:center;display:grid;gap:20px;grid-template-columns:minmax(220px,1fr) minmax(300px,390px)}.mapa-report-scale-card--detailed .mapa-report-scale-card__title{align-items:center;display:flex;gap:12px;min-width:0}.mapa-report-scale-card--detailed .mapa-report-scale-card__title h4{font-size:21px;font-weight:500;line-height:1.2;margin:0}.mapa-report-scale-card--detailed .mapa-report-scale-card__score{gap:11px}.mapa-report-scale-card--detailed .mapa-report-scale-card__score mapa-result-track{--mapa-result-track-height: 8px}.mapa-report-scale-card--detailed .mapa-report-scale-card__percent{font-size:21px;min-width:38px;text-align:right}.mapa-report-scale-card--detailed .mapa-report-scale-card__concept{background:var(--mapa-report-surface-soft);border-radius:var(--mapa-report-card-radius);color:var(--mapa-report-muted);font-size:13px;line-height:1.6;margin-top:16px;padding:13px 14px}.mapa-report-scale-card--detailed .mapa-report-scale-card__concept h5{align-items:center;color:#53646e;display:flex;font-size:10px;font-weight:800;gap:10px;letter-spacing:.06em;line-height:1.2;margin:0 0 8px;text-transform:uppercase}.mapa-report-scale-card--detailed .mapa-report-scale-card__concept h5:after{background:var(--mapa-report-border);content:\"\";flex:1;height:1px}.mapa-report-scale-card--detailed .mapa-report-scale-card__concept :last-child{margin-bottom:0}.mapa-report-scale-card--detailed .mapa-report-scale-card__dimension-list{display:grid;gap:8px;list-style:none;margin:14px 0 0;padding:0}.mapa-report-scale-card--detailed .mapa-report-scale-card__dimension-list li{align-items:center;background:var(--mapa-report-surface-soft);border:1px solid var(--mapa-report-line-soft);border-radius:9px;display:grid;gap:16px;grid-template-columns:minmax(180px,240px) var(--mapa-report-pill-width) minmax(0,1fr);min-height:54px;padding:10px 14px}.mapa-report-scale-card--detailed .mapa-report-scale-card__dimension-name{font-size:13px;gap:9px}.mapa-report-scale-card--detailed .mapa-report-scale-card__copy{color:var(--mapa-report-muted);font-size:12px;line-height:1.45}.mapa-report-scale-card--detailed .mapa-report-scale-card__copy :last-child{margin-bottom:0}.mapa-report-scale-card--detailed .mapa-report-scale-card__dimension-list mapa-classification-tag{justify-self:start}@media(max-width:1199px){.mapa-report-scale-group__grid{grid-template-columns:repeat(2,minmax(0,1fr))}.mapa-report-scale-card--detailed .mapa-report-scale-card__head{gap:13px;grid-template-columns:1fr}.mapa-report-scale-card--detailed .mapa-report-scale-card__dimension-list li{grid-template-columns:minmax(180px,1fr) var(--mapa-report-pill-width)}.mapa-report-scale-card--detailed .mapa-report-scale-card__copy{grid-column:1/-1;padding-left:28px}}@media(max-width:760px){.mapa-report-scale-group__head h3{font-size:16px}.mapa-report-scale-group__grid{grid-template-columns:1fr}.mapa-report-scale-card--detailed{padding:16px 14px 14px}.mapa-report-scale-card--detailed .mapa-report-scale-card__title h4,.mapa-report-scale-card--detailed .mapa-report-scale-card__percent{font-size:18px}.mapa-report-scale-card--detailed .mapa-report-scale-card__dimension-list li{gap:8px;grid-template-columns:1fr}.mapa-report-scale-card--detailed .mapa-report-scale-card__copy{grid-column:auto;padding-left:28px}}@media(max-width:560px){.mapa-report-scale-card--summary .mapa-report-scale-card__head{flex-wrap:wrap}.mapa-report-widget__modes{--mat-button-toggle-label-text-size: 11px;align-self:stretch;display:flex}.mapa-report-widget__modes mat-button-toggle{flex:1 1 0;font:500 11px/1 var(--mapa-font-body, \"Asap\", sans-serif);min-width:0}.mapa-report-scale__mode-icon{display:none}}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonToggleModule }, { kind: "directive", type: i1$6.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled", "disabledInteractive", "hideSingleSelectionIndicator", "hideMultipleSelectionIndicator"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i1$6.MatButtonToggle, selector: "mat-button-toggle", inputs: ["aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "disableRipple", "appearance", "checked", "disabled", "disabledInteractive"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "component", type: MapaClassificationTagComponent, selector: "mapa-classification-tag", inputs: ["classification", "size", "appearance", "shape", "casing", "fallbackLabel"] }, { kind: "component", type: MapaReportLegendComponent, selector: "mapa-report-legend", inputs: ["title", "intro", "groupsTitle", "groups", "expanded", "appearance"] }, { kind: "component", type: MapaResultTrackComponent, selector: "mapa-result-track", inputs: ["name", "value", "color", "mode", "appearance", "direction", "showValue", "ariaLabel"] }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
8716
|
+
}
|
|
8717
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaReportScaleWidgetComponent, decorators: [{
|
|
8718
|
+
type: Component,
|
|
8719
|
+
args: [{ selector: 'mapa-report-scale-widget', standalone: true, imports: [
|
|
8720
|
+
MatButtonToggleModule,
|
|
8721
|
+
MapaClassificationTagComponent,
|
|
8722
|
+
MapaReportLegendComponent,
|
|
8723
|
+
MapaResultTrackComponent,
|
|
8724
|
+
SafeHtmlPipe,
|
|
8725
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<section class=\"mapa-report-widget\" [attr.data-palette]=\"palette()\">\n <header class=\"mapa-report-widget__header\">\n <div class=\"mapa-report-widget__heading\">\n <h2>{{ heading().title }}</h2>\n @if (heading().description) {\n <p>{{ heading().description }}</p>\n }\n </div>\n <mat-button-toggle-group\n class=\"mapa-report-widget__modes\"\n hideSingleSelectionIndicator\n [attr.aria-label]=\"i18n.texts.report.viewModeLabel\"\n [value]=\"mode()\"\n (change)=\"mode.set($event.value)\"\n >\n <mat-button-toggle value=\"summarized\">\n <span class=\"mapa-report-scale__mode-icon\" aria-hidden=\"true\">\u25A5</span>\n {{ i18n.texts.report.summarized }}\n </mat-button-toggle>\n <mat-button-toggle value=\"detailed\">\n <span class=\"mapa-report-scale__mode-icon\" aria-hidden=\"true\">\u25A4</span>\n {{ i18n.texts.report.detailed }}\n </mat-button-toggle>\n </mat-button-toggle-group>\n </header>\n\n @if (legendGroups().length || legendIntro()) {\n <mapa-report-legend\n appearance=\"psychosocial\"\n [expanded]=\"legendExpanded()\"\n [groups]=\"legendGroups()\"\n [groupsTitle]=\"legendGroupsTitle()\"\n [intro]=\"legendIntro()\"\n [title]=\"legendTitle()\"\n />\n }\n\n @if (!scales().length) {\n <p class=\"mapa-report-widget__empty\">{{ i18n.texts.report.emptyState }}</p>\n } @else if (mode() === \"summarized\") {\n <div class=\"mapa-report-scales mapa-report-scales--summary\">\n @for (group of groups(); track group.id) {\n <section class=\"mapa-report-scale-group\">\n @if (group.name) {\n <div class=\"mapa-report-scale-group__head\">\n <h3>{{ group.name }}</h3>\n </div>\n }\n <div class=\"mapa-report-scale-group__grid\">\n @for (scale of group.scales; track scale.id) {\n <article\n class=\"mapa-report-scale-card mapa-report-scale-card--summary\"\n >\n <header class=\"mapa-report-scale-card__head\">\n <h4>{{ scale.name }}</h4>\n <mapa-classification-tag\n appearance=\"solid\"\n [classification]=\"scale.classification\"\n />\n </header>\n @if (scale.value !== undefined) {\n <div class=\"mapa-report-scale-card__score\">\n <mapa-result-track\n [color]=\"color(scale)\"\n [direction]=\"direction(scale)\"\n [name]=\"scale.name\"\n [showValue]=\"false\"\n [value]=\"scale.value\"\n />\n <span class=\"mapa-report-scale-card__percent\"\n >{{ value(scale) }}%</span\n >\n </div>\n }\n @if (scale.dimensions?.length) {\n <ul class=\"mapa-report-scale-card__dimensions\">\n @for (dimension of scale.dimensions; track dimension.id) {\n <li>\n <span class=\"mapa-report-scale-card__dimension-name\">\n <span\n class=\"mapa-direction-indicator\"\n [attr.aria-label]=\"directionLabel(dimension, scale)\"\n >{{ directionArrow(dimension, scale) }}</span\n >\n <span>{{ dimension.name }}</span>\n </span>\n <mapa-classification-tag\n appearance=\"solid\"\n [classification]=\"dimension.classification\"\n />\n </li>\n }\n </ul>\n }\n </article>\n }\n </div>\n </section>\n }\n </div>\n } @else {\n <div class=\"mapa-report-scales mapa-report-scales--detailed\">\n @for (group of groups(); track group.id) {\n <section class=\"mapa-report-scale-group\">\n @if (group.name) {\n <div class=\"mapa-report-scale-group__head\">\n <h3>{{ group.name }}</h3>\n </div>\n }\n <div class=\"mapa-report-scale-group__rows\">\n @for (scale of group.scales; track scale.id) {\n <article\n class=\"mapa-report-scale-card mapa-report-scale-card--detailed\"\n >\n <header class=\"mapa-report-scale-card__head\">\n <div class=\"mapa-report-scale-card__title\">\n <h4>{{ scale.name }}</h4>\n <mapa-classification-tag\n appearance=\"solid\"\n [classification]=\"scale.classification\"\n />\n </div>\n @if (scale.value !== undefined) {\n <div class=\"mapa-report-scale-card__score\">\n <mapa-result-track\n [color]=\"color(scale)\"\n [direction]=\"direction(scale)\"\n [name]=\"scale.name\"\n [showValue]=\"false\"\n [value]=\"scale.value\"\n />\n <span class=\"mapa-report-scale-card__percent\"\n >{{ value(scale) }}%</span\n >\n </div>\n }\n </header>\n @if (scale.concept) {\n <section class=\"mapa-report-scale-card__concept\">\n <h5>{{ i18n.texts.report.conceptTitle }}:</h5>\n <div [innerHTML]=\"scale.concept | safeHtml\"></div>\n </section>\n }\n @if (scale.dimensions?.length) {\n <ul class=\"mapa-report-scale-card__dimension-list\">\n @for (dimension of scale.dimensions; track dimension.id) {\n <li>\n <span class=\"mapa-report-scale-card__dimension-name\">\n <span\n class=\"mapa-direction-indicator\"\n [attr.aria-label]=\"directionLabel(dimension, scale)\"\n >{{ directionArrow(dimension, scale) }}</span\n >\n <span>{{ dimension.name }}</span>\n </span>\n <mapa-classification-tag\n appearance=\"solid\"\n [classification]=\"dimension.classification\"\n />\n @if (dimension.description) {\n <div\n class=\"mapa-report-scale-card__copy\"\n [innerHTML]=\"dimension.description | safeHtml\"\n ></div>\n }\n </li>\n }\n </ul>\n }\n </article>\n }\n </div>\n </section>\n }\n </div>\n }\n</section>\n", styles: [":host{--mapa-report-accent: #ff560b;--mapa-report-accent-soft: #fff0e9;--mapa-report-surface: #fff;--mapa-report-surface-muted: #eef2f3;--mapa-report-border: #e1e5e7;--mapa-report-text: #263238;--mapa-report-muted: #68747a;--mapa-report-pill-width: 104px;--mapa-report-radius: 8px;--mapa-report-space: 20px;color:var(--mapa-report-text);display:block;font-family:var(--mapa-font-body, \"Asap\", \"Roboto\", sans-serif)}.mapa-report-widget{display:grid;gap:var(--mapa-report-space)}.mapa-report-widget__header{align-items:flex-start;display:flex;gap:16px;justify-content:space-between}.mapa-report-widget__heading{max-width:72ch}.mapa-report-widget__heading h2{color:var(--mapa-report-accent);font-size:20px;font-weight:650;line-height:1.25;margin:0}.mapa-report-widget__heading p{color:var(--mapa-report-muted);font-size:13px;line-height:1.5;margin:5px 0 0}.mapa-report-widget__modes{--mat-button-toggle-background-color: var(--mapa-report-surface);--mat-button-toggle-divider-color: #cbd5da;--mat-button-toggle-height: 32px;--mat-button-toggle-label-text-font: var( --mapa-font-body, \"Asap\", sans-serif );--mat-button-toggle-label-text-size: 13px;--mat-button-toggle-label-text-weight: 500;--mat-button-toggle-selected-state-background-color: #59636a;--mat-button-toggle-selected-state-text-color: #fffaf7;--mat-button-toggle-shape: 4px;--mat-button-toggle-text-color: #344b5e;border:1px solid #cbd5da;border-radius:4px;flex:0 0 auto;overflow:hidden}.mapa-report-widget__modes mat-button-toggle{font:500 13px/1 var(--mapa-font-body, \"Asap\", sans-serif)}.mapa-report-widget__modes mat-icon{font-size:14px;height:14px;margin-right:5px;width:14px}.mapa-report-widget__empty{color:var(--mapa-report-muted);margin:0;padding:24px 0;text-align:center}@media(max-width:760px){.mapa-report-widget__header{align-items:stretch;flex-direction:column}.mapa-report-widget__modes{align-self:flex-start}}.mapa-direction-indicator{background:var(--mapa-report-surface, var(--mapa-color-surface, #fafbfc));border:1px solid currentColor;border-radius:50%;box-sizing:border-box;color:var(--mapa-report-muted, var(--mapa-color-text-subtle, #68747a));display:inline-grid;flex:0 0 20px;font-size:11px;font-weight:700;height:20px;line-height:1;place-items:center;width:20px}:host{--mapa-report-line-soft: #edf1f3;--mapa-report-surface-soft: #fafbfc;--mapa-report-card-radius: 10px}.mapa-report-scale__mode-icon{font-size:12px;margin-right:5px}.mapa-report-scales{display:grid;gap:26px}.mapa-report-scale-group{min-width:0}.mapa-report-scale-group__head{align-items:center;border-bottom:1px solid var(--mapa-report-border);display:flex;gap:11px;margin:0 0 14px;padding:2px 2px 12px}.mapa-report-scale-group__head:before{background:var(--mapa-report-accent);border-radius:4px;content:\"\";flex:0 0 4px;height:24px;width:4px}.mapa-report-scale-group__head h3{font-size:18px;font-weight:600;letter-spacing:-.2px;line-height:1.25;margin:0}.mapa-report-scale-group__grid{align-items:start;display:grid;gap:14px;grid-template-columns:repeat(3,minmax(0,1fr))}.mapa-report-scale-group__rows{display:grid;gap:14px}.mapa-report-scale-card{background:var(--mapa-report-surface);border:1px solid var(--mapa-report-border);border-radius:var(--mapa-report-card-radius);min-width:0}.mapa-report-scale-card mapa-classification-tag{--mapa-classification-tag-min-width: var(--mapa-report-pill-width);flex:0 0 auto;max-width:var(--mapa-report-pill-width)}.mapa-report-scale-card__score{align-items:center;display:flex;gap:9px}.mapa-report-scale-card__score mapa-result-track{flex:1;min-width:0}.mapa-report-scale-card__percent{color:#1f3850;font-size:15px;line-height:1.1}.mapa-report-scale-card__dimension-name{align-items:center;display:flex;gap:7px;min-width:0}.mapa-report-scale-card__dimension-name span:last-child{overflow-wrap:anywhere}.mapa-report-scale-card--summary{padding:16px 14px 13px}.mapa-report-scale-card--summary .mapa-report-scale-card__head{align-items:flex-start;display:flex;gap:10px;justify-content:space-between;min-height:39px}.mapa-report-scale-card--summary .mapa-report-scale-card__head h4{color:#234b68;font-size:16px;font-weight:500;line-height:1.2;margin:0}.mapa-report-scale-card--summary .mapa-report-scale-card__score{margin:15px 0 13px}.mapa-report-scale-card--summary .mapa-report-scale-card__score mapa-result-track{--mapa-result-track-height: 7px}.mapa-report-scale-card--summary .mapa-report-scale-card__dimensions{border-top:1px solid var(--mapa-report-line-soft);display:grid;gap:7px;list-style:none;margin:0;padding:12px 0 0}.mapa-report-scale-card--summary .mapa-report-scale-card__dimensions li{align-items:center;background:var(--mapa-report-surface-soft);border:1px solid var(--mapa-report-line-soft);border-radius:9px;display:grid;gap:8px;grid-template-columns:minmax(0,1fr) auto;min-height:39px;padding:8px 9px}.mapa-report-scale-card--summary .mapa-report-scale-card__dimension-name{color:#3f5870;font-size:11px;line-height:1.25}.mapa-report-scale-card--detailed{padding:21px 20px 18px}.mapa-report-scale-card--detailed .mapa-report-scale-card__head{align-items:center;display:grid;gap:20px;grid-template-columns:minmax(220px,1fr) minmax(300px,390px)}.mapa-report-scale-card--detailed .mapa-report-scale-card__title{align-items:center;display:flex;gap:12px;min-width:0}.mapa-report-scale-card--detailed .mapa-report-scale-card__title h4{font-size:21px;font-weight:500;line-height:1.2;margin:0}.mapa-report-scale-card--detailed .mapa-report-scale-card__score{gap:11px}.mapa-report-scale-card--detailed .mapa-report-scale-card__score mapa-result-track{--mapa-result-track-height: 8px}.mapa-report-scale-card--detailed .mapa-report-scale-card__percent{font-size:21px;min-width:38px;text-align:right}.mapa-report-scale-card--detailed .mapa-report-scale-card__concept{background:var(--mapa-report-surface-soft);border-radius:var(--mapa-report-card-radius);color:var(--mapa-report-muted);font-size:13px;line-height:1.6;margin-top:16px;padding:13px 14px}.mapa-report-scale-card--detailed .mapa-report-scale-card__concept h5{align-items:center;color:#53646e;display:flex;font-size:10px;font-weight:800;gap:10px;letter-spacing:.06em;line-height:1.2;margin:0 0 8px;text-transform:uppercase}.mapa-report-scale-card--detailed .mapa-report-scale-card__concept h5:after{background:var(--mapa-report-border);content:\"\";flex:1;height:1px}.mapa-report-scale-card--detailed .mapa-report-scale-card__concept :last-child{margin-bottom:0}.mapa-report-scale-card--detailed .mapa-report-scale-card__dimension-list{display:grid;gap:8px;list-style:none;margin:14px 0 0;padding:0}.mapa-report-scale-card--detailed .mapa-report-scale-card__dimension-list li{align-items:center;background:var(--mapa-report-surface-soft);border:1px solid var(--mapa-report-line-soft);border-radius:9px;display:grid;gap:16px;grid-template-columns:minmax(180px,240px) var(--mapa-report-pill-width) minmax(0,1fr);min-height:54px;padding:10px 14px}.mapa-report-scale-card--detailed .mapa-report-scale-card__dimension-name{font-size:13px;gap:9px}.mapa-report-scale-card--detailed .mapa-report-scale-card__copy{color:var(--mapa-report-muted);font-size:12px;line-height:1.45}.mapa-report-scale-card--detailed .mapa-report-scale-card__copy :last-child{margin-bottom:0}.mapa-report-scale-card--detailed .mapa-report-scale-card__dimension-list mapa-classification-tag{justify-self:start}@media(max-width:1199px){.mapa-report-scale-group__grid{grid-template-columns:repeat(2,minmax(0,1fr))}.mapa-report-scale-card--detailed .mapa-report-scale-card__head{gap:13px;grid-template-columns:1fr}.mapa-report-scale-card--detailed .mapa-report-scale-card__dimension-list li{grid-template-columns:minmax(180px,1fr) var(--mapa-report-pill-width)}.mapa-report-scale-card--detailed .mapa-report-scale-card__copy{grid-column:1/-1;padding-left:28px}}@media(max-width:760px){.mapa-report-scale-group__head h3{font-size:16px}.mapa-report-scale-group__grid{grid-template-columns:1fr}.mapa-report-scale-card--detailed{padding:16px 14px 14px}.mapa-report-scale-card--detailed .mapa-report-scale-card__title h4,.mapa-report-scale-card--detailed .mapa-report-scale-card__percent{font-size:18px}.mapa-report-scale-card--detailed .mapa-report-scale-card__dimension-list li{gap:8px;grid-template-columns:1fr}.mapa-report-scale-card--detailed .mapa-report-scale-card__copy{grid-column:auto;padding-left:28px}}@media(max-width:560px){.mapa-report-scale-card--summary .mapa-report-scale-card__head{flex-wrap:wrap}.mapa-report-widget__modes{--mat-button-toggle-label-text-size: 11px;align-self:stretch;display:flex}.mapa-report-widget__modes mat-button-toggle{flex:1 1 0;font:500 11px/1 var(--mapa-font-body, \"Asap\", sans-serif);min-width:0}.mapa-report-scale__mode-icon{display:none}}\n"] }]
|
|
8726
|
+
}], propDecorators: { heading: [{ type: i0.Input, args: [{ isSignal: true, alias: "heading", required: true }] }], groups: [{ type: i0.Input, args: [{ isSignal: true, alias: "groups", required: false }] }], legendGroups: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendGroups", required: false }] }], legendTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendTitle", required: false }] }], legendIntro: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendIntro", required: false }] }], legendGroupsTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendGroupsTitle", required: false }] }], legendExpanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendExpanded", required: false }] }], palette: [{ type: i0.Input, args: [{ isSignal: true, alias: "palette", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }, { type: i0.Output, args: ["modeChange"] }] } });
|
|
8727
|
+
|
|
8728
|
+
const GAUGE_SEGMENT_COUNT = 25;
|
|
8729
|
+
const GAUGE_START_ANGLE = 180;
|
|
8730
|
+
const GAUGE_SWEEP_ANGLE = 180;
|
|
8731
|
+
const GAUGE_INNER_RADIUS_X = 55;
|
|
8732
|
+
const GAUGE_INNER_RADIUS_Y = 55;
|
|
8733
|
+
const GAUGE_OUTER_RADIUS_X = 70;
|
|
8734
|
+
const GAUGE_OUTER_RADIUS_Y = 70;
|
|
8735
|
+
class MapaReportSocioemotionalWidgetComponent {
|
|
8736
|
+
constructor() {
|
|
8737
|
+
this.i18n = inject(MapaI18nService);
|
|
8738
|
+
this.gaugeSegments = Array.from({ length: GAUGE_SEGMENT_COUNT }, (_, index) => {
|
|
8739
|
+
const angle = (GAUGE_START_ANGLE -
|
|
8740
|
+
(index / (GAUGE_SEGMENT_COUNT - 1)) * GAUGE_SWEEP_ANGLE) *
|
|
8741
|
+
(Math.PI / 180);
|
|
8742
|
+
const centerX = 90;
|
|
8743
|
+
const centerY = 86;
|
|
8744
|
+
return {
|
|
8745
|
+
index,
|
|
8746
|
+
x1: centerX + Math.cos(angle) * GAUGE_INNER_RADIUS_X,
|
|
8747
|
+
y1: centerY - Math.sin(angle) * GAUGE_INNER_RADIUS_Y,
|
|
8748
|
+
x2: centerX + Math.cos(angle) * GAUGE_OUTER_RADIUS_X,
|
|
8749
|
+
y2: centerY - Math.sin(angle) * GAUGE_OUTER_RADIUS_Y,
|
|
8750
|
+
};
|
|
8751
|
+
});
|
|
8752
|
+
this.heading = input.required(...(ngDevMode ? [{ debugName: "heading" }] : []));
|
|
8753
|
+
this.data = input.required(...(ngDevMode ? [{ debugName: "data" }] : []));
|
|
8754
|
+
this.palette = input('current', ...(ngDevMode ? [{ debugName: "palette" }] : []));
|
|
8755
|
+
}
|
|
8756
|
+
clamp(value) {
|
|
8757
|
+
if (!Number.isFinite(value))
|
|
8758
|
+
return 0;
|
|
8759
|
+
return Math.min(100, Math.max(0, Math.round(value)));
|
|
8760
|
+
}
|
|
8761
|
+
activeSegmentCount(value) {
|
|
8762
|
+
const normalized = this.clamp(value);
|
|
8763
|
+
return normalized === 0
|
|
8764
|
+
? 0
|
|
8765
|
+
: Math.ceil((normalized / 100) * this.gaugeSegments.length);
|
|
8766
|
+
}
|
|
8767
|
+
classificationLabel(classification) {
|
|
8768
|
+
return (classification?.classificationName?.trim() ||
|
|
8769
|
+
this.i18n.texts.report.noClassification);
|
|
8770
|
+
}
|
|
8771
|
+
directionArrow(direction) {
|
|
8772
|
+
return direction === 'negative' ? '↓' : '↑';
|
|
8773
|
+
}
|
|
8774
|
+
skillHeadingLabel(name, direction) {
|
|
8775
|
+
const directionLabel = direction === 'negative'
|
|
8776
|
+
? this.i18n.texts.report.negativeDirectionLabel
|
|
8777
|
+
: this.i18n.texts.report.positiveDirectionLabel;
|
|
8778
|
+
return `${name}, ${directionLabel}`;
|
|
8779
|
+
}
|
|
8780
|
+
vulnerabilityDimensions(scale) {
|
|
8781
|
+
return scale.dimensions?.length ? scale.dimensions : [scale];
|
|
8782
|
+
}
|
|
8783
|
+
gaugeColor(classification) {
|
|
8784
|
+
const color = classification?.classificationColor?.trim();
|
|
8785
|
+
return color && /^#([\da-f]{3}|[\da-f]{6})$/i.test(color)
|
|
8786
|
+
? color
|
|
8787
|
+
: '#758087';
|
|
8788
|
+
}
|
|
8789
|
+
gaugeValueText(value, classification) {
|
|
8790
|
+
return `${this.clamp(value)}, ${this.classificationLabel(classification)}`;
|
|
8791
|
+
}
|
|
8792
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaReportSocioemotionalWidgetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8793
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.21", type: MapaReportSocioemotionalWidgetComponent, isStandalone: true, selector: "mapa-report-socioemotional-widget", inputs: { heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: true, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, palette: { classPropertyName: "palette", publicName: "palette", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<section class=\"mapa-report-widget\" [attr.data-palette]=\"palette()\">\n <header class=\"mapa-report-widget__header\">\n <div class=\"mapa-report-widget__heading\">\n <h2>{{ heading().title }}</h2>\n @if (heading().description) {\n <p>{{ heading().description }}</p>\n }\n </div>\n </header>\n\n @if (data().legend) {\n <mapa-report-legend\n appearance=\"psychosocial\"\n [expanded]=\"data().legend?.expanded ?? false\"\n [groups]=\"data().legend?.groups ?? []\"\n [groupsTitle]=\"data().legend?.groupsTitle\"\n [intro]=\"data().legend?.intro\"\n [title]=\"data().legend?.title\"\n />\n }\n\n @if (data().competencies.length) {\n <div class=\"mapa-report-socio__competencies\">\n @for (competence of data().competencies; track competence.id) {\n <section class=\"mapa-report-socio__competence\">\n <header class=\"mapa-report-socio__competence-heading\">\n <h3>{{ competence.name }}</h3>\n @if (competence.description) {\n <p>{{ competence.description }}</p>\n }\n </header>\n\n <div class=\"mapa-report-socio__skills\">\n @for (skill of competence.skills; track skill.id) {\n <article class=\"mapa-report-socio__skill\">\n <div class=\"mapa-report-socio__skill-visual\">\n <h4\n [attr.aria-label]=\"\n skillHeadingLabel(skill.name, skill.direction)\n \"\n >\n <span\n class=\"mapa-direction-indicator\"\n aria-hidden=\"true\"\n >{{ directionArrow(skill.direction) }}</span\n >\n <span>{{ skill.name }}</span>\n </h4>\n <div class=\"mapa-report-gauge\">\n <div\n class=\"mapa-report-gauge__visual\"\n role=\"meter\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-valuenow]=\"clamp(skill.value)\"\n [attr.aria-valuetext]=\"\n gaugeValueText(skill.value, skill.classification)\n \"\n [attr.aria-label]=\"\n i18n.texts.report.gaugeLabel(\n skill.name,\n clamp(skill.value)\n )\n \"\n [style.--mapa-gauge-color]=\"\n gaugeColor(skill.classification)\n \"\n >\n <svg\n class=\"mapa-report-gauge__arc\"\n viewBox=\"0 0 180 104\"\n aria-hidden=\"true\"\n >\n @for (\n segment of gaugeSegments;\n track segment.index\n ) {\n <line\n class=\"mapa-report-gauge__segment\"\n [class.mapa-report-gauge__segment--active]=\"\n segment.index <\n activeSegmentCount(skill.value)\n \"\n [attr.x1]=\"segment.x1\"\n [attr.y1]=\"segment.y1\"\n [attr.x2]=\"segment.x2\"\n [attr.y2]=\"segment.y2\"\n />\n }\n </svg>\n <div\n class=\"mapa-report-gauge__reading\"\n aria-hidden=\"true\"\n >\n <strong>{{ clamp(skill.value) }}</strong>\n <span>{{\n classificationLabel(skill.classification)\n }}</span>\n </div>\n </div>\n <div class=\"mapa-report-gauge__extremes\">\n <span>{{\n i18n.texts.report.lowerIntensityLabel\n }}</span>\n <span>{{\n i18n.texts.report.higherIntensityLabel\n }}</span>\n </div>\n </div>\n </div>\n <div class=\"mapa-report-socio__skill-copy\">\n @if (skill.concept) {\n <section class=\"mapa-report-socio__copy-block\">\n <h5>{{ i18n.texts.report.conceptTitle }}</h5>\n <div\n class=\"mapa-report-socio__concept\"\n [innerHTML]=\"skill.concept | safeHtml\"\n ></div>\n </section>\n }\n @if (skill.description) {\n <section class=\"mapa-report-socio__copy-block\">\n <h5>{{ i18n.texts.report.resultTitle }}</h5>\n <div\n class=\"mapa-report-socio__description\"\n [innerHTML]=\"skill.description | safeHtml\"\n ></div>\n </section>\n }\n </div>\n </article>\n }\n </div>\n </section>\n }\n </div>\n }\n\n @if (data().vulnerabilities.length) {\n <section class=\"mapa-report-socio__vulnerabilities\">\n @if (data().vulnerabilityLegend) {\n <mapa-report-legend\n appearance=\"psychosocial\"\n [expanded]=\"data().vulnerabilityLegend?.expanded ?? false\"\n [groups]=\"data().vulnerabilityLegend?.groups ?? []\"\n [groupsTitle]=\"data().vulnerabilityLegend?.groupsTitle\"\n [intro]=\"data().vulnerabilityLegend?.intro\"\n [title]=\"data().vulnerabilityLegend?.title\"\n />\n }\n\n @for (scale of data().vulnerabilities; track scale.id) {\n <section class=\"mapa-report-socio__vulnerability-scale\">\n <header class=\"mapa-report-socio__vulnerability-heading\">\n <h3>{{ scale.name }}</h3>\n @if (scale.concept) {\n <div [innerHTML]=\"scale.concept | safeHtml\"></div>\n }\n </header>\n\n <div\n class=\"mapa-report-socio__vulnerability-table\"\n role=\"table\"\n [attr.aria-label]=\"scale.name\"\n >\n <div class=\"mapa-report-socio__vulnerability-head\" role=\"row\">\n <span role=\"columnheader\">{{\n i18n.texts.report.dimensionTitle\n }}</span>\n <span role=\"columnheader\">{{\n i18n.texts.report.classificationTitle\n }}</span>\n <span role=\"columnheader\">{{\n i18n.texts.report.resultReadingTitle\n }}</span>\n </div>\n\n @for (item of vulnerabilityDimensions(scale); track item.id) {\n <article class=\"mapa-report-socio__vulnerability-row\" role=\"row\">\n <div\n class=\"mapa-report-socio__vulnerability-dimension\"\n role=\"cell\"\n >\n <span\n class=\"mapa-report-socio__cell-label\"\n aria-hidden=\"true\"\n >{{ i18n.texts.report.dimensionTitle }}</span\n >\n <h4\n [attr.aria-label]=\"\n skillHeadingLabel(item.name, item.direction)\n \"\n >\n <span>{{ item.name }}</span>\n <span\n class=\"mapa-direction-indicator\"\n aria-hidden=\"true\"\n >{{ directionArrow(item.direction) }}</span\n >\n </h4>\n </div>\n\n <div\n class=\"mapa-report-socio__vulnerability-classification\"\n role=\"cell\"\n >\n <span\n class=\"mapa-report-socio__cell-label\"\n aria-hidden=\"true\"\n >{{ i18n.texts.report.classificationTitle }}</span\n >\n <mapa-classification-tag\n appearance=\"solid\"\n casing=\"natural\"\n shape=\"rounded\"\n size=\"large\"\n [classification]=\"item.classification\"\n />\n </div>\n\n <div\n class=\"mapa-report-socio__vulnerability-reading\"\n role=\"cell\"\n >\n <span\n class=\"mapa-report-socio__cell-label\"\n aria-hidden=\"true\"\n >{{ i18n.texts.report.resultReadingTitle }}</span\n >\n <div class=\"mapa-report-socio__vulnerability-reading-grid\">\n @if (item.concept) {\n <section class=\"mapa-report-socio__copy-block\">\n <h4>{{ i18n.texts.report.conceptTitle }}</h4>\n <div\n class=\"mapa-report-socio__concept\"\n [innerHTML]=\"item.concept | safeHtml\"\n ></div>\n </section>\n }\n @if (item.description) {\n <section class=\"mapa-report-socio__copy-block\">\n <h4>{{ i18n.texts.report.resultTitle }}</h4>\n <div\n class=\"mapa-report-socio__description\"\n [innerHTML]=\"item.description | safeHtml\"\n ></div>\n </section>\n }\n </div>\n </div>\n </article>\n }\n </div>\n </section>\n }\n </section>\n }\n\n @if (!data().competencies.length && !data().vulnerabilities.length) {\n <p class=\"mapa-report-widget__empty\">{{ i18n.texts.report.emptyState }}</p>\n }\n</section>\n", styles: [":host{--mapa-report-accent: #ff560b;--mapa-report-accent-soft: #fff0e9;--mapa-report-surface: #fff;--mapa-report-surface-muted: #eef2f3;--mapa-report-border: #e1e5e7;--mapa-report-text: #263238;--mapa-report-muted: #68747a;--mapa-report-pill-width: 104px;--mapa-report-radius: 8px;--mapa-report-space: 20px;color:var(--mapa-report-text);display:block;font-family:var(--mapa-font-body, \"Asap\", \"Roboto\", sans-serif)}.mapa-report-widget{display:grid;gap:var(--mapa-report-space)}.mapa-report-widget__header{align-items:flex-start;display:flex;gap:16px;justify-content:space-between}.mapa-report-widget__heading{max-width:72ch}.mapa-report-widget__heading h2{color:var(--mapa-report-accent);font-size:20px;font-weight:650;line-height:1.25;margin:0}.mapa-report-widget__heading p{color:var(--mapa-report-muted);font-size:13px;line-height:1.5;margin:5px 0 0}.mapa-report-widget__modes{--mat-button-toggle-background-color: var(--mapa-report-surface);--mat-button-toggle-divider-color: #cbd5da;--mat-button-toggle-height: 32px;--mat-button-toggle-label-text-font: var( --mapa-font-body, \"Asap\", sans-serif );--mat-button-toggle-label-text-size: 13px;--mat-button-toggle-label-text-weight: 500;--mat-button-toggle-selected-state-background-color: #59636a;--mat-button-toggle-selected-state-text-color: #fffaf7;--mat-button-toggle-shape: 4px;--mat-button-toggle-text-color: #344b5e;border:1px solid #cbd5da;border-radius:4px;flex:0 0 auto;overflow:hidden}.mapa-report-widget__modes mat-button-toggle{font:500 13px/1 var(--mapa-font-body, \"Asap\", sans-serif)}.mapa-report-widget__modes mat-icon{font-size:14px;height:14px;margin-right:5px;width:14px}.mapa-report-widget__empty{color:var(--mapa-report-muted);margin:0;padding:24px 0;text-align:center}@media(max-width:760px){.mapa-report-widget__header{align-items:stretch;flex-direction:column}.mapa-report-widget__modes{align-self:flex-start}}.mapa-direction-indicator{background:var(--mapa-report-surface, var(--mapa-color-surface, #fafbfc));border:1px solid currentColor;border-radius:50%;box-sizing:border-box;color:var(--mapa-report-muted, var(--mapa-color-text-subtle, #68747a));display:inline-grid;flex:0 0 20px;font-size:11px;font-weight:700;height:20px;line-height:1;place-items:center;width:20px}.mapa-report-socio__competencies{display:grid;gap:28px}.mapa-report-socio__competence{display:grid;gap:12px}.mapa-report-socio__competence-heading{display:grid;gap:5px}.mapa-report-socio__competence-heading h3{font-size:20px;font-weight:500;margin:0}.mapa-report-socio__competence-heading p{color:var(--mapa-report-muted);font-size:12px;line-height:1.5;margin:0;max-width:72ch}.mapa-report-socio__skills,.mapa-report-socio__vulnerabilities{display:grid;gap:10px}.mapa-report-socio__skill{align-items:stretch;border:1px solid var(--mapa-report-border);border-radius:var(--mapa-report-radius);display:grid;gap:22px;grid-template-columns:210px minmax(0,1fr);padding:18px}.mapa-report-socio__skill-visual{align-content:start;display:grid;gap:10px;min-width:0}.mapa-report-socio__skill-visual>h4{align-items:center;display:inline-flex;font-size:14px;gap:8px;margin:0}.mapa-report-socio__skill-copy{align-content:center;display:grid;gap:16px;min-width:0}.mapa-report-socio__copy-block{display:grid;gap:4px}.mapa-report-socio__copy-block h5{color:var(--mapa-report-text);font-size:11px;font-weight:700;margin:0}.mapa-report-socio__concept{color:var(--mapa-report-text);font-size:12px;line-height:1.5}.mapa-report-socio__description{color:var(--mapa-report-muted);font-size:11px;line-height:1.5}.mapa-report-socio__vulnerabilities{gap:24px;margin-top:20px}.mapa-report-socio__vulnerability-scale{display:grid;gap:12px}.mapa-report-socio__vulnerability-heading{display:grid;gap:5px}.mapa-report-socio__vulnerability-heading h3{font-size:20px;font-weight:500;margin:0}.mapa-report-socio__vulnerability-heading>div{color:var(--mapa-report-muted);font-size:12px;line-height:1.5}.mapa-report-socio__vulnerability-table{border:1px solid var(--mapa-report-border);border-radius:var(--mapa-report-radius);overflow:hidden}.mapa-report-socio__vulnerability-head,.mapa-report-socio__vulnerability-row{align-items:center;display:grid;gap:18px;grid-template-columns:minmax(180px,.72fr) minmax(105px,.42fr) minmax(0,2fr)}.mapa-report-socio__vulnerability-head{background:var(--mapa-report-surface-muted);border-bottom:1px solid var(--mapa-report-border);color:var(--mapa-report-muted);font-size:10px;font-weight:600;letter-spacing:.03em;padding:10px 16px;text-transform:uppercase}.mapa-report-socio__vulnerability-row{min-height:118px;padding:16px}.mapa-report-socio__vulnerability-row+.mapa-report-socio__vulnerability-row{border-top:1px solid var(--mapa-report-border)}.mapa-report-socio__vulnerability-dimension{min-width:0}.mapa-report-socio__vulnerability-dimension h4{align-items:center;display:flex;font-size:14px;gap:8px;margin:0}.mapa-report-socio__vulnerability-classification{--mapa-classification-tag-min-width: var(--mapa-report-pill-width);min-width:0}.mapa-report-socio__vulnerability-reading{min-width:0}.mapa-report-socio__vulnerability-reading-grid{display:grid;gap:18px;grid-template-columns:minmax(140px,.72fr) minmax(0,1.28fr)}.mapa-report-socio__vulnerability-reading-grid>.mapa-report-socio__copy-block{border-left:1px solid var(--mapa-report-border);min-width:0;padding-left:13px}.mapa-report-socio__cell-label{display:none}.mapa-report-gauge{display:grid;justify-items:center;width:190px}.mapa-report-gauge__visual{height:104px;position:relative;width:180px}.mapa-report-gauge__arc{display:block;height:104px;width:180px}.mapa-report-gauge__segment{stroke:#dfe5e7;stroke-linecap:round;stroke-width:5}.mapa-report-gauge__segment--active{stroke:var(--mapa-gauge-color)}.mapa-report-gauge__reading{bottom:8px;color:var(--mapa-report-text);display:grid;justify-items:center;left:50%;line-height:1.1;position:absolute;transform:translate(-50%)}.mapa-report-gauge__reading strong{font-size:16px;font-weight:600}.mapa-report-gauge__reading span{color:var(--mapa-report-muted);font-size:11px;margin-top:2px}.mapa-report-gauge__extremes{color:var(--mapa-report-muted);display:flex;font-size:10px;justify-content:space-between;line-height:1.15;margin-top:3px;width:190px}.mapa-report-gauge__extremes span{max-width:68px}.mapa-report-gauge__extremes span:last-child{text-align:right}@media(max-width:760px){.mapa-report-socio__skill{grid-template-columns:1fr}.mapa-report-socio__skill-copy{align-content:start}.mapa-report-socio__vulnerability-head{display:none}.mapa-report-socio__vulnerability-row{align-items:start;gap:14px;grid-template-columns:1fr;min-height:0;padding:15px}.mapa-report-socio__vulnerability-dimension,.mapa-report-socio__vulnerability-classification,.mapa-report-socio__vulnerability-reading{display:grid;gap:6px}.mapa-report-socio__vulnerability-reading-grid{gap:10px;grid-template-columns:1fr}.mapa-report-socio__vulnerability-reading-grid>.mapa-report-socio__copy-block{border-left:0;border-top:1px solid var(--mapa-report-border);padding-left:0;padding-top:10px}.mapa-report-socio__cell-label{color:var(--mapa-report-muted);display:block;font-size:9px;font-weight:600;letter-spacing:.04em;text-transform:uppercase}}\n"], dependencies: [{ kind: "component", type: MapaClassificationTagComponent, selector: "mapa-classification-tag", inputs: ["classification", "size", "appearance", "shape", "casing", "fallbackLabel"] }, { kind: "component", type: MapaReportLegendComponent, selector: "mapa-report-legend", inputs: ["title", "intro", "groupsTitle", "groups", "expanded", "appearance"] }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
8794
|
+
}
|
|
8795
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaReportSocioemotionalWidgetComponent, decorators: [{
|
|
8796
|
+
type: Component,
|
|
8797
|
+
args: [{ selector: 'mapa-report-socioemotional-widget', standalone: true, imports: [
|
|
8798
|
+
MapaClassificationTagComponent,
|
|
8799
|
+
MapaReportLegendComponent,
|
|
8800
|
+
SafeHtmlPipe,
|
|
8801
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<section class=\"mapa-report-widget\" [attr.data-palette]=\"palette()\">\n <header class=\"mapa-report-widget__header\">\n <div class=\"mapa-report-widget__heading\">\n <h2>{{ heading().title }}</h2>\n @if (heading().description) {\n <p>{{ heading().description }}</p>\n }\n </div>\n </header>\n\n @if (data().legend) {\n <mapa-report-legend\n appearance=\"psychosocial\"\n [expanded]=\"data().legend?.expanded ?? false\"\n [groups]=\"data().legend?.groups ?? []\"\n [groupsTitle]=\"data().legend?.groupsTitle\"\n [intro]=\"data().legend?.intro\"\n [title]=\"data().legend?.title\"\n />\n }\n\n @if (data().competencies.length) {\n <div class=\"mapa-report-socio__competencies\">\n @for (competence of data().competencies; track competence.id) {\n <section class=\"mapa-report-socio__competence\">\n <header class=\"mapa-report-socio__competence-heading\">\n <h3>{{ competence.name }}</h3>\n @if (competence.description) {\n <p>{{ competence.description }}</p>\n }\n </header>\n\n <div class=\"mapa-report-socio__skills\">\n @for (skill of competence.skills; track skill.id) {\n <article class=\"mapa-report-socio__skill\">\n <div class=\"mapa-report-socio__skill-visual\">\n <h4\n [attr.aria-label]=\"\n skillHeadingLabel(skill.name, skill.direction)\n \"\n >\n <span\n class=\"mapa-direction-indicator\"\n aria-hidden=\"true\"\n >{{ directionArrow(skill.direction) }}</span\n >\n <span>{{ skill.name }}</span>\n </h4>\n <div class=\"mapa-report-gauge\">\n <div\n class=\"mapa-report-gauge__visual\"\n role=\"meter\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-valuenow]=\"clamp(skill.value)\"\n [attr.aria-valuetext]=\"\n gaugeValueText(skill.value, skill.classification)\n \"\n [attr.aria-label]=\"\n i18n.texts.report.gaugeLabel(\n skill.name,\n clamp(skill.value)\n )\n \"\n [style.--mapa-gauge-color]=\"\n gaugeColor(skill.classification)\n \"\n >\n <svg\n class=\"mapa-report-gauge__arc\"\n viewBox=\"0 0 180 104\"\n aria-hidden=\"true\"\n >\n @for (\n segment of gaugeSegments;\n track segment.index\n ) {\n <line\n class=\"mapa-report-gauge__segment\"\n [class.mapa-report-gauge__segment--active]=\"\n segment.index <\n activeSegmentCount(skill.value)\n \"\n [attr.x1]=\"segment.x1\"\n [attr.y1]=\"segment.y1\"\n [attr.x2]=\"segment.x2\"\n [attr.y2]=\"segment.y2\"\n />\n }\n </svg>\n <div\n class=\"mapa-report-gauge__reading\"\n aria-hidden=\"true\"\n >\n <strong>{{ clamp(skill.value) }}</strong>\n <span>{{\n classificationLabel(skill.classification)\n }}</span>\n </div>\n </div>\n <div class=\"mapa-report-gauge__extremes\">\n <span>{{\n i18n.texts.report.lowerIntensityLabel\n }}</span>\n <span>{{\n i18n.texts.report.higherIntensityLabel\n }}</span>\n </div>\n </div>\n </div>\n <div class=\"mapa-report-socio__skill-copy\">\n @if (skill.concept) {\n <section class=\"mapa-report-socio__copy-block\">\n <h5>{{ i18n.texts.report.conceptTitle }}</h5>\n <div\n class=\"mapa-report-socio__concept\"\n [innerHTML]=\"skill.concept | safeHtml\"\n ></div>\n </section>\n }\n @if (skill.description) {\n <section class=\"mapa-report-socio__copy-block\">\n <h5>{{ i18n.texts.report.resultTitle }}</h5>\n <div\n class=\"mapa-report-socio__description\"\n [innerHTML]=\"skill.description | safeHtml\"\n ></div>\n </section>\n }\n </div>\n </article>\n }\n </div>\n </section>\n }\n </div>\n }\n\n @if (data().vulnerabilities.length) {\n <section class=\"mapa-report-socio__vulnerabilities\">\n @if (data().vulnerabilityLegend) {\n <mapa-report-legend\n appearance=\"psychosocial\"\n [expanded]=\"data().vulnerabilityLegend?.expanded ?? false\"\n [groups]=\"data().vulnerabilityLegend?.groups ?? []\"\n [groupsTitle]=\"data().vulnerabilityLegend?.groupsTitle\"\n [intro]=\"data().vulnerabilityLegend?.intro\"\n [title]=\"data().vulnerabilityLegend?.title\"\n />\n }\n\n @for (scale of data().vulnerabilities; track scale.id) {\n <section class=\"mapa-report-socio__vulnerability-scale\">\n <header class=\"mapa-report-socio__vulnerability-heading\">\n <h3>{{ scale.name }}</h3>\n @if (scale.concept) {\n <div [innerHTML]=\"scale.concept | safeHtml\"></div>\n }\n </header>\n\n <div\n class=\"mapa-report-socio__vulnerability-table\"\n role=\"table\"\n [attr.aria-label]=\"scale.name\"\n >\n <div class=\"mapa-report-socio__vulnerability-head\" role=\"row\">\n <span role=\"columnheader\">{{\n i18n.texts.report.dimensionTitle\n }}</span>\n <span role=\"columnheader\">{{\n i18n.texts.report.classificationTitle\n }}</span>\n <span role=\"columnheader\">{{\n i18n.texts.report.resultReadingTitle\n }}</span>\n </div>\n\n @for (item of vulnerabilityDimensions(scale); track item.id) {\n <article class=\"mapa-report-socio__vulnerability-row\" role=\"row\">\n <div\n class=\"mapa-report-socio__vulnerability-dimension\"\n role=\"cell\"\n >\n <span\n class=\"mapa-report-socio__cell-label\"\n aria-hidden=\"true\"\n >{{ i18n.texts.report.dimensionTitle }}</span\n >\n <h4\n [attr.aria-label]=\"\n skillHeadingLabel(item.name, item.direction)\n \"\n >\n <span>{{ item.name }}</span>\n <span\n class=\"mapa-direction-indicator\"\n aria-hidden=\"true\"\n >{{ directionArrow(item.direction) }}</span\n >\n </h4>\n </div>\n\n <div\n class=\"mapa-report-socio__vulnerability-classification\"\n role=\"cell\"\n >\n <span\n class=\"mapa-report-socio__cell-label\"\n aria-hidden=\"true\"\n >{{ i18n.texts.report.classificationTitle }}</span\n >\n <mapa-classification-tag\n appearance=\"solid\"\n casing=\"natural\"\n shape=\"rounded\"\n size=\"large\"\n [classification]=\"item.classification\"\n />\n </div>\n\n <div\n class=\"mapa-report-socio__vulnerability-reading\"\n role=\"cell\"\n >\n <span\n class=\"mapa-report-socio__cell-label\"\n aria-hidden=\"true\"\n >{{ i18n.texts.report.resultReadingTitle }}</span\n >\n <div class=\"mapa-report-socio__vulnerability-reading-grid\">\n @if (item.concept) {\n <section class=\"mapa-report-socio__copy-block\">\n <h4>{{ i18n.texts.report.conceptTitle }}</h4>\n <div\n class=\"mapa-report-socio__concept\"\n [innerHTML]=\"item.concept | safeHtml\"\n ></div>\n </section>\n }\n @if (item.description) {\n <section class=\"mapa-report-socio__copy-block\">\n <h4>{{ i18n.texts.report.resultTitle }}</h4>\n <div\n class=\"mapa-report-socio__description\"\n [innerHTML]=\"item.description | safeHtml\"\n ></div>\n </section>\n }\n </div>\n </div>\n </article>\n }\n </div>\n </section>\n }\n </section>\n }\n\n @if (!data().competencies.length && !data().vulnerabilities.length) {\n <p class=\"mapa-report-widget__empty\">{{ i18n.texts.report.emptyState }}</p>\n }\n</section>\n", styles: [":host{--mapa-report-accent: #ff560b;--mapa-report-accent-soft: #fff0e9;--mapa-report-surface: #fff;--mapa-report-surface-muted: #eef2f3;--mapa-report-border: #e1e5e7;--mapa-report-text: #263238;--mapa-report-muted: #68747a;--mapa-report-pill-width: 104px;--mapa-report-radius: 8px;--mapa-report-space: 20px;color:var(--mapa-report-text);display:block;font-family:var(--mapa-font-body, \"Asap\", \"Roboto\", sans-serif)}.mapa-report-widget{display:grid;gap:var(--mapa-report-space)}.mapa-report-widget__header{align-items:flex-start;display:flex;gap:16px;justify-content:space-between}.mapa-report-widget__heading{max-width:72ch}.mapa-report-widget__heading h2{color:var(--mapa-report-accent);font-size:20px;font-weight:650;line-height:1.25;margin:0}.mapa-report-widget__heading p{color:var(--mapa-report-muted);font-size:13px;line-height:1.5;margin:5px 0 0}.mapa-report-widget__modes{--mat-button-toggle-background-color: var(--mapa-report-surface);--mat-button-toggle-divider-color: #cbd5da;--mat-button-toggle-height: 32px;--mat-button-toggle-label-text-font: var( --mapa-font-body, \"Asap\", sans-serif );--mat-button-toggle-label-text-size: 13px;--mat-button-toggle-label-text-weight: 500;--mat-button-toggle-selected-state-background-color: #59636a;--mat-button-toggle-selected-state-text-color: #fffaf7;--mat-button-toggle-shape: 4px;--mat-button-toggle-text-color: #344b5e;border:1px solid #cbd5da;border-radius:4px;flex:0 0 auto;overflow:hidden}.mapa-report-widget__modes mat-button-toggle{font:500 13px/1 var(--mapa-font-body, \"Asap\", sans-serif)}.mapa-report-widget__modes mat-icon{font-size:14px;height:14px;margin-right:5px;width:14px}.mapa-report-widget__empty{color:var(--mapa-report-muted);margin:0;padding:24px 0;text-align:center}@media(max-width:760px){.mapa-report-widget__header{align-items:stretch;flex-direction:column}.mapa-report-widget__modes{align-self:flex-start}}.mapa-direction-indicator{background:var(--mapa-report-surface, var(--mapa-color-surface, #fafbfc));border:1px solid currentColor;border-radius:50%;box-sizing:border-box;color:var(--mapa-report-muted, var(--mapa-color-text-subtle, #68747a));display:inline-grid;flex:0 0 20px;font-size:11px;font-weight:700;height:20px;line-height:1;place-items:center;width:20px}.mapa-report-socio__competencies{display:grid;gap:28px}.mapa-report-socio__competence{display:grid;gap:12px}.mapa-report-socio__competence-heading{display:grid;gap:5px}.mapa-report-socio__competence-heading h3{font-size:20px;font-weight:500;margin:0}.mapa-report-socio__competence-heading p{color:var(--mapa-report-muted);font-size:12px;line-height:1.5;margin:0;max-width:72ch}.mapa-report-socio__skills,.mapa-report-socio__vulnerabilities{display:grid;gap:10px}.mapa-report-socio__skill{align-items:stretch;border:1px solid var(--mapa-report-border);border-radius:var(--mapa-report-radius);display:grid;gap:22px;grid-template-columns:210px minmax(0,1fr);padding:18px}.mapa-report-socio__skill-visual{align-content:start;display:grid;gap:10px;min-width:0}.mapa-report-socio__skill-visual>h4{align-items:center;display:inline-flex;font-size:14px;gap:8px;margin:0}.mapa-report-socio__skill-copy{align-content:center;display:grid;gap:16px;min-width:0}.mapa-report-socio__copy-block{display:grid;gap:4px}.mapa-report-socio__copy-block h5{color:var(--mapa-report-text);font-size:11px;font-weight:700;margin:0}.mapa-report-socio__concept{color:var(--mapa-report-text);font-size:12px;line-height:1.5}.mapa-report-socio__description{color:var(--mapa-report-muted);font-size:11px;line-height:1.5}.mapa-report-socio__vulnerabilities{gap:24px;margin-top:20px}.mapa-report-socio__vulnerability-scale{display:grid;gap:12px}.mapa-report-socio__vulnerability-heading{display:grid;gap:5px}.mapa-report-socio__vulnerability-heading h3{font-size:20px;font-weight:500;margin:0}.mapa-report-socio__vulnerability-heading>div{color:var(--mapa-report-muted);font-size:12px;line-height:1.5}.mapa-report-socio__vulnerability-table{border:1px solid var(--mapa-report-border);border-radius:var(--mapa-report-radius);overflow:hidden}.mapa-report-socio__vulnerability-head,.mapa-report-socio__vulnerability-row{align-items:center;display:grid;gap:18px;grid-template-columns:minmax(180px,.72fr) minmax(105px,.42fr) minmax(0,2fr)}.mapa-report-socio__vulnerability-head{background:var(--mapa-report-surface-muted);border-bottom:1px solid var(--mapa-report-border);color:var(--mapa-report-muted);font-size:10px;font-weight:600;letter-spacing:.03em;padding:10px 16px;text-transform:uppercase}.mapa-report-socio__vulnerability-row{min-height:118px;padding:16px}.mapa-report-socio__vulnerability-row+.mapa-report-socio__vulnerability-row{border-top:1px solid var(--mapa-report-border)}.mapa-report-socio__vulnerability-dimension{min-width:0}.mapa-report-socio__vulnerability-dimension h4{align-items:center;display:flex;font-size:14px;gap:8px;margin:0}.mapa-report-socio__vulnerability-classification{--mapa-classification-tag-min-width: var(--mapa-report-pill-width);min-width:0}.mapa-report-socio__vulnerability-reading{min-width:0}.mapa-report-socio__vulnerability-reading-grid{display:grid;gap:18px;grid-template-columns:minmax(140px,.72fr) minmax(0,1.28fr)}.mapa-report-socio__vulnerability-reading-grid>.mapa-report-socio__copy-block{border-left:1px solid var(--mapa-report-border);min-width:0;padding-left:13px}.mapa-report-socio__cell-label{display:none}.mapa-report-gauge{display:grid;justify-items:center;width:190px}.mapa-report-gauge__visual{height:104px;position:relative;width:180px}.mapa-report-gauge__arc{display:block;height:104px;width:180px}.mapa-report-gauge__segment{stroke:#dfe5e7;stroke-linecap:round;stroke-width:5}.mapa-report-gauge__segment--active{stroke:var(--mapa-gauge-color)}.mapa-report-gauge__reading{bottom:8px;color:var(--mapa-report-text);display:grid;justify-items:center;left:50%;line-height:1.1;position:absolute;transform:translate(-50%)}.mapa-report-gauge__reading strong{font-size:16px;font-weight:600}.mapa-report-gauge__reading span{color:var(--mapa-report-muted);font-size:11px;margin-top:2px}.mapa-report-gauge__extremes{color:var(--mapa-report-muted);display:flex;font-size:10px;justify-content:space-between;line-height:1.15;margin-top:3px;width:190px}.mapa-report-gauge__extremes span{max-width:68px}.mapa-report-gauge__extremes span:last-child{text-align:right}@media(max-width:760px){.mapa-report-socio__skill{grid-template-columns:1fr}.mapa-report-socio__skill-copy{align-content:start}.mapa-report-socio__vulnerability-head{display:none}.mapa-report-socio__vulnerability-row{align-items:start;gap:14px;grid-template-columns:1fr;min-height:0;padding:15px}.mapa-report-socio__vulnerability-dimension,.mapa-report-socio__vulnerability-classification,.mapa-report-socio__vulnerability-reading{display:grid;gap:6px}.mapa-report-socio__vulnerability-reading-grid{gap:10px;grid-template-columns:1fr}.mapa-report-socio__vulnerability-reading-grid>.mapa-report-socio__copy-block{border-left:0;border-top:1px solid var(--mapa-report-border);padding-left:0;padding-top:10px}.mapa-report-socio__cell-label{color:var(--mapa-report-muted);display:block;font-size:9px;font-weight:600;letter-spacing:.04em;text-transform:uppercase}}\n"] }]
|
|
8802
|
+
}], propDecorators: { heading: [{ type: i0.Input, args: [{ isSignal: true, alias: "heading", required: true }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], palette: [{ type: i0.Input, args: [{ isSignal: true, alias: "palette", required: false }] }] } });
|
|
8803
|
+
|
|
8804
|
+
class MapaReportPsychosocialWidgetComponent {
|
|
8805
|
+
constructor() {
|
|
8806
|
+
this.i18n = inject(MapaI18nService);
|
|
8807
|
+
this.heading = input.required(...(ngDevMode ? [{ debugName: "heading" }] : []));
|
|
8808
|
+
this.data = input.required(...(ngDevMode ? [{ debugName: "data" }] : []));
|
|
8809
|
+
this.palette = input('current', ...(ngDevMode ? [{ debugName: "palette" }] : []));
|
|
8810
|
+
}
|
|
8811
|
+
color(indicator) {
|
|
8812
|
+
return (indicator.classification?.classificationColor ??
|
|
8813
|
+
(indicator.direction === 'negative' ? '#e84d68' : '#2c93dc'));
|
|
8814
|
+
}
|
|
8815
|
+
directionArrow(direction) {
|
|
8816
|
+
return direction === 'negative' ? '↓' : '↑';
|
|
8817
|
+
}
|
|
8818
|
+
directionLabel(direction) {
|
|
8819
|
+
return direction === 'negative'
|
|
8820
|
+
? this.i18n.texts.report.negativeDirectionLabel
|
|
8821
|
+
: this.i18n.texts.report.positiveDirectionLabel;
|
|
8822
|
+
}
|
|
8823
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaReportPsychosocialWidgetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8824
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.21", type: MapaReportPsychosocialWidgetComponent, isStandalone: true, selector: "mapa-report-psychosocial-widget", inputs: { heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: true, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, palette: { classPropertyName: "palette", publicName: "palette", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<section class=\"mapa-report-widget\" [attr.data-palette]=\"palette()\">\n <header class=\"mapa-report-widget__header\">\n <div class=\"mapa-report-widget__heading\">\n <h2>{{ heading().title }}</h2>\n @if (heading().description) {\n <p>{{ heading().description }}</p>\n }\n </div>\n </header>\n\n @if (data().legendGroups?.length || data().readingIntro) {\n <mapa-report-legend\n appearance=\"psychosocial\"\n [intro]=\"data().readingIntro\"\n [groups]=\"data().legendGroups || []\"\n />\n }\n\n @if (data().globalAverage !== undefined) {\n <section class=\"mapa-report-psychosocial__global\">\n <h3>{{ i18n.texts.report.globalAverageTitle }}</h3>\n <mapa-result-track\n [name]=\"i18n.texts.report.globalAverageTitle\"\n [value]=\"data().globalAverage || 0\"\n />\n @if (data().globalDescription) {\n <div [innerHTML]=\"data().globalDescription | safeHtml\"></div>\n }\n </section>\n }\n\n @if (data().factors?.length) {\n <div class=\"mapa-report-psychosocial__factors\">\n @for (group of data().factors; track group.id) {\n <section class=\"mapa-report-psychosocial__group\">\n <h3>{{ group.name }}</h3>\n @for (indicator of group.indicators; track indicator.id) {\n <article class=\"mapa-report-psychosocial__factor\">\n <header>\n <h4>{{ indicator.name }}</h4>\n <mapa-result-track\n mode=\"diverging\"\n [name]=\"indicator.name\"\n [value]=\"indicator.value ?? 0\"\n [direction]=\"indicator.direction || 'positive'\"\n [color]=\"color(indicator)\"\n />\n <strong>{{ indicator.value ?? 0 }}%</strong>\n </header>\n\n @if (indicator.concept) {\n <section class=\"mapa-report-psychosocial__concept\">\n <h5>{{ i18n.texts.report.scaleConceptTitle }}</h5>\n <div [innerHTML]=\"indicator.concept | safeHtml\"></div>\n </section>\n }\n\n @if (indicator.description) {\n <div\n class=\"mapa-report-psychosocial__description\"\n [innerHTML]=\"indicator.description | safeHtml\"\n ></div>\n }\n\n @if (indicator.dimensions?.length) {\n <section class=\"mapa-report-psychosocial__dimensions\">\n <h5>{{ i18n.texts.report.psychosocialFactorsTitle }}</h5>\n <div class=\"mapa-report-psychosocial__dimension-list\">\n @for (dimension of indicator.dimensions; track dimension.id) {\n <div class=\"mapa-report-psychosocial__dimension\">\n <span class=\"mapa-report-psychosocial__dimension-name\">\n <span\n class=\"mapa-direction-indicator\"\n [attr.aria-label]=\"\n directionLabel(\n dimension.direction || indicator.direction\n )\n \"\n >{{\n directionArrow(\n dimension.direction || indicator.direction\n )\n }}</span\n >\n <span>{{ dimension.name }}</span>\n </span>\n <mapa-result-track\n mode=\"diverging\"\n [name]=\"dimension.name\"\n [value]=\"dimension.value ?? 0\"\n [direction]=\"\n dimension.direction ||\n indicator.direction ||\n 'positive'\n \"\n [color]=\"\n dimension.classification?.classificationColor ||\n color(indicator)\n \"\n />\n <strong>{{ dimension.value ?? 0 }}%</strong>\n </div>\n }\n </div>\n </section>\n }\n </article>\n }\n </section>\n }\n </div>\n } @else if (data().globalAverage === undefined) {\n <p class=\"mapa-report-widget__empty\">{{ i18n.texts.report.emptyState }}</p>\n }\n</section>\n", styles: [":host{--mapa-report-accent: #ff560b;--mapa-report-accent-soft: #fff0e9;--mapa-report-surface: #fff;--mapa-report-surface-muted: #eef2f3;--mapa-report-border: #e1e5e7;--mapa-report-text: #263238;--mapa-report-muted: #68747a;--mapa-report-pill-width: 104px;--mapa-report-radius: 8px;--mapa-report-space: 20px;color:var(--mapa-report-text);display:block;font-family:var(--mapa-font-body, \"Asap\", \"Roboto\", sans-serif)}.mapa-report-widget{display:grid;gap:var(--mapa-report-space)}.mapa-report-widget__header{align-items:flex-start;display:flex;gap:16px;justify-content:space-between}.mapa-report-widget__heading{max-width:72ch}.mapa-report-widget__heading h2{color:var(--mapa-report-accent);font-size:20px;font-weight:650;line-height:1.25;margin:0}.mapa-report-widget__heading p{color:var(--mapa-report-muted);font-size:13px;line-height:1.5;margin:5px 0 0}.mapa-report-widget__modes{--mat-button-toggle-background-color: var(--mapa-report-surface);--mat-button-toggle-divider-color: #cbd5da;--mat-button-toggle-height: 32px;--mat-button-toggle-label-text-font: var( --mapa-font-body, \"Asap\", sans-serif );--mat-button-toggle-label-text-size: 13px;--mat-button-toggle-label-text-weight: 500;--mat-button-toggle-selected-state-background-color: #59636a;--mat-button-toggle-selected-state-text-color: #fffaf7;--mat-button-toggle-shape: 4px;--mat-button-toggle-text-color: #344b5e;border:1px solid #cbd5da;border-radius:4px;flex:0 0 auto;overflow:hidden}.mapa-report-widget__modes mat-button-toggle{font:500 13px/1 var(--mapa-font-body, \"Asap\", sans-serif)}.mapa-report-widget__modes mat-icon{font-size:14px;height:14px;margin-right:5px;width:14px}.mapa-report-widget__empty{color:var(--mapa-report-muted);margin:0;padding:24px 0;text-align:center}@media(max-width:760px){.mapa-report-widget__header{align-items:stretch;flex-direction:column}.mapa-report-widget__modes{align-self:flex-start}}.mapa-direction-indicator{background:var(--mapa-report-surface, var(--mapa-color-surface, #fafbfc));border:1px solid currentColor;border-radius:50%;box-sizing:border-box;color:var(--mapa-report-muted, var(--mapa-color-text-subtle, #68747a));display:inline-grid;flex:0 0 20px;font-size:11px;font-weight:700;height:20px;line-height:1;place-items:center;width:20px}.mapa-report-psychosocial__global{align-items:center;background:var(--mapa-report-surface);border:1px solid var(--mapa-report-border);border-radius:12px;display:grid;gap:12px 24px;grid-template-columns:minmax(180px,.62fr) minmax(260px,1.38fr);padding:16px 18px}.mapa-report-psychosocial__global h3{font-size:14px;margin:0}.mapa-report-psychosocial__global>div{color:var(--mapa-report-muted);font-size:12px;grid-column:1/-1;line-height:1.55}.mapa-report-psychosocial__factors,.mapa-report-psychosocial__group{display:grid}.mapa-report-psychosocial__factors{gap:28px}.mapa-report-psychosocial__group{gap:12px}.mapa-report-psychosocial__group>h3{align-items:center;border-bottom:1px solid var(--mapa-report-border);color:var(--mapa-report-text);display:flex;font-size:18px;font-weight:600;gap:11px;line-height:1.25;margin:0;padding:2px 2px 12px}.mapa-report-psychosocial__group>h3:before{background:var(--mapa-report-accent);border-radius:4px;content:\"\";flex:0 0 4px;height:24px}.mapa-report-psychosocial__factor{background:var(--mapa-report-surface);border:1px solid var(--mapa-report-border);border-radius:13px;overflow:hidden}.mapa-report-psychosocial__factor>header{align-items:center;display:grid;gap:20px;grid-template-columns:minmax(180px,1fr) minmax(260px,1.2fr) auto;padding:17px 18px 14px}.mapa-report-psychosocial__factor>header h4{color:#274866;font-size:17px;font-weight:500;line-height:1.25;margin:0}.mapa-report-psychosocial__factor>header>strong{color:var(--mapa-report-text);font-size:18px;text-align:right}.mapa-report-psychosocial__concept{background:#f8f9fa;border-radius:10px;margin:0 18px;padding:13px 14px}.mapa-report-psychosocial__concept div{color:var(--mapa-report-muted);font-size:12px;line-height:1.6}.mapa-report-psychosocial__concept p{margin:0}.mapa-report-psychosocial__description{color:var(--mapa-report-muted);font-size:12px;line-height:1.55;padding:14px 18px 0}.mapa-report-psychosocial__description p{margin:0}.mapa-report-psychosocial__concept h5,.mapa-report-psychosocial__dimensions h5{align-items:center;color:#53646e;display:flex;font-size:10px;font-weight:800;gap:10px;letter-spacing:.06em;margin:0 0 8px;text-transform:uppercase}.mapa-report-psychosocial__concept h5:after,.mapa-report-psychosocial__dimensions h5:after{background:var(--mapa-report-border);content:\"\";flex:1;height:1px}.mapa-report-psychosocial__dimensions{padding:16px 18px 18px}.mapa-report-psychosocial__dimensions h5{margin-bottom:10px}.mapa-report-psychosocial__dimension-list{display:grid}.mapa-report-psychosocial__dimension{align-items:center;display:grid;gap:14px;grid-template-columns:212px minmax(220px,1fr) 45px;min-height:34px;padding:5px 0}.mapa-report-psychosocial__dimension+.mapa-report-psychosocial__dimension{border-top:1px solid #edf0f2}.mapa-report-psychosocial__dimension>strong{color:var(--mapa-report-muted);font-size:11px;text-align:right}.mapa-report-psychosocial__dimension-name{align-items:center;color:#3f5870;display:flex;font-size:12px;gap:7px;min-width:0}.mapa-report-psychosocial__dimension-name>span:last-child{overflow-wrap:anywhere}@media(max-width:760px){.mapa-report-psychosocial__global,.mapa-report-psychosocial__factor>header,.mapa-report-psychosocial__dimension{grid-template-columns:1fr}.mapa-report-psychosocial__factor>header{gap:8px}.mapa-report-psychosocial__factor>header>strong{text-align:left}.mapa-report-psychosocial__dimension{gap:4px}.mapa-report-psychosocial__dimension>strong{text-align:left}.mapa-report-psychosocial__concept{margin:0 14px}.mapa-report-psychosocial__dimensions{padding:14px}}\n"], dependencies: [{ kind: "component", type: MapaReportLegendComponent, selector: "mapa-report-legend", inputs: ["title", "intro", "groupsTitle", "groups", "expanded", "appearance"] }, { kind: "component", type: MapaResultTrackComponent, selector: "mapa-result-track", inputs: ["name", "value", "color", "mode", "appearance", "direction", "showValue", "ariaLabel"] }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
8825
|
+
}
|
|
8826
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaReportPsychosocialWidgetComponent, decorators: [{
|
|
8827
|
+
type: Component,
|
|
8828
|
+
args: [{ selector: 'mapa-report-psychosocial-widget', standalone: true, imports: [
|
|
8829
|
+
MapaReportLegendComponent,
|
|
8830
|
+
MapaResultTrackComponent,
|
|
8831
|
+
SafeHtmlPipe,
|
|
8832
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<section class=\"mapa-report-widget\" [attr.data-palette]=\"palette()\">\n <header class=\"mapa-report-widget__header\">\n <div class=\"mapa-report-widget__heading\">\n <h2>{{ heading().title }}</h2>\n @if (heading().description) {\n <p>{{ heading().description }}</p>\n }\n </div>\n </header>\n\n @if (data().legendGroups?.length || data().readingIntro) {\n <mapa-report-legend\n appearance=\"psychosocial\"\n [intro]=\"data().readingIntro\"\n [groups]=\"data().legendGroups || []\"\n />\n }\n\n @if (data().globalAverage !== undefined) {\n <section class=\"mapa-report-psychosocial__global\">\n <h3>{{ i18n.texts.report.globalAverageTitle }}</h3>\n <mapa-result-track\n [name]=\"i18n.texts.report.globalAverageTitle\"\n [value]=\"data().globalAverage || 0\"\n />\n @if (data().globalDescription) {\n <div [innerHTML]=\"data().globalDescription | safeHtml\"></div>\n }\n </section>\n }\n\n @if (data().factors?.length) {\n <div class=\"mapa-report-psychosocial__factors\">\n @for (group of data().factors; track group.id) {\n <section class=\"mapa-report-psychosocial__group\">\n <h3>{{ group.name }}</h3>\n @for (indicator of group.indicators; track indicator.id) {\n <article class=\"mapa-report-psychosocial__factor\">\n <header>\n <h4>{{ indicator.name }}</h4>\n <mapa-result-track\n mode=\"diverging\"\n [name]=\"indicator.name\"\n [value]=\"indicator.value ?? 0\"\n [direction]=\"indicator.direction || 'positive'\"\n [color]=\"color(indicator)\"\n />\n <strong>{{ indicator.value ?? 0 }}%</strong>\n </header>\n\n @if (indicator.concept) {\n <section class=\"mapa-report-psychosocial__concept\">\n <h5>{{ i18n.texts.report.scaleConceptTitle }}</h5>\n <div [innerHTML]=\"indicator.concept | safeHtml\"></div>\n </section>\n }\n\n @if (indicator.description) {\n <div\n class=\"mapa-report-psychosocial__description\"\n [innerHTML]=\"indicator.description | safeHtml\"\n ></div>\n }\n\n @if (indicator.dimensions?.length) {\n <section class=\"mapa-report-psychosocial__dimensions\">\n <h5>{{ i18n.texts.report.psychosocialFactorsTitle }}</h5>\n <div class=\"mapa-report-psychosocial__dimension-list\">\n @for (dimension of indicator.dimensions; track dimension.id) {\n <div class=\"mapa-report-psychosocial__dimension\">\n <span class=\"mapa-report-psychosocial__dimension-name\">\n <span\n class=\"mapa-direction-indicator\"\n [attr.aria-label]=\"\n directionLabel(\n dimension.direction || indicator.direction\n )\n \"\n >{{\n directionArrow(\n dimension.direction || indicator.direction\n )\n }}</span\n >\n <span>{{ dimension.name }}</span>\n </span>\n <mapa-result-track\n mode=\"diverging\"\n [name]=\"dimension.name\"\n [value]=\"dimension.value ?? 0\"\n [direction]=\"\n dimension.direction ||\n indicator.direction ||\n 'positive'\n \"\n [color]=\"\n dimension.classification?.classificationColor ||\n color(indicator)\n \"\n />\n <strong>{{ dimension.value ?? 0 }}%</strong>\n </div>\n }\n </div>\n </section>\n }\n </article>\n }\n </section>\n }\n </div>\n } @else if (data().globalAverage === undefined) {\n <p class=\"mapa-report-widget__empty\">{{ i18n.texts.report.emptyState }}</p>\n }\n</section>\n", styles: [":host{--mapa-report-accent: #ff560b;--mapa-report-accent-soft: #fff0e9;--mapa-report-surface: #fff;--mapa-report-surface-muted: #eef2f3;--mapa-report-border: #e1e5e7;--mapa-report-text: #263238;--mapa-report-muted: #68747a;--mapa-report-pill-width: 104px;--mapa-report-radius: 8px;--mapa-report-space: 20px;color:var(--mapa-report-text);display:block;font-family:var(--mapa-font-body, \"Asap\", \"Roboto\", sans-serif)}.mapa-report-widget{display:grid;gap:var(--mapa-report-space)}.mapa-report-widget__header{align-items:flex-start;display:flex;gap:16px;justify-content:space-between}.mapa-report-widget__heading{max-width:72ch}.mapa-report-widget__heading h2{color:var(--mapa-report-accent);font-size:20px;font-weight:650;line-height:1.25;margin:0}.mapa-report-widget__heading p{color:var(--mapa-report-muted);font-size:13px;line-height:1.5;margin:5px 0 0}.mapa-report-widget__modes{--mat-button-toggle-background-color: var(--mapa-report-surface);--mat-button-toggle-divider-color: #cbd5da;--mat-button-toggle-height: 32px;--mat-button-toggle-label-text-font: var( --mapa-font-body, \"Asap\", sans-serif );--mat-button-toggle-label-text-size: 13px;--mat-button-toggle-label-text-weight: 500;--mat-button-toggle-selected-state-background-color: #59636a;--mat-button-toggle-selected-state-text-color: #fffaf7;--mat-button-toggle-shape: 4px;--mat-button-toggle-text-color: #344b5e;border:1px solid #cbd5da;border-radius:4px;flex:0 0 auto;overflow:hidden}.mapa-report-widget__modes mat-button-toggle{font:500 13px/1 var(--mapa-font-body, \"Asap\", sans-serif)}.mapa-report-widget__modes mat-icon{font-size:14px;height:14px;margin-right:5px;width:14px}.mapa-report-widget__empty{color:var(--mapa-report-muted);margin:0;padding:24px 0;text-align:center}@media(max-width:760px){.mapa-report-widget__header{align-items:stretch;flex-direction:column}.mapa-report-widget__modes{align-self:flex-start}}.mapa-direction-indicator{background:var(--mapa-report-surface, var(--mapa-color-surface, #fafbfc));border:1px solid currentColor;border-radius:50%;box-sizing:border-box;color:var(--mapa-report-muted, var(--mapa-color-text-subtle, #68747a));display:inline-grid;flex:0 0 20px;font-size:11px;font-weight:700;height:20px;line-height:1;place-items:center;width:20px}.mapa-report-psychosocial__global{align-items:center;background:var(--mapa-report-surface);border:1px solid var(--mapa-report-border);border-radius:12px;display:grid;gap:12px 24px;grid-template-columns:minmax(180px,.62fr) minmax(260px,1.38fr);padding:16px 18px}.mapa-report-psychosocial__global h3{font-size:14px;margin:0}.mapa-report-psychosocial__global>div{color:var(--mapa-report-muted);font-size:12px;grid-column:1/-1;line-height:1.55}.mapa-report-psychosocial__factors,.mapa-report-psychosocial__group{display:grid}.mapa-report-psychosocial__factors{gap:28px}.mapa-report-psychosocial__group{gap:12px}.mapa-report-psychosocial__group>h3{align-items:center;border-bottom:1px solid var(--mapa-report-border);color:var(--mapa-report-text);display:flex;font-size:18px;font-weight:600;gap:11px;line-height:1.25;margin:0;padding:2px 2px 12px}.mapa-report-psychosocial__group>h3:before{background:var(--mapa-report-accent);border-radius:4px;content:\"\";flex:0 0 4px;height:24px}.mapa-report-psychosocial__factor{background:var(--mapa-report-surface);border:1px solid var(--mapa-report-border);border-radius:13px;overflow:hidden}.mapa-report-psychosocial__factor>header{align-items:center;display:grid;gap:20px;grid-template-columns:minmax(180px,1fr) minmax(260px,1.2fr) auto;padding:17px 18px 14px}.mapa-report-psychosocial__factor>header h4{color:#274866;font-size:17px;font-weight:500;line-height:1.25;margin:0}.mapa-report-psychosocial__factor>header>strong{color:var(--mapa-report-text);font-size:18px;text-align:right}.mapa-report-psychosocial__concept{background:#f8f9fa;border-radius:10px;margin:0 18px;padding:13px 14px}.mapa-report-psychosocial__concept div{color:var(--mapa-report-muted);font-size:12px;line-height:1.6}.mapa-report-psychosocial__concept p{margin:0}.mapa-report-psychosocial__description{color:var(--mapa-report-muted);font-size:12px;line-height:1.55;padding:14px 18px 0}.mapa-report-psychosocial__description p{margin:0}.mapa-report-psychosocial__concept h5,.mapa-report-psychosocial__dimensions h5{align-items:center;color:#53646e;display:flex;font-size:10px;font-weight:800;gap:10px;letter-spacing:.06em;margin:0 0 8px;text-transform:uppercase}.mapa-report-psychosocial__concept h5:after,.mapa-report-psychosocial__dimensions h5:after{background:var(--mapa-report-border);content:\"\";flex:1;height:1px}.mapa-report-psychosocial__dimensions{padding:16px 18px 18px}.mapa-report-psychosocial__dimensions h5{margin-bottom:10px}.mapa-report-psychosocial__dimension-list{display:grid}.mapa-report-psychosocial__dimension{align-items:center;display:grid;gap:14px;grid-template-columns:212px minmax(220px,1fr) 45px;min-height:34px;padding:5px 0}.mapa-report-psychosocial__dimension+.mapa-report-psychosocial__dimension{border-top:1px solid #edf0f2}.mapa-report-psychosocial__dimension>strong{color:var(--mapa-report-muted);font-size:11px;text-align:right}.mapa-report-psychosocial__dimension-name{align-items:center;color:#3f5870;display:flex;font-size:12px;gap:7px;min-width:0}.mapa-report-psychosocial__dimension-name>span:last-child{overflow-wrap:anywhere}@media(max-width:760px){.mapa-report-psychosocial__global,.mapa-report-psychosocial__factor>header,.mapa-report-psychosocial__dimension{grid-template-columns:1fr}.mapa-report-psychosocial__factor>header{gap:8px}.mapa-report-psychosocial__factor>header>strong{text-align:left}.mapa-report-psychosocial__dimension{gap:4px}.mapa-report-psychosocial__dimension>strong{text-align:left}.mapa-report-psychosocial__concept{margin:0 14px}.mapa-report-psychosocial__dimensions{padding:14px}}\n"] }]
|
|
8833
|
+
}], propDecorators: { heading: [{ type: i0.Input, args: [{ isSignal: true, alias: "heading", required: true }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], palette: [{ type: i0.Input, args: [{ isSignal: true, alias: "palette", required: false }] }] } });
|
|
8834
|
+
|
|
8835
|
+
class MapaReportPointsWidgetComponent {
|
|
8836
|
+
constructor() {
|
|
8837
|
+
this.i18n = inject(MapaI18nService);
|
|
8838
|
+
this.heading = input.required(...(ngDevMode ? [{ debugName: "heading" }] : []));
|
|
8839
|
+
this.data = input.required(...(ngDevMode ? [{ debugName: "data" }] : []));
|
|
8840
|
+
this.palette = input('current', ...(ngDevMode ? [{ debugName: "palette" }] : []));
|
|
8841
|
+
this.mode = model('summarized', ...(ngDevMode ? [{ debugName: "mode" }] : []));
|
|
8842
|
+
}
|
|
8843
|
+
color(item, fallback) {
|
|
8844
|
+
return item.classification?.classificationColor ?? fallback;
|
|
8845
|
+
}
|
|
8846
|
+
countLabel(count) {
|
|
8847
|
+
return this.i18n.texts.report.itemCountLabel(count);
|
|
8848
|
+
}
|
|
8849
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaReportPointsWidgetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8850
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.21", type: MapaReportPointsWidgetComponent, isStandalone: true, selector: "mapa-report-points-widget", inputs: { heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: true, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, palette: { classPropertyName: "palette", publicName: "palette", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { mode: "modeChange" }, ngImport: i0, template: "<section class=\"mapa-report-widget\" [attr.data-palette]=\"palette()\">\n <header class=\"mapa-report-widget__header\">\n <div class=\"mapa-report-widget__heading\">\n <h2>{{ heading().title }}</h2>\n @if (heading().description) {\n <p>{{ heading().description }}</p>\n }\n </div>\n <mat-button-toggle-group\n class=\"mapa-report-widget__modes\"\n hideSingleSelectionIndicator\n [attr.aria-label]=\"i18n.texts.report.viewModeLabel\"\n [value]=\"mode()\"\n (change)=\"mode.set($event.value)\"\n >\n <mat-button-toggle\n value=\"summarized\"\n [aria-label]=\"i18n.texts.report.summarized\"\n >\n <mat-icon aria-hidden=\"true\">view_list</mat-icon>\n {{ i18n.texts.report.summarized }}\n </mat-button-toggle>\n <mat-button-toggle\n value=\"detailed\"\n [aria-label]=\"i18n.texts.report.detailed\"\n >\n <mat-icon aria-hidden=\"true\">article</mat-icon>\n {{ i18n.texts.report.detailed }}\n </mat-button-toggle>\n </mat-button-toggle-group>\n </header>\n\n @if (!data().strong.length && !data().attention.length) {\n <p class=\"mapa-report-widget__empty\">{{ i18n.texts.report.emptyState }}</p>\n } @else {\n <div\n class=\"mapa-report-points\"\n [class.mapa-report-points--detailed]=\"mode() === 'detailed'\"\n >\n <section\n class=\"mapa-report-points__group mapa-report-points__group--strong\"\n >\n <header class=\"mapa-report-points__group-header\">\n <div>\n <h3>\n {{\n data().strongHeading?.title ||\n i18n.texts.report.strongPointsTitle\n }}\n </h3>\n @if (data().strongHeading?.description) {\n <p>{{ data().strongHeading?.description }}</p>\n }\n </div>\n <span class=\"mapa-report-points__count\">{{\n countLabel(data().strong.length)\n }}</span>\n </header>\n <div class=\"mapa-report-points__items\">\n @for (item of data().strong; track item.id) {\n @if (mode() === \"summarized\") {\n <details class=\"mapa-report-point\">\n <summary>\n <span class=\"mapa-report-point__label\">\n <span\n class=\"mapa-report-point__dot\"\n [style.background]=\"color(item, '#2c93dc')\"\n ></span>\n <span>{{ item.name }}</span>\n </span>\n <mat-icon class=\"mapa-report-point__arrow\" aria-hidden=\"true\"\n >expand_more</mat-icon\n >\n </summary>\n @if (item.description) {\n <div [innerHTML]=\"item.description | safeHtml\"></div>\n }\n </details>\n } @else {\n <article class=\"mapa-report-point mapa-report-point--card\">\n <h4>\n <span\n class=\"mapa-report-point__dot\"\n [style.background]=\"color(item, '#2c93dc')\"\n ></span\n >{{ item.name }}\n </h4>\n @if (item.description) {\n <div [innerHTML]=\"item.description | safeHtml\"></div>\n }\n </article>\n }\n }\n </div>\n </section>\n\n <section\n class=\"mapa-report-points__group mapa-report-points__group--attention\"\n >\n <header class=\"mapa-report-points__group-header\">\n <div>\n <h3>\n {{\n data().attentionHeading?.title ||\n i18n.texts.report.attentionPointsTitle\n }}\n </h3>\n @if (data().attentionHeading?.description) {\n <p>{{ data().attentionHeading?.description }}</p>\n }\n </div>\n <span class=\"mapa-report-points__count\">{{\n countLabel(data().attention.length)\n }}</span>\n </header>\n <div class=\"mapa-report-points__items\">\n @for (item of data().attention; track item.id) {\n @if (mode() === \"summarized\") {\n <details class=\"mapa-report-point\">\n <summary>\n <span class=\"mapa-report-point__label\">\n <span\n class=\"mapa-report-point__dot\"\n [style.background]=\"color(item, '#e84d68')\"\n ></span>\n <span>{{ item.name }}</span>\n </span>\n <mat-icon class=\"mapa-report-point__arrow\" aria-hidden=\"true\"\n >expand_more</mat-icon\n >\n </summary>\n @if (item.description) {\n <div [innerHTML]=\"item.description | safeHtml\"></div>\n }\n </details>\n } @else {\n <article class=\"mapa-report-point mapa-report-point--card\">\n <h4>\n <span\n class=\"mapa-report-point__dot\"\n [style.background]=\"color(item, '#e84d68')\"\n ></span\n >{{ item.name }}\n </h4>\n @if (item.description) {\n <div [innerHTML]=\"item.description | safeHtml\"></div>\n }\n </article>\n }\n }\n </div>\n </section>\n </div>\n }\n</section>\n", styles: [":host{--mapa-report-accent: #ff560b;--mapa-report-accent-soft: #fff0e9;--mapa-report-surface: #fff;--mapa-report-surface-muted: #eef2f3;--mapa-report-border: #e1e5e7;--mapa-report-text: #263238;--mapa-report-muted: #68747a;--mapa-report-pill-width: 104px;--mapa-report-radius: 8px;--mapa-report-space: 20px;color:var(--mapa-report-text);display:block;font-family:var(--mapa-font-body, \"Asap\", \"Roboto\", sans-serif)}.mapa-report-widget{display:grid;gap:var(--mapa-report-space)}.mapa-report-widget__header{align-items:flex-start;display:flex;gap:16px;justify-content:space-between}.mapa-report-widget__heading{max-width:72ch}.mapa-report-widget__heading h2{color:var(--mapa-report-accent);font-size:20px;font-weight:650;line-height:1.25;margin:0}.mapa-report-widget__heading p{color:var(--mapa-report-muted);font-size:13px;line-height:1.5;margin:5px 0 0}.mapa-report-widget__modes{--mat-button-toggle-background-color: var(--mapa-report-surface);--mat-button-toggle-divider-color: #cbd5da;--mat-button-toggle-height: 32px;--mat-button-toggle-label-text-font: var( --mapa-font-body, \"Asap\", sans-serif );--mat-button-toggle-label-text-size: 13px;--mat-button-toggle-label-text-weight: 500;--mat-button-toggle-selected-state-background-color: #59636a;--mat-button-toggle-selected-state-text-color: #fffaf7;--mat-button-toggle-shape: 4px;--mat-button-toggle-text-color: #344b5e;border:1px solid #cbd5da;border-radius:4px;flex:0 0 auto;overflow:hidden}.mapa-report-widget__modes mat-button-toggle{font:500 13px/1 var(--mapa-font-body, \"Asap\", sans-serif)}.mapa-report-widget__modes mat-icon{font-size:14px;height:14px;margin-right:5px;width:14px}.mapa-report-widget__empty{color:var(--mapa-report-muted);margin:0;padding:24px 0;text-align:center}@media(max-width:760px){.mapa-report-widget__header{align-items:stretch;flex-direction:column}.mapa-report-widget__modes{align-self:flex-start}}.mapa-report-points{display:grid;gap:22px}.mapa-report-points__group{display:grid;gap:17px;padding:20px;border:1px solid;border-radius:13px}.mapa-report-points__group--strong{background:#f8faff;border-color:#cbd9ff}.mapa-report-points__group--strong .mapa-report-points__count{background:#f1f5ff;border-color:#c7d7ff;color:#315fcc}.mapa-report-points__group--attention{background:#fffaf9;border-color:#ffd0ca}.mapa-report-points__group--attention .mapa-report-points__count{background:#fff5f3;border-color:#ffc9c3;color:#d94d43}.mapa-report-points__group-header{align-items:flex-end;display:flex;gap:15px;justify-content:space-between}.mapa-report-points__group-header h3{font-size:16px;font-weight:500;margin:0}.mapa-report-points__group-header p{color:var(--mapa-report-muted);font-size:12px;line-height:1.35;margin:5px 0 0}.mapa-report-points__count{border:1px solid;border-radius:999px;flex:0 0 auto;font-size:10px;font-weight:600;padding:5px 10px}.mapa-report-points__items{display:grid;gap:9px 12px;grid-template-columns:repeat(2,minmax(0,1fr))}.mapa-report-point{background:var(--mapa-report-surface);border:1px solid var(--mapa-report-border);border-radius:9px;overflow:hidden}.mapa-report-point[open]{border-color:#b9c9d3;box-shadow:0 5px 14px #233d4e0f}.mapa-report-point[open] .mapa-report-point__arrow{transform:rotate(180deg)}.mapa-report-point summary{align-items:center;cursor:pointer;display:flex;font-size:13px;gap:12px;justify-content:space-between;list-style:none;min-height:43px;padding:10px 12px}.mapa-report-point summary::-webkit-details-marker{display:none}.mapa-report-point summary:focus-visible{outline:3px solid rgba(255,86,11,.28);outline-offset:-3px}.mapa-report-point>div{border-top:1px solid #e8eef1;color:var(--mapa-report-muted);font-size:11px;line-height:1.5;padding:10px 12px 12px 28px}.mapa-report-point>div :last-child{margin-bottom:0}.mapa-report-point--card{background:var(--mapa-report-surface);padding:14px}.mapa-report-point--card h4{align-items:center;display:flex;font-size:12px;gap:9px;margin:0}.mapa-report-point--card>div{padding:8px 0 0 16px}.mapa-report-point__dot{border-radius:50%;flex:0 0 7px;height:7px;width:7px}.mapa-report-point__label{align-items:center;display:flex;gap:9px;min-width:0}.mapa-report-point__label span:last-child{overflow-wrap:anywhere}.mapa-report-point__arrow{color:#788a95;flex:0 0 16px;font-size:16px;height:16px;transition:transform .18s cubic-bezier(.25,1,.5,1);width:16px}@media(max-width:760px){.mapa-report-points__items{grid-template-columns:1fr}}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonToggleModule }, { kind: "directive", type: i1$6.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled", "disabledInteractive", "hideSingleSelectionIndicator", "hideMultipleSelectionIndicator"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i1$6.MatButtonToggle, selector: "mat-button-toggle", inputs: ["aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "disableRipple", "appearance", "checked", "disabled", "disabledInteractive"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
8851
|
+
}
|
|
8852
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaReportPointsWidgetComponent, decorators: [{
|
|
8853
|
+
type: Component,
|
|
8854
|
+
args: [{ selector: 'mapa-report-points-widget', standalone: true, imports: [MatButtonToggleModule, MatIconModule, SafeHtmlPipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "<section class=\"mapa-report-widget\" [attr.data-palette]=\"palette()\">\n <header class=\"mapa-report-widget__header\">\n <div class=\"mapa-report-widget__heading\">\n <h2>{{ heading().title }}</h2>\n @if (heading().description) {\n <p>{{ heading().description }}</p>\n }\n </div>\n <mat-button-toggle-group\n class=\"mapa-report-widget__modes\"\n hideSingleSelectionIndicator\n [attr.aria-label]=\"i18n.texts.report.viewModeLabel\"\n [value]=\"mode()\"\n (change)=\"mode.set($event.value)\"\n >\n <mat-button-toggle\n value=\"summarized\"\n [aria-label]=\"i18n.texts.report.summarized\"\n >\n <mat-icon aria-hidden=\"true\">view_list</mat-icon>\n {{ i18n.texts.report.summarized }}\n </mat-button-toggle>\n <mat-button-toggle\n value=\"detailed\"\n [aria-label]=\"i18n.texts.report.detailed\"\n >\n <mat-icon aria-hidden=\"true\">article</mat-icon>\n {{ i18n.texts.report.detailed }}\n </mat-button-toggle>\n </mat-button-toggle-group>\n </header>\n\n @if (!data().strong.length && !data().attention.length) {\n <p class=\"mapa-report-widget__empty\">{{ i18n.texts.report.emptyState }}</p>\n } @else {\n <div\n class=\"mapa-report-points\"\n [class.mapa-report-points--detailed]=\"mode() === 'detailed'\"\n >\n <section\n class=\"mapa-report-points__group mapa-report-points__group--strong\"\n >\n <header class=\"mapa-report-points__group-header\">\n <div>\n <h3>\n {{\n data().strongHeading?.title ||\n i18n.texts.report.strongPointsTitle\n }}\n </h3>\n @if (data().strongHeading?.description) {\n <p>{{ data().strongHeading?.description }}</p>\n }\n </div>\n <span class=\"mapa-report-points__count\">{{\n countLabel(data().strong.length)\n }}</span>\n </header>\n <div class=\"mapa-report-points__items\">\n @for (item of data().strong; track item.id) {\n @if (mode() === \"summarized\") {\n <details class=\"mapa-report-point\">\n <summary>\n <span class=\"mapa-report-point__label\">\n <span\n class=\"mapa-report-point__dot\"\n [style.background]=\"color(item, '#2c93dc')\"\n ></span>\n <span>{{ item.name }}</span>\n </span>\n <mat-icon class=\"mapa-report-point__arrow\" aria-hidden=\"true\"\n >expand_more</mat-icon\n >\n </summary>\n @if (item.description) {\n <div [innerHTML]=\"item.description | safeHtml\"></div>\n }\n </details>\n } @else {\n <article class=\"mapa-report-point mapa-report-point--card\">\n <h4>\n <span\n class=\"mapa-report-point__dot\"\n [style.background]=\"color(item, '#2c93dc')\"\n ></span\n >{{ item.name }}\n </h4>\n @if (item.description) {\n <div [innerHTML]=\"item.description | safeHtml\"></div>\n }\n </article>\n }\n }\n </div>\n </section>\n\n <section\n class=\"mapa-report-points__group mapa-report-points__group--attention\"\n >\n <header class=\"mapa-report-points__group-header\">\n <div>\n <h3>\n {{\n data().attentionHeading?.title ||\n i18n.texts.report.attentionPointsTitle\n }}\n </h3>\n @if (data().attentionHeading?.description) {\n <p>{{ data().attentionHeading?.description }}</p>\n }\n </div>\n <span class=\"mapa-report-points__count\">{{\n countLabel(data().attention.length)\n }}</span>\n </header>\n <div class=\"mapa-report-points__items\">\n @for (item of data().attention; track item.id) {\n @if (mode() === \"summarized\") {\n <details class=\"mapa-report-point\">\n <summary>\n <span class=\"mapa-report-point__label\">\n <span\n class=\"mapa-report-point__dot\"\n [style.background]=\"color(item, '#e84d68')\"\n ></span>\n <span>{{ item.name }}</span>\n </span>\n <mat-icon class=\"mapa-report-point__arrow\" aria-hidden=\"true\"\n >expand_more</mat-icon\n >\n </summary>\n @if (item.description) {\n <div [innerHTML]=\"item.description | safeHtml\"></div>\n }\n </details>\n } @else {\n <article class=\"mapa-report-point mapa-report-point--card\">\n <h4>\n <span\n class=\"mapa-report-point__dot\"\n [style.background]=\"color(item, '#e84d68')\"\n ></span\n >{{ item.name }}\n </h4>\n @if (item.description) {\n <div [innerHTML]=\"item.description | safeHtml\"></div>\n }\n </article>\n }\n }\n </div>\n </section>\n </div>\n }\n</section>\n", styles: [":host{--mapa-report-accent: #ff560b;--mapa-report-accent-soft: #fff0e9;--mapa-report-surface: #fff;--mapa-report-surface-muted: #eef2f3;--mapa-report-border: #e1e5e7;--mapa-report-text: #263238;--mapa-report-muted: #68747a;--mapa-report-pill-width: 104px;--mapa-report-radius: 8px;--mapa-report-space: 20px;color:var(--mapa-report-text);display:block;font-family:var(--mapa-font-body, \"Asap\", \"Roboto\", sans-serif)}.mapa-report-widget{display:grid;gap:var(--mapa-report-space)}.mapa-report-widget__header{align-items:flex-start;display:flex;gap:16px;justify-content:space-between}.mapa-report-widget__heading{max-width:72ch}.mapa-report-widget__heading h2{color:var(--mapa-report-accent);font-size:20px;font-weight:650;line-height:1.25;margin:0}.mapa-report-widget__heading p{color:var(--mapa-report-muted);font-size:13px;line-height:1.5;margin:5px 0 0}.mapa-report-widget__modes{--mat-button-toggle-background-color: var(--mapa-report-surface);--mat-button-toggle-divider-color: #cbd5da;--mat-button-toggle-height: 32px;--mat-button-toggle-label-text-font: var( --mapa-font-body, \"Asap\", sans-serif );--mat-button-toggle-label-text-size: 13px;--mat-button-toggle-label-text-weight: 500;--mat-button-toggle-selected-state-background-color: #59636a;--mat-button-toggle-selected-state-text-color: #fffaf7;--mat-button-toggle-shape: 4px;--mat-button-toggle-text-color: #344b5e;border:1px solid #cbd5da;border-radius:4px;flex:0 0 auto;overflow:hidden}.mapa-report-widget__modes mat-button-toggle{font:500 13px/1 var(--mapa-font-body, \"Asap\", sans-serif)}.mapa-report-widget__modes mat-icon{font-size:14px;height:14px;margin-right:5px;width:14px}.mapa-report-widget__empty{color:var(--mapa-report-muted);margin:0;padding:24px 0;text-align:center}@media(max-width:760px){.mapa-report-widget__header{align-items:stretch;flex-direction:column}.mapa-report-widget__modes{align-self:flex-start}}.mapa-report-points{display:grid;gap:22px}.mapa-report-points__group{display:grid;gap:17px;padding:20px;border:1px solid;border-radius:13px}.mapa-report-points__group--strong{background:#f8faff;border-color:#cbd9ff}.mapa-report-points__group--strong .mapa-report-points__count{background:#f1f5ff;border-color:#c7d7ff;color:#315fcc}.mapa-report-points__group--attention{background:#fffaf9;border-color:#ffd0ca}.mapa-report-points__group--attention .mapa-report-points__count{background:#fff5f3;border-color:#ffc9c3;color:#d94d43}.mapa-report-points__group-header{align-items:flex-end;display:flex;gap:15px;justify-content:space-between}.mapa-report-points__group-header h3{font-size:16px;font-weight:500;margin:0}.mapa-report-points__group-header p{color:var(--mapa-report-muted);font-size:12px;line-height:1.35;margin:5px 0 0}.mapa-report-points__count{border:1px solid;border-radius:999px;flex:0 0 auto;font-size:10px;font-weight:600;padding:5px 10px}.mapa-report-points__items{display:grid;gap:9px 12px;grid-template-columns:repeat(2,minmax(0,1fr))}.mapa-report-point{background:var(--mapa-report-surface);border:1px solid var(--mapa-report-border);border-radius:9px;overflow:hidden}.mapa-report-point[open]{border-color:#b9c9d3;box-shadow:0 5px 14px #233d4e0f}.mapa-report-point[open] .mapa-report-point__arrow{transform:rotate(180deg)}.mapa-report-point summary{align-items:center;cursor:pointer;display:flex;font-size:13px;gap:12px;justify-content:space-between;list-style:none;min-height:43px;padding:10px 12px}.mapa-report-point summary::-webkit-details-marker{display:none}.mapa-report-point summary:focus-visible{outline:3px solid rgba(255,86,11,.28);outline-offset:-3px}.mapa-report-point>div{border-top:1px solid #e8eef1;color:var(--mapa-report-muted);font-size:11px;line-height:1.5;padding:10px 12px 12px 28px}.mapa-report-point>div :last-child{margin-bottom:0}.mapa-report-point--card{background:var(--mapa-report-surface);padding:14px}.mapa-report-point--card h4{align-items:center;display:flex;font-size:12px;gap:9px;margin:0}.mapa-report-point--card>div{padding:8px 0 0 16px}.mapa-report-point__dot{border-radius:50%;flex:0 0 7px;height:7px;width:7px}.mapa-report-point__label{align-items:center;display:flex;gap:9px;min-width:0}.mapa-report-point__label span:last-child{overflow-wrap:anywhere}.mapa-report-point__arrow{color:#788a95;flex:0 0 16px;font-size:16px;height:16px;transition:transform .18s cubic-bezier(.25,1,.5,1);width:16px}@media(max-width:760px){.mapa-report-points__items{grid-template-columns:1fr}}\n"] }]
|
|
8855
|
+
}], propDecorators: { heading: [{ type: i0.Input, args: [{ isSignal: true, alias: "heading", required: true }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], palette: [{ type: i0.Input, args: [{ isSignal: true, alias: "palette", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }, { type: i0.Output, args: ["modeChange"] }] } });
|
|
8856
|
+
|
|
8857
|
+
class MapaReportRankingTableWidgetComponent {
|
|
8858
|
+
constructor() {
|
|
8859
|
+
this.i18n = inject(MapaI18nService);
|
|
8860
|
+
this.heading = input(...(ngDevMode ? [undefined, { debugName: "heading" }] : []));
|
|
8861
|
+
this.views = input([], ...(ngDevMode ? [{ debugName: "views" }] : []));
|
|
8862
|
+
/** Id of the active view; two-way so the host can drive or observe it. */
|
|
8863
|
+
this.view = model(...(ngDevMode ? [undefined, { debugName: "view" }] : []));
|
|
8864
|
+
this.palette = input('current', ...(ngDevMode ? [{ debugName: "palette" }] : []));
|
|
8865
|
+
this.showAverage = input(false, ...(ngDevMode ? [{ debugName: "showAverage" }] : []));
|
|
8866
|
+
/**
|
|
8867
|
+
* Swaps the classification chip for the raw score and direction while the
|
|
8868
|
+
* cell is hovered or focused. Off by default — the chip already carries the
|
|
8869
|
+
* reading, so the swap only makes the table jump under the cursor.
|
|
8870
|
+
*/
|
|
8871
|
+
this.showScoreOnHover = input(false, ...(ngDevMode ? [{ debugName: "showScoreOnHover" }] : []));
|
|
8872
|
+
/** Header of the first column, per view id. Falls back to the view label. */
|
|
8873
|
+
this.entryColumnLabel = input(...(ngDevMode ? [undefined, { debugName: "entryColumnLabel" }] : []));
|
|
8874
|
+
/** Footnote under the table. */
|
|
8875
|
+
this.note = input(...(ngDevMode ? [undefined, { debugName: "note" }] : []));
|
|
8876
|
+
/** Header of the average column; defaults to the i18n text. */
|
|
8877
|
+
this.averageLabel = input(...(ngDevMode ? [undefined, { debugName: "averageLabel" }] : []));
|
|
8878
|
+
this.sort = signal({
|
|
8879
|
+
active: '',
|
|
8880
|
+
direction: '',
|
|
8881
|
+
}, ...(ngDevMode ? [{ debugName: "sort" }] : []));
|
|
8882
|
+
this.visibleViews = computed(() => this.views().filter((view) => view.entries?.length), ...(ngDevMode ? [{ debugName: "visibleViews" }] : []));
|
|
8883
|
+
this.activeView = computed(() => {
|
|
8884
|
+
const views = this.visibleViews();
|
|
8885
|
+
return views.find((item) => item.id === this.view()) ?? views[0];
|
|
8886
|
+
}, ...(ngDevMode ? [{ debugName: "activeView" }] : []));
|
|
8887
|
+
this.entries = computed(() => this.activeView()?.entries ?? [], ...(ngDevMode ? [{ debugName: "entries" }] : []));
|
|
8888
|
+
this.columns = computed(() => {
|
|
8889
|
+
const columns = [
|
|
8890
|
+
{
|
|
8891
|
+
key: 'name',
|
|
8892
|
+
label: this.entryColumnLabel() ?? this.activeView()?.label ?? '',
|
|
8893
|
+
sortable: true,
|
|
8894
|
+
},
|
|
8895
|
+
];
|
|
8896
|
+
if (this.showAverage()) {
|
|
8897
|
+
columns.push({
|
|
8898
|
+
key: 'average',
|
|
8899
|
+
label: this.averageLabel() ?? this.i18n.texts.report.overallPercentageTitle,
|
|
8900
|
+
sortable: true,
|
|
8901
|
+
align: 'center',
|
|
8902
|
+
});
|
|
8903
|
+
}
|
|
8904
|
+
const seen = new Set(columns.map((column) => column.key));
|
|
8905
|
+
for (const entry of this.entries()) {
|
|
8906
|
+
for (const dimension of entry.dimensions ?? []) {
|
|
8907
|
+
const key = this.columnKey(dimension.name);
|
|
8908
|
+
if (seen.has(key))
|
|
8909
|
+
continue;
|
|
8910
|
+
seen.add(key);
|
|
8911
|
+
columns.push({ key, label: dimension.name, sortable: true });
|
|
8912
|
+
}
|
|
8913
|
+
}
|
|
8914
|
+
return columns;
|
|
8915
|
+
}, ...(ngDevMode ? [{ debugName: "columns" }] : []));
|
|
8916
|
+
this.rows = computed(() => {
|
|
8917
|
+
const rows = this.entries().map((entry) => this.toRow(entry));
|
|
8918
|
+
return this.sortRows(rows, this.sort());
|
|
8919
|
+
}, ...(ngDevMode ? [{ debugName: "rows" }] : []));
|
|
8920
|
+
}
|
|
8921
|
+
handleSortChange(change) {
|
|
8922
|
+
this.sort.set(change);
|
|
8923
|
+
}
|
|
8924
|
+
selectView(id) {
|
|
8925
|
+
this.view.set(id);
|
|
8926
|
+
this.sort.set({ active: '', direction: '' });
|
|
8927
|
+
}
|
|
8928
|
+
classification(row, key) {
|
|
8929
|
+
return this.cell(row, key)?.classification;
|
|
8930
|
+
}
|
|
8931
|
+
value(row, key) {
|
|
8932
|
+
const value = this.cell(row, key)?.value;
|
|
8933
|
+
return value === undefined || value === null ? '-' : `${value}`;
|
|
8934
|
+
}
|
|
8935
|
+
direction(row, key) {
|
|
8936
|
+
return this.cell(row, key)?.direction;
|
|
8937
|
+
}
|
|
8938
|
+
directionArrow(row, key) {
|
|
8939
|
+
return this.direction(row, key) === 'negative' ? '↓' : '↑';
|
|
8940
|
+
}
|
|
8941
|
+
directionLabel(row, key) {
|
|
8942
|
+
return this.direction(row, key) === 'negative'
|
|
8943
|
+
? this.i18n.texts.report.negativeDirectionLabel
|
|
8944
|
+
: this.i18n.texts.report.positiveDirectionLabel;
|
|
8945
|
+
}
|
|
8946
|
+
averageOf(row) {
|
|
8947
|
+
return typeof row.average === 'number' ? `${Math.round(row.average)}%` : '-';
|
|
8948
|
+
}
|
|
8949
|
+
trackColumn(index, column) {
|
|
8950
|
+
return `${index}:${column.key}`;
|
|
8951
|
+
}
|
|
8952
|
+
toRow(entry) {
|
|
8953
|
+
const row = {
|
|
8954
|
+
name: entry.name,
|
|
8955
|
+
description: entry.description,
|
|
8956
|
+
average: entry.average,
|
|
8957
|
+
};
|
|
8958
|
+
for (const dimension of entry.dimensions ?? []) {
|
|
8959
|
+
row[this.columnKey(dimension.name)] = dimension;
|
|
8960
|
+
}
|
|
8961
|
+
return row;
|
|
8962
|
+
}
|
|
8963
|
+
cell(row, key) {
|
|
8964
|
+
const cell = row[key];
|
|
8965
|
+
return cell && typeof cell === 'object' ? cell : undefined;
|
|
8966
|
+
}
|
|
8967
|
+
sortRows(rows, sort) {
|
|
8968
|
+
if (!sort.active || !sort.direction)
|
|
8969
|
+
return rows;
|
|
8970
|
+
const multiplier = sort.direction === 'asc' ? 1 : -1;
|
|
8971
|
+
return [...rows].sort((left, right) => String(this.sortValue(left, sort.active)).localeCompare(String(this.sortValue(right, sort.active)), undefined, { numeric: true, sensitivity: 'base' }) * multiplier);
|
|
8972
|
+
}
|
|
8973
|
+
/**
|
|
8974
|
+
* Dimensions sort by classification rank so the columns order by severity,
|
|
8975
|
+
* not by the label that happens to be printed in the chip.
|
|
8976
|
+
*/
|
|
8977
|
+
sortValue(row, key) {
|
|
8978
|
+
const cell = this.cell(row, key);
|
|
8979
|
+
if (cell) {
|
|
8980
|
+
return (cell.classification?.classificationId ??
|
|
8981
|
+
(typeof cell.value === 'number' ? cell.value : 0));
|
|
8982
|
+
}
|
|
8983
|
+
const value = row[key];
|
|
8984
|
+
return typeof value === 'number' || typeof value === 'string' ? value : '';
|
|
8985
|
+
}
|
|
8986
|
+
columnKey(name) {
|
|
8987
|
+
return name.trim().toLowerCase();
|
|
8988
|
+
}
|
|
8989
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaReportRankingTableWidgetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8990
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.21", type: MapaReportRankingTableWidgetComponent, isStandalone: true, selector: "mapa-report-ranking-table-widget", inputs: { heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: false, transformFunction: null }, views: { classPropertyName: "views", publicName: "views", isSignal: true, isRequired: false, transformFunction: null }, view: { classPropertyName: "view", publicName: "view", isSignal: true, isRequired: false, transformFunction: null }, palette: { classPropertyName: "palette", publicName: "palette", isSignal: true, isRequired: false, transformFunction: null }, showAverage: { classPropertyName: "showAverage", publicName: "showAverage", isSignal: true, isRequired: false, transformFunction: null }, showScoreOnHover: { classPropertyName: "showScoreOnHover", publicName: "showScoreOnHover", isSignal: true, isRequired: false, transformFunction: null }, entryColumnLabel: { classPropertyName: "entryColumnLabel", publicName: "entryColumnLabel", isSignal: true, isRequired: false, transformFunction: null }, note: { classPropertyName: "note", publicName: "note", isSignal: true, isRequired: false, transformFunction: null }, averageLabel: { classPropertyName: "averageLabel", publicName: "averageLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { view: "viewChange" }, ngImport: i0, template: "<section class=\"mapa-report-widget\" [attr.data-palette]=\"palette()\">\n @if (heading() || visibleViews().length > 1) {\n <header class=\"mapa-report-widget__header\">\n <div class=\"mapa-report-widget__heading\">\n @if (heading(); as head) {\n <h2>{{ head.title }}</h2>\n @if (head.description) {\n <p>{{ head.description }}</p>\n }\n }\n </div>\n @if (visibleViews().length > 1) {\n <mat-button-toggle-group\n class=\"mapa-report-widget__modes\"\n hideSingleSelectionIndicator\n [attr.aria-label]=\"i18n.texts.report.viewModeLabel\"\n [value]=\"activeView().id\"\n (change)=\"selectView($event.value)\"\n >\n @for (item of visibleViews(); track item.id) {\n <mat-button-toggle [value]=\"item.id\">\n @if (item.icon) {\n <mat-icon aria-hidden=\"true\">{{ item.icon }}</mat-icon>\n }\n {{ item.label }}\n </mat-button-toggle>\n }\n </mat-button-toggle-group>\n }\n </header>\n }\n\n @if (!rows().length) {\n <p class=\"mapa-report-widget__empty\">{{ i18n.texts.report.emptyState }}</p>\n } @else {\n <mapa-table\n class=\"mapa-report-ranking-table__table\"\n [columns]=\"columns()\"\n [data]=\"rows()\"\n [finished]=\"true\"\n [caption]=\"heading()?.title ?? ''\"\n (sortChange)=\"handleSortChange($event)\"\n >\n <ng-template mapaTableCell=\"name\" let-row>\n <div class=\"mapa-report-ranking-table__entry\">\n <strong>{{ $any(row).name }}</strong>\n @if ($any(row).description) {\n <small>{{ $any(row).description }}</small>\n }\n </div>\n </ng-template>\n\n @if (showAverage()) {\n <ng-template mapaTableCell=\"average\" let-row>\n <span class=\"mapa-report-ranking-table__average\">{{\n averageOf($any(row))\n }}</span>\n </ng-template>\n }\n\n @for (column of columns(); track trackColumn($index, column)) {\n @if (column.key !== \"name\" && column.key !== \"average\") {\n <ng-template [mapaTableCell]=\"column.key\" let-row>\n <div\n class=\"mapa-report-ranking-table__cell\"\n [class.mapa-report-ranking-table__cell--swaps]=\"\n showScoreOnHover()\n \"\n >\n <span class=\"mapa-report-ranking-table__chip\">\n <mapa-classification-tag\n appearance=\"solid\"\n [classification]=\"classification($any(row), column.key)\"\n />\n </span>\n @if (showScoreOnHover()) {\n <span class=\"mapa-report-ranking-table__score\">\n @if (direction($any(row), column.key)) {\n <span\n class=\"mapa-direction-indicator\"\n [attr.aria-label]=\"directionLabel($any(row), column.key)\"\n >{{ directionArrow($any(row), column.key) }}</span\n >\n }\n {{ value($any(row), column.key) }}\n </span>\n }\n </div>\n </ng-template>\n }\n }\n </mapa-table>\n\n @if (note()) {\n <p class=\"mapa-report-ranking-table__note\">{{ note() }}</p>\n }\n }\n</section>\n", styles: [":host{--mapa-report-accent: #ff560b;--mapa-report-accent-soft: #fff0e9;--mapa-report-surface: #fff;--mapa-report-surface-muted: #eef2f3;--mapa-report-border: #e1e5e7;--mapa-report-text: #263238;--mapa-report-muted: #68747a;--mapa-report-pill-width: 104px;--mapa-report-radius: 8px;--mapa-report-space: 20px;color:var(--mapa-report-text);display:block;font-family:var(--mapa-font-body, \"Asap\", \"Roboto\", sans-serif)}.mapa-report-widget{display:grid;gap:var(--mapa-report-space)}.mapa-report-widget__header{align-items:flex-start;display:flex;gap:16px;justify-content:space-between}.mapa-report-widget__heading{max-width:72ch}.mapa-report-widget__heading h2{color:var(--mapa-report-accent);font-size:20px;font-weight:650;line-height:1.25;margin:0}.mapa-report-widget__heading p{color:var(--mapa-report-muted);font-size:13px;line-height:1.5;margin:5px 0 0}.mapa-report-widget__modes{--mat-button-toggle-background-color: var(--mapa-report-surface);--mat-button-toggle-divider-color: #cbd5da;--mat-button-toggle-height: 32px;--mat-button-toggle-label-text-font: var( --mapa-font-body, \"Asap\", sans-serif );--mat-button-toggle-label-text-size: 13px;--mat-button-toggle-label-text-weight: 500;--mat-button-toggle-selected-state-background-color: #59636a;--mat-button-toggle-selected-state-text-color: #fffaf7;--mat-button-toggle-shape: 4px;--mat-button-toggle-text-color: #344b5e;border:1px solid #cbd5da;border-radius:4px;flex:0 0 auto;overflow:hidden}.mapa-report-widget__modes mat-button-toggle{font:500 13px/1 var(--mapa-font-body, \"Asap\", sans-serif)}.mapa-report-widget__modes mat-icon{font-size:14px;height:14px;margin-right:5px;width:14px}.mapa-report-widget__empty{color:var(--mapa-report-muted);margin:0;padding:24px 0;text-align:center}@media(max-width:760px){.mapa-report-widget__header{align-items:stretch;flex-direction:column}.mapa-report-widget__modes{align-self:flex-start}}.mapa-direction-indicator{background:var(--mapa-report-surface, var(--mapa-color-surface, #fafbfc));border:1px solid currentColor;border-radius:50%;box-sizing:border-box;color:var(--mapa-report-muted, var(--mapa-color-text-subtle, #68747a));display:inline-grid;flex:0 0 20px;font-size:11px;font-weight:700;height:20px;line-height:1;place-items:center;width:20px}.mapa-report-ranking-table__table{display:block;min-width:0;--mapa-classification-tag-min-width: 92px}.mapa-report-ranking-table__entry{display:grid}.mapa-report-ranking-table__entry strong{color:var(--mapa-report-text);font-size:13px;font-weight:500;line-height:1.35;white-space:nowrap}.mapa-report-ranking-table__entry small{color:var(--mapa-report-muted);font-size:11px;line-height:1.35;white-space:nowrap}.mapa-report-ranking-table__average{font-size:13px;font-weight:500}.mapa-report-ranking-table__cell{display:grid;justify-items:center;place-items:center}.mapa-report-ranking-table__cell--swaps .mapa-report-ranking-table__chip,.mapa-report-ranking-table__cell--swaps .mapa-report-ranking-table__score{grid-area:1/1}.mapa-report-ranking-table__score{align-items:center;color:var(--mapa-report-text);display:none;font-size:13px;font-weight:500;gap:6px;white-space:nowrap}.mapa-report-ranking-table__score .mapa-direction-indicator{flex:0 0 18px;font-size:10px;height:18px;width:18px}.mapa-report-ranking-table__cell--swaps:hover .mapa-report-ranking-table__chip,.mapa-report-ranking-table__cell--swaps:focus-within .mapa-report-ranking-table__chip{display:none}.mapa-report-ranking-table__cell--swaps:hover .mapa-report-ranking-table__score,.mapa-report-ranking-table__cell--swaps:focus-within .mapa-report-ranking-table__score{display:inline-flex}.mapa-report-ranking-table__note{color:var(--mapa-report-muted);font-size:11px;margin:0}\n"], dependencies: [{ kind: "component", type: MapaClassificationTagComponent, selector: "mapa-classification-tag", inputs: ["classification", "size", "appearance", "shape", "casing", "fallbackLabel"] }, { kind: "directive", type: MapaTableCellDirective, selector: "ng-template[mapaTableCell]", inputs: ["mapaTableCell"] }, { kind: "component", type: MapaTableComponent, selector: "mapa-table", inputs: ["columns", "data", "rowKey", "caption", "selectable", "showSelectAll", "selectedKeys", "selectionLabelKey", "checkbox", "selection", "loading", "finished", "error", "emptyTitle", "emptySubtitle", "errorTitle", "errorSubtitle", "retryLabel", "status", "empty", "pagination", "pageIndex", "pageSize", "totalCount", "pageSizeOptions", "totalPages", "showPaginator", "paginatorShowFirstButton", "paginatorShowLastButton", "paginatorRenderButtonsNumber", "paginatorHideDefaultArrows", "sortActive", "sortDirection", "actions", "menuItems", "menu", "filterControl"], outputs: ["pageChange", "sortChange", "selectionChange", "retry", "onChangePage", "onSortChange", "selectedRows", "rowClick"] }, { kind: "ngmodule", type: MatButtonToggleModule }, { kind: "directive", type: i1$6.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled", "disabledInteractive", "hideSingleSelectionIndicator", "hideMultipleSelectionIndicator"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i1$6.MatButtonToggle, selector: "mat-button-toggle", inputs: ["aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "disableRipple", "appearance", "checked", "disabled", "disabledInteractive"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
8991
|
+
}
|
|
8992
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaReportRankingTableWidgetComponent, decorators: [{
|
|
8993
|
+
type: Component,
|
|
8994
|
+
args: [{ selector: 'mapa-report-ranking-table-widget', standalone: true, imports: [
|
|
8995
|
+
MapaClassificationTagComponent,
|
|
8996
|
+
MapaTableCellDirective,
|
|
8997
|
+
MapaTableComponent,
|
|
8998
|
+
MatButtonToggleModule,
|
|
8999
|
+
MatIconModule,
|
|
9000
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<section class=\"mapa-report-widget\" [attr.data-palette]=\"palette()\">\n @if (heading() || visibleViews().length > 1) {\n <header class=\"mapa-report-widget__header\">\n <div class=\"mapa-report-widget__heading\">\n @if (heading(); as head) {\n <h2>{{ head.title }}</h2>\n @if (head.description) {\n <p>{{ head.description }}</p>\n }\n }\n </div>\n @if (visibleViews().length > 1) {\n <mat-button-toggle-group\n class=\"mapa-report-widget__modes\"\n hideSingleSelectionIndicator\n [attr.aria-label]=\"i18n.texts.report.viewModeLabel\"\n [value]=\"activeView().id\"\n (change)=\"selectView($event.value)\"\n >\n @for (item of visibleViews(); track item.id) {\n <mat-button-toggle [value]=\"item.id\">\n @if (item.icon) {\n <mat-icon aria-hidden=\"true\">{{ item.icon }}</mat-icon>\n }\n {{ item.label }}\n </mat-button-toggle>\n }\n </mat-button-toggle-group>\n }\n </header>\n }\n\n @if (!rows().length) {\n <p class=\"mapa-report-widget__empty\">{{ i18n.texts.report.emptyState }}</p>\n } @else {\n <mapa-table\n class=\"mapa-report-ranking-table__table\"\n [columns]=\"columns()\"\n [data]=\"rows()\"\n [finished]=\"true\"\n [caption]=\"heading()?.title ?? ''\"\n (sortChange)=\"handleSortChange($event)\"\n >\n <ng-template mapaTableCell=\"name\" let-row>\n <div class=\"mapa-report-ranking-table__entry\">\n <strong>{{ $any(row).name }}</strong>\n @if ($any(row).description) {\n <small>{{ $any(row).description }}</small>\n }\n </div>\n </ng-template>\n\n @if (showAverage()) {\n <ng-template mapaTableCell=\"average\" let-row>\n <span class=\"mapa-report-ranking-table__average\">{{\n averageOf($any(row))\n }}</span>\n </ng-template>\n }\n\n @for (column of columns(); track trackColumn($index, column)) {\n @if (column.key !== \"name\" && column.key !== \"average\") {\n <ng-template [mapaTableCell]=\"column.key\" let-row>\n <div\n class=\"mapa-report-ranking-table__cell\"\n [class.mapa-report-ranking-table__cell--swaps]=\"\n showScoreOnHover()\n \"\n >\n <span class=\"mapa-report-ranking-table__chip\">\n <mapa-classification-tag\n appearance=\"solid\"\n [classification]=\"classification($any(row), column.key)\"\n />\n </span>\n @if (showScoreOnHover()) {\n <span class=\"mapa-report-ranking-table__score\">\n @if (direction($any(row), column.key)) {\n <span\n class=\"mapa-direction-indicator\"\n [attr.aria-label]=\"directionLabel($any(row), column.key)\"\n >{{ directionArrow($any(row), column.key) }}</span\n >\n }\n {{ value($any(row), column.key) }}\n </span>\n }\n </div>\n </ng-template>\n }\n }\n </mapa-table>\n\n @if (note()) {\n <p class=\"mapa-report-ranking-table__note\">{{ note() }}</p>\n }\n }\n</section>\n", styles: [":host{--mapa-report-accent: #ff560b;--mapa-report-accent-soft: #fff0e9;--mapa-report-surface: #fff;--mapa-report-surface-muted: #eef2f3;--mapa-report-border: #e1e5e7;--mapa-report-text: #263238;--mapa-report-muted: #68747a;--mapa-report-pill-width: 104px;--mapa-report-radius: 8px;--mapa-report-space: 20px;color:var(--mapa-report-text);display:block;font-family:var(--mapa-font-body, \"Asap\", \"Roboto\", sans-serif)}.mapa-report-widget{display:grid;gap:var(--mapa-report-space)}.mapa-report-widget__header{align-items:flex-start;display:flex;gap:16px;justify-content:space-between}.mapa-report-widget__heading{max-width:72ch}.mapa-report-widget__heading h2{color:var(--mapa-report-accent);font-size:20px;font-weight:650;line-height:1.25;margin:0}.mapa-report-widget__heading p{color:var(--mapa-report-muted);font-size:13px;line-height:1.5;margin:5px 0 0}.mapa-report-widget__modes{--mat-button-toggle-background-color: var(--mapa-report-surface);--mat-button-toggle-divider-color: #cbd5da;--mat-button-toggle-height: 32px;--mat-button-toggle-label-text-font: var( --mapa-font-body, \"Asap\", sans-serif );--mat-button-toggle-label-text-size: 13px;--mat-button-toggle-label-text-weight: 500;--mat-button-toggle-selected-state-background-color: #59636a;--mat-button-toggle-selected-state-text-color: #fffaf7;--mat-button-toggle-shape: 4px;--mat-button-toggle-text-color: #344b5e;border:1px solid #cbd5da;border-radius:4px;flex:0 0 auto;overflow:hidden}.mapa-report-widget__modes mat-button-toggle{font:500 13px/1 var(--mapa-font-body, \"Asap\", sans-serif)}.mapa-report-widget__modes mat-icon{font-size:14px;height:14px;margin-right:5px;width:14px}.mapa-report-widget__empty{color:var(--mapa-report-muted);margin:0;padding:24px 0;text-align:center}@media(max-width:760px){.mapa-report-widget__header{align-items:stretch;flex-direction:column}.mapa-report-widget__modes{align-self:flex-start}}.mapa-direction-indicator{background:var(--mapa-report-surface, var(--mapa-color-surface, #fafbfc));border:1px solid currentColor;border-radius:50%;box-sizing:border-box;color:var(--mapa-report-muted, var(--mapa-color-text-subtle, #68747a));display:inline-grid;flex:0 0 20px;font-size:11px;font-weight:700;height:20px;line-height:1;place-items:center;width:20px}.mapa-report-ranking-table__table{display:block;min-width:0;--mapa-classification-tag-min-width: 92px}.mapa-report-ranking-table__entry{display:grid}.mapa-report-ranking-table__entry strong{color:var(--mapa-report-text);font-size:13px;font-weight:500;line-height:1.35;white-space:nowrap}.mapa-report-ranking-table__entry small{color:var(--mapa-report-muted);font-size:11px;line-height:1.35;white-space:nowrap}.mapa-report-ranking-table__average{font-size:13px;font-weight:500}.mapa-report-ranking-table__cell{display:grid;justify-items:center;place-items:center}.mapa-report-ranking-table__cell--swaps .mapa-report-ranking-table__chip,.mapa-report-ranking-table__cell--swaps .mapa-report-ranking-table__score{grid-area:1/1}.mapa-report-ranking-table__score{align-items:center;color:var(--mapa-report-text);display:none;font-size:13px;font-weight:500;gap:6px;white-space:nowrap}.mapa-report-ranking-table__score .mapa-direction-indicator{flex:0 0 18px;font-size:10px;height:18px;width:18px}.mapa-report-ranking-table__cell--swaps:hover .mapa-report-ranking-table__chip,.mapa-report-ranking-table__cell--swaps:focus-within .mapa-report-ranking-table__chip{display:none}.mapa-report-ranking-table__cell--swaps:hover .mapa-report-ranking-table__score,.mapa-report-ranking-table__cell--swaps:focus-within .mapa-report-ranking-table__score{display:inline-flex}.mapa-report-ranking-table__note{color:var(--mapa-report-muted);font-size:11px;margin:0}\n"] }]
|
|
9001
|
+
}], propDecorators: { heading: [{ type: i0.Input, args: [{ isSignal: true, alias: "heading", required: false }] }], views: [{ type: i0.Input, args: [{ isSignal: true, alias: "views", required: false }] }], view: [{ type: i0.Input, args: [{ isSignal: true, alias: "view", required: false }] }, { type: i0.Output, args: ["viewChange"] }], palette: [{ type: i0.Input, args: [{ isSignal: true, alias: "palette", required: false }] }], showAverage: [{ type: i0.Input, args: [{ isSignal: true, alias: "showAverage", required: false }] }], showScoreOnHover: [{ type: i0.Input, args: [{ isSignal: true, alias: "showScoreOnHover", required: false }] }], entryColumnLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "entryColumnLabel", required: false }] }], note: [{ type: i0.Input, args: [{ isSignal: true, alias: "note", required: false }] }], averageLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "averageLabel", required: false }] }] } });
|
|
9002
|
+
|
|
8231
9003
|
class MapaProgressbarComponent {
|
|
8232
9004
|
constructor() {
|
|
8233
9005
|
this.showInterval = true;
|
|
@@ -8494,5 +9266,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
8494
9266
|
* Generated bundle index. Do not edit.
|
|
8495
9267
|
*/
|
|
8496
9268
|
|
|
8497
|
-
export { AIH_ESTADOS, AIH_TIPOS, BubblePaginationDirective, ButtonComponent, ButtonIconComponent, CEPRange, CID_NAME, CID_REGEX, CORES, CPFPipe, CapabilityClassificationService, CheckboxComponent, Datepicker, DatepickerRange, Dropdown, DropdownTree, ESTADOS, ESTADOS_SIGLA, ElementBase, FiltersComponent, HtmlSanitizerService, IPTUCREATE, IPTUMASKS, IPTUVALIDATE, IconComponent, InputText, LOCALIZACAO_BAIRROS, LOCALIZACAO_CIDADES, LOCALIZACAO_COMPLEMENTOS, LOCALIZACAO_ESTADOS, LOCALIZACAO_LOGRADOUROS, LOCALIZACAO_RUAS, LocaleDatePipe, LocaleDateTimePipe, MAPA_UI_TEXTS, MASKSIE, MapaBenchmarkChartComponent, MapaBenchmarkIndicatorComponent, MapaBreadcrumbComponent, MapaCapabilityComparativeChartComponent, MapaCapabilityComparativeComponent, MapaCapabilityComparativeHeaderComponent, MapaCapabilityDetailComponent, MapaCapabilityDotComponent, MapaCapabilityExpandComponent, MapaCapabilityIndicatorChartComponent, MapaCapabilityIndicatorComponent, MapaCapabilityIndicatorListComponent, MapaCapabilityIntervalBarComponent, MapaCapabilityIntervalComponent, MapaChartComponent, MapaDateLocaleService, MapaDatepicker, MapaDatepicker as MapaDatepickerRange, MapaDetailsComponent, MapaDialogComponent, MapaDropdownComponent, MapaDropdownTreeComponent, MapaEmptyStateComponent, MapaFormComponent, MapaFormErrorsComponent, MapaGroupReportComponent, MapaI18nService, MapaInputComponent, MapaMaskAutofillSyncDirective, MapaMenuComponent, MapaNavListComponent, MapaProgressbarComponent, MapaScaleComponent, MapaScaleParameterizationComponent, MapaSvgIconComponent, MapaTableCellDirective, MapaTableComponent, MapaTextareaComponent, MapaTooltipComponent, MapaTooltipDirective, MapaWarningComponent, MatInputAutosizeDirective, PLACAS_INVALID, PLACAS_RANGE, RadioButton, RadioButtonComponent, ReportItemComponent, SafeHtmlPipe, SlideToggle, SlideToggleComponent, TagComponent, Textarea, ValidationMessageResolverService, addDays, addMonthsToDateValue, allNumbersAreSame, buildDetailedIndicatorSections, buildIndicatorCollections, cep_ranges, create_aih, create_cartaocredito, create_certidao, create_cnh, create_cnhespelho, create_cnpj, create_cns, create_cpf, create_ect, create_iptu, create_iptu_ctba, create_iptu_sp, create_pispasep, create_processo, create_renachestadual, create_renachseguranca, create_renavam, create_titulo, create_titulo_atual, creditCardValidator, currencyToNumber, customPaginatorFactory, faker_iptu, fillString, formatBrazilianDate, formatDateAsDayMonthYear, formatDateAsMonthDayYear, formatDateByLanguage, formatDateForLocale, formatDateTimeByLanguage, formatDateValue, formatLocaleDate, formatLocaleDateTime, generateInscricaoEstadual, getActiveDateFormat, getActiveDateLocale, getAllDigits, getAllWords, getDateFormatByLanguage, getDateInputMask, getDateTimeFormatByLanguage, getDayOfMonthFromDateValue, getDefaultDateRange, getRelativeDateRange, getSpecialProperty, getYearFromDateValue, isAfterDateValue, isArray, isDateValue, isMonthFirstDateLocale, isNil, isNumber, isPresent, isString, isValidDateByLanguage, isValidDateValue, makeGenericFaker, maskBr, mask_iptu, mergeMapaUiTexts, modulo11, modulo11Custom, modulo11a, normalizeDateInput, normalizeDateLocale, normalizeLookup, normalizeText, numberToCurrency, openDialog, parseBrazilianDate, parseDateByLanguage, parseDateFieldValue, parseDateValue, parseDateValueFns, parseLocaleDateValue, processCaretTraps, provideMapaUiTexts, rand, randArray, randomEstadoSigla, randomLetter, randomLetterOrNumber, randomNumber, reformatDateStringForLanguage, rg_rj, rg_sp, sanitizeHtmlContent, setTimeOnDateValue, slugify, toDatepickerLocale, toIsoDateByLanguage, toIsoDateByLanguageWithUtcTime, toIsoDateValue, toIsoDateValueWithTime, toIsoDateValueWithUtcTime, toUtcDayExclusiveEndIso, toUtcRangeEndIso, toUtcRangeStartIso, utilsBr, validateBr, validate_aih, validate_cartaocredito, validate_celular, validate_cep, validate_certidao, validate_chassi, validate_cnh, validate_cnhespelho, validate_cnpj, validate_cns, validate_cpf, validate_currency, validate_datahora, validate_datetime, validate_ect, validate_inscricaoestadual, validate_iptu, validate_iptu_contagem, validate_iptu_ctba, validate_iptu_sp, validate_number, validate_pispasep, validate_placa, validate_porcentagem, validate_processo, validate_renachestadual, validate_renachseguranca, validate_renavam, validate_rg, validate_sped, validate_telefone, validate_time, validate_titulo };
|
|
9269
|
+
export { AIH_ESTADOS, AIH_TIPOS, BubblePaginationDirective, ButtonComponent, ButtonIconComponent, CEPRange, CID_NAME, CID_REGEX, CORES, CPFPipe, CapabilityClassificationService, CheckboxComponent, Datepicker, DatepickerRange, Dropdown, DropdownTree, ESTADOS, ESTADOS_SIGLA, ElementBase, FiltersComponent, HtmlSanitizerService, IPTUCREATE, IPTUMASKS, IPTUVALIDATE, IconComponent, InputText, LOCALIZACAO_BAIRROS, LOCALIZACAO_CIDADES, LOCALIZACAO_COMPLEMENTOS, LOCALIZACAO_ESTADOS, LOCALIZACAO_LOGRADOUROS, LOCALIZACAO_RUAS, LocaleDatePipe, LocaleDateTimePipe, MAPA_UI_TEXTS, MASKSIE, MapaBenchmarkChartComponent, MapaBenchmarkIndicatorComponent, MapaBreadcrumbComponent, MapaCapabilityComparativeChartComponent, MapaCapabilityComparativeComponent, MapaCapabilityComparativeHeaderComponent, MapaCapabilityDetailComponent, MapaCapabilityDotComponent, MapaCapabilityExpandComponent, MapaCapabilityIndicatorChartComponent, MapaCapabilityIndicatorComponent, MapaCapabilityIndicatorListComponent, MapaCapabilityIntervalBarComponent, MapaCapabilityIntervalComponent, MapaChartComponent, MapaClassificationTagComponent, MapaConclusionCardComponent, MapaDateLocaleService, MapaDatepicker, MapaDatepicker as MapaDatepickerRange, MapaDetailsComponent, MapaDialogComponent, MapaDropdownComponent, MapaDropdownTreeComponent, MapaEmptyStateComponent, MapaFormComponent, MapaFormErrorsComponent, MapaGroupReportComponent, MapaI18nService, MapaInputComponent, MapaMaskAutofillSyncDirective, MapaMenuComponent, MapaNavListComponent, MapaProgressbarComponent, MapaReportGroupProfileWidgetComponent, MapaReportIndicatorsWidgetComponent, MapaReportLegendComponent, MapaReportPointsWidgetComponent, MapaReportPsychosocialWidgetComponent, MapaReportRankingTableWidgetComponent, MapaReportScaleWidgetComponent, MapaReportSocioemotionalWidgetComponent, MapaResultTrackComponent, MapaScaleComponent, MapaScaleParameterizationComponent, MapaSvgIconComponent, MapaTableCellDirective, MapaTableComponent, MapaTextareaComponent, MapaTooltipComponent, MapaTooltipDirective, MapaWarningComponent, MatInputAutosizeDirective, PLACAS_INVALID, PLACAS_RANGE, RadioButton, RadioButtonComponent, ReportItemComponent, SafeHtmlPipe, SlideToggle, SlideToggleComponent, TagComponent, Textarea, ValidationMessageResolverService, addDays, addMonthsToDateValue, allNumbersAreSame, buildDetailedIndicatorSections, buildIndicatorCollections, cep_ranges, create_aih, create_cartaocredito, create_certidao, create_cnh, create_cnhespelho, create_cnpj, create_cns, create_cpf, create_ect, create_iptu, create_iptu_ctba, create_iptu_sp, create_pispasep, create_processo, create_renachestadual, create_renachseguranca, create_renavam, create_titulo, create_titulo_atual, creditCardValidator, currencyToNumber, customPaginatorFactory, faker_iptu, fillString, formatBrazilianDate, formatDateAsDayMonthYear, formatDateAsMonthDayYear, formatDateByLanguage, formatDateForLocale, formatDateTimeByLanguage, formatDateValue, formatLocaleDate, formatLocaleDateTime, generateInscricaoEstadual, getActiveDateFormat, getActiveDateLocale, getAllDigits, getAllWords, getDateFormatByLanguage, getDateInputMask, getDateTimeFormatByLanguage, getDayOfMonthFromDateValue, getDefaultDateRange, getRelativeDateRange, getSpecialProperty, getYearFromDateValue, isAfterDateValue, isArray, isDateValue, isMonthFirstDateLocale, isNil, isNumber, isPresent, isString, isValidDateByLanguage, isValidDateValue, makeGenericFaker, maskBr, mask_iptu, mergeMapaUiTexts, modulo11, modulo11Custom, modulo11a, normalizeDateInput, normalizeDateLocale, normalizeLookup, normalizeText, numberToCurrency, openDialog, parseBrazilianDate, parseDateByLanguage, parseDateFieldValue, parseDateValue, parseDateValueFns, parseLocaleDateValue, processCaretTraps, provideMapaUiTexts, rand, randArray, randomEstadoSigla, randomLetter, randomLetterOrNumber, randomNumber, reformatDateStringForLanguage, rg_rj, rg_sp, sanitizeHtmlContent, setTimeOnDateValue, slugify, toDatepickerLocale, toIsoDateByLanguage, toIsoDateByLanguageWithUtcTime, toIsoDateValue, toIsoDateValueWithTime, toIsoDateValueWithUtcTime, toUtcDayExclusiveEndIso, toUtcRangeEndIso, toUtcRangeStartIso, utilsBr, validateBr, validate_aih, validate_cartaocredito, validate_celular, validate_cep, validate_certidao, validate_chassi, validate_cnh, validate_cnhespelho, validate_cnpj, validate_cns, validate_cpf, validate_currency, validate_datahora, validate_datetime, validate_ect, validate_inscricaoestadual, validate_iptu, validate_iptu_contagem, validate_iptu_ctba, validate_iptu_sp, validate_number, validate_pispasep, validate_placa, validate_porcentagem, validate_processo, validate_renachestadual, validate_renachseguranca, validate_renavam, validate_rg, validate_sped, validate_telefone, validate_time, validate_titulo };
|
|
8498
9270
|
//# sourceMappingURL=mapa-library-ui.mjs.map
|