@agilemotion/oui-react-js 1.3.9 → 1.4.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 (94) hide show
  1. package/dist/{ApplicationContext.js → ApplicationManager.js} +196 -74
  2. package/dist/BasicApp.js +66 -63
  3. package/dist/BasicAppHome.js +85 -118
  4. package/dist/BusinessPortalAppHome.js +9 -15
  5. package/dist/DynamicJS.js +7 -3
  6. package/dist/RestUtils.js +13 -14
  7. package/dist/Utils.js +15 -9
  8. package/dist/WithRouter.js +34 -0
  9. package/dist/assets/scss/black-dashboard-react/custom/_sidebar-and-main-panel.scss +1 -1
  10. package/dist/components/AlertBar.js +1 -1
  11. package/dist/components/Button.js +34 -25
  12. package/dist/components/Calendar.js +9 -45
  13. package/dist/components/DataGrid.js +49 -18
  14. package/dist/components/DataGridColumn.js +1 -1
  15. package/dist/components/DataGridFilter.js +2 -2
  16. package/dist/components/Dialog.js +1 -1
  17. package/dist/components/DocumentViewer.js +5 -5
  18. package/dist/components/FileThumb.js +30 -19
  19. package/dist/components/Graph.js +10 -2
  20. package/dist/components/GraphNode.js +1 -1
  21. package/dist/components/HtmlPanel.js +10 -5
  22. package/dist/components/Icon.js +8 -0
  23. package/dist/components/PopupView.js +1 -1
  24. package/dist/components/Portlet.js +100 -0
  25. package/dist/components/SignaturePanel.js +1 -1
  26. package/dist/components/SocketManager.js +2 -2
  27. package/dist/components/StepperTitleBar.js +4 -4
  28. package/dist/components/TabPanel.js +11 -3
  29. package/dist/components/TableCellContent.js +1 -1
  30. package/dist/components/TemplateDesigner.js +11 -11
  31. package/dist/components/TitleBar.js +4 -3
  32. package/dist/components/Toolbar.js +42 -11
  33. package/dist/components/Tree.js +3 -3
  34. package/dist/components/dashboard/BasicBusinessAppDashboard.js +9 -7
  35. package/dist/components/dashboard/components/Header.js +1 -1
  36. package/dist/components/dashboard/components/blackDashboard/sidebar/Sidebar.css +7 -0
  37. package/dist/components/dashboard/components/blackDashboard/sidebar/Sidebar.js +74 -72
  38. package/dist/components/form/AutoComplete.js +31 -30
  39. package/dist/components/form/BaseField.js +38 -26
  40. package/dist/components/form/DatePicker.js +5 -2
  41. package/dist/components/form/FieldSet.js +11 -19
  42. package/dist/components/form/Form.js +24 -16
  43. package/dist/components/form/ImageEditor.js +4 -4
  44. package/dist/components/form/MultiFileUploadField.js +15 -14
  45. package/dist/components/form/RadioGroup.js +10 -11
  46. package/dist/components/form/Section.js +10 -0
  47. package/dist/components/form/TimePicker.js +1 -0
  48. package/dist/components/form/UploadField.js +115 -108
  49. package/dist/components/layout/Layout.js +65 -12
  50. package/dist/components/layout/View.css +1 -0
  51. package/dist/components/layout/View.js +20 -23
  52. package/dist/components/layout/ViewContainer.css +3 -0
  53. package/dist/components/layout/ViewContainer.js +59 -0
  54. package/dist/components/layout/ViewPort.js +50 -80
  55. package/dist/components/layout/Window.css +18 -0
  56. package/dist/components/layout/Window.js +287 -0
  57. package/dist/components/layout/WindowViewPort.js +71 -0
  58. package/dist/components/media/MediaSoupHelper.js +1 -1
  59. package/dist/components/media/Toolbar.css +18 -3
  60. package/dist/components/media/Toolbar.js +80 -56
  61. package/dist/components/media/TrainingRoom.js +97 -20
  62. package/dist/components/media/VCRoom.js +1 -1
  63. package/dist/components/media/VCRoomParticipant.js +17 -15
  64. package/dist/components/media/VCRoomRecorder.js +223 -0
  65. package/dist/components/media/VCRoomWorkspace.js +169 -156
  66. package/dist/components/media/VideoPlayer.css +10 -0
  67. package/dist/components/media/VideoPlayer.js +86 -0
  68. package/dist/components/menu/MenuButton.js +22 -6
  69. package/dist/components/menu/MenuLink.js +13 -10
  70. package/dist/components/navbars/HomeNavbar.js +2 -2
  71. package/dist/components/navbars/PortalNavbar.js +3 -3
  72. package/dist/components/signatures/AgilitySignaturePanel.js +4 -4
  73. package/dist/components/signatures/ImageSignatureInput.js +4 -4
  74. package/dist/components/signatures/SignatureInput.js +4 -4
  75. package/dist/components/signatures/SignatureTemplateDesigner.js +6 -6
  76. package/dist/event/ActionHandlers.js +3 -3
  77. package/dist/event/Observable.js +33 -15
  78. package/dist/event/RouteActionHandler.js +38 -29
  79. package/dist/event/ServiceCallActionHandler.js +4 -2
  80. package/dist/event/SignalGraphActionHandler.js +2 -2
  81. package/dist/js/Calendar.js +220 -0
  82. package/dist/js/Media.js +2 -2
  83. package/dist/view/Dashboard.js +34 -28
  84. package/dist/view/Views.js +30 -0
  85. package/dist/view/security/ChangePasswordBasic.js +6 -4
  86. package/dist/view/security/ForgotPassword.js +4 -4
  87. package/dist/view/security/ForgotPasswordBasic.js +4 -4
  88. package/dist/view/security/Login.js +4 -4
  89. package/dist/view/security/LoginBasic.js +5 -5
  90. package/dist/view/security/LoginBusinessPortal.js +4 -4
  91. package/dist/view/security/ResetPassword.js +4 -4
  92. package/dist/view/security/ResetPasswordBasic.js +6 -4
  93. package/package.json +6 -16
  94. package/gulpfile.js +0 -77
@@ -0,0 +1,223 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _SocketManager = _interopRequireDefault(require("../SocketManager"));
9
+
10
+ var _VCEventType = require("./VCEventType");
11
+
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
+
14
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
15
+
16
+ class VCRoomRecorder {
17
+ constructor() {
18
+ _defineProperty(this, "init", async (meetingId, meetingTitle) => {
19
+ this.meetingId = meetingId;
20
+ this.meetingTitle = meetingTitle;
21
+ });
22
+
23
+ _defineProperty(this, "addTrack", (id, track) => {
24
+ console.log('ADDING TRACK FOR : ' + id);
25
+ this.audioTracks.set(id, track);
26
+
27
+ if (this.recorder && this.recorder.state === 'recording') {
28
+ let mediaStream = new MediaStream([track]);
29
+ const mediaStreamAudioSourceNode = new MediaStreamAudioSourceNode(this.audioContext, {
30
+ mediaStream: mediaStream
31
+ });
32
+ mediaStreamAudioSourceNode.connect(this.mediaStreamAudioDestinationNode);
33
+ }
34
+ });
35
+
36
+ _defineProperty(this, "removeTrack", id => {
37
+ if (this.audioTracks.has(id)) {
38
+ this.audioTracks.delete(id);
39
+ }
40
+ });
41
+
42
+ _defineProperty(this, "handleRecordingDataAvailable", e => {
43
+ if (e.data.size > 0) {
44
+ console.log('ADDED CHUNK : ' + this.recordingSequence);
45
+ const blob = new Blob([e.data], {
46
+ type: 'video/webm'
47
+ });
48
+ const data = {
49
+ userId: sessionStorage.getItem('username'),
50
+ meetingId: this.meetingId,
51
+ name: this.meetingTitle,
52
+ type: blob.type,
53
+ size: blob.size,
54
+ sequenceNumber: this.recordingSequence,
55
+ sessionId: this.currentRecordingId
56
+ };
57
+ const reader = new FileReader();
58
+ reader.readAsDataURL(blob);
59
+
60
+ let _this = this;
61
+
62
+ reader.onload = function (evt) {
63
+ const result = evt.target.result;
64
+ _this.recordingType = blob.type;
65
+ _this.recordingSize += blob.size;
66
+ data.recordedData = result.replace('data:video/webm;base64,', '');
67
+ console.log('======== SAVING RECORDING CHUNK =========');
68
+ console.log(data);
69
+
70
+ _SocketManager.default.emitEvent(_VCEventType.VCEventType.SAVE_RECORDING, data).then(data => {
71
+ console.log('===== SAVE RECORDING SUCCESS ======');
72
+
73
+ if (!_this.isRecording) {
74
+ console.log('======= STOPPING RECORDING =======', _this.meetingTitle);
75
+ const data = {
76
+ meetingId: _this.meetingId,
77
+ userId: sessionStorage.getItem("username"),
78
+ name: _this.meetingTitle,
79
+ type: _this.recordingType,
80
+ size: _this.recordingSize,
81
+ sequenceNumber: _this.recordingSequence,
82
+ sessionId: _this.currentRecordingId
83
+ };
84
+
85
+ _SocketManager.default.emitEvent(_VCEventType.VCEventType.STOP_RECORDING, data).catch(error => {});
86
+ }
87
+ }).catch(error => {
88
+ console.log('===== SAVE RECORDING ERROR ======');
89
+ });
90
+ };
91
+
92
+ _this.recordingSequence++;
93
+ } else {
94
+ console.log('no data to push');
95
+ }
96
+ });
97
+
98
+ _defineProperty(this, "recordMeeting", async () => {
99
+ this.recorder = null;
100
+
101
+ try {
102
+ this.recorder = await this.createMediaRecorder();
103
+ } catch (e) {}
104
+
105
+ let _this = this;
106
+
107
+ if (this.recorder != null) {
108
+ _SocketManager.default.emitEvent(_VCEventType.VCEventType.TOGGLE_RECORD_MEETING, {
109
+ roomId: _this.meetingId,
110
+ isRecording: true
111
+ }).then(data => {
112
+ console.log('RECORDING STARTED : ' + data.id);
113
+ _this.currentRecordingId = data.id;
114
+ _this.recordingSequence = 0;
115
+ _this.recordingSize = 0;
116
+ _this.recordingType = '';
117
+
118
+ _this.recorder.start(60000);
119
+
120
+ _this.isRecording = true;
121
+ }).catch(error => {
122
+ console.log('RECORD START ERROR');
123
+ console.log(error);
124
+ });
125
+ }
126
+ });
127
+
128
+ _defineProperty(this, "stopRecordingMeeting", () => {
129
+ try {
130
+ this.isRecording = false;
131
+
132
+ _SocketManager.default.emitEvent(_VCEventType.VCEventType.TOGGLE_RECORD_MEETING, {
133
+ roomId: this.meetingId,
134
+ isRecording: false
135
+ }).catch(error => {});
136
+
137
+ if (this.recorder && this.recorder.stream) {
138
+ if (this.recorder.stream.getVideoTracks().length > 0) {
139
+ this.recorder.stream.getVideoTracks()[0].stop();
140
+ }
141
+
142
+ if (this.recorder.state === 'recording') {
143
+ this.recorder.stop();
144
+ }
145
+ }
146
+ } catch (e) {
147
+ console.error(e);
148
+ }
149
+ });
150
+
151
+ _defineProperty(this, "createMediaRecorder", () => {
152
+ return new Promise((resolve, reject) => {
153
+ const videoConstraints = {
154
+ cursor: true,
155
+ audio: false,
156
+ mediaSource: "screen",
157
+ preferCurrentTab: true,
158
+ selfBrowserSurface: 'include',
159
+ systemAudio: 'exclude',
160
+ surfaceSwitching: 'exclude',
161
+ monitorTypeSurfaces: 'exclude'
162
+ };
163
+
164
+ let _this = this;
165
+
166
+ navigator.mediaDevices.getDisplayMedia(videoConstraints).then(stream => {
167
+ const options = {
168
+ mimeType: 'video/webm; codecs=vp9'
169
+ };
170
+ let audioContext = new AudioContext();
171
+ let mediaStreamAudioDestinationNode = new MediaStreamAudioDestinationNode(audioContext);
172
+ let tracks = [mediaStreamAudioDestinationNode.stream.getAudioTracks()[0], stream.getVideoTracks()[0]];
173
+
174
+ if (this.audioTracks.size > 0) {
175
+ for (const value of this.audioTracks.values()) {
176
+ tracks.push(value);
177
+ let mediaStreamAudioSourceNode = new MediaStreamAudioSourceNode(audioContext, {
178
+ mediaStream: new MediaStream([value])
179
+ });
180
+ mediaStreamAudioSourceNode.connect(mediaStreamAudioDestinationNode);
181
+ }
182
+ } else {
183
+ let mediaStreamAudioSourceNode = new MediaStreamAudioSourceNode(audioContext, {
184
+ mediaStream: new MediaStream(tracks)
185
+ });
186
+ mediaStreamAudioSourceNode.connect(mediaStreamAudioDestinationNode);
187
+ }
188
+
189
+ console.log('INIT WITH TRACKS : ', tracks);
190
+ let initialMediaStream = new MediaStream(tracks);
191
+ const recorder = new MediaRecorder(initialMediaStream, options);
192
+ recorder.ondataavailable = _this.handleRecordingDataAvailable;
193
+
194
+ recorder.onstop = e => {
195
+ _this.isRecording = false;
196
+ };
197
+
198
+ this.audioContext = audioContext;
199
+ this.mediaStreamAudioDestinationNode = mediaStreamAudioDestinationNode;
200
+ resolve(recorder);
201
+ }).catch(e => {
202
+ console.error(e);
203
+ reject(new Error(e.message));
204
+ });
205
+ });
206
+ });
207
+
208
+ this.meetingId = null;
209
+ this.meetingTitle = '';
210
+ this.recordingSequence = 0;
211
+ this.currentRecordingId = null;
212
+ this.recordingType = null;
213
+ this.recordingSize = null;
214
+ this.isRecording = false;
215
+ this.recorder = null;
216
+ this.audioTracks = new Map();
217
+ }
218
+
219
+ }
220
+
221
+ const instance = new VCRoomRecorder();
222
+ var _default = instance;
223
+ exports.default = _default;