@smartbit4all/ng-client 3.2.38 → 3.2.40
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/smart-grid/smart-grid.component.mjs +4 -3
- package/esm2020/lib/smart-grid/smart-grid.service.mjs +9 -2
- package/fesm2015/smartbit4all-ng-client.mjs +15 -5
- package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
- package/fesm2020/smartbit4all-ng-client.mjs +11 -3
- package/fesm2020/smartbit4all-ng-client.mjs.map +1 -1
- package/lib/smart-grid/smart-grid.component.d.ts +0 -1
- package/lib/smart-grid/smart-grid.service.d.ts +2 -0
- package/package.json +1 -1
- package/smartbit4all-ng-client-3.2.40.tgz +0 -0
- package/smartbit4all-ng-client-3.2.38.tgz +0 -0
|
@@ -11049,9 +11049,9 @@ class SmartGridService {
|
|
|
11049
11049
|
orderedColumnNames: this.gridModel.view?.orderedColumnNames,
|
|
11050
11050
|
pageSize: +limit,
|
|
11051
11051
|
});
|
|
11052
|
-
// await this.load(uuid, gridIdentifier);
|
|
11053
11052
|
}
|
|
11054
11053
|
async sort(smartGrid, gridUpdateData) {
|
|
11054
|
+
gridUpdateData.pageSize = this.getCurrentPageSize();
|
|
11055
11055
|
let gridModelResult = await this.api
|
|
11056
11056
|
.update(smartGrid.gridModel.viewUuid, smartGrid.gridIdentifier, gridUpdateData)
|
|
11057
11057
|
.toPromise();
|
|
@@ -11074,6 +11074,7 @@ class SmartGridService {
|
|
|
11074
11074
|
.toPromise();
|
|
11075
11075
|
}
|
|
11076
11076
|
async update(uuid, identifier, updateData) {
|
|
11077
|
+
updateData.pageSize = this.getCurrentPageSize();
|
|
11077
11078
|
let gridModelResult = await this.api.update(uuid, identifier, updateData).toPromise();
|
|
11078
11079
|
this.updateGrid(gridModelResult, 'update');
|
|
11079
11080
|
}
|
|
@@ -11086,6 +11087,12 @@ class SmartGridService {
|
|
|
11086
11087
|
console.error(`GridModel is undefined in service after ${method}!`);
|
|
11087
11088
|
}
|
|
11088
11089
|
}
|
|
11090
|
+
getCurrentPageSize() {
|
|
11091
|
+
if (this.paginator) {
|
|
11092
|
+
return this.gridModel.pageSize;
|
|
11093
|
+
}
|
|
11094
|
+
return 0;
|
|
11095
|
+
}
|
|
11089
11096
|
}
|
|
11090
11097
|
SmartGridService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartGridService, deps: [{ token: GridService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11091
11098
|
SmartGridService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartGridService });
|
|
@@ -11698,7 +11705,7 @@ class SmartGridComponent {
|
|
|
11698
11705
|
this.service = service;
|
|
11699
11706
|
this.cfService = cfService;
|
|
11700
11707
|
this.dialog = dialog;
|
|
11701
|
-
|
|
11708
|
+
// private readonly defaultPageSize: number = 10;
|
|
11702
11709
|
this.defaultPageSizeOptions = [5, 10, 25, 50];
|
|
11703
11710
|
this._destroy$ = new Subject();
|
|
11704
11711
|
this.dev = false;
|
|
@@ -11732,6 +11739,7 @@ class SmartGridComponent {
|
|
|
11732
11739
|
ngOnChanges(changes) {
|
|
11733
11740
|
if (changes['smartGrid']) {
|
|
11734
11741
|
this.smartGrid = changes['smartGrid'].currentValue;
|
|
11742
|
+
this.service.paginator = this.smartGrid?.paginator;
|
|
11735
11743
|
}
|
|
11736
11744
|
if (changes['uuid']) {
|
|
11737
11745
|
this.uuid = changes['uuid'].currentValue;
|
|
@@ -11776,7 +11784,7 @@ class SmartGridComponent {
|
|
|
11776
11784
|
const gridModel = this.smartGrid?.gridModel;
|
|
11777
11785
|
if (gridModel) {
|
|
11778
11786
|
this.length = gridModel.totalRowCount;
|
|
11779
|
-
this.pageSize = gridModel.pageSize
|
|
11787
|
+
this.pageSize = gridModel.pageSize;
|
|
11780
11788
|
if (gridModel.pageSizeOptions && gridModel.pageSizeOptions.length > 0) {
|
|
11781
11789
|
this.pageSizeOptions = gridModel.pageSizeOptions;
|
|
11782
11790
|
}
|