TimelineAPIImpl.js 2.2 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. function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  4. function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
  5. /**
  6. * Licensed Materials - Property of IBM
  7. * IBM Cognos Products: BI Cloud (C) Copyright IBM Corp. 2019
  8. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  9. */
  10. define(['gemini/lib/@waca/dashboard-common/dist/core/APIFactory', '../../TimelineController', '../TimelineAPI'], function (APIFactory, Controller, TimelineAPI) {
  11. var TimelineAPIImpl = function (_Controller) {
  12. _inherits(TimelineAPIImpl, _Controller);
  13. function TimelineAPIImpl(options) {
  14. _classCallCheck(this, TimelineAPIImpl);
  15. var _this = _possibleConstructorReturn(this, _Controller.call(this, options));
  16. _this.addHighlight = _this.addTimelineHighlight.bind(_this);
  17. _this.deleteHighlight = _this.deleteTimelineHighlight.bind(_this);
  18. _this.getEpisode = _this.getTimelineEpisodeById.bind(_this);
  19. _this.getEpisodeIDs = _this.getTimelineEpisodeIDs.bind(_this);
  20. _this.moveEpisode = _this.moveEpisodeBefore.bind(_this);
  21. _this.updateEpisodeDuration = _this.updateTimelineDuration.bind(_this);
  22. _this.updateHighlight = _this.updateTimelineHighlight.bind(_this);
  23. return _this;
  24. }
  25. TimelineAPIImpl.prototype.getAPI = function getAPI() {
  26. return APIFactory.createAPI(this, [TimelineAPI]);
  27. };
  28. return TimelineAPIImpl;
  29. }(Controller);
  30. return TimelineAPIImpl;
  31. });
  32. //# sourceMappingURL=TimelineAPIImpl.js.map