tenjin-ui-kit 0.3.72-dev → 0.3.72-dev-1
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/common/hooks/apiHooks.js +182 -114
- package/common/hooks/newApiHook.js +225 -143
- package/common/utils/security/index.js +2 -2
- package/common/utils/security/securityConfig.js +2 -1
- package/components/Canvas.js +88 -164
- package/components/DragBox/index.js +26 -21
- package/components/InputWithChip/index.js +57 -164
- package/components/RightContext/index.js +28 -19
- package/components/WorkFlow.js +23 -18
- package/components/WorkFlowBuilder.js +48 -33
- package/components/alert/Style.js +14 -11
- package/components/alert/index.js +12 -10
- package/components/attachment/index.js +28 -21
- package/components/authenticationProvider/AuthError.js +4 -3
- package/components/authenticationProvider/AuthLoader.js +4 -3
- package/components/authenticationProvider/index.js +116 -60
- package/components/avatar/index.js +14 -13
- package/components/avatar/styles.js +77 -74
- package/components/breadCrumbs/index.js +53 -42
- package/components/breadCrumbs/style.js +4 -1
- package/components/browsingTestCaseLayout/DetailsViewLayout/DetailsViewContent/index.js +6 -5
- package/components/browsingTestCaseLayout/DetailsViewLayout/DetailsViewContent/style.js +8 -5
- package/components/browsingTestCaseLayout/DetailsViewLayout/DetailsViewHeader/index.js +5 -4
- package/components/browsingTestCaseLayout/TreeViewLayout/TreeViewContent/Index.js +5 -4
- package/components/browsingTestCaseLayout/TreeViewLayout/TreeViewHeader/Index.js +6 -5
- package/components/browsingTestCaseLayout/TreeViewLayout/TreeViewHeader/style.js +19 -16
- package/components/browsingTestCaseLayout/index.js +30 -25
- package/components/button/index.js +43 -36
- package/components/chatBotModal/index.js +45 -36
- package/components/checkBox/index.js +9 -8
- package/components/combobox/index.js +72 -51
- package/components/divider/index.js +18 -14
- package/components/editableField/index.js +28 -19
- package/components/error/index.js +12 -6
- package/components/errorBoundary/index.js +94 -74
- package/components/fileUploader/index.js +35 -30
- package/components/fileUploader/style.js +49 -46
- package/components/filter/ValueSelector.js +210 -137
- package/components/filter/index.js +39 -29
- package/components/iconButton/index.js +4 -3
- package/components/input/index.js +38 -31
- package/components/layout/index.js +31 -27
- package/components/layout/main/index.js +13 -10
- package/components/layout/main/style.js +14 -11
- package/components/layout/pageContent/index.js +7 -6
- package/components/layout/sidebar/FlatMenu.js +43 -43
- package/components/layout/sidebar/GroupedIconMenu.js +108 -95
- package/components/layout/sidebar/GroupedMenu.js +48 -38
- package/components/layout/sidebar/ProjectMenu.js +116 -109
- package/components/layout/sidebar/index.js +18 -15
- package/components/layout/sidebar/style.js +143 -138
- package/components/layout/topBar/ProjectTopbar.js +138 -104
- package/components/layout/topBar/UserAvatar.js +60 -51
- package/components/layout/topBar/index.js +33 -22
- package/components/loader/index.js +12 -9
- package/components/menu/index.js +35 -26
- package/components/modal/Modal.js +6 -5
- package/components/modal/index.js +13 -10
- package/components/modal/style.js +56 -53
- package/components/optionMenu/index.js +41 -34
- package/components/pagination/index.js +39 -24
- package/components/pagination/style.js +28 -25
- package/components/paginationUpdated/index.js +16 -14
- package/components/paper/index.js +16 -15
- package/components/paper/style.js +27 -24
- package/components/reactSelect/index.js +63 -46
- package/components/reactSelect/style.js +150 -117
- package/components/richTextEditor/index.js +44 -25
- package/components/select/GroupedSelect.js +61 -45
- package/components/select/SimpleSelect.js +82 -52
- package/components/select/index.js +54 -38
- package/components/simpleSelect/index.js +15 -12
- package/components/sort/index.js +22 -19
- package/components/switch/index.js +11 -10
- package/components/switch/style.js +32 -29
- package/components/switch/switch.js +23 -17
- package/components/table/ReactTable.js +71 -54
- package/components/table/SimpleTable.js +78 -59
- package/components/table/index.js +186 -311
- package/components/text/index.js +17 -15
- package/components/timeStamp/index.js +9 -4
- package/components/timeStamp/style.js +15 -12
- package/components/topBar/index.js +92 -85
- package/components/tree/index.js +47 -29
- package/components/tree/style.js +23 -20
- package/components/valuePicker/ValueSelector.js +138 -70
- package/components/valuePicker/index.js +26 -19
- package/components/wrapperLayout/layout/index.js +5 -4
- package/components/wrapperLayout/main/index.js +5 -4
- package/components/wrapperLayout/main/pageContainer/index.js +5 -4
- package/components/wrapperLayout/main/sideBar/index.js +110 -120
- package/components/wrapperLayout/main/sideBar/style.js +183 -177
- package/components/wrapperLayout/topBar/UserAvatar.js +5 -4
- package/components/wrapperLayout/topBar/avatar.js +12 -10
- package/components/wrapperLayout/topBar/index.js +97 -111
- package/components/wrapperLayout/topBar/menuIcon.js +5 -4
- package/components/wrapperLayout/topBar/style.js +64 -61
- package/http/index.js +184 -91
- package/index.js +55 -53
- package/package.json +2 -4
- package/templates/listPage/index.js +57 -36
- package/themes/default.js +7 -5
- package/themes/defaultSmall.js +3 -2
- package/themes/responsiveTheme.js +8 -6
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
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); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
@@ -10,42 +11,47 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
10
11
|
var _avatar = _interopRequireDefault(require("../../avatar"));
|
|
11
12
|
var _text = _interopRequireDefault(require("../../text"));
|
|
12
13
|
var _timeStamp = _interopRequireDefault(require("../../timeStamp"));
|
|
13
|
-
function _interopRequireDefault(
|
|
14
|
-
function
|
|
15
|
-
function
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
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); }
|
|
16
|
+
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; }
|
|
17
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
16
18
|
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."); }
|
|
17
|
-
function _unsupportedIterableToArray(
|
|
18
|
-
function _arrayLikeToArray(
|
|
19
|
-
function _iterableToArrayLimit(
|
|
20
|
-
function _arrayWithHoles(
|
|
21
|
-
function _extends() {
|
|
22
|
-
|
|
19
|
+
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); }
|
|
20
|
+
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; }
|
|
21
|
+
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; } }
|
|
22
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
23
|
+
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); }
|
|
24
|
+
var StyledMenu = (0, _styles.withStyles)({
|
|
23
25
|
paper: {
|
|
24
26
|
width: "fit-content !important",
|
|
25
27
|
marginLeft: "10px",
|
|
26
28
|
zIndex: 1
|
|
27
29
|
}
|
|
28
|
-
})(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
30
|
+
})(function (props) {
|
|
31
|
+
return /*#__PURE__*/_react.default.createElement(_material.Menu, _extends({
|
|
32
|
+
disableAutoFocusItem: true,
|
|
33
|
+
anchorOrigin: {
|
|
34
|
+
vertical: "bottom",
|
|
35
|
+
horizontal: "center"
|
|
36
|
+
}
|
|
37
|
+
}, props));
|
|
38
|
+
});
|
|
39
|
+
var UserAvatar = function UserAvatar(_ref) {
|
|
40
|
+
var loggedInUser = _ref.loggedInUser,
|
|
37
41
|
onViewProfileClick = _ref.onViewProfileClick,
|
|
38
42
|
onLogout = _ref.onLogout,
|
|
39
|
-
avatarItems = _ref.avatarItems
|
|
40
|
-
|
|
43
|
+
avatarItems = _ref.avatarItems,
|
|
44
|
+
lastLoginLabel = _ref.lastLoginLabel,
|
|
45
|
+
logoutLabel = _ref.logoutLabel;
|
|
46
|
+
var _useState = (0, _react.useState)(null),
|
|
41
47
|
_useState2 = _slicedToArray(_useState, 2),
|
|
42
48
|
menu = _useState2[0],
|
|
43
49
|
setMenu = _useState2[1];
|
|
44
|
-
|
|
45
|
-
|
|
50
|
+
var theme = (0, _material.useTheme)();
|
|
51
|
+
var handleMenu = function handleMenu(event) {
|
|
46
52
|
setMenu(event.currentTarget);
|
|
47
53
|
};
|
|
48
|
-
|
|
54
|
+
var handleCloseMenu = function handleCloseMenu() {
|
|
49
55
|
setMenu(null);
|
|
50
56
|
};
|
|
51
57
|
return loggedInUser ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_material.Box, {
|
|
@@ -60,7 +66,7 @@ const UserAvatar = _ref => {
|
|
|
60
66
|
open: Boolean(menu),
|
|
61
67
|
onClose: handleCloseMenu
|
|
62
68
|
}, (loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.name) && (loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.email) && /*#__PURE__*/_react.default.createElement(_material.MenuItem, {
|
|
63
|
-
onClick: ()
|
|
69
|
+
onClick: function onClick() {
|
|
64
70
|
handleCloseMenu();
|
|
65
71
|
if (onViewProfileClick) {
|
|
66
72
|
onViewProfileClick();
|
|
@@ -96,43 +102,46 @@ const UserAvatar = _ref => {
|
|
|
96
102
|
}
|
|
97
103
|
}, /*#__PURE__*/_react.default.createElement(_text.default, {
|
|
98
104
|
color: "secondary"
|
|
99
|
-
}, "Last Login :")), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_text.default, {
|
|
105
|
+
}, lastLoginLabel || "Last Login :")), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_text.default, {
|
|
100
106
|
color: "secondary"
|
|
101
107
|
}, /*#__PURE__*/_react.default.createElement(_timeStamp.default, {
|
|
102
108
|
value: (loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.lastLoginAt) + "Z",
|
|
103
109
|
local: true,
|
|
104
110
|
format: "default"
|
|
105
|
-
}))))), !!(avatarItems !== null && avatarItems !== void 0 && avatarItems.length) && (avatarItems === null || avatarItems === void 0 ? void 0 : avatarItems.map((item, index)
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
item.onClick
|
|
111
|
+
}))))), !!(avatarItems !== null && avatarItems !== void 0 && avatarItems.length) && (avatarItems === null || avatarItems === void 0 ? void 0 : avatarItems.map(function (item, index) {
|
|
112
|
+
return /*#__PURE__*/_react.default.createElement(_material.MenuItem, {
|
|
113
|
+
key: index // Add key prop for mapped items
|
|
114
|
+
,
|
|
115
|
+
onClick: function onClick() {
|
|
116
|
+
handleCloseMenu();
|
|
117
|
+
if (item.onClick) {
|
|
118
|
+
item.onClick();
|
|
119
|
+
}
|
|
112
120
|
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
onClick: ()
|
|
121
|
+
}, /*#__PURE__*/_react.default.createElement(_material.Box, {
|
|
122
|
+
display: "flex",
|
|
123
|
+
flexDirection: "row",
|
|
124
|
+
alignItems: "center"
|
|
125
|
+
}, /*#__PURE__*/_react.default.createElement(_material.Box, {
|
|
126
|
+
sx: {
|
|
127
|
+
marginRight: theme.spacing(1)
|
|
128
|
+
}
|
|
129
|
+
}, /*#__PURE__*/_react.default.createElement(_material.Avatar, {
|
|
130
|
+
variant: "rounded",
|
|
131
|
+
sx: {
|
|
132
|
+
width: 30,
|
|
133
|
+
height: 30
|
|
134
|
+
}
|
|
135
|
+
}, item.icon)), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_text.default, null, item.title))));
|
|
136
|
+
})), (loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.name) && /*#__PURE__*/_react.default.createElement(_material.Divider, null), /*#__PURE__*/_react.default.createElement(_material.MenuItem, {
|
|
137
|
+
onClick: function onClick() {
|
|
130
138
|
handleCloseMenu();
|
|
131
139
|
if (onLogout) {
|
|
132
140
|
onLogout();
|
|
133
141
|
}
|
|
134
142
|
}
|
|
135
|
-
}, /*#__PURE__*/_react.default.createElement(_text.default, null, "Log out")))) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null);
|
|
143
|
+
}, /*#__PURE__*/_react.default.createElement(_text.default, null, logoutLabel || "Log out")))) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null);
|
|
136
144
|
};
|
|
137
145
|
UserAvatar.propTypes = {};
|
|
138
|
-
var _default =
|
|
146
|
+
var _default = UserAvatar;
|
|
147
|
+
exports.default = _default;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
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); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
@@ -12,29 +13,34 @@ var _UserAvatar = _interopRequireDefault(require("./UserAvatar"));
|
|
|
12
13
|
var _modal = _interopRequireDefault(require("../../modal"));
|
|
13
14
|
var _reactRouter = require("react-router");
|
|
14
15
|
var _text = _interopRequireDefault(require("../../text"));
|
|
15
|
-
function _interopRequireDefault(
|
|
16
|
-
function
|
|
17
|
-
function
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
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); }
|
|
18
|
+
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; }
|
|
19
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
18
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."); }
|
|
19
|
-
function _unsupportedIterableToArray(
|
|
20
|
-
function _arrayLikeToArray(
|
|
21
|
-
function _iterableToArrayLimit(
|
|
22
|
-
function _arrayWithHoles(
|
|
23
|
-
|
|
24
|
-
|
|
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(_ref) {
|
|
26
|
+
var breadcrumbs = _ref.breadcrumbs,
|
|
25
27
|
loggedInUser = _ref.loggedInUser,
|
|
26
28
|
showAdmin = _ref.showAdmin,
|
|
27
29
|
actions = _ref.actions,
|
|
28
30
|
onLogout = _ref.onLogout;
|
|
29
|
-
|
|
31
|
+
var _useState = (0, _react.useState)(false),
|
|
30
32
|
_useState2 = _slicedToArray(_useState, 2),
|
|
31
33
|
open = _useState2[0],
|
|
32
34
|
setOpen = _useState2[1];
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
var handleOpen = function handleOpen() {
|
|
36
|
+
return setOpen(true);
|
|
37
|
+
};
|
|
38
|
+
var handleClose = function handleClose() {
|
|
39
|
+
return setOpen(false);
|
|
40
|
+
};
|
|
41
|
+
var navigate = (0, _reactRouter.useNavigate)();
|
|
42
|
+
var theme = (0, _material.useTheme)();
|
|
43
|
+
var logout = function logout() {
|
|
38
44
|
onLogout();
|
|
39
45
|
// localStorage.removeItem('t-at');
|
|
40
46
|
setOpen(false);
|
|
@@ -77,12 +83,16 @@ const TopBar = _ref => {
|
|
|
77
83
|
})), actions ? /*#__PURE__*/_react.default.createElement(_material.Box, null, /*#__PURE__*/_react.default.createElement(_material.Stack, {
|
|
78
84
|
direction: "row",
|
|
79
85
|
spacing: 1
|
|
80
|
-
}, actions.map(
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
+
}, actions.map(function (a) {
|
|
87
|
+
return /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
88
|
+
key: a.title,
|
|
89
|
+
variant: "text",
|
|
90
|
+
startIcon: a.icon,
|
|
91
|
+
onClick: function onClick() {
|
|
92
|
+
return navigate(a.href);
|
|
93
|
+
}
|
|
94
|
+
}, /*#__PURE__*/_react.default.createElement(_text.default, null, a.title));
|
|
95
|
+
}))) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null), /*#__PURE__*/_react.default.createElement(_material.Box, {
|
|
86
96
|
sx: {
|
|
87
97
|
marginLeft: theme.spacing(1)
|
|
88
98
|
}
|
|
@@ -118,4 +128,5 @@ const TopBar = _ref => {
|
|
|
118
128
|
}, /*#__PURE__*/_react.default.createElement(_text.default, null, "Log out"))))));
|
|
119
129
|
};
|
|
120
130
|
TopBar.propTypes = {};
|
|
121
|
-
var _default =
|
|
131
|
+
var _default = TopBar;
|
|
132
|
+
exports.default = _default;
|
|
@@ -7,14 +7,16 @@ exports.default = void 0;
|
|
|
7
7
|
var _material = require("@mui/material");
|
|
8
8
|
var _styles = require("@mui/styles");
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
|
-
function _interopRequireDefault(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
var useStyle = (0, _styles.makeStyles)(function (theme) {
|
|
12
|
+
return {
|
|
13
|
+
loaderWrapper: {
|
|
14
|
+
height: "100%"
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
});
|
|
18
|
+
var UIBlockLoader = function UIBlockLoader() {
|
|
19
|
+
var classes = useStyle();
|
|
18
20
|
return /*#__PURE__*/_react.default.createElement(_material.Grid, {
|
|
19
21
|
container: true,
|
|
20
22
|
alignItems: "center",
|
|
@@ -22,4 +24,5 @@ const UIBlockLoader = () => {
|
|
|
22
24
|
className: classes.loaderWrapper
|
|
23
25
|
}, /*#__PURE__*/_react.default.createElement(_material.CircularProgress, null));
|
|
24
26
|
};
|
|
25
|
-
var _default =
|
|
27
|
+
var _default = UIBlockLoader;
|
|
28
|
+
exports.default = _default;
|
package/components/menu/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
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); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
@@ -10,30 +11,34 @@ var _text = _interopRequireDefault(require("../text"));
|
|
|
10
11
|
var _reactRouterDom = require("react-router-dom");
|
|
11
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
13
|
var _button = _interopRequireDefault(require("../button"));
|
|
13
|
-
function _interopRequireDefault(
|
|
14
|
-
function
|
|
15
|
-
function
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
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); }
|
|
16
|
+
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; }
|
|
17
|
+
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; }
|
|
18
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
19
|
+
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); }
|
|
20
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
16
21
|
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."); }
|
|
17
|
-
function _unsupportedIterableToArray(
|
|
18
|
-
function _arrayLikeToArray(
|
|
19
|
-
function _iterableToArrayLimit(
|
|
20
|
-
function _arrayWithHoles(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
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); }
|
|
23
|
+
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; }
|
|
24
|
+
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; } }
|
|
25
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
26
|
+
var Menu = function Menu(props) {
|
|
27
|
+
var navigate = (0, _reactRouterDom.useNavigate)();
|
|
28
|
+
var _useState = (0, _react.useState)(null),
|
|
24
29
|
_useState2 = _slicedToArray(_useState, 2),
|
|
25
30
|
anchorEl = _useState2[0],
|
|
26
31
|
setAnchorEl = _useState2[1];
|
|
27
|
-
|
|
32
|
+
var _useState3 = (0, _react.useState)(false),
|
|
28
33
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
29
34
|
menuOpen = _useState4[0],
|
|
30
35
|
setMenuOpen = _useState4[1];
|
|
31
|
-
|
|
32
|
-
|
|
36
|
+
var items = props.items;
|
|
37
|
+
var handleClick = function handleClick(event) {
|
|
33
38
|
setMenuOpen(true);
|
|
34
39
|
setAnchorEl(event.currentTarget);
|
|
35
40
|
};
|
|
36
|
-
|
|
41
|
+
var handleMenuItemClick = function handleMenuItemClick(event, data) {
|
|
37
42
|
event.preventDefault();
|
|
38
43
|
if (data !== undefined) {
|
|
39
44
|
navigate(data);
|
|
@@ -41,7 +46,7 @@ const Menu = props => {
|
|
|
41
46
|
setMenuOpen(false);
|
|
42
47
|
setAnchorEl(null);
|
|
43
48
|
};
|
|
44
|
-
|
|
49
|
+
var handleClose = function handleClose(event, data) {
|
|
45
50
|
setMenuOpen(false);
|
|
46
51
|
};
|
|
47
52
|
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
@@ -54,18 +59,22 @@ const Menu = props => {
|
|
|
54
59
|
minWidth: "200px",
|
|
55
60
|
maxHeight: "220px"
|
|
56
61
|
}
|
|
57
|
-
}, items.map((item, index)
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
62
|
+
}, items.map(function (item, index) {
|
|
63
|
+
var _ref;
|
|
64
|
+
return /*#__PURE__*/_react.default.createElement(_material.MenuItem, {
|
|
65
|
+
key: index,
|
|
66
|
+
onClick: function onClick(e) {
|
|
67
|
+
return handleMenuItemClick(e, item === null || item === void 0 ? void 0 : item.link);
|
|
68
|
+
},
|
|
69
|
+
sx: (_ref = {
|
|
70
|
+
textDecoration: "none",
|
|
71
|
+
fontWeight: "bold"
|
|
72
|
+
}, _defineProperty(_ref, "fontWeight", 500), _defineProperty(_ref, "cursor", "pointer"), _ref)
|
|
73
|
+
}, /*#__PURE__*/_react.default.createElement(_text.default, null, item === null || item === void 0 ? void 0 : item.name));
|
|
74
|
+
})));
|
|
67
75
|
};
|
|
68
76
|
Menu.propTypes = {
|
|
69
77
|
items: _propTypes.default.array.isRequired
|
|
70
78
|
};
|
|
71
|
-
var _default =
|
|
79
|
+
var _default = Menu;
|
|
80
|
+
exports.default = _default;
|
|
@@ -11,10 +11,10 @@ var _clsx = _interopRequireDefault(require("clsx"));
|
|
|
11
11
|
var _style = _interopRequireDefault(require("./style"));
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
13
|
var _Close = _interopRequireDefault(require("@mui/icons-material/Close"));
|
|
14
|
-
function _interopRequireDefault(
|
|
15
|
-
function _extends() {
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
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
|
+
var Modal = function Modal(props) {
|
|
17
|
+
var classes = (0, _style.default)();
|
|
18
18
|
return /*#__PURE__*/_react.default.createElement(_material.Modal, _extends({
|
|
19
19
|
open: props.open,
|
|
20
20
|
onClose: props.handleClose
|
|
@@ -52,4 +52,5 @@ Modal.defaultProps = {
|
|
|
52
52
|
title: "Modal Dialog",
|
|
53
53
|
blur: "false"
|
|
54
54
|
};
|
|
55
|
-
var _default =
|
|
55
|
+
var _default = Modal;
|
|
56
|
+
exports.default = _default;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
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); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
@@ -13,14 +14,15 @@ var _material = require("@mui/material");
|
|
|
13
14
|
var _Close = _interopRequireDefault(require("@mui/icons-material/Close"));
|
|
14
15
|
var _text = _interopRequireDefault(require("../text"));
|
|
15
16
|
var _style = _interopRequireDefault(require("./style"));
|
|
16
|
-
|
|
17
|
-
function _interopRequireDefault(
|
|
18
|
-
function
|
|
19
|
-
function
|
|
20
|
-
function
|
|
21
|
-
function
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
var _excluded = ["fullWidth", "width", "open", "handleClose", "title", "children", "onClose"];
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
+
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); }
|
|
20
|
+
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; }
|
|
21
|
+
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); }
|
|
22
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
23
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
24
|
+
var Modal = function Modal(props) {
|
|
25
|
+
var fullWidth = props.fullWidth,
|
|
24
26
|
width = props.width,
|
|
25
27
|
open = props.open,
|
|
26
28
|
handleClose = props.handleClose,
|
|
@@ -28,7 +30,7 @@ const Modal = props => {
|
|
|
28
30
|
children = props.children,
|
|
29
31
|
onClose = props.onClose,
|
|
30
32
|
rest = _objectWithoutProperties(props, _excluded);
|
|
31
|
-
|
|
33
|
+
var classes = (0, _style.default)();
|
|
32
34
|
return /*#__PURE__*/React.createElement(_Dialog.default, _extends({
|
|
33
35
|
sx: {
|
|
34
36
|
"& .MuiDialogTitle-root": {
|
|
@@ -85,4 +87,5 @@ Modal.defaultProps = {
|
|
|
85
87
|
title: "Modal Title",
|
|
86
88
|
fullWidth: false
|
|
87
89
|
};
|
|
88
|
-
var _default =
|
|
90
|
+
var _default = Modal;
|
|
91
|
+
exports.default = _default;
|
|
@@ -6,60 +6,63 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _styles = require("@mui/styles");
|
|
8
8
|
var _default2 = _interopRequireDefault(require("../../themes/default"));
|
|
9
|
-
function _interopRequireDefault(
|
|
10
|
-
var _default =
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
var _default = (0, _styles.makeStyles)(function () {
|
|
11
|
+
return {
|
|
12
|
+
modalContentWrapper: {
|
|
13
|
+
position: "absolute",
|
|
14
|
+
backgroundColor: _default2.default.palette.background.paper,
|
|
15
|
+
borderRadius: "3px",
|
|
16
|
+
boxShadow: _default2.default.shadows[5],
|
|
17
|
+
top: "10%",
|
|
18
|
+
"&:focus": {
|
|
19
|
+
outline: "none"
|
|
20
|
+
},
|
|
21
|
+
margin: "auto"
|
|
19
22
|
},
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
width: "400px",
|
|
24
|
-
left: "calc(50% - 400px / 2)"
|
|
25
|
-
},
|
|
26
|
-
large: {
|
|
27
|
-
width: "600px",
|
|
28
|
-
left: "calc(50% - 600px / 2)"
|
|
29
|
-
},
|
|
30
|
-
xlarge: {
|
|
31
|
-
width: "800px",
|
|
32
|
-
left: "calc(50% - 800px / 2)"
|
|
33
|
-
},
|
|
34
|
-
fullscreen: {
|
|
35
|
-
width: "98%",
|
|
36
|
-
left: "1%",
|
|
37
|
-
top: "10px"
|
|
38
|
-
},
|
|
39
|
-
header: {
|
|
40
|
-
display: "flex",
|
|
41
|
-
alignItems: "center",
|
|
42
|
-
padding: "0.4rem 1rem",
|
|
43
|
-
borderBottom: "1px solid #ccc",
|
|
44
|
-
"& .MuiDialogTitle-root": {
|
|
45
|
-
backgroundColor: "#e7e7e7"
|
|
23
|
+
default: {
|
|
24
|
+
width: "400px",
|
|
25
|
+
left: "calc(50% - 400px / 2)"
|
|
46
26
|
},
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
27
|
+
large: {
|
|
28
|
+
width: "600px",
|
|
29
|
+
left: "calc(50% - 600px / 2)"
|
|
50
30
|
},
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
31
|
+
xlarge: {
|
|
32
|
+
width: "800px",
|
|
33
|
+
left: "calc(50% - 800px / 2)"
|
|
34
|
+
},
|
|
35
|
+
fullscreen: {
|
|
36
|
+
width: "98%",
|
|
37
|
+
left: "1%",
|
|
38
|
+
top: "10px"
|
|
39
|
+
},
|
|
40
|
+
header: {
|
|
41
|
+
display: "flex",
|
|
42
|
+
alignItems: "center",
|
|
43
|
+
padding: "0.4rem 1rem",
|
|
44
|
+
borderBottom: "1px solid #ccc",
|
|
45
|
+
"& .MuiDialogTitle-root": {
|
|
46
|
+
backgroundColor: "#e7e7e7"
|
|
47
|
+
},
|
|
48
|
+
"& .title": {
|
|
49
|
+
flexGrow: 1,
|
|
50
|
+
fontWeight: 500
|
|
51
|
+
},
|
|
52
|
+
"& .modalCloseTrigger": {
|
|
53
|
+
cursor: "pointer"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
content: {
|
|
57
|
+
padding: "0.4rem 1rem",
|
|
58
|
+
maxHeight: "calc(100vh - 170px)",
|
|
59
|
+
overflowY: "auto"
|
|
60
|
+
},
|
|
61
|
+
modalHeader: {
|
|
62
|
+
"& .MuiDialogTitle-root": {
|
|
63
|
+
backgroundColor: "#e7e7e7"
|
|
64
|
+
}
|
|
63
65
|
}
|
|
64
|
-
}
|
|
65
|
-
})
|
|
66
|
+
};
|
|
67
|
+
});
|
|
68
|
+
exports.default = _default;
|