tenjin-ui-kit 0.3.70 → 0.3.72-dev
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 +155 -0
- package/common/hooks/newApiHook.js +188 -0
- package/{dist/common → common}/utils/security/index.js +2 -2
- package/{dist/common → common}/utils/security/securityConfig.js +1 -2
- package/components/Canvas.js +330 -0
- package/components/DragBox/index.js +40 -0
- package/components/InputWithChip/index.js +294 -0
- package/{dist/components → components}/RightContext/index.js +19 -28
- package/components/WorkFlow.js +42 -0
- package/components/WorkFlowBuilder.js +115 -0
- package/components/alert/Style.js +20 -0
- package/components/alert/index.js +67 -0
- package/{dist/components → components}/attachment/index.js +21 -28
- package/{dist/components → components}/authenticationProvider/AuthError.js +3 -4
- package/{dist/components → components}/authenticationProvider/AuthLoader.js +3 -4
- package/components/authenticationProvider/index.js +110 -0
- package/{dist/components → components}/avatar/index.js +13 -14
- package/components/avatar/styles.js +91 -0
- package/components/breadCrumbs/index.js +169 -0
- package/{dist/components → components}/breadCrumbs/style.js +1 -4
- package/{dist/components → components}/browsingTestCaseLayout/DetailsViewLayout/DetailsViewContent/index.js +5 -6
- package/{dist/components → components}/browsingTestCaseLayout/DetailsViewLayout/DetailsViewContent/style.js +5 -8
- package/{dist/components → components}/browsingTestCaseLayout/DetailsViewLayout/DetailsViewHeader/index.js +4 -5
- package/{dist/components → components}/browsingTestCaseLayout/TreeViewLayout/TreeViewContent/Index.js +4 -5
- package/{dist/components → components}/browsingTestCaseLayout/TreeViewLayout/TreeViewHeader/Index.js +5 -6
- package/components/browsingTestCaseLayout/TreeViewLayout/TreeViewHeader/style.js +23 -0
- package/{dist/components → components}/browsingTestCaseLayout/index.js +25 -30
- package/components/button/index.js +133 -0
- package/{dist/components → components}/chatBotModal/index.js +36 -45
- package/components/checkBox/index.js +29 -0
- package/{dist/components → components}/combobox/index.js +51 -72
- package/components/divider/index.js +37 -0
- package/{dist/components → components}/editableField/index.js +19 -28
- package/{dist/components → components}/error/index.js +6 -12
- package/components/errorBoundary/index.js +140 -0
- package/components/fileUploader/index.js +151 -0
- package/components/fileUploader/style.js +57 -0
- package/components/filter/ValueSelector.js +333 -0
- package/{dist/components → components}/filter/index.js +26 -33
- package/{dist/components → components}/iconButton/index.js +3 -4
- package/components/input/index.js +167 -0
- package/components/layout/index.js +94 -0
- package/components/layout/main/index.js +24 -0
- package/components/layout/main/style.js +19 -0
- package/{dist/components → components}/layout/pageContent/index.js +6 -7
- package/components/layout/sidebar/FlatMenu.js +64 -0
- package/components/layout/sidebar/GroupedIconMenu.js +233 -0
- package/components/layout/sidebar/GroupedMenu.js +57 -0
- package/components/layout/sidebar/ProjectMenu.js +223 -0
- package/components/layout/sidebar/index.js +88 -0
- package/components/layout/sidebar/style.js +149 -0
- package/components/layout/topBar/ProjectTopbar.js +388 -0
- package/components/layout/topBar/UserAvatar.js +138 -0
- package/components/layout/topBar/index.js +121 -0
- package/{dist/components → components}/loader/index.js +9 -12
- package/components/menu/index.js +71 -0
- package/{dist/components → components}/modal/Modal.js +5 -6
- package/components/modal/index.js +88 -0
- package/components/modal/style.js +65 -0
- package/components/optionMenu/index.js +105 -0
- package/components/pagination/index.js +114 -0
- package/components/pagination/style.js +33 -0
- package/components/paginationUpdated/index.js +74 -0
- package/components/paper/index.js +43 -0
- package/components/paper/style.js +31 -0
- package/components/reactSelect/index.js +195 -0
- package/components/reactSelect/style.js +130 -0
- package/components/richTextEditor/index.js +64 -0
- package/components/select/GroupedSelect.js +167 -0
- package/components/select/SimpleSelect.js +184 -0
- package/{dist/components → components}/select/index.js +38 -54
- package/components/simpleSelect/index.js +53 -0
- package/{dist/components → components}/sort/index.js +19 -22
- package/{dist/components → components}/switch/index.js +10 -11
- package/components/switch/style.js +39 -0
- package/{dist/components → components}/switch/switch.js +17 -23
- package/components/table/ReactTable.js +101 -0
- package/components/table/SimpleTable.js +117 -0
- package/components/table/index.js +381 -0
- package/components/text/index.js +65 -0
- package/{dist/components → components}/timeStamp/index.js +4 -6
- package/components/timeStamp/style.js +20 -0
- package/components/topBar/index.js +169 -0
- package/{dist/components → components}/tree/index.js +29 -47
- package/components/tree/style.js +29 -0
- package/components/valuePicker/ValueSelector.js +205 -0
- package/{dist/components → components}/valuePicker/index.js +19 -26
- package/{dist/components → components}/wrapperLayout/layout/index.js +4 -5
- package/{dist/components → components}/wrapperLayout/main/index.js +4 -5
- package/{dist/components → components}/wrapperLayout/main/pageContainer/index.js +4 -5
- package/components/wrapperLayout/main/sideBar/index.js +272 -0
- package/components/wrapperLayout/main/sideBar/style.js +190 -0
- package/{dist/components → components}/wrapperLayout/topBar/UserAvatar.js +4 -5
- package/components/wrapperLayout/topBar/avatar.js +55 -0
- package/components/wrapperLayout/topBar/index.js +196 -0
- package/{dist/components → components}/wrapperLayout/topBar/menuIcon.js +4 -5
- package/components/wrapperLayout/topBar/style.js +74 -0
- package/http/index.js +133 -0
- package/{dist/index.js → index.js} +53 -55
- package/package.json +5 -3
- package/{dist/templates → templates}/listPage/index.js +36 -57
- package/{dist/themes → themes}/default.js +5 -7
- package/{dist/themes → themes}/defaultSmall.js +2 -3
- package/{dist/themes → themes}/responsiveTheme.js +6 -8
- package/.dockerignore +0 -6
- package/.storybook/main.js +0 -16
- package/.storybook/preview.js +0 -11
- package/Dockerfile +0 -17
- package/Jenkinsfile +0 -66
- package/build/asset-manifest.json +0 -16
- package/build/favicon.ico +0 -0
- package/build/index.html +0 -1
- package/build/logo192.png +0 -0
- package/build/logo512.png +0 -0
- package/build/manifest.json +0 -25
- package/build/robots.txt +0 -3
- package/build/static/css/main.522396f6.css +0 -2
- package/build/static/css/main.522396f6.css.map +0 -1
- package/build/static/js/787.18cf14d0.chunk.js +0 -2
- package/build/static/js/787.18cf14d0.chunk.js.map +0 -1
- package/build/static/js/main.d71fecac.js +0 -3
- package/build/static/js/main.d71fecac.js.LICENSE.txt +0 -50
- package/build/static/js/main.d71fecac.js.map +0 -1
- package/build/static/media/logo.6ce24c58023cc2f8fd88fe9d219db6c6.svg +0 -1
- package/build/tenjinLogo.png +0 -0
- package/dist/common/hooks/apiHooks.js +0 -223
- package/dist/common/hooks/newApiHook.js +0 -270
- package/dist/components/Canvas.js +0 -254
- package/dist/components/DragBox/index.js +0 -45
- package/dist/components/InputWithChip/index.js +0 -187
- package/dist/components/WorkFlow.js +0 -47
- package/dist/components/WorkFlowBuilder.js +0 -130
- package/dist/components/alert/Style.js +0 -23
- package/dist/components/alert/index.js +0 -69
- package/dist/components/authenticationProvider/index.js +0 -166
- package/dist/components/avatar/styles.js +0 -94
- package/dist/components/breadCrumbs/index.js +0 -180
- package/dist/components/browsingTestCaseLayout/TreeViewLayout/TreeViewHeader/style.js +0 -26
- package/dist/components/button/index.js +0 -140
- package/dist/components/checkBox/index.js +0 -30
- package/dist/components/divider/index.js +0 -41
- package/dist/components/errorBoundary/index.js +0 -160
- package/dist/components/fileUploader/index.js +0 -156
- package/dist/components/fileUploader/style.js +0 -60
- package/dist/components/filter/ValueSelector.js +0 -405
- package/dist/components/input/index.js +0 -174
- package/dist/components/layout/index.js +0 -98
- package/dist/components/layout/main/index.js +0 -27
- package/dist/components/layout/main/style.js +0 -22
- package/dist/components/layout/sidebar/FlatMenu.js +0 -64
- package/dist/components/layout/sidebar/GroupedIconMenu.js +0 -246
- package/dist/components/layout/sidebar/GroupedMenu.js +0 -67
- package/dist/components/layout/sidebar/ProjectMenu.js +0 -230
- package/dist/components/layout/sidebar/index.js +0 -91
- package/dist/components/layout/sidebar/style.js +0 -154
- package/dist/components/layout/topBar/ProjectTopbar.js +0 -338
- package/dist/components/layout/topBar/UserAvatar.js +0 -145
- package/dist/components/layout/topBar/index.js +0 -132
- package/dist/components/menu/index.js +0 -80
- package/dist/components/modal/index.js +0 -91
- package/dist/components/modal/style.js +0 -68
- package/dist/components/optionMenu/index.js +0 -112
- package/dist/components/pagination/index.js +0 -129
- package/dist/components/pagination/style.js +0 -36
- package/dist/components/paginationUpdated/index.js +0 -75
- package/dist/components/paper/index.js +0 -44
- package/dist/components/paper/style.js +0 -34
- package/dist/components/reactSelect/index.js +0 -212
- package/dist/components/reactSelect/style.js +0 -163
- package/dist/components/richTextEditor/index.js +0 -83
- package/dist/components/select/GroupedSelect.js +0 -183
- package/dist/components/select/SimpleSelect.js +0 -212
- package/dist/components/simpleSelect/index.js +0 -56
- package/dist/components/switch/style.js +0 -42
- package/dist/components/table/ReactTable.js +0 -118
- package/dist/components/table/SimpleTable.js +0 -136
- package/dist/components/table/index.js +0 -256
- package/dist/components/text/index.js +0 -67
- package/dist/components/timeStamp/style.js +0 -23
- package/dist/components/topBar/index.js +0 -176
- package/dist/components/tree/style.js +0 -32
- package/dist/components/valuePicker/ValueSelector.js +0 -273
- package/dist/components/wrapperLayout/main/sideBar/index.js +0 -262
- package/dist/components/wrapperLayout/main/sideBar/style.js +0 -196
- package/dist/components/wrapperLayout/topBar/avatar.js +0 -57
- package/dist/components/wrapperLayout/topBar/index.js +0 -182
- package/dist/components/wrapperLayout/topBar/style.js +0 -77
- package/dist/http/index.js +0 -226
- package/public/favicon.ico +0 -0
- package/public/index.html +0 -43
- package/public/logo192.png +0 -0
- package/public/logo512.png +0 -0
- package/public/manifest.json +0 -25
- package/public/robots.txt +0 -3
- package/public/tenjinLogo.png +0 -0
- /package/{dist/assets → assets}/images/MicrosoftTeams-image (1).png +0 -0
- /package/{dist/assets → assets}/images/tenjin-4.0-logo.png +0 -0
- /package/{dist/components → components}/RightContext/index.css +0 -0
- /package/{dist/components → components}/browsingTestCaseLayout/style.css +0 -0
- /package/{dist/components → components}/errorBoundary/Error.jpg +0 -0
- /package/{dist/components → components}/iconButton/style.js +0 -0
- /package/{dist/components → components}/richTextEditor/style.js +0 -0
- /package/{dist/components → components}/wrapperLayout/layout/style.js +0 -0
|
@@ -1,182 +0,0 @@
|
|
|
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;
|
|
@@ -1,77 +0,0 @@
|
|
|
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;
|
package/dist/http/index.js
DELETED
|
@@ -1,226 +0,0 @@
|
|
|
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.put = exports.postClient = exports.post = exports.parseAxiosError = exports.getSecureClient = exports.getClient = exports.get = exports.doDelete = void 0;
|
|
8
|
-
var _axios = _interopRequireDefault(require("axios"));
|
|
9
|
-
var _authenticationProvider = _interopRequireDefault(require("../components/authenticationProvider"));
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
13
|
-
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; }
|
|
14
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
15
|
-
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); }
|
|
16
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
17
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
18
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
19
|
-
var getApiAccessToken = _authenticationProvider.default.getApiAccessToken;
|
|
20
|
-
var getClient = function getClient() {
|
|
21
|
-
return _axios.default.create({
|
|
22
|
-
headers: {
|
|
23
|
-
"Content-Type": "application/json"
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
};
|
|
27
|
-
exports.getClient = getClient;
|
|
28
|
-
var getSecureClient = function getSecureClient() {
|
|
29
|
-
return _axios.default.create({
|
|
30
|
-
headers: {
|
|
31
|
-
"Content-Type": "application/json",
|
|
32
|
-
Authorization: "Bearer ".concat(getApiAccessToken())
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
exports.getSecureClient = getSecureClient;
|
|
37
|
-
var get = /*#__PURE__*/function () {
|
|
38
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(url) {
|
|
39
|
-
var response, parsedError;
|
|
40
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
41
|
-
while (1) switch (_context.prev = _context.next) {
|
|
42
|
-
case 0:
|
|
43
|
-
_context.prev = 0;
|
|
44
|
-
_context.next = 3;
|
|
45
|
-
return getSecureClient().get(url);
|
|
46
|
-
case 3:
|
|
47
|
-
response = _context.sent;
|
|
48
|
-
return _context.abrupt("return", {
|
|
49
|
-
success: true,
|
|
50
|
-
data: response.data
|
|
51
|
-
});
|
|
52
|
-
case 7:
|
|
53
|
-
_context.prev = 7;
|
|
54
|
-
_context.t0 = _context["catch"](0);
|
|
55
|
-
console.warn("Get ".concat(url, " failed"));
|
|
56
|
-
parsedError = parseAxiosError(_context.t0);
|
|
57
|
-
return _context.abrupt("return", {
|
|
58
|
-
success: false,
|
|
59
|
-
data: parsedError
|
|
60
|
-
});
|
|
61
|
-
case 12:
|
|
62
|
-
case "end":
|
|
63
|
-
return _context.stop();
|
|
64
|
-
}
|
|
65
|
-
}, _callee, null, [[0, 7]]);
|
|
66
|
-
}));
|
|
67
|
-
return function get(_x) {
|
|
68
|
-
return _ref.apply(this, arguments);
|
|
69
|
-
};
|
|
70
|
-
}();
|
|
71
|
-
exports.get = get;
|
|
72
|
-
var post = /*#__PURE__*/function () {
|
|
73
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(url, data) {
|
|
74
|
-
var response, parsedError;
|
|
75
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
76
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
77
|
-
case 0:
|
|
78
|
-
_context2.prev = 0;
|
|
79
|
-
_context2.next = 3;
|
|
80
|
-
return getSecureClient().post(url, data);
|
|
81
|
-
case 3:
|
|
82
|
-
response = _context2.sent;
|
|
83
|
-
return _context2.abrupt("return", {
|
|
84
|
-
success: true,
|
|
85
|
-
data: response.data
|
|
86
|
-
});
|
|
87
|
-
case 7:
|
|
88
|
-
_context2.prev = 7;
|
|
89
|
-
_context2.t0 = _context2["catch"](0);
|
|
90
|
-
console.warn("Post ".concat(url, " failed"));
|
|
91
|
-
parsedError = parseAxiosError(_context2.t0);
|
|
92
|
-
return _context2.abrupt("return", {
|
|
93
|
-
success: false,
|
|
94
|
-
data: parsedError
|
|
95
|
-
});
|
|
96
|
-
case 12:
|
|
97
|
-
case "end":
|
|
98
|
-
return _context2.stop();
|
|
99
|
-
}
|
|
100
|
-
}, _callee2, null, [[0, 7]]);
|
|
101
|
-
}));
|
|
102
|
-
return function post(_x2, _x3) {
|
|
103
|
-
return _ref2.apply(this, arguments);
|
|
104
|
-
};
|
|
105
|
-
}();
|
|
106
|
-
exports.post = post;
|
|
107
|
-
var postClient = /*#__PURE__*/function () {
|
|
108
|
-
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(url, data) {
|
|
109
|
-
var response, parsedError;
|
|
110
|
-
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
111
|
-
while (1) switch (_context3.prev = _context3.next) {
|
|
112
|
-
case 0:
|
|
113
|
-
_context3.prev = 0;
|
|
114
|
-
_context3.next = 3;
|
|
115
|
-
return _axios.default.post(url, data);
|
|
116
|
-
case 3:
|
|
117
|
-
response = _context3.sent;
|
|
118
|
-
return _context3.abrupt("return", {
|
|
119
|
-
success: true,
|
|
120
|
-
data: response.data
|
|
121
|
-
});
|
|
122
|
-
case 7:
|
|
123
|
-
_context3.prev = 7;
|
|
124
|
-
_context3.t0 = _context3["catch"](0);
|
|
125
|
-
console.warn("Post ".concat(url, " failed"));
|
|
126
|
-
parsedError = parseAxiosError(_context3.t0);
|
|
127
|
-
return _context3.abrupt("return", {
|
|
128
|
-
success: false,
|
|
129
|
-
data: parsedError
|
|
130
|
-
});
|
|
131
|
-
case 12:
|
|
132
|
-
case "end":
|
|
133
|
-
return _context3.stop();
|
|
134
|
-
}
|
|
135
|
-
}, _callee3, null, [[0, 7]]);
|
|
136
|
-
}));
|
|
137
|
-
return function postClient(_x4, _x5) {
|
|
138
|
-
return _ref3.apply(this, arguments);
|
|
139
|
-
};
|
|
140
|
-
}();
|
|
141
|
-
exports.postClient = postClient;
|
|
142
|
-
var put = /*#__PURE__*/function () {
|
|
143
|
-
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(url, data) {
|
|
144
|
-
var response, parsedError;
|
|
145
|
-
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
146
|
-
while (1) switch (_context4.prev = _context4.next) {
|
|
147
|
-
case 0:
|
|
148
|
-
_context4.prev = 0;
|
|
149
|
-
_context4.next = 3;
|
|
150
|
-
return getSecureClient().put(url, data);
|
|
151
|
-
case 3:
|
|
152
|
-
response = _context4.sent;
|
|
153
|
-
return _context4.abrupt("return", {
|
|
154
|
-
success: true,
|
|
155
|
-
data: response.data
|
|
156
|
-
});
|
|
157
|
-
case 7:
|
|
158
|
-
_context4.prev = 7;
|
|
159
|
-
_context4.t0 = _context4["catch"](0);
|
|
160
|
-
console.warn("Put ".concat(url, " failed"));
|
|
161
|
-
parsedError = parseAxiosError(_context4.t0);
|
|
162
|
-
return _context4.abrupt("return", {
|
|
163
|
-
success: false,
|
|
164
|
-
data: parsedError
|
|
165
|
-
});
|
|
166
|
-
case 12:
|
|
167
|
-
case "end":
|
|
168
|
-
return _context4.stop();
|
|
169
|
-
}
|
|
170
|
-
}, _callee4, null, [[0, 7]]);
|
|
171
|
-
}));
|
|
172
|
-
return function put(_x6, _x7) {
|
|
173
|
-
return _ref4.apply(this, arguments);
|
|
174
|
-
};
|
|
175
|
-
}();
|
|
176
|
-
exports.put = put;
|
|
177
|
-
var doDelete = /*#__PURE__*/function () {
|
|
178
|
-
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(url) {
|
|
179
|
-
var parsedError;
|
|
180
|
-
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
181
|
-
while (1) switch (_context5.prev = _context5.next) {
|
|
182
|
-
case 0:
|
|
183
|
-
_context5.prev = 0;
|
|
184
|
-
_context5.next = 3;
|
|
185
|
-
return getSecureClient().delete(url);
|
|
186
|
-
case 3:
|
|
187
|
-
return _context5.abrupt("return", {
|
|
188
|
-
success: true
|
|
189
|
-
});
|
|
190
|
-
case 6:
|
|
191
|
-
_context5.prev = 6;
|
|
192
|
-
_context5.t0 = _context5["catch"](0);
|
|
193
|
-
console.warn("Delete ".concat(url, " failed"));
|
|
194
|
-
parsedError = parseAxiosError(_context5.t0);
|
|
195
|
-
return _context5.abrupt("return", {
|
|
196
|
-
success: false,
|
|
197
|
-
data: parsedError
|
|
198
|
-
});
|
|
199
|
-
case 11:
|
|
200
|
-
case "end":
|
|
201
|
-
return _context5.stop();
|
|
202
|
-
}
|
|
203
|
-
}, _callee5, null, [[0, 6]]);
|
|
204
|
-
}));
|
|
205
|
-
return function doDelete(_x8) {
|
|
206
|
-
return _ref5.apply(this, arguments);
|
|
207
|
-
};
|
|
208
|
-
}();
|
|
209
|
-
exports.doDelete = doDelete;
|
|
210
|
-
var parseAxiosError = function parseAxiosError(error) {
|
|
211
|
-
var parsedError = {
|
|
212
|
-
status: 500,
|
|
213
|
-
statusText: "Internal Server Error",
|
|
214
|
-
message: "An unexpected error occurred while processing your request. Please try again. If problem persists, please contact Tenjin support"
|
|
215
|
-
};
|
|
216
|
-
if (error && error.response) {
|
|
217
|
-
var _error$response$data$;
|
|
218
|
-
parsedError = _objectSpread(_objectSpread({}, parsedError), {}, {
|
|
219
|
-
status: error.response.status,
|
|
220
|
-
statusText: error.response.statusText,
|
|
221
|
-
message: error.response.status === 503 ? (_error$response$data$ = error.response.data.message) !== null && _error$response$data$ !== void 0 ? _error$response$data$ : "A network error occurred. Please try again" : error.response.status === 401 ? "Authentication Failed" : error.response.data ? error.response.data.message ? error.response.data.message : "An unexpected error occurred while processing your request. Please try again. If problem persists, please contact Tenjin support" : "An unexpected error occurred while processing your request. Please try again. If problem persists, please contact Tenjin support"
|
|
222
|
-
});
|
|
223
|
-
}
|
|
224
|
-
return parsedError;
|
|
225
|
-
};
|
|
226
|
-
exports.parseAxiosError = parseAxiosError;
|
package/public/favicon.ico
DELETED
|
Binary file
|
package/public/index.html
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
7
|
-
<meta name="theme-color" content="#000000" />
|
|
8
|
-
<meta
|
|
9
|
-
name="description"
|
|
10
|
-
content="Web site created using create-react-app"
|
|
11
|
-
/>
|
|
12
|
-
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
|
|
13
|
-
<!--
|
|
14
|
-
manifest.json provides metadata used when your web app is installed on a
|
|
15
|
-
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
|
16
|
-
-->
|
|
17
|
-
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
|
18
|
-
<!--
|
|
19
|
-
Notice the use of %PUBLIC_URL% in the tags above.
|
|
20
|
-
It will be replaced with the URL of the `public` folder during the build.
|
|
21
|
-
Only files inside the `public` folder can be referenced from the HTML.
|
|
22
|
-
|
|
23
|
-
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
|
|
24
|
-
work correctly both with client-side routing and a non-root public URL.
|
|
25
|
-
Learn how to configure a non-root public URL by running `npm run build`.
|
|
26
|
-
-->
|
|
27
|
-
<title>React App</title>
|
|
28
|
-
</head>
|
|
29
|
-
<body>
|
|
30
|
-
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
31
|
-
<div id="root"></div>
|
|
32
|
-
<!--
|
|
33
|
-
This HTML file is a template.
|
|
34
|
-
If you open it directly in the browser, you will see an empty page.
|
|
35
|
-
|
|
36
|
-
You can add webfonts, meta tags, or analytics to this file.
|
|
37
|
-
The build step will place the bundled scripts into the <body> tag.
|
|
38
|
-
|
|
39
|
-
To begin the development, run `npm start` or `yarn start`.
|
|
40
|
-
To create a production bundle, use `npm run build` or `yarn build`.
|
|
41
|
-
-->
|
|
42
|
-
</body>
|
|
43
|
-
</html>
|
package/public/logo192.png
DELETED
|
Binary file
|
package/public/logo512.png
DELETED
|
Binary file
|
package/public/manifest.json
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"short_name": "React App",
|
|
3
|
-
"name": "Create React App Sample",
|
|
4
|
-
"icons": [
|
|
5
|
-
{
|
|
6
|
-
"src": "favicon.ico",
|
|
7
|
-
"sizes": "64x64 32x32 24x24 16x16",
|
|
8
|
-
"type": "image/x-icon"
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"src": "logo192.png",
|
|
12
|
-
"type": "image/png",
|
|
13
|
-
"sizes": "192x192"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"src": "logo512.png",
|
|
17
|
-
"type": "image/png",
|
|
18
|
-
"sizes": "512x512"
|
|
19
|
-
}
|
|
20
|
-
],
|
|
21
|
-
"start_url": ".",
|
|
22
|
-
"display": "standalone",
|
|
23
|
-
"theme_color": "#000000",
|
|
24
|
-
"background_color": "#ffffff"
|
|
25
|
-
}
|
package/public/robots.txt
DELETED
package/public/tenjinLogo.png
DELETED
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|