123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- '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
- * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- */
- define(['./nls/StringResources', './ServiceabilityDataMapping', './ServiceabilityDataSource'], function (ServiceabilityStringResources, ServiceabilityDataMapping, ServiceabilityDataSource) {
- var ServiceabilityDataInfo = function () {
- function ServiceabilityDataInfo(visualizationAPI) {
- _classCallCheck(this, ServiceabilityDataInfo);
- this._visualizationAPI = visualizationAPI;
- this._serviceabilityDataMapping = new ServiceabilityDataMapping(this._visualizationAPI);
- this._serviceabilityDataSource = new ServiceabilityDataSource(this._visualizationAPI);
- }
- /**
- * @returns {object} The result of this result should be an object which will
- * be stringfied later.
- * @description this method will fetch the data info of a live widget
- * through the APIs.
- */
- ServiceabilityDataInfo.prototype.toJSON = function toJSON() {
- return {
- ServiceabilityDataInfo: {
- ServiceabilityDataMapping: this._serviceabilityDataMapping.toJSON(),
- ServiceabilityDataSource: this._serviceabilityDataSource.toJSON()
- }
- };
- };
- /**
- * @description this method will fetch the data mapping info and construct a UI spec which defined
- * how the Data Mapping section will be displayed
- * @returns {object} The UI spec which will be consumed by ContentInfoAPI
- */
- ServiceabilityDataInfo.prototype.toUIJSON = function toUIJSON() {
- return [{
- sectionName: ServiceabilityStringResources.get('dataSource'),
- sectionValues: [].concat(this._serviceabilityDataSource.toUIJSON(), this._serviceabilityDataMapping.toUIJSON()),
- properties: {
- open: false
- }
- }];
- };
- return ServiceabilityDataInfo;
- }();
- return ServiceabilityDataInfo;
- });
- //# sourceMappingURL=ServiceabilityDataInfo.js.map
|