@smartbit4all/ng-client 3.1.44 → 3.1.46

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 (91) hide show
  1. package/esm2020/lib/smart-filter-editor/api/api/filter.service.mjs +49 -22
  2. package/esm2020/lib/smart-filter-editor/api/configuration.mjs +1 -1
  3. package/esm2020/lib/smart-filter-editor/api/encoder.mjs +1 -1
  4. package/esm2020/lib/smart-filter-editor/api/model/filterExpressionBoolOperator.mjs +1 -1
  5. package/esm2020/lib/smart-filter-editor/api/model/filterExpressionBuilderApiConfig.mjs +1 -1
  6. package/esm2020/lib/smart-filter-editor/api/model/filterExpressionBuilderField.mjs +1 -1
  7. package/esm2020/lib/smart-filter-editor/api/model/filterExpressionBuilderGroup.mjs +1 -1
  8. package/esm2020/lib/smart-filter-editor/api/model/filterExpressionBuilderModel.mjs +1 -1
  9. package/esm2020/lib/smart-filter-editor/api/model/filterExpressionBuilderUiModel.mjs +1 -1
  10. package/esm2020/lib/smart-filter-editor/api/model/filterExpressionData.mjs +1 -1
  11. package/esm2020/lib/smart-filter-editor/api/model/filterExpressionDataType.mjs +1 -1
  12. package/esm2020/lib/smart-filter-editor/api/model/filterExpressionField.mjs +1 -1
  13. package/esm2020/lib/smart-filter-editor/api/model/filterExpressionFieldEditor.mjs +1 -1
  14. package/esm2020/lib/smart-filter-editor/api/model/filterExpressionFieldList.mjs +1 -1
  15. package/esm2020/lib/smart-filter-editor/api/model/filterExpressionFieldWidgetType.mjs +1 -1
  16. package/esm2020/lib/smart-filter-editor/api/model/filterExpressionList.mjs +1 -1
  17. package/esm2020/lib/smart-filter-editor/api/model/filterExpressionOperandData.mjs +1 -1
  18. package/esm2020/lib/smart-filter-editor/api/model/filterExpressionOperation.mjs +1 -1
  19. package/esm2020/lib/smart-filter-editor/api/param.mjs +1 -1
  20. package/esm2020/lib/smart-filter-editor/api/variables.mjs +1 -1
  21. package/esm2020/lib/smart-form/api/api/api.mjs +1 -1
  22. package/esm2020/lib/smart-form/api/api/default.service.mjs +1 -1
  23. package/esm2020/lib/smart-form/api/api.module.mjs +1 -1
  24. package/esm2020/lib/smart-form/api/configuration.mjs +1 -1
  25. package/esm2020/lib/smart-form/api/encoder.mjs +1 -1
  26. package/esm2020/lib/smart-form/api/index.mjs +1 -1
  27. package/esm2020/lib/smart-form/api/model/models.mjs +1 -1
  28. package/esm2020/lib/smart-form/api/model/propertyMapping.mjs +1 -1
  29. package/esm2020/lib/smart-form/api/model/selectionDefinition.mjs +1 -1
  30. package/esm2020/lib/smart-form/api/model/smartLayoutDefinition.mjs +1 -1
  31. package/esm2020/lib/smart-form/api/model/smartMatrixModel.mjs +1 -1
  32. package/esm2020/lib/smart-form/api/model/smartWidgetDefinition.mjs +1 -1
  33. package/esm2020/lib/smart-form/api/param.mjs +1 -1
  34. package/esm2020/lib/smart-form/api/variables.mjs +1 -1
  35. package/esm2020/lib/smart-grid/api/grid-api/api/api.mjs +1 -1
  36. package/esm2020/lib/smart-grid/api/grid-api/api/grid.service.mjs +1 -1
  37. package/esm2020/lib/smart-grid/api/grid-api/api.module.mjs +1 -1
  38. package/esm2020/lib/smart-grid/api/grid-api/configuration.mjs +1 -1
  39. package/esm2020/lib/smart-grid/api/grid-api/encoder.mjs +1 -1
  40. package/esm2020/lib/smart-grid/api/grid-api/index.mjs +1 -1
  41. package/esm2020/lib/smart-grid/api/grid-api/model/gridColumnContentType.mjs +1 -1
  42. package/esm2020/lib/smart-grid/api/grid-api/model/gridColumnMeta.mjs +1 -1
  43. package/esm2020/lib/smart-grid/api/grid-api/model/gridDataAccessConfig.mjs +1 -1
  44. package/esm2020/lib/smart-grid/api/grid-api/model/gridModel.mjs +1 -1
  45. package/esm2020/lib/smart-grid/api/grid-api/model/gridPage.mjs +1 -1
  46. package/esm2020/lib/smart-grid/api/grid-api/model/gridRow.mjs +1 -1
  47. package/esm2020/lib/smart-grid/api/grid-api/model/gridSelectionMode.mjs +1 -1
  48. package/esm2020/lib/smart-grid/api/grid-api/model/gridSelectionType.mjs +1 -1
  49. package/esm2020/lib/smart-grid/api/grid-api/model/gridServerModel.mjs +1 -1
  50. package/esm2020/lib/smart-grid/api/grid-api/model/gridUpdateData.mjs +1 -1
  51. package/esm2020/lib/smart-grid/api/grid-api/model/gridView.mjs +1 -1
  52. package/esm2020/lib/smart-grid/api/grid-api/model/gridViewDescriptor.mjs +1 -1
  53. package/esm2020/lib/smart-grid/api/grid-api/model/models.mjs +1 -1
  54. package/esm2020/lib/smart-grid/api/grid-api/param.mjs +1 -1
  55. package/esm2020/lib/smart-grid/api/grid-api/variables.mjs +1 -1
  56. package/esm2020/lib/view-context/api/model/uiActionButtonType.mjs +1 -1
  57. package/esm2020/lib/view-context/api/model/uploadedFile.mjs +1 -1
  58. package/esm2020/lib/view-context/api/model/viewEventHandler.mjs +1 -1
  59. package/esm2020/lib/view-context/smart-ui-action/ui-action.descriptor.service.mjs +62 -10
  60. package/esm2020/lib/view-context/value-api/api/api.mjs +1 -1
  61. package/esm2020/lib/view-context/value-api/api/value.service.mjs +1 -1
  62. package/esm2020/lib/view-context/value-api/api.module.mjs +1 -1
  63. package/esm2020/lib/view-context/value-api/configuration.mjs +1 -1
  64. package/esm2020/lib/view-context/value-api/encoder.mjs +1 -1
  65. package/esm2020/lib/view-context/value-api/index.mjs +1 -1
  66. package/esm2020/lib/view-context/value-api/model/genericValue.mjs +1 -1
  67. package/esm2020/lib/view-context/value-api/model/models.mjs +1 -1
  68. package/esm2020/lib/view-context/value-api/model/value.mjs +1 -1
  69. package/esm2020/lib/view-context/value-api/model/valueSetData.mjs +1 -1
  70. package/esm2020/lib/view-context/value-api/model/valueSetDefinition.mjs +1 -1
  71. package/esm2020/lib/view-context/value-api/model/valueSetDefinitionData.mjs +1 -1
  72. package/esm2020/lib/view-context/value-api/model/valueSetDefinitionIdentifier.mjs +1 -1
  73. package/esm2020/lib/view-context/value-api/model/valueSetDefinitionKind.mjs +1 -1
  74. package/esm2020/lib/view-context/value-api/model/valueSetExpression.mjs +1 -1
  75. package/esm2020/lib/view-context/value-api/model/valueSetOperand.mjs +1 -1
  76. package/esm2020/lib/view-context/value-api/model/valueSetOperation.mjs +1 -1
  77. package/esm2020/lib/view-context/value-api/param.mjs +1 -1
  78. package/esm2020/lib/view-context/value-api/variables.mjs +1 -1
  79. package/fesm2015/smartbit4all-ng-client.mjs +106 -28
  80. package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
  81. package/fesm2020/smartbit4all-ng-client.mjs +106 -28
  82. package/fesm2020/smartbit4all-ng-client.mjs.map +1 -1
  83. package/lib/smart-filter-editor/api/api/filter.service.d.ts +1 -1
  84. package/lib/view-context/smart-ui-action/ui-action.descriptor.service.d.ts +3 -1
  85. package/package.json +1 -1
  86. package/smartbit4all-ng-client-3.1.46.tgz +0 -0
  87. package/src/lib/smart-filter-editor/api/README.md +226 -226
  88. package/src/lib/smart-form/api/README.md +226 -226
  89. package/src/lib/smart-grid/api/grid-api/README.md +226 -226
  90. package/src/lib/view-context/value-api/README.md +226 -226
  91. package/smartbit4all-ng-client-3.1.44.tgz +0 -0
@@ -7233,16 +7233,24 @@ class UiActionDescriptorService {
7233
7233
  async getActionDescriptor(uiAction) {
7234
7234
  let code = uiAction.code;
7235
7235
  let isUnkown = false;
7236
- let isFromServer = false;
7237
- let actionDescriptor = uiAction.descriptor;
7238
- if (actionDescriptor) {
7239
- isFromServer = true;
7236
+ let server = uiAction.descriptor;
7237
+ let client = null;
7238
+ let actionDescriptorFromDescriptors = this.viewContext.getActionDescriptors()?.get(code);
7239
+ if (actionDescriptorFromDescriptors) {
7240
+ client = JSON.parse(JSON.stringify(actionDescriptorFromDescriptors));
7241
+ }
7242
+ let actionDescriptor;
7243
+ if (!client) {
7244
+ // server only
7245
+ actionDescriptor = server;
7240
7246
  }
7241
7247
  else {
7242
- let actionDescriptorFromDescriptors = this.viewContext.getActionDescriptors()?.get(code);
7243
- if (actionDescriptorFromDescriptors) {
7244
- actionDescriptor = JSON.parse(JSON.stringify(actionDescriptorFromDescriptors));
7248
+ // client exists
7249
+ if (server) {
7250
+ // server & client -> merge into client what's filled from server
7251
+ this.mergeActionDescriptorIntoClient(server, client);
7245
7252
  }
7253
+ actionDescriptor = client;
7246
7254
  }
7247
7255
  if (!actionDescriptor) {
7248
7256
  isUnkown = true;
@@ -7256,11 +7264,55 @@ class UiActionDescriptorService {
7256
7264
  if (!actionDescriptor.feedbackType && uiAction.submit) {
7257
7265
  actionDescriptor.feedbackType = UiActionFeedbackType.Snackbar;
7258
7266
  }
7259
- if (this.viewContext.translateService && !isUnkown && !isFromServer) {
7267
+ if (this.viewContext.translateService && !isUnkown && !server) {
7260
7268
  actionDescriptor = await this.translateUiActionDescriptor(actionDescriptor);
7261
7269
  }
7262
7270
  return actionDescriptor;
7263
7271
  }
7272
+ mergeActionDescriptorIntoClient(server, client) {
7273
+ if (server.title) {
7274
+ client.title = server.title;
7275
+ }
7276
+ if (server.icon) {
7277
+ client.icon = server.icon;
7278
+ }
7279
+ if (server.color) {
7280
+ client.color = server.color;
7281
+ }
7282
+ if (server.confirmDialog) {
7283
+ if (!client.confirmDialog) {
7284
+ client.confirmDialog = server.confirmDialog;
7285
+ }
7286
+ this.mergeActionDialogDescriptorIntoClient(server.confirmDialog, client.confirmDialog);
7287
+ client.confirmDialog = server.confirmDialog;
7288
+ }
7289
+ }
7290
+ // TODO use prop name to handle all dialogs
7291
+ // private mergeActionDescriptorDialog(
7292
+ // server: UiActionDescriptor,
7293
+ // client: UiActionDescriptor,
7294
+ // prop: string
7295
+ // ): void {
7296
+ // //let serverDialog: UiActionDialogDescriptor = server[prop] as UiActionDialogDescriptor;
7297
+ // if (server.confirmDialog) {
7298
+ // if (!client.confirmDialog) {
7299
+ // client.confirmDialog = server.confirmDialog;
7300
+ // }
7301
+ // this.mergeActionDialogDescriptorIntoClient(server.confirmDialog, client.confirmDialog);
7302
+ // client.confirmDialog = server.confirmDialog;
7303
+ // }
7304
+ // }
7305
+ mergeActionDialogDescriptorIntoClient(serverDialog, clientDialog) {
7306
+ if (serverDialog.title) {
7307
+ clientDialog.title = serverDialog.title;
7308
+ }
7309
+ if (serverDialog.placeholder) {
7310
+ clientDialog.placeholder = serverDialog.placeholder;
7311
+ }
7312
+ if (serverDialog.text) {
7313
+ clientDialog.text = serverDialog.text;
7314
+ }
7315
+ }
7264
7316
  async translateUiActionDescriptor(uiActionDescriptor) {
7265
7317
  uiActionDescriptor = await this.deepTranslate(uiActionDescriptor);
7266
7318
  return uiActionDescriptor;
@@ -12301,7 +12353,7 @@ class FilterService {
12301
12353
  }
12302
12354
  // @ts-ignore
12303
12355
  addToHttpParams(httpParams, value, key) {
12304
- if (typeof value === "object" && value instanceof Date === false) {
12356
+ if (typeof value === 'object' && value instanceof Date === false) {
12305
12357
  httpParams = this.addToHttpParamsRecursive(httpParams, value);
12306
12358
  }
12307
12359
  else {
@@ -12313,27 +12365,27 @@ class FilterService {
12313
12365
  if (value == null) {
12314
12366
  return httpParams;
12315
12367
  }
12316
- if (typeof value === "object") {
12368
+ if (typeof value === 'object') {
12317
12369
  if (Array.isArray(value)) {
12318
- value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
12370
+ value.forEach((elem) => (httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)));
12319
12371
  }
12320
12372
  else if (value instanceof Date) {
12321
12373
  if (key != null) {
12322
12374
  httpParams = httpParams.append(key, value.toISOString().substr(0, 10));
12323
12375
  }
12324
12376
  else {
12325
- throw Error("key may not be null if value is Date");
12377
+ throw Error('key may not be null if value is Date');
12326
12378
  }
12327
12379
  }
12328
12380
  else {
12329
- Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
12381
+ Object.keys(value).forEach((k) => (httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k)));
12330
12382
  }
12331
12383
  }
12332
12384
  else if (key != null) {
12333
12385
  httpParams = httpParams.append(key, value);
12334
12386
  }
12335
12387
  else {
12336
- throw Error("key may not be null if value is not object or array");
12388
+ throw Error('key may not be null if value is not object or array');
12337
12389
  }
12338
12390
  return httpParams;
12339
12391
  }
@@ -12348,9 +12400,7 @@ class FilterService {
12348
12400
  let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
12349
12401
  if (localVarHttpHeaderAcceptSelected === undefined) {
12350
12402
  // to determine the Accept header
12351
- const httpHeaderAccepts = [
12352
- 'application/json'
12353
- ];
12403
+ const httpHeaderAccepts = ['application/json'];
12354
12404
  localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
12355
12405
  }
12356
12406
  if (localVarHttpHeaderAcceptSelected !== undefined) {
@@ -12372,14 +12422,30 @@ class FilterService {
12372
12422
  responseType_ = 'blob';
12373
12423
  }
12374
12424
  }
12375
- let localVarPath = `/filter/${this.configuration.encodeParam({ name: "uuid", value: uuid, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "uuid" })}/${this.configuration.encodeParam({ name: "filterIdentifier", value: filterIdentifier, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/load`;
12425
+ let localVarPath = `/filter/${this.configuration.encodeParam({
12426
+ name: 'uuid',
12427
+ value: uuid,
12428
+ in: 'path',
12429
+ style: 'simple',
12430
+ explode: false,
12431
+ dataType: 'string',
12432
+ dataFormat: 'uuid',
12433
+ })}/${this.configuration.encodeParam({
12434
+ name: 'filterIdentifier',
12435
+ value: filterIdentifier,
12436
+ in: 'path',
12437
+ style: 'simple',
12438
+ explode: false,
12439
+ dataType: 'string',
12440
+ dataFormat: undefined,
12441
+ })}/load`;
12376
12442
  return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
12377
12443
  context: localVarHttpContext,
12378
12444
  responseType: responseType_,
12379
12445
  withCredentials: this.configuration.withCredentials,
12380
12446
  headers: localVarHeaders,
12381
12447
  observe: observe,
12382
- reportProgress: reportProgress
12448
+ reportProgress: reportProgress,
12383
12449
  });
12384
12450
  }
12385
12451
  performWidgetAction(uuid, filterIdentifier, body, observe = 'body', reportProgress = false, options) {
@@ -12396,9 +12462,7 @@ class FilterService {
12396
12462
  let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
12397
12463
  if (localVarHttpHeaderAcceptSelected === undefined) {
12398
12464
  // to determine the Accept header
12399
- const httpHeaderAccepts = [
12400
- 'application/json'
12401
- ];
12465
+ const httpHeaderAccepts = ['application/json'];
12402
12466
  localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
12403
12467
  }
12404
12468
  if (localVarHttpHeaderAcceptSelected !== undefined) {
@@ -12409,9 +12473,7 @@ class FilterService {
12409
12473
  localVarHttpContext = new HttpContext();
12410
12474
  }
12411
12475
  // to determine the Content-Type header
12412
- const consumes = [
12413
- 'application/json'
12414
- ];
12476
+ const consumes = ['application/json'];
12415
12477
  const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
12416
12478
  if (httpContentTypeSelected !== undefined) {
12417
12479
  localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
@@ -12428,7 +12490,23 @@ class FilterService {
12428
12490
  responseType_ = 'blob';
12429
12491
  }
12430
12492
  }
12431
- let localVarPath = `/filter/${this.configuration.encodeParam({ name: "uuid", value: uuid, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "uuid" })}/${this.configuration.encodeParam({ name: "filterIdentifier", value: filterIdentifier, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/performWidgetAction`;
12493
+ let localVarPath = `/filter/${this.configuration.encodeParam({
12494
+ name: 'uuid',
12495
+ value: uuid,
12496
+ in: 'path',
12497
+ style: 'simple',
12498
+ explode: false,
12499
+ dataType: 'string',
12500
+ dataFormat: 'uuid',
12501
+ })}/${this.configuration.encodeParam({
12502
+ name: 'filterIdentifier',
12503
+ value: filterIdentifier,
12504
+ in: 'path',
12505
+ style: 'simple',
12506
+ explode: false,
12507
+ dataType: 'string',
12508
+ dataFormat: undefined,
12509
+ })}/performWidgetAction`;
12432
12510
  return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
12433
12511
  context: localVarHttpContext,
12434
12512
  body: body,
@@ -12436,7 +12514,7 @@ class FilterService {
12436
12514
  withCredentials: this.configuration.withCredentials,
12437
12515
  headers: localVarHeaders,
12438
12516
  observe: observe,
12439
- reportProgress: reportProgress
12517
+ reportProgress: reportProgress,
12440
12518
  });
12441
12519
  }
12442
12520
  }
@@ -12445,7 +12523,7 @@ FilterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", versio
12445
12523
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FilterService, decorators: [{
12446
12524
  type: Injectable,
12447
12525
  args: [{
12448
- providedIn: 'root'
12526
+ providedIn: 'root',
12449
12527
  }]
12450
12528
  }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
12451
12529
  type: Optional