InternalModels.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. 'use strict';
  2. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  3. /*
  4. * Licensed Materials - Property of IBM
  5. * IBM Business Analytics (C) Copyright IBM Corp. 2019, 2020
  6. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. */
  8. define(['../../../lib/@waca/dashboard-common/dist/core/APIFactory', './api/InternalModelsAPI'], function (APIFactory, InternalModelsAPI) {
  9. /**
  10. * @implements InternalModelsAPI
  11. */
  12. var InternalModels = function () {
  13. function InternalModels(_ref) {
  14. var widgetModel = _ref.widgetModel,
  15. layoutModel = _ref.layoutModel;
  16. _classCallCheck(this, InternalModels);
  17. this.widgetModel = widgetModel;
  18. this.layoutModel = layoutModel;
  19. this._api = APIFactory.createAPI(this, [InternalModelsAPI]);
  20. }
  21. InternalModels.prototype.getAPI = function getAPI() {
  22. return this._api;
  23. };
  24. InternalModels.prototype.getWidgetModel = function getWidgetModel() {
  25. return this.widgetModel;
  26. };
  27. InternalModels.prototype.getLayoutModel = function getLayoutModel() {
  28. return this.layoutModel;
  29. };
  30. InternalModels.prototype.toJSON = function toJSON() {
  31. if (this.widgetModel) {
  32. return this.widgetModel.toJSON();
  33. }
  34. };
  35. return InternalModels;
  36. }();
  37. return InternalModels;
  38. });
  39. //# sourceMappingURL=InternalModels.js.map