@agilemotion/oui-react-js 1.6.4 → 1.6.6
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 +675 -1044
- package/dist/BasicApp.js +9 -27
- package/dist/BasicAppHome.js +27 -101
- package/dist/DynamicJS.js +109 -197
- package/dist/InteractionPortalApp.js +7 -27
- package/dist/InteractionPortalAppHome.js +21 -87
- package/dist/InteractionPortalApp_old.js +60 -122
- package/dist/RestUtils.js +269 -410
- package/dist/TypedValue.js +20 -26
- package/dist/Utils.js +295 -481
- package/dist/WithRouter.js +9 -17
- package/dist/assets/jss/components/authNavbarStyle.js +168 -171
- package/dist/assets/jss/components/buttonStyle.js +2 -5
- package/dist/assets/jss/components/cardAvatarStyle.js +2 -5
- package/dist/assets/jss/components/cardBodyStyle.js +2 -5
- package/dist/assets/jss/components/cardFooterStyle.js +2 -5
- package/dist/assets/jss/components/cardHeaderStyle.js +20 -17
- package/dist/assets/jss/components/cardIconStyle.js +2 -5
- package/dist/assets/jss/components/cardStyle.js +2 -5
- package/dist/assets/jss/components/cardTextStyle.js +2 -5
- package/dist/assets/jss/components/customDropdownStyle.js +171 -173
- package/dist/assets/jss/components/customInputStyle.js +5 -13
- package/dist/assets/jss/components/dropdownStyle.js +71 -74
- package/dist/assets/jss/components/footerStyle.js +14 -23
- package/dist/assets/jss/components/headerLinksStyle.js +52 -53
- package/dist/assets/jss/components/headerStyle.js +68 -73
- package/dist/assets/jss/components/navbarLinksStyle.js +81 -74
- package/dist/assets/jss/components/navbarStyle.js +79 -84
- package/dist/assets/jss/components/sidebarStyle.js +438 -441
- package/dist/assets/jss/components/typographyStyle.js +5 -13
- package/dist/assets/jss/rootStyle.js +85 -151
- package/dist/assets/jss/views/layoutStyle.js +45 -51
- package/dist/assets/jss/views/loginBasicStyle.js +2 -5
- package/dist/assets/jss/views/loginBusinessPortalStyle.js +2 -5
- package/dist/assets/jss/views/loginStyle.js +80 -87
- package/dist/components/AlertBar.js +20 -75
- package/dist/components/AlertItem.js +13 -49
- package/dist/components/AlertTemplate.js +12 -18
- package/dist/components/Button.js +41 -112
- package/dist/components/Calendar.js +99 -208
- package/dist/components/ConfirmationDialog.js +13 -54
- package/dist/components/DataGrid.js +271 -695
- package/dist/components/DataGridColumn.js +24 -74
- package/dist/components/DataGridFilter.js +107 -245
- package/dist/components/DataGridHeading.js +34 -78
- package/dist/components/Dialog.js +37 -130
- package/dist/components/DocumentTemplateDesigner.js +16 -57
- package/dist/components/DocumentTemplateDesignerComponent.js +47 -141
- package/dist/components/DocumentTemplatePlaceholderDialog.js +34 -67
- package/dist/components/DocumentViewer.js +25 -65
- package/dist/components/DocumentViewerComponent.js +13 -44
- package/dist/components/ElementResizeHandler.js +148 -200
- package/dist/components/FileThumb.js +15 -56
- package/dist/components/Graph.js +98 -203
- package/dist/components/GraphNode.js +20 -61
- package/dist/components/HtmlPanel.js +38 -105
- package/dist/components/Icon.js +174 -253
- package/dist/components/LoadingIndicator.js +4 -11
- package/dist/components/LottieIcon.js +63 -60
- package/dist/components/PopupView.js +21 -60
- package/dist/components/Portlet.js +18 -60
- package/dist/components/RegularButton.js +34 -42
- package/dist/components/SignaturePanel.js +19 -67
- package/dist/components/SocketManager.js +133 -228
- package/dist/components/StepperTitleBar.js +48 -99
- package/dist/components/TabPage.js +30 -47
- package/dist/components/TabPanel.js +35 -122
- package/dist/components/TableCellContent.js +34 -98
- package/dist/components/TemplateDesigner.js +115 -230
- package/dist/components/TemplateItemEventHandler.js +298 -481
- package/dist/components/TemplateTable.js +117 -218
- package/dist/components/TitleBar.js +15 -53
- package/dist/components/Toolbar.js +44 -110
- package/dist/components/Tooltip.js +37 -56
- package/dist/components/Tree.js +50 -143
- package/dist/components/UseIsVisible.js +5 -25
- package/dist/components/card/Card.js +35 -39
- package/dist/components/card/CardAvatar.js +21 -32
- package/dist/components/card/CardBody.js +29 -36
- package/dist/components/card/CardFooter.js +26 -35
- package/dist/components/card/CardHeader.js +29 -36
- package/dist/components/card/CardIcon.js +15 -29
- package/dist/components/card/CardText.js +15 -29
- package/dist/components/customInput/CustomInput.js +38 -40
- package/dist/components/dashboard/FoldingSideTabDashboard.js +65 -184
- package/dist/components/dashboard/SideMenuModuleDashboard.js +67 -185
- package/dist/components/dashboard/TopMenuModuleDashboard.js +22 -63
- package/dist/components/dashboard/components/Header.js +15 -52
- package/dist/components/dashboard/components/LeftDrawer.js +9 -23
- package/dist/components/dashboard/components/UserIdentity.js +4 -12
- package/dist/components/dashboard/components/blackDashboard/fixedPlugin/FixedPlugin.js +115 -155
- package/dist/components/dashboard/components/blackDashboard/sidebar/FoldingTabSidebar.js +344 -419
- package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenu.js +15 -29
- package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenuSidebar.js +405 -485
- package/dist/components/dashboard/components/portal/Timeline.js +3 -8
- package/dist/components/dashboard/components/portal/Workspace.js +4 -13
- package/dist/components/footer/Footer.js +23 -45
- package/dist/components/footer/HomeFooter.js +38 -78
- package/dist/components/form/AddressSearch.js +26 -76
- package/dist/components/form/AutoComplete.js +54 -168
- package/dist/components/form/BaseField.js +59 -189
- package/dist/components/form/Checkbox.js +11 -24
- package/dist/components/form/DatePicker.js +28 -82
- package/dist/components/form/FieldSet.js +84 -300
- package/dist/components/form/Form.js +206 -501
- package/dist/components/form/GridField.js +83 -243
- package/dist/components/form/IconField.js +10 -21
- package/dist/components/form/ImageEditor.js +98 -208
- package/dist/components/form/LabelField.js +13 -28
- package/dist/components/form/LookupField.js +36 -102
- package/dist/components/form/MultiFileUploadField.js +67 -134
- package/dist/components/form/RadioGroup.js +20 -57
- package/dist/components/form/Section.js +33 -118
- package/dist/components/form/SelectItem.js +36 -83
- package/dist/components/form/SignatureTemplateDesignerField.js +12 -26
- package/dist/components/form/Switch.js +11 -24
- package/dist/components/form/TextField.js +19 -55
- package/dist/components/form/TimePicker.js +18 -43
- package/dist/components/form/TransferList.js +76 -200
- package/dist/components/form/UploadField.js +134 -256
- package/dist/components/grid/GridContainer.js +10 -23
- package/dist/components/grid/GridItem.js +10 -23
- package/dist/components/layout/CollapsiblePanel.js +20 -59
- package/dist/components/layout/Layout.js +40 -149
- package/dist/components/layout/View.js +65 -195
- package/dist/components/layout/ViewContainer.js +13 -33
- package/dist/components/layout/ViewPort.js +14 -48
- package/dist/components/layout/Window.js +62 -135
- package/dist/components/layout/WindowViewPort.js +18 -63
- package/dist/components/media/ClosablePanel.js +9 -18
- package/dist/components/media/LobbyWaitingList.js +11 -17
- package/dist/components/media/MediaSoupHelper.js +173 -401
- package/dist/components/media/SideBarContent.js +17 -34
- package/dist/components/media/SocketRequest.js +7 -18
- package/dist/components/media/SocketResponse.js +5 -14
- package/dist/components/media/Timer.js +18 -54
- package/dist/components/media/Toolbar.js +97 -254
- package/dist/components/media/ToolbarButton.js +34 -95
- package/dist/components/media/Toolbar_bck.js +70 -186
- package/dist/components/media/Tracks.js +19 -33
- package/dist/components/media/TrainingRoom.js +121 -374
- package/dist/components/media/Transports.js +17 -29
- package/dist/components/media/VCEventManager.js +45 -116
- package/dist/components/media/VCEventType.js +82 -168
- package/dist/components/media/VCParticipantList.js +16 -51
- package/dist/components/media/VCParticipantListItem.js +44 -141
- package/dist/components/media/VCRoom.js +14 -58
- package/dist/components/media/VCRoomParticipant.js +235 -556
- package/dist/components/media/VCRoomRecorder.js +106 -204
- package/dist/components/media/VCRoomWorkspace.js +248 -584
- package/dist/components/media/Video.js +27 -112
- package/dist/components/media/VideoPlayer.js +23 -91
- package/dist/components/media/chat/ChatRoom.js +143 -361
- package/dist/components/media/chat/ChatRoomItem.js +17 -58
- package/dist/components/media/chat/ChatRoomList.js +15 -60
- package/dist/components/menu/CollapsibleMenu.js +22 -52
- package/dist/components/menu/MenuBars.js +50 -116
- package/dist/components/menu/MenuButton.js +53 -130
- package/dist/components/menu/MenuItem.js +11 -51
- package/dist/components/menu/MenuLink.js +13 -41
- package/dist/components/menu/PopupMenu.js +13 -25
- package/dist/components/navbars/AuthNavbar.js +21 -56
- package/dist/components/navbars/HomeNavbar.js +213 -290
- package/dist/components/navbars/PortalNavbar.js +26 -81
- package/dist/components/signatures/AgilitySignaturePanel.js +41 -135
- package/dist/components/signatures/AlertItem.js +14 -50
- package/dist/components/signatures/Card.js +6 -16
- package/dist/components/signatures/DocumentContainer.js +57 -165
- package/dist/components/signatures/ImageSignatureInput.js +64 -124
- package/dist/components/signatures/MenuButton.js +28 -63
- package/dist/components/signatures/Prompt.js +6 -41
- package/dist/components/signatures/ResponsiveTable.js +181 -370
- package/dist/components/signatures/SearchView.js +34 -112
- package/dist/components/signatures/SignatorySearch.js +11 -44
- package/dist/components/signatures/SignatorySearchForm.js +19 -50
- package/dist/components/signatures/SignatureInput.js +28 -91
- package/dist/components/signatures/SignatureInputProps.js +49 -144
- package/dist/components/signatures/SignatureTemplateDesigner.js +230 -430
- package/dist/components/signatures/Toolbar.js +99 -173
- package/dist/components/signatures/ViewUtils.js +207 -313
- package/dist/components/typography/Danger.js +6 -11
- package/dist/components/typography/Info.js +7 -11
- package/dist/components/typography/Link.js +6 -12
- package/dist/event/ActionHandlers.js +48 -87
- package/dist/event/Event.js +21 -25
- package/dist/event/EventListener.js +54 -48
- package/dist/event/EventType.js +18 -40
- package/dist/event/LoadDataActionHandler.js +10 -31
- package/dist/event/Observable.js +204 -396
- package/dist/event/RouteActionHandler.js +119 -171
- package/dist/event/ScriptActionHandler.js +10 -32
- package/dist/event/ServiceCallActionHandler.js +37 -64
- package/dist/event/SignalGraphActionHandler.js +9 -31
- package/dist/js/Addresses.js +23 -42
- package/dist/js/Calendar.js +41 -89
- package/dist/js/DynamicLib.js +11 -23
- package/dist/js/Media.js +80 -174
- package/dist/js/Validators.js +6 -12
- package/dist/js/Windows.js +22 -40
- package/dist/redux/store/ConfigureStore.js +12 -29
- package/dist/redux/store/DashboardStore.js +47 -120
- package/dist/redux/store/History.js +2 -5
- package/dist/redux/store/SecurityStore.js +22 -65
- package/dist/security/TokenManager.js +29 -53
- package/dist/theme-default.js +3 -8
- package/dist/view/Dashboard.js +140 -308
- package/dist/view/PortalDashboard.js +6 -13
- package/dist/view/Settings.js +3 -11
- package/dist/view/Views.js +15 -35
- package/dist/view/security/ChangePasswordBasic.js +41 -147
- package/dist/view/security/ForgotPassword.js +26 -106
- package/dist/view/security/ForgotPasswordBasic.js +22 -96
- package/dist/view/security/Login.js +29 -117
- package/dist/view/security/LoginBasic.js +28 -108
- package/dist/view/security/LoginInteractionPortal.js +28 -106
- package/dist/view/security/ResetPassword.js +25 -110
- package/dist/view/security/ResetPasswordBasic.js +39 -142
- package/dist/view/security/Security.js +14 -26
- package/package.json +25 -20
package/dist/js/Windows.js
CHANGED
|
@@ -4,64 +4,46 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = exports.Windows = void 0;
|
|
7
|
-
|
|
8
7
|
var _moment = _interopRequireDefault(require("moment/moment"));
|
|
9
|
-
|
|
10
8
|
var _Utils = _interopRequireDefault(require("../Utils"));
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
_classCallCheck(this, Windows);
|
|
20
|
-
|
|
21
|
-
_defineProperty(this, "zoomIn", function (windowId) {
|
|
22
|
-
var el = document.getElementById(windowId);
|
|
23
|
-
var scale = el.scale;
|
|
24
|
-
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
class Windows {
|
|
11
|
+
constructor(resolver) {
|
|
12
|
+
this.resolver = resolver;
|
|
13
|
+
}
|
|
14
|
+
zoomIn = windowId => {
|
|
15
|
+
let el = document.getElementById(windowId);
|
|
16
|
+
let scale = el.scale;
|
|
25
17
|
if (!scale) {
|
|
26
18
|
scale = 1;
|
|
27
19
|
}
|
|
28
|
-
|
|
29
20
|
if (scale < 1) {
|
|
30
21
|
scale = scale * 1.1;
|
|
31
|
-
|
|
32
|
-
|
|
22
|
+
let w = el.style.width ? el.style.width.replace('px', '') : el.getBoundingClientRect().width;
|
|
23
|
+
let h = el.style.height ? el.style.height.replace('px', '') : el.getBoundingClientRect().height;
|
|
33
24
|
el.style.width = w * 1.1 + "px";
|
|
34
25
|
el.style.height = h * 1.1 + "px";
|
|
35
|
-
el.style.transform =
|
|
26
|
+
el.style.transform = `scale(${scale})`;
|
|
36
27
|
}
|
|
37
|
-
|
|
38
28
|
el.scale = scale;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
var scale = el.scale;
|
|
44
|
-
|
|
29
|
+
};
|
|
30
|
+
zoomOut = windowId => {
|
|
31
|
+
let el = document.getElementById(windowId);
|
|
32
|
+
let scale = el.scale;
|
|
45
33
|
if (!scale) {
|
|
46
34
|
scale = 1;
|
|
47
35
|
}
|
|
48
|
-
|
|
49
36
|
if (scale > 0) {
|
|
50
37
|
scale = scale * 0.9;
|
|
51
|
-
|
|
52
|
-
|
|
38
|
+
let w = el.style.width || el.style.width.includes("%") ? el.style.width.replace('px', '') : el.getBoundingClientRect().width;
|
|
39
|
+
let h = el.style.height || el.style.height.includes("%") ? el.style.height.replace('px', '') : el.getBoundingClientRect().height;
|
|
53
40
|
el.style.width = w * 0.9 + "px";
|
|
54
41
|
el.style.height = h * 0.9 + "px";
|
|
55
|
-
el.style.transform =
|
|
42
|
+
el.style.transform = `scale(${scale})`;
|
|
56
43
|
}
|
|
57
|
-
|
|
58
44
|
el.scale = scale;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
this.resolver = resolver;
|
|
62
|
-
};
|
|
63
|
-
|
|
45
|
+
};
|
|
46
|
+
}
|
|
64
47
|
exports.Windows = Windows;
|
|
65
|
-
|
|
66
|
-
var _default = instance;
|
|
67
|
-
exports.default = _default;
|
|
48
|
+
const instance = new Windows();
|
|
49
|
+
var _default = exports.default = instance;
|
|
@@ -1,50 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports.default = ConfigureStore;
|
|
9
|
-
|
|
10
7
|
var _redux = require("redux");
|
|
11
|
-
|
|
12
8
|
var _reduxThunk = _interopRequireDefault(require("redux-thunk"));
|
|
13
|
-
|
|
14
9
|
var _connectedReactRouter = require("connected-react-router");
|
|
15
|
-
|
|
16
10
|
var Security = _interopRequireWildcard(require("./SecurityStore"));
|
|
17
|
-
|
|
18
11
|
var Dashboard = _interopRequireWildcard(require("./DashboardStore"));
|
|
19
|
-
|
|
20
|
-
function
|
|
21
|
-
|
|
22
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
|
-
|
|
24
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
-
|
|
26
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
27
|
-
|
|
28
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
29
|
-
|
|
30
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
31
|
-
|
|
12
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
13
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
32
15
|
function ConfigureStore(history, initialState) {
|
|
33
|
-
|
|
16
|
+
const reducers = {
|
|
34
17
|
security: Security.reducer,
|
|
35
18
|
dashboard: Dashboard.reducer
|
|
36
19
|
};
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
var enhancers = [];
|
|
40
|
-
var isDevelopment = process.env.NODE_ENV === 'development';
|
|
20
|
+
const middleware = [_reduxThunk.default, (0, _connectedReactRouter.routerMiddleware)(history)];
|
|
41
21
|
|
|
22
|
+
// In development, use the browser's Redux dev tools extension if installed
|
|
23
|
+
const enhancers = [];
|
|
24
|
+
const isDevelopment = process.env.NODE_ENV === 'development';
|
|
42
25
|
if (isDevelopment && typeof window !== 'undefined' && window.devToolsExtension) {
|
|
43
26
|
enhancers.push(window.devToolsExtension());
|
|
44
27
|
}
|
|
45
|
-
|
|
46
|
-
|
|
28
|
+
const rootReducer = (0, _redux.combineReducers)({
|
|
29
|
+
...reducers,
|
|
47
30
|
router: (0, _connectedReactRouter.connectRouter)(history)
|
|
48
|
-
})
|
|
49
|
-
return (0, _redux.createStore)(rootReducer, initialState, _redux.compose
|
|
31
|
+
});
|
|
32
|
+
return (0, _redux.createStore)(rootReducer, initialState, (0, _redux.compose)((0, _redux.applyMiddleware)(...middleware), ...enhancers));
|
|
50
33
|
}
|
|
@@ -4,24 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.reducer = exports.actionCreators = void 0;
|
|
7
|
-
|
|
8
7
|
var _RestUtils = require("../../RestUtils");
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
15
|
-
|
|
16
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
17
|
-
|
|
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
|
-
|
|
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 = {
|
|
8
|
+
const requestType = 'REQUEST';
|
|
9
|
+
const receiveDashboardSettingsType = 'RECEIVE_DASHBOARD_SETTINGS';
|
|
10
|
+
const activeRouteMenu = 'ACTIVE_ROUTE_MENU';
|
|
11
|
+
const secondaryThemeColor = 'SECONDARY_THEME_COLOR';
|
|
12
|
+
const initialState = {
|
|
25
13
|
dashboardSettings: {},
|
|
26
14
|
isLoading: false,
|
|
27
15
|
error: false,
|
|
@@ -31,131 +19,70 @@ var initialState = {
|
|
|
31
19
|
},
|
|
32
20
|
secondaryThemeColor: "red"
|
|
33
21
|
};
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
getDashboardSettings:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
dispatch({
|
|
54
|
-
type: receiveDashboardSettingsType,
|
|
55
|
-
dashboardSettings: null,
|
|
56
|
-
error: true
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
case 2:
|
|
61
|
-
case "end":
|
|
62
|
-
return _context.stop();
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}, _callee);
|
|
66
|
-
}));
|
|
67
|
-
|
|
68
|
-
return function (_x) {
|
|
69
|
-
return _ref.apply(this, arguments);
|
|
70
|
-
};
|
|
71
|
-
}();
|
|
22
|
+
let currentDashboardSettings = {};
|
|
23
|
+
const actionCreators = exports.actionCreators = {
|
|
24
|
+
getDashboardSettings: url => async dispatch => {
|
|
25
|
+
dispatch({
|
|
26
|
+
type: requestType
|
|
27
|
+
});
|
|
28
|
+
(0, _RestUtils.sendRequest)(url, response => {
|
|
29
|
+
dispatch({
|
|
30
|
+
type: receiveDashboardSettingsType,
|
|
31
|
+
dashboardSettings: response,
|
|
32
|
+
error: false
|
|
33
|
+
});
|
|
34
|
+
}, () => {
|
|
35
|
+
dispatch({
|
|
36
|
+
type: receiveDashboardSettingsType,
|
|
37
|
+
dashboardSettings: null,
|
|
38
|
+
error: true
|
|
39
|
+
});
|
|
40
|
+
});
|
|
72
41
|
},
|
|
73
|
-
setActiveRoute:
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
switch (_context2.prev = _context2.next) {
|
|
79
|
-
case 0:
|
|
80
|
-
dispatch({
|
|
81
|
-
type: activeRouteMenu,
|
|
82
|
-
activeRouteMenu: route
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
case 1:
|
|
86
|
-
case "end":
|
|
87
|
-
return _context2.stop();
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}, _callee2);
|
|
91
|
-
}));
|
|
92
|
-
|
|
93
|
-
return function (_x2) {
|
|
94
|
-
return _ref2.apply(this, arguments);
|
|
95
|
-
};
|
|
96
|
-
}();
|
|
42
|
+
setActiveRoute: route => async dispatch => {
|
|
43
|
+
dispatch({
|
|
44
|
+
type: activeRouteMenu,
|
|
45
|
+
activeRouteMenu: route
|
|
46
|
+
});
|
|
97
47
|
},
|
|
98
|
-
setSecondaryThemeColor:
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
switch (_context3.prev = _context3.next) {
|
|
104
|
-
case 0:
|
|
105
|
-
dispatch({
|
|
106
|
-
type: secondaryThemeColor,
|
|
107
|
-
secondaryThemeColor: secondaryColor
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
case 1:
|
|
111
|
-
case "end":
|
|
112
|
-
return _context3.stop();
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}, _callee3);
|
|
116
|
-
}));
|
|
117
|
-
|
|
118
|
-
return function (_x3) {
|
|
119
|
-
return _ref3.apply(this, arguments);
|
|
120
|
-
};
|
|
121
|
-
}();
|
|
48
|
+
setSecondaryThemeColor: secondaryColor => async dispatch => {
|
|
49
|
+
dispatch({
|
|
50
|
+
type: secondaryThemeColor,
|
|
51
|
+
secondaryThemeColor: secondaryColor
|
|
52
|
+
});
|
|
122
53
|
}
|
|
123
54
|
};
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
var reducer = function reducer(state, action) {
|
|
55
|
+
const reducer = (state, action) => {
|
|
127
56
|
state = state || initialState;
|
|
128
|
-
|
|
129
57
|
if (action.type === requestType) {
|
|
130
|
-
return
|
|
58
|
+
return {
|
|
59
|
+
...state,
|
|
131
60
|
isLoading: true,
|
|
132
61
|
dashboardSettings: currentDashboardSettings,
|
|
133
62
|
error: false
|
|
134
|
-
}
|
|
63
|
+
};
|
|
135
64
|
}
|
|
136
|
-
|
|
137
65
|
if (action.type === receiveDashboardSettingsType) {
|
|
138
66
|
currentDashboardSettings = action.dashboardSettings;
|
|
139
|
-
return
|
|
67
|
+
return {
|
|
68
|
+
...state,
|
|
140
69
|
error: action.error,
|
|
141
70
|
dashboardSettings: currentDashboardSettings,
|
|
142
71
|
isLoading: false
|
|
143
|
-
}
|
|
72
|
+
};
|
|
144
73
|
}
|
|
145
|
-
|
|
146
74
|
if (action.type === activeRouteMenu) {
|
|
147
|
-
return
|
|
75
|
+
return {
|
|
76
|
+
...state,
|
|
148
77
|
activeRouteMenu: action.activeRouteMenu
|
|
149
|
-
}
|
|
78
|
+
};
|
|
150
79
|
}
|
|
151
|
-
|
|
152
80
|
if (action.type === secondaryThemeColor) {
|
|
153
|
-
return
|
|
81
|
+
return {
|
|
82
|
+
...state,
|
|
154
83
|
secondaryThemeColor: action.secondaryThemeColor
|
|
155
|
-
}
|
|
84
|
+
};
|
|
156
85
|
}
|
|
157
|
-
|
|
158
86
|
return state;
|
|
159
87
|
};
|
|
160
|
-
|
|
161
88
|
exports.reducer = reducer;
|
|
@@ -4,9 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _history = require("history");
|
|
9
|
-
|
|
10
|
-
var
|
|
11
|
-
var _default = history;
|
|
12
|
-
exports.default = _default;
|
|
8
|
+
const history = (0, _history.createBrowserHistory)();
|
|
9
|
+
var _default = exports.default = history;
|
|
@@ -4,89 +4,46 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.reducer = exports.actionCreators = void 0;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
11
|
-
|
|
12
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
13
|
-
|
|
14
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
15
|
-
|
|
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
|
-
|
|
18
|
-
var requestType = 'REQUEST';
|
|
19
|
-
var receiveUserDetailsType = 'RECEIVE_USER_DETAILS';
|
|
20
|
-
var initialState = {
|
|
7
|
+
const requestType = 'REQUEST';
|
|
8
|
+
const receiveUserDetailsType = 'RECEIVE_USER_DETAILS';
|
|
9
|
+
const initialState = {
|
|
21
10
|
userDetails: {},
|
|
22
11
|
isLoading: false,
|
|
23
12
|
error: false,
|
|
24
13
|
currentMenuJson: ""
|
|
25
14
|
};
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
login:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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: 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
|
-
}();
|
|
15
|
+
let currentUserDetails = {};
|
|
16
|
+
const actionCreators = exports.actionCreators = {
|
|
17
|
+
login: (url, username, password) => async dispatch => {
|
|
18
|
+
dispatch({
|
|
19
|
+
type: requestType
|
|
20
|
+
});
|
|
21
|
+
const response = await fetch(url);
|
|
22
|
+
const userDetails = await response.json();
|
|
23
|
+
dispatch({
|
|
24
|
+
type: receiveUserDetailsType,
|
|
25
|
+
userDetails
|
|
26
|
+
});
|
|
66
27
|
}
|
|
67
28
|
};
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
var reducer = function reducer(state, action) {
|
|
29
|
+
const reducer = (state, action) => {
|
|
71
30
|
state = state || initialState;
|
|
72
|
-
|
|
73
31
|
if (action.type === requestType) {
|
|
74
|
-
return
|
|
32
|
+
return {
|
|
33
|
+
...state,
|
|
75
34
|
isLoading: true,
|
|
76
35
|
error: false,
|
|
77
36
|
userDetails: {}
|
|
78
|
-
}
|
|
37
|
+
};
|
|
79
38
|
}
|
|
80
|
-
|
|
81
39
|
if (action.type === receiveUserDetailsType) {
|
|
82
40
|
currentUserDetails = JSON.parse(action.userDetails);
|
|
83
|
-
return
|
|
41
|
+
return {
|
|
42
|
+
...state,
|
|
84
43
|
userDetails: currentUserDetails,
|
|
85
44
|
isLoading: false
|
|
86
|
-
}
|
|
45
|
+
};
|
|
87
46
|
}
|
|
88
|
-
|
|
89
47
|
return state;
|
|
90
48
|
};
|
|
91
|
-
|
|
92
49
|
exports.reducer = reducer;
|
|
@@ -4,60 +4,36 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _Utils = _interopRequireDefault(require("../Utils"));
|
|
9
|
-
|
|
10
8
|
var _RestUtils = require("../RestUtils");
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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
|
-
}
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
const MINUTE = 60000;
|
|
11
|
+
const ACCESS_TOKEN_PROPERTY = "accessToken";
|
|
12
|
+
const LAST_LOGIN = "lastLogin";
|
|
13
|
+
const ID_TOKEN_PROPERTY = "idToken";
|
|
14
|
+
const REFRESH_TOKEN_PROPERTY = "refreshToken";
|
|
15
|
+
class TokenManager {
|
|
16
|
+
startTokenRefreshMonitor(url, username) {
|
|
17
|
+
setInterval(function () {
|
|
18
|
+
let lastLogin = sessionStorage.getItem(LAST_LOGIN);
|
|
19
|
+
let refreshToken = sessionStorage.getItem(REFRESH_TOKEN_PROPERTY);
|
|
20
|
+
if (!_Utils.default.isNull(lastLogin) && !_Utils.default.isNull(refreshToken)) {
|
|
21
|
+
let diff = (new Date().getTime() - parseFloat(lastLogin)) / MINUTE;
|
|
22
|
+
if (diff >= 57) {
|
|
23
|
+
console.log("Refreshing Token AT [" + diff + "]");
|
|
24
|
+
let refreshUrl = `${url}?refreshToken=${refreshToken}&username=${username}`;
|
|
25
|
+
(0, _RestUtils.sendRequest)(refreshUrl, response => {
|
|
26
|
+
sessionStorage.setItem(ACCESS_TOKEN_PROPERTY, response.accessToken);
|
|
27
|
+
sessionStorage.setItem(ID_TOKEN_PROPERTY, response.idToken);
|
|
28
|
+
sessionStorage.setItem(LAST_LOGIN, new Date().getTime());
|
|
29
|
+
}, e => {
|
|
30
|
+
console.error('Error refreshing token');
|
|
31
|
+
}, false);
|
|
52
32
|
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}();
|
|
59
|
-
|
|
60
|
-
var instance = new TokenManager();
|
|
33
|
+
}
|
|
34
|
+
}, MINUTE);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
const instance = new TokenManager();
|
|
61
38
|
Object.freeze(instance);
|
|
62
|
-
var _default = instance;
|
|
63
|
-
exports.default = _default;
|
|
39
|
+
var _default = exports.default = instance;
|
package/dist/theme-default.js
CHANGED
|
@@ -4,14 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _getMuiTheme = _interopRequireDefault(require("material-ui/styles/getMuiTheme"));
|
|
9
|
-
|
|
10
8
|
var _colors = require("material-ui/styles/colors");
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
var themeDefault = (0, _getMuiTheme.default)({
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
const themeDefault = (0, _getMuiTheme.default)({
|
|
15
11
|
palette: {},
|
|
16
12
|
appBar: {
|
|
17
13
|
height: 57,
|
|
@@ -24,5 +20,4 @@ var themeDefault = (0, _getMuiTheme.default)({
|
|
|
24
20
|
primaryColor: _colors.blue600
|
|
25
21
|
}
|
|
26
22
|
});
|
|
27
|
-
var _default = themeDefault;
|
|
28
|
-
exports.default = _default;
|
|
23
|
+
var _default = exports.default = themeDefault;
|