ronds-metadata 1.2.37 → 1.2.39

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 (131) 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 +3 -8
  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 +40 -73
  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/index.js +8 -15
  50. package/es/comps/FormGenerator/comps/Settings/index.js +16 -30
  51. package/es/comps/FormGenerator/comps/Sidebar/Elements.js +23 -22
  52. package/es/comps/FormGenerator/comps/Sidebar/index.js +6 -2
  53. package/es/comps/FormGenerator/index.js +3 -9
  54. package/es/comps/FormGenerator/interface.d.ts +1 -1
  55. package/es/comps/FormGenerator/settings/index.js +12 -11
  56. package/es/comps/FormGenerator/settings/ruleConfig.js +0 -1
  57. package/es/comps/FormGenerator/transformer.js +40 -105
  58. package/es/comps/Icons/index.js +4 -7
  59. package/es/comps/JsonEdit/index.js +25 -50
  60. package/es/comps/JsonView/index.js +7 -21
  61. package/es/comps/MdEdit/index.js +7 -10
  62. package/es/comps/MdEditPro/index.d.ts +10 -0
  63. package/es/comps/MdEditPro/index.js +22 -0
  64. package/es/comps/MdEditPro/index.less +74 -0
  65. package/es/comps/MdNavbar/index.js +17 -40
  66. package/es/comps/MdNavbar/utils.js +0 -4
  67. package/es/comps/MdView/index.js +7 -11
  68. package/es/comps/MetadataEdit/components/MetaFieldsEdit.js +129 -183
  69. package/es/comps/MetadataEdit/components/MetaPropsEdit.js +11 -27
  70. package/es/comps/MetadataEdit/hooks/index.js +3 -11
  71. package/es/comps/MetadataEdit/index.js +25 -58
  72. package/es/comps/MetadataEditV2/components/MetaFieldsEdit.js +17 -33
  73. package/es/comps/MetadataEditV2/components/MetaPropsEdit.js +15 -29
  74. package/es/comps/MetadataEditV2/hooks/index.js +5 -12
  75. package/es/comps/MetadataEditV2/index.js +30 -65
  76. package/es/comps/MetadataForm/DataCell/Array.js +12 -23
  77. package/es/comps/MetadataForm/DataCell/Input.js +23 -39
  78. package/es/comps/MetadataForm/DataCell/Number.js +10 -21
  79. package/es/comps/MetadataForm/DataCell/Ref.js +87 -121
  80. package/es/comps/MetadataForm/DataCell/Select.js +131 -226
  81. package/es/comps/MetadataForm/DataCell/Switch.js +7 -14
  82. package/es/comps/MetadataForm/DataCell/layout/TableArray.js +98 -169
  83. package/es/comps/MetadataForm/HOC/index.js +20 -37
  84. package/es/comps/MetadataForm/hooks/index.js +12 -38
  85. package/es/comps/MetadataForm/index.js +37 -72
  86. package/es/comps/MetadataForm/interface.d.ts +3 -3
  87. package/es/comps/MetadataForm/utils.d.ts +1 -0
  88. package/es/comps/MetadataForm/utils.js +12 -14
  89. package/es/comps/Split/index.js +40 -38
  90. package/es/config.js +0 -4
  91. package/es/framework/RxStore/demo/index.js +9 -10
  92. package/es/framework/RxStore/hooks.d.ts +9 -9
  93. package/es/framework/RxStore/hooks.js +10 -35
  94. package/es/framework/RxStore/store.d.ts +4 -4
  95. package/es/framework/RxStore/store.js +0 -10
  96. package/es/framework/fg/index.js +18 -80
  97. package/es/framework/fg/interface.d.ts +2 -2
  98. package/es/framework/fg/utils.js +0 -10
  99. package/es/framework/graph/index.d.ts +2 -2
  100. package/es/framework/graph/index.js +55 -110
  101. package/es/framework/hooks/use-async-memo.js +3 -7
  102. package/es/framework/hooks/use-sync-scroll.js +2 -15
  103. package/es/framework/http/cache.js +25 -32
  104. package/es/framework/http/cancel.js +1 -7
  105. package/es/framework/http/index.js +22 -82
  106. package/es/framework/http/msgpack.js +0 -4
  107. package/es/framework/http/msgpack5/index.js +2 -12
  108. package/es/framework/http/msgpack5/lib/codecs/DateCodec.js +1 -13
  109. package/es/framework/http/msgpack5/lib/decoder.js +10 -68
  110. package/es/framework/http/msgpack5/lib/encoder.js +8 -36
  111. package/es/framework/http/msgpack5/lib/helpers.js +3 -2
  112. package/es/framework/http/msgpack5/lib/streams.js +0 -18
  113. package/es/framework/libs/jquery.min.js +1009 -1696
  114. package/es/framework/locale/dil8/di18n.js +4 -15
  115. package/es/framework/locale/dil8/translate.js +0 -14
  116. package/es/framework/locale/dil8/util.js +0 -3
  117. package/es/framework/locale/index.js +2 -3
  118. package/es/framework/metadata/MetadataService.js +39 -78
  119. package/es/framework/metadata/index.js +4 -70
  120. package/es/framework/rxjs-hooks/useMemoSubject.js +0 -2
  121. package/es/framework/rxjs-hooks/useObservable.js +2 -4
  122. package/es/framework/rxjs-hooks/useObservableState.js +8 -14
  123. package/es/index.d.ts +1 -0
  124. package/es/index.js +2 -1
  125. package/es/utils.js +58 -97
  126. package/package.json +4 -2
  127. package/es/comps/MdEdit/plugin/EditContent.d.ts +0 -5
  128. package/es/comps/MdEdit/plugin/EditContent.js +0 -34
  129. package/es/comps/MdEdit/plugin/Mark.d.ts +0 -7
  130. package/es/comps/MdEdit/plugin/Mark.js +0 -60
  131. package/es/framework/libs/iconfont/iconfont.json +0 -401
package/es/api/index.js CHANGED
@@ -1,8 +1,7 @@
1
- import _regeneratorRuntime from "@babel/runtime/regenerator";
2
1
  import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
3
2
  import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
4
3
  import _createClass from "@babel/runtime/helpers/esm/createClass";
5
-
4
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
6
5
  /*
7
6
  * @Author:wangxian
8
7
  * @Date: 2021-09-18 14:15:04
@@ -17,13 +16,10 @@ addInterceptor(function (httpClient) {
17
16
  if (!_config.headers) {
18
17
  _config.headers = {};
19
18
  }
20
-
21
19
  _config.headers.Authorization = token;
22
20
  var url = _config.url;
23
21
  var timestamp = new Date().getTime();
24
-
25
22
  var _guid = guid();
26
-
27
23
  var signature = md5("".concat(url).concat(timestamp).concat(guid));
28
24
  _config.headers.url = url;
29
25
  _config.headers.timestamp = timestamp;
@@ -32,12 +28,10 @@ addInterceptor(function (httpClient) {
32
28
  return _config;
33
29
  });
34
30
  });
35
-
36
31
  var Api = /*#__PURE__*/function () {
37
32
  function Api() {
38
33
  _classCallCheck(this, Api);
39
34
  }
40
-
41
35
  _createClass(Api, [{
42
36
  key: "GetMetadataList",
43
37
  value:
@@ -49,43 +43,36 @@ var Api = /*#__PURE__*/function () {
49
43
  function () {
50
44
  var _GetMetadataList = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(keyWords) {
51
45
  var _res$data;
52
-
53
46
  var param, url, res;
54
47
  return _regeneratorRuntime.wrap(function _callee$(_context) {
55
- while (1) {
56
- switch (_context.prev = _context.next) {
57
- case 0:
58
- param = {
59
- filter: {
60
- name: '',
61
- tags: keyWords
62
- },
63
- order: [],
64
- pagination: {
65
- page: 1,
66
- size: 30
67
- }
68
- };
69
- url = "/metamgt-web/metadata/list";
70
- _context.next = 4;
71
- return http.post(url, param);
72
-
73
- case 4:
74
- res = _context.sent;
75
- return _context.abrupt("return", (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.list);
76
-
77
- case 6:
78
- case "end":
79
- return _context.stop();
80
- }
48
+ while (1) switch (_context.prev = _context.next) {
49
+ case 0:
50
+ param = {
51
+ filter: {
52
+ name: '',
53
+ tags: keyWords
54
+ },
55
+ order: [],
56
+ pagination: {
57
+ page: 1,
58
+ size: 30
59
+ }
60
+ };
61
+ url = "/metamgt-web/metadata/list";
62
+ _context.next = 4;
63
+ return http.post(url, param);
64
+ case 4:
65
+ res = _context.sent;
66
+ return _context.abrupt("return", (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.list);
67
+ case 6:
68
+ case "end":
69
+ return _context.stop();
81
70
  }
82
71
  }, _callee);
83
72
  }));
84
-
85
73
  function GetMetadataList(_x) {
86
74
  return _GetMetadataList.apply(this, arguments);
87
75
  }
88
-
89
76
  return GetMetadataList;
90
77
  }()
91
78
  /**
@@ -93,157 +80,122 @@ var Api = /*#__PURE__*/function () {
93
80
  * @param metadataId
94
81
  * @returns
95
82
  */
96
-
97
83
  }, {
98
84
  key: "GetMetadataDetailById",
99
85
  value: function () {
100
86
  var _GetMetadataDetailById = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(metadataId) {
101
87
  var url, res;
102
88
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
103
- while (1) {
104
- switch (_context2.prev = _context2.next) {
105
- case 0:
106
- url = "/metamgt-web/metadata/".concat(metadataId);
107
- _context2.next = 3;
108
- return http.get(url);
109
-
110
- case 3:
111
- res = _context2.sent;
112
- return _context2.abrupt("return", res.data);
113
-
114
- case 5:
115
- case "end":
116
- return _context2.stop();
117
- }
89
+ while (1) switch (_context2.prev = _context2.next) {
90
+ case 0:
91
+ url = "/metamgt-web/metadata/".concat(metadataId);
92
+ _context2.next = 3;
93
+ return http.get(url);
94
+ case 3:
95
+ res = _context2.sent;
96
+ return _context2.abrupt("return", res.data);
97
+ case 5:
98
+ case "end":
99
+ return _context2.stop();
118
100
  }
119
101
  }, _callee2);
120
102
  }));
121
-
122
103
  function GetMetadataDetailById(_x2) {
123
104
  return _GetMetadataDetailById.apply(this, arguments);
124
105
  }
125
-
126
106
  return GetMetadataDetailById;
127
- }()
128
- /** 添加元数据 */
129
-
107
+ }() /** 添加元数据 */
130
108
  }, {
131
109
  key: "SaveMetadata",
132
110
  value: function () {
133
111
  var _SaveMetadata = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(data, metadataTag) {
134
112
  var param, url, res;
135
113
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
136
- while (1) {
137
- switch (_context3.prev = _context3.next) {
138
- case 0:
139
- param = {
140
- schema: JSON.stringify([data]),
141
- name: data.id,
142
- tags: [metadataTag],
143
- permission: 'public'
144
- };
145
- url = "/metamgt-web/metadata/add";
146
- _context3.next = 4;
147
- return http.post(url, param);
148
-
149
- case 4:
150
- res = _context3.sent;
151
- return _context3.abrupt("return", res.data);
152
-
153
- case 6:
154
- case "end":
155
- return _context3.stop();
156
- }
114
+ while (1) switch (_context3.prev = _context3.next) {
115
+ case 0:
116
+ param = {
117
+ schema: JSON.stringify([data]),
118
+ name: data.id,
119
+ tags: [metadataTag],
120
+ permission: 'public'
121
+ };
122
+ url = "/metamgt-web/metadata/add";
123
+ _context3.next = 4;
124
+ return http.post(url, param);
125
+ case 4:
126
+ res = _context3.sent;
127
+ return _context3.abrupt("return", res.data);
128
+ case 6:
129
+ case "end":
130
+ return _context3.stop();
157
131
  }
158
132
  }, _callee3);
159
133
  }));
160
-
161
134
  function SaveMetadata(_x3, _x4) {
162
135
  return _SaveMetadata.apply(this, arguments);
163
136
  }
164
-
165
137
  return SaveMetadata;
166
138
  }() // 获取元数据的值
167
-
168
139
  }, {
169
140
  key: "GetMetadataObjList",
170
141
  value: function () {
171
142
  var _GetMetadataObjList = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(data) {
172
143
  var url, res;
173
144
  return _regeneratorRuntime.wrap(function _callee4$(_context4) {
174
- while (1) {
175
- switch (_context4.prev = _context4.next) {
176
- case 0:
177
- url = "/dataset-web/source/{namespace}/entity/page".replace('{namespace}', data.id);
178
- _context4.next = 3;
179
- return http.post(encodeURI(url), data);
180
-
181
- case 3:
182
- res = _context4.sent;
183
- return _context4.abrupt("return", res.successed ? res.data : []);
184
-
185
- case 5:
186
- case "end":
187
- return _context4.stop();
188
- }
145
+ while (1) switch (_context4.prev = _context4.next) {
146
+ case 0:
147
+ url = "/dataset-web/source/{namespace}/entity/page".replace('{namespace}', data.id);
148
+ _context4.next = 3;
149
+ return http.post(encodeURI(url), data);
150
+ case 3:
151
+ res = _context4.sent;
152
+ return _context4.abrupt("return", res.successed ? res.data : []);
153
+ case 5:
154
+ case "end":
155
+ return _context4.stop();
189
156
  }
190
157
  }, _callee4);
191
158
  }));
192
-
193
159
  function GetMetadataObjList(_x5) {
194
160
  return _GetMetadataObjList.apply(this, arguments);
195
161
  }
196
-
197
162
  return GetMetadataObjList;
198
163
  }() // 通过扩展规则获取枚举类型的值
199
-
200
164
  }, {
201
165
  key: "GetEnumDataByUrl",
202
166
  value: function () {
203
167
  var _GetEnumDataByUrl = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(url, method, body) {
204
168
  var res, _res;
205
-
206
169
  return _regeneratorRuntime.wrap(function _callee5$(_context5) {
207
- while (1) {
208
- switch (_context5.prev = _context5.next) {
209
- case 0:
210
- if (!(method === 'get')) {
211
- _context5.next = 7;
212
- break;
213
- }
214
-
215
- _context5.next = 3;
216
- return http.get(encodeURI(url));
217
-
218
- case 3:
219
- res = _context5.sent;
220
- return _context5.abrupt("return", res.successed ? res.data : []);
221
-
222
- case 7:
223
- _context5.next = 9;
224
- return http.post(encodeURI(url), body);
225
-
226
- case 9:
227
- _res = _context5.sent;
228
- return _context5.abrupt("return", _res.successed ? _res.data : []);
229
-
230
- case 11:
231
- case "end":
232
- return _context5.stop();
233
- }
170
+ while (1) switch (_context5.prev = _context5.next) {
171
+ case 0:
172
+ if (!(method === 'get')) {
173
+ _context5.next = 7;
174
+ break;
175
+ }
176
+ _context5.next = 3;
177
+ return http.get(encodeURI(url));
178
+ case 3:
179
+ res = _context5.sent;
180
+ return _context5.abrupt("return", res.successed ? res.data : []);
181
+ case 7:
182
+ _context5.next = 9;
183
+ return http.post(encodeURI(url), body);
184
+ case 9:
185
+ _res = _context5.sent;
186
+ return _context5.abrupt("return", _res.successed ? _res.data : []);
187
+ case 11:
188
+ case "end":
189
+ return _context5.stop();
234
190
  }
235
191
  }, _callee5);
236
192
  }));
237
-
238
193
  function GetEnumDataByUrl(_x6, _x7, _x8) {
239
194
  return _GetEnumDataByUrl.apply(this, arguments);
240
195
  }
241
-
242
196
  return GetEnumDataByUrl;
243
197
  }()
244
198
  }]);
245
-
246
199
  return Api;
247
200
  }();
248
-
249
201
  export { Api as default };
@@ -1,5 +1,4 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
-
3
2
  /*
4
3
  * @Author: wangxian
5
4
  * @Date: 2022-05-27 09:56:39
@@ -10,26 +9,20 @@ import NodeContextMenu from './contextMenu/NodeContextMenu';
10
9
  import './ContextMenu.less';
11
10
  import { EdgeContextMenu } from './contextMenu/EdgeContextMenu';
12
11
  import useObservable from '../../../framework/rxjs-hooks/useObservable';
13
-
14
12
  var ContextMenu = function ContextMenu(props) {
15
13
  var _graph$factory$;
16
-
17
14
  var graph = props.graph;
18
-
19
15
  var _React$useState = React.useState(),
20
- _React$useState2 = _slicedToArray(_React$useState, 2),
21
- menu = _React$useState2[0],
22
- setMenu = _React$useState2[1];
23
-
16
+ _React$useState2 = _slicedToArray(_React$useState, 2),
17
+ menu = _React$useState2[0],
18
+ setMenu = _React$useState2[1];
24
19
  useObservable(function (v) {
25
20
  setMenu(v);
26
21
  }, [graph === null || graph === void 0 ? void 0 : (_graph$factory$ = graph.factory$) === null || _graph$factory$ === void 0 ? void 0 : _graph$factory$.contextMenuInfo]);
27
-
28
22
  // 暂时屏蔽graph的右击菜单
29
23
  if (!(menu === null || menu === void 0 ? void 0 : menu.type) || (menu === null || menu === void 0 ? void 0 : menu.type) === 'graph') {
30
24
  return null;
31
25
  }
32
-
33
26
  return /*#__PURE__*/React.createElement("div", {
34
27
  className: "mask"
35
28
  }, (menu === null || menu === void 0 ? void 0 : menu.type) === 'node' && /*#__PURE__*/React.createElement(NodeContextMenu, {
@@ -40,5 +33,4 @@ var ContextMenu = function ContextMenu(props) {
40
33
  data: menu.data
41
34
  }));
42
35
  };
43
-
44
36
  export default ContextMenu;
@@ -1,20 +1,18 @@
1
1
  import React from "react";
2
-
3
2
  /*
4
3
  * @Author: wangxian
5
4
  * @Date: 2022-05-26 08:50:06
6
- * @LastEditTime: 2022-06-25 10:46:48
5
+ * @LastEditTime: 2023-04-27 18:49:56
7
6
  */
8
7
  import { DragSource } from 'react-dnd';
9
8
  import { GlobalOutlined } from '@ant-design/icons';
10
9
  import Icon from '../../../comps/Icons';
11
10
  import { DRAGGABLE_COMPONENT } from '../constant';
12
11
  import '../index.less';
13
-
14
12
  var InnerNodeTitle = function InnerNodeTitle(props) {
15
13
  var data = props.data,
16
- connectDragPreview = props.connectDragPreview,
17
- connectDragSource = props.connectDragSource;
14
+ connectDragPreview = props.connectDragPreview,
15
+ connectDragSource = props.connectDragSource;
18
16
  return /*#__PURE__*/React.createElement("div", null, connectDragPreview(connectDragSource( /*#__PURE__*/React.createElement("div", {
19
17
  className: "node-element",
20
18
  style: {
@@ -30,7 +28,6 @@ var InnerNodeTitle = function InnerNodeTitle(props) {
30
28
  className: "name"
31
29
  }, data.name))))));
32
30
  };
33
-
34
31
  var NodeTitle = DragSource(DRAGGABLE_COMPONENT, {
35
32
  beginDrag: function beginDrag(props) {
36
33
  return {
@@ -44,12 +41,10 @@ var NodeTitle = DragSource(DRAGGABLE_COMPONENT, {
44
41
  isDragging: monitor.isDragging()
45
42
  };
46
43
  })(InnerNodeTitle);
47
-
48
44
  var DragNode = function DragNode(props) {
49
45
  var data = props.data;
50
46
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(NodeTitle, {
51
47
  data: data
52
48
  }));
53
49
  };
54
-
55
50
  export default DragNode;
@@ -1,6 +1,5 @@
1
1
  import "antd/es/popover/style";
2
2
  import _Popover from "antd/es/popover";
3
-
4
3
  /*
5
4
  * @Author: wangxian
6
5
  * @Date: 2022-05-27 14:21:23
@@ -13,10 +12,10 @@ import './index.less';
13
12
  import { tr } from '../../../../framework/locale';
14
13
  export var GraphHandler = function GraphHandler(props) {
15
14
  var className = props.className,
16
- onZoomIn = props.onZoomIn,
17
- onZoomOut = props.onZoomOut,
18
- onFitContent = props.onFitContent,
19
- onRealContent = props.onRealContent;
15
+ onZoomIn = props.onZoomIn,
16
+ onZoomOut = props.onZoomOut,
17
+ onFitContent = props.onFitContent,
18
+ onRealContent = props.onRealContent;
20
19
  return /*#__PURE__*/React.createElement("ul", {
21
20
  className: classNames('handler', className)
22
21
  }, /*#__PURE__*/React.createElement(_Popover, {
@@ -1,5 +1,4 @@
1
1
  import React from "react";
2
-
3
2
  /*
4
3
  * @Author: wangxian
5
4
  * @Date: 2022-05-24 08:50:16
@@ -8,12 +7,11 @@ import React from "react";
8
7
  import { GlobalOutlined } from '@ant-design/icons';
9
8
  import '../index.less';
10
9
  import Icon from '../../../comps/Icons';
11
-
12
10
  var NodeElement = function NodeElement(props) {
13
11
  var node = props.node;
14
12
  var data = (node === null || node === void 0 ? void 0 : node.getData()) || {};
15
13
  var name = data.name,
16
- icon = data.icon;
14
+ icon = data.icon;
17
15
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
18
16
  className: "node-element"
19
17
  }, /*#__PURE__*/React.createElement("div", {
@@ -27,5 +25,4 @@ var NodeElement = function NodeElement(props) {
27
25
  title: name
28
26
  }, name))));
29
27
  };
30
-
31
28
  export default NodeElement;
@@ -1,6 +1,5 @@
1
1
  import "antd/es/menu/style";
2
2
  import _Menu from "antd/es/menu";
3
-
4
3
  /*
5
4
  * @Author: wangxian
6
5
  * @Date: 2022-05-27 15:55:57
@@ -14,7 +13,7 @@ import './index.less';
14
13
  import { tr } from '../../../../../framework/locale';
15
14
  export var EdgeContextMenu = function EdgeContextMenu(props) {
16
15
  var graph = props.graph,
17
- data = props.data;
16
+ data = props.data;
18
17
  var containerRef = useRef(null);
19
18
  useClickAway(function () {
20
19
  graph.clearContextMenuInfo();
@@ -23,11 +22,9 @@ export var EdgeContextMenu = function EdgeContextMenu(props) {
23
22
  graph.onDeleteEdges(data.edge);
24
23
  graph.clearContextMenuInfo();
25
24
  }, [graph, data]);
26
-
27
25
  var _graphPointToOffsetPo = graphPointToOffsetPoint(graph.graph, data, graph.wrapper),
28
- left = _graphPointToOffsetPo.x,
29
- top = _graphPointToOffsetPo.y;
30
-
26
+ left = _graphPointToOffsetPo.x,
27
+ top = _graphPointToOffsetPo.y;
31
28
  return /*#__PURE__*/React.createElement("div", {
32
29
  ref: containerRef,
33
30
  className: "edgeContextMenu",
@@ -1,6 +1,5 @@
1
1
  import "antd/es/menu/style";
2
2
  import _Menu from "antd/es/menu";
3
-
4
3
  /*
5
4
  * @Author: wangxian
6
5
  * @Date: 2022-05-27 16:04:27
@@ -14,18 +13,15 @@ import { tr } from '../../../../../framework/locale';
14
13
  import './index.less';
15
14
  export var GraphContextMenu = function GraphContextMenu(props) {
16
15
  var graph = props.graph,
17
- data = props.data;
16
+ data = props.data;
18
17
  var containerRef = useRef(null);
19
18
  useClickAway(function () {
20
19
  graph.clearContextMenuInfo();
21
20
  }, containerRef);
22
-
23
21
  var onRefresh = function onRefresh() {};
24
-
25
22
  var _graphPointToOffsetPo = graphPointToOffsetPoint(graph.graph, data, graph.wrapper),
26
- left = _graphPointToOffsetPo.x,
27
- top = _graphPointToOffsetPo.y;
28
-
23
+ left = _graphPointToOffsetPo.x,
24
+ top = _graphPointToOffsetPo.y;
29
25
  return /*#__PURE__*/React.createElement("div", {
30
26
  ref: containerRef,
31
27
  className: "graphContextMenu",
@@ -1,44 +1,42 @@
1
1
  import "antd/es/menu/style";
2
2
  import _Menu from "antd/es/menu";
3
- import _regeneratorRuntime from "@babel/runtime/regenerator";
4
3
  import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
4
+ /*
5
+ * @Author: wangxian
6
+ * @Date: 2022-05-27 11:35:01
7
+ * @LastEditTime: 2022-05-28 10:08:32
8
+ */
9
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
5
10
  import { DeleteOutlined } from '@ant-design/icons';
6
11
  import React from 'react';
7
12
  import { useClickAway } from 'ahooks';
8
13
  import { graphPointToOffsetPoint } from '../../../utils';
9
14
  import { tr } from '../../../../../framework/locale';
10
15
  import './index.less';
11
-
12
16
  var NodeContextMenu = function NodeContextMenu(props) {
13
17
  var graph = props.graph,
14
- data = props.data;
18
+ data = props.data;
15
19
  var containerRef = React.useRef(null);
16
20
  useClickAway(function () {
17
21
  graph.clearContextMenuInfo();
18
22
  }, containerRef);
19
23
  var onNodeDel = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
20
24
  return _regeneratorRuntime.wrap(function _callee$(_context) {
21
- while (1) {
22
- switch (_context.prev = _context.next) {
23
- case 0:
24
- _context.next = 2;
25
- return graph.onDeleteNodes([data.node.id]);
26
-
27
- case 2:
28
- graph.clearContextMenuInfo();
29
-
30
- case 3:
31
- case "end":
32
- return _context.stop();
33
- }
25
+ while (1) switch (_context.prev = _context.next) {
26
+ case 0:
27
+ _context.next = 2;
28
+ return graph.onDeleteNodes([data.node.id]);
29
+ case 2:
30
+ graph.clearContextMenuInfo();
31
+ case 3:
32
+ case "end":
33
+ return _context.stop();
34
34
  }
35
35
  }, _callee);
36
36
  })), [graph]);
37
-
38
37
  var _graphPointToOffsetPo = graphPointToOffsetPoint(graph.graph, data, graph.wrapper),
39
- left = _graphPointToOffsetPo.x,
40
- top = _graphPointToOffsetPo.y;
41
-
38
+ left = _graphPointToOffsetPo.x,
39
+ top = _graphPointToOffsetPo.y;
42
40
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
43
41
  ref: containerRef,
44
42
  className: "graphContextMenu",
@@ -51,5 +49,4 @@ var NodeContextMenu = function NodeContextMenu(props) {
51
49
  icon: /*#__PURE__*/React.createElement(DeleteOutlined, null)
52
50
  }, tr('删除')))));
53
51
  };
54
-
55
52
  export default NodeContextMenu;
@@ -2,7 +2,6 @@ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/esm/createClass";
3
3
  import _inherits from "@babel/runtime/helpers/esm/inherits";
4
4
  import _createSuper from "@babel/runtime/helpers/esm/createSuper";
5
-
6
5
  /*
7
6
  * @Author: wangxian
8
7
  * @Date: 2022-05-24 09:18:34
@@ -12,37 +11,29 @@ import { Shape, Edge } from '@antv/x6';
12
11
  import './edge.less';
13
12
  export var BaseEdge = /*#__PURE__*/function (_Shape$Edge) {
14
13
  _inherits(BaseEdge, _Shape$Edge);
15
-
16
14
  var _super = _createSuper(BaseEdge);
17
-
18
15
  function BaseEdge() {
19
16
  _classCallCheck(this, BaseEdge);
20
-
21
17
  return _super.apply(this, arguments);
22
18
  }
23
-
24
19
  _createClass(BaseEdge, [{
25
20
  key: "isGroupEdge",
26
- value: // eslint-disable-next-line class-methods-use-this
21
+ value:
22
+ // eslint-disable-next-line class-methods-use-this
27
23
  function isGroupEdge() {
28
24
  return false;
29
25
  }
30
26
  }]);
31
-
32
27
  return BaseEdge;
33
28
  }(Shape.Edge);
34
29
  export var DPEdge = /*#__PURE__*/function (_BaseEdge) {
35
30
  _inherits(DPEdge, _BaseEdge);
36
-
37
31
  var _super2 = _createSuper(DPEdge);
38
-
39
32
  function DPEdge() {
40
33
  _classCallCheck(this, DPEdge);
41
-
42
34
  return _super2.apply(this, arguments);
43
35
  }
44
-
45
- return DPEdge;
36
+ return _createClass(DPEdge);
46
37
  }(BaseEdge);
47
38
  DPEdge.config({
48
39
  shape: 'DPEdge',
@@ -63,23 +54,19 @@ DPEdge.config({
63
54
  });
64
55
  export var DPGroupEdge = /*#__PURE__*/function (_DPEdge) {
65
56
  _inherits(DPGroupEdge, _DPEdge);
66
-
67
57
  var _super3 = _createSuper(DPGroupEdge);
68
-
69
58
  function DPGroupEdge() {
70
59
  _classCallCheck(this, DPGroupEdge);
71
-
72
60
  return _super3.apply(this, arguments);
73
61
  }
74
-
75
62
  _createClass(DPGroupEdge, [{
76
63
  key: "isGroupEdge",
77
- value: // eslint-disable-next-line class-methods-use-this
64
+ value:
65
+ // eslint-disable-next-line class-methods-use-this
78
66
  function isGroupEdge() {
79
67
  return true;
80
68
  }
81
69
  }]);
82
-
83
70
  return DPGroupEdge;
84
71
  }(DPEdge);
85
72
  DPGroupEdge.config({