ToolbarDockAPI.js 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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, 2020
  6. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. */
  8. /**
  9. * @class ToolbarDockAPI
  10. * @hideconstructor
  11. * @classdesc API class that is used to manage the Toolbar Dock.
  12. */
  13. define([], function () {
  14. var ToolbarDockAPI = function () {
  15. function ToolbarDockAPI() {
  16. _classCallCheck(this, ToolbarDockAPI);
  17. }
  18. /**
  19. * @function ToolbarDock#disableDockedODT
  20. * @description sets the ODT as floating, cleans its content and saves the preference
  21. */
  22. ToolbarDockAPI.prototype.disableDockedODT = function disableDockedODT() {};
  23. /**
  24. * @function ToolbarDockAPI#enableDockedODT
  25. * @description sets the ODT as docked, cleans its content and saves the preference
  26. */
  27. ToolbarDockAPI.prototype.enableDockedODT = function enableDockedODT() {};
  28. /**
  29. * @function ToolbarDockAPI#toggle
  30. * @description toggle the toolbar dock to dock/undock
  31. */
  32. ToolbarDockAPI.prototype.toggle = function toggle() {};
  33. /**
  34. * @function ToolbarDockAPI#isContentToolbarDocked
  35. * @description check if the content toolbar should be docked
  36. * @returns {Boolean} true if this the toolbar should be docked, false otherwise
  37. */
  38. ToolbarDockAPI.prototype.isContentToolbarDocked = function isContentToolbarDocked() {};
  39. /**
  40. * @function ToolbarDockAPI#updateODTState
  41. * @description Render a toolbar for the supplied spec in the content dock toolbar
  42. * @param {Object[]} actions - The toolbar spec to render
  43. * @param {String[]} [selectedIds] - Array of selected widget ids. Undefined is a valid value if the toolbar acts on a sub-control rather than a widget, such as the text toolbar.
  44. */
  45. ToolbarDockAPI.prototype.updateODTState = function updateODTState() /*actions, selectedIds*/{};
  46. /**
  47. * @function ToolbarDockAPI#focusODT
  48. * @description Focus on the ODT
  49. */
  50. ToolbarDockAPI.prototype.focusODT = function focusODT() {};
  51. /**
  52. * @function ToolbarDock#getOwnerIDs
  53. * @description Get the IDs of the contents that the current ODT is displayed for
  54. * @return {String[]} an array of IDs of contents
  55. */
  56. ToolbarDockAPI.prototype.getOwnerIDs = function getOwnerIDs() {};
  57. return ToolbarDockAPI;
  58. }();
  59. /* Callback IDs */
  60. /**
  61. * @public
  62. * @readonly
  63. * @description Callback id for the docked toolbar section
  64. * @memberof ToolbarDockAPI
  65. */
  66. ToolbarDockAPI.UPDATE_DOCKED_TOOLBAR_STATE = 'updateState_dockedToolbar';
  67. /**
  68. * @public
  69. * @readonly
  70. * @description Callback id for the canvas toolbar section
  71. * @memberof ToolbarDockAPI
  72. */
  73. ToolbarDockAPI.UPDATE_CANVAS_TOOLBAR_STATE = 'updateState_canvasToolbar';
  74. /**
  75. * @public
  76. * @readonly
  77. * @description Callback id for the docked toolbar section
  78. * @memberof ToolbarDockAPI
  79. */
  80. ToolbarDockAPI.FOCUS_DOCKED_TOOLBAR = 'focus_dockedToolbar';
  81. return ToolbarDockAPI;
  82. });
  83. //# sourceMappingURL=ToolbarDockAPI.js.map