Socket
Socket
Sign inDemoInstall

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

Package Overview
Dependencies
Maintainers
3
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 31.1.0 to 31.1.1

2

dist/cjs/es5/version.d.ts

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

export declare const VERSION = "31.1.0";
export declare const VERSION = "31.1.1";

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

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

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

export declare const VERSION = "31.1.0";
export declare const VERSION = "31.1.1";

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

// DO NOT UPDATE MANUALLY: Generated from script during build time
exports.VERSION = '31.1.0';
exports.VERSION = '31.1.1';
/**
* @ag-grid-enterprise/column-tool-panel - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v31.1.0
* @ag-grid-enterprise/column-tool-panel - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v31.1.1
* @link https://www.ag-grid.com/

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

/**
* @ag-grid-enterprise/column-tool-panel - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v31.1.0
* @ag-grid-enterprise/column-tool-panel - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v31.1.1
* @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"),n=require("@ag-grid-enterprise/core"),i=require("@ag-grid-enterprise/row-grouping"),r=require("@ag-grid-enterprise/side-bar"),s=(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 n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}),l=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(s=(r<3?i(s):r>3?i(t,o,s):i(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 a=function(e){function n(){return e.call(this,n.TEMPLATE)||this}return s(n,e),n.prototype.postConstruct=function(){var e=this;this.createExpandIcons(),this.addManagedListener(this.eExpand,"click",this.onExpandClicked.bind(this)),this.addManagedListener(this.eExpand,"keydown",(function(t){t.key===o.KeyCode.SPACE&&(t.preventDefault(),e.onExpandClicked())})),this.addManagedListener(this.eSelect.getInputElement(),"click",this.onSelectClicked.bind(this)),this.addManagedPropertyListener("functionsReadOnly",(function(){return e.onFunctionsReadOnlyPropChanged()})),this.eFilterTextField.setAutoComplete(!1).onValueChange((function(){return e.onFilterTextChanged()})),this.addManagedListener(this.eFilterTextField.getInputElement(),"keydown",this.onMiniFilterKeyDown.bind(this)),this.addManagedListener(this.eventService,o.Events.EVENT_NEW_COLUMNS_LOADED,this.showOrHideOptions.bind(this));var t=this.localeService.getLocaleTextFunc();this.eSelect.setInputAriaLabel(t("ariaColumnSelectAll","Toggle Select All Columns")),this.eFilterTextField.setInputAriaLabel(t("ariaFilterColumnsInput","Filter Columns Input")),this.activateTabIndex([this.eExpand])},n.prototype.onFunctionsReadOnlyPropChanged=function(){var e=this.gridOptionsService.get("functionsReadOnly");this.eSelect.setReadOnly(e),this.eSelect.addOrRemoveCssClass("ag-column-select-column-readonly",e)},n.prototype.init=function(e){this.params=e;var t=this.gridOptionsService.get("functionsReadOnly");this.eSelect.setReadOnly(t),this.eSelect.addOrRemoveCssClass("ag-column-select-column-readonly",t),this.columnModel.isReady()&&this.showOrHideOptions()},n.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)),this.setExpandState(t.EXPANDED)},n.prototype.showOrHideOptions=function(){var e=!this.params.suppressColumnFilter,t=!this.params.suppressColumnSelectAll,n=!this.params.suppressColumnExpandAll,i=this.columnModel.isPrimaryColumnGroupsPresent(),r=this.localeService.getLocaleTextFunc();this.eFilterTextField.setInputPlaceholder(r("searchOoo","Search...")),o._.setDisplayed(this.eFilterTextField.getGui(),e),o._.setDisplayed(this.eSelect.getGui(),t),o._.setDisplayed(this.eExpand,n&&i)},n.prototype.onFilterTextChanged=function(){var e=this;this.onFilterTextChangedDebounced||(this.onFilterTextChangedDebounced=o._.debounce((function(){var t=e.eFilterTextField.getValue();e.dispatchEvent({type:"filterChanged",filterText:t})}),n.DEBOUNCE_DELAY)),this.onFilterTextChangedDebounced()},n.prototype.onMiniFilterKeyDown=function(e){var t=this;e.key===o.KeyCode.ENTER&&setTimeout((function(){return t.onSelectClicked()}),n.DEBOUNCE_DELAY)},n.prototype.onSelectClicked=function(){this.dispatchEvent({type:this.selectState?"unselectAll":"selectAll"})},n.prototype.onExpandClicked=function(){this.dispatchEvent({type:this.expandState===t.EXPANDED?"collapseAll":"expandAll"})},n.prototype.setExpandState=function(e){this.expandState=e,o._.setDisplayed(this.eExpandChecked,this.expandState===t.EXPANDED),o._.setDisplayed(this.eExpandUnchecked,this.expandState===t.COLLAPSED),o._.setDisplayed(this.eExpandIndeterminate,this.expandState===t.INDETERMINATE)},n.prototype.setSelectionState=function(e){this.selectState=e,this.eSelect.setValue(this.selectState)},n.DEBOUNCE_DELAY=300,n.TEMPLATE='<div class="ag-column-select-header" role="presentation">\n <div ref="eExpand" class="ag-column-select-header-icon"></div>\n <ag-checkbox ref="eSelect" class="ag-column-select-header-checkbox"></ag-checkbox>\n <ag-input-text-field class="ag-column-select-header-filter-wrapper" ref="eFilterTextField"></ag-input-text-field>\n </div>',l([o.Autowired("columnModel")],n.prototype,"columnModel",void 0),l([o.RefSelector("eExpand")],n.prototype,"eExpand",void 0),l([o.RefSelector("eSelect")],n.prototype,"eSelect",void 0),l([o.RefSelector("eFilterTextField")],n.prototype,"eFilterTextField",void 0),l([o.PostConstruct],n.prototype,"postConstruct",null),n}(o.Component),u=function(){function e(e,t,n,i,r){void 0===i&&(i=!1),this.eventService=new o.EventService,this.displayName=e,this.dept=n,this.group=i,i?(this.columnGroup=t,this.expanded=r,this.children=[]):this.column=t}return e.prototype.isGroup=function(){return this.group},e.prototype.getDisplayName=function(){return this.displayName},e.prototype.getColumnGroup=function(){return this.columnGroup},e.prototype.getColumn=function(){return this.column},e.prototype.getDept=function(){return this.dept},e.prototype.isExpanded=function(){return!!this.expanded},e.prototype.getChildren=function(){return this.children},e.prototype.isPassesFilter=function(){return this.passesFilter},e.prototype.setExpanded=function(t){t!==this.expanded&&(this.expanded=t,this.eventService.dispatchEvent({type:e.EVENT_EXPANDED_CHANGED}))},e.prototype.setPassesFilter=function(e){this.passesFilter=e},e.prototype.addEventListener=function(e,t){this.eventService.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.eventService.removeEventListener(e,t)},e.EVENT_EXPANDED_CHANGED="expandedChanged",e}(),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 n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),p=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},d=function(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var n,i,r=o.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=r.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(o=r.return)&&o.call(r)}finally{if(i)throw i.error}}return s},h=function(e,t,o){if(o||2===arguments.length)for(var n,i=0,r=t.length;i<r;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))},f=function(e){var t="function"==typeof Symbol&&Symbol.iterator,o=t&&e[t],n=0;if(o)return o.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},m=function(e){function t(t,o,n){var i=e.call(this,'<div class="ag-menu"></div>')||this;return i.column=t,i.mouseEvent=o,i.parentEl=n,i.displayName=null,i}return c(t,e),t.prototype.postConstruct=function(){if(this.initializeProperties(this.column),this.buildMenuItemMap(),this.column instanceof o.Column?this.displayName=this.columnModel.getDisplayNameForColumn(this.column,"columnToolPanel"):this.displayName=this.columnModel.getDisplayNameForProvidedColumnGroup(null,this.column,"columnToolPanel"),this.isActive()){this.mouseEvent.preventDefault();var e=this.getMappedMenuItems();if(0===e.length)return;this.displayContextMenu(e)}},t.prototype.initializeProperties=function(e){e instanceof o.ProvidedColumnGroup?this.columns=e.getLeafColumns():this.columns=[e],this.allowGrouping=this.columns.some((function(e){return e.isPrimary()&&e.isAllowRowGroup()})),this.allowValues=this.columns.some((function(e){return e.isPrimary()&&e.isAllowValue()})),this.allowPivoting=this.columnModel.isPivotMode()&&this.columns.some((function(e){return e.isPrimary()&&e.isAllowPivot()}))},t.prototype.buildMenuItemMap=function(){var e=this,t=this.localeService.getLocaleTextFunc();this.menuItemMap=new Map,this.menuItemMap.set("rowGroup",{allowedFunction:function(t){return t.isPrimary()&&t.isAllowRowGroup()&&!e.columnModel.isColumnGroupingLocked(t)},activeFunction:function(e){return e.isRowGroupActive()},activateLabel:function(){return"".concat(t("groupBy","Group by")," ").concat(e.displayName)},deactivateLabel:function(){return"".concat(t("ungroupBy","Un-Group by")," ").concat(e.displayName)},activateFunction:function(){var t=e.columnModel.getRowGroupColumns();e.columnModel.setRowGroupColumns(e.addColumnsToList(t),"toolPanelUi")},deActivateFunction:function(){var t=e.columnModel.getRowGroupColumns();e.columnModel.setRowGroupColumns(e.removeColumnsFromList(t),"toolPanelUi")},addIcon:"menuAddRowGroup",removeIcon:"menuRemoveRowGroup"}),this.menuItemMap.set("value",{allowedFunction:function(e){return e.isPrimary()&&e.isAllowValue()},activeFunction:function(e){return e.isValueActive()},activateLabel:function(){return t("addToValues","Add ".concat(e.displayName," to values"),[e.displayName])},deactivateLabel:function(){return t("removeFromValues","Remove ".concat(e.displayName," from values"),[e.displayName])},activateFunction:function(){var t=e.columnModel.getValueColumns();e.columnModel.setValueColumns(e.addColumnsToList(t),"toolPanelUi")},deActivateFunction:function(){var t=e.columnModel.getValueColumns();e.columnModel.setValueColumns(e.removeColumnsFromList(t),"toolPanelUi")},addIcon:"valuePanel",removeIcon:"valuePanel"}),this.menuItemMap.set("pivot",{allowedFunction:function(t){return e.columnModel.isPivotMode()&&t.isPrimary()&&t.isAllowPivot()},activeFunction:function(e){return e.isPivotActive()},activateLabel:function(){return t("addToLabels","Add ".concat(e.displayName," to labels"),[e.displayName])},deactivateLabel:function(){return t("removeFromLabels","Remove ".concat(e.displayName," from labels"),[e.displayName])},activateFunction:function(){var t=e.columnModel.getPivotColumns();e.columnModel.setPivotColumns(e.addColumnsToList(t),"toolPanelUi")},deActivateFunction:function(){var t=e.columnModel.getPivotColumns();e.columnModel.setPivotColumns(e.removeColumnsFromList(t),"toolPanelUi")},addIcon:"pivotPanel",removeIcon:"pivotPanel"})},t.prototype.addColumnsToList=function(e){return h([],d(e),!1).concat(this.columns.filter((function(t){return-1===e.indexOf(t)})))},t.prototype.removeColumnsFromList=function(e){var t=this;return e.filter((function(e){return-1===t.columns.indexOf(e)}))},t.prototype.displayContextMenu=function(e){var t=this,n=this.getGui(),i=this.createBean(new o.AgMenuList),r=this.localeService.getLocaleTextFunc(),s=function(){};n.appendChild(i.getGui()),i.addMenuItems(e),i.addManagedListener(i,o.AgMenuItemComponent.EVENT_CLOSE_MENU,(function(){t.parentEl.focus(),s()}));var l=this.popupService.addPopup({modal:!0,eChild:n,closeOnEsc:!0,afterGuiAttached:function(){return t.focusService.focusInto(i.getGui())},ariaLabel:r("ariaLabelContextMenu","Context Menu"),closedCallback:function(e){e instanceof KeyboardEvent&&t.parentEl.focus(),t.destroyBean(i)}});l&&(s=l.hideFunc),this.popupService.positionPopupUnderMouseEvent({type:"columnContextMenu",mouseEvent:this.mouseEvent,ePopup:n})},t.prototype.isActive=function(){return this.allowGrouping||this.allowValues||this.allowPivoting},t.prototype.getMappedMenuItems=function(){var e,t,n=[],i=function(e){var t=r.columns.some((function(t){return e.allowedFunction(t)&&!e.activeFunction(t)})),i=r.columns.some((function(t){return e.allowedFunction(t)&&e.activeFunction(t)}));t&&n.push({name:e.activateLabel(r.displayName),icon:o._.createIconNoSpan(e.addIcon,r.gridOptionsService,null),action:function(){return e.activateFunction()}}),i&&n.push({name:e.deactivateLabel(r.displayName),icon:o._.createIconNoSpan(e.removeIcon,r.gridOptionsService,null),action:function(){return e.deActivateFunction()}})},r=this;try{for(var s=f(this.menuItemMap.values()),l=s.next();!l.done;l=s.next()){i(l.value)}}catch(t){e={error:t}}finally{try{l&&!l.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}return n},p([o.Autowired("columnModel")],t.prototype,"columnModel",void 0),p([o.Autowired("popupService")],t.prototype,"popupService",void 0),p([o.Autowired("focusService")],t.prototype,"focusService",void 0),p([o.PostConstruct],t.prototype,"postConstruct",null),t}(o.Component),v=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 n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),g=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},y=function(e){function t(t,o,n,i){var r=e.call(this)||this;return r.modelItem=t,r.allowDragging=o,r.eventType=n,r.focusWrapper=i,r.processingColumnStateChange=!1,r.modelItem=t,r.columnGroup=t.getColumnGroup(),r.columnDept=t.getDept(),r.displayName=t.getDisplayName(),r.allowDragging=o,r}return v(t,e),t.prototype.init=function(){var e=this;this.setTemplate(t.TEMPLATE),this.eDragHandle=o._.createIconNoSpan("columnDrag",this.gridOptionsService),this.eDragHandle.classList.add("ag-drag-handle","ag-column-select-column-group-drag-handle");var n=this.cbSelect.getGui(),i=this.cbSelect.getInputElement();n.insertAdjacentElement("afterend",this.eDragHandle),i.setAttribute("tabindex","-1"),this.eLabel.innerHTML=this.displayName?this.displayName:"",this.setupExpandContract(),this.addCssClass("ag-column-select-indent-"+this.columnDept),this.addManagedListener(this.eventService,o.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.onColumnStateChanged.bind(this)),this.addManagedListener(this.eLabel,"click",this.onLabelClicked.bind(this)),this.addManagedListener(this.cbSelect,o.Events.EVENT_FIELD_VALUE_CHANGED,this.onCheckboxChanged.bind(this)),this.addManagedListener(this.modelItem,u.EVENT_EXPANDED_CHANGED,this.onExpandChanged.bind(this)),this.addManagedListener(this.focusWrapper,"keydown",this.handleKeyDown.bind(this)),this.addManagedListener(this.focusWrapper,"contextmenu",this.onContextMenu.bind(this)),this.setOpenClosedIcons(),this.setupDragging(),this.onColumnStateChanged(),this.addVisibilityListenersToAllChildren(),this.refreshAriaExpanded(),this.refreshAriaLabel(),this.setupTooltip(),o.CssClassApplier.getToolPanelClassesFromColDef(this.columnGroup.getColGroupDef(),this.gridOptionsService,null,this.columnGroup).forEach((function(t){return e.addOrRemoveCssClass(t,!0)}))},t.prototype.getColumns=function(){return this.columnGroup.getLeafColumns()},t.prototype.setupTooltip=function(){var e=this,t=this.columnGroup.getColGroupDef();if(t){var n=function(){var o=t.headerTooltip;e.setTooltip(o)};n(),this.addManagedListener(this.eventService,o.Events.EVENT_NEW_COLUMNS_LOADED,n)}},t.prototype.getTooltipParams=function(){var t=e.prototype.getTooltipParams.call(this);return t.location="columnToolPanelColumnGroup",t},t.prototype.handleKeyDown=function(e){switch(e.key){case o.KeyCode.LEFT:e.preventDefault(),this.modelItem.setExpanded(!1);break;case o.KeyCode.RIGHT:e.preventDefault(),this.modelItem.setExpanded(!0);break;case o.KeyCode.SPACE:e.preventDefault(),this.isSelectable()&&this.onSelectAllChanged(!this.isSelected())}},t.prototype.onContextMenu=function(e){var t=this,o=this.columnGroup;if(!this.gridOptionsService.get("functionsReadOnly")){var n=this.createBean(new m(o,e,this.focusWrapper));this.addDestroyFunc((function(){n.isAlive()&&t.destroyBean(n)}))}},t.prototype.addVisibilityListenersToAllChildren=function(){var e=this;this.columnGroup.getLeafColumns().forEach((function(t){e.addManagedListener(t,o.Column.EVENT_VISIBLE_CHANGED,e.onColumnStateChanged.bind(e)),e.addManagedListener(t,o.Column.EVENT_VALUE_CHANGED,e.onColumnStateChanged.bind(e)),e.addManagedListener(t,o.Column.EVENT_PIVOT_CHANGED,e.onColumnStateChanged.bind(e)),e.addManagedListener(t,o.Column.EVENT_ROW_GROUP_CHANGED,e.onColumnStateChanged.bind(e))}))},t.prototype.setupDragging=function(){var e=this;if(this.allowDragging){var t=!this.gridOptionsService.get("suppressDragLeaveHidesColumns"),n={type:o.DragSourceType.ToolPanel,eElement:this.eDragHandle,dragItemName:this.displayName,getDefaultIconName:function(){return t?o.DragAndDropService.ICON_HIDE:o.DragAndDropService.ICON_NOT_ALLOWED},getDragItem:function(){return e.createDragItem()},onDragStarted:function(){t=!e.gridOptionsService.get("suppressDragLeaveHidesColumns");var n={type:o.Events.EVENT_COLUMN_PANEL_ITEM_DRAG_START,column:e.columnGroup};e.eventService.dispatchEvent(n)},onDragStopped:function(){var t={type:o.Events.EVENT_COLUMN_PANEL_ITEM_DRAG_END};e.eventService.dispatchEvent(t)},onGridEnter:function(o){t&&e.modelItemUtils.updateColumns({columns:e.columnGroup.getLeafColumns(),visibleState:null==o?void 0:o.visibleState,pivotState:null==o?void 0:o.pivotState,eventType:e.eventType})},onGridExit:function(){t&&e.onChangeCommon(!1)}};this.dragAndDropService.addDragSource(n,!0),this.addDestroyFunc((function(){return e.dragAndDropService.removeDragSource(n)}))}else o._.setDisplayed(this.eDragHandle,!1)},t.prototype.createDragItem=function(){var e=this,t=this.columnGroup.getLeafColumns(),o={},n={};return t.forEach((function(t){var i=t.getId();o[i]=t.isVisible(),n[i]=e.modelItemUtils.createPivotState(t)})),{columns:t,visibleState:o,pivotState:n}},t.prototype.setupExpandContract=function(){this.eGroupClosedIcon.appendChild(o._.createIcon("columnSelectClosed",this.gridOptionsService,null)),this.eGroupOpenedIcon.appendChild(o._.createIcon("columnSelectOpen",this.gridOptionsService,null)),this.addManagedListener(this.eGroupClosedIcon,"click",this.onExpandOrContractClicked.bind(this)),this.addManagedListener(this.eGroupOpenedIcon,"click",this.onExpandOrContractClicked.bind(this));var e=new o.TouchListener(this.eColumnGroupIcons,!0);this.addManagedListener(e,o.TouchListener.EVENT_TAP,this.onExpandOrContractClicked.bind(this)),this.addDestroyFunc(e.destroy.bind(e))},t.prototype.onLabelClicked=function(){var e=!this.cbSelect.getValue();this.onChangeCommon(e)},t.prototype.onCheckboxChanged=function(e){this.onChangeCommon(e.selected)},t.prototype.getVisibleLeafColumns=function(){var e=[],t=function(o){o.forEach((function(o){o.isPassesFilter()&&(o.isGroup()?t(o.getChildren()):e.push(o.getColumn()))}))};return t(this.modelItem.getChildren()),e},t.prototype.onChangeCommon=function(e){this.refreshAriaLabel(),this.processingColumnStateChange||this.modelItemUtils.selectAllChildren(this.modelItem.getChildren(),e,this.eventType)},t.prototype.refreshAriaLabel=function(){var e=this.localeService.getLocaleTextFunc(),t=e("ariaColumnGroup","Column Group"),n=this.cbSelect.getValue(),i=void 0===n?e("ariaIndeterminate","indeterminate"):n?e("ariaVisible","visible"):e("ariaHidden","hidden"),r=e("ariaToggleVisibility","Press SPACE to toggle visibility");o._.setAriaLabel(this.focusWrapper,"".concat(this.displayName," ").concat(t)),this.cbSelect.setInputAriaLabel("".concat(r," (").concat(i,")")),o._.setAriaDescribedBy(this.focusWrapper,this.cbSelect.getInputElement().id)},t.prototype.onColumnStateChanged=function(){var e=this.workOutSelectedValue(),t=this.workOutReadOnlyValue();this.processingColumnStateChange=!0,this.cbSelect.setValue(e),this.cbSelect.setReadOnly(t),this.addOrRemoveCssClass("ag-column-select-column-group-readonly",t),this.processingColumnStateChange=!1},t.prototype.workOutSelectedValue=function(){var e=this,t=this.columnModel.isPivotMode(),o=this.getVisibleLeafColumns(),n=0,i=0;if(o.forEach((function(o){!t&&o.getColDef().lockVisible||(e.isColumnChecked(o,t)?n++:i++)})),!(n>0&&i>0))return n>0},t.prototype.workOutReadOnlyValue=function(){var e=this.columnModel.isPivotMode(),t=0;return this.columnGroup.getLeafColumns().forEach((function(o){e?o.isAnyFunctionAllowed()&&t++:o.getColDef().lockVisible||t++})),0===t},t.prototype.isColumnChecked=function(e,t){if(t){var o=e.isPivotActive(),n=e.isRowGroupActive(),i=e.isValueActive();return o||n||i}return e.isVisible()},t.prototype.onExpandOrContractClicked=function(){var e=this.modelItem.isExpanded();this.modelItem.setExpanded(!e)},t.prototype.onExpandChanged=function(){this.setOpenClosedIcons(),this.refreshAriaExpanded()},t.prototype.setOpenClosedIcons=function(){var e=this.modelItem.isExpanded();o._.setDisplayed(this.eGroupClosedIcon,!e),o._.setDisplayed(this.eGroupOpenedIcon,e)},t.prototype.refreshAriaExpanded=function(){o._.setAriaExpanded(this.focusWrapper,this.modelItem.isExpanded())},t.prototype.getDisplayName=function(){return this.displayName},t.prototype.onSelectAllChanged=function(e){var t=this.cbSelect.getValue();!this.cbSelect.isReadOnly()&&(e&&!t||!e&&t)&&this.cbSelect.toggle()},t.prototype.isSelected=function(){return this.cbSelect.getValue()},t.prototype.isSelectable=function(){return!this.cbSelect.isReadOnly()},t.prototype.setSelected=function(e){this.cbSelect.setValue(e,!0)},t.TEMPLATE='<div class="ag-column-select-column-group" aria-hidden="true">\n <span class="ag-column-group-icons" ref="eColumnGroupIcons" >\n <span class="ag-column-group-closed-icon" ref="eGroupClosedIcon"></span>\n <span class="ag-column-group-opened-icon" ref="eGroupOpenedIcon"></span>\n </span>\n <ag-checkbox ref="cbSelect" class="ag-column-select-checkbox"></ag-checkbox>\n <span class="ag-column-select-column-label" ref="eLabel"></span>\n </div>',g([o.Autowired("columnModel")],t.prototype,"columnModel",void 0),g([o.Autowired("dragAndDropService")],t.prototype,"dragAndDropService",void 0),g([o.Autowired("modelItemUtils")],t.prototype,"modelItemUtils",void 0),g([o.RefSelector("cbSelect")],t.prototype,"cbSelect",void 0),g([o.RefSelector("eLabel")],t.prototype,"eLabel",void 0),g([o.RefSelector("eGroupOpenedIcon")],t.prototype,"eGroupOpenedIcon",void 0),g([o.RefSelector("eGroupClosedIcon")],t.prototype,"eGroupClosedIcon",void 0),g([o.RefSelector("eColumnGroupIcons")],t.prototype,"eColumnGroupIcons",void 0),g([o.PostConstruct],t.prototype,"init",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 n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),E=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},S=function(e){function t(t,o){var n=e.call(this)||this;return n.comp=t,n.virtualList=o,n}return C(t,e),t.prototype.postConstruct=function(){var e=this;this.createManagedBean(new o.VirtualListDragFeature(this.comp,this.virtualList,{dragSourceType:o.DragSourceType.ToolPanel,listItemDragStartEvent:o.Events.EVENT_COLUMN_PANEL_ITEM_DRAG_START,listItemDragEndEvent:o.Events.EVENT_COLUMN_PANEL_ITEM_DRAG_END,eventSource:this.eventService,getCurrentDragValue:function(t){return e.getCurrentDragValue(t)},isMoveBlocked:function(t){return e.isMoveBlocked(t)},getNumRows:function(e){return e.getDisplayedColsList().length},moveItem:function(t,o){return e.moveItem(t,o)}}))},t.prototype.getCurrentDragValue=function(e){return e.column},t.prototype.isMoveBlocked=function(e){return!!this.gridOptionsService.get("suppressMovableColumns")||!!this.getCurrentColumns(e).find((function(e){var t=e.getColDef();return!!t.suppressMovable||!!t.lockPosition}))},t.prototype.moveItem=function(e,t){var o=this.getTargetIndex(e,t),n=this.getCurrentColumns(e);null!=o&&this.columnModel.moveColumns(n,o,"toolPanelUi")},t.prototype.getMoveDiff=function(e,t){var o=this.columnModel.getAllGridColumns(),n=this.getCurrentColumns(e),i=n[0],r=n.length;return o.indexOf(i)<t?r:0},t.prototype.getCurrentColumns=function(e){return e instanceof o.ProvidedColumnGroup?e.getLeafColumns():[e]},t.prototype.getTargetIndex=function(e,t){if(!t)return null;var o,n=t.component,i="top"===t.position;n instanceof y?(o=n.getColumns()[0],i=!0):o=n.getColumn();if(-1!==this.getCurrentColumns(e).indexOf(o))return null;var r=this.columnModel.getAllGridColumns().indexOf(o),s=i?r:r+1;return s-this.getMoveDiff(e,s)},E([o.Autowired("columnModel")],t.prototype,"columnModel",void 0),E([o.Autowired("gridOptionsService")],t.prototype,"gridOptionsService",void 0),E([o.PostConstruct],t.prototype,"postConstruct",null),t}(o.BeanStub),P=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 n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),A=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},b=function(e){function t(t,o,n,i){var r=e.call(this)||this;return r.allowDragging=o,r.groupsExist=n,r.focusWrapper=i,r.processingColumnStateChange=!1,r.column=t.getColumn(),r.columnDept=t.getDept(),r.displayName=t.getDisplayName(),r}return P(t,e),t.prototype.init=function(){var e=this;this.setTemplate(t.TEMPLATE),this.eDragHandle=o._.createIconNoSpan("columnDrag",this.gridOptionsService),this.eDragHandle.classList.add("ag-drag-handle","ag-column-select-column-drag-handle");var n=this.cbSelect.getGui(),i=this.cbSelect.getInputElement();n.insertAdjacentElement("afterend",this.eDragHandle),i.setAttribute("tabindex","-1");var r=o._.escapeString(this.displayName);this.eLabel.innerHTML=r;var s=this.columnDept;this.groupsExist&&this.addCssClass("ag-column-select-add-group-indent"),this.addCssClass("ag-column-select-indent-".concat(s)),this.setupDragging(),this.addManagedListener(this.eventService,o.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.onColumnStateChanged.bind(this)),this.addManagedListener(this.column,o.Column.EVENT_VALUE_CHANGED,this.onColumnStateChanged.bind(this)),this.addManagedListener(this.column,o.Column.EVENT_PIVOT_CHANGED,this.onColumnStateChanged.bind(this)),this.addManagedListener(this.column,o.Column.EVENT_ROW_GROUP_CHANGED,this.onColumnStateChanged.bind(this)),this.addManagedListener(this.column,o.Column.EVENT_VISIBLE_CHANGED,this.onColumnStateChanged.bind(this)),this.addManagedListener(this.focusWrapper,"keydown",this.handleKeyDown.bind(this)),this.addManagedListener(this.focusWrapper,"contextmenu",this.onContextMenu.bind(this)),this.addManagedPropertyListener("functionsReadOnly",this.onColumnStateChanged.bind(this)),this.addManagedListener(this.cbSelect,o.Events.EVENT_FIELD_VALUE_CHANGED,this.onCheckboxChanged.bind(this)),this.addManagedListener(this.eLabel,"click",this.onLabelClicked.bind(this)),this.onColumnStateChanged(),this.refreshAriaLabel(),this.setupTooltip(),o.CssClassApplier.getToolPanelClassesFromColDef(this.column.getColDef(),this.gridOptionsService,this.column,null).forEach((function(t){return e.addOrRemoveCssClass(t,!0)}))},t.prototype.getColumn=function(){return this.column},t.prototype.setupTooltip=function(){var e=this,t=function(){var t=e.column.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="columnToolPanelColumn",t.colDef=this.column.getColDef(),t},t.prototype.onContextMenu=function(e){var t=this,o=this.column;if(!this.gridOptionsService.get("functionsReadOnly")){var n=this.createBean(new m(o,e,this.focusWrapper));this.addDestroyFunc((function(){n.isAlive()&&t.destroyBean(n)}))}},t.prototype.handleKeyDown=function(e){e.key===o.KeyCode.SPACE&&(e.preventDefault(),this.isSelectable()&&this.onSelectAllChanged(!this.isSelected()))},t.prototype.onLabelClicked=function(){if(!this.gridOptionsService.get("functionsReadOnly")){var e=!this.cbSelect.getValue();this.onChangeCommon(e)}},t.prototype.onCheckboxChanged=function(e){this.onChangeCommon(e.selected)},t.prototype.onChangeCommon=function(e){this.cbSelect.isReadOnly()||(this.refreshAriaLabel(),this.processingColumnStateChange||this.modelItemUtils.setColumn(this.column,e,"toolPanelUi"))},t.prototype.refreshAriaLabel=function(){var e=this.localeService.getLocaleTextFunc(),t=e("ariaColumn","Column"),n=this.cbSelect.getValue()?e("ariaVisible","visible"):e("ariaHidden","hidden"),i=e("ariaToggleVisibility","Press SPACE to toggle visibility");o._.setAriaLabel(this.focusWrapper,"".concat(this.displayName," ").concat(t)),this.cbSelect.setInputAriaLabel("".concat(i," (").concat(n,")")),o._.setAriaDescribedBy(this.focusWrapper,this.cbSelect.getInputElement().id)},t.prototype.setupDragging=function(){var e=this;if(this.allowDragging){var t=!this.gridOptionsService.get("suppressDragLeaveHidesColumns"),n={type:o.DragSourceType.ToolPanel,eElement:this.eDragHandle,dragItemName:this.displayName,getDefaultIconName:function(){return t?o.DragAndDropService.ICON_HIDE:o.DragAndDropService.ICON_NOT_ALLOWED},getDragItem:function(){return e.createDragItem()},onDragStarted:function(){t=!e.gridOptionsService.get("suppressDragLeaveHidesColumns");var n={type:o.Events.EVENT_COLUMN_PANEL_ITEM_DRAG_START,column:e.column};e.eventService.dispatchEvent(n)},onDragStopped:function(){var t={type:o.Events.EVENT_COLUMN_PANEL_ITEM_DRAG_END};e.eventService.dispatchEvent(t)},onGridEnter:function(o){t&&e.modelItemUtils.updateColumns({columns:[e.column],visibleState:null==o?void 0:o.visibleState,pivotState:null==o?void 0:o.pivotState,eventType:"toolPanelUi"})},onGridExit:function(){t&&e.onChangeCommon(!1)}};this.dragAndDropService.addDragSource(n,!0),this.addDestroyFunc((function(){return e.dragAndDropService.removeDragSource(n)}))}else o._.setDisplayed(this.eDragHandle,!1)},t.prototype.createDragItem=function(){var e,t,o=this.column.getColId(),n=((e={})[o]=this.column.isVisible(),e),i=((t={})[o]=this.modelItemUtils.createPivotState(this.column),t);return{columns:[this.column],visibleState:n,pivotState:i}},t.prototype.onColumnStateChanged=function(){this.processingColumnStateChange=!0;var e=this.columnModel.isPivotMode();if(e){var t=this.column.isAnyFunctionActive();this.cbSelect.setValue(t)}else this.cbSelect.setValue(this.column.isVisible());var o=!0,n=!0;if(e){var i=this.gridOptionsService.get("functionsReadOnly"),r=!this.column.isAnyFunctionAllowed();n=o=!i&&!r}else{var s=this.column.getColDef(),l=s.enableRowGroup,a=s.enableValue,u=s.lockPosition,c=s.suppressMovable;o=!s.lockVisible,n=!!l||!!a||!(!!u||!!c)}this.cbSelect.setReadOnly(!o),this.eDragHandle.classList.toggle("ag-column-select-column-readonly",!n),this.addOrRemoveCssClass("ag-column-select-column-readonly",!n&&!o);var p=e&&this.gridOptionsService.get("functionsPassive");this.cbSelect.setPassive(p),this.processingColumnStateChange=!1},t.prototype.getDisplayName=function(){return this.displayName},t.prototype.onSelectAllChanged=function(e){e!==this.cbSelect.getValue()&&(this.cbSelect.isReadOnly()||this.cbSelect.toggle())},t.prototype.isSelected=function(){return this.cbSelect.getValue()},t.prototype.isSelectable=function(){return!this.cbSelect.isReadOnly()},t.prototype.isExpandable=function(){return!1},t.prototype.setExpanded=function(e){console.warn("AG Grid: can not expand a column item that does not represent a column group header")},t.TEMPLATE='<div class="ag-column-select-column" aria-hidden="true">\n <ag-checkbox ref="cbSelect" class="ag-column-select-checkbox"></ag-checkbox>\n <span class="ag-column-select-column-label" ref="eLabel"></span>\n </div>',A([o.Autowired("columnModel")],t.prototype,"columnModel",void 0),A([o.Autowired("dragAndDropService")],t.prototype,"dragAndDropService",void 0),A([o.Autowired("modelItemUtils")],t.prototype,"modelItemUtils",void 0),A([o.RefSelector("eLabel")],t.prototype,"eLabel",void 0),A([o.RefSelector("cbSelect")],t.prototype,"cbSelect",void 0),A([o.PostConstruct],t.prototype,"init",null),t}(o.Component),D=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 n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),L=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},M=function(){function e(e){this.items=e}return e.prototype.getRowCount=function(){return this.items.length},e.prototype.getRow=function(e){return this.items[e]},e}(),_=function(e){function n(){var t=e.call(this,n.TEMPLATE)||this;return t.destroyColumnItemFuncs=[],t.hasLoadedInitialState=!1,t.isInitialState=!1,t}return D(n,e),n.prototype.destroyColumnTree=function(){this.allColsTree=[],this.destroyColumnItemFuncs.forEach((function(e){return e()})),this.destroyColumnItemFuncs=[]},n.prototype.init=function(e,t,n){var i=this;this.params=e,this.allowDragging=t,this.eventType=n,this.params.suppressSyncLayoutWithGrid||this.addManagedListener(this.eventService,o.Events.EVENT_COLUMN_MOVED,this.onColumnsChanged.bind(this)),this.addManagedListener(this.eventService,o.Events.EVENT_NEW_COLUMNS_LOADED,this.onColumnsChanged.bind(this)),[o.Events.EVENT_COLUMN_PIVOT_CHANGED,o.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,o.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,o.Events.EVENT_COLUMN_VALUE_CHANGED,o.Events.EVENT_COLUMN_VISIBLE,o.Events.EVENT_NEW_COLUMNS_LOADED].forEach((function(e){i.addManagedListener(i.eventService,e,i.fireSelectionChangedEvent.bind(i))})),this.expandGroupsByDefault=!this.params.contractColumnSelection,this.virtualList=this.createManagedBean(new o.VirtualList({cssIdentifier:"column-select",ariaRole:"tree"})),this.appendChild(this.virtualList.getGui());var r=this.virtualList.getAriaElement();o._.setAriaLive(r,"assertive"),o._.setAriaAtomic(r,!1),o._.setAriaRelevant(r,"text"),this.virtualList.setComponentCreator((function(e,t){return o._.setAriaLevel(t,e.getDept()+1),i.createComponentFromItem(e,t)})),this.columnModel.isReady()&&this.onColumnsChanged(),this.params.suppressColumnMove||(this.colsListPanelItemDragFeature=this.createManagedBean(new S(this,this.virtualList)))},n.prototype.createComponentFromItem=function(e,t){if(e.isGroup()){var o=new y(e,this.allowDragging,this.eventType,t);return this.getContext().createBean(o),o}var n=new b(e,this.allowDragging,this.groupsExist,t);return this.getContext().createBean(n),n},n.prototype.onColumnsChanged=function(){this.hasLoadedInitialState||(this.hasLoadedInitialState=!0,this.isInitialState=!!this.params.initialState);var e=this.getExpandedStates(),t=this.columnModel.isPivotMode();!this.params.suppressSyncLayoutWithGrid&&!t?this.buildTreeFromWhatGridIsDisplaying():this.buildTreeFromProvidedColumnDefs(),this.setExpandedStates(e),this.markFilteredColumns(),this.flattenAndFilterModel(),this.isInitialState=!1},n.prototype.getDisplayedColsList=function(){return this.displayedColsList},n.prototype.getExpandedStates=function(){var e={};return this.isInitialState?(this.params.initialState.expandedGroupIds.forEach((function(t){e[t]=!0})),e):this.allColsTree?(this.forEachItem((function(t){if(t.isGroup()){var o=t.getColumnGroup();o&&(e[o.getId()]=t.isExpanded())}})),e):{}},n.prototype.setExpandedStates=function(e){if(this.allColsTree){var t=this.isInitialState;this.forEachItem((function(o){if(o.isGroup()){var n=o.getColumnGroup();if(n){var i=e[n.getId()];(null!=i||t)&&o.setExpanded(!!i)}}}))}},n.prototype.buildTreeFromWhatGridIsDisplaying=function(){this.colDefService.syncLayoutWithGrid(this.setColumnLayout.bind(this))},n.prototype.setColumnLayout=function(e){var t=this.colDefService.createColumnTree(e);this.buildListModel(t),this.groupsExist=e.some((function(e){return e&&void 0!==e.children})),this.markFilteredColumns(),this.flattenAndFilterModel()},n.prototype.buildTreeFromProvidedColumnDefs=function(){this.buildListModel(this.columnModel.getPrimaryColumnTree()),this.groupsExist=this.columnModel.isPrimaryColumnGroupsPresent()},n.prototype.buildListModel=function(e){var t=this,n=this.onColumnExpanded.bind(this),i=function(e,t,n){e.forEach((function(e){e instanceof o.ProvidedColumnGroup?r(e,t,n):s(e,t,n)}))},r=function(e,o,r){var s=e.getColGroupDef();if(!(s&&s.suppressColumnsToolPanel))if(e.isPadding())i(e.getChildren(),o,r);else{var l=t.columnModel.getDisplayNameForProvidedColumnGroup(null,e,"columnToolPanel"),a=new u(l,e,o,!0,t.expandGroupsByDefault);r.push(a),function(e){e.addEventListener(u.EVENT_EXPANDED_CHANGED,n);var o=e.removeEventListener.bind(e,u.EVENT_EXPANDED_CHANGED,n);t.destroyColumnItemFuncs.push(o)}(a),i(e.getChildren(),o+1,a.getChildren())}},s=function(e,o,n){if(!(e.getColDef()&&e.getColDef().suppressColumnsToolPanel)){var i=t.columnModel.getDisplayNameForColumn(e,"columnToolPanel");n.push(new u(i,e,o))}};this.destroyColumnTree(),i(e,0,this.allColsTree)},n.prototype.onColumnExpanded=function(){this.flattenAndFilterModel()},n.prototype.flattenAndFilterModel=function(){var e=this;this.displayedColsList=[];var t=function(o){o.isPassesFilter()&&(e.displayedColsList.push(o),o.isGroup()&&o.isExpanded()&&o.getChildren().forEach(t))};this.allColsTree.forEach(t),this.virtualList.setModel(new M(this.displayedColsList));var o=this.virtualList.getLastFocusedRow();this.virtualList.refresh(),null!=o&&this.focusRowIfAlive(o),this.notifyListeners(),this.refreshAriaLabel()},n.prototype.refreshAriaLabel=function(){var e=this.localeService.getLocaleTextFunc(),t=e("ariaColumnPanelList","Column List"),n=e("columns","Columns"),i=this.displayedColsList.length;o._.setAriaLabel(this.virtualList.getAriaElement(),"".concat(t," ").concat(i," ").concat(n))},n.prototype.focusRowIfAlive=function(e){var t=this;window.setTimeout((function(){t.isAlive()&&t.virtualList.focusRow(e)}),0)},n.prototype.forEachItem=function(e){var t=function(o){o.forEach((function(o){e(o),o.isGroup()&&t(o.getChildren())}))};this.allColsTree&&t(this.allColsTree)},n.prototype.doSetExpandedAll=function(e){this.forEachItem((function(t){t.isGroup()&&t.setExpanded(e)}))},n.prototype.setGroupsExpanded=function(e,t){if(t){var n=[];this.forEachItem((function(o){if(o.isGroup()){var i=o.getColumnGroup().getId();t.indexOf(i)>=0&&(o.setExpanded(e),n.push(i))}}));var i=t.filter((function(e){return!o._.includes(n,e)}));i.length>0&&console.warn("AG Grid: unable to find group(s) for supplied groupIds:",i)}else this.doSetExpandedAll(e)},n.prototype.getExpandState=function(){var e=0,o=0;return this.forEachItem((function(t){t.isGroup()&&(t.isExpanded()?e++:o++)})),e>0&&o>0?t.INDETERMINATE:o>0?t.COLLAPSED:t.EXPANDED},n.prototype.doSetSelectedAll=function(e){this.modelItemUtils.selectAllChildren(this.allColsTree,e,this.eventType)},n.prototype.getSelectionState=function(){var e=0,t=0,o=this.columnModel.isPivotMode();if(this.forEachItem((function(n){if(!n.isGroup()&&n.isPassesFilter()){var i,r=n.getColumn(),s=r.getColDef();if(o){if(!r.isAllowPivot()&&!r.isAllowRowGroup()&&!r.isAllowValue())return;i=r.isValueActive()||r.isPivotActive()||r.isRowGroupActive()}else{if(s.lockVisible)return;i=r.isVisible()}i?e++:t++}})),!(e>0&&t>0))return!(0===e||t>0)},n.prototype.setFilterText=function(e){this.filterText=o._.exists(e)?e.toLowerCase():null,this.markFilteredColumns(),this.flattenAndFilterModel()},n.prototype.markFilteredColumns=function(){var e=this,t=function(t){if(!o._.exists(e.filterText))return!0;var n=t.getDisplayName();return null==n||-1!==n.toLowerCase().indexOf(e.filterText)},n=function(e,o){var i=!1;if(e.isGroup()){var r=t(e);e.getChildren().forEach((function(e){var t=n(e,r||o);t&&(i=t)}))}var s=!(!o&&!i)||t(e);return e.setPassesFilter(s),s};this.allColsTree.forEach((function(e){return n(e,!1)}))},n.prototype.notifyListeners=function(){this.fireGroupExpandedEvent(),this.fireSelectionChangedEvent()},n.prototype.fireGroupExpandedEvent=function(){var e=this.getExpandState();this.dispatchEvent({type:"groupExpanded",state:e})},n.prototype.fireSelectionChangedEvent=function(){if(this.allColsTree){var e=this.getSelectionState();this.dispatchEvent({type:"selectionChanged",state:e})}},n.prototype.getExpandedGroups=function(){var e=[];return this.allColsTree?(this.forEachItem((function(t){t.isGroup()&&t.isExpanded()&&e.push(t.getColumnGroup().getId())})),e):e},n.TEMPLATE='<div class="'.concat("ag-column-select-list",'" role="presentation"></div>'),L([o.Autowired("columnModel")],n.prototype,"columnModel",void 0),L([o.Autowired("toolPanelColDefService")],n.prototype,"colDefService",void 0),L([o.Autowired("modelItemUtils")],n.prototype,"modelItemUtils",void 0),L([o.PreDestroy],n.prototype,"destroyColumnTree",null),n}(o.Component),O=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 n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),T=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},w=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return O(t,e),t.prototype.createTemplate=function(){return'<div class="ag-pivot-mode-panel">\n <ag-toggle-button ref="cbPivotMode" class="ag-pivot-mode-select"></ag-toggle-button>\n </div>'},t.prototype.init=function(){this.setTemplate(this.createTemplate()),this.cbPivotMode.setValue(this.columnModel.isPivotMode());var e=this.localeService.getLocaleTextFunc();this.cbPivotMode.setLabel(e("pivotMode","Pivot Mode")),this.addManagedListener(this.cbPivotMode,o.Events.EVENT_FIELD_VALUE_CHANGED,this.onBtPivotMode.bind(this)),this.addManagedListener(this.eventService,o.Events.EVENT_NEW_COLUMNS_LOADED,this.onPivotModeChanged.bind(this)),this.addManagedListener(this.eventService,o.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.onPivotModeChanged.bind(this))},t.prototype.onBtPivotMode=function(){var e=!!this.cbPivotMode.getValue();if(e!==this.columnModel.isPivotMode()){this.gridOptionsService.updateGridOptions({options:{pivotMode:e},source:"toolPanelUi"});var t=this.api;t&&t.refreshHeader()}},t.prototype.onPivotModeChanged=function(){var e=this.columnModel.isPivotMode();this.cbPivotMode.setValue(e)},T([o.Autowired("columnModel")],t.prototype,"columnModel",void 0),T([o.Autowired("gridApi")],t.prototype,"api",void 0),T([o.RefSelector("cbPivotMode")],t.prototype,"cbPivotMode",void 0),T([o.PreConstruct],t.prototype,"init",null),t}(o.Component),G=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 n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),x=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},I=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return G(t,e),t.prototype.init=function(e,t,n){this.allowDragging=e,this.params=t,this.eventType=n,this.primaryColsHeaderPanel.init(this.params);var i=this.params.suppressColumnFilter,r=this.params.suppressColumnSelectAll;this.params.suppressColumnExpandAll&&i&&r&&this.primaryColsHeaderPanel.setDisplayed(!1),this.addManagedListener(this.primaryColsListPanel,"groupExpanded",this.onGroupExpanded.bind(this)),this.addManagedListener(this.primaryColsListPanel,"selectionChanged",this.onSelectionChange.bind(this)),this.primaryColsListPanel.init(this.params,this.allowDragging,this.eventType),this.addManagedListener(this.primaryColsHeaderPanel,"expandAll",this.onExpandAll.bind(this)),this.addManagedListener(this.primaryColsHeaderPanel,"collapseAll",this.onCollapseAll.bind(this)),this.addManagedListener(this.primaryColsHeaderPanel,"selectAll",this.onSelectAll.bind(this)),this.addManagedListener(this.primaryColsHeaderPanel,"unselectAll",this.onUnselectAll.bind(this)),this.addManagedListener(this.primaryColsHeaderPanel,"filterChanged",this.onFilterChanged.bind(this)),this.positionableFeature=new o.PositionableFeature(this.getGui(),{minHeight:100}),this.createManagedBean(this.positionableFeature)},t.prototype.toggleResizable=function(e){this.positionableFeature.setResizable(!!e&&{bottom:!0})},t.prototype.onExpandAll=function(){this.primaryColsListPanel.doSetExpandedAll(!0)},t.prototype.onCollapseAll=function(){this.primaryColsListPanel.doSetExpandedAll(!1)},t.prototype.expandGroups=function(e){this.primaryColsListPanel.setGroupsExpanded(!0,e)},t.prototype.collapseGroups=function(e){this.primaryColsListPanel.setGroupsExpanded(!1,e)},t.prototype.setColumnLayout=function(e){this.primaryColsListPanel.setColumnLayout(e)},t.prototype.onFilterChanged=function(e){this.primaryColsListPanel.setFilterText(e.filterText)},t.prototype.syncLayoutWithGrid=function(){this.primaryColsListPanel.onColumnsChanged()},t.prototype.onSelectAll=function(){this.primaryColsListPanel.doSetSelectedAll(!0)},t.prototype.onUnselectAll=function(){this.primaryColsListPanel.doSetSelectedAll(!1)},t.prototype.onGroupExpanded=function(e){this.primaryColsHeaderPanel.setExpandState(e.state),this.params.onStateUpdated()},t.prototype.onSelectionChange=function(e){this.primaryColsHeaderPanel.setSelectionState(e.state)},t.prototype.getExpandedGroups=function(){return this.primaryColsListPanel.getExpandedGroups()},t.TEMPLATE='<div class="ag-column-select">\n <ag-primary-cols-header ref="primaryColsHeaderPanel"></ag-primary-cols-header>\n <ag-primary-cols-list ref="primaryColsListPanel"></ag-primary-cols-list>\n </div>',x([o.RefSelector("primaryColsHeaderPanel")],t.prototype,"primaryColsHeaderPanel",void 0),x([o.RefSelector("primaryColsListPanel")],t.prototype,"primaryColsListPanel",void 0),t}(o.Component),N=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 n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),F=function(){return(F=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var i in t=arguments[o])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},V=function(e){function t(){var o=e.call(this,t.TEMPLATE)||this;return o.initialised=!1,o.childDestroyFuncs=[],o}return N(t,e),t.prototype.setVisible=function(t){e.prototype.setDisplayed.call(this,t),t&&!this.initialised&&this.init(this.params)},t.prototype.init=function(e){var t=this,n=this.gridOptionsService.addGridCommonParams({suppressColumnMove:!1,suppressColumnSelectAll:!1,suppressColumnFilter:!1,suppressColumnExpandAll:!1,contractColumnSelection:!1,suppressPivotMode:!1,suppressRowGroups:!1,suppressValues:!1,suppressPivots:!1,suppressSyncLayoutWithGrid:!1});if(this.params=F(F({},n),e),this.isRowGroupingModuleLoaded()&&!this.params.suppressPivotMode&&(this.pivotModePanel=this.createBean(new w),this.childDestroyFuncs.push((function(){return t.destroyBean(t.pivotModePanel)})),this.appendChild(this.pivotModePanel)),this.primaryColsPanel=this.createBean(new I),this.childDestroyFuncs.push((function(){return t.destroyBean(t.primaryColsPanel)})),this.primaryColsPanel.init(!0,this.params,"toolPanelUi"),this.primaryColsPanel.addCssClass("ag-column-panel-column-select"),this.appendChild(this.primaryColsPanel),this.isRowGroupingModuleLoaded()){this.params.suppressRowGroups||(this.rowGroupDropZonePanel=this.createBean(new i.RowGroupDropZonePanel(!1)),this.childDestroyFuncs.push((function(){return t.destroyBean(t.rowGroupDropZonePanel)})),this.appendChild(this.rowGroupDropZonePanel)),this.params.suppressValues||(this.valuesDropZonePanel=this.createBean(new i.ValuesDropZonePanel(!1)),this.childDestroyFuncs.push((function(){return t.destroyBean(t.valuesDropZonePanel)})),this.appendChild(this.valuesDropZonePanel)),this.params.suppressPivots||(this.pivotDropZonePanel=this.createBean(new i.PivotDropZonePanel(!1)),this.childDestroyFuncs.push((function(){return t.destroyBean(t.pivotDropZonePanel)})),this.appendChild(this.pivotDropZonePanel)),this.setLastVisible();var r=this.addManagedListener(this.eventService,o.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,(function(){t.resetChildrenHeight(),t.setLastVisible()}));this.childDestroyFuncs.push((function(){return r()}))}this.initialised=!0},t.prototype.setPivotModeSectionVisible=function(e){var t=this;this.isRowGroupingModuleLoaded()&&(this.pivotModePanel?this.pivotModePanel.setDisplayed(e):e&&(this.pivotModePanel=this.createBean(new w),this.getGui().insertBefore(this.pivotModePanel.getGui(),this.getGui().firstChild),this.childDestroyFuncs.push((function(){return t.destroyBean(t.pivotModePanel)}))),this.setLastVisible())},t.prototype.setRowGroupsSectionVisible=function(e){this.isRowGroupingModuleLoaded()&&(this.rowGroupDropZonePanel?this.rowGroupDropZonePanel.setDisplayed(e):e&&(this.rowGroupDropZonePanel=this.createManagedBean(new i.RowGroupDropZonePanel(!1)),this.appendChild(this.rowGroupDropZonePanel)),this.setLastVisible())},t.prototype.setValuesSectionVisible=function(e){this.isRowGroupingModuleLoaded()&&(this.valuesDropZonePanel?this.valuesDropZonePanel.setDisplayed(e):e&&(this.valuesDropZonePanel=this.createManagedBean(new i.ValuesDropZonePanel(!1)),this.appendChild(this.valuesDropZonePanel)),this.setLastVisible())},t.prototype.setPivotSectionVisible=function(e){this.isRowGroupingModuleLoaded()&&(this.pivotDropZonePanel?this.pivotDropZonePanel.setDisplayed(e):e&&(this.pivotDropZonePanel=this.createManagedBean(new i.PivotDropZonePanel(!1)),this.appendChild(this.pivotDropZonePanel),this.pivotDropZonePanel.setDisplayed(e)),this.setLastVisible())},t.prototype.setResizers=function(){[this.primaryColsPanel,this.rowGroupDropZonePanel,this.valuesDropZonePanel,this.pivotDropZonePanel].forEach((function(e){if(e){var t=e.getGui();e.toggleResizable(!t.classList.contains("ag-last-column-drop")&&!t.classList.contains("ag-hidden"))}}))},t.prototype.setLastVisible=function(){var e=this.getGui();Array.prototype.slice.call(e.querySelectorAll(".ag-column-drop")).forEach((function(e){return e.classList.remove("ag-last-column-drop")}));var t=e.querySelectorAll(".ag-column-drop:not(.ag-hidden)"),n=o._.last(t);n&&n.classList.add("ag-last-column-drop"),this.setResizers()},t.prototype.resetChildrenHeight=function(){for(var e=this.getGui().children,t=0;t<e.length;t++){var o=e[t];o.style.removeProperty("height"),o.style.removeProperty("flex")}},t.prototype.isRowGroupingModuleLoaded=function(){return o.ModuleRegistry.__assertRegistered(o.ModuleNames.RowGroupingModule,"Row Grouping",this.context.getGridId())},t.prototype.expandColumnGroups=function(e){this.primaryColsPanel.expandGroups(e)},t.prototype.collapseColumnGroups=function(e){this.primaryColsPanel.collapseGroups(e)},t.prototype.setColumnLayout=function(e){this.primaryColsPanel.setColumnLayout(e)},t.prototype.syncLayoutWithGrid=function(){this.primaryColsPanel.syncLayoutWithGrid()},t.prototype.destroyChildren=function(){this.childDestroyFuncs.forEach((function(e){return e()})),this.childDestroyFuncs.length=0,o._.clearElement(this.getGui())},t.prototype.refresh=function(e){return this.destroyChildren(),this.init(e),!0},t.prototype.getState=function(){return{expandedGroupIds:this.primaryColsPanel.getExpandedGroups()}},t.prototype.destroy=function(){this.destroyChildren(),e.prototype.destroy.call(this)},t.TEMPLATE='<div class="ag-column-panel"></div>',t}(o.Component),R=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},U=function(){function e(){}return e.prototype.selectAllChildren=function(e,t,o){var n=this.extractAllLeafColumns(e);this.setAllColumns(n,t,o)},e.prototype.setColumn=function(e,t,o){this.setAllColumns([e],t,o)},e.prototype.setAllColumns=function(e,t,o){this.columnModel.isPivotMode()?this.setAllPivot(e,t,o):this.setAllVisible(e,t,o)},e.prototype.extractAllLeafColumns=function(e){var t=[],o=function(e){e.forEach((function(e){e.isPassesFilter()&&(e.isGroup()?o(e.getChildren()):t.push(e.getColumn()))}))};return o(e),t},e.prototype.setAllVisible=function(e,t,o){var n=[];e.forEach((function(e){e.getColDef().lockVisible||e.isVisible()!=t&&n.push({colId:e.getId(),hide:!t})})),n.length>0&&this.columnModel.applyColumnState({state:n},o)},e.prototype.setAllPivot=function(e,t,o){this.gridOptionsService.get("functionsPassive")?this.setAllPivotPassive(e,t):this.setAllPivotActive(e,t,o)},e.prototype.setAllPivotPassive=function(e,t){var n=this.columnModel.getPivotColumns().slice(),i=this.columnModel.getValueColumns().slice(),r=this.columnModel.getRowGroupColumns().slice(),s=!1,l=!1,a=!1,u=t?function(e){e.isAnyFunctionActive()||(e.isAllowValue()?(i.push(e),l=!0):e.isAllowRowGroup()?(r.push(e),s=!0):e.isAllowPivot()&&(n.push(e),a=!0))}:function(e){e.isAnyFunctionActive()&&(n.indexOf(e)>=0&&(o._.removeFromArray(n,e),s=!0),i.indexOf(e)>=0&&(o._.removeFromArray(i,e),l=!0),r.indexOf(e)>=0&&(o._.removeFromArray(r,e),a=!0))};if(e.forEach(u),s){var c={type:o.Events.EVENT_COLUMN_PIVOT_CHANGE_REQUEST,columns:n};this.eventService.dispatchEvent(c)}if(a){var p={type:o.Events.EVENT_COLUMN_ROW_GROUP_CHANGE_REQUEST,columns:r};this.eventService.dispatchEvent(p)}if(l){var d={type:o.Events.EVENT_COLUMN_VALUE_CHANGE_REQUEST,columns:r};this.eventService.dispatchEvent(d)}},e.prototype.setAllPivotActive=function(e,t,o){var n=this,i=[],r=t?function(e){if(!e.isAnyFunctionActive())if(e.isAllowValue()){var t="string"==typeof e.getAggFunc()?e.getAggFunc():n.aggFuncService.getDefaultAggFunc(e);i.push({colId:e.getId(),aggFunc:t})}else e.isAllowRowGroup()?i.push({colId:e.getId(),rowGroup:!0}):e.isAllowPivot()&&i.push({colId:e.getId(),pivot:!0})}:function(e){(e.isPivotActive()||e.isRowGroupActive()||e.isValueActive())&&i.push({colId:e.getId(),pivot:!1,rowGroup:!1,aggFunc:null})};e.forEach(r),i.length>0&&this.columnModel.applyColumnState({state:i},o)},e.prototype.updateColumns=function(e){var t=this,o=e.columns,n=e.visibleState,i=e.pivotState,r=e.eventType,s=o.map((function(e){var o=e.getColId();if(t.columnModel.isPivotMode()){var r=null==i?void 0:i[o];return{colId:o,pivot:null==r?void 0:r.pivot,rowGroup:null==r?void 0:r.rowGroup,aggFunc:null==r?void 0:r.aggFunc}}return{colId:o,hide:!(null==n?void 0:n[o])}}));this.columnModel.applyColumnState({state:s},r)},e.prototype.createPivotState=function(e){return{pivot:e.isPivotActive(),rowGroup:e.isRowGroupActive(),aggFunc:e.isValueActive()?e.getAggFunc():void 0}},R([o.Autowired("aggFuncService")],e.prototype,"aggFuncService",void 0),R([o.Autowired("columnModel")],e.prototype,"columnModel",void 0),R([o.Autowired("gridOptionsService")],e.prototype,"gridOptionsService",void 0),R([o.Autowired("eventService")],e.prototype,"eventService",void 0),e=R([o.Bean("modelItemUtils")],e)}(),k={version:"31.1.0",moduleName:o.ModuleNames.ColumnsToolPanelModule,beans:[U],agStackComponents:[{componentName:"AgPrimaryColsHeader",componentClass:a},{componentName:"AgPrimaryColsList",componentClass:_},{componentName:"AgPrimaryCols",componentClass:I}],userComponents:[{componentName:"agColumnsToolPanel",componentClass:V}],dependantModules:[n.EnterpriseCoreModule,i.RowGroupingModule,r.SideBarModule]};exports.ColumnsToolPanelModule=k,exports.PrimaryColsPanel=I;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t,o=require("@ag-grid-community/core"),n=require("@ag-grid-enterprise/core"),i=require("@ag-grid-enterprise/row-grouping"),r=require("@ag-grid-enterprise/side-bar"),s=(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 n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}),l=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(s=(r<3?i(s):r>3?i(t,o,s):i(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 a=function(e){function n(){return e.call(this,n.TEMPLATE)||this}return s(n,e),n.prototype.postConstruct=function(){var e=this;this.createExpandIcons(),this.addManagedListener(this.eExpand,"click",this.onExpandClicked.bind(this)),this.addManagedListener(this.eExpand,"keydown",(function(t){t.key===o.KeyCode.SPACE&&(t.preventDefault(),e.onExpandClicked())})),this.addManagedListener(this.eSelect.getInputElement(),"click",this.onSelectClicked.bind(this)),this.addManagedPropertyListener("functionsReadOnly",(function(){return e.onFunctionsReadOnlyPropChanged()})),this.eFilterTextField.setAutoComplete(!1).onValueChange((function(){return e.onFilterTextChanged()})),this.addManagedListener(this.eFilterTextField.getInputElement(),"keydown",this.onMiniFilterKeyDown.bind(this)),this.addManagedListener(this.eventService,o.Events.EVENT_NEW_COLUMNS_LOADED,this.showOrHideOptions.bind(this));var t=this.localeService.getLocaleTextFunc();this.eSelect.setInputAriaLabel(t("ariaColumnSelectAll","Toggle Select All Columns")),this.eFilterTextField.setInputAriaLabel(t("ariaFilterColumnsInput","Filter Columns Input")),this.activateTabIndex([this.eExpand])},n.prototype.onFunctionsReadOnlyPropChanged=function(){var e=this.gridOptionsService.get("functionsReadOnly");this.eSelect.setReadOnly(e),this.eSelect.addOrRemoveCssClass("ag-column-select-column-readonly",e)},n.prototype.init=function(e){this.params=e;var t=this.gridOptionsService.get("functionsReadOnly");this.eSelect.setReadOnly(t),this.eSelect.addOrRemoveCssClass("ag-column-select-column-readonly",t),this.columnModel.isReady()&&this.showOrHideOptions()},n.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)),this.setExpandState(t.EXPANDED)},n.prototype.showOrHideOptions=function(){var e=!this.params.suppressColumnFilter,t=!this.params.suppressColumnSelectAll,n=!this.params.suppressColumnExpandAll,i=this.columnModel.isPrimaryColumnGroupsPresent(),r=this.localeService.getLocaleTextFunc();this.eFilterTextField.setInputPlaceholder(r("searchOoo","Search...")),o._.setDisplayed(this.eFilterTextField.getGui(),e),o._.setDisplayed(this.eSelect.getGui(),t),o._.setDisplayed(this.eExpand,n&&i)},n.prototype.onFilterTextChanged=function(){var e=this;this.onFilterTextChangedDebounced||(this.onFilterTextChangedDebounced=o._.debounce((function(){var t=e.eFilterTextField.getValue();e.dispatchEvent({type:"filterChanged",filterText:t})}),n.DEBOUNCE_DELAY)),this.onFilterTextChangedDebounced()},n.prototype.onMiniFilterKeyDown=function(e){var t=this;e.key===o.KeyCode.ENTER&&setTimeout((function(){return t.onSelectClicked()}),n.DEBOUNCE_DELAY)},n.prototype.onSelectClicked=function(){this.dispatchEvent({type:this.selectState?"unselectAll":"selectAll"})},n.prototype.onExpandClicked=function(){this.dispatchEvent({type:this.expandState===t.EXPANDED?"collapseAll":"expandAll"})},n.prototype.setExpandState=function(e){this.expandState=e,o._.setDisplayed(this.eExpandChecked,this.expandState===t.EXPANDED),o._.setDisplayed(this.eExpandUnchecked,this.expandState===t.COLLAPSED),o._.setDisplayed(this.eExpandIndeterminate,this.expandState===t.INDETERMINATE)},n.prototype.setSelectionState=function(e){this.selectState=e,this.eSelect.setValue(this.selectState)},n.DEBOUNCE_DELAY=300,n.TEMPLATE='<div class="ag-column-select-header" role="presentation">\n <div ref="eExpand" class="ag-column-select-header-icon"></div>\n <ag-checkbox ref="eSelect" class="ag-column-select-header-checkbox"></ag-checkbox>\n <ag-input-text-field class="ag-column-select-header-filter-wrapper" ref="eFilterTextField"></ag-input-text-field>\n </div>',l([o.Autowired("columnModel")],n.prototype,"columnModel",void 0),l([o.RefSelector("eExpand")],n.prototype,"eExpand",void 0),l([o.RefSelector("eSelect")],n.prototype,"eSelect",void 0),l([o.RefSelector("eFilterTextField")],n.prototype,"eFilterTextField",void 0),l([o.PostConstruct],n.prototype,"postConstruct",null),n}(o.Component),u=function(){function e(e,t,n,i,r){void 0===i&&(i=!1),this.eventService=new o.EventService,this.displayName=e,this.dept=n,this.group=i,i?(this.columnGroup=t,this.expanded=r,this.children=[]):this.column=t}return e.prototype.isGroup=function(){return this.group},e.prototype.getDisplayName=function(){return this.displayName},e.prototype.getColumnGroup=function(){return this.columnGroup},e.prototype.getColumn=function(){return this.column},e.prototype.getDept=function(){return this.dept},e.prototype.isExpanded=function(){return!!this.expanded},e.prototype.getChildren=function(){return this.children},e.prototype.isPassesFilter=function(){return this.passesFilter},e.prototype.setExpanded=function(t){t!==this.expanded&&(this.expanded=t,this.eventService.dispatchEvent({type:e.EVENT_EXPANDED_CHANGED}))},e.prototype.setPassesFilter=function(e){this.passesFilter=e},e.prototype.addEventListener=function(e,t){this.eventService.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.eventService.removeEventListener(e,t)},e.EVENT_EXPANDED_CHANGED="expandedChanged",e}(),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 n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),p=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},d=function(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var n,i,r=o.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=r.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(o=r.return)&&o.call(r)}finally{if(i)throw i.error}}return s},h=function(e,t,o){if(o||2===arguments.length)for(var n,i=0,r=t.length;i<r;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))},f=function(e){var t="function"==typeof Symbol&&Symbol.iterator,o=t&&e[t],n=0;if(o)return o.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},m=function(e){function t(t,o,n){var i=e.call(this,'<div class="ag-menu"></div>')||this;return i.column=t,i.mouseEvent=o,i.parentEl=n,i.displayName=null,i}return c(t,e),t.prototype.postConstruct=function(){if(this.initializeProperties(this.column),this.buildMenuItemMap(),this.column instanceof o.Column?this.displayName=this.columnModel.getDisplayNameForColumn(this.column,"columnToolPanel"):this.displayName=this.columnModel.getDisplayNameForProvidedColumnGroup(null,this.column,"columnToolPanel"),this.isActive()){this.mouseEvent.preventDefault();var e=this.getMappedMenuItems();if(0===e.length)return;this.displayContextMenu(e)}},t.prototype.initializeProperties=function(e){e instanceof o.ProvidedColumnGroup?this.columns=e.getLeafColumns():this.columns=[e],this.allowGrouping=this.columns.some((function(e){return e.isPrimary()&&e.isAllowRowGroup()})),this.allowValues=this.columns.some((function(e){return e.isPrimary()&&e.isAllowValue()})),this.allowPivoting=this.columnModel.isPivotMode()&&this.columns.some((function(e){return e.isPrimary()&&e.isAllowPivot()}))},t.prototype.buildMenuItemMap=function(){var e=this,t=this.localeService.getLocaleTextFunc();this.menuItemMap=new Map,this.menuItemMap.set("rowGroup",{allowedFunction:function(t){return t.isPrimary()&&t.isAllowRowGroup()&&!e.columnModel.isColumnGroupingLocked(t)},activeFunction:function(e){return e.isRowGroupActive()},activateLabel:function(){return"".concat(t("groupBy","Group by")," ").concat(e.displayName)},deactivateLabel:function(){return"".concat(t("ungroupBy","Un-Group by")," ").concat(e.displayName)},activateFunction:function(){var t=e.columnModel.getRowGroupColumns();e.columnModel.setRowGroupColumns(e.addColumnsToList(t),"toolPanelUi")},deActivateFunction:function(){var t=e.columnModel.getRowGroupColumns();e.columnModel.setRowGroupColumns(e.removeColumnsFromList(t),"toolPanelUi")},addIcon:"menuAddRowGroup",removeIcon:"menuRemoveRowGroup"}),this.menuItemMap.set("value",{allowedFunction:function(e){return e.isPrimary()&&e.isAllowValue()},activeFunction:function(e){return e.isValueActive()},activateLabel:function(){return t("addToValues","Add ".concat(e.displayName," to values"),[e.displayName])},deactivateLabel:function(){return t("removeFromValues","Remove ".concat(e.displayName," from values"),[e.displayName])},activateFunction:function(){var t=e.columnModel.getValueColumns();e.columnModel.setValueColumns(e.addColumnsToList(t),"toolPanelUi")},deActivateFunction:function(){var t=e.columnModel.getValueColumns();e.columnModel.setValueColumns(e.removeColumnsFromList(t),"toolPanelUi")},addIcon:"valuePanel",removeIcon:"valuePanel"}),this.menuItemMap.set("pivot",{allowedFunction:function(t){return e.columnModel.isPivotMode()&&t.isPrimary()&&t.isAllowPivot()},activeFunction:function(e){return e.isPivotActive()},activateLabel:function(){return t("addToLabels","Add ".concat(e.displayName," to labels"),[e.displayName])},deactivateLabel:function(){return t("removeFromLabels","Remove ".concat(e.displayName," from labels"),[e.displayName])},activateFunction:function(){var t=e.columnModel.getPivotColumns();e.columnModel.setPivotColumns(e.addColumnsToList(t),"toolPanelUi")},deActivateFunction:function(){var t=e.columnModel.getPivotColumns();e.columnModel.setPivotColumns(e.removeColumnsFromList(t),"toolPanelUi")},addIcon:"pivotPanel",removeIcon:"pivotPanel"})},t.prototype.addColumnsToList=function(e){return h([],d(e),!1).concat(this.columns.filter((function(t){return-1===e.indexOf(t)})))},t.prototype.removeColumnsFromList=function(e){var t=this;return e.filter((function(e){return-1===t.columns.indexOf(e)}))},t.prototype.displayContextMenu=function(e){var t=this,n=this.getGui(),i=this.createBean(new o.AgMenuList),r=this.localeService.getLocaleTextFunc(),s=function(){};n.appendChild(i.getGui()),i.addMenuItems(e),i.addManagedListener(i,o.AgMenuItemComponent.EVENT_CLOSE_MENU,(function(){t.parentEl.focus(),s()}));var l=this.popupService.addPopup({modal:!0,eChild:n,closeOnEsc:!0,afterGuiAttached:function(){return t.focusService.focusInto(i.getGui())},ariaLabel:r("ariaLabelContextMenu","Context Menu"),closedCallback:function(e){e instanceof KeyboardEvent&&t.parentEl.focus(),t.destroyBean(i)}});l&&(s=l.hideFunc),this.popupService.positionPopupUnderMouseEvent({type:"columnContextMenu",mouseEvent:this.mouseEvent,ePopup:n})},t.prototype.isActive=function(){return this.allowGrouping||this.allowValues||this.allowPivoting},t.prototype.getMappedMenuItems=function(){var e,t,n=[],i=function(e){var t=r.columns.some((function(t){return e.allowedFunction(t)&&!e.activeFunction(t)})),i=r.columns.some((function(t){return e.allowedFunction(t)&&e.activeFunction(t)}));t&&n.push({name:e.activateLabel(r.displayName),icon:o._.createIconNoSpan(e.addIcon,r.gridOptionsService,null),action:function(){return e.activateFunction()}}),i&&n.push({name:e.deactivateLabel(r.displayName),icon:o._.createIconNoSpan(e.removeIcon,r.gridOptionsService,null),action:function(){return e.deActivateFunction()}})},r=this;try{for(var s=f(this.menuItemMap.values()),l=s.next();!l.done;l=s.next()){i(l.value)}}catch(t){e={error:t}}finally{try{l&&!l.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}return n},p([o.Autowired("columnModel")],t.prototype,"columnModel",void 0),p([o.Autowired("popupService")],t.prototype,"popupService",void 0),p([o.Autowired("focusService")],t.prototype,"focusService",void 0),p([o.PostConstruct],t.prototype,"postConstruct",null),t}(o.Component),v=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 n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),g=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},y=function(e){function t(t,o,n,i){var r=e.call(this)||this;return r.modelItem=t,r.allowDragging=o,r.eventType=n,r.focusWrapper=i,r.processingColumnStateChange=!1,r.modelItem=t,r.columnGroup=t.getColumnGroup(),r.columnDept=t.getDept(),r.displayName=t.getDisplayName(),r.allowDragging=o,r}return v(t,e),t.prototype.init=function(){var e=this;this.setTemplate(t.TEMPLATE),this.eDragHandle=o._.createIconNoSpan("columnDrag",this.gridOptionsService),this.eDragHandle.classList.add("ag-drag-handle","ag-column-select-column-group-drag-handle");var n=this.cbSelect.getGui(),i=this.cbSelect.getInputElement();n.insertAdjacentElement("afterend",this.eDragHandle),i.setAttribute("tabindex","-1"),this.eLabel.innerHTML=this.displayName?this.displayName:"",this.setupExpandContract(),this.addCssClass("ag-column-select-indent-"+this.columnDept),this.addManagedListener(this.eventService,o.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.onColumnStateChanged.bind(this)),this.addManagedListener(this.eLabel,"click",this.onLabelClicked.bind(this)),this.addManagedListener(this.cbSelect,o.Events.EVENT_FIELD_VALUE_CHANGED,this.onCheckboxChanged.bind(this)),this.addManagedListener(this.modelItem,u.EVENT_EXPANDED_CHANGED,this.onExpandChanged.bind(this)),this.addManagedListener(this.focusWrapper,"keydown",this.handleKeyDown.bind(this)),this.addManagedListener(this.focusWrapper,"contextmenu",this.onContextMenu.bind(this)),this.setOpenClosedIcons(),this.setupDragging(),this.onColumnStateChanged(),this.addVisibilityListenersToAllChildren(),this.refreshAriaExpanded(),this.refreshAriaLabel(),this.setupTooltip(),o.CssClassApplier.getToolPanelClassesFromColDef(this.columnGroup.getColGroupDef(),this.gridOptionsService,null,this.columnGroup).forEach((function(t){return e.addOrRemoveCssClass(t,!0)}))},t.prototype.getColumns=function(){return this.columnGroup.getLeafColumns()},t.prototype.setupTooltip=function(){var e=this,t=this.columnGroup.getColGroupDef();if(t){var n=function(){var o=t.headerTooltip;e.setTooltip(o)};n(),this.addManagedListener(this.eventService,o.Events.EVENT_NEW_COLUMNS_LOADED,n)}},t.prototype.getTooltipParams=function(){var t=e.prototype.getTooltipParams.call(this);return t.location="columnToolPanelColumnGroup",t},t.prototype.handleKeyDown=function(e){switch(e.key){case o.KeyCode.LEFT:e.preventDefault(),this.modelItem.setExpanded(!1);break;case o.KeyCode.RIGHT:e.preventDefault(),this.modelItem.setExpanded(!0);break;case o.KeyCode.SPACE:e.preventDefault(),this.isSelectable()&&this.onSelectAllChanged(!this.isSelected())}},t.prototype.onContextMenu=function(e){var t=this,o=this.columnGroup;if(!this.gridOptionsService.get("functionsReadOnly")){var n=this.createBean(new m(o,e,this.focusWrapper));this.addDestroyFunc((function(){n.isAlive()&&t.destroyBean(n)}))}},t.prototype.addVisibilityListenersToAllChildren=function(){var e=this;this.columnGroup.getLeafColumns().forEach((function(t){e.addManagedListener(t,o.Column.EVENT_VISIBLE_CHANGED,e.onColumnStateChanged.bind(e)),e.addManagedListener(t,o.Column.EVENT_VALUE_CHANGED,e.onColumnStateChanged.bind(e)),e.addManagedListener(t,o.Column.EVENT_PIVOT_CHANGED,e.onColumnStateChanged.bind(e)),e.addManagedListener(t,o.Column.EVENT_ROW_GROUP_CHANGED,e.onColumnStateChanged.bind(e))}))},t.prototype.setupDragging=function(){var e=this;if(this.allowDragging){var t=!this.gridOptionsService.get("suppressDragLeaveHidesColumns"),n={type:o.DragSourceType.ToolPanel,eElement:this.eDragHandle,dragItemName:this.displayName,getDefaultIconName:function(){return t?o.DragAndDropService.ICON_HIDE:o.DragAndDropService.ICON_NOT_ALLOWED},getDragItem:function(){return e.createDragItem()},onDragStarted:function(){t=!e.gridOptionsService.get("suppressDragLeaveHidesColumns");var n={type:o.Events.EVENT_COLUMN_PANEL_ITEM_DRAG_START,column:e.columnGroup};e.eventService.dispatchEvent(n)},onDragStopped:function(){var t={type:o.Events.EVENT_COLUMN_PANEL_ITEM_DRAG_END};e.eventService.dispatchEvent(t)},onGridEnter:function(o){t&&e.modelItemUtils.updateColumns({columns:e.columnGroup.getLeafColumns(),visibleState:null==o?void 0:o.visibleState,pivotState:null==o?void 0:o.pivotState,eventType:e.eventType})},onGridExit:function(){t&&e.onChangeCommon(!1)}};this.dragAndDropService.addDragSource(n,!0),this.addDestroyFunc((function(){return e.dragAndDropService.removeDragSource(n)}))}else o._.setDisplayed(this.eDragHandle,!1)},t.prototype.createDragItem=function(){var e=this,t=this.columnGroup.getLeafColumns(),o={},n={};return t.forEach((function(t){var i=t.getId();o[i]=t.isVisible(),n[i]=e.modelItemUtils.createPivotState(t)})),{columns:t,visibleState:o,pivotState:n}},t.prototype.setupExpandContract=function(){this.eGroupClosedIcon.appendChild(o._.createIcon("columnSelectClosed",this.gridOptionsService,null)),this.eGroupOpenedIcon.appendChild(o._.createIcon("columnSelectOpen",this.gridOptionsService,null)),this.addManagedListener(this.eGroupClosedIcon,"click",this.onExpandOrContractClicked.bind(this)),this.addManagedListener(this.eGroupOpenedIcon,"click",this.onExpandOrContractClicked.bind(this));var e=new o.TouchListener(this.eColumnGroupIcons,!0);this.addManagedListener(e,o.TouchListener.EVENT_TAP,this.onExpandOrContractClicked.bind(this)),this.addDestroyFunc(e.destroy.bind(e))},t.prototype.onLabelClicked=function(){var e=!this.cbSelect.getValue();this.onChangeCommon(e)},t.prototype.onCheckboxChanged=function(e){this.onChangeCommon(e.selected)},t.prototype.getVisibleLeafColumns=function(){var e=[],t=function(o){o.forEach((function(o){o.isPassesFilter()&&(o.isGroup()?t(o.getChildren()):e.push(o.getColumn()))}))};return t(this.modelItem.getChildren()),e},t.prototype.onChangeCommon=function(e){this.refreshAriaLabel(),this.processingColumnStateChange||this.modelItemUtils.selectAllChildren(this.modelItem.getChildren(),e,this.eventType)},t.prototype.refreshAriaLabel=function(){var e=this.localeService.getLocaleTextFunc(),t=e("ariaColumnGroup","Column Group"),n=this.cbSelect.getValue(),i=void 0===n?e("ariaIndeterminate","indeterminate"):n?e("ariaVisible","visible"):e("ariaHidden","hidden"),r=e("ariaToggleVisibility","Press SPACE to toggle visibility");o._.setAriaLabel(this.focusWrapper,"".concat(this.displayName," ").concat(t)),this.cbSelect.setInputAriaLabel("".concat(r," (").concat(i,")")),o._.setAriaDescribedBy(this.focusWrapper,this.cbSelect.getInputElement().id)},t.prototype.onColumnStateChanged=function(){var e=this.workOutSelectedValue(),t=this.workOutReadOnlyValue();this.processingColumnStateChange=!0,this.cbSelect.setValue(e),this.cbSelect.setReadOnly(t),this.addOrRemoveCssClass("ag-column-select-column-group-readonly",t),this.processingColumnStateChange=!1},t.prototype.workOutSelectedValue=function(){var e=this,t=this.columnModel.isPivotMode(),o=this.getVisibleLeafColumns(),n=0,i=0;if(o.forEach((function(o){!t&&o.getColDef().lockVisible||(e.isColumnChecked(o,t)?n++:i++)})),!(n>0&&i>0))return n>0},t.prototype.workOutReadOnlyValue=function(){var e=this.columnModel.isPivotMode(),t=0;return this.columnGroup.getLeafColumns().forEach((function(o){e?o.isAnyFunctionAllowed()&&t++:o.getColDef().lockVisible||t++})),0===t},t.prototype.isColumnChecked=function(e,t){if(t){var o=e.isPivotActive(),n=e.isRowGroupActive(),i=e.isValueActive();return o||n||i}return e.isVisible()},t.prototype.onExpandOrContractClicked=function(){var e=this.modelItem.isExpanded();this.modelItem.setExpanded(!e)},t.prototype.onExpandChanged=function(){this.setOpenClosedIcons(),this.refreshAriaExpanded()},t.prototype.setOpenClosedIcons=function(){var e=this.modelItem.isExpanded();o._.setDisplayed(this.eGroupClosedIcon,!e),o._.setDisplayed(this.eGroupOpenedIcon,e)},t.prototype.refreshAriaExpanded=function(){o._.setAriaExpanded(this.focusWrapper,this.modelItem.isExpanded())},t.prototype.getDisplayName=function(){return this.displayName},t.prototype.onSelectAllChanged=function(e){var t=this.cbSelect.getValue();!this.cbSelect.isReadOnly()&&(e&&!t||!e&&t)&&this.cbSelect.toggle()},t.prototype.isSelected=function(){return this.cbSelect.getValue()},t.prototype.isSelectable=function(){return!this.cbSelect.isReadOnly()},t.prototype.setSelected=function(e){this.cbSelect.setValue(e,!0)},t.TEMPLATE='<div class="ag-column-select-column-group" aria-hidden="true">\n <span class="ag-column-group-icons" ref="eColumnGroupIcons" >\n <span class="ag-column-group-closed-icon" ref="eGroupClosedIcon"></span>\n <span class="ag-column-group-opened-icon" ref="eGroupOpenedIcon"></span>\n </span>\n <ag-checkbox ref="cbSelect" class="ag-column-select-checkbox"></ag-checkbox>\n <span class="ag-column-select-column-label" ref="eLabel"></span>\n </div>',g([o.Autowired("columnModel")],t.prototype,"columnModel",void 0),g([o.Autowired("dragAndDropService")],t.prototype,"dragAndDropService",void 0),g([o.Autowired("modelItemUtils")],t.prototype,"modelItemUtils",void 0),g([o.RefSelector("cbSelect")],t.prototype,"cbSelect",void 0),g([o.RefSelector("eLabel")],t.prototype,"eLabel",void 0),g([o.RefSelector("eGroupOpenedIcon")],t.prototype,"eGroupOpenedIcon",void 0),g([o.RefSelector("eGroupClosedIcon")],t.prototype,"eGroupClosedIcon",void 0),g([o.RefSelector("eColumnGroupIcons")],t.prototype,"eColumnGroupIcons",void 0),g([o.PostConstruct],t.prototype,"init",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 n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),E=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},S=function(e){function t(t,o){var n=e.call(this)||this;return n.comp=t,n.virtualList=o,n}return C(t,e),t.prototype.postConstruct=function(){var e=this;this.createManagedBean(new o.VirtualListDragFeature(this.comp,this.virtualList,{dragSourceType:o.DragSourceType.ToolPanel,listItemDragStartEvent:o.Events.EVENT_COLUMN_PANEL_ITEM_DRAG_START,listItemDragEndEvent:o.Events.EVENT_COLUMN_PANEL_ITEM_DRAG_END,eventSource:this.eventService,getCurrentDragValue:function(t){return e.getCurrentDragValue(t)},isMoveBlocked:function(t){return e.isMoveBlocked(t)},getNumRows:function(e){return e.getDisplayedColsList().length},moveItem:function(t,o){return e.moveItem(t,o)}}))},t.prototype.getCurrentDragValue=function(e){return e.column},t.prototype.isMoveBlocked=function(e){return!!this.gridOptionsService.get("suppressMovableColumns")||!!this.getCurrentColumns(e).find((function(e){var t=e.getColDef();return!!t.suppressMovable||!!t.lockPosition}))},t.prototype.moveItem=function(e,t){var o=this.getTargetIndex(e,t),n=this.getCurrentColumns(e);null!=o&&this.columnModel.moveColumns(n,o,"toolPanelUi")},t.prototype.getMoveDiff=function(e,t){var o=this.columnModel.getAllGridColumns(),n=this.getCurrentColumns(e),i=n[0],r=n.length;return o.indexOf(i)<t?r:0},t.prototype.getCurrentColumns=function(e){return e instanceof o.ProvidedColumnGroup?e.getLeafColumns():[e]},t.prototype.getTargetIndex=function(e,t){if(!t)return null;var o,n=t.component,i="top"===t.position;n instanceof y?(o=n.getColumns()[0],i=!0):o=n.getColumn();if(-1!==this.getCurrentColumns(e).indexOf(o))return null;var r=this.columnModel.getAllGridColumns().indexOf(o),s=i?r:r+1;return s-this.getMoveDiff(e,s)},E([o.Autowired("columnModel")],t.prototype,"columnModel",void 0),E([o.Autowired("gridOptionsService")],t.prototype,"gridOptionsService",void 0),E([o.PostConstruct],t.prototype,"postConstruct",null),t}(o.BeanStub),P=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 n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),A=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},b=function(e){function t(t,o,n,i){var r=e.call(this)||this;return r.allowDragging=o,r.groupsExist=n,r.focusWrapper=i,r.processingColumnStateChange=!1,r.column=t.getColumn(),r.columnDept=t.getDept(),r.displayName=t.getDisplayName(),r}return P(t,e),t.prototype.init=function(){var e=this;this.setTemplate(t.TEMPLATE),this.eDragHandle=o._.createIconNoSpan("columnDrag",this.gridOptionsService),this.eDragHandle.classList.add("ag-drag-handle","ag-column-select-column-drag-handle");var n=this.cbSelect.getGui(),i=this.cbSelect.getInputElement();n.insertAdjacentElement("afterend",this.eDragHandle),i.setAttribute("tabindex","-1");var r=o._.escapeString(this.displayName);this.eLabel.innerHTML=r;var s=this.columnDept;this.groupsExist&&this.addCssClass("ag-column-select-add-group-indent"),this.addCssClass("ag-column-select-indent-".concat(s)),this.setupDragging(),this.addManagedListener(this.eventService,o.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.onColumnStateChanged.bind(this)),this.addManagedListener(this.column,o.Column.EVENT_VALUE_CHANGED,this.onColumnStateChanged.bind(this)),this.addManagedListener(this.column,o.Column.EVENT_PIVOT_CHANGED,this.onColumnStateChanged.bind(this)),this.addManagedListener(this.column,o.Column.EVENT_ROW_GROUP_CHANGED,this.onColumnStateChanged.bind(this)),this.addManagedListener(this.column,o.Column.EVENT_VISIBLE_CHANGED,this.onColumnStateChanged.bind(this)),this.addManagedListener(this.focusWrapper,"keydown",this.handleKeyDown.bind(this)),this.addManagedListener(this.focusWrapper,"contextmenu",this.onContextMenu.bind(this)),this.addManagedPropertyListener("functionsReadOnly",this.onColumnStateChanged.bind(this)),this.addManagedListener(this.cbSelect,o.Events.EVENT_FIELD_VALUE_CHANGED,this.onCheckboxChanged.bind(this)),this.addManagedListener(this.eLabel,"click",this.onLabelClicked.bind(this)),this.onColumnStateChanged(),this.refreshAriaLabel(),this.setupTooltip(),o.CssClassApplier.getToolPanelClassesFromColDef(this.column.getColDef(),this.gridOptionsService,this.column,null).forEach((function(t){return e.addOrRemoveCssClass(t,!0)}))},t.prototype.getColumn=function(){return this.column},t.prototype.setupTooltip=function(){var e=this,t=function(){var t=e.column.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="columnToolPanelColumn",t.colDef=this.column.getColDef(),t},t.prototype.onContextMenu=function(e){var t=this,o=this.column;if(!this.gridOptionsService.get("functionsReadOnly")){var n=this.createBean(new m(o,e,this.focusWrapper));this.addDestroyFunc((function(){n.isAlive()&&t.destroyBean(n)}))}},t.prototype.handleKeyDown=function(e){e.key===o.KeyCode.SPACE&&(e.preventDefault(),this.isSelectable()&&this.onSelectAllChanged(!this.isSelected()))},t.prototype.onLabelClicked=function(){if(!this.gridOptionsService.get("functionsReadOnly")){var e=!this.cbSelect.getValue();this.onChangeCommon(e)}},t.prototype.onCheckboxChanged=function(e){this.onChangeCommon(e.selected)},t.prototype.onChangeCommon=function(e){this.cbSelect.isReadOnly()||(this.refreshAriaLabel(),this.processingColumnStateChange||this.modelItemUtils.setColumn(this.column,e,"toolPanelUi"))},t.prototype.refreshAriaLabel=function(){var e=this.localeService.getLocaleTextFunc(),t=e("ariaColumn","Column"),n=this.cbSelect.getValue()?e("ariaVisible","visible"):e("ariaHidden","hidden"),i=e("ariaToggleVisibility","Press SPACE to toggle visibility");o._.setAriaLabel(this.focusWrapper,"".concat(this.displayName," ").concat(t)),this.cbSelect.setInputAriaLabel("".concat(i," (").concat(n,")")),o._.setAriaDescribedBy(this.focusWrapper,this.cbSelect.getInputElement().id)},t.prototype.setupDragging=function(){var e=this;if(this.allowDragging){var t=!this.gridOptionsService.get("suppressDragLeaveHidesColumns"),n={type:o.DragSourceType.ToolPanel,eElement:this.eDragHandle,dragItemName:this.displayName,getDefaultIconName:function(){return t?o.DragAndDropService.ICON_HIDE:o.DragAndDropService.ICON_NOT_ALLOWED},getDragItem:function(){return e.createDragItem()},onDragStarted:function(){t=!e.gridOptionsService.get("suppressDragLeaveHidesColumns");var n={type:o.Events.EVENT_COLUMN_PANEL_ITEM_DRAG_START,column:e.column};e.eventService.dispatchEvent(n)},onDragStopped:function(){var t={type:o.Events.EVENT_COLUMN_PANEL_ITEM_DRAG_END};e.eventService.dispatchEvent(t)},onGridEnter:function(o){t&&e.modelItemUtils.updateColumns({columns:[e.column],visibleState:null==o?void 0:o.visibleState,pivotState:null==o?void 0:o.pivotState,eventType:"toolPanelUi"})},onGridExit:function(){t&&e.onChangeCommon(!1)}};this.dragAndDropService.addDragSource(n,!0),this.addDestroyFunc((function(){return e.dragAndDropService.removeDragSource(n)}))}else o._.setDisplayed(this.eDragHandle,!1)},t.prototype.createDragItem=function(){var e,t,o=this.column.getColId(),n=((e={})[o]=this.column.isVisible(),e),i=((t={})[o]=this.modelItemUtils.createPivotState(this.column),t);return{columns:[this.column],visibleState:n,pivotState:i}},t.prototype.onColumnStateChanged=function(){this.processingColumnStateChange=!0;var e=this.columnModel.isPivotMode();if(e){var t=this.column.isAnyFunctionActive();this.cbSelect.setValue(t)}else this.cbSelect.setValue(this.column.isVisible());var o=!0,n=!0;if(e){var i=this.gridOptionsService.get("functionsReadOnly"),r=!this.column.isAnyFunctionAllowed();n=o=!i&&!r}else{var s=this.column.getColDef(),l=s.enableRowGroup,a=s.enableValue,u=s.lockPosition,c=s.suppressMovable;o=!s.lockVisible,n=!!l||!!a||!(!!u||!!c)}this.cbSelect.setReadOnly(!o),this.eDragHandle.classList.toggle("ag-column-select-column-readonly",!n),this.addOrRemoveCssClass("ag-column-select-column-readonly",!n&&!o);var p=e&&this.gridOptionsService.get("functionsPassive");this.cbSelect.setPassive(p),this.processingColumnStateChange=!1},t.prototype.getDisplayName=function(){return this.displayName},t.prototype.onSelectAllChanged=function(e){e!==this.cbSelect.getValue()&&(this.cbSelect.isReadOnly()||this.cbSelect.toggle())},t.prototype.isSelected=function(){return this.cbSelect.getValue()},t.prototype.isSelectable=function(){return!this.cbSelect.isReadOnly()},t.prototype.isExpandable=function(){return!1},t.prototype.setExpanded=function(e){console.warn("AG Grid: can not expand a column item that does not represent a column group header")},t.TEMPLATE='<div class="ag-column-select-column" aria-hidden="true">\n <ag-checkbox ref="cbSelect" class="ag-column-select-checkbox"></ag-checkbox>\n <span class="ag-column-select-column-label" ref="eLabel"></span>\n </div>',A([o.Autowired("columnModel")],t.prototype,"columnModel",void 0),A([o.Autowired("dragAndDropService")],t.prototype,"dragAndDropService",void 0),A([o.Autowired("modelItemUtils")],t.prototype,"modelItemUtils",void 0),A([o.RefSelector("eLabel")],t.prototype,"eLabel",void 0),A([o.RefSelector("cbSelect")],t.prototype,"cbSelect",void 0),A([o.PostConstruct],t.prototype,"init",null),t}(o.Component),D=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 n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),L=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},M=function(){function e(e){this.items=e}return e.prototype.getRowCount=function(){return this.items.length},e.prototype.getRow=function(e){return this.items[e]},e}(),_=function(e){function n(){var t=e.call(this,n.TEMPLATE)||this;return t.destroyColumnItemFuncs=[],t.hasLoadedInitialState=!1,t.isInitialState=!1,t}return D(n,e),n.prototype.destroyColumnTree=function(){this.allColsTree=[],this.destroyColumnItemFuncs.forEach((function(e){return e()})),this.destroyColumnItemFuncs=[]},n.prototype.init=function(e,t,n){var i=this;this.params=e,this.allowDragging=t,this.eventType=n,this.params.suppressSyncLayoutWithGrid||this.addManagedListener(this.eventService,o.Events.EVENT_COLUMN_MOVED,this.onColumnsChanged.bind(this)),this.addManagedListener(this.eventService,o.Events.EVENT_NEW_COLUMNS_LOADED,this.onColumnsChanged.bind(this)),[o.Events.EVENT_COLUMN_PIVOT_CHANGED,o.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,o.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,o.Events.EVENT_COLUMN_VALUE_CHANGED,o.Events.EVENT_COLUMN_VISIBLE,o.Events.EVENT_NEW_COLUMNS_LOADED].forEach((function(e){i.addManagedListener(i.eventService,e,i.fireSelectionChangedEvent.bind(i))})),this.expandGroupsByDefault=!this.params.contractColumnSelection,this.virtualList=this.createManagedBean(new o.VirtualList({cssIdentifier:"column-select",ariaRole:"tree"})),this.appendChild(this.virtualList.getGui());var r=this.virtualList.getAriaElement();o._.setAriaLive(r,"assertive"),o._.setAriaAtomic(r,!1),o._.setAriaRelevant(r,"text"),this.virtualList.setComponentCreator((function(e,t){return o._.setAriaLevel(t,e.getDept()+1),i.createComponentFromItem(e,t)})),this.columnModel.isReady()&&this.onColumnsChanged(),this.params.suppressColumnMove||(this.colsListPanelItemDragFeature=this.createManagedBean(new S(this,this.virtualList)))},n.prototype.createComponentFromItem=function(e,t){if(e.isGroup()){var o=new y(e,this.allowDragging,this.eventType,t);return this.getContext().createBean(o),o}var n=new b(e,this.allowDragging,this.groupsExist,t);return this.getContext().createBean(n),n},n.prototype.onColumnsChanged=function(){this.hasLoadedInitialState||(this.hasLoadedInitialState=!0,this.isInitialState=!!this.params.initialState);var e=this.getExpandedStates(),t=this.columnModel.isPivotMode();!this.params.suppressSyncLayoutWithGrid&&!t?this.buildTreeFromWhatGridIsDisplaying():this.buildTreeFromProvidedColumnDefs(),this.setExpandedStates(e),this.markFilteredColumns(),this.flattenAndFilterModel(),this.isInitialState=!1},n.prototype.getDisplayedColsList=function(){return this.displayedColsList},n.prototype.getExpandedStates=function(){var e={};return this.isInitialState?(this.params.initialState.expandedGroupIds.forEach((function(t){e[t]=!0})),e):this.allColsTree?(this.forEachItem((function(t){if(t.isGroup()){var o=t.getColumnGroup();o&&(e[o.getId()]=t.isExpanded())}})),e):{}},n.prototype.setExpandedStates=function(e){if(this.allColsTree){var t=this.isInitialState;this.forEachItem((function(o){if(o.isGroup()){var n=o.getColumnGroup();if(n){var i=e[n.getId()];(null!=i||t)&&o.setExpanded(!!i)}}}))}},n.prototype.buildTreeFromWhatGridIsDisplaying=function(){this.colDefService.syncLayoutWithGrid(this.setColumnLayout.bind(this))},n.prototype.setColumnLayout=function(e){var t=this.colDefService.createColumnTree(e);this.buildListModel(t),this.groupsExist=e.some((function(e){return e&&void 0!==e.children})),this.markFilteredColumns(),this.flattenAndFilterModel()},n.prototype.buildTreeFromProvidedColumnDefs=function(){this.buildListModel(this.columnModel.getPrimaryColumnTree()),this.groupsExist=this.columnModel.isPrimaryColumnGroupsPresent()},n.prototype.buildListModel=function(e){var t=this,n=this.onColumnExpanded.bind(this),i=function(e,t,n){e.forEach((function(e){e instanceof o.ProvidedColumnGroup?r(e,t,n):s(e,t,n)}))},r=function(e,o,r){var s=e.getColGroupDef();if(!(s&&s.suppressColumnsToolPanel))if(e.isPadding())i(e.getChildren(),o,r);else{var l=t.columnModel.getDisplayNameForProvidedColumnGroup(null,e,"columnToolPanel"),a=new u(l,e,o,!0,t.expandGroupsByDefault);r.push(a),function(e){e.addEventListener(u.EVENT_EXPANDED_CHANGED,n);var o=e.removeEventListener.bind(e,u.EVENT_EXPANDED_CHANGED,n);t.destroyColumnItemFuncs.push(o)}(a),i(e.getChildren(),o+1,a.getChildren())}},s=function(e,o,n){if(!(e.getColDef()&&e.getColDef().suppressColumnsToolPanel)){var i=t.columnModel.getDisplayNameForColumn(e,"columnToolPanel");n.push(new u(i,e,o))}};this.destroyColumnTree(),i(e,0,this.allColsTree)},n.prototype.onColumnExpanded=function(){this.flattenAndFilterModel()},n.prototype.flattenAndFilterModel=function(){var e=this;this.displayedColsList=[];var t=function(o){o.isPassesFilter()&&(e.displayedColsList.push(o),o.isGroup()&&o.isExpanded()&&o.getChildren().forEach(t))};this.allColsTree.forEach(t),this.virtualList.setModel(new M(this.displayedColsList));var o=this.virtualList.getLastFocusedRow();this.virtualList.refresh(),null!=o&&this.focusRowIfAlive(o),this.notifyListeners(),this.refreshAriaLabel()},n.prototype.refreshAriaLabel=function(){var e=this.localeService.getLocaleTextFunc(),t=e("ariaColumnPanelList","Column List"),n=e("columns","Columns"),i=this.displayedColsList.length;o._.setAriaLabel(this.virtualList.getAriaElement(),"".concat(t," ").concat(i," ").concat(n))},n.prototype.focusRowIfAlive=function(e){var t=this;window.setTimeout((function(){t.isAlive()&&t.virtualList.focusRow(e)}),0)},n.prototype.forEachItem=function(e){var t=function(o){o.forEach((function(o){e(o),o.isGroup()&&t(o.getChildren())}))};this.allColsTree&&t(this.allColsTree)},n.prototype.doSetExpandedAll=function(e){this.forEachItem((function(t){t.isGroup()&&t.setExpanded(e)}))},n.prototype.setGroupsExpanded=function(e,t){if(t){var n=[];this.forEachItem((function(o){if(o.isGroup()){var i=o.getColumnGroup().getId();t.indexOf(i)>=0&&(o.setExpanded(e),n.push(i))}}));var i=t.filter((function(e){return!o._.includes(n,e)}));i.length>0&&console.warn("AG Grid: unable to find group(s) for supplied groupIds:",i)}else this.doSetExpandedAll(e)},n.prototype.getExpandState=function(){var e=0,o=0;return this.forEachItem((function(t){t.isGroup()&&(t.isExpanded()?e++:o++)})),e>0&&o>0?t.INDETERMINATE:o>0?t.COLLAPSED:t.EXPANDED},n.prototype.doSetSelectedAll=function(e){this.modelItemUtils.selectAllChildren(this.allColsTree,e,this.eventType)},n.prototype.getSelectionState=function(){var e=0,t=0,o=this.columnModel.isPivotMode();if(this.forEachItem((function(n){if(!n.isGroup()&&n.isPassesFilter()){var i,r=n.getColumn(),s=r.getColDef();if(o){if(!r.isAllowPivot()&&!r.isAllowRowGroup()&&!r.isAllowValue())return;i=r.isValueActive()||r.isPivotActive()||r.isRowGroupActive()}else{if(s.lockVisible)return;i=r.isVisible()}i?e++:t++}})),!(e>0&&t>0))return!(0===e||t>0)},n.prototype.setFilterText=function(e){this.filterText=o._.exists(e)?e.toLowerCase():null,this.markFilteredColumns(),this.flattenAndFilterModel()},n.prototype.markFilteredColumns=function(){var e=this,t=function(t){if(!o._.exists(e.filterText))return!0;var n=t.getDisplayName();return null==n||-1!==n.toLowerCase().indexOf(e.filterText)},n=function(e,o){var i=!1;if(e.isGroup()){var r=t(e);e.getChildren().forEach((function(e){var t=n(e,r||o);t&&(i=t)}))}var s=!(!o&&!i)||t(e);return e.setPassesFilter(s),s};this.allColsTree.forEach((function(e){return n(e,!1)}))},n.prototype.notifyListeners=function(){this.fireGroupExpandedEvent(),this.fireSelectionChangedEvent()},n.prototype.fireGroupExpandedEvent=function(){var e=this.getExpandState();this.dispatchEvent({type:"groupExpanded",state:e})},n.prototype.fireSelectionChangedEvent=function(){if(this.allColsTree){var e=this.getSelectionState();this.dispatchEvent({type:"selectionChanged",state:e})}},n.prototype.getExpandedGroups=function(){var e=[];return this.allColsTree?(this.forEachItem((function(t){t.isGroup()&&t.isExpanded()&&e.push(t.getColumnGroup().getId())})),e):e},n.TEMPLATE='<div class="'.concat("ag-column-select-list",'" role="presentation"></div>'),L([o.Autowired("columnModel")],n.prototype,"columnModel",void 0),L([o.Autowired("toolPanelColDefService")],n.prototype,"colDefService",void 0),L([o.Autowired("modelItemUtils")],n.prototype,"modelItemUtils",void 0),L([o.PreDestroy],n.prototype,"destroyColumnTree",null),n}(o.Component),O=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 n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),T=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},w=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return O(t,e),t.prototype.createTemplate=function(){return'<div class="ag-pivot-mode-panel">\n <ag-toggle-button ref="cbPivotMode" class="ag-pivot-mode-select"></ag-toggle-button>\n </div>'},t.prototype.init=function(){this.setTemplate(this.createTemplate()),this.cbPivotMode.setValue(this.columnModel.isPivotMode());var e=this.localeService.getLocaleTextFunc();this.cbPivotMode.setLabel(e("pivotMode","Pivot Mode")),this.addManagedListener(this.cbPivotMode,o.Events.EVENT_FIELD_VALUE_CHANGED,this.onBtPivotMode.bind(this)),this.addManagedListener(this.eventService,o.Events.EVENT_NEW_COLUMNS_LOADED,this.onPivotModeChanged.bind(this)),this.addManagedListener(this.eventService,o.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.onPivotModeChanged.bind(this))},t.prototype.onBtPivotMode=function(){var e=!!this.cbPivotMode.getValue();if(e!==this.columnModel.isPivotMode()){this.gridOptionsService.updateGridOptions({options:{pivotMode:e},source:"toolPanelUi"});var t=this.api;t&&t.refreshHeader()}},t.prototype.onPivotModeChanged=function(){var e=this.columnModel.isPivotMode();this.cbPivotMode.setValue(e)},T([o.Autowired("columnModel")],t.prototype,"columnModel",void 0),T([o.Autowired("gridApi")],t.prototype,"api",void 0),T([o.RefSelector("cbPivotMode")],t.prototype,"cbPivotMode",void 0),T([o.PreConstruct],t.prototype,"init",null),t}(o.Component),G=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 n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),x=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},I=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return G(t,e),t.prototype.init=function(e,t,n){this.allowDragging=e,this.params=t,this.eventType=n,this.primaryColsHeaderPanel.init(this.params);var i=this.params.suppressColumnFilter,r=this.params.suppressColumnSelectAll;this.params.suppressColumnExpandAll&&i&&r&&this.primaryColsHeaderPanel.setDisplayed(!1),this.addManagedListener(this.primaryColsListPanel,"groupExpanded",this.onGroupExpanded.bind(this)),this.addManagedListener(this.primaryColsListPanel,"selectionChanged",this.onSelectionChange.bind(this)),this.primaryColsListPanel.init(this.params,this.allowDragging,this.eventType),this.addManagedListener(this.primaryColsHeaderPanel,"expandAll",this.onExpandAll.bind(this)),this.addManagedListener(this.primaryColsHeaderPanel,"collapseAll",this.onCollapseAll.bind(this)),this.addManagedListener(this.primaryColsHeaderPanel,"selectAll",this.onSelectAll.bind(this)),this.addManagedListener(this.primaryColsHeaderPanel,"unselectAll",this.onUnselectAll.bind(this)),this.addManagedListener(this.primaryColsHeaderPanel,"filterChanged",this.onFilterChanged.bind(this)),this.positionableFeature=new o.PositionableFeature(this.getGui(),{minHeight:100}),this.createManagedBean(this.positionableFeature)},t.prototype.toggleResizable=function(e){this.positionableFeature.setResizable(!!e&&{bottom:!0})},t.prototype.onExpandAll=function(){this.primaryColsListPanel.doSetExpandedAll(!0)},t.prototype.onCollapseAll=function(){this.primaryColsListPanel.doSetExpandedAll(!1)},t.prototype.expandGroups=function(e){this.primaryColsListPanel.setGroupsExpanded(!0,e)},t.prototype.collapseGroups=function(e){this.primaryColsListPanel.setGroupsExpanded(!1,e)},t.prototype.setColumnLayout=function(e){this.primaryColsListPanel.setColumnLayout(e)},t.prototype.onFilterChanged=function(e){this.primaryColsListPanel.setFilterText(e.filterText)},t.prototype.syncLayoutWithGrid=function(){this.primaryColsListPanel.onColumnsChanged()},t.prototype.onSelectAll=function(){this.primaryColsListPanel.doSetSelectedAll(!0)},t.prototype.onUnselectAll=function(){this.primaryColsListPanel.doSetSelectedAll(!1)},t.prototype.onGroupExpanded=function(e){this.primaryColsHeaderPanel.setExpandState(e.state),this.params.onStateUpdated()},t.prototype.onSelectionChange=function(e){this.primaryColsHeaderPanel.setSelectionState(e.state)},t.prototype.getExpandedGroups=function(){return this.primaryColsListPanel.getExpandedGroups()},t.TEMPLATE='<div class="ag-column-select">\n <ag-primary-cols-header ref="primaryColsHeaderPanel"></ag-primary-cols-header>\n <ag-primary-cols-list ref="primaryColsListPanel"></ag-primary-cols-list>\n </div>',x([o.RefSelector("primaryColsHeaderPanel")],t.prototype,"primaryColsHeaderPanel",void 0),x([o.RefSelector("primaryColsListPanel")],t.prototype,"primaryColsListPanel",void 0),t}(o.Component),N=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 n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),F=function(){return(F=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var i in t=arguments[o])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},V=function(e){function t(){var o=e.call(this,t.TEMPLATE)||this;return o.initialised=!1,o.childDestroyFuncs=[],o}return N(t,e),t.prototype.setVisible=function(t){e.prototype.setDisplayed.call(this,t),t&&!this.initialised&&this.init(this.params)},t.prototype.init=function(e){var t=this,n=this.gridOptionsService.addGridCommonParams({suppressColumnMove:!1,suppressColumnSelectAll:!1,suppressColumnFilter:!1,suppressColumnExpandAll:!1,contractColumnSelection:!1,suppressPivotMode:!1,suppressRowGroups:!1,suppressValues:!1,suppressPivots:!1,suppressSyncLayoutWithGrid:!1});if(this.params=F(F({},n),e),this.isRowGroupingModuleLoaded()&&!this.params.suppressPivotMode&&(this.pivotModePanel=this.createBean(new w),this.childDestroyFuncs.push((function(){return t.destroyBean(t.pivotModePanel)})),this.appendChild(this.pivotModePanel)),this.primaryColsPanel=this.createBean(new I),this.childDestroyFuncs.push((function(){return t.destroyBean(t.primaryColsPanel)})),this.primaryColsPanel.init(!0,this.params,"toolPanelUi"),this.primaryColsPanel.addCssClass("ag-column-panel-column-select"),this.appendChild(this.primaryColsPanel),this.isRowGroupingModuleLoaded()){this.params.suppressRowGroups||(this.rowGroupDropZonePanel=this.createBean(new i.RowGroupDropZonePanel(!1)),this.childDestroyFuncs.push((function(){return t.destroyBean(t.rowGroupDropZonePanel)})),this.appendChild(this.rowGroupDropZonePanel)),this.params.suppressValues||(this.valuesDropZonePanel=this.createBean(new i.ValuesDropZonePanel(!1)),this.childDestroyFuncs.push((function(){return t.destroyBean(t.valuesDropZonePanel)})),this.appendChild(this.valuesDropZonePanel)),this.params.suppressPivots||(this.pivotDropZonePanel=this.createBean(new i.PivotDropZonePanel(!1)),this.childDestroyFuncs.push((function(){return t.destroyBean(t.pivotDropZonePanel)})),this.appendChild(this.pivotDropZonePanel)),this.setLastVisible();var r=this.addManagedListener(this.eventService,o.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,(function(){t.resetChildrenHeight(),t.setLastVisible()}));this.childDestroyFuncs.push((function(){return r()}))}this.initialised=!0},t.prototype.setPivotModeSectionVisible=function(e){var t=this;this.isRowGroupingModuleLoaded()&&(this.pivotModePanel?this.pivotModePanel.setDisplayed(e):e&&(this.pivotModePanel=this.createBean(new w),this.getGui().insertBefore(this.pivotModePanel.getGui(),this.getGui().firstChild),this.childDestroyFuncs.push((function(){return t.destroyBean(t.pivotModePanel)}))),this.setLastVisible())},t.prototype.setRowGroupsSectionVisible=function(e){this.isRowGroupingModuleLoaded()&&(this.rowGroupDropZonePanel?this.rowGroupDropZonePanel.setDisplayed(e):e&&(this.rowGroupDropZonePanel=this.createManagedBean(new i.RowGroupDropZonePanel(!1)),this.appendChild(this.rowGroupDropZonePanel)),this.setLastVisible())},t.prototype.setValuesSectionVisible=function(e){this.isRowGroupingModuleLoaded()&&(this.valuesDropZonePanel?this.valuesDropZonePanel.setDisplayed(e):e&&(this.valuesDropZonePanel=this.createManagedBean(new i.ValuesDropZonePanel(!1)),this.appendChild(this.valuesDropZonePanel)),this.setLastVisible())},t.prototype.setPivotSectionVisible=function(e){this.isRowGroupingModuleLoaded()&&(this.pivotDropZonePanel?this.pivotDropZonePanel.setDisplayed(e):e&&(this.pivotDropZonePanel=this.createManagedBean(new i.PivotDropZonePanel(!1)),this.appendChild(this.pivotDropZonePanel),this.pivotDropZonePanel.setDisplayed(e)),this.setLastVisible())},t.prototype.setResizers=function(){[this.primaryColsPanel,this.rowGroupDropZonePanel,this.valuesDropZonePanel,this.pivotDropZonePanel].forEach((function(e){if(e){var t=e.getGui();e.toggleResizable(!t.classList.contains("ag-last-column-drop")&&!t.classList.contains("ag-hidden"))}}))},t.prototype.setLastVisible=function(){var e=this.getGui();Array.prototype.slice.call(e.querySelectorAll(".ag-column-drop")).forEach((function(e){return e.classList.remove("ag-last-column-drop")}));var t=e.querySelectorAll(".ag-column-drop:not(.ag-hidden)"),n=o._.last(t);n&&n.classList.add("ag-last-column-drop"),this.setResizers()},t.prototype.resetChildrenHeight=function(){for(var e=this.getGui().children,t=0;t<e.length;t++){var o=e[t];o.style.removeProperty("height"),o.style.removeProperty("flex")}},t.prototype.isRowGroupingModuleLoaded=function(){return o.ModuleRegistry.__assertRegistered(o.ModuleNames.RowGroupingModule,"Row Grouping",this.context.getGridId())},t.prototype.expandColumnGroups=function(e){this.primaryColsPanel.expandGroups(e)},t.prototype.collapseColumnGroups=function(e){this.primaryColsPanel.collapseGroups(e)},t.prototype.setColumnLayout=function(e){this.primaryColsPanel.setColumnLayout(e)},t.prototype.syncLayoutWithGrid=function(){this.primaryColsPanel.syncLayoutWithGrid()},t.prototype.destroyChildren=function(){this.childDestroyFuncs.forEach((function(e){return e()})),this.childDestroyFuncs.length=0,o._.clearElement(this.getGui())},t.prototype.refresh=function(e){return this.destroyChildren(),this.init(e),!0},t.prototype.getState=function(){return{expandedGroupIds:this.primaryColsPanel.getExpandedGroups()}},t.prototype.destroy=function(){this.destroyChildren(),e.prototype.destroy.call(this)},t.TEMPLATE='<div class="ag-column-panel"></div>',t}(o.Component),R=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},U=function(){function e(){}return e.prototype.selectAllChildren=function(e,t,o){var n=this.extractAllLeafColumns(e);this.setAllColumns(n,t,o)},e.prototype.setColumn=function(e,t,o){this.setAllColumns([e],t,o)},e.prototype.setAllColumns=function(e,t,o){this.columnModel.isPivotMode()?this.setAllPivot(e,t,o):this.setAllVisible(e,t,o)},e.prototype.extractAllLeafColumns=function(e){var t=[],o=function(e){e.forEach((function(e){e.isPassesFilter()&&(e.isGroup()?o(e.getChildren()):t.push(e.getColumn()))}))};return o(e),t},e.prototype.setAllVisible=function(e,t,o){var n=[];e.forEach((function(e){e.getColDef().lockVisible||e.isVisible()!=t&&n.push({colId:e.getId(),hide:!t})})),n.length>0&&this.columnModel.applyColumnState({state:n},o)},e.prototype.setAllPivot=function(e,t,o){this.gridOptionsService.get("functionsPassive")?this.setAllPivotPassive(e,t):this.setAllPivotActive(e,t,o)},e.prototype.setAllPivotPassive=function(e,t){var n=this.columnModel.getPivotColumns().slice(),i=this.columnModel.getValueColumns().slice(),r=this.columnModel.getRowGroupColumns().slice(),s=!1,l=!1,a=!1,u=t?function(e){e.isAnyFunctionActive()||(e.isAllowValue()?(i.push(e),l=!0):e.isAllowRowGroup()?(r.push(e),s=!0):e.isAllowPivot()&&(n.push(e),a=!0))}:function(e){e.isAnyFunctionActive()&&(n.indexOf(e)>=0&&(o._.removeFromArray(n,e),s=!0),i.indexOf(e)>=0&&(o._.removeFromArray(i,e),l=!0),r.indexOf(e)>=0&&(o._.removeFromArray(r,e),a=!0))};if(e.forEach(u),s){var c={type:o.Events.EVENT_COLUMN_PIVOT_CHANGE_REQUEST,columns:n};this.eventService.dispatchEvent(c)}if(a){var p={type:o.Events.EVENT_COLUMN_ROW_GROUP_CHANGE_REQUEST,columns:r};this.eventService.dispatchEvent(p)}if(l){var d={type:o.Events.EVENT_COLUMN_VALUE_CHANGE_REQUEST,columns:r};this.eventService.dispatchEvent(d)}},e.prototype.setAllPivotActive=function(e,t,o){var n=this,i=[],r=t?function(e){if(!e.isAnyFunctionActive())if(e.isAllowValue()){var t="string"==typeof e.getAggFunc()?e.getAggFunc():n.aggFuncService.getDefaultAggFunc(e);i.push({colId:e.getId(),aggFunc:t})}else e.isAllowRowGroup()?i.push({colId:e.getId(),rowGroup:!0}):e.isAllowPivot()&&i.push({colId:e.getId(),pivot:!0})}:function(e){(e.isPivotActive()||e.isRowGroupActive()||e.isValueActive())&&i.push({colId:e.getId(),pivot:!1,rowGroup:!1,aggFunc:null})};e.forEach(r),i.length>0&&this.columnModel.applyColumnState({state:i},o)},e.prototype.updateColumns=function(e){var t=this,o=e.columns,n=e.visibleState,i=e.pivotState,r=e.eventType,s=o.map((function(e){var o=e.getColId();if(t.columnModel.isPivotMode()){var r=null==i?void 0:i[o];return{colId:o,pivot:null==r?void 0:r.pivot,rowGroup:null==r?void 0:r.rowGroup,aggFunc:null==r?void 0:r.aggFunc}}return{colId:o,hide:!(null==n?void 0:n[o])}}));this.columnModel.applyColumnState({state:s},r)},e.prototype.createPivotState=function(e){return{pivot:e.isPivotActive(),rowGroup:e.isRowGroupActive(),aggFunc:e.isValueActive()?e.getAggFunc():void 0}},R([o.Autowired("aggFuncService")],e.prototype,"aggFuncService",void 0),R([o.Autowired("columnModel")],e.prototype,"columnModel",void 0),R([o.Autowired("gridOptionsService")],e.prototype,"gridOptionsService",void 0),R([o.Autowired("eventService")],e.prototype,"eventService",void 0),e=R([o.Bean("modelItemUtils")],e)}(),k={version:"31.1.1",moduleName:o.ModuleNames.ColumnsToolPanelModule,beans:[U],agStackComponents:[{componentName:"AgPrimaryColsHeader",componentClass:a},{componentName:"AgPrimaryColsList",componentClass:_},{componentName:"AgPrimaryCols",componentClass:I}],userComponents:[{componentName:"agColumnsToolPanel",componentClass:V}],dependantModules:[n.EnterpriseCoreModule,i.RowGroupingModule,r.SideBarModule]};exports.ColumnsToolPanelModule=k,exports.PrimaryColsPanel=I;

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

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

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

export declare const VERSION = "31.1.0";
export declare const VERSION = "31.1.1";
{
"name": "@ag-grid-enterprise/column-tool-panel",
"version": "31.1.0",
"version": "31.1.1",
"description": "Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue",

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

"dependencies": {
"@ag-grid-community/core": "~31.1.0",
"@ag-grid-enterprise/core": "~31.1.0",
"@ag-grid-enterprise/row-grouping": "~31.1.0",
"@ag-grid-enterprise/side-bar": "~31.1.0"
"@ag-grid-community/core": "31.1.1",
"@ag-grid-enterprise/core": "31.1.1",
"@ag-grid-enterprise/row-grouping": "31.1.1",
"@ag-grid-enterprise/side-bar": "31.1.1"
},

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

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

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

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

Sorry, the diff of this file is not supported yet

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