'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 Business Analytics (C) Copyright IBM Corp. 2019 * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. */ define(['react', '../../../../../lib/@waca/dashboard-common/dist/core/APIFactory', '../ToolbarSectionDOMAPI', '../ToolbarSectionComponent', '../../ToolbarDockAPI'], function (React, APIFactory, ToolbarSectionDOMAPI, ToolbarSectionComponent, ToolbarDockAPI) { var OnDemandToolbarSectionDOM = function () { function OnDemandToolbarSectionDOM(_ref) { var features = _ref.features; _classCallCheck(this, OnDemandToolbarSectionDOM); this._toolbarDockDOM = features['ToolbarDockDOM']; this._toolbarDock = features['ToolbarDock']; } OnDemandToolbarSectionDOM.prototype.initialize = function initialize() { if (this._toolbarDockDOM) { this._api = APIFactory.createAPI(this, [ToolbarSectionDOMAPI]); this._toolbarDockDOM.addProvider(OnDemandToolbarSectionDOM.PROVIDER_ID, this); } else { this._api = undefined; } }; OnDemandToolbarSectionDOM.prototype.getAPI = function getAPI() { return this._api; }; OnDemandToolbarSectionDOM.prototype.destroy = function destroy() { delete this._api; delete this._node; }; /** API implementations */ OnDemandToolbarSectionDOM.prototype.setNode = function setNode(node) { this._node = node; }; OnDemandToolbarSectionDOM.prototype.getNode = function getNode() { return this._node; }; OnDemandToolbarSectionDOM.prototype.getReactElement = function getReactElement() { return React.createElement(ToolbarSectionComponent, { className: OnDemandToolbarSectionDOM.PROVIDER_ID, stateProvider: this._toolbarDock, stateEvent: ToolbarDockAPI.UPDATE_DOCKED_TOOLBAR_STATE, focusEvent: ToolbarDockAPI.FOCUS_DOCKED_TOOLBAR, toolbarSectionDOM: this }); }; OnDemandToolbarSectionDOM.prototype.getIndex = function getIndex() { return OnDemandToolbarSectionDOM.PROVIDER_INDEX; }; return OnDemandToolbarSectionDOM; }(); OnDemandToolbarSectionDOM.PROVIDER_ID = 'OnDemandToolbarSection'; OnDemandToolbarSectionDOM.PROVIDER_INDEX = 0; return OnDemandToolbarSectionDOM; }); //# sourceMappingURL=OnDemandToolbarSectionDOM.js.map