ronds-metadata 1.2.38 → 1.2.39

Sign up to get free protection for your applications and to get access to all the features.
Files changed (134) hide show
  1. package/es/api/index.js +83 -131
  2. package/es/comps/DynamicPorts/comps/ContextMenu.js +3 -11
  3. package/es/comps/DynamicPorts/comps/DragNode.js +2 -7
  4. package/es/comps/DynamicPorts/comps/GraphHandler/index.js +4 -5
  5. package/es/comps/DynamicPorts/comps/NodeElement.js +1 -4
  6. package/es/comps/DynamicPorts/comps/contextMenu/EdgeContextMenu/index.js +3 -6
  7. package/es/comps/DynamicPorts/comps/contextMenu/GraphContextMenu/index.js +3 -7
  8. package/es/comps/DynamicPorts/comps/contextMenu/NodeContextMenu/index.js +18 -21
  9. package/es/comps/DynamicPorts/comps/shape/edge.js +5 -18
  10. package/es/comps/DynamicPorts/comps/shape/node.js +4 -17
  11. package/es/comps/DynamicPorts/constant/index.js +2 -5
  12. package/es/comps/DynamicPorts/graph.d.ts +2 -2
  13. package/es/comps/DynamicPorts/graph.js +228 -312
  14. package/es/comps/DynamicPorts/index.js +39 -58
  15. package/es/comps/DynamicPorts/utils.js +21 -25
  16. package/es/comps/Editable/DataCell/ButtonCell.js +4 -10
  17. package/es/comps/Editable/DataCell/ColorPicker.js +2 -7
  18. package/es/comps/Editable/DataCell/Input.js +5 -14
  19. package/es/comps/Editable/DataCell/Number.js +3 -10
  20. package/es/comps/Editable/DataCell/Select.js +7 -14
  21. package/es/comps/Editable/DataCell/Switch.js +2 -7
  22. package/es/comps/Editable/comps/EditableAction.js +8 -12
  23. package/es/comps/Editable/comps/EditableCell.js +16 -26
  24. package/es/comps/Editable/comps/EditableHeardCell.js +21 -34
  25. package/es/comps/Editable/comps/EditableRow.js +49 -59
  26. package/es/comps/Editable/comps/Texty.js +36 -72
  27. package/es/comps/Editable/index.js +67 -112
  28. package/es/comps/Editable/interface.d.ts +1 -1
  29. package/es/comps/Editable/utils.js +0 -1
  30. package/es/comps/FileView/index.js +65 -101
  31. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Checkbox.js +8 -13
  32. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Color.js +8 -4
  33. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Date.js +6 -2
  34. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Input.js +8 -4
  35. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/List.js +6 -11
  36. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/MutiSelect.js +6 -10
  37. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Number.js +6 -2
  38. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Obj.js +6 -11
  39. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Password.js +8 -4
  40. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Radio.js +8 -13
  41. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Select.js +6 -10
  42. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Switch.js +6 -2
  43. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Table.js +6 -11
  44. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/TextArea.js +6 -3
  45. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Upload.js +2 -5
  46. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/HOC/index.js +86 -109
  47. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/index.js +3 -7
  48. package/es/comps/FormGenerator/comps/Canvas/core/index.js +54 -91
  49. package/es/comps/FormGenerator/comps/Canvas/core/index.less +23 -23
  50. package/es/comps/FormGenerator/comps/Canvas/index.js +8 -15
  51. package/es/comps/FormGenerator/comps/Settings/index.js +16 -30
  52. package/es/comps/FormGenerator/comps/Sidebar/Elements.js +23 -22
  53. package/es/comps/FormGenerator/comps/Sidebar/index.js +6 -2
  54. package/es/comps/FormGenerator/index.js +3 -9
  55. package/es/comps/FormGenerator/interface.d.ts +1 -1
  56. package/es/comps/FormGenerator/settings/index.js +12 -11
  57. package/es/comps/FormGenerator/settings/ruleConfig.js +0 -1
  58. package/es/comps/FormGenerator/transformer.js +40 -105
  59. package/es/comps/Icons/index.js +4 -7
  60. package/es/comps/JsonEdit/index.js +25 -50
  61. package/es/comps/JsonView/index.js +7 -21
  62. package/es/comps/JsonView/index.less +41 -41
  63. package/es/comps/MdEdit/index.js +7 -10
  64. package/es/comps/MdEdit/index.less +6 -6
  65. package/es/comps/MdEditPro/index.d.ts +10 -0
  66. package/es/comps/MdEditPro/index.js +22 -0
  67. package/es/comps/MdEditPro/index.less +74 -0
  68. package/es/comps/MdNavbar/index.js +17 -40
  69. package/es/comps/MdNavbar/utils.js +0 -4
  70. package/es/comps/MdView/index.js +7 -11
  71. package/es/comps/MdView/index.less +353 -353
  72. package/es/comps/MetadataEdit/components/MetaFieldsEdit.js +129 -183
  73. package/es/comps/MetadataEdit/components/MetaPropsEdit.js +11 -27
  74. package/es/comps/MetadataEdit/hooks/index.js +3 -11
  75. package/es/comps/MetadataEdit/index.js +25 -58
  76. package/es/comps/MetadataEdit/index.less +10 -10
  77. package/es/comps/MetadataEdit/type.d.ts +20 -20
  78. package/es/comps/MetadataEditV2/components/MetaFieldsEdit.js +17 -33
  79. package/es/comps/MetadataEditV2/components/MetaPropsEdit.js +15 -29
  80. package/es/comps/MetadataEditV2/hooks/index.js +5 -12
  81. package/es/comps/MetadataEditV2/index.js +30 -65
  82. package/es/comps/MetadataForm/DataCell/Array.js +12 -23
  83. package/es/comps/MetadataForm/DataCell/Input.js +12 -32
  84. package/es/comps/MetadataForm/DataCell/Number.js +10 -21
  85. package/es/comps/MetadataForm/DataCell/Ref.js +87 -121
  86. package/es/comps/MetadataForm/DataCell/Select.js +127 -222
  87. package/es/comps/MetadataForm/DataCell/Switch.js +7 -14
  88. package/es/comps/MetadataForm/DataCell/layout/TableArray.js +93 -164
  89. package/es/comps/MetadataForm/HOC/index.js +20 -37
  90. package/es/comps/MetadataForm/HOC/index.less +41 -41
  91. package/es/comps/MetadataForm/hooks/index.js +12 -38
  92. package/es/comps/MetadataForm/index.js +37 -72
  93. package/es/comps/MetadataForm/interface.d.ts +3 -3
  94. package/es/comps/MetadataForm/utils.js +0 -14
  95. package/es/comps/Split/index.js +20 -22
  96. package/es/config.js +0 -4
  97. package/es/framework/RxStore/demo/index.js +9 -10
  98. package/es/framework/RxStore/hooks.d.ts +9 -9
  99. package/es/framework/RxStore/hooks.js +10 -35
  100. package/es/framework/RxStore/store.d.ts +4 -4
  101. package/es/framework/RxStore/store.js +0 -10
  102. package/es/framework/fg/index.js +18 -80
  103. package/es/framework/fg/interface.d.ts +2 -2
  104. package/es/framework/fg/utils.js +0 -10
  105. package/es/framework/graph/index.d.ts +2 -2
  106. package/es/framework/graph/index.js +55 -110
  107. package/es/framework/hooks/use-async-memo.js +3 -7
  108. package/es/framework/hooks/use-sync-scroll.js +2 -15
  109. package/es/framework/http/cache.js +25 -32
  110. package/es/framework/http/cancel.js +1 -7
  111. package/es/framework/http/index.js +22 -82
  112. package/es/framework/http/msgpack.js +0 -4
  113. package/es/framework/http/msgpack5/index.js +2 -12
  114. package/es/framework/http/msgpack5/lib/codecs/DateCodec.js +1 -13
  115. package/es/framework/http/msgpack5/lib/decoder.js +10 -68
  116. package/es/framework/http/msgpack5/lib/encoder.js +8 -36
  117. package/es/framework/http/msgpack5/lib/helpers.js +3 -2
  118. package/es/framework/http/msgpack5/lib/streams.js +0 -18
  119. package/es/framework/libs/jquery.min.js +1009 -1696
  120. package/es/framework/locale/dil8/di18n.js +4 -15
  121. package/es/framework/locale/dil8/translate.js +0 -14
  122. package/es/framework/locale/dil8/util.js +0 -3
  123. package/es/framework/locale/index.js +2 -3
  124. package/es/framework/metadata/MetadataService.js +39 -78
  125. package/es/framework/metadata/index.js +4 -70
  126. package/es/framework/metadata/types.d.ts +98 -98
  127. package/es/framework/rxjs-hooks/useMemoSubject.js +0 -2
  128. package/es/framework/rxjs-hooks/useObservable.js +2 -4
  129. package/es/framework/rxjs-hooks/useObservableState.js +8 -14
  130. package/es/index.d.ts +1 -0
  131. package/es/index.js +2 -1
  132. package/es/theme.less +79 -79
  133. package/es/utils.js +58 -97
  134. package/package.json +104 -102
@@ -3,46 +3,42 @@ import "antd/es/message/style";
3
3
  import _message from "antd/es/message";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
5
  var _excluded = ["title", "isAddColumn", "editable", "record", "editableType", "dataIndex", "rowIndex", "children", "className"];
6
+ /*
7
+ * @Author: wangxian
8
+ * @Date: 2022-03-04 10:01:10
9
+ * @LastEditTime: 2023-03-25 09:01:46
10
+ */
6
11
  import React from 'react';
7
12
  import { EditableContext } from '../interface';
8
13
  import { getDataCell, isFreeEditCell, isFreeEditRow } from '../utils';
9
14
  import './index.less';
10
15
  import Texty from './Texty';
11
16
  import { tr } from '../../../framework/locale';
12
-
13
17
  var EditableCell = function EditableCell(props) {
14
18
  var title = props.title,
15
- isAddColumn = props.isAddColumn,
16
- editable = props.editable,
17
- record = props.record,
18
- editableType = props.editableType,
19
- dataIndex = props.dataIndex,
20
- rowIndex = props.rowIndex,
21
- children = props.children,
22
- className = props.className,
23
- restProps = _objectWithoutProperties(props, _excluded);
24
-
19
+ isAddColumn = props.isAddColumn,
20
+ editable = props.editable,
21
+ record = props.record,
22
+ editableType = props.editableType,
23
+ dataIndex = props.dataIndex,
24
+ rowIndex = props.rowIndex,
25
+ children = props.children,
26
+ className = props.className,
27
+ restProps = _objectWithoutProperties(props, _excluded);
25
28
  var _ref = React.useContext(EditableContext) || undefined,
26
- editableStream = _ref.editableStream,
27
- editConfig = _ref.editConfig;
28
-
29
+ editableStream = _ref.editableStream,
30
+ editConfig = _ref.editConfig;
29
31
  var onCellDoubleClick = function onCellDoubleClick() {
30
32
  var _editConfig$editCellK, _editConfig$editCellK2;
31
-
32
33
  if ((editConfig === null || editConfig === void 0 ? void 0 : editConfig.curRow) && (editConfig === null || editConfig === void 0 ? void 0 : editConfig.curRow) !== 'undefined') {
33
34
  if (isFreeEditRow(editConfig.curRow, rowIndex)) return;
34
-
35
35
  _message.warning(tr('请先保存正在编辑的行'));
36
-
37
36
  return;
38
37
  }
39
-
40
38
  if (((editConfig === null || editConfig === void 0 ? void 0 : (_editConfig$editCellK = editConfig.editCellKey) === null || _editConfig$editCellK === void 0 ? void 0 : _editConfig$editCellK.rowIndex) || (editConfig === null || editConfig === void 0 ? void 0 : (_editConfig$editCellK2 = editConfig.editCellKey) === null || _editConfig$editCellK2 === void 0 ? void 0 : _editConfig$editCellK2.rowIndex) === 0) && rowIndex !== editConfig.editCellKey.rowIndex) {
41
39
  _message.warning(tr('请先保存正在编辑的行'));
42
-
43
40
  return;
44
41
  }
45
-
46
42
  editableStream.next({
47
43
  type: 'editCellKey',
48
44
  payload: {
@@ -51,7 +47,6 @@ var EditableCell = function EditableCell(props) {
51
47
  }
52
48
  });
53
49
  };
54
-
55
50
  var onCellClick = function onCellClick() {
56
51
  if (isAddColumn) {
57
52
  editableStream.next({
@@ -60,7 +55,6 @@ var EditableCell = function EditableCell(props) {
60
55
  });
61
56
  }
62
57
  };
63
-
64
58
  if (restProps === null || restProps === void 0 ? void 0 : restProps.colSpan) {
65
59
  return /*#__PURE__*/React.createElement("td", _extends({}, restProps, {
66
60
  className: "".concat(className, " ").concat(isAddColumn && editConfig.editHeardCellKey === dataIndex ? 'border-right' : '', " "),
@@ -69,7 +63,6 @@ var EditableCell = function EditableCell(props) {
69
63
  }
70
64
  }), children);
71
65
  }
72
-
73
66
  if (editableType === 'single') {
74
67
  return /*#__PURE__*/React.createElement("td", _extends({}, restProps, {
75
68
  className: "".concat(className, " ").concat(isAddColumn && editConfig.editHeardCellKey === dataIndex ? 'border-right' : '', " ")
@@ -80,7 +73,6 @@ var EditableCell = function EditableCell(props) {
80
73
  tooltipMaxWidth: 800
81
74
  }, children));
82
75
  }
83
-
84
76
  if (editableType === 'freedom') {
85
77
  return /*#__PURE__*/React.createElement("td", _extends({
86
78
  onDoubleClick: onCellDoubleClick,
@@ -94,7 +86,6 @@ var EditableCell = function EditableCell(props) {
94
86
  tooltipMaxWidth: 800
95
87
  }, children));
96
88
  }
97
-
98
89
  return /*#__PURE__*/React.createElement("td", _extends({}, restProps, {
99
90
  className: "".concat(className, " ").concat(isAddColumn && editConfig.editHeardCellKey === dataIndex ? 'border-right' : '', " ")
100
91
  }), editable ? getDataCell(props) : /*#__PURE__*/React.createElement(Texty, {
@@ -104,5 +95,4 @@ var EditableCell = function EditableCell(props) {
104
95
  tooltipMaxWidth: 800
105
96
  }, children));
106
97
  };
107
-
108
98
  export default EditableCell;
@@ -11,72 +11,64 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
11
11
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
12
12
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
13
13
  var _excluded = ["title", "dataIndex", "isAddColumn", "children", "className", "style"];
14
+ /*
15
+ * @Author: wangxian
16
+ * @Date: 2022-03-04 10:01:10
17
+ * @LastEditTime: 2022-07-06 14:16:29
18
+ */
14
19
  import { PlusSquareOutlined, DeleteOutlined } from '@ant-design/icons';
15
20
  import React from 'react';
16
21
  import { EditableContext } from '../interface';
17
22
  import { tr } from '../../../framework/locale';
18
23
  import './index.less';
19
24
  import Texty from './Texty';
20
-
21
25
  var EditableHeardCell = function EditableHeardCell(props) {
22
26
  var title = props.title,
23
- dataIndex = props.dataIndex,
24
- isAddColumn = props.isAddColumn,
25
- children = props.children,
26
- className = props.className,
27
- style = props.style,
28
- restProps = _objectWithoutProperties(props, _excluded);
29
-
27
+ dataIndex = props.dataIndex,
28
+ isAddColumn = props.isAddColumn,
29
+ children = props.children,
30
+ className = props.className,
31
+ style = props.style,
32
+ restProps = _objectWithoutProperties(props, _excluded);
30
33
  var _ref = React.useContext(EditableContext) || undefined,
31
- editableStream = _ref.editableStream,
32
- editConfig = _ref.editConfig;
33
-
34
+ editableStream = _ref.editableStream,
35
+ editConfig = _ref.editConfig;
34
36
  var addColumnRef = React.useRef({
35
37
  title: ''
36
38
  });
37
-
38
39
  var _React$useState = React.useState({
39
- title: ''
40
- }),
41
- _React$useState2 = _slicedToArray(_React$useState, 2),
42
- addColumn = _React$useState2[0],
43
- setAddColumn = _React$useState2[1];
44
-
40
+ title: ''
41
+ }),
42
+ _React$useState2 = _slicedToArray(_React$useState, 2),
43
+ addColumn = _React$useState2[0],
44
+ setAddColumn = _React$useState2[1];
45
45
  var _React$useState3 = React.useState(false),
46
- _React$useState4 = _slicedToArray(_React$useState3, 2),
47
- visible = _React$useState4[0],
48
- setVisible = _React$useState4[1];
49
-
46
+ _React$useState4 = _slicedToArray(_React$useState3, 2),
47
+ visible = _React$useState4[0],
48
+ setVisible = _React$useState4[1];
50
49
  var myStyle = React.useMemo(function () {
51
50
  var res = {};
52
-
53
51
  if (style === null || style === void 0 ? void 0 : style.right) {
54
52
  res = _objectSpread(_objectSpread({}, style), {}, {
55
53
  right: (style === null || style === void 0 ? void 0 : style.right) - 6
56
54
  });
57
55
  }
58
-
59
56
  return res;
60
57
  }, [style]);
61
58
  var myClassName = React.useMemo(function () {
62
59
  var _cls = className;
63
-
64
60
  if (_cls && _cls.indexOf('ant-table-cell-scrollbar')) {
65
61
  _cls = _cls.replace('ant-table-cell-scrollbar', '');
66
62
  }
67
-
68
63
  return _cls;
69
64
  }, [className]);
70
-
71
65
  var onMouseOver = function onMouseOver() {
72
66
  editableStream.next({
73
67
  type: 'editHeardCellKey',
74
68
  payload: dataIndex
75
69
  });
76
70
  };
77
-
78
71
  var onMouseLeave = function onMouseLeave() {};
79
-
80
72
  var onAddColumn = function onAddColumn() {
81
73
  setVisible(false);
82
74
  editableStream.next({
@@ -92,7 +84,6 @@ var EditableHeardCell = function EditableHeardCell(props) {
92
84
  title: ''
93
85
  };
94
86
  };
95
-
96
87
  var onDeleteColumn = function onDeleteColumn() {
97
88
  setVisible(false);
98
89
  editableStream.next({
@@ -102,7 +93,6 @@ var EditableHeardCell = function EditableHeardCell(props) {
102
93
  }
103
94
  });
104
95
  };
105
-
106
96
  var content = /*#__PURE__*/React.createElement("div", {
107
97
  style: {
108
98
  width: '100px'
@@ -129,11 +119,9 @@ var EditableHeardCell = function EditableHeardCell(props) {
129
119
  block: true,
130
120
  onClick: onAddColumn
131
121
  }, tr('确定'))));
132
-
133
122
  var onVisibleChange = function onVisibleChange(b) {
134
123
  setVisible(b);
135
124
  };
136
-
137
125
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("th", _extends({
138
126
  className: "".concat(myClassName, " ant-table-th font-bold ").concat(isAddColumn && editConfig.editHeardCellKey === dataIndex ? 'border-right ' : '', " ")
139
127
  }, restProps, {
@@ -168,5 +156,4 @@ var EditableHeardCell = function EditableHeardCell(props) {
168
156
  onMouseLeave: onMouseLeave
169
157
  }, /*#__PURE__*/React.createElement(Texty, null, children))));
170
158
  };
171
-
172
159
  export default EditableHeardCell;
@@ -2,79 +2,72 @@ import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import "antd/es/form/style";
3
3
  import _Form from "antd/es/form";
4
4
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
5
+ /*
6
+ * @Author: wangxian
7
+ * @Date: 2022-03-04 10:01:10
8
+ * @LastEditTime: 2023-01-04 10:39:58
9
+ */
5
10
  import React from 'react';
6
11
  import { useDrag, useDrop } from 'react-dnd';
7
12
  import { DND_TYPE, EditableContext } from '../interface';
8
-
9
13
  var EditableRow = function EditableRow(props) {
10
14
  var record = props.record,
11
- index = props.index,
12
- className = props.className,
13
- onMove = props.onMove;
14
-
15
+ index = props.index,
16
+ className = props.className,
17
+ onMove = props.onMove;
15
18
  var _Form$useForm = _Form.useForm(),
16
- _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
17
- form = _Form$useForm2[0];
18
-
19
+ _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
20
+ form = _Form$useForm2[0];
19
21
  var ref = React.useRef(null);
20
-
21
22
  var _ref = React.useContext(EditableContext) || undefined,
22
- editableStream = _ref.editableStream;
23
-
23
+ editableStream = _ref.editableStream;
24
24
  React.useEffect(function () {
25
25
  if (!form) return;
26
26
  form.setFieldsValue(record);
27
27
  }, [record]);
28
-
29
28
  var _useDrop = useDrop({
30
- accept: DND_TYPE,
31
- collect: function collect(monitor) {
32
- var _ref2 = monitor.getItem() || {},
29
+ accept: DND_TYPE,
30
+ collect: function collect(monitor) {
31
+ var _ref2 = monitor.getItem() || {},
33
32
  dragIndex = _ref2.index;
34
-
35
- if (dragIndex === index || !onMove) {
36
- return {};
33
+ if (dragIndex === index || !onMove) {
34
+ return {};
35
+ }
36
+ return {
37
+ isOver: monitor.isOver(),
38
+ dropClassName: dragIndex < index ? ' drop-over-downward' : ' drop-over-upward'
39
+ };
40
+ },
41
+ drop: function drop(item, monitor) {
42
+ onMove && onMove({
43
+ dragIndex: item.index,
44
+ hoverIndex: index
45
+ });
37
46
  }
38
-
39
- return {
40
- isOver: monitor.isOver(),
41
- dropClassName: dragIndex < index ? ' drop-over-downward' : ' drop-over-upward'
42
- };
43
- },
44
- drop: function drop(item, monitor) {
45
- onMove && onMove({
46
- dragIndex: item.index,
47
- hoverIndex: index
48
- });
49
- }
50
- }),
51
- _useDrop2 = _slicedToArray(_useDrop, 2),
52
- _useDrop2$ = _useDrop2[0],
53
- isOver = _useDrop2$.isOver,
54
- dropClassName = _useDrop2$.dropClassName,
55
- drop = _useDrop2[1];
56
-
47
+ }),
48
+ _useDrop2 = _slicedToArray(_useDrop, 2),
49
+ _useDrop2$ = _useDrop2[0],
50
+ isOver = _useDrop2$.isOver,
51
+ dropClassName = _useDrop2$.dropClassName,
52
+ drop = _useDrop2[1];
57
53
  var _useDrag = useDrag({
58
- item: {
59
- index: index,
60
- type: DND_TYPE
61
- },
62
- end: function end(item, monitor) {
63
- var dropResult = monitor.getDropResult();
64
-
65
- if (item && dropResult) {}
66
- },
67
- collect: function collect(monitor) {
68
- return {
69
- isDragging: monitor.isDragging()
70
- };
71
- }
72
- }),
73
- _useDrag2 = _slicedToArray(_useDrag, 2),
74
- drag = _useDrag2[1];
75
-
54
+ item: {
55
+ index: index,
56
+ type: DND_TYPE
57
+ },
58
+ end: function end(item, monitor) {
59
+ var dropResult = monitor.getDropResult();
60
+ if (item && dropResult) {}
61
+ },
62
+ collect: function collect(monitor) {
63
+ return {
64
+ isDragging: monitor.isDragging()
65
+ };
66
+ }
67
+ }),
68
+ _useDrag2 = _slicedToArray(_useDrag, 2),
69
+ drag = _useDrag2[1];
76
70
  onMove && drop(drag(ref));
77
-
78
71
  var onValuesChange = function onValuesChange(values, allValues) {
79
72
  if (editableStream) {
80
73
  editableStream.next({
@@ -87,7 +80,6 @@ var EditableRow = function EditableRow(props) {
87
80
  });
88
81
  }
89
82
  };
90
-
91
83
  var onRowClick = function onRowClick() {
92
84
  editableStream.next({
93
85
  type: 'onRowClick',
@@ -96,7 +88,6 @@ var EditableRow = function EditableRow(props) {
96
88
  }
97
89
  });
98
90
  };
99
-
100
91
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Form, {
101
92
  name: "editable_".concat(record === null || record === void 0 ? void 0 : record._rowKey_, "_"),
102
93
  form: form,
@@ -114,5 +105,4 @@ var EditableRow = function EditableRow(props) {
114
105
  onClick: onRowClick
115
106
  }))));
116
107
  };
117
-
118
108
  export default EditableRow;
@@ -20,21 +20,15 @@ var modifiers = [{
20
20
  /**
21
21
  * 基于Popper的tooltip
22
22
  */
23
-
24
23
  var Texty = /*#__PURE__*/function (_React$PureComponent) {
25
24
  _inherits(Texty, _React$PureComponent);
26
-
27
25
  var _super = _createSuper(Texty);
28
-
29
26
  function Texty() {
30
27
  var _this;
31
-
32
28
  _classCallCheck(this, Texty);
33
-
34
29
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
35
30
  args[_key] = arguments[_key];
36
31
  }
37
-
38
32
  _this = _super.call.apply(_super, [this].concat(args));
39
33
  _this.state = {
40
34
  isHovered: false
@@ -43,21 +37,20 @@ var Texty = /*#__PURE__*/function (_React$PureComponent) {
43
37
  _this.targetNode = void 0;
44
38
  _this.hideTimer = void 0;
45
39
  _this.showTimer = void 0;
46
-
47
40
  _this.renderTooltip = function (_ref) {
48
41
  var ref = _ref.ref,
49
- style = _ref.style,
50
- placement = _ref.placement,
51
- arrowProps = _ref.arrowProps;
42
+ style = _ref.style,
43
+ placement = _ref.placement,
44
+ arrowProps = _ref.arrowProps;
52
45
  var _this$props = _this.props,
53
- children = _this$props.children,
54
- container = _this$props.container,
55
- tooltip = _this$props.tooltip,
56
- tooltipClassName = _this$props.tooltipClassName,
57
- tooltipStyle = _this$props.tooltipStyle,
58
- tooltipMaxWidth = _this$props.tooltipMaxWidth,
59
- arrowClassName = _this$props.arrowClassName,
60
- hideArrow = _this$props.hideArrow;
46
+ children = _this$props.children,
47
+ container = _this$props.container,
48
+ tooltip = _this$props.tooltip,
49
+ tooltipClassName = _this$props.tooltipClassName,
50
+ tooltipStyle = _this$props.tooltipStyle,
51
+ tooltipMaxWidth = _this$props.tooltipMaxWidth,
52
+ arrowClassName = _this$props.arrowClassName,
53
+ hideArrow = _this$props.hideArrow;
61
54
  var content = tooltip || children;
62
55
  var extraStyle = tooltipMaxWidth ? _objectSpread(_objectSpread({}, tooltipStyle), {}, {
63
56
  maxWidth: tooltipMaxWidth
@@ -79,101 +72,80 @@ var Texty = /*#__PURE__*/function (_React$PureComponent) {
79
72
  style: arrowProps.style
80
73
  })), container || _this.targetNode.ownerDocument.body);
81
74
  };
82
-
83
75
  _this.setTargetRef = function (ref) {
84
76
  _this.props.innerRef && _this.props.innerRef(ref);
85
- _this.targetNode = ref; // console.log("setTargetRef",ref,this.targetNode)
77
+ _this.targetNode = ref;
78
+ // console.log("setTargetRef",ref,this.targetNode)
86
79
  };
87
-
88
80
  _this.handleMouseEvent = function (e) {
89
81
  e.stopPropagation();
90
82
  };
91
-
92
83
  _this.handleScroll = function (e) {
93
84
  var _e$srcElement, _e$srcElement2;
94
-
95
85
  if ((e === null || e === void 0 ? void 0 : (_e$srcElement = e.srcElement) === null || _e$srcElement === void 0 ? void 0 : _e$srcElement.className) === 'contract-trigger') {
96
86
  return;
97
87
  }
98
-
99
88
  if ((e === null || e === void 0 ? void 0 : (_e$srcElement2 = e.srcElement) === null || _e$srcElement2 === void 0 ? void 0 : _e$srcElement2.className) === 'texty-scroll') {
100
89
  return;
101
90
  }
102
-
103
91
  _this.setState({
104
92
  isHovered: false
105
93
  });
106
94
  };
107
-
108
95
  _this.handleMouseEnter = function (e) {
109
96
  // console.log('handleMouseEnter');
110
97
  // eslint-disable-next-line react/prop-types
111
98
  var _this$props2 = _this.props,
112
- showDelay = _this$props2.showDelay,
113
- onMouseEnter = _this$props2.onMouseEnter;
99
+ showDelay = _this$props2.showDelay,
100
+ onMouseEnter = _this$props2.onMouseEnter;
114
101
  onMouseEnter && onMouseEnter(e);
115
-
116
102
  _this._clearHideTimer();
117
-
118
103
  if (!showDelay) {
119
104
  _this.setState({
120
105
  isHovered: true
121
106
  });
122
-
123
107
  return;
124
108
  }
125
-
126
109
  _this.showTimer = setTimeout(function () {
127
110
  _this.setState({
128
111
  isHovered: true
129
112
  });
130
-
131
113
  delete _this.showTimer;
132
114
  }, showDelay);
133
115
  };
134
-
135
116
  _this.handleMouseLeave = function (e) {
136
117
  // console.log('handleMouseLeave');
137
118
  // eslint-disable-next-line react/prop-types
138
119
  var _this$props3 = _this.props,
139
- hideDelay = _this$props3.hideDelay,
140
- onMouseLeave = _this$props3.onMouseLeave;
120
+ hideDelay = _this$props3.hideDelay,
121
+ onMouseLeave = _this$props3.onMouseLeave;
141
122
  onMouseLeave && onMouseLeave(e);
142
-
143
123
  _this._clearShowTimer();
144
-
145
124
  var isHovered = _this.state.isHovered;
146
125
  if (!isHovered) return;
147
-
148
126
  if (!hideDelay) {
149
127
  _this.setState({
150
128
  isHovered: false
151
129
  });
152
-
153
130
  return;
154
131
  }
155
-
156
132
  _this.hideTimer = setTimeout(function () {
157
133
  _this.setState({
158
134
  isHovered: false
159
135
  });
160
-
161
136
  delete _this.hideTimer;
162
137
  }, hideDelay);
163
138
  };
164
-
165
139
  return _this;
166
140
  }
167
-
168
141
  _createClass(Texty, [{
169
142
  key: "componentDidUpdate",
170
143
  value: function componentDidUpdate() {
171
144
  var _this2 = this;
172
-
173
145
  // console.log(this.state);
174
146
  if (this.state.isHovered) {
175
- window.addEventListener('scroll', this.handleScroll, true); // react - virtualized - auto - sizer would trigger scroll events after tooltip shown in some case,we have to skip those scroll events
176
-
147
+ window.addEventListener('scroll', this.handleScroll, true);
148
+ // react - virtualized - auto - sizer would trigger scroll events after tooltip shown in some case,we have to skip those scroll events
177
149
  this.listenTimer = setTimeout(function () {
178
150
  window.removeEventListener('scroll', _this2.handleScroll, true);
179
151
  window.addEventListener('scroll', _this2.handleScroll, true);
@@ -181,7 +153,6 @@ var Texty = /*#__PURE__*/function (_React$PureComponent) {
181
153
  }, 50);
182
154
  } else {
183
155
  this._clearListenTimer();
184
-
185
156
  window.removeEventListener('scroll', this.handleScroll, true);
186
157
  }
187
158
  }
@@ -189,11 +160,8 @@ var Texty = /*#__PURE__*/function (_React$PureComponent) {
189
160
  key: "componentWillUnmount",
190
161
  value: function componentWillUnmount() {
191
162
  this._clearListenTimer();
192
-
193
163
  window.removeEventListener('scroll', this.handleScroll, true);
194
-
195
164
  this._clearShowTimer();
196
-
197
165
  this._clearHideTimer();
198
166
  }
199
167
  }, {
@@ -201,32 +169,30 @@ var Texty = /*#__PURE__*/function (_React$PureComponent) {
201
169
  value: function render() {
202
170
  /* eslint-disable no-unused-vars */
203
171
  var _this$props4 = this.props,
204
- tagName = _this$props4.tagName,
205
- children = _this$props4.children,
206
- placement = _this$props4.placement,
207
- innerRef = _this$props4.innerRef,
208
- showDelay = _this$props4.showDelay,
209
- hideDelay = _this$props4.hideDelay,
210
- tooltip = _this$props4.tooltip,
211
- tooltipClassName = _this$props4.tooltipClassName,
212
- tooltipStyle = _this$props4.tooltipStyle,
213
- tooltipMaxWidth = _this$props4.tooltipMaxWidth,
214
- hideArrow = _this$props4.hideArrow,
215
- container = _this$props4.container,
216
- rest = _objectWithoutProperties(_this$props4, _excluded);
172
+ tagName = _this$props4.tagName,
173
+ children = _this$props4.children,
174
+ placement = _this$props4.placement,
175
+ innerRef = _this$props4.innerRef,
176
+ showDelay = _this$props4.showDelay,
177
+ hideDelay = _this$props4.hideDelay,
178
+ tooltip = _this$props4.tooltip,
179
+ tooltipClassName = _this$props4.tooltipClassName,
180
+ tooltipStyle = _this$props4.tooltipStyle,
181
+ tooltipMaxWidth = _this$props4.tooltipMaxWidth,
182
+ hideArrow = _this$props4.hideArrow,
183
+ container = _this$props4.container,
184
+ rest = _objectWithoutProperties(_this$props4, _excluded);
217
185
  /* eslint-enable no-unused-vars */
218
-
219
-
220
186
  var Tag = tagName;
221
-
222
187
  if (!children) {
223
- return null; // return <Tag { ...rest } ref={ this.setTargetRef } data-texty={ false } />;
188
+ return null;
189
+ // return <Tag { ...rest } ref={ this.setTargetRef } data-texty={ false } />;
224
190
  }
225
191
 
226
192
  var target = this.targetNode;
227
193
  var isTruncated = !!target && target.scrollWidth > target.offsetWidth;
228
- var showTooltip = this.state.isHovered && isTruncated; // console.log("showTooltip",showTooltip)
229
-
194
+ var showTooltip = this.state.isHovered && isTruncated;
195
+ // console.log("showTooltip",showTooltip)
230
196
  return /*#__PURE__*/React.createElement(Tag, _extends({}, rest, {
231
197
  ref: this.setTargetRef,
232
198
  "data-texty": showTooltip,
@@ -266,10 +232,8 @@ var Texty = /*#__PURE__*/function (_React$PureComponent) {
266
232
  }
267
233
  }
268
234
  }]);
269
-
270
235
  return Texty;
271
236
  }(React.PureComponent);
272
-
273
237
  Texty.defaultProps = {
274
238
  tagName: 'div',
275
239
  showDelay: 150,