@ag-grid-enterprise/column-tool-panel
Advanced tools
Comparing version 26.1.0 to 26.2.0
@@ -75,3 +75,5 @@ "use strict"; | ||
this.expandGroupsByDefault = !this.params.contractColumnSelection; | ||
this.virtualList = this.createManagedBean(new core_1.VirtualList('column-select', 'tree')); | ||
var translate = this.gridOptionsWrapper.getLocaleTextFunc(); | ||
var columnListName = translate('ariaColumnList', 'Column List'); | ||
this.virtualList = this.createManagedBean(new core_1.VirtualList('column-select', 'tree', columnListName)); | ||
this.appendChild(this.virtualList.getGui()); | ||
@@ -78,0 +80,0 @@ this.virtualList.setComponentCreator(function (item, listItemElement) { |
@@ -176,3 +176,4 @@ "use strict"; | ||
} | ||
var checkboxReadOnly; | ||
var canBeToggled = true; | ||
var canBeDragged = true; | ||
if (isPivotMode) { | ||
@@ -184,10 +185,11 @@ // when in pivot mode, the item should be read only if: | ||
var noFunctionsAllowed = !this.column.isAnyFunctionAllowed(); | ||
checkboxReadOnly = functionsReadOnly || noFunctionsAllowed; | ||
canBeToggled = !functionsReadOnly && !noFunctionsAllowed; | ||
} | ||
else { | ||
// when in normal mode, the checkbox is read only if visibility is locked | ||
checkboxReadOnly = !!this.column.getColDef().lockVisible; | ||
canBeToggled = !this.column.getColDef().lockVisible; | ||
canBeDragged = !this.column.getColDef().lockPosition; | ||
} | ||
this.cbSelect.setReadOnly(checkboxReadOnly); | ||
core_1._.addOrRemoveCssClass(this.getGui(), 'ag-column-select-column-readonly', checkboxReadOnly); | ||
this.cbSelect.setReadOnly(!canBeToggled); | ||
core_1._.addOrRemoveCssClass(this.eDragHandle, 'ag-column-select-column-readonly', !canBeDragged); | ||
core_1._.addOrRemoveCssClass(this.getGui(), 'ag-column-select-column-readonly', !canBeDragged && !canBeToggled); | ||
var checkboxPassive = isPivotMode && this.gridOptionsWrapper.isFunctionsPassive(); | ||
@@ -194,0 +196,0 @@ this.cbSelect.setPassive(checkboxPassive); |
/** | ||
* @ag-grid-enterprise/column-tool-panel - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components * @version v26.1.0 | ||
* @ag-grid-enterprise/column-tool-panel - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components * @version v26.2.0 | ||
* @link http://www.ag-grid.com/ | ||
@@ -8,6 +8,6 @@ ' * @license Commercial | ||
/** | ||
* @ag-grid-enterprise/column-tool-panel - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components * @version v26.1.0 | ||
* @ag-grid-enterprise/column-tool-panel - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components * @version v26.2.0 | ||
* @link http://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"),s=require("@ag-grid-enterprise/side-bar"),r=(e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)},function(t,o){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,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(r=(s<3?i(r):s>3?i(t,o,r):i(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r};!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 r(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.keyCode===o.KeyCode.SPACE&&e.onExpandClicked()})),this.addManagedListener(this.eSelect.getInputElement(),"click",this.onSelectClicked.bind(this)),this.eFilterTextField.onValueChange((function(){return e.onFilterTextChanged()})),this.addManagedListener(this.eFilterTextField.getInputElement(),"keypress",this.onMiniFilterKeyPress.bind(this)),this.addManagedListener(this.eventService,o.Events.EVENT_NEW_COLUMNS_LOADED,this.showOrHideOptions.bind(this));var t=this.gridOptionsWrapper.getLocaleTextFunc();this.eSelect.setInputAriaLabel(t("ariaColumnSelectAll","Toggle Select All Columns")),this.eFilterTextField.setInputAriaLabel(t("ariaFilterColumnsInput","Filter Columns Input"))},n.prototype.init=function(e){this.params=e,this.columnModel.isReady()&&this.showOrHideOptions()},n.prototype.createExpandIcons=function(){this.eExpand.appendChild(this.eExpandChecked=o._.createIconNoSpan("columnSelectOpen",this.gridOptionsWrapper)),this.eExpand.appendChild(this.eExpandUnchecked=o._.createIconNoSpan("columnSelectClosed",this.gridOptionsWrapper)),this.eExpand.appendChild(this.eExpandIndeterminate=o._.createIconNoSpan("columnSelectIndeterminate",this.gridOptionsWrapper)),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(),s=this.gridOptionsWrapper.getLocaleTextFunc();this.eFilterTextField.setInputPlaceholder(s("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.onMiniFilterKeyPress=function(e){var t=this;o._.isKeyPressed(e,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" tabindex="-1">\n <div ref="eExpand" class="ag-column-select-header-icon" tabindex="0"></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),p=function(){function e(e,t,n,i,s){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=s,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)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),u=function(e,t,o,n){var i,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(r=(s<3?i(r):s>3?i(t,o,r):i(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r},d=function(e){function t(t,o,n,i){var s=e.call(this)||this;return s.modelItem=t,s.allowDragging=o,s.eventType=n,s.focusWrapper=i,s.processingColumnStateChange=!1,s.modelItem=t,s.columnGroup=t.getColumnGroup(),s.columnDept=t.getDept(),s.allowDragging=o,s}return c(t,e),t.prototype.init=function(){var e=this;this.setTemplate(t.TEMPLATE),this.eDragHandle=o._.createIconNoSpan("columnDrag",this.gridOptionsWrapper),o._.addCssClass(this.eDragHandle,"ag-drag-handle"),o._.addCssClass(this.eDragHandle,"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.displayName=this.columnModel.getDisplayNameForOriginalColumnGroup(null,this.columnGroup,this.eventType),o._.missing(this.displayName)&&(this.displayName=">>"),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.AgCheckbox.EVENT_CHANGED,this.onCheckboxChanged.bind(this)),this.addManagedListener(this.modelItem,p.EVENT_EXPANDED_CHANGED,this.onExpandChanged.bind(this)),this.addManagedListener(this.focusWrapper,"keydown",this.handleKeyDown.bind(this)),this.setOpenClosedIcons(),this.setupDragging(),this.onColumnStateChanged(),this.addVisibilityListenersToAllChildren(),this.refreshAriaExpanded(),this.refreshAriaLabel(),this.setupTooltip(),o.CssClassApplier.getToolPanelClassesFromColDef(this.columnGroup.getColGroupDef(),this.gridOptionsWrapper,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.keyCode){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.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={type:o.DragSourceType.ToolPanel,eElement:this.eDragHandle,dragItemName:this.displayName,getDragItem:function(){return e.createDragItem()},onDragStarted:function(){var t={type:o.Events.EVENT_COLUMN_PANEL_ITEM_DRAG_START,column:e.columnGroup};e.eventService.dispatchEvent(t)},onDragStopped:function(){var t={type:o.Events.EVENT_COLUMN_PANEL_ITEM_DRAG_END};e.eventService.dispatchEvent(t)}};this.dragAndDropService.addDragSource(t,!0),this.addDestroyFunc((function(){return e.dragAndDropService.removeDragSource(t)}))}else o._.setDisplayed(this.eDragHandle,!1)},t.prototype.createDragItem=function(){var e={};return this.columnGroup.getLeafColumns().forEach((function(t){e[t.getId()]=t.isVisible()})),{columns:this.columnGroup.getLeafColumns(),visibleState:e}},t.prototype.setupExpandContract=function(){this.eGroupClosedIcon.appendChild(o._.createIcon("columnSelectClosed",this.gridOptionsWrapper,null)),this.eGroupOpenedIcon.appendChild(o._.createIcon("columnSelectOpen",this.gridOptionsWrapper,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.gridOptionsWrapper.getLocaleTextFunc(),t=e("ariaColumnGroup","Column Group"),n=this.cbSelect.getValue()?e("ariaVisible","visible"):e("ariaHidden","hidden"),i=e("ariaToggleVisibility","Press SPACE to toggle visibility");o._.setAriaLabel(this.focusWrapper,this.displayName+" "+t),this.cbSelect.setInputAriaLabel(i+" ("+n+")"),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),o._.addOrRemoveCssClass(this.getGui(),"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>',u([o.Autowired("columnModel")],t.prototype,"columnModel",void 0),u([o.Autowired("dragAndDropService")],t.prototype,"dragAndDropService",void 0),u([o.Autowired("modelItemUtils")],t.prototype,"modelItemUtils",void 0),u([o.RefSelector("cbSelect")],t.prototype,"cbSelect",void 0),u([o.RefSelector("eLabel")],t.prototype,"eLabel",void 0),u([o.RefSelector("eGroupOpenedIcon")],t.prototype,"eGroupOpenedIcon",void 0),u([o.RefSelector("eGroupClosedIcon")],t.prototype,"eGroupClosedIcon",void 0),u([o.RefSelector("eColumnGroupIcons")],t.prototype,"eColumnGroupIcons",void 0),u([o.PostConstruct],t.prototype,"init",null),t}(o.Component),h=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)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){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,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(r=(s<3?i(r):s>3?i(t,o,r):i(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r},m="ag-column-list-item-hovered",f=function(e){function t(t,o){var n=e.call(this)||this;return n.comp=t,n.virtualList=o,n.currentDragColumn=null,n.lastHoveredColumnItem=null,n}return h(t,e),t.prototype.postConstruct=function(){this.addManagedListener(this.eventService,o.Events.EVENT_COLUMN_PANEL_ITEM_DRAG_START,this.columnPanelItemDragStart.bind(this)),this.addManagedListener(this.eventService,o.Events.EVENT_COLUMN_PANEL_ITEM_DRAG_END,this.columnPanelItemDragEnd.bind(this)),this.createDropTarget(),this.createAutoScrollService()},t.prototype.columnPanelItemDragStart=function(e){var t=e.column;this.currentDragColumn=t;var n=this.getCurrentColumns();o._.find(n,(function(e){var t=e.getColDef();return!!t.suppressMovable||!!t.lockPosition}))&&(this.moveBlocked=!0)},t.prototype.columnPanelItemDragEnd=function(){var e=this;window.setTimeout((function(){e.currentDragColumn=null,e.moveBlocked=!1}),10)},t.prototype.createDropTarget=function(){var e=this,t={isInterestedIn:function(e){return e===o.DragSourceType.ToolPanel},getIconName:function(){return o.DragAndDropService[e.moveBlocked?"ICON_NOT_ALLOWED":"ICON_MOVE"]},getContainer:function(){return e.comp.getGui()},onDragging:function(t){return e.onDragging(t)},onDragStop:function(){return e.onDragStop()},onDragLeave:function(){return e.onDragLeave()}};this.dragAndDropService.addDropTarget(t)},t.prototype.createAutoScrollService=function(){var e=this.virtualList.getGui();this.autoScrollService=new o.AutoScrollService({scrollContainer:e,scrollAxis:"y",getVerticalPosition:function(){return e.scrollTop},setVerticalPosition:function(t){return e.scrollTop=t}})},t.prototype.onDragging=function(e){if(this.currentDragColumn&&!this.moveBlocked){var t=this.getDragColumnItem(e),n=this.virtualList.getComponentAt(t.rowIndex);if(n){var i=n.getGui().parentElement;this.lastHoveredColumnItem&&this.lastHoveredColumnItem.rowIndex===t.rowIndex&&this.lastHoveredColumnItem.position===t.position||(this.autoScrollService.check(e.event),this.clearHoveredItems(),this.lastHoveredColumnItem=t,o._.radioCssClass(i,""+m),o._.radioCssClass(i,"ag-item-highlight-"+t.position))}}},t.prototype.getDragColumnItem=function(e){var t=this.virtualList.getGui(),o=parseFloat(window.getComputedStyle(t).paddingTop),n=this.virtualList.getRowHeight(),i=this.virtualList.getScrollTop(),s=Math.max(0,(e.y-o+i)/n),r=this.comp.getDisplayedColsList().length-1,l=0|Math.min(r,s);return{rowIndex:l,position:Math.round(s)>s||s>r?"bottom":"top",component:this.virtualList.getComponentAt(l)}},t.prototype.onDragStop=function(){if(!this.moveBlocked){var e=this.getTargetIndex(),t=this.getCurrentColumns();null!=e&&this.columnModel.moveColumns(t,e),this.clearHoveredItems(),this.autoScrollService.ensureCleared()}},t.prototype.getMoveDiff=function(e){var t=this.columnModel.getAllGridColumns(),o=this.getCurrentColumns(),n=o[0],i=o.length;return t.indexOf(n)<e?i:0},t.prototype.getCurrentColumns=function(){return this.currentDragColumn instanceof o.ProvidedColumnGroup?this.currentDragColumn.getLeafColumns():[this.currentDragColumn]},t.prototype.getTargetIndex=function(){if(!this.lastHoveredColumnItem)return null;var e,t=this.lastHoveredColumnItem.component,o="top"===this.lastHoveredColumnItem.position;t instanceof d?(e=t.getColumns()[0],o=!0):e=t.getColumn();var n=this.columnModel.getAllGridColumns().indexOf(e),i=o?n:n+1;return i-this.getMoveDiff(i)},t.prototype.onDragLeave=function(){this.clearHoveredItems(),this.autoScrollService.ensureCleared()},t.prototype.clearHoveredItems=function(){this.virtualList.getGui().querySelectorAll("."+m).forEach((function(e){[m,"ag-item-highlight-top","ag-item-highlight-bottom"].forEach((function(t){o._.removeCssClass(e,t)}))})),this.lastHoveredColumnItem=null},g([o.Autowired("columnModel")],t.prototype,"columnModel",void 0),g([o.Autowired("dragAndDropService")],t.prototype,"dragAndDropService",void 0),g([o.PostConstruct],t.prototype,"postConstruct",null),t}(o.BeanStub),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)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),y=function(e,t,o,n){var i,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(r=(s<3?i(r):s>3?i(t,o,r):i(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r},v=function(e){function t(t,o,n,i,s){var r=e.call(this)||this;return r.column=t,r.columnDept=o,r.allowDragging=n,r.groupsExist=i,r.focusWrapper=s,r.processingColumnStateChange=!1,r}return C(t,e),t.prototype.init=function(){var e=this;this.setTemplate(t.TEMPLATE),this.eDragHandle=o._.createIconNoSpan("columnDrag",this.gridOptionsWrapper),o._.addCssClass(this.eDragHandle,"ag-drag-handle"),o._.addCssClass(this.eDragHandle,"ag-column-select-column-drag-handle");var n=this.cbSelect.getGui(),i=this.cbSelect.getInputElement();n.insertAdjacentElement("afterend",this.eDragHandle),i.setAttribute("tabindex","-1"),this.displayName=this.columnModel.getDisplayNameForColumn(this.column,"columnToolPanel");var s=o._.escapeString(this.displayName);this.eLabel.innerHTML=s;var r=this.columnDept;this.groupsExist&&this.addCssClass("ag-column-select-add-group-indent"),this.addCssClass("ag-column-select-indent-"+r),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.gridOptionsWrapper,"functionsReadOnly",this.onColumnStateChanged.bind(this)),this.addManagedListener(this.cbSelect,o.AgCheckbox.EVENT_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.gridOptionsWrapper,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.handleKeyDown=function(e){e.keyCode===o.KeyCode.SPACE&&(e.preventDefault(),this.isSelectable()&&this.onSelectAllChanged(!this.isSelected()))},t.prototype.onLabelClicked=function(){if(!this.gridOptionsWrapper.isFunctionsReadOnly()){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.gridOptionsWrapper.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,this.displayName+" "+t),this.cbSelect.setInputAriaLabel(i+" ("+n+")"),o._.setAriaDescribedBy(this.focusWrapper,this.cbSelect.getInputElement().id)},t.prototype.setupDragging=function(){var e=this;if(this.allowDragging){var t={type:o.DragSourceType.ToolPanel,eElement:this.eDragHandle,dragItemName:this.displayName,getDragItem:function(){return e.createDragItem()},onDragStarted:function(){var t={type:o.Events.EVENT_COLUMN_PANEL_ITEM_DRAG_START,column:e.column};e.eventService.dispatchEvent(t)},onDragStopped:function(){var t={type:o.Events.EVENT_COLUMN_PANEL_ITEM_DRAG_END};e.eventService.dispatchEvent(t)}};this.dragAndDropService.addDragSource(t,!0),this.addDestroyFunc((function(){return e.dragAndDropService.removeDragSource(t)}))}else o._.setDisplayed(this.eDragHandle,!1)},t.prototype.createDragItem=function(){var e={};return e[this.column.getId()]=this.column.isVisible(),{columns:[this.column],visibleState:e}},t.prototype.onColumnStateChanged=function(){this.processingColumnStateChange=!0;var e,t=this.columnModel.isPivotMode();if(t){var n=this.column.isAnyFunctionActive();this.cbSelect.setValue(n)}else this.cbSelect.setValue(this.column.isVisible());if(t){var i=this.gridOptionsWrapper.isFunctionsReadOnly(),s=!this.column.isAnyFunctionAllowed();e=i||s}else e=!!this.column.getColDef().lockVisible;this.cbSelect.setReadOnly(e),o._.addOrRemoveCssClass(this.getGui(),"ag-column-select-column-readonly",e);var r=t&&this.gridOptionsWrapper.isFunctionsPassive();this.cbSelect.setPassive(r),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>',y([o.Autowired("columnModel")],t.prototype,"columnModel",void 0),y([o.Autowired("dragAndDropService")],t.prototype,"dragAndDropService",void 0),y([o.Autowired("modelItemUtils")],t.prototype,"modelItemUtils",void 0),y([o.RefSelector("eLabel")],t.prototype,"eLabel",void 0),y([o.RefSelector("cbSelect")],t.prototype,"cbSelect",void 0),y([o.PostConstruct],t.prototype,"init",null),t}(o.Component),E=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)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),D=function(e,t,o,n){var i,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(r=(s<3?i(r):s>3?i(t,o,r):i(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r},A=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}(),P=function(e){function n(){var t=e.call(this,n.TEMPLATE)||this;return t.destroyColumnItemFuncs=[],t}return E(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("column-select","tree")),this.appendChild(this.virtualList.getGui()),this.virtualList.setComponentCreator((function(e,t){return o._.setAriaLevel(t,e.getDept()+1),i.createComponentFromItem(e,t)})),this.columnModel.isReady()&&this.onColumnsChanged(),e.suppressColumnMove||this.gridOptionsWrapper.isSuppressMovableColumns()||this.createManagedBean(new f(this,this.virtualList))},n.prototype.createComponentFromItem=function(e,t){if(e.isGroup()){var o=new d(e,this.allowDragging,this.eventType,t);return this.getContext().createBean(o),o}var n=new v(e.getColumn(),e.getDept(),this.allowDragging,this.groupsExist,t);return this.getContext().createBean(n),n},n.prototype.onColumnsChanged=function(){var e=this.getExpandedStates(),t=this.columnModel.isPivotMode();!this.params.suppressSyncLayoutWithGrid&&!t?this.buildTreeFromWhatGridIsDisplaying():this.buildTreeFromProvidedColumnDefs(),this.setExpandedStates(e),this.markFilteredColumns(),this.flattenAndFilterModel()},n.prototype.getDisplayedColsList=function(){return this.displayedColsList},n.prototype.getExpandedStates=function(){if(!this.allColsTree)return{};var e={};return this.forEachItem((function(t){if(t.isGroup()){var o=t.getColumnGroup();o&&(e[o.getId()]=t.isExpanded())}})),e},n.prototype.setExpandedStates=function(e){this.allColsTree&&this.forEachItem((function(t){if(t.isGroup()){var o=t.getColumnGroup();if(o){var n=e[o.getId()];null!=n&&t.setExpanded(n)}}}))},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?s(e,t,n):r(e,t,n)}))},s=function(e,o,s){var r=e.getColGroupDef();if(!(r&&r.suppressColumnsToolPanel))if(e.isPadding())i(e.getChildren(),o,s);else{var l=t.columnModel.getDisplayNameForOriginalColumnGroup(null,e,t.eventType),a=new p(l,e,o,!0,t.expandGroupsByDefault);s.push(a),function(e){e.addEventListener(p.EVENT_EXPANDED_CHANGED,n);var o=e.removeEventListener.bind(e,p.EVENT_EXPANDED_CHANGED,n);t.destroyColumnItemFuncs.push(o)}(a),i(e.getChildren(),o+1,a.getChildren())}},r=function(e,o,n){if(!(e.getColDef()&&e.getColDef().suppressColumnsToolPanel)){var i=t.columnModel.getDisplayNameForColumn(e,"columnToolPanel");n.push(new p(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 A(this.displayedColsList));var o=this.virtualList.getLastFocusedRow();this.virtualList.refresh(),null!=o&&this.focusRowIfAlive(o),this.notifyListeners()},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())}))};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,s=n.getColumn(),r=s.getColDef();if(o){if(!s.isAllowPivot()&&!s.isAllowRowGroup()&&!s.isAllowValue())return;i=s.isValueActive()||s.isPivotActive()||s.isRowGroupActive()}else{if(r.lockVisible)return;i=s.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 s=t(e);e.getChildren().forEach((function(e){var t=n(e,s||o);t&&(i=t)}))}var r=!(!o&&!i)||t(e);return e.setPassesFilter(r),r};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(){var e=this.getSelectionState();this.dispatchEvent({type:"selectionChanged",state:e})},n.TEMPLATE='<div class="ag-column-select-list" role="presentation"></div>',D([o.Autowired("columnModel")],n.prototype,"columnModel",void 0),D([o.Autowired("toolPanelColDefService")],n.prototype,"colDefService",void 0),D([o.Autowired("modelItemUtils")],n.prototype,"modelItemUtils",void 0),D([o.PreDestroy],n.prototype,"destroyColumnTree",null),n}(o.Component),S=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)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),b=function(e,t,o,n){var i,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(r=(s<3?i(r):s>3?i(t,o,r):i(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r},_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return S(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.gridOptionsWrapper.getLocaleTextFunc();this.cbPivotMode.setLabel(e("pivotMode","Pivot Mode")),this.addManagedListener(this.cbPivotMode,o.AgCheckbox.EVENT_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.columnModel.setPivotMode(e,"toolPanelUi");var t=this.gridOptionsWrapper.getApi();t&&t.refreshHeader()}},t.prototype.onPivotModeChanged=function(){var e=this.columnModel.isPivotMode();this.cbPivotMode.setValue(e)},b([o.Autowired("columnModel")],t.prototype,"columnModel",void 0),b([o.RefSelector("cbPivotMode")],t.prototype,"cbPivotMode",void 0),b([o.PreConstruct],t.prototype,"init",null),t}(o.Component),L=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)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),M=function(e,t,o,n){var i,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(r=(s<3?i(r):s>3?i(t,o,r):i(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r},T=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return L(t,e),t.prototype.postConstruct=function(){this.initialiseTabGuard({})},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,s=this.params.suppressColumnSelectAll;this.params.suppressColumnExpandAll&&i&&s&&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)},t.prototype.onSelectionChange=function(e){this.primaryColsHeaderPanel.setSelectionState(e.state)},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>',M([o.RefSelector("primaryColsHeaderPanel")],t.prototype,"primaryColsHeaderPanel",void 0),M([o.RefSelector("primaryColsListPanel")],t.prototype,"primaryColsListPanel",void 0),M([o.PostConstruct],t.prototype,"postConstruct",null),t}(o.TabGuardComp),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)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){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,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(r=(s<3?i(r):s>3?i(t,o,r):i(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r},x=function(e){function t(){var o=e.call(this,t.TEMPLATE)||this;return o.initialised=!1,o.childDestroyFuncs=[],o}return O(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={suppressColumnMove:!1,suppressColumnSelectAll:!1,suppressColumnFilter:!1,suppressColumnExpandAll:!1,contractColumnSelection:!1,suppressPivotMode:!1,suppressRowGroups:!1,suppressValues:!1,suppressPivots:!1,suppressSyncLayoutWithGrid:!1,api:this.gridApi,columnApi:this.columnApi};if(o._.mergeDeep(n,e),this.params=n,this.isRowGroupingModuleLoaded()&&!this.params.suppressPivotMode&&(this.pivotModePanel=this.createBean(new _),this.childDestroyFuncs.push((function(){return t.destroyBean(t.pivotModePanel)})),this.appendChild(this.pivotModePanel)),this.primaryColsPanel=this.createBean(new T),this.childDestroyFuncs.push((function(){return t.destroyBean(t.primaryColsPanel)})),this.primaryColsPanel.init(!0,this.params,"toolPanelUi"),o._.addCssClass(this.primaryColsPanel.getGui(),"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 s=this.addManagedListener(this.eventService,o.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,(function(){t.resetChildrenHeight(),t.setLastVisible()}));this.childDestroyFuncs.push((function(){return s()}))}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 _),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(!o._.containsClass(t,"ag-last-column-drop")&&!o._.containsClass(t,"ag-hidden"))}}))},t.prototype.setLastVisible=function(){var e=this.getGui();Array.prototype.slice.call(e.querySelectorAll(".ag-column-drop")).forEach((function(e){return o._.removeCssClass(e,"ag-last-column-drop")}));var t=e.querySelectorAll(".ag-column-drop:not(.ag-hidden)"),n=o._.last(t);n&&o._.addCssClass(n,"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")},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(){this.destroyChildren(),this.init(this.params)},t.prototype.destroy=function(){this.destroyChildren(),e.prototype.destroy.call(this)},t.TEMPLATE='<div class="ag-column-panel"></div>',G([o.Autowired("gridApi")],t.prototype,"gridApi",void 0),G([o.Autowired("columnApi")],t.prototype,"columnApi",void 0),t}(o.Component),N=function(e,t,o,n){var i,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(r=(s<3?i(r):s>3?i(t,o,r):i(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r},I=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.gridOptionsWrapper.isFunctionsPassive()?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(),s=this.columnModel.getRowGroupColumns().slice(),r=!1,l=!1,a=!1,p=t?function(e){e.isAnyFunctionActive()||(e.isAllowValue()?(i.push(e),l=!0):e.isAllowRowGroup()?(s.push(e),r=!0):e.isAllowPivot()&&(n.push(e),a=!0))}:function(e){e.isAnyFunctionActive()&&(n.indexOf(e)>=0&&(o._.removeFromArray(n,e),r=!0),i.indexOf(e)>=0&&(o._.removeFromArray(i,e),l=!0),s.indexOf(e)>=0&&(o._.removeFromArray(s,e),a=!0))};if(e.forEach(p),r){var c={type:o.Events.EVENT_COLUMN_PIVOT_CHANGE_REQUEST,columns:n,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(c)}if(a){var u={type:o.Events.EVENT_COLUMN_ROW_GROUP_CHANGE_REQUEST,columns:s,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(u)}if(l){var d={type:o.Events.EVENT_COLUMN_VALUE_CHANGE_REQUEST,columns:s,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(d)}},e.prototype.setAllPivotActive=function(e,t,o){var n=this,i=[],s=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(s),i.length>0&&this.columnModel.applyColumnState({state:i},o)},N([o.Autowired("aggFuncService")],e.prototype,"aggFuncService",void 0),N([o.Autowired("columnModel")],e.prototype,"columnModel",void 0),N([o.Autowired("gridOptionsWrapper")],e.prototype,"gridOptionsWrapper",void 0),N([o.Autowired("columnApi")],e.prototype,"columnApi",void 0),N([o.Autowired("gridApi")],e.prototype,"gridApi",void 0),N([o.Autowired("eventService")],e.prototype,"eventService",void 0),e=N([o.Bean("modelItemUtils")],e)}(),w={moduleName:o.ModuleNames.ColumnToolPanelModule,beans:[I],agStackComponents:[{componentName:"AgPrimaryColsHeader",componentClass:a},{componentName:"AgPrimaryColsList",componentClass:P},{componentName:"AgPrimaryCols",componentClass:T}],userComponents:[{componentName:"agColumnsToolPanel",componentClass:x}],dependantModules:[n.EnterpriseCoreModule,i.RowGroupingModule,s.SideBarModule]};exports.ColumnsToolPanelModule=w,exports.PrimaryColsPanel=T; | ||
"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"),s=require("@ag-grid-enterprise/side-bar"),r=(e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)},function(t,o){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,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(r=(s<3?i(r):s>3?i(t,o,r):i(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r};!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 r(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.keyCode===o.KeyCode.SPACE&&e.onExpandClicked()})),this.addManagedListener(this.eSelect.getInputElement(),"click",this.onSelectClicked.bind(this)),this.eFilterTextField.onValueChange((function(){return e.onFilterTextChanged()})),this.addManagedListener(this.eFilterTextField.getInputElement(),"keypress",this.onMiniFilterKeyPress.bind(this)),this.addManagedListener(this.eventService,o.Events.EVENT_NEW_COLUMNS_LOADED,this.showOrHideOptions.bind(this));var t=this.gridOptionsWrapper.getLocaleTextFunc();this.eSelect.setInputAriaLabel(t("ariaColumnSelectAll","Toggle Select All Columns")),this.eFilterTextField.setInputAriaLabel(t("ariaFilterColumnsInput","Filter Columns Input"))},n.prototype.init=function(e){this.params=e,this.columnModel.isReady()&&this.showOrHideOptions()},n.prototype.createExpandIcons=function(){this.eExpand.appendChild(this.eExpandChecked=o._.createIconNoSpan("columnSelectOpen",this.gridOptionsWrapper)),this.eExpand.appendChild(this.eExpandUnchecked=o._.createIconNoSpan("columnSelectClosed",this.gridOptionsWrapper)),this.eExpand.appendChild(this.eExpandIndeterminate=o._.createIconNoSpan("columnSelectIndeterminate",this.gridOptionsWrapper)),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(),s=this.gridOptionsWrapper.getLocaleTextFunc();this.eFilterTextField.setInputPlaceholder(s("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.onMiniFilterKeyPress=function(e){var t=this;o._.isKeyPressed(e,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" tabindex="-1">\n <div ref="eExpand" class="ag-column-select-header-icon" tabindex="0"></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),p=function(){function e(e,t,n,i,s){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=s,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)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),u=function(e,t,o,n){var i,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(r=(s<3?i(r):s>3?i(t,o,r):i(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r},d=function(e){function t(t,o,n,i){var s=e.call(this)||this;return s.modelItem=t,s.allowDragging=o,s.eventType=n,s.focusWrapper=i,s.processingColumnStateChange=!1,s.modelItem=t,s.columnGroup=t.getColumnGroup(),s.columnDept=t.getDept(),s.allowDragging=o,s}return c(t,e),t.prototype.init=function(){var e=this;this.setTemplate(t.TEMPLATE),this.eDragHandle=o._.createIconNoSpan("columnDrag",this.gridOptionsWrapper),o._.addCssClass(this.eDragHandle,"ag-drag-handle"),o._.addCssClass(this.eDragHandle,"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.displayName=this.columnModel.getDisplayNameForOriginalColumnGroup(null,this.columnGroup,this.eventType),o._.missing(this.displayName)&&(this.displayName=">>"),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.AgCheckbox.EVENT_CHANGED,this.onCheckboxChanged.bind(this)),this.addManagedListener(this.modelItem,p.EVENT_EXPANDED_CHANGED,this.onExpandChanged.bind(this)),this.addManagedListener(this.focusWrapper,"keydown",this.handleKeyDown.bind(this)),this.setOpenClosedIcons(),this.setupDragging(),this.onColumnStateChanged(),this.addVisibilityListenersToAllChildren(),this.refreshAriaExpanded(),this.refreshAriaLabel(),this.setupTooltip(),o.CssClassApplier.getToolPanelClassesFromColDef(this.columnGroup.getColGroupDef(),this.gridOptionsWrapper,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.keyCode){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.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={type:o.DragSourceType.ToolPanel,eElement:this.eDragHandle,dragItemName:this.displayName,getDragItem:function(){return e.createDragItem()},onDragStarted:function(){var t={type:o.Events.EVENT_COLUMN_PANEL_ITEM_DRAG_START,column:e.columnGroup};e.eventService.dispatchEvent(t)},onDragStopped:function(){var t={type:o.Events.EVENT_COLUMN_PANEL_ITEM_DRAG_END};e.eventService.dispatchEvent(t)}};this.dragAndDropService.addDragSource(t,!0),this.addDestroyFunc((function(){return e.dragAndDropService.removeDragSource(t)}))}else o._.setDisplayed(this.eDragHandle,!1)},t.prototype.createDragItem=function(){var e={};return this.columnGroup.getLeafColumns().forEach((function(t){e[t.getId()]=t.isVisible()})),{columns:this.columnGroup.getLeafColumns(),visibleState:e}},t.prototype.setupExpandContract=function(){this.eGroupClosedIcon.appendChild(o._.createIcon("columnSelectClosed",this.gridOptionsWrapper,null)),this.eGroupOpenedIcon.appendChild(o._.createIcon("columnSelectOpen",this.gridOptionsWrapper,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.gridOptionsWrapper.getLocaleTextFunc(),t=e("ariaColumnGroup","Column Group"),n=this.cbSelect.getValue()?e("ariaVisible","visible"):e("ariaHidden","hidden"),i=e("ariaToggleVisibility","Press SPACE to toggle visibility");o._.setAriaLabel(this.focusWrapper,this.displayName+" "+t),this.cbSelect.setInputAriaLabel(i+" ("+n+")"),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),o._.addOrRemoveCssClass(this.getGui(),"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>',u([o.Autowired("columnModel")],t.prototype,"columnModel",void 0),u([o.Autowired("dragAndDropService")],t.prototype,"dragAndDropService",void 0),u([o.Autowired("modelItemUtils")],t.prototype,"modelItemUtils",void 0),u([o.RefSelector("cbSelect")],t.prototype,"cbSelect",void 0),u([o.RefSelector("eLabel")],t.prototype,"eLabel",void 0),u([o.RefSelector("eGroupOpenedIcon")],t.prototype,"eGroupOpenedIcon",void 0),u([o.RefSelector("eGroupClosedIcon")],t.prototype,"eGroupClosedIcon",void 0),u([o.RefSelector("eColumnGroupIcons")],t.prototype,"eColumnGroupIcons",void 0),u([o.PostConstruct],t.prototype,"init",null),t}(o.Component),h=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)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){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,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(r=(s<3?i(r):s>3?i(t,o,r):i(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r},m="ag-column-list-item-hovered",f=function(e){function t(t,o){var n=e.call(this)||this;return n.comp=t,n.virtualList=o,n.currentDragColumn=null,n.lastHoveredColumnItem=null,n}return h(t,e),t.prototype.postConstruct=function(){this.addManagedListener(this.eventService,o.Events.EVENT_COLUMN_PANEL_ITEM_DRAG_START,this.columnPanelItemDragStart.bind(this)),this.addManagedListener(this.eventService,o.Events.EVENT_COLUMN_PANEL_ITEM_DRAG_END,this.columnPanelItemDragEnd.bind(this)),this.createDropTarget(),this.createAutoScrollService()},t.prototype.columnPanelItemDragStart=function(e){var t=e.column;this.currentDragColumn=t;var n=this.getCurrentColumns();o._.find(n,(function(e){var t=e.getColDef();return!!t.suppressMovable||!!t.lockPosition}))&&(this.moveBlocked=!0)},t.prototype.columnPanelItemDragEnd=function(){var e=this;window.setTimeout((function(){e.currentDragColumn=null,e.moveBlocked=!1}),10)},t.prototype.createDropTarget=function(){var e=this,t={isInterestedIn:function(e){return e===o.DragSourceType.ToolPanel},getIconName:function(){return o.DragAndDropService[e.moveBlocked?"ICON_NOT_ALLOWED":"ICON_MOVE"]},getContainer:function(){return e.comp.getGui()},onDragging:function(t){return e.onDragging(t)},onDragStop:function(){return e.onDragStop()},onDragLeave:function(){return e.onDragLeave()}};this.dragAndDropService.addDropTarget(t)},t.prototype.createAutoScrollService=function(){var e=this.virtualList.getGui();this.autoScrollService=new o.AutoScrollService({scrollContainer:e,scrollAxis:"y",getVerticalPosition:function(){return e.scrollTop},setVerticalPosition:function(t){return e.scrollTop=t}})},t.prototype.onDragging=function(e){if(this.currentDragColumn&&!this.moveBlocked){var t=this.getDragColumnItem(e),n=this.virtualList.getComponentAt(t.rowIndex);if(n){var i=n.getGui().parentElement;this.lastHoveredColumnItem&&this.lastHoveredColumnItem.rowIndex===t.rowIndex&&this.lastHoveredColumnItem.position===t.position||(this.autoScrollService.check(e.event),this.clearHoveredItems(),this.lastHoveredColumnItem=t,o._.radioCssClass(i,""+m),o._.radioCssClass(i,"ag-item-highlight-"+t.position))}}},t.prototype.getDragColumnItem=function(e){var t=this.virtualList.getGui(),o=parseFloat(window.getComputedStyle(t).paddingTop),n=this.virtualList.getRowHeight(),i=this.virtualList.getScrollTop(),s=Math.max(0,(e.y-o+i)/n),r=this.comp.getDisplayedColsList().length-1,l=0|Math.min(r,s);return{rowIndex:l,position:Math.round(s)>s||s>r?"bottom":"top",component:this.virtualList.getComponentAt(l)}},t.prototype.onDragStop=function(){if(!this.moveBlocked){var e=this.getTargetIndex(),t=this.getCurrentColumns();null!=e&&this.columnModel.moveColumns(t,e),this.clearHoveredItems(),this.autoScrollService.ensureCleared()}},t.prototype.getMoveDiff=function(e){var t=this.columnModel.getAllGridColumns(),o=this.getCurrentColumns(),n=o[0],i=o.length;return t.indexOf(n)<e?i:0},t.prototype.getCurrentColumns=function(){return this.currentDragColumn instanceof o.ProvidedColumnGroup?this.currentDragColumn.getLeafColumns():[this.currentDragColumn]},t.prototype.getTargetIndex=function(){if(!this.lastHoveredColumnItem)return null;var e,t=this.lastHoveredColumnItem.component,o="top"===this.lastHoveredColumnItem.position;t instanceof d?(e=t.getColumns()[0],o=!0):e=t.getColumn();var n=this.columnModel.getAllGridColumns().indexOf(e),i=o?n:n+1;return i-this.getMoveDiff(i)},t.prototype.onDragLeave=function(){this.clearHoveredItems(),this.autoScrollService.ensureCleared()},t.prototype.clearHoveredItems=function(){this.virtualList.getGui().querySelectorAll("."+m).forEach((function(e){[m,"ag-item-highlight-top","ag-item-highlight-bottom"].forEach((function(t){o._.removeCssClass(e,t)}))})),this.lastHoveredColumnItem=null},g([o.Autowired("columnModel")],t.prototype,"columnModel",void 0),g([o.Autowired("dragAndDropService")],t.prototype,"dragAndDropService",void 0),g([o.PostConstruct],t.prototype,"postConstruct",null),t}(o.BeanStub),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)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),y=function(e,t,o,n){var i,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(r=(s<3?i(r):s>3?i(t,o,r):i(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r},v=function(e){function t(t,o,n,i,s){var r=e.call(this)||this;return r.column=t,r.columnDept=o,r.allowDragging=n,r.groupsExist=i,r.focusWrapper=s,r.processingColumnStateChange=!1,r}return C(t,e),t.prototype.init=function(){var e=this;this.setTemplate(t.TEMPLATE),this.eDragHandle=o._.createIconNoSpan("columnDrag",this.gridOptionsWrapper),o._.addCssClass(this.eDragHandle,"ag-drag-handle"),o._.addCssClass(this.eDragHandle,"ag-column-select-column-drag-handle");var n=this.cbSelect.getGui(),i=this.cbSelect.getInputElement();n.insertAdjacentElement("afterend",this.eDragHandle),i.setAttribute("tabindex","-1"),this.displayName=this.columnModel.getDisplayNameForColumn(this.column,"columnToolPanel");var s=o._.escapeString(this.displayName);this.eLabel.innerHTML=s;var r=this.columnDept;this.groupsExist&&this.addCssClass("ag-column-select-add-group-indent"),this.addCssClass("ag-column-select-indent-"+r),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.gridOptionsWrapper,"functionsReadOnly",this.onColumnStateChanged.bind(this)),this.addManagedListener(this.cbSelect,o.AgCheckbox.EVENT_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.gridOptionsWrapper,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.handleKeyDown=function(e){e.keyCode===o.KeyCode.SPACE&&(e.preventDefault(),this.isSelectable()&&this.onSelectAllChanged(!this.isSelected()))},t.prototype.onLabelClicked=function(){if(!this.gridOptionsWrapper.isFunctionsReadOnly()){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.gridOptionsWrapper.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,this.displayName+" "+t),this.cbSelect.setInputAriaLabel(i+" ("+n+")"),o._.setAriaDescribedBy(this.focusWrapper,this.cbSelect.getInputElement().id)},t.prototype.setupDragging=function(){var e=this;if(this.allowDragging){var t={type:o.DragSourceType.ToolPanel,eElement:this.eDragHandle,dragItemName:this.displayName,getDragItem:function(){return e.createDragItem()},onDragStarted:function(){var t={type:o.Events.EVENT_COLUMN_PANEL_ITEM_DRAG_START,column:e.column};e.eventService.dispatchEvent(t)},onDragStopped:function(){var t={type:o.Events.EVENT_COLUMN_PANEL_ITEM_DRAG_END};e.eventService.dispatchEvent(t)}};this.dragAndDropService.addDragSource(t,!0),this.addDestroyFunc((function(){return e.dragAndDropService.removeDragSource(t)}))}else o._.setDisplayed(this.eDragHandle,!1)},t.prototype.createDragItem=function(){var e={};return e[this.column.getId()]=this.column.isVisible(),{columns:[this.column],visibleState:e}},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 n=!0,i=!0;if(e){var s=this.gridOptionsWrapper.isFunctionsReadOnly(),r=!this.column.isAnyFunctionAllowed();n=!s&&!r}else n=!this.column.getColDef().lockVisible,i=!this.column.getColDef().lockPosition;this.cbSelect.setReadOnly(!n),o._.addOrRemoveCssClass(this.eDragHandle,"ag-column-select-column-readonly",!i),o._.addOrRemoveCssClass(this.getGui(),"ag-column-select-column-readonly",!i&&!n);var l=e&&this.gridOptionsWrapper.isFunctionsPassive();this.cbSelect.setPassive(l),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>',y([o.Autowired("columnModel")],t.prototype,"columnModel",void 0),y([o.Autowired("dragAndDropService")],t.prototype,"dragAndDropService",void 0),y([o.Autowired("modelItemUtils")],t.prototype,"modelItemUtils",void 0),y([o.RefSelector("eLabel")],t.prototype,"eLabel",void 0),y([o.RefSelector("cbSelect")],t.prototype,"cbSelect",void 0),y([o.PostConstruct],t.prototype,"init",null),t}(o.Component),E=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)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),D=function(e,t,o,n){var i,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(r=(s<3?i(r):s>3?i(t,o,r):i(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r},A=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}(),P=function(e){function n(){var t=e.call(this,n.TEMPLATE)||this;return t.destroyColumnItemFuncs=[],t}return E(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;var s=this.gridOptionsWrapper.getLocaleTextFunc()("ariaColumnList","Column List");this.virtualList=this.createManagedBean(new o.VirtualList("column-select","tree",s)),this.appendChild(this.virtualList.getGui()),this.virtualList.setComponentCreator((function(e,t){return o._.setAriaLevel(t,e.getDept()+1),i.createComponentFromItem(e,t)})),this.columnModel.isReady()&&this.onColumnsChanged(),e.suppressColumnMove||this.gridOptionsWrapper.isSuppressMovableColumns()||this.createManagedBean(new f(this,this.virtualList))},n.prototype.createComponentFromItem=function(e,t){if(e.isGroup()){var o=new d(e,this.allowDragging,this.eventType,t);return this.getContext().createBean(o),o}var n=new v(e.getColumn(),e.getDept(),this.allowDragging,this.groupsExist,t);return this.getContext().createBean(n),n},n.prototype.onColumnsChanged=function(){var e=this.getExpandedStates(),t=this.columnModel.isPivotMode();!this.params.suppressSyncLayoutWithGrid&&!t?this.buildTreeFromWhatGridIsDisplaying():this.buildTreeFromProvidedColumnDefs(),this.setExpandedStates(e),this.markFilteredColumns(),this.flattenAndFilterModel()},n.prototype.getDisplayedColsList=function(){return this.displayedColsList},n.prototype.getExpandedStates=function(){if(!this.allColsTree)return{};var e={};return this.forEachItem((function(t){if(t.isGroup()){var o=t.getColumnGroup();o&&(e[o.getId()]=t.isExpanded())}})),e},n.prototype.setExpandedStates=function(e){this.allColsTree&&this.forEachItem((function(t){if(t.isGroup()){var o=t.getColumnGroup();if(o){var n=e[o.getId()];null!=n&&t.setExpanded(n)}}}))},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?s(e,t,n):r(e,t,n)}))},s=function(e,o,s){var r=e.getColGroupDef();if(!(r&&r.suppressColumnsToolPanel))if(e.isPadding())i(e.getChildren(),o,s);else{var l=t.columnModel.getDisplayNameForOriginalColumnGroup(null,e,t.eventType),a=new p(l,e,o,!0,t.expandGroupsByDefault);s.push(a),function(e){e.addEventListener(p.EVENT_EXPANDED_CHANGED,n);var o=e.removeEventListener.bind(e,p.EVENT_EXPANDED_CHANGED,n);t.destroyColumnItemFuncs.push(o)}(a),i(e.getChildren(),o+1,a.getChildren())}},r=function(e,o,n){if(!(e.getColDef()&&e.getColDef().suppressColumnsToolPanel)){var i=t.columnModel.getDisplayNameForColumn(e,"columnToolPanel");n.push(new p(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 A(this.displayedColsList));var o=this.virtualList.getLastFocusedRow();this.virtualList.refresh(),null!=o&&this.focusRowIfAlive(o),this.notifyListeners()},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())}))};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,s=n.getColumn(),r=s.getColDef();if(o){if(!s.isAllowPivot()&&!s.isAllowRowGroup()&&!s.isAllowValue())return;i=s.isValueActive()||s.isPivotActive()||s.isRowGroupActive()}else{if(r.lockVisible)return;i=s.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 s=t(e);e.getChildren().forEach((function(e){var t=n(e,s||o);t&&(i=t)}))}var r=!(!o&&!i)||t(e);return e.setPassesFilter(r),r};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(){var e=this.getSelectionState();this.dispatchEvent({type:"selectionChanged",state:e})},n.TEMPLATE='<div class="ag-column-select-list" role="presentation"></div>',D([o.Autowired("columnModel")],n.prototype,"columnModel",void 0),D([o.Autowired("toolPanelColDefService")],n.prototype,"colDefService",void 0),D([o.Autowired("modelItemUtils")],n.prototype,"modelItemUtils",void 0),D([o.PreDestroy],n.prototype,"destroyColumnTree",null),n}(o.Component),S=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)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),b=function(e,t,o,n){var i,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(r=(s<3?i(r):s>3?i(t,o,r):i(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r},_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return S(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.gridOptionsWrapper.getLocaleTextFunc();this.cbPivotMode.setLabel(e("pivotMode","Pivot Mode")),this.addManagedListener(this.cbPivotMode,o.AgCheckbox.EVENT_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.columnModel.setPivotMode(e,"toolPanelUi");var t=this.gridOptionsWrapper.getApi();t&&t.refreshHeader()}},t.prototype.onPivotModeChanged=function(){var e=this.columnModel.isPivotMode();this.cbPivotMode.setValue(e)},b([o.Autowired("columnModel")],t.prototype,"columnModel",void 0),b([o.RefSelector("cbPivotMode")],t.prototype,"cbPivotMode",void 0),b([o.PreConstruct],t.prototype,"init",null),t}(o.Component),L=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)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),M=function(e,t,o,n){var i,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(r=(s<3?i(r):s>3?i(t,o,r):i(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r},T=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return L(t,e),t.prototype.postConstruct=function(){this.initialiseTabGuard({})},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,s=this.params.suppressColumnSelectAll;this.params.suppressColumnExpandAll&&i&&s&&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)},t.prototype.onSelectionChange=function(e){this.primaryColsHeaderPanel.setSelectionState(e.state)},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>',M([o.RefSelector("primaryColsHeaderPanel")],t.prototype,"primaryColsHeaderPanel",void 0),M([o.RefSelector("primaryColsListPanel")],t.prototype,"primaryColsListPanel",void 0),M([o.PostConstruct],t.prototype,"postConstruct",null),t}(o.TabGuardComp),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)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){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,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(r=(s<3?i(r):s>3?i(t,o,r):i(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r},x=function(e){function t(){var o=e.call(this,t.TEMPLATE)||this;return o.initialised=!1,o.childDestroyFuncs=[],o}return O(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={suppressColumnMove:!1,suppressColumnSelectAll:!1,suppressColumnFilter:!1,suppressColumnExpandAll:!1,contractColumnSelection:!1,suppressPivotMode:!1,suppressRowGroups:!1,suppressValues:!1,suppressPivots:!1,suppressSyncLayoutWithGrid:!1,api:this.gridApi,columnApi:this.columnApi};if(o._.mergeDeep(n,e),this.params=n,this.isRowGroupingModuleLoaded()&&!this.params.suppressPivotMode&&(this.pivotModePanel=this.createBean(new _),this.childDestroyFuncs.push((function(){return t.destroyBean(t.pivotModePanel)})),this.appendChild(this.pivotModePanel)),this.primaryColsPanel=this.createBean(new T),this.childDestroyFuncs.push((function(){return t.destroyBean(t.primaryColsPanel)})),this.primaryColsPanel.init(!0,this.params,"toolPanelUi"),o._.addCssClass(this.primaryColsPanel.getGui(),"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 s=this.addManagedListener(this.eventService,o.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,(function(){t.resetChildrenHeight(),t.setLastVisible()}));this.childDestroyFuncs.push((function(){return s()}))}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 _),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(!o._.containsClass(t,"ag-last-column-drop")&&!o._.containsClass(t,"ag-hidden"))}}))},t.prototype.setLastVisible=function(){var e=this.getGui();Array.prototype.slice.call(e.querySelectorAll(".ag-column-drop")).forEach((function(e){return o._.removeCssClass(e,"ag-last-column-drop")}));var t=e.querySelectorAll(".ag-column-drop:not(.ag-hidden)"),n=o._.last(t);n&&o._.addCssClass(n,"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")},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(){this.destroyChildren(),this.init(this.params)},t.prototype.destroy=function(){this.destroyChildren(),e.prototype.destroy.call(this)},t.TEMPLATE='<div class="ag-column-panel"></div>',G([o.Autowired("gridApi")],t.prototype,"gridApi",void 0),G([o.Autowired("columnApi")],t.prototype,"columnApi",void 0),t}(o.Component),N=function(e,t,o,n){var i,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(r=(s<3?i(r):s>3?i(t,o,r):i(t,o))||r);return s>3&&r&&Object.defineProperty(t,o,r),r},I=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.gridOptionsWrapper.isFunctionsPassive()?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(),s=this.columnModel.getRowGroupColumns().slice(),r=!1,l=!1,a=!1,p=t?function(e){e.isAnyFunctionActive()||(e.isAllowValue()?(i.push(e),l=!0):e.isAllowRowGroup()?(s.push(e),r=!0):e.isAllowPivot()&&(n.push(e),a=!0))}:function(e){e.isAnyFunctionActive()&&(n.indexOf(e)>=0&&(o._.removeFromArray(n,e),r=!0),i.indexOf(e)>=0&&(o._.removeFromArray(i,e),l=!0),s.indexOf(e)>=0&&(o._.removeFromArray(s,e),a=!0))};if(e.forEach(p),r){var c={type:o.Events.EVENT_COLUMN_PIVOT_CHANGE_REQUEST,columns:n,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(c)}if(a){var u={type:o.Events.EVENT_COLUMN_ROW_GROUP_CHANGE_REQUEST,columns:s,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(u)}if(l){var d={type:o.Events.EVENT_COLUMN_VALUE_CHANGE_REQUEST,columns:s,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(d)}},e.prototype.setAllPivotActive=function(e,t,o){var n=this,i=[],s=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(s),i.length>0&&this.columnModel.applyColumnState({state:i},o)},N([o.Autowired("aggFuncService")],e.prototype,"aggFuncService",void 0),N([o.Autowired("columnModel")],e.prototype,"columnModel",void 0),N([o.Autowired("gridOptionsWrapper")],e.prototype,"gridOptionsWrapper",void 0),N([o.Autowired("columnApi")],e.prototype,"columnApi",void 0),N([o.Autowired("gridApi")],e.prototype,"gridApi",void 0),N([o.Autowired("eventService")],e.prototype,"eventService",void 0),e=N([o.Bean("modelItemUtils")],e)}(),w={moduleName:o.ModuleNames.ColumnToolPanelModule,beans:[I],agStackComponents:[{componentName:"AgPrimaryColsHeader",componentClass:a},{componentName:"AgPrimaryColsList",componentClass:P},{componentName:"AgPrimaryCols",componentClass:T}],userComponents:[{componentName:"agColumnsToolPanel",componentClass:x}],dependantModules:[n.EnterpriseCoreModule,i.RowGroupingModule,s.SideBarModule]};exports.ColumnsToolPanelModule=w,exports.PrimaryColsPanel=T; |
@@ -73,3 +73,5 @@ var __extends = (this && this.__extends) || (function () { | ||
this.expandGroupsByDefault = !this.params.contractColumnSelection; | ||
this.virtualList = this.createManagedBean(new VirtualList('column-select', 'tree')); | ||
var translate = this.gridOptionsWrapper.getLocaleTextFunc(); | ||
var columnListName = translate('ariaColumnList', 'Column List'); | ||
this.virtualList = this.createManagedBean(new VirtualList('column-select', 'tree', columnListName)); | ||
this.appendChild(this.virtualList.getGui()); | ||
@@ -76,0 +78,0 @@ this.virtualList.setComponentCreator(function (item, listItemElement) { |
@@ -174,3 +174,4 @@ var __extends = (this && this.__extends) || (function () { | ||
} | ||
var checkboxReadOnly; | ||
var canBeToggled = true; | ||
var canBeDragged = true; | ||
if (isPivotMode) { | ||
@@ -182,10 +183,11 @@ // when in pivot mode, the item should be read only if: | ||
var noFunctionsAllowed = !this.column.isAnyFunctionAllowed(); | ||
checkboxReadOnly = functionsReadOnly || noFunctionsAllowed; | ||
canBeToggled = !functionsReadOnly && !noFunctionsAllowed; | ||
} | ||
else { | ||
// when in normal mode, the checkbox is read only if visibility is locked | ||
checkboxReadOnly = !!this.column.getColDef().lockVisible; | ||
canBeToggled = !this.column.getColDef().lockVisible; | ||
canBeDragged = !this.column.getColDef().lockPosition; | ||
} | ||
this.cbSelect.setReadOnly(checkboxReadOnly); | ||
_.addOrRemoveCssClass(this.getGui(), 'ag-column-select-column-readonly', checkboxReadOnly); | ||
this.cbSelect.setReadOnly(!canBeToggled); | ||
_.addOrRemoveCssClass(this.eDragHandle, 'ag-column-select-column-readonly', !canBeDragged); | ||
_.addOrRemoveCssClass(this.getGui(), 'ag-column-select-column-readonly', !canBeDragged && !canBeToggled); | ||
var checkboxPassive = isPivotMode && this.gridOptionsWrapper.isFunctionsPassive(); | ||
@@ -192,0 +194,0 @@ this.cbSelect.setPassive(checkboxPassive); |
{ | ||
"name": "@ag-grid-enterprise/column-tool-panel", | ||
"version": "26.1.0", | ||
"version": "26.2.0", | ||
"description": "Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components", | ||
@@ -45,6 +45,6 @@ "main": "./dist/cjs/main.js", | ||
"dependencies": { | ||
"@ag-grid-community/core": "~26.1.0", | ||
"@ag-grid-enterprise/core": "~26.1.0", | ||
"@ag-grid-enterprise/row-grouping": "~26.1.0", | ||
"@ag-grid-enterprise/side-bar": "~26.1.0" | ||
"@ag-grid-community/core": "~26.2.0", | ||
"@ag-grid-enterprise/core": "~26.2.0", | ||
"@ag-grid-enterprise/row-grouping": "~26.2.0", | ||
"@ag-grid-enterprise/side-bar": "~26.2.0" | ||
}, | ||
@@ -51,0 +51,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3990447
61514
1
+ Added@ag-grid-community/core@26.2.1(transitive)
+ Added@ag-grid-enterprise/core@26.2.0(transitive)
+ Added@ag-grid-enterprise/row-grouping@26.2.0(transitive)
+ Added@ag-grid-enterprise/side-bar@26.2.0(transitive)
- Removed@ag-grid-community/core@26.1.0(transitive)
- Removed@ag-grid-enterprise/core@26.1.0(transitive)
- Removed@ag-grid-enterprise/row-grouping@26.1.0(transitive)
- Removed@ag-grid-enterprise/side-bar@26.1.0(transitive)