mapa-library-ui 1.7.1 → 1.7.3
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/fesm2022/mapa-library-ui-src-lib-components-datepicker-range.mjs +179 -10
- package/fesm2022/mapa-library-ui-src-lib-components-datepicker-range.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-datepicker.mjs +178 -6
- package/fesm2022/mapa-library-ui-src-lib-components-datepicker.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-filters.mjs +141 -5
- package/fesm2022/mapa-library-ui-src-lib-components-filters.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-form.mjs +191 -17
- package/fesm2022/mapa-library-ui-src-lib-components-form.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-group-report.mjs +2 -2
- package/fesm2022/mapa-library-ui-src-lib-components-group-report.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-input.mjs +141 -5
- package/fesm2022/mapa-library-ui-src-lib-components-input.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-table.mjs +33 -0
- package/fesm2022/mapa-library-ui-src-lib-components-table.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-components-textarea.mjs +2 -2
- package/fesm2022/mapa-library-ui-src-lib-components-textarea.mjs.map +1 -1
- package/fesm2022/mapa-library-ui-src-lib-core-utils.mjs +34 -1
- package/fesm2022/mapa-library-ui-src-lib-core-utils.mjs.map +1 -1
- package/fesm2022/mapa-library-ui.mjs +195 -22
- package/fesm2022/mapa-library-ui.mjs.map +1 -1
- package/index.d.ts +60 -2
- package/mapa-library-ui-1.7.3.tgz +0 -0
- package/package.json +1 -1
- package/src/lib/core/utils/index.d.ts +15 -1
- package/mapa-library-ui-1.7.1.tgz +0 -0
|
@@ -134,11 +134,11 @@ class MapaGroupReportComponent {
|
|
|
134
134
|
};
|
|
135
135
|
}
|
|
136
136
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaGroupReportComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
137
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.21", type: MapaGroupReportComponent, isStandalone: true, selector: "mapa-group-report", inputs: { groupReport: "groupReport", showGroupReportGeneral: "showGroupReportGeneral" }, outputs: { onSortChange: "onSortChange" }, viewQueries: [{ propertyName: "sort", first: true, predicate: MatSort, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<section class=\"mapa-group-report\">\n <table\n mat-table\n [dataSource]=\"dataSource\"\n matSort\n (matSortChange)=\"handleSortChange($event)\"\n >\n @for (column of columns; track trackColumn($index, column)) {\n <ng-container [matColumnDef]=\"column.key\">\n <th\n mat-header-cell\n *matHeaderCellDef\n mat-sort-header\n [disabled]=\"!column.sort\"\n >\n <div\n [ngTemplateOutlet]=\"tableHeader\"\n [ngTemplateOutletContext]=\"{ column: column }\"\n ></div>\n </th>\n <td mat-cell *matCellDef=\"let row\" [style.width]=\"column.width\">\n <div\n class=\"mapa-group-report__column\"\n [class.mapa-group-report__column--center-cell]=\"column.align === 'center' || column.key !== 'name'\"\n >\n <div class=\"mapa-group-report__content\">\n @if (column.key === \"name\") {\n <div class=\"mapa-group-report__content--value\">\n <div class=\"mapa-group-report__content--title\">\n {{ row.name }}<br />\n </div>\n <div class=\"mapa-group-report__content--subtitle\">\n {{ row.cpf }}\n </div>\n </div>\n } @else if (column.key === \"general\") {\n <div class=\"general\">\n {{ getGeneralValue(row) | currency:'':'' }}%\n </div>\n } @else {\n <div class=\"mapa-group-report__hover\">\n <span class=\"mapa-group-report__hover--main\">\n <div\n class=\"mapa__tag--bg\"\n [class.mapa__tag--contrast]=\"getDimensionClassification(row, column.key)?.classificationId === 1\"\n [style.backgroundColor]=\"getDimensionClassification(row, column.key)?.classificationColor\"\n >\n {{\n getDimensionClassification(row, column.key)?.classificationName ||\n \"-\"\n }}\n </div>\n </span>\n <span class=\"mapa-group-report__hover--hidden\">\n {{ getDimensionLabel(row, column.key) }}\n </span>\n </div>\n }\n </div>\n </div>\n </td>\n </ng-container>\n }\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n </table>\n</section>\n\n<ng-template #tableHeader let-column=\"column\">\n <div class=\"mapa-group-report__header\">\n {{ column.label }}\n @if (column.sort) {\n <div>\n <mat-icon>filter_list</mat-icon>\n </div>\n }\n </div>\n</ng-template>\n", styles: [":host ::ng-deep .mapa-group-report{width:100%;white-space:nowrap}:host ::ng-deep .mapa-group-report__column{display:flex;align-items:center}:host ::ng-deep .mapa-group-report__column--center-cell{display:flex;align-items:center;justify-content:center;width:100%}:host ::ng-deep .mapa-group-report__content--value{margin-right:40px}:host ::ng-deep .mapa-group-report__content--title{color:#000;text-align:left;font-family:var(--mapa-font-heading, \"Asap\", \"Inter\", sans-serif);font-size:14px;font-style:normal;font-weight:500;line-height:20px}:host ::ng-deep .mapa-group-report__content--subtitle{color:#77838f;text-align:left;font-family:var(--mapa-font-heading, \"Asap\", \"Inter\", sans-serif);font-size:12px;font-style:normal;font-weight:400;line-height:16px}:host ::ng-deep .mapa-group-report__hover:hover--main{display:none}:host ::ng-deep .mapa-group-report__hover:hover--hidden{display:flex}:host ::ng-deep .mapa-group-report__hover--hidden{display:none}:host ::ng-deep .mapa-group-report__header{display:flex;align-items:center;justify-content:center;width:100%}:host ::ng-deep .mapa-group-report .mat-sort-header-arrow{display:none}:host ::ng-deep .mapa-group-report .mat-sort-header-content{width:100%!important}:host ::ng-deep .mapa-group-report .general{border-radius:24px;border:1px solid #dcdcde;display:flex;justify-content:center;align-items:center;width:48px;height:48px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i3.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i3.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i3.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i3.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i3.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i3.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i3.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i3.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i3.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i3.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i4.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i4.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "pipe", type: i1.CurrencyPipe, name: "currency" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
137
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.21", type: MapaGroupReportComponent, isStandalone: true, selector: "mapa-group-report", inputs: { groupReport: "groupReport", showGroupReportGeneral: "showGroupReportGeneral" }, outputs: { onSortChange: "onSortChange" }, viewQueries: [{ propertyName: "sort", first: true, predicate: MatSort, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<section class=\"mapa-group-report\">\n <table\n mat-table\n [dataSource]=\"dataSource\"\n matSort\n (matSortChange)=\"handleSortChange($event)\"\n >\n @for (column of columns; track trackColumn($index, column)) {\n <ng-container [matColumnDef]=\"column.key\">\n <th\n mat-header-cell\n *matHeaderCellDef\n mat-sort-header\n [disabled]=\"!column.sort\"\n >\n <div\n [ngTemplateOutlet]=\"tableHeader\"\n [ngTemplateOutletContext]=\"{ column: column }\"\n ></div>\n </th>\n <td mat-cell *matCellDef=\"let row\" [style.width]=\"column.width\">\n <div\n class=\"mapa-group-report__column\"\n [class.mapa-group-report__column--center-cell]=\"column.align === 'center' || column.key !== 'name'\"\n >\n <div class=\"mapa-group-report__content\">\n @if (column.key === \"name\") {\n <div class=\"mapa-group-report__content--value\">\n <div class=\"mapa-group-report__content--title\">\n {{ row.name }}<br />\n </div>\n <div class=\"mapa-group-report__content--subtitle\">\n {{ row.cpf }}\n </div>\n </div>\n } @else if (column.key === \"general\") {\n <div class=\"general\">\n {{ getGeneralValue(row) | currency:'':'' }}%\n </div>\n } @else {\n <div class=\"mapa-group-report__hover\">\n <span class=\"mapa-group-report__hover--main\">\n <div\n class=\"mapa__tag--bg\"\n [class.mapa__tag--contrast]=\"getDimensionClassification(row, column.key)?.classificationId === 1\"\n [style.backgroundColor]=\"getDimensionClassification(row, column.key)?.classificationColor\"\n >\n {{\n getDimensionClassification(row, column.key)?.classificationName ||\n \"-\"\n }}\n </div>\n </span>\n <span class=\"mapa-group-report__hover--hidden\">\n {{ getDimensionLabel(row, column.key) }}\n </span>\n </div>\n }\n </div>\n </div>\n </td>\n </ng-container>\n }\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n </table>\n</section>\n\n<ng-template #tableHeader let-column=\"column\">\n <div class=\"mapa-group-report__header\">\n {{ column.label }}\n @if (column.sort) {\n <div>\n <mat-icon>filter_list</mat-icon>\n </div>\n }\n </div>\n</ng-template>\n", styles: [":host ::ng-deep .mapa-group-report{width:100%;white-space:nowrap}:host ::ng-deep .mapa-group-report__header{font-size:14px!important;justify-content:flex-start!important;gap:10px}:host ::ng-deep .mapa-group-report__header mat-icon{font-size:16px!important;height:16px!important;width:16px!important;margin-left:8px}:host ::ng-deep .mapa-group-report__column{display:flex;align-items:center}:host ::ng-deep .mapa-group-report__column--center-cell{display:flex;align-items:center;justify-content:center;width:100%}:host ::ng-deep .mapa-group-report__content--value{margin-right:40px}:host ::ng-deep .mapa-group-report__content--title{color:#000;text-align:left;font-family:var(--mapa-font-heading, \"Asap\", \"Inter\", sans-serif);font-size:14px;font-style:normal;font-weight:500;line-height:20px}:host ::ng-deep .mapa-group-report__content--subtitle{color:#77838f;text-align:left;font-family:var(--mapa-font-heading, \"Asap\", \"Inter\", sans-serif);font-size:12px;font-style:normal;font-weight:400;line-height:16px}:host ::ng-deep .mapa-group-report__hover:hover--main{display:none}:host ::ng-deep .mapa-group-report__hover:hover--hidden{display:flex}:host ::ng-deep .mapa-group-report__hover--hidden{display:none}:host ::ng-deep .mapa-group-report__header{display:flex;align-items:center;justify-content:center;width:100%}:host ::ng-deep .mapa-group-report .mat-sort-header-arrow{display:none}:host ::ng-deep .mapa-group-report .mat-sort-header-content{width:100%!important}:host ::ng-deep .mapa-group-report .general{border-radius:24px;border:1px solid #dcdcde;display:flex;justify-content:center;align-items:center;width:48px;height:48px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i3.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i3.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i3.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i3.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i3.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i3.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i3.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i3.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i3.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i3.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i4.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i4.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "pipe", type: i1.CurrencyPipe, name: "currency" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
138
138
|
}
|
|
139
139
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaGroupReportComponent, decorators: [{
|
|
140
140
|
type: Component,
|
|
141
|
-
args: [{ selector: "mapa-group-report", changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, MatIconModule, MatTableModule, MatSortModule], standalone: true, template: "<section class=\"mapa-group-report\">\n <table\n mat-table\n [dataSource]=\"dataSource\"\n matSort\n (matSortChange)=\"handleSortChange($event)\"\n >\n @for (column of columns; track trackColumn($index, column)) {\n <ng-container [matColumnDef]=\"column.key\">\n <th\n mat-header-cell\n *matHeaderCellDef\n mat-sort-header\n [disabled]=\"!column.sort\"\n >\n <div\n [ngTemplateOutlet]=\"tableHeader\"\n [ngTemplateOutletContext]=\"{ column: column }\"\n ></div>\n </th>\n <td mat-cell *matCellDef=\"let row\" [style.width]=\"column.width\">\n <div\n class=\"mapa-group-report__column\"\n [class.mapa-group-report__column--center-cell]=\"column.align === 'center' || column.key !== 'name'\"\n >\n <div class=\"mapa-group-report__content\">\n @if (column.key === \"name\") {\n <div class=\"mapa-group-report__content--value\">\n <div class=\"mapa-group-report__content--title\">\n {{ row.name }}<br />\n </div>\n <div class=\"mapa-group-report__content--subtitle\">\n {{ row.cpf }}\n </div>\n </div>\n } @else if (column.key === \"general\") {\n <div class=\"general\">\n {{ getGeneralValue(row) | currency:'':'' }}%\n </div>\n } @else {\n <div class=\"mapa-group-report__hover\">\n <span class=\"mapa-group-report__hover--main\">\n <div\n class=\"mapa__tag--bg\"\n [class.mapa__tag--contrast]=\"getDimensionClassification(row, column.key)?.classificationId === 1\"\n [style.backgroundColor]=\"getDimensionClassification(row, column.key)?.classificationColor\"\n >\n {{\n getDimensionClassification(row, column.key)?.classificationName ||\n \"-\"\n }}\n </div>\n </span>\n <span class=\"mapa-group-report__hover--hidden\">\n {{ getDimensionLabel(row, column.key) }}\n </span>\n </div>\n }\n </div>\n </div>\n </td>\n </ng-container>\n }\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n </table>\n</section>\n\n<ng-template #tableHeader let-column=\"column\">\n <div class=\"mapa-group-report__header\">\n {{ column.label }}\n @if (column.sort) {\n <div>\n <mat-icon>filter_list</mat-icon>\n </div>\n }\n </div>\n</ng-template>\n", styles: [":host ::ng-deep .mapa-group-report{width:100%;white-space:nowrap}:host ::ng-deep .mapa-group-report__column{display:flex;align-items:center}:host ::ng-deep .mapa-group-report__column--center-cell{display:flex;align-items:center;justify-content:center;width:100%}:host ::ng-deep .mapa-group-report__content--value{margin-right:40px}:host ::ng-deep .mapa-group-report__content--title{color:#000;text-align:left;font-family:var(--mapa-font-heading, \"Asap\", \"Inter\", sans-serif);font-size:14px;font-style:normal;font-weight:500;line-height:20px}:host ::ng-deep .mapa-group-report__content--subtitle{color:#77838f;text-align:left;font-family:var(--mapa-font-heading, \"Asap\", \"Inter\", sans-serif);font-size:12px;font-style:normal;font-weight:400;line-height:16px}:host ::ng-deep .mapa-group-report__hover:hover--main{display:none}:host ::ng-deep .mapa-group-report__hover:hover--hidden{display:flex}:host ::ng-deep .mapa-group-report__hover--hidden{display:none}:host ::ng-deep .mapa-group-report__header{display:flex;align-items:center;justify-content:center;width:100%}:host ::ng-deep .mapa-group-report .mat-sort-header-arrow{display:none}:host ::ng-deep .mapa-group-report .mat-sort-header-content{width:100%!important}:host ::ng-deep .mapa-group-report .general{border-radius:24px;border:1px solid #dcdcde;display:flex;justify-content:center;align-items:center;width:48px;height:48px}\n"] }]
|
|
141
|
+
args: [{ selector: "mapa-group-report", changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, MatIconModule, MatTableModule, MatSortModule], standalone: true, template: "<section class=\"mapa-group-report\">\n <table\n mat-table\n [dataSource]=\"dataSource\"\n matSort\n (matSortChange)=\"handleSortChange($event)\"\n >\n @for (column of columns; track trackColumn($index, column)) {\n <ng-container [matColumnDef]=\"column.key\">\n <th\n mat-header-cell\n *matHeaderCellDef\n mat-sort-header\n [disabled]=\"!column.sort\"\n >\n <div\n [ngTemplateOutlet]=\"tableHeader\"\n [ngTemplateOutletContext]=\"{ column: column }\"\n ></div>\n </th>\n <td mat-cell *matCellDef=\"let row\" [style.width]=\"column.width\">\n <div\n class=\"mapa-group-report__column\"\n [class.mapa-group-report__column--center-cell]=\"column.align === 'center' || column.key !== 'name'\"\n >\n <div class=\"mapa-group-report__content\">\n @if (column.key === \"name\") {\n <div class=\"mapa-group-report__content--value\">\n <div class=\"mapa-group-report__content--title\">\n {{ row.name }}<br />\n </div>\n <div class=\"mapa-group-report__content--subtitle\">\n {{ row.cpf }}\n </div>\n </div>\n } @else if (column.key === \"general\") {\n <div class=\"general\">\n {{ getGeneralValue(row) | currency:'':'' }}%\n </div>\n } @else {\n <div class=\"mapa-group-report__hover\">\n <span class=\"mapa-group-report__hover--main\">\n <div\n class=\"mapa__tag--bg\"\n [class.mapa__tag--contrast]=\"getDimensionClassification(row, column.key)?.classificationId === 1\"\n [style.backgroundColor]=\"getDimensionClassification(row, column.key)?.classificationColor\"\n >\n {{\n getDimensionClassification(row, column.key)?.classificationName ||\n \"-\"\n }}\n </div>\n </span>\n <span class=\"mapa-group-report__hover--hidden\">\n {{ getDimensionLabel(row, column.key) }}\n </span>\n </div>\n }\n </div>\n </div>\n </td>\n </ng-container>\n }\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n </table>\n</section>\n\n<ng-template #tableHeader let-column=\"column\">\n <div class=\"mapa-group-report__header\">\n {{ column.label }}\n @if (column.sort) {\n <div>\n <mat-icon>filter_list</mat-icon>\n </div>\n }\n </div>\n</ng-template>\n", styles: [":host ::ng-deep .mapa-group-report{width:100%;white-space:nowrap}:host ::ng-deep .mapa-group-report__header{font-size:14px!important;justify-content:flex-start!important;gap:10px}:host ::ng-deep .mapa-group-report__header mat-icon{font-size:16px!important;height:16px!important;width:16px!important;margin-left:8px}:host ::ng-deep .mapa-group-report__column{display:flex;align-items:center}:host ::ng-deep .mapa-group-report__column--center-cell{display:flex;align-items:center;justify-content:center;width:100%}:host ::ng-deep .mapa-group-report__content--value{margin-right:40px}:host ::ng-deep .mapa-group-report__content--title{color:#000;text-align:left;font-family:var(--mapa-font-heading, \"Asap\", \"Inter\", sans-serif);font-size:14px;font-style:normal;font-weight:500;line-height:20px}:host ::ng-deep .mapa-group-report__content--subtitle{color:#77838f;text-align:left;font-family:var(--mapa-font-heading, \"Asap\", \"Inter\", sans-serif);font-size:12px;font-style:normal;font-weight:400;line-height:16px}:host ::ng-deep .mapa-group-report__hover:hover--main{display:none}:host ::ng-deep .mapa-group-report__hover:hover--hidden{display:flex}:host ::ng-deep .mapa-group-report__hover--hidden{display:none}:host ::ng-deep .mapa-group-report__header{display:flex;align-items:center;justify-content:center;width:100%}:host ::ng-deep .mapa-group-report .mat-sort-header-arrow{display:none}:host ::ng-deep .mapa-group-report .mat-sort-header-content{width:100%!important}:host ::ng-deep .mapa-group-report .general{border-radius:24px;border:1px solid #dcdcde;display:flex;justify-content:center;align-items:center;width:48px;height:48px}\n"] }]
|
|
142
142
|
}], propDecorators: { groupReport: [{
|
|
143
143
|
type: Input
|
|
144
144
|
}], showGroupReportGeneral: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapa-library-ui-src-lib-components-group-report.mjs","sources":["../../../projects/mapa-library-ui/src/lib/components/group-report/src/group-report.component.ts","../../../projects/mapa-library-ui/src/lib/components/group-report/src/group-report.component.html","../../../projects/mapa-library-ui/src/lib/components/group-report/public-api.ts","../../../projects/mapa-library-ui/src/group-report.ts","../../../projects/mapa-library-ui/src/mapa-library-ui-src-lib-components-group-report.ts"],"sourcesContent":["import { CommonModule } from \"@angular/common\";\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n Output,\n SimpleChanges,\n ViewChild,\n} from \"@angular/core\";\nimport { MatIconModule } from \"@angular/material/icon\";\nimport { MatSort, Sort } from \"@angular/material/sort\";\nimport { MatSortModule } from \"@angular/material/sort\";\nimport { MatTableDataSource } from \"@angular/material/table\";\nimport { MatTableModule } from \"@angular/material/table\";\nimport { Classification } from \"../../../core/interfaces/classification.interface\";\nimport { TableColumn } from \"../../../core/interfaces/table-column.interface\";\nimport {\n Dimension,\n GroupReportDimensionCell,\n GroupReportItem,\n GroupReportRow,\n GroupReportRowValue,\n} from \"./group-report-interface\";\n\n@Component({\n selector: \"mapa-group-report\",\n templateUrl: \"./group-report.component.html\",\n styleUrl: \"./group-report.component.scss\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [CommonModule, MatIconModule, MatTableModule, MatSortModule],\n standalone: true,\n})\nexport class MapaGroupReportComponent implements OnChanges, AfterViewInit {\n @Input() groupReport: GroupReportItem[] = [];\n @Input() showGroupReportGeneral = false;\n @Output() onSortChange: EventEmitter<Sort> = new EventEmitter<Sort>();\n\n @ViewChild(MatSort) sort!: MatSort;\n\n dataSource: MatTableDataSource<GroupReportRow> =\n new MatTableDataSource<GroupReportRow>([]);\n displayedColumns: string[] = [];\n columns: TableColumn[] = [];\n data: GroupReportRow[] = [];\n\n ngAfterViewInit(): void {\n this.dataSource.sort = this.sort;\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes[\"groupReport\"] || changes[\"showGroupReportGeneral\"]) {\n this.refreshTableState();\n }\n }\n\n trackColumn(index: number, column: TableColumn): string {\n return `${index}:${column.key}`;\n }\n\n handleSortChange(sort: Sort): void {\n this.onSortChange.emit(sort);\n }\n\n getDimensionCell(\n row: GroupReportRow,\n key: string\n ): GroupReportDimensionCell | undefined {\n const cell = row[key];\n return this.isGroupReportDimensionCell(cell) ? cell : undefined;\n }\n\n getDimensionClassification(\n row: GroupReportRow,\n key: string\n ): Classification | undefined {\n return this.getDimensionCell(row, key)?.value?.classification;\n }\n\n getDimensionLabel(row: GroupReportRow, key: string): number | string {\n return this.getDimensionCell(row, key)?.value?.label ?? \"-\";\n }\n\n getGeneralValue(row: GroupReportRow): number | null {\n return typeof row.general === \"number\" ? row.general : null;\n }\n\n private refreshTableState(): void {\n this.columns = this.generateColumns();\n this.data = this.generateGroupData();\n this.displayedColumns = this.columns.map((column) => column.key);\n this.dataSource.data = this.data;\n this.dataSource.sortingDataAccessor = (\n row: GroupReportRow,\n columnKey: string\n ): string | number => this.getSortValue(row, columnKey);\n if (this.sort) {\n this.dataSource.sort = this.sort;\n }\n }\n\n private getSortValue(row: GroupReportRow, columnKey: string): string | number {\n const cell = row[columnKey];\n\n if (this.isGroupReportDimensionCell(cell)) {\n return cell.value?.classification?.classificationId ?? 0;\n }\n\n return typeof cell === \"number\" || typeof cell === \"string\" ? cell : \"\";\n }\n\n private isGroupReportDimensionCell(\n value: GroupReportRowValue\n ): value is GroupReportDimensionCell {\n return typeof value === \"object\" && value !== null && \"direction\" in value;\n }\n\n private generateColumns(): TableColumn[] {\n const columns: TableColumn[] = [{ key: \"name\", label: \"\", sort: false }];\n const existingKeys = new Set<string>([\"name\"]);\n\n if (this.showGroupReportGeneral) {\n columns.push({ key: \"general\", label: \"% Geral\", sort: false });\n existingKeys.add(\"general\");\n }\n\n this.groupReport.forEach((reportItem) => {\n reportItem.dimensions?.forEach((dimension) => {\n const key = this.getColumnKey(dimension.dimensionName);\n if (!existingKeys.has(key)) {\n columns.push({\n key,\n label: dimension.dimensionName,\n classification: dimension.classification,\n sort: true,\n });\n existingKeys.add(key);\n }\n });\n });\n\n return columns;\n }\n\n private generateGroupData(): GroupReportRow[] {\n return this.groupReport.map((item) => {\n const dataItem: GroupReportRow = {\n name: item.candidate.name,\n cpf: item.candidate.cpf,\n general: item.candidate.general,\n };\n\n item.dimensions?.forEach((dimension) => {\n dataItem[this.getColumnKey(dimension.dimensionName)] = {\n value: {\n label: this.getDimensionDisplayValue(dimension),\n classification: this.getDimensionClassificationFromDimension(dimension),\n },\n direction: dimension.direction,\n };\n });\n\n return dataItem;\n });\n }\n\n private getColumnKey(dimensionName: string): string {\n return dimensionName.toLowerCase();\n }\n\n private getDimensionDisplayValue(\n dimension: Dimension\n ): number | string | undefined {\n return (\n dimension.escoreT ??\n dimension.average ??\n dimension.percentil ??\n dimension.percentage ??\n dimension.count\n );\n }\n\n private getDimensionClassificationFromDimension(\n dimension: Dimension\n ): Classification | undefined {\n if (dimension.classification) {\n return dimension.classification;\n }\n\n if (\n dimension.classificationId === undefined &&\n !dimension.classificationName &&\n !dimension.classificationColor\n ) {\n return undefined;\n }\n\n return {\n classificationId: dimension.classificationId,\n classificationName: dimension.classificationName,\n classificationColor: dimension.classificationColor,\n };\n }\n}\n\n\n\n","<section class=\"mapa-group-report\">\n <table\n mat-table\n [dataSource]=\"dataSource\"\n matSort\n (matSortChange)=\"handleSortChange($event)\"\n >\n @for (column of columns; track trackColumn($index, column)) {\n <ng-container [matColumnDef]=\"column.key\">\n <th\n mat-header-cell\n *matHeaderCellDef\n mat-sort-header\n [disabled]=\"!column.sort\"\n >\n <div\n [ngTemplateOutlet]=\"tableHeader\"\n [ngTemplateOutletContext]=\"{ column: column }\"\n ></div>\n </th>\n <td mat-cell *matCellDef=\"let row\" [style.width]=\"column.width\">\n <div\n class=\"mapa-group-report__column\"\n [class.mapa-group-report__column--center-cell]=\"column.align === 'center' || column.key !== 'name'\"\n >\n <div class=\"mapa-group-report__content\">\n @if (column.key === \"name\") {\n <div class=\"mapa-group-report__content--value\">\n <div class=\"mapa-group-report__content--title\">\n {{ row.name }}<br />\n </div>\n <div class=\"mapa-group-report__content--subtitle\">\n {{ row.cpf }}\n </div>\n </div>\n } @else if (column.key === \"general\") {\n <div class=\"general\">\n {{ getGeneralValue(row) | currency:'':'' }}%\n </div>\n } @else {\n <div class=\"mapa-group-report__hover\">\n <span class=\"mapa-group-report__hover--main\">\n <div\n class=\"mapa__tag--bg\"\n [class.mapa__tag--contrast]=\"getDimensionClassification(row, column.key)?.classificationId === 1\"\n [style.backgroundColor]=\"getDimensionClassification(row, column.key)?.classificationColor\"\n >\n {{\n getDimensionClassification(row, column.key)?.classificationName ||\n \"-\"\n }}\n </div>\n </span>\n <span class=\"mapa-group-report__hover--hidden\">\n {{ getDimensionLabel(row, column.key) }}\n </span>\n </div>\n }\n </div>\n </div>\n </td>\n </ng-container>\n }\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n </table>\n</section>\n\n<ng-template #tableHeader let-column=\"column\">\n <div class=\"mapa-group-report__header\">\n {{ column.label }}\n @if (column.sort) {\n <div>\n <mat-icon>filter_list</mat-icon>\n </div>\n }\n </div>\n</ng-template>\n","/*\n * Public API Surface of mapa-library-ui group-report\n */\n\nexport * from './src/group-report.component';\nexport * from './src/group-report-interface';\n","/*\n * Public API Surface of mapa-library-ui group-report\n */\nexport * from './lib/components/group-report/public-api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './group-report';\n"],"names":[],"mappings":";;;;;;;;;;;MAmCa,wBAAwB,CAAA;AARrC,IAAA,WAAA,GAAA;QASW,IAAA,CAAA,WAAW,GAAsB,EAAE;QACnC,IAAA,CAAA,sBAAsB,GAAG,KAAK;AAC7B,QAAA,IAAA,CAAA,YAAY,GAAuB,IAAI,YAAY,EAAQ;AAIrE,QAAA,IAAA,CAAA,UAAU,GACR,IAAI,kBAAkB,CAAiB,EAAE,CAAC;QAC5C,IAAA,CAAA,gBAAgB,GAAa,EAAE;QAC/B,IAAA,CAAA,OAAO,GAAkB,EAAE;QAC3B,IAAA,CAAA,IAAI,GAAqB,EAAE;AA+J5B,IAAA;IA7JC,eAAe,GAAA;QACb,IAAI,CAAC,UAAU,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI;IAClC;AAEA,IAAA,WAAW,CAAC,OAAsB,EAAA;QAChC,IAAI,OAAO,CAAC,aAAa,CAAC,IAAI,OAAO,CAAC,wBAAwB,CAAC,EAAE;YAC/D,IAAI,CAAC,iBAAiB,EAAE;QAC1B;IACF;IAEA,WAAW,CAAC,KAAa,EAAE,MAAmB,EAAA;AAC5C,QAAA,OAAO,GAAG,KAAK,CAAA,CAAA,EAAI,MAAM,CAAC,GAAG,EAAE;IACjC;AAEA,IAAA,gBAAgB,CAAC,IAAU,EAAA;AACzB,QAAA,IA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E,aAAa,CAAC,cACzD,IAAI,EAAA,QAAA,EAAA,g3FAAA,EAAA,MAAA,EAAA,CAAA,m3CAAA,CAAA,EAAA;;sBAGf;;sBACA;;sBACA;;sBAEA,SAAS;uBAAC,OAAO;;;AExCpB;;AAEG;;ACFH;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"mapa-library-ui-src-lib-components-group-report.mjs","sources":["../../../projects/mapa-library-ui/src/lib/components/group-report/src/group-report.component.ts","../../../projects/mapa-library-ui/src/lib/components/group-report/src/group-report.component.html","../../../projects/mapa-library-ui/src/lib/components/group-report/public-api.ts","../../../projects/mapa-library-ui/src/group-report.ts","../../../projects/mapa-library-ui/src/mapa-library-ui-src-lib-components-group-report.ts"],"sourcesContent":["import { CommonModule } from \"@angular/common\";\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n Output,\n SimpleChanges,\n ViewChild,\n} from \"@angular/core\";\nimport { MatIconModule } from \"@angular/material/icon\";\nimport { MatSort, Sort } from \"@angular/material/sort\";\nimport { MatSortModule } from \"@angular/material/sort\";\nimport { MatTableDataSource } from \"@angular/material/table\";\nimport { MatTableModule } from \"@angular/material/table\";\nimport { Classification } from \"../../../core/interfaces/classification.interface\";\nimport { TableColumn } from \"../../../core/interfaces/table-column.interface\";\nimport {\n Dimension,\n GroupReportDimensionCell,\n GroupReportItem,\n GroupReportRow,\n GroupReportRowValue,\n} from \"./group-report-interface\";\n\n@Component({\n selector: \"mapa-group-report\",\n templateUrl: \"./group-report.component.html\",\n styleUrl: \"./group-report.component.scss\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [CommonModule, MatIconModule, MatTableModule, MatSortModule],\n standalone: true,\n})\nexport class MapaGroupReportComponent implements OnChanges, AfterViewInit {\n @Input() groupReport: GroupReportItem[] = [];\n @Input() showGroupReportGeneral = false;\n @Output() onSortChange: EventEmitter<Sort> = new EventEmitter<Sort>();\n\n @ViewChild(MatSort) sort!: MatSort;\n\n dataSource: MatTableDataSource<GroupReportRow> =\n new MatTableDataSource<GroupReportRow>([]);\n displayedColumns: string[] = [];\n columns: TableColumn[] = [];\n data: GroupReportRow[] = [];\n\n ngAfterViewInit(): void {\n this.dataSource.sort = this.sort;\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes[\"groupReport\"] || changes[\"showGroupReportGeneral\"]) {\n this.refreshTableState();\n }\n }\n\n trackColumn(index: number, column: TableColumn): string {\n return `${index}:${column.key}`;\n }\n\n handleSortChange(sort: Sort): void {\n this.onSortChange.emit(sort);\n }\n\n getDimensionCell(\n row: GroupReportRow,\n key: string\n ): GroupReportDimensionCell | undefined {\n const cell = row[key];\n return this.isGroupReportDimensionCell(cell) ? cell : undefined;\n }\n\n getDimensionClassification(\n row: GroupReportRow,\n key: string\n ): Classification | undefined {\n return this.getDimensionCell(row, key)?.value?.classification;\n }\n\n getDimensionLabel(row: GroupReportRow, key: string): number | string {\n return this.getDimensionCell(row, key)?.value?.label ?? \"-\";\n }\n\n getGeneralValue(row: GroupReportRow): number | null {\n return typeof row.general === \"number\" ? row.general : null;\n }\n\n private refreshTableState(): void {\n this.columns = this.generateColumns();\n this.data = this.generateGroupData();\n this.displayedColumns = this.columns.map((column) => column.key);\n this.dataSource.data = this.data;\n this.dataSource.sortingDataAccessor = (\n row: GroupReportRow,\n columnKey: string\n ): string | number => this.getSortValue(row, columnKey);\n if (this.sort) {\n this.dataSource.sort = this.sort;\n }\n }\n\n private getSortValue(row: GroupReportRow, columnKey: string): string | number {\n const cell = row[columnKey];\n\n if (this.isGroupReportDimensionCell(cell)) {\n return cell.value?.classification?.classificationId ?? 0;\n }\n\n return typeof cell === \"number\" || typeof cell === \"string\" ? cell : \"\";\n }\n\n private isGroupReportDimensionCell(\n value: GroupReportRowValue\n ): value is GroupReportDimensionCell {\n return typeof value === \"object\" && value !== null && \"direction\" in value;\n }\n\n private generateColumns(): TableColumn[] {\n const columns: TableColumn[] = [{ key: \"name\", label: \"\", sort: false }];\n const existingKeys = new Set<string>([\"name\"]);\n\n if (this.showGroupReportGeneral) {\n columns.push({ key: \"general\", label: \"% Geral\", sort: false });\n existingKeys.add(\"general\");\n }\n\n this.groupReport.forEach((reportItem) => {\n reportItem.dimensions?.forEach((dimension) => {\n const key = this.getColumnKey(dimension.dimensionName);\n if (!existingKeys.has(key)) {\n columns.push({\n key,\n label: dimension.dimensionName,\n classification: dimension.classification,\n sort: true,\n });\n existingKeys.add(key);\n }\n });\n });\n\n return columns;\n }\n\n private generateGroupData(): GroupReportRow[] {\n return this.groupReport.map((item) => {\n const dataItem: GroupReportRow = {\n name: item.candidate.name,\n cpf: item.candidate.cpf,\n general: item.candidate.general,\n };\n\n item.dimensions?.forEach((dimension) => {\n dataItem[this.getColumnKey(dimension.dimensionName)] = {\n value: {\n label: this.getDimensionDisplayValue(dimension),\n classification: this.getDimensionClassificationFromDimension(dimension),\n },\n direction: dimension.direction,\n };\n });\n\n return dataItem;\n });\n }\n\n private getColumnKey(dimensionName: string): string {\n return dimensionName.toLowerCase();\n }\n\n private getDimensionDisplayValue(\n dimension: Dimension\n ): number | string | undefined {\n return (\n dimension.escoreT ??\n dimension.average ??\n dimension.percentil ??\n dimension.percentage ??\n dimension.count\n );\n }\n\n private getDimensionClassificationFromDimension(\n dimension: Dimension\n ): Classification | undefined {\n if (dimension.classification) {\n return dimension.classification;\n }\n\n if (\n dimension.classificationId === undefined &&\n !dimension.classificationName &&\n !dimension.classificationColor\n ) {\n return undefined;\n }\n\n return {\n classificationId: dimension.classificationId,\n classificationName: dimension.classificationName,\n classificationColor: dimension.classificationColor,\n };\n }\n}\n\n\n\n","<section class=\"mapa-group-report\">\n <table\n mat-table\n [dataSource]=\"dataSource\"\n matSort\n (matSortChange)=\"handleSortChange($event)\"\n >\n @for (column of columns; track trackColumn($index, column)) {\n <ng-container [matColumnDef]=\"column.key\">\n <th\n mat-header-cell\n *matHeaderCellDef\n mat-sort-header\n [disabled]=\"!column.sort\"\n >\n <div\n [ngTemplateOutlet]=\"tableHeader\"\n [ngTemplateOutletContext]=\"{ column: column }\"\n ></div>\n </th>\n <td mat-cell *matCellDef=\"let row\" [style.width]=\"column.width\">\n <div\n class=\"mapa-group-report__column\"\n [class.mapa-group-report__column--center-cell]=\"column.align === 'center' || column.key !== 'name'\"\n >\n <div class=\"mapa-group-report__content\">\n @if (column.key === \"name\") {\n <div class=\"mapa-group-report__content--value\">\n <div class=\"mapa-group-report__content--title\">\n {{ row.name }}<br />\n </div>\n <div class=\"mapa-group-report__content--subtitle\">\n {{ row.cpf }}\n </div>\n </div>\n } @else if (column.key === \"general\") {\n <div class=\"general\">\n {{ getGeneralValue(row) | currency:'':'' }}%\n </div>\n } @else {\n <div class=\"mapa-group-report__hover\">\n <span class=\"mapa-group-report__hover--main\">\n <div\n class=\"mapa__tag--bg\"\n [class.mapa__tag--contrast]=\"getDimensionClassification(row, column.key)?.classificationId === 1\"\n [style.backgroundColor]=\"getDimensionClassification(row, column.key)?.classificationColor\"\n >\n {{\n getDimensionClassification(row, column.key)?.classificationName ||\n \"-\"\n }}\n </div>\n </span>\n <span class=\"mapa-group-report__hover--hidden\">\n {{ getDimensionLabel(row, column.key) }}\n </span>\n </div>\n }\n </div>\n </div>\n </td>\n </ng-container>\n }\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n </table>\n</section>\n\n<ng-template #tableHeader let-column=\"column\">\n <div class=\"mapa-group-report__header\">\n {{ column.label }}\n @if (column.sort) {\n <div>\n <mat-icon>filter_list</mat-icon>\n </div>\n }\n </div>\n</ng-template>\n","/*\n * Public API Surface of mapa-library-ui group-report\n */\n\nexport * from './src/group-report.component';\nexport * from './src/group-report-interface';\n","/*\n * Public API Surface of mapa-library-ui group-report\n */\nexport * from './lib/components/group-report/public-api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './group-report';\n"],"names":[],"mappings":";;;;;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AA,CAAA,OAAA,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,eAAA,EAAA,cAAA,EAAA,kBAAA,EAAA,qBAAA,EAAA,iBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,aAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,MAAA,EAAA,CAAA,iBAAA,EAAA,eAAA,EAAA,OAAA,EAAA,UAAA,EAAA,uBAAA,EAAA,cAAA,CAAA,EAAA,QAAA,EAAA,CAAA,eAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,UAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAGzD,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBARpC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,mBAAmB,EAAA,eAAA,EAGZ,uBAAuB,CAAC,MAAM,WACtC,CAAC,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,CAAC,cACzD,IAAI,EAAA,QAAA,EAAA,g3FAAA,EAAA,MAAA,EAAA,CAAA,6mDAAA,CAAA,EAAA;;sBAGf;;sBACA;;sBACA;;sBAEA,SAAS;uBAAC,OAAO;;;AExCpB;;AAEG;;ACFH;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import * as i2 from '@angular/common';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { EventEmitter, Output, Input, Component, InjectionToken, inject, Injector, signal, Optional, Inject, Injectable, DestroyRef,
|
|
4
|
+
import { EventEmitter, Output, Input, Component, InjectionToken, inject, Injector, signal, Optional, Inject, Injectable, ElementRef, DestroyRef, booleanAttribute, Directive, Self, forwardRef } from '@angular/core';
|
|
5
5
|
import * as i2$1 from '@angular/forms';
|
|
6
|
-
import { FormsModule, ReactiveFormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
6
|
+
import { NgControl, FormsModule, ReactiveFormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
7
7
|
import * as i3 from '@angular/material/form-field';
|
|
8
8
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
9
9
|
import * as i4 from '@angular/material/icon';
|
|
10
10
|
import { MatIconModule } from '@angular/material/icon';
|
|
11
11
|
import * as i1 from '@angular/material/input';
|
|
12
12
|
import { MatInputModule } from '@angular/material/input';
|
|
13
|
-
import { NgxMaskDirective, provideNgxMask } from 'ngx-mask';
|
|
13
|
+
import { NgxMaskDirective, NgxMaskService, provideNgxMask } from 'ngx-mask';
|
|
14
14
|
import { toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
15
|
+
import { AutofillMonitor } from '@angular/cdk/text-field';
|
|
16
|
+
import { filter } from 'rxjs/operators';
|
|
15
17
|
import { fromEvent } from 'rxjs';
|
|
16
18
|
|
|
17
19
|
class ButtonComponent {
|
|
@@ -263,6 +265,139 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
263
265
|
type: Input
|
|
264
266
|
}] } });
|
|
265
267
|
|
|
268
|
+
/**
|
|
269
|
+
* Máscaras numéricas cujo valor de modelo não é a simples projeção
|
|
270
|
+
* "texto renderizado menos caracteres especiais". `separator` ainda altera
|
|
271
|
+
* `NgxMaskService.specialCharacters` em runtime, o que quebra a simetria da
|
|
272
|
+
* comparação feita aqui. Nenhuma delas é produzida por autofill.
|
|
273
|
+
*/
|
|
274
|
+
const SKIPPED_MASK_PREFIXES = ['separator', 'percent'];
|
|
275
|
+
/**
|
|
276
|
+
* Mantém o FormControl em sincronia com `input.value` quando o valor foi escrito
|
|
277
|
+
* por algo que não é o usuário: autofill do navegador, gerenciador de senhas ou
|
|
278
|
+
* extensão (geradores de CPF/CNPJ).
|
|
279
|
+
*
|
|
280
|
+
* A NgxMaskDirective é o ControlValueAccessor de todo input com máscara desta
|
|
281
|
+
* biblioteca e só empurra valor para o modelo a partir do seu host listener de
|
|
282
|
+
* `input`. O handler de `blur` chama `onTouch()` mas nunca `onChange()`, e não
|
|
283
|
+
* existe listener de `change`. Um agente externo que atribui `element.value` sem
|
|
284
|
+
* disparar um evento `input` nativo deixa o controle no valor anterior, mantendo
|
|
285
|
+
* o erro `required` na tela até o usuário redigitar o campo.
|
|
286
|
+
*
|
|
287
|
+
* Esta diretiva detecta a divergência e reenvia o evento `input` que faltou,
|
|
288
|
+
* fazendo a NgxMaskDirective analisar, re-renderizar e emitir exatamente como se
|
|
289
|
+
* o usuário tivesse colado o valor. É no-op enquanto DOM e modelo concordam.
|
|
290
|
+
*/
|
|
291
|
+
class MapaMaskAutofillSyncDirective {
|
|
292
|
+
constructor() {
|
|
293
|
+
/** Permite desligar a reconciliação em um campo específico. */
|
|
294
|
+
this.mapaMaskAutofillSync = true;
|
|
295
|
+
this.elementRef = inject(ElementRef);
|
|
296
|
+
this.destroyRef = inject(DestroyRef);
|
|
297
|
+
this.autofillMonitor = inject(AutofillMonitor);
|
|
298
|
+
this.maskDirective = inject(NgxMaskDirective, {
|
|
299
|
+
self: true,
|
|
300
|
+
optional: true,
|
|
301
|
+
});
|
|
302
|
+
this.maskService = inject(NgxMaskService, {
|
|
303
|
+
self: true,
|
|
304
|
+
optional: true,
|
|
305
|
+
});
|
|
306
|
+
this.ngControl = inject(NgControl, { self: true, optional: true });
|
|
307
|
+
this.reconciling = false;
|
|
308
|
+
}
|
|
309
|
+
ngOnInit() {
|
|
310
|
+
// monitor() é idempotente por elemento e devolve um Subject compartilhado
|
|
311
|
+
// com o MatInput, que já monitora este mesmo elemento. Nunca chamar
|
|
312
|
+
// stopMonitoring(): ele completa esse Subject e remove o listener de
|
|
313
|
+
// animação para todos os consumidores. O MatInput cuida do teardown.
|
|
314
|
+
this.autofillMonitor
|
|
315
|
+
.monitor(this.elementRef.nativeElement)
|
|
316
|
+
.pipe(filter((event) => event.isAutofilled), takeUntilDestroyed(this.destroyRef))
|
|
317
|
+
.subscribe(() => this.reconcile());
|
|
318
|
+
}
|
|
319
|
+
/** Idempotente: não faz nada enquanto DOM e modelo concordam. */
|
|
320
|
+
reconcile() {
|
|
321
|
+
if (!this.mapaMaskAutofillSync || this.reconciling) {
|
|
322
|
+
return;
|
|
323
|
+
}
|
|
324
|
+
const element = this.elementRef.nativeElement;
|
|
325
|
+
// ngControl.control só existe depois do ngOnChanges da FormControlDirective,
|
|
326
|
+
// por isso é lido aqui e não no construtor.
|
|
327
|
+
const control = this.ngControl?.control;
|
|
328
|
+
if (!control || control.disabled || element.readOnly) {
|
|
329
|
+
return;
|
|
330
|
+
}
|
|
331
|
+
if (element instanceof HTMLInputElement && element.type === 'number') {
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
334
|
+
const mask = this.maskDirective?.mask() ?? '';
|
|
335
|
+
if (SKIPPED_MASK_PREFIXES.some((prefix) => mask.startsWith(prefix))) {
|
|
336
|
+
return;
|
|
337
|
+
}
|
|
338
|
+
if (this.isInSync(element, control, mask)) {
|
|
339
|
+
return;
|
|
340
|
+
}
|
|
341
|
+
const previousValue = control.value;
|
|
342
|
+
this.reconciling = true;
|
|
343
|
+
try {
|
|
344
|
+
// Reenvia o que o navegador deveria ter emitido. A NgxMaskDirective relê
|
|
345
|
+
// element.value, reaplica a máscara, re-renderiza o campo e empurra o
|
|
346
|
+
// valor pelo seu próprio pipeline de CVA — marcando o controle como dirty
|
|
347
|
+
// e reexecutando todos os validadores.
|
|
348
|
+
element.dispatchEvent(new Event('input', { bubbles: true }));
|
|
349
|
+
if (control.value === previousValue) {
|
|
350
|
+
// O evento não moveu o modelo. Acontece com controles criados como
|
|
351
|
+
// { updateOn: 'blur' | 'submit' }, em que o value accessor apenas
|
|
352
|
+
// enfileira a mudança em vez de comitá-la.
|
|
353
|
+
control.setValue(this.toModelValue(element.value, mask));
|
|
354
|
+
control.markAsDirty();
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
finally {
|
|
358
|
+
this.reconciling = false;
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
isInSync(element, control, mask) {
|
|
362
|
+
return (this.toComparable(element.value, mask) ===
|
|
363
|
+
this.toComparable(this.stringify(control.value), mask));
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* Sem máscara, o texto renderizado e o valor de modelo são a mesma string. Com
|
|
367
|
+
* máscara eles diferem apenas pelos caracteres especiais, então limpar os dois
|
|
368
|
+
* lados com as regras da própria NgxMaskService vale tanto para
|
|
369
|
+
* `dropSpecialCharacters: true` quanto para `false`.
|
|
370
|
+
*/
|
|
371
|
+
toComparable(value, mask) {
|
|
372
|
+
return mask && this.maskService ? this.maskService.removeMask(value) : value;
|
|
373
|
+
}
|
|
374
|
+
toModelValue(domValue, mask) {
|
|
375
|
+
return mask && this.maskService && this.maskService.dropSpecialCharacters
|
|
376
|
+
? this.maskService.removeMask(domValue)
|
|
377
|
+
: domValue;
|
|
378
|
+
}
|
|
379
|
+
stringify(value) {
|
|
380
|
+
return value === null || value === undefined ? '' : String(value);
|
|
381
|
+
}
|
|
382
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaMaskAutofillSyncDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
383
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.3.21", type: MapaMaskAutofillSyncDirective, isStandalone: true, selector: "input[mask], textarea[mask]", inputs: { mapaMaskAutofillSync: ["mapaMaskAutofillSync", "mapaMaskAutofillSync", booleanAttribute] }, host: { listeners: { "change": "reconcile()", "focusout": "reconcile()" } }, exportAs: ["mapaMaskAutofillSync"], ngImport: i0 }); }
|
|
384
|
+
}
|
|
385
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaMaskAutofillSyncDirective, decorators: [{
|
|
386
|
+
type: Directive,
|
|
387
|
+
args: [{
|
|
388
|
+
selector: 'input[mask], textarea[mask]',
|
|
389
|
+
standalone: true,
|
|
390
|
+
exportAs: 'mapaMaskAutofillSync',
|
|
391
|
+
host: {
|
|
392
|
+
'(change)': 'reconcile()',
|
|
393
|
+
'(focusout)': 'reconcile()',
|
|
394
|
+
},
|
|
395
|
+
}]
|
|
396
|
+
}], propDecorators: { mapaMaskAutofillSync: [{
|
|
397
|
+
type: Input,
|
|
398
|
+
args: [{ transform: booleanAttribute }]
|
|
399
|
+
}] } });
|
|
400
|
+
|
|
266
401
|
/*
|
|
267
402
|
* Originally from: https://github.com/anotherkitten/mat-input-autosize
|
|
268
403
|
* @author: Ellie Larson (anotherkitten)
|
|
@@ -389,7 +524,7 @@ class MapaInputComponent {
|
|
|
389
524
|
useExisting: forwardRef(() => MapaInputComponent),
|
|
390
525
|
multi: true,
|
|
391
526
|
},
|
|
392
|
-
], ngImport: i0, template: "<label *ngIf=\"element.label\" class=\"mapa-input__label\">\n {{ element.label }}\n</label>\n<div class=\"mapa-form--inline\">\n <mat-form-field\n class=\"mapa-input\"\n [class.mapa-input--autosize]=\"element.autosize\"\n appearance=\"outline\"\n subscriptSizing=\"dynamic\"\n >\n <mat-icon *ngIf=\"element.prefix\" class=\"mapa-input--prefix\" matPrefix>\n {{ element.prefix }}\n </mat-icon>\n <input\n *ngIf=\"element.autosize\"\n matInput\n matInputAutosize\n [matInputAutosizeMinWidth]=\"element.autosizeMinWidth!\"\n [matInputAutosizeMaxWidth]=\"element.autosizeMaxWidth!\"\n [formControl]=\"formControl\"\n [placeholder]=\"element.placeholder || element.label\"\n [maxlength]=\"element.maxLength\"\n (keydown.enter)=\"suffixEmit()\"\n [type]=\"type\"\n [mask]=\"element.mask\"\n thousandSeparator=\".\"\n decimalMarker=\",\"\n [autocomplete]=\"element.autocomplete\"\n [readOnly]=\"element.readonly\"\n />\n <input\n matInput\n *ngIf=\"!element.autosize\"\n [formControl]=\"formControl\"\n [placeholder]=\"element.placeholder || element.label\"\n [maxlength]=\"element.maxLength\"\n (keydown.enter)=\"suffixEmit()\"\n [type]=\"type\"\n [mask]=\"element.mask\"\n [autocomplete]=\"element.autocomplete\"\n [readOnly]=\"element.readonly\"\n />\n <button\n *ngIf=\"hasValue() && !formControl.disabled && element.clearValue\"\n type=\"button\"\n matSuffix\n aria-label=\"Limpar\"\n (click)=\"clearValue()\"\n class=\"mapa-input--close\"\n >\n ×\n </button>\n <mat-icon\n *ngIf=\"element.suffix\"\n class=\"mapa-input--suffix\"\n matSuffix\n (click)=\"suffix.emit()\"\n >\n {{ element.suffix }}\n </mat-icon>\n <mat-hint *ngIf=\"element.hint\">{{ element.hint }}</mat-hint>\n <mat-error>\n <mapa-form-errors\n [control]=\"formControl\"\n [errors]=\"element.errors\"\n ></mapa-form-errors>\n </mat-error>\n </mat-form-field>\n\n <div *ngIf=\"element.actionButton\" class=\"mapa-form--action\">\n <mapa-button\n color=\"basic\"\n (clicked)=\"element.actionButton.action.emit(true)\"\n >\n {{ element.actionButton.label }}\n </mapa-button>\n </div>\n</div>\n", styles: [":host{display:inline-block;max-width:100%;min-width:0;box-sizing:border-box}.mapa-input{width:310px;max-width:100%;min-width:0;box-sizing:border-box}.mapa-input--autosize{width:auto;--mapa-input-autosize-preferred-width: 310px}.mapa-input__label{font-family:var(--mapa-font-heading, \"Asap\", \"Inter\", sans-serif);display:block;font-size:12px;font-style:normal;font-weight:600;line-height:16px;text-transform:uppercase;margin-bottom:16px}:host ::ng-deep .mapa-input--autosize .mat-mdc-form-field-infix{overflow:hidden}:host ::ng-deep .mapa-input .mat-mdc-form-field-error-wrapper,:host ::ng-deep .mapa-input .mat-mdc-form-field-hint-wrapper,:host ::ng-deep .mapa-input .mat-mdc-form-field-subscript-wrapper{padding:0!important}:host ::ng-deep .mapa-input .mat-mdc-form-field-error{margin:8px 0 0;padding-left:4px;color:#b54242;font-size:13px;line-height:18px}:host ::ng-deep .mapa-input .mat-mdc-form-field-error:before{display:none}:host ::ng-deep .mapa-input .mat-mdc-form-field-hint{display:block;margin:8px 0 0;padding-left:4px;color:var(--mapa-color-muted, #555555);font-size:13px;line-height:18px}:host ::ng-deep .mapa-input .mat-mdc-form-field-hint:before{display:none}:host ::ng-deep .mapa-input .mat-mdc-input-element{font-family:var(--mapa-font-body, \"Asap\", \"Roboto\", \"Inter\", sans-serif);font-size:16px;font-style:normal;font-weight:400}:host ::ng-deep .mapa-input .mat-mdc-form-field-flex{height:48px!important}:host ::ng-deep .mapa-input .mat-mdc-text-field-wrapper{background-color:var(--mapa-color-surface, #ffffff);border-radius:var(--mapa-radius-sm, 12px);height:48px}:host ::ng-deep .mapa-input .mat-mdc-text-field-wrapper.mdc-text-field--outlined{padding-left:unset!important;padding-right:unset!important}:host ::ng-deep .mapa-input .mdc-notched-outline{background-color:transparent;border-radius:var(--mapa-radius-sm, 12px)}:host ::ng-deep .mapa-input .mdc-text-field--outlined .mat-mdc-form-field-infix{padding-bottom:12px;padding-top:16px;--mat-form-field-container-height: 48px}:host ::ng-deep .mapa-input .mdc-text-field--outlined{--mat-form-field-outlined-container-shape: var(--mapa-radius-sm, 12px);--mat-form-field-outlined-outline-color: var( --mapa-color-border, rgba(26, 26, 26, .18) );--mat-form-field-outlined-hover-outline-color: var( --mapa-color-border, rgba(26, 26, 26, .18) );--mat-form-field-outlined-focus-outline-color: var( --mapa-color-accent, #ff560b );--mat-form-field-outlined-outline-width: 1px;--mat-form-field-outlined-focus-outline-width: 1px}:host ::ng-deep .mapa-input .mdc-notched-outline__leading,:host ::ng-deep .mapa-input .mdc-notched-outline__notch,:host ::ng-deep .mapa-input .mdc-notched-outline__trailing{border-width:1px!important}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix{display:flex}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix .mapa-input--close{display:flex;flex:0 0 20px;align-items:center;justify-content:center;width:20px;height:20px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--mapa-color-muted, #555555);font-family:inherit;font-size:16px;line-height:1;cursor:pointer}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix .mapa-input--close:hover{background:#1a1a1a14;color:var(--mapa-color-ink, #1a1a1a)}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix .mapa-input--close:last-child{margin-right:12px}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix .mapa-input--suffix{padding:0 0 0 8px}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix .mat-icon:last-child{padding-right:12px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: NgxMaskDirective, selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "clearIfNotMatch", "validation", "separatorLimit", "allowNegativeNumbers", "leadZeroDateTime", "leadZero", "triggerOnMaskChange", "apm", "inputTransformFn", "outputTransformFn", "keepCharacterPositions", "instantPrefix"], outputs: ["maskFilled"], exportAs: ["mask", "ngxMask"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: ButtonComponent, selector: "mapa-button", inputs: ["color", "disabled"], outputs: ["clicked"] }, { kind: "directive", type: MatInputAutosizeDirective, selector: "[matInputAutosize]", inputs: ["matInputAutosizeMaxWidth", "matInputAutosizeMinWidth", "matInputAutosizeFontStyle"] }, { kind: "component", type: MapaFormErrorsComponent, selector: "mapa-form-errors", inputs: ["control", "errors"] }] }); }
|
|
527
|
+
], ngImport: i0, template: "<label *ngIf=\"element.label\" class=\"mapa-input__label\">\n {{ element.label }}\n</label>\n<div class=\"mapa-form--inline\">\n <mat-form-field\n class=\"mapa-input\"\n [class.mapa-input--autosize]=\"element.autosize\"\n appearance=\"outline\"\n subscriptSizing=\"dynamic\"\n >\n <mat-icon *ngIf=\"element.prefix\" class=\"mapa-input--prefix\" matPrefix>\n {{ element.prefix }}\n </mat-icon>\n <input\n *ngIf=\"element.autosize\"\n matInput\n matInputAutosize\n [matInputAutosizeMinWidth]=\"element.autosizeMinWidth!\"\n [matInputAutosizeMaxWidth]=\"element.autosizeMaxWidth!\"\n [formControl]=\"formControl\"\n [placeholder]=\"element.placeholder || element.label\"\n [maxlength]=\"element.maxLength\"\n (keydown.enter)=\"suffixEmit()\"\n [type]=\"type\"\n [mask]=\"element.mask\"\n thousandSeparator=\".\"\n decimalMarker=\",\"\n [autocomplete]=\"element.autocomplete\"\n [readOnly]=\"element.readonly\"\n />\n <input\n matInput\n *ngIf=\"!element.autosize\"\n [formControl]=\"formControl\"\n [placeholder]=\"element.placeholder || element.label\"\n [maxlength]=\"element.maxLength\"\n (keydown.enter)=\"suffixEmit()\"\n [type]=\"type\"\n [mask]=\"element.mask\"\n [autocomplete]=\"element.autocomplete\"\n [readOnly]=\"element.readonly\"\n />\n <button\n *ngIf=\"hasValue() && !formControl.disabled && element.clearValue\"\n type=\"button\"\n tabindex=\"-1\"\n matSuffix\n aria-label=\"Limpar\"\n (click)=\"clearValue()\"\n class=\"mapa-input--close\"\n >\n ×\n </button>\n <mat-icon\n *ngIf=\"element.suffix\"\n class=\"mapa-input--suffix\"\n matSuffix\n (click)=\"suffix.emit()\"\n >\n {{ element.suffix }}\n </mat-icon>\n <mat-hint *ngIf=\"element.hint\">{{ element.hint }}</mat-hint>\n <mat-error>\n <mapa-form-errors\n [control]=\"formControl\"\n [errors]=\"element.errors\"\n ></mapa-form-errors>\n </mat-error>\n </mat-form-field>\n\n <div *ngIf=\"element.actionButton\" class=\"mapa-form--action\">\n <mapa-button\n color=\"basic\"\n (clicked)=\"element.actionButton.action.emit(true)\"\n >\n {{ element.actionButton.label }}\n </mapa-button>\n </div>\n</div>\n", styles: [":host{display:inline-block;max-width:100%;min-width:0;box-sizing:border-box}.mapa-input{width:310px;max-width:100%;min-width:0;box-sizing:border-box}.mapa-input--autosize{width:auto;--mapa-input-autosize-preferred-width: 310px}.mapa-input__label{font-family:var(--mapa-font-heading, \"Asap\", \"Inter\", sans-serif);display:block;font-size:12px;font-style:normal;font-weight:600;line-height:16px;text-transform:uppercase;margin-bottom:16px}:host ::ng-deep .mapa-input--autosize .mat-mdc-form-field-infix{overflow:hidden}:host ::ng-deep .mapa-input .mat-mdc-form-field-error-wrapper,:host ::ng-deep .mapa-input .mat-mdc-form-field-hint-wrapper,:host ::ng-deep .mapa-input .mat-mdc-form-field-subscript-wrapper{padding:0!important}:host ::ng-deep .mapa-input .mat-mdc-form-field-error{margin:8px 0 0;padding-left:4px;color:#b54242;font-size:13px;line-height:18px}:host ::ng-deep .mapa-input .mat-mdc-form-field-error:before{display:none}:host ::ng-deep .mapa-input .mat-mdc-form-field-hint{display:block;margin:8px 0 0;padding-left:4px;color:var(--mapa-color-muted, #555555);font-size:13px;line-height:18px}:host ::ng-deep .mapa-input .mat-mdc-form-field-hint:before{display:none}:host ::ng-deep .mapa-input .mat-mdc-input-element{font-family:var(--mapa-font-body, \"Asap\", \"Roboto\", \"Inter\", sans-serif);font-size:16px;font-style:normal;font-weight:400}:host ::ng-deep .mapa-input .mat-mdc-form-field-flex{height:48px!important}:host ::ng-deep .mapa-input .mat-mdc-text-field-wrapper{background-color:var(--mapa-color-surface, #ffffff);border-radius:var(--mapa-radius-sm, 12px);height:48px}:host ::ng-deep .mapa-input .mat-mdc-text-field-wrapper.mdc-text-field--outlined{padding-left:unset!important;padding-right:unset!important}:host ::ng-deep .mapa-input .mdc-notched-outline{background-color:transparent;border-radius:var(--mapa-radius-sm, 12px)}:host ::ng-deep .mapa-input .mdc-text-field--outlined .mat-mdc-form-field-infix{padding-bottom:12px;padding-top:16px;--mat-form-field-container-height: 48px}:host ::ng-deep .mapa-input .mdc-text-field--outlined{--mat-form-field-outlined-container-shape: var(--mapa-radius-sm, 12px);--mat-form-field-outlined-outline-color: var( --mapa-color-border, rgba(26, 26, 26, .18) );--mat-form-field-outlined-hover-outline-color: var( --mapa-color-border, rgba(26, 26, 26, .18) );--mat-form-field-outlined-focus-outline-color: var( --mapa-color-accent, #ff560b );--mat-form-field-outlined-outline-width: 1px;--mat-form-field-outlined-focus-outline-width: 1px}:host ::ng-deep .mapa-input .mdc-notched-outline__leading,:host ::ng-deep .mapa-input .mdc-notched-outline__notch,:host ::ng-deep .mapa-input .mdc-notched-outline__trailing{border-width:1px!important}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix{display:flex}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix .mapa-input--close{display:flex;flex:0 0 20px;align-items:center;justify-content:center;width:20px;height:20px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--mapa-color-muted, #555555);font-family:inherit;font-size:16px;line-height:1;cursor:pointer}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix .mapa-input--close:hover{background:#1a1a1a14;color:var(--mapa-color-ink, #1a1a1a)}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix .mapa-input--close:last-child{margin-right:12px}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix .mapa-input--suffix{padding:0 0 0 8px}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix .mat-icon:last-child{padding-right:12px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: NgxMaskDirective, selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "clearIfNotMatch", "validation", "separatorLimit", "allowNegativeNumbers", "leadZeroDateTime", "leadZero", "triggerOnMaskChange", "apm", "inputTransformFn", "outputTransformFn", "keepCharacterPositions", "instantPrefix"], outputs: ["maskFilled"], exportAs: ["mask", "ngxMask"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: ButtonComponent, selector: "mapa-button", inputs: ["color", "disabled"], outputs: ["clicked"] }, { kind: "directive", type: MatInputAutosizeDirective, selector: "[matInputAutosize]", inputs: ["matInputAutosizeMaxWidth", "matInputAutosizeMinWidth", "matInputAutosizeFontStyle"] }, { kind: "directive", type: MapaMaskAutofillSyncDirective, selector: "input[mask], textarea[mask]", inputs: ["mapaMaskAutofillSync"], exportAs: ["mapaMaskAutofillSync"] }, { kind: "component", type: MapaFormErrorsComponent, selector: "mapa-form-errors", inputs: ["control", "errors"] }] }); }
|
|
393
528
|
}
|
|
394
529
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaInputComponent, decorators: [{
|
|
395
530
|
type: Component,
|
|
@@ -403,6 +538,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
403
538
|
MatInputModule,
|
|
404
539
|
ButtonComponent,
|
|
405
540
|
MatInputAutosizeDirective,
|
|
541
|
+
MapaMaskAutofillSyncDirective,
|
|
406
542
|
MapaFormErrorsComponent,
|
|
407
543
|
], providers: [
|
|
408
544
|
provideNgxMask(),
|
|
@@ -411,7 +547,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
411
547
|
useExisting: forwardRef(() => MapaInputComponent),
|
|
412
548
|
multi: true,
|
|
413
549
|
},
|
|
414
|
-
], standalone: true, template: "<label *ngIf=\"element.label\" class=\"mapa-input__label\">\n {{ element.label }}\n</label>\n<div class=\"mapa-form--inline\">\n <mat-form-field\n class=\"mapa-input\"\n [class.mapa-input--autosize]=\"element.autosize\"\n appearance=\"outline\"\n subscriptSizing=\"dynamic\"\n >\n <mat-icon *ngIf=\"element.prefix\" class=\"mapa-input--prefix\" matPrefix>\n {{ element.prefix }}\n </mat-icon>\n <input\n *ngIf=\"element.autosize\"\n matInput\n matInputAutosize\n [matInputAutosizeMinWidth]=\"element.autosizeMinWidth!\"\n [matInputAutosizeMaxWidth]=\"element.autosizeMaxWidth!\"\n [formControl]=\"formControl\"\n [placeholder]=\"element.placeholder || element.label\"\n [maxlength]=\"element.maxLength\"\n (keydown.enter)=\"suffixEmit()\"\n [type]=\"type\"\n [mask]=\"element.mask\"\n thousandSeparator=\".\"\n decimalMarker=\",\"\n [autocomplete]=\"element.autocomplete\"\n [readOnly]=\"element.readonly\"\n />\n <input\n matInput\n *ngIf=\"!element.autosize\"\n [formControl]=\"formControl\"\n [placeholder]=\"element.placeholder || element.label\"\n [maxlength]=\"element.maxLength\"\n (keydown.enter)=\"suffixEmit()\"\n [type]=\"type\"\n [mask]=\"element.mask\"\n [autocomplete]=\"element.autocomplete\"\n [readOnly]=\"element.readonly\"\n />\n <button\n *ngIf=\"hasValue() && !formControl.disabled && element.clearValue\"\n type=\"button\"\n matSuffix\n aria-label=\"Limpar\"\n (click)=\"clearValue()\"\n class=\"mapa-input--close\"\n >\n ×\n </button>\n <mat-icon\n *ngIf=\"element.suffix\"\n class=\"mapa-input--suffix\"\n matSuffix\n (click)=\"suffix.emit()\"\n >\n {{ element.suffix }}\n </mat-icon>\n <mat-hint *ngIf=\"element.hint\">{{ element.hint }}</mat-hint>\n <mat-error>\n <mapa-form-errors\n [control]=\"formControl\"\n [errors]=\"element.errors\"\n ></mapa-form-errors>\n </mat-error>\n </mat-form-field>\n\n <div *ngIf=\"element.actionButton\" class=\"mapa-form--action\">\n <mapa-button\n color=\"basic\"\n (clicked)=\"element.actionButton.action.emit(true)\"\n >\n {{ element.actionButton.label }}\n </mapa-button>\n </div>\n</div>\n", styles: [":host{display:inline-block;max-width:100%;min-width:0;box-sizing:border-box}.mapa-input{width:310px;max-width:100%;min-width:0;box-sizing:border-box}.mapa-input--autosize{width:auto;--mapa-input-autosize-preferred-width: 310px}.mapa-input__label{font-family:var(--mapa-font-heading, \"Asap\", \"Inter\", sans-serif);display:block;font-size:12px;font-style:normal;font-weight:600;line-height:16px;text-transform:uppercase;margin-bottom:16px}:host ::ng-deep .mapa-input--autosize .mat-mdc-form-field-infix{overflow:hidden}:host ::ng-deep .mapa-input .mat-mdc-form-field-error-wrapper,:host ::ng-deep .mapa-input .mat-mdc-form-field-hint-wrapper,:host ::ng-deep .mapa-input .mat-mdc-form-field-subscript-wrapper{padding:0!important}:host ::ng-deep .mapa-input .mat-mdc-form-field-error{margin:8px 0 0;padding-left:4px;color:#b54242;font-size:13px;line-height:18px}:host ::ng-deep .mapa-input .mat-mdc-form-field-error:before{display:none}:host ::ng-deep .mapa-input .mat-mdc-form-field-hint{display:block;margin:8px 0 0;padding-left:4px;color:var(--mapa-color-muted, #555555);font-size:13px;line-height:18px}:host ::ng-deep .mapa-input .mat-mdc-form-field-hint:before{display:none}:host ::ng-deep .mapa-input .mat-mdc-input-element{font-family:var(--mapa-font-body, \"Asap\", \"Roboto\", \"Inter\", sans-serif);font-size:16px;font-style:normal;font-weight:400}:host ::ng-deep .mapa-input .mat-mdc-form-field-flex{height:48px!important}:host ::ng-deep .mapa-input .mat-mdc-text-field-wrapper{background-color:var(--mapa-color-surface, #ffffff);border-radius:var(--mapa-radius-sm, 12px);height:48px}:host ::ng-deep .mapa-input .mat-mdc-text-field-wrapper.mdc-text-field--outlined{padding-left:unset!important;padding-right:unset!important}:host ::ng-deep .mapa-input .mdc-notched-outline{background-color:transparent;border-radius:var(--mapa-radius-sm, 12px)}:host ::ng-deep .mapa-input .mdc-text-field--outlined .mat-mdc-form-field-infix{padding-bottom:12px;padding-top:16px;--mat-form-field-container-height: 48px}:host ::ng-deep .mapa-input .mdc-text-field--outlined{--mat-form-field-outlined-container-shape: var(--mapa-radius-sm, 12px);--mat-form-field-outlined-outline-color: var( --mapa-color-border, rgba(26, 26, 26, .18) );--mat-form-field-outlined-hover-outline-color: var( --mapa-color-border, rgba(26, 26, 26, .18) );--mat-form-field-outlined-focus-outline-color: var( --mapa-color-accent, #ff560b );--mat-form-field-outlined-outline-width: 1px;--mat-form-field-outlined-focus-outline-width: 1px}:host ::ng-deep .mapa-input .mdc-notched-outline__leading,:host ::ng-deep .mapa-input .mdc-notched-outline__notch,:host ::ng-deep .mapa-input .mdc-notched-outline__trailing{border-width:1px!important}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix{display:flex}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix .mapa-input--close{display:flex;flex:0 0 20px;align-items:center;justify-content:center;width:20px;height:20px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--mapa-color-muted, #555555);font-family:inherit;font-size:16px;line-height:1;cursor:pointer}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix .mapa-input--close:hover{background:#1a1a1a14;color:var(--mapa-color-ink, #1a1a1a)}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix .mapa-input--close:last-child{margin-right:12px}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix .mapa-input--suffix{padding:0 0 0 8px}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix .mat-icon:last-child{padding-right:12px}\n"] }]
|
|
550
|
+
], standalone: true, template: "<label *ngIf=\"element.label\" class=\"mapa-input__label\">\n {{ element.label }}\n</label>\n<div class=\"mapa-form--inline\">\n <mat-form-field\n class=\"mapa-input\"\n [class.mapa-input--autosize]=\"element.autosize\"\n appearance=\"outline\"\n subscriptSizing=\"dynamic\"\n >\n <mat-icon *ngIf=\"element.prefix\" class=\"mapa-input--prefix\" matPrefix>\n {{ element.prefix }}\n </mat-icon>\n <input\n *ngIf=\"element.autosize\"\n matInput\n matInputAutosize\n [matInputAutosizeMinWidth]=\"element.autosizeMinWidth!\"\n [matInputAutosizeMaxWidth]=\"element.autosizeMaxWidth!\"\n [formControl]=\"formControl\"\n [placeholder]=\"element.placeholder || element.label\"\n [maxlength]=\"element.maxLength\"\n (keydown.enter)=\"suffixEmit()\"\n [type]=\"type\"\n [mask]=\"element.mask\"\n thousandSeparator=\".\"\n decimalMarker=\",\"\n [autocomplete]=\"element.autocomplete\"\n [readOnly]=\"element.readonly\"\n />\n <input\n matInput\n *ngIf=\"!element.autosize\"\n [formControl]=\"formControl\"\n [placeholder]=\"element.placeholder || element.label\"\n [maxlength]=\"element.maxLength\"\n (keydown.enter)=\"suffixEmit()\"\n [type]=\"type\"\n [mask]=\"element.mask\"\n [autocomplete]=\"element.autocomplete\"\n [readOnly]=\"element.readonly\"\n />\n <button\n *ngIf=\"hasValue() && !formControl.disabled && element.clearValue\"\n type=\"button\"\n tabindex=\"-1\"\n matSuffix\n aria-label=\"Limpar\"\n (click)=\"clearValue()\"\n class=\"mapa-input--close\"\n >\n ×\n </button>\n <mat-icon\n *ngIf=\"element.suffix\"\n class=\"mapa-input--suffix\"\n matSuffix\n (click)=\"suffix.emit()\"\n >\n {{ element.suffix }}\n </mat-icon>\n <mat-hint *ngIf=\"element.hint\">{{ element.hint }}</mat-hint>\n <mat-error>\n <mapa-form-errors\n [control]=\"formControl\"\n [errors]=\"element.errors\"\n ></mapa-form-errors>\n </mat-error>\n </mat-form-field>\n\n <div *ngIf=\"element.actionButton\" class=\"mapa-form--action\">\n <mapa-button\n color=\"basic\"\n (clicked)=\"element.actionButton.action.emit(true)\"\n >\n {{ element.actionButton.label }}\n </mapa-button>\n </div>\n</div>\n", styles: [":host{display:inline-block;max-width:100%;min-width:0;box-sizing:border-box}.mapa-input{width:310px;max-width:100%;min-width:0;box-sizing:border-box}.mapa-input--autosize{width:auto;--mapa-input-autosize-preferred-width: 310px}.mapa-input__label{font-family:var(--mapa-font-heading, \"Asap\", \"Inter\", sans-serif);display:block;font-size:12px;font-style:normal;font-weight:600;line-height:16px;text-transform:uppercase;margin-bottom:16px}:host ::ng-deep .mapa-input--autosize .mat-mdc-form-field-infix{overflow:hidden}:host ::ng-deep .mapa-input .mat-mdc-form-field-error-wrapper,:host ::ng-deep .mapa-input .mat-mdc-form-field-hint-wrapper,:host ::ng-deep .mapa-input .mat-mdc-form-field-subscript-wrapper{padding:0!important}:host ::ng-deep .mapa-input .mat-mdc-form-field-error{margin:8px 0 0;padding-left:4px;color:#b54242;font-size:13px;line-height:18px}:host ::ng-deep .mapa-input .mat-mdc-form-field-error:before{display:none}:host ::ng-deep .mapa-input .mat-mdc-form-field-hint{display:block;margin:8px 0 0;padding-left:4px;color:var(--mapa-color-muted, #555555);font-size:13px;line-height:18px}:host ::ng-deep .mapa-input .mat-mdc-form-field-hint:before{display:none}:host ::ng-deep .mapa-input .mat-mdc-input-element{font-family:var(--mapa-font-body, \"Asap\", \"Roboto\", \"Inter\", sans-serif);font-size:16px;font-style:normal;font-weight:400}:host ::ng-deep .mapa-input .mat-mdc-form-field-flex{height:48px!important}:host ::ng-deep .mapa-input .mat-mdc-text-field-wrapper{background-color:var(--mapa-color-surface, #ffffff);border-radius:var(--mapa-radius-sm, 12px);height:48px}:host ::ng-deep .mapa-input .mat-mdc-text-field-wrapper.mdc-text-field--outlined{padding-left:unset!important;padding-right:unset!important}:host ::ng-deep .mapa-input .mdc-notched-outline{background-color:transparent;border-radius:var(--mapa-radius-sm, 12px)}:host ::ng-deep .mapa-input .mdc-text-field--outlined .mat-mdc-form-field-infix{padding-bottom:12px;padding-top:16px;--mat-form-field-container-height: 48px}:host ::ng-deep .mapa-input .mdc-text-field--outlined{--mat-form-field-outlined-container-shape: var(--mapa-radius-sm, 12px);--mat-form-field-outlined-outline-color: var( --mapa-color-border, rgba(26, 26, 26, .18) );--mat-form-field-outlined-hover-outline-color: var( --mapa-color-border, rgba(26, 26, 26, .18) );--mat-form-field-outlined-focus-outline-color: var( --mapa-color-accent, #ff560b );--mat-form-field-outlined-outline-width: 1px;--mat-form-field-outlined-focus-outline-width: 1px}:host ::ng-deep .mapa-input .mdc-notched-outline__leading,:host ::ng-deep .mapa-input .mdc-notched-outline__notch,:host ::ng-deep .mapa-input .mdc-notched-outline__trailing{border-width:1px!important}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix{display:flex}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix .mapa-input--close{display:flex;flex:0 0 20px;align-items:center;justify-content:center;width:20px;height:20px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--mapa-color-muted, #555555);font-family:inherit;font-size:16px;line-height:1;cursor:pointer}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix .mapa-input--close:hover{background:#1a1a1a14;color:var(--mapa-color-ink, #1a1a1a)}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix .mapa-input--close:last-child{margin-right:12px}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix .mapa-input--suffix{padding:0 0 0 8px}:host ::ng-deep .mapa-input .mat-mdc-form-field-icon-suffix .mat-icon:last-child{padding-right:12px}\n"] }]
|
|
415
551
|
}], propDecorators: { formControl: [{
|
|
416
552
|
type: Input
|
|
417
553
|
}], element: [{
|