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

@ag-grid-enterprise/side-bar

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/side-bar - npm Package Compare versions

Comparing version 31.2.1 to 31.3.0

24

dist/package/main.cjs.js

@@ -80,3 +80,3 @@ var __defProp = Object.defineProperty;

this.addDestroyFunc(finishedWithResizeFunc);
this.setInverted(this.gridOptionsService.get("enableRtl"));
this.setInverted(this.gos.get("enableRtl"));
}

@@ -172,3 +172,3 @@ dispatchResizeEvent(start, end, width) {

setIcon() {
this.eIconWrapper.insertAdjacentElement("afterbegin", import_core2._.createIconNoSpan(this.toolPanelDef.iconKey, this.gridOptionsService));
this.eIconWrapper.insertAdjacentElement("afterbegin", import_core2._.createIconNoSpan(this.toolPanelDef.iconKey, this.gos));
}

@@ -393,3 +393,3 @@ onButtonPressed() {

setResizerSizerSide(side) {
const isRtl = this.gridOptionsService.get("enableRtl");
const isRtl = this.gos.get("enableRtl");
const isLeft = side === "left";

@@ -422,5 +422,5 @@ const inverted = isRtl ? isLeft : !isLeft;

this.sideBarButtonsComp.addEventListener(SideBarButtonsComp.EVENT_SIDE_BAR_BUTTON_CLICKED, this.onToolPanelButtonClicked.bind(this));
const { sideBar: sideBarState } = (_a = this.gridOptionsService.get("initialState")) != null ? _a : {};
const { sideBar: sideBarState } = (_a = this.gos.get("initialState")) != null ? _a : {};
this.setSideBarDef({
sideBarDef: SideBarDefParser.parse(this.gridOptionsService.get("sideBar")),
sideBarDef: SideBarDefParser.parse(this.gos.get("sideBar")),
sideBarState

@@ -445,4 +445,3 @@ });

const sideBarGui = sideBarButtonsComp.getGui();
const eDocument = this.gridOptionsService.getDocument();
const activeElement = eDocument.activeElement;
const activeElement = this.gos.getActiveDomElement();
const openPanel = eGui.querySelector(".ag-tool-panel-wrapper:not(.ag-hidden)");

@@ -477,4 +476,4 @@ const target = e.target;

handleKeyDown(e) {
const eDocument = this.gridOptionsService.getDocument();
if (!this.sideBarButtonsComp.getGui().contains(eDocument.activeElement)) {
const currentButton = this.gos.getActiveDomElement();
if (!this.sideBarButtonsComp.getGui().contains(currentButton)) {
return;

@@ -484,3 +483,2 @@ }

const buttons = Array.prototype.slice.call(sideBarGui.querySelectorAll(".ag-side-button"));
const currentButton = eDocument.activeElement;
const currentPos = buttons.findIndex((button) => button.contains(currentButton));

@@ -700,3 +698,3 @@ let nextPos = null;

var _a;
const sideBarDef = SideBarDefParser.parse(this.gridOptionsService.get("sideBar"));
const sideBarDef = SideBarDefParser.parse(this.gos.get("sideBar"));
let existingToolPanelWrappers = {};

@@ -720,3 +718,3 @@ if (sideBarDef && this.sideBar) {

}
const params = this.gridOptionsService.addGridCommonParams(__spreadProps(__spreadValues({}, (_b = toolPanelDef.toolPanelParams) != null ? _b : {}), {
const params = this.gos.addGridCommonParams(__spreadProps(__spreadValues({}, (_b = toolPanelDef.toolPanelParams) != null ? _b : {}), {
onStateUpdated: () => this.eventService.dispatchEvent({ type: import_core5.Events.EVENT_SIDE_BAR_UPDATED })

@@ -922,3 +920,3 @@ }));

// enterprise-modules/side-bar/src/version.ts
var VERSION = "31.2.1";
var VERSION = "31.3.0";

@@ -925,0 +923,0 @@ // enterprise-modules/side-bar/src/sideBar/sideBarService.ts

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

var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropNames=Object.getOwnPropertyNames,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(n,e,t)=>e in n?__defProp(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,__spreadValues=(n,e)=>{for(var t in e||(e={}))__hasOwnProp.call(e,t)&&__defNormalProp(n,t,e[t]);if(__getOwnPropSymbols)for(var t of __getOwnPropSymbols(e))__propIsEnum.call(e,t)&&__defNormalProp(n,t,e[t]);return n},__spreadProps=(n,e)=>__defProps(n,__getOwnPropDescs(e)),__export=(n,e)=>{for(var t in e)__defProp(n,t,{get:e[t],enumerable:!0})},__copyProps=(n,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of __getOwnPropNames(e))!__hasOwnProp.call(n,s)&&s!==t&&__defProp(n,s,{get:()=>e[s],enumerable:!(o=__getOwnPropDesc(e,s))||o.enumerable});return n},__toCommonJS=n=>__copyProps(__defProp({},"__esModule",{value:!0}),n),__decorateClass=(n,e,t,o)=>{for(var s=o>1?void 0:o?__getOwnPropDesc(e,t):e,i=n.length-1,r;i>=0;i--)(r=n[i])&&(s=(o?r(e,t,s):r(s))||s);return o&&s&&__defProp(e,t,s),s},main_exports={};__export(main_exports,{SideBarModule:()=>SideBarModule,ToolPanelColDefService:()=>ToolPanelColDefService}),module.exports=__toCommonJS(main_exports);var import_core8=require("@ag-grid-community/core"),import_core9=require("@ag-grid-enterprise/core"),import_core=require("@ag-grid-community/core"),HorizontalResizeComp=class extends import_core.Component{constructor(){super('<div class="ag-tool-panel-horizontal-resize"></div>'),this.minWidth=100,this.maxWidth=null}setElementToResize(n){this.elementToResize=n}postConstruct(){const n=this.horizontalResizeService.addResizeBar({eResizeBar:this.getGui(),dragStartPixels:1,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this),onResizeEnd:this.onResizeEnd.bind(this)});this.addDestroyFunc(n),this.setInverted(this.gridOptionsService.get("enableRtl"))}dispatchResizeEvent(n,e,t){const o={type:import_core.Events.EVENT_TOOL_PANEL_SIZE_CHANGED,width:t,started:n,ended:e};this.eventService.dispatchEvent(o)}onResizeStart(){this.startingWidth=this.elementToResize.offsetWidth,this.dispatchResizeEvent(!0,!1,this.startingWidth)}onResizeEnd(n){return this.onResizing(n,!0)}onResizing(n,e=!1){const t=this.inverted?-1:1;let o=Math.max(this.minWidth,Math.floor(this.startingWidth-n*t));this.maxWidth!=null&&(o=Math.min(this.maxWidth,o)),this.elementToResize.style.width=`${o}px`,this.dispatchResizeEvent(!1,e,o)}setInverted(n){this.inverted=n}setMaxWidth(n){this.maxWidth=n}setMinWidth(n){n!=null?this.minWidth=n:this.minWidth=100}};__decorateClass([(0,import_core.Autowired)("horizontalResizeService")],HorizontalResizeComp.prototype,"horizontalResizeService",2),__decorateClass([import_core.PostConstruct],HorizontalResizeComp.prototype,"postConstruct",1);var import_core5=require("@ag-grid-community/core"),import_core3=require("@ag-grid-community/core"),import_core2=require("@ag-grid-community/core"),_SideBarButtonComp=class g extends import_core2.Component{constructor(e){super(),this.toolPanelDef=e}getToolPanelId(){return this.toolPanelDef.id}postConstruct(){const e=this.createTemplate();this.setTemplate(e),this.setLabel(),this.setIcon(),this.addManagedListener(this.eToggleButton,"click",this.onButtonPressed.bind(this)),this.eToggleButton.setAttribute("id",`ag-${this.getCompId()}-button`)}createTemplate(){return`<div class="ag-side-button" role="presentation">
var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropNames=Object.getOwnPropertyNames,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(i,e,t)=>e in i?__defProp(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,__spreadValues=(i,e)=>{for(var t in e||(e={}))__hasOwnProp.call(e,t)&&__defNormalProp(i,t,e[t]);if(__getOwnPropSymbols)for(var t of __getOwnPropSymbols(e))__propIsEnum.call(e,t)&&__defNormalProp(i,t,e[t]);return i},__spreadProps=(i,e)=>__defProps(i,__getOwnPropDescs(e)),__export=(i,e)=>{for(var t in e)__defProp(i,t,{get:e[t],enumerable:!0})},__copyProps=(i,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of __getOwnPropNames(e))!__hasOwnProp.call(i,s)&&s!==t&&__defProp(i,s,{get:()=>e[s],enumerable:!(o=__getOwnPropDesc(e,s))||o.enumerable});return i},__toCommonJS=i=>__copyProps(__defProp({},"__esModule",{value:!0}),i),__decorateClass=(i,e,t,o)=>{for(var s=o>1?void 0:o?__getOwnPropDesc(e,t):e,n=i.length-1,r;n>=0;n--)(r=i[n])&&(s=(o?r(e,t,s):r(s))||s);return o&&s&&__defProp(e,t,s),s},main_exports={};__export(main_exports,{SideBarModule:()=>SideBarModule,ToolPanelColDefService:()=>ToolPanelColDefService}),module.exports=__toCommonJS(main_exports);var import_core8=require("@ag-grid-community/core"),import_core9=require("@ag-grid-enterprise/core"),import_core=require("@ag-grid-community/core"),HorizontalResizeComp=class extends import_core.Component{constructor(){super('<div class="ag-tool-panel-horizontal-resize"></div>'),this.minWidth=100,this.maxWidth=null}setElementToResize(i){this.elementToResize=i}postConstruct(){const i=this.horizontalResizeService.addResizeBar({eResizeBar:this.getGui(),dragStartPixels:1,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this),onResizeEnd:this.onResizeEnd.bind(this)});this.addDestroyFunc(i),this.setInverted(this.gos.get("enableRtl"))}dispatchResizeEvent(i,e,t){const o={type:import_core.Events.EVENT_TOOL_PANEL_SIZE_CHANGED,width:t,started:i,ended:e};this.eventService.dispatchEvent(o)}onResizeStart(){this.startingWidth=this.elementToResize.offsetWidth,this.dispatchResizeEvent(!0,!1,this.startingWidth)}onResizeEnd(i){return this.onResizing(i,!0)}onResizing(i,e=!1){const t=this.inverted?-1:1;let o=Math.max(this.minWidth,Math.floor(this.startingWidth-i*t));this.maxWidth!=null&&(o=Math.min(this.maxWidth,o)),this.elementToResize.style.width=`${o}px`,this.dispatchResizeEvent(!1,e,o)}setInverted(i){this.inverted=i}setMaxWidth(i){this.maxWidth=i}setMinWidth(i){i!=null?this.minWidth=i:this.minWidth=100}};__decorateClass([(0,import_core.Autowired)("horizontalResizeService")],HorizontalResizeComp.prototype,"horizontalResizeService",2),__decorateClass([import_core.PostConstruct],HorizontalResizeComp.prototype,"postConstruct",1);var import_core5=require("@ag-grid-community/core"),import_core3=require("@ag-grid-community/core"),import_core2=require("@ag-grid-community/core"),_SideBarButtonComp=class g extends import_core2.Component{constructor(e){super(),this.toolPanelDef=e}getToolPanelId(){return this.toolPanelDef.id}postConstruct(){const e=this.createTemplate();this.setTemplate(e),this.setLabel(),this.setIcon(),this.addManagedListener(this.eToggleButton,"click",this.onButtonPressed.bind(this)),this.eToggleButton.setAttribute("id",`ag-${this.getCompId()}-button`)}createTemplate(){return`<div class="ag-side-button" role="presentation">
<button type="button" ref="eToggleButton" tabindex="-1" role="tab" aria-expanded="false" class="ag-button ag-side-button-button">

@@ -6,4 +6,4 @@ <div ref="eIconWrapper" class="ag-side-button-icon-wrapper" aria-hidden="true"></div>

</button>
</div>`}setLabel(){const e=this.localeService.getLocaleTextFunc(),t=this.toolPanelDef,o=e(t.labelKey,t.labelDefault);this.eLabel.innerText=o}setIcon(){this.eIconWrapper.insertAdjacentElement("afterbegin",import_core2._.createIconNoSpan(this.toolPanelDef.iconKey,this.gridOptionsService))}onButtonPressed(){this.dispatchEvent({type:g.EVENT_TOGGLE_BUTTON_CLICKED})}setSelected(e){this.addOrRemoveCssClass("ag-selected",e),import_core2._.setAriaExpanded(this.eToggleButton,e)}getButtonElement(){return this.eToggleButton}};_SideBarButtonComp.EVENT_TOGGLE_BUTTON_CLICKED="toggleButtonClicked",__decorateClass([(0,import_core2.RefSelector)("eToggleButton")],_SideBarButtonComp.prototype,"eToggleButton",2),__decorateClass([(0,import_core2.RefSelector)("eIconWrapper")],_SideBarButtonComp.prototype,"eIconWrapper",2),__decorateClass([(0,import_core2.RefSelector)("eLabel")],_SideBarButtonComp.prototype,"eLabel",2),__decorateClass([import_core2.PostConstruct],_SideBarButtonComp.prototype,"postConstruct",1);var SideBarButtonComp=_SideBarButtonComp,_SideBarButtonsComp=class f extends import_core3.Component{constructor(){super(f.TEMPLATE),this.buttonComps=[]}postConstruct(){this.addManagedListener(this.getFocusableElement(),"keydown",this.handleKeyDown.bind(this))}handleKeyDown(e){if(e.key!==import_core3.KeyCode.TAB||!e.shiftKey)return;const t=import_core3._.last(this.columnModel.getAllDisplayedColumns());this.focusService.focusGridView(t,!0)&&e.preventDefault()}setActiveButton(e){this.buttonComps.forEach(t=>{t.setSelected(e===t.getToolPanelId())})}addButtonComp(e){const t=this.createBean(new SideBarButtonComp(e));return this.buttonComps.push(t),this.appendChild(t),t.addEventListener(SideBarButtonComp.EVENT_TOGGLE_BUTTON_CLICKED,()=>{this.dispatchEvent({type:f.EVENT_SIDE_BAR_BUTTON_CLICKED,toolPanelId:e.id})}),t}clearButtons(){this.buttonComps=this.destroyBeans(this.buttonComps),import_core3._.clearElement(this.getGui())}};_SideBarButtonsComp.EVENT_SIDE_BAR_BUTTON_CLICKED="sideBarButtonClicked",_SideBarButtonsComp.TEMPLATE='<div class="ag-side-buttons" role="tablist"></div>',__decorateClass([(0,import_core3.Autowired)("focusService")],_SideBarButtonsComp.prototype,"focusService",2),__decorateClass([(0,import_core3.Autowired)("columnModel")],_SideBarButtonsComp.prototype,"columnModel",2),__decorateClass([import_core3.PostConstruct],_SideBarButtonsComp.prototype,"postConstruct",1),__decorateClass([import_core3.PreDestroy],_SideBarButtonsComp.prototype,"clearButtons",1);var SideBarButtonsComp=_SideBarButtonsComp,_SideBarDefParser=class u{static parse(e){if(!e)return;if(e===!0)return{toolPanels:[u.DEFAULT_COLUMN_COMP,u.DEFAULT_FILTER_COMP],defaultToolPanel:"columns"};if(typeof e=="string")return u.parse([e]);if(Array.isArray(e)){const o=[];return e.forEach(s=>{const i=u.DEFAULT_BY_KEY[s];if(!i){console.warn(`AG Grid: the key ${s} is not a valid key for specifying a tool panel, valid keys are: ${Object.keys(u.DEFAULT_BY_KEY).join(",")}`);return}o.push(i)}),o.length===0?void 0:{toolPanels:o,defaultToolPanel:o[0].id}}return{toolPanels:u.parseComponents(e.toolPanels),defaultToolPanel:e.defaultToolPanel,hiddenByDefault:e.hiddenByDefault,position:e.position}}static parseComponents(e){const t=[];return e&&e.forEach(o=>{let s=null;if(typeof o=="string"){const i=u.DEFAULT_BY_KEY[o];if(!i){console.warn(`AG Grid: the key ${o} is not a valid key for specifying a tool panel, valid keys are: ${Object.keys(u.DEFAULT_BY_KEY).join(",")}`);return}s=i}else s=o;t.push(s)}),t}};_SideBarDefParser.DEFAULT_COLUMN_COMP={id:"columns",labelDefault:"Columns",labelKey:"columns",iconKey:"columns",toolPanel:"agColumnsToolPanel"},_SideBarDefParser.DEFAULT_FILTER_COMP={id:"filters",labelDefault:"Filters",labelKey:"filters",iconKey:"filter",toolPanel:"agFiltersToolPanel"},_SideBarDefParser.DEFAULT_BY_KEY={columns:_SideBarDefParser.DEFAULT_COLUMN_COMP,filters:_SideBarDefParser.DEFAULT_FILTER_COMP};var SideBarDefParser=_SideBarDefParser,import_core4=require("@ag-grid-community/core"),_ToolPanelWrapper=class m extends import_core4.Component{constructor(){super(m.TEMPLATE)}setupResize(){const e=this.getGui(),t=this.resizeBar=this.createManagedBean(new HorizontalResizeComp);e.setAttribute("id",`ag-${this.getCompId()}`),t.setElementToResize(e),this.appendChild(t)}getToolPanelId(){return this.toolPanelId}setToolPanelDef(e,t){const{id:o,minWidth:s,maxWidth:i,width:r}=e;this.toolPanelId=o,this.width=r;const a=this.userComponentFactory.getToolPanelCompDetails(e,t),l=a.newAgStackInstance();if(this.params=a.params,l==null){console.warn(`AG Grid: error processing tool panel component ${o}. You need to specify 'toolPanel'`);return}l.then(this.setToolPanelComponent.bind(this)),s!=null&&this.resizeBar.setMinWidth(s),i!=null&&this.resizeBar.setMaxWidth(i)}setToolPanelComponent(e){this.toolPanelCompInstance=e,this.appendChild(e.getGui()),this.addDestroyFunc(()=>{this.destroyBean(e)}),this.width&&(this.getGui().style.width=`${this.width}px`)}getToolPanelInstance(){return this.toolPanelCompInstance}setResizerSizerSide(e){const t=this.gridOptionsService.get("enableRtl"),o=e==="left",s=t?o:!o;this.resizeBar.setInverted(s)}refresh(){this.toolPanelCompInstance.refresh(this.params)}};_ToolPanelWrapper.TEMPLATE='<div class="ag-tool-panel-wrapper" role="tabpanel"/>',__decorateClass([(0,import_core4.Autowired)("userComponentFactory")],_ToolPanelWrapper.prototype,"userComponentFactory",2),__decorateClass([import_core4.PostConstruct],_ToolPanelWrapper.prototype,"setupResize",1);var ToolPanelWrapper=_ToolPanelWrapper,_SideBarComp=class v extends import_core5.Component{constructor(){super(v.TEMPLATE),this.toolPanelWrappers=[]}postConstruct(){var e;this.sideBarButtonsComp.addEventListener(SideBarButtonsComp.EVENT_SIDE_BAR_BUTTON_CLICKED,this.onToolPanelButtonClicked.bind(this));const{sideBar:t}=(e=this.gridOptionsService.get("initialState"))!=null?e:{};this.setSideBarDef({sideBarDef:SideBarDefParser.parse(this.gridOptionsService.get("sideBar")),sideBarState:t}),this.addManagedPropertyListener("sideBar",this.onSideBarUpdated.bind(this)),this.sideBarService.registerSideBarComp(this),this.createManagedBean(new import_core5.ManagedFocusFeature(this.getFocusableElement(),{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this)}))}onTabKeyDown(e){if(e.defaultPrevented)return;const{focusService:t,sideBarButtonsComp:o}=this,s=this.getGui(),i=o.getGui(),a=this.gridOptionsService.getDocument().activeElement,l=s.querySelector(".ag-tool-panel-wrapper:not(.ag-hidden)"),d=e.target;if(!l)return;if(i.contains(a)){t.focusInto(l,e.shiftKey)&&e.preventDefault();return}if(!e.shiftKey)return;let c=null;l.contains(a)?c=this.focusService.findNextFocusableElement(l,void 0,!0):t.isTargetUnderManagedComponent(l,d)&&e.shiftKey&&(c=this.focusService.findFocusableElementBeforeTabGuard(l,d)),c||(c=i.querySelector(".ag-selected button")),c&&c!==e.target&&(e.preventDefault(),c.focus())}handleKeyDown(e){const t=this.gridOptionsService.getDocument();if(!this.sideBarButtonsComp.getGui().contains(t.activeElement))return;const o=this.sideBarButtonsComp.getGui(),s=Array.prototype.slice.call(o.querySelectorAll(".ag-side-button")),i=t.activeElement,r=s.findIndex(d=>d.contains(i));let a=null;switch(e.key){case import_core5.KeyCode.LEFT:case import_core5.KeyCode.UP:a=Math.max(0,r-1);break;case import_core5.KeyCode.RIGHT:case import_core5.KeyCode.DOWN:a=Math.min(r+1,s.length-1);break}if(a===null)return;const l=s[a].querySelector("button");l&&(l.focus(),e.preventDefault())}onToolPanelButtonClicked(e){const t=e.toolPanelId;this.openedItem()===t?this.openToolPanel(void 0,"sideBarButtonClicked"):this.openToolPanel(t,"sideBarButtonClicked")}clearDownUi(){this.sideBarButtonsComp.clearButtons(),this.destroyToolPanelWrappers()}setSideBarDef({sideBarDef:e,sideBarState:t,existingToolPanelWrappers:o}){if(this.setDisplayed(!1),this.sideBar=e,this.sideBar&&this.sideBar.toolPanels){const s=this.sideBar.toolPanels;if(this.createToolPanelsAndSideButtons(s,t,o),!this.toolPanelWrappers.length)return;const i=t?t.visible:!this.sideBar.hiddenByDefault;if(this.setDisplayed(i),this.setSideBarPosition(t?t.position:this.sideBar.position),i)if(t){const{openToolPanel:r}=t;r&&this.openToolPanel(r,"sideBarInitializing")}else this.openToolPanel(this.sideBar.defaultToolPanel,"sideBarInitializing")}}getDef(){return this.sideBar}setSideBarPosition(e){e||(e="right"),this.position=e;const t=e==="left",o=t?"right":"left";return this.addOrRemoveCssClass("ag-side-bar-left",t),this.addOrRemoveCssClass("ag-side-bar-right",!t),this.toolPanelWrappers.forEach(s=>{s.setResizerSizerSide(o)}),this.eventService.dispatchEvent({type:import_core5.Events.EVENT_SIDE_BAR_UPDATED}),this}setDisplayed(e,t){super.setDisplayed(e,t),this.eventService.dispatchEvent({type:import_core5.Events.EVENT_SIDE_BAR_UPDATED})}getState(){const e={};return this.toolPanelWrappers.forEach(t=>{var o,s;e[t.getToolPanelId()]=(s=(o=t.getToolPanelInstance())==null?void 0:o.getState)==null?void 0:s.call(o)}),{visible:this.isDisplayed(),position:this.position,openToolPanel:this.openedItem(),toolPanels:e}}createToolPanelsAndSideButtons(e,t,o){var s;for(const i of e)this.createToolPanelAndSideButton(i,(s=t?.toolPanels)==null?void 0:s[i.id],o?.[i.id])}validateDef(e){if(e.id==null)return console.warn("AG Grid: please review all your toolPanel components, it seems like at least one of them doesn't have an id"),!1;if(e.toolPanel==="agColumnsToolPanel"&&!import_core5.ModuleRegistry.__assertRegistered(import_core5.ModuleNames.ColumnsToolPanelModule,"Column Tool Panel",this.context.getGridId()))return!1;if(e.toolPanel==="agFiltersToolPanel"){if(!import_core5.ModuleRegistry.__assertRegistered(import_core5.ModuleNames.FiltersToolPanelModule,"Filters Tool Panel",this.context.getGridId()))return!1;if(this.filterManager.isAdvancedFilterEnabled())return import_core5._.warnOnce("Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled."),!1}return!0}createToolPanelAndSideButton(e,t,o){if(!this.validateDef(e))return;const s=this.sideBarButtonsComp.addButtonComp(e);let i;o?i=o:(i=this.getContext().createBean(new ToolPanelWrapper),i.setToolPanelDef(e,{initialState:t,onStateUpdated:()=>this.eventService.dispatchEvent({type:import_core5.Events.EVENT_SIDE_BAR_UPDATED})})),i.setDisplayed(!1);const r=i.getGui();this.appendChild(r),this.toolPanelWrappers.push(i),import_core5._.setAriaControls(s.getButtonElement(),r)}refresh(){this.toolPanelWrappers.forEach(e=>e.refresh())}openToolPanel(e,t="api"){const o=this.openedItem();if(o===e)return;this.toolPanelWrappers.forEach(r=>{const a=e===r.getToolPanelId();r.setDisplayed(a)});const s=this.openedItem();o!==s&&(this.sideBarButtonsComp.setActiveButton(e),this.raiseToolPanelVisibleEvent(e,o??void 0,t))}getToolPanelInstance(e){const t=this.toolPanelWrappers.filter(o=>o.getToolPanelId()===e)[0];if(!t){console.warn(`AG Grid: unable to lookup Tool Panel as invalid key supplied: ${e}`);return}return t.getToolPanelInstance()}raiseToolPanelVisibleEvent(e,t,o){const s=!!e&&!!t;if(t){const i={type:import_core5.Events.EVENT_TOOL_PANEL_VISIBLE_CHANGED,source:o,key:t,visible:!1,switchingToolPanel:s};this.eventService.dispatchEvent(i)}if(e){const i={type:import_core5.Events.EVENT_TOOL_PANEL_VISIBLE_CHANGED,source:o,key:e,visible:!0,switchingToolPanel:s};this.eventService.dispatchEvent(i)}}close(e="api"){this.openToolPanel(void 0,e)}isToolPanelShowing(){return!!this.openedItem()}openedItem(){let e=null;return this.toolPanelWrappers.forEach(t=>{t.isDisplayed()&&(e=t.getToolPanelId())}),e}onSideBarUpdated(){var e;const t=SideBarDefParser.parse(this.gridOptionsService.get("sideBar"));let o={};t&&this.sideBar&&((e=t.toolPanels)==null||e.forEach(s=>{var i,r;const{id:a}=s;if(!a)return;const l=(i=this.sideBar.toolPanels)==null?void 0:i.find(h=>h.id===a);if(!l||s.toolPanel!==l.toolPanel)return;const d=this.toolPanelWrappers.find(h=>h.getToolPanelId()===a);if(!d)return;const c=this.gridOptionsService.addGridCommonParams(__spreadProps(__spreadValues({},(r=s.toolPanelParams)!=null?r:{}),{onStateUpdated:()=>this.eventService.dispatchEvent({type:import_core5.Events.EVENT_SIDE_BAR_UPDATED})}));d.getToolPanelInstance().refresh(c)===!0&&(this.toolPanelWrappers=this.toolPanelWrappers.filter(h=>h!==d),import_core5._.removeFromParent(d.getGui()),o[a]=d)})),this.clearDownUi(),this.setSideBarDef({sideBarDef:t,existingToolPanelWrappers:o})}destroyToolPanelWrappers(){this.toolPanelWrappers.forEach(e=>{import_core5._.removeFromParent(e.getGui()),this.destroyBean(e)}),this.toolPanelWrappers.length=0}destroy(){this.destroyToolPanelWrappers(),super.destroy()}};_SideBarComp.TEMPLATE=`<div class="ag-side-bar ag-unselectable">
</div>`}setLabel(){const e=this.localeService.getLocaleTextFunc(),t=this.toolPanelDef,o=e(t.labelKey,t.labelDefault);this.eLabel.innerText=o}setIcon(){this.eIconWrapper.insertAdjacentElement("afterbegin",import_core2._.createIconNoSpan(this.toolPanelDef.iconKey,this.gos))}onButtonPressed(){this.dispatchEvent({type:g.EVENT_TOGGLE_BUTTON_CLICKED})}setSelected(e){this.addOrRemoveCssClass("ag-selected",e),import_core2._.setAriaExpanded(this.eToggleButton,e)}getButtonElement(){return this.eToggleButton}};_SideBarButtonComp.EVENT_TOGGLE_BUTTON_CLICKED="toggleButtonClicked",__decorateClass([(0,import_core2.RefSelector)("eToggleButton")],_SideBarButtonComp.prototype,"eToggleButton",2),__decorateClass([(0,import_core2.RefSelector)("eIconWrapper")],_SideBarButtonComp.prototype,"eIconWrapper",2),__decorateClass([(0,import_core2.RefSelector)("eLabel")],_SideBarButtonComp.prototype,"eLabel",2),__decorateClass([import_core2.PostConstruct],_SideBarButtonComp.prototype,"postConstruct",1);var SideBarButtonComp=_SideBarButtonComp,_SideBarButtonsComp=class f extends import_core3.Component{constructor(){super(f.TEMPLATE),this.buttonComps=[]}postConstruct(){this.addManagedListener(this.getFocusableElement(),"keydown",this.handleKeyDown.bind(this))}handleKeyDown(e){if(e.key!==import_core3.KeyCode.TAB||!e.shiftKey)return;const t=import_core3._.last(this.columnModel.getAllDisplayedColumns());this.focusService.focusGridView(t,!0)&&e.preventDefault()}setActiveButton(e){this.buttonComps.forEach(t=>{t.setSelected(e===t.getToolPanelId())})}addButtonComp(e){const t=this.createBean(new SideBarButtonComp(e));return this.buttonComps.push(t),this.appendChild(t),t.addEventListener(SideBarButtonComp.EVENT_TOGGLE_BUTTON_CLICKED,()=>{this.dispatchEvent({type:f.EVENT_SIDE_BAR_BUTTON_CLICKED,toolPanelId:e.id})}),t}clearButtons(){this.buttonComps=this.destroyBeans(this.buttonComps),import_core3._.clearElement(this.getGui())}};_SideBarButtonsComp.EVENT_SIDE_BAR_BUTTON_CLICKED="sideBarButtonClicked",_SideBarButtonsComp.TEMPLATE='<div class="ag-side-buttons" role="tablist"></div>',__decorateClass([(0,import_core3.Autowired)("focusService")],_SideBarButtonsComp.prototype,"focusService",2),__decorateClass([(0,import_core3.Autowired)("columnModel")],_SideBarButtonsComp.prototype,"columnModel",2),__decorateClass([import_core3.PostConstruct],_SideBarButtonsComp.prototype,"postConstruct",1),__decorateClass([import_core3.PreDestroy],_SideBarButtonsComp.prototype,"clearButtons",1);var SideBarButtonsComp=_SideBarButtonsComp,_SideBarDefParser=class u{static parse(e){if(!e)return;if(e===!0)return{toolPanels:[u.DEFAULT_COLUMN_COMP,u.DEFAULT_FILTER_COMP],defaultToolPanel:"columns"};if(typeof e=="string")return u.parse([e]);if(Array.isArray(e)){const o=[];return e.forEach(s=>{const n=u.DEFAULT_BY_KEY[s];if(!n){console.warn(`AG Grid: the key ${s} is not a valid key for specifying a tool panel, valid keys are: ${Object.keys(u.DEFAULT_BY_KEY).join(",")}`);return}o.push(n)}),o.length===0?void 0:{toolPanels:o,defaultToolPanel:o[0].id}}return{toolPanels:u.parseComponents(e.toolPanels),defaultToolPanel:e.defaultToolPanel,hiddenByDefault:e.hiddenByDefault,position:e.position}}static parseComponents(e){const t=[];return e&&e.forEach(o=>{let s=null;if(typeof o=="string"){const n=u.DEFAULT_BY_KEY[o];if(!n){console.warn(`AG Grid: the key ${o} is not a valid key for specifying a tool panel, valid keys are: ${Object.keys(u.DEFAULT_BY_KEY).join(",")}`);return}s=n}else s=o;t.push(s)}),t}};_SideBarDefParser.DEFAULT_COLUMN_COMP={id:"columns",labelDefault:"Columns",labelKey:"columns",iconKey:"columns",toolPanel:"agColumnsToolPanel"},_SideBarDefParser.DEFAULT_FILTER_COMP={id:"filters",labelDefault:"Filters",labelKey:"filters",iconKey:"filter",toolPanel:"agFiltersToolPanel"},_SideBarDefParser.DEFAULT_BY_KEY={columns:_SideBarDefParser.DEFAULT_COLUMN_COMP,filters:_SideBarDefParser.DEFAULT_FILTER_COMP};var SideBarDefParser=_SideBarDefParser,import_core4=require("@ag-grid-community/core"),_ToolPanelWrapper=class m extends import_core4.Component{constructor(){super(m.TEMPLATE)}setupResize(){const e=this.getGui(),t=this.resizeBar=this.createManagedBean(new HorizontalResizeComp);e.setAttribute("id",`ag-${this.getCompId()}`),t.setElementToResize(e),this.appendChild(t)}getToolPanelId(){return this.toolPanelId}setToolPanelDef(e,t){const{id:o,minWidth:s,maxWidth:n,width:r}=e;this.toolPanelId=o,this.width=r;const a=this.userComponentFactory.getToolPanelCompDetails(e,t),l=a.newAgStackInstance();if(this.params=a.params,l==null){console.warn(`AG Grid: error processing tool panel component ${o}. You need to specify 'toolPanel'`);return}l.then(this.setToolPanelComponent.bind(this)),s!=null&&this.resizeBar.setMinWidth(s),n!=null&&this.resizeBar.setMaxWidth(n)}setToolPanelComponent(e){this.toolPanelCompInstance=e,this.appendChild(e.getGui()),this.addDestroyFunc(()=>{this.destroyBean(e)}),this.width&&(this.getGui().style.width=`${this.width}px`)}getToolPanelInstance(){return this.toolPanelCompInstance}setResizerSizerSide(e){const t=this.gos.get("enableRtl"),o=e==="left",s=t?o:!o;this.resizeBar.setInverted(s)}refresh(){this.toolPanelCompInstance.refresh(this.params)}};_ToolPanelWrapper.TEMPLATE='<div class="ag-tool-panel-wrapper" role="tabpanel"/>',__decorateClass([(0,import_core4.Autowired)("userComponentFactory")],_ToolPanelWrapper.prototype,"userComponentFactory",2),__decorateClass([import_core4.PostConstruct],_ToolPanelWrapper.prototype,"setupResize",1);var ToolPanelWrapper=_ToolPanelWrapper,_SideBarComp=class P extends import_core5.Component{constructor(){super(P.TEMPLATE),this.toolPanelWrappers=[]}postConstruct(){var e;this.sideBarButtonsComp.addEventListener(SideBarButtonsComp.EVENT_SIDE_BAR_BUTTON_CLICKED,this.onToolPanelButtonClicked.bind(this));const{sideBar:t}=(e=this.gos.get("initialState"))!=null?e:{};this.setSideBarDef({sideBarDef:SideBarDefParser.parse(this.gos.get("sideBar")),sideBarState:t}),this.addManagedPropertyListener("sideBar",this.onSideBarUpdated.bind(this)),this.sideBarService.registerSideBarComp(this),this.createManagedBean(new import_core5.ManagedFocusFeature(this.getFocusableElement(),{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this)}))}onTabKeyDown(e){if(e.defaultPrevented)return;const{focusService:t,sideBarButtonsComp:o}=this,s=this.getGui(),n=o.getGui(),r=this.gos.getActiveDomElement(),a=s.querySelector(".ag-tool-panel-wrapper:not(.ag-hidden)"),l=e.target;if(!a)return;if(n.contains(r)){t.focusInto(a,e.shiftKey)&&e.preventDefault();return}if(!e.shiftKey)return;let d=null;a.contains(r)?d=this.focusService.findNextFocusableElement(a,void 0,!0):t.isTargetUnderManagedComponent(a,l)&&e.shiftKey&&(d=this.focusService.findFocusableElementBeforeTabGuard(a,l)),d||(d=n.querySelector(".ag-selected button")),d&&d!==e.target&&(e.preventDefault(),d.focus())}handleKeyDown(e){const t=this.gos.getActiveDomElement();if(!this.sideBarButtonsComp.getGui().contains(t))return;const o=this.sideBarButtonsComp.getGui(),s=Array.prototype.slice.call(o.querySelectorAll(".ag-side-button")),n=s.findIndex(l=>l.contains(t));let r=null;switch(e.key){case import_core5.KeyCode.LEFT:case import_core5.KeyCode.UP:r=Math.max(0,n-1);break;case import_core5.KeyCode.RIGHT:case import_core5.KeyCode.DOWN:r=Math.min(n+1,s.length-1);break}if(r===null)return;const a=s[r].querySelector("button");a&&(a.focus(),e.preventDefault())}onToolPanelButtonClicked(e){const t=e.toolPanelId;this.openedItem()===t?this.openToolPanel(void 0,"sideBarButtonClicked"):this.openToolPanel(t,"sideBarButtonClicked")}clearDownUi(){this.sideBarButtonsComp.clearButtons(),this.destroyToolPanelWrappers()}setSideBarDef({sideBarDef:e,sideBarState:t,existingToolPanelWrappers:o}){if(this.setDisplayed(!1),this.sideBar=e,this.sideBar&&this.sideBar.toolPanels){const s=this.sideBar.toolPanels;if(this.createToolPanelsAndSideButtons(s,t,o),!this.toolPanelWrappers.length)return;const n=t?t.visible:!this.sideBar.hiddenByDefault;if(this.setDisplayed(n),this.setSideBarPosition(t?t.position:this.sideBar.position),n)if(t){const{openToolPanel:r}=t;r&&this.openToolPanel(r,"sideBarInitializing")}else this.openToolPanel(this.sideBar.defaultToolPanel,"sideBarInitializing")}}getDef(){return this.sideBar}setSideBarPosition(e){e||(e="right"),this.position=e;const t=e==="left",o=t?"right":"left";return this.addOrRemoveCssClass("ag-side-bar-left",t),this.addOrRemoveCssClass("ag-side-bar-right",!t),this.toolPanelWrappers.forEach(s=>{s.setResizerSizerSide(o)}),this.eventService.dispatchEvent({type:import_core5.Events.EVENT_SIDE_BAR_UPDATED}),this}setDisplayed(e,t){super.setDisplayed(e,t),this.eventService.dispatchEvent({type:import_core5.Events.EVENT_SIDE_BAR_UPDATED})}getState(){const e={};return this.toolPanelWrappers.forEach(t=>{var o,s;e[t.getToolPanelId()]=(s=(o=t.getToolPanelInstance())==null?void 0:o.getState)==null?void 0:s.call(o)}),{visible:this.isDisplayed(),position:this.position,openToolPanel:this.openedItem(),toolPanels:e}}createToolPanelsAndSideButtons(e,t,o){var s;for(const n of e)this.createToolPanelAndSideButton(n,(s=t?.toolPanels)==null?void 0:s[n.id],o?.[n.id])}validateDef(e){if(e.id==null)return console.warn("AG Grid: please review all your toolPanel components, it seems like at least one of them doesn't have an id"),!1;if(e.toolPanel==="agColumnsToolPanel"&&!import_core5.ModuleRegistry.__assertRegistered(import_core5.ModuleNames.ColumnsToolPanelModule,"Column Tool Panel",this.context.getGridId()))return!1;if(e.toolPanel==="agFiltersToolPanel"){if(!import_core5.ModuleRegistry.__assertRegistered(import_core5.ModuleNames.FiltersToolPanelModule,"Filters Tool Panel",this.context.getGridId()))return!1;if(this.filterManager.isAdvancedFilterEnabled())return import_core5._.warnOnce("Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled."),!1}return!0}createToolPanelAndSideButton(e,t,o){if(!this.validateDef(e))return;const s=this.sideBarButtonsComp.addButtonComp(e);let n;o?n=o:(n=this.getContext().createBean(new ToolPanelWrapper),n.setToolPanelDef(e,{initialState:t,onStateUpdated:()=>this.eventService.dispatchEvent({type:import_core5.Events.EVENT_SIDE_BAR_UPDATED})})),n.setDisplayed(!1);const r=n.getGui();this.appendChild(r),this.toolPanelWrappers.push(n),import_core5._.setAriaControls(s.getButtonElement(),r)}refresh(){this.toolPanelWrappers.forEach(e=>e.refresh())}openToolPanel(e,t="api"){const o=this.openedItem();if(o===e)return;this.toolPanelWrappers.forEach(r=>{const a=e===r.getToolPanelId();r.setDisplayed(a)});const s=this.openedItem();o!==s&&(this.sideBarButtonsComp.setActiveButton(e),this.raiseToolPanelVisibleEvent(e,o??void 0,t))}getToolPanelInstance(e){const t=this.toolPanelWrappers.filter(o=>o.getToolPanelId()===e)[0];if(!t){console.warn(`AG Grid: unable to lookup Tool Panel as invalid key supplied: ${e}`);return}return t.getToolPanelInstance()}raiseToolPanelVisibleEvent(e,t,o){const s=!!e&&!!t;if(t){const n={type:import_core5.Events.EVENT_TOOL_PANEL_VISIBLE_CHANGED,source:o,key:t,visible:!1,switchingToolPanel:s};this.eventService.dispatchEvent(n)}if(e){const n={type:import_core5.Events.EVENT_TOOL_PANEL_VISIBLE_CHANGED,source:o,key:e,visible:!0,switchingToolPanel:s};this.eventService.dispatchEvent(n)}}close(e="api"){this.openToolPanel(void 0,e)}isToolPanelShowing(){return!!this.openedItem()}openedItem(){let e=null;return this.toolPanelWrappers.forEach(t=>{t.isDisplayed()&&(e=t.getToolPanelId())}),e}onSideBarUpdated(){var e;const t=SideBarDefParser.parse(this.gos.get("sideBar"));let o={};t&&this.sideBar&&((e=t.toolPanels)==null||e.forEach(s=>{var n,r;const{id:a}=s;if(!a)return;const l=(n=this.sideBar.toolPanels)==null?void 0:n.find(h=>h.id===a);if(!l||s.toolPanel!==l.toolPanel)return;const d=this.toolPanelWrappers.find(h=>h.getToolPanelId()===a);if(!d)return;const c=this.gos.addGridCommonParams(__spreadProps(__spreadValues({},(r=s.toolPanelParams)!=null?r:{}),{onStateUpdated:()=>this.eventService.dispatchEvent({type:import_core5.Events.EVENT_SIDE_BAR_UPDATED})}));d.getToolPanelInstance().refresh(c)===!0&&(this.toolPanelWrappers=this.toolPanelWrappers.filter(h=>h!==d),import_core5._.removeFromParent(d.getGui()),o[a]=d)})),this.clearDownUi(),this.setSideBarDef({sideBarDef:t,existingToolPanelWrappers:o})}destroyToolPanelWrappers(){this.toolPanelWrappers.forEach(e=>{import_core5._.removeFromParent(e.getGui()),this.destroyBean(e)}),this.toolPanelWrappers.length=0}destroy(){this.destroyToolPanelWrappers(),super.destroy()}};_SideBarComp.TEMPLATE=`<div class="ag-side-bar ag-unselectable">
<ag-side-bar-buttons ref="sideBarButtons"></ag-side-bar-buttons>
</div>`,__decorateClass([(0,import_core5.Autowired)("focusService")],_SideBarComp.prototype,"focusService",2),__decorateClass([(0,import_core5.Autowired)("filterManager")],_SideBarComp.prototype,"filterManager",2),__decorateClass([(0,import_core5.Autowired)("sideBarService")],_SideBarComp.prototype,"sideBarService",2),__decorateClass([(0,import_core5.RefSelector)("sideBarButtons")],_SideBarComp.prototype,"sideBarButtonsComp",2),__decorateClass([import_core5.PostConstruct],_SideBarComp.prototype,"postConstruct",1);var SideBarComp=_SideBarComp,import_core6=require("@ag-grid-community/core"),ToolPanelColDefService=class extends import_core6.BeanStub{constructor(){super(...arguments),this.isColGroupDef=n=>n&&typeof n.children<"u",this.getId=n=>this.isColGroupDef(n)?n.groupId:n.colId}createColumnTree(n){const e=[],t=(s,i)=>{if(this.isColGroupDef(s)){const r=s,a=typeof r.groupId<"u"?r.groupId:r.headerName,l=new import_core6.ProvidedColumnGroup(r,a,!1,i),d=[];return r.children.forEach(c=>{const p=t(c,i+1);p&&d.push(p)}),l.setChildren(d),l}else{const r=s,a=r.colId?r.colId:r.field,l=this.columnModel.getPrimaryColumn(a);return l||e.push(r),l}},o=[];return n.forEach(s=>{const i=t(s,0);i&&o.push(i)}),e.length>0&&console.warn("AG Grid: unable to find grid columns for the supplied colDef(s):",e),o}syncLayoutWithGrid(n){const e=this.getLeafPathTrees(),t=this.mergeLeafPathTrees(e);n(t)}getLeafPathTrees(){const n=(o,s)=>{let i;if(o instanceof import_core6.ProvidedColumnGroup)if(o.isPadding())i=s;else{const a=Object.assign({},o.getColGroupDef());a.groupId=o.getGroupId(),a.children=[s],i=a}else{const a=Object.assign({},o.getColDef());a.colId=o.getColId(),i=a}const r=o.getOriginalParent();return r?n(r,i):i};return this.columnModel.getAllGridColumns().filter(o=>{const s=o.getColDef();return o.isPrimary()&&!s.showRowGroup}).map(o=>n(o,o.getColDef()))}mergeLeafPathTrees(n){const e=(s,i)=>this.isColGroupDef(s)&&this.isColGroupDef(i)&&this.getId(s)===this.getId(i),t=(s,i)=>{if(!this.isColGroupDef(i))return s;const r=s,a=i;return a.children&&a.groupId&&this.addChildrenToGroup(r,a.groupId,a.children[0])||a.children.forEach(l=>t(r,l)),r},o=[];for(let s=1;s<=n.length;s++){const i=n[s-1],r=n[s];e(i,r)?n[s]=t(i,r):o.push(i)}return o}addChildrenToGroup(n,e,t){const o=(r,a)=>{const l=r.children.map(this.getId),d=import_core6._.includes(l,this.getId(a)),c=import_core6._.last(r.children),p=c&&this.getId(c)!==this.getId(a);return d&&p};if(!this.isColGroupDef(n))return!0;const s=n,i=t;if(o(s,i))return s.children.push(i),!0;if(s.groupId===e){const r=s.children.map(this.getId);if(!import_core6._.includes(r,this.getId(i)))return s.children.push(i),!0}return s.children.forEach(r=>this.addChildrenToGroup(r,e,t)),!1}};__decorateClass([(0,import_core6.Autowired)("columnModel")],ToolPanelColDefService.prototype,"columnModel",2),ToolPanelColDefService=__decorateClass([(0,import_core6.Bean)("toolPanelColDefService")],ToolPanelColDefService);var VERSION="31.2.1",import_core7=require("@ag-grid-community/core"),SideBarService=class extends import_core7.BeanStub{registerSideBarComp(n){this.sideBarComp=n}getSideBarComp(){return this.sideBarComp}};SideBarService=__decorateClass([(0,import_core7.Bean)("sideBarService")],SideBarService);var SideBarModule={version:VERSION,moduleName:import_core8.ModuleNames.SideBarModule,beans:[ToolPanelColDefService,SideBarService],agStackComponents:[{componentName:"AgHorizontalResize",componentClass:HorizontalResizeComp},{componentName:"AgSideBar",componentClass:SideBarComp},{componentName:"AgSideBarButtons",componentClass:SideBarButtonsComp}],dependantModules:[import_core9.EnterpriseCoreModule]};
</div>`,__decorateClass([(0,import_core5.Autowired)("focusService")],_SideBarComp.prototype,"focusService",2),__decorateClass([(0,import_core5.Autowired)("filterManager")],_SideBarComp.prototype,"filterManager",2),__decorateClass([(0,import_core5.Autowired)("sideBarService")],_SideBarComp.prototype,"sideBarService",2),__decorateClass([(0,import_core5.RefSelector)("sideBarButtons")],_SideBarComp.prototype,"sideBarButtonsComp",2),__decorateClass([import_core5.PostConstruct],_SideBarComp.prototype,"postConstruct",1);var SideBarComp=_SideBarComp,import_core6=require("@ag-grid-community/core"),ToolPanelColDefService=class extends import_core6.BeanStub{constructor(){super(...arguments),this.isColGroupDef=i=>i&&typeof i.children<"u",this.getId=i=>this.isColGroupDef(i)?i.groupId:i.colId}createColumnTree(i){const e=[],t=(s,n)=>{if(this.isColGroupDef(s)){const r=s,a=typeof r.groupId<"u"?r.groupId:r.headerName,l=new import_core6.ProvidedColumnGroup(r,a,!1,n),d=[];return r.children.forEach(c=>{const p=t(c,n+1);p&&d.push(p)}),l.setChildren(d),l}else{const r=s,a=r.colId?r.colId:r.field,l=this.columnModel.getPrimaryColumn(a);return l||e.push(r),l}},o=[];return i.forEach(s=>{const n=t(s,0);n&&o.push(n)}),e.length>0&&console.warn("AG Grid: unable to find grid columns for the supplied colDef(s):",e),o}syncLayoutWithGrid(i){const e=this.getLeafPathTrees(),t=this.mergeLeafPathTrees(e);i(t)}getLeafPathTrees(){const i=(o,s)=>{let n;if(o instanceof import_core6.ProvidedColumnGroup)if(o.isPadding())n=s;else{const a=Object.assign({},o.getColGroupDef());a.groupId=o.getGroupId(),a.children=[s],n=a}else{const a=Object.assign({},o.getColDef());a.colId=o.getColId(),n=a}const r=o.getOriginalParent();return r?i(r,n):n};return this.columnModel.getAllGridColumns().filter(o=>{const s=o.getColDef();return o.isPrimary()&&!s.showRowGroup}).map(o=>i(o,o.getColDef()))}mergeLeafPathTrees(i){const e=(s,n)=>this.isColGroupDef(s)&&this.isColGroupDef(n)&&this.getId(s)===this.getId(n),t=(s,n)=>{if(!this.isColGroupDef(n))return s;const r=s,a=n;return a.children&&a.groupId&&this.addChildrenToGroup(r,a.groupId,a.children[0])||a.children.forEach(l=>t(r,l)),r},o=[];for(let s=1;s<=i.length;s++){const n=i[s-1],r=i[s];e(n,r)?i[s]=t(n,r):o.push(n)}return o}addChildrenToGroup(i,e,t){const o=(r,a)=>{const l=r.children.map(this.getId),d=import_core6._.includes(l,this.getId(a)),c=import_core6._.last(r.children),p=c&&this.getId(c)!==this.getId(a);return d&&p};if(!this.isColGroupDef(i))return!0;const s=i,n=t;if(o(s,n))return s.children.push(n),!0;if(s.groupId===e){const r=s.children.map(this.getId);if(!import_core6._.includes(r,this.getId(n)))return s.children.push(n),!0}return s.children.forEach(r=>this.addChildrenToGroup(r,e,t)),!1}};__decorateClass([(0,import_core6.Autowired)("columnModel")],ToolPanelColDefService.prototype,"columnModel",2),ToolPanelColDefService=__decorateClass([(0,import_core6.Bean)("toolPanelColDefService")],ToolPanelColDefService);var VERSION="31.3.0",import_core7=require("@ag-grid-community/core"),SideBarService=class extends import_core7.BeanStub{registerSideBarComp(i){this.sideBarComp=i}getSideBarComp(){return this.sideBarComp}};SideBarService=__decorateClass([(0,import_core7.Bean)("sideBarService")],SideBarService);var SideBarModule={version:VERSION,moduleName:import_core8.ModuleNames.SideBarModule,beans:[ToolPanelColDefService,SideBarService],agStackComponents:[{componentName:"AgHorizontalResize",componentClass:HorizontalResizeComp},{componentName:"AgSideBar",componentClass:SideBarComp},{componentName:"AgSideBarButtons",componentClass:SideBarButtonsComp}],dependantModules:[import_core9.EnterpriseCoreModule]};
{
"name": "@ag-grid-enterprise/side-bar",
"version": "31.2.1",
"version": "31.3.0",
"description": "Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue",

@@ -15,4 +15,4 @@ "main": "./dist/package/main.cjs.js",

"dependencies": {
"@ag-grid-community/core": "31.2.1",
"@ag-grid-enterprise/core": "31.2.1"
"@ag-grid-community/core": "31.3.0",
"@ag-grid-enterprise/core": "31.3.0"
},

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

{
"name": "@ag-grid-enterprise/side-bar",
"version": "31.2.1",
"version": "31.3.0",
"description": "Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue",

@@ -15,4 +15,4 @@ "main": "./src/main.js",

"dependencies": {
"@ag-grid-community/core": "31.2.1",
"@ag-grid-enterprise/core": "31.2.1"
"@ag-grid-community/core": "31.3.0",
"@ag-grid-enterprise/core": "31.3.0"
},

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

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

export declare const VERSION = "31.2.1";
export declare const VERSION = "31.3.0";
{
"name": "@ag-grid-enterprise/side-bar",
"version": "31.2.1",
"version": "31.3.0",
"description": "Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue",

@@ -15,4 +15,4 @@ "main": "./dist/package/main.cjs.js",

"dependencies": {
"@ag-grid-community/core": "31.2.1",
"@ag-grid-enterprise/core": "31.2.1"
"@ag-grid-community/core": "31.3.0",
"@ag-grid-enterprise/core": "31.3.0"
},

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc