@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
|
@@ -39,87 +39,87 @@ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructur
|
|
|
39
39
|
|
|
40
40
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
41
41
|
|
|
42
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
42
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
43
43
|
|
|
44
44
|
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
45
45
|
|
|
46
46
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
47
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
|
-
|
|
48
|
+
let ps;
|
|
49
|
+
|
|
50
|
+
const BasicBusinessApp = props => {
|
|
51
|
+
const _React$useState = _react.default.useState(true),
|
|
52
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
53
|
+
navDrawerOpen = _React$useState2[0],
|
|
54
|
+
setNavDrawerOpen = _React$useState2[1];
|
|
55
|
+
|
|
56
|
+
const _React$useState3 = _react.default.useState(true),
|
|
57
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
58
|
+
loading = _React$useState4[0],
|
|
59
|
+
setLoading = _React$useState4[1];
|
|
60
|
+
|
|
61
|
+
const _React$useState5 = _react.default.useState("blue"),
|
|
62
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
63
|
+
activeColor = _React$useState6[0],
|
|
64
|
+
setActiveColor = _React$useState6[1];
|
|
65
|
+
|
|
66
|
+
const _React$useState7 = _react.default.useState(""),
|
|
67
|
+
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
68
|
+
secondaryThemeColor = _React$useState8[0],
|
|
69
|
+
setSecondaryThemeColor = _React$useState8[1];
|
|
70
|
+
|
|
71
|
+
const _React$useState9 = _react.default.useState(""),
|
|
72
|
+
_React$useState10 = _slicedToArray(_React$useState9, 2),
|
|
73
|
+
primaryThemeColor = _React$useState10[0],
|
|
74
|
+
setPrimaryThemeColor = _React$useState10[1];
|
|
75
|
+
|
|
76
|
+
const _React$useState11 = _react.default.useState(""),
|
|
77
|
+
_React$useState12 = _slicedToArray(_React$useState11, 2),
|
|
78
|
+
themeTextColor = _React$useState12[0],
|
|
79
|
+
setThemeTextColor = _React$useState12[1];
|
|
80
|
+
|
|
81
|
+
const _React$useState13 = _react.default.useState([]),
|
|
82
|
+
_React$useState14 = _slicedToArray(_React$useState13, 2),
|
|
83
|
+
routes = _React$useState14[0],
|
|
84
|
+
setRoutes = _React$useState14[1];
|
|
85
|
+
|
|
86
|
+
const _React$useState15 = _react.default.useState("data:image/png;base64," + props.logo),
|
|
87
|
+
_React$useState16 = _slicedToArray(_React$useState15, 2),
|
|
88
|
+
logo = _React$useState16[0],
|
|
89
|
+
setLogo = _React$useState16[1];
|
|
90
|
+
|
|
91
|
+
const _React$useState17 = _react.default.useState(document.documentElement.className.indexOf("nav-open") !== -1),
|
|
92
|
+
_React$useState18 = _slicedToArray(_React$useState17, 2),
|
|
93
|
+
sidebarOpened = _React$useState18[0],
|
|
94
|
+
setSidebarOpened = _React$useState18[1];
|
|
95
|
+
|
|
96
|
+
const _React$useState19 = _react.default.useState(true),
|
|
97
|
+
_React$useState20 = _slicedToArray(_React$useState19, 2),
|
|
98
|
+
sidebarMini = _React$useState20[0],
|
|
99
|
+
setSidebarMini = _React$useState20[1];
|
|
100
|
+
|
|
101
|
+
const _React$useState21 = _react.default.useState(0),
|
|
102
|
+
_React$useState22 = _slicedToArray(_React$useState21, 2),
|
|
103
|
+
opacity = _React$useState22[0],
|
|
104
|
+
setOpacity = _React$useState22[1];
|
|
105
|
+
|
|
106
|
+
const dispatch = (0, _reactRedux.useDispatch)();
|
|
107
|
+
|
|
108
|
+
const handleChangeRequestNavDrawer = () => {
|
|
109
109
|
setNavDrawerOpen(!navDrawerOpen);
|
|
110
110
|
};
|
|
111
111
|
|
|
112
|
-
|
|
112
|
+
const handleBgClick = color => {
|
|
113
113
|
setActiveColor(color);
|
|
114
114
|
};
|
|
115
115
|
|
|
116
|
-
_react.default.useEffect(
|
|
116
|
+
_react.default.useEffect(() => {
|
|
117
117
|
if (navigator.platform.indexOf("Win") > -1) {
|
|
118
118
|
document.documentElement.classList.add("perfect-scrollbar-on");
|
|
119
119
|
document.documentElement.classList.remove("perfect-scrollbar-off");
|
|
120
|
-
|
|
120
|
+
let tables = document.querySelectorAll(".table-responsive");
|
|
121
121
|
|
|
122
|
-
for (
|
|
122
|
+
for (let i = 0; i < tables.length; i++) {
|
|
123
123
|
ps = new _perfectScrollbar.default(tables[i]);
|
|
124
124
|
}
|
|
125
125
|
}
|
|
@@ -127,14 +127,14 @@ var BasicBusinessApp = function BasicBusinessApp(props) {
|
|
|
127
127
|
window.addEventListener("scroll", showNavbarButton);
|
|
128
128
|
});
|
|
129
129
|
|
|
130
|
-
_react.default.useEffect(
|
|
130
|
+
_react.default.useEffect(() => {
|
|
131
131
|
if (props.width !== null && typeof props.width !== 'undefined') {
|
|
132
132
|
alert(props.width);
|
|
133
133
|
setNavDrawerOpen(props.width === _withWidth.LARGE);
|
|
134
134
|
}
|
|
135
135
|
}, [props.width]);
|
|
136
136
|
|
|
137
|
-
_react.default.useEffect(
|
|
137
|
+
_react.default.useEffect(() => {
|
|
138
138
|
document.body.classList.add("white-content");
|
|
139
139
|
|
|
140
140
|
if (navigator.platform.indexOf("Win") > -1) {
|
|
@@ -144,20 +144,17 @@ var BasicBusinessApp = function BasicBusinessApp(props) {
|
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
window.removeEventListener("scroll", showNavbarButton);
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
setThemeTextColor(props.settings.systemProfileDto.themeTextColor);
|
|
153
|
-
dispatch(_DashboardStore.actionCreators.setSecondaryThemeColor(props.settings.systemProfileDto.secondCorporateBrandColor));
|
|
154
|
-
}
|
|
147
|
+
setActiveColor("agility");
|
|
148
|
+
setSecondaryThemeColor(props.settings.systemProfileDto.secondCorporateBrandColor);
|
|
149
|
+
setPrimaryThemeColor(props.settings.systemProfileDto.firstCorporateBrandColor);
|
|
150
|
+
setThemeTextColor(props.settings.systemProfileDto.themeTextColor);
|
|
151
|
+
dispatch(_DashboardStore.actionCreators.setSecondaryThemeColor(props.settings.systemProfileDto.secondCorporateBrandColor));
|
|
155
152
|
|
|
156
153
|
if (!_Utils.default.isNull(props.settings)) {
|
|
157
|
-
|
|
154
|
+
let dashboardMenu = {};
|
|
158
155
|
dashboardMenu.id = 'dashboard';
|
|
159
156
|
dashboardMenu.menus = [];
|
|
160
|
-
|
|
157
|
+
let myDashboardMenu = {};
|
|
161
158
|
myDashboardMenu.id = 'myDashboard';
|
|
162
159
|
myDashboardMenu.items = [];
|
|
163
160
|
myDashboardMenu.attributes = {};
|
|
@@ -165,9 +162,9 @@ var BasicBusinessApp = function BasicBusinessApp(props) {
|
|
|
165
162
|
dashboardMenu.menus.push(myDashboardMenu);
|
|
166
163
|
|
|
167
164
|
if (!_Utils.default.isNull(props.settings.userDashboards)) {
|
|
168
|
-
for (
|
|
169
|
-
|
|
170
|
-
|
|
165
|
+
for (let i = 0; i < props.settings.userDashboards.length; i++) {
|
|
166
|
+
let userDashboard = props.settings.userDashboards[i];
|
|
167
|
+
let item = {};
|
|
171
168
|
item.id = userDashboard.id;
|
|
172
169
|
item.attributes = {};
|
|
173
170
|
item.attributes.label = userDashboard.parameters.map.dashboardName;
|
|
@@ -175,7 +172,7 @@ var BasicBusinessApp = function BasicBusinessApp(props) {
|
|
|
175
172
|
}
|
|
176
173
|
}
|
|
177
174
|
|
|
178
|
-
|
|
175
|
+
let createNewMenu = {};
|
|
179
176
|
createNewMenu.id = 'createNew';
|
|
180
177
|
createNewMenu.items = [];
|
|
181
178
|
createNewMenu.attributes = {};
|
|
@@ -183,12 +180,12 @@ var BasicBusinessApp = function BasicBusinessApp(props) {
|
|
|
183
180
|
dashboardMenu.menus.push(createNewMenu);
|
|
184
181
|
|
|
185
182
|
if (!_Utils.default.isNull(props.settings.systemProfileDto.modules)) {
|
|
186
|
-
for (
|
|
187
|
-
|
|
183
|
+
for (let i = 0; i < props.settings.systemProfileDto.modules.length; i++) {
|
|
184
|
+
let module = props.settings.systemProfileDto.modules[i];
|
|
188
185
|
|
|
189
186
|
if (!_Utils.default.isNull(module.dashBoardMenuBar)) {
|
|
190
|
-
for (
|
|
191
|
-
|
|
187
|
+
for (let j = 0; j < module.dashBoardMenuBar.menus.length; j++) {
|
|
188
|
+
let menu = module.dashBoardMenuBar.menus[j]; // To keep the module classification, replace the line below with createNewMenu.items.push(menu)
|
|
192
189
|
|
|
193
190
|
createNewMenu.items = createNewMenu.items.concat(menu.items);
|
|
194
191
|
}
|
|
@@ -196,8 +193,8 @@ var BasicBusinessApp = function BasicBusinessApp(props) {
|
|
|
196
193
|
}
|
|
197
194
|
}
|
|
198
195
|
|
|
199
|
-
|
|
200
|
-
|
|
196
|
+
let createNewRoutes = [];
|
|
197
|
+
let newRoute = {};
|
|
201
198
|
newRoute.name = "Dashboard";
|
|
202
199
|
newRoute.icon = "fa fa-pie-chart";
|
|
203
200
|
newRoute.layout = "/admin";
|
|
@@ -206,18 +203,18 @@ var BasicBusinessApp = function BasicBusinessApp(props) {
|
|
|
206
203
|
createNewRoutes.push(newRoute);
|
|
207
204
|
|
|
208
205
|
if (!_Utils.default.isNull(props.settings.systemProfileDto.modules)) {
|
|
209
|
-
for (
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
createRoute.name =
|
|
213
|
-
createRoute.icon =
|
|
206
|
+
for (let i = 0; i < props.settings.systemProfileDto.modules.length; i++) {
|
|
207
|
+
let module = props.settings.systemProfileDto.modules[i];
|
|
208
|
+
let createRoute = {};
|
|
209
|
+
createRoute.name = module.label;
|
|
210
|
+
createRoute.icon = module.icon;
|
|
214
211
|
createRoute.layout = "/admin";
|
|
215
212
|
createRoute.level = 0;
|
|
216
213
|
|
|
217
|
-
if (
|
|
214
|
+
if (module.menuBar && module.menuBar.menus.length > 0) {
|
|
218
215
|
createRoute.collapse = true;
|
|
219
|
-
createRoute.state =
|
|
220
|
-
createRoute.views = getViews(
|
|
216
|
+
createRoute.state = module.name + "Collapse";
|
|
217
|
+
createRoute.views = getViews(module.menuBar.menus, 1);
|
|
221
218
|
}
|
|
222
219
|
|
|
223
220
|
createNewRoutes.push(createRoute);
|
|
@@ -240,11 +237,11 @@ var BasicBusinessApp = function BasicBusinessApp(props) {
|
|
|
240
237
|
}
|
|
241
238
|
}, [props.settings]);
|
|
242
239
|
|
|
243
|
-
|
|
244
|
-
|
|
240
|
+
const getViews = (menus, level) => {
|
|
241
|
+
let newViews = [];
|
|
245
242
|
|
|
246
|
-
for (
|
|
247
|
-
|
|
243
|
+
for (let i = 0; i < menus.length; i++) {
|
|
244
|
+
let createView = {};
|
|
248
245
|
createView.name = menus[i].attributes.label;
|
|
249
246
|
createView.mini = "SS";
|
|
250
247
|
createView.layout = "/admin";
|
|
@@ -262,11 +259,11 @@ var BasicBusinessApp = function BasicBusinessApp(props) {
|
|
|
262
259
|
return newViews;
|
|
263
260
|
};
|
|
264
261
|
|
|
265
|
-
|
|
266
|
-
|
|
262
|
+
const getItems = (items, level) => {
|
|
263
|
+
let newItems = [];
|
|
267
264
|
|
|
268
|
-
for (
|
|
269
|
-
|
|
265
|
+
for (let i = 0; i < items.length; i++) {
|
|
266
|
+
let createItem = {};
|
|
270
267
|
createItem.name = items[i].attributes.label;
|
|
271
268
|
createItem.mini = "SS";
|
|
272
269
|
createItem.layout = "/admin";
|
|
@@ -285,12 +282,12 @@ var BasicBusinessApp = function BasicBusinessApp(props) {
|
|
|
285
282
|
return newItems;
|
|
286
283
|
};
|
|
287
284
|
|
|
288
|
-
|
|
285
|
+
const toggleSidebar = () => {
|
|
289
286
|
document.documentElement.classList.toggle("nav-open");
|
|
290
287
|
setSidebarOpened(!sidebarOpened);
|
|
291
288
|
};
|
|
292
289
|
|
|
293
|
-
|
|
290
|
+
const showNavbarButton = () => {
|
|
294
291
|
if (document.documentElement.scrollTop > 50 || document.scrollingElement.scrollTop > 50) {
|
|
295
292
|
setOpacity(1);
|
|
296
293
|
} else if (document.documentElement.scrollTop <= 50 || document.scrollingElement.scrollTop <= 50) {
|
|
@@ -298,8 +295,8 @@ var BasicBusinessApp = function BasicBusinessApp(props) {
|
|
|
298
295
|
}
|
|
299
296
|
};
|
|
300
297
|
|
|
301
|
-
|
|
302
|
-
return routes.map(
|
|
298
|
+
const getRoutes = routes => {
|
|
299
|
+
return routes.map((prop, key) => {
|
|
303
300
|
if (prop.collapse) {
|
|
304
301
|
return getRoutes(prop.views);
|
|
305
302
|
}
|
|
@@ -316,12 +313,12 @@ var BasicBusinessApp = function BasicBusinessApp(props) {
|
|
|
316
313
|
});
|
|
317
314
|
};
|
|
318
315
|
|
|
319
|
-
|
|
320
|
-
|
|
316
|
+
const getActiveRoute = routes => {
|
|
317
|
+
let activeRoute = "Dashboard";
|
|
321
318
|
|
|
322
|
-
for (
|
|
319
|
+
for (let i = 0; i < routes.length; i++) {
|
|
323
320
|
if (routes[i].collapse) {
|
|
324
|
-
|
|
321
|
+
let collapseActiveRoute = getActiveRoute(routes[i].views);
|
|
325
322
|
|
|
326
323
|
if (collapseActiveRoute !== activeRoute) {
|
|
327
324
|
return collapseActiveRoute;
|
|
@@ -336,12 +333,12 @@ var BasicBusinessApp = function BasicBusinessApp(props) {
|
|
|
336
333
|
return activeRoute;
|
|
337
334
|
};
|
|
338
335
|
|
|
339
|
-
|
|
336
|
+
const handleActiveClick = color => {
|
|
340
337
|
setActiveColor(color);
|
|
341
338
|
};
|
|
342
339
|
|
|
343
|
-
|
|
344
|
-
|
|
340
|
+
const handleMiniClick = () => {
|
|
341
|
+
let notifyMessage = "Sidebar mini ";
|
|
345
342
|
|
|
346
343
|
if (document.body.classList.contains("sidebar-mini")) {
|
|
347
344
|
setSidebarMini(false);
|
|
@@ -351,7 +348,7 @@ var BasicBusinessApp = function BasicBusinessApp(props) {
|
|
|
351
348
|
notifyMessage += "activated...";
|
|
352
349
|
}
|
|
353
350
|
|
|
354
|
-
|
|
351
|
+
let options = {};
|
|
355
352
|
options = {
|
|
356
353
|
place: "tr",
|
|
357
354
|
message: notifyMessage,
|
|
@@ -362,7 +359,7 @@ var BasicBusinessApp = function BasicBusinessApp(props) {
|
|
|
362
359
|
document.body.classList.toggle("sidebar-mini");
|
|
363
360
|
};
|
|
364
361
|
|
|
365
|
-
|
|
362
|
+
const closeSidebar = () => {
|
|
366
363
|
setSidebarOpened(false);
|
|
367
364
|
document.documentElement.classList.remove("nav-open");
|
|
368
365
|
};
|
|
@@ -395,10 +392,10 @@ var BasicBusinessApp = function BasicBusinessApp(props) {
|
|
|
395
392
|
className: "tim-icons icon-bullet-list-67 visible-on-sidebar-mini text-muted"
|
|
396
393
|
})), " "), " ", /*#__PURE__*/_react.default.createElement(_Sidebar.default, _extends({}, props, {
|
|
397
394
|
routes: routes,
|
|
398
|
-
activeColor:
|
|
395
|
+
activeColor: "agility",
|
|
399
396
|
secondaryThemeColor: secondaryThemeColor,
|
|
400
397
|
activeRouteMenu: 'Dashboard',
|
|
401
|
-
dashboardLauncher:
|
|
398
|
+
dashboardLauncher: () => {
|
|
402
399
|
launcDashboard();
|
|
403
400
|
},
|
|
404
401
|
appLogoPath: props.appLogoPath,
|
|
@@ -43,22 +43,22 @@ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructur
|
|
|
43
43
|
|
|
44
44
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
45
45
|
|
|
46
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
46
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
47
47
|
|
|
48
48
|
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
49
49
|
|
|
50
50
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
const Header = props => {
|
|
53
|
+
const styles = props.styles,
|
|
54
|
+
handleChangeRequestNavDrawer = props.handleChangeRequestNavDrawer;
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
const _React$useState = _react.default.useState(""),
|
|
57
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
58
|
+
title = _React$useState2[0],
|
|
59
|
+
setTitle = _React$useState2[1];
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
const style = {
|
|
62
62
|
appBar: {
|
|
63
63
|
position: 'fixed',
|
|
64
64
|
top: 0,
|
|
@@ -95,8 +95,8 @@ var Header = function Header(props) {
|
|
|
95
95
|
}
|
|
96
96
|
};
|
|
97
97
|
|
|
98
|
-
_react.default.useEffect(
|
|
99
|
-
|
|
98
|
+
_react.default.useEffect(() => {
|
|
99
|
+
let listener = new _EventListener.default(null, "dashboard", "applicationContext", _EventType.default.APPLICATION_CONTEXT_CHANGE, null, e => {
|
|
100
100
|
if (e.data.property.name === 'title') {
|
|
101
101
|
setTitle(e.data.property.value);
|
|
102
102
|
}
|
|
@@ -31,9 +31,9 @@ var _Utils = _interopRequireDefault(require("../../../Utils"));
|
|
|
31
31
|
|
|
32
32
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
const LeftDrawer = props => {
|
|
35
|
+
let navDrawerOpen = props.navDrawerOpen;
|
|
36
|
+
const styles = {
|
|
37
37
|
spacer: {
|
|
38
38
|
height: '2px'
|
|
39
39
|
},
|
|
@@ -13,8 +13,8 @@ var _Avatar = _interopRequireDefault(require("material-ui/Avatar"));
|
|
|
13
13
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
const UserIdentity = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
17
|
+
const style = {
|
|
18
18
|
avatar: {
|
|
19
19
|
div: {
|
|
20
20
|
padding: '4px 0 8px 4px',
|