InAppSlideoutStateAPI.js 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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. /**
  9. * @class InAppSlideoutAPI
  10. * @hideconstructor
  11. * @classdesc Internal API class that is used to manage the InAppSlideout view.
  12. */
  13. define([], function () {
  14. var InAppSlideoutAPI = function () {
  15. function InAppSlideoutAPI() {
  16. _classCallCheck(this, InAppSlideoutAPI);
  17. }
  18. /**
  19. * @function InAppSlideoutStateAPI#registerContribution
  20. * @description register a slideout contribution
  21. * @param {string} id - id of the contribution
  22. * @param {Object} contentContribution - content contribution
  23. * @return {Promise} Promise resolved when the contributor is registered
  24. */
  25. InAppSlideoutAPI.prototype.registerContribution = function registerContribution() {};
  26. /**
  27. * @function InAppSlideoutStateAPI#removeContribution
  28. * @description remove a slideout contribution
  29. * @param {string} id - id of contribution to remove
  30. */
  31. InAppSlideoutAPI.prototype.removeContribution = function removeContribution() {};
  32. /**
  33. * @function InAppSlideoutStateAPI#getContributions
  34. * @description get the list of contributions
  35. * @return {Object[]} list of contributions
  36. */
  37. InAppSlideoutAPI.prototype.getContributions = function getContributions() {};
  38. /**
  39. * @function InAppSlideoutStateAPI#getContribution
  40. * @description get a single contribution by id
  41. * @param {string} id - id of the contribution
  42. * @return {Object} contribution object
  43. */
  44. InAppSlideoutAPI.prototype.getContribution = function getContribution() {};
  45. /**
  46. * @function InAppSlideoutStateAPI#getCurrent
  47. * @description get current contribution
  48. * @return {Object} object containing `item` (contribution instance) and `data` (additional data to pass the contribution upon render)
  49. */
  50. InAppSlideoutAPI.prototype.getCurrent = function getCurrent() {};
  51. /**
  52. * @function InAppSlideoutStateAPI#getUiState
  53. * @description get the current ui state
  54. * @return {Object}
  55. */
  56. InAppSlideoutAPI.prototype.getUiState = function getUiState() {};
  57. /**
  58. * @function InAppSlideoutStateAPI#onStateChange
  59. * @description register a on state change callback, to be called when the state is changed
  60. * @param {Function} fn - function to be called when the state changes
  61. * @return {Function} function returned to destroy remove the listener
  62. */
  63. InAppSlideoutAPI.prototype.onStateChange = function onStateChange() {};
  64. /**
  65. * @function InAppSlideoutStateAPI#isOpen
  66. * @description Check whether the in app slideout is open or not
  67. * @return {Boolean} TRUE if the slideout is open and FALSE if the slideout is not
  68. */
  69. InAppSlideoutAPI.prototype.isOpen = function isOpen() {};
  70. /**
  71. * @function InAppSlideoutStateAPI#open
  72. * @description Open the slideout
  73. */
  74. InAppSlideoutAPI.prototype.open = function open() {};
  75. /**
  76. * @function InAppSlideoutStateAPI#close
  77. * @description Close the slideout
  78. */
  79. InAppSlideoutAPI.prototype.close = function close() {};
  80. return InAppSlideoutAPI;
  81. }();
  82. return InAppSlideoutAPI;
  83. });
  84. //# sourceMappingURL=InAppSlideoutStateAPI.js.map