Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ag-grid-enterprise/filter-tool-panel

Package Overview
Dependencies
Maintainers
3
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ag-grid-enterprise/filter-tool-panel - npm Package Compare versions

Comparing version 30.0.3 to 30.0.5

2

dist/cjs/es5/version.d.ts

@@ -1,1 +0,1 @@

export declare const VERSION = "30.0.3";
export declare const VERSION = "30.0.5";

@@ -5,2 +5,2 @@ "use strict";

// DO NOT UPDATE MANUALLY: Generated from script during build time
exports.VERSION = '30.0.3';
exports.VERSION = '30.0.5';

@@ -1,1 +0,1 @@

export declare const VERSION = "30.0.3";
export declare const VERSION = "30.0.5";

@@ -5,2 +5,2 @@ "use strict";

// DO NOT UPDATE MANUALLY: Generated from script during build time
exports.VERSION = '30.0.3';
exports.VERSION = '30.0.5';

@@ -1,1 +0,1 @@

export declare const VERSION = "30.0.3";
export declare const VERSION = "30.0.5";
// DO NOT UPDATE MANUALLY: Generated from script during build time
export var VERSION = '30.0.3';
export var VERSION = '30.0.5';

@@ -1,1 +0,1 @@

export declare const VERSION = "30.0.3";
export declare const VERSION = "30.0.5";
/**
* @ag-grid-enterprise/filter-tool-panel - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v30.0.3
* @ag-grid-enterprise/filter-tool-panel - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v30.0.5
* @link https://www.ag-grid.com/

@@ -1039,3 +1039,3 @@ * @license Commercial

// DO NOT UPDATE MANUALLY: Generated from script during build time
var VERSION = '30.0.3';
var VERSION = '30.0.5';

@@ -1042,0 +1042,0 @@ var FiltersToolPanelModule = {

/**
* @ag-grid-enterprise/filter-tool-panel - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v30.0.3
* @ag-grid-enterprise/filter-tool-panel - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v30.0.5
* @link https://www.ag-grid.com/

@@ -7,6 +7,6 @@ * @license Commercial

/**
* @ag-grid-enterprise/filter-tool-panel - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v30.0.3
* @ag-grid-enterprise/filter-tool-panel - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v30.0.5
* @link https://www.ag-grid.com/
* @license Commercial
*/
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t,o=require("@ag-grid-community/core"),i=require("@ag-grid-enterprise/core"),n=require("@ag-grid-enterprise/side-bar"),r=(e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(t,o)},function(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}),s=function(e,t,o,i){var n,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(s=(r<3?n(s):r>3?n(t,o,s):n(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s};!function(e){e[e.EXPANDED=0]="EXPANDED",e[e.COLLAPSED=1]="COLLAPSED",e[e.INDETERMINATE=2]="INDETERMINATE"}(t||(t={}));var l=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return r(i,e),i.prototype.preConstruct=function(){this.setTemplate('<div class="ag-filter-toolpanel-search" role="presentation">\n <div ref="eExpand" class="ag-filter-toolpanel-expand"></div>\n <ag-input-text-field ref="eFilterTextField" class="ag-filter-toolpanel-search-input"></ag-input-text-field>\n </div>')},i.prototype.postConstruct=function(){var e=this.localeService.getLocaleTextFunc();this.eFilterTextField.onValueChange(this.onSearchTextChanged.bind(this)),this.eFilterTextField.setInputAriaLabel(e("ariaFilterColumnsInput","Filter Columns Input")),this.createExpandIcons(),this.setExpandState(t.EXPANDED),this.addManagedListener(this.eExpand,"click",this.onExpandClicked.bind(this)),this.addManagedListener(this.eventService,o.Events.EVENT_NEW_COLUMNS_LOADED,this.showOrHideOptions.bind(this))},i.prototype.init=function(e){this.params=e,this.columnModel.isReady()&&this.showOrHideOptions()},i.prototype.createExpandIcons=function(){this.eExpand.appendChild(this.eExpandChecked=o._.createIconNoSpan("columnSelectOpen",this.gridOptionsService)),this.eExpand.appendChild(this.eExpandUnchecked=o._.createIconNoSpan("columnSelectClosed",this.gridOptionsService)),this.eExpand.appendChild(this.eExpandIndeterminate=o._.createIconNoSpan("columnSelectIndeterminate",this.gridOptionsService))},i.prototype.showOrHideOptions=function(){var e=!this.params.suppressFilterSearch,t=!this.params.suppressExpandAll,i=this.localeService.getLocaleTextFunc();this.eFilterTextField.setInputPlaceholder(i("searchOoo","Search..."));var n=this.columnModel.getAllGridColumns().some((function(e){return e.getOriginalParent()&&e.isFilterAllowed()}));o._.setDisplayed(this.eFilterTextField.getGui(),e),o._.setDisplayed(this.eExpand,t&&n)},i.prototype.onSearchTextChanged=function(){var e=this;this.onSearchTextChangedDebounced||(this.onSearchTextChangedDebounced=o._.debounce((function(){e.dispatchEvent({type:"searchChanged",searchText:e.eFilterTextField.getValue()})}),300)),this.onSearchTextChangedDebounced()},i.prototype.onExpandClicked=function(){var e=this.currentExpandState===t.EXPANDED?{type:"collapseAll"}:{type:"expandAll"};this.dispatchEvent(e)},i.prototype.setExpandState=function(e){this.currentExpandState=e,o._.setDisplayed(this.eExpandChecked,this.currentExpandState===t.EXPANDED),o._.setDisplayed(this.eExpandUnchecked,this.currentExpandState===t.COLLAPSED),o._.setDisplayed(this.eExpandIndeterminate,this.currentExpandState===t.INDETERMINATE)},s([o.Autowired("columnModel")],i.prototype,"columnModel",void 0),s([o.RefSelector("eExpand")],i.prototype,"eExpand",void 0),s([o.RefSelector("eFilterTextField")],i.prototype,"eFilterTextField",void 0),s([o.PreConstruct],i.prototype,"preConstruct",null),s([o.PostConstruct],i.prototype,"postConstruct",null),i}(o.Component),a=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(t,o)};return function(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),p=function(e,t,o,i){var n,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(s=(r<3?n(s):r>3?n(t,o,s):n(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},d=function(e){function t(o){void 0===o&&(o=!1);var i=e.call(this,t.TEMPLATE)||this;return i.expanded=!1,i.hideHeader=o,i}return a(t,e),t.prototype.postConstruct=function(){this.eExpandChecked=o._.createIconNoSpan("columnSelectOpen",this.gridOptionsService),this.eExpandUnchecked=o._.createIconNoSpan("columnSelectClosed",this.gridOptionsService),this.eExpand.appendChild(this.eExpandChecked),this.eExpand.appendChild(this.eExpandUnchecked)},t.prototype.setColumn=function(e){var t=this;this.column=e,this.eFilterName.innerText=this.columnModel.getDisplayNameForColumn(this.column,"filterToolPanel",!1)||"",this.addManagedListener(this.eFilterToolPanelHeader,"click",this.toggleExpanded.bind(this)),this.addManagedListener(this.eFilterToolPanelHeader,"keydown",(function(e){e.key===o.KeyCode.ENTER&&t.toggleExpanded()})),this.addManagedListener(this.eventService,o.Events.EVENT_FILTER_OPENED,this.onFilterOpened.bind(this)),this.addInIcon("filter",this.eFilterIcon,this.column),o._.setDisplayed(this.eFilterIcon,this.isFilterActive(),{skipAriaHidden:!0}),o._.setDisplayed(this.eExpandChecked,!1),this.hideHeader?(o._.setDisplayed(this.eFilterToolPanelHeader,!1),this.eFilterToolPanelHeader.removeAttribute("tabindex")):this.eFilterToolPanelHeader.setAttribute("tabindex","0"),this.addManagedListener(this.column,o.Column.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.addManagedListener(this.eventService,o.Events.EVENT_FILTER_DESTROYED,this.onFilterDestroyed.bind(this))},t.prototype.getColumn=function(){return this.column},t.prototype.getColumnFilterName=function(){return this.columnModel.getDisplayNameForColumn(this.column,"filterToolPanel",!1)},t.prototype.addCssClassToTitleBar=function(e){this.eFilterToolPanelHeader.classList.add(e)},t.prototype.addInIcon=function(e,t,i){if(null!=t){var n=o._.createIconNoSpan(e,this.gridOptionsService,i);t.appendChild(n)}},t.prototype.isFilterActive=function(){return this.filterManager.isFilterActive(this.column)},t.prototype.onFilterChanged=function(){o._.setDisplayed(this.eFilterIcon,this.isFilterActive(),{skipAriaHidden:!0}),this.dispatchEvent({type:o.Column.EVENT_FILTER_CHANGED})},t.prototype.onFilterDestroyed=function(e){this.expanded&&"api"===e.source&&e.column.getId()===this.column.getId()&&this.columnModel.getPrimaryColumn(this.column)&&(this.removeFilterElement(),this.addFilterElement())},t.prototype.toggleExpanded=function(){this.expanded?this.collapse():this.expand()},t.prototype.expand=function(){this.expanded||(this.expanded=!0,o._.setAriaExpanded(this.eFilterToolPanelHeader,!0),o._.setDisplayed(this.eExpandChecked,!0),o._.setDisplayed(this.eExpandUnchecked,!1),this.addFilterElement())},t.prototype.addFilterElement=function(){var e=this,t=o._.loadTemplate('<div class="ag-filter-toolpanel-instance-filter"></div>'),i=this.filterManager.getOrCreateFilterWrapper(this.column,"TOOLBAR");if(i){var n=i.filterPromise,r=i.guiPromise;null==n||n.then((function(o){e.underlyingFilter=o,o&&r.then((function(i){i&&t.appendChild(i),e.agFilterToolPanelBody.appendChild(t),o.afterGuiAttached&&o.afterGuiAttached({container:"toolPanel"})}))}))}},t.prototype.collapse=function(){var e,t;this.expanded&&(this.expanded=!1,o._.setAriaExpanded(this.eFilterToolPanelHeader,!1),this.removeFilterElement(),o._.setDisplayed(this.eExpandChecked,!1),o._.setDisplayed(this.eExpandUnchecked,!0),null===(t=null===(e=this.underlyingFilter)||void 0===e?void 0:e.afterGuiDetached)||void 0===t||t.call(e))},t.prototype.removeFilterElement=function(){o._.clearElement(this.agFilterToolPanelBody)},t.prototype.isExpanded=function(){return this.expanded},t.prototype.refreshFilter=function(e){var t;if(this.expanded){var o=this.underlyingFilter;o&&(e?"function"==typeof o.refreshVirtualList&&o.refreshVirtualList():null===(t=o.afterGuiDetached)||void 0===t||t.call(o))}},t.prototype.onFilterOpened=function(e){"COLUMN_MENU"===e.source&&e.column===this.column&&this.expanded&&this.collapse()},t.TEMPLATE='\n <div class="ag-filter-toolpanel-instance">\n <div class="ag-filter-toolpanel-header ag-filter-toolpanel-instance-header" ref="eFilterToolPanelHeader" role="button" aria-expanded="false">\n <div ref="eExpand" class="ag-filter-toolpanel-expand"></div>\n <span ref="eFilterName" class="ag-header-cell-text"></span>\n <span ref="eFilterIcon" class="ag-header-icon ag-filter-icon ag-filter-toolpanel-instance-header-icon" aria-hidden="true"></span>\n </div>\n <div class="ag-filter-toolpanel-instance-body ag-filter" ref="agFilterToolPanelBody"></div>\n </div>',p([o.RefSelector("eFilterToolPanelHeader")],t.prototype,"eFilterToolPanelHeader",void 0),p([o.RefSelector("eFilterName")],t.prototype,"eFilterName",void 0),p([o.RefSelector("agFilterToolPanelBody")],t.prototype,"agFilterToolPanelBody",void 0),p([o.RefSelector("eFilterIcon")],t.prototype,"eFilterIcon",void 0),p([o.RefSelector("eExpand")],t.prototype,"eExpand",void 0),p([o.Autowired("filterManager")],t.prototype,"filterManager",void 0),p([o.Autowired("columnModel")],t.prototype,"columnModel",void 0),p([o.PostConstruct],t.prototype,"postConstruct",null),t}(o.Component),c=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(t,o)};return function(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),u=function(e,t,o,i){var n,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(s=(r<3?n(s):r>3?n(t,o,s):n(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},h=function(e){function t(t,o,i,n,r){var s=e.call(this)||this;return s.columnGroup=t,s.childFilterComps=o,s.depth=n,s.expandedCallback=i,s.showingColumn=r,s}return c(t,e),t.prototype.preConstruct=function(){this.setTemplate(t.TEMPLATE,{filterGroupComp:{cssIdentifier:"filter-toolpanel",direction:"vertical"}})},t.prototype.init=function(){var e=this;this.setGroupTitle(),this.filterGroupComp.setAlignItems("stretch"),this.filterGroupComp.addCssClass("ag-filter-toolpanel-group-level-"+this.depth),this.filterGroupComp.addCssClassToTitleBar("ag-filter-toolpanel-group-level-"+this.depth+"-header"),this.childFilterComps.forEach((function(t){e.filterGroupComp.addItem(t),t.addCssClassToTitleBar("ag-filter-toolpanel-group-level-"+(e.depth+1)+"-header")})),this.refreshFilterClass(),this.addExpandCollapseListeners(),this.addFilterChangedListeners(),this.setupTooltip()},t.prototype.setupTooltip=function(){var e=this;if(this.showingColumn){var t=function(){var t=e.columnGroup.getColDef().headerTooltip;e.setTooltip(t)};t(),this.addManagedListener(this.eventService,o.Events.EVENT_NEW_COLUMNS_LOADED,t)}},t.prototype.getTooltipParams=function(){var t=e.prototype.getTooltipParams.call(this);return t.location="filterToolPanelColumnGroup",t},t.prototype.addCssClassToTitleBar=function(e){this.filterGroupComp.addCssClassToTitleBar(e)},t.prototype.refreshFilters=function(e){this.childFilterComps.forEach((function(o){o instanceof t?o.refreshFilters(e):o.refreshFilter(e)}))},t.prototype.isColumnGroup=function(){return this.columnGroup instanceof o.ProvidedColumnGroup},t.prototype.isExpanded=function(){return this.filterGroupComp.isExpanded()},t.prototype.getChildren=function(){return this.childFilterComps},t.prototype.getFilterGroupName=function(){return this.filterGroupName?this.filterGroupName:""},t.prototype.getFilterGroupId=function(){return this.columnGroup.getId()},t.prototype.hideGroupItem=function(e,t){this.filterGroupComp.hideItem(e,t)},t.prototype.hideGroup=function(e){this.setDisplayed(!e)},t.prototype.forEachToolPanelFilterChild=function(e){this.childFilterComps.forEach((function(t){t instanceof d&&e(t)}))},t.prototype.addExpandCollapseListeners=function(){var e=this,t=this.isColumnGroup()?function(){return e.expandedCallback()}:function(){return e.forEachToolPanelFilterChild((function(e){return e.expand()}))},i=this.isColumnGroup()?function(){return e.expandedCallback()}:function(){return e.forEachToolPanelFilterChild((function(e){return e.collapse()}))};this.addManagedListener(this.filterGroupComp,o.AgGroupComponent.EVENT_EXPANDED,t),this.addManagedListener(this.filterGroupComp,o.AgGroupComponent.EVENT_COLLAPSED,i)},t.prototype.getColumns=function(){return this.columnGroup instanceof o.ProvidedColumnGroup?this.columnGroup.getLeafColumns():[this.columnGroup]},t.prototype.addFilterChangedListeners=function(){var e=this;this.getColumns().forEach((function(t){e.addManagedListener(t,o.Column.EVENT_FILTER_CHANGED,(function(){return e.refreshFilterClass()}))})),this.columnGroup instanceof o.ProvidedColumnGroup||this.addManagedListener(this.eventService,o.Events.EVENT_FILTER_OPENED,this.onFilterOpened.bind(this))},t.prototype.refreshFilterClass=function(){var e=this.getColumns();this.filterGroupComp.addOrRemoveCssClass("ag-has-filter",e.some((function(e){return e.isFilterActive()})))},t.prototype.onFilterOpened=function(e){"COLUMN_MENU"===e.source&&e.column===this.columnGroup&&this.isExpanded()&&this.collapse()},t.prototype.expand=function(){this.filterGroupComp.toggleGroupExpand(!0)},t.prototype.collapse=function(){this.filterGroupComp.toggleGroupExpand(!1)},t.prototype.setGroupTitle=function(){this.filterGroupName=this.columnGroup instanceof o.ProvidedColumnGroup?this.getColumnGroupName(this.columnGroup):this.getColumnName(this.columnGroup),this.filterGroupComp.setTitle(this.filterGroupName||"")},t.prototype.getColumnGroupName=function(e){return this.columnModel.getDisplayNameForProvidedColumnGroup(null,e,"filterToolPanel")},t.prototype.getColumnName=function(e){return this.columnModel.getDisplayNameForColumn(e,"filterToolPanel",!1)},t.prototype.destroyFilters=function(){this.childFilterComps=this.destroyBeans(this.childFilterComps),o._.clearElement(this.getGui())},t.prototype.destroy=function(){this.destroyFilters(),e.prototype.destroy.call(this)},t.TEMPLATE='<div class="ag-filter-toolpanel-group-wrapper">\n <ag-group-component ref="filterGroupComp"></ag-group-component>\n </div>',u([o.RefSelector("filterGroupComp")],t.prototype,"filterGroupComp",void 0),u([o.Autowired("columnModel")],t.prototype,"columnModel",void 0),u([o.PreConstruct],t.prototype,"preConstruct",null),u([o.PostConstruct],t.prototype,"init",null),t}(o.Component),f=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(t,o)};return function(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),y=function(e,t,o,i){var n,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(s=(r<3?n(s):r>3?n(t,o,s):n(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},m=function(e){function i(){var t=e.call(this,i.TEMPLATE)||this;return t.initialised=!1,t.filterGroupComps=[],t}return f(i,e),i.prototype.init=function(e){var t=this;this.initialised=!0;var i={suppressExpandAll:!1,suppressFilterSearch:!1,suppressSyncLayoutWithGrid:!1,api:this.gridApi,columnApi:this.columnApi,context:this.gridOptionsService.context};o._.mergeDeep(i,e),this.params=i,this.params.suppressSyncLayoutWithGrid||this.addManagedListener(this.eventService,o.Events.EVENT_COLUMN_MOVED,(function(){return t.onColumnsChanged()})),this.addManagedListener(this.eventService,o.Events.EVENT_NEW_COLUMNS_LOADED,(function(){return t.onColumnsChanged()})),this.addManagedListener(this.eventService,o.Events.EVENT_TOOL_PANEL_VISIBLE_CHANGED,(function(e){"filters"===e.key&&t.refreshFilters(e.visible)})),this.columnModel.isReady()&&this.onColumnsChanged()},i.prototype.onColumnsChanged=function(){var e=this.columnModel.isPivotMode();!this.params.suppressSyncLayoutWithGrid&&!e?this.syncFilterLayout():this.buildTreeFromProvidedColumnDefs()},i.prototype.syncFilterLayout=function(){this.toolPanelColDefService.syncLayoutWithGrid(this.setFiltersLayout.bind(this))},i.prototype.buildTreeFromProvidedColumnDefs=function(){var e=this.columnModel.getPrimaryColumnTree();this.recreateFilters(e)},i.prototype.setFiltersLayout=function(e){var t=this.toolPanelColDefService.createColumnTree(e);this.recreateFilters(t)},i.prototype.recreateFilters=function(e){var t=this,i=this.gridOptionsService.getDocument().activeElement,n=this.getExpansionState();this.destroyFilters(),this.filterGroupComps=this.recursivelyAddComps(e,0,n);var r=this.filterGroupComps.length;r&&(this.filterGroupComps.forEach((function(e){return t.appendChild(e)})),this.setFirstAndLastVisible(0,r-1)),o._.exists(this.searchFilterText)&&this.searchFilters(this.searchFilterText),this.fireExpandedEvent(),this.getGui().contains(i)&&i.focus()},i.prototype.recursivelyAddComps=function(e,t,i){var n=this;return o._.flatten(e.map((function(e){if(e instanceof o.ProvidedColumnGroup)return o._.flatten(n.recursivelyAddFilterGroupComps(e,t,i));var r=e;if(!n.shouldDisplayFilter(r))return[];var s=new d(0===t);if(n.createBean(s),s.setColumn(r),i.get(r.getId())&&s.expand(),t>0)return s;var l=n.createBean(new h(r,[s],n.onGroupExpanded.bind(n),t,!0));return l.addCssClassToTitleBar("ag-filter-toolpanel-header"),i.get(l.getFilterGroupId())||l.collapse(),l})))},i.prototype.recursivelyAddFilterGroupComps=function(e,t,i){if(this.filtersExistInChildren(e.getChildren())){var n=e.getColGroupDef();if(n&&n.suppressFiltersToolPanel)return[];var r=e.isPadding()?t:t+1,s=o._.flatten(this.recursivelyAddComps(e.getChildren(),r,i));if(e.isPadding())return s;var l=new h(e,s,this.onGroupExpanded.bind(this),t,!1);return this.createBean(l),l.addCssClassToTitleBar("ag-filter-toolpanel-header"),!1===i.get(l.getFilterGroupId())&&l.collapse(),[l]}},i.prototype.filtersExistInChildren=function(e){var t=this;return e.some((function(e){return e instanceof o.ProvidedColumnGroup?t.filtersExistInChildren(e.getChildren()):t.shouldDisplayFilter(e)}))},i.prototype.shouldDisplayFilter=function(e){var t=e.getColDef()&&e.getColDef().suppressFiltersToolPanel;return e.isFilterAllowed()&&!t},i.prototype.getExpansionState=function(){var e=new Map,t=function(o){e.set(o.getFilterGroupId(),o.isExpanded()),o.getChildren().forEach((function(o){o instanceof h?t(o):e.set(o.getColumn().getId(),o.isExpanded())}))};return this.filterGroupComps.forEach(t),e},i.prototype.refresh=function(){},i.prototype.setVisible=function(t){e.prototype.setDisplayed.call(this,t),t&&!this.initialised&&this.init(this.params)},i.prototype.expandFilterGroups=function(e,t){var i=[],n=function(r){var s=r.getFilterGroupId();(!t||o._.includes(t,s))&&(e&&r.isColumnGroup()?r.expand():r.collapse(),i.push(s)),r.getChildren().forEach((function(e){e instanceof h&&n(e)}))};if(this.filterGroupComps.forEach(n),this.onGroupExpanded(),t){var r=t.filter((function(e){return i.indexOf(e)<0}));r.length>0&&console.warn("AG Grid: unable to find groups for these supplied groupIds:",r)}},i.prototype.expandFilters=function(e,t){var i=[],n=function(r){if(r instanceof h){var s=!1;return r.getChildren().forEach((function(t){n(t)&&(e?(r.expand(),s=!0):r.isColumnGroup()||r.collapse())})),s}var l=r.getColumn().getColId(),a=!t||o._.includes(t,l);return a&&(e?r.expand():r.collapse(),i.push(l)),a};if(this.filterGroupComps.forEach(n),this.onGroupExpanded(),t){var r=t.filter((function(e){return i.indexOf(e)<0}));r.length>0&&console.warn("AG Grid: unable to find columns for these supplied colIds:",r)}},i.prototype.onGroupExpanded=function(){this.fireExpandedEvent()},i.prototype.fireExpandedEvent=function(){var e,o=0,i=0,n=function(e){e.isColumnGroup()&&(e.isExpanded()?o++:i++,e.getChildren().forEach((function(e){e instanceof h&&n(e)})))};this.filterGroupComps.forEach(n),e=o>0&&i>0?t.INDETERMINATE:i>0?t.COLLAPSED:t.EXPANDED,this.dispatchEvent({type:"groupExpanded",state:e})},i.prototype.performFilterSearch=function(e){this.searchFilterText=o._.exists(e)?e.toLowerCase():null,this.searchFilters(this.searchFilterText)},i.prototype.searchFilters=function(e){var t,i,n=function(t){return!o._.exists(e)||-1!==t.toLowerCase().indexOf(e)},r=function(e,t){if(!(e instanceof h))return n(e.getColumnFilterName()||"");var o=e.getChildren(),i=n(e.getFilterGroupName()),s=t||i;if(s){e.hideGroup(!1);for(var l=0;l<o.length;l++)r(o[l],s),e.hideGroupItem(!1,l);return!0}var a=!1;return o.forEach((function(o,i){var n=r(o,t);e.hideGroupItem(!n,i),n&&(a=!0)})),e.hideGroup(!a),a};this.filterGroupComps.forEach((function(e,o){r(e,!1),void 0===t?e.containsCssClass("ag-hidden")||(t=o,i=o):e.containsCssClass("ag-hidden")||i===o||(i=o)})),this.setFirstAndLastVisible(t,i)},i.prototype.setFirstAndLastVisible=function(e,t){this.filterGroupComps.forEach((function(o,i){o.removeCssClass("ag-first-group-visible"),o.removeCssClass("ag-last-group-visible"),i===e&&o.addCssClass("ag-first-group-visible"),i===t&&o.addCssClass("ag-last-group-visible")}))},i.prototype.refreshFilters=function(e){this.filterGroupComps.forEach((function(t){return t.refreshFilters(e)}))},i.prototype.destroyFilters=function(){this.filterGroupComps=this.destroyBeans(this.filterGroupComps),o._.clearElement(this.getGui())},i.prototype.destroy=function(){this.destroyFilters(),e.prototype.destroy.call(this)},i.TEMPLATE='<div class="ag-filter-list-panel"></div>',y([o.Autowired("gridApi")],i.prototype,"gridApi",void 0),y([o.Autowired("columnApi")],i.prototype,"columnApi",void 0),y([o.Autowired("toolPanelColDefService")],i.prototype,"toolPanelColDefService",void 0),y([o.Autowired("columnModel")],i.prototype,"columnModel",void 0),i}(o.Component),C=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(t,o)};return function(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),g=function(){return(g=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)},E=function(e,t,o,i){var n,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(s=(r<3?n(s):r>3?n(t,o,s):n(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},v=function(e){function t(){var o=e.call(this,t.TEMPLATE)||this;return o.initialised=!1,o.listenerDestroyFuncs=[],o}return C(t,e),t.prototype.init=function(e){this.initialised&&(this.listenerDestroyFuncs.forEach((function(e){return e()})),this.listenerDestroyFuncs=[]),this.initialised=!0;var t={suppressExpandAll:!1,suppressFilterSearch:!1,suppressSyncLayoutWithGrid:!1,api:this.gridApi,columnApi:this.columnApi};this.params=g(g(g({},t),e),{context:this.gridOptionsService.context}),this.filtersToolPanelHeaderPanel.init(this.params),this.filtersToolPanelListPanel.init(this.params);var o=this.params.suppressExpandAll,i=this.params.suppressFilterSearch;o&&i&&this.filtersToolPanelHeaderPanel.setDisplayed(!1),this.listenerDestroyFuncs.push(this.addManagedListener(this.filtersToolPanelHeaderPanel,"expandAll",this.onExpandAll.bind(this)),this.addManagedListener(this.filtersToolPanelHeaderPanel,"collapseAll",this.onCollapseAll.bind(this)),this.addManagedListener(this.filtersToolPanelHeaderPanel,"searchChanged",this.onSearchChanged.bind(this)),this.addManagedListener(this.filtersToolPanelListPanel,"groupExpanded",this.onGroupExpanded.bind(this)))},t.prototype.setVisible=function(t){e.prototype.setDisplayed.call(this,t),t&&!this.initialised&&this.init(this.params)},t.prototype.onExpandAll=function(){this.filtersToolPanelListPanel.expandFilterGroups(!0)},t.prototype.onCollapseAll=function(){this.filtersToolPanelListPanel.expandFilterGroups(!1)},t.prototype.onSearchChanged=function(e){this.filtersToolPanelListPanel.performFilterSearch(e.searchText)},t.prototype.setFilterLayout=function(e){this.filtersToolPanelListPanel.setFiltersLayout(e)},t.prototype.onGroupExpanded=function(e){this.filtersToolPanelHeaderPanel.setExpandState(e.state)},t.prototype.expandFilterGroups=function(e){this.filtersToolPanelListPanel.expandFilterGroups(!0,e)},t.prototype.collapseFilterGroups=function(e){this.filtersToolPanelListPanel.expandFilterGroups(!1,e)},t.prototype.expandFilters=function(e){this.filtersToolPanelListPanel.expandFilters(!0,e)},t.prototype.collapseFilters=function(e){this.filtersToolPanelListPanel.expandFilters(!1,e)},t.prototype.syncLayoutWithGrid=function(){this.filtersToolPanelListPanel.syncFilterLayout()},t.prototype.refresh=function(){this.init(this.params)},t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.TEMPLATE='<div class="ag-filter-toolpanel">\n <ag-filters-tool-panel-header ref="filtersToolPanelHeaderPanel"></ag-filters-tool-panel-header>\n <ag-filters-tool-panel-list ref="filtersToolPanelListPanel"></ag-filters-tool-panel-list>\n </div>',E([o.RefSelector("filtersToolPanelHeaderPanel")],t.prototype,"filtersToolPanelHeaderPanel",void 0),E([o.RefSelector("filtersToolPanelListPanel")],t.prototype,"filtersToolPanelListPanel",void 0),E([o.Autowired("gridApi")],t.prototype,"gridApi",void 0),E([o.Autowired("columnApi")],t.prototype,"columnApi",void 0),t}(o.Component),F={version:"30.0.3",moduleName:o.ModuleNames.FiltersToolPanelModule,beans:[],agStackComponents:[{componentName:"AgFiltersToolPanelHeader",componentClass:l},{componentName:"AgFiltersToolPanelList",componentClass:m}],userComponents:[{componentName:"agFiltersToolPanel",componentClass:v}],dependantModules:[n.SideBarModule,i.EnterpriseCoreModule]};exports.FiltersToolPanelModule=F;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t,o=require("@ag-grid-community/core"),i=require("@ag-grid-enterprise/core"),n=require("@ag-grid-enterprise/side-bar"),r=(e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(t,o)},function(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}),s=function(e,t,o,i){var n,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(s=(r<3?n(s):r>3?n(t,o,s):n(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s};!function(e){e[e.EXPANDED=0]="EXPANDED",e[e.COLLAPSED=1]="COLLAPSED",e[e.INDETERMINATE=2]="INDETERMINATE"}(t||(t={}));var l=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return r(i,e),i.prototype.preConstruct=function(){this.setTemplate('<div class="ag-filter-toolpanel-search" role="presentation">\n <div ref="eExpand" class="ag-filter-toolpanel-expand"></div>\n <ag-input-text-field ref="eFilterTextField" class="ag-filter-toolpanel-search-input"></ag-input-text-field>\n </div>')},i.prototype.postConstruct=function(){var e=this.localeService.getLocaleTextFunc();this.eFilterTextField.onValueChange(this.onSearchTextChanged.bind(this)),this.eFilterTextField.setInputAriaLabel(e("ariaFilterColumnsInput","Filter Columns Input")),this.createExpandIcons(),this.setExpandState(t.EXPANDED),this.addManagedListener(this.eExpand,"click",this.onExpandClicked.bind(this)),this.addManagedListener(this.eventService,o.Events.EVENT_NEW_COLUMNS_LOADED,this.showOrHideOptions.bind(this))},i.prototype.init=function(e){this.params=e,this.columnModel.isReady()&&this.showOrHideOptions()},i.prototype.createExpandIcons=function(){this.eExpand.appendChild(this.eExpandChecked=o._.createIconNoSpan("columnSelectOpen",this.gridOptionsService)),this.eExpand.appendChild(this.eExpandUnchecked=o._.createIconNoSpan("columnSelectClosed",this.gridOptionsService)),this.eExpand.appendChild(this.eExpandIndeterminate=o._.createIconNoSpan("columnSelectIndeterminate",this.gridOptionsService))},i.prototype.showOrHideOptions=function(){var e=!this.params.suppressFilterSearch,t=!this.params.suppressExpandAll,i=this.localeService.getLocaleTextFunc();this.eFilterTextField.setInputPlaceholder(i("searchOoo","Search..."));var n=this.columnModel.getAllGridColumns().some((function(e){return e.getOriginalParent()&&e.isFilterAllowed()}));o._.setDisplayed(this.eFilterTextField.getGui(),e),o._.setDisplayed(this.eExpand,t&&n)},i.prototype.onSearchTextChanged=function(){var e=this;this.onSearchTextChangedDebounced||(this.onSearchTextChangedDebounced=o._.debounce((function(){e.dispatchEvent({type:"searchChanged",searchText:e.eFilterTextField.getValue()})}),300)),this.onSearchTextChangedDebounced()},i.prototype.onExpandClicked=function(){var e=this.currentExpandState===t.EXPANDED?{type:"collapseAll"}:{type:"expandAll"};this.dispatchEvent(e)},i.prototype.setExpandState=function(e){this.currentExpandState=e,o._.setDisplayed(this.eExpandChecked,this.currentExpandState===t.EXPANDED),o._.setDisplayed(this.eExpandUnchecked,this.currentExpandState===t.COLLAPSED),o._.setDisplayed(this.eExpandIndeterminate,this.currentExpandState===t.INDETERMINATE)},s([o.Autowired("columnModel")],i.prototype,"columnModel",void 0),s([o.RefSelector("eExpand")],i.prototype,"eExpand",void 0),s([o.RefSelector("eFilterTextField")],i.prototype,"eFilterTextField",void 0),s([o.PreConstruct],i.prototype,"preConstruct",null),s([o.PostConstruct],i.prototype,"postConstruct",null),i}(o.Component),a=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(t,o)};return function(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),p=function(e,t,o,i){var n,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(s=(r<3?n(s):r>3?n(t,o,s):n(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},d=function(e){function t(o){void 0===o&&(o=!1);var i=e.call(this,t.TEMPLATE)||this;return i.expanded=!1,i.hideHeader=o,i}return a(t,e),t.prototype.postConstruct=function(){this.eExpandChecked=o._.createIconNoSpan("columnSelectOpen",this.gridOptionsService),this.eExpandUnchecked=o._.createIconNoSpan("columnSelectClosed",this.gridOptionsService),this.eExpand.appendChild(this.eExpandChecked),this.eExpand.appendChild(this.eExpandUnchecked)},t.prototype.setColumn=function(e){var t=this;this.column=e,this.eFilterName.innerText=this.columnModel.getDisplayNameForColumn(this.column,"filterToolPanel",!1)||"",this.addManagedListener(this.eFilterToolPanelHeader,"click",this.toggleExpanded.bind(this)),this.addManagedListener(this.eFilterToolPanelHeader,"keydown",(function(e){e.key===o.KeyCode.ENTER&&t.toggleExpanded()})),this.addManagedListener(this.eventService,o.Events.EVENT_FILTER_OPENED,this.onFilterOpened.bind(this)),this.addInIcon("filter",this.eFilterIcon,this.column),o._.setDisplayed(this.eFilterIcon,this.isFilterActive(),{skipAriaHidden:!0}),o._.setDisplayed(this.eExpandChecked,!1),this.hideHeader?(o._.setDisplayed(this.eFilterToolPanelHeader,!1),this.eFilterToolPanelHeader.removeAttribute("tabindex")):this.eFilterToolPanelHeader.setAttribute("tabindex","0"),this.addManagedListener(this.column,o.Column.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.addManagedListener(this.eventService,o.Events.EVENT_FILTER_DESTROYED,this.onFilterDestroyed.bind(this))},t.prototype.getColumn=function(){return this.column},t.prototype.getColumnFilterName=function(){return this.columnModel.getDisplayNameForColumn(this.column,"filterToolPanel",!1)},t.prototype.addCssClassToTitleBar=function(e){this.eFilterToolPanelHeader.classList.add(e)},t.prototype.addInIcon=function(e,t,i){if(null!=t){var n=o._.createIconNoSpan(e,this.gridOptionsService,i);t.appendChild(n)}},t.prototype.isFilterActive=function(){return this.filterManager.isFilterActive(this.column)},t.prototype.onFilterChanged=function(){o._.setDisplayed(this.eFilterIcon,this.isFilterActive(),{skipAriaHidden:!0}),this.dispatchEvent({type:o.Column.EVENT_FILTER_CHANGED})},t.prototype.onFilterDestroyed=function(e){this.expanded&&"api"===e.source&&e.column.getId()===this.column.getId()&&this.columnModel.getPrimaryColumn(this.column)&&(this.removeFilterElement(),this.addFilterElement())},t.prototype.toggleExpanded=function(){this.expanded?this.collapse():this.expand()},t.prototype.expand=function(){this.expanded||(this.expanded=!0,o._.setAriaExpanded(this.eFilterToolPanelHeader,!0),o._.setDisplayed(this.eExpandChecked,!0),o._.setDisplayed(this.eExpandUnchecked,!1),this.addFilterElement())},t.prototype.addFilterElement=function(){var e=this,t=o._.loadTemplate('<div class="ag-filter-toolpanel-instance-filter"></div>'),i=this.filterManager.getOrCreateFilterWrapper(this.column,"TOOLBAR");if(i){var n=i.filterPromise,r=i.guiPromise;null==n||n.then((function(o){e.underlyingFilter=o,o&&r.then((function(i){i&&t.appendChild(i),e.agFilterToolPanelBody.appendChild(t),o.afterGuiAttached&&o.afterGuiAttached({container:"toolPanel"})}))}))}},t.prototype.collapse=function(){var e,t;this.expanded&&(this.expanded=!1,o._.setAriaExpanded(this.eFilterToolPanelHeader,!1),this.removeFilterElement(),o._.setDisplayed(this.eExpandChecked,!1),o._.setDisplayed(this.eExpandUnchecked,!0),null===(t=null===(e=this.underlyingFilter)||void 0===e?void 0:e.afterGuiDetached)||void 0===t||t.call(e))},t.prototype.removeFilterElement=function(){o._.clearElement(this.agFilterToolPanelBody)},t.prototype.isExpanded=function(){return this.expanded},t.prototype.refreshFilter=function(e){var t;if(this.expanded){var o=this.underlyingFilter;o&&(e?"function"==typeof o.refreshVirtualList&&o.refreshVirtualList():null===(t=o.afterGuiDetached)||void 0===t||t.call(o))}},t.prototype.onFilterOpened=function(e){"COLUMN_MENU"===e.source&&e.column===this.column&&this.expanded&&this.collapse()},t.TEMPLATE='\n <div class="ag-filter-toolpanel-instance">\n <div class="ag-filter-toolpanel-header ag-filter-toolpanel-instance-header" ref="eFilterToolPanelHeader" role="button" aria-expanded="false">\n <div ref="eExpand" class="ag-filter-toolpanel-expand"></div>\n <span ref="eFilterName" class="ag-header-cell-text"></span>\n <span ref="eFilterIcon" class="ag-header-icon ag-filter-icon ag-filter-toolpanel-instance-header-icon" aria-hidden="true"></span>\n </div>\n <div class="ag-filter-toolpanel-instance-body ag-filter" ref="agFilterToolPanelBody"></div>\n </div>',p([o.RefSelector("eFilterToolPanelHeader")],t.prototype,"eFilterToolPanelHeader",void 0),p([o.RefSelector("eFilterName")],t.prototype,"eFilterName",void 0),p([o.RefSelector("agFilterToolPanelBody")],t.prototype,"agFilterToolPanelBody",void 0),p([o.RefSelector("eFilterIcon")],t.prototype,"eFilterIcon",void 0),p([o.RefSelector("eExpand")],t.prototype,"eExpand",void 0),p([o.Autowired("filterManager")],t.prototype,"filterManager",void 0),p([o.Autowired("columnModel")],t.prototype,"columnModel",void 0),p([o.PostConstruct],t.prototype,"postConstruct",null),t}(o.Component),c=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(t,o)};return function(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),u=function(e,t,o,i){var n,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(s=(r<3?n(s):r>3?n(t,o,s):n(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},h=function(e){function t(t,o,i,n,r){var s=e.call(this)||this;return s.columnGroup=t,s.childFilterComps=o,s.depth=n,s.expandedCallback=i,s.showingColumn=r,s}return c(t,e),t.prototype.preConstruct=function(){this.setTemplate(t.TEMPLATE,{filterGroupComp:{cssIdentifier:"filter-toolpanel",direction:"vertical"}})},t.prototype.init=function(){var e=this;this.setGroupTitle(),this.filterGroupComp.setAlignItems("stretch"),this.filterGroupComp.addCssClass("ag-filter-toolpanel-group-level-"+this.depth),this.filterGroupComp.addCssClassToTitleBar("ag-filter-toolpanel-group-level-"+this.depth+"-header"),this.childFilterComps.forEach((function(t){e.filterGroupComp.addItem(t),t.addCssClassToTitleBar("ag-filter-toolpanel-group-level-"+(e.depth+1)+"-header")})),this.refreshFilterClass(),this.addExpandCollapseListeners(),this.addFilterChangedListeners(),this.setupTooltip()},t.prototype.setupTooltip=function(){var e=this;if(this.showingColumn){var t=function(){var t=e.columnGroup.getColDef().headerTooltip;e.setTooltip(t)};t(),this.addManagedListener(this.eventService,o.Events.EVENT_NEW_COLUMNS_LOADED,t)}},t.prototype.getTooltipParams=function(){var t=e.prototype.getTooltipParams.call(this);return t.location="filterToolPanelColumnGroup",t},t.prototype.addCssClassToTitleBar=function(e){this.filterGroupComp.addCssClassToTitleBar(e)},t.prototype.refreshFilters=function(e){this.childFilterComps.forEach((function(o){o instanceof t?o.refreshFilters(e):o.refreshFilter(e)}))},t.prototype.isColumnGroup=function(){return this.columnGroup instanceof o.ProvidedColumnGroup},t.prototype.isExpanded=function(){return this.filterGroupComp.isExpanded()},t.prototype.getChildren=function(){return this.childFilterComps},t.prototype.getFilterGroupName=function(){return this.filterGroupName?this.filterGroupName:""},t.prototype.getFilterGroupId=function(){return this.columnGroup.getId()},t.prototype.hideGroupItem=function(e,t){this.filterGroupComp.hideItem(e,t)},t.prototype.hideGroup=function(e){this.setDisplayed(!e)},t.prototype.forEachToolPanelFilterChild=function(e){this.childFilterComps.forEach((function(t){t instanceof d&&e(t)}))},t.prototype.addExpandCollapseListeners=function(){var e=this,t=this.isColumnGroup()?function(){return e.expandedCallback()}:function(){return e.forEachToolPanelFilterChild((function(e){return e.expand()}))},i=this.isColumnGroup()?function(){return e.expandedCallback()}:function(){return e.forEachToolPanelFilterChild((function(e){return e.collapse()}))};this.addManagedListener(this.filterGroupComp,o.AgGroupComponent.EVENT_EXPANDED,t),this.addManagedListener(this.filterGroupComp,o.AgGroupComponent.EVENT_COLLAPSED,i)},t.prototype.getColumns=function(){return this.columnGroup instanceof o.ProvidedColumnGroup?this.columnGroup.getLeafColumns():[this.columnGroup]},t.prototype.addFilterChangedListeners=function(){var e=this;this.getColumns().forEach((function(t){e.addManagedListener(t,o.Column.EVENT_FILTER_CHANGED,(function(){return e.refreshFilterClass()}))})),this.columnGroup instanceof o.ProvidedColumnGroup||this.addManagedListener(this.eventService,o.Events.EVENT_FILTER_OPENED,this.onFilterOpened.bind(this))},t.prototype.refreshFilterClass=function(){var e=this.getColumns();this.filterGroupComp.addOrRemoveCssClass("ag-has-filter",e.some((function(e){return e.isFilterActive()})))},t.prototype.onFilterOpened=function(e){"COLUMN_MENU"===e.source&&e.column===this.columnGroup&&this.isExpanded()&&this.collapse()},t.prototype.expand=function(){this.filterGroupComp.toggleGroupExpand(!0)},t.prototype.collapse=function(){this.filterGroupComp.toggleGroupExpand(!1)},t.prototype.setGroupTitle=function(){this.filterGroupName=this.columnGroup instanceof o.ProvidedColumnGroup?this.getColumnGroupName(this.columnGroup):this.getColumnName(this.columnGroup),this.filterGroupComp.setTitle(this.filterGroupName||"")},t.prototype.getColumnGroupName=function(e){return this.columnModel.getDisplayNameForProvidedColumnGroup(null,e,"filterToolPanel")},t.prototype.getColumnName=function(e){return this.columnModel.getDisplayNameForColumn(e,"filterToolPanel",!1)},t.prototype.destroyFilters=function(){this.childFilterComps=this.destroyBeans(this.childFilterComps),o._.clearElement(this.getGui())},t.prototype.destroy=function(){this.destroyFilters(),e.prototype.destroy.call(this)},t.TEMPLATE='<div class="ag-filter-toolpanel-group-wrapper">\n <ag-group-component ref="filterGroupComp"></ag-group-component>\n </div>',u([o.RefSelector("filterGroupComp")],t.prototype,"filterGroupComp",void 0),u([o.Autowired("columnModel")],t.prototype,"columnModel",void 0),u([o.PreConstruct],t.prototype,"preConstruct",null),u([o.PostConstruct],t.prototype,"init",null),t}(o.Component),f=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(t,o)};return function(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),y=function(e,t,o,i){var n,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(s=(r<3?n(s):r>3?n(t,o,s):n(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},m=function(e){function i(){var t=e.call(this,i.TEMPLATE)||this;return t.initialised=!1,t.filterGroupComps=[],t}return f(i,e),i.prototype.init=function(e){var t=this;this.initialised=!0;var i={suppressExpandAll:!1,suppressFilterSearch:!1,suppressSyncLayoutWithGrid:!1,api:this.gridApi,columnApi:this.columnApi,context:this.gridOptionsService.context};o._.mergeDeep(i,e),this.params=i,this.params.suppressSyncLayoutWithGrid||this.addManagedListener(this.eventService,o.Events.EVENT_COLUMN_MOVED,(function(){return t.onColumnsChanged()})),this.addManagedListener(this.eventService,o.Events.EVENT_NEW_COLUMNS_LOADED,(function(){return t.onColumnsChanged()})),this.addManagedListener(this.eventService,o.Events.EVENT_TOOL_PANEL_VISIBLE_CHANGED,(function(e){"filters"===e.key&&t.refreshFilters(e.visible)})),this.columnModel.isReady()&&this.onColumnsChanged()},i.prototype.onColumnsChanged=function(){var e=this.columnModel.isPivotMode();!this.params.suppressSyncLayoutWithGrid&&!e?this.syncFilterLayout():this.buildTreeFromProvidedColumnDefs()},i.prototype.syncFilterLayout=function(){this.toolPanelColDefService.syncLayoutWithGrid(this.setFiltersLayout.bind(this))},i.prototype.buildTreeFromProvidedColumnDefs=function(){var e=this.columnModel.getPrimaryColumnTree();this.recreateFilters(e)},i.prototype.setFiltersLayout=function(e){var t=this.toolPanelColDefService.createColumnTree(e);this.recreateFilters(t)},i.prototype.recreateFilters=function(e){var t=this,i=this.gridOptionsService.getDocument().activeElement,n=this.getExpansionState();this.destroyFilters(),this.filterGroupComps=this.recursivelyAddComps(e,0,n);var r=this.filterGroupComps.length;r&&(this.filterGroupComps.forEach((function(e){return t.appendChild(e)})),this.setFirstAndLastVisible(0,r-1)),o._.exists(this.searchFilterText)&&this.searchFilters(this.searchFilterText),this.fireExpandedEvent(),this.getGui().contains(i)&&i.focus()},i.prototype.recursivelyAddComps=function(e,t,i){var n=this;return o._.flatten(e.map((function(e){if(e instanceof o.ProvidedColumnGroup)return o._.flatten(n.recursivelyAddFilterGroupComps(e,t,i));var r=e;if(!n.shouldDisplayFilter(r))return[];var s=new d(0===t);if(n.createBean(s),s.setColumn(r),i.get(r.getId())&&s.expand(),t>0)return s;var l=n.createBean(new h(r,[s],n.onGroupExpanded.bind(n),t,!0));return l.addCssClassToTitleBar("ag-filter-toolpanel-header"),i.get(l.getFilterGroupId())||l.collapse(),l})))},i.prototype.recursivelyAddFilterGroupComps=function(e,t,i){if(this.filtersExistInChildren(e.getChildren())){var n=e.getColGroupDef();if(n&&n.suppressFiltersToolPanel)return[];var r=e.isPadding()?t:t+1,s=o._.flatten(this.recursivelyAddComps(e.getChildren(),r,i));if(e.isPadding())return s;var l=new h(e,s,this.onGroupExpanded.bind(this),t,!1);return this.createBean(l),l.addCssClassToTitleBar("ag-filter-toolpanel-header"),!1===i.get(l.getFilterGroupId())&&l.collapse(),[l]}},i.prototype.filtersExistInChildren=function(e){var t=this;return e.some((function(e){return e instanceof o.ProvidedColumnGroup?t.filtersExistInChildren(e.getChildren()):t.shouldDisplayFilter(e)}))},i.prototype.shouldDisplayFilter=function(e){var t=e.getColDef()&&e.getColDef().suppressFiltersToolPanel;return e.isFilterAllowed()&&!t},i.prototype.getExpansionState=function(){var e=new Map,t=function(o){e.set(o.getFilterGroupId(),o.isExpanded()),o.getChildren().forEach((function(o){o instanceof h?t(o):e.set(o.getColumn().getId(),o.isExpanded())}))};return this.filterGroupComps.forEach(t),e},i.prototype.refresh=function(){},i.prototype.setVisible=function(t){e.prototype.setDisplayed.call(this,t),t&&!this.initialised&&this.init(this.params)},i.prototype.expandFilterGroups=function(e,t){var i=[],n=function(r){var s=r.getFilterGroupId();(!t||o._.includes(t,s))&&(e&&r.isColumnGroup()?r.expand():r.collapse(),i.push(s)),r.getChildren().forEach((function(e){e instanceof h&&n(e)}))};if(this.filterGroupComps.forEach(n),this.onGroupExpanded(),t){var r=t.filter((function(e){return i.indexOf(e)<0}));r.length>0&&console.warn("AG Grid: unable to find groups for these supplied groupIds:",r)}},i.prototype.expandFilters=function(e,t){var i=[],n=function(r){if(r instanceof h){var s=!1;return r.getChildren().forEach((function(t){n(t)&&(e?(r.expand(),s=!0):r.isColumnGroup()||r.collapse())})),s}var l=r.getColumn().getColId(),a=!t||o._.includes(t,l);return a&&(e?r.expand():r.collapse(),i.push(l)),a};if(this.filterGroupComps.forEach(n),this.onGroupExpanded(),t){var r=t.filter((function(e){return i.indexOf(e)<0}));r.length>0&&console.warn("AG Grid: unable to find columns for these supplied colIds:",r)}},i.prototype.onGroupExpanded=function(){this.fireExpandedEvent()},i.prototype.fireExpandedEvent=function(){var e,o=0,i=0,n=function(e){e.isColumnGroup()&&(e.isExpanded()?o++:i++,e.getChildren().forEach((function(e){e instanceof h&&n(e)})))};this.filterGroupComps.forEach(n),e=o>0&&i>0?t.INDETERMINATE:i>0?t.COLLAPSED:t.EXPANDED,this.dispatchEvent({type:"groupExpanded",state:e})},i.prototype.performFilterSearch=function(e){this.searchFilterText=o._.exists(e)?e.toLowerCase():null,this.searchFilters(this.searchFilterText)},i.prototype.searchFilters=function(e){var t,i,n=function(t){return!o._.exists(e)||-1!==t.toLowerCase().indexOf(e)},r=function(e,t){if(!(e instanceof h))return n(e.getColumnFilterName()||"");var o=e.getChildren(),i=n(e.getFilterGroupName()),s=t||i;if(s){e.hideGroup(!1);for(var l=0;l<o.length;l++)r(o[l],s),e.hideGroupItem(!1,l);return!0}var a=!1;return o.forEach((function(o,i){var n=r(o,t);e.hideGroupItem(!n,i),n&&(a=!0)})),e.hideGroup(!a),a};this.filterGroupComps.forEach((function(e,o){r(e,!1),void 0===t?e.containsCssClass("ag-hidden")||(t=o,i=o):e.containsCssClass("ag-hidden")||i===o||(i=o)})),this.setFirstAndLastVisible(t,i)},i.prototype.setFirstAndLastVisible=function(e,t){this.filterGroupComps.forEach((function(o,i){o.removeCssClass("ag-first-group-visible"),o.removeCssClass("ag-last-group-visible"),i===e&&o.addCssClass("ag-first-group-visible"),i===t&&o.addCssClass("ag-last-group-visible")}))},i.prototype.refreshFilters=function(e){this.filterGroupComps.forEach((function(t){return t.refreshFilters(e)}))},i.prototype.destroyFilters=function(){this.filterGroupComps=this.destroyBeans(this.filterGroupComps),o._.clearElement(this.getGui())},i.prototype.destroy=function(){this.destroyFilters(),e.prototype.destroy.call(this)},i.TEMPLATE='<div class="ag-filter-list-panel"></div>',y([o.Autowired("gridApi")],i.prototype,"gridApi",void 0),y([o.Autowired("columnApi")],i.prototype,"columnApi",void 0),y([o.Autowired("toolPanelColDefService")],i.prototype,"toolPanelColDefService",void 0),y([o.Autowired("columnModel")],i.prototype,"columnModel",void 0),i}(o.Component),C=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(t,o)};return function(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),g=function(){return(g=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)},E=function(e,t,o,i){var n,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(s=(r<3?n(s):r>3?n(t,o,s):n(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},v=function(e){function t(){var o=e.call(this,t.TEMPLATE)||this;return o.initialised=!1,o.listenerDestroyFuncs=[],o}return C(t,e),t.prototype.init=function(e){this.initialised&&(this.listenerDestroyFuncs.forEach((function(e){return e()})),this.listenerDestroyFuncs=[]),this.initialised=!0;var t={suppressExpandAll:!1,suppressFilterSearch:!1,suppressSyncLayoutWithGrid:!1,api:this.gridApi,columnApi:this.columnApi};this.params=g(g(g({},t),e),{context:this.gridOptionsService.context}),this.filtersToolPanelHeaderPanel.init(this.params),this.filtersToolPanelListPanel.init(this.params);var o=this.params.suppressExpandAll,i=this.params.suppressFilterSearch;o&&i&&this.filtersToolPanelHeaderPanel.setDisplayed(!1),this.listenerDestroyFuncs.push(this.addManagedListener(this.filtersToolPanelHeaderPanel,"expandAll",this.onExpandAll.bind(this)),this.addManagedListener(this.filtersToolPanelHeaderPanel,"collapseAll",this.onCollapseAll.bind(this)),this.addManagedListener(this.filtersToolPanelHeaderPanel,"searchChanged",this.onSearchChanged.bind(this)),this.addManagedListener(this.filtersToolPanelListPanel,"groupExpanded",this.onGroupExpanded.bind(this)))},t.prototype.setVisible=function(t){e.prototype.setDisplayed.call(this,t),t&&!this.initialised&&this.init(this.params)},t.prototype.onExpandAll=function(){this.filtersToolPanelListPanel.expandFilterGroups(!0)},t.prototype.onCollapseAll=function(){this.filtersToolPanelListPanel.expandFilterGroups(!1)},t.prototype.onSearchChanged=function(e){this.filtersToolPanelListPanel.performFilterSearch(e.searchText)},t.prototype.setFilterLayout=function(e){this.filtersToolPanelListPanel.setFiltersLayout(e)},t.prototype.onGroupExpanded=function(e){this.filtersToolPanelHeaderPanel.setExpandState(e.state)},t.prototype.expandFilterGroups=function(e){this.filtersToolPanelListPanel.expandFilterGroups(!0,e)},t.prototype.collapseFilterGroups=function(e){this.filtersToolPanelListPanel.expandFilterGroups(!1,e)},t.prototype.expandFilters=function(e){this.filtersToolPanelListPanel.expandFilters(!0,e)},t.prototype.collapseFilters=function(e){this.filtersToolPanelListPanel.expandFilters(!1,e)},t.prototype.syncLayoutWithGrid=function(){this.filtersToolPanelListPanel.syncFilterLayout()},t.prototype.refresh=function(){this.init(this.params)},t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.TEMPLATE='<div class="ag-filter-toolpanel">\n <ag-filters-tool-panel-header ref="filtersToolPanelHeaderPanel"></ag-filters-tool-panel-header>\n <ag-filters-tool-panel-list ref="filtersToolPanelListPanel"></ag-filters-tool-panel-list>\n </div>',E([o.RefSelector("filtersToolPanelHeaderPanel")],t.prototype,"filtersToolPanelHeaderPanel",void 0),E([o.RefSelector("filtersToolPanelListPanel")],t.prototype,"filtersToolPanelListPanel",void 0),E([o.Autowired("gridApi")],t.prototype,"gridApi",void 0),E([o.Autowired("columnApi")],t.prototype,"columnApi",void 0),t}(o.Component),F={version:"30.0.5",moduleName:o.ModuleNames.FiltersToolPanelModule,beans:[],agStackComponents:[{componentName:"AgFiltersToolPanelHeader",componentClass:l},{componentName:"AgFiltersToolPanelList",componentClass:m}],userComponents:[{componentName:"agFiltersToolPanel",componentClass:v}],dependantModules:[n.SideBarModule,i.EnterpriseCoreModule]};exports.FiltersToolPanelModule=F;
{
"name": "@ag-grid-enterprise/filter-tool-panel",
"version": "30.0.3",
"version": "30.0.5",
"description": "Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue",

@@ -13,6 +13,6 @@ "main": "./dist/esm/es6/main.mjs",

"build-cjs-prod": "npx tsc -p tsconfig.cjs.es5.json --sourceMap false && npx tsc -p tsconfig.cjs.es6.json --sourceMap false",
"build-esm-prod": "npx tsc -p tsconfig.esm.es5.json --sourceMap false && npx tsc -p tsconfig.esm.es6.json --sourceMap false && npx gulp build-prod",
"build-esm-prod": "npx tsc -p tsconfig.esm.es5.json --sourceMap false && npx tsc -p tsconfig.esm.es6.json --sourceMap false",
"package": "node ../../module-build/rollup/build.js",
"build": "npm run build-cjs && npm run build-esm && npm run hash",
"build-prod": "npm run build-cjs-prod && npm run build-esm-prod && npm run hash",
"build": "npm run build-cjs && npm run build-esm && npx gulp mjs-processing && npm run hash",
"build-prod": "npm run build-cjs-prod && npm run build-esm-prod && npx gulp mjs-processing && npm run hash",
"hash": "sh ../../scripts/hashDirectory.sh > .hash"

@@ -51,5 +51,5 @@ },

"dependencies": {
"@ag-grid-community/core": "~30.0.3",
"@ag-grid-enterprise/core": "~30.0.3",
"@ag-grid-enterprise/side-bar": "~30.0.3"
"@ag-grid-community/core": "~30.0.5",
"@ag-grid-enterprise/core": "~30.0.5",
"@ag-grid-enterprise/side-bar": "~30.0.5"
},

@@ -56,0 +56,0 @@ "devDependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc