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 26.0.0 to 26.1.0

2

dist/cjs/menu/contextMenu.d.ts

@@ -12,3 +12,3 @@ import { BeanStub, Column, IContextMenuFactory, RowNode } from "@ag-grid-community/core";

private preventDefaultOnContextMenu;
showMenu(node: RowNode, column: Column, value: any, mouseEvent: MouseEvent | Touch, anchorToElement: HTMLElement): boolean;
showMenu(node: RowNode | null, column: Column | null, value: any, mouseEvent: MouseEvent | Touch, anchorToElement: HTMLElement): boolean;
}

@@ -135,2 +135,3 @@ "use strict";

};
var translate = this.gridOptionsWrapper.getLocaleTextFunc();
var addPopupRes = this.popupService.addPopup({

@@ -151,3 +152,4 @@ modal: true,

// so when browser is scrolled down, or grid is scrolled, context menu stays with cell
anchorToElement: anchorToElement
anchorToElement: anchorToElement,
ariaLabel: translate('ariaLabelContextMenu', 'Context Menu')
});

@@ -154,0 +156,0 @@ if (addPopupRes) {

@@ -91,2 +91,3 @@ "use strict";

});
var translate = this.gridOptionsWrapper.getLocaleTextFunc();
// need to show filter before positioning, as only after filter

@@ -103,3 +104,4 @@ // is visible can we find out what the width of it is

positionCallback: function () { return positionCallback(menu); },
anchorToElement: anchorToElement
anchorToElement: anchorToElement,
ariaLabel: translate('ariaLabelColumnMenu', 'Column Menu')
});

@@ -394,2 +396,3 @@ if (addPopupRes) {

this.columnSelectPanel.init(false, {
suppressColumnMove: false,
suppressValues: false,

@@ -396,0 +399,0 @@ suppressPivots: false,

@@ -105,2 +105,3 @@ "use strict";

var positionCallback = this.popupService.positionPopupForMenu.bind(this.popupService, { eventSource: eGui, ePopup: ePopup });
var translate = this.gridOptionsWrapper.getLocaleTextFunc();
var addPopupRes = this.popupService.addPopup({

@@ -110,3 +111,4 @@ modal: true,

positionCallback: positionCallback,
anchorToElement: eGui
anchorToElement: eGui,
ariaLabel: translate('ariaLabelSubMenu', 'SubMenu')
});

@@ -198,3 +200,3 @@ this.subMenuIsOpen = true;

else {
this.createManagedBean(new core_1.TooltipFeature(this));
this.createManagedBean(new core_1.CustomTooltipFeature(this));
}

@@ -201,0 +203,0 @@ };

@@ -12,3 +12,3 @@ import { BeanStub, Column, IContextMenuFactory, RowNode } from "@ag-grid-community/core";

private preventDefaultOnContextMenu;
showMenu(node: RowNode, column: Column, value: any, mouseEvent: MouseEvent | Touch, anchorToElement: HTMLElement): boolean;
showMenu(node: RowNode | null, column: Column | null, value: any, mouseEvent: MouseEvent | Touch, anchorToElement: HTMLElement): boolean;
}

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

};
var translate = this.gridOptionsWrapper.getLocaleTextFunc();
var addPopupRes = this.popupService.addPopup({

@@ -149,3 +150,4 @@ modal: true,

// so when browser is scrolled down, or grid is scrolled, context menu stays with cell
anchorToElement: anchorToElement
anchorToElement: anchorToElement,
ariaLabel: translate('ariaLabelContextMenu', 'Context Menu')
});

@@ -152,0 +154,0 @@ if (addPopupRes) {

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

});
var translate = this.gridOptionsWrapper.getLocaleTextFunc();
// need to show filter before positioning, as only after filter

@@ -101,3 +102,4 @@ // is visible can we find out what the width of it is

positionCallback: function () { return positionCallback(menu); },
anchorToElement: anchorToElement
anchorToElement: anchorToElement,
ariaLabel: translate('ariaLabelColumnMenu', 'Column Menu')
});

@@ -392,2 +394,3 @@ if (addPopupRes) {

this.columnSelectPanel.init(false, {
suppressColumnMove: false,
suppressValues: false,

@@ -394,0 +397,0 @@ suppressPivots: false,

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

};
import { Autowired, Component, PostConstruct, TooltipFeature, KeyCode, _ } from "@ag-grid-community/core";
import { Autowired, Component, PostConstruct, CustomTooltipFeature, KeyCode, _ } from "@ag-grid-community/core";
import { MenuList } from './menuList';

@@ -104,2 +104,3 @@ import { MenuPanel } from './menuPanel';

var positionCallback = this.popupService.positionPopupForMenu.bind(this.popupService, { eventSource: eGui, ePopup: ePopup });
var translate = this.gridOptionsWrapper.getLocaleTextFunc();
var addPopupRes = this.popupService.addPopup({

@@ -109,3 +110,4 @@ modal: true,

positionCallback: positionCallback,
anchorToElement: eGui
anchorToElement: eGui,
ariaLabel: translate('ariaLabelSubMenu', 'SubMenu')
});

@@ -197,3 +199,3 @@ this.subMenuIsOpen = true;

else {
this.createManagedBean(new TooltipFeature(this));
this.createManagedBean(new CustomTooltipFeature(this));
}

@@ -200,0 +202,0 @@ };

/**
* @ag-grid-enterprise/menu - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components * @version v26.0.0
* @ag-grid-enterprise/menu - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components * @version v26.1.0
* @link http://www.ag-grid.com/

@@ -8,6 +8,6 @@ ' * @license Commercial

/**
* @ag-grid-enterprise/menu - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components * @version v26.0.0
* @ag-grid-enterprise/menu - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components * @version v26.1.0
* @link http://www.ag-grid.com/
' * @license Commercial
*/
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("@ag-grid-community/core"),n=require("@ag-grid-enterprise/core"),r=require("@ag-grid-enterprise/column-tool-panel"),o=(e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)},function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),i=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},a=function(e){function n(t){var n=e.call(this)||this;return n.wrappedComponent=t,n.setTemplateFromElement(t.getGui()),n}return o(n,e),n.prototype.postConstruct=function(){var e=this;this.initialiseTabGuard({onTabKeyDown:function(t){return e.onTabKeyDown(t)},handleKeyDown:function(t){return e.handleKeyDown(t)}})},n.prototype.handleKeyDown=function(e){e.keyCode===t.KeyCode.ESCAPE&&this.closePanel()},n.prototype.onTabKeyDown=function(e){e.defaultPrevented||(this.closePanel(),e.preventDefault())},n.prototype.closePanel=function(){var e=this.parentComponent;e.closeSubMenu(),setTimeout((function(){return e.getGui().focus()}),0)},i([t.PostConstruct],n.prototype,"postConstruct",null),n}(t.TabGuardComp),s=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),u=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},c=function(e){function n(t){var n=e.call(this)||this;return n.params=t,n.isActive=!1,n.subMenuIsOpen=!1,n.setTemplate('<div class="'+n.getClassName()+'" tabindex="-1" role="treeitem"></div>'),n}return s(n,e),n.prototype.init=function(){var e=this;this.addIcon(),this.addName(),this.addShortcut(),this.addSubMenu(),this.addTooltip();var n=this.getGui();this.params.disabled?(this.addCssClass(this.getClassName("disabled")),t._.setAriaDisabled(n,!0)):(this.addGuiEventListener("click",(function(t){return e.onItemSelected(t)})),this.addGuiEventListener("keydown",(function(n){n.keyCode!==t.KeyCode.ENTER&&n.keyCode!==t.KeyCode.SPACE||(n.preventDefault(),e.onItemSelected(n))})),this.addGuiEventListener("mouseenter",(function(){return e.onMouseEnter()})),this.addGuiEventListener("mouseleave",(function(){return e.onMouseLeave()}))),this.params.cssClasses&&this.params.cssClasses.forEach((function(e){return t._.addCssClass(n,e)}))},n.prototype.isDisabled=function(){return!!this.params.disabled},n.prototype.openSubMenu=function(e){var r=this;if(void 0===e&&(e=!1),this.closeSubMenu(),this.params.subMenu){var o,i=t._.loadTemplate('<div class="ag-menu" role="presentation"></div>');if(this.params.subMenu instanceof Array){var s=t._.getAriaLevel(this.getGui()),u=isNaN(s)?1:s+1,c=this.createBean(new h(u));c.setParentComponent(this),c.addMenuItems(this.params.subMenu),i.appendChild(c.getGui()),this.addManagedListener(c,n.EVENT_MENU_ITEM_SELECTED,(function(e){return r.dispatchEvent(e)})),c.addGuiEventListener("mouseenter",(function(){return r.cancelDeactivate()})),o=function(){return r.destroyBean(c)},e&&setTimeout((function(){return c.activateFirstItem()}),0)}else{var p=this.params.subMenu,l=this.createBean(new a(p));l.setParentComponent(this);var d=l.getGui(),m=function(){return r.cancelDeactivate()};d.addEventListener("mouseenter",m),o=function(){return d.removeEventListener("mouseenter",m)},i.appendChild(d),p.afterGuiAttached&&setTimeout((function(){return p.afterGuiAttached()}),0)}var f=this.getGui(),v=this.popupService.positionPopupForMenu.bind(this.popupService,{eventSource:f,ePopup:i}),C=this.popupService.addPopup({modal:!0,eChild:i,positionCallback:v,anchorToElement:f});this.subMenuIsOpen=!0,t._.setAriaExpanded(f,!0),this.hideSubMenu=function(){C&&C.hideFunc(),r.subMenuIsOpen=!1,t._.setAriaExpanded(f,!1),o()}}},n.prototype.closeSubMenu=function(){this.hideSubMenu&&(this.hideSubMenu(),this.hideSubMenu=null,t._.setAriaExpanded(this.getGui(),!1))},n.prototype.isSubMenuOpen=function(){return this.subMenuIsOpen},n.prototype.activate=function(e){var t=this;this.cancelActivate(),this.params.disabled||(this.isActive=!0,this.addCssClass(this.getClassName("active")),this.getGui().focus(),e&&this.params.subMenu&&window.setTimeout((function(){t.isAlive()&&t.isActive&&t.openSubMenu()}),300),this.onItemActivated())},n.prototype.deactivate=function(){this.cancelDeactivate(),this.removeCssClass(this.getClassName("active")),this.isActive=!1,this.subMenuIsOpen&&this.hideSubMenu()},n.prototype.addIcon=function(){if(this.params.checked||this.params.icon||!this.params.isCompact){var e=t._.loadTemplate('<span ref="eIcon" class="'+this.getClassName("part")+" "+this.getClassName("icon")+'" role="presentation"></span>');this.params.checked?e.appendChild(t._.createIconNoSpan("check",this.gridOptionsWrapper)):this.params.icon&&(t._.isNodeOrElement(this.params.icon)?e.appendChild(this.params.icon):"string"==typeof this.params.icon?e.innerHTML=this.params.icon:console.warn("AG Grid: menu item icon must be DOM node or string")),this.getGui().appendChild(e)}},n.prototype.addName=function(){if(this.params.name||!this.params.isCompact){var e=t._.loadTemplate('<span ref="eName" class="'+this.getClassName("part")+" "+this.getClassName("text")+'">'+(this.params.name||"")+"</span>");this.getGui().appendChild(e)}},n.prototype.addTooltip=function(){this.params.tooltip&&(this.tooltip=this.params.tooltip,this.gridOptionsWrapper.isEnableBrowserTooltips()?this.getGui().setAttribute("title",this.tooltip):this.createManagedBean(new t.TooltipFeature(this)))},n.prototype.getTooltipParams=function(){return{location:"menu",value:this.tooltip}},n.prototype.addShortcut=function(){if(this.params.shortcut||!this.params.isCompact){var e=t._.loadTemplate('<span ref="eShortcut" class="'+this.getClassName("part")+" "+this.getClassName("shortcut")+'">'+(this.params.shortcut||"")+"</span>");this.getGui().appendChild(e)}},n.prototype.addSubMenu=function(){if(this.params.subMenu||!this.params.isCompact){var e=t._.loadTemplate('<span ref="ePopupPointer" class="'+this.getClassName("part")+" "+this.getClassName("popup-pointer")+'"></span>'),n=this.getGui();if(this.params.subMenu){var r=this.gridOptionsWrapper.isEnableRtl()?"smallLeft":"smallRight";t._.setAriaExpanded(n,!1),e.appendChild(t._.createIconNoSpan(r,this.gridOptionsWrapper))}n.appendChild(e)}},n.prototype.onItemSelected=function(e){if(this.params.action?this.params.action():this.openSubMenu(e&&"keydown"===e.type),!this.params.subMenu||this.params.action){var t={type:n.EVENT_MENU_ITEM_SELECTED,action:this.params.action,checked:this.params.checked,cssClasses:this.params.cssClasses,disabled:this.params.disabled,icon:this.params.icon,name:this.params.name,shortcut:this.params.shortcut,subMenu:this.params.subMenu,tooltip:this.params.tooltip,event:e};this.dispatchEvent(t)}},n.prototype.onItemActivated=function(){var e={type:n.EVENT_MENU_ITEM_ACTIVATED,menuItem:this};this.dispatchEvent(e)},n.prototype.cancelActivate=function(){this.activateTimeoutId&&(window.clearTimeout(this.activateTimeoutId),this.activateTimeoutId=0)},n.prototype.cancelDeactivate=function(){this.deactivateTimeoutId&&(window.clearTimeout(this.deactivateTimeoutId),this.deactivateTimeoutId=0)},n.prototype.onMouseEnter=function(){var e=this;this.cancelDeactivate(),this.params.isAnotherSubMenuOpen()?this.activateTimeoutId=window.setTimeout((function(){return e.activate(!0)}),n.ACTIVATION_DELAY):this.activate(!0)},n.prototype.onMouseLeave=function(){var e=this;this.cancelActivate(),this.isSubMenuOpen()?this.deactivateTimeoutId=window.setTimeout((function(){return e.deactivate()}),n.ACTIVATION_DELAY):this.deactivate()},n.prototype.getClassName=function(e){var t=this.params.isCompact?"ag-compact-menu-option":"ag-menu-option";return e?t+"-"+e:t},n.EVENT_MENU_ITEM_SELECTED="menuItemSelected",n.EVENT_MENU_ITEM_ACTIVATED="menuItemActivated",n.ACTIVATION_DELAY=80,u([t.Autowired("popupService")],n.prototype,"popupService",void 0),u([t.PostConstruct],n.prototype,"init",null),n}(t.Component),p=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),l=function(){return(l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},d=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},h=function(e){function n(t){void 0===t&&(t=1);var n=e.call(this,'<div class="ag-menu-list" role="tree"></div>')||this;return n.level=t,n.menuItems=[],n}return p(n,e),n.prototype.postConstruct=function(){var e=this;this.initialiseTabGuard({onTabKeyDown:function(t){return e.onTabKeyDown(t)},handleKeyDown:function(t){return e.handleKeyDown(t)}})},n.prototype.onTabKeyDown=function(e){var n=this.getParentComponent(),r=n&&n.getGui();r&&t._.containsClass(r,"ag-focus-managed")||e.preventDefault(),e.shiftKey&&this.closeIfIsChild(e)},n.prototype.handleKeyDown=function(e){switch(e.keyCode){case t.KeyCode.UP:case t.KeyCode.RIGHT:case t.KeyCode.DOWN:case t.KeyCode.LEFT:e.preventDefault(),this.handleNavKey(e.keyCode);break;case t.KeyCode.ESCAPE:var n=this.findTopMenu();n&&this.focusService.focusInto(n.getGui())}},n.prototype.clearActiveItem=function(){this.activeMenuItem&&(this.activeMenuItem.deactivate(),this.activeMenuItem=null)},n.prototype.addMenuItems=function(e){var t=this;null!=e&&e.forEach((function(e){"separator"===e?t.addSeparator():"string"==typeof e?console.warn("AG Grid: unrecognised menu item "+e):t.addItem(e)}))},n.prototype.addItem=function(e){var n=this,r=this.createManagedBean(new c(l(l({},e),{isAnotherSubMenuOpen:function(){return t._.some(n.menuItems,(function(e){return e.isSubMenuOpen()}))}})));r.setParentComponent(this),t._.setAriaLevel(r.getGui(),this.level),this.menuItems.push(r),this.appendChild(r.getGui()),this.addManagedListener(r,c.EVENT_MENU_ITEM_SELECTED,(function(e){n.dispatchEvent(e)})),this.addManagedListener(r,c.EVENT_MENU_ITEM_ACTIVATED,(function(e){n.activeMenuItem&&n.activeMenuItem!==e.menuItem&&n.activeMenuItem.deactivate(),n.activeMenuItem=e.menuItem}))},n.prototype.activateFirstItem=function(){var e=this.menuItems.filter((function(e){return!e.isDisabled()}))[0];e&&e.activate()},n.prototype.addSeparator=function(){this.appendChild(t._.loadTemplate('\n <div class="ag-menu-separator" aria-hidden="true">\n <div class="ag-menu-separator-part"></div>\n <div class="ag-menu-separator-part"></div>\n <div class="ag-menu-separator-part"></div>\n <div class="ag-menu-separator-part"></div>\n </div>'))},n.prototype.findTopMenu=function(){var e=this.getParentComponent();if(!e&&this instanceof n)return this;for(;;){var t=e&&e.getParentComponent&&e.getParentComponent();if(!t||!(t instanceof n||t instanceof c))break;e=t}return e instanceof n?e:void 0},n.prototype.handleNavKey=function(e){switch(e){case t.KeyCode.UP:case t.KeyCode.DOWN:var n=this.findNextItem(e===t.KeyCode.UP);return void(n&&n!==this.activeMenuItem&&n.activate())}e===(this.gridOptionsWrapper.isEnableRtl()?t.KeyCode.RIGHT:t.KeyCode.LEFT)?this.closeIfIsChild():this.openChild()},n.prototype.closeIfIsChild=function(e){var t=this.getParentComponent();t&&t instanceof c&&(e&&e.preventDefault(),t.closeSubMenu(),t.getGui().focus())},n.prototype.openChild=function(){this.activeMenuItem&&this.activeMenuItem.openSubMenu(!0)},n.prototype.findNextItem=function(e){var n=this.menuItems.filter((function(e){return!e.isDisabled()}));if(n.length){if(!this.activeMenuItem)return e?t._.last(n):n[0];var r;e&&n.reverse();for(var o=!1,i=0;i<n.length;i++){var a=n[i];if(o){r=a;break}a===this.activeMenuItem&&(o=!0)}return r||this.activeMenuItem}},n.prototype.destroy=function(){this.clearActiveItem(),e.prototype.destroy.call(this)},d([t.Autowired("focusService")],n.prototype,"focusService",void 0),d([t.PostConstruct],n.prototype,"postConstruct",null),n}(t.TabGuardComp),m=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),f=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},v=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.prototype.hideActiveMenu=function(){this.destroyBean(this.activeMenu)},n.prototype.showMenuAfterMouseEvent=function(e,t,n){var r=this;this.showMenu(e,(function(o){var i=o.getGui();r.popupService.positionPopupUnderMouseEvent({type:"columnMenu",column:e,mouseEvent:t,ePopup:i}),n&&o.showTab(n)}),"columnMenu",n,void 0,t.target)},n.prototype.showMenuAfterButtonClick=function(e,t,n,r,o){var i=this,a=-1,s="left";this.gridOptionsWrapper.isEnableRtl()&&(a=1,s="right"),this.showMenu(e,(function(o){var u=o.getGui();i.popupService.positionPopupUnderComponent({type:n,column:e,eventSource:t,ePopup:u,alignSide:s,nudgeX:9*a,nudgeY:-23,keepWithinBounds:!0}),r&&o.showTab(r)}),n,r,o,t)},n.prototype.showMenu=function(e,n,r,o,i,a){var s=this,u=this.createBean(new C(e,this.lastSelectedTab,i)),c=u.getGui(),p=a||this.ctrlsService.getGridBodyCtrl().getGui(),l=[];l.push((function(n){if(s.destroyBean(u),e.setMenuVisible(!1,"contextMenu"),n instanceof KeyboardEvent&&a&&t._.isVisible(a)){var r=s.focusService.findTabbableParent(a);r&&r.focus()}}));var d=this.popupService.addPopup({modal:!0,eChild:c,closeOnEsc:!0,closedCallback:function(e){l.forEach((function(t){return t(e)}))},afterGuiAttached:function(e){return u.afterGuiAttached(t._.assign({},{container:r},e))},positionCallback:function(){return n(u)},anchorToElement:p});if(d){var h=d.stopAnchoringPromise;h&&h.then((function(n){e.addEventListener(t.Column.EVENT_LEFT_CHANGED,n),e.addEventListener(t.Column.EVENT_VISIBLE_CHANGED,n),l.push((function(){e.removeEventListener(t.Column.EVENT_LEFT_CHANGED,n),e.removeEventListener(t.Column.EVENT_VISIBLE_CHANGED,n)}))}))}o||(u.showTabBasedOnPreviousSelection(),n(u)),u.addEventListener(C.EVENT_TAB_SELECTED,(function(e){s.lastSelectedTab=e.key})),e.setMenuVisible(!0,"contextMenu"),this.activeMenu=u,u.addEventListener(t.BeanStub.EVENT_DESTROYED,(function(){s.activeMenu===u&&(s.activeMenu=null)}))},n.prototype.isMenuEnabled=function(e){return e.getMenuTabs(C.TABS_DEFAULT).length>0},f([t.Autowired("popupService")],n.prototype,"popupService",void 0),f([t.Autowired("focusService")],n.prototype,"focusService",void 0),f([t.Autowired("ctrlsService")],n.prototype,"ctrlsService",void 0),n=f([t.Bean("menuFactory")],n)}(t.BeanStub),C=function(e){function n(t,r,o){var i=e.call(this)||this;return i.tabFactories={},i.includeChecks={},i.column=t,i.initialSelection=r,i.tabFactories[n.TAB_GENERAL]=i.createMainPanel.bind(i),i.tabFactories[n.TAB_FILTER]=i.createFilterPanel.bind(i),i.tabFactories[n.TAB_COLUMNS]=i.createColumnsPanel.bind(i),i.includeChecks[n.TAB_GENERAL]=function(){return!0},i.includeChecks[n.TAB_FILTER]=function(){return t.isFilterAllowed()},i.includeChecks[n.TAB_COLUMNS]=function(){return!0},i.restrictTo=o,i}return m(n,e),n.prototype.init=function(){var e=this,n=this.getTabsToCreate().map((function(t){return e.createTab(t)}));this.tabbedLayout=new t.TabbedLayout({items:n,cssClass:"ag-menu",onActiveItemClicked:this.onHidePopup.bind(this),onItemClicked:this.onTabItemClicked.bind(this)}),this.createBean(this.tabbedLayout),this.mainMenuList&&this.mainMenuList.setParentComponent(this.tabbedLayout)},n.prototype.getTabsToCreate=function(){var e=this;return this.restrictTo?this.restrictTo:this.column.getMenuTabs(n.TABS_DEFAULT).filter((function(t){return e.isValidMenuTabItem(t)})).filter((function(t){return e.isNotSuppressed(t)})).filter((function(t){return e.isModuleLoaded(t)}))},n.prototype.isModuleLoaded=function(e){return e!==n.TAB_COLUMNS||t.ModuleRegistry.isRegistered(t.ModuleNames.ColumnToolPanelModule)},n.prototype.isValidMenuTabItem=function(e){var t=!0,r=n.TABS_DEFAULT;return null!=this.restrictTo&&(t=this.restrictTo.indexOf(e)>-1,r=this.restrictTo),(t=t&&n.TABS_DEFAULT.indexOf(e)>-1)||console.warn("Trying to render an invalid menu item '"+e+"'. Check that your 'menuTabs' contains one of ["+r+"]"),t},n.prototype.isNotSuppressed=function(e){return this.includeChecks[e]()},n.prototype.createTab=function(e){return this.tabFactories[e]()},n.prototype.showTabBasedOnPreviousSelection=function(){this.showTab(this.initialSelection)},n.prototype.showTab=function(e){this.tabItemColumns&&e===n.TAB_COLUMNS?this.tabbedLayout.showItem(this.tabItemColumns):this.tabItemFilter&&e===n.TAB_FILTER?this.tabbedLayout.showItem(this.tabItemFilter):this.tabItemGeneral&&e===n.TAB_GENERAL?this.tabbedLayout.showItem(this.tabItemGeneral):this.tabbedLayout.showFirstItem()},n.prototype.onTabItemClicked=function(e){var t=null;switch(e.item){case this.tabItemColumns:t=n.TAB_COLUMNS;break;case this.tabItemFilter:t=n.TAB_FILTER;break;case this.tabItemGeneral:t=n.TAB_GENERAL}t&&this.activateTab(t)},n.prototype.activateTab=function(e){var t={type:n.EVENT_TAB_SELECTED,key:e};this.dispatchEvent(t)},n.prototype.getMenuItems=function(){var e,r=this.getDefaultMenuOptions(),o=this.gridOptionsWrapper.getMainMenuItemsFunc();return e=o?o({column:this.column,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext(),defaultItems:r}):r,t._.removeRepeatsFromArray(e,n.MENU_ITEM_SEPARATOR),e},n.prototype.getDefaultMenuOptions=function(){var e=[],r=!this.column.getColDef().lockPinned,o=this.columnModel.getRowGroupColumns().length,i=o>0,a=this.columnModel.getRowGroupColumns().indexOf(this.column)>=0,s=this.column.isAllowValue(),u=this.column.isAllowRowGroup(),c=this.column.isPrimary(),p=this.columnModel.isPivotMode(),l=this.rowModel.getType()===t.Constants.ROW_MODEL_TYPE_CLIENT_SIDE,d=this.gridOptionsWrapper.isTreeData(),h=c&&i&&s||!c;return r&&e.push("pinSubMenu"),h&&e.push("valueAggSubMenu"),(r||h)&&e.push(n.MENU_ITEM_SEPARATOR),e.push("autoSizeThis"),e.push("autoSizeAll"),e.push(n.MENU_ITEM_SEPARATOR),u&&this.column.isPrimary()&&(a?e.push("rowUnGroup"):e.push("rowGroup")),e.push(n.MENU_ITEM_SEPARATOR),e.push("resetColumns"),l&&(d||o>(p?1:0))&&(e.push("expandAll"),e.push("contractAll")),e},n.prototype.createMainPanel=function(){this.mainMenuList=this.createManagedBean(new h);var e=this.getMenuItems(),r=this.menuItemMapper.mapWithStockItems(e,this.column);return this.mainMenuList.addMenuItems(r),this.mainMenuList.addEventListener(c.EVENT_MENU_ITEM_SELECTED,this.onHidePopup.bind(this)),this.tabItemGeneral={title:t._.createIconNoSpan("menu",this.gridOptionsWrapper,this.column),titleLabel:n.TAB_GENERAL.replace("MenuTab",""),bodyPromise:t.AgPromise.resolve(this.mainMenuList.getGui()),name:n.TAB_GENERAL},this.tabItemGeneral},n.prototype.onHidePopup=function(){this.hidePopupFunc();var e=this.focusService.getFocusedCell();if(e){var t=e.rowIndex,n=e.rowPinned,r=e.column;this.focusService.setFocusedCell(t,r,n,!0)}},n.prototype.createFilterPanel=function(){var e=this.filterManager.getOrCreateFilterWrapper(this.column,"COLUMN_MENU");return this.tabItemFilter={title:t._.createIconNoSpan("filter",this.gridOptionsWrapper,this.column),titleLabel:n.TAB_FILTER.replace("MenuTab",""),bodyPromise:e.guiPromise,afterAttachedCallback:function(t){e.filterPromise&&e.filterPromise.then((function(e){e&&e.afterGuiAttached&&e.afterGuiAttached(t)}))},name:n.TAB_FILTER},this.tabItemFilter},n.prototype.createColumnsPanel=function(){var e=document.createElement("div");t._.addCssClass(e,"ag-menu-column-select-wrapper"),this.columnSelectPanel=this.createManagedBean(new r.PrimaryColsPanel);var o=this.column.getColDef().columnsMenuParams;return o||(o={}),this.columnSelectPanel.init(!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},"columnMenu"),t._.addCssClass(this.columnSelectPanel.getGui(),"ag-menu-column-select"),e.appendChild(this.columnSelectPanel.getGui()),this.tabItemColumns={title:t._.createIconNoSpan("columns",this.gridOptionsWrapper,this.column),titleLabel:n.TAB_COLUMNS.replace("MenuTab",""),bodyPromise:t.AgPromise.resolve(e),name:n.TAB_COLUMNS},this.tabItemColumns},n.prototype.afterGuiAttached=function(e){var t=e.container,n=e.hidePopup;this.tabbedLayout.setAfterAttachedParams({container:t,hidePopup:n}),n&&(this.hidePopupFunc=n,this.addDestroyFunc(n))},n.prototype.getGui=function(){return this.tabbedLayout.getGui()},n.EVENT_TAB_SELECTED="tabSelected",n.TAB_FILTER="filterMenuTab",n.TAB_GENERAL="generalMenuTab",n.TAB_COLUMNS="columnsMenuTab",n.TABS_DEFAULT=[n.TAB_GENERAL,n.TAB_FILTER,n.TAB_COLUMNS],n.MENU_ITEM_SEPARATOR="separator",f([t.Autowired("columnModel")],n.prototype,"columnModel",void 0),f([t.Autowired("filterManager")],n.prototype,"filterManager",void 0),f([t.Autowired("gridApi")],n.prototype,"gridApi",void 0),f([t.Autowired("columnApi")],n.prototype,"columnApi",void 0),f([t.Autowired("menuItemMapper")],n.prototype,"menuItemMapper",void 0),f([t.Autowired("rowModel")],n.prototype,"rowModel",void 0),f([t.Autowired("focusService")],n.prototype,"focusService",void 0),f([t.PostConstruct],n.prototype,"init",null),n}(t.BeanStub),g=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),y=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},M=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return g(n,e),n.prototype.hideActiveMenu=function(){this.destroyBean(this.activeMenu)},n.prototype.getMenuItems=function(e,n,r){var o=[];if(t._.exists(e)&&t.ModuleRegistry.isRegistered(t.ModuleNames.ClipboardModule)&&n&&o.push("copy","copyWithHeaders","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),s=this.gridOptionsWrapper.isSuppressExcelExport()||a,u=this.gridOptionsWrapper.isSuppressCsvExport()||i;!(t._.isIOSUserAgent()||s&&u)&&o.push("export")}if(this.gridOptionsWrapper.getContextMenuItemsFunc()){var c=this.gridOptionsWrapper.getContextMenuItemsFunc(),p={node:e,column:n,value:r,defaultItems:o.length?o:void 0,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext()};return c?c(p):void 0}return o},n.prototype.onContextMenu=function(e,t,n,r,o,i){if((this.gridOptionsWrapper.isAllowContextMenuWithControlKey()||!e||!e.ctrlKey&&!e.metaKey)&&(e&&this.preventDefaultOnContextMenu(e),!this.gridOptionsWrapper.isSuppressContextMenu())){var a=e||t.touches[0];if(this.showMenu(n,r,o,a,i))(e||t).preventDefault()}},n.prototype.preventDefaultOnContextMenu=function(e){var t=this.gridOptionsWrapper,n=e.which;(t.isPreventDefaultOnContextMenu()||t.isSuppressMiddleClickScrolls()&&2===n)&&e.preventDefault()},n.prototype.showMenu=function(e,n,r,o,i){var a=this,s=this.getMenuItems(e,n,r),u=this.ctrlsService.getGridBodyCtrl().getGui();if(void 0===s||t._.missingOrEmpty(s))return!1;var p=new b(s);this.createBean(p);var l=p.getGui(),d={column:n,rowNode:e,type:"contextMenu",mouseEvent:o,ePopup:l,nudgeY:1},h=this.popupService.addPopup({modal:!0,eChild:l,closeOnEsc:!0,closedCallback:function(){t._.removeCssClass(u," ag-context-menu-open"),a.destroyBean(p)},click:o,positionCallback:function(){a.popupService.positionPopupUnderMouseEvent(t._.assign({},{nudgeX:a.gridOptionsWrapper.isEnableRtl()?-1*(l.offsetWidth+1):1},d))},anchorToElement:i});return h&&(t._.addCssClass(u," ag-context-menu-open"),p.afterGuiAttached({container:"contextMenu",hidePopup:h.hideFunc})),this.activeMenu&&this.hideActiveMenu(),this.activeMenu=p,p.addEventListener(t.BeanStub.EVENT_DESTROYED,(function(){a.activeMenu===p&&(a.activeMenu=null)})),h&&p.addEventListener(c.EVENT_MENU_ITEM_SELECTED,h.hideFunc),!0},y([t.Autowired("popupService")],n.prototype,"popupService",void 0),y([t.Optional("rangeService")],n.prototype,"rangeService",void 0),y([t.Autowired("ctrlsService")],n.prototype,"ctrlsService",void 0),y([t.Autowired("columnModel")],n.prototype,"columnModel",void 0),n=y([t.Bean("contextMenuFactory")],n)}(t.BeanStub),b=function(e){function n(t){var n=e.call(this,'<div class="ag-menu" role="presentation"></div>')||this;return n.menuList=null,n.focusedCell=null,n.menuItems=t,n}return g(n,e),n.prototype.addMenuItems=function(){var e=this,t=this.createBean(new h),n=this.menuItemMapper.mapWithStockItems(this.menuItems,null);t.addMenuItems(n),this.appendChild(t),this.menuList=t,t.addEventListener(c.EVENT_MENU_ITEM_SELECTED,(function(t){return e.dispatchEvent(t)}))},n.prototype.afterGuiAttached=function(e){e.hidePopup&&this.addDestroyFunc(e.hidePopup),this.focusedCell=this.focusService.getFocusedCell(),this.menuList&&this.focusService.focusInto(this.menuList.getGui())},n.prototype.restoreFocusedCell=function(){var e=this.focusService.getFocusedCell();if(e&&this.focusedCell&&this.cellPositionUtils.equals(e,this.focusedCell)){var t=this.focusedCell,n=t.rowIndex,r=t.rowPinned,o=t.column,i=this.gridOptionsWrapper.getDocument();i.activeElement===i.body&&this.focusService.setFocusedCell(n,o,r,!0)}},n.prototype.destroy=function(){this.restoreFocusedCell(),e.prototype.destroy.call(this)},y([t.Autowired("menuItemMapper")],n.prototype,"menuItemMapper",void 0),y([t.Autowired("focusService")],n.prototype,"focusService",void 0),y([t.Autowired("cellPositionUtils")],n.prototype,"cellPositionUtils",void 0),y([t.PostConstruct],n.prototype,"addMenuItems",null),n}(t.Component),E=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),T=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},A=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return E(n,e),n.prototype.mapWithStockItems=function(e,t){var n=this;if(!e)return[];var r=[];return e.forEach((function(e){var o;if(o="string"==typeof e?n.getStockMenuItem(e,t):e){var i=o,a=i.subMenu;a&&a instanceof Array&&(i.subMenu=n.mapWithStockItems(i.subMenu,t)),null!=o&&r.push(o)}})),r},n.prototype.getStockMenuItem=function(e,n){var r=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 r.columnModel.setColumnPinned(n,t.Constants.PINNED_LEFT,"contextMenu")},checked:!!n&&n.isPinnedLeft()};case"pinRight":return{name:o("pinRight","Pin Right"),action:function(){return r.columnModel.setColumnPinned(n,t.Constants.PINNED_RIGHT,"contextMenu")},checked:!!n&&n.isPinnedRight()};case"clearPinned":return{name:o("noPin","No Pin"),action:function(){return r.columnModel.setColumnPinned(n,null,"contextMenu")},checked:!!n&&!n.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(n)}:null;case"autoSizeThis":return{name:o("autosizeThiscolumn","Autosize This Column"),action:function(){return r.columnModel.autoSizeColumn(n,i,"contextMenu")}};case"autoSizeAll":return{name:o("autosizeAllColumns","Autosize All Columns"),action:function(){return r.columnModel.autoSizeAllColumns(i,"contextMenu")}};case"rowGroup":return{name:o("groupBy","Group by")+" "+t._.escapeString(this.columnModel.getDisplayNameForColumn(n,"header")),action:function(){return r.columnModel.addRowGroupColumn(n,"contextMenu")},icon:t._.createIconNoSpan("menuAddRowGroup",this.gridOptionsWrapper,null)};case"rowUnGroup":return{name:o("ungroupBy","Un-Group by")+" "+t._.escapeString(this.columnModel.getDisplayNameForColumn(n,"header")),action:function(){return r.columnModel.removeRowGroupColumn(n,"contextMenu")},icon:t._.createIconNoSpan("menuRemoveRowGroup",this.gridOptionsWrapper,null)};case"resetColumns":return{name:o("resetColumns","Reset Columns"),action:function(){return r.columnModel.resetColumnState("contextMenu")}};case"expandAll":return{name:o("expandAll","Expand All"),action:function(){return r.gridApi.expandAll()}};case"contractAll":return{name:o("collapseAll","Collapse All"),action:function(){return r.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 r.clipboardService.copyToClipboard(!1)}}: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 r.clipboardService.copyToClipboard(!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 r.clipboardService.pasteFromClipboard()}}:null;case"export":var a=[],s=t.ModuleRegistry.isRegistered(t.ModuleNames.CsvExportModule),u=t.ModuleRegistry.isRegistered(t.ModuleNames.ExcelExportModule);return!this.gridOptionsWrapper.isSuppressCsvExport()&&s&&a.push("csvExport"),!this.gridOptionsWrapper.isSuppressExcelExport()&&u&&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 r.gridApi.exportDataAsCsv({})}};case"excelExport":return{name:o("excelExport","Excel Export"),icon:t._.createIconNoSpan("excelExport",this.gridOptionsWrapper,null),action:function(){return r.gridApi.exportDataAsExcel()}};case"separator":return"separator";default:var c=this.getChartItems(e);return c||(console.warn("AG Grid: unknown menu item type "+e),null)}},n.prototype.getChartItems=function(e){var n=this,r=this.gridOptionsWrapper.getLocaleTextFunc(),o=function(e,t,o){return{name:r(e,t),action:function(){return n.chartService.createPivotChart({chartType:o})}}},i=function(e,t,o){return{name:r(e,t),action:function(){return n.chartService.createChartFromCurrentRange(o)}}};switch(e){case"pivotChart":return{name:r("pivotChart","Pivot Chart"),subMenu:["pivotColumnChart","pivotBarChart","pivotPieChart","pivotLineChart","pivotXYChart","pivotAreaChart"],icon:t._.createIconNoSpan("chart",this.gridOptionsWrapper,null)};case"chartRange":return{name:r("chartRange","Chart Range"),subMenu:["rangeColumnChart","rangeBarChart","rangePieChart","rangeLineChart","rangeXYChart","rangeAreaChart","rangeHistogramChart"],icon:t._.createIconNoSpan("chart",this.gridOptionsWrapper,null)};case"pivotColumnChart":return{name:r("columnChart","Column"),subMenu:["pivotGroupedColumn","pivotStackedColumn","pivotNormalizedColumn"]};case"pivotGroupedColumn":return o("groupedColumn","Grouped&lrm;",t.ChartType.GroupedColumn);case"pivotStackedColumn":return o("stackedColumn","Stacked&lrm;",t.ChartType.StackedColumn);case"pivotNormalizedColumn":return o("normalizedColumn","100% Stacked&lrm;",t.ChartType.NormalizedColumn);case"rangeColumnChart":return{name:r("columnChart","Column"),subMenu:["rangeGroupedColumn","rangeStackedColumn","rangeNormalizedColumn"]};case"rangeGroupedColumn":return i("groupedColumn","Grouped&lrm;",t.ChartType.GroupedColumn);case"rangeStackedColumn":return i("stackedColumn","Stacked&lrm;",t.ChartType.StackedColumn);case"rangeNormalizedColumn":return i("normalizedColumn","100% Stacked&lrm;",t.ChartType.NormalizedColumn);case"pivotBarChart":return{name:r("barChart","Bar"),subMenu:["pivotGroupedBar","pivotStackedBar","pivotNormalizedBar"]};case"pivotGroupedBar":return o("groupedBar","Grouped&lrm;",t.ChartType.GroupedBar);case"pivotStackedBar":return o("stackedBar","Stacked&lrm;",t.ChartType.StackedBar);case"pivotNormalizedBar":return o("normalizedBar","100% Stacked&lrm;",t.ChartType.NormalizedBar);case"rangeBarChart":return{name:r("barChart","Bar"),subMenu:["rangeGroupedBar","rangeStackedBar","rangeNormalizedBar"]};case"rangeGroupedBar":return i("groupedBar","Grouped&lrm;",t.ChartType.GroupedBar);case"rangeStackedBar":return i("stackedBar","Stacked&lrm;",t.ChartType.StackedBar);case"rangeNormalizedBar":return i("normalizedBar","100% Stacked&lrm;",t.ChartType.NormalizedBar);case"pivotPieChart":return{name:r("pieChart","Pie"),subMenu:["pivotPie","pivotDoughnut"]};case"pivotPie":return o("pie","Pie&lrm;",t.ChartType.Pie);case"pivotDoughnut":return o("doughnut","Doughnut&lrm;",t.ChartType.Doughnut);case"rangePieChart":return{name:r("pieChart","Pie"),subMenu:["rangePie","rangeDoughnut"]};case"rangePie":return i("pie","Pie&lrm;",t.ChartType.Pie);case"rangeDoughnut":return i("doughnut","Doughnut&lrm;",t.ChartType.Doughnut);case"pivotLineChart":return o("line","Line&lrm;",t.ChartType.Line);case"rangeLineChart":return i("line","Line&lrm;",t.ChartType.Line);case"pivotXYChart":return{name:r("xyChart","X Y (Scatter)"),subMenu:["pivotScatter","pivotBubble"]};case"pivotScatter":return o("scatter","Scatter&lrm;",t.ChartType.Scatter);case"pivotBubble":return o("bubble","Bubble&lrm;",t.ChartType.Bubble);case"rangeXYChart":return{name:r("xyChart","X Y (Scatter)"),subMenu:["rangeScatter","rangeBubble"]};case"rangeScatter":return i("scatter","Scatter&lrm;",t.ChartType.Scatter);case"rangeBubble":return i("bubble","Bubble&lrm;",t.ChartType.Bubble);case"pivotAreaChart":return{name:r("areaChart","Area"),subMenu:["pivotArea","pivotStackedArea","pivotNormalizedArea"]};case"pivotArea":return o("area","Area&lrm;",t.ChartType.Area);case"pivotStackedArea":return o("stackedArea","Stacked&lrm;",t.ChartType.StackedArea);case"pivotNormalizedArea":return o("normalizedArea","100% Stacked&lrm;",t.ChartType.NormalizedArea);case"rangeAreaChart":return{name:r("areaChart","Area"),subMenu:["rangeArea","rangeStackedArea","rangeNormalizedArea"]};case"rangeArea":return i("area","Area&lrm;",t.ChartType.Area);case"rangeStackedArea":return i("stackedArea","Stacked&lrm;",t.ChartType.StackedArea);case"rangeNormalizedArea":return i("normalizedArea","100% Stacked&lrm;",t.ChartType.NormalizedArea);case"rangeHistogramChart":return i("histogramChart","Histogram&lrm;",t.ChartType.Histogram);default:return null}},n.prototype.createAggregationSubMenu=function(e){var n,r=this,o=this.gridOptionsWrapper.getLocaleTextFunc(),i=e.isValueActive(),a=this.aggFuncService.getFuncNames(e);if(e.isPrimary())n=e;else{var s=e.getColDef().pivotValueColumn;n=t._.exists(s)?s:void 0}var u=[];return a.forEach((function(e){u.push({name:o(e,e),action:function(){r.columnModel.setColumnAggFunc(n,e,"contextMenu"),r.columnModel.addValueColumn(n,"contextMenu")},checked:i&&n.getAggFunc()===e})})),u},T([t.Autowired("columnModel")],n.prototype,"columnModel",void 0),T([t.Autowired("gridApi")],n.prototype,"gridApi",void 0),T([t.Optional("clipboardService")],n.prototype,"clipboardService",void 0),T([t.Optional("aggFuncService")],n.prototype,"aggFuncService",void 0),T([t.Optional("chartService")],n.prototype,"chartService",void 0),n=T([t.Bean("menuItemMapper")],n)}(t.BeanStub),S={moduleName:t.ModuleNames.MenuModule,beans:[v,M,A],dependantModules:[n.EnterpriseCoreModule]};exports.MenuItemComponent=c,exports.MenuModule=S;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("@ag-grid-community/core"),n=require("@ag-grid-enterprise/core"),r=require("@ag-grid-enterprise/column-tool-panel"),o=(e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)},function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),i=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},a=function(e){function n(t){var n=e.call(this)||this;return n.wrappedComponent=t,n.setTemplateFromElement(t.getGui()),n}return o(n,e),n.prototype.postConstruct=function(){var e=this;this.initialiseTabGuard({onTabKeyDown:function(t){return e.onTabKeyDown(t)},handleKeyDown:function(t){return e.handleKeyDown(t)}})},n.prototype.handleKeyDown=function(e){e.keyCode===t.KeyCode.ESCAPE&&this.closePanel()},n.prototype.onTabKeyDown=function(e){e.defaultPrevented||(this.closePanel(),e.preventDefault())},n.prototype.closePanel=function(){var e=this.parentComponent;e.closeSubMenu(),setTimeout((function(){return e.getGui().focus()}),0)},i([t.PostConstruct],n.prototype,"postConstruct",null),n}(t.TabGuardComp),s=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),u=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},c=function(e){function n(t){var n=e.call(this)||this;return n.params=t,n.isActive=!1,n.subMenuIsOpen=!1,n.setTemplate('<div class="'+n.getClassName()+'" tabindex="-1" role="treeitem"></div>'),n}return s(n,e),n.prototype.init=function(){var e=this;this.addIcon(),this.addName(),this.addShortcut(),this.addSubMenu(),this.addTooltip();var n=this.getGui();this.params.disabled?(this.addCssClass(this.getClassName("disabled")),t._.setAriaDisabled(n,!0)):(this.addGuiEventListener("click",(function(t){return e.onItemSelected(t)})),this.addGuiEventListener("keydown",(function(n){n.keyCode!==t.KeyCode.ENTER&&n.keyCode!==t.KeyCode.SPACE||(n.preventDefault(),e.onItemSelected(n))})),this.addGuiEventListener("mouseenter",(function(){return e.onMouseEnter()})),this.addGuiEventListener("mouseleave",(function(){return e.onMouseLeave()}))),this.params.cssClasses&&this.params.cssClasses.forEach((function(e){return t._.addCssClass(n,e)}))},n.prototype.isDisabled=function(){return!!this.params.disabled},n.prototype.openSubMenu=function(e){var r=this;if(void 0===e&&(e=!1),this.closeSubMenu(),this.params.subMenu){var o,i=t._.loadTemplate('<div class="ag-menu" role="presentation"></div>');if(this.params.subMenu instanceof Array){var s=t._.getAriaLevel(this.getGui()),u=isNaN(s)?1:s+1,c=this.createBean(new h(u));c.setParentComponent(this),c.addMenuItems(this.params.subMenu),i.appendChild(c.getGui()),this.addManagedListener(c,n.EVENT_MENU_ITEM_SELECTED,(function(e){return r.dispatchEvent(e)})),c.addGuiEventListener("mouseenter",(function(){return r.cancelDeactivate()})),o=function(){return r.destroyBean(c)},e&&setTimeout((function(){return c.activateFirstItem()}),0)}else{var p=this.params.subMenu,l=this.createBean(new a(p));l.setParentComponent(this);var d=l.getGui(),m=function(){return r.cancelDeactivate()};d.addEventListener("mouseenter",m),o=function(){return d.removeEventListener("mouseenter",m)},i.appendChild(d),p.afterGuiAttached&&setTimeout((function(){return p.afterGuiAttached()}),0)}var f=this.getGui(),v=this.popupService.positionPopupForMenu.bind(this.popupService,{eventSource:f,ePopup:i}),C=this.gridOptionsWrapper.getLocaleTextFunc(),g=this.popupService.addPopup({modal:!0,eChild:i,positionCallback:v,anchorToElement:f,ariaLabel:C("ariaLabelSubMenu","SubMenu")});this.subMenuIsOpen=!0,t._.setAriaExpanded(f,!0),this.hideSubMenu=function(){g&&g.hideFunc(),r.subMenuIsOpen=!1,t._.setAriaExpanded(f,!1),o()}}},n.prototype.closeSubMenu=function(){this.hideSubMenu&&(this.hideSubMenu(),this.hideSubMenu=null,t._.setAriaExpanded(this.getGui(),!1))},n.prototype.isSubMenuOpen=function(){return this.subMenuIsOpen},n.prototype.activate=function(e){var t=this;this.cancelActivate(),this.params.disabled||(this.isActive=!0,this.addCssClass(this.getClassName("active")),this.getGui().focus(),e&&this.params.subMenu&&window.setTimeout((function(){t.isAlive()&&t.isActive&&t.openSubMenu()}),300),this.onItemActivated())},n.prototype.deactivate=function(){this.cancelDeactivate(),this.removeCssClass(this.getClassName("active")),this.isActive=!1,this.subMenuIsOpen&&this.hideSubMenu()},n.prototype.addIcon=function(){if(this.params.checked||this.params.icon||!this.params.isCompact){var e=t._.loadTemplate('<span ref="eIcon" class="'+this.getClassName("part")+" "+this.getClassName("icon")+'" role="presentation"></span>');this.params.checked?e.appendChild(t._.createIconNoSpan("check",this.gridOptionsWrapper)):this.params.icon&&(t._.isNodeOrElement(this.params.icon)?e.appendChild(this.params.icon):"string"==typeof this.params.icon?e.innerHTML=this.params.icon:console.warn("AG Grid: menu item icon must be DOM node or string")),this.getGui().appendChild(e)}},n.prototype.addName=function(){if(this.params.name||!this.params.isCompact){var e=t._.loadTemplate('<span ref="eName" class="'+this.getClassName("part")+" "+this.getClassName("text")+'">'+(this.params.name||"")+"</span>");this.getGui().appendChild(e)}},n.prototype.addTooltip=function(){this.params.tooltip&&(this.tooltip=this.params.tooltip,this.gridOptionsWrapper.isEnableBrowserTooltips()?this.getGui().setAttribute("title",this.tooltip):this.createManagedBean(new t.CustomTooltipFeature(this)))},n.prototype.getTooltipParams=function(){return{location:"menu",value:this.tooltip}},n.prototype.addShortcut=function(){if(this.params.shortcut||!this.params.isCompact){var e=t._.loadTemplate('<span ref="eShortcut" class="'+this.getClassName("part")+" "+this.getClassName("shortcut")+'">'+(this.params.shortcut||"")+"</span>");this.getGui().appendChild(e)}},n.prototype.addSubMenu=function(){if(this.params.subMenu||!this.params.isCompact){var e=t._.loadTemplate('<span ref="ePopupPointer" class="'+this.getClassName("part")+" "+this.getClassName("popup-pointer")+'"></span>'),n=this.getGui();if(this.params.subMenu){var r=this.gridOptionsWrapper.isEnableRtl()?"smallLeft":"smallRight";t._.setAriaExpanded(n,!1),e.appendChild(t._.createIconNoSpan(r,this.gridOptionsWrapper))}n.appendChild(e)}},n.prototype.onItemSelected=function(e){if(this.params.action?this.params.action():this.openSubMenu(e&&"keydown"===e.type),!this.params.subMenu||this.params.action){var t={type:n.EVENT_MENU_ITEM_SELECTED,action:this.params.action,checked:this.params.checked,cssClasses:this.params.cssClasses,disabled:this.params.disabled,icon:this.params.icon,name:this.params.name,shortcut:this.params.shortcut,subMenu:this.params.subMenu,tooltip:this.params.tooltip,event:e};this.dispatchEvent(t)}},n.prototype.onItemActivated=function(){var e={type:n.EVENT_MENU_ITEM_ACTIVATED,menuItem:this};this.dispatchEvent(e)},n.prototype.cancelActivate=function(){this.activateTimeoutId&&(window.clearTimeout(this.activateTimeoutId),this.activateTimeoutId=0)},n.prototype.cancelDeactivate=function(){this.deactivateTimeoutId&&(window.clearTimeout(this.deactivateTimeoutId),this.deactivateTimeoutId=0)},n.prototype.onMouseEnter=function(){var e=this;this.cancelDeactivate(),this.params.isAnotherSubMenuOpen()?this.activateTimeoutId=window.setTimeout((function(){return e.activate(!0)}),n.ACTIVATION_DELAY):this.activate(!0)},n.prototype.onMouseLeave=function(){var e=this;this.cancelActivate(),this.isSubMenuOpen()?this.deactivateTimeoutId=window.setTimeout((function(){return e.deactivate()}),n.ACTIVATION_DELAY):this.deactivate()},n.prototype.getClassName=function(e){var t=this.params.isCompact?"ag-compact-menu-option":"ag-menu-option";return e?t+"-"+e:t},n.EVENT_MENU_ITEM_SELECTED="menuItemSelected",n.EVENT_MENU_ITEM_ACTIVATED="menuItemActivated",n.ACTIVATION_DELAY=80,u([t.Autowired("popupService")],n.prototype,"popupService",void 0),u([t.PostConstruct],n.prototype,"init",null),n}(t.Component),p=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),l=function(){return(l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},d=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},h=function(e){function n(t){void 0===t&&(t=1);var n=e.call(this,'<div class="ag-menu-list" role="tree"></div>')||this;return n.level=t,n.menuItems=[],n}return p(n,e),n.prototype.postConstruct=function(){var e=this;this.initialiseTabGuard({onTabKeyDown:function(t){return e.onTabKeyDown(t)},handleKeyDown:function(t){return e.handleKeyDown(t)}})},n.prototype.onTabKeyDown=function(e){var n=this.getParentComponent(),r=n&&n.getGui();r&&t._.containsClass(r,"ag-focus-managed")||e.preventDefault(),e.shiftKey&&this.closeIfIsChild(e)},n.prototype.handleKeyDown=function(e){switch(e.keyCode){case t.KeyCode.UP:case t.KeyCode.RIGHT:case t.KeyCode.DOWN:case t.KeyCode.LEFT:e.preventDefault(),this.handleNavKey(e.keyCode);break;case t.KeyCode.ESCAPE:var n=this.findTopMenu();n&&this.focusService.focusInto(n.getGui())}},n.prototype.clearActiveItem=function(){this.activeMenuItem&&(this.activeMenuItem.deactivate(),this.activeMenuItem=null)},n.prototype.addMenuItems=function(e){var t=this;null!=e&&e.forEach((function(e){"separator"===e?t.addSeparator():"string"==typeof e?console.warn("AG Grid: unrecognised menu item "+e):t.addItem(e)}))},n.prototype.addItem=function(e){var n=this,r=this.createManagedBean(new c(l(l({},e),{isAnotherSubMenuOpen:function(){return t._.some(n.menuItems,(function(e){return e.isSubMenuOpen()}))}})));r.setParentComponent(this),t._.setAriaLevel(r.getGui(),this.level),this.menuItems.push(r),this.appendChild(r.getGui()),this.addManagedListener(r,c.EVENT_MENU_ITEM_SELECTED,(function(e){n.dispatchEvent(e)})),this.addManagedListener(r,c.EVENT_MENU_ITEM_ACTIVATED,(function(e){n.activeMenuItem&&n.activeMenuItem!==e.menuItem&&n.activeMenuItem.deactivate(),n.activeMenuItem=e.menuItem}))},n.prototype.activateFirstItem=function(){var e=this.menuItems.filter((function(e){return!e.isDisabled()}))[0];e&&e.activate()},n.prototype.addSeparator=function(){this.appendChild(t._.loadTemplate('\n <div class="ag-menu-separator" aria-hidden="true">\n <div class="ag-menu-separator-part"></div>\n <div class="ag-menu-separator-part"></div>\n <div class="ag-menu-separator-part"></div>\n <div class="ag-menu-separator-part"></div>\n </div>'))},n.prototype.findTopMenu=function(){var e=this.getParentComponent();if(!e&&this instanceof n)return this;for(;;){var t=e&&e.getParentComponent&&e.getParentComponent();if(!t||!(t instanceof n||t instanceof c))break;e=t}return e instanceof n?e:void 0},n.prototype.handleNavKey=function(e){switch(e){case t.KeyCode.UP:case t.KeyCode.DOWN:var n=this.findNextItem(e===t.KeyCode.UP);return void(n&&n!==this.activeMenuItem&&n.activate())}e===(this.gridOptionsWrapper.isEnableRtl()?t.KeyCode.RIGHT:t.KeyCode.LEFT)?this.closeIfIsChild():this.openChild()},n.prototype.closeIfIsChild=function(e){var t=this.getParentComponent();t&&t instanceof c&&(e&&e.preventDefault(),t.closeSubMenu(),t.getGui().focus())},n.prototype.openChild=function(){this.activeMenuItem&&this.activeMenuItem.openSubMenu(!0)},n.prototype.findNextItem=function(e){var n=this.menuItems.filter((function(e){return!e.isDisabled()}));if(n.length){if(!this.activeMenuItem)return e?t._.last(n):n[0];var r;e&&n.reverse();for(var o=!1,i=0;i<n.length;i++){var a=n[i];if(o){r=a;break}a===this.activeMenuItem&&(o=!0)}return r||this.activeMenuItem}},n.prototype.destroy=function(){this.clearActiveItem(),e.prototype.destroy.call(this)},d([t.Autowired("focusService")],n.prototype,"focusService",void 0),d([t.PostConstruct],n.prototype,"postConstruct",null),n}(t.TabGuardComp),m=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),f=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},v=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.prototype.hideActiveMenu=function(){this.destroyBean(this.activeMenu)},n.prototype.showMenuAfterMouseEvent=function(e,t,n){var r=this;this.showMenu(e,(function(o){var i=o.getGui();r.popupService.positionPopupUnderMouseEvent({type:"columnMenu",column:e,mouseEvent:t,ePopup:i}),n&&o.showTab(n)}),"columnMenu",n,void 0,t.target)},n.prototype.showMenuAfterButtonClick=function(e,t,n,r,o){var i=this,a=-1,s="left";this.gridOptionsWrapper.isEnableRtl()&&(a=1,s="right"),this.showMenu(e,(function(o){var u=o.getGui();i.popupService.positionPopupUnderComponent({type:n,column:e,eventSource:t,ePopup:u,alignSide:s,nudgeX:9*a,nudgeY:-23,keepWithinBounds:!0}),r&&o.showTab(r)}),n,r,o,t)},n.prototype.showMenu=function(e,n,r,o,i,a){var s=this,u=this.createBean(new C(e,this.lastSelectedTab,i)),c=u.getGui(),p=a||this.ctrlsService.getGridBodyCtrl().getGui(),l=[];l.push((function(n){if(s.destroyBean(u),e.setMenuVisible(!1,"contextMenu"),n instanceof KeyboardEvent&&a&&t._.isVisible(a)){var r=s.focusService.findTabbableParent(a);r&&r.focus()}}));var d=this.gridOptionsWrapper.getLocaleTextFunc(),h=this.popupService.addPopup({modal:!0,eChild:c,closeOnEsc:!0,closedCallback:function(e){l.forEach((function(t){return t(e)}))},afterGuiAttached:function(e){return u.afterGuiAttached(t._.assign({},{container:r},e))},positionCallback:function(){return n(u)},anchorToElement:p,ariaLabel:d("ariaLabelColumnMenu","Column Menu")});if(h){var m=h.stopAnchoringPromise;m&&m.then((function(n){e.addEventListener(t.Column.EVENT_LEFT_CHANGED,n),e.addEventListener(t.Column.EVENT_VISIBLE_CHANGED,n),l.push((function(){e.removeEventListener(t.Column.EVENT_LEFT_CHANGED,n),e.removeEventListener(t.Column.EVENT_VISIBLE_CHANGED,n)}))}))}o||(u.showTabBasedOnPreviousSelection(),n(u)),u.addEventListener(C.EVENT_TAB_SELECTED,(function(e){s.lastSelectedTab=e.key})),e.setMenuVisible(!0,"contextMenu"),this.activeMenu=u,u.addEventListener(t.BeanStub.EVENT_DESTROYED,(function(){s.activeMenu===u&&(s.activeMenu=null)}))},n.prototype.isMenuEnabled=function(e){return e.getMenuTabs(C.TABS_DEFAULT).length>0},f([t.Autowired("popupService")],n.prototype,"popupService",void 0),f([t.Autowired("focusService")],n.prototype,"focusService",void 0),f([t.Autowired("ctrlsService")],n.prototype,"ctrlsService",void 0),n=f([t.Bean("menuFactory")],n)}(t.BeanStub),C=function(e){function n(t,r,o){var i=e.call(this)||this;return i.tabFactories={},i.includeChecks={},i.column=t,i.initialSelection=r,i.tabFactories[n.TAB_GENERAL]=i.createMainPanel.bind(i),i.tabFactories[n.TAB_FILTER]=i.createFilterPanel.bind(i),i.tabFactories[n.TAB_COLUMNS]=i.createColumnsPanel.bind(i),i.includeChecks[n.TAB_GENERAL]=function(){return!0},i.includeChecks[n.TAB_FILTER]=function(){return t.isFilterAllowed()},i.includeChecks[n.TAB_COLUMNS]=function(){return!0},i.restrictTo=o,i}return m(n,e),n.prototype.init=function(){var e=this,n=this.getTabsToCreate().map((function(t){return e.createTab(t)}));this.tabbedLayout=new t.TabbedLayout({items:n,cssClass:"ag-menu",onActiveItemClicked:this.onHidePopup.bind(this),onItemClicked:this.onTabItemClicked.bind(this)}),this.createBean(this.tabbedLayout),this.mainMenuList&&this.mainMenuList.setParentComponent(this.tabbedLayout)},n.prototype.getTabsToCreate=function(){var e=this;return this.restrictTo?this.restrictTo:this.column.getMenuTabs(n.TABS_DEFAULT).filter((function(t){return e.isValidMenuTabItem(t)})).filter((function(t){return e.isNotSuppressed(t)})).filter((function(t){return e.isModuleLoaded(t)}))},n.prototype.isModuleLoaded=function(e){return e!==n.TAB_COLUMNS||t.ModuleRegistry.isRegistered(t.ModuleNames.ColumnToolPanelModule)},n.prototype.isValidMenuTabItem=function(e){var t=!0,r=n.TABS_DEFAULT;return null!=this.restrictTo&&(t=this.restrictTo.indexOf(e)>-1,r=this.restrictTo),(t=t&&n.TABS_DEFAULT.indexOf(e)>-1)||console.warn("Trying to render an invalid menu item '"+e+"'. Check that your 'menuTabs' contains one of ["+r+"]"),t},n.prototype.isNotSuppressed=function(e){return this.includeChecks[e]()},n.prototype.createTab=function(e){return this.tabFactories[e]()},n.prototype.showTabBasedOnPreviousSelection=function(){this.showTab(this.initialSelection)},n.prototype.showTab=function(e){this.tabItemColumns&&e===n.TAB_COLUMNS?this.tabbedLayout.showItem(this.tabItemColumns):this.tabItemFilter&&e===n.TAB_FILTER?this.tabbedLayout.showItem(this.tabItemFilter):this.tabItemGeneral&&e===n.TAB_GENERAL?this.tabbedLayout.showItem(this.tabItemGeneral):this.tabbedLayout.showFirstItem()},n.prototype.onTabItemClicked=function(e){var t=null;switch(e.item){case this.tabItemColumns:t=n.TAB_COLUMNS;break;case this.tabItemFilter:t=n.TAB_FILTER;break;case this.tabItemGeneral:t=n.TAB_GENERAL}t&&this.activateTab(t)},n.prototype.activateTab=function(e){var t={type:n.EVENT_TAB_SELECTED,key:e};this.dispatchEvent(t)},n.prototype.getMenuItems=function(){var e,r=this.getDefaultMenuOptions(),o=this.gridOptionsWrapper.getMainMenuItemsFunc();return e=o?o({column:this.column,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext(),defaultItems:r}):r,t._.removeRepeatsFromArray(e,n.MENU_ITEM_SEPARATOR),e},n.prototype.getDefaultMenuOptions=function(){var e=[],r=!this.column.getColDef().lockPinned,o=this.columnModel.getRowGroupColumns().length,i=o>0,a=this.columnModel.getRowGroupColumns().indexOf(this.column)>=0,s=this.column.isAllowValue(),u=this.column.isAllowRowGroup(),c=this.column.isPrimary(),p=this.columnModel.isPivotMode(),l=this.rowModel.getType()===t.Constants.ROW_MODEL_TYPE_CLIENT_SIDE,d=this.gridOptionsWrapper.isTreeData(),h=c&&i&&s||!c;return r&&e.push("pinSubMenu"),h&&e.push("valueAggSubMenu"),(r||h)&&e.push(n.MENU_ITEM_SEPARATOR),e.push("autoSizeThis"),e.push("autoSizeAll"),e.push(n.MENU_ITEM_SEPARATOR),u&&this.column.isPrimary()&&(a?e.push("rowUnGroup"):e.push("rowGroup")),e.push(n.MENU_ITEM_SEPARATOR),e.push("resetColumns"),l&&(d||o>(p?1:0))&&(e.push("expandAll"),e.push("contractAll")),e},n.prototype.createMainPanel=function(){this.mainMenuList=this.createManagedBean(new h);var e=this.getMenuItems(),r=this.menuItemMapper.mapWithStockItems(e,this.column);return this.mainMenuList.addMenuItems(r),this.mainMenuList.addEventListener(c.EVENT_MENU_ITEM_SELECTED,this.onHidePopup.bind(this)),this.tabItemGeneral={title:t._.createIconNoSpan("menu",this.gridOptionsWrapper,this.column),titleLabel:n.TAB_GENERAL.replace("MenuTab",""),bodyPromise:t.AgPromise.resolve(this.mainMenuList.getGui()),name:n.TAB_GENERAL},this.tabItemGeneral},n.prototype.onHidePopup=function(){this.hidePopupFunc();var e=this.focusService.getFocusedCell();if(e){var t=e.rowIndex,n=e.rowPinned,r=e.column;this.focusService.setFocusedCell(t,r,n,!0)}},n.prototype.createFilterPanel=function(){var e=this.filterManager.getOrCreateFilterWrapper(this.column,"COLUMN_MENU");return this.tabItemFilter={title:t._.createIconNoSpan("filter",this.gridOptionsWrapper,this.column),titleLabel:n.TAB_FILTER.replace("MenuTab",""),bodyPromise:e.guiPromise,afterAttachedCallback:function(t){e.filterPromise&&e.filterPromise.then((function(e){e&&e.afterGuiAttached&&e.afterGuiAttached(t)}))},name:n.TAB_FILTER},this.tabItemFilter},n.prototype.createColumnsPanel=function(){var e=document.createElement("div");t._.addCssClass(e,"ag-menu-column-select-wrapper"),this.columnSelectPanel=this.createManagedBean(new r.PrimaryColsPanel);var o=this.column.getColDef().columnsMenuParams;return 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},"columnMenu"),t._.addCssClass(this.columnSelectPanel.getGui(),"ag-menu-column-select"),e.appendChild(this.columnSelectPanel.getGui()),this.tabItemColumns={title:t._.createIconNoSpan("columns",this.gridOptionsWrapper,this.column),titleLabel:n.TAB_COLUMNS.replace("MenuTab",""),bodyPromise:t.AgPromise.resolve(e),name:n.TAB_COLUMNS},this.tabItemColumns},n.prototype.afterGuiAttached=function(e){var t=e.container,n=e.hidePopup;this.tabbedLayout.setAfterAttachedParams({container:t,hidePopup:n}),n&&(this.hidePopupFunc=n,this.addDestroyFunc(n))},n.prototype.getGui=function(){return this.tabbedLayout.getGui()},n.EVENT_TAB_SELECTED="tabSelected",n.TAB_FILTER="filterMenuTab",n.TAB_GENERAL="generalMenuTab",n.TAB_COLUMNS="columnsMenuTab",n.TABS_DEFAULT=[n.TAB_GENERAL,n.TAB_FILTER,n.TAB_COLUMNS],n.MENU_ITEM_SEPARATOR="separator",f([t.Autowired("columnModel")],n.prototype,"columnModel",void 0),f([t.Autowired("filterManager")],n.prototype,"filterManager",void 0),f([t.Autowired("gridApi")],n.prototype,"gridApi",void 0),f([t.Autowired("columnApi")],n.prototype,"columnApi",void 0),f([t.Autowired("menuItemMapper")],n.prototype,"menuItemMapper",void 0),f([t.Autowired("rowModel")],n.prototype,"rowModel",void 0),f([t.Autowired("focusService")],n.prototype,"focusService",void 0),f([t.PostConstruct],n.prototype,"init",null),n}(t.BeanStub),g=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),y=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},M=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return g(n,e),n.prototype.hideActiveMenu=function(){this.destroyBean(this.activeMenu)},n.prototype.getMenuItems=function(e,n,r){var o=[];if(t._.exists(e)&&t.ModuleRegistry.isRegistered(t.ModuleNames.ClipboardModule)&&n&&o.push("copy","copyWithHeaders","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),s=this.gridOptionsWrapper.isSuppressExcelExport()||a,u=this.gridOptionsWrapper.isSuppressCsvExport()||i;!(t._.isIOSUserAgent()||s&&u)&&o.push("export")}if(this.gridOptionsWrapper.getContextMenuItemsFunc()){var c=this.gridOptionsWrapper.getContextMenuItemsFunc(),p={node:e,column:n,value:r,defaultItems:o.length?o:void 0,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext()};return c?c(p):void 0}return o},n.prototype.onContextMenu=function(e,t,n,r,o,i){if((this.gridOptionsWrapper.isAllowContextMenuWithControlKey()||!e||!e.ctrlKey&&!e.metaKey)&&(e&&this.preventDefaultOnContextMenu(e),!this.gridOptionsWrapper.isSuppressContextMenu())){var a=e||t.touches[0];if(this.showMenu(n,r,o,a,i))(e||t).preventDefault()}},n.prototype.preventDefaultOnContextMenu=function(e){var t=this.gridOptionsWrapper,n=e.which;(t.isPreventDefaultOnContextMenu()||t.isSuppressMiddleClickScrolls()&&2===n)&&e.preventDefault()},n.prototype.showMenu=function(e,n,r,o,i){var a=this,s=this.getMenuItems(e,n,r),u=this.ctrlsService.getGridBodyCtrl().getGui();if(void 0===s||t._.missingOrEmpty(s))return!1;var p=new b(s);this.createBean(p);var l=p.getGui(),d={column:n,rowNode:e,type:"contextMenu",mouseEvent:o,ePopup:l,nudgeY:1},h=this.gridOptionsWrapper.getLocaleTextFunc(),m=this.popupService.addPopup({modal:!0,eChild:l,closeOnEsc:!0,closedCallback:function(){t._.removeCssClass(u," ag-context-menu-open"),a.destroyBean(p)},click:o,positionCallback:function(){a.popupService.positionPopupUnderMouseEvent(t._.assign({},{nudgeX:a.gridOptionsWrapper.isEnableRtl()?-1*(l.offsetWidth+1):1},d))},anchorToElement:i,ariaLabel:h("ariaLabelContextMenu","Context Menu")});return m&&(t._.addCssClass(u," ag-context-menu-open"),p.afterGuiAttached({container:"contextMenu",hidePopup:m.hideFunc})),this.activeMenu&&this.hideActiveMenu(),this.activeMenu=p,p.addEventListener(t.BeanStub.EVENT_DESTROYED,(function(){a.activeMenu===p&&(a.activeMenu=null)})),m&&p.addEventListener(c.EVENT_MENU_ITEM_SELECTED,m.hideFunc),!0},y([t.Autowired("popupService")],n.prototype,"popupService",void 0),y([t.Optional("rangeService")],n.prototype,"rangeService",void 0),y([t.Autowired("ctrlsService")],n.prototype,"ctrlsService",void 0),y([t.Autowired("columnModel")],n.prototype,"columnModel",void 0),n=y([t.Bean("contextMenuFactory")],n)}(t.BeanStub),b=function(e){function n(t){var n=e.call(this,'<div class="ag-menu" role="presentation"></div>')||this;return n.menuList=null,n.focusedCell=null,n.menuItems=t,n}return g(n,e),n.prototype.addMenuItems=function(){var e=this,t=this.createBean(new h),n=this.menuItemMapper.mapWithStockItems(this.menuItems,null);t.addMenuItems(n),this.appendChild(t),this.menuList=t,t.addEventListener(c.EVENT_MENU_ITEM_SELECTED,(function(t){return e.dispatchEvent(t)}))},n.prototype.afterGuiAttached=function(e){e.hidePopup&&this.addDestroyFunc(e.hidePopup),this.focusedCell=this.focusService.getFocusedCell(),this.menuList&&this.focusService.focusInto(this.menuList.getGui())},n.prototype.restoreFocusedCell=function(){var e=this.focusService.getFocusedCell();if(e&&this.focusedCell&&this.cellPositionUtils.equals(e,this.focusedCell)){var t=this.focusedCell,n=t.rowIndex,r=t.rowPinned,o=t.column,i=this.gridOptionsWrapper.getDocument();i.activeElement===i.body&&this.focusService.setFocusedCell(n,o,r,!0)}},n.prototype.destroy=function(){this.restoreFocusedCell(),e.prototype.destroy.call(this)},y([t.Autowired("menuItemMapper")],n.prototype,"menuItemMapper",void 0),y([t.Autowired("focusService")],n.prototype,"focusService",void 0),y([t.Autowired("cellPositionUtils")],n.prototype,"cellPositionUtils",void 0),y([t.PostConstruct],n.prototype,"addMenuItems",null),n}(t.Component),E=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),T=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},A=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return E(n,e),n.prototype.mapWithStockItems=function(e,t){var n=this;if(!e)return[];var r=[];return e.forEach((function(e){var o;if(o="string"==typeof e?n.getStockMenuItem(e,t):e){var i=o,a=i.subMenu;a&&a instanceof Array&&(i.subMenu=n.mapWithStockItems(i.subMenu,t)),null!=o&&r.push(o)}})),r},n.prototype.getStockMenuItem=function(e,n){var r=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 r.columnModel.setColumnPinned(n,t.Constants.PINNED_LEFT,"contextMenu")},checked:!!n&&n.isPinnedLeft()};case"pinRight":return{name:o("pinRight","Pin Right"),action:function(){return r.columnModel.setColumnPinned(n,t.Constants.PINNED_RIGHT,"contextMenu")},checked:!!n&&n.isPinnedRight()};case"clearPinned":return{name:o("noPin","No Pin"),action:function(){return r.columnModel.setColumnPinned(n,null,"contextMenu")},checked:!!n&&!n.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(n)}:null;case"autoSizeThis":return{name:o("autosizeThiscolumn","Autosize This Column"),action:function(){return r.columnModel.autoSizeColumn(n,i,"contextMenu")}};case"autoSizeAll":return{name:o("autosizeAllColumns","Autosize All Columns"),action:function(){return r.columnModel.autoSizeAllColumns(i,"contextMenu")}};case"rowGroup":return{name:o("groupBy","Group by")+" "+t._.escapeString(this.columnModel.getDisplayNameForColumn(n,"header")),action:function(){return r.columnModel.addRowGroupColumn(n,"contextMenu")},icon:t._.createIconNoSpan("menuAddRowGroup",this.gridOptionsWrapper,null)};case"rowUnGroup":return{name:o("ungroupBy","Un-Group by")+" "+t._.escapeString(this.columnModel.getDisplayNameForColumn(n,"header")),action:function(){return r.columnModel.removeRowGroupColumn(n,"contextMenu")},icon:t._.createIconNoSpan("menuRemoveRowGroup",this.gridOptionsWrapper,null)};case"resetColumns":return{name:o("resetColumns","Reset Columns"),action:function(){return r.columnModel.resetColumnState("contextMenu")}};case"expandAll":return{name:o("expandAll","Expand All"),action:function(){return r.gridApi.expandAll()}};case"contractAll":return{name:o("collapseAll","Collapse All"),action:function(){return r.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 r.clipboardService.copyToClipboard(!1)}}: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 r.clipboardService.copyToClipboard(!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 r.clipboardService.pasteFromClipboard()}}:null;case"export":var a=[],s=t.ModuleRegistry.isRegistered(t.ModuleNames.CsvExportModule),u=t.ModuleRegistry.isRegistered(t.ModuleNames.ExcelExportModule);return!this.gridOptionsWrapper.isSuppressCsvExport()&&s&&a.push("csvExport"),!this.gridOptionsWrapper.isSuppressExcelExport()&&u&&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 r.gridApi.exportDataAsCsv({})}};case"excelExport":return{name:o("excelExport","Excel Export"),icon:t._.createIconNoSpan("excelExport",this.gridOptionsWrapper,null),action:function(){return r.gridApi.exportDataAsExcel()}};case"separator":return"separator";default:var c=this.getChartItems(e);return c||(console.warn("AG Grid: unknown menu item type "+e),null)}},n.prototype.getChartItems=function(e){var n=this,r=this.gridOptionsWrapper.getLocaleTextFunc(),o=function(e,t,o){return{name:r(e,t),action:function(){return n.chartService.createPivotChart({chartType:o})}}},i=function(e,t,o){return{name:r(e,t),action:function(){return n.chartService.createChartFromCurrentRange(o)}}};switch(e){case"pivotChart":return{name:r("pivotChart","Pivot Chart"),subMenu:["pivotColumnChart","pivotBarChart","pivotPieChart","pivotLineChart","pivotXYChart","pivotAreaChart"],icon:t._.createIconNoSpan("chart",this.gridOptionsWrapper,null)};case"chartRange":return{name:r("chartRange","Chart Range"),subMenu:["rangeColumnChart","rangeBarChart","rangePieChart","rangeLineChart","rangeXYChart","rangeAreaChart","rangeHistogramChart"],icon:t._.createIconNoSpan("chart",this.gridOptionsWrapper,null)};case"pivotColumnChart":return{name:r("columnChart","Column"),subMenu:["pivotGroupedColumn","pivotStackedColumn","pivotNormalizedColumn"]};case"pivotGroupedColumn":return o("groupedColumn","Grouped&lrm;",t.ChartType.GroupedColumn);case"pivotStackedColumn":return o("stackedColumn","Stacked&lrm;",t.ChartType.StackedColumn);case"pivotNormalizedColumn":return o("normalizedColumn","100% Stacked&lrm;",t.ChartType.NormalizedColumn);case"rangeColumnChart":return{name:r("columnChart","Column"),subMenu:["rangeGroupedColumn","rangeStackedColumn","rangeNormalizedColumn"]};case"rangeGroupedColumn":return i("groupedColumn","Grouped&lrm;",t.ChartType.GroupedColumn);case"rangeStackedColumn":return i("stackedColumn","Stacked&lrm;",t.ChartType.StackedColumn);case"rangeNormalizedColumn":return i("normalizedColumn","100% Stacked&lrm;",t.ChartType.NormalizedColumn);case"pivotBarChart":return{name:r("barChart","Bar"),subMenu:["pivotGroupedBar","pivotStackedBar","pivotNormalizedBar"]};case"pivotGroupedBar":return o("groupedBar","Grouped&lrm;",t.ChartType.GroupedBar);case"pivotStackedBar":return o("stackedBar","Stacked&lrm;",t.ChartType.StackedBar);case"pivotNormalizedBar":return o("normalizedBar","100% Stacked&lrm;",t.ChartType.NormalizedBar);case"rangeBarChart":return{name:r("barChart","Bar"),subMenu:["rangeGroupedBar","rangeStackedBar","rangeNormalizedBar"]};case"rangeGroupedBar":return i("groupedBar","Grouped&lrm;",t.ChartType.GroupedBar);case"rangeStackedBar":return i("stackedBar","Stacked&lrm;",t.ChartType.StackedBar);case"rangeNormalizedBar":return i("normalizedBar","100% Stacked&lrm;",t.ChartType.NormalizedBar);case"pivotPieChart":return{name:r("pieChart","Pie"),subMenu:["pivotPie","pivotDoughnut"]};case"pivotPie":return o("pie","Pie&lrm;",t.ChartType.Pie);case"pivotDoughnut":return o("doughnut","Doughnut&lrm;",t.ChartType.Doughnut);case"rangePieChart":return{name:r("pieChart","Pie"),subMenu:["rangePie","rangeDoughnut"]};case"rangePie":return i("pie","Pie&lrm;",t.ChartType.Pie);case"rangeDoughnut":return i("doughnut","Doughnut&lrm;",t.ChartType.Doughnut);case"pivotLineChart":return o("line","Line&lrm;",t.ChartType.Line);case"rangeLineChart":return i("line","Line&lrm;",t.ChartType.Line);case"pivotXYChart":return{name:r("xyChart","X Y (Scatter)"),subMenu:["pivotScatter","pivotBubble"]};case"pivotScatter":return o("scatter","Scatter&lrm;",t.ChartType.Scatter);case"pivotBubble":return o("bubble","Bubble&lrm;",t.ChartType.Bubble);case"rangeXYChart":return{name:r("xyChart","X Y (Scatter)"),subMenu:["rangeScatter","rangeBubble"]};case"rangeScatter":return i("scatter","Scatter&lrm;",t.ChartType.Scatter);case"rangeBubble":return i("bubble","Bubble&lrm;",t.ChartType.Bubble);case"pivotAreaChart":return{name:r("areaChart","Area"),subMenu:["pivotArea","pivotStackedArea","pivotNormalizedArea"]};case"pivotArea":return o("area","Area&lrm;",t.ChartType.Area);case"pivotStackedArea":return o("stackedArea","Stacked&lrm;",t.ChartType.StackedArea);case"pivotNormalizedArea":return o("normalizedArea","100% Stacked&lrm;",t.ChartType.NormalizedArea);case"rangeAreaChart":return{name:r("areaChart","Area"),subMenu:["rangeArea","rangeStackedArea","rangeNormalizedArea"]};case"rangeArea":return i("area","Area&lrm;",t.ChartType.Area);case"rangeStackedArea":return i("stackedArea","Stacked&lrm;",t.ChartType.StackedArea);case"rangeNormalizedArea":return i("normalizedArea","100% Stacked&lrm;",t.ChartType.NormalizedArea);case"rangeHistogramChart":return i("histogramChart","Histogram&lrm;",t.ChartType.Histogram);default:return null}},n.prototype.createAggregationSubMenu=function(e){var n,r=this,o=this.gridOptionsWrapper.getLocaleTextFunc(),i=e.isValueActive(),a=this.aggFuncService.getFuncNames(e);if(e.isPrimary())n=e;else{var s=e.getColDef().pivotValueColumn;n=t._.exists(s)?s:void 0}var u=[];return a.forEach((function(e){u.push({name:o(e,e),action:function(){r.columnModel.setColumnAggFunc(n,e,"contextMenu"),r.columnModel.addValueColumn(n,"contextMenu")},checked:i&&n.getAggFunc()===e})})),u},T([t.Autowired("columnModel")],n.prototype,"columnModel",void 0),T([t.Autowired("gridApi")],n.prototype,"gridApi",void 0),T([t.Optional("clipboardService")],n.prototype,"clipboardService",void 0),T([t.Optional("aggFuncService")],n.prototype,"aggFuncService",void 0),T([t.Optional("chartService")],n.prototype,"chartService",void 0),n=T([t.Bean("menuItemMapper")],n)}(t.BeanStub),S={moduleName:t.ModuleNames.MenuModule,beans:[v,M,A],dependantModules:[n.EnterpriseCoreModule]};exports.MenuItemComponent=c,exports.MenuModule=S;
/**
* @ag-grid-enterprise/menu - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components * @version v26.0.0
* @ag-grid-enterprise/menu - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components * @version v26.1.0
* @link http://www.ag-grid.com/

@@ -8,6 +8,6 @@ ' * @license Commercial

/**
* @ag-grid-enterprise/menu - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components * @version v26.0.0
* @ag-grid-enterprise/menu - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components * @version v26.1.0
* @link http://www.ag-grid.com/
' * @license Commercial
*/
import{KeyCode as e,PostConstruct as t,TabGuardComp as n,_ as r,TooltipFeature as o,Autowired as i,Component as a,Column as s,BeanStub as u,Bean as c,TabbedLayout as p,ModuleRegistry as l,ModuleNames as d,Constants as h,AgPromise as m,Optional as f,ChartType as v}from"@ag-grid-community/core";import{EnterpriseCoreModule as g}from"@ag-grid-enterprise/core";import{PrimaryColsPanel as C}from"@ag-grid-enterprise/column-tool-panel";var y,M=(y=function(e,t){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}y(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),b=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},E=function(n){function r(e){var t=n.call(this)||this;return t.wrappedComponent=e,t.setTemplateFromElement(e.getGui()),t}return M(r,n),r.prototype.postConstruct=function(){var e=this;this.initialiseTabGuard({onTabKeyDown:function(t){return e.onTabKeyDown(t)},handleKeyDown:function(t){return e.handleKeyDown(t)}})},r.prototype.handleKeyDown=function(t){t.keyCode===e.ESCAPE&&this.closePanel()},r.prototype.onTabKeyDown=function(e){e.defaultPrevented||(this.closePanel(),e.preventDefault())},r.prototype.closePanel=function(){var e=this.parentComponent;e.closeSubMenu(),setTimeout((function(){return e.getGui().focus()}),0)},b([t],r.prototype,"postConstruct",null),r}(n),S=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),A=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},T=function(n){function a(e){var t=n.call(this)||this;return t.params=e,t.isActive=!1,t.subMenuIsOpen=!1,t.setTemplate('<div class="'+t.getClassName()+'" tabindex="-1" role="treeitem"></div>'),t}return S(a,n),a.prototype.init=function(){var t=this;this.addIcon(),this.addName(),this.addShortcut(),this.addSubMenu(),this.addTooltip();var n=this.getGui();this.params.disabled?(this.addCssClass(this.getClassName("disabled")),r.setAriaDisabled(n,!0)):(this.addGuiEventListener("click",(function(e){return t.onItemSelected(e)})),this.addGuiEventListener("keydown",(function(n){n.keyCode!==e.ENTER&&n.keyCode!==e.SPACE||(n.preventDefault(),t.onItemSelected(n))})),this.addGuiEventListener("mouseenter",(function(){return t.onMouseEnter()})),this.addGuiEventListener("mouseleave",(function(){return t.onMouseLeave()}))),this.params.cssClasses&&this.params.cssClasses.forEach((function(e){return r.addCssClass(n,e)}))},a.prototype.isDisabled=function(){return!!this.params.disabled},a.prototype.openSubMenu=function(e){var t=this;if(void 0===e&&(e=!1),this.closeSubMenu(),this.params.subMenu){var n,o=r.loadTemplate('<div class="ag-menu" role="presentation"></div>');if(this.params.subMenu instanceof Array){var i=r.getAriaLevel(this.getGui()),s=isNaN(i)?1:i+1,u=this.createBean(new O(s));u.setParentComponent(this),u.addMenuItems(this.params.subMenu),o.appendChild(u.getGui()),this.addManagedListener(u,a.EVENT_MENU_ITEM_SELECTED,(function(e){return t.dispatchEvent(e)})),u.addGuiEventListener("mouseenter",(function(){return t.cancelDeactivate()})),n=function(){return t.destroyBean(u)},e&&setTimeout((function(){return u.activateFirstItem()}),0)}else{var c=this.params.subMenu,p=this.createBean(new E(c));p.setParentComponent(this);var l=p.getGui(),d=function(){return t.cancelDeactivate()};l.addEventListener("mouseenter",d),n=function(){return l.removeEventListener("mouseenter",d)},o.appendChild(l),c.afterGuiAttached&&setTimeout((function(){return c.afterGuiAttached()}),0)}var h=this.getGui(),m=this.popupService.positionPopupForMenu.bind(this.popupService,{eventSource:h,ePopup:o}),f=this.popupService.addPopup({modal:!0,eChild:o,positionCallback:m,anchorToElement:h});this.subMenuIsOpen=!0,r.setAriaExpanded(h,!0),this.hideSubMenu=function(){f&&f.hideFunc(),t.subMenuIsOpen=!1,r.setAriaExpanded(h,!1),n()}}},a.prototype.closeSubMenu=function(){this.hideSubMenu&&(this.hideSubMenu(),this.hideSubMenu=null,r.setAriaExpanded(this.getGui(),!1))},a.prototype.isSubMenuOpen=function(){return this.subMenuIsOpen},a.prototype.activate=function(e){var t=this;this.cancelActivate(),this.params.disabled||(this.isActive=!0,this.addCssClass(this.getClassName("active")),this.getGui().focus(),e&&this.params.subMenu&&window.setTimeout((function(){t.isAlive()&&t.isActive&&t.openSubMenu()}),300),this.onItemActivated())},a.prototype.deactivate=function(){this.cancelDeactivate(),this.removeCssClass(this.getClassName("active")),this.isActive=!1,this.subMenuIsOpen&&this.hideSubMenu()},a.prototype.addIcon=function(){if(this.params.checked||this.params.icon||!this.params.isCompact){var e=r.loadTemplate('<span ref="eIcon" class="'+this.getClassName("part")+" "+this.getClassName("icon")+'" role="presentation"></span>');this.params.checked?e.appendChild(r.createIconNoSpan("check",this.gridOptionsWrapper)):this.params.icon&&(r.isNodeOrElement(this.params.icon)?e.appendChild(this.params.icon):"string"==typeof this.params.icon?e.innerHTML=this.params.icon:console.warn("AG Grid: menu item icon must be DOM node or string")),this.getGui().appendChild(e)}},a.prototype.addName=function(){if(this.params.name||!this.params.isCompact){var e=r.loadTemplate('<span ref="eName" class="'+this.getClassName("part")+" "+this.getClassName("text")+'">'+(this.params.name||"")+"</span>");this.getGui().appendChild(e)}},a.prototype.addTooltip=function(){this.params.tooltip&&(this.tooltip=this.params.tooltip,this.gridOptionsWrapper.isEnableBrowserTooltips()?this.getGui().setAttribute("title",this.tooltip):this.createManagedBean(new o(this)))},a.prototype.getTooltipParams=function(){return{location:"menu",value:this.tooltip}},a.prototype.addShortcut=function(){if(this.params.shortcut||!this.params.isCompact){var e=r.loadTemplate('<span ref="eShortcut" class="'+this.getClassName("part")+" "+this.getClassName("shortcut")+'">'+(this.params.shortcut||"")+"</span>");this.getGui().appendChild(e)}},a.prototype.addSubMenu=function(){if(this.params.subMenu||!this.params.isCompact){var e=r.loadTemplate('<span ref="ePopupPointer" class="'+this.getClassName("part")+" "+this.getClassName("popup-pointer")+'"></span>'),t=this.getGui();if(this.params.subMenu){var n=this.gridOptionsWrapper.isEnableRtl()?"smallLeft":"smallRight";r.setAriaExpanded(t,!1),e.appendChild(r.createIconNoSpan(n,this.gridOptionsWrapper))}t.appendChild(e)}},a.prototype.onItemSelected=function(e){if(this.params.action?this.params.action():this.openSubMenu(e&&"keydown"===e.type),!this.params.subMenu||this.params.action){var t={type:a.EVENT_MENU_ITEM_SELECTED,action:this.params.action,checked:this.params.checked,cssClasses:this.params.cssClasses,disabled:this.params.disabled,icon:this.params.icon,name:this.params.name,shortcut:this.params.shortcut,subMenu:this.params.subMenu,tooltip:this.params.tooltip,event:e};this.dispatchEvent(t)}},a.prototype.onItemActivated=function(){var e={type:a.EVENT_MENU_ITEM_ACTIVATED,menuItem:this};this.dispatchEvent(e)},a.prototype.cancelActivate=function(){this.activateTimeoutId&&(window.clearTimeout(this.activateTimeoutId),this.activateTimeoutId=0)},a.prototype.cancelDeactivate=function(){this.deactivateTimeoutId&&(window.clearTimeout(this.deactivateTimeoutId),this.deactivateTimeoutId=0)},a.prototype.onMouseEnter=function(){var e=this;this.cancelDeactivate(),this.params.isAnotherSubMenuOpen()?this.activateTimeoutId=window.setTimeout((function(){return e.activate(!0)}),a.ACTIVATION_DELAY):this.activate(!0)},a.prototype.onMouseLeave=function(){var e=this;this.cancelActivate(),this.isSubMenuOpen()?this.deactivateTimeoutId=window.setTimeout((function(){return e.deactivate()}),a.ACTIVATION_DELAY):this.deactivate()},a.prototype.getClassName=function(e){var t=this.params.isCompact?"ag-compact-menu-option":"ag-menu-option";return e?t+"-"+e:t},a.EVENT_MENU_ITEM_SELECTED="menuItemSelected",a.EVENT_MENU_ITEM_ACTIVATED="menuItemActivated",a.ACTIVATION_DELAY=80,A([i("popupService")],a.prototype,"popupService",void 0),A([t],a.prototype,"init",null),a}(a),I=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),P=function(){return(P=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},_=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},O=function(n){function o(e){void 0===e&&(e=1);var t=n.call(this,'<div class="ag-menu-list" role="tree"></div>')||this;return t.level=e,t.menuItems=[],t}return I(o,n),o.prototype.postConstruct=function(){var e=this;this.initialiseTabGuard({onTabKeyDown:function(t){return e.onTabKeyDown(t)},handleKeyDown:function(t){return e.handleKeyDown(t)}})},o.prototype.onTabKeyDown=function(e){var t=this.getParentComponent(),n=t&&t.getGui();n&&r.containsClass(n,"ag-focus-managed")||e.preventDefault(),e.shiftKey&&this.closeIfIsChild(e)},o.prototype.handleKeyDown=function(t){switch(t.keyCode){case e.UP:case e.RIGHT:case e.DOWN:case e.LEFT:t.preventDefault(),this.handleNavKey(t.keyCode);break;case e.ESCAPE:var n=this.findTopMenu();n&&this.focusService.focusInto(n.getGui())}},o.prototype.clearActiveItem=function(){this.activeMenuItem&&(this.activeMenuItem.deactivate(),this.activeMenuItem=null)},o.prototype.addMenuItems=function(e){var t=this;null!=e&&e.forEach((function(e){"separator"===e?t.addSeparator():"string"==typeof e?console.warn("AG Grid: unrecognised menu item "+e):t.addItem(e)}))},o.prototype.addItem=function(e){var t=this,n=this.createManagedBean(new T(P(P({},e),{isAnotherSubMenuOpen:function(){return r.some(t.menuItems,(function(e){return e.isSubMenuOpen()}))}})));n.setParentComponent(this),r.setAriaLevel(n.getGui(),this.level),this.menuItems.push(n),this.appendChild(n.getGui()),this.addManagedListener(n,T.EVENT_MENU_ITEM_SELECTED,(function(e){t.dispatchEvent(e)})),this.addManagedListener(n,T.EVENT_MENU_ITEM_ACTIVATED,(function(e){t.activeMenuItem&&t.activeMenuItem!==e.menuItem&&t.activeMenuItem.deactivate(),t.activeMenuItem=e.menuItem}))},o.prototype.activateFirstItem=function(){var e=this.menuItems.filter((function(e){return!e.isDisabled()}))[0];e&&e.activate()},o.prototype.addSeparator=function(){this.appendChild(r.loadTemplate('\n <div class="ag-menu-separator" aria-hidden="true">\n <div class="ag-menu-separator-part"></div>\n <div class="ag-menu-separator-part"></div>\n <div class="ag-menu-separator-part"></div>\n <div class="ag-menu-separator-part"></div>\n </div>'))},o.prototype.findTopMenu=function(){var e=this.getParentComponent();if(!e&&this instanceof o)return this;for(;;){var t=e&&e.getParentComponent&&e.getParentComponent();if(!t||!(t instanceof o||t instanceof T))break;e=t}return e instanceof o?e:void 0},o.prototype.handleNavKey=function(t){switch(t){case e.UP:case e.DOWN:var n=this.findNextItem(t===e.UP);return void(n&&n!==this.activeMenuItem&&n.activate())}t===(this.gridOptionsWrapper.isEnableRtl()?e.RIGHT:e.LEFT)?this.closeIfIsChild():this.openChild()},o.prototype.closeIfIsChild=function(e){var t=this.getParentComponent();t&&t instanceof T&&(e&&e.preventDefault(),t.closeSubMenu(),t.getGui().focus())},o.prototype.openChild=function(){this.activeMenuItem&&this.activeMenuItem.openSubMenu(!0)},o.prototype.findNextItem=function(e){var t=this.menuItems.filter((function(e){return!e.isDisabled()}));if(t.length){if(!this.activeMenuItem)return e?r.last(t):t[0];var n;e&&t.reverse();for(var o=!1,i=0;i<t.length;i++){var a=t[i];if(o){n=a;break}a===this.activeMenuItem&&(o=!0)}return n||this.activeMenuItem}},o.prototype.destroy=function(){this.clearActiveItem(),n.prototype.destroy.call(this)},_([i("focusService")],o.prototype,"focusService",void 0),_([t],o.prototype,"postConstruct",null),o}(n),N=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),L=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},w=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return N(t,e),t.prototype.hideActiveMenu=function(){this.destroyBean(this.activeMenu)},t.prototype.showMenuAfterMouseEvent=function(e,t,n){var r=this;this.showMenu(e,(function(o){var i=o.getGui();r.popupService.positionPopupUnderMouseEvent({type:"columnMenu",column:e,mouseEvent:t,ePopup:i}),n&&o.showTab(n)}),"columnMenu",n,void 0,t.target)},t.prototype.showMenuAfterButtonClick=function(e,t,n,r,o){var i=this,a=-1,s="left";this.gridOptionsWrapper.isEnableRtl()&&(a=1,s="right"),this.showMenu(e,(function(o){var u=o.getGui();i.popupService.positionPopupUnderComponent({type:n,column:e,eventSource:t,ePopup:u,alignSide:s,nudgeX:9*a,nudgeY:-23,keepWithinBounds:!0}),r&&o.showTab(r)}),n,r,o,t)},t.prototype.showMenu=function(e,t,n,o,i,a){var c=this,p=this.createBean(new G(e,this.lastSelectedTab,i)),l=p.getGui(),d=a||this.ctrlsService.getGridBodyCtrl().getGui(),h=[];h.push((function(t){if(c.destroyBean(p),e.setMenuVisible(!1,"contextMenu"),t instanceof KeyboardEvent&&a&&r.isVisible(a)){var n=c.focusService.findTabbableParent(a);n&&n.focus()}}));var m=this.popupService.addPopup({modal:!0,eChild:l,closeOnEsc:!0,closedCallback:function(e){h.forEach((function(t){return t(e)}))},afterGuiAttached:function(e){return p.afterGuiAttached(r.assign({},{container:n},e))},positionCallback:function(){return t(p)},anchorToElement:d});if(m){var f=m.stopAnchoringPromise;f&&f.then((function(t){e.addEventListener(s.EVENT_LEFT_CHANGED,t),e.addEventListener(s.EVENT_VISIBLE_CHANGED,t),h.push((function(){e.removeEventListener(s.EVENT_LEFT_CHANGED,t),e.removeEventListener(s.EVENT_VISIBLE_CHANGED,t)}))}))}o||(p.showTabBasedOnPreviousSelection(),t(p)),p.addEventListener(G.EVENT_TAB_SELECTED,(function(e){c.lastSelectedTab=e.key})),e.setMenuVisible(!0,"contextMenu"),this.activeMenu=p,p.addEventListener(u.EVENT_DESTROYED,(function(){c.activeMenu===p&&(c.activeMenu=null)}))},t.prototype.isMenuEnabled=function(e){return e.getMenuTabs(G.TABS_DEFAULT).length>0},L([i("popupService")],t.prototype,"popupService",void 0),L([i("focusService")],t.prototype,"focusService",void 0),L([i("ctrlsService")],t.prototype,"ctrlsService",void 0),t=L([c("menuFactory")],t)}(u),G=function(e){function n(t,r,o){var i=e.call(this)||this;return i.tabFactories={},i.includeChecks={},i.column=t,i.initialSelection=r,i.tabFactories[n.TAB_GENERAL]=i.createMainPanel.bind(i),i.tabFactories[n.TAB_FILTER]=i.createFilterPanel.bind(i),i.tabFactories[n.TAB_COLUMNS]=i.createColumnsPanel.bind(i),i.includeChecks[n.TAB_GENERAL]=function(){return!0},i.includeChecks[n.TAB_FILTER]=function(){return t.isFilterAllowed()},i.includeChecks[n.TAB_COLUMNS]=function(){return!0},i.restrictTo=o,i}return N(n,e),n.prototype.init=function(){var e=this,t=this.getTabsToCreate().map((function(t){return e.createTab(t)}));this.tabbedLayout=new p({items:t,cssClass:"ag-menu",onActiveItemClicked:this.onHidePopup.bind(this),onItemClicked:this.onTabItemClicked.bind(this)}),this.createBean(this.tabbedLayout),this.mainMenuList&&this.mainMenuList.setParentComponent(this.tabbedLayout)},n.prototype.getTabsToCreate=function(){var e=this;return this.restrictTo?this.restrictTo:this.column.getMenuTabs(n.TABS_DEFAULT).filter((function(t){return e.isValidMenuTabItem(t)})).filter((function(t){return e.isNotSuppressed(t)})).filter((function(t){return e.isModuleLoaded(t)}))},n.prototype.isModuleLoaded=function(e){return e!==n.TAB_COLUMNS||l.isRegistered(d.ColumnToolPanelModule)},n.prototype.isValidMenuTabItem=function(e){var t=!0,r=n.TABS_DEFAULT;return null!=this.restrictTo&&(t=this.restrictTo.indexOf(e)>-1,r=this.restrictTo),(t=t&&n.TABS_DEFAULT.indexOf(e)>-1)||console.warn("Trying to render an invalid menu item '"+e+"'. Check that your 'menuTabs' contains one of ["+r+"]"),t},n.prototype.isNotSuppressed=function(e){return this.includeChecks[e]()},n.prototype.createTab=function(e){return this.tabFactories[e]()},n.prototype.showTabBasedOnPreviousSelection=function(){this.showTab(this.initialSelection)},n.prototype.showTab=function(e){this.tabItemColumns&&e===n.TAB_COLUMNS?this.tabbedLayout.showItem(this.tabItemColumns):this.tabItemFilter&&e===n.TAB_FILTER?this.tabbedLayout.showItem(this.tabItemFilter):this.tabItemGeneral&&e===n.TAB_GENERAL?this.tabbedLayout.showItem(this.tabItemGeneral):this.tabbedLayout.showFirstItem()},n.prototype.onTabItemClicked=function(e){var t=null;switch(e.item){case this.tabItemColumns:t=n.TAB_COLUMNS;break;case this.tabItemFilter:t=n.TAB_FILTER;break;case this.tabItemGeneral:t=n.TAB_GENERAL}t&&this.activateTab(t)},n.prototype.activateTab=function(e){var t={type:n.EVENT_TAB_SELECTED,key:e};this.dispatchEvent(t)},n.prototype.getMenuItems=function(){var e,t=this.getDefaultMenuOptions(),o=this.gridOptionsWrapper.getMainMenuItemsFunc();return e=o?o({column:this.column,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext(),defaultItems:t}):t,r.removeRepeatsFromArray(e,n.MENU_ITEM_SEPARATOR),e},n.prototype.getDefaultMenuOptions=function(){var e=[],t=!this.column.getColDef().lockPinned,r=this.columnModel.getRowGroupColumns().length,o=r>0,i=this.columnModel.getRowGroupColumns().indexOf(this.column)>=0,a=this.column.isAllowValue(),s=this.column.isAllowRowGroup(),u=this.column.isPrimary(),c=this.columnModel.isPivotMode(),p=this.rowModel.getType()===h.ROW_MODEL_TYPE_CLIENT_SIDE,l=this.gridOptionsWrapper.isTreeData(),d=u&&o&&a||!u;return t&&e.push("pinSubMenu"),d&&e.push("valueAggSubMenu"),(t||d)&&e.push(n.MENU_ITEM_SEPARATOR),e.push("autoSizeThis"),e.push("autoSizeAll"),e.push(n.MENU_ITEM_SEPARATOR),s&&this.column.isPrimary()&&(i?e.push("rowUnGroup"):e.push("rowGroup")),e.push(n.MENU_ITEM_SEPARATOR),e.push("resetColumns"),p&&(l||r>(c?1:0))&&(e.push("expandAll"),e.push("contractAll")),e},n.prototype.createMainPanel=function(){this.mainMenuList=this.createManagedBean(new O);var e=this.getMenuItems(),t=this.menuItemMapper.mapWithStockItems(e,this.column);return this.mainMenuList.addMenuItems(t),this.mainMenuList.addEventListener(T.EVENT_MENU_ITEM_SELECTED,this.onHidePopup.bind(this)),this.tabItemGeneral={title:r.createIconNoSpan("menu",this.gridOptionsWrapper,this.column),titleLabel:n.TAB_GENERAL.replace("MenuTab",""),bodyPromise:m.resolve(this.mainMenuList.getGui()),name:n.TAB_GENERAL},this.tabItemGeneral},n.prototype.onHidePopup=function(){this.hidePopupFunc();var e=this.focusService.getFocusedCell();if(e){var t=e.rowIndex,n=e.rowPinned,r=e.column;this.focusService.setFocusedCell(t,r,n,!0)}},n.prototype.createFilterPanel=function(){var e=this.filterManager.getOrCreateFilterWrapper(this.column,"COLUMN_MENU");return this.tabItemFilter={title:r.createIconNoSpan("filter",this.gridOptionsWrapper,this.column),titleLabel:n.TAB_FILTER.replace("MenuTab",""),bodyPromise:e.guiPromise,afterAttachedCallback:function(t){e.filterPromise&&e.filterPromise.then((function(e){e&&e.afterGuiAttached&&e.afterGuiAttached(t)}))},name:n.TAB_FILTER},this.tabItemFilter},n.prototype.createColumnsPanel=function(){var e=document.createElement("div");r.addCssClass(e,"ag-menu-column-select-wrapper"),this.columnSelectPanel=this.createManagedBean(new C);var t=this.column.getColDef().columnsMenuParams;return t||(t={}),this.columnSelectPanel.init(!1,{suppressValues:!1,suppressPivots:!1,suppressRowGroups:!1,suppressPivotMode:!1,contractColumnSelection:!!t.contractColumnSelection,suppressColumnExpandAll:!!t.suppressColumnExpandAll,suppressColumnFilter:!!t.suppressColumnFilter,suppressColumnSelectAll:!!t.suppressColumnSelectAll,suppressSyncLayoutWithGrid:!!t.suppressSyncLayoutWithGrid,api:this.gridApi,columnApi:this.columnApi},"columnMenu"),r.addCssClass(this.columnSelectPanel.getGui(),"ag-menu-column-select"),e.appendChild(this.columnSelectPanel.getGui()),this.tabItemColumns={title:r.createIconNoSpan("columns",this.gridOptionsWrapper,this.column),titleLabel:n.TAB_COLUMNS.replace("MenuTab",""),bodyPromise:m.resolve(e),name:n.TAB_COLUMNS},this.tabItemColumns},n.prototype.afterGuiAttached=function(e){var t=e.container,n=e.hidePopup;this.tabbedLayout.setAfterAttachedParams({container:t,hidePopup:n}),n&&(this.hidePopupFunc=n,this.addDestroyFunc(n))},n.prototype.getGui=function(){return this.tabbedLayout.getGui()},n.EVENT_TAB_SELECTED="tabSelected",n.TAB_FILTER="filterMenuTab",n.TAB_GENERAL="generalMenuTab",n.TAB_COLUMNS="columnsMenuTab",n.TABS_DEFAULT=[n.TAB_GENERAL,n.TAB_FILTER,n.TAB_COLUMNS],n.MENU_ITEM_SEPARATOR="separator",L([i("columnModel")],n.prototype,"columnModel",void 0),L([i("filterManager")],n.prototype,"filterManager",void 0),L([i("gridApi")],n.prototype,"gridApi",void 0),L([i("columnApi")],n.prototype,"columnApi",void 0),L([i("menuItemMapper")],n.prototype,"menuItemMapper",void 0),L([i("rowModel")],n.prototype,"rowModel",void 0),L([i("focusService")],n.prototype,"focusService",void 0),L([t],n.prototype,"init",null),n}(u),B=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),D=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},x=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return B(t,e),t.prototype.hideActiveMenu=function(){this.destroyBean(this.activeMenu)},t.prototype.getMenuItems=function(e,t,n){var o=[];if(r.exists(e)&&l.isRegistered(d.ClipboardModule)&&t&&o.push("copy","copyWithHeaders","paste","separator"),this.gridOptionsWrapper.isEnableCharts()&&l.isRegistered(d.RangeSelectionModule)&&l.isRegistered(d.GridChartsModule)&&(this.columnModel.isPivotMode()&&o.push("pivotChart"),this.rangeService&&!this.rangeService.isEmpty()&&o.push("chartRange")),r.exists(e)){var i=!l.isRegistered(d.CsvExportModule),a=!l.isRegistered(d.ExcelExportModule),s=this.gridOptionsWrapper.isSuppressExcelExport()||a,u=this.gridOptionsWrapper.isSuppressCsvExport()||i;!(r.isIOSUserAgent()||s&&u)&&o.push("export")}if(this.gridOptionsWrapper.getContextMenuItemsFunc()){var c=this.gridOptionsWrapper.getContextMenuItemsFunc(),p={node:e,column:t,value:n,defaultItems:o.length?o:void 0,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext()};return c?c(p):void 0}return o},t.prototype.onContextMenu=function(e,t,n,r,o,i){if((this.gridOptionsWrapper.isAllowContextMenuWithControlKey()||!e||!e.ctrlKey&&!e.metaKey)&&(e&&this.preventDefaultOnContextMenu(e),!this.gridOptionsWrapper.isSuppressContextMenu())){var a=e||t.touches[0];if(this.showMenu(n,r,o,a,i))(e||t).preventDefault()}},t.prototype.preventDefaultOnContextMenu=function(e){var t=this.gridOptionsWrapper,n=e.which;(t.isPreventDefaultOnContextMenu()||t.isSuppressMiddleClickScrolls()&&2===n)&&e.preventDefault()},t.prototype.showMenu=function(e,t,n,o,i){var a=this,s=this.getMenuItems(e,t,n),c=this.ctrlsService.getGridBodyCtrl().getGui();if(void 0===s||r.missingOrEmpty(s))return!1;var p=new R(s);this.createBean(p);var l=p.getGui(),d={column:t,rowNode:e,type:"contextMenu",mouseEvent:o,ePopup:l,nudgeY:1},h=this.popupService.addPopup({modal:!0,eChild:l,closeOnEsc:!0,closedCallback:function(){r.removeCssClass(c," ag-context-menu-open"),a.destroyBean(p)},click:o,positionCallback:function(){a.popupService.positionPopupUnderMouseEvent(r.assign({},{nudgeX:a.gridOptionsWrapper.isEnableRtl()?-1*(l.offsetWidth+1):1},d))},anchorToElement:i});return h&&(r.addCssClass(c," ag-context-menu-open"),p.afterGuiAttached({container:"contextMenu",hidePopup:h.hideFunc})),this.activeMenu&&this.hideActiveMenu(),this.activeMenu=p,p.addEventListener(u.EVENT_DESTROYED,(function(){a.activeMenu===p&&(a.activeMenu=null)})),h&&p.addEventListener(T.EVENT_MENU_ITEM_SELECTED,h.hideFunc),!0},D([i("popupService")],t.prototype,"popupService",void 0),D([f("rangeService")],t.prototype,"rangeService",void 0),D([i("ctrlsService")],t.prototype,"ctrlsService",void 0),D([i("columnModel")],t.prototype,"columnModel",void 0),t=D([c("contextMenuFactory")],t)}(u),R=function(e){function n(t){var n=e.call(this,'<div class="ag-menu" role="presentation"></div>')||this;return n.menuList=null,n.focusedCell=null,n.menuItems=t,n}return B(n,e),n.prototype.addMenuItems=function(){var e=this,t=this.createBean(new O),n=this.menuItemMapper.mapWithStockItems(this.menuItems,null);t.addMenuItems(n),this.appendChild(t),this.menuList=t,t.addEventListener(T.EVENT_MENU_ITEM_SELECTED,(function(t){return e.dispatchEvent(t)}))},n.prototype.afterGuiAttached=function(e){e.hidePopup&&this.addDestroyFunc(e.hidePopup),this.focusedCell=this.focusService.getFocusedCell(),this.menuList&&this.focusService.focusInto(this.menuList.getGui())},n.prototype.restoreFocusedCell=function(){var e=this.focusService.getFocusedCell();if(e&&this.focusedCell&&this.cellPositionUtils.equals(e,this.focusedCell)){var t=this.focusedCell,n=t.rowIndex,r=t.rowPinned,o=t.column,i=this.gridOptionsWrapper.getDocument();i.activeElement===i.body&&this.focusService.setFocusedCell(n,o,r,!0)}},n.prototype.destroy=function(){this.restoreFocusedCell(),e.prototype.destroy.call(this)},D([i("menuItemMapper")],n.prototype,"menuItemMapper",void 0),D([i("focusService")],n.prototype,"focusService",void 0),D([i("cellPositionUtils")],n.prototype,"cellPositionUtils",void 0),D([t],n.prototype,"addMenuItems",null),n}(a),k=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),F=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},W=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return k(t,e),t.prototype.mapWithStockItems=function(e,t){var n=this;if(!e)return[];var r=[];return e.forEach((function(e){var o;if(o="string"==typeof e?n.getStockMenuItem(e,t):e){var i=o,a=i.subMenu;a&&a instanceof Array&&(i.subMenu=n.mapWithStockItems(i.subMenu,t)),null!=o&&r.push(o)}})),r},t.prototype.getStockMenuItem=function(e,t){var n=this,o=this.gridOptionsWrapper.getLocaleTextFunc(),i=this.gridOptionsWrapper.isSkipHeaderOnAutoSize();switch(e){case"pinSubMenu":return{name:o("pinColumn","Pin Column"),icon:r.createIconNoSpan("menuPin",this.gridOptionsWrapper,null),subMenu:["pinLeft","pinRight","clearPinned"]};case"pinLeft":return{name:o("pinLeft","Pin Left"),action:function(){return n.columnModel.setColumnPinned(t,h.PINNED_LEFT,"contextMenu")},checked:!!t&&t.isPinnedLeft()};case"pinRight":return{name:o("pinRight","Pin Right"),action:function(){return n.columnModel.setColumnPinned(t,h.PINNED_RIGHT,"contextMenu")},checked:!!t&&t.isPinnedRight()};case"clearPinned":return{name:o("noPin","No Pin"),action:function(){return n.columnModel.setColumnPinned(t,null,"contextMenu")},checked:!!t&&!t.isPinned()};case"valueAggSubMenu":return l.assertRegistered(d.RowGroupingModule,"Aggregation from Menu")?{name:o("valueAggregation","Value Aggregation"),icon:r.createIconNoSpan("menuValue",this.gridOptionsWrapper,null),subMenu:this.createAggregationSubMenu(t)}:null;case"autoSizeThis":return{name:o("autosizeThiscolumn","Autosize This Column"),action:function(){return n.columnModel.autoSizeColumn(t,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")+" "+r.escapeString(this.columnModel.getDisplayNameForColumn(t,"header")),action:function(){return n.columnModel.addRowGroupColumn(t,"contextMenu")},icon:r.createIconNoSpan("menuAddRowGroup",this.gridOptionsWrapper,null)};case"rowUnGroup":return{name:o("ungroupBy","Un-Group by")+" "+r.escapeString(this.columnModel.getDisplayNameForColumn(t,"header")),action:function(){return n.columnModel.removeRowGroupColumn(t,"contextMenu")},icon:r.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 l.assertRegistered(d.ClipboardModule,"Copy from Menu")?{name:o("copy","Copy"),shortcut:o("ctrlC","Ctrl+C"),icon:r.createIconNoSpan("clipboardCopy",this.gridOptionsWrapper,null),action:function(){return n.clipboardService.copyToClipboard(!1)}}:null;case"copyWithHeaders":return l.assertRegistered(d.ClipboardModule,"Copy with Headers from Menu")?{name:o("copyWithHeaders","Copy with Headers"),icon:r.createIconNoSpan("clipboardCopy",this.gridOptionsWrapper,null),action:function(){return n.clipboardService.copyToClipboard(!0)}}:null;case"paste":return l.assertRegistered(d.ClipboardModule,"Paste from Clipboard")?{name:o("paste","Paste"),shortcut:o("ctrlV","Ctrl+V"),disabled:!0,icon:r.createIconNoSpan("clipboardPaste",this.gridOptionsWrapper,null),action:function(){return n.clipboardService.pasteFromClipboard()}}:null;case"export":var a=[],s=l.isRegistered(d.CsvExportModule),u=l.isRegistered(d.ExcelExportModule);return!this.gridOptionsWrapper.isSuppressCsvExport()&&s&&a.push("csvExport"),!this.gridOptionsWrapper.isSuppressExcelExport()&&u&&a.push("excelExport"),{name:o("export","Export"),subMenu:a,icon:r.createIconNoSpan("save",this.gridOptionsWrapper,null)};case"csvExport":return{name:o("csvExport","CSV Export"),icon:r.createIconNoSpan("csvExport",this.gridOptionsWrapper,null),action:function(){return n.gridApi.exportDataAsCsv({})}};case"excelExport":return{name:o("excelExport","Excel Export"),icon:r.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)}},t.prototype.getChartItems=function(e){var t=this,n=this.gridOptionsWrapper.getLocaleTextFunc(),o=function(e,r,o){return{name:n(e,r),action:function(){return t.chartService.createPivotChart({chartType:o})}}},i=function(e,r,o){return{name:n(e,r),action:function(){return t.chartService.createChartFromCurrentRange(o)}}};switch(e){case"pivotChart":return{name:n("pivotChart","Pivot Chart"),subMenu:["pivotColumnChart","pivotBarChart","pivotPieChart","pivotLineChart","pivotXYChart","pivotAreaChart"],icon:r.createIconNoSpan("chart",this.gridOptionsWrapper,null)};case"chartRange":return{name:n("chartRange","Chart Range"),subMenu:["rangeColumnChart","rangeBarChart","rangePieChart","rangeLineChart","rangeXYChart","rangeAreaChart","rangeHistogramChart"],icon:r.createIconNoSpan("chart",this.gridOptionsWrapper,null)};case"pivotColumnChart":return{name:n("columnChart","Column"),subMenu:["pivotGroupedColumn","pivotStackedColumn","pivotNormalizedColumn"]};case"pivotGroupedColumn":return o("groupedColumn","Grouped&lrm;",v.GroupedColumn);case"pivotStackedColumn":return o("stackedColumn","Stacked&lrm;",v.StackedColumn);case"pivotNormalizedColumn":return o("normalizedColumn","100% Stacked&lrm;",v.NormalizedColumn);case"rangeColumnChart":return{name:n("columnChart","Column"),subMenu:["rangeGroupedColumn","rangeStackedColumn","rangeNormalizedColumn"]};case"rangeGroupedColumn":return i("groupedColumn","Grouped&lrm;",v.GroupedColumn);case"rangeStackedColumn":return i("stackedColumn","Stacked&lrm;",v.StackedColumn);case"rangeNormalizedColumn":return i("normalizedColumn","100% Stacked&lrm;",v.NormalizedColumn);case"pivotBarChart":return{name:n("barChart","Bar"),subMenu:["pivotGroupedBar","pivotStackedBar","pivotNormalizedBar"]};case"pivotGroupedBar":return o("groupedBar","Grouped&lrm;",v.GroupedBar);case"pivotStackedBar":return o("stackedBar","Stacked&lrm;",v.StackedBar);case"pivotNormalizedBar":return o("normalizedBar","100% Stacked&lrm;",v.NormalizedBar);case"rangeBarChart":return{name:n("barChart","Bar"),subMenu:["rangeGroupedBar","rangeStackedBar","rangeNormalizedBar"]};case"rangeGroupedBar":return i("groupedBar","Grouped&lrm;",v.GroupedBar);case"rangeStackedBar":return i("stackedBar","Stacked&lrm;",v.StackedBar);case"rangeNormalizedBar":return i("normalizedBar","100% Stacked&lrm;",v.NormalizedBar);case"pivotPieChart":return{name:n("pieChart","Pie"),subMenu:["pivotPie","pivotDoughnut"]};case"pivotPie":return o("pie","Pie&lrm;",v.Pie);case"pivotDoughnut":return o("doughnut","Doughnut&lrm;",v.Doughnut);case"rangePieChart":return{name:n("pieChart","Pie"),subMenu:["rangePie","rangeDoughnut"]};case"rangePie":return i("pie","Pie&lrm;",v.Pie);case"rangeDoughnut":return i("doughnut","Doughnut&lrm;",v.Doughnut);case"pivotLineChart":return o("line","Line&lrm;",v.Line);case"rangeLineChart":return i("line","Line&lrm;",v.Line);case"pivotXYChart":return{name:n("xyChart","X Y (Scatter)"),subMenu:["pivotScatter","pivotBubble"]};case"pivotScatter":return o("scatter","Scatter&lrm;",v.Scatter);case"pivotBubble":return o("bubble","Bubble&lrm;",v.Bubble);case"rangeXYChart":return{name:n("xyChart","X Y (Scatter)"),subMenu:["rangeScatter","rangeBubble"]};case"rangeScatter":return i("scatter","Scatter&lrm;",v.Scatter);case"rangeBubble":return i("bubble","Bubble&lrm;",v.Bubble);case"pivotAreaChart":return{name:n("areaChart","Area"),subMenu:["pivotArea","pivotStackedArea","pivotNormalizedArea"]};case"pivotArea":return o("area","Area&lrm;",v.Area);case"pivotStackedArea":return o("stackedArea","Stacked&lrm;",v.StackedArea);case"pivotNormalizedArea":return o("normalizedArea","100% Stacked&lrm;",v.NormalizedArea);case"rangeAreaChart":return{name:n("areaChart","Area"),subMenu:["rangeArea","rangeStackedArea","rangeNormalizedArea"]};case"rangeArea":return i("area","Area&lrm;",v.Area);case"rangeStackedArea":return i("stackedArea","Stacked&lrm;",v.StackedArea);case"rangeNormalizedArea":return i("normalizedArea","100% Stacked&lrm;",v.NormalizedArea);case"rangeHistogramChart":return i("histogramChart","Histogram&lrm;",v.Histogram);default:return null}},t.prototype.createAggregationSubMenu=function(e){var t,n=this,o=this.gridOptionsWrapper.getLocaleTextFunc(),i=e.isValueActive(),a=this.aggFuncService.getFuncNames(e);if(e.isPrimary())t=e;else{var s=e.getColDef().pivotValueColumn;t=r.exists(s)?s:void 0}var u=[];return a.forEach((function(e){u.push({name:o(e,e),action:function(){n.columnModel.setColumnAggFunc(t,e,"contextMenu"),n.columnModel.addValueColumn(t,"contextMenu")},checked:i&&t.getAggFunc()===e})})),u},F([i("columnModel")],t.prototype,"columnModel",void 0),F([i("gridApi")],t.prototype,"gridApi",void 0),F([f("clipboardService")],t.prototype,"clipboardService",void 0),F([f("aggFuncService")],t.prototype,"aggFuncService",void 0),F([f("chartService")],t.prototype,"chartService",void 0),t=F([c("menuItemMapper")],t)}(u),U={moduleName:d.MenuModule,beans:[w,x,W],dependantModules:[g]};export{T as MenuItemComponent,U as MenuModule};
import{KeyCode as e,PostConstruct as t,TabGuardComp as n,_ as r,CustomTooltipFeature as o,Autowired as i,Component as a,Column as s,BeanStub as u,Bean as c,TabbedLayout as p,ModuleRegistry as l,ModuleNames as d,Constants as h,AgPromise as m,Optional as f,ChartType as v}from"@ag-grid-community/core";import{EnterpriseCoreModule as g}from"@ag-grid-enterprise/core";import{PrimaryColsPanel as C}from"@ag-grid-enterprise/column-tool-panel";var M,y=(M=function(e,t){return(M=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}M(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),b=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},E=function(n){function r(e){var t=n.call(this)||this;return t.wrappedComponent=e,t.setTemplateFromElement(e.getGui()),t}return y(r,n),r.prototype.postConstruct=function(){var e=this;this.initialiseTabGuard({onTabKeyDown:function(t){return e.onTabKeyDown(t)},handleKeyDown:function(t){return e.handleKeyDown(t)}})},r.prototype.handleKeyDown=function(t){t.keyCode===e.ESCAPE&&this.closePanel()},r.prototype.onTabKeyDown=function(e){e.defaultPrevented||(this.closePanel(),e.preventDefault())},r.prototype.closePanel=function(){var e=this.parentComponent;e.closeSubMenu(),setTimeout((function(){return e.getGui().focus()}),0)},b([t],r.prototype,"postConstruct",null),r}(n),S=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),A=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},T=function(n){function a(e){var t=n.call(this)||this;return t.params=e,t.isActive=!1,t.subMenuIsOpen=!1,t.setTemplate('<div class="'+t.getClassName()+'" tabindex="-1" role="treeitem"></div>'),t}return S(a,n),a.prototype.init=function(){var t=this;this.addIcon(),this.addName(),this.addShortcut(),this.addSubMenu(),this.addTooltip();var n=this.getGui();this.params.disabled?(this.addCssClass(this.getClassName("disabled")),r.setAriaDisabled(n,!0)):(this.addGuiEventListener("click",(function(e){return t.onItemSelected(e)})),this.addGuiEventListener("keydown",(function(n){n.keyCode!==e.ENTER&&n.keyCode!==e.SPACE||(n.preventDefault(),t.onItemSelected(n))})),this.addGuiEventListener("mouseenter",(function(){return t.onMouseEnter()})),this.addGuiEventListener("mouseleave",(function(){return t.onMouseLeave()}))),this.params.cssClasses&&this.params.cssClasses.forEach((function(e){return r.addCssClass(n,e)}))},a.prototype.isDisabled=function(){return!!this.params.disabled},a.prototype.openSubMenu=function(e){var t=this;if(void 0===e&&(e=!1),this.closeSubMenu(),this.params.subMenu){var n,o=r.loadTemplate('<div class="ag-menu" role="presentation"></div>');if(this.params.subMenu instanceof Array){var i=r.getAriaLevel(this.getGui()),s=isNaN(i)?1:i+1,u=this.createBean(new _(s));u.setParentComponent(this),u.addMenuItems(this.params.subMenu),o.appendChild(u.getGui()),this.addManagedListener(u,a.EVENT_MENU_ITEM_SELECTED,(function(e){return t.dispatchEvent(e)})),u.addGuiEventListener("mouseenter",(function(){return t.cancelDeactivate()})),n=function(){return t.destroyBean(u)},e&&setTimeout((function(){return u.activateFirstItem()}),0)}else{var c=this.params.subMenu,p=this.createBean(new E(c));p.setParentComponent(this);var l=p.getGui(),d=function(){return t.cancelDeactivate()};l.addEventListener("mouseenter",d),n=function(){return l.removeEventListener("mouseenter",d)},o.appendChild(l),c.afterGuiAttached&&setTimeout((function(){return c.afterGuiAttached()}),0)}var h=this.getGui(),m=this.popupService.positionPopupForMenu.bind(this.popupService,{eventSource:h,ePopup:o}),f=this.gridOptionsWrapper.getLocaleTextFunc(),v=this.popupService.addPopup({modal:!0,eChild:o,positionCallback:m,anchorToElement:h,ariaLabel:f("ariaLabelSubMenu","SubMenu")});this.subMenuIsOpen=!0,r.setAriaExpanded(h,!0),this.hideSubMenu=function(){v&&v.hideFunc(),t.subMenuIsOpen=!1,r.setAriaExpanded(h,!1),n()}}},a.prototype.closeSubMenu=function(){this.hideSubMenu&&(this.hideSubMenu(),this.hideSubMenu=null,r.setAriaExpanded(this.getGui(),!1))},a.prototype.isSubMenuOpen=function(){return this.subMenuIsOpen},a.prototype.activate=function(e){var t=this;this.cancelActivate(),this.params.disabled||(this.isActive=!0,this.addCssClass(this.getClassName("active")),this.getGui().focus(),e&&this.params.subMenu&&window.setTimeout((function(){t.isAlive()&&t.isActive&&t.openSubMenu()}),300),this.onItemActivated())},a.prototype.deactivate=function(){this.cancelDeactivate(),this.removeCssClass(this.getClassName("active")),this.isActive=!1,this.subMenuIsOpen&&this.hideSubMenu()},a.prototype.addIcon=function(){if(this.params.checked||this.params.icon||!this.params.isCompact){var e=r.loadTemplate('<span ref="eIcon" class="'+this.getClassName("part")+" "+this.getClassName("icon")+'" role="presentation"></span>');this.params.checked?e.appendChild(r.createIconNoSpan("check",this.gridOptionsWrapper)):this.params.icon&&(r.isNodeOrElement(this.params.icon)?e.appendChild(this.params.icon):"string"==typeof this.params.icon?e.innerHTML=this.params.icon:console.warn("AG Grid: menu item icon must be DOM node or string")),this.getGui().appendChild(e)}},a.prototype.addName=function(){if(this.params.name||!this.params.isCompact){var e=r.loadTemplate('<span ref="eName" class="'+this.getClassName("part")+" "+this.getClassName("text")+'">'+(this.params.name||"")+"</span>");this.getGui().appendChild(e)}},a.prototype.addTooltip=function(){this.params.tooltip&&(this.tooltip=this.params.tooltip,this.gridOptionsWrapper.isEnableBrowserTooltips()?this.getGui().setAttribute("title",this.tooltip):this.createManagedBean(new o(this)))},a.prototype.getTooltipParams=function(){return{location:"menu",value:this.tooltip}},a.prototype.addShortcut=function(){if(this.params.shortcut||!this.params.isCompact){var e=r.loadTemplate('<span ref="eShortcut" class="'+this.getClassName("part")+" "+this.getClassName("shortcut")+'">'+(this.params.shortcut||"")+"</span>");this.getGui().appendChild(e)}},a.prototype.addSubMenu=function(){if(this.params.subMenu||!this.params.isCompact){var e=r.loadTemplate('<span ref="ePopupPointer" class="'+this.getClassName("part")+" "+this.getClassName("popup-pointer")+'"></span>'),t=this.getGui();if(this.params.subMenu){var n=this.gridOptionsWrapper.isEnableRtl()?"smallLeft":"smallRight";r.setAriaExpanded(t,!1),e.appendChild(r.createIconNoSpan(n,this.gridOptionsWrapper))}t.appendChild(e)}},a.prototype.onItemSelected=function(e){if(this.params.action?this.params.action():this.openSubMenu(e&&"keydown"===e.type),!this.params.subMenu||this.params.action){var t={type:a.EVENT_MENU_ITEM_SELECTED,action:this.params.action,checked:this.params.checked,cssClasses:this.params.cssClasses,disabled:this.params.disabled,icon:this.params.icon,name:this.params.name,shortcut:this.params.shortcut,subMenu:this.params.subMenu,tooltip:this.params.tooltip,event:e};this.dispatchEvent(t)}},a.prototype.onItemActivated=function(){var e={type:a.EVENT_MENU_ITEM_ACTIVATED,menuItem:this};this.dispatchEvent(e)},a.prototype.cancelActivate=function(){this.activateTimeoutId&&(window.clearTimeout(this.activateTimeoutId),this.activateTimeoutId=0)},a.prototype.cancelDeactivate=function(){this.deactivateTimeoutId&&(window.clearTimeout(this.deactivateTimeoutId),this.deactivateTimeoutId=0)},a.prototype.onMouseEnter=function(){var e=this;this.cancelDeactivate(),this.params.isAnotherSubMenuOpen()?this.activateTimeoutId=window.setTimeout((function(){return e.activate(!0)}),a.ACTIVATION_DELAY):this.activate(!0)},a.prototype.onMouseLeave=function(){var e=this;this.cancelActivate(),this.isSubMenuOpen()?this.deactivateTimeoutId=window.setTimeout((function(){return e.deactivate()}),a.ACTIVATION_DELAY):this.deactivate()},a.prototype.getClassName=function(e){var t=this.params.isCompact?"ag-compact-menu-option":"ag-menu-option";return e?t+"-"+e:t},a.EVENT_MENU_ITEM_SELECTED="menuItemSelected",a.EVENT_MENU_ITEM_ACTIVATED="menuItemActivated",a.ACTIVATION_DELAY=80,A([i("popupService")],a.prototype,"popupService",void 0),A([t],a.prototype,"init",null),a}(a),I=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),P=function(){return(P=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},O=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},_=function(n){function o(e){void 0===e&&(e=1);var t=n.call(this,'<div class="ag-menu-list" role="tree"></div>')||this;return t.level=e,t.menuItems=[],t}return I(o,n),o.prototype.postConstruct=function(){var e=this;this.initialiseTabGuard({onTabKeyDown:function(t){return e.onTabKeyDown(t)},handleKeyDown:function(t){return e.handleKeyDown(t)}})},o.prototype.onTabKeyDown=function(e){var t=this.getParentComponent(),n=t&&t.getGui();n&&r.containsClass(n,"ag-focus-managed")||e.preventDefault(),e.shiftKey&&this.closeIfIsChild(e)},o.prototype.handleKeyDown=function(t){switch(t.keyCode){case e.UP:case e.RIGHT:case e.DOWN:case e.LEFT:t.preventDefault(),this.handleNavKey(t.keyCode);break;case e.ESCAPE:var n=this.findTopMenu();n&&this.focusService.focusInto(n.getGui())}},o.prototype.clearActiveItem=function(){this.activeMenuItem&&(this.activeMenuItem.deactivate(),this.activeMenuItem=null)},o.prototype.addMenuItems=function(e){var t=this;null!=e&&e.forEach((function(e){"separator"===e?t.addSeparator():"string"==typeof e?console.warn("AG Grid: unrecognised menu item "+e):t.addItem(e)}))},o.prototype.addItem=function(e){var t=this,n=this.createManagedBean(new T(P(P({},e),{isAnotherSubMenuOpen:function(){return r.some(t.menuItems,(function(e){return e.isSubMenuOpen()}))}})));n.setParentComponent(this),r.setAriaLevel(n.getGui(),this.level),this.menuItems.push(n),this.appendChild(n.getGui()),this.addManagedListener(n,T.EVENT_MENU_ITEM_SELECTED,(function(e){t.dispatchEvent(e)})),this.addManagedListener(n,T.EVENT_MENU_ITEM_ACTIVATED,(function(e){t.activeMenuItem&&t.activeMenuItem!==e.menuItem&&t.activeMenuItem.deactivate(),t.activeMenuItem=e.menuItem}))},o.prototype.activateFirstItem=function(){var e=this.menuItems.filter((function(e){return!e.isDisabled()}))[0];e&&e.activate()},o.prototype.addSeparator=function(){this.appendChild(r.loadTemplate('\n <div class="ag-menu-separator" aria-hidden="true">\n <div class="ag-menu-separator-part"></div>\n <div class="ag-menu-separator-part"></div>\n <div class="ag-menu-separator-part"></div>\n <div class="ag-menu-separator-part"></div>\n </div>'))},o.prototype.findTopMenu=function(){var e=this.getParentComponent();if(!e&&this instanceof o)return this;for(;;){var t=e&&e.getParentComponent&&e.getParentComponent();if(!t||!(t instanceof o||t instanceof T))break;e=t}return e instanceof o?e:void 0},o.prototype.handleNavKey=function(t){switch(t){case e.UP:case e.DOWN:var n=this.findNextItem(t===e.UP);return void(n&&n!==this.activeMenuItem&&n.activate())}t===(this.gridOptionsWrapper.isEnableRtl()?e.RIGHT:e.LEFT)?this.closeIfIsChild():this.openChild()},o.prototype.closeIfIsChild=function(e){var t=this.getParentComponent();t&&t instanceof T&&(e&&e.preventDefault(),t.closeSubMenu(),t.getGui().focus())},o.prototype.openChild=function(){this.activeMenuItem&&this.activeMenuItem.openSubMenu(!0)},o.prototype.findNextItem=function(e){var t=this.menuItems.filter((function(e){return!e.isDisabled()}));if(t.length){if(!this.activeMenuItem)return e?r.last(t):t[0];var n;e&&t.reverse();for(var o=!1,i=0;i<t.length;i++){var a=t[i];if(o){n=a;break}a===this.activeMenuItem&&(o=!0)}return n||this.activeMenuItem}},o.prototype.destroy=function(){this.clearActiveItem(),n.prototype.destroy.call(this)},O([i("focusService")],o.prototype,"focusService",void 0),O([t],o.prototype,"postConstruct",null),o}(n),N=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),L=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},w=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return N(t,e),t.prototype.hideActiveMenu=function(){this.destroyBean(this.activeMenu)},t.prototype.showMenuAfterMouseEvent=function(e,t,n){var r=this;this.showMenu(e,(function(o){var i=o.getGui();r.popupService.positionPopupUnderMouseEvent({type:"columnMenu",column:e,mouseEvent:t,ePopup:i}),n&&o.showTab(n)}),"columnMenu",n,void 0,t.target)},t.prototype.showMenuAfterButtonClick=function(e,t,n,r,o){var i=this,a=-1,s="left";this.gridOptionsWrapper.isEnableRtl()&&(a=1,s="right"),this.showMenu(e,(function(o){var u=o.getGui();i.popupService.positionPopupUnderComponent({type:n,column:e,eventSource:t,ePopup:u,alignSide:s,nudgeX:9*a,nudgeY:-23,keepWithinBounds:!0}),r&&o.showTab(r)}),n,r,o,t)},t.prototype.showMenu=function(e,t,n,o,i,a){var c=this,p=this.createBean(new G(e,this.lastSelectedTab,i)),l=p.getGui(),d=a||this.ctrlsService.getGridBodyCtrl().getGui(),h=[];h.push((function(t){if(c.destroyBean(p),e.setMenuVisible(!1,"contextMenu"),t instanceof KeyboardEvent&&a&&r.isVisible(a)){var n=c.focusService.findTabbableParent(a);n&&n.focus()}}));var m=this.gridOptionsWrapper.getLocaleTextFunc(),f=this.popupService.addPopup({modal:!0,eChild:l,closeOnEsc:!0,closedCallback:function(e){h.forEach((function(t){return t(e)}))},afterGuiAttached:function(e){return p.afterGuiAttached(r.assign({},{container:n},e))},positionCallback:function(){return t(p)},anchorToElement:d,ariaLabel:m("ariaLabelColumnMenu","Column Menu")});if(f){var v=f.stopAnchoringPromise;v&&v.then((function(t){e.addEventListener(s.EVENT_LEFT_CHANGED,t),e.addEventListener(s.EVENT_VISIBLE_CHANGED,t),h.push((function(){e.removeEventListener(s.EVENT_LEFT_CHANGED,t),e.removeEventListener(s.EVENT_VISIBLE_CHANGED,t)}))}))}o||(p.showTabBasedOnPreviousSelection(),t(p)),p.addEventListener(G.EVENT_TAB_SELECTED,(function(e){c.lastSelectedTab=e.key})),e.setMenuVisible(!0,"contextMenu"),this.activeMenu=p,p.addEventListener(u.EVENT_DESTROYED,(function(){c.activeMenu===p&&(c.activeMenu=null)}))},t.prototype.isMenuEnabled=function(e){return e.getMenuTabs(G.TABS_DEFAULT).length>0},L([i("popupService")],t.prototype,"popupService",void 0),L([i("focusService")],t.prototype,"focusService",void 0),L([i("ctrlsService")],t.prototype,"ctrlsService",void 0),t=L([c("menuFactory")],t)}(u),G=function(e){function n(t,r,o){var i=e.call(this)||this;return i.tabFactories={},i.includeChecks={},i.column=t,i.initialSelection=r,i.tabFactories[n.TAB_GENERAL]=i.createMainPanel.bind(i),i.tabFactories[n.TAB_FILTER]=i.createFilterPanel.bind(i),i.tabFactories[n.TAB_COLUMNS]=i.createColumnsPanel.bind(i),i.includeChecks[n.TAB_GENERAL]=function(){return!0},i.includeChecks[n.TAB_FILTER]=function(){return t.isFilterAllowed()},i.includeChecks[n.TAB_COLUMNS]=function(){return!0},i.restrictTo=o,i}return N(n,e),n.prototype.init=function(){var e=this,t=this.getTabsToCreate().map((function(t){return e.createTab(t)}));this.tabbedLayout=new p({items:t,cssClass:"ag-menu",onActiveItemClicked:this.onHidePopup.bind(this),onItemClicked:this.onTabItemClicked.bind(this)}),this.createBean(this.tabbedLayout),this.mainMenuList&&this.mainMenuList.setParentComponent(this.tabbedLayout)},n.prototype.getTabsToCreate=function(){var e=this;return this.restrictTo?this.restrictTo:this.column.getMenuTabs(n.TABS_DEFAULT).filter((function(t){return e.isValidMenuTabItem(t)})).filter((function(t){return e.isNotSuppressed(t)})).filter((function(t){return e.isModuleLoaded(t)}))},n.prototype.isModuleLoaded=function(e){return e!==n.TAB_COLUMNS||l.isRegistered(d.ColumnToolPanelModule)},n.prototype.isValidMenuTabItem=function(e){var t=!0,r=n.TABS_DEFAULT;return null!=this.restrictTo&&(t=this.restrictTo.indexOf(e)>-1,r=this.restrictTo),(t=t&&n.TABS_DEFAULT.indexOf(e)>-1)||console.warn("Trying to render an invalid menu item '"+e+"'. Check that your 'menuTabs' contains one of ["+r+"]"),t},n.prototype.isNotSuppressed=function(e){return this.includeChecks[e]()},n.prototype.createTab=function(e){return this.tabFactories[e]()},n.prototype.showTabBasedOnPreviousSelection=function(){this.showTab(this.initialSelection)},n.prototype.showTab=function(e){this.tabItemColumns&&e===n.TAB_COLUMNS?this.tabbedLayout.showItem(this.tabItemColumns):this.tabItemFilter&&e===n.TAB_FILTER?this.tabbedLayout.showItem(this.tabItemFilter):this.tabItemGeneral&&e===n.TAB_GENERAL?this.tabbedLayout.showItem(this.tabItemGeneral):this.tabbedLayout.showFirstItem()},n.prototype.onTabItemClicked=function(e){var t=null;switch(e.item){case this.tabItemColumns:t=n.TAB_COLUMNS;break;case this.tabItemFilter:t=n.TAB_FILTER;break;case this.tabItemGeneral:t=n.TAB_GENERAL}t&&this.activateTab(t)},n.prototype.activateTab=function(e){var t={type:n.EVENT_TAB_SELECTED,key:e};this.dispatchEvent(t)},n.prototype.getMenuItems=function(){var e,t=this.getDefaultMenuOptions(),o=this.gridOptionsWrapper.getMainMenuItemsFunc();return e=o?o({column:this.column,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext(),defaultItems:t}):t,r.removeRepeatsFromArray(e,n.MENU_ITEM_SEPARATOR),e},n.prototype.getDefaultMenuOptions=function(){var e=[],t=!this.column.getColDef().lockPinned,r=this.columnModel.getRowGroupColumns().length,o=r>0,i=this.columnModel.getRowGroupColumns().indexOf(this.column)>=0,a=this.column.isAllowValue(),s=this.column.isAllowRowGroup(),u=this.column.isPrimary(),c=this.columnModel.isPivotMode(),p=this.rowModel.getType()===h.ROW_MODEL_TYPE_CLIENT_SIDE,l=this.gridOptionsWrapper.isTreeData(),d=u&&o&&a||!u;return t&&e.push("pinSubMenu"),d&&e.push("valueAggSubMenu"),(t||d)&&e.push(n.MENU_ITEM_SEPARATOR),e.push("autoSizeThis"),e.push("autoSizeAll"),e.push(n.MENU_ITEM_SEPARATOR),s&&this.column.isPrimary()&&(i?e.push("rowUnGroup"):e.push("rowGroup")),e.push(n.MENU_ITEM_SEPARATOR),e.push("resetColumns"),p&&(l||r>(c?1:0))&&(e.push("expandAll"),e.push("contractAll")),e},n.prototype.createMainPanel=function(){this.mainMenuList=this.createManagedBean(new _);var e=this.getMenuItems(),t=this.menuItemMapper.mapWithStockItems(e,this.column);return this.mainMenuList.addMenuItems(t),this.mainMenuList.addEventListener(T.EVENT_MENU_ITEM_SELECTED,this.onHidePopup.bind(this)),this.tabItemGeneral={title:r.createIconNoSpan("menu",this.gridOptionsWrapper,this.column),titleLabel:n.TAB_GENERAL.replace("MenuTab",""),bodyPromise:m.resolve(this.mainMenuList.getGui()),name:n.TAB_GENERAL},this.tabItemGeneral},n.prototype.onHidePopup=function(){this.hidePopupFunc();var e=this.focusService.getFocusedCell();if(e){var t=e.rowIndex,n=e.rowPinned,r=e.column;this.focusService.setFocusedCell(t,r,n,!0)}},n.prototype.createFilterPanel=function(){var e=this.filterManager.getOrCreateFilterWrapper(this.column,"COLUMN_MENU");return this.tabItemFilter={title:r.createIconNoSpan("filter",this.gridOptionsWrapper,this.column),titleLabel:n.TAB_FILTER.replace("MenuTab",""),bodyPromise:e.guiPromise,afterAttachedCallback:function(t){e.filterPromise&&e.filterPromise.then((function(e){e&&e.afterGuiAttached&&e.afterGuiAttached(t)}))},name:n.TAB_FILTER},this.tabItemFilter},n.prototype.createColumnsPanel=function(){var e=document.createElement("div");r.addCssClass(e,"ag-menu-column-select-wrapper"),this.columnSelectPanel=this.createManagedBean(new C);var t=this.column.getColDef().columnsMenuParams;return t||(t={}),this.columnSelectPanel.init(!1,{suppressColumnMove:!1,suppressValues:!1,suppressPivots:!1,suppressRowGroups:!1,suppressPivotMode:!1,contractColumnSelection:!!t.contractColumnSelection,suppressColumnExpandAll:!!t.suppressColumnExpandAll,suppressColumnFilter:!!t.suppressColumnFilter,suppressColumnSelectAll:!!t.suppressColumnSelectAll,suppressSyncLayoutWithGrid:!!t.suppressSyncLayoutWithGrid,api:this.gridApi,columnApi:this.columnApi},"columnMenu"),r.addCssClass(this.columnSelectPanel.getGui(),"ag-menu-column-select"),e.appendChild(this.columnSelectPanel.getGui()),this.tabItemColumns={title:r.createIconNoSpan("columns",this.gridOptionsWrapper,this.column),titleLabel:n.TAB_COLUMNS.replace("MenuTab",""),bodyPromise:m.resolve(e),name:n.TAB_COLUMNS},this.tabItemColumns},n.prototype.afterGuiAttached=function(e){var t=e.container,n=e.hidePopup;this.tabbedLayout.setAfterAttachedParams({container:t,hidePopup:n}),n&&(this.hidePopupFunc=n,this.addDestroyFunc(n))},n.prototype.getGui=function(){return this.tabbedLayout.getGui()},n.EVENT_TAB_SELECTED="tabSelected",n.TAB_FILTER="filterMenuTab",n.TAB_GENERAL="generalMenuTab",n.TAB_COLUMNS="columnsMenuTab",n.TABS_DEFAULT=[n.TAB_GENERAL,n.TAB_FILTER,n.TAB_COLUMNS],n.MENU_ITEM_SEPARATOR="separator",L([i("columnModel")],n.prototype,"columnModel",void 0),L([i("filterManager")],n.prototype,"filterManager",void 0),L([i("gridApi")],n.prototype,"gridApi",void 0),L([i("columnApi")],n.prototype,"columnApi",void 0),L([i("menuItemMapper")],n.prototype,"menuItemMapper",void 0),L([i("rowModel")],n.prototype,"rowModel",void 0),L([i("focusService")],n.prototype,"focusService",void 0),L([t],n.prototype,"init",null),n}(u),x=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),B=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},D=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return x(t,e),t.prototype.hideActiveMenu=function(){this.destroyBean(this.activeMenu)},t.prototype.getMenuItems=function(e,t,n){var o=[];if(r.exists(e)&&l.isRegistered(d.ClipboardModule)&&t&&o.push("copy","copyWithHeaders","paste","separator"),this.gridOptionsWrapper.isEnableCharts()&&l.isRegistered(d.RangeSelectionModule)&&l.isRegistered(d.GridChartsModule)&&(this.columnModel.isPivotMode()&&o.push("pivotChart"),this.rangeService&&!this.rangeService.isEmpty()&&o.push("chartRange")),r.exists(e)){var i=!l.isRegistered(d.CsvExportModule),a=!l.isRegistered(d.ExcelExportModule),s=this.gridOptionsWrapper.isSuppressExcelExport()||a,u=this.gridOptionsWrapper.isSuppressCsvExport()||i;!(r.isIOSUserAgent()||s&&u)&&o.push("export")}if(this.gridOptionsWrapper.getContextMenuItemsFunc()){var c=this.gridOptionsWrapper.getContextMenuItemsFunc(),p={node:e,column:t,value:n,defaultItems:o.length?o:void 0,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext()};return c?c(p):void 0}return o},t.prototype.onContextMenu=function(e,t,n,r,o,i){if((this.gridOptionsWrapper.isAllowContextMenuWithControlKey()||!e||!e.ctrlKey&&!e.metaKey)&&(e&&this.preventDefaultOnContextMenu(e),!this.gridOptionsWrapper.isSuppressContextMenu())){var a=e||t.touches[0];if(this.showMenu(n,r,o,a,i))(e||t).preventDefault()}},t.prototype.preventDefaultOnContextMenu=function(e){var t=this.gridOptionsWrapper,n=e.which;(t.isPreventDefaultOnContextMenu()||t.isSuppressMiddleClickScrolls()&&2===n)&&e.preventDefault()},t.prototype.showMenu=function(e,t,n,o,i){var a=this,s=this.getMenuItems(e,t,n),c=this.ctrlsService.getGridBodyCtrl().getGui();if(void 0===s||r.missingOrEmpty(s))return!1;var p=new R(s);this.createBean(p);var l=p.getGui(),d={column:t,rowNode:e,type:"contextMenu",mouseEvent:o,ePopup:l,nudgeY:1},h=this.gridOptionsWrapper.getLocaleTextFunc(),m=this.popupService.addPopup({modal:!0,eChild:l,closeOnEsc:!0,closedCallback:function(){r.removeCssClass(c," ag-context-menu-open"),a.destroyBean(p)},click:o,positionCallback:function(){a.popupService.positionPopupUnderMouseEvent(r.assign({},{nudgeX:a.gridOptionsWrapper.isEnableRtl()?-1*(l.offsetWidth+1):1},d))},anchorToElement:i,ariaLabel:h("ariaLabelContextMenu","Context Menu")});return m&&(r.addCssClass(c," ag-context-menu-open"),p.afterGuiAttached({container:"contextMenu",hidePopup:m.hideFunc})),this.activeMenu&&this.hideActiveMenu(),this.activeMenu=p,p.addEventListener(u.EVENT_DESTROYED,(function(){a.activeMenu===p&&(a.activeMenu=null)})),m&&p.addEventListener(T.EVENT_MENU_ITEM_SELECTED,m.hideFunc),!0},B([i("popupService")],t.prototype,"popupService",void 0),B([f("rangeService")],t.prototype,"rangeService",void 0),B([i("ctrlsService")],t.prototype,"ctrlsService",void 0),B([i("columnModel")],t.prototype,"columnModel",void 0),t=B([c("contextMenuFactory")],t)}(u),R=function(e){function n(t){var n=e.call(this,'<div class="ag-menu" role="presentation"></div>')||this;return n.menuList=null,n.focusedCell=null,n.menuItems=t,n}return x(n,e),n.prototype.addMenuItems=function(){var e=this,t=this.createBean(new _),n=this.menuItemMapper.mapWithStockItems(this.menuItems,null);t.addMenuItems(n),this.appendChild(t),this.menuList=t,t.addEventListener(T.EVENT_MENU_ITEM_SELECTED,(function(t){return e.dispatchEvent(t)}))},n.prototype.afterGuiAttached=function(e){e.hidePopup&&this.addDestroyFunc(e.hidePopup),this.focusedCell=this.focusService.getFocusedCell(),this.menuList&&this.focusService.focusInto(this.menuList.getGui())},n.prototype.restoreFocusedCell=function(){var e=this.focusService.getFocusedCell();if(e&&this.focusedCell&&this.cellPositionUtils.equals(e,this.focusedCell)){var t=this.focusedCell,n=t.rowIndex,r=t.rowPinned,o=t.column,i=this.gridOptionsWrapper.getDocument();i.activeElement===i.body&&this.focusService.setFocusedCell(n,o,r,!0)}},n.prototype.destroy=function(){this.restoreFocusedCell(),e.prototype.destroy.call(this)},B([i("menuItemMapper")],n.prototype,"menuItemMapper",void 0),B([i("focusService")],n.prototype,"focusService",void 0),B([i("cellPositionUtils")],n.prototype,"cellPositionUtils",void 0),B([t],n.prototype,"addMenuItems",null),n}(a),k=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),F=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},W=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return k(t,e),t.prototype.mapWithStockItems=function(e,t){var n=this;if(!e)return[];var r=[];return e.forEach((function(e){var o;if(o="string"==typeof e?n.getStockMenuItem(e,t):e){var i=o,a=i.subMenu;a&&a instanceof Array&&(i.subMenu=n.mapWithStockItems(i.subMenu,t)),null!=o&&r.push(o)}})),r},t.prototype.getStockMenuItem=function(e,t){var n=this,o=this.gridOptionsWrapper.getLocaleTextFunc(),i=this.gridOptionsWrapper.isSkipHeaderOnAutoSize();switch(e){case"pinSubMenu":return{name:o("pinColumn","Pin Column"),icon:r.createIconNoSpan("menuPin",this.gridOptionsWrapper,null),subMenu:["pinLeft","pinRight","clearPinned"]};case"pinLeft":return{name:o("pinLeft","Pin Left"),action:function(){return n.columnModel.setColumnPinned(t,h.PINNED_LEFT,"contextMenu")},checked:!!t&&t.isPinnedLeft()};case"pinRight":return{name:o("pinRight","Pin Right"),action:function(){return n.columnModel.setColumnPinned(t,h.PINNED_RIGHT,"contextMenu")},checked:!!t&&t.isPinnedRight()};case"clearPinned":return{name:o("noPin","No Pin"),action:function(){return n.columnModel.setColumnPinned(t,null,"contextMenu")},checked:!!t&&!t.isPinned()};case"valueAggSubMenu":return l.assertRegistered(d.RowGroupingModule,"Aggregation from Menu")?{name:o("valueAggregation","Value Aggregation"),icon:r.createIconNoSpan("menuValue",this.gridOptionsWrapper,null),subMenu:this.createAggregationSubMenu(t)}:null;case"autoSizeThis":return{name:o("autosizeThiscolumn","Autosize This Column"),action:function(){return n.columnModel.autoSizeColumn(t,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")+" "+r.escapeString(this.columnModel.getDisplayNameForColumn(t,"header")),action:function(){return n.columnModel.addRowGroupColumn(t,"contextMenu")},icon:r.createIconNoSpan("menuAddRowGroup",this.gridOptionsWrapper,null)};case"rowUnGroup":return{name:o("ungroupBy","Un-Group by")+" "+r.escapeString(this.columnModel.getDisplayNameForColumn(t,"header")),action:function(){return n.columnModel.removeRowGroupColumn(t,"contextMenu")},icon:r.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 l.assertRegistered(d.ClipboardModule,"Copy from Menu")?{name:o("copy","Copy"),shortcut:o("ctrlC","Ctrl+C"),icon:r.createIconNoSpan("clipboardCopy",this.gridOptionsWrapper,null),action:function(){return n.clipboardService.copyToClipboard(!1)}}:null;case"copyWithHeaders":return l.assertRegistered(d.ClipboardModule,"Copy with Headers from Menu")?{name:o("copyWithHeaders","Copy with Headers"),icon:r.createIconNoSpan("clipboardCopy",this.gridOptionsWrapper,null),action:function(){return n.clipboardService.copyToClipboard(!0)}}:null;case"paste":return l.assertRegistered(d.ClipboardModule,"Paste from Clipboard")?{name:o("paste","Paste"),shortcut:o("ctrlV","Ctrl+V"),disabled:!0,icon:r.createIconNoSpan("clipboardPaste",this.gridOptionsWrapper,null),action:function(){return n.clipboardService.pasteFromClipboard()}}:null;case"export":var a=[],s=l.isRegistered(d.CsvExportModule),u=l.isRegistered(d.ExcelExportModule);return!this.gridOptionsWrapper.isSuppressCsvExport()&&s&&a.push("csvExport"),!this.gridOptionsWrapper.isSuppressExcelExport()&&u&&a.push("excelExport"),{name:o("export","Export"),subMenu:a,icon:r.createIconNoSpan("save",this.gridOptionsWrapper,null)};case"csvExport":return{name:o("csvExport","CSV Export"),icon:r.createIconNoSpan("csvExport",this.gridOptionsWrapper,null),action:function(){return n.gridApi.exportDataAsCsv({})}};case"excelExport":return{name:o("excelExport","Excel Export"),icon:r.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)}},t.prototype.getChartItems=function(e){var t=this,n=this.gridOptionsWrapper.getLocaleTextFunc(),o=function(e,r,o){return{name:n(e,r),action:function(){return t.chartService.createPivotChart({chartType:o})}}},i=function(e,r,o){return{name:n(e,r),action:function(){return t.chartService.createChartFromCurrentRange(o)}}};switch(e){case"pivotChart":return{name:n("pivotChart","Pivot Chart"),subMenu:["pivotColumnChart","pivotBarChart","pivotPieChart","pivotLineChart","pivotXYChart","pivotAreaChart"],icon:r.createIconNoSpan("chart",this.gridOptionsWrapper,null)};case"chartRange":return{name:n("chartRange","Chart Range"),subMenu:["rangeColumnChart","rangeBarChart","rangePieChart","rangeLineChart","rangeXYChart","rangeAreaChart","rangeHistogramChart"],icon:r.createIconNoSpan("chart",this.gridOptionsWrapper,null)};case"pivotColumnChart":return{name:n("columnChart","Column"),subMenu:["pivotGroupedColumn","pivotStackedColumn","pivotNormalizedColumn"]};case"pivotGroupedColumn":return o("groupedColumn","Grouped&lrm;",v.GroupedColumn);case"pivotStackedColumn":return o("stackedColumn","Stacked&lrm;",v.StackedColumn);case"pivotNormalizedColumn":return o("normalizedColumn","100% Stacked&lrm;",v.NormalizedColumn);case"rangeColumnChart":return{name:n("columnChart","Column"),subMenu:["rangeGroupedColumn","rangeStackedColumn","rangeNormalizedColumn"]};case"rangeGroupedColumn":return i("groupedColumn","Grouped&lrm;",v.GroupedColumn);case"rangeStackedColumn":return i("stackedColumn","Stacked&lrm;",v.StackedColumn);case"rangeNormalizedColumn":return i("normalizedColumn","100% Stacked&lrm;",v.NormalizedColumn);case"pivotBarChart":return{name:n("barChart","Bar"),subMenu:["pivotGroupedBar","pivotStackedBar","pivotNormalizedBar"]};case"pivotGroupedBar":return o("groupedBar","Grouped&lrm;",v.GroupedBar);case"pivotStackedBar":return o("stackedBar","Stacked&lrm;",v.StackedBar);case"pivotNormalizedBar":return o("normalizedBar","100% Stacked&lrm;",v.NormalizedBar);case"rangeBarChart":return{name:n("barChart","Bar"),subMenu:["rangeGroupedBar","rangeStackedBar","rangeNormalizedBar"]};case"rangeGroupedBar":return i("groupedBar","Grouped&lrm;",v.GroupedBar);case"rangeStackedBar":return i("stackedBar","Stacked&lrm;",v.StackedBar);case"rangeNormalizedBar":return i("normalizedBar","100% Stacked&lrm;",v.NormalizedBar);case"pivotPieChart":return{name:n("pieChart","Pie"),subMenu:["pivotPie","pivotDoughnut"]};case"pivotPie":return o("pie","Pie&lrm;",v.Pie);case"pivotDoughnut":return o("doughnut","Doughnut&lrm;",v.Doughnut);case"rangePieChart":return{name:n("pieChart","Pie"),subMenu:["rangePie","rangeDoughnut"]};case"rangePie":return i("pie","Pie&lrm;",v.Pie);case"rangeDoughnut":return i("doughnut","Doughnut&lrm;",v.Doughnut);case"pivotLineChart":return o("line","Line&lrm;",v.Line);case"rangeLineChart":return i("line","Line&lrm;",v.Line);case"pivotXYChart":return{name:n("xyChart","X Y (Scatter)"),subMenu:["pivotScatter","pivotBubble"]};case"pivotScatter":return o("scatter","Scatter&lrm;",v.Scatter);case"pivotBubble":return o("bubble","Bubble&lrm;",v.Bubble);case"rangeXYChart":return{name:n("xyChart","X Y (Scatter)"),subMenu:["rangeScatter","rangeBubble"]};case"rangeScatter":return i("scatter","Scatter&lrm;",v.Scatter);case"rangeBubble":return i("bubble","Bubble&lrm;",v.Bubble);case"pivotAreaChart":return{name:n("areaChart","Area"),subMenu:["pivotArea","pivotStackedArea","pivotNormalizedArea"]};case"pivotArea":return o("area","Area&lrm;",v.Area);case"pivotStackedArea":return o("stackedArea","Stacked&lrm;",v.StackedArea);case"pivotNormalizedArea":return o("normalizedArea","100% Stacked&lrm;",v.NormalizedArea);case"rangeAreaChart":return{name:n("areaChart","Area"),subMenu:["rangeArea","rangeStackedArea","rangeNormalizedArea"]};case"rangeArea":return i("area","Area&lrm;",v.Area);case"rangeStackedArea":return i("stackedArea","Stacked&lrm;",v.StackedArea);case"rangeNormalizedArea":return i("normalizedArea","100% Stacked&lrm;",v.NormalizedArea);case"rangeHistogramChart":return i("histogramChart","Histogram&lrm;",v.Histogram);default:return null}},t.prototype.createAggregationSubMenu=function(e){var t,n=this,o=this.gridOptionsWrapper.getLocaleTextFunc(),i=e.isValueActive(),a=this.aggFuncService.getFuncNames(e);if(e.isPrimary())t=e;else{var s=e.getColDef().pivotValueColumn;t=r.exists(s)?s:void 0}var u=[];return a.forEach((function(e){u.push({name:o(e,e),action:function(){n.columnModel.setColumnAggFunc(t,e,"contextMenu"),n.columnModel.addValueColumn(t,"contextMenu")},checked:i&&t.getAggFunc()===e})})),u},F([i("columnModel")],t.prototype,"columnModel",void 0),F([i("gridApi")],t.prototype,"gridApi",void 0),F([f("clipboardService")],t.prototype,"clipboardService",void 0),F([f("aggFuncService")],t.prototype,"aggFuncService",void 0),F([f("chartService")],t.prototype,"chartService",void 0),t=F([c("menuItemMapper")],t)}(u),U={moduleName:d.MenuModule,beans:[w,D,W],dependantModules:[g]};export{T as MenuItemComponent,U as MenuModule};
{
"name": "@ag-grid-enterprise/menu",
"version": "26.0.0",
"version": "26.1.0",
"description": "Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components",

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

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

@@ -50,0 +50,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 not supported yet

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

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc