"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, 2020 * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. */ /** * @class DashboardStateAPI * @hideconstructor * @classdesc API class that is used to control a dashboard state */ define([], function () { var DashboardStateAPI = function () { function DashboardStateAPI() { _classCallCheck(this, DashboardStateAPI); } /** * @function DashboardStateAPI#onUiStateChange * @description register a callback which will be called when the ui state is changed * The UI State object is the payload passed to the callback. * The structure of the object is: * { * authoring: boolean, * eventGroups: boolean * } * @param {function} callback The callback to register */ DashboardStateAPI.prototype.onUiStateChange = function onUiStateChange() {}; /** * @function DashboardStateAPI#offUiStateChange * @description de-register the callback that was registered with onUiStateChange */ DashboardStateAPI.prototype.offUiStateChange = function offUiStateChange() {}; /** * @function DashboardStateAPI#getUiState * @description get the full UI state object with all its properties * @returns {Object} the DashboardState's ui state object */ DashboardStateAPI.prototype.getUiState = function getUiState() {}; /** * @function DashboardStateAPI#setDirty * @description set a dashboard to dirty or not dirty. * @param {boolean} dirty true means a dashboard will be set to dirty. Otherwise, false */ DashboardStateAPI.prototype.setDirty = function setDirty() {}; /** * @function DashboardStateAPI#setAuthoring * @desc enable or disable the dashboard authoring state * @param {Boolean} flag The boolean value to set the authoring state to */ DashboardStateAPI.prototype.setAuthoring = function setAuthoring() {}; /** * @function DashboardStateAPI#setSelectionProperties * @desc enable or disable the dashboard properties state * @param {Boolean} flag the boolean value to set the properties state to */ DashboardStateAPI.prototype.setSelectionProperties = function setSelectionProperties() {}; /** * @function DashboardStateAPI#setSidePanelOpen * @desc enable or disable the dashboard in app slideout state * @param {Boolean} state - the boolean value to set the in app slideout state to */ DashboardStateAPI.prototype.setSidePanelOpen = function setSidePanelOpen() {}; /** * @function DashboardStateAPI#setSidePanelCurrentView * @desc set the current in app slideout view * @param {String | null} view - the current view to set; When passing null as current view, the current view is cleared */ DashboardStateAPI.prototype.setSidePanelCurrentView = function setSidePanelCurrentView() {}; /** * @function DashboardStateAPI#setEventGroups * @desc enable or disable the dashboard event groups state * @param {Boolean} flag The boolean value to set the event groups state to */ DashboardStateAPI.prototype.setEventGroups = function setEventGroups() {}; /** * @function DashboardStateAPI#setFullScreen * @desc enable or disable full screen * @param {Boolean} flag The boolean value to set the full screen */ DashboardStateAPI.prototype.setFullScreen = function setFullScreen() {}; /** * @function DashboardStateAPI#setActivive * @description set a dashboard activity and call corresponding callbacks. * A payload passed to a callback is in this struture: * { * name: "change:active", * info: { * actionName: 'setActive', * value: boolean * } * } * @param {Boolean} isActive set the activity of a dashboard to isActive */ DashboardStateAPI.prototype.setActive = function setActive() {}; /** * @function DashboardAPI#isActive * @description get a dashboard activity * @param * @returns {Boolean} true if a dashboard is active and false otherwise */ DashboardStateAPI.prototype.isActive = function isActive() {}; /** * @function DashboardStateAPI#onChangeActive * @description register a callback which will be called when a dashboard is * changed to active or deactive * @param {function} callback the callback will be called */ DashboardStateAPI.prototype.onChangeActive = function onChangeActive() {}; /** * @function DashboardStateAPI#updateUiState * @description update some dashboard UI state * @param {object} options.stateChange Its keys are state names and its values are new state values */ DashboardStateAPI.prototype.updateUiState = function updateUiState() {}; return DashboardStateAPI; }(); return DashboardStateAPI; }); //# sourceMappingURL=DashboardStateAPI.js.map