[{"__symbolic":"module","version":3,"metadata":{"ThfTableComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"thf-table","template":"<table class=\"thf-table\"> <thead> <tr class=\"thf-table-header\"> <th *ngIf=\"checkbox\" class=\"thf-table-header-ellipsis thf-table-column-checkbox\"> <input type=\"checkbox\" class=\"thf-table-checkbox\" [ngClass]=\"{ 'thf-table-checkbox-checked': selectAll }\"> <label class=\"thf-table-checkbox-label\" (click)=\"selectAllRows()\"></label> </th> <th *ngFor=\"let column of columns\" class=\"thf-table-header-ellipsis\" [style.width]=\"column.width\" [ngClass]=\"{ 'thf-clickable': sort, 'thf-table-column-right': column.type == 'currency' || column.type == 'number' }\" (click)=\"sortColumn(column)\"> <span id=\"sort-{{column.column}}\" *ngIf=\"sort\"  class='thf-table-header-icon-unselected'></span> <span class=\"thf-table-header-ellipsis thf-table-header-block\">{{ column.label }}</span> </th> <th *ngIf=\"actions.length > 0\" class=\"thf-table-header-action\"></th> </tr> </thead> <tbody> <tr *ngFor=\"let row of items, let rowIndex = index;\" class=\"thf-table-row\"> <td *ngIf=\"checkbox\" class=\"thf-table-column thf-table-column-checkbox\" [ngClass]=\"{ 'thf-table-row-active': row.$selected && checkbox }\"> <input type=\"checkbox\" class=\"thf-table-checkbox\" [ngClass]=\"{ 'thf-table-checkbox-checked': row.$selected }\"> <label class=\"thf-table-checkbox-label\" (click)=\"selectRow(row)\"></label> </td> <td *ngFor=\"let column of columns, let columnIndex = index;\" [ngClass]=\"{ 'thf-table-row-active': row.$selected && checkbox , 'thf-table-column-right': column.type == 'currency' || column.type == 'number', 'thf-table-main-column': columnIndex == 0 , 'thf-table-column': columnIndex > 0 }\"> <div [ngSwitch]=\"column.type\"> <span *ngSwitchCase=\"'currency'\">{{ row[column.column] | currency:column.format:true:'1.2-2' }}</span> <span *ngSwitchCase=\"'date'\">{{ row[column.column] | date: (column.format ? column.format : 'dd/MM/yyyy') }}</span> <span *ngSwitchDefault>{{ row[column.column] }}</span> </div> </td> <td *ngIf=\"actions.length > 0\" class=\"thf-table-column-actions\" [ngClass]=\"{'thf-table-row-active': row.$selected && checkbox }\"> <span class=\"thf-icon thf-icon-more thf-clickable \" (click)=\"toggleRowAction(row)\"></span> <div [style.display]=\"row.$showAction ? 'block': 'none'\" class=\"thf-table-actions\"> <div *ngFor=\"let action of actions\" class=\"thf-table-action\" (click)=\"parentRef[action.function](row); toggleRowAction(row)\"> {{ action.label }} </div> </div> </td> </tr> </tbody> <tfoot *ngIf=\"showMore.observers.length > 0\"> <tr> <td class=\"thf-table-footer\" [colSpan]=\"(columns.length) + (actions.length > 0 ? 1 : 0) + ( checkbox ? 1 : 0)\"> <thf-button t-label=\"Carregar mais resultados\" t-id=\"btnShowMoreId\" (t-click)=\"onShowMore()\" [t-disabled]=\"showMoreDisabled\"> </thf-button> </td> </tr> </tfoot> </table> "}]}],"members":{"items":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["t-items"]}]}],"columns":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["t-columns"]}]}],"checkbox":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["t-checkbox"]}]}],"actions":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["t-actions"]}]}],"sort":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["t-sort"]}]}],"showMoreDisabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["t-show-more-disabled"]}]}],"showMore":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["t-show-more"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer"},{"__symbolic":"reference","module":"@angular/core","name":"ViewContainerRef"}]}],"selectAllRows":[{"__symbolic":"method"}],"selectRow":[{"__symbolic":"method"}],"toggleRowAction":[{"__symbolic":"method"}],"sortColumn":[{"__symbolic":"method"}],"clearSortingElement":[{"__symbolic":"method"}],"parseDate":[{"__symbolic":"method"}],"sortValidate":[{"__symbolic":"method"}],"sortArray":[{"__symbolic":"method"}],"onShowMore":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"ThfTableComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"thf-table","template":"<table class=\"thf-table\"> <thead> <tr class=\"thf-table-header\"> <th *ngIf=\"checkbox\" class=\"thf-table-header-ellipsis thf-table-column-checkbox\"> <input type=\"checkbox\" class=\"thf-table-checkbox\" [ngClass]=\"{ 'thf-table-checkbox-checked': selectAll }\"> <label class=\"thf-table-checkbox-label\" (click)=\"selectAllRows()\"></label> </th> <th *ngFor=\"let column of columns\" class=\"thf-table-header-ellipsis\" [style.width]=\"column.width\" [ngClass]=\"{ 'thf-clickable': sort, 'thf-table-column-right': column.type == 'currency' || column.type == 'number' }\" (click)=\"sortColumn(column)\"> <span id=\"sort-{{column.column}}\" *ngIf=\"sort\"  class='thf-table-header-icon-unselected'></span> <span class=\"thf-table-header-ellipsis thf-table-header-block\">{{ column.label }}</span> </th> <th *ngIf=\"actions.length > 0\" class=\"thf-table-header-action\"></th> </tr> </thead> <tbody> <tr *ngFor=\"let row of items, let rowIndex = index;\" class=\"thf-table-row\"> <td *ngIf=\"checkbox\" class=\"thf-table-column thf-table-column-checkbox\" [ngClass]=\"{ 'thf-table-row-active': row.$selected && checkbox }\"> <input type=\"checkbox\" class=\"thf-table-checkbox\" [ngClass]=\"{ 'thf-table-checkbox-checked': row.$selected }\"> <label class=\"thf-table-checkbox-label\" (click)=\"selectRow(row)\"></label> </td> <td *ngFor=\"let column of columns, let columnIndex = index;\" [ngClass]=\"{ 'thf-table-row-active': row.$selected && checkbox , 'thf-table-column-right': column.type == 'currency' || column.type == 'number', 'thf-table-main-column': columnIndex == 0 , 'thf-table-column': columnIndex > 0 }\"> <div [ngSwitch]=\"column.type\"> <span *ngSwitchCase=\"'currency'\">{{ row[column.column] | currency:column.format:true:'1.2-2' }}</span> <span *ngSwitchCase=\"'date'\">{{ row[column.column] | date: (column.format ? column.format : 'dd/MM/yyyy') }}</span> <span *ngSwitchDefault>{{ row[column.column] }}</span> </div> </td> <td *ngIf=\"actions.length > 0\" class=\"thf-table-column-actions\" [ngClass]=\"{'thf-table-row-active': row.$selected && checkbox }\"> <span class=\"thf-icon thf-icon-more thf-clickable \" (click)=\"toggleRowAction(row)\"></span> <div [style.display]=\"row.$showAction ? 'block': 'none'\" class=\"thf-table-actions\"> <div *ngFor=\"let action of actions\" class=\"thf-table-action\" (click)=\"parentRef[action.function](row); toggleRowAction(row)\"> {{ action.label }} </div> </div> </td> </tr> </tbody> <tfoot *ngIf=\"showMore.observers.length > 0\"> <tr> <td class=\"thf-table-footer\" [colSpan]=\"(columns.length) + (actions.length > 0 ? 1 : 0) + ( checkbox ? 1 : 0)\"> <thf-button t-label=\"Carregar mais resultados\" t-id=\"btnShowMoreId\" (t-click)=\"onShowMore()\" [t-disabled]=\"showMoreDisabled\"> </thf-button> </td> </tr> </tfoot> </table> "}]}],"members":{"items":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["t-items"]}]}],"columns":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["t-columns"]}]}],"checkbox":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["t-checkbox"]}]}],"actions":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["t-actions"]}]}],"sort":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["t-sort"]}]}],"showMoreDisabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["t-show-more-disabled"]}]}],"showMore":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["t-show-more"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer"},{"__symbolic":"reference","module":"@angular/core","name":"ViewContainerRef"}]}],"selectAllRows":[{"__symbolic":"method"}],"selectRow":[{"__symbolic":"method"}],"toggleRowAction":[{"__symbolic":"method"}],"sortColumn":[{"__symbolic":"method"}],"clearSortingElement":[{"__symbolic":"method"}],"parseDate":[{"__symbolic":"method"}],"sortValidate":[{"__symbolic":"method"}],"sortArray":[{"__symbolic":"method"}],"onShowMore":[{"__symbolic":"method"}]}}}}]