bigbluebutton-html-plugin-sdk 0.0.4 → 0.0.6

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
@@ -2,11 +2,17 @@
2
2
 
3
3
  ## Information
4
4
 
5
- SDK for developing BigBlueButton plugins, an example implementation of it can be found in `./samples/sample-presentation-toolbar-plugin` (Refer to `./samples/sample-presentation-toolbar-plugin/README.md`).
5
+ SDK for developing BigBlueButton plugins, examples of implementations can be found in `./samples/sample-presentation-toolbar-plugin` (Refer to `./samples/sample-presentation-toolbar-plugin/README.md`) or `./samples/sample-user-list-dropdown-plugin`.
6
6
 
7
7
  ## API
8
8
  ### Extensible UI areas
9
9
  - Presentation toolbar items (button, separator, spinner)
10
10
 
11
+ - User list dropdown items (option, separator)
12
+
13
+ - Action Button Dropdown Items (option, separator)
14
+
11
15
  ### Realtime data consumption
12
16
  - `useCurrentPresentation` hook: provides information regarding the current presentation.
17
+
18
+ - `useLoadedUserList` hook: provides information regarding the loaded user list (displayed in the screen)
@@ -7,13 +7,17 @@ var getPluginApi = function (uuid) {
7
7
  return window.bbb_plugins[uuid];
8
8
  }
9
9
  window.bbb_plugins[uuid] = {
10
+ setUserListDropdownItems: function () { },
10
11
  setPresentationToolbarItems: function () { },
12
+ setActionButtonDropdownItems: function () { },
11
13
  };
12
14
  return window.bbb_plugins[uuid];
13
15
  }
14
16
  window.bbb_plugins = {};
15
17
  window.bbb_plugins[uuid] = {
18
+ setUserListDropdownItems: function () { },
16
19
  setPresentationToolbarItems: function () { },
20
+ setActionButtonDropdownItems: function () { },
17
21
  };
18
22
  return window.bbb_plugins[uuid];
19
23
  };
@@ -1 +1 @@
1
- {"version":3,"file":"getPluginApi.js","sourceRoot":"","sources":["../../../src/core/getPluginApi.ts"],"names":[],"mappings":";;;AAQA,IAAM,YAAY,GAAiB,UAAC,IAAY;IAC9C,IAAI,MAAM,CAAC,WAAW,EAAE;QACtB,IAAI,MAAM,CA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AA4B,EAAE,cAAO,CAAC;KACvC,CAAC;IACF,OAAO,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;AAClC,CAAC,CAAC;AAGA,oCAAY"}
@@ -1 +1,2 @@
1
1
  export { default as useCurrentPresentation } from './presentation';
2
+ export { default as useLoadedUserList } from './user';
@@ -3,7 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.useCurrentPresentation = void 0;
6
+ exports.useLoadedUserList = exports.useCurrentPresentation = void 0;
7
7
  var presentation_1 = require("./presentation");
8
8
  Object.defineProperty(exports, "useCurrentPresentation", { enumerable: true, get: function () { return __importDefault(presentation_1).default; } });
9
+ var user_1 = require("./user");
10
+ Object.defineProperty(exports, "useLoadedUserList", { enumerable: true, get: function () { return __importDefault(user_1).default; } });
9
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/data-consumption/hooks/index.ts"],"names":[],"mappings":";;;;;;AAAA,+CAAmE;AAA1D,uIAAA,OAAO,OAA0B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/data-consumption/hooks/index.ts"],"names":[],"mappings":";;;;;;AAAA,+CAAmE;AAA1D,uIAAA,OAAO,OAA0B;AAC1C,+BAAsD;AAA7C,0HAAA,OAAO,OAAqB"}
@@ -0,0 +1,3 @@
1
+ import { User } from '../../types';
2
+ declare const useLoadedUserList: () => User[] | undefined;
3
+ export default useLoadedUserList;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var react_1 = require("react");
4
+ var index_1 = require("../../index");
5
+ var useLoadedUserList = function () {
6
+ var _a = (0, react_1.useState)(), userInfo = _a[0], setUserInfo = _a[1];
7
+ var handleLoadedUserListUpdateEvent = (function (event) {
8
+ if (event.detail.hook === index_1.Internal.BbbHooks.UseLoadedUserList) {
9
+ setUserInfo(event.detail.data);
10
+ }
11
+ });
12
+ (0, react_1.useEffect)(function () {
13
+ window.addEventListener(index_1.Internal.BbbHookEvents.Update, handleLoadedUserListUpdateEvent);
14
+ window.dispatchEvent(new CustomEvent(index_1.Internal.BbbHookEvents.Subscribe, {
15
+ detail: { hook: index_1.Internal.BbbHooks.UseLoadedUserList },
16
+ }));
17
+ return function () {
18
+ window.dispatchEvent(new CustomEvent(index_1.Internal.BbbHookEvents.Unsubscribe, {
19
+ detail: { hook: index_1.Internal.BbbHooks.UseLoadedUserList },
20
+ }));
21
+ window.removeEventListener(index_1.Internal.BbbHookEvents.Update, handleLoadedUserListUpdateEvent);
22
+ };
23
+ }, []);
24
+ return userInfo;
25
+ };
26
+ exports.default = useLoadedUserList;
27
+ //# sourceMappingURL=user.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user.js","sourceRoot":"","sources":["../../../../src/data-consumption/hooks/user.ts"],"names":[],"mappings":";;AAAA,+BAA4C;AAC5C,qCAAuC;AAIvC,IAAM,iBAAiB,GAA6B;IAC5C,IAAA,KAA0B,IAAA,gBAAQ,GAAsB,EAAvD,QAAQ,QAAA,EAAE,WAAW,QAAkC,CAAC;IAC/D,IAAM,+BAA+B,GAAkB,CACrD,UAAC,KAAqC;QACpC,IAAI,KAAK,CAAC,MAAM,CAAC,IAAI,KAAK,gBAAQ,CAAC,QAAQ,CAAC,iBAAiB,EAAE;YAC7D,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;SAChC;IACH,CAAC,CAAkB,CAAC;IACtB,IAAA,iBAAS,EAAC;QACR,MAAM,CAAC,gBAAgB,CAAC,gBAAQ,CAAC,aAAa,CAAC,MAAM,EAAE,+BAA+B,CAAC,CAAC;QACxF,MAAM,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,gBAAQ,CAAC,aAAa,CAAC,SAAS,EAAE;YACrE,MAAM,EAAE,EAAE,IAAI,EAAE,gBAAQ,CAAC,QAAQ,CAAC,iBAAiB,EAAE;SACtD,CAAC,CAAC,CAAC;QACJ,OAAO;YACL,MAAM,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,gBAAQ,CAAC,aAAa,CAAC,WAAW,EAAE;gBACvE,MAAM,EAAE,EAAE,IAAI,EAAE,gBAAQ,CAAC,QAAQ,CAAC,iBAAiB,EAAE;aACtD,CAAC,CAAC,CAAC;YACJ,MAAM,CAAC,mBAAmB,CACxB,gBAAQ,CAAC,aAAa,CAAC,MAAM,EAC7B,+BAA+B,CAChC,CAAC;QACJ,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AAEF,kBAAe,iBAAiB,CAAC"}
@@ -0,0 +1,62 @@
1
+ export interface Cameras {
2
+ streamId: string;
3
+ meetingId: string;
4
+ userId: string;
5
+ }
6
+ export interface PresPagesWritable {
7
+ isCurrentPage: boolean;
8
+ changedModeOn: number;
9
+ meetingId: string;
10
+ pageId: string;
11
+ presentationId: string;
12
+ userId: string;
13
+ }
14
+ export interface LastBreakoutRoom {
15
+ breakoutRoomId: string;
16
+ isDefaultName: boolean;
17
+ sequence: number;
18
+ shortName: string;
19
+ currentlyInRoom: boolean;
20
+ meetingId: string;
21
+ userId: string;
22
+ }
23
+ export interface Voice {
24
+ joined: boolean;
25
+ listenOnly: boolean;
26
+ talking: boolean;
27
+ muted: boolean;
28
+ voiceUserId: string;
29
+ callerName: string;
30
+ callerNum: string;
31
+ callingWith: string;
32
+ color: string;
33
+ endTime: number;
34
+ floor: boolean;
35
+ lastFloorTime: string;
36
+ lastSpeakChangedAt: number;
37
+ meetingId: string;
38
+ spoke: boolean;
39
+ startTime: number;
40
+ }
41
+ export interface User {
42
+ userId: string;
43
+ extId: string;
44
+ name: string;
45
+ isModerator: boolean;
46
+ isOnline: boolean;
47
+ role: string;
48
+ color: string;
49
+ avatar: string;
50
+ emoji: string;
51
+ presenter?: boolean;
52
+ pinned?: boolean;
53
+ guest?: boolean;
54
+ mobile?: boolean;
55
+ whiteboardAccess?: boolean;
56
+ voice?: Voice;
57
+ locked: boolean;
58
+ lastBreakoutRoom?: LastBreakoutRoom;
59
+ cameras: Array<Cameras>;
60
+ presPagesWritable: Array<PresPagesWritable>;
61
+ speechLocale: string;
62
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=user.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user.js","sourceRoot":"","sources":["../../../../src/data-consumption/types/user.ts"],"names":[],"mappings":""}
@@ -4,7 +4,8 @@ declare enum BbbHookEvents {
4
4
  Unsubscribe = "UNSUBSCRIBE_FROM_HOOK"
5
5
  }
6
6
  declare enum BbbHooks {
7
- UseCurrentPresentation = "BbbHooks::UseCurrentPresentation"
7
+ UseCurrentPresentation = "BbbHooks::UseCurrentPresentation",
8
+ UseLoadedUserList = "BbbHooks::UseLoadedUserList"
8
9
  }
9
10
  export declare const Internal: {
10
11
  BbbHookEvents: typeof BbbHookEvents;
@@ -15,4 +16,12 @@ export declare enum PresentationToolbarItemType {
15
16
  SPINNER = "PRESENTATION_TOOLBAR_SPINNER",
16
17
  SEPARATOR = "PRESENTATION_TOOLBAR_SEPARATOR"
17
18
  }
19
+ export declare enum UserListDropdownItemType {
20
+ OPTION = "USER_LIST_DROPDOWN_OPTION",
21
+ SEPARATOR = "USER_LIST_DROPDOWN_SEPARATOR"
22
+ }
23
+ export declare enum ActionButtonDropdownItemType {
24
+ OPTION = "ACTION_BUTTON_DROPDOWN_OPTION",
25
+ SEPARATOR = "ACTION_BUTTON_DROPDOWN_SEPARATOR"
26
+ }
18
27
  export {};
package/dist/cjs/enums.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PresentationToolbarItemType = exports.Internal = void 0;
3
+ exports.ActionButtonDropdownItemType = exports.UserListDropdownItemType = exports.PresentationToolbarItemType = exports.Internal = void 0;
4
4
  var BbbHookEvents;
5
5
  (function (BbbHookEvents) {
6
6
  BbbHookEvents["Update"] = "UPDATE_HOOK";
@@ -10,6 +10,7 @@ var BbbHookEvents;
10
10
  var BbbHooks;
11
11
  (function (BbbHooks) {
12
12
  BbbHooks["UseCurrentPresentation"] = "BbbHooks::UseCurrentPresentation";
13
+ BbbHooks["UseLoadedUserList"] = "BbbHooks::UseLoadedUserList";
13
14
  })(BbbHooks || (BbbHooks = {}));
14
15
  exports.Internal = {
15
16
  BbbHookEvents: BbbHookEvents,
@@ -22,4 +23,16 @@ var PresentationToolbarItemType;
22
23
  PresentationToolbarItemType["SPINNER"] = "PRESENTATION_TOOLBAR_SPINNER";
23
24
  PresentationToolbarItemType["SEPARATOR"] = "PRESENTATION_TOOLBAR_SEPARATOR";
24
25
  })(PresentationToolbarItemType || (exports.PresentationToolbarItemType = PresentationToolbarItemType = {}));
26
+ // Participant dropdown items types:
27
+ var UserListDropdownItemType;
28
+ (function (UserListDropdownItemType) {
29
+ UserListDropdownItemType["OPTION"] = "USER_LIST_DROPDOWN_OPTION";
30
+ UserListDropdownItemType["SEPARATOR"] = "USER_LIST_DROPDOWN_SEPARATOR";
31
+ })(UserListDropdownItemType || (exports.UserListDropdownItemType = UserListDropdownItemType = {}));
32
+ // Participant dropdown items types:
33
+ var ActionButtonDropdownItemType;
34
+ (function (ActionButtonDropdownItemType) {
35
+ ActionButtonDropdownItemType["OPTION"] = "ACTION_BUTTON_DROPDOWN_OPTION";
36
+ ActionButtonDropdownItemType["SEPARATOR"] = "ACTION_BUTTON_DROPDOWN_SEPARATOR";
37
+ })(ActionButtonDropdownItemType || (exports.ActionButtonDropdownItemType = ActionButtonDropdownItemType = {}));
25
38
  //# sourceMappingURL=enums.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"enums.js","sourceRoot":"","sources":["../../src/enums.ts"],"names":[],"mappings":";;;A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AGX;AAHD,WAAY,4BAA4B;IACtC,wEAAwC,CAAA;IACxC,8EAA8C,CAAA;AAChD,CAAC,EAHW,4BAA4B,4CAA5B,4BAA4B,QAGvC"}
@@ -1,8 +1,18 @@
1
+ import { PresentationToolbarItemType, UserListDropdownItemType, ActionButtonDropdownItemType } from '../index';
2
+ type PluginProvidedUiItemType = UserListDropdownItemType | PresentationToolbarItemType | ActionButtonDropdownItemType;
1
3
  export interface PluginProvidedUiItemDescriptor {
4
+ /** Defined by BigBlueButton Plugin Engine. */
2
5
  id: string;
3
- type: string;
6
+ type: PluginProvidedUiItemType;
4
7
  setItemId: (id: string) => void;
5
8
  }
9
+ export interface CustomEventHook<T> {
10
+ data: T;
11
+ hook: string;
12
+ }
13
+ export interface CustomEventHookWrapper<T> extends Event {
14
+ detail: CustomEventHook<T>;
15
+ }
6
16
  export interface PresentationToolbarItem extends PluginProvidedUiItemDescriptor {
7
17
  }
8
18
  export interface PresentationToolbarButtonProps {
@@ -12,7 +22,7 @@ export interface PresentationToolbarButtonProps {
12
22
  }
13
23
  export declare class PresentationToolbarButton implements PresentationToolbarItem {
14
24
  id: string;
15
- type: string;
25
+ type: PresentationToolbarItemType;
16
26
  label: string;
17
27
  tooltip: string;
18
28
  onClick: () => void;
@@ -21,7 +31,7 @@ export declare class PresentationToolbarButton implements PresentationToolbarIte
21
31
  }
22
32
  export declare class PresentationToolbarSpinner implements PresentationToolbarItem {
23
33
  id: string;
24
- type: string;
34
+ type: PresentationToolbarItemType;
25
35
  constructor();
26
36
  setItemId: (id: string) => void;
27
37
  }
@@ -30,24 +40,81 @@ export interface PresentationToolbarSeparatorProps {
30
40
  }
31
41
  export declare class PresentationToolbarSeparator implements PresentationToolbarItem {
32
42
  id: string;
33
- type: string;
43
+ type: PresentationToolbarItemType;
34
44
  width: number;
35
45
  constructor({ width }: PresentationToolbarSeparatorProps);
36
46
  setItemId: (id: string) => void;
37
47
  }
48
+ export interface UserListDropdownItem extends PluginProvidedUiItemDescriptor {
49
+ userId: string;
50
+ }
51
+ interface UserListDropdownOptionProps {
52
+ label: string;
53
+ icon: string;
54
+ tooltip: string;
55
+ allowed: boolean;
56
+ userId: string;
57
+ onClick: () => void;
58
+ }
59
+ export declare class UserListDropdownOption implements UserListDropdownItem {
60
+ id: string;
61
+ userId: string;
62
+ type: UserListDropdownItemType;
63
+ label: string;
64
+ icon: string;
65
+ tooltip: string;
66
+ allowed: boolean;
67
+ onClick: () => void;
68
+ constructor({ label, icon, tooltip, allowed, onClick, userId, }: UserListDropdownOptionProps);
69
+ setItemId: (id: string) => void;
70
+ }
71
+ interface UserListDropdownSeparatorProps {
72
+ userId: string;
73
+ }
74
+ export declare class UserListDropdownSeparator implements UserListDropdownItem {
75
+ id: string;
76
+ userId: string;
77
+ type: UserListDropdownItemType;
78
+ constructor({ userId }: UserListDropdownSeparatorProps);
79
+ setItemId: (id: string) => void;
80
+ }
81
+ export interface ActionButtonDropdownItem extends PluginProvidedUiItemDescriptor {
82
+ }
83
+ interface ActionButtonDropdownOptionProps {
84
+ label: string;
85
+ icon: string;
86
+ tooltip: string;
87
+ allowed: boolean;
88
+ onClick: () => void;
89
+ }
90
+ export declare class ActionButtonDropdownOption implements ActionButtonDropdownItem {
91
+ id: string;
92
+ type: ActionButtonDropdownItemType;
93
+ label: string;
94
+ icon: string;
95
+ tooltip: string;
96
+ allowed: boolean;
97
+ onClick: () => void;
98
+ constructor({ label, icon, tooltip, allowed, onClick, }: ActionButtonDropdownOptionProps);
99
+ setItemId: (id: string) => void;
100
+ }
101
+ export declare class ActionButtonDropdownSeparator implements ActionButtonDropdownItem {
102
+ id: string;
103
+ type: ActionButtonDropdownItemType;
104
+ constructor();
105
+ setItemId: (id: string) => void;
106
+ }
38
107
  export type SetPresentationToolbarItems = (presentationToolbarItem: PresentationToolbarItem[]) => void;
108
+ export type SetUserListDropdownItems = (userListDropdownItem: UserListDropdownItem[]) => void;
109
+ export type SetActionButtonDropdownItems = (actionButtonDropdownItem: ActionButtonDropdownItem[]) => void;
39
110
  export interface PluginApi {
40
111
  setPresentationToolbarItems: SetPresentationToolbarItems;
112
+ setUserListDropdownItems: SetUserListDropdownItems;
113
+ setActionButtonDropdownItems: SetActionButtonDropdownItems;
41
114
  }
42
115
  export interface PluginBrowserWindow extends Window {
43
116
  bbb_plugins: {
44
117
  [key: string]: PluginApi;
45
118
  };
46
119
  }
47
- export interface CustomEventHook<T> {
48
- data: T;
49
- hook: string;
50
- }
51
- export interface CustomEventHookWrapper<T> extends Event {
52
- detail: CustomEventHook<T>;
53
- }
120
+ export {};
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PresentationToolbarSeparator = exports.PresentationToolbarSpinner = exports.PresentationToolbarButton = void 0;
3
+ exports.ActionButtonDropdownSeparator = exports.ActionButtonDropdownOption = exports.UserListDropdownSeparator = exports.UserListDropdownOption = exports.PresentationToolbarSeparator = exports.PresentationToolbarSpinner = exports.PresentationToolbarButton = void 0;
4
4
  var index_1 = require("../index");
5
5
  var PresentationToolbarButton = /** @class */ (function () {
6
6
  function PresentationToolbarButton(_a) {
@@ -44,4 +44,67 @@ var PresentationToolbarSeparator = /** @class */ (function () {
44
44
  return PresentationToolbarSeparator;
45
45
  }());
46
46
  exports.PresentationToolbarSeparator = PresentationToolbarSeparator;
47
+ var UserListDropdownOption = /** @class */ (function () {
48
+ function UserListDropdownOption(_a) {
49
+ var _b = _a.label, label = _b === void 0 ? '' : _b, _c = _a.icon, icon = _c === void 0 ? '' : _c, _d = _a.tooltip, tooltip = _d === void 0 ? '' : _d, _e = _a.allowed, allowed = _e === void 0 ? true : _e, _f = _a.onClick, onClick = _f === void 0 ? function () { } : _f, _g = _a.userId, userId = _g === void 0 ? '' : _g;
50
+ var _this = this;
51
+ this.id = '';
52
+ this.setItemId = function (id) {
53
+ _this.id = "UserListDropdownOption_".concat(id);
54
+ };
55
+ this.userId = userId;
56
+ this.label = label;
57
+ this.icon = icon;
58
+ this.tooltip = tooltip;
59
+ this.allowed = allowed;
60
+ this.onClick = onClick;
61
+ this.type = index_1.UserListDropdownItemType.OPTION;
62
+ }
63
+ return UserListDropdownOption;
64
+ }());
65
+ exports.UserListDropdownOption = UserListDropdownOption;
66
+ var UserListDropdownSeparator = /** @class */ (function () {
67
+ function UserListDropdownSeparator(_a) {
68
+ var _b = _a.userId, userId = _b === void 0 ? '' : _b;
69
+ var _this = this;
70
+ this.id = '';
71
+ this.setItemId = function (id) {
72
+ _this.id = "UserListDropdownSeparator_".concat(id);
73
+ };
74
+ this.userId = userId;
75
+ this.type = index_1.UserListDropdownItemType.SEPARATOR;
76
+ }
77
+ return UserListDropdownSeparator;
78
+ }());
79
+ exports.UserListDropdownSeparator = UserListDropdownSeparator;
80
+ var ActionButtonDropdownOption = /** @class */ (function () {
81
+ function ActionButtonDropdownOption(_a) {
82
+ var _b = _a.label, label = _b === void 0 ? '' : _b, _c = _a.icon, icon = _c === void 0 ? '' : _c, _d = _a.tooltip, tooltip = _d === void 0 ? '' : _d, _e = _a.allowed, allowed = _e === void 0 ? true : _e, _f = _a.onClick, onClick = _f === void 0 ? function () { } : _f;
83
+ var _this = this;
84
+ this.id = '';
85
+ this.setItemId = function (id) {
86
+ _this.id = "ActionButtonDropdownOption_".concat(id);
87
+ };
88
+ this.label = label;
89
+ this.icon = icon;
90
+ this.tooltip = tooltip;
91
+ this.allowed = allowed;
92
+ this.onClick = onClick;
93
+ this.type = index_1.ActionButtonDropdownItemType.OPTION;
94
+ }
95
+ return ActionButtonDropdownOption;
96
+ }());
97
+ exports.ActionButtonDropdownOption = ActionButtonDropdownOption;
98
+ var ActionButtonDropdownSeparator = /** @class */ (function () {
99
+ function ActionButtonDropdownSeparator() {
100
+ var _this = this;
101
+ this.id = '';
102
+ this.setItemId = function (id) {
103
+ _this.id = "ActionButtonDropdownSeparator_".concat(id);
104
+ };
105
+ this.type = index_1.ActionButtonDropdownItemType.SEPARATOR;
106
+ }
107
+ return ActionButtonDropdownSeparator;
108
+ }());
109
+ exports.ActionButtonDropdownSeparator = ActionButtonDropdownSeparator;
47
110
  //# sourceMappingURL=common.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/types/common.ts"],"names":[],"mappings":";;;AAAA,kCAAuD;AAgBvD;IAWE,mCAAY,EAAgF;YAA9E,aAAU,EAAV,KAAK,mBAAG,EAAE,KAAA,EAAE,eAAY,EAAZ,OAAO,mBAAG,EAAE,KAAA,EAAE,eAAkB,EAAlB,OAAO,mBAAG,cAAO,CAAC,KAAA;QAA1D,iBAKC;QAfD,OAAE,GAAW,EAAE,CAAC;QAiBhB,cAAS,GAAyB,UAAC,EAAU;YAC3C,KAAI,CAAC,EAAE,GAAG,oCAA6B,EAAE,CAAE,CAAC;QAC9C,CAAC,CAAC;QARA,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,mCAA2B,CAAC,MAAM,CAAC;IACjD,CAAC;IAKH,gCAAC;AAAD,CAAC,AArBD,IAqBC;AArBY,8DAAyB;AAuBtC;IAKE;QAAA,iBAEC;QAND,OAAE,GAAW,EAAE,CAAC;QAQhB,cAAS,GAAyB,UAAC,EAAU;YAC3C,KAAI,CAAC,EAAE,GAAG,oCAA6B,EAAE,CAAE,CAAC;QAC9C,CAAC,CAAC;QALA,IAAI,CAAC,IAAI,GAAG,mCAA2B,CAAC,OAAO,CAAC;IAClD,CAAC;IAKH,iCAAC;AAAD,CAAC,AAZD,IAYC;AAZY,gEAA0B;AAiBvC;IAOE,sCAAY,EAA6C;YAA3C,KAAK,WAAA;QAAnB,iBAGC;QATD,OAAE,GAAW,EAAE,CAAC;QAWhB,cAAS,GAAyB,UAAC,EAAU;YAC3C,KAAI,CAAC,EAAE,GAAG,oCAA6B,EAAE,CAAE,CAAC;QAC9C,CAAC,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D,IAYC;AAZY,sEAA6B"}
@@ -1,2 +1,3 @@
1
1
  export * from './common';
2
2
  export * from '../data-consumption/types/presentation';
3
+ export * from '../data-consumption/types/user';
@@ -16,4 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./common"), exports);
18
18
  __exportStar(require("../data-consumption/types/presentation"), exports);
19
+ __exportStar(require("../data-consumption/types/user"), exports);
19
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,yEAAuD"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,yEAAuD;AACvD,iEAA+C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bigbluebutton-html-plugin-sdk",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
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",