15b8cef81SYoshie Muranaka<div class="bmc-table__container"> 25b8cef81SYoshie Muranaka <table-toolbar ng-if="$ctrl.selectable" 35b8cef81SYoshie Muranaka selection-count="$ctrl.selectedRows.size" 45b8cef81SYoshie Muranaka active="$ctrl.selectedRows.size > 0" 55b8cef81SYoshie Muranaka actions="$ctrl.batchActions" 65b8cef81SYoshie Muranaka emit-action="$ctrl.onEmitBatchAction(action)" 75b8cef81SYoshie Muranaka emit-close="$ctrl.onToolbarClose()" 85b8cef81SYoshie Muranaka ng-animate-children="true"> 95b8cef81SYoshie Muranaka </table-toolbar> 105b8cef81SYoshie Muranaka <table class="bmc-table {{$ctrl.size}}" 115b8cef81SYoshie Muranaka ng-class="{ 125b8cef81SYoshie Muranaka 'bmc-table--sortable': $ctrl.sortable, 135b8cef81SYoshie Muranaka 'bmc-table--expandable': $ctrl.expandable, 145b8cef81SYoshie Muranaka 'bmc-table--selectable': $ctrl.selectable, 155b8cef81SYoshie Muranaka 'bmc-table--row-actions-enabled': '$ctrl.rowActionsEnabled', 165b8cef81SYoshie Muranaka }"> 17b1f64248SYoshie Muranaka <thead class="bmc-table__head"> 185b8cef81SYoshie Muranaka <!-- Header row --> 195b8cef81SYoshie Muranaka <tr> 205b8cef81SYoshie Muranaka <!-- Expandable empty cell --> 215b8cef81SYoshie Muranaka <th ng-if="$ctrl.expandable" 225b8cef81SYoshie Muranaka class="bmc-table__column-header"></th> 235b8cef81SYoshie Muranaka <!-- Select checkbox --> 245b8cef81SYoshie Muranaka <th ng-if="$ctrl.selectable" 25fa56273dSYoshie Muranaka class="bmc-table__column-header"> 265b8cef81SYoshie Muranaka <table-checkbox ng-model="$ctrl.selectHeaderCheckbox" 275b8cef81SYoshie Muranaka indeterminate="$ctrl.someSelected" 285b8cef81SYoshie Muranaka emit-change="$ctrl.onHeaderSelectChange(checked)"> 295b8cef81SYoshie Muranaka </table-checkbox> 30b1f64248SYoshie Muranaka </th> 315b8cef81SYoshie Muranaka <!-- Header items --> 32b1f64248SYoshie Muranaka <th ng-repeat="headerItem in $ctrl.header track by $index" 33b1f64248SYoshie Muranaka class="bmc-table__column-header"> 345b8cef81SYoshie Muranaka <span ng-if="!$ctrl.sortable || !headerItem.sortable"> 35b1f64248SYoshie Muranaka {{headerItem.label}} 36b1f64248SYoshie Muranaka </span> 375b8cef81SYoshie Muranaka <span ng-if="$ctrl.sortable && headerItem.sortable" 38b1f64248SYoshie Muranaka ng-click="$ctrl.onClickSort($index)" 39b1f64248SYoshie Muranaka class="bmc-table__column-header--sortable"> 40b1f64248SYoshie Muranaka {{headerItem.label}} 41b1f64248SYoshie Muranaka <!-- Sort icons --> 42b1f64248SYoshie Muranaka <button class="sort-icon" 43b1f64248SYoshie Muranaka type="button" 44b1f64248SYoshie Muranaka aria-label="sort {{headerItem.label}}"> 45b1f64248SYoshie Muranaka <icon file="icon-arrow--up.svg" 46b1f64248SYoshie Muranaka ng-if="$index === $ctrl.activeSort" 47b1f64248SYoshie Muranaka ng-class="{ 48b1f64248SYoshie Muranaka 'sort-icon--descending': !$ctrl.sortAscending, 49b1f64248SYoshie Muranaka 'sort-icon--ascending' : $ctrl.sortAscending }" 50b1f64248SYoshie Muranaka class="sort-icon--active" 51b1f64248SYoshie Muranaka aria-hidden="true"></icon> 52b1f64248SYoshie Muranaka <span ng-if="$index !== $ctrl.activeSort" 53b1f64248SYoshie Muranaka class="sort-icon--inactive" 54b1f64248SYoshie Muranaka aria-hidden="true"> 55b1f64248SYoshie Muranaka <icon file="icon-arrow--up.svg"></icon> 56b1f64248SYoshie Muranaka <icon file="icon-arrow--down.svg"></icon> 57b1f64248SYoshie Muranaka </span> 58b1f64248SYoshie Muranaka </button> 59b1f64248SYoshie Muranaka </span> 60fa56273dSYoshie Muranaka </th> 615b8cef81SYoshie Muranaka <!-- Row actions empty cell --> 625b8cef81SYoshie Muranaka <th ng-if="$ctrl.rowActionsEnabled" 635b8cef81SYoshie Muranaka class="bmc-table__column-header"></th> 64fa56273dSYoshie Muranaka </tr> 65fa56273dSYoshie Muranaka </thead> 66b1f64248SYoshie Muranaka <tbody class="bmc-table__body"> 67fa56273dSYoshie Muranaka <!-- Data rows --> 68b1f64248SYoshie Muranaka <tr ng-if="$ctrl.data.length > 0" 691d83af07SYoshie Muranaka ng-repeat-start="row in $ctrl.data track by $index" 701d83af07SYoshie Muranaka class="bmc-table__row" 711d83af07SYoshie Muranaka ng-class="{ 725b8cef81SYoshie Muranaka 'bmc-table__row--expanded': $ctrl.expandedRows.has($index), 735b8cef81SYoshie Muranaka 'bmc-table__row--selected': $ctrl.selectedRows.has($index), 741d83af07SYoshie Muranaka }"> 751d83af07SYoshie Muranaka <!-- Row expansion trigger --> 761d83af07SYoshie Muranaka <td ng-if="$ctrl.expandable" 771d83af07SYoshie Muranaka class="bmc-table__cell"> 781d83af07SYoshie Muranaka <button type="button" 791d83af07SYoshie Muranaka class="btn btn--expand" 801d83af07SYoshie Muranaka aria-label="expand row" 811d83af07SYoshie Muranaka ng-click="$ctrl.onClickExpand($index)"> 821d83af07SYoshie Muranaka <icon file="icon-chevron-right.svg" aria-hidden="true"></icon> 831d83af07SYoshie Muranaka </button> 841d83af07SYoshie Muranaka </td> 855b8cef81SYoshie Muranaka <!-- Row checkbox --> 865b8cef81SYoshie Muranaka <td ng-if="$ctrl.selectable" 875b8cef81SYoshie Muranaka class="bmc-table__cell"> 885b8cef81SYoshie Muranaka <table-checkbox ng-if="row.selectable" 895b8cef81SYoshie Muranaka ng-model="row.selected" 905b8cef81SYoshie Muranaka emit-change="$ctrl.onRowSelectChange($index)"> 915b8cef81SYoshie Muranaka </table-checkbox> 925b8cef81SYoshie Muranaka </td> 93fa56273dSYoshie Muranaka <!-- Row item --> 948c80dbd9SYoshie Muranaka <td ng-repeat="item in row.uiData track by $index" 95fa56273dSYoshie Muranaka class="bmc-table__cell"> 968c80dbd9SYoshie Muranaka <ng-bind-html ng-bind-html="item"></ng-bind-html> 97fa56273dSYoshie Muranaka </td> 98fa56273dSYoshie Muranaka <!-- Row Actions --> 99bb688795SYoshie Muranaka <td ng-if="$ctrl.rowActionsEnabled" 100fa56273dSYoshie Muranaka class="bmc-table__cell bmc-table__row-actions"> 101bb688795SYoshie Muranaka <table-actions 102*49001e25SYoshie Muranaka ng-if="row.actions" 103bb688795SYoshie Muranaka actions="row.actions" 1045b8cef81SYoshie Muranaka emit-action="$ctrl.onEmitRowAction(action, row)"> 105bb688795SYoshie Muranaka </table-actions> 106fa56273dSYoshie Muranaka </td> 107fa56273dSYoshie Muranaka </tr> 1081d83af07SYoshie Muranaka <!-- Expansion row --> 1091d83af07SYoshie Muranaka <tr ng-repeat-end 1101d83af07SYoshie Muranaka ng-if="$ctrl.expandedRows.has($index)" 1111d83af07SYoshie Muranaka class="bmc-table__expansion-row"> 1121d83af07SYoshie Muranaka <td class="bmc-table__cell"></td> 1131d83af07SYoshie Muranaka <td class="bmc-table__cell" 1145b8cef81SYoshie Muranaka colspan="{{$ctrl.header.length + $ctrl.sortable + 1155b8cef81SYoshie Muranaka $ctrl.expandable + $ctrl.rowActionsEnabled}}"> 1161d83af07SYoshie Muranaka <ng-bind-html 1171d83af07SYoshie Muranaka ng-bind-html="row.expandContent || 'No data'"> 1181d83af07SYoshie Muranaka </ng-bind-html> 1191d83af07SYoshie Muranaka </td> 1201d83af07SYoshie Muranaka </tr> 121fa56273dSYoshie Muranaka <!-- Empty table --> 1221d83af07SYoshie Muranaka <tr ng-if="$ctrl.data.length === 0" 1231d83af07SYoshie Muranaka class="bmc-table__expansion-row"> 1241d83af07SYoshie Muranaka <td class="bmc-table__cell" 1255b8cef81SYoshie Muranaka colspan="{{$ctrl.header.length + $ctrl.sortable + 1265b8cef81SYoshie Muranaka $ctrl.expandable + $ctrl.rowActionsEnabled}}"> 1275b8cef81SYoshie Muranaka No data 1285b8cef81SYoshie Muranaka </td> 129fa56273dSYoshie Muranaka </tr> 130fa56273dSYoshie Muranaka </tbody> 131fa56273dSYoshie Muranaka </table> 1325b8cef81SYoshie Muranaka</div>