@agilemotion/oui-react-js 1.3.8 → 1.4.0
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/README.TXT +1 -0
- package/dist/{ApplicationContext.js → ApplicationManager.js} +334 -335
- package/dist/BasicApp.js +67 -64
- package/dist/BasicAppHome.js +90 -110
- package/dist/BusinessPortalApp.js +1 -1
- package/dist/BusinessPortalAppHome.js +15 -50
- package/dist/DynamicJS.js +24 -52
- package/dist/RestUtils.js +90 -116
- package/dist/Utils.js +49 -37
- package/dist/WithRouter.js +34 -0
- package/dist/assets/jss/components/authNavbarStyle.js +34 -35
- package/dist/assets/jss/components/cardHeaderStyle.js +12 -12
- package/dist/assets/jss/components/customDropdownStyle.js +26 -26
- package/dist/assets/jss/components/customInputStyle.js +2 -8
- package/dist/assets/jss/components/dropdownStyle.js +10 -15
- package/dist/assets/jss/components/footerStyle.js +12 -18
- package/dist/assets/jss/components/headerLinksStyle.js +7 -13
- package/dist/assets/jss/components/headerStyle.js +24 -25
- package/dist/assets/jss/components/navbarLinksStyle.js +7 -13
- package/dist/assets/jss/components/navbarStyle.js +24 -25
- package/dist/assets/jss/components/sidebarStyle.js +41 -43
- package/dist/assets/jss/components/typographyStyle.js +2 -8
- package/dist/assets/jss/rootStyle.js +32 -47
- package/dist/assets/jss/views/layoutStyle.js +6 -11
- package/dist/assets/jss/views/loginStyle.js +4 -10
- package/dist/assets/lotties/call-loading.json +1 -0
- package/dist/assets/lotties/calling-2.json +1 -0
- package/dist/assets/lotties/calling.json +1 -0
- package/dist/assets/lotties/calling2.json +1 -0
- package/dist/assets/lotties/chat.json +1 -0
- package/dist/assets/lotties/join.json +1 -0
- package/dist/assets/lotties/loading.json +1 -0
- package/dist/assets/lotties/msg2.json +1 -0
- package/dist/assets/lotties/recording.json +1 -0
- package/dist/assets/lotties/waiting.json +1 -0
- package/dist/assets/scss/black-dashboard-react/bootstrap/_card.scss +5 -5
- package/dist/assets/scss/black-dashboard-react/bootstrap/_carousel.scss +2 -2
- package/dist/assets/scss/black-dashboard-react/bootstrap/_custom-forms.scss +3 -3
- package/dist/assets/scss/black-dashboard-react/bootstrap/_functions.scss +1 -1
- package/dist/assets/scss/black-dashboard-react/bootstrap/_images.scss +1 -1
- package/dist/assets/scss/black-dashboard-react/bootstrap/_jumbotron.scss +1 -1
- package/dist/assets/scss/black-dashboard-react/bootstrap/_popover.scss +7 -5
- package/dist/assets/scss/black-dashboard-react/bootstrap/_tooltip.scss +4 -4
- package/dist/assets/scss/black-dashboard-react/bootstrap/_variables.scss +5 -5
- package/dist/assets/scss/black-dashboard-react/bootstrap/mixins/_grid-framework.scss +2 -2
- package/dist/assets/scss/black-dashboard-react/bootstrap/mixins/_grid.scss +11 -9
- package/dist/assets/scss/black-dashboard-react/bootstrap/utilities/_embed.scss +6 -4
- package/dist/assets/scss/black-dashboard-react/custom/_sidebar-and-main-panel.scss +1 -1
- package/dist/assets/scss/black-dashboard-react/custom/_variables.scss +1 -1
- package/dist/components/AlertBar.js +39 -80
- package/dist/components/AlertItem.js +4 -26
- package/dist/components/Button.js +49 -52
- package/dist/components/Calendar.js +442 -0
- package/dist/components/Calender.css +244 -0
- package/dist/components/ConfirmationDialog.js +5 -29
- package/dist/components/DataGrid.js +207 -345
- package/dist/components/DataGridColumn.js +6 -29
- package/dist/components/DataGridFilter.js +48 -116
- package/dist/components/DataGridHeading.js +11 -19
- package/dist/components/Dialog.js +27 -121
- package/dist/components/DocumentViewer.js +12 -38
- package/dist/components/DocumentViewerComponent.js +2 -20
- package/dist/components/FileThumb.js +126 -0
- package/dist/components/Graph.js +33 -75
- package/dist/components/GraphNode.js +5 -22
- package/dist/components/HtmlPanel.js +68 -82
- package/dist/components/Icon.js +107 -1
- package/dist/components/LoadingIndicator.js +4 -4
- package/dist/components/LottieIcon.js +134 -0
- package/dist/components/PopupView.js +3 -21
- package/dist/components/Portlet.js +100 -0
- package/dist/components/RegularButton.js +15 -19
- package/dist/components/SignaturePanel.js +9 -40
- package/dist/components/SocketManager.js +170 -0
- package/dist/components/StepperTitleBar.js +33 -59
- package/dist/components/TabPage.js +6 -9
- package/dist/components/TabPanel.js +49 -98
- package/dist/components/TableCellContent.js +31 -39
- package/dist/components/TemplateDesigner.js +114 -158
- package/dist/components/TemplateItemEventHandler.js +33 -100
- package/dist/components/TemplateTable.js +6 -42
- package/dist/components/TitleBar.js +38 -54
- package/dist/components/Toolbar.js +67 -182
- package/dist/components/Tree.js +29 -66
- package/dist/components/card/Card.js +16 -20
- package/dist/components/card/CardAvatar.js +9 -13
- package/dist/components/card/CardBody.js +13 -17
- package/dist/components/card/CardFooter.js +12 -16
- package/dist/components/card/CardHeader.js +13 -17
- package/dist/components/card/CardIcon.js +6 -10
- package/dist/components/card/CardText.js +6 -10
- package/dist/components/customInput/CustomInput.js +12 -10
- package/dist/components/dashboard/BasicBusinessAppDashboard.js +85 -159
- package/dist/components/dashboard/BusinessPortalAppDashboard.js +30 -75
- package/dist/components/dashboard/components/Header.js +9 -26
- package/dist/components/dashboard/components/LeftDrawer.js +3 -1
- package/dist/components/dashboard/components/blackDashboard/fixedPlugin/FixedPlugin.js +1 -1
- package/dist/components/dashboard/components/blackDashboard/sidebar/Sidebar.css +7 -0
- package/dist/components/dashboard/components/blackDashboard/sidebar/Sidebar.js +189 -79
- package/dist/components/footer/Footer.js +6 -18
- package/dist/components/form/AddressSearch.js +32 -66
- package/dist/components/form/AutoComplete.js +161 -0
- package/dist/components/form/BaseField.js +89 -107
- package/dist/components/form/DatePicker.js +8 -23
- package/dist/components/form/FieldSet.js +161 -191
- package/dist/components/form/Form.css +1 -1
- package/dist/components/form/Form.js +153 -479
- package/dist/components/form/GridField.js +46 -146
- package/dist/components/form/IconField.js +35 -0
- package/dist/components/form/ImageEditor.js +22 -60
- package/dist/components/form/LookupField.js +8 -29
- package/dist/components/form/MultiFileUploadField.js +187 -0
- package/dist/components/form/RadioGroup.js +10 -26
- package/dist/components/form/Section.js +40 -91
- package/dist/components/form/SelectItem.js +14 -33
- package/dist/components/form/SignatureTemplateDesignerField.js +0 -1
- package/dist/components/form/Switch.js +53 -0
- package/dist/components/form/TextField.js +10 -17
- package/dist/components/form/TimePicker.js +8 -1
- package/dist/components/form/TransferList.css +2 -2
- package/dist/components/form/TransferList.js +67 -125
- package/dist/components/form/UploadField.js +132 -177
- package/dist/components/form/fieldset.css +8 -0
- package/dist/components/grid/GridContainer.js +5 -9
- package/dist/components/grid/GridItem.js +5 -9
- package/dist/components/layout/CollapsiblePanel.js +11 -33
- package/dist/components/layout/Layout.js +228 -290
- package/dist/components/layout/VC.css +17 -0
- package/dist/components/layout/View.css +18 -1
- package/dist/components/layout/View.js +80 -200
- package/dist/components/layout/ViewContainer.css +3 -0
- package/dist/components/layout/ViewContainer.js +59 -0
- package/dist/components/layout/ViewPort.js +50 -80
- package/dist/components/layout/Window.css +18 -0
- package/dist/components/layout/Window.js +287 -0
- package/dist/components/layout/WindowViewPort.js +71 -0
- package/dist/components/loader.css +1 -1
- package/dist/components/media/ClosablePanel.css +37 -0
- package/dist/components/media/ClosablePanel.js +53 -0
- package/dist/components/media/LobbyWaitingList.js +91 -0
- package/dist/components/media/MediaSoupHelper.js +223 -0
- package/dist/components/media/Recorder.js +235 -0
- package/dist/components/media/SideBarContent.css +54 -0
- package/dist/components/media/SideBarContent.js +46 -0
- package/dist/components/media/SocketRequest.js +20 -0
- package/dist/components/media/SocketResponse.js +16 -0
- package/dist/components/media/Timer.css +30 -0
- package/dist/components/media/Timer.js +88 -0
- package/dist/components/media/Toolbar.css +35 -0
- package/dist/components/media/Toolbar.js +494 -0
- package/dist/components/media/Tracks.js +39 -0
- package/dist/components/media/TrainingRoom.js +608 -0
- package/dist/components/media/Transports.js +35 -0
- package/dist/components/media/VCEventManager.js +74 -0
- package/dist/components/media/VCEventType.js +164 -0
- package/dist/components/media/VCParticipantList.css +72 -0
- package/dist/components/media/VCParticipantList.js +56 -0
- package/dist/components/media/VCParticipantListItem.css +73 -0
- package/dist/components/media/VCParticipantListItem.js +319 -0
- package/dist/components/media/VCRoom.css +42 -0
- package/dist/components/media/VCRoom.js +90 -0
- package/dist/components/media/VCRoomParticipant.css +25 -0
- package/dist/components/media/VCRoomParticipant.js +808 -0
- package/dist/components/media/VCRoomRecorder.js +223 -0
- package/dist/components/media/VCRoomWorkspace.css +86 -0
- package/dist/components/media/VCRoomWorkspace.js +666 -0
- package/dist/components/media/Video.css +4 -0
- package/dist/components/media/Video.js +131 -0
- package/dist/components/media/VideoPlayer.css +10 -0
- package/dist/components/media/VideoPlayer.js +86 -0
- package/dist/components/media/chat/ChatRoom.js +926 -0
- package/dist/components/media/chat/ChatRoomItem.js +83 -0
- package/dist/components/media/chat/ChatRoomList.js +78 -0
- package/dist/components/media/chat/ChatRooms.scss +567 -0
- package/dist/components/menu/CollapsibleMenu.js +2 -19
- package/dist/components/menu/MenuBars.js +6 -33
- package/dist/components/menu/MenuButton.js +27 -39
- package/dist/components/menu/MenuItem.js +3 -20
- package/dist/components/menu/MenuLink.js +22 -13
- package/dist/components/navbars/AuthNavbar.js +5 -18
- package/dist/components/navbars/HomeNavbar.js +5 -7
- package/dist/components/navbars/PortalNavbar.js +7 -25
- package/dist/components/signatures/AgilitySignaturePanel.js +38 -104
- package/dist/components/signatures/AlertItem.js +3 -24
- package/dist/components/signatures/DocumentContainer.js +47 -134
- package/dist/components/signatures/ImageSignatureInput.js +11 -38
- package/dist/components/signatures/MenuButton.js +1 -16
- package/dist/components/signatures/Prompt.js +3 -24
- package/dist/components/signatures/ResponsiveTable.js +42 -83
- package/dist/components/signatures/SearchView.js +13 -50
- package/dist/components/signatures/SignatorySearch.js +83 -99
- package/dist/components/signatures/SignatorySearchForm.js +11 -17
- package/dist/components/signatures/SignatureInput.js +18 -47
- package/dist/components/signatures/SignatureInputProps.js +18 -60
- package/dist/components/signatures/SignatureTemplateDesigner.js +151 -239
- package/dist/components/signatures/Toolbar.js +7 -34
- package/dist/components/signatures/ViewUtils.js +2 -6
- package/dist/components/typography/Danger.js +3 -1
- package/dist/components/typography/Info.js +3 -1
- package/dist/components/typography/Link.js +6 -2
- package/dist/event/ActionHandlers.js +6 -6
- package/dist/event/EventType.js +7 -1
- package/dist/event/LoadDataActionHandler.js +1 -1
- package/dist/event/Observable.js +80 -174
- package/dist/event/RouteActionHandler.js +74 -31
- package/dist/event/ServiceCallActionHandler.js +36 -24
- package/dist/event/SignalGraphActionHandler.js +2 -2
- package/dist/js/Addresses.js +10 -8
- package/dist/js/Calendar.js +220 -0
- package/dist/js/Media.js +157 -0
- package/dist/redux/store/ConfigureStore.js +3 -9
- package/dist/redux/store/DashboardStore.js +42 -94
- package/dist/redux/store/SecurityStore.js +15 -50
- package/dist/view/Dashboard.js +256 -171
- package/dist/view/Views.js +30 -0
- package/dist/view/security/ChangePasswordBasic.js +29 -80
- package/dist/view/security/ForgotPassword.js +13 -46
- package/dist/view/security/ForgotPasswordBasic.js +12 -45
- package/dist/view/security/Login.js +15 -51
- package/dist/view/security/LoginBasic.js +13 -46
- package/dist/view/security/LoginBusinessPortal.js +12 -45
- package/dist/view/security/ResetPassword.js +13 -51
- package/dist/view/security/ResetPasswordBasic.js +27 -75
- package/dist/view/security/Security.js +1 -0
- package/package.json +31 -25
- package/README.md +0 -1623
- package/dist/components/dashboard/BasicApp.js +0 -140
- package/dist/components/navbars/NavbarLinks.js +0 -212
- package/dist/components/signatures/OLD.js +0 -1138
- package/gulpfile.js +0 -77
|
@@ -15,18 +15,12 @@ var Security = _interopRequireWildcard(require("./SecurityStore"));
|
|
|
15
15
|
|
|
16
16
|
var Dashboard = _interopRequireWildcard(require("./DashboardStore"));
|
|
17
17
|
|
|
18
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function
|
|
18
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
19
19
|
|
|
20
20
|
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; }
|
|
21
21
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
23
|
|
|
24
|
-
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; }
|
|
25
|
-
|
|
26
|
-
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; }
|
|
27
|
-
|
|
28
|
-
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; }
|
|
29
|
-
|
|
30
24
|
function ConfigureStore(history, initialState) {
|
|
31
25
|
const reducers = {
|
|
32
26
|
security: Security.reducer,
|
|
@@ -41,8 +35,8 @@ function ConfigureStore(history, initialState) {
|
|
|
41
35
|
enhancers.push(window.devToolsExtension());
|
|
42
36
|
}
|
|
43
37
|
|
|
44
|
-
const rootReducer = (0, _redux.combineReducers)(
|
|
38
|
+
const rootReducer = (0, _redux.combineReducers)({ ...reducers,
|
|
45
39
|
router: (0, _connectedReactRouter.connectRouter)(history)
|
|
46
|
-
})
|
|
40
|
+
});
|
|
47
41
|
return (0, _redux.createStore)(rootReducer, initialState, (0, _redux.compose)((0, _redux.applyMiddleware)(...middleware), ...enhancers));
|
|
48
42
|
}
|
|
@@ -7,16 +7,6 @@ exports.reducer = exports.actionCreators = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _RestUtils = require("../../RestUtils");
|
|
9
9
|
|
|
10
|
-
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; }
|
|
11
|
-
|
|
12
|
-
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; }
|
|
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
10
|
const requestType = 'REQUEST';
|
|
21
11
|
const receiveDashboardSettingsType = 'RECEIVE_DASHBOARD_SETTINGS';
|
|
22
12
|
const activeRouteMenu = 'ACTIVE_ROUTE_MENU';
|
|
@@ -25,86 +15,44 @@ const initialState = {
|
|
|
25
15
|
dashboardSettings: {},
|
|
26
16
|
isLoading: false,
|
|
27
17
|
error: false,
|
|
28
|
-
activeRouteMenu:
|
|
18
|
+
activeRouteMenu: {
|
|
19
|
+
id: "dashboard",
|
|
20
|
+
name: 'Dashboard'
|
|
21
|
+
},
|
|
29
22
|
secondaryThemeColor: "red"
|
|
30
23
|
};
|
|
31
24
|
let currentDashboardSettings = {};
|
|
32
25
|
const actionCreators = {
|
|
33
|
-
getDashboardSettings: url =>
|
|
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
|
-
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
|
-
}()
|
|
26
|
+
getDashboardSettings: url => async dispatch => {
|
|
27
|
+
dispatch({
|
|
28
|
+
type: requestType
|
|
29
|
+
});
|
|
30
|
+
(0, _RestUtils.sendRequest)(url, response => {
|
|
31
|
+
dispatch({
|
|
32
|
+
type: receiveDashboardSettingsType,
|
|
33
|
+
dashboardSettings: response,
|
|
34
|
+
error: false
|
|
35
|
+
});
|
|
36
|
+
}, () => {
|
|
37
|
+
dispatch({
|
|
38
|
+
type: receiveDashboardSettingsType,
|
|
39
|
+
dashboardSettings: null,
|
|
40
|
+
error: true
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
},
|
|
44
|
+
setActiveRoute: route => async dispatch => {
|
|
45
|
+
dispatch({
|
|
46
|
+
type: activeRouteMenu,
|
|
47
|
+
activeRouteMenu: route
|
|
48
|
+
});
|
|
49
|
+
},
|
|
50
|
+
setSecondaryThemeColor: secondaryColor => async dispatch => {
|
|
51
|
+
dispatch({
|
|
52
|
+
type: secondaryThemeColor,
|
|
53
|
+
secondaryThemeColor: secondaryColor
|
|
54
|
+
});
|
|
55
|
+
}
|
|
108
56
|
};
|
|
109
57
|
exports.actionCreators = actionCreators;
|
|
110
58
|
|
|
@@ -112,32 +60,32 @@ const reducer = (state, action) => {
|
|
|
112
60
|
state = state || initialState;
|
|
113
61
|
|
|
114
62
|
if (action.type === requestType) {
|
|
115
|
-
return
|
|
63
|
+
return { ...state,
|
|
116
64
|
isLoading: true,
|
|
117
65
|
dashboardSettings: currentDashboardSettings,
|
|
118
66
|
error: false
|
|
119
|
-
}
|
|
67
|
+
};
|
|
120
68
|
}
|
|
121
69
|
|
|
122
70
|
if (action.type === receiveDashboardSettingsType) {
|
|
123
71
|
currentDashboardSettings = action.dashboardSettings;
|
|
124
|
-
return
|
|
72
|
+
return { ...state,
|
|
125
73
|
error: action.error,
|
|
126
74
|
dashboardSettings: currentDashboardSettings,
|
|
127
75
|
isLoading: false
|
|
128
|
-
}
|
|
76
|
+
};
|
|
129
77
|
}
|
|
130
78
|
|
|
131
79
|
if (action.type === activeRouteMenu) {
|
|
132
|
-
return
|
|
80
|
+
return { ...state,
|
|
133
81
|
activeRouteMenu: action.activeRouteMenu
|
|
134
|
-
}
|
|
82
|
+
};
|
|
135
83
|
}
|
|
136
84
|
|
|
137
85
|
if (action.type === secondaryThemeColor) {
|
|
138
|
-
return
|
|
86
|
+
return { ...state,
|
|
139
87
|
secondaryThemeColor: action.secondaryThemeColor
|
|
140
|
-
}
|
|
88
|
+
};
|
|
141
89
|
}
|
|
142
90
|
|
|
143
91
|
return state;
|
|
@@ -4,17 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.reducer = exports.actionCreators = void 0;
|
|
7
|
-
|
|
8
|
-
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; }
|
|
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
7
|
const requestType = 'REQUEST';
|
|
19
8
|
const receiveUserDetailsType = 'RECEIVE_USER_DETAILS';
|
|
20
9
|
const initialState = {
|
|
@@ -25,41 +14,17 @@ const initialState = {
|
|
|
25
14
|
};
|
|
26
15
|
let currentUserDetails = {};
|
|
27
16
|
const actionCreators = {
|
|
28
|
-
login: (url, username, password) =>
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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
|
-
}()
|
|
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
|
+
});
|
|
27
|
+
}
|
|
63
28
|
};
|
|
64
29
|
exports.actionCreators = actionCreators;
|
|
65
30
|
|
|
@@ -67,19 +32,19 @@ const reducer = (state, action) => {
|
|
|
67
32
|
state = state || initialState;
|
|
68
33
|
|
|
69
34
|
if (action.type === requestType) {
|
|
70
|
-
return
|
|
35
|
+
return { ...state,
|
|
71
36
|
isLoading: true,
|
|
72
37
|
error: false,
|
|
73
38
|
userDetails: {}
|
|
74
|
-
}
|
|
39
|
+
};
|
|
75
40
|
}
|
|
76
41
|
|
|
77
42
|
if (action.type === receiveUserDetailsType) {
|
|
78
43
|
currentUserDetails = JSON.parse(action.userDetails);
|
|
79
|
-
return
|
|
44
|
+
return { ...state,
|
|
80
45
|
userDetails: currentUserDetails,
|
|
81
46
|
isLoading: false
|
|
82
|
-
}
|
|
47
|
+
};
|
|
83
48
|
}
|
|
84
49
|
|
|
85
50
|
return state;
|