[{"__symbolic":"module","version":3,"metadata":{"ThfGridComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@totvs/thf-core/components/thf-grid-base/thf-grid-base.component","name":"ThfGridBaseComponent"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"thf-grid","encapsulation":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewEncapsulation"},"member":"None"},"template":"<kendo-grid  [data]=\"gridView\"  [sortable]=\"sortableObject\" [sort]=\"sort\" [groupable]=\"groupable\" [group]=\"groups\" [selectable]=\"selectable\" (dataStateChange)=\"dataStateChange($event)\" (groupChange)=\"groupChange($event)\" (selectionChange)=\"onSelectionChange($event)\" (sortChange)=\"sortChange($event)\" (add)=\"addHandler($event)\" (cancel)=\"cancelHandler($event)\" (cellClick)=\"editClickHandler($event)\" (edit)=\"editHandler($event)\" (remove)=\"removeHandler($event)\" (save)=\"saveHandler($event)\" style=\"height: 70%\"> <kendo-grid-messages  i18n-noRecords=\"\" noRecords=\"Não há registros\" i18n-groupPanelEmpty=\"\" groupPanelEmpty=\"Arraste a coluna até o cabeçalho e solte para agrupar por esta coluna\"> </kendo-grid-messages> <ng-template kendoGridToolbarTemplate *ngIf=\"addButton || exportButtons\" > <button kendoGridAddCommand *ngIf=\"addButton\" class=\"k-primary\">Adicionar</button> <button type=\"button\" kendoGridExcelCommand *ngIf=\"exportButtons\" ><span class=\"k-icon k-i-file-excel\"></span></button> <button kendoGridPDFCommand *ngIf=\"exportButtons\"><span class='k-icon k-i-file-pdf'></span></button> </ng-template> <kendo-grid-column *ngFor=\"let col of columns; let i = index\" [field]=\"col.column\" [title]=\"col.label\" [width]=\"col.width\" [filter]=\"col.filter\" [format]=\"col.format\" [editor]=\"col.type\"> <ng-template kendoGridCellTemplate let-data *ngIf=\"col.checkbox\" let-rowIndex=\"rowIndex\"> <input type=\"checkbox\" id=\"chkbox_{{rowIndex}}\" name=\"chkbox_{{col.column}}_{{rowIndex}}\" [checked]=\"data[col.column]\" (change)=\"changeValueCheckbox($event, rowIndex, data, col.column)\" class=\"thf-grid thf-grid-checkbox\" /> <label for=\"chkbox_{{rowIndex}}\"></label> </ng-template> <ng-template kendoGridGroupHeaderTemplate let-value=\"value\" *ngIf=\"col.groupHeader\"> {{value}} </ng-template> </kendo-grid-column> <kendo-grid-command-column title=\"\" width=\"80\"> <ng-template kendoGridCellTemplate let-isNew=\"isNew\"> <button kendoGridRemoveCommand class=\"k-primary\" *ngIf=\"showRemoveButton\" >Remover</button> <button kendoGridCancelCommand class=\"k-primary\" (click)=\"cancelPropagation($event)\">{{ isNew ? 'Descartar' : 'Cancelar' }} </button> </ng-template> </kendo-grid-command-column> <kendo-grid-excel fileName=\"spreadsheet.xlsx\" [fetchData]=\"allData\"></kendo-grid-excel> <kendo-grid-pdf fileName=\"grid.pdf\" [allPages]=\"true\"> <kendo-grid-pdf-margin top=\"1cm\" left=\"1cm\" right=\"1cm\" bottom=\"1cm\"></kendo-grid-pdf-margin> </kendo-grid-pdf> </kendo-grid> <div class=\"thf-grid-show-more\" *ngIf=\"showMore.observers.length > 0\"> <div style=\"text-align: center;\"> <thf-button t-label=\"Carregar mais resultados\" (t-click)=\"onShowMore()\" t-id=\"btnShowMoreId\" [t-disabled]=\"showMoreDisabled\"></thf-button> </div> </div> ","styles":[".k-grid .k-state-selected { background-color: skyblue !important; color: #000000; } .k-grid .k-alt.k-state-selected { background-color: skyblue !important; color: #000000; } .thf-grid.thf-grid-checkbox { width: 20px; height: 20px; border-radius: 2px; box-shadow: inset 0 1px 8px 0 rgba(0, 0, 0, 0.1); border: solid 1px rgba(255, 255, 255, 0.6); } .thf-grid.thf-grid-checkbox:checked { width: 20px; height: 20px; border-radius: 2px; } input[type=checkbox] { visibility: hidden; position: absolute; } input[type=checkbox] + label:before { width: 20px; height: 20px; margin-top: -2px; margin-right: 8px; display: inline-block; vertical-align: middle; background-color: #ffffff; box-shadow: inset 0px 2px 8px 0 #edefef; border: solid 1px #b7bebf; content: ' '; } input[type=checkbox]:checked + label:before { background-color: #0c9abe; box-shadow: none; color: white; font-family: 'TotvsIcon' !important; line-height: 18px; content: '\\e937'; padding-left: 1px; } input[type=checkbox]:disabled + label:before { background-color: #edefef; border: solid 1px #b7bebf; } input[type=checkbox]:checked:disabled + label:before { color: #b7bebf; border: solid 1px #b6bdbf; } input[type=checkbox] + label:before { border-radius: 2px; } .thf-grid-show-more { width: 100%; margin-top: 10px; margin-bottom: 10px; } "]}]}],"members":{"columns":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["t-columns"]}]}],"sortable":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["t-sortable"]}]}],"selectable":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["t-selectable"]}]}],"editable":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["t-editable"]}]}],"groupable":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["t-groupable"]}]}],"exportButtons":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["t-show-export-buttons"]}]}],"showMoreDisabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["t-show-more-disabled"]}]}],"showRemoveButton":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["t-show-remove-button"]}]}],"addButton":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["t-show-add-button"]}]}],"saveAction":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["t-save-action"]}]}],"removeAction":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["t-remove-action"]}]}],"addAction":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["t-add-action"]}]}],"showMore":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["t-show-more"]}]}],"selectionChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["t-selection-change"]}]}],"saveValue":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["t-save-value"]}]}],"grid":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild"},"arguments":[{"__symbolic":"reference","module":"@progress/kendo-angular-grid","name":"GridComponent"}]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ViewContainerRef"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2"}]}],"ngOnInit":[{"__symbolic":"method"}],"defineColumnType":[{"__symbolic":"method"}],"isChildOf":[{"__symbolic":"method"}],"hasClass":[{"__symbolic":"method"}],"validateSaveEventInDocument":[{"__symbolic":"method"}],"sortChange":[{"__symbolic":"method"}],"dataStateChange":[{"__symbolic":"method"}],"updateIndex":[{"__symbolic":"method"}],"loadData":[{"__symbolic":"method"}],"createFormGroup":[{"__symbolic":"method"}],"addHandler":[{"__symbolic":"method"}],"executeFunctionValidation":[{"__symbolic":"method"}],"saveLine":[{"__symbolic":"method"}],"editClickHandler":[{"__symbolic":"method"}],"getRowIndex":[{"__symbolic":"method"}],"editHandler":[{"__symbolic":"method"}],"saveClick":[{"__symbolic":"method"}],"isGroup":[{"__symbolic":"method"}],"getColumn":[{"__symbolic":"method"}],"closeEditor":[{"__symbolic":"method"}],"saveHandler":[{"__symbolic":"method"}],"cancelPropagation":[{"__symbolic":"method"}],"cancelHandler":[{"__symbolic":"method"}],"removeHandler":[{"__symbolic":"method"}],"isValidForm":[{"__symbolic":"method"}],"allData":[{"__symbolic":"method"}],"changeValueCheckbox":[{"__symbolic":"method"}],"onSelectionChange":[{"__symbolic":"method"}],"onShowMore":[{"__symbolic":"method"}],"groupChange":[{"__symbolic":"method"}],"loadDataGroupable":[{"__symbolic":"method"}],"getObjects":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"ThfGridComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@totvs/thf-core/components/thf-grid-base/thf-grid-base.component","name":"ThfGridBaseComponent"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"thf-grid","encapsulation":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewEncapsulation"},"member":"None"},"template":"<kendo-grid  [data]=\"gridView\"  [sortable]=\"sortableObject\" [sort]=\"sort\" [groupable]=\"groupable\" [group]=\"groups\" [selectable]=\"selectable\" (dataStateChange)=\"dataStateChange($event)\" (groupChange)=\"groupChange($event)\" (selectionChange)=\"onSelectionChange($event)\" (sortChange)=\"sortChange($event)\" (add)=\"addHandler($event)\" (cancel)=\"cancelHandler($event)\" (cellClick)=\"editClickHandler($event)\" (edit)=\"editHandler($event)\" (remove)=\"removeHandler($event)\" (save)=\"saveHandler($event)\" style=\"height: 70%\"> <kendo-grid-messages  i18n-noRecords=\"\" noRecords=\"Não há registros\" i18n-groupPanelEmpty=\"\" groupPanelEmpty=\"Arraste a coluna até o cabeçalho e solte para agrupar por esta coluna\"> </kendo-grid-messages> <ng-template kendoGridToolbarTemplate *ngIf=\"addButton || exportButtons\" > <button kendoGridAddCommand *ngIf=\"addButton\" class=\"k-primary\">Adicionar</button> <button type=\"button\" kendoGridExcelCommand *ngIf=\"exportButtons\" ><span class=\"k-icon k-i-file-excel\"></span></button> <button kendoGridPDFCommand *ngIf=\"exportButtons\"><span class='k-icon k-i-file-pdf'></span></button> </ng-template> <kendo-grid-column *ngFor=\"let col of columns; let i = index\" [field]=\"col.column\" [title]=\"col.label\" [width]=\"col.width\" [filter]=\"col.filter\" [format]=\"col.format\" [editor]=\"col.type\"> <ng-template kendoGridCellTemplate let-data *ngIf=\"col.checkbox\" let-rowIndex=\"rowIndex\"> <input type=\"checkbox\" id=\"chkbox_{{rowIndex}}\" name=\"chkbox_{{col.column}}_{{rowIndex}}\" [checked]=\"data[col.column]\" (change)=\"changeValueCheckbox($event, rowIndex, data, col.column)\" class=\"thf-grid thf-grid-checkbox\" /> <label for=\"chkbox_{{rowIndex}}\"></label> </ng-template> <ng-template kendoGridGroupHeaderTemplate let-value=\"value\" *ngIf=\"col.groupHeader\"> {{value}} </ng-template> </kendo-grid-column> <kendo-grid-command-column title=\"\" width=\"80\"> <ng-template kendoGridCellTemplate let-isNew=\"isNew\"> <button kendoGridRemoveCommand class=\"k-primary\" *ngIf=\"showRemoveButton\" >Remover</button> <button kendoGridCancelCommand class=\"k-primary\" (click)=\"cancelPropagation($event)\">{{ isNew ? 'Descartar' : 'Cancelar' }} </button> </ng-template> </kendo-grid-command-column> <kendo-grid-excel fileName=\"spreadsheet.xlsx\" [fetchData]=\"allData\"></kendo-grid-excel> <kendo-grid-pdf fileName=\"grid.pdf\" [allPages]=\"true\"> <kendo-grid-pdf-margin top=\"1cm\" left=\"1cm\" right=\"1cm\" bottom=\"1cm\"></kendo-grid-pdf-margin> </kendo-grid-pdf> </kendo-grid> <div class=\"thf-grid-show-more\" *ngIf=\"showMore.observers.length > 0\"> <div style=\"text-align: center;\"> <thf-button t-label=\"Carregar mais resultados\" (t-click)=\"onShowMore()\" t-id=\"btnShowMoreId\" [t-disabled]=\"showMoreDisabled\"></thf-button> </div> </div> ","styles":[".k-grid .k-state-selected { background-color: skyblue !important; color: #000000; } .k-grid .k-alt.k-state-selected { background-color: skyblue !important; color: #000000; } .thf-grid.thf-grid-checkbox { width: 20px; height: 20px; border-radius: 2px; box-shadow: inset 0 1px 8px 0 rgba(0, 0, 0, 0.1); border: solid 1px rgba(255, 255, 255, 0.6); } .thf-grid.thf-grid-checkbox:checked { width: 20px; height: 20px; border-radius: 2px; } input[type=checkbox] { visibility: hidden; position: absolute; } input[type=checkbox] + label:before { width: 20px; height: 20px; margin-top: -2px; margin-right: 8px; display: inline-block; vertical-align: middle; background-color: #ffffff; box-shadow: inset 0px 2px 8px 0 #edefef; border: solid 1px #b7bebf; content: ' '; } input[type=checkbox]:checked + label:before { background-color: #0c9abe; box-shadow: none; color: white; font-family: 'TotvsIcon' !important; line-height: 18px; content: '\\e937'; padding-left: 1px; } input[type=checkbox]:disabled + label:before { background-color: #edefef; border: solid 1px #b7bebf; } input[type=checkbox]:checked:disabled + label:before { color: #b7bebf; border: solid 1px #b6bdbf; } input[type=checkbox] + label:before { border-radius: 2px; } .thf-grid-show-more { width: 100%; margin-top: 10px; margin-bottom: 10px; } "]}]}],"members":{"columns":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["t-columns"]}]}],"sortable":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["t-sortable"]}]}],"selectable":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["t-selectable"]}]}],"editable":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["t-editable"]}]}],"groupable":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["t-groupable"]}]}],"exportButtons":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["t-show-export-buttons"]}]}],"showMoreDisabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["t-show-more-disabled"]}]}],"showRemoveButton":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["t-show-remove-button"]}]}],"addButton":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["t-show-add-button"]}]}],"saveAction":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["t-save-action"]}]}],"removeAction":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["t-remove-action"]}]}],"addAction":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["t-add-action"]}]}],"showMore":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["t-show-more"]}]}],"selectionChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["t-selection-change"]}]}],"saveValue":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["t-save-value"]}]}],"grid":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild"},"arguments":[{"__symbolic":"reference","module":"@progress/kendo-angular-grid","name":"GridComponent"}]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ViewContainerRef"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2"}]}],"ngOnInit":[{"__symbolic":"method"}],"defineColumnType":[{"__symbolic":"method"}],"isChildOf":[{"__symbolic":"method"}],"hasClass":[{"__symbolic":"method"}],"validateSaveEventInDocument":[{"__symbolic":"method"}],"sortChange":[{"__symbolic":"method"}],"dataStateChange":[{"__symbolic":"method"}],"updateIndex":[{"__symbolic":"method"}],"loadData":[{"__symbolic":"method"}],"createFormGroup":[{"__symbolic":"method"}],"addHandler":[{"__symbolic":"method"}],"executeFunctionValidation":[{"__symbolic":"method"}],"saveLine":[{"__symbolic":"method"}],"editClickHandler":[{"__symbolic":"method"}],"getRowIndex":[{"__symbolic":"method"}],"editHandler":[{"__symbolic":"method"}],"saveClick":[{"__symbolic":"method"}],"isGroup":[{"__symbolic":"method"}],"getColumn":[{"__symbolic":"method"}],"closeEditor":[{"__symbolic":"method"}],"saveHandler":[{"__symbolic":"method"}],"cancelPropagation":[{"__symbolic":"method"}],"cancelHandler":[{"__symbolic":"method"}],"removeHandler":[{"__symbolic":"method"}],"isValidForm":[{"__symbolic":"method"}],"allData":[{"__symbolic":"method"}],"changeValueCheckbox":[{"__symbolic":"method"}],"onSelectionChange":[{"__symbolic":"method"}],"onShowMore":[{"__symbolic":"method"}],"groupChange":[{"__symbolic":"method"}],"loadDataGroupable":[{"__symbolic":"method"}],"getObjects":[{"__symbolic":"method"}]}}}}]