@smartbit4all/ng-client 3.1.73 → 3.1.75
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 +38 -36
- package/fesm2015/smartbit4all-ng-client.mjs +30 -32
- package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
- package/fesm2020/smartbit4all-ng-client.mjs +32 -30
- 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 +13 -9
- package/package.json +1 -1
- package/smartbit4all-ng-client-3.1.75.tgz +0 -0
- package/smartbit4all-ng-client-3.1.73.tgz +0 -0
|
@@ -13032,51 +13032,45 @@ class SmartFilterEditorContentComponent {
|
|
|
13032
13032
|
this.expressionUiActionModels = [];
|
|
13033
13033
|
this.type = FilterExpressionBuilderUiModel.TypeEnum;
|
|
13034
13034
|
}
|
|
13035
|
+
ngAfterViewInit() {
|
|
13036
|
+
if (this.service.model?.type === this.type.Simple) {
|
|
13037
|
+
this.smartFilterChangeSubscription = this.smartFilterChild?.service.change
|
|
13038
|
+
.pipe(takeUntil(this._destroy$))
|
|
13039
|
+
.subscribe(() => {
|
|
13040
|
+
this.saveFilter();
|
|
13041
|
+
});
|
|
13042
|
+
}
|
|
13043
|
+
}
|
|
13035
13044
|
ngOnInit() {
|
|
13036
13045
|
this.service.load();
|
|
13037
|
-
this.initChildComponents();
|
|
13038
13046
|
this.service.modelChanged.pipe(takeUntil(this._destroy$)).subscribe(() => {
|
|
13039
|
-
this.
|
|
13047
|
+
this.setUp();
|
|
13040
13048
|
});
|
|
13041
13049
|
}
|
|
13042
13050
|
ngOnDestroy() {
|
|
13043
13051
|
this._destroy$.next();
|
|
13044
13052
|
this._destroy$.complete();
|
|
13045
13053
|
}
|
|
13046
|
-
|
|
13047
|
-
|
|
13048
|
-
this.
|
|
13049
|
-
|
|
13050
|
-
|
|
13051
|
-
|
|
13052
|
-
this.smartFilterChild.service.change.pipe(takeUntil(this._destroy$)).subscribe(() => {
|
|
13053
|
-
this.saveFilter();
|
|
13054
|
-
});
|
|
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
|
-
});
|
|
13054
|
+
setupSimpleFilter() {
|
|
13055
|
+
this.simpleFilterModel = {
|
|
13056
|
+
data: this.service.model.model.workplaceList.filters,
|
|
13057
|
+
type: SmartFilterType.SIMPLE,
|
|
13058
|
+
};
|
|
13059
|
+
if (!this.smartFilterChangeSubscription) {
|
|
13066
13060
|
}
|
|
13067
13061
|
}
|
|
13068
|
-
|
|
13062
|
+
setUp() {
|
|
13069
13063
|
if (this.service.model?.type === this.type.Simple) {
|
|
13070
|
-
this.
|
|
13071
|
-
data: this.service.model.model.workplaceList.filters,
|
|
13072
|
-
type: SmartFilterType.SIMPLE,
|
|
13073
|
-
};
|
|
13064
|
+
this.setupSimpleFilter();
|
|
13074
13065
|
}
|
|
13075
13066
|
else {
|
|
13076
13067
|
this.constructUiActionModels();
|
|
13077
13068
|
if (this.service.model.selectedFieldEditor) {
|
|
13078
13069
|
this.constructForm();
|
|
13079
13070
|
}
|
|
13071
|
+
else {
|
|
13072
|
+
this.smartForm = undefined;
|
|
13073
|
+
}
|
|
13080
13074
|
}
|
|
13081
13075
|
}
|
|
13082
13076
|
constructUiActionModels() {
|
|
@@ -13108,12 +13102,20 @@ class SmartFilterEditorContentComponent {
|
|
|
13108
13102
|
let generatedWidgets = this.layoutService.render({
|
|
13109
13103
|
layoutDefinitions: this.service.model?.selectedFieldEditor?.layoutDef?.widgets,
|
|
13110
13104
|
});
|
|
13111
|
-
this.
|
|
13105
|
+
this.smartForm = {
|
|
13112
13106
|
direction: SmartFormWidgetDirection.ROW,
|
|
13113
13107
|
useOnBlurEvent: true,
|
|
13114
13108
|
componentModel: { data: this.service.model?.selectedField },
|
|
13115
13109
|
widgets: generatedWidgets,
|
|
13116
13110
|
};
|
|
13111
|
+
if (this.smartformChangeSubscription) {
|
|
13112
|
+
this.smartformChangeSubscription.unsubscribe();
|
|
13113
|
+
}
|
|
13114
|
+
this.smartformChangeSubscription = this.formChild?.onBlurSubject
|
|
13115
|
+
?.pipe(takeUntil(this._destroy$))
|
|
13116
|
+
.subscribe(() => {
|
|
13117
|
+
this.save();
|
|
13118
|
+
});
|
|
13117
13119
|
}
|
|
13118
13120
|
save() {
|
|
13119
13121
|
this.formChild?.submitForm(false);
|
|
@@ -13154,10 +13156,10 @@ class SmartFilterEditorContentComponent {
|
|
|
13154
13156
|
}
|
|
13155
13157
|
}
|
|
13156
13158
|
SmartFilterEditorContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterEditorContentComponent, deps: [{ token: SmartformLayoutDefinitionService }], target: i0.ɵɵFactoryTarget.Component });
|
|
13157
|
-
SmartFilterEditorContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartFilterEditorContentComponent, selector: "smart-filter-expression-editor", inputs: { service: "service" }, viewQueries: [{ propertyName: "formChild", first: true, predicate: ["form"], descendants: true }, { propertyName: "smartFilterChild", first: true, predicate: ["smartFilter"], descendants: true }], ngImport: i0, template: "<div class=\"targetGroupContentContainer\">\r\n <h3>{{ service.model?.model?.label }}</h3>\r\n\r\n <div *ngIf=\"service.model?.type === type.Simple; then simpleFilter; else complexFilter\"></div>\r\n\r\n <ng-template #simpleFilter>\r\n <div class=\"expressionsContainer\">\r\n <smart-filter #smartFilter [filter]=\"simpleFilterModel\"></smart-filter>\r\n
|
|
13159
|
+
SmartFilterEditorContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartFilterEditorContentComponent, selector: "smart-filter-expression-editor", inputs: { service: "service" }, viewQueries: [{ propertyName: "formChild", first: true, predicate: ["form"], descendants: true }, { propertyName: "smartFilterChild", first: true, predicate: ["smartFilter"], descendants: true }], ngImport: i0, template: "<div class=\"targetGroupContentContainer\">\r\n <h3>{{ service.model?.model?.label }}</h3>\r\n\r\n <div *ngIf=\"service.model?.type === type.Simple; then simpleFilter; else complexFilter\"></div>\r\n\r\n <ng-template #simpleFilter>\r\n <div class=\"expressionsContainer\">\r\n <smart-filter #smartFilter [filter]=\"simpleFilterModel\"></smart-filter>\r\n </div>\r\n </ng-template>\r\n <ng-template #complexFilter>\r\n <div class=\"uiActionsBar\" *ngIf=\"!service.model?.readOnly\">\r\n <div class=\"uiActionsInsideOfBar\">\r\n <smart-ui-action-toolbar [uiActionModels]=\"uiActionModels\"></smart-ui-action-toolbar>\r\n </div>\r\n </div>\r\n <div\r\n *ngIf=\"\r\n service?.model?.model?.workplaceList?.filters?.length;\r\n then withParameters;\r\n else withoutParameters\r\n \"\r\n ></div>\r\n <ng-template #withoutParameters>\r\n <div class=\"withoutParametersContainer\">\r\n <span class=\"mat-body\"> M\u00E9g nincs megadva param\u00E9ter </span>\r\n </div>\r\n </ng-template>\r\n <ng-template #withParameters>\r\n <div class=\"withParametersContainer\">\r\n <div\r\n class=\"expressionsContainer\"\r\n *ngIf=\"service?.model?.model?.workplaceList?.filters?.length\"\r\n >\r\n <app-expression-items\r\n [items]=\"(service.model?.model?.workplaceList)!.filters\"\r\n ></app-expression-items>\r\n </div>\r\n <div class=\"expressionEditorContainer\">\r\n <smartform #form [smartForm]=\"smartForm\"></smartform>\r\n <div *ngIf=\"smartForm\">\r\n <button (click)=\"remove()\" mat-button color=\"accent\">T\u00F6rl\u00E9s</button>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </ng-template>\r\n</div>\r\n", styles: [".targetGroupContentContainer{padding:1.5rem;display:flex;flex-direction:column;gap:2.5rem;height:calc(100% - 3rem);overflow:auto;position:relative}.targetGroupContentContainer h3{margin:0;font-weight:600}.uiActionsBar{padding:1.5rem;border-radius:.25rem;background-color:var(--container-color)}.uiActionsBar,.uiActionsInsideOfBar{display:flex;flex-direction:row;gap:1rem}.uiActionsInsideOfBar{position:relative;left:-3rem}.section,.notSection{display:flex;flex-direction:row;gap:1rem}.section:before{content:\"\";border:1px solid #d9d9d9;align-self:stretch}.withoutParametersContainer{display:flex;flex-direction:column;padding:2rem;background-color:var(--container-color);border-radius:.25rem}.withoutParametersContainer .mat-body{font-weight:600;text-align:center}.withParametersContainer{display:flex;flex-direction:column;padding:1.5rem;background-color:var(--container-color);border-radius:.25rem;gap:.75rem}.expressionsContainer{display:flex;flex-direction:row;flex-wrap:wrap;gap:.75rem;margin-bottom:1px solid #cdcdcd}.expressionEditorContainer{display:flex;flex-direction:column;gap:.75rem}\n"], components: [{ type: SmartFilterComponent, selector: "smart-filter", inputs: ["filter"] }, { type: UiActionToolbarComponent, selector: "smart-ui-action-toolbar", inputs: ["uiActionModels", "uiActionDescriptorService"] }, { type: SmartFilterExpressionItemsComponent, selector: "app-expression-items", inputs: ["items"] }, { type: SmartformComponent, selector: "smartform", inputs: ["smartForm"] }, { type: i3.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
13158
13160
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterEditorContentComponent, decorators: [{
|
|
13159
13161
|
type: Component,
|
|
13160
|
-
args: [{ selector: 'smart-filter-expression-editor', template: "<div class=\"targetGroupContentContainer\">\r\n <h3>{{ service.model?.model?.label }}</h3>\r\n\r\n <div *ngIf=\"service.model?.type === type.Simple; then simpleFilter; else complexFilter\"></div>\r\n\r\n <ng-template #simpleFilter>\r\n <div class=\"expressionsContainer\">\r\n <smart-filter #smartFilter [filter]=\"simpleFilterModel\"></smart-filter>\r\n
|
|
13162
|
+
args: [{ selector: 'smart-filter-expression-editor', template: "<div class=\"targetGroupContentContainer\">\r\n <h3>{{ service.model?.model?.label }}</h3>\r\n\r\n <div *ngIf=\"service.model?.type === type.Simple; then simpleFilter; else complexFilter\"></div>\r\n\r\n <ng-template #simpleFilter>\r\n <div class=\"expressionsContainer\">\r\n <smart-filter #smartFilter [filter]=\"simpleFilterModel\"></smart-filter>\r\n </div>\r\n </ng-template>\r\n <ng-template #complexFilter>\r\n <div class=\"uiActionsBar\" *ngIf=\"!service.model?.readOnly\">\r\n <div class=\"uiActionsInsideOfBar\">\r\n <smart-ui-action-toolbar [uiActionModels]=\"uiActionModels\"></smart-ui-action-toolbar>\r\n </div>\r\n </div>\r\n <div\r\n *ngIf=\"\r\n service?.model?.model?.workplaceList?.filters?.length;\r\n then withParameters;\r\n else withoutParameters\r\n \"\r\n ></div>\r\n <ng-template #withoutParameters>\r\n <div class=\"withoutParametersContainer\">\r\n <span class=\"mat-body\"> M\u00E9g nincs megadva param\u00E9ter </span>\r\n </div>\r\n </ng-template>\r\n <ng-template #withParameters>\r\n <div class=\"withParametersContainer\">\r\n <div\r\n class=\"expressionsContainer\"\r\n *ngIf=\"service?.model?.model?.workplaceList?.filters?.length\"\r\n >\r\n <app-expression-items\r\n [items]=\"(service.model?.model?.workplaceList)!.filters\"\r\n ></app-expression-items>\r\n </div>\r\n <div class=\"expressionEditorContainer\">\r\n <smartform #form [smartForm]=\"smartForm\"></smartform>\r\n <div *ngIf=\"smartForm\">\r\n <button (click)=\"remove()\" mat-button color=\"accent\">T\u00F6rl\u00E9s</button>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </ng-template>\r\n</div>\r\n", styles: [".targetGroupContentContainer{padding:1.5rem;display:flex;flex-direction:column;gap:2.5rem;height:calc(100% - 3rem);overflow:auto;position:relative}.targetGroupContentContainer h3{margin:0;font-weight:600}.uiActionsBar{padding:1.5rem;border-radius:.25rem;background-color:var(--container-color)}.uiActionsBar,.uiActionsInsideOfBar{display:flex;flex-direction:row;gap:1rem}.uiActionsInsideOfBar{position:relative;left:-3rem}.section,.notSection{display:flex;flex-direction:row;gap:1rem}.section:before{content:\"\";border:1px solid #d9d9d9;align-self:stretch}.withoutParametersContainer{display:flex;flex-direction:column;padding:2rem;background-color:var(--container-color);border-radius:.25rem}.withoutParametersContainer .mat-body{font-weight:600;text-align:center}.withParametersContainer{display:flex;flex-direction:column;padding:1.5rem;background-color:var(--container-color);border-radius:.25rem;gap:.75rem}.expressionsContainer{display:flex;flex-direction:row;flex-wrap:wrap;gap:.75rem;margin-bottom:1px solid #cdcdcd}.expressionEditorContainer{display:flex;flex-direction:column;gap:.75rem}\n"] }]
|
|
13161
13163
|
}], ctorParameters: function () { return [{ type: SmartformLayoutDefinitionService }]; }, propDecorators: { service: [{
|
|
13162
13164
|
type: Input
|
|
13163
13165
|
}], formChild: [{
|