@smartbit4all/ng-client 3.1.70 → 3.1.72
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-filter-editor/smart-filter-editor-content/smart-filter-editor-content.component.mjs +25 -14
- package/fesm2015/smartbit4all-ng-client.mjs +27 -15
- package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
- package/fesm2020/smartbit4all-ng-client.mjs +24 -13
- package/fesm2020/smartbit4all-ng-client.mjs.map +1 -1
- package/lib/smart-filter-editor/smart-filter-editor-content/smart-filter-editor-content.component.d.ts +2 -2
- package/package.json +1 -1
- package/smartbit4all-ng-client-3.1.72.tgz +0 -0
- package/smartbit4all-ng-client-3.1.70.tgz +0 -0
|
@@ -13034,33 +13034,49 @@ class SmartFilterEditorContentComponent {
|
|
|
13034
13034
|
}
|
|
13035
13035
|
ngOnInit() {
|
|
13036
13036
|
this.service.load();
|
|
13037
|
+
this.initChildComponents();
|
|
13037
13038
|
this.service.modelChanged.pipe(takeUntil(this._destroy$)).subscribe(() => {
|
|
13038
|
-
this.
|
|
13039
|
+
this.bindChildComps();
|
|
13039
13040
|
});
|
|
13040
13041
|
}
|
|
13041
13042
|
ngOnDestroy() {
|
|
13042
13043
|
this._destroy$.next();
|
|
13043
13044
|
this._destroy$.complete();
|
|
13044
13045
|
}
|
|
13045
|
-
|
|
13046
|
-
|
|
13047
|
-
if (this.service.model?.type === this.type.Simple && !this.smartFilterChild) {
|
|
13046
|
+
initChildComponents() {
|
|
13047
|
+
if (this.service.model?.type === this.type.Simple) {
|
|
13048
13048
|
this.simpleFilterModel = {
|
|
13049
|
-
data:
|
|
13049
|
+
data: [],
|
|
13050
13050
|
type: SmartFilterType.SIMPLE,
|
|
13051
13051
|
};
|
|
13052
13052
|
this.smartFilterChild.service.change.pipe(takeUntil(this._destroy$)).subscribe(() => {
|
|
13053
13053
|
this.saveFilter();
|
|
13054
13054
|
});
|
|
13055
13055
|
}
|
|
13056
|
+
else {
|
|
13057
|
+
this.smartForm = {
|
|
13058
|
+
direction: SmartFormWidgetDirection.ROW,
|
|
13059
|
+
useOnBlurEvent: true,
|
|
13060
|
+
componentModel: { data: this.service.model?.selectedField },
|
|
13061
|
+
widgets: [],
|
|
13062
|
+
};
|
|
13063
|
+
this.formChild.onBlurSubject?.pipe(takeUntil(this._destroy$)).subscribe(() => {
|
|
13064
|
+
this.save();
|
|
13065
|
+
});
|
|
13066
|
+
}
|
|
13067
|
+
}
|
|
13068
|
+
bindChildComps() {
|
|
13069
|
+
if (this.service.model?.type === this.type.Simple) {
|
|
13070
|
+
this.simpleFilterModel = {
|
|
13071
|
+
data: this.service.model.model.workplaceList.filters,
|
|
13072
|
+
type: SmartFilterType.SIMPLE,
|
|
13073
|
+
};
|
|
13074
|
+
}
|
|
13056
13075
|
else {
|
|
13057
13076
|
this.constructUiActionModels();
|
|
13058
13077
|
if (this.service.model.selectedFieldEditor) {
|
|
13059
13078
|
this.constructForm();
|
|
13060
13079
|
}
|
|
13061
|
-
else {
|
|
13062
|
-
this.smartForm = undefined;
|
|
13063
|
-
}
|
|
13064
13080
|
}
|
|
13065
13081
|
}
|
|
13066
13082
|
constructUiActionModels() {
|
|
@@ -13089,8 +13105,6 @@ class SmartFilterEditorContentComponent {
|
|
|
13089
13105
|
}
|
|
13090
13106
|
}
|
|
13091
13107
|
constructForm() {
|
|
13092
|
-
if (this.formChild)
|
|
13093
|
-
return;
|
|
13094
13108
|
let generatedWidgets = this.layoutService.render({
|
|
13095
13109
|
layoutDefinitions: this.service.model?.selectedFieldEditor?.layoutDef?.widgets,
|
|
13096
13110
|
});
|
|
@@ -13100,9 +13114,6 @@ class SmartFilterEditorContentComponent {
|
|
|
13100
13114
|
componentModel: { data: this.service.model?.selectedField },
|
|
13101
13115
|
widgets: generatedWidgets,
|
|
13102
13116
|
};
|
|
13103
|
-
this.formChild.onBlurSubject?.pipe(takeUntil(this._destroy$)).subscribe(() => {
|
|
13104
|
-
this.save();
|
|
13105
|
-
});
|
|
13106
13117
|
}
|
|
13107
13118
|
save() {
|
|
13108
13119
|
this.formChild?.submitForm(false);
|