info-library 2.10.75 → 2.10.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/info-library.umd.js +237 -8
- package/bundles/info-library.umd.js.map +1 -1
- package/bundles/info-library.umd.min.js +1 -1
- package/bundles/info-library.umd.min.js.map +1 -1
- package/controls/grid/grid.component.d.ts +19 -1
- package/esm2015/controls/alert/alert.component.js +1 -1
- package/esm2015/controls/autocomplete/autocomplete.component.js +1 -1
- package/esm2015/controls/big-checkbox/big-checkbox.component.js +1 -1
- package/esm2015/controls/card/card.component.js +1 -1
- package/esm2015/controls/card-menu/card-menu.component.js +1 -1
- package/esm2015/controls/checkbox/checkbox.component.js +1 -1
- package/esm2015/controls/chips/chips.component.js +1 -1
- package/esm2015/controls/date/date.component.js +1 -1
- package/esm2015/controls/date-month/date-month.component.js +1 -1
- package/esm2015/controls/editor/editor.component.js +1 -1
- package/esm2015/controls/grid/grid.component.js +208 -11
- package/esm2015/controls/input/input.component.js +1 -1
- package/esm2015/controls/input-list/input-list.component.js +1 -1
- package/esm2015/controls/list-checkbox/list-checkbox.component.js +1 -1
- package/esm2015/controls/message/message.component.js +1 -1
- package/esm2015/controls/multi-select/multi-select.component.js +1 -1
- package/esm2015/controls/paginator/paginator.component.js +1 -1
- package/esm2015/controls/select/select.component.js +1 -1
- package/esm2015/controls/timeline/timeline.component.js +1 -1
- package/esm2015/directives/mask.directive.js +1 -1
- package/esm2015/directives/unmask.directive.js +1 -1
- package/esm2015/enum/dialog-buttons.enum.js +1 -1
- package/esm2015/enum/index.js +1 -1
- package/esm2015/enum/modal-action.enum.js +1 -1
- package/esm2015/enum/page-action.enum.js +1 -1
- package/esm2015/global-config.js +1 -1
- package/esm2015/info-library.js +2 -2
- package/esm2015/info-library.module.js +4 -2
- package/esm2015/layouts/dialog/dialog.component.js +1 -1
- package/esm2015/layouts/loading/loading.component.js +1 -1
- package/esm2015/layouts/main/main.component.js +1 -1
- package/esm2015/layouts/modal/modal.component.js +1 -1
- package/esm2015/layouts/pagebar/pagebar.component.js +1 -1
- package/esm2015/layouts/sidebar/sidebar.component.js +1 -1
- package/esm2015/layouts/topbar/topbar.component.js +1 -1
- package/esm2015/layouts/topmenu/topmenu.component.js +1 -1
- package/esm2015/model/app-config.model.js +1 -1
- package/esm2015/model/data-access.model.js +1 -1
- package/esm2015/model/dialog-result.model.js +1 -1
- package/esm2015/model/dialog.model.js +1 -1
- package/esm2015/model/form-prop.model.js +1 -1
- package/esm2015/model/grid-button.model.js +1 -1
- package/esm2015/model/index.js +1 -1
- package/esm2015/model/last-search.model.js +1 -1
- package/esm2015/model/login.model.js +1 -1
- package/esm2015/model/method-grid-button.model.js +1 -1
- package/esm2015/model/notification.model.js +1 -1
- package/esm2015/model/pagebar-buttons.model.js +1 -1
- package/esm2015/model/permission.model.js +1 -1
- package/esm2015/model/platform.model.js +1 -1
- package/esm2015/model/session.model.js +1 -1
- package/esm2015/pipe/index.js +1 -1
- package/esm2015/pipe/mask.pipe.js +1 -1
- package/esm2015/pipe/translate.pipe.js +1 -1
- package/esm2015/public_api.js +2 -2
- package/esm2015/service/authentication.service.js +1 -1
- package/esm2015/service/configuration.service.js +1 -1
- package/esm2015/service/data.service.js +1 -1
- package/esm2015/service/index.js +1 -1
- package/esm2015/service/theme.service.js +1 -1
- package/esm2015/service/translate.service.js +1 -1
- package/esm2015/utils/utilities.js +1 -1
- package/fesm2015/info-library.js +208 -9
- package/fesm2015/info-library.js.map +1 -1
- package/info-library.metadata.json +1 -1
- package/package.json +1 -1
- package/public_api.d.ts +1 -1
|
@@ -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,11 +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 = [];
|
|
4426
|
+
this.colunasHtml = [];
|
|
4424
4427
|
this.currentUrl = null;
|
|
4425
4428
|
this.url = null;
|
|
4429
|
+
this.chaveStorage = 'cols';
|
|
4430
|
+
this.identificador = null;
|
|
4426
4431
|
this.parentIdUrlChange = new i0.EventEmitter();
|
|
4427
4432
|
this.parentIdUrlValue = null;
|
|
4428
4433
|
this._cols = '';
|
|
@@ -4494,6 +4499,7 @@
|
|
|
4494
4499
|
*/
|
|
4495
4500
|
InfoGridComponent.prototype.ngAfterViewInit = function () {
|
|
4496
4501
|
var _this = this;
|
|
4502
|
+
this.identificador = this.api + '_' + this.method;
|
|
4497
4503
|
this.showPagebar = this.pagetitle != '' || this.prefixtitle != '';
|
|
4498
4504
|
if (!this.fullarea && this._platform.Config.ux <= 2)
|
|
4499
4505
|
this.fullarea = this.showPagebar;
|
|
@@ -4544,11 +4550,48 @@
|
|
|
4544
4550
|
if (this.cols == '')
|
|
4545
4551
|
alert('Nenhuma coluna informada');
|
|
4546
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
|
+
}
|
|
4547
4588
|
this.colunasItens = [];
|
|
4548
4589
|
this.colunasHeaders = [];
|
|
4590
|
+
this.colunasPadraoHeaders = [];
|
|
4549
4591
|
this.colunasType = [];
|
|
4550
4592
|
this.colunasWidth = [];
|
|
4551
4593
|
this.colunasTranslate = [];
|
|
4594
|
+
this.colunasHtml = [];
|
|
4552
4595
|
this.cols.split(',').forEach(( /**
|
|
4553
4596
|
* @param {?} registro
|
|
4554
4597
|
* @return {?}
|
|
@@ -4558,7 +4601,9 @@
|
|
|
4558
4601
|
*/ registro) {
|
|
4559
4602
|
/** @type {?} */
|
|
4560
4603
|
var translate = registro.indexOf('#') == -1;
|
|
4561
|
-
|
|
4604
|
+
/** @type {?} */
|
|
4605
|
+
var html = registro.indexOf('@') == -1;
|
|
4606
|
+
registro = registro.replace(/#/g, '').replace(/@/g, '');
|
|
4562
4607
|
/** @type {?} */
|
|
4563
4608
|
var column = registro;
|
|
4564
4609
|
/** @type {?} */
|
|
@@ -4597,11 +4642,15 @@
|
|
|
4597
4642
|
if (width.indexOf('%') < 0 && width.indexOf('px') < 0)
|
|
4598
4643
|
width += 'px';
|
|
4599
4644
|
}
|
|
4600
|
-
|
|
4601
|
-
|
|
4602
|
-
|
|
4603
|
-
|
|
4604
|
-
|
|
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);
|
|
4605
4654
|
}));
|
|
4606
4655
|
if (this.colunasItens.length == 1 && this.colunasWidth.length == 1)
|
|
4607
4656
|
this.colunasWidth[0] = '100%';
|
|
@@ -4959,6 +5008,35 @@
|
|
|
4959
5008
|
}
|
|
4960
5009
|
}));
|
|
4961
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
|
+
};
|
|
4962
5040
|
/**
|
|
4963
5041
|
* @return {?}
|
|
4964
5042
|
*/
|
|
@@ -5068,6 +5146,7 @@
|
|
|
5068
5146
|
var _this = this;
|
|
5069
5147
|
if (modalComponent === void 0) { modalComponent = this.form; }
|
|
5070
5148
|
if (width === void 0) { width = this.width; }
|
|
5149
|
+
this._prop.modalAction = InfoModalAction.None;
|
|
5071
5150
|
/** @type {?} */
|
|
5072
5151
|
var ref = this.modal.open(modalComponent, {
|
|
5073
5152
|
data: this._prop,
|
|
@@ -5217,9 +5296,9 @@
|
|
|
5217
5296
|
InfoGridComponent.decorators = [
|
|
5218
5297
|
{ type: i0.Component, args: [{
|
|
5219
5298
|
selector: 'info-grid',
|
|
5220
|
-
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 [outerHTML]=\"(mod[col] | translate:colunasTranslate[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>",
|
|
5221
5300
|
providers: [InfoFormPropModel],
|
|
5222
|
-
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}"]
|
|
5223
5302
|
}] }
|
|
5224
5303
|
];
|
|
5225
5304
|
/** @nocollapse */
|
|
@@ -5260,6 +5339,7 @@
|
|
|
5260
5339
|
paged: [{ type: i0.Input }],
|
|
5261
5340
|
size: [{ type: i0.Input }],
|
|
5262
5341
|
autorefresh: [{ type: i0.Input }],
|
|
5342
|
+
enabledcols: [{ type: i0.Input }],
|
|
5263
5343
|
enablednew: [{ type: i0.Input }],
|
|
5264
5344
|
enablededit: [{ type: i0.Input }],
|
|
5265
5345
|
enableddelete: [{ type: i0.Input }],
|
|
@@ -5342,6 +5422,8 @@
|
|
|
5342
5422
|
/** @type {?} */
|
|
5343
5423
|
InfoGridComponent.prototype.autorefresh;
|
|
5344
5424
|
/** @type {?} */
|
|
5425
|
+
InfoGridComponent.prototype.enabledcols;
|
|
5426
|
+
/** @type {?} */
|
|
5345
5427
|
InfoGridComponent.prototype.enablednew;
|
|
5346
5428
|
/** @type {?} */
|
|
5347
5429
|
InfoGridComponent.prototype.enablededit;
|
|
@@ -5436,16 +5518,24 @@
|
|
|
5436
5518
|
/** @type {?} */
|
|
5437
5519
|
InfoGridComponent.prototype.colunasHeaders;
|
|
5438
5520
|
/** @type {?} */
|
|
5521
|
+
InfoGridComponent.prototype.colunasPadraoHeaders;
|
|
5522
|
+
/** @type {?} */
|
|
5439
5523
|
InfoGridComponent.prototype.colunasType;
|
|
5440
5524
|
/** @type {?} */
|
|
5441
5525
|
InfoGridComponent.prototype.colunasWidth;
|
|
5442
5526
|
/** @type {?} */
|
|
5443
5527
|
InfoGridComponent.prototype.colunasTranslate;
|
|
5444
5528
|
/** @type {?} */
|
|
5529
|
+
InfoGridComponent.prototype.colunasHtml;
|
|
5530
|
+
/** @type {?} */
|
|
5445
5531
|
InfoGridComponent.prototype.currentUrl;
|
|
5446
5532
|
/** @type {?} */
|
|
5447
5533
|
InfoGridComponent.prototype.url;
|
|
5448
5534
|
/** @type {?} */
|
|
5535
|
+
InfoGridComponent.prototype.chaveStorage;
|
|
5536
|
+
/** @type {?} */
|
|
5537
|
+
InfoGridComponent.prototype.identificador;
|
|
5538
|
+
/** @type {?} */
|
|
5449
5539
|
InfoGridComponent.prototype.paginator;
|
|
5450
5540
|
/** @type {?} */
|
|
5451
5541
|
InfoGridComponent.prototype.parentIdUrlChange;
|
|
@@ -5512,6 +5602,142 @@
|
|
|
5512
5602
|
* @private
|
|
5513
5603
|
*/
|
|
5514
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;
|
|
5515
5741
|
}
|
|
5516
5742
|
|
|
5517
5743
|
/**
|
|
@@ -9146,6 +9372,7 @@
|
|
|
9146
9372
|
InfoDateComponent,
|
|
9147
9373
|
InfoDateMonthComponent,
|
|
9148
9374
|
InfoGridComponent,
|
|
9375
|
+
InfoGridModalComponent,
|
|
9149
9376
|
InfoInputComponent,
|
|
9150
9377
|
InfoInputListComponent,
|
|
9151
9378
|
InfoListCheckboxComponent,
|
|
@@ -9179,6 +9406,7 @@
|
|
|
9179
9406
|
InfoDateComponent,
|
|
9180
9407
|
InfoDateMonthComponent,
|
|
9181
9408
|
InfoGridComponent,
|
|
9409
|
+
InfoGridModalComponent,
|
|
9182
9410
|
InfoInputComponent,
|
|
9183
9411
|
InfoInputListComponent,
|
|
9184
9412
|
InfoListCheckboxComponent,
|
|
@@ -9248,6 +9476,7 @@
|
|
|
9248
9476
|
exports.InfoFormPropModel = InfoFormPropModel;
|
|
9249
9477
|
exports.InfoGridButtonModel = InfoGridButtonModel;
|
|
9250
9478
|
exports.InfoGridComponent = InfoGridComponent;
|
|
9479
|
+
exports.InfoGridModalComponent = InfoGridModalComponent;
|
|
9251
9480
|
exports.InfoInputComponent = InfoInputComponent;
|
|
9252
9481
|
exports.InfoInputListComponent = InfoInputListComponent;
|
|
9253
9482
|
exports.InfoLastSearchModel = InfoLastSearchModel;
|