@agilemotion/oui-react-js 1.6.9 → 1.7.0

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 (34) hide show
  1. package/dist/ApplicationManager.js +5 -6
  2. package/dist/DynamicJS.js +1 -4
  3. package/dist/RestUtils.js +26 -26
  4. package/dist/Utils.js +4 -2
  5. package/dist/components/Button.js +4 -0
  6. package/dist/components/DataGrid.js +2 -6
  7. package/dist/components/DocumentTemplateDesigner.js +27 -0
  8. package/dist/components/DocumentTemplateDesignerComponent.css +168 -0
  9. package/dist/components/DocumentTemplateDesignerComponent.js +9 -2
  10. package/dist/components/DocumentViewer.js +8 -2
  11. package/dist/components/FileThumb.js +11 -3
  12. package/dist/components/HtmlPanel.js +2 -4
  13. package/dist/components/Icon.js +7 -0
  14. package/dist/components/SocketManager.js +3 -4
  15. package/dist/components/TitleBar.js +0 -1
  16. package/dist/components/Toolbar.js +196 -22
  17. package/dist/components/UseIsVisible.js +15 -11
  18. package/dist/components/dashboard/FoldingSideTabDashboard.js +0 -1
  19. package/dist/components/form/FieldSet.js +288 -237
  20. package/dist/components/form/LookupField.js +5 -3
  21. package/dist/components/layout/Layout.js +184 -130
  22. package/dist/components/media/Toolbar.js +19 -2
  23. package/dist/components/media/ToolbarButton.js +6 -2
  24. package/dist/components/media/TrainingRoom.js +17 -3
  25. package/dist/components/media/VCRoom.css +12 -0
  26. package/dist/components/media/VCRoomWorkspace.js +3 -3
  27. package/dist/components/media/chat/ChatRoom.js +4 -10
  28. package/dist/components/media/chat/ChatRoomWrapper.js +65 -0
  29. package/dist/components/media/chat/ChatRooms.scss +10 -0
  30. package/dist/components/menu/MenuItem.js +45 -11
  31. package/dist/event/Observable.js +15 -25
  32. package/dist/event/ServiceCallActionHandler.js +2 -2
  33. package/dist/js/Docs.js +79 -0
  34. package/package.json +1 -1
@@ -27,6 +27,7 @@ var _VideoPlayer = _interopRequireDefault(require("../media/VideoPlayer"));
27
27
  var _Portlet = _interopRequireDefault(require("../Portlet"));
28
28
  var _TabPanel = _interopRequireDefault(require("../TabPanel"));
29
29
  var _DocumentTemplateDesigner = _interopRequireDefault(require("../DocumentTemplateDesigner"));
30
+ var _ChatRoomWrapper = _interopRequireDefault(require("../media/chat/ChatRoomWrapper"));
30
31
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
31
32
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
32
33
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
@@ -83,135 +84,188 @@ const Layout = exports.Layout = /*#__PURE__*/_react.default.forwardRef((props, r
83
84
  if (_Utils.default.isNull(component.id)) {
84
85
  return null;
85
86
  } else {
86
- return component.type === 'layout' ? /*#__PURE__*/_react.default.createElement(Layout, {
87
- handle: createComponentHandle(component),
88
- config: component,
89
- ref: /*#__PURE__*/_react.default.createRef(),
90
- tableRow: props.tableRow,
91
- key: index,
92
- viewId: props.viewId
93
- }) : component.type === 'toolbar' ? /*#__PURE__*/_react.default.createElement(_Toolbar.default, {
94
- config: component,
95
- handle: createComponentHandle(component),
96
- tableRow: props.tableRow,
97
- key: index,
98
- ref: /*#__PURE__*/_react.default.createRef(),
99
- viewId: props.viewId
100
- }) : component.type === 'tab' ? /*#__PURE__*/_react.default.createElement(_TabPanel.default, {
101
- config: component,
102
- handle: createComponentHandle(component),
103
- tableRow: props.tableRow,
104
- key: index,
105
- ref: /*#__PURE__*/_react.default.createRef(),
106
- viewId: props.viewId
107
- }) : component.type === 'dataGrid' ? /*#__PURE__*/_react.default.createElement(_DataGrid.DataGrid, {
108
- config: component,
109
- handle: createComponentHandle(component),
110
- ref: /*#__PURE__*/_react.default.createRef(),
111
- key: index,
112
- viewId: props.viewId
113
- }) : component.type === 'form' ? /*#__PURE__*/_react.default.createElement(_Form.default, {
114
- config: component,
115
- handle: createComponentHandle(component),
116
- ref: /*#__PURE__*/_react.default.createRef(),
117
- key: index,
118
- viewId: props.viewId,
119
- className: 'defaultForm'
120
- }) : component.type === 'htmlPanel' ? /*#__PURE__*/_react.default.createElement(_HtmlPanel.default, {
121
- config: component,
122
- handle: createComponentHandle(component),
123
- viewId: props.viewId,
124
- key: index,
125
- ref: /*#__PURE__*/_react.default.createRef()
126
- }) : component.type === 'portlet' ? /*#__PURE__*/_react.default.createElement(_Portlet.default, {
127
- config: component,
128
- handle: createComponentHandle(component),
129
- viewId: props.viewId,
130
- ref: /*#__PURE__*/_react.default.createRef()
131
- }) : component.type === 'tree' ? /*#__PURE__*/_react.default.createElement(_Tree.Tree, {
132
- config: component,
133
- handle: createComponentHandle(component),
134
- ref: /*#__PURE__*/_react.default.createRef(),
135
- key: index,
136
- viewId: props.viewId
137
- }) : component.type === 'titleBar' ? /*#__PURE__*/_react.default.createElement(_TitleBar.default, {
138
- config: component,
139
- handle: createComponentHandle(component),
140
- ref: /*#__PURE__*/_react.default.createRef(),
141
- key: index,
142
- viewId: props.viewId
143
- }) : component.type === 'stepperTitleBar' ? /*#__PURE__*/_react.default.createElement(_StepperTitleBar.default, {
144
- config: component,
145
- handle: createComponentHandle(component),
146
- ref: /*#__PURE__*/_react.default.createRef(),
147
- key: index,
148
- viewId: props.viewId
149
- }) : component.type === 'alertBar' ? /*#__PURE__*/_react.default.createElement(_AlertBar.default, {
150
- config: component,
151
- handle: createComponentHandle(component),
152
- ref: /*#__PURE__*/_react.default.createRef(),
153
- key: index,
154
- viewId: props.viewId
155
- }) : component.type === 'signatureTemplateDesigner' ? /*#__PURE__*/_react.default.createElement(_SignatureTemplateDesigner.default, {
156
- config: component,
157
- handle: createComponentHandle(component),
158
- ref: /*#__PURE__*/_react.default.createRef(),
159
- key: index,
160
- viewId: props.viewId
161
- }) : component.type === 'documentViewer' ? /*#__PURE__*/_react.default.createElement(_DocumentViewer.default, {
162
- config: component,
163
- handle: createComponentHandle(component),
164
- ref: /*#__PURE__*/_react.default.createRef(),
165
- key: index,
166
- viewId: props.viewId
167
- }) : component.type === 'vcRoom' ? /*#__PURE__*/_react.default.createElement(_VCRoom.default, {
168
- config: component,
169
- handle: createComponentHandle(component),
170
- ref: /*#__PURE__*/_react.default.createRef(),
171
- key: index,
172
- viewId: props.viewId
173
- }) : component.type === 'userVideo' ? /*#__PURE__*/_react.default.createElement(_Video.default, {
174
- config: component,
175
- handle: createComponentHandle(component),
176
- ref: /*#__PURE__*/_react.default.createRef(),
177
- key: index,
178
- viewId: props.viewId
179
- }) : component.type === 'videoPlayer' ? /*#__PURE__*/_react.default.createElement(_VideoPlayer.default, {
180
- config: component,
181
- handle: createComponentHandle(component),
182
- ref: /*#__PURE__*/_react.default.createRef(),
183
- key: index,
184
- viewId: props.viewId
185
- }) : component.type === 'signaturePanel' ? /*#__PURE__*/_react.default.createElement(_SignaturePanel.default, {
186
- config: component,
187
- handle: createComponentHandle(component),
188
- ref: /*#__PURE__*/_react.default.createRef(),
189
- key: index,
190
- viewId: props.viewId
191
- }) : component.type === 'dialog' ? /*#__PURE__*/_react.default.createElement(_Dialog.default, {
192
- config: component,
193
- handle: createComponentHandle(component),
194
- ref: /*#__PURE__*/_react.default.createRef(),
195
- key: index,
196
- viewId: props.viewId
197
- }) : component.type === 'calendar' ? /*#__PURE__*/_react.default.createElement(_Calendar.default, {
198
- config: component,
199
- handle: createComponentHandle(component),
200
- key: index,
201
- viewId: props.viewId
202
- }) : component.type === 'templateDesigner' ? /*#__PURE__*/_react.default.createElement(_TemplateDesigner.default, {
203
- config: component,
204
- handle: createComponentHandle(component),
205
- ref: /*#__PURE__*/_react.default.createRef(),
206
- key: index,
207
- viewId: props.viewId
208
- }) : component.type === 'documentTemplateDesigner' ? /*#__PURE__*/_react.default.createElement(_DocumentTemplateDesigner.default, {
209
- config: component,
210
- handle: createComponentHandle(component),
211
- ref: /*#__PURE__*/_react.default.createRef(),
212
- key: index,
213
- viewId: props.viewId
214
- }) : /*#__PURE__*/_react.default.createElement("div", null, 'Unsupported component type ' + component.type);
87
+ switch (component.type) {
88
+ case 'layout':
89
+ return /*#__PURE__*/_react.default.createElement(Layout, {
90
+ handle: createComponentHandle(component),
91
+ config: component,
92
+ ref: /*#__PURE__*/_react.default.createRef(),
93
+ tableRow: props.tableRow,
94
+ key: index,
95
+ viewId: props.viewId
96
+ });
97
+ case 'toolbar':
98
+ return /*#__PURE__*/_react.default.createElement(_Toolbar.default, {
99
+ config: component,
100
+ handle: createComponentHandle(component),
101
+ tableRow: props.tableRow,
102
+ key: index,
103
+ ref: /*#__PURE__*/_react.default.createRef(),
104
+ viewId: props.viewId
105
+ });
106
+ case 'tab':
107
+ return /*#__PURE__*/_react.default.createElement(_TabPanel.default, {
108
+ config: component,
109
+ handle: createComponentHandle(component),
110
+ tableRow: props.tableRow,
111
+ key: index,
112
+ ref: /*#__PURE__*/_react.default.createRef(),
113
+ viewId: props.viewId
114
+ });
115
+ case 'dataGrid':
116
+ return /*#__PURE__*/_react.default.createElement(_DataGrid.DataGrid, {
117
+ config: component,
118
+ handle: createComponentHandle(component),
119
+ ref: /*#__PURE__*/_react.default.createRef(),
120
+ key: index,
121
+ viewId: props.viewId
122
+ });
123
+ case 'form':
124
+ return /*#__PURE__*/_react.default.createElement(_Form.default, {
125
+ config: component,
126
+ handle: createComponentHandle(component),
127
+ ref: /*#__PURE__*/_react.default.createRef(),
128
+ key: index,
129
+ viewId: props.viewId,
130
+ className: 'defaultForm'
131
+ });
132
+ case 'htmlPanel':
133
+ return /*#__PURE__*/_react.default.createElement(_HtmlPanel.default, {
134
+ config: component,
135
+ handle: createComponentHandle(component),
136
+ viewId: props.viewId,
137
+ key: index,
138
+ ref: /*#__PURE__*/_react.default.createRef()
139
+ });
140
+ case 'portlet':
141
+ return /*#__PURE__*/_react.default.createElement(_Portlet.default, {
142
+ config: component,
143
+ handle: createComponentHandle(component),
144
+ viewId: props.viewId,
145
+ ref: /*#__PURE__*/_react.default.createRef()
146
+ });
147
+ case 'tree':
148
+ return /*#__PURE__*/_react.default.createElement(_Tree.Tree, {
149
+ config: component,
150
+ handle: createComponentHandle(component),
151
+ ref: /*#__PURE__*/_react.default.createRef(),
152
+ key: index,
153
+ viewId: props.viewId
154
+ });
155
+ case 'titleBar':
156
+ return /*#__PURE__*/_react.default.createElement(_TitleBar.default, {
157
+ config: component,
158
+ handle: createComponentHandle(component),
159
+ ref: /*#__PURE__*/_react.default.createRef(),
160
+ key: index,
161
+ viewId: props.viewId
162
+ });
163
+ case 'stepperTitleBar':
164
+ return /*#__PURE__*/_react.default.createElement(_StepperTitleBar.default, {
165
+ config: component,
166
+ handle: createComponentHandle(component),
167
+ ref: /*#__PURE__*/_react.default.createRef(),
168
+ key: index,
169
+ viewId: props.viewId
170
+ });
171
+ case 'alertBar':
172
+ return /*#__PURE__*/_react.default.createElement(_AlertBar.default, {
173
+ config: component,
174
+ handle: createComponentHandle(component),
175
+ ref: /*#__PURE__*/_react.default.createRef(),
176
+ key: index,
177
+ viewId: props.viewId
178
+ });
179
+ case 'signatureTemplateDesigner':
180
+ return /*#__PURE__*/_react.default.createElement(_SignatureTemplateDesigner.default, {
181
+ config: component,
182
+ handle: createComponentHandle(component),
183
+ ref: /*#__PURE__*/_react.default.createRef(),
184
+ key: index,
185
+ viewId: props.viewId
186
+ });
187
+ case 'documentViewer':
188
+ return /*#__PURE__*/_react.default.createElement(_DocumentViewer.default, {
189
+ config: component,
190
+ handle: createComponentHandle(component),
191
+ ref: /*#__PURE__*/_react.default.createRef(),
192
+ key: index,
193
+ viewId: props.viewId
194
+ });
195
+ case 'vcRoom':
196
+ return /*#__PURE__*/_react.default.createElement(_VCRoom.default, {
197
+ config: component,
198
+ handle: createComponentHandle(component),
199
+ ref: /*#__PURE__*/_react.default.createRef(),
200
+ key: index,
201
+ viewId: props.viewId
202
+ });
203
+ case 'userVideo':
204
+ return /*#__PURE__*/_react.default.createElement(_Video.default, {
205
+ config: component,
206
+ handle: createComponentHandle(component),
207
+ ref: /*#__PURE__*/_react.default.createRef(),
208
+ key: index,
209
+ viewId: props.viewId
210
+ });
211
+ case 'videoPlayer':
212
+ return /*#__PURE__*/_react.default.createElement(_VideoPlayer.default, {
213
+ config: component,
214
+ handle: createComponentHandle(component),
215
+ ref: /*#__PURE__*/_react.default.createRef(),
216
+ key: index,
217
+ viewId: props.viewId
218
+ });
219
+ case 'signaturePanel':
220
+ return /*#__PURE__*/_react.default.createElement(_SignaturePanel.default, {
221
+ config: component,
222
+ handle: createComponentHandle(component),
223
+ ref: /*#__PURE__*/_react.default.createRef(),
224
+ key: index,
225
+ viewId: props.viewId
226
+ });
227
+ case 'dialog':
228
+ return /*#__PURE__*/_react.default.createElement(_Dialog.default, {
229
+ config: component,
230
+ handle: createComponentHandle(component),
231
+ ref: /*#__PURE__*/_react.default.createRef(),
232
+ key: index,
233
+ viewId: props.viewId
234
+ });
235
+ case 'calendar':
236
+ return /*#__PURE__*/_react.default.createElement(_Calendar.default, {
237
+ config: component,
238
+ handle: createComponentHandle(component),
239
+ key: index,
240
+ viewId: props.viewId
241
+ });
242
+ case 'templateDesigner':
243
+ return /*#__PURE__*/_react.default.createElement(_TemplateDesigner.default, {
244
+ config: component,
245
+ handle: createComponentHandle(component),
246
+ ref: /*#__PURE__*/_react.default.createRef(),
247
+ key: index,
248
+ viewId: props.viewId
249
+ });
250
+ case 'documentTemplateDesigner':
251
+ return /*#__PURE__*/_react.default.createElement(_DocumentTemplateDesigner.default, {
252
+ config: component,
253
+ handle: createComponentHandle(component),
254
+ ref: /*#__PURE__*/_react.default.createRef(),
255
+ key: index,
256
+ viewId: props.viewId
257
+ });
258
+ case 'chatRoom':
259
+ return /*#__PURE__*/_react.default.createElement(_ChatRoomWrapper.default, {
260
+ config: component,
261
+ handle: createComponentHandle(component),
262
+ ref: /*#__PURE__*/_react.default.createRef(),
263
+ key: index,
264
+ viewId: props.viewId
265
+ });
266
+ default:
267
+ return /*#__PURE__*/_react.default.createElement("div", null, 'Unsupported component type ' + component.type);
268
+ }
215
269
  }
216
270
  }
217
271
  const api = () => {
@@ -263,7 +317,7 @@ const Layout = exports.Layout = /*#__PURE__*/_react.default.forwardRef((props, r
263
317
  border: 'none',
264
318
  minWidth: '128px',
265
319
  width: 'auto',
266
- height: 'auto',
320
+ height: '100%',
267
321
  margin: 0,
268
322
  padding: 0
269
323
  }, component);
@@ -33,6 +33,7 @@ const Toolbar = props => {
33
33
  const [raisedHandsNames, setRaisedHandsNames] = (0, _react.useState)([]);
34
34
  const [buttonVisibility, setButtonVisibility] = (0, _react.useState)({});
35
35
  const [allButtonsVisible, setAllButtonsVisible] = (0, _react.useState)(false);
36
+ const buttonStripRef = (0, _react.useRef)();
36
37
  const [testButtons, setTestButtons] = (0, _react.useState)([]);
37
38
  (0, _react.useEffect)(() => {
38
39
  let buttons = [];
@@ -184,6 +185,7 @@ const Toolbar = props => {
184
185
  }, roomStatus === 'SESSION_ENDED' ? /*#__PURE__*/_react.default.createElement("div", {
185
186
  className: 'row centered-flex-box button-wrapper no-margin no-padding'
186
187
  }, /*#__PURE__*/_react.default.createElement(_ToolbarButton.default, null)) : /*#__PURE__*/_react.default.createElement("div", {
188
+ ref: buttonStripRef,
187
189
  className: 'row flex-nowrap',
188
190
  style: {
189
191
  justifyContent: 'right',
@@ -209,6 +211,7 @@ const Toolbar = props => {
209
211
  }, isHost && roomStatus === 'SESSION' && /*#__PURE__*/_react.default.createElement("div", {
210
212
  className: 'button-wrapper col no-margin no-padding'
211
213
  }, /*#__PURE__*/_react.default.createElement(_ToolbarButton.default, {
214
+ root: buttonStripRef,
212
215
  onVisibilityChange: visible => handleVisibilityChange('record', visible)
213
216
  }, /*#__PURE__*/_react.default.createElement(_Tooltip.default, {
214
217
  title: "Record"
@@ -243,6 +246,7 @@ const Toolbar = props => {
243
246
  }))), /*#__PURE__*/_react.default.createElement("div", {
244
247
  className: 'button-wrapper col no-margin no-padding'
245
248
  }, /*#__PURE__*/_react.default.createElement(_ToolbarButton.default, {
249
+ root: buttonStripRef,
246
250
  onVisibilityChange: visible => handleVisibilityChange('video', visible)
247
251
  }, /*#__PURE__*/_react.default.createElement(_Tooltip.default, {
248
252
  title: "Video"
@@ -278,6 +282,7 @@ const Toolbar = props => {
278
282
  }))), /*#__PURE__*/_react.default.createElement("div", {
279
283
  className: 'button-wrapper col no-margin no-padding'
280
284
  }, /*#__PURE__*/_react.default.createElement(_ToolbarButton.default, {
285
+ root: buttonStripRef,
281
286
  onVisibilityChange: visible => handleVisibilityChange('audio', visible)
282
287
  }, /*#__PURE__*/_react.default.createElement(_Tooltip.default, {
283
288
  title: "Audio"
@@ -305,6 +310,7 @@ const Toolbar = props => {
305
310
  }, "Mic"))))))), ' ', roomStatus === 'SESSION' && !whiteBoardShown && /*#__PURE__*/_react.default.createElement("div", {
306
311
  className: 'button-wrapper col no-margin no-padding'
307
312
  }, /*#__PURE__*/_react.default.createElement(_ToolbarButton.default, {
313
+ root: buttonStripRef,
308
314
  onVisibilityChange: visible => handleVisibilityChange('shareScreen', visible)
309
315
  }, /*#__PURE__*/_react.default.createElement(_Tooltip.default, {
310
316
  title: "Share"
@@ -348,6 +354,7 @@ const Toolbar = props => {
348
354
  }, participants.length), /*#__PURE__*/_react.default.createElement("div", {
349
355
  className: 'button-wrapper no-margin no-padding'
350
356
  }, /*#__PURE__*/_react.default.createElement(_ToolbarButton.default, {
357
+ root: buttonStripRef,
351
358
  onVisibilityChange: visible => handleVisibilityChange('people', visible)
352
359
  }, /*#__PURE__*/_react.default.createElement(_Tooltip.default, {
353
360
  title: "People"
@@ -371,9 +378,10 @@ const Toolbar = props => {
371
378
  className: 'button-wrapper'
372
379
  }, hasUnreadChats && /*#__PURE__*/_react.default.createElement("div", {
373
380
  className: 'marker'
374
- }, hasUnreadChats), /*#__PURE__*/_react.default.createElement("div", {
381
+ }, '1'), /*#__PURE__*/_react.default.createElement("div", {
375
382
  className: 'button-wrapper no-margin no-padding'
376
383
  }, /*#__PURE__*/_react.default.createElement(_ToolbarButton.default, {
384
+ root: buttonStripRef,
377
385
  onVisibilityChange: visible => handleVisibilityChange('chat', visible)
378
386
  }, /*#__PURE__*/_react.default.createElement(_Tooltip.default, {
379
387
  title: "Chat"
@@ -400,6 +408,7 @@ const Toolbar = props => {
400
408
  }, raisedHands.length), /*#__PURE__*/_react.default.createElement("div", {
401
409
  className: 'button-wrapper no-margin no-padding'
402
410
  }, /*#__PURE__*/_react.default.createElement(_ToolbarButton.default, {
411
+ root: buttonStripRef,
403
412
  onVisibilityChange: visible => handleVisibilityChange('raiseHand', visible)
404
413
  }, /*#__PURE__*/_react.default.createElement(_Tooltip.default, {
405
414
  title: raisedHands.length > 0 ? /*#__PURE__*/_react.default.createElement("div", null, renderRaisedHandsToolTip()) : handRaised ? 'Lower hand' : 'Raise hand'
@@ -644,7 +653,15 @@ const Toolbar = props => {
644
653
  }
645
654
  }, /*#__PURE__*/_react.default.createElement(_core.ListItemIcon, null, /*#__PURE__*/_react.default.createElement(_Icon.default, {
646
655
  id: 'PEOPLE'
647
- })), /*#__PURE__*/_react.default.createElement("div", null, participants.length, "\xA0People"))), !buttonVisibility.raiseHand && roomStatus === 'SESSION' && /*#__PURE__*/_react.default.createElement("div", {
656
+ })), /*#__PURE__*/_react.default.createElement("div", null, participants.length, "\xA0People"))), roomStatus === 'SESSION' && /*#__PURE__*/_react.default.createElement("div", {
657
+ className: 'button-wrapper no-margin no-padding'
658
+ }, /*#__PURE__*/_react.default.createElement(_core.MenuItem, {
659
+ onClick: () => {
660
+ showChat();
661
+ }
662
+ }, /*#__PURE__*/_react.default.createElement(_core.ListItemIcon, null, /*#__PURE__*/_react.default.createElement(_Icon.default, {
663
+ id: 'CHAT_BUBBLE'
664
+ })), /*#__PURE__*/_react.default.createElement("div", null, hasUnreadChats ? '1' : '', "\xA0Chat"))), !buttonVisibility.raiseHand && roomStatus === 'SESSION' && /*#__PURE__*/_react.default.createElement("div", {
648
665
  className: 'button-wrapper no-margin no-padding'
649
666
  }, /*#__PURE__*/_react.default.createElement(_core.MenuItem, {
650
667
  onClick: () => {
@@ -13,8 +13,9 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
13
13
 
14
14
  const ToolbarButton = props => {
15
15
  const ref = (0, _react.useRef)();
16
- const isVisible = (0, _UseIsVisible.useIsVisible)(ref);
16
+ const isVisible = (0, _UseIsVisible.useIsVisible)(ref, props.root?.current);
17
17
  const [visible, setVisible] = (0, _react.useState)(null);
18
+ const [contentWidth, setContentWidth] = (0, _react.useState)(null);
18
19
  const {
19
20
  children
20
21
  } = props;
@@ -25,6 +26,9 @@ const ToolbarButton = props => {
25
26
  } else {
26
27
  setVisible(isVisible);
27
28
  props.onVisibilityChange(isVisible);
29
+ if (isVisible) {
30
+ setContentWidth(ref.current.getBoundingClientRect().right - ref.current.getBoundingClientRect().left);
31
+ }
28
32
  }
29
33
  }, [isVisible]);
30
34
  return /*#__PURE__*/_react.default.createElement("div", {
@@ -34,7 +38,7 @@ const ToolbarButton = props => {
34
38
  }
35
39
  }, !isVisible ? /*#__PURE__*/_react.default.createElement("div", {
36
40
  style: {
37
- width: '100%'
41
+ width: contentWidth ? contentWidth : '100%'
38
42
  }
39
43
  }, "\xA0") : children);
40
44
  };
@@ -101,6 +101,9 @@ const TrainingRoom = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.defau
101
101
  setScreenShared(false);
102
102
  setStartScreenSharing(false);
103
103
  break;
104
+ case _VCEventType.VCEventType.CHAT_MESSAGE:
105
+ onMessage(be.payload);
106
+ break;
104
107
  case _VCEventType.VCEventType.CONSUMER_TRANSPORT_FAILED:
105
108
  hangUp();
106
109
  alert('Connection error - Please check your network connection and re-join the meeting');
@@ -109,6 +112,17 @@ const TrainingRoom = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.defau
109
112
  }
110
113
  };
111
114
  };
115
+ const onMessage = message => {
116
+ if (sideBarTab !== 'Chat') {
117
+ let chatMessage = message.chatMessage;
118
+ if (_ApplicationManager.default.getUserDetails().username !== chatMessage.participant.username) {
119
+ handleMessageArrived({
120
+ message: chatMessage.participant.name + " " + chatMessage.participant.name + (chatMessage.content && chatMessage.content.trim().length > 0 ? " - " + chatMessage.content : '')
121
+ });
122
+ setHasUnreadChats(true);
123
+ }
124
+ }
125
+ };
112
126
  const onRaiseHand = payload => {
113
127
  raisedHands.push(payload.userId);
114
128
  setRaisedHands([].concat(raisedHands));
@@ -258,7 +272,7 @@ const TrainingRoom = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.defau
258
272
  }).then(initialContext => {
259
273
  setDisplayState(initialContext ? initialContext.windowDisplayState : 'MAXIMIZED');
260
274
  });
261
- _VCEventManager.default.addSubscriptions(eventHandler, _VCEventType.VCEventType.REQUEST_TO_JOIN_MEETING, _VCEventType.VCEventType.USER_JOINED, _VCEventType.VCEventType.USER_LEFT_MEETING, _VCEventType.VCEventType.SYSTEM_EVENT, _VCEventType.VCEventType.SOCKET_CONNECT, _VCEventType.VCEventType.SOCKET_DISCONNECT, _VCEventType.VCEventType.RAISE_HAND, _VCEventType.VCEventType.LOWER_HAND, _VCEventType.VCEventType.PEER_DISCONNECT, _VCEventType.VCEventType.CONSUMER_TRANSPORT_FAILED, _VCEventType.VCEventType.CREATE_TRANSPORT_FAILED, _VCEventType.VCEventType.SHARING_STOPPED, _VCEventType.VCEventType.END_SESSION, _VCEventType.VCEventType.AUDIO_VISUAL_SETTINGS_CHANGED);
275
+ _VCEventManager.default.addSubscriptions(eventHandler, _VCEventType.VCEventType.REQUEST_TO_JOIN_MEETING, _VCEventType.VCEventType.USER_JOINED, _VCEventType.VCEventType.USER_LEFT_MEETING, _VCEventType.VCEventType.SYSTEM_EVENT, _VCEventType.VCEventType.SOCKET_CONNECT, _VCEventType.VCEventType.SOCKET_DISCONNECT, _VCEventType.VCEventType.RAISE_HAND, _VCEventType.VCEventType.LOWER_HAND, _VCEventType.VCEventType.PEER_DISCONNECT, _VCEventType.VCEventType.CONSUMER_TRANSPORT_FAILED, _VCEventType.VCEventType.CREATE_TRANSPORT_FAILED, _VCEventType.VCEventType.SHARING_STOPPED, _VCEventType.VCEventType.END_SESSION, _VCEventType.VCEventType.CHAT_MESSAGE, _VCEventType.VCEventType.AUDIO_VISUAL_SETTINGS_CHANGED);
262
276
  document.addEventListener('sideBarToggleEvent', handleSidebarToggle);
263
277
  _ApplicationManager.default.setHasActiveMeeting(true);
264
278
  return () => {
@@ -533,8 +547,8 @@ const TrainingRoom = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.defau
533
547
  onHostVideoMute: participant => {
534
548
  changeOtherParticipantAVSettings(participant.userId, participant.audioMuted, true);
535
549
  }
536
- }))), sideBarOpen && sideBarTab && displayState === 'MAXIMIZED' && roomStatus === Status.SESSION && /*#__PURE__*/_react.default.createElement("div", {
537
- className: 'closable-panel-container'
550
+ }))), sideBarOpen && sideBarTab && roomStatus === Status.SESSION && /*#__PURE__*/_react.default.createElement("div", {
551
+ className: displayState === 'MAXIMIZED' ? 'closable-panel-container' : 'closable-panel-container-pinned'
538
552
  }, /*#__PURE__*/_react.default.createElement(_ClosablePanel.default, {
539
553
  closeHandler: e => {
540
554
  setSideBarOpen(false);
@@ -37,6 +37,18 @@
37
37
  margin-left: 16px;
38
38
  }
39
39
 
40
+ .closable-panel-container-pinned {
41
+ background-color: #f9f9f9;
42
+ color: #000000;
43
+ height: 380px;
44
+ width: 20%;
45
+ min-width: 288px;
46
+ margin-left: 8px;
47
+ position: absolute;
48
+ bottom: 8px;
49
+ border: 1px solid #e1e1e1;
50
+ }
51
+
40
52
  .participants-container {
41
53
  width: 25%;
42
54
  height: 100%;
@@ -117,11 +117,11 @@ const VCRoomWorkspace = props => {
117
117
  googCpuOveruseThreshold: 70
118
118
  }
119
119
  },
120
- preferCurrentTab: true,
120
+ preferCurrentTab: false,
121
121
  selfBrowserSurface: 'include',
122
122
  systemAudio: 'exclude',
123
123
  surfaceSwitching: 'exclude',
124
- monitorTypeSurfaces: 'exclude'
124
+ monitorTypeSurfaces: 'include'
125
125
  };
126
126
  _SocketManager.default.emitEvent(_VCEventType.VCEventType.CANCEL_SCREEN_SHARE, {
127
127
  roomId: props.meetingId
@@ -518,7 +518,7 @@ const VCRoomWorkspace = props => {
518
518
  }
519
519
  }, (roomStatus === 'LOBBY' || props.allUserParticipantsLeft) && /*#__PURE__*/_react.default.createElement("div", {
520
520
  style: {
521
- height: displayState === 'MAXIMIZED' ? 'calc(100% - 232px)' : '100%',
521
+ height: displayState === 'MAXIMIZED' ? 'calc(100% - 232px)' : 'calc(100% - 120px)',
522
522
  fontSize: '28px',
523
523
  width: '100%',
524
524
  justifyContent: 'center',
@@ -70,6 +70,7 @@ const ChatRoom = props => {
70
70
  };
71
71
  };
72
72
  const fetchChat = () => {
73
+ alert("MEETING ID : ", selectedChat.meetingId);
73
74
  (0, _RestUtils.sendRequest)(`${location + '/' + _ApplicationManager.default.getContextRoot()}/calendar/api/v1/chat/fetchMeetingChat/${selectedChat.meetingId}`, response => {
74
75
  if (response && response.id) {
75
76
  setSelectedChat(response);
@@ -102,7 +103,6 @@ const ChatRoom = props => {
102
103
  }
103
104
  };
104
105
  const onDeleteMessage = payload => {
105
- console.log("\n\n\n\nDELETE MESSAGE PAYLOAD : ", payload);
106
106
  console.log("MESSAGES : ", messages);
107
107
  let msg = messages.find(m => m.id === payload.messageId);
108
108
  console.log(msg);
@@ -135,7 +135,7 @@ const ChatRoom = props => {
135
135
  if (selectedChat.type === 'CALENDAR_MEETING' || selectedChat.title) {
136
136
  return selectedChat.title;
137
137
  }
138
- return _Utils.default.getChatMeetingTitle(selectedChat.participants, currentUser.userId, 58);
138
+ return '';
139
139
  };
140
140
  (0, _react.useEffect)(() => {
141
141
  setSelectedChat(props.selectedChat);
@@ -627,17 +627,11 @@ const ChatRoom = props => {
627
627
  }
628
628
  }, selectedChat.type === 'CALENDAR_MEETING' || selectedChat.participants.length > 2 ? /*#__PURE__*/_react.default.createElement(_reactFeather.Calendar, null) : _Utils.default.getInitials(selectedChat.participants.find(p => p.username !== currentUser.username).name))), /*#__PURE__*/_react.default.createElement("h5", null, getChatRoomTitle())), /*#__PURE__*/_react.default.createElement("div", {
629
629
  className: "chatroom__headerright"
630
- }, !props.chatTab && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Tooltip.default, {
631
- title: "Add People"
632
- }, /*#__PURE__*/_react.default.createElement(_core.IconButton, {
633
- onClick: e => {
634
- openAddPeopleDialog(e);
635
- }
636
- }, /*#__PURE__*/_react.default.createElement(_icons.GroupAdd, null)))))), mode === 'CHAT' ? /*#__PURE__*/_react.default.createElement("div", {
630
+ }, !props.chatTab && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null))), mode === 'CHAT' ? /*#__PURE__*/_react.default.createElement("div", {
637
631
  id: "messages",
638
632
  ref: messagesEndRef,
639
633
  className: "chatroom__body"
640
- }, messages.sort((a, b) => new Date(a.createdDate) - new Date(b.createdDate))?.map(renderMessage)) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null), mode === 'CHAT' && /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("form", {
634
+ }, messages.sort((a, b) => new Date(a.createdDate) - new Date(b.createdDate))?.map(renderMessage)) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null), mode === 'CHAT' && !props.readOnly && /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("form", {
641
635
  className: "chatroom__sendMessage"
642
636
  }, /*#__PURE__*/_react.default.createElement("div", {
643
637
  className: "message__imageSelector",