@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
|
@@ -47,53 +47,103 @@ var _Lock = _interopRequireDefault(require("@material-ui/icons/Lock"));
|
|
|
47
47
|
|
|
48
48
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
const location = (0, _reactRouterDom.useLocation)();
|
|
50
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
52
51
|
|
|
53
|
-
|
|
52
|
+
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."); }
|
|
54
53
|
|
|
55
|
-
|
|
54
|
+
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); }
|
|
56
55
|
|
|
57
|
-
|
|
56
|
+
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; }
|
|
58
57
|
|
|
59
|
-
|
|
58
|
+
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; }
|
|
60
59
|
|
|
61
|
-
|
|
60
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
62
61
|
|
|
63
|
-
|
|
62
|
+
var ResetPassword = function ResetPassword(props) {
|
|
63
|
+
var location = (0, _reactRouterDom.useLocation)();
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
var _React$useState = _react.default.useState(null),
|
|
66
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
67
|
+
username = _React$useState2[0],
|
|
68
|
+
setUsername = _React$useState2[1];
|
|
66
69
|
|
|
67
|
-
|
|
70
|
+
var _React$useState3 = _react.default.useState(false),
|
|
71
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
72
|
+
usernameError = _React$useState4[0],
|
|
73
|
+
setUsernameError = _React$useState4[1];
|
|
68
74
|
|
|
69
|
-
|
|
75
|
+
var _React$useState5 = _react.default.useState(null),
|
|
76
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
77
|
+
password = _React$useState6[0],
|
|
78
|
+
setPassword = _React$useState6[1];
|
|
70
79
|
|
|
71
|
-
|
|
80
|
+
var _React$useState7 = _react.default.useState(null),
|
|
81
|
+
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
82
|
+
confirmPassword = _React$useState8[0],
|
|
83
|
+
setConfirmPassword = _React$useState8[1];
|
|
72
84
|
|
|
73
|
-
|
|
85
|
+
var _React$useState9 = _react.default.useState(null),
|
|
86
|
+
_React$useState10 = _slicedToArray(_React$useState9, 2),
|
|
87
|
+
message = _React$useState10[0],
|
|
88
|
+
setMessage = _React$useState10[1];
|
|
74
89
|
|
|
75
|
-
|
|
90
|
+
var _React$useState11 = _react.default.useState(null),
|
|
91
|
+
_React$useState12 = _slicedToArray(_React$useState11, 2),
|
|
92
|
+
messageTitle = _React$useState12[0],
|
|
93
|
+
setMessageTitle = _React$useState12[1];
|
|
76
94
|
|
|
77
|
-
|
|
95
|
+
var _React$useState13 = _react.default.useState(""),
|
|
96
|
+
_React$useState14 = _slicedToArray(_React$useState13, 2),
|
|
97
|
+
alertVariant = _React$useState14[0],
|
|
98
|
+
setAlertVariant = _React$useState14[1];
|
|
78
99
|
|
|
79
|
-
_react.default.
|
|
80
|
-
|
|
100
|
+
var _React$useState15 = _react.default.useState(false),
|
|
101
|
+
_React$useState16 = _slicedToArray(_React$useState15, 2),
|
|
102
|
+
passwordError = _React$useState16[0],
|
|
103
|
+
setPasswordError = _React$useState16[1];
|
|
104
|
+
|
|
105
|
+
var _React$useState17 = _react.default.useState(false),
|
|
106
|
+
_React$useState18 = _slicedToArray(_React$useState17, 2),
|
|
107
|
+
isLoading = _React$useState18[0],
|
|
108
|
+
setIsLoading = _React$useState18[1];
|
|
109
|
+
|
|
110
|
+
var _React$useState19 = _react.default.useState(null),
|
|
111
|
+
_React$useState20 = _slicedToArray(_React$useState19, 2),
|
|
112
|
+
showPassword = _React$useState20[0],
|
|
113
|
+
setShowPassword = _React$useState20[1];
|
|
114
|
+
|
|
115
|
+
var _React$useState21 = _react.default.useState(null),
|
|
116
|
+
_React$useState22 = _slicedToArray(_React$useState21, 2),
|
|
117
|
+
code = _React$useState22[0],
|
|
118
|
+
setCode = _React$useState22[1];
|
|
119
|
+
|
|
120
|
+
var _React$useState23 = _react.default.useState(null),
|
|
121
|
+
_React$useState24 = _slicedToArray(_React$useState23, 2),
|
|
122
|
+
showConfirmPassword = _React$useState24[0],
|
|
123
|
+
setShowConfirmPassword = _React$useState24[1];
|
|
124
|
+
|
|
125
|
+
var _React$useState25 = _react.default.useState("((?=.*\\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[@#$%]).{8,128})"),
|
|
126
|
+
_React$useState26 = _slicedToArray(_React$useState25, 1),
|
|
127
|
+
passwordPattern = _React$useState26[0];
|
|
128
|
+
|
|
129
|
+
_react.default.useEffect(function () {
|
|
130
|
+
var code = new URLSearchParams(location.search).get("code");
|
|
81
131
|
setCode(code);
|
|
82
|
-
|
|
132
|
+
var username = new URLSearchParams(location.search).get("userName");
|
|
83
133
|
setUsername(username);
|
|
84
134
|
}, []);
|
|
85
135
|
|
|
86
|
-
|
|
136
|
+
var handleClickShowPassword = function handleClickShowPassword() {
|
|
87
137
|
setShowPassword(!showPassword);
|
|
88
138
|
};
|
|
89
139
|
|
|
90
|
-
|
|
140
|
+
var handleClickShowConfirmPassword = function handleClickShowConfirmPassword() {
|
|
91
141
|
setShowConfirmPassword(!showConfirmPassword);
|
|
92
142
|
};
|
|
93
143
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
144
|
+
var sendResetPassword = function sendResetPassword() {
|
|
145
|
+
var passwordPresent = !_Utils.default.isNull(password) && password.trim().length > 0;
|
|
146
|
+
var usernamePresent = !_Utils.default.isNull(username) && username.trim().length > 0;
|
|
97
147
|
|
|
98
148
|
if (passwordPresent) {
|
|
99
149
|
if (password !== confirmPassword) {
|
|
@@ -111,12 +161,12 @@ const ResetPassword = props => {
|
|
|
111
161
|
}
|
|
112
162
|
|
|
113
163
|
setIsLoading(true);
|
|
114
|
-
(0, _Security.resetPassword)(props.url, code, username, password, (codeSent, message)
|
|
164
|
+
(0, _Security.resetPassword)(props.url, code, username, password, function (codeSent, message) {
|
|
115
165
|
setIsLoading(false);
|
|
116
166
|
setMessageTitle("Password Reset");
|
|
117
167
|
setMessage(message);
|
|
118
168
|
setAlertVariant('success');
|
|
119
|
-
}, errorMessage
|
|
169
|
+
}, function (errorMessage) {
|
|
120
170
|
setIsLoading(false);
|
|
121
171
|
setMessageTitle("Password Reset Error!");
|
|
122
172
|
setMessage(!errorMessage ? _Utils.default.SYSTEM_ERROR_MESSAGE : errorMessage);
|
|
@@ -128,15 +178,15 @@ const ResetPassword = props => {
|
|
|
128
178
|
}
|
|
129
179
|
};
|
|
130
180
|
|
|
131
|
-
|
|
181
|
+
var handleMouseDownPassword = function handleMouseDownPassword(event) {
|
|
132
182
|
event.preventDefault();
|
|
133
183
|
};
|
|
134
184
|
|
|
135
|
-
|
|
185
|
+
var handleMouseDownConfirmPassword = function handleMouseDownConfirmPassword(event) {
|
|
136
186
|
event.preventDefault();
|
|
137
187
|
};
|
|
138
188
|
|
|
139
|
-
_react.default.useEffect(()
|
|
189
|
+
_react.default.useEffect(function () {
|
|
140
190
|
_ApplicationManager.default.clear();
|
|
141
191
|
}, []);
|
|
142
192
|
|
|
@@ -186,7 +236,9 @@ const ResetPassword = props => {
|
|
|
186
236
|
},
|
|
187
237
|
variant: alertVariant,
|
|
188
238
|
show: !_Utils.default.isNull(message),
|
|
189
|
-
onClose: ()
|
|
239
|
+
onClose: function onClose() {
|
|
240
|
+
return setMessage(null);
|
|
241
|
+
},
|
|
190
242
|
dismissible: true
|
|
191
243
|
}, /*#__PURE__*/_react.default.createElement(_Alert.default.Heading, null, messageTitle), /*#__PURE__*/_react.default.createElement("p", null, message)) : "", /*#__PURE__*/_react.default.createElement("div", {
|
|
192
244
|
style: _loginBasicStyle.default.loginContainer
|
|
@@ -199,8 +251,8 @@ const ResetPassword = props => {
|
|
|
199
251
|
error: usernameError,
|
|
200
252
|
label: "Username",
|
|
201
253
|
value: username || '',
|
|
202
|
-
onChange: e
|
|
203
|
-
|
|
254
|
+
onChange: function onChange(e) {
|
|
255
|
+
var usernamePresent = !_Utils.default.isNull(e.target.value) && e.target.value.trim().length > 0;
|
|
204
256
|
setUsername(e.target.value);
|
|
205
257
|
setUsernameError(!usernamePresent);
|
|
206
258
|
},
|
|
@@ -218,8 +270,8 @@ const ResetPassword = props => {
|
|
|
218
270
|
error: passwordError,
|
|
219
271
|
type: showPassword ? 'text' : 'password',
|
|
220
272
|
value: password || '',
|
|
221
|
-
onChange: e
|
|
222
|
-
|
|
273
|
+
onChange: function onChange(e) {
|
|
274
|
+
var passwordPresent = !_Utils.default.isNull(e.target.value) && e.target.value.trim().length > 0;
|
|
223
275
|
setPassword(e.target.value);
|
|
224
276
|
setPasswordError(!passwordPresent);
|
|
225
277
|
},
|
|
@@ -245,8 +297,8 @@ const ResetPassword = props => {
|
|
|
245
297
|
disabled: _Utils.default.isNull(code),
|
|
246
298
|
type: showConfirmPassword ? 'text' : 'password',
|
|
247
299
|
value: confirmPassword || '',
|
|
248
|
-
onChange: e
|
|
249
|
-
|
|
300
|
+
onChange: function onChange(e) {
|
|
301
|
+
var passwordPresent = !_Utils.default.isNull(e.target.value) && e.target.value.trim().length > 0;
|
|
250
302
|
setConfirmPassword(e.target.value);
|
|
251
303
|
},
|
|
252
304
|
margin: "normal",
|
|
@@ -269,7 +321,7 @@ const ResetPassword = props => {
|
|
|
269
321
|
className: "w-100"
|
|
270
322
|
}, /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
271
323
|
disabled: _Utils.default.isNull(code) || isLoading,
|
|
272
|
-
onClick: ()
|
|
324
|
+
onClick: function onClick() {
|
|
273
325
|
sendResetPassword();
|
|
274
326
|
},
|
|
275
327
|
variant: "contained",
|
|
@@ -297,6 +349,8 @@ const ResetPassword = props => {
|
|
|
297
349
|
})));
|
|
298
350
|
};
|
|
299
351
|
|
|
300
|
-
var _default = (0, _WithRouter.default)((0, _reactRedux.connect)(
|
|
352
|
+
var _default = (0, _WithRouter.default)((0, _reactRedux.connect)(function (dispatch) {
|
|
353
|
+
return (0, _redux.bindActionCreators)(_DashboardStore.actionCreators, dispatch);
|
|
354
|
+
})(ResetPassword));
|
|
301
355
|
|
|
302
356
|
exports.default = _default;
|
|
@@ -11,8 +11,8 @@ var _Utils = _interopRequireDefault(require("../../Utils"));
|
|
|
11
11
|
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
(0, _RestUtils.sendRequest)("".concat(url, "?username=").concat(username, "&password=").concat(password), response
|
|
14
|
+
var login = function login(url, username, password, callback, errorCallback) {
|
|
15
|
+
(0, _RestUtils.sendRequest)("".concat(url, "?username=").concat(username, "&password=").concat(password), function (response) {
|
|
16
16
|
if (response.accessToken === null) {
|
|
17
17
|
if (response.forcePasswordChange === true) {
|
|
18
18
|
callback(true, null, response);
|
|
@@ -27,7 +27,7 @@ const login = (url, username, password, callback, errorCallback) => {
|
|
|
27
27
|
sessionStorage.setItem("username", username);
|
|
28
28
|
callback(true);
|
|
29
29
|
}
|
|
30
|
-
}, e
|
|
30
|
+
}, function (e) {
|
|
31
31
|
if (!_Utils.default.isNull(callback)) {
|
|
32
32
|
callback(false, 'Server error occurred, please try again later');
|
|
33
33
|
}
|
|
@@ -40,10 +40,10 @@ const login = (url, username, password, callback, errorCallback) => {
|
|
|
40
40
|
|
|
41
41
|
exports.login = login;
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
(0, _RestUtils.sendRequest)("".concat(url, "?username=").concat(username), response
|
|
43
|
+
var forgotPassword = function forgotPassword(url, username, callback, errorCallback) {
|
|
44
|
+
(0, _RestUtils.sendRequest)("".concat(url, "?username=").concat(username), function (response) {
|
|
45
45
|
callback(true, "The request has been sent successfully");
|
|
46
|
-
}, e
|
|
46
|
+
}, function (e) {
|
|
47
47
|
if (Object.entries(e).length === 0) {
|
|
48
48
|
errorCallback(e.message);
|
|
49
49
|
} else {
|
|
@@ -54,10 +54,10 @@ const forgotPassword = (url, username, callback, errorCallback) => {
|
|
|
54
54
|
|
|
55
55
|
exports.forgotPassword = forgotPassword;
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
(0, _RestUtils.sendRequest)("".concat(url, "?code=").concat(code, "&password=").concat(password, "&username=").concat(username), response
|
|
57
|
+
var resetPassword = function resetPassword(url, code, username, password, callback, errorCallback) {
|
|
58
|
+
(0, _RestUtils.sendRequest)("".concat(url, "?code=").concat(code, "&password=").concat(password, "&username=").concat(username), function (response) {
|
|
59
59
|
callback(true, "The the password has been reset successfully");
|
|
60
|
-
}, e
|
|
60
|
+
}, function (e) {
|
|
61
61
|
if (Object.entries(e).length === 0) {
|
|
62
62
|
errorCallback(e.message);
|
|
63
63
|
} else {
|
|
@@ -68,15 +68,15 @@ const resetPassword = (url, code, username, password, callback, errorCallback) =
|
|
|
68
68
|
|
|
69
69
|
exports.resetPassword = resetPassword;
|
|
70
70
|
|
|
71
|
-
|
|
72
|
-
(0, _RestUtils.sendRequest)("".concat(url, "?newPassword=").concat(password, "&username=").concat(username, "&sessionId=").concat(sessionId, "&challengeParamenters=").concat(challengeParamenters), response
|
|
71
|
+
var changePassword = function changePassword(url, username, password, sessionId, challengeParamenters, callback, errorCallback) {
|
|
72
|
+
(0, _RestUtils.sendRequest)("".concat(url, "?newPassword=").concat(password, "&username=").concat(username, "&sessionId=").concat(sessionId, "&challengeParamenters=").concat(challengeParamenters), function (response) {
|
|
73
73
|
sessionStorage.setItem("username", username);
|
|
74
74
|
sessionStorage.setItem("accessToken", response.accessToken);
|
|
75
75
|
sessionStorage.setItem("refreshToken", response.refreshToken);
|
|
76
76
|
sessionStorage.setItem("idToken", response.idToken);
|
|
77
77
|
sessionStorage.setItem("lastLogin", new Date().getTime());
|
|
78
78
|
callback();
|
|
79
|
-
}, e
|
|
79
|
+
}, function (e) {
|
|
80
80
|
if (Object.entries(e).length === 0) {
|
|
81
81
|
errorCallback(e.message);
|
|
82
82
|
} else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agilemotion/oui-react-js",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.2",
|
|
4
4
|
"babel": {
|
|
5
5
|
"presets": [
|
|
6
6
|
"@babel/preset-env",
|
|
@@ -105,7 +105,6 @@
|
|
|
105
105
|
"browserslist": [
|
|
106
106
|
">0.2%",
|
|
107
107
|
"not dead",
|
|
108
|
-
"not ie <= 11",
|
|
109
108
|
"not op_mini all"
|
|
110
109
|
],
|
|
111
110
|
"optionalDependencies": {
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
|
-
var _Utils = _interopRequireDefault(require("../../Utils"));
|
|
13
|
-
|
|
14
|
-
var _PortalNavbar = _interopRequireDefault(require("../navbars/PortalNavbar"));
|
|
15
|
-
|
|
16
|
-
require("./BusinessPortalAppDashboard.css");
|
|
17
|
-
|
|
18
|
-
var _Workspace = _interopRequireDefault(require("./components/portal/Workspace"));
|
|
19
|
-
|
|
20
|
-
var _Observable = _interopRequireDefault(require("../../event/Observable"));
|
|
21
|
-
|
|
22
|
-
var _RestUtils = require("../../RestUtils");
|
|
23
|
-
|
|
24
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
-
|
|
26
|
-
let ps;
|
|
27
|
-
|
|
28
|
-
const BusinessPortalAppDashboard = /*#__PURE__*/_react.default.memo(props => {
|
|
29
|
-
const [routes, setRoutes] = _react.default.useState([]);
|
|
30
|
-
|
|
31
|
-
const [currentModule, setCurrentModule] = _react.default.useState(null);
|
|
32
|
-
|
|
33
|
-
const [logo, setLogo] = _react.default.useState("data:image/png;base64," + props.logo);
|
|
34
|
-
|
|
35
|
-
const getItems = (items, level) => {
|
|
36
|
-
let newItems = [];
|
|
37
|
-
|
|
38
|
-
for (let i = 0; i < items.length; i++) {
|
|
39
|
-
_Observable.default.clearComponentEventListeners(items[i].id);
|
|
40
|
-
|
|
41
|
-
let createItem = {};
|
|
42
|
-
createItem.name = items[i].attributes.label;
|
|
43
|
-
createItem.mini = "SS";
|
|
44
|
-
createItem.layout = "/admin";
|
|
45
|
-
createItem.item = items[i];
|
|
46
|
-
createItem.level = level;
|
|
47
|
-
|
|
48
|
-
if (!_Utils.default.isNull(items[i].subMenu)) {
|
|
49
|
-
createItem.collapse = true;
|
|
50
|
-
createItem.state = items[i].id + "SubMenuCollapse";
|
|
51
|
-
createItem.views = getItems(items[i].subMenu.items, level + 1);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
newItems.push(createItem);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
return newItems;
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
const getMenu = path => {
|
|
61
|
-
return new Promise(resolve => {
|
|
62
|
-
let service = {
|
|
63
|
-
url: '/ui/api/v1/menu/get',
|
|
64
|
-
parameters: [{
|
|
65
|
-
name: 'id',
|
|
66
|
-
value: path,
|
|
67
|
-
httpParameterType: 'QUERY_PARAMETER'
|
|
68
|
-
}, {
|
|
69
|
-
name: 'version',
|
|
70
|
-
value: 1.0,
|
|
71
|
-
httpParameterType: 'QUERY_PARAMETER'
|
|
72
|
-
}],
|
|
73
|
-
contentType: 'application/json'
|
|
74
|
-
};
|
|
75
|
-
(0, _RestUtils.invokeRest)(service, {
|
|
76
|
-
api: {
|
|
77
|
-
get id() {
|
|
78
|
-
return 'portal-dashboard';
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
}, 'portal-dashboard', result => {
|
|
83
|
-
resolve(result.menus);
|
|
84
|
-
}, e => {
|
|
85
|
-
console.error(e);
|
|
86
|
-
resolve(null);
|
|
87
|
-
}, null);
|
|
88
|
-
});
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
_react.default.useEffect(() => {
|
|
92
|
-
document.body.classList.add("white-content");
|
|
93
|
-
|
|
94
|
-
if (navigator.platform.indexOf("Win") > -1) {//ps.destroy();
|
|
95
|
-
//document.documentElement.className.add("perfect-scrollbar-off");
|
|
96
|
-
//document.documentElement.classList.remove("perfect-scrollbar-on");
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
window.removeEventListener("scroll", showNavbarButton); //dispatch(actionCreators.setSecondaryThemeColor(props.settings.systemProfileDto.secondCorporateBrandColor));
|
|
100
|
-
|
|
101
|
-
if (!_Utils.default.isNull(props.settings)) {
|
|
102
|
-
setCurrentModule("home");
|
|
103
|
-
}
|
|
104
|
-
}, [props.settings]);
|
|
105
|
-
|
|
106
|
-
const handleMiniClick = () => {};
|
|
107
|
-
|
|
108
|
-
const showNavbarButton = () => {
|
|
109
|
-
if (document.documentElement.scrollTop > 50 || document.scrollingElement.scrollTop > 50) {//setOpacity(1);
|
|
110
|
-
} else if (document.documentElement.scrollTop <= 50 || document.scrollingElement.scrollTop <= 50) {//setOpacity(0);
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
115
|
-
className: "wrapper",
|
|
116
|
-
style: {
|
|
117
|
-
height: '100%',
|
|
118
|
-
overflow: 'hidden'
|
|
119
|
-
}
|
|
120
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
121
|
-
className: "row-*-*"
|
|
122
|
-
}, /*#__PURE__*/_react.default.createElement(_PortalNavbar.default, {
|
|
123
|
-
logoutCallBack: props.logoutCallBack,
|
|
124
|
-
appLogoPath: props.appLogoPath,
|
|
125
|
-
avatar: props.avatar,
|
|
126
|
-
currentModule: currentModule,
|
|
127
|
-
moduleMenus: props.settings.modules,
|
|
128
|
-
moduleChangeHandler: selected => {
|
|
129
|
-
setCurrentModule(selected);
|
|
130
|
-
},
|
|
131
|
-
logo: {
|
|
132
|
-
outterLink: "",
|
|
133
|
-
text: "",
|
|
134
|
-
imgSrc: logo
|
|
135
|
-
}
|
|
136
|
-
}), " "), /*#__PURE__*/_react.default.createElement("div", {
|
|
137
|
-
className: "portal-dashboard-content"
|
|
138
|
-
}, /*#__PURE__*/_react.default.createElement(_Workspace.default, {
|
|
139
|
-
routes: routes,
|
|
140
|
-
heading: "Welcome, " + props.settings.userFirstName,
|
|
141
|
-
activeRouteMenu: {
|
|
142
|
-
id: 'myWorkItems',
|
|
143
|
-
name: 'My Work Items'
|
|
144
|
-
},
|
|
145
|
-
secondaryColor: props.settings.secondaryColor
|
|
146
|
-
}))));
|
|
147
|
-
});
|
|
148
|
-
|
|
149
|
-
BusinessPortalAppDashboard.propTypes = {
|
|
150
|
-
children: _propTypes.default.element,
|
|
151
|
-
width: _propTypes.default.number
|
|
152
|
-
};
|
|
153
|
-
var _default = BusinessPortalAppDashboard;
|
|
154
|
-
exports.default = _default;
|