SampleFeature.js 982 B

1234567891011121314151617181920212223242526272829303132333435363738
  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 Cognos Products: BI Cloud (C) Copyright IBM Corp. 2018
  6. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. *
  8. */
  9. define([], function () {
  10. 'use strict';
  11. var BaseFeature = function () {
  12. function BaseFeature(widgetApi, dashboardApi) {
  13. _classCallCheck(this, BaseFeature);
  14. this.widgetApi = widgetApi;
  15. this.dashboardApi = dashboardApi;
  16. console.debug('feature created');
  17. }
  18. BaseFeature.prototype.getAPI = function getAPI() {
  19. var _this = this;
  20. return {
  21. testAPI: function testAPI() {
  22. console.debug('hello from ' + _this.widgetApi.getId());
  23. }
  24. };
  25. };
  26. return BaseFeature;
  27. }();
  28. return BaseFeature;
  29. });
  30. //# sourceMappingURL=SampleFeature.js.map