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.
Files changed (104) hide show
  1. package/common/hooks/apiHooks.js +182 -114
  2. package/common/hooks/newApiHook.js +225 -143
  3. package/common/utils/security/index.js +2 -2
  4. package/common/utils/security/securityConfig.js +2 -1
  5. package/components/Canvas.js +88 -164
  6. package/components/DragBox/index.js +26 -21
  7. package/components/InputWithChip/index.js +57 -164
  8. package/components/RightContext/index.js +28 -19
  9. package/components/WorkFlow.js +23 -18
  10. package/components/WorkFlowBuilder.js +48 -33
  11. package/components/alert/Style.js +14 -11
  12. package/components/alert/index.js +12 -10
  13. package/components/attachment/index.js +28 -21
  14. package/components/authenticationProvider/AuthError.js +4 -3
  15. package/components/authenticationProvider/AuthLoader.js +4 -3
  16. package/components/authenticationProvider/index.js +116 -60
  17. package/components/avatar/index.js +14 -13
  18. package/components/avatar/styles.js +77 -74
  19. package/components/breadCrumbs/index.js +53 -42
  20. package/components/breadCrumbs/style.js +4 -1
  21. package/components/browsingTestCaseLayout/DetailsViewLayout/DetailsViewContent/index.js +6 -5
  22. package/components/browsingTestCaseLayout/DetailsViewLayout/DetailsViewContent/style.js +8 -5
  23. package/components/browsingTestCaseLayout/DetailsViewLayout/DetailsViewHeader/index.js +5 -4
  24. package/components/browsingTestCaseLayout/TreeViewLayout/TreeViewContent/Index.js +5 -4
  25. package/components/browsingTestCaseLayout/TreeViewLayout/TreeViewHeader/Index.js +6 -5
  26. package/components/browsingTestCaseLayout/TreeViewLayout/TreeViewHeader/style.js +19 -16
  27. package/components/browsingTestCaseLayout/index.js +30 -25
  28. package/components/button/index.js +43 -36
  29. package/components/chatBotModal/index.js +45 -36
  30. package/components/checkBox/index.js +9 -8
  31. package/components/combobox/index.js +72 -51
  32. package/components/divider/index.js +18 -14
  33. package/components/editableField/index.js +28 -19
  34. package/components/error/index.js +12 -6
  35. package/components/errorBoundary/index.js +94 -74
  36. package/components/fileUploader/index.js +35 -30
  37. package/components/fileUploader/style.js +49 -46
  38. package/components/filter/ValueSelector.js +210 -137
  39. package/components/filter/index.js +39 -29
  40. package/components/iconButton/index.js +4 -3
  41. package/components/input/index.js +38 -31
  42. package/components/layout/index.js +31 -27
  43. package/components/layout/main/index.js +13 -10
  44. package/components/layout/main/style.js +14 -11
  45. package/components/layout/pageContent/index.js +7 -6
  46. package/components/layout/sidebar/FlatMenu.js +43 -43
  47. package/components/layout/sidebar/GroupedIconMenu.js +108 -95
  48. package/components/layout/sidebar/GroupedMenu.js +48 -38
  49. package/components/layout/sidebar/ProjectMenu.js +116 -109
  50. package/components/layout/sidebar/index.js +18 -15
  51. package/components/layout/sidebar/style.js +143 -138
  52. package/components/layout/topBar/ProjectTopbar.js +138 -104
  53. package/components/layout/topBar/UserAvatar.js +60 -51
  54. package/components/layout/topBar/index.js +33 -22
  55. package/components/loader/index.js +12 -9
  56. package/components/menu/index.js +35 -26
  57. package/components/modal/Modal.js +6 -5
  58. package/components/modal/index.js +13 -10
  59. package/components/modal/style.js +56 -53
  60. package/components/optionMenu/index.js +41 -34
  61. package/components/pagination/index.js +39 -24
  62. package/components/pagination/style.js +28 -25
  63. package/components/paginationUpdated/index.js +16 -14
  64. package/components/paper/index.js +16 -15
  65. package/components/paper/style.js +27 -24
  66. package/components/reactSelect/index.js +63 -46
  67. package/components/reactSelect/style.js +150 -117
  68. package/components/richTextEditor/index.js +44 -25
  69. package/components/select/GroupedSelect.js +61 -45
  70. package/components/select/SimpleSelect.js +82 -52
  71. package/components/select/index.js +54 -38
  72. package/components/simpleSelect/index.js +15 -12
  73. package/components/sort/index.js +22 -19
  74. package/components/switch/index.js +11 -10
  75. package/components/switch/style.js +32 -29
  76. package/components/switch/switch.js +23 -17
  77. package/components/table/ReactTable.js +71 -54
  78. package/components/table/SimpleTable.js +78 -59
  79. package/components/table/index.js +186 -311
  80. package/components/text/index.js +17 -15
  81. package/components/timeStamp/index.js +9 -4
  82. package/components/timeStamp/style.js +15 -12
  83. package/components/topBar/index.js +92 -85
  84. package/components/tree/index.js +47 -29
  85. package/components/tree/style.js +23 -20
  86. package/components/valuePicker/ValueSelector.js +138 -70
  87. package/components/valuePicker/index.js +26 -19
  88. package/components/wrapperLayout/layout/index.js +5 -4
  89. package/components/wrapperLayout/main/index.js +5 -4
  90. package/components/wrapperLayout/main/pageContainer/index.js +5 -4
  91. package/components/wrapperLayout/main/sideBar/index.js +110 -120
  92. package/components/wrapperLayout/main/sideBar/style.js +183 -177
  93. package/components/wrapperLayout/topBar/UserAvatar.js +5 -4
  94. package/components/wrapperLayout/topBar/avatar.js +12 -10
  95. package/components/wrapperLayout/topBar/index.js +97 -111
  96. package/components/wrapperLayout/topBar/menuIcon.js +5 -4
  97. package/components/wrapperLayout/topBar/style.js +64 -61
  98. package/http/index.js +184 -91
  99. package/index.js +55 -53
  100. package/package.json +2 -4
  101. package/templates/listPage/index.js +57 -36
  102. package/themes/default.js +7 -5
  103. package/themes/defaultSmall.js +3 -2
  104. package/themes/responsiveTheme.js +8 -6
@@ -6,185 +6,191 @@ 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(e) { return e && e.__esModule ? e : { default: e }; }
10
- const drawerWidth = 248;
11
- const useStyles = (0, _styles.makeStyles)(() => ({
12
- drawerClose: {
13
- transition: _default2.default.transitions.create('width', {
14
- easing: _default2.default.transitions.easing.sharp,
15
- duration: _default2.default.transitions.duration.leavingScreen
16
- }),
17
- overflowX: 'hidden',
18
- width: _default2.default.spacing(7) + '1px',
19
- [_default2.default.breakpoints.up('sm')]: {
9
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
11
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
12
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
13
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
14
+ var drawerWidth = 248;
15
+ var useStyles = (0, _styles.makeStyles)(function () {
16
+ return {
17
+ drawerClose: _defineProperty({
18
+ transition: _default2.default.transitions.create('width', {
19
+ easing: _default2.default.transitions.easing.sharp,
20
+ duration: _default2.default.transitions.duration.leavingScreen
21
+ }),
22
+ overflowX: 'hidden',
23
+ width: _default2.default.spacing(7) + '1px'
24
+ }, _default2.default.breakpoints.up('sm'), {
20
25
  width: _default2.default.spacing(8.75) + '2px'
21
- }
22
- },
23
- drawerOpen: {
24
- width: drawerWidth,
25
- transition: _default2.default.transitions.create('width', {
26
- easing: _default2.default.transitions.easing.sharp,
27
- duration: _default2.default.transitions.duration.enteringScreen
28
- })
29
- },
30
- drawer: {
31
- flexShrink: 0,
32
- whiteSpace: 'nowrap',
33
- boxShadow: '0px 3px 30px #667CBC30',
34
- '& .MuiPaper-root': {
35
- borderRadius: '.3rem',
36
- position: 'relative',
26
+ }),
27
+ drawerOpen: {
28
+ width: drawerWidth,
29
+ transition: _default2.default.transitions.create('width', {
30
+ easing: _default2.default.transitions.easing.sharp,
31
+ duration: _default2.default.transitions.duration.enteringScreen
32
+ })
33
+ },
34
+ drawer: {
35
+ flexShrink: 0,
36
+ whiteSpace: 'nowrap',
37
+ boxShadow: '0px 3px 30px #667CBC30',
38
+ '& .MuiPaper-root': {
39
+ borderRadius: '.3rem',
40
+ position: 'relative',
41
+ display: 'flex',
42
+ flexFlow: 'column'
43
+ }
44
+ },
45
+ toolbar: {
37
46
  display: 'flex',
38
- flexFlow: 'column'
39
- }
40
- },
41
- toolbar: {
42
- display: 'flex',
43
- justifyContent: 'center',
44
- flexDirection: 'column',
45
- height: '100%'
46
- },
47
- navigationArrow: {
48
- transition: '.5s'
49
- },
50
- rightArrow: {
51
- transform: 'rotate(-180deg)'
52
- },
53
- list: {
54
- margin: _default2.default.spacing(2.5, 0.8),
55
- overflow: 'hidden'
56
- },
57
- listItem: {
58
- display: 'flex',
59
- textDecoration: 'none',
60
- transition: '.3s',
61
- color: _default2.default.palette.text.main,
62
- alignItems: 'center',
63
- borderRadius: '.3rem',
64
- marginBottom: _default2.default.spacing(2),
65
- '& .MuiListItemIcon-root': {
66
- marginLeft: _default2.default.spacing(0.5),
67
- minHeight: '30px',
68
- minWidth: '0px',
47
+ justifyContent: 'center',
48
+ flexDirection: 'column',
49
+ height: '100%'
50
+ },
51
+ navigationArrow: {
52
+ transition: '.5s'
53
+ },
54
+ rightArrow: {
55
+ transform: 'rotate(-180deg)'
56
+ },
57
+ list: {
58
+ margin: _default2.default.spacing(2.5, 0.8),
59
+ overflow: 'hidden'
60
+ },
61
+ listItem: {
69
62
  display: 'flex',
63
+ textDecoration: 'none',
64
+ transition: '.3s',
65
+ color: _default2.default.palette.text.main,
70
66
  alignItems: 'center',
71
- justifyContent: 'center'
72
- },
73
- '& .MuiListItemIcon-root .icon': {
74
- transition: '.5s',
75
- color: _default2.default.palette.primary.main,
76
- fontSize: "1rem"
77
- },
78
- '& .MuiTypography-root': {
79
- fontWeight: 600,
80
- fontSize: '1vw',
81
- // fontFamily: theme.typography.fontFamily,
82
- marginLeft: '1rem'
83
- }
84
- },
85
- listItemActive: {
86
- background: 'linear-gradient(180deg, rgba(97,94,173,1) 29%, rgba(71,66,156,1) 100%)',
87
- color: 'white',
88
- width: '100%',
89
- '& .MuiListItemIcon-root .icon': {
90
- color: 'white'
91
- },
92
- '& .MuiListItemIcon-root': {
93
- color: 'white'
67
+ borderRadius: '.3rem',
68
+ marginBottom: _default2.default.spacing(2),
69
+ '& .MuiListItemIcon-root': {
70
+ marginLeft: _default2.default.spacing(0.5),
71
+ minHeight: '30px',
72
+ minWidth: '0px',
73
+ display: 'flex',
74
+ alignItems: 'center',
75
+ justifyContent: 'center'
76
+ },
77
+ '& .MuiListItemIcon-root .icon': {
78
+ transition: '.5s',
79
+ color: _default2.default.palette.primary.main,
80
+ fontSize: "1rem"
81
+ },
82
+ '& .MuiTypography-root': {
83
+ fontWeight: 600,
84
+ fontSize: '1vw',
85
+ // fontFamily: theme.typography.fontFamily,
86
+ marginLeft: '1rem'
87
+ }
88
+ },
89
+ listItemActive: {
90
+ background: 'linear-gradient(180deg, rgba(97,94,173,1) 29%, rgba(71,66,156,1) 100%)',
91
+ color: 'white',
92
+ width: '100%',
93
+ '& .MuiListItemIcon-root .icon': {
94
+ color: 'white'
95
+ },
96
+ '& .MuiListItemIcon-root': {
97
+ color: 'white'
98
+ }
99
+ },
100
+ sideBarIcon: {
101
+ margin: 'auto .8rem .8rem .8rem',
102
+ width: 'calc(100% - 1.4rem)',
103
+ backgroundColor: '#EEF3FC',
104
+ borderRadius: '7px !important',
105
+ display: 'flex',
106
+ justifyContent: 'center',
107
+ alignItems: 'center'
108
+ },
109
+ sidebarMenuContainer: {
110
+ flexGrow: 1
111
+ },
112
+ scrollableList: {
113
+ height: '100%',
114
+ maxHeight: '100%',
115
+ overflowY: 'auto',
116
+ padding: '0.5rem 0.5rem 0.5rem 0.6rem'
117
+ },
118
+ tooltip: {
119
+ fontSize: _default2.default.typography.fontSize
120
+ },
121
+ wrapper: {
122
+ backgroundColor: '#fff !important',
123
+ // margin: '0.5rem !important',
124
+ marginRight: '0.5rem !important',
125
+ height: 'calc(100vh - 76.5px) !important',
126
+ overflowY: 'auto !important',
127
+ borderRadius: '7px !important',
128
+ width: '304px !important',
129
+ padding: '8px !important',
130
+ minWidth: '304px !important'
131
+ },
132
+ wrapper___webkit_scrollbar: {
133
+ width: '1px',
134
+ height: '1px !important'
135
+ },
136
+ wrapper___webkit_scrollbar_thumb: {
137
+ background: '#c5c5c5'
138
+ },
139
+ headstyle: {
140
+ display: 'flex !important',
141
+ flexDirection: 'column !important',
142
+ paddingLeft: '0.4rem'
143
+ },
144
+ menustyle: {
145
+ color: '#d6d9e0',
146
+ fontSize: '12px',
147
+ fontFamily: '"Segoe UI"',
148
+ textTransform: 'uppercase',
149
+ opacity: '1',
150
+ fontWeight: '600',
151
+ padding: '0.5rem'
152
+ },
153
+ menuItem: {
154
+ color: '#44409a !important',
155
+ opacity: '1 !important',
156
+ fontFamily: '"Segoe UI" !important',
157
+ fontWeight: '600 !important',
158
+ fontSize: '10px !important'
159
+ },
160
+ menuTitle: {
161
+ marginBottom: '0.5rem'
162
+ },
163
+ headTitle: {
164
+ top: '191px',
165
+ left: '36px',
166
+ width: '130px',
167
+ height: '19px',
168
+ // font: 'normal normal 600 14px/19px Segoe UI',
169
+ font: 'normal normal 600 13px/14px Segoe UI',
170
+ letterSpacing: '0px',
171
+ color: '#d6d9e0',
172
+ textAlign: 'left',
173
+ textTransform: 'uppercase',
174
+ opacity: '1'
175
+ },
176
+ menuOptionsTitle: {
177
+ top: '236px',
178
+ left: '36px',
179
+ width: '150px',
180
+ height: '24px',
181
+ font: 'normal normal 600 13px/14px Segoe UI',
182
+ letterSpacing: '0px',
183
+ color: '#44409a',
184
+ textAlign: 'left',
185
+ opacity: '1',
186
+ textTransform: 'none',
187
+ padding: '0.3rem',
188
+ cursor: 'pointer'
189
+ },
190
+ label: {
191
+ fontSize: '0.8rem'
94
192
  }
95
- },
96
- sideBarIcon: {
97
- margin: 'auto .8rem .8rem .8rem',
98
- width: 'calc(100% - 1.4rem)',
99
- backgroundColor: '#EEF3FC',
100
- borderRadius: '7px !important',
101
- display: 'flex',
102
- justifyContent: 'center',
103
- alignItems: 'center'
104
- },
105
- sidebarMenuContainer: {
106
- flexGrow: 1
107
- },
108
- scrollableList: {
109
- height: '100%',
110
- maxHeight: '100%',
111
- overflowY: 'auto',
112
- padding: '0.5rem 0.5rem 0.5rem 0.6rem'
113
- },
114
- tooltip: {
115
- fontSize: _default2.default.typography.fontSize
116
- },
117
- wrapper: {
118
- backgroundColor: '#fff !important',
119
- // margin: '0.5rem !important',
120
- marginRight: '0.5rem !important',
121
- height: 'calc(100vh - 76.5px) !important',
122
- overflowY: 'auto !important',
123
- borderRadius: '7px !important',
124
- width: '304px !important',
125
- padding: '8px !important',
126
- minWidth: '304px !important'
127
- },
128
- wrapper___webkit_scrollbar: {
129
- width: '1px',
130
- height: '1px !important'
131
- },
132
- wrapper___webkit_scrollbar_thumb: {
133
- background: '#c5c5c5'
134
- },
135
- headstyle: {
136
- display: 'flex !important',
137
- flexDirection: 'column !important',
138
- paddingLeft: '0.4rem'
139
- },
140
- menustyle: {
141
- color: '#d6d9e0',
142
- fontSize: '12px',
143
- fontFamily: '"Segoe UI"',
144
- textTransform: 'uppercase',
145
- opacity: '1',
146
- fontWeight: '600',
147
- padding: '0.5rem'
148
- },
149
- menuItem: {
150
- color: '#44409a !important',
151
- opacity: '1 !important',
152
- fontFamily: '"Segoe UI" !important',
153
- fontWeight: '600 !important',
154
- fontSize: '10px !important'
155
- },
156
- menuTitle: {
157
- marginBottom: '0.5rem'
158
- },
159
- headTitle: {
160
- top: '191px',
161
- left: '36px',
162
- width: '130px',
163
- height: '19px',
164
- // font: 'normal normal 600 14px/19px Segoe UI',
165
- font: 'normal normal 600 13px/14px Segoe UI',
166
- letterSpacing: '0px',
167
- color: '#d6d9e0',
168
- textAlign: 'left',
169
- textTransform: 'uppercase',
170
- opacity: '1'
171
- },
172
- menuOptionsTitle: {
173
- top: '236px',
174
- left: '36px',
175
- width: '150px',
176
- height: '24px',
177
- font: 'normal normal 600 13px/14px Segoe UI',
178
- letterSpacing: '0px',
179
- color: '#44409a',
180
- textAlign: 'left',
181
- opacity: '1',
182
- textTransform: 'none',
183
- padding: '0.3rem',
184
- cursor: 'pointer'
185
- },
186
- label: {
187
- fontSize: '0.8rem'
188
- }
189
- }));
190
- var _default = exports.default = useStyles;
193
+ };
194
+ });
195
+ var _default = useStyles;
196
+ exports.default = _default;
@@ -7,10 +7,11 @@ exports.default = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
  var _text = _interopRequireDefault(require("../../text"));
10
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
- const UserAvatar = _ref => {
12
- let loggedInUser = _ref.loggedInUser;
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+ var UserAvatar = function UserAvatar(_ref) {
12
+ var loggedInUser = _ref.loggedInUser;
13
13
  return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_text.default, null, "UserAvatar"));
14
14
  };
15
15
  UserAvatar.propTypes = {};
16
- var _default = exports.default = UserAvatar;
16
+ var _default = UserAvatar;
17
+ exports.default = _default;
@@ -9,18 +9,20 @@ var _material = require("@mui/material");
9
9
  var _Stack = _interopRequireDefault(require("@mui/material/Stack"));
10
10
  var _style = _interopRequireDefault(require("./style"));
11
11
  var _clsx = _interopRequireDefault(require("clsx"));
12
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
14
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
14
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
16
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
15
17
  function stringToColor(string) {
16
- let hash = 0;
17
- let i;
18
+ var hash = 0;
19
+ var i;
18
20
  for (i = 0; i < string.length; i += 1) {
19
21
  hash = string.charCodeAt(i) + ((hash << 5) - hash);
20
22
  }
21
- let color = "#";
23
+ var color = "#";
22
24
  for (i = 0; i < 3; i += 1) {
23
- const value = hash >> i * 8 & 0xff;
25
+ var value = hash >> i * 8 & 0xff;
24
26
  color += "00".concat(value.toString(16)).slice(-2);
25
27
  }
26
28
  return color;
@@ -39,9 +41,9 @@ function stringAvatar(name, height, width) {
39
41
  }
40
42
  function Avatar(props) {
41
43
  var _props$loggedInUser, _props$loggedInUser2;
42
- let name = typeof props.loggedInUser !== "object" ? props.loggedInUser : (_props$loggedInUser = props.loggedInUser) === null || _props$loggedInUser === void 0 ? void 0 : _props$loggedInUser.firstName;
43
- let lastName = ((_props$loggedInUser2 = props.loggedInUser) === null || _props$loggedInUser2 === void 0 ? void 0 : _props$loggedInUser2.lastName) !== undefined ? props.loggedInUser.lastName : "";
44
- const classes = (0, _style.default)();
44
+ var name = _typeof(props.loggedInUser) !== "object" ? props.loggedInUser : (_props$loggedInUser = props.loggedInUser) === null || _props$loggedInUser === void 0 ? void 0 : _props$loggedInUser.firstName;
45
+ var lastName = ((_props$loggedInUser2 = props.loggedInUser) === null || _props$loggedInUser2 === void 0 ? void 0 : _props$loggedInUser2.lastName) !== undefined ? props.loggedInUser.lastName : "";
46
+ var classes = (0, _style.default)();
45
47
  return /*#__PURE__*/React.createElement(_Stack.default, {
46
48
  direction: "row",
47
49
  spacing: 2