'use strict'; /* *+------------------------------------------------------------------------+ *| Licensed Materials - Property of IBM *| IBM Cognos Products: Dashboard *| (C) Copyright IBM Corp. 2018 *| *| US Government Users Restricted Rights - Use, duplication or disclosure *| restricted by GSA ADP Schedule Contract with IBM Corp. *+------------------------------------------------------------------------+ */ define(['./BaseTask'], function (BaseTask) { 'use strict'; var VisSpecTask = BaseTask.extend({ /** * Load the visSpec (or {}) and store in the visSpec member of the renderContext. * For Rave visualizations, this is the RAVE spec (or template prior to substituting data and overrides). * @param renderContext - information collected by a particular call to render or reRender (such as the view, control, data etc). * @returns a promise */ process: function process(renderContext) { if (this._isStepComplete(renderContext, 'visSpec')) { return Promise.resolve(renderContext); } return this.getRenderState().getCurrentContextData('visView').whenVisSpecReady().then(function (visSpec) { this._completeStep(renderContext, 'visSpec', visSpec); return renderContext; }.bind(this)).catch(function (error) { this.showError('dwErrorRenderingVisualization'); throw error; }.bind(this)); } }); return VisSpecTask; }); //# sourceMappingURL=VisSpecTask.js.map