@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
@@ -3744,6 +3744,26 @@ var SmartWidgetHintPositionEnum;
3744
3744
  })(SmartWidgetHintPositionEnum || (SmartWidgetHintPositionEnum = {}));
3745
3745
  ;
3746
3746
 
3747
+ /**
3748
+ * Form layout definition
3749
+ * Contains form layout definition objects.
3750
+ *
3751
+ * The version of the OpenAPI document: 1.0.0
3752
+ * Contact: info@it4all.hu
3753
+ *
3754
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3755
+ * https://openapi-generator.tech
3756
+ * Do not edit the class manually.
3757
+ */
3758
+ /**
3759
+ * 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.
3760
+ */
3761
+ var ValueChangeMode;
3762
+ (function (ValueChangeMode) {
3763
+ ValueChangeMode["NONE"] = "NONE";
3764
+ ValueChangeMode["IMMEDIATE_ACTION"] = "IMMEDIATE_ACTION";
3765
+ })(ValueChangeMode || (ValueChangeMode = {}));
3766
+
3747
3767
  class ApiModule$2 {
3748
3768
  constructor(parentModule, http) {
3749
3769
  if (parentModule) {
@@ -4822,7 +4842,7 @@ class SmartformwidgetComponent {
4822
4842
  let formControls = Object.keys(this.form.controls).filter((key) => key === this.widgetInstance.key || key.startsWith(`${this.widgetInstance.key}.`));
4823
4843
  formControls.map((key) => {
4824
4844
  this.form.controls[key].valueChanges
4825
- .pipe(distinctUntilChanged())
4845
+ .pipe(takeUntil(this._destroy$), distinctUntilChanged())
4826
4846
  .subscribe((value) => {
4827
4847
  const valueChange = {
4828
4848
  key,
@@ -6587,7 +6607,7 @@ class SmartformLayoutDefinitionService {
6587
6607
  if (!config.layoutDefinition.uploadCallback) {
6588
6608
  throw Error('No upload function injected.');
6589
6609
  }
6590
- return this.createFileUploader(config.layoutDefinition, config.uploadCallback);
6610
+ return this.createFileUploader(config.layoutDefinition);
6591
6611
  case SmartFormWidgetType.MATRIX:
6592
6612
  return this.createMatrix(config.layoutDefinition);
6593
6613
  case SmartFormWidgetType.SORTABLE:
@@ -6600,6 +6620,7 @@ class SmartformLayoutDefinitionService {
6600
6620
  createMonthPicker(layoutDefinition) {
6601
6621
  let widget = {
6602
6622
  key: layoutDefinition.key,
6623
+ valueChangeMode: layoutDefinition.valueChangeMode,
6603
6624
  type: SmartFormWidgetType.MONTH_PICKER,
6604
6625
  label: layoutDefinition.label,
6605
6626
  showLabel: layoutDefinition.showLabel,
@@ -6611,6 +6632,7 @@ class SmartformLayoutDefinitionService {
6611
6632
  type: SmartFormWidgetType.MATRIX,
6612
6633
  label: layoutDefinition.label,
6613
6634
  key: layoutDefinition.key,
6635
+ valueChangeMode: layoutDefinition.valueChangeMode,
6614
6636
  showLabel: layoutDefinition.showLabel,
6615
6637
  //TODO set isMultiple variable from layoutDefinition
6616
6638
  isMultiple: false,
@@ -6621,6 +6643,7 @@ class SmartformLayoutDefinitionService {
6621
6643
  createSortable(layoutDefinition) {
6622
6644
  let widget = {
6623
6645
  key: layoutDefinition.key,
6646
+ valueChangeMode: layoutDefinition.valueChangeMode,
6624
6647
  label: layoutDefinition.label,
6625
6648
  showLabel: layoutDefinition.showLabel,
6626
6649
  type: SmartFormWidgetType.SORTABLE,
@@ -6648,6 +6671,7 @@ class SmartformLayoutDefinitionService {
6648
6671
  });
6649
6672
  let widget = {
6650
6673
  key: layoutDefinition.key,
6674
+ valueChangeMode: layoutDefinition.valueChangeMode,
6651
6675
  type: SmartFormWidgetType.CONTAINER,
6652
6676
  cssClass: layoutDefinition.cssClass,
6653
6677
  direction: layoutDefinition.direction ?? SmartFormWidgetDirection.COL,
@@ -6659,6 +6683,7 @@ class SmartformLayoutDefinitionService {
6659
6683
  let widget = {
6660
6684
  type: SmartFormWidgetType.TEXT_FIELD,
6661
6685
  key: layoutDefinition.key,
6686
+ valueChangeMode: layoutDefinition.valueChangeMode,
6662
6687
  label: layoutDefinition.label,
6663
6688
  placeholder: layoutDefinition.placeholder,
6664
6689
  prefix: layoutDefinition.prefix,
@@ -6681,6 +6706,7 @@ class SmartformLayoutDefinitionService {
6681
6706
  let widget = {
6682
6707
  type: SmartFormWidgetType.TEXT_FIELD_CHIPS,
6683
6708
  key: layoutDefinition.key,
6709
+ valueChangeMode: layoutDefinition.valueChangeMode,
6684
6710
  label: layoutDefinition.label,
6685
6711
  placeholder: layoutDefinition.placeholder,
6686
6712
  showLabel: layoutDefinition.showLabel,
@@ -6704,6 +6730,7 @@ class SmartformLayoutDefinitionService {
6704
6730
  let widget = {
6705
6731
  type: SmartFormWidgetType.TEXT_FIELD_NUMBER,
6706
6732
  key: layoutDefinition.key,
6733
+ valueChangeMode: layoutDefinition.valueChangeMode,
6707
6734
  label: layoutDefinition.label,
6708
6735
  placeholder: layoutDefinition.placeholder,
6709
6736
  prefix: layoutDefinition.prefix,
@@ -6721,6 +6748,7 @@ class SmartformLayoutDefinitionService {
6721
6748
  let widget = {
6722
6749
  type: SmartFormWidgetType.TEXT_BOX,
6723
6750
  key: layoutDefinition.key,
6751
+ valueChangeMode: layoutDefinition.valueChangeMode,
6724
6752
  label: layoutDefinition.label,
6725
6753
  placeholder: layoutDefinition.placeholder,
6726
6754
  showLabel: layoutDefinition.showLabel,
@@ -6734,6 +6762,7 @@ class SmartformLayoutDefinitionService {
6734
6762
  let widget = {
6735
6763
  type: SmartFormWidgetType.RICH_TEXT,
6736
6764
  key: layoutDefinition.key,
6765
+ valueChangeMode: layoutDefinition.valueChangeMode,
6737
6766
  label: layoutDefinition.label,
6738
6767
  placeholder: layoutDefinition.placeholder,
6739
6768
  showLabel: layoutDefinition.showLabel,
@@ -6757,6 +6786,7 @@ class SmartformLayoutDefinitionService {
6757
6786
  let widget = {
6758
6787
  type: SmartFormWidgetType.TOGGLE,
6759
6788
  key: layoutDefinition.key,
6789
+ valueChangeMode: layoutDefinition.valueChangeMode,
6760
6790
  label: layoutDefinition.label,
6761
6791
  showLabel: layoutDefinition.showLabel,
6762
6792
  cssClass: layoutDefinition.cssClass,
@@ -6769,6 +6799,7 @@ class SmartformLayoutDefinitionService {
6769
6799
  let widget = {
6770
6800
  type: SmartFormWidgetType.RADIO_BUTTON,
6771
6801
  key: layoutDefinition.key,
6802
+ valueChangeMode: layoutDefinition.valueChangeMode,
6772
6803
  label: layoutDefinition.label,
6773
6804
  showLabel: layoutDefinition.showLabel,
6774
6805
  cssClass: layoutDefinition.cssClass,
@@ -6792,6 +6823,7 @@ class SmartformLayoutDefinitionService {
6792
6823
  let widget = {
6793
6824
  type: SmartFormWidgetType.CHECK_BOX_2,
6794
6825
  key: layoutDefinition.key,
6826
+ valueChangeMode: layoutDefinition.valueChangeMode,
6795
6827
  label: layoutDefinition.label,
6796
6828
  showLabel: layoutDefinition.showLabel,
6797
6829
  cssClass: layoutDefinition.cssClass,
@@ -6815,6 +6847,7 @@ class SmartformLayoutDefinitionService {
6815
6847
  let widget = {
6816
6848
  type: SmartFormWidgetType.SELECT,
6817
6849
  key: layoutDefinition.key,
6850
+ valueChangeMode: layoutDefinition.valueChangeMode,
6818
6851
  label: layoutDefinition.label,
6819
6852
  showLabel: layoutDefinition.showLabel,
6820
6853
  cssClass: layoutDefinition.cssClass,
@@ -6839,6 +6872,7 @@ class SmartformLayoutDefinitionService {
6839
6872
  let widget = {
6840
6873
  type: SmartFormWidgetType.SELECT_MULTIPLE,
6841
6874
  key: layoutDefinition.key,
6875
+ valueChangeMode: layoutDefinition.valueChangeMode,
6842
6876
  label: layoutDefinition.label,
6843
6877
  showLabel: layoutDefinition.showLabel,
6844
6878
  cssClass: layoutDefinition.cssClass,
@@ -6862,6 +6896,7 @@ class SmartformLayoutDefinitionService {
6862
6896
  let widget = {
6863
6897
  type: SmartFormWidgetType.DATE_PICKER,
6864
6898
  key: layoutDefinition.key,
6899
+ valueChangeMode: layoutDefinition.valueChangeMode,
6865
6900
  label: layoutDefinition.label,
6866
6901
  showLabel: layoutDefinition.showLabel,
6867
6902
  cssClass: layoutDefinition.cssClass,
@@ -6874,6 +6909,7 @@ class SmartformLayoutDefinitionService {
6874
6909
  let widget = {
6875
6910
  type: SmartFormWidgetType.DATE_TIME_PICKER,
6876
6911
  key: layoutDefinition.key,
6912
+ valueChangeMode: layoutDefinition.valueChangeMode,
6877
6913
  label: layoutDefinition.label,
6878
6914
  showLabel: layoutDefinition.showLabel,
6879
6915
  cssClass: layoutDefinition.cssClass,
@@ -6886,6 +6922,7 @@ class SmartformLayoutDefinitionService {
6886
6922
  let widget = {
6887
6923
  type: SmartFormWidgetType.IMAGE,
6888
6924
  key: layoutDefinition.key,
6925
+ valueChangeMode: layoutDefinition.valueChangeMode,
6889
6926
  label: layoutDefinition.label,
6890
6927
  showLabel: layoutDefinition.showLabel,
6891
6928
  cssClass: layoutDefinition.cssClass,
@@ -6897,6 +6934,7 @@ class SmartformLayoutDefinitionService {
6897
6934
  let widget = {
6898
6935
  type: SmartFormWidgetType.BUTTON,
6899
6936
  key: config.layoutDefinition?.key,
6937
+ valueChangeMode: config.layoutDefinition?.valueChangeMode,
6900
6938
  label: config.layoutDefinition?.label,
6901
6939
  showLabel: config.layoutDefinition?.showLabel,
6902
6940
  cssClass: config.layoutDefinition?.cssClass,
@@ -6910,16 +6948,18 @@ class SmartformLayoutDefinitionService {
6910
6948
  let widget = {
6911
6949
  type: SmartFormWidgetType.DIVIDER,
6912
6950
  key: layoutDefinition.key,
6951
+ valueChangeMode: layoutDefinition.valueChangeMode,
6913
6952
  label: layoutDefinition.label,
6914
6953
  showLabel: layoutDefinition.showLabel,
6915
6954
  cssClass: layoutDefinition.cssClass,
6916
6955
  };
6917
6956
  return widget;
6918
6957
  }
6919
- createFileUploader(layoutDefinition, uploadCallback) {
6958
+ createFileUploader(layoutDefinition) {
6920
6959
  let widget = {
6921
6960
  type: SmartFormWidgetType.FILE_UPLOADER,
6922
6961
  key: layoutDefinition.key,
6962
+ valueChangeMode: layoutDefinition.valueChangeMode,
6923
6963
  label: layoutDefinition.label,
6924
6964
  showLabel: layoutDefinition.showLabel,
6925
6965
  cssClass: layoutDefinition.cssClass,
@@ -8316,6 +8356,9 @@ class UiActionToolbarComponent {
8316
8356
  // We do not handle double clicks
8317
8357
  }
8318
8358
  getType(uiActionModel) {
8359
+ if (!uiActionModel.descriptor?.type) {
8360
+ console.log(`Action button type unset: ${uiActionModel?.uiAction?.code}`);
8361
+ }
8319
8362
  switch (uiActionModel.descriptor?.type) {
8320
8363
  case UiActionButtonType.NORMAL:
8321
8364
  return 'mat-button';
@@ -14486,9 +14529,11 @@ class SmartComponentApiClient {
14486
14529
  this.uiActionModels = [];
14487
14530
  this.dataChanged = new SmartSubject(this._destroy$);
14488
14531
  // Contained Widgets
14489
- this.widgets = new WidgetMap();
14490
- this.formWidgets = new WidgetMap();
14532
+ this.widgets = new Map();
14533
+ this.formWidgets = new Map();
14491
14534
  this.useQueryLists = false;
14535
+ this.dataChangeKeys = [];
14536
+ this.dataChangeActionHandlers = new Map();
14492
14537
  // check and calculate pageName
14493
14538
  if (!this.pageName && !this._componentName) {
14494
14539
  throw new Error('pageName or componentName must be specified!');
@@ -14524,7 +14569,7 @@ class SmartComponentApiClient {
14524
14569
  }
14525
14570
  this._uuid = uuid;
14526
14571
  if (uuid) {
14527
- this.getWidgets().widgets.forEach((ref, key) => {
14572
+ this.getWidgets().forEach((ref, key) => {
14528
14573
  if (ref instanceof SmartGridComponent) {
14529
14574
  ref.uuid = uuid;
14530
14575
  }
@@ -14572,7 +14617,7 @@ class SmartComponentApiClient {
14572
14617
  }
14573
14618
  _ngOnDestroy() {
14574
14619
  this.viewContext.unfollow(this.uuid);
14575
- this.widgets.clearWidgets();
14620
+ this.widgets.clear();
14576
14621
  this._destroy$.next();
14577
14622
  this._destroy$.complete();
14578
14623
  }
@@ -14591,6 +14636,18 @@ class SmartComponentApiClient {
14591
14636
  if (this.uuid && this.uuid !== comp.uuid)
14592
14637
  comp.uuid = this.uuid;
14593
14638
  });
14639
+ // for handling embedded forms
14640
+ this.handleQueryList(this.getSmartComponentLayoutsQL(), (form) => {
14641
+ this.handleDataChangeSubscriptions();
14642
+ });
14643
+ }
14644
+ if (!this.getSmartFormsQL()) {
14645
+ console.warn('getSmartFormsQL not available!');
14646
+ }
14647
+ else {
14648
+ this.handleQueryList(this.getSmartFormsQL(), (form) => {
14649
+ this.handleDataChangeSubscriptions();
14650
+ });
14594
14651
  }
14595
14652
  if (!this.getSmartGridsQL()) {
14596
14653
  console.warn('SmartGridsQL not available!');
@@ -14614,14 +14671,10 @@ class SmartComponentApiClient {
14614
14671
  });
14615
14672
  }
14616
14673
  }
14617
- if (!this.getSmartUiActionToolbarsQL()) {
14618
- console.warn('SmartUiActionToolbarQL not available!');
14619
- }
14620
- else {
14621
- this.handleQueryList(this.getSmartUiActionToolbarsQL(), (toolbar) => {
14622
- console.log('', toolbar.id);
14623
- });
14624
- }
14674
+ }
14675
+ handleQueryListSimple(ql, handler) {
14676
+ handler();
14677
+ ql.changes.pipe(takeUntil(this._destroy$)).subscribe(() => handler());
14625
14678
  }
14626
14679
  handleQueryList(ql, handler) {
14627
14680
  ql.forEach((el) => handler(el));
@@ -14631,16 +14684,16 @@ class SmartComponentApiClient {
14631
14684
  }
14632
14685
  getWidgets() {
14633
14686
  if (this.useQueryLists) {
14634
- let widgets = new WidgetMap();
14687
+ let widgets = new Map();
14635
14688
  this.getAllSmartGridComponents()
14636
14689
  .filter((grid) => (grid?.smartGrid?.gridIdentifier ? true : false))
14637
- .forEach((grid) => widgets.addWidget(grid.smartGrid.gridIdentifier, grid));
14690
+ .forEach((grid) => widgets.set(grid.smartGrid.gridIdentifier, grid));
14638
14691
  this.getAllSmartTreeComponents()
14639
14692
  .filter((tree) => (tree?.smartTreeModel?.identifier ? true : false))
14640
- .forEach((tree) => widgets.addWidget(tree.smartTreeModel.identifier, tree));
14693
+ .forEach((tree) => widgets.set(tree.smartTreeModel.identifier, tree));
14641
14694
  this.getAllSmartFilterEditorServices()
14642
14695
  .filter((filter) => (filter.config.identifier ? true : false))
14643
- .forEach((filter) => widgets.addWidget(filter.config.identifier, filter));
14696
+ .forEach((filter) => widgets.set(filter.config.identifier, filter));
14644
14697
  return widgets;
14645
14698
  }
14646
14699
  return this.widgets;
@@ -14667,7 +14720,6 @@ class SmartComponentApiClient {
14667
14720
  // css style properties
14668
14721
  if (styleData.style) {
14669
14722
  Object.entries(styleData.style).forEach(([key, value]) => {
14670
- console.log(`Key: ${key}, Value: ${value}`);
14671
14723
  this.renderer.setStyle(element, key, value, RendererStyleFlags2.Important);
14672
14724
  });
14673
14725
  }
@@ -14777,6 +14829,62 @@ class SmartComponentApiClient {
14777
14829
  };
14778
14830
  this.uiActionService.execute(uiAction, options);
14779
14831
  }
14832
+ addDataChangeActionHandler(key) {
14833
+ if (!this.dataChangeKeys.includes(key)) {
14834
+ this.dataChangeKeys.push(key);
14835
+ }
14836
+ }
14837
+ removeDataChangeActionHandler(key) {
14838
+ let idx = this.dataChangeKeys.indexOf(key);
14839
+ if (idx >= 0) {
14840
+ this.dataChangeKeys.splice(idx, 1);
14841
+ }
14842
+ }
14843
+ dataChangeActionHandler(event) {
14844
+ if (this.dataChangeKeys.includes(event.key)) {
14845
+ this.executeUiAction({
14846
+ code: event.key,
14847
+ model: true,
14848
+ params: {
14849
+ item: event.value,
14850
+ },
14851
+ });
14852
+ }
14853
+ }
14854
+ handleDataChangeSubscriptions() {
14855
+ if (this.useQueryLists) {
14856
+ let forms = this.getAllSmartFormComponents();
14857
+ // add elements to dataChangeKeys
14858
+ forms.forEach((form) => {
14859
+ form.smartForm?.widgets.forEach((widget) => {
14860
+ if (widget.key) {
14861
+ if (widget.valueChangeMode === ValueChangeMode.IMMEDIATE_ACTION) {
14862
+ this.addDataChangeActionHandler(widget.key);
14863
+ }
14864
+ else {
14865
+ this.removeDataChangeActionHandler(widget.key);
14866
+ }
14867
+ }
14868
+ });
14869
+ });
14870
+ // subscribe to new forms
14871
+ forms.forEach((component) => {
14872
+ if (!this.dataChangeActionHandlers.has(component)) {
14873
+ let subs = component.sophisticatedValueChange
14874
+ .pipe(takeUntil(this._destroy$))
14875
+ .subscribe((event) => this.dataChangeActionHandler(event));
14876
+ this.dataChangeActionHandlers.set(component, subs);
14877
+ }
14878
+ });
14879
+ // unsubscribe from removed forms
14880
+ this.dataChangeActionHandlers.forEach((subs, form) => {
14881
+ if (!forms.find((c) => c === form)) {
14882
+ subs.unsubscribe();
14883
+ this.dataChangeActionHandlers.delete(form);
14884
+ }
14885
+ });
14886
+ }
14887
+ }
14780
14888
  getInvalidFields() {
14781
14889
  let aggregatedInvalidFields = {
14782
14890
  invalidFieldKeys: [],
@@ -14786,7 +14894,7 @@ class SmartComponentApiClient {
14786
14894
  this.getAllSmartFormComponents()?.forEach((form) => this.validateForm(form, aggregatedInvalidFields));
14787
14895
  }
14788
14896
  else {
14789
- this.formWidgets?.widgets?.forEach((form) => this.validateForm(form, aggregatedInvalidFields));
14897
+ this.formWidgets?.forEach((form) => this.validateForm(form, aggregatedInvalidFields));
14790
14898
  }
14791
14899
  return aggregatedInvalidFields;
14792
14900
  }
@@ -14861,7 +14969,7 @@ class SmartComponentApiClient {
14861
14969
  });
14862
14970
  }
14863
14971
  else {
14864
- this.formWidgets?.widgets?.forEach((form) => {
14972
+ this.formWidgets?.forEach((form) => {
14865
14973
  form?.submitForm(validate);
14866
14974
  });
14867
14975
  }
@@ -14873,7 +14981,7 @@ class SmartComponentApiClient {
14873
14981
  smartGrid.serviceToUse = this;
14874
14982
  smartGrid.viewContextService = this.viewContext;
14875
14983
  if (!this.useQueryLists) {
14876
- this.widgets.addWidget(smartGrid.gridIdentifier, componentReference);
14984
+ this.widgets.set(smartGrid.gridIdentifier, componentReference);
14877
14985
  }
14878
14986
  else {
14879
14987
  console.warn(`Added smartGrid when useQueryLists === true (${smartGrid.gridIdentifier})`);
@@ -14886,7 +14994,7 @@ class SmartComponentApiClient {
14886
14994
  }
14887
14995
  addForm(smartFormId, smartForm, componentReference) {
14888
14996
  if (!this.useQueryLists) {
14889
- this.formWidgets.addWidget(smartFormId, componentReference);
14997
+ this.formWidgets.set(smartFormId, componentReference);
14890
14998
  }
14891
14999
  else {
14892
15000
  console.warn(`Added smartForm when useQueryLists === true (${smartFormId})`);
@@ -14907,7 +15015,7 @@ class SmartComponentApiClient {
14907
15015
  createTreeService(treeId) {
14908
15016
  const treeService = new SmarttreeGenericService(this.inject, this.pageName, treeId);
14909
15017
  if (!this.useQueryLists) {
14910
- this.widgets.addWidget(treeId, treeService);
15018
+ this.widgets.set(treeId, treeService);
14911
15019
  }
14912
15020
  else {
14913
15021
  console.warn(`Added smartTree when useQueryLists === true (${treeId})`);
@@ -15035,7 +15143,7 @@ class SmartComponentApiClient {
15035
15143
  this.getAllSmartFormComponents()?.forEach((form) => form.refresh());
15036
15144
  }
15037
15145
  else {
15038
- this.formWidgets.widgets.forEach((formComponent, key) => {
15146
+ this.formWidgets.forEach((formComponent, key) => {
15039
15147
  if (formComponent === undefined) {
15040
15148
  console.error(`Provided form reference for ${key} is undefined.`);
15041
15149
  }
@@ -15065,29 +15173,6 @@ class SmartComponentApiClient {
15065
15173
  handleConstraintChange(changes, changeKey) {
15066
15174
  this.model.constraints = changes[changeKey];
15067
15175
  }
15068
- }
15069
- class WidgetMap {
15070
- constructor() {
15071
- this._widgets = new Map();
15072
- }
15073
- get widgets() {
15074
- return this._widgets;
15075
- }
15076
- set widgets(widgets) {
15077
- this._widgets = widgets;
15078
- }
15079
- addWidget(key, reference, isForm) {
15080
- this._widgets.set(key, reference);
15081
- }
15082
- removeWidget(key) {
15083
- this._widgets.delete(key);
15084
- }
15085
- clearWidgets() {
15086
- this._widgets.clear();
15087
- }
15088
- get(key) {
15089
- return this.widgets.get(key);
15090
- }
15091
15176
  }
15092
15177
 
15093
15178
  class SmartComponent extends SmartComponentApiClient {
@@ -15263,5 +15348,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
15263
15348
  * Generated bundle index. Do not edit.
15264
15349
  */
15265
15350
 
15266
- 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 };
15351
+ 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 };
15267
15352
  //# sourceMappingURL=smartbit4all-ng-client.mjs.map