@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.
Files changed (133) hide show
  1. package/dist/ApplicationContext.js +244 -250
  2. package/dist/BasicApp.js +53 -97
  3. package/dist/BasicAppHome.js +86 -122
  4. package/dist/DynamicJS.js +65 -88
  5. package/dist/RestUtils.js +284 -315
  6. package/dist/TypedValue.js +15 -18
  7. package/dist/Utils.js +224 -262
  8. package/dist/assets/jss/components/authNavbarStyle.js +162 -164
  9. package/dist/assets/jss/components/buttonStyle.js +1 -1
  10. package/dist/assets/jss/components/cardAvatarStyle.js +1 -1
  11. package/dist/assets/jss/components/cardBodyStyle.js +1 -1
  12. package/dist/assets/jss/components/cardFooterStyle.js +1 -1
  13. package/dist/assets/jss/components/cardHeaderStyle.js +1 -1
  14. package/dist/assets/jss/components/cardIconStyle.js +1 -1
  15. package/dist/assets/jss/components/cardStyle.js +1 -1
  16. package/dist/assets/jss/components/cardTextStyle.js +1 -1
  17. package/dist/assets/jss/components/customDropdownStyle.js +192 -194
  18. package/dist/assets/jss/components/customInputStyle.js +1 -1
  19. package/dist/assets/jss/components/dropdownStyle.js +107 -109
  20. package/dist/assets/jss/components/footerStyle.js +1 -1
  21. package/dist/assets/jss/components/headerLinksStyle.js +95 -97
  22. package/dist/assets/jss/components/headerStyle.js +60 -62
  23. package/dist/assets/jss/components/navbarLinksStyle.js +137 -139
  24. package/dist/assets/jss/components/navbarStyle.js +71 -73
  25. package/dist/assets/jss/components/sidebarStyle.js +453 -455
  26. package/dist/assets/jss/components/typographyStyle.js +1 -1
  27. package/dist/assets/jss/rootStyle.js +57 -57
  28. package/dist/assets/jss/views/layoutStyle.js +42 -44
  29. package/dist/assets/jss/views/loginBasicStyle.js +1 -1
  30. package/dist/assets/jss/views/loginStyle.js +87 -89
  31. package/dist/components/AlertBar.js +21 -23
  32. package/dist/components/AlertItem.js +23 -25
  33. package/dist/components/AlertTemplate.js +29 -30
  34. package/dist/components/Button.js +35 -37
  35. package/dist/components/ConfirmationDialog.js +3 -3
  36. package/dist/components/DataGrid.js +250 -276
  37. package/dist/components/DataGridColumn.js +34 -36
  38. package/dist/components/DataGridFilter.js +92 -94
  39. package/dist/components/DataGridHeading.js +32 -38
  40. package/dist/components/DocumentViewer.js +12 -11
  41. package/dist/components/Graph.js +34 -50
  42. package/dist/components/GraphNode.js +53 -56
  43. package/dist/components/HtmlPanel.js +6 -8
  44. package/dist/components/Icon.js +28 -58
  45. package/dist/components/LoadingIndicator.js +2 -2
  46. package/dist/components/PopupView.js +15 -17
  47. package/dist/components/RegularButton.js +20 -20
  48. package/dist/components/TabPage.js +23 -25
  49. package/dist/components/TabPanel.js +34 -34
  50. package/dist/components/TableCellContent.js +34 -34
  51. package/dist/components/TitleBar.js +16 -16
  52. package/dist/components/Toolbar.js +112 -118
  53. package/dist/components/Tooltip.js +35 -43
  54. package/dist/components/Tree.js +54 -60
  55. package/dist/components/card/Card.js +17 -17
  56. package/dist/components/card/CardAvatar.js +10 -10
  57. package/dist/components/card/CardBody.js +14 -14
  58. package/dist/components/card/CardFooter.js +13 -13
  59. package/dist/components/card/CardHeader.js +14 -14
  60. package/dist/components/card/CardIcon.js +7 -7
  61. package/dist/components/card/CardText.js +7 -7
  62. package/dist/components/customInput/CustomInput.js +17 -17
  63. package/dist/components/dashboard/BasicApp.js +25 -25
  64. package/dist/components/dashboard/BasicBusinessApp.js +116 -119
  65. package/dist/components/dashboard/components/Header.js +11 -11
  66. package/dist/components/dashboard/components/LeftDrawer.js +3 -3
  67. package/dist/components/dashboard/components/UserIdentity.js +2 -2
  68. package/dist/components/dashboard/components/blackDashboard/fixedPlugin/FixedPlugin.js +85 -127
  69. package/dist/components/dashboard/components/blackDashboard/sidebar/Sidebar.js +151 -191
  70. package/dist/components/footer/Footer.js +8 -8
  71. package/dist/components/footer/HomeFooter.js +34 -66
  72. package/dist/components/form/BaseField.js +78 -78
  73. package/dist/components/form/Checkbox.js +8 -10
  74. package/dist/components/form/DatePicker.js +15 -19
  75. package/dist/components/form/FieldSet.js +62 -88
  76. package/dist/components/form/Form.js +317 -318
  77. package/dist/components/form/GridField.js +81 -86
  78. package/dist/components/form/LabelField.js +10 -12
  79. package/dist/components/form/LookupField.js +40 -42
  80. package/dist/components/form/Section.js +37 -39
  81. package/dist/components/form/SelectItem.js +35 -39
  82. package/dist/components/form/TextField.js +18 -22
  83. package/dist/components/form/TimePicker.js +15 -19
  84. package/dist/components/form/TransferList.js +83 -91
  85. package/dist/components/form/UploadField.js +135 -145
  86. package/dist/components/grid/GridContainer.js +6 -6
  87. package/dist/components/grid/GridItem.js +6 -6
  88. package/dist/components/layout/CollapsiblePanel.js +18 -20
  89. package/dist/components/layout/Layout.js +70 -72
  90. package/dist/components/layout/View.js +134 -136
  91. package/dist/components/layout/ViewPort.js +56 -98
  92. package/dist/components/menu/CollapsibleMenu.js +26 -28
  93. package/dist/components/menu/MenuBars.js +53 -59
  94. package/dist/components/menu/MenuButton.js +70 -77
  95. package/dist/components/menu/MenuItem.js +15 -17
  96. package/dist/components/menu/MenuLink.js +9 -11
  97. package/dist/components/menu/PopupMenu.js +12 -16
  98. package/dist/components/navbars/AuthNavbar.js +12 -12
  99. package/dist/components/navbars/HomeNavbar.js +175 -222
  100. package/dist/components/navbars/NavbarLinks.js +45 -46
  101. package/dist/components/typography/Danger.js +3 -3
  102. package/dist/components/typography/Info.js +3 -3
  103. package/dist/components/typography/Link.js +3 -3
  104. package/dist/event/ActionHandlers.js +43 -57
  105. package/dist/event/Event.js +13 -16
  106. package/dist/event/EventListener.js +36 -39
  107. package/dist/event/EventType.js +1 -5
  108. package/dist/event/LoadDataActionHandler.js +8 -20
  109. package/dist/event/Observable.js +162 -198
  110. package/dist/event/RouteActionHandler.js +76 -88
  111. package/dist/event/ScriptActionHandler.js +8 -20
  112. package/dist/event/ServiceCallActionHandler.js +28 -40
  113. package/dist/event/SignalGraphActionHandler.js +7 -19
  114. package/dist/js/Addresses.js +15 -27
  115. package/dist/js/DynamicLib.js +11 -14
  116. package/dist/js/Validators.js +5 -6
  117. package/dist/redux/store/ConfigureStore.js +6 -6
  118. package/dist/redux/store/DashboardStore.js +83 -95
  119. package/dist/redux/store/History.js +1 -1
  120. package/dist/redux/store/SecurityStore.js +41 -45
  121. package/dist/security/TokenManager.js +30 -44
  122. package/dist/theme-default.js +1 -1
  123. package/dist/view/Dashboard.js +108 -114
  124. package/dist/view/Settings.js +2 -4
  125. package/dist/view/security/ChangePasswordBasic.js +96 -100
  126. package/dist/view/security/ForgotPassword.js +52 -56
  127. package/dist/view/security/ForgotPasswordBasic.js +48 -54
  128. package/dist/view/security/Login.js +58 -62
  129. package/dist/view/security/LoginBasic.js +50 -54
  130. package/dist/view/security/ResetPassword.js +58 -62
  131. package/dist/view/security/ResetPasswordBasic.js +89 -93
  132. package/dist/view/security/Security.js +12 -12
  133. 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
- var requestType = 'REQUEST';
21
- var receiveDashboardSettingsType = 'RECEIVE_DASHBOARD_SETTINGS';
22
- var activeRouteMenu = 'ACTIVE_ROUTE_MENU';
23
- var secondaryThemeColor = 'SECONDARY_THEME_COLOR';
24
- var initialState = {
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
- var currentDashboardSettings = {};
32
- var actionCreators = {
33
- getDashboardSettings: function getDashboardSettings(url) {
34
- return /*#__PURE__*/function () {
35
- var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(dispatch) {
36
- return regeneratorRuntime.wrap(function _callee$(_context) {
37
- while (1) {
38
- switch (_context.prev = _context.next) {
39
- case 0:
40
- dispatch({
41
- type: requestType
42
- });
43
- (0, _RestUtils.sendRequest)(url, function (response) {
44
- dispatch({
45
- type: receiveDashboardSettingsType,
46
- dashboardSettings: response,
47
- error: false
48
- });
49
- }, function () {
50
- dispatch({
51
- type: receiveDashboardSettingsType,
52
- dashboardSettings: null,
53
- error: true
54
- });
55
- });
56
-
57
- case 2:
58
- case "end":
59
- return _context.stop();
60
- }
61
- }
62
- }, _callee);
63
- }));
64
-
65
- return function (_x) {
66
- return _ref.apply(this, arguments);
67
- };
68
- }();
69
- },
70
- setActiveRoute: function setActiveRoute(route) {
71
- return /*#__PURE__*/function () {
72
- var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(dispatch) {
73
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
74
- while (1) {
75
- switch (_context2.prev = _context2.next) {
76
- case 0:
77
- dispatch({
78
- type: activeRouteMenu,
79
- activeRouteMenu: route
80
- });
81
-
82
- case 1:
83
- case "end":
84
- return _context2.stop();
85
- }
86
- }
87
- }, _callee2);
88
- }));
89
-
90
- return function (_x2) {
91
- return _ref2.apply(this, arguments);
92
- };
93
- }();
94
- },
95
- setSecondaryThemeColor: function setSecondaryThemeColor(secondaryColor) {
96
- return /*#__PURE__*/function () {
97
- var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(dispatch) {
98
- return regeneratorRuntime.wrap(function _callee3$(_context3) {
99
- while (1) {
100
- switch (_context3.prev = _context3.next) {
101
- case 0:
102
- dispatch({
103
- type: secondaryThemeColor,
104
- secondaryThemeColor: secondaryColor
105
- });
106
-
107
- case 1:
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
- var reducer = function reducer(state, action) {
111
+ const reducer = (state, action) => {
124
112
  state = state || initialState;
125
113
 
126
114
  if (action.type === requestType) {
@@ -7,6 +7,6 @@ exports.default = void 0;
7
7
 
8
8
  var _history = require("history");
9
9
 
10
- var history = (0, _history.createBrowserHistory)();
10
+ const history = (0, _history.createBrowserHistory)();
11
11
  var _default = history;
12
12
  exports.default = _default;
@@ -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
- var requestType = 'REQUEST';
19
- var receiveUserDetailsType = 'RECEIVE_USER_DETAILS';
20
- var initialState = {
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
- var currentUserDetails = {};
27
- var actionCreators = {
28
- login: function login(url, username, password) {
29
- return /*#__PURE__*/function () {
30
- var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(dispatch) {
31
- var response, userDetails;
32
- return regeneratorRuntime.wrap(function _callee$(_context) {
33
- while (1) {
34
- switch (_context.prev = _context.next) {
35
- case 0:
36
- dispatch({
37
- type: requestType
38
- });
39
- _context.next = 3;
40
- return fetch(url);
41
-
42
- case 3:
43
- response = _context.sent;
44
- _context.next = 6;
45
- return response.json();
46
-
47
- case 6:
48
- userDetails = _context.sent;
49
- dispatch({
50
- type: receiveUserDetailsType,
51
- userDetails
52
- });
53
-
54
- case 8:
55
- case "end":
56
- return _context.stop();
57
- }
58
- }
59
- }, _callee);
60
- }));
61
-
62
- return function (_x) {
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
- var reducer = function reducer(state, action) {
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
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
15
-
16
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
17
-
18
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
19
-
20
- var MINUTE = 10000;
21
- var ACCESS_TOKEN_PROPERTY = "accessToken";
22
- var LAST_LOGIN = "lastLogin";
23
- var ID_TOKEN_PROPERTY = "idToken";
24
- var REFRESH_TOKEN_PROPERTY = "refreshToken";
25
-
26
- var TokenManager = /*#__PURE__*/function () {
27
- function TokenManager() {
28
- _classCallCheck(this, TokenManager);
29
- }
30
-
31
- _createClass(TokenManager, [{
32
- key: "startTokenRefreshMonitor",
33
- value: function startTokenRefreshMonitor(url, username) {
34
- setInterval(function () {
35
- var lastLogin = sessionStorage.getItem(LAST_LOGIN);
36
- var refreshToken = sessionStorage.getItem(REFRESH_TOKEN_PROPERTY);
37
-
38
- if (!_Utils.default.isNull(lastLogin) && !_Utils.default.isNull(refreshToken)) {
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
- }, MINUTE);
54
- }
55
- }]);
40
+ }
41
+ }, MINUTE);
42
+ }
56
43
 
57
- return TokenManager;
58
- }();
44
+ }
59
45
 
60
- var instance = new TokenManager();
46
+ const instance = new TokenManager();
61
47
  Object.freeze(instance);
62
48
  var _default = instance;
63
49
  exports.default = _default;
@@ -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
- var themeDefault = (0, _getMuiTheme.default)({
14
+ const themeDefault = (0, _getMuiTheme.default)({
15
15
  palette: {},
16
16
  appBar: {
17
17
  height: 57,