mapa-library-ui 2.13.3 → 2.14.1
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/docs/GUIDE_V5_COMPONENTS.md +73 -0
- package/fesm2022/mapa-library-ui-src-lib-components-capability.mjs +16 -1
- package/fesm2022/mapa-library-ui-src-lib-components-capability.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-chart.mjs +16 -1
- package/fesm2022/mapa-library-ui-src-lib-components-chart.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-datepicker.mjs +16 -1
- package/fesm2022/mapa-library-ui-src-lib-components-datepicker.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-dropdown-tree.mjs +16 -1
- package/fesm2022/mapa-library-ui-src-lib-components-dropdown-tree.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-dropdown.mjs +16 -1
- package/fesm2022/mapa-library-ui-src-lib-components-dropdown.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-filters.mjs +16 -1
- package/fesm2022/mapa-library-ui-src-lib-components-filters.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-form.mjs +16 -1
- package/fesm2022/mapa-library-ui-src-lib-components-form.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-group-report.mjs +16 -1
- package/fesm2022/mapa-library-ui-src-lib-components-group-report.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-input.mjs +16 -1
- package/fesm2022/mapa-library-ui-src-lib-components-input.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-scale-parameterization.mjs +16 -1
- package/fesm2022/mapa-library-ui-src-lib-components-scale-parameterization.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-scale.mjs +16 -1
- package/fesm2022/mapa-library-ui-src-lib-components-scale.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-table.mjs +16 -1
- package/fesm2022/mapa-library-ui-src-lib-components-table.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-textarea.mjs +16 -1
- package/fesm2022/mapa-library-ui-src-lib-components-textarea.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-warning.mjs +16 -1
- package/fesm2022/mapa-library-ui-src-lib-components-warning.mjs.map +1 -1
- package/fesm2022/mapa-library-ui.mjs +905 -4
- package/fesm2022/mapa-library-ui.mjs.map +1 -1
- package/index.d.ts +785 -345
- package/mapa-library-ui-2.14.1.tgz +0 -0
- package/package.json +38 -2
- package/mapa-library-ui-2.13.3.tgz +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
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,
|
|
4
|
+
import { inject, ElementRef, DestroyRef, booleanAttribute, Input, Directive, Self, Optional, EventEmitter, Output, InjectionToken, Injector, signal, Inject, Injectable, Component, input, ChangeDetectionStrategy, SecurityContext, Pipe, effect, computed, EnvironmentInjector, createComponent, HostListener, ViewChild, model, afterNextRender, ChangeDetectorRef, forwardRef, output, viewChild, untracked, TemplateRef, contentChildren, afterEveryRender } from '@angular/core';
|
|
5
5
|
import { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';
|
|
6
6
|
import * as i2 from '@angular/forms';
|
|
7
|
-
import { NgControl, ReactiveFormsModule, NG_VALUE_ACCESSOR, FormGroup, FormControl, FormsModule } from '@angular/forms';
|
|
7
|
+
import { NgControl, ReactiveFormsModule, NG_VALUE_ACCESSOR, FormGroup, FormControl, NG_VALIDATORS, FormsModule } from '@angular/forms';
|
|
8
8
|
import { NgxMaskDirective, NgxMaskService, provideNgxMask } from 'ngx-mask';
|
|
9
9
|
import { filter, map, startWith } from 'rxjs/operators';
|
|
10
10
|
import { fromEvent, merge, EMPTY } from 'rxjs';
|
|
@@ -16,7 +16,7 @@ import * as i1$2 from '@angular/common';
|
|
|
16
16
|
import { CommonModule, NgTemplateOutlet, NgClass, DatePipe } from '@angular/common';
|
|
17
17
|
import * as i3$1 from '@angular/material/form-field';
|
|
18
18
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
19
|
-
import { getExportUiTexts, getStoredAppLanguage, getIntlLocale } from 'mapa-frontend-i18n';
|
|
19
|
+
import { MAPA_UI_TEXTS_PT_BR, getExportUiTexts, getStoredAppLanguage, getIntlLocale } from 'mapa-frontend-i18n';
|
|
20
20
|
import * as i1$3 from '@angular/platform-browser';
|
|
21
21
|
import { parseISO, parse, isValid, format, addMonths, set, getYear, getDate, isAfter } from 'date-fns';
|
|
22
22
|
import * as i2$1 from '@angular/router';
|
|
@@ -772,6 +772,14 @@ const DEFAULT_MAPA_UI_TEXTS = {
|
|
|
772
772
|
pattern: 'Formato inválido',
|
|
773
773
|
required: 'Campo obrigatório',
|
|
774
774
|
},
|
|
775
|
+
// Guia V5 components (21.x) use the pt-BR texts published by mapa-frontend-i18n.
|
|
776
|
+
wizardSteps: MAPA_UI_TEXTS_PT_BR.wizardSteps,
|
|
777
|
+
deadlineField: MAPA_UI_TEXTS_PT_BR.deadlineField,
|
|
778
|
+
welcomePreview: MAPA_UI_TEXTS_PT_BR.welcomePreview,
|
|
779
|
+
catalogOrder: MAPA_UI_TEXTS_PT_BR.catalogOrder,
|
|
780
|
+
palettePicker: MAPA_UI_TEXTS_PT_BR.palettePicker,
|
|
781
|
+
launchOptions: MAPA_UI_TEXTS_PT_BR.launchOptions,
|
|
782
|
+
fileDrop: MAPA_UI_TEXTS_PT_BR.fileDrop,
|
|
775
783
|
};
|
|
776
784
|
function getDefaultTexts() {
|
|
777
785
|
return DEFAULT_MAPA_UI_TEXTS;
|
|
@@ -789,6 +797,13 @@ function mergeMapaUiTexts(customTexts) {
|
|
|
789
797
|
warning: { ...defaults.warning, ...(customTexts?.warning ?? {}) },
|
|
790
798
|
table: { ...defaults.table, ...(customTexts?.table ?? {}) },
|
|
791
799
|
validation: { ...defaults.validation, ...(customTexts?.validation ?? {}) },
|
|
800
|
+
wizardSteps: { ...defaults.wizardSteps, ...(customTexts?.wizardSteps ?? {}) },
|
|
801
|
+
deadlineField: { ...defaults.deadlineField, ...(customTexts?.deadlineField ?? {}) },
|
|
802
|
+
welcomePreview: { ...defaults.welcomePreview, ...(customTexts?.welcomePreview ?? {}) },
|
|
803
|
+
catalogOrder: { ...defaults.catalogOrder, ...(customTexts?.catalogOrder ?? {}) },
|
|
804
|
+
palettePicker: { ...defaults.palettePicker, ...(customTexts?.palettePicker ?? {}) },
|
|
805
|
+
launchOptions: { ...defaults.launchOptions, ...(customTexts?.launchOptions ?? {}) },
|
|
806
|
+
fileDrop: { ...defaults.fileDrop, ...(customTexts?.fileDrop ?? {}) },
|
|
792
807
|
};
|
|
793
808
|
}
|
|
794
809
|
function provideMapaUiTexts(texts) {
|
|
@@ -923,6 +938,183 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
923
938
|
type: Input
|
|
924
939
|
}] } });
|
|
925
940
|
|
|
941
|
+
/**
|
|
942
|
+
* Decorative stroke icons of the Guia V5 complementary components. Always
|
|
943
|
+
* hidden from assistive technology: the surrounding control carries the name.
|
|
944
|
+
*/
|
|
945
|
+
class MapaGuideIconComponent {
|
|
946
|
+
constructor() {
|
|
947
|
+
this.name = input.required(...(ngDevMode ? [{ debugName: "name" }] : []));
|
|
948
|
+
this.size = input(18, ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
949
|
+
this.strokeWidth = input(2, ...(ngDevMode ? [{ debugName: "strokeWidth" }] : []));
|
|
950
|
+
}
|
|
951
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaGuideIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
952
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.21", type: MapaGuideIconComponent, isStandalone: true, selector: "mapa-guide-icon", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, strokeWidth: { classPropertyName: "strokeWidth", publicName: "strokeWidth", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "aria-hidden": "true" }, classAttribute: "mapa-guide-icon" }, ngImport: i0, template: `
|
|
953
|
+
<svg
|
|
954
|
+
[attr.width]="size()"
|
|
955
|
+
[attr.height]="size()"
|
|
956
|
+
viewBox="0 0 24 24"
|
|
957
|
+
fill="none"
|
|
958
|
+
stroke="currentColor"
|
|
959
|
+
[attr.stroke-width]="strokeWidth()"
|
|
960
|
+
stroke-linecap="round"
|
|
961
|
+
stroke-linejoin="round"
|
|
962
|
+
focusable="false"
|
|
963
|
+
>
|
|
964
|
+
@switch (name()) {
|
|
965
|
+
@case ('alert') {
|
|
966
|
+
<path d="M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18z" />
|
|
967
|
+
<path d="M12 8v5" />
|
|
968
|
+
<path d="M12 16h.01" />
|
|
969
|
+
}
|
|
970
|
+
@case ('arrow-down') {
|
|
971
|
+
<path d="M12 5v14" />
|
|
972
|
+
<path d="M19 12l-7 7-7-7" />
|
|
973
|
+
}
|
|
974
|
+
@case ('arrow-up') {
|
|
975
|
+
<path d="M12 19V5" />
|
|
976
|
+
<path d="M5 12l7-7 7 7" />
|
|
977
|
+
}
|
|
978
|
+
@case ('check') {
|
|
979
|
+
<path d="M20 6L9 17l-5-5" />
|
|
980
|
+
}
|
|
981
|
+
@case ('clock') {
|
|
982
|
+
<circle cx="12" cy="12" r="9" />
|
|
983
|
+
<path d="M12 7v5l3 2" />
|
|
984
|
+
}
|
|
985
|
+
@case ('file') {
|
|
986
|
+
<path d="M14 3H6v18h12V7l-4-4z" />
|
|
987
|
+
<path d="M14 3v4h4" />
|
|
988
|
+
<path d="M9 13h6" />
|
|
989
|
+
<path d="M9 17h6" />
|
|
990
|
+
}
|
|
991
|
+
@case ('grid') {
|
|
992
|
+
<path d="M4 4h7v7H4z" />
|
|
993
|
+
<path d="M13 4h7v7h-7z" />
|
|
994
|
+
<path d="M4 13h7v7H4z" />
|
|
995
|
+
<path d="M13 13h7v7h-7z" />
|
|
996
|
+
}
|
|
997
|
+
@case ('link') {
|
|
998
|
+
<path d="M10 14a4 4 0 0 0 5.66 0l3-3a4 4 0 0 0-5.66-5.66l-1 1" />
|
|
999
|
+
<path d="M14 10a4 4 0 0 0-5.66 0l-3 3a4 4 0 0 0 5.66 5.66l1-1" />
|
|
1000
|
+
}
|
|
1001
|
+
@case ('mail') {
|
|
1002
|
+
<rect x="3" y="5" width="18" height="14" rx="2" />
|
|
1003
|
+
<path d="M3 7l9 6 9-6" />
|
|
1004
|
+
}
|
|
1005
|
+
@case ('plus') {
|
|
1006
|
+
<path d="M12 5v14" />
|
|
1007
|
+
<path d="M5 12h14" />
|
|
1008
|
+
}
|
|
1009
|
+
@case ('qr-code') {
|
|
1010
|
+
<rect x="3" y="3" width="7" height="7" rx="1" />
|
|
1011
|
+
<rect x="14" y="3" width="7" height="7" rx="1" />
|
|
1012
|
+
<rect x="3" y="14" width="7" height="7" rx="1" />
|
|
1013
|
+
<path d="M14 14h3v3h-3z" />
|
|
1014
|
+
<path d="M20 14v.01" />
|
|
1015
|
+
<path d="M14 20h.01" />
|
|
1016
|
+
<path d="M17 20h4v-3" />
|
|
1017
|
+
}
|
|
1018
|
+
@case ('trash') {
|
|
1019
|
+
<path d="M4 7h16" />
|
|
1020
|
+
<path d="M9 7V4h6v3" />
|
|
1021
|
+
<path d="M6 7l1 13h10l1-13" />
|
|
1022
|
+
}
|
|
1023
|
+
@case ('upload') {
|
|
1024
|
+
<path d="M12 16V4" />
|
|
1025
|
+
<path d="M6 10l6-6 6 6" />
|
|
1026
|
+
<path d="M4 20h16" />
|
|
1027
|
+
}
|
|
1028
|
+
}
|
|
1029
|
+
</svg>
|
|
1030
|
+
`, isInline: true, styles: [":host{display:inline-flex;flex:none;line-height:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1031
|
+
}
|
|
1032
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaGuideIconComponent, decorators: [{
|
|
1033
|
+
type: Component,
|
|
1034
|
+
args: [{ selector: 'mapa-guide-icon', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
1035
|
+
'aria-hidden': 'true',
|
|
1036
|
+
class: 'mapa-guide-icon',
|
|
1037
|
+
}, template: `
|
|
1038
|
+
<svg
|
|
1039
|
+
[attr.width]="size()"
|
|
1040
|
+
[attr.height]="size()"
|
|
1041
|
+
viewBox="0 0 24 24"
|
|
1042
|
+
fill="none"
|
|
1043
|
+
stroke="currentColor"
|
|
1044
|
+
[attr.stroke-width]="strokeWidth()"
|
|
1045
|
+
stroke-linecap="round"
|
|
1046
|
+
stroke-linejoin="round"
|
|
1047
|
+
focusable="false"
|
|
1048
|
+
>
|
|
1049
|
+
@switch (name()) {
|
|
1050
|
+
@case ('alert') {
|
|
1051
|
+
<path d="M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18z" />
|
|
1052
|
+
<path d="M12 8v5" />
|
|
1053
|
+
<path d="M12 16h.01" />
|
|
1054
|
+
}
|
|
1055
|
+
@case ('arrow-down') {
|
|
1056
|
+
<path d="M12 5v14" />
|
|
1057
|
+
<path d="M19 12l-7 7-7-7" />
|
|
1058
|
+
}
|
|
1059
|
+
@case ('arrow-up') {
|
|
1060
|
+
<path d="M12 19V5" />
|
|
1061
|
+
<path d="M5 12l7-7 7 7" />
|
|
1062
|
+
}
|
|
1063
|
+
@case ('check') {
|
|
1064
|
+
<path d="M20 6L9 17l-5-5" />
|
|
1065
|
+
}
|
|
1066
|
+
@case ('clock') {
|
|
1067
|
+
<circle cx="12" cy="12" r="9" />
|
|
1068
|
+
<path d="M12 7v5l3 2" />
|
|
1069
|
+
}
|
|
1070
|
+
@case ('file') {
|
|
1071
|
+
<path d="M14 3H6v18h12V7l-4-4z" />
|
|
1072
|
+
<path d="M14 3v4h4" />
|
|
1073
|
+
<path d="M9 13h6" />
|
|
1074
|
+
<path d="M9 17h6" />
|
|
1075
|
+
}
|
|
1076
|
+
@case ('grid') {
|
|
1077
|
+
<path d="M4 4h7v7H4z" />
|
|
1078
|
+
<path d="M13 4h7v7h-7z" />
|
|
1079
|
+
<path d="M4 13h7v7H4z" />
|
|
1080
|
+
<path d="M13 13h7v7h-7z" />
|
|
1081
|
+
}
|
|
1082
|
+
@case ('link') {
|
|
1083
|
+
<path d="M10 14a4 4 0 0 0 5.66 0l3-3a4 4 0 0 0-5.66-5.66l-1 1" />
|
|
1084
|
+
<path d="M14 10a4 4 0 0 0-5.66 0l-3 3a4 4 0 0 0 5.66 5.66l1-1" />
|
|
1085
|
+
}
|
|
1086
|
+
@case ('mail') {
|
|
1087
|
+
<rect x="3" y="5" width="18" height="14" rx="2" />
|
|
1088
|
+
<path d="M3 7l9 6 9-6" />
|
|
1089
|
+
}
|
|
1090
|
+
@case ('plus') {
|
|
1091
|
+
<path d="M12 5v14" />
|
|
1092
|
+
<path d="M5 12h14" />
|
|
1093
|
+
}
|
|
1094
|
+
@case ('qr-code') {
|
|
1095
|
+
<rect x="3" y="3" width="7" height="7" rx="1" />
|
|
1096
|
+
<rect x="14" y="3" width="7" height="7" rx="1" />
|
|
1097
|
+
<rect x="3" y="14" width="7" height="7" rx="1" />
|
|
1098
|
+
<path d="M14 14h3v3h-3z" />
|
|
1099
|
+
<path d="M20 14v.01" />
|
|
1100
|
+
<path d="M14 20h.01" />
|
|
1101
|
+
<path d="M17 20h4v-3" />
|
|
1102
|
+
}
|
|
1103
|
+
@case ('trash') {
|
|
1104
|
+
<path d="M4 7h16" />
|
|
1105
|
+
<path d="M9 7V4h6v3" />
|
|
1106
|
+
<path d="M6 7l1 13h10l1-13" />
|
|
1107
|
+
}
|
|
1108
|
+
@case ('upload') {
|
|
1109
|
+
<path d="M12 16V4" />
|
|
1110
|
+
<path d="M6 10l6-6 6 6" />
|
|
1111
|
+
<path d="M4 20h16" />
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
</svg>
|
|
1115
|
+
`, styles: [":host{display:inline-flex;flex:none;line-height:0}\n"] }]
|
|
1116
|
+
}], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: true }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], strokeWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "strokeWidth", required: false }] }] } });
|
|
1117
|
+
|
|
926
1118
|
function sanitizeHtmlContent(sanitizer, value) {
|
|
927
1119
|
return sanitizer.sanitize(SecurityContext.HTML, value ?? "") ?? "";
|
|
928
1120
|
}
|
|
@@ -6041,6 +6233,103 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
6041
6233
|
* Public API Surface of mapa-library-ui capability-detail
|
|
6042
6234
|
*/
|
|
6043
6235
|
|
|
6236
|
+
let nextId$4 = 0;
|
|
6237
|
+
/**
|
|
6238
|
+
* Guia V5 · 21.5 Catálogo e ordem: available items on one side, the ordered
|
|
6239
|
+
* selection on the other. Reordering uses buttons (D22, no drag and drop in the
|
|
6240
|
+
* MVP); focus follows the moved item and every change is announced.
|
|
6241
|
+
*/
|
|
6242
|
+
class MapaCatalogOrderComponent {
|
|
6243
|
+
constructor() {
|
|
6244
|
+
this.i18n = inject(MapaI18nService);
|
|
6245
|
+
this.host = inject(ElementRef);
|
|
6246
|
+
this.injector = inject(Injector);
|
|
6247
|
+
this.items = input.required(...(ngDevMode ? [{ debugName: "items" }] : []));
|
|
6248
|
+
/** Ordered ids; ids missing from `items` are ignored and dropped on the next change. */
|
|
6249
|
+
this.order = model([], ...(ngDevMode ? [{ debugName: "order" }] : []));
|
|
6250
|
+
this.catalogTitle = input.required(...(ngDevMode ? [{ debugName: "catalogTitle" }] : []));
|
|
6251
|
+
this.catalogDescription = input(...(ngDevMode ? [undefined, { debugName: "catalogDescription" }] : []));
|
|
6252
|
+
this.orderTitle = input.required(...(ngDevMode ? [{ debugName: "orderTitle" }] : []));
|
|
6253
|
+
this.orderDescription = input(...(ngDevMode ? [undefined, { debugName: "orderDescription" }] : []));
|
|
6254
|
+
this.catalogEmptyText = input(...(ngDevMode ? [undefined, { debugName: "catalogEmptyText" }] : []));
|
|
6255
|
+
this.orderEmptyTitle = input(...(ngDevMode ? [undefined, { debugName: "orderEmptyTitle" }] : []));
|
|
6256
|
+
this.orderEmptyDescription = input(...(ngDevMode ? [undefined, { debugName: "orderEmptyDescription" }] : []));
|
|
6257
|
+
this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
6258
|
+
this.idPrefix = `mapa-catalog-order-${nextId$4++}`;
|
|
6259
|
+
this.texts = computed(() => this.i18n.textsSignal().catalogOrder, ...(ngDevMode ? [{ debugName: "texts" }] : []));
|
|
6260
|
+
this.announcement = signal('', ...(ngDevMode ? [{ debugName: "announcement" }] : []));
|
|
6261
|
+
this.ordered = computed(() => {
|
|
6262
|
+
const byId = new Map(this.items().map((item) => [item.id, item]));
|
|
6263
|
+
return this.order()
|
|
6264
|
+
.map((id) => byId.get(id))
|
|
6265
|
+
.filter((item) => item !== undefined);
|
|
6266
|
+
}, ...(ngDevMode ? [{ debugName: "ordered" }] : []));
|
|
6267
|
+
this.available = computed(() => {
|
|
6268
|
+
const chosen = new Set(this.order());
|
|
6269
|
+
return this.items().filter((item) => !chosen.has(item.id));
|
|
6270
|
+
}, ...(ngDevMode ? [{ debugName: "available" }] : []));
|
|
6271
|
+
}
|
|
6272
|
+
add(item) {
|
|
6273
|
+
if (this.disabled()) {
|
|
6274
|
+
return;
|
|
6275
|
+
}
|
|
6276
|
+
const catalog = this.available();
|
|
6277
|
+
const index = catalog.findIndex((candidate) => candidate.id === item.id);
|
|
6278
|
+
const next = [...this.ordered().map((entry) => entry.id), item.id];
|
|
6279
|
+
const neighbour = catalog[index + 1] ?? catalog[index - 1];
|
|
6280
|
+
this.commit(next, this.texts().addedAnnouncement(item.name, next.length, next.length));
|
|
6281
|
+
this.focus(neighbour
|
|
6282
|
+
? { list: 'catalog', id: neighbour.id, action: 'add' }
|
|
6283
|
+
: { list: 'order', id: item.id, action: 'remove' });
|
|
6284
|
+
}
|
|
6285
|
+
move(index, offset) {
|
|
6286
|
+
const ids = this.ordered().map((entry) => entry.id);
|
|
6287
|
+
const target = index + offset;
|
|
6288
|
+
if (this.disabled() || target < 0 || target >= ids.length) {
|
|
6289
|
+
return;
|
|
6290
|
+
}
|
|
6291
|
+
[ids[index], ids[target]] = [ids[target], ids[index]];
|
|
6292
|
+
const item = this.ordered()[index];
|
|
6293
|
+
this.commit(ids, this.texts().movedAnnouncement(item.name, target + 1, ids.length));
|
|
6294
|
+
const atEdge = offset < 0 ? target === 0 : target === ids.length - 1;
|
|
6295
|
+
const keepDirection = offset < 0 ? 'up' : 'down';
|
|
6296
|
+
const otherDirection = offset < 0 ? 'down' : 'up';
|
|
6297
|
+
this.focus({ list: 'order', id: item.id, action: atEdge ? otherDirection : keepDirection });
|
|
6298
|
+
}
|
|
6299
|
+
remove(index) {
|
|
6300
|
+
if (this.disabled()) {
|
|
6301
|
+
return;
|
|
6302
|
+
}
|
|
6303
|
+
const ordered = this.ordered();
|
|
6304
|
+
const item = ordered[index];
|
|
6305
|
+
const neighbour = ordered[index + 1] ?? ordered[index - 1];
|
|
6306
|
+
this.commit(ordered.filter((_, position) => position !== index).map((entry) => entry.id), this.texts().removedAnnouncement(item.name));
|
|
6307
|
+
this.focus(neighbour
|
|
6308
|
+
? { list: 'order', id: neighbour.id, action: 'remove' }
|
|
6309
|
+
: { list: 'catalog', id: item.id, action: 'add' });
|
|
6310
|
+
}
|
|
6311
|
+
buttonId(list, id, action) {
|
|
6312
|
+
return `${this.idPrefix}-${list}-${action}-${id}`;
|
|
6313
|
+
}
|
|
6314
|
+
commit(order, announcement) {
|
|
6315
|
+
this.order.set(order);
|
|
6316
|
+
this.announcement.set(announcement);
|
|
6317
|
+
}
|
|
6318
|
+
focus(target) {
|
|
6319
|
+
afterNextRender(() => {
|
|
6320
|
+
const id = this.buttonId(target.list, target.id, target.action);
|
|
6321
|
+
const button = this.host.nativeElement.querySelector(`[id="${CSS.escape(id)}"]`);
|
|
6322
|
+
button?.focus();
|
|
6323
|
+
}, { injector: this.injector });
|
|
6324
|
+
}
|
|
6325
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaCatalogOrderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6326
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.21", type: MapaCatalogOrderComponent, isStandalone: true, selector: "mapa-catalog-order", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, order: { classPropertyName: "order", publicName: "order", isSignal: true, isRequired: false, transformFunction: null }, catalogTitle: { classPropertyName: "catalogTitle", publicName: "catalogTitle", isSignal: true, isRequired: true, transformFunction: null }, catalogDescription: { classPropertyName: "catalogDescription", publicName: "catalogDescription", isSignal: true, isRequired: false, transformFunction: null }, orderTitle: { classPropertyName: "orderTitle", publicName: "orderTitle", isSignal: true, isRequired: true, transformFunction: null }, orderDescription: { classPropertyName: "orderDescription", publicName: "orderDescription", isSignal: true, isRequired: false, transformFunction: null }, catalogEmptyText: { classPropertyName: "catalogEmptyText", publicName: "catalogEmptyText", isSignal: true, isRequired: false, transformFunction: null }, orderEmptyTitle: { classPropertyName: "orderEmptyTitle", publicName: "orderEmptyTitle", isSignal: true, isRequired: false, transformFunction: null }, orderEmptyDescription: { classPropertyName: "orderEmptyDescription", publicName: "orderEmptyDescription", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { order: "orderChange" }, ngImport: i0, template: "<div class=\"mapa-catalog-order\">\n <section class=\"mapa-catalog-order__panel\" [attr.aria-labelledby]=\"idPrefix + '-catalog-title'\">\n <div class=\"mapa-catalog-order__header\">\n <div>\n <p class=\"mapa-catalog-order__title\" [id]=\"idPrefix + '-catalog-title'\">{{ catalogTitle() }}</p>\n @if (catalogDescription()) {\n <p class=\"mapa-catalog-order__description\">{{ catalogDescription() }}</p>\n }\n </div>\n <span class=\"mapa-catalog-order__count\" aria-hidden=\"true\">{{ available().length }}</span>\n </div>\n @if (available().length) {\n <ul class=\"mapa-catalog-order__list\" [attr.aria-labelledby]=\"idPrefix + '-catalog-title'\">\n @for (item of available(); track item.id) {\n <li class=\"mapa-catalog-order__item\">\n <span class=\"mapa-catalog-order__text\">\n <span class=\"mapa-catalog-order__name\">{{ item.name }}</span>\n @if (item.description) {\n <span class=\"mapa-catalog-order__item-description\">{{ item.description }}</span>\n }\n </span>\n <button\n type=\"button\"\n class=\"mapa-catalog-order__add\"\n [id]=\"buttonId('catalog', item.id, 'add')\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"texts().addItemLabel(item.name)\"\n (click)=\"add(item)\"\n >\n <mapa-guide-icon name=\"plus\" [size]=\"16\" [strokeWidth]=\"2.5\" />\n {{ texts().addLabel }}\n </button>\n </li>\n }\n </ul>\n } @else {\n <p class=\"mapa-catalog-order__empty\">{{ catalogEmptyText() || texts().catalogEmpty }}</p>\n }\n </section>\n\n <section class=\"mapa-catalog-order__panel\" [attr.aria-labelledby]=\"idPrefix + '-order-title'\">\n <div class=\"mapa-catalog-order__header\">\n <div>\n <p class=\"mapa-catalog-order__title\" [id]=\"idPrefix + '-order-title'\">{{ orderTitle() }}</p>\n @if (orderDescription()) {\n <p class=\"mapa-catalog-order__description\">{{ orderDescription() }}</p>\n }\n </div>\n <span class=\"mapa-catalog-order__count\" aria-hidden=\"true\">{{ ordered().length }}</span>\n </div>\n @if (ordered().length) {\n <ol class=\"mapa-catalog-order__list\" [attr.aria-labelledby]=\"idPrefix + '-order-title'\">\n @for (item of ordered(); track item.id; let index = $index, first = $first, last = $last) {\n <li class=\"mapa-catalog-order__item mapa-catalog-order__item--ordered\">\n <span class=\"mapa-catalog-order__main\">\n <span class=\"mapa-catalog-order__position\" aria-hidden=\"true\">{{ index + 1 }}</span>\n <span class=\"mapa-catalog-order__text\">\n <span class=\"mapa-catalog-order__name\">{{ item.name }}</span>\n @if (item.description) {\n <span class=\"mapa-catalog-order__item-description\">{{ item.description }}</span>\n }\n </span>\n </span>\n <span class=\"mapa-catalog-order__actions\">\n <button\n type=\"button\"\n class=\"mapa-catalog-order__icon-button\"\n [id]=\"buttonId('order', item.id, 'up')\"\n [disabled]=\"disabled() || first\"\n [attr.aria-label]=\"texts().moveUpLabel(item.name)\"\n (click)=\"move(index, -1)\"\n >\n <mapa-guide-icon name=\"arrow-up\" />\n </button>\n <button\n type=\"button\"\n class=\"mapa-catalog-order__icon-button\"\n [id]=\"buttonId('order', item.id, 'down')\"\n [disabled]=\"disabled() || last\"\n [attr.aria-label]=\"texts().moveDownLabel(item.name)\"\n (click)=\"move(index, 1)\"\n >\n <mapa-guide-icon name=\"arrow-down\" />\n </button>\n <button\n type=\"button\"\n class=\"mapa-catalog-order__icon-button mapa-catalog-order__icon-button--danger\"\n [id]=\"buttonId('order', item.id, 'remove')\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"texts().removeLabel(item.name)\"\n (click)=\"remove(index)\"\n >\n <mapa-guide-icon name=\"trash\" />\n </button>\n </span>\n </li>\n }\n </ol>\n } @else {\n <div class=\"mapa-catalog-order__empty mapa-catalog-order__empty--order\">\n <strong>{{ orderEmptyTitle() || texts().orderEmptyTitle }}</strong>\n <span>{{ orderEmptyDescription() || texts().orderEmptyDescription }}</span>\n </div>\n }\n </section>\n\n <p class=\"mapa-catalog-order__announcement\" aria-live=\"polite\">{{ announcement() }}</p>\n</div>\n", styles: [":host{display:block;min-width:0;color:var(--mapa-guide-text, #162f42);font-family:var(--mapa-guide-font-body, var(--mapa-font-body, \"Asap\", sans-serif));font-size:14px;line-height:22px}.mapa-catalog-order{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));align-items:start;gap:16px}.mapa-catalog-order__panel{display:flex;flex-direction:column;gap:12px;min-width:0;padding:16px;border:1px solid var(--mapa-guide-border, #dce5e8);border-radius:14px;background:var(--mapa-guide-surface, #ffffff)}.mapa-catalog-order__header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.mapa-catalog-order__title{margin:0;color:var(--mapa-guide-text, #162f42);font-family:var(--mapa-guide-font-heading, var(--mapa-font-heading, \"Asap\", sans-serif));font-size:16px;font-weight:600;line-height:24px}.mapa-catalog-order__description{margin:2px 0 0;color:var(--mapa-guide-text-2, #41566a);font-size:13px;line-height:20px}.mapa-catalog-order__count{display:inline-flex;flex:none;align-items:center;justify-content:center;box-sizing:border-box;min-width:24px;height:22px;padding:0 8px;border:1px solid var(--mapa-guide-border, #dce5e8);border-radius:999px;background:var(--mapa-guide-surface-2, #eef4f5);color:var(--mapa-guide-text-2, #41566a);font-size:12px;font-weight:600;font-variant-numeric:tabular-nums}.mapa-catalog-order__list{display:flex;flex-direction:column;gap:8px;margin:0;padding:0;list-style:none}.mapa-catalog-order__item{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:10px 10px 10px 12px;border:1px solid var(--mapa-guide-border, #dce5e8);border-radius:10px;background:var(--mapa-guide-surface, #ffffff)}.mapa-catalog-order__item--ordered{padding:8px 6px 8px 8px}.mapa-catalog-order__main{display:flex;flex:1 1 190px;align-items:center;gap:10px;min-width:0}.mapa-catalog-order__position{flex:none;width:18px;color:var(--mapa-guide-text-3, #56697a);font-size:13px;font-weight:600;font-variant-numeric:tabular-nums;text-align:right}.mapa-catalog-order__text{display:flex;flex:1 1 160px;flex-direction:column;gap:2px;min-width:0}.mapa-catalog-order__name{color:var(--mapa-guide-text, #162f42);font-size:14px;font-weight:600;overflow-wrap:break-word}.mapa-catalog-order__item-description{display:-webkit-box;overflow:hidden;color:var(--mapa-guide-text-2, #41566a);font-size:13px;line-height:20px;-webkit-box-orient:vertical;-webkit-line-clamp:2}.mapa-catalog-order__add{border:1px solid var(--mapa-guide-border-strong, #7f949e);background:var(--mapa-guide-surface, #ffffff);color:var(--mapa-guide-text, #162f42);display:inline-flex;align-items:center;justify-content:center;gap:6px;box-sizing:border-box;min-height:36px;padding:0 16px;border-radius:8px;font:inherit;font-size:14px;font-weight:600;line-height:1.2;text-decoration:none;cursor:pointer}.mapa-catalog-order__add:focus-visible{outline:2px solid var(--mapa-guide-focus, #d33e1f);outline-offset:2px}.mapa-catalog-order__add:disabled,.mapa-catalog-order__add[aria-disabled=true]{cursor:not-allowed}.mapa-catalog-order__add:hover:not(:disabled):not([aria-disabled=true]){background:var(--mapa-guide-surface-2, #eef4f5)}.mapa-catalog-order__add:disabled,.mapa-catalog-order__add[aria-disabled=true]{border-color:var(--mapa-guide-border, #dce5e8);background:var(--mapa-guide-surface-2, #eef4f5);color:var(--mapa-guide-text-3, #56697a)}.mapa-catalog-order__add{flex:none;margin-left:auto;padding:0 12px;font-size:13px}.mapa-catalog-order__actions{display:flex;flex:none;gap:2px;margin-left:auto}.mapa-catalog-order__icon-button{display:inline-flex;flex:none;align-items:center;justify-content:center;width:36px;height:36px;padding:0;border:0;border-radius:8px;background:transparent;color:var(--mapa-guide-text-2, #41566a);cursor:pointer}.mapa-catalog-order__icon-button:hover:not(:disabled){background:var(--mapa-guide-surface-2, #eef4f5);color:var(--mapa-guide-text, #162f42)}.mapa-catalog-order__icon-button:focus-visible{outline:2px solid var(--mapa-guide-focus, #d33e1f);outline-offset:2px}.mapa-catalog-order__icon-button:disabled{color:var(--mapa-guide-border-strong, #7f949e);cursor:not-allowed}.mapa-catalog-order__icon-button--danger:not(:disabled){color:var(--mapa-guide-danger-fg, #b3341b)}.mapa-catalog-order__icon-button--danger:not(:disabled):hover{background:var(--mapa-guide-danger-bg, #fde9e4);color:var(--mapa-guide-danger-fg, #b3341b)}.mapa-catalog-order__empty{margin:0;padding:16px;border:1px dashed var(--mapa-guide-border-strong, #7f949e);border-radius:10px;color:var(--mapa-guide-text-2, #41566a);font-size:13px;text-align:center}.mapa-catalog-order__empty--order{display:flex;flex-direction:column;align-items:center;gap:4px;padding:24px 16px}.mapa-catalog-order__empty--order strong{color:var(--mapa-guide-text, #162f42);font-size:14px;font-weight:600}.mapa-catalog-order__announcement{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}\n"], dependencies: [{ kind: "component", type: MapaGuideIconComponent, selector: "mapa-guide-icon", inputs: ["name", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
6327
|
+
}
|
|
6328
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaCatalogOrderComponent, decorators: [{
|
|
6329
|
+
type: Component,
|
|
6330
|
+
args: [{ selector: 'mapa-catalog-order', standalone: true, imports: [MapaGuideIconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"mapa-catalog-order\">\n <section class=\"mapa-catalog-order__panel\" [attr.aria-labelledby]=\"idPrefix + '-catalog-title'\">\n <div class=\"mapa-catalog-order__header\">\n <div>\n <p class=\"mapa-catalog-order__title\" [id]=\"idPrefix + '-catalog-title'\">{{ catalogTitle() }}</p>\n @if (catalogDescription()) {\n <p class=\"mapa-catalog-order__description\">{{ catalogDescription() }}</p>\n }\n </div>\n <span class=\"mapa-catalog-order__count\" aria-hidden=\"true\">{{ available().length }}</span>\n </div>\n @if (available().length) {\n <ul class=\"mapa-catalog-order__list\" [attr.aria-labelledby]=\"idPrefix + '-catalog-title'\">\n @for (item of available(); track item.id) {\n <li class=\"mapa-catalog-order__item\">\n <span class=\"mapa-catalog-order__text\">\n <span class=\"mapa-catalog-order__name\">{{ item.name }}</span>\n @if (item.description) {\n <span class=\"mapa-catalog-order__item-description\">{{ item.description }}</span>\n }\n </span>\n <button\n type=\"button\"\n class=\"mapa-catalog-order__add\"\n [id]=\"buttonId('catalog', item.id, 'add')\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"texts().addItemLabel(item.name)\"\n (click)=\"add(item)\"\n >\n <mapa-guide-icon name=\"plus\" [size]=\"16\" [strokeWidth]=\"2.5\" />\n {{ texts().addLabel }}\n </button>\n </li>\n }\n </ul>\n } @else {\n <p class=\"mapa-catalog-order__empty\">{{ catalogEmptyText() || texts().catalogEmpty }}</p>\n }\n </section>\n\n <section class=\"mapa-catalog-order__panel\" [attr.aria-labelledby]=\"idPrefix + '-order-title'\">\n <div class=\"mapa-catalog-order__header\">\n <div>\n <p class=\"mapa-catalog-order__title\" [id]=\"idPrefix + '-order-title'\">{{ orderTitle() }}</p>\n @if (orderDescription()) {\n <p class=\"mapa-catalog-order__description\">{{ orderDescription() }}</p>\n }\n </div>\n <span class=\"mapa-catalog-order__count\" aria-hidden=\"true\">{{ ordered().length }}</span>\n </div>\n @if (ordered().length) {\n <ol class=\"mapa-catalog-order__list\" [attr.aria-labelledby]=\"idPrefix + '-order-title'\">\n @for (item of ordered(); track item.id; let index = $index, first = $first, last = $last) {\n <li class=\"mapa-catalog-order__item mapa-catalog-order__item--ordered\">\n <span class=\"mapa-catalog-order__main\">\n <span class=\"mapa-catalog-order__position\" aria-hidden=\"true\">{{ index + 1 }}</span>\n <span class=\"mapa-catalog-order__text\">\n <span class=\"mapa-catalog-order__name\">{{ item.name }}</span>\n @if (item.description) {\n <span class=\"mapa-catalog-order__item-description\">{{ item.description }}</span>\n }\n </span>\n </span>\n <span class=\"mapa-catalog-order__actions\">\n <button\n type=\"button\"\n class=\"mapa-catalog-order__icon-button\"\n [id]=\"buttonId('order', item.id, 'up')\"\n [disabled]=\"disabled() || first\"\n [attr.aria-label]=\"texts().moveUpLabel(item.name)\"\n (click)=\"move(index, -1)\"\n >\n <mapa-guide-icon name=\"arrow-up\" />\n </button>\n <button\n type=\"button\"\n class=\"mapa-catalog-order__icon-button\"\n [id]=\"buttonId('order', item.id, 'down')\"\n [disabled]=\"disabled() || last\"\n [attr.aria-label]=\"texts().moveDownLabel(item.name)\"\n (click)=\"move(index, 1)\"\n >\n <mapa-guide-icon name=\"arrow-down\" />\n </button>\n <button\n type=\"button\"\n class=\"mapa-catalog-order__icon-button mapa-catalog-order__icon-button--danger\"\n [id]=\"buttonId('order', item.id, 'remove')\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"texts().removeLabel(item.name)\"\n (click)=\"remove(index)\"\n >\n <mapa-guide-icon name=\"trash\" />\n </button>\n </span>\n </li>\n }\n </ol>\n } @else {\n <div class=\"mapa-catalog-order__empty mapa-catalog-order__empty--order\">\n <strong>{{ orderEmptyTitle() || texts().orderEmptyTitle }}</strong>\n <span>{{ orderEmptyDescription() || texts().orderEmptyDescription }}</span>\n </div>\n }\n </section>\n\n <p class=\"mapa-catalog-order__announcement\" aria-live=\"polite\">{{ announcement() }}</p>\n</div>\n", styles: [":host{display:block;min-width:0;color:var(--mapa-guide-text, #162f42);font-family:var(--mapa-guide-font-body, var(--mapa-font-body, \"Asap\", sans-serif));font-size:14px;line-height:22px}.mapa-catalog-order{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));align-items:start;gap:16px}.mapa-catalog-order__panel{display:flex;flex-direction:column;gap:12px;min-width:0;padding:16px;border:1px solid var(--mapa-guide-border, #dce5e8);border-radius:14px;background:var(--mapa-guide-surface, #ffffff)}.mapa-catalog-order__header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.mapa-catalog-order__title{margin:0;color:var(--mapa-guide-text, #162f42);font-family:var(--mapa-guide-font-heading, var(--mapa-font-heading, \"Asap\", sans-serif));font-size:16px;font-weight:600;line-height:24px}.mapa-catalog-order__description{margin:2px 0 0;color:var(--mapa-guide-text-2, #41566a);font-size:13px;line-height:20px}.mapa-catalog-order__count{display:inline-flex;flex:none;align-items:center;justify-content:center;box-sizing:border-box;min-width:24px;height:22px;padding:0 8px;border:1px solid var(--mapa-guide-border, #dce5e8);border-radius:999px;background:var(--mapa-guide-surface-2, #eef4f5);color:var(--mapa-guide-text-2, #41566a);font-size:12px;font-weight:600;font-variant-numeric:tabular-nums}.mapa-catalog-order__list{display:flex;flex-direction:column;gap:8px;margin:0;padding:0;list-style:none}.mapa-catalog-order__item{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:10px 10px 10px 12px;border:1px solid var(--mapa-guide-border, #dce5e8);border-radius:10px;background:var(--mapa-guide-surface, #ffffff)}.mapa-catalog-order__item--ordered{padding:8px 6px 8px 8px}.mapa-catalog-order__main{display:flex;flex:1 1 190px;align-items:center;gap:10px;min-width:0}.mapa-catalog-order__position{flex:none;width:18px;color:var(--mapa-guide-text-3, #56697a);font-size:13px;font-weight:600;font-variant-numeric:tabular-nums;text-align:right}.mapa-catalog-order__text{display:flex;flex:1 1 160px;flex-direction:column;gap:2px;min-width:0}.mapa-catalog-order__name{color:var(--mapa-guide-text, #162f42);font-size:14px;font-weight:600;overflow-wrap:break-word}.mapa-catalog-order__item-description{display:-webkit-box;overflow:hidden;color:var(--mapa-guide-text-2, #41566a);font-size:13px;line-height:20px;-webkit-box-orient:vertical;-webkit-line-clamp:2}.mapa-catalog-order__add{border:1px solid var(--mapa-guide-border-strong, #7f949e);background:var(--mapa-guide-surface, #ffffff);color:var(--mapa-guide-text, #162f42);display:inline-flex;align-items:center;justify-content:center;gap:6px;box-sizing:border-box;min-height:36px;padding:0 16px;border-radius:8px;font:inherit;font-size:14px;font-weight:600;line-height:1.2;text-decoration:none;cursor:pointer}.mapa-catalog-order__add:focus-visible{outline:2px solid var(--mapa-guide-focus, #d33e1f);outline-offset:2px}.mapa-catalog-order__add:disabled,.mapa-catalog-order__add[aria-disabled=true]{cursor:not-allowed}.mapa-catalog-order__add:hover:not(:disabled):not([aria-disabled=true]){background:var(--mapa-guide-surface-2, #eef4f5)}.mapa-catalog-order__add:disabled,.mapa-catalog-order__add[aria-disabled=true]{border-color:var(--mapa-guide-border, #dce5e8);background:var(--mapa-guide-surface-2, #eef4f5);color:var(--mapa-guide-text-3, #56697a)}.mapa-catalog-order__add{flex:none;margin-left:auto;padding:0 12px;font-size:13px}.mapa-catalog-order__actions{display:flex;flex:none;gap:2px;margin-left:auto}.mapa-catalog-order__icon-button{display:inline-flex;flex:none;align-items:center;justify-content:center;width:36px;height:36px;padding:0;border:0;border-radius:8px;background:transparent;color:var(--mapa-guide-text-2, #41566a);cursor:pointer}.mapa-catalog-order__icon-button:hover:not(:disabled){background:var(--mapa-guide-surface-2, #eef4f5);color:var(--mapa-guide-text, #162f42)}.mapa-catalog-order__icon-button:focus-visible{outline:2px solid var(--mapa-guide-focus, #d33e1f);outline-offset:2px}.mapa-catalog-order__icon-button:disabled{color:var(--mapa-guide-border-strong, #7f949e);cursor:not-allowed}.mapa-catalog-order__icon-button--danger:not(:disabled){color:var(--mapa-guide-danger-fg, #b3341b)}.mapa-catalog-order__icon-button--danger:not(:disabled):hover{background:var(--mapa-guide-danger-bg, #fde9e4);color:var(--mapa-guide-danger-fg, #b3341b)}.mapa-catalog-order__empty{margin:0;padding:16px;border:1px dashed var(--mapa-guide-border-strong, #7f949e);border-radius:10px;color:var(--mapa-guide-text-2, #41566a);font-size:13px;text-align:center}.mapa-catalog-order__empty--order{display:flex;flex-direction:column;align-items:center;gap:4px;padding:24px 16px}.mapa-catalog-order__empty--order strong{color:var(--mapa-guide-text, #162f42);font-size:14px;font-weight:600}.mapa-catalog-order__announcement{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}\n"] }]
|
|
6331
|
+
}], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: true }] }], order: [{ type: i0.Input, args: [{ isSignal: true, alias: "order", required: false }] }, { type: i0.Output, args: ["orderChange"] }], catalogTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "catalogTitle", required: true }] }], catalogDescription: [{ type: i0.Input, args: [{ isSignal: true, alias: "catalogDescription", required: false }] }], orderTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "orderTitle", required: true }] }], orderDescription: [{ type: i0.Input, args: [{ isSignal: true, alias: "orderDescription", required: false }] }], catalogEmptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "catalogEmptyText", required: false }] }], orderEmptyTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "orderEmptyTitle", required: false }] }], orderEmptyDescription: [{ type: i0.Input, args: [{ isSignal: true, alias: "orderEmptyDescription", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
|
|
6332
|
+
|
|
6044
6333
|
class MapaDropdownComponent {
|
|
6045
6334
|
constructor() {
|
|
6046
6335
|
this.i18n = inject(MapaI18nService);
|
|
@@ -7080,6 +7369,186 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
7080
7369
|
* Public API Surface of mapa-library-ui datepicker
|
|
7081
7370
|
*/
|
|
7082
7371
|
|
|
7372
|
+
let nextId$3 = 0;
|
|
7373
|
+
/**
|
|
7374
|
+
* Guia V5 · 21.9 Campos de prazo: a number of days with an inline label and
|
|
7375
|
+
* unit. A value outside the rules is shown with its error and never reaches
|
|
7376
|
+
* the model, which keeps the last valid number.
|
|
7377
|
+
*/
|
|
7378
|
+
class MapaDeadlineFieldComponent {
|
|
7379
|
+
constructor() {
|
|
7380
|
+
this.i18n = inject(MapaI18nService);
|
|
7381
|
+
this.inputRef = viewChild('field', ...(ngDevMode ? [{ debugName: "inputRef" }] : []));
|
|
7382
|
+
this.label = input.required(...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
7383
|
+
this.min = input(1, ...(ngDevMode ? [{ debugName: "min" }] : []));
|
|
7384
|
+
this.max = input(null, ...(ngDevMode ? [{ debugName: "max" }] : []));
|
|
7385
|
+
this.required = input(true, ...(ngDevMode ? [{ debugName: "required" }] : []));
|
|
7386
|
+
this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
7387
|
+
/** Overrides the translated unit ("dia"/"dias"). */
|
|
7388
|
+
this.unit = input(...(ngDevMode ? [undefined, { debugName: "unit" }] : []));
|
|
7389
|
+
this.hint = input(...(ngDevMode ? [undefined, { debugName: "hint" }] : []));
|
|
7390
|
+
this.inputId = input(`mapa-deadline-field-${nextId$3++}`, ...(ngDevMode ? [{ debugName: "inputId" }] : []));
|
|
7391
|
+
this.value = model(null, ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
7392
|
+
/** Error of what is typed but was not accepted; null while the field mirrors `value`. */
|
|
7393
|
+
this.draftError = signal(null, ...(ngDevMode ? [{ debugName: "draftError" }] : []));
|
|
7394
|
+
this.touched = signal(false, ...(ngDevMode ? [{ debugName: "touched" }] : []));
|
|
7395
|
+
this.formDisabled = signal(false, ...(ngDevMode ? [{ debugName: "formDisabled" }] : []));
|
|
7396
|
+
this.isDisabled = computed(() => this.disabled() || this.formDisabled(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : []));
|
|
7397
|
+
this.unitLabel = computed(() => this.unit() || this.i18n.textsSignal().deadlineField.unit(this.value()), ...(ngDevMode ? [{ debugName: "unitLabel" }] : []));
|
|
7398
|
+
this.error = computed(() => this.draftError() ?? this.check(this.value()), ...(ngDevMode ? [{ debugName: "error" }] : []));
|
|
7399
|
+
this.showError = computed(() => {
|
|
7400
|
+
const error = this.error();
|
|
7401
|
+
return error !== null && (error !== 'required' || this.touched());
|
|
7402
|
+
}, ...(ngDevMode ? [{ debugName: "showError" }] : []));
|
|
7403
|
+
this.errorMessage = computed(() => {
|
|
7404
|
+
const texts = this.i18n.textsSignal();
|
|
7405
|
+
switch (this.error()) {
|
|
7406
|
+
case 'required':
|
|
7407
|
+
return this.i18n.resolveValidationText('required');
|
|
7408
|
+
case 'integer':
|
|
7409
|
+
return texts.deadlineField.integerError;
|
|
7410
|
+
case 'min':
|
|
7411
|
+
return this.i18n.resolveValidationText('min', { min: this.min() });
|
|
7412
|
+
case 'max':
|
|
7413
|
+
return this.i18n.resolveValidationText('max', { max: this.max() ?? '' });
|
|
7414
|
+
default:
|
|
7415
|
+
return '';
|
|
7416
|
+
}
|
|
7417
|
+
}, ...(ngDevMode ? [{ debugName: "errorMessage" }] : []));
|
|
7418
|
+
this.describedBy = computed(() => [this.hint() ? `${this.inputId()}-hint` : null, this.showError() ? `${this.inputId()}-error` : null]
|
|
7419
|
+
.filter((id) => id !== null)
|
|
7420
|
+
.join(' ') || null, ...(ngDevMode ? [{ debugName: "describedBy" }] : []));
|
|
7421
|
+
this.onChange = () => { };
|
|
7422
|
+
this.onTouched = () => { };
|
|
7423
|
+
this.onValidatorChange = () => { };
|
|
7424
|
+
// Mirrors outside changes into the field without fighting what is being typed.
|
|
7425
|
+
effect(() => {
|
|
7426
|
+
this.value();
|
|
7427
|
+
this.inputRef();
|
|
7428
|
+
untracked(() => this.syncField(false));
|
|
7429
|
+
});
|
|
7430
|
+
effect(() => {
|
|
7431
|
+
this.min();
|
|
7432
|
+
this.max();
|
|
7433
|
+
this.required();
|
|
7434
|
+
untracked(() => this.onValidatorChange());
|
|
7435
|
+
});
|
|
7436
|
+
}
|
|
7437
|
+
writeValue(value) {
|
|
7438
|
+
this.value.set(typeof value === 'number' && Number.isFinite(value) ? value : null);
|
|
7439
|
+
this.syncField(true);
|
|
7440
|
+
}
|
|
7441
|
+
registerOnChange(fn) {
|
|
7442
|
+
this.onChange = fn;
|
|
7443
|
+
}
|
|
7444
|
+
registerOnTouched(fn) {
|
|
7445
|
+
this.onTouched = fn;
|
|
7446
|
+
}
|
|
7447
|
+
setDisabledState(isDisabled) {
|
|
7448
|
+
this.formDisabled.set(isDisabled);
|
|
7449
|
+
}
|
|
7450
|
+
validate(_control) {
|
|
7451
|
+
const error = this.error();
|
|
7452
|
+
switch (error) {
|
|
7453
|
+
case null:
|
|
7454
|
+
return null;
|
|
7455
|
+
case 'min':
|
|
7456
|
+
return { min: { min: this.min(), actual: this.fieldText() } };
|
|
7457
|
+
case 'max':
|
|
7458
|
+
return { max: { max: this.max(), actual: this.fieldText() } };
|
|
7459
|
+
default:
|
|
7460
|
+
return { [error]: true };
|
|
7461
|
+
}
|
|
7462
|
+
}
|
|
7463
|
+
registerOnValidatorChange(fn) {
|
|
7464
|
+
this.onValidatorChange = fn;
|
|
7465
|
+
}
|
|
7466
|
+
onInput() {
|
|
7467
|
+
const element = this.inputRef()?.nativeElement;
|
|
7468
|
+
if (!element) {
|
|
7469
|
+
return;
|
|
7470
|
+
}
|
|
7471
|
+
const parsed = this.parse(element);
|
|
7472
|
+
const error = element.validity.badInput ? 'integer' : this.check(parsed);
|
|
7473
|
+
if (error === null) {
|
|
7474
|
+
this.draftError.set(null);
|
|
7475
|
+
if (parsed !== this.value()) {
|
|
7476
|
+
this.value.set(parsed);
|
|
7477
|
+
this.onChange(parsed);
|
|
7478
|
+
}
|
|
7479
|
+
}
|
|
7480
|
+
else {
|
|
7481
|
+
this.draftError.set(error);
|
|
7482
|
+
}
|
|
7483
|
+
this.onValidatorChange();
|
|
7484
|
+
}
|
|
7485
|
+
onBlur() {
|
|
7486
|
+
this.touched.set(true);
|
|
7487
|
+
this.onTouched();
|
|
7488
|
+
}
|
|
7489
|
+
/** Writes `value` into the field; `force` also discards a rejected draft that matches it. */
|
|
7490
|
+
syncField(force) {
|
|
7491
|
+
const element = this.inputRef()?.nativeElement;
|
|
7492
|
+
if (!element) {
|
|
7493
|
+
return;
|
|
7494
|
+
}
|
|
7495
|
+
const value = this.value();
|
|
7496
|
+
const showsValue = !element.validity.badInput && this.parse(element) === value;
|
|
7497
|
+
if (force || !showsValue) {
|
|
7498
|
+
element.value = value === null ? '' : String(value);
|
|
7499
|
+
this.draftError.set(null);
|
|
7500
|
+
}
|
|
7501
|
+
}
|
|
7502
|
+
fieldText() {
|
|
7503
|
+
return this.inputRef()?.nativeElement.value ?? '';
|
|
7504
|
+
}
|
|
7505
|
+
parse(element) {
|
|
7506
|
+
const text = element.value.trim();
|
|
7507
|
+
return text === '' ? null : Number(text);
|
|
7508
|
+
}
|
|
7509
|
+
check(value) {
|
|
7510
|
+
if (value === null) {
|
|
7511
|
+
return this.required() ? 'required' : null;
|
|
7512
|
+
}
|
|
7513
|
+
if (!Number.isInteger(value)) {
|
|
7514
|
+
return 'integer';
|
|
7515
|
+
}
|
|
7516
|
+
if (value < this.min()) {
|
|
7517
|
+
return 'min';
|
|
7518
|
+
}
|
|
7519
|
+
const max = this.max();
|
|
7520
|
+
return max !== null && value > max ? 'max' : null;
|
|
7521
|
+
}
|
|
7522
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaDeadlineFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7523
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.21", type: MapaDeadlineFieldComponent, isStandalone: true, selector: "mapa-deadline-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, unit: { classPropertyName: "unit", publicName: "unit", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, providers: [
|
|
7524
|
+
{
|
|
7525
|
+
provide: NG_VALUE_ACCESSOR,
|
|
7526
|
+
useExisting: forwardRef(() => MapaDeadlineFieldComponent),
|
|
7527
|
+
multi: true,
|
|
7528
|
+
},
|
|
7529
|
+
{
|
|
7530
|
+
provide: NG_VALIDATORS,
|
|
7531
|
+
useExisting: forwardRef(() => MapaDeadlineFieldComponent),
|
|
7532
|
+
multi: true,
|
|
7533
|
+
},
|
|
7534
|
+
], viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["field"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"mapa-deadline-field\" [class.mapa-deadline-field--invalid]=\"showError()\">\n <div class=\"mapa-deadline-field__row\">\n <label class=\"mapa-deadline-field__label\" [id]=\"inputId() + '-label'\" [for]=\"inputId()\">{{\n label()\n }}</label>\n <input\n #field\n type=\"number\"\n inputmode=\"numeric\"\n step=\"1\"\n class=\"mapa-deadline-field__input\"\n [id]=\"inputId()\"\n [attr.min]=\"min()\"\n [attr.max]=\"max()\"\n [required]=\"required()\"\n [disabled]=\"isDisabled()\"\n [attr.aria-labelledby]=\"inputId() + '-label ' + inputId() + '-unit'\"\n [attr.aria-invalid]=\"showError() || null\"\n [attr.aria-describedby]=\"describedBy()\"\n (input)=\"onInput()\"\n (blur)=\"onBlur()\"\n />\n <span class=\"mapa-deadline-field__unit\" [id]=\"inputId() + '-unit'\">{{ unitLabel() }}</span>\n </div>\n @if (hint()) {\n <p class=\"mapa-deadline-field__hint\" [id]=\"inputId() + '-hint'\">{{ hint() }}</p>\n }\n <p class=\"mapa-deadline-field__error\" [id]=\"inputId() + '-error'\" aria-live=\"polite\">\n @if (showError()) {\n <mapa-guide-icon name=\"alert\" [size]=\"16\" />\n <span>{{ errorMessage() }}</span>\n }\n </p>\n</div>\n", styles: [":host{display:block;min-width:0;color:var(--mapa-guide-text, #162f42);font-family:var(--mapa-guide-font-body, var(--mapa-font-body, \"Asap\", sans-serif));font-size:14px;line-height:22px}.mapa-deadline-field{display:flex;flex-direction:column;gap:6px}.mapa-deadline-field__row{display:flex;flex-wrap:wrap;align-items:center;gap:10px;font-size:14px}.mapa-deadline-field__label{color:var(--mapa-guide-text, #162f42);cursor:pointer}.mapa-deadline-field__input{box-sizing:border-box;width:80px;height:44px;padding:0 8px 0 12px;border:1px solid var(--mapa-guide-border-strong, #7f949e);border-radius:8px;background:var(--mapa-guide-surface, #ffffff);color:var(--mapa-guide-text, #162f42);font:inherit;font-size:14px;font-variant-numeric:tabular-nums}.mapa-deadline-field__input:focus-visible{outline:2px solid var(--mapa-guide-focus, #d33e1f);outline-offset:2px;outline-offset:0;border-color:var(--mapa-guide-focus, #d33e1f)}.mapa-deadline-field__input:disabled{border-color:var(--mapa-guide-border, #dce5e8);background:var(--mapa-guide-surface-2, #eef4f5);color:var(--mapa-guide-text-3, #56697a);cursor:not-allowed}.mapa-deadline-field--invalid .mapa-deadline-field__input{border-color:var(--mapa-guide-danger-fg, #b3341b)}.mapa-deadline-field__unit,.mapa-deadline-field__hint{color:var(--mapa-guide-text-2, #41566a)}.mapa-deadline-field__hint{margin:0;color:var(--mapa-guide-text-2, #41566a);font-size:13px;line-height:20px}.mapa-deadline-field__error{display:flex;align-items:flex-start;gap:6px;margin:0;color:var(--mapa-guide-danger-fg, #b3341b);font-size:13px;line-height:20px}.mapa-deadline-field__error:empty{margin-top:-6px}.mapa-deadline-field__error mapa-guide-icon{margin-top:2px}\n"], dependencies: [{ kind: "component", type: MapaGuideIconComponent, selector: "mapa-guide-icon", inputs: ["name", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
7535
|
+
}
|
|
7536
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaDeadlineFieldComponent, decorators: [{
|
|
7537
|
+
type: Component,
|
|
7538
|
+
args: [{ selector: 'mapa-deadline-field', standalone: true, imports: [MapaGuideIconComponent], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
7539
|
+
{
|
|
7540
|
+
provide: NG_VALUE_ACCESSOR,
|
|
7541
|
+
useExisting: forwardRef(() => MapaDeadlineFieldComponent),
|
|
7542
|
+
multi: true,
|
|
7543
|
+
},
|
|
7544
|
+
{
|
|
7545
|
+
provide: NG_VALIDATORS,
|
|
7546
|
+
useExisting: forwardRef(() => MapaDeadlineFieldComponent),
|
|
7547
|
+
multi: true,
|
|
7548
|
+
},
|
|
7549
|
+
], template: "<div class=\"mapa-deadline-field\" [class.mapa-deadline-field--invalid]=\"showError()\">\n <div class=\"mapa-deadline-field__row\">\n <label class=\"mapa-deadline-field__label\" [id]=\"inputId() + '-label'\" [for]=\"inputId()\">{{\n label()\n }}</label>\n <input\n #field\n type=\"number\"\n inputmode=\"numeric\"\n step=\"1\"\n class=\"mapa-deadline-field__input\"\n [id]=\"inputId()\"\n [attr.min]=\"min()\"\n [attr.max]=\"max()\"\n [required]=\"required()\"\n [disabled]=\"isDisabled()\"\n [attr.aria-labelledby]=\"inputId() + '-label ' + inputId() + '-unit'\"\n [attr.aria-invalid]=\"showError() || null\"\n [attr.aria-describedby]=\"describedBy()\"\n (input)=\"onInput()\"\n (blur)=\"onBlur()\"\n />\n <span class=\"mapa-deadline-field__unit\" [id]=\"inputId() + '-unit'\">{{ unitLabel() }}</span>\n </div>\n @if (hint()) {\n <p class=\"mapa-deadline-field__hint\" [id]=\"inputId() + '-hint'\">{{ hint() }}</p>\n }\n <p class=\"mapa-deadline-field__error\" [id]=\"inputId() + '-error'\" aria-live=\"polite\">\n @if (showError()) {\n <mapa-guide-icon name=\"alert\" [size]=\"16\" />\n <span>{{ errorMessage() }}</span>\n }\n </p>\n</div>\n", styles: [":host{display:block;min-width:0;color:var(--mapa-guide-text, #162f42);font-family:var(--mapa-guide-font-body, var(--mapa-font-body, \"Asap\", sans-serif));font-size:14px;line-height:22px}.mapa-deadline-field{display:flex;flex-direction:column;gap:6px}.mapa-deadline-field__row{display:flex;flex-wrap:wrap;align-items:center;gap:10px;font-size:14px}.mapa-deadline-field__label{color:var(--mapa-guide-text, #162f42);cursor:pointer}.mapa-deadline-field__input{box-sizing:border-box;width:80px;height:44px;padding:0 8px 0 12px;border:1px solid var(--mapa-guide-border-strong, #7f949e);border-radius:8px;background:var(--mapa-guide-surface, #ffffff);color:var(--mapa-guide-text, #162f42);font:inherit;font-size:14px;font-variant-numeric:tabular-nums}.mapa-deadline-field__input:focus-visible{outline:2px solid var(--mapa-guide-focus, #d33e1f);outline-offset:2px;outline-offset:0;border-color:var(--mapa-guide-focus, #d33e1f)}.mapa-deadline-field__input:disabled{border-color:var(--mapa-guide-border, #dce5e8);background:var(--mapa-guide-surface-2, #eef4f5);color:var(--mapa-guide-text-3, #56697a);cursor:not-allowed}.mapa-deadline-field--invalid .mapa-deadline-field__input{border-color:var(--mapa-guide-danger-fg, #b3341b)}.mapa-deadline-field__unit,.mapa-deadline-field__hint{color:var(--mapa-guide-text-2, #41566a)}.mapa-deadline-field__hint{margin:0;color:var(--mapa-guide-text-2, #41566a);font-size:13px;line-height:20px}.mapa-deadline-field__error{display:flex;align-items:flex-start;gap:6px;margin:0;color:var(--mapa-guide-danger-fg, #b3341b);font-size:13px;line-height:20px}.mapa-deadline-field__error:empty{margin-top:-6px}.mapa-deadline-field__error mapa-guide-icon{margin-top:2px}\n"] }]
|
|
7550
|
+
}], ctorParameters: () => [], propDecorators: { inputRef: [{ type: i0.ViewChild, args: ['field', { isSignal: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], unit: [{ type: i0.Input, args: [{ isSignal: true, alias: "unit", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }] } });
|
|
7551
|
+
|
|
7083
7552
|
class MapaDialogComponent {
|
|
7084
7553
|
constructor(data, dialogRef, sanitizer) {
|
|
7085
7554
|
this.data = data;
|
|
@@ -7242,6 +7711,149 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
7242
7711
|
* Public API Surface of mapa-library-ui empty
|
|
7243
7712
|
*/
|
|
7244
7713
|
|
|
7714
|
+
let nextId$2 = 0;
|
|
7715
|
+
/**
|
|
7716
|
+
* Area to drop or select one file. It checks the type and size before
|
|
7717
|
+
* accepting it; reading the content is the consumer's job, which reports a
|
|
7718
|
+
* failure back through `error`.
|
|
7719
|
+
*/
|
|
7720
|
+
class MapaFileDropComponent {
|
|
7721
|
+
constructor() {
|
|
7722
|
+
this.i18n = inject(MapaI18nService);
|
|
7723
|
+
this.host = inject(ElementRef);
|
|
7724
|
+
this.injector = inject(Injector);
|
|
7725
|
+
this.fileInput = viewChild('fileInput', ...(ngDevMode ? [{ debugName: "fileInput" }] : []));
|
|
7726
|
+
/** Extensions (".xlsx") or media types ("text/csv", "image/*"). */
|
|
7727
|
+
this.accept = input(['.xlsx', '.csv'], ...(ngDevMode ? [{ debugName: "accept" }] : []));
|
|
7728
|
+
/** Largest accepted size in bytes. */
|
|
7729
|
+
this.maxSize = input(null, ...(ngDevMode ? [{ debugName: "maxSize" }] : []));
|
|
7730
|
+
/** Overrides "Arraste o arquivo para cá" (not `title`, which would also become a host tooltip). */
|
|
7731
|
+
this.dropTitle = input(...(ngDevMode ? [undefined, { debugName: "dropTitle" }] : []));
|
|
7732
|
+
/** Extra line after the accepted types, e.g. the row limit. */
|
|
7733
|
+
this.hint = input(...(ngDevMode ? [undefined, { debugName: "hint" }] : []));
|
|
7734
|
+
/** Line under the loaded file name, e.g. "5 linhas lidas · aba Convidados". */
|
|
7735
|
+
this.fileDetail = input(...(ngDevMode ? [undefined, { debugName: "fileDetail" }] : []));
|
|
7736
|
+
/** Error reported by the consumer, e.g. a file that could not be read. */
|
|
7737
|
+
this.error = input(...(ngDevMode ? [undefined, { debugName: "error" }] : []));
|
|
7738
|
+
this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
7739
|
+
this.file = model(null, ...(ngDevMode ? [{ debugName: "file" }] : []));
|
|
7740
|
+
this.rejected = output();
|
|
7741
|
+
this.idPrefix = `mapa-file-drop-${nextId$2++}`;
|
|
7742
|
+
this.texts = computed(() => this.i18n.textsSignal().fileDrop, ...(ngDevMode ? [{ debugName: "texts" }] : []));
|
|
7743
|
+
this.dragging = signal(false, ...(ngDevMode ? [{ debugName: "dragging" }] : []));
|
|
7744
|
+
this.rejection = signal(null, ...(ngDevMode ? [{ debugName: "rejection" }] : []));
|
|
7745
|
+
this.acceptAttribute = computed(() => this.accept().join(','), ...(ngDevMode ? [{ debugName: "acceptAttribute" }] : []));
|
|
7746
|
+
this.acceptedTypes = computed(() => this.texts().acceptedTypes(this.accept()), ...(ngDevMode ? [{ debugName: "acceptedTypes" }] : []));
|
|
7747
|
+
this.errorMessage = computed(() => {
|
|
7748
|
+
const rejection = this.rejection();
|
|
7749
|
+
if (rejection) {
|
|
7750
|
+
return rejection.reason === 'type'
|
|
7751
|
+
? this.texts().invalidType(rejection.file.name, this.accept())
|
|
7752
|
+
: this.texts().tooLarge(rejection.file.name, this.formatSize(this.maxSize() ?? 0));
|
|
7753
|
+
}
|
|
7754
|
+
return this.error() || null;
|
|
7755
|
+
}, ...(ngDevMode ? [{ debugName: "errorMessage" }] : []));
|
|
7756
|
+
this.loadedDetail = computed(() => {
|
|
7757
|
+
const file = this.file();
|
|
7758
|
+
return this.fileDetail() || (file ? this.formatSize(file.size) : '');
|
|
7759
|
+
}, ...(ngDevMode ? [{ debugName: "loadedDetail" }] : []));
|
|
7760
|
+
}
|
|
7761
|
+
openPicker() {
|
|
7762
|
+
if (!this.disabled()) {
|
|
7763
|
+
this.fileInput()?.nativeElement.click();
|
|
7764
|
+
}
|
|
7765
|
+
}
|
|
7766
|
+
onPicked(event) {
|
|
7767
|
+
const input = event.target;
|
|
7768
|
+
const file = input.files?.item(0) ?? null;
|
|
7769
|
+
// Lets the same file be picked again after a replacement.
|
|
7770
|
+
input.value = '';
|
|
7771
|
+
if (file) {
|
|
7772
|
+
this.take(file);
|
|
7773
|
+
}
|
|
7774
|
+
}
|
|
7775
|
+
onDragOver(event) {
|
|
7776
|
+
event.preventDefault();
|
|
7777
|
+
if (this.disabled()) {
|
|
7778
|
+
if (event.dataTransfer) {
|
|
7779
|
+
event.dataTransfer.dropEffect = 'none';
|
|
7780
|
+
}
|
|
7781
|
+
return;
|
|
7782
|
+
}
|
|
7783
|
+
if (event.dataTransfer) {
|
|
7784
|
+
event.dataTransfer.dropEffect = 'copy';
|
|
7785
|
+
}
|
|
7786
|
+
this.dragging.set(true);
|
|
7787
|
+
}
|
|
7788
|
+
onDragLeave(event) {
|
|
7789
|
+
const zone = event.currentTarget;
|
|
7790
|
+
const next = event.relatedTarget;
|
|
7791
|
+
if (!next || !zone.contains(next)) {
|
|
7792
|
+
this.dragging.set(false);
|
|
7793
|
+
}
|
|
7794
|
+
}
|
|
7795
|
+
onDrop(event) {
|
|
7796
|
+
event.preventDefault();
|
|
7797
|
+
this.dragging.set(false);
|
|
7798
|
+
const file = event.dataTransfer?.files.item(0) ?? null;
|
|
7799
|
+
if (file && !this.disabled()) {
|
|
7800
|
+
this.take(file);
|
|
7801
|
+
}
|
|
7802
|
+
}
|
|
7803
|
+
replace() {
|
|
7804
|
+
this.file.set(null);
|
|
7805
|
+
this.focus('select');
|
|
7806
|
+
}
|
|
7807
|
+
take(file) {
|
|
7808
|
+
const reason = this.check(file);
|
|
7809
|
+
if (reason) {
|
|
7810
|
+
this.rejection.set({ file, reason });
|
|
7811
|
+
this.rejected.emit({ file, reason });
|
|
7812
|
+
return;
|
|
7813
|
+
}
|
|
7814
|
+
this.rejection.set(null);
|
|
7815
|
+
this.file.set(file);
|
|
7816
|
+
this.focus('replace');
|
|
7817
|
+
}
|
|
7818
|
+
check(file) {
|
|
7819
|
+
const name = file.name.toLowerCase();
|
|
7820
|
+
const type = file.type.toLowerCase();
|
|
7821
|
+
const accepted = this.accept().some((rule) => {
|
|
7822
|
+
const pattern = rule.trim().toLowerCase();
|
|
7823
|
+
if (pattern.startsWith('.')) {
|
|
7824
|
+
return name.endsWith(pattern);
|
|
7825
|
+
}
|
|
7826
|
+
return pattern.endsWith('/*') ? type.startsWith(pattern.slice(0, -1)) : type === pattern;
|
|
7827
|
+
});
|
|
7828
|
+
if (this.accept().length && !accepted) {
|
|
7829
|
+
return 'type';
|
|
7830
|
+
}
|
|
7831
|
+
const maxSize = this.maxSize();
|
|
7832
|
+
return maxSize !== null && file.size > maxSize ? 'size' : null;
|
|
7833
|
+
}
|
|
7834
|
+
focus(target) {
|
|
7835
|
+
afterNextRender(() => {
|
|
7836
|
+
this.host.nativeElement.querySelector(`#${this.idPrefix}-${target}`)?.focus();
|
|
7837
|
+
}, { injector: this.injector });
|
|
7838
|
+
}
|
|
7839
|
+
formatSize(bytes) {
|
|
7840
|
+
const units = ['B', 'KB', 'MB', 'GB'];
|
|
7841
|
+
let size = bytes;
|
|
7842
|
+
let unit = 0;
|
|
7843
|
+
while (size >= 1024 && unit < units.length - 1) {
|
|
7844
|
+
size /= 1024;
|
|
7845
|
+
unit++;
|
|
7846
|
+
}
|
|
7847
|
+
return `${new Intl.NumberFormat(undefined, { maximumFractionDigits: 1 }).format(size)} ${units[unit]}`;
|
|
7848
|
+
}
|
|
7849
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaFileDropComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7850
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.21", type: MapaFileDropComponent, isStandalone: true, selector: "mapa-file-drop", inputs: { accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, maxSize: { classPropertyName: "maxSize", publicName: "maxSize", isSignal: true, isRequired: false, transformFunction: null }, dropTitle: { classPropertyName: "dropTitle", publicName: "dropTitle", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, fileDetail: { classPropertyName: "fileDetail", publicName: "fileDetail", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, file: { classPropertyName: "file", publicName: "file", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { file: "fileChange", rejected: "rejected" }, viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"mapa-file-drop\">\n <input\n #fileInput\n type=\"file\"\n class=\"mapa-file-drop__input\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n [accept]=\"acceptAttribute()\"\n [disabled]=\"disabled()\"\n (change)=\"onPicked($event)\"\n />\n\n @if (file(); as current) {\n <div class=\"mapa-file-drop__loaded\" role=\"status\">\n <span class=\"mapa-file-drop__file-icon\">\n <mapa-guide-icon name=\"file\" [size]=\"20\" />\n </span>\n <span class=\"mapa-file-drop__file\">\n <strong class=\"mapa-file-drop__file-name\">{{ current.name }}</strong>\n @if (loadedDetail()) {\n <span class=\"mapa-file-drop__file-detail\">{{ loadedDetail() }}</span>\n }\n </span>\n <button\n type=\"button\"\n class=\"mapa-file-drop__replace\"\n [id]=\"idPrefix + '-replace'\"\n [disabled]=\"disabled()\"\n (click)=\"replace()\"\n >\n {{ texts().replaceLabel }}\n </button>\n </div>\n } @else {\n <div\n class=\"mapa-file-drop__zone\"\n [class.mapa-file-drop__zone--dragging]=\"dragging()\"\n [class.mapa-file-drop__zone--invalid]=\"errorMessage()\"\n [class.mapa-file-drop__zone--disabled]=\"disabled()\"\n (dragenter)=\"onDragOver($event)\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave($event)\"\n (drop)=\"onDrop($event)\"\n >\n <span class=\"mapa-file-drop__zone-icon\">\n <mapa-guide-icon name=\"upload\" [size]=\"22\" />\n </span>\n <strong class=\"mapa-file-drop__title\">{{ dropTitle() || texts().dropTitle }}</strong>\n <span class=\"mapa-file-drop__separator\">{{ texts().separator }}</span>\n <button\n type=\"button\"\n class=\"mapa-file-drop__select\"\n [id]=\"idPrefix + '-select'\"\n [disabled]=\"disabled()\"\n [attr.aria-describedby]=\"idPrefix + '-types' + (errorMessage() ? ' ' + idPrefix + '-error' : '')\"\n (click)=\"openPicker()\"\n >\n {{ texts().selectLabel }}\n </button>\n <span class=\"mapa-file-drop__types\" [id]=\"idPrefix + '-types'\">\n {{ acceptedTypes() }}@if (hint()) { \u00B7 {{ hint() }}}\n </span>\n </div>\n }\n\n @if (errorMessage(); as message) {\n <div class=\"mapa-file-drop__error\" role=\"alert\" [id]=\"idPrefix + '-error'\">\n <mapa-guide-icon name=\"alert\" />\n <span>{{ message }}</span>\n </div>\n }\n</div>\n", styles: [":host{display:block;min-width:0;color:var(--mapa-guide-text, #162f42);font-family:var(--mapa-guide-font-body, var(--mapa-font-body, \"Asap\", sans-serif));font-size:14px;line-height:22px}.mapa-file-drop{display:flex;flex-direction:column;gap:8px}.mapa-file-drop__input{display:none}.mapa-file-drop__zone{display:flex;flex-direction:column;align-items:center;gap:10px;padding:32px 24px;border:1px dashed var(--mapa-guide-border-strong, #7f949e);border-radius:10px;background:var(--mapa-guide-surface-2, #eef4f5);text-align:center;transition:border-color .12s ease,background-color .12s ease}.mapa-file-drop__zone--dragging{border-style:solid;border-color:var(--mapa-guide-primary, #d33e1f);background:var(--mapa-guide-primary-soft, #ffede6)}.mapa-file-drop__zone--invalid{border-color:var(--mapa-guide-danger-fg, #b3341b)}.mapa-file-drop__zone--disabled{color:var(--mapa-guide-text-3, #56697a)}@media(prefers-reduced-motion:reduce){.mapa-file-drop__zone{transition:none}}.mapa-file-drop__zone-icon{display:inline-flex;align-items:center;justify-content:center;width:48px;height:48px;border:1px solid var(--mapa-guide-border, #dce5e8);border-radius:12px;background:var(--mapa-guide-surface, #ffffff);color:var(--mapa-guide-text-2, #41566a)}.mapa-file-drop__title{font-weight:600}.mapa-file-drop__separator{color:var(--mapa-guide-text-2, #41566a);font-size:13px}.mapa-file-drop__select{border:1px solid var(--mapa-guide-border-strong, #7f949e);background:var(--mapa-guide-surface, #ffffff);color:var(--mapa-guide-text, #162f42);display:inline-flex;align-items:center;justify-content:center;gap:6px;box-sizing:border-box;min-height:44px;padding:0 16px;border-radius:8px;font:inherit;font-size:14px;font-weight:600;line-height:1.2;text-decoration:none;cursor:pointer}.mapa-file-drop__select:focus-visible{outline:2px solid var(--mapa-guide-focus, #d33e1f);outline-offset:2px}.mapa-file-drop__select:disabled,.mapa-file-drop__select[aria-disabled=true]{cursor:not-allowed}.mapa-file-drop__select:hover:not(:disabled):not([aria-disabled=true]){background:var(--mapa-guide-surface-2, #eef4f5)}.mapa-file-drop__select:disabled,.mapa-file-drop__select[aria-disabled=true]{border-color:var(--mapa-guide-border, #dce5e8);background:var(--mapa-guide-surface-2, #eef4f5);color:var(--mapa-guide-text-3, #56697a)}.mapa-file-drop__types{color:var(--mapa-guide-text-3, #56697a);font-size:12px;line-height:16px}.mapa-file-drop__loaded{display:flex;align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--mapa-guide-border, #dce5e8);border-radius:10px;background:var(--mapa-guide-surface, #ffffff)}.mapa-file-drop__file-icon{display:inline-flex;flex:none;align-items:center;justify-content:center;width:40px;height:40px;border-radius:10px;background:var(--mapa-guide-ok-bg, #ddf1f2);color:var(--mapa-guide-ok-fg, #065156)}.mapa-file-drop__file{display:flex;flex:1;flex-direction:column;min-width:0;line-height:20px}.mapa-file-drop__file-name{font-weight:600;overflow-wrap:anywhere}.mapa-file-drop__file-detail{color:var(--mapa-guide-text-2, #41566a);font-size:13px}.mapa-file-drop__replace{border:1px solid var(--mapa-guide-border-strong, #7f949e);background:var(--mapa-guide-surface, #ffffff);color:var(--mapa-guide-text, #162f42);display:inline-flex;align-items:center;justify-content:center;gap:6px;box-sizing:border-box;min-height:36px;padding:0 16px;border-radius:8px;font:inherit;font-size:14px;font-weight:600;line-height:1.2;text-decoration:none;cursor:pointer}.mapa-file-drop__replace:focus-visible{outline:2px solid var(--mapa-guide-focus, #d33e1f);outline-offset:2px}.mapa-file-drop__replace:disabled,.mapa-file-drop__replace[aria-disabled=true]{cursor:not-allowed}.mapa-file-drop__replace:hover:not(:disabled):not([aria-disabled=true]){background:var(--mapa-guide-surface-2, #eef4f5)}.mapa-file-drop__replace:disabled,.mapa-file-drop__replace[aria-disabled=true]{border-color:var(--mapa-guide-border, #dce5e8);background:var(--mapa-guide-surface-2, #eef4f5);color:var(--mapa-guide-text-3, #56697a)}.mapa-file-drop__replace{flex:none;padding:0 12px;font-size:13px}.mapa-file-drop__error{display:flex;align-items:flex-start;gap:10px;padding:12px 14px;border-radius:10px;background:var(--mapa-guide-danger-bg, #fde9e4);color:var(--mapa-guide-danger-fg, #b3341b);font-size:13px;line-height:20px}.mapa-file-drop__error mapa-guide-icon{margin-top:1px}\n"], dependencies: [{ kind: "component", type: MapaGuideIconComponent, selector: "mapa-guide-icon", inputs: ["name", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
7851
|
+
}
|
|
7852
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaFileDropComponent, decorators: [{
|
|
7853
|
+
type: Component,
|
|
7854
|
+
args: [{ selector: 'mapa-file-drop', standalone: true, imports: [MapaGuideIconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"mapa-file-drop\">\n <input\n #fileInput\n type=\"file\"\n class=\"mapa-file-drop__input\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n [accept]=\"acceptAttribute()\"\n [disabled]=\"disabled()\"\n (change)=\"onPicked($event)\"\n />\n\n @if (file(); as current) {\n <div class=\"mapa-file-drop__loaded\" role=\"status\">\n <span class=\"mapa-file-drop__file-icon\">\n <mapa-guide-icon name=\"file\" [size]=\"20\" />\n </span>\n <span class=\"mapa-file-drop__file\">\n <strong class=\"mapa-file-drop__file-name\">{{ current.name }}</strong>\n @if (loadedDetail()) {\n <span class=\"mapa-file-drop__file-detail\">{{ loadedDetail() }}</span>\n }\n </span>\n <button\n type=\"button\"\n class=\"mapa-file-drop__replace\"\n [id]=\"idPrefix + '-replace'\"\n [disabled]=\"disabled()\"\n (click)=\"replace()\"\n >\n {{ texts().replaceLabel }}\n </button>\n </div>\n } @else {\n <div\n class=\"mapa-file-drop__zone\"\n [class.mapa-file-drop__zone--dragging]=\"dragging()\"\n [class.mapa-file-drop__zone--invalid]=\"errorMessage()\"\n [class.mapa-file-drop__zone--disabled]=\"disabled()\"\n (dragenter)=\"onDragOver($event)\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave($event)\"\n (drop)=\"onDrop($event)\"\n >\n <span class=\"mapa-file-drop__zone-icon\">\n <mapa-guide-icon name=\"upload\" [size]=\"22\" />\n </span>\n <strong class=\"mapa-file-drop__title\">{{ dropTitle() || texts().dropTitle }}</strong>\n <span class=\"mapa-file-drop__separator\">{{ texts().separator }}</span>\n <button\n type=\"button\"\n class=\"mapa-file-drop__select\"\n [id]=\"idPrefix + '-select'\"\n [disabled]=\"disabled()\"\n [attr.aria-describedby]=\"idPrefix + '-types' + (errorMessage() ? ' ' + idPrefix + '-error' : '')\"\n (click)=\"openPicker()\"\n >\n {{ texts().selectLabel }}\n </button>\n <span class=\"mapa-file-drop__types\" [id]=\"idPrefix + '-types'\">\n {{ acceptedTypes() }}@if (hint()) { \u00B7 {{ hint() }}}\n </span>\n </div>\n }\n\n @if (errorMessage(); as message) {\n <div class=\"mapa-file-drop__error\" role=\"alert\" [id]=\"idPrefix + '-error'\">\n <mapa-guide-icon name=\"alert\" />\n <span>{{ message }}</span>\n </div>\n }\n</div>\n", styles: [":host{display:block;min-width:0;color:var(--mapa-guide-text, #162f42);font-family:var(--mapa-guide-font-body, var(--mapa-font-body, \"Asap\", sans-serif));font-size:14px;line-height:22px}.mapa-file-drop{display:flex;flex-direction:column;gap:8px}.mapa-file-drop__input{display:none}.mapa-file-drop__zone{display:flex;flex-direction:column;align-items:center;gap:10px;padding:32px 24px;border:1px dashed var(--mapa-guide-border-strong, #7f949e);border-radius:10px;background:var(--mapa-guide-surface-2, #eef4f5);text-align:center;transition:border-color .12s ease,background-color .12s ease}.mapa-file-drop__zone--dragging{border-style:solid;border-color:var(--mapa-guide-primary, #d33e1f);background:var(--mapa-guide-primary-soft, #ffede6)}.mapa-file-drop__zone--invalid{border-color:var(--mapa-guide-danger-fg, #b3341b)}.mapa-file-drop__zone--disabled{color:var(--mapa-guide-text-3, #56697a)}@media(prefers-reduced-motion:reduce){.mapa-file-drop__zone{transition:none}}.mapa-file-drop__zone-icon{display:inline-flex;align-items:center;justify-content:center;width:48px;height:48px;border:1px solid var(--mapa-guide-border, #dce5e8);border-radius:12px;background:var(--mapa-guide-surface, #ffffff);color:var(--mapa-guide-text-2, #41566a)}.mapa-file-drop__title{font-weight:600}.mapa-file-drop__separator{color:var(--mapa-guide-text-2, #41566a);font-size:13px}.mapa-file-drop__select{border:1px solid var(--mapa-guide-border-strong, #7f949e);background:var(--mapa-guide-surface, #ffffff);color:var(--mapa-guide-text, #162f42);display:inline-flex;align-items:center;justify-content:center;gap:6px;box-sizing:border-box;min-height:44px;padding:0 16px;border-radius:8px;font:inherit;font-size:14px;font-weight:600;line-height:1.2;text-decoration:none;cursor:pointer}.mapa-file-drop__select:focus-visible{outline:2px solid var(--mapa-guide-focus, #d33e1f);outline-offset:2px}.mapa-file-drop__select:disabled,.mapa-file-drop__select[aria-disabled=true]{cursor:not-allowed}.mapa-file-drop__select:hover:not(:disabled):not([aria-disabled=true]){background:var(--mapa-guide-surface-2, #eef4f5)}.mapa-file-drop__select:disabled,.mapa-file-drop__select[aria-disabled=true]{border-color:var(--mapa-guide-border, #dce5e8);background:var(--mapa-guide-surface-2, #eef4f5);color:var(--mapa-guide-text-3, #56697a)}.mapa-file-drop__types{color:var(--mapa-guide-text-3, #56697a);font-size:12px;line-height:16px}.mapa-file-drop__loaded{display:flex;align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--mapa-guide-border, #dce5e8);border-radius:10px;background:var(--mapa-guide-surface, #ffffff)}.mapa-file-drop__file-icon{display:inline-flex;flex:none;align-items:center;justify-content:center;width:40px;height:40px;border-radius:10px;background:var(--mapa-guide-ok-bg, #ddf1f2);color:var(--mapa-guide-ok-fg, #065156)}.mapa-file-drop__file{display:flex;flex:1;flex-direction:column;min-width:0;line-height:20px}.mapa-file-drop__file-name{font-weight:600;overflow-wrap:anywhere}.mapa-file-drop__file-detail{color:var(--mapa-guide-text-2, #41566a);font-size:13px}.mapa-file-drop__replace{border:1px solid var(--mapa-guide-border-strong, #7f949e);background:var(--mapa-guide-surface, #ffffff);color:var(--mapa-guide-text, #162f42);display:inline-flex;align-items:center;justify-content:center;gap:6px;box-sizing:border-box;min-height:36px;padding:0 16px;border-radius:8px;font:inherit;font-size:14px;font-weight:600;line-height:1.2;text-decoration:none;cursor:pointer}.mapa-file-drop__replace:focus-visible{outline:2px solid var(--mapa-guide-focus, #d33e1f);outline-offset:2px}.mapa-file-drop__replace:disabled,.mapa-file-drop__replace[aria-disabled=true]{cursor:not-allowed}.mapa-file-drop__replace:hover:not(:disabled):not([aria-disabled=true]){background:var(--mapa-guide-surface-2, #eef4f5)}.mapa-file-drop__replace:disabled,.mapa-file-drop__replace[aria-disabled=true]{border-color:var(--mapa-guide-border, #dce5e8);background:var(--mapa-guide-surface-2, #eef4f5);color:var(--mapa-guide-text-3, #56697a)}.mapa-file-drop__replace{flex:none;padding:0 12px;font-size:13px}.mapa-file-drop__error{display:flex;align-items:flex-start;gap:10px;padding:12px 14px;border-radius:10px;background:var(--mapa-guide-danger-bg, #fde9e4);color:var(--mapa-guide-danger-fg, #b3341b);font-size:13px;line-height:20px}.mapa-file-drop__error mapa-guide-icon{margin-top:1px}\n"] }]
|
|
7855
|
+
}], propDecorators: { fileInput: [{ type: i0.ViewChild, args: ['fileInput', { isSignal: true }] }], accept: [{ type: i0.Input, args: [{ isSignal: true, alias: "accept", required: false }] }], maxSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxSize", required: false }] }], dropTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropTitle", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], fileDetail: [{ type: i0.Input, args: [{ isSignal: true, alias: "fileDetail", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], file: [{ type: i0.Input, args: [{ isSignal: true, alias: "file", required: false }] }, { type: i0.Output, args: ["fileChange"] }], rejected: [{ type: i0.Output, args: ["rejected"] }] } });
|
|
7856
|
+
|
|
7245
7857
|
class MapaInputComponent {
|
|
7246
7858
|
constructor() {
|
|
7247
7859
|
this.suffix = new EventEmitter();
|
|
@@ -8385,6 +8997,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
8385
8997
|
* Public API Surface of mapa-library-ui icon
|
|
8386
8998
|
*/
|
|
8387
8999
|
|
|
9000
|
+
/**
|
|
9001
|
+
* Guia V5 · 21.11 Avaliação criada: cards to start using what was just created
|
|
9002
|
+
* (invite by e-mail, shared link, apply later). Actions are emitted so the
|
|
9003
|
+
* consumer decides how to navigate.
|
|
9004
|
+
*/
|
|
9005
|
+
class MapaLaunchOptionsComponent {
|
|
9006
|
+
constructor() {
|
|
9007
|
+
this.i18n = inject(MapaI18nService);
|
|
9008
|
+
this.options = input.required(...(ngDevMode ? [{ debugName: "options" }] : []));
|
|
9009
|
+
/** Accessible name of the list of options. */
|
|
9010
|
+
this.label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
|
|
9011
|
+
/** Overrides the badge text, e.g. "Indicado para esta forma". */
|
|
9012
|
+
this.recommendedLabel = input(...(ngDevMode ? [undefined, { debugName: "recommendedLabel" }] : []));
|
|
9013
|
+
this.actionSelect = output();
|
|
9014
|
+
this.badge = computed(() => this.recommendedLabel() || this.i18n.textsSignal().launchOptions.recommendedBadge, ...(ngDevMode ? [{ debugName: "badge" }] : []));
|
|
9015
|
+
}
|
|
9016
|
+
select(option, action) {
|
|
9017
|
+
if (option.disabled) {
|
|
9018
|
+
return;
|
|
9019
|
+
}
|
|
9020
|
+
this.actionSelect.emit({ optionId: option.id, action });
|
|
9021
|
+
}
|
|
9022
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaLaunchOptionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9023
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.21", type: MapaLaunchOptionsComponent, isStandalone: true, selector: "mapa-launch-options", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, recommendedLabel: { classPropertyName: "recommendedLabel", publicName: "recommendedLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { actionSelect: "actionSelect" }, ngImport: i0, template: "<ul class=\"mapa-launch-options\" [attr.aria-label]=\"label() || null\">\n @for (option of options(); track option.id) {\n <li\n class=\"mapa-launch-options__card\"\n [class.mapa-launch-options__card--recommended]=\"option.recommended && !option.disabled\"\n [class.mapa-launch-options__card--disabled]=\"option.disabled\"\n >\n <div class=\"mapa-launch-options__header\">\n @if (option.icon) {\n <span class=\"mapa-launch-options__icon\">\n <mapa-guide-icon [name]=\"option.icon\" />\n </span>\n }\n <span class=\"mapa-launch-options__title\">{{ option.title }}</span>\n @if (option.recommended && !option.disabled) {\n <span class=\"mapa-launch-options__badge\">{{ badge() }}</span>\n }\n </div>\n <p class=\"mapa-launch-options__description\">\n {{ option.disabled && option.disabledReason ? option.disabledReason : option.description }}\n </p>\n <div class=\"mapa-launch-options__actions\">\n <button\n type=\"button\"\n class=\"mapa-launch-options__action\"\n [class.mapa-launch-options__action--primary]=\"option.recommended && !option.disabled\"\n [disabled]=\"option.disabled\"\n (click)=\"select(option, 'primary')\"\n >\n {{ option.primaryAction }}\n </button>\n @if (option.secondaryAction) {\n <button\n type=\"button\"\n class=\"mapa-launch-options__action\"\n [disabled]=\"option.disabled\"\n (click)=\"select(option, 'secondary')\"\n >\n {{ option.secondaryAction }}\n </button>\n }\n </div>\n </li>\n }\n</ul>\n", styles: [":host{display:block;min-width:0;color:var(--mapa-guide-text, #162f42);font-family:var(--mapa-guide-font-body, var(--mapa-font-body, \"Asap\", sans-serif));font-size:14px;line-height:22px}.mapa-launch-options{display:flex;flex-wrap:wrap;gap:12px;margin:0;padding:0;list-style:none}.mapa-launch-options__card{display:flex;flex:1 1 220px;flex-direction:column;gap:10px;box-sizing:border-box;min-width:0;padding:18px;border:1px solid var(--mapa-guide-border, #dce5e8);border-radius:14px;background:var(--mapa-guide-surface, #ffffff)}.mapa-launch-options__card--recommended{border-color:var(--mapa-guide-primary, #d33e1f);box-shadow:inset 0 0 0 1px var(--mapa-guide-primary, #d33e1f)}.mapa-launch-options__card--disabled{background:var(--mapa-guide-surface-2, #eef4f5)}.mapa-launch-options__header{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px}.mapa-launch-options__icon{display:inline-flex;flex:none;align-items:center;justify-content:center;width:36px;height:36px;border-radius:10px;background:var(--mapa-guide-surface-2, #eef4f5);color:var(--mapa-guide-text, #162f42)}.mapa-launch-options__card--disabled .mapa-launch-options__icon{background:var(--mapa-guide-surface-3, #e4eef0);color:var(--mapa-guide-text-2, #41566a)}.mapa-launch-options__title{color:var(--mapa-guide-text, #162f42);font-size:14px;font-weight:600}.mapa-launch-options__badge{display:inline-flex;align-items:center;padding:2px 8px;border-radius:6px;font-size:12px;font-weight:600;line-height:16px;white-space:nowrap;background:var(--mapa-guide-ok-bg, #ddf1f2);color:var(--mapa-guide-ok-fg, #065156)}.mapa-launch-options__description{margin:0;color:var(--mapa-guide-text-2, #41566a);font-size:14px;line-height:1.5}.mapa-launch-options__actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:auto}.mapa-launch-options__action{border:1px solid var(--mapa-guide-border-strong, #7f949e);background:var(--mapa-guide-surface, #ffffff);color:var(--mapa-guide-text, #162f42);display:inline-flex;align-items:center;justify-content:center;gap:6px;box-sizing:border-box;min-height:44px;padding:0 16px;border-radius:8px;font:inherit;font-size:14px;font-weight:600;line-height:1.2;text-decoration:none;cursor:pointer}.mapa-launch-options__action:focus-visible{outline:2px solid var(--mapa-guide-focus, #d33e1f);outline-offset:2px}.mapa-launch-options__action:disabled,.mapa-launch-options__action[aria-disabled=true]{cursor:not-allowed}.mapa-launch-options__action:hover:not(:disabled):not([aria-disabled=true]){background:var(--mapa-guide-surface-2, #eef4f5)}.mapa-launch-options__action:disabled,.mapa-launch-options__action[aria-disabled=true]{border-color:var(--mapa-guide-border, #dce5e8);background:var(--mapa-guide-surface-2, #eef4f5);color:var(--mapa-guide-text-3, #56697a)}.mapa-launch-options__action--primary{border:1px solid var(--mapa-guide-primary, #d33e1f);background:var(--mapa-guide-primary, #d33e1f);color:var(--mapa-guide-on-primary, #ffffff);display:inline-flex;align-items:center;justify-content:center;gap:6px;box-sizing:border-box;min-height:44px;padding:0 16px;border-radius:8px;font:inherit;font-size:14px;font-weight:600;line-height:1.2;text-decoration:none;cursor:pointer}.mapa-launch-options__action--primary:focus-visible{outline:2px solid var(--mapa-guide-focus, #d33e1f);outline-offset:2px}.mapa-launch-options__action--primary:disabled,.mapa-launch-options__action--primary[aria-disabled=true]{cursor:not-allowed}.mapa-launch-options__action--primary:hover:not(:disabled):not([aria-disabled=true]){border-color:var(--mapa-guide-primary-hover, #b8341a);background:var(--mapa-guide-primary-hover, #b8341a)}.mapa-launch-options__action--primary:disabled,.mapa-launch-options__action--primary[aria-disabled=true]{border-color:var(--mapa-guide-border, #dce5e8);background:var(--mapa-guide-surface-3, #e4eef0);color:var(--mapa-guide-text-3, #56697a)}\n"], dependencies: [{ kind: "component", type: MapaGuideIconComponent, selector: "mapa-guide-icon", inputs: ["name", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
9024
|
+
}
|
|
9025
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaLaunchOptionsComponent, decorators: [{
|
|
9026
|
+
type: Component,
|
|
9027
|
+
args: [{ selector: 'mapa-launch-options', standalone: true, imports: [MapaGuideIconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ul class=\"mapa-launch-options\" [attr.aria-label]=\"label() || null\">\n @for (option of options(); track option.id) {\n <li\n class=\"mapa-launch-options__card\"\n [class.mapa-launch-options__card--recommended]=\"option.recommended && !option.disabled\"\n [class.mapa-launch-options__card--disabled]=\"option.disabled\"\n >\n <div class=\"mapa-launch-options__header\">\n @if (option.icon) {\n <span class=\"mapa-launch-options__icon\">\n <mapa-guide-icon [name]=\"option.icon\" />\n </span>\n }\n <span class=\"mapa-launch-options__title\">{{ option.title }}</span>\n @if (option.recommended && !option.disabled) {\n <span class=\"mapa-launch-options__badge\">{{ badge() }}</span>\n }\n </div>\n <p class=\"mapa-launch-options__description\">\n {{ option.disabled && option.disabledReason ? option.disabledReason : option.description }}\n </p>\n <div class=\"mapa-launch-options__actions\">\n <button\n type=\"button\"\n class=\"mapa-launch-options__action\"\n [class.mapa-launch-options__action--primary]=\"option.recommended && !option.disabled\"\n [disabled]=\"option.disabled\"\n (click)=\"select(option, 'primary')\"\n >\n {{ option.primaryAction }}\n </button>\n @if (option.secondaryAction) {\n <button\n type=\"button\"\n class=\"mapa-launch-options__action\"\n [disabled]=\"option.disabled\"\n (click)=\"select(option, 'secondary')\"\n >\n {{ option.secondaryAction }}\n </button>\n }\n </div>\n </li>\n }\n</ul>\n", styles: [":host{display:block;min-width:0;color:var(--mapa-guide-text, #162f42);font-family:var(--mapa-guide-font-body, var(--mapa-font-body, \"Asap\", sans-serif));font-size:14px;line-height:22px}.mapa-launch-options{display:flex;flex-wrap:wrap;gap:12px;margin:0;padding:0;list-style:none}.mapa-launch-options__card{display:flex;flex:1 1 220px;flex-direction:column;gap:10px;box-sizing:border-box;min-width:0;padding:18px;border:1px solid var(--mapa-guide-border, #dce5e8);border-radius:14px;background:var(--mapa-guide-surface, #ffffff)}.mapa-launch-options__card--recommended{border-color:var(--mapa-guide-primary, #d33e1f);box-shadow:inset 0 0 0 1px var(--mapa-guide-primary, #d33e1f)}.mapa-launch-options__card--disabled{background:var(--mapa-guide-surface-2, #eef4f5)}.mapa-launch-options__header{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px}.mapa-launch-options__icon{display:inline-flex;flex:none;align-items:center;justify-content:center;width:36px;height:36px;border-radius:10px;background:var(--mapa-guide-surface-2, #eef4f5);color:var(--mapa-guide-text, #162f42)}.mapa-launch-options__card--disabled .mapa-launch-options__icon{background:var(--mapa-guide-surface-3, #e4eef0);color:var(--mapa-guide-text-2, #41566a)}.mapa-launch-options__title{color:var(--mapa-guide-text, #162f42);font-size:14px;font-weight:600}.mapa-launch-options__badge{display:inline-flex;align-items:center;padding:2px 8px;border-radius:6px;font-size:12px;font-weight:600;line-height:16px;white-space:nowrap;background:var(--mapa-guide-ok-bg, #ddf1f2);color:var(--mapa-guide-ok-fg, #065156)}.mapa-launch-options__description{margin:0;color:var(--mapa-guide-text-2, #41566a);font-size:14px;line-height:1.5}.mapa-launch-options__actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:auto}.mapa-launch-options__action{border:1px solid var(--mapa-guide-border-strong, #7f949e);background:var(--mapa-guide-surface, #ffffff);color:var(--mapa-guide-text, #162f42);display:inline-flex;align-items:center;justify-content:center;gap:6px;box-sizing:border-box;min-height:44px;padding:0 16px;border-radius:8px;font:inherit;font-size:14px;font-weight:600;line-height:1.2;text-decoration:none;cursor:pointer}.mapa-launch-options__action:focus-visible{outline:2px solid var(--mapa-guide-focus, #d33e1f);outline-offset:2px}.mapa-launch-options__action:disabled,.mapa-launch-options__action[aria-disabled=true]{cursor:not-allowed}.mapa-launch-options__action:hover:not(:disabled):not([aria-disabled=true]){background:var(--mapa-guide-surface-2, #eef4f5)}.mapa-launch-options__action:disabled,.mapa-launch-options__action[aria-disabled=true]{border-color:var(--mapa-guide-border, #dce5e8);background:var(--mapa-guide-surface-2, #eef4f5);color:var(--mapa-guide-text-3, #56697a)}.mapa-launch-options__action--primary{border:1px solid var(--mapa-guide-primary, #d33e1f);background:var(--mapa-guide-primary, #d33e1f);color:var(--mapa-guide-on-primary, #ffffff);display:inline-flex;align-items:center;justify-content:center;gap:6px;box-sizing:border-box;min-height:44px;padding:0 16px;border-radius:8px;font:inherit;font-size:14px;font-weight:600;line-height:1.2;text-decoration:none;cursor:pointer}.mapa-launch-options__action--primary:focus-visible{outline:2px solid var(--mapa-guide-focus, #d33e1f);outline-offset:2px}.mapa-launch-options__action--primary:disabled,.mapa-launch-options__action--primary[aria-disabled=true]{cursor:not-allowed}.mapa-launch-options__action--primary:hover:not(:disabled):not([aria-disabled=true]){border-color:var(--mapa-guide-primary-hover, #b8341a);background:var(--mapa-guide-primary-hover, #b8341a)}.mapa-launch-options__action--primary:disabled,.mapa-launch-options__action--primary[aria-disabled=true]{border-color:var(--mapa-guide-border, #dce5e8);background:var(--mapa-guide-surface-3, #e4eef0);color:var(--mapa-guide-text-3, #56697a)}\n"] }]
|
|
9028
|
+
}], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], recommendedLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "recommendedLabel", required: false }] }], actionSelect: [{ type: i0.Output, args: ["actionSelect"] }] } });
|
|
9029
|
+
|
|
8388
9030
|
class MapaMenuComponent {
|
|
8389
9031
|
constructor() {
|
|
8390
9032
|
this.items = [];
|
|
@@ -8443,6 +9085,147 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
8443
9085
|
* Public API Surface of mapa-library-ui nav-list
|
|
8444
9086
|
*/
|
|
8445
9087
|
|
|
9088
|
+
let nextId$1 = 0;
|
|
9089
|
+
/**
|
|
9090
|
+
* Guia V5 · 21.2 Cards de opção: a single-choice group built on native radios,
|
|
9091
|
+
* so arrow keys, Space and screen readers work as in any radio group.
|
|
9092
|
+
*/
|
|
9093
|
+
class MapaOptionCardsComponent {
|
|
9094
|
+
constructor() {
|
|
9095
|
+
this.options = input.required(...(ngDevMode ? [{ debugName: "options" }] : []));
|
|
9096
|
+
/** Accessible name of the group; use `labelledBy` when a visible heading names it. */
|
|
9097
|
+
this.label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
|
|
9098
|
+
this.labelledBy = input(...(ngDevMode ? [undefined, { debugName: "labelledBy" }] : []));
|
|
9099
|
+
this.name = input(`mapa-option-cards-${nextId$1++}`, ...(ngDevMode ? [{ debugName: "name" }] : []));
|
|
9100
|
+
this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
9101
|
+
this.value = model(null, ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
9102
|
+
this.formDisabled = signal(false, ...(ngDevMode ? [{ debugName: "formDisabled" }] : []));
|
|
9103
|
+
this.groupDisabled = computed(() => this.disabled() || this.formDisabled(), ...(ngDevMode ? [{ debugName: "groupDisabled" }] : []));
|
|
9104
|
+
this.idPrefix = computed(() => this.name(), ...(ngDevMode ? [{ debugName: "idPrefix" }] : []));
|
|
9105
|
+
this.onChange = () => { };
|
|
9106
|
+
this.onTouched = () => { };
|
|
9107
|
+
}
|
|
9108
|
+
writeValue(value) {
|
|
9109
|
+
this.value.set(value ?? null);
|
|
9110
|
+
}
|
|
9111
|
+
registerOnChange(fn) {
|
|
9112
|
+
this.onChange = fn;
|
|
9113
|
+
}
|
|
9114
|
+
registerOnTouched(fn) {
|
|
9115
|
+
this.onTouched = fn;
|
|
9116
|
+
}
|
|
9117
|
+
setDisabledState(isDisabled) {
|
|
9118
|
+
this.formDisabled.set(isDisabled);
|
|
9119
|
+
}
|
|
9120
|
+
isSelected(option) {
|
|
9121
|
+
return Object.is(this.value(), option.value);
|
|
9122
|
+
}
|
|
9123
|
+
isDisabled(option) {
|
|
9124
|
+
return this.groupDisabled() || option.disabled === true;
|
|
9125
|
+
}
|
|
9126
|
+
select(option) {
|
|
9127
|
+
if (this.isDisabled(option) || this.isSelected(option)) {
|
|
9128
|
+
return;
|
|
9129
|
+
}
|
|
9130
|
+
this.value.set(option.value);
|
|
9131
|
+
this.onChange(option.value);
|
|
9132
|
+
}
|
|
9133
|
+
touch() {
|
|
9134
|
+
this.onTouched();
|
|
9135
|
+
}
|
|
9136
|
+
optionLabelledBy(index, option) {
|
|
9137
|
+
const title = `${this.idPrefix()}-title-${index}`;
|
|
9138
|
+
return option.badge ? `${title} ${this.idPrefix()}-badge-${index}` : title;
|
|
9139
|
+
}
|
|
9140
|
+
optionDescribedBy(index, option) {
|
|
9141
|
+
const ids = [
|
|
9142
|
+
option.meta ? `${this.idPrefix()}-meta-${index}` : null,
|
|
9143
|
+
option.description ? `${this.idPrefix()}-description-${index}` : null,
|
|
9144
|
+
].filter((id) => id !== null);
|
|
9145
|
+
return ids.length ? ids.join(' ') : null;
|
|
9146
|
+
}
|
|
9147
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaOptionCardsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9148
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.21", type: MapaOptionCardsComponent, isStandalone: true, selector: "mapa-option-cards", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, labelledBy: { classPropertyName: "labelledBy", publicName: "labelledBy", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, providers: [
|
|
9149
|
+
{
|
|
9150
|
+
provide: NG_VALUE_ACCESSOR,
|
|
9151
|
+
useExisting: forwardRef(() => MapaOptionCardsComponent),
|
|
9152
|
+
multi: true,
|
|
9153
|
+
},
|
|
9154
|
+
], ngImport: i0, template: "<div\n class=\"mapa-option-cards\"\n role=\"radiogroup\"\n [attr.aria-label]=\"labelledBy() ? null : label() || null\"\n [attr.aria-labelledby]=\"labelledBy() || null\"\n [attr.aria-disabled]=\"groupDisabled() || null\"\n>\n @for (option of options(); track $index; let index = $index) {\n <label\n class=\"mapa-option-cards__card\"\n [class.mapa-option-cards__card--selected]=\"isSelected(option)\"\n [class.mapa-option-cards__card--disabled]=\"isDisabled(option)\"\n >\n <input\n type=\"radio\"\n class=\"mapa-option-cards__radio\"\n [name]=\"name()\"\n [checked]=\"isSelected(option)\"\n [disabled]=\"isDisabled(option)\"\n [attr.aria-labelledby]=\"optionLabelledBy(index, option)\"\n [attr.aria-describedby]=\"optionDescribedBy(index, option)\"\n (change)=\"select(option)\"\n (blur)=\"touch()\"\n />\n <span class=\"mapa-option-cards__body\">\n <span class=\"mapa-option-cards__header\">\n @if (option.icon) {\n <span class=\"mapa-option-cards__icon\">\n <mapa-guide-icon [name]=\"option.icon\" [size]=\"22\" />\n </span>\n }\n <span class=\"mapa-option-cards__heading\">\n <span class=\"mapa-option-cards__title-row\">\n <span class=\"mapa-option-cards__title\" [id]=\"idPrefix() + '-title-' + index\">{{\n option.title\n }}</span>\n @if (option.badge) {\n <span class=\"mapa-option-cards__badge\" [id]=\"idPrefix() + '-badge-' + index\">{{\n option.badge\n }}</span>\n }\n </span>\n @if (option.meta) {\n <span class=\"mapa-option-cards__meta\" [id]=\"idPrefix() + '-meta-' + index\">{{\n option.meta\n }}</span>\n }\n </span>\n </span>\n @if (option.description) {\n <span class=\"mapa-option-cards__description\" [id]=\"idPrefix() + '-description-' + index\">{{\n option.description\n }}</span>\n }\n @if (option.points?.length) {\n <!-- Spans keep the label content valid; the roles keep the list semantics. -->\n <span class=\"mapa-option-cards__points\" role=\"list\">\n @for (point of option.points; track $index) {\n <span class=\"mapa-option-cards__point\" role=\"listitem\">\n <mapa-guide-icon class=\"mapa-option-cards__point-icon\" name=\"check\" [size]=\"14\" [strokeWidth]=\"3\" />\n <span>{{ point }}</span>\n </span>\n }\n </span>\n }\n </span>\n </label>\n }\n</div>\n", styles: [":host{display:block;min-width:0;color:var(--mapa-guide-text, #162f42);font-family:var(--mapa-guide-font-body, var(--mapa-font-body, \"Asap\", sans-serif));font-size:14px;line-height:22px}.mapa-option-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr));gap:16px}.mapa-option-cards__card{display:flex;align-items:flex-start;gap:16px;min-width:0;padding:20px;box-sizing:border-box;border:1px solid var(--mapa-guide-border, #dce5e8);border-radius:14px;background:var(--mapa-guide-surface, #ffffff);cursor:pointer;transition:border-color .12s ease,box-shadow .12s ease}.mapa-option-cards__card:hover{border-color:var(--mapa-guide-border-strong, #7f949e)}@media(prefers-reduced-motion:reduce){.mapa-option-cards__card{transition:none}}.mapa-option-cards__card:has(.mapa-option-cards__radio:focus-visible){outline:2px solid var(--mapa-guide-focus, #d33e1f);outline-offset:2px}.mapa-option-cards__card--selected{border-color:var(--mapa-guide-primary, #d33e1f);box-shadow:inset 0 0 0 1px var(--mapa-guide-primary, #d33e1f);background:var(--mapa-guide-primary-soft, #ffede6)}.mapa-option-cards__card--disabled{background:var(--mapa-guide-surface-2, #eef4f5);cursor:not-allowed}.mapa-option-cards__card--disabled:hover{border-color:var(--mapa-guide-border, #dce5e8)}.mapa-option-cards__radio{flex:none;width:20px;height:20px;margin:2px 0 0;accent-color:var(--mapa-guide-primary, #d33e1f);cursor:inherit}.mapa-option-cards__radio:focus-visible{outline:none}.mapa-option-cards__body{display:flex;flex-direction:column;gap:10px;min-width:0}.mapa-option-cards__header{display:flex;align-items:center;gap:12px}.mapa-option-cards__icon{display:inline-flex;flex:none;align-items:center;justify-content:center;width:44px;height:44px;border-radius:10px;background:var(--mapa-guide-surface-3, #e4eef0);color:var(--mapa-guide-text, #162f42)}.mapa-option-cards__card--selected .mapa-option-cards__icon{background:var(--mapa-guide-primary, #d33e1f);color:var(--mapa-guide-on-primary, #ffffff)}.mapa-option-cards__heading{display:flex;flex-direction:column;gap:2px;min-width:0}.mapa-option-cards__title-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.mapa-option-cards__title{margin:0;color:var(--mapa-guide-text, #162f42);font-family:var(--mapa-guide-font-heading, var(--mapa-font-heading, \"Asap\", sans-serif));font-size:16px;font-weight:600;line-height:24px;overflow-wrap:break-word}.mapa-option-cards__badge{display:inline-flex;align-items:center;padding:2px 8px;border-radius:6px;font-size:12px;font-weight:600;line-height:16px;white-space:nowrap;background:var(--mapa-guide-primary-soft, #ffede6);color:var(--mapa-guide-on-primary-soft, #a8321a)}.mapa-option-cards__meta{margin:0;color:var(--mapa-guide-text-2, #41566a);font-size:13px;line-height:20px}.mapa-option-cards__description{color:var(--mapa-guide-text-2, #41566a);font-size:14px;line-height:1.5}.mapa-option-cards__points{display:flex;flex-direction:column;gap:6px;font-size:13px;line-height:20px}.mapa-option-cards__point{display:flex;align-items:flex-start;gap:8px}.mapa-option-cards__point-icon{margin-top:3px;color:var(--mapa-guide-ok-fg, #065156)}\n"], dependencies: [{ kind: "component", type: MapaGuideIconComponent, selector: "mapa-guide-icon", inputs: ["name", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
9155
|
+
}
|
|
9156
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaOptionCardsComponent, decorators: [{
|
|
9157
|
+
type: Component,
|
|
9158
|
+
args: [{ selector: 'mapa-option-cards', standalone: true, imports: [MapaGuideIconComponent], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
9159
|
+
{
|
|
9160
|
+
provide: NG_VALUE_ACCESSOR,
|
|
9161
|
+
useExisting: forwardRef(() => MapaOptionCardsComponent),
|
|
9162
|
+
multi: true,
|
|
9163
|
+
},
|
|
9164
|
+
], template: "<div\n class=\"mapa-option-cards\"\n role=\"radiogroup\"\n [attr.aria-label]=\"labelledBy() ? null : label() || null\"\n [attr.aria-labelledby]=\"labelledBy() || null\"\n [attr.aria-disabled]=\"groupDisabled() || null\"\n>\n @for (option of options(); track $index; let index = $index) {\n <label\n class=\"mapa-option-cards__card\"\n [class.mapa-option-cards__card--selected]=\"isSelected(option)\"\n [class.mapa-option-cards__card--disabled]=\"isDisabled(option)\"\n >\n <input\n type=\"radio\"\n class=\"mapa-option-cards__radio\"\n [name]=\"name()\"\n [checked]=\"isSelected(option)\"\n [disabled]=\"isDisabled(option)\"\n [attr.aria-labelledby]=\"optionLabelledBy(index, option)\"\n [attr.aria-describedby]=\"optionDescribedBy(index, option)\"\n (change)=\"select(option)\"\n (blur)=\"touch()\"\n />\n <span class=\"mapa-option-cards__body\">\n <span class=\"mapa-option-cards__header\">\n @if (option.icon) {\n <span class=\"mapa-option-cards__icon\">\n <mapa-guide-icon [name]=\"option.icon\" [size]=\"22\" />\n </span>\n }\n <span class=\"mapa-option-cards__heading\">\n <span class=\"mapa-option-cards__title-row\">\n <span class=\"mapa-option-cards__title\" [id]=\"idPrefix() + '-title-' + index\">{{\n option.title\n }}</span>\n @if (option.badge) {\n <span class=\"mapa-option-cards__badge\" [id]=\"idPrefix() + '-badge-' + index\">{{\n option.badge\n }}</span>\n }\n </span>\n @if (option.meta) {\n <span class=\"mapa-option-cards__meta\" [id]=\"idPrefix() + '-meta-' + index\">{{\n option.meta\n }}</span>\n }\n </span>\n </span>\n @if (option.description) {\n <span class=\"mapa-option-cards__description\" [id]=\"idPrefix() + '-description-' + index\">{{\n option.description\n }}</span>\n }\n @if (option.points?.length) {\n <!-- Spans keep the label content valid; the roles keep the list semantics. -->\n <span class=\"mapa-option-cards__points\" role=\"list\">\n @for (point of option.points; track $index) {\n <span class=\"mapa-option-cards__point\" role=\"listitem\">\n <mapa-guide-icon class=\"mapa-option-cards__point-icon\" name=\"check\" [size]=\"14\" [strokeWidth]=\"3\" />\n <span>{{ point }}</span>\n </span>\n }\n </span>\n }\n </span>\n </label>\n }\n</div>\n", styles: [":host{display:block;min-width:0;color:var(--mapa-guide-text, #162f42);font-family:var(--mapa-guide-font-body, var(--mapa-font-body, \"Asap\", sans-serif));font-size:14px;line-height:22px}.mapa-option-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr));gap:16px}.mapa-option-cards__card{display:flex;align-items:flex-start;gap:16px;min-width:0;padding:20px;box-sizing:border-box;border:1px solid var(--mapa-guide-border, #dce5e8);border-radius:14px;background:var(--mapa-guide-surface, #ffffff);cursor:pointer;transition:border-color .12s ease,box-shadow .12s ease}.mapa-option-cards__card:hover{border-color:var(--mapa-guide-border-strong, #7f949e)}@media(prefers-reduced-motion:reduce){.mapa-option-cards__card{transition:none}}.mapa-option-cards__card:has(.mapa-option-cards__radio:focus-visible){outline:2px solid var(--mapa-guide-focus, #d33e1f);outline-offset:2px}.mapa-option-cards__card--selected{border-color:var(--mapa-guide-primary, #d33e1f);box-shadow:inset 0 0 0 1px var(--mapa-guide-primary, #d33e1f);background:var(--mapa-guide-primary-soft, #ffede6)}.mapa-option-cards__card--disabled{background:var(--mapa-guide-surface-2, #eef4f5);cursor:not-allowed}.mapa-option-cards__card--disabled:hover{border-color:var(--mapa-guide-border, #dce5e8)}.mapa-option-cards__radio{flex:none;width:20px;height:20px;margin:2px 0 0;accent-color:var(--mapa-guide-primary, #d33e1f);cursor:inherit}.mapa-option-cards__radio:focus-visible{outline:none}.mapa-option-cards__body{display:flex;flex-direction:column;gap:10px;min-width:0}.mapa-option-cards__header{display:flex;align-items:center;gap:12px}.mapa-option-cards__icon{display:inline-flex;flex:none;align-items:center;justify-content:center;width:44px;height:44px;border-radius:10px;background:var(--mapa-guide-surface-3, #e4eef0);color:var(--mapa-guide-text, #162f42)}.mapa-option-cards__card--selected .mapa-option-cards__icon{background:var(--mapa-guide-primary, #d33e1f);color:var(--mapa-guide-on-primary, #ffffff)}.mapa-option-cards__heading{display:flex;flex-direction:column;gap:2px;min-width:0}.mapa-option-cards__title-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.mapa-option-cards__title{margin:0;color:var(--mapa-guide-text, #162f42);font-family:var(--mapa-guide-font-heading, var(--mapa-font-heading, \"Asap\", sans-serif));font-size:16px;font-weight:600;line-height:24px;overflow-wrap:break-word}.mapa-option-cards__badge{display:inline-flex;align-items:center;padding:2px 8px;border-radius:6px;font-size:12px;font-weight:600;line-height:16px;white-space:nowrap;background:var(--mapa-guide-primary-soft, #ffede6);color:var(--mapa-guide-on-primary-soft, #a8321a)}.mapa-option-cards__meta{margin:0;color:var(--mapa-guide-text-2, #41566a);font-size:13px;line-height:20px}.mapa-option-cards__description{color:var(--mapa-guide-text-2, #41566a);font-size:14px;line-height:1.5}.mapa-option-cards__points{display:flex;flex-direction:column;gap:6px;font-size:13px;line-height:20px}.mapa-option-cards__point{display:flex;align-items:flex-start;gap:8px}.mapa-option-cards__point-icon{margin-top:3px;color:var(--mapa-guide-ok-fg, #065156)}\n"] }]
|
|
9165
|
+
}], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], labelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelledBy", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }] } });
|
|
9166
|
+
|
|
9167
|
+
let nextId = 0;
|
|
9168
|
+
/**
|
|
9169
|
+
* Guia V5 · 21.13 Paleta: choice of a report palette, each one shown with its
|
|
9170
|
+
* labelled bands, so the colors are never the only information.
|
|
9171
|
+
*/
|
|
9172
|
+
class MapaPalettePickerComponent {
|
|
9173
|
+
constructor() {
|
|
9174
|
+
this.i18n = inject(MapaI18nService);
|
|
9175
|
+
this.palettes = input.required(...(ngDevMode ? [{ debugName: "palettes" }] : []));
|
|
9176
|
+
this.legend = input.required(...(ngDevMode ? [{ debugName: "legend" }] : []));
|
|
9177
|
+
this.name = input(`mapa-palette-picker-${nextId++}`, ...(ngDevMode ? [{ debugName: "name" }] : []));
|
|
9178
|
+
this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
9179
|
+
/** Id of the chosen palette. */
|
|
9180
|
+
this.value = model(null, ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
9181
|
+
this.texts = computed(() => this.i18n.textsSignal().palettePicker, ...(ngDevMode ? [{ debugName: "texts" }] : []));
|
|
9182
|
+
this.formDisabled = signal(false, ...(ngDevMode ? [{ debugName: "formDisabled" }] : []));
|
|
9183
|
+
this.isDisabled = computed(() => this.disabled() || this.formDisabled(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : []));
|
|
9184
|
+
this.onChange = () => { };
|
|
9185
|
+
this.onTouched = () => { };
|
|
9186
|
+
}
|
|
9187
|
+
writeValue(value) {
|
|
9188
|
+
this.value.set(value ?? null);
|
|
9189
|
+
}
|
|
9190
|
+
registerOnChange(fn) {
|
|
9191
|
+
this.onChange = fn;
|
|
9192
|
+
}
|
|
9193
|
+
registerOnTouched(fn) {
|
|
9194
|
+
this.onTouched = fn;
|
|
9195
|
+
}
|
|
9196
|
+
setDisabledState(isDisabled) {
|
|
9197
|
+
this.formDisabled.set(isDisabled);
|
|
9198
|
+
}
|
|
9199
|
+
select(palette) {
|
|
9200
|
+
if (this.isDisabled() || this.value() === palette.id) {
|
|
9201
|
+
return;
|
|
9202
|
+
}
|
|
9203
|
+
this.value.set(palette.id);
|
|
9204
|
+
this.onChange(palette.id);
|
|
9205
|
+
}
|
|
9206
|
+
touch() {
|
|
9207
|
+
this.onTouched();
|
|
9208
|
+
}
|
|
9209
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaPalettePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9210
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.21", type: MapaPalettePickerComponent, isStandalone: true, selector: "mapa-palette-picker", inputs: { palettes: { classPropertyName: "palettes", publicName: "palettes", isSignal: true, isRequired: true, transformFunction: null }, legend: { classPropertyName: "legend", publicName: "legend", isSignal: true, isRequired: true, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, providers: [
|
|
9211
|
+
{
|
|
9212
|
+
provide: NG_VALUE_ACCESSOR,
|
|
9213
|
+
useExisting: forwardRef(() => MapaPalettePickerComponent),
|
|
9214
|
+
multi: true,
|
|
9215
|
+
},
|
|
9216
|
+
], ngImport: i0, template: "<fieldset class=\"mapa-palette-picker\" [disabled]=\"isDisabled()\">\n <legend class=\"mapa-palette-picker__legend\">{{ legend() }}</legend>\n <div class=\"mapa-palette-picker__options\">\n @for (palette of palettes(); track palette.id; let index = $index) {\n <label\n class=\"mapa-palette-picker__card\"\n [class.mapa-palette-picker__card--selected]=\"value() === palette.id\"\n [class.mapa-palette-picker__card--disabled]=\"isDisabled()\"\n >\n <input\n type=\"radio\"\n class=\"mapa-palette-picker__radio\"\n [name]=\"name()\"\n [checked]=\"value() === palette.id\"\n [attr.aria-labelledby]=\"name() + '-name-' + index + (palette.isDefault ? ' ' + name() + '-default-' + index : '')\"\n [attr.aria-describedby]=\"palette.description ? name() + '-description-' + index : null\"\n (change)=\"select(palette)\"\n (blur)=\"touch()\"\n />\n <span class=\"mapa-palette-picker__body\">\n <span class=\"mapa-palette-picker__heading\">\n <span class=\"mapa-palette-picker__title-row\">\n <span class=\"mapa-palette-picker__name\" [id]=\"name() + '-name-' + index\">{{ palette.name }}</span>\n @if (palette.isDefault) {\n <span class=\"mapa-palette-picker__badge\" [id]=\"name() + '-default-' + index\">{{\n texts().defaultBadge\n }}</span>\n }\n </span>\n @if (palette.description) {\n <span class=\"mapa-palette-picker__description\" [id]=\"name() + '-description-' + index\">{{\n palette.description\n }}</span>\n }\n </span>\n @for (scale of palette.scales; track $index) {\n <span class=\"mapa-palette-picker__scale\">\n <span class=\"mapa-palette-picker__scale-name\">{{ scale.name }}</span>\n <span class=\"mapa-palette-picker__bands\" role=\"list\">\n @for (band of scale.bands; track $index) {\n <span class=\"mapa-palette-picker__band\" role=\"listitem\">\n <span class=\"mapa-palette-picker__swatch\" aria-hidden=\"true\" [style.background-color]=\"band.color\"></span>\n <span class=\"mapa-palette-picker__band-label\">{{ band.label }}</span>\n </span>\n }\n </span>\n </span>\n }\n </span>\n </label>\n }\n </div>\n</fieldset>\n", styles: [":host{display:block;min-width:0;color:var(--mapa-guide-text, #162f42);font-family:var(--mapa-guide-font-body, var(--mapa-font-body, \"Asap\", sans-serif));font-size:14px;line-height:22px}.mapa-palette-picker{min-width:0;margin:0;padding:0;border:0}.mapa-palette-picker__legend{margin:0 0 10px;padding:0;color:var(--mapa-guide-text, #162f42);font-size:14px;font-weight:600}.mapa-palette-picker__options{display:flex;flex-direction:column;gap:12px}.mapa-palette-picker__card{display:flex;align-items:flex-start;gap:12px;min-width:0;padding:16px;box-sizing:border-box;border:1px solid var(--mapa-guide-border, #dce5e8);border-radius:14px;background:var(--mapa-guide-surface, #ffffff);cursor:pointer;transition:border-color .12s ease,box-shadow .12s ease}.mapa-palette-picker__card:hover{border-color:var(--mapa-guide-border-strong, #7f949e)}@media(prefers-reduced-motion:reduce){.mapa-palette-picker__card{transition:none}}.mapa-palette-picker__card:has(.mapa-palette-picker__radio:focus-visible){outline:2px solid var(--mapa-guide-focus, #d33e1f);outline-offset:2px}.mapa-palette-picker__card--selected{border-color:var(--mapa-guide-primary, #d33e1f);box-shadow:inset 0 0 0 1px var(--mapa-guide-primary, #d33e1f)}.mapa-palette-picker__card--disabled{background:var(--mapa-guide-surface-2, #eef4f5);cursor:not-allowed}.mapa-palette-picker__radio{flex:none;width:20px;height:20px;margin:2px 0 0;accent-color:var(--mapa-guide-primary, #d33e1f);cursor:inherit}.mapa-palette-picker__radio:focus-visible{outline:none}.mapa-palette-picker__body{display:flex;flex:1;flex-direction:column;gap:12px;min-width:0}.mapa-palette-picker__heading{display:flex;flex-direction:column;gap:2px}.mapa-palette-picker__title-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.mapa-palette-picker__name{color:var(--mapa-guide-text, #162f42);font-size:14px;font-weight:600}.mapa-palette-picker__badge{display:inline-flex;align-items:center;padding:2px 8px;border-radius:6px;font-size:12px;font-weight:600;line-height:16px;white-space:nowrap;background:var(--mapa-guide-neutral-bg, #eef1f3);color:var(--mapa-guide-neutral-fg, #4f5f6b)}.mapa-palette-picker__description{margin:0;color:var(--mapa-guide-text-2, #41566a);font-size:13px;line-height:20px}.mapa-palette-picker__scale{display:flex;flex-direction:column;gap:6px}.mapa-palette-picker__scale-name{color:var(--mapa-guide-text-3, #56697a);font-size:11px;font-weight:600;letter-spacing:.06em;line-height:16px;text-transform:uppercase}.mapa-palette-picker__bands{display:flex;flex-wrap:wrap;gap:8px}.mapa-palette-picker__band{display:flex;flex:1 1 56px;flex-direction:column;gap:4px;min-width:0}.mapa-palette-picker__swatch{height:16px;border-radius:4px;box-shadow:inset 0 0 0 1px #162f421f;forced-color-adjust:none}.mapa-palette-picker__band-label{color:var(--mapa-guide-text-2, #41566a);font-size:12px;line-height:16px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
9217
|
+
}
|
|
9218
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaPalettePickerComponent, decorators: [{
|
|
9219
|
+
type: Component,
|
|
9220
|
+
args: [{ selector: 'mapa-palette-picker', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
9221
|
+
{
|
|
9222
|
+
provide: NG_VALUE_ACCESSOR,
|
|
9223
|
+
useExisting: forwardRef(() => MapaPalettePickerComponent),
|
|
9224
|
+
multi: true,
|
|
9225
|
+
},
|
|
9226
|
+
], template: "<fieldset class=\"mapa-palette-picker\" [disabled]=\"isDisabled()\">\n <legend class=\"mapa-palette-picker__legend\">{{ legend() }}</legend>\n <div class=\"mapa-palette-picker__options\">\n @for (palette of palettes(); track palette.id; let index = $index) {\n <label\n class=\"mapa-palette-picker__card\"\n [class.mapa-palette-picker__card--selected]=\"value() === palette.id\"\n [class.mapa-palette-picker__card--disabled]=\"isDisabled()\"\n >\n <input\n type=\"radio\"\n class=\"mapa-palette-picker__radio\"\n [name]=\"name()\"\n [checked]=\"value() === palette.id\"\n [attr.aria-labelledby]=\"name() + '-name-' + index + (palette.isDefault ? ' ' + name() + '-default-' + index : '')\"\n [attr.aria-describedby]=\"palette.description ? name() + '-description-' + index : null\"\n (change)=\"select(palette)\"\n (blur)=\"touch()\"\n />\n <span class=\"mapa-palette-picker__body\">\n <span class=\"mapa-palette-picker__heading\">\n <span class=\"mapa-palette-picker__title-row\">\n <span class=\"mapa-palette-picker__name\" [id]=\"name() + '-name-' + index\">{{ palette.name }}</span>\n @if (palette.isDefault) {\n <span class=\"mapa-palette-picker__badge\" [id]=\"name() + '-default-' + index\">{{\n texts().defaultBadge\n }}</span>\n }\n </span>\n @if (palette.description) {\n <span class=\"mapa-palette-picker__description\" [id]=\"name() + '-description-' + index\">{{\n palette.description\n }}</span>\n }\n </span>\n @for (scale of palette.scales; track $index) {\n <span class=\"mapa-palette-picker__scale\">\n <span class=\"mapa-palette-picker__scale-name\">{{ scale.name }}</span>\n <span class=\"mapa-palette-picker__bands\" role=\"list\">\n @for (band of scale.bands; track $index) {\n <span class=\"mapa-palette-picker__band\" role=\"listitem\">\n <span class=\"mapa-palette-picker__swatch\" aria-hidden=\"true\" [style.background-color]=\"band.color\"></span>\n <span class=\"mapa-palette-picker__band-label\">{{ band.label }}</span>\n </span>\n }\n </span>\n </span>\n }\n </span>\n </label>\n }\n </div>\n</fieldset>\n", styles: [":host{display:block;min-width:0;color:var(--mapa-guide-text, #162f42);font-family:var(--mapa-guide-font-body, var(--mapa-font-body, \"Asap\", sans-serif));font-size:14px;line-height:22px}.mapa-palette-picker{min-width:0;margin:0;padding:0;border:0}.mapa-palette-picker__legend{margin:0 0 10px;padding:0;color:var(--mapa-guide-text, #162f42);font-size:14px;font-weight:600}.mapa-palette-picker__options{display:flex;flex-direction:column;gap:12px}.mapa-palette-picker__card{display:flex;align-items:flex-start;gap:12px;min-width:0;padding:16px;box-sizing:border-box;border:1px solid var(--mapa-guide-border, #dce5e8);border-radius:14px;background:var(--mapa-guide-surface, #ffffff);cursor:pointer;transition:border-color .12s ease,box-shadow .12s ease}.mapa-palette-picker__card:hover{border-color:var(--mapa-guide-border-strong, #7f949e)}@media(prefers-reduced-motion:reduce){.mapa-palette-picker__card{transition:none}}.mapa-palette-picker__card:has(.mapa-palette-picker__radio:focus-visible){outline:2px solid var(--mapa-guide-focus, #d33e1f);outline-offset:2px}.mapa-palette-picker__card--selected{border-color:var(--mapa-guide-primary, #d33e1f);box-shadow:inset 0 0 0 1px var(--mapa-guide-primary, #d33e1f)}.mapa-palette-picker__card--disabled{background:var(--mapa-guide-surface-2, #eef4f5);cursor:not-allowed}.mapa-palette-picker__radio{flex:none;width:20px;height:20px;margin:2px 0 0;accent-color:var(--mapa-guide-primary, #d33e1f);cursor:inherit}.mapa-palette-picker__radio:focus-visible{outline:none}.mapa-palette-picker__body{display:flex;flex:1;flex-direction:column;gap:12px;min-width:0}.mapa-palette-picker__heading{display:flex;flex-direction:column;gap:2px}.mapa-palette-picker__title-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.mapa-palette-picker__name{color:var(--mapa-guide-text, #162f42);font-size:14px;font-weight:600}.mapa-palette-picker__badge{display:inline-flex;align-items:center;padding:2px 8px;border-radius:6px;font-size:12px;font-weight:600;line-height:16px;white-space:nowrap;background:var(--mapa-guide-neutral-bg, #eef1f3);color:var(--mapa-guide-neutral-fg, #4f5f6b)}.mapa-palette-picker__description{margin:0;color:var(--mapa-guide-text-2, #41566a);font-size:13px;line-height:20px}.mapa-palette-picker__scale{display:flex;flex-direction:column;gap:6px}.mapa-palette-picker__scale-name{color:var(--mapa-guide-text-3, #56697a);font-size:11px;font-weight:600;letter-spacing:.06em;line-height:16px;text-transform:uppercase}.mapa-palette-picker__bands{display:flex;flex-wrap:wrap;gap:8px}.mapa-palette-picker__band{display:flex;flex:1 1 56px;flex-direction:column;gap:4px;min-width:0}.mapa-palette-picker__swatch{height:16px;border-radius:4px;box-shadow:inset 0 0 0 1px #162f421f;forced-color-adjust:none}.mapa-palette-picker__band-label{color:var(--mapa-guide-text-2, #41566a);font-size:12px;line-height:16px}\n"] }]
|
|
9227
|
+
}], propDecorators: { palettes: [{ type: i0.Input, args: [{ isSignal: true, alias: "palettes", required: true }] }], legend: [{ type: i0.Input, args: [{ isSignal: true, alias: "legend", required: true }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }] } });
|
|
9228
|
+
|
|
8446
9229
|
class ReportItemComponent {
|
|
8447
9230
|
constructor() {
|
|
8448
9231
|
this.menuItems = [];
|
|
@@ -9751,6 +10534,46 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
9751
10534
|
* Public API Surface of mapa-library-ui scale
|
|
9752
10535
|
*/
|
|
9753
10536
|
|
|
10537
|
+
/**
|
|
10538
|
+
* Guia V5 · 21.4 Indicador do resumo: a highlighted figure with its unit, a
|
|
10539
|
+
* detail line and an optional meter, for side panels such as "Sua avaliação".
|
|
10540
|
+
*/
|
|
10541
|
+
class MapaSummaryMeterComponent {
|
|
10542
|
+
constructor() {
|
|
10543
|
+
/** The figure, e.g. the number of questions. */
|
|
10544
|
+
this.value = input.required(...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
10545
|
+
this.unit = input(...(ngDevMode ? [undefined, { debugName: "unit" }] : []));
|
|
10546
|
+
/** Line under the figure, e.g. "15 min para responder · Só o essencial". */
|
|
10547
|
+
this.detail = input(...(ngDevMode ? [undefined, { debugName: "detail" }] : []));
|
|
10548
|
+
this.showDetailIcon = input(true, ...(ngDevMode ? [{ debugName: "showDetailIcon" }] : []));
|
|
10549
|
+
/** Meter position; the meter is hidden while it is null. */
|
|
10550
|
+
this.meterValue = input(null, ...(ngDevMode ? [{ debugName: "meterValue" }] : []));
|
|
10551
|
+
this.meterMax = input(100, ...(ngDevMode ? [{ debugName: "meterMax" }] : []));
|
|
10552
|
+
/** Accessible name of the meter, e.g. "Tamanho em relação à versão completa". */
|
|
10553
|
+
this.meterLabel = input(...(ngDevMode ? [undefined, { debugName: "meterLabel" }] : []));
|
|
10554
|
+
/** Visible reading of the meter, also used as its `aria-valuetext`. */
|
|
10555
|
+
this.meterText = input(...(ngDevMode ? [undefined, { debugName: "meterText" }] : []));
|
|
10556
|
+
/** Announces figure changes politely; turn off when the panel is not near the edited field. */
|
|
10557
|
+
this.live = input(true, ...(ngDevMode ? [{ debugName: "live" }] : []));
|
|
10558
|
+
this.hasMeter = computed(() => this.meterValue() !== null, ...(ngDevMode ? [{ debugName: "hasMeter" }] : []));
|
|
10559
|
+
this.clampedMeterValue = computed(() => {
|
|
10560
|
+
const max = Math.max(this.meterMax(), 0);
|
|
10561
|
+
const value = this.meterValue() ?? 0;
|
|
10562
|
+
return Math.min(Math.max(value, 0), max);
|
|
10563
|
+
}, ...(ngDevMode ? [{ debugName: "clampedMeterValue" }] : []));
|
|
10564
|
+
this.meterWidth = computed(() => {
|
|
10565
|
+
const max = this.meterMax();
|
|
10566
|
+
return max > 0 ? `${(this.clampedMeterValue() / max) * 100}%` : '0%';
|
|
10567
|
+
}, ...(ngDevMode ? [{ debugName: "meterWidth" }] : []));
|
|
10568
|
+
}
|
|
10569
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaSummaryMeterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10570
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.21", type: MapaSummaryMeterComponent, isStandalone: true, selector: "mapa-summary-meter", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, unit: { classPropertyName: "unit", publicName: "unit", isSignal: true, isRequired: false, transformFunction: null }, detail: { classPropertyName: "detail", publicName: "detail", isSignal: true, isRequired: false, transformFunction: null }, showDetailIcon: { classPropertyName: "showDetailIcon", publicName: "showDetailIcon", isSignal: true, isRequired: false, transformFunction: null }, meterValue: { classPropertyName: "meterValue", publicName: "meterValue", isSignal: true, isRequired: false, transformFunction: null }, meterMax: { classPropertyName: "meterMax", publicName: "meterMax", isSignal: true, isRequired: false, transformFunction: null }, meterLabel: { classPropertyName: "meterLabel", publicName: "meterLabel", isSignal: true, isRequired: false, transformFunction: null }, meterText: { classPropertyName: "meterText", publicName: "meterText", isSignal: true, isRequired: false, transformFunction: null }, live: { classPropertyName: "live", publicName: "live", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"mapa-summary-meter\">\n <div class=\"mapa-summary-meter__reading\" [attr.role]=\"live() ? 'status' : null\">\n <p class=\"mapa-summary-meter__figure\">\n <span class=\"mapa-summary-meter__value\">{{ value() }}</span>\n @if (unit()) {\n <span class=\"mapa-summary-meter__unit\">{{ unit() }}</span>\n }\n </p>\n @if (detail()) {\n <p class=\"mapa-summary-meter__detail\">\n @if (showDetailIcon()) {\n <mapa-guide-icon name=\"clock\" [size]=\"16\" />\n }\n <span>{{ detail() }}</span>\n </p>\n }\n </div>\n @if (hasMeter()) {\n <div class=\"mapa-summary-meter__meter-group\">\n <div\n class=\"mapa-summary-meter__meter\"\n role=\"meter\"\n aria-valuemin=\"0\"\n [attr.aria-valuemax]=\"meterMax()\"\n [attr.aria-valuenow]=\"clampedMeterValue()\"\n [attr.aria-valuetext]=\"meterText() || null\"\n [attr.aria-label]=\"meterLabel() || null\"\n >\n <div class=\"mapa-summary-meter__bar\" [style.width]=\"meterWidth()\"></div>\n </div>\n @if (meterText()) {\n <p class=\"mapa-summary-meter__meter-text\" aria-hidden=\"true\">{{ meterText() }}</p>\n }\n </div>\n } @else if (meterText()) {\n <p class=\"mapa-summary-meter__meter-text\">{{ meterText() }}</p>\n }\n</div>\n", styles: [":host{display:block;min-width:0;color:var(--mapa-guide-text, #162f42);font-family:var(--mapa-guide-font-body, var(--mapa-font-body, \"Asap\", sans-serif));font-size:14px;line-height:22px}.mapa-summary-meter{display:flex;flex-direction:column;gap:12px}.mapa-summary-meter__reading{display:flex;flex-direction:column;gap:4px}.mapa-summary-meter__figure{display:flex;flex-wrap:wrap;align-items:baseline;gap:8px;margin:0}.mapa-summary-meter__value{margin:0;color:var(--mapa-guide-text, #162f42);font-family:var(--mapa-guide-font-heading, var(--mapa-font-heading, \"Asap\", sans-serif));font-size:40px;font-weight:600;line-height:44px;font-variant-numeric:tabular-nums}.mapa-summary-meter__unit,.mapa-summary-meter__detail{color:var(--mapa-guide-text-2, #41566a);font-size:14px}.mapa-summary-meter__detail{display:flex;align-items:center;gap:6px;margin:0}.mapa-summary-meter__meter-group{display:flex;flex-direction:column;gap:6px}.mapa-summary-meter__meter{height:8px;overflow:hidden;border-radius:999px;background:var(--mapa-guide-surface-3, #e4eef0)}.mapa-summary-meter__bar{height:100%;border-radius:999px;background:var(--mapa-guide-primary, #d33e1f);transition:width .2s ease}@media(prefers-reduced-motion:reduce){.mapa-summary-meter__bar{transition:none}}@media(forced-colors:active){.mapa-summary-meter__bar{background:Highlight}}.mapa-summary-meter__meter-text{margin:0;color:var(--mapa-guide-text-2, #41566a);font-size:13px;line-height:20px}\n"], dependencies: [{ kind: "component", type: MapaGuideIconComponent, selector: "mapa-guide-icon", inputs: ["name", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
10571
|
+
}
|
|
10572
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaSummaryMeterComponent, decorators: [{
|
|
10573
|
+
type: Component,
|
|
10574
|
+
args: [{ selector: 'mapa-summary-meter', standalone: true, imports: [MapaGuideIconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"mapa-summary-meter\">\n <div class=\"mapa-summary-meter__reading\" [attr.role]=\"live() ? 'status' : null\">\n <p class=\"mapa-summary-meter__figure\">\n <span class=\"mapa-summary-meter__value\">{{ value() }}</span>\n @if (unit()) {\n <span class=\"mapa-summary-meter__unit\">{{ unit() }}</span>\n }\n </p>\n @if (detail()) {\n <p class=\"mapa-summary-meter__detail\">\n @if (showDetailIcon()) {\n <mapa-guide-icon name=\"clock\" [size]=\"16\" />\n }\n <span>{{ detail() }}</span>\n </p>\n }\n </div>\n @if (hasMeter()) {\n <div class=\"mapa-summary-meter__meter-group\">\n <div\n class=\"mapa-summary-meter__meter\"\n role=\"meter\"\n aria-valuemin=\"0\"\n [attr.aria-valuemax]=\"meterMax()\"\n [attr.aria-valuenow]=\"clampedMeterValue()\"\n [attr.aria-valuetext]=\"meterText() || null\"\n [attr.aria-label]=\"meterLabel() || null\"\n >\n <div class=\"mapa-summary-meter__bar\" [style.width]=\"meterWidth()\"></div>\n </div>\n @if (meterText()) {\n <p class=\"mapa-summary-meter__meter-text\" aria-hidden=\"true\">{{ meterText() }}</p>\n }\n </div>\n } @else if (meterText()) {\n <p class=\"mapa-summary-meter__meter-text\">{{ meterText() }}</p>\n }\n</div>\n", styles: [":host{display:block;min-width:0;color:var(--mapa-guide-text, #162f42);font-family:var(--mapa-guide-font-body, var(--mapa-font-body, \"Asap\", sans-serif));font-size:14px;line-height:22px}.mapa-summary-meter{display:flex;flex-direction:column;gap:12px}.mapa-summary-meter__reading{display:flex;flex-direction:column;gap:4px}.mapa-summary-meter__figure{display:flex;flex-wrap:wrap;align-items:baseline;gap:8px;margin:0}.mapa-summary-meter__value{margin:0;color:var(--mapa-guide-text, #162f42);font-family:var(--mapa-guide-font-heading, var(--mapa-font-heading, \"Asap\", sans-serif));font-size:40px;font-weight:600;line-height:44px;font-variant-numeric:tabular-nums}.mapa-summary-meter__unit,.mapa-summary-meter__detail{color:var(--mapa-guide-text-2, #41566a);font-size:14px}.mapa-summary-meter__detail{display:flex;align-items:center;gap:6px;margin:0}.mapa-summary-meter__meter-group{display:flex;flex-direction:column;gap:6px}.mapa-summary-meter__meter{height:8px;overflow:hidden;border-radius:999px;background:var(--mapa-guide-surface-3, #e4eef0)}.mapa-summary-meter__bar{height:100%;border-radius:999px;background:var(--mapa-guide-primary, #d33e1f);transition:width .2s ease}@media(prefers-reduced-motion:reduce){.mapa-summary-meter__bar{transition:none}}@media(forced-colors:active){.mapa-summary-meter__bar{background:Highlight}}.mapa-summary-meter__meter-text{margin:0;color:var(--mapa-guide-text-2, #41566a);font-size:13px;line-height:20px}\n"] }]
|
|
10575
|
+
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], unit: [{ type: i0.Input, args: [{ isSignal: true, alias: "unit", required: false }] }], detail: [{ type: i0.Input, args: [{ isSignal: true, alias: "detail", required: false }] }], showDetailIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showDetailIcon", required: false }] }], meterValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "meterValue", required: false }] }], meterMax: [{ type: i0.Input, args: [{ isSignal: true, alias: "meterMax", required: false }] }], meterLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "meterLabel", required: false }] }], meterText: [{ type: i0.Input, args: [{ isSignal: true, alias: "meterText", required: false }] }], live: [{ type: i0.Input, args: [{ isSignal: true, alias: "live", required: false }] }] } });
|
|
10576
|
+
|
|
9754
10577
|
class MapaWarningComponent {
|
|
9755
10578
|
constructor(i18n) {
|
|
9756
10579
|
this.i18n = i18n;
|
|
@@ -9805,6 +10628,84 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
9805
10628
|
* Public API Surface of mapa-library-ui icon
|
|
9806
10629
|
*/
|
|
9807
10630
|
|
|
10631
|
+
/**
|
|
10632
|
+
* Guia V5 · 21.10 Prévia de boas-vindas: how the assessed person sees the first
|
|
10633
|
+
* screen. It is a picture of another page, so it renders no headings and its
|
|
10634
|
+
* start button stays disabled.
|
|
10635
|
+
*/
|
|
10636
|
+
class MapaWelcomePreviewComponent {
|
|
10637
|
+
constructor() {
|
|
10638
|
+
this.i18n = inject(MapaI18nService);
|
|
10639
|
+
/** Title of the welcome screen (not `title`, which would also become a host tooltip). */
|
|
10640
|
+
this.heading = input.required(...(ngDevMode ? [{ debugName: "heading" }] : []));
|
|
10641
|
+
this.description = input(...(ngDevMode ? [undefined, { debugName: "description" }] : []));
|
|
10642
|
+
/** Line under the description, e.g. "112 perguntas · cerca de 15 minutos · 2 testes". */
|
|
10643
|
+
this.meta = input(...(ngDevMode ? [undefined, { debugName: "meta" }] : []));
|
|
10644
|
+
this.logoUrl = input(...(ngDevMode ? [undefined, { debugName: "logoUrl" }] : []));
|
|
10645
|
+
/** Company name: the logo's alternative text, or the text shown when there is no logo. */
|
|
10646
|
+
this.brandName = input(...(ngDevMode ? [undefined, { debugName: "brandName" }] : []));
|
|
10647
|
+
/** Brand color of the company name when there is no logo. */
|
|
10648
|
+
this.brandColor = input(...(ngDevMode ? [undefined, { debugName: "brandColor" }] : []));
|
|
10649
|
+
this.startLabel = input(...(ngDevMode ? [undefined, { debugName: "startLabel" }] : []));
|
|
10650
|
+
this.previewLabel = input(...(ngDevMode ? [undefined, { debugName: "previewLabel" }] : []));
|
|
10651
|
+
this.texts = computed(() => this.i18n.textsSignal().welcomePreview, ...(ngDevMode ? [{ debugName: "texts" }] : []));
|
|
10652
|
+
}
|
|
10653
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaWelcomePreviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10654
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.21", type: MapaWelcomePreviewComponent, isStandalone: true, selector: "mapa-welcome-preview", inputs: { heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: true, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, meta: { classPropertyName: "meta", publicName: "meta", isSignal: true, isRequired: false, transformFunction: null }, logoUrl: { classPropertyName: "logoUrl", publicName: "logoUrl", isSignal: true, isRequired: false, transformFunction: null }, brandName: { classPropertyName: "brandName", publicName: "brandName", isSignal: true, isRequired: false, transformFunction: null }, brandColor: { classPropertyName: "brandColor", publicName: "brandColor", isSignal: true, isRequired: false, transformFunction: null }, startLabel: { classPropertyName: "startLabel", publicName: "startLabel", isSignal: true, isRequired: false, transformFunction: null }, previewLabel: { classPropertyName: "previewLabel", publicName: "previewLabel", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<figure class=\"mapa-welcome-preview\">\n <figcaption class=\"mapa-welcome-preview__caption\">\n {{ previewLabel() || texts().previewLabel }}\n </figcaption>\n <div class=\"mapa-welcome-preview__screen\">\n @if (logoUrl()) {\n <img class=\"mapa-welcome-preview__logo\" [src]=\"logoUrl()\" [alt]=\"brandName() ?? ''\" />\n } @else if (brandName()) {\n <p class=\"mapa-welcome-preview__brand\" [style.color]=\"brandColor() || null\">{{ brandName() }}</p>\n }\n <p class=\"mapa-welcome-preview__title\">{{ heading() }}</p>\n @if (description()) {\n <p class=\"mapa-welcome-preview__description\">{{ description() }}</p>\n }\n @if (meta()) {\n <p class=\"mapa-welcome-preview__meta\">{{ meta() }}</p>\n }\n <button type=\"button\" class=\"mapa-welcome-preview__start\" disabled>\n {{ startLabel() || texts().startLabel }}\n </button>\n </div>\n</figure>\n", styles: [":host{display:block;min-width:0;color:var(--mapa-guide-text, #162f42);font-family:var(--mapa-guide-font-body, var(--mapa-font-body, \"Asap\", sans-serif));font-size:14px;line-height:22px}:host{max-width:560px}.mapa-welcome-preview{margin:0;overflow:hidden;border:1px solid var(--mapa-guide-border, #dce5e8);border-radius:14px;background:var(--mapa-guide-surface, #ffffff)}.mapa-welcome-preview__caption{padding:8px 14px;border-bottom:1px solid var(--mapa-guide-border, #dce5e8);background:var(--mapa-guide-surface-2, #eef4f5);color:var(--mapa-guide-text-3, #56697a);font-size:11px;font-weight:600;letter-spacing:.06em;line-height:16px;text-transform:uppercase}.mapa-welcome-preview__screen{display:flex;flex-direction:column;align-items:flex-start;gap:10px;padding:24px}.mapa-welcome-preview__screen p{margin:0}.mapa-welcome-preview__logo{display:block;max-width:160px;max-height:32px;object-fit:contain}.mapa-welcome-preview__brand{color:var(--mapa-guide-text, #162f42);font-size:16px;font-weight:700;letter-spacing:-.02em}.mapa-welcome-preview__title{margin:0;color:var(--mapa-guide-text, #162f42);font-family:var(--mapa-guide-font-heading, var(--mapa-font-heading, \"Asap\", sans-serif));font-size:20px;font-weight:600;line-height:28px;overflow-wrap:break-word}.mapa-welcome-preview__description{color:var(--mapa-guide-text-2, #41566a);font-size:14px;line-height:1.6;white-space:pre-line}.mapa-welcome-preview__meta{color:var(--mapa-guide-text, #162f42);font-size:14px;font-weight:600}.mapa-welcome-preview__start{min-height:44px;padding:0 20px;border:0;border-radius:8px;background:var(--mapa-guide-primary, #d33e1f);color:var(--mapa-guide-on-primary, #ffffff);font:inherit;font-size:14px;font-weight:600;cursor:default}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
10655
|
+
}
|
|
10656
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaWelcomePreviewComponent, decorators: [{
|
|
10657
|
+
type: Component,
|
|
10658
|
+
args: [{ selector: 'mapa-welcome-preview', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<figure class=\"mapa-welcome-preview\">\n <figcaption class=\"mapa-welcome-preview__caption\">\n {{ previewLabel() || texts().previewLabel }}\n </figcaption>\n <div class=\"mapa-welcome-preview__screen\">\n @if (logoUrl()) {\n <img class=\"mapa-welcome-preview__logo\" [src]=\"logoUrl()\" [alt]=\"brandName() ?? ''\" />\n } @else if (brandName()) {\n <p class=\"mapa-welcome-preview__brand\" [style.color]=\"brandColor() || null\">{{ brandName() }}</p>\n }\n <p class=\"mapa-welcome-preview__title\">{{ heading() }}</p>\n @if (description()) {\n <p class=\"mapa-welcome-preview__description\">{{ description() }}</p>\n }\n @if (meta()) {\n <p class=\"mapa-welcome-preview__meta\">{{ meta() }}</p>\n }\n <button type=\"button\" class=\"mapa-welcome-preview__start\" disabled>\n {{ startLabel() || texts().startLabel }}\n </button>\n </div>\n</figure>\n", styles: [":host{display:block;min-width:0;color:var(--mapa-guide-text, #162f42);font-family:var(--mapa-guide-font-body, var(--mapa-font-body, \"Asap\", sans-serif));font-size:14px;line-height:22px}:host{max-width:560px}.mapa-welcome-preview{margin:0;overflow:hidden;border:1px solid var(--mapa-guide-border, #dce5e8);border-radius:14px;background:var(--mapa-guide-surface, #ffffff)}.mapa-welcome-preview__caption{padding:8px 14px;border-bottom:1px solid var(--mapa-guide-border, #dce5e8);background:var(--mapa-guide-surface-2, #eef4f5);color:var(--mapa-guide-text-3, #56697a);font-size:11px;font-weight:600;letter-spacing:.06em;line-height:16px;text-transform:uppercase}.mapa-welcome-preview__screen{display:flex;flex-direction:column;align-items:flex-start;gap:10px;padding:24px}.mapa-welcome-preview__screen p{margin:0}.mapa-welcome-preview__logo{display:block;max-width:160px;max-height:32px;object-fit:contain}.mapa-welcome-preview__brand{color:var(--mapa-guide-text, #162f42);font-size:16px;font-weight:700;letter-spacing:-.02em}.mapa-welcome-preview__title{margin:0;color:var(--mapa-guide-text, #162f42);font-family:var(--mapa-guide-font-heading, var(--mapa-font-heading, \"Asap\", sans-serif));font-size:20px;font-weight:600;line-height:28px;overflow-wrap:break-word}.mapa-welcome-preview__description{color:var(--mapa-guide-text-2, #41566a);font-size:14px;line-height:1.6;white-space:pre-line}.mapa-welcome-preview__meta{color:var(--mapa-guide-text, #162f42);font-size:14px;font-weight:600}.mapa-welcome-preview__start{min-height:44px;padding:0 20px;border:0;border-radius:8px;background:var(--mapa-guide-primary, #d33e1f);color:var(--mapa-guide-on-primary, #ffffff);font:inherit;font-size:14px;font-weight:600;cursor:default}\n"] }]
|
|
10659
|
+
}], propDecorators: { heading: [{ type: i0.Input, args: [{ isSignal: true, alias: "heading", required: true }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], meta: [{ type: i0.Input, args: [{ isSignal: true, alias: "meta", required: false }] }], logoUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "logoUrl", required: false }] }], brandName: [{ type: i0.Input, args: [{ isSignal: true, alias: "brandName", required: false }] }], brandColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "brandColor", required: false }] }], startLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "startLabel", required: false }] }], previewLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "previewLabel", required: false }] }] } });
|
|
10660
|
+
|
|
10661
|
+
/**
|
|
10662
|
+
* Guia V5 · 21.1 Etapas. Step numbers are 1-based, like the visible markers,
|
|
10663
|
+
* so `current` and `furthest` match the persisted wizard state.
|
|
10664
|
+
*/
|
|
10665
|
+
class MapaWizardStepsComponent {
|
|
10666
|
+
constructor() {
|
|
10667
|
+
this.i18n = inject(MapaI18nService);
|
|
10668
|
+
this.steps = input.required(...(ngDevMode ? [{ debugName: "steps" }] : []));
|
|
10669
|
+
this.current = input.required(...(ngDevMode ? [{ debugName: "current" }] : []));
|
|
10670
|
+
/** Furthest step already reached; steps after it are locked. Defaults to `current`. */
|
|
10671
|
+
this.furthest = input(...(ngDevMode ? [undefined, { debugName: "furthest" }] : []));
|
|
10672
|
+
/** Accessible name of the navigation landmark. */
|
|
10673
|
+
this.label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
|
|
10674
|
+
/** Emits the 1-based number of a reachable step other than the current one. */
|
|
10675
|
+
this.stepSelect = output();
|
|
10676
|
+
this.texts = computed(() => this.i18n.textsSignal().wizardSteps, ...(ngDevMode ? [{ debugName: "texts" }] : []));
|
|
10677
|
+
this.navigationLabel = computed(() => this.label() || this.texts().navigationLabel, ...(ngDevMode ? [{ debugName: "navigationLabel" }] : []));
|
|
10678
|
+
this.viewSteps = computed(() => {
|
|
10679
|
+
const current = this.current();
|
|
10680
|
+
const furthest = Math.max(this.furthest() ?? current, current);
|
|
10681
|
+
return this.steps().map((step, index) => {
|
|
10682
|
+
const number = index + 1;
|
|
10683
|
+
const isCurrent = number === current;
|
|
10684
|
+
const locked = !isCurrent && (number > furthest || step.locked === true);
|
|
10685
|
+
return {
|
|
10686
|
+
number,
|
|
10687
|
+
label: step.label,
|
|
10688
|
+
current: isCurrent,
|
|
10689
|
+
done: !isCurrent && !locked && (step.complete ?? number < furthest),
|
|
10690
|
+
locked,
|
|
10691
|
+
};
|
|
10692
|
+
});
|
|
10693
|
+
}, ...(ngDevMode ? [{ debugName: "viewSteps" }] : []));
|
|
10694
|
+
}
|
|
10695
|
+
select(step) {
|
|
10696
|
+
if (step.current || step.locked) {
|
|
10697
|
+
return;
|
|
10698
|
+
}
|
|
10699
|
+
this.stepSelect.emit(step.number);
|
|
10700
|
+
}
|
|
10701
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaWizardStepsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10702
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.21", type: MapaWizardStepsComponent, isStandalone: true, selector: "mapa-wizard-steps", inputs: { steps: { classPropertyName: "steps", publicName: "steps", isSignal: true, isRequired: true, transformFunction: null }, current: { classPropertyName: "current", publicName: "current", isSignal: true, isRequired: true, transformFunction: null }, furthest: { classPropertyName: "furthest", publicName: "furthest", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { stepSelect: "stepSelect" }, ngImport: i0, template: "<nav class=\"mapa-wizard-steps\" [attr.aria-label]=\"navigationLabel()\">\n <ol class=\"mapa-wizard-steps__list\">\n @for (step of viewSteps(); track step.number) {\n <li class=\"mapa-wizard-steps__item\">\n <button\n type=\"button\"\n class=\"mapa-wizard-steps__step\"\n [class.mapa-wizard-steps__step--current]=\"step.current\"\n [class.mapa-wizard-steps__step--done]=\"step.done\"\n [class.mapa-wizard-steps__step--locked]=\"step.locked\"\n [disabled]=\"step.locked\"\n [attr.aria-current]=\"step.current ? 'step' : null\"\n (click)=\"select(step)\"\n >\n <span class=\"mapa-wizard-steps__marker\" aria-hidden=\"true\">\n @if (step.done) {\n <mapa-guide-icon name=\"check\" [size]=\"14\" [strokeWidth]=\"3\" />\n } @else {\n {{ step.number }}\n }\n </span>\n <span class=\"mapa-wizard-steps__label\">{{ step.label }}</span>\n @if (step.done) {\n <span class=\"mapa-wizard-steps__status\">, {{ texts().doneStatus }}</span>\n } @else if (step.locked) {\n <span class=\"mapa-wizard-steps__status\">, {{ texts().lockedStatus }}</span>\n }\n </button>\n @if (!$last) {\n <span\n class=\"mapa-wizard-steps__separator\"\n [class.mapa-wizard-steps__separator--done]=\"step.done\"\n aria-hidden=\"true\"\n ></span>\n }\n </li>\n }\n </ol>\n</nav>\n", styles: [":host{display:block;min-width:0;color:var(--mapa-guide-text, #162f42);font-family:var(--mapa-guide-font-body, var(--mapa-font-body, \"Asap\", sans-serif));font-size:14px;line-height:22px}.mapa-wizard-steps__list{display:flex;flex-wrap:wrap;align-items:center;gap:4px 12px;margin:0;padding:0;list-style:none}.mapa-wizard-steps__item{display:flex;align-items:center;gap:12px;min-width:0}.mapa-wizard-steps__step{display:inline-flex;align-items:center;gap:10px;min-height:44px;padding:0 6px 0 4px;border:0;border-radius:8px;background:transparent;color:var(--mapa-guide-text-2, #41566a);font:inherit;font-size:14px;font-weight:600;text-align:left;cursor:pointer}.mapa-wizard-steps__step:hover:not(:disabled):not(.mapa-wizard-steps__step--current){background:var(--mapa-guide-surface-2, #eef4f5)}.mapa-wizard-steps__step:focus-visible{outline:2px solid var(--mapa-guide-focus, #d33e1f);outline-offset:2px}.mapa-wizard-steps__step--current{color:var(--mapa-guide-text, #162f42);font-weight:700;cursor:default}.mapa-wizard-steps__step--done{color:var(--mapa-guide-text, #162f42)}.mapa-wizard-steps__step--locked{color:var(--mapa-guide-text-3, #56697a);cursor:not-allowed}.mapa-wizard-steps__marker{display:inline-flex;flex:none;align-items:center;justify-content:center;box-sizing:border-box;width:28px;height:28px;border:2px solid var(--mapa-guide-border-strong, #7f949e);border-radius:999px;background:var(--mapa-guide-surface, #ffffff);color:var(--mapa-guide-text-2, #41566a);font-size:13px;font-weight:700;font-variant-numeric:tabular-nums}.mapa-wizard-steps__step--current .mapa-wizard-steps__marker{border-color:var(--mapa-guide-primary, #d33e1f);color:var(--mapa-guide-primary, #d33e1f)}.mapa-wizard-steps__step--done .mapa-wizard-steps__marker{border-color:var(--mapa-guide-primary, #d33e1f);background:var(--mapa-guide-primary, #d33e1f);color:var(--mapa-guide-on-primary, #ffffff)}.mapa-wizard-steps__step--locked .mapa-wizard-steps__marker{border-style:dashed;border-color:var(--mapa-guide-border-strong, #7f949e);color:var(--mapa-guide-text-3, #56697a)}.mapa-wizard-steps__label{overflow-wrap:break-word}.mapa-wizard-steps__status{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}.mapa-wizard-steps__separator{flex:none;width:28px;height:2px;border-radius:2px;background:var(--mapa-guide-border, #dce5e8)}.mapa-wizard-steps__separator--done{background:var(--mapa-guide-primary, #d33e1f)}@media(forced-colors:active){.mapa-wizard-steps__marker{border-color:CanvasText}.mapa-wizard-steps__step--current .mapa-wizard-steps__marker{border-color:Highlight}}\n"], dependencies: [{ kind: "component", type: MapaGuideIconComponent, selector: "mapa-guide-icon", inputs: ["name", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
10703
|
+
}
|
|
10704
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaWizardStepsComponent, decorators: [{
|
|
10705
|
+
type: Component,
|
|
10706
|
+
args: [{ selector: 'mapa-wizard-steps', standalone: true, imports: [MapaGuideIconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<nav class=\"mapa-wizard-steps\" [attr.aria-label]=\"navigationLabel()\">\n <ol class=\"mapa-wizard-steps__list\">\n @for (step of viewSteps(); track step.number) {\n <li class=\"mapa-wizard-steps__item\">\n <button\n type=\"button\"\n class=\"mapa-wizard-steps__step\"\n [class.mapa-wizard-steps__step--current]=\"step.current\"\n [class.mapa-wizard-steps__step--done]=\"step.done\"\n [class.mapa-wizard-steps__step--locked]=\"step.locked\"\n [disabled]=\"step.locked\"\n [attr.aria-current]=\"step.current ? 'step' : null\"\n (click)=\"select(step)\"\n >\n <span class=\"mapa-wizard-steps__marker\" aria-hidden=\"true\">\n @if (step.done) {\n <mapa-guide-icon name=\"check\" [size]=\"14\" [strokeWidth]=\"3\" />\n } @else {\n {{ step.number }}\n }\n </span>\n <span class=\"mapa-wizard-steps__label\">{{ step.label }}</span>\n @if (step.done) {\n <span class=\"mapa-wizard-steps__status\">, {{ texts().doneStatus }}</span>\n } @else if (step.locked) {\n <span class=\"mapa-wizard-steps__status\">, {{ texts().lockedStatus }}</span>\n }\n </button>\n @if (!$last) {\n <span\n class=\"mapa-wizard-steps__separator\"\n [class.mapa-wizard-steps__separator--done]=\"step.done\"\n aria-hidden=\"true\"\n ></span>\n }\n </li>\n }\n </ol>\n</nav>\n", styles: [":host{display:block;min-width:0;color:var(--mapa-guide-text, #162f42);font-family:var(--mapa-guide-font-body, var(--mapa-font-body, \"Asap\", sans-serif));font-size:14px;line-height:22px}.mapa-wizard-steps__list{display:flex;flex-wrap:wrap;align-items:center;gap:4px 12px;margin:0;padding:0;list-style:none}.mapa-wizard-steps__item{display:flex;align-items:center;gap:12px;min-width:0}.mapa-wizard-steps__step{display:inline-flex;align-items:center;gap:10px;min-height:44px;padding:0 6px 0 4px;border:0;border-radius:8px;background:transparent;color:var(--mapa-guide-text-2, #41566a);font:inherit;font-size:14px;font-weight:600;text-align:left;cursor:pointer}.mapa-wizard-steps__step:hover:not(:disabled):not(.mapa-wizard-steps__step--current){background:var(--mapa-guide-surface-2, #eef4f5)}.mapa-wizard-steps__step:focus-visible{outline:2px solid var(--mapa-guide-focus, #d33e1f);outline-offset:2px}.mapa-wizard-steps__step--current{color:var(--mapa-guide-text, #162f42);font-weight:700;cursor:default}.mapa-wizard-steps__step--done{color:var(--mapa-guide-text, #162f42)}.mapa-wizard-steps__step--locked{color:var(--mapa-guide-text-3, #56697a);cursor:not-allowed}.mapa-wizard-steps__marker{display:inline-flex;flex:none;align-items:center;justify-content:center;box-sizing:border-box;width:28px;height:28px;border:2px solid var(--mapa-guide-border-strong, #7f949e);border-radius:999px;background:var(--mapa-guide-surface, #ffffff);color:var(--mapa-guide-text-2, #41566a);font-size:13px;font-weight:700;font-variant-numeric:tabular-nums}.mapa-wizard-steps__step--current .mapa-wizard-steps__marker{border-color:var(--mapa-guide-primary, #d33e1f);color:var(--mapa-guide-primary, #d33e1f)}.mapa-wizard-steps__step--done .mapa-wizard-steps__marker{border-color:var(--mapa-guide-primary, #d33e1f);background:var(--mapa-guide-primary, #d33e1f);color:var(--mapa-guide-on-primary, #ffffff)}.mapa-wizard-steps__step--locked .mapa-wizard-steps__marker{border-style:dashed;border-color:var(--mapa-guide-border-strong, #7f949e);color:var(--mapa-guide-text-3, #56697a)}.mapa-wizard-steps__label{overflow-wrap:break-word}.mapa-wizard-steps__status{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}.mapa-wizard-steps__separator{flex:none;width:28px;height:2px;border-radius:2px;background:var(--mapa-guide-border, #dce5e8)}.mapa-wizard-steps__separator--done{background:var(--mapa-guide-primary, #d33e1f)}@media(forced-colors:active){.mapa-wizard-steps__marker{border-color:CanvasText}.mapa-wizard-steps__step--current .mapa-wizard-steps__marker{border-color:Highlight}}\n"] }]
|
|
10707
|
+
}], propDecorators: { steps: [{ type: i0.Input, args: [{ isSignal: true, alias: "steps", required: true }] }], current: [{ type: i0.Input, args: [{ isSignal: true, alias: "current", required: true }] }], furthest: [{ type: i0.Input, args: [{ isSignal: true, alias: "furthest", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], stepSelect: [{ type: i0.Output, args: ["stepSelect"] }] } });
|
|
10708
|
+
|
|
9808
10709
|
class MapaScaleParameterizationComponent {
|
|
9809
10710
|
constructor(i18n) {
|
|
9810
10711
|
this.i18n = i18n;
|
|
@@ -9924,5 +10825,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
9924
10825
|
* Generated bundle index. Do not edit.
|
|
9925
10826
|
*/
|
|
9926
10827
|
|
|
9927
|
-
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, MapaReportGroupProfileDetailComponent, MapaReportGroupProfileWidgetAverageComponent, MapaReportGroupProfileWidgetComponent, MapaReportGroupProfileWidgetDistributionComponent, MapaReportIndicatorsWidgetChartComponent, MapaReportIndicatorsWidgetComponent, MapaReportIndicatorsWidgetDetailedComponent, MapaReportIndicatorsWidgetListComponent, MapaReportLegendComponent, MapaReportParameterizationWidgetComponent, MapaReportParameterizationWidgetDetailedComponent, MapaReportParameterizationWidgetOverviewComponent, MapaReportParameterizationWidgetRankingComponent, MapaReportParameterizationWidgetSummarizedComponent, MapaReportPointsWidgetComponent, MapaReportPointsWidgetDetailedComponent, MapaReportPointsWidgetSummarizedComponent, MapaReportPsychosocialWidgetComponent, MapaReportPsychosocialWidgetFactorsComponent, MapaReportPsychosocialWidgetGlobalComponent, MapaReportRankingTableContentComponent, MapaReportRankingTableWidgetComponent, MapaReportScaleWidgetComponent, MapaReportScaleWidgetDetailedComponent, MapaReportScaleWidgetSummarizedComponent, MapaReportSocioemotionalWidgetCompetenciesComponent, MapaReportSocioemotionalWidgetComponent, MapaReportSocioemotionalWidgetVulnerabilitiesComponent, 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 };
|
|
10828
|
+
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, MapaCatalogOrderComponent, MapaChartComponent, MapaClassificationTagComponent, MapaConclusionCardComponent, MapaDateLocaleService, MapaDatepicker, MapaDatepicker as MapaDatepickerRange, MapaDeadlineFieldComponent, MapaDetailsComponent, MapaDialogComponent, MapaDropdownComponent, MapaDropdownTreeComponent, MapaEmptyStateComponent, MapaFileDropComponent, MapaFormComponent, MapaFormErrorsComponent, MapaGroupReportComponent, MapaGuideIconComponent, MapaI18nService, MapaInputComponent, MapaLaunchOptionsComponent, MapaMaskAutofillSyncDirective, MapaMenuComponent, MapaNavListComponent, MapaOptionCardsComponent, MapaPalettePickerComponent, MapaProgressbarComponent, MapaReportGroupProfileDetailComponent, MapaReportGroupProfileWidgetAverageComponent, MapaReportGroupProfileWidgetComponent, MapaReportGroupProfileWidgetDistributionComponent, MapaReportIndicatorsWidgetChartComponent, MapaReportIndicatorsWidgetComponent, MapaReportIndicatorsWidgetDetailedComponent, MapaReportIndicatorsWidgetListComponent, MapaReportLegendComponent, MapaReportParameterizationWidgetComponent, MapaReportParameterizationWidgetDetailedComponent, MapaReportParameterizationWidgetOverviewComponent, MapaReportParameterizationWidgetRankingComponent, MapaReportParameterizationWidgetSummarizedComponent, MapaReportPointsWidgetComponent, MapaReportPointsWidgetDetailedComponent, MapaReportPointsWidgetSummarizedComponent, MapaReportPsychosocialWidgetComponent, MapaReportPsychosocialWidgetFactorsComponent, MapaReportPsychosocialWidgetGlobalComponent, MapaReportRankingTableContentComponent, MapaReportRankingTableWidgetComponent, MapaReportScaleWidgetComponent, MapaReportScaleWidgetDetailedComponent, MapaReportScaleWidgetSummarizedComponent, MapaReportSocioemotionalWidgetCompetenciesComponent, MapaReportSocioemotionalWidgetComponent, MapaReportSocioemotionalWidgetVulnerabilitiesComponent, MapaResultTrackComponent, MapaScaleComponent, MapaScaleParameterizationComponent, MapaSummaryMeterComponent, MapaSvgIconComponent, MapaTableCellDirective, MapaTableComponent, MapaTextareaComponent, MapaTooltipComponent, MapaTooltipDirective, MapaWarningComponent, MapaWelcomePreviewComponent, MapaWizardStepsComponent, 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 };
|
|
9928
10829
|
//# sourceMappingURL=mapa-library-ui.mjs.map
|