Socket
Socket
Sign inDemoInstall

@ag-grid-enterprise/side-bar

Package Overview
Dependencies
Maintainers
3
Versions
69
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 30.2.1 to 31.0.0

dist/cjs/es5/sideBar/sideBarService.d.ts

4

dist/cjs/es5/sideBar/common/toolPanelColDefService.js

@@ -200,6 +200,6 @@ "use strict";

__decorate([
core_1.Autowired('columnModel')
(0, core_1.Autowired)('columnModel')
], ToolPanelColDefService.prototype, "columnModel", void 0);
ToolPanelColDefService = __decorate([
core_1.Bean('toolPanelColDefService')
(0, core_1.Bean)('toolPanelColDefService')
], ToolPanelColDefService);

@@ -206,0 +206,0 @@ return ToolPanelColDefService;

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

this.addDestroyFunc(finishedWithResizeFunc);
this.setInverted(this.gridOptionsService.is('enableRtl'));
this.setInverted(this.gridOptionsService.get('enableRtl'));
};

@@ -72,3 +72,3 @@ HorizontalResizeComp.prototype.dispatchResizeEvent = function (start, end, width) {

}
this.elementToResize.style.width = newWidth + "px";
this.elementToResize.style.width = "".concat(newWidth, "px");
this.dispatchResizeEvent(false, isEnd, newWidth);

@@ -91,3 +91,3 @@ };

__decorate([
core_1.Autowired('horizontalResizeService')
(0, core_1.Autowired)('horizontalResizeService')
], HorizontalResizeComp.prototype, "horizontalResizeService", void 0);

@@ -94,0 +94,0 @@ __decorate([

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

this.addManagedListener(this.eToggleButton, 'click', this.onButtonPressed.bind(this));
this.eToggleButton.setAttribute('id', "ag-" + this.getCompId() + "-button");
this.eToggleButton.setAttribute('id', "ag-".concat(this.getCompId(), "-button"));
};

@@ -70,9 +70,9 @@ SideBarButtonComp.prototype.createTemplate = function () {

__decorate([
core_1.RefSelector('eToggleButton')
(0, core_1.RefSelector)('eToggleButton')
], SideBarButtonComp.prototype, "eToggleButton", void 0);
__decorate([
core_1.RefSelector('eIconWrapper')
(0, core_1.RefSelector)('eIconWrapper')
], SideBarButtonComp.prototype, "eIconWrapper", void 0);
__decorate([
core_1.RefSelector('eLabel')
(0, core_1.RefSelector)('eLabel')
], SideBarButtonComp.prototype, "eLabel", void 0);

@@ -79,0 +79,0 @@ __decorate([

@@ -71,6 +71,6 @@ "use strict";

__decorate([
core_1.Autowired('focusService')
(0, core_1.Autowired)('focusService')
], SideBarButtonsComp.prototype, "focusService", void 0);
__decorate([
core_1.Autowired('columnModel')
(0, core_1.Autowired)('columnModel')
], SideBarButtonsComp.prototype, "columnModel", void 0);

@@ -77,0 +77,0 @@ __decorate([

@@ -1,9 +0,10 @@

import { Component, ISideBar, IToolPanel, SideBarDef } from "@ag-grid-community/core";
import { Component, ISideBar, IToolPanel, SideBarDef, SideBarState } from "@ag-grid-community/core";
export declare class SideBarComp extends Component implements ISideBar {
private gridApi;
private focusService;
private filterManager;
private sideBarService;
private sideBarButtonsComp;
private toolPanelWrappers;
private sideBar;
private position;
private static readonly TEMPLATE;

@@ -19,2 +20,6 @@ constructor();

setSideBarPosition(position?: 'left' | 'right'): this;
setDisplayed(displayed: boolean, options?: {
skipAriaHidden?: boolean | undefined;
} | undefined): void;
getState(): SideBarState;
private createToolPanelsAndSideButtons;

@@ -21,0 +26,0 @@ private validateDef;

@@ -49,9 +49,12 @@ "use strict";

var _this = this;
var _a;
this.sideBarButtonsComp.addEventListener(sideBarButtonsComp_1.SideBarButtonsComp.EVENT_SIDE_BAR_BUTTON_CLICKED, this.onToolPanelButtonClicked.bind(this));
this.setSideBarDef();
var sideBarState = ((_a = this.gridOptionsService.get('initialState')) !== null && _a !== void 0 ? _a : {}).sideBar;
this.setSideBarDef(sideBarState);
this.addManagedPropertyListener('sideBar', function () {
_this.clearDownUi();
// don't re-assign initial state
_this.setSideBarDef();
});
this.gridApi.registerSideBarComp(this);
this.sideBarService.registerSideBarComp(this);
this.createManagedBean(new core_1.ManagedFocusFeature(this.getFocusableElement(), {

@@ -145,3 +148,3 @@ onTabKeyDown: this.onTabKeyDown.bind(this),

};
SideBarComp.prototype.setSideBarDef = function () {
SideBarComp.prototype.setSideBarDef = function (sideBarState) {
// initially hide side bar

@@ -153,11 +156,19 @@ this.setDisplayed(false);

var toolPanelDefs = this.sideBar.toolPanels;
this.createToolPanelsAndSideButtons(toolPanelDefs);
this.createToolPanelsAndSideButtons(toolPanelDefs, sideBarState);
if (!this.toolPanelWrappers.length) {
return;
}
var shouldDisplaySideBar = !this.sideBar.hiddenByDefault;
var shouldDisplaySideBar = sideBarState ? sideBarState.visible : !this.sideBar.hiddenByDefault;
this.setDisplayed(shouldDisplaySideBar);
this.setSideBarPosition(this.sideBar.position);
if (!this.sideBar.hiddenByDefault) {
this.openToolPanel(this.sideBar.defaultToolPanel, 'sideBarInitializing');
this.setSideBarPosition(sideBarState ? sideBarState.position : this.sideBar.position);
if (shouldDisplaySideBar) {
if (sideBarState) {
var openToolPanel = sideBarState.openToolPanel;
if (openToolPanel) {
this.openToolPanel(openToolPanel, 'sideBarInitializing');
}
}
else {
this.openToolPanel(this.sideBar.defaultToolPanel, 'sideBarInitializing');
}
}

@@ -173,2 +184,3 @@ }

}
this.position = position;
var isLeft = position === 'left';

@@ -181,10 +193,29 @@ var resizerSide = isLeft ? 'right' : 'left';

});
this.eventService.dispatchEvent({ type: core_1.Events.EVENT_SIDE_BAR_UPDATED });
return this;
};
SideBarComp.prototype.createToolPanelsAndSideButtons = function (defs) {
SideBarComp.prototype.setDisplayed = function (displayed, options) {
_super.prototype.setDisplayed.call(this, displayed, options);
this.eventService.dispatchEvent({ type: core_1.Events.EVENT_SIDE_BAR_UPDATED });
};
SideBarComp.prototype.getState = function () {
var toolPanels = {};
this.toolPanelWrappers.forEach(function (wrapper) {
var _a, _b;
toolPanels[wrapper.getToolPanelId()] = (_b = (_a = wrapper.getToolPanelInstance()).getState) === null || _b === void 0 ? void 0 : _b.call(_a);
});
return {
visible: this.isDisplayed(),
position: this.position,
openToolPanel: this.openedItem(),
toolPanels: toolPanels
};
};
SideBarComp.prototype.createToolPanelsAndSideButtons = function (defs, sideBarState) {
var e_1, _a;
var _b;
try {
for (var defs_1 = __values(defs), defs_1_1 = defs_1.next(); !defs_1_1.done; defs_1_1 = defs_1.next()) {
var def = defs_1_1.value;
this.createToolPanelAndSideButton(def);
this.createToolPanelAndSideButton(def, (_b = sideBarState === null || sideBarState === void 0 ? void 0 : sideBarState.toolPanels) === null || _b === void 0 ? void 0 : _b[def.id]);
}

@@ -218,5 +249,3 @@ }

if (this.filterManager.isAdvancedFilterEnabled()) {
core_1._.doOnce(function () {
console.warn('AG Grid: Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled.');
}, 'advancedFilterToolPanel');
core_1._.warnOnce('Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled.');
return false;

@@ -227,3 +256,4 @@ }

};
SideBarComp.prototype.createToolPanelAndSideButton = function (def) {
SideBarComp.prototype.createToolPanelAndSideButton = function (def, initialState) {
var _this = this;
if (!this.validateDef(def)) {

@@ -234,3 +264,6 @@ return;

var wrapper = this.getContext().createBean(new toolPanelWrapper_1.ToolPanelWrapper());
wrapper.setToolPanelDef(def);
wrapper.setToolPanelDef(def, {
initialState: initialState,
onStateUpdated: function () { return _this.eventService.dispatchEvent({ type: core_1.Events.EVENT_SIDE_BAR_UPDATED }); }
});
wrapper.setDisplayed(false);

@@ -265,3 +298,3 @@ var wrapperGui = wrapper.getGui();

if (!toolPanelWrapper) {
console.warn("AG Grid: unable to lookup Tool Panel as invalid key supplied: " + key);
console.warn("AG Grid: unable to lookup Tool Panel as invalid key supplied: ".concat(key));
return;

@@ -324,12 +357,12 @@ }

__decorate([
core_1.Autowired('gridApi')
], SideBarComp.prototype, "gridApi", void 0);
__decorate([
core_1.Autowired('focusService')
(0, core_1.Autowired)('focusService')
], SideBarComp.prototype, "focusService", void 0);
__decorate([
core_1.Autowired('filterManager')
(0, core_1.Autowired)('filterManager')
], SideBarComp.prototype, "filterManager", void 0);
__decorate([
core_1.RefSelector('sideBarButtons')
(0, core_1.Autowired)('sideBarService')
], SideBarComp.prototype, "sideBarService", void 0);
__decorate([
(0, core_1.RefSelector)('sideBarButtons')
], SideBarComp.prototype, "sideBarButtonsComp", void 0);

@@ -336,0 +369,0 @@ __decorate([

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

if (!lookupResult) {
console.warn("AG Grid: the key " + key + " is not a valid key for specifying a tool panel, valid keys are: " + Object.keys(SideBarDefParser.DEFAULT_BY_KEY).join(','));
console.warn("AG Grid: the key ".concat(key, " is not a valid key for specifying a tool panel, valid keys are: ").concat(Object.keys(SideBarDefParser.DEFAULT_BY_KEY).join(',')));
return;

@@ -60,3 +60,3 @@ }

if (!lookupResult) {
console.warn("AG Grid: the key " + it + " is not a valid key for specifying a tool panel, valid keys are: " + Object.keys(SideBarDefParser.DEFAULT_BY_KEY).join(','));
console.warn("AG Grid: the key ".concat(it, " is not a valid key for specifying a tool panel, valid keys are: ").concat(Object.keys(SideBarDefParser.DEFAULT_BY_KEY).join(',')));
return;

@@ -63,0 +63,0 @@ }

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

import { Component, IToolPanelComp, ToolPanelDef } from "@ag-grid-community/core";
import { Component, IToolPanelComp, IToolPanelParams, ToolPanelDef, WithoutGridCommon } from "@ag-grid-community/core";
export declare class ToolPanelWrapper extends Component {

@@ -12,3 +12,3 @@ private userComponentFactory;

getToolPanelId(): string;
setToolPanelDef(toolPanelDef: ToolPanelDef): void;
setToolPanelDef(toolPanelDef: ToolPanelDef, params: WithoutGridCommon<IToolPanelParams>): void;
private setToolPanelComponent;

@@ -15,0 +15,0 @@ getToolPanelInstance(): IToolPanelComp;

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

var resizeBar = this.resizeBar = this.createManagedBean(new horizontalResizeComp_1.HorizontalResizeComp());
eGui.setAttribute('id', "ag-" + this.getCompId());
eGui.setAttribute('id', "ag-".concat(this.getCompId()));
resizeBar.setElementToResize(eGui);

@@ -43,11 +43,10 @@ this.appendChild(resizeBar);

};
ToolPanelWrapper.prototype.setToolPanelDef = function (toolPanelDef) {
ToolPanelWrapper.prototype.setToolPanelDef = function (toolPanelDef, params) {
var id = toolPanelDef.id, minWidth = toolPanelDef.minWidth, maxWidth = toolPanelDef.maxWidth, width = toolPanelDef.width;
this.toolPanelId = id;
this.width = width;
var params = {};
var compDetails = this.userComponentFactory.getToolPanelCompDetails(toolPanelDef, params);
var componentPromise = compDetails.newAgStackInstance();
if (componentPromise == null) {
console.warn("AG Grid: error processing tool panel component " + id + ". You need to specify 'toolPanel'");
console.warn("AG Grid: error processing tool panel component ".concat(id, ". You need to specify 'toolPanel'"));
return;

@@ -71,3 +70,3 @@ }

if (this.width) {
this.getGui().style.width = this.width + "px";
this.getGui().style.width = "".concat(this.width, "px");
}

@@ -79,3 +78,3 @@ };

ToolPanelWrapper.prototype.setResizerSizerSide = function (side) {
var isRtl = this.gridOptionsService.is('enableRtl');
var isRtl = this.gridOptionsService.get('enableRtl');
var isLeft = side === 'left';

@@ -90,3 +89,3 @@ var inverted = isRtl ? isLeft : !isLeft;

__decorate([
core_1.Autowired("userComponentFactory")
(0, core_1.Autowired)("userComponentFactory")
], ToolPanelWrapper.prototype, "userComponentFactory", void 0);

@@ -93,0 +92,0 @@ __decorate([

@@ -11,6 +11,7 @@ "use strict";

var version_1 = require("./version");
var sideBarService_1 = require("./sideBar/sideBarService");
exports.SideBarModule = {
version: version_1.VERSION,
moduleName: core_1.ModuleNames.SideBarModule,
beans: [toolPanelColDefService_1.ToolPanelColDefService],
beans: [toolPanelColDefService_1.ToolPanelColDefService, sideBarService_1.SideBarService],
agStackComponents: [

@@ -17,0 +18,0 @@ { componentName: 'AgHorizontalResize', componentClass: horizontalResizeComp_1.HorizontalResizeComp },

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

export declare const VERSION = "30.2.1";
export declare const VERSION = "31.0.0";

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

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

@@ -181,7 +181,7 @@ "use strict";

__decorate([
core_1.Autowired('columnModel')
(0, core_1.Autowired)('columnModel')
], ToolPanelColDefService.prototype, "columnModel", void 0);
ToolPanelColDefService = __decorate([
core_1.Bean('toolPanelColDefService')
(0, core_1.Bean)('toolPanelColDefService')
], ToolPanelColDefService);
exports.ToolPanelColDefService = ToolPanelColDefService;

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

this.addDestroyFunc(finishedWithResizeFunc);
this.setInverted(this.gridOptionsService.is('enableRtl'));
this.setInverted(this.gridOptionsService.get('enableRtl'));
}

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

__decorate([
core_1.Autowired('horizontalResizeService')
(0, core_1.Autowired)('horizontalResizeService')
], HorizontalResizeComp.prototype, "horizontalResizeService", void 0);

@@ -76,0 +76,0 @@ __decorate([

@@ -58,9 +58,9 @@ "use strict";

__decorate([
core_1.RefSelector('eToggleButton')
(0, core_1.RefSelector)('eToggleButton')
], SideBarButtonComp.prototype, "eToggleButton", void 0);
__decorate([
core_1.RefSelector('eIconWrapper')
(0, core_1.RefSelector)('eIconWrapper')
], SideBarButtonComp.prototype, "eIconWrapper", void 0);
__decorate([
core_1.RefSelector('eLabel')
(0, core_1.RefSelector)('eLabel')
], SideBarButtonComp.prototype, "eLabel", void 0);

@@ -67,0 +67,0 @@ __decorate([

@@ -54,6 +54,6 @@ "use strict";

__decorate([
core_1.Autowired('focusService')
(0, core_1.Autowired)('focusService')
], SideBarButtonsComp.prototype, "focusService", void 0);
__decorate([
core_1.Autowired('columnModel')
(0, core_1.Autowired)('columnModel')
], SideBarButtonsComp.prototype, "columnModel", void 0);

@@ -60,0 +60,0 @@ __decorate([

@@ -1,9 +0,10 @@

import { Component, ISideBar, IToolPanel, SideBarDef } from "@ag-grid-community/core";
import { Component, ISideBar, IToolPanel, SideBarDef, SideBarState } from "@ag-grid-community/core";
export declare class SideBarComp extends Component implements ISideBar {
private gridApi;
private focusService;
private filterManager;
private sideBarService;
private sideBarButtonsComp;
private toolPanelWrappers;
private sideBar;
private position;
private static readonly TEMPLATE;

@@ -19,2 +20,6 @@ constructor();

setSideBarPosition(position?: 'left' | 'right'): this;
setDisplayed(displayed: boolean, options?: {
skipAriaHidden?: boolean | undefined;
} | undefined): void;
getState(): SideBarState;
private createToolPanelsAndSideButtons;

@@ -21,0 +26,0 @@ private validateDef;

@@ -20,9 +20,12 @@ "use strict";

postConstruct() {
var _a;
this.sideBarButtonsComp.addEventListener(sideBarButtonsComp_1.SideBarButtonsComp.EVENT_SIDE_BAR_BUTTON_CLICKED, this.onToolPanelButtonClicked.bind(this));
this.setSideBarDef();
const { sideBar: sideBarState } = (_a = this.gridOptionsService.get('initialState')) !== null && _a !== void 0 ? _a : {};
this.setSideBarDef(sideBarState);
this.addManagedPropertyListener('sideBar', () => {
this.clearDownUi();
// don't re-assign initial state
this.setSideBarDef();
});
this.gridApi.registerSideBarComp(this);
this.sideBarService.registerSideBarComp(this);
this.createManagedBean(new core_1.ManagedFocusFeature(this.getFocusableElement(), {

@@ -116,3 +119,3 @@ onTabKeyDown: this.onTabKeyDown.bind(this),

}
setSideBarDef() {
setSideBarDef(sideBarState) {
// initially hide side bar

@@ -124,11 +127,19 @@ this.setDisplayed(false);

const toolPanelDefs = this.sideBar.toolPanels;
this.createToolPanelsAndSideButtons(toolPanelDefs);
this.createToolPanelsAndSideButtons(toolPanelDefs, sideBarState);
if (!this.toolPanelWrappers.length) {
return;
}
const shouldDisplaySideBar = !this.sideBar.hiddenByDefault;
const shouldDisplaySideBar = sideBarState ? sideBarState.visible : !this.sideBar.hiddenByDefault;
this.setDisplayed(shouldDisplaySideBar);
this.setSideBarPosition(this.sideBar.position);
if (!this.sideBar.hiddenByDefault) {
this.openToolPanel(this.sideBar.defaultToolPanel, 'sideBarInitializing');
this.setSideBarPosition(sideBarState ? sideBarState.position : this.sideBar.position);
if (shouldDisplaySideBar) {
if (sideBarState) {
const { openToolPanel } = sideBarState;
if (openToolPanel) {
this.openToolPanel(openToolPanel, 'sideBarInitializing');
}
}
else {
this.openToolPanel(this.sideBar.defaultToolPanel, 'sideBarInitializing');
}
}

@@ -144,2 +155,3 @@ }

}
this.position = position;
const isLeft = position === 'left';

@@ -152,7 +164,26 @@ const resizerSide = isLeft ? 'right' : 'left';

});
this.eventService.dispatchEvent({ type: core_1.Events.EVENT_SIDE_BAR_UPDATED });
return this;
}
createToolPanelsAndSideButtons(defs) {
setDisplayed(displayed, options) {
super.setDisplayed(displayed, options);
this.eventService.dispatchEvent({ type: core_1.Events.EVENT_SIDE_BAR_UPDATED });
}
getState() {
const toolPanels = {};
this.toolPanelWrappers.forEach(wrapper => {
var _a, _b;
toolPanels[wrapper.getToolPanelId()] = (_b = (_a = wrapper.getToolPanelInstance()).getState) === null || _b === void 0 ? void 0 : _b.call(_a);
});
return {
visible: this.isDisplayed(),
position: this.position,
openToolPanel: this.openedItem(),
toolPanels
};
}
createToolPanelsAndSideButtons(defs, sideBarState) {
var _a;
for (const def of defs) {
this.createToolPanelAndSideButton(def);
this.createToolPanelAndSideButton(def, (_a = sideBarState === null || sideBarState === void 0 ? void 0 : sideBarState.toolPanels) === null || _a === void 0 ? void 0 : _a[def.id]);
}

@@ -178,5 +209,3 @@ }

if (this.filterManager.isAdvancedFilterEnabled()) {
core_1._.doOnce(() => {
console.warn('AG Grid: Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled.');
}, 'advancedFilterToolPanel');
core_1._.warnOnce('Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled.');
return false;

@@ -187,3 +216,3 @@ }

}
createToolPanelAndSideButton(def) {
createToolPanelAndSideButton(def, initialState) {
if (!this.validateDef(def)) {

@@ -194,3 +223,6 @@ return;

const wrapper = this.getContext().createBean(new toolPanelWrapper_1.ToolPanelWrapper());
wrapper.setToolPanelDef(def);
wrapper.setToolPanelDef(def, {
initialState,
onStateUpdated: () => this.eventService.dispatchEvent({ type: core_1.Events.EVENT_SIDE_BAR_UPDATED })
});
wrapper.setDisplayed(false);

@@ -283,12 +315,12 @@ const wrapperGui = wrapper.getGui();

__decorate([
core_1.Autowired('gridApi')
], SideBarComp.prototype, "gridApi", void 0);
__decorate([
core_1.Autowired('focusService')
(0, core_1.Autowired)('focusService')
], SideBarComp.prototype, "focusService", void 0);
__decorate([
core_1.Autowired('filterManager')
(0, core_1.Autowired)('filterManager')
], SideBarComp.prototype, "filterManager", void 0);
__decorate([
core_1.RefSelector('sideBarButtons')
(0, core_1.Autowired)('sideBarService')
], SideBarComp.prototype, "sideBarService", void 0);
__decorate([
(0, core_1.RefSelector)('sideBarButtons')
], SideBarComp.prototype, "sideBarButtonsComp", void 0);

@@ -295,0 +327,0 @@ __decorate([

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

import { Component, IToolPanelComp, ToolPanelDef } from "@ag-grid-community/core";
import { Component, IToolPanelComp, IToolPanelParams, ToolPanelDef, WithoutGridCommon } from "@ag-grid-community/core";
export declare class ToolPanelWrapper extends Component {

@@ -12,3 +12,3 @@ private userComponentFactory;

getToolPanelId(): string;
setToolPanelDef(toolPanelDef: ToolPanelDef): void;
setToolPanelDef(toolPanelDef: ToolPanelDef, params: WithoutGridCommon<IToolPanelParams>): void;
private setToolPanelComponent;

@@ -15,0 +15,0 @@ getToolPanelInstance(): IToolPanelComp;

@@ -26,7 +26,6 @@ "use strict";

}
setToolPanelDef(toolPanelDef) {
setToolPanelDef(toolPanelDef, params) {
const { id, minWidth, maxWidth, width } = toolPanelDef;
this.toolPanelId = id;
this.width = width;
const params = {};
const compDetails = this.userComponentFactory.getToolPanelCompDetails(toolPanelDef, params);

@@ -60,3 +59,3 @@ const componentPromise = compDetails.newAgStackInstance();

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

@@ -72,3 +71,3 @@ const inverted = isRtl ? isLeft : !isLeft;

__decorate([
core_1.Autowired("userComponentFactory")
(0, core_1.Autowired)("userComponentFactory")
], ToolPanelWrapper.prototype, "userComponentFactory", void 0);

@@ -75,0 +74,0 @@ __decorate([

@@ -11,6 +11,7 @@ "use strict";

const version_1 = require("./version");
const sideBarService_1 = require("./sideBar/sideBarService");
exports.SideBarModule = {
version: version_1.VERSION,
moduleName: core_1.ModuleNames.SideBarModule,
beans: [toolPanelColDefService_1.ToolPanelColDefService],
beans: [toolPanelColDefService_1.ToolPanelColDefService, sideBarService_1.SideBarService],
agStackComponents: [

@@ -17,0 +18,0 @@ { componentName: 'AgHorizontalResize', componentClass: horizontalResizeComp_1.HorizontalResizeComp },

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

export declare const VERSION = "30.2.1";
export declare const VERSION = "31.0.0";

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

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

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

this.addDestroyFunc(finishedWithResizeFunc);
this.setInverted(this.gridOptionsService.is('enableRtl'));
this.setInverted(this.gridOptionsService.get('enableRtl'));
};

@@ -69,3 +69,3 @@ HorizontalResizeComp.prototype.dispatchResizeEvent = function (start, end, width) {

}
this.elementToResize.style.width = newWidth + "px";
this.elementToResize.style.width = "".concat(newWidth, "px");
this.dispatchResizeEvent(false, isEnd, newWidth);

@@ -72,0 +72,0 @@ };

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

this.addManagedListener(this.eToggleButton, 'click', this.onButtonPressed.bind(this));
this.eToggleButton.setAttribute('id', "ag-" + this.getCompId() + "-button");
this.eToggleButton.setAttribute('id', "ag-".concat(this.getCompId(), "-button"));
};

@@ -42,0 +42,0 @@ SideBarButtonComp.prototype.createTemplate = function () {

@@ -1,9 +0,10 @@

import { Component, ISideBar, IToolPanel, SideBarDef } from "@ag-grid-community/core";
import { Component, ISideBar, IToolPanel, SideBarDef, SideBarState } from "@ag-grid-community/core";
export declare class SideBarComp extends Component implements ISideBar {
private gridApi;
private focusService;
private filterManager;
private sideBarService;
private sideBarButtonsComp;
private toolPanelWrappers;
private sideBar;
private position;
private static readonly TEMPLATE;

@@ -19,2 +20,6 @@ constructor();

setSideBarPosition(position?: 'left' | 'right'): this;
setDisplayed(displayed: boolean, options?: {
skipAriaHidden?: boolean | undefined;
} | undefined): void;
getState(): SideBarState;
private createToolPanelsAndSideButtons;

@@ -21,0 +26,0 @@ private validateDef;

@@ -46,9 +46,12 @@ var __extends = (this && this.__extends) || (function () {

var _this = this;
var _a;
this.sideBarButtonsComp.addEventListener(SideBarButtonsComp.EVENT_SIDE_BAR_BUTTON_CLICKED, this.onToolPanelButtonClicked.bind(this));
this.setSideBarDef();
var sideBarState = ((_a = this.gridOptionsService.get('initialState')) !== null && _a !== void 0 ? _a : {}).sideBar;
this.setSideBarDef(sideBarState);
this.addManagedPropertyListener('sideBar', function () {
_this.clearDownUi();
// don't re-assign initial state
_this.setSideBarDef();
});
this.gridApi.registerSideBarComp(this);
this.sideBarService.registerSideBarComp(this);
this.createManagedBean(new ManagedFocusFeature(this.getFocusableElement(), {

@@ -142,3 +145,3 @@ onTabKeyDown: this.onTabKeyDown.bind(this),

};
SideBarComp.prototype.setSideBarDef = function () {
SideBarComp.prototype.setSideBarDef = function (sideBarState) {
// initially hide side bar

@@ -150,11 +153,19 @@ this.setDisplayed(false);

var toolPanelDefs = this.sideBar.toolPanels;
this.createToolPanelsAndSideButtons(toolPanelDefs);
this.createToolPanelsAndSideButtons(toolPanelDefs, sideBarState);
if (!this.toolPanelWrappers.length) {
return;
}
var shouldDisplaySideBar = !this.sideBar.hiddenByDefault;
var shouldDisplaySideBar = sideBarState ? sideBarState.visible : !this.sideBar.hiddenByDefault;
this.setDisplayed(shouldDisplaySideBar);
this.setSideBarPosition(this.sideBar.position);
if (!this.sideBar.hiddenByDefault) {
this.openToolPanel(this.sideBar.defaultToolPanel, 'sideBarInitializing');
this.setSideBarPosition(sideBarState ? sideBarState.position : this.sideBar.position);
if (shouldDisplaySideBar) {
if (sideBarState) {
var openToolPanel = sideBarState.openToolPanel;
if (openToolPanel) {
this.openToolPanel(openToolPanel, 'sideBarInitializing');
}
}
else {
this.openToolPanel(this.sideBar.defaultToolPanel, 'sideBarInitializing');
}
}

@@ -170,2 +181,3 @@ }

}
this.position = position;
var isLeft = position === 'left';

@@ -178,10 +190,29 @@ var resizerSide = isLeft ? 'right' : 'left';

});
this.eventService.dispatchEvent({ type: Events.EVENT_SIDE_BAR_UPDATED });
return this;
};
SideBarComp.prototype.createToolPanelsAndSideButtons = function (defs) {
SideBarComp.prototype.setDisplayed = function (displayed, options) {
_super.prototype.setDisplayed.call(this, displayed, options);
this.eventService.dispatchEvent({ type: Events.EVENT_SIDE_BAR_UPDATED });
};
SideBarComp.prototype.getState = function () {
var toolPanels = {};
this.toolPanelWrappers.forEach(function (wrapper) {
var _a, _b;
toolPanels[wrapper.getToolPanelId()] = (_b = (_a = wrapper.getToolPanelInstance()).getState) === null || _b === void 0 ? void 0 : _b.call(_a);
});
return {
visible: this.isDisplayed(),
position: this.position,
openToolPanel: this.openedItem(),
toolPanels: toolPanels
};
};
SideBarComp.prototype.createToolPanelsAndSideButtons = function (defs, sideBarState) {
var e_1, _a;
var _b;
try {
for (var defs_1 = __values(defs), defs_1_1 = defs_1.next(); !defs_1_1.done; defs_1_1 = defs_1.next()) {
var def = defs_1_1.value;
this.createToolPanelAndSideButton(def);
this.createToolPanelAndSideButton(def, (_b = sideBarState === null || sideBarState === void 0 ? void 0 : sideBarState.toolPanels) === null || _b === void 0 ? void 0 : _b[def.id]);
}

@@ -215,5 +246,3 @@ }

if (this.filterManager.isAdvancedFilterEnabled()) {
_.doOnce(function () {
console.warn('AG Grid: Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled.');
}, 'advancedFilterToolPanel');
_.warnOnce('Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled.');
return false;

@@ -224,3 +253,4 @@ }

};
SideBarComp.prototype.createToolPanelAndSideButton = function (def) {
SideBarComp.prototype.createToolPanelAndSideButton = function (def, initialState) {
var _this = this;
if (!this.validateDef(def)) {

@@ -231,3 +261,6 @@ return;

var wrapper = this.getContext().createBean(new ToolPanelWrapper());
wrapper.setToolPanelDef(def);
wrapper.setToolPanelDef(def, {
initialState: initialState,
onStateUpdated: function () { return _this.eventService.dispatchEvent({ type: Events.EVENT_SIDE_BAR_UPDATED }); }
});
wrapper.setDisplayed(false);

@@ -262,3 +295,3 @@ var wrapperGui = wrapper.getGui();

if (!toolPanelWrapper) {
console.warn("AG Grid: unable to lookup Tool Panel as invalid key supplied: " + key);
console.warn("AG Grid: unable to lookup Tool Panel as invalid key supplied: ".concat(key));
return;

@@ -321,5 +354,2 @@ }

__decorate([
Autowired('gridApi')
], SideBarComp.prototype, "gridApi", void 0);
__decorate([
Autowired('focusService')

@@ -331,2 +361,5 @@ ], SideBarComp.prototype, "focusService", void 0);

__decorate([
Autowired('sideBarService')
], SideBarComp.prototype, "sideBarService", void 0);
__decorate([
RefSelector('sideBarButtons')

@@ -333,0 +366,0 @@ ], SideBarComp.prototype, "sideBarButtonsComp", void 0);

@@ -25,3 +25,3 @@ var SideBarDefParser = /** @class */ (function () {

if (!lookupResult) {
console.warn("AG Grid: the key " + key + " is not a valid key for specifying a tool panel, valid keys are: " + Object.keys(SideBarDefParser.DEFAULT_BY_KEY).join(','));
console.warn("AG Grid: the key ".concat(key, " is not a valid key for specifying a tool panel, valid keys are: ").concat(Object.keys(SideBarDefParser.DEFAULT_BY_KEY).join(',')));
return;

@@ -57,3 +57,3 @@ }

if (!lookupResult) {
console.warn("AG Grid: the key " + it + " is not a valid key for specifying a tool panel, valid keys are: " + Object.keys(SideBarDefParser.DEFAULT_BY_KEY).join(','));
console.warn("AG Grid: the key ".concat(it, " is not a valid key for specifying a tool panel, valid keys are: ").concat(Object.keys(SideBarDefParser.DEFAULT_BY_KEY).join(',')));
return;

@@ -60,0 +60,0 @@ }

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

import { Component, IToolPanelComp, ToolPanelDef } from "@ag-grid-community/core";
import { Component, IToolPanelComp, IToolPanelParams, ToolPanelDef, WithoutGridCommon } from "@ag-grid-community/core";
export declare class ToolPanelWrapper extends Component {

@@ -12,3 +12,3 @@ private userComponentFactory;

getToolPanelId(): string;
setToolPanelDef(toolPanelDef: ToolPanelDef): void;
setToolPanelDef(toolPanelDef: ToolPanelDef, params: WithoutGridCommon<IToolPanelParams>): void;
private setToolPanelComponent;

@@ -15,0 +15,0 @@ getToolPanelInstance(): IToolPanelComp;

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

var resizeBar = this.resizeBar = this.createManagedBean(new HorizontalResizeComp());
eGui.setAttribute('id', "ag-" + this.getCompId());
eGui.setAttribute('id', "ag-".concat(this.getCompId()));
resizeBar.setElementToResize(eGui);

@@ -40,11 +40,10 @@ this.appendChild(resizeBar);

};
ToolPanelWrapper.prototype.setToolPanelDef = function (toolPanelDef) {
ToolPanelWrapper.prototype.setToolPanelDef = function (toolPanelDef, params) {
var id = toolPanelDef.id, minWidth = toolPanelDef.minWidth, maxWidth = toolPanelDef.maxWidth, width = toolPanelDef.width;
this.toolPanelId = id;
this.width = width;
var params = {};
var compDetails = this.userComponentFactory.getToolPanelCompDetails(toolPanelDef, params);
var componentPromise = compDetails.newAgStackInstance();
if (componentPromise == null) {
console.warn("AG Grid: error processing tool panel component " + id + ". You need to specify 'toolPanel'");
console.warn("AG Grid: error processing tool panel component ".concat(id, ". You need to specify 'toolPanel'"));
return;

@@ -68,3 +67,3 @@ }

if (this.width) {
this.getGui().style.width = this.width + "px";
this.getGui().style.width = "".concat(this.width, "px");
}

@@ -76,3 +75,3 @@ };

ToolPanelWrapper.prototype.setResizerSizerSide = function (side) {
var isRtl = this.gridOptionsService.is('enableRtl');
var isRtl = this.gridOptionsService.get('enableRtl');
var isLeft = side === 'left';

@@ -79,0 +78,0 @@ var inverted = isRtl ? isLeft : !isLeft;

@@ -8,6 +8,7 @@ import { ModuleNames } from "@ag-grid-community/core";

import { VERSION } from "./version";
import { SideBarService } from "./sideBar/sideBarService";
export var SideBarModule = {
version: VERSION,
moduleName: ModuleNames.SideBarModule,
beans: [ToolPanelColDefService],
beans: [ToolPanelColDefService, SideBarService],
agStackComponents: [

@@ -14,0 +15,0 @@ { componentName: 'AgHorizontalResize', componentClass: HorizontalResizeComp },

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

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

@@ -1,9 +0,10 @@

import { Component, ISideBar, IToolPanel, SideBarDef } from "@ag-grid-community/core";
import { Component, ISideBar, IToolPanel, SideBarDef, SideBarState } from "@ag-grid-community/core";
export declare class SideBarComp extends Component implements ISideBar {
private gridApi;
private focusService;
private filterManager;
private sideBarService;
private sideBarButtonsComp;
private toolPanelWrappers;
private sideBar;
private position;
private static readonly TEMPLATE;

@@ -19,2 +20,6 @@ constructor();

setSideBarPosition(position?: 'left' | 'right'): this;
setDisplayed(displayed: boolean, options?: {
skipAriaHidden?: boolean | undefined;
} | undefined): void;
getState(): SideBarState;
private createToolPanelsAndSideButtons;

@@ -21,0 +26,0 @@ private validateDef;

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

import { Component, IToolPanelComp, ToolPanelDef } from "@ag-grid-community/core";
import { Component, IToolPanelComp, IToolPanelParams, ToolPanelDef, WithoutGridCommon } from "@ag-grid-community/core";
export declare class ToolPanelWrapper extends Component {

@@ -12,3 +12,3 @@ private userComponentFactory;

getToolPanelId(): string;
setToolPanelDef(toolPanelDef: ToolPanelDef): void;
setToolPanelDef(toolPanelDef: ToolPanelDef, params: WithoutGridCommon<IToolPanelParams>): void;
private setToolPanelComponent;

@@ -15,0 +15,0 @@ getToolPanelInstance(): IToolPanelComp;

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

export declare const VERSION = "30.2.1";
export declare const VERSION = "31.0.0";
/**
* @ag-grid-enterprise/side-bar - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v30.2.1
* @ag-grid-enterprise/side-bar - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v31.0.0
* @link https://www.ag-grid.com/

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

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

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

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

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

var HorizontalResizeComp = /** @class */ (function (_super) {
__extends$5(HorizontalResizeComp, _super);
__extends$6(HorizontalResizeComp, _super);
function HorizontalResizeComp() {

@@ -57,3 +57,3 @@ var _this = _super.call(this, /* html */ "<div class=\"ag-tool-panel-horizontal-resize\"></div>") || this;

this.addDestroyFunc(finishedWithResizeFunc);
this.setInverted(this.gridOptionsService.is('enableRtl'));
this.setInverted(this.gridOptionsService.get('enableRtl'));
};

@@ -83,3 +83,3 @@ HorizontalResizeComp.prototype.dispatchResizeEvent = function (start, end, width) {

}
this.elementToResize.style.width = newWidth + "px";
this.elementToResize.style.width = "".concat(newWidth, "px");
this.dispatchResizeEvent(false, isEnd, newWidth);

@@ -101,6 +101,6 @@ };

};
__decorate$5([
__decorate$6([
core.Autowired('horizontalResizeService')
], HorizontalResizeComp.prototype, "horizontalResizeService", void 0);
__decorate$5([
__decorate$6([
core.PostConstruct

@@ -111,3 +111,3 @@ ], HorizontalResizeComp.prototype, "postConstruct", null);

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

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

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

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

var SideBarButtonComp = /** @class */ (function (_super) {
__extends$4(SideBarButtonComp, _super);
__extends$5(SideBarButtonComp, _super);
function SideBarButtonComp(toolPanelDef) {

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

this.addManagedListener(this.eToggleButton, 'click', this.onButtonPressed.bind(this));
this.eToggleButton.setAttribute('id', "ag-" + this.getCompId() + "-button");
this.eToggleButton.setAttribute('id', "ag-".concat(this.getCompId(), "-button"));
};

@@ -178,12 +178,12 @@ SideBarButtonComp.prototype.createTemplate = function () {

SideBarButtonComp.EVENT_TOGGLE_BUTTON_CLICKED = 'toggleButtonClicked';
__decorate$4([
__decorate$5([
core.RefSelector('eToggleButton')
], SideBarButtonComp.prototype, "eToggleButton", void 0);
__decorate$4([
__decorate$5([
core.RefSelector('eIconWrapper')
], SideBarButtonComp.prototype, "eIconWrapper", void 0);
__decorate$4([
__decorate$5([
core.RefSelector('eLabel')
], SideBarButtonComp.prototype, "eLabel", void 0);
__decorate$4([
__decorate$5([
core.PostConstruct

@@ -194,3 +194,3 @@ ], SideBarButtonComp.prototype, "postConstruct", null);

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

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

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

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

var SideBarButtonsComp = /** @class */ (function (_super) {
__extends$3(SideBarButtonsComp, _super);
__extends$4(SideBarButtonsComp, _super);
function SideBarButtonsComp() {

@@ -261,12 +261,12 @@ var _this = _super.call(this, SideBarButtonsComp.TEMPLATE) || this;

SideBarButtonsComp.TEMPLATE = "<div class=\"ag-side-buttons\" role=\"tablist\"></div>";
__decorate$3([
__decorate$4([
core.Autowired('focusService')
], SideBarButtonsComp.prototype, "focusService", void 0);
__decorate$3([
__decorate$4([
core.Autowired('columnModel')
], SideBarButtonsComp.prototype, "columnModel", void 0);
__decorate$3([
__decorate$4([
core.PostConstruct
], SideBarButtonsComp.prototype, "postConstruct", null);
__decorate$3([
__decorate$4([
core.PreDestroy

@@ -301,3 +301,3 @@ ], SideBarButtonsComp.prototype, "clearButtons", null);

if (!lookupResult) {
console.warn("AG Grid: the key " + key + " is not a valid key for specifying a tool panel, valid keys are: " + Object.keys(SideBarDefParser.DEFAULT_BY_KEY).join(','));
console.warn("AG Grid: the key ".concat(key, " is not a valid key for specifying a tool panel, valid keys are: ").concat(Object.keys(SideBarDefParser.DEFAULT_BY_KEY).join(',')));
return;

@@ -333,3 +333,3 @@ }

if (!lookupResult) {
console.warn("AG Grid: the key " + it + " is not a valid key for specifying a tool panel, valid keys are: " + Object.keys(SideBarDefParser.DEFAULT_BY_KEY).join(','));
console.warn("AG Grid: the key ".concat(it, " is not a valid key for specifying a tool panel, valid keys are: ").concat(Object.keys(SideBarDefParser.DEFAULT_BY_KEY).join(',')));
return;

@@ -367,3 +367,3 @@ }

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

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

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

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

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

@@ -399,3 +399,3 @@ return _super.call(this, ToolPanelWrapper.TEMPLATE) || this;

var resizeBar = this.resizeBar = this.createManagedBean(new HorizontalResizeComp());
eGui.setAttribute('id', "ag-" + this.getCompId());
eGui.setAttribute('id', "ag-".concat(this.getCompId()));
resizeBar.setElementToResize(eGui);

@@ -407,11 +407,10 @@ this.appendChild(resizeBar);

};
ToolPanelWrapper.prototype.setToolPanelDef = function (toolPanelDef) {
ToolPanelWrapper.prototype.setToolPanelDef = function (toolPanelDef, params) {
var id = toolPanelDef.id, minWidth = toolPanelDef.minWidth, maxWidth = toolPanelDef.maxWidth, width = toolPanelDef.width;
this.toolPanelId = id;
this.width = width;
var params = {};
var compDetails = this.userComponentFactory.getToolPanelCompDetails(toolPanelDef, params);
var componentPromise = compDetails.newAgStackInstance();
if (componentPromise == null) {
console.warn("AG Grid: error processing tool panel component " + id + ". You need to specify 'toolPanel'");
console.warn("AG Grid: error processing tool panel component ".concat(id, ". You need to specify 'toolPanel'"));
return;

@@ -435,3 +434,3 @@ }

if (this.width) {
this.getGui().style.width = this.width + "px";
this.getGui().style.width = "".concat(this.width, "px");
}

@@ -443,3 +442,3 @@ };

ToolPanelWrapper.prototype.setResizerSizerSide = function (side) {
var isRtl = this.gridOptionsService.is('enableRtl');
var isRtl = this.gridOptionsService.get('enableRtl');
var isLeft = side === 'left';

@@ -453,6 +452,6 @@ var inverted = isRtl ? isLeft : !isLeft;

ToolPanelWrapper.TEMPLATE = "<div class=\"ag-tool-panel-wrapper\" role=\"tabpanel\"/>";
__decorate$2([
__decorate$3([
core.Autowired("userComponentFactory")
], ToolPanelWrapper.prototype, "userComponentFactory", void 0);
__decorate$2([
__decorate$3([
core.PostConstruct

@@ -463,3 +462,3 @@ ], ToolPanelWrapper.prototype, "setupResize", null);

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

@@ -479,3 +478,3 @@ extendStatics = Object.setPrototypeOf ||

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

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

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

@@ -507,9 +506,12 @@ var _this = _super.call(this, SideBarComp.TEMPLATE) || this;

var _this = this;
var _a;
this.sideBarButtonsComp.addEventListener(SideBarButtonsComp.EVENT_SIDE_BAR_BUTTON_CLICKED, this.onToolPanelButtonClicked.bind(this));
this.setSideBarDef();
var sideBarState = ((_a = this.gridOptionsService.get('initialState')) !== null && _a !== void 0 ? _a : {}).sideBar;
this.setSideBarDef(sideBarState);
this.addManagedPropertyListener('sideBar', function () {
_this.clearDownUi();
// don't re-assign initial state
_this.setSideBarDef();
});
this.gridApi.registerSideBarComp(this);
this.sideBarService.registerSideBarComp(this);
this.createManagedBean(new core.ManagedFocusFeature(this.getFocusableElement(), {

@@ -603,3 +605,3 @@ onTabKeyDown: this.onTabKeyDown.bind(this),

};
SideBarComp.prototype.setSideBarDef = function () {
SideBarComp.prototype.setSideBarDef = function (sideBarState) {
// initially hide side bar

@@ -611,11 +613,19 @@ this.setDisplayed(false);

var toolPanelDefs = this.sideBar.toolPanels;
this.createToolPanelsAndSideButtons(toolPanelDefs);
this.createToolPanelsAndSideButtons(toolPanelDefs, sideBarState);
if (!this.toolPanelWrappers.length) {
return;
}
var shouldDisplaySideBar = !this.sideBar.hiddenByDefault;
var shouldDisplaySideBar = sideBarState ? sideBarState.visible : !this.sideBar.hiddenByDefault;
this.setDisplayed(shouldDisplaySideBar);
this.setSideBarPosition(this.sideBar.position);
if (!this.sideBar.hiddenByDefault) {
this.openToolPanel(this.sideBar.defaultToolPanel, 'sideBarInitializing');
this.setSideBarPosition(sideBarState ? sideBarState.position : this.sideBar.position);
if (shouldDisplaySideBar) {
if (sideBarState) {
var openToolPanel = sideBarState.openToolPanel;
if (openToolPanel) {
this.openToolPanel(openToolPanel, 'sideBarInitializing');
}
}
else {
this.openToolPanel(this.sideBar.defaultToolPanel, 'sideBarInitializing');
}
}

@@ -631,2 +641,3 @@ }

}
this.position = position;
var isLeft = position === 'left';

@@ -639,10 +650,29 @@ var resizerSide = isLeft ? 'right' : 'left';

});
this.eventService.dispatchEvent({ type: core.Events.EVENT_SIDE_BAR_UPDATED });
return this;
};
SideBarComp.prototype.createToolPanelsAndSideButtons = function (defs) {
SideBarComp.prototype.setDisplayed = function (displayed, options) {
_super.prototype.setDisplayed.call(this, displayed, options);
this.eventService.dispatchEvent({ type: core.Events.EVENT_SIDE_BAR_UPDATED });
};
SideBarComp.prototype.getState = function () {
var toolPanels = {};
this.toolPanelWrappers.forEach(function (wrapper) {
var _a, _b;
toolPanels[wrapper.getToolPanelId()] = (_b = (_a = wrapper.getToolPanelInstance()).getState) === null || _b === void 0 ? void 0 : _b.call(_a);
});
return {
visible: this.isDisplayed(),
position: this.position,
openToolPanel: this.openedItem(),
toolPanels: toolPanels
};
};
SideBarComp.prototype.createToolPanelsAndSideButtons = function (defs, sideBarState) {
var e_1, _a;
var _b;
try {
for (var defs_1 = __values(defs), defs_1_1 = defs_1.next(); !defs_1_1.done; defs_1_1 = defs_1.next()) {
var def = defs_1_1.value;
this.createToolPanelAndSideButton(def);
this.createToolPanelAndSideButton(def, (_b = sideBarState === null || sideBarState === void 0 ? void 0 : sideBarState.toolPanels) === null || _b === void 0 ? void 0 : _b[def.id]);
}

@@ -676,5 +706,3 @@ }

if (this.filterManager.isAdvancedFilterEnabled()) {
core._.doOnce(function () {
console.warn('AG Grid: Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled.');
}, 'advancedFilterToolPanel');
core._.warnOnce('Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled.');
return false;

@@ -685,3 +713,4 @@ }

};
SideBarComp.prototype.createToolPanelAndSideButton = function (def) {
SideBarComp.prototype.createToolPanelAndSideButton = function (def, initialState) {
var _this = this;
if (!this.validateDef(def)) {

@@ -692,3 +721,6 @@ return;

var wrapper = this.getContext().createBean(new ToolPanelWrapper());
wrapper.setToolPanelDef(def);
wrapper.setToolPanelDef(def, {
initialState: initialState,
onStateUpdated: function () { return _this.eventService.dispatchEvent({ type: core.Events.EVENT_SIDE_BAR_UPDATED }); }
});
wrapper.setDisplayed(false);

@@ -723,3 +755,3 @@ var wrapperGui = wrapper.getGui();

if (!toolPanelWrapper) {
console.warn("AG Grid: unable to lookup Tool Panel as invalid key supplied: " + key);
console.warn("AG Grid: unable to lookup Tool Panel as invalid key supplied: ".concat(key));
return;

@@ -781,15 +813,15 @@ }

SideBarComp.TEMPLATE = "<div class=\"ag-side-bar ag-unselectable\">\n <ag-side-bar-buttons ref=\"sideBarButtons\"></ag-side-bar-buttons>\n </div>";
__decorate$1([
core.Autowired('gridApi')
], SideBarComp.prototype, "gridApi", void 0);
__decorate$1([
__decorate$2([
core.Autowired('focusService')
], SideBarComp.prototype, "focusService", void 0);
__decorate$1([
__decorate$2([
core.Autowired('filterManager')
], SideBarComp.prototype, "filterManager", void 0);
__decorate$1([
__decorate$2([
core.Autowired('sideBarService')
], SideBarComp.prototype, "sideBarService", void 0);
__decorate$2([
core.RefSelector('sideBarButtons')
], SideBarComp.prototype, "sideBarButtonsComp", void 0);
__decorate$1([
__decorate$2([
core.PostConstruct

@@ -800,3 +832,3 @@ ], SideBarComp.prototype, "postConstruct", null);

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

@@ -816,3 +848,3 @@ extendStatics = Object.setPrototypeOf ||

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

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

var ToolPanelColDefService = /** @class */ (function (_super) {
__extends(ToolPanelColDefService, _super);
__extends$1(ToolPanelColDefService, _super);
function ToolPanelColDefService() {

@@ -997,6 +1029,6 @@ var _this = _super !== null && _super.apply(this, arguments) || this;

};
__decorate([
__decorate$1([
core.Autowired('columnModel')
], ToolPanelColDefService.prototype, "columnModel", void 0);
ToolPanelColDefService = __decorate([
ToolPanelColDefService = __decorate$1([
core.Bean('toolPanelColDefService')

@@ -1008,8 +1040,46 @@ ], ToolPanelColDefService);

// DO NOT UPDATE MANUALLY: Generated from script during build time
var VERSION = '30.2.1';
var VERSION = '31.0.0';
var __extends = (undefined && undefined.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var SideBarService = /** @class */ (function (_super) {
__extends(SideBarService, _super);
function SideBarService() {
return _super !== null && _super.apply(this, arguments) || this;
}
SideBarService.prototype.registerSideBarComp = function (sideBarComp) {
this.sideBarComp = sideBarComp;
};
SideBarService.prototype.getSideBarComp = function () {
return this.sideBarComp;
};
SideBarService = __decorate([
core.Bean('sideBarService')
], SideBarService);
return SideBarService;
}(core.BeanStub));
var SideBarModule = {
version: VERSION,
moduleName: core.ModuleNames.SideBarModule,
beans: [ToolPanelColDefService],
beans: [ToolPanelColDefService, SideBarService],
agStackComponents: [

@@ -1016,0 +1086,0 @@ { componentName: 'AgHorizontalResize', componentClass: HorizontalResizeComp },

/**
* @ag-grid-enterprise/side-bar - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v30.2.1
* @ag-grid-enterprise/side-bar - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v31.0.0
* @link https://www.ag-grid.com/

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

/**
* @ag-grid-enterprise/side-bar - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v30.2.1
* @ag-grid-enterprise/side-bar - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v31.0.0
* @link https://www.ag-grid.com/
* @license Commercial
*/
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("@ag-grid-community/core"),o=require("@ag-grid-enterprise/core"),n=(e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(t,o)},function(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}),r=function(e,t,o,n){var r,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(i<3?r(s):i>3?r(t,o,s):r(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},i=function(e){function o(){var t=e.call(this,'<div class="ag-tool-panel-horizontal-resize"></div>')||this;return t.minWidth=100,t.maxWidth=null,t}return n(o,e),o.prototype.setElementToResize=function(e){this.elementToResize=e},o.prototype.postConstruct=function(){var e=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(e),this.setInverted(this.gridOptionsService.is("enableRtl"))},o.prototype.dispatchResizeEvent=function(e,o,n){var r={type:t.Events.EVENT_TOOL_PANEL_SIZE_CHANGED,width:n,started:e,ended:o};this.eventService.dispatchEvent(r)},o.prototype.onResizeStart=function(){this.startingWidth=this.elementToResize.offsetWidth,this.dispatchResizeEvent(!0,!1,this.startingWidth)},o.prototype.onResizeEnd=function(e){return this.onResizing(e,!0)},o.prototype.onResizing=function(e,t){void 0===t&&(t=!1);var o=this.inverted?-1:1,n=Math.max(this.minWidth,Math.floor(this.startingWidth-e*o));null!=this.maxWidth&&(n=Math.min(this.maxWidth,n)),this.elementToResize.style.width=n+"px",this.dispatchResizeEvent(!1,t,n)},o.prototype.setInverted=function(e){this.inverted=e},o.prototype.setMaxWidth=function(e){this.maxWidth=e},o.prototype.setMinWidth=function(e){this.minWidth=null!=e?e:100},r([t.Autowired("horizontalResizeService")],o.prototype,"horizontalResizeService",void 0),r([t.PostConstruct],o.prototype,"postConstruct",null),o}(t.Component),s=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(t,o)};return function(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),a=function(e,t,o,n){var r,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(i<3?r(s):i>3?r(t,o,s):r(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},l=function(e){function o(t){var o=e.call(this)||this;return o.toolPanelDef=t,o}return s(o,e),o.prototype.getToolPanelId=function(){return this.toolPanelDef.id},o.prototype.postConstruct=function(){var 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")},o.prototype.createTemplate=function(){return'<div class="ag-side-button" role="presentation">\n <button type="button" ref="eToggleButton" tabindex="-1" role="tab" aria-expanded="false" class="ag-button ag-side-button-button">\n <div ref="eIconWrapper" class="ag-side-button-icon-wrapper" aria-hidden="true"></div>\n <span ref ="eLabel" class="ag-side-button-label"></span>\n </button>\n </div>'},o.prototype.setLabel=function(){var e=this.localeService.getLocaleTextFunc(),t=this.toolPanelDef,o=e(t.labelKey,t.labelDefault);this.eLabel.innerText=o},o.prototype.setIcon=function(){this.eIconWrapper.insertAdjacentElement("afterbegin",t._.createIconNoSpan(this.toolPanelDef.iconKey,this.gridOptionsService))},o.prototype.onButtonPressed=function(){this.dispatchEvent({type:o.EVENT_TOGGLE_BUTTON_CLICKED})},o.prototype.setSelected=function(e){this.addOrRemoveCssClass("ag-selected",e),t._.setAriaExpanded(this.eToggleButton,e)},o.prototype.getButtonElement=function(){return this.eToggleButton},o.EVENT_TOGGLE_BUTTON_CLICKED="toggleButtonClicked",a([t.RefSelector("eToggleButton")],o.prototype,"eToggleButton",void 0),a([t.RefSelector("eIconWrapper")],o.prototype,"eIconWrapper",void 0),a([t.RefSelector("eLabel")],o.prototype,"eLabel",void 0),a([t.PostConstruct],o.prototype,"postConstruct",null),o}(t.Component),u=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(t,o)};return function(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),c=function(e,t,o,n){var r,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(i<3?r(s):i>3?r(t,o,s):r(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},p=function(e){function o(){var t=e.call(this,o.TEMPLATE)||this;return t.buttonComps=[],t}return u(o,e),o.prototype.postConstruct=function(){this.addManagedListener(this.getFocusableElement(),"keydown",this.handleKeyDown.bind(this))},o.prototype.handleKeyDown=function(e){if(e.key===t.KeyCode.TAB&&e.shiftKey){var o=t._.last(this.columnModel.getAllDisplayedColumns());this.focusService.focusGridView(o,!0)&&e.preventDefault()}},o.prototype.setActiveButton=function(e){this.buttonComps.forEach((function(t){t.setSelected(e===t.getToolPanelId())}))},o.prototype.addButtonComp=function(e){var t=this,n=this.createBean(new l(e));return this.buttonComps.push(n),this.appendChild(n),n.addEventListener(l.EVENT_TOGGLE_BUTTON_CLICKED,(function(){t.dispatchEvent({type:o.EVENT_SIDE_BAR_BUTTON_CLICKED,toolPanelId:e.id})})),n},o.prototype.clearButtons=function(){this.buttonComps=this.destroyBeans(this.buttonComps),t._.clearElement(this.getGui())},o.EVENT_SIDE_BAR_BUTTON_CLICKED="sideBarButtonClicked",o.TEMPLATE='<div class="ag-side-buttons" role="tablist"></div>',c([t.Autowired("focusService")],o.prototype,"focusService",void 0),c([t.Autowired("columnModel")],o.prototype,"columnModel",void 0),c([t.PostConstruct],o.prototype,"postConstruct",null),c([t.PreDestroy],o.prototype,"clearButtons",null),o}(t.Component),d=function(){function e(){}return e.parse=function(t){if(t){if(!0===t)return{toolPanels:[e.DEFAULT_COLUMN_COMP,e.DEFAULT_FILTER_COMP],defaultToolPanel:"columns"};if("string"==typeof t)return e.parse([t]);if(Array.isArray(t)){var o=[];if(t.forEach((function(t){var n=e.DEFAULT_BY_KEY[t];n?o.push(n):console.warn("AG Grid: the key "+t+" is not a valid key for specifying a tool panel, valid keys are: "+Object.keys(e.DEFAULT_BY_KEY).join(","))})),0===o.length)return;return{toolPanels:o,defaultToolPanel:o[0].id}}return{toolPanels:e.parseComponents(t.toolPanels),defaultToolPanel:t.defaultToolPanel,hiddenByDefault:t.hiddenByDefault,position:t.position}}},e.parseComponents=function(t){var o=[];return t?(t.forEach((function(t){var n=null;if("string"==typeof t){var r=e.DEFAULT_BY_KEY[t];if(!r)return void console.warn("AG Grid: the key "+t+" is not a valid key for specifying a tool panel, valid keys are: "+Object.keys(e.DEFAULT_BY_KEY).join(","));n=r}else n=t;o.push(n)})),o):o},e.DEFAULT_COLUMN_COMP={id:"columns",labelDefault:"Columns",labelKey:"columns",iconKey:"columns",toolPanel:"agColumnsToolPanel"},e.DEFAULT_FILTER_COMP={id:"filters",labelDefault:"Filters",labelKey:"filters",iconKey:"filter",toolPanel:"agFiltersToolPanel"},e.DEFAULT_BY_KEY={columns:e.DEFAULT_COLUMN_COMP,filters:e.DEFAULT_FILTER_COMP},e}(),f=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(t,o)};return function(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),h=function(e,t,o,n){var r,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(i<3?r(s):i>3?r(t,o,s):r(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},y=function(e){function o(){return e.call(this,o.TEMPLATE)||this}return f(o,e),o.prototype.setupResize=function(){var e=this.getGui(),t=this.resizeBar=this.createManagedBean(new i);e.setAttribute("id","ag-"+this.getCompId()),t.setElementToResize(e),this.appendChild(t)},o.prototype.getToolPanelId=function(){return this.toolPanelId},o.prototype.setToolPanelDef=function(e){var t=e.id,o=e.minWidth,n=e.maxWidth,r=e.width;this.toolPanelId=t,this.width=r;var i=this.userComponentFactory.getToolPanelCompDetails(e,{}).newAgStackInstance();null!=i?(i.then(this.setToolPanelComponent.bind(this)),null!=o&&this.resizeBar.setMinWidth(o),null!=n&&this.resizeBar.setMaxWidth(n)):console.warn("AG Grid: error processing tool panel component "+t+". You need to specify 'toolPanel'")},o.prototype.setToolPanelComponent=function(e){var t=this;this.toolPanelCompInstance=e,this.appendChild(e.getGui()),this.addDestroyFunc((function(){t.destroyBean(e)})),this.width&&(this.getGui().style.width=this.width+"px")},o.prototype.getToolPanelInstance=function(){return this.toolPanelCompInstance},o.prototype.setResizerSizerSide=function(e){var t="left"===e,o=this.gridOptionsService.is("enableRtl")?t:!t;this.resizeBar.setInverted(o)},o.prototype.refresh=function(){this.toolPanelCompInstance.refresh()},o.TEMPLATE='<div class="ag-tool-panel-wrapper" role="tabpanel"/>',h([t.Autowired("userComponentFactory")],o.prototype,"userComponentFactory",void 0),h([t.PostConstruct],o.prototype,"setupResize",null),o}(t.Component),v=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(t,o)};return function(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),g=function(e,t,o,n){var r,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(i<3?r(s):i>3?r(t,o,s):r(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},P=function(e){var t="function"==typeof Symbol&&Symbol.iterator,o=t&&e[t],n=0;if(o)return o.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},T=function(e){function o(){var t=e.call(this,o.TEMPLATE)||this;return t.toolPanelWrappers=[],t}return v(o,e),o.prototype.postConstruct=function(){var e=this;this.sideBarButtonsComp.addEventListener(p.EVENT_SIDE_BAR_BUTTON_CLICKED,this.onToolPanelButtonClicked.bind(this)),this.setSideBarDef(),this.addManagedPropertyListener("sideBar",(function(){e.clearDownUi(),e.setSideBarDef()})),this.gridApi.registerSideBarComp(this),this.createManagedBean(new t.ManagedFocusFeature(this.getFocusableElement(),{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this)}))},o.prototype.onTabKeyDown=function(e){if(!e.defaultPrevented){var t=this.focusService,o=this.sideBarButtonsComp,n=this.getGui(),r=o.getGui(),i=this.gridOptionsService.getDocument().activeElement,s=n.querySelector(".ag-tool-panel-wrapper:not(.ag-hidden)"),a=e.target;if(s)if(r.contains(i))t.focusInto(s,e.shiftKey)&&e.preventDefault();else if(e.shiftKey){var l=null;s.contains(i)?l=this.focusService.findNextFocusableElement(s,void 0,!0):t.isTargetUnderManagedComponent(s,a)&&e.shiftKey&&(l=this.focusService.findFocusableElementBeforeTabGuard(s,a)),l||(l=r.querySelector(".ag-selected button")),l&&(e.preventDefault(),l.focus())}}},o.prototype.handleKeyDown=function(e){var o=this.gridOptionsService.getDocument();if(this.sideBarButtonsComp.getGui().contains(o.activeElement)){var n=this.sideBarButtonsComp.getGui(),r=Array.prototype.slice.call(n.querySelectorAll(".ag-side-button")),i=o.activeElement,s=r.findIndex((function(e){return e.contains(i)})),a=null;switch(e.key){case t.KeyCode.LEFT:case t.KeyCode.UP:a=Math.max(0,s-1);break;case t.KeyCode.RIGHT:case t.KeyCode.DOWN:a=Math.min(s+1,r.length-1)}if(null!==a){var l=r[a].querySelector("button");l&&(l.focus(),e.preventDefault())}}},o.prototype.onToolPanelButtonClicked=function(e){var t=e.toolPanelId;this.openedItem()===t?this.openToolPanel(void 0,"sideBarButtonClicked"):this.openToolPanel(t,"sideBarButtonClicked")},o.prototype.clearDownUi=function(){this.sideBarButtonsComp.clearButtons(),this.destroyToolPanelWrappers()},o.prototype.setSideBarDef=function(){this.setDisplayed(!1);var e=this.gridOptionsService.get("sideBar");if(this.sideBar=d.parse(e),this.sideBar&&this.sideBar.toolPanels){var t=this.sideBar.toolPanels;if(this.createToolPanelsAndSideButtons(t),!this.toolPanelWrappers.length)return;var o=!this.sideBar.hiddenByDefault;this.setDisplayed(o),this.setSideBarPosition(this.sideBar.position),this.sideBar.hiddenByDefault||this.openToolPanel(this.sideBar.defaultToolPanel,"sideBarInitializing")}},o.prototype.getDef=function(){return this.sideBar},o.prototype.setSideBarPosition=function(e){e||(e="right");var t="left"===e,o=t?"right":"left";return this.addOrRemoveCssClass("ag-side-bar-left",t),this.addOrRemoveCssClass("ag-side-bar-right",!t),this.toolPanelWrappers.forEach((function(e){e.setResizerSizerSide(o)})),this},o.prototype.createToolPanelsAndSideButtons=function(e){var t,o;try{for(var n=P(e),r=n.next();!r.done;r=n.next()){var i=r.value;this.createToolPanelAndSideButton(i)}}catch(e){t={error:e}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(t)throw t.error}}},o.prototype.validateDef=function(e){if(null==e.id)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("agColumnsToolPanel"===e.toolPanel&&!t.ModuleRegistry.__assertRegistered(t.ModuleNames.ColumnsToolPanelModule,"Column Tool Panel",this.context.getGridId()))return!1;if("agFiltersToolPanel"===e.toolPanel){if(!t.ModuleRegistry.__assertRegistered(t.ModuleNames.FiltersToolPanelModule,"Filters Tool Panel",this.context.getGridId()))return!1;if(this.filterManager.isAdvancedFilterEnabled())return t._.doOnce((function(){console.warn("AG Grid: Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled.")}),"advancedFilterToolPanel"),!1}return!0},o.prototype.createToolPanelAndSideButton=function(e){if(this.validateDef(e)){var o=this.sideBarButtonsComp.addButtonComp(e),n=this.getContext().createBean(new y);n.setToolPanelDef(e),n.setDisplayed(!1);var r=n.getGui();this.appendChild(r),this.toolPanelWrappers.push(n),t._.setAriaControls(o.getButtonElement(),r)}},o.prototype.refresh=function(){this.toolPanelWrappers.forEach((function(e){return e.refresh()}))},o.prototype.openToolPanel=function(e,t){void 0===t&&(t="api");var o=this.openedItem();o!==e&&(this.toolPanelWrappers.forEach((function(t){var o=e===t.getToolPanelId();t.setDisplayed(o)})),o!==this.openedItem()&&(this.sideBarButtonsComp.setActiveButton(e),this.raiseToolPanelVisibleEvent(e,null!=o?o:void 0,t)))},o.prototype.getToolPanelInstance=function(e){var t=this.toolPanelWrappers.filter((function(t){return t.getToolPanelId()===e}))[0];if(t)return t.getToolPanelInstance();console.warn("AG Grid: unable to lookup Tool Panel as invalid key supplied: "+e)},o.prototype.raiseToolPanelVisibleEvent=function(e,o,n){var r=!!e&&!!o;if(o){var i={type:t.Events.EVENT_TOOL_PANEL_VISIBLE_CHANGED,source:n,key:o,visible:!1,switchingToolPanel:r};this.eventService.dispatchEvent(i)}if(e){var s={type:t.Events.EVENT_TOOL_PANEL_VISIBLE_CHANGED,source:n,key:e,visible:!0,switchingToolPanel:r};this.eventService.dispatchEvent(s)}},o.prototype.close=function(e){void 0===e&&(e="api"),this.openToolPanel(void 0,e)},o.prototype.isToolPanelShowing=function(){return!!this.openedItem()},o.prototype.openedItem=function(){var e=null;return this.toolPanelWrappers.forEach((function(t){t.isDisplayed()&&(e=t.getToolPanelId())})),e},o.prototype.destroyToolPanelWrappers=function(){var e=this;this.toolPanelWrappers.forEach((function(o){t._.removeFromParent(o.getGui()),e.destroyBean(o)})),this.toolPanelWrappers.length=0},o.prototype.destroy=function(){this.destroyToolPanelWrappers(),e.prototype.destroy.call(this)},o.TEMPLATE='<div class="ag-side-bar ag-unselectable">\n <ag-side-bar-buttons ref="sideBarButtons"></ag-side-bar-buttons>\n </div>',g([t.Autowired("gridApi")],o.prototype,"gridApi",void 0),g([t.Autowired("focusService")],o.prototype,"focusService",void 0),g([t.Autowired("filterManager")],o.prototype,"filterManager",void 0),g([t.RefSelector("sideBarButtons")],o.prototype,"sideBarButtonsComp",void 0),g([t.PostConstruct],o.prototype,"postConstruct",null),o}(t.Component),m=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(t,o)};return function(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),C=function(e,t,o,n){var r,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(i<3?r(s):i>3?r(t,o,s):r(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},b=function(e){function o(){var t=null!==e&&e.apply(this,arguments)||this;return t.isColGroupDef=function(e){return e&&void 0!==e.children},t.getId=function(e){return t.isColGroupDef(e)?e.groupId:e.colId},t}return m(o,e),o.prototype.createColumnTree=function(e){var o=this,n=[],r=function(e,i){if(o.isColGroupDef(e)){var s=e,a=void 0!==s.groupId?s.groupId:s.headerName,l=new t.ProvidedColumnGroup(s,a,!1,i),u=[];return s.children.forEach((function(e){var t=r(e,i+1);t&&u.push(t)})),l.setChildren(u),l}var c=e,p=c.colId?c.colId:c.field,d=o.columnModel.getPrimaryColumn(p);return d||n.push(c),d},i=[];return e.forEach((function(e){var t=r(e,0);t&&i.push(t)})),n.length>0&&console.warn("AG Grid: unable to find grid columns for the supplied colDef(s):",n),i},o.prototype.syncLayoutWithGrid=function(e){var t=this.getLeafPathTrees();e(this.mergeLeafPathTrees(t))},o.prototype.getLeafPathTrees=function(){var e=function(o,n){var r;if(o instanceof t.ProvidedColumnGroup)if(o.isPadding())r=n;else{var i=Object.assign({},o.getColGroupDef());i.groupId=o.getGroupId(),i.children=[n],r=i}else{var s=Object.assign({},o.getColDef());s.colId=o.getColId(),r=s}var a=o.getOriginalParent();return a?e(a,r):r};return this.columnModel.getAllGridColumns().filter((function(e){var t=e.getColDef();return e.isPrimary()&&!t.showRowGroup})).map((function(t){return e(t,t.getColDef())}))},o.prototype.mergeLeafPathTrees=function(e){for(var t,o,n=this,r=function(e,t){if(!n.isColGroupDef(t))return e;var o=e,i=t;if(i.children&&i.groupId&&n.addChildrenToGroup(o,i.groupId,i.children[0]))return o;return i.children.forEach((function(e){return r(o,e)})),o},i=[],s=1;s<=e.length;s++){var a=e[s-1],l=e[s];t=a,o=l,n.isColGroupDef(t)&&n.isColGroupDef(o)&&n.getId(t)===n.getId(o)?e[s]=r(a,l):i.push(a)}return i},o.prototype.addChildrenToGroup=function(e,o,n){var r=this;if(!this.isColGroupDef(e))return!0;var i=e,s=n;if(function(e,o){var n=e.children.map(r.getId),i=t._.includes(n,r.getId(o)),s=t._.last(e.children),a=s&&r.getId(s)!==r.getId(o);return i&&a}(i,s))return i.children.push(s),!0;if(i.groupId===o){var a=i.children.map(this.getId);if(!t._.includes(a,this.getId(s)))return i.children.push(s),!0}return i.children.forEach((function(e){return r.addChildrenToGroup(e,o,n)})),!1},C([t.Autowired("columnModel")],o.prototype,"columnModel",void 0),o=C([t.Bean("toolPanelColDefService")],o)}(t.BeanStub),E={version:"30.2.1",moduleName:t.ModuleNames.SideBarModule,beans:[b],agStackComponents:[{componentName:"AgHorizontalResize",componentClass:i},{componentName:"AgSideBar",componentClass:T},{componentName:"AgSideBarButtons",componentClass:p}],dependantModules:[o.EnterpriseCoreModule]};exports.SideBarModule=E,exports.ToolPanelColDefService=b;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t,e=require("@ag-grid-community/core"),o=require("@ag-grid-enterprise/core"),n=(t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(e,o)},function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}),r=function(t,e,o,n){var r,i=arguments.length,s=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(i<3?r(s):i>3?r(e,o,s):r(e,o))||s);return i>3&&s&&Object.defineProperty(e,o,s),s},i=function(t){function o(){var e=t.call(this,'<div class="ag-tool-panel-horizontal-resize"></div>')||this;return e.minWidth=100,e.maxWidth=null,e}return n(o,t),o.prototype.setElementToResize=function(t){this.elementToResize=t},o.prototype.postConstruct=function(){var t=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(t),this.setInverted(this.gridOptionsService.get("enableRtl"))},o.prototype.dispatchResizeEvent=function(t,o,n){var r={type:e.Events.EVENT_TOOL_PANEL_SIZE_CHANGED,width:n,started:t,ended:o};this.eventService.dispatchEvent(r)},o.prototype.onResizeStart=function(){this.startingWidth=this.elementToResize.offsetWidth,this.dispatchResizeEvent(!0,!1,this.startingWidth)},o.prototype.onResizeEnd=function(t){return this.onResizing(t,!0)},o.prototype.onResizing=function(t,e){void 0===e&&(e=!1);var o=this.inverted?-1:1,n=Math.max(this.minWidth,Math.floor(this.startingWidth-t*o));null!=this.maxWidth&&(n=Math.min(this.maxWidth,n)),this.elementToResize.style.width="".concat(n,"px"),this.dispatchResizeEvent(!1,e,n)},o.prototype.setInverted=function(t){this.inverted=t},o.prototype.setMaxWidth=function(t){this.maxWidth=t},o.prototype.setMinWidth=function(t){this.minWidth=null!=t?t:100},r([e.Autowired("horizontalResizeService")],o.prototype,"horizontalResizeService",void 0),r([e.PostConstruct],o.prototype,"postConstruct",null),o}(e.Component),s=function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),a=function(t,e,o,n){var r,i=arguments.length,s=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(i<3?r(s):i>3?r(e,o,s):r(e,o))||s);return i>3&&s&&Object.defineProperty(e,o,s),s},l=function(t){function o(e){var o=t.call(this)||this;return o.toolPanelDef=e,o}return s(o,t),o.prototype.getToolPanelId=function(){return this.toolPanelDef.id},o.prototype.postConstruct=function(){var t=this.createTemplate();this.setTemplate(t),this.setLabel(),this.setIcon(),this.addManagedListener(this.eToggleButton,"click",this.onButtonPressed.bind(this)),this.eToggleButton.setAttribute("id","ag-".concat(this.getCompId(),"-button"))},o.prototype.createTemplate=function(){return'<div class="ag-side-button" role="presentation">\n <button type="button" ref="eToggleButton" tabindex="-1" role="tab" aria-expanded="false" class="ag-button ag-side-button-button">\n <div ref="eIconWrapper" class="ag-side-button-icon-wrapper" aria-hidden="true"></div>\n <span ref ="eLabel" class="ag-side-button-label"></span>\n </button>\n </div>'},o.prototype.setLabel=function(){var t=this.localeService.getLocaleTextFunc(),e=this.toolPanelDef,o=t(e.labelKey,e.labelDefault);this.eLabel.innerText=o},o.prototype.setIcon=function(){this.eIconWrapper.insertAdjacentElement("afterbegin",e._.createIconNoSpan(this.toolPanelDef.iconKey,this.gridOptionsService))},o.prototype.onButtonPressed=function(){this.dispatchEvent({type:o.EVENT_TOGGLE_BUTTON_CLICKED})},o.prototype.setSelected=function(t){this.addOrRemoveCssClass("ag-selected",t),e._.setAriaExpanded(this.eToggleButton,t)},o.prototype.getButtonElement=function(){return this.eToggleButton},o.EVENT_TOGGLE_BUTTON_CLICKED="toggleButtonClicked",a([e.RefSelector("eToggleButton")],o.prototype,"eToggleButton",void 0),a([e.RefSelector("eIconWrapper")],o.prototype,"eIconWrapper",void 0),a([e.RefSelector("eLabel")],o.prototype,"eLabel",void 0),a([e.PostConstruct],o.prototype,"postConstruct",null),o}(e.Component),c=function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),u=function(t,e,o,n){var r,i=arguments.length,s=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(i<3?r(s):i>3?r(e,o,s):r(e,o))||s);return i>3&&s&&Object.defineProperty(e,o,s),s},p=function(t){function o(){var e=t.call(this,o.TEMPLATE)||this;return e.buttonComps=[],e}return c(o,t),o.prototype.postConstruct=function(){this.addManagedListener(this.getFocusableElement(),"keydown",this.handleKeyDown.bind(this))},o.prototype.handleKeyDown=function(t){if(t.key===e.KeyCode.TAB&&t.shiftKey){var o=e._.last(this.columnModel.getAllDisplayedColumns());this.focusService.focusGridView(o,!0)&&t.preventDefault()}},o.prototype.setActiveButton=function(t){this.buttonComps.forEach((function(e){e.setSelected(t===e.getToolPanelId())}))},o.prototype.addButtonComp=function(t){var e=this,n=this.createBean(new l(t));return this.buttonComps.push(n),this.appendChild(n),n.addEventListener(l.EVENT_TOGGLE_BUTTON_CLICKED,(function(){e.dispatchEvent({type:o.EVENT_SIDE_BAR_BUTTON_CLICKED,toolPanelId:t.id})})),n},o.prototype.clearButtons=function(){this.buttonComps=this.destroyBeans(this.buttonComps),e._.clearElement(this.getGui())},o.EVENT_SIDE_BAR_BUTTON_CLICKED="sideBarButtonClicked",o.TEMPLATE='<div class="ag-side-buttons" role="tablist"></div>',u([e.Autowired("focusService")],o.prototype,"focusService",void 0),u([e.Autowired("columnModel")],o.prototype,"columnModel",void 0),u([e.PostConstruct],o.prototype,"postConstruct",null),u([e.PreDestroy],o.prototype,"clearButtons",null),o}(e.Component),d=function(){function t(){}return t.parse=function(e){if(e){if(!0===e)return{toolPanels:[t.DEFAULT_COLUMN_COMP,t.DEFAULT_FILTER_COMP],defaultToolPanel:"columns"};if("string"==typeof e)return t.parse([e]);if(Array.isArray(e)){var o=[];if(e.forEach((function(e){var n=t.DEFAULT_BY_KEY[e];n?o.push(n):console.warn("AG Grid: the key ".concat(e," is not a valid key for specifying a tool panel, valid keys are: ").concat(Object.keys(t.DEFAULT_BY_KEY).join(",")))})),0===o.length)return;return{toolPanels:o,defaultToolPanel:o[0].id}}return{toolPanels:t.parseComponents(e.toolPanels),defaultToolPanel:e.defaultToolPanel,hiddenByDefault:e.hiddenByDefault,position:e.position}}},t.parseComponents=function(e){var o=[];return e?(e.forEach((function(e){var n=null;if("string"==typeof e){var r=t.DEFAULT_BY_KEY[e];if(!r)return void console.warn("AG Grid: the key ".concat(e," is not a valid key for specifying a tool panel, valid keys are: ").concat(Object.keys(t.DEFAULT_BY_KEY).join(",")));n=r}else n=e;o.push(n)})),o):o},t.DEFAULT_COLUMN_COMP={id:"columns",labelDefault:"Columns",labelKey:"columns",iconKey:"columns",toolPanel:"agColumnsToolPanel"},t.DEFAULT_FILTER_COMP={id:"filters",labelDefault:"Filters",labelKey:"filters",iconKey:"filter",toolPanel:"agFiltersToolPanel"},t.DEFAULT_BY_KEY={columns:t.DEFAULT_COLUMN_COMP,filters:t.DEFAULT_FILTER_COMP},t}(),f=function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),h=function(t,e,o,n){var r,i=arguments.length,s=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(i<3?r(s):i>3?r(e,o,s):r(e,o))||s);return i>3&&s&&Object.defineProperty(e,o,s),s},y=function(t){function o(){return t.call(this,o.TEMPLATE)||this}return f(o,t),o.prototype.setupResize=function(){var t=this.getGui(),e=this.resizeBar=this.createManagedBean(new i);t.setAttribute("id","ag-".concat(this.getCompId())),e.setElementToResize(t),this.appendChild(e)},o.prototype.getToolPanelId=function(){return this.toolPanelId},o.prototype.setToolPanelDef=function(t,e){var o=t.id,n=t.minWidth,r=t.maxWidth,i=t.width;this.toolPanelId=o,this.width=i;var s=this.userComponentFactory.getToolPanelCompDetails(t,e).newAgStackInstance();null!=s?(s.then(this.setToolPanelComponent.bind(this)),null!=n&&this.resizeBar.setMinWidth(n),null!=r&&this.resizeBar.setMaxWidth(r)):console.warn("AG Grid: error processing tool panel component ".concat(o,". You need to specify 'toolPanel'"))},o.prototype.setToolPanelComponent=function(t){var e=this;this.toolPanelCompInstance=t,this.appendChild(t.getGui()),this.addDestroyFunc((function(){e.destroyBean(t)})),this.width&&(this.getGui().style.width="".concat(this.width,"px"))},o.prototype.getToolPanelInstance=function(){return this.toolPanelCompInstance},o.prototype.setResizerSizerSide=function(t){var e="left"===t,o=this.gridOptionsService.get("enableRtl")?e:!e;this.resizeBar.setInverted(o)},o.prototype.refresh=function(){this.toolPanelCompInstance.refresh()},o.TEMPLATE='<div class="ag-tool-panel-wrapper" role="tabpanel"/>',h([e.Autowired("userComponentFactory")],o.prototype,"userComponentFactory",void 0),h([e.PostConstruct],o.prototype,"setupResize",null),o}(e.Component),v=function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),g=function(t,e,o,n){var r,i=arguments.length,s=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(i<3?r(s):i>3?r(e,o,s):r(e,o))||s);return i>3&&s&&Object.defineProperty(e,o,s),s},P=function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},T=function(t){function o(){var e=t.call(this,o.TEMPLATE)||this;return e.toolPanelWrappers=[],e}return v(o,t),o.prototype.postConstruct=function(){var t,o=this;this.sideBarButtonsComp.addEventListener(p.EVENT_SIDE_BAR_BUTTON_CLICKED,this.onToolPanelButtonClicked.bind(this));var n=(null!==(t=this.gridOptionsService.get("initialState"))&&void 0!==t?t:{}).sideBar;this.setSideBarDef(n),this.addManagedPropertyListener("sideBar",(function(){o.clearDownUi(),o.setSideBarDef()})),this.sideBarService.registerSideBarComp(this),this.createManagedBean(new e.ManagedFocusFeature(this.getFocusableElement(),{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this)}))},o.prototype.onTabKeyDown=function(t){if(!t.defaultPrevented){var e=this.focusService,o=this.sideBarButtonsComp,n=this.getGui(),r=o.getGui(),i=this.gridOptionsService.getDocument().activeElement,s=n.querySelector(".ag-tool-panel-wrapper:not(.ag-hidden)"),a=t.target;if(s)if(r.contains(i))e.focusInto(s,t.shiftKey)&&t.preventDefault();else if(t.shiftKey){var l=null;s.contains(i)?l=this.focusService.findNextFocusableElement(s,void 0,!0):e.isTargetUnderManagedComponent(s,a)&&t.shiftKey&&(l=this.focusService.findFocusableElementBeforeTabGuard(s,a)),l||(l=r.querySelector(".ag-selected button")),l&&(t.preventDefault(),l.focus())}}},o.prototype.handleKeyDown=function(t){var o=this.gridOptionsService.getDocument();if(this.sideBarButtonsComp.getGui().contains(o.activeElement)){var n=this.sideBarButtonsComp.getGui(),r=Array.prototype.slice.call(n.querySelectorAll(".ag-side-button")),i=o.activeElement,s=r.findIndex((function(t){return t.contains(i)})),a=null;switch(t.key){case e.KeyCode.LEFT:case e.KeyCode.UP:a=Math.max(0,s-1);break;case e.KeyCode.RIGHT:case e.KeyCode.DOWN:a=Math.min(s+1,r.length-1)}if(null!==a){var l=r[a].querySelector("button");l&&(l.focus(),t.preventDefault())}}},o.prototype.onToolPanelButtonClicked=function(t){var e=t.toolPanelId;this.openedItem()===e?this.openToolPanel(void 0,"sideBarButtonClicked"):this.openToolPanel(e,"sideBarButtonClicked")},o.prototype.clearDownUi=function(){this.sideBarButtonsComp.clearButtons(),this.destroyToolPanelWrappers()},o.prototype.setSideBarDef=function(t){this.setDisplayed(!1);var e=this.gridOptionsService.get("sideBar");if(this.sideBar=d.parse(e),this.sideBar&&this.sideBar.toolPanels){var o=this.sideBar.toolPanels;if(this.createToolPanelsAndSideButtons(o,t),!this.toolPanelWrappers.length)return;var n=t?t.visible:!this.sideBar.hiddenByDefault;if(this.setDisplayed(n),this.setSideBarPosition(t?t.position:this.sideBar.position),n)if(t){var r=t.openToolPanel;r&&this.openToolPanel(r,"sideBarInitializing")}else this.openToolPanel(this.sideBar.defaultToolPanel,"sideBarInitializing")}},o.prototype.getDef=function(){return this.sideBar},o.prototype.setSideBarPosition=function(t){t||(t="right"),this.position=t;var o="left"===t,n=o?"right":"left";return this.addOrRemoveCssClass("ag-side-bar-left",o),this.addOrRemoveCssClass("ag-side-bar-right",!o),this.toolPanelWrappers.forEach((function(t){t.setResizerSizerSide(n)})),this.eventService.dispatchEvent({type:e.Events.EVENT_SIDE_BAR_UPDATED}),this},o.prototype.setDisplayed=function(o,n){t.prototype.setDisplayed.call(this,o,n),this.eventService.dispatchEvent({type:e.Events.EVENT_SIDE_BAR_UPDATED})},o.prototype.getState=function(){var t={};return this.toolPanelWrappers.forEach((function(e){var o,n;t[e.getToolPanelId()]=null===(n=(o=e.getToolPanelInstance()).getState)||void 0===n?void 0:n.call(o)})),{visible:this.isDisplayed(),position:this.position,openToolPanel:this.openedItem(),toolPanels:t}},o.prototype.createToolPanelsAndSideButtons=function(t,e){var o,n,r;try{for(var i=P(t),s=i.next();!s.done;s=i.next()){var a=s.value;this.createToolPanelAndSideButton(a,null===(r=null==e?void 0:e.toolPanels)||void 0===r?void 0:r[a.id])}}catch(t){o={error:t}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}},o.prototype.validateDef=function(t){if(null==t.id)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("agColumnsToolPanel"===t.toolPanel&&!e.ModuleRegistry.__assertRegistered(e.ModuleNames.ColumnsToolPanelModule,"Column Tool Panel",this.context.getGridId()))return!1;if("agFiltersToolPanel"===t.toolPanel){if(!e.ModuleRegistry.__assertRegistered(e.ModuleNames.FiltersToolPanelModule,"Filters Tool Panel",this.context.getGridId()))return!1;if(this.filterManager.isAdvancedFilterEnabled())return e._.warnOnce("Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled."),!1}return!0},o.prototype.createToolPanelAndSideButton=function(t,o){var n=this;if(this.validateDef(t)){var r=this.sideBarButtonsComp.addButtonComp(t),i=this.getContext().createBean(new y);i.setToolPanelDef(t,{initialState:o,onStateUpdated:function(){return n.eventService.dispatchEvent({type:e.Events.EVENT_SIDE_BAR_UPDATED})}}),i.setDisplayed(!1);var s=i.getGui();this.appendChild(s),this.toolPanelWrappers.push(i),e._.setAriaControls(r.getButtonElement(),s)}},o.prototype.refresh=function(){this.toolPanelWrappers.forEach((function(t){return t.refresh()}))},o.prototype.openToolPanel=function(t,e){void 0===e&&(e="api");var o=this.openedItem();o!==t&&(this.toolPanelWrappers.forEach((function(e){var o=t===e.getToolPanelId();e.setDisplayed(o)})),o!==this.openedItem()&&(this.sideBarButtonsComp.setActiveButton(t),this.raiseToolPanelVisibleEvent(t,null!=o?o:void 0,e)))},o.prototype.getToolPanelInstance=function(t){var e=this.toolPanelWrappers.filter((function(e){return e.getToolPanelId()===t}))[0];if(e)return e.getToolPanelInstance();console.warn("AG Grid: unable to lookup Tool Panel as invalid key supplied: ".concat(t))},o.prototype.raiseToolPanelVisibleEvent=function(t,o,n){var r=!!t&&!!o;if(o){var i={type:e.Events.EVENT_TOOL_PANEL_VISIBLE_CHANGED,source:n,key:o,visible:!1,switchingToolPanel:r};this.eventService.dispatchEvent(i)}if(t){var s={type:e.Events.EVENT_TOOL_PANEL_VISIBLE_CHANGED,source:n,key:t,visible:!0,switchingToolPanel:r};this.eventService.dispatchEvent(s)}},o.prototype.close=function(t){void 0===t&&(t="api"),this.openToolPanel(void 0,t)},o.prototype.isToolPanelShowing=function(){return!!this.openedItem()},o.prototype.openedItem=function(){var t=null;return this.toolPanelWrappers.forEach((function(e){e.isDisplayed()&&(t=e.getToolPanelId())})),t},o.prototype.destroyToolPanelWrappers=function(){var t=this;this.toolPanelWrappers.forEach((function(o){e._.removeFromParent(o.getGui()),t.destroyBean(o)})),this.toolPanelWrappers.length=0},o.prototype.destroy=function(){this.destroyToolPanelWrappers(),t.prototype.destroy.call(this)},o.TEMPLATE='<div class="ag-side-bar ag-unselectable">\n <ag-side-bar-buttons ref="sideBarButtons"></ag-side-bar-buttons>\n </div>',g([e.Autowired("focusService")],o.prototype,"focusService",void 0),g([e.Autowired("filterManager")],o.prototype,"filterManager",void 0),g([e.Autowired("sideBarService")],o.prototype,"sideBarService",void 0),g([e.RefSelector("sideBarButtons")],o.prototype,"sideBarButtonsComp",void 0),g([e.PostConstruct],o.prototype,"postConstruct",null),o}(e.Component),E=function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),m=function(t,e,o,n){var r,i=arguments.length,s=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(i<3?r(s):i>3?r(e,o,s):r(e,o))||s);return i>3&&s&&Object.defineProperty(e,o,s),s},C=function(t){function o(){var e=null!==t&&t.apply(this,arguments)||this;return e.isColGroupDef=function(t){return t&&void 0!==t.children},e.getId=function(t){return e.isColGroupDef(t)?t.groupId:t.colId},e}return E(o,t),o.prototype.createColumnTree=function(t){var o=this,n=[],r=function(t,i){if(o.isColGroupDef(t)){var s=t,a=void 0!==s.groupId?s.groupId:s.headerName,l=new e.ProvidedColumnGroup(s,a,!1,i),c=[];return s.children.forEach((function(t){var e=r(t,i+1);e&&c.push(e)})),l.setChildren(c),l}var u=t,p=u.colId?u.colId:u.field,d=o.columnModel.getPrimaryColumn(p);return d||n.push(u),d},i=[];return t.forEach((function(t){var e=r(t,0);e&&i.push(e)})),n.length>0&&console.warn("AG Grid: unable to find grid columns for the supplied colDef(s):",n),i},o.prototype.syncLayoutWithGrid=function(t){var e=this.getLeafPathTrees();t(this.mergeLeafPathTrees(e))},o.prototype.getLeafPathTrees=function(){var t=function(o,n){var r;if(o instanceof e.ProvidedColumnGroup)if(o.isPadding())r=n;else{var i=Object.assign({},o.getColGroupDef());i.groupId=o.getGroupId(),i.children=[n],r=i}else{var s=Object.assign({},o.getColDef());s.colId=o.getColId(),r=s}var a=o.getOriginalParent();return a?t(a,r):r};return this.columnModel.getAllGridColumns().filter((function(t){var e=t.getColDef();return t.isPrimary()&&!e.showRowGroup})).map((function(e){return t(e,e.getColDef())}))},o.prototype.mergeLeafPathTrees=function(t){for(var e,o,n=this,r=function(t,e){if(!n.isColGroupDef(e))return t;var o=t,i=e;if(i.children&&i.groupId&&n.addChildrenToGroup(o,i.groupId,i.children[0]))return o;return i.children.forEach((function(t){return r(o,t)})),o},i=[],s=1;s<=t.length;s++){var a=t[s-1],l=t[s];e=a,o=l,n.isColGroupDef(e)&&n.isColGroupDef(o)&&n.getId(e)===n.getId(o)?t[s]=r(a,l):i.push(a)}return i},o.prototype.addChildrenToGroup=function(t,o,n){var r=this;if(!this.isColGroupDef(t))return!0;var i=t,s=n;if(function(t,o){var n=t.children.map(r.getId),i=e._.includes(n,r.getId(o)),s=e._.last(t.children),a=s&&r.getId(s)!==r.getId(o);return i&&a}(i,s))return i.children.push(s),!0;if(i.groupId===o){var a=i.children.map(this.getId);if(!e._.includes(a,this.getId(s)))return i.children.push(s),!0}return i.children.forEach((function(t){return r.addChildrenToGroup(t,o,n)})),!1},m([e.Autowired("columnModel")],o.prototype,"columnModel",void 0),o=m([e.Bean("toolPanelColDefService")],o)}(e.BeanStub),_=function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),b=function(t,e,o,n){var r,i=arguments.length,s=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(i<3?r(s):i>3?r(e,o,s):r(e,o))||s);return i>3&&s&&Object.defineProperty(e,o,s),s},B=function(t){function o(){return null!==t&&t.apply(this,arguments)||this}return _(o,t),o.prototype.registerSideBarComp=function(t){this.sideBarComp=t},o.prototype.getSideBarComp=function(){return this.sideBarComp},o=b([e.Bean("sideBarService")],o)}(e.BeanStub),D={version:"31.0.0",moduleName:e.ModuleNames.SideBarModule,beans:[C,B],agStackComponents:[{componentName:"AgHorizontalResize",componentClass:i},{componentName:"AgSideBar",componentClass:T},{componentName:"AgSideBarButtons",componentClass:p}],dependantModules:[o.EnterpriseCoreModule]};exports.SideBarModule=D,exports.ToolPanelColDefService=C;
{
"name": "@ag-grid-enterprise/side-bar",
"version": "30.2.1",
"version": "31.0.0",
"description": "Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue",

@@ -9,3 +9,3 @@ "main": "./dist/esm/es6/main.mjs",

"scripts": {
"clean": "rimraf dist .hash",
"clean": "rimraf dist",
"build-cjs": "rimraf dist/tsconfig.cjs.es5.docs.tsbuildinfo && npx tsc -p tsconfig.cjs.es5.json && npx tsc -p tsconfig.cjs.es6.json",

@@ -50,7 +50,7 @@ "build-esm": "npx tsc -p tsconfig.esm.es5.json && npx tsc -p tsconfig.esm.es6.json",

"dependencies": {
"@ag-grid-community/core": "~30.2.1",
"@ag-grid-enterprise/core": "~30.2.1"
"@ag-grid-community/core": "~31.0.0",
"@ag-grid-enterprise/core": "~31.0.0"
},
"devDependencies": {
"typescript": "~4.3.5",
"typescript": "~4.7.4",
"rimraf": "3.0.2",

@@ -57,0 +57,0 @@ "gulp": "^4.0.2",

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 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