@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
|
@@ -17,110 +17,98 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
|
|
|
17
17
|
|
|
18
18
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
const requestType = 'REQUEST';
|
|
21
|
+
const receiveDashboardSettingsType = 'RECEIVE_DASHBOARD_SETTINGS';
|
|
22
|
+
const activeRouteMenu = 'ACTIVE_ROUTE_MENU';
|
|
23
|
+
const secondaryThemeColor = 'SECONDARY_THEME_COLOR';
|
|
24
|
+
const initialState = {
|
|
25
25
|
dashboardSettings: {},
|
|
26
26
|
isLoading: false,
|
|
27
27
|
error: false,
|
|
28
28
|
activeRouteMenu: "Dashboard",
|
|
29
29
|
secondaryThemeColor: "red"
|
|
30
30
|
};
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
getDashboardSettings: function
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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
|
-
|
|
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
|
-
case "end":
|
|
109
|
-
return _context3.stop();
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}, _callee3);
|
|
113
|
-
}));
|
|
114
|
-
|
|
115
|
-
return function (_x3) {
|
|
116
|
-
return _ref3.apply(this, arguments);
|
|
117
|
-
};
|
|
118
|
-
}();
|
|
119
|
-
}
|
|
31
|
+
let currentDashboardSettings = {};
|
|
32
|
+
const actionCreators = {
|
|
33
|
+
getDashboardSettings: url => /*#__PURE__*/function () {
|
|
34
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(dispatch) {
|
|
35
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
36
|
+
while (1) switch (_context.prev = _context.next) {
|
|
37
|
+
case 0:
|
|
38
|
+
dispatch({
|
|
39
|
+
type: requestType
|
|
40
|
+
});
|
|
41
|
+
(0, _RestUtils.sendRequest)(url, response => {
|
|
42
|
+
dispatch({
|
|
43
|
+
type: receiveDashboardSettingsType,
|
|
44
|
+
dashboardSettings: response,
|
|
45
|
+
error: false
|
|
46
|
+
});
|
|
47
|
+
}, () => {
|
|
48
|
+
dispatch({
|
|
49
|
+
type: receiveDashboardSettingsType,
|
|
50
|
+
dashboardSettings: null,
|
|
51
|
+
error: true
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
case 2:
|
|
56
|
+
case "end":
|
|
57
|
+
return _context.stop();
|
|
58
|
+
}
|
|
59
|
+
}, _callee);
|
|
60
|
+
}));
|
|
61
|
+
|
|
62
|
+
return function (_x) {
|
|
63
|
+
return _ref.apply(this, arguments);
|
|
64
|
+
};
|
|
65
|
+
}(),
|
|
66
|
+
setActiveRoute: route => /*#__PURE__*/function () {
|
|
67
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(dispatch) {
|
|
68
|
+
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
69
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
70
|
+
case 0:
|
|
71
|
+
dispatch({
|
|
72
|
+
type: activeRouteMenu,
|
|
73
|
+
activeRouteMenu: route
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
case 1:
|
|
77
|
+
case "end":
|
|
78
|
+
return _context2.stop();
|
|
79
|
+
}
|
|
80
|
+
}, _callee2);
|
|
81
|
+
}));
|
|
82
|
+
|
|
83
|
+
return function (_x2) {
|
|
84
|
+
return _ref2.apply(this, arguments);
|
|
85
|
+
};
|
|
86
|
+
}(),
|
|
87
|
+
setSecondaryThemeColor: secondaryColor => /*#__PURE__*/function () {
|
|
88
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(dispatch) {
|
|
89
|
+
return regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
90
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
91
|
+
case 0:
|
|
92
|
+
dispatch({
|
|
93
|
+
type: secondaryThemeColor,
|
|
94
|
+
secondaryThemeColor: secondaryColor
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
case 1:
|
|
98
|
+
case "end":
|
|
99
|
+
return _context3.stop();
|
|
100
|
+
}
|
|
101
|
+
}, _callee3);
|
|
102
|
+
}));
|
|
103
|
+
|
|
104
|
+
return function (_x3) {
|
|
105
|
+
return _ref3.apply(this, arguments);
|
|
106
|
+
};
|
|
107
|
+
}()
|
|
120
108
|
};
|
|
121
109
|
exports.actionCreators = actionCreators;
|
|
122
110
|
|
|
123
|
-
|
|
111
|
+
const reducer = (state, action) => {
|
|
124
112
|
state = state || initialState;
|
|
125
113
|
|
|
126
114
|
if (action.type === requestType) {
|
|
@@ -15,59 +15,55 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
|
|
|
15
15
|
|
|
16
16
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
const requestType = 'REQUEST';
|
|
19
|
+
const receiveUserDetailsType = 'RECEIVE_USER_DETAILS';
|
|
20
|
+
const initialState = {
|
|
21
21
|
userDetails: {},
|
|
22
22
|
isLoading: false,
|
|
23
23
|
error: false,
|
|
24
24
|
currentMenuJson: ""
|
|
25
25
|
};
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
login:
|
|
29
|
-
|
|
30
|
-
var
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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
|
-
return _ref.apply(this, arguments);
|
|
64
|
-
};
|
|
65
|
-
}();
|
|
66
|
-
}
|
|
26
|
+
let currentUserDetails = {};
|
|
27
|
+
const actionCreators = {
|
|
28
|
+
login: (url, username, password) => /*#__PURE__*/function () {
|
|
29
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(dispatch) {
|
|
30
|
+
var response, userDetails;
|
|
31
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
32
|
+
while (1) switch (_context.prev = _context.next) {
|
|
33
|
+
case 0:
|
|
34
|
+
dispatch({
|
|
35
|
+
type: requestType
|
|
36
|
+
});
|
|
37
|
+
_context.next = 3;
|
|
38
|
+
return fetch(url);
|
|
39
|
+
|
|
40
|
+
case 3:
|
|
41
|
+
response = _context.sent;
|
|
42
|
+
_context.next = 6;
|
|
43
|
+
return response.json();
|
|
44
|
+
|
|
45
|
+
case 6:
|
|
46
|
+
userDetails = _context.sent;
|
|
47
|
+
dispatch({
|
|
48
|
+
type: receiveUserDetailsType,
|
|
49
|
+
userDetails
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
case 8:
|
|
53
|
+
case "end":
|
|
54
|
+
return _context.stop();
|
|
55
|
+
}
|
|
56
|
+
}, _callee);
|
|
57
|
+
}));
|
|
58
|
+
|
|
59
|
+
return function (_x) {
|
|
60
|
+
return _ref.apply(this, arguments);
|
|
61
|
+
};
|
|
62
|
+
}()
|
|
67
63
|
};
|
|
68
64
|
exports.actionCreators = actionCreators;
|
|
69
65
|
|
|
70
|
-
|
|
66
|
+
const reducer = (state, action) => {
|
|
71
67
|
state = state || initialState;
|
|
72
68
|
|
|
73
69
|
if (action.type === requestType) {
|
|
@@ -11,53 +11,39 @@ var _RestUtils = require("../RestUtils");
|
|
|
11
11
|
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
var diff = (new Date().getTime() - parseFloat(lastLogin)) / MINUTE;
|
|
40
|
-
|
|
41
|
-
if (diff >= 57) {
|
|
42
|
-
console.log("Refreshing Token AT [" + diff + "]");
|
|
43
|
-
var refreshUrl = "".concat(url, "?refreshToken=").concat(refreshToken, "&username=").concat(username);
|
|
44
|
-
(0, _RestUtils.sendRequest)(refreshUrl, function (response) {
|
|
45
|
-
sessionStorage.setItem(ACCESS_TOKEN_PROPERTY, response.accessToken);
|
|
46
|
-
sessionStorage.setItem(ID_TOKEN_PROPERTY, response.idToken);
|
|
47
|
-
sessionStorage.setItem(LAST_LOGIN, new Date().getTime());
|
|
48
|
-
}, function (e) {
|
|
49
|
-
console.error('Error refreshing token');
|
|
50
|
-
}, false);
|
|
51
|
-
}
|
|
14
|
+
const MINUTE = 60000;
|
|
15
|
+
const ACCESS_TOKEN_PROPERTY = "accessToken";
|
|
16
|
+
const LAST_LOGIN = "lastLogin";
|
|
17
|
+
const ID_TOKEN_PROPERTY = "idToken";
|
|
18
|
+
const REFRESH_TOKEN_PROPERTY = "refreshToken";
|
|
19
|
+
|
|
20
|
+
class TokenManager {
|
|
21
|
+
startTokenRefreshMonitor(url, username) {
|
|
22
|
+
setInterval(function () {
|
|
23
|
+
let lastLogin = sessionStorage.getItem(LAST_LOGIN);
|
|
24
|
+
let refreshToken = sessionStorage.getItem(REFRESH_TOKEN_PROPERTY);
|
|
25
|
+
|
|
26
|
+
if (!_Utils.default.isNull(lastLogin) && !_Utils.default.isNull(refreshToken)) {
|
|
27
|
+
let diff = (new Date().getTime() - parseFloat(lastLogin)) / MINUTE;
|
|
28
|
+
|
|
29
|
+
if (diff >= 57) {
|
|
30
|
+
console.log("Refreshing Token AT [" + diff + "]");
|
|
31
|
+
let refreshUrl = "".concat(url, "?refreshToken=").concat(refreshToken, "&username=").concat(username);
|
|
32
|
+
(0, _RestUtils.sendRequest)(refreshUrl, response => {
|
|
33
|
+
sessionStorage.setItem(ACCESS_TOKEN_PROPERTY, response.accessToken);
|
|
34
|
+
sessionStorage.setItem(ID_TOKEN_PROPERTY, response.idToken);
|
|
35
|
+
sessionStorage.setItem(LAST_LOGIN, new Date().getTime());
|
|
36
|
+
}, e => {
|
|
37
|
+
console.error('Error refreshing token');
|
|
38
|
+
}, false);
|
|
52
39
|
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
40
|
+
}
|
|
41
|
+
}, MINUTE);
|
|
42
|
+
}
|
|
56
43
|
|
|
57
|
-
|
|
58
|
-
}();
|
|
44
|
+
}
|
|
59
45
|
|
|
60
|
-
|
|
46
|
+
const instance = new TokenManager();
|
|
61
47
|
Object.freeze(instance);
|
|
62
48
|
var _default = instance;
|
|
63
49
|
exports.default = _default;
|
package/dist/theme-default.js
CHANGED
|
@@ -11,7 +11,7 @@ var _colors = require("material-ui/styles/colors");
|
|
|
11
11
|
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
const themeDefault = (0, _getMuiTheme.default)({
|
|
15
15
|
palette: {},
|
|
16
16
|
appBar: {
|
|
17
17
|
height: 57,
|