tenjin-ui-kit 0.1.0-dev.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.md +13 -0
- package/assets/images/MicrosoftTeams-image (1).png +0 -0
- package/assets/images/tenjin-4.0-logo.png +0 -0
- package/common/hooks/apiHooks.js +223 -0
- package/common/hooks/newApiHook.js +270 -0
- package/common/utils/security/index.js +11 -0
- package/common/utils/security/securityConfig.js +8 -0
- package/components/Canvas.js +254 -0
- package/components/DragBox/index.js +45 -0
- package/components/InputWithChip/index.js +187 -0
- package/components/RightContext/index.css +20 -0
- package/components/RightContext/index.js +86 -0
- package/components/WorkFlow.js +47 -0
- package/components/WorkFlowBuilder.js +130 -0
- package/components/alert/Style.js +23 -0
- package/components/alert/index.js +69 -0
- package/components/attachment/index.js +138 -0
- package/components/authenticationProvider/AuthError.js +24 -0
- package/components/authenticationProvider/AuthLoader.js +21 -0
- package/components/authenticationProvider/index.js +166 -0
- package/components/avatar/index.js +95 -0
- package/components/avatar/styles.js +94 -0
- package/components/breadCrumbs/index.js +172 -0
- package/components/breadCrumbs/style.js +11 -0
- package/components/browsingTestCaseLayout/DetailsViewLayout/DetailsViewContent/index.js +19 -0
- package/components/browsingTestCaseLayout/DetailsViewLayout/DetailsViewContent/style.js +15 -0
- package/components/browsingTestCaseLayout/DetailsViewLayout/DetailsViewHeader/index.js +36 -0
- package/components/browsingTestCaseLayout/TreeViewLayout/TreeViewContent/Index.js +26 -0
- package/components/browsingTestCaseLayout/TreeViewLayout/TreeViewHeader/Index.js +48 -0
- package/components/browsingTestCaseLayout/TreeViewLayout/TreeViewHeader/style.js +26 -0
- package/components/browsingTestCaseLayout/index.js +187 -0
- package/components/browsingTestCaseLayout/style.css +82 -0
- package/components/button/index.js +131 -0
- package/components/chatBotModal/index.js +200 -0
- package/components/checkBox/index.js +30 -0
- package/components/divider/index.js +41 -0
- package/components/editableField/index.js +135 -0
- package/components/error/index.js +56 -0
- package/components/errorBoundary/Error.jpg +0 -0
- package/components/errorBoundary/index.js +160 -0
- package/components/fileUploader/index.js +156 -0
- package/components/fileUploader/style.js +60 -0
- package/components/filter/ValueSelector.js +306 -0
- package/components/filter/index.js +225 -0
- package/components/iconButton/index.js +34 -0
- package/components/iconButton/style.js +1 -0
- package/components/input/index.js +173 -0
- package/components/layout/index.js +98 -0
- package/components/layout/main/index.js +27 -0
- package/components/layout/main/style.js +22 -0
- package/components/layout/pageContent/index.js +31 -0
- package/components/layout/sidebar/FlatMenu.js +64 -0
- package/components/layout/sidebar/GroupedIconMenu.js +246 -0
- package/components/layout/sidebar/GroupedMenu.js +67 -0
- package/components/layout/sidebar/ProjectMenu.js +230 -0
- package/components/layout/sidebar/index.js +91 -0
- package/components/layout/sidebar/style.js +154 -0
- package/components/layout/topBar/ProjectTopbar.js +337 -0
- package/components/layout/topBar/UserAvatar.js +126 -0
- package/components/layout/topBar/index.js +132 -0
- package/components/loader/index.js +28 -0
- package/components/menu/index.js +80 -0
- package/components/modal/Modal.js +56 -0
- package/components/modal/index.js +91 -0
- package/components/modal/style.js +68 -0
- package/components/optionMenu/index.js +112 -0
- package/components/pagination/index.js +129 -0
- package/components/pagination/style.js +36 -0
- package/components/paginationUpdated/index.js +75 -0
- package/components/paper/index.js +44 -0
- package/components/paper/style.js +34 -0
- package/components/reactSelect/index.js +212 -0
- package/components/reactSelect/style.js +163 -0
- package/components/richTextEditor/index.js +83 -0
- package/components/richTextEditor/style.js +1 -0
- package/components/select/GroupedSelect.js +183 -0
- package/components/select/SimpleSelect.js +238 -0
- package/components/select/index.js +217 -0
- package/components/simpleSelect/index.js +122 -0
- package/components/sort/index.js +141 -0
- package/components/switch/index.js +72 -0
- package/components/switch/style.js +42 -0
- package/components/switch/switch.js +110 -0
- package/components/table/ReactTable.js +118 -0
- package/components/table/SimpleTable.js +136 -0
- package/components/table/index.js +256 -0
- package/components/text/index.js +64 -0
- package/components/timeStamp/index.js +44 -0
- package/components/timeStamp/style.js +23 -0
- package/components/topBar/index.js +176 -0
- package/components/tree/index.js +313 -0
- package/components/tree/style.js +32 -0
- package/components/valuePicker/ValueSelector.js +273 -0
- package/components/valuePicker/index.js +133 -0
- package/components/wrapperLayout/layout/index.js +30 -0
- package/components/wrapperLayout/layout/style.js +1 -0
- package/components/wrapperLayout/main/index.js +22 -0
- package/components/wrapperLayout/main/pageContainer/index.js +28 -0
- package/components/wrapperLayout/main/sideBar/index.js +262 -0
- package/components/wrapperLayout/main/sideBar/style.js +196 -0
- package/components/wrapperLayout/topBar/UserAvatar.js +17 -0
- package/components/wrapperLayout/topBar/avatar.js +57 -0
- package/components/wrapperLayout/topBar/index.js +182 -0
- package/components/wrapperLayout/topBar/menuIcon.js +14 -0
- package/components/wrapperLayout/topBar/style.js +77 -0
- package/http/index.js +226 -0
- package/index.js +354 -0
- package/package.json +119 -0
- package/templates/listPage/index.js +301 -0
- package/themes/default.js +253 -0
- package/themes/defaultSmall.js +86 -0
- package/themes/responsiveTheme.js +250 -0
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _styles = require("@mui/styles");
|
|
8
|
+
var _default2 = _interopRequireDefault(require("../../../../themes/default"));
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
11
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
12
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
13
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
14
|
+
var drawerWidth = 248;
|
|
15
|
+
var useStyles = (0, _styles.makeStyles)(function () {
|
|
16
|
+
return {
|
|
17
|
+
drawerClose: _defineProperty({
|
|
18
|
+
transition: _default2.default.transitions.create('width', {
|
|
19
|
+
easing: _default2.default.transitions.easing.sharp,
|
|
20
|
+
duration: _default2.default.transitions.duration.leavingScreen
|
|
21
|
+
}),
|
|
22
|
+
overflowX: 'hidden',
|
|
23
|
+
width: _default2.default.spacing(7) + '1px'
|
|
24
|
+
}, _default2.default.breakpoints.up('sm'), {
|
|
25
|
+
width: _default2.default.spacing(8.75) + '2px'
|
|
26
|
+
}),
|
|
27
|
+
drawerOpen: {
|
|
28
|
+
width: drawerWidth,
|
|
29
|
+
transition: _default2.default.transitions.create('width', {
|
|
30
|
+
easing: _default2.default.transitions.easing.sharp,
|
|
31
|
+
duration: _default2.default.transitions.duration.enteringScreen
|
|
32
|
+
})
|
|
33
|
+
},
|
|
34
|
+
drawer: {
|
|
35
|
+
flexShrink: 0,
|
|
36
|
+
whiteSpace: 'nowrap',
|
|
37
|
+
boxShadow: '0px 3px 30px #667CBC30',
|
|
38
|
+
'& .MuiPaper-root': {
|
|
39
|
+
borderRadius: '.3rem',
|
|
40
|
+
position: 'relative',
|
|
41
|
+
display: 'flex',
|
|
42
|
+
flexFlow: 'column'
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
toolbar: {
|
|
46
|
+
display: 'flex',
|
|
47
|
+
justifyContent: 'center',
|
|
48
|
+
flexDirection: 'column',
|
|
49
|
+
height: '100%'
|
|
50
|
+
},
|
|
51
|
+
navigationArrow: {
|
|
52
|
+
transition: '.5s'
|
|
53
|
+
},
|
|
54
|
+
rightArrow: {
|
|
55
|
+
transform: 'rotate(-180deg)'
|
|
56
|
+
},
|
|
57
|
+
list: {
|
|
58
|
+
margin: _default2.default.spacing(2.5, 0.8),
|
|
59
|
+
overflow: 'hidden'
|
|
60
|
+
},
|
|
61
|
+
listItem: {
|
|
62
|
+
display: 'flex',
|
|
63
|
+
textDecoration: 'none',
|
|
64
|
+
transition: '.3s',
|
|
65
|
+
color: _default2.default.palette.text.main,
|
|
66
|
+
alignItems: 'center',
|
|
67
|
+
borderRadius: '.3rem',
|
|
68
|
+
marginBottom: _default2.default.spacing(2),
|
|
69
|
+
'& .MuiListItemIcon-root': {
|
|
70
|
+
marginLeft: _default2.default.spacing(0.5),
|
|
71
|
+
minHeight: '30px',
|
|
72
|
+
minWidth: '0px',
|
|
73
|
+
display: 'flex',
|
|
74
|
+
alignItems: 'center',
|
|
75
|
+
justifyContent: 'center'
|
|
76
|
+
},
|
|
77
|
+
'& .MuiListItemIcon-root .icon': {
|
|
78
|
+
transition: '.5s',
|
|
79
|
+
color: _default2.default.palette.primary.main,
|
|
80
|
+
fontSize: "1rem"
|
|
81
|
+
},
|
|
82
|
+
'& .MuiTypography-root': {
|
|
83
|
+
fontWeight: 600,
|
|
84
|
+
fontSize: '1vw',
|
|
85
|
+
// fontFamily: theme.typography.fontFamily,
|
|
86
|
+
marginLeft: '1rem'
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
listItemActive: {
|
|
90
|
+
background: 'linear-gradient(180deg, rgba(97,94,173,1) 29%, rgba(71,66,156,1) 100%)',
|
|
91
|
+
color: 'white',
|
|
92
|
+
width: '100%',
|
|
93
|
+
'& .MuiListItemIcon-root .icon': {
|
|
94
|
+
color: 'white'
|
|
95
|
+
},
|
|
96
|
+
'& .MuiListItemIcon-root': {
|
|
97
|
+
color: 'white'
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
sideBarIcon: {
|
|
101
|
+
margin: 'auto .8rem .8rem .8rem',
|
|
102
|
+
width: 'calc(100% - 1.4rem)',
|
|
103
|
+
backgroundColor: '#EEF3FC',
|
|
104
|
+
borderRadius: '7px !important',
|
|
105
|
+
display: 'flex',
|
|
106
|
+
justifyContent: 'center',
|
|
107
|
+
alignItems: 'center'
|
|
108
|
+
},
|
|
109
|
+
sidebarMenuContainer: {
|
|
110
|
+
flexGrow: 1
|
|
111
|
+
},
|
|
112
|
+
scrollableList: {
|
|
113
|
+
height: '100%',
|
|
114
|
+
maxHeight: '100%',
|
|
115
|
+
overflowY: 'auto',
|
|
116
|
+
padding: '0.5rem 0.5rem 0.5rem 0.6rem'
|
|
117
|
+
},
|
|
118
|
+
tooltip: {
|
|
119
|
+
fontSize: _default2.default.typography.fontSize
|
|
120
|
+
},
|
|
121
|
+
wrapper: {
|
|
122
|
+
backgroundColor: '#fff !important',
|
|
123
|
+
// margin: '0.5rem !important',
|
|
124
|
+
marginRight: '0.5rem !important',
|
|
125
|
+
height: 'calc(100vh - 76.5px) !important',
|
|
126
|
+
overflowY: 'auto !important',
|
|
127
|
+
borderRadius: '7px !important',
|
|
128
|
+
width: '304px !important',
|
|
129
|
+
padding: '8px !important',
|
|
130
|
+
minWidth: '304px !important'
|
|
131
|
+
},
|
|
132
|
+
wrapper___webkit_scrollbar: {
|
|
133
|
+
width: '1px',
|
|
134
|
+
height: '1px !important'
|
|
135
|
+
},
|
|
136
|
+
wrapper___webkit_scrollbar_thumb: {
|
|
137
|
+
background: '#c5c5c5'
|
|
138
|
+
},
|
|
139
|
+
headstyle: {
|
|
140
|
+
display: 'flex !important',
|
|
141
|
+
flexDirection: 'column !important',
|
|
142
|
+
paddingLeft: '0.4rem'
|
|
143
|
+
},
|
|
144
|
+
menustyle: {
|
|
145
|
+
color: '#d6d9e0',
|
|
146
|
+
fontSize: '12px',
|
|
147
|
+
fontFamily: '"Segoe UI"',
|
|
148
|
+
textTransform: 'uppercase',
|
|
149
|
+
opacity: '1',
|
|
150
|
+
fontWeight: '600',
|
|
151
|
+
padding: '0.5rem'
|
|
152
|
+
},
|
|
153
|
+
menuItem: {
|
|
154
|
+
color: '#44409a !important',
|
|
155
|
+
opacity: '1 !important',
|
|
156
|
+
fontFamily: '"Segoe UI" !important',
|
|
157
|
+
fontWeight: '600 !important',
|
|
158
|
+
fontSize: '10px !important'
|
|
159
|
+
},
|
|
160
|
+
menuTitle: {
|
|
161
|
+
marginBottom: '0.5rem'
|
|
162
|
+
},
|
|
163
|
+
headTitle: {
|
|
164
|
+
top: '191px',
|
|
165
|
+
left: '36px',
|
|
166
|
+
width: '130px',
|
|
167
|
+
height: '19px',
|
|
168
|
+
// font: 'normal normal 600 14px/19px Segoe UI',
|
|
169
|
+
font: 'normal normal 600 13px/14px Segoe UI',
|
|
170
|
+
letterSpacing: '0px',
|
|
171
|
+
color: '#d6d9e0',
|
|
172
|
+
textAlign: 'left',
|
|
173
|
+
textTransform: 'uppercase',
|
|
174
|
+
opacity: '1'
|
|
175
|
+
},
|
|
176
|
+
menuOptionsTitle: {
|
|
177
|
+
top: '236px',
|
|
178
|
+
left: '36px',
|
|
179
|
+
width: '150px',
|
|
180
|
+
height: '24px',
|
|
181
|
+
font: 'normal normal 600 13px/14px Segoe UI',
|
|
182
|
+
letterSpacing: '0px',
|
|
183
|
+
color: '#44409a',
|
|
184
|
+
textAlign: 'left',
|
|
185
|
+
opacity: '1',
|
|
186
|
+
textTransform: 'none',
|
|
187
|
+
padding: '0.3rem',
|
|
188
|
+
cursor: 'pointer'
|
|
189
|
+
},
|
|
190
|
+
label: {
|
|
191
|
+
fontSize: '0.8rem'
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
});
|
|
195
|
+
var _default = useStyles;
|
|
196
|
+
exports.default = _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
var _text = _interopRequireDefault(require("../../text"));
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
var UserAvatar = function UserAvatar(_ref) {
|
|
12
|
+
var loggedInUser = _ref.loggedInUser;
|
|
13
|
+
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_text.default, null, "UserAvatar"));
|
|
14
|
+
};
|
|
15
|
+
UserAvatar.propTypes = {};
|
|
16
|
+
var _default = UserAvatar;
|
|
17
|
+
exports.default = _default;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = Avatar;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _material = require("@mui/material");
|
|
9
|
+
var _Stack = _interopRequireDefault(require("@mui/material/Stack"));
|
|
10
|
+
var _style = _interopRequireDefault(require("./style"));
|
|
11
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
14
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && 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; }
|
|
15
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
16
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
17
|
+
function stringToColor(string) {
|
|
18
|
+
var hash = 0;
|
|
19
|
+
var i;
|
|
20
|
+
for (i = 0; i < string.length; i += 1) {
|
|
21
|
+
hash = string.charCodeAt(i) + ((hash << 5) - hash);
|
|
22
|
+
}
|
|
23
|
+
var color = "#";
|
|
24
|
+
for (i = 0; i < 3; i += 1) {
|
|
25
|
+
var value = hash >> i * 8 & 0xff;
|
|
26
|
+
color += "00".concat(value.toString(16)).slice(-2);
|
|
27
|
+
}
|
|
28
|
+
return color;
|
|
29
|
+
}
|
|
30
|
+
function stringAvatar(name, height, width) {
|
|
31
|
+
return {
|
|
32
|
+
sx: {
|
|
33
|
+
bgcolor: stringToColor(name),
|
|
34
|
+
height: "".concat(height, "vh"),
|
|
35
|
+
width: "".concat(width, "vw"),
|
|
36
|
+
fontSize: "1.2vw",
|
|
37
|
+
padding: "1.2rem 1.2rem"
|
|
38
|
+
},
|
|
39
|
+
children: "".concat(name.split(" ")[0][0]).concat(name.split(" ")[1][0] === undefined ? "" : "".concat(name.split(" ")[1][0]))
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
function Avatar(props) {
|
|
43
|
+
var _props$loggedInUser, _props$loggedInUser2;
|
|
44
|
+
var name = _typeof(props.loggedInUser) !== "object" ? props.loggedInUser : (_props$loggedInUser = props.loggedInUser) === null || _props$loggedInUser === void 0 ? void 0 : _props$loggedInUser.firstName;
|
|
45
|
+
var lastName = ((_props$loggedInUser2 = props.loggedInUser) === null || _props$loggedInUser2 === void 0 ? void 0 : _props$loggedInUser2.lastName) !== undefined ? props.loggedInUser.lastName : "";
|
|
46
|
+
var classes = (0, _style.default)();
|
|
47
|
+
return /*#__PURE__*/React.createElement(_Stack.default, {
|
|
48
|
+
direction: "row",
|
|
49
|
+
spacing: 2
|
|
50
|
+
}, /*#__PURE__*/React.createElement(_material.Avatar, _extends({
|
|
51
|
+
disableRipple: true
|
|
52
|
+
// variant="rounded"
|
|
53
|
+
,
|
|
54
|
+
className: (0, _clsx.default)(classes.avatar, "avatar", classes[props.size]),
|
|
55
|
+
size: props.size
|
|
56
|
+
}, stringAvatar((name === null || name === void 0 ? void 0 : name.toUpperCase()) + " " + (lastName === null || lastName === void 0 ? void 0 : lastName.toUpperCase()), props.height, props.width))));
|
|
57
|
+
}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _material = require("@mui/material");
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
10
|
+
var _breadCrumbs = _interopRequireDefault(require("../../breadCrumbs"));
|
|
11
|
+
var _avatar = _interopRequireDefault(require("../topBar/avatar"));
|
|
12
|
+
var _propTypes = _interopRequireWildcard(require("prop-types"));
|
|
13
|
+
var _style = _interopRequireDefault(require("./style"));
|
|
14
|
+
var _reactRouterDom = require("react-router-dom");
|
|
15
|
+
var _text = _interopRequireDefault(require("../../text"));
|
|
16
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && 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; }
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
20
|
+
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."); }
|
|
21
|
+
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); }
|
|
22
|
+
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; }
|
|
23
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
24
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
25
|
+
var TopBar = function TopBar(props) {
|
|
26
|
+
var _props$menuDetails, _concatedMenu$clicked, _concatedMenu$clicked2;
|
|
27
|
+
var classes = (0, _style.default)();
|
|
28
|
+
var open = Boolean(props.anchorElUser);
|
|
29
|
+
var _React$useState = _react.default.useState(null),
|
|
30
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
31
|
+
anchorEl = _React$useState2[0],
|
|
32
|
+
setAnchorEl = _React$useState2[1];
|
|
33
|
+
var _React$useState3 = _react.default.useState(null),
|
|
34
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
35
|
+
clickedState = _React$useState4[0],
|
|
36
|
+
setClickedState = _React$useState4[1];
|
|
37
|
+
var handleOpenUserMenu = function handleOpenUserMenu(event) {
|
|
38
|
+
setAnchorEl(event === null || event === void 0 ? void 0 : event.currentTarget);
|
|
39
|
+
};
|
|
40
|
+
var handleCloseUserMenu = function handleCloseUserMenu() {
|
|
41
|
+
setAnchorEl(null);
|
|
42
|
+
};
|
|
43
|
+
var userMenuObject = [{
|
|
44
|
+
name: 'User',
|
|
45
|
+
icon: /*#__PURE__*/_react.default.createElement(_avatar.default, {
|
|
46
|
+
loggedInUser: props.loggedInUser,
|
|
47
|
+
height: "2",
|
|
48
|
+
width: "2"
|
|
49
|
+
}),
|
|
50
|
+
listOfItems: props.userMenu
|
|
51
|
+
}];
|
|
52
|
+
var concatedMenu = (_props$menuDetails = props.menuDetails) === null || _props$menuDetails === void 0 ? void 0 : _props$menuDetails.concat(userMenuObject);
|
|
53
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_material.Box, {
|
|
54
|
+
sx: {
|
|
55
|
+
flexGrow: 1
|
|
56
|
+
}
|
|
57
|
+
}, /*#__PURE__*/_react.default.createElement(_material.AppBar, {
|
|
58
|
+
position: "static",
|
|
59
|
+
className: classes.appBar
|
|
60
|
+
}, /*#__PURE__*/_react.default.createElement(_material.Toolbar, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
61
|
+
className: classes.logoContent
|
|
62
|
+
}, /*#__PURE__*/_react.default.createElement("a", {
|
|
63
|
+
href: "/".concat(props.location)
|
|
64
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
65
|
+
className: classes.appLogo
|
|
66
|
+
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
67
|
+
src: props.logo,
|
|
68
|
+
alt: "app png logo"
|
|
69
|
+
})))), /*#__PURE__*/_react.default.createElement(_material.Divider, {
|
|
70
|
+
orientation: "vertical",
|
|
71
|
+
flexItem: true
|
|
72
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
73
|
+
className: classes.breadCrumbs
|
|
74
|
+
}, /*#__PURE__*/_react.default.createElement(_breadCrumbs.default, {
|
|
75
|
+
crumbInfo: props === null || props === void 0 ? void 0 : props.crumbInfo
|
|
76
|
+
})), concatedMenu && concatedMenu.map(function (menu, key) {
|
|
77
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
78
|
+
style: {
|
|
79
|
+
display: 'flex',
|
|
80
|
+
alignItems: 'center',
|
|
81
|
+
padding: concatedMenu.length - 1 === key ? '0rem 0rem 0rem 1rem' : '0rem 1rem 0rem 0rem'
|
|
82
|
+
}
|
|
83
|
+
}, /*#__PURE__*/_react.default.createElement(_material.Box, null, /*#__PURE__*/_react.default.createElement(_material.Tooltip, {
|
|
84
|
+
title: menu.name
|
|
85
|
+
}, /*#__PURE__*/_react.default.createElement(_material.IconButton, {
|
|
86
|
+
key: key,
|
|
87
|
+
onClick: function onClick(e) {
|
|
88
|
+
handleOpenUserMenu(e);
|
|
89
|
+
setClickedState(key);
|
|
90
|
+
},
|
|
91
|
+
size: "small",
|
|
92
|
+
sx: {
|
|
93
|
+
ml: 2
|
|
94
|
+
}
|
|
95
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
96
|
+
style: {
|
|
97
|
+
fontSize: '2vw',
|
|
98
|
+
display: 'flex',
|
|
99
|
+
alignItems: 'center'
|
|
100
|
+
}
|
|
101
|
+
}, menu.icon))))), concatedMenu.length - 1 !== key && /*#__PURE__*/_react.default.createElement(_material.Divider, {
|
|
102
|
+
orientation: "vertical",
|
|
103
|
+
flexItem: true
|
|
104
|
+
}));
|
|
105
|
+
}), /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_material.Menu, {
|
|
106
|
+
anchorEl: anchorEl,
|
|
107
|
+
id: "basic-menu",
|
|
108
|
+
disableRipple: true,
|
|
109
|
+
open: Boolean(anchorEl),
|
|
110
|
+
onClose: handleCloseUserMenu,
|
|
111
|
+
onClick: handleCloseUserMenu,
|
|
112
|
+
sx: {
|
|
113
|
+
top: 12,
|
|
114
|
+
left: 5
|
|
115
|
+
}
|
|
116
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
117
|
+
style: {
|
|
118
|
+
maxHeight: '40vh',
|
|
119
|
+
//width: 160,
|
|
120
|
+
maxWidth: '100%'
|
|
121
|
+
}
|
|
122
|
+
}, concatedMenu && ((_concatedMenu$clicked = concatedMenu[clickedState]) === null || _concatedMenu$clicked === void 0 ? void 0 : (_concatedMenu$clicked2 = _concatedMenu$clicked.listOfItems) === null || _concatedMenu$clicked2 === void 0 ? void 0 : _concatedMenu$clicked2.map(function (item, index) {
|
|
123
|
+
return /*#__PURE__*/_react.default.createElement(_reactRouterDom.Link, {
|
|
124
|
+
to: item === null || item === void 0 ? void 0 : item.to,
|
|
125
|
+
style: {
|
|
126
|
+
textDecoration: 'none'
|
|
127
|
+
}
|
|
128
|
+
}, /*#__PURE__*/_react.default.createElement(_material.MenuItem, {
|
|
129
|
+
onClick: handleCloseUserMenu,
|
|
130
|
+
key: index,
|
|
131
|
+
style: {
|
|
132
|
+
display: 'flex',
|
|
133
|
+
flexGrow: 1
|
|
134
|
+
}
|
|
135
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
136
|
+
style: {
|
|
137
|
+
display: 'flex',
|
|
138
|
+
flexGrow: 1
|
|
139
|
+
}
|
|
140
|
+
}, item.icon && /*#__PURE__*/_react.default.createElement("div", {
|
|
141
|
+
style: {
|
|
142
|
+
display: 'flex',
|
|
143
|
+
alignItems: 'center',
|
|
144
|
+
paddingRight: '1.5rem',
|
|
145
|
+
fontSize: '1.1rem',
|
|
146
|
+
color: '#44409A'
|
|
147
|
+
}
|
|
148
|
+
}, item.icon), /*#__PURE__*/_react.default.createElement("div", {
|
|
149
|
+
style: {
|
|
150
|
+
display: 'flex',
|
|
151
|
+
flexDirection: 'column'
|
|
152
|
+
}
|
|
153
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
154
|
+
style: {
|
|
155
|
+
fontWeight: 600,
|
|
156
|
+
color: '#000000DE',
|
|
157
|
+
// fontSize: "0.9rem",
|
|
158
|
+
fontSize: '80%'
|
|
159
|
+
}
|
|
160
|
+
}, /*#__PURE__*/_react.default.createElement(_text.default, null, item.name)), /*#__PURE__*/_react.default.createElement("div", {
|
|
161
|
+
style: {
|
|
162
|
+
color: '#000000DE',
|
|
163
|
+
// fontSize: "13px",
|
|
164
|
+
fontSize: '80%'
|
|
165
|
+
}
|
|
166
|
+
}, /*#__PURE__*/_react.default.createElement(_text.default, null, item.description))))));
|
|
167
|
+
})))))))));
|
|
168
|
+
};
|
|
169
|
+
TopBar.propTypes = {
|
|
170
|
+
logo: _propTypes.default.string.isRequired,
|
|
171
|
+
location: _propTypes.default.string.isRequired,
|
|
172
|
+
anchorElUser: _propTypes.default.object.isRequired,
|
|
173
|
+
setAnchorElUser: _propTypes.default.object.isRequired,
|
|
174
|
+
handleOpenUserMenu: _propTypes.default.func,
|
|
175
|
+
handleCloseUserMenu: _propTypes.default.func,
|
|
176
|
+
loggedInUser: _propTypes.default.object.isRequired,
|
|
177
|
+
menuDetails: _propTypes.default.array,
|
|
178
|
+
userMenu: _propTypes.default.array,
|
|
179
|
+
crumbInfo: _propTypes.default.array
|
|
180
|
+
};
|
|
181
|
+
var _default = TopBar;
|
|
182
|
+
exports.default = _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
+
var MenuIcon = function MenuIcon(_ref) {
|
|
10
|
+
var children = _ref.children;
|
|
11
|
+
return /*#__PURE__*/_react.default.createElement("div", null, children);
|
|
12
|
+
};
|
|
13
|
+
var _default = MenuIcon;
|
|
14
|
+
exports.default = _default;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _styles = require("@mui/styles");
|
|
8
|
+
var _default2 = _interopRequireDefault(require("../../../themes/default"));
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
var _default = (0, _styles.makeStyles)(function () {
|
|
11
|
+
return {
|
|
12
|
+
"@global": {
|
|
13
|
+
html: {
|
|
14
|
+
"scroll-behavior": "smooth",
|
|
15
|
+
height: "100vh"
|
|
16
|
+
},
|
|
17
|
+
body: {
|
|
18
|
+
position: "relative",
|
|
19
|
+
margin: 0,
|
|
20
|
+
height: "100vh",
|
|
21
|
+
color: "#000000",
|
|
22
|
+
backgroundColor: "#f4f7fc"
|
|
23
|
+
},
|
|
24
|
+
"*::-webkit-scrollbar": {
|
|
25
|
+
width: "0.2rem"
|
|
26
|
+
},
|
|
27
|
+
"*::-webkit-scrollbar-thumb": {
|
|
28
|
+
backgroundColor: "#636A74",
|
|
29
|
+
borderRadius: "3px",
|
|
30
|
+
opacity: 0.5
|
|
31
|
+
},
|
|
32
|
+
"*::-webkit-scrollbar-track": {
|
|
33
|
+
background: "transparent"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
appBar: {
|
|
37
|
+
position: "relative !important",
|
|
38
|
+
margin: "0rem !important",
|
|
39
|
+
padding: " 0rem !important",
|
|
40
|
+
boxShadow: "-1px 1px 7px 0px rgba(0, 0, 0, 0.2) !important",
|
|
41
|
+
backgroundColor: "white !important"
|
|
42
|
+
},
|
|
43
|
+
logoContent: {
|
|
44
|
+
display: "block !important",
|
|
45
|
+
height: "100% !important",
|
|
46
|
+
width: "6rem !important",
|
|
47
|
+
margin: "auto",
|
|
48
|
+
paddingTop: "1rem"
|
|
49
|
+
},
|
|
50
|
+
topbarMenuLink: {
|
|
51
|
+
textDecoration: "none"
|
|
52
|
+
},
|
|
53
|
+
appLogo: {
|
|
54
|
+
display: "flex",
|
|
55
|
+
width: "6rem !important",
|
|
56
|
+
height: "2rem !important"
|
|
57
|
+
},
|
|
58
|
+
"& .MuiContainer-root": {
|
|
59
|
+
maxWidth: "100%",
|
|
60
|
+
height: "90vh"
|
|
61
|
+
},
|
|
62
|
+
breadCrumbs: {
|
|
63
|
+
display: "flex",
|
|
64
|
+
flexGrow: 1,
|
|
65
|
+
marginLeft: "32px"
|
|
66
|
+
},
|
|
67
|
+
avatar: function avatar(_ref) {
|
|
68
|
+
var avatarColor = _ref.avatarColor;
|
|
69
|
+
return {
|
|
70
|
+
backgroundColor: "".concat(avatarColor),
|
|
71
|
+
fontWeight: 400,
|
|
72
|
+
letterSpacing: "0px"
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
});
|
|
77
|
+
exports.default = _default;
|