'use strict'; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } /** * Licensed Materials - Property of IBM * IBM Cognos Products: Dashboard * (C) Copyright IBM Corp. 2019 * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. */ define([], function () { 'use strict'; var ExtensionBaseController = function () { function ExtensionBaseController(dashboard, appSettings, eventRouter) { _classCallCheck(this, ExtensionBaseController); this.dashboard = dashboard; this.appSettings = appSettings; this.eventRouter = eventRouter; } /** * Return last selected widget */ ExtensionBaseController.prototype._getSelectedContent = function _getSelectedContent() { var contents = this.dashboard.getCanvas().getSelectedContentList(); // Use the last widget. return contents && contents.length > 0 ? contents[contents.length - 1] : null; }; /** * Gets a tab contribution based on causal event and current active tab * in the data grid * * @param {object} event - Event payload * @param {string} eventName - Event name * @param {string} currentTabId - Current tab identifier * */ ExtensionBaseController.prototype.getTabContrib = function getTabContrib() /* event, eventName, currentTabId */{ return Promise.resolve(); }; /** * Selects the current extension as active * * @param {object} context - context for which the current extension should render. * @param {string} currentTabId - current active tab identifier * @param {HTMLElement} container container the extension should render its view */ ExtensionBaseController.prototype.select = function select() /* context, currentTabId, container */{ return Promise.resolve(); }; return ExtensionBaseController; }(); return ExtensionBaseController; }); //# sourceMappingURL=ExtensionBaseController.js.map