@agilemotion/oui-react-js 1.6.0 → 1.6.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 +698 -421
- package/dist/BasicApp.js +5 -5
- package/dist/BasicAppHome.js +55 -26
- package/dist/DynamicJS.js +147 -65
- package/dist/InteractionPortalApp.css +1 -1
- package/dist/InteractionPortalApp.js +5 -5
- package/dist/InteractionPortalAppHome.js +65 -18
- package/dist/InteractionPortalApp_old.js +107 -61
- package/dist/RestUtils.js +339 -287
- package/dist/TypedValue.js +18 -15
- package/dist/Utils.js +375 -276
- package/dist/WithRouter.js +6 -6
- package/dist/assets/jss/components/authNavbarStyle.js +166 -164
- package/dist/assets/jss/components/buttonStyle.js +1 -1
- package/dist/assets/jss/components/cardAvatarStyle.js +1 -1
- package/dist/assets/jss/components/cardBodyStyle.js +1 -1
- package/dist/assets/jss/components/cardFooterStyle.js +1 -1
- package/dist/assets/jss/components/cardHeaderStyle.js +13 -13
- package/dist/assets/jss/components/cardIconStyle.js +1 -1
- package/dist/assets/jss/components/cardStyle.js +1 -1
- package/dist/assets/jss/components/cardTextStyle.js +1 -1
- package/dist/assets/jss/components/customDropdownStyle.js +168 -169
- package/dist/assets/jss/components/customInputStyle.js +9 -3
- package/dist/assets/jss/components/dropdownStyle.js +69 -69
- package/dist/assets/jss/components/footerStyle.js +19 -13
- package/dist/assets/jss/components/headerLinksStyle.js +45 -48
- package/dist/assets/jss/components/headerStyle.js +68 -65
- package/dist/assets/jss/components/navbarLinksStyle.js +66 -77
- package/dist/assets/jss/components/navbarStyle.js +79 -76
- package/dist/assets/jss/components/sidebarStyle.js +436 -436
- package/dist/assets/jss/components/typographyStyle.js +9 -3
- package/dist/assets/jss/rootStyle.js +96 -81
- package/dist/assets/jss/views/layoutStyle.js +44 -41
- package/dist/assets/jss/views/loginBasicStyle.js +1 -1
- package/dist/assets/jss/views/loginBusinessPortalStyle.js +1 -1
- package/dist/assets/jss/views/loginStyle.js +82 -77
- package/dist/components/AlertBar.js +50 -17
- package/dist/components/AlertItem.js +35 -12
- package/dist/components/AlertTemplate.js +30 -29
- package/dist/components/Button.js +62 -34
- package/dist/components/Calendar.js +140 -91
- package/dist/components/ConfirmationDialog.js +36 -11
- package/dist/components/DataGrid.js +512 -270
- package/dist/components/DataGridColumn.js +47 -22
- package/dist/components/DataGridFilter.js +186 -105
- package/dist/components/DataGridHeading.js +50 -32
- package/dist/components/Dialog.js +90 -35
- package/dist/components/DocumentTemplateDesigner.js +34 -16
- package/dist/components/DocumentTemplateDesignerComponent.css +0 -157
- package/dist/components/DocumentTemplateDesignerComponent.js +118 -62
- package/dist/components/DocumentTemplatePlaceholderDialog.js +52 -30
- package/dist/components/DocumentViewer.js +34 -18
- package/dist/components/DocumentViewerComponent.js +26 -9
- package/dist/components/ElementResizeHandler.js +229 -207
- package/dist/components/FileThumb.js +32 -10
- package/dist/components/Graph.js +153 -85
- package/dist/components/GraphNode.js +58 -38
- package/dist/components/HtmlPanel.js +67 -39
- package/dist/components/Icon.js +206 -166
- package/dist/components/LoadingIndicator.js +3 -3
- package/dist/components/LottieIcon.js +1 -1
- package/dist/components/PopupView.js +39 -19
- package/dist/components/Portlet.js +35 -19
- package/dist/components/RegularButton.js +28 -32
- package/dist/components/SignaturePanel.js +37 -17
- package/dist/components/SocketManager.js +178 -119
- package/dist/components/StepperTitleBar.js +62 -42
- package/dist/components/TabPage.js +30 -25
- package/dist/components/TabPanel.js +86 -33
- package/dist/components/TableCellContent.js +51 -32
- package/dist/components/TemplateDesigner.js +173 -121
- package/dist/components/TemplateItemEventHandler.js +335 -221
- package/dist/components/TemplateTable.js +183 -118
- package/dist/components/TitleBar.js +26 -11
- package/dist/components/Toolbar.js +67 -38
- package/dist/components/Tooltip.js +43 -35
- package/dist/components/Tree.js +85 -44
- package/dist/components/UseIsVisible.js +25 -4
- package/dist/components/card/Card.js +27 -33
- package/dist/components/card/CardAvatar.js +20 -19
- package/dist/components/card/CardBody.js +24 -27
- package/dist/components/card/CardFooter.js +23 -24
- package/dist/components/card/CardHeader.js +24 -27
- package/dist/components/card/CardIcon.js +17 -13
- package/dist/components/card/CardText.js +17 -13
- package/dist/components/customInput/CustomInput.js +22 -36
- package/dist/components/dashboard/{BasicBusinessAppDashboard.js → FoldingSideTabDashboard.js} +111 -63
- package/dist/components/dashboard/SideMenuModuleDashboard.css +60 -0
- package/dist/components/dashboard/SideMenuModuleDashboard.js +423 -0
- package/dist/components/dashboard/TopMenuModuleDashboard.js +138 -0
- package/dist/components/dashboard/components/Header.js +29 -12
- package/dist/components/dashboard/components/LeftDrawer.js +3 -5
- package/dist/components/dashboard/components/UserIdentity.js +2 -2
- package/dist/components/dashboard/components/blackDashboard/fixedPlugin/FixedPlugin.js +131 -87
- package/dist/components/dashboard/components/blackDashboard/sidebar/FoldingTabSidebar.js +488 -0
- package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenu.js +64 -0
- package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenuSidebar.css +65 -0
- package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenuSidebar.js +556 -0
- package/dist/components/dashboard/components/portal/Timeline.js +1 -1
- package/dist/components/dashboard/components/portal/Workspace.js +5 -11
- package/dist/components/footer/Footer.js +31 -24
- package/dist/components/footer/HomeFooter.js +68 -34
- package/dist/components/form/AddressSearch.js +78 -42
- package/dist/components/form/AutoComplete.js +136 -55
- package/dist/components/form/BaseField.js +108 -56
- package/dist/components/form/Checkbox.js +10 -8
- package/dist/components/form/DatePicker.js +47 -25
- package/dist/components/form/FieldSet.js +217 -84
- package/dist/components/form/Form.js +334 -200
- package/dist/components/form/GridField.js +185 -82
- package/dist/components/form/IconField.js +9 -7
- package/dist/components/form/ImageEditor.js +141 -92
- package/dist/components/form/LabelField.js +12 -10
- package/dist/components/form/LookupField.js +54 -32
- package/dist/components/form/MultiFileUploadField.js +101 -67
- package/dist/components/form/RadioGroup.js +33 -16
- package/dist/components/form/Section.js +84 -34
- package/dist/components/form/SelectItem.js +55 -33
- package/dist/components/form/SignatureTemplateDesignerField.js +11 -9
- package/dist/components/form/Switch.js +10 -8
- package/dist/components/form/TextField.js +34 -16
- package/dist/components/form/TimePicker.js +19 -15
- package/dist/components/form/TransferList.js +153 -75
- package/dist/components/form/UploadField.js +183 -128
- package/dist/components/grid/GridContainer.js +12 -8
- package/dist/components/grid/GridItem.js +12 -8
- package/dist/components/layout/CollapsiblePanel.js +44 -18
- package/dist/components/layout/Layout.js +81 -40
- package/dist/components/layout/VC.css +1 -1
- package/dist/components/layout/View.js +136 -62
- package/dist/components/layout/ViewContainer.js +13 -11
- package/dist/components/layout/ViewPort.js +25 -10
- package/dist/components/layout/Window.js +87 -53
- package/dist/components/layout/WindowViewPort.js +38 -16
- package/dist/components/media/ClosablePanel.js +7 -7
- package/dist/components/media/LobbyWaitingList.js +7 -9
- package/dist/components/media/MediaSoupHelper.js +379 -187
- package/dist/components/media/SideBarContent.js +22 -14
- package/dist/components/media/SocketRequest.js +5 -1
- package/dist/components/media/SocketResponse.js +5 -1
- package/dist/components/media/Timer.js +35 -15
- package/dist/components/media/Toolbar.css +5 -0
- package/dist/components/media/Toolbar.js +220 -102
- package/dist/components/media/ToolbarButton.js +82 -33
- package/dist/components/media/Toolbar_bck.js +142 -70
- package/dist/components/media/Tracks.js +31 -28
- package/dist/components/media/TrainingRoom.js +284 -121
- package/dist/components/media/Transports.js +27 -24
- package/dist/components/media/VCEventManager.js +95 -31
- package/dist/components/media/VCEventType.js +5 -1
- package/dist/components/media/VCParticipantList.js +40 -14
- package/dist/components/media/VCParticipantListItem.js +92 -41
- package/dist/components/media/VCRoom.js +29 -11
- package/dist/components/media/VCRoomParticipant.js +488 -242
- package/dist/components/media/VCRoomRecorder.js +236 -175
- package/dist/components/media/VCRoomWorkspace.js +505 -245
- package/dist/components/media/Video.js +89 -25
- package/dist/components/media/VideoPlayer.js +56 -22
- package/dist/components/media/chat/ChatRoom.js +255 -132
- package/dist/components/media/chat/ChatRoomItem.js +35 -14
- package/dist/components/media/chat/ChatRoomList.js +43 -13
- package/dist/components/menu/CollapsibleMenu.js +39 -20
- package/dist/components/menu/MenuBars.js +81 -48
- package/dist/components/menu/MenuButton.js +95 -60
- package/dist/components/menu/MenuItem.js +28 -9
- package/dist/components/menu/MenuLink.js +12 -10
- package/dist/components/menu/PopupMenu.js +16 -12
- package/dist/components/navbars/AuthNavbar.js +27 -18
- package/dist/components/navbars/HomeNavbar.js +243 -194
- package/dist/components/navbars/PortalNavbar.js +50 -26
- package/dist/components/signatures/AgilitySignaturePanel.js +96 -39
- package/dist/components/signatures/AlertItem.js +36 -13
- package/dist/components/signatures/Card.js +4 -4
- package/dist/components/signatures/DocumentContainer.js +141 -57
- package/dist/components/signatures/ImageSignatureInput.js +90 -59
- package/dist/components/signatures/MenuButton.js +53 -33
- package/dist/components/signatures/Prompt.js +26 -5
- package/dist/components/signatures/ResponsiveTable.js +302 -197
- package/dist/components/signatures/SearchView.js +77 -36
- package/dist/components/signatures/SignatorySearch.js +30 -10
- package/dist/components/signatures/SignatorySearchForm.js +35 -18
- package/dist/components/signatures/SignatureInput.js +56 -26
- package/dist/components/signatures/SignatureInputProps.js +107 -55
- package/dist/components/signatures/SignatureTemplateDesigner.js +340 -235
- package/dist/components/signatures/Toolbar.js +135 -94
- package/dist/components/signatures/ViewUtils.js +273 -224
- package/dist/components/typography/Danger.js +3 -5
- package/dist/components/typography/Info.js +3 -5
- package/dist/components/typography/Link.js +3 -5
- package/dist/event/ActionHandlers.js +57 -43
- package/dist/event/Event.js +16 -13
- package/dist/event/EventListener.js +39 -36
- package/dist/event/EventType.js +5 -1
- package/dist/event/LoadDataActionHandler.js +20 -8
- package/dist/event/Observable.js +323 -142
- package/dist/event/RouteActionHandler.js +139 -125
- package/dist/event/ScriptActionHandler.js +20 -8
- package/dist/event/ServiceCallActionHandler.js +51 -39
- package/dist/event/SignalGraphActionHandler.js +19 -7
- package/dist/js/Addresses.js +38 -24
- package/dist/js/Calendar.js +168 -161
- package/dist/js/DynamicLib.js +14 -11
- package/dist/js/Media.js +213 -120
- package/dist/js/Validators.js +6 -5
- package/dist/js/Windows.js +48 -47
- package/dist/redux/store/ConfigureStore.js +17 -9
- package/dist/redux/store/DashboardStore.js +110 -43
- package/dist/redux/store/History.js +1 -1
- package/dist/redux/store/SecurityStore.js +59 -20
- package/dist/security/TokenManager.js +44 -30
- package/dist/theme-default.js +1 -1
- package/dist/view/Dashboard.js +230 -137
- package/dist/view/PortalDashboard.js +5 -5
- package/dist/view/Settings.js +4 -2
- package/dist/view/Views.js +27 -14
- package/dist/view/security/ChangePasswordBasic.js +97 -40
- package/dist/view/security/ForgotPassword.js +59 -22
- package/dist/view/security/ForgotPasswordBasic.js +62 -21
- package/dist/view/security/Login.js +64 -24
- package/dist/view/security/LoginBasic.js +65 -26
- package/dist/view/security/LoginInteractionPortal.js +62 -25
- package/dist/view/security/ResetPassword.js +65 -23
- package/dist/view/security/ResetPasswordBasic.js +91 -37
- package/dist/view/security/Security.js +12 -12
- package/package.json +1 -2
- package/dist/components/dashboard/BusinessPortalAppDashboard.js +0 -154
- package/dist/components/dashboard/components/blackDashboard/sidebar/Sidebar.js +0 -447
- /package/dist/components/dashboard/{BusinessPortalAppDashboard.css → TopMenuModuleDashboard.css} +0 -0
- /package/dist/components/dashboard/components/blackDashboard/sidebar/{Sidebar.css → FoldingTabSidebar.css} +0 -0
|
@@ -1,5 +1,7 @@
|
|
|
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
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
@@ -15,11 +17,29 @@ var _Icon = _interopRequireDefault(require("../Icon"));
|
|
|
15
17
|
|
|
16
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
19
|
|
|
18
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
20
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
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); }
|
|
19
35
|
|
|
20
|
-
function
|
|
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; }
|
|
21
37
|
|
|
22
|
-
|
|
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 = {
|
|
23
43
|
audio: false,
|
|
24
44
|
video: {
|
|
25
45
|
width: {
|
|
@@ -34,22 +54,30 @@ const VIDEO_CONSTRAINTS = {
|
|
|
34
54
|
};
|
|
35
55
|
exports.VIDEO_CONSTRAINTS = VIDEO_CONSTRAINTS;
|
|
36
56
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
57
|
+
var Video = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
58
|
+
var userVideo = (0, _react.useRef)();
|
|
59
|
+
|
|
60
|
+
var _useState = (0, _react.useState)(),
|
|
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];
|
|
41
69
|
|
|
42
|
-
_react.default.useEffect(()
|
|
43
|
-
return ()
|
|
70
|
+
_react.default.useEffect(function () {
|
|
71
|
+
return function () {
|
|
44
72
|
closeStream();
|
|
45
73
|
};
|
|
46
74
|
}, []);
|
|
47
75
|
|
|
48
|
-
_react.default.useEffect(()
|
|
76
|
+
_react.default.useEffect(function () {
|
|
49
77
|
props.handle.api = api();
|
|
50
78
|
});
|
|
51
79
|
|
|
52
|
-
_react.default.useEffect(()
|
|
80
|
+
_react.default.useEffect(function () {
|
|
53
81
|
if (on) {
|
|
54
82
|
start();
|
|
55
83
|
} else if (userVideo.current && userVideo.current.srcObject) {
|
|
@@ -57,25 +85,61 @@ const Video = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forw
|
|
|
57
85
|
}
|
|
58
86
|
}, [on]);
|
|
59
87
|
|
|
60
|
-
|
|
88
|
+
var closeStream = function closeStream() {
|
|
61
89
|
if (stream) {
|
|
62
|
-
|
|
63
|
-
|
|
90
|
+
var _iterator = _createForOfIteratorHelper(stream.getTracks()),
|
|
91
|
+
_step;
|
|
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();
|
|
64
102
|
}
|
|
65
103
|
}
|
|
66
104
|
};
|
|
67
105
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
106
|
+
var start = /*#__PURE__*/function () {
|
|
107
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
108
|
+
var videoStream;
|
|
109
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
110
|
+
while (1) {
|
|
111
|
+
switch (_context.prev = _context.next) {
|
|
112
|
+
case 0:
|
|
113
|
+
_context.prev = 0;
|
|
114
|
+
_context.next = 3;
|
|
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
|
+
}();
|
|
77
141
|
|
|
78
|
-
|
|
142
|
+
var api = function api() {
|
|
79
143
|
return {
|
|
80
144
|
get id() {
|
|
81
145
|
return props.config.id;
|
|
@@ -85,7 +149,7 @@ const Video = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forw
|
|
|
85
149
|
setOn(on);
|
|
86
150
|
},
|
|
87
151
|
|
|
88
|
-
getChildren: ()
|
|
152
|
+
getChildren: function getChildren() {
|
|
89
153
|
return [];
|
|
90
154
|
}
|
|
91
155
|
};
|
|
@@ -1,5 +1,7 @@
|
|
|
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
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
@@ -19,29 +21,58 @@ var _Observable = _interopRequireDefault(require("../../event/Observable"));
|
|
|
19
21
|
|
|
20
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
23
|
|
|
22
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
24
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
25
|
+
|
|
26
|
+
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; }
|
|
27
|
+
|
|
28
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
29
|
+
|
|
30
|
+
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."); }
|
|
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; }
|
|
23
35
|
|
|
24
|
-
function
|
|
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; }
|
|
25
37
|
|
|
26
|
-
|
|
38
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
27
39
|
|
|
28
|
-
|
|
29
|
-
const [playing, setPlaying] = (0, _react.useState)(false);
|
|
30
|
-
const [documentId, setDocumentId] = (0, _react.useState)(false);
|
|
31
|
-
const [downloadUrl, setDownloadUrl] = (0, _react.useState)(null);
|
|
40
|
+
var location = window.location.protocol + '//' + window.location.hostname;
|
|
32
41
|
|
|
33
|
-
|
|
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];
|
|
34
47
|
|
|
35
|
-
|
|
48
|
+
var _useState3 = (0, _react.useState)(false),
|
|
49
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
50
|
+
documentId = _useState4[0],
|
|
51
|
+
setDocumentId = _useState4[1];
|
|
36
52
|
|
|
37
|
-
_react.
|
|
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 () {
|
|
38
69
|
props.handle.api = api();
|
|
39
70
|
});
|
|
40
71
|
|
|
41
|
-
_react.default.useEffect(()
|
|
72
|
+
_react.default.useEffect(function () {
|
|
42
73
|
props.handle.api = api();
|
|
43
74
|
|
|
44
|
-
|
|
75
|
+
var parsedConfig = _Utils.default.parseConfig(props.config, props.viewId);
|
|
45
76
|
|
|
46
77
|
_Observable.default.addSubscriptions(parsedConfig.eventHandlingConfig, props.handle, props.viewId);
|
|
47
78
|
|
|
@@ -50,13 +81,13 @@ const VideoPlayer = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.defaul
|
|
|
50
81
|
props.handle.api.refresh();
|
|
51
82
|
}, []);
|
|
52
83
|
|
|
53
|
-
_react.default.useEffect(()
|
|
84
|
+
_react.default.useEffect(function () {
|
|
54
85
|
props.handle.api.refresh();
|
|
55
86
|
}, [documentId]);
|
|
56
87
|
|
|
57
|
-
_react.default.useEffect(()
|
|
88
|
+
_react.default.useEffect(function () {}, [playing]);
|
|
58
89
|
|
|
59
|
-
_react.default.useEffect(()
|
|
90
|
+
_react.default.useEffect(function () {
|
|
60
91
|
if (documentId) {
|
|
61
92
|
setDownloadUrl(location + _ApplicationManager.default.getContextRoot() + '/docs/api/v1/manager/download/' + documentId + '?access_token=' + sessionStorage.getItem('accessToken') + '&idToken=' + sessionStorage.getItem('idToken'));
|
|
62
93
|
console.log(location + _ApplicationManager.default.getContextRoot() + '/docs/api/v1/manager/download/' + documentId + '?access_token=' + sessionStorage.getItem('accessToken') + '&idToken=' + sessionStorage.getItem('idToken'));
|
|
@@ -65,7 +96,7 @@ const VideoPlayer = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.defaul
|
|
|
65
96
|
}
|
|
66
97
|
}, [documentId]);
|
|
67
98
|
|
|
68
|
-
|
|
99
|
+
var api = function api() {
|
|
69
100
|
return {
|
|
70
101
|
get id() {
|
|
71
102
|
return props.config.id;
|
|
@@ -91,14 +122,13 @@ const VideoPlayer = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.defaul
|
|
|
91
122
|
setVisible(visible);
|
|
92
123
|
},
|
|
93
124
|
|
|
94
|
-
refresh() {
|
|
95
|
-
|
|
125
|
+
refresh: function refresh() {
|
|
126
|
+
var parsedConfig = _Utils.default.parseConfig(props.config, props.viewId);
|
|
96
127
|
|
|
97
128
|
setDisabled(_Utils.default.evaluateBooleanExpression(parsedConfig.disabled, parsedConfig.id));
|
|
98
129
|
setVisible(_Utils.default.isNull(parsedConfig.visible) || _Utils.default.evaluateBooleanExpression(parsedConfig.visible, parsedConfig.id));
|
|
99
130
|
},
|
|
100
|
-
|
|
101
|
-
getChildren: () => {
|
|
131
|
+
getChildren: function getChildren() {
|
|
102
132
|
return [];
|
|
103
133
|
}
|
|
104
134
|
};
|
|
@@ -118,8 +148,12 @@ const VideoPlayer = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.defaul
|
|
|
118
148
|
controls: true,
|
|
119
149
|
width: "100%",
|
|
120
150
|
height: "100%",
|
|
121
|
-
onPlay: ()
|
|
122
|
-
|
|
151
|
+
onPlay: function onPlay() {
|
|
152
|
+
return setPlaying(true);
|
|
153
|
+
},
|
|
154
|
+
onPause: function onPause() {
|
|
155
|
+
return setPlaying(false);
|
|
156
|
+
}
|
|
123
157
|
}))));
|
|
124
158
|
}));
|
|
125
159
|
|