tenjin-ui-kit 0.3.71 → 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 +191 -90
  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 +19 -16
  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 +4 -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
@@ -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,154 +12,75 @@ var _WorkFlow = _interopRequireDefault(require("./WorkFlow"));
11
12
  require("../../App.css");
12
13
  var _material = require("@mui/material");
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 _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
15
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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 _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
19
+ 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."); }
20
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
21
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
22
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
17
23
  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."); }
18
- function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
19
- function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
20
- function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
21
- function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } // import { Grid } from '@mui/material';
22
- // import React, { useState } from 'react';
23
- // const Canvas = () => {
24
- // const [inputBoxes, setInputBoxes] = useState([]);
25
- // let [type, setType] = useState(null);
26
- // const addInputBox = () => {
27
- // setInputBoxes([...inputBoxes, { label: 'Text', value: '' }]);
28
- // setType('input');
29
- // };
30
- // const handleInputChange = (index, event) => {
31
- // const values = [...inputBoxes];
32
- // values[index] = event.target.value;
33
- // setInputBoxes(values);
34
- // };
35
- // const addIfElseInputBox = () => {
36
- // setInputBoxes([
37
- // ...inputBoxes,
38
- // { label: 'If', value: '' },
39
- // { label: 'Else', value: '' },
40
- // ]);
41
- // setType('if_else');
42
- // };
43
- // // const handleIfElseInputChange = (index, event) => {
44
- // // const values = [...inputBoxes];
45
- // // values[index] = event.target.value;
46
- // // setInputBoxes(values);
47
- // // };
48
- // return (
49
- // <div
50
- // style={{
51
- // border: '1px solid black',
52
- // padding: '10px',
53
- // display: 'inline-block',
54
- // }}
55
- // >
56
- // <div
57
- // style={{
58
- // display: 'flex',
59
- // justifyContent: 'center',
60
- // alignItems: 'center',
61
- // }}
62
- // >
63
- // <div
64
- // style={{ fontSize: '30px', cursor: 'pointer' }}
65
- // onClick={addInputBox}
66
- // title="Add Text Box"
67
- // >
68
- // +
69
- // </div>
70
- // </div>
71
- // <div
72
- // style={{
73
- // display: 'flex',
74
- // justifyContent: 'center',
75
- // alignItems: 'center',
76
- // }}
77
- // >
78
- // <div
79
- // style={{ fontSize: '30px', cursor: 'pointer' }}
80
- // onClick={addIfElseInputBox}
81
- // title="Add If Else Box"
82
- // >
83
- // +
84
- // </div>
85
- // </div>
86
- // {inputBoxes.map((box, index) => (
87
- // <Grid item container>
88
- // <Grid item xs>
89
- // <div
90
- // style={{
91
- // border: '1px solid black',
92
- // padding: '10px',
93
- // display: 'inline-block',
94
- // }}
95
- // >
96
- // <div key={index} style={{ marginTop: '1rem' }}>
97
- // <label htmlFor={`${type}-${index}`}>{box.label}</label>
98
- // <br />
99
- // <input
100
- // id={`${type}-${index}`}
101
- // type="text"
102
- // value={box.value}
103
- // onChange={(e) => {
104
- // const updatedBoxes = [...inputBoxes];
105
- // updatedBoxes[index].value = e.target.value;
106
- // setInputBoxes(updatedBoxes);
107
- // }}
108
- // />
109
- // </div>
110
- // </div>
111
- // </Grid>
112
- // </Grid>
113
- // ))}
114
- // </div>
115
- // );
116
- // };
117
- // export default Canvas;
118
- ///New
119
- const Canvas = () => {
24
+ 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); }
25
+ 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; }
26
+ 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; } }
27
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
28
+ var Canvas = function Canvas() {
120
29
  return /*#__PURE__*/_react.default.createElement(_reactDnd.DndProvider, {
121
30
  backend: _reactDndHtml5Backend.HTML5Backend
122
31
  }, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(DragDrop, null)));
123
32
  };
124
- var _default = exports.default = Canvas;
125
- const WorkFlowList = [{
33
+ var _default = Canvas;
34
+ exports.default = _default;
35
+ var WorkFlowList = [{
126
36
  id: 1,
127
37
  name: "If Else Box"
128
38
  }, {
129
39
  id: 2,
130
40
  name: "Simple Text Box"
131
41
  }];
132
- const DragDrop = () => {
133
- const _useState = (0, _react.useState)([]),
42
+ var DragDrop = function DragDrop() {
43
+ var _useState = (0, _react.useState)([]),
134
44
  _useState2 = _slicedToArray(_useState, 2),
135
45
  board = _useState2[0],
136
46
  setBoard = _useState2[1];
137
- const _useDrop = (0, _reactDnd.useDrop)(() => ({
138
- accept: "block",
139
- drop: item => addBlockToBoard(item.id, true),
140
- collect: monitor => ({
141
- isOver: !!monitor.isOver()
142
- })
143
- })),
47
+ var _useDrop = (0, _reactDnd.useDrop)(function () {
48
+ return {
49
+ accept: "block",
50
+ drop: function drop(item) {
51
+ return addBlockToBoard(item.id, true);
52
+ },
53
+ collect: function collect(monitor) {
54
+ return {
55
+ isOver: !!monitor.isOver()
56
+ };
57
+ }
58
+ };
59
+ }),
144
60
  _useDrop2 = _slicedToArray(_useDrop, 2),
145
61
  isOver = _useDrop2[0].isOver,
146
62
  drop = _useDrop2[1];
147
- const addBlockToBoard = (id, isDropped) => {
148
- const workFlowList = WorkFlowList.filter(workflow => id === workflow.id);
149
- const workflow = {
63
+ var addBlockToBoard = function addBlockToBoard(id, isDropped) {
64
+ var workFlowList = WorkFlowList.filter(function (workflow) {
65
+ return id === workflow.id;
66
+ });
67
+ var workflow = {
150
68
  name: workFlowList[0].name,
151
69
  id: workFlowList[0].id
152
70
  };
153
71
  if (isDropped) {
154
- setBoard(board => [...board, workflow]);
72
+ setBoard(function (board) {
73
+ return [].concat(_toConsumableArray(board), [workflow]);
74
+ });
155
75
  } else {
156
- setBoard(board => [...board, workflow.name]);
76
+ setBoard(function (board) {
77
+ return [].concat(_toConsumableArray(board), [workflow.name]);
78
+ });
157
79
  }
158
80
  };
159
81
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
160
82
  className: "WorkFlow"
161
- }, WorkFlowList === null || WorkFlowList === void 0 ? void 0 : WorkFlowList.map(workflow => {
83
+ }, WorkFlowList === null || WorkFlowList === void 0 ? void 0 : WorkFlowList.map(function (workflow) {
162
84
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_WorkFlow.default, {
163
85
  name: workflow.name,
164
86
  id: workflow.id
@@ -166,7 +88,7 @@ const DragDrop = () => {
166
88
  })), /*#__PURE__*/_react.default.createElement("div", {
167
89
  className: "Board",
168
90
  ref: drop
169
- }, board === null || board === void 0 ? void 0 : board.map((workflow, index) => {
91
+ }, board === null || board === void 0 ? void 0 : board.map(function (workflow, index) {
170
92
  return /*#__PURE__*/_react.default.createElement("div", {
171
93
  key: index
172
94
  }, workflow.name === "If Else Box" ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
@@ -226,35 +148,35 @@ const DragDrop = () => {
226
148
  }));
227
149
  };
228
150
  exports.DragDrop = DragDrop;
229
- const AddNewBox = () => {
230
- const _useState3 = (0, _react.useState)([]),
151
+ var AddNewBox = function AddNewBox() {
152
+ var _useState3 = (0, _react.useState)([]),
231
153
  _useState4 = _slicedToArray(_useState3, 2),
232
154
  inputBoxes = _useState4[0],
233
155
  setInputBoxes = _useState4[1];
234
- let _useState5 = (0, _react.useState)(null),
156
+ var _useState5 = (0, _react.useState)(null),
235
157
  _useState6 = _slicedToArray(_useState5, 2),
236
158
  type = _useState6[0],
237
159
  setType = _useState6[1];
238
- const addInputBox = () => {
239
- setInputBoxes([...inputBoxes, {
160
+ var addInputBox = function addInputBox() {
161
+ setInputBoxes([].concat(_toConsumableArray(inputBoxes), [{
240
162
  label: "Text",
241
163
  value: ""
242
- }]);
164
+ }]));
243
165
  setType("input");
244
166
  };
245
- const handleInputChange = (index, event) => {
246
- const values = [...inputBoxes];
167
+ var handleInputChange = function handleInputChange(index, event) {
168
+ var values = _toConsumableArray(inputBoxes);
247
169
  values[index] = event.target.value;
248
170
  setInputBoxes(values);
249
171
  };
250
- const addIfElseInputBox = () => {
251
- setInputBoxes([...inputBoxes, {
172
+ var addIfElseInputBox = function addIfElseInputBox() {
173
+ setInputBoxes([].concat(_toConsumableArray(inputBoxes), [{
252
174
  label: "If",
253
175
  value: ""
254
176
  }, {
255
177
  label: "Else",
256
178
  value: ""
257
- }]);
179
+ }]));
258
180
  setType("if_else");
259
181
  };
260
182
 
@@ -296,35 +218,37 @@ const AddNewBox = () => {
296
218
  },
297
219
  onClick: addIfElseInputBox,
298
220
  title: "Add If Else Box"
299
- }, /*#__PURE__*/_react.default.createElement(_text.default, null, "+"))), inputBoxes.map((box, index) => /*#__PURE__*/_react.default.createElement(_material.Grid, {
300
- item: true,
301
- container: true
302
- }, /*#__PURE__*/_react.default.createElement(_material.Grid, {
303
- item: true,
304
- xs: true
305
- }, /*#__PURE__*/_react.default.createElement("div", {
306
- style: {
307
- border: "1px solid black",
308
- padding: "10px",
309
- display: "inline-block",
310
- margin: "0.5rem"
311
- }
312
- }, /*#__PURE__*/_react.default.createElement("div", {
313
- key: index,
314
- style: {
315
- marginTop: "1rem"
316
- }
317
- }, /*#__PURE__*/_react.default.createElement("label", {
318
- htmlFor: "".concat(type, "-").concat(index)
319
- }, /*#__PURE__*/_react.default.createElement(_text.default, null, box.label)), /*#__PURE__*/_react.default.createElement("br", null), /*#__PURE__*/_react.default.createElement("input", {
320
- id: "".concat(type, "-").concat(index),
321
- type: "text",
322
- value: box.value,
323
- onChange: e => {
324
- const updatedBoxes = [...inputBoxes];
325
- updatedBoxes[index].value = e.target.value;
326
- setInputBoxes(updatedBoxes);
327
- }
328
- })))))));
221
+ }, /*#__PURE__*/_react.default.createElement(_text.default, null, "+"))), inputBoxes.map(function (box, index) {
222
+ return /*#__PURE__*/_react.default.createElement(_material.Grid, {
223
+ item: true,
224
+ container: true
225
+ }, /*#__PURE__*/_react.default.createElement(_material.Grid, {
226
+ item: true,
227
+ xs: true
228
+ }, /*#__PURE__*/_react.default.createElement("div", {
229
+ style: {
230
+ border: "1px solid black",
231
+ padding: "10px",
232
+ display: "inline-block",
233
+ margin: "0.5rem"
234
+ }
235
+ }, /*#__PURE__*/_react.default.createElement("div", {
236
+ key: index,
237
+ style: {
238
+ marginTop: "1rem"
239
+ }
240
+ }, /*#__PURE__*/_react.default.createElement("label", {
241
+ htmlFor: "".concat(type, "-").concat(index)
242
+ }, /*#__PURE__*/_react.default.createElement(_text.default, null, box.label)), /*#__PURE__*/_react.default.createElement("br", null), /*#__PURE__*/_react.default.createElement("input", {
243
+ id: "".concat(type, "-").concat(index),
244
+ type: "text",
245
+ value: box.value,
246
+ onChange: function onChange(e) {
247
+ var updatedBoxes = _toConsumableArray(inputBoxes);
248
+ updatedBoxes[index].value = e.target.value;
249
+ setInputBoxes(updatedBoxes);
250
+ }
251
+ })))));
252
+ }));
329
253
  };
330
254
  exports.AddNewBox = AddNewBox;
@@ -7,34 +7,39 @@ exports.DragBox = 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
- function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
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
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(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
14
- function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
15
- function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
16
- function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
17
- const DragBox = exports.DragBox = function DragBox(_ref) {
18
- let name = _ref.name;
19
- const _useDrag = (0, _reactDnd.useDrag)(() => ({
20
- type: "box",
21
- item: {
22
- name
23
- },
24
- collect: monitor => ({
25
- isDragging: monitor.isDragging(),
26
- handlerId: monitor.getHandlerId()
27
- })
28
- })),
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 DragBox = function DragBox(_ref) {
18
+ var name = _ref.name;
19
+ var _useDrag = (0, _reactDnd.useDrag)(function () {
20
+ return {
21
+ type: "box",
22
+ item: {
23
+ name: name
24
+ },
25
+ collect: function collect(monitor) {
26
+ return {
27
+ isDragging: monitor.isDragging(),
28
+ handlerId: monitor.getHandlerId()
29
+ };
30
+ }
31
+ };
32
+ }),
29
33
  _useDrag2 = _slicedToArray(_useDrag, 2),
30
34
  isDragging = _useDrag2[0].isDragging,
31
35
  drag = _useDrag2[1];
32
- const opacity = isDragging ? 0.4 : 1;
36
+ var opacity = isDragging ? 0.4 : 1;
33
37
  return /*#__PURE__*/_react.default.createElement("div", {
34
38
  ref: drag,
35
39
  style: {
36
- opacity
40
+ opacity: opacity
37
41
  },
38
42
  "data-testid": "box"
39
43
  }, /*#__PURE__*/_react.default.createElement(_text.default, null, name));
40
- };
44
+ };
45
+ exports.DragBox = DragBox;