@energycap/components 0.25.3 → 0.26.0
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/energycap-components.umd.js +9 -9
- package/bundles/energycap-components.umd.js.map +1 -1
- package/bundles/energycap-components.umd.min.js +1 -1
- package/bundles/energycap-components.umd.min.js.map +1 -1
- package/energycap-components.metadata.json +1 -1
- package/esm2015/lib/display/table/searchable-table.component.js +4 -4
- package/esm2015/lib/display/table/table-pagination.component.js +7 -7
- package/fesm2015/energycap-components.js +9 -9
- package/fesm2015/energycap-components.js.map +1 -1
- package/lib/display/table/searchable-table.component.d.ts +1 -1
- package/lib/display/table/table-pagination.component.d.ts +1 -1
- package/package.json +1 -1
|
@@ -5667,7 +5667,7 @@
|
|
|
5667
5667
|
/**
|
|
5668
5668
|
* Maximum number of page tabs to show
|
|
5669
5669
|
*/
|
|
5670
|
-
this.
|
|
5670
|
+
this.maxTabs = 10;
|
|
5671
5671
|
/**
|
|
5672
5672
|
* Emits when the page changes.
|
|
5673
5673
|
*
|
|
@@ -5767,15 +5767,15 @@
|
|
|
5767
5767
|
//keep building menu items of the form 1-10, 11-20, 21-30, etc until
|
|
5768
5768
|
//end >= lastPage, which means we've found the range that contains the last page.
|
|
5769
5769
|
var start = 1;
|
|
5770
|
-
var
|
|
5771
|
-
var end =
|
|
5770
|
+
var maxTabs = this.maxTabs || 10;
|
|
5771
|
+
var end = maxTabs;
|
|
5772
5772
|
while (end < lastPage) {
|
|
5773
5773
|
this.dropdownItems.push({
|
|
5774
5774
|
label: start + "-" + end,
|
|
5775
5775
|
value: { firstPage: start, lastPage: end }
|
|
5776
5776
|
});
|
|
5777
|
-
start = start +
|
|
5778
|
-
end = end +
|
|
5777
|
+
start = start + maxTabs;
|
|
5778
|
+
end = end + maxTabs;
|
|
5779
5779
|
}
|
|
5780
5780
|
//add the menu item that contains the last page.
|
|
5781
5781
|
this.dropdownItems.push({
|
|
@@ -5802,7 +5802,7 @@
|
|
|
5802
5802
|
totalItems: [{ type: i0.Input }],
|
|
5803
5803
|
pageSize: [{ type: i0.Input }],
|
|
5804
5804
|
pageNumber: [{ type: i0.Input }],
|
|
5805
|
-
|
|
5805
|
+
maxTabs: [{ type: i0.Input }],
|
|
5806
5806
|
pageChanged: [{ type: i0.Output }]
|
|
5807
5807
|
};
|
|
5808
5808
|
|
|
@@ -5931,7 +5931,7 @@
|
|
|
5931
5931
|
/**
|
|
5932
5932
|
* Maximum number of page tabs to show
|
|
5933
5933
|
*/
|
|
5934
|
-
this.
|
|
5934
|
+
this.maxTabs = 10;
|
|
5935
5935
|
/**
|
|
5936
5936
|
* Makes the searchbox readonly if true.
|
|
5937
5937
|
*/
|
|
@@ -6087,7 +6087,7 @@
|
|
|
6087
6087
|
SearchableTableComponent.decorators = [
|
|
6088
6088
|
{ type: i0.Component, args: [{
|
|
6089
6089
|
selector: 'ec-searchable-table',
|
|
6090
|
-
template: "<header *ngIf=\"!hideHeader\"\r\n class=\"d-flex flex-shrink align-items-center mb-3\">\r\n <ec-textbox id=\"{{id}}_searchbox\"\r\n *ngIf=\"!hideSearchControl\"\r\n class=\"mb-0 flex-grow mr-2\"\r\n [autofocus]=\"autofocus\"\r\n [formModel]=\"searchModel\"\r\n [tabindex]=\"searchboxTabIndex\"\r\n [placeholder]=\"searchboxPlaceholder\"\r\n [readonly]=\"searchboxReadonly\"></ec-textbox>\r\n <div class=\"flex-grow\">\r\n <ng-content select=\".searchable-table-controls\"></ng-content>\r\n </div>\r\n</header>\r\n<section id=\"{{id}}_card\"\r\n class=\"card m-0 d-flex flex-column bg-content\"\r\n [class.is-translucent]=\"status.status !== 'error'\"\r\n ecOverlay\r\n [status]=\"status.status\"\r\n [message]=\"status.message\"\r\n [displayAsMask]=\"true\">\r\n <ng-content select=\".card-header\"></ng-content>\r\n <ec-table id=\"{{id}}_table\"\r\n class=\"flex-shrink-max {{tableClasses}}\"\r\n [class.is-fixed]=\"tableLayoutFixed\"\r\n [sortable]=\"sortable\"\r\n [sort]=\"sort\"\r\n (sortChange)=\"onSortChange($event)\"\r\n [resizable]=\"resizable\"\r\n [scrollable]=\"true\"\r\n [selectionContext]=\"selectionContext\"\r\n [selectionToolbarTemplate]=\"selectionToolbarTemplate\"\r\n [resizableColumns]=\"resizableColumns\">\r\n <ng-content></ng-content>\r\n </ec-table>\r\n\r\n <!-- pagination footer visible if table is page-able and there are more than one page of results -->\r\n <footer *ngIf=\"!hideFooter && pageable && searchResults.totalItemsBeforePaging! > pageSize!\" class=\"d-flex flex-shrink align-items-center border-top\">\r\n <ec-table-pagination id=\"{{id}}_pager\"\r\n class=\"font-color-primary\"\r\n [totalItems]=\"searchResults.totalItemsBeforePaging\"\r\n [pageSize]=\"pageSize\"\r\n [
|
|
6090
|
+
template: "<header *ngIf=\"!hideHeader\"\r\n class=\"d-flex flex-shrink align-items-center mb-3\">\r\n <ec-textbox id=\"{{id}}_searchbox\"\r\n *ngIf=\"!hideSearchControl\"\r\n class=\"mb-0 flex-grow mr-2\"\r\n [autofocus]=\"autofocus\"\r\n [formModel]=\"searchModel\"\r\n [tabindex]=\"searchboxTabIndex\"\r\n [placeholder]=\"searchboxPlaceholder\"\r\n [readonly]=\"searchboxReadonly\"></ec-textbox>\r\n <div class=\"flex-grow\">\r\n <ng-content select=\".searchable-table-controls\"></ng-content>\r\n </div>\r\n</header>\r\n<section id=\"{{id}}_card\"\r\n class=\"card m-0 d-flex flex-column bg-content\"\r\n [class.is-translucent]=\"status.status !== 'error'\"\r\n ecOverlay\r\n [status]=\"status.status\"\r\n [message]=\"status.message\"\r\n [displayAsMask]=\"true\">\r\n <ng-content select=\".card-header\"></ng-content>\r\n <ec-table id=\"{{id}}_table\"\r\n class=\"flex-shrink-max {{tableClasses}}\"\r\n [class.is-fixed]=\"tableLayoutFixed\"\r\n [sortable]=\"sortable\"\r\n [sort]=\"sort\"\r\n (sortChange)=\"onSortChange($event)\"\r\n [resizable]=\"resizable\"\r\n [scrollable]=\"true\"\r\n [selectionContext]=\"selectionContext\"\r\n [selectionToolbarTemplate]=\"selectionToolbarTemplate\"\r\n [resizableColumns]=\"resizableColumns\">\r\n <ng-content></ng-content>\r\n </ec-table>\r\n\r\n <!-- pagination footer visible if table is page-able and there are more than one page of results -->\r\n <footer *ngIf=\"!hideFooter && pageable && searchResults.totalItemsBeforePaging! > pageSize!\" class=\"d-flex flex-shrink align-items-center border-top\">\r\n <ec-table-pagination id=\"{{id}}_pager\"\r\n class=\"font-color-primary\"\r\n [totalItems]=\"searchResults.totalItemsBeforePaging\"\r\n [pageSize]=\"pageSize\"\r\n [maxTabs]=\"maxTabs\"\r\n [pageNumber]=\"pageInfo?.pageNumber\"\r\n (pageChanged)=\"onPageChange($event)\">\r\n </ec-table-pagination>\r\n <div id=\"resultsCount\"\r\n *ngIf=\"searchResults?.items?.length\"\r\n class=\"ml-auto mr-2 font-color-hint text-truncate\" \r\n title=\"{{resultsCount}} {{additionalCountText}}\">{{resultsCount}} {{additionalCountText}}</div>\r\n </footer>\r\n\r\n <!-- default footer: visible if hideFooter is false and table is not page-able or there are only one page of results (always shows if there is a caption to indicate no results) -->\r\n <footer *ngIf=\"(!hideFooter && (!pageable || searchResults.totalItemsBeforePaging! <= pageSize!)) || tableCaption\"\r\n class=\"p-2 d-flex\"\r\n [class.has-results]=\"searchResults?.items?.length\">\r\n <ng-content *ngIf=\"!tableCaption\"\r\n select=\".searchable-table-footer\"></ng-content>\r\n <div id=\"tableCaption\"\r\n *ngIf=\"tableCaption\"\r\n [innerHTML]=\"tableCaption\"></div>\r\n <div id=\"resultsCount\"\r\n *ngIf=\"searchResults?.items?.length\"\r\n class=\"ml-auto text-truncate\"\r\n title=\"{{resultsCount}} {{additionalCountText}}\">{{resultsCount}} {{additionalCountText}}</div>\r\n </footer>\r\n</section>",
|
|
6091
6091
|
styles: ["@-webkit-keyframes spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}:host{display:flex;flex:1 1;flex-direction:column;min-height:0}footer{font-size:.75rem;line-height:1rem}footer.has-results{border-top:1px solid rgba(26,26,35,.18);color:rgba(26,26,35,.38);text-align:right}"]
|
|
6092
6092
|
},] }
|
|
6093
6093
|
];
|
|
@@ -6123,7 +6123,7 @@
|
|
|
6123
6123
|
hideFooter: [{ type: i0.Input }],
|
|
6124
6124
|
pageable: [{ type: i0.Input }],
|
|
6125
6125
|
pageSize: [{ type: i0.Input }],
|
|
6126
|
-
|
|
6126
|
+
maxTabs: [{ type: i0.Input }],
|
|
6127
6127
|
searchboxReadonly: [{ type: i0.Input }],
|
|
6128
6128
|
selectionContext: [{ type: i0.Input }],
|
|
6129
6129
|
selectionToolbarTemplate: [{ type: i0.Input }],
|