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

@ag-grid-enterprise/menu

Package Overview
Dependencies
Maintainers
3
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ag-grid-enterprise/menu - npm Package Compare versions

Comparing version 27.3.0 to 28.0.0

2

dist/cjs/es5/menu/contextMenu.js

@@ -223,3 +223,3 @@ "use strict";

if (doc.activeElement === doc.body) {
this.focusService.setFocusedCell(rowIndex, column, rowPinned, true);
this.focusService.setFocusedCell({ rowIndex: rowIndex, column: column, rowPinned: rowPinned, forceBrowserFocus: true });
}

@@ -226,0 +226,0 @@ }

@@ -357,3 +357,3 @@ "use strict";

var rowIndex = focusedCell.rowIndex, rowPinned = focusedCell.rowPinned, column = focusedCell.column;
this.focusService.setFocusedCell(rowIndex, column, rowPinned, true);
this.focusService.setFocusedCell({ rowIndex: rowIndex, column: column, rowPinned: rowPinned, forceBrowserFocus: true });
}

@@ -360,0 +360,0 @@ };

@@ -201,3 +201,3 @@ "use strict";

if (doc.activeElement === doc.body) {
this.focusService.setFocusedCell(rowIndex, column, rowPinned, true);
this.focusService.setFocusedCell({ rowIndex, column, rowPinned, forceBrowserFocus: true });
}

@@ -204,0 +204,0 @@ }

@@ -332,3 +332,3 @@ "use strict";

const { rowIndex, rowPinned, column } = focusedCell;
this.focusService.setFocusedCell(rowIndex, column, rowPinned, true);
this.focusService.setFocusedCell({ rowIndex, column, rowPinned, forceBrowserFocus: true });
}

@@ -335,0 +335,0 @@ }

@@ -221,3 +221,3 @@ var __extends = (this && this.__extends) || (function () {

if (doc.activeElement === doc.body) {
this.focusService.setFocusedCell(rowIndex, column, rowPinned, true);
this.focusService.setFocusedCell({ rowIndex: rowIndex, column: column, rowPinned: rowPinned, forceBrowserFocus: true });
}

@@ -224,0 +224,0 @@ }

@@ -355,3 +355,3 @@ var __extends = (this && this.__extends) || (function () {

var rowIndex = focusedCell.rowIndex, rowPinned = focusedCell.rowPinned, column = focusedCell.column;
this.focusService.setFocusedCell(rowIndex, column, rowPinned, true);
this.focusService.setFocusedCell({ rowIndex: rowIndex, column: column, rowPinned: rowPinned, forceBrowserFocus: true });
}

@@ -358,0 +358,0 @@ };

@@ -199,3 +199,3 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

if (doc.activeElement === doc.body) {
this.focusService.setFocusedCell(rowIndex, column, rowPinned, true);
this.focusService.setFocusedCell({ rowIndex, column, rowPinned, forceBrowserFocus: true });
}

@@ -202,0 +202,0 @@ }

@@ -330,3 +330,3 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

const { rowIndex, rowPinned, column } = focusedCell;
this.focusService.setFocusedCell(rowIndex, column, rowPinned, true);
this.focusService.setFocusedCell({ rowIndex, column, rowPinned, forceBrowserFocus: true });
}

@@ -333,0 +333,0 @@ }

/**
* @ag-grid-enterprise/menu - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v27.3.0
* @ag-grid-enterprise/menu - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v28.0.0
* @link https://www.ag-grid.com/

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

var __extends = (undefined && undefined.__extends) || (function () {
var __extends$2 = (undefined && undefined.__extends) || (function () {
var extendStatics = function (d, b) {

@@ -28,3 +28,3 @@ extendStatics = Object.setPrototypeOf ||

})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

@@ -36,3 +36,3 @@ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);

var EnterpriseMenuFactory = /** @class */ (function (_super) {
__extends(EnterpriseMenuFactory, _super);
__extends$2(EnterpriseMenuFactory, _super);
function EnterpriseMenuFactory() {

@@ -152,12 +152,12 @@ return _super !== null && _super.apply(this, arguments) || this;

};
__decorate([
__decorate$2([
core.Autowired('popupService')
], EnterpriseMenuFactory.prototype, "popupService", void 0);
__decorate([
__decorate$2([
core.Autowired('focusService')
], EnterpriseMenuFactory.prototype, "focusService", void 0);
__decorate([
__decorate$2([
core.Autowired('ctrlsService')
], EnterpriseMenuFactory.prototype, "ctrlsService", void 0);
EnterpriseMenuFactory = __decorate([
EnterpriseMenuFactory = __decorate$2([
core.Bean('menuFactory')

@@ -168,3 +168,3 @@ ], EnterpriseMenuFactory);

var EnterpriseMenu = /** @class */ (function (_super) {
__extends(EnterpriseMenu, _super);
__extends$2(EnterpriseMenu, _super);
function EnterpriseMenu(column, initialSelection, restrictTo) {

@@ -370,3 +370,3 @@ var _this = _super.call(this) || this;

var rowIndex = focusedCell.rowIndex, rowPinned = focusedCell.rowPinned, column = focusedCell.column;
this.focusService.setFocusedCell(rowIndex, column, rowPinned, true);
this.focusService.setFocusedCell({ rowIndex: rowIndex, column: column, rowPinned: rowPinned, forceBrowserFocus: true });
}

@@ -455,24 +455,24 @@ };

EnterpriseMenu.MENU_ITEM_SEPARATOR = 'separator';
__decorate([
__decorate$2([
core.Autowired('columnModel')
], EnterpriseMenu.prototype, "columnModel", void 0);
__decorate([
__decorate$2([
core.Autowired('filterManager')
], EnterpriseMenu.prototype, "filterManager", void 0);
__decorate([
__decorate$2([
core.Autowired('gridApi')
], EnterpriseMenu.prototype, "gridApi", void 0);
__decorate([
__decorate$2([
core.Autowired('columnApi')
], EnterpriseMenu.prototype, "columnApi", void 0);
__decorate([
__decorate$2([
core.Autowired('menuItemMapper')
], EnterpriseMenu.prototype, "menuItemMapper", void 0);
__decorate([
__decorate$2([
core.Autowired('rowModel')
], EnterpriseMenu.prototype, "rowModel", void 0);
__decorate([
__decorate$2([
core.Autowired('focusService')
], EnterpriseMenu.prototype, "focusService", void 0);
__decorate([
__decorate$2([
core.PostConstruct

@@ -701,3 +701,3 @@ ], EnterpriseMenu.prototype, "init", null);

if (doc.activeElement === doc.body) {
this.focusService.setFocusedCell(rowIndex, column, rowPinned, true);
this.focusService.setFocusedCell({ rowIndex: rowIndex, column: column, rowPinned: rowPinned, forceBrowserFocus: true });
}

@@ -725,3 +725,3 @@ }

var __extends$2 = (undefined && undefined.__extends) || (function () {
var __extends = (undefined && undefined.__extends) || (function () {
var extendStatics = function (d, b) {

@@ -739,3 +739,3 @@ extendStatics = Object.setPrototypeOf ||

})();
var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

@@ -747,3 +747,3 @@ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);

var MenuItemMapper = /** @class */ (function (_super) {
__extends$2(MenuItemMapper, _super);
__extends(MenuItemMapper, _super);
function MenuItemMapper() {

@@ -1138,18 +1138,18 @@ return _super !== null && _super.apply(this, arguments) || this;

};
__decorate$2([
__decorate([
core.Autowired('columnModel')
], MenuItemMapper.prototype, "columnModel", void 0);
__decorate$2([
__decorate([
core.Autowired('gridApi')
], MenuItemMapper.prototype, "gridApi", void 0);
__decorate$2([
__decorate([
core.Optional('clipboardService')
], MenuItemMapper.prototype, "clipboardService", void 0);
__decorate$2([
__decorate([
core.Optional('aggFuncService')
], MenuItemMapper.prototype, "aggFuncService", void 0);
__decorate$2([
__decorate([
core.Optional('chartService')
], MenuItemMapper.prototype, "chartService", void 0);
MenuItemMapper = __decorate$2([
MenuItemMapper = __decorate([
core.Bean('menuItemMapper')

@@ -1156,0 +1156,0 @@ ], MenuItemMapper);

/**
* @ag-grid-enterprise/menu - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v27.3.0
* @ag-grid-enterprise/menu - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v28.0.0
* @link https://www.ag-grid.com/

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

/**
* @ag-grid-enterprise/menu - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v27.3.0
* @ag-grid-enterprise/menu - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v28.0.0
* @link https://www.ag-grid.com/
* @license Commercial
*/
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("@ag-grid-community/core"),r=require("@ag-grid-enterprise/core"),n=require("@ag-grid-enterprise/column-tool-panel"),o=(e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)},function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}),i=function(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},a=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return o(r,e),r.prototype.hideActiveMenu=function(){this.destroyBean(this.activeMenu)},r.prototype.showMenuAfterMouseEvent=function(e,t,r){var n=this;this.showMenu(e,(function(o){var i=o.getGui();n.popupService.positionPopupUnderMouseEvent({type:"columnMenu",column:e,mouseEvent:t,ePopup:i}),r&&o.showTab(r)}),"columnMenu",r,void 0,t.target)},r.prototype.showMenuAfterButtonClick=function(e,t,r,n,o){var i=this,a=-1,u="left";this.gridOptionsWrapper.isEnableRtl()&&(a=1,u="right"),this.showMenu(e,(function(o){var s=o.getGui();i.popupService.positionPopupUnderComponent({type:r,column:e,eventSource:t,ePopup:s,alignSide:u,nudgeX:9*a,nudgeY:-23,keepWithinBounds:!0}),n&&o.showTab(n)}),r,n,o,t)},r.prototype.showMenu=function(e,r,n,o,i,a){var s=this,c=this.createBean(new u(e,this.lastSelectedTab,i)),l=c.getGui(),p=a||this.ctrlsService.getGridBodyCtrl().getGui(),d=[];d.push((function(r){if(s.destroyBean(c),e.setMenuVisible(!1,"contextMenu"),r instanceof KeyboardEvent&&a&&t._.isVisible(a)){var n=s.focusService.findTabbableParent(a);n&&n.focus()}}));var m=this.gridOptionsWrapper.getLocaleTextFunc(),h=this.popupService.addPopup({modal:!0,eChild:l,closeOnEsc:!0,closedCallback:function(e){d.forEach((function(t){return t(e)}))},afterGuiAttached:function(e){return c.afterGuiAttached(Object.assign({},{container:n},e))},positionCallback:function(){return r(c)},anchorToElement:p,ariaLabel:m("ariaLabelColumnMenu","Column Menu")});if(h){var g=h.stopAnchoringPromise;g&&g.then((function(r){e.addEventListener(t.Column.EVENT_LEFT_CHANGED,r),e.addEventListener(t.Column.EVENT_VISIBLE_CHANGED,r),d.push((function(){e.removeEventListener(t.Column.EVENT_LEFT_CHANGED,r),e.removeEventListener(t.Column.EVENT_VISIBLE_CHANGED,r)}))}))}o||(c.showTabBasedOnPreviousSelection(),r(c)),c.addEventListener(u.EVENT_TAB_SELECTED,(function(e){s.lastSelectedTab=e.key})),e.setMenuVisible(!0,"contextMenu"),this.activeMenu=c,c.addEventListener(t.BeanStub.EVENT_DESTROYED,(function(){s.activeMenu===c&&(s.activeMenu=null)}))},r.prototype.isMenuEnabled=function(e){return e.getMenuTabs(u.TABS_DEFAULT).length>0},i([t.Autowired("popupService")],r.prototype,"popupService",void 0),i([t.Autowired("focusService")],r.prototype,"focusService",void 0),i([t.Autowired("ctrlsService")],r.prototype,"ctrlsService",void 0),r=i([t.Bean("menuFactory")],r)}(t.BeanStub),u=function(e){function r(t,n,o){var i=e.call(this)||this;return i.tabFactories={},i.includeChecks={},i.column=t,i.initialSelection=n,i.tabFactories[r.TAB_GENERAL]=i.createMainPanel.bind(i),i.tabFactories[r.TAB_FILTER]=i.createFilterPanel.bind(i),i.tabFactories[r.TAB_COLUMNS]=i.createColumnsPanel.bind(i),i.includeChecks[r.TAB_GENERAL]=function(){return!0},i.includeChecks[r.TAB_FILTER]=function(){return t.isFilterAllowed()},i.includeChecks[r.TAB_COLUMNS]=function(){return!0},i.restrictTo=o,i}return o(r,e),r.prototype.init=function(){var e=this,r=this.getTabsToCreate().map((function(t){return e.createTab(t)}));this.tabbedLayout=new t.TabbedLayout({items:r,cssClass:"ag-menu",onActiveItemClicked:this.onHidePopup.bind(this),onItemClicked:this.onTabItemClicked.bind(this)}),this.createBean(this.tabbedLayout),this.mainMenuList&&this.mainMenuList.setParentComponent(this.tabbedLayout)},r.prototype.getTabsToCreate=function(){var e=this;return this.restrictTo?this.restrictTo:this.column.getMenuTabs(r.TABS_DEFAULT).filter((function(t){return e.isValidMenuTabItem(t)})).filter((function(t){return e.isNotSuppressed(t)})).filter((function(t){return e.isModuleLoaded(t)}))},r.prototype.isModuleLoaded=function(e){return e!==r.TAB_COLUMNS||t.ModuleRegistry.isRegistered(t.ModuleNames.ColumnToolPanelModule)},r.prototype.isValidMenuTabItem=function(e){var t=!0,n=r.TABS_DEFAULT;return null!=this.restrictTo&&(t=this.restrictTo.indexOf(e)>-1,n=this.restrictTo),(t=t&&r.TABS_DEFAULT.indexOf(e)>-1)||console.warn("AG Grid: Trying to render an invalid menu item '"+e+"'. Check that your 'menuTabs' contains one of ["+n+"]"),t},r.prototype.isNotSuppressed=function(e){return this.includeChecks[e]()},r.prototype.createTab=function(e){return this.tabFactories[e]()},r.prototype.showTabBasedOnPreviousSelection=function(){this.showTab(this.initialSelection)},r.prototype.showTab=function(e){this.tabItemColumns&&e===r.TAB_COLUMNS?this.tabbedLayout.showItem(this.tabItemColumns):this.tabItemFilter&&e===r.TAB_FILTER?this.tabbedLayout.showItem(this.tabItemFilter):this.tabItemGeneral&&e===r.TAB_GENERAL?this.tabbedLayout.showItem(this.tabItemGeneral):this.tabbedLayout.showFirstItem()},r.prototype.onTabItemClicked=function(e){var t=null;switch(e.item){case this.tabItemColumns:t=r.TAB_COLUMNS;break;case this.tabItemFilter:t=r.TAB_FILTER;break;case this.tabItemGeneral:t=r.TAB_GENERAL}t&&this.activateTab(t)},r.prototype.activateTab=function(e){var t={type:r.EVENT_TAB_SELECTED,key:e};this.dispatchEvent(t)},r.prototype.getMenuItems=function(){var e,n=this.getDefaultMenuOptions(),o=this.gridOptionsWrapper.getMainMenuItemsFunc();return e=o?o({column:this.column,defaultItems:n}):n,t._.removeRepeatsFromArray(e,r.MENU_ITEM_SEPARATOR),e},r.prototype.getDefaultMenuOptions=function(){var e=[],n=!this.column.getColDef().lockPinned,o=this.columnModel.getRowGroupColumns().length,i=o>0,a=this.columnModel.getRowGroupColumns().indexOf(this.column)>=0,u=this.column.isAllowValue(),s=this.column.isAllowRowGroup(),c=this.column.isPrimary(),l=this.columnModel.isPivotMode(),p=this.rowModel.getType()===t.Constants.ROW_MODEL_TYPE_CLIENT_SIDE,d=this.gridOptionsWrapper.isTreeData(),m=c&&i&&u||!c;return n&&e.push("pinSubMenu"),m&&e.push("valueAggSubMenu"),(n||m)&&e.push(r.MENU_ITEM_SEPARATOR),e.push("autoSizeThis"),e.push("autoSizeAll"),e.push(r.MENU_ITEM_SEPARATOR),s&&this.column.isPrimary()&&(a?e.push("rowUnGroup"):e.push("rowGroup")),e.push(r.MENU_ITEM_SEPARATOR),e.push("resetColumns"),p&&(d||o>(l?1:0))&&(e.push("expandAll"),e.push("contractAll")),e},r.prototype.createMainPanel=function(){this.mainMenuList=this.createManagedBean(new t.AgMenuList);var e=this.getMenuItems(),n=this.menuItemMapper.mapWithStockItems(e,this.column);return this.mainMenuList.addMenuItems(n),this.mainMenuList.addEventListener(t.AgMenuItemComponent.EVENT_MENU_ITEM_SELECTED,this.onHidePopup.bind(this)),this.tabItemGeneral={title:t._.createIconNoSpan("menu",this.gridOptionsWrapper,this.column),titleLabel:r.TAB_GENERAL.replace("MenuTab",""),bodyPromise:t.AgPromise.resolve(this.mainMenuList.getGui()),name:r.TAB_GENERAL},this.tabItemGeneral},r.prototype.onHidePopup=function(e){var t;e&&e.event&&e.event instanceof KeyboardEvent&&(t=e.event),this.hidePopupFunc(t&&{keyboardEvent:t});var r=this.focusService.getFocusedCell(),n=this.gridOptionsWrapper.getDocument();if(n.activeElement===n.body&&r){var o=r.rowIndex,i=r.rowPinned,a=r.column;this.focusService.setFocusedCell(o,a,i,!0)}},r.prototype.createFilterPanel=function(){var e,n=this.filterManager.getOrCreateFilterWrapper(this.column,"COLUMN_MENU");if(!n)throw new Error("AG Grid - Unable to instantiate filter");return this.tabItemFilter={title:t._.createIconNoSpan("filter",this.gridOptionsWrapper,this.column),titleLabel:r.TAB_FILTER.replace("MenuTab",""),bodyPromise:null===(e=n)||void 0===e?void 0:e.guiPromise,afterAttachedCallback:function(e){var t;(null===(t=n)||void 0===t?void 0:t.filterPromise)&&n.filterPromise.then((function(t){t&&t.afterGuiAttached&&t.afterGuiAttached(e)}))},name:r.TAB_FILTER},this.tabItemFilter},r.prototype.createColumnsPanel=function(){var e=document.createElement("div");e.classList.add("ag-menu-column-select-wrapper"),this.columnSelectPanel=this.createManagedBean(new n.PrimaryColsPanel);var o=this.column.getColDef().columnsMenuParams;o||(o={}),this.columnSelectPanel.init(!1,{suppressColumnMove:!1,suppressValues:!1,suppressPivots:!1,suppressRowGroups:!1,suppressPivotMode:!1,contractColumnSelection:!!o.contractColumnSelection,suppressColumnExpandAll:!!o.suppressColumnExpandAll,suppressColumnFilter:!!o.suppressColumnFilter,suppressColumnSelectAll:!!o.suppressColumnSelectAll,suppressSyncLayoutWithGrid:!!o.suppressSyncLayoutWithGrid,api:this.gridApi,columnApi:this.columnApi,context:this.gridOptionsWrapper.getContext()},"columnMenu");var i=this.columnSelectPanel.getGui();return i.classList.add("ag-menu-column-select"),e.appendChild(i),this.tabItemColumns={title:t._.createIconNoSpan("columns",this.gridOptionsWrapper,this.column),titleLabel:r.TAB_COLUMNS.replace("MenuTab",""),bodyPromise:t.AgPromise.resolve(e),name:r.TAB_COLUMNS},this.tabItemColumns},r.prototype.afterGuiAttached=function(e){var t=e.container,r=e.hidePopup;this.tabbedLayout.setAfterAttachedParams({container:t,hidePopup:r}),r&&(this.hidePopupFunc=r,this.addDestroyFunc(r))},r.prototype.getGui=function(){return this.tabbedLayout.getGui()},r.EVENT_TAB_SELECTED="tabSelected",r.TAB_FILTER="filterMenuTab",r.TAB_GENERAL="generalMenuTab",r.TAB_COLUMNS="columnsMenuTab",r.TABS_DEFAULT=[r.TAB_GENERAL,r.TAB_FILTER,r.TAB_COLUMNS],r.MENU_ITEM_SEPARATOR="separator",i([t.Autowired("columnModel")],r.prototype,"columnModel",void 0),i([t.Autowired("filterManager")],r.prototype,"filterManager",void 0),i([t.Autowired("gridApi")],r.prototype,"gridApi",void 0),i([t.Autowired("columnApi")],r.prototype,"columnApi",void 0),i([t.Autowired("menuItemMapper")],r.prototype,"menuItemMapper",void 0),i([t.Autowired("rowModel")],r.prototype,"rowModel",void 0),i([t.Autowired("focusService")],r.prototype,"focusService",void 0),i([t.PostConstruct],r.prototype,"init",null),r}(t.BeanStub),s=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),c=function(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},l=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return s(r,e),r.prototype.hideActiveMenu=function(){this.destroyBean(this.activeMenu)},r.prototype.getMenuItems=function(e,r,n){var o=[];if(t._.exists(e)&&t.ModuleRegistry.isRegistered(t.ModuleNames.ClipboardModule)&&r&&o.push("copy","copyWithHeaders","copyWithGroupHeaders","paste","separator"),this.gridOptionsWrapper.isEnableCharts()&&t.ModuleRegistry.isRegistered(t.ModuleNames.RangeSelectionModule)&&t.ModuleRegistry.isRegistered(t.ModuleNames.GridChartsModule)&&(this.columnModel.isPivotMode()&&o.push("pivotChart"),this.rangeService&&!this.rangeService.isEmpty()&&o.push("chartRange")),t._.exists(e)){var i=!t.ModuleRegistry.isRegistered(t.ModuleNames.CsvExportModule),a=!t.ModuleRegistry.isRegistered(t.ModuleNames.ExcelExportModule),u=this.gridOptionsWrapper.isSuppressExcelExport()||a,s=this.gridOptionsWrapper.isSuppressCsvExport()||i;!(t._.isIOSUserAgent()||u&&s)&&o.push("export")}if(this.gridOptionsWrapper.getContextMenuItemsFunc()){var c=this.gridOptionsWrapper.getContextMenuItemsFunc(),l={node:e,column:r,value:n,defaultItems:o.length?o:void 0};return c?c(l):void 0}return o},r.prototype.onContextMenu=function(e,t,r,n,o,i){if((this.gridOptionsWrapper.isAllowContextMenuWithControlKey()||!e||!e.ctrlKey&&!e.metaKey)&&(e&&this.blockMiddleClickScrollsIfNeeded(e),!this.gridOptionsWrapper.isSuppressContextMenu())){var a=e||t.touches[0];if(this.showMenu(r,n,o,a,i))(e||t).preventDefault()}},r.prototype.blockMiddleClickScrollsIfNeeded=function(e){var t=this.gridOptionsWrapper,r=e.which;t.isSuppressMiddleClickScrolls()&&2===r&&e.preventDefault()},r.prototype.showMenu=function(e,r,n,o,i){var a=this,u=this.getMenuItems(e,r,n),s=this.ctrlsService.getGridBodyCtrl().getGui();if(void 0===u||t._.missingOrEmpty(u))return!1;var c=new p(u);this.createBean(c);var l=c.getGui(),d={column:r,rowNode:e,type:"contextMenu",mouseEvent:o,ePopup:l,nudgeY:1},m=this.gridOptionsWrapper.getLocaleTextFunc(),h=this.popupService.addPopup({modal:!0,eChild:l,closeOnEsc:!0,closedCallback:function(){s.classList.remove("ag-context-menu-open"),a.destroyBean(c)},click:o,positionCallback:function(){a.popupService.positionPopupUnderMouseEvent(Object.assign({},{nudgeX:a.gridOptionsWrapper.isEnableRtl()?-1*(l.offsetWidth+1):1},d))},anchorToElement:i,ariaLabel:m("ariaLabelContextMenu","Context Menu")});return h&&(s.classList.add("ag-context-menu-open"),c.afterGuiAttached({container:"contextMenu",hidePopup:h.hideFunc})),this.activeMenu&&this.hideActiveMenu(),this.activeMenu=c,c.addEventListener(t.BeanStub.EVENT_DESTROYED,(function(){a.activeMenu===c&&(a.activeMenu=null)})),h&&c.addEventListener(t.AgMenuItemComponent.EVENT_MENU_ITEM_SELECTED,h.hideFunc),!0},c([t.Autowired("popupService")],r.prototype,"popupService",void 0),c([t.Optional("rangeService")],r.prototype,"rangeService",void 0),c([t.Autowired("ctrlsService")],r.prototype,"ctrlsService",void 0),c([t.Autowired("columnModel")],r.prototype,"columnModel",void 0),r=c([t.Bean("contextMenuFactory")],r)}(t.BeanStub),p=function(e){function r(t){var r=e.call(this,'<div class="ag-menu" role="presentation"></div>')||this;return r.menuList=null,r.focusedCell=null,r.menuItems=t,r}return s(r,e),r.prototype.addMenuItems=function(){var e=this,r=this.createBean(new t.AgMenuList),n=this.menuItemMapper.mapWithStockItems(this.menuItems,null);r.addMenuItems(n),this.appendChild(r),this.menuList=r,r.addEventListener(t.AgMenuItemComponent.EVENT_MENU_ITEM_SELECTED,(function(t){return e.dispatchEvent(t)}))},r.prototype.afterGuiAttached=function(e){e.hidePopup&&this.addDestroyFunc(e.hidePopup),this.focusedCell=this.focusService.getFocusedCell(),this.menuList&&this.focusService.focusInto(this.menuList.getGui())},r.prototype.restoreFocusedCell=function(){var e=this.focusService.getFocusedCell();if(e&&this.focusedCell&&this.cellPositionUtils.equals(e,this.focusedCell)){var t=this.focusedCell,r=t.rowIndex,n=t.rowPinned,o=t.column,i=this.gridOptionsWrapper.getDocument();i.activeElement===i.body&&this.focusService.setFocusedCell(r,o,n,!0)}},r.prototype.destroy=function(){this.restoreFocusedCell(),e.prototype.destroy.call(this)},c([t.Autowired("menuItemMapper")],r.prototype,"menuItemMapper",void 0),c([t.Autowired("focusService")],r.prototype,"focusService",void 0),c([t.Autowired("cellPositionUtils")],r.prototype,"cellPositionUtils",void 0),c([t.PostConstruct],r.prototype,"addMenuItems",null),r}(t.Component),d=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),m=function(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},h=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return d(r,e),r.prototype.mapWithStockItems=function(e,t){var r=this;if(!e)return[];var n=[];return e.forEach((function(e){var o;if(o="string"==typeof e?r.getStockMenuItem(e,t):e){var i=o,a=i.subMenu;a&&a instanceof Array&&(i.subMenu=r.mapWithStockItems(i.subMenu,t)),null!=o&&n.push(o)}})),n},r.prototype.getStockMenuItem=function(e,r){var n=this,o=this.gridOptionsWrapper.getLocaleTextFunc(),i=this.gridOptionsWrapper.isSkipHeaderOnAutoSize();switch(e){case"pinSubMenu":return{name:o("pinColumn","Pin Column"),icon:t._.createIconNoSpan("menuPin",this.gridOptionsWrapper,null),subMenu:["pinLeft","pinRight","clearPinned"]};case"pinLeft":return{name:o("pinLeft","Pin Left"),action:function(){return n.columnModel.setColumnPinned(r,t.Constants.PINNED_LEFT,"contextMenu")},checked:!!r&&r.isPinnedLeft()};case"pinRight":return{name:o("pinRight","Pin Right"),action:function(){return n.columnModel.setColumnPinned(r,t.Constants.PINNED_RIGHT,"contextMenu")},checked:!!r&&r.isPinnedRight()};case"clearPinned":return{name:o("noPin","No Pin"),action:function(){return n.columnModel.setColumnPinned(r,null,"contextMenu")},checked:!!r&&!r.isPinned()};case"valueAggSubMenu":return t.ModuleRegistry.assertRegistered(t.ModuleNames.RowGroupingModule,"Aggregation from Menu")?{name:o("valueAggregation","Value Aggregation"),icon:t._.createIconNoSpan("menuValue",this.gridOptionsWrapper,null),subMenu:this.createAggregationSubMenu(r)}:null;case"autoSizeThis":return{name:o("autosizeThiscolumn","Autosize This Column"),action:function(){return n.columnModel.autoSizeColumn(r,i,"contextMenu")}};case"autoSizeAll":return{name:o("autosizeAllColumns","Autosize All Columns"),action:function(){return n.columnModel.autoSizeAllColumns(i,"contextMenu")}};case"rowGroup":return{name:o("groupBy","Group by")+" "+t._.escapeString(this.columnModel.getDisplayNameForColumn(r,"header")),action:function(){return n.columnModel.addRowGroupColumn(r,"contextMenu")},icon:t._.createIconNoSpan("menuAddRowGroup",this.gridOptionsWrapper,null)};case"rowUnGroup":return{name:o("ungroupBy","Un-Group by")+" "+t._.escapeString(this.columnModel.getDisplayNameForColumn(r,"header")),action:function(){return n.columnModel.removeRowGroupColumn(r,"contextMenu")},icon:t._.createIconNoSpan("menuRemoveRowGroup",this.gridOptionsWrapper,null)};case"resetColumns":return{name:o("resetColumns","Reset Columns"),action:function(){return n.columnModel.resetColumnState("contextMenu")}};case"expandAll":return{name:o("expandAll","Expand All"),action:function(){return n.gridApi.expandAll()}};case"contractAll":return{name:o("collapseAll","Collapse All"),action:function(){return n.gridApi.collapseAll()}};case"copy":return t.ModuleRegistry.assertRegistered(t.ModuleNames.ClipboardModule,"Copy from Menu")?{name:o("copy","Copy"),shortcut:o("ctrlC","Ctrl+C"),icon:t._.createIconNoSpan("clipboardCopy",this.gridOptionsWrapper,null),action:function(){return n.clipboardService.copyToClipboard()}}:null;case"copyWithHeaders":return t.ModuleRegistry.assertRegistered(t.ModuleNames.ClipboardModule,"Copy with Headers from Menu")?{name:o("copyWithHeaders","Copy with Headers"),icon:t._.createIconNoSpan("clipboardCopy",this.gridOptionsWrapper,null),action:function(){return n.clipboardService.copyToClipboard({includeHeaders:!0})}}:null;case"copyWithGroupHeaders":return t.ModuleRegistry.assertRegistered(t.ModuleNames.ClipboardModule,"Copy with Group Headers from Menu")?{name:o("copyWithGroupHeaders","Copy with Group Headers"),icon:t._.createIconNoSpan("clipboardCopy",this.gridOptionsWrapper,null),action:function(){return n.clipboardService.copyToClipboard({includeHeaders:!0,includeGroupHeaders:!0})}}:null;case"paste":return t.ModuleRegistry.assertRegistered(t.ModuleNames.ClipboardModule,"Paste from Clipboard")?{name:o("paste","Paste"),shortcut:o("ctrlV","Ctrl+V"),disabled:!0,icon:t._.createIconNoSpan("clipboardPaste",this.gridOptionsWrapper,null),action:function(){return n.clipboardService.pasteFromClipboard()}}:null;case"export":var a=[],u=t.ModuleRegistry.isRegistered(t.ModuleNames.CsvExportModule),s=t.ModuleRegistry.isRegistered(t.ModuleNames.ExcelExportModule);return!this.gridOptionsWrapper.isSuppressCsvExport()&&u&&a.push("csvExport"),!this.gridOptionsWrapper.isSuppressExcelExport()&&s&&a.push("excelExport"),{name:o("export","Export"),subMenu:a,icon:t._.createIconNoSpan("save",this.gridOptionsWrapper,null)};case"csvExport":return{name:o("csvExport","CSV Export"),icon:t._.createIconNoSpan("csvExport",this.gridOptionsWrapper,null),action:function(){return n.gridApi.exportDataAsCsv({})}};case"excelExport":return{name:o("excelExport","Excel Export"),icon:t._.createIconNoSpan("excelExport",this.gridOptionsWrapper,null),action:function(){return n.gridApi.exportDataAsExcel()}};case"separator":return"separator";default:var c=this.getChartItems(e);return c||(console.warn("AG Grid: unknown menu item type "+e),null)}},r.prototype.getChartItems=function(e){var r=this,n=this.gridOptionsWrapper.getLocaleTextFunc(),o=function(e,t,o){return{name:n(e,t),action:function(){return r.chartService.createPivotChart({chartType:o})}}},i=function(e,t,o){return{name:n(e,t),action:function(){return r.chartService.createChartFromCurrentRange(o)}}};switch(e){case"pivotChart":return{name:n("pivotChart","Pivot Chart"),subMenu:["pivotColumnChart","pivotBarChart","pivotPieChart","pivotLineChart","pivotXYChart","pivotAreaChart"],icon:t._.createIconNoSpan("chart",this.gridOptionsWrapper,null)};case"chartRange":return{name:n("chartRange","Chart Range"),subMenu:["rangeColumnChart","rangeBarChart","rangePieChart","rangeLineChart","rangeXYChart","rangeAreaChart","rangeHistogramChart","rangeCombinationChart"],icon:t._.createIconNoSpan("chart",this.gridOptionsWrapper,null)};case"pivotColumnChart":return{name:n("columnChart","Column"),subMenu:["pivotGroupedColumn","pivotStackedColumn","pivotNormalizedColumn"]};case"pivotGroupedColumn":return o("groupedColumn","Grouped&lrm;","groupedColumn");case"pivotStackedColumn":return o("stackedColumn","Stacked&lrm;","stackedColumn");case"pivotNormalizedColumn":return o("normalizedColumn","100% Stacked&lrm;","normalizedColumn");case"rangeColumnChart":return{name:n("columnChart","Column"),subMenu:["rangeGroupedColumn","rangeStackedColumn","rangeNormalizedColumn"]};case"rangeGroupedColumn":return i("groupedColumn","Grouped&lrm;","groupedColumn");case"rangeStackedColumn":return i("stackedColumn","Stacked&lrm;","stackedColumn");case"rangeNormalizedColumn":return i("normalizedColumn","100% Stacked&lrm;","normalizedColumn");case"pivotBarChart":return{name:n("barChart","Bar"),subMenu:["pivotGroupedBar","pivotStackedBar","pivotNormalizedBar"]};case"pivotGroupedBar":return o("groupedBar","Grouped&lrm;","groupedBar");case"pivotStackedBar":return o("stackedBar","Stacked&lrm;","stackedBar");case"pivotNormalizedBar":return o("normalizedBar","100% Stacked&lrm;","normalizedBar");case"rangeBarChart":return{name:n("barChart","Bar"),subMenu:["rangeGroupedBar","rangeStackedBar","rangeNormalizedBar"]};case"rangeGroupedBar":return i("groupedBar","Grouped&lrm;","groupedBar");case"rangeStackedBar":return i("stackedBar","Stacked&lrm;","stackedBar");case"rangeNormalizedBar":return i("normalizedBar","100% Stacked&lrm;","normalizedBar");case"pivotPieChart":return{name:n("pieChart","Pie"),subMenu:["pivotPie","pivotDoughnut"]};case"pivotPie":return o("pie","Pie&lrm;","pie");case"pivotDoughnut":return o("doughnut","Doughnut&lrm;","doughnut");case"rangePieChart":return{name:n("pieChart","Pie"),subMenu:["rangePie","rangeDoughnut"]};case"rangePie":return i("pie","Pie&lrm;","pie");case"rangeDoughnut":return i("doughnut","Doughnut&lrm;","doughnut");case"pivotLineChart":return o("line","Line&lrm;","line");case"rangeLineChart":return i("line","Line&lrm;","line");case"pivotXYChart":return{name:n("xyChart","X Y (Scatter)"),subMenu:["pivotScatter","pivotBubble"]};case"pivotScatter":return o("scatter","Scatter&lrm;","scatter");case"pivotBubble":return o("bubble","Bubble&lrm;","bubble");case"rangeXYChart":return{name:n("xyChart","X Y (Scatter)"),subMenu:["rangeScatter","rangeBubble"]};case"rangeScatter":return i("scatter","Scatter&lrm;","scatter");case"rangeBubble":return i("bubble","Bubble&lrm;","bubble");case"pivotAreaChart":return{name:n("areaChart","Area"),subMenu:["pivotArea","pivotStackedArea","pivotNormalizedArea"]};case"pivotArea":return o("area","Area&lrm;","area");case"pivotStackedArea":return o("stackedArea","Stacked&lrm;","stackedArea");case"pivotNormalizedArea":return o("normalizedArea","100% Stacked&lrm;","normalizedArea");case"rangeAreaChart":return{name:n("areaChart","Area"),subMenu:["rangeArea","rangeStackedArea","rangeNormalizedArea"]};case"rangeArea":return i("area","Area&lrm;","area");case"rangeStackedArea":return i("stackedArea","Stacked&lrm;","stackedArea");case"rangeNormalizedArea":return i("normalizedArea","100% Stacked&lrm;","normalizedArea");case"rangeHistogramChart":return i("histogramChart","Histogram&lrm;","histogram");case"rangeColumnLineCombo":return i("columnLineCombo","Column & Line&lrm;","columnLineCombo");case"rangeAreaColumnCombo":return i("AreaColumnCombo","Area & Column&lrm;","areaColumnCombo");case"rangeCombinationChart":return{name:n("combinationChart","Combination"),subMenu:["rangeColumnLineCombo","rangeAreaColumnCombo"]};default:return null}},r.prototype.createAggregationSubMenu=function(e){var r,n=this,o=this.gridOptionsWrapper.getLocaleTextFunc(),i=e.isValueActive(),a=this.aggFuncService.getFuncNames(e);if(e.isPrimary())r=e;else{var u=e.getColDef().pivotValueColumn;r=t._.exists(u)?u:void 0}var s=[];return a.forEach((function(e){s.push({name:o(e,e),action:function(){n.columnModel.setColumnAggFunc(r,e,"contextMenu"),n.columnModel.addValueColumn(r,"contextMenu")},checked:i&&r.getAggFunc()===e})})),s},m([t.Autowired("columnModel")],r.prototype,"columnModel",void 0),m([t.Autowired("gridApi")],r.prototype,"gridApi",void 0),m([t.Optional("clipboardService")],r.prototype,"clipboardService",void 0),m([t.Optional("aggFuncService")],r.prototype,"aggFuncService",void 0),m([t.Optional("chartService")],r.prototype,"chartService",void 0),r=m([t.Bean("menuItemMapper")],r)}(t.BeanStub),g={moduleName:t.ModuleNames.MenuModule,beans:[a,l,h],dependantModules:[r.EnterpriseCoreModule]};exports.MenuModule=g;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("@ag-grid-community/core"),r=require("@ag-grid-enterprise/core"),n=require("@ag-grid-enterprise/column-tool-panel"),o=(e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)},function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}),i=function(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},a=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return o(r,e),r.prototype.hideActiveMenu=function(){this.destroyBean(this.activeMenu)},r.prototype.showMenuAfterMouseEvent=function(e,t,r){var n=this;this.showMenu(e,(function(o){var i=o.getGui();n.popupService.positionPopupUnderMouseEvent({type:"columnMenu",column:e,mouseEvent:t,ePopup:i}),r&&o.showTab(r)}),"columnMenu",r,void 0,t.target)},r.prototype.showMenuAfterButtonClick=function(e,t,r,n,o){var i=this,a=-1,u="left";this.gridOptionsWrapper.isEnableRtl()&&(a=1,u="right"),this.showMenu(e,(function(o){var s=o.getGui();i.popupService.positionPopupUnderComponent({type:r,column:e,eventSource:t,ePopup:s,alignSide:u,nudgeX:9*a,nudgeY:-23,keepWithinBounds:!0}),n&&o.showTab(n)}),r,n,o,t)},r.prototype.showMenu=function(e,r,n,o,i,a){var s=this,c=this.createBean(new u(e,this.lastSelectedTab,i)),l=c.getGui(),p=a||this.ctrlsService.getGridBodyCtrl().getGui(),d=[];d.push((function(r){if(s.destroyBean(c),e.setMenuVisible(!1,"contextMenu"),r instanceof KeyboardEvent&&a&&t._.isVisible(a)){var n=s.focusService.findTabbableParent(a);n&&n.focus()}}));var m=this.gridOptionsWrapper.getLocaleTextFunc(),h=this.popupService.addPopup({modal:!0,eChild:l,closeOnEsc:!0,closedCallback:function(e){d.forEach((function(t){return t(e)}))},afterGuiAttached:function(e){return c.afterGuiAttached(Object.assign({},{container:n},e))},positionCallback:function(){return r(c)},anchorToElement:p,ariaLabel:m("ariaLabelColumnMenu","Column Menu")});if(h){var g=h.stopAnchoringPromise;g&&g.then((function(r){e.addEventListener(t.Column.EVENT_LEFT_CHANGED,r),e.addEventListener(t.Column.EVENT_VISIBLE_CHANGED,r),d.push((function(){e.removeEventListener(t.Column.EVENT_LEFT_CHANGED,r),e.removeEventListener(t.Column.EVENT_VISIBLE_CHANGED,r)}))}))}o||(c.showTabBasedOnPreviousSelection(),r(c)),c.addEventListener(u.EVENT_TAB_SELECTED,(function(e){s.lastSelectedTab=e.key})),e.setMenuVisible(!0,"contextMenu"),this.activeMenu=c,c.addEventListener(t.BeanStub.EVENT_DESTROYED,(function(){s.activeMenu===c&&(s.activeMenu=null)}))},r.prototype.isMenuEnabled=function(e){return e.getMenuTabs(u.TABS_DEFAULT).length>0},i([t.Autowired("popupService")],r.prototype,"popupService",void 0),i([t.Autowired("focusService")],r.prototype,"focusService",void 0),i([t.Autowired("ctrlsService")],r.prototype,"ctrlsService",void 0),r=i([t.Bean("menuFactory")],r)}(t.BeanStub),u=function(e){function r(t,n,o){var i=e.call(this)||this;return i.tabFactories={},i.includeChecks={},i.column=t,i.initialSelection=n,i.tabFactories[r.TAB_GENERAL]=i.createMainPanel.bind(i),i.tabFactories[r.TAB_FILTER]=i.createFilterPanel.bind(i),i.tabFactories[r.TAB_COLUMNS]=i.createColumnsPanel.bind(i),i.includeChecks[r.TAB_GENERAL]=function(){return!0},i.includeChecks[r.TAB_FILTER]=function(){return t.isFilterAllowed()},i.includeChecks[r.TAB_COLUMNS]=function(){return!0},i.restrictTo=o,i}return o(r,e),r.prototype.init=function(){var e=this,r=this.getTabsToCreate().map((function(t){return e.createTab(t)}));this.tabbedLayout=new t.TabbedLayout({items:r,cssClass:"ag-menu",onActiveItemClicked:this.onHidePopup.bind(this),onItemClicked:this.onTabItemClicked.bind(this)}),this.createBean(this.tabbedLayout),this.mainMenuList&&this.mainMenuList.setParentComponent(this.tabbedLayout)},r.prototype.getTabsToCreate=function(){var e=this;return this.restrictTo?this.restrictTo:this.column.getMenuTabs(r.TABS_DEFAULT).filter((function(t){return e.isValidMenuTabItem(t)})).filter((function(t){return e.isNotSuppressed(t)})).filter((function(t){return e.isModuleLoaded(t)}))},r.prototype.isModuleLoaded=function(e){return e!==r.TAB_COLUMNS||t.ModuleRegistry.isRegistered(t.ModuleNames.ColumnToolPanelModule)},r.prototype.isValidMenuTabItem=function(e){var t=!0,n=r.TABS_DEFAULT;return null!=this.restrictTo&&(t=this.restrictTo.indexOf(e)>-1,n=this.restrictTo),(t=t&&r.TABS_DEFAULT.indexOf(e)>-1)||console.warn("AG Grid: Trying to render an invalid menu item '"+e+"'. Check that your 'menuTabs' contains one of ["+n+"]"),t},r.prototype.isNotSuppressed=function(e){return this.includeChecks[e]()},r.prototype.createTab=function(e){return this.tabFactories[e]()},r.prototype.showTabBasedOnPreviousSelection=function(){this.showTab(this.initialSelection)},r.prototype.showTab=function(e){this.tabItemColumns&&e===r.TAB_COLUMNS?this.tabbedLayout.showItem(this.tabItemColumns):this.tabItemFilter&&e===r.TAB_FILTER?this.tabbedLayout.showItem(this.tabItemFilter):this.tabItemGeneral&&e===r.TAB_GENERAL?this.tabbedLayout.showItem(this.tabItemGeneral):this.tabbedLayout.showFirstItem()},r.prototype.onTabItemClicked=function(e){var t=null;switch(e.item){case this.tabItemColumns:t=r.TAB_COLUMNS;break;case this.tabItemFilter:t=r.TAB_FILTER;break;case this.tabItemGeneral:t=r.TAB_GENERAL}t&&this.activateTab(t)},r.prototype.activateTab=function(e){var t={type:r.EVENT_TAB_SELECTED,key:e};this.dispatchEvent(t)},r.prototype.getMenuItems=function(){var e,n=this.getDefaultMenuOptions(),o=this.gridOptionsWrapper.getMainMenuItemsFunc();return e=o?o({column:this.column,defaultItems:n}):n,t._.removeRepeatsFromArray(e,r.MENU_ITEM_SEPARATOR),e},r.prototype.getDefaultMenuOptions=function(){var e=[],n=!this.column.getColDef().lockPinned,o=this.columnModel.getRowGroupColumns().length,i=o>0,a=this.columnModel.getRowGroupColumns().indexOf(this.column)>=0,u=this.column.isAllowValue(),s=this.column.isAllowRowGroup(),c=this.column.isPrimary(),l=this.columnModel.isPivotMode(),p=this.rowModel.getType()===t.Constants.ROW_MODEL_TYPE_CLIENT_SIDE,d=this.gridOptionsWrapper.isTreeData(),m=c&&i&&u||!c;return n&&e.push("pinSubMenu"),m&&e.push("valueAggSubMenu"),(n||m)&&e.push(r.MENU_ITEM_SEPARATOR),e.push("autoSizeThis"),e.push("autoSizeAll"),e.push(r.MENU_ITEM_SEPARATOR),s&&this.column.isPrimary()&&(a?e.push("rowUnGroup"):e.push("rowGroup")),e.push(r.MENU_ITEM_SEPARATOR),e.push("resetColumns"),p&&(d||o>(l?1:0))&&(e.push("expandAll"),e.push("contractAll")),e},r.prototype.createMainPanel=function(){this.mainMenuList=this.createManagedBean(new t.AgMenuList);var e=this.getMenuItems(),n=this.menuItemMapper.mapWithStockItems(e,this.column);return this.mainMenuList.addMenuItems(n),this.mainMenuList.addEventListener(t.AgMenuItemComponent.EVENT_MENU_ITEM_SELECTED,this.onHidePopup.bind(this)),this.tabItemGeneral={title:t._.createIconNoSpan("menu",this.gridOptionsWrapper,this.column),titleLabel:r.TAB_GENERAL.replace("MenuTab",""),bodyPromise:t.AgPromise.resolve(this.mainMenuList.getGui()),name:r.TAB_GENERAL},this.tabItemGeneral},r.prototype.onHidePopup=function(e){var t;e&&e.event&&e.event instanceof KeyboardEvent&&(t=e.event),this.hidePopupFunc(t&&{keyboardEvent:t});var r=this.focusService.getFocusedCell(),n=this.gridOptionsWrapper.getDocument();if(n.activeElement===n.body&&r){var o=r.rowIndex,i=r.rowPinned,a=r.column;this.focusService.setFocusedCell({rowIndex:o,column:a,rowPinned:i,forceBrowserFocus:!0})}},r.prototype.createFilterPanel=function(){var e,n=this.filterManager.getOrCreateFilterWrapper(this.column,"COLUMN_MENU");if(!n)throw new Error("AG Grid - Unable to instantiate filter");return this.tabItemFilter={title:t._.createIconNoSpan("filter",this.gridOptionsWrapper,this.column),titleLabel:r.TAB_FILTER.replace("MenuTab",""),bodyPromise:null===(e=n)||void 0===e?void 0:e.guiPromise,afterAttachedCallback:function(e){var t;(null===(t=n)||void 0===t?void 0:t.filterPromise)&&n.filterPromise.then((function(t){t&&t.afterGuiAttached&&t.afterGuiAttached(e)}))},name:r.TAB_FILTER},this.tabItemFilter},r.prototype.createColumnsPanel=function(){var e=document.createElement("div");e.classList.add("ag-menu-column-select-wrapper"),this.columnSelectPanel=this.createManagedBean(new n.PrimaryColsPanel);var o=this.column.getColDef().columnsMenuParams;o||(o={}),this.columnSelectPanel.init(!1,{suppressColumnMove:!1,suppressValues:!1,suppressPivots:!1,suppressRowGroups:!1,suppressPivotMode:!1,contractColumnSelection:!!o.contractColumnSelection,suppressColumnExpandAll:!!o.suppressColumnExpandAll,suppressColumnFilter:!!o.suppressColumnFilter,suppressColumnSelectAll:!!o.suppressColumnSelectAll,suppressSyncLayoutWithGrid:!!o.suppressSyncLayoutWithGrid,api:this.gridApi,columnApi:this.columnApi,context:this.gridOptionsWrapper.getContext()},"columnMenu");var i=this.columnSelectPanel.getGui();return i.classList.add("ag-menu-column-select"),e.appendChild(i),this.tabItemColumns={title:t._.createIconNoSpan("columns",this.gridOptionsWrapper,this.column),titleLabel:r.TAB_COLUMNS.replace("MenuTab",""),bodyPromise:t.AgPromise.resolve(e),name:r.TAB_COLUMNS},this.tabItemColumns},r.prototype.afterGuiAttached=function(e){var t=e.container,r=e.hidePopup;this.tabbedLayout.setAfterAttachedParams({container:t,hidePopup:r}),r&&(this.hidePopupFunc=r,this.addDestroyFunc(r))},r.prototype.getGui=function(){return this.tabbedLayout.getGui()},r.EVENT_TAB_SELECTED="tabSelected",r.TAB_FILTER="filterMenuTab",r.TAB_GENERAL="generalMenuTab",r.TAB_COLUMNS="columnsMenuTab",r.TABS_DEFAULT=[r.TAB_GENERAL,r.TAB_FILTER,r.TAB_COLUMNS],r.MENU_ITEM_SEPARATOR="separator",i([t.Autowired("columnModel")],r.prototype,"columnModel",void 0),i([t.Autowired("filterManager")],r.prototype,"filterManager",void 0),i([t.Autowired("gridApi")],r.prototype,"gridApi",void 0),i([t.Autowired("columnApi")],r.prototype,"columnApi",void 0),i([t.Autowired("menuItemMapper")],r.prototype,"menuItemMapper",void 0),i([t.Autowired("rowModel")],r.prototype,"rowModel",void 0),i([t.Autowired("focusService")],r.prototype,"focusService",void 0),i([t.PostConstruct],r.prototype,"init",null),r}(t.BeanStub),s=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),c=function(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},l=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return s(r,e),r.prototype.hideActiveMenu=function(){this.destroyBean(this.activeMenu)},r.prototype.getMenuItems=function(e,r,n){var o=[];if(t._.exists(e)&&t.ModuleRegistry.isRegistered(t.ModuleNames.ClipboardModule)&&r&&o.push("copy","copyWithHeaders","copyWithGroupHeaders","paste","separator"),this.gridOptionsWrapper.isEnableCharts()&&t.ModuleRegistry.isRegistered(t.ModuleNames.RangeSelectionModule)&&t.ModuleRegistry.isRegistered(t.ModuleNames.GridChartsModule)&&(this.columnModel.isPivotMode()&&o.push("pivotChart"),this.rangeService&&!this.rangeService.isEmpty()&&o.push("chartRange")),t._.exists(e)){var i=!t.ModuleRegistry.isRegistered(t.ModuleNames.CsvExportModule),a=!t.ModuleRegistry.isRegistered(t.ModuleNames.ExcelExportModule),u=this.gridOptionsWrapper.isSuppressExcelExport()||a,s=this.gridOptionsWrapper.isSuppressCsvExport()||i;!(t._.isIOSUserAgent()||u&&s)&&o.push("export")}if(this.gridOptionsWrapper.getContextMenuItemsFunc()){var c=this.gridOptionsWrapper.getContextMenuItemsFunc(),l={node:e,column:r,value:n,defaultItems:o.length?o:void 0};return c?c(l):void 0}return o},r.prototype.onContextMenu=function(e,t,r,n,o,i){if((this.gridOptionsWrapper.isAllowContextMenuWithControlKey()||!e||!e.ctrlKey&&!e.metaKey)&&(e&&this.blockMiddleClickScrollsIfNeeded(e),!this.gridOptionsWrapper.isSuppressContextMenu())){var a=e||t.touches[0];if(this.showMenu(r,n,o,a,i))(e||t).preventDefault()}},r.prototype.blockMiddleClickScrollsIfNeeded=function(e){var t=this.gridOptionsWrapper,r=e.which;t.isSuppressMiddleClickScrolls()&&2===r&&e.preventDefault()},r.prototype.showMenu=function(e,r,n,o,i){var a=this,u=this.getMenuItems(e,r,n),s=this.ctrlsService.getGridBodyCtrl().getGui();if(void 0===u||t._.missingOrEmpty(u))return!1;var c=new p(u);this.createBean(c);var l=c.getGui(),d={column:r,rowNode:e,type:"contextMenu",mouseEvent:o,ePopup:l,nudgeY:1},m=this.gridOptionsWrapper.getLocaleTextFunc(),h=this.popupService.addPopup({modal:!0,eChild:l,closeOnEsc:!0,closedCallback:function(){s.classList.remove("ag-context-menu-open"),a.destroyBean(c)},click:o,positionCallback:function(){a.popupService.positionPopupUnderMouseEvent(Object.assign({},{nudgeX:a.gridOptionsWrapper.isEnableRtl()?-1*(l.offsetWidth+1):1},d))},anchorToElement:i,ariaLabel:m("ariaLabelContextMenu","Context Menu")});return h&&(s.classList.add("ag-context-menu-open"),c.afterGuiAttached({container:"contextMenu",hidePopup:h.hideFunc})),this.activeMenu&&this.hideActiveMenu(),this.activeMenu=c,c.addEventListener(t.BeanStub.EVENT_DESTROYED,(function(){a.activeMenu===c&&(a.activeMenu=null)})),h&&c.addEventListener(t.AgMenuItemComponent.EVENT_MENU_ITEM_SELECTED,h.hideFunc),!0},c([t.Autowired("popupService")],r.prototype,"popupService",void 0),c([t.Optional("rangeService")],r.prototype,"rangeService",void 0),c([t.Autowired("ctrlsService")],r.prototype,"ctrlsService",void 0),c([t.Autowired("columnModel")],r.prototype,"columnModel",void 0),r=c([t.Bean("contextMenuFactory")],r)}(t.BeanStub),p=function(e){function r(t){var r=e.call(this,'<div class="ag-menu" role="presentation"></div>')||this;return r.menuList=null,r.focusedCell=null,r.menuItems=t,r}return s(r,e),r.prototype.addMenuItems=function(){var e=this,r=this.createBean(new t.AgMenuList),n=this.menuItemMapper.mapWithStockItems(this.menuItems,null);r.addMenuItems(n),this.appendChild(r),this.menuList=r,r.addEventListener(t.AgMenuItemComponent.EVENT_MENU_ITEM_SELECTED,(function(t){return e.dispatchEvent(t)}))},r.prototype.afterGuiAttached=function(e){e.hidePopup&&this.addDestroyFunc(e.hidePopup),this.focusedCell=this.focusService.getFocusedCell(),this.menuList&&this.focusService.focusInto(this.menuList.getGui())},r.prototype.restoreFocusedCell=function(){var e=this.focusService.getFocusedCell();if(e&&this.focusedCell&&this.cellPositionUtils.equals(e,this.focusedCell)){var t=this.focusedCell,r=t.rowIndex,n=t.rowPinned,o=t.column,i=this.gridOptionsWrapper.getDocument();i.activeElement===i.body&&this.focusService.setFocusedCell({rowIndex:r,column:o,rowPinned:n,forceBrowserFocus:!0})}},r.prototype.destroy=function(){this.restoreFocusedCell(),e.prototype.destroy.call(this)},c([t.Autowired("menuItemMapper")],r.prototype,"menuItemMapper",void 0),c([t.Autowired("focusService")],r.prototype,"focusService",void 0),c([t.Autowired("cellPositionUtils")],r.prototype,"cellPositionUtils",void 0),c([t.PostConstruct],r.prototype,"addMenuItems",null),r}(t.Component),d=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),m=function(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},h=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return d(r,e),r.prototype.mapWithStockItems=function(e,t){var r=this;if(!e)return[];var n=[];return e.forEach((function(e){var o;if(o="string"==typeof e?r.getStockMenuItem(e,t):e){var i=o,a=i.subMenu;a&&a instanceof Array&&(i.subMenu=r.mapWithStockItems(i.subMenu,t)),null!=o&&n.push(o)}})),n},r.prototype.getStockMenuItem=function(e,r){var n=this,o=this.gridOptionsWrapper.getLocaleTextFunc(),i=this.gridOptionsWrapper.isSkipHeaderOnAutoSize();switch(e){case"pinSubMenu":return{name:o("pinColumn","Pin Column"),icon:t._.createIconNoSpan("menuPin",this.gridOptionsWrapper,null),subMenu:["pinLeft","pinRight","clearPinned"]};case"pinLeft":return{name:o("pinLeft","Pin Left"),action:function(){return n.columnModel.setColumnPinned(r,t.Constants.PINNED_LEFT,"contextMenu")},checked:!!r&&r.isPinnedLeft()};case"pinRight":return{name:o("pinRight","Pin Right"),action:function(){return n.columnModel.setColumnPinned(r,t.Constants.PINNED_RIGHT,"contextMenu")},checked:!!r&&r.isPinnedRight()};case"clearPinned":return{name:o("noPin","No Pin"),action:function(){return n.columnModel.setColumnPinned(r,null,"contextMenu")},checked:!!r&&!r.isPinned()};case"valueAggSubMenu":return t.ModuleRegistry.assertRegistered(t.ModuleNames.RowGroupingModule,"Aggregation from Menu")?{name:o("valueAggregation","Value Aggregation"),icon:t._.createIconNoSpan("menuValue",this.gridOptionsWrapper,null),subMenu:this.createAggregationSubMenu(r)}:null;case"autoSizeThis":return{name:o("autosizeThiscolumn","Autosize This Column"),action:function(){return n.columnModel.autoSizeColumn(r,i,"contextMenu")}};case"autoSizeAll":return{name:o("autosizeAllColumns","Autosize All Columns"),action:function(){return n.columnModel.autoSizeAllColumns(i,"contextMenu")}};case"rowGroup":return{name:o("groupBy","Group by")+" "+t._.escapeString(this.columnModel.getDisplayNameForColumn(r,"header")),action:function(){return n.columnModel.addRowGroupColumn(r,"contextMenu")},icon:t._.createIconNoSpan("menuAddRowGroup",this.gridOptionsWrapper,null)};case"rowUnGroup":return{name:o("ungroupBy","Un-Group by")+" "+t._.escapeString(this.columnModel.getDisplayNameForColumn(r,"header")),action:function(){return n.columnModel.removeRowGroupColumn(r,"contextMenu")},icon:t._.createIconNoSpan("menuRemoveRowGroup",this.gridOptionsWrapper,null)};case"resetColumns":return{name:o("resetColumns","Reset Columns"),action:function(){return n.columnModel.resetColumnState("contextMenu")}};case"expandAll":return{name:o("expandAll","Expand All"),action:function(){return n.gridApi.expandAll()}};case"contractAll":return{name:o("collapseAll","Collapse All"),action:function(){return n.gridApi.collapseAll()}};case"copy":return t.ModuleRegistry.assertRegistered(t.ModuleNames.ClipboardModule,"Copy from Menu")?{name:o("copy","Copy"),shortcut:o("ctrlC","Ctrl+C"),icon:t._.createIconNoSpan("clipboardCopy",this.gridOptionsWrapper,null),action:function(){return n.clipboardService.copyToClipboard()}}:null;case"copyWithHeaders":return t.ModuleRegistry.assertRegistered(t.ModuleNames.ClipboardModule,"Copy with Headers from Menu")?{name:o("copyWithHeaders","Copy with Headers"),icon:t._.createIconNoSpan("clipboardCopy",this.gridOptionsWrapper,null),action:function(){return n.clipboardService.copyToClipboard({includeHeaders:!0})}}:null;case"copyWithGroupHeaders":return t.ModuleRegistry.assertRegistered(t.ModuleNames.ClipboardModule,"Copy with Group Headers from Menu")?{name:o("copyWithGroupHeaders","Copy with Group Headers"),icon:t._.createIconNoSpan("clipboardCopy",this.gridOptionsWrapper,null),action:function(){return n.clipboardService.copyToClipboard({includeHeaders:!0,includeGroupHeaders:!0})}}:null;case"paste":return t.ModuleRegistry.assertRegistered(t.ModuleNames.ClipboardModule,"Paste from Clipboard")?{name:o("paste","Paste"),shortcut:o("ctrlV","Ctrl+V"),disabled:!0,icon:t._.createIconNoSpan("clipboardPaste",this.gridOptionsWrapper,null),action:function(){return n.clipboardService.pasteFromClipboard()}}:null;case"export":var a=[],u=t.ModuleRegistry.isRegistered(t.ModuleNames.CsvExportModule),s=t.ModuleRegistry.isRegistered(t.ModuleNames.ExcelExportModule);return!this.gridOptionsWrapper.isSuppressCsvExport()&&u&&a.push("csvExport"),!this.gridOptionsWrapper.isSuppressExcelExport()&&s&&a.push("excelExport"),{name:o("export","Export"),subMenu:a,icon:t._.createIconNoSpan("save",this.gridOptionsWrapper,null)};case"csvExport":return{name:o("csvExport","CSV Export"),icon:t._.createIconNoSpan("csvExport",this.gridOptionsWrapper,null),action:function(){return n.gridApi.exportDataAsCsv({})}};case"excelExport":return{name:o("excelExport","Excel Export"),icon:t._.createIconNoSpan("excelExport",this.gridOptionsWrapper,null),action:function(){return n.gridApi.exportDataAsExcel()}};case"separator":return"separator";default:var c=this.getChartItems(e);return c||(console.warn("AG Grid: unknown menu item type "+e),null)}},r.prototype.getChartItems=function(e){var r=this,n=this.gridOptionsWrapper.getLocaleTextFunc(),o=function(e,t,o){return{name:n(e,t),action:function(){return r.chartService.createPivotChart({chartType:o})}}},i=function(e,t,o){return{name:n(e,t),action:function(){return r.chartService.createChartFromCurrentRange(o)}}};switch(e){case"pivotChart":return{name:n("pivotChart","Pivot Chart"),subMenu:["pivotColumnChart","pivotBarChart","pivotPieChart","pivotLineChart","pivotXYChart","pivotAreaChart"],icon:t._.createIconNoSpan("chart",this.gridOptionsWrapper,null)};case"chartRange":return{name:n("chartRange","Chart Range"),subMenu:["rangeColumnChart","rangeBarChart","rangePieChart","rangeLineChart","rangeXYChart","rangeAreaChart","rangeHistogramChart","rangeCombinationChart"],icon:t._.createIconNoSpan("chart",this.gridOptionsWrapper,null)};case"pivotColumnChart":return{name:n("columnChart","Column"),subMenu:["pivotGroupedColumn","pivotStackedColumn","pivotNormalizedColumn"]};case"pivotGroupedColumn":return o("groupedColumn","Grouped&lrm;","groupedColumn");case"pivotStackedColumn":return o("stackedColumn","Stacked&lrm;","stackedColumn");case"pivotNormalizedColumn":return o("normalizedColumn","100% Stacked&lrm;","normalizedColumn");case"rangeColumnChart":return{name:n("columnChart","Column"),subMenu:["rangeGroupedColumn","rangeStackedColumn","rangeNormalizedColumn"]};case"rangeGroupedColumn":return i("groupedColumn","Grouped&lrm;","groupedColumn");case"rangeStackedColumn":return i("stackedColumn","Stacked&lrm;","stackedColumn");case"rangeNormalizedColumn":return i("normalizedColumn","100% Stacked&lrm;","normalizedColumn");case"pivotBarChart":return{name:n("barChart","Bar"),subMenu:["pivotGroupedBar","pivotStackedBar","pivotNormalizedBar"]};case"pivotGroupedBar":return o("groupedBar","Grouped&lrm;","groupedBar");case"pivotStackedBar":return o("stackedBar","Stacked&lrm;","stackedBar");case"pivotNormalizedBar":return o("normalizedBar","100% Stacked&lrm;","normalizedBar");case"rangeBarChart":return{name:n("barChart","Bar"),subMenu:["rangeGroupedBar","rangeStackedBar","rangeNormalizedBar"]};case"rangeGroupedBar":return i("groupedBar","Grouped&lrm;","groupedBar");case"rangeStackedBar":return i("stackedBar","Stacked&lrm;","stackedBar");case"rangeNormalizedBar":return i("normalizedBar","100% Stacked&lrm;","normalizedBar");case"pivotPieChart":return{name:n("pieChart","Pie"),subMenu:["pivotPie","pivotDoughnut"]};case"pivotPie":return o("pie","Pie&lrm;","pie");case"pivotDoughnut":return o("doughnut","Doughnut&lrm;","doughnut");case"rangePieChart":return{name:n("pieChart","Pie"),subMenu:["rangePie","rangeDoughnut"]};case"rangePie":return i("pie","Pie&lrm;","pie");case"rangeDoughnut":return i("doughnut","Doughnut&lrm;","doughnut");case"pivotLineChart":return o("line","Line&lrm;","line");case"rangeLineChart":return i("line","Line&lrm;","line");case"pivotXYChart":return{name:n("xyChart","X Y (Scatter)"),subMenu:["pivotScatter","pivotBubble"]};case"pivotScatter":return o("scatter","Scatter&lrm;","scatter");case"pivotBubble":return o("bubble","Bubble&lrm;","bubble");case"rangeXYChart":return{name:n("xyChart","X Y (Scatter)"),subMenu:["rangeScatter","rangeBubble"]};case"rangeScatter":return i("scatter","Scatter&lrm;","scatter");case"rangeBubble":return i("bubble","Bubble&lrm;","bubble");case"pivotAreaChart":return{name:n("areaChart","Area"),subMenu:["pivotArea","pivotStackedArea","pivotNormalizedArea"]};case"pivotArea":return o("area","Area&lrm;","area");case"pivotStackedArea":return o("stackedArea","Stacked&lrm;","stackedArea");case"pivotNormalizedArea":return o("normalizedArea","100% Stacked&lrm;","normalizedArea");case"rangeAreaChart":return{name:n("areaChart","Area"),subMenu:["rangeArea","rangeStackedArea","rangeNormalizedArea"]};case"rangeArea":return i("area","Area&lrm;","area");case"rangeStackedArea":return i("stackedArea","Stacked&lrm;","stackedArea");case"rangeNormalizedArea":return i("normalizedArea","100% Stacked&lrm;","normalizedArea");case"rangeHistogramChart":return i("histogramChart","Histogram&lrm;","histogram");case"rangeColumnLineCombo":return i("columnLineCombo","Column & Line&lrm;","columnLineCombo");case"rangeAreaColumnCombo":return i("AreaColumnCombo","Area & Column&lrm;","areaColumnCombo");case"rangeCombinationChart":return{name:n("combinationChart","Combination"),subMenu:["rangeColumnLineCombo","rangeAreaColumnCombo"]};default:return null}},r.prototype.createAggregationSubMenu=function(e){var r,n=this,o=this.gridOptionsWrapper.getLocaleTextFunc(),i=e.isValueActive(),a=this.aggFuncService.getFuncNames(e);if(e.isPrimary())r=e;else{var u=e.getColDef().pivotValueColumn;r=t._.exists(u)?u:void 0}var s=[];return a.forEach((function(e){s.push({name:o(e,e),action:function(){n.columnModel.setColumnAggFunc(r,e,"contextMenu"),n.columnModel.addValueColumn(r,"contextMenu")},checked:i&&r.getAggFunc()===e})})),s},m([t.Autowired("columnModel")],r.prototype,"columnModel",void 0),m([t.Autowired("gridApi")],r.prototype,"gridApi",void 0),m([t.Optional("clipboardService")],r.prototype,"clipboardService",void 0),m([t.Optional("aggFuncService")],r.prototype,"aggFuncService",void 0),m([t.Optional("chartService")],r.prototype,"chartService",void 0),r=m([t.Bean("menuItemMapper")],r)}(t.BeanStub),g={moduleName:t.ModuleNames.MenuModule,beans:[a,l,h],dependantModules:[r.EnterpriseCoreModule]};exports.MenuModule=g;
{
"name": "@ag-grid-enterprise/menu",
"version": "27.3.0",
"version": "28.0.0",
"description": "Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue",

@@ -50,5 +50,5 @@ "main": "./dist/cjs/es5/main.js",

"dependencies": {
"@ag-grid-community/core": "~27.3.0",
"@ag-grid-enterprise/core": "~27.3.0",
"@ag-grid-enterprise/column-tool-panel": "~27.3.0"
"@ag-grid-community/core": "~28.0.0",
"@ag-grid-enterprise/core": "~28.0.0",
"@ag-grid-enterprise/column-tool-panel": "~28.0.0"
},

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

@@ -12,3 +12,3 @@ AG Grid Enterprise

[Angular](https://www.ag-grid.com/angular-grid/getting-started/) | [Javascript](https://www.ag-grid.com/javascript-grid/getting-started/) | [React](https://www.ag-grid.com/react-grid/getting-started/) | [TypeScript](https://www.ag-grid.com/javascript-grid/building-typescript/) | [VueJS](https://www.ag-grid.com/vue-grid/getting-started/)
[Angular](https://www.ag-grid.com/angular-data-grid/getting-started/) | [Javascript](https://www.ag-grid.com/javascript-grid/getting-started/) | [React](https://www.ag-grid.com/react-data-grid/getting-started/) | [TypeScript](https://www.ag-grid.com/javascript-grid/building-typescript/) | [VueJS](https://www.ag-grid.com/vue-data-grid/getting-started/)

@@ -29,8 +29,1 @@ This is not free software, this software is covered by copyright and to use you need a commercial license.

Building
==============
To build:
- `npm install`
- `npm install gulp -g`
- `gulp` or `gulp release`

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 not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc