@smartbit4all/ng-client 3.3.18 → 3.3.20
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 +34 -36
- package/fesm2015/smartbit4all-ng-client.mjs +31 -35
- package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
- package/fesm2020/smartbit4all-ng-client.mjs +25 -29
- 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 +6 -3
- package/package.json +1 -1
- package/smartbit4all-ng-client-3.3.20.tgz +0 -0
- package/smartbit4all-ng-client-3.3.18.tgz +0 -0
|
@@ -13317,8 +13317,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
|
|
|
13317
13317
|
}] } });
|
|
13318
13318
|
|
|
13319
13319
|
class SmartFilterEditorContentComponent {
|
|
13320
|
-
constructor(layoutService) {
|
|
13320
|
+
constructor(layoutService, cfService) {
|
|
13321
13321
|
this.layoutService = layoutService;
|
|
13322
|
+
this.cfService = cfService;
|
|
13322
13323
|
this._destroy$ = new Subject();
|
|
13323
13324
|
this.uiActionModels = [];
|
|
13324
13325
|
this.expressionUiActionModels = [];
|
|
@@ -13333,14 +13334,6 @@ class SmartFilterEditorContentComponent {
|
|
|
13333
13334
|
this.subsrcibeSimpleFormChildrenEvents();
|
|
13334
13335
|
});
|
|
13335
13336
|
}
|
|
13336
|
-
if (this.formChildren?.first) {
|
|
13337
|
-
this.subscribeEditorFormChildrenEvents();
|
|
13338
|
-
}
|
|
13339
|
-
else {
|
|
13340
|
-
this.formChildren?.changes.pipe(takeUntil(this._destroy$)).subscribe(() => {
|
|
13341
|
-
this.subscribeEditorFormChildrenEvents();
|
|
13342
|
-
});
|
|
13343
|
-
}
|
|
13344
13337
|
}
|
|
13345
13338
|
subsrcibeSimpleFormChildrenEvents() {
|
|
13346
13339
|
if (!this.filterOnBlurSub) {
|
|
@@ -13358,18 +13351,14 @@ class SmartFilterEditorContentComponent {
|
|
|
13358
13351
|
}
|
|
13359
13352
|
}
|
|
13360
13353
|
subscribeEditorFormChildrenEvents() {
|
|
13361
|
-
|
|
13362
|
-
this.
|
|
13354
|
+
this.formCompRef?.instance.onBlurSubject.pipe(takeUntil(this._destroy$)).subscribe(() => {
|
|
13355
|
+
this.save();
|
|
13356
|
+
});
|
|
13357
|
+
this.formCompRef.instance.sophisticatedValueChange?.pipe(takeUntil(this._destroy$)).subscribe((change) => {
|
|
13358
|
+
if (change.key === 'expressionData.currentOperation') {
|
|
13363
13359
|
this.save();
|
|
13364
|
-
}
|
|
13365
|
-
}
|
|
13366
|
-
if (!this.filterValueChangeSub) {
|
|
13367
|
-
this.filterValueChangeSub = this.formChildren.first.sophisticatedValueChange?.pipe(takeUntil(this._destroy$)).subscribe((change) => {
|
|
13368
|
-
if (change.key === 'expressionData.currentOperation') {
|
|
13369
|
-
this.save();
|
|
13370
|
-
}
|
|
13371
|
-
});
|
|
13372
|
-
}
|
|
13360
|
+
}
|
|
13361
|
+
});
|
|
13373
13362
|
}
|
|
13374
13363
|
// smartFilterChangeSubscription?: Subscription;
|
|
13375
13364
|
// smartFilterSophisticatedChangeSubscription?: Subscription;
|
|
@@ -13386,6 +13375,9 @@ class SmartFilterEditorContentComponent {
|
|
|
13386
13375
|
this.filterValueChangeSub.unsubscribe();
|
|
13387
13376
|
}
|
|
13388
13377
|
setupSimpleFilter() {
|
|
13378
|
+
if (this.simpleFilterForm) {
|
|
13379
|
+
return;
|
|
13380
|
+
}
|
|
13389
13381
|
let widgets = [];
|
|
13390
13382
|
let key;
|
|
13391
13383
|
let model = {};
|
|
@@ -13425,7 +13417,7 @@ class SmartFilterEditorContentComponent {
|
|
|
13425
13417
|
useOnBlurEvent: true,
|
|
13426
13418
|
widgets,
|
|
13427
13419
|
};
|
|
13428
|
-
if (!deepEqual(smartForm
|
|
13420
|
+
if (!deepEqual(smartForm, this.simpleFilterForm)) {
|
|
13429
13421
|
this.simpleFilterForm = smartForm;
|
|
13430
13422
|
}
|
|
13431
13423
|
}
|
|
@@ -13477,6 +13469,8 @@ class SmartFilterEditorContentComponent {
|
|
|
13477
13469
|
}
|
|
13478
13470
|
}
|
|
13479
13471
|
constructForm() {
|
|
13472
|
+
this.vcRef?.clear();
|
|
13473
|
+
this.formCompRef?.destroy();
|
|
13480
13474
|
let generatedWidgets = this.layoutService.render({
|
|
13481
13475
|
layoutDefinitions: this.service.model?.selectedFieldEditor?.layoutDef?.widgets,
|
|
13482
13476
|
});
|
|
@@ -13487,9 +13481,11 @@ class SmartFilterEditorContentComponent {
|
|
|
13487
13481
|
componentModel: { data: this.service.model?.selectedField },
|
|
13488
13482
|
widgets: generatedWidgets,
|
|
13489
13483
|
};
|
|
13484
|
+
this.formCompRef = this.cfService.createComponent(this.vcRef, SmartformComponent, new Map([['smartForm', this.smartForm]]));
|
|
13485
|
+
this.subscribeEditorFormChildrenEvents();
|
|
13490
13486
|
}
|
|
13491
13487
|
save() {
|
|
13492
|
-
this.
|
|
13488
|
+
this.formCompRef?.instance?.submitForm(false);
|
|
13493
13489
|
this.service.peformWidgetAction({
|
|
13494
13490
|
code: 'UPDATE_FILTER_EXPRESSION',
|
|
13495
13491
|
params: {
|
|
@@ -13541,16 +13537,16 @@ class SmartFilterEditorContentComponent {
|
|
|
13541
13537
|
return widget;
|
|
13542
13538
|
}
|
|
13543
13539
|
}
|
|
13544
|
-
SmartFilterEditorContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterEditorContentComponent, deps: [{ token: SmartformLayoutDefinitionService }], target: i0.ɵɵFactoryTarget.Component });
|
|
13545
|
-
SmartFilterEditorContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartFilterEditorContentComponent, selector: "smart-filter-expression-editor", inputs: { service: "service" }, viewQueries: [{ propertyName: "
|
|
13540
|
+
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 });
|
|
13541
|
+
SmartFilterEditorContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartFilterEditorContentComponent, selector: "smart-filter-expression-editor", inputs: { service: "service" }, viewQueries: [{ propertyName: "vcRef", first: true, predicate: ["form"], descendants: true, read: ViewContainerRef }, { propertyName: "simpleFilterFormChildren", predicate: ["simpleFilterFromChild"], descendants: true }], ngImport: i0, template: "<div class=\"smart-filter-editor-container\" *ngIf=\"service.model\">\r\n <h3 class=\"smart-filter-editor-title\">{{ 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=\"smart-filter-editor-expressionsContainer\">\r\n <smartform #simpleFilterFromChild [smartForm]=\"simpleFilterForm\"></smartform>\r\n </div>\r\n </ng-template>\r\n <ng-template #complexFilter>\r\n <div class=\"smart-filter-editor-uiActionsBar\" *ngIf=\"!service.model?.readOnly\">\r\n <smart-ui-action-toolbar [uiActionModels]=\"uiActionModels\"></smart-ui-action-toolbar>\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=\"smart-filter-editor-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=\"smart-filter-editor-withParametersContainer\">\r\n <div\r\n class=\"smart-filter-editor-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 [service]=\"service\"\r\n ></app-expression-items>\r\n </div>\r\n <div class=\"smart-filter-editor-expressionEditorContainer\">\r\n <!-- <smartform #form [smartForm]=\"smartForm\"></smartform> -->\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: [".smart-filter-editor-container{display:flex;flex-direction:column;overflow:auto;position:relative}.targetGroupContentContainer h3{margin:0;font-weight:600}.smart-filter-editor-uiActionsBar{padding:1.5rem;border-radius:.25rem;background-color:var(--container-color);display:flex;flex-direction:row;gap:1rem}.smart-filter-editor-withoutParametersContainer{display:flex;flex-direction:column;background-color:var(--container-color)}.withoutParametersContainer .mat-body{font-weight:600;text-align:center}.smart-filter-editor-withParametersContainer{display:flex;flex-direction:column;background-color:var(--container-color)}.smart-filter-editor-expressionEditorContainer{display:flex;flex-direction:column;gap:.75rem}\n"], components: [{ type: SmartformComponent, selector: "smartform", inputs: ["smartForm"] }, { type: UiActionToolbarComponent, selector: "smart-ui-action-toolbar", inputs: ["uiActionModels", "uiActionDescriptorService"] }, { type: SmartFilterExpressionItemsComponent, selector: "app-expression-items", inputs: ["items", "service"] }, { 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"] }] });
|
|
13546
13542
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterEditorContentComponent, decorators: [{
|
|
13547
13543
|
type: Component,
|
|
13548
|
-
args: [{ selector: 'smart-filter-expression-editor', template: "<div class=\"smart-filter-editor-container\" *ngIf=\"service.model\">\r\n <h3 class=\"smart-filter-editor-title\">{{ 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=\"smart-filter-editor-expressionsContainer\">\r\n <smartform #simpleFilterFromChild [smartForm]=\"simpleFilterForm\"></smartform>\r\n </div>\r\n </ng-template>\r\n <ng-template #complexFilter>\r\n <div class=\"smart-filter-editor-uiActionsBar\" *ngIf=\"!service.model?.readOnly\">\r\n <smart-ui-action-toolbar [uiActionModels]=\"uiActionModels\"></smart-ui-action-toolbar>\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=\"smart-filter-editor-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=\"smart-filter-editor-withParametersContainer\">\r\n <div\r\n class=\"smart-filter-editor-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 [service]=\"service\"\r\n ></app-expression-items>\r\n </div>\r\n <div class=\"smart-filter-editor-expressionEditorContainer\">\r\n <smartform #form [smartForm]=\"smartForm\"></smartform>\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: [".smart-filter-editor-container{display:flex;flex-direction:column;overflow:auto;position:relative}.targetGroupContentContainer h3{margin:0;font-weight:600}.smart-filter-editor-uiActionsBar{padding:1.5rem;border-radius:.25rem;background-color:var(--container-color);display:flex;flex-direction:row;gap:1rem}.smart-filter-editor-withoutParametersContainer{display:flex;flex-direction:column;background-color:var(--container-color)}.withoutParametersContainer .mat-body{font-weight:600;text-align:center}.smart-filter-editor-withParametersContainer{display:flex;flex-direction:column;background-color:var(--container-color)}.smart-filter-editor-expressionEditorContainer{display:flex;flex-direction:column;gap:.75rem}\n"] }]
|
|
13549
|
-
}], ctorParameters: function () { return [{ type: SmartformLayoutDefinitionService }]; }, propDecorators: { service: [{
|
|
13544
|
+
args: [{ selector: 'smart-filter-expression-editor', template: "<div class=\"smart-filter-editor-container\" *ngIf=\"service.model\">\r\n <h3 class=\"smart-filter-editor-title\">{{ 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=\"smart-filter-editor-expressionsContainer\">\r\n <smartform #simpleFilterFromChild [smartForm]=\"simpleFilterForm\"></smartform>\r\n </div>\r\n </ng-template>\r\n <ng-template #complexFilter>\r\n <div class=\"smart-filter-editor-uiActionsBar\" *ngIf=\"!service.model?.readOnly\">\r\n <smart-ui-action-toolbar [uiActionModels]=\"uiActionModels\"></smart-ui-action-toolbar>\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=\"smart-filter-editor-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=\"smart-filter-editor-withParametersContainer\">\r\n <div\r\n class=\"smart-filter-editor-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 [service]=\"service\"\r\n ></app-expression-items>\r\n </div>\r\n <div class=\"smart-filter-editor-expressionEditorContainer\">\r\n <!-- <smartform #form [smartForm]=\"smartForm\"></smartform> -->\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: [".smart-filter-editor-container{display:flex;flex-direction:column;overflow:auto;position:relative}.targetGroupContentContainer h3{margin:0;font-weight:600}.smart-filter-editor-uiActionsBar{padding:1.5rem;border-radius:.25rem;background-color:var(--container-color);display:flex;flex-direction:row;gap:1rem}.smart-filter-editor-withoutParametersContainer{display:flex;flex-direction:column;background-color:var(--container-color)}.withoutParametersContainer .mat-body{font-weight:600;text-align:center}.smart-filter-editor-withParametersContainer{display:flex;flex-direction:column;background-color:var(--container-color)}.smart-filter-editor-expressionEditorContainer{display:flex;flex-direction:column;gap:.75rem}\n"] }]
|
|
13545
|
+
}], ctorParameters: function () { return [{ type: SmartformLayoutDefinitionService }, { type: ComponentFactoryService }]; }, propDecorators: { service: [{
|
|
13550
13546
|
type: Input
|
|
13551
|
-
}],
|
|
13552
|
-
type:
|
|
13553
|
-
args: ['form']
|
|
13547
|
+
}], vcRef: [{
|
|
13548
|
+
type: ViewChild,
|
|
13549
|
+
args: ['form', { read: ViewContainerRef }]
|
|
13554
13550
|
}], simpleFilterFormChildren: [{
|
|
13555
13551
|
type: ViewChildren,
|
|
13556
13552
|
args: ['simpleFilterFromChild']
|