@smartbit4all/ng-client 3.3.48 → 3.3.50

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.
Files changed (48) hide show
  1. package/esm2020/lib/smart-client/smart-component-api-client.mjs +5 -1
  2. package/esm2020/lib/smart-component-layout/api/model/componentWidgetType.mjs +2 -1
  3. package/esm2020/lib/smart-component-layout/api/model/smartComponentWidgetDefinition.mjs +1 -1
  4. package/esm2020/lib/smart-component-layout/smart-component-layout-utility.mjs +13 -1
  5. package/esm2020/lib/smart-component-layout/smart-component-layout.component.mjs +32 -6
  6. package/esm2020/lib/smart-component-layout/smart-component-layout.module.mjs +6 -2
  7. package/esm2020/lib/smart-filter/api/filter/model/filterExpressionBoolOperator.mjs +6 -5
  8. package/esm2020/lib/smart-filter/api/filter/model/filterExpressionBuilderField.mjs +1 -1
  9. package/esm2020/lib/smart-filter/api/filter/model/filterExpressionBuilderGroup.mjs +8 -9
  10. package/esm2020/lib/smart-filter/api/filter/model/filterExpressionBuilderModel.mjs +1 -1
  11. package/esm2020/lib/smart-filter/api/filter/model/filterExpressionData.mjs +1 -1
  12. package/esm2020/lib/smart-filter/api/filter/model/filterExpressionDataType.mjs +9 -8
  13. package/esm2020/lib/smart-filter/api/filter/model/filterExpressionField.mjs +1 -1
  14. package/esm2020/lib/smart-filter/api/filter/model/filterExpressionFieldList.mjs +1 -1
  15. package/esm2020/lib/smart-filter/api/filter/model/filterExpressionFieldWidgetType.mjs +15 -14
  16. package/esm2020/lib/smart-filter/api/filter/model/filterExpressionList.mjs +1 -1
  17. package/esm2020/lib/smart-filter/api/filter/model/filterExpressionOperandData.mjs +1 -1
  18. package/esm2020/lib/smart-filter/api/filter/model/filterExpressionOperation.mjs +21 -20
  19. package/esm2020/lib/smart-filter/api/filter/model/filterExpressionOrderBy.mjs +7 -8
  20. package/esm2020/lib/smart-filter/smart-filter/components/smart-filter-simple/components/smart-filter-simple-field/smart-filter-simple-field.component.mjs +11 -10
  21. package/esm2020/lib/smart-filter-editor/api/model/filterExpressionOrderBy.mjs +19 -0
  22. package/esm2020/lib/smart-filter-editor/smart-filter-editor-content/smart-filter-editor-content.component.mjs +8 -8
  23. package/esm2020/lib/smart-grid/api/grid-api/model/gridUpdateData.mjs +1 -1
  24. package/esm2020/lib/smart-grid/api/grid-api/model/gridView.mjs +1 -1
  25. package/esm2020/lib/smart-grid/smart-grid.component.mjs +2 -2
  26. package/fesm2015/smartbit4all-ng-client.mjs +664 -596
  27. package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
  28. package/fesm2020/smartbit4all-ng-client.mjs +1702 -1635
  29. package/fesm2020/smartbit4all-ng-client.mjs.map +1 -1
  30. package/lib/smart-component-layout/api/model/componentWidgetType.d.ts +2 -1
  31. package/lib/smart-component-layout/api/model/smartComponentWidgetDefinition.d.ts +1 -2
  32. package/lib/smart-component-layout/smart-component-layout-utility.d.ts +2 -0
  33. package/lib/smart-component-layout/smart-component-layout.component.d.ts +6 -0
  34. package/lib/smart-component-layout/smart-component-layout.module.d.ts +2 -1
  35. package/lib/smart-filter/api/filter/model/filterExpressionBoolOperator.d.ts +4 -5
  36. package/lib/smart-filter/api/filter/model/filterExpressionBuilderGroup.d.ts +5 -8
  37. package/lib/smart-filter/api/filter/model/filterExpressionBuilderModel.d.ts +6 -0
  38. package/lib/smart-filter/api/filter/model/filterExpressionDataType.d.ts +7 -8
  39. package/lib/smart-filter/api/filter/model/filterExpressionField.d.ts +3 -0
  40. package/lib/smart-filter/api/filter/model/filterExpressionFieldWidgetType.d.ts +13 -14
  41. package/lib/smart-filter/api/filter/model/filterExpressionOperation.d.ts +19 -20
  42. package/lib/smart-filter/api/filter/model/filterExpressionOrderBy.d.ts +4 -7
  43. package/lib/smart-filter-editor/api/model/filterExpressionOrderBy.d.ts +28 -0
  44. package/lib/smart-grid/api/grid-api/model/gridUpdateData.d.ts +1 -1
  45. package/lib/smart-grid/api/grid-api/model/gridView.d.ts +1 -1
  46. package/package.json +1 -1
  47. package/smartbit4all-ng-client-3.3.50.tgz +0 -0
  48. package/smartbit4all-ng-client-3.3.48.tgz +0 -0
@@ -9513,127 +9513,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
9513
9513
  args: ['forms']
9514
9514
  }] } });
9515
9515
 
9516
- class SmartFilterService {
9517
- constructor() {
9518
- this._destroy$ = new Subject();
9519
- this.shouldSubmit = new Subject();
9520
- this.reSubscribeToSubmit = new Subject();
9521
- this.change = new Subject();
9522
- }
9523
- ngOnDestroy() {
9524
- this._destroy$.next();
9525
- this._destroy$.complete();
9526
- }
9527
- submit() {
9528
- return __awaiter(this, void 0, void 0, function* () {
9529
- this.shouldSubmit.next();
9530
- yield this.shouldSubmit.pipe(takeUntil(this._destroy$)).toPromise();
9531
- this.shouldSubmit = new Subject();
9532
- this.reSubscribeToSubmit.next();
9533
- return this.filter;
9534
- });
9535
- }
9536
- }
9537
- SmartFilterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
9538
- SmartFilterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterService, providedIn: 'root' });
9539
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterService, decorators: [{
9540
- type: Injectable,
9541
- args: [{
9542
- providedIn: 'root',
9543
- }]
9544
- }], ctorParameters: function () { return []; } });
9545
-
9546
- /**
9547
- * Filter API 2
9548
- * Filter API 2
9549
- *
9550
- * The version of the OpenAPI document: 1.0.0
9551
- * Contact: info@it4all.hu
9552
- *
9553
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9554
- * https://openapi-generator.tech
9555
- * Do not edit the class manually.
9556
- */
9557
- const FilterExpressionBoolOperator$1 = {
9558
- And: 'AND',
9559
- Or: 'OR'
9560
- };
9561
-
9562
- /**
9563
- * Filter API 2
9564
- * Filter API 2
9565
- *
9566
- * The version of the OpenAPI document: 1.0.0
9567
- * Contact: info@it4all.hu
9568
- *
9569
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9570
- * https://openapi-generator.tech
9571
- * Do not edit the class manually.
9572
- */
9573
- const FilterExpressionDataType = {
9574
- String: 'STRING',
9575
- Number: 'NUMBER',
9576
- Date: 'DATE',
9577
- DateTime: 'DATE_TIME',
9578
- Boolean: 'BOOLEAN'
9579
- };
9580
-
9581
- /**
9582
- * Filter API 2
9583
- * Filter API 2
9584
- *
9585
- * The version of the OpenAPI document: 1.0.0
9586
- * Contact: info@it4all.hu
9587
- *
9588
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9589
- * https://openapi-generator.tech
9590
- * Do not edit the class manually.
9591
- */
9592
- const FilterExpressionFieldWidgetType = {
9593
- TextField: 'TEXT_FIELD',
9594
- TextFieldChips: 'TEXT_FIELD_CHIPS',
9595
- TextBox: 'TEXT_BOX',
9596
- Select: 'SELECT',
9597
- SelectMultiple: 'SELECT_MULTIPLE',
9598
- Date: 'DATE',
9599
- Time: 'TIME',
9600
- DateTime: 'DATE_TIME',
9601
- CheckBox: 'CHECK_BOX',
9602
- RadioButton: 'RADIO_BUTTON',
9603
- Range: 'RANGE'
9604
- };
9605
-
9606
- /**
9607
- * Filter API 2
9608
- * Filter API 2
9609
- *
9610
- * The version of the OpenAPI document: 1.0.0
9611
- * Contact: info@it4all.hu
9612
- *
9613
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9614
- * https://openapi-generator.tech
9615
- * Do not edit the class manually.
9616
- */
9617
- const FilterExpressionOperation = {
9618
- Expression: 'EXPRESSION',
9619
- Equal: 'EQUAL',
9620
- NotEqual: 'NOT_EQUAL',
9621
- Less: 'LESS',
9622
- LessOrEqual: 'LESS_OR_EQUAL',
9623
- Greater: 'GREATER',
9624
- GreaterOrEqual: 'GREATER_OR_EQUAL',
9625
- Like: 'LIKE',
9626
- NotLike: 'NOT_LIKE',
9627
- Between: 'BETWEEN',
9628
- NotBetween: 'NOT_BETWEEN',
9629
- IsEmpty: 'IS_EMPTY',
9630
- IsNotEmpty: 'IS_NOT_EMPTY',
9631
- Exists: 'EXISTS',
9632
- NotExists: 'NOT_EXISTS',
9633
- In: 'IN',
9634
- NotIn: 'NOT_IN'
9635
- };
9636
-
9637
9516
  /**
9638
9517
  * Filter API 2
9639
9518
  * Filter API 2
@@ -9649,362 +9528,76 @@ var FilterExpressionOrderBy;
9649
9528
  (function (FilterExpressionOrderBy) {
9650
9529
  FilterExpressionOrderBy.OrderEnum = {
9651
9530
  Asc: 'ASC',
9652
- Desc: 'DESC'
9531
+ Desc: 'DESC',
9653
9532
  };
9654
9533
  })(FilterExpressionOrderBy || (FilterExpressionOrderBy = {}));
9655
9534
 
9656
- var FilterExpressionBuilderGroup;
9657
- (function (FilterExpressionBuilderGroup) {
9658
- FilterExpressionBuilderGroup.BuilderGroupKindEnum = {
9659
- Diplay: 'DIPLAY',
9660
- Bracket: 'BRACKET',
9661
- Exist: 'EXIST'
9662
- };
9663
- })(FilterExpressionBuilderGroup || (FilterExpressionBuilderGroup = {}));
9535
+ var ExpandableSectionButtonType;
9536
+ (function (ExpandableSectionButtonType) {
9537
+ ExpandableSectionButtonType[ExpandableSectionButtonType["BUTTON"] = 0] = "BUTTON";
9538
+ ExpandableSectionButtonType[ExpandableSectionButtonType["MENU"] = 1] = "MENU";
9539
+ ExpandableSectionButtonType[ExpandableSectionButtonType["MENU_ITEM"] = 2] = "MENU_ITEM";
9540
+ })(ExpandableSectionButtonType || (ExpandableSectionButtonType = {}));
9541
+ var ExpandableSectionButtonIconPosition;
9542
+ (function (ExpandableSectionButtonIconPosition) {
9543
+ ExpandableSectionButtonIconPosition["PRE"] = "Pre";
9544
+ ExpandableSectionButtonIconPosition["POST"] = "Post";
9545
+ })(ExpandableSectionButtonIconPosition || (ExpandableSectionButtonIconPosition = {}));
9664
9546
 
9665
- class SmartFilterSimpleFieldComponent {
9666
- constructor(service, cfService) {
9667
- this.service = service;
9547
+ class ExpandableSectionComponent {
9548
+ constructor(cfService) {
9668
9549
  this.cfService = cfService;
9669
- this._destroy$ = new Subject();
9550
+ this.stateChange = new Subject();
9670
9551
  }
9671
- ngOnInit() {
9672
- var _a;
9673
- this.operation = (_a = this.filterExpressionField.expressionData) === null || _a === void 0 ? void 0 : _a.currentOperation;
9674
- this.currentOperation = this.getOptionLabel(this.operation);
9552
+ onStateChange(isOpened) {
9553
+ this.data.isExpanded = isOpened;
9554
+ this.stateChange.next(this.data);
9555
+ if (this.data.stateChanged) {
9556
+ this.data.stateChanged.next({
9557
+ data: this.data.data,
9558
+ isExpanded: isOpened,
9559
+ index: this.data.index,
9560
+ });
9561
+ }
9675
9562
  }
9563
+ ngOnInit() { }
9676
9564
  ngAfterViewInit() {
9677
- this.constructForm();
9678
- }
9679
- ngOnDestroy() {
9680
- this._destroy$.next();
9681
- this._destroy$.complete();
9682
- }
9683
- constructFormWidget(key, label, widgetType, possibleValues) {
9684
- let type = widgetType;
9685
- if (type === FilterExpressionFieldWidgetType.Date) {
9686
- type = SmartFormWidgetType.DATE_PICKER;
9687
- }
9688
- else if (type === FilterExpressionFieldWidgetType.DateTime) {
9689
- type = SmartFormWidgetType.DATE_TIME_PICKER;
9565
+ var _a, _b;
9566
+ if (this.data.headerComponent) {
9567
+ this.cfService.createComponent(this.vcRefheader, this.data.headerComponent, new Map([
9568
+ [(_a = this.data.headerInputName) !== null && _a !== void 0 ? _a : '', this.data.headerData],
9569
+ ['stateChange', this.stateChange],
9570
+ ['index', this.data.index],
9571
+ ['sectionIndex', this.index],
9572
+ ]));
9690
9573
  }
9691
- let widget = {
9692
- key,
9693
- label,
9694
- type,
9695
- value: '',
9696
- showLabel: true,
9697
- valueList: possibleValues.map((value) => {
9698
- return {
9699
- key: value.objectUri ? value.objectUri : value.code,
9700
- label: value.displayValue,
9701
- type: SmartFormWidgetType.ITEM,
9702
- value: value.objectUri ? value.objectUri : value.code,
9703
- };
9704
- }),
9705
- };
9706
- return widget;
9574
+ this.componentRef = this.cfService.createComponent(this.vcRef, this.data.customComponent, new Map([
9575
+ [(_b = this.data.inputName) !== null && _b !== void 0 ? _b : '', this.data.data],
9576
+ ['stateChange', this.stateChange],
9577
+ ['index', this.data.index],
9578
+ ['sectionIndex', this.index],
9579
+ ]));
9707
9580
  }
9708
- constructForm() {
9709
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
9710
- (_a = this.vcRefForm) === null || _a === void 0 ? void 0 : _a.clear();
9711
- let widgets = [];
9712
- let key;
9713
- if (this.filterExpressionField.widgetType === 'SELECT_MULTIPLE') {
9714
- key = 'expressionData.operand2.selectedValues';
9715
- }
9716
- if ((_b = this.filterExpressionField.expressionData) === null || _b === void 0 ? void 0 : _b.operand2) {
9717
- if (key !== 'expressionData.operand2.selectedValues') {
9718
- key = 'expressionData.operand2.valueAsString';
9719
- }
9720
- widgets.push(this.constructFormWidget(key, this.filterExpressionField.label2, (_c = this.filterExpressionField.widgetType) !== null && _c !== void 0 ? _c : FilterExpressionFieldWidgetType.TextField, this.filterExpressionField.possibleValues));
9721
- }
9722
- if ((_d = this.filterExpressionField.expressionData) === null || _d === void 0 ? void 0 : _d.operand3) {
9723
- if (key !== 'selectedValues') {
9724
- key = 'expressionData.operand3.valueAsString';
9725
- }
9726
- widgets.push(this.constructFormWidget(key, this.filterExpressionField.label3, (_e = this.filterExpressionField.widgetType) !== null && _e !== void 0 ? _e : FilterExpressionFieldWidgetType.TextField, this.filterExpressionField.possibleValues));
9581
+ action(button, event) {
9582
+ event.stopPropagation();
9583
+ if (!button.callback) {
9584
+ throw new Error(`Button with name ${button.label} or icon ${button.icon} does not have a callback!`);
9727
9585
  }
9728
- this.operation = (_f = this.filterExpressionField.expressionData) === null || _f === void 0 ? void 0 : _f.currentOperation;
9729
- this.currentOperation = this.getOptionLabel(this.operation);
9730
- this.smartForm = {
9731
- direction: SmartFormWidgetDirection.ROW,
9732
- componentModel: { data: this.filterExpressionField },
9733
- useOnValueChangeEvent: true,
9734
- useOnBlurEvent: true,
9735
- submitOnEnter: (_g = this.service.filter) === null || _g === void 0 ? void 0 : _g.submitOnEnter,
9736
- widgets,
9737
- translateService: (_h = this.service.filter) === null || _h === void 0 ? void 0 : _h.translateService,
9738
- };
9739
- // Show form on page
9740
- this.componentRefForm = this.cfService.createComponent(this.vcRefForm, SmartformComponent, new Map([['smartForm', this.smartForm]]));
9741
- (_j = this.componentRefForm.instance.onValueChangeSubject) === null || _j === void 0 ? void 0 : _j.pipe(takeUntil(this._destroy$)).subscribe(() => {
9742
- this.submit();
9743
- this.service.change.next();
9744
- });
9745
- (_k = this.componentRefForm.instance.onBlurSubject) === null || _k === void 0 ? void 0 : _k.pipe(takeUntil(this._destroy$)).subscribe(() => {
9746
- this.submit();
9747
- this.service.change.next();
9748
- });
9586
+ button.callback(button.args);
9749
9587
  }
9750
- submit() {
9751
- var _a;
9752
- let form = this.componentRefForm.instance.submitForm();
9753
- this.filterExpressionField = (_a = form.componentModel) === null || _a === void 0 ? void 0 : _a.data;
9754
- this.simpleFieldChildren.forEach((smartFilterFieldComponent, index) => {
9755
- let filterExpressionField = smartFilterFieldComponent.submit();
9756
- this.filterExpressionField.subFieldList.filters[index] = filterExpressionField;
9757
- });
9758
- return this.filterExpressionField;
9588
+ setExpanded() { }
9589
+ type() {
9590
+ return ExpandableSectionButtonType;
9759
9591
  }
9760
- optionSelected(option) {
9761
- var _a, _b, _c, _d;
9762
- let oldOption = this.componentRefForm.instance.smartForm.componentModel.data.expressionData
9763
- .currentOperation;
9764
- this.componentRefForm.instance.smartForm.componentModel.data.expressionData.currentOperation =
9765
- option;
9766
- this.operation = option;
9767
- this.currentOperation = this.getOptionLabel(this.operation);
9768
- if (oldOption !== FilterExpressionOperation.Between &&
9769
- option === FilterExpressionOperation.Between) {
9770
- this.submit();
9771
- let label = this.filterExpressionField.label2;
9772
- this.filterExpressionField.label2 = `${label} - tól`;
9773
- this.filterExpressionField.label3 = `${label} - ig`;
9774
- this.filterExpressionField.expressionData.operand3 = {
9775
- isDataName: (_a = this.filterExpressionField.expressionData.operand2) === null || _a === void 0 ? void 0 : _a.isDataName,
9776
- type: (_b = this.filterExpressionField.expressionData.operand3) === null || _b === void 0 ? void 0 : _b.type,
9777
- valueAsString: (_c = this.filterExpressionField.expressionData.operand3) === null || _c === void 0 ? void 0 : _c.valueAsString,
9778
- selectedValues: (_d = this.filterExpressionField.expressionData.operand3) === null || _d === void 0 ? void 0 : _d.selectedValues,
9779
- };
9780
- this.constructForm();
9781
- }
9782
- else if (oldOption === FilterExpressionOperation.Between &&
9783
- option !== FilterExpressionOperation.Between) {
9784
- let label = this.filterExpressionField.label2.replace(' - tól', '');
9785
- this.filterExpressionField.label2 = `${label}`;
9786
- this.filterExpressionField.label3 = undefined;
9787
- this.filterExpressionField.expressionData.operand3 = undefined;
9788
- this.constructForm();
9789
- }
9592
+ position() {
9593
+ return ExpandableSectionButtonIconPosition;
9790
9594
  }
9791
- getOptionLabel(option) {
9792
- if (!option) {
9793
- return '';
9794
- }
9795
- else if (this.operationTranslator) {
9796
- return this.operationTranslator(option);
9595
+ customButtonClicked(event, button, element) {
9596
+ event.stopPropagation();
9597
+ if (!button.callback) {
9598
+ throw new Error(`Button with name ${button.label} or icon ${button.icon} does not have a callback!`);
9797
9599
  }
9798
- return option;
9799
- }
9800
- }
9801
- SmartFilterSimpleFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterSimpleFieldComponent, deps: [{ token: SmartFilterService }, { token: ComponentFactoryService }], target: i0.ɵɵFactoryTarget.Component });
9802
- SmartFilterSimpleFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartFilterSimpleFieldComponent, selector: "smart-filter-simple-field", inputs: { operationTranslator: "operationTranslator", filterExpressionField: "filterExpressionField", showPossibleActions: "showPossibleActions" }, viewQueries: [{ propertyName: "vcRefForm", first: true, predicate: ["form"], descendants: true, read: ViewContainerRef }, { propertyName: "simpleFieldChildren", predicate: ["simpleField"], descendants: true }], ngImport: i0, template: "<div class=\"smart-filter-simple-field-container\">\r\n <div class=\"smart-filter-simple-field-form-widget\">\r\n <div\r\n class=\"smart-filter-simple-field-form-widget-row\"\r\n *ngIf=\"showPossibleActions\"\r\n >\r\n <p>({{ currentOperation }})</p>\r\n <button\r\n mat-icon-button\r\n [matMenuTriggerFor]=\"menu\"\r\n aria-label=\"Example icon-button with a menu\"\r\n >\r\n <mat-icon>more_vert</mat-icon>\r\n </button>\r\n <mat-menu #menu=\"matMenu\">\r\n <button\r\n mat-menu-item\r\n *ngFor=\"let option of filterExpressionField.possibleOperations\"\r\n (click)=\"optionSelected(option)\"\r\n >\r\n <span>\r\n {{ getOptionLabel(option) }}\r\n </span>\r\n </button>\r\n </mat-menu>\r\n </div>\r\n <ng-template #form></ng-template>\r\n </div>\r\n</div>\r\n", styles: [".smart-filter-simple-field-container{display:flex;flex-direction:row;flex-wrap:wrap;gap:1rem}.smart-filter-simple-field-form-widget{padding:1rem;border-radius:1rem;display:flex;flex-direction:column}.smart-filter-simple-field-form-widget-row{display:flex;flex-direction:row;justify-content:space-between}.smart-filter-simple-field-form-widget-row p{color:#00000042}.smart-filter-simple-field-form-widget ::ng-deep .mat-icon-button{height:24px;width:24px}.smart-filter-simple-field-form-widget ::ng-deep .mat-button .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-flat-button .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-stroked-button .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-raised-button .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-icon-button .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-fab .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-mini-fab .mat-button-wrapper>*{vertical-align:inherit!important}.smart-filter-simple-field-subfields-container{display:flex;flex-direction:row;flex-wrap:wrap;gap:1rem}.smart-filter-simple-field-container ::ng-deep h4{margin:0}\n"], components: [{ 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: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i5.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { type: i5.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }], directives: [{ type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
9803
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterSimpleFieldComponent, decorators: [{
9804
- type: Component,
9805
- args: [{ selector: 'smart-filter-simple-field', template: "<div class=\"smart-filter-simple-field-container\">\r\n <div class=\"smart-filter-simple-field-form-widget\">\r\n <div\r\n class=\"smart-filter-simple-field-form-widget-row\"\r\n *ngIf=\"showPossibleActions\"\r\n >\r\n <p>({{ currentOperation }})</p>\r\n <button\r\n mat-icon-button\r\n [matMenuTriggerFor]=\"menu\"\r\n aria-label=\"Example icon-button with a menu\"\r\n >\r\n <mat-icon>more_vert</mat-icon>\r\n </button>\r\n <mat-menu #menu=\"matMenu\">\r\n <button\r\n mat-menu-item\r\n *ngFor=\"let option of filterExpressionField.possibleOperations\"\r\n (click)=\"optionSelected(option)\"\r\n >\r\n <span>\r\n {{ getOptionLabel(option) }}\r\n </span>\r\n </button>\r\n </mat-menu>\r\n </div>\r\n <ng-template #form></ng-template>\r\n </div>\r\n</div>\r\n", styles: [".smart-filter-simple-field-container{display:flex;flex-direction:row;flex-wrap:wrap;gap:1rem}.smart-filter-simple-field-form-widget{padding:1rem;border-radius:1rem;display:flex;flex-direction:column}.smart-filter-simple-field-form-widget-row{display:flex;flex-direction:row;justify-content:space-between}.smart-filter-simple-field-form-widget-row p{color:#00000042}.smart-filter-simple-field-form-widget ::ng-deep .mat-icon-button{height:24px;width:24px}.smart-filter-simple-field-form-widget ::ng-deep .mat-button .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-flat-button .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-stroked-button .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-raised-button .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-icon-button .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-fab .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-mini-fab .mat-button-wrapper>*{vertical-align:inherit!important}.smart-filter-simple-field-subfields-container{display:flex;flex-direction:row;flex-wrap:wrap;gap:1rem}.smart-filter-simple-field-container ::ng-deep h4{margin:0}\n"] }]
9806
- }], ctorParameters: function () { return [{ type: SmartFilterService }, { type: ComponentFactoryService }]; }, propDecorators: { simpleFieldChildren: [{
9807
- type: ViewChildren,
9808
- args: ['simpleField']
9809
- }], operationTranslator: [{
9810
- type: Input
9811
- }], filterExpressionField: [{
9812
- type: Input
9813
- }], showPossibleActions: [{
9814
- type: Input
9815
- }], vcRefForm: [{
9816
- type: ViewChild,
9817
- args: ['form', { read: ViewContainerRef }]
9818
- }] } });
9819
-
9820
- class SmartFilterSimpleComponent {
9821
- constructor(service) {
9822
- this.service = service;
9823
- this._destroy$ = new Subject();
9824
- this.service.reSubscribeToSubmit.pipe(takeUntil(this._destroy$)).subscribe(() => {
9825
- this.subscribeToSubmit();
9826
- });
9827
- this.subscribeToSubmit();
9828
- }
9829
- ngOnInit() {
9830
- this.smartFilter = this.service.filter;
9831
- }
9832
- ngOnDestroy() {
9833
- this._destroy$.next();
9834
- this._destroy$.complete();
9835
- }
9836
- subscribeToSubmit() {
9837
- this.service.shouldSubmit.pipe(takeUntil(this._destroy$)).subscribe(() => {
9838
- this.submit();
9839
- });
9840
- }
9841
- submit() {
9842
- this.simpleFieldChildren.forEach((smartFilterFieldComponent, index) => {
9843
- this.smartFilter.data[index] = smartFilterFieldComponent.submit();
9844
- });
9845
- this.service.filter = this.smartFilter;
9846
- this.service.shouldSubmit.complete();
9847
- }
9848
- }
9849
- SmartFilterSimpleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterSimpleComponent, deps: [{ token: SmartFilterService }], target: i0.ɵɵFactoryTarget.Component });
9850
- SmartFilterSimpleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartFilterSimpleComponent, selector: "smart-filter-simple", viewQueries: [{ propertyName: "simpleFieldChildren", predicate: ["simpleField"], descendants: true }], ngImport: i0, template: "<div *ngIf=\"smartFilter\" class=\"smart-simple-fields-container\">\r\n <div *ngFor=\"let filterExpressionField of smartFilter.data; let i = index\">\r\n <smart-filter-simple-field\r\n #simpleField\r\n [filterExpressionField]=\"filterExpressionField\"\r\n [operationTranslator]=\"smartFilter.operationTranslator\"\r\n [showPossibleActions]=\"smartFilter.showPossibleActions\"\r\n ></smart-filter-simple-field>\r\n <div *ngFor=\"let subfilterExpressionField of filterExpressionField.subFieldList?.filters\">\r\n <smart-filter-simple-field\r\n #simpleField\r\n [filterExpressionField]=\"filterExpressionField\"\r\n [operationTranslator]=\"smartFilter.operationTranslator\"\r\n [showPossibleActions]=\"smartFilter.showPossibleActions\"\r\n ></smart-filter-simple-field>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".smart-simple-fields-container{display:flex;flex-direction:row;flex-wrap:wrap;gap:1rem;justify-content:center}\n"], components: [{ type: SmartFilterSimpleFieldComponent, selector: "smart-filter-simple-field", inputs: ["operationTranslator", "filterExpressionField", "showPossibleActions"] }], directives: [{ type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
9851
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterSimpleComponent, decorators: [{
9852
- type: Component,
9853
- args: [{ selector: "smart-filter-simple", template: "<div *ngIf=\"smartFilter\" class=\"smart-simple-fields-container\">\r\n <div *ngFor=\"let filterExpressionField of smartFilter.data; let i = index\">\r\n <smart-filter-simple-field\r\n #simpleField\r\n [filterExpressionField]=\"filterExpressionField\"\r\n [operationTranslator]=\"smartFilter.operationTranslator\"\r\n [showPossibleActions]=\"smartFilter.showPossibleActions\"\r\n ></smart-filter-simple-field>\r\n <div *ngFor=\"let subfilterExpressionField of filterExpressionField.subFieldList?.filters\">\r\n <smart-filter-simple-field\r\n #simpleField\r\n [filterExpressionField]=\"filterExpressionField\"\r\n [operationTranslator]=\"smartFilter.operationTranslator\"\r\n [showPossibleActions]=\"smartFilter.showPossibleActions\"\r\n ></smart-filter-simple-field>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".smart-simple-fields-container{display:flex;flex-direction:row;flex-wrap:wrap;gap:1rem;justify-content:center}\n"] }]
9854
- }], ctorParameters: function () { return [{ type: SmartFilterService }]; }, propDecorators: { simpleFieldChildren: [{
9855
- type: ViewChildren,
9856
- args: ["simpleField"]
9857
- }] } });
9858
-
9859
- class SmartFilterComponent {
9860
- constructor(service) {
9861
- this.service = service;
9862
- }
9863
- ngOnInit() {
9864
- if (this.filter) {
9865
- this.setUp();
9866
- }
9867
- }
9868
- ngOnChanges(changes) {
9869
- if (changes['filter'].currentValue) {
9870
- this.setUp();
9871
- }
9872
- }
9873
- setUp() {
9874
- this.service.filter = this.filter;
9875
- }
9876
- submit() {
9877
- return __awaiter(this, void 0, void 0, function* () {
9878
- return yield this.service.submit();
9879
- });
9880
- }
9881
- }
9882
- SmartFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterComponent, deps: [{ token: SmartFilterService }], target: i0.ɵɵFactoryTarget.Component });
9883
- SmartFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartFilterComponent, selector: "smart-filter", inputs: { filter: "filter" }, providers: [SmartFilterService], usesOnChanges: true, ngImport: i0, template: "<smart-filter-simple *ngIf=\"filter\" #simpleFilter></smart-filter-simple>\r\n", styles: [""], components: [{ type: SmartFilterSimpleComponent, selector: "smart-filter-simple" }], directives: [{ type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
9884
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterComponent, decorators: [{
9885
- type: Component,
9886
- args: [{ selector: 'smart-filter', providers: [SmartFilterService], template: "<smart-filter-simple *ngIf=\"filter\" #simpleFilter></smart-filter-simple>\r\n", styles: [""] }]
9887
- }], ctorParameters: function () { return [{ type: SmartFilterService }]; }, propDecorators: { filter: [{
9888
- type: Input
9889
- }] } });
9890
-
9891
- class SmartFilterExpressionFieldComponent {
9892
- constructor() { }
9893
- ngOnInit() {
9894
- }
9895
- }
9896
- SmartFilterExpressionFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterExpressionFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
9897
- SmartFilterExpressionFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartFilterExpressionFieldComponent, selector: "lib-smart-filter-expression-field", ngImport: i0, template: "", styles: [""] });
9898
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterExpressionFieldComponent, decorators: [{
9899
- type: Component,
9900
- args: [{ selector: 'lib-smart-filter-expression-field', template: "", styles: [""] }]
9901
- }], ctorParameters: function () { return []; } });
9902
-
9903
- class SmartFilterModule {
9904
- }
9905
- SmartFilterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
9906
- SmartFilterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterModule, declarations: [SmartFilterComponent,
9907
- SmartFilterExpressionFieldComponent,
9908
- SmartFilterSimpleComponent,
9909
- SmartFilterSimpleFieldComponent], imports: [BrowserModule, SmartformModule, MatMenuModule, MatIconModule, MatButtonModule], exports: [SmartFilterComponent] });
9910
- SmartFilterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterModule, imports: [[BrowserModule, SmartformModule, MatMenuModule, MatIconModule, MatButtonModule]] });
9911
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterModule, decorators: [{
9912
- type: NgModule,
9913
- args: [{
9914
- declarations: [
9915
- SmartFilterComponent,
9916
- SmartFilterExpressionFieldComponent,
9917
- SmartFilterSimpleComponent,
9918
- SmartFilterSimpleFieldComponent,
9919
- ],
9920
- imports: [BrowserModule, SmartformModule, MatMenuModule, MatIconModule, MatButtonModule],
9921
- exports: [SmartFilterComponent],
9922
- }]
9923
- }] });
9924
-
9925
- var SmartFilterPosition;
9926
- (function (SmartFilterPosition) {
9927
- SmartFilterPosition[SmartFilterPosition["TOP"] = 0] = "TOP";
9928
- SmartFilterPosition[SmartFilterPosition["BOTTOM"] = 1] = "BOTTOM";
9929
- SmartFilterPosition[SmartFilterPosition["LEFT"] = 2] = "LEFT";
9930
- SmartFilterPosition[SmartFilterPosition["RIGHT"] = 3] = "RIGHT";
9931
- })(SmartFilterPosition || (SmartFilterPosition = {}));
9932
- var SmartFilterType;
9933
- (function (SmartFilterType) {
9934
- SmartFilterType[SmartFilterType["SIMPLE"] = 0] = "SIMPLE";
9935
- SmartFilterType[SmartFilterType["ADVANCED"] = 1] = "ADVANCED";
9936
- })(SmartFilterType || (SmartFilterType = {}));
9937
-
9938
- /*
9939
- * Public API Surface of smart-filter
9940
- */
9941
-
9942
- var ExpandableSectionButtonType;
9943
- (function (ExpandableSectionButtonType) {
9944
- ExpandableSectionButtonType[ExpandableSectionButtonType["BUTTON"] = 0] = "BUTTON";
9945
- ExpandableSectionButtonType[ExpandableSectionButtonType["MENU"] = 1] = "MENU";
9946
- ExpandableSectionButtonType[ExpandableSectionButtonType["MENU_ITEM"] = 2] = "MENU_ITEM";
9947
- })(ExpandableSectionButtonType || (ExpandableSectionButtonType = {}));
9948
- var ExpandableSectionButtonIconPosition;
9949
- (function (ExpandableSectionButtonIconPosition) {
9950
- ExpandableSectionButtonIconPosition["PRE"] = "Pre";
9951
- ExpandableSectionButtonIconPosition["POST"] = "Post";
9952
- })(ExpandableSectionButtonIconPosition || (ExpandableSectionButtonIconPosition = {}));
9953
-
9954
- class ExpandableSectionComponent {
9955
- constructor(cfService) {
9956
- this.cfService = cfService;
9957
- this.stateChange = new Subject();
9958
- }
9959
- onStateChange(isOpened) {
9960
- this.data.isExpanded = isOpened;
9961
- this.stateChange.next(this.data);
9962
- if (this.data.stateChanged) {
9963
- this.data.stateChanged.next({
9964
- data: this.data.data,
9965
- isExpanded: isOpened,
9966
- index: this.data.index,
9967
- });
9968
- }
9969
- }
9970
- ngOnInit() { }
9971
- ngAfterViewInit() {
9972
- var _a, _b;
9973
- if (this.data.headerComponent) {
9974
- this.cfService.createComponent(this.vcRefheader, this.data.headerComponent, new Map([
9975
- [(_a = this.data.headerInputName) !== null && _a !== void 0 ? _a : '', this.data.headerData],
9976
- ['stateChange', this.stateChange],
9977
- ['index', this.data.index],
9978
- ['sectionIndex', this.index],
9979
- ]));
9980
- }
9981
- this.componentRef = this.cfService.createComponent(this.vcRef, this.data.customComponent, new Map([
9982
- [(_b = this.data.inputName) !== null && _b !== void 0 ? _b : '', this.data.data],
9983
- ['stateChange', this.stateChange],
9984
- ['index', this.data.index],
9985
- ['sectionIndex', this.index],
9986
- ]));
9987
- }
9988
- action(button, event) {
9989
- event.stopPropagation();
9990
- if (!button.callback) {
9991
- throw new Error(`Button with name ${button.label} or icon ${button.icon} does not have a callback!`);
9992
- }
9993
- button.callback(button.args);
9994
- }
9995
- setExpanded() { }
9996
- type() {
9997
- return ExpandableSectionButtonType;
9998
- }
9999
- position() {
10000
- return ExpandableSectionButtonIconPosition;
10001
- }
10002
- customButtonClicked(event, button, element) {
10003
- event.stopPropagation();
10004
- if (!button.callback) {
10005
- throw new Error(`Button with name ${button.label} or icon ${button.icon} does not have a callback!`);
10006
- }
10007
- button.callback(button.args, element);
9600
+ button.callback(button.args, element);
10008
9601
  }
10009
9602
  }
10010
9603
  ExpandableSectionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ExpandableSectionComponent, deps: [{ token: ComponentFactoryService }], target: i0.ɵɵFactoryTarget.Component });
@@ -12975,6 +12568,7 @@ var ComponentWidgetType;
12975
12568
  ComponentWidgetType["GRID"] = "grid";
12976
12569
  ComponentWidgetType["FILTER"] = "filter";
12977
12570
  ComponentWidgetType["TREE"] = "tree";
12571
+ ComponentWidgetType["TOOLBAR"] = "toolbar";
12978
12572
  })(ComponentWidgetType || (ComponentWidgetType = {}));
12979
12573
 
12980
12574
  /**
@@ -13040,9 +12634,10 @@ class SmartComponentLayoutComponent {
13040
12634
  constructor(layoutService) {
13041
12635
  this.layoutService = layoutService;
13042
12636
  this._destroy$ = new Subject();
12637
+ this.toolbarId = 'not_initialized_yet';
13043
12638
  }
13044
12639
  ngAfterViewInit() {
13045
- var _a, _b, _c, _d;
12640
+ var _a, _b, _c, _d, _e, _f;
13046
12641
  if ((_a = this.smartFormList) === null || _a === void 0 ? void 0 : _a.first) {
13047
12642
  this.setFormComponent((_b = this.smartFormList) === null || _b === void 0 ? void 0 : _b.first);
13048
12643
  }
@@ -13067,6 +12662,14 @@ class SmartComponentLayoutComponent {
13067
12662
  this.bindFilter();
13068
12663
  }
13069
12664
  });
12665
+ if ((_e = this.toolbarList) === null || _e === void 0 ? void 0 : _e.first) {
12666
+ this.setToolbarComponent((_f = this.toolbarList) === null || _f === void 0 ? void 0 : _f.first);
12667
+ }
12668
+ this.toolbarList.changes
12669
+ .pipe(takeUntil(this._destroy$))
12670
+ .subscribe((list) => {
12671
+ this.setToolbarComponent(list.first);
12672
+ });
13070
12673
  if (this.smartComponentLayout) {
13071
12674
  this.setUp();
13072
12675
  }
@@ -13082,7 +12685,7 @@ class SmartComponentLayoutComponent {
13082
12685
  }
13083
12686
  }
13084
12687
  setUp() {
13085
- var _a, _b, _c, _d, _e, _f, _g;
12688
+ var _a, _b, _c, _d, _e, _f, _g, _h;
13086
12689
  this.parent = (_a = this.smartComponentLayout) === null || _a === void 0 ? void 0 : _a.parentComponent;
13087
12690
  this.uuid = this.parent.uuid;
13088
12691
  this.treeService = this.parent.smartTreeService;
@@ -13102,6 +12705,10 @@ class SmartComponentLayoutComponent {
13102
12705
  else if (((_g = this.smartComponentLayout.widget) === null || _g === void 0 ? void 0 : _g.type) === ComponentWidgetType.TREE) {
13103
12706
  this.constructTree();
13104
12707
  }
12708
+ else if (((_h = this.smartComponentLayout.widget) === null || _h === void 0 ? void 0 : _h.type) === ComponentWidgetType.TOOLBAR) {
12709
+ this.constructToolbar();
12710
+ }
12711
+ this.parent.initActions();
13105
12712
  }
13106
12713
  }
13107
12714
  type() {
@@ -13158,7 +12765,7 @@ class SmartComponentLayoutComponent {
13158
12765
  constructGrid() {
13159
12766
  var _a, _b;
13160
12767
  this.smartGrid = {
13161
- gridIdentifier: (_b = (_a = this.smartComponentLayout) === null || _a === void 0 ? void 0 : _a.widget) === null || _b === void 0 ? void 0 : _b.gridIdentifier,
12768
+ gridIdentifier: (_b = (_a = this.smartComponentLayout) === null || _a === void 0 ? void 0 : _a.widget) === null || _b === void 0 ? void 0 : _b.identifier,
13162
12769
  gridModel: {
13163
12770
  page: {},
13164
12771
  },
@@ -13176,153 +12783,598 @@ class SmartComponentLayoutComponent {
13176
12783
  this.bindGrid();
13177
12784
  }
13178
12785
  }
13179
- bindGrid() {
13180
- var _a;
13181
- if (this.smartGrid && this.smartGridComponent) {
13182
- this.smartGrid = (_a = this.parent) === null || _a === void 0 ? void 0 : _a.addGrid(this.smartGrid, {
13183
- rowUiActionType: GridUiActionType.POPUP_MENU,
13184
- }, false, this.smartGridComponent);
12786
+ bindGrid() {
12787
+ var _a;
12788
+ if (this.smartGrid && this.smartGridComponent) {
12789
+ this.smartGrid = (_a = this.parent) === null || _a === void 0 ? void 0 : _a.addGrid(this.smartGrid, {
12790
+ rowUiActionType: GridUiActionType.POPUP_MENU,
12791
+ }, false, this.smartGridComponent);
12792
+ }
12793
+ }
12794
+ setToolbarComponent(comp) {
12795
+ this.toolbar = comp;
12796
+ }
12797
+ constructFilter() {
12798
+ var _a, _b, _c, _d;
12799
+ this.smartFilter = this.smartComponentLayout.parentComponent.addFilter(`filter_${this.makeid(5)}`, (_b = (_a = this.smartComponentLayout) === null || _a === void 0 ? void 0 : _a.widget) === null || _b === void 0 ? void 0 : _b.filterExpressionFieldList, (_d = (_c = this.smartComponentLayout) === null || _c === void 0 ? void 0 : _c.widget) === null || _d === void 0 ? void 0 : _d.filterType, this.smartFilterComponent);
12800
+ }
12801
+ bindFilter() {
12802
+ // TODO
12803
+ }
12804
+ constructTree() {
12805
+ var _a, _b, _c;
12806
+ this.parent.setUpDefaultTree((_b = (_a = this.smartComponentLayout) === null || _a === void 0 ? void 0 : _a.widget) === null || _b === void 0 ? void 0 : _b.identifier);
12807
+ (_c = this.treeService) === null || _c === void 0 ? void 0 : _c.initialize();
12808
+ }
12809
+ constructToolbar() {
12810
+ var _a, _b;
12811
+ let toolbarId = (_b = (_a = this.smartComponentLayout) === null || _a === void 0 ? void 0 : _a.widget) === null || _b === void 0 ? void 0 : _b.identifier;
12812
+ if (this.toolbarId !== toolbarId) {
12813
+ this.toolbarId = toolbarId;
12814
+ }
12815
+ }
12816
+ }
12817
+ SmartComponentLayoutComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartComponentLayoutComponent, deps: [{ token: SmartformLayoutDefinitionService }], target: i0.ɵɵFactoryTarget.Component });
12818
+ SmartComponentLayoutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartComponentLayoutComponent, selector: "smart-component-layout", inputs: { smartComponentLayout: "smartComponentLayout" }, viewQueries: [{ propertyName: "smartFormList", predicate: ["form"], descendants: true }, { propertyName: "smartGridList", predicate: ["grid"], descendants: true }, { propertyName: "smartFilterList", predicate: ["filter"], descendants: true }, { propertyName: "toolbarList", predicate: ["toolbar"], descendants: true }, { propertyName: "components", predicate: SmartComponentLayoutComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"smartComponentLayout?.expandable; then expandable; else normal\"> </div>\r\n\r\n<ng-template #expandable>\r\n <smart-expandable-section\r\n *ngIf=\"expandableSection\"\r\n [data]=\"expandableSection\"\r\n ></smart-expandable-section>\r\n</ng-template>\r\n\r\n<ng-template #normal>\r\n <div\r\n *ngIf=\"smartComponentLayout?.type === type().CONTAINER\"\r\n [ngClass]=\"smartComponentLayout?.direction ?? 'vertical'\"\r\n >\r\n <smart-component-layout\r\n *ngFor=\"let layout of smartComponentLayout?.components\"\r\n [smartComponentLayout]=\"layout\"\r\n ></smart-component-layout>\r\n </div>\r\n <smartform #form [smartForm]=\"smartForm\"></smartform>\r\n <smart-grid #grid [smartGrid]=\"smartGrid\" [uuid]=\"uuid!\"></smart-grid>\r\n <!-- <smart-filter #filter [filter]=\"smartFilter\"></smart-filter> -->\r\n <smart-tree *ngIf=\"treeService\" [treeService]=\"treeService!\"></smart-tree>\r\n <smart-ui-action-toolbar #toolbar [id]=\"toolbarId\"></smart-ui-action-toolbar>\r\n</ng-template>\r\n", styles: [".horizontal{display:flex;flex-direction:row}.vertical{display:flex;flex-direction:column}\n"], components: [{ type: ExpandableSectionComponent, selector: "smart-expandable-section", inputs: ["data", "index"] }, { type: SmartComponentLayoutComponent, selector: "smart-component-layout", inputs: ["smartComponentLayout"] }, { type: SmartformComponent, selector: "smartform", inputs: ["smartForm"] }, { type: SmartGridComponent, selector: "smart-grid", inputs: ["smartGrid", "uuid", "dev"] }, { type: SmartTreeComponent, selector: "smart-tree", inputs: ["treeStyle", "treeService"] }, { type: UiActionToolbarComponent, selector: "smart-ui-action-toolbar", inputs: ["uiActionModels", "uiActionDescriptorService", "id"] }], directives: [{ type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
12819
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartComponentLayoutComponent, decorators: [{
12820
+ type: Component,
12821
+ args: [{ selector: 'smart-component-layout', template: "<div *ngIf=\"smartComponentLayout?.expandable; then expandable; else normal\"> </div>\r\n\r\n<ng-template #expandable>\r\n <smart-expandable-section\r\n *ngIf=\"expandableSection\"\r\n [data]=\"expandableSection\"\r\n ></smart-expandable-section>\r\n</ng-template>\r\n\r\n<ng-template #normal>\r\n <div\r\n *ngIf=\"smartComponentLayout?.type === type().CONTAINER\"\r\n [ngClass]=\"smartComponentLayout?.direction ?? 'vertical'\"\r\n >\r\n <smart-component-layout\r\n *ngFor=\"let layout of smartComponentLayout?.components\"\r\n [smartComponentLayout]=\"layout\"\r\n ></smart-component-layout>\r\n </div>\r\n <smartform #form [smartForm]=\"smartForm\"></smartform>\r\n <smart-grid #grid [smartGrid]=\"smartGrid\" [uuid]=\"uuid!\"></smart-grid>\r\n <!-- <smart-filter #filter [filter]=\"smartFilter\"></smart-filter> -->\r\n <smart-tree *ngIf=\"treeService\" [treeService]=\"treeService!\"></smart-tree>\r\n <smart-ui-action-toolbar #toolbar [id]=\"toolbarId\"></smart-ui-action-toolbar>\r\n</ng-template>\r\n", styles: [".horizontal{display:flex;flex-direction:row}.vertical{display:flex;flex-direction:column}\n"] }]
12822
+ }], ctorParameters: function () { return [{ type: SmartformLayoutDefinitionService }]; }, propDecorators: { smartComponentLayout: [{
12823
+ type: Input
12824
+ }], smartFormList: [{
12825
+ type: ViewChildren,
12826
+ args: ['form']
12827
+ }], smartGridList: [{
12828
+ type: ViewChildren,
12829
+ args: ['grid']
12830
+ }], smartFilterList: [{
12831
+ type: ViewChildren,
12832
+ args: ['filter']
12833
+ }], toolbarList: [{
12834
+ type: ViewChildren,
12835
+ args: ['toolbar']
12836
+ }], components: [{
12837
+ type: ViewChildren,
12838
+ args: [SmartComponentLayoutComponent]
12839
+ }] } });
12840
+
12841
+ class SmartComponentLayoutModule {
12842
+ }
12843
+ SmartComponentLayoutModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartComponentLayoutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
12844
+ SmartComponentLayoutModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartComponentLayoutModule, declarations: [SmartComponentLayoutComponent], imports: [BrowserModule,
12845
+ MatCommonModule,
12846
+ SmartformModule,
12847
+ SmartGridModule,
12848
+ SmartExpandableSectionModule,
12849
+ SmarttreeModule,
12850
+ SmartViewContextModule], exports: [SmartComponentLayoutComponent] });
12851
+ SmartComponentLayoutModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartComponentLayoutModule, providers: [], imports: [[
12852
+ BrowserModule,
12853
+ MatCommonModule,
12854
+ SmartformModule,
12855
+ SmartGridModule,
12856
+ SmartExpandableSectionModule,
12857
+ SmarttreeModule,
12858
+ SmartViewContextModule,
12859
+ ]] });
12860
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartComponentLayoutModule, decorators: [{
12861
+ type: NgModule,
12862
+ args: [{
12863
+ declarations: [SmartComponentLayoutComponent],
12864
+ imports: [
12865
+ BrowserModule,
12866
+ MatCommonModule,
12867
+ SmartformModule,
12868
+ SmartGridModule,
12869
+ SmartExpandableSectionModule,
12870
+ SmarttreeModule,
12871
+ SmartViewContextModule,
12872
+ ],
12873
+ exports: [SmartComponentLayoutComponent],
12874
+ providers: [],
12875
+ }]
12876
+ }] });
12877
+
12878
+ class SmartFilterParamComponent {
12879
+ constructor() { }
12880
+ onItemClick(item) {
12881
+ this.data.serviceToUse.peformWidgetAction({
12882
+ code: 'ADD_FILTER_EXPRESSION',
12883
+ params: {
12884
+ model: item,
12885
+ },
12886
+ });
12887
+ }
12888
+ }
12889
+ SmartFilterParamComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterParamComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
12890
+ 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"] }] });
12891
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterParamComponent, decorators: [{
12892
+ type: Component,
12893
+ 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"] }]
12894
+ }], ctorParameters: function () { return []; }, propDecorators: { data: [{
12895
+ type: Input
12896
+ }] } });
12897
+
12898
+ class SmartFilterParamsComponent {
12899
+ constructor() {
12900
+ this._destroy$ = new Subject();
12901
+ this.expandableSections = [];
12902
+ }
12903
+ ngOnInit() {
12904
+ this.service.modelChanged.pipe(takeUntil(this._destroy$)).subscribe(() => {
12905
+ this.setUp(this.service.model);
12906
+ });
12907
+ this.setUp(this.service.model);
12908
+ }
12909
+ ngOnDestroy() {
12910
+ this._destroy$.next();
12911
+ this._destroy$.complete();
12912
+ }
12913
+ setUp(model) {
12914
+ if (model === null || model === void 0 ? void 0 : model.model) {
12915
+ this.filterBuilder = model.model;
12916
+ this.constructExpandableSections();
12917
+ }
12918
+ }
12919
+ constructExpandableSections() {
12920
+ if (this.filterBuilder.groups) {
12921
+ this.expandableSections = this.filterBuilder.groups.map((filterExpressionBuilderGroup) => {
12922
+ return {
12923
+ title: filterExpressionBuilderGroup.label,
12924
+ cssClass: 'filterExpressionBuilderGroup',
12925
+ customComponent: SmartFilterParamComponent,
12926
+ data: {
12927
+ group: filterExpressionBuilderGroup.fields,
12928
+ serviceToUse: this.service,
12929
+ },
12930
+ inputName: 'data',
12931
+ isExpanded: true,
12932
+ };
12933
+ });
12934
+ }
12935
+ }
12936
+ }
12937
+ SmartFilterParamsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterParamsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
12938
+ 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"] }] });
12939
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterParamsComponent, decorators: [{
12940
+ type: Component,
12941
+ 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"] }]
12942
+ }], ctorParameters: function () { return []; }, propDecorators: { service: [{
12943
+ type: Input
12944
+ }], filterVcRef: [{
12945
+ type: ViewChild,
12946
+ args: ['smartFilter', { read: ViewContainerRef }]
12947
+ }] } });
12948
+
12949
+ class SmartFilterService {
12950
+ constructor() {
12951
+ this._destroy$ = new Subject();
12952
+ this.shouldSubmit = new Subject();
12953
+ this.reSubscribeToSubmit = new Subject();
12954
+ this.change = new Subject();
12955
+ }
12956
+ ngOnDestroy() {
12957
+ this._destroy$.next();
12958
+ this._destroy$.complete();
12959
+ }
12960
+ submit() {
12961
+ return __awaiter(this, void 0, void 0, function* () {
12962
+ this.shouldSubmit.next();
12963
+ yield this.shouldSubmit.pipe(takeUntil(this._destroy$)).toPromise();
12964
+ this.shouldSubmit = new Subject();
12965
+ this.reSubscribeToSubmit.next();
12966
+ return this.filter;
12967
+ });
12968
+ }
12969
+ }
12970
+ SmartFilterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
12971
+ SmartFilterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterService, providedIn: 'root' });
12972
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterService, decorators: [{
12973
+ type: Injectable,
12974
+ args: [{
12975
+ providedIn: 'root',
12976
+ }]
12977
+ }], ctorParameters: function () { return []; } });
12978
+
12979
+ /**
12980
+ * Filter API 2
12981
+ * Filter API 2
12982
+ *
12983
+ * The version of the OpenAPI document: 1.0.0
12984
+ * Contact: info@it4all.hu
12985
+ *
12986
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12987
+ * https://openapi-generator.tech
12988
+ * Do not edit the class manually.
12989
+ */
12990
+ var FilterExpressionBoolOperator$1;
12991
+ (function (FilterExpressionBoolOperator) {
12992
+ FilterExpressionBoolOperator["AND"] = "AND";
12993
+ FilterExpressionBoolOperator["OR"] = "OR";
12994
+ })(FilterExpressionBoolOperator$1 || (FilterExpressionBoolOperator$1 = {}));
12995
+
12996
+ /**
12997
+ * Filter API 2
12998
+ * Filter API 2
12999
+ *
13000
+ * The version of the OpenAPI document: 1.0.0
13001
+ * Contact: info@it4all.hu
13002
+ *
13003
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
13004
+ * https://openapi-generator.tech
13005
+ * Do not edit the class manually.
13006
+ */
13007
+ var FilterExpressionDataType;
13008
+ (function (FilterExpressionDataType) {
13009
+ FilterExpressionDataType["STRING"] = "STRING";
13010
+ FilterExpressionDataType["NUMBER"] = "NUMBER";
13011
+ FilterExpressionDataType["DATE"] = "DATE";
13012
+ FilterExpressionDataType["DATE_TIME"] = "DATE_TIME";
13013
+ FilterExpressionDataType["BOOLEAN"] = "BOOLEAN";
13014
+ })(FilterExpressionDataType || (FilterExpressionDataType = {}));
13015
+
13016
+ /**
13017
+ * Filter API 2
13018
+ * Filter API 2
13019
+ *
13020
+ * The version of the OpenAPI document: 1.0.0
13021
+ * Contact: info@it4all.hu
13022
+ *
13023
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
13024
+ * https://openapi-generator.tech
13025
+ * Do not edit the class manually.
13026
+ */
13027
+ var FilterExpressionFieldWidgetType;
13028
+ (function (FilterExpressionFieldWidgetType) {
13029
+ FilterExpressionFieldWidgetType["TEXT_FIELD"] = "TEXT_FIELD";
13030
+ FilterExpressionFieldWidgetType["TEXT_FIELD_CHIPS"] = "TEXT_FIELD_CHIPS";
13031
+ FilterExpressionFieldWidgetType["TEXT_BOX"] = "TEXT_BOX";
13032
+ FilterExpressionFieldWidgetType["SELECT"] = "SELECT";
13033
+ FilterExpressionFieldWidgetType["SELECT_MULTIPLE"] = "SELECT_MULTIPLE";
13034
+ FilterExpressionFieldWidgetType["DATE"] = "DATE";
13035
+ FilterExpressionFieldWidgetType["TIME"] = "TIME";
13036
+ FilterExpressionFieldWidgetType["DATE_TIME"] = "DATE_TIME";
13037
+ FilterExpressionFieldWidgetType["CHECK_BOX"] = "CHECK_BOX";
13038
+ FilterExpressionFieldWidgetType["RADIO_BUTTON"] = "RADIO_BUTTON";
13039
+ FilterExpressionFieldWidgetType["RANGE"] = "RANGE";
13040
+ })(FilterExpressionFieldWidgetType || (FilterExpressionFieldWidgetType = {}));
13041
+
13042
+ /**
13043
+ * Filter API 2
13044
+ * Filter API 2
13045
+ *
13046
+ * The version of the OpenAPI document: 1.0.0
13047
+ * Contact: info@it4all.hu
13048
+ *
13049
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
13050
+ * https://openapi-generator.tech
13051
+ * Do not edit the class manually.
13052
+ */
13053
+ var FilterExpressionOperation;
13054
+ (function (FilterExpressionOperation) {
13055
+ FilterExpressionOperation["EXPRESSION"] = "EXPRESSION";
13056
+ FilterExpressionOperation["EQUAL"] = "EQUAL";
13057
+ FilterExpressionOperation["NOT_EQUAL"] = "NOT_EQUAL";
13058
+ FilterExpressionOperation["LESS"] = "LESS";
13059
+ FilterExpressionOperation["LESS_OR_EQUAL"] = "LESS_OR_EQUAL";
13060
+ FilterExpressionOperation["GREATER"] = "GREATER";
13061
+ FilterExpressionOperation["GREATER_OR_EQUAL"] = "GREATER_OR_EQUAL";
13062
+ FilterExpressionOperation["LIKE"] = "LIKE";
13063
+ FilterExpressionOperation["NOT_LIKE"] = "NOT_LIKE";
13064
+ FilterExpressionOperation["BETWEEN"] = "BETWEEN";
13065
+ FilterExpressionOperation["NOT_BETWEEN"] = "NOT_BETWEEN";
13066
+ FilterExpressionOperation["IS_EMPTY"] = "IS_EMPTY";
13067
+ FilterExpressionOperation["IS_NOT_EMPTY"] = "IS_NOT_EMPTY";
13068
+ FilterExpressionOperation["EXISTS"] = "EXISTS";
13069
+ FilterExpressionOperation["NOT_EXISTS"] = "NOT_EXISTS";
13070
+ FilterExpressionOperation["IN"] = "IN";
13071
+ FilterExpressionOperation["NOT_IN"] = "NOT_IN";
13072
+ })(FilterExpressionOperation || (FilterExpressionOperation = {}));
13073
+
13074
+ /**
13075
+ * Filter API 2
13076
+ * Filter API 2
13077
+ *
13078
+ * The version of the OpenAPI document: 1.0.0
13079
+ * Contact: info@it4all.hu
13080
+ *
13081
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
13082
+ * https://openapi-generator.tech
13083
+ * Do not edit the class manually.
13084
+ */
13085
+ var FilterExpressionOrderByOrderEnum;
13086
+ (function (FilterExpressionOrderByOrderEnum) {
13087
+ FilterExpressionOrderByOrderEnum["ASC"] = "ASC";
13088
+ FilterExpressionOrderByOrderEnum["DESC"] = "DESC";
13089
+ })(FilterExpressionOrderByOrderEnum || (FilterExpressionOrderByOrderEnum = {}));
13090
+ ;
13091
+
13092
+ var FilterExpressionBuilderGroupBuilderGroupKindEnum;
13093
+ (function (FilterExpressionBuilderGroupBuilderGroupKindEnum) {
13094
+ FilterExpressionBuilderGroupBuilderGroupKindEnum["DIPLAY"] = "DIPLAY";
13095
+ FilterExpressionBuilderGroupBuilderGroupKindEnum["BRACKET"] = "BRACKET";
13096
+ FilterExpressionBuilderGroupBuilderGroupKindEnum["EXIST"] = "EXIST";
13097
+ })(FilterExpressionBuilderGroupBuilderGroupKindEnum || (FilterExpressionBuilderGroupBuilderGroupKindEnum = {}));
13098
+ ;
13099
+
13100
+ class SmartFilterSimpleFieldComponent {
13101
+ constructor(service, cfService) {
13102
+ this.service = service;
13103
+ this.cfService = cfService;
13104
+ this._destroy$ = new Subject();
13105
+ }
13106
+ ngOnInit() {
13107
+ var _a;
13108
+ this.operation = (_a = this.filterExpressionField.expressionData) === null || _a === void 0 ? void 0 : _a.currentOperation;
13109
+ this.currentOperation = this.getOptionLabel(this.operation);
13110
+ }
13111
+ ngAfterViewInit() {
13112
+ this.constructForm();
13113
+ }
13114
+ ngOnDestroy() {
13115
+ this._destroy$.next();
13116
+ this._destroy$.complete();
13117
+ }
13118
+ constructFormWidget(key, label, widgetType, possibleValues, placeholder) {
13119
+ let type = widgetType;
13120
+ if (type === FilterExpressionFieldWidgetType.DATE) {
13121
+ type = SmartFormWidgetType.DATE_PICKER;
13122
+ }
13123
+ else if (type === FilterExpressionFieldWidgetType.DATE_TIME) {
13124
+ type = SmartFormWidgetType.DATE_TIME_PICKER;
13125
+ }
13126
+ let widget = {
13127
+ key,
13128
+ label,
13129
+ type,
13130
+ value: '',
13131
+ placeholder: placeholder,
13132
+ showLabel: true,
13133
+ valueList: possibleValues.map((value) => {
13134
+ return {
13135
+ key: value.objectUri ? value.objectUri : value.code,
13136
+ label: value.displayValue,
13137
+ type: SmartFormWidgetType.ITEM,
13138
+ value: value.objectUri ? value.objectUri : value.code,
13139
+ };
13140
+ }),
13141
+ };
13142
+ return widget;
13143
+ }
13144
+ constructForm() {
13145
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
13146
+ (_a = this.vcRefForm) === null || _a === void 0 ? void 0 : _a.clear();
13147
+ let widgets = [];
13148
+ let key;
13149
+ if (this.filterExpressionField.widgetType === 'SELECT_MULTIPLE') {
13150
+ key = 'expressionData.operand2.selectedValues';
13151
+ }
13152
+ if ((_b = this.filterExpressionField.expressionData) === null || _b === void 0 ? void 0 : _b.operand2) {
13153
+ if (key !== 'expressionData.operand2.selectedValues') {
13154
+ key = 'expressionData.operand2.valueAsString';
13155
+ }
13156
+ widgets.push(this.constructFormWidget(key, this.filterExpressionField.label2, (_c = this.filterExpressionField.widgetType) !== null && _c !== void 0 ? _c : FilterExpressionFieldWidgetType.TEXT_FIELD, this.filterExpressionField.possibleValues, this.filterExpressionField.placeholder2));
13157
+ }
13158
+ if ((_d = this.filterExpressionField.expressionData) === null || _d === void 0 ? void 0 : _d.operand3) {
13159
+ if (key !== 'selectedValues') {
13160
+ key = 'expressionData.operand3.valueAsString';
13161
+ }
13162
+ widgets.push(this.constructFormWidget(key, this.filterExpressionField.label3, (_e = this.filterExpressionField.widgetType) !== null && _e !== void 0 ? _e : FilterExpressionFieldWidgetType.TEXT_FIELD, this.filterExpressionField.possibleValues, this.filterExpressionField.placeholder3));
13163
+ }
13164
+ this.operation = (_f = this.filterExpressionField.expressionData) === null || _f === void 0 ? void 0 : _f.currentOperation;
13165
+ this.currentOperation = this.getOptionLabel(this.operation);
13166
+ this.smartForm = {
13167
+ direction: SmartFormWidgetDirection.ROW,
13168
+ componentModel: { data: this.filterExpressionField },
13169
+ useOnValueChangeEvent: true,
13170
+ useOnBlurEvent: true,
13171
+ submitOnEnter: (_g = this.service.filter) === null || _g === void 0 ? void 0 : _g.submitOnEnter,
13172
+ widgets,
13173
+ translateService: (_h = this.service.filter) === null || _h === void 0 ? void 0 : _h.translateService,
13174
+ };
13175
+ // Show form on page
13176
+ this.componentRefForm = this.cfService.createComponent(this.vcRefForm, SmartformComponent, new Map([['smartForm', this.smartForm]]));
13177
+ (_j = this.componentRefForm.instance.onValueChangeSubject) === null || _j === void 0 ? void 0 : _j.pipe(takeUntil(this._destroy$)).subscribe(() => {
13178
+ this.submit();
13179
+ this.service.change.next();
13180
+ });
13181
+ (_k = this.componentRefForm.instance.onBlurSubject) === null || _k === void 0 ? void 0 : _k.pipe(takeUntil(this._destroy$)).subscribe(() => {
13182
+ this.submit();
13183
+ this.service.change.next();
13184
+ });
13185
+ }
13186
+ submit() {
13187
+ var _a;
13188
+ let form = this.componentRefForm.instance.submitForm();
13189
+ this.filterExpressionField = (_a = form.componentModel) === null || _a === void 0 ? void 0 : _a.data;
13190
+ this.simpleFieldChildren.forEach((smartFilterFieldComponent, index) => {
13191
+ let filterExpressionField = smartFilterFieldComponent.submit();
13192
+ this.filterExpressionField.subFieldList.filters[index] = filterExpressionField;
13193
+ });
13194
+ return this.filterExpressionField;
13195
+ }
13196
+ optionSelected(option) {
13197
+ var _a, _b, _c, _d;
13198
+ let oldOption = this.componentRefForm.instance.smartForm.componentModel.data.expressionData
13199
+ .currentOperation;
13200
+ this.componentRefForm.instance.smartForm.componentModel.data.expressionData.currentOperation =
13201
+ option;
13202
+ this.operation = option;
13203
+ this.currentOperation = this.getOptionLabel(this.operation);
13204
+ if (oldOption !== FilterExpressionOperation.BETWEEN &&
13205
+ option === FilterExpressionOperation.BETWEEN) {
13206
+ this.submit();
13207
+ let label = this.filterExpressionField.label2;
13208
+ this.filterExpressionField.label2 = `${label} - tól`;
13209
+ this.filterExpressionField.label3 = `${label} - ig`;
13210
+ this.filterExpressionField.expressionData.operand3 = {
13211
+ isDataName: (_a = this.filterExpressionField.expressionData.operand2) === null || _a === void 0 ? void 0 : _a.isDataName,
13212
+ type: (_b = this.filterExpressionField.expressionData.operand3) === null || _b === void 0 ? void 0 : _b.type,
13213
+ valueAsString: (_c = this.filterExpressionField.expressionData.operand3) === null || _c === void 0 ? void 0 : _c.valueAsString,
13214
+ selectedValues: (_d = this.filterExpressionField.expressionData.operand3) === null || _d === void 0 ? void 0 : _d.selectedValues,
13215
+ };
13216
+ this.constructForm();
13217
+ }
13218
+ else if (oldOption === FilterExpressionOperation.BETWEEN &&
13219
+ option !== FilterExpressionOperation.BETWEEN) {
13220
+ let label = this.filterExpressionField.label2.replace(' - tól', '');
13221
+ this.filterExpressionField.label2 = `${label}`;
13222
+ this.filterExpressionField.label3 = undefined;
13223
+ this.filterExpressionField.expressionData.operand3 = undefined;
13224
+ this.constructForm();
13225
+ }
13226
+ }
13227
+ getOptionLabel(option) {
13228
+ if (!option) {
13229
+ return '';
13185
13230
  }
13186
- }
13187
- constructFilter() {
13188
- var _a, _b, _c, _d;
13189
- this.smartFilter = this.smartComponentLayout.parentComponent.addFilter(`filter_${this.makeid(5)}`, (_b = (_a = this.smartComponentLayout) === null || _a === void 0 ? void 0 : _a.widget) === null || _b === void 0 ? void 0 : _b.filterExpressionFieldList, (_d = (_c = this.smartComponentLayout) === null || _c === void 0 ? void 0 : _c.widget) === null || _d === void 0 ? void 0 : _d.filterType, this.smartFilterComponent);
13190
- }
13191
- bindFilter() {
13192
- // TODO
13193
- }
13194
- constructTree() {
13195
- var _a, _b, _c;
13196
- this.parent.setUpDefaultTree((_b = (_a = this.smartComponentLayout) === null || _a === void 0 ? void 0 : _a.widget) === null || _b === void 0 ? void 0 : _b.treeIdentifier);
13197
- (_c = this.treeService) === null || _c === void 0 ? void 0 : _c.initialize();
13231
+ else if (this.operationTranslator) {
13232
+ return this.operationTranslator(option);
13233
+ }
13234
+ return option;
13198
13235
  }
13199
13236
  }
13200
- SmartComponentLayoutComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartComponentLayoutComponent, deps: [{ token: SmartformLayoutDefinitionService }], target: i0.ɵɵFactoryTarget.Component });
13201
- SmartComponentLayoutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartComponentLayoutComponent, selector: "smart-component-layout", inputs: { smartComponentLayout: "smartComponentLayout" }, viewQueries: [{ propertyName: "smartFormList", predicate: ["form"], descendants: true }, { propertyName: "smartGridList", predicate: ["grid"], descendants: true }, { propertyName: "smartFilterList", predicate: ["filter"], descendants: true }, { propertyName: "components", predicate: SmartComponentLayoutComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"smartComponentLayout?.expandable; then expandable; else normal\"> </div>\r\n\r\n<ng-template #expandable>\r\n <smart-expandable-section\r\n *ngIf=\"expandableSection\"\r\n [data]=\"expandableSection\"\r\n ></smart-expandable-section>\r\n</ng-template>\r\n\r\n<ng-template #normal>\r\n <div\r\n *ngIf=\"smartComponentLayout?.type === type().CONTAINER\"\r\n [ngClass]=\"smartComponentLayout?.direction ?? 'vertical'\"\r\n >\r\n <smart-component-layout\r\n *ngFor=\"let layout of smartComponentLayout?.components\"\r\n [smartComponentLayout]=\"layout\"\r\n ></smart-component-layout>\r\n </div>\r\n <smartform #form [smartForm]=\"smartForm\"></smartform>\r\n <smart-grid #grid [smartGrid]=\"smartGrid\" [uuid]=\"uuid!\"></smart-grid>\r\n <!-- <smart-filter #filter [filter]=\"smartFilter\"></smart-filter> -->\r\n <smart-tree *ngIf=\"treeService\" [treeService]=\"treeService!\"></smart-tree>\r\n</ng-template>\r\n", styles: [".horizontal{display:flex;flex-direction:row}.vertical{display:flex;flex-direction:column}\n"], components: [{ type: ExpandableSectionComponent, selector: "smart-expandable-section", inputs: ["data", "index"] }, { type: SmartComponentLayoutComponent, selector: "smart-component-layout", inputs: ["smartComponentLayout"] }, { type: SmartformComponent, selector: "smartform", inputs: ["smartForm"] }, { type: SmartGridComponent, selector: "smart-grid", inputs: ["smartGrid", "uuid", "dev"] }, { type: SmartTreeComponent, selector: "smart-tree", inputs: ["treeStyle", "treeService"] }], directives: [{ type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
13202
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartComponentLayoutComponent, decorators: [{
13237
+ SmartFilterSimpleFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterSimpleFieldComponent, deps: [{ token: SmartFilterService }, { token: ComponentFactoryService }], target: i0.ɵɵFactoryTarget.Component });
13238
+ SmartFilterSimpleFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartFilterSimpleFieldComponent, selector: "smart-filter-simple-field", inputs: { operationTranslator: "operationTranslator", filterExpressionField: "filterExpressionField", showPossibleActions: "showPossibleActions" }, viewQueries: [{ propertyName: "vcRefForm", first: true, predicate: ["form"], descendants: true, read: ViewContainerRef }, { propertyName: "simpleFieldChildren", predicate: ["simpleField"], descendants: true }], ngImport: i0, template: "<div class=\"smart-filter-simple-field-container\">\r\n <div class=\"smart-filter-simple-field-form-widget\">\r\n <div\r\n class=\"smart-filter-simple-field-form-widget-row\"\r\n *ngIf=\"showPossibleActions\"\r\n >\r\n <p>({{ currentOperation }})</p>\r\n <button\r\n mat-icon-button\r\n [matMenuTriggerFor]=\"menu\"\r\n aria-label=\"Example icon-button with a menu\"\r\n >\r\n <mat-icon>more_vert</mat-icon>\r\n </button>\r\n <mat-menu #menu=\"matMenu\">\r\n <button\r\n mat-menu-item\r\n *ngFor=\"let option of filterExpressionField.possibleOperations\"\r\n (click)=\"optionSelected(option)\"\r\n >\r\n <span>\r\n {{ getOptionLabel(option) }}\r\n </span>\r\n </button>\r\n </mat-menu>\r\n </div>\r\n <ng-template #form></ng-template>\r\n </div>\r\n</div>\r\n", styles: [".smart-filter-simple-field-container{display:flex;flex-direction:row;flex-wrap:wrap;gap:1rem}.smart-filter-simple-field-form-widget{padding:1rem;border-radius:1rem;display:flex;flex-direction:column}.smart-filter-simple-field-form-widget-row{display:flex;flex-direction:row;justify-content:space-between}.smart-filter-simple-field-form-widget-row p{color:#00000042}.smart-filter-simple-field-form-widget ::ng-deep .mat-icon-button{height:24px;width:24px}.smart-filter-simple-field-form-widget ::ng-deep .mat-button .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-flat-button .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-stroked-button .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-raised-button .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-icon-button .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-fab .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-mini-fab .mat-button-wrapper>*{vertical-align:inherit!important}.smart-filter-simple-field-subfields-container{display:flex;flex-direction:row;flex-wrap:wrap;gap:1rem}.smart-filter-simple-field-container ::ng-deep h4{margin:0}\n"], components: [{ 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: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i5.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { type: i5.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }], directives: [{ type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
13239
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterSimpleFieldComponent, decorators: [{
13203
13240
  type: Component,
13204
- args: [{ selector: 'smart-component-layout', template: "<div *ngIf=\"smartComponentLayout?.expandable; then expandable; else normal\"> </div>\r\n\r\n<ng-template #expandable>\r\n <smart-expandable-section\r\n *ngIf=\"expandableSection\"\r\n [data]=\"expandableSection\"\r\n ></smart-expandable-section>\r\n</ng-template>\r\n\r\n<ng-template #normal>\r\n <div\r\n *ngIf=\"smartComponentLayout?.type === type().CONTAINER\"\r\n [ngClass]=\"smartComponentLayout?.direction ?? 'vertical'\"\r\n >\r\n <smart-component-layout\r\n *ngFor=\"let layout of smartComponentLayout?.components\"\r\n [smartComponentLayout]=\"layout\"\r\n ></smart-component-layout>\r\n </div>\r\n <smartform #form [smartForm]=\"smartForm\"></smartform>\r\n <smart-grid #grid [smartGrid]=\"smartGrid\" [uuid]=\"uuid!\"></smart-grid>\r\n <!-- <smart-filter #filter [filter]=\"smartFilter\"></smart-filter> -->\r\n <smart-tree *ngIf=\"treeService\" [treeService]=\"treeService!\"></smart-tree>\r\n</ng-template>\r\n", styles: [".horizontal{display:flex;flex-direction:row}.vertical{display:flex;flex-direction:column}\n"] }]
13205
- }], ctorParameters: function () { return [{ type: SmartformLayoutDefinitionService }]; }, propDecorators: { smartComponentLayout: [{
13206
- type: Input
13207
- }], smartFormList: [{
13208
- type: ViewChildren,
13209
- args: ['form']
13210
- }], smartGridList: [{
13211
- type: ViewChildren,
13212
- args: ['grid']
13213
- }], smartFilterList: [{
13214
- type: ViewChildren,
13215
- args: ['filter']
13216
- }], components: [{
13241
+ args: [{ selector: 'smart-filter-simple-field', template: "<div class=\"smart-filter-simple-field-container\">\r\n <div class=\"smart-filter-simple-field-form-widget\">\r\n <div\r\n class=\"smart-filter-simple-field-form-widget-row\"\r\n *ngIf=\"showPossibleActions\"\r\n >\r\n <p>({{ currentOperation }})</p>\r\n <button\r\n mat-icon-button\r\n [matMenuTriggerFor]=\"menu\"\r\n aria-label=\"Example icon-button with a menu\"\r\n >\r\n <mat-icon>more_vert</mat-icon>\r\n </button>\r\n <mat-menu #menu=\"matMenu\">\r\n <button\r\n mat-menu-item\r\n *ngFor=\"let option of filterExpressionField.possibleOperations\"\r\n (click)=\"optionSelected(option)\"\r\n >\r\n <span>\r\n {{ getOptionLabel(option) }}\r\n </span>\r\n </button>\r\n </mat-menu>\r\n </div>\r\n <ng-template #form></ng-template>\r\n </div>\r\n</div>\r\n", styles: [".smart-filter-simple-field-container{display:flex;flex-direction:row;flex-wrap:wrap;gap:1rem}.smart-filter-simple-field-form-widget{padding:1rem;border-radius:1rem;display:flex;flex-direction:column}.smart-filter-simple-field-form-widget-row{display:flex;flex-direction:row;justify-content:space-between}.smart-filter-simple-field-form-widget-row p{color:#00000042}.smart-filter-simple-field-form-widget ::ng-deep .mat-icon-button{height:24px;width:24px}.smart-filter-simple-field-form-widget ::ng-deep .mat-button .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-flat-button .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-stroked-button .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-raised-button .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-icon-button .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-fab .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-mini-fab .mat-button-wrapper>*{vertical-align:inherit!important}.smart-filter-simple-field-subfields-container{display:flex;flex-direction:row;flex-wrap:wrap;gap:1rem}.smart-filter-simple-field-container ::ng-deep h4{margin:0}\n"] }]
13242
+ }], ctorParameters: function () { return [{ type: SmartFilterService }, { type: ComponentFactoryService }]; }, propDecorators: { simpleFieldChildren: [{
13217
13243
  type: ViewChildren,
13218
- args: [SmartComponentLayoutComponent]
13219
- }] } });
13220
-
13221
- class SmartComponentLayoutModule {
13222
- }
13223
- SmartComponentLayoutModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartComponentLayoutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
13224
- SmartComponentLayoutModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartComponentLayoutModule, declarations: [SmartComponentLayoutComponent], imports: [BrowserModule,
13225
- MatCommonModule,
13226
- SmartformModule,
13227
- SmartGridModule,
13228
- SmartExpandableSectionModule,
13229
- SmarttreeModule], exports: [SmartComponentLayoutComponent] });
13230
- SmartComponentLayoutModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartComponentLayoutModule, providers: [], imports: [[
13231
- BrowserModule,
13232
- MatCommonModule,
13233
- SmartformModule,
13234
- SmartGridModule,
13235
- SmartExpandableSectionModule,
13236
- SmarttreeModule,
13237
- ]] });
13238
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartComponentLayoutModule, decorators: [{
13239
- type: NgModule,
13240
- args: [{
13241
- declarations: [SmartComponentLayoutComponent],
13242
- imports: [
13243
- BrowserModule,
13244
- MatCommonModule,
13245
- SmartformModule,
13246
- SmartGridModule,
13247
- SmartExpandableSectionModule,
13248
- SmarttreeModule,
13249
- ],
13250
- exports: [SmartComponentLayoutComponent],
13251
- providers: [],
13252
- }]
13253
- }] });
13254
-
13255
- class SmartFilterParamComponent {
13256
- constructor() { }
13257
- onItemClick(item) {
13258
- this.data.serviceToUse.peformWidgetAction({
13259
- code: 'ADD_FILTER_EXPRESSION',
13260
- params: {
13261
- model: item,
13262
- },
13263
- });
13264
- }
13265
- }
13266
- SmartFilterParamComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterParamComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
13267
- 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"] }] });
13268
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterParamComponent, decorators: [{
13269
- type: Component,
13270
- 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"] }]
13271
- }], ctorParameters: function () { return []; }, propDecorators: { data: [{
13244
+ args: ['simpleField']
13245
+ }], operationTranslator: [{
13246
+ type: Input
13247
+ }], filterExpressionField: [{
13248
+ type: Input
13249
+ }], showPossibleActions: [{
13272
13250
  type: Input
13251
+ }], vcRefForm: [{
13252
+ type: ViewChild,
13253
+ args: ['form', { read: ViewContainerRef }]
13273
13254
  }] } });
13274
13255
 
13275
- class SmartFilterParamsComponent {
13276
- constructor() {
13256
+ class SmartFilterSimpleComponent {
13257
+ constructor(service) {
13258
+ this.service = service;
13277
13259
  this._destroy$ = new Subject();
13278
- this.expandableSections = [];
13260
+ this.service.reSubscribeToSubmit.pipe(takeUntil(this._destroy$)).subscribe(() => {
13261
+ this.subscribeToSubmit();
13262
+ });
13263
+ this.subscribeToSubmit();
13279
13264
  }
13280
13265
  ngOnInit() {
13281
- this.service.modelChanged.pipe(takeUntil(this._destroy$)).subscribe(() => {
13282
- this.setUp(this.service.model);
13283
- });
13284
- this.setUp(this.service.model);
13266
+ this.smartFilter = this.service.filter;
13285
13267
  }
13286
13268
  ngOnDestroy() {
13287
13269
  this._destroy$.next();
13288
13270
  this._destroy$.complete();
13289
13271
  }
13290
- setUp(model) {
13291
- if (model === null || model === void 0 ? void 0 : model.model) {
13292
- this.filterBuilder = model.model;
13293
- this.constructExpandableSections();
13272
+ subscribeToSubmit() {
13273
+ this.service.shouldSubmit.pipe(takeUntil(this._destroy$)).subscribe(() => {
13274
+ this.submit();
13275
+ });
13276
+ }
13277
+ submit() {
13278
+ this.simpleFieldChildren.forEach((smartFilterFieldComponent, index) => {
13279
+ this.smartFilter.data[index] = smartFilterFieldComponent.submit();
13280
+ });
13281
+ this.service.filter = this.smartFilter;
13282
+ this.service.shouldSubmit.complete();
13283
+ }
13284
+ }
13285
+ SmartFilterSimpleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterSimpleComponent, deps: [{ token: SmartFilterService }], target: i0.ɵɵFactoryTarget.Component });
13286
+ SmartFilterSimpleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartFilterSimpleComponent, selector: "smart-filter-simple", viewQueries: [{ propertyName: "simpleFieldChildren", predicate: ["simpleField"], descendants: true }], ngImport: i0, template: "<div *ngIf=\"smartFilter\" class=\"smart-simple-fields-container\">\r\n <div *ngFor=\"let filterExpressionField of smartFilter.data; let i = index\">\r\n <smart-filter-simple-field\r\n #simpleField\r\n [filterExpressionField]=\"filterExpressionField\"\r\n [operationTranslator]=\"smartFilter.operationTranslator\"\r\n [showPossibleActions]=\"smartFilter.showPossibleActions\"\r\n ></smart-filter-simple-field>\r\n <div *ngFor=\"let subfilterExpressionField of filterExpressionField.subFieldList?.filters\">\r\n <smart-filter-simple-field\r\n #simpleField\r\n [filterExpressionField]=\"filterExpressionField\"\r\n [operationTranslator]=\"smartFilter.operationTranslator\"\r\n [showPossibleActions]=\"smartFilter.showPossibleActions\"\r\n ></smart-filter-simple-field>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".smart-simple-fields-container{display:flex;flex-direction:row;flex-wrap:wrap;gap:1rem;justify-content:center}\n"], components: [{ type: SmartFilterSimpleFieldComponent, selector: "smart-filter-simple-field", inputs: ["operationTranslator", "filterExpressionField", "showPossibleActions"] }], directives: [{ type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
13287
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterSimpleComponent, decorators: [{
13288
+ type: Component,
13289
+ args: [{ selector: "smart-filter-simple", template: "<div *ngIf=\"smartFilter\" class=\"smart-simple-fields-container\">\r\n <div *ngFor=\"let filterExpressionField of smartFilter.data; let i = index\">\r\n <smart-filter-simple-field\r\n #simpleField\r\n [filterExpressionField]=\"filterExpressionField\"\r\n [operationTranslator]=\"smartFilter.operationTranslator\"\r\n [showPossibleActions]=\"smartFilter.showPossibleActions\"\r\n ></smart-filter-simple-field>\r\n <div *ngFor=\"let subfilterExpressionField of filterExpressionField.subFieldList?.filters\">\r\n <smart-filter-simple-field\r\n #simpleField\r\n [filterExpressionField]=\"filterExpressionField\"\r\n [operationTranslator]=\"smartFilter.operationTranslator\"\r\n [showPossibleActions]=\"smartFilter.showPossibleActions\"\r\n ></smart-filter-simple-field>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".smart-simple-fields-container{display:flex;flex-direction:row;flex-wrap:wrap;gap:1rem;justify-content:center}\n"] }]
13290
+ }], ctorParameters: function () { return [{ type: SmartFilterService }]; }, propDecorators: { simpleFieldChildren: [{
13291
+ type: ViewChildren,
13292
+ args: ["simpleField"]
13293
+ }] } });
13294
+
13295
+ class SmartFilterComponent {
13296
+ constructor(service) {
13297
+ this.service = service;
13298
+ }
13299
+ ngOnInit() {
13300
+ if (this.filter) {
13301
+ this.setUp();
13294
13302
  }
13295
13303
  }
13296
- constructExpandableSections() {
13297
- if (this.filterBuilder.groups) {
13298
- this.expandableSections = this.filterBuilder.groups.map((filterExpressionBuilderGroup) => {
13299
- return {
13300
- title: filterExpressionBuilderGroup.label,
13301
- cssClass: 'filterExpressionBuilderGroup',
13302
- customComponent: SmartFilterParamComponent,
13303
- data: {
13304
- group: filterExpressionBuilderGroup.fields,
13305
- serviceToUse: this.service,
13306
- },
13307
- inputName: 'data',
13308
- isExpanded: true,
13309
- };
13310
- });
13304
+ ngOnChanges(changes) {
13305
+ if (changes['filter'].currentValue) {
13306
+ this.setUp();
13311
13307
  }
13312
13308
  }
13309
+ setUp() {
13310
+ this.service.filter = this.filter;
13311
+ }
13312
+ submit() {
13313
+ return __awaiter(this, void 0, void 0, function* () {
13314
+ return yield this.service.submit();
13315
+ });
13316
+ }
13313
13317
  }
13314
- SmartFilterParamsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterParamsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
13315
- 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"] }] });
13316
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterParamsComponent, decorators: [{
13318
+ SmartFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterComponent, deps: [{ token: SmartFilterService }], target: i0.ɵɵFactoryTarget.Component });
13319
+ SmartFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartFilterComponent, selector: "smart-filter", inputs: { filter: "filter" }, providers: [SmartFilterService], usesOnChanges: true, ngImport: i0, template: "<smart-filter-simple *ngIf=\"filter\" #simpleFilter></smart-filter-simple>\r\n", styles: [""], components: [{ type: SmartFilterSimpleComponent, selector: "smart-filter-simple" }], directives: [{ type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
13320
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterComponent, decorators: [{
13317
13321
  type: Component,
13318
- 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"] }]
13319
- }], ctorParameters: function () { return []; }, propDecorators: { service: [{
13322
+ args: [{ selector: 'smart-filter', providers: [SmartFilterService], template: "<smart-filter-simple *ngIf=\"filter\" #simpleFilter></smart-filter-simple>\r\n", styles: [""] }]
13323
+ }], ctorParameters: function () { return [{ type: SmartFilterService }]; }, propDecorators: { filter: [{
13320
13324
  type: Input
13321
- }], filterVcRef: [{
13322
- type: ViewChild,
13323
- args: ['smartFilter', { read: ViewContainerRef }]
13324
13325
  }] } });
13325
13326
 
13327
+ class SmartFilterExpressionFieldComponent {
13328
+ constructor() { }
13329
+ ngOnInit() {
13330
+ }
13331
+ }
13332
+ SmartFilterExpressionFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterExpressionFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
13333
+ SmartFilterExpressionFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartFilterExpressionFieldComponent, selector: "lib-smart-filter-expression-field", ngImport: i0, template: "", styles: [""] });
13334
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterExpressionFieldComponent, decorators: [{
13335
+ type: Component,
13336
+ args: [{ selector: 'lib-smart-filter-expression-field', template: "", styles: [""] }]
13337
+ }], ctorParameters: function () { return []; } });
13338
+
13339
+ class SmartFilterModule {
13340
+ }
13341
+ SmartFilterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
13342
+ SmartFilterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterModule, declarations: [SmartFilterComponent,
13343
+ SmartFilterExpressionFieldComponent,
13344
+ SmartFilterSimpleComponent,
13345
+ SmartFilterSimpleFieldComponent], imports: [BrowserModule, SmartformModule, MatMenuModule, MatIconModule, MatButtonModule], exports: [SmartFilterComponent] });
13346
+ SmartFilterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterModule, imports: [[BrowserModule, SmartformModule, MatMenuModule, MatIconModule, MatButtonModule]] });
13347
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterModule, decorators: [{
13348
+ type: NgModule,
13349
+ args: [{
13350
+ declarations: [
13351
+ SmartFilterComponent,
13352
+ SmartFilterExpressionFieldComponent,
13353
+ SmartFilterSimpleComponent,
13354
+ SmartFilterSimpleFieldComponent,
13355
+ ],
13356
+ imports: [BrowserModule, SmartformModule, MatMenuModule, MatIconModule, MatButtonModule],
13357
+ exports: [SmartFilterComponent],
13358
+ }]
13359
+ }] });
13360
+
13361
+ var SmartFilterPosition;
13362
+ (function (SmartFilterPosition) {
13363
+ SmartFilterPosition[SmartFilterPosition["TOP"] = 0] = "TOP";
13364
+ SmartFilterPosition[SmartFilterPosition["BOTTOM"] = 1] = "BOTTOM";
13365
+ SmartFilterPosition[SmartFilterPosition["LEFT"] = 2] = "LEFT";
13366
+ SmartFilterPosition[SmartFilterPosition["RIGHT"] = 3] = "RIGHT";
13367
+ })(SmartFilterPosition || (SmartFilterPosition = {}));
13368
+ var SmartFilterType;
13369
+ (function (SmartFilterType) {
13370
+ SmartFilterType[SmartFilterType["SIMPLE"] = 0] = "SIMPLE";
13371
+ SmartFilterType[SmartFilterType["ADVANCED"] = 1] = "ADVANCED";
13372
+ })(SmartFilterType || (SmartFilterType = {}));
13373
+
13374
+ /*
13375
+ * Public API Surface of smart-filter
13376
+ */
13377
+
13326
13378
  var FilterExpressionBuilderUiModelTypeEnum;
13327
13379
  (function (FilterExpressionBuilderUiModelTypeEnum) {
13328
13380
  FilterExpressionBuilderUiModelTypeEnum["SIMPLE"] = "SIMPLE";
@@ -13519,28 +13571,28 @@ class SmartFilterEditorContentComponent {
13519
13571
  model[index] = filterExpressionField;
13520
13572
  if (filterExpressionField.widgetType === 'SELECT_MULTIPLE') {
13521
13573
  key = index + '.expressionData.operand2.selectedValues';
13522
- 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 : ''));
13574
+ widgets.push(this.constructFormWidget(key, filterExpressionField.label2, (_a = filterExpressionField.widgetType) !== null && _a !== void 0 ? _a : FilterExpressionFieldWidgetType.TEXT_FIELD, 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 : ''));
13523
13575
  return;
13524
13576
  }
13525
13577
  if (((_e = filterExpressionField.expressionData) === null || _e === void 0 ? void 0 : _e.currentOperation) === 'BETWEEN') {
13526
13578
  key = index + '.expressionData.operand2.valueAsString';
13527
- 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 : ''));
13579
+ widgets.push(this.constructFormWidget(key, filterExpressionField.label2, (_f = filterExpressionField.widgetType) !== null && _f !== void 0 ? _f : FilterExpressionFieldWidgetType.TEXT_FIELD, 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 : ''));
13528
13580
  key = index + '.expressionData.operand3.valueAsString';
13529
- widgets.push(this.constructFormWidget(key, filterExpressionField.label3, (_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 : ''));
13581
+ widgets.push(this.constructFormWidget(key, filterExpressionField.label3, (_k = filterExpressionField.widgetType) !== null && _k !== void 0 ? _k : FilterExpressionFieldWidgetType.TEXT_FIELD, 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 : ''));
13530
13582
  return;
13531
13583
  }
13532
13584
  if ((_p = filterExpressionField.expressionData) === null || _p === void 0 ? void 0 : _p.operand2) {
13533
13585
  if (key !== index + '.expressionData.operand2.selectedValues') {
13534
13586
  key = index + '.expressionData.operand2.valueAsString';
13535
13587
  }
13536
- 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 : ''));
13588
+ widgets.push(this.constructFormWidget(key, filterExpressionField.label2, (_q = filterExpressionField.widgetType) !== null && _q !== void 0 ? _q : FilterExpressionFieldWidgetType.TEXT_FIELD, 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 : ''));
13537
13589
  return;
13538
13590
  }
13539
13591
  if ((_u = filterExpressionField === null || filterExpressionField === void 0 ? void 0 : filterExpressionField.expressionData) === null || _u === void 0 ? void 0 : _u.operand3) {
13540
13592
  if (key !== index + '.selectedValues') {
13541
13593
  key = index + '.expressionData.operand3.valueAsString';
13542
13594
  }
13543
- 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 : ''));
13595
+ widgets.push(this.constructFormWidget(key, filterExpressionField.label3, (_v = filterExpressionField.widgetType) !== null && _v !== void 0 ? _v : FilterExpressionFieldWidgetType.TEXT_FIELD, 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 : ''));
13544
13596
  return;
13545
13597
  }
13546
13598
  });
@@ -13654,10 +13706,10 @@ class SmartFilterEditorContentComponent {
13654
13706
  }
13655
13707
  constructFormWidget(key, label, widgetType, possibleValues, value) {
13656
13708
  let type = widgetType;
13657
- if (type === FilterExpressionFieldWidgetType.Date) {
13709
+ if (type === FilterExpressionFieldWidgetType.DATE) {
13658
13710
  type = SmartFormWidgetType.DATE_PICKER;
13659
13711
  }
13660
- else if (type === FilterExpressionFieldWidgetType.DateTime) {
13712
+ else if (type === FilterExpressionFieldWidgetType.DATE_TIME) {
13661
13713
  type = SmartFormWidgetType.DATE_TIME_PICKER;
13662
13714
  }
13663
13715
  let widget = {
@@ -14182,6 +14234,18 @@ class SmartComponentLayoutUtility {
14182
14234
  }
14183
14235
  return result;
14184
14236
  }
14237
+ static getToolbars(comp) {
14238
+ let result = [];
14239
+ if (comp.components) {
14240
+ result = comp.components
14241
+ .map((c) => this.getToolbars(c))
14242
+ .reduce((acc, value) => acc.concat(value), []);
14243
+ }
14244
+ if (comp.toolbar) {
14245
+ result.push(comp.toolbar);
14246
+ }
14247
+ return result;
14248
+ }
14185
14249
  }
14186
14250
 
14187
14251
  /*
@@ -14656,6 +14720,7 @@ class SmartComponentApiClient {
14656
14720
  if (comp.smartComponentLayout) {
14657
14721
  // TODO maybe we should set comp.parent, not comp.smartComponentLayout.parentComponent..
14658
14722
  SmartComponentLayoutUtility.setParent(comp.smartComponentLayout, this);
14723
+ this.initActions();
14659
14724
  }
14660
14725
  if (this.uuid && this.uuid !== comp.uuid)
14661
14726
  comp.uuid = this.uuid;
@@ -14782,13 +14847,16 @@ class SmartComponentApiClient {
14782
14847
  return filters;
14783
14848
  }
14784
14849
  getAllSmartUiActionToolbars() {
14785
- var _a, _b, _c;
14850
+ var _a, _b, _c, _d;
14786
14851
  let toolbars = (_b = (_a = this.getSmartUiActionToolbarsQL()) === null || _a === void 0 ? void 0 : _a.toArray()) !== null && _b !== void 0 ? _b : [];
14787
14852
  (_c = this.getAllSmartGridComponents()) === null || _c === void 0 ? void 0 : _c.forEach((grid) => {
14788
14853
  if (grid.toolbar) {
14789
14854
  toolbars.push(grid.toolbar);
14790
14855
  }
14791
14856
  });
14857
+ (_d = this.getSmartComponentLayoutsQL()) === null || _d === void 0 ? void 0 : _d.forEach((comp) => {
14858
+ toolbars.push(...SmartComponentLayoutUtility.getToolbars(comp));
14859
+ });
14792
14860
  return toolbars;
14793
14861
  }
14794
14862
  initData() {
@@ -15352,5 +15420,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
15352
15420
  * Generated bundle index. Do not edit.
15353
15421
  */
15354
15422
 
15355
- export { APIS$3 as APIS, ApiModule$3 as ApiModule, ApiQueueService, BASE_PATH$5 as BASE_PATH, COLLECTION_FORMATS$5 as COLLECTION_FORMATS, CloseResult, ComponentFactoryService, ComponentFactoryServiceModule, ComponentType, ComponentWidgetType, Configuration$5 as Configuration, DIALOG_DISABLE_CLOSE, DataChangeKind, DefaultUiActionCode_CLOSE, ExpandableSectionButtonIconPosition, ExpandableSectionButtonType, ExpandableSectionComponent, FilterExpressionBoolOperator$1 as FilterExpressionBoolOperator, FilterExpressionBuilderGroup, FilterExpressionDataType, FilterExpressionFieldWidgetType, FilterExpressionOperation, FilterExpressionOrderBy, GridColumnContentType, GridDataAccessConfigKindEnum, GridSelectionMode, GridSelectionType, GridUiActionType, GridViewDescriptorKindEnum, IS_ASYNC_PARAM_NAME, IconPosition, ImageResourceKindEnum, LayoutDirection, LinkTargetEnum, MessageOptionType, MessageTextType, MessageType, SelectionDefinitionTypeEnum, SessionAPIS, SessionErrorBehaviour, SessionService, SharedModule, SimplifiedTabGroupComponent, SmartActionType, SmartAuthService, SmartComponent, SmartComponentApiClient, SmartComponentLayoutComponent, SmartComponentLayoutModule, SmartComponentLayoutUtility, SmartDatePipe, SmartDateTimePipe, SmartDialog, SmartExpandableSectionModule, SmartExpandableSectionService, SmartFileUploaderComponent, SmartFilterComponent, SmartFilterEditorContentComponent, SmartFilterEditorModule, SmartFilterEditorService, SmartFilterExpressionItemComponent, SmartFilterExpressionItemsComponent, SmartFilterModule, SmartFilterParamComponent, SmartFilterParamsComponent, SmartFilterPosition, SmartFilterType, SmartFormTextFieldButtonIconPosition, SmartFormWidgetDirection, SmartFormWidgetType, SmartFormWidgetWidth, SmartGridButtonType, SmartGridComponent, SmartGridDataLayout, SmartGridModule, SmartGridService, SmartGridType, SmartIconComponent, SmartIconModule, SmartIconService, SmartLayoutDef, SmartLinkChannelVariableInPath, SmartLinkUuidVariableInPath, SmartNavbarComponent, SmartNavbarModule, SmartNavbarService, SmartNavigationModule, SmartNavigationService, SmartNgClientModule, SmartNgClientService, SmartService, SmartSessionModule, SmartSessionService, SmartSessionTimerComponent, SmartSessionTimerService, SmartSubject, SmartTabGroupModule, SmartTabGroupService, SmartTable, SmartTableButtonType, SmartTableHeaderPropertyType, SmartTableInterfaceTypeEnum, SmartTableOptionButtonDirection, SmartTableOrder, SmartTableType, SmartTimePipe, SmartTooltipDirective, SmartTreeComponent, SmartTreeNodeButtonType, SmartUserSettinsIconPosition, SmartValidatorName, SmartViewContextErrorDialogButtonLabel, SmartViewContextErrorDialogMessage, SmartViewContextErrorDialogTitle, SmartViewContextModule, SmartViewContextService, SmartViewRedirect, SmartWidgetHintPosition, SmartWidgetHintPositionEnum, SmartWidgetSettings, SmartdialogModule, SmartdialogService, SmartfileuploaderComponent, SmartformComponent, SmartformLayoutDefinitionService, SmartformModule, SmartformwidgetComponent, SmarttableComponent, SmarttableModule, SmarttableService, SmarttreeGenericService, SmarttreeModule, SmarttreeService, TabGroupComponent, ToggleLabelPosition, UiActionButtonType, UiActionConfirmDialogComponent, UiActionConfirmDialogService, UiActionDescriptorService, UiActionDialogType, UiActionFeedbackType, UiActionInputDialogComponent, UiActionInputDialogService, UiActionInputType, UiActionService, UiActionToolbarComponent, UiActionTooltipTooltipPositionEnum, ViewEventHandlerViewEventTypeEnum, ViewService, ViewState, ViewType, WidgetMap };
15423
+ export { APIS$3 as APIS, ApiModule$3 as ApiModule, ApiQueueService, BASE_PATH$5 as BASE_PATH, COLLECTION_FORMATS$5 as COLLECTION_FORMATS, CloseResult, ComponentFactoryService, ComponentFactoryServiceModule, ComponentType, ComponentWidgetType, Configuration$5 as Configuration, DIALOG_DISABLE_CLOSE, DataChangeKind, DefaultUiActionCode_CLOSE, ExpandableSectionButtonIconPosition, ExpandableSectionButtonType, ExpandableSectionComponent, FilterExpressionBoolOperator$1 as FilterExpressionBoolOperator, FilterExpressionBuilderGroupBuilderGroupKindEnum, FilterExpressionDataType, FilterExpressionFieldWidgetType, FilterExpressionOperation, FilterExpressionOrderByOrderEnum, GridColumnContentType, GridDataAccessConfigKindEnum, GridSelectionMode, GridSelectionType, GridUiActionType, GridViewDescriptorKindEnum, IS_ASYNC_PARAM_NAME, IconPosition, ImageResourceKindEnum, LayoutDirection, LinkTargetEnum, MessageOptionType, MessageTextType, MessageType, SelectionDefinitionTypeEnum, SessionAPIS, SessionErrorBehaviour, SessionService, SharedModule, SimplifiedTabGroupComponent, SmartActionType, SmartAuthService, SmartComponent, SmartComponentApiClient, SmartComponentLayoutComponent, SmartComponentLayoutModule, SmartComponentLayoutUtility, SmartDatePipe, SmartDateTimePipe, SmartDialog, SmartExpandableSectionModule, SmartExpandableSectionService, SmartFileUploaderComponent, SmartFilterComponent, SmartFilterEditorContentComponent, SmartFilterEditorModule, SmartFilterEditorService, SmartFilterExpressionItemComponent, SmartFilterExpressionItemsComponent, SmartFilterModule, SmartFilterParamComponent, SmartFilterParamsComponent, SmartFilterPosition, SmartFilterType, SmartFormTextFieldButtonIconPosition, SmartFormWidgetDirection, SmartFormWidgetType, SmartFormWidgetWidth, SmartGridButtonType, SmartGridComponent, SmartGridDataLayout, SmartGridModule, SmartGridService, SmartGridType, SmartIconComponent, SmartIconModule, SmartIconService, SmartLayoutDef, SmartLinkChannelVariableInPath, SmartLinkUuidVariableInPath, SmartNavbarComponent, SmartNavbarModule, SmartNavbarService, SmartNavigationModule, SmartNavigationService, SmartNgClientModule, SmartNgClientService, SmartService, SmartSessionModule, SmartSessionService, SmartSessionTimerComponent, SmartSessionTimerService, SmartSubject, SmartTabGroupModule, SmartTabGroupService, SmartTable, SmartTableButtonType, SmartTableHeaderPropertyType, SmartTableInterfaceTypeEnum, SmartTableOptionButtonDirection, SmartTableOrder, SmartTableType, SmartTimePipe, SmartTooltipDirective, SmartTreeComponent, SmartTreeNodeButtonType, SmartUserSettinsIconPosition, SmartValidatorName, SmartViewContextErrorDialogButtonLabel, SmartViewContextErrorDialogMessage, SmartViewContextErrorDialogTitle, SmartViewContextModule, SmartViewContextService, SmartViewRedirect, SmartWidgetHintPosition, SmartWidgetHintPositionEnum, SmartWidgetSettings, SmartdialogModule, SmartdialogService, SmartfileuploaderComponent, SmartformComponent, SmartformLayoutDefinitionService, SmartformModule, SmartformwidgetComponent, SmarttableComponent, SmarttableModule, SmarttableService, SmarttreeGenericService, SmarttreeModule, SmarttreeService, TabGroupComponent, ToggleLabelPosition, UiActionButtonType, UiActionConfirmDialogComponent, UiActionConfirmDialogService, UiActionDescriptorService, UiActionDialogType, UiActionFeedbackType, UiActionInputDialogComponent, UiActionInputDialogService, UiActionInputType, UiActionService, UiActionToolbarComponent, UiActionTooltipTooltipPositionEnum, ViewEventHandlerViewEventTypeEnum, ViewService, ViewState, ViewType, WidgetMap };
15356
15424
  //# sourceMappingURL=smartbit4all-ng-client.mjs.map