SampleFeature.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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(options) {
  13. _classCallCheck(this, BaseFeature);
  14. this.content = options.content;
  15. this.dashboardAPI = options.dashboardAPI;
  16. console.debug('******* feature created');
  17. }
  18. BaseFeature.prototype.initialize = function initialize() {
  19. return Promise.resolve();
  20. };
  21. BaseFeature.prototype.getAPI = function getAPI() {
  22. var _this = this;
  23. return {
  24. testAPI: function testAPI() {
  25. console.debug('hello from ' + _this.content.getId());
  26. }
  27. };
  28. };
  29. return BaseFeature;
  30. }();
  31. return BaseFeature;
  32. });
  33. //# sourceMappingURL=SampleFeature.js.map