cps-ui-kit 0.130.0 → 0.131.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/esm2020/lib/components/cps-tree-table/cps-tree-table.component.mjs +38 -14
- package/fesm2015/cps-ui-kit.mjs +38 -13
- package/fesm2015/cps-ui-kit.mjs.map +1 -1
- package/fesm2020/cps-ui-kit.mjs +37 -13
- package/fesm2020/cps-ui-kit.mjs.map +1 -1
- package/lib/components/cps-tree-table/cps-tree-table.component.d.ts +3 -1
- package/package.json +1 -1
package/fesm2020/cps-ui-kit.mjs
CHANGED
|
@@ -5644,6 +5644,7 @@ class CpsTreeTableComponent {
|
|
|
5644
5644
|
this.colHeaderName = 'header';
|
|
5645
5645
|
this.colFieldName = 'field';
|
|
5646
5646
|
this.minWidth = 0;
|
|
5647
|
+
this.minWidthForBodyOnly = true;
|
|
5647
5648
|
this.striped = true;
|
|
5648
5649
|
this.bordered = true;
|
|
5649
5650
|
this.size = 'normal';
|
|
@@ -5781,23 +5782,23 @@ class CpsTreeTableComponent {
|
|
|
5781
5782
|
this.selectedColumns = this.columns;
|
|
5782
5783
|
}
|
|
5783
5784
|
ngAfterViewInit() {
|
|
5784
|
-
|
|
5785
|
-
const treeTableMain = this.primengTreeTable.el.nativeElement.querySelector('.p-treetable');
|
|
5786
|
-
if (treeTableMain)
|
|
5787
|
-
treeTableMain.style.overflow = 'auto';
|
|
5788
|
-
const scrollableWrapper = this.primengTreeTable.el.nativeElement.querySelector('.p-treetable-scrollable-wrapper');
|
|
5789
|
-
if (scrollableWrapper)
|
|
5790
|
-
scrollableWrapper.style.minWidth = this.minWidth + 'px';
|
|
5791
|
-
const treeTableHeader = this.primengTreeTable.el.nativeElement.querySelector('.p-treetable-header');
|
|
5792
|
-
if (treeTableHeader)
|
|
5793
|
-
treeTableHeader.style.minWidth = this.minWidth + 'px';
|
|
5794
|
-
}
|
|
5785
|
+
this._setMinWidthOverall();
|
|
5795
5786
|
this.scrollableBody = this.primengTreeTable.el.nativeElement.querySelector('.p-treetable-scrollable-body');
|
|
5796
5787
|
if (this.scrollableBody) {
|
|
5797
|
-
this.
|
|
5788
|
+
if (this.minWidthForBodyOnly && this.minWidth > 0) {
|
|
5789
|
+
const table = this.scrollableBody.querySelector('table');
|
|
5790
|
+
if (table)
|
|
5791
|
+
table.style.minWidth = this.minWidth + 'px';
|
|
5792
|
+
}
|
|
5798
5793
|
if (this.virtualScroll && this.defScrollHeight === 'flex')
|
|
5799
5794
|
this.defScrollHeightPx = this.scrollableBody.clientHeight;
|
|
5795
|
+
this.headerBox = this.primengTreeTable.el.nativeElement.querySelector('.p-treetable-scrollable-header-box');
|
|
5800
5796
|
if (this.headerBox) {
|
|
5797
|
+
if (this.minWidthForBodyOnly && this.minWidth > 0) {
|
|
5798
|
+
const table = this.headerBox.querySelector('table');
|
|
5799
|
+
if (table)
|
|
5800
|
+
table.style.minWidth = this.minWidth + 'px';
|
|
5801
|
+
}
|
|
5801
5802
|
this.scrollbarWidth = DomHandler.calculateScrollbarWidth();
|
|
5802
5803
|
this.scrollableBody.addEventListener('treeTableBodyResized', () => {
|
|
5803
5804
|
this._recalcVirtualHeight();
|
|
@@ -5825,12 +5826,33 @@ class CpsTreeTableComponent {
|
|
|
5825
5826
|
this._recalcVirtualHeight();
|
|
5826
5827
|
this.cdRef.detectChanges();
|
|
5827
5828
|
}
|
|
5829
|
+
_setMinWidthOverall() {
|
|
5830
|
+
if (this.minWidthForBodyOnly || !this.minWidth || !this.primengTreeTable)
|
|
5831
|
+
return;
|
|
5832
|
+
const treeTableMain = this.primengTreeTable.el?.nativeElement?.querySelector('.p-treetable');
|
|
5833
|
+
if (treeTableMain) {
|
|
5834
|
+
treeTableMain.style.overflow = 'auto';
|
|
5835
|
+
const paginatorEl = treeTableMain.querySelector('.p-paginator');
|
|
5836
|
+
if (paginatorEl)
|
|
5837
|
+
paginatorEl.style.minWidth = this.minWidth + 'px';
|
|
5838
|
+
const loadingOverlay = treeTableMain.querySelector('.p-treetable-loading-overlay');
|
|
5839
|
+
if (loadingOverlay)
|
|
5840
|
+
loadingOverlay.style.minWidth = this.minWidth + 'px';
|
|
5841
|
+
}
|
|
5842
|
+
const scrollableWrapper = this.primengTreeTable.el?.nativeElement?.querySelector('.p-treetable-scrollable-wrapper');
|
|
5843
|
+
if (scrollableWrapper)
|
|
5844
|
+
scrollableWrapper.style.minWidth = this.minWidth + 'px';
|
|
5845
|
+
const treeTableHeader = this.primengTreeTable.el?.nativeElement?.querySelector('.p-treetable-header');
|
|
5846
|
+
if (treeTableHeader)
|
|
5847
|
+
treeTableHeader.style.minWidth = this.minWidth + 'px';
|
|
5848
|
+
}
|
|
5828
5849
|
ngOnChanges(changes) {
|
|
5829
5850
|
if (this.loading) {
|
|
5830
5851
|
this.clearSelection();
|
|
5831
5852
|
if (this.clearGlobalFilterOnLoading)
|
|
5832
5853
|
this.clearGlobalFilter();
|
|
5833
5854
|
}
|
|
5855
|
+
this._setMinWidthOverall();
|
|
5834
5856
|
const dataChanges = changes?.data;
|
|
5835
5857
|
if (dataChanges?.previousValue !== dataChanges?.currentValue) {
|
|
5836
5858
|
this.clearSelection();
|
|
@@ -6080,7 +6102,7 @@ class CpsTreeTableComponent {
|
|
|
6080
6102
|
}
|
|
6081
6103
|
}
|
|
6082
6104
|
CpsTreeTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CpsTreeTableComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
6083
|
-
CpsTreeTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: CpsTreeTableComponent, isStandalone: true, selector: "cps-tree-table", inputs: { data: "data", columns: "columns", colHeaderName: "colHeaderName", colFieldName: "colFieldName", minWidth: "minWidth", striped: "striped", bordered: "bordered", size: "size", selectable: "selectable", rowHover: "rowHover", showRowMenu: "showRowMenu", loading: "loading", tableStyle: "tableStyle", tableStyleClass: "tableStyleClass", sortable: "sortable", sortMode: "sortMode", customSort: "customSort", hasToolbar: "hasToolbar", toolbarSize: "toolbarSize", toolbarTitle: "toolbarTitle", toolbarIcon: "toolbarIcon", toolbarIconColor: "toolbarIconColor", scrollable: "scrollable", scrollHeight: "scrollHeight", virtualScroll: "virtualScroll", maxVirtualScrollItemHeight: "maxVirtualScrollItemHeight", numToleratedItems: "numToleratedItems", paginator: "paginator", alwaysShowPaginator: "alwaysShowPaginator", rowsPerPageOptions: "rowsPerPageOptions", first: "first", rows: "rows", resetPageOnRowsChange: "resetPageOnRowsChange", resetPageOnSort: "resetPageOnSort", totalRecords: "totalRecords", emptyMessage: "emptyMessage", emptyBodyHeight: "emptyBodyHeight", lazy: "lazy", lazyLoadOnInit: "lazyLoadOnInit", showGlobalFilter: "showGlobalFilter", globalFilterPlaceholder: "globalFilterPlaceholder", globalFilterFields: "globalFilterFields", clearGlobalFilterOnLoading: "clearGlobalFilterOnLoading", showRemoveBtnOnSelect: "showRemoveBtnOnSelect", removeBtnOnSelectDisabled: "removeBtnOnSelectDisabled", showAdditionalBtnOnSelect: "showAdditionalBtnOnSelect", additionalBtnOnSelectTitle: "additionalBtnOnSelectTitle", additionalBtnOnSelectDisabled: "additionalBtnOnSelectDisabled", showActionBtn: "showActionBtn", actionBtnTitle: "actionBtnTitle", actionBtnDisabled: "actionBtnDisabled", showDataReloadBtn: "showDataReloadBtn", dataReloadBtnDisabled: "dataReloadBtnDisabled", showColumnsToggleBtn: "showColumnsToggleBtn", columnsToggleBtnDisabled: "columnsToggleBtnDisabled" }, outputs: { selectionChanged: "selectionChanged", actionBtnClicked: "actionBtnClicked", additionalBtnOnSelectClicked: "additionalBtnOnSelectClicked", editRowBtnClicked: "editRowBtnClicked", rowsRemoved: "rowsRemoved", pageChanged: "pageChanged", sorted: "sorted", filtered: "filtered", columnsSelected: "columnsSelected", lazyLoaded: "lazyLoaded", dataReloadBtnClicked: "dataReloadBtnClicked", nodeExpanded: "nodeExpanded", nodeCollapsed: "nodeCollapsed", nodeSelected: "nodeSelected", nodeUnselected: "nodeUnselected", customSortFunction: "customSortFunction" }, providers: [
|
|
6105
|
+
CpsTreeTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: CpsTreeTableComponent, isStandalone: true, selector: "cps-tree-table", inputs: { data: "data", columns: "columns", colHeaderName: "colHeaderName", colFieldName: "colFieldName", minWidth: "minWidth", minWidthForBodyOnly: "minWidthForBodyOnly", striped: "striped", bordered: "bordered", size: "size", selectable: "selectable", rowHover: "rowHover", showRowMenu: "showRowMenu", loading: "loading", tableStyle: "tableStyle", tableStyleClass: "tableStyleClass", sortable: "sortable", sortMode: "sortMode", customSort: "customSort", hasToolbar: "hasToolbar", toolbarSize: "toolbarSize", toolbarTitle: "toolbarTitle", toolbarIcon: "toolbarIcon", toolbarIconColor: "toolbarIconColor", scrollable: "scrollable", scrollHeight: "scrollHeight", virtualScroll: "virtualScroll", maxVirtualScrollItemHeight: "maxVirtualScrollItemHeight", numToleratedItems: "numToleratedItems", paginator: "paginator", alwaysShowPaginator: "alwaysShowPaginator", rowsPerPageOptions: "rowsPerPageOptions", first: "first", rows: "rows", resetPageOnRowsChange: "resetPageOnRowsChange", resetPageOnSort: "resetPageOnSort", totalRecords: "totalRecords", emptyMessage: "emptyMessage", emptyBodyHeight: "emptyBodyHeight", lazy: "lazy", lazyLoadOnInit: "lazyLoadOnInit", showGlobalFilter: "showGlobalFilter", globalFilterPlaceholder: "globalFilterPlaceholder", globalFilterFields: "globalFilterFields", clearGlobalFilterOnLoading: "clearGlobalFilterOnLoading", showRemoveBtnOnSelect: "showRemoveBtnOnSelect", removeBtnOnSelectDisabled: "removeBtnOnSelectDisabled", showAdditionalBtnOnSelect: "showAdditionalBtnOnSelect", additionalBtnOnSelectTitle: "additionalBtnOnSelectTitle", additionalBtnOnSelectDisabled: "additionalBtnOnSelectDisabled", showActionBtn: "showActionBtn", actionBtnTitle: "actionBtnTitle", actionBtnDisabled: "actionBtnDisabled", showDataReloadBtn: "showDataReloadBtn", dataReloadBtnDisabled: "dataReloadBtnDisabled", showColumnsToggleBtn: "showColumnsToggleBtn", columnsToggleBtnDisabled: "columnsToggleBtnDisabled" }, outputs: { selectionChanged: "selectionChanged", actionBtnClicked: "actionBtnClicked", additionalBtnOnSelectClicked: "additionalBtnOnSelectClicked", editRowBtnClicked: "editRowBtnClicked", rowsRemoved: "rowsRemoved", pageChanged: "pageChanged", sorted: "sorted", filtered: "filtered", columnsSelected: "columnsSelected", lazyLoaded: "lazyLoaded", dataReloadBtnClicked: "dataReloadBtnClicked", nodeExpanded: "nodeExpanded", nodeCollapsed: "nodeCollapsed", nodeSelected: "nodeSelected", nodeUnselected: "nodeUnselected", customSortFunction: "customSortFunction" }, providers: [
|
|
6084
6106
|
TreeTableService,
|
|
6085
6107
|
{
|
|
6086
6108
|
provide: TreeTable,
|
|
@@ -6127,6 +6149,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
6127
6149
|
type: Input
|
|
6128
6150
|
}], minWidth: [{
|
|
6129
6151
|
type: Input
|
|
6152
|
+
}], minWidthForBodyOnly: [{
|
|
6153
|
+
type: Input
|
|
6130
6154
|
}], striped: [{
|
|
6131
6155
|
type: Input
|
|
6132
6156
|
}], bordered: [{
|