@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
|
});
|
|
@@ -25,26 +27,43 @@ var _SocketManager = _interopRequireDefault(require("../../service/SocketManager
|
|
|
25
27
|
|
|
26
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
29
|
|
|
28
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
30
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
31
|
+
|
|
32
|
+
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; }
|
|
33
|
+
|
|
34
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
35
|
+
|
|
36
|
+
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."); }
|
|
37
|
+
|
|
38
|
+
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); }
|
|
39
|
+
|
|
40
|
+
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; }
|
|
41
|
+
|
|
42
|
+
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; }
|
|
43
|
+
|
|
44
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
45
|
+
|
|
46
|
+
var ChatRoomItem = function ChatRoomItem(props) {
|
|
47
|
+
var event = props.event,
|
|
48
|
+
selectedChat = props.selectedChat;
|
|
29
49
|
|
|
30
|
-
|
|
50
|
+
var _useState = (0, _react.useState)(_AppManager.default.getUserDetails()),
|
|
51
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
52
|
+
currentUser = _useState2[0],
|
|
53
|
+
setCurrentUser = _useState2[1];
|
|
31
54
|
|
|
32
|
-
|
|
33
|
-
const {
|
|
34
|
-
event,
|
|
35
|
-
selectedChat
|
|
36
|
-
} = props;
|
|
37
|
-
const [currentUser, setCurrentUser] = (0, _react.useState)(_AppManager.default.getUserDetails());
|
|
38
|
-
(0, _react.useEffect)(() => {
|
|
55
|
+
(0, _react.useEffect)(function () {
|
|
39
56
|
setCurrentUser(_AppManager.default.getUserDetails());
|
|
40
57
|
}, []);
|
|
41
58
|
|
|
42
|
-
|
|
59
|
+
var goToRoom = function goToRoom(id) {
|
|
43
60
|
props.selectionHandler(event);
|
|
44
61
|
};
|
|
45
62
|
|
|
46
|
-
|
|
47
|
-
|
|
63
|
+
var getUnreadMessagesCount = function getUnreadMessagesCount() {
|
|
64
|
+
var unread = _SocketManager.default.unreadMessages.find(function (u) {
|
|
65
|
+
return u.id === event.id;
|
|
66
|
+
});
|
|
48
67
|
|
|
49
68
|
if (unread) {
|
|
50
69
|
return unread.numberOfUnread;
|
|
@@ -59,14 +78,16 @@ const ChatRoomItem = props => {
|
|
|
59
78
|
paddingRight: '16px'
|
|
60
79
|
},
|
|
61
80
|
className: "chatroom__item ".concat(selectedChat && event.id === selectedChat.id ? 'active-tab' : ''),
|
|
62
|
-
onClick: ()
|
|
81
|
+
onClick: function onClick() {
|
|
63
82
|
goToRoom(event.id);
|
|
64
83
|
}
|
|
65
84
|
}, /*#__PURE__*/_react.default.createElement(_core.Badge, {
|
|
66
85
|
color: "error",
|
|
67
86
|
badgeContent: getUnreadMessagesCount(),
|
|
68
87
|
max: 9
|
|
69
|
-
}, /*#__PURE__*/_react.default.createElement(_core.Avatar, null, event.type === 'CALENDAR_MEETING' || event.participants.length > 2 ? /*#__PURE__*/_react.default.createElement(_reactFeather.Calendar, null) : _Utils.default.getInitials(event.participants.find(
|
|
88
|
+
}, /*#__PURE__*/_react.default.createElement(_core.Avatar, null, event.type === 'CALENDAR_MEETING' || event.participants.length > 2 ? /*#__PURE__*/_react.default.createElement(_reactFeather.Calendar, null) : _Utils.default.getInitials(event.participants.find(function (p) {
|
|
89
|
+
return p.userId !== currentUser.userId;
|
|
90
|
+
}).name))), /*#__PURE__*/_react.default.createElement("div", {
|
|
70
91
|
className: "chatroom__info"
|
|
71
92
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
72
93
|
className: "chatRoom__title"
|
|
@@ -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,26 +21,49 @@ var _SocketManager = _interopRequireDefault(require("../../service/SocketManager
|
|
|
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 _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
29
|
+
|
|
30
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
31
|
+
|
|
32
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
|
|
33
|
+
|
|
34
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
35
|
+
|
|
36
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
23
37
|
|
|
24
|
-
function
|
|
38
|
+
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."); }
|
|
25
39
|
|
|
26
|
-
|
|
27
|
-
const [chats, setChats] = (0, _react.useState)([]);
|
|
40
|
+
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); }
|
|
28
41
|
|
|
29
|
-
|
|
30
|
-
|
|
42
|
+
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; }
|
|
43
|
+
|
|
44
|
+
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; }
|
|
45
|
+
|
|
46
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
47
|
+
|
|
48
|
+
var ChatRoomList = function ChatRoomList(props) {
|
|
49
|
+
var _useState = (0, _react.useState)([]),
|
|
50
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
51
|
+
chats = _useState2[0],
|
|
52
|
+
setChats = _useState2[1];
|
|
53
|
+
|
|
54
|
+
var updateChatList = function updateChatList(chat) {
|
|
55
|
+
setChats([].concat(_toConsumableArray(chats), [chat]));
|
|
31
56
|
};
|
|
32
57
|
|
|
33
|
-
|
|
58
|
+
var addChat = function addChat() {
|
|
34
59
|
props.addHandler();
|
|
35
60
|
};
|
|
36
61
|
|
|
37
|
-
(0, _react.useEffect)(()
|
|
62
|
+
(0, _react.useEffect)(function () {
|
|
38
63
|
setChats([].concat(props.chatEvents));
|
|
39
64
|
console.log('socketManager.unreadMessages: ', _SocketManager.default.unreadMessages);
|
|
40
65
|
}, [props.chatEvents]);
|
|
41
|
-
(0, _react.useEffect)(()
|
|
66
|
+
(0, _react.useEffect)(function () {
|
|
42
67
|
if (props.addedChat) {
|
|
43
68
|
updateChatList(props.addedChat);
|
|
44
69
|
}
|
|
@@ -54,7 +79,7 @@ const ChatRoomList = props => {
|
|
|
54
79
|
}, /*#__PURE__*/_react.default.createElement(_Tooltip.default, {
|
|
55
80
|
title: "New Chat"
|
|
56
81
|
}, /*#__PURE__*/_react.default.createElement(_core.IconButton, {
|
|
57
|
-
onClick: ()
|
|
82
|
+
onClick: function onClick() {
|
|
58
83
|
addChat();
|
|
59
84
|
}
|
|
60
85
|
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
@@ -62,9 +87,14 @@ const ChatRoomList = props => {
|
|
|
62
87
|
alt: "new chat"
|
|
63
88
|
}))))), /*#__PURE__*/_react.default.createElement("div", {
|
|
64
89
|
className: "chatrooms__rooms"
|
|
65
|
-
}, chats.sort((a, b)
|
|
66
|
-
|
|
67
|
-
|
|
90
|
+
}, chats.sort(function (a, b) {
|
|
91
|
+
return new Date(b.updatedAt) - new Date(a.updatedAt);
|
|
92
|
+
}).map(function (event, index) {
|
|
93
|
+
var newArr = _toConsumableArray(event.messages);
|
|
94
|
+
|
|
95
|
+
event.messages = newArr.sort(function (a, b) {
|
|
96
|
+
return new Date(a.createdDate) - new Date(b.createdDate);
|
|
97
|
+
});
|
|
68
98
|
return /*#__PURE__*/_react.default.createElement(_ChatRoomItem.default, {
|
|
69
99
|
selectedChat: props.selectedChat,
|
|
70
100
|
key: index,
|
|
@@ -13,12 +13,29 @@ var _MenuBars = require("./MenuBars");
|
|
|
13
13
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
const [currentMenuName, setCurrentMenuName] = _react.default.useState("");
|
|
16
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
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."); }
|
|
20
19
|
|
|
21
|
-
|
|
20
|
+
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); }
|
|
21
|
+
|
|
22
|
+
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
|
+
|
|
24
|
+
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
|
+
|
|
26
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
27
|
+
|
|
28
|
+
var CollapsibleMenu = function CollapsibleMenu(props) {
|
|
29
|
+
var _React$useState = _react.default.useState(""),
|
|
30
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
31
|
+
currentMenuName = _React$useState2[0],
|
|
32
|
+
setCurrentMenuName = _React$useState2[1];
|
|
33
|
+
|
|
34
|
+
var _React$useState3 = _react.default.useState(true),
|
|
35
|
+
_React$useState4 = _slicedToArray(_React$useState3, 1),
|
|
36
|
+
collapse = _React$useState4[0];
|
|
37
|
+
|
|
38
|
+
var styles = {
|
|
22
39
|
wrapper: {
|
|
23
40
|
border: '1px solid red',
|
|
24
41
|
width: '100%',
|
|
@@ -26,25 +43,27 @@ const CollapsibleMenu = props => {
|
|
|
26
43
|
}
|
|
27
44
|
};
|
|
28
45
|
|
|
29
|
-
|
|
46
|
+
var selectionChangeHandler = function selectionChangeHandler(module) {
|
|
30
47
|
setCurrentMenuName(module);
|
|
31
48
|
};
|
|
32
49
|
|
|
33
|
-
return /*#__PURE__*/_react.default.createElement("div", null, props.modules.map((module, index)
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
50
|
+
return /*#__PURE__*/_react.default.createElement("div", null, props.modules.map(function (module, index) {
|
|
51
|
+
return /*#__PURE__*/_react.default.createElement(_CollapsiblePanel.default, {
|
|
52
|
+
key: module.name,
|
|
53
|
+
title: module.label,
|
|
54
|
+
collapse: collapse,
|
|
55
|
+
icon: module.icon
|
|
56
|
+
}, /*#__PURE__*/_react.default.createElement(_MenuBars.CollapsibleMenuBar, {
|
|
57
|
+
name: module.name,
|
|
58
|
+
config: module.menuBar,
|
|
59
|
+
mode: "drop",
|
|
60
|
+
activeMenu: currentMenuName,
|
|
61
|
+
autoSelectDefault: false,
|
|
62
|
+
optionSelectHandler: function optionSelectHandler(module) {
|
|
63
|
+
selectionChangeHandler(module);
|
|
64
|
+
}
|
|
65
|
+
}));
|
|
66
|
+
}));
|
|
48
67
|
};
|
|
49
68
|
|
|
50
69
|
var _default = CollapsibleMenu;
|
|
@@ -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
|
});
|
|
@@ -30,54 +32,80 @@ var _colors = require("material-ui/styles/colors");
|
|
|
30
32
|
|
|
31
33
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
32
34
|
|
|
33
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
35
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
34
36
|
|
|
35
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null ||
|
|
37
|
+
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; }
|
|
36
38
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
39
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
40
|
+
|
|
41
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
42
|
+
|
|
43
|
+
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; }
|
|
44
|
+
|
|
45
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
46
|
+
|
|
47
|
+
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."); }
|
|
48
|
+
|
|
49
|
+
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); }
|
|
50
|
+
|
|
51
|
+
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; }
|
|
52
|
+
|
|
53
|
+
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; }
|
|
54
|
+
|
|
55
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
56
|
+
|
|
57
|
+
var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
58
|
+
return {
|
|
59
|
+
// TODO: Merge these styles
|
|
60
|
+
expandable: {
|
|
61
|
+
borderTop: '1px solid white',
|
|
62
|
+
color: _colors.grey900,
|
|
63
|
+
fontSize: '14px',
|
|
64
|
+
paddingLeft: '20px',
|
|
65
|
+
'&:hover': {
|
|
66
|
+
color: theme.palette.secondary.main
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
listItem: {
|
|
70
|
+
borderTop: '1px solid white',
|
|
71
|
+
backgroundColor: _colors.grey200,
|
|
72
|
+
color: _colors.grey900,
|
|
73
|
+
fontSize: '14px',
|
|
74
|
+
paddingLeft: '28px',
|
|
75
|
+
'&:hover': {
|
|
76
|
+
color: theme.palette.secondary.main
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
listItemSelected: {
|
|
80
|
+
borderTop: '1px solid white',
|
|
81
|
+
backgroundColor: _colors.grey200,
|
|
82
|
+
color: theme.palette.secondary.main,
|
|
83
|
+
fontSize: '14px',
|
|
84
|
+
paddingLeft: '28px',
|
|
85
|
+
borderLeft: '2px solid' + theme.palette.secondary.main,
|
|
86
|
+
'&:hover': {
|
|
87
|
+
color: theme.palette.secondary.main
|
|
88
|
+
}
|
|
67
89
|
}
|
|
68
|
-
}
|
|
69
|
-
})
|
|
90
|
+
};
|
|
91
|
+
});
|
|
70
92
|
|
|
71
93
|
function CollapsibleMenuBar(props) {
|
|
72
|
-
|
|
94
|
+
var classes = useStyles();
|
|
73
95
|
|
|
74
|
-
|
|
96
|
+
var _React$useState = _react.default.useState(''),
|
|
97
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
98
|
+
selectedLink = _React$useState2[0],
|
|
99
|
+
setSelectedLink = _React$useState2[1];
|
|
75
100
|
|
|
76
|
-
|
|
101
|
+
var _React$useState3 = _react.default.useState({}),
|
|
102
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
103
|
+
itemExpansionStatuses = _React$useState4[0],
|
|
104
|
+
setItemExpansionStatuses = _React$useState4[1];
|
|
77
105
|
|
|
78
|
-
|
|
106
|
+
var defaultElement = _react.default.useRef(null);
|
|
79
107
|
|
|
80
|
-
_react.default.useEffect(()
|
|
108
|
+
_react.default.useEffect(function () {
|
|
81
109
|
if (props.activeMenu !== props.name) {
|
|
82
110
|
setSelectedLink(null);
|
|
83
111
|
}
|
|
@@ -100,13 +128,11 @@ function CollapsibleMenuBar(props) {
|
|
|
100
128
|
value = !itemExpansionStatuses[item];
|
|
101
129
|
}
|
|
102
130
|
|
|
103
|
-
setItemExpansionStatuses({
|
|
104
|
-
[item]: value
|
|
105
|
-
});
|
|
131
|
+
setItemExpansionStatuses(_objectSpread(_objectSpread({}, itemExpansionStatuses), {}, _defineProperty({}, item, value)));
|
|
106
132
|
}
|
|
107
133
|
|
|
108
134
|
function handler(children) {
|
|
109
|
-
return children.map(child
|
|
135
|
+
return children.map(function (child) {
|
|
110
136
|
if (!child.items || child.items.length === 0) {
|
|
111
137
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
112
138
|
key: child.id
|
|
@@ -114,7 +140,9 @@ function CollapsibleMenuBar(props) {
|
|
|
114
140
|
className: child.id === selectedLink ? classes.listItemSelected : classes.listItem,
|
|
115
141
|
button: true,
|
|
116
142
|
ref: child.default === true ? defaultElement : null,
|
|
117
|
-
onClick: ()
|
|
143
|
+
onClick: function onClick() {
|
|
144
|
+
return selectLink(child.id);
|
|
145
|
+
},
|
|
118
146
|
key: child.id
|
|
119
147
|
}, /*#__PURE__*/_react.default.createElement(_MenuItem.default, {
|
|
120
148
|
config: child,
|
|
@@ -132,7 +160,9 @@ function CollapsibleMenuBar(props) {
|
|
|
132
160
|
}, /*#__PURE__*/_react.default.createElement(_ListItem.default, {
|
|
133
161
|
className: classes.expandable,
|
|
134
162
|
button: true,
|
|
135
|
-
onClick: ()
|
|
163
|
+
onClick: function onClick() {
|
|
164
|
+
return handleClick(child.id);
|
|
165
|
+
}
|
|
136
166
|
}, /*#__PURE__*/_react.default.createElement(_ListItemText.default, {
|
|
137
167
|
primary: child.attributes['label']
|
|
138
168
|
}), itemExpansionStatuses[child.id] === false ? /*#__PURE__*/_react.default.createElement(_ExpandLess.default, null) : /*#__PURE__*/_react.default.createElement(_ExpandMore.default, null)), /*#__PURE__*/_react.default.createElement(_Collapse.default, {
|
|
@@ -152,14 +182,17 @@ function CollapsibleMenuBar(props) {
|
|
|
152
182
|
}
|
|
153
183
|
|
|
154
184
|
function PopupMenuBar(props) {
|
|
155
|
-
|
|
185
|
+
var classes = useStyles();
|
|
156
186
|
|
|
157
|
-
|
|
187
|
+
var _React$useState5 = _react.default.useState({}),
|
|
188
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
189
|
+
children = _React$useState6[0],
|
|
190
|
+
setChildren = _React$useState6[1];
|
|
158
191
|
|
|
159
192
|
function handleClick(item) {}
|
|
160
193
|
|
|
161
194
|
function handler(children) {
|
|
162
|
-
return children.map(child
|
|
195
|
+
return children.map(function (child) {
|
|
163
196
|
if (!child.items || child.items.length === 0) {
|
|
164
197
|
return /*#__PURE__*/_react.default.createElement(_MenuItem.default, {
|
|
165
198
|
mode: "cascaded",
|