UNPKG

@adaptabletools/adaptable-cjs

Version:

Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements

31 lines (30 loc) 1.57 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SettingsPanelModule = void 0; const tslib_1 = require("tslib"); const ModuleConstants = tslib_1.__importStar(require("../Utilities/Constants/ModuleConstants")); const AdaptableModuleBase_1 = require("./AdaptableModuleBase"); const PopupRedux = tslib_1.__importStar(require("../Redux/ActionsReducers/PopupRedux")); class SettingsPanelModule extends AdaptableModuleBase_1.AdaptableModuleBase { constructor(api) { const friendlyName = api.optionsApi.getSettingsPanelOptions().title; super(ModuleConstants.SettingsPanelModuleId, friendlyName, 'settings', null, 'Manage all Adaptable Settings', api); } createColumnMenuItems(column) { return [ // To do : get the icon and name from settings in case they have changed? this.createMenuItemReduxAction('settings-panel-open', 'Open ' + this.moduleInfo.FriendlyName, this.moduleInfo.Glyph, PopupRedux.PopupShowScreen()), ]; } createContextMenuItems(menuContext) { return [ this.createMenuItemReduxAction('settings-panel-open', 'Open ' + this.moduleInfo.FriendlyName, this.moduleInfo.Glyph, PopupRedux.PopupShowScreen()), ]; } createModuleMenuItem(source) { if (this.isModuleAvailable()) { return this.createMenuItemReduxAction('settings-panel-open', 'Open ' + this.moduleInfo.FriendlyName, this.moduleInfo.Glyph, PopupRedux.PopupShowScreen()); } } } exports.SettingsPanelModule = SettingsPanelModule;