@smartbit4all/ng-client 3.3.71 → 3.3.72

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.
@@ -9026,6 +9026,63 @@ class GridService {
9026
9026
  reportProgress: reportProgress
9027
9027
  });
9028
9028
  }
9029
+ selectRows(uuid, gridId, gridSelectionChange, observe = 'body', reportProgress = false, options) {
9030
+ if (uuid === null || uuid === undefined) {
9031
+ throw new Error('Required parameter uuid was null or undefined when calling selectRows.');
9032
+ }
9033
+ if (gridId === null || gridId === undefined) {
9034
+ throw new Error('Required parameter gridId was null or undefined when calling selectRows.');
9035
+ }
9036
+ if (gridSelectionChange === null || gridSelectionChange === undefined) {
9037
+ throw new Error('Required parameter gridSelectionChange was null or undefined when calling selectRows.');
9038
+ }
9039
+ let localVarHeaders = this.defaultHeaders;
9040
+ let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
9041
+ if (localVarHttpHeaderAcceptSelected === undefined) {
9042
+ // to determine the Accept header
9043
+ const httpHeaderAccepts = [
9044
+ 'application/json'
9045
+ ];
9046
+ localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
9047
+ }
9048
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
9049
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
9050
+ }
9051
+ let localVarHttpContext = options && options.context;
9052
+ if (localVarHttpContext === undefined) {
9053
+ localVarHttpContext = new HttpContext();
9054
+ }
9055
+ // to determine the Content-Type header
9056
+ const consumes = [
9057
+ 'application/json'
9058
+ ];
9059
+ const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
9060
+ if (httpContentTypeSelected !== undefined) {
9061
+ localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
9062
+ }
9063
+ let responseType_ = 'json';
9064
+ if (localVarHttpHeaderAcceptSelected) {
9065
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
9066
+ responseType_ = 'text';
9067
+ }
9068
+ else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
9069
+ responseType_ = 'json';
9070
+ }
9071
+ else {
9072
+ responseType_ = 'blob';
9073
+ }
9074
+ }
9075
+ let localVarPath = `/grid/${this.configuration.encodeParam({ name: "uuid", value: uuid, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "uuid" })}/${this.configuration.encodeParam({ name: "gridId", value: gridId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/selects`;
9076
+ return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
9077
+ context: localVarHttpContext,
9078
+ body: gridSelectionChange,
9079
+ responseType: responseType_,
9080
+ withCredentials: this.configuration.withCredentials,
9081
+ headers: localVarHeaders,
9082
+ observe: observe,
9083
+ reportProgress: reportProgress
9084
+ });
9085
+ }
9029
9086
  setPage(uuid, gridIdentifier, offset, limit, observe = 'body', reportProgress = false, options) {
9030
9087
  if (uuid === null || uuid === undefined) {
9031
9088
  throw new Error('Required parameter uuid was null or undefined when calling setPage.');
@@ -9188,6 +9245,18 @@ var GridDataAccessConfigKindEnum;
9188
9245
  })(GridDataAccessConfigKindEnum || (GridDataAccessConfigKindEnum = {}));
9189
9246
  ;
9190
9247
 
9248
+ /**
9249
+ * Grid api
9250
+ * The grid api is resposible for the grid components that shows a list of item.
9251
+ *
9252
+ * The version of the OpenAPI document: 1.0.0
9253
+ * Contact: info@it4all.hu
9254
+ *
9255
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9256
+ * https://openapi-generator.tech
9257
+ * Do not edit the class manually.
9258
+ */
9259
+
9191
9260
  /**
9192
9261
  * Grid api
9193
9262
  * The grid api is resposible for the grid components that shows a list of item.
@@ -9304,6 +9373,11 @@ class SmartGridService {
9304
9373
  .select(smartGrid.gridModel.viewUuid, smartGrid.gridIdentifier, gridRow.id, gridRow.selected)
9305
9374
  .toPromise();
9306
9375
  }
9376
+ async selectRows(smartGrid, selected, unselected) {
9377
+ return await this.api
9378
+ .selectRows(smartGrid.gridModel.viewUuid, smartGrid.gridIdentifier, { selected, unselected })
9379
+ .toPromise();
9380
+ }
9307
9381
  async selectAll(smartGrid, selected) {
9308
9382
  return await this.api
9309
9383
  .selectAll(smartGrid.gridModel.viewUuid, smartGrid.gridIdentifier, selected)
@@ -10011,8 +10085,7 @@ class SmartGridComponent {
10011
10085
  ?.filter((row) => unselectedIds.includes(row.id))
10012
10086
  .forEach((row) => (row.selected = false));
10013
10087
  }
10014
- let union = selectedIds.concat(unselectedIds);
10015
- this.onSelectList(union);
10088
+ this.onSelectRows(selectedIds, unselectedIds);
10016
10089
  }
10017
10090
  checkAllParentsSelection(node) {
10018
10091
  let parent = this.getParentNode(node);
@@ -10258,20 +10331,14 @@ class SmartGridComponent {
10258
10331
  }
10259
10332
  }
10260
10333
  async onSelect(rowId) {
10261
- this.onSelectList([rowId]);
10262
- }
10263
- async selectRowInternal(rowId) {
10264
- const row = this.service.gridModel.page.rows?.find((gridRow) => gridRow.id === rowId);
10265
- const viewContextChange = await this.service.select(this.smartGrid, row);
10266
- this.smartGrid.viewContextService.handleChanges(viewContextChange.changes);
10267
- }
10268
- async onSelectList(rowIds) {
10269
10334
  this.isBlocked = true;
10270
10335
  if (this.dev) {
10271
10336
  this.render();
10272
10337
  }
10273
10338
  else {
10274
- rowIds.forEach((rowId) => this.selectRowInternal(rowId));
10339
+ const row = this.service.gridModel.page.rows?.find((gridRow) => gridRow.id === rowId);
10340
+ const viewContextChange = await this.service.select(this.smartGrid, row);
10341
+ this.smartGrid.viewContextService.handleChanges(viewContextChange.changes);
10275
10342
  this.refresh();
10276
10343
  }
10277
10344
  }
@@ -10281,6 +10348,19 @@ class SmartGridComponent {
10281
10348
  this.smartGrid.viewContextService.handleChanges(viewContextChange.changes);
10282
10349
  this.refresh();
10283
10350
  }
10351
+ async onSelectRows(selectedIds, unselectedIds) {
10352
+ this.isBlocked = true;
10353
+ if (this.dev) {
10354
+ this.render();
10355
+ }
10356
+ else {
10357
+ let selected = selectedIds.filter((item) => item !== undefined);
10358
+ let unselected = unselectedIds.filter((item) => item !== undefined);
10359
+ const viewContextChange = await this.service.selectRows(this.smartGrid, selected, unselected);
10360
+ this.smartGrid.viewContextService.handleChanges(viewContextChange.changes);
10361
+ this.refresh();
10362
+ }
10363
+ }
10284
10364
  editColumns() {
10285
10365
  let dialogData = {
10286
10366
  content: {