123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222 |
- "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. 2018, 2019
- * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- */
- /**
- * @class WidgetAPI
- * @hideconstructor
- * @classdesc API class that is used to control a widget behaviour.
- */
- define([], function () {
- var WidgetAPI = function () {
- function WidgetAPI() {
- _classCallCheck(this, WidgetAPI);
- }
- /**
- * @function WidgetAPI#getId
- * @description Get the internal ID of the widget
- * @return {String} Internal ID of the widget
- */
- WidgetAPI.prototype.getId = function getId() {};
- /**
- * @function WidgetAPI#getEventGroupId
- * @description Get the ID for the event group this widget is a part of
- * @return {String} Group ID this widget belongs to. Undefined if the widget is not part of a group
- */
- WidgetAPI.prototype.getEventGroupId = function getEventGroupId() {};
- /**
- * @function WidgetAPI#getScope
- * @description Get the container page ID for which the widget belongs to
- * @return {String} ccontainer page ID for which the widget belongs to
- */
- WidgetAPI.prototype.getScope = function getScope() {};
- /**
- * @function WidgetAPI#getLayoutAPI
- * @deprecated APIs should not know about their parent
- */
- WidgetAPI.prototype.getLayoutAPI = function getLayoutAPI() {};
- /**
- * @function WidgetAPI#getType
- * @description Get the type of the widget
- * @return {String} The type of the widget
- */
- WidgetAPI.prototype.getType = function getType() {};
- /**
- * @deprecated
- * @function WidgetAPI#getProperties
- * @description Get all the properties for the widget
- * @returns {PropertiesAPI}
- */
- WidgetAPI.prototype.getProperties = function getProperties() {};
- /**
- * @deprecated
- * @function WidgetAPI#getProperty
- * @param {String} propertyName name of the property
- * @descrpition Get the property for the widget
- * @return {Object} property object
- */
- WidgetAPI.prototype.getProperty = function getProperty() /* propertyName */{};
- /**
- * @function WidgetAPI#getPropertyLayoutList
- * @descrpition Returns a list of layout list
- * @return {Object[]} Array of layout list
- */
- WidgetAPI.prototype.getPropertyLayoutList = function getPropertyLayoutList() {};
- /**
- * @function WidgetAPI#getPropertyList
- * @descrpition Returns a list of properties list
- * @return {Object[]} Array of properties
- */
- WidgetAPI.prototype.getPropertyList = function getPropertyList() {};
- /**
- * @function WidgetAPI#getFeature
- * @description Get a widget level feature. Features are extensions to the widget
- * @param {String} featureId - The ID of the feature to get
- * @return {Promise} Promise resolved with the feature or with undefined if feature does not exist
- */
- WidgetAPI.prototype.getFeature = function getFeature() {};
- /**
- * @function WidgetAPI#getContextToolbarItems
- * @description Get the toolbar actions for the widget
- * @return {WidgetAction[]} An array of {@link WidgetAction} objects
- */
- WidgetAPI.prototype.getContextToolbarItems = function getContextToolbarItems() {};
- /**
- * @function WidgetAPI#getError
- * @deprecated use {@link WidgetAPI#getErrorDetails}
- */
- WidgetAPI.prototype.getError = function getError() {};
- /**
- * @function WidgetAPI#getErrorDetails
- * @description Get error information for the widget
- * @return {WidgetErrorDetails} Returns the error details for the widget. Returns null if the widget isn't in an error state
- */
- WidgetAPI.prototype.getErrorDetails = function getErrorDetails() {};
- /**
- * @function WidgetAPI#hasError
- * @description Used to check if the widget is currently in an error state
- * @return {Boolean} - Returns true if the widget is currently in an error state
- */
- WidgetAPI.prototype.hasError = function hasError() {};
- /**
- * @function WidgetAPI#hasWarning
- * @description Used to check if the widget is currently in an warning state
- * @return {Boolean} - Returns true if the widget is currently in an warning state
- */
- WidgetAPI.prototype.hasWarning = function hasWarning() {};
- /**
- * @function WidgetAPI#clearError
- * @deprecated Clearing of the error should be handled by a render call and the render sequence
- */
- WidgetAPI.prototype.clearError = function clearError() {};
- /**
- * @function WidgetAPI#on
- * @description Register an event handler for the widget
- * @param {String} eventName Name of the event
- * @param {function} handler Event handler to be called when the event occurrs.
- * @param {object} context Context of the event
- * Multiple handlers can be registered with the same <strong>eventName</strong>.
- * Each handlers needs to be registered and unregistered individually.
- */
- WidgetAPI.prototype.on = function on() {};
- /**
- * @function WidgetAPI#off
- * @description Unregister an event handler that was registered with {@link WidgetAPI#on}
- * @param {String} eventName Name of the dashboard event
- * @param {function} handler Event handler to be called when the event occurrs
- * @param {object} context Context of the event
- */
- WidgetAPI.prototype.off = function off() {};
- /**
- * @function WidgetAPI#isWidgetMaximized
- * @description Used to know if the widget is in maximized mode
- * @return {Boolean} true if the widget is currently maximize
- */
- WidgetAPI.prototype.isWidgetMaximized = function isWidgetMaximized() {};
- /**
- * @function WidgetAPI#isContextualGridEnabled
- * @description Check if contextual grid is supported for this widget
- * @return {Promise<Boolean>} promise resolves with true if enabled
- */
- WidgetAPI.prototype.isContextualGridEnabled = function isContextualGridEnabled() {};
- /**
- * @function WidgetAPI#setFeatureEnabled
- * @description Allows for a widget level feature to be enabled or disabled at runtime
- * @param {String} featureId - The ID of the feature to update
- * @param {Boolean} isEnabled - Is the feature enabled or not
- */
- WidgetAPI.prototype.setFeatureEnabled = function setFeatureEnabled() {};
- return WidgetAPI;
- }();
- return WidgetAPI;
- });
- //# sourceMappingURL=WidgetAPI.js.map
|