@agilemotion/oui-react-js 1.5.1 → 1.5.2
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/dist/ApplicationManager.js +20 -3
- package/dist/components/Calendar.js +27 -14
- package/dist/components/layout/Window.css +6 -0
- package/dist/components/layout/Window.js +5 -2
- package/dist/components/layout/WindowViewPort.js +6 -2
- package/dist/components/media/Timer.css +0 -2
- package/dist/components/media/Toolbar.css +20 -3
- package/dist/components/media/Toolbar.js +14 -16
- package/dist/components/media/TrainingRoom.js +3 -2
- package/dist/components/media/VCRoomParticipant.css +2 -2
- package/dist/components/media/VideoPlayer.js +43 -2
- package/dist/event/Observable.js +5 -1
- package/package.json +1 -1
|
@@ -114,7 +114,7 @@ class ApplicationManager {
|
|
|
114
114
|
} else if (!view.popUp) {
|
|
115
115
|
let legendPath = '';
|
|
116
116
|
|
|
117
|
-
for (let i = 0; i < this.graphs[0].initialNavHistoryDepth; i++) {
|
|
117
|
+
for (let i = 0; i < this.graphs[0].initialNavHistoryDepth && i < this.navHistory.length; i++) {
|
|
118
118
|
legendPath += "".concat(this.navHistory[i].title);
|
|
119
119
|
|
|
120
120
|
if (i < this.graphs[0].initialNavHistoryDepth - 1) {
|
|
@@ -123,7 +123,7 @@ class ApplicationManager {
|
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
legendPath = legendPath.length > 0 ? legendPath + legendIconArrow : '';
|
|
126
|
-
this.props.appBarTitle = "".concat(legendPath, "<span>").concat(this.graphs[0].title, "</span>");
|
|
126
|
+
this.props.appBarTitle = this.graphs[0].initialNavHistoryDepth === 0 ? titleValue : "".concat(legendPath, "<span>").concat(this.graphs[0].title, "</span>");
|
|
127
127
|
this.graphs[0].setCurrentNodeTitle(titleValue);
|
|
128
128
|
}
|
|
129
129
|
|
|
@@ -267,8 +267,9 @@ class ApplicationManager {
|
|
|
267
267
|
if (!view.window && view.parent && currentGraph && currentGraph.config.isWindow) {
|
|
268
268
|
currentGraph.anchorView = view;
|
|
269
269
|
currentGraph.anchorHistoryElement = this.navHistory[this.navHistory.length - 1];
|
|
270
|
+
currentGraph.initialNavHistoryDepth = 0;
|
|
270
271
|
this.updateContext({
|
|
271
|
-
windowDisplayState: '
|
|
272
|
+
windowDisplayState: 'PINNED'
|
|
272
273
|
});
|
|
273
274
|
}
|
|
274
275
|
});
|
|
@@ -338,6 +339,12 @@ class ApplicationManager {
|
|
|
338
339
|
|
|
339
340
|
applicationContext.windowView = null;
|
|
340
341
|
}
|
|
342
|
+
|
|
343
|
+
if (view.window) {
|
|
344
|
+
this.updateContext({
|
|
345
|
+
windowDisplayState: 'CLOSED'
|
|
346
|
+
});
|
|
347
|
+
}
|
|
341
348
|
}
|
|
342
349
|
});
|
|
343
350
|
|
|
@@ -622,6 +629,10 @@ class ApplicationManager {
|
|
|
622
629
|
|
|
623
630
|
removeLoadedGraph(routeToAnchor) {
|
|
624
631
|
instance.removeLoadedGraph(routeToAnchor);
|
|
632
|
+
},
|
|
633
|
+
|
|
634
|
+
hasActiveMeeting() {
|
|
635
|
+
return instance.hasActiveMeeting();
|
|
625
636
|
}
|
|
626
637
|
|
|
627
638
|
};
|
|
@@ -791,6 +802,12 @@ class ApplicationManager {
|
|
|
791
802
|
if (!_Utils.default.isNull(graph.anchorHistoryElement)) {
|
|
792
803
|
this.updateAppBarTitle(graph.anchorView.config.id, graph.anchorView.config.title);
|
|
793
804
|
}
|
|
805
|
+
|
|
806
|
+
if (graph.config.isWindow) {
|
|
807
|
+
this.updateContext({
|
|
808
|
+
windowDisplayState: 'CLOSED'
|
|
809
|
+
});
|
|
810
|
+
}
|
|
794
811
|
}
|
|
795
812
|
}
|
|
796
813
|
|
|
@@ -111,7 +111,9 @@ const Calendar = props => {
|
|
|
111
111
|
const dialogRef = (0, _react.useRef)(null);
|
|
112
112
|
const [dialogTop, setDialogTop] = (0, _react.useState)(null);
|
|
113
113
|
const [dialogLeft, setDialogLeft] = (0, _react.useState)(null);
|
|
114
|
-
const [refresher, setRefresher] = (0, _react.useState)(
|
|
114
|
+
const [refresher, setRefresher] = (0, _react.useState)(0);
|
|
115
|
+
const contextChangeHandler = {};
|
|
116
|
+
let counter = 1;
|
|
115
117
|
const StyledDialog = (0, _withStyles.default)({
|
|
116
118
|
root: {
|
|
117
119
|
pointerEvents: "none"
|
|
@@ -146,23 +148,31 @@ const Calendar = props => {
|
|
|
146
148
|
}).catch(ignored => {});
|
|
147
149
|
};
|
|
148
150
|
|
|
151
|
+
const handler = () => {
|
|
152
|
+
return {
|
|
153
|
+
get id() {
|
|
154
|
+
return 'calendar';
|
|
155
|
+
},
|
|
156
|
+
|
|
157
|
+
onContextChange: (context, newValues) => {
|
|
158
|
+
if (Object.keys(newValues).find(key => key === 'windowDisplayState')) {
|
|
159
|
+
setRefresher(counter > 20 ? 0 : counter++);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
|
|
149
165
|
(0, _react.useEffect)(() => {
|
|
166
|
+
contextChangeHandler.api = handler();
|
|
150
167
|
loadEvents();
|
|
151
168
|
|
|
152
169
|
_ApplicationManager.default.addApplicationContextSubscription({
|
|
153
|
-
handler:
|
|
154
|
-
get id() {
|
|
155
|
-
return 'window';
|
|
156
|
-
},
|
|
157
|
-
|
|
158
|
-
onContextChange: (context, newValues) => {
|
|
159
|
-
if (Object.keys(newValues).find(key => key === 'windowDisplayState')) {
|
|
160
|
-
setRefresher(!refresher);
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
}
|
|
170
|
+
handler: contextChangeHandler
|
|
164
171
|
});
|
|
165
172
|
}, []);
|
|
173
|
+
(0, _react.useEffect)(() => {
|
|
174
|
+
contextChangeHandler.api = handler();
|
|
175
|
+
});
|
|
166
176
|
|
|
167
177
|
const calenderScrollListener = () => {
|
|
168
178
|
setOpen(false);
|
|
@@ -411,7 +421,7 @@ const Calendar = props => {
|
|
|
411
421
|
style: {
|
|
412
422
|
marginTop: '16px'
|
|
413
423
|
}
|
|
414
|
-
}, /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
424
|
+
}, !_ApplicationManager.default.hasActiveMeeting() && /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
415
425
|
variant: 'contained',
|
|
416
426
|
size: "large",
|
|
417
427
|
color: "primary",
|
|
@@ -438,7 +448,10 @@ const Calendar = props => {
|
|
|
438
448
|
height: '100%',
|
|
439
449
|
maxHeight: '100%'
|
|
440
450
|
}, props.config)
|
|
441
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
451
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
452
|
+
key: refresher,
|
|
453
|
+
className: 'w-100 h-100'
|
|
454
|
+
}, /*#__PURE__*/_react.default.createElement(_react2.default, calendarOptions), ' '), /*#__PURE__*/_react.default.createElement(StyledDialog, {
|
|
442
455
|
open: open,
|
|
443
456
|
ref: dialogRef,
|
|
444
457
|
onClose: () => {
|
|
@@ -122,7 +122,7 @@ const Window = props => {
|
|
|
122
122
|
maximizeView(null, false);
|
|
123
123
|
} else if (newValues.windowDisplayState === 'MINIMIZED') {
|
|
124
124
|
minimizeView(null, false);
|
|
125
|
-
} else {
|
|
125
|
+
} else if (newValues.windowDisplayState === 'PINNED') {
|
|
126
126
|
pinView(null, false);
|
|
127
127
|
}
|
|
128
128
|
}
|
|
@@ -195,6 +195,8 @@ const Window = props => {
|
|
|
195
195
|
windowDisplayState: 'PINNED'
|
|
196
196
|
});
|
|
197
197
|
}
|
|
198
|
+
|
|
199
|
+
props.onPinned();
|
|
198
200
|
}
|
|
199
201
|
}
|
|
200
202
|
};
|
|
@@ -279,8 +281,9 @@ const Window = props => {
|
|
|
279
281
|
PaperComponent: PaperComponent,
|
|
280
282
|
PaperProps: {
|
|
281
283
|
id: 'meetingDialogPaper',
|
|
284
|
+
className: displayState === 'MINIMIZED' ? 'window-paper-min' : displayState === 'MAXIMIZED' ? 'window-paper-max' : 'window-paper-pinned',
|
|
282
285
|
disabled: displayState === 'MAXIMIZED',
|
|
283
|
-
style: displayState === 'MINIMIZED' ? getMinimizedStyle() : displayState === 'MAXIMIZED' ? getMaximizedStyle() :
|
|
286
|
+
style: displayState === 'MINIMIZED' ? getMinimizedStyle() : displayState === 'MAXIMIZED' ? getMaximizedStyle() : getPinnedStyle()
|
|
284
287
|
}
|
|
285
288
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
286
289
|
id: 'window-content',
|
|
@@ -70,6 +70,11 @@ const WindowViewContainer = props => {
|
|
|
70
70
|
minimizable: false,
|
|
71
71
|
open: true,
|
|
72
72
|
displayState: 'MAXIMIZED',
|
|
73
|
+
onPinned: () => {
|
|
74
|
+
if (!pinned) {
|
|
75
|
+
setPinned(true);
|
|
76
|
+
}
|
|
77
|
+
},
|
|
73
78
|
onPin: () => {
|
|
74
79
|
_ApplicationManager.default.updateContext({
|
|
75
80
|
windowDisplayState: pinned ? 'MAXIMIZED' : 'PINNED'
|
|
@@ -77,8 +82,7 @@ const WindowViewContainer = props => {
|
|
|
77
82
|
|
|
78
83
|
setPinned(!pinned);
|
|
79
84
|
},
|
|
80
|
-
onClose: () => {
|
|
81
|
-
}
|
|
85
|
+
onClose: () => {}
|
|
82
86
|
}, /*#__PURE__*/_react.default.createElement(_View.View, {
|
|
83
87
|
config: view.config,
|
|
84
88
|
parameters: view.parameters,
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
.vc-toolbar {
|
|
2
|
+
height: 80px !important;
|
|
3
|
+
}
|
|
1
4
|
|
|
2
5
|
.vc-toolbar .button-container {
|
|
3
6
|
min-width: 200px;
|
|
@@ -6,11 +9,15 @@
|
|
|
6
9
|
white-space: nowrap;
|
|
7
10
|
}
|
|
8
11
|
|
|
9
|
-
.
|
|
10
|
-
width:
|
|
12
|
+
.vc-toolbar .timer {
|
|
13
|
+
width: 48px !important;
|
|
11
14
|
text-align: center !important;
|
|
12
15
|
}
|
|
13
16
|
|
|
17
|
+
.window-pinned .vc-toolbar .spacer {
|
|
18
|
+
width: 8px !important;
|
|
19
|
+
}
|
|
20
|
+
|
|
14
21
|
.vc-toolbar button,
|
|
15
22
|
.vc-toolbar .more-button-wrapper,
|
|
16
23
|
.vc-toolbar .button-wrapper {
|
|
@@ -64,6 +71,16 @@
|
|
|
64
71
|
background-color: #e9e9e9;
|
|
65
72
|
font-size: 14px;
|
|
66
73
|
position: absolute;
|
|
67
|
-
margin-left:
|
|
74
|
+
margin-left: 60px;
|
|
68
75
|
margin-bottom: 16px;
|
|
69
76
|
}
|
|
77
|
+
|
|
78
|
+
@media only screen and (max-width: 600px) {
|
|
79
|
+
.timer {
|
|
80
|
+
display: none;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.spacer {
|
|
84
|
+
display: none;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -227,21 +227,19 @@ const Toolbar = props => {
|
|
|
227
227
|
}, roomStatus === 'SESSION_ENDED' ? /*#__PURE__*/_react.default.createElement("div", {
|
|
228
228
|
className: 'row centered-flex-box button-wrapper no-margin no-padding'
|
|
229
229
|
}, /*#__PURE__*/_react.default.createElement(_ToolbarButton.default, null)) : /*#__PURE__*/_react.default.createElement("div", {
|
|
230
|
-
className: 'row',
|
|
230
|
+
className: 'row flex-nowrap',
|
|
231
231
|
style: {
|
|
232
232
|
justifyContent: 'right',
|
|
233
233
|
margin: '8px',
|
|
234
234
|
width: '100%'
|
|
235
235
|
}
|
|
236
236
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
237
|
-
style: {
|
|
238
|
-
width: '120px'
|
|
239
|
-
},
|
|
240
237
|
className: 'timer'
|
|
241
238
|
}, /*#__PURE__*/_react.default.createElement(_Timer.default, null)), /*#__PURE__*/_react.default.createElement("div", {
|
|
242
239
|
style: {
|
|
243
240
|
width: '60px'
|
|
244
|
-
}
|
|
241
|
+
},
|
|
242
|
+
className: 'spacer'
|
|
245
243
|
}, "\xA0"), /*#__PURE__*/_react.default.createElement("div", {
|
|
246
244
|
style: {
|
|
247
245
|
display: 'flex',
|
|
@@ -251,7 +249,7 @@ const Toolbar = props => {
|
|
|
251
249
|
className: 'col button-container'
|
|
252
250
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
253
251
|
className: 'no-margin no-padding'
|
|
254
|
-
}, isHost && roomStatus === 'SESSION' &&
|
|
252
|
+
}, isHost && roomStatus === 'SESSION' && /*#__PURE__*/_react.default.createElement("div", {
|
|
255
253
|
className: 'button-wrapper col no-margin no-padding'
|
|
256
254
|
}, /*#__PURE__*/_react.default.createElement(_ToolbarButton.default, {
|
|
257
255
|
onVisibilityChange: visible => handleVisibilityChange('record', visible)
|
|
@@ -329,7 +327,7 @@ const Toolbar = props => {
|
|
|
329
327
|
id: 'MIC'
|
|
330
328
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
331
329
|
className: 'text'
|
|
332
|
-
}, "Mic")))))), ' ', roomStatus === 'SESSION' &&
|
|
330
|
+
}, "Mic")))))), ' ', roomStatus === 'SESSION' && !whiteBoardShown && /*#__PURE__*/_react.default.createElement("div", {
|
|
333
331
|
className: 'button-wrapper col no-margin no-padding'
|
|
334
332
|
}, /*#__PURE__*/_react.default.createElement(_ToolbarButton.default, {
|
|
335
333
|
onVisibilityChange: visible => handleVisibilityChange('shareScreen', visible)
|
|
@@ -368,10 +366,12 @@ const Toolbar = props => {
|
|
|
368
366
|
style: {
|
|
369
367
|
marginRight: '8px'
|
|
370
368
|
}
|
|
371
|
-
}, "Share screen")))))))), roomStatus === 'SESSION' &&
|
|
369
|
+
}, "Share screen")))))))), roomStatus === 'SESSION' && /*#__PURE__*/_react.default.createElement("div", {
|
|
370
|
+
className: 'button-wrapper'
|
|
371
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
372
372
|
className: 'marker'
|
|
373
373
|
}, participants.length), /*#__PURE__*/_react.default.createElement("div", {
|
|
374
|
-
className: 'button-wrapper
|
|
374
|
+
className: 'button-wrapper no-margin no-padding'
|
|
375
375
|
}, /*#__PURE__*/_react.default.createElement(_ToolbarButton.default, {
|
|
376
376
|
onVisibilityChange: visible => handleVisibilityChange('people', visible)
|
|
377
377
|
}, /*#__PURE__*/_react.default.createElement(_Tooltip.default, {
|
|
@@ -393,13 +393,11 @@ const Toolbar = props => {
|
|
|
393
393
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
394
394
|
className: 'text'
|
|
395
395
|
}, "People"))))))), roomStatus === 'SESSION' && /*#__PURE__*/_react.default.createElement("div", {
|
|
396
|
-
|
|
397
|
-
display: 'inline-block'
|
|
398
|
-
}
|
|
396
|
+
className: 'button-wrapper'
|
|
399
397
|
}, raisedHands.length > 0 && /*#__PURE__*/_react.default.createElement("div", {
|
|
400
398
|
className: 'marker'
|
|
401
399
|
}, raisedHands.length), /*#__PURE__*/_react.default.createElement("div", {
|
|
402
|
-
className: 'button-wrapper
|
|
400
|
+
className: 'button-wrapper no-margin no-padding'
|
|
403
401
|
}, /*#__PURE__*/_react.default.createElement(_ToolbarButton.default, {
|
|
404
402
|
onVisibilityChange: visible => handleVisibilityChange('raiseHand', visible)
|
|
405
403
|
}, /*#__PURE__*/_react.default.createElement(_Tooltip.default, {
|
|
@@ -505,7 +503,7 @@ const Toolbar = props => {
|
|
|
505
503
|
horizontal: 'right',
|
|
506
504
|
vertical: 'top'
|
|
507
505
|
}
|
|
508
|
-
}, !buttonVisibility.record && isHost && roomStatus === 'SESSION' &&
|
|
506
|
+
}, !buttonVisibility.record && isHost && roomStatus === 'SESSION' && /*#__PURE__*/_react.default.createElement("div", {
|
|
509
507
|
className: 'button-wrapper no-margin no-padding'
|
|
510
508
|
}, /*#__PURE__*/_react.default.createElement(_core.MenuItem, {
|
|
511
509
|
disabled: !isHost,
|
|
@@ -536,7 +534,7 @@ const Toolbar = props => {
|
|
|
536
534
|
id: 'MIC_OFF'
|
|
537
535
|
}) : /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
538
536
|
id: 'MIC'
|
|
539
|
-
})), "Mic")), !buttonVisibility.shareScreen && roomStatus === 'SESSION' &&
|
|
537
|
+
})), "Mic")), !buttonVisibility.shareScreen && roomStatus === 'SESSION' && !whiteBoardShown && /*#__PURE__*/_react.default.createElement("div", {
|
|
540
538
|
className: 'button-wrapper no-margin no-padding'
|
|
541
539
|
}, /*#__PURE__*/_react.default.createElement(_core.MenuItem, {
|
|
542
540
|
disabled: !isHost,
|
|
@@ -559,7 +557,7 @@ const Toolbar = props => {
|
|
|
559
557
|
style: {
|
|
560
558
|
marginRight: '8px'
|
|
561
559
|
}
|
|
562
|
-
}, "Share screen")))), !buttonVisibility.people && roomStatus === 'SESSION' &&
|
|
560
|
+
}, "Share screen")))), !buttonVisibility.people && roomStatus === 'SESSION' && /*#__PURE__*/_react.default.createElement("div", {
|
|
563
561
|
className: 'button-wrapper no-margin no-padding'
|
|
564
562
|
}, /*#__PURE__*/_react.default.createElement(_core.MenuItem, {
|
|
565
563
|
disabled: !isHost,
|
|
@@ -146,7 +146,7 @@ const TrainingRoom = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.defau
|
|
|
146
146
|
|
|
147
147
|
const onLowerHand = payload => {
|
|
148
148
|
if (raisedHands.length > 0) {
|
|
149
|
-
let index = raisedHands.findIndex(p => p
|
|
149
|
+
let index = raisedHands.findIndex(p => p === payload.userId);
|
|
150
150
|
|
|
151
151
|
if (index > -1) {
|
|
152
152
|
raisedHands.splice(index, 1);
|
|
@@ -466,7 +466,7 @@ const TrainingRoom = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.defau
|
|
|
466
466
|
borderRadius: '4px'
|
|
467
467
|
}
|
|
468
468
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
469
|
-
className: 'row no-margin no-padding w-100 h-100'
|
|
469
|
+
className: 'row flex-nowrap no-margin no-padding w-100 h-100'
|
|
470
470
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
471
471
|
className: 'col no-margin no-padding',
|
|
472
472
|
style: {
|
|
@@ -477,6 +477,7 @@ const TrainingRoom = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.defau
|
|
|
477
477
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
478
478
|
style: {
|
|
479
479
|
width: '100%',
|
|
480
|
+
height: '80px',
|
|
480
481
|
borderBottom: '1px solid #e2e2e2'
|
|
481
482
|
}
|
|
482
483
|
}, /*#__PURE__*/_react.default.createElement(_Toolbar.default, {
|
|
@@ -15,6 +15,8 @@ var _reactPlayer = _interopRequireDefault(require("react-player"));
|
|
|
15
15
|
|
|
16
16
|
var _ApplicationManager = _interopRequireDefault(require("../../ApplicationManager"));
|
|
17
17
|
|
|
18
|
+
var _Observable = _interopRequireDefault(require("../../event/Observable"));
|
|
19
|
+
|
|
18
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
21
|
|
|
20
22
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
@@ -28,10 +30,30 @@ const VideoPlayer = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.defaul
|
|
|
28
30
|
const [documentId, setDocumentId] = (0, _react.useState)(false);
|
|
29
31
|
const [downloadUrl, setDownloadUrl] = (0, _react.useState)(null);
|
|
30
32
|
|
|
33
|
+
const [disabled, setDisabled] = _react.default.useState(false);
|
|
34
|
+
|
|
35
|
+
const [visible, setVisible] = _react.default.useState(true);
|
|
36
|
+
|
|
31
37
|
_react.default.useEffect(() => {
|
|
32
38
|
props.handle.api = api();
|
|
33
39
|
});
|
|
34
40
|
|
|
41
|
+
_react.default.useEffect(() => {
|
|
42
|
+
props.handle.api = api();
|
|
43
|
+
|
|
44
|
+
let parsedConfig = _Utils.default.parseConfig(props.config, props.viewId);
|
|
45
|
+
|
|
46
|
+
_Observable.default.addSubscriptions(parsedConfig.eventHandlingConfig, props.handle, props.viewId);
|
|
47
|
+
|
|
48
|
+
_Observable.default.addSystemSubscriptions(props.viewId, parsedConfig);
|
|
49
|
+
|
|
50
|
+
props.handle.api.refresh();
|
|
51
|
+
}, []);
|
|
52
|
+
|
|
53
|
+
_react.default.useEffect(() => {
|
|
54
|
+
props.handle.api.refresh();
|
|
55
|
+
}, [documentId]);
|
|
56
|
+
|
|
35
57
|
_react.default.useEffect(() => {}, [playing]);
|
|
36
58
|
|
|
37
59
|
_react.default.useEffect(() => {
|
|
@@ -57,13 +79,32 @@ const VideoPlayer = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.defaul
|
|
|
57
79
|
setDocumentId(documentId);
|
|
58
80
|
},
|
|
59
81
|
|
|
82
|
+
get documentId() {
|
|
83
|
+
return documentId;
|
|
84
|
+
},
|
|
85
|
+
|
|
86
|
+
set disabled(disabled) {
|
|
87
|
+
setDisabled(disabled);
|
|
88
|
+
},
|
|
89
|
+
|
|
90
|
+
set visible(visible) {
|
|
91
|
+
setVisible(visible);
|
|
92
|
+
},
|
|
93
|
+
|
|
94
|
+
refresh() {
|
|
95
|
+
let parsedConfig = _Utils.default.parseConfig(props.config, props.viewId);
|
|
96
|
+
|
|
97
|
+
setDisabled(_Utils.default.evaluateBooleanExpression(parsedConfig.disabled, parsedConfig.id));
|
|
98
|
+
setVisible(_Utils.default.isNull(parsedConfig.visible) || _Utils.default.evaluateBooleanExpression(parsedConfig.visible, parsedConfig.id));
|
|
99
|
+
},
|
|
100
|
+
|
|
60
101
|
getChildren: () => {
|
|
61
102
|
return [];
|
|
62
103
|
}
|
|
63
104
|
};
|
|
64
105
|
};
|
|
65
106
|
|
|
66
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
107
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, visible && /*#__PURE__*/_react.default.createElement("div", {
|
|
67
108
|
style: _Utils.default.mergeStyles({}, props.config)
|
|
68
109
|
}, downloadUrl && /*#__PURE__*/_react.default.createElement("div", {
|
|
69
110
|
className: "player-wrapper"
|
|
@@ -79,7 +120,7 @@ const VideoPlayer = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.defaul
|
|
|
79
120
|
height: "100%",
|
|
80
121
|
onPlay: () => setPlaying(true),
|
|
81
122
|
onPause: () => setPlaying(false)
|
|
82
|
-
})));
|
|
123
|
+
}))));
|
|
83
124
|
}));
|
|
84
125
|
|
|
85
126
|
var _default = VideoPlayer;
|
package/dist/event/Observable.js
CHANGED
|
@@ -141,7 +141,11 @@ class Observable {
|
|
|
141
141
|
|
|
142
142
|
async emitContextChangeEvent(context, newValues) {
|
|
143
143
|
for (const applicationContextSubscription of this.applicationContextSubscription) {
|
|
144
|
-
applicationContextSubscription.handler.
|
|
144
|
+
if (applicationContextSubscription.handler.api) {
|
|
145
|
+
applicationContextSubscription.handler.api.onContextChange(context, newValues);
|
|
146
|
+
} else {
|
|
147
|
+
applicationContextSubscription.handler.onContextChange(context, newValues);
|
|
148
|
+
}
|
|
145
149
|
}
|
|
146
150
|
}
|
|
147
151
|
/**
|