mapa-library-ui 0.11.0 → 0.11.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.
@@ -2,7 +2,6 @@ import * as i0 from '@angular/core';
2
2
  import { Directive, Host, Self, Optional, EventEmitter, Component, ViewEncapsulation, Input, Output, ViewChild, NgModule } from '@angular/core';
3
3
  import * as i1 from '@angular/material/paginator';
4
4
  import { MatPaginator, MatPaginatorIntl, MatPaginatorModule } from '@angular/material/paginator';
5
- import { SelectionModel } from '@angular/cdk/collections';
6
5
  import moment from 'moment';
7
6
  import * as i6 from '@angular/material/sort';
8
7
  import { MatSort, MatSortModule } from '@angular/material/sort';
@@ -254,7 +253,6 @@ class MapaTableComponent {
254
253
  this.selectedRows = new EventEmitter();
255
254
  this.onChangePage = new EventEmitter();
256
255
  this.displayedColumns = [];
257
- this.selection = new SelectionModel(true, []);
258
256
  }
259
257
  ngOnInit() {
260
258
  if (this.isGroupReport) {
@@ -265,51 +263,65 @@ class MapaTableComponent {
265
263
  ngAfterViewInit() {
266
264
  this.dataSource = new MatTableDataSource(this.data);
267
265
  this.dataSource.sort = this.sort;
268
- this.displayedColumns = this.columns.map(column => column.key);
266
+ this.displayedColumns = this.columns.map((column) => column.key);
269
267
  }
270
268
  ngOnChanges(changes) {
271
- if (changes['filterControl'] && this.filterControl) {
272
- this.setupFilter();
273
- }
274
- if (changes['data']) {
275
- this.data = changes['data'].currentValue;
269
+ if (changes["data"]) {
270
+ this.data = changes["data"].currentValue;
276
271
  this.dataSource.data = this.data;
277
272
  this.cdr.detectChanges();
278
273
  }
274
+ if (changes["filterControl"] && this.filterControl) {
275
+ this.setupFilter();
276
+ }
279
277
  }
280
278
  setupFilter() {
281
- this.filterControl.valueChanges.subscribe((value) => {
282
- this.dataSource.filter = value.trim().toLowerCase();
283
- });
284
- this.dataSource.filterPredicate = (data, filter) => {
285
- const dataStr = Object.keys(data)
286
- .reduce((currentTerm, key) => {
287
- return currentTerm + (data[key] && data[key].toString().toLowerCase() || '') + ' ';
288
- }, '').trim().toLowerCase();
289
- return dataStr.indexOf(filter) !== -1;
290
- };
279
+ if (this.dataSource) {
280
+ this.filterControl.valueChanges.subscribe((value) => {
281
+ this.dataSource.filter = value.trim().toLowerCase();
282
+ });
283
+ this.dataSource.filterPredicate = (data, filter) => {
284
+ const dataStr = Object.keys(data)
285
+ .reduce((currentTerm, key) => {
286
+ return (currentTerm +
287
+ ((data[key] && data[key].toString().toLowerCase()) || "") +
288
+ " ");
289
+ }, "")
290
+ .trim()
291
+ .toLowerCase();
292
+ return dataStr.indexOf(filter) !== -1;
293
+ };
294
+ }
291
295
  }
292
296
  isAllSelected() {
293
- const numSelected = this.selection.selected.length;
294
- const numRows = this.dataSource.data.length;
295
- return numSelected === numRows;
297
+ if (this.selection) {
298
+ const numSelected = this.selection.selected.length;
299
+ const numRows = this.dataSource.data.length;
300
+ return numSelected === numRows;
301
+ }
302
+ return false;
296
303
  }
297
304
  toggleAllRows() {
298
- if (this.isAllSelected()) {
299
- this.selection.clear();
300
- this.getSelectedValues();
301
- }
302
- else {
303
- const dataAsPeriodicElements = this.dataSource.data;
304
- dataAsPeriodicElements.forEach((row) => this.selection.select(row));
305
- this.getSelectedValues();
305
+ if (this.selection) {
306
+ if (this.isAllSelected()) {
307
+ this.selection.clear();
308
+ this.getSelectedValues();
309
+ }
310
+ else {
311
+ const dataAsPeriodicElements = this.dataSource.data;
312
+ dataAsPeriodicElements.forEach((row) => this.selection?.select(row));
313
+ this.getSelectedValues();
314
+ }
306
315
  }
307
316
  }
308
317
  checkboxLabel(row) {
309
- if (!row) {
310
- return `${this.isAllSelected() ? "deselect" : "select"} all`;
318
+ if (this.selection) {
319
+ if (!row) {
320
+ return `${this.isAllSelected() ? "deselect" : "select"} all`;
321
+ }
322
+ return `${this.selection.isSelected(row) ? "deselect" : "select"} row ${row.position + 1}`;
311
323
  }
312
- return `${this.selection.isSelected(row) ? "deselect" : "select"} row ${row.position + 1}`;
324
+ return '';
313
325
  }
314
326
  sortData(column) {
315
327
  if (column.sort) {
@@ -345,46 +357,58 @@ class MapaTableComponent {
345
357
  this.rowClick.emit(rowData);
346
358
  }
347
359
  toggleSelection(row) {
348
- if (this.selection.isSelected(row)) {
349
- this.selection.deselect(row);
350
- }
351
- else {
352
- this.selection.select(row);
360
+ if (this.selection) {
361
+ if (this.selection.isSelected(row)) {
362
+ this.selection.deselect(row);
363
+ }
364
+ else {
365
+ this.selection.select(row);
366
+ }
367
+ this.getSelectedValues();
353
368
  }
354
- this.getSelectedValues();
355
369
  }
356
370
  getSelectedValues() {
357
- const selectedRows = this.selection.selected.map((row) => {
358
- return { row };
359
- });
360
- this.selectedRows.emit(selectedRows);
361
- console.log(selectedRows);
371
+ if (this.selection) {
372
+ const selectedRows = this.selection.selected.map((row) => {
373
+ return { row };
374
+ });
375
+ this.selectedRows.emit(selectedRows);
376
+ console.log(selectedRows);
377
+ }
362
378
  }
363
379
  generateColumns() {
364
380
  const columns = [
365
- { key: 'name', label: '', sort: false },
366
- { key: 'general', label: '% Geral', sort: false }
381
+ { key: "name", label: "", sort: false },
382
+ { key: "general", label: "% Geral", sort: false },
367
383
  ];
368
- this.groupReport.forEach(reportItem => {
369
- reportItem.dimensions.forEach(dimension => {
384
+ this.groupReport.forEach((reportItem) => {
385
+ reportItem.dimensions.forEach((dimension) => {
370
386
  const dimensionKey = dimension.dimensionName.toLowerCase();
371
387
  const dimensionLabel = dimension.dimensionName;
372
388
  if (!this.columnExists(columns, dimensionKey)) {
373
- columns.push({ key: dimensionKey, label: dimensionLabel, sort: dimension.sort || false });
389
+ columns.push({
390
+ key: dimensionKey,
391
+ label: dimensionLabel,
392
+ sort: dimension.sort || false,
393
+ });
374
394
  }
375
395
  });
376
- reportItem.indicators.forEach(indicator => {
396
+ reportItem.indicators.forEach((indicator) => {
377
397
  const indicatorKey = indicator.name.toLowerCase();
378
398
  const indicatorLabel = indicator.name;
379
399
  if (!this.columnExists(columns, indicatorKey)) {
380
- columns.push({ key: indicatorKey, label: indicatorLabel, sort: indicator.sort || false });
400
+ columns.push({
401
+ key: indicatorKey,
402
+ label: indicatorLabel,
403
+ sort: indicator.sort || false,
404
+ });
381
405
  }
382
406
  });
383
407
  });
384
408
  this.columns = columns;
385
409
  }
386
410
  columnExists(columns, key) {
387
- return columns.some(column => column.key === key);
411
+ return columns.some((column) => column.key === key);
388
412
  }
389
413
  generateGroupData() {
390
414
  const result = [];
@@ -392,18 +416,18 @@ class MapaTableComponent {
392
416
  const dataItem = {
393
417
  name: item.candidate.name,
394
418
  cpf: item.candidate.cpf,
395
- general: item.candidate.general
419
+ general: item.candidate.general,
396
420
  };
397
- item.dimensions.forEach(dimension => {
421
+ item.dimensions.forEach((dimension) => {
398
422
  dataItem[dimension.dimensionName.toLowerCase()] = {
399
423
  scoreT: dimension.escoreT,
400
- direction: dimension.direction
424
+ direction: dimension.direction,
401
425
  };
402
426
  });
403
- item.indicators.forEach(indicator => {
427
+ item.indicators.forEach((indicator) => {
404
428
  dataItem[indicator.name.toLowerCase()] = {
405
429
  interval: indicator.interval,
406
- direction: indicator.direction
430
+ direction: indicator.direction,
407
431
  };
408
432
  });
409
433
  result.push(dataItem);
@@ -412,7 +436,7 @@ class MapaTableComponent {
412
436
  console.log(this.data);
413
437
  }
414
438
  isBoolean(column, row) {
415
- return typeof row[column.key] === 'boolean';
439
+ return typeof row[column.key] === "boolean";
416
440
  }
417
441
  isMaskedData(column, row) {
418
442
  const formats = [moment.ISO_8601, "MM/DD/YYYY :) HH*mm*ss"];
@@ -426,24 +450,26 @@ class MapaTableComponent {
426
450
  if (!this.isGroupReport) {
427
451
  return {};
428
452
  }
429
- const value = row[column.key].interval ? row[column.key].interval : row[column.key].scoreT;
453
+ const value = row[column.key].interval
454
+ ? row[column.key].interval
455
+ : row[column.key].scoreT;
430
456
  const direction = row[column.key].direction;
431
457
  const classes = {
432
- 'red-0-25': value >= 0 && value <= 25 && direction === 'Negativa',
433
- 'red-26-50': value >= 26 && value <= 50 && direction === 'Negativa',
434
- 'red-51-75': value >= 51 && value <= 75 && direction === 'Negativa',
435
- 'red-76-100': value >= 76 && value <= 100 && direction === 'Negativa',
436
- 'blue-0-20': value >= 0 && value <= 20 && direction === 'Positiva',
437
- 'blue-21-40': value >= 21 && value <= 40 && direction === 'Positiva',
438
- 'blue-41-60': value >= 41 && value <= 60 && direction === 'Positiva',
439
- 'blue-61-80': value >= 61 && value <= 80 && direction === 'Positiva',
440
- 'blue-81-100': value >= 81 && value <= 100 && direction === 'Positiva',
458
+ "red-0-25": value >= 0 && value <= 25 && direction === "Negativa",
459
+ "red-26-50": value >= 26 && value <= 50 && direction === "Negativa",
460
+ "red-51-75": value >= 51 && value <= 75 && direction === "Negativa",
461
+ "red-76-100": value >= 76 && value <= 100 && direction === "Negativa",
462
+ "blue-0-20": value >= 0 && value <= 20 && direction === "Positiva",
463
+ "blue-21-40": value >= 21 && value <= 40 && direction === "Positiva",
464
+ "blue-41-60": value >= 41 && value <= 60 && direction === "Positiva",
465
+ "blue-61-80": value >= 61 && value <= 80 && direction === "Positiva",
466
+ "blue-81-100": value >= 81 && value <= 100 && direction === "Positiva",
441
467
  };
442
468
  return classes;
443
469
  }
444
470
  getRowClass() {
445
471
  return {
446
- 'row-hover': !this.isGroupReport
472
+ "row-hover": !this.isGroupReport,
447
473
  };
448
474
  }
449
475
  changePage(event) {
@@ -451,10 +477,10 @@ class MapaTableComponent {
451
477
  }
452
478
  }
453
479
  MapaTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapaTableComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
454
- MapaTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: MapaTableComponent, selector: "mapa-table", inputs: { columns: "columns", data: "data", pageIndex: "pageIndex", pageSize: "pageSize", totalCount: "totalCount", totalPages: "totalPages", checkbox: "checkbox", actions: "actions", filterControl: "filterControl", groupReport: "groupReport", isGroupReport: "isGroupReport" }, outputs: { rowClick: "rowClick", selectedRows: "selectedRows", onChangePage: "onChangePage" }, viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true, read: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"mapa-table\">\n <table mat-table [dataSource]=\"dataSource\" matSort (matSortChange)=\"sortDataFunction($event)\">\n <ng-container\n *ngFor=\"let column of columns; let isFirst = first\"\n [matColumnDef]=\"column.key\" \n >\n <th\n mat-header-cell\n *matHeaderCellDef\n mat-sort-header\n [disabled]=\"!(column.key !== 'actions' ? column.sort : null)\"\n >\n <div\n [ngTemplateOutlet]=\"tableHeader\"\n [ngTemplateOutletContext]=\"{ selection, column, isFirst, checkbox }\"\n ></div>\n </th>\n <td mat-cell *matCellDef=\"let row\">\n <div \n class=\"mapa-table__column\"\n (click)=\"emitRowClick(row, '')\"\n *ngIf=\"column.key !== 'actions'; else columnActions\"\n > \n <ng-container *ngIf=\"isFirst && checkbox\">\n <mat-checkbox\n (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? selection.toggle(row) : null; getSelectedValues()\"\n [checked]=\"selection.isSelected(row)\"\n >\n </mat-checkbox>\n </ng-container>\n <div class=\"table__column\" [ngClass]=\"{ 'center-cell': isGroupReport }\">\n <div *ngIf=\"!isGroupReport\">\n <ng-container *ngIf=\"isMaskedData(column, row); else statusContent\">\n {{ getValueAsDate(column, row) | date: column.mask }}\n </ng-container>\n <ng-template #statusContent>\n <ng-container *ngIf=\"column.statusLabel; else commonContent\">\n <ng-container *ngIf=\"isBoolean(column, row); else commonStatus\">\n {{ column.statusLabel[row[column.key] ? 1 : 0] }}\n </ng-container>\n <ng-template #commonStatus>{{ column.statusLabel[row[column.key] - 1] }}</ng-template>\n </ng-container>\n <ng-template #commonContent>{{ row[column.key] }}</ng-template>\n </ng-template>\n <ng-template #statusContent>\n <ng-template #commonContent>{{ row[column.key] }}</ng-template>\n </ng-template>\n </div>\n <div *ngIf=\"isGroupReport\">\n <div [ngClass]=\"getCellClass(column, row)\">\n <ng-container *ngIf=\"column.key === 'name' || column.key === 'cpf' || column.key === 'general'; else scoreOrIntervalContent\">\n <div *ngIf=\"column.key === 'name'\">\n <div class=\"name\">\n {{ row.name }}<br>\n </div>\n <div class=\"cpf\">\n {{row.cpf}}\n </div>\n </div>\n <div *ngIf=\"column.key === 'general'\" class=\"general\">\n {{ row[column.key] }}%\n </div>\n </ng-container>\n <ng-template #scoreOrIntervalContent>\n <ng-container *ngIf=\"row[column.key] && row[column.key].scoreT; else intervalContent\">\n {{ row[column.key].scoreT }}%\n </ng-container>\n <ng-template #intervalContent>\n {{ row[column.key]?.interval }}%\n </ng-template>\n </ng-template>\n </div>\n </div>\n </div>\n </div>\n <ng-template #columnActions>\n <div class=\"mapa-table__column--actions\">\n <mat-icon (click)=\"emitRowClick(row, 'edit')\">edit</mat-icon>\n <mat-icon (click)=\"emitRowClick(row, 'delete')\">delete</mat-icon>\n <mat-icon (click)=\"emitRowClick(row, 'visibility')\">visibility</mat-icon>\n </div>\n </ng-template>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\" [ngClass]=\"getRowClass()\"></tr>\n </table>\n <mat-paginator \n class=\"mapa-table__paginator-legacy\"\n itemsPerPageLabel=\"Item por p\u00E1gina\"\n appStylePaginatorMv\n [length]=\"totalCount\"\n [pageSize]=\"pageSize\"\n [pageSizeOptions]=\"[5, 10, 25, 100]\"\n (page)=\"changePage($event)\"\n >\n </mat-paginator>\n</div>\n\n<ng-template\n #tableHeader\n let-selection=\"selection\"\n let-column=\"column\"\n let-isFirst=\"isFirst\"\n let-checkbox=\"checkbox\"\n>\n <div class=\"mapa-table__column mapa-table__column--header\">\n <ng-container *ngIf=\"isFirst && checkbox\">\n <mat-checkbox\n (change)=\"$event ? toggleAllRows() : null\"\n [checked]=\"selection.hasValue() && isAllSelected()\"\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\"\n (click)=\"$event.stopPropagation()\"\n >\n </mat-checkbox>\n </ng-container>\n <div class=\"mapa-table__label\" [ngClass]=\"{ 'label_report': isGroupReport }\">\n {{ column.label }}\n </div>\n <div *ngIf=\"column.key !== 'actions' && column.sort\">\n <mat-icon>filter_list</mat-icon>\n </div>\n </div>\n</ng-template>\n", styles: [".mapa-table .mat-table{font-family:SF-Pro;width:100%}.mapa-table .mat-table .mat-checkbox{margin:6px 8px 0 0;padding:0}.mapa-table td.mat-cell{padding:16px 0}.mapa-table .mat-table .mat-row .mat-cell{font-family:SF-Pro;font-size:16px;font-style:normal;font-weight:400;color:#50575e}.mapa-table .row-hover:hover{box-shadow:0 2px 4px #00000021;outline:1px solid rgba(238,238,238,.93);cursor:pointer}.mapa-table .mat-table .mat-header-cell{border:none;border-bottom:1px solid #eee;font-family:SF-Pro;font-size:16px;font-style:normal;font-weight:600;color:#50575e}.mapa-table .mat-icon{cursor:pointer;position:relative;bottom:-3px;margin:0 7px 0 0;font-size:14px;height:14px;width:14px}.mapa-table .mat-mdc-row,.mapa-table .mdc-data-table__content,.mapa-table .mat-mdc-header-cell{--mat-table-row-item-label-text-font: \"SF-Pro\"}.mapa-table .mat-checkbox.mat-accent .mat-checkbox-frame{border-color:#b6b6b6}.mapa-table .mat-checkbox.mat-accent.mat-checkbox-checked .mat-checkbox-frame{border-color:#ea561d}.mapa-table .mat-checkbox.mat-accent .mat-checkbox-background{background-color:transparent}.mapa-table .mat-checkbox.mat-accent.mat-checkbox-checked .mat-checkbox-background{background-color:#ea561d}.mapa-table .mat-mdc-paginator-container{display:flex;justify-content:space-between}.mapa-table ::ng-deep .mat-mdc-paginator-page-size-label{display:none}.mapa-table__paginator-legacy .mat-paginator-container{font-family:SF-Pro!important;justify-content:flex-start}.mapa-table__paginator-legacy .mat-paginator-page-size{margin-right:10vw}.mapa-table__paginator-legacy .custom-paginator-container{justify-content:flex-end}.mapa-table__paginator-legacy .custom-paginator-counter{white-space:nowrap;margin:0 4px 0 10px!important}.mapa-table__paginator-legacy .custom-paginator-page{border-radius:4px;outline:none;border:none;margin:.4em;font-size:14px;min-width:24px;width:auto;min-height:24px;max-height:24px;padding:1px 6px}.mapa-table__paginator-legacy .custom-paginator-page-enabled{color:#50575e;background:transparent;cursor:pointer}.mapa-table__paginator-legacy .custom-paginator-page-enabled:hover{background-color:#dfe3e6}.mapa-table__paginator-legacy .custom-paginator-page-disabled{background-color:#ea561d;color:#fff}.mapa-table__paginator-legacy .custom-paginator-arrow-disabled{color:#dfe3e6}.mapa-table__paginator-legacy .custom-paginator-arrow-enabled{color:#999}.mapa-table{width:100%;white-space:nowrap}.mapa-table__label{margin-top:4px}.mapa-table__column{padding:15px;align-items:center;display:flex}.mapa-table__column--actions{display:flex}.mapa-table__column--actions .mat-icon{color:#ea561d!important}.mapa-table__column--header{width:100%}.mapa-table__column--header .mat-icon{margin:0 7px}.mapa-table .mat-sort-header-arrow{color:transparent}.mapa-table .mat-sort-header-content{width:100%}.mapa-table .mat-cell,.mapa-table .mat-header-cell{padding:0 10px!important}.mapa-table .mat-table{width:100%;overflow-x:auto}.mapa-table .red-0-25{width:40px;height:40px;border-radius:24px;display:flex;justify-content:center;align-items:center;background-color:#f598a7;color:#000}.mapa-table .red-26-50{width:43px;height:43px;border-radius:24px;display:flex;justify-content:center;align-items:center;background-color:#f56580;color:#000}.mapa-table .red-51-75{width:46px;height:46px;border-radius:24px;display:flex;justify-content:center;align-items:center;background-color:#f4284e;color:#fff}.mapa-table .red-76-100{width:48px;height:48px;border-radius:24px;display:flex;justify-content:center;align-items:center;background-color:#c11c2f;color:#fff}.mapa-table .blue-0-20{width:40px;height:40px;border-radius:24px;display:flex;justify-content:center;align-items:center;background-color:#96f2ee;color:#fff}.mapa-table .blue-21-40{width:42px;height:42px;border-radius:24px;display:flex;justify-content:center;align-items:center;background-color:#68ceee;color:#fff}.mapa-table .blue-41-60{width:44px;height:44px;border-radius:24px;display:flex;justify-content:center;align-items:center;background-color:#2d9ced;color:#fff}.mapa-table .blue-61-80{width:46px;height:46px;border-radius:24px;display:flex;justify-content:center;align-items:center;background-color:#0e6ece;color:#fff}.mapa-table .blue-81-100{width:48px;height:48px;border-radius:24px;display:flex;justify-content:center;align-items:center;background-color:#073e92;color:#fff}.mapa-table .roundCell{border-radius:10px}.mapa-table .general{border-radius:24px;border:1px solid #dcdcde;display:flex;justify-content:center;align-items:center;width:48px;height:48px}.mapa-table .name{color:#181818;text-align:left;font-family:SF-Pro;font-size:14px;font-style:normal;font-weight:400;line-height:20px}.mapa-table .cpf{color:var(--Grey-Grey-30, #8c8f94);text-align:left;font-family:SF-Pro;font-size:12px;font-style:normal;font-weight:400;line-height:16px}.mapa-table .center-cell{margin:auto}.mapa-table .label_report{color:#181818;text-align:center;font-family:SF-Pro;font-size:12px;font-style:normal;font-weight:400;line-height:16px}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i1.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { kind: "component", type: i5.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i5.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i5.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i5.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i5.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i5.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i5.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i5.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i5.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i5.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i6.MatSort, selector: "[matSort]", inputs: ["matSortDisabled", "matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i6.MatSortHeader, selector: "[mat-sort-header]", inputs: ["disabled", "mat-sort-header", "arrowPosition", "start", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "directive", type: PaginatorLegacyDirective, selector: "[appStylePaginatorMv]" }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }], encapsulation: i0.ViewEncapsulation.None });
480
+ MapaTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: MapaTableComponent, selector: "mapa-table", inputs: { columns: "columns", data: "data", pageIndex: "pageIndex", pageSize: "pageSize", totalCount: "totalCount", totalPages: "totalPages", checkbox: "checkbox", selection: "selection", actions: "actions", filterControl: "filterControl", groupReport: "groupReport", isGroupReport: "isGroupReport" }, outputs: { rowClick: "rowClick", selectedRows: "selectedRows", onChangePage: "onChangePage" }, viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true, read: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"mapa-table\">\n <table mat-table [dataSource]=\"dataSource\" matSort (matSortChange)=\"sortDataFunction($event)\">\n <ng-container\n *ngFor=\"let column of columns; let isFirst = first\"\n [matColumnDef]=\"column.key\" \n >\n <th\n mat-header-cell\n *matHeaderCellDef\n mat-sort-header\n [disabled]=\"!(column.key !== 'actions' ? column.sort : null)\"\n >\n <div\n [ngTemplateOutlet]=\"tableHeader\"\n [ngTemplateOutletContext]=\"{ selection, column, isFirst, checkbox }\"\n ></div>\n </th>\n <td mat-cell *matCellDef=\"let row\">\n <div \n class=\"mapa-table__column\"\n (click)=\"emitRowClick(row, '')\"\n *ngIf=\"column.key !== 'actions'; else columnActions\"\n > \n <ng-container *ngIf=\"isFirst && checkbox\">\n <mat-checkbox\n (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? selection?.toggle(row) : null; getSelectedValues()\"\n [checked]=\"selection?.isSelected(row)\"\n >\n </mat-checkbox>\n </ng-container>\n <div class=\"table__column\" [ngClass]=\"{ 'center-cell': isGroupReport }\">\n <div *ngIf=\"!isGroupReport\">\n <ng-container *ngIf=\"isMaskedData(column, row); else statusContent\">\n {{ getValueAsDate(column, row) | date: column.mask }}\n </ng-container>\n <ng-template #statusContent>\n <ng-container *ngIf=\"column.statusLabel; else commonContent\">\n <ng-container *ngIf=\"isBoolean(column, row); else commonStatus\">\n {{ column.statusLabel[row[column.key] ? 1 : 0] }}\n </ng-container>\n <ng-template #commonStatus>{{ column.statusLabel[row[column.key] - 1] }}</ng-template>\n </ng-container>\n <ng-template #commonContent>{{ row[column.key] }}</ng-template>\n </ng-template>\n <ng-template #statusContent>\n <ng-template #commonContent>{{ row[column.key] }}</ng-template>\n </ng-template>\n </div>\n <div *ngIf=\"isGroupReport\">\n <div [ngClass]=\"getCellClass(column, row)\">\n <ng-container *ngIf=\"column.key === 'name' || column.key === 'cpf' || column.key === 'general'; else scoreOrIntervalContent\">\n <div *ngIf=\"column.key === 'name'\">\n <div class=\"name\">\n {{ row.name }}<br>\n </div>\n <div class=\"cpf\">\n {{row.cpf}}\n </div>\n </div>\n <div *ngIf=\"column.key === 'general'\" class=\"general\">\n {{ row[column.key] }}%\n </div>\n </ng-container>\n <ng-template #scoreOrIntervalContent>\n <ng-container *ngIf=\"row[column.key] && row[column.key].scoreT; else intervalContent\">\n {{ row[column.key].scoreT }}%\n </ng-container>\n <ng-template #intervalContent>\n {{ row[column.key]?.interval }}%\n </ng-template>\n </ng-template>\n </div>\n </div>\n </div>\n </div>\n <ng-template #columnActions>\n <div class=\"mapa-table__column--actions\">\n <mat-icon (click)=\"emitRowClick(row, 'edit')\">edit</mat-icon>\n <mat-icon (click)=\"emitRowClick(row, 'delete')\">delete</mat-icon>\n <mat-icon (click)=\"emitRowClick(row, 'visibility')\">visibility</mat-icon>\n </div>\n </ng-template>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\" [ngClass]=\"getRowClass()\"></tr>\n </table>\n <mat-paginator \n class=\"mapa-table__paginator-legacy\"\n itemsPerPageLabel=\"Item por p\u00E1gina\"\n appStylePaginatorMv\n [length]=\"totalCount\"\n [pageSize]=\"pageSize\"\n [pageSizeOptions]=\"[5, 10, 25, 100]\"\n (page)=\"changePage($event)\"\n >\n </mat-paginator>\n</div>\n\n<ng-template\n #tableHeader\n let-selection=\"selection\"\n let-column=\"column\"\n let-isFirst=\"isFirst\"\n let-checkbox=\"checkbox\"\n>\n <div class=\"mapa-table__column mapa-table__column--header\">\n <ng-container *ngIf=\"isFirst && checkbox\">\n <mat-checkbox\n (change)=\"$event ? toggleAllRows() : null\"\n [checked]=\"selection.hasValue() && isAllSelected()\"\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\"\n (click)=\"$event.stopPropagation()\"\n >\n </mat-checkbox>\n </ng-container>\n <div class=\"mapa-table__label\" [ngClass]=\"{ 'label_report': isGroupReport }\">\n {{ column.label }}\n </div>\n <div *ngIf=\"column.key !== 'actions' && column.sort\">\n <mat-icon>filter_list</mat-icon>\n </div>\n </div>\n</ng-template>\n", styles: [".mapa-table .mat-table{font-family:SF-Pro;width:100%}.mapa-table .mat-table .mat-checkbox{margin:6px 8px 0 0;padding:0}.mapa-table td.mat-cell{padding:16px 0}.mapa-table .mat-table .mat-row .mat-cell{font-family:SF-Pro;font-size:16px;font-style:normal;font-weight:400;color:#50575e}.mapa-table .row-hover:hover{box-shadow:0 2px 4px #00000021;outline:1px solid rgba(238,238,238,.93);cursor:pointer}.mapa-table .mat-table .mat-header-cell{border:none;border-bottom:1px solid #eee;font-family:SF-Pro;font-size:16px;font-style:normal;font-weight:600;color:#50575e}.mapa-table .mat-icon{cursor:pointer;position:relative;bottom:-3px;margin:0 7px 0 0;font-size:14px;height:14px;width:14px}.mapa-table .mat-mdc-row,.mapa-table .mdc-data-table__content,.mapa-table .mat-mdc-header-cell{--mat-table-row-item-label-text-font: \"SF-Pro\"}.mapa-table .mat-checkbox.mat-accent .mat-checkbox-frame{border-color:#b6b6b6}.mapa-table .mat-checkbox.mat-accent.mat-checkbox-checked .mat-checkbox-frame{border-color:#ea561d}.mapa-table .mat-checkbox.mat-accent .mat-checkbox-background{background-color:transparent}.mapa-table .mat-checkbox.mat-accent.mat-checkbox-checked .mat-checkbox-background{background-color:#ea561d}.mapa-table .mat-mdc-paginator-container{display:flex;justify-content:space-between}.mapa-table ::ng-deep .mat-mdc-paginator-page-size-label{display:none}.mapa-table__paginator-legacy .mat-paginator-container{font-family:SF-Pro!important;justify-content:flex-start}.mapa-table__paginator-legacy .mat-paginator-page-size{margin-right:10vw}.mapa-table__paginator-legacy .custom-paginator-container{justify-content:flex-end}.mapa-table__paginator-legacy .custom-paginator-counter{white-space:nowrap;margin:0 4px 0 10px!important}.mapa-table__paginator-legacy .custom-paginator-page{border-radius:4px;outline:none;border:none;margin:.4em;font-size:14px;min-width:24px;width:auto;min-height:24px;max-height:24px;padding:1px 6px}.mapa-table__paginator-legacy .custom-paginator-page-enabled{color:#50575e;background:transparent;cursor:pointer}.mapa-table__paginator-legacy .custom-paginator-page-enabled:hover{background-color:#dfe3e6}.mapa-table__paginator-legacy .custom-paginator-page-disabled{background-color:#ea561d;color:#fff}.mapa-table__paginator-legacy .custom-paginator-arrow-disabled{color:#dfe3e6}.mapa-table__paginator-legacy .custom-paginator-arrow-enabled{color:#999}.mapa-table{width:100%;white-space:nowrap}.mapa-table__label{margin-top:4px}.mapa-table__column{padding:15px;align-items:center;display:flex}.mapa-table__column--actions{display:flex}.mapa-table__column--actions .mat-icon{color:#ea561d!important}.mapa-table__column--header{width:100%}.mapa-table__column--header .mat-icon{margin:0 7px}.mapa-table .mat-sort-header-arrow{color:transparent}.mapa-table .mat-sort-header-content{width:100%}.mapa-table .mat-cell,.mapa-table .mat-header-cell{padding:0 10px!important}.mapa-table .mat-table{width:100%;overflow-x:auto}.mapa-table .red-0-25{width:40px;height:40px;border-radius:24px;display:flex;justify-content:center;align-items:center;background-color:#f598a7;color:#000}.mapa-table .red-26-50{width:43px;height:43px;border-radius:24px;display:flex;justify-content:center;align-items:center;background-color:#f56580;color:#000}.mapa-table .red-51-75{width:46px;height:46px;border-radius:24px;display:flex;justify-content:center;align-items:center;background-color:#f4284e;color:#fff}.mapa-table .red-76-100{width:48px;height:48px;border-radius:24px;display:flex;justify-content:center;align-items:center;background-color:#c11c2f;color:#fff}.mapa-table .blue-0-20{width:40px;height:40px;border-radius:24px;display:flex;justify-content:center;align-items:center;background-color:#96f2ee;color:#fff}.mapa-table .blue-21-40{width:42px;height:42px;border-radius:24px;display:flex;justify-content:center;align-items:center;background-color:#68ceee;color:#fff}.mapa-table .blue-41-60{width:44px;height:44px;border-radius:24px;display:flex;justify-content:center;align-items:center;background-color:#2d9ced;color:#fff}.mapa-table .blue-61-80{width:46px;height:46px;border-radius:24px;display:flex;justify-content:center;align-items:center;background-color:#0e6ece;color:#fff}.mapa-table .blue-81-100{width:48px;height:48px;border-radius:24px;display:flex;justify-content:center;align-items:center;background-color:#073e92;color:#fff}.mapa-table .roundCell{border-radius:10px}.mapa-table .general{border-radius:24px;border:1px solid #dcdcde;display:flex;justify-content:center;align-items:center;width:48px;height:48px}.mapa-table .name{color:#181818;text-align:left;font-family:SF-Pro;font-size:14px;font-style:normal;font-weight:400;line-height:20px}.mapa-table .cpf{color:var(--Grey-Grey-30, #8c8f94);text-align:left;font-family:SF-Pro;font-size:12px;font-style:normal;font-weight:400;line-height:16px}.mapa-table .center-cell{margin:auto}.mapa-table .label_report{color:#181818;text-align:center;font-family:SF-Pro;font-size:12px;font-style:normal;font-weight:400;line-height:16px}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i1.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { kind: "component", type: i5.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i5.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i5.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i5.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i5.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i5.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i5.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i5.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i5.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i5.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i6.MatSort, selector: "[matSort]", inputs: ["matSortDisabled", "matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i6.MatSortHeader, selector: "[mat-sort-header]", inputs: ["disabled", "mat-sort-header", "arrowPosition", "start", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "directive", type: PaginatorLegacyDirective, selector: "[appStylePaginatorMv]" }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }], encapsulation: i0.ViewEncapsulation.None });
455
481
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapaTableComponent, decorators: [{
456
482
  type: Component,
457
- args: [{ selector: "mapa-table", encapsulation: ViewEncapsulation.None, template: "<div class=\"mapa-table\">\n <table mat-table [dataSource]=\"dataSource\" matSort (matSortChange)=\"sortDataFunction($event)\">\n <ng-container\n *ngFor=\"let column of columns; let isFirst = first\"\n [matColumnDef]=\"column.key\" \n >\n <th\n mat-header-cell\n *matHeaderCellDef\n mat-sort-header\n [disabled]=\"!(column.key !== 'actions' ? column.sort : null)\"\n >\n <div\n [ngTemplateOutlet]=\"tableHeader\"\n [ngTemplateOutletContext]=\"{ selection, column, isFirst, checkbox }\"\n ></div>\n </th>\n <td mat-cell *matCellDef=\"let row\">\n <div \n class=\"mapa-table__column\"\n (click)=\"emitRowClick(row, '')\"\n *ngIf=\"column.key !== 'actions'; else columnActions\"\n > \n <ng-container *ngIf=\"isFirst && checkbox\">\n <mat-checkbox\n (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? selection.toggle(row) : null; getSelectedValues()\"\n [checked]=\"selection.isSelected(row)\"\n >\n </mat-checkbox>\n </ng-container>\n <div class=\"table__column\" [ngClass]=\"{ 'center-cell': isGroupReport }\">\n <div *ngIf=\"!isGroupReport\">\n <ng-container *ngIf=\"isMaskedData(column, row); else statusContent\">\n {{ getValueAsDate(column, row) | date: column.mask }}\n </ng-container>\n <ng-template #statusContent>\n <ng-container *ngIf=\"column.statusLabel; else commonContent\">\n <ng-container *ngIf=\"isBoolean(column, row); else commonStatus\">\n {{ column.statusLabel[row[column.key] ? 1 : 0] }}\n </ng-container>\n <ng-template #commonStatus>{{ column.statusLabel[row[column.key] - 1] }}</ng-template>\n </ng-container>\n <ng-template #commonContent>{{ row[column.key] }}</ng-template>\n </ng-template>\n <ng-template #statusContent>\n <ng-template #commonContent>{{ row[column.key] }}</ng-template>\n </ng-template>\n </div>\n <div *ngIf=\"isGroupReport\">\n <div [ngClass]=\"getCellClass(column, row)\">\n <ng-container *ngIf=\"column.key === 'name' || column.key === 'cpf' || column.key === 'general'; else scoreOrIntervalContent\">\n <div *ngIf=\"column.key === 'name'\">\n <div class=\"name\">\n {{ row.name }}<br>\n </div>\n <div class=\"cpf\">\n {{row.cpf}}\n </div>\n </div>\n <div *ngIf=\"column.key === 'general'\" class=\"general\">\n {{ row[column.key] }}%\n </div>\n </ng-container>\n <ng-template #scoreOrIntervalContent>\n <ng-container *ngIf=\"row[column.key] && row[column.key].scoreT; else intervalContent\">\n {{ row[column.key].scoreT }}%\n </ng-container>\n <ng-template #intervalContent>\n {{ row[column.key]?.interval }}%\n </ng-template>\n </ng-template>\n </div>\n </div>\n </div>\n </div>\n <ng-template #columnActions>\n <div class=\"mapa-table__column--actions\">\n <mat-icon (click)=\"emitRowClick(row, 'edit')\">edit</mat-icon>\n <mat-icon (click)=\"emitRowClick(row, 'delete')\">delete</mat-icon>\n <mat-icon (click)=\"emitRowClick(row, 'visibility')\">visibility</mat-icon>\n </div>\n </ng-template>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\" [ngClass]=\"getRowClass()\"></tr>\n </table>\n <mat-paginator \n class=\"mapa-table__paginator-legacy\"\n itemsPerPageLabel=\"Item por p\u00E1gina\"\n appStylePaginatorMv\n [length]=\"totalCount\"\n [pageSize]=\"pageSize\"\n [pageSizeOptions]=\"[5, 10, 25, 100]\"\n (page)=\"changePage($event)\"\n >\n </mat-paginator>\n</div>\n\n<ng-template\n #tableHeader\n let-selection=\"selection\"\n let-column=\"column\"\n let-isFirst=\"isFirst\"\n let-checkbox=\"checkbox\"\n>\n <div class=\"mapa-table__column mapa-table__column--header\">\n <ng-container *ngIf=\"isFirst && checkbox\">\n <mat-checkbox\n (change)=\"$event ? toggleAllRows() : null\"\n [checked]=\"selection.hasValue() && isAllSelected()\"\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\"\n (click)=\"$event.stopPropagation()\"\n >\n </mat-checkbox>\n </ng-container>\n <div class=\"mapa-table__label\" [ngClass]=\"{ 'label_report': isGroupReport }\">\n {{ column.label }}\n </div>\n <div *ngIf=\"column.key !== 'actions' && column.sort\">\n <mat-icon>filter_list</mat-icon>\n </div>\n </div>\n</ng-template>\n", styles: [".mapa-table .mat-table{font-family:SF-Pro;width:100%}.mapa-table .mat-table .mat-checkbox{margin:6px 8px 0 0;padding:0}.mapa-table td.mat-cell{padding:16px 0}.mapa-table .mat-table .mat-row .mat-cell{font-family:SF-Pro;font-size:16px;font-style:normal;font-weight:400;color:#50575e}.mapa-table .row-hover:hover{box-shadow:0 2px 4px #00000021;outline:1px solid rgba(238,238,238,.93);cursor:pointer}.mapa-table .mat-table .mat-header-cell{border:none;border-bottom:1px solid #eee;font-family:SF-Pro;font-size:16px;font-style:normal;font-weight:600;color:#50575e}.mapa-table .mat-icon{cursor:pointer;position:relative;bottom:-3px;margin:0 7px 0 0;font-size:14px;height:14px;width:14px}.mapa-table .mat-mdc-row,.mapa-table .mdc-data-table__content,.mapa-table .mat-mdc-header-cell{--mat-table-row-item-label-text-font: \"SF-Pro\"}.mapa-table .mat-checkbox.mat-accent .mat-checkbox-frame{border-color:#b6b6b6}.mapa-table .mat-checkbox.mat-accent.mat-checkbox-checked .mat-checkbox-frame{border-color:#ea561d}.mapa-table .mat-checkbox.mat-accent .mat-checkbox-background{background-color:transparent}.mapa-table .mat-checkbox.mat-accent.mat-checkbox-checked .mat-checkbox-background{background-color:#ea561d}.mapa-table .mat-mdc-paginator-container{display:flex;justify-content:space-between}.mapa-table ::ng-deep .mat-mdc-paginator-page-size-label{display:none}.mapa-table__paginator-legacy .mat-paginator-container{font-family:SF-Pro!important;justify-content:flex-start}.mapa-table__paginator-legacy .mat-paginator-page-size{margin-right:10vw}.mapa-table__paginator-legacy .custom-paginator-container{justify-content:flex-end}.mapa-table__paginator-legacy .custom-paginator-counter{white-space:nowrap;margin:0 4px 0 10px!important}.mapa-table__paginator-legacy .custom-paginator-page{border-radius:4px;outline:none;border:none;margin:.4em;font-size:14px;min-width:24px;width:auto;min-height:24px;max-height:24px;padding:1px 6px}.mapa-table__paginator-legacy .custom-paginator-page-enabled{color:#50575e;background:transparent;cursor:pointer}.mapa-table__paginator-legacy .custom-paginator-page-enabled:hover{background-color:#dfe3e6}.mapa-table__paginator-legacy .custom-paginator-page-disabled{background-color:#ea561d;color:#fff}.mapa-table__paginator-legacy .custom-paginator-arrow-disabled{color:#dfe3e6}.mapa-table__paginator-legacy .custom-paginator-arrow-enabled{color:#999}.mapa-table{width:100%;white-space:nowrap}.mapa-table__label{margin-top:4px}.mapa-table__column{padding:15px;align-items:center;display:flex}.mapa-table__column--actions{display:flex}.mapa-table__column--actions .mat-icon{color:#ea561d!important}.mapa-table__column--header{width:100%}.mapa-table__column--header .mat-icon{margin:0 7px}.mapa-table .mat-sort-header-arrow{color:transparent}.mapa-table .mat-sort-header-content{width:100%}.mapa-table .mat-cell,.mapa-table .mat-header-cell{padding:0 10px!important}.mapa-table .mat-table{width:100%;overflow-x:auto}.mapa-table .red-0-25{width:40px;height:40px;border-radius:24px;display:flex;justify-content:center;align-items:center;background-color:#f598a7;color:#000}.mapa-table .red-26-50{width:43px;height:43px;border-radius:24px;display:flex;justify-content:center;align-items:center;background-color:#f56580;color:#000}.mapa-table .red-51-75{width:46px;height:46px;border-radius:24px;display:flex;justify-content:center;align-items:center;background-color:#f4284e;color:#fff}.mapa-table .red-76-100{width:48px;height:48px;border-radius:24px;display:flex;justify-content:center;align-items:center;background-color:#c11c2f;color:#fff}.mapa-table .blue-0-20{width:40px;height:40px;border-radius:24px;display:flex;justify-content:center;align-items:center;background-color:#96f2ee;color:#fff}.mapa-table .blue-21-40{width:42px;height:42px;border-radius:24px;display:flex;justify-content:center;align-items:center;background-color:#68ceee;color:#fff}.mapa-table .blue-41-60{width:44px;height:44px;border-radius:24px;display:flex;justify-content:center;align-items:center;background-color:#2d9ced;color:#fff}.mapa-table .blue-61-80{width:46px;height:46px;border-radius:24px;display:flex;justify-content:center;align-items:center;background-color:#0e6ece;color:#fff}.mapa-table .blue-81-100{width:48px;height:48px;border-radius:24px;display:flex;justify-content:center;align-items:center;background-color:#073e92;color:#fff}.mapa-table .roundCell{border-radius:10px}.mapa-table .general{border-radius:24px;border:1px solid #dcdcde;display:flex;justify-content:center;align-items:center;width:48px;height:48px}.mapa-table .name{color:#181818;text-align:left;font-family:SF-Pro;font-size:14px;font-style:normal;font-weight:400;line-height:20px}.mapa-table .cpf{color:var(--Grey-Grey-30, #8c8f94);text-align:left;font-family:SF-Pro;font-size:12px;font-style:normal;font-weight:400;line-height:16px}.mapa-table .center-cell{margin:auto}.mapa-table .label_report{color:#181818;text-align:center;font-family:SF-Pro;font-size:12px;font-style:normal;font-weight:400;line-height:16px}\n"] }]
483
+ args: [{ selector: "mapa-table", encapsulation: ViewEncapsulation.None, template: "<div class=\"mapa-table\">\n <table mat-table [dataSource]=\"dataSource\" matSort (matSortChange)=\"sortDataFunction($event)\">\n <ng-container\n *ngFor=\"let column of columns; let isFirst = first\"\n [matColumnDef]=\"column.key\" \n >\n <th\n mat-header-cell\n *matHeaderCellDef\n mat-sort-header\n [disabled]=\"!(column.key !== 'actions' ? column.sort : null)\"\n >\n <div\n [ngTemplateOutlet]=\"tableHeader\"\n [ngTemplateOutletContext]=\"{ selection, column, isFirst, checkbox }\"\n ></div>\n </th>\n <td mat-cell *matCellDef=\"let row\">\n <div \n class=\"mapa-table__column\"\n (click)=\"emitRowClick(row, '')\"\n *ngIf=\"column.key !== 'actions'; else columnActions\"\n > \n <ng-container *ngIf=\"isFirst && checkbox\">\n <mat-checkbox\n (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? selection?.toggle(row) : null; getSelectedValues()\"\n [checked]=\"selection?.isSelected(row)\"\n >\n </mat-checkbox>\n </ng-container>\n <div class=\"table__column\" [ngClass]=\"{ 'center-cell': isGroupReport }\">\n <div *ngIf=\"!isGroupReport\">\n <ng-container *ngIf=\"isMaskedData(column, row); else statusContent\">\n {{ getValueAsDate(column, row) | date: column.mask }}\n </ng-container>\n <ng-template #statusContent>\n <ng-container *ngIf=\"column.statusLabel; else commonContent\">\n <ng-container *ngIf=\"isBoolean(column, row); else commonStatus\">\n {{ column.statusLabel[row[column.key] ? 1 : 0] }}\n </ng-container>\n <ng-template #commonStatus>{{ column.statusLabel[row[column.key] - 1] }}</ng-template>\n </ng-container>\n <ng-template #commonContent>{{ row[column.key] }}</ng-template>\n </ng-template>\n <ng-template #statusContent>\n <ng-template #commonContent>{{ row[column.key] }}</ng-template>\n </ng-template>\n </div>\n <div *ngIf=\"isGroupReport\">\n <div [ngClass]=\"getCellClass(column, row)\">\n <ng-container *ngIf=\"column.key === 'name' || column.key === 'cpf' || column.key === 'general'; else scoreOrIntervalContent\">\n <div *ngIf=\"column.key === 'name'\">\n <div class=\"name\">\n {{ row.name }}<br>\n </div>\n <div class=\"cpf\">\n {{row.cpf}}\n </div>\n </div>\n <div *ngIf=\"column.key === 'general'\" class=\"general\">\n {{ row[column.key] }}%\n </div>\n </ng-container>\n <ng-template #scoreOrIntervalContent>\n <ng-container *ngIf=\"row[column.key] && row[column.key].scoreT; else intervalContent\">\n {{ row[column.key].scoreT }}%\n </ng-container>\n <ng-template #intervalContent>\n {{ row[column.key]?.interval }}%\n </ng-template>\n </ng-template>\n </div>\n </div>\n </div>\n </div>\n <ng-template #columnActions>\n <div class=\"mapa-table__column--actions\">\n <mat-icon (click)=\"emitRowClick(row, 'edit')\">edit</mat-icon>\n <mat-icon (click)=\"emitRowClick(row, 'delete')\">delete</mat-icon>\n <mat-icon (click)=\"emitRowClick(row, 'visibility')\">visibility</mat-icon>\n </div>\n </ng-template>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\" [ngClass]=\"getRowClass()\"></tr>\n </table>\n <mat-paginator \n class=\"mapa-table__paginator-legacy\"\n itemsPerPageLabel=\"Item por p\u00E1gina\"\n appStylePaginatorMv\n [length]=\"totalCount\"\n [pageSize]=\"pageSize\"\n [pageSizeOptions]=\"[5, 10, 25, 100]\"\n (page)=\"changePage($event)\"\n >\n </mat-paginator>\n</div>\n\n<ng-template\n #tableHeader\n let-selection=\"selection\"\n let-column=\"column\"\n let-isFirst=\"isFirst\"\n let-checkbox=\"checkbox\"\n>\n <div class=\"mapa-table__column mapa-table__column--header\">\n <ng-container *ngIf=\"isFirst && checkbox\">\n <mat-checkbox\n (change)=\"$event ? toggleAllRows() : null\"\n [checked]=\"selection.hasValue() && isAllSelected()\"\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\"\n (click)=\"$event.stopPropagation()\"\n >\n </mat-checkbox>\n </ng-container>\n <div class=\"mapa-table__label\" [ngClass]=\"{ 'label_report': isGroupReport }\">\n {{ column.label }}\n </div>\n <div *ngIf=\"column.key !== 'actions' && column.sort\">\n <mat-icon>filter_list</mat-icon>\n </div>\n </div>\n</ng-template>\n", styles: [".mapa-table .mat-table{font-family:SF-Pro;width:100%}.mapa-table .mat-table .mat-checkbox{margin:6px 8px 0 0;padding:0}.mapa-table td.mat-cell{padding:16px 0}.mapa-table .mat-table .mat-row .mat-cell{font-family:SF-Pro;font-size:16px;font-style:normal;font-weight:400;color:#50575e}.mapa-table .row-hover:hover{box-shadow:0 2px 4px #00000021;outline:1px solid rgba(238,238,238,.93);cursor:pointer}.mapa-table .mat-table .mat-header-cell{border:none;border-bottom:1px solid #eee;font-family:SF-Pro;font-size:16px;font-style:normal;font-weight:600;color:#50575e}.mapa-table .mat-icon{cursor:pointer;position:relative;bottom:-3px;margin:0 7px 0 0;font-size:14px;height:14px;width:14px}.mapa-table .mat-mdc-row,.mapa-table .mdc-data-table__content,.mapa-table .mat-mdc-header-cell{--mat-table-row-item-label-text-font: \"SF-Pro\"}.mapa-table .mat-checkbox.mat-accent .mat-checkbox-frame{border-color:#b6b6b6}.mapa-table .mat-checkbox.mat-accent.mat-checkbox-checked .mat-checkbox-frame{border-color:#ea561d}.mapa-table .mat-checkbox.mat-accent .mat-checkbox-background{background-color:transparent}.mapa-table .mat-checkbox.mat-accent.mat-checkbox-checked .mat-checkbox-background{background-color:#ea561d}.mapa-table .mat-mdc-paginator-container{display:flex;justify-content:space-between}.mapa-table ::ng-deep .mat-mdc-paginator-page-size-label{display:none}.mapa-table__paginator-legacy .mat-paginator-container{font-family:SF-Pro!important;justify-content:flex-start}.mapa-table__paginator-legacy .mat-paginator-page-size{margin-right:10vw}.mapa-table__paginator-legacy .custom-paginator-container{justify-content:flex-end}.mapa-table__paginator-legacy .custom-paginator-counter{white-space:nowrap;margin:0 4px 0 10px!important}.mapa-table__paginator-legacy .custom-paginator-page{border-radius:4px;outline:none;border:none;margin:.4em;font-size:14px;min-width:24px;width:auto;min-height:24px;max-height:24px;padding:1px 6px}.mapa-table__paginator-legacy .custom-paginator-page-enabled{color:#50575e;background:transparent;cursor:pointer}.mapa-table__paginator-legacy .custom-paginator-page-enabled:hover{background-color:#dfe3e6}.mapa-table__paginator-legacy .custom-paginator-page-disabled{background-color:#ea561d;color:#fff}.mapa-table__paginator-legacy .custom-paginator-arrow-disabled{color:#dfe3e6}.mapa-table__paginator-legacy .custom-paginator-arrow-enabled{color:#999}.mapa-table{width:100%;white-space:nowrap}.mapa-table__label{margin-top:4px}.mapa-table__column{padding:15px;align-items:center;display:flex}.mapa-table__column--actions{display:flex}.mapa-table__column--actions .mat-icon{color:#ea561d!important}.mapa-table__column--header{width:100%}.mapa-table__column--header .mat-icon{margin:0 7px}.mapa-table .mat-sort-header-arrow{color:transparent}.mapa-table .mat-sort-header-content{width:100%}.mapa-table .mat-cell,.mapa-table .mat-header-cell{padding:0 10px!important}.mapa-table .mat-table{width:100%;overflow-x:auto}.mapa-table .red-0-25{width:40px;height:40px;border-radius:24px;display:flex;justify-content:center;align-items:center;background-color:#f598a7;color:#000}.mapa-table .red-26-50{width:43px;height:43px;border-radius:24px;display:flex;justify-content:center;align-items:center;background-color:#f56580;color:#000}.mapa-table .red-51-75{width:46px;height:46px;border-radius:24px;display:flex;justify-content:center;align-items:center;background-color:#f4284e;color:#fff}.mapa-table .red-76-100{width:48px;height:48px;border-radius:24px;display:flex;justify-content:center;align-items:center;background-color:#c11c2f;color:#fff}.mapa-table .blue-0-20{width:40px;height:40px;border-radius:24px;display:flex;justify-content:center;align-items:center;background-color:#96f2ee;color:#fff}.mapa-table .blue-21-40{width:42px;height:42px;border-radius:24px;display:flex;justify-content:center;align-items:center;background-color:#68ceee;color:#fff}.mapa-table .blue-41-60{width:44px;height:44px;border-radius:24px;display:flex;justify-content:center;align-items:center;background-color:#2d9ced;color:#fff}.mapa-table .blue-61-80{width:46px;height:46px;border-radius:24px;display:flex;justify-content:center;align-items:center;background-color:#0e6ece;color:#fff}.mapa-table .blue-81-100{width:48px;height:48px;border-radius:24px;display:flex;justify-content:center;align-items:center;background-color:#073e92;color:#fff}.mapa-table .roundCell{border-radius:10px}.mapa-table .general{border-radius:24px;border:1px solid #dcdcde;display:flex;justify-content:center;align-items:center;width:48px;height:48px}.mapa-table .name{color:#181818;text-align:left;font-family:SF-Pro;font-size:14px;font-style:normal;font-weight:400;line-height:20px}.mapa-table .cpf{color:var(--Grey-Grey-30, #8c8f94);text-align:left;font-family:SF-Pro;font-size:12px;font-style:normal;font-weight:400;line-height:16px}.mapa-table .center-cell{margin:auto}.mapa-table .label_report{color:#181818;text-align:center;font-family:SF-Pro;font-size:12px;font-style:normal;font-weight:400;line-height:16px}\n"] }]
458
484
  }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { columns: [{
459
485
  type: Input
460
486
  }], data: [{
@@ -469,6 +495,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
469
495
  type: Input
470
496
  }], checkbox: [{
471
497
  type: Input
498
+ }], selection: [{
499
+ type: Input
472
500
  }], actions: [{
473
501
  type: Input
474
502
  }], filterControl: [{