@smartbit4all/ng-client 3.2.4 → 3.2.6
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 +53 -25
- package/esm2020/lib/smart-filter-editor/api/api/filter.service.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/configuration.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/encoder.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/model/filterExpressionBoolOperator.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/model/filterExpressionBuilderApiConfig.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/model/filterExpressionBuilderField.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/model/filterExpressionBuilderGroup.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/model/filterExpressionBuilderModel.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/model/filterExpressionBuilderUiModel.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/model/filterExpressionData.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/model/filterExpressionDataType.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/model/filterExpressionField.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/model/filterExpressionFieldEditor.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/model/filterExpressionFieldList.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/model/filterExpressionFieldWidgetType.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/model/filterExpressionList.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/model/filterExpressionOperandData.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/model/filterExpressionOperation.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/param.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/variables.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/smart-filter-editor-content/components/smart-filter-expression-item/smart-filter-expression-item.component.mjs +9 -9
- package/esm2020/lib/smart-filter-editor/smart-filter-editor-content/components/smart-filter-expression-items/smart-filter-expression-items.component.mjs +12 -14
- package/esm2020/lib/smart-filter-editor/smart-filter-editor-content/smart-filter-editor-content.component.mjs +56 -61
- package/esm2020/lib/smart-filter-editor/smart-filter-params/components/smart-filter-param/smart-filter-param.component.mjs +7 -11
- package/esm2020/lib/smart-filter-editor/smart-filter-params/smart-filter-params.component.mjs +5 -57
- package/esm2020/lib/smart-form/api/model/models.mjs +1 -1
- package/esm2020/lib/smart-form/api/model/smartWidgetDefinition.mjs +1 -1
- package/esm2020/lib/smart-form/api/model/smartWidgetHint.mjs +1 -1
- package/esm2020/lib/smart-form/services/smartform.service.mjs +33 -30
- package/esm2020/lib/smart-grid/api/grid-api/api/api.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/api/grid.service.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/api.module.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/configuration.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/encoder.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/index.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/model/gridColumnContentType.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/model/gridColumnMeta.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/model/gridDataAccessConfig.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/model/gridModel.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/model/gridPage.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/model/gridSelectionMode.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/model/gridSelectionType.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/model/gridServerModel.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/model/gridUpdateData.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/model/gridView.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/model/models.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/param.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/variables.mjs +1 -1
- package/esm2020/lib/smart-tree/tree-api/api/tree.service.mjs +1 -1
- package/esm2020/lib/smart-tree/tree-api/configuration.mjs +1 -1
- package/esm2020/lib/smart-tree/tree-api/encoder.mjs +1 -1
- package/esm2020/lib/smart-tree/tree-api/param.mjs +1 -1
- package/esm2020/lib/smart-tree/tree-api/variables.mjs +1 -1
- package/esm2020/lib/view-context/api/api/view.service.mjs +1 -1
- package/esm2020/lib/view-context/api/model/uploadedFile.mjs +1 -1
- package/esm2020/lib/view-context/api/model/viewContextChange.mjs +1 -1
- package/esm2020/lib/view-context/api/model/viewEventHandler.mjs +1 -1
- package/esm2020/lib/view-context/smart-view-context.model.mjs +1 -1
- package/esm2020/lib/view-context/smart-view-context.service.mjs +48 -24
- package/esm2020/lib/view-context/value-api/api/api.mjs +1 -1
- package/esm2020/lib/view-context/value-api/api/value.service.mjs +1 -1
- package/esm2020/lib/view-context/value-api/api.module.mjs +1 -1
- package/esm2020/lib/view-context/value-api/configuration.mjs +1 -1
- package/esm2020/lib/view-context/value-api/encoder.mjs +1 -1
- package/esm2020/lib/view-context/value-api/index.mjs +1 -1
- package/esm2020/lib/view-context/value-api/model/genericValue.mjs +1 -1
- package/esm2020/lib/view-context/value-api/model/models.mjs +1 -1
- package/esm2020/lib/view-context/value-api/model/value.mjs +1 -1
- package/esm2020/lib/view-context/value-api/model/valueSetData.mjs +1 -1
- package/esm2020/lib/view-context/value-api/model/valueSetDefinition.mjs +1 -1
- package/esm2020/lib/view-context/value-api/model/valueSetDefinitionData.mjs +1 -1
- package/esm2020/lib/view-context/value-api/model/valueSetDefinitionIdentifier.mjs +1 -1
- package/esm2020/lib/view-context/value-api/model/valueSetDefinitionKind.mjs +1 -1
- package/esm2020/lib/view-context/value-api/model/valueSetExpression.mjs +1 -1
- package/esm2020/lib/view-context/value-api/model/valueSetOperand.mjs +1 -1
- package/esm2020/lib/view-context/value-api/model/valueSetOperation.mjs +1 -1
- package/esm2020/lib/view-context/value-api/param.mjs +1 -1
- package/esm2020/lib/view-context/value-api/variables.mjs +1 -1
- package/fesm2015/smartbit4all-ng-client.mjs +760 -764
- package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
- package/fesm2020/smartbit4all-ng-client.mjs +757 -759
- package/fesm2020/smartbit4all-ng-client.mjs.map +1 -1
- package/lib/smart-client/smart-component-api-client.d.ts +4 -2
- package/lib/smart-filter-editor/smart-filter-editor-content/components/smart-filter-expression-item/smart-filter-expression-item.component.d.ts +4 -4
- package/lib/smart-filter-editor/smart-filter-editor-content/components/smart-filter-expression-items/smart-filter-expression-items.component.d.ts +6 -7
- package/lib/smart-filter-editor/smart-filter-editor-content/smart-filter-editor-content.component.d.ts +2 -7
- package/lib/smart-filter-editor/smart-filter-params/components/smart-filter-param/smart-filter-param.component.d.ts +2 -6
- package/lib/smart-filter-editor/smart-filter-params/smart-filter-params.component.d.ts +2 -3
- package/lib/smart-form/services/smartform.service.d.ts +1 -0
- package/lib/view-context/smart-view-context.model.d.ts +5 -4
- package/lib/view-context/smart-view-context.service.d.ts +9 -3
- package/package.json +1 -1
- package/smartbit4all-ng-client-3.2.6.tgz +0 -0
- package/src/lib/smart-filter-editor/api/README.md +226 -226
- package/src/lib/smart-grid/api/grid-api/README.md +226 -226
- package/src/lib/smart-tree/tree-api/README.md +226 -226
- package/src/lib/view-context/value-api/README.md +226 -226
- package/smartbit4all-ng-client-3.2.4.tgz +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { InjectionToken, Injectable, Optional, Inject, PLATFORM_ID, NgModule, SkipSelf, Component, Input, ViewChild, forwardRef, EventEmitter, Output, Directive, HostListener, ViewContainerRef, ViewEncapsulation, ViewChildren, Pipe, CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA } from '@angular/core';
|
|
3
|
-
import { __awaiter
|
|
3
|
+
import { __awaiter } from 'tslib';
|
|
4
4
|
import { Subject, takeUntil, startWith, map, distinctUntilChanged, throwError, from, catchError as catchError$1, lastValueFrom } from 'rxjs';
|
|
5
5
|
import * as i1 from '@angular/common/http';
|
|
6
6
|
import { HttpHeaders, HttpContext, HttpParams, HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';
|
|
@@ -2467,8 +2467,10 @@ class SmartViewContextService {
|
|
|
2467
2467
|
this.dialog = dialog;
|
|
2468
2468
|
this.apiQueueService = apiQueueService;
|
|
2469
2469
|
this.inject = inject;
|
|
2470
|
-
this.
|
|
2471
|
-
this.
|
|
2470
|
+
this.viewContextUuidName = 'viewContextUuid';
|
|
2471
|
+
this.viewContextUuidHeaderName = 'viewContextUuid';
|
|
2472
|
+
this.pageNamePrefix = 'page.';
|
|
2473
|
+
this.componentNamePrefix = 'component.';
|
|
2472
2474
|
this.viewHandlers = new Array();
|
|
2473
2475
|
this.openedViewUuids = new Array();
|
|
2474
2476
|
this.openedViewData = new Array();
|
|
@@ -2534,7 +2536,7 @@ class SmartViewContextService {
|
|
|
2534
2536
|
getAndSyncViewContext(uuid) {
|
|
2535
2537
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2536
2538
|
if (!uuid) {
|
|
2537
|
-
uuid = this.
|
|
2539
|
+
uuid = this.getViewContextUuid();
|
|
2538
2540
|
}
|
|
2539
2541
|
yield this.getViewContext(uuid).then(() => {
|
|
2540
2542
|
this.syncView();
|
|
@@ -2554,11 +2556,7 @@ class SmartViewContextService {
|
|
|
2554
2556
|
var _a;
|
|
2555
2557
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2556
2558
|
if (!this.viewContext) {
|
|
2557
|
-
|
|
2558
|
-
if (!viewContextUuid) {
|
|
2559
|
-
throw new Error('View context is not initialized!');
|
|
2560
|
-
}
|
|
2561
|
-
yield this.getViewContext(viewContextUuid);
|
|
2559
|
+
yield this.getViewContext(this.getViewContextUuid());
|
|
2562
2560
|
}
|
|
2563
2561
|
let pageUuid = this.getUuidOfPage(pageName);
|
|
2564
2562
|
let viewContextByPageName = (_a = this.viewContext) === null || _a === void 0 ? void 0 : _a.views.find((view) => view.uuid === pageUuid);
|
|
@@ -2579,13 +2577,6 @@ class SmartViewContextService {
|
|
|
2579
2577
|
this.openedViewData = [];
|
|
2580
2578
|
this.openedViewUuids = [];
|
|
2581
2579
|
}
|
|
2582
|
-
setTabId(tabId) {
|
|
2583
|
-
sessionStorage.setItem(this.tabIdName, tabId);
|
|
2584
|
-
this.session.addHeaderParam({
|
|
2585
|
-
headerName: this.tabIdhttpHeaderName,
|
|
2586
|
-
value: tabId,
|
|
2587
|
-
});
|
|
2588
|
-
}
|
|
2589
2580
|
startViewContext() {
|
|
2590
2581
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2591
2582
|
this.clearSessionStorage();
|
|
@@ -2596,7 +2587,7 @@ class SmartViewContextService {
|
|
|
2596
2587
|
throw new Error('No ViewContext was created');
|
|
2597
2588
|
}
|
|
2598
2589
|
this.viewContext = newViewContext;
|
|
2599
|
-
this.
|
|
2590
|
+
this.setViewContextUuid(newViewContext.uuid);
|
|
2600
2591
|
return this.viewContext;
|
|
2601
2592
|
});
|
|
2602
2593
|
}
|
|
@@ -2615,7 +2606,7 @@ class SmartViewContextService {
|
|
|
2615
2606
|
throw new Error('The messageDialogName provided by the backend has not been set.');
|
|
2616
2607
|
}
|
|
2617
2608
|
if (uuid) {
|
|
2618
|
-
this.
|
|
2609
|
+
this.setViewContextUuid(uuid);
|
|
2619
2610
|
try {
|
|
2620
2611
|
yield this.getViewContext(uuid);
|
|
2621
2612
|
}
|
|
@@ -2655,7 +2646,7 @@ class SmartViewContextService {
|
|
|
2655
2646
|
try {
|
|
2656
2647
|
this.openedViewUuids.push(view.uuid);
|
|
2657
2648
|
this.openedViewData.push(view);
|
|
2658
|
-
|
|
2649
|
+
this.setUuidOfPage(view.viewName, view.uuid, viewHandler.componentName);
|
|
2659
2650
|
dialogRef = this.dialog.openComponentAsDialog(viewHandler.component, viewHandler.name);
|
|
2660
2651
|
}
|
|
2661
2652
|
finally {
|
|
@@ -2663,9 +2654,9 @@ class SmartViewContextService {
|
|
|
2663
2654
|
if (index >= 0) {
|
|
2664
2655
|
this.openedViewUuids.splice(index, 1);
|
|
2665
2656
|
this.openedViewData.splice(index, 1);
|
|
2666
|
-
|
|
2657
|
+
this.clearUuidOfPage(view.viewName, viewHandler.componentName);
|
|
2667
2658
|
}
|
|
2668
|
-
|
|
2659
|
+
this.setUuidOfPage(view.viewName, view.uuid, viewHandler.componentName);
|
|
2669
2660
|
}
|
|
2670
2661
|
let dialogDisableClose = true;
|
|
2671
2662
|
let isMessageDialog = view.viewName === this.messageDialogname;
|
|
@@ -2708,7 +2699,7 @@ class SmartViewContextService {
|
|
|
2708
2699
|
view.state = ViewState.Opened;
|
|
2709
2700
|
this.openedViewUuids.push(view.uuid);
|
|
2710
2701
|
this.openedViewData.push(view);
|
|
2711
|
-
|
|
2702
|
+
this.setUuidOfPage(view.viewName, view.uuid, viewHandler.componentName);
|
|
2712
2703
|
this.uuidOfPageHasBeenChanged.next(view.viewName);
|
|
2713
2704
|
this.updateViewContext({
|
|
2714
2705
|
updates: [
|
|
@@ -2749,7 +2740,7 @@ class SmartViewContextService {
|
|
|
2749
2740
|
if (index >= 0) {
|
|
2750
2741
|
this.openedViewUuids.splice(index, 1);
|
|
2751
2742
|
this.openedViewData.splice(index, 1);
|
|
2752
|
-
|
|
2743
|
+
this.clearUuidOfPage(view.viewName, viewHandler.componentName);
|
|
2753
2744
|
}
|
|
2754
2745
|
this.updateViewContext({
|
|
2755
2746
|
updates: [
|
|
@@ -2838,13 +2829,46 @@ class SmartViewContextService {
|
|
|
2838
2829
|
}));
|
|
2839
2830
|
this.viewContextHasBeenSynced.next();
|
|
2840
2831
|
}
|
|
2832
|
+
setViewContextUuid(uuid) {
|
|
2833
|
+
sessionStorage.setItem(this.viewContextUuidName, uuid);
|
|
2834
|
+
this.session.addHeaderParam({
|
|
2835
|
+
headerName: this.viewContextUuidHeaderName,
|
|
2836
|
+
value: uuid,
|
|
2837
|
+
});
|
|
2838
|
+
}
|
|
2839
|
+
getViewContextUuid() {
|
|
2840
|
+
let viewContextUuid = sessionStorage.getItem(this.viewContextUuidName);
|
|
2841
|
+
if (!viewContextUuid) {
|
|
2842
|
+
throw new Error('View context is not initialized!');
|
|
2843
|
+
}
|
|
2844
|
+
return viewContextUuid;
|
|
2845
|
+
}
|
|
2846
|
+
setUuidOfPage(pageName, uuid, componentName) {
|
|
2847
|
+
sessionStorage.setItem(this.pageNamePrefix + pageName, uuid);
|
|
2848
|
+
if (componentName) {
|
|
2849
|
+
sessionStorage.setItem(this.componentNamePrefix + componentName, pageName);
|
|
2850
|
+
}
|
|
2851
|
+
}
|
|
2852
|
+
clearUuidOfPage(pageName, componentName) {
|
|
2853
|
+
sessionStorage.removeItem(this.pageNamePrefix + pageName);
|
|
2854
|
+
if (componentName) {
|
|
2855
|
+
sessionStorage.removeItem(this.componentNamePrefix + componentName);
|
|
2856
|
+
}
|
|
2857
|
+
}
|
|
2841
2858
|
getUuidOfPage(pageName) {
|
|
2842
|
-
let uuid = sessionStorage.getItem(pageName);
|
|
2859
|
+
let uuid = sessionStorage.getItem(this.pageNamePrefix + pageName);
|
|
2843
2860
|
if (!uuid) {
|
|
2844
2861
|
throw new Error(`The uuid of ${pageName} is not available.`);
|
|
2845
2862
|
}
|
|
2846
2863
|
return uuid;
|
|
2847
2864
|
}
|
|
2865
|
+
getPageNameOfComponent(componentName) {
|
|
2866
|
+
let pageName = sessionStorage.getItem(this.componentNamePrefix + componentName);
|
|
2867
|
+
if (!pageName) {
|
|
2868
|
+
throw new Error(`The pageName of ${componentName} is not available.`);
|
|
2869
|
+
}
|
|
2870
|
+
return pageName;
|
|
2871
|
+
}
|
|
2848
2872
|
message(messageData, messageResult) {
|
|
2849
2873
|
var _a;
|
|
2850
2874
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -3814,11 +3838,12 @@ class SmartFormService {
|
|
|
3814
3838
|
}
|
|
3815
3839
|
toFormGroup() {
|
|
3816
3840
|
this.createFormControls(this.smartForm.widgets);
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3841
|
+
if (this.formGroup) {
|
|
3842
|
+
this.formGroup.controls = this.group;
|
|
3843
|
+
}
|
|
3844
|
+
else {
|
|
3845
|
+
this.formGroup = new FormGroup(this.group);
|
|
3846
|
+
}
|
|
3822
3847
|
if (this.smartForm.validators && this.smartForm.validators.length) {
|
|
3823
3848
|
this.formGroup.setValidators(this.smartForm.validators.map((validator) => {
|
|
3824
3849
|
return validator.validator;
|
|
@@ -3828,7 +3853,7 @@ class SmartFormService {
|
|
|
3828
3853
|
}
|
|
3829
3854
|
createFormControls(widgets, parentKey) {
|
|
3830
3855
|
widgets.map((widget) => {
|
|
3831
|
-
var _a, _b
|
|
3856
|
+
var _a, _b;
|
|
3832
3857
|
if (widget.type !== SmartFormWidgetType.INDICATOR &&
|
|
3833
3858
|
widget.type !== SmartFormWidgetType.LABEL &&
|
|
3834
3859
|
widget.type !== SmartFormWidgetType.CONTAINER &&
|
|
@@ -3841,14 +3866,7 @@ class SmartFormService {
|
|
|
3841
3866
|
widget.type !== SmartFormWidgetType.COMPONENT &&
|
|
3842
3867
|
widget.type !== SmartFormWidgetType.MATRIX &&
|
|
3843
3868
|
widget.type !== SmartFormWidgetType.YOUTUBE_PLAYER) {
|
|
3844
|
-
|
|
3845
|
-
let formControl = new FormControl(widget.value || '', (_a = widget.validators) === null || _a === void 0 ? void 0 : _a.map((validator) => {
|
|
3846
|
-
return validator.validator;
|
|
3847
|
-
}));
|
|
3848
|
-
if (widget.isDisabled) {
|
|
3849
|
-
formControl.disable();
|
|
3850
|
-
}
|
|
3851
|
-
this.group[`${widget.key}`] = formControl;
|
|
3869
|
+
this.createFormControl(`${widget.key}`, widget.value, widget.isDisabled, widget.validators);
|
|
3852
3870
|
}
|
|
3853
3871
|
if (widget.type === SmartFormWidgetType.MATRIX) {
|
|
3854
3872
|
if (widget.isMultiple) {
|
|
@@ -3856,38 +3874,24 @@ class SmartFormService {
|
|
|
3856
3874
|
let itemKeys = widget.value.columns.map((value) => value.code);
|
|
3857
3875
|
dataKeys.forEach((key) => {
|
|
3858
3876
|
itemKeys.forEach((item) => {
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
return validator.validator;
|
|
3862
|
-
}));
|
|
3863
|
-
this.group[`${widget.key}.data.${key}.${item}`] = formControl;
|
|
3877
|
+
this.createFormControl(`${widget.key}.data.${key}.${item}`, widget.value.data[key][item], undefined, // TODO really we don't pass widget.isDisabled?
|
|
3878
|
+
widget.validators);
|
|
3864
3879
|
});
|
|
3865
3880
|
});
|
|
3866
3881
|
}
|
|
3867
3882
|
else {
|
|
3868
3883
|
Object.keys(widget.value.data).map((key) => {
|
|
3869
|
-
|
|
3870
|
-
let formControl = new FormControl(widget.isMultiple ? widget.value.data[key] : widget.value.data[key][0] || '', (_a = widget.validators) === null || _a === void 0 ? void 0 : _a.map((validator) => {
|
|
3871
|
-
return validator.validator;
|
|
3872
|
-
}));
|
|
3873
|
-
if (widget.isDisabled) {
|
|
3874
|
-
formControl.disable();
|
|
3875
|
-
}
|
|
3876
|
-
this.group[`${widget.key}.${key}`] = formControl;
|
|
3884
|
+
this.createFormControl(`${widget.key}.${key}`, widget.isMultiple ? widget.value.data[key] : widget.value.data[key][0], widget.isDisabled, widget.validators);
|
|
3877
3885
|
});
|
|
3878
3886
|
}
|
|
3879
3887
|
}
|
|
3880
3888
|
if (widget.type === SmartFormWidgetType.ITEM && parentKey) {
|
|
3881
|
-
|
|
3882
|
-
if (widget.isDisabled) {
|
|
3883
|
-
formControl.disable();
|
|
3884
|
-
}
|
|
3885
|
-
this.group[`${parentKey}.${widget.key}`] = formControl;
|
|
3889
|
+
this.createFormControl(`${parentKey}.${widget.key}`, widget.value, widget.isDisabled, undefined);
|
|
3886
3890
|
}
|
|
3887
|
-
if (widget.type === SmartFormWidgetType.CONTAINER && ((
|
|
3891
|
+
if (widget.type === SmartFormWidgetType.CONTAINER && ((_a = widget.valueList) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
3888
3892
|
this.createFormControls(widget.valueList);
|
|
3889
3893
|
}
|
|
3890
|
-
if (widget.type === SmartFormWidgetType.CHECK_BOX_2 && ((
|
|
3894
|
+
if (widget.type === SmartFormWidgetType.CHECK_BOX_2 && ((_b = widget.valueList) === null || _b === void 0 ? void 0 : _b.length)) {
|
|
3891
3895
|
this.createFormControls(widget.valueList, widget.key);
|
|
3892
3896
|
}
|
|
3893
3897
|
});
|
|
@@ -3895,6 +3899,27 @@ class SmartFormService {
|
|
|
3895
3899
|
isValidatorInList(validator, list) {
|
|
3896
3900
|
return list !== undefined && list.length > 0 && list.some((v) => v === validator);
|
|
3897
3901
|
}
|
|
3902
|
+
createFormControl(key, value, isDisabled, validators) {
|
|
3903
|
+
let formControl = this.group[key];
|
|
3904
|
+
if (!formControl) {
|
|
3905
|
+
formControl = new FormControl();
|
|
3906
|
+
this.group[key] = formControl;
|
|
3907
|
+
}
|
|
3908
|
+
formControl.setValue(value || '');
|
|
3909
|
+
formControl.clearValidators();
|
|
3910
|
+
validators === null || validators === void 0 ? void 0 : validators.map((validator) => {
|
|
3911
|
+
formControl.addValidators(validator.validator);
|
|
3912
|
+
});
|
|
3913
|
+
if (isDisabled !== undefined) {
|
|
3914
|
+
if (isDisabled) {
|
|
3915
|
+
formControl.disable();
|
|
3916
|
+
}
|
|
3917
|
+
else {
|
|
3918
|
+
formControl.enable();
|
|
3919
|
+
}
|
|
3920
|
+
}
|
|
3921
|
+
return formControl;
|
|
3922
|
+
}
|
|
3898
3923
|
copyValueFromFormToWidgetBeans(widgets, group) {
|
|
3899
3924
|
widgets.forEach((widget) => {
|
|
3900
3925
|
var _a;
|
|
@@ -13146,634 +13171,245 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
|
|
|
13146
13171
|
}]
|
|
13147
13172
|
}] });
|
|
13148
13173
|
|
|
13149
|
-
|
|
13150
|
-
|
|
13151
|
-
|
|
13152
|
-
|
|
13153
|
-
|
|
13154
|
-
|
|
13155
|
-
|
|
13174
|
+
class SmartFilterParamComponent {
|
|
13175
|
+
constructor() { }
|
|
13176
|
+
onItemClick(item) {
|
|
13177
|
+
this.data.serviceToUse.peformWidgetAction({
|
|
13178
|
+
code: 'ADD_FILTER_EXPRESSION',
|
|
13179
|
+
params: {
|
|
13180
|
+
model: item,
|
|
13181
|
+
},
|
|
13182
|
+
});
|
|
13156
13183
|
}
|
|
13157
|
-
|
|
13158
|
-
|
|
13184
|
+
}
|
|
13185
|
+
SmartFilterParamComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterParamComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
13186
|
+
SmartFilterParamComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartFilterParamComponent, selector: "app-target-group-filter-param", inputs: { data: "data" }, ngImport: i0, template: "<div class=\"targetGroupFilterParamContainer\">\r\n <div\r\n class=\"targetGroupFilterItem\"\r\n *ngFor=\"let data of data?.group\"\r\n (click)=\"onItemClick(data)\"\r\n >\r\n <smart-icon icon=\"Ic24_Chevron_Right\" color=\"gray\"></smart-icon>\r\n <div class=\"mat-caption\">\r\n {{ data.label }}\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".targetGroupFilterParamContainer{display:flex;flex-direction:column;gap:.25rem}.targetGroupFilterItem{padding:.75rem;border-radius:.25rem;display:flex;flex-direction:row;gap:.5rem;cursor:pointer}.targetGroupFilterItem .mat-caption{margin:auto 0}\n"], components: [{ type: SmartIconComponent, selector: "smart-icon", inputs: ["icon", "color"] }], directives: [{ type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
13187
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterParamComponent, decorators: [{
|
|
13188
|
+
type: Component,
|
|
13189
|
+
args: [{ selector: 'app-target-group-filter-param', template: "<div class=\"targetGroupFilterParamContainer\">\r\n <div\r\n class=\"targetGroupFilterItem\"\r\n *ngFor=\"let data of data?.group\"\r\n (click)=\"onItemClick(data)\"\r\n >\r\n <smart-icon icon=\"Ic24_Chevron_Right\" color=\"gray\"></smart-icon>\r\n <div class=\"mat-caption\">\r\n {{ data.label }}\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".targetGroupFilterParamContainer{display:flex;flex-direction:column;gap:.25rem}.targetGroupFilterItem{padding:.75rem;border-radius:.25rem;display:flex;flex-direction:row;gap:.5rem;cursor:pointer}.targetGroupFilterItem .mat-caption{margin:auto 0}\n"] }]
|
|
13190
|
+
}], ctorParameters: function () { return []; }, propDecorators: { data: [{
|
|
13191
|
+
type: Input
|
|
13192
|
+
}] } });
|
|
13193
|
+
|
|
13194
|
+
class SmartFilterParamsComponent {
|
|
13195
|
+
constructor() {
|
|
13196
|
+
this._destroy$ = new Subject();
|
|
13197
|
+
this.expandableSections = [];
|
|
13159
13198
|
}
|
|
13160
|
-
|
|
13161
|
-
|
|
13199
|
+
ngOnInit() {
|
|
13200
|
+
this.service.modelChanged.pipe(takeUntil(this._destroy$)).subscribe(() => {
|
|
13201
|
+
this.setUp(this.service.model);
|
|
13202
|
+
});
|
|
13203
|
+
this.setUp(this.service.model);
|
|
13162
13204
|
}
|
|
13163
|
-
|
|
13164
|
-
|
|
13205
|
+
ngOnDestroy() {
|
|
13206
|
+
this._destroy$.next();
|
|
13207
|
+
this._destroy$.complete();
|
|
13165
13208
|
}
|
|
13166
|
-
|
|
13209
|
+
setUp(model) {
|
|
13210
|
+
this.filterBuilder = model.model;
|
|
13211
|
+
this.constructExpandableSections();
|
|
13212
|
+
}
|
|
13213
|
+
constructExpandableSections() {
|
|
13214
|
+
if (this.filterBuilder.groups) {
|
|
13215
|
+
this.expandableSections = this.filterBuilder.groups.map((filterExpressionBuilderGroup) => {
|
|
13216
|
+
return {
|
|
13217
|
+
title: filterExpressionBuilderGroup.label,
|
|
13218
|
+
cssClass: 'filterExpressionBuilderGroup',
|
|
13219
|
+
customComponent: SmartFilterParamComponent,
|
|
13220
|
+
data: {
|
|
13221
|
+
group: filterExpressionBuilderGroup.fields,
|
|
13222
|
+
serviceToUse: this.service,
|
|
13223
|
+
},
|
|
13224
|
+
inputName: 'data',
|
|
13225
|
+
isExpanded: true,
|
|
13226
|
+
};
|
|
13227
|
+
});
|
|
13228
|
+
}
|
|
13229
|
+
}
|
|
13230
|
+
}
|
|
13231
|
+
SmartFilterParamsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterParamsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
13232
|
+
SmartFilterParamsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartFilterParamsComponent, selector: "smart-filter-group-params", inputs: { service: "service" }, viewQueries: [{ propertyName: "filterVcRef", first: true, predicate: ["smartFilter"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<div\r\n class=\"targetGroupFilterParamsContainer\"\r\n *ngIf=\"service.model?.showGroups && !service.model?.readOnly\"\r\n>\r\n <!-- <ng-template #smartFilter></ng-template> -->\r\n <!-- <div class=\"dataSource-options\" *ngIf=\"service.model?.extarnalDatabase\">\r\n <div class=\"dataSource-btns\">\r\n <div class=\"dataSource-btn\">K\u00FCls\u0151 adatb\u00E1zis</div>\r\n <div class=\"dataSource-btn dataSource-btn-disabled\">Bels\u0151 adatb\u00E1zis</div>\r\n </div>\r\n <div class=\"dataSource-add-database\">\r\n <div class=\"dataSource-add-database-title\">\r\n <smart-icon icon=\"Ic24_View_Table\" color=\"sucess\"></smart-icon>\r\n Adatb\u00E1zis\r\n </div>\r\n <button title=\"add\" mat-icon-button (click)=\"addDataSource()\">\r\n <smart-icon icon=\"Ic24_Plus_Circle\" color=\"success\"></smart-icon>\r\n </button>\r\n </div>\r\n </div> -->\r\n <div class=\"sections\">\r\n <smart-expandable-section\r\n class=\"excel\"\r\n *ngIf=\"expandableSectionsFromExcel\"\r\n [data]=\"expandableSectionsFromExcel!\"\r\n ></smart-expandable-section>\r\n <smart-expandable-section\r\n [data]=\"data\"\r\n *ngFor=\"let data of expandableSections\"\r\n ></smart-expandable-section>\r\n </div>\r\n</div>\r\n", styles: [".targetGroupFilterParamsContainer{padding:1.5rem;display:flex;flex-direction:column;gap:2.5rem;height:calc(100% - 3rem);overflow:auto;border-right:2px solid var(--primary-dark-color)}.sections{display:flex;flex-direction:column;gap:.25rem}.targetGroupFilterParamsContainer .excel::ng-deep .mat-expansion-panel-body{background-color:var(--success-lighter-color)}.targetGroupFilterParamsContainer .excel::ng-deep .mat-expansion-panel-header.mat-expanded{background-color:var(--success-color)!important}.targetGroupFilterParamsContainer::ng-deep .mat-expansion-panel-body{padding:0 0 0 1rem!important;background-color:var(--light-blue-color)}.targetGroupFilterParamsContainer::ng-deep .mat-expansion-panel-header{background-color:var(--primary-light-color);padding:.75rem;height:auto}.targetGroupFilterParamsContainer::ng-deep .mat-expansion-panel-header-title{color:var(--primary-lighter-color);font-weight:600}.targetGroupFilterParamsContainer::ng-deep .mat-expansion-panel-header.mat-expanded{background-color:var(--accent-color)!important;padding:.75rem;height:auto}.targetGroupFilterParamsContainer::ng-deep .mat-expansion-panel-header.mat-expanded .mat-expansion-panel-header-title{color:#fff}.dataSource-btns{display:flex;flex-direction:row;justify-content:space-around;background-color:var(--success-lighter-color);height:44px;padding:8px 12px;align-items:center;border:1.5px solid var(--success-color);border-left:6px solid var(--success-color);border-radius:4px}.dataSource-btn{display:flex;padding:1rem 2rem;justify-content:center;align-items:center;background-color:var(--success-color);border-radius:4px;cursor:pointer}.dataSource-btn-disabled{background-color:var(--success-lighter-color);cursor:auto}.dataSource-add-database{display:flex;flex-direction:row;justify-content:space-between;background-color:var(--success-lighter-color);padding:8px;border-radius:4px}.dataSource-add-database-title{display:flex;flex-direction:row;gap:1rem;align-items:center}.dataSource-options{display:flex;flex-direction:column;gap:1rem}\n"], components: [{ type: ExpandableSectionComponent, selector: "smart-expandable-section", inputs: ["data", "index"] }], directives: [{ type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
13233
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterParamsComponent, decorators: [{
|
|
13234
|
+
type: Component,
|
|
13235
|
+
args: [{ selector: 'smart-filter-group-params', template: "<div\r\n class=\"targetGroupFilterParamsContainer\"\r\n *ngIf=\"service.model?.showGroups && !service.model?.readOnly\"\r\n>\r\n <!-- <ng-template #smartFilter></ng-template> -->\r\n <!-- <div class=\"dataSource-options\" *ngIf=\"service.model?.extarnalDatabase\">\r\n <div class=\"dataSource-btns\">\r\n <div class=\"dataSource-btn\">K\u00FCls\u0151 adatb\u00E1zis</div>\r\n <div class=\"dataSource-btn dataSource-btn-disabled\">Bels\u0151 adatb\u00E1zis</div>\r\n </div>\r\n <div class=\"dataSource-add-database\">\r\n <div class=\"dataSource-add-database-title\">\r\n <smart-icon icon=\"Ic24_View_Table\" color=\"sucess\"></smart-icon>\r\n Adatb\u00E1zis\r\n </div>\r\n <button title=\"add\" mat-icon-button (click)=\"addDataSource()\">\r\n <smart-icon icon=\"Ic24_Plus_Circle\" color=\"success\"></smart-icon>\r\n </button>\r\n </div>\r\n </div> -->\r\n <div class=\"sections\">\r\n <smart-expandable-section\r\n class=\"excel\"\r\n *ngIf=\"expandableSectionsFromExcel\"\r\n [data]=\"expandableSectionsFromExcel!\"\r\n ></smart-expandable-section>\r\n <smart-expandable-section\r\n [data]=\"data\"\r\n *ngFor=\"let data of expandableSections\"\r\n ></smart-expandable-section>\r\n </div>\r\n</div>\r\n", styles: [".targetGroupFilterParamsContainer{padding:1.5rem;display:flex;flex-direction:column;gap:2.5rem;height:calc(100% - 3rem);overflow:auto;border-right:2px solid var(--primary-dark-color)}.sections{display:flex;flex-direction:column;gap:.25rem}.targetGroupFilterParamsContainer .excel::ng-deep .mat-expansion-panel-body{background-color:var(--success-lighter-color)}.targetGroupFilterParamsContainer .excel::ng-deep .mat-expansion-panel-header.mat-expanded{background-color:var(--success-color)!important}.targetGroupFilterParamsContainer::ng-deep .mat-expansion-panel-body{padding:0 0 0 1rem!important;background-color:var(--light-blue-color)}.targetGroupFilterParamsContainer::ng-deep .mat-expansion-panel-header{background-color:var(--primary-light-color);padding:.75rem;height:auto}.targetGroupFilterParamsContainer::ng-deep .mat-expansion-panel-header-title{color:var(--primary-lighter-color);font-weight:600}.targetGroupFilterParamsContainer::ng-deep .mat-expansion-panel-header.mat-expanded{background-color:var(--accent-color)!important;padding:.75rem;height:auto}.targetGroupFilterParamsContainer::ng-deep .mat-expansion-panel-header.mat-expanded .mat-expansion-panel-header-title{color:#fff}.dataSource-btns{display:flex;flex-direction:row;justify-content:space-around;background-color:var(--success-lighter-color);height:44px;padding:8px 12px;align-items:center;border:1.5px solid var(--success-color);border-left:6px solid var(--success-color);border-radius:4px}.dataSource-btn{display:flex;padding:1rem 2rem;justify-content:center;align-items:center;background-color:var(--success-color);border-radius:4px;cursor:pointer}.dataSource-btn-disabled{background-color:var(--success-lighter-color);cursor:auto}.dataSource-add-database{display:flex;flex-direction:row;justify-content:space-between;background-color:var(--success-lighter-color);padding:8px;border-radius:4px}.dataSource-add-database-title{display:flex;flex-direction:row;gap:1rem;align-items:center}.dataSource-options{display:flex;flex-direction:column;gap:1rem}\n"] }]
|
|
13236
|
+
}], ctorParameters: function () { return []; }, propDecorators: { service: [{
|
|
13237
|
+
type: Input
|
|
13238
|
+
}], filterVcRef: [{
|
|
13239
|
+
type: ViewChild,
|
|
13240
|
+
args: ['smartFilter', { read: ViewContainerRef }]
|
|
13241
|
+
}] } });
|
|
13167
13242
|
|
|
13168
|
-
|
|
13169
|
-
|
|
13170
|
-
|
|
13171
|
-
|
|
13172
|
-
|
|
13173
|
-
|
|
13174
|
-
};
|
|
13243
|
+
var FilterExpressionBuilderUiModel;
|
|
13244
|
+
(function (FilterExpressionBuilderUiModel) {
|
|
13245
|
+
FilterExpressionBuilderUiModel.TypeEnum = {
|
|
13246
|
+
Simple: 'SIMPLE',
|
|
13247
|
+
Complex: 'COMPLEX'
|
|
13248
|
+
};
|
|
13249
|
+
})(FilterExpressionBuilderUiModel || (FilterExpressionBuilderUiModel = {}));
|
|
13175
13250
|
|
|
13176
|
-
|
|
13177
|
-
|
|
13178
|
-
|
|
13179
|
-
|
|
13180
|
-
|
|
13181
|
-
|
|
13182
|
-
|
|
13183
|
-
|
|
13184
|
-
|
|
13185
|
-
|
|
13186
|
-
|
|
13251
|
+
var FilterExpressionBuilderApiActions;
|
|
13252
|
+
(function (FilterExpressionBuilderApiActions) {
|
|
13253
|
+
FilterExpressionBuilderApiActions["OPEN_FILTER_GROUPS"] = "OPEN_FILTER_GROUPS";
|
|
13254
|
+
FilterExpressionBuilderApiActions["CLOSE_FILTER_GROUPS"] = "CLOSE_FILTER_GROUPS";
|
|
13255
|
+
FilterExpressionBuilderApiActions["ADD_BRACKET"] = "ADD_BRACKET";
|
|
13256
|
+
FilterExpressionBuilderApiActions["ADD_FILTER_EXPRESSION"] = "ADD_FILTER_EXPRESSION";
|
|
13257
|
+
FilterExpressionBuilderApiActions["REMOVE_FILTER_EXPRESSION"] = "REMOVE_FILTER_EXPRESSION";
|
|
13258
|
+
FilterExpressionBuilderApiActions["REDO"] = "REDO";
|
|
13259
|
+
FilterExpressionBuilderApiActions["FILTER_GROUPS"] = "AFILTER_GROUPS";
|
|
13260
|
+
FilterExpressionBuilderApiActions["SELECT_FIELD"] = "SELECT_FIELD";
|
|
13261
|
+
FilterExpressionBuilderApiActions["UPDATE_FILTER_EXPRESSION"] = "UPDATE_FILTER_EXPRESSION";
|
|
13262
|
+
FilterExpressionBuilderApiActions["SAVE_EXPRESSION_DATA"] = "SAVE_EXPRESSION_DATA";
|
|
13263
|
+
FilterExpressionBuilderApiActions["SAVE_EXPRESSION_FIELD_LIST"] = "SAVE_EXPRESSION_FIELD_LIST";
|
|
13264
|
+
})(FilterExpressionBuilderApiActions || (FilterExpressionBuilderApiActions = {}));
|
|
13265
|
+
|
|
13266
|
+
class SmartFilterExpressionItemComponent {
|
|
13267
|
+
constructor() {
|
|
13268
|
+
this.isSelected = false;
|
|
13269
|
+
}
|
|
13270
|
+
ngOnInit() {
|
|
13271
|
+
var _a;
|
|
13272
|
+
this.isSelected =
|
|
13273
|
+
JSON.stringify((_a = this.service.model) === null || _a === void 0 ? void 0 : _a.selectedField) === JSON.stringify(this.item);
|
|
13274
|
+
}
|
|
13275
|
+
setOperatorTo(event, operationType) {
|
|
13276
|
+
var _a;
|
|
13277
|
+
event === null || event === void 0 ? void 0 : event.stopPropagation();
|
|
13278
|
+
if (!((_a = this.service.model) === null || _a === void 0 ? void 0 : _a.readOnly)) {
|
|
13279
|
+
this.item.expressionData.boolOperator = operationType;
|
|
13280
|
+
this.service.peformWidgetAction({
|
|
13281
|
+
code: 'UPDATE_FILTER_EXPRESSION',
|
|
13282
|
+
params: {
|
|
13283
|
+
model: this.item,
|
|
13284
|
+
},
|
|
13285
|
+
});
|
|
13286
|
+
}
|
|
13287
|
+
}
|
|
13288
|
+
select(event, item) {
|
|
13289
|
+
var _a;
|
|
13290
|
+
event === null || event === void 0 ? void 0 : event.stopPropagation();
|
|
13291
|
+
if (!((_a = this.service.model) === null || _a === void 0 ? void 0 : _a.readOnly)) {
|
|
13292
|
+
if (!this.isSelected) {
|
|
13293
|
+
this.service.peformWidgetAction({
|
|
13294
|
+
code: 'SELECT_FIELD',
|
|
13295
|
+
params: {
|
|
13296
|
+
model: this.item,
|
|
13297
|
+
},
|
|
13298
|
+
});
|
|
13299
|
+
}
|
|
13300
|
+
else {
|
|
13301
|
+
this.service.peformWidgetAction({
|
|
13302
|
+
code: 'SELECT_FIELD',
|
|
13303
|
+
params: {
|
|
13304
|
+
model: this.item,
|
|
13305
|
+
},
|
|
13306
|
+
});
|
|
13307
|
+
}
|
|
13308
|
+
}
|
|
13309
|
+
}
|
|
13310
|
+
}
|
|
13311
|
+
SmartFilterExpressionItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterExpressionItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
13312
|
+
SmartFilterExpressionItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartFilterExpressionItemComponent, selector: "app-expression-item", inputs: { item: "item", hasNext: "hasNext", service: "service" }, ngImport: i0, template: "<div class=\"expressionItemContainer\">\r\n <div\r\n class=\"expressionItemInnerContainer\"\r\n [ngClass]=\"\r\n item.expressionData?.currentOperation === 'EXPRESSION'\r\n ? isSelected\r\n ? 'selectedExpressionContainer'\r\n : 'expressionContainer'\r\n : ''\r\n \"\r\n (click)=\"select($event, item)\"\r\n >\r\n <div\r\n *ngIf=\"\r\n item.expressionData?.currentOperation === 'EXPRESSION';\r\n then expression;\r\n else simpleItem\r\n \"\r\n ></div>\r\n <ng-template #expression>\r\n <div class=\"expressionItemBubble expression\">[</div>\r\n <app-expression-item\r\n [item]=\"subItem\"\r\n [hasNext]=\"i < (item.subFieldList?.filters)!.length - 1\"\r\n *ngFor=\"let subItem of item.subFieldList?.filters; let i = index\"\r\n ></app-expression-item>\r\n <div class=\"expressionItemBubble expression\">]</div>\r\n </ng-template>\r\n <ng-template #simpleItem>\r\n <div\r\n class=\"expressionItemBubble simpleItem\"\r\n [ngClass]=\"isSelected ? 'selectedSimpleItem' : ''\"\r\n >\r\n {{ item.label\r\n }}{{ item.expressionData?.operand2?.valueAsString ? \": \" : \"\" }}\r\n <b>\r\n {{ item.expressionData?.operand2?.valueAsString }}\r\n </b>\r\n </div>\r\n </ng-template>\r\n </div>\r\n <div *ngIf=\"hasNext\" class=\"relationItemBubble\">\r\n <button\r\n mat-button\r\n (click)=\"setOperatorTo($event, 'AND')\"\r\n [ngClass]=\"\r\n item.expressionData?.boolOperator === 'AND' ? 'mat-raised-button' : ''\r\n \"\r\n color=\"black\"\r\n >\r\n \u00C9S\r\n </button>\r\n <button\r\n mat-button\r\n (click)=\"setOperatorTo($event, 'OR')\"\r\n [ngClass]=\"\r\n item.expressionData?.boolOperator === 'OR' ? 'mat-raised-button' : ''\r\n \"\r\n color=\"black\"\r\n >\r\n VAGY\r\n </button>\r\n </div>\r\n <!-- <button mat-mini-fab color=\"gray\">\r\n\t\t<smart-icon icon=\"X\" color=\"gray\"></smart-icon>\r\n\t</button> -->\r\n</div>\r\n", styles: [".expressionItemContainer{display:flex;flex-direction:row;gap:.75rem}.expressionItemInnerContainer{display:flex;flex-direction:row;grid-area:.75rem;padding:.25rem;border-radius:.25rem}.expressionContainer{border:1px dashed var(--primary-lighter-gray-color);cursor:pointer}.selectedExpressionContainer{border:2px dashed var(--primary-darker-color)}.expressionItemBubble,.relationItemBubble{display:flex;flex-direction:row;border-radius:1.5rem}.expressionItemBubble{padding:.75rem}.expression{background-color:var(--inner-container);font-weight:600;margin:auto 0}.simpleItem{background-color:#c6ddff;cursor:pointer}.selectedSimpleItem{border:2px solid var(--primary-color)}.relationItemBubble{border:1px solid #cdcdcd;padding:.25rem}.relationItemBubble .mat-button{border-radius:1.5rem;height:100%;margin:auto 0}\n"], components: [{ type: SmartFilterExpressionItemComponent, selector: "app-expression-item", inputs: ["item", "hasNext", "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.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
13313
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterExpressionItemComponent, decorators: [{
|
|
13314
|
+
type: Component,
|
|
13315
|
+
args: [{ selector: 'app-expression-item', template: "<div class=\"expressionItemContainer\">\r\n <div\r\n class=\"expressionItemInnerContainer\"\r\n [ngClass]=\"\r\n item.expressionData?.currentOperation === 'EXPRESSION'\r\n ? isSelected\r\n ? 'selectedExpressionContainer'\r\n : 'expressionContainer'\r\n : ''\r\n \"\r\n (click)=\"select($event, item)\"\r\n >\r\n <div\r\n *ngIf=\"\r\n item.expressionData?.currentOperation === 'EXPRESSION';\r\n then expression;\r\n else simpleItem\r\n \"\r\n ></div>\r\n <ng-template #expression>\r\n <div class=\"expressionItemBubble expression\">[</div>\r\n <app-expression-item\r\n [item]=\"subItem\"\r\n [hasNext]=\"i < (item.subFieldList?.filters)!.length - 1\"\r\n *ngFor=\"let subItem of item.subFieldList?.filters; let i = index\"\r\n ></app-expression-item>\r\n <div class=\"expressionItemBubble expression\">]</div>\r\n </ng-template>\r\n <ng-template #simpleItem>\r\n <div\r\n class=\"expressionItemBubble simpleItem\"\r\n [ngClass]=\"isSelected ? 'selectedSimpleItem' : ''\"\r\n >\r\n {{ item.label\r\n }}{{ item.expressionData?.operand2?.valueAsString ? \": \" : \"\" }}\r\n <b>\r\n {{ item.expressionData?.operand2?.valueAsString }}\r\n </b>\r\n </div>\r\n </ng-template>\r\n </div>\r\n <div *ngIf=\"hasNext\" class=\"relationItemBubble\">\r\n <button\r\n mat-button\r\n (click)=\"setOperatorTo($event, 'AND')\"\r\n [ngClass]=\"\r\n item.expressionData?.boolOperator === 'AND' ? 'mat-raised-button' : ''\r\n \"\r\n color=\"black\"\r\n >\r\n \u00C9S\r\n </button>\r\n <button\r\n mat-button\r\n (click)=\"setOperatorTo($event, 'OR')\"\r\n [ngClass]=\"\r\n item.expressionData?.boolOperator === 'OR' ? 'mat-raised-button' : ''\r\n \"\r\n color=\"black\"\r\n >\r\n VAGY\r\n </button>\r\n </div>\r\n <!-- <button mat-mini-fab color=\"gray\">\r\n\t\t<smart-icon icon=\"X\" color=\"gray\"></smart-icon>\r\n\t</button> -->\r\n</div>\r\n", styles: [".expressionItemContainer{display:flex;flex-direction:row;gap:.75rem}.expressionItemInnerContainer{display:flex;flex-direction:row;grid-area:.75rem;padding:.25rem;border-radius:.25rem}.expressionContainer{border:1px dashed var(--primary-lighter-gray-color);cursor:pointer}.selectedExpressionContainer{border:2px dashed var(--primary-darker-color)}.expressionItemBubble,.relationItemBubble{display:flex;flex-direction:row;border-radius:1.5rem}.expressionItemBubble{padding:.75rem}.expression{background-color:var(--inner-container);font-weight:600;margin:auto 0}.simpleItem{background-color:#c6ddff;cursor:pointer}.selectedSimpleItem{border:2px solid var(--primary-color)}.relationItemBubble{border:1px solid #cdcdcd;padding:.25rem}.relationItemBubble .mat-button{border-radius:1.5rem;height:100%;margin:auto 0}\n"] }]
|
|
13316
|
+
}], ctorParameters: function () { return []; }, propDecorators: { item: [{
|
|
13317
|
+
type: Input
|
|
13318
|
+
}], hasNext: [{
|
|
13319
|
+
type: Input
|
|
13320
|
+
}], service: [{
|
|
13321
|
+
type: Input
|
|
13322
|
+
}] } });
|
|
13323
|
+
|
|
13324
|
+
class SmartFilterExpressionItemsComponent {
|
|
13325
|
+
constructor() {
|
|
13326
|
+
this._destroy$ = new Subject();
|
|
13327
|
+
this.isSelected = false;
|
|
13328
|
+
}
|
|
13329
|
+
ngOnInit() {
|
|
13330
|
+
var _a;
|
|
13331
|
+
this.service.modelChanged.subscribe(() => {
|
|
13332
|
+
var _a;
|
|
13333
|
+
console.log(this.service.model);
|
|
13334
|
+
this.isSelected = ((_a = this.service.model) === null || _a === void 0 ? void 0 : _a.selectedField) === null;
|
|
13335
|
+
});
|
|
13336
|
+
this.isSelected = ((_a = this.service.model) === null || _a === void 0 ? void 0 : _a.selectedField) === null;
|
|
13337
|
+
}
|
|
13338
|
+
ngOnDestroy() {
|
|
13339
|
+
this._destroy$.next();
|
|
13340
|
+
this._destroy$.complete();
|
|
13341
|
+
}
|
|
13342
|
+
select() {
|
|
13343
|
+
// this.service.selectFilterExpressionField(undefined);
|
|
13344
|
+
}
|
|
13345
|
+
drop(event) {
|
|
13346
|
+
moveItemInArray(this.items, event.previousIndex, event.currentIndex);
|
|
13347
|
+
}
|
|
13348
|
+
}
|
|
13349
|
+
SmartFilterExpressionItemsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterExpressionItemsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
13350
|
+
SmartFilterExpressionItemsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartFilterExpressionItemsComponent, selector: "app-expression-items", inputs: { items: "items", service: "service" }, ngImport: i0, template: "<div\r\n cdkDropList\r\n cdkDropListOrientation=\"horizontal\"\r\n (cdkDropListDropped)=\"drop($event)\"\r\n class=\"expressionsContainer example-list\"\r\n [ngClass]=\"isSelected ? 'selected' : ''\"\r\n>\r\n <div cdkDrag class=\"expressionItem\" *ngFor=\"let item of items; let i = index\">\r\n <app-expression-item\r\n [item]=\"item\"\r\n [hasNext]=\"i < items.length - 1\"\r\n [service]=\"service\"\r\n ></app-expression-item>\r\n </div>\r\n</div>\r\n", styles: [".expressionsContainer{display:flex;flex-direction:row;flex-wrap:wrap;gap:.75rem;border:1px dashed var(--primary-lighter-gray-color);padding:.25rem;border-radius:.25rem}.selected{border:2px dashed var(--primary-darker-color)}.expressionItem{margin:auto 0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.example-box:last-child{border:none}.example-list.cdk-drop-list-dragging .example-box:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.example-custom-placeholder{background:#ccc;border:dotted 3px #999;min-height:60px;transition:transform .25s cubic-bezier(0,0,.2,1)}\n"], components: [{ type: SmartFilterExpressionItemComponent, selector: "app-expression-item", inputs: ["item", "hasNext", "service"] }], directives: [{ type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
13351
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterExpressionItemsComponent, decorators: [{
|
|
13352
|
+
type: Component,
|
|
13353
|
+
args: [{ selector: 'app-expression-items', template: "<div\r\n cdkDropList\r\n cdkDropListOrientation=\"horizontal\"\r\n (cdkDropListDropped)=\"drop($event)\"\r\n class=\"expressionsContainer example-list\"\r\n [ngClass]=\"isSelected ? 'selected' : ''\"\r\n>\r\n <div cdkDrag class=\"expressionItem\" *ngFor=\"let item of items; let i = index\">\r\n <app-expression-item\r\n [item]=\"item\"\r\n [hasNext]=\"i < items.length - 1\"\r\n [service]=\"service\"\r\n ></app-expression-item>\r\n </div>\r\n</div>\r\n", styles: [".expressionsContainer{display:flex;flex-direction:row;flex-wrap:wrap;gap:.75rem;border:1px dashed var(--primary-lighter-gray-color);padding:.25rem;border-radius:.25rem}.selected{border:2px dashed var(--primary-darker-color)}.expressionItem{margin:auto 0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.example-box:last-child{border:none}.example-list.cdk-drop-list-dragging .example-box:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.example-custom-placeholder{background:#ccc;border:dotted 3px #999;min-height:60px;transition:transform .25s cubic-bezier(0,0,.2,1)}\n"] }]
|
|
13354
|
+
}], ctorParameters: function () { return []; }, propDecorators: { items: [{
|
|
13355
|
+
type: Input
|
|
13356
|
+
}], service: [{
|
|
13357
|
+
type: Input
|
|
13358
|
+
}] } });
|
|
13359
|
+
|
|
13360
|
+
class SmartFilterEditorContentComponent {
|
|
13361
|
+
constructor(layoutService) {
|
|
13362
|
+
this.layoutService = layoutService;
|
|
13363
|
+
this._destroy$ = new Subject();
|
|
13364
|
+
this.uiActionModels = [];
|
|
13365
|
+
this.expressionUiActionModels = [];
|
|
13366
|
+
this.type = FilterExpressionBuilderUiModel.TypeEnum;
|
|
13367
|
+
}
|
|
13368
|
+
ngAfterViewInit() {
|
|
13369
|
+
var _a, _b, _c, _d;
|
|
13370
|
+
if ((_a = this.simpleFilterFormChildren) === null || _a === void 0 ? void 0 : _a.first) {
|
|
13371
|
+
this.subsrcibeSimpleFormChildrenEvents();
|
|
13187
13372
|
}
|
|
13188
13373
|
else {
|
|
13189
|
-
this.
|
|
13374
|
+
(_b = this.simpleFilterFormChildren) === null || _b === void 0 ? void 0 : _b.changes.pipe(takeUntil(this._destroy$)).subscribe(() => {
|
|
13375
|
+
this.subsrcibeSimpleFormChildrenEvents();
|
|
13376
|
+
});
|
|
13190
13377
|
}
|
|
13191
|
-
if (
|
|
13192
|
-
this.
|
|
13378
|
+
if ((_c = this.formChildren) === null || _c === void 0 ? void 0 : _c.first) {
|
|
13379
|
+
this.subscribeEditorFormChildrenEvents();
|
|
13193
13380
|
}
|
|
13194
13381
|
else {
|
|
13195
|
-
this.
|
|
13382
|
+
(_d = this.formChildren) === null || _d === void 0 ? void 0 : _d.changes.pipe(takeUntil(this._destroy$)).subscribe(() => {
|
|
13383
|
+
this.subscribeEditorFormChildrenEvents();
|
|
13384
|
+
});
|
|
13196
13385
|
}
|
|
13197
13386
|
}
|
|
13198
|
-
|
|
13199
|
-
|
|
13200
|
-
|
|
13201
|
-
|
|
13202
|
-
|
|
13203
|
-
|
|
13204
|
-
|
|
13205
|
-
|
|
13206
|
-
|
|
13207
|
-
return undefined;
|
|
13208
|
-
}
|
|
13209
|
-
const type = contentTypes.find((x) => this.isJsonMime(x));
|
|
13210
|
-
if (type === undefined) {
|
|
13211
|
-
return contentTypes[0];
|
|
13212
|
-
}
|
|
13213
|
-
return type;
|
|
13214
|
-
}
|
|
13215
|
-
/**
|
|
13216
|
-
* Select the correct accept content-type to use for a request.
|
|
13217
|
-
* Uses {@link Configuration#isJsonMime} to determine the correct accept content-type.
|
|
13218
|
-
* If no content type is found return the first found type if the contentTypes is not empty
|
|
13219
|
-
* @param accepts - the array of content types that are available for selection.
|
|
13220
|
-
* @returns the selected content-type or <code>undefined</code> if no selection could be made.
|
|
13221
|
-
*/
|
|
13222
|
-
selectHeaderAccept(accepts) {
|
|
13223
|
-
if (accepts.length === 0) {
|
|
13224
|
-
return undefined;
|
|
13225
|
-
}
|
|
13226
|
-
const type = accepts.find((x) => this.isJsonMime(x));
|
|
13227
|
-
if (type === undefined) {
|
|
13228
|
-
return accepts[0];
|
|
13229
|
-
}
|
|
13230
|
-
return type;
|
|
13231
|
-
}
|
|
13232
|
-
/**
|
|
13233
|
-
* Check if the given MIME is a JSON MIME.
|
|
13234
|
-
* JSON MIME examples:
|
|
13235
|
-
* application/json
|
|
13236
|
-
* application/json; charset=UTF8
|
|
13237
|
-
* APPLICATION/JSON
|
|
13238
|
-
* application/vnd.company+json
|
|
13239
|
-
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
13240
|
-
* @return True if the given MIME is JSON, false otherwise.
|
|
13241
|
-
*/
|
|
13242
|
-
isJsonMime(mime) {
|
|
13243
|
-
const jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
|
|
13244
|
-
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
|
|
13245
|
-
}
|
|
13246
|
-
lookupCredential(key) {
|
|
13247
|
-
const value = this.credentials[key];
|
|
13248
|
-
return typeof value === 'function'
|
|
13249
|
-
? value()
|
|
13250
|
-
: value;
|
|
13251
|
-
}
|
|
13252
|
-
defaultEncodeParam(param) {
|
|
13253
|
-
// This implementation exists as fallback for missing configuration
|
|
13254
|
-
// and for backwards compatibility to older typescript-angular generator versions.
|
|
13255
|
-
// It only works for the 'simple' parameter style.
|
|
13256
|
-
// Date-handling only works for the 'date-time' format.
|
|
13257
|
-
// All other styles and Date-formats are probably handled incorrectly.
|
|
13258
|
-
//
|
|
13259
|
-
// But: if that's all you need (i.e.: the most common use-case): no need for customization!
|
|
13260
|
-
const value = param.dataFormat === 'date-time' && param.value instanceof Date
|
|
13261
|
-
? param.value.toISOString()
|
|
13262
|
-
: param.value;
|
|
13263
|
-
return encodeURIComponent(String(value));
|
|
13264
|
-
}
|
|
13265
|
-
}
|
|
13266
|
-
|
|
13267
|
-
/**
|
|
13268
|
-
* Filter API 2
|
|
13269
|
-
* Filter API 2
|
|
13270
|
-
*
|
|
13271
|
-
* The version of the OpenAPI document: 1.0.0
|
|
13272
|
-
* Contact: info@it4all.hu
|
|
13273
|
-
*
|
|
13274
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
13275
|
-
* https://openapi-generator.tech
|
|
13276
|
-
* Do not edit the class manually.
|
|
13277
|
-
*/
|
|
13278
|
-
class FilterService {
|
|
13279
|
-
constructor(httpClient, basePath, configuration) {
|
|
13280
|
-
this.httpClient = httpClient;
|
|
13281
|
-
this.basePath = 'http://localhost';
|
|
13282
|
-
this.defaultHeaders = new HttpHeaders();
|
|
13283
|
-
this.configuration = new Configuration();
|
|
13284
|
-
if (configuration) {
|
|
13285
|
-
this.configuration = configuration;
|
|
13286
|
-
}
|
|
13287
|
-
if (typeof this.configuration.basePath !== 'string') {
|
|
13288
|
-
if (Array.isArray(basePath) && basePath.length > 0) {
|
|
13289
|
-
basePath = basePath[0];
|
|
13290
|
-
}
|
|
13291
|
-
if (typeof basePath !== 'string') {
|
|
13292
|
-
basePath = this.basePath;
|
|
13293
|
-
}
|
|
13294
|
-
this.configuration.basePath = basePath;
|
|
13295
|
-
}
|
|
13296
|
-
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
|
|
13297
|
-
}
|
|
13298
|
-
// @ts-ignore
|
|
13299
|
-
addToHttpParams(httpParams, value, key) {
|
|
13300
|
-
if (typeof value === "object" && value instanceof Date === false) {
|
|
13301
|
-
httpParams = this.addToHttpParamsRecursive(httpParams, value);
|
|
13302
|
-
}
|
|
13303
|
-
else {
|
|
13304
|
-
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
|
|
13305
|
-
}
|
|
13306
|
-
return httpParams;
|
|
13307
|
-
}
|
|
13308
|
-
addToHttpParamsRecursive(httpParams, value, key) {
|
|
13309
|
-
if (value == null) {
|
|
13310
|
-
return httpParams;
|
|
13311
|
-
}
|
|
13312
|
-
if (typeof value === "object") {
|
|
13313
|
-
if (Array.isArray(value)) {
|
|
13314
|
-
value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
|
13315
|
-
}
|
|
13316
|
-
else if (value instanceof Date) {
|
|
13317
|
-
if (key != null) {
|
|
13318
|
-
httpParams = httpParams.append(key, value.toISOString().substr(0, 10));
|
|
13319
|
-
}
|
|
13320
|
-
else {
|
|
13321
|
-
throw Error("key may not be null if value is Date");
|
|
13322
|
-
}
|
|
13323
|
-
}
|
|
13324
|
-
else {
|
|
13325
|
-
Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
|
|
13326
|
-
}
|
|
13327
|
-
}
|
|
13328
|
-
else if (key != null) {
|
|
13329
|
-
httpParams = httpParams.append(key, value);
|
|
13330
|
-
}
|
|
13331
|
-
else {
|
|
13332
|
-
throw Error("key may not be null if value is not object or array");
|
|
13333
|
-
}
|
|
13334
|
-
return httpParams;
|
|
13335
|
-
}
|
|
13336
|
-
load(uuid, filterIdentifier, observe = 'body', reportProgress = false, options) {
|
|
13337
|
-
if (uuid === null || uuid === undefined) {
|
|
13338
|
-
throw new Error('Required parameter uuid was null or undefined when calling load.');
|
|
13339
|
-
}
|
|
13340
|
-
if (filterIdentifier === null || filterIdentifier === undefined) {
|
|
13341
|
-
throw new Error('Required parameter filterIdentifier was null or undefined when calling load.');
|
|
13342
|
-
}
|
|
13343
|
-
let localVarHeaders = this.defaultHeaders;
|
|
13344
|
-
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
|
|
13345
|
-
if (localVarHttpHeaderAcceptSelected === undefined) {
|
|
13346
|
-
// to determine the Accept header
|
|
13347
|
-
const httpHeaderAccepts = [
|
|
13348
|
-
'application/json'
|
|
13349
|
-
];
|
|
13350
|
-
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
13351
|
-
}
|
|
13352
|
-
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
13353
|
-
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
|
13354
|
-
}
|
|
13355
|
-
let localVarHttpContext = options && options.context;
|
|
13356
|
-
if (localVarHttpContext === undefined) {
|
|
13357
|
-
localVarHttpContext = new HttpContext();
|
|
13358
|
-
}
|
|
13359
|
-
let responseType_ = 'json';
|
|
13360
|
-
if (localVarHttpHeaderAcceptSelected) {
|
|
13361
|
-
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
|
13362
|
-
responseType_ = 'text';
|
|
13363
|
-
}
|
|
13364
|
-
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
|
13365
|
-
responseType_ = 'json';
|
|
13366
|
-
}
|
|
13367
|
-
else {
|
|
13368
|
-
responseType_ = 'blob';
|
|
13369
|
-
}
|
|
13370
|
-
}
|
|
13371
|
-
let localVarPath = `/filter/${this.configuration.encodeParam({ name: "uuid", value: uuid, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "uuid" })}/${this.configuration.encodeParam({ name: "filterIdentifier", value: filterIdentifier, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/load`;
|
|
13372
|
-
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
|
|
13373
|
-
context: localVarHttpContext,
|
|
13374
|
-
responseType: responseType_,
|
|
13375
|
-
withCredentials: this.configuration.withCredentials,
|
|
13376
|
-
headers: localVarHeaders,
|
|
13377
|
-
observe: observe,
|
|
13378
|
-
reportProgress: reportProgress
|
|
13379
|
-
});
|
|
13380
|
-
}
|
|
13381
|
-
performWidgetAction(uuid, filterIdentifier, body, observe = 'body', reportProgress = false, options) {
|
|
13382
|
-
if (uuid === null || uuid === undefined) {
|
|
13383
|
-
throw new Error('Required parameter uuid was null or undefined when calling performWidgetAction.');
|
|
13384
|
-
}
|
|
13385
|
-
if (filterIdentifier === null || filterIdentifier === undefined) {
|
|
13386
|
-
throw new Error('Required parameter filterIdentifier was null or undefined when calling performWidgetAction.');
|
|
13387
|
-
}
|
|
13388
|
-
if (body === null || body === undefined) {
|
|
13389
|
-
throw new Error('Required parameter body was null or undefined when calling performWidgetAction.');
|
|
13390
|
-
}
|
|
13391
|
-
let localVarHeaders = this.defaultHeaders;
|
|
13392
|
-
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
|
|
13393
|
-
if (localVarHttpHeaderAcceptSelected === undefined) {
|
|
13394
|
-
// to determine the Accept header
|
|
13395
|
-
const httpHeaderAccepts = [
|
|
13396
|
-
'application/json'
|
|
13397
|
-
];
|
|
13398
|
-
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
13399
|
-
}
|
|
13400
|
-
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
13401
|
-
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
|
13402
|
-
}
|
|
13403
|
-
let localVarHttpContext = options && options.context;
|
|
13404
|
-
if (localVarHttpContext === undefined) {
|
|
13405
|
-
localVarHttpContext = new HttpContext();
|
|
13406
|
-
}
|
|
13407
|
-
// to determine the Content-Type header
|
|
13408
|
-
const consumes = [
|
|
13409
|
-
'application/json'
|
|
13410
|
-
];
|
|
13411
|
-
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
|
|
13412
|
-
if (httpContentTypeSelected !== undefined) {
|
|
13413
|
-
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
|
|
13414
|
-
}
|
|
13415
|
-
let responseType_ = 'json';
|
|
13416
|
-
if (localVarHttpHeaderAcceptSelected) {
|
|
13417
|
-
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
|
13418
|
-
responseType_ = 'text';
|
|
13419
|
-
}
|
|
13420
|
-
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
|
13421
|
-
responseType_ = 'json';
|
|
13422
|
-
}
|
|
13423
|
-
else {
|
|
13424
|
-
responseType_ = 'blob';
|
|
13425
|
-
}
|
|
13426
|
-
}
|
|
13427
|
-
let localVarPath = `/filter/${this.configuration.encodeParam({ name: "uuid", value: uuid, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "uuid" })}/${this.configuration.encodeParam({ name: "filterIdentifier", value: filterIdentifier, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/performWidgetAction`;
|
|
13428
|
-
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
|
|
13429
|
-
context: localVarHttpContext,
|
|
13430
|
-
body: body,
|
|
13431
|
-
responseType: responseType_,
|
|
13432
|
-
withCredentials: this.configuration.withCredentials,
|
|
13433
|
-
headers: localVarHeaders,
|
|
13434
|
-
observe: observe,
|
|
13435
|
-
reportProgress: reportProgress
|
|
13436
|
-
});
|
|
13437
|
-
}
|
|
13438
|
-
}
|
|
13439
|
-
FilterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FilterService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
13440
|
-
FilterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FilterService, providedIn: 'root' });
|
|
13441
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FilterService, decorators: [{
|
|
13442
|
-
type: Injectable,
|
|
13443
|
-
args: [{
|
|
13444
|
-
providedIn: 'root'
|
|
13445
|
-
}]
|
|
13446
|
-
}], ctorParameters: function () {
|
|
13447
|
-
return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
13448
|
-
type: Optional
|
|
13449
|
-
}, {
|
|
13450
|
-
type: Inject,
|
|
13451
|
-
args: [BASE_PATH]
|
|
13452
|
-
}] }, { type: Configuration, decorators: [{
|
|
13453
|
-
type: Optional
|
|
13454
|
-
}] }];
|
|
13455
|
-
} });
|
|
13456
|
-
|
|
13457
|
-
class SmartFilterEditorService {
|
|
13458
|
-
constructor(service) {
|
|
13459
|
-
this.service = service;
|
|
13460
|
-
this.modelChanged = new Subject();
|
|
13461
|
-
this.submit = new Subject();
|
|
13462
|
-
this.reSubscribeToChange = new Subject();
|
|
13463
|
-
}
|
|
13464
|
-
load() {
|
|
13465
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
13466
|
-
this.model = yield this.service.load(this.config.uuid, this.config.identifier).toPromise();
|
|
13467
|
-
this.modelChanged.next();
|
|
13468
|
-
});
|
|
13469
|
-
}
|
|
13470
|
-
peformWidgetAction(request) {
|
|
13471
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
13472
|
-
this.model = yield this.service
|
|
13473
|
-
.performWidgetAction(this.config.uuid, this.config.identifier, request)
|
|
13474
|
-
.toPromise();
|
|
13475
|
-
this.modelChanged.next();
|
|
13476
|
-
});
|
|
13477
|
-
}
|
|
13478
|
-
getModel() {
|
|
13479
|
-
return this.model;
|
|
13480
|
-
}
|
|
13481
|
-
performUiActionRequest(uiActionRequest, widgetId, nodeId) {
|
|
13482
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
13483
|
-
yield this.peformWidgetAction(uiActionRequest);
|
|
13484
|
-
});
|
|
13485
|
-
}
|
|
13486
|
-
handleSpecificDemandsAsynchronously(uiAction, uiActionRequest) {
|
|
13487
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
13488
|
-
return {
|
|
13489
|
-
shouldPerformAction: true,
|
|
13490
|
-
uiActionRequest: uiActionRequest,
|
|
13491
|
-
};
|
|
13492
|
-
});
|
|
13493
|
-
}
|
|
13494
|
-
getAdditionalParams(uiAction) {
|
|
13495
|
-
throw new Error('Method not implemented.');
|
|
13496
|
-
}
|
|
13497
|
-
}
|
|
13498
|
-
SmartFilterEditorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterEditorService, deps: [{ token: FilterService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
13499
|
-
SmartFilterEditorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterEditorService });
|
|
13500
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterEditorService, decorators: [{
|
|
13501
|
-
type: Injectable
|
|
13502
|
-
}], ctorParameters: function () { return [{ type: FilterService }]; } });
|
|
13503
|
-
|
|
13504
|
-
class SmartFilterParamComponent {
|
|
13505
|
-
constructor(service) {
|
|
13506
|
-
this.service = service;
|
|
13507
|
-
}
|
|
13508
|
-
ngOnInit() { }
|
|
13509
|
-
onItemClick(item) {
|
|
13510
|
-
this.data.serviceToUse.peformWidgetAction({
|
|
13511
|
-
code: 'ADD_FILTER_EXPRESSION',
|
|
13512
|
-
params: {
|
|
13513
|
-
model: item,
|
|
13514
|
-
},
|
|
13515
|
-
});
|
|
13516
|
-
}
|
|
13517
|
-
}
|
|
13518
|
-
SmartFilterParamComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterParamComponent, deps: [{ token: SmartFilterEditorService }], target: i0.ɵɵFactoryTarget.Component });
|
|
13519
|
-
SmartFilterParamComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartFilterParamComponent, selector: "app-target-group-filter-param", inputs: { data: "data" }, ngImport: i0, template: "<div class=\"targetGroupFilterParamContainer\">\r\n <div\r\n class=\"targetGroupFilterItem\"\r\n *ngFor=\"let data of data?.group\"\r\n (click)=\"onItemClick(data)\"\r\n >\r\n <smart-icon icon=\"Ic24_Chevron_Right\" color=\"gray\"></smart-icon>\r\n <div class=\"mat-caption\">\r\n {{ data.label }}\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".targetGroupFilterParamContainer{display:flex;flex-direction:column;gap:.25rem}.targetGroupFilterItem{padding:.75rem;border-radius:.25rem;display:flex;flex-direction:row;gap:.5rem;cursor:pointer}.targetGroupFilterItem .mat-caption{margin:auto 0}\n"], components: [{ type: SmartIconComponent, selector: "smart-icon", inputs: ["icon", "color"] }], directives: [{ type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
13520
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterParamComponent, decorators: [{
|
|
13521
|
-
type: Component,
|
|
13522
|
-
args: [{ selector: 'app-target-group-filter-param', template: "<div class=\"targetGroupFilterParamContainer\">\r\n <div\r\n class=\"targetGroupFilterItem\"\r\n *ngFor=\"let data of data?.group\"\r\n (click)=\"onItemClick(data)\"\r\n >\r\n <smart-icon icon=\"Ic24_Chevron_Right\" color=\"gray\"></smart-icon>\r\n <div class=\"mat-caption\">\r\n {{ data.label }}\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".targetGroupFilterParamContainer{display:flex;flex-direction:column;gap:.25rem}.targetGroupFilterItem{padding:.75rem;border-radius:.25rem;display:flex;flex-direction:row;gap:.5rem;cursor:pointer}.targetGroupFilterItem .mat-caption{margin:auto 0}\n"] }]
|
|
13523
|
-
}], ctorParameters: function () { return [{ type: SmartFilterEditorService }]; }, propDecorators: { data: [{
|
|
13524
|
-
type: Input
|
|
13525
|
-
}] } });
|
|
13526
|
-
|
|
13527
|
-
class SmartFilterParamsComponent {
|
|
13528
|
-
// filterComponentRef?: ComponentRef<SmartFilterComponent>;
|
|
13529
|
-
// filter?: SmartFilter;
|
|
13530
|
-
constructor() {
|
|
13531
|
-
this._destroy$ = new Subject();
|
|
13532
|
-
this.expandableSections = [];
|
|
13533
|
-
}
|
|
13534
|
-
ngOnInit() {
|
|
13535
|
-
this.service.modelChanged.pipe(takeUntil(this._destroy$)).subscribe(() => {
|
|
13536
|
-
this.setUp(this.service.model);
|
|
13537
|
-
});
|
|
13538
|
-
this.setUp(this.service.model);
|
|
13539
|
-
}
|
|
13540
|
-
ngOnDestroy() {
|
|
13541
|
-
this._destroy$.next();
|
|
13542
|
-
this._destroy$.complete();
|
|
13543
|
-
}
|
|
13544
|
-
setUp(model) {
|
|
13545
|
-
this.filterBuilder = model.model;
|
|
13546
|
-
// this.constructFilter();
|
|
13547
|
-
this.constructExpandableSections();
|
|
13548
|
-
}
|
|
13549
|
-
constructExpandableSections() {
|
|
13550
|
-
if (this.filterBuilder.groups) {
|
|
13551
|
-
this.expandableSections = this.filterBuilder.groups.map((filterExpressionBuilderGroup) => {
|
|
13552
|
-
return {
|
|
13553
|
-
title: filterExpressionBuilderGroup.label,
|
|
13554
|
-
cssClass: 'filterExpressionBuilderGroup',
|
|
13555
|
-
customComponent: SmartFilterParamComponent,
|
|
13556
|
-
data: {
|
|
13557
|
-
group: filterExpressionBuilderGroup.fields,
|
|
13558
|
-
serviceToUse: this.service,
|
|
13559
|
-
},
|
|
13560
|
-
inputName: 'data',
|
|
13561
|
-
isExpanded: true,
|
|
13562
|
-
};
|
|
13563
|
-
});
|
|
13564
|
-
}
|
|
13565
|
-
// if (this.service.model?.externalFilterGroup) {
|
|
13566
|
-
// this.expandableSectionsFromExcel = {
|
|
13567
|
-
// title: this.service.model.externalFilterGroup.label!,
|
|
13568
|
-
// cssClass: 'filterExpressionBuilderGroup',
|
|
13569
|
-
// customComponent: SmartFilterParamComponent,
|
|
13570
|
-
// data: {
|
|
13571
|
-
// group: this.service.model.externalFilterGroup.fields,
|
|
13572
|
-
// },
|
|
13573
|
-
// inputName: 'data',
|
|
13574
|
-
// isExpanded: true,
|
|
13575
|
-
// };
|
|
13576
|
-
// }
|
|
13577
|
-
}
|
|
13578
|
-
// constructFilter(): void {
|
|
13579
|
-
// if (this.filter && this.filterComponentRef) {
|
|
13580
|
-
// return;
|
|
13581
|
-
// }
|
|
13582
|
-
// // this.filter = {
|
|
13583
|
-
// // data: this.service.model?.groupFilter?.filters! as FilterExpressionField[],
|
|
13584
|
-
// // type: SmartFilterType.Simple,
|
|
13585
|
-
// // showPossibleActions: false,
|
|
13586
|
-
// // };
|
|
13587
|
-
// this.filterVcRef?.clear();
|
|
13588
|
-
// this.filterComponentRef = this.cfService.createComponent(
|
|
13589
|
-
// this.filterVcRef!,
|
|
13590
|
-
// SmartFilterComponent,
|
|
13591
|
-
// new Map<string, any>([['filter', this.filter]])
|
|
13592
|
-
// );
|
|
13593
|
-
// this.filterComponentRef.instance?.service.change
|
|
13594
|
-
// .pipe(takeUntil(this._destroy$))
|
|
13595
|
-
// .subscribe(() => {
|
|
13596
|
-
// let uiAction: UiAction = this.service.model?.filterGroupsAction!;
|
|
13597
|
-
// uiAction.params = {
|
|
13598
|
-
// filter: {
|
|
13599
|
-
// filters: this.filterComponentRef?.instance.service.filter?.data,
|
|
13600
|
-
// },
|
|
13601
|
-
// };
|
|
13602
|
-
// // let uiActionModel: UiActionModel = {
|
|
13603
|
-
// // serviceToUse: this.service,
|
|
13604
|
-
// // uiAction,
|
|
13605
|
-
// // };
|
|
13606
|
-
// // this.uiActionService.uiActionModel = uiActionModel;
|
|
13607
|
-
// // this.uiActionService.execute(uiAction);
|
|
13608
|
-
// });
|
|
13609
|
-
// }
|
|
13610
|
-
addDataSource() {
|
|
13611
|
-
// this.service.addDataSource();
|
|
13612
|
-
}
|
|
13613
|
-
}
|
|
13614
|
-
SmartFilterParamsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterParamsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
13615
|
-
SmartFilterParamsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartFilterParamsComponent, selector: "smart-filter-group-params", inputs: { service: "service" }, viewQueries: [{ propertyName: "filterVcRef", first: true, predicate: ["smartFilter"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<div\r\n class=\"targetGroupFilterParamsContainer\"\r\n *ngIf=\"service.model?.showGroups && !service.model?.readOnly\"\r\n>\r\n <ng-template #smartFilter></ng-template>\r\n <div class=\"dataSource-options\" *ngIf=\"service.model?.extarnalDatabase\">\r\n <div class=\"dataSource-btns\">\r\n <div class=\"dataSource-btn\">K\u00FCls\u0151 adatb\u00E1zis</div>\r\n <div class=\"dataSource-btn dataSource-btn-disabled\">Bels\u0151 adatb\u00E1zis</div>\r\n </div>\r\n <div class=\"dataSource-add-database\">\r\n <div class=\"dataSource-add-database-title\">\r\n <smart-icon icon=\"Ic24_View_Table\" color=\"sucess\"></smart-icon>\r\n Adatb\u00E1zis\r\n </div>\r\n <button title=\"add\" mat-icon-button (click)=\"addDataSource()\">\r\n <smart-icon icon=\"Ic24_Plus_Circle\" color=\"success\"></smart-icon>\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"sections\">\r\n <smart-expandable-section\r\n class=\"excel\"\r\n *ngIf=\"expandableSectionsFromExcel\"\r\n [data]=\"expandableSectionsFromExcel!\"\r\n ></smart-expandable-section>\r\n <smart-expandable-section\r\n [data]=\"data\"\r\n *ngFor=\"let data of expandableSections\"\r\n ></smart-expandable-section>\r\n </div>\r\n</div>\r\n", styles: [".targetGroupFilterParamsContainer{padding:1.5rem;display:flex;flex-direction:column;gap:2.5rem;height:calc(100% - 3rem);overflow:auto;border-right:2px solid var(--primary-dark-color)}.sections{display:flex;flex-direction:column;gap:.25rem}.targetGroupFilterParamsContainer .excel::ng-deep .mat-expansion-panel-body{background-color:var(--success-lighter-color)}.targetGroupFilterParamsContainer .excel::ng-deep .mat-expansion-panel-header.mat-expanded{background-color:var(--success-color)!important}.targetGroupFilterParamsContainer::ng-deep .mat-expansion-panel-body{padding:0 0 0 1rem!important;background-color:var(--light-blue-color)}.targetGroupFilterParamsContainer::ng-deep .mat-expansion-panel-header{background-color:var(--primary-light-color);padding:.75rem;height:auto}.targetGroupFilterParamsContainer::ng-deep .mat-expansion-panel-header-title{color:var(--primary-lighter-color);font-weight:600}.targetGroupFilterParamsContainer::ng-deep .mat-expansion-panel-header.mat-expanded{background-color:var(--accent-color)!important;padding:.75rem;height:auto}.targetGroupFilterParamsContainer::ng-deep .mat-expansion-panel-header.mat-expanded .mat-expansion-panel-header-title{color:#fff}.dataSource-btns{display:flex;flex-direction:row;justify-content:space-around;background-color:var(--success-lighter-color);height:44px;padding:8px 12px;align-items:center;border:1.5px solid var(--success-color);border-left:6px solid var(--success-color);border-radius:4px}.dataSource-btn{display:flex;padding:1rem 2rem;justify-content:center;align-items:center;background-color:var(--success-color);border-radius:4px;cursor:pointer}.dataSource-btn-disabled{background-color:var(--success-lighter-color);cursor:auto}.dataSource-add-database{display:flex;flex-direction:row;justify-content:space-between;background-color:var(--success-lighter-color);padding:8px;border-radius:4px}.dataSource-add-database-title{display:flex;flex-direction:row;gap:1rem;align-items:center}.dataSource-options{display:flex;flex-direction:column;gap:1rem}\n"], components: [{ type: SmartIconComponent, selector: "smart-icon", inputs: ["icon", "color"] }, { 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"] }, { type: ExpandableSectionComponent, selector: "smart-expandable-section", inputs: ["data", "index"] }], directives: [{ type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
13616
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterParamsComponent, decorators: [{
|
|
13617
|
-
type: Component,
|
|
13618
|
-
args: [{ selector: 'smart-filter-group-params', template: "<div\r\n class=\"targetGroupFilterParamsContainer\"\r\n *ngIf=\"service.model?.showGroups && !service.model?.readOnly\"\r\n>\r\n <ng-template #smartFilter></ng-template>\r\n <div class=\"dataSource-options\" *ngIf=\"service.model?.extarnalDatabase\">\r\n <div class=\"dataSource-btns\">\r\n <div class=\"dataSource-btn\">K\u00FCls\u0151 adatb\u00E1zis</div>\r\n <div class=\"dataSource-btn dataSource-btn-disabled\">Bels\u0151 adatb\u00E1zis</div>\r\n </div>\r\n <div class=\"dataSource-add-database\">\r\n <div class=\"dataSource-add-database-title\">\r\n <smart-icon icon=\"Ic24_View_Table\" color=\"sucess\"></smart-icon>\r\n Adatb\u00E1zis\r\n </div>\r\n <button title=\"add\" mat-icon-button (click)=\"addDataSource()\">\r\n <smart-icon icon=\"Ic24_Plus_Circle\" color=\"success\"></smart-icon>\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"sections\">\r\n <smart-expandable-section\r\n class=\"excel\"\r\n *ngIf=\"expandableSectionsFromExcel\"\r\n [data]=\"expandableSectionsFromExcel!\"\r\n ></smart-expandable-section>\r\n <smart-expandable-section\r\n [data]=\"data\"\r\n *ngFor=\"let data of expandableSections\"\r\n ></smart-expandable-section>\r\n </div>\r\n</div>\r\n", styles: [".targetGroupFilterParamsContainer{padding:1.5rem;display:flex;flex-direction:column;gap:2.5rem;height:calc(100% - 3rem);overflow:auto;border-right:2px solid var(--primary-dark-color)}.sections{display:flex;flex-direction:column;gap:.25rem}.targetGroupFilterParamsContainer .excel::ng-deep .mat-expansion-panel-body{background-color:var(--success-lighter-color)}.targetGroupFilterParamsContainer .excel::ng-deep .mat-expansion-panel-header.mat-expanded{background-color:var(--success-color)!important}.targetGroupFilterParamsContainer::ng-deep .mat-expansion-panel-body{padding:0 0 0 1rem!important;background-color:var(--light-blue-color)}.targetGroupFilterParamsContainer::ng-deep .mat-expansion-panel-header{background-color:var(--primary-light-color);padding:.75rem;height:auto}.targetGroupFilterParamsContainer::ng-deep .mat-expansion-panel-header-title{color:var(--primary-lighter-color);font-weight:600}.targetGroupFilterParamsContainer::ng-deep .mat-expansion-panel-header.mat-expanded{background-color:var(--accent-color)!important;padding:.75rem;height:auto}.targetGroupFilterParamsContainer::ng-deep .mat-expansion-panel-header.mat-expanded .mat-expansion-panel-header-title{color:#fff}.dataSource-btns{display:flex;flex-direction:row;justify-content:space-around;background-color:var(--success-lighter-color);height:44px;padding:8px 12px;align-items:center;border:1.5px solid var(--success-color);border-left:6px solid var(--success-color);border-radius:4px}.dataSource-btn{display:flex;padding:1rem 2rem;justify-content:center;align-items:center;background-color:var(--success-color);border-radius:4px;cursor:pointer}.dataSource-btn-disabled{background-color:var(--success-lighter-color);cursor:auto}.dataSource-add-database{display:flex;flex-direction:row;justify-content:space-between;background-color:var(--success-lighter-color);padding:8px;border-radius:4px}.dataSource-add-database-title{display:flex;flex-direction:row;gap:1rem;align-items:center}.dataSource-options{display:flex;flex-direction:column;gap:1rem}\n"] }]
|
|
13619
|
-
}], ctorParameters: function () { return []; }, propDecorators: { service: [{
|
|
13620
|
-
type: Input
|
|
13621
|
-
}], filterVcRef: [{
|
|
13622
|
-
type: ViewChild,
|
|
13623
|
-
args: ['smartFilter', { read: ViewContainerRef }]
|
|
13624
|
-
}] } });
|
|
13625
|
-
|
|
13626
|
-
var FilterExpressionBuilderUiModel;
|
|
13627
|
-
(function (FilterExpressionBuilderUiModel) {
|
|
13628
|
-
FilterExpressionBuilderUiModel.TypeEnum = {
|
|
13629
|
-
Simple: 'SIMPLE',
|
|
13630
|
-
Complex: 'COMPLEX'
|
|
13631
|
-
};
|
|
13632
|
-
})(FilterExpressionBuilderUiModel || (FilterExpressionBuilderUiModel = {}));
|
|
13633
|
-
|
|
13634
|
-
var FilterExpressionBuilderApiActions;
|
|
13635
|
-
(function (FilterExpressionBuilderApiActions) {
|
|
13636
|
-
FilterExpressionBuilderApiActions["OPEN_FILTER_GROUPS"] = "OPEN_FILTER_GROUPS";
|
|
13637
|
-
FilterExpressionBuilderApiActions["CLOSE_FILTER_GROUPS"] = "CLOSE_FILTER_GROUPS";
|
|
13638
|
-
FilterExpressionBuilderApiActions["ADD_BRACKET"] = "ADD_BRACKET";
|
|
13639
|
-
FilterExpressionBuilderApiActions["ADD_FILTER_EXPRESSION"] = "ADD_FILTER_EXPRESSION";
|
|
13640
|
-
FilterExpressionBuilderApiActions["REMOVE_FILTER_EXPRESSION"] = "REMOVE_FILTER_EXPRESSION";
|
|
13641
|
-
FilterExpressionBuilderApiActions["REDO"] = "REDO";
|
|
13642
|
-
FilterExpressionBuilderApiActions["FILTER_GROUPS"] = "AFILTER_GROUPS";
|
|
13643
|
-
FilterExpressionBuilderApiActions["SELECT_FIELD"] = "SELECT_FIELD";
|
|
13644
|
-
FilterExpressionBuilderApiActions["UPDATE_FILTER_EXPRESSION"] = "UPDATE_FILTER_EXPRESSION";
|
|
13645
|
-
FilterExpressionBuilderApiActions["SAVE_EXPRESSION_DATA"] = "SAVE_EXPRESSION_DATA";
|
|
13646
|
-
FilterExpressionBuilderApiActions["SAVE_EXPRESSION_FIELD_LIST"] = "SAVE_EXPRESSION_FIELD_LIST";
|
|
13647
|
-
})(FilterExpressionBuilderApiActions || (FilterExpressionBuilderApiActions = {}));
|
|
13648
|
-
|
|
13649
|
-
class SmartFilterExpressionItemComponent {
|
|
13650
|
-
constructor(service) {
|
|
13651
|
-
this.service = service;
|
|
13652
|
-
this.isSelected = false;
|
|
13653
|
-
}
|
|
13654
|
-
ngOnInit() {
|
|
13655
|
-
var _a;
|
|
13656
|
-
this.isSelected =
|
|
13657
|
-
JSON.stringify((_a = this.service.model) === null || _a === void 0 ? void 0 : _a.selectedField) === JSON.stringify(this.item);
|
|
13658
|
-
}
|
|
13659
|
-
setOperatorTo(event, operationType) {
|
|
13660
|
-
var _a;
|
|
13661
|
-
event === null || event === void 0 ? void 0 : event.stopPropagation();
|
|
13662
|
-
if (!((_a = this.service.model) === null || _a === void 0 ? void 0 : _a.readOnly)) {
|
|
13663
|
-
this.item.expressionData.boolOperator = operationType;
|
|
13664
|
-
this.service.peformWidgetAction({
|
|
13665
|
-
code: 'UPDATE_FILTER_EXPRESSION',
|
|
13666
|
-
params: {
|
|
13667
|
-
model: this.item,
|
|
13668
|
-
},
|
|
13669
|
-
});
|
|
13670
|
-
}
|
|
13671
|
-
}
|
|
13672
|
-
select(event, item) {
|
|
13673
|
-
var _a;
|
|
13674
|
-
event === null || event === void 0 ? void 0 : event.stopPropagation();
|
|
13675
|
-
if (!((_a = this.service.model) === null || _a === void 0 ? void 0 : _a.readOnly)) {
|
|
13676
|
-
if (!this.isSelected) {
|
|
13677
|
-
this.service.peformWidgetAction({
|
|
13678
|
-
code: 'SELECT_FIELD',
|
|
13679
|
-
params: {
|
|
13680
|
-
model: this.item,
|
|
13681
|
-
},
|
|
13682
|
-
});
|
|
13683
|
-
}
|
|
13684
|
-
else {
|
|
13685
|
-
this.service.peformWidgetAction({
|
|
13686
|
-
code: 'SELECT_FIELD',
|
|
13687
|
-
params: {
|
|
13688
|
-
model: this.item,
|
|
13689
|
-
},
|
|
13690
|
-
});
|
|
13691
|
-
}
|
|
13692
|
-
}
|
|
13693
|
-
}
|
|
13694
|
-
}
|
|
13695
|
-
SmartFilterExpressionItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterExpressionItemComponent, deps: [{ token: SmartFilterEditorService }], target: i0.ɵɵFactoryTarget.Component });
|
|
13696
|
-
SmartFilterExpressionItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartFilterExpressionItemComponent, selector: "app-expression-item", inputs: { item: "item", hasNext: "hasNext" }, ngImport: i0, template: "<div class=\"expressionItemContainer\">\r\n <div\r\n class=\"expressionItemInnerContainer\"\r\n [ngClass]=\"\r\n item.expressionData?.currentOperation === 'EXPRESSION'\r\n ? isSelected\r\n ? 'selectedExpressionContainer'\r\n : 'expressionContainer'\r\n : ''\r\n \"\r\n (click)=\"select($event, item)\"\r\n >\r\n <div\r\n *ngIf=\"\r\n item.expressionData?.currentOperation === 'EXPRESSION';\r\n then expression;\r\n else simpleItem\r\n \"\r\n ></div>\r\n <ng-template #expression>\r\n <div class=\"expressionItemBubble expression\">[</div>\r\n <app-expression-item\r\n [item]=\"subItem\"\r\n [hasNext]=\"i < (item.subFieldList?.filters)!.length - 1\"\r\n *ngFor=\"let subItem of item.subFieldList?.filters; let i = index\"\r\n ></app-expression-item>\r\n <div class=\"expressionItemBubble expression\">]</div>\r\n </ng-template>\r\n <ng-template #simpleItem>\r\n <div\r\n class=\"expressionItemBubble simpleItem\"\r\n [ngClass]=\"isSelected ? 'selectedSimpleItem' : ''\"\r\n >\r\n {{ item.label\r\n }}{{ item.expressionData?.operand2?.valueAsString ? \": \" : \"\" }}\r\n <b>\r\n {{ item.expressionData?.operand2?.valueAsString }}\r\n </b>\r\n </div>\r\n </ng-template>\r\n </div>\r\n <div *ngIf=\"hasNext\" class=\"relationItemBubble\">\r\n <button\r\n mat-button\r\n (click)=\"setOperatorTo($event, 'AND')\"\r\n [ngClass]=\"\r\n item.expressionData?.boolOperator === 'AND' ? 'mat-raised-button' : ''\r\n \"\r\n color=\"black\"\r\n >\r\n \u00C9S\r\n </button>\r\n <button\r\n mat-button\r\n (click)=\"setOperatorTo($event, 'OR')\"\r\n [ngClass]=\"\r\n item.expressionData?.boolOperator === 'OR' ? 'mat-raised-button' : ''\r\n \"\r\n color=\"black\"\r\n >\r\n VAGY\r\n </button>\r\n </div>\r\n <!-- <button mat-mini-fab color=\"gray\">\r\n\t\t<smart-icon icon=\"X\" color=\"gray\"></smart-icon>\r\n\t</button> -->\r\n</div>\r\n", styles: [".expressionItemContainer{display:flex;flex-direction:row;gap:.75rem}.expressionItemInnerContainer{display:flex;flex-direction:row;grid-area:.75rem;padding:.25rem;border-radius:.25rem}.expressionContainer{border:1px dashed var(--primary-lighter-gray-color);cursor:pointer}.selectedExpressionContainer{border:2px dashed var(--primary-darker-color)}.expressionItemBubble,.relationItemBubble{display:flex;flex-direction:row;border-radius:1.5rem}.expressionItemBubble{padding:.75rem}.expression{background-color:var(--inner-container);font-weight:600;margin:auto 0}.simpleItem{background-color:#c6ddff;cursor:pointer}.selectedSimpleItem{border:2px solid var(--primary-color)}.relationItemBubble{border:1px solid #cdcdcd;padding:.25rem}.relationItemBubble .mat-button{border-radius:1.5rem;height:100%;margin:auto 0}\n"], components: [{ type: SmartFilterExpressionItemComponent, selector: "app-expression-item", inputs: ["item", "hasNext"] }, { 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.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
13697
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterExpressionItemComponent, decorators: [{
|
|
13698
|
-
type: Component,
|
|
13699
|
-
args: [{ selector: 'app-expression-item', template: "<div class=\"expressionItemContainer\">\r\n <div\r\n class=\"expressionItemInnerContainer\"\r\n [ngClass]=\"\r\n item.expressionData?.currentOperation === 'EXPRESSION'\r\n ? isSelected\r\n ? 'selectedExpressionContainer'\r\n : 'expressionContainer'\r\n : ''\r\n \"\r\n (click)=\"select($event, item)\"\r\n >\r\n <div\r\n *ngIf=\"\r\n item.expressionData?.currentOperation === 'EXPRESSION';\r\n then expression;\r\n else simpleItem\r\n \"\r\n ></div>\r\n <ng-template #expression>\r\n <div class=\"expressionItemBubble expression\">[</div>\r\n <app-expression-item\r\n [item]=\"subItem\"\r\n [hasNext]=\"i < (item.subFieldList?.filters)!.length - 1\"\r\n *ngFor=\"let subItem of item.subFieldList?.filters; let i = index\"\r\n ></app-expression-item>\r\n <div class=\"expressionItemBubble expression\">]</div>\r\n </ng-template>\r\n <ng-template #simpleItem>\r\n <div\r\n class=\"expressionItemBubble simpleItem\"\r\n [ngClass]=\"isSelected ? 'selectedSimpleItem' : ''\"\r\n >\r\n {{ item.label\r\n }}{{ item.expressionData?.operand2?.valueAsString ? \": \" : \"\" }}\r\n <b>\r\n {{ item.expressionData?.operand2?.valueAsString }}\r\n </b>\r\n </div>\r\n </ng-template>\r\n </div>\r\n <div *ngIf=\"hasNext\" class=\"relationItemBubble\">\r\n <button\r\n mat-button\r\n (click)=\"setOperatorTo($event, 'AND')\"\r\n [ngClass]=\"\r\n item.expressionData?.boolOperator === 'AND' ? 'mat-raised-button' : ''\r\n \"\r\n color=\"black\"\r\n >\r\n \u00C9S\r\n </button>\r\n <button\r\n mat-button\r\n (click)=\"setOperatorTo($event, 'OR')\"\r\n [ngClass]=\"\r\n item.expressionData?.boolOperator === 'OR' ? 'mat-raised-button' : ''\r\n \"\r\n color=\"black\"\r\n >\r\n VAGY\r\n </button>\r\n </div>\r\n <!-- <button mat-mini-fab color=\"gray\">\r\n\t\t<smart-icon icon=\"X\" color=\"gray\"></smart-icon>\r\n\t</button> -->\r\n</div>\r\n", styles: [".expressionItemContainer{display:flex;flex-direction:row;gap:.75rem}.expressionItemInnerContainer{display:flex;flex-direction:row;grid-area:.75rem;padding:.25rem;border-radius:.25rem}.expressionContainer{border:1px dashed var(--primary-lighter-gray-color);cursor:pointer}.selectedExpressionContainer{border:2px dashed var(--primary-darker-color)}.expressionItemBubble,.relationItemBubble{display:flex;flex-direction:row;border-radius:1.5rem}.expressionItemBubble{padding:.75rem}.expression{background-color:var(--inner-container);font-weight:600;margin:auto 0}.simpleItem{background-color:#c6ddff;cursor:pointer}.selectedSimpleItem{border:2px solid var(--primary-color)}.relationItemBubble{border:1px solid #cdcdcd;padding:.25rem}.relationItemBubble .mat-button{border-radius:1.5rem;height:100%;margin:auto 0}\n"] }]
|
|
13700
|
-
}], ctorParameters: function () { return [{ type: SmartFilterEditorService }]; }, propDecorators: { item: [{
|
|
13701
|
-
type: Input
|
|
13702
|
-
}], hasNext: [{
|
|
13703
|
-
type: Input
|
|
13704
|
-
}] } });
|
|
13705
|
-
|
|
13706
|
-
class SmartFilterExpressionItemsComponent {
|
|
13707
|
-
constructor(service) {
|
|
13708
|
-
var _a;
|
|
13709
|
-
this.service = service;
|
|
13710
|
-
this._destroy$ = new Subject();
|
|
13711
|
-
this.isSelected = false;
|
|
13712
|
-
this.service.modelChanged.subscribe(() => {
|
|
13713
|
-
var _a;
|
|
13714
|
-
console.log(this.service.model);
|
|
13715
|
-
this.isSelected = ((_a = this.service.model) === null || _a === void 0 ? void 0 : _a.selectedField) === null;
|
|
13387
|
+
subsrcibeSimpleFormChildrenEvents() {
|
|
13388
|
+
var _a, _b, _c, _d;
|
|
13389
|
+
(_b = (_a = this.simpleFilterFormChildren) === null || _a === void 0 ? void 0 : _a.first.onBlurSubject) === null || _b === void 0 ? void 0 : _b.pipe(takeUntil(this._destroy$)).subscribe(() => {
|
|
13390
|
+
this.saveFilter();
|
|
13391
|
+
});
|
|
13392
|
+
(_d = (_c = this.simpleFilterFormChildren) === null || _c === void 0 ? void 0 : _c.first.sophisticatedValueChange) === null || _d === void 0 ? void 0 : _d.pipe(takeUntil(this._destroy$)).subscribe((change) => {
|
|
13393
|
+
if (change.kind === 'selection') {
|
|
13394
|
+
this.saveFilter();
|
|
13395
|
+
}
|
|
13716
13396
|
});
|
|
13717
|
-
this.isSelected = ((_a = this.service.model) === null || _a === void 0 ? void 0 : _a.selectedField) === null;
|
|
13718
|
-
}
|
|
13719
|
-
ngOnChanges(changes) {
|
|
13720
|
-
console.log(changes);
|
|
13721
|
-
}
|
|
13722
|
-
ngOnInit() { }
|
|
13723
|
-
ngOnDestroy() {
|
|
13724
|
-
this._destroy$.next();
|
|
13725
|
-
this._destroy$.complete();
|
|
13726
|
-
}
|
|
13727
|
-
select() {
|
|
13728
|
-
// this.service.selectFilterExpressionField(undefined);
|
|
13729
|
-
}
|
|
13730
|
-
drop(event) {
|
|
13731
|
-
moveItemInArray(this.items, event.previousIndex, event.currentIndex);
|
|
13732
|
-
}
|
|
13733
|
-
}
|
|
13734
|
-
SmartFilterExpressionItemsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterExpressionItemsComponent, deps: [{ token: SmartFilterEditorService }], target: i0.ɵɵFactoryTarget.Component });
|
|
13735
|
-
SmartFilterExpressionItemsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartFilterExpressionItemsComponent, selector: "app-expression-items", inputs: { items: "items" }, usesOnChanges: true, ngImport: i0, template: "<div\r\n cdkDropList\r\n cdkDropListOrientation=\"horizontal\"\r\n (cdkDropListDropped)=\"drop($event)\"\r\n class=\"expressionsContainer example-list\"\r\n [ngClass]=\"isSelected ? 'selected' : ''\"\r\n>\r\n <div cdkDrag class=\"expressionItem\" *ngFor=\"let item of items; let i = index\">\r\n <app-expression-item\r\n [item]=\"item\"\r\n [hasNext]=\"i < items.length - 1\"\r\n ></app-expression-item>\r\n </div>\r\n</div>\r\n", styles: [".expressionsContainer{display:flex;flex-direction:row;flex-wrap:wrap;gap:.75rem;border:1px dashed var(--primary-lighter-gray-color);padding:.25rem;border-radius:.25rem}.selected{border:2px dashed var(--primary-darker-color)}.expressionItem{margin:auto 0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.example-box:last-child{border:none}.example-list.cdk-drop-list-dragging .example-box:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.example-custom-placeholder{background:#ccc;border:dotted 3px #999;min-height:60px;transition:transform .25s cubic-bezier(0,0,.2,1)}\n"], components: [{ type: SmartFilterExpressionItemComponent, selector: "app-expression-item", inputs: ["item", "hasNext"] }], directives: [{ type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
13736
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterExpressionItemsComponent, decorators: [{
|
|
13737
|
-
type: Component,
|
|
13738
|
-
args: [{ selector: 'app-expression-items', template: "<div\r\n cdkDropList\r\n cdkDropListOrientation=\"horizontal\"\r\n (cdkDropListDropped)=\"drop($event)\"\r\n class=\"expressionsContainer example-list\"\r\n [ngClass]=\"isSelected ? 'selected' : ''\"\r\n>\r\n <div cdkDrag class=\"expressionItem\" *ngFor=\"let item of items; let i = index\">\r\n <app-expression-item\r\n [item]=\"item\"\r\n [hasNext]=\"i < items.length - 1\"\r\n ></app-expression-item>\r\n </div>\r\n</div>\r\n", styles: [".expressionsContainer{display:flex;flex-direction:row;flex-wrap:wrap;gap:.75rem;border:1px dashed var(--primary-lighter-gray-color);padding:.25rem;border-radius:.25rem}.selected{border:2px dashed var(--primary-darker-color)}.expressionItem{margin:auto 0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.example-box:last-child{border:none}.example-list.cdk-drop-list-dragging .example-box:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.example-custom-placeholder{background:#ccc;border:dotted 3px #999;min-height:60px;transition:transform .25s cubic-bezier(0,0,.2,1)}\n"] }]
|
|
13739
|
-
}], ctorParameters: function () { return [{ type: SmartFilterEditorService }]; }, propDecorators: { items: [{
|
|
13740
|
-
type: Input
|
|
13741
|
-
}] } });
|
|
13742
|
-
|
|
13743
|
-
class SmartFilterEditorContentComponent {
|
|
13744
|
-
constructor(layoutService) {
|
|
13745
|
-
this.layoutService = layoutService;
|
|
13746
|
-
this._destroy$ = new Subject();
|
|
13747
|
-
this.uiActionModels = [];
|
|
13748
|
-
this.expressionUiActionModels = [];
|
|
13749
|
-
this.type = FilterExpressionBuilderUiModel.TypeEnum;
|
|
13750
13397
|
}
|
|
13751
|
-
|
|
13398
|
+
subscribeEditorFormChildrenEvents() {
|
|
13752
13399
|
var _a, _b, _c, _d;
|
|
13753
|
-
|
|
13754
|
-
|
|
13755
|
-
|
|
13756
|
-
|
|
13757
|
-
(
|
|
13758
|
-
|
|
13759
|
-
|
|
13760
|
-
|
|
13761
|
-
});
|
|
13762
|
-
}
|
|
13763
|
-
else {
|
|
13764
|
-
(_d = this.simpleFilterFormChildren) === null || _d === void 0 ? void 0 : _d.changes.subscribe(() => {
|
|
13765
|
-
var _a, _b;
|
|
13766
|
-
(_a = this.simpleFilterFormChildren.first.onBlurSubject) === null || _a === void 0 ? void 0 : _a.pipe(takeUntil(this._destroy$)).subscribe(() => {
|
|
13767
|
-
this.saveFilter();
|
|
13768
|
-
});
|
|
13769
|
-
(_b = this.simpleFilterFormChildren.first.sophisticatedValueChange) === null || _b === void 0 ? void 0 : _b.pipe(takeUntil(this._destroy$)).subscribe((change) => {
|
|
13770
|
-
if (change.kind === 'selection') {
|
|
13771
|
-
this.saveFilter();
|
|
13772
|
-
}
|
|
13773
|
-
});
|
|
13774
|
-
});
|
|
13775
|
-
}
|
|
13400
|
+
(_b = (_a = this.formChildren) === null || _a === void 0 ? void 0 : _a.first.onBlurSubject) === null || _b === void 0 ? void 0 : _b.pipe(takeUntil(this._destroy$)).subscribe(() => {
|
|
13401
|
+
this.save();
|
|
13402
|
+
});
|
|
13403
|
+
(_d = (_c = this.formChildren) === null || _c === void 0 ? void 0 : _c.first.sophisticatedValueChange) === null || _d === void 0 ? void 0 : _d.pipe(takeUntil(this._destroy$)).subscribe((change) => {
|
|
13404
|
+
if (change.key === 'expressionData.currentOperation') {
|
|
13405
|
+
this.save();
|
|
13406
|
+
}
|
|
13407
|
+
});
|
|
13776
13408
|
}
|
|
13409
|
+
// smartFilterChangeSubscription?: Subscription;
|
|
13410
|
+
// smartFilterSophisticatedChangeSubscription?: Subscription;
|
|
13411
|
+
// smartformChangeSubscription?: Subscription;
|
|
13412
|
+
// smartformSophisticatedChangeSubscription?: Subscription;
|
|
13777
13413
|
ngOnInit() {
|
|
13778
13414
|
this.service.modelChanged.pipe(takeUntil(this._destroy$)).subscribe(() => this.setUp());
|
|
13779
13415
|
this.service.load();
|
|
@@ -13788,42 +13424,45 @@ class SmartFilterEditorContentComponent {
|
|
|
13788
13424
|
let key;
|
|
13789
13425
|
let model = {};
|
|
13790
13426
|
(_c = (_b = (_a = this.service.model) === null || _a === void 0 ? void 0 : _a.model) === null || _b === void 0 ? void 0 : _b.workplaceList) === null || _c === void 0 ? void 0 : _c.filters.forEach((filterExpressionField, index) => {
|
|
13791
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
13427
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
|
13792
13428
|
model[index] = filterExpressionField;
|
|
13793
13429
|
if (filterExpressionField.widgetType === 'SELECT_MULTIPLE') {
|
|
13794
13430
|
key = index + '.expressionData.operand2.selectedValues';
|
|
13795
|
-
widgets.push(this.constructFormWidget(key, filterExpressionField.label2, (_a = filterExpressionField.widgetType) !== null && _a !== void 0 ? _a : FilterExpressionFieldWidgetType.TextField, filterExpressionField.possibleValues));
|
|
13431
|
+
widgets.push(this.constructFormWidget(key, filterExpressionField.label2, (_a = filterExpressionField.widgetType) !== null && _a !== void 0 ? _a : FilterExpressionFieldWidgetType.TextField, filterExpressionField.possibleValues, (_d = (_c = (_b = filterExpressionField.expressionData) === null || _b === void 0 ? void 0 : _b.operand2) === null || _c === void 0 ? void 0 : _c.valueAsString) !== null && _d !== void 0 ? _d : ''));
|
|
13796
13432
|
return;
|
|
13797
13433
|
}
|
|
13798
|
-
if (((
|
|
13434
|
+
if (((_e = filterExpressionField.expressionData) === null || _e === void 0 ? void 0 : _e.currentOperation) === 'BETWEEN') {
|
|
13799
13435
|
key = index + '.expressionData.operand2.valueAsString';
|
|
13800
|
-
widgets.push(this.constructFormWidget(key, filterExpressionField.label2, (
|
|
13436
|
+
widgets.push(this.constructFormWidget(key, filterExpressionField.label2, (_f = filterExpressionField.widgetType) !== null && _f !== void 0 ? _f : FilterExpressionFieldWidgetType.TextField, filterExpressionField.possibleValues, (_j = (_h = (_g = filterExpressionField.expressionData) === null || _g === void 0 ? void 0 : _g.operand2) === null || _h === void 0 ? void 0 : _h.valueAsString) !== null && _j !== void 0 ? _j : ''));
|
|
13801
13437
|
key = index + '.expressionData.operand3.valueAsString';
|
|
13802
|
-
widgets.push(this.constructFormWidget(key, filterExpressionField.label2, (
|
|
13438
|
+
widgets.push(this.constructFormWidget(key, filterExpressionField.label2, (_k = filterExpressionField.widgetType) !== null && _k !== void 0 ? _k : FilterExpressionFieldWidgetType.TextField, filterExpressionField.possibleValues, (_o = (_m = (_l = filterExpressionField.expressionData) === null || _l === void 0 ? void 0 : _l.operand3) === null || _m === void 0 ? void 0 : _m.valueAsString) !== null && _o !== void 0 ? _o : ''));
|
|
13803
13439
|
return;
|
|
13804
13440
|
}
|
|
13805
|
-
if ((
|
|
13441
|
+
if ((_p = filterExpressionField.expressionData) === null || _p === void 0 ? void 0 : _p.operand2) {
|
|
13806
13442
|
if (key !== index + '.expressionData.operand2.selectedValues') {
|
|
13807
13443
|
key = index + '.expressionData.operand2.valueAsString';
|
|
13808
13444
|
}
|
|
13809
|
-
widgets.push(this.constructFormWidget(key, filterExpressionField.label2, (
|
|
13445
|
+
widgets.push(this.constructFormWidget(key, filterExpressionField.label2, (_q = filterExpressionField.widgetType) !== null && _q !== void 0 ? _q : FilterExpressionFieldWidgetType.TextField, filterExpressionField.possibleValues, (_t = (_s = (_r = filterExpressionField.expressionData) === null || _r === void 0 ? void 0 : _r.operand2) === null || _s === void 0 ? void 0 : _s.valueAsString) !== null && _t !== void 0 ? _t : ''));
|
|
13810
13446
|
return;
|
|
13811
13447
|
}
|
|
13812
|
-
if ((
|
|
13448
|
+
if ((_u = filterExpressionField === null || filterExpressionField === void 0 ? void 0 : filterExpressionField.expressionData) === null || _u === void 0 ? void 0 : _u.operand3) {
|
|
13813
13449
|
if (key !== index + '.selectedValues') {
|
|
13814
13450
|
key = index + '.expressionData.operand3.valueAsString';
|
|
13815
13451
|
}
|
|
13816
|
-
widgets.push(this.constructFormWidget(key, filterExpressionField.label3, (
|
|
13452
|
+
widgets.push(this.constructFormWidget(key, filterExpressionField.label3, (_v = filterExpressionField.widgetType) !== null && _v !== void 0 ? _v : FilterExpressionFieldWidgetType.TextField, filterExpressionField.possibleValues, (_y = (_x = (_w = filterExpressionField.expressionData) === null || _w === void 0 ? void 0 : _w.operand3) === null || _x === void 0 ? void 0 : _x.valueAsString) !== null && _y !== void 0 ? _y : ''));
|
|
13817
13453
|
return;
|
|
13818
13454
|
}
|
|
13819
13455
|
});
|
|
13820
|
-
|
|
13456
|
+
let smartForm = {
|
|
13821
13457
|
direction: SmartFormWidgetDirection.ROW,
|
|
13822
13458
|
componentModel: { data: model },
|
|
13823
13459
|
useOnValueChangeEvent: true,
|
|
13824
13460
|
useOnBlurEvent: true,
|
|
13825
13461
|
widgets,
|
|
13826
13462
|
};
|
|
13463
|
+
if (!deepEqual(smartForm, this.simpleFilterForm)) {
|
|
13464
|
+
this.simpleFilterForm = smartForm;
|
|
13465
|
+
}
|
|
13827
13466
|
}
|
|
13828
13467
|
extractFilterFieldFromFormModel() {
|
|
13829
13468
|
var _a, _b;
|
|
@@ -13878,9 +13517,6 @@ class SmartFilterEditorContentComponent {
|
|
|
13878
13517
|
}
|
|
13879
13518
|
constructForm() {
|
|
13880
13519
|
var _a, _b, _c, _d;
|
|
13881
|
-
if (this.smartForm) {
|
|
13882
|
-
return;
|
|
13883
|
-
}
|
|
13884
13520
|
let generatedWidgets = this.layoutService.render({
|
|
13885
13521
|
layoutDefinitions: (_c = (_b = (_a = this.service.model) === null || _a === void 0 ? void 0 : _a.selectedFieldEditor) === null || _b === void 0 ? void 0 : _b.layoutDef) === null || _c === void 0 ? void 0 : _c.widgets,
|
|
13886
13522
|
});
|
|
@@ -13891,24 +13527,6 @@ class SmartFilterEditorContentComponent {
|
|
|
13891
13527
|
componentModel: { data: (_d = this.service.model) === null || _d === void 0 ? void 0 : _d.selectedField },
|
|
13892
13528
|
widgets: generatedWidgets,
|
|
13893
13529
|
};
|
|
13894
|
-
if (this.smartformChangeSubscription) {
|
|
13895
|
-
this.smartformChangeSubscription.unsubscribe();
|
|
13896
|
-
}
|
|
13897
|
-
// this.smartformChangeSubscription = this.formChild?.onBlurSubject
|
|
13898
|
-
// ?.pipe(takeUntil(this._destroy$))
|
|
13899
|
-
// .subscribe(() => {
|
|
13900
|
-
// this.save();
|
|
13901
|
-
// });
|
|
13902
|
-
// if (this.smartformSophisticatedChangeSubscription) {
|
|
13903
|
-
// this.smartformSophisticatedChangeSubscription.unsubscribe();
|
|
13904
|
-
// }
|
|
13905
|
-
// this.smartformSophisticatedChangeSubscription = this.formChild?.sophisticatedValueChange
|
|
13906
|
-
// ?.pipe(takeUntil(this._destroy$))
|
|
13907
|
-
// .subscribe((change: SophisticatedValueChange) => {
|
|
13908
|
-
// if (change.key === 'expressionData.currentOperation') {
|
|
13909
|
-
// this.save();
|
|
13910
|
-
// }
|
|
13911
|
-
// });
|
|
13912
13530
|
}
|
|
13913
13531
|
save() {
|
|
13914
13532
|
var _a, _b, _c;
|
|
@@ -13929,15 +13547,6 @@ class SmartFilterEditorContentComponent {
|
|
|
13929
13547
|
},
|
|
13930
13548
|
});
|
|
13931
13549
|
}
|
|
13932
|
-
getFilteredUiActionModels(filterPredicate) {
|
|
13933
|
-
// return this.service.model!.possibleActions!.filter(filterPredicate).map((uiAction: UiAction) => {
|
|
13934
|
-
// return {
|
|
13935
|
-
// serviceToUse: this.service,
|
|
13936
|
-
// uiAction,
|
|
13937
|
-
// };
|
|
13938
|
-
// });
|
|
13939
|
-
return [];
|
|
13940
|
-
}
|
|
13941
13550
|
saveFilter() {
|
|
13942
13551
|
return __awaiter(this, void 0, void 0, function* () {
|
|
13943
13552
|
this.extractFilterFieldFromFormModel();
|
|
@@ -13949,7 +13558,7 @@ class SmartFilterEditorContentComponent {
|
|
|
13949
13558
|
});
|
|
13950
13559
|
});
|
|
13951
13560
|
}
|
|
13952
|
-
constructFormWidget(key, label, widgetType, possibleValues) {
|
|
13561
|
+
constructFormWidget(key, label, widgetType, possibleValues, value) {
|
|
13953
13562
|
let type = widgetType;
|
|
13954
13563
|
if (type === FilterExpressionFieldWidgetType.Date) {
|
|
13955
13564
|
type = SmartFormWidgetType.DATE_PICKER;
|
|
@@ -13958,10 +13567,11 @@ class SmartFilterEditorContentComponent {
|
|
|
13958
13567
|
type = SmartFormWidgetType.DATE_TIME_PICKER;
|
|
13959
13568
|
}
|
|
13960
13569
|
let widget = {
|
|
13570
|
+
error: undefined,
|
|
13961
13571
|
key,
|
|
13962
13572
|
label,
|
|
13963
13573
|
type,
|
|
13964
|
-
value
|
|
13574
|
+
value,
|
|
13965
13575
|
showLabel: true,
|
|
13966
13576
|
valueList: possibleValues.map((value) => {
|
|
13967
13577
|
return {
|
|
@@ -13976,10 +13586,10 @@ class SmartFilterEditorContentComponent {
|
|
|
13976
13586
|
}
|
|
13977
13587
|
}
|
|
13978
13588
|
SmartFilterEditorContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterEditorContentComponent, deps: [{ token: SmartformLayoutDefinitionService }], target: i0.ɵɵFactoryTarget.Component });
|
|
13979
|
-
SmartFilterEditorContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartFilterEditorContentComponent, selector: "smart-filter-expression-editor", inputs: { service: "service" }, viewQueries: [{ propertyName: "formChildren", predicate: ["form"], descendants: true }, { propertyName: "simpleFilterFormChildren", predicate: ["simpleFilterFromChild"], 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 <smartform #simpleFilterFromChild [smartForm]=\"simpleFilterForm\"></smartform>\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-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: SmartformComponent, selector: "smartform", inputs: ["smartForm"] }, { 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"] }] });
|
|
13589
|
+
SmartFilterEditorContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartFilterEditorContentComponent, selector: "smart-filter-expression-editor", inputs: { service: "service" }, viewQueries: [{ propertyName: "formChildren", predicate: ["form"], descendants: true }, { propertyName: "simpleFilterFormChildren", predicate: ["simpleFilterFromChild"], 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 <smartform #simpleFilterFromChild [smartForm]=\"simpleFilterForm\"></smartform>\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 [service]=\"service\"\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-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: 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"] }] });
|
|
13980
13590
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterEditorContentComponent, decorators: [{
|
|
13981
13591
|
type: Component,
|
|
13982
|
-
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 <smartform #simpleFilterFromChild [smartForm]=\"simpleFilterForm\"></smartform>\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-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"] }]
|
|
13592
|
+
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 <smartform #simpleFilterFromChild [smartForm]=\"simpleFilterForm\"></smartform>\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 [service]=\"service\"\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-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"] }]
|
|
13983
13593
|
}], ctorParameters: function () { return [{ type: SmartformLayoutDefinitionService }]; }, propDecorators: { service: [{
|
|
13984
13594
|
type: Input
|
|
13985
13595
|
}], formChildren: [{
|
|
@@ -14184,52 +13794,408 @@ class SmartComponentLayoutUtility {
|
|
|
14184
13794
|
layout.parentComponent = parent;
|
|
14185
13795
|
(_a = layout.components) === null || _a === void 0 ? void 0 : _a.forEach((l) => this.setParent(l, parent));
|
|
14186
13796
|
}
|
|
14187
|
-
static getForms(comp) {
|
|
14188
|
-
let result = [];
|
|
14189
|
-
if (comp.components) {
|
|
14190
|
-
result = comp.components
|
|
14191
|
-
.map((c) => this.getForms(c))
|
|
14192
|
-
.reduce((acc, value) => acc.concat(value), []);
|
|
13797
|
+
static getForms(comp) {
|
|
13798
|
+
let result = [];
|
|
13799
|
+
if (comp.components) {
|
|
13800
|
+
result = comp.components
|
|
13801
|
+
.map((c) => this.getForms(c))
|
|
13802
|
+
.reduce((acc, value) => acc.concat(value), []);
|
|
13803
|
+
}
|
|
13804
|
+
if (comp.smartFormComponent) {
|
|
13805
|
+
result.push(comp.smartFormComponent);
|
|
13806
|
+
}
|
|
13807
|
+
return result;
|
|
13808
|
+
}
|
|
13809
|
+
static getGrids(comp) {
|
|
13810
|
+
let result = [];
|
|
13811
|
+
if (comp.components) {
|
|
13812
|
+
result = comp.components
|
|
13813
|
+
.map((c) => this.getGrids(c))
|
|
13814
|
+
.reduce((acc, value) => acc.concat(value), []);
|
|
13815
|
+
}
|
|
13816
|
+
if (comp.smartGridComponent) {
|
|
13817
|
+
result.push(comp.smartGridComponent);
|
|
13818
|
+
}
|
|
13819
|
+
return result;
|
|
13820
|
+
}
|
|
13821
|
+
static getTrees(comp) {
|
|
13822
|
+
var _a;
|
|
13823
|
+
let result = [];
|
|
13824
|
+
if (comp.components) {
|
|
13825
|
+
result = (_a = comp.components) === null || _a === void 0 ? void 0 : _a.map((c) => this.getTrees(c)).reduce((acc, value) => acc.concat(value), []);
|
|
13826
|
+
}
|
|
13827
|
+
if (comp.treeService) {
|
|
13828
|
+
result.push(comp.treeService);
|
|
13829
|
+
}
|
|
13830
|
+
return result;
|
|
13831
|
+
}
|
|
13832
|
+
}
|
|
13833
|
+
|
|
13834
|
+
/*
|
|
13835
|
+
* Public API Surface of smart-component-layout
|
|
13836
|
+
*/
|
|
13837
|
+
|
|
13838
|
+
/**
|
|
13839
|
+
* Custom HttpParameterCodec
|
|
13840
|
+
* Workaround for https://github.com/angular/angular/issues/18261
|
|
13841
|
+
*/
|
|
13842
|
+
class CustomHttpParameterCodec {
|
|
13843
|
+
encodeKey(k) {
|
|
13844
|
+
return encodeURIComponent(k);
|
|
13845
|
+
}
|
|
13846
|
+
encodeValue(v) {
|
|
13847
|
+
return encodeURIComponent(v);
|
|
13848
|
+
}
|
|
13849
|
+
decodeKey(k) {
|
|
13850
|
+
return decodeURIComponent(k);
|
|
13851
|
+
}
|
|
13852
|
+
decodeValue(v) {
|
|
13853
|
+
return decodeURIComponent(v);
|
|
13854
|
+
}
|
|
13855
|
+
}
|
|
13856
|
+
|
|
13857
|
+
const BASE_PATH = new InjectionToken('basePath');
|
|
13858
|
+
const COLLECTION_FORMATS = {
|
|
13859
|
+
'csv': ',',
|
|
13860
|
+
'tsv': ' ',
|
|
13861
|
+
'ssv': ' ',
|
|
13862
|
+
'pipes': '|'
|
|
13863
|
+
};
|
|
13864
|
+
|
|
13865
|
+
class Configuration {
|
|
13866
|
+
constructor(configurationParameters = {}) {
|
|
13867
|
+
this.apiKeys = configurationParameters.apiKeys;
|
|
13868
|
+
this.username = configurationParameters.username;
|
|
13869
|
+
this.password = configurationParameters.password;
|
|
13870
|
+
this.accessToken = configurationParameters.accessToken;
|
|
13871
|
+
this.basePath = configurationParameters.basePath;
|
|
13872
|
+
this.withCredentials = configurationParameters.withCredentials;
|
|
13873
|
+
this.encoder = configurationParameters.encoder;
|
|
13874
|
+
if (configurationParameters.encodeParam) {
|
|
13875
|
+
this.encodeParam = configurationParameters.encodeParam;
|
|
13876
|
+
}
|
|
13877
|
+
else {
|
|
13878
|
+
this.encodeParam = param => this.defaultEncodeParam(param);
|
|
13879
|
+
}
|
|
13880
|
+
if (configurationParameters.credentials) {
|
|
13881
|
+
this.credentials = configurationParameters.credentials;
|
|
13882
|
+
}
|
|
13883
|
+
else {
|
|
13884
|
+
this.credentials = {};
|
|
13885
|
+
}
|
|
13886
|
+
}
|
|
13887
|
+
/**
|
|
13888
|
+
* Select the correct content-type to use for a request.
|
|
13889
|
+
* Uses {@link Configuration#isJsonMime} to determine the correct content-type.
|
|
13890
|
+
* If no content type is found return the first found type if the contentTypes is not empty
|
|
13891
|
+
* @param contentTypes - the array of content types that are available for selection
|
|
13892
|
+
* @returns the selected content-type or <code>undefined</code> if no selection could be made.
|
|
13893
|
+
*/
|
|
13894
|
+
selectHeaderContentType(contentTypes) {
|
|
13895
|
+
if (contentTypes.length === 0) {
|
|
13896
|
+
return undefined;
|
|
13897
|
+
}
|
|
13898
|
+
const type = contentTypes.find((x) => this.isJsonMime(x));
|
|
13899
|
+
if (type === undefined) {
|
|
13900
|
+
return contentTypes[0];
|
|
13901
|
+
}
|
|
13902
|
+
return type;
|
|
13903
|
+
}
|
|
13904
|
+
/**
|
|
13905
|
+
* Select the correct accept content-type to use for a request.
|
|
13906
|
+
* Uses {@link Configuration#isJsonMime} to determine the correct accept content-type.
|
|
13907
|
+
* If no content type is found return the first found type if the contentTypes is not empty
|
|
13908
|
+
* @param accepts - the array of content types that are available for selection.
|
|
13909
|
+
* @returns the selected content-type or <code>undefined</code> if no selection could be made.
|
|
13910
|
+
*/
|
|
13911
|
+
selectHeaderAccept(accepts) {
|
|
13912
|
+
if (accepts.length === 0) {
|
|
13913
|
+
return undefined;
|
|
13914
|
+
}
|
|
13915
|
+
const type = accepts.find((x) => this.isJsonMime(x));
|
|
13916
|
+
if (type === undefined) {
|
|
13917
|
+
return accepts[0];
|
|
13918
|
+
}
|
|
13919
|
+
return type;
|
|
13920
|
+
}
|
|
13921
|
+
/**
|
|
13922
|
+
* Check if the given MIME is a JSON MIME.
|
|
13923
|
+
* JSON MIME examples:
|
|
13924
|
+
* application/json
|
|
13925
|
+
* application/json; charset=UTF8
|
|
13926
|
+
* APPLICATION/JSON
|
|
13927
|
+
* application/vnd.company+json
|
|
13928
|
+
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
13929
|
+
* @return True if the given MIME is JSON, false otherwise.
|
|
13930
|
+
*/
|
|
13931
|
+
isJsonMime(mime) {
|
|
13932
|
+
const jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
|
|
13933
|
+
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
|
|
13934
|
+
}
|
|
13935
|
+
lookupCredential(key) {
|
|
13936
|
+
const value = this.credentials[key];
|
|
13937
|
+
return typeof value === 'function'
|
|
13938
|
+
? value()
|
|
13939
|
+
: value;
|
|
13940
|
+
}
|
|
13941
|
+
defaultEncodeParam(param) {
|
|
13942
|
+
// This implementation exists as fallback for missing configuration
|
|
13943
|
+
// and for backwards compatibility to older typescript-angular generator versions.
|
|
13944
|
+
// It only works for the 'simple' parameter style.
|
|
13945
|
+
// Date-handling only works for the 'date-time' format.
|
|
13946
|
+
// All other styles and Date-formats are probably handled incorrectly.
|
|
13947
|
+
//
|
|
13948
|
+
// But: if that's all you need (i.e.: the most common use-case): no need for customization!
|
|
13949
|
+
const value = param.dataFormat === 'date-time' && param.value instanceof Date
|
|
13950
|
+
? param.value.toISOString()
|
|
13951
|
+
: param.value;
|
|
13952
|
+
return encodeURIComponent(String(value));
|
|
13953
|
+
}
|
|
13954
|
+
}
|
|
13955
|
+
|
|
13956
|
+
/**
|
|
13957
|
+
* Filter API 2
|
|
13958
|
+
* Filter API 2
|
|
13959
|
+
*
|
|
13960
|
+
* The version of the OpenAPI document: 1.0.0
|
|
13961
|
+
* Contact: info@it4all.hu
|
|
13962
|
+
*
|
|
13963
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
13964
|
+
* https://openapi-generator.tech
|
|
13965
|
+
* Do not edit the class manually.
|
|
13966
|
+
*/
|
|
13967
|
+
class FilterService {
|
|
13968
|
+
constructor(httpClient, basePath, configuration) {
|
|
13969
|
+
this.httpClient = httpClient;
|
|
13970
|
+
this.basePath = 'http://localhost';
|
|
13971
|
+
this.defaultHeaders = new HttpHeaders();
|
|
13972
|
+
this.configuration = new Configuration();
|
|
13973
|
+
if (configuration) {
|
|
13974
|
+
this.configuration = configuration;
|
|
13975
|
+
}
|
|
13976
|
+
if (typeof this.configuration.basePath !== 'string') {
|
|
13977
|
+
if (Array.isArray(basePath) && basePath.length > 0) {
|
|
13978
|
+
basePath = basePath[0];
|
|
13979
|
+
}
|
|
13980
|
+
if (typeof basePath !== 'string') {
|
|
13981
|
+
basePath = this.basePath;
|
|
13982
|
+
}
|
|
13983
|
+
this.configuration.basePath = basePath;
|
|
13984
|
+
}
|
|
13985
|
+
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
|
|
13986
|
+
}
|
|
13987
|
+
// @ts-ignore
|
|
13988
|
+
addToHttpParams(httpParams, value, key) {
|
|
13989
|
+
if (typeof value === "object" && value instanceof Date === false) {
|
|
13990
|
+
httpParams = this.addToHttpParamsRecursive(httpParams, value);
|
|
14193
13991
|
}
|
|
14194
|
-
|
|
14195
|
-
|
|
13992
|
+
else {
|
|
13993
|
+
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
|
|
14196
13994
|
}
|
|
14197
|
-
return
|
|
13995
|
+
return httpParams;
|
|
14198
13996
|
}
|
|
14199
|
-
|
|
14200
|
-
|
|
14201
|
-
|
|
14202
|
-
result = comp.components
|
|
14203
|
-
.map((c) => this.getGrids(c))
|
|
14204
|
-
.reduce((acc, value) => acc.concat(value), []);
|
|
13997
|
+
addToHttpParamsRecursive(httpParams, value, key) {
|
|
13998
|
+
if (value == null) {
|
|
13999
|
+
return httpParams;
|
|
14205
14000
|
}
|
|
14206
|
-
if (
|
|
14207
|
-
|
|
14001
|
+
if (typeof value === "object") {
|
|
14002
|
+
if (Array.isArray(value)) {
|
|
14003
|
+
value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
|
14004
|
+
}
|
|
14005
|
+
else if (value instanceof Date) {
|
|
14006
|
+
if (key != null) {
|
|
14007
|
+
httpParams = httpParams.append(key, value.toISOString().substr(0, 10));
|
|
14008
|
+
}
|
|
14009
|
+
else {
|
|
14010
|
+
throw Error("key may not be null if value is Date");
|
|
14011
|
+
}
|
|
14012
|
+
}
|
|
14013
|
+
else {
|
|
14014
|
+
Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
|
|
14015
|
+
}
|
|
14208
14016
|
}
|
|
14209
|
-
|
|
14017
|
+
else if (key != null) {
|
|
14018
|
+
httpParams = httpParams.append(key, value);
|
|
14019
|
+
}
|
|
14020
|
+
else {
|
|
14021
|
+
throw Error("key may not be null if value is not object or array");
|
|
14022
|
+
}
|
|
14023
|
+
return httpParams;
|
|
14210
14024
|
}
|
|
14211
|
-
|
|
14212
|
-
|
|
14213
|
-
|
|
14214
|
-
if (comp.components) {
|
|
14215
|
-
result = (_a = comp.components) === null || _a === void 0 ? void 0 : _a.map((c) => this.getTrees(c)).reduce((acc, value) => acc.concat(value), []);
|
|
14025
|
+
load(uuid, filterIdentifier, observe = 'body', reportProgress = false, options) {
|
|
14026
|
+
if (uuid === null || uuid === undefined) {
|
|
14027
|
+
throw new Error('Required parameter uuid was null or undefined when calling load.');
|
|
14216
14028
|
}
|
|
14217
|
-
if (
|
|
14218
|
-
|
|
14029
|
+
if (filterIdentifier === null || filterIdentifier === undefined) {
|
|
14030
|
+
throw new Error('Required parameter filterIdentifier was null or undefined when calling load.');
|
|
14219
14031
|
}
|
|
14220
|
-
|
|
14032
|
+
let localVarHeaders = this.defaultHeaders;
|
|
14033
|
+
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
|
|
14034
|
+
if (localVarHttpHeaderAcceptSelected === undefined) {
|
|
14035
|
+
// to determine the Accept header
|
|
14036
|
+
const httpHeaderAccepts = [
|
|
14037
|
+
'application/json'
|
|
14038
|
+
];
|
|
14039
|
+
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
14040
|
+
}
|
|
14041
|
+
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
14042
|
+
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
|
14043
|
+
}
|
|
14044
|
+
let localVarHttpContext = options && options.context;
|
|
14045
|
+
if (localVarHttpContext === undefined) {
|
|
14046
|
+
localVarHttpContext = new HttpContext();
|
|
14047
|
+
}
|
|
14048
|
+
let responseType_ = 'json';
|
|
14049
|
+
if (localVarHttpHeaderAcceptSelected) {
|
|
14050
|
+
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
|
14051
|
+
responseType_ = 'text';
|
|
14052
|
+
}
|
|
14053
|
+
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
|
14054
|
+
responseType_ = 'json';
|
|
14055
|
+
}
|
|
14056
|
+
else {
|
|
14057
|
+
responseType_ = 'blob';
|
|
14058
|
+
}
|
|
14059
|
+
}
|
|
14060
|
+
let localVarPath = `/filter/${this.configuration.encodeParam({ name: "uuid", value: uuid, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "uuid" })}/${this.configuration.encodeParam({ name: "filterIdentifier", value: filterIdentifier, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/load`;
|
|
14061
|
+
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
|
|
14062
|
+
context: localVarHttpContext,
|
|
14063
|
+
responseType: responseType_,
|
|
14064
|
+
withCredentials: this.configuration.withCredentials,
|
|
14065
|
+
headers: localVarHeaders,
|
|
14066
|
+
observe: observe,
|
|
14067
|
+
reportProgress: reportProgress
|
|
14068
|
+
});
|
|
14221
14069
|
}
|
|
14222
|
-
|
|
14070
|
+
performWidgetAction(uuid, filterIdentifier, body, observe = 'body', reportProgress = false, options) {
|
|
14071
|
+
if (uuid === null || uuid === undefined) {
|
|
14072
|
+
throw new Error('Required parameter uuid was null or undefined when calling performWidgetAction.');
|
|
14073
|
+
}
|
|
14074
|
+
if (filterIdentifier === null || filterIdentifier === undefined) {
|
|
14075
|
+
throw new Error('Required parameter filterIdentifier was null or undefined when calling performWidgetAction.');
|
|
14076
|
+
}
|
|
14077
|
+
if (body === null || body === undefined) {
|
|
14078
|
+
throw new Error('Required parameter body was null or undefined when calling performWidgetAction.');
|
|
14079
|
+
}
|
|
14080
|
+
let localVarHeaders = this.defaultHeaders;
|
|
14081
|
+
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
|
|
14082
|
+
if (localVarHttpHeaderAcceptSelected === undefined) {
|
|
14083
|
+
// to determine the Accept header
|
|
14084
|
+
const httpHeaderAccepts = [
|
|
14085
|
+
'application/json'
|
|
14086
|
+
];
|
|
14087
|
+
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
14088
|
+
}
|
|
14089
|
+
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
14090
|
+
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
|
14091
|
+
}
|
|
14092
|
+
let localVarHttpContext = options && options.context;
|
|
14093
|
+
if (localVarHttpContext === undefined) {
|
|
14094
|
+
localVarHttpContext = new HttpContext();
|
|
14095
|
+
}
|
|
14096
|
+
// to determine the Content-Type header
|
|
14097
|
+
const consumes = [
|
|
14098
|
+
'application/json'
|
|
14099
|
+
];
|
|
14100
|
+
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
|
|
14101
|
+
if (httpContentTypeSelected !== undefined) {
|
|
14102
|
+
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
|
|
14103
|
+
}
|
|
14104
|
+
let responseType_ = 'json';
|
|
14105
|
+
if (localVarHttpHeaderAcceptSelected) {
|
|
14106
|
+
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
|
14107
|
+
responseType_ = 'text';
|
|
14108
|
+
}
|
|
14109
|
+
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
|
14110
|
+
responseType_ = 'json';
|
|
14111
|
+
}
|
|
14112
|
+
else {
|
|
14113
|
+
responseType_ = 'blob';
|
|
14114
|
+
}
|
|
14115
|
+
}
|
|
14116
|
+
let localVarPath = `/filter/${this.configuration.encodeParam({ name: "uuid", value: uuid, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "uuid" })}/${this.configuration.encodeParam({ name: "filterIdentifier", value: filterIdentifier, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/performWidgetAction`;
|
|
14117
|
+
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
|
|
14118
|
+
context: localVarHttpContext,
|
|
14119
|
+
body: body,
|
|
14120
|
+
responseType: responseType_,
|
|
14121
|
+
withCredentials: this.configuration.withCredentials,
|
|
14122
|
+
headers: localVarHeaders,
|
|
14123
|
+
observe: observe,
|
|
14124
|
+
reportProgress: reportProgress
|
|
14125
|
+
});
|
|
14126
|
+
}
|
|
14127
|
+
}
|
|
14128
|
+
FilterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FilterService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
14129
|
+
FilterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FilterService, providedIn: 'root' });
|
|
14130
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FilterService, decorators: [{
|
|
14131
|
+
type: Injectable,
|
|
14132
|
+
args: [{
|
|
14133
|
+
providedIn: 'root'
|
|
14134
|
+
}]
|
|
14135
|
+
}], ctorParameters: function () {
|
|
14136
|
+
return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
14137
|
+
type: Optional
|
|
14138
|
+
}, {
|
|
14139
|
+
type: Inject,
|
|
14140
|
+
args: [BASE_PATH]
|
|
14141
|
+
}] }, { type: Configuration, decorators: [{
|
|
14142
|
+
type: Optional
|
|
14143
|
+
}] }];
|
|
14144
|
+
} });
|
|
14223
14145
|
|
|
14224
|
-
|
|
14225
|
-
|
|
14226
|
-
|
|
14146
|
+
class SmartFilterEditorService {
|
|
14147
|
+
constructor(service) {
|
|
14148
|
+
this.service = service;
|
|
14149
|
+
this.modelChanged = new Subject();
|
|
14150
|
+
this.submit = new Subject();
|
|
14151
|
+
this.reSubscribeToChange = new Subject();
|
|
14152
|
+
}
|
|
14153
|
+
load() {
|
|
14154
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
14155
|
+
this.model = yield this.service.load(this.config.uuid, this.config.identifier).toPromise();
|
|
14156
|
+
this.modelChanged.next();
|
|
14157
|
+
});
|
|
14158
|
+
}
|
|
14159
|
+
peformWidgetAction(request) {
|
|
14160
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
14161
|
+
this.model = yield this.service
|
|
14162
|
+
.performWidgetAction(this.config.uuid, this.config.identifier, request)
|
|
14163
|
+
.toPromise();
|
|
14164
|
+
this.modelChanged.next();
|
|
14165
|
+
});
|
|
14166
|
+
}
|
|
14167
|
+
getModel() {
|
|
14168
|
+
return this.model;
|
|
14169
|
+
}
|
|
14170
|
+
performUiActionRequest(uiActionRequest, widgetId, nodeId) {
|
|
14171
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
14172
|
+
yield this.peformWidgetAction(uiActionRequest);
|
|
14173
|
+
});
|
|
14174
|
+
}
|
|
14175
|
+
handleSpecificDemandsAsynchronously(uiAction, uiActionRequest) {
|
|
14176
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
14177
|
+
return {
|
|
14178
|
+
shouldPerformAction: true,
|
|
14179
|
+
uiActionRequest: uiActionRequest,
|
|
14180
|
+
};
|
|
14181
|
+
});
|
|
14182
|
+
}
|
|
14183
|
+
getAdditionalParams(uiAction) {
|
|
14184
|
+
throw new Error('Method not implemented.');
|
|
14185
|
+
}
|
|
14186
|
+
}
|
|
14187
|
+
SmartFilterEditorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterEditorService, deps: [{ token: FilterService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
14188
|
+
SmartFilterEditorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterEditorService });
|
|
14189
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterEditorService, decorators: [{
|
|
14190
|
+
type: Injectable
|
|
14191
|
+
}], ctorParameters: function () { return [{ type: FilterService }]; } });
|
|
14227
14192
|
|
|
14228
|
-
|
|
14229
|
-
constructor(inject, auth, pageName) {
|
|
14193
|
+
class SmartComponentApiClient {
|
|
14194
|
+
constructor(inject, auth, pageName, componentName) {
|
|
14230
14195
|
this.inject = inject;
|
|
14231
14196
|
this.auth = auth;
|
|
14232
14197
|
this.pageName = pageName;
|
|
14198
|
+
this.componentName = componentName;
|
|
14233
14199
|
this._destroy$ = new Subject();
|
|
14234
14200
|
this.detectChange = new SmartSubject(this._destroy$);
|
|
14235
14201
|
this.uiActionModels = [];
|
|
@@ -14238,10 +14204,24 @@ let SmartComponentApiClient = class SmartComponentApiClient {
|
|
|
14238
14204
|
this.widgets = new WidgetMap();
|
|
14239
14205
|
this.formWidgets = new WidgetMap();
|
|
14240
14206
|
this.useQueryLists = false;
|
|
14207
|
+
// check and calculate pageName
|
|
14208
|
+
if (!this.pageName && !this.componentName) {
|
|
14209
|
+
throw new Error('pageName or componentName must be specified!');
|
|
14210
|
+
}
|
|
14211
|
+
this.viewContext = inject.get(SmartViewContextService);
|
|
14212
|
+
if (this.componentName) {
|
|
14213
|
+
let pageNameForComponent = this.viewContext.getPageNameOfComponent(this.componentName);
|
|
14214
|
+
if (!this.pageName) {
|
|
14215
|
+
this.pageName = pageNameForComponent;
|
|
14216
|
+
}
|
|
14217
|
+
else if (this.pageName !== pageNameForComponent) {
|
|
14218
|
+
throw new Error(`pageName (${pageName}) and componentName (${componentName}) doesn't match!`);
|
|
14219
|
+
}
|
|
14220
|
+
}
|
|
14221
|
+
// from this point we have this.pageName
|
|
14241
14222
|
this.detectChange.subscribe((change) => {
|
|
14242
14223
|
this.handleChanges(change);
|
|
14243
14224
|
});
|
|
14244
|
-
this.viewContext = inject.get(SmartViewContextService);
|
|
14245
14225
|
this.uiActionService = inject.get(UiActionService);
|
|
14246
14226
|
this.uiActionDescriptorService = inject.get(UiActionDescriptorService);
|
|
14247
14227
|
}
|
|
@@ -14315,23 +14295,42 @@ let SmartComponentApiClient = class SmartComponentApiClient {
|
|
|
14315
14295
|
if (this.useQueryLists) {
|
|
14316
14296
|
if (!this.getSmartComponentLayoutsQL()) {
|
|
14317
14297
|
console.warn('SmartComponentLayoutsQL not available!');
|
|
14318
|
-
return;
|
|
14319
14298
|
}
|
|
14320
|
-
|
|
14321
|
-
|
|
14322
|
-
|
|
14323
|
-
|
|
14324
|
-
|
|
14325
|
-
|
|
14326
|
-
|
|
14327
|
-
|
|
14328
|
-
|
|
14329
|
-
|
|
14330
|
-
|
|
14331
|
-
|
|
14332
|
-
}
|
|
14299
|
+
else {
|
|
14300
|
+
this.handleQueryList(this.getSmartComponentLayoutsQL(), (comp) => {
|
|
14301
|
+
if (comp.smartComponentLayout) {
|
|
14302
|
+
// TODO maybe we should set comp.parent, not comp.smartComponentLayout.parentComponent..
|
|
14303
|
+
SmartComponentLayoutUtility.setParent(comp.smartComponentLayout, this);
|
|
14304
|
+
}
|
|
14305
|
+
if (this.uuid && this.uuid !== comp.uuid)
|
|
14306
|
+
comp.uuid = this.uuid;
|
|
14307
|
+
});
|
|
14308
|
+
}
|
|
14309
|
+
if (!this.getSmartGridsQL()) {
|
|
14310
|
+
console.warn('SmartGridsQL not available!');
|
|
14311
|
+
}
|
|
14312
|
+
else {
|
|
14313
|
+
this.handleQueryList(this.getSmartGridsQL(), (grid) => {
|
|
14314
|
+
if (grid) {
|
|
14315
|
+
if (grid.smartGrid) {
|
|
14316
|
+
grid.smartGrid.uiActionService = this.uiActionService;
|
|
14317
|
+
grid.smartGrid.uiActionDescriptorService = this.uiActionDescriptorService;
|
|
14318
|
+
grid.smartGrid.serviceToUse = this;
|
|
14319
|
+
grid.smartGrid.viewContextService = this.viewContext;
|
|
14320
|
+
}
|
|
14321
|
+
if (this.uuid && this.uuid !== grid.uuid)
|
|
14322
|
+
grid.uuid = this.uuid;
|
|
14323
|
+
}
|
|
14324
|
+
});
|
|
14325
|
+
}
|
|
14333
14326
|
}
|
|
14334
14327
|
}
|
|
14328
|
+
handleQueryList(ql, handler) {
|
|
14329
|
+
ql.forEach((el) => handler(el));
|
|
14330
|
+
this.getSmartComponentLayoutsQL()
|
|
14331
|
+
.changes.pipe(takeUntil(this._destroy$))
|
|
14332
|
+
.subscribe((list) => list.forEach((el) => handler(el)));
|
|
14333
|
+
}
|
|
14335
14334
|
getWidgets() {
|
|
14336
14335
|
if (this.useQueryLists) {
|
|
14337
14336
|
let widgets = new WidgetMap();
|
|
@@ -14729,10 +14728,7 @@ let SmartComponentApiClient = class SmartComponentApiClient {
|
|
|
14729
14728
|
handleConstraintChange(changes, changeKey) {
|
|
14730
14729
|
this.model.constraints = changes[changeKey];
|
|
14731
14730
|
}
|
|
14732
|
-
}
|
|
14733
|
-
SmartComponentApiClient = __decorate([
|
|
14734
|
-
__param(2, Inject('pageName'))
|
|
14735
|
-
], SmartComponentApiClient);
|
|
14731
|
+
}
|
|
14736
14732
|
class WidgetMap {
|
|
14737
14733
|
constructor() {
|
|
14738
14734
|
this._widgets = new Map();
|