tenjin-ui-kit 0.2.140 → 0.2.142
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/components/authenticationProvider/index.js +13 -16
- package/components/avatar/styles.js +2 -2
- package/components/breadCrumbs/index.js +2 -2
- package/components/editableField/index.js +0 -1
- package/components/iconButton/index.js +0 -1
- package/components/layout/pageContent/index.js +4 -3
- package/components/layout/sidebar/GroupedMenu.js +2 -3
- package/components/layout/sidebar/ProjectMenu.js +0 -2
- package/components/layout/topBar/ProjectTopbar.js +0 -1
- package/components/select/SimpleSelect.js +0 -1
- package/components/select/index.js +0 -1
- package/components/switch/index.js +0 -1
- package/components/table/ReactTable.js +2 -0
- package/components/table/SimpleTable.js +1 -1
- package/components/table/index.js +0 -1
- package/components/tree/index.js +0 -1
- package/components/valuePicker/ValueSelector.js +7 -9
- package/package.json +1 -1
|
@@ -55,43 +55,40 @@ var AuthenticationProvider = function AuthenticationProvider(_ref) {
|
|
|
55
55
|
while (1) switch (_context.prev = _context.next) {
|
|
56
56
|
case 0:
|
|
57
57
|
token = resolveToken();
|
|
58
|
-
console.log("Resolved Token: ", token);
|
|
59
58
|
if (!token) {
|
|
60
|
-
_context.next =
|
|
59
|
+
_context.next = 18;
|
|
61
60
|
break;
|
|
62
61
|
}
|
|
63
|
-
_context.prev =
|
|
64
|
-
|
|
65
|
-
_context.next = 7;
|
|
62
|
+
_context.prev = 2;
|
|
63
|
+
_context.next = 5;
|
|
66
64
|
return _axios.default.get("/api/me", {
|
|
67
65
|
headers: {
|
|
68
66
|
Authorization: "Bearer ".concat(token)
|
|
69
67
|
}
|
|
70
68
|
});
|
|
71
|
-
case
|
|
69
|
+
case 5:
|
|
72
70
|
profileValidationResponse = _context.sent;
|
|
73
|
-
console.log("Profile validation successful");
|
|
74
71
|
setLoggedInUser(profileValidationResponse.data);
|
|
75
72
|
setAuthLoading(false);
|
|
76
|
-
_context.next =
|
|
73
|
+
_context.next = 16;
|
|
77
74
|
break;
|
|
78
|
-
case
|
|
79
|
-
_context.prev =
|
|
80
|
-
_context.t0 = _context["catch"](
|
|
75
|
+
case 10:
|
|
76
|
+
_context.prev = 10;
|
|
77
|
+
_context.t0 = _context["catch"](2);
|
|
81
78
|
console.error("Profile validation error");
|
|
82
79
|
console.error("Error: ", _context.t0);
|
|
83
80
|
setLoggedInUser(null);
|
|
84
81
|
redirectToLogin();
|
|
85
|
-
case
|
|
86
|
-
_context.next =
|
|
82
|
+
case 16:
|
|
83
|
+
_context.next = 19;
|
|
87
84
|
break;
|
|
88
|
-
case
|
|
85
|
+
case 18:
|
|
89
86
|
redirectToLogin();
|
|
90
|
-
case
|
|
87
|
+
case 19:
|
|
91
88
|
case "end":
|
|
92
89
|
return _context.stop();
|
|
93
90
|
}
|
|
94
|
-
}, _callee, null, [[
|
|
91
|
+
}, _callee, null, [[2, 10]]);
|
|
95
92
|
}));
|
|
96
93
|
return function resolveAuthentication() {
|
|
97
94
|
return _ref2.apply(this, arguments);
|
|
@@ -39,8 +39,8 @@ var useStyles = (0, _styles.makeStyles)(function () {
|
|
|
39
39
|
small: {
|
|
40
40
|
"& .avatar": {
|
|
41
41
|
fontSize: _responsiveTheme.default.typography.fontSize,
|
|
42
|
-
width:
|
|
43
|
-
height:
|
|
42
|
+
width: 30,
|
|
43
|
+
height: 30
|
|
44
44
|
},
|
|
45
45
|
"& .title": {
|
|
46
46
|
fontSize: _responsiveTheme.default.typography.fontSize + 2
|
|
@@ -51,7 +51,7 @@ function BreadCrumbs(props) {
|
|
|
51
51
|
item.onClick(item.data);
|
|
52
52
|
} else if (item.link !== undefined) {
|
|
53
53
|
if (item.serverSide) {
|
|
54
|
-
window.location = item.link;
|
|
54
|
+
window.location.href = item.link;
|
|
55
55
|
} else {
|
|
56
56
|
navigate(item.link);
|
|
57
57
|
}
|
|
@@ -62,7 +62,7 @@ function BreadCrumbs(props) {
|
|
|
62
62
|
item.onClick(item.data);
|
|
63
63
|
} else if (item && item.link !== undefined) {
|
|
64
64
|
if (item.serverSide) {
|
|
65
|
-
window.location = item.link;
|
|
65
|
+
window.location.href = item.link;
|
|
66
66
|
} else {
|
|
67
67
|
navigate(item.link);
|
|
68
68
|
}
|
|
@@ -72,7 +72,6 @@ var EditableField = function EditableField(props) {
|
|
|
72
72
|
setIsNameFocused(false);
|
|
73
73
|
isShow(false);
|
|
74
74
|
};
|
|
75
|
-
console.log(props);
|
|
76
75
|
return /*#__PURE__*/_react.default.createElement("div", null, !isNameFocused ? /*#__PURE__*/_react.default.createElement("div", {
|
|
77
76
|
style: {
|
|
78
77
|
display: "flex",
|
|
@@ -10,7 +10,6 @@ var _LoadingButton = _interopRequireDefault(require("@mui/lab/LoadingButton"));
|
|
|
10
10
|
var _material = require("@mui/material");
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
12
|
var IconButton = function IconButton(props) {
|
|
13
|
-
console.log(props);
|
|
14
13
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, !props.loading ? /*#__PURE__*/_react.default.createElement(_material.Tooltip, {
|
|
15
14
|
arrow: true,
|
|
16
15
|
placement: "top",
|
|
@@ -13,11 +13,12 @@ var PageContent = function PageContent(_ref) {
|
|
|
13
13
|
var location = (0, _reactRouterDom.useLocation)();
|
|
14
14
|
var theme = (0, _material.useTheme)();
|
|
15
15
|
return /*#__PURE__*/_react.default.createElement(_material.Box, {
|
|
16
|
+
className: "PageContent__TEST",
|
|
16
17
|
sx: {
|
|
17
18
|
marginLeft: theme.spacing(0.5),
|
|
18
|
-
height:
|
|
19
|
-
maxHeight:
|
|
20
|
-
overflowY:
|
|
19
|
+
height: "100%",
|
|
20
|
+
maxHeight: "100%",
|
|
21
|
+
overflowY: "auto",
|
|
21
22
|
flex: 1
|
|
22
23
|
// width: location.pathname.includes('agent')
|
|
23
24
|
// ? `100vw !important`
|
|
@@ -25,7 +25,6 @@ var GroupedMenu = function GroupedMenu(_ref) {
|
|
|
25
25
|
var _useContext = (0, _react.useContext)(_.LayoutContext),
|
|
26
26
|
selectedSidebarKey = _useContext.layoutState.selectedSidebarKey,
|
|
27
27
|
setSelectedSidebarKey = _useContext.setSelectedSidebarKey;
|
|
28
|
-
console.log(selectedSidebarKey, '0-00000000000000000');
|
|
29
28
|
return groups ? groups.map(function (group, index) {
|
|
30
29
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
31
30
|
key: group.groupName
|
|
@@ -38,7 +37,7 @@ var GroupedMenu = function GroupedMenu(_ref) {
|
|
|
38
37
|
return /*#__PURE__*/_react.default.createElement(_material.ListItemButton, {
|
|
39
38
|
disableRipple: true,
|
|
40
39
|
disableTouchRipple: true,
|
|
41
|
-
component: i.serverSide ?
|
|
40
|
+
component: i.serverSide ? "a" : _reactRouterDom.Link,
|
|
42
41
|
href: i.href,
|
|
43
42
|
to: i.href,
|
|
44
43
|
selected: i.key === selectedSidebarKey,
|
|
@@ -56,7 +55,7 @@ var GroupedMenu = function GroupedMenu(_ref) {
|
|
|
56
55
|
}, /*#__PURE__*/_react.default.createElement(_text.default, null, i.display)));
|
|
57
56
|
})), index < groups.length - 1 && /*#__PURE__*/_react.default.createElement(_material.Divider, {
|
|
58
57
|
sx: {
|
|
59
|
-
height:
|
|
58
|
+
height: "initial !important"
|
|
60
59
|
}
|
|
61
60
|
}));
|
|
62
61
|
}) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null);
|
|
@@ -52,7 +52,6 @@ var ProjectMenu = function ProjectMenu(_ref) {
|
|
|
52
52
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
53
53
|
selectedItem = _useState4[0],
|
|
54
54
|
setselectedItem = _useState4[1];
|
|
55
|
-
console.log(selectedItem, "selectedItemIndex");
|
|
56
55
|
var handleClick = function handleClick(event, index, selected) {
|
|
57
56
|
setselectedItem(function (prev) {
|
|
58
57
|
return _objectSpread(_objectSpread({}, prev), {}, {
|
|
@@ -73,7 +72,6 @@ var ProjectMenu = function ProjectMenu(_ref) {
|
|
|
73
72
|
});
|
|
74
73
|
};
|
|
75
74
|
var leaveMenu = function leaveMenu() {
|
|
76
|
-
console.log("onclose");
|
|
77
75
|
setTimeout(function () {
|
|
78
76
|
setselectedItem(function (prev) {
|
|
79
77
|
return _objectSpread(_objectSpread({}, prev), {}, {
|
|
@@ -26,7 +26,6 @@ var SimpleSelect = function SimpleSelect(_ref) {
|
|
|
26
26
|
isRequired = _ref.isRequired,
|
|
27
27
|
helperText = _ref.helperText,
|
|
28
28
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
29
|
-
console.log(errorMessage, error, "error");
|
|
30
29
|
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_material.FormControl, {
|
|
31
30
|
sx: {
|
|
32
31
|
m: 1,
|
|
@@ -35,7 +35,6 @@ var ReactSelect = function ReactSelect(props) {
|
|
|
35
35
|
isRequired = props.isRequired,
|
|
36
36
|
isDisabled = props.isDisabled,
|
|
37
37
|
rest = _objectWithoutProperties(props, _excluded);
|
|
38
|
-
console.log(defaultValue, "hsgdsahgd", options[1]);
|
|
39
38
|
var icon = /*#__PURE__*/_react.default.createElement(_CheckBoxOutlineBlank.default, {
|
|
40
39
|
fontSize: "small"
|
|
41
40
|
});
|
|
@@ -17,7 +17,6 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
17
17
|
var Switch = function Switch(props) {
|
|
18
18
|
var label = props.label,
|
|
19
19
|
rest = _objectWithoutProperties(props, _excluded);
|
|
20
|
-
console.log(props.color, " theme.palette.grey.main theme.palette.grey.main");
|
|
21
20
|
var MuiSwitchStyledComp = (0, _styles.styled)(_material.Switch)(function (_ref) {
|
|
22
21
|
var _theme$palette;
|
|
23
22
|
var MuiSwitch = _ref.MuiSwitch;
|
|
@@ -53,6 +53,7 @@ var ReactTable = function ReactTable(_ref) {
|
|
|
53
53
|
}
|
|
54
54
|
return rows;
|
|
55
55
|
}, [rows, sorting]);
|
|
56
|
+
var theme = (0, _material.useTheme)();
|
|
56
57
|
return rows && (rows === null || rows === void 0 ? void 0 : rows.length) > 0 ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_material.TableContainer, null, /*#__PURE__*/_react.default.createElement(_material.Table, null, /*#__PURE__*/_react.default.createElement(_material.TableHead, null, /*#__PURE__*/_react.default.createElement(_material.TableRow, null, columns === null || columns === void 0 ? void 0 : columns.map(function (c) {
|
|
57
58
|
return /*#__PURE__*/_react.default.createElement(_material.TableCell, {
|
|
58
59
|
key: c.name,
|
|
@@ -79,6 +80,7 @@ var ReactTable = function ReactTable(_ref) {
|
|
|
79
80
|
key: u.id
|
|
80
81
|
}, columns === null || columns === void 0 ? void 0 : columns.map(function (c) {
|
|
81
82
|
return /*#__PURE__*/_react.default.createElement(_material.TableCell, {
|
|
83
|
+
size: "small",
|
|
82
84
|
key: u[c.name],
|
|
83
85
|
style: {
|
|
84
86
|
width: c.width,
|
|
@@ -15,7 +15,7 @@ var SimpleTable = function SimpleTable(_ref) {
|
|
|
15
15
|
var theme = (0, _material.useTheme)();
|
|
16
16
|
return rows && rows.length > 0 ? /*#__PURE__*/_react.default.createElement(_material.TableContainer, null, /*#__PURE__*/_react.default.createElement(_material.Table, {
|
|
17
17
|
size: size
|
|
18
|
-
}, /*#__PURE__*/_react.default.createElement(_material.TableHead, null,
|
|
18
|
+
}, /*#__PURE__*/_react.default.createElement(_material.TableHead, null, /*#__PURE__*/_react.default.createElement(_material.TableRow, null, columns && columns.map(function (c, index) {
|
|
19
19
|
return /*#__PURE__*/_react.default.createElement(_material.TableCell, {
|
|
20
20
|
key: index
|
|
21
21
|
}, /*#__PURE__*/_react.default.createElement(_text.default, {
|
|
@@ -88,7 +88,6 @@ var Table = function Table(_ref) {
|
|
|
88
88
|
}
|
|
89
89
|
return rows;
|
|
90
90
|
}, [rows, sorting]);
|
|
91
|
-
console.log(sortedData);
|
|
92
91
|
return rows && (rows === null || rows === void 0 ? void 0 : rows.length) > 0 ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_material.TableContainer, null, /*#__PURE__*/_react.default.createElement(_material.Table, null, /*#__PURE__*/_react.default.createElement(_material.TableHead, null, /*#__PURE__*/_react.default.createElement(_material.TableRow, null, columns.map(function (c, index) {
|
|
93
92
|
return draggable ? /*#__PURE__*/_react.default.createElement(_material.TableCell, {
|
|
94
93
|
key: c.name,
|
package/components/tree/index.js
CHANGED
|
@@ -53,7 +53,6 @@ function Tree(props) {
|
|
|
53
53
|
expandedNodeIds = _React$useState4[0],
|
|
54
54
|
setExpandedNodeIds = _React$useState4[1];
|
|
55
55
|
function handleContextMenu(event, nodeId) {
|
|
56
|
-
console.log(nodeId);
|
|
57
56
|
event.preventDefault();
|
|
58
57
|
setContextMenu(contextMenu === null ? {
|
|
59
58
|
mouseX: event.clientX + 30,
|
|
@@ -115,22 +115,20 @@ var ValueSelector = function ValueSelector(_ref) {
|
|
|
115
115
|
case 0:
|
|
116
116
|
tempOptions = [];
|
|
117
117
|
if (!fetchData) {
|
|
118
|
-
_context2.next =
|
|
118
|
+
_context2.next = 7;
|
|
119
119
|
break;
|
|
120
120
|
}
|
|
121
|
-
|
|
122
|
-
_context2.next = 5;
|
|
121
|
+
_context2.next = 4;
|
|
123
122
|
return fetchAsyncData();
|
|
124
|
-
case
|
|
123
|
+
case 4:
|
|
125
124
|
tempOptions = _context2.sent;
|
|
126
|
-
_context2.next =
|
|
125
|
+
_context2.next = 8;
|
|
127
126
|
break;
|
|
128
|
-
case
|
|
129
|
-
console.log("Local options passed");
|
|
127
|
+
case 7:
|
|
130
128
|
tempOptions = _toConsumableArray(options);
|
|
131
|
-
case
|
|
129
|
+
case 8:
|
|
132
130
|
setLocalOptions(determineSelectedOptions(tempOptions, defaultSelectedOptionIds, valueKey));
|
|
133
|
-
case
|
|
131
|
+
case 9:
|
|
134
132
|
case "end":
|
|
135
133
|
return _context2.stop();
|
|
136
134
|
}
|