Notification.js 1.0 KB

123456789101112131415161718192021222324252627282930313233
  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. define(['../../../lib/@waca/dashboard-common/dist/core/APIFactory', './api/NotificationAPI'], function (APIFactory, NotificationAPI) {
  9. var Notification = function () {
  10. function Notification(options) {
  11. _classCallCheck(this, Notification);
  12. this.dashboard = options.features['API'];
  13. this._api = APIFactory.createAPI(this, [NotificationAPI]);
  14. }
  15. Notification.prototype.getAPI = function getAPI() {
  16. return this._api;
  17. };
  18. Notification.prototype.setMessage = function setMessage(message) {
  19. this.dashboard.showToast(message);
  20. };
  21. return Notification;
  22. }();
  23. return Notification;
  24. });
  25. //# sourceMappingURL=Notification.js.map