LiveWidgetInternal.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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
  6. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. */
  8. /**
  9. * @class LiveWidgetInternal
  10. * @hideconstructor
  11. * @classdesc Implements LiveWidgetInternalAPI
  12. */
  13. define(['../../../../lib/@waca/dashboard-common/dist/core/APIFactory', './api/LiveWidgetInternalAPI'], function (APIFactory, LiveWidgetInternalAPI) {
  14. var LiveWidgetInternal = function () {
  15. function LiveWidgetInternal(options) {
  16. _classCallCheck(this, LiveWidgetInternal);
  17. this.widget = options.widget;
  18. }
  19. LiveWidgetInternal.prototype.getAPI = function getAPI() {
  20. if (!this.api) {
  21. this.api = APIFactory.createAPI(this, [LiveWidgetInternalAPI]);
  22. }
  23. return this.api;
  24. };
  25. LiveWidgetInternal.prototype.getWidget = function getWidget() {
  26. return this.widget;
  27. };
  28. LiveWidgetInternal.prototype.getVisView = function getVisView() {
  29. return this.widget.getCurrentVis();
  30. };
  31. LiveWidgetInternal.prototype.getPropertySupport = function getPropertySupport() {
  32. return this.widget.visModelManager.propertySupport;
  33. };
  34. return LiveWidgetInternal;
  35. }();
  36. return LiveWidgetInternal;
  37. });
  38. //# sourceMappingURL=LiveWidgetInternal.js.map