"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 CanvasAPI * @hideconstructor * @classdesc API class that is used to control a dashboard canvas behaviour. */ define([], function () { var CanvasAPI = function () { function CanvasAPI() { _classCallCheck(this, CanvasAPI); } /** * @function CanvasAPI#getLayout * @description Get the layout API * @return {@link LayoutAPI Layout API} * * @deprecated use {@link CanvasAPI#getContent} instead */ CanvasAPI.prototype.getLayout = function getLayout() {}; /** * @function CanvasAPI#addWidget * @description Add a widget to canvas * @param {object} options content that describes the widget to add * @param {object} options.model model json for object being added * @param {string} [options.parentId] location identifier in layout associated with object being added * @param {object[]} [options.layoutProperties] layout properties * * @deprecated use {@link CanvasAPI#addContent} instead */ CanvasAPI.prototype.addWidget = function addWidget() {}; /** * @function CanvasAPI#replaceWidget * @description Replaces a existing widget on the canvas * @param {string} widgetId unique identifier of the widget to be replaced * @param {object} options * @param {object} options.model JSON model of the widget being added * @param {string} [options.parentId] location identifier in layout associated with object being added * @param {object[]} [options.layoutProperties] layout properties * @param sender - sender identifier, optional * @return {string} - new widget id * * @deprecated use {@link CanvasAPI#addContent} instead */ CanvasAPI.prototype.replaceWidget = function replaceWidget() {}; /** * @function CanvasAPI#removeWidget * @description Removes a widget from the canvas * @param {string} unique identifier of widget to be removed * @param {string} [sender] sender identifier * * @deprecated use {@link CanvasAPI#removeContent} instead */ CanvasAPI.prototype.removeWidget = function removeWidget() {}; /** * @function CanvasAPI#getWidgetWhenReady * @description Wait for the widget with the given id is loaded and rendered.
* If the widget is already loaded, an alternative synchronous way to get a widget is {@link CanvasAPI#getWidget getWidget} * @param {String} id unique widget identifier * @return {Promise} * * @deprecated use {@link CanvasAPI#getContent} instead */ CanvasAPI.prototype.getWidgetWhenReady = function getWidgetWhenReady() {}; /** * @function CanvasAPI#getWidgetsWhenRenderComplete * @description Wait for the given widgets to be rendered
* Replaces {@link DashboardAPI#waitTillWidgetsRendered DashboardAPI.waitTillWidgetsRendered} * * @deprecated use {@link CanvasAPI#getContent} instead */ CanvasAPI.prototype.getWidgetsWhenRendered = function getWidgetsWhenRendered() {}; /** * @function CanvasAPI#selectWidget * @description Select a widget * @param {string} widgetId unique widget identifier * @param {object} options selection options * @param {boolean} [options.isTouch] Indicate if it is a touch gesture so that we can render touch friendly handles * @return {Promise} * * @deprecated use {@link CanvasAPI#selectContent} instead */ CanvasAPI.prototype.selectWidget = function selectWidget() {}; /** * @function CanvasAPI#selectWidgets * @description Select multiple widgets * @param {string[]} widgetId array of unique widget identifiers * @param {object} options selection options * @param {boolean} [options.isTouch] Indicate if it is a touch gesture so that we can render touch friendly handles * @return {Promise} * * @deprecated use {@link CanvasAPI#selectContent} instead */ CanvasAPI.prototype.selectWidgets = function selectWidgets() {}; /** * @function CanvasAPI#getSelectedWidgets * @description Get an array of currently selected widget APIs * @return {Promise} * * @deprecated use {@link CanvasAPI#getSelectedContentList} instead */ CanvasAPI.prototype.getSelectedWidgets = function getSelectedWidgets() {}; /** * @function CanvasAPI#deselectAllWidgets * @description Deselect all widgets that are currently selected * * @deprecated use {@link CanvasAPI#deselectContent} instead */ CanvasAPI.prototype.deselectAllWidgets = function deselectAllWidgets() {}; /** * @function CanvasAPI#getWidget * @description Return a widget Api object. If the widget hasn't loaded yet, this will return null * An alternative way to get a widget that is not loaded yet is {@link CanvasAPI#getWidgetWhenReady getWidgetWhenReady} * @param {string} id unique widget identifier * @return {WidgetAPI} Widget Api object * * @deprecated use {@link CanvasAPI#getContent} instead */ CanvasAPI.prototype.getWidget = function getWidget() {}; /** * @function CanvasAPI#getWidgets * @description Get an array of all loaded widget APIs * @return {WidgetAPI[]} - Array of widget API objects * * @deprecated use {@link CanvasAPI#findContent} instead */ CanvasAPI.prototype.getWidgets = function getWidgets() {}; /** * @function CanvasAPI#hasMaximizedWidget * @description Indicate whether the canvas contains a maximized widget * @return {boolean} true if the canvas contains a maximized widget, otherwise false * * @deprecated */ CanvasAPI.prototype.hasMaximizedWidget = function hasMaximizedWidget() {}; /** * @function CanvasAPI#getFeature * @deprecated Replaced by {@link DashboardAPI#getFeature DashboardAPI.getFeature} */ CanvasAPI.prototype.getFeature = function getFeature() {}; /** * @deprecated */ CanvasAPI.prototype.registerFeature = function registerFeature() {}; /** * @deprecated * @function CanvasAPI#addFragment * @description Add a fragment containing widgets and layout spec * @param {object} fragment containing widgets and layout spec * * @deprecated Use {@link CanvasAPI#addContent} */ CanvasAPI.prototype.addFragment = function addFragment() {}; /** * @deprecated Use Filters feature */ CanvasAPI.prototype.getFilters = function getFilters() {}; return CanvasAPI; }(); return CanvasAPI; }); //# sourceMappingURL=CanvasAPI.js.map