@agilemotion/oui-react-js 1.6.4 → 1.6.5
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 +675 -1044
- package/dist/BasicApp.js +7 -27
- package/dist/BasicAppHome.js +27 -101
- package/dist/DynamicJS.js +109 -197
- package/dist/InteractionPortalApp.js +7 -27
- package/dist/InteractionPortalAppHome.js +21 -87
- package/dist/InteractionPortalApp_old.js +60 -122
- package/dist/RestUtils.js +269 -410
- package/dist/TypedValue.js +20 -26
- package/dist/Utils.js +295 -481
- package/dist/WithRouter.js +9 -17
- package/dist/assets/jss/components/authNavbarStyle.js +168 -171
- package/dist/assets/jss/components/buttonStyle.js +2 -5
- package/dist/assets/jss/components/cardAvatarStyle.js +2 -5
- package/dist/assets/jss/components/cardBodyStyle.js +2 -5
- package/dist/assets/jss/components/cardFooterStyle.js +2 -5
- package/dist/assets/jss/components/cardHeaderStyle.js +20 -17
- package/dist/assets/jss/components/cardIconStyle.js +2 -5
- package/dist/assets/jss/components/cardStyle.js +2 -5
- package/dist/assets/jss/components/cardTextStyle.js +2 -5
- package/dist/assets/jss/components/customDropdownStyle.js +171 -173
- package/dist/assets/jss/components/customInputStyle.js +5 -13
- package/dist/assets/jss/components/dropdownStyle.js +71 -74
- package/dist/assets/jss/components/footerStyle.js +14 -23
- package/dist/assets/jss/components/headerLinksStyle.js +52 -53
- package/dist/assets/jss/components/headerStyle.js +68 -73
- package/dist/assets/jss/components/navbarLinksStyle.js +81 -74
- package/dist/assets/jss/components/navbarStyle.js +79 -84
- package/dist/assets/jss/components/sidebarStyle.js +438 -441
- package/dist/assets/jss/components/typographyStyle.js +5 -13
- package/dist/assets/jss/rootStyle.js +85 -151
- package/dist/assets/jss/views/layoutStyle.js +45 -51
- package/dist/assets/jss/views/loginBasicStyle.js +2 -5
- package/dist/assets/jss/views/loginBusinessPortalStyle.js +2 -5
- package/dist/assets/jss/views/loginStyle.js +80 -87
- package/dist/components/AlertBar.js +20 -75
- package/dist/components/AlertItem.js +13 -49
- package/dist/components/AlertTemplate.js +12 -18
- package/dist/components/Button.js +41 -112
- package/dist/components/Calendar.js +99 -208
- package/dist/components/ConfirmationDialog.js +13 -54
- package/dist/components/DataGrid.js +271 -695
- package/dist/components/DataGridColumn.js +24 -74
- package/dist/components/DataGridFilter.js +107 -245
- package/dist/components/DataGridHeading.js +34 -78
- package/dist/components/Dialog.js +37 -130
- package/dist/components/DocumentTemplateDesigner.js +16 -57
- package/dist/components/DocumentTemplateDesignerComponent.js +47 -141
- package/dist/components/DocumentTemplatePlaceholderDialog.js +34 -67
- package/dist/components/DocumentViewer.js +25 -65
- package/dist/components/DocumentViewerComponent.js +13 -44
- package/dist/components/ElementResizeHandler.js +148 -200
- package/dist/components/FileThumb.js +15 -56
- package/dist/components/Graph.js +98 -203
- package/dist/components/GraphNode.js +20 -61
- package/dist/components/HtmlPanel.js +38 -105
- package/dist/components/Icon.js +174 -253
- package/dist/components/LoadingIndicator.js +4 -11
- package/dist/components/LottieIcon.js +63 -60
- package/dist/components/PopupView.js +21 -60
- package/dist/components/Portlet.js +18 -60
- package/dist/components/RegularButton.js +34 -42
- package/dist/components/SignaturePanel.js +19 -67
- package/dist/components/SocketManager.js +133 -228
- package/dist/components/StepperTitleBar.js +48 -99
- package/dist/components/TabPage.js +30 -47
- package/dist/components/TabPanel.js +35 -122
- package/dist/components/TableCellContent.js +34 -98
- package/dist/components/TemplateDesigner.js +115 -230
- package/dist/components/TemplateItemEventHandler.js +298 -481
- package/dist/components/TemplateTable.js +117 -218
- package/dist/components/TitleBar.js +15 -53
- package/dist/components/Toolbar.js +44 -110
- package/dist/components/Tooltip.js +37 -56
- package/dist/components/Tree.js +50 -143
- package/dist/components/UseIsVisible.js +5 -25
- package/dist/components/card/Card.js +35 -39
- package/dist/components/card/CardAvatar.js +21 -32
- package/dist/components/card/CardBody.js +29 -36
- package/dist/components/card/CardFooter.js +26 -35
- package/dist/components/card/CardHeader.js +29 -36
- package/dist/components/card/CardIcon.js +15 -29
- package/dist/components/card/CardText.js +15 -29
- package/dist/components/customInput/CustomInput.js +38 -40
- package/dist/components/dashboard/FoldingSideTabDashboard.js +65 -184
- package/dist/components/dashboard/SideMenuModuleDashboard.js +67 -185
- package/dist/components/dashboard/TopMenuModuleDashboard.js +22 -63
- package/dist/components/dashboard/components/Header.js +15 -52
- package/dist/components/dashboard/components/LeftDrawer.js +9 -23
- package/dist/components/dashboard/components/UserIdentity.js +4 -12
- package/dist/components/dashboard/components/blackDashboard/fixedPlugin/FixedPlugin.js +115 -155
- package/dist/components/dashboard/components/blackDashboard/sidebar/FoldingTabSidebar.js +344 -419
- package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenu.js +15 -29
- package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenuSidebar.js +405 -485
- package/dist/components/dashboard/components/portal/Timeline.js +3 -8
- package/dist/components/dashboard/components/portal/Workspace.js +4 -13
- package/dist/components/footer/Footer.js +23 -45
- package/dist/components/footer/HomeFooter.js +38 -78
- package/dist/components/form/AddressSearch.js +26 -76
- package/dist/components/form/AutoComplete.js +54 -168
- package/dist/components/form/BaseField.js +59 -189
- package/dist/components/form/Checkbox.js +11 -24
- package/dist/components/form/DatePicker.js +28 -82
- package/dist/components/form/FieldSet.js +84 -300
- package/dist/components/form/Form.js +206 -501
- package/dist/components/form/GridField.js +83 -243
- package/dist/components/form/IconField.js +10 -21
- package/dist/components/form/ImageEditor.js +98 -208
- package/dist/components/form/LabelField.js +13 -28
- package/dist/components/form/LookupField.js +36 -102
- package/dist/components/form/MultiFileUploadField.js +67 -134
- package/dist/components/form/RadioGroup.js +20 -57
- package/dist/components/form/Section.js +33 -118
- package/dist/components/form/SelectItem.js +36 -83
- package/dist/components/form/SignatureTemplateDesignerField.js +12 -26
- package/dist/components/form/Switch.js +11 -24
- package/dist/components/form/TextField.js +19 -55
- package/dist/components/form/TimePicker.js +18 -43
- package/dist/components/form/TransferList.js +76 -200
- package/dist/components/form/UploadField.js +134 -256
- package/dist/components/grid/GridContainer.js +10 -23
- package/dist/components/grid/GridItem.js +10 -23
- package/dist/components/layout/CollapsiblePanel.js +20 -59
- package/dist/components/layout/Layout.js +40 -149
- package/dist/components/layout/View.js +65 -195
- package/dist/components/layout/ViewContainer.js +13 -33
- package/dist/components/layout/ViewPort.js +14 -48
- package/dist/components/layout/Window.js +62 -135
- package/dist/components/layout/WindowViewPort.js +18 -63
- package/dist/components/media/ClosablePanel.js +9 -18
- package/dist/components/media/LobbyWaitingList.js +11 -17
- package/dist/components/media/MediaSoupHelper.js +173 -401
- package/dist/components/media/SideBarContent.js +17 -34
- package/dist/components/media/SocketRequest.js +7 -18
- package/dist/components/media/SocketResponse.js +5 -14
- package/dist/components/media/Timer.js +18 -54
- package/dist/components/media/Toolbar.js +97 -254
- package/dist/components/media/ToolbarButton.js +34 -95
- package/dist/components/media/Toolbar_bck.js +70 -186
- package/dist/components/media/Tracks.js +19 -33
- package/dist/components/media/TrainingRoom.js +121 -374
- package/dist/components/media/Transports.js +17 -29
- package/dist/components/media/VCEventManager.js +45 -116
- package/dist/components/media/VCEventType.js +82 -168
- package/dist/components/media/VCParticipantList.js +16 -51
- package/dist/components/media/VCParticipantListItem.js +44 -141
- package/dist/components/media/VCRoom.js +14 -58
- package/dist/components/media/VCRoomParticipant.js +235 -556
- package/dist/components/media/VCRoomRecorder.js +106 -204
- package/dist/components/media/VCRoomWorkspace.js +248 -584
- package/dist/components/media/Video.js +27 -112
- package/dist/components/media/VideoPlayer.js +23 -91
- package/dist/components/media/chat/ChatRoom.js +143 -361
- package/dist/components/media/chat/ChatRoomItem.js +17 -58
- package/dist/components/media/chat/ChatRoomList.js +15 -60
- package/dist/components/menu/CollapsibleMenu.js +22 -52
- package/dist/components/menu/MenuBars.js +50 -116
- package/dist/components/menu/MenuButton.js +53 -130
- package/dist/components/menu/MenuItem.js +11 -51
- package/dist/components/menu/MenuLink.js +13 -41
- package/dist/components/menu/PopupMenu.js +13 -25
- package/dist/components/navbars/AuthNavbar.js +21 -56
- package/dist/components/navbars/HomeNavbar.js +213 -290
- package/dist/components/navbars/PortalNavbar.js +26 -81
- package/dist/components/signatures/AgilitySignaturePanel.js +41 -135
- package/dist/components/signatures/AlertItem.js +14 -50
- package/dist/components/signatures/Card.js +6 -16
- package/dist/components/signatures/DocumentContainer.js +57 -165
- package/dist/components/signatures/ImageSignatureInput.js +64 -124
- package/dist/components/signatures/MenuButton.js +28 -63
- package/dist/components/signatures/Prompt.js +6 -41
- package/dist/components/signatures/ResponsiveTable.js +181 -370
- package/dist/components/signatures/SearchView.js +34 -112
- package/dist/components/signatures/SignatorySearch.js +11 -44
- package/dist/components/signatures/SignatorySearchForm.js +19 -50
- package/dist/components/signatures/SignatureInput.js +28 -91
- package/dist/components/signatures/SignatureInputProps.js +49 -144
- package/dist/components/signatures/SignatureTemplateDesigner.js +230 -430
- package/dist/components/signatures/Toolbar.js +99 -173
- package/dist/components/signatures/ViewUtils.js +207 -313
- package/dist/components/typography/Danger.js +6 -11
- package/dist/components/typography/Info.js +7 -11
- package/dist/components/typography/Link.js +6 -12
- package/dist/event/ActionHandlers.js +48 -87
- package/dist/event/Event.js +21 -25
- package/dist/event/EventListener.js +54 -48
- package/dist/event/EventType.js +18 -40
- package/dist/event/LoadDataActionHandler.js +10 -31
- package/dist/event/Observable.js +204 -396
- package/dist/event/RouteActionHandler.js +119 -171
- package/dist/event/ScriptActionHandler.js +10 -32
- package/dist/event/ServiceCallActionHandler.js +37 -64
- package/dist/event/SignalGraphActionHandler.js +9 -31
- package/dist/js/Addresses.js +23 -42
- package/dist/js/Calendar.js +41 -89
- package/dist/js/DynamicLib.js +11 -23
- package/dist/js/Media.js +80 -174
- package/dist/js/Validators.js +6 -12
- package/dist/js/Windows.js +22 -40
- package/dist/redux/store/ConfigureStore.js +12 -29
- package/dist/redux/store/DashboardStore.js +47 -120
- package/dist/redux/store/History.js +2 -5
- package/dist/redux/store/SecurityStore.js +22 -65
- package/dist/security/TokenManager.js +29 -53
- package/dist/theme-default.js +3 -8
- package/dist/view/Dashboard.js +140 -308
- package/dist/view/PortalDashboard.js +6 -13
- package/dist/view/Settings.js +3 -11
- package/dist/view/Views.js +15 -35
- package/dist/view/security/ChangePasswordBasic.js +41 -147
- package/dist/view/security/ForgotPassword.js +26 -106
- package/dist/view/security/ForgotPasswordBasic.js +22 -96
- package/dist/view/security/Login.js +29 -117
- package/dist/view/security/LoginBasic.js +28 -108
- package/dist/view/security/LoginInteractionPortal.js +28 -106
- package/dist/view/security/ResetPassword.js +25 -110
- package/dist/view/security/ResetPasswordBasic.js +39 -142
- package/dist/view/security/Security.js +14 -26
- package/package.json +25 -20
|
@@ -1,45 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports.default = exports.VIDEO_CONSTRAINTS = void 0;
|
|
9
|
-
|
|
10
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
8
|
var _Utils = _interopRequireDefault(require("../../Utils"));
|
|
13
|
-
|
|
14
9
|
require("./Video.css");
|
|
15
|
-
|
|
16
10
|
var _Icon = _interopRequireDefault(require("../Icon"));
|
|
17
|
-
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
|
-
|
|
24
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
25
|
-
|
|
26
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
27
|
-
|
|
28
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
29
|
-
|
|
30
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
31
|
-
|
|
32
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
33
|
-
|
|
34
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
35
|
-
|
|
36
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
37
|
-
|
|
38
|
-
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
39
|
-
|
|
40
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
41
|
-
|
|
42
|
-
var VIDEO_CONSTRAINTS = {
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
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); }
|
|
13
|
+
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; }
|
|
14
|
+
const VIDEO_CONSTRAINTS = exports.VIDEO_CONSTRAINTS = {
|
|
43
15
|
audio: false,
|
|
44
16
|
video: {
|
|
45
17
|
width: {
|
|
@@ -52,109 +24,54 @@ var VIDEO_CONSTRAINTS = {
|
|
|
52
24
|
}
|
|
53
25
|
}
|
|
54
26
|
};
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
62
|
-
stream = _useState2[0],
|
|
63
|
-
setStream = _useState2[1];
|
|
64
|
-
|
|
65
|
-
var _useState3 = (0, _react.useState)(false),
|
|
66
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
67
|
-
on = _useState4[0],
|
|
68
|
-
setOn = _useState4[1];
|
|
69
|
-
|
|
70
|
-
_react.default.useEffect(function () {
|
|
71
|
-
return function () {
|
|
27
|
+
const Video = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
28
|
+
const userVideo = (0, _react.useRef)();
|
|
29
|
+
const [stream, setStream] = (0, _react.useState)();
|
|
30
|
+
const [on, setOn] = (0, _react.useState)(false);
|
|
31
|
+
_react.default.useEffect(() => {
|
|
32
|
+
return () => {
|
|
72
33
|
closeStream();
|
|
73
34
|
};
|
|
74
35
|
}, []);
|
|
75
|
-
|
|
76
|
-
_react.default.useEffect(function () {
|
|
36
|
+
_react.default.useEffect(() => {
|
|
77
37
|
props.handle.api = api();
|
|
78
38
|
});
|
|
79
|
-
|
|
80
|
-
_react.default.useEffect(function () {
|
|
39
|
+
_react.default.useEffect(() => {
|
|
81
40
|
if (on) {
|
|
82
41
|
start();
|
|
83
42
|
} else if (userVideo.current && userVideo.current.srcObject) {
|
|
84
43
|
closeStream();
|
|
85
44
|
}
|
|
86
45
|
}, [on]);
|
|
87
|
-
|
|
88
|
-
var closeStream = function closeStream() {
|
|
46
|
+
const closeStream = () => {
|
|
89
47
|
if (stream) {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
try {
|
|
94
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
95
|
-
var track = _step.value;
|
|
96
|
-
track.stop();
|
|
97
|
-
}
|
|
98
|
-
} catch (err) {
|
|
99
|
-
_iterator.e(err);
|
|
100
|
-
} finally {
|
|
101
|
-
_iterator.f();
|
|
48
|
+
for (const track of stream.getTracks()) {
|
|
49
|
+
track.stop();
|
|
102
50
|
}
|
|
103
51
|
}
|
|
104
52
|
};
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
return navigator.mediaDevices.getUserMedia(VIDEO_CONSTRAINTS);
|
|
116
|
-
|
|
117
|
-
case 3:
|
|
118
|
-
videoStream = _context.sent;
|
|
119
|
-
userVideo.current.srcObject = videoStream;
|
|
120
|
-
setStream(videoStream);
|
|
121
|
-
_context.next = 11;
|
|
122
|
-
break;
|
|
123
|
-
|
|
124
|
-
case 8:
|
|
125
|
-
_context.prev = 8;
|
|
126
|
-
_context.t0 = _context["catch"](0);
|
|
127
|
-
setOn(false);
|
|
128
|
-
|
|
129
|
-
case 11:
|
|
130
|
-
case "end":
|
|
131
|
-
return _context.stop();
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}, _callee, null, [[0, 8]]);
|
|
135
|
-
}));
|
|
136
|
-
|
|
137
|
-
return function start() {
|
|
138
|
-
return _ref.apply(this, arguments);
|
|
139
|
-
};
|
|
140
|
-
}();
|
|
141
|
-
|
|
142
|
-
var api = function api() {
|
|
53
|
+
const start = async () => {
|
|
54
|
+
try {
|
|
55
|
+
let videoStream = await navigator.mediaDevices.getUserMedia(VIDEO_CONSTRAINTS);
|
|
56
|
+
userVideo.current.srcObject = videoStream;
|
|
57
|
+
setStream(videoStream);
|
|
58
|
+
} catch (e) {
|
|
59
|
+
setOn(false);
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
const api = () => {
|
|
143
63
|
return {
|
|
144
64
|
get id() {
|
|
145
65
|
return props.config.id;
|
|
146
66
|
},
|
|
147
|
-
|
|
148
67
|
set on(on) {
|
|
149
68
|
setOn(on);
|
|
150
69
|
},
|
|
151
|
-
|
|
152
|
-
getChildren: function getChildren() {
|
|
70
|
+
getChildren: () => {
|
|
153
71
|
return [];
|
|
154
72
|
}
|
|
155
73
|
};
|
|
156
74
|
};
|
|
157
|
-
|
|
158
75
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
159
76
|
className: 'centered-flex-box user-video',
|
|
160
77
|
style: _Utils.default.mergeStyles({
|
|
@@ -190,6 +107,4 @@ var Video = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwar
|
|
|
190
107
|
}
|
|
191
108
|
})));
|
|
192
109
|
}));
|
|
193
|
-
|
|
194
|
-
var _default = Video;
|
|
195
|
-
exports.default = _default;
|
|
110
|
+
var _default = exports.default = Video;
|
|
@@ -1,93 +1,40 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports.default = void 0;
|
|
9
|
-
|
|
10
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
8
|
var _Utils = _interopRequireDefault(require("../../Utils"));
|
|
13
|
-
|
|
14
9
|
require("./VideoPlayer.css");
|
|
15
|
-
|
|
16
10
|
var _reactPlayer = _interopRequireDefault(require("react-player"));
|
|
17
|
-
|
|
18
11
|
var _ApplicationManager = _interopRequireDefault(require("../../ApplicationManager"));
|
|
19
|
-
|
|
20
12
|
var _Observable = _interopRequireDefault(require("../../event/Observable"));
|
|
21
|
-
|
|
22
|
-
function
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
33
|
-
|
|
34
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
35
|
-
|
|
36
|
-
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
37
|
-
|
|
38
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
39
|
-
|
|
40
|
-
var location = window.location.protocol + '//' + window.location.hostname;
|
|
41
|
-
|
|
42
|
-
var VideoPlayer = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
43
|
-
var _useState = (0, _react.useState)(false),
|
|
44
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
45
|
-
playing = _useState2[0],
|
|
46
|
-
setPlaying = _useState2[1];
|
|
47
|
-
|
|
48
|
-
var _useState3 = (0, _react.useState)(false),
|
|
49
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
50
|
-
documentId = _useState4[0],
|
|
51
|
-
setDocumentId = _useState4[1];
|
|
52
|
-
|
|
53
|
-
var _useState5 = (0, _react.useState)(null),
|
|
54
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
55
|
-
downloadUrl = _useState6[0],
|
|
56
|
-
setDownloadUrl = _useState6[1];
|
|
57
|
-
|
|
58
|
-
var _React$useState = _react.default.useState(false),
|
|
59
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
60
|
-
disabled = _React$useState2[0],
|
|
61
|
-
setDisabled = _React$useState2[1];
|
|
62
|
-
|
|
63
|
-
var _React$useState3 = _react.default.useState(true),
|
|
64
|
-
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
65
|
-
visible = _React$useState4[0],
|
|
66
|
-
setVisible = _React$useState4[1];
|
|
67
|
-
|
|
68
|
-
_react.default.useEffect(function () {
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
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); }
|
|
15
|
+
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; }
|
|
16
|
+
const location = window.location.protocol + '//' + window.location.hostname;
|
|
17
|
+
const VideoPlayer = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
18
|
+
const [playing, setPlaying] = (0, _react.useState)(false);
|
|
19
|
+
const [documentId, setDocumentId] = (0, _react.useState)(false);
|
|
20
|
+
const [downloadUrl, setDownloadUrl] = (0, _react.useState)(null);
|
|
21
|
+
const [disabled, setDisabled] = _react.default.useState(false);
|
|
22
|
+
const [visible, setVisible] = _react.default.useState(true);
|
|
23
|
+
_react.default.useEffect(() => {
|
|
69
24
|
props.handle.api = api();
|
|
70
25
|
});
|
|
71
|
-
|
|
72
|
-
_react.default.useEffect(function () {
|
|
26
|
+
_react.default.useEffect(() => {
|
|
73
27
|
props.handle.api = api();
|
|
74
|
-
|
|
75
|
-
var parsedConfig = _Utils.default.parseConfig(props.config, props.viewId);
|
|
76
|
-
|
|
28
|
+
let parsedConfig = _Utils.default.parseConfig(props.config, props.viewId);
|
|
77
29
|
_Observable.default.addSubscriptions(parsedConfig.eventHandlingConfig, props.handle, props.viewId);
|
|
78
|
-
|
|
79
30
|
_Observable.default.addSystemSubscriptions(props.viewId, parsedConfig);
|
|
80
|
-
|
|
81
31
|
props.handle.api.refresh();
|
|
82
32
|
}, []);
|
|
83
|
-
|
|
84
|
-
_react.default.useEffect(function () {
|
|
33
|
+
_react.default.useEffect(() => {
|
|
85
34
|
props.handle.api.refresh();
|
|
86
35
|
}, [documentId]);
|
|
87
|
-
|
|
88
|
-
_react.default.useEffect(
|
|
89
|
-
|
|
90
|
-
_react.default.useEffect(function () {
|
|
36
|
+
_react.default.useEffect(() => {}, [playing]);
|
|
37
|
+
_react.default.useEffect(() => {
|
|
91
38
|
if (documentId) {
|
|
92
39
|
setDownloadUrl(location + _ApplicationManager.default.getContextRoot() + '/docs/api/v1/manager/download/' + documentId + '?access_token=' + sessionStorage.getItem('accessToken') + '&idToken=' + sessionStorage.getItem('idToken'));
|
|
93
40
|
console.log(location + _ApplicationManager.default.getContextRoot() + '/docs/api/v1/manager/download/' + documentId + '?access_token=' + sessionStorage.getItem('accessToken') + '&idToken=' + sessionStorage.getItem('idToken'));
|
|
@@ -95,45 +42,36 @@ var VideoPlayer = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.
|
|
|
95
42
|
setDownloadUrl(null);
|
|
96
43
|
}
|
|
97
44
|
}, [documentId]);
|
|
98
|
-
|
|
99
|
-
var api = function api() {
|
|
45
|
+
const api = () => {
|
|
100
46
|
return {
|
|
101
47
|
get id() {
|
|
102
48
|
return props.config.id;
|
|
103
49
|
},
|
|
104
|
-
|
|
105
50
|
set playing(playing) {
|
|
106
51
|
setPlaying(playing);
|
|
107
52
|
},
|
|
108
|
-
|
|
109
53
|
set documentId(documentId) {
|
|
110
54
|
setDocumentId(documentId);
|
|
111
55
|
},
|
|
112
|
-
|
|
113
56
|
get documentId() {
|
|
114
57
|
return documentId;
|
|
115
58
|
},
|
|
116
|
-
|
|
117
59
|
set disabled(disabled) {
|
|
118
60
|
setDisabled(disabled);
|
|
119
61
|
},
|
|
120
|
-
|
|
121
62
|
set visible(visible) {
|
|
122
63
|
setVisible(visible);
|
|
123
64
|
},
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
var parsedConfig = _Utils.default.parseConfig(props.config, props.viewId);
|
|
127
|
-
|
|
65
|
+
refresh() {
|
|
66
|
+
let parsedConfig = _Utils.default.parseConfig(props.config, props.viewId);
|
|
128
67
|
setDisabled(_Utils.default.evaluateBooleanExpression(parsedConfig.disabled, parsedConfig.id));
|
|
129
68
|
setVisible(_Utils.default.isNull(parsedConfig.visible) || _Utils.default.evaluateBooleanExpression(parsedConfig.visible, parsedConfig.id));
|
|
130
69
|
},
|
|
131
|
-
getChildren:
|
|
70
|
+
getChildren: () => {
|
|
132
71
|
return [];
|
|
133
72
|
}
|
|
134
73
|
};
|
|
135
74
|
};
|
|
136
|
-
|
|
137
75
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, visible && /*#__PURE__*/_react.default.createElement("div", {
|
|
138
76
|
style: _Utils.default.mergeStyles({}, props.config)
|
|
139
77
|
}, downloadUrl && /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -148,14 +86,8 @@ var VideoPlayer = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.
|
|
|
148
86
|
controls: true,
|
|
149
87
|
width: "100%",
|
|
150
88
|
height: "100%",
|
|
151
|
-
onPlay:
|
|
152
|
-
|
|
153
|
-
},
|
|
154
|
-
onPause: function onPause() {
|
|
155
|
-
return setPlaying(false);
|
|
156
|
-
}
|
|
89
|
+
onPlay: () => setPlaying(true),
|
|
90
|
+
onPause: () => setPlaying(false)
|
|
157
91
|
}))));
|
|
158
92
|
}));
|
|
159
|
-
|
|
160
|
-
var _default = VideoPlayer;
|
|
161
|
-
exports.default = _default;
|
|
93
|
+
var _default = exports.default = VideoPlayer;
|