@agilemotion/oui-react-js 1.3.1 → 1.3.3
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 +148 -39
- package/dist/BasicApp.js +12 -5
- package/dist/BasicAppHome.js +18 -12
- package/dist/BusinessPortalApp.css +37 -0
- package/dist/BusinessPortalApp.js +90 -0
- package/dist/BusinessPortalAppHome.js +160 -0
- package/dist/RestUtils.js +65 -40
- package/dist/Utils.js +47 -1
- package/dist/assets/jss/components/footerStyle.js +7 -4
- package/dist/assets/jss/views/loginBasicStyle.js +0 -1
- package/dist/assets/jss/views/loginBusinessPortalStyle.js +76 -0
- package/dist/components/AlertBar.js +40 -11
- package/dist/components/ConfirmationDialog.js +54 -8
- package/dist/components/DataGrid.css +3 -1
- package/dist/components/DataGrid.js +149 -82
- package/dist/components/DataGridFilter.js +85 -8
- package/dist/components/Dialog.js +258 -0
- package/dist/components/Graph.js +26 -18
- package/dist/components/GraphNode.js +0 -2
- package/dist/components/HtmlPanel.js +103 -4
- package/dist/components/Icon.js +60 -0
- package/dist/components/PopupView.js +55 -6
- package/dist/components/SignaturePanel.js +147 -0
- package/dist/components/StepperTitleBar.bck.css +85 -0
- package/dist/components/StepperTitleBar.css +53 -54
- package/dist/components/StepperTitleBar.js +42 -29
- package/dist/components/TabPanel.js +10 -11
- package/dist/components/TableCellContent.js +6 -3
- package/dist/components/TemplateDesigner.css +13 -0
- package/dist/components/TemplateDesigner.js +494 -0
- package/dist/components/TemplateItemEventHandler.js +440 -0
- package/dist/components/TemplateTable.js +222 -0
- package/dist/components/TitleBar.js +21 -14
- package/dist/components/Toolbar.js +7 -5
- package/dist/components/Tree.js +5 -2
- package/dist/components/dashboard/{BasicBusinessApp.js → BasicBusinessAppDashboard.js} +30 -25
- package/dist/components/dashboard/BusinessPortalAppDashboard.css +5 -0
- package/dist/components/dashboard/BusinessPortalAppDashboard.js +236 -0
- package/dist/components/dashboard/components/blackDashboard/sidebar/Sidebar.js +23 -12
- package/dist/components/dashboard/components/portal/Timeline.js +17 -0
- package/dist/components/dashboard/components/portal/Workspace.css +25 -0
- package/dist/components/dashboard/components/portal/Workspace.js +48 -0
- package/dist/components/dashboard/components/portal/portal-dashboard.css +25 -0
- package/dist/components/footer/Footer.js +43 -10
- package/dist/components/form/AddressSearch.js +140 -0
- package/dist/components/form/BaseField.js +42 -8
- package/dist/components/form/Checkbox.js +3 -0
- package/dist/components/form/DatePicker.js +70 -4
- package/dist/components/form/FieldSet.js +247 -72
- package/dist/components/form/Form.js +178 -127
- package/dist/components/form/GridField.js +3 -2
- package/dist/components/form/ImageEditor.js +461 -0
- package/dist/components/form/LabelField.js +2 -2
- package/dist/components/form/LookupField.js +16 -4
- package/dist/components/form/RadioGroup.js +107 -0
- package/dist/components/form/Section.js +58 -19
- package/dist/components/form/SelectItem.js +14 -5
- package/dist/components/form/SignatureTemplateDesignerField.js +46 -0
- package/dist/components/form/TextField.js +5 -9
- package/dist/components/form/TransferList.js +7 -7
- package/dist/components/form/UploadField.js +184 -55
- package/dist/components/form/noimage-person.png +0 -0
- package/dist/components/form/noimage.png +0 -0
- package/dist/components/form/transparent.jpeg +0 -0
- package/dist/components/layout/CollapsiblePanel.js +0 -6
- package/dist/components/layout/Layout.js +49 -19
- package/dist/components/layout/View.css +43 -0
- package/dist/components/layout/View.js +76 -156
- package/dist/components/layout/ViewPort.js +32 -49
- package/dist/components/menu/MenuLink.js +7 -0
- package/dist/components/navbars/HomeNavbar.js +29 -14
- package/dist/components/navbars/PortalNavbar.css +75 -0
- package/dist/components/navbars/PortalNavbar.js +227 -0
- package/dist/components/signatures/AgilitySignaturePanel.js +312 -0
- package/dist/components/signatures/DocumentContainer.css +33 -0
- package/dist/components/signatures/DocumentContainer.js +206 -0
- package/dist/components/signatures/ImageSignatureInput.js +265 -0
- package/dist/components/signatures/ResponsiveTable.js +1 -3
- package/dist/components/signatures/SignatureInput.js +303 -0
- package/dist/components/signatures/SignatureInputProps.js +17 -11
- package/dist/components/signatures/SignatureTemplateDesigner.js +192 -81
- package/dist/components/signatures/transparent.jpeg +0 -0
- package/dist/event/LoadDataActionHandler.js +1 -1
- package/dist/event/Observable.js +1 -1
- package/dist/event/RouteActionHandler.js +18 -5
- package/dist/event/ServiceCallActionHandler.js +7 -3
- package/dist/js/Addresses.js +16 -9
- package/dist/view/Dashboard.js +27 -19
- package/dist/view/PortalDashboard.js +33 -0
- package/dist/view/security/ChangePasswordBasic.js +1 -0
- package/dist/view/security/ForgotPasswordBasic.js +1 -0
- package/dist/view/security/LoginBasic.js +6 -1
- package/dist/view/security/LoginBusinessPortal.js +268 -0
- package/dist/view/security/ResetPasswordBasic.js +1 -0
- package/package.json +25 -21
- package/dist/assets/img/flogo.png +0 -0
|
@@ -50,19 +50,26 @@ const TitleBar = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.f
|
|
|
50
50
|
|
|
51
51
|
let eventHandlingConfig = _Utils.default.isNull(parsedConfig.eventHandlingConfig) ? {} : parsedConfig.eventHandlingConfig;
|
|
52
52
|
eventHandlingConfig.subscriptions = _Utils.default.isNull(eventHandlingConfig.subscriptions) ? [] : eventHandlingConfig.subscriptions;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
53
|
+
|
|
54
|
+
let titleValue = _Utils.default.getComponentAttribute(props.config, 'title', null);
|
|
55
|
+
|
|
56
|
+
if (_Utils.default.isNull(titleValue)) {
|
|
57
|
+
let subscription = {
|
|
58
|
+
publisher: "applicationContext",
|
|
59
|
+
eventType: _EventType.default.APPLICATION_CONTEXT_CHANGE,
|
|
60
|
+
actions: [{
|
|
61
|
+
actionType: "script",
|
|
62
|
+
script: {
|
|
63
|
+
lines: ["if($event.data.name === 'title'){", " let component = @#{".concat(props.config.id, "};"), " if(component) {", " component.title = $event.data.value", " }", "}"]
|
|
64
|
+
}
|
|
65
|
+
}]
|
|
66
|
+
};
|
|
67
|
+
eventHandlingConfig.subscriptions.push(subscription);
|
|
68
|
+
|
|
69
|
+
_Observable.default.addSubscriptions(eventHandlingConfig, props.handle, props.viewId);
|
|
70
|
+
} else {
|
|
71
|
+
setTitle(titleValue);
|
|
72
|
+
}
|
|
66
73
|
|
|
67
74
|
props.loadCompleteHandler(props.config.id);
|
|
68
75
|
setInitializing(false);
|
|
@@ -90,7 +97,7 @@ const TitleBar = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.f
|
|
|
90
97
|
ref: ref
|
|
91
98
|
}, !_Utils.default.isNull(props.config) ? /*#__PURE__*/_react.default.createElement("div", {
|
|
92
99
|
style: {
|
|
93
|
-
padding: '32px
|
|
100
|
+
padding: '32px 0 4px 0',
|
|
94
101
|
fontSize: '24px',
|
|
95
102
|
color: '#202124'
|
|
96
103
|
}
|
|
@@ -278,7 +278,10 @@ const Toolbar = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
|
278
278
|
}, toolbar.sections.map(section => {
|
|
279
279
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
280
280
|
className: "col-*-*",
|
|
281
|
-
key: ++sectionKeyCounter
|
|
281
|
+
key: ++sectionKeyCounter,
|
|
282
|
+
style: {
|
|
283
|
+
textAlign: section.halign ? section.halign.toLowerCase() : null
|
|
284
|
+
}
|
|
282
285
|
}, renderSection(section, counter++));
|
|
283
286
|
}));
|
|
284
287
|
}
|
|
@@ -295,11 +298,10 @@ const Toolbar = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
|
295
298
|
|
|
296
299
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
297
300
|
ref: ref,
|
|
298
|
-
style: {
|
|
299
|
-
padding: _Utils.default.getComponentAttribute(props.config, 'padding', null),
|
|
301
|
+
style: _Utils.default.mergeStyles({
|
|
300
302
|
borderBottom: getBorderBottom(),
|
|
301
|
-
margin:
|
|
302
|
-
}
|
|
303
|
+
margin: '0'
|
|
304
|
+
}, props.config)
|
|
303
305
|
}, render(props.config));
|
|
304
306
|
});
|
|
305
307
|
|
package/dist/components/Tree.js
CHANGED
|
@@ -179,9 +179,12 @@ const Tree = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
|
179
179
|
if (!_Utils.default.isNull(service)) {
|
|
180
180
|
(0, _RestUtils.invokeRpc)(service, props.handle, props.viewId, result => {
|
|
181
181
|
try {
|
|
182
|
-
expand(result.data);
|
|
183
|
-
setRoot(result.data);
|
|
184
182
|
props.loadCompleteHandler(props.config.id);
|
|
183
|
+
|
|
184
|
+
if (result.data) {
|
|
185
|
+
expand(result.data);
|
|
186
|
+
setRoot(result.data);
|
|
187
|
+
}
|
|
185
188
|
} catch (e) {
|
|
186
189
|
props.console.error(e);
|
|
187
190
|
|
|
@@ -47,7 +47,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
47
47
|
|
|
48
48
|
let ps;
|
|
49
49
|
|
|
50
|
-
const
|
|
50
|
+
const BasicBusinessAppDashboard = props => {
|
|
51
51
|
const _React$useState = _react.default.useState(true),
|
|
52
52
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
53
53
|
navDrawerOpen = _React$useState2[0],
|
|
@@ -193,45 +193,49 @@ const BasicBusinessApp = props => {
|
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
-
let
|
|
196
|
+
let newRoutes = [];
|
|
197
197
|
let newRoute = {};
|
|
198
198
|
newRoute.name = "Dashboard";
|
|
199
199
|
newRoute.icon = "fa fa-pie-chart";
|
|
200
200
|
newRoute.layout = "/admin";
|
|
201
201
|
newRoute.level = 0;
|
|
202
202
|
newRoute.isParent = true;
|
|
203
|
-
|
|
203
|
+
newRoutes.push(newRoute);
|
|
204
|
+
console.log(props.settings.systemProfileDto);
|
|
204
205
|
|
|
205
206
|
if (!_Utils.default.isNull(props.settings.systemProfileDto.modules)) {
|
|
206
207
|
for (let i = 0; i < props.settings.systemProfileDto.modules.length; i++) {
|
|
207
208
|
let module = props.settings.systemProfileDto.modules[i];
|
|
208
|
-
let
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
209
|
+
let route = {};
|
|
210
|
+
route.name = module.label;
|
|
211
|
+
route.icon = module.icon;
|
|
212
|
+
route.layout = "/admin";
|
|
213
|
+
route.level = 0;
|
|
213
214
|
|
|
214
215
|
if (module.menuBar && module.menuBar.menus.length > 0) {
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
216
|
+
route.collapse = true;
|
|
217
|
+
route.state = module.name + "Collapse";
|
|
218
|
+
route.views = getViews(module.menuBar.menus, 1);
|
|
218
219
|
}
|
|
219
220
|
|
|
220
|
-
|
|
221
|
+
newRoutes.push(route);
|
|
221
222
|
}
|
|
222
223
|
}
|
|
223
224
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
225
|
+
if (props.settings.settingsMenu) {
|
|
226
|
+
newRoute = {};
|
|
227
|
+
newRoute.name = "Settings";
|
|
228
|
+
newRoute.icon = "fa fa-cog";
|
|
229
|
+
newRoute.layout = "/admin";
|
|
230
|
+
newRoute.isParent = true;
|
|
231
|
+
newRoute.collapse = true;
|
|
232
|
+
newRoute.level = 0;
|
|
233
|
+
newRoute.state = "settingsMenuCollapse";
|
|
234
|
+
newRoute.views = getViews(props.settings.settingsMenu.menus, 1);
|
|
235
|
+
newRoutes.push(newRoute);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
setRoutes(newRoutes);
|
|
235
239
|
props.settings.dashboardMenu = createNewMenu.items.length > 0 ? dashboardMenu : null;
|
|
236
240
|
setLoading(false);
|
|
237
241
|
}
|
|
@@ -395,6 +399,7 @@ const BasicBusinessApp = props => {
|
|
|
395
399
|
activeColor: "agility",
|
|
396
400
|
secondaryThemeColor: secondaryThemeColor,
|
|
397
401
|
activeRouteMenu: 'Dashboard',
|
|
402
|
+
className: "sidebar",
|
|
398
403
|
dashboardLauncher: () => {
|
|
399
404
|
launcDashboard();
|
|
400
405
|
},
|
|
@@ -425,9 +430,9 @@ const BasicBusinessApp = props => {
|
|
|
425
430
|
}))), " "));
|
|
426
431
|
};
|
|
427
432
|
|
|
428
|
-
|
|
433
|
+
BasicBusinessAppDashboard.propTypes = {
|
|
429
434
|
children: _propTypes.default.element,
|
|
430
435
|
width: _propTypes.default.number
|
|
431
436
|
};
|
|
432
|
-
var _default =
|
|
437
|
+
var _default = BasicBusinessAppDashboard;
|
|
433
438
|
exports.default = _default;
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
|
|
12
|
+
var _Utils = _interopRequireDefault(require("../../Utils"));
|
|
13
|
+
|
|
14
|
+
var _PortalNavbar = _interopRequireDefault(require("../navbars/PortalNavbar"));
|
|
15
|
+
|
|
16
|
+
require("./BusinessPortalAppDashboard.css");
|
|
17
|
+
|
|
18
|
+
var _Workspace = _interopRequireDefault(require("./components/portal/Workspace"));
|
|
19
|
+
|
|
20
|
+
var _Observable = _interopRequireDefault(require("../../event/Observable"));
|
|
21
|
+
|
|
22
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
|
+
|
|
24
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
25
|
+
|
|
26
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
27
|
+
|
|
28
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
29
|
+
|
|
30
|
+
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); }
|
|
31
|
+
|
|
32
|
+
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; }
|
|
33
|
+
|
|
34
|
+
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; }
|
|
35
|
+
|
|
36
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
37
|
+
|
|
38
|
+
let ps;
|
|
39
|
+
|
|
40
|
+
const BusinessPortalAppDashboard = /*#__PURE__*/_react.default.memo(props => {
|
|
41
|
+
const _React$useState = _react.default.useState(true),
|
|
42
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
43
|
+
loading = _React$useState2[0],
|
|
44
|
+
setLoading = _React$useState2[1];
|
|
45
|
+
|
|
46
|
+
const _React$useState3 = _react.default.useState([]),
|
|
47
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
48
|
+
routes = _React$useState4[0],
|
|
49
|
+
setRoutes = _React$useState4[1];
|
|
50
|
+
|
|
51
|
+
const _React$useState5 = _react.default.useState(null),
|
|
52
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
53
|
+
currentModuleMenu = _React$useState6[0],
|
|
54
|
+
setCurrentModuleMenu = _React$useState6[1];
|
|
55
|
+
|
|
56
|
+
const _React$useState7 = _react.default.useState("data:image/png;base64," + props.logo),
|
|
57
|
+
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
58
|
+
logo = _React$useState8[0],
|
|
59
|
+
setLogo = _React$useState8[1];
|
|
60
|
+
|
|
61
|
+
const getItems = (items, level) => {
|
|
62
|
+
let newItems = [];
|
|
63
|
+
|
|
64
|
+
for (let i = 0; i < items.length; i++) {
|
|
65
|
+
_Observable.default.clearComponentEventListeners(items[i].id);
|
|
66
|
+
|
|
67
|
+
let createItem = {};
|
|
68
|
+
createItem.name = items[i].attributes.label;
|
|
69
|
+
createItem.mini = "SS";
|
|
70
|
+
createItem.layout = "/admin";
|
|
71
|
+
createItem.item = items[i];
|
|
72
|
+
createItem.level = level;
|
|
73
|
+
|
|
74
|
+
if (!_Utils.default.isNull(items[i].subMenu)) {
|
|
75
|
+
createItem.collapse = true;
|
|
76
|
+
createItem.state = items[i].id + "SubMenuCollapse";
|
|
77
|
+
createItem.views = getItems(items[i].subMenu.items, level + 1);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
newItems.push(createItem);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
return newItems;
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
const getViews = (menus, level) => {
|
|
87
|
+
let newViews = [];
|
|
88
|
+
|
|
89
|
+
for (let i = 0; i < menus.length; i++) {
|
|
90
|
+
_Observable.default.clearComponentEventListeners(menus[i].id);
|
|
91
|
+
|
|
92
|
+
let createView = {};
|
|
93
|
+
createView.name = menus[i].attributes.label;
|
|
94
|
+
createView.mini = "SS";
|
|
95
|
+
createView.layout = "/admin";
|
|
96
|
+
createView.level = level;
|
|
97
|
+
createView.item = menus[i];
|
|
98
|
+
|
|
99
|
+
if (menus[i].items && menus[i].items.length > 0) {
|
|
100
|
+
createView.collapse = true;
|
|
101
|
+
createView.state = menus[i].id + "Collapse";
|
|
102
|
+
createView.views = getItems(menus[i].items, level + 1);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
newViews.push(createView);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
return newViews;
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
_react.default.useEffect(() => {
|
|
112
|
+
if (!_Utils.default.isNull(currentModuleMenu) && !_Utils.default.isNull(props.settings.menu) && !_Utils.default.isNull(props.settings.menu.menus)) {
|
|
113
|
+
let newRoutes = [];
|
|
114
|
+
let currentMenu = null;
|
|
115
|
+
|
|
116
|
+
var _iterator = _createForOfIteratorHelper(props.settings.menu.menus),
|
|
117
|
+
_step;
|
|
118
|
+
|
|
119
|
+
try {
|
|
120
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
121
|
+
const menu = _step.value;
|
|
122
|
+
|
|
123
|
+
if (menu.id === currentModuleMenu) {
|
|
124
|
+
currentMenu = menu;
|
|
125
|
+
break;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
} catch (err) {
|
|
129
|
+
_iterator.e(err);
|
|
130
|
+
} finally {
|
|
131
|
+
_iterator.f();
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
if (currentMenu != null) {
|
|
135
|
+
var _iterator2 = _createForOfIteratorHelper(currentMenu.items),
|
|
136
|
+
_step2;
|
|
137
|
+
|
|
138
|
+
try {
|
|
139
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
140
|
+
const item = _step2.value;
|
|
141
|
+
|
|
142
|
+
_Observable.default.clearComponentEventListeners(item.id);
|
|
143
|
+
|
|
144
|
+
let newRoute = {};
|
|
145
|
+
newRoute.name = item.attributes.label;
|
|
146
|
+
|
|
147
|
+
if (!_Utils.default.isNull(item.icon)) {
|
|
148
|
+
newRoute.icon = item.icon;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
newRoute.layout = "/admin";
|
|
152
|
+
newRoute.level = 0;
|
|
153
|
+
newRoute.isParent = false;
|
|
154
|
+
newRoute.item = item;
|
|
155
|
+
newRoutes.push(newRoute);
|
|
156
|
+
|
|
157
|
+
if (!_Utils.default.isNull(item.items) && item.items.length > 0) {
|
|
158
|
+
newRoute.collapse = false;
|
|
159
|
+
newRoute.state = item.name + "Collapse";
|
|
160
|
+
newRoute.views = getViews(item.items, 0);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
} catch (err) {
|
|
164
|
+
_iterator2.e(err);
|
|
165
|
+
} finally {
|
|
166
|
+
_iterator2.f();
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
setRoutes(newRoutes);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
setLoading(false);
|
|
174
|
+
}, [currentModuleMenu]);
|
|
175
|
+
|
|
176
|
+
_react.default.useEffect(() => {
|
|
177
|
+
document.body.classList.add("white-content");
|
|
178
|
+
|
|
179
|
+
if (navigator.platform.indexOf("Win") > -1) {
|
|
180
|
+
ps.destroy();
|
|
181
|
+
document.documentElement.className.add("perfect-scrollbar-off");
|
|
182
|
+
document.documentElement.classList.remove("perfect-scrollbar-on");
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
window.removeEventListener("scroll", showNavbarButton); //dispatch(actionCreators.setSecondaryThemeColor(props.settings.systemProfileDto.secondCorporateBrandColor));
|
|
186
|
+
|
|
187
|
+
if (!_Utils.default.isNull(props.settings)) {
|
|
188
|
+
setCurrentModuleMenu("homeMenu");
|
|
189
|
+
}
|
|
190
|
+
}, [props.settings]);
|
|
191
|
+
|
|
192
|
+
const handleMiniClick = () => {};
|
|
193
|
+
|
|
194
|
+
const showNavbarButton = () => {
|
|
195
|
+
if (document.documentElement.scrollTop > 50 || document.scrollingElement.scrollTop > 50) {//setOpacity(1);
|
|
196
|
+
} else if (document.documentElement.scrollTop <= 50 || document.scrollingElement.scrollTop <= 50) {//setOpacity(0);
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
return loading ? /*#__PURE__*/_react.default.createElement("div", null, "Loading...") : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
201
|
+
className: "wrapper",
|
|
202
|
+
style: {
|
|
203
|
+
height: '100%',
|
|
204
|
+
overflow: 'hidden'
|
|
205
|
+
}
|
|
206
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
207
|
+
className: "row-*-*"
|
|
208
|
+
}, /*#__PURE__*/_react.default.createElement(_PortalNavbar.default, {
|
|
209
|
+
logoutCallBack: props.logoutCallBack,
|
|
210
|
+
appLogoPath: props.appLogoPath,
|
|
211
|
+
avatar: props.avatar,
|
|
212
|
+
moduleMenus: props.settings.menu.menus,
|
|
213
|
+
moduleChangeHandler: selected => {
|
|
214
|
+
setCurrentModuleMenu(selected);
|
|
215
|
+
},
|
|
216
|
+
logo: {
|
|
217
|
+
outterLink: "",
|
|
218
|
+
text: "",
|
|
219
|
+
imgSrc: logo
|
|
220
|
+
}
|
|
221
|
+
}), " "), /*#__PURE__*/_react.default.createElement("div", {
|
|
222
|
+
className: "portal-dashboard-content"
|
|
223
|
+
}, /*#__PURE__*/_react.default.createElement(_Workspace.default, {
|
|
224
|
+
routes: routes,
|
|
225
|
+
heading: "Welcome, " + props.settings.userFirstName,
|
|
226
|
+
activeRouteMenu: 'My Work Items',
|
|
227
|
+
secondaryColor: props.settings.secondaryColor
|
|
228
|
+
}))));
|
|
229
|
+
});
|
|
230
|
+
|
|
231
|
+
BusinessPortalAppDashboard.propTypes = {
|
|
232
|
+
children: _propTypes.default.element,
|
|
233
|
+
width: _propTypes.default.number
|
|
234
|
+
};
|
|
235
|
+
var _default = BusinessPortalAppDashboard;
|
|
236
|
+
exports.default = _default;
|
|
@@ -13,6 +13,8 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
13
13
|
|
|
14
14
|
var _perfectScrollbar = _interopRequireDefault(require("perfect-scrollbar"));
|
|
15
15
|
|
|
16
|
+
var _Utils = _interopRequireDefault(require("../../../../../Utils"));
|
|
17
|
+
|
|
16
18
|
var _reactstrap = require("reactstrap");
|
|
17
19
|
|
|
18
20
|
var _MenuLink = _interopRequireDefault(require("../../../../menu/MenuLink"));
|
|
@@ -72,7 +74,7 @@ class Sidebar extends _react.default.Component {
|
|
|
72
74
|
return null;
|
|
73
75
|
}
|
|
74
76
|
|
|
75
|
-
if ((prop.collapse || prop.isParent) && prop.name !== 'Dashboard') {
|
|
77
|
+
if ((prop.collapse || prop.isParent) && prop.name !== 'Dashboard' && prop.name !== 'My Work Items') {
|
|
76
78
|
var st = {};
|
|
77
79
|
st[prop["state"]] = !this.state[prop.state];
|
|
78
80
|
return /*#__PURE__*/_react.default.createElement("li", {
|
|
@@ -125,11 +127,11 @@ class Sidebar extends _react.default.Component {
|
|
|
125
127
|
} : {}
|
|
126
128
|
}, /*#__PURE__*/_react.default.createElement(_MenuLink.default, {
|
|
127
129
|
config: prop.item,
|
|
128
|
-
ref: /*#__PURE__*/_react.default.createRef(),
|
|
129
130
|
clickCallback: prop.name === 'Dashboard' ? this.props.dashboardLauncher : null,
|
|
131
|
+
autoClick: prop.name === 'My Work Items' || prop.item && prop.item.defaultItem,
|
|
130
132
|
viewId: "menuBar",
|
|
131
133
|
icon: prop.icon,
|
|
132
|
-
iconColor: prop.name === 'Dashboard' && this.activeRoute(prop.name) ? secondaryThemeColor : null,
|
|
134
|
+
iconColor: (prop.name === 'Dashboard' || prop.name === 'My Work Items') && this.activeRoute(prop.name) ? secondaryThemeColor : null,
|
|
133
135
|
name: prop.name,
|
|
134
136
|
level: prop.level,
|
|
135
137
|
color: this.activeRoute(prop.name) ? secondaryThemeColor : null
|
|
@@ -142,9 +144,7 @@ class Sidebar extends _react.default.Component {
|
|
|
142
144
|
return this.props.activeRouteMenu === routeName;
|
|
143
145
|
});
|
|
144
146
|
|
|
145
|
-
this.state = this.getCollapseStates(props.routes);
|
|
146
|
-
|
|
147
|
-
_DashboardStore.actionCreators.setActiveRoute('Dashboard');
|
|
147
|
+
this.state = this.getCollapseStates(props.routes); //actionCreators.setActiveRoute(Utils.isNull(props.activeRouteMenu) ? 'Dashboard' : props.activeRouteMenu);
|
|
148
148
|
} // this creates the intial state of this component based on the collapse routes
|
|
149
149
|
// that it gets through this.props.routes
|
|
150
150
|
|
|
@@ -190,7 +190,7 @@ class Sidebar extends _react.default.Component {
|
|
|
190
190
|
let logoImg = null;
|
|
191
191
|
let logoText = null;
|
|
192
192
|
|
|
193
|
-
if (logo
|
|
193
|
+
if (!_Utils.default.isNull(logo)) {
|
|
194
194
|
logoImg = /*#__PURE__*/_react.default.createElement("a", {
|
|
195
195
|
href: logo.outterLink,
|
|
196
196
|
className: "logo-normal",
|
|
@@ -213,7 +213,7 @@ class Sidebar extends _react.default.Component {
|
|
|
213
213
|
}
|
|
214
214
|
|
|
215
215
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
216
|
-
className:
|
|
216
|
+
className: this.props.className,
|
|
217
217
|
data: activeColor,
|
|
218
218
|
style: {
|
|
219
219
|
overflow: 'auto',
|
|
@@ -237,7 +237,17 @@ class Sidebar extends _react.default.Component {
|
|
|
237
237
|
alignItems: 'center',
|
|
238
238
|
height: '100%'
|
|
239
239
|
}
|
|
240
|
-
}, " ", logoImg, " ") : null, " "
|
|
240
|
+
}, " ", logoImg, " ") : null, " ", !_Utils.default.isNull(this.props.heading) ? /*#__PURE__*/_react.default.createElement("div", {
|
|
241
|
+
className: "logo",
|
|
242
|
+
style: {
|
|
243
|
+
display: 'flex',
|
|
244
|
+
justifyContent: 'center',
|
|
245
|
+
alignItems: 'center',
|
|
246
|
+
height: '100%',
|
|
247
|
+
fontSize: '20px',
|
|
248
|
+
fontWeight: 600
|
|
249
|
+
}
|
|
250
|
+
}, this.props.heading) : null)), /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", {
|
|
241
251
|
style: {
|
|
242
252
|
height: '70%'
|
|
243
253
|
},
|
|
@@ -258,7 +268,7 @@ class Sidebar extends _react.default.Component {
|
|
|
258
268
|
justifyContent: 'center',
|
|
259
269
|
height: '92px'
|
|
260
270
|
}
|
|
261
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
271
|
+
}, !_Utils.default.isNull(this.props.appLogoPath) ? /*#__PURE__*/_react.default.createElement("div", {
|
|
262
272
|
style: {
|
|
263
273
|
display: 'flex',
|
|
264
274
|
justifyContent: 'center',
|
|
@@ -269,11 +279,12 @@ class Sidebar extends _react.default.Component {
|
|
|
269
279
|
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
270
280
|
src: this.props.appLogoPath,
|
|
271
281
|
alt: "..."
|
|
272
|
-
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
282
|
+
}))) : null, /*#__PURE__*/_react.default.createElement("div", {
|
|
273
283
|
style: {
|
|
274
284
|
display: 'flex',
|
|
275
285
|
justifyContent: 'center',
|
|
276
|
-
alignItems: 'center'
|
|
286
|
+
alignItems: 'center',
|
|
287
|
+
marginTop: '8px'
|
|
277
288
|
}
|
|
278
289
|
}, "Copyrights \xA9 ", 1900 + new Date().getYear(), " ", " ")))))));
|
|
279
290
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
const Timeline = props => {
|
|
13
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, "I am deeee timeline");
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
var _default = Timeline;
|
|
17
|
+
exports.default = _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
.workspace-container {
|
|
2
|
+
height: 100vh;
|
|
3
|
+
width: 100vw;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.workspace-left {
|
|
7
|
+
width: 32%;
|
|
8
|
+
/*padding-right: 6px*/;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.workspace-right {
|
|
12
|
+
width: 45%;
|
|
13
|
+
margin: 16px;
|
|
14
|
+
border: 1px solid #e1e1e1;
|
|
15
|
+
height: calc(100vh - 96px) !important;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.sidebar-customizer {
|
|
19
|
+
position: relative !important;
|
|
20
|
+
margin-top: 16px !important;
|
|
21
|
+
height: auto !important;
|
|
22
|
+
max-height: calc(100vh - 96px) !important;
|
|
23
|
+
box-shadow: none !important;
|
|
24
|
+
border: 1px solid #e1e1e1;
|
|
25
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
require("./Workspace.css");
|
|
11
|
+
|
|
12
|
+
var _Sidebar = _interopRequireDefault(require("./../../components/blackDashboard/sidebar/Sidebar"));
|
|
13
|
+
|
|
14
|
+
var _ViewPort = _interopRequireDefault(require("../../../layout/ViewPort"));
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
19
|
+
|
|
20
|
+
const Workspace = props => {
|
|
21
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
22
|
+
className: "row workspace-container"
|
|
23
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
24
|
+
className: "col-*-* workspace-left"
|
|
25
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
26
|
+
style: {
|
|
27
|
+
float: 'right'
|
|
28
|
+
}
|
|
29
|
+
}, /*#__PURE__*/_react.default.createElement(_Sidebar.default, _extends({}, props, {
|
|
30
|
+
routes: props.routes,
|
|
31
|
+
activeColor: "agility",
|
|
32
|
+
className: "sidebar sidebar-customizer",
|
|
33
|
+
secondaryThemeColor: props.secondaryColor,
|
|
34
|
+
activeRouteMenu: props.activeRouteMenu,
|
|
35
|
+
dashboardLauncher: () => {},
|
|
36
|
+
heading: props.heading,
|
|
37
|
+
closeSidebar: () => {}
|
|
38
|
+
})))), /*#__PURE__*/_react.default.createElement("div", {
|
|
39
|
+
className: "col-*-* workspace-right"
|
|
40
|
+
}, /*#__PURE__*/_react.default.createElement(_ViewPort.default, {
|
|
41
|
+
settings: props.settings,
|
|
42
|
+
defaultView: "",
|
|
43
|
+
height: 'inherit'
|
|
44
|
+
}))));
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
var _default = Workspace;
|
|
48
|
+
exports.default = _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
|
|
2
|
+
/* Smartphones (landscape); */
|
|
3
|
+
@media only screen and (min-device-width : 361px) and (max-device-width : 480px) {
|
|
4
|
+
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
/* Smartphones (portrait); */
|
|
8
|
+
@media only screen and (min-device-width : 280px) and (max-device-width : 360px) {
|
|
9
|
+
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/* iPads (portrait and landscape); */
|
|
13
|
+
@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) {
|
|
14
|
+
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/* iPad 3 */
|
|
18
|
+
@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : landscape) and (-webkit-min-device-pixel-ratio : 2) {
|
|
19
|
+
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : portrait) and (-webkit-min-device-pixel-ratio : 2) {
|
|
23
|
+
|
|
24
|
+
}
|
|
25
|
+
|