bigbluebutton-html-plugin-sdk 0.0.55 → 0.0.56

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.
package/README.md CHANGED
@@ -259,6 +259,18 @@ See usage ahead:
259
259
 
260
260
  So the idea is that we have a `uiCommands` object and at a point, there will be the command to do the intended action, such as open the chat form and/or fill it, as demonstrated above
261
261
 
262
+ ### Server Commands
263
+
264
+ `serverCommands` object: It contains all the possible commands available to the developer to interact with the BBB core server, see the ones implemented down below:
265
+
266
+ - chat:
267
+ - sendPublicMessage: this function sends a text message along with an optional custom metadata to the public chat
268
+ > Note: messages sent by plugins are not natively rendered by the client.
269
+ > They have to be custom-rendered by plugins using `useLoadedChatMessages` and `useChatMessageDomElements`.
270
+ - caption:
271
+ - save: this function saves the given text, locale and caption type
272
+ - addLocale: this function sends a locale to be added to the available options
273
+
262
274
  ### Dom Element Manipulation
263
275
 
264
276
  - `useChatMessageDomElements` hook: This hook will return the dom element of a chat message reactively, so one can modify whatever is inside, such as text, css, js, etc.;
@@ -56,7 +56,6 @@ var BbbPluginSdk = /** @class */ (function () {
56
56
  pluginApi.useLoadedChatMessages = (function () { return (0, hooks_7.useLoadedChatMessages)(); });
57
57
  pluginApi.useChatMessageDomElements = function (messageIds) { return (0, hooks_8.useChatMessageDomElements)(messageIds); };
58
58
  pluginApi.uiCommands = commands_1.uiCommands;
59
- pluginApi.serverCommands = commands_2.serverCommands;
60
59
  pluginApi.useUiData = hooks_10.useUiData;
61
60
  var pluginName = pluginApi === null || pluginApi === void 0 ? void 0 : pluginApi.pluginName;
62
61
  if (pluginName) {
@@ -66,6 +65,7 @@ var BbbPluginSdk = /** @class */ (function () {
66
65
  return (0, hooks_1.useDataChannelGeneral)(channelName, subChannelName, pluginName, window.bbb_plugins[uuid], dataChannelType);
67
66
  });
68
67
  pluginApi.usePluginSettings = function () { return (0, settings_1.usePluginSettings)(pluginName); };
68
+ pluginApi.serverCommands = (0, commands_2.serverCommands)(pluginName);
69
69
  pluginApi.sendGenericDataForLearningAnalyticsDashboard = function (data) { return (0, hooks_12.sendGenericDataForLearningAnalyticsDashboard)(data, pluginName); };
70
70
  }
71
71
  else {
@@ -1 +1 @@
1
- {"version":3,"file":"BbbPluginSdk.js","sourceRoot":"","sources":["../../../../src/core/api/BbbPluginSdk.ts"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,+BAAkC;AAOlC,kDAA4D;AAO5D,uDAAwD;AAQxD,kDAAiE;AACjE,gGAEgF;AAChF,wFAEwE;AACxE,oFAA+F;AAC/F,gFAAwF;AACxF,oFAA+F;AAC/F,4DAAoE;AACpE,uDAA0D;AAC1D,mEAA2E;AAE3E,uFAAsG;AACtG,2EAA8F;AAE9F,0FAAuG;AACvG,oDAAsD;AAEtD,gFAAmF;AACnF,2DAAgE;AAChE,mEAAwG;AAKxG;;;;;;GAMG;AACH;IAAA;IA+GA,CAAC;IA9GC;;;;;;;;;;OAUG;IACW,uBAAU,GAAxB,UAAyB,IAAY;QACnC,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE;YAAE,MAAM,IAAI,KAAK,CAAC,wFAAwF,CAAC,CAAC;QAC1I,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,C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
+ messageMetadata: string;
7
8
  }
8
9
  export type UseLoadedChatMessagesFunction = () => GraphqlResponseWrapper<LoadedChatMessage[]>;
@@ -0,0 +1,22 @@
1
+ import { ChatSendMessageCommandArguments } from './types';
2
+ export declare const chat: (pluginName: string) => {
3
+ /**
4
+ * Sends chat message to the public chat.
5
+ *
6
+ * @param chatSendMessageCommandArguments the text and custom metadata(optional)
7
+ * to be sent in the public chat message.
8
+ * Refer to {@link ChatSendMessageCommandArguments} to understand the argument
9
+ * structure.
10
+ */
11
+ sendPublicChatMessage: (chatSendPublicChatMessageCommandArguments: ChatSendMessageCommandArguments) => void;
12
+ /**
13
+ * Sends custom chat message to the public chat. Custom messages are not rendered by
14
+ * the BBB client and are meant to be rendered in a custom manner by the plugin.
15
+ *
16
+ * @param chatSendMessageCommandArguments the text and custom metadata(optional)
17
+ * to be sent in the public chat message.
18
+ * Refer to {@link ChatSendMessageCommandArguments} to understand the argument
19
+ * structure.
20
+ */
21
+ sendCustomPublicChatMessage: (chatSendCustomPublicChatMessageCommandArguments: ChatSendMessageCommandArguments) => void;
22
+ };
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.chat = void 0;
15
+ var constants_1 = require("./constants");
16
+ var enum_1 = require("./enum");
17
+ var chat = function (pluginName) { return ({
18
+ /**
19
+ * Sends chat message to the public chat.
20
+ *
21
+ * @param chatSendMessageCommandArguments the text and custom metadata(optional)
22
+ * to be sent in the public chat message.
23
+ * Refer to {@link ChatSendMessageCommandArguments} to understand the argument
24
+ * structure.
25
+ */
26
+ sendPublicChatMessage: function (chatSendPublicChatMessageCommandArguments) {
27
+ window.dispatchEvent(new CustomEvent(enum_1.ChatCommandsEnum.SEND_MESSAGE, {
28
+ detail: __assign({ chatId: constants_1.PUBLIC_CHAT_ID, pluginName: pluginName, custom: false }, chatSendPublicChatMessageCommandArguments),
29
+ }));
30
+ },
31
+ /**
32
+ * Sends custom chat message to the public chat. Custom messages are not rendered by
33
+ * the BBB client and are meant to be rendered in a custom manner by the plugin.
34
+ *
35
+ * @param chatSendMessageCommandArguments the text and custom metadata(optional)
36
+ * to be sent in the public chat message.
37
+ * Refer to {@link ChatSendMessageCommandArguments} to understand the argument
38
+ * structure.
39
+ */
40
+ sendCustomPublicChatMessage: function (chatSendCustomPublicChatMessageCommandArguments) {
41
+ window.dispatchEvent(new CustomEvent(enum_1.ChatCommandsEnum.SEND_MESSAGE, {
42
+ detail: __assign({ chatId: constants_1.PUBLIC_CHAT_ID, pluginName: pluginName, custom: true }, chatSendCustomPublicChatMessageCommandArguments),
43
+ }));
44
+ },
45
+ }); };
46
+ exports.chat = chat;
47
+ //# sourceMappingURL=commands.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commands.js","sourceRoot":"","sources":["../../../../src/server-commands/chat/commands.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,yCAA6C;AAC7C,+BAA0C;AAMnC,IAAM,IAAI,GAAG,UAAC,UAAkB,IAAK,OAAA,CAAC;IAC3C;;;;;;;OAOG;IACH,qBAAqB,EAAE,UACrB,yCAA0E;QAE1E,MAAM,CAAC,aAAa,CAClB,IAAI,WAAW,CAEb,uBAAgB,CAAC,YAAY,EAAE;YAC/B,MAAM,aACJ,MAAM,EAAE,0BAAc,EACtB,UAAU,YAAA,EACV,MAAM,EAAE,KAAK,IACV,yCAAyC,CAC7C;SACF,CAAC,CACH,CAAC;IACJ,CAAC;IAED;;;;;;;;OAQG;IACH,2BAA2B,EAAE,UAC3B,+CAAgF;QAEhF,MAAM,CAAC,aAAa,CAClB,IAAI,WAAW,CAEb,uBAAgB,CAAC,YAAY,EAAE;YAC/B,MAAM,aACJ,MAAM,EAAE,0BAAc,EACtB,UAAU,YAAA,EACV,MAAM,EAAE,IAAI,IACT,+CAA+C,CACnD;SACF,CAAC,CACH,CAAC;IACJ,CAAC;CACF,CAAC,EAnD0C,CAmD1C,CAAC;AAnDU,QAAA,IAAI,QAmDd"}
@@ -0,0 +1 @@
1
+ export declare const PUBLIC_CHAT_ID = "MAIN-PUBLIC-GROUP-CHAT";
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PUBLIC_CHAT_ID = void 0;
4
+ exports.PUBLIC_CHAT_ID = 'MAIN-PUBLIC-GROUP-CHAT';
5
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/server-commands/chat/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,cAAc,GAAG,wBAAwB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare enum ChatCommandsEnum {
2
+ SEND_MESSAGE = "CHAT_SEND_MESSAGE"
3
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ChatCommandsEnum = void 0;
4
+ var ChatCommandsEnum;
5
+ (function (ChatCommandsEnum) {
6
+ ChatCommandsEnum["SEND_MESSAGE"] = "CHAT_SEND_MESSAGE";
7
+ })(ChatCommandsEnum || (exports.ChatCommandsEnum = ChatCommandsEnum = {}));
8
+ //# sourceMappingURL=enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enum.js","sourceRoot":"","sources":["../../../../src/server-commands/chat/enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,gBAEX;AAFD,WAAY,gBAAgB;IAC1B,sDAAkC,CAAA;AACpC,CAAC,EAFW,gBAAgB,gCAAhB,gBAAgB,QAE3B"}
@@ -0,0 +1,13 @@
1
+ export interface ChatSendMessageCommandArguments {
2
+ textMessageInMarkdownFormat: string;
3
+ pluginCustomMetadata?: string;
4
+ }
5
+ export interface ChatSendMessageEventArguments extends ChatSendMessageCommandArguments {
6
+ pluginName: string;
7
+ chatId: string;
8
+ custom: boolean;
9
+ }
10
+ export interface ServerCommandsChatObject {
11
+ sendCustomPublicChatMessage: (chatSendCustomPublicChatMessageCommandArguments: ChatSendMessageCommandArguments) => void;
12
+ sendPublicChatMessage: (chatSendPublicChatMessageCommandArguments: ChatSendMessageCommandArguments) => void;
13
+ }
@@ -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/server-commands/chat/types.ts"],"names":[],"mappings":""}
@@ -1,6 +1,10 @@
1
- export declare const serverCommands: {
1
+ export declare const serverCommands: (pluginName: string) => {
2
2
  caption: {
3
3
  save: (captionSaveCommandArguments: import("./caption/types").CaptionSaveCommandArguments) => void;
4
4
  addLocale: (captionAddLocaleCommandArguments: string) => void;
5
5
  };
6
+ chat: {
7
+ sendPublicChatMessage: (chatSendPublicChatMessageCommandArguments: import("./chat/types").ChatSendMessageCommandArguments) => void;
8
+ sendCustomPublicChatMessage: (chatSendCustomPublicChatMessageCommandArguments: import("./chat/types").ChatSendMessageCommandArguments) => void;
9
+ };
6
10
  };
@@ -2,7 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.serverCommands = void 0;
4
4
  var commands_1 = require("./caption/commands");
5
- exports.serverCommands = {
5
+ var commands_2 = require("./chat/commands");
6
+ var serverCommands = function (pluginName) { return ({
6
7
  caption: commands_1.caption,
7
- };
8
+ chat: (0, commands_2.chat)(pluginName),
9
+ }); };
10
+ exports.serverCommands = serverCommands;
8
11
  //# sourceMappingURL=commands.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"commands.js","sourceRoot":"","sources":["../../../src/server-commands/commands.ts"],"names":[],"mappings":";;;AAAA,+CAA6C;AAEhC,QAAA,cAAc,GAAG;IAC5B,OAAO,oBAAA;CACR,CAAC"}
1
+ {"version":3,"file":"commands.js","sourceRoot":"","sources":["../../../src/server-commands/commands.ts"],"names":[],"mappings":";;;AAAA,+CAA6C;AAC7C,4CAAuC;AAEhC,IAAM,cAAc,GAAG,UAAC,UAAkB,IAAK,OAAA,CAAC;IACrD,OAAO,oBAAA;IACP,IAAI,EAAE,IAAA,eAAI,EAAC,UAAU,CAAC;CACvB,CAAC,EAHoD,CAGpD,CAAC;AAHU,QAAA,cAAc,kBAGxB"}
@@ -1 +1,2 @@
1
1
  export { CaptionCommandsEnum, CaptionsTypeEnum } from './caption/enum';
2
+ export { ChatCommandsEnum } from './chat/enum';
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CaptionsTypeEnum = exports.CaptionCommandsEnum = void 0;
3
+ exports.ChatCommandsEnum = exports.CaptionsTypeEnum = exports.CaptionCommandsEnum = void 0;
4
4
  var enum_1 = require("./caption/enum");
5
5
  Object.defineProperty(exports, "CaptionCommandsEnum", { enumerable: true, get: function () { return enum_1.CaptionCommandsEnum; } });
6
6
  Object.defineProperty(exports, "CaptionsTypeEnum", { enumerable: true, get: function () { return enum_1.CaptionsTypeEnum; } });
7
+ var enum_2 = require("./chat/enum");
8
+ Object.defineProperty(exports, "ChatCommandsEnum", { enumerable: true, get: function () { return enum_2.ChatCommandsEnum; } });
7
9
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/server-commands/index.ts"],"names":[],"mappings":";;;AAAA,uCAAuE;AAA9D,2GAAA,mBAAmB,OAAA;AAAE,wGAAA,gBAAgB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/server-commands/index.ts"],"names":[],"mappings":";;;AAAA,uCAAuE;AAA9D,2GAAA,mBAAmB,OAAA;AAAE,wGAAA,gBAAgB,OAAA;AAC9C,oCAA+C;AAAtC,wGAAA,gBAAgB,OAAA"}
@@ -1,4 +1,6 @@
1
1
  import { ServerCommandsCaptionObject } from './caption/types';
2
+ import { ServerCommandsChatObject } from './chat/types';
2
3
  export interface ServerCommands {
3
4
  caption: ServerCommandsCaptionObject;
5
+ chat: ServerCommandsChatObject;
4
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bigbluebutton-html-plugin-sdk",
3
- "version": "0.0.55",
3
+ "version": "0.0.56",
4
4
  "homepage": "https://github.com/bigbluebutton/bigbluebutton-html-plugin-sdk",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",