'use strict'; /** * Licensed Materials - Property of IBM * IBM Cognos Products: BI Cloud (C) Copyright IBM Corp. 2018, 2019 * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. * * VisFPDExecution * The VisFPDExecution object manages a set of queries that are needed to provide the data for a predict visualization. */ define(['./VisQueryExecution', '../../../widgets/livewidget/nls/StringResources'], function (VisQueryExecution, StringResources) { 'use strict'; var VisFPDExecution = VisQueryExecution.extend({ init: function init(options) { VisFPDExecution.inherited('init', this, arguments); this._keyDriverManager = options.keyDriverManager; }, /** * Ensure that the slots are up-to-date and prepare the data (if necessary). * @param localFiltersOnly (optional) if set, only local filters will be passed to the queryDefinition. If not set, both local and cross-widget filters are passed. * @returns a promise. */ execute: function execute(queryContext) { var promptControlFunctions = void 0; if (queryContext && queryContext.promptControlFunctions) { promptControlFunctions = queryContext.promptControlFunctions; } else { var sourceId = this.ownerWidget.content.getFeature('Visualization').getDataSource().getId(); promptControlFunctions = { 'preparePromptSpec': this.preparePromptSpec.bind(this), 'whenSingleItemQueryReady': this._commonQueryHelper.whenSingleItemQueryReady.bind(this._commonQueryHelper, sourceId), 'whenColumnsMinMaxQueryReady': this._commonQueryHelper.whenColumnsMinMaxQueryReady.bind(this._commonQueryHelper, sourceId), 'getPromptSpec': this.getPromptSpec.bind(this), 'savePromptSpec': this.savePromptSpec.bind(this), 'updatePromptSpecCache': this.updatePromptSpecCache.bind(this), 'onCancelPromptDialog': this.onCancelPromptDialog.bind(this), 'onUnSupportedPromptType': this.ownerWidget.onUnSupportedPrompt.bind(this, StringResources.get('unSupportedPromptType')) }; } return this._keyDriverManager.executeFastPatternDetectionRequest(queryContext.targetId, queryContext.possibleKeyDrivers, queryContext.methods, promptControlFunctions, this.ownerWidget.isPreview); } }); return VisFPDExecution; }); //# sourceMappingURL=VisFPDExecution.js.map