'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. */ /** * @interface StateAPI * @hideconstructor * @classdesc API class that is used to control a state. * @example content.getFeature('state') */ define([], function () { var StateAPI = function () { function StateAPI() { _classCallCheck(this, StateAPI); } /** * @function StateAPI#getStatus * @description Returns the status of the state. * @return {StateAPI#STATUS} */ StateAPI.prototype.getStatus = function getStatus() {}; /** * @async * @function StateAPI#whenStatusChanges * @description Resolves when the status changes to an expected status. * @param {StateAPI#STATUS} status * @returns {Promise} */ StateAPI.prototype.whenStatusChanges = function whenStatusChanges() {}; /** * @function StateAPI#getError * @description Returns the error associated with the state. * @return {Error} Type of the canvas content */ StateAPI.prototype.getError = function getError() {}; /** * @function StateAPI#onChangeError * @description Registers the callback method to call when setError is called. */ StateAPI.prototype.onChangeError = function onChangeError() {}; return StateAPI; }(); /** * @readonly * @description Enumeration of status. * @static * @enum {String} * @memberof StateAPI */ StateAPI.STATUS = { /** Created, means the content is created but before loading widget */ CREATED: 'created', /** Initialized */ INITIALIZED: 'init', /** Rendering */ RENDERING: 'rendering', /** Rendered */ RENDERED: 'rendered' }; return StateAPI; }); //# sourceMappingURL=StateAPI.js.map