@smartbit4all/ng-client 2.0.6 → 2.1.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.
Files changed (58) hide show
  1. package/esm2020/lib/smart-client/smart-component-api-client.mjs +11 -3
  2. package/esm2020/lib/view-context/api/api/api.mjs +1 -1
  3. package/esm2020/lib/view-context/api/api/view.service.mjs +43 -1
  4. package/esm2020/lib/view-context/api/api.module.mjs +1 -1
  5. package/esm2020/lib/view-context/api/configuration.mjs +1 -1
  6. package/esm2020/lib/view-context/api/encoder.mjs +1 -1
  7. package/esm2020/lib/view-context/api/index.mjs +1 -1
  8. package/esm2020/lib/view-context/api/model/closeResult.mjs +1 -1
  9. package/esm2020/lib/view-context/api/model/componentConstraint.mjs +1 -1
  10. package/esm2020/lib/view-context/api/model/componentModel.mjs +1 -1
  11. package/esm2020/lib/view-context/api/model/componentModelChange.mjs +1 -1
  12. package/esm2020/lib/view-context/api/model/dataChange.mjs +1 -1
  13. package/esm2020/lib/view-context/api/model/dataChangeEvent.mjs +1 -1
  14. package/esm2020/lib/view-context/api/model/dataChangeKind.mjs +1 -1
  15. package/esm2020/lib/view-context/api/model/messageData.mjs +1 -1
  16. package/esm2020/lib/view-context/api/model/messageOption.mjs +1 -1
  17. package/esm2020/lib/view-context/api/model/messageOptionType.mjs +1 -1
  18. package/esm2020/lib/view-context/api/model/messageResult.mjs +1 -1
  19. package/esm2020/lib/view-context/api/model/messageType.mjs +1 -1
  20. package/esm2020/lib/view-context/api/model/models.mjs +1 -1
  21. package/esm2020/lib/view-context/api/model/openPendingData.mjs +1 -1
  22. package/esm2020/lib/view-context/api/model/smartLinkData.mjs +1 -1
  23. package/esm2020/lib/view-context/api/model/uiAction.mjs +1 -1
  24. package/esm2020/lib/view-context/api/model/uiActionButtonDescriptor.mjs +1 -1
  25. package/esm2020/lib/view-context/api/model/uiActionButtonIconPos.mjs +1 -1
  26. package/esm2020/lib/view-context/api/model/uiActionButtonType.mjs +1 -1
  27. package/esm2020/lib/view-context/api/model/uiActionConstraint.mjs +1 -1
  28. package/esm2020/lib/view-context/api/model/uiActionDescriptor.mjs +1 -1
  29. package/esm2020/lib/view-context/api/model/uiActionDialogDescriptor.mjs +1 -1
  30. package/esm2020/lib/view-context/api/model/uiActionFeedbackType.mjs +1 -1
  31. package/esm2020/lib/view-context/api/model/uiActionInputType.mjs +1 -1
  32. package/esm2020/lib/view-context/api/model/uiActionRequest.mjs +1 -1
  33. package/esm2020/lib/view-context/api/model/uiActionUploadDescriptor.mjs +1 -1
  34. package/esm2020/lib/view-context/api/model/valueSet.mjs +1 -1
  35. package/esm2020/lib/view-context/api/model/view.mjs +1 -1
  36. package/esm2020/lib/view-context/api/model/viewApiError.mjs +1 -1
  37. package/esm2020/lib/view-context/api/model/viewConstraint.mjs +1 -1
  38. package/esm2020/lib/view-context/api/model/viewContext.mjs +1 -1
  39. package/esm2020/lib/view-context/api/model/viewContextChange.mjs +1 -1
  40. package/esm2020/lib/view-context/api/model/viewContextData.mjs +1 -1
  41. package/esm2020/lib/view-context/api/model/viewContextUpdate.mjs +1 -1
  42. package/esm2020/lib/view-context/api/model/viewData.mjs +1 -1
  43. package/esm2020/lib/view-context/api/model/viewState.mjs +1 -1
  44. package/esm2020/lib/view-context/api/model/viewStateUpdate.mjs +1 -1
  45. package/esm2020/lib/view-context/api/model/viewType.mjs +1 -1
  46. package/esm2020/lib/view-context/api/param.mjs +1 -1
  47. package/esm2020/lib/view-context/api/variables.mjs +1 -1
  48. package/esm2020/lib/view-context/smart-view-context.service.mjs +4 -1
  49. package/fesm2015/smartbit4all-ng-client.mjs +57 -2
  50. package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
  51. package/fesm2020/smartbit4all-ng-client.mjs +55 -2
  52. package/fesm2020/smartbit4all-ng-client.mjs.map +1 -1
  53. package/lib/view-context/api/api/view.service.d.ts +18 -0
  54. package/lib/view-context/smart-view-context.service.d.ts +1 -0
  55. package/package.json +1 -1
  56. package/smartbit4all-ng-client-2.1.0.tgz +0 -0
  57. package/src/lib/view-context/api/README.md +226 -226
  58. package/smartbit4all-ng-client-2.0.6.tgz +0 -0
@@ -1352,6 +1352,48 @@ class ViewService {
1352
1352
  reportProgress: reportProgress
1353
1353
  });
1354
1354
  }
1355
+ getComponentModel2(uuid, observe = 'body', reportProgress = false, options) {
1356
+ if (uuid === null || uuid === undefined) {
1357
+ throw new Error('Required parameter uuid was null or undefined when calling getComponentModel2.');
1358
+ }
1359
+ let localVarHeaders = this.defaultHeaders;
1360
+ let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
1361
+ if (localVarHttpHeaderAcceptSelected === undefined) {
1362
+ // to determine the Accept header
1363
+ const httpHeaderAccepts = [
1364
+ 'application/json'
1365
+ ];
1366
+ localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
1367
+ }
1368
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
1369
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
1370
+ }
1371
+ let localVarHttpContext = options && options.context;
1372
+ if (localVarHttpContext === undefined) {
1373
+ localVarHttpContext = new HttpContext();
1374
+ }
1375
+ let responseType_ = 'json';
1376
+ if (localVarHttpHeaderAcceptSelected) {
1377
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
1378
+ responseType_ = 'text';
1379
+ }
1380
+ else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
1381
+ responseType_ = 'json';
1382
+ }
1383
+ else {
1384
+ responseType_ = 'blob';
1385
+ }
1386
+ }
1387
+ let localVarPath = `/component/${this.configuration.encodeParam({ name: "uuid", value: uuid, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "uuid" })}/load`;
1388
+ return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
1389
+ context: localVarHttpContext,
1390
+ responseType: responseType_,
1391
+ withCredentials: this.configuration.withCredentials,
1392
+ headers: localVarHeaders,
1393
+ observe: observe,
1394
+ reportProgress: reportProgress
1395
+ });
1396
+ }
1355
1397
  getViewConstraint(uuid, observe = 'body', reportProgress = false, options) {
1356
1398
  if (uuid === null || uuid === undefined) {
1357
1399
  throw new Error('Required parameter uuid was null or undefined when calling getViewConstraint.');
@@ -2767,6 +2809,9 @@ class SmartViewContextService {
2767
2809
  async load(uuid) {
2768
2810
  return await this.view.getComponentModel(uuid).toPromise();
2769
2811
  }
2812
+ async load2(uuid) {
2813
+ return await this.view.getComponentModel2(uuid).toPromise();
2814
+ }
2770
2815
  }
2771
2816
  SmartViewContextService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartViewContextService, deps: [{ token: ViewService }, { token: SmartSessionService }, { token: i3$1.SmartNavigationService }, { token: i4$1.SmartdialogService }, { token: ApiQueueService }], target: i0.ɵɵFactoryTarget.Injectable });
2772
2817
  SmartViewContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartViewContextService, providedIn: 'root' });
@@ -5971,7 +6016,8 @@ let SmartComponentApiClient = class SmartComponentApiClient {
5971
6016
  }
5972
6017
  async load() {
5973
6018
  this.uuid = this.viewContext.getUuidOfPage(this.pageName);
5974
- await this.viewContext.load(this.uuid);
6019
+ //this.model = await this.viewContext.load(this.uuid);
6020
+ await this.viewContext.load2(this.uuid);
5975
6021
  }
5976
6022
  //#region UseUiAction
5977
6023
  getAdditionalParams(uiAction) {
@@ -6089,6 +6135,7 @@ let SmartComponentApiClient = class SmartComponentApiClient {
6089
6135
  if (change.changedWidgets) {
6090
6136
  this.handleChangeWidgets(change.changedWidgets);
6091
6137
  }
6138
+ let dataChangeHasBeenNexted = false;
6092
6139
  if (change.changes) {
6093
6140
  const changes = change.changes;
6094
6141
  Object.keys(changes).map((changeKey) => {
@@ -6107,8 +6154,14 @@ let SmartComponentApiClient = class SmartComponentApiClient {
6107
6154
  else if (changeKey === 'constraints') {
6108
6155
  this.handleConstraintChange(changes, changeKey);
6109
6156
  }
6157
+ else if (changeKey === '') {
6158
+ this.model = changes[''];
6159
+ dataChangeHasBeenNexted = true;
6160
+ }
6110
6161
  });
6111
- this.dataChanged.next();
6162
+ if (!dataChangeHasBeenNexted) {
6163
+ this.dataChanged.next();
6164
+ }
6112
6165
  }
6113
6166
  }
6114
6167
  catch (error) {