info-library 2.10.76 → 2.10.78

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.
Files changed (72) hide show
  1. package/bundles/info-library.umd.js +231 -9
  2. package/bundles/info-library.umd.js.map +1 -1
  3. package/bundles/info-library.umd.min.js +1 -1
  4. package/bundles/info-library.umd.min.js.map +1 -1
  5. package/controls/grid/grid.component.d.ts +18 -1
  6. package/esm2015/controls/alert/alert.component.js +1 -1
  7. package/esm2015/controls/autocomplete/autocomplete.component.js +1 -1
  8. package/esm2015/controls/big-checkbox/big-checkbox.component.js +1 -1
  9. package/esm2015/controls/card/card.component.js +1 -1
  10. package/esm2015/controls/card-menu/card-menu.component.js +1 -1
  11. package/esm2015/controls/checkbox/checkbox.component.js +1 -1
  12. package/esm2015/controls/chips/chips.component.js +1 -1
  13. package/esm2015/controls/date/date.component.js +1 -1
  14. package/esm2015/controls/date-month/date-month.component.js +1 -1
  15. package/esm2015/controls/editor/editor.component.js +1 -1
  16. package/esm2015/controls/grid/grid.component.js +201 -11
  17. package/esm2015/controls/input/input.component.js +1 -1
  18. package/esm2015/controls/input-list/input-list.component.js +1 -1
  19. package/esm2015/controls/list-checkbox/list-checkbox.component.js +1 -1
  20. package/esm2015/controls/message/message.component.js +1 -1
  21. package/esm2015/controls/multi-select/multi-select.component.js +1 -1
  22. package/esm2015/controls/paginator/paginator.component.js +1 -1
  23. package/esm2015/controls/select/select.component.js +1 -1
  24. package/esm2015/controls/timeline/timeline.component.js +1 -1
  25. package/esm2015/directives/mask.directive.js +1 -1
  26. package/esm2015/directives/unmask.directive.js +1 -1
  27. package/esm2015/enum/dialog-buttons.enum.js +1 -1
  28. package/esm2015/enum/index.js +1 -1
  29. package/esm2015/enum/modal-action.enum.js +1 -1
  30. package/esm2015/enum/page-action.enum.js +1 -1
  31. package/esm2015/global-config.js +1 -1
  32. package/esm2015/info-library.js +2 -2
  33. package/esm2015/info-library.module.js +4 -2
  34. package/esm2015/layouts/dialog/dialog.component.js +1 -1
  35. package/esm2015/layouts/loading/loading.component.js +1 -1
  36. package/esm2015/layouts/main/main.component.js +1 -1
  37. package/esm2015/layouts/modal/modal.component.js +1 -1
  38. package/esm2015/layouts/pagebar/pagebar.component.js +1 -1
  39. package/esm2015/layouts/sidebar/sidebar.component.js +1 -1
  40. package/esm2015/layouts/topbar/topbar.component.js +1 -1
  41. package/esm2015/layouts/topmenu/topmenu.component.js +1 -1
  42. package/esm2015/model/app-config.model.js +1 -1
  43. package/esm2015/model/data-access.model.js +1 -1
  44. package/esm2015/model/dialog-result.model.js +1 -1
  45. package/esm2015/model/dialog.model.js +1 -1
  46. package/esm2015/model/form-prop.model.js +1 -1
  47. package/esm2015/model/grid-button.model.js +1 -1
  48. package/esm2015/model/index.js +1 -1
  49. package/esm2015/model/last-search.model.js +1 -1
  50. package/esm2015/model/login.model.js +1 -1
  51. package/esm2015/model/method-grid-button.model.js +1 -1
  52. package/esm2015/model/notification.model.js +1 -1
  53. package/esm2015/model/pagebar-buttons.model.js +1 -1
  54. package/esm2015/model/permission.model.js +1 -1
  55. package/esm2015/model/platform.model.js +1 -1
  56. package/esm2015/model/session.model.js +1 -1
  57. package/esm2015/pipe/index.js +1 -1
  58. package/esm2015/pipe/mask.pipe.js +1 -1
  59. package/esm2015/pipe/translate.pipe.js +1 -1
  60. package/esm2015/public_api.js +2 -2
  61. package/esm2015/service/authentication.service.js +2 -2
  62. package/esm2015/service/configuration.service.js +1 -1
  63. package/esm2015/service/data.service.js +1 -1
  64. package/esm2015/service/index.js +1 -1
  65. package/esm2015/service/theme.service.js +1 -1
  66. package/esm2015/service/translate.service.js +1 -1
  67. package/esm2015/utils/utilities.js +1 -1
  68. package/fesm2015/info-library.js +202 -10
  69. package/fesm2015/info-library.js.map +1 -1
  70. package/info-library.metadata.json +1 -1
  71. package/package.json +1 -1
  72. package/public_api.d.ts +1 -1
@@ -2290,7 +2290,7 @@
2290
2290
  * @param {?} key
2291
2291
  * @return {?}
2292
2292
  */function (key) {
2293
- if (!key.includes('Dashboard'))
2293
+ if (!key.includes('Dashboard,cols'))
2294
2294
  delete localStorage[key];
2295
2295
  }));
2296
2296
  };
@@ -4374,6 +4374,7 @@
4374
4374
  this.paged = false;
4375
4375
  this.size = 15;
4376
4376
  this.autorefresh = 0;
4377
+ this.enabledcols = true;
4377
4378
  this.enablednew = true;
4378
4379
  this.enablededit = true;
4379
4380
  this.enableddelete = true;
@@ -4418,12 +4419,15 @@
4418
4419
  this.icons = [];
4419
4420
  this.colunasItens = [];
4420
4421
  this.colunasHeaders = [];
4422
+ this.colunasPadraoHeaders = [];
4421
4423
  this.colunasType = [];
4422
4424
  this.colunasWidth = [];
4423
4425
  this.colunasTranslate = [];
4424
4426
  this.colunasHtml = [];
4425
4427
  this.currentUrl = null;
4426
4428
  this.url = null;
4429
+ this.chaveStorage = 'cols';
4430
+ this.identificador = null;
4427
4431
  this.parentIdUrlChange = new i0.EventEmitter();
4428
4432
  this.parentIdUrlValue = null;
4429
4433
  this._cols = '';
@@ -4495,6 +4499,7 @@
4495
4499
  */
4496
4500
  InfoGridComponent.prototype.ngAfterViewInit = function () {
4497
4501
  var _this = this;
4502
+ this.identificador = this.api + '_' + this.method;
4498
4503
  this.showPagebar = this.pagetitle != '' || this.prefixtitle != '';
4499
4504
  if (!this.fullarea && this._platform.Config.ux <= 2)
4500
4505
  this.fullarea = this.showPagebar;
@@ -4545,8 +4550,44 @@
4545
4550
  if (this.cols == '')
4546
4551
  alert('Nenhuma coluna informada');
4547
4552
  if (this.cols != '') {
4553
+ /** @type {?} */
4554
+ var colunasOcultas_1 = [];
4555
+ if (localStorage.getItem(this.chaveStorage) != null) {
4556
+ /** @type {?} */
4557
+ var dadosStorage = JSON.parse(localStorage.getItem(this.chaveStorage));
4558
+ if (dadosStorage.findIndex(( /**
4559
+ * @param {?} c
4560
+ * @return {?}
4561
+ */function (/**
4562
+ * @param {?} c
4563
+ * @return {?}
4564
+ */ c) { return c.Identificador == _this.identificador; })) > -1) {
4565
+ colunasOcultas_1 = dadosStorage.find(( /**
4566
+ * @param {?} c
4567
+ * @return {?}
4568
+ */function (/**
4569
+ * @param {?} c
4570
+ * @return {?}
4571
+ */ c) { return c.Identificador == _this.identificador; })).Colunas;
4572
+ if (colunasOcultas_1.length > 0)
4573
+ colunasOcultas_1 = colunasOcultas_1.filter(( /**
4574
+ * @param {?} c
4575
+ * @return {?}
4576
+ */function (/**
4577
+ * @param {?} c
4578
+ * @return {?}
4579
+ */ c) { return !c.Exibir; })).map(( /**
4580
+ * @param {?} c
4581
+ * @return {?}
4582
+ */function (/**
4583
+ * @param {?} c
4584
+ * @return {?}
4585
+ */ c) { return c.Nome; }));
4586
+ }
4587
+ }
4548
4588
  this.colunasItens = [];
4549
4589
  this.colunasHeaders = [];
4590
+ this.colunasPadraoHeaders = [];
4550
4591
  this.colunasType = [];
4551
4592
  this.colunasWidth = [];
4552
4593
  this.colunasTranslate = [];
@@ -4601,12 +4642,15 @@
4601
4642
  if (width.indexOf('%') < 0 && width.indexOf('px') < 0)
4602
4643
  width += 'px';
4603
4644
  }
4604
- _this.colunasItens.push(column);
4605
- _this.colunasHeaders.push(header);
4606
- _this.colunasType.push(type == '' ? 'label' : type);
4607
- _this.colunasWidth.push(width);
4608
- _this.colunasTranslate.push(translate);
4609
- _this.colunasHtml.push(html);
4645
+ if (colunasOcultas_1.indexOf(header) < 0) {
4646
+ _this.colunasItens.push(column);
4647
+ _this.colunasHeaders.push(header);
4648
+ _this.colunasType.push(type == '' ? 'label' : type);
4649
+ _this.colunasWidth.push(width);
4650
+ _this.colunasTranslate.push(translate);
4651
+ _this.colunasHtml.push(html);
4652
+ }
4653
+ _this.colunasPadraoHeaders.push(header);
4610
4654
  }));
4611
4655
  if (this.colunasItens.length == 1 && this.colunasWidth.length == 1)
4612
4656
  this.colunasWidth[0] = '100%';
@@ -4964,6 +5008,35 @@
4964
5008
  }
4965
5009
  }));
4966
5010
  };
5011
+ /**
5012
+ * @return {?}
5013
+ */
5014
+ InfoGridComponent.prototype.customizeTable = function () {
5015
+ var _this = this;
5016
+ this._prop.set(InfoPageAction.Edit, {
5017
+ Identificador: this.identificador,
5018
+ Colunas: this.colunasPadraoHeaders,
5019
+ Chave: this.chaveStorage
5020
+ });
5021
+ this._prop.modalAction = InfoModalAction.None;
5022
+ /** @type {?} */
5023
+ var ref = this.modal.open(InfoGridModalComponent, {
5024
+ data: this._prop,
5025
+ disableClose: true,
5026
+ width: '500px'
5027
+ });
5028
+ ref.afterClosed().subscribe(( /**
5029
+ * @param {?} r
5030
+ * @return {?}
5031
+ */function (r) {
5032
+ if (r == null)
5033
+ return;
5034
+ if (r.modalAction == InfoModalAction.Save) {
5035
+ _this.setColumns();
5036
+ _this.getData();
5037
+ }
5038
+ }));
5039
+ };
4967
5040
  /**
4968
5041
  * @return {?}
4969
5042
  */
@@ -5073,6 +5146,7 @@
5073
5146
  var _this = this;
5074
5147
  if (modalComponent === void 0) { modalComponent = this.form; }
5075
5148
  if (width === void 0) { width = this.width; }
5149
+ this._prop.modalAction = InfoModalAction.None;
5076
5150
  /** @type {?} */
5077
5151
  var ref = this.modal.open(modalComponent, {
5078
5152
  data: this._prop,
@@ -5222,9 +5296,9 @@
5222
5296
  InfoGridComponent.decorators = [
5223
5297
  { type: i0.Component, args: [{
5224
5298
  selector: 'info-grid',
5225
- template: "<info-pagebar *ngIf=\"showPagebar\" icon=\"work\" [pagetitle]=\"pagebarTitle\" [description]=\"description\">\r\n <button mat-button type=\"button\" *ngIf=\"backurl != null && backurl != ''\" color=\"primary\" (click)=\"back()\">\r\n <mat-icon class=\"fs-20\">chevron_left</mat-icon>{{\"Voltar\" | translate}}\r\n </button>\r\n\r\n <ng-container *ngFor=\"let b of pagebarbuttons\">\r\n <button type=\"button\" mat-button color=\"primary\" (click)=\"b.modal == null ? navigateTo(b.url, false, null) : openCustomModal(b.modal, b.modalwidth, null)\">\r\n <mat-icon *ngIf=\"b.icon != 'chevron_right'\" class=\"fs-20\">{{ b.icon }}</mat-icon>\r\n {{ b.label | translate }}\r\n </button>\r\n </ng-container>\r\n\r\n <button mat-button type=\"button\" *ngIf=\"searchmodel != null && !enabledSearch\" color=\"primary\" (click)=\"enabledSearch = !enabledSearch\">\r\n <mat-icon class=\"fs-20\">search</mat-icon> {{ \"Pesquisar\" | translate}}\r\n </button>\r\n\r\n <button mat-button type=\"button\" *ngIf=\"searchmodel != null && enabledSearch\" color=\"primary\" (click)=\"enabledSearch = !enabledSearch\">\r\n <mat-icon class=\"fs-20\">search_off</mat-icon> {{ \"Ocultar\" | translate}}\r\n </button>\r\n\r\n <button mat-button type=\"button\" *ngIf=\"enablednew && hasPermissionNew\" color=\"primary\" (click)=\"add()\">\r\n <mat-icon class=\"fs-20\">add</mat-icon> {{ newlabel | translate}}\r\n </button>\r\n</info-pagebar>\r\n\r\n<div [ngClass]=\"{ 'table-full': fullarea }\">\r\n <div class=\"table-responsive white\">\r\n <div class=\"table-title grid-search\" [ngStyle]=\"{ 'padding': (enabledSearch ? 10 : 0) + 'px 20px' }\">\r\n <form autocomplete=\"off\" #formSearch=\"ngForm\" (ngSubmit)=\"search()\">\r\n <div *ngIf=\"enabledSearch\" class=\"search-container row\">\r\n <div class=\"col-md-{{(searchbuttons || []).length == 0 ? '10' : '9' }}\">\r\n <div class=\"row\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n <div class=\"col-md-{{(searchbuttons || []).length == 0 ? '2' : '3' }} align-right\" *ngIf=\"searchmodel != null\">\r\n <div class=\"search-buttons \">\r\n <ng-container *ngIf=\"searchonlyonebutton\">\r\n <button mat-button type=\"submit\" color=\"primary\" [disabled]=\"formSearch.invalid || loading\">\r\n {{ 'Buscar' | translate }}\r\n </button>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"!searchonlyonebutton\">\r\n <button mat-button type=\"button\" color=\"warn\" (click)=\"cancelSearch()\" *ngIf=\"enabledcancelsearch\">\r\n <mat-icon class=\"fs-20\">close</mat-icon>\r\n </button>\r\n <button mat-button type=\"submit\" color=\"primary\" [disabled]=\"formSearch.invalid || loading\">\r\n <mat-icon class=\"fs-20\">search</mat-icon>\r\n </button>\r\n \r\n <ng-container *ngFor=\"let b of searchbuttons\">\r\n <button mat-button type=\"button\" color=\"primary\" [disabled]=\"formSearch.invalid || loading\" (click)=\"b.method()\">\r\n <mat-icon *ngIf=\"b.icon\" class=\"fs-20\">{{b.icon | translate}}</mat-icon> {{b.label | translate}}\r\n </button>\r\n </ng-container>\r\n \r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n\r\n <fieldset *ngIf=\"!showPagebar\"><legend [innerHTML]=\"pagebarTitle | translate\"></legend></fieldset>\r\n <section class=\"loading-bar\"><mat-progress-bar color=\"primary\" mode=\"indeterminate\" *ngIf=\"loading\"></mat-progress-bar></section>\r\n\r\n <div id=\"auto-refresh\" *ngIf=\"autorefresh > 0\">\r\n <i class=\"material-icons\" matTooltip=\"{{ 'AutoRefresh' | translate }} {{ autorefresh }} seg\" matTooltipPosition=\"left\">access_time</i>\r\n </div>\r\n\r\n <table class=\"table table-hover\" [ngStyle]=\"{ 'min-height.px': tableHeight }\" [ngClass]=\"{ 'loading': loading, 'clickaccess': enabledclickaccess }\" *ngIf=\"data != null\">\r\n <thead>\r\n <tr>\r\n <th style=\"width: 5%;\" *ngIf=\"enabledclassicons && data?.length > 0 && data[0]?.Icon != null\"></th>\r\n\r\n <ng-container *ngFor=\"let col of colunasHeaders; let i = index\">\r\n <th *ngIf=\"colunasWidth[i] == ''\" [class]=\"'col_' + col.toLowerCase()\" [ngClass]=\"{ 'text-center': colunasType[i] == 'check', 'align-right': colunasType[i].startsWith('n') }\">{{ col | translate }}</th>\r\n <th *ngIf=\"colunasWidth[i] != ''\" [ngStyle]=\"{ 'width': colunasWidth[i] }\" [ngClass]=\"{ 'text-center': colunasType[i] == 'check', 'align-right': colunasType[i].startsWith('n') }\">{{ col | translate }}</th>\r\n </ng-container>\r\n\r\n <th class=\"actions align-right buttons\" *ngIf=\"(templateurl != '') || (buttons != null && buttons.length > 0) || enableddetail || enabledview || ((disabledcol == '') && enablededit && hasPermissionEdit) || ((disabledcol == '') && enableddelete && hasPermissionDelete)\">\r\n <button mat-icon-button type=\"button\"[matTooltip]=\"newlabel | translate\" matTooltipPosition=\"left\" (click)=\"add()\" *ngIf=\"!showPagebar && enablednew && hasPermissionNew\">\r\n <mat-icon>add_circle_outline</mat-icon>\r\n </button>\r\n </th>\r\n </tr>\r\n </thead>\r\n <tbody class=\"grid-content\">\r\n <tr *ngFor=\"let mod of data\" [ngClass]=\"{ 'default-color': !enabledclassicons }\" [class]=\"mod.Class\" (click)=\"access(mod)\">\r\n <td *ngIf=\"enabledclassicons && mod?.Icon != null\">\r\n <ng-container *ngFor=\"let icon of icons\">\r\n <i class=\"material-icons\" [matTooltip]=\"icon.Tooltip | translate\" *ngIf=\"icon.Name == mod.Icon\" [ngClass]=\"{ 'icone-secundario': icon.Principal == false }\">{{icon.Icon}}</i>\r\n </ng-container>\r\n </td>\r\n\r\n <ng-container *ngFor=\"let col of colunasItens; let i = index\">\r\n <td *ngIf=\"mod[col] == null || mod[col] == undefined\"></td>\r\n <ng-container [ngSwitch]=\"colunasType[i]\" *ngIf=\"mod[col] != null && mod[col] != undefined\">\r\n <ng-container *ngSwitchCase=\"'label'\">\r\n <td *ngIf=\"mod[col] !== true && mod[col] !== false && mod[col] !== 0 && mod[col] !== '0'\" >\r\n <label *ngIf=\"colunasHtml[i] === true\" [outerHTML]=\"(mod[col] | translate:colunasTranslate[i]) || ''\"></label>\r\n <label *ngIf=\"colunasHtml[i] === false\">{{ (mod[col] | translate:colunasHtml[i]) || '' }}</label>\r\n <p *ngIf=\"i == 0 && mod.Badge != null && mod.Badge != undefined\">{{ mod.Badge | translate:colunasTranslate[i] }}</p>\r\n </td>\r\n <td *ngIf=\"mod[col] === true\"><mat-icon>check_box</mat-icon></td>\r\n <td *ngIf=\"mod[col] === false\"><mat-icon>check_box_outline_blank</mat-icon></td>\r\n <td *ngIf=\"mod[col] === 0 || mod[col] === '0'\">0</td>\r\n </ng-container>\r\n\r\n <td nowrap *ngSwitchCase=\"'date'\" [innerHTML]=\"mod[col] | date:'shortDate'\"></td>\r\n <td nowrap *ngSwitchCase=\"'datetime'\">{{ mod[col] | date:'shortDate' }} {{ mod[col] | date:'mediumTime' }}</td>\r\n <td nowrap *ngSwitchCase=\"'monthyear'\" [innerHTML]=\"mod[col] | date:'MM/yyyy'\"></td>\r\n <td nowrap *ngSwitchCase=\"'n0'\" [class]=\"'align-right ' + (mod[col] < 0 ? 'text-red' : '')\">{{ mod[col] | number:'1.0-0' }}</td>\r\n <td nowrap *ngSwitchCase=\"'n2'\" [class]=\"'align-right ' + (mod[col] < 0 ? 'text-red' : '')\">{{ mod[col] | number:'1.2-2' }}</td>\r\n <td nowrap *ngSwitchCase=\"'n4'\" [class]=\"'align-right ' + (mod[col] < 0 ? 'text-red' : '')\">{{ mod[col] | number:'1.4-4' }}</td>\r\n <td nowrap *ngSwitchCase=\"'n6'\" [class]=\"'align-right ' + (mod[col] < 0 ? 'text-red' : '')\">{{ mod[col] | number:'1.6-6' }}</td>\r\n <td nowrap *ngSwitchCase=\"'n9'\" [class]=\"'align-right ' + (mod[col] < 0 ? 'text-red' : '')\">{{ mod[col] | number:'1.9-9' }}</td>\r\n <td nowrap *ngSwitchCase=\"'n12'\" [class]=\"'align-right ' + (mod[col] < 0 ? 'text-red' : '')\">{{ mod[col] | number:'1.12-12' }}</td>\r\n \r\n <td *ngSwitchCase=\"'check'\" class=\"text-center\">\r\n <ng-container *ngIf=\"mod[col] != null && (mod[col] === true || mod[col] == 1 || mod[col].toLowerCase() == 's'); then checked; else unchecked\"></ng-container>\r\n <ng-template #checked><mat-icon>check_box</mat-icon></ng-template>\r\n <ng-template #unchecked><mat-icon>check_box_outline_blank</mat-icon></ng-template>\r\n </td>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"enabledclickaccess\">\r\n <td class=\"td-actions clickaccess\">\r\n <button mat-icon-button type=\"button\" (click)=\"access(mod)\" *ngIf=\"enabledview\">\r\n <mat-icon>{{accessicon || 'arrow_forward'}}</mat-icon>\r\n </button>\r\n </td>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"!enabledclickaccess\">\r\n <td class=\"td-actions\" *ngIf=\"(templateurl != '') || (buttons != null && buttons.length > 0) || (mod.Download != null) || enableddetail || (mod?.Info != null) || enabledview || ((disabledcol == '' || mod[disabledcol] === true) && enablededit && hasPermissionEdit) || ((disabledcol == '' || mod[disabledcol] === true) && enableddelete && hasPermissionDelete)\">\r\n\r\n <a mat-icon-button href=\"{{ templateurl.replace('{id}', mod.Id) }}\" target=\"_blank\" [matTooltip]=\"'Abrir' | translate\" *ngIf=\"templateurl != ''\">\r\n <mat-icon>visibility</mat-icon>\r\n </a>\r\n\r\n <ng-container *ngFor=\"let b of buttons\">\r\n <button mat-icon-button type=\"button\" [matTooltip]=\"b.label | translate\" (click)=\"b.modalComponent != null ? openCustomModal(b.modalComponent, b.widthModalComponent, mod) : b.api != null ? eventButton(mod, b.api, b.method, b.confirm) : navigateTo(b.navigateTo, b.passId, mod.Id)\" *ngIf=\"b.showOnlyClass == null || b.showOnlyClass == mod.Class\" [disabled]=\"b.disabledField && mod[b.disabledField] === true\">\r\n <mat-icon>{{b.icon}}</mat-icon>\r\n </button>\r\n </ng-container>\r\n\r\n <button mat-icon-button type=\"button\" [matTooltip]=\"'Download' | translate\" (click)=\"download(mod.Download)\" *ngIf=\"mod.Download != null\">\r\n <mat-icon>file_download</mat-icon>\r\n </button>\r\n \r\n <button mat-icon-button type=\"button\" [matTooltip]=\"'Detalhe' | translate\" (click)=\"detail(mod)\" *ngIf=\"enableddetail\">\r\n <mat-icon>list</mat-icon>\r\n </button>\r\n \r\n <button mat-icon-button type=\"button\" [matTooltip]=\"'Informacao' | translate\" (click)=\"info(mod?.Info)\" *ngIf=\"mod?.Info != null\" [disabled]=\"mod?.Info == ''\">\r\n <mat-icon>info</mat-icon>\r\n </button>\r\n \r\n <!-- <button mat-icon-button type=\"button\" [matTooltip]=\"'Visualizar' | translate\" (click)=\"view(mod)\" *ngIf=\"enabledview\">\r\n <mat-icon>visibility</mat-icon>\r\n </button>\r\n \r\n <button mat-icon-button type=\"button\" [matTooltip]=\"'Editar' | translate\" (click)=\"edit(mod)\" *ngIf=\"(disabledcol == '' || mod[disabledcol] === true) && enablededit && hasPermissionEdit\">\r\n <mat-icon>edit</mat-icon>\r\n </button> -->\r\n \r\n <button mat-icon-button type=\"button\" [matTooltip]=\"'Excluir' | translate\" (click)=\"delete(mod)\" *ngIf=\"(disabledcol == '' || mod[disabledcol] === true) && enableddelete && hasPermissionDelete && !mod.HideDelete\">\r\n <mat-icon>delete</mat-icon>\r\n </button>\r\n\r\n <button mat-icon-button type=\"button\" [matTooltip]=\"'Acessar' | translate\" (click)=\"edit(mod)\" *ngIf=\"((disabledcol == '' || mod[disabledcol] === true) && enablededit && hasPermissionEdit) || enabledview\">\r\n <mat-icon>arrow_forward</mat-icon>\r\n </button>\r\n </td>\r\n </ng-container>\r\n </tr>\r\n </tbody>\r\n </table>\r\n <span class=\"blank-table\" *ngIf=\"data != null && data.length == 0\">{{\"NenhumItemEncontrado\" | translate}}</span>\r\n\r\n <info-paginator #paginator [hidden]=\"!paged || (data != null && data.length == 0)\" [size]=\"size\" (change)=\"changePage($event)\" ></info-paginator>\r\n </div>\r\n</div>\r\n\r\n<div class=\"block\" *ngIf=\"loading\"></div>\r\n<info-alert [messages]=\"messages\"></info-alert>",
5299
+ template: "<info-pagebar *ngIf=\"showPagebar\" icon=\"work\" [pagetitle]=\"pagebarTitle\" [description]=\"description\">\r\n <button mat-button type=\"button\" *ngIf=\"backurl != null && backurl != ''\" color=\"primary\" (click)=\"back()\">\r\n <mat-icon class=\"fs-20\">chevron_left</mat-icon>{{\"Voltar\" | translate}}\r\n </button>\r\n\r\n <ng-container *ngFor=\"let b of pagebarbuttons\">\r\n <button type=\"button\" mat-button color=\"primary\" (click)=\"b.modal == null ? navigateTo(b.url, false, null) : openCustomModal(b.modal, b.modalwidth, null)\">\r\n <mat-icon *ngIf=\"b.icon != 'chevron_right'\" class=\"fs-20\">{{ b.icon }}</mat-icon>\r\n {{ b.label | translate }}\r\n </button>\r\n </ng-container>\r\n\r\n <button mat-button type=\"button\" *ngIf=\"searchmodel != null && !enabledSearch\" color=\"primary\" (click)=\"enabledSearch = !enabledSearch\">\r\n <mat-icon class=\"fs-20\">search</mat-icon> {{ \"Pesquisar\" | translate}}\r\n </button>\r\n\r\n <button mat-button type=\"button\" *ngIf=\"searchmodel != null && enabledSearch\" color=\"primary\" (click)=\"enabledSearch = !enabledSearch\">\r\n <mat-icon class=\"fs-20\">search_off</mat-icon> {{ \"Ocultar\" | translate}}\r\n </button>\r\n\r\n <button mat-button type=\"button\" *ngIf=\"enablednew && hasPermissionNew\" color=\"primary\" (click)=\"add()\">\r\n <mat-icon class=\"fs-20\">add</mat-icon> {{ newlabel | translate}}\r\n </button>\r\n</info-pagebar>\r\n\r\n<div [ngClass]=\"{ 'table-full': fullarea }\">\r\n <div class=\"table-responsive white\">\r\n <div class=\"table-title grid-search\" [ngStyle]=\"{ 'padding': (enabledSearch ? 10 : 0) + 'px 20px' }\">\r\n <form autocomplete=\"off\" #formSearch=\"ngForm\" (ngSubmit)=\"search()\">\r\n <div *ngIf=\"enabledSearch\" class=\"search-container row\">\r\n <div class=\"col-md-{{(searchbuttons || []).length == 0 ? '10' : '9' }}\">\r\n <div class=\"row\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n <div class=\"col-md-{{(searchbuttons || []).length == 0 ? '2' : '3' }} align-right\" *ngIf=\"searchmodel != null\">\r\n <div class=\"search-buttons \">\r\n <ng-container *ngIf=\"searchonlyonebutton\">\r\n <button mat-button type=\"submit\" color=\"primary\" [disabled]=\"formSearch.invalid || loading\">\r\n {{ 'Buscar' | translate }}\r\n </button>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"!searchonlyonebutton\">\r\n <button mat-button type=\"button\" color=\"warn\" (click)=\"cancelSearch()\" *ngIf=\"enabledcancelsearch\">\r\n <mat-icon class=\"fs-20\">close</mat-icon>\r\n </button>\r\n <button mat-button type=\"submit\" color=\"primary\" [disabled]=\"formSearch.invalid || loading\">\r\n <mat-icon class=\"fs-20\">search</mat-icon>\r\n </button>\r\n \r\n <ng-container *ngFor=\"let b of searchbuttons\">\r\n <button mat-button type=\"button\" color=\"primary\" [disabled]=\"formSearch.invalid || loading\" (click)=\"b.method()\">\r\n <mat-icon *ngIf=\"b.icon\" class=\"fs-20\">{{b.icon | translate}}</mat-icon> {{b.label | translate}}\r\n </button>\r\n </ng-container>\r\n \r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n\r\n <fieldset *ngIf=\"!showPagebar\"><legend [innerHTML]=\"pagebarTitle | translate\"></legend></fieldset>\r\n <section class=\"loading-bar\"><mat-progress-bar color=\"primary\" mode=\"indeterminate\" *ngIf=\"loading\"></mat-progress-bar></section>\r\n\r\n <div id=\"auto-refresh\" *ngIf=\"autorefresh > 0\">\r\n <i class=\"material-icons\" matTooltip=\"{{ 'AutoRefresh' | translate }} {{ autorefresh }} seg\" matTooltipPosition=\"left\">access_time</i>\r\n </div>\r\n\r\n <table class=\"table table-hover\" [ngStyle]=\"{ 'min-height.px': tableHeight }\" [ngClass]=\"{ 'loading': loading, 'clickaccess': enabledclickaccess }\" *ngIf=\"data != null\">\r\n <thead>\r\n <tr>\r\n <th style=\"width: 5%;\" *ngIf=\"enabledclassicons && data?.length > 0 && data[0]?.Icon != null\"></th>\r\n\r\n <ng-container *ngFor=\"let col of colunasHeaders; let i = index\">\r\n <th *ngIf=\"colunasWidth[i] == ''\" [class]=\"'col_' + col.toLowerCase()\" [ngClass]=\"{ 'text-center': colunasType[i] == 'check', 'align-right': colunasType[i].startsWith('n') }\">{{ col | translate }}</th>\r\n <th *ngIf=\"colunasWidth[i] != ''\" [ngStyle]=\"{ 'width': colunasWidth[i] }\" [ngClass]=\"{ 'text-center': colunasType[i] == 'check', 'align-right': colunasType[i].startsWith('n') }\">{{ col | translate }}</th>\r\n </ng-container>\r\n\r\n <th class=\"actions align-right buttons\" *ngIf=\"(templateurl != '') || (buttons != null && buttons.length > 0) || enableddetail || enabledview || enabledcols || ((disabledcol == '') && enablededit && hasPermissionEdit) || ((disabledcol == '') && enableddelete && hasPermissionDelete)\">\r\n <button mat-icon-button type=\"button\"[matTooltip]=\"newlabel | translate\" matTooltipPosition=\"left\" (click)=\"add()\" *ngIf=\"!showPagebar && enablednew && hasPermissionNew\">\r\n <mat-icon>add_circle_outline</mat-icon>\r\n </button>\r\n <button mat-icon-button type=\"button\" class=\"managercols\" [matTooltip]=\"'CustomizarTabela' | translate\" matTooltipPosition=\"left\" (click)=\"customizeTable()\" *ngIf=\"enabledcols\">\r\n <mat-icon class=\"icon-out\">settings</mat-icon>\r\n </button>\r\n </th>\r\n </tr>\r\n </thead>\r\n <tbody class=\"grid-content\">\r\n <tr *ngFor=\"let mod of data\" [ngClass]=\"{ 'default-color': !enabledclassicons }\" [class]=\"mod.Class\" (click)=\"access(mod)\">\r\n <td *ngIf=\"enabledclassicons && mod?.Icon != null\">\r\n <ng-container *ngFor=\"let icon of icons\">\r\n <i class=\"material-icons\" [matTooltip]=\"icon.Tooltip | translate\" *ngIf=\"icon.Name == mod.Icon\" [ngClass]=\"{ 'icone-secundario': icon.Principal == false }\">{{icon.Icon}}</i>\r\n </ng-container>\r\n </td>\r\n\r\n <ng-container *ngFor=\"let col of colunasItens; let i = index\">\r\n <td *ngIf=\"mod[col] == null || mod[col] == undefined\"></td>\r\n <ng-container [ngSwitch]=\"colunasType[i]\" *ngIf=\"mod[col] != null && mod[col] != undefined\">\r\n <ng-container *ngSwitchCase=\"'label'\">\r\n <td *ngIf=\"mod[col] !== true && mod[col] !== false && mod[col] !== 0 && mod[col] !== '0'\" >\r\n <label *ngIf=\"colunasHtml[i] === true\" [outerHTML]=\"(mod[col] | translate:colunasTranslate[i]) || ''\"></label>\r\n <label *ngIf=\"colunasHtml[i] === false\">{{ (mod[col] | translate:colunasHtml[i]) || '' }}</label>\r\n <p *ngIf=\"i == 0 && mod.Badge != null && mod.Badge != undefined\">{{ mod.Badge | translate:colunasTranslate[i] }}</p>\r\n </td>\r\n <td *ngIf=\"mod[col] === true\"><mat-icon>check_box</mat-icon></td>\r\n <td *ngIf=\"mod[col] === false\"><mat-icon>check_box_outline_blank</mat-icon></td>\r\n <td *ngIf=\"mod[col] === 0 || mod[col] === '0'\">0</td>\r\n </ng-container>\r\n\r\n <td nowrap *ngSwitchCase=\"'date'\" [innerHTML]=\"mod[col] | date:'shortDate'\"></td>\r\n <td nowrap *ngSwitchCase=\"'datetime'\">{{ mod[col] | date:'shortDate' }} {{ mod[col] | date:'mediumTime' }}</td>\r\n <td nowrap *ngSwitchCase=\"'monthyear'\" [innerHTML]=\"mod[col] | date:'MM/yyyy'\"></td>\r\n <td nowrap *ngSwitchCase=\"'n0'\" [class]=\"'align-right ' + (mod[col] < 0 ? 'text-red' : '')\">{{ mod[col] | number:'1.0-0' }}</td>\r\n <td nowrap *ngSwitchCase=\"'n2'\" [class]=\"'align-right ' + (mod[col] < 0 ? 'text-red' : '')\">{{ mod[col] | number:'1.2-2' }}</td>\r\n <td nowrap *ngSwitchCase=\"'n4'\" [class]=\"'align-right ' + (mod[col] < 0 ? 'text-red' : '')\">{{ mod[col] | number:'1.4-4' }}</td>\r\n <td nowrap *ngSwitchCase=\"'n6'\" [class]=\"'align-right ' + (mod[col] < 0 ? 'text-red' : '')\">{{ mod[col] | number:'1.6-6' }}</td>\r\n <td nowrap *ngSwitchCase=\"'n9'\" [class]=\"'align-right ' + (mod[col] < 0 ? 'text-red' : '')\">{{ mod[col] | number:'1.9-9' }}</td>\r\n <td nowrap *ngSwitchCase=\"'n12'\" [class]=\"'align-right ' + (mod[col] < 0 ? 'text-red' : '')\">{{ mod[col] | number:'1.12-12' }}</td>\r\n \r\n <td *ngSwitchCase=\"'check'\" class=\"text-center\">\r\n <ng-container *ngIf=\"mod[col] != null && (mod[col] === true || mod[col] == 1 || mod[col].toLowerCase() == 's'); then checked; else unchecked\"></ng-container>\r\n <ng-template #checked><mat-icon>check_box</mat-icon></ng-template>\r\n <ng-template #unchecked><mat-icon>check_box_outline_blank</mat-icon></ng-template>\r\n </td>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"enabledclickaccess\">\r\n <td class=\"td-actions clickaccess\">\r\n <button mat-icon-button type=\"button\" (click)=\"access(mod)\" *ngIf=\"enabledview\">\r\n <mat-icon>{{accessicon || 'arrow_forward'}}</mat-icon>\r\n </button>\r\n </td>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"!enabledclickaccess\">\r\n <td class=\"td-actions\" *ngIf=\"(templateurl != '') || (buttons != null && buttons.length > 0) || (mod.Download != null) || enableddetail || (mod?.Info != null) || enabledview || ((disabledcol == '' || mod[disabledcol] === true) && enablededit && hasPermissionEdit) || ((disabledcol == '' || mod[disabledcol] === true) && enableddelete && hasPermissionDelete)\">\r\n\r\n <a mat-icon-button href=\"{{ templateurl.replace('{id}', mod.Id) }}\" target=\"_blank\" [matTooltip]=\"'Abrir' | translate\" *ngIf=\"templateurl != ''\">\r\n <mat-icon>visibility</mat-icon>\r\n </a>\r\n\r\n <ng-container *ngFor=\"let b of buttons\">\r\n <button mat-icon-button type=\"button\" [matTooltip]=\"b.label | translate\" (click)=\"b.modalComponent != null ? openCustomModal(b.modalComponent, b.widthModalComponent, mod) : b.api != null ? eventButton(mod, b.api, b.method, b.confirm) : navigateTo(b.navigateTo, b.passId, mod.Id)\" *ngIf=\"b.showOnlyClass == null || b.showOnlyClass == mod.Class\" [disabled]=\"b.disabledField && mod[b.disabledField] === true\">\r\n <mat-icon>{{b.icon}}</mat-icon>\r\n </button>\r\n </ng-container>\r\n\r\n <button mat-icon-button type=\"button\" [matTooltip]=\"'Download' | translate\" (click)=\"download(mod.Download)\" *ngIf=\"mod.Download != null\">\r\n <mat-icon>file_download</mat-icon>\r\n </button>\r\n \r\n <button mat-icon-button type=\"button\" [matTooltip]=\"'Detalhe' | translate\" (click)=\"detail(mod)\" *ngIf=\"enableddetail\">\r\n <mat-icon>list</mat-icon>\r\n </button>\r\n \r\n <button mat-icon-button type=\"button\" [matTooltip]=\"'Informacao' | translate\" (click)=\"info(mod?.Info)\" *ngIf=\"mod?.Info != null\" [disabled]=\"mod?.Info == ''\">\r\n <mat-icon>info</mat-icon>\r\n </button>\r\n \r\n <!-- <button mat-icon-button type=\"button\" [matTooltip]=\"'Visualizar' | translate\" (click)=\"view(mod)\" *ngIf=\"enabledview\">\r\n <mat-icon>visibility</mat-icon>\r\n </button>\r\n \r\n <button mat-icon-button type=\"button\" [matTooltip]=\"'Editar' | translate\" (click)=\"edit(mod)\" *ngIf=\"(disabledcol == '' || mod[disabledcol] === true) && enablededit && hasPermissionEdit\">\r\n <mat-icon>edit</mat-icon>\r\n </button> -->\r\n \r\n <button mat-icon-button type=\"button\" [matTooltip]=\"'Excluir' | translate\" (click)=\"delete(mod)\" *ngIf=\"(disabledcol == '' || mod[disabledcol] === true) && enableddelete && hasPermissionDelete && !mod.HideDelete\">\r\n <mat-icon>delete</mat-icon>\r\n </button>\r\n\r\n <button mat-icon-button type=\"button\" [matTooltip]=\"'Acessar' | translate\" (click)=\"edit(mod)\" *ngIf=\"((disabledcol == '' || mod[disabledcol] === true) && enablededit && hasPermissionEdit) || enabledview\">\r\n <mat-icon>arrow_forward</mat-icon>\r\n </button>\r\n </td>\r\n </ng-container>\r\n </tr>\r\n </tbody>\r\n </table>\r\n <span class=\"blank-table\" *ngIf=\"data != null && data.length == 0\">{{\"NenhumItemEncontrado\" | translate}}</span>\r\n\r\n <info-paginator #paginator [hidden]=\"!paged || (data != null && data.length == 0)\" [size]=\"size\" (change)=\"changePage($event)\" ></info-paginator>\r\n </div>\r\n</div>\r\n\r\n<div class=\"block\" *ngIf=\"loading\"></div>\r\n<info-alert [messages]=\"messages\"></info-alert>",
5226
5300
  providers: [InfoFormPropModel],
5227
- styles: [":host{display:block;position:relative}:host #auto-refresh{background:transparent;margin:0;padding:0;position:absolute;right:0;top:8px}:host #auto-refresh i{cursor:default;font-size:18px}:host .table-title{background:#fcfcfc}:host .table-title .mat-icon-button{height:25px;line-height:25px;text-align:center;width:25px}:host .table-title .mat-icon-button .mat-icon{font-size:18px}:host .table-title :hover{transition:color .2s}:host .search-container{margin-top:10px;position:relative}:host .title-grid{font-size:.8rem;font-weight:700;padding-top:8px;text-transform:uppercase}:host table thead .col_dia,:host table thead .col_id{width:80px}:host table thead .col_moeda{width:90px}:host table thead .col_data,:host table thead .col_datacotacao,:host table thead .col_dataposicao,:host table thead .col_referencia{width:125px}:host table thead .col_conta,:host table thead .col_identificador{width:250px}:host table thead .col_cliente,:host table thead .col_descricao,:host table thead .col_nome{width:400px}:host table tbody .icone-secundario{font-size:12px}:host.uxc3 div.table-responsive .table-title{padding:0!important}:host.uxc3 div.table-responsive .table thead{background:transparent}:host.uxc3 div.table-responsive .table thead th{border-top:none;font-size:10px;padding:10px 5px 5px;text-transform:capitalize}:host.uxc3 div.table-responsive .table thead th.actions{border-bottom-width:0}:host.uxc3 div.table-responsive .table thead th:after{display:none}:host.uxc3 div.table-responsive .table tbody tr{background:#f9f9f9;height:40px}:host.uxc3 div.table-responsive .table tbody tr td{cursor:default;font-size:13px;font-weight:600;transition:color .2s ease-in-out}:host.uxc3 div.table-responsive .table tbody tr td.td-actions{border-bottom:none;margin-top:1px;padding-bottom:6px;padding-top:7px}:host.uxc3 div.table-responsive .table tbody tr td mat-icon{height:17px;line-height:17px}:host.uxc3 div.table-responsive .table tbody tr td p{border:1px solid;border-radius:3px;display:inline-block;font-size:8px;margin:0 0 0 5px;padding:2px 5px;position:relative;text-transform:uppercase;top:-2px}:host.uxc3 div.table-responsive .table tbody tr:hover{background:#f9f9f9}:host.uxc3 div.table-responsive .table tbody tr:nth-child(2n):hover,:host.uxc3 div.table-responsive .table tbody tr:nth-child(2n):hover .td-actions{background:#fff}"]
5301
+ styles: [":host{display:block;position:relative}:host #auto-refresh{background:transparent;margin:0;padding:0;position:absolute;right:0;top:8px}:host #auto-refresh i{cursor:default;font-size:18px}:host .table-title{background:#fcfcfc}:host .table-title .mat-icon-button{height:25px;line-height:25px;text-align:center;width:25px}:host .table-title .mat-icon-button .mat-icon{font-size:18px}:host .table-title :hover{transition:color .2s}:host .search-container{margin-top:10px;position:relative}:host .title-grid{font-size:.8rem;font-weight:700;padding-top:8px;text-transform:uppercase}:host table thead .col_dia,:host table thead .col_id{width:80px}:host table thead .col_moeda{width:90px}:host table thead .col_data,:host table thead .col_datacotacao,:host table thead .col_dataposicao,:host table thead .col_referencia{width:125px}:host table thead .col_conta,:host table thead .col_identificador{width:250px}:host table thead .col_cliente,:host table thead .col_descricao,:host table thead .col_nome{width:400px}:host table tbody .icone-secundario{font-size:12px}:host.uxc3 div.table-responsive .table-title{padding:0!important}:host.uxc3 div.table-responsive .table thead{background:transparent}:host.uxc3 div.table-responsive .table thead th{border-top:none;font-size:10px;padding:10px 5px 5px;text-transform:capitalize}:host.uxc3 div.table-responsive .table thead th.actions{border-bottom-width:0}:host.uxc3 div.table-responsive .table thead th:after{display:none}:host.uxc3 div.table-responsive .table thead th .managercols{opacity:0;right:0;top:-4px;transition:opacity .3s ease-in-out}:host.uxc3 div.table-responsive .table thead:hover .managercols{opacity:1!important}:host.uxc3 div.table-responsive .table tbody tr{background:#f9f9f9;height:40px}:host.uxc3 div.table-responsive .table tbody tr td{cursor:default;font-size:13px;font-weight:600;transition:color .2s ease-in-out}:host.uxc3 div.table-responsive .table tbody tr td.td-actions{border-bottom:none;margin-top:1px;padding-bottom:6px;padding-top:7px}:host.uxc3 div.table-responsive .table tbody tr td mat-icon{height:17px;line-height:17px}:host.uxc3 div.table-responsive .table tbody tr td p{border:1px solid;border-radius:3px;display:inline-block;font-size:8px;margin:0 0 0 5px;padding:2px 5px;position:relative;text-transform:uppercase;top:-2px}:host.uxc3 div.table-responsive .table tbody tr:hover{background:#f9f9f9}:host.uxc3 div.table-responsive .table tbody tr:nth-child(2n):hover,:host.uxc3 div.table-responsive .table tbody tr:nth-child(2n):hover .td-actions{background:#fff}"]
5228
5302
  }] }
5229
5303
  ];
5230
5304
  /** @nocollapse */
@@ -5265,6 +5339,7 @@
5265
5339
  paged: [{ type: i0.Input }],
5266
5340
  size: [{ type: i0.Input }],
5267
5341
  autorefresh: [{ type: i0.Input }],
5342
+ enabledcols: [{ type: i0.Input }],
5268
5343
  enablednew: [{ type: i0.Input }],
5269
5344
  enablededit: [{ type: i0.Input }],
5270
5345
  enableddelete: [{ type: i0.Input }],
@@ -5347,6 +5422,8 @@
5347
5422
  /** @type {?} */
5348
5423
  InfoGridComponent.prototype.autorefresh;
5349
5424
  /** @type {?} */
5425
+ InfoGridComponent.prototype.enabledcols;
5426
+ /** @type {?} */
5350
5427
  InfoGridComponent.prototype.enablednew;
5351
5428
  /** @type {?} */
5352
5429
  InfoGridComponent.prototype.enablededit;
@@ -5441,6 +5518,8 @@
5441
5518
  /** @type {?} */
5442
5519
  InfoGridComponent.prototype.colunasHeaders;
5443
5520
  /** @type {?} */
5521
+ InfoGridComponent.prototype.colunasPadraoHeaders;
5522
+ /** @type {?} */
5444
5523
  InfoGridComponent.prototype.colunasType;
5445
5524
  /** @type {?} */
5446
5525
  InfoGridComponent.prototype.colunasWidth;
@@ -5453,6 +5532,10 @@
5453
5532
  /** @type {?} */
5454
5533
  InfoGridComponent.prototype.url;
5455
5534
  /** @type {?} */
5535
+ InfoGridComponent.prototype.chaveStorage;
5536
+ /** @type {?} */
5537
+ InfoGridComponent.prototype.identificador;
5538
+ /** @type {?} */
5456
5539
  InfoGridComponent.prototype.paginator;
5457
5540
  /** @type {?} */
5458
5541
  InfoGridComponent.prototype.parentIdUrlChange;
@@ -5519,6 +5602,142 @@
5519
5602
  * @private
5520
5603
  */
5521
5604
  InfoGridComponent.prototype._element;
5605
+ }
5606
+ var InfoGridModalComponent = /** @class */ (function () {
5607
+ /**
5608
+ * @param {?} _prop
5609
+ * @param {?} _ref
5610
+ * @param {?} _modal
5611
+ */
5612
+ function InfoGridModalComponent(_prop, _ref, _modal) {
5613
+ this._prop = _prop;
5614
+ this._ref = _ref;
5615
+ this._modal = _modal;
5616
+ this.colunas = [];
5617
+ this.dadosStorage = null;
5618
+ }
5619
+ /**
5620
+ * @return {?}
5621
+ */
5622
+ InfoGridModalComponent.prototype.ngOnInit = function () {
5623
+ var _this = this;
5624
+ this.identificador = this._prop.data.Identificador;
5625
+ this.chaveStorage = this._prop.data.Chave;
5626
+ /** @type {?} */
5627
+ var colunasGrid = this._prop.data.Colunas.map(( /**
5628
+ * @param {?} c
5629
+ * @return {?}
5630
+ */function (/**
5631
+ * @param {?} c
5632
+ * @return {?}
5633
+ */ c) { return { Nome: c, Exibir: true, GridAtual: true }; }));
5634
+ if (localStorage.getItem(this.chaveStorage) == null)
5635
+ localStorage.setItem(this.chaveStorage, JSON.stringify([]));
5636
+ this.dadosStorage = JSON.parse(localStorage.getItem(this.chaveStorage));
5637
+ if (this.dadosStorage.findIndex(( /**
5638
+ * @param {?} c
5639
+ * @return {?}
5640
+ */function (/**
5641
+ * @param {?} c
5642
+ * @return {?}
5643
+ */ c) { return c.Identificador == _this.identificador; })) < 0)
5644
+ this.dadosStorage.push({ Identificador: this.identificador, Colunas: colunasGrid });
5645
+ /** @type {?} */
5646
+ var colunasGeral = this.dadosStorage.find(( /**
5647
+ * @param {?} c
5648
+ * @return {?}
5649
+ */function (/**
5650
+ * @param {?} c
5651
+ * @return {?}
5652
+ */ c) { return c.Identificador == _this.identificador; })).Colunas;
5653
+ //Adiciona possíveis novas colunas
5654
+ colunasGrid.filter(( /**
5655
+ * @param {?} g
5656
+ * @return {?}
5657
+ */function (/**
5658
+ * @param {?} g
5659
+ * @return {?}
5660
+ */ g) { return colunasGeral.map(( /**
5661
+ * @param {?} c
5662
+ * @return {?}
5663
+ */function (/**
5664
+ * @param {?} c
5665
+ * @return {?}
5666
+ */ c) { return c.Nome; })).indexOf(g.Nome) < 0; })).forEach(( /**
5667
+ * @param {?} novaColuna
5668
+ * @return {?}
5669
+ */function (/**
5670
+ * @param {?} novaColuna
5671
+ * @return {?}
5672
+ */ novaColuna) {
5673
+ colunasGeral.push(novaColuna);
5674
+ }));
5675
+ //Exibe apenas as colunas presentes no grid atual
5676
+ this.colunas = colunasGeral.map(( /**
5677
+ * @param {?} c
5678
+ * @return {?}
5679
+ */function (/**
5680
+ * @param {?} c
5681
+ * @return {?}
5682
+ */ c) { return (Object.assign(Object.assign({}, c), { GridAtual: colunasGrid.findIndex(( /**
5683
+ * @param {?} g
5684
+ * @return {?}
5685
+ */function (/**
5686
+ * @param {?} g
5687
+ * @return {?}
5688
+ */ g) { return g.Nome == c.Nome; })) > -1 })); }));
5689
+ };
5690
+ /**
5691
+ * @return {?}
5692
+ */
5693
+ InfoGridModalComponent.prototype.save = function () {
5694
+ var _this = this;
5695
+ this.dadosStorage.find(( /**
5696
+ * @param {?} c
5697
+ * @return {?}
5698
+ */function (/**
5699
+ * @param {?} c
5700
+ * @return {?}
5701
+ */ c) { return c.Identificador == _this.identificador; })).Colunas = this.colunas;
5702
+ localStorage.setItem(this.chaveStorage, JSON.stringify(this.dadosStorage));
5703
+ this._prop.modalAction = InfoModalAction.Save;
5704
+ this._ref.close(this._prop);
5705
+ };
5706
+ return InfoGridModalComponent;
5707
+ }());
5708
+ InfoGridModalComponent.decorators = [
5709
+ { type: i0.Component, args: [{
5710
+ template: "<info-modal (onsave)=\"save()\" modaltitle=\"CustomizarTabela\" >\r\n <info-message color=\"warning\" class=\"min\">\r\n <ul>\r\n <li><mat-icon class=\"icon-out\">info</mat-icon>{{ 'CustomizarTabelaDescricao1' | translate }}</li>\r\n <li><mat-icon class=\"icon-out\">dangerous</mat-icon>{{ 'CustomizarTabelaDescricao2' | translate }}</li>\r\n </ul>\r\n \r\n </info-message>\r\n \r\n <ul class=\"listagem\">\r\n <ng-container *ngFor=\"let item of colunas\" >\r\n <li *ngIf=\"item.GridAtual\" >\r\n <info-checkbox [(ngModel)]=\"item.Exibir\" [placeholder]=\"item.Nome\" [name]=\"'chkcoluna' + item.Nome\" ></info-checkbox>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n</info-modal>",
5711
+ providers: [InfoFormPropModel]
5712
+ }] }
5713
+ ];
5714
+ /** @nocollapse */
5715
+ InfoGridModalComponent.ctorParameters = function () { return [
5716
+ { type: InfoFormPropModel, decorators: [{ type: i0.Inject, args: [i6.MAT_DIALOG_DATA,] }] },
5717
+ { type: i6.MatDialogRef },
5718
+ { type: i6.MatDialog }
5719
+ ]; };
5720
+ if (false) {
5721
+ /** @type {?} */
5722
+ InfoGridModalComponent.prototype.identificador;
5723
+ /** @type {?} */
5724
+ InfoGridModalComponent.prototype.chaveStorage;
5725
+ /** @type {?} */
5726
+ InfoGridModalComponent.prototype.colunas;
5727
+ /** @type {?} */
5728
+ InfoGridModalComponent.prototype.dadosStorage;
5729
+ /** @type {?} */
5730
+ InfoGridModalComponent.prototype._prop;
5731
+ /**
5732
+ * @type {?}
5733
+ * @private
5734
+ */
5735
+ InfoGridModalComponent.prototype._ref;
5736
+ /**
5737
+ * @type {?}
5738
+ * @private
5739
+ */
5740
+ InfoGridModalComponent.prototype._modal;
5522
5741
  }
5523
5742
 
5524
5743
  /**
@@ -9153,6 +9372,7 @@
9153
9372
  InfoDateComponent,
9154
9373
  InfoDateMonthComponent,
9155
9374
  InfoGridComponent,
9375
+ InfoGridModalComponent,
9156
9376
  InfoInputComponent,
9157
9377
  InfoInputListComponent,
9158
9378
  InfoListCheckboxComponent,
@@ -9186,6 +9406,7 @@
9186
9406
  InfoDateComponent,
9187
9407
  InfoDateMonthComponent,
9188
9408
  InfoGridComponent,
9409
+ InfoGridModalComponent,
9189
9410
  InfoInputComponent,
9190
9411
  InfoInputListComponent,
9191
9412
  InfoListCheckboxComponent,
@@ -9255,6 +9476,7 @@
9255
9476
  exports.InfoFormPropModel = InfoFormPropModel;
9256
9477
  exports.InfoGridButtonModel = InfoGridButtonModel;
9257
9478
  exports.InfoGridComponent = InfoGridComponent;
9479
+ exports.InfoGridModalComponent = InfoGridModalComponent;
9258
9480
  exports.InfoInputComponent = InfoInputComponent;
9259
9481
  exports.InfoInputListComponent = InfoInputListComponent;
9260
9482
  exports.InfoLastSearchModel = InfoLastSearchModel;