bigbluebutton-html-plugin-sdk 0.1.4 → 0.1.5

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 (171) hide show
  1. package/README.md +70 -35
  2. package/dist/cjs/core/api/BbbPluginSdk.d.ts +1 -1
  3. package/dist/cjs/core/api/BbbPluginSdk.js +7 -4
  4. package/dist/cjs/core/api/BbbPluginSdk.js.map +1 -1
  5. package/dist/cjs/core/api/types.d.ts +16 -4
  6. package/dist/cjs/core/auxiliary/plugin-information/locale-messages/types.d.ts +1 -4
  7. package/dist/cjs/core/auxiliary/plugin-information/locale-messages/useLocaleMessages.js +81 -39
  8. package/dist/cjs/core/auxiliary/plugin-information/locale-messages/useLocaleMessages.js.map +1 -1
  9. package/dist/cjs/core/auxiliary/plugin-information/locale-messages/utils.d.ts +3 -0
  10. package/dist/cjs/core/auxiliary/plugin-information/locale-messages/utils.js +72 -0
  11. package/dist/cjs/core/auxiliary/plugin-information/locale-messages/utils.js.map +1 -0
  12. package/dist/cjs/core/utils/hooks.d.ts +1 -0
  13. package/dist/cjs/core/utils/hooks.js +13 -0
  14. package/dist/cjs/core/utils/hooks.js.map +1 -0
  15. package/dist/cjs/data-channel/enums.d.ts +1 -1
  16. package/dist/cjs/data-channel/enums.js +1 -1
  17. package/dist/cjs/data-consumption/domain/settings/plugin-settings/hooks.d.ts +2 -5
  18. package/dist/cjs/data-consumption/domain/settings/plugin-settings/hooks.js.map +1 -1
  19. package/dist/cjs/data-consumption/domain/settings/plugin-settings/types.d.ts +2 -0
  20. package/dist/cjs/data-consumption/domain/settings/plugin-settings/utils.d.ts +2 -7
  21. package/dist/cjs/data-consumption/domain/settings/plugin-settings/utils.js.map +1 -1
  22. package/dist/cjs/extensible-areas/actions-bar-item/component.d.ts +14 -8
  23. package/dist/cjs/extensible-areas/actions-bar-item/component.js +32 -10
  24. package/dist/cjs/extensible-areas/actions-bar-item/component.js.map +1 -1
  25. package/dist/cjs/extensible-areas/actions-bar-item/types.d.ts +18 -1
  26. package/dist/cjs/extensible-areas/audio-settings-dropdown-item/component.d.ts +4 -1
  27. package/dist/cjs/extensible-areas/audio-settings-dropdown-item/component.js +4 -1
  28. package/dist/cjs/extensible-areas/audio-settings-dropdown-item/component.js.map +1 -1
  29. package/dist/cjs/extensible-areas/audio-settings-dropdown-item/types.d.ts +1 -0
  30. package/dist/cjs/extensible-areas/base.d.ts +2 -2
  31. package/dist/cjs/extensible-areas/camera-settings-dropdown-item/component.d.ts +3 -1
  32. package/dist/cjs/extensible-areas/camera-settings-dropdown-item/component.js +4 -1
  33. package/dist/cjs/extensible-areas/camera-settings-dropdown-item/component.js.map +1 -1
  34. package/dist/cjs/extensible-areas/camera-settings-dropdown-item/types.d.ts +1 -0
  35. package/dist/cjs/extensible-areas/index.d.ts +1 -1
  36. package/dist/cjs/extensible-areas/index.js +1 -1
  37. package/dist/cjs/extensible-areas/index.js.map +1 -1
  38. package/dist/cjs/extensible-areas/media-area-item/component.d.ts +42 -0
  39. package/dist/cjs/extensible-areas/media-area-item/component.js +61 -0
  40. package/dist/cjs/extensible-areas/media-area-item/component.js.map +1 -0
  41. package/dist/cjs/extensible-areas/media-area-item/enums.d.ts +4 -0
  42. package/dist/cjs/extensible-areas/media-area-item/enums.js +10 -0
  43. package/dist/cjs/extensible-areas/media-area-item/enums.js.map +1 -0
  44. package/dist/cjs/extensible-areas/media-area-item/index.d.ts +2 -0
  45. package/dist/cjs/extensible-areas/media-area-item/index.js +7 -0
  46. package/dist/cjs/extensible-areas/media-area-item/index.js.map +1 -0
  47. package/dist/cjs/extensible-areas/media-area-item/types.d.ts +15 -0
  48. package/dist/cjs/extensible-areas/media-area-item/types.js.map +1 -0
  49. package/dist/cjs/extensible-areas/presentation-toolbar-item/component.d.ts +3 -1
  50. package/dist/cjs/extensible-areas/presentation-toolbar-item/component.js +3 -1
  51. package/dist/cjs/extensible-areas/presentation-toolbar-item/component.js.map +1 -1
  52. package/dist/cjs/extensible-areas/presentation-toolbar-item/types.d.ts +1 -0
  53. package/dist/cjs/index.d.ts +1 -1
  54. package/dist/cjs/index.js +1 -1
  55. package/dist/cjs/index.js.map +1 -1
  56. package/dist/cjs/ui-data/domain/chat/form/enums.js.map +1 -0
  57. package/dist/cjs/ui-data/domain/chat/form/types.js.map +1 -0
  58. package/dist/cjs/ui-data/domain/chat/index.js.map +1 -0
  59. package/dist/cjs/ui-data/domain/external-video/index.js.map +1 -0
  60. package/dist/cjs/ui-data/domain/external-video/volume/enums.js.map +1 -0
  61. package/dist/cjs/ui-data/domain/external-video/volume/types.js.map +1 -0
  62. package/dist/cjs/ui-data/domain/intl/index.js.map +1 -0
  63. package/dist/cjs/ui-data/domain/intl/locale/enums.js.map +1 -0
  64. package/dist/cjs/ui-data/domain/intl/locale/types.js.map +1 -0
  65. package/dist/cjs/ui-data/domain/layout/index.d.ts +1 -0
  66. package/dist/cjs/ui-data/domain/layout/index.js +7 -0
  67. package/dist/cjs/ui-data/domain/layout/index.js.map +1 -0
  68. package/dist/cjs/{ui-data-hooks → ui-data/domain}/layout/presentation-area/enums.d.ts +1 -1
  69. package/dist/cjs/{ui-data-hooks → ui-data/domain}/layout/presentation-area/enums.js +5 -5
  70. package/dist/cjs/ui-data/domain/layout/presentation-area/enums.js.map +1 -0
  71. package/dist/cjs/{ui-data-hooks → ui-data/domain}/layout/presentation-area/types.d.ts +2 -2
  72. package/dist/cjs/ui-data/domain/layout/presentation-area/types.js.map +1 -0
  73. package/dist/cjs/ui-data/domain/presentation/index.d.ts +1 -0
  74. package/dist/cjs/ui-data/domain/presentation/index.js +6 -0
  75. package/dist/cjs/ui-data/domain/presentation/index.js.map +1 -0
  76. package/dist/cjs/ui-data/domain/presentation/presentation-area/enums.d.ts +3 -0
  77. package/dist/cjs/ui-data/domain/presentation/presentation-area/enums.js +8 -0
  78. package/dist/cjs/ui-data/domain/presentation/presentation-area/enums.js.map +1 -0
  79. package/dist/cjs/ui-data/domain/presentation/presentation-area/types.d.ts +6 -0
  80. package/dist/cjs/ui-data/domain/presentation/presentation-area/types.js.map +1 -0
  81. package/dist/cjs/ui-data/domain/user-list/enums.js.map +1 -0
  82. package/dist/cjs/ui-data/domain/user-list/index.js.map +1 -0
  83. package/dist/cjs/ui-data/domain/user-list/types.js +4 -0
  84. package/dist/cjs/ui-data/domain/user-list/types.js.map +1 -0
  85. package/dist/cjs/ui-data/getters/consts.d.ts +1 -0
  86. package/dist/cjs/ui-data/getters/consts.js +5 -0
  87. package/dist/cjs/ui-data/getters/consts.js.map +1 -0
  88. package/dist/cjs/ui-data/getters/getters.d.ts +2 -0
  89. package/dist/cjs/ui-data/getters/getters.js +65 -0
  90. package/dist/cjs/ui-data/getters/getters.js.map +1 -0
  91. package/dist/cjs/ui-data/getters/types.d.ts +2 -0
  92. package/dist/cjs/ui-data/getters/types.js.map +1 -0
  93. package/dist/cjs/ui-data/hooks/consts.js.map +1 -0
  94. package/dist/cjs/{ui-data-hooks → ui-data/hooks}/hooks.d.ts +1 -1
  95. package/dist/cjs/{ui-data-hooks → ui-data/hooks}/hooks.js +10 -1
  96. package/dist/cjs/ui-data/hooks/hooks.js.map +1 -0
  97. package/dist/cjs/ui-data/hooks/types.d.ts +2 -0
  98. package/dist/cjs/ui-data/hooks/types.js +3 -0
  99. package/dist/cjs/ui-data/hooks/types.js.map +1 -0
  100. package/dist/cjs/ui-data/index.d.ts +7 -0
  101. package/dist/cjs/{ui-data-hooks → ui-data}/index.js +6 -5
  102. package/dist/cjs/ui-data/index.js.map +1 -0
  103. package/dist/cjs/ui-data/types.d.ts +11 -0
  104. package/dist/cjs/ui-data/types.js +3 -0
  105. package/dist/cjs/{ui-data-hooks → ui-data}/types.js.map +1 -1
  106. package/package.json +12 -3
  107. package/dist/cjs/core/auxiliary/plugin-information/locale-messages/subscriptions.d.ts +0 -2
  108. package/dist/cjs/core/auxiliary/plugin-information/locale-messages/subscriptions.js +0 -6
  109. package/dist/cjs/core/auxiliary/plugin-information/locale-messages/subscriptions.js.map +0 -1
  110. package/dist/cjs/extensible-areas/action-button-dropdown-item/component.d.ts +0 -30
  111. package/dist/cjs/extensible-areas/action-button-dropdown-item/component.js +0 -50
  112. package/dist/cjs/extensible-areas/action-button-dropdown-item/component.js.map +0 -1
  113. package/dist/cjs/extensible-areas/action-button-dropdown-item/enums.d.ts +0 -4
  114. package/dist/cjs/extensible-areas/action-button-dropdown-item/enums.js +0 -10
  115. package/dist/cjs/extensible-areas/action-button-dropdown-item/enums.js.map +0 -1
  116. package/dist/cjs/extensible-areas/action-button-dropdown-item/index.d.ts +0 -2
  117. package/dist/cjs/extensible-areas/action-button-dropdown-item/index.js +0 -7
  118. package/dist/cjs/extensible-areas/action-button-dropdown-item/index.js.map +0 -1
  119. package/dist/cjs/extensible-areas/action-button-dropdown-item/types.d.ts +0 -14
  120. package/dist/cjs/extensible-areas/action-button-dropdown-item/types.js.map +0 -1
  121. package/dist/cjs/ui-data-hooks/chat/form/enums.js.map +0 -1
  122. package/dist/cjs/ui-data-hooks/chat/form/types.js.map +0 -1
  123. package/dist/cjs/ui-data-hooks/chat/index.js.map +0 -1
  124. package/dist/cjs/ui-data-hooks/consts.js.map +0 -1
  125. package/dist/cjs/ui-data-hooks/external-video/index.js.map +0 -1
  126. package/dist/cjs/ui-data-hooks/external-video/volume/enums.js.map +0 -1
  127. package/dist/cjs/ui-data-hooks/external-video/volume/types.js.map +0 -1
  128. package/dist/cjs/ui-data-hooks/hooks.js.map +0 -1
  129. package/dist/cjs/ui-data-hooks/index.d.ts +0 -6
  130. package/dist/cjs/ui-data-hooks/index.js.map +0 -1
  131. package/dist/cjs/ui-data-hooks/intl/index.js.map +0 -1
  132. package/dist/cjs/ui-data-hooks/intl/locale/enums.js.map +0 -1
  133. package/dist/cjs/ui-data-hooks/intl/locale/types.js.map +0 -1
  134. package/dist/cjs/ui-data-hooks/layout/index.d.ts +0 -1
  135. package/dist/cjs/ui-data-hooks/layout/index.js +0 -7
  136. package/dist/cjs/ui-data-hooks/layout/index.js.map +0 -1
  137. package/dist/cjs/ui-data-hooks/layout/presentation-area/enums.js.map +0 -1
  138. package/dist/cjs/ui-data-hooks/layout/presentation-area/types.js.map +0 -1
  139. package/dist/cjs/ui-data-hooks/types.d.ts +0 -11
  140. package/dist/cjs/ui-data-hooks/user-list/enums.js.map +0 -1
  141. package/dist/cjs/ui-data-hooks/user-list/index.js.map +0 -1
  142. package/dist/cjs/ui-data-hooks/user-list/types.js.map +0 -1
  143. /package/dist/cjs/extensible-areas/{action-button-dropdown-item → media-area-item}/types.js +0 -0
  144. /package/dist/cjs/{ui-data-hooks → ui-data/domain}/chat/form/enums.d.ts +0 -0
  145. /package/dist/cjs/{ui-data-hooks → ui-data/domain}/chat/form/enums.js +0 -0
  146. /package/dist/cjs/{ui-data-hooks → ui-data/domain}/chat/form/types.d.ts +0 -0
  147. /package/dist/cjs/{ui-data-hooks → ui-data/domain}/chat/form/types.js +0 -0
  148. /package/dist/cjs/{ui-data-hooks → ui-data/domain}/chat/index.d.ts +0 -0
  149. /package/dist/cjs/{ui-data-hooks → ui-data/domain}/chat/index.js +0 -0
  150. /package/dist/cjs/{ui-data-hooks → ui-data/domain}/external-video/index.d.ts +0 -0
  151. /package/dist/cjs/{ui-data-hooks → ui-data/domain}/external-video/index.js +0 -0
  152. /package/dist/cjs/{ui-data-hooks → ui-data/domain}/external-video/volume/enums.d.ts +0 -0
  153. /package/dist/cjs/{ui-data-hooks → ui-data/domain}/external-video/volume/enums.js +0 -0
  154. /package/dist/cjs/{ui-data-hooks → ui-data/domain}/external-video/volume/types.d.ts +0 -0
  155. /package/dist/cjs/{ui-data-hooks → ui-data/domain}/external-video/volume/types.js +0 -0
  156. /package/dist/cjs/{ui-data-hooks → ui-data/domain}/intl/index.d.ts +0 -0
  157. /package/dist/cjs/{ui-data-hooks → ui-data/domain}/intl/index.js +0 -0
  158. /package/dist/cjs/{ui-data-hooks → ui-data/domain}/intl/locale/enums.d.ts +0 -0
  159. /package/dist/cjs/{ui-data-hooks → ui-data/domain}/intl/locale/enums.js +0 -0
  160. /package/dist/cjs/{ui-data-hooks → ui-data/domain}/intl/locale/types.d.ts +0 -0
  161. /package/dist/cjs/{ui-data-hooks → ui-data/domain}/intl/locale/types.js +0 -0
  162. /package/dist/cjs/{ui-data-hooks → ui-data/domain}/layout/presentation-area/types.js +0 -0
  163. /package/dist/cjs/{ui-data-hooks/user-list → ui-data/domain/presentation/presentation-area}/types.js +0 -0
  164. /package/dist/cjs/{ui-data-hooks → ui-data/domain}/user-list/enums.d.ts +0 -0
  165. /package/dist/cjs/{ui-data-hooks → ui-data/domain}/user-list/enums.js +0 -0
  166. /package/dist/cjs/{ui-data-hooks → ui-data/domain}/user-list/index.d.ts +0 -0
  167. /package/dist/cjs/{ui-data-hooks → ui-data/domain}/user-list/index.js +0 -0
  168. /package/dist/cjs/{ui-data-hooks → ui-data/domain}/user-list/types.d.ts +0 -0
  169. /package/dist/cjs/{ui-data-hooks → ui-data/getters}/types.js +0 -0
  170. /package/dist/cjs/{ui-data-hooks → ui-data/hooks}/consts.d.ts +0 -0
  171. /package/dist/cjs/{ui-data-hooks → ui-data/hooks}/consts.js +0 -0
package/README.md CHANGED
@@ -22,15 +22,15 @@ have a look at the READMEs in the respective [samples](samples)-folders.
22
22
 
23
23
  For development purposes you can run a plugin locally from source.
24
24
 
25
- For example if you take the [`sample-action-button-dropdown-plugin`](samples/sample-action-button-dropdown-plugin),
25
+ For example if you take the [`sample-media-area-plugin`](samples/sample-media-area-plugin),
26
26
  you do the following:
27
27
 
28
- *Running from source code with local BBB-server*
28
+ _Running from source code with local BBB-server_
29
29
 
30
30
  1. Start the development server:
31
31
 
32
32
  ```bash
33
- cd $HOME/src/bigbluebutton-html-plugin-sdk/samples/sample-action-button-dropdown-plugin
33
+ cd $HOME/src/bigbluebutton-html-plugin-sdk/samples/sample-media-area-plugin
34
34
  npm install
35
35
  npm start
36
36
  ```
@@ -41,7 +41,7 @@ you do the following:
41
41
  pluginManifests=[{"url": "http://localhost:4701/manifest.json"}]
42
42
  ```
43
43
 
44
- *Running from souce code with a remote BBB-server*
44
+ *Running from source code with a remote BBB-server*
45
45
 
46
46
  If you are running your BBB-server elsewhere, than you can't simply point the manifest URL to a local address, you'll need to either serve the built version into a CDN or serve the dev version using a service to make it public. And for the second option we'd recommend NGROK. Here are the instructions to do that:
47
47
 
@@ -89,16 +89,16 @@ And there you go, you can test it freely.
89
89
  ### Building the Plugin (Production)
90
90
 
91
91
  To build a plugin for production use
92
- (again, using the example of [`sample-action-button-dropdown-plugin`](samples/sample-action-button-dropdown-plugin)),
92
+ (again, using the example of [`sample-media-area-plugin`](samples/sample-media-area-plugin)),
93
93
  follow these steps:
94
94
 
95
95
  ```bash
96
- cd $HOME/src/bigbluebutton-html-plugin-sdk/samples/sample-action-button-dropdown-plugin
96
+ cd $HOME/src/bigbluebutton-html-plugin-sdk/samples/sample-media-area-plugin
97
97
  npm ci
98
98
  npm run build-bundle
99
99
  ```
100
100
 
101
- The above command will generate the `dist` folder, containing the bundled JavaScript file named `SampleActionButtonDropdownPlugin.js` along with the `manifest.json`.
101
+ The above command will generate the `dist` folder, containing the bundled JavaScript file named `SampleMediaAreaPlugin.js` along with the `manifest.json`.
102
102
  These files can be hosted on any HTTPS server.
103
103
 
104
104
  To use the plugin with BigBlueButton, add the plugin's `manifest.json` URL to `bigbluebutton.properties` or you can simply send it via `/create` parameter:
@@ -110,12 +110,12 @@ pluginManifests=[{"url":"<your-domain>/path/to/manifest.json"}]
110
110
  #### Hosting the Plugin on a BBB Server
111
111
 
112
112
  While the plugin can be hosted on any Server, it is also possible to host the bundled file directly on
113
- a BigBlueButton server. For that you copy `dist/SampleActionButtonDropdownPlugin.js` and `dist/manifest.json` to the folder `/var/www/bigbluebutton-default/assets/plugins/sampleActionButtonDropdownPlugin`.
114
- In this case, the your manifest URL will be `https://<your-host>/plugins/sampleActionButtonDropdownPlugin/manifest.json`.
113
+ a BigBlueButton server. For that you copy `dist/SampleMediaAreaPlugin.js` and `dist/manifest.json` to the folder `/var/www/bigbluebutton-default/assets/plugins/sampleMediaAreaPlugin`.
114
+ In this case, the your manifest URL will be `https://<your-host>/plugins/sampleMediaAreaPlugin/manifest.json`.
115
115
 
116
116
  ### Manifest Json
117
117
 
118
- Here is as complete `manifet.json` example with all possible configurations:
118
+ Here is as complete `manifest.json` example with all possible configurations:
119
119
 
120
120
  ```json
121
121
  {
@@ -132,11 +132,6 @@ Here is as complete `manifet.json` example with all possible configurations:
132
132
  ], // One can enable more data-channels to better organize client communication
133
133
  "eventPersistence": {
134
134
  "isEnabled": true, // By default it is not enabled
135
- "maximumPayloadSizeInBytes": 1024,
136
- "rateLimiting": {
137
- "messagesAllowedPerSecond": 10,
138
- "messagesAllowedPerMinute": 20
139
- }
140
135
  },
141
136
  "remoteDataSources": [
142
137
  {
@@ -145,12 +140,56 @@ Here is as complete `manifet.json` example with all possible configurations:
145
140
  "fetchMode": "onMeetingCreate", // Possible values: "onMeetingCreate", "onDemand"
146
141
  "permissions": ["moderator", "viewer"]
147
142
  }
143
+ ],
144
+ "settingsSchema": [
145
+ {
146
+ "name": "myJson",
147
+ "label": "myJson",
148
+ "required": true,
149
+ "defaultValue": {
150
+ "abc": 123
151
+ },
152
+ "type": "json" // Possible values: "int", "float", "string", "boolean", "json"
153
+ }
148
154
  ]
149
155
  }
150
156
  ```
151
157
 
152
158
  To better understand remote-data-sources, please, refer to [this section](#external-data-resources)
153
159
 
160
+ **settingsSchema:**
161
+
162
+ The settingsSchema serves two main purposes:
163
+
164
+ 1. **Validation:** Ensures that all required settings are provided for a plugin. If any required setting is missing, the plugin will not load.
165
+ 2. **Configuration Exposure:** Lists all available settings for the plugin, enabling external systems—such as a Learning Management System (LMS)—to present these settings to a meeting organizer. This allows the organizer to configure the plugin manually before the meeting begins.
166
+
167
+ | **Name** | **Required** | **Description** |
168
+ | -------------- | ------------ | -------------------------------------------------------------------------------------------------------------- |
169
+ | `name` | Yes | The name of the setting as defined in the YAML file |
170
+ | `label` | No | A user-facing label that appears in the integration UI |
171
+ | `required` | Yes | Indicates whether this setting must be provided (`true` or `false`) |
172
+ | `defaultValue` | No | The default value to use if no setting is explicitly defined |
173
+ | `type` | Yes | The expected data type for the setting. Possible values: `"int"`, `"float"`, `"string"`, `"boolean"`, `"json"` |
174
+
175
+ **Example**
176
+
177
+ Given the `settingsSchema` defined in the `manifest.json` seen, the corresponding YAML configuration file (`/etc/bigbluebutton/bbb-html5.yml`) would look like:
178
+
179
+ ```yml
180
+ public:
181
+ plugins:
182
+ - name: MyPlugin
183
+ settings:
184
+ myJson:
185
+ abc: my123
186
+ def: 3234
187
+ ```
188
+
189
+ ## Testing SDK
190
+
191
+ To setup and run the automated tests for the plugin SDK samples, check the [testing doc](/tests/README.md)
192
+
154
193
  ## API
155
194
 
156
195
  ### Extensible UI areas
@@ -166,7 +205,7 @@ pluginApi.setterFunctionExample([{
166
205
  }])
167
206
  ```
168
207
 
169
- See, it is basicaly a function that requires an array as an argument, with which the more items you push to that array, the more of that extensible area you will have.
208
+ See, it is basically a function that requires an array as an argument, with which the more items you push to that array, the more of that extensible area you will have.
170
209
 
171
210
  That being said, here are the extensible areas we have so far:
172
211
 
@@ -176,6 +215,7 @@ That being said, here are the extensible areas we have so far:
176
215
  - Audio settings dropdown items (option, separator)
177
216
  - Camera settings dropdown items (option, separator)
178
217
  - Options settings dropdown items (option, separator)
218
+ - Media Area Items (option, separator)
179
219
  - Nav bar items (button, info)
180
220
  - Presentation dropdown items (option, separator)
181
221
  - Presentation toolbar items (button, separator, spinner)
@@ -189,7 +229,7 @@ That being said, here are the extensible areas we have so far:
189
229
 
190
230
  Mind that no plugin will interfere into another's extensible area. So feel free to set whatever you need into a certain plugin with no worries.
191
231
 
192
- ### Auxiliar functions:
232
+ ### Auxiliary functions:
193
233
 
194
234
  - `getSessionToken`: returns the user session token located on the user's URL.
195
235
  - `getJoinUrl`: returns the join url associated with the parameters passed as an argument. Since it fetches the BigBlueButton API, this getter method is asynchronous.
@@ -204,7 +244,7 @@ Mind that no plugin will interfere into another's extensible area. So feel free
204
244
  - `useLoadedChatMessages` hook: provides information regarding the loaded chat messages;
205
245
  - `useCustomSubscription` hook: with this hook, the developer can query pretty much anything graphql can provide. Note: Make sure that, on BBB version change, the custom subscriptions you make will work as expected.
206
246
  - `usePluginSettings` hook: it provides all the specific settings regarding the current plugin it's been loaded from.
207
- - `useTalkingIndicator` hook: it gives you invormation on the user-voice data, that is, who is talking or muted.
247
+ - `useTalkingIndicator` hook: it gives you information on the user-voice data, that is, who is talking or muted.
208
248
  - `useMeeting` hook: it gives you information on the current meeting that the user is on.
209
249
 
210
250
  So for these types of hooks, the return will follow the same structure:
@@ -225,8 +265,8 @@ So we have the `data`, which is different for each hook, that's why it's a gener
225
265
 
226
266
  So for this hook to read the data from the data channel, the developer will be able to choose the format in which they want it.The possible formats are described down below:
227
267
 
228
- - ALL_ITEMS: Fetches all items from specific data-channel and specific subchannel-name since the begining of the meeting from the newest to the latest (It can be used as a history);
229
- - LATEST_ITEM: Fetches only the latest item pushed to the data-channel within a specific subchannel-name since the begining of the meeting;
268
+ - ALL_ITEMS: Fetches all items from specific data-channel and specific subchannel-name since the beginning of the meeting from the newest to the latest (It can be used as a history);
269
+ - LATEST_ITEM: Fetches only the latest item pushed to the data-channel within a specific subchannel-name since the beginning of the meeting;
230
270
  - NEW_ITEMS: Fetches the new items pushed to the data-channel within a specific subchannel-name since the moment that the `useDataChannel` hook has been called (It will not see entries sent previous to that moment);
231
271
 
232
272
  An interesting thing about this hook is that it is generic, so, you can use a custom type, and this will be found not only in the consumer part of the data structure returned, but also in functions in which you need to specify an object to be persisted, meaning it will force the object to be of the type you mentioned previously (that is the case for `pushEntry` and `replaceEntry`). One can find examples of usage of this in the data-channel plugin sample or most of the official ones. The syntax is described below:
@@ -236,10 +276,10 @@ const {
236
276
  data: response, // Data that will be returned
237
277
  pushEntry: pushEntryFunction, // Function to push another item to the data-channel
238
278
  deleteEntry: deleteEntryFunction, // Function to delete specific item or wipe all
239
- replaceEntry: replaceEntryFunction, // Function replace a specifi item
279
+ replaceEntry: replaceEntryFunction, // Function replace a specific item
240
280
  } = useDataChannel<CustomType>(
241
281
  channelName, // Defined according to what is on manifest.json
242
- DataChannelTypes.All_ITEMS, // | LATEST_ITEM | NEW_ITEMS -> ALL_ITEMS is default
282
+ DataChannelTypes.ALL_ITEMS, // | LATEST_ITEM | NEW_ITEMS -> ALL_ITEMS is default
243
283
  subChannelName = 'default', // If no subchannelName is specified, it will be 'default'
244
284
  );
245
285
  ```
@@ -285,14 +325,14 @@ export type ObjectTo = ToUserId | ToRole;
285
325
 
286
326
  ### Real time ui data consumption
287
327
 
288
- - `useUiData` hook: This will return certain data from the UI depending on the parameter the developer uses. It works just like the useUiEvent hook, but instead of passing a callback as a parameter to be run everytime the event occurs, it will return the data directly, keep in mind that the second parameter is the default value that this function will assume. Possible choices:
328
+ - `useUiData` hook: This will return certain data from the UI depending on the parameter the developer uses. It works just like the useUiEvent hook, but instead of passing a callback as a parameter to be run every time the event occurs, it will return the data directly, keep in mind that the second parameter is the default value that this function will assume. Possible choices:
289
329
  - IntlLocaleUiDataNames.CURRENT_LOCALE;
290
330
  - ChatFormUiDataNames.CURRENT_CHAT_INPUT_TEXT;
291
331
  - ChatFormUiDataNames.CHAT_INPUT_IS_FOCUSED;
292
332
  - ExternalVideoVolumeUiDataNames.CURRENT_VOLUME_VALUE;
293
333
  - ExternalVideoVolumeUiDataNames.IS_VOLUME_MUTED;
294
334
  - UserListUiDataNames.USER_LIST_IS_OPEN;
295
- - LayoutPresentatioAreaUiDataNames.CURRENT_ELEMENT;
335
+ - LayoutPresentationAreaUiDataNames.CURRENT_ELEMENT;
296
336
 
297
337
  Example of usage:
298
338
 
@@ -410,9 +450,9 @@ Going through each parameter to better understand it's structure:
410
450
 
411
451
  - `name`: It is the name of the remote data source, that is the name you'll use later on in the plugin when developing it;
412
452
  - `url`: The Url to which the data will be fetched (it can be hard-coded in the `manifest.json`, but we recommend passing it as a `meta_` parameter);
413
- - `fetchMode`: It tells the plugin-server if it should fetch the data only when creating the meeting, or everytime the function is called in the plugin portion;
414
- - If one chooses `onMeetingCreate`, the data will be fetched when the create endpoint of the meeting is called, then it's cached in the plugin-server so that everytime the plugin wants that data, the plugin-server will respond with the cached data;
415
- - On the other hand, if `onDemand` is selected, everytime the plugin calls this method, the plugin-server will fetch the data and then proxy it to the plugin;
453
+ - `fetchMode`: It tells the plugin-server if it should fetch the data only when creating the meeting, or every time the function is called in the plugin portion;
454
+ - If one chooses `onMeetingCreate`, the data will be fetched when the create endpoint of the meeting is called, then it's cached in the plugin-server so that every time the plugin wants that data, the plugin-server will respond with the cached data;
455
+ - On the other hand, if `onDemand` is selected, every time the plugin calls this method, the plugin-server will fetch the data and then proxy it to the plugin;
416
456
  - `permissions`: This tells the back-end which role of the meeting can access this remote data;
417
457
 
418
458
  Here is the `/create` parameters you would have to pass to make this remote-data-source api work:
@@ -448,7 +488,7 @@ This feature is mainly used for security purposes, see [external data section](#
448
488
 
449
489
  ### Event persistence
450
490
 
451
- This feature will allow the developer to save an information (which is basically an event) in the `event.xml` file of the meeting if it's being recorded.
491
+ This feature will allow the developer to save an information (an event) in the `event.xml` file of the meeting, if it's being recorded.
452
492
 
453
493
  To use it, one first need to add the following lines to their `manifest.json`:
454
494
 
@@ -457,11 +497,6 @@ To use it, one first need to add the following lines to their `manifest.json`:
457
497
  // ...rest of manifest configuration
458
498
  "eventPersistence": {
459
499
  "isEnabled": true,
460
- "maximumPayloadSizeInBytes": 1024,
461
- "rateLimiting": {
462
- "messagesAllowedPerSecond": 10,
463
- "messagesAllowedPerMinute": 20
464
- }
465
500
  }
466
501
  }
467
502
  ```
@@ -530,13 +565,13 @@ See example below:
530
565
  // All set from this plugin will disappear from the UI;
531
566
  ```
532
567
 
533
- **How to propperly build a plugin?**
568
+ **How to properly build a plugin?**
534
569
  Just go to your plugin folder, install dependencies and run the build command as follows:
535
570
 
536
571
  ```bash
537
572
  cd my-plugin-folder/
538
573
  npm i
539
- npm run build-bundl
574
+ npm run build-bundle
540
575
  ```
541
576
 
542
577
  At this point, another folder will be created into the plugin directory called "dist/" inside of that folder you will find the plugin itself `MyPlugin.js`. Remember that the name of this file will be the same as defined in the `webpack.config.js`, such as:
@@ -33,5 +33,5 @@ export declare abstract class BbbPluginSdk {
33
33
  * @returns The PluginApi object
34
34
  *
35
35
  */
36
- static getPluginApi(uuid: string, pluginName?: string): PluginApi;
36
+ static getPluginApi(uuid: string, pluginName?: string, localesBaseUrl?: string): PluginApi;
37
37
  }
@@ -22,13 +22,14 @@ var hooks_7 = require("../../data-consumption/domain/chat/loaded-chat-messages/h
22
22
  var hooks_8 = require("../../dom-element-manipulation/chat/message/hooks");
23
23
  var hooks_9 = require("../../dom-element-manipulation/user-camera/hooks");
24
24
  var hooks_10 = require("../../data-consumption/domain/user-voice/talking-indicator/hooks");
25
- var hooks_11 = require("../../ui-data-hooks/hooks");
25
+ var hooks_11 = require("../../ui-data/hooks/hooks");
26
26
  var hooks_12 = require("../../data-consumption/domain/meeting/from-core/hooks");
27
27
  var commands_2 = require("../../server-commands/commands");
28
28
  var hooks_13 = require("../../learning-analytics-dashboard/hooks");
29
29
  var utils_1 = require("../../remote-data/utils");
30
30
  var hooks_14 = require("../../event-persistence/hooks");
31
31
  var useLocaleMessages_1 = __importDefault(require("../auxiliary/plugin-information/locale-messages/useLocaleMessages"));
32
+ var getters_1 = require("../../ui-data/getters/getters");
32
33
  /**
33
34
  * Class responsible for either initialize or get the PluginApi
34
35
  *
@@ -67,11 +68,12 @@ var BbbPluginSdk = /** @class */ (function () {
67
68
  pluginApi.useUserCameraDomElements = function (streamIds) { return (0, hooks_9.useUserCameraDomElements)(streamIds, uuid); };
68
69
  pluginApi.uiCommands = commands_1.uiCommands;
69
70
  pluginApi.useUiData = hooks_11.useUiData;
71
+ pluginApi.getUiData = getters_1.getUiData;
70
72
  var pluginName = pluginApi === null || pluginApi === void 0 ? void 0 : pluginApi.pluginName;
71
73
  pluginApi.useShouldUnmountPlugin = hook_1.default;
72
74
  if (pluginName) {
73
75
  pluginApi.useDataChannel = (function (channelName, dataChannelType, subChannelName) {
74
- if (dataChannelType === void 0) { dataChannelType = enums_1.DataChannelTypes.All_ITEMS; }
76
+ if (dataChannelType === void 0) { dataChannelType = enums_1.DataChannelTypes.ALL_ITEMS; }
75
77
  if (subChannelName === void 0) { subChannelName = 'default'; }
76
78
  return (0, hooks_1.useDataChannelGeneral)(channelName, subChannelName, pluginName, window.bbb_plugins[uuid], dataChannelType);
77
79
  });
@@ -113,14 +115,14 @@ var BbbPluginSdk = /** @class */ (function () {
113
115
  * @returns The PluginApi object
114
116
  *
115
117
  */
116
- BbbPluginSdk.getPluginApi = function (uuid, pluginName) {
118
+ BbbPluginSdk.getPluginApi = function (uuid, pluginName, localesBaseUrl) {
117
119
  if (!window.bbb_plugins)
118
120
  window.bbb_plugins = {};
119
121
  if (Object.keys(window.bbb_plugins).indexOf(uuid) === -1) {
120
122
  window.bbb_plugins[uuid] = {
121
123
  setUserListDropdownItems: function () { return []; },
122
124
  setPresentationToolbarItems: function () { return []; },
123
- setActionButtonDropdownItems: function () { return []; },
125
+ setMediaAreaItems: function () { return []; },
124
126
  setActionsBarItems: function () { return []; },
125
127
  setAudioSettingsDropdownItems: function () { return []; },
126
128
  setAppsGalleryItems: function () { return []; },
@@ -139,6 +141,7 @@ var BbbPluginSdk = /** @class */ (function () {
139
141
  },
140
142
  getSessionToken: function () { return (0, getter_1.getSessionToken)(); },
141
143
  pluginName: pluginName,
144
+ localesBaseUrl: localesBaseUrl,
142
145
  };
143
146
  }
144
147
  return window.bbb_plugins[uuid];
@@ -1 +1 @@
1
- {"version":3,"file":"BbbPluginSdk.js","sourceRoot":"","sources":["../../../../src/core/api/BbbPluginSdk.ts"],"names":[],"mappings":";;;;;;AAAA,+BAA+B;AAC/B,+BAAkC;AAClC,0EAAsE;AAOtE,kDAA4D;AAO5D,uDAAwD;AAQxD,kDAAiE;AACjE,gGAEgF;AAChF,wFAEwE;A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;QAED,OAAO,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAClC,CAAC;IACH,mBAAC;AAAD,CAAC,AA1ID,IA0IC;AA1IqB,oCAAY"}
@@ -1,6 +1,6 @@
1
1
  import { UiCommands } from '../../ui-commands/types';
2
2
  import { UseChatMessageDomElementsFunction } from '../../dom-element-manipulation/chat/message/types';
3
- import { ActionButtonDropdownInterface } from '../../extensible-areas/action-button-dropdown-item/types';
3
+ import { MediaAreaInterface } from '../../extensible-areas/media-area-item/types';
4
4
  import { ActionsBarInterface } from '../../extensible-areas/actions-bar-item/types';
5
5
  import { AudioSettingsDropdownInterface } from '../../extensible-areas/audio-settings-dropdown-item/types';
6
6
  import { CameraSettingsDropdownInterface } from '../../extensible-areas/camera-settings-dropdown-item/types';
@@ -24,7 +24,7 @@ import { UsePluginSettingsFunction } from '../../data-consumption/domain/setting
24
24
  import { UseLoadedChatMessagesFunction } from '../../data-consumption/domain/chat/loaded-chat-messages/types';
25
25
  import { UseTalkingIndicatorFunction } from '../../data-consumption/domain/user-voice/talking-indicator/types';
26
26
  import { GenericContentInterface } from '../../extensible-areas/generic-content-item/types';
27
- import { UseUiDataFunction } from '../../ui-data-hooks/types';
27
+ import { UseUiDataFunction } from '../../ui-data/hooks/types';
28
28
  import { UseMeetingFunction } from '../../data-consumption/domain/meeting/from-core/types';
29
29
  import { ServerCommands } from '../../server-commands/types';
30
30
  import { SendGenericDataForLearningAnalyticsDashboard } from '../../learning-analytics-dashboard/types';
@@ -34,9 +34,10 @@ import { GetDataSource } from '../../remote-data/types';
34
34
  import { PersistEventFunction } from '../../event-persistence/types';
35
35
  import { UseLocaleMessagesFunction } from '../auxiliary/plugin-information/locale-messages/types';
36
36
  import { UseShouldUnmountPluginFunction } from '../auxiliary/plugin-unmount/types';
37
+ import { GetUiDataFunction } from '../../ui-data/getters/types';
37
38
  export type SetPresentationToolbarItems = (presentationToolbarItem: PresentationToolbarInterface[]) => string[];
38
39
  export type SetUserListDropdownItems = (userListDropdownItem: UserListDropdownInterface[]) => string[];
39
- export type SetActionButtonDropdownItems = (actionButtonDropdownInterface: ActionButtonDropdownInterface[]) => string[];
40
+ export type SetMediaAreaItems = (mediaAreaDropdownInterface: MediaAreaInterface[]) => string[];
40
41
  export type SetActionsBarItems = (actionsBarItems: ActionsBarInterface[]) => string[];
41
42
  export type SetAudioSettingsDropdownItems = (audioSettingsDropdownItem: AudioSettingsDropdownInterface[]) => string[];
42
43
  export type SetAppsGalleryItems = (appsGalleryItems: AppsGalleryInterface[]) => string[];
@@ -54,9 +55,10 @@ export type SetGenericContentItems = (genericContents: GenericContentInterface[]
54
55
  */
55
56
  export interface PluginApi {
56
57
  pluginName?: string;
58
+ localesBaseUrl?: string;
57
59
  setPresentationToolbarItems: SetPresentationToolbarItems;
58
60
  setUserListDropdownItems: SetUserListDropdownItems;
59
- setActionButtonDropdownItems: SetActionButtonDropdownItems;
61
+ setMediaAreaItems: SetMediaAreaItems;
60
62
  setActionsBarItems: SetActionsBarItems;
61
63
  setAudioSettingsDropdownItems: SetAudioSettingsDropdownItems;
62
64
  setAppsGalleryItems: SetAppsGalleryItems;
@@ -180,6 +182,16 @@ export interface PluginApi {
180
182
  *
181
183
  */
182
184
  useUiData?: UseUiDataFunction;
185
+ /**
186
+ * Function that returns the ui data the developer wants.
187
+ *
188
+ * @param dataName The name of ui data chosen to be returned.
189
+ *
190
+ * @returns The Promise with the UI data object according to the
191
+ * UiDataName chosen as the parameter
192
+ *
193
+ */
194
+ getUiData?: GetUiDataFunction;
183
195
  /**
184
196
  * Returns an array with the DOM elements for the chat messages.
185
197
  *
@@ -8,13 +8,10 @@ interface PluginInformationResult {
8
8
  javascriptEntrypointUrl: string;
9
9
  localesBaseUrl: string;
10
10
  }
11
- interface GraphqlResponseWrapper {
12
- plugin: PluginInformationResult[];
13
- }
14
11
  interface IntlMessages {
15
12
  loading: boolean;
16
13
  messages: Record<string, string>;
17
14
  currentLocale: string;
18
15
  }
19
16
  type UseLocaleMessagesFunction = (fetchConfigs?: RequestInit) => IntlMessages;
20
- export { UseLocaleMessagesProps, PluginInformationResult, GraphqlResponseWrapper, IntlMessages, UseLocaleMessagesFunction, };
17
+ export { UseLocaleMessagesProps, PluginInformationResult, IntlMessages, UseLocaleMessagesFunction, };
@@ -1,55 +1,97 @@
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]; } };
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
7
36
  }
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
37
  };
25
38
  Object.defineProperty(exports, "__esModule", { value: true });
26
- var React = __importStar(require("react"));
27
- var ui_data_hooks_1 = require("../../../../ui-data-hooks");
39
+ var react_1 = require("react");
40
+ var ui_data_1 = require("../../../../ui-data");
28
41
  var utils_1 = require("../../../../utils");
29
- var subscriptions_1 = require("./subscriptions");
42
+ var utils_2 = require("./utils");
30
43
  function useLocaleMessagesAuxiliary(_a) {
44
+ var _this = this;
31
45
  var pluginApi = _a.pluginApi, fetchConfigs = _a.fetchConfigs;
32
- var currentLocale = pluginApi.useUiData(ui_data_hooks_1.IntlLocaleUiDataNames.CURRENT_LOCALE, {
46
+ var currentLocale = pluginApi.useUiData(ui_data_1.IntlLocaleUiDataNames.CURRENT_LOCALE, {
33
47
  locale: 'en',
34
48
  fallbackLocale: 'en',
35
49
  });
36
- var _b = React.useState(true), loading = _b[0], setLoading = _b[1];
37
- var _c = React.useState({}), messages = _c[0], setMessages = _c[1];
38
- var pluginInformation = pluginApi.useCustomSubscription(subscriptions_1.GET_PLUGIN_INFORMATION).data;
39
- React.useEffect(function () {
40
- if (pluginInformation && pluginInformation.plugin && currentLocale.locale) {
41
- var localesBaseUrl = pluginInformation.plugin[0].localesBaseUrl;
42
- var locale = currentLocale.locale;
43
- var localeUrl_1 = "".concat(localesBaseUrl, "/").concat(locale, ".json");
44
- fetch(localeUrl_1, fetchConfigs).then(function (result) { return result.json(); }).then(function (localeMessages) {
45
- setLoading(false);
46
- setMessages(localeMessages);
47
- }).catch(function (err) {
50
+ var _b = (0, react_1.useState)(true), loading = _b[0], setLoading = _b[1];
51
+ var _c = (0, react_1.useState)({}), messages = _c[0], setMessages = _c[1];
52
+ var _d = (0, react_1.useState)(), fallbackMessages = _d[0], setFallbackMessages = _d[1];
53
+ (0, react_1.useEffect)(function () {
54
+ if ((pluginApi === null || pluginApi === void 0 ? void 0 : pluginApi.localesBaseUrl) && currentLocale.locale) {
55
+ var localesBaseUrl = pluginApi.localesBaseUrl;
56
+ var locale = currentLocale.locale, fallbackLocale = currentLocale.fallbackLocale;
57
+ var localeUrl = "".concat(localesBaseUrl, "/").concat(locale, ".json");
58
+ var fallbackLocaleUrl_1 = "".concat(localesBaseUrl, "/").concat(fallbackLocale, ".json");
59
+ utils_1.pluginLogger.info("Fetching locale [".concat(locale, "] and fallback [").concat(fallbackLocale, "] for plugin [").concat(pluginApi.pluginName, "]"));
60
+ var urlToFetchList = [
61
+ fallbackLocaleUrl_1,
62
+ ];
63
+ if (locale !== fallbackLocale)
64
+ urlToFetchList.push(localeUrl);
65
+ Promise.all(urlToFetchList.map(function (url) { return __awaiter(_this, void 0, void 0, function () {
66
+ var a, err_1;
67
+ return __generator(this, function (_a) {
68
+ switch (_a.label) {
69
+ case 0:
70
+ if (!(url !== fallbackLocaleUrl_1 || !fallbackMessages)) return [3 /*break*/, 4];
71
+ _a.label = 1;
72
+ case 1:
73
+ _a.trys.push([1, 3, , 4]);
74
+ return [4 /*yield*/, (0, utils_2.fetchLocaleAndStore)(url, fetchConfigs)];
75
+ case 2:
76
+ a = _a.sent();
77
+ return [2 /*return*/, a];
78
+ case 3:
79
+ err_1 = _a.sent();
80
+ utils_1.pluginLogger.error("[".concat(pluginApi.pluginName, "] - Something went wrong while trying to fetch [").concat(url, "] or parse its result: "), err_1);
81
+ return [2 /*return*/, Promise.resolve({})];
82
+ case 4: return [2 /*return*/, Promise.resolve(fallbackMessages)];
83
+ }
84
+ });
85
+ }); })).then(function (values) {
86
+ var desiredLocale = values[0], fallbackLocaleMessages = values[1];
87
+ setMessages((0, utils_2.mergeLocaleMessages)(desiredLocale, fallbackLocaleMessages));
88
+ if (!fallbackMessages)
89
+ setFallbackMessages(fallbackLocaleMessages);
90
+ }).finally(function () {
48
91
  setLoading(false);
49
- utils_1.pluginLogger.error("Something went wrong while trying to fetch ".concat(localeUrl_1, ": "), err);
50
92
  });
51
93
  }
52
- }, [pluginInformation, currentLocale]);
94
+ }, [currentLocale]);
53
95
  return {
54
96
  messages: messages,
55
97
  loading: loading,
@@ -1 +1 @@
1
- {"version":3,"file":"useLocaleMessages.js","sourceRoot":"","sources":["../../../../../../src/core/auxiliary/plugin-information/locale-messages/useLocaleMessages.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA+B;AAC/B,2DAAkE;AAClE,2CAAiD;AAEjD,iDAAyD;AAEzD,SAAS,0BAA0B,CACjC,EAAmD;QAAjD,SAAS,eAAA,EAAE,YA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,QAAQ,UAAA;QACR,OAAO,SAAA;QACP,aAAa,EAAE,aAAa,CAAC,MAAM;KACpC,CAAC;AACJ,CAAC;AAED,kBAAe,0BAA0B,CAAC"}
1
+ {"version":3,"file":"useLocaleMessages.js","sourceRoot":"","sources":["../../../../../../src/core/auxiliary/plugin-information/locale-messages/useLocaleMessages.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAA4C;AAC5C,+CAA4D;AAC5D,2CAAiD;AAEjD,iCAAmE;AAEnE,SAAS,0BAA0B,CACjC,EAAmD;IADrD,iBAmDC;QAlDG,SAAS,eAAA,EAAE,YAAY,kBAAA;IAEzB,IAAM,aAAa,GAAG,SAAS,CAAC,SAAU,CAAC,+BAAqB,CAAC,cAAc,EAAE;QAC/E,MAAM,EAAE,IAAI;QACZ,cAAc,EAAE,IAAI;KACrB,CAAC,CAAC;IAEG,IAAA,KAAwB,IAAA,gBAAQ,EAAC,IAAI,CAAC,EAArC,OAAO,QAAA,EAAE,UAAU,QAAkB,CAAC;IACvC,IAAA,KAA0B,IAAA,gBAAQ,EAAyB,EAAE,CAAC,EAA7D,QAAQ,QAAA,EAAE,WAAW,QAAwC,CAAC;IAC/D,IAAA,KAA0C,IAAA,gBAAQ,GAA0B,EAA3E,gBAAgB,QAAA,EAAE,mBAAmB,QAAsC,CAAC;IAEnF,IAAA,iBAAS,EAAC;QACR,IAAI,CAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,cAAc,KAAI,aAAa,CAAC,MAAM,EAAE;YAC7C,IAAA,cAAc,GAAK,SAAS,eAAd,CAAe;YAC7B,IAAA,MAAM,GAAqB,aAAa,OAAlC,EAAE,cAAc,GAAK,aAAa,eAAlB,CAAmB;YACjD,IAAM,SAAS,GAAG,UAAG,cAAc,cAAI,MAAM,UAAO,CAAC;YACrD,IAAM,mBAAiB,GAAG,UAAG,cAAc,cAAI,cAAc,UAAO,CAAC;YACrE,oBAAY,CAAC,IA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,CAAC;AAED,kBAAe,0BAA0B,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare function fetchLocaleAndStore(localeUrl: string, fetchConfigs?: RequestInit): Promise<Record<string, string>>;
2
+ declare function mergeLocaleMessages(desiredMessages: Record<string, string>, fallbackMessages: Record<string, string>): Record<string, string>;
3
+ export { fetchLocaleAndStore, mergeLocaleMessages };