@smartbit4all/ng-client 3.1.82 → 3.1.84

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.
@@ -5104,11 +5104,13 @@ class SmartformComponent {
5104
5104
  constructor(service) {
5105
5105
  this.service = service;
5106
5106
  this._destroy$ = new Subject();
5107
+ this.originalWidgets = [];
5107
5108
  this.sophisticatedValueChange = new SmartSubject(this._destroy$);
5108
5109
  this.direction = SmartFormWidgetDirection;
5109
5110
  }
5110
5111
  ngOnChanges(changes) {
5111
5112
  this.smartForm = changes['smartForm'].currentValue;
5113
+ this.originalWidgets = [];
5112
5114
  if (this.smartForm) {
5113
5115
  this.constructForm();
5114
5116
  }
@@ -5121,7 +5123,6 @@ class SmartformComponent {
5121
5123
  }
5122
5124
  refresh() {
5123
5125
  this.service.setValuesFromModel();
5124
- this.service.applyConstraints();
5125
5126
  }
5126
5127
  constructForm() {
5127
5128
  if (!this.smartForm) {
@@ -5133,7 +5134,10 @@ class SmartformComponent {
5133
5134
  this.service.smartForm = this.smartForm;
5134
5135
  this.service.setValuesFromModel();
5135
5136
  this.service.applyConstraints();
5136
- this.smartForm.widgets = this.service.filterWidgetsByVisibility(this.smartForm.widgets);
5137
+ if (!this.originalWidgets || this.originalWidgets.length === 0) {
5138
+ this.originalWidgets = this.smartForm.widgets;
5139
+ }
5140
+ this.smartForm.widgets = this.service.filterWidgetsByVisibility(this.originalWidgets);
5137
5141
  this.form = this.service.toFormGroup();
5138
5142
  if (this.smartForm.translateService) {
5139
5143
  this.smartForm.translateService.onLangChange.pipe(takeUntil(this._destroy$)).subscribe(() => {
@@ -7816,7 +7820,7 @@ class UiActionService {
7816
7820
  }
7817
7821
  }
7818
7822
  // InputType
7819
- if (uiAction.inputType) {
7823
+ if (uiAction.inputType && uiAction.inputType !== UiActionInputType.None) {
7820
7824
  uiActionRequest = yield this.handleInputType(uiAction.inputType, uiAction, uiActionRequest, 'inputDialog');
7821
7825
  if (!uiActionRequest) {
7822
7826
  return;
@@ -7824,7 +7828,7 @@ class UiActionService {
7824
7828
  yield new Promise((resolve) => setTimeout(resolve, 250));
7825
7829
  }
7826
7830
  // Input2Type
7827
- if (uiAction.input2Type) {
7831
+ if (uiAction.input2Type && uiAction.input2Type !== UiActionInputType.None) {
7828
7832
  uiActionRequest = yield this.handleInputType(uiAction.input2Type, uiAction, uiActionRequest, 'input2Dialog');
7829
7833
  if (!uiActionRequest) {
7830
7834
  return;
@@ -13615,14 +13619,7 @@ let SmartComponentApiClient = class SmartComponentApiClient {
13615
13619
  (_a = this.getAllFormComponents()) === null || _a === void 0 ? void 0 : _a.forEach((form) => {
13616
13620
  if (form.smartForm) {
13617
13621
  form.smartForm.componentModel = this.model;
13618
- if (form.getForm()) {
13619
- // FormGroup already created -> refresh
13620
- form.refresh();
13621
- }
13622
- else {
13623
- // FormGroup not created yet -> construct
13624
- form.constructForm();
13625
- }
13622
+ form.constructForm();
13626
13623
  }
13627
13624
  });
13628
13625
  }
@@ -13754,10 +13751,14 @@ let SmartComponentApiClient = class SmartComponentApiClient {
13754
13751
  submitForms(validate) {
13755
13752
  var _a, _b, _c;
13756
13753
  if (this.useQueryLists) {
13757
- (_a = this.getAllFormComponents()) === null || _a === void 0 ? void 0 : _a.forEach((form) => form === null || form === void 0 ? void 0 : form.submitForm(validate));
13754
+ (_a = this.getAllFormComponents()) === null || _a === void 0 ? void 0 : _a.forEach((form) => {
13755
+ form === null || form === void 0 ? void 0 : form.submitForm(validate);
13756
+ });
13758
13757
  }
13759
13758
  else {
13760
- (_c = (_b = this.formWidgets) === null || _b === void 0 ? void 0 : _b.widgets) === null || _c === void 0 ? void 0 : _c.forEach((form) => form === null || form === void 0 ? void 0 : form.submitForm(validate));
13759
+ (_c = (_b = this.formWidgets) === null || _b === void 0 ? void 0 : _b.widgets) === null || _c === void 0 ? void 0 : _c.forEach((form) => {
13760
+ form === null || form === void 0 ? void 0 : form.submitForm(validate);
13761
+ });
13761
13762
  }
13762
13763
  }
13763
13764
  addGrid(smartGrid, options, useAsDefaultGrid, componentReference) {
@@ -13769,6 +13770,9 @@ let SmartComponentApiClient = class SmartComponentApiClient {
13769
13770
  if (!this.useQueryLists) {
13770
13771
  this.widgets.addWidget(smartGrid.gridIdentifier, componentReference);
13771
13772
  }
13773
+ else {
13774
+ console.warn(`Added smartGrid when useQueryLists === true (${smartGrid.gridIdentifier})`);
13775
+ }
13772
13776
  if (useAsDefaultGrid) {
13773
13777
  this.smartGrid = smartGrid;
13774
13778
  return this.smartGrid;
@@ -13779,6 +13783,9 @@ let SmartComponentApiClient = class SmartComponentApiClient {
13779
13783
  if (!this.useQueryLists) {
13780
13784
  this.formWidgets.addWidget(smartFormId, componentReference);
13781
13785
  }
13786
+ else {
13787
+ console.warn(`Added smartForm when useQueryLists === true (${smartFormId})`);
13788
+ }
13782
13789
  // if (this.sendDataChanges && componentReference) {
13783
13790
  // smartForm.useOnValueChangeEvent = true;
13784
13791
  // componentReference.sophisticatedValueChange
@@ -13797,6 +13804,9 @@ let SmartComponentApiClient = class SmartComponentApiClient {
13797
13804
  if (!this.useQueryLists) {
13798
13805
  this.widgets.addWidget(treeId, treeService);
13799
13806
  }
13807
+ else {
13808
+ console.warn(`Added smartTree when useQueryLists === true (${treeId})`);
13809
+ }
13800
13810
  return treeService;
13801
13811
  }
13802
13812
  addFileUploader(uiActionCode, fileFormats, maxSizeMb, isMultiple) {