ContentMenuAPI.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. 2020
  6. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. */
  8. /**
  9. * @class ContentMenuAPI
  10. * @hideconstructor
  11. * @classdesc API class that is used to obtain the list of content menu available
  12. */
  13. define([], function () {
  14. var ContentMenuAPI = function () {
  15. function ContentMenuAPI() {
  16. _classCallCheck(this, ContentMenuAPI);
  17. }
  18. /**
  19. * @function ContentMenuAPI#registerProvider
  20. * @description Register a provider as a content menu provider
  21. * @param {String} name of the provider
  22. * @param {Object} provider Provider api that registers and contributes to content menu
  23. * eg. usage: registerProvider('overlay', overlay.getAPI());
  24. */
  25. ContentMenuAPI.prototype.registerProvider = function registerProvider() {};
  26. /**
  27. * @function ContentMenuAPI#getContentMenuList
  28. * @description Returns a list of content menu available for a specific item given a list of content ids.
  29. * @param {string[]} idList list of content ids
  30. * @return {object[]} array containing all available menu
  31. * eg. [{
  32. * id: 'id1',
  33. * name: 'overlay',
  34. * label: 'show/hide overlay',
  35. * action: actionFunction
  36. * }]
  37. */
  38. ContentMenuAPI.prototype.getContentMenuList = function getContentMenuList() /* idList */{};
  39. return ContentMenuAPI;
  40. }();
  41. return ContentMenuAPI;
  42. });
  43. //# sourceMappingURL=ContentMenuAPI.js.map