bigbluebutton-html-plugin-sdk 0.0.28 → 0.0.29

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 (57) hide show
  1. package/README.md +9 -0
  2. package/dist/cjs/core/api/BbbPluginSdk.js +6 -2
  3. package/dist/cjs/core/api/BbbPluginSdk.js.map +1 -1
  4. package/dist/cjs/core/api/types.d.ts +14 -2
  5. package/dist/cjs/core/auxiliary/join-url/getter.js.map +1 -0
  6. package/dist/cjs/core/auxiliary/join-url/types.js.map +1 -0
  7. package/dist/cjs/core/auxiliary/session-token/getter.js.map +1 -0
  8. package/dist/cjs/core/auxiliary/session-token/types.js.map +1 -0
  9. package/dist/cjs/data-consumption/domain/settings/index.d.ts +1 -0
  10. package/dist/cjs/data-consumption/domain/settings/index.js +6 -0
  11. package/dist/cjs/data-consumption/domain/settings/index.js.map +1 -0
  12. package/dist/cjs/data-consumption/domain/settings/plugin-settings/hooks.d.ts +5 -0
  13. package/dist/cjs/data-consumption/domain/settings/plugin-settings/hooks.js +13 -0
  14. package/dist/cjs/data-consumption/domain/settings/plugin-settings/hooks.js.map +1 -0
  15. package/dist/cjs/data-consumption/domain/settings/plugin-settings/queries.d.ts +1 -0
  16. package/dist/cjs/data-consumption/domain/settings/plugin-settings/queries.js +5 -0
  17. package/dist/cjs/data-consumption/domain/settings/plugin-settings/queries.js.map +1 -0
  18. package/dist/cjs/data-consumption/domain/settings/plugin-settings/types.d.ts +10 -0
  19. package/dist/cjs/data-consumption/domain/settings/plugin-settings/types.js +3 -0
  20. package/dist/cjs/data-consumption/domain/settings/plugin-settings/types.js.map +1 -0
  21. package/dist/cjs/data-consumption/domain/settings/plugin-settings/utils.d.ts +7 -0
  22. package/dist/cjs/data-consumption/domain/settings/plugin-settings/utils.js +22 -0
  23. package/dist/cjs/data-consumption/domain/settings/plugin-settings/utils.js.map +1 -0
  24. package/dist/cjs/ui-commands/chat/commands.d.ts +6 -0
  25. package/dist/cjs/ui-commands/chat/commands.js +8 -0
  26. package/dist/cjs/ui-commands/chat/commands.js.map +1 -0
  27. package/dist/cjs/ui-commands/chat/form/commands.d.ts +14 -0
  28. package/dist/cjs/ui-commands/chat/form/commands.js +24 -0
  29. package/dist/cjs/ui-commands/chat/form/commands.js.map +1 -0
  30. package/dist/cjs/ui-commands/chat/form/enums.d.ts +4 -0
  31. package/dist/cjs/ui-commands/chat/form/enums.js +9 -0
  32. package/dist/cjs/ui-commands/chat/form/enums.js.map +1 -0
  33. package/dist/cjs/ui-commands/chat/form/types.d.ts +7 -0
  34. package/dist/cjs/ui-commands/chat/form/types.js +3 -0
  35. package/dist/cjs/ui-commands/chat/form/types.js.map +1 -0
  36. package/dist/cjs/ui-commands/chat/types.d.ts +4 -0
  37. package/dist/cjs/ui-commands/chat/types.js +3 -0
  38. package/dist/cjs/ui-commands/chat/types.js.map +1 -0
  39. package/dist/cjs/ui-commands/commands.d.ts +8 -0
  40. package/dist/cjs/ui-commands/commands.js +8 -0
  41. package/dist/cjs/ui-commands/commands.js.map +1 -0
  42. package/dist/cjs/ui-commands/types.d.ts +7 -0
  43. package/dist/cjs/ui-commands/types.js +3 -0
  44. package/dist/cjs/ui-commands/types.js.map +1 -0
  45. package/package.json +1 -1
  46. package/dist/cjs/core/auxiliar/join-url/getter.js.map +0 -1
  47. package/dist/cjs/core/auxiliar/join-url/types.js.map +0 -1
  48. package/dist/cjs/core/auxiliar/session-token/getter.js.map +0 -1
  49. package/dist/cjs/core/auxiliar/session-token/types.js.map +0 -1
  50. /package/dist/cjs/core/{auxiliar → auxiliary}/join-url/getter.d.ts +0 -0
  51. /package/dist/cjs/core/{auxiliar → auxiliary}/join-url/getter.js +0 -0
  52. /package/dist/cjs/core/{auxiliar → auxiliary}/join-url/types.d.ts +0 -0
  53. /package/dist/cjs/core/{auxiliar → auxiliary}/join-url/types.js +0 -0
  54. /package/dist/cjs/core/{auxiliar → auxiliary}/session-token/getter.d.ts +0 -0
  55. /package/dist/cjs/core/{auxiliar → auxiliary}/session-token/getter.js +0 -0
  56. /package/dist/cjs/core/{auxiliar → auxiliary}/session-token/types.d.ts +0 -0
  57. /package/dist/cjs/core/{auxiliar → auxiliary}/session-token/types.js +0 -0
package/README.md CHANGED
@@ -42,8 +42,17 @@ SDK for developing BigBlueButton plugins, examples of implementations can be fou
42
42
 
43
43
  - `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.
44
44
 
45
+ - `usePluginSettings` hook: it provides all the specific settings regarding the current plugin it's been loaded from.
46
+
45
47
  ### Real time data exchange
46
48
  - `useDataChannel` hook: this will allow you to exchange information (Send and receive) amongst different users through the same plugin;
47
49
 
48
50
  ### Real time event reaction
49
51
  - `useUiEvent` hook: this will allow you to react to certain events fired from the BBB core (refer to the sample-ui-events-plugin in the samples directory for example on how to use some of the events);
52
+
53
+ ### Ui Commands to automatize tasks in BBB
54
+ `uiCommands` object: It basically contains all the possible commands available to the developer to interact with the core BBB UI, see the ones implemented down below:
55
+ - chat:
56
+ - form:
57
+ - open: this function will open the sidebar chat panel automatically;
58
+ - fill: this function will fill the form input field of the chat passed in the argument as {text: string}
@@ -1,14 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BbbPluginSdk = void 0;
4
+ var commands_1 = require("../../ui-commands/commands");
4
5
  var hooks_1 = require("../../data-channel/hooks");
5
6
  var hooks_2 = require("../../data-consumption/domain/presentations/current-presentation/hooks");
6
7
  var hooks_3 = require("../../data-consumption/domain/shared/custom-subscription/hooks");
7
8
  var hooks_4 = require("../../data-consumption/domain/users/loaded-user-list/hooks");
8
9
  var hooks_5 = require("../../data-consumption/domain/users/current-user/hooks");
9
10
  var hooks_6 = require("../../data-consumption/domain/users/users-basic-info/hooks");
10
- var getter_1 = require("../auxiliar/session-token/getter");
11
- var getter_2 = require("../auxiliar/join-url/getter");
11
+ var getter_1 = require("../auxiliary/session-token/getter");
12
+ var getter_2 = require("../auxiliary/join-url/getter");
13
+ var settings_1 = require("../../data-consumption/domain/settings");
12
14
  var hooks_7 = require("../../ui-events/hooks");
13
15
  /**
14
16
  * Class responsible for either initialize or get the PluginApi
@@ -39,9 +41,11 @@ var BbbPluginSdk = /** @class */ (function () {
39
41
  pluginApi.useCurrentUser = (function () { return (0, hooks_5.useCurrentUser)(); });
40
42
  pluginApi.useUsersBasicInfo = (function () { return (0, hooks_6.useUsersBasicInfo)(); });
41
43
  pluginApi.useUiEvent = (function (eventName, callback) { return (0, hooks_7.useUiEvent)(eventName, callback); });
44
+ pluginApi.uiCommands = commands_1.uiCommands;
42
45
  var pluginName = pluginApi === null || pluginApi === void 0 ? void 0 : pluginApi.pluginName;
43
46
  if (pluginName) {
44
47
  pluginApi.useDataChannel = (function (channelName) { return (0, hooks_1.useDataChannel)(channelName, pluginName, window.bbb_plugins[uuid]); });
48
+ pluginApi.usePluginSettings = function () { return (0, settings_1.usePluginSettings)(pluginName); };
45
49
  }
46
50
  else {
47
51
  throw new Error('Plugin name not set');
@@ -1 +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;AAC/F,2DAAmE;AACnE,sDAAyD;AAEzD,+CAAmD;AAInD;;;;;;GAMG;AACH;IAAA;IA+EA,CAAC;IA9EC;;;;;;;;;;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,C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,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,eAAe,EAAE,cAAM,OAAA,IAAA,wBAAe,GAAE,EAAjB,CAAiB;gBACxC,UAAU,EAAE,UAAC,MAAM,IAAK,OAAA,IAAA,mBAAU,EAAC,MAAM,CAAC,EAAlB,CAAkB;gBAC1C,UAAU,YAAA;aACX,CAAC;SACH;QAED,OAAO,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAClC,CAAC;IACH,mBAAC;AAAD,CAAC,AAjFD,IAiFC;AAjFqB,oCAAY"}
@@ -1,3 +1,4 @@
1
+ import { UiCommands } from 'src/ui-commands/types';
1
2
  import { ActionButtonDropdownItem } from '../../extensible-areas/action-button-dropdown-item/types';
2
3
  import { ActionsBarItem } from '../../extensible-areas/actions-bar-item/types';
3
4
  import { AudioSettingsDropdownItem } from '../../extensible-areas/audio-settings-dropdown-item/types';
@@ -15,8 +16,9 @@ import { UseCurrentUserFunction } from '../../data-consumption/domain/users/curr
15
16
  import { UseUsersBasicInfoFunction } from '../../data-consumption/domain/users/users-basic-info/types';
16
17
  import { UseCustomSubscriptionFunction } from '../../data-consumption/domain/shared/custom-subscription/types';
17
18
  import { MapOfDispatchers, UseDataChannelFunctionFromPluginApi } from '../../data-channel/types';
18
- import { GetSessionTokenFunction } from '../auxiliar/session-token/types';
19
- import { GetJoinUrlFunction } from '../auxiliar/join-url/types';
19
+ import { GetSessionTokenFunction } from '../auxiliary/session-token/types';
20
+ import { GetJoinUrlFunction } from '../auxiliary/join-url/types';
21
+ import { UsePluginSettingsFunction } from '../../data-consumption/domain/settings/plugin-settings/types';
20
22
  import { UseUiEventFunction } from '../../ui-events/types';
21
23
  export type SetPresentationToolbarItems = (presentationToolbarItem: PresentationToolbarItem[]) => void;
22
24
  export type SetUserListDropdownItems = (userListDropdownItem: UserListDropdownItem[]) => void;
@@ -76,6 +78,15 @@ export interface PluginApi {
76
78
  *
77
79
  */
78
80
  useUsersBasicInfo?: UseUsersBasicInfoFunction;
81
+ /**
82
+ * Returns an object containing the settings for the current plugin (with pluginName
83
+ * defined in the pluginApi). It needs to be explicitly written in the client settings
84
+ * within the plugin's directive
85
+ *
86
+ * @returns `GraphqlResponseWrapper` with the plugin specific settings.
87
+ *
88
+ */
89
+ usePluginSettings?: UsePluginSettingsFunction;
79
90
  /**
80
91
  * Returns an object containing the data on the current presentation being displayed
81
92
  * in the presentation area, and its current page.
@@ -108,6 +119,7 @@ export interface PluginApi {
108
119
  */
109
120
  useDataChannel?: UseDataChannelFunctionFromPluginApi;
110
121
  mapOfDispatchers: MapOfDispatchers;
122
+ uiCommands?: UiCommands;
111
123
  getSessionToken?: GetSessionTokenFunction;
112
124
  getJoinUrl?: GetJoinUrlFunction;
113
125
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getter.js","sourceRoot":"","sources":["../../../../../src/core/auxiliary/join-url/getter.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA0D;AAE1D,SAAS,qBAAqB,CAAC,UAAmC;IAChE,IAAM,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC;SAC3C,GAAG,CAAC,UAAC,EAAY;YAAX,GAAG,QAAA,EAAE,KAAK,QAAA;QAAM,OAAA,UAAG,kBAAkB,CAAC,GAAG,CAAC,cAAI,kBAAkB,CAAC,KAAK,CAAC,CAAE;IAAzD,CAAyD,CAAC;SAChF,IAAI,CAAC,GAAG,CAAC,CAAC;IACb,OAAO,WAAW,CAAC;AACrB,CAAC;AAED,SAAsB,UAAU,CAAC,UAAmC;;;;;;oBAC5D,aAAa,GAAG,qBAAqB,CAAC,UAAU,CAAC,CAAC;oBAClD,GAAG,GAAG,UAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,wDAA8C,IAAA,wBAAe,GAAE,cAAI,aAAa,CAAE,CAAC;oBACzG,qBAAM,KAAK,CAAC,GAAG,CAAC,EAAA;;oBAA3B,QAAQ,GAAG,SAAgB;oBACb,qBAAM,QAAQ,CAAC,IAAI,EAAE,EAAA;;oBAAnC,WAAW,GAAG,SAAqB;oBACzC,sBAAO,WAAW,CAAC,QAAQ,CAAC,GAAa,EAAC;;;;CAC3C;AAND,gCAMC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/core/auxiliary/join-url/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getter.js","sourceRoot":"","sources":["../../../../../src/core/auxiliary/session-token/getter.ts"],"names":[],"mappings":";;;AAAA,SAAgB,eAAe;IAC7B,IAAM,MAAM,GAAG,IAAI,eAAe,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC3D,OAAO,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,SAAS,CAAC;AACjD,CAAC;AAHD,0CAGC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/core/auxiliary/session-token/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export { usePluginSettings } from './plugin-settings/hooks';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.usePluginSettings = void 0;
4
+ var hooks_1 = require("./plugin-settings/hooks");
5
+ Object.defineProperty(exports, "usePluginSettings", { enumerable: true, get: function () { return hooks_1.usePluginSettings; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/data-consumption/domain/settings/index.ts"],"names":[],"mappings":";;;AAAA,iDAA4D;AAAnD,0GAAA,iBAAiB,OAAA"}
@@ -0,0 +1,5 @@
1
+ export declare const usePluginSettings: (pluginName: string) => {
2
+ data: import("./types").PluginSettingsData | undefined;
3
+ loading: boolean;
4
+ error?: import("@apollo/client").ApolloError | undefined;
5
+ };
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.usePluginSettings = void 0;
4
+ var hooks_1 = require("../../shared/custom-subscription/hooks");
5
+ var queries_1 = require("./queries");
6
+ var utils_1 = require("./utils");
7
+ var usePluginSettings = function (pluginName) { return (0, utils_1.filterPluginSpecificSettings)((0, hooks_1.useCustomSubscription)(queries_1.PLUGIN_SETTINGS_QUERY, {
8
+ variables: {
9
+ pluginName: pluginName,
10
+ },
11
+ })); };
12
+ exports.usePluginSettings = usePluginSettings;
13
+ //# sourceMappingURL=hooks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../../../../src/data-consumption/domain/settings/plugin-settings/hooks.ts"],"names":[],"mappings":";;;AAAA,gEAA+E;AAC/E,qCAAkD;AAElD,iCAAuD;AAEhD,IAAM,iBAAiB,GAAG,UAC/B,UAAkB,IACf,OAAA,IAAA,oCAA4B,EAAC,IAAA,6BAAqB,EACT,+BAAqB,EAAE;IAC/D,SAAS,EAAE;QACT,UAAU,YAAA;KACX;CACF,CAAC,CAAC,EALF,CAKE,CAAC;AAPK,QAAA,iBAAiB,qBAOtB"}
@@ -0,0 +1 @@
1
+ export declare const PLUGIN_SETTINGS_QUERY = "\nsubscription pluginSettingsSubscription ($pluginName: String!){\n meeting_clientPluginSettings(where: {name: {_eq: $pluginName}}) {\n settings\n }\n}\n";
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PLUGIN_SETTINGS_QUERY = void 0;
4
+ exports.PLUGIN_SETTINGS_QUERY = "\nsubscription pluginSettingsSubscription ($pluginName: String!){\n meeting_clientPluginSettings(where: {name: {_eq: $pluginName}}) {\n settings\n }\n}\n";
5
+ //# sourceMappingURL=queries.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queries.js","sourceRoot":"","sources":["../../../../../../src/data-consumption/domain/settings/plugin-settings/queries.ts"],"names":[],"mappings":";;;AAAa,QAAA,qBAAqB,GAAG,gKAMpC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { GraphqlResponseWrapper } from '../../../../core';
2
+ export interface PluginSettingsData {
3
+ [key: string]: object;
4
+ }
5
+ export interface PluginSettingsResponseFromGraphqlWrapper {
6
+ meeting_clientPluginSettings: {
7
+ settings: PluginSettingsData;
8
+ }[];
9
+ }
10
+ export type UsePluginSettingsFunction = () => GraphqlResponseWrapper<PluginSettingsData>;
@@ -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/settings/plugin-settings/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ import { GraphqlResponseWrapper } from '../../../../core';
2
+ import { PluginSettingsResponseFromGraphqlWrapper } from './types';
3
+ export declare const filterPluginSpecificSettings: (completeSettings: GraphqlResponseWrapper<PluginSettingsResponseFromGraphqlWrapper>) => {
4
+ data: import("./types").PluginSettingsData | undefined;
5
+ loading: boolean;
6
+ error?: import("@apollo/client").ApolloError | undefined;
7
+ };
@@ -0,0 +1,22 @@
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.filterPluginSpecificSettings = void 0;
15
+ var filterPluginSpecificSettings = function (completeSettings) {
16
+ var _a;
17
+ var pluginSettings = (_a = completeSettings
18
+ .data) === null || _a === void 0 ? void 0 : _a.meeting_clientPluginSettings[0].settings;
19
+ return __assign(__assign({}, completeSettings), { data: pluginSettings });
20
+ };
21
+ exports.filterPluginSpecificSettings = filterPluginSpecificSettings;
22
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../../src/data-consumption/domain/settings/plugin-settings/utils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAGO,IAAM,4BAA4B,GAAG,UAC1C,gBAAkF;;IAElF,IAAM,cAAc,GAAG,MAAA,gBAAgB;SACpC,IAAI,0CAAE,4BAA4B,CAAC,CAAC,EAAE,QAAQ,CAAC;IAClD,6BACK,gBAAgB,KACnB,IAAI,EAAE,cAAc,IACpB;AACJ,CAAC,CAAC;AATW,QAAA,4BAA4B,gCASvC"}
@@ -0,0 +1,6 @@
1
+ export declare const chat: {
2
+ form: {
3
+ open: () => void;
4
+ fill: (fillChatFormCommandArguments: import("./form/types").FillChatFormCommandArguments) => void;
5
+ };
6
+ };
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.chat = void 0;
4
+ var commands_1 = require("./form/commands");
5
+ exports.chat = {
6
+ form: commands_1.form,
7
+ };
8
+ //# sourceMappingURL=commands.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commands.js","sourceRoot":"","sources":["../../../../src/ui-commands/chat/commands.ts"],"names":[],"mappings":";;;AAAA,4CAAuC;AAE1B,QAAA,IAAI,GAAG;IAClB,IAAI,iBAAA;CACL,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { FillChatFormCommandArguments } from './types';
2
+ export declare const form: {
3
+ /**
4
+ * Opens the public chat panel automatically.
5
+ */
6
+ open: () => void;
7
+ /**
8
+ * Fills in the chat input when called.
9
+ *
10
+ * @param FillChatFormCommandArguments the text with which the method will fill the chat input.
11
+ * Refer to {@link FillChatFormCommandArguments} to understand the argument structure.
12
+ */
13
+ fill: (fillChatFormCommandArguments: FillChatFormCommandArguments) => void;
14
+ };
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.form = void 0;
4
+ var enums_1 = require("./enums");
5
+ exports.form = {
6
+ /**
7
+ * Opens the public chat panel automatically.
8
+ */
9
+ open: function () {
10
+ window.dispatchEvent(new Event(enums_1.ChatFormCommandsEnum.OPEN));
11
+ },
12
+ /**
13
+ * Fills in the chat input when called.
14
+ *
15
+ * @param FillChatFormCommandArguments the text with which the method will fill the chat input.
16
+ * Refer to {@link FillChatFormCommandArguments} to understand the argument structure.
17
+ */
18
+ fill: function (fillChatFormCommandArguments) {
19
+ window.dispatchEvent(new CustomEvent(enums_1.ChatFormCommandsEnum.FILL, {
20
+ detail: fillChatFormCommandArguments,
21
+ }));
22
+ },
23
+ };
24
+ //# sourceMappingURL=commands.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commands.js","sourceRoot":"","sources":["../../../../../src/ui-commands/chat/form/commands.ts"],"names":[],"mappings":";;;AAAA,iCAA+C;AAGlC,QAAA,IAAI,GAAG;IAClB;;OAEG;IACH,IAAI,EAAE;QACJ,MAAM,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,4BAAoB,CAAC,IAAI,CAAC,CAAC,CAAC;IAC7D,CAAC;IAED;;;;;OAKG;IACH,IAAI,EAAE,UAAC,4BAA0D;QAC/D,MAAM,CAAC,aAAa,CAClB,IAAI,WAAW,CAEb,4BAAoB,CAAC,IAAI,EAAE;YAC3B,MAAM,EAAE,4BAA4B;SACrC,CAAC,CACH,CAAC;IACJ,CAAC;CACF,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare enum ChatFormCommandsEnum {
2
+ OPEN = "OPEN_CHAT_FORM_COMMAND",
3
+ FILL = "FILL_CHAT_FORM_COMMAND"
4
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ChatFormCommandsEnum = void 0;
4
+ var ChatFormCommandsEnum;
5
+ (function (ChatFormCommandsEnum) {
6
+ ChatFormCommandsEnum["OPEN"] = "OPEN_CHAT_FORM_COMMAND";
7
+ ChatFormCommandsEnum["FILL"] = "FILL_CHAT_FORM_COMMAND";
8
+ })(ChatFormCommandsEnum || (exports.ChatFormCommandsEnum = ChatFormCommandsEnum = {}));
9
+ //# sourceMappingURL=enums.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enums.js","sourceRoot":"","sources":["../../../../../src/ui-commands/chat/form/enums.ts"],"names":[],"mappings":";;;AAAA,IAAY,oBAGX;AAHD,WAAY,oBAAoB;IAC9B,uDAA+B,CAAA;IAC/B,uDAA+B,CAAA;AACjC,CAAC,EAHW,oBAAoB,oCAApB,oBAAoB,QAG/B"}
@@ -0,0 +1,7 @@
1
+ export interface FillChatFormCommandArguments {
2
+ text: string;
3
+ }
4
+ export interface UiCommandsChatFormObject {
5
+ open: () => void;
6
+ fill: (FillChatFormCommandArguments: FillChatFormCommandArguments) => void;
7
+ }
@@ -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/ui-commands/chat/form/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import { UiCommandsChatFormObject } from './form/types';
2
+ export interface UiCommandsChatObject {
3
+ form: UiCommandsChatFormObject;
4
+ }
@@ -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/ui-commands/chat/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ export declare const uiCommands: {
2
+ chat: {
3
+ form: {
4
+ open: () => void;
5
+ fill: (fillChatFormCommandArguments: import("./chat/form/types").FillChatFormCommandArguments) => void;
6
+ };
7
+ };
8
+ };
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.uiCommands = void 0;
4
+ var commands_1 = require("./chat/commands");
5
+ exports.uiCommands = {
6
+ chat: commands_1.chat,
7
+ };
8
+ //# sourceMappingURL=commands.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commands.js","sourceRoot":"","sources":["../../../src/ui-commands/commands.ts"],"names":[],"mappings":";;;AAAA,4CAAuC;AAE1B,QAAA,UAAU,GAAG;IACxB,IAAI,iBAAA;CACL,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { UiCommandsChatObject } from './chat/types';
2
+ export interface UiCommandsEventWrapper<T> extends Event {
3
+ detail: T;
4
+ }
5
+ export interface UiCommands {
6
+ chat: UiCommandsChatObject;
7
+ }
@@ -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/ui-commands/types.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bigbluebutton-html-plugin-sdk",
3
- "version": "0.0.28",
3
+ "version": "0.0.29",
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",
@@ -1 +0,0 @@
1
- {"version":3,"file":"getter.js","sourceRoot":"","sources":["../../../../../src/core/auxiliar/join-url/getter.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA0D;AAE1D,SAAS,qBAAqB,CAAC,UAAmC;IAChE,IAAM,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC;SAC3C,GAAG,CAAC,UAAC,EAAY;YAAX,GAAG,QAAA,EAAE,KAAK,QAAA;QAAM,OAAA,UAAG,kBAAkB,CAAC,GAAG,CAAC,cAAI,kBAAkB,CAAC,KAAK,CAAC,CAAE;IAAzD,CAAyD,CAAC;SAChF,IAAI,CAAC,GAAG,CAAC,CAAC;IACb,OAAO,WAAW,CAAC;AACrB,CAAC;AAED,SAAsB,UAAU,CAAC,UAAmC;;;;;;oBAC5D,aAAa,GAAG,qBAAqB,CAAC,UAAU,CAAC,CAAC;oBAClD,GAAG,GAAG,UAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,wDAA8C,IAAA,wBAAe,GAAE,cAAI,aAAa,CAAE,CAAC;oBACzG,qBAAM,KAAK,CAAC,GAAG,CAAC,EAAA;;oBAA3B,QAAQ,GAAG,SAAgB;oBACb,qBAAM,QAAQ,CAAC,IAAI,EAAE,EAAA;;oBAAnC,WAAW,GAAG,SAAqB;oBACzC,sBAAO,WAAW,CAAC,QAAQ,CAAC,GAAa,EAAC;;;;CAC3C;AAND,gCAMC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/core/auxiliar/join-url/types.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"getter.js","sourceRoot":"","sources":["../../../../../src/core/auxiliar/session-token/getter.ts"],"names":[],"mappings":";;;AAAA,SAAgB,eAAe;IAC7B,IAAM,MAAM,GAAG,IAAI,eAAe,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC3D,OAAO,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,SAAS,CAAC;AACjD,CAAC;AAHD,0CAGC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/core/auxiliar/session-token/types.ts"],"names":[],"mappings":""}