tenjin-ui-kit 0.3.73 → 0.3.74

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 (107) hide show
  1. package/README.md +13 -13
  2. package/common/hooks/apiHooks.js +199 -91
  3. package/common/hooks/newApiHook.js +258 -127
  4. package/common/utils/security/index.js +2 -2
  5. package/common/utils/security/securityConfig.js +2 -1
  6. package/components/Canvas.js +101 -172
  7. package/components/DragBox/index.js +31 -21
  8. package/components/InputWithChip/index.js +83 -178
  9. package/components/RightContext/index.css +20 -20
  10. package/components/RightContext/index.js +41 -17
  11. package/components/WorkFlow.js +29 -19
  12. package/components/WorkFlowBuilder.js +56 -32
  13. package/components/alert/Style.js +14 -11
  14. package/components/alert/index.js +14 -8
  15. package/components/attachment/index.js +31 -26
  16. package/components/authenticationProvider/AuthError.js +4 -3
  17. package/components/authenticationProvider/AuthLoader.js +4 -3
  18. package/components/authenticationProvider/index.js +130 -58
  19. package/components/avatar/index.js +23 -24
  20. package/components/avatar/styles.js +77 -76
  21. package/components/breadCrumbs/index.js +89 -64
  22. package/components/breadCrumbs/style.js +4 -1
  23. package/components/browsingTestCaseLayout/DetailsViewLayout/DetailsViewContent/index.js +6 -7
  24. package/components/browsingTestCaseLayout/DetailsViewLayout/DetailsViewContent/style.js +8 -5
  25. package/components/browsingTestCaseLayout/DetailsViewLayout/DetailsViewHeader/index.js +6 -7
  26. package/components/browsingTestCaseLayout/TreeViewLayout/TreeViewContent/Index.js +7 -8
  27. package/components/browsingTestCaseLayout/TreeViewLayout/TreeViewHeader/Index.js +7 -8
  28. package/components/browsingTestCaseLayout/TreeViewLayout/TreeViewHeader/style.js +19 -16
  29. package/components/browsingTestCaseLayout/index.js +46 -30
  30. package/components/browsingTestCaseLayout/style.css +82 -82
  31. package/components/button/index.js +58 -47
  32. package/components/chatBotModal/index.js +61 -40
  33. package/components/checkBox/index.js +10 -8
  34. package/components/combobox/index.js +216 -182
  35. package/components/divider/index.js +18 -9
  36. package/components/editableField/index.js +46 -19
  37. package/components/error/index.js +12 -6
  38. package/components/errorBoundary/index.js +98 -74
  39. package/components/fileUploader/index.js +58 -46
  40. package/components/fileUploader/style.js +49 -46
  41. package/components/filter/ValueSelector.js +243 -148
  42. package/components/filter/index.js +66 -43
  43. package/components/iconButton/index.js +4 -3
  44. package/components/input/index.js +74 -60
  45. package/components/layout/index.js +49 -36
  46. package/components/layout/main/index.js +14 -13
  47. package/components/layout/main/style.js +14 -11
  48. package/components/layout/pageContent/index.js +7 -8
  49. package/components/layout/sidebar/FlatMenu.js +47 -51
  50. package/components/layout/sidebar/GroupedIconMenu.js +194 -169
  51. package/components/layout/sidebar/GroupedMenu.js +50 -45
  52. package/components/layout/sidebar/ProjectMenu.js +185 -165
  53. package/components/layout/sidebar/index.js +26 -27
  54. package/components/layout/sidebar/style.js +143 -138
  55. package/components/layout/topBar/ProjectTopbar.js +119 -86
  56. package/components/layout/topBar/UserAvatar.js +65 -51
  57. package/components/layout/topBar/index.js +41 -23
  58. package/components/loader/index.js +12 -9
  59. package/components/menu/index.js +42 -23
  60. package/components/modal/Modal.js +6 -5
  61. package/components/modal/index.js +20 -16
  62. package/components/modal/style.js +56 -53
  63. package/components/optionMenu/index.js +72 -57
  64. package/components/pagination/index.js +43 -23
  65. package/components/pagination/style.js +28 -25
  66. package/components/paginationUpdated/index.js +26 -19
  67. package/components/paper/index.js +22 -20
  68. package/components/paper/style.js +27 -24
  69. package/components/reactSelect/index.js +97 -64
  70. package/components/reactSelect/style.js +151 -131
  71. package/components/richTextEditor/index.js +48 -24
  72. package/components/select/GroupedSelect.js +100 -56
  73. package/components/select/SimpleSelect.js +99 -59
  74. package/components/select/index.js +69 -56
  75. package/components/simpleSelect/index.js +22 -18
  76. package/components/sort/index.js +36 -23
  77. package/components/switch/index.js +15 -14
  78. package/components/switch/style.js +32 -29
  79. package/components/switch/switch.js +47 -30
  80. package/components/table/ReactTable.js +83 -59
  81. package/components/table/SimpleTable.js +91 -67
  82. package/components/table/index.js +206 -300
  83. package/components/text/index.js +30 -22
  84. package/components/timeStamp/index.js +6 -4
  85. package/components/timeStamp/style.js +15 -12
  86. package/components/topBar/index.js +102 -86
  87. package/components/tree/index.js +58 -30
  88. package/components/tree/style.js +23 -20
  89. package/components/valuePicker/ValueSelector.js +160 -78
  90. package/components/valuePicker/index.js +50 -30
  91. package/components/wrapperLayout/layout/index.js +7 -8
  92. package/components/wrapperLayout/main/index.js +7 -8
  93. package/components/wrapperLayout/main/pageContainer/index.js +5 -6
  94. package/components/wrapperLayout/main/sideBar/index.js +175 -171
  95. package/components/wrapperLayout/main/sideBar/style.js +183 -177
  96. package/components/wrapperLayout/topBar/UserAvatar.js +5 -6
  97. package/components/wrapperLayout/topBar/avatar.js +18 -15
  98. package/components/wrapperLayout/topBar/index.js +107 -115
  99. package/components/wrapperLayout/topBar/menuIcon.js +5 -6
  100. package/components/wrapperLayout/topBar/style.js +64 -63
  101. package/http/index.js +188 -92
  102. package/index.js +55 -53
  103. package/package.json +124 -125
  104. package/templates/listPage/index.js +196 -168
  105. package/themes/default.js +7 -5
  106. package/themes/defaultSmall.js +3 -2
  107. 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
  });
@@ -11,188 +12,87 @@ var _Clear = _interopRequireDefault(require("@mui/icons-material/Clear"));
11
12
  var _styles = require("@mui/material/styles");
12
13
  var _propTypes = _interopRequireDefault(require("prop-types"));
13
14
  var _text = _interopRequireDefault(require("../text"));
14
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
- 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); }
16
- 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); } // import React, { useEffect, useState } from "react";
17
- // import Chip from "@mui/material/Chip";
18
- // import { FormControl, InputLabel, TextField } from "@mui/material";
19
- // import ClearIcon from "@mui/icons-material/Clear";
20
- // import { useTheme } from "@mui/material/styles";
21
- // import PropTypes from "prop-types";
22
- // import Text from "../text";
23
- // const InputWithChip = ({
24
- // value,
25
- // id,
26
- // onChange,
27
- // fullWidth,
28
- // label,
29
- // isRequired,
30
- // isDisabled,
31
- // errorMessage,
32
- // error,
33
- // initialValue,
34
- // ...rest
35
- // }) => {
36
- // const [chips, setChips] = useState(initialValue ? [...initialValue] : []);
37
- // const theme = useTheme();
38
- // const [txtValue, setTxtValue] = useState("");
39
- // useEffect(() => {
40
- // if (onChange) {
41
- // onChange(chips);
42
- // }
43
- // }, [chips]);
44
- // const onTextValueChange = (e) => {
45
- // const value = e.target.value.trim();
46
- // setTxtValue(value.replace(",", ""));
47
- // };
48
- // const handleAddChip = (event) => {
49
- // if (
50
- // (event.key === "Enter" ||
51
- // event.keyCode === 32 ||
52
- // event.keyCode === 188 ||
53
- // event.keyCode === 9 ||
54
- // event.type === "blur") &&
55
- // event.target.value.replace(",", "")
56
- // ) {
57
- // const {
58
- // target: { value },
59
- // } = event;
60
- // const newValue =
61
- // typeof value === "string"
62
- // ? value.replace(",", "").trim()
63
- // : value.trim();
64
- // // if (chips.includes(newValue)) return; //add if any info or anything needs to be shown
65
- // setChips([...chips, newValue]);
66
- // onChange([...chips, newValue]);
67
- // setTxtValue("");
68
- // event.target.parentNode.querySelector("input").value = "";
69
- // }
70
- // };
71
- // const handleDeleteChip = (chipToDelete) => {
72
- // setChips((chips) => chips.filter((chip) => chip !== chipToDelete));
73
- // };
74
- // return (
75
- // <div>
76
- // <FormControl variant="standard" fullWidth={fullWidth}>
77
- // {label && (
78
- // <Text color={theme.palette.grey[600]} required={isRequired}>
79
- // {label}
80
- // {isRequired ? <span style={{ color: "red" }}> * </span> : ""}
81
- // </Text>
82
- // )}
83
- // <TextField
84
- // value={txtValue}
85
- // {...rest}
86
- // id={id}
87
- // required={isRequired}
88
- // disabled={isDisabled}
89
- // onKeyDown={handleAddChip}
90
- // onBlur={(e) => {
91
- // if (!chips?.length > 0) {
92
- // setChips([]);
93
- // }
94
- // if (e.target.value !== "") {
95
- // handleAddChip(e);
96
- // }
97
- // }}
98
- // style={{ backgroundColor: isDisabled && "#E7E7E7" }}
99
- // sx={{
100
- // "& MuiOutlinedInput": { backgroundColor: isDisabled && "#E7E7E7" },
101
- // "& input": {
102
- // // backgroundColor: isDisabled && '#E7E7E7',
103
- // color: isDisabled && "#000000",
104
- // },
105
- // marginTop: label ? theme.spacing(1) : 0,
106
- // "& label": {
107
- // fontWeight: 500,
108
- // },
109
- // }}
110
- // onChange={onTextValueChange}
111
- // helperText={errorMessage}
112
- // error={error}
113
- // InputProps={{
114
- // startAdornment: chips.map((chip, index) => (
115
- // <Chip
116
- // key={`${chip}-${index}`}
117
- // label={<Text>{chip}</Text>}
118
- // onDelete={() => handleDeleteChip(chip)}
119
- // deleteIcon={<ClearIcon fontSize="small" />}
120
- // style={{ margin: "0.2rem" }}
121
- // size="small"
122
- // />
123
- // )),
124
- // }}
125
- // />
126
- // </FormControl>
127
- // </div>
128
- // );
129
- // };
130
- // InputWithChip.propTypes = {
131
- // label: PropTypes.string,
132
- // fullWidth: PropTypes.bool,
133
- // size: PropTypes.string,
134
- // isRequired: PropTypes.bool,
135
- // isDisabled: PropTypes.bool,
136
- // error: PropTypes.bool,
137
- // };
138
- // export default InputWithChip;
139
- const InputWithChip = _ref => {
140
- let {
141
- value,
142
- id,
143
- onChange,
144
- fullWidth,
145
- label,
146
- isRequired,
147
- isDisabled,
148
- errorMessage,
149
- error,
150
- initialValue,
151
- height,
152
- ...rest
153
- } = _ref;
154
- const [chips, setChips] = (0, _react.useState)(value ? [...value] : []);
155
- const theme = (0, _styles.useTheme)();
156
- const [txtValue, setTxtValue] = (0, _react.useState)("");
157
- const [duplicateWarnig, setDuplicateWarning] = (0, _react.useState)(null);
158
- (0, _react.useEffect)(() => {
15
+ var _excluded = ["value", "id", "onChange", "fullWidth", "label", "isRequired", "isDisabled", "errorMessage", "error", "initialValue", "height"];
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 _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); }
20
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
21
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
22
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
23
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
24
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
25
+ 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."); }
26
+ 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); }
27
+ 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; }
28
+ 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; } }
29
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
30
+ 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; }
31
+ 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; }
32
+ var InputWithChip = function InputWithChip(_ref) {
33
+ var value = _ref.value,
34
+ id = _ref.id,
35
+ onChange = _ref.onChange,
36
+ fullWidth = _ref.fullWidth,
37
+ label = _ref.label,
38
+ isRequired = _ref.isRequired,
39
+ isDisabled = _ref.isDisabled,
40
+ errorMessage = _ref.errorMessage,
41
+ error = _ref.error,
42
+ initialValue = _ref.initialValue,
43
+ height = _ref.height,
44
+ rest = _objectWithoutProperties(_ref, _excluded);
45
+ var _useState = (0, _react.useState)(value ? _toConsumableArray(value) : []),
46
+ _useState2 = _slicedToArray(_useState, 2),
47
+ chips = _useState2[0],
48
+ setChips = _useState2[1];
49
+ var theme = (0, _styles.useTheme)();
50
+ var _useState3 = (0, _react.useState)(""),
51
+ _useState4 = _slicedToArray(_useState3, 2),
52
+ txtValue = _useState4[0],
53
+ setTxtValue = _useState4[1];
54
+ var _useState5 = (0, _react.useState)(null),
55
+ _useState6 = _slicedToArray(_useState5, 2),
56
+ duplicateWarnig = _useState6[0],
57
+ setDuplicateWarning = _useState6[1];
58
+ (0, _react.useEffect)(function () {
159
59
  if (onChange) {
160
60
  onChange(chips);
161
61
  }
162
62
  }, [chips]);
163
- const onTextValueChange = e => {
164
- const value = e.target.value.trim();
63
+ var onTextValueChange = function onTextValueChange(e) {
64
+ var value = e.target.value.trim();
165
65
  setTxtValue(value.replace(",", ""));
166
66
  };
167
- const handleAddChip = event => {
67
+ var handleAddChip = function handleAddChip(event) {
168
68
  setDuplicateWarning({
169
69
  status: false,
170
- message: ``
70
+ message: ""
171
71
  });
172
72
  if ((event.key === "Enter" || event.keyCode === 32 || event.keyCode === 188 || event.keyCode === 9 || event.type === "blur") && event.target.value.replace(",", "")) {
173
- const {
174
- target: {
175
- value
176
- }
177
- } = event;
178
- const newValue = typeof value === "string" ? value.replace(",", "").trim() : value.trim();
73
+ var _value = event.target.value;
74
+ var newValue = typeof _value === "string" ? _value.replace(",", "").trim() : _value.trim();
179
75
  // if (chips.includes(newValue)) return; //add if any info or anything needs to be shown
180
- let isPresent = chips.includes(newValue);
76
+ var isPresent = chips.includes(newValue);
181
77
  if (isPresent) {
182
78
  setDuplicateWarning({
183
79
  status: true,
184
- message: `${newValue} already exists`
80
+ message: "".concat(newValue, " already exists")
185
81
  });
186
82
  } else {
187
- setChips([...chips, newValue]);
188
- onChange([...chips, newValue]);
83
+ setChips([].concat(_toConsumableArray(chips), [newValue]));
84
+ onChange([].concat(_toConsumableArray(chips), [newValue]));
189
85
  setTxtValue("");
190
86
  event.target.parentNode.querySelector("input").value = "";
191
87
  }
192
88
  }
193
89
  };
194
- const handleDeleteChip = chipToDelete => {
195
- setChips(chips => chips.filter(chip => chip !== chipToDelete));
90
+ var handleDeleteChip = function handleDeleteChip(chipToDelete) {
91
+ setChips(function (chips) {
92
+ return chips.filter(function (chip) {
93
+ return chip !== chipToDelete;
94
+ });
95
+ });
196
96
  };
197
97
  return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_material.FormControl, {
198
98
  variant: "standard",
@@ -211,8 +111,8 @@ const InputWithChip = _ref => {
211
111
  required: isRequired,
212
112
  disabled: isDisabled,
213
113
  onKeyDown: handleAddChip,
214
- onBlur: e => {
215
- if (!chips?.length > 0) {
114
+ onBlur: function onBlur(e) {
115
+ if (!(chips !== null && chips !== void 0 && chips.length) > 0) {
216
116
  setChips([]);
217
117
  }
218
118
  if (e.target.value !== "") {
@@ -250,26 +150,30 @@ const InputWithChip = _ref => {
250
150
  // />
251
151
  // )),
252
152
  // }}
253
- }))), duplicateWarnig?.status && /*#__PURE__*/_react.default.createElement(_material.Alert, {
153
+ }))), (duplicateWarnig === null || duplicateWarnig === void 0 ? void 0 : duplicateWarnig.status) && /*#__PURE__*/_react.default.createElement(_material.Alert, {
254
154
  severity: "warning"
255
- }, duplicateWarnig?.message), !!chips && /*#__PURE__*/_react.default.createElement(_material.Box, {
155
+ }, duplicateWarnig === null || duplicateWarnig === void 0 ? void 0 : duplicateWarnig.message), !!chips && /*#__PURE__*/_react.default.createElement(_material.Box, {
256
156
  maxHeight: theme.spacing(20),
257
157
  overflow: "auto"
258
158
  // border={!!chips && "1px solid #E7E7E7"}
259
159
  ,
260
160
  mt: theme.spacing(2)
261
- }, /*#__PURE__*/_react.default.createElement(_text.default, null, chips.map((chip, index) => /*#__PURE__*/_react.default.createElement(_Chip.default, {
262
- key: `${chip}-${index}`,
263
- label: /*#__PURE__*/_react.default.createElement(_text.default, null, chip),
264
- onDelete: () => handleDeleteChip(chip),
265
- deleteIcon: /*#__PURE__*/_react.default.createElement(_Clear.default, {
266
- fontSize: "small"
267
- }),
268
- style: {
269
- margin: "0.2rem"
270
- },
271
- size: "small"
272
- })))));
161
+ }, /*#__PURE__*/_react.default.createElement(_text.default, null, chips.map(function (chip, index) {
162
+ return /*#__PURE__*/_react.default.createElement(_Chip.default, {
163
+ key: "".concat(chip, "-").concat(index),
164
+ label: /*#__PURE__*/_react.default.createElement(_text.default, null, chip),
165
+ onDelete: function onDelete() {
166
+ return handleDeleteChip(chip);
167
+ },
168
+ deleteIcon: /*#__PURE__*/_react.default.createElement(_Clear.default, {
169
+ fontSize: "small"
170
+ }),
171
+ style: {
172
+ margin: "0.2rem"
173
+ },
174
+ size: "small"
175
+ });
176
+ }))));
273
177
  };
274
178
  InputWithChip.propTypes = {
275
179
  label: _propTypes.default.string,
@@ -279,4 +183,5 @@ InputWithChip.propTypes = {
279
183
  isDisabled: _propTypes.default.bool,
280
184
  error: _propTypes.default.bool
281
185
  };
282
- var _default = exports.default = InputWithChip;
186
+ var _default = InputWithChip;
187
+ exports.default = _default;
@@ -1,20 +1,20 @@
1
- .contextContainer {
2
- z-index: 1;
3
- width: 100%;
4
- height: 500px;
5
- background: #673ab7;
6
- }
7
- .rightClick {
8
- z-index: 12;
9
- position: fixed;
10
- background: rgb(240, 200, 1);
11
- }
12
- .menuElement {
13
- color: #222222;
14
- cursor: pointer;
15
- padding: 17px 36px;
16
- }
17
- .menuElement:hover {
18
- color: #fff;
19
- background: #009688;
20
- }
1
+ .contextContainer {
2
+ z-index: 1;
3
+ width: 100%;
4
+ height: 500px;
5
+ background: #673ab7;
6
+ }
7
+ .rightClick {
8
+ z-index: 12;
9
+ position: fixed;
10
+ background: rgb(240, 200, 1);
11
+ }
12
+ .menuElement {
13
+ color: #222222;
14
+ cursor: pointer;
15
+ padding: 17px 36px;
16
+ }
17
+ .menuElement:hover {
18
+ color: #fff;
19
+ background: #009688;
20
+ }
@@ -7,28 +7,43 @@ exports.default = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  require("./index.css");
9
9
  var _text = _interopRequireDefault(require("../text"));
10
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
- const RightContext = () => {
12
- const [context, setContext] = _react.default.useState(false);
13
- const [xYPosistion, setXyPosistion] = _react.default.useState({
14
- x: 0,
15
- y: 0
16
- });
17
- const showNav = event => {
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
12
+ 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."); }
13
+ 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); }
14
+ 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; }
15
+ 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; } }
16
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
17
+ var RightContext = function RightContext() {
18
+ var _React$useState = _react.default.useState(false),
19
+ _React$useState2 = _slicedToArray(_React$useState, 2),
20
+ context = _React$useState2[0],
21
+ setContext = _React$useState2[1];
22
+ var _React$useState3 = _react.default.useState({
23
+ x: 0,
24
+ y: 0
25
+ }),
26
+ _React$useState4 = _slicedToArray(_React$useState3, 2),
27
+ xYPosistion = _React$useState4[0],
28
+ setXyPosistion = _React$useState4[1];
29
+ var showNav = function showNav(event) {
18
30
  event.preventDefault();
19
31
  setContext(false);
20
- const positionChange = {
32
+ var positionChange = {
21
33
  x: event.pageX,
22
34
  y: event.pageY
23
35
  };
24
36
  setXyPosistion(positionChange);
25
37
  setContext(true);
26
38
  };
27
- const hideContext = event => {
39
+ var hideContext = function hideContext(event) {
28
40
  setContext(false);
29
41
  };
30
- const [chosen, setChosen] = _react.default.useState();
31
- const initMenu = chosen => {
42
+ var _React$useState5 = _react.default.useState(),
43
+ _React$useState6 = _slicedToArray(_React$useState5, 2),
44
+ chosen = _React$useState6[0],
45
+ setChosen = _React$useState6[1];
46
+ var initMenu = function initMenu(chosen) {
32
47
  setChosen(chosen);
33
48
  };
34
49
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_text.default, {
@@ -47,16 +62,25 @@ const RightContext = () => {
47
62
  className: "rightClick"
48
63
  }, /*#__PURE__*/_react.default.createElement("div", {
49
64
  className: "menuElement",
50
- onClick: () => initMenu("New")
65
+ onClick: function onClick() {
66
+ return initMenu("New");
67
+ }
51
68
  }, /*#__PURE__*/_react.default.createElement(_text.default, null, "Refactor")), /*#__PURE__*/_react.default.createElement("div", {
52
69
  className: "menuElement",
53
- onClick: () => initMenu("Delete")
70
+ onClick: function onClick() {
71
+ return initMenu("Delete");
72
+ }
54
73
  }, /*#__PURE__*/_react.default.createElement(_text.default, null, "Cut")), /*#__PURE__*/_react.default.createElement("div", {
55
74
  className: "menuElement",
56
- onClick: () => initMenu("Copy")
75
+ onClick: function onClick() {
76
+ return initMenu("Copy");
77
+ }
57
78
  }, /*#__PURE__*/_react.default.createElement(_text.default, null, "Copy")), /*#__PURE__*/_react.default.createElement("div", {
58
79
  className: "menuElement",
59
- onClick: () => initMenu("Paste")
80
+ onClick: function onClick() {
81
+ return initMenu("Paste");
82
+ }
60
83
  }, /*#__PURE__*/_react.default.createElement(_text.default, null, "Paste")))));
61
84
  };
62
- var _default = exports.default = RightContext;
85
+ var _default = RightContext;
86
+ exports.default = _default;
@@ -7,23 +7,32 @@ exports.default = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  var _reactDnd = require("react-dnd");
9
9
  var _text = _interopRequireDefault(require("./text"));
10
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
- const WorkFlow = props => {
12
- const {
13
- name,
14
- id
15
- } = props;
16
- const [{
17
- isDragging
18
- }, drag] = (0, _reactDnd.useDrag)(() => ({
19
- type: 'block',
20
- item: {
21
- id: props.id
22
- },
23
- collect: monitor => ({
24
- isDragging: !!monitor.isDragging()
25
- })
26
- }));
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
12
+ 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."); }
13
+ 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); }
14
+ 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; }
15
+ 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; } }
16
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
17
+ var WorkFlow = function WorkFlow(props) {
18
+ var name = props.name,
19
+ id = props.id;
20
+ var _useDrag = (0, _reactDnd.useDrag)(function () {
21
+ return {
22
+ type: 'block',
23
+ item: {
24
+ id: props.id
25
+ },
26
+ collect: function collect(monitor) {
27
+ return {
28
+ isDragging: !!monitor.isDragging()
29
+ };
30
+ }
31
+ };
32
+ }),
33
+ _useDrag2 = _slicedToArray(_useDrag, 2),
34
+ isDragging = _useDrag2[0].isDragging,
35
+ drag = _useDrag2[1];
27
36
  return /*#__PURE__*/_react.default.createElement("div", {
28
37
  ref: drag,
29
38
  width: "150px",
@@ -32,6 +41,7 @@ const WorkFlow = props => {
32
41
  }
33
42
  }, /*#__PURE__*/_react.default.createElement(_text.default, {
34
43
  variant: "h4"
35
- }, `WorkFlow- ${name}`));
44
+ }, "WorkFlow- ".concat(name)));
36
45
  };
37
- var _default = exports.default = WorkFlow;
46
+ var _default = WorkFlow;
47
+ exports.default = _default;