MappedDataItem.js 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527
  1. 'use strict';
  2. var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
  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(['./DataItem', '../../api/DataItemAPI', '../../visualizations/interactions/BinningActionsUtils', '../../util/TransactionUtil', '../../apiHelpers/SlotAPIHelper'], function (DataItem, DataItemAPI, BinningActionsUtils, TransactionUtil, SlotAPIHelper) {
  13. var MappedDataItem = function (_DataItem) {
  14. _inherits(MappedDataItem, _DataItem);
  15. function MappedDataItem(filterSupport, dataItemModel, slot, dataSource, transaction, locale, visualizationImpl, slotsImpl) {
  16. _classCallCheck(this, MappedDataItem);
  17. var _this = _possibleConstructorReturn(this, _DataItem.call(this, dataItemModel, dataSource, transaction, locale));
  18. _this.visualizationImpl = visualizationImpl;
  19. _this.slotsImpl = slotsImpl;
  20. _this.localFilters = filterSupport.getLocalFilters();
  21. _this.filterSupport = filterSupport;
  22. _this.slot = slot;
  23. /*
  24. The originalCustomGroupItemId (ie group sourceColumn) is required for driling so it needs to be persisted for module load consumption
  25. Since the public DataItem API no longer supports this method, we set it for now via the oldDataItemAPI
  26. TODO: ReEnvision custom groups architecture so this interim solution is no longer necessary.
  27. TODO: persist the original columnIds as part of the data source spec instead. This does not belong in the dataitem.
  28. TODO: AVOID calling getFeature('DataSources.moser')
  29. */
  30. var shaping = _this.visualizationImpl.dashboardAPI.getFeature('DataSources.moser');
  31. if (shaping && shaping.isConsumerGroupColumn) {
  32. var sourceId = _this.dataSourceAPI.getId();
  33. var columnId = _this.getColumnId();
  34. if (shaping.isConsumerGroupColumn(sourceId, columnId)) {
  35. var customGroup = shaping.getCustomGroupData(sourceId, columnId);
  36. if (customGroup && customGroup.basedOnMoserObjectId) {
  37. _this.dataItemModel.originalCustomGroupItemId = customGroup.basedOnMoserObjectId;
  38. }
  39. }
  40. }
  41. return _this;
  42. }
  43. MappedDataItem.prototype.getSlot = function getSlot() {
  44. return this.slot;
  45. };
  46. MappedDataItem.prototype.destroy = function destroy() {
  47. _DataItem.prototype.destroy.call(this);
  48. this.visualizationImpl = null;
  49. this.slotsImpl = null;
  50. this.localFilters = null;
  51. this.filterSupport = null;
  52. };
  53. MappedDataItem.prototype.setSlot = function setSlot(slot, transactionToken) {
  54. this.slot = slot;
  55. if (slot && this.getBinning()) {
  56. var canApplyBinning = this.visualizationImpl.getDefinition().getProperty('canApplyBinning');
  57. if (!canApplyBinning || !SlotAPIHelper.doesDataItemSupportBinning(slot, this.getAPI())) {
  58. this.getAPI().setBinning(null, transactionToken);
  59. }
  60. }
  61. };
  62. MappedDataItem.prototype.getType = function getType() {
  63. var slotType = void 0;
  64. if (this.slot) {
  65. var def = this.slot.getDefinition();
  66. if (def.getSubType() === 'latitude' || def.getSubType() === 'longitude') {
  67. slotType = 'category';
  68. } else if (def.getType() === 'any') {
  69. if (SlotAPIHelper.isMultiMeasuresSeriesSlot(this.slot)) {
  70. slotType = 'category';
  71. } else if (this.getBinning()) {
  72. slotType = 'category';
  73. } else {
  74. var metadata = this.getMetadataColumn();
  75. if (metadata && metadata.getType() === 'attribute') {
  76. if (this.getAggregation() === DataItemAPI.AGGREGATION_TYPE.none) {
  77. slotType = 'category';
  78. } else {
  79. slotType = 'ordinal';
  80. }
  81. } else if (metadata && metadata.getType() === 'fact') {
  82. /**
  83. * - If one of the items in an 'any' slot is a measure, and we have more than one items,
  84. * then simply consider slot type to be category.
  85. * This prevents issues described in defect #255087
  86. */
  87. if (this.slot.getDataItemList().length > 1 && !this.slot.getDefinition().getProperty('repeats')) {
  88. slotType = 'category';
  89. } else {
  90. slotType = 'ordinal';
  91. }
  92. }
  93. }
  94. }
  95. if (!slotType) {
  96. slotType = def.getType();
  97. }
  98. }
  99. return slotType && (slotType === 'ordinal' ? 'fact' : 'attribute');
  100. };
  101. MappedDataItem.prototype.setAggregation = function setAggregation(aggregationType, transactionToken) {
  102. if (!this.slot) {
  103. _DataItem.prototype.setAggregation.call(this, aggregationType, transactionToken);
  104. } else {
  105. var subTransaction = this.transaction.startTransaction(transactionToken);
  106. if (this.getType() === 'fact') {
  107. var currentAggregationType = this.getAggregation();
  108. var localFilters = this.localFilters;
  109. var rangeFilterOnOldAggregationType = localFilters.getFilterEntry(localFilters.getOrdinalFilterKey(this.getColumnId(), currentAggregationType));
  110. if (rangeFilterOnOldAggregationType) {
  111. var itemContext = {
  112. uniqueId: this.getId(),
  113. itemId: this.getColumnId(),
  114. itemName: this.getLabel(),
  115. dataType: this.getDataType(),
  116. sourceId: this.visualizationImpl.getDataSource().getId(),
  117. aggregationType: currentAggregationType
  118. };
  119. this.visualizationImpl.getLocalFilters().removeFilter(itemContext, subTransaction);
  120. }
  121. }
  122. _DataItem.prototype.setAggregation.call(this, aggregationType, subTransaction);
  123. this.transaction.endTransaction(subTransaction);
  124. }
  125. };
  126. MappedDataItem.prototype.getAggregation = function getAggregation() {
  127. if (!this.slot) {
  128. return _DataItem.prototype.getAggregation.call(this);
  129. }
  130. var mdColumn = this.getMetadataColumn();
  131. if (!mdColumn) {
  132. return null;
  133. }
  134. var type = this.dataItemModel.aggregate;
  135. if (!type) {
  136. // TODO -- livewidget_cleanup --- apply this old code in here (used to be in visDataSlotsManager)
  137. // Basically if the category is in both measure and category slot, set the default aggregation to Count.. instead of
  138. var mappedSlots = this.slotsImpl.getMappedSlotList();
  139. // Check to see if we have the same column in both the aggregations and dimensions, if so, default to aggType of 'count'
  140. if (this.slot.getDefinition().getType() === 'ordinal' && this.getMetadataColumn().getType() === 'attribute') {
  141. var itemId = this.getColumnId();
  142. for (var i = 0; i < mappedSlots.length; i++) {
  143. var slotAPI = mappedSlots[i];
  144. var slotDef = slotAPI.getDefinition();
  145. if (slotDef.getType() === 'category' || slotDef.getType() === 'any') {
  146. var dataItemAPIs = slotAPI.getDataItemList();
  147. for (var j = 0; j < dataItemAPIs.length; j++) {
  148. if (dataItemAPIs[j].getColumnId() === itemId) {
  149. type = 'count';
  150. break;
  151. }
  152. }
  153. }
  154. // Stop once aggType is set.
  155. if (type) {
  156. break;
  157. }
  158. }
  159. }
  160. if (!type) {
  161. var _mdColumn = this.getMetadataColumn();
  162. type = _mdColumn ? _mdColumn.getDefaultAggregation() : null;
  163. }
  164. }
  165. var def = this.slot.getDefinition();
  166. if (def.getType() === 'any') {
  167. if (_DataItem.prototype.getType.call(this) === 'attribute') {
  168. if (!_DataItem.prototype.hasDefaultAggregation.call(this)) {
  169. return type;
  170. } else {
  171. type = DataItemAPI.AGGREGATION_TYPE.none;
  172. }
  173. }
  174. // fact assigned to a category slot should not aggregate
  175. } else if (def.getType() === 'category') {
  176. type = DataItemAPI.AGGREGATION_TYPE.none;
  177. // when an attribute is used in an ordinal slot, aggregation none doesn't make sense...consider it a count
  178. } else if (def.getType() === 'ordinal' && _DataItem.prototype.getType.call(this) === 'attribute' && type === DataItemAPI.AGGREGATION_TYPE.none) {
  179. var defaultAggrType = _DataItem.prototype.getMetadataColumn.call(this).getDefaultAggregation();
  180. type = defaultAggrType === DataItemAPI.AGGREGATION_TYPE.none ? DataItemAPI.AGGREGATION_TYPE.countDistinct : defaultAggrType;
  181. }
  182. return type;
  183. };
  184. /**
  185. * @function MappedDataItem#getFormat
  186. * @description Retrieve the format for the mapped data item.
  187. * @return {Object} An object containing format related properties.
  188. */
  189. MappedDataItem.prototype.getFormat = function getFormat() {
  190. if (!this.slot) {
  191. return _DataItem.prototype.getFormat.call(this);
  192. }
  193. var widgetModel = this.visualizationImpl.widgetModel;
  194. // this comes from an upgraded dashboard where we want to change the KPI format. see SummaryKPIUpgrade.js
  195. var useSlotDefinitionFormat = widgetModel.enableSlotDefinitionFormat === false ? false : true;
  196. var slotDefinitionFormat = this._getDefinitionFormat();
  197. var format = _DataItem.prototype.getFormat.call(this);
  198. if (useSlotDefinitionFormat && !format) {
  199. format = slotDefinitionFormat;
  200. }
  201. if (!format && (this.getMetadataColumn().getType() !== 'attribute' || _DataItem.prototype.isDateOrTimeType.call(this))) {
  202. // Default format
  203. format = {
  204. 'selectedFormat': 'none', // This property does not appear to be used anymore, it may be replaced with dateStyle
  205. 'maximumFractionDigits': 2,
  206. 'formatLength': 'short' // This property is only applicable for dates
  207. };
  208. if (_DataItem.prototype.isDateOrTimeType.call(this)) {
  209. format.type = this.getMetadataColumn().getDataType();
  210. }
  211. }
  212. // resolve the proper format when have an invalid format
  213. var metadataColumn = this.getMetadataColumn();
  214. if (format && metadataColumn) {
  215. var dataType = metadataColumn.getDataType();
  216. var isDateOrTimeType = dataType === 'date' || dataType === 'datetime' || dataType === 'time' || dataType === 'year' ? true : false;
  217. if (isDateOrTimeType) {
  218. isDateOrTimeType = this.getType() !== 'ordinal';
  219. }
  220. var formatType = format && format.type;
  221. var invalidDateFormatting = isDateOrTimeType && metadataColumn.getType() !== 'attribute' && ['date', 'time', 'datetime'].indexOf(formatType) === -1;
  222. var invalidBinningFormatting = this.getBinning() && (formatType === 'currency' || formatType === 'percent');
  223. if (invalidDateFormatting || invalidBinningFormatting || !isDateOrTimeType && ['date', 'time', 'datetime'].indexOf(formatType) > -1) {
  224. format = {
  225. 'selectedFormat': 'none',
  226. 'maximumFractionDigits': 2,
  227. 'formatLength': 'short',
  228. 'locale': this.locale
  229. };
  230. if (invalidDateFormatting || invalidBinningFormatting) {
  231. format.type = metadataColumn.getDataType();
  232. }
  233. }
  234. }
  235. // Overwrite the format type to be number if the dataItem is fact and doesn't already have a number format spec set
  236. if (this.getType() === 'fact') {
  237. if (_DataItem.prototype.isDateOrTimeType.call(this) && format && format.type !== 'number') {
  238. // Default format
  239. return {
  240. 'selectedFormat': 'none',
  241. 'maximumFractionDigits': 2,
  242. 'formatLength': 'short',
  243. 'type': 'number',
  244. 'locale': this.locale
  245. };
  246. } else if (!format && (_DataItem.prototype.getAggregation.call(this) === 'count' || _DataItem.prototype.getAggregation.call(this) === 'countdistinct')) {
  247. //If the item is assigned to an ordinal slot and it has aggregation type count or countdistinct and no format specified,
  248. //return a default (1 decimal number)
  249. //this should be changed back to 0 when implementation of VIDA story for using tickInterval is finished. See story 228160
  250. return {
  251. 'selectedFormat': 'none',
  252. 'maximumFractionDigits': 1,
  253. 'formatLength': 'short',
  254. 'type': 'number',
  255. 'locale': this.locale
  256. };
  257. }
  258. }
  259. // TODO -- livewidget_cleanup - we should not add .selectedFormat to set the ui to auto. We should simply call the hasDefaultFormat() API
  260. // ensure use auto if using default format
  261. if (format && _DataItem.prototype.hasDefaultFormat.call(this)) {
  262. format.selectedFormat = 'none';
  263. }
  264. if (format && !format.locale) {
  265. format.locale = this.locale;
  266. }
  267. return format;
  268. };
  269. MappedDataItem.prototype._getDefinitionFormat = function _getDefinitionFormat() {
  270. var definitionFormat = null;
  271. var format = this.slot.getDefinition().getFormat();
  272. if (format) {
  273. definitionFormat = Object.assign({ locale: this.locale }, format);
  274. }
  275. return definitionFormat;
  276. };
  277. /**
  278. * Updates the priority field on any sort entries on all slots, such that they enforce priority order as implied by the slot definition order.
  279. * This is done before a new sort is added, and the events are silent, as the sort addition will send a non-silent event to trigger render.
  280. * @param {string} slotId - the id of the slot having sort added
  281. * @param {string} dataItemId - the id of the data item having sort added
  282. * @param {number} explicitPriority (optional) - the priority explicitly given to the data item.
  283. * If omitted, the priority will be assigned automatically based on the existing data item sorts
  284. * @param {object} options
  285. */
  286. MappedDataItem.prototype._setSortPriorities = function _setSortPriorities(slotId, dataItemId, explicitPriority) {
  287. var _this2 = this;
  288. var isExplicitPriority = typeof explicitPriority !== 'undefined' && explicitPriority !== null;
  289. var priority = 0,
  290. newPriority = void 0;
  291. var mappedSlotList = this.slotsImpl.getMappedSlotList();
  292. mappedSlotList.forEach(function (slot) {
  293. var currentSlotId = slot.getId();
  294. var dataItemList = slot.getDataItemList();
  295. dataItemList.forEach(function (dataItem) {
  296. if (slotId === currentSlotId && dataItem.getId() === dataItemId) {
  297. //This is the item which will have its sort set - record the priority it's at
  298. newPriority = isExplicitPriority ? explicitPriority : priority++;
  299. } else if (dataItem.getSort()) {
  300. //Existing item - adjust its priority
  301. var shift = isExplicitPriority && priority >= explicitPriority;
  302. if (!dataItem.hasDefaultSort()) {
  303. var sort = dataItem.getSort();
  304. sort.priority = shift ? ++priority : priority++;
  305. _this2.slotsImpl.getDataItemImpl(dataItem.getId())._setSortWithoutAdjustingPriority(sort);
  306. }
  307. }
  308. });
  309. });
  310. return newPriority;
  311. };
  312. MappedDataItem.prototype._setSortWithoutAdjustingPriority = function _setSortWithoutAdjustingPriority(params, transactionToken) {
  313. return _DataItem.prototype.setSort.call(this, params, transactionToken);
  314. };
  315. MappedDataItem.prototype.setSort = function setSort(params, transactionToken) {
  316. var sortSpec = params ? JSON.parse(JSON.stringify(params)) : {};
  317. if (!this.slot) {
  318. return _DataItem.prototype.setSort.call(this, sortSpec, transactionToken);
  319. }
  320. if (sortSpec) {
  321. // TODO - make the the setSortPriorities is abble to reset to previous prioroties if the sortSpec is not defined (i.e. clearing the sort)
  322. //Adjust priority setting on existing sorts prior to setting actual sort
  323. sortSpec.priority = this._setSortPriorities(this.slot.getId(), this.getId(), sortSpec.priority);
  324. }
  325. return _DataItem.prototype.setSort.call(this, sortSpec, transactionToken);
  326. };
  327. MappedDataItem.prototype.hasModelSort = function hasModelSort() {
  328. return !!this._getDefaultSort();
  329. };
  330. MappedDataItem.prototype._getDefaultSort = function _getDefaultSort() {
  331. var _this3 = this;
  332. var mdColumn = this.getMetadataColumn();
  333. var sortType = mdColumn ? mdColumn.getDefaultSortType() : null;
  334. if (sortType) {
  335. // model sort found.
  336. // Calculate sort priority for model sort.
  337. var dataItemSortPriority = 0;
  338. var modelSortItemIdx = 0;
  339. var modelSortItemFound = false;
  340. this.slotsImpl.getDataItemImplList().forEach(function (dataItem) {
  341. var sortObj = dataItem._getUserSort();
  342. if (sortObj) {
  343. // User defined sort is set/saved with dataitems with highest priority.
  344. // Priorty numbers are in ascending order with 0 been the highest priority.
  345. // Find the lowest priority for user defined sort.
  346. if (dataItemSortPriority < sortObj.priority) {
  347. dataItemSortPriority = sortObj.priority;
  348. }
  349. } else if (!modelSortItemFound) {
  350. // Find the index of the model sort data item over all dataitems with model sort but without user defned sort.
  351. var currentItemId = dataItem.getColumnId();
  352. var currentItemMdColumn = dataItem.getMetadataColumn();
  353. var modelSortType = currentItemMdColumn ? currentItemMdColumn.getDefaultSortType() : null;
  354. if (modelSortType) {
  355. modelSortItemIdx++;
  356. modelSortItemFound = currentItemId === _this3.getColumnId();
  357. }
  358. }
  359. });
  360. return {
  361. type: sortType,
  362. by: 'caption',
  363. // The current model sort priority should be the highest user defined sort priorty number plus
  364. // the index of the model sort data item over all dataitems with model sort but without user defned sort.
  365. priority: dataItemSortPriority + modelSortItemIdx
  366. };
  367. }
  368. return null;
  369. };
  370. MappedDataItem.prototype.getSort = function getSort() {
  371. if (!this.slot) {
  372. return _DataItem.prototype.getSort.call(this);
  373. }
  374. var dataItemSort = _DataItem.prototype.getSort.call(this);
  375. if (!dataItemSort) {
  376. dataItemSort = this._getDefaultSort();
  377. }
  378. if (!dataItemSort || !dataItemSort.type) {
  379. var metadataColumn = this.getMetadataColumn();
  380. var defaultSort = metadataColumn && !metadataColumn.isOlapColumn() && !metadataColumn.isNamedSet() && this.slot.getDefinition().getSort();
  381. if (defaultSort) {
  382. dataItemSort = dataItemSort && dataItemSort.custom ? _extends({}, dataItemSort, { type: defaultSort }) : { type: defaultSort };
  383. }
  384. }
  385. if (dataItemSort && dataItemSort.rankSort) {
  386. delete dataItemSort.rankSort;
  387. }
  388. return dataItemSort;
  389. };
  390. //Crurrently AutobinDialog listens on BA-UI-TOOLKIT NumberInput's onChange event
  391. //However, there are cases that it is not the change of the number input's value that
  392. //caused the onChange event but just a blur or focus on number input
  393. //Currently onChange event that executs auto bin action, therefore, to avoid unecssary
  394. //auto bin action, we compare the incoming state's value with the dataitem's existing
  395. //binning state, we only execute auto bin action for new values
  396. MappedDataItem.prototype._isSameNumberOfBins = function _isSameNumberOfBins(binningSpec) {
  397. if (!binningSpec) {
  398. return false;
  399. }
  400. var binningInfo = this.getBinning();
  401. if (!binningInfo) {
  402. return false;
  403. }
  404. if (binningInfo.bins !== binningSpec.bins) {
  405. return false;
  406. }
  407. return true;
  408. };
  409. MappedDataItem.prototype.setBinning = function setBinning(binningSpec, transactionToken) {
  410. if (!this.slot) {
  411. _DataItem.prototype.setBinning.call(this, binningSpec, transactionToken);
  412. } else if (!this._isSameNumberOfBins(binningSpec)) {
  413. var options = TransactionUtil.transactionTokenToOptions(transactionToken);
  414. this.filterSupport.clearSelectionsByDataItemIds([this.getColumnId()]);
  415. BinningActionsUtils.removeCompoundFilters(this.slot, this.localFilters, options);
  416. var binningFilters = BinningActionsUtils.getBinningFilters(this.localFilters, this);
  417. if (binningFilters) {
  418. BinningActionsUtils.removeLocalBinnedFilterEntries(this.localFilters, binningFilters, options);
  419. }
  420. _DataItem.prototype.setBinning.call(this, binningSpec, transactionToken);
  421. }
  422. };
  423. MappedDataItem.prototype.setFormat = function setFormat(spec, transactionToken) {
  424. var formatSpec = JSON.parse(JSON.stringify(spec));
  425. if (!this.slot) {
  426. return _DataItem.prototype.setFormat.call(this, formatSpec, transactionToken);
  427. }
  428. var binningFilters = void 0;
  429. var options = TransactionUtil.transactionTokenToOptions(transactionToken);
  430. if (_DataItem.prototype.getBinning.call(this)) {
  431. //for any changes in binning we need clear all selection filters, it will not be part of undo/redo
  432. this.filterSupport.clearSelectionsByDataItemIds([_DataItem.prototype.getColumnId.call(this)]);
  433. BinningActionsUtils.removeCompoundFilters(this.slot, this.localFilters, options);
  434. binningFilters = formatSpec ? BinningActionsUtils.getBinningFilterForFormatedItem(formatSpec, this.localFilters, this) : null;
  435. }
  436. var clientSideDataFormatting = binningFilters ? false : true;
  437. if (binningFilters) {
  438. BinningActionsUtils.removeLocalBinnedFilterEntries(this.localFilters, binningFilters, options);
  439. }
  440. if (clientSideDataFormatting) {
  441. //Only re-send the query if needed since formatting is done on the client side so set dataIfQueryChanged to true.
  442. //Reasons why binned has to be formatted on the server side due to how the values are returned. Examples of binned values returned from DSS:
  443. //'less than 202.309000, '202.309000 to < 404.608000', '404.608000 to < 606.907000'
  444. //So the client side cannot format such values
  445. if (!options.payloadData) {
  446. options.payloadData = {};
  447. }
  448. options.payloadData.dataIfQueryChanged = true;
  449. }
  450. // TODO livewidget_cleanup --- should be passing a transction token and not options !!
  451. _DataItem.prototype.setFormat.call(this, formatSpec, options);
  452. };
  453. return MappedDataItem;
  454. }(DataItem);
  455. return MappedDataItem;
  456. });
  457. //# sourceMappingURL=MappedDataItem.js.map