JumpToTarget.js 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597
  1. 'use strict';
  2. var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
  3. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  4. function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  5. function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
  6. /**
  7. * Licensed Materials - Property of IBM
  8. * IBM Cognos Products: Dashboard
  9. * (C) Copyright IBM Corp. 2018, 2020
  10. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  11. */
  12. define(['underscore', '../../util/AjaxHelper', '../../lib/@waca/dashboard-common/dist/utils/ContentUtil', '../../cmHelper/CMHelper', '../../widgets/livewidget/nls/StringResources', '../../features/content/common/DataPointActionBase'], function (_, AjaxHelper, ContentUtil, CMHelper, StringResources, DataPointActionBase) {
  13. /**
  14. *
  15. * Handle 'Jump to' target, i.e, open target perspective
  16. **/
  17. var JumpToTarget = function (_DataPointActionBase) {
  18. _inherits(JumpToTarget, _DataPointActionBase);
  19. function JumpToTarget(options) {
  20. _classCallCheck(this, JumpToTarget);
  21. var _this = _possibleConstructorReturn(this, _DataPointActionBase.call(this, options));
  22. _this.drillDefinitionEntry = options.drillDefinitionEntry;
  23. _this.selections = options.selections; //undefined at selected widget level, has valid data for selected data point
  24. _this.rangeValueTypes = {
  25. boundRange: 'boundRange',
  26. unboundedRange: 'unboundedRange',
  27. unboundedStartRange: 'unboundedStartRange',
  28. unboundedEndRange: 'unboundedEndRange'
  29. };
  30. _this.negativeFilterOps = ['notin', 'notbetween'];
  31. _this.rangeFilterOps = ['gt', 'gte', 'lt', 'lte', 'between'];
  32. return _this;
  33. }
  34. JumpToTarget.prototype.getId = function getId() {
  35. return this.drillDefinitionEntry.getId();
  36. };
  37. JumpToTarget.prototype.getName = function getName() {
  38. return this.drillDefinitionEntry.getName();
  39. };
  40. JumpToTarget.prototype.jumpTo = function jumpTo() {
  41. var _this2 = this;
  42. return this._buildDrillTargetSpec().then(function (spec) {
  43. spec = spec || {};
  44. spec.content = spec.content || {};
  45. spec.content.cmProperties = spec.content.cmProperties || {};
  46. var unsaveMessage = StringResources.get('drillthrough_unsaveMsg', { name: decodeURIComponent(spec.content.pathRef) });
  47. var openPerspective = void 0,
  48. closePerspective = void 0;
  49. openPerspective = closePerspective = _this2.drillDefinitionEntry.getPerspective();
  50. if (openPerspective === 'authoring') {
  51. // CADBLW-5575 - For reporting, we must not set the perspective in the
  52. // openApplication call because it prevents it from switching to ClassicViewer
  53. // in the case that the target report has interactivity turned off.
  54. openPerspective = undefined;
  55. }
  56. return _this2.dashboard.closeApplication(closePerspective, spec.content.cmProperties.id, { unsaveMessage: unsaveMessage }).then(_this2.dashboard.openApplication.bind(_this2.dashboard, openPerspective, spec));
  57. }).catch(function (error) {
  58. var jqXHR = error.jqXHR || error || {};
  59. if (error.code === 404) {
  60. jqXHR.responseText = StringResources.get('drillthrough_jumpToTarget_notFound', { name: _this2.drillDefinitionEntry.getName() });
  61. } else {
  62. jqXHR.responseText = jqXHR.responseText ? jqXHR.responseText : jqXHR.statusText;
  63. }
  64. if (jqXHR.responseText) {
  65. AjaxHelper.showAjaxServiceErrorMessage(_this2.dashboard, jqXHR);
  66. //Eat the rejection and return as success
  67. return Promise.resolve();
  68. }
  69. // Unexpected case
  70. return _this2.dashboard.getGlassSvc('.Content').then(function (contentService) {
  71. return CMHelper.getReportName(contentService, _this2.drillDefinitionEntry.getAssetId()).then(function (targetName) {
  72. jqXHR.responseText = StringResources.get('errorDrillToTarget', { targetName: targetName });
  73. AjaxHelper.showAjaxServiceErrorMessage(_this2.dashboard, jqXHR);
  74. return Promise.resolve();
  75. });
  76. });
  77. });
  78. };
  79. JumpToTarget.prototype._buildDrillTargetSpec = function _buildDrillTargetSpec() {
  80. var _this3 = this;
  81. var options = {};
  82. this.dashboard.prepareGlassOptions(options);
  83. var currentAssetId = this.drillDefinitionEntry.getAssetId();
  84. var currentSearchPath = this.drillDefinitionEntry.getAssetSearchPath();
  85. return CMHelper.getPathRefInfo(options, {
  86. storeId: currentAssetId,
  87. searchPath: currentSearchPath,
  88. fields: ['searchPath']
  89. }).then(function (pathRefInfo) {
  90. if (!pathRefInfo) {
  91. return {};
  92. }
  93. var newAssetId = pathRefInfo.objRef;
  94. if (!_.isEmpty(newAssetId) && newAssetId !== currentAssetId) {
  95. _this3.drillDefinitionEntry.setAssetId(newAssetId);
  96. }
  97. var newAssetSearchPath = pathRefInfo.searchPath;
  98. if (!_.isEmpty(newAssetSearchPath) && newAssetSearchPath !== currentSearchPath) {
  99. _this3.drillDefinitionEntry.setAssetSearchPath(newAssetSearchPath);
  100. }
  101. var spec = {
  102. content: {
  103. cmProperties: {
  104. id: newAssetId
  105. },
  106. isViewer: true,
  107. altDrillFlag: true, //@todo Reporting add this new flag to route to new implementation that supports JSON parameter values
  108. prompt: false, //@todo what is this?
  109. format: 'HTML', // Default to HTML until we support more format.
  110. editSpecification: '', //dashboard drill through to target does not need this property
  111. pathRef: pathRefInfo.pathRef
  112. }
  113. };
  114. // exploration is the CM type for dashboard/story/explore
  115. if (_this3.drillDefinitionEntry.getType() === 'exploration') {
  116. spec.content.filters = JSON.stringify(_this3._getDashboardParameterValues());
  117. } else {
  118. spec.content.parameterValuesJSON = JSON.stringify(_this3._getReportParameterValues());
  119. }
  120. return spec;
  121. });
  122. };
  123. JumpToTarget.prototype._getDashboardParameterValues = function _getDashboardParameterValues() {
  124. if (this.dashboardParameterValues && _.size(this.dashboardParameterValues) > 0) {
  125. return this.dashboardParameterValues;
  126. }
  127. this.dashboardParameterValues = {
  128. assetID: this._getVisualization().getDataSource().getAssetId(),
  129. filters: []
  130. };
  131. var mergedConvertedFilter = this._getMergedConvertedFilter();
  132. this.dashboardParameterValues.filters.push(mergedConvertedFilter);
  133. return this.dashboardParameterValues;
  134. };
  135. JumpToTarget.prototype._getMergedConvertedFilter = function _getMergedConvertedFilter() {
  136. var _getFilterInfo2 = this._getFilterInfo(),
  137. globalFilters = _getFilterInfo2.globalFilters,
  138. localFilters = _getFilterInfo2.localFilters,
  139. selectionFilters = _getFilterInfo2.selectionFilters,
  140. dataPointFilter = _getFilterInfo2.dataPointFilter;
  141. var mergedFilters = {};
  142. // the order has to be globalFilters -> localFilters -> dataPointFilter -> selectionFilters
  143. this._getSimpleFilterContext(globalFilters, mergedFilters);
  144. this._getSimpleFilterContext(localFilters, mergedFilters);
  145. this._getSimpleFilterContext(dataPointFilter, mergedFilters);
  146. this._getSimpleFilterContext(selectionFilters, mergedFilters);
  147. return mergedFilters;
  148. };
  149. /**
  150. * If the filter entry in filter list is simple expression, just add to mergedFilters.
  151. * In case of compound filter express, walk each simple filter expression to collect the context.
  152. * @extends Please check unit test {@link testJumpToDashboardWithComplicatedFilterExpression}
  153. */
  154. JumpToTarget.prototype._getSimpleFilterContext = function _getSimpleFilterContext() {
  155. var filterList = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  156. var _this4 = this;
  157. var mergedFilters = arguments[1];
  158. var append = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  159. if (filterList.length === 0) {
  160. return;
  161. }
  162. filterList.forEach(function (filter) {
  163. if (filter.columnId) {
  164. if (append && mergedFilters[filter.columnId] && mergedFilters[filter.columnId].values && filter.values) {
  165. var _mergedFilters$filter;
  166. // Filter column already exists in merged, just append the filter values.
  167. (_mergedFilters$filter = mergedFilters[filter.columnId].values).push.apply(_mergedFilters$filter, filter.values);
  168. } else {
  169. mergedFilters[filter.columnId] = filter;
  170. }
  171. } else {
  172. // In case of compound filter, need to add the simple filter context or append the filter values if column id already exists
  173. _this4._getSimpleFilterContext(filter.values, mergedFilters, true);
  174. }
  175. });
  176. };
  177. JumpToTarget.prototype._getFilterInfo = function _getFilterInfo() {
  178. var visualization = this._getVisualization();
  179. var datasource = visualization.getDataSource();
  180. var localFilters = visualization.getLocalFilters();
  181. var type = this.dashboard.getAppConfig('pageContainerType');
  182. var filterInfo = {
  183. localFilters: localFilters.getFilterList(),
  184. globalFilters: this.globalFilters.getFilterList({
  185. origin: 'filter',
  186. sourceId: datasource.getId(),
  187. scope: ContentUtil.getPageContent(this.content, type).getId(),
  188. eventGroupId: this.eventGroups.getGroupId(this.content.getId())
  189. }),
  190. selectionFilters: this.globalFilters.getFilterList({
  191. origin: 'visualization',
  192. sourceId: datasource.getId(),
  193. scope: ContentUtil.getPageContent(this.content, type).getId(),
  194. eventGroupId: this.eventGroups.getGroupId(this.content.getId())
  195. }),
  196. dataPointFilter: this._getDataPointFilter()
  197. };
  198. return filterInfo;
  199. };
  200. JumpToTarget.prototype._getDataPointFilter = function _getDataPointFilter() {
  201. var datapointFilters = [];
  202. if (this.selections && this.selections.dataPoints) {
  203. this.selections.dataPoints.forEach(function (dataPoint) {
  204. if (dataPoint.categories) {
  205. dataPoint.categories.forEach(function (category) {
  206. var filterEntry = _.findWhere(datapointFilters, { columnId: category.columnId });
  207. if (!filterEntry) {
  208. filterEntry = {
  209. columnId: category.columnId,
  210. operator: 'in',
  211. values: []
  212. };
  213. datapointFilters.push(filterEntry);
  214. }
  215. filterEntry.values.push({ u: category.value, d: category.label });
  216. });
  217. }
  218. });
  219. }
  220. return datapointFilters;
  221. };
  222. JumpToTarget.prototype._getReportParameterValues = function _getReportParameterValues() {
  223. var _this5 = this;
  224. var reportParameterValues = {};
  225. var mappings = this.drillDefinitionEntry.getMappings();
  226. _.each(mappings, function (mapping) {
  227. var values = _this5._getParamterValues(mapping);
  228. if (!values) {
  229. return;
  230. }
  231. if (_this5._isRangeParameter(mapping.capabilities)) {
  232. // Complex parameter values.
  233. var complexValues = _this5._buildRangeValues(values, mapping.type);
  234. reportParameterValues[mapping.name] = complexValues;
  235. } else {
  236. if (values.startValue || values.endValue) {
  237. // Dashboard has range values, and convert to simple array values
  238. var arrayValues = [];
  239. if (values.startValue) {
  240. arrayValues.push(values.startValue);
  241. }
  242. if (values.endValue) {
  243. arrayValues.push(values.endValue);
  244. }
  245. values = arrayValues;
  246. }
  247. if (values.length > 0) {
  248. // Simple parameter values built from simple array values.
  249. reportParameterValues[mapping.name] = [];
  250. values.forEach(function (value) {
  251. reportParameterValues[mapping.name].push({
  252. use: _this5._getUseValueFromValue(value, mapping.type),
  253. display: _this5._getDisplayValueFromValue(value)
  254. });
  255. });
  256. }
  257. }
  258. });
  259. return reportParameterValues;
  260. };
  261. JumpToTarget.prototype._getParamterValues = function _getParamterValues(mapping) {
  262. var values = void 0;
  263. if (mapping && mapping.mapTo) {
  264. // Get values from selections
  265. values = this._getValuesFromSelections(mapping.mapTo);
  266. // No values from selections, search local filters
  267. if (!values || !values.length) {
  268. values = this._getValuesFromFilters(mapping.mapTo, this._getLocalFilters().getFilterList());
  269. }
  270. // No values from projections and local filters, search global filters
  271. // in_range prompt expecting start and end values respectively so values is object type.
  272. if (!values || Array.isArray(values) && !values.length || (typeof values === 'undefined' ? 'undefined' : _typeof(values)) === 'object' && _.isEmpty(values)) {
  273. var globalFilterList = [].concat(this.globalFilters.getFilterList(this._getNetPageContextSelectors('filter')));
  274. globalFilterList.push.apply(globalFilterList, this.globalFilters.getFilterList(this._getNetPageContextSelectors('visualization')));
  275. values = this._getValuesFromFilters(mapping.mapTo, globalFilterList);
  276. }
  277. }
  278. return values;
  279. };
  280. JumpToTarget.prototype._getValuesFromSelections = function _getValuesFromSelections(mapTo) {
  281. var values = null;
  282. // When selection has numeric values, map it to the target first since numeric selections are not included in pending filter or brushing
  283. var dataPoints = this.selections && this.selections.dataPoints || [];
  284. if (!dataPoints.length) {
  285. // Content contribution is built before selection happens so need to collect selections here.
  286. dataPoints = this.content.getFeature('DataPointSelections').getSelections();
  287. }
  288. var facts = _.pluck(dataPoints, 'facts');
  289. facts.forEach(function (items) {
  290. items && items.forEach(function (item) {
  291. if (item.columnId === mapTo) {
  292. values = item.value !== null && item.value !== undefined ? [item.value] : null;
  293. }
  294. });
  295. });
  296. if (values) {
  297. // Found source column and return;
  298. return values;
  299. }
  300. var groupedSelections = this._groupSelections(dataPoints);
  301. values = this._getValues(groupedSelections, mapTo);
  302. return values;
  303. };
  304. JumpToTarget.prototype._getValues = function _getValues(groupedSelections, mapTo) {
  305. var _this6 = this;
  306. if (groupedSelections) {
  307. var _ret = function () {
  308. var values = [];
  309. for (var groupKey in groupedSelections) {
  310. var columnIds = groupKey.split(',');
  311. if (columnIds.indexOf(mapTo) !== -1) {
  312. groupedSelections[groupKey].forEach(function (groupSelection) {
  313. groupSelection.forEach(function (selection) {
  314. selection.columnId === mapTo && values.push(selection);
  315. });
  316. });
  317. }
  318. }
  319. return {
  320. v: _this6._uniqueValues(values)
  321. };
  322. }();
  323. if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v;
  324. }
  325. };
  326. JumpToTarget.prototype._uniqueValues = function _uniqueValues() {
  327. var values = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  328. var uniqueValues = [];
  329. var valuesMap = {};
  330. values.forEach(function (value) {
  331. if (!valuesMap[value.u]) {
  332. valuesMap[value.u] = 1;
  333. uniqueValues.push(value);
  334. }
  335. });
  336. return uniqueValues;
  337. };
  338. JumpToTarget.prototype._getFilterSpec = function _getFilterSpec(mapTo, filterList) {
  339. var resultSpec = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
  340. /**
  341. * filterList could have multiple filters based on different pre or post aggregations or aggregation types
  342. * But we will only pass the values of the first entry to target
  343. */
  344. for (var i = 0; i < filterList.length; i++) {
  345. if (filterList[i].columnId === mapTo) {
  346. if (resultSpec) {
  347. var _resultSpec$values;
  348. (_resultSpec$values = resultSpec.values).push.apply(_resultSpec$values, filterList[i].values);
  349. } else {
  350. resultSpec = filterList[i];
  351. }
  352. break;
  353. } else if (filterList[i].values && filterList[i].values.length) {
  354. resultSpec = this._getFilterSpec(mapTo, filterList[i].values, resultSpec);
  355. }
  356. }
  357. return resultSpec;
  358. };
  359. JumpToTarget.prototype._getValuesFromFilters = function _getValuesFromFilters(mapTo, filterList) {
  360. var filterSpec = filterList && this._getFilterSpec(mapTo, filterList);
  361. // Return filter values if exist, and the operator is not negative operations
  362. // Fact filter ids are generated from itemId and aggregation type, e.g. [Sales (query)].[Sales].[Revenue]_sum,
  363. // so get(mapTo) won't return fact filters.
  364. var values = void 0;
  365. if (filterSpec && !this._isNegativeOperation(filterSpec) && filterSpec.values) {
  366. values = filterSpec.values;
  367. if (this._isRangeFilter(filterSpec)) {
  368. var startValue = void 0;
  369. var endValue = void 0;
  370. switch (filterSpec.operator) {
  371. case 'between':
  372. startValue = values[0];
  373. endValue = values[1];
  374. break;
  375. case 'gt':
  376. case 'gte':
  377. startValue = values[0];
  378. break;
  379. case 'lt':
  380. case 'lte':
  381. endValue = values[0];
  382. break;
  383. default:
  384. break;
  385. }
  386. // complex value structure
  387. values = {
  388. startValue: startValue,
  389. endValue: endValue
  390. };
  391. }
  392. }
  393. return values;
  394. };
  395. JumpToTarget.prototype._getNetPageContextSelectors = function _getNetPageContextSelectors(origin) {
  396. var page = ContentUtil.getPageContent(this.content);
  397. return {
  398. scope: page && page.getId(),
  399. sourceId: this._getVisualization().getDataSource().getId(),
  400. origin: origin
  401. };
  402. };
  403. JumpToTarget.prototype._isNegativeOperation = function _isNegativeOperation(localFilter) {
  404. return this.negativeFilterOps.indexOf(localFilter.operator) !== -1;
  405. };
  406. JumpToTarget.prototype._isRangeFilter = function _isRangeFilter(localFilter) {
  407. return this.rangeFilterOps.indexOf(localFilter.operator) !== -1;
  408. };
  409. JumpToTarget.prototype.remove = function remove() {
  410. this.drillDefinitionEntry = null;
  411. this.selections = null;
  412. };
  413. JumpToTarget.prototype._isRangeParameter = function _isRangeParameter(capabilities) {
  414. return capabilities && (capabilities.indexOf(this.rangeValueTypes.unboundedRange) !== -1 || capabilities.indexOf(this.rangeValueTypes.boundRange) !== -1);
  415. };
  416. /**
  417. * Range parameter value is a complex expression with the
  418. * form of "boundRange" with a "start" and "end", "unboundedEndRange" with a "start" and "unboundedStartRange" with an "end",
  419. * and the values are from selections or a range filters. The first value will be used for both tart and end in case of multi selected values.
  420. * @example
  421. * {
  422. * 'Parameter1': [
  423. * {
  424. * 'boundRange': {
  425. * 'start': {
  426. * 'use': '2010-01-01T00:00:00',
  427. * 'display': '2010-01-01T00:00:00'
  428. * },
  429. * 'end': {
  430. * 'use': '2010-01-31T00:00:00',
  431. * 'display': '2010-01-31T00:00:00'
  432. * }
  433. * }
  434. * }
  435. * ]
  436. * }
  437. * @example
  438. * {
  439. * 'Parameter1': [
  440. * {
  441. * 'unboundedEndRange': {
  442. * 'start': {
  443. * 'use': '2013-07-01T00:00:00',
  444. * 'display': '2013-07-01T00:00:00'
  445. * }
  446. * }
  447. * }
  448. * ]
  449. * }
  450. * @param {object} values - either an array of values or an object with start and end values.
  451. * @param {string} mappingType - the parameter type.
  452. */
  453. JumpToTarget.prototype._buildRangeValues = function _buildRangeValues(values, mappingType) {
  454. var startValue = void 0;
  455. var endValue = void 0;
  456. if (values) {
  457. // For non-range selected values, set start and end values to the first selected value.
  458. if (_.isArray(values) && values.length >= 1) {
  459. startValue = values[0];
  460. endValue = values[0];
  461. } else {
  462. startValue = values.startValue;
  463. endValue = values.endValue;
  464. }
  465. }
  466. var valueExpr = {};
  467. if (startValue && endValue) {
  468. valueExpr[this.rangeValueTypes.boundRange] = {
  469. start: {
  470. use: this._getUseValueFromValue(startValue, mappingType),
  471. display: this._getDisplayValueFromValue(startValue)
  472. },
  473. end: {
  474. use: this._getUseValueFromValue(endValue, mappingType),
  475. display: this._getDisplayValueFromValue(endValue)
  476. }
  477. };
  478. } else if (startValue) {
  479. valueExpr[this.rangeValueTypes.unboundedEndRange] = {
  480. start: {
  481. use: this._getUseValueFromValue(startValue, mappingType),
  482. display: this._getDisplayValueFromValue(startValue)
  483. }
  484. };
  485. } else if (endValue) {
  486. valueExpr[this.rangeValueTypes.unboundedStartRange] = {
  487. end: {
  488. use: this._getUseValueFromValue(endValue, mappingType),
  489. display: this._getDisplayValueFromValue(endValue)
  490. }
  491. };
  492. }
  493. // When a range has no startValue and endValue return null.
  494. return _.isEmpty(valueExpr) ? null : [valueExpr];
  495. };
  496. JumpToTarget.prototype._getUseValueFromValue = function _getUseValueFromValue(value, mappingType) {
  497. var resultValue = null;
  498. if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object') {
  499. if (mappingType === 'memberUniqueName') {
  500. resultValue = value.value === undefined ? value.u : value.value;
  501. } else {
  502. resultValue = value.label === undefined ? value.d : value.label;
  503. }
  504. } else {
  505. resultValue = value;
  506. }
  507. return resultValue;
  508. };
  509. JumpToTarget.prototype._getDisplayValueFromValue = function _getDisplayValueFromValue(value) {
  510. return (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' ? value.label === undefined ? value.d : value.label : value;
  511. };
  512. return JumpToTarget;
  513. }(DataPointActionBase);
  514. return JumpToTarget;
  515. });
  516. //# sourceMappingURL=JumpToTarget.js.map