bigbluebutton-html-plugin-sdk 0.0.21 → 0.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (243) hide show
  1. package/README.md +20 -7
  2. package/dist/cjs/core/api/BbbPluginSdk.d.ts +36 -0
  3. package/dist/cjs/core/api/BbbPluginSdk.js +86 -0
  4. package/dist/cjs/core/api/BbbPluginSdk.js.map +1 -0
  5. package/dist/cjs/core/api/types.d.ts +102 -0
  6. package/dist/cjs/{data-consumption/types/presentation.js → core/api/types.js} +1 -1
  7. package/dist/cjs/core/api/types.js.map +1 -0
  8. package/dist/cjs/core/enum.d.ts +12 -0
  9. package/dist/cjs/core/enum.js +18 -0
  10. package/dist/cjs/core/enum.js.map +1 -0
  11. package/dist/cjs/core/index.d.ts +3 -1
  12. package/dist/cjs/core/index.js +3 -15
  13. package/dist/cjs/core/index.js.map +1 -1
  14. package/dist/cjs/core/types.d.ts +33 -0
  15. package/dist/cjs/core/types.js +3 -0
  16. package/dist/cjs/core/types.js.map +1 -0
  17. package/dist/cjs/data-channel/enums.d.ts +10 -0
  18. package/dist/cjs/data-channel/enums.js +16 -0
  19. package/dist/cjs/data-channel/enums.js.map +1 -0
  20. package/dist/cjs/data-channel/hooks.d.ts +3 -0
  21. package/dist/cjs/data-channel/{useDatachannel.js → hooks.js} +13 -13
  22. package/dist/cjs/data-channel/hooks.js.map +1 -0
  23. package/dist/cjs/data-channel/index.d.ts +2 -2
  24. package/dist/cjs/data-channel/index.js +3 -16
  25. package/dist/cjs/data-channel/index.js.map +1 -1
  26. package/dist/cjs/data-channel/types.d.ts +15 -5
  27. package/dist/cjs/data-consumption/domain/presentations/current-presentation/hooks.d.ts +2 -0
  28. package/dist/cjs/data-consumption/domain/presentations/current-presentation/hooks.js +8 -0
  29. package/dist/cjs/data-consumption/domain/presentations/current-presentation/hooks.js.map +1 -0
  30. package/dist/cjs/data-consumption/{types/presentation.d.ts → domain/presentations/current-presentation/types.d.ts} +3 -1
  31. package/dist/cjs/data-consumption/domain/presentations/current-presentation/types.js +3 -0
  32. package/dist/cjs/data-consumption/domain/presentations/current-presentation/types.js.map +1 -0
  33. package/dist/cjs/data-consumption/domain/presentations/index.d.ts +1 -0
  34. package/dist/cjs/data-consumption/domain/presentations/index.js +3 -0
  35. package/dist/cjs/data-consumption/domain/presentations/index.js.map +1 -0
  36. package/dist/cjs/data-consumption/domain/shared/custom-subscription/hooks.d.ts +2 -0
  37. package/dist/cjs/data-consumption/domain/shared/custom-subscription/hooks.js +11 -0
  38. package/dist/cjs/data-consumption/domain/shared/custom-subscription/hooks.js.map +1 -0
  39. package/dist/cjs/data-consumption/domain/shared/custom-subscription/types.d.ts +9 -0
  40. package/dist/cjs/data-consumption/domain/shared/custom-subscription/types.js +3 -0
  41. package/dist/cjs/data-consumption/domain/shared/custom-subscription/types.js.map +1 -0
  42. package/dist/cjs/data-consumption/domain/shared/index.d.ts +1 -0
  43. package/dist/cjs/data-consumption/domain/shared/index.js +3 -0
  44. package/dist/cjs/data-consumption/domain/shared/index.js.map +1 -0
  45. package/dist/cjs/data-consumption/domain/users/current-user/hooks.d.ts +2 -0
  46. package/dist/cjs/data-consumption/domain/users/current-user/hooks.js +8 -0
  47. package/dist/cjs/data-consumption/domain/users/current-user/hooks.js.map +1 -0
  48. package/dist/cjs/data-consumption/domain/users/current-user/types.d.ts +8 -0
  49. package/dist/cjs/data-consumption/domain/users/current-user/types.js +3 -0
  50. package/dist/cjs/data-consumption/domain/users/current-user/types.js.map +1 -0
  51. package/dist/cjs/data-consumption/domain/users/index.d.ts +3 -0
  52. package/dist/cjs/data-consumption/domain/users/index.js +3 -0
  53. package/dist/cjs/data-consumption/domain/users/index.js.map +1 -0
  54. package/dist/cjs/data-consumption/domain/users/loaded-user-list/hooks.d.ts +2 -0
  55. package/dist/cjs/data-consumption/domain/users/loaded-user-list/hooks.js +8 -0
  56. package/dist/cjs/data-consumption/domain/users/loaded-user-list/hooks.js.map +1 -0
  57. package/dist/cjs/data-consumption/domain/users/loaded-user-list/types.d.ts +7 -0
  58. package/dist/cjs/data-consumption/domain/users/loaded-user-list/types.js +3 -0
  59. package/dist/cjs/data-consumption/domain/users/loaded-user-list/types.js.map +1 -0
  60. package/dist/cjs/data-consumption/domain/users/users-basic-info/hooks.d.ts +2 -0
  61. package/dist/cjs/data-consumption/domain/users/users-basic-info/hooks.js +8 -0
  62. package/dist/cjs/data-consumption/domain/users/users-basic-info/hooks.js.map +1 -0
  63. package/dist/cjs/data-consumption/domain/users/users-basic-info/queries.d.ts +1 -0
  64. package/dist/cjs/data-consumption/domain/users/users-basic-info/queries.js +5 -0
  65. package/dist/cjs/data-consumption/domain/users/users-basic-info/queries.js.map +1 -0
  66. package/dist/cjs/data-consumption/domain/users/users-basic-info/types.d.ts +10 -0
  67. package/dist/cjs/data-consumption/domain/users/users-basic-info/types.js +3 -0
  68. package/dist/cjs/data-consumption/domain/users/users-basic-info/types.js.map +1 -0
  69. package/dist/cjs/data-consumption/factory/hookCreator.d.ts +4 -0
  70. package/dist/cjs/data-consumption/factory/hookCreator.js +84 -0
  71. package/dist/cjs/data-consumption/factory/hookCreator.js.map +1 -0
  72. package/dist/cjs/data-consumption/index.d.ts +3 -0
  73. package/dist/cjs/data-consumption/{hooks/index.js → index.js} +3 -2
  74. package/dist/cjs/data-consumption/index.js.map +1 -0
  75. package/dist/cjs/data-consumption/utils.d.ts +6 -0
  76. package/dist/cjs/data-consumption/utils.js +25 -0
  77. package/dist/cjs/data-consumption/utils.js.map +1 -0
  78. package/dist/cjs/extensible-areas/action-button-dropdown-item/component.d.ts +30 -0
  79. package/dist/cjs/extensible-areas/action-button-dropdown-item/component.js +47 -0
  80. package/dist/cjs/extensible-areas/action-button-dropdown-item/component.js.map +1 -0
  81. package/dist/cjs/extensible-areas/action-button-dropdown-item/enums.d.ts +4 -0
  82. package/dist/cjs/extensible-areas/action-button-dropdown-item/enums.js +10 -0
  83. package/dist/cjs/extensible-areas/action-button-dropdown-item/enums.js.map +1 -0
  84. package/dist/cjs/extensible-areas/action-button-dropdown-item/index.d.ts +2 -0
  85. package/dist/cjs/extensible-areas/action-button-dropdown-item/index.js +7 -0
  86. package/dist/cjs/extensible-areas/action-button-dropdown-item/index.js.map +1 -0
  87. package/dist/cjs/extensible-areas/action-button-dropdown-item/types.d.ts +13 -0
  88. package/dist/cjs/extensible-areas/action-button-dropdown-item/types.js +3 -0
  89. package/dist/cjs/extensible-areas/action-button-dropdown-item/types.js.map +1 -0
  90. package/dist/cjs/extensible-areas/actions-bar-item/component.d.ts +38 -0
  91. package/dist/cjs/extensible-areas/actions-bar-item/component.js +56 -0
  92. package/dist/cjs/extensible-areas/actions-bar-item/component.js.map +1 -0
  93. package/dist/cjs/extensible-areas/actions-bar-item/enums.d.ts +11 -0
  94. package/dist/cjs/extensible-areas/actions-bar-item/enums.js +18 -0
  95. package/dist/cjs/extensible-areas/actions-bar-item/enums.js.map +1 -0
  96. package/dist/cjs/extensible-areas/actions-bar-item/index.d.ts +3 -0
  97. package/dist/cjs/extensible-areas/actions-bar-item/index.js +9 -0
  98. package/dist/cjs/extensible-areas/actions-bar-item/index.js.map +1 -0
  99. package/dist/cjs/extensible-areas/actions-bar-item/types.d.ts +17 -0
  100. package/dist/cjs/extensible-areas/actions-bar-item/types.js +3 -0
  101. package/dist/cjs/extensible-areas/actions-bar-item/types.js.map +1 -0
  102. package/dist/cjs/extensible-areas/audio-settings-dropdown-item/component.d.ts +36 -0
  103. package/dist/cjs/extensible-areas/audio-settings-dropdown-item/component.js +53 -0
  104. package/dist/cjs/extensible-areas/audio-settings-dropdown-item/component.js.map +1 -0
  105. package/dist/cjs/extensible-areas/audio-settings-dropdown-item/enums.d.ts +4 -0
  106. package/dist/cjs/extensible-areas/audio-settings-dropdown-item/enums.js +10 -0
  107. package/dist/cjs/extensible-areas/audio-settings-dropdown-item/enums.js.map +1 -0
  108. package/dist/cjs/extensible-areas/audio-settings-dropdown-item/index.d.ts +2 -0
  109. package/dist/cjs/extensible-areas/audio-settings-dropdown-item/index.js +7 -0
  110. package/dist/cjs/extensible-areas/audio-settings-dropdown-item/index.js.map +1 -0
  111. package/dist/cjs/extensible-areas/audio-settings-dropdown-item/types.d.ts +15 -0
  112. package/dist/cjs/extensible-areas/audio-settings-dropdown-item/types.js +3 -0
  113. package/dist/cjs/extensible-areas/audio-settings-dropdown-item/types.js.map +1 -0
  114. package/dist/cjs/extensible-areas/base.d.ts +19 -0
  115. package/dist/cjs/{data-consumption/types/user.js → extensible-areas/base.js} +1 -1
  116. package/dist/cjs/extensible-areas/base.js.map +1 -0
  117. package/dist/cjs/extensible-areas/camera-settings-dropdown-item/component.d.ts +36 -0
  118. package/dist/cjs/extensible-areas/camera-settings-dropdown-item/component.js +53 -0
  119. package/dist/cjs/extensible-areas/camera-settings-dropdown-item/component.js.map +1 -0
  120. package/dist/cjs/extensible-areas/camera-settings-dropdown-item/enums.d.ts +4 -0
  121. package/dist/cjs/extensible-areas/camera-settings-dropdown-item/enums.js +10 -0
  122. package/dist/cjs/extensible-areas/camera-settings-dropdown-item/enums.js.map +1 -0
  123. package/dist/cjs/extensible-areas/camera-settings-dropdown-item/index.d.ts +2 -0
  124. package/dist/cjs/extensible-areas/camera-settings-dropdown-item/index.js +7 -0
  125. package/dist/cjs/extensible-areas/camera-settings-dropdown-item/index.js.map +1 -0
  126. package/dist/cjs/extensible-areas/camera-settings-dropdown-item/types.d.ts +15 -0
  127. package/dist/cjs/extensible-areas/camera-settings-dropdown-item/types.js +3 -0
  128. package/dist/cjs/extensible-areas/camera-settings-dropdown-item/types.js.map +1 -0
  129. package/dist/cjs/extensible-areas/index.d.ts +11 -0
  130. package/dist/cjs/{types → extensible-areas}/index.js +11 -3
  131. package/dist/cjs/extensible-areas/index.js.map +1 -0
  132. package/dist/cjs/extensible-areas/nav-bar-item/component.d.ts +52 -0
  133. package/dist/cjs/extensible-areas/nav-bar-item/component.js +70 -0
  134. package/dist/cjs/extensible-areas/nav-bar-item/component.js.map +1 -0
  135. package/dist/cjs/extensible-areas/nav-bar-item/enums.d.ts +12 -0
  136. package/dist/cjs/extensible-areas/nav-bar-item/enums.js +19 -0
  137. package/dist/cjs/extensible-areas/nav-bar-item/enums.js.map +1 -0
  138. package/dist/cjs/extensible-areas/nav-bar-item/index.d.ts +3 -0
  139. package/dist/cjs/extensible-areas/nav-bar-item/index.js +9 -0
  140. package/dist/cjs/extensible-areas/nav-bar-item/index.js.map +1 -0
  141. package/dist/cjs/extensible-areas/nav-bar-item/types.d.ts +20 -0
  142. package/dist/cjs/extensible-areas/nav-bar-item/types.js +3 -0
  143. package/dist/cjs/extensible-areas/nav-bar-item/types.js.map +1 -0
  144. package/dist/cjs/extensible-areas/options-dropdown-item/component.d.ts +33 -0
  145. package/dist/cjs/extensible-areas/options-dropdown-item/component.js +50 -0
  146. package/dist/cjs/extensible-areas/options-dropdown-item/component.js.map +1 -0
  147. package/dist/cjs/extensible-areas/options-dropdown-item/enums.d.ts +4 -0
  148. package/dist/cjs/extensible-areas/options-dropdown-item/enums.js +10 -0
  149. package/dist/cjs/extensible-areas/options-dropdown-item/enums.js.map +1 -0
  150. package/dist/cjs/extensible-areas/options-dropdown-item/index.d.ts +2 -0
  151. package/dist/cjs/extensible-areas/options-dropdown-item/index.js +7 -0
  152. package/dist/cjs/extensible-areas/options-dropdown-item/index.js.map +1 -0
  153. package/dist/cjs/extensible-areas/options-dropdown-item/types.d.ts +15 -0
  154. package/dist/cjs/extensible-areas/options-dropdown-item/types.js +3 -0
  155. package/dist/cjs/extensible-areas/options-dropdown-item/types.js.map +1 -0
  156. package/dist/cjs/extensible-areas/presentation-dropdown-item/component.d.ts +34 -0
  157. package/dist/cjs/extensible-areas/presentation-dropdown-item/component.js +51 -0
  158. package/dist/cjs/extensible-areas/presentation-dropdown-item/component.js.map +1 -0
  159. package/dist/cjs/extensible-areas/presentation-dropdown-item/enums.d.ts +4 -0
  160. package/dist/cjs/extensible-areas/presentation-dropdown-item/enums.js +10 -0
  161. package/dist/cjs/extensible-areas/presentation-dropdown-item/enums.js.map +1 -0
  162. package/dist/cjs/extensible-areas/presentation-dropdown-item/index.d.ts +2 -0
  163. package/dist/cjs/extensible-areas/presentation-dropdown-item/index.js +7 -0
  164. package/dist/cjs/extensible-areas/presentation-dropdown-item/index.js.map +1 -0
  165. package/dist/cjs/extensible-areas/presentation-dropdown-item/types.d.ts +15 -0
  166. package/dist/cjs/extensible-areas/presentation-dropdown-item/types.js +3 -0
  167. package/dist/cjs/extensible-areas/presentation-dropdown-item/types.js.map +1 -0
  168. package/dist/cjs/extensible-areas/presentation-toolbar-item/component.d.ts +45 -0
  169. package/dist/cjs/extensible-areas/presentation-toolbar-item/component.js +68 -0
  170. package/dist/cjs/extensible-areas/presentation-toolbar-item/component.js.map +1 -0
  171. package/dist/cjs/extensible-areas/presentation-toolbar-item/enums.d.ts +5 -0
  172. package/dist/cjs/extensible-areas/presentation-toolbar-item/enums.js +11 -0
  173. package/dist/cjs/extensible-areas/presentation-toolbar-item/enums.js.map +1 -0
  174. package/dist/cjs/extensible-areas/presentation-toolbar-item/index.d.ts +2 -0
  175. package/dist/cjs/extensible-areas/presentation-toolbar-item/index.js +8 -0
  176. package/dist/cjs/extensible-areas/presentation-toolbar-item/index.js.map +1 -0
  177. package/dist/cjs/extensible-areas/presentation-toolbar-item/types.d.ts +11 -0
  178. package/dist/cjs/extensible-areas/presentation-toolbar-item/types.js +3 -0
  179. package/dist/cjs/extensible-areas/presentation-toolbar-item/types.js.map +1 -0
  180. package/dist/cjs/extensible-areas/user-camera-dropdown-item/component.d.ts +33 -0
  181. package/dist/cjs/extensible-areas/user-camera-dropdown-item/component.js +50 -0
  182. package/dist/cjs/extensible-areas/user-camera-dropdown-item/component.js.map +1 -0
  183. package/dist/cjs/extensible-areas/user-camera-dropdown-item/enums.d.ts +4 -0
  184. package/dist/cjs/extensible-areas/user-camera-dropdown-item/enums.js +10 -0
  185. package/dist/cjs/extensible-areas/user-camera-dropdown-item/enums.js.map +1 -0
  186. package/dist/cjs/extensible-areas/user-camera-dropdown-item/index.d.ts +2 -0
  187. package/dist/cjs/extensible-areas/user-camera-dropdown-item/index.js +7 -0
  188. package/dist/cjs/extensible-areas/user-camera-dropdown-item/index.js.map +1 -0
  189. package/dist/cjs/extensible-areas/user-camera-dropdown-item/types.d.ts +14 -0
  190. package/dist/cjs/extensible-areas/user-camera-dropdown-item/types.js +3 -0
  191. package/dist/cjs/extensible-areas/user-camera-dropdown-item/types.js.map +1 -0
  192. package/dist/cjs/extensible-areas/user-list-dropdown-item/component.d.ts +72 -0
  193. package/dist/cjs/extensible-areas/user-list-dropdown-item/component.js +97 -0
  194. package/dist/cjs/extensible-areas/user-list-dropdown-item/component.js.map +1 -0
  195. package/dist/cjs/extensible-areas/user-list-dropdown-item/enums.d.ts +5 -0
  196. package/dist/cjs/extensible-areas/user-list-dropdown-item/enums.js +11 -0
  197. package/dist/cjs/extensible-areas/user-list-dropdown-item/enums.js.map +1 -0
  198. package/dist/cjs/extensible-areas/user-list-dropdown-item/index.d.ts +2 -0
  199. package/dist/cjs/extensible-areas/user-list-dropdown-item/index.js +8 -0
  200. package/dist/cjs/extensible-areas/user-list-dropdown-item/index.js.map +1 -0
  201. package/dist/cjs/extensible-areas/user-list-dropdown-item/types.d.ts +30 -0
  202. package/dist/cjs/extensible-areas/user-list-dropdown-item/types.js +3 -0
  203. package/dist/cjs/extensible-areas/user-list-dropdown-item/types.js.map +1 -0
  204. package/dist/cjs/extensible-areas/user-list-item-additional-information/component.d.ts +42 -0
  205. package/dist/cjs/extensible-areas/user-list-item-additional-information/component.js +60 -0
  206. package/dist/cjs/extensible-areas/user-list-item-additional-information/component.js.map +1 -0
  207. package/dist/cjs/extensible-areas/user-list-item-additional-information/enums.d.ts +4 -0
  208. package/dist/cjs/extensible-areas/user-list-item-additional-information/enums.js +10 -0
  209. package/dist/cjs/extensible-areas/user-list-item-additional-information/enums.js.map +1 -0
  210. package/dist/cjs/extensible-areas/user-list-item-additional-information/index.d.ts +2 -0
  211. package/dist/cjs/extensible-areas/user-list-item-additional-information/index.js +7 -0
  212. package/dist/cjs/extensible-areas/user-list-item-additional-information/index.js.map +1 -0
  213. package/dist/cjs/extensible-areas/user-list-item-additional-information/types.d.ts +21 -0
  214. package/dist/cjs/extensible-areas/user-list-item-additional-information/types.js +3 -0
  215. package/dist/cjs/extensible-areas/user-list-item-additional-information/types.js.map +1 -0
  216. package/dist/cjs/index.d.ts +2 -3
  217. package/dist/cjs/index.js +2 -3
  218. package/dist/cjs/index.js.map +1 -1
  219. package/package.json +6 -3
  220. package/dist/cjs/core/getPluginApi.d.ts +0 -4
  221. package/dist/cjs/core/getPluginApi.js +0 -40
  222. package/dist/cjs/core/getPluginApi.js.map +0 -1
  223. package/dist/cjs/data-channel/useDatachannel.d.ts +0 -4
  224. package/dist/cjs/data-channel/useDatachannel.js.map +0 -1
  225. package/dist/cjs/data-consumption/hooks/index.d.ts +0 -2
  226. package/dist/cjs/data-consumption/hooks/index.js.map +0 -1
  227. package/dist/cjs/data-consumption/hooks/presentation.d.ts +0 -3
  228. package/dist/cjs/data-consumption/hooks/presentation.js +0 -28
  229. package/dist/cjs/data-consumption/hooks/presentation.js.map +0 -1
  230. package/dist/cjs/data-consumption/hooks/user.d.ts +0 -4
  231. package/dist/cjs/data-consumption/hooks/user.js +0 -50
  232. package/dist/cjs/data-consumption/hooks/user.js.map +0 -1
  233. package/dist/cjs/data-consumption/types/presentation.js.map +0 -1
  234. package/dist/cjs/data-consumption/types/user.d.ts +0 -62
  235. package/dist/cjs/data-consumption/types/user.js.map +0 -1
  236. package/dist/cjs/enums.d.ts +0 -79
  237. package/dist/cjs/enums.js +0 -111
  238. package/dist/cjs/enums.js.map +0 -1
  239. package/dist/cjs/types/common.d.ts +0 -392
  240. package/dist/cjs/types/common.js +0 -372
  241. package/dist/cjs/types/common.js.map +0 -1
  242. package/dist/cjs/types/index.d.ts +0 -3
  243. package/dist/cjs/types/index.js.map +0 -1
package/README.md CHANGED
@@ -6,21 +6,34 @@ SDK for developing BigBlueButton plugins, examples of implementations can be fou
6
6
 
7
7
  ## API
8
8
  ### Extensible UI areas
9
- - Presentation toolbar items (button, separator, spinner)
10
-
11
- - User list dropdown items (option, separator)
12
-
13
9
  - Action bar items (button, separator)
14
10
 
15
11
  - Action Button Dropdown Items (option, separator)
16
12
 
17
13
  - Audio settings dropdown items (option, separator)
18
14
 
15
+ - Camera settings dropdown items (option, separator)
16
+
17
+ - Nav bar items (button, info)
18
+
19
19
  - Presentation dropdown items (option, separator)
20
20
 
21
- - Nav bar (button, info)
21
+ - Presentation toolbar items (button, separator, spinner)
22
+
23
+ - User camera settings dropdown items (option, separator)
24
+
25
+ - User list dropdown items (option, separator)
26
+
27
+ - User list item additional information (item, label)
22
28
 
23
29
  ### Realtime data consumption
24
- - `useCurrentPresentation` hook: provides information regarding the current presentation.
30
+ - `useCurrentPresentation` hook: provides information regarding the current presentation;
31
+
32
+ - `useLoadedUserList` hook: provides information regarding the loaded user list (displayed in the screen);
33
+
34
+ - `useCurrentUser` hook: provides information regarding the current user;
35
+
36
+ - `useUsersBasicInfo` hook: provides information regarding all users (only crucial information: userId, name and role);
25
37
 
26
- - `useLoadedUserList` hook: provides information regarding the loaded user list (displayed in the screen)
38
+ ### Real time data exchange
39
+ - `useDataChannel` hook: this will allow you to exchange information (Send and receive) amongst different users through the same plugin;
@@ -0,0 +1,36 @@
1
+ import { PluginApi } from './types';
2
+ /**
3
+ * Class responsible for either initialize or get the PluginApi
4
+ *
5
+ * This PluginApi, is the object with which the developer can control
6
+ * things in the plugin, such as the extensible areas or the hooks
7
+ *
8
+ */
9
+ export declare abstract class BbbPluginSdk {
10
+ /**
11
+ * Method responsible for initializing the hooks use it from the plugin-side if you are using
12
+ * one of the hooks, see complete list in the README.md
13
+ *
14
+ * @remarks
15
+ * This method is part of the BbbPluginSdk abstract class.
16
+ *
17
+ * @param uuid - The UUID generated by the html5 in which the developer can get with
18
+ * `document.currentScript?.getAttribute('uuid')` see any sample
19
+ *
20
+ */
21
+ static initialize(uuid: string): void;
22
+ /**
23
+ * Returns the PluginApi. Use the PluginApi to access the hooks or setters functions for all the
24
+ * extensible areas. For a complete list of those, see README.md
25
+ *
26
+ * @param uuid - The UUID generated by the html5 in which the developer can get with
27
+ * `document.currentScript?.getAttribute('uuid')` see any sample.
28
+ *
29
+ * @param pluginName - The PluginName given by the html5 in which the developer can get with
30
+ * `document.currentScript?.getAttribute('pluginName')` see any sample.
31
+ *
32
+ * @returns The PluginApi object
33
+ *
34
+ */
35
+ static getPluginApi(uuid: string, pluginName?: string): PluginApi;
36
+ }
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BbbPluginSdk = void 0;
4
+ var hooks_1 = require("../../data-channel/hooks");
5
+ var hooks_2 = require("../../data-consumption/domain/presentations/current-presentation/hooks");
6
+ var hooks_3 = require("../../data-consumption/domain/shared/custom-subscription/hooks");
7
+ var hooks_4 = require("../../data-consumption/domain/users/loaded-user-list/hooks");
8
+ var hooks_5 = require("../../data-consumption/domain/users/current-user/hooks");
9
+ var hooks_6 = require("../../data-consumption/domain/users/users-basic-info/hooks");
10
+ /**
11
+ * Class responsible for either initialize or get the PluginApi
12
+ *
13
+ * This PluginApi, is the object with which the developer can control
14
+ * things in the plugin, such as the extensible areas or the hooks
15
+ *
16
+ */
17
+ var BbbPluginSdk = /** @class */ (function () {
18
+ function BbbPluginSdk() {
19
+ }
20
+ /**
21
+ * Method responsible for initializing the hooks use it from the plugin-side if you are using
22
+ * one of the hooks, see complete list in the README.md
23
+ *
24
+ * @remarks
25
+ * This method is part of the BbbPluginSdk abstract class.
26
+ *
27
+ * @param uuid - The UUID generated by the html5 in which the developer can get with
28
+ * `document.currentScript?.getAttribute('uuid')` see any sample
29
+ *
30
+ */
31
+ BbbPluginSdk.initialize = function (uuid) {
32
+ var pluginApi = window.bbb_plugins[uuid];
33
+ pluginApi.useCustomSubscription = (function (query, variablesObjectWrapper) { return (0, hooks_3.useCustomSubscription)(query, variablesObjectWrapper); });
34
+ pluginApi.useCurrentPresentation = (function () { return (0, hooks_2.useCurrentPresentation)(); });
35
+ pluginApi.useLoadedUserList = (function () { return (0, hooks_4.useLoadedUserList)(); });
36
+ pluginApi.useCurrentUser = (function () { return (0, hooks_5.useCurrentUser)(); });
37
+ pluginApi.useUsersBasicInfo = (function () { return (0, hooks_6.useUsersBasicInfo)(); });
38
+ var pluginName = pluginApi === null || pluginApi === void 0 ? void 0 : pluginApi.pluginName;
39
+ if (pluginName) {
40
+ pluginApi.useDataChannel = (function (channelName) { return (0, hooks_1.useDataChannel)(channelName, pluginName, window.bbb_plugins[uuid]); });
41
+ }
42
+ else {
43
+ throw new Error('Plugin name not set');
44
+ }
45
+ };
46
+ /**
47
+ * Returns the PluginApi. Use the PluginApi to access the hooks or setters functions for all the
48
+ * extensible areas. For a complete list of those, see README.md
49
+ *
50
+ * @param uuid - The UUID generated by the html5 in which the developer can get with
51
+ * `document.currentScript?.getAttribute('uuid')` see any sample.
52
+ *
53
+ * @param pluginName - The PluginName given by the html5 in which the developer can get with
54
+ * `document.currentScript?.getAttribute('pluginName')` see any sample.
55
+ *
56
+ * @returns The PluginApi object
57
+ *
58
+ */
59
+ BbbPluginSdk.getPluginApi = function (uuid, pluginName) {
60
+ if (!window.bbb_plugins)
61
+ window.bbb_plugins = {};
62
+ if (Object.keys(window.bbb_plugins).indexOf(uuid) === -1) {
63
+ window.bbb_plugins[uuid] = {
64
+ setUserListDropdownItems: function () { },
65
+ setPresentationToolbarItems: function () { },
66
+ setActionButtonDropdownItems: function () { },
67
+ setActionsBarItems: function () { },
68
+ setAudioSettingsDropdownItems: function () { },
69
+ setPresentationDropdownItems: function () { },
70
+ setNavBarItems: function () { },
71
+ setOptionsDropdownItems: function () { },
72
+ setCameraSettingsDropdownItems: function () { },
73
+ setUserCameraDropdownItems: function () { },
74
+ setUserListItemAdditionalInformation: function () { },
75
+ mapOfDispatchers: {
76
+ '': function () { },
77
+ },
78
+ pluginName: pluginName,
79
+ };
80
+ }
81
+ return window.bbb_plugins[uuid];
82
+ };
83
+ return BbbPluginSdk;
84
+ }());
85
+ exports.BbbPluginSdk = BbbPluginSdk;
86
+ //# sourceMappingURL=BbbPluginSdk.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BbbPluginSdk.js","sourceRoot":"","sources":["../../../../src/core/api/BbbPluginSdk.ts"],"names":[],"mappings":";;;AAoBA,kDAA0D;AAC1D,gGAEgF;AAChF,wFAEwE;AACxE,oFAA+F;AAC/F,gFAAwF;AACxF,oFAA+F;AAI/F;;;;;;GAMG;AACH;IAAA;IAuEA,CAAC;IAtEC;;;;;;;;;;OAUG;IACW,uBAAU,GAAxB,UAAyB,IAAY;QACnC,IAAM,SAAS,GAAc,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACtD,SAAS,CAAC,qBAAqB,GAAG,CAAC,UACjC,KAAa,EACb,sBAAsD,IACnD,OAAA,IAAA,6BAAqB,EAAC,KAAK,EAAE,sBAAsB,CAAC,EAApD,CAAoD,CAAkC,CAAC;QAC5F,SAAS,CAAC,sBAAsB,GAAG,CACjC,cAAM,OAAA,IAAA,8BAAsB,GAAE,EAAxB,CAAwB,CAAmC,CAAC;QACpE,SAAS,CAAC,iBAAiB,GAAG,CAAC,cAAM,OAAA,IAAA,yBAAiB,GAAE,EAAnB,CAAmB,CAA8B,CAAC;QACvF,SAAS,CAAC,cAAc,GAAG,CAAC,cAAM,OAAA,IAAA,sBAAc,GAAE,EAAhB,CAAgB,CAA2B,CAAC;QAC9E,SAAS,CAAC,iBAAiB,GAAG,CAAC,cAAM,OAAA,IAAA,yBAAiB,GAAE,EAAnB,CAAmB,CAA8B,CAAC;QACvF,IAAM,UAAU,GAAG,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,UAAU,CAAC;QACzC,IAAI,UAAU,EAAE;YACd,SAAS,CAAC,cAAc,GAAG,CAAC,UAC1B,WAAmB,IAChB,OAAA,IAAA,sBAAc,EAAC,WAAW,EAAE,UAAU,EAAE,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,EAAjE,CAAiE,CAChC,CAAC;SACxC;aAAM;YACL,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;SACxC;IACH,CAAC;IAED;;;;;;;;;;;;OAYG;IACW,yBAAY,GAA1B,UAA2B,IAAY,EAAE,UAAmB;QAC1D,IAAI,CAAC,MAAM,CAAC,WAAW;YAAE,MAAM,CAAC,WAAW,GAAG,EAAE,CAAC;QACjD,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE;YACxD,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG;gBACzB,wBAAwB,EAAE,cAAO,CAAC;gBAClC,2BAA2B,EAAE,cAAO,CAAC;gBACrC,4BAA4B,EAAE,cAAO,CAAC;gBACtC,kBAAkB,EAAE,cAAO,CAAC;gBAC5B,6BAA6B,EAAE,cAAO,CAAC;gBACvC,4BAA4B,EAAE,cAAO,CAAC;gBACtC,cAAc,EAAE,cAAO,CAAC;gBACxB,uBAAuB,EAAE,cAAO,CAAC;gBACjC,8BAA8B,EAAE,cAAO,CAAC;gBACxC,0BAA0B,EAAE,cAAO,CAAC;gBACpC,oCAAoC,EAAE,cAAO,CAAC;gBAC9C,gBAAgB,EAAE;oBAChB,EAAE,EAAE,cAAO,CAAC;iBACb;gBACD,UAAU,YAAA;aACX,CAAC;SACH;QAED,OAAO,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAClC,CAAC;IACH,mBAAC;AAAD,CAAC,AAvED,IAuEC;AAvEqB,oCAAY"}
@@ -0,0 +1,102 @@
1
+ import { ActionButtonDropdownItem } from '../../extensible-areas/action-button-dropdown-item/types';
2
+ import { ActionsBarItem } from '../../extensible-areas/actions-bar-item/types';
3
+ import { AudioSettingsDropdownItem } from '../../extensible-areas/audio-settings-dropdown-item/types';
4
+ import { CameraSettingsDropdownItem } from '../../extensible-areas/camera-settings-dropdown-item/types';
5
+ import { NavBarItem } from '../../extensible-areas/nav-bar-item/types';
6
+ import { OptionsDropdownItem } from '../../extensible-areas/options-dropdown-item/types';
7
+ import { PresentationDropdownItem } from '../../extensible-areas/presentation-dropdown-item/types';
8
+ import { UserCameraDropdownItem } from '../../extensible-areas/user-camera-dropdown-item/types';
9
+ import { UserListDropdownItem } from '../../extensible-areas/user-list-dropdown-item/types';
10
+ import { UserListItemAdditionalInformation } from '../../extensible-areas/user-list-item-additional-information/types';
11
+ import { PresentationToolbarItem } from '../../extensible-areas/presentation-toolbar-item/types';
12
+ import { UseCurrentPresentationFunction } from '../../data-consumption/domain/presentations/current-presentation/types';
13
+ import { UseLoadedUserListFunction } from '../../data-consumption/domain/users/loaded-user-list/types';
14
+ import { UseCurrentUserFunction } from '../../data-consumption/domain/users/current-user/types';
15
+ import { UseUsersBasicInfoFunction } from '../../data-consumption/domain/users/users-basic-info/types';
16
+ import { UseCustomSubscriptionFunction } from '../../data-consumption/domain/shared/custom-subscription/types';
17
+ import { MapOfDispatchers, UseDataChannelFunctionFromPluginApi } from '../../data-channel/types';
18
+ export type SetPresentationToolbarItems = (presentationToolbarItem: PresentationToolbarItem[]) => void;
19
+ export type SetUserListDropdownItems = (userListDropdownItem: UserListDropdownItem[]) => void;
20
+ export type SetActionButtonDropdownItems = (actionButtonDropdownItem: ActionButtonDropdownItem[]) => void;
21
+ export type SetActionsBarItems = (actionsBarItems: ActionsBarItem[]) => void;
22
+ export type SetAudioSettingsDropdownItems = (audioSettingsDropdownItem: AudioSettingsDropdownItem[]) => void;
23
+ export type SetPresentationDropdownItems = (userListDropdownItem: PresentationDropdownItem[]) => void;
24
+ export type SetNavBarItems = (userListDropdownItem: NavBarItem[]) => void;
25
+ export type SetOptionsDropdownItems = (optionsDropdownItem: OptionsDropdownItem[]) => void;
26
+ export type SetCameraSettingsDropdownItems = (cameraSettingsDropdownItem: CameraSettingsDropdownItem[]) => void;
27
+ export type SetUserCameraDropdownItems = (userCameraDropdownItem: UserCameraDropdownItem[]) => void;
28
+ export type SetUserListItemAdditionalInformation = (userListItemAdditionalInformation: UserListItemAdditionalInformation[]) => void;
29
+ /**
30
+ * Object that makes plugin hooks and extensible area setters available for developers to use.
31
+ */
32
+ export interface PluginApi {
33
+ pluginName?: string;
34
+ setPresentationToolbarItems: SetPresentationToolbarItems;
35
+ setUserListDropdownItems: SetUserListDropdownItems;
36
+ setActionButtonDropdownItems: SetActionButtonDropdownItems;
37
+ setActionsBarItems: SetActionsBarItems;
38
+ setAudioSettingsDropdownItems: SetAudioSettingsDropdownItems;
39
+ setPresentationDropdownItems: SetPresentationDropdownItems;
40
+ setNavBarItems: SetNavBarItems;
41
+ setOptionsDropdownItems: SetOptionsDropdownItems;
42
+ setCameraSettingsDropdownItems: SetCameraSettingsDropdownItems;
43
+ setUserCameraDropdownItems: SetUserCameraDropdownItems;
44
+ setUserListItemAdditionalInformation: SetUserListItemAdditionalInformation;
45
+ /**
46
+ * Returns an object containing the data on the current presentation being displayed
47
+ * in the presentation area, and its current page.
48
+ *
49
+ * @returns `GraphqlResponseWrapper` with the CurrentPresentation in the `data` field
50
+ *
51
+ */
52
+ useCurrentPresentation?: UseCurrentPresentationFunction;
53
+ /**
54
+ * Returns an object containing the data on the currently loaded user list (
55
+ * the one being displayed in that moment).
56
+ *
57
+ * @returns `GraphqlResponseWrapper` with the LoadedUserList type.
58
+ *
59
+ */
60
+ useLoadedUserList?: UseLoadedUserListFunction;
61
+ /**
62
+ * Returns an object containing the data on the current user, i.e. the user on which the
63
+ * plugin is running.
64
+ *
65
+ * @returns `GraphqlResponseWrapper` with the CurrentUser type.
66
+ *
67
+ */
68
+ useCurrentUser?: UseCurrentUserFunction;
69
+ /**
70
+ * Returns an object containing the brief data on every user in te meeting.
71
+ *
72
+ * @returns `GraphqlResponseWrapper` with the UserBasicInfo type.
73
+ *
74
+ */
75
+ useUsersBasicInfo?: UseUsersBasicInfoFunction;
76
+ /**
77
+ * Returns an object containing the data on the current presentation being displayed
78
+ * in the presentation area, and its current page.
79
+ *
80
+ * @returns `GraphqlResponseWrapper` with the data type specified in the generic type.
81
+ *
82
+ */
83
+ useCustomSubscription?: UseCustomSubscriptionFunction;
84
+ /**
85
+ * Returns an array with tha data wrapped in the `GraphqlResponseWrapper` in the first
86
+ * position of the array and the dispatcher function in which one plugin can inform
87
+ * the others.
88
+ *
89
+ * This is used for the different plugins in the meeting to communicate.
90
+ *
91
+ * @param channelName - the channel name in which you want to communicate
92
+ * @returns The array of data wrapped in the `GraphqlResponseWrapper` and the dispatcher function
93
+ *
94
+ */
95
+ useDataChannel?: UseDataChannelFunctionFromPluginApi;
96
+ mapOfDispatchers: MapOfDispatchers;
97
+ }
98
+ export interface PluginBrowserWindow extends Window {
99
+ bbb_plugins: {
100
+ [key: string]: PluginApi;
101
+ };
102
+ }
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=presentation.js.map
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/core/api/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
1
+ export declare enum HookEvents {
2
+ UPDATED = "HOOK_DATA_UPDATED",
3
+ SUBSCRIBED = "PLUGIN_SUBSCRIBED_TO_HOOK",
4
+ UNSUBSCRIBED = "PLUGIN_UNSUBSCRIBED_FROM_HOOK"
5
+ }
6
+ export declare enum Hooks {
7
+ CURRENT_PRESENTATION = "Hooks::UseCurrentPresentation",
8
+ LOADED_USER_LIST = "Hooks::UseLoadedUserList",
9
+ CURRENT_USER = "Hooks::UseCurrentUser",
10
+ CUSTOM_SUBSCRIPTION = "Hooks::CustomSubscription",
11
+ DATA_CHANNEL = "Hooks::DataChannel"
12
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Hooks = exports.HookEvents = void 0;
4
+ var HookEvents;
5
+ (function (HookEvents) {
6
+ HookEvents["UPDATED"] = "HOOK_DATA_UPDATED";
7
+ HookEvents["SUBSCRIBED"] = "PLUGIN_SUBSCRIBED_TO_HOOK";
8
+ HookEvents["UNSUBSCRIBED"] = "PLUGIN_UNSUBSCRIBED_FROM_HOOK";
9
+ })(HookEvents || (exports.HookEvents = HookEvents = {}));
10
+ var Hooks;
11
+ (function (Hooks) {
12
+ Hooks["CURRENT_PRESENTATION"] = "Hooks::UseCurrentPresentation";
13
+ Hooks["LOADED_USER_LIST"] = "Hooks::UseLoadedUserList";
14
+ Hooks["CURRENT_USER"] = "Hooks::UseCurrentUser";
15
+ Hooks["CUSTOM_SUBSCRIPTION"] = "Hooks::CustomSubscription";
16
+ Hooks["DATA_CHANNEL"] = "Hooks::DataChannel";
17
+ })(Hooks || (exports.Hooks = Hooks = {}));
18
+ //# sourceMappingURL=enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enum.js","sourceRoot":"","sources":["../../../src/core/enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,UAIX;AAJD,WAAY,UAAU;IACpB,2CAA6B,CAAA;IAC7B,sDAAwC,CAAA;IACxC,4DAA8C,CAAA;AAChD,CAAC,EAJW,UAAU,0BAAV,UAAU,QAIrB;AAED,IAAY,KAMX;AAND,WAAY,KAAK;IACf,+DAAsD,CAAA;IACtD,sDAA6C,CAAA;IAC7C,+CAAsC,CAAA;IACtC,0DAAiD,CAAA;IACjD,4CAAmC,CAAA;AACrC,CAAC,EANW,KAAK,qBAAL,KAAK,QAMhB"}
@@ -1 +1,3 @@
1
- export * from './getPluginApi';
1
+ export { BbbPluginSdk } from './api/BbbPluginSdk';
2
+ export { PluginApi } from './api/types';
3
+ export { GraphqlResponseWrapper } from './types';
@@ -1,18 +1,6 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
2
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./getPluginApi"), exports);
3
+ exports.BbbPluginSdk = void 0;
4
+ var BbbPluginSdk_1 = require("./api/BbbPluginSdk");
5
+ Object.defineProperty(exports, "BbbPluginSdk", { enumerable: true, get: function () { return BbbPluginSdk_1.BbbPluginSdk; } });
18
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/index.ts"],"names":[],"mappings":";;;AAAA,mDAAkD;AAAzC,4GAAA,YAAY,OAAA"}
@@ -0,0 +1,33 @@
1
+ import { ApolloError } from '@apollo/client';
2
+ import { CustomSubscriptionArguments } from '../data-consumption/domain/shared/custom-subscription/types';
3
+ import { Hooks } from './enum';
4
+ import { DataChannelArguments } from '../data-channel/types';
5
+ /**
6
+ * Wrapper for the data that comes from the core. With this more complex object
7
+ * it is also possible to know whether the data is still loading, of even if something
8
+ * wrong happened.
9
+ *
10
+ * @typeParam TData - Data that the developer will be expecting from the core.
11
+ */
12
+ export interface GraphqlResponseWrapper<TData> {
13
+ loading: boolean;
14
+ data?: TData;
15
+ error?: ApolloError;
16
+ }
17
+ export type HookArguments = CustomSubscriptionArguments | DataChannelArguments;
18
+ export interface UpdatedEventDetails<T> {
19
+ hook: Hooks;
20
+ hookArguments?: HookArguments;
21
+ data: T;
22
+ }
23
+ export interface SubscribedEventDetails {
24
+ hook: Hooks;
25
+ hookArguments?: HookArguments;
26
+ }
27
+ export interface UnsubscribedEventDetails {
28
+ hook: Hooks;
29
+ hookArguments?: HookArguments;
30
+ }
31
+ export interface HookEventWrapper<T> extends Event {
32
+ detail: UpdatedEventDetails<T> | SubscribedEventDetails | UnsubscribedEventDetails;
33
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/core/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Enum for each role in possible for a user to assume in the meeting
3
+ * The developer can specify them when dispatching data with the dispatcher function
4
+ * returned from the `pluginApi.useChannel`.
5
+ */
6
+ export declare enum DataChannelDispatcherUserRole {
7
+ PRESENTER = "PRESENTER",
8
+ MODERATOR = "MODERATOR",
9
+ VIEWER = "VIEWER"
10
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DataChannelDispatcherUserRole = void 0;
4
+ // Role
5
+ /**
6
+ * Enum for each role in possible for a user to assume in the meeting
7
+ * The developer can specify them when dispatching data with the dispatcher function
8
+ * returned from the `pluginApi.useChannel`.
9
+ */
10
+ var DataChannelDispatcherUserRole;
11
+ (function (DataChannelDispatcherUserRole) {
12
+ DataChannelDispatcherUserRole["PRESENTER"] = "PRESENTER";
13
+ DataChannelDispatcherUserRole["MODERATOR"] = "MODERATOR";
14
+ DataChannelDispatcherUserRole["VIEWER"] = "VIEWER";
15
+ })(DataChannelDispatcherUserRole || (exports.DataChannelDispatcherUserRole = DataChannelDispatcherUserRole = {}));
16
+ //# sourceMappingURL=enums.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enums.js","sourceRoot":"","sources":["../../../src/data-channel/enums.ts"],"names":[],"mappings":";;;AAAA,OAAO;AACP;;;;GAIG;AACH,IAAY,6BAIX;AAJD,WAAY,6BAA6B;IACvC,wDAAuB,CAAA;IACvB,wDAAuB,CAAA;IACvB,kDAAiB,CAAA;AACnB,CAAC,EAJW,6BAA6B,6CAA7B,6BAA6B,QAIxC"}
@@ -0,0 +1,3 @@
1
+ import { UseDataChannelStaticFunction } from './types';
2
+ export declare const createChannelIdentifier: (channelName: string, pluginName: string) => string;
3
+ export declare const useDataChannel: UseDataChannelStaticFunction;
@@ -2,15 +2,16 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.useDataChannel = exports.createChannelIdentifier = void 0;
4
4
  var react_1 = require("react");
5
- var index_1 = require("../index");
5
+ var enum_1 = require("../core/enum");
6
6
  var createChannelIdentifier = function (channelName, pluginName) { return "".concat(channelName, "::").concat(pluginName); };
7
7
  exports.createChannelIdentifier = createChannelIdentifier;
8
- var useDataChannel = (function (channelName, pluginName, pluginApi) {
9
- var _a = (0, react_1.useState)(), data = _a[0], setData = _a[1];
8
+ exports.useDataChannel = (function (channelName, pluginName, pluginApi) {
9
+ var _a = (0, react_1.useState)({ loading: true }), data = _a[0], setData = _a[1];
10
10
  var _b = (0, react_1.useState)(), dispatcherFunction = _b[0], setDispatcherFunction = _b[1];
11
- var channelIdentifier = createChannelIdentifier(channelName, pluginName);
11
+ var channelIdentifier = (0, exports.createChannelIdentifier)(channelName, pluginName);
12
12
  var handleDataChange = (function (customEvent) {
13
- setData(customEvent.detail.data);
13
+ var eventDetail = customEvent.detail;
14
+ setData(eventDetail.data);
14
15
  });
15
16
  var handleListenToChangeDisPatcherFunction = (function () {
16
17
  setDispatcherFunction(function () { return pluginApi.mapOfDispatchers[channelIdentifier]; });
@@ -19,17 +20,17 @@ var useDataChannel = (function (channelName, pluginName, pluginApi) {
19
20
  (0, react_1.useEffect)(function () {
20
21
  window.addEventListener(channelIdentifier, handleDataChange);
21
22
  window.addEventListener("".concat(channelIdentifier, "::dispatcherFunction"), handleListenToChangeDisPatcherFunction);
22
- window.dispatchEvent(new CustomEvent(index_1.Internal.BbbHookEvents.Subscribe, {
23
+ window.dispatchEvent(new CustomEvent(enum_1.HookEvents.SUBSCRIBED, {
23
24
  detail: {
24
- hook: index_1.Internal.BbbDataChannel.UseDataChannel,
25
- parameters: { channelName: channelName, pluginName: pluginName },
25
+ hook: enum_1.Hooks.DATA_CHANNEL,
26
+ hookArguments: { channelName: channelName, pluginName: pluginName },
26
27
  },
27
28
  }));
28
29
  return function () {
29
- window.dispatchEvent(new CustomEvent(index_1.Internal.BbbHookEvents.Unsubscribe, {
30
+ window.dispatchEvent(new CustomEvent(enum_1.HookEvents.UNSUBSCRIBED, {
30
31
  detail: {
31
- hook: index_1.Internal.BbbDataChannel.UseDataChannel,
32
- parameters: { channelName: channelName, pluginName: pluginName },
32
+ hook: enum_1.Hooks.DATA_CHANNEL,
33
+ hookArguments: { channelName: channelName, pluginName: pluginName },
33
34
  },
34
35
  }));
35
36
  window.removeEventListener(channelIdentifier, handleDataChange);
@@ -37,5 +38,4 @@ var useDataChannel = (function (channelName, pluginName, pluginApi) {
37
38
  }, []);
38
39
  return [data, dispatcherFunction];
39
40
  });
40
- exports.useDataChannel = useDataChannel;
41
- //# sourceMappingURL=useDatachannel.js.map
41
+ //# sourceMappingURL=hooks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../src/data-channel/hooks.ts"],"names":[],"mappings":";;;AAAA,+BAA4C;AAQ5C,qCAEsB;AAMf,IAAM,uBAAuB,GAAG,UAAC,WAAmB,EAAE,UAAkB,IAAK,OAAA,UAAG,WAAW,eAAK,UAAU,CAAE,EAA/B,CAA+B,CAAC;AAAvG,QAAA,uBAAuB,2BAAgF;AAEvG,QAAA,cAAc,GAAG,CAAC,UAAI,WAAmB,EACpD,UAAkB,EAAE,SAAoB;IAElC,IAAA,KAAkB,IAAA,gBAAQ,EAA4B,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAvE,IAAI,QAAA,EAAE,OAAO,QAA0D,CAAC;IACzE,IAAA,KAA8C,IAAA,gBAAQ,GAAsB,EAA3E,kBAAkB,QAAA,EAAE,qBAAqB,QAAkC,CAAC;IAEnF,IAAM,iBAAiB,GAAG,IAAA,+BAAuB,EAAC,WAAW,EAAE,UAAU,CAAC,CAAC;IAE3E,IAAM,gBAAgB,GAAkB,CAAC,UACvC,WAAwD;QAExD,IAAM,WAAW,GAAG,WAAW,CAAC,MAAwD,CAAC;QACzF,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC,CAAkB,CAAC;IAEpB,IAAM,sCAAsC,GAAkB,CAC5D;QACE,qBAAqB,CAAC,cAAM,OAAA,SAAS,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,EAA7C,CAA6C,CAAC,CAAC;QAC3E,MAAM,CAAC,mBAAmB,CACxB,UAAG,iBAAiB,yBAAsB,EAC1C,sCAAsC,CACvC,CAAC;IACJ,CAAC,CAAkB,CAAC;IACtB,IAAA,iBAAS,EAAC;QACR,MAAM,CAAC,gBAAgB,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,CAAC;QAC7D,MAAM,CAAC,gBAAgB,CACrB,UAAG,iBAAiB,yBAAsB,EAC1C,sCAAsC,CACvC,CAAC;QAEF,MAAM,CAAC,aAAa,CAAC,IAAI,WAAW,CAAyB,iBAAU,CAAC,UAAU,EAAE;YAClF,MAAM,EAAE;gBACN,IAAI,EAAE,YAAK,CAAC,YAAY;gBACxB,aAAa,EAAE,EAAE,WAAW,aAAA,EAAE,UAAU,YAAA,EAAE;aAC3C;SACF,CAAC,CAAC,CAAC;QACJ,OAAO;YACL,MAAM,CAAC,aAAa,CAAC,IAAI,WAAW,CAA2B,iBAAU,CAAC,YAAY,EAAE;gBACtF,MAAM,EAAE;oBACN,IAAI,EAAE,YAAK,CAAC,YAAY;oBACxB,aAAa,EAAE,EAAE,WAAW,aAAA,EAAE,UAAU,YAAA,EAAE;iBAC3C;aACF,CAAC,CAAC,CAAC;YACJ,MAAM,CAAC,mBAAmB,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,CAAC;QAClE,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,OAAO,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC;AACpC,CAAC,CAAiC,CAAC"}
@@ -1,2 +1,2 @@
1
- export * from './types';
2
- export * from './useDatachannel';
1
+ export { DataChannelDispatcherUserRole } from './enums';
2
+ export { ToUserId, ToRole } from './types';
@@ -1,19 +1,6 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
2
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./types"), exports);
18
- __exportStar(require("./useDatachannel"), exports);
3
+ exports.DataChannelDispatcherUserRole = void 0;
4
+ var enums_1 = require("./enums");
5
+ Object.defineProperty(exports, "DataChannelDispatcherUserRole", { enumerable: true, get: function () { return enums_1.DataChannelDispatcherUserRole; } });
19
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/data-channel/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,mDAAiC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/data-channel/index.ts"],"names":[],"mappings":";;;AAAA,iCAAwD;AAA/C,sHAAA,6BAA6B,OAAA"}
@@ -1,15 +1,25 @@
1
- import { PluginApi, Role } from '..';
1
+ import { GraphqlResponseWrapper, PluginApi } from '..';
2
+ import { DataChannelDispatcherUserRole } from './enums';
3
+ export interface DataChannelArguments {
4
+ pluginName: string;
5
+ channelName: string;
6
+ }
7
+ /**
8
+ * Type to specify the useId that will be able to receive the data sent in the dispatcher function.
9
+ */
2
10
  export interface ToUserId {
3
11
  userId: string;
4
12
  }
13
+ /**
14
+ * Type to specify the role that will be able to receive the data sent in the dispatcher function.
15
+ */
5
16
  export interface ToRole {
6
- role: Role;
17
+ role: DataChannelDispatcherUserRole;
7
18
  }
8
19
  export type ObjectTo = ToUserId | ToRole;
9
20
  export type DispatcherFunction = <T>(objectToDispatch: T, objectsTo?: ObjectTo[]) => void;
10
21
  export interface MapOfDispatchers {
11
22
  [key: string]: DispatcherFunction;
12
23
  }
13
- export type UseDataChannel = <T>(channelName: string) => [T, DispatcherFunction];
14
- export type UseDataChannelAuxiliary = <T>(channelName: string, pluginName: string, pluginApi: PluginApi) => [T, DispatcherFunction?];
15
- export type UseDataChannelAPi = <T>(channelName: string) => [T, DispatcherFunction?];
24
+ export type UseDataChannelFunctionFromPluginApi = <T>(channelName: string) => [GraphqlResponseWrapper<T>, DispatcherFunction];
25
+ export type UseDataChannelStaticFunction = <T>(channelName: string, pluginName: string, pluginApi: PluginApi) => [GraphqlResponseWrapper<T>, DispatcherFunction?];
@@ -0,0 +1,2 @@
1
+ import { CurrentPresentation } from './types';
2
+ export declare const useCurrentPresentation: () => import("../../../..").GraphqlResponseWrapper<CurrentPresentation>;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useCurrentPresentation = void 0;
4
+ var enum_1 = require("../../../../core/enum");
5
+ var hookCreator_1 = require("../../../factory/hookCreator");
6
+ var useCurrentPresentation = function () { return (0, hookCreator_1.createDataConsumptionHook)(enum_1.Hooks.CURRENT_PRESENTATION); };
7
+ exports.useCurrentPresentation = useCurrentPresentation;
8
+ //# sourceMappingURL=hooks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../../../../src/data-consumption/domain/presentations/current-presentation/hooks.ts"],"names":[],"mappings":";;;AAAA,8CAE+B;AAI/B,4DAAyE;AAElE,IAAM,sBAAsB,GAAG,cAAM,OAAA,IAAA,uCAAyB,EACnE,YAAK,CAAC,oBAAoB,CAC3B,EAF2C,CAE3C,CAAC;AAFW,QAAA,sBAAsB,0BAEjC"}
@@ -1,3 +1,4 @@
1
+ import { GraphqlResponseWrapper } from '../../../../core';
1
2
  export interface CurrentPresentationPageUrls {
2
3
  thumbnail: string;
3
4
  png: string;
@@ -7,9 +8,10 @@ export interface CurrentPresentationPageUrls {
7
8
  export interface CurrentPresentationPage {
8
9
  id: string;
9
10
  num: number;
10
- urls: CurrentPresentationPageUrls;
11
+ urlsJson: CurrentPresentationPageUrls;
11
12
  }
12
13
  export interface CurrentPresentation {
13
14
  presentationId: string;
14
15
  currentPage: CurrentPresentationPage;
15
16
  }
17
+ export type UseCurrentPresentationFunction = () => GraphqlResponseWrapper<CurrentPresentation>;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../src/data-consumption/domain/presentations/current-presentation/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export { CurrentPresentation } from './current-presentation/types';
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/data-consumption/domain/presentations/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import { UseCustomSubscriptionFunction } from './types';
2
+ export declare const useCustomSubscription: UseCustomSubscriptionFunction;