@smartbit4all/ng-client 3.1.83 → 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.
@@ -5138,11 +5138,13 @@ class SmartformComponent {
5138
5138
  constructor(service) {
5139
5139
  this.service = service;
5140
5140
  this._destroy$ = new Subject();
5141
+ this.originalWidgets = [];
5141
5142
  this.sophisticatedValueChange = new SmartSubject(this._destroy$);
5142
5143
  this.direction = SmartFormWidgetDirection;
5143
5144
  }
5144
5145
  ngOnChanges(changes) {
5145
5146
  this.smartForm = changes['smartForm'].currentValue;
5147
+ this.originalWidgets = [];
5146
5148
  if (this.smartForm) {
5147
5149
  this.constructForm();
5148
5150
  }
@@ -5166,7 +5168,10 @@ class SmartformComponent {
5166
5168
  this.service.smartForm = this.smartForm;
5167
5169
  this.service.setValuesFromModel();
5168
5170
  this.service.applyConstraints();
5169
- this.smartForm.widgets = this.service.filterWidgetsByVisibility(this.smartForm.widgets);
5171
+ if (!this.originalWidgets || this.originalWidgets.length === 0) {
5172
+ this.originalWidgets = this.smartForm.widgets;
5173
+ }
5174
+ this.smartForm.widgets = this.service.filterWidgetsByVisibility(this.originalWidgets);
5170
5175
  this.form = this.service.toFormGroup();
5171
5176
  if (this.smartForm.translateService) {
5172
5177
  this.smartForm.translateService.onLangChange.pipe(takeUntil(this._destroy$)).subscribe(() => {
@@ -7797,7 +7802,7 @@ class UiActionService {
7797
7802
  }
7798
7803
  }
7799
7804
  // InputType
7800
- if (uiAction.inputType) {
7805
+ if (uiAction.inputType && uiAction.inputType !== UiActionInputType.None) {
7801
7806
  uiActionRequest = await this.handleInputType(uiAction.inputType, uiAction, uiActionRequest, 'inputDialog');
7802
7807
  if (!uiActionRequest) {
7803
7808
  return;
@@ -7805,7 +7810,7 @@ class UiActionService {
7805
7810
  await new Promise((resolve) => setTimeout(resolve, 250));
7806
7811
  }
7807
7812
  // Input2Type
7808
- if (uiAction.input2Type) {
7813
+ if (uiAction.input2Type && uiAction.input2Type !== UiActionInputType.None) {
7809
7814
  uiActionRequest = await this.handleInputType(uiAction.input2Type, uiAction, uiActionRequest, 'input2Dialog');
7810
7815
  if (!uiActionRequest) {
7811
7816
  return;
@@ -13590,10 +13595,14 @@ let SmartComponentApiClient = class SmartComponentApiClient {
13590
13595
  */
13591
13596
  submitForms(validate) {
13592
13597
  if (this.useQueryLists) {
13593
- this.getAllFormComponents()?.forEach((form) => form?.submitForm(validate));
13598
+ this.getAllFormComponents()?.forEach((form) => {
13599
+ form?.submitForm(validate);
13600
+ });
13594
13601
  }
13595
13602
  else {
13596
- this.formWidgets?.widgets?.forEach((form) => form?.submitForm(validate));
13603
+ this.formWidgets?.widgets?.forEach((form) => {
13604
+ form?.submitForm(validate);
13605
+ });
13597
13606
  }
13598
13607
  }
13599
13608
  addGrid(smartGrid, options, useAsDefaultGrid, componentReference) {
@@ -13605,6 +13614,9 @@ let SmartComponentApiClient = class SmartComponentApiClient {
13605
13614
  if (!this.useQueryLists) {
13606
13615
  this.widgets.addWidget(smartGrid.gridIdentifier, componentReference);
13607
13616
  }
13617
+ else {
13618
+ console.warn(`Added smartGrid when useQueryLists === true (${smartGrid.gridIdentifier})`);
13619
+ }
13608
13620
  if (useAsDefaultGrid) {
13609
13621
  this.smartGrid = smartGrid;
13610
13622
  return this.smartGrid;
@@ -13615,6 +13627,9 @@ let SmartComponentApiClient = class SmartComponentApiClient {
13615
13627
  if (!this.useQueryLists) {
13616
13628
  this.formWidgets.addWidget(smartFormId, componentReference);
13617
13629
  }
13630
+ else {
13631
+ console.warn(`Added smartForm when useQueryLists === true (${smartFormId})`);
13632
+ }
13618
13633
  // if (this.sendDataChanges && componentReference) {
13619
13634
  // smartForm.useOnValueChangeEvent = true;
13620
13635
  // componentReference.sophisticatedValueChange
@@ -13633,6 +13648,9 @@ let SmartComponentApiClient = class SmartComponentApiClient {
13633
13648
  if (!this.useQueryLists) {
13634
13649
  this.widgets.addWidget(treeId, treeService);
13635
13650
  }
13651
+ else {
13652
+ console.warn(`Added smartTree when useQueryLists === true (${treeId})`);
13653
+ }
13636
13654
  return treeService;
13637
13655
  }
13638
13656
  addFileUploader(uiActionCode, fileFormats, maxSizeMb, isMultiple) {