DashboardFeatures.js 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  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. 2019
  6. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. */
  8. define([], function () {
  9. var DashboardFeatures = function () {
  10. function DashboardFeatures() {
  11. _classCallCheck(this, DashboardFeatures);
  12. this.features = {};
  13. }
  14. DashboardFeatures.prototype.addFeature = function addFeature(name, feature) {
  15. this.features[name] = feature;
  16. };
  17. DashboardFeatures.prototype.onContentSelection = function onContentSelection(idList) {
  18. Object.values(this.features).forEach(function (feature) {
  19. if (feature.onContentSelection) {
  20. feature.onContentSelection(idList);
  21. }
  22. });
  23. };
  24. return DashboardFeatures;
  25. }();
  26. return DashboardFeatures;
  27. });
  28. //# sourceMappingURL=DashboardFeatures.js.map