@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.
- package/esm2020/lib/smart-client/smart-component-api-client.mjs +17 -11
- package/esm2020/lib/smart-form/smartform.component.mjs +7 -3
- package/esm2020/lib/view-context/smart-ui-action/ui-action.service.mjs +3 -3
- package/fesm2015/smartbit4all-ng-client.mjs +24 -14
- package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
- package/fesm2020/smartbit4all-ng-client.mjs +24 -14
- package/fesm2020/smartbit4all-ng-client.mjs.map +1 -1
- package/lib/smart-form/smartform.component.d.ts +2 -0
- package/package.json +1 -1
- package/smartbit4all-ng-client-3.1.84.tgz +0 -0
- package/smartbit4all-ng-client-3.1.82.tgz +0 -0
|
@@ -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
|
}
|
|
@@ -5155,7 +5157,6 @@ class SmartformComponent {
|
|
|
5155
5157
|
}
|
|
5156
5158
|
refresh() {
|
|
5157
5159
|
this.service.setValuesFromModel();
|
|
5158
|
-
this.service.applyConstraints();
|
|
5159
5160
|
}
|
|
5160
5161
|
constructForm() {
|
|
5161
5162
|
if (!this.smartForm) {
|
|
@@ -5167,7 +5168,10 @@ class SmartformComponent {
|
|
|
5167
5168
|
this.service.smartForm = this.smartForm;
|
|
5168
5169
|
this.service.setValuesFromModel();
|
|
5169
5170
|
this.service.applyConstraints();
|
|
5170
|
-
this.
|
|
5171
|
+
if (!this.originalWidgets || this.originalWidgets.length === 0) {
|
|
5172
|
+
this.originalWidgets = this.smartForm.widgets;
|
|
5173
|
+
}
|
|
5174
|
+
this.smartForm.widgets = this.service.filterWidgetsByVisibility(this.originalWidgets);
|
|
5171
5175
|
this.form = this.service.toFormGroup();
|
|
5172
5176
|
if (this.smartForm.translateService) {
|
|
5173
5177
|
this.smartForm.translateService.onLangChange.pipe(takeUntil(this._destroy$)).subscribe(() => {
|
|
@@ -7798,7 +7802,7 @@ class UiActionService {
|
|
|
7798
7802
|
}
|
|
7799
7803
|
}
|
|
7800
7804
|
// InputType
|
|
7801
|
-
if (uiAction.inputType) {
|
|
7805
|
+
if (uiAction.inputType && uiAction.inputType !== UiActionInputType.None) {
|
|
7802
7806
|
uiActionRequest = await this.handleInputType(uiAction.inputType, uiAction, uiActionRequest, 'inputDialog');
|
|
7803
7807
|
if (!uiActionRequest) {
|
|
7804
7808
|
return;
|
|
@@ -7806,7 +7810,7 @@ class UiActionService {
|
|
|
7806
7810
|
await new Promise((resolve) => setTimeout(resolve, 250));
|
|
7807
7811
|
}
|
|
7808
7812
|
// Input2Type
|
|
7809
|
-
if (uiAction.input2Type) {
|
|
7813
|
+
if (uiAction.input2Type && uiAction.input2Type !== UiActionInputType.None) {
|
|
7810
7814
|
uiActionRequest = await this.handleInputType(uiAction.input2Type, uiAction, uiActionRequest, 'input2Dialog');
|
|
7811
7815
|
if (!uiActionRequest) {
|
|
7812
7816
|
return;
|
|
@@ -13469,14 +13473,7 @@ let SmartComponentApiClient = class SmartComponentApiClient {
|
|
|
13469
13473
|
this.getAllFormComponents()?.forEach((form) => {
|
|
13470
13474
|
if (form.smartForm) {
|
|
13471
13475
|
form.smartForm.componentModel = this.model;
|
|
13472
|
-
|
|
13473
|
-
// FormGroup already created -> refresh
|
|
13474
|
-
form.refresh();
|
|
13475
|
-
}
|
|
13476
|
-
else {
|
|
13477
|
-
// FormGroup not created yet -> construct
|
|
13478
|
-
form.constructForm();
|
|
13479
|
-
}
|
|
13476
|
+
form.constructForm();
|
|
13480
13477
|
}
|
|
13481
13478
|
});
|
|
13482
13479
|
}
|
|
@@ -13598,10 +13595,14 @@ let SmartComponentApiClient = class SmartComponentApiClient {
|
|
|
13598
13595
|
*/
|
|
13599
13596
|
submitForms(validate) {
|
|
13600
13597
|
if (this.useQueryLists) {
|
|
13601
|
-
this.getAllFormComponents()?.forEach((form) =>
|
|
13598
|
+
this.getAllFormComponents()?.forEach((form) => {
|
|
13599
|
+
form?.submitForm(validate);
|
|
13600
|
+
});
|
|
13602
13601
|
}
|
|
13603
13602
|
else {
|
|
13604
|
-
this.formWidgets?.widgets?.forEach((form) =>
|
|
13603
|
+
this.formWidgets?.widgets?.forEach((form) => {
|
|
13604
|
+
form?.submitForm(validate);
|
|
13605
|
+
});
|
|
13605
13606
|
}
|
|
13606
13607
|
}
|
|
13607
13608
|
addGrid(smartGrid, options, useAsDefaultGrid, componentReference) {
|
|
@@ -13613,6 +13614,9 @@ let SmartComponentApiClient = class SmartComponentApiClient {
|
|
|
13613
13614
|
if (!this.useQueryLists) {
|
|
13614
13615
|
this.widgets.addWidget(smartGrid.gridIdentifier, componentReference);
|
|
13615
13616
|
}
|
|
13617
|
+
else {
|
|
13618
|
+
console.warn(`Added smartGrid when useQueryLists === true (${smartGrid.gridIdentifier})`);
|
|
13619
|
+
}
|
|
13616
13620
|
if (useAsDefaultGrid) {
|
|
13617
13621
|
this.smartGrid = smartGrid;
|
|
13618
13622
|
return this.smartGrid;
|
|
@@ -13623,6 +13627,9 @@ let SmartComponentApiClient = class SmartComponentApiClient {
|
|
|
13623
13627
|
if (!this.useQueryLists) {
|
|
13624
13628
|
this.formWidgets.addWidget(smartFormId, componentReference);
|
|
13625
13629
|
}
|
|
13630
|
+
else {
|
|
13631
|
+
console.warn(`Added smartForm when useQueryLists === true (${smartFormId})`);
|
|
13632
|
+
}
|
|
13626
13633
|
// if (this.sendDataChanges && componentReference) {
|
|
13627
13634
|
// smartForm.useOnValueChangeEvent = true;
|
|
13628
13635
|
// componentReference.sophisticatedValueChange
|
|
@@ -13641,6 +13648,9 @@ let SmartComponentApiClient = class SmartComponentApiClient {
|
|
|
13641
13648
|
if (!this.useQueryLists) {
|
|
13642
13649
|
this.widgets.addWidget(treeId, treeService);
|
|
13643
13650
|
}
|
|
13651
|
+
else {
|
|
13652
|
+
console.warn(`Added smartTree when useQueryLists === true (${treeId})`);
|
|
13653
|
+
}
|
|
13644
13654
|
return treeService;
|
|
13645
13655
|
}
|
|
13646
13656
|
addFileUploader(uiActionCode, fileFormats, maxSizeMb, isMultiple) {
|