import { Component, EventEmitter, Input, Output, ViewEncapsulation } from '@angular/core';
import { AxExpression } from '../../../enlighten-lib/ax-expression/ax-expression';
import { AxForm } from '../../../forms/ax-form';
import { DataModel } from '../../../enlighten-lib/data-model/data-model';
import { FilterSourceElementType } from '../../../enlighten-lib/filters/chart-filter-type';
import { FormObjectListFilterService } from './form-object-list-filter.service';
import { ActivatedRoute } from '@angular/router';
import { DataListFilterDto } from '../../../common-dto/dataListFilter-dto';
import { Subject } from 'rxjs';
import { ElementService } from '../../../enlighten-lib/report/element.service';
import { ScopeType, ScreenType } from '../../../enlighten-lib/filters/condition-type';
import { CommonService } from '../../../../lib/common.service';
import { UnhandledWIdgetsInFilters, UnhandledWIdgetSubTypesInFilters } from '../../../enlighten-lib/filters/static-widget';
import { WidgetSubType } from '../../../../lib/forms/page/common/widget-enums';
import * as i0 from "@angular/core";
import * as i1 from "./form-object-list-filter.service";
import * as i2 from "@angular/router";
import * as i3 from "../../../enlighten-lib/report/element.service";
import * as i4 from "../../../../lib/common.service";
function FormObjectListFilterComponent_span_10_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 20);
    i0.ɵɵtext(1, "Fields");
    i0.ɵɵelementEnd();
} }
function FormObjectListFilterComponent_mat_icon_15_Template(rf, ctx) { if (rf & 1) {
    const _r6 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "mat-icon", 21);
    i0.ɵɵlistener("click", function FormObjectListFilterComponent_mat_icon_15_Template_mat_icon_click_0_listener() { i0.ɵɵrestoreView(_r6); const ctx_r5 = i0.ɵɵnextContext(); return ctx_r5.clear(); });
    i0.ɵɵtext(1, "clear");
    i0.ɵɵelementEnd();
} }
function FormObjectListFilterComponent_ng_container_16_div_1_label_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "label", 16);
    i0.ɵɵtext(1, "Category");
    i0.ɵɵelementEnd();
} }
function FormObjectListFilterComponent_ng_container_16_div_1_mat_list_option_5_Template(rf, ctx) { if (rf & 1) {
    const _r14 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "mat-list-option", 27);
    i0.ɵɵlistener("selectedChange", function FormObjectListFilterComponent_ng_container_16_div_1_mat_list_option_5_Template_mat_list_option_selectedChange_0_listener($event) { const restoredCtx = i0.ɵɵrestoreView(_r14); const category_r11 = restoredCtx.$implicit; return category_r11.isSelected = $event; });
    i0.ɵɵelementStart(1, "span", 28);
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const category_r11 = ctx.$implicit;
    i0.ɵɵproperty("value", category_r11)("selected", category_r11.isSelected);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("matTooltip", category_r11.name);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", category_r11.name, "");
} }
const _c0 = function (a0) { return { "field-container": a0 }; };
function FormObjectListFilterComponent_ng_container_16_div_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 23);
    i0.ɵɵtemplate(1, FormObjectListFilterComponent_ng_container_16_div_1_label_1_Template, 2, 0, "label", 24);
    i0.ɵɵpipe(2, "search");
    i0.ɵɵelementStart(3, "mat-selection-list", null, 25);
    i0.ɵɵtemplate(5, FormObjectListFilterComponent_ng_container_16_div_1_mat_list_option_5_Template, 3, 4, "mat-list-option", 26);
    i0.ɵɵpipe(6, "search");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r7 = i0.ɵɵnextContext(2);
    let tmp_1_0;
    i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c0, ctx_r7.showSearchBox));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", (tmp_1_0 = i0.ɵɵpipeBind2(2, 3, ctx_r7.categories, ctx_r7.searchedTerm)) == null ? null : tmp_1_0.length);
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("ngForOf", i0.ɵɵpipeBind2(6, 6, ctx_r7.categories, ctx_r7.searchedTerm));
} }
function FormObjectListFilterComponent_ng_container_16_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵtemplate(1, FormObjectListFilterComponent_ng_container_16_div_1_Template, 7, 11, "div", 22);
    i0.ɵɵpipe(2, "search");
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const ctx_r3 = i0.ɵɵnextContext();
    let tmp_0_0;
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", (tmp_0_0 = i0.ɵɵpipeBind2(2, 1, ctx_r3.categories, ctx_r3.searchedTerm)) == null ? null : tmp_0_0.length);
} }
function FormObjectListFilterComponent_mat_list_option_21_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "mat-list-option", 29);
    i0.ɵɵelementStart(1, "span", 28);
    i0.ɵɵelement(2, "mat-icon", 30);
    i0.ɵɵtext(3);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const widget_r15 = ctx.$implicit;
    const ctx_r4 = i0.ɵɵnextContext();
    i0.ɵɵproperty("value", widget_r15)("selected", ctx_r4.selectedWidget.indexOf(widget_r15.identifier) !== -1);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("matTooltip", widget_r15.prompt);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("svgIcon", widget_r15.widgetIcon);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", widget_r15.prompt, "");
} }
const _c1 = function (a0) { return { "justify-between px-2.5": a0 }; };
const _c2 = function (a0) { return { "global-border px-2.5": a0 }; };
const _c3 = function (a0) { return { "search-icon": a0 }; };
export class FormObjectListFilterComponent {
    constructor(_formObjectListFilterService, _route, _elementService, activatedRoute, _commonService) {
        this._formObjectListFilterService = _formObjectListFilterService;
        this._route = _route;
        this._elementService = _elementService;
        this.activatedRoute = activatedRoute;
        this._commonService = _commonService;
        this.dirtyFlowCheckEvent = new EventEmitter();
        this.filterChangeEmit = new EventEmitter();
        this.resetFilterEmit = new EventEmitter();
        this.applyFilterEmit = new EventEmitter();
        this.screenType = ScreenType.dataList;
        this.scopeType = 2;
        this.showSearchBox = false;
        this.showField = true;
        this.titleValue = '';
        this.showApplyFilterEvent = true;
        this.selectedWidget = [];
        this.commonFilterArray = [];
        this._unsubscribeAll = new Subject();
    }
    ngOnInit() {
        this.activatedRoute.paramMap.subscribe((params) => {
            if (this.screenType === ScreenType.dataList) {
                this.formId = params.get('formId');
            }
        });
    }
    ngOnChanges(changes) {
        if (changes.form) {
            this.form = this.createAttributesObject(this.form);
            this.commonFilterArray = [];
            this.getAllFilters();
            this.selectedWidget = [];
        }
    }
    showFilterDiv() {
        this.showSearchBox = !this.showSearchBox;
        this.showField = !this.showField;
        document.getElementById('global-field-search').focus();
    }
    clear() {
        this.titleValue = null;
        this.showSearchBox = !this.showSearchBox;
        this.showField = !this.showField;
        this.searchedTerm = null;
    }
    /**
     * Add new filter functionality
     *
     * @param event
     */
    addBasicFilterToDataList(event) {
        const widget = event.option.value;
        this.selectedWidget.push(widget.identifier);
        this.showApplyFilterEvent = !this.showApplyFilterEvent;
        const fixedSeries = [];
        if (widget.subType == WidgetSubType.fixedList) {
            widget.choices?.forEach((choice) => {
                fixedSeries.push(choice.value);
            });
        }
        this.filters = this._formObjectListFilterService.addBasicFilterToDataList(this.appVersionId, event, this.filters, ScopeType.global, this.filters.length, fixedSeries);
        this.getAllFilters();
    }
    //this function is used to push filters and category into a commonArray
    getAllFilters() {
        this.filters.forEach((filter) => {
            // filter.generalFilterType = 1;
            if (!this.commonFilterArray.includes(filter)) {
                this.commonFilterArray.push(filter);
            }
        });
        this.commonFilterArray.sort((a, b) => (a.gridProperties.x > b.gridProperties.x) ? 1 : ((b.gridProperties.x > a.gridProperties.x) ? -1 : 0));
    }
    filterChangedEvent() {
        this.filterChangeEmit.emit();
    }
    /**
     * Resets all the filters
     */
    filterResetEvent() {
        const dataListFilterDto = new DataListFilterDto();
        dataListFilterDto.app_id = this.appId;
        dataListFilterDto.form_id = this.formId;
        dataListFilterDto.appVersion = this.appVersionId;
        this.resetFilterEmit.emit(dataListFilterDto);
    }
    /**
     * Deletes the single filter
     *
     * @param index
     */
    deleteFilterEmit(index) {
        const identifier = this.filters[index];
        this.selectedWidget.splice(this.selectedWidget.indexOf(identifier.searchNodes[0].expression.field.name), 1);
    }
    /**
     * Clears the single filter
     *
     * @param index
     */
    clearFilterEmit(index) {
        this.filters[index].searchNodes[0].expression.value =
            new AxExpression().getExpressionValueObject(this.filters[index].searchNodes[0].expression.value.subType);
        this.filters[index].searchNodes[0].expression.value.isSearchable = false;
        this._commonService.isReportFilterApply = true;
        this.filterChangedEvent();
    }
    /**
     * Emits the event for applying filter on Apply button
     */
    applyFilterEvent() {
        this.applyFilterEmit.emit();
    }
    /**
     * Create Attribute object
     *
     * @param attributes
     * @returns attribute array
     */
    createAttributesObject(form) {
        const attributeArray = [];
        form.widgets.forEach((_widget) => {
            if (!UnhandledWIdgetsInFilters.includes(_widget.type) && !UnhandledWIdgetSubTypesInFilters.includes(_widget.subType)) {
                attributeArray.push(_widget);
            }
        });
        form.widgets = [];
        form.widgets = attributeArray;
        return form;
    }
}
FormObjectListFilterComponent.ɵfac = function FormObjectListFilterComponent_Factory(t) { return new (t || FormObjectListFilterComponent)(i0.ɵɵdirectiveInject(i1.FormObjectListFilterService), i0.ɵɵdirectiveInject(i2.ActivatedRoute), i0.ɵɵdirectiveInject(i3.ElementService), i0.ɵɵdirectiveInject(i2.ActivatedRoute), i0.ɵɵdirectiveInject(i4.CommonService)); };
FormObjectListFilterComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FormObjectListFilterComponent, selectors: [["lib-form-object-list-filter"]], inputs: { dataModel: "dataModel", form: "form", filters: "filters", categories: "categories", isEditable: "isEditable", appVersionId: "appVersionId", chartRef: "chartRef", appId: "appId", filterSourceElementType: "filterSourceElementType" }, outputs: { dirtyFlowCheckEvent: "dirtyFlowCheckEvent", filterChangeEmit: "filterChangeEmit", resetFilterEmit: "resetFilterEmit", applyFilterEmit: "applyFilterEmit" }, features: [i0.ɵɵNgOnChangesFeature], decls: 24, vars: 29, consts: [[1, "sticky", "data-list-filter", "w-full"], [1, "table-heading", "w-full"], [1, "flex", "items-center", "gap-4", "mx-auto", "w-full"], [1, "add-icon-btn"], [1, "light-blue-btn", "axo-font", 3, "matMenuTriggerFor"], ["yPosition", "below", 1, "filter-field-list"], ["filtersMenu", "matMenu"], [3, "click"], [1, "group", "flex", "items-center", "justify-center", "mb-3", 3, "ngClass"], ["class", "text-f font-medium", 4, "ngIf"], [1, "flex", "items-center", "search-field", 3, "ngClass"], [1, "mt-2", "text-xs", "search-icons", 3, "ngClass", "svgIcon"], ["id", "global-field-search", "autocomplete", "off", "placeholder", "Search...", "matInput", "", 1, "search-bar", "chart-title", 3, "ngModel", "keydown", "ngModelChange"], ["class", "clear_icon cursor-pointer text-base", 3, "click", 4, "ngIf"], [4, "ngIf"], [1, "fields-div"], [1, "px-2.5"], [3, "selectionChange"], ["checkboxPosition", "after", "color", "primary", 3, "value", "selected", 4, "ngFor", "ngForOf"], [1, "data-list-filter-container", 3, "filters", "commonFilterArray", "screenType", "categories", "scopeType", "appVersionId", "appId", "filterChangeEmit", "resetFilterEmit", "deleteFilterEmit", "clearFilterEmit", "applyFilterEmit"], [1, "text-f", "font-medium"], [1, "clear_icon", "cursor-pointer", "text-base", 3, "click"], [3, "ngClass", 4, "ngIf"], [3, "ngClass"], ["class", "px-2.5", 4, "ngIf"], ["category", ""], ["checkboxPosition", "after", "color", "primary", 3, "value", "selected", "selectedChange", 4, "ngFor", "ngForOf"], ["checkboxPosition", "after", "color", "primary", 3, "value", "selected", "selectedChange"], [1, "list-field", 3, "matTooltip"], ["checkboxPosition", "after", "color", "primary", 3, "value", "selected"], [1, "svg-icon", "mr-2", "align-middle", 3, "svgIcon"]], template: function FormObjectListFilterComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "div", 0);
        i0.ɵɵelementStart(1, "div", 1);
        i0.ɵɵelementStart(2, "div", 2);
        i0.ɵɵelementStart(3, "div", 3);
        i0.ɵɵelementStart(4, "button", 4);
        i0.ɵɵtext(5, "+ Add Filter");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(6, "mat-menu", 5, 6);
        i0.ɵɵelementStart(8, "div", 7);
        i0.ɵɵlistener("click", function FormObjectListFilterComponent_Template_div_click_8_listener($event) { return $event.stopPropagation(); });
        i0.ɵɵelementStart(9, "div", 8);
        i0.ɵɵtemplate(10, FormObjectListFilterComponent_span_10_Template, 2, 0, "span", 9);
        i0.ɵɵelementStart(11, "div", 10);
        i0.ɵɵelementStart(12, "button", 7);
        i0.ɵɵlistener("click", function FormObjectListFilterComponent_Template_button_click_12_listener() { return ctx.showFilterDiv(); });
        i0.ɵɵelement(13, "mat-icon", 11);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(14, "input", 12);
        i0.ɵɵlistener("keydown", function FormObjectListFilterComponent_Template_input_keydown_14_listener($event) { return $event.stopPropagation(); })("ngModelChange", function FormObjectListFilterComponent_Template_input_ngModelChange_14_listener($event) { return ctx.searchedTerm = $event; });
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(15, FormObjectListFilterComponent_mat_icon_15_Template, 2, 0, "mat-icon", 13);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(16, FormObjectListFilterComponent_ng_container_16_Template, 3, 4, "ng-container", 14);
        i0.ɵɵelementStart(17, "div", 15);
        i0.ɵɵelementStart(18, "label", 16);
        i0.ɵɵtext(19);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(20, "mat-selection-list", 17);
        i0.ɵɵlistener("selectionChange", function FormObjectListFilterComponent_Template_mat_selection_list_selectionChange_20_listener($event) { return ctx.addBasicFilterToDataList($event); });
        i0.ɵɵtemplate(21, FormObjectListFilterComponent_mat_list_option_21_Template, 4, 5, "mat-list-option", 18);
        i0.ɵɵpipe(22, "search");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(23, "filters", 19);
        i0.ɵɵlistener("filterChangeEmit", function FormObjectListFilterComponent_Template_filters_filterChangeEmit_23_listener() { return ctx.filterChangedEvent(); })("resetFilterEmit", function FormObjectListFilterComponent_Template_filters_resetFilterEmit_23_listener() { return ctx.filterResetEvent(); })("deleteFilterEmit", function FormObjectListFilterComponent_Template_filters_deleteFilterEmit_23_listener($event) { return ctx.deleteFilterEmit($event); })("clearFilterEmit", function FormObjectListFilterComponent_Template_filters_clearFilterEmit_23_listener($event) { return ctx.clearFilterEmit($event); })("applyFilterEmit", function FormObjectListFilterComponent_Template_filters_applyFilterEmit_23_listener() { return ctx.applyFilterEvent(); });
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        const _r0 = i0.ɵɵreference(7);
        i0.ɵɵadvance(4);
        i0.ɵɵproperty("matMenuTriggerFor", _r0);
        i0.ɵɵadvance(5);
        i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(23, _c1, !ctx.showSearchBox));
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.showField);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(25, _c2, ctx.showSearchBox));
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(27, _c3, ctx.showSearchBox))("svgIcon", "heroicons_solid:search");
        i0.ɵɵadvance(1);
        i0.ɵɵstyleProp("width", !ctx.showSearchBox ? "0" : "100%");
        i0.ɵɵproperty("ngModel", ctx.searchedTerm);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.showSearchBox);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.categories.length);
        i0.ɵɵadvance(3);
        i0.ɵɵtextInterpolate(ctx.form.name);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngForOf", i0.ɵɵpipeBind2(22, 20, ctx.form.widgets, ctx.searchedTerm));
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("filters", ctx.filters)("commonFilterArray", ctx.commonFilterArray)("screenType", ctx.screenType)("categories", ctx.categories)("scopeType", ctx.scopeType)("appVersionId", ctx.appVersionId)("appId", ctx.appId);
    } }, styles: ["lib-form-object-list-filter{width:calc(100% - 6.7rem)}@media screen and (max-width: 768px){lib-form-object-list-filter{width:100%}}lib-form-object-list-filter .data-list-filter .data-list-filter-container{display:flex;column-gap:1.25rem!important;align-items:center;width:calc(100% - 6.7rem)}lib-form-object-list-filter .data-list-filter .data-list-filter-container .reset-btn{display:flex;align-items:center;width:8.938rem}@media screen and (max-width: 500px){lib-form-object-list-filter .data-list-filter .data-list-filter-container{width:100%;flex-wrap:wrap}lib-form-object-list-filter .data-list-filter .data-list-filter-container .reset-btn{position:absolute;right:9.063rem!important;top:3.75rem}}@media screen and (max-width: 375px){lib-form-object-list-filter .data-list-filter .data-list-filter-container .reset-btn{right:6.063rem!important}}@media screen and (max-width: 320px){lib-form-object-list-filter .data-list-filter .data-list-filter-container .reset-btn{right:2.063rem!important}}lib-form-object-list-filter .add-icon-btn{width:6.2rem}.list-field{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;display:inline-block}.list-field .mat-icon{vertical-align:middle}.global-border{border-bottom:1px solid #dcdcdc}.global-border .search-icon{margin-right:16px}.mat-menu-panel .mat-menu-content .mat-menu-item{font-size:13px}.mat-list-base .mat-list-item .mat-list-item-content-reverse,.mat-list-base .mat-list-option .mat-list-item-content-reverse{font-size:12px;display:flex!important}\n"], encapsulation: 2 });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FormObjectListFilterComponent, [{
        type: Component,
        args: [{ selector: 'lib-form-object-list-filter', encapsulation: ViewEncapsulation.None, template: "<div class=\"sticky data-list-filter w-full\">\n  <div class=\"table-heading w-full\">\n        <!--filter-->\n        <div class=\"flex items-center gap-4 mx-auto w-full\">\n          <div class=\"add-icon-btn\">\n             <button class=\"light-blue-btn axo-font\" [matMenuTriggerFor]=\"filtersMenu\">+ Add Filter</button>\n              <mat-menu #filtersMenu=\"matMenu\" yPosition=\"below\" class=\"filter-field-list\">\n                <div (click)=\"$event.stopPropagation();\">\n                  <div class=\"group flex items-center justify-center mb-3\" [ngClass]=\"{'justify-between px-2.5': !showSearchBox}\">\n                      <span *ngIf=\"showField\" class=\"text-f font-medium\">Fields</span>\n\n                      <div class=\"flex items-center search-field\" [ngClass]=\"{'global-border px-2.5' : showSearchBox}\">\n                        <button (click)=\"showFilterDiv()\"> <mat-icon [ngClass]=\"{'search-icon' : showSearchBox}\" class=\"mt-2 text-xs search-icons\" [svgIcon]=\"'heroicons_solid:search'\"></mat-icon></button>\n\n                        <input id=\"global-field-search\"  (keydown)=\"$event.stopPropagation();\"  autocomplete=\"off\" placeholder=\"Search...\" [(ngModel)]=\"searchedTerm\" matInput class=\"search-bar chart-title\"  [style.width]=\"!showSearchBox ? '0' : '100%'\" />\n                        <mat-icon (click)=\"clear()\" *ngIf=\"showSearchBox\" class=\"clear_icon cursor-pointer text-base\">clear</mat-icon>\n                      </div>\n                  </div>\n                  <ng-container *ngIf=\"categories.length\">\n                      <div [ngClass]=\"{'field-container' : showSearchBox}\"*ngIf=\"(categories | search: searchedTerm)?.length\" >\n                          <label class=\"px-2.5\" *ngIf=\"(categories | search: searchedTerm)?.length\">Category</label>\n                      <mat-selection-list #category>\n                          <mat-list-option checkboxPosition=\"after\"  *ngFor=\"let category of categories| search: searchedTerm;let i=index \" [value]='category' [(selected)]=\"category.isSelected\" color=\"primary\">\n                              <span class=\"list-field\"  [matTooltip]=\"category.name\"> {{category.name}}</span>\n                          </mat-list-option>\n                      </mat-selection-list>\n                      </div>\n                  </ng-container>\n                  <div class=\"fields-div\">\n                      <label class=\"px-2.5\">{{form.name}}</label>\n                      <mat-selection-list (selectionChange)=\"addBasicFilterToDataList($event)\">\n                          <mat-list-option checkboxPosition=\"after\"  *ngFor=\"let widget of form.widgets| search: searchedTerm\" [value]='widget' [selected]=\"this.selectedWidget.indexOf(widget.identifier) !== -1\" color=\"primary\">\n                              <span class=\"list-field\" [matTooltip]=\"widget.prompt\" ><mat-icon class=\"svg-icon mr-2 align-middle\" [svgIcon]=\"widget.widgetIcon\"></mat-icon> {{widget.prompt}}</span>\n                          </mat-list-option>\n                      </mat-selection-list>\n                </div>\n              </div>\n            </mat-menu>\n          </div>\n          <filters\n          class=\"data-list-filter-container\"\n          [filters]=\"filters\"\n          [commonFilterArray]=\"commonFilterArray\"\n          [screenType]=\"screenType\"\n          [categories]='categories'\n          [scopeType]=\"scopeType\"\n          (filterChangeEmit)= \"filterChangedEvent()\"\n          (resetFilterEmit)=\"filterResetEvent()\"\n          (deleteFilterEmit)=\"deleteFilterEmit($event)\"\n          (clearFilterEmit)=\"clearFilterEmit($event)\"\n          (applyFilterEmit)=\"applyFilterEvent()\"\n          [appVersionId]=\"appVersionId\"\n          [appId]=\"appId\"\n          >\n          </filters>\n        </div>\n  </div>\n</div>\n", styles: ["lib-form-object-list-filter{width:calc(100% - 6.7rem)}@media screen and (max-width: 768px){lib-form-object-list-filter{width:100%}}lib-form-object-list-filter .data-list-filter .data-list-filter-container{display:flex;column-gap:1.25rem!important;align-items:center;width:calc(100% - 6.7rem)}lib-form-object-list-filter .data-list-filter .data-list-filter-container .reset-btn{display:flex;align-items:center;width:8.938rem}@media screen and (max-width: 500px){lib-form-object-list-filter .data-list-filter .data-list-filter-container{width:100%;flex-wrap:wrap}lib-form-object-list-filter .data-list-filter .data-list-filter-container .reset-btn{position:absolute;right:9.063rem!important;top:3.75rem}}@media screen and (max-width: 375px){lib-form-object-list-filter .data-list-filter .data-list-filter-container .reset-btn{right:6.063rem!important}}@media screen and (max-width: 320px){lib-form-object-list-filter .data-list-filter .data-list-filter-container .reset-btn{right:2.063rem!important}}lib-form-object-list-filter .add-icon-btn{width:6.2rem}.list-field{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;display:inline-block}.list-field .mat-icon{vertical-align:middle}.global-border{border-bottom:1px solid #dcdcdc}.global-border .search-icon{margin-right:16px}.mat-menu-panel .mat-menu-content .mat-menu-item{font-size:13px}.mat-list-base .mat-list-item .mat-list-item-content-reverse,.mat-list-base .mat-list-option .mat-list-item-content-reverse{font-size:12px;display:flex!important}\n"] }]
    }], function () { return [{ type: i1.FormObjectListFilterService }, { type: i2.ActivatedRoute }, { type: i3.ElementService }, { type: i2.ActivatedRoute }, { type: i4.CommonService }]; }, { dataModel: [{
            type: Input
        }], form: [{
            type: Input
        }], filters: [{
            type: Input
        }], categories: [{
            type: Input
        }], isEditable: [{
            type: Input
        }], appVersionId: [{
            type: Input
        }], dirtyFlowCheckEvent: [{
            type: Output
        }], filterChangeEmit: [{
            type: Output
        }], resetFilterEmit: [{
            type: Output
        }], applyFilterEmit: [{
            type: Output
        }], chartRef: [{
            type: Input
        }], appId: [{
            type: Input
        }], filterSourceElementType: [{
            type: Input
        }] }); })();
//# sourceMappingURL=data:application/json;base64, 