@agilemotion/oui-react-js 1.6.1 → 1.6.3
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 +57 -22
- 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.js +124 -48
- 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 +32 -17
- 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 +4 -4
- 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 +2 -3
- package/dist/components/dashboard/BusinessPortalAppDashboard.js +0 -115
- 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
|
@@ -21,38 +21,34 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
21
21
|
|
|
22
22
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
[classes.link]: link,
|
|
53
|
-
[classes.justIcon]: justIcon,
|
|
54
|
-
[className]: className
|
|
55
|
-
});
|
|
24
|
+
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; }
|
|
25
|
+
|
|
26
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
27
|
+
|
|
28
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
29
|
+
|
|
30
|
+
var useStyles = (0, _styles.makeStyles)(_buttonStyle.default);
|
|
31
|
+
|
|
32
|
+
var RegularButton = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
33
|
+
var _classNames;
|
|
34
|
+
|
|
35
|
+
var classes = useStyles();
|
|
36
|
+
|
|
37
|
+
var color = props.color,
|
|
38
|
+
round = props.round,
|
|
39
|
+
children = props.children,
|
|
40
|
+
fullWidth = props.fullWidth,
|
|
41
|
+
disabled = props.disabled,
|
|
42
|
+
simple = props.simple,
|
|
43
|
+
size = props.size,
|
|
44
|
+
block = props.block,
|
|
45
|
+
link = props.link,
|
|
46
|
+
justIcon = props.justIcon,
|
|
47
|
+
className = props.className,
|
|
48
|
+
muiClasses = props.muiClasses,
|
|
49
|
+
rest = _objectWithoutProperties(props, ["color", "round", "children", "fullWidth", "disabled", "simple", "size", "block", "link", "justIcon", "className", "muiClasses"]);
|
|
50
|
+
|
|
51
|
+
var btnClasses = (0, _classnames.default)((_classNames = {}, _defineProperty(_classNames, classes.button, true), _defineProperty(_classNames, classes[size], size), _defineProperty(_classNames, classes[color], color), _defineProperty(_classNames, classes.round, round), _defineProperty(_classNames, classes.fullWidth, fullWidth), _defineProperty(_classNames, classes.disabled, disabled), _defineProperty(_classNames, classes.simple, simple), _defineProperty(_classNames, classes.block, block), _defineProperty(_classNames, classes.link, link), _defineProperty(_classNames, classes.justIcon, justIcon), _defineProperty(_classNames, className, className), _classNames));
|
|
56
52
|
return /*#__PURE__*/_react.default.createElement(_Button.default, _extends({}, rest, {
|
|
57
53
|
ref: ref,
|
|
58
54
|
classes: muiClasses,
|
|
@@ -23,32 +23,52 @@ var _EventType = _interopRequireDefault(require("../event/EventType"));
|
|
|
23
23
|
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
const [config, setConfig] = _react.default.useState(null);
|
|
26
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
28
27
|
|
|
29
|
-
|
|
28
|
+
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."); }
|
|
30
29
|
|
|
31
|
-
|
|
30
|
+
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); }
|
|
32
31
|
|
|
33
|
-
|
|
32
|
+
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; }
|
|
33
|
+
|
|
34
|
+
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; }
|
|
35
|
+
|
|
36
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
37
|
+
|
|
38
|
+
var SignaturePanel = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
39
|
+
var _React$useState = _react.default.useState(null),
|
|
40
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
41
|
+
config = _React$useState2[0],
|
|
42
|
+
setConfig = _React$useState2[1];
|
|
43
|
+
|
|
44
|
+
var _React$useState3 = _react.default.useState(null),
|
|
45
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
46
|
+
value = _React$useState4[0],
|
|
47
|
+
setValue = _React$useState4[1];
|
|
48
|
+
|
|
49
|
+
var _React$useState5 = _react.default.useState({}),
|
|
50
|
+
_React$useState6 = _slicedToArray(_React$useState5, 1),
|
|
51
|
+
handle = _React$useState6[0];
|
|
52
|
+
|
|
53
|
+
_react.default.useEffect(function () {
|
|
34
54
|
props.handle.api = api();
|
|
35
55
|
});
|
|
36
56
|
|
|
37
|
-
_react.default.useEffect(()
|
|
38
|
-
|
|
57
|
+
_react.default.useEffect(function () {
|
|
58
|
+
var parsedConfig = _Utils.default.parseConfig(props.config, props.viewId);
|
|
39
59
|
|
|
40
60
|
_Observable.default.addSubscriptions(parsedConfig.eventHandlingConfig, props.handle, props.viewId);
|
|
41
61
|
|
|
42
62
|
_Observable.default.addSystemSubscriptions(props.viewId, parsedConfig);
|
|
43
63
|
});
|
|
44
64
|
|
|
45
|
-
_react.default.useEffect(()
|
|
46
|
-
|
|
65
|
+
_react.default.useEffect(function () {
|
|
66
|
+
var event = new _Event.default(props.handle, props.viewId, value);
|
|
47
67
|
|
|
48
68
|
_Observable.default.fireEvent(_EventType.default.VALUE_CHANGE, event);
|
|
49
69
|
}, [value]);
|
|
50
70
|
|
|
51
|
-
|
|
71
|
+
var api = function api() {
|
|
52
72
|
return {
|
|
53
73
|
get id() {
|
|
54
74
|
return props.config.id;
|
|
@@ -62,14 +82,14 @@ const SignaturePanel = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.def
|
|
|
62
82
|
return value;
|
|
63
83
|
},
|
|
64
84
|
|
|
65
|
-
loadData: (actionConfig, event)
|
|
66
|
-
|
|
85
|
+
loadData: function loadData(actionConfig, event) {
|
|
86
|
+
var service = !_Utils.default.isNull(props.config.dataService) ? props.config.dataService : actionConfig !== null ? actionConfig.dataService : null;
|
|
67
87
|
|
|
68
88
|
if (!_Utils.default.isNull(service)) {
|
|
69
89
|
if (service.type === 'rpc') {
|
|
70
|
-
(0, _RestUtils.invokeRpc)(service, props.handle, props.viewId, result
|
|
90
|
+
(0, _RestUtils.invokeRpc)(service, props.handle, props.viewId, function (result) {
|
|
71
91
|
setConfig(result);
|
|
72
|
-
}, e
|
|
92
|
+
}, function (e) {}, function (parameter) {}, null, null, event);
|
|
73
93
|
} else {
|
|
74
94
|
if (_Utils.default.isNull(actionConfig)) {
|
|
75
95
|
actionConfig = {};
|
|
@@ -77,9 +97,9 @@ const SignaturePanel = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.def
|
|
|
77
97
|
|
|
78
98
|
actionConfig.service = service;
|
|
79
99
|
|
|
80
|
-
_ServiceCallActionHandler.default.execute(actionConfig, event, null, props.viewId, data
|
|
100
|
+
_ServiceCallActionHandler.default.execute(actionConfig, event, null, props.viewId, function (data) {
|
|
81
101
|
setConfig(data);
|
|
82
|
-
}, ()
|
|
102
|
+
}, function () {});
|
|
83
103
|
}
|
|
84
104
|
}
|
|
85
105
|
}
|
|
@@ -89,7 +109,7 @@ const SignaturePanel = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.def
|
|
|
89
109
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
90
110
|
ref: ref
|
|
91
111
|
}, config !== null ? config.documents ? props.config.provider === 'AGILITY' ? /*#__PURE__*/_react.default.createElement(_AgilitySignaturePanel.default, {
|
|
92
|
-
valueChangeHandler: value
|
|
112
|
+
valueChangeHandler: function valueChangeHandler(value) {
|
|
93
113
|
console.log(value);
|
|
94
114
|
setValue(value);
|
|
95
115
|
},
|
|
@@ -23,19 +23,40 @@ var _VCEventType = require("./media/VCEventType");
|
|
|
23
23
|
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
25
|
|
|
26
|
+
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(_e) { throw _e; }, 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(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
27
|
+
|
|
28
|
+
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); }
|
|
29
|
+
|
|
30
|
+
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; }
|
|
31
|
+
|
|
32
|
+
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); } }
|
|
33
|
+
|
|
34
|
+
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); }); }; }
|
|
35
|
+
|
|
36
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
37
|
+
|
|
38
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
39
|
+
|
|
40
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
41
|
+
|
|
26
42
|
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; }
|
|
27
43
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
44
|
+
var SocketManager = /*#__PURE__*/function () {
|
|
45
|
+
function SocketManager() {
|
|
46
|
+
var _this = this;
|
|
47
|
+
|
|
48
|
+
_classCallCheck(this, SocketManager);
|
|
49
|
+
|
|
50
|
+
_defineProperty(this, "getProfile", function () {
|
|
51
|
+
return _this.profile;
|
|
32
52
|
});
|
|
33
53
|
|
|
34
|
-
_defineProperty(this, "emitEvent", (eventType, data)
|
|
35
|
-
return new Promise((resolve, reject)
|
|
36
|
-
if (
|
|
54
|
+
_defineProperty(this, "emitEvent", function (eventType, data) {
|
|
55
|
+
return new Promise(function (resolve, reject) {
|
|
56
|
+
if (_this.socket) {
|
|
37
57
|
console.log("EMITTING EVENT : " + eventType);
|
|
38
|
-
|
|
58
|
+
|
|
59
|
+
var response = _this.socket.emit(eventType, data, function (data) {
|
|
39
60
|
console.log("EMITTING EVENT RESULT : " + eventType, data);
|
|
40
61
|
|
|
41
62
|
if (data.status === 'SUCCESS') {
|
|
@@ -55,89 +76,116 @@ class SocketManager {
|
|
|
55
76
|
});
|
|
56
77
|
});
|
|
57
78
|
|
|
58
|
-
_defineProperty(this, "init",
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
_defineProperty(this, "init", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
80
|
+
var url, socket, _loop, _i, _Object$keys;
|
|
81
|
+
|
|
82
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
83
|
+
while (1) {
|
|
84
|
+
switch (_context.prev = _context.next) {
|
|
85
|
+
case 0:
|
|
86
|
+
url = process.env.REACT_APP_SOCKET_SERVER_URL || 'https://svn.agilemotion.co.za';
|
|
87
|
+
console.log("======= SOCKET CONNECTING TO ========= [" + url + "]");
|
|
88
|
+
socket = _socket.default.connect(url);
|
|
89
|
+
_this.socket = socket;
|
|
90
|
+
socket.on("connect", function () {
|
|
91
|
+
_this.registerOnline();
|
|
92
|
+
});
|
|
93
|
+
socket.on('disconnect', function () {
|
|
94
|
+
_VCEventManager.default.fireEvent(_VCEventType.VCEventType.SOCKET_DISCONNECT, {});
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
_loop = function _loop() {
|
|
98
|
+
var value = _Object$keys[_i];
|
|
99
|
+
socket.on(value, function (payload) {
|
|
100
|
+
console.log('EVENT: ', value);
|
|
101
|
+
|
|
102
|
+
if (value !== _VCEventType.VCEventType.USERS_ONLINE && value !== _VCEventType.VCEventType.USER_ONLINE && value !== _VCEventType.VCEventType.USER_OFFLINE) {
|
|
103
|
+
_VCEventManager.default.fireEvent(value, {
|
|
104
|
+
socket: _this.socket,
|
|
105
|
+
payload: payload
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
for (_i = 0, _Object$keys = Object.keys(_VCEventType.VCEventType); _i < _Object$keys.length; _i++) {
|
|
112
|
+
_loop();
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
socket.on(_VCEventType.VCEventType.USERS_ONLINE, function (payload) {
|
|
116
|
+
_this.usersOnline.splice(0, _this.usersOnline.length);
|
|
117
|
+
|
|
118
|
+
var _iterator = _createForOfIteratorHelper(payload),
|
|
119
|
+
_step;
|
|
120
|
+
|
|
121
|
+
try {
|
|
122
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
123
|
+
var payloadElement = _step.value;
|
|
124
|
+
|
|
125
|
+
_this.usersOnline.push(payloadElement);
|
|
126
|
+
}
|
|
127
|
+
} catch (err) {
|
|
128
|
+
_iterator.e(err);
|
|
129
|
+
} finally {
|
|
130
|
+
_iterator.f();
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
_VCEventManager.default.fireEvent(_VCEventType.VCEventType.USERS_ONLINE, {
|
|
134
|
+
socket: _this.socket,
|
|
135
|
+
payload: payload
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
socket.on(_VCEventType.VCEventType.USER_ONLINE, function (payload) {
|
|
139
|
+
_this.usersOnline.push(payload);
|
|
140
|
+
|
|
141
|
+
_VCEventManager.default.fireEvent(_VCEventType.VCEventType.USER_ONLINE, {
|
|
142
|
+
socket: _this.socket,
|
|
143
|
+
payload: payload
|
|
144
|
+
});
|
|
145
|
+
});
|
|
146
|
+
socket.on(_VCEventType.VCEventType.USER_OFFLINE, function (payload) {
|
|
147
|
+
for (var i = 0; i < _this.usersOnline.length; i++) {
|
|
148
|
+
console.log(_this.usersOnline[i].userId + " === " + payload.userId);
|
|
149
|
+
|
|
150
|
+
if (_this.usersOnline[i].userId === payload.userId) {
|
|
151
|
+
_this.usersOnline.splice(i, 1);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
_VCEventManager.default.fireEvent(_VCEventType.VCEventType.USER_OFFLINE, {
|
|
156
|
+
socket: _this.socket,
|
|
157
|
+
payload: payload
|
|
158
|
+
});
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
case 11:
|
|
162
|
+
case "end":
|
|
163
|
+
return _context.stop();
|
|
81
164
|
}
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
socket.on(_VCEventType.VCEventType.USERS_ONLINE, payload => {
|
|
86
|
-
this.usersOnline.splice(0, this.usersOnline.length);
|
|
87
|
-
|
|
88
|
-
for (const payloadElement of payload) {
|
|
89
|
-
this.usersOnline.push(payloadElement);
|
|
90
165
|
}
|
|
166
|
+
}, _callee);
|
|
167
|
+
})));
|
|
91
168
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
});
|
|
96
|
-
});
|
|
97
|
-
socket.on(_VCEventType.VCEventType.USER_ONLINE, payload => {
|
|
98
|
-
this.usersOnline.push(payload);
|
|
99
|
-
|
|
100
|
-
_VCEventManager.default.fireEvent(_VCEventType.VCEventType.USER_ONLINE, {
|
|
101
|
-
socket: this.socket,
|
|
102
|
-
payload: payload
|
|
103
|
-
});
|
|
104
|
-
});
|
|
105
|
-
socket.on(_VCEventType.VCEventType.USER_OFFLINE, payload => {
|
|
106
|
-
for (let i = 0; i < this.usersOnline.length; i++) {
|
|
107
|
-
console.log(this.usersOnline[i].userId + " === " + payload.userId);
|
|
108
|
-
|
|
109
|
-
if (this.usersOnline[i].userId === payload.userId) {
|
|
110
|
-
this.usersOnline.splice(i, 1);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
_VCEventManager.default.fireEvent(_VCEventType.VCEventType.USER_OFFLINE, {
|
|
115
|
-
socket: this.socket,
|
|
116
|
-
payload: payload
|
|
117
|
-
});
|
|
118
|
-
});
|
|
119
|
-
});
|
|
120
|
-
|
|
121
|
-
_defineProperty(this, "leaveMeeting", meetingId => {
|
|
122
|
-
if (this.socket) {
|
|
123
|
-
this.emitEvent(_VCEventType.VCEventType.LEAVE_MEETING, {
|
|
169
|
+
_defineProperty(this, "leaveMeeting", function (meetingId) {
|
|
170
|
+
if (_this.socket) {
|
|
171
|
+
_this.emitEvent(_VCEventType.VCEventType.LEAVE_MEETING, {
|
|
124
172
|
userId: sessionStorage.getItem("username"),
|
|
125
173
|
meetingId: meetingId
|
|
126
|
-
}).catch(error
|
|
174
|
+
}).catch(function (error) {});
|
|
127
175
|
}
|
|
128
176
|
});
|
|
129
177
|
|
|
130
|
-
_defineProperty(this, "endSession", meetingId
|
|
131
|
-
if (
|
|
132
|
-
|
|
178
|
+
_defineProperty(this, "endSession", function (meetingId) {
|
|
179
|
+
if (_this.socket) {
|
|
180
|
+
_this.emitEvent(_VCEventType.VCEventType.LEAVE_MEETING, {
|
|
133
181
|
userId: sessionStorage.getItem("username"),
|
|
134
182
|
meetingId: meetingId
|
|
135
|
-
}).then(()
|
|
136
|
-
|
|
183
|
+
}).then(function () {
|
|
184
|
+
_this.emitEvent(_VCEventType.VCEventType.END_SESSION, {
|
|
137
185
|
userId: sessionStorage.getItem("username"),
|
|
138
186
|
meetingId: meetingId
|
|
139
|
-
}).catch(error
|
|
140
|
-
}).catch(error
|
|
187
|
+
}).catch(function (error) {});
|
|
188
|
+
}).catch(function (error) {});
|
|
141
189
|
}
|
|
142
190
|
});
|
|
143
191
|
|
|
@@ -145,53 +193,64 @@ class SocketManager {
|
|
|
145
193
|
this.profile = null;
|
|
146
194
|
}
|
|
147
195
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
console.log(
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
196
|
+
_createClass(SocketManager, [{
|
|
197
|
+
key: "registerOnline",
|
|
198
|
+
value: function registerOnline() {
|
|
199
|
+
var _this2 = this;
|
|
200
|
+
|
|
201
|
+
console.log('***** FETCHIN SOCKET MANAGER USER PROFILE *****');
|
|
202
|
+
(0, _RestUtils.sendRequest)(_RestUtils.location + _ApplicationManager.default.getContextRoot() + '/auth/api/v1/user/find', function (response) {
|
|
203
|
+
_this2.profile = response.profile;
|
|
204
|
+
console.log("PROFILE : ", response);
|
|
205
|
+
console.log("REGISTERING ONLINE");
|
|
206
|
+
|
|
207
|
+
_this2.emitEvent(_SocketRequest.default.REGISTER_ONLINE, {
|
|
208
|
+
user: {
|
|
209
|
+
userId: response.username,
|
|
210
|
+
name: response.name + ' ' + response.surname
|
|
211
|
+
},
|
|
212
|
+
orgCode: response.profile
|
|
213
|
+
}).then(function (data) {
|
|
214
|
+
console.log("REGISTERED ONLINE - " + response.username);
|
|
215
|
+
_this2.connected = true;
|
|
216
|
+
|
|
217
|
+
var event = _this2.createEvent();
|
|
218
|
+
|
|
219
|
+
_VCEventManager.default.fireEvent(_EventType.default.SOCKET_CONNECT, event);
|
|
220
|
+
}).catch(function (exp) {
|
|
221
|
+
console.log(exp);
|
|
222
|
+
});
|
|
223
|
+
}, function (e) {
|
|
224
|
+
console.log("ERROR FETCHING PROFILE");
|
|
225
|
+
console.log(e);
|
|
168
226
|
});
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
227
|
+
}
|
|
228
|
+
}, {
|
|
229
|
+
key: "createEvent",
|
|
230
|
+
value: function createEvent() {
|
|
231
|
+
var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
232
|
+
return new _Event.default({
|
|
233
|
+
api: {
|
|
234
|
+
get id() {
|
|
235
|
+
return "sockets";
|
|
236
|
+
}
|
|
174
237
|
|
|
175
|
-
createEvent(data = null) {
|
|
176
|
-
return new _Event.default({
|
|
177
|
-
api: {
|
|
178
|
-
get id() {
|
|
179
|
-
return "sockets";
|
|
180
238
|
}
|
|
181
|
-
|
|
239
|
+
}, "dashboard", data);
|
|
240
|
+
}
|
|
241
|
+
}, {
|
|
242
|
+
key: "disconnect",
|
|
243
|
+
value: function disconnect() {
|
|
244
|
+
if (this.socket) {
|
|
245
|
+
this.socket.disconnect();
|
|
182
246
|
}
|
|
183
|
-
}, "dashboard", data);
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
disconnect() {
|
|
187
|
-
if (this.socket) {
|
|
188
|
-
this.socket.disconnect();
|
|
189
247
|
}
|
|
190
|
-
}
|
|
248
|
+
}]);
|
|
191
249
|
|
|
192
|
-
|
|
250
|
+
return SocketManager;
|
|
251
|
+
}();
|
|
193
252
|
|
|
194
|
-
|
|
253
|
+
var instance = new SocketManager(); //Object.freeze(instance);
|
|
195
254
|
|
|
196
255
|
var _default = instance;
|
|
197
256
|
exports.default = _default;
|