SlotDefinitionAPI.js 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  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. 2018, 2020
  6. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. */
  8. /**
  9. * @private
  10. * @typedef {Object} DefaultFromSlot
  11. * @property {String} id - Slot ID to use for defaults
  12. */
  13. /**
  14. * @interface SlotDefinitionAPI
  15. * @classdesc API class that is used to control slot definitions.
  16. * @example slot.getDefinition()
  17. */
  18. define([], function () {
  19. var SlotDefinitionAPI = function () {
  20. function SlotDefinitionAPI() {
  21. _classCallCheck(this, SlotDefinitionAPI);
  22. }
  23. /**
  24. * @function SlotDefinitionAPI#getProperty
  25. * @description Gets a property value from the slot definition.
  26. * @private
  27. * @param {String} id
  28. * @returns {Object} Property value
  29. */
  30. SlotDefinitionAPI.prototype.getProperty = function getProperty() {};
  31. /**
  32. * @function SlotDefinitionAPI#getDatasetIdList
  33. * @description Gets the data set ID list.
  34. * @private
  35. *
  36. * @return {Array} Data set ID string array representation
  37. */
  38. SlotDefinitionAPI.prototype.getDatasetIdList = function getDatasetIdList() {};
  39. /**
  40. * @function SlotDefinitionAPI#getId
  41. * @description Gets the slot ID.
  42. * @public
  43. *
  44. * @return {String} Slot ID
  45. */
  46. SlotDefinitionAPI.prototype.getId = function getId() {};
  47. /**
  48. * @function SlotDefinitionAPI#getCaption
  49. * @description Gets the slot caption.
  50. * @public
  51. *
  52. * @return {String} Slot caption
  53. */
  54. SlotDefinitionAPI.prototype.getCaption = function getCaption() {};
  55. /**
  56. * @function SlotDefinitionAPI#getIcon
  57. * @description Gets the slot icon name.
  58. * @private
  59. *
  60. * @return {String} Slot CSS icon name
  61. */
  62. SlotDefinitionAPI.prototype.getIcon = function getIcon() {};
  63. /**
  64. * @function SlotDefinitionAPI#getType
  65. * @description Gets the slot type.
  66. * @public
  67. *
  68. * @return {String} Slot type
  69. */
  70. SlotDefinitionAPI.prototype.getType = function getType() {};
  71. /**
  72. * @function SlotDefinitionAPI#getSubType
  73. * @description Gets the slot sub type, such as location, latitude, longitude, etc.
  74. * @private
  75. *
  76. * @return {String} Slot sub type
  77. */
  78. SlotDefinitionAPI.prototype.getSubType = function getSubType() {};
  79. /**
  80. * @function SlotDefinitionAPI#getGroupId
  81. * @description Gets the slot group ID.
  82. * @private
  83. *
  84. * @return {String} Slot group ID
  85. */
  86. SlotDefinitionAPI.prototype.getGroupId = function getGroupId() {};
  87. /**
  88. * @function SlotDefinitionAPI#getRole
  89. * @description Gets the slot role.
  90. * @private
  91. *
  92. * @return {String} Slot role
  93. */
  94. SlotDefinitionAPI.prototype.getRole = function getRole() {};
  95. /**
  96. * @function SlotDefinitionAPI#isHiden
  97. * @description Checks whether the slot is hidden or not.
  98. * @private
  99. *
  100. * @return {boolean} Returns true if slot is hidden, otherwise false.
  101. */
  102. SlotDefinitionAPI.prototype.isHidden = function isHidden() {};
  103. /**
  104. * @function SlotDefinitionAPI#isOptional
  105. * @description Checks whether the slot is optional or not.
  106. * @private
  107. *
  108. * @return {boolean} Returns true if slot is optional, otherwise false.
  109. */
  110. SlotDefinitionAPI.prototype.isOptional = function isOptional() {};
  111. /**
  112. * @function SlotDefinitionAPI#getSort
  113. * @description Gets the slot sort.
  114. * @private
  115. *
  116. * @return {String} Slot sort
  117. */
  118. SlotDefinitionAPI.prototype.getSort = function getSort() {};
  119. /**
  120. * @function SlotDefinitionAPI#getSortOrder
  121. * @description Gets the slot sort order.
  122. * @private
  123. *
  124. * @return {Number} Slot sort order represented by number
  125. */
  126. SlotDefinitionAPI.prototype.getSortOrder = function getSortOrder() {};
  127. /**
  128. * @function SlotDefinitionAPI#getAggregatedSortInfo
  129. * @description Gets aggregated and sort info used when sort on aggregated fact values.
  130. * @private
  131. *
  132. * @return {Object} clientSideAggregatedAndSortInfo object in slot definition
  133. * @example
  134. * {
  135. * clientSideAggregatedAndSortInfo:{
  136. * mappedSlotCondition:[
  137. * 'series'
  138. * ],
  139. * groupOnColumnId :'categories'
  140. * }
  141. * }
  142. */
  143. SlotDefinitionAPI.prototype.getAggregatedSortInfo = function getAggregatedSortInfo() {};
  144. /**
  145. * @function SlotDefinitionAPI#isSortable
  146. * @description Checks whether the slot is sortable or not.
  147. * @private
  148. *
  149. * @return {boolean} Returns true if slot is sortable, otherwise false.
  150. */
  151. SlotDefinitionAPI.prototype.isSortable = function isSortable() {};
  152. /**
  153. * @function SlotDefinitionAPI#isStackItems
  154. * @description Checks whether the slot can be have stacked items.
  155. * @private
  156. *
  157. * @return {boolean} Returns true if slot can have stacked items, otherwise false.
  158. */
  159. SlotDefinitionAPI.prototype.isStackItems = function isStackItems() {};
  160. /**
  161. * @function SlotDefinitionAPI#getMaxItems
  162. * @description Gets the maximum number of items allowed on a slot.
  163. * @private
  164. *
  165. * @return {Number} Maximum number of items allowed on slot
  166. */
  167. SlotDefinitionAPI.prototype.getMaxItems = function getMaxItems() {};
  168. /**
  169. * @function SlotDefinitionAPI#isMultiMeasureSupported
  170. * @description Checks whether the slot can have multiple measures.
  171. * @private
  172. *
  173. * @return {boolean} Returns true if the slot supports multiple measures, otherwise false.
  174. */
  175. SlotDefinitionAPI.prototype.isMultiMeasureSupported = function isMultiMeasureSupported() {};
  176. /**
  177. * @function SlotDefinitionAPI#isShapable
  178. * @description Check whether the slot can support graphical shapes.
  179. * @private
  180. *
  181. * @return {boolean} Returns true if the slot supports shapes, otherwise false.
  182. */
  183. SlotDefinitionAPI.prototype.isShapable = function isShapable() {};
  184. /**
  185. * @function SlotDefinitionAPI#getCoachMark
  186. * @description Gets the coach mark object for the slot.
  187. * @private
  188. *
  189. * @return {Object} Coach mark object
  190. * @example
  191. * {
  192. * titleResource: 'coachMarkTitleSpiralTarget',
  193. * contentResource: 'coachMarkContentSpiralTarget',
  194. * mappedOnly: true, // show only when the slot is mapped
  195. * showPopover: true // show popover with the coach mark
  196. * }
  197. */
  198. SlotDefinitionAPI.prototype.getCoachMark = function getCoachMark() {};
  199. /**
  200. * @function SlotDefinitionAPI#getFormat
  201. * @description Gets the slot format.
  202. * @private
  203. *
  204. * @return {Object} Slot formatting
  205. */
  206. SlotDefinitionAPI.prototype.getFormat = function getFormat() {};
  207. /**
  208. * @function SlotDefinitionAPI#getTags
  209. * @description Gets the slot tags.
  210. * Tags identify special uses for slots in a visualization and include:
  211. * 'badge' - this slot can be marked with a badge (and badge information must be requested for its items)
  212. * 'ca.dashboard.repeatHere' - This slot is the default where multiMeasure series are assigned (eg: color for a barchart).
  213. * @private
  214. *
  215. * @return {String[]} Slot tags
  216. */
  217. SlotDefinitionAPI.prototype.getTags = function getTags() {};
  218. /**
  219. * @function SlotDefinitionAPI#getDefaultFromSlot
  220. * @description Gets the slot information that should be used to default this slot.
  221. * @private
  222. * @return {DefaultFromSlot}
  223. */
  224. SlotDefinitionAPI.prototype.getDefaultFromSlot = function getDefaultFromSlot() {};
  225. /**
  226. * @function SlotDefinitionAPI#getShowRequiredMarker
  227. * @description Should the required marker be shown in the UI
  228. * @private
  229. * @returns {Boolean}
  230. */
  231. SlotDefinitionAPI.prototype.getShowRequiredMarker = function getShowRequiredMarker() {};
  232. return SlotDefinitionAPI;
  233. }();
  234. return SlotDefinitionAPI;
  235. });
  236. //# sourceMappingURL=SlotDefinitionAPI.js.map