UNPKG

@adaptabletools/adaptable-cjs

Version:

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

28 lines (27 loc) 1.06 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SettingsPanelApiImpl = void 0; const tslib_1 = require("tslib"); const ApiBase_1 = require("./ApiBase"); const PopupRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/PopupRedux")); class SettingsPanelApiImpl extends ApiBase_1.ApiBase { openSettingsPanel(moduleName) { if (!moduleName) { this.dispatchAction(PopupRedux.PopupShowScreen()); } const moduleInfo = this.getAdaptableInternalApi() .getModuleService() .getModuleInfoByModule(moduleName); if (!moduleInfo) { this.logWarn(`${moduleName} module does not exist`); } this.dispatchAction(PopupRedux.PopupShowScreen(moduleName, moduleInfo?.Popup)); } openCustomSettingsPanel(name) { this.dispatchAction(PopupRedux.PopupShowScreen(null, name)); } closeSettingsPanel() { this.dispatchAction(PopupRedux.PopupHideScreen()); } } exports.SettingsPanelApiImpl = SettingsPanelApiImpl;