@smartbit4all/ng-client 3.3.57 → 3.3.59

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 (94) hide show
  1. package/esm2020/lib/session/api/api/session.service.mjs +1 -1
  2. package/esm2020/lib/session/api/encoder.mjs +1 -1
  3. package/esm2020/lib/session/api/model/accountInfo.mjs +1 -1
  4. package/esm2020/lib/session/api/model/apiError.mjs +1 -1
  5. package/esm2020/lib/session/api/model/authenticationProviderData.mjs +1 -1
  6. package/esm2020/lib/session/api/model/getAuthenticationProvidersResponse.mjs +1 -1
  7. package/esm2020/lib/session/api/model/models.mjs +1 -1
  8. package/esm2020/lib/session/api/model/refreshSessionRequest.mjs +1 -1
  9. package/esm2020/lib/session/api/model/session.mjs +1 -1
  10. package/esm2020/lib/session/api/model/sessionInfoData.mjs +1 -1
  11. package/esm2020/lib/session/api/model/userActivityLog.mjs +1 -1
  12. package/esm2020/lib/session/api/param.mjs +1 -1
  13. package/esm2020/lib/session/api/variables.mjs +1 -1
  14. package/esm2020/lib/shared/shared.module.mjs +1 -1
  15. package/esm2020/lib/shared/smart-tooltip.directive.mjs +1 -1
  16. package/esm2020/lib/smart-client/smart-component-api-client.mjs +90 -47
  17. package/esm2020/lib/smart-component-layout/api/api/api.mjs +1 -1
  18. package/esm2020/lib/smart-component-layout/api/api/default.service.mjs +1 -1
  19. package/esm2020/lib/smart-component-layout/api/api.module.mjs +1 -1
  20. package/esm2020/lib/smart-component-layout/api/configuration.mjs +1 -1
  21. package/esm2020/lib/smart-component-layout/api/encoder.mjs +1 -1
  22. package/esm2020/lib/smart-component-layout/api/index.mjs +1 -1
  23. package/esm2020/lib/smart-component-layout/api/model/componentType.mjs +1 -1
  24. package/esm2020/lib/smart-component-layout/api/model/componentWidgetType.mjs +1 -1
  25. package/esm2020/lib/smart-component-layout/api/model/layoutDirection.mjs +1 -1
  26. package/esm2020/lib/smart-component-layout/api/model/models.mjs +1 -1
  27. package/esm2020/lib/smart-component-layout/api/model/smartComponentLayoutDefinition.mjs +1 -1
  28. package/esm2020/lib/smart-component-layout/api/model/smartComponentWidgetDefinition.mjs +1 -1
  29. package/esm2020/lib/smart-component-layout/api/param.mjs +1 -1
  30. package/esm2020/lib/smart-component-layout/api/variables.mjs +1 -1
  31. package/esm2020/lib/smart-filter/api/filter/model/filterExpressionBoolOperator.mjs +1 -1
  32. package/esm2020/lib/smart-filter/api/filter/model/filterExpressionBuilderField.mjs +1 -1
  33. package/esm2020/lib/smart-filter/api/filter/model/filterExpressionBuilderGroup.mjs +1 -1
  34. package/esm2020/lib/smart-filter/api/filter/model/filterExpressionBuilderModel.mjs +1 -1
  35. package/esm2020/lib/smart-filter/api/filter/model/filterExpressionData.mjs +1 -1
  36. package/esm2020/lib/smart-filter/api/filter/model/filterExpressionDataType.mjs +1 -1
  37. package/esm2020/lib/smart-filter/api/filter/model/filterExpressionField.mjs +1 -1
  38. package/esm2020/lib/smart-filter/api/filter/model/filterExpressionFieldList.mjs +1 -1
  39. package/esm2020/lib/smart-filter/api/filter/model/filterExpressionFieldWidgetType.mjs +1 -1
  40. package/esm2020/lib/smart-filter/api/filter/model/filterExpressionList.mjs +1 -1
  41. package/esm2020/lib/smart-filter/api/filter/model/filterExpressionOperandData.mjs +1 -1
  42. package/esm2020/lib/smart-filter/api/filter/model/filterExpressionOperation.mjs +1 -1
  43. package/esm2020/lib/smart-filter/api/filter/model/filterExpressionOrderBy.mjs +1 -1
  44. package/esm2020/lib/smart-form/api/model/models.mjs +2 -1
  45. package/esm2020/lib/smart-form/api/model/selectionDefinition.mjs +1 -1
  46. package/esm2020/lib/smart-form/api/model/smartFormWidgetDirection.mjs +1 -1
  47. package/esm2020/lib/smart-form/api/model/smartFormWidgetType.mjs +1 -1
  48. package/esm2020/lib/smart-form/api/model/smartWidgetDefinition.mjs +1 -1
  49. package/esm2020/lib/smart-form/api/model/smartWidgetHint.mjs +1 -1
  50. package/esm2020/lib/smart-form/api/model/valueChangeMode.mjs +20 -0
  51. package/esm2020/lib/smart-form/services/smartform.layout-definition.service.mjs +23 -3
  52. package/esm2020/lib/smart-form/smartform.form-model.mjs +1 -1
  53. package/esm2020/lib/smart-form/widgets/smartformwidget/smartformwidget.component.mjs +2 -2
  54. package/esm2020/lib/smart-grid/api/grid-api/model/gridModel.mjs +1 -1
  55. package/esm2020/lib/smart-grid/api/grid-api/model/gridRow.mjs +1 -1
  56. package/esm2020/lib/smart-grid/api/grid-api/model/gridUpdateData.mjs +1 -1
  57. package/esm2020/lib/smart-ng-client.module.mjs +2 -2
  58. package/esm2020/lib/smart-tree/tree-api/api/tree.service.mjs +1 -1
  59. package/esm2020/lib/smart-tree/tree-api/configuration.mjs +1 -1
  60. package/esm2020/lib/smart-tree/tree-api/encoder.mjs +1 -1
  61. package/esm2020/lib/smart-tree/tree-api/param.mjs +1 -1
  62. package/esm2020/lib/smart-tree/tree-api/variables.mjs +1 -1
  63. package/esm2020/lib/view-context/api/model/openPendingData.mjs +1 -1
  64. package/esm2020/lib/view-context/smart-ui-action/ui-action-toolbar.component.mjs +4 -1
  65. package/esm2020/lib/view-context/value-api/api/api.mjs +1 -1
  66. package/esm2020/lib/view-context/value-api/api/value.service.mjs +1 -1
  67. package/esm2020/lib/view-context/value-api/api.module.mjs +1 -1
  68. package/esm2020/lib/view-context/value-api/configuration.mjs +1 -1
  69. package/esm2020/lib/view-context/value-api/encoder.mjs +1 -1
  70. package/esm2020/lib/view-context/value-api/index.mjs +1 -1
  71. package/esm2020/lib/view-context/value-api/model/genericValue.mjs +1 -1
  72. package/esm2020/lib/view-context/value-api/model/models.mjs +1 -1
  73. package/esm2020/lib/view-context/value-api/model/value.mjs +1 -1
  74. package/esm2020/lib/view-context/value-api/model/valueSetDefinition.mjs +1 -1
  75. package/esm2020/lib/view-context/value-api/model/valueSetDefinitionIdentifier.mjs +1 -1
  76. package/esm2020/lib/view-context/value-api/model/valueSetOperand.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 +145 -59
  80. package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
  81. package/fesm2020/smartbit4all-ng-client.mjs +135 -50
  82. package/fesm2020/smartbit4all-ng-client.mjs.map +1 -1
  83. package/lib/smart-client/smart-component-api-client.d.ts +12 -14
  84. package/lib/smart-form/api/model/models.d.ts +1 -0
  85. package/lib/smart-form/api/model/smartWidgetDefinition.d.ts +2 -0
  86. package/lib/smart-form/api/model/valueChangeMode.d.ts +18 -0
  87. package/lib/smart-form/smartform.form-model.d.ts +29 -1
  88. package/package.json +1 -1
  89. package/smartbit4all-ng-client-3.3.59.tgz +0 -0
  90. package/src/lib/session/api/README.md +226 -226
  91. package/src/lib/smart-component-layout/api/README.md +226 -226
  92. package/src/lib/smart-tree/tree-api/README.md +226 -226
  93. package/src/lib/view-context/value-api/README.md +226 -226
  94. package/smartbit4all-ng-client-3.3.57.tgz +0 -0
@@ -3663,6 +3663,26 @@ var SmartWidgetHintPositionEnum;
3663
3663
  })(SmartWidgetHintPositionEnum || (SmartWidgetHintPositionEnum = {}));
3664
3664
  ;
3665
3665
 
3666
+ /**
3667
+ * Form layout definition
3668
+ * Contains form layout definition objects.
3669
+ *
3670
+ * The version of the OpenAPI document: 1.0.0
3671
+ * Contact: info@it4all.hu
3672
+ *
3673
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3674
+ * https://openapi-generator.tech
3675
+ * Do not edit the class manually.
3676
+ */
3677
+ /**
3678
+ * This enum defines the value change handling strategy. Currently only one method is supported, IMMEDIATE_ACTION, which will trigger an executeUiAction when the value is changed.
3679
+ */
3680
+ var ValueChangeMode;
3681
+ (function (ValueChangeMode) {
3682
+ ValueChangeMode["NONE"] = "NONE";
3683
+ ValueChangeMode["IMMEDIATE_ACTION"] = "IMMEDIATE_ACTION";
3684
+ })(ValueChangeMode || (ValueChangeMode = {}));
3685
+
3666
3686
  class ApiModule$2 {
3667
3687
  constructor(parentModule, http) {
3668
3688
  if (parentModule) {
@@ -4767,7 +4787,7 @@ class SmartformwidgetComponent {
4767
4787
  let formControls = Object.keys(this.form.controls).filter((key) => key === this.widgetInstance.key || key.startsWith(`${this.widgetInstance.key}.`));
4768
4788
  formControls.map((key) => {
4769
4789
  this.form.controls[key].valueChanges
4770
- .pipe(distinctUntilChanged())
4790
+ .pipe(takeUntil(this._destroy$), distinctUntilChanged())
4771
4791
  .subscribe((value) => {
4772
4792
  const valueChange = {
4773
4793
  key,
@@ -6560,7 +6580,7 @@ class SmartformLayoutDefinitionService {
6560
6580
  if (!config.layoutDefinition.uploadCallback) {
6561
6581
  throw Error('No upload function injected.');
6562
6582
  }
6563
- return this.createFileUploader(config.layoutDefinition, config.uploadCallback);
6583
+ return this.createFileUploader(config.layoutDefinition);
6564
6584
  case SmartFormWidgetType.MATRIX:
6565
6585
  return this.createMatrix(config.layoutDefinition);
6566
6586
  case SmartFormWidgetType.SORTABLE:
@@ -6573,6 +6593,7 @@ class SmartformLayoutDefinitionService {
6573
6593
  createMonthPicker(layoutDefinition) {
6574
6594
  let widget = {
6575
6595
  key: layoutDefinition.key,
6596
+ valueChangeMode: layoutDefinition.valueChangeMode,
6576
6597
  type: SmartFormWidgetType.MONTH_PICKER,
6577
6598
  label: layoutDefinition.label,
6578
6599
  showLabel: layoutDefinition.showLabel,
@@ -6584,6 +6605,7 @@ class SmartformLayoutDefinitionService {
6584
6605
  type: SmartFormWidgetType.MATRIX,
6585
6606
  label: layoutDefinition.label,
6586
6607
  key: layoutDefinition.key,
6608
+ valueChangeMode: layoutDefinition.valueChangeMode,
6587
6609
  showLabel: layoutDefinition.showLabel,
6588
6610
  //TODO set isMultiple variable from layoutDefinition
6589
6611
  isMultiple: false,
@@ -6594,6 +6616,7 @@ class SmartformLayoutDefinitionService {
6594
6616
  createSortable(layoutDefinition) {
6595
6617
  let widget = {
6596
6618
  key: layoutDefinition.key,
6619
+ valueChangeMode: layoutDefinition.valueChangeMode,
6597
6620
  label: layoutDefinition.label,
6598
6621
  showLabel: layoutDefinition.showLabel,
6599
6622
  type: SmartFormWidgetType.SORTABLE,
@@ -6619,6 +6642,7 @@ class SmartformLayoutDefinitionService {
6619
6642
  });
6620
6643
  let widget = {
6621
6644
  key: layoutDefinition.key,
6645
+ valueChangeMode: layoutDefinition.valueChangeMode,
6622
6646
  type: SmartFormWidgetType.CONTAINER,
6623
6647
  cssClass: layoutDefinition.cssClass,
6624
6648
  direction: (_b = layoutDefinition.direction) !== null && _b !== void 0 ? _b : SmartFormWidgetDirection.COL,
@@ -6630,6 +6654,7 @@ class SmartformLayoutDefinitionService {
6630
6654
  let widget = {
6631
6655
  type: SmartFormWidgetType.TEXT_FIELD,
6632
6656
  key: layoutDefinition.key,
6657
+ valueChangeMode: layoutDefinition.valueChangeMode,
6633
6658
  label: layoutDefinition.label,
6634
6659
  placeholder: layoutDefinition.placeholder,
6635
6660
  prefix: layoutDefinition.prefix,
@@ -6652,6 +6677,7 @@ class SmartformLayoutDefinitionService {
6652
6677
  let widget = {
6653
6678
  type: SmartFormWidgetType.TEXT_FIELD_CHIPS,
6654
6679
  key: layoutDefinition.key,
6680
+ valueChangeMode: layoutDefinition.valueChangeMode,
6655
6681
  label: layoutDefinition.label,
6656
6682
  placeholder: layoutDefinition.placeholder,
6657
6683
  showLabel: layoutDefinition.showLabel,
@@ -6675,6 +6701,7 @@ class SmartformLayoutDefinitionService {
6675
6701
  let widget = {
6676
6702
  type: SmartFormWidgetType.TEXT_FIELD_NUMBER,
6677
6703
  key: layoutDefinition.key,
6704
+ valueChangeMode: layoutDefinition.valueChangeMode,
6678
6705
  label: layoutDefinition.label,
6679
6706
  placeholder: layoutDefinition.placeholder,
6680
6707
  prefix: layoutDefinition.prefix,
@@ -6692,6 +6719,7 @@ class SmartformLayoutDefinitionService {
6692
6719
  let widget = {
6693
6720
  type: SmartFormWidgetType.TEXT_BOX,
6694
6721
  key: layoutDefinition.key,
6722
+ valueChangeMode: layoutDefinition.valueChangeMode,
6695
6723
  label: layoutDefinition.label,
6696
6724
  placeholder: layoutDefinition.placeholder,
6697
6725
  showLabel: layoutDefinition.showLabel,
@@ -6705,6 +6733,7 @@ class SmartformLayoutDefinitionService {
6705
6733
  let widget = {
6706
6734
  type: SmartFormWidgetType.RICH_TEXT,
6707
6735
  key: layoutDefinition.key,
6736
+ valueChangeMode: layoutDefinition.valueChangeMode,
6708
6737
  label: layoutDefinition.label,
6709
6738
  placeholder: layoutDefinition.placeholder,
6710
6739
  showLabel: layoutDefinition.showLabel,
@@ -6728,6 +6757,7 @@ class SmartformLayoutDefinitionService {
6728
6757
  let widget = {
6729
6758
  type: SmartFormWidgetType.TOGGLE,
6730
6759
  key: layoutDefinition.key,
6760
+ valueChangeMode: layoutDefinition.valueChangeMode,
6731
6761
  label: layoutDefinition.label,
6732
6762
  showLabel: layoutDefinition.showLabel,
6733
6763
  cssClass: layoutDefinition.cssClass,
@@ -6740,6 +6770,7 @@ class SmartformLayoutDefinitionService {
6740
6770
  let widget = {
6741
6771
  type: SmartFormWidgetType.RADIO_BUTTON,
6742
6772
  key: layoutDefinition.key,
6773
+ valueChangeMode: layoutDefinition.valueChangeMode,
6743
6774
  label: layoutDefinition.label,
6744
6775
  showLabel: layoutDefinition.showLabel,
6745
6776
  cssClass: layoutDefinition.cssClass,
@@ -6763,6 +6794,7 @@ class SmartformLayoutDefinitionService {
6763
6794
  let widget = {
6764
6795
  type: SmartFormWidgetType.CHECK_BOX_2,
6765
6796
  key: layoutDefinition.key,
6797
+ valueChangeMode: layoutDefinition.valueChangeMode,
6766
6798
  label: layoutDefinition.label,
6767
6799
  showLabel: layoutDefinition.showLabel,
6768
6800
  cssClass: layoutDefinition.cssClass,
@@ -6786,6 +6818,7 @@ class SmartformLayoutDefinitionService {
6786
6818
  let widget = {
6787
6819
  type: SmartFormWidgetType.SELECT,
6788
6820
  key: layoutDefinition.key,
6821
+ valueChangeMode: layoutDefinition.valueChangeMode,
6789
6822
  label: layoutDefinition.label,
6790
6823
  showLabel: layoutDefinition.showLabel,
6791
6824
  cssClass: layoutDefinition.cssClass,
@@ -6810,6 +6843,7 @@ class SmartformLayoutDefinitionService {
6810
6843
  let widget = {
6811
6844
  type: SmartFormWidgetType.SELECT_MULTIPLE,
6812
6845
  key: layoutDefinition.key,
6846
+ valueChangeMode: layoutDefinition.valueChangeMode,
6813
6847
  label: layoutDefinition.label,
6814
6848
  showLabel: layoutDefinition.showLabel,
6815
6849
  cssClass: layoutDefinition.cssClass,
@@ -6833,6 +6867,7 @@ class SmartformLayoutDefinitionService {
6833
6867
  let widget = {
6834
6868
  type: SmartFormWidgetType.DATE_PICKER,
6835
6869
  key: layoutDefinition.key,
6870
+ valueChangeMode: layoutDefinition.valueChangeMode,
6836
6871
  label: layoutDefinition.label,
6837
6872
  showLabel: layoutDefinition.showLabel,
6838
6873
  cssClass: layoutDefinition.cssClass,
@@ -6845,6 +6880,7 @@ class SmartformLayoutDefinitionService {
6845
6880
  let widget = {
6846
6881
  type: SmartFormWidgetType.DATE_TIME_PICKER,
6847
6882
  key: layoutDefinition.key,
6883
+ valueChangeMode: layoutDefinition.valueChangeMode,
6848
6884
  label: layoutDefinition.label,
6849
6885
  showLabel: layoutDefinition.showLabel,
6850
6886
  cssClass: layoutDefinition.cssClass,
@@ -6857,6 +6893,7 @@ class SmartformLayoutDefinitionService {
6857
6893
  let widget = {
6858
6894
  type: SmartFormWidgetType.IMAGE,
6859
6895
  key: layoutDefinition.key,
6896
+ valueChangeMode: layoutDefinition.valueChangeMode,
6860
6897
  label: layoutDefinition.label,
6861
6898
  showLabel: layoutDefinition.showLabel,
6862
6899
  cssClass: layoutDefinition.cssClass,
@@ -6864,14 +6901,15 @@ class SmartformLayoutDefinitionService {
6864
6901
  return widget;
6865
6902
  }
6866
6903
  createButton(config) {
6867
- var _a, _b, _c, _d, _e;
6904
+ var _a, _b, _c, _d, _e, _f;
6868
6905
  let uiAction = (_a = config.uiActions) === null || _a === void 0 ? void 0 : _a.find((uiAction) => { var _a; return uiAction.code === ((_a = config.layoutDefinition) === null || _a === void 0 ? void 0 : _a.key); });
6869
6906
  let widget = {
6870
6907
  type: SmartFormWidgetType.BUTTON,
6871
6908
  key: (_b = config.layoutDefinition) === null || _b === void 0 ? void 0 : _b.key,
6872
- label: (_c = config.layoutDefinition) === null || _c === void 0 ? void 0 : _c.label,
6873
- showLabel: (_d = config.layoutDefinition) === null || _d === void 0 ? void 0 : _d.showLabel,
6874
- cssClass: (_e = config.layoutDefinition) === null || _e === void 0 ? void 0 : _e.cssClass,
6909
+ valueChangeMode: (_c = config.layoutDefinition) === null || _c === void 0 ? void 0 : _c.valueChangeMode,
6910
+ label: (_d = config.layoutDefinition) === null || _d === void 0 ? void 0 : _d.label,
6911
+ showLabel: (_e = config.layoutDefinition) === null || _e === void 0 ? void 0 : _e.showLabel,
6912
+ cssClass: (_f = config.layoutDefinition) === null || _f === void 0 ? void 0 : _f.cssClass,
6875
6913
  callback: config.buttonCallback,
6876
6914
  uiAction,
6877
6915
  uiActionDescriptor: config.uiActionDescriptors(uiAction),
@@ -6882,16 +6920,18 @@ class SmartformLayoutDefinitionService {
6882
6920
  let widget = {
6883
6921
  type: SmartFormWidgetType.DIVIDER,
6884
6922
  key: layoutDefinition.key,
6923
+ valueChangeMode: layoutDefinition.valueChangeMode,
6885
6924
  label: layoutDefinition.label,
6886
6925
  showLabel: layoutDefinition.showLabel,
6887
6926
  cssClass: layoutDefinition.cssClass,
6888
6927
  };
6889
6928
  return widget;
6890
6929
  }
6891
- createFileUploader(layoutDefinition, uploadCallback) {
6930
+ createFileUploader(layoutDefinition) {
6892
6931
  let widget = {
6893
6932
  type: SmartFormWidgetType.FILE_UPLOADER,
6894
6933
  key: layoutDefinition.key,
6934
+ valueChangeMode: layoutDefinition.valueChangeMode,
6895
6935
  label: layoutDefinition.label,
6896
6936
  showLabel: layoutDefinition.showLabel,
6897
6937
  cssClass: layoutDefinition.cssClass,
@@ -8333,8 +8373,11 @@ class UiActionToolbarComponent {
8333
8373
  // We do not handle double clicks
8334
8374
  }
8335
8375
  getType(uiActionModel) {
8336
- var _a, _b;
8337
- switch ((_a = uiActionModel.descriptor) === null || _a === void 0 ? void 0 : _a.type) {
8376
+ var _a, _b, _c, _d;
8377
+ if (!((_a = uiActionModel.descriptor) === null || _a === void 0 ? void 0 : _a.type)) {
8378
+ console.log(`Action button type unset: ${(_b = uiActionModel === null || uiActionModel === void 0 ? void 0 : uiActionModel.uiAction) === null || _b === void 0 ? void 0 : _b.code}`);
8379
+ }
8380
+ switch ((_c = uiActionModel.descriptor) === null || _c === void 0 ? void 0 : _c.type) {
8338
8381
  case UiActionButtonType.NORMAL:
8339
8382
  return 'mat-button';
8340
8383
  case UiActionButtonType.FLAT:
@@ -8350,7 +8393,7 @@ class UiActionToolbarComponent {
8350
8393
  case UiActionButtonType.FAB:
8351
8394
  return 'mat-fab';
8352
8395
  default:
8353
- console.log(`Unhandled action button type case: ${(_b = uiActionModel.descriptor) === null || _b === void 0 ? void 0 : _b.type}`);
8396
+ console.log(`Unhandled action button type case: ${(_d = uiActionModel.descriptor) === null || _d === void 0 ? void 0 : _d.type}`);
8354
8397
  return `mat-button`;
8355
8398
  }
8356
8399
  }
@@ -14631,9 +14674,11 @@ class SmartComponentApiClient {
14631
14674
  this.uiActionModels = [];
14632
14675
  this.dataChanged = new SmartSubject(this._destroy$);
14633
14676
  // Contained Widgets
14634
- this.widgets = new WidgetMap();
14635
- this.formWidgets = new WidgetMap();
14677
+ this.widgets = new Map();
14678
+ this.formWidgets = new Map();
14636
14679
  this.useQueryLists = false;
14680
+ this.dataChangeKeys = [];
14681
+ this.dataChangeActionHandlers = new Map();
14637
14682
  // check and calculate pageName
14638
14683
  if (!this.pageName && !this._componentName) {
14639
14684
  throw new Error('pageName or componentName must be specified!');
@@ -14669,7 +14714,7 @@ class SmartComponentApiClient {
14669
14714
  }
14670
14715
  this._uuid = uuid;
14671
14716
  if (uuid) {
14672
- this.getWidgets().widgets.forEach((ref, key) => {
14717
+ this.getWidgets().forEach((ref, key) => {
14673
14718
  if (ref instanceof SmartGridComponent) {
14674
14719
  ref.uuid = uuid;
14675
14720
  }
@@ -14717,7 +14762,7 @@ class SmartComponentApiClient {
14717
14762
  }
14718
14763
  _ngOnDestroy() {
14719
14764
  this.viewContext.unfollow(this.uuid);
14720
- this.widgets.clearWidgets();
14765
+ this.widgets.clear();
14721
14766
  this._destroy$.next();
14722
14767
  this._destroy$.complete();
14723
14768
  }
@@ -14736,6 +14781,18 @@ class SmartComponentApiClient {
14736
14781
  if (this.uuid && this.uuid !== comp.uuid)
14737
14782
  comp.uuid = this.uuid;
14738
14783
  });
14784
+ // for handling embedded forms
14785
+ this.handleQueryList(this.getSmartComponentLayoutsQL(), (form) => {
14786
+ this.handleDataChangeSubscriptions();
14787
+ });
14788
+ }
14789
+ if (!this.getSmartFormsQL()) {
14790
+ console.warn('getSmartFormsQL not available!');
14791
+ }
14792
+ else {
14793
+ this.handleQueryList(this.getSmartFormsQL(), (form) => {
14794
+ this.handleDataChangeSubscriptions();
14795
+ });
14739
14796
  }
14740
14797
  if (!this.getSmartGridsQL()) {
14741
14798
  console.warn('SmartGridsQL not available!');
@@ -14759,14 +14816,10 @@ class SmartComponentApiClient {
14759
14816
  });
14760
14817
  }
14761
14818
  }
14762
- if (!this.getSmartUiActionToolbarsQL()) {
14763
- console.warn('SmartUiActionToolbarQL not available!');
14764
- }
14765
- else {
14766
- this.handleQueryList(this.getSmartUiActionToolbarsQL(), (toolbar) => {
14767
- console.log('', toolbar.id);
14768
- });
14769
- }
14819
+ }
14820
+ handleQueryListSimple(ql, handler) {
14821
+ handler();
14822
+ ql.changes.pipe(takeUntil(this._destroy$)).subscribe(() => handler());
14770
14823
  }
14771
14824
  handleQueryList(ql, handler) {
14772
14825
  ql.forEach((el) => handler(el));
@@ -14776,16 +14829,16 @@ class SmartComponentApiClient {
14776
14829
  }
14777
14830
  getWidgets() {
14778
14831
  if (this.useQueryLists) {
14779
- let widgets = new WidgetMap();
14832
+ let widgets = new Map();
14780
14833
  this.getAllSmartGridComponents()
14781
14834
  .filter((grid) => { var _a; return (((_a = grid === null || grid === void 0 ? void 0 : grid.smartGrid) === null || _a === void 0 ? void 0 : _a.gridIdentifier) ? true : false); })
14782
- .forEach((grid) => widgets.addWidget(grid.smartGrid.gridIdentifier, grid));
14835
+ .forEach((grid) => widgets.set(grid.smartGrid.gridIdentifier, grid));
14783
14836
  this.getAllSmartTreeComponents()
14784
14837
  .filter((tree) => { var _a; return (((_a = tree === null || tree === void 0 ? void 0 : tree.smartTreeModel) === null || _a === void 0 ? void 0 : _a.identifier) ? true : false); })
14785
- .forEach((tree) => widgets.addWidget(tree.smartTreeModel.identifier, tree));
14838
+ .forEach((tree) => widgets.set(tree.smartTreeModel.identifier, tree));
14786
14839
  this.getAllSmartFilterEditorServices()
14787
14840
  .filter((filter) => (filter.config.identifier ? true : false))
14788
- .forEach((filter) => widgets.addWidget(filter.config.identifier, filter));
14841
+ .forEach((filter) => widgets.set(filter.config.identifier, filter));
14789
14842
  return widgets;
14790
14843
  }
14791
14844
  return this.widgets;
@@ -14814,7 +14867,6 @@ class SmartComponentApiClient {
14814
14867
  // css style properties
14815
14868
  if (styleData.style) {
14816
14869
  Object.entries(styleData.style).forEach(([key, value]) => {
14817
- console.log(`Key: ${key}, Value: ${value}`);
14818
14870
  this.renderer.setStyle(element, key, value, RendererStyleFlags2.Important);
14819
14871
  });
14820
14872
  }
@@ -14935,8 +14987,65 @@ class SmartComponentApiClient {
14935
14987
  this.uiActionService.execute(uiAction, options);
14936
14988
  });
14937
14989
  }
14990
+ addDataChangeActionHandler(key) {
14991
+ if (!this.dataChangeKeys.includes(key)) {
14992
+ this.dataChangeKeys.push(key);
14993
+ }
14994
+ }
14995
+ removeDataChangeActionHandler(key) {
14996
+ let idx = this.dataChangeKeys.indexOf(key);
14997
+ if (idx >= 0) {
14998
+ this.dataChangeKeys.splice(idx, 1);
14999
+ }
15000
+ }
15001
+ dataChangeActionHandler(event) {
15002
+ if (this.dataChangeKeys.includes(event.key)) {
15003
+ this.executeUiAction({
15004
+ code: event.key,
15005
+ model: true,
15006
+ params: {
15007
+ item: event.value,
15008
+ },
15009
+ });
15010
+ }
15011
+ }
15012
+ handleDataChangeSubscriptions() {
15013
+ if (this.useQueryLists) {
15014
+ let forms = this.getAllSmartFormComponents();
15015
+ // add elements to dataChangeKeys
15016
+ forms.forEach((form) => {
15017
+ var _a;
15018
+ (_a = form.smartForm) === null || _a === void 0 ? void 0 : _a.widgets.forEach((widget) => {
15019
+ if (widget.key) {
15020
+ if (widget.valueChangeMode === ValueChangeMode.IMMEDIATE_ACTION) {
15021
+ this.addDataChangeActionHandler(widget.key);
15022
+ }
15023
+ else {
15024
+ this.removeDataChangeActionHandler(widget.key);
15025
+ }
15026
+ }
15027
+ });
15028
+ });
15029
+ // subscribe to new forms
15030
+ forms.forEach((component) => {
15031
+ if (!this.dataChangeActionHandlers.has(component)) {
15032
+ let subs = component.sophisticatedValueChange
15033
+ .pipe(takeUntil(this._destroy$))
15034
+ .subscribe((event) => this.dataChangeActionHandler(event));
15035
+ this.dataChangeActionHandlers.set(component, subs);
15036
+ }
15037
+ });
15038
+ // unsubscribe from removed forms
15039
+ this.dataChangeActionHandlers.forEach((subs, form) => {
15040
+ if (!forms.find((c) => c === form)) {
15041
+ subs.unsubscribe();
15042
+ this.dataChangeActionHandlers.delete(form);
15043
+ }
15044
+ });
15045
+ }
15046
+ }
14938
15047
  getInvalidFields() {
14939
- var _a, _b, _c;
15048
+ var _a, _b;
14940
15049
  let aggregatedInvalidFields = {
14941
15050
  invalidFieldKeys: [],
14942
15051
  invalidFieldNames: [],
@@ -14945,7 +15054,7 @@ class SmartComponentApiClient {
14945
15054
  (_a = this.getAllSmartFormComponents()) === null || _a === void 0 ? void 0 : _a.forEach((form) => this.validateForm(form, aggregatedInvalidFields));
14946
15055
  }
14947
15056
  else {
14948
- (_c = (_b = this.formWidgets) === null || _b === void 0 ? void 0 : _b.widgets) === null || _c === void 0 ? void 0 : _c.forEach((form) => this.validateForm(form, aggregatedInvalidFields));
15057
+ (_b = this.formWidgets) === null || _b === void 0 ? void 0 : _b.forEach((form) => this.validateForm(form, aggregatedInvalidFields));
14949
15058
  }
14950
15059
  return aggregatedInvalidFields;
14951
15060
  }
@@ -15016,14 +15125,14 @@ class SmartComponentApiClient {
15016
15125
  * Submits all the registered forms in the SmartComponent
15017
15126
  */
15018
15127
  submitForms(validate) {
15019
- var _a, _b, _c;
15128
+ var _a, _b;
15020
15129
  if (this.useQueryLists) {
15021
15130
  (_a = this.getAllSmartFormComponents()) === null || _a === void 0 ? void 0 : _a.forEach((form) => {
15022
15131
  form === null || form === void 0 ? void 0 : form.submitForm(validate);
15023
15132
  });
15024
15133
  }
15025
15134
  else {
15026
- (_c = (_b = this.formWidgets) === null || _b === void 0 ? void 0 : _b.widgets) === null || _c === void 0 ? void 0 : _c.forEach((form) => {
15135
+ (_b = this.formWidgets) === null || _b === void 0 ? void 0 : _b.forEach((form) => {
15027
15136
  form === null || form === void 0 ? void 0 : form.submitForm(validate);
15028
15137
  });
15029
15138
  }
@@ -15035,7 +15144,7 @@ class SmartComponentApiClient {
15035
15144
  smartGrid.serviceToUse = this;
15036
15145
  smartGrid.viewContextService = this.viewContext;
15037
15146
  if (!this.useQueryLists) {
15038
- this.widgets.addWidget(smartGrid.gridIdentifier, componentReference);
15147
+ this.widgets.set(smartGrid.gridIdentifier, componentReference);
15039
15148
  }
15040
15149
  else {
15041
15150
  console.warn(`Added smartGrid when useQueryLists === true (${smartGrid.gridIdentifier})`);
@@ -15048,7 +15157,7 @@ class SmartComponentApiClient {
15048
15157
  }
15049
15158
  addForm(smartFormId, smartForm, componentReference) {
15050
15159
  if (!this.useQueryLists) {
15051
- this.formWidgets.addWidget(smartFormId, componentReference);
15160
+ this.formWidgets.set(smartFormId, componentReference);
15052
15161
  }
15053
15162
  else {
15054
15163
  console.warn(`Added smartForm when useQueryLists === true (${smartFormId})`);
@@ -15069,7 +15178,7 @@ class SmartComponentApiClient {
15069
15178
  createTreeService(treeId) {
15070
15179
  const treeService = new SmarttreeGenericService(this.inject, this.pageName, treeId);
15071
15180
  if (!this.useQueryLists) {
15072
- this.widgets.addWidget(treeId, treeService);
15181
+ this.widgets.set(treeId, treeService);
15073
15182
  }
15074
15183
  else {
15075
15184
  console.warn(`Added smartTree when useQueryLists === true (${treeId})`);
@@ -15199,7 +15308,7 @@ class SmartComponentApiClient {
15199
15308
  (_a = this.getAllSmartFormComponents()) === null || _a === void 0 ? void 0 : _a.forEach((form) => form.refresh());
15200
15309
  }
15201
15310
  else {
15202
- this.formWidgets.widgets.forEach((formComponent, key) => {
15311
+ this.formWidgets.forEach((formComponent, key) => {
15203
15312
  if (formComponent === undefined) {
15204
15313
  console.error(`Provided form reference for ${key} is undefined.`);
15205
15314
  }
@@ -15229,29 +15338,6 @@ class SmartComponentApiClient {
15229
15338
  handleConstraintChange(changes, changeKey) {
15230
15339
  this.model.constraints = changes[changeKey];
15231
15340
  }
15232
- }
15233
- class WidgetMap {
15234
- constructor() {
15235
- this._widgets = new Map();
15236
- }
15237
- get widgets() {
15238
- return this._widgets;
15239
- }
15240
- set widgets(widgets) {
15241
- this._widgets = widgets;
15242
- }
15243
- addWidget(key, reference, isForm) {
15244
- this._widgets.set(key, reference);
15245
- }
15246
- removeWidget(key) {
15247
- this._widgets.delete(key);
15248
- }
15249
- clearWidgets() {
15250
- this._widgets.clear();
15251
- }
15252
- get(key) {
15253
- return this.widgets.get(key);
15254
- }
15255
15341
  }
15256
15342
 
15257
15343
  class SmartComponent extends SmartComponentApiClient {
@@ -15431,5 +15517,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
15431
15517
  * Generated bundle index. Do not edit.
15432
15518
  */
15433
15519
 
15434
- export { APIS$3 as APIS, ApiModule$3 as ApiModule, ApiQueueService, BASE_PATH$5 as BASE_PATH, COLLECTION_FORMATS$5 as COLLECTION_FORMATS, CloseResult, ComponentFactoryService, ComponentFactoryServiceModule, ComponentType, ComponentWidgetType, Configuration$5 as Configuration, DIALOG_DISABLE_CLOSE, DataChangeKind, DefaultUiActionCode_CLOSE, ExpandableSectionButtonIconPosition, ExpandableSectionButtonType, ExpandableSectionComponent, FilterExpressionBoolOperator$1 as FilterExpressionBoolOperator, FilterExpressionBuilderGroupBuilderGroupKindEnum, FilterExpressionDataType, FilterExpressionFieldWidgetType, FilterExpressionOperation, FilterExpressionOrderByOrderEnum, GridColumnContentType, GridDataAccessConfigKindEnum, GridSelectionMode, GridSelectionType, GridUiActionType, GridViewDescriptorKindEnum, IS_ASYNC_PARAM_NAME, IconPosition, ImageResourceKindEnum, LayoutDirection, LinkTargetEnum, MessageOptionType, MessageTextType, MessageType, SelectionDefinitionTypeEnum, SessionAPIS, SessionErrorBehaviour, SessionService, SharedModule, SimplifiedTabGroupComponent, SmartActionType, SmartAuthService, SmartComponent, SmartComponentApiClient, SmartComponentLayoutComponent, SmartComponentLayoutModule, SmartComponentLayoutUtility, SmartDatePipe, SmartDateTimePipe, SmartDialog, SmartExpandableSectionModule, SmartExpandableSectionService, SmartFileUploaderComponent, SmartFilterComponent, SmartFilterEditorContentComponent, SmartFilterEditorModule, SmartFilterEditorService, SmartFilterExpressionItemComponent, SmartFilterExpressionItemsComponent, SmartFilterModule, SmartFilterParamComponent, SmartFilterParamsComponent, SmartFilterPosition, SmartFilterType, SmartFormTextFieldButtonIconPosition, SmartFormWidgetDirection, SmartFormWidgetType, SmartFormWidgetWidth, SmartGridButtonType, SmartGridComponent, SmartGridDataLayout, SmartGridModule, SmartGridService, SmartGridType, SmartIconComponent, SmartIconModule, SmartIconService, SmartLayoutDef, SmartLinkChannelVariableInPath, SmartLinkUuidVariableInPath, SmartNavbarComponent, SmartNavbarModule, SmartNavbarService, SmartNavigationModule, SmartNavigationService, SmartNgClientModule, SmartNgClientService, SmartService, SmartSessionModule, SmartSessionService, SmartSessionTimerComponent, SmartSessionTimerService, SmartSubject, SmartTabGroupModule, SmartTabGroupService, SmartTable, SmartTableButtonType, SmartTableHeaderPropertyType, SmartTableInterfaceTypeEnum, SmartTableOptionButtonDirection, SmartTableOrder, SmartTableType, SmartTimePipe, SmartTooltipDirective, SmartTreeComponent, SmartTreeNodeButtonType, SmartUserSettinsIconPosition, SmartValidatorName, SmartViewContextErrorDialogButtonLabel, SmartViewContextErrorDialogMessage, SmartViewContextErrorDialogTitle, SmartViewContextModule, SmartViewContextService, SmartViewRedirect, SmartWidgetHintPosition, SmartWidgetHintPositionEnum, SmartWidgetSettings, SmartdialogModule, SmartdialogService, SmartfileuploaderComponent, SmartformComponent, SmartformLayoutDefinitionService, SmartformModule, SmartformwidgetComponent, SmarttableComponent, SmarttableModule, SmarttableService, SmarttreeGenericService, SmarttreeModule, SmarttreeService, TabGroupComponent, ToggleLabelPosition, UiActionButtonType, UiActionConfirmDialogComponent, UiActionConfirmDialogService, UiActionDescriptorService, UiActionDialogType, UiActionFeedbackType, UiActionInputDialogComponent, UiActionInputDialogService, UiActionInputType, UiActionService, UiActionToolbarComponent, UiActionTooltipTooltipPositionEnum, ViewEventHandlerViewEventTypeEnum, ViewService, ViewState, ViewType, WidgetMap };
15520
+ export { APIS$3 as APIS, ApiModule$3 as ApiModule, ApiQueueService, BASE_PATH$5 as BASE_PATH, COLLECTION_FORMATS$5 as COLLECTION_FORMATS, CloseResult, ComponentFactoryService, ComponentFactoryServiceModule, ComponentType, ComponentWidgetType, Configuration$5 as Configuration, DIALOG_DISABLE_CLOSE, DataChangeKind, DefaultUiActionCode_CLOSE, ExpandableSectionButtonIconPosition, ExpandableSectionButtonType, ExpandableSectionComponent, FilterExpressionBoolOperator$1 as FilterExpressionBoolOperator, FilterExpressionBuilderGroupBuilderGroupKindEnum, FilterExpressionDataType, FilterExpressionFieldWidgetType, FilterExpressionOperation, FilterExpressionOrderByOrderEnum, GridColumnContentType, GridDataAccessConfigKindEnum, GridSelectionMode, GridSelectionType, GridUiActionType, GridViewDescriptorKindEnum, IS_ASYNC_PARAM_NAME, IconPosition, ImageResourceKindEnum, LayoutDirection, LinkTargetEnum, MessageOptionType, MessageTextType, MessageType, SelectionDefinitionTypeEnum, SessionAPIS, SessionErrorBehaviour, SessionService, SharedModule, SimplifiedTabGroupComponent, SmartActionType, SmartAuthService, SmartComponent, SmartComponentApiClient, SmartComponentLayoutComponent, SmartComponentLayoutModule, SmartComponentLayoutUtility, SmartDatePipe, SmartDateTimePipe, SmartDialog, SmartExpandableSectionModule, SmartExpandableSectionService, SmartFileUploaderComponent, SmartFilterComponent, SmartFilterEditorContentComponent, SmartFilterEditorModule, SmartFilterEditorService, SmartFilterExpressionItemComponent, SmartFilterExpressionItemsComponent, SmartFilterModule, SmartFilterParamComponent, SmartFilterParamsComponent, SmartFilterPosition, SmartFilterType, SmartFormTextFieldButtonIconPosition, SmartFormWidgetDirection, SmartFormWidgetType, SmartFormWidgetWidth, SmartGridButtonType, SmartGridComponent, SmartGridDataLayout, SmartGridModule, SmartGridService, SmartGridType, SmartIconComponent, SmartIconModule, SmartIconService, SmartLayoutDef, SmartLinkChannelVariableInPath, SmartLinkUuidVariableInPath, SmartNavbarComponent, SmartNavbarModule, SmartNavbarService, SmartNavigationModule, SmartNavigationService, SmartNgClientModule, SmartNgClientService, SmartService, SmartSessionModule, SmartSessionService, SmartSessionTimerComponent, SmartSessionTimerService, SmartSubject, SmartTabGroupModule, SmartTabGroupService, SmartTable, SmartTableButtonType, SmartTableHeaderPropertyType, SmartTableInterfaceTypeEnum, SmartTableOptionButtonDirection, SmartTableOrder, SmartTableType, SmartTimePipe, SmartTooltipDirective, SmartTreeComponent, SmartTreeNodeButtonType, SmartUserSettinsIconPosition, SmartValidatorName, SmartViewContextErrorDialogButtonLabel, SmartViewContextErrorDialogMessage, SmartViewContextErrorDialogTitle, SmartViewContextModule, SmartViewContextService, SmartViewRedirect, SmartWidgetHintPosition, SmartWidgetHintPositionEnum, SmartWidgetSettings, SmartdialogModule, SmartdialogService, SmartfileuploaderComponent, SmartformComponent, SmartformLayoutDefinitionService, SmartformModule, SmartformwidgetComponent, SmarttableComponent, SmarttableModule, SmarttableService, SmarttreeGenericService, SmarttreeModule, SmarttreeService, TabGroupComponent, ToggleLabelPosition, UiActionButtonType, UiActionConfirmDialogComponent, UiActionConfirmDialogService, UiActionDescriptorService, UiActionDialogType, UiActionFeedbackType, UiActionInputDialogComponent, UiActionInputDialogService, UiActionInputType, UiActionService, UiActionToolbarComponent, UiActionTooltipTooltipPositionEnum, ValueChangeMode, ViewEventHandlerViewEventTypeEnum, ViewService, ViewState, ViewType };
15435
15521
  //# sourceMappingURL=smartbit4all-ng-client.mjs.map