@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.
@@ -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
- // let gridModelResult = await lastValueFrom(this.api.load(uuid, gridIdentifier));
10312
- // this.updateGrid(gridModelResult, 'load');
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
- // return await this.api
10333
- // .select(
10334
- // smartGrid.gridModel.viewUuid!,
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 selection..
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.onSelectInternal(rowId);
11501
+ this.selectRowInternal(rowId);
11514
11502
  this.refresh();
11515
11503
  }
11516
- async onSelectInternal(rowId) {
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
- // this.smartGrid!.viewContextService.handleChanges(viewContextChange.changes);
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.onSelectInternal(rowId));
11511
+ rowIds.forEach((rowId) => this.selectRowInternal(rowId));
11528
11512
  this.refresh();
11529
11513
  }
11530
11514
  async onSelectAll(selected) {