@agilemotion/oui-react-js 1.2.6 → 1.2.8
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/ApplicationContext.js +244 -250
- package/dist/BasicApp.js +53 -97
- package/dist/BasicAppHome.js +86 -122
- package/dist/DynamicJS.js +65 -88
- package/dist/RestUtils.js +284 -315
- package/dist/TypedValue.js +15 -18
- package/dist/Utils.js +224 -262
- package/dist/assets/jss/components/authNavbarStyle.js +162 -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 +1 -1
- 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 +192 -194
- package/dist/assets/jss/components/customInputStyle.js +1 -1
- package/dist/assets/jss/components/dropdownStyle.js +107 -109
- package/dist/assets/jss/components/footerStyle.js +1 -1
- package/dist/assets/jss/components/headerLinksStyle.js +95 -97
- package/dist/assets/jss/components/headerStyle.js +60 -62
- package/dist/assets/jss/components/navbarLinksStyle.js +137 -139
- package/dist/assets/jss/components/navbarStyle.js +71 -73
- package/dist/assets/jss/components/sidebarStyle.js +453 -455
- package/dist/assets/jss/components/typographyStyle.js +1 -1
- package/dist/assets/jss/rootStyle.js +57 -57
- package/dist/assets/jss/views/layoutStyle.js +42 -44
- package/dist/assets/jss/views/loginBasicStyle.js +1 -1
- package/dist/assets/jss/views/loginStyle.js +87 -89
- package/dist/components/AlertBar.js +21 -23
- package/dist/components/AlertItem.js +23 -25
- package/dist/components/AlertTemplate.js +29 -30
- package/dist/components/Button.js +35 -37
- package/dist/components/ConfirmationDialog.js +3 -3
- package/dist/components/DataGrid.js +250 -276
- package/dist/components/DataGridColumn.js +34 -36
- package/dist/components/DataGridFilter.js +92 -94
- package/dist/components/DataGridHeading.js +32 -38
- package/dist/components/DocumentViewer.js +12 -11
- package/dist/components/Graph.js +34 -50
- package/dist/components/GraphNode.js +53 -56
- package/dist/components/HtmlPanel.js +6 -8
- package/dist/components/Icon.js +28 -58
- package/dist/components/LoadingIndicator.js +2 -2
- package/dist/components/PopupView.js +15 -17
- package/dist/components/RegularButton.js +20 -20
- package/dist/components/TabPage.js +23 -25
- package/dist/components/TabPanel.js +34 -34
- package/dist/components/TableCellContent.js +34 -34
- package/dist/components/TitleBar.js +16 -16
- package/dist/components/Toolbar.js +112 -118
- package/dist/components/Tooltip.js +35 -43
- package/dist/components/Tree.js +54 -60
- package/dist/components/card/Card.js +17 -17
- package/dist/components/card/CardAvatar.js +10 -10
- package/dist/components/card/CardBody.js +14 -14
- package/dist/components/card/CardFooter.js +13 -13
- package/dist/components/card/CardHeader.js +14 -14
- package/dist/components/card/CardIcon.js +7 -7
- package/dist/components/card/CardText.js +7 -7
- package/dist/components/customInput/CustomInput.js +17 -17
- package/dist/components/dashboard/BasicApp.js +25 -25
- package/dist/components/dashboard/BasicBusinessApp.js +116 -119
- package/dist/components/dashboard/components/Header.js +11 -11
- package/dist/components/dashboard/components/LeftDrawer.js +3 -3
- package/dist/components/dashboard/components/UserIdentity.js +2 -2
- package/dist/components/dashboard/components/blackDashboard/fixedPlugin/FixedPlugin.js +85 -127
- package/dist/components/dashboard/components/blackDashboard/sidebar/Sidebar.js +151 -191
- package/dist/components/footer/Footer.js +8 -8
- package/dist/components/footer/HomeFooter.js +34 -66
- package/dist/components/form/BaseField.js +78 -78
- package/dist/components/form/Checkbox.js +8 -10
- package/dist/components/form/DatePicker.js +15 -19
- package/dist/components/form/FieldSet.js +62 -88
- package/dist/components/form/Form.js +317 -318
- package/dist/components/form/GridField.js +81 -86
- package/dist/components/form/LabelField.js +10 -12
- package/dist/components/form/LookupField.js +40 -42
- package/dist/components/form/Section.js +37 -39
- package/dist/components/form/SelectItem.js +35 -39
- package/dist/components/form/TextField.js +18 -22
- package/dist/components/form/TimePicker.js +15 -19
- package/dist/components/form/TransferList.js +83 -91
- package/dist/components/form/UploadField.js +135 -145
- package/dist/components/grid/GridContainer.js +6 -6
- package/dist/components/grid/GridItem.js +6 -6
- package/dist/components/layout/CollapsiblePanel.js +18 -20
- package/dist/components/layout/Layout.js +70 -72
- package/dist/components/layout/View.js +134 -136
- package/dist/components/layout/ViewPort.js +56 -98
- package/dist/components/menu/CollapsibleMenu.js +26 -28
- package/dist/components/menu/MenuBars.js +53 -59
- package/dist/components/menu/MenuButton.js +70 -77
- package/dist/components/menu/MenuItem.js +15 -17
- package/dist/components/menu/MenuLink.js +9 -11
- package/dist/components/menu/PopupMenu.js +12 -16
- package/dist/components/navbars/AuthNavbar.js +12 -12
- package/dist/components/navbars/HomeNavbar.js +175 -222
- package/dist/components/navbars/NavbarLinks.js +45 -46
- package/dist/components/typography/Danger.js +3 -3
- package/dist/components/typography/Info.js +3 -3
- package/dist/components/typography/Link.js +3 -3
- package/dist/event/ActionHandlers.js +43 -57
- package/dist/event/Event.js +13 -16
- package/dist/event/EventListener.js +36 -39
- package/dist/event/EventType.js +1 -5
- package/dist/event/LoadDataActionHandler.js +8 -20
- package/dist/event/Observable.js +162 -198
- package/dist/event/RouteActionHandler.js +76 -88
- package/dist/event/ScriptActionHandler.js +8 -20
- package/dist/event/ServiceCallActionHandler.js +28 -40
- package/dist/event/SignalGraphActionHandler.js +7 -19
- package/dist/js/Addresses.js +15 -27
- package/dist/js/DynamicLib.js +11 -14
- package/dist/js/Validators.js +5 -6
- package/dist/redux/store/ConfigureStore.js +6 -6
- package/dist/redux/store/DashboardStore.js +83 -95
- package/dist/redux/store/History.js +1 -1
- package/dist/redux/store/SecurityStore.js +41 -45
- package/dist/security/TokenManager.js +30 -44
- package/dist/theme-default.js +1 -1
- package/dist/view/Dashboard.js +108 -114
- package/dist/view/Settings.js +2 -4
- package/dist/view/security/ChangePasswordBasic.js +96 -100
- package/dist/view/security/ForgotPassword.js +52 -56
- package/dist/view/security/ForgotPasswordBasic.js +48 -54
- package/dist/view/security/Login.js +58 -62
- package/dist/view/security/LoginBasic.js +50 -54
- package/dist/view/security/ResetPassword.js +58 -62
- package/dist/view/security/ResetPasswordBasic.js +89 -93
- package/dist/view/security/Security.js +12 -12
- package/package.json +1 -1
|
@@ -63,57 +63,57 @@ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructur
|
|
|
63
63
|
|
|
64
64
|
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); }
|
|
65
65
|
|
|
66
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
66
|
+
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; }
|
|
67
67
|
|
|
68
68
|
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; }
|
|
69
69
|
|
|
70
70
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
71
71
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
_react.default.useEffect(
|
|
116
|
-
|
|
72
|
+
const useStyles = (0, _styles.makeStyles)(_loginStyle.default);
|
|
73
|
+
|
|
74
|
+
const Login = props => {
|
|
75
|
+
const _React$useState = _react.default.useState(""),
|
|
76
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
77
|
+
username = _React$useState2[0],
|
|
78
|
+
setUsername = _React$useState2[1];
|
|
79
|
+
|
|
80
|
+
const _React$useState3 = _react.default.useState(""),
|
|
81
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
82
|
+
usernameState = _React$useState4[0],
|
|
83
|
+
setUsernameState = _React$useState4[1];
|
|
84
|
+
|
|
85
|
+
const _React$useState5 = _react.default.useState(""),
|
|
86
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
87
|
+
password = _React$useState6[0],
|
|
88
|
+
setPassword = _React$useState6[1];
|
|
89
|
+
|
|
90
|
+
const _React$useState7 = _react.default.useState(""),
|
|
91
|
+
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
92
|
+
passwordState = _React$useState8[0],
|
|
93
|
+
setPasswordState = _React$useState8[1];
|
|
94
|
+
|
|
95
|
+
const _React$useState9 = _react.default.useState(false),
|
|
96
|
+
_React$useState10 = _slicedToArray(_React$useState9, 2),
|
|
97
|
+
isLoading = _React$useState10[0],
|
|
98
|
+
setIsLoading = _React$useState10[1];
|
|
99
|
+
|
|
100
|
+
const _React$useState11 = _react.default.useState(null),
|
|
101
|
+
_React$useState12 = _slicedToArray(_React$useState11, 2),
|
|
102
|
+
showPassword = _React$useState12[0],
|
|
103
|
+
setShowPassword = _React$useState12[1];
|
|
104
|
+
|
|
105
|
+
const _React$useState13 = _react.default.useState(null),
|
|
106
|
+
_React$useState14 = _slicedToArray(_React$useState13, 2),
|
|
107
|
+
errorMessage = _React$useState14[0],
|
|
108
|
+
setErrorMessage = _React$useState14[1];
|
|
109
|
+
|
|
110
|
+
const _React$useState15 = _react.default.useState("cardHidden"),
|
|
111
|
+
_React$useState16 = _slicedToArray(_React$useState15, 2),
|
|
112
|
+
cardAnimation = _React$useState16[0],
|
|
113
|
+
setCardAnimation = _React$useState16[1];
|
|
114
|
+
|
|
115
|
+
_react.default.useEffect(() => {
|
|
116
|
+
let id = setTimeout(function () {
|
|
117
117
|
setCardAnimation("");
|
|
118
118
|
}, 700);
|
|
119
119
|
document.body.style.overflow = "unset";
|
|
@@ -122,13 +122,13 @@ var Login = function Login(props) {
|
|
|
122
122
|
};
|
|
123
123
|
});
|
|
124
124
|
|
|
125
|
-
|
|
125
|
+
const classes = useStyles();
|
|
126
126
|
|
|
127
|
-
|
|
127
|
+
const handleClickShowPassword = () => {
|
|
128
128
|
setShowPassword(!showPassword);
|
|
129
129
|
};
|
|
130
130
|
|
|
131
|
-
|
|
131
|
+
const fireLogin = () => {
|
|
132
132
|
if (username === "") {
|
|
133
133
|
setUsernameState("error");
|
|
134
134
|
}
|
|
@@ -139,24 +139,24 @@ var Login = function Login(props) {
|
|
|
139
139
|
|
|
140
140
|
if (username && password) {
|
|
141
141
|
setIsLoading(true);
|
|
142
|
-
(0, _security.login)(props.url, username, password,
|
|
142
|
+
(0, _security.login)(props.url, username, password, authenticated => {
|
|
143
143
|
setIsLoading(false);
|
|
144
144
|
|
|
145
145
|
if (authenticated) {
|
|
146
146
|
props.history.push('/home');
|
|
147
147
|
}
|
|
148
|
-
},
|
|
148
|
+
}, errorMessage => {
|
|
149
149
|
setIsLoading(false);
|
|
150
150
|
setErrorMessage(errorMessage);
|
|
151
151
|
});
|
|
152
152
|
}
|
|
153
153
|
};
|
|
154
154
|
|
|
155
|
-
|
|
155
|
+
const handleMouseDownPassword = event => {
|
|
156
156
|
event.preventDefault();
|
|
157
157
|
};
|
|
158
158
|
|
|
159
|
-
_react.default.useEffect(
|
|
159
|
+
_react.default.useEffect(() => {
|
|
160
160
|
_ApplicationContext.default.clear();
|
|
161
161
|
});
|
|
162
162
|
|
|
@@ -187,7 +187,7 @@ var Login = function Login(props) {
|
|
|
187
187
|
className: classes.cardTitle
|
|
188
188
|
}, " Log in "), /*#__PURE__*/_react.default.createElement("div", {
|
|
189
189
|
className: classes.socialLine
|
|
190
|
-
}, ["fa fa-lock"].map(
|
|
190
|
+
}, ["fa fa-lock"].map((prop, key) => {
|
|
191
191
|
return /*#__PURE__*/_react.default.createElement(_RegularButton.default, {
|
|
192
192
|
color: "transparent",
|
|
193
193
|
justIcon: true,
|
|
@@ -217,7 +217,7 @@ var Login = function Login(props) {
|
|
|
217
217
|
className: classes.inputAdornmentIcon
|
|
218
218
|
})),
|
|
219
219
|
value: username,
|
|
220
|
-
onChange:
|
|
220
|
+
onChange: e => {
|
|
221
221
|
setUsername(e.target.value);
|
|
222
222
|
}
|
|
223
223
|
}
|
|
@@ -243,7 +243,7 @@ var Login = function Login(props) {
|
|
|
243
243
|
autoComplete: "off",
|
|
244
244
|
required: true,
|
|
245
245
|
value: password,
|
|
246
|
-
onChange:
|
|
246
|
+
onChange: e => {
|
|
247
247
|
setPassword(e.target.value);
|
|
248
248
|
}
|
|
249
249
|
}
|
|
@@ -261,9 +261,7 @@ var Login = function Login(props) {
|
|
|
261
261
|
simple: true,
|
|
262
262
|
size: "lg",
|
|
263
263
|
block: true,
|
|
264
|
-
onClick:
|
|
265
|
-
return fireLogin();
|
|
266
|
-
},
|
|
264
|
+
onClick: () => fireLogin(),
|
|
267
265
|
disabled: isLoading
|
|
268
266
|
}, isLoading && /*#__PURE__*/_react.default.createElement("i", {
|
|
269
267
|
className: "fa fa-refresh fa-spin",
|
|
@@ -275,8 +273,6 @@ var Login = function Login(props) {
|
|
|
275
273
|
})))));
|
|
276
274
|
};
|
|
277
275
|
|
|
278
|
-
var _default = (0, _reactRouterDom.withRouter)((0, _reactRedux.connect)(
|
|
279
|
-
return (0, _redux.bindActionCreators)(_DashboardStore.actionCreators, dispatch);
|
|
280
|
-
})(Login));
|
|
276
|
+
var _default = (0, _reactRouterDom.withRouter)((0, _reactRedux.connect)(dispatch => (0, _redux.bindActionCreators)(_DashboardStore.actionCreators, dispatch))(Login));
|
|
281
277
|
|
|
282
278
|
exports.default = _default;
|
|
@@ -51,57 +51,57 @@ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructur
|
|
|
51
51
|
|
|
52
52
|
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); }
|
|
53
53
|
|
|
54
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
54
|
+
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; }
|
|
55
55
|
|
|
56
56
|
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; }
|
|
57
57
|
|
|
58
58
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
59
59
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
60
|
+
const Login = props => {
|
|
61
|
+
const _React$useState = _react.default.useState(null),
|
|
62
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
63
|
+
errorMessage = _React$useState2[0],
|
|
64
|
+
setErrorMessage = _React$useState2[1];
|
|
65
|
+
|
|
66
|
+
const _React$useState3 = _react.default.useState(false),
|
|
67
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
68
|
+
usernameError = _React$useState4[0],
|
|
69
|
+
setUsernameError = _React$useState4[1];
|
|
70
|
+
|
|
71
|
+
const _React$useState5 = _react.default.useState(false),
|
|
72
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
73
|
+
passwordError = _React$useState6[0],
|
|
74
|
+
setPasswordError = _React$useState6[1];
|
|
75
|
+
|
|
76
|
+
const _React$useState7 = _react.default.useState(null),
|
|
77
|
+
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
78
|
+
username = _React$useState8[0],
|
|
79
|
+
setUsername = _React$useState8[1];
|
|
80
|
+
|
|
81
|
+
const _React$useState9 = _react.default.useState(null),
|
|
82
|
+
_React$useState10 = _slicedToArray(_React$useState9, 2),
|
|
83
|
+
password = _React$useState10[0],
|
|
84
|
+
setPassword = _React$useState10[1];
|
|
85
|
+
|
|
86
|
+
const _React$useState11 = _react.default.useState(null),
|
|
87
|
+
_React$useState12 = _slicedToArray(_React$useState11, 2),
|
|
88
|
+
showPassword = _React$useState12[0],
|
|
89
|
+
setShowPassword = _React$useState12[1];
|
|
90
|
+
|
|
91
|
+
const _React$useState13 = _react.default.useState(false),
|
|
92
|
+
_React$useState14 = _slicedToArray(_React$useState13, 2),
|
|
93
|
+
isLoading = _React$useState14[0],
|
|
94
|
+
setIsLoading = _React$useState14[1];
|
|
95
|
+
|
|
96
|
+
const handleClickShowPassword = () => {
|
|
97
97
|
setShowPassword(!showPassword);
|
|
98
98
|
};
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
const handleMouseDownPassword = event => {
|
|
101
101
|
event.preventDefault();
|
|
102
102
|
};
|
|
103
103
|
|
|
104
|
-
_react.default.useEffect(
|
|
104
|
+
_react.default.useEffect(() => {
|
|
105
105
|
_ApplicationContext.default.clear();
|
|
106
106
|
});
|
|
107
107
|
|
|
@@ -146,9 +146,7 @@ var Login = function Login(props) {
|
|
|
146
146
|
}, props.title)), !_Utils.default.isNull(errorMessage) ? /*#__PURE__*/_react.default.createElement(_Alert.default, {
|
|
147
147
|
variant: "danger",
|
|
148
148
|
show: !_Utils.default.isNull(errorMessage),
|
|
149
|
-
onClose:
|
|
150
|
-
return setErrorMessage(null);
|
|
151
|
-
},
|
|
149
|
+
onClose: () => setErrorMessage(null),
|
|
152
150
|
dismissible: true
|
|
153
151
|
}, /*#__PURE__*/_react.default.createElement(_Alert.default.Heading, null, "Login error!"), /*#__PURE__*/_react.default.createElement("p", null, errorMessage)) : "", /*#__PURE__*/_react.default.createElement("div", {
|
|
154
152
|
style: _loginBasicStyle.default.loginContainer
|
|
@@ -160,8 +158,8 @@ var Login = function Login(props) {
|
|
|
160
158
|
error: usernameError,
|
|
161
159
|
label: "Username",
|
|
162
160
|
value: username || '',
|
|
163
|
-
onChange:
|
|
164
|
-
|
|
161
|
+
onChange: e => {
|
|
162
|
+
let usernamePresent = !_Utils.default.isNull(e.target.value) && e.target.value.trim().length > 0;
|
|
165
163
|
setUsername(e.target.value);
|
|
166
164
|
setUsernameError(!usernamePresent);
|
|
167
165
|
},
|
|
@@ -178,8 +176,8 @@ var Login = function Login(props) {
|
|
|
178
176
|
error: passwordError,
|
|
179
177
|
type: showPassword ? 'text' : 'password',
|
|
180
178
|
value: password || '',
|
|
181
|
-
onChange:
|
|
182
|
-
|
|
179
|
+
onChange: e => {
|
|
180
|
+
let passwordPresent = !_Utils.default.isNull(e.target.value) && e.target.value.trim().length > 0;
|
|
183
181
|
setPassword(e.target.value);
|
|
184
182
|
setPasswordError(!passwordPresent);
|
|
185
183
|
},
|
|
@@ -203,15 +201,15 @@ var Login = function Login(props) {
|
|
|
203
201
|
className: "w-100"
|
|
204
202
|
}, /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
205
203
|
disabled: isLoading,
|
|
206
|
-
onClick:
|
|
207
|
-
|
|
208
|
-
|
|
204
|
+
onClick: () => {
|
|
205
|
+
let usernamePresent = !_Utils.default.isNull(username) && username.trim().length > 0;
|
|
206
|
+
let passwordPresent = !_Utils.default.isNull(password) && password.trim().length > 0;
|
|
209
207
|
setUsernameError(!usernamePresent);
|
|
210
208
|
setPasswordError(!passwordPresent);
|
|
211
209
|
|
|
212
210
|
if (usernamePresent && passwordPresent) {
|
|
213
211
|
setIsLoading(true);
|
|
214
|
-
(0, _Security.login)(props.url, username, password,
|
|
212
|
+
(0, _Security.login)(props.url, username, password, (authenticated, message, response) => {
|
|
215
213
|
if (authenticated) {
|
|
216
214
|
if (!_Utils.default.isNull(response) && response.forcePasswordChange === true) {
|
|
217
215
|
props.history.push("/change-password?username=".concat(username, "&sessionId=").concat(response.sessionId, "&challengeParamenters=").concat(encodeURI(JSON.stringify(response.challangeParameters))));
|
|
@@ -247,8 +245,6 @@ var Login = function Login(props) {
|
|
|
247
245
|
})));
|
|
248
246
|
};
|
|
249
247
|
|
|
250
|
-
var _default = (0, _reactRouterDom.withRouter)((0, _reactRedux.connect)(
|
|
251
|
-
return (0, _redux.bindActionCreators)(_DashboardStore.actionCreators, dispatch);
|
|
252
|
-
})(Login));
|
|
248
|
+
var _default = (0, _reactRouterDom.withRouter)((0, _reactRedux.connect)(dispatch => (0, _redux.bindActionCreators)(_DashboardStore.actionCreators, dispatch))(Login));
|
|
253
249
|
|
|
254
250
|
exports.default = _default;
|
|
@@ -59,57 +59,57 @@ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructur
|
|
|
59
59
|
|
|
60
60
|
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); }
|
|
61
61
|
|
|
62
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
62
|
+
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; }
|
|
63
63
|
|
|
64
64
|
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; }
|
|
65
65
|
|
|
66
66
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
67
67
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
_react.default.useEffect(
|
|
112
|
-
|
|
68
|
+
const useStyles = (0, _styles.makeStyles)(_loginStyle.default);
|
|
69
|
+
|
|
70
|
+
const ResetPassword = props => {
|
|
71
|
+
const _React$useState = _react.default.useState(""),
|
|
72
|
+
_React$useState2 = _slicedToArray(_React$useState, 7),
|
|
73
|
+
username = _React$useState2[0],
|
|
74
|
+
setUsername = _React$useState2[1],
|
|
75
|
+
setUsernameState = _React$useState2[2],
|
|
76
|
+
password = _React$useState2[3],
|
|
77
|
+
setPassword = _React$useState2[4],
|
|
78
|
+
passwordState = _React$useState2[5],
|
|
79
|
+
setErrorMessage = _React$useState2[6];
|
|
80
|
+
|
|
81
|
+
const _React$useState3 = _react.default.useState(""),
|
|
82
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
83
|
+
confirmPassword = _React$useState4[0],
|
|
84
|
+
setConfirmPassword = _React$useState4[1];
|
|
85
|
+
|
|
86
|
+
const _React$useState5 = _react.default.useState(false),
|
|
87
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
88
|
+
isLoading = _React$useState6[0],
|
|
89
|
+
setIsLoading = _React$useState6[1];
|
|
90
|
+
|
|
91
|
+
const _React$useState7 = _react.default.useState(""),
|
|
92
|
+
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
93
|
+
confirmPasswordState = _React$useState8[0],
|
|
94
|
+
setConfirmPasswordState = _React$useState8[1];
|
|
95
|
+
|
|
96
|
+
const _React$useState9 = _react.default.useState(null),
|
|
97
|
+
_React$useState10 = _slicedToArray(_React$useState9, 2),
|
|
98
|
+
showPassword = _React$useState10[0],
|
|
99
|
+
setShowPassword = _React$useState10[1];
|
|
100
|
+
|
|
101
|
+
const _React$useState11 = _react.default.useState(false),
|
|
102
|
+
_React$useState12 = _slicedToArray(_React$useState11, 2),
|
|
103
|
+
codeSent = _React$useState12[0],
|
|
104
|
+
setCodeSent = _React$useState12[1];
|
|
105
|
+
|
|
106
|
+
const _React$useState13 = _react.default.useState("cardHidden"),
|
|
107
|
+
_React$useState14 = _slicedToArray(_React$useState13, 2),
|
|
108
|
+
cardAnimation = _React$useState14[0],
|
|
109
|
+
setCardAnimation = _React$useState14[1];
|
|
110
|
+
|
|
111
|
+
_react.default.useEffect(() => {
|
|
112
|
+
let id = setTimeout(function () {
|
|
113
113
|
setCardAnimation("");
|
|
114
114
|
}, 700);
|
|
115
115
|
document.body.style.overflow = "unset";
|
|
@@ -118,34 +118,34 @@ var ResetPassword = function ResetPassword(props) {
|
|
|
118
118
|
};
|
|
119
119
|
});
|
|
120
120
|
|
|
121
|
-
|
|
121
|
+
const classes = useStyles();
|
|
122
122
|
|
|
123
|
-
|
|
123
|
+
const handleClickShowPassword = () => {
|
|
124
124
|
setShowPassword(!showPassword);
|
|
125
125
|
};
|
|
126
126
|
|
|
127
|
-
|
|
127
|
+
const resetPassword = () => {
|
|
128
128
|
if (username === "") {
|
|
129
129
|
setUsernameState("error");
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
if (username) {
|
|
133
133
|
setIsLoading(true);
|
|
134
|
-
(0, _security.forgotPassword)(props.url, username,
|
|
134
|
+
(0, _security.forgotPassword)(props.url, username, codeSent => {
|
|
135
135
|
setIsLoading(false);
|
|
136
136
|
setCodeSent(codeSent);
|
|
137
|
-
},
|
|
137
|
+
}, errorMessage => {
|
|
138
138
|
setIsLoading(false);
|
|
139
139
|
setErrorMessage(errorMessage);
|
|
140
140
|
});
|
|
141
141
|
}
|
|
142
142
|
};
|
|
143
143
|
|
|
144
|
-
|
|
144
|
+
const handleMouseDownPassword = event => {
|
|
145
145
|
event.preventDefault();
|
|
146
146
|
};
|
|
147
147
|
|
|
148
|
-
_react.default.useEffect(
|
|
148
|
+
_react.default.useEffect(() => {
|
|
149
149
|
_ApplicationContext.default.clear();
|
|
150
150
|
});
|
|
151
151
|
|
|
@@ -176,7 +176,7 @@ var ResetPassword = function ResetPassword(props) {
|
|
|
176
176
|
className: classes.cardTitle
|
|
177
177
|
}, " Reset Password "), /*#__PURE__*/_react.default.createElement("div", {
|
|
178
178
|
className: classes.socialLine
|
|
179
|
-
}, ["fa fa-recycle"].map(
|
|
179
|
+
}, ["fa fa-recycle"].map((prop, key) => {
|
|
180
180
|
return /*#__PURE__*/_react.default.createElement(_RegularButton.default, {
|
|
181
181
|
color: "transparent",
|
|
182
182
|
justIcon: true,
|
|
@@ -207,7 +207,7 @@ var ResetPassword = function ResetPassword(props) {
|
|
|
207
207
|
autoComplete: "off",
|
|
208
208
|
required: true,
|
|
209
209
|
value: password,
|
|
210
|
-
onChange:
|
|
210
|
+
onChange: e => {
|
|
211
211
|
setPassword(e.target.value);
|
|
212
212
|
}
|
|
213
213
|
}
|
|
@@ -233,7 +233,7 @@ var ResetPassword = function ResetPassword(props) {
|
|
|
233
233
|
autoComplete: "off",
|
|
234
234
|
required: true,
|
|
235
235
|
value: confirmPassword,
|
|
236
|
-
onChange:
|
|
236
|
+
onChange: e => {
|
|
237
237
|
setConfirmPassword(e.target.value);
|
|
238
238
|
}
|
|
239
239
|
}
|
|
@@ -251,9 +251,7 @@ var ResetPassword = function ResetPassword(props) {
|
|
|
251
251
|
simple: true,
|
|
252
252
|
size: "lg",
|
|
253
253
|
block: true,
|
|
254
|
-
onClick:
|
|
255
|
-
return resetPassword();
|
|
256
|
-
},
|
|
254
|
+
onClick: () => resetPassword(),
|
|
257
255
|
disabled: isLoading
|
|
258
256
|
}, isLoading && /*#__PURE__*/_react.default.createElement("i", {
|
|
259
257
|
className: "fa fa-refresh fa-spin",
|
|
@@ -265,8 +263,6 @@ var ResetPassword = function ResetPassword(props) {
|
|
|
265
263
|
})))));
|
|
266
264
|
};
|
|
267
265
|
|
|
268
|
-
var _default = (0, _reactRouterDom.withRouter)((0, _reactRedux.connect)(
|
|
269
|
-
return (0, _redux.bindActionCreators)(_DashboardStore.actionCreators, dispatch);
|
|
270
|
-
})(ResetPassword));
|
|
266
|
+
var _default = (0, _reactRouterDom.withRouter)((0, _reactRedux.connect)(dispatch => (0, _redux.bindActionCreators)(_DashboardStore.actionCreators, dispatch))(ResetPassword));
|
|
271
267
|
|
|
272
268
|
exports.default = _default;
|