@smartbit4all/ng-client 3.2.1 → 3.2.3
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 +44 -41
- package/fesm2015/smartbit4all-ng-client.mjs +39 -38
- package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
- package/fesm2020/smartbit4all-ng-client.mjs +40 -38
- 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 +9 -6
- package/package.json +1 -1
- package/smartbit4all-ng-client-3.2.3.tgz +0 -0
- package/smartbit4all-ng-client-3.2.1.tgz +0 -0
|
@@ -13607,40 +13607,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
|
|
|
13607
13607
|
}] } });
|
|
13608
13608
|
|
|
13609
13609
|
class SmartFilterEditorContentComponent {
|
|
13610
|
-
constructor(layoutService) {
|
|
13610
|
+
constructor(layoutService, cfService) {
|
|
13611
13611
|
this.layoutService = layoutService;
|
|
13612
|
+
this.cfService = cfService;
|
|
13612
13613
|
this._destroy$ = new Subject();
|
|
13613
13614
|
this.uiActionModels = [];
|
|
13614
13615
|
this.expressionUiActionModels = [];
|
|
13615
13616
|
this.type = FilterExpressionBuilderUiModel.TypeEnum;
|
|
13616
13617
|
}
|
|
13617
|
-
ngAfterViewInit() {
|
|
13618
|
-
if (this.smartFilterChangeSubscription) {
|
|
13619
|
-
this.smartFilterChangeSubscription.unsubscribe();
|
|
13620
|
-
}
|
|
13621
|
-
this.smartFilterChangeSubscription = this.simpleFilterFormChild.onBlurSubject?.pipe(takeUntil(this._destroy$)).subscribe(() => {
|
|
13622
|
-
this.saveFilter();
|
|
13623
|
-
});
|
|
13624
|
-
if (this.smartFilterSophisticatedChangeSubscription) {
|
|
13625
|
-
this.smartFilterSophisticatedChangeSubscription.unsubscribe();
|
|
13626
|
-
}
|
|
13627
|
-
this.smartFilterSophisticatedChangeSubscription =
|
|
13628
|
-
this.simpleFilterFormChild.sophisticatedValueChange?.pipe(takeUntil(this._destroy$)).subscribe((change) => {
|
|
13629
|
-
if (change.kind === 'selection') {
|
|
13630
|
-
this.saveFilter();
|
|
13631
|
-
}
|
|
13632
|
-
});
|
|
13633
|
-
}
|
|
13634
13618
|
ngOnInit() {
|
|
13635
|
-
this.service.load();
|
|
13636
13619
|
this.service.modelChanged.pipe(takeUntil(this._destroy$)).subscribe(() => this.setUp());
|
|
13620
|
+
this.service.load();
|
|
13637
13621
|
}
|
|
13638
13622
|
ngOnDestroy() {
|
|
13639
13623
|
this._destroy$.next();
|
|
13640
13624
|
this._destroy$.complete();
|
|
13641
13625
|
}
|
|
13642
13626
|
setupSimpleFilter() {
|
|
13643
|
-
if (this.
|
|
13627
|
+
if (this.simpleFilterFormChild) {
|
|
13644
13628
|
return;
|
|
13645
13629
|
}
|
|
13646
13630
|
let widgets = [];
|
|
@@ -13682,9 +13666,25 @@ class SmartFilterEditorContentComponent {
|
|
|
13682
13666
|
useOnBlurEvent: true,
|
|
13683
13667
|
widgets,
|
|
13684
13668
|
};
|
|
13669
|
+
this.simpleFilterFormChild = this.cfService.createComponent(this.simpleFilterFormVcRef, SmartformComponent, new Map([['smartForm', this.simpleFilterForm]]));
|
|
13670
|
+
if (this.smartFilterChangeSubscription) {
|
|
13671
|
+
this.smartFilterChangeSubscription.unsubscribe();
|
|
13672
|
+
}
|
|
13673
|
+
this.smartFilterChangeSubscription = this.simpleFilterFormChild.instance.onBlurSubject?.pipe(takeUntil(this._destroy$)).subscribe(() => {
|
|
13674
|
+
this.saveFilter();
|
|
13675
|
+
});
|
|
13676
|
+
if (this.smartFilterSophisticatedChangeSubscription) {
|
|
13677
|
+
this.smartFilterSophisticatedChangeSubscription.unsubscribe();
|
|
13678
|
+
}
|
|
13679
|
+
this.smartFilterSophisticatedChangeSubscription =
|
|
13680
|
+
this.simpleFilterFormChild.instance.sophisticatedValueChange?.pipe(takeUntil(this._destroy$)).subscribe((change) => {
|
|
13681
|
+
if (change.kind === 'selection') {
|
|
13682
|
+
this.saveFilter();
|
|
13683
|
+
}
|
|
13684
|
+
});
|
|
13685
13685
|
}
|
|
13686
13686
|
extractFilterFieldFromFormModel() {
|
|
13687
|
-
let simpleFilter = this.simpleFilterFormChild?.submitForm(false).componentModel.data;
|
|
13687
|
+
let simpleFilter = this.simpleFilterFormChild?.instance.submitForm(false).componentModel.data;
|
|
13688
13688
|
let result = [];
|
|
13689
13689
|
Object.keys(simpleFilter).forEach((key) => {
|
|
13690
13690
|
result.push(simpleFilter[key]);
|
|
@@ -13744,10 +13744,11 @@ class SmartFilterEditorContentComponent {
|
|
|
13744
13744
|
componentModel: { data: this.service.model?.selectedField },
|
|
13745
13745
|
widgets: generatedWidgets,
|
|
13746
13746
|
};
|
|
13747
|
+
this.formChild = this.cfService.createComponent(this.formChildVcRef, SmartformComponent, new Map([['smartForm', this.smartForm]]));
|
|
13747
13748
|
if (this.smartformChangeSubscription) {
|
|
13748
13749
|
this.smartformChangeSubscription.unsubscribe();
|
|
13749
13750
|
}
|
|
13750
|
-
this.smartformChangeSubscription = this.formChild?.onBlurSubject
|
|
13751
|
+
this.smartformChangeSubscription = this.formChild?.instance.onBlurSubject
|
|
13751
13752
|
?.pipe(takeUntil(this._destroy$))
|
|
13752
13753
|
.subscribe(() => {
|
|
13753
13754
|
this.save();
|
|
@@ -13755,16 +13756,17 @@ class SmartFilterEditorContentComponent {
|
|
|
13755
13756
|
if (this.smartformSophisticatedChangeSubscription) {
|
|
13756
13757
|
this.smartformSophisticatedChangeSubscription.unsubscribe();
|
|
13757
13758
|
}
|
|
13758
|
-
this.smartformSophisticatedChangeSubscription =
|
|
13759
|
-
|
|
13760
|
-
|
|
13761
|
-
|
|
13762
|
-
|
|
13763
|
-
|
|
13764
|
-
|
|
13759
|
+
this.smartformSophisticatedChangeSubscription =
|
|
13760
|
+
this.formChild?.instance.sophisticatedValueChange
|
|
13761
|
+
?.pipe(takeUntil(this._destroy$))
|
|
13762
|
+
.subscribe((change) => {
|
|
13763
|
+
if (change.key === 'expressionData.currentOperation') {
|
|
13764
|
+
this.save();
|
|
13765
|
+
}
|
|
13766
|
+
});
|
|
13765
13767
|
}
|
|
13766
13768
|
save() {
|
|
13767
|
-
this.formChild?.submitForm(false);
|
|
13769
|
+
this.formChild?.instance.submitForm(false);
|
|
13768
13770
|
this.service.peformWidgetAction({
|
|
13769
13771
|
code: 'UPDATE_FILTER_EXPRESSION',
|
|
13770
13772
|
params: {
|
|
@@ -13824,19 +13826,19 @@ class SmartFilterEditorContentComponent {
|
|
|
13824
13826
|
return widget;
|
|
13825
13827
|
}
|
|
13826
13828
|
}
|
|
13827
|
-
SmartFilterEditorContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterEditorContentComponent, deps: [{ token: SmartformLayoutDefinitionService }], target: i0.ɵɵFactoryTarget.Component });
|
|
13828
|
-
SmartFilterEditorContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartFilterEditorContentComponent, selector: "smart-filter-expression-editor", inputs: { service: "service" }, viewQueries: [{ propertyName: "
|
|
13829
|
+
SmartFilterEditorContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterEditorContentComponent, deps: [{ token: SmartformLayoutDefinitionService }, { token: ComponentFactoryService }], target: i0.ɵɵFactoryTarget.Component });
|
|
13830
|
+
SmartFilterEditorContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartFilterEditorContentComponent, selector: "smart-filter-expression-editor", inputs: { service: "service" }, viewQueries: [{ propertyName: "formChildVcRef", first: true, predicate: ["form"], descendants: true, read: ViewContainerRef }, { propertyName: "simpleFilterFormVcRef", first: true, predicate: ["simpleFilterFromChild"], descendants: true, read: ViewContainerRef }], 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 <ng-template #simpleFilterFromChild></ng-template>\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 <ng-template #form></ng-template>\r\n <div *ngIf=\"smartForm\">\r\n <button (click)=\"remove()\" mat-raised-button color=\"primary\">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: UiActionToolbarComponent, selector: "smart-ui-action-toolbar", inputs: ["uiActionModels", "uiActionDescriptorService"] }, { type: SmartFilterExpressionItemsComponent, selector: "app-expression-items", inputs: ["items"] }, { 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"] }] });
|
|
13829
13831
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterEditorContentComponent, decorators: [{
|
|
13830
13832
|
type: Component,
|
|
13831
|
-
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 <
|
|
13832
|
-
}], ctorParameters: function () { return [{ type: SmartformLayoutDefinitionService }]; }, propDecorators: { service: [{
|
|
13833
|
+
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 <ng-template #simpleFilterFromChild></ng-template>\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 <ng-template #form></ng-template>\r\n <div *ngIf=\"smartForm\">\r\n <button (click)=\"remove()\" mat-raised-button color=\"primary\">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"] }]
|
|
13834
|
+
}], ctorParameters: function () { return [{ type: SmartformLayoutDefinitionService }, { type: ComponentFactoryService }]; }, propDecorators: { service: [{
|
|
13833
13835
|
type: Input
|
|
13834
|
-
}],
|
|
13836
|
+
}], formChildVcRef: [{
|
|
13835
13837
|
type: ViewChild,
|
|
13836
|
-
args: ['form']
|
|
13837
|
-
}],
|
|
13838
|
+
args: ['form', { read: ViewContainerRef }]
|
|
13839
|
+
}], simpleFilterFormVcRef: [{
|
|
13838
13840
|
type: ViewChild,
|
|
13839
|
-
args: ['simpleFilterFromChild']
|
|
13841
|
+
args: ['simpleFilterFromChild', { read: ViewContainerRef }]
|
|
13840
13842
|
}] } });
|
|
13841
13843
|
|
|
13842
13844
|
class SmartFilterEditorModule {
|