@smartbit4all/ng-client 3.1.62 → 3.1.63
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/models/model.mjs +1 -7
- package/esm2020/lib/smart-grid/smart-grid.component.mjs +6 -10
- package/esm2020/lib/smart-grid/smart-grid.service.mjs +6 -12
- package/fesm2015/smartbit4all-ng-client.mjs +11 -26
- package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
- package/fesm2020/smartbit4all-ng-client.mjs +11 -27
- package/fesm2020/smartbit4all-ng-client.mjs.map +1 -1
- package/lib/smart-grid/smart-grid.component.d.ts +1 -1
- package/package.json +1 -1
- package/smartbit4all-ng-client-3.1.63.tgz +0 -0
- package/smartbit4all-ng-client-3.1.62.tgz +0 -0
|
@@ -9623,13 +9623,7 @@ var SmartGridType;
|
|
|
9623
9623
|
SmartGridType["CARD1"] = "CARD1";
|
|
9624
9624
|
SmartGridType["CARD2"] = "CARD2";
|
|
9625
9625
|
SmartGridType["CUSTOM"] = "CUSTOM";
|
|
9626
|
-
})(SmartGridType || (SmartGridType = {}));
|
|
9627
|
-
// export type SmartGridTreeNode = {
|
|
9628
|
-
// item: string;
|
|
9629
|
-
// level: number;
|
|
9630
|
-
// expandable: boolean;
|
|
9631
|
-
// row: SmartGrid;
|
|
9632
|
-
// };
|
|
9626
|
+
})(SmartGridType || (SmartGridType = {}));
|
|
9633
9627
|
|
|
9634
9628
|
class SmartGridCardComponent {
|
|
9635
9629
|
constructor(cfService) {
|
|
@@ -10308,9 +10302,8 @@ class SmartGridService {
|
|
|
10308
10302
|
this.gridModelChanged = new Subject();
|
|
10309
10303
|
}
|
|
10310
10304
|
async load(uuid, gridIdentifier) {
|
|
10311
|
-
|
|
10312
|
-
|
|
10313
|
-
this.updateGrid(this.gridModel, 'load');
|
|
10305
|
+
let gridModelResult = await lastValueFrom(this.api.load(uuid, gridIdentifier));
|
|
10306
|
+
this.updateGrid(gridModelResult, 'load');
|
|
10314
10307
|
}
|
|
10315
10308
|
async setPage(uuid, gridIdentifier, offset, limit) {
|
|
10316
10309
|
await lastValueFrom(this.api.setPage(uuid, gridIdentifier, offset, limit));
|
|
@@ -10329,14 +10322,9 @@ class SmartGridService {
|
|
|
10329
10322
|
}
|
|
10330
10323
|
async select(smartGrid, gridRow) {
|
|
10331
10324
|
gridRow.selected = !gridRow.selected;
|
|
10332
|
-
|
|
10333
|
-
|
|
10334
|
-
|
|
10335
|
-
// smartGrid.gridIdentifier,
|
|
10336
|
-
// gridRow.id!,
|
|
10337
|
-
// gridRow.selected
|
|
10338
|
-
// )
|
|
10339
|
-
// .toPromise();
|
|
10325
|
+
return await this.api
|
|
10326
|
+
.select(smartGrid.gridModel.viewUuid, smartGrid.gridIdentifier, gridRow.id, gridRow.selected)
|
|
10327
|
+
.toPromise();
|
|
10340
10328
|
}
|
|
10341
10329
|
async selectAll(smartGrid, selected) {
|
|
10342
10330
|
return await this.api
|
|
@@ -11239,7 +11227,7 @@ class SmartGridComponent {
|
|
|
11239
11227
|
this.treeChecklistSelection = new SelectionModel(isMultiple);
|
|
11240
11228
|
}
|
|
11241
11229
|
this.treeDataSource.data = this.smartGrid.gridModel.page.rows.filter((row) => !row.parent);
|
|
11242
|
-
// TODO handle and set
|
|
11230
|
+
// TODO handle and set expansion..
|
|
11243
11231
|
this.treeChecklistSelection?.clear();
|
|
11244
11232
|
this.treeControl?.dataNodes.forEach((node) => {
|
|
11245
11233
|
if (node.selected) {
|
|
@@ -11510,21 +11498,17 @@ class SmartGridComponent {
|
|
|
11510
11498
|
}
|
|
11511
11499
|
async onSelect(rowId) {
|
|
11512
11500
|
this.isBlocked = true;
|
|
11513
|
-
this.
|
|
11501
|
+
this.selectRowInternal(rowId);
|
|
11514
11502
|
this.refresh();
|
|
11515
11503
|
}
|
|
11516
|
-
async
|
|
11504
|
+
async selectRowInternal(rowId) {
|
|
11517
11505
|
const row = this.service.gridModel.page.rows?.find((gridRow) => gridRow.id === rowId);
|
|
11518
11506
|
const viewContextChange = await this.service.select(this.smartGrid, row);
|
|
11519
|
-
|
|
11507
|
+
this.smartGrid.viewContextService.handleChanges(viewContextChange.changes);
|
|
11520
11508
|
}
|
|
11521
11509
|
async onSelectList(rowIds) {
|
|
11522
|
-
// remove
|
|
11523
|
-
this.isBlocked = true;
|
|
11524
|
-
this.refresh();
|
|
11525
|
-
//
|
|
11526
11510
|
this.isBlocked = true;
|
|
11527
|
-
rowIds.forEach((rowId) => this.
|
|
11511
|
+
rowIds.forEach((rowId) => this.selectRowInternal(rowId));
|
|
11528
11512
|
this.refresh();
|
|
11529
11513
|
}
|
|
11530
11514
|
async onSelectAll(selected) {
|