ronds-metadata 1.2.2 → 1.2.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,41 +1,41 @@
1
- pre {
2
- margin: 0;
3
- font-weight: 900;
4
- font-size: 14px;
5
- }
6
- .string {
7
- color: #3ab54a;
8
- }
9
- .number {
10
- color: #25aae2;
11
- }
12
- .boolean {
13
- color: #f98280;
14
- }
15
- .null {
16
- color: #f1592a;
17
- }
18
- .width-10 {
19
- width: 10px;
20
- }
21
- .key {
22
- color: #92278f;
23
- }
24
- .open {
25
- display: inline-block;
26
- width: 12px;
27
- height: 12px;
28
- background: url('./icon/close.png') no-repeat;
29
- background-size: 100% 100%;
30
- vertical-align: middle;
31
- cursor: pointer;
32
- }
33
- .close {
34
- display: inline-block;
35
- width: 12px;
36
- height: 12px;
37
- background: url('./icon/open.png') no-repeat;
38
- background-size: 100% 100%;
39
- vertical-align: middle;
40
- cursor: pointer;
41
- }
1
+ pre {
2
+ margin: 0;
3
+ font-weight: 900;
4
+ font-size: 14px;
5
+ }
6
+ .string {
7
+ color: #3ab54a;
8
+ }
9
+ .number {
10
+ color: #25aae2;
11
+ }
12
+ .boolean {
13
+ color: #f98280;
14
+ }
15
+ .null {
16
+ color: #f1592a;
17
+ }
18
+ .width-10 {
19
+ width: 10px;
20
+ }
21
+ .key {
22
+ color: #92278f;
23
+ }
24
+ .open {
25
+ display: inline-block;
26
+ width: 12px;
27
+ height: 12px;
28
+ background: url('./icon/close.png') no-repeat;
29
+ background-size: 100% 100%;
30
+ vertical-align: middle;
31
+ cursor: pointer;
32
+ }
33
+ .close {
34
+ display: inline-block;
35
+ width: 12px;
36
+ height: 12px;
37
+ background: url('./icon/open.png') no-repeat;
38
+ background-size: 100% 100%;
39
+ vertical-align: middle;
40
+ cursor: pointer;
41
+ }
@@ -1,10 +1,10 @@
1
- .metadata-edit {
2
- height: 100%;
3
- width: 100%;
4
- .ant-row {
5
- display: block;
6
- }
7
- .pr-10 {
8
- padding-right: 10px;
9
- }
10
- }
1
+ .metadata-edit {
2
+ height: 100%;
3
+ width: 100%;
4
+ .ant-row {
5
+ display: block;
6
+ }
7
+ .pr-10 {
8
+ padding-right: 10px;
9
+ }
10
+ }
@@ -1,20 +1,20 @@
1
- export interface IMetaFileds {
2
- id: string;
3
- type: 'object';
4
- properties: any[];
5
- value: any;
6
- }
7
-
8
- export type ITypeStatus = 'object' | 'ref' | 'bool' | 'number' | 'text' | 'enum' | 'array';
9
-
10
- export type IMetaProperty = {
11
- /**
12
- * 属性的名称
13
- */
14
- id: string;
15
- /**
16
- * 类型
17
- */
18
- type: string;
19
- enum?: any[];
20
- };
1
+ export interface IMetaFileds {
2
+ id: string;
3
+ type: 'object';
4
+ properties: any[];
5
+ value: any;
6
+ }
7
+
8
+ export type ITypeStatus = 'object' | 'ref' | 'bool' | 'number' | 'text' | 'enum' | 'array';
9
+
10
+ export type IMetaProperty = {
11
+ /**
12
+ * 属性的名称
13
+ */
14
+ id: string;
15
+ /**
16
+ * 类型
17
+ */
18
+ type: string;
19
+ enum?: any[];
20
+ };
@@ -12,7 +12,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
12
12
  /*
13
13
  * @Author: wangxian
14
14
  * @Date: 2021-09-18 14:15:04
15
- * @LastEditTime: 2023-02-22 13:54:18
15
+ * @LastEditTime: 2023-02-22 16:38:00
16
16
  */
17
17
  import React from 'react';
18
18
  import { MinusCircleOutlined, PlusOutlined } from '@ant-design/icons';
@@ -30,6 +30,7 @@ function Index(props) {
30
30
  isRefForm = props.isRefForm,
31
31
  fieldRule = props.fields,
32
32
  colSpan = props.colSpan,
33
+ labelSpan = props.labelSpan,
33
34
  initEnumValue = props.initEnumValue,
34
35
  name = props.name,
35
36
  disabled = props.disabled;
@@ -72,15 +73,15 @@ function Index(props) {
72
73
  }
73
74
  }, [items]);
74
75
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Row, null, /*#__PURE__*/React.createElement(_Col, {
75
- span: (formContext === null || formContext === void 0 ? void 0 : formContext.labelSpan) && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? formContext === null || formContext === void 0 ? void 0 : formContext.labelSpan : 24
76
+ span: labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? labelSpan : 24
76
77
  }, !(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.titleHidden) && /*#__PURE__*/React.createElement("div", {
77
78
  style: {
78
79
  position: 'relative',
79
80
  width: '100%',
80
- textAlign: "".concat((formContext === null || formContext === void 0 ? void 0 : formContext.labelSpan) && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? 'right' : 'left')
81
+ textAlign: "".concat(labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? 'right' : 'left')
81
82
  }
82
83
  }, /*#__PURE__*/React.createElement("div", {
83
- className: "ant-form-item-label mt-1 "
84
+ className: "ant-form-item-label ant-form-item-label-wrap mt-1 "
84
85
  }, /*#__PURE__*/React.createElement("label", {
85
86
  className: "".concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require) && 'ant-form-item-required')
86
87
  }, extraInfo.label || fieldRule && ((_fieldRule$ = fieldRule[0]) === null || _fieldRule$ === void 0 ? void 0 : (_fieldRule$$value = _fieldRule$.value) === null || _fieldRule$$value === void 0 ? void 0 : _fieldRule$$value.label) || fieldRule && ((_fieldRule$2 = fieldRule[0]) === null || _fieldRule$2 === void 0 ? void 0 : (_fieldRule$2$value = _fieldRule$2.value) === null || _fieldRule$2$value === void 0 ? void 0 : _fieldRule$2$value.common.label) || id)), formContext.isShowTypeInfo && /*#__PURE__*/React.createElement("div", {
@@ -92,7 +93,7 @@ function Index(props) {
92
93
  background: '#fff'
93
94
  }
94
95
  }, help || (items === null || items === void 0 ? void 0 : items.type)))), /*#__PURE__*/React.createElement(_Col, {
95
- span: (formContext === null || formContext === void 0 ? void 0 : formContext.labelSpan) && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? 24 - (formContext === null || formContext === void 0 ? void 0 : formContext.labelSpan) : 24
96
+ span: labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? 24 - labelSpan : 24
96
97
  }, extraInfo.layout === 'table' && items.type === 'ref' ? /*#__PURE__*/React.createElement(TableArray, {
97
98
  initValue: formContext.initialValues,
98
99
  initEnumValue: initEnumValue,
@@ -31,7 +31,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
31
31
  /*
32
32
  * @Author:wangxian
33
33
  * @Date: 2021-09-18 14:15:04
34
- * @LastEditTime: 2023-02-21 19:19:39
34
+ * @LastEditTime: 2023-02-23 09:58:36
35
35
  */
36
36
  import React from 'react';
37
37
  import { MetadataFormContext, MetadataRefContext } from '../interface';
@@ -88,73 +88,77 @@ function Index(props) {
88
88
  var _watch = extraInfo === null || extraInfo === void 0 ? void 0 : (_extraInfo$http = extraInfo.http) === null || _extraInfo$http === void 0 ? void 0 : _extraInfo$http.watch;
89
89
 
90
90
  if (_watch && (p === null || p === void 0 ? void 0 : p.type) === 'onValuesChange') {
91
- var _watchArr = _watch.split(',');
91
+ try {
92
+ var _watchArr = _watch.split(',');
92
93
 
93
- if (_watchArr.length === 1) {
94
- var evalString = '';
94
+ if (_watchArr.length === 1) {
95
+ var evalString = '';
95
96
 
96
- for (var i = 0; i < name.length; i++) {
97
- if (i < name.length - 1) {
98
- evalString = "".concat(evalString, "[name[").concat(i, "]]");
97
+ for (var i = 0; i < name.length; i++) {
98
+ if (i < name.length - 1) {
99
+ evalString = "".concat(evalString, "[name[").concat(i, "]]");
100
+ }
99
101
  }
100
- }
101
102
 
102
- var _value = eval("p?.payload?.allVals".concat(evalString, "[_watchArr[0]]"));
103
+ var _value = eval("p?.payload?.allVals".concat(evalString, "[_watchArr[0]]"));
103
104
 
104
- var _changeData = eval("p?.payload?.val".concat(evalString, "[_watchArr[0]]"));
105
+ var _changeData = eval("p?.payload?.val".concat(evalString, "[_watchArr[0]]"));
105
106
 
106
- if (_value && _changeData) {
107
- if ((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.http.method) === 'post') {
108
- var _wRef = watchValueRef.current || {};
107
+ if (_value && _changeData) {
108
+ if ((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.http.method) === 'post') {
109
+ var _wRef = watchValueRef.current || {};
109
110
 
110
- _wRef[_watchArr[0]] = _value;
111
- watchValueRef.current = _wRef;
112
- setWatchValue(_value);
113
- } else {
114
- setWatchValue(_value.toString());
115
- watchValueRef.current = _value;
111
+ _wRef[_watchArr[0]] = _value;
112
+ watchValueRef.current = _wRef;
113
+ setWatchValue(_value);
114
+ } else {
115
+ setWatchValue(_value.toString());
116
+ watchValueRef.current = _value;
117
+ }
116
118
  }
117
- }
118
119
 
119
- if (_changeData) {
120
- setTimeout(function () {
121
- var v = {};
122
- assign(name, undefined, v);
123
- formContext.form.setFieldsValue(_objectSpread({}, v));
124
- }, 100);
125
- }
126
- } else {
127
- var b = false;
120
+ if (_changeData) {
121
+ setTimeout(function () {
122
+ var v = {};
123
+ assign(name, undefined, v);
124
+ formContext.form.setFieldsValue(_objectSpread({}, v));
125
+ }, 100);
126
+ }
127
+ } else {
128
+ var b = false;
128
129
 
129
- for (var _i = 0; _i < _watchArr.length; _i++) {
130
- var w = _watchArr[_i];
131
- var _evalString = '';
130
+ for (var _i = 0; _i < _watchArr.length; _i++) {
131
+ var w = _watchArr[_i];
132
+ var _evalString = '';
132
133
 
133
- for (var _i2 = 0; _i2 < name.length; _i2++) {
134
- if (_i2 < name.length - 1) {
135
- _evalString = "".concat(_evalString, "[name[").concat(_i2, "]]");
134
+ for (var _i2 = 0; _i2 < name.length; _i2++) {
135
+ if (_i2 < name.length - 1) {
136
+ _evalString = "".concat(_evalString, "[name[").concat(_i2, "]]");
137
+ }
136
138
  }
137
- }
138
139
 
139
- var _value2 = eval("p?.payload?.allVals".concat(_evalString, "[w]"));
140
+ var _value2 = eval("p?.payload?.allVals".concat(_evalString, "[w]"));
140
141
 
141
- if (_value2) {
142
- var _wRef2 = watchValueRef.current || {};
142
+ if (_value2) {
143
+ var _wRef2 = watchValueRef.current || {};
143
144
 
144
- _wRef2[w] = _value2;
145
- watchValueRef.current = _wRef2;
146
- b = eval("p?.payload?.val".concat(_evalString, "[w]"));
145
+ _wRef2[w] = _value2;
146
+ watchValueRef.current = _wRef2;
147
+ b = eval("p?.payload?.val".concat(_evalString, "[w]"));
148
+ }
147
149
  }
148
- }
149
150
 
150
- if (b) {
151
- setWatchValue(_objectSpread({}, watchValueRef.current));
152
- setTimeout(function () {
153
- var v = {};
154
- assign(name, undefined, v);
155
- formContext.form.setFieldsValue(_objectSpread({}, v));
156
- }, 100);
151
+ if (b) {
152
+ setWatchValue(_objectSpread({}, watchValueRef.current));
153
+ setTimeout(function () {
154
+ var v = {};
155
+ assign(name, undefined, v);
156
+ formContext.form.setFieldsValue(_objectSpread({}, v));
157
+ }, 100);
158
+ }
157
159
  }
160
+ } catch (error) {
161
+ console.warn('watch:' + error);
158
162
  }
159
163
  }
160
164
  }, [formContext.stream$, extraInfo]);
@@ -1,5 +1,3 @@
1
- import "antd/es/form/style";
2
- import _Form from "antd/es/form";
3
1
  import _regeneratorRuntime from "@babel/runtime/regenerator";
4
2
  import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
5
3
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
@@ -325,11 +323,6 @@ var TableArray = function TableArray(props) {
325
323
  width: '100%',
326
324
  height: addButtonHidden || readonly ? "".concat(rowNumber * getCellHeight(readonly) + 45, "px") : "".concat(rowNumber * getCellHeight(readonly) + 45 + 40, "px")
327
325
  }
328
- }, /*#__PURE__*/React.createElement(_Form.Item, {
329
- name: name,
330
- style: {
331
- margin: 0
332
- }
333
326
  }, /*#__PURE__*/React.createElement(Editable, {
334
327
  type: "multiple",
335
328
  readonly: readonly,
@@ -350,7 +343,7 @@ var TableArray = function TableArray(props) {
350
343
  y: addButtonHidden || readonly ? "".concat(rowNumber * getCellHeight(readonly) + 45, "px ") : "".concat(rowNumber * getCellHeight(readonly), "px ")
351
344
  }
352
345
  }
353
- })));
346
+ }));
354
347
  };
355
348
 
356
349
  export default TableArray;
@@ -37,7 +37,7 @@ export function withAddOnAfter(WrappedComponent) {
37
37
  var labelSpan = React.useMemo(function () {
38
38
  var _fields$0$value, _fields$0$value$commo;
39
39
 
40
- var _labelSpan = undefined;
40
+ var _labelSpan = formContext === null || formContext === void 0 ? void 0 : formContext.labelSpan;
41
41
 
42
42
  var _colSpan = fields && ((_fields$0$value = fields[0].value) === null || _fields$0$value === void 0 ? void 0 : (_fields$0$value$commo = _fields$0$value.common) === null || _fields$0$value$commo === void 0 ? void 0 : _fields$0$value$commo.colSpan);
43
43
 
@@ -1,8 +1,8 @@
1
1
  @font-face {
2
2
  font-family: "fa"; /* Project id 2247093 */
3
- src: url('iconfont.woff2?t=1667906194044') format('woff2'),
4
- url('iconfont.woff?t=1667906194044') format('woff'),
5
- url('iconfont.ttf?t=1667906194044') format('truetype');
3
+ src: url('iconfont.woff2?t=1677113748870') format('woff2'),
4
+ url('iconfont.woff?t=1677113748870') format('woff'),
5
+ url('iconfont.ttf?t=1677113748870') format('truetype');
6
6
  }
7
7
 
8
8
  .fa {
@@ -13,6 +13,10 @@
13
13
  -moz-osx-font-smoothing: grayscale;
14
14
  }
15
15
 
16
+ .fa-Es:before {
17
+ content: "\e6a1";
18
+ }
19
+
16
20
  .fa-transform:before {
17
21
  content: "\ed70";
18
22
  }
@@ -0,0 +1,380 @@
1
+ {
2
+ "id": "2247093",
3
+ "name": "工业大数据",
4
+ "font_family": "fa",
5
+ "css_prefix_text": "fa-",
6
+ "description": "",
7
+ "glyphs": [
8
+ {
9
+ "icon_id": "13543355",
10
+ "name": "elasticsearch Elasticsearch",
11
+ "font_class": "Es",
12
+ "unicode": "e6a1",
13
+ "unicode_decimal": 59041
14
+ },
15
+ {
16
+ "icon_id": "490744",
17
+ "name": "transform",
18
+ "font_class": "transform",
19
+ "unicode": "ed70",
20
+ "unicode_decimal": 60784
21
+ },
22
+ {
23
+ "icon_id": "6151161",
24
+ "name": "info-circle-fill",
25
+ "font_class": "info",
26
+ "unicode": "e7dc",
27
+ "unicode_decimal": 59356
28
+ },
29
+ {
30
+ "icon_id": "6756289",
31
+ "name": "专家",
32
+ "font_class": "expert",
33
+ "unicode": "e60c",
34
+ "unicode_decimal": 58892
35
+ },
36
+ {
37
+ "icon_id": "9058121",
38
+ "name": "8_8人工智能",
39
+ "font_class": "ai1",
40
+ "unicode": "e60d",
41
+ "unicode_decimal": 58893
42
+ },
43
+ {
44
+ "icon_id": "25885522",
45
+ "name": "AI、智能大脑-08",
46
+ "font_class": "ai2",
47
+ "unicode": "e893",
48
+ "unicode_decimal": 59539
49
+ },
50
+ {
51
+ "icon_id": "4638874",
52
+ "name": "智能AI",
53
+ "font_class": "ai",
54
+ "unicode": "e887",
55
+ "unicode_decimal": 59527
56
+ },
57
+ {
58
+ "icon_id": "5928197",
59
+ "name": "信号",
60
+ "font_class": "signal",
61
+ "unicode": "ec4a",
62
+ "unicode_decimal": 60490
63
+ },
64
+ {
65
+ "icon_id": "12095328",
66
+ "name": "圆",
67
+ "font_class": "circle",
68
+ "unicode": "e660",
69
+ "unicode_decimal": 58976
70
+ },
71
+ {
72
+ "icon_id": "9839113",
73
+ "name": "资产扫描",
74
+ "font_class": "scan",
75
+ "unicode": "e6df",
76
+ "unicode_decimal": 59103
77
+ },
78
+ {
79
+ "icon_id": "703054",
80
+ "name": "language-python-text",
81
+ "font_class": "py",
82
+ "unicode": "e916",
83
+ "unicode_decimal": 59670
84
+ },
85
+ {
86
+ "icon_id": "7123309",
87
+ "name": "redis",
88
+ "font_class": "Redis",
89
+ "unicode": "e669",
90
+ "unicode_decimal": 58985
91
+ },
92
+ {
93
+ "icon_id": "1338316",
94
+ "name": "盒子",
95
+ "font_class": "hezi",
96
+ "unicode": "e60b",
97
+ "unicode_decimal": 58891
98
+ },
99
+ {
100
+ "icon_id": "1851186",
101
+ "name": "消息",
102
+ "font_class": "message",
103
+ "unicode": "e637",
104
+ "unicode_decimal": 58935
105
+ },
106
+ {
107
+ "icon_id": "8802625",
108
+ "name": "数据库2",
109
+ "font_class": "shujuku",
110
+ "unicode": "e645",
111
+ "unicode_decimal": 58949
112
+ },
113
+ {
114
+ "icon_id": "3582411",
115
+ "name": "沙漏",
116
+ "font_class": "hourglass",
117
+ "unicode": "e66b",
118
+ "unicode_decimal": 58987
119
+ },
120
+ {
121
+ "icon_id": "20183028",
122
+ "name": "bucket",
123
+ "font_class": "Bucket",
124
+ "unicode": "e8ce",
125
+ "unicode_decimal": 59598
126
+ },
127
+ {
128
+ "icon_id": "18005114",
129
+ "name": "dlf-数据湖构建",
130
+ "font_class": "RondsLake",
131
+ "unicode": "e8a2",
132
+ "unicode_decimal": 59554
133
+ },
134
+ {
135
+ "icon_id": "10937694",
136
+ "name": "分组",
137
+ "font_class": "Schema",
138
+ "unicode": "e62a",
139
+ "unicode_decimal": 58922
140
+ },
141
+ {
142
+ "icon_id": "1526261",
143
+ "name": "文件",
144
+ "font_class": "Minio",
145
+ "unicode": "e64e",
146
+ "unicode_decimal": 58958
147
+ },
148
+ {
149
+ "icon_id": "5886128",
150
+ "name": "颜色",
151
+ "font_class": "color",
152
+ "unicode": "e678",
153
+ "unicode_decimal": 59000
154
+ },
155
+ {
156
+ "icon_id": "9948899",
157
+ "name": "graph",
158
+ "font_class": "Neo4j",
159
+ "unicode": "e612",
160
+ "unicode_decimal": 58898
161
+ },
162
+ {
163
+ "icon_id": "11836501",
164
+ "name": "知识库",
165
+ "font_class": "knowledge",
166
+ "unicode": "e621",
167
+ "unicode_decimal": 58913
168
+ },
169
+ {
170
+ "icon_id": "1162764",
171
+ "name": "评价",
172
+ "font_class": "evaluate",
173
+ "unicode": "e608",
174
+ "unicode_decimal": 58888
175
+ },
176
+ {
177
+ "icon_id": "1444787",
178
+ "name": "json",
179
+ "font_class": "json1",
180
+ "unicode": "e7bd",
181
+ "unicode_decimal": 59325
182
+ },
183
+ {
184
+ "icon_id": "9589361",
185
+ "name": "统计结果",
186
+ "font_class": "result",
187
+ "unicode": "e64c",
188
+ "unicode_decimal": 58956
189
+ },
190
+ {
191
+ "icon_id": "19544305",
192
+ "name": "分析卡片",
193
+ "font_class": "analysis",
194
+ "unicode": "e72e",
195
+ "unicode_decimal": 59182
196
+ },
197
+ {
198
+ "icon_id": "11755927",
199
+ "name": "对",
200
+ "font_class": "select",
201
+ "unicode": "e701",
202
+ "unicode_decimal": 59137
203
+ },
204
+ {
205
+ "icon_id": "13303552",
206
+ "name": "http",
207
+ "font_class": "Http",
208
+ "unicode": "e668",
209
+ "unicode_decimal": 58984
210
+ },
211
+ {
212
+ "icon_id": "13752783",
213
+ "name": "问号",
214
+ "font_class": "question",
215
+ "unicode": "e60e",
216
+ "unicode_decimal": 58894
217
+ },
218
+ {
219
+ "icon_id": "8334931",
220
+ "name": "运维中心",
221
+ "font_class": "monitor",
222
+ "unicode": "e61f",
223
+ "unicode_decimal": 58911
224
+ },
225
+ {
226
+ "icon_id": "12268077",
227
+ "name": "算法包管理",
228
+ "font_class": "algorithm_lab",
229
+ "unicode": "e607",
230
+ "unicode_decimal": 58887
231
+ },
232
+ {
233
+ "icon_id": "13210919",
234
+ "name": "视觉计算处理器",
235
+ "font_class": "engine",
236
+ "unicode": "e610",
237
+ "unicode_decimal": 58896
238
+ },
239
+ {
240
+ "icon_id": "7674872",
241
+ "name": "用户",
242
+ "font_class": "user",
243
+ "unicode": "e713",
244
+ "unicode_decimal": 59155
245
+ },
246
+ {
247
+ "icon_id": "11688055",
248
+ "name": "退出登录",
249
+ "font_class": "logout",
250
+ "unicode": "e611",
251
+ "unicode_decimal": 58897
252
+ },
253
+ {
254
+ "icon_id": "14559270",
255
+ "name": "大屏展示",
256
+ "font_class": "screen",
257
+ "unicode": "e606",
258
+ "unicode_decimal": 58886
259
+ },
260
+ {
261
+ "icon_id": "14683074",
262
+ "name": "修改密码",
263
+ "font_class": "password",
264
+ "unicode": "e605",
265
+ "unicode_decimal": 58885
266
+ },
267
+ {
268
+ "icon_id": "344281",
269
+ "name": "消息通知",
270
+ "font_class": "news",
271
+ "unicode": "e638",
272
+ "unicode_decimal": 58936
273
+ },
274
+ {
275
+ "icon_id": "8094195",
276
+ "name": "记录",
277
+ "font_class": "record",
278
+ "unicode": "e648",
279
+ "unicode_decimal": 58952
280
+ },
281
+ {
282
+ "icon_id": "15946868",
283
+ "name": "首页",
284
+ "font_class": "home",
285
+ "unicode": "e609",
286
+ "unicode_decimal": 58889
287
+ },
288
+ {
289
+ "icon_id": "521045",
290
+ "name": "JSON格式化",
291
+ "font_class": "json",
292
+ "unicode": "e61a",
293
+ "unicode_decimal": 58906
294
+ },
295
+ {
296
+ "icon_id": "1308544",
297
+ "name": "754编辑器_代码",
298
+ "font_class": "code",
299
+ "unicode": "e654",
300
+ "unicode_decimal": 58964
301
+ },
302
+ {
303
+ "icon_id": "16092271",
304
+ "name": "流程图",
305
+ "font_class": "diagram",
306
+ "unicode": "e60a",
307
+ "unicode_decimal": 58890
308
+ },
309
+ {
310
+ "icon_id": "741054",
311
+ "name": "平台管理",
312
+ "font_class": "setting",
313
+ "unicode": "e84b",
314
+ "unicode_decimal": 59467
315
+ },
316
+ {
317
+ "icon_id": "1472570",
318
+ "name": "配置数据源",
319
+ "font_class": "datasource",
320
+ "unicode": "e62e",
321
+ "unicode_decimal": 58926
322
+ },
323
+ {
324
+ "icon_id": "5961310",
325
+ "name": "流计算",
326
+ "font_class": "stream",
327
+ "unicode": "ec56",
328
+ "unicode_decimal": 60502
329
+ },
330
+ {
331
+ "icon_id": "4772840",
332
+ "name": "数据接入—Kafka集群",
333
+ "font_class": "Kafka",
334
+ "unicode": "e64f",
335
+ "unicode_decimal": 58959
336
+ },
337
+ {
338
+ "icon_id": "7193673",
339
+ "name": "表单",
340
+ "font_class": "Table",
341
+ "unicode": "e72d",
342
+ "unicode_decimal": 59181
343
+ },
344
+ {
345
+ "icon_id": "7556314",
346
+ "name": "Postgresql",
347
+ "font_class": "PostgreSql",
348
+ "unicode": "e63b",
349
+ "unicode_decimal": 58939
350
+ },
351
+ {
352
+ "icon_id": "11520190",
353
+ "name": "数据源",
354
+ "font_class": "link",
355
+ "unicode": "e636",
356
+ "unicode_decimal": 58934
357
+ },
358
+ {
359
+ "icon_id": "13328246",
360
+ "name": "files",
361
+ "font_class": "LocalFileSystem",
362
+ "unicode": "e600",
363
+ "unicode_decimal": 58880
364
+ },
365
+ {
366
+ "icon_id": "13723265",
367
+ "name": "cassandra",
368
+ "font_class": "Cassandra",
369
+ "unicode": "e74f",
370
+ "unicode_decimal": 59215
371
+ },
372
+ {
373
+ "icon_id": "14095342",
374
+ "name": "数据库",
375
+ "font_class": "DataBase",
376
+ "unicode": "e797",
377
+ "unicode_decimal": 59287
378
+ }
379
+ ]
380
+ }
@@ -1,98 +1,98 @@
1
- /*
2
- * @Author: wangxian
3
- * @Date: 2021-09-18 14:15:04
4
- * @LastEditTime: 2023-02-09 18:37:15
5
- */
6
- export type IMetaType = 'object' | 'ref' | 'bool' | 'number' | 'text' | 'enum' | 'array' | string;
7
-
8
- export type IMetaData = {
9
- /**
10
- * 类名称/属性名称
11
- */
12
- id: string;
13
- /**
14
- * 类型
15
- */
16
- type: IMetaType;
17
- /**
18
- * 属性
19
- */
20
- properties?: IMetaProperties[];
21
-
22
- /**
23
- * 引用id
24
- */
25
- refId?: string;
26
- /**
27
- * 静态的变量
28
- */
29
- fields?: IMetaFileds[];
30
- /**
31
- * 内部类
32
- */
33
- types?: IMetaData[];
34
- };
35
-
36
- export type IMetaProperties = {
37
- /**
38
- * 类规则名称
39
- */
40
- id: string;
41
-
42
- /**
43
- * 类型
44
- */
45
- type: IMetaType;
46
-
47
- /**
48
- * 引用id
49
- */
50
- refId?: string;
51
- /**
52
- * 静态的变量
53
- */
54
- fields?: IMetaFileds[];
55
- /**
56
- * 枚举值
57
- */
58
- enum?: { value: string }[];
59
- /**
60
- * 数组类型
61
- */
62
- items?: { type: IMetaType; refId?: string };
63
- };
64
-
65
- export type IMetaFileds = {
66
- /**
67
- * 规则名称
68
- */
69
- id: string;
70
-
71
- /**
72
- * 类型
73
- */
74
- type: IMetaType;
75
-
76
- /**
77
- * 引用id
78
- */
79
- refId?: string;
80
-
81
- /**
82
- * 规则值
83
- */
84
- value: any;
85
- };
86
-
87
- export interface IAPI {
88
- // 获取元数据列表
89
- GetMetadataList(keyWords?: string[]): Promise<{ id: string; name: string; schema: string }[]>;
90
- // 通过元数据Id获取元数据详情
91
- GetMetadataDetailById(metadataId: string): Promise<any>;
92
- // 新增元数据
93
- SaveMetadata(data: any, metadataTag: string): Promise<any>;
94
- // 获取元数据的值
95
- GetMetadataObjList(data: any): Promise<any[]>;
96
- /** 通过扩展规则获取枚举类型的值 */
97
- GetEnumDataByUrl(url: string, method: 'get' | 'post', body: any): Promise<any>;
98
- }
1
+ /*
2
+ * @Author: wangxian
3
+ * @Date: 2021-09-18 14:15:04
4
+ * @LastEditTime: 2023-02-09 18:37:15
5
+ */
6
+ export type IMetaType = 'object' | 'ref' | 'bool' | 'number' | 'text' | 'enum' | 'array' | string;
7
+
8
+ export type IMetaData = {
9
+ /**
10
+ * 类名称/属性名称
11
+ */
12
+ id: string;
13
+ /**
14
+ * 类型
15
+ */
16
+ type: IMetaType;
17
+ /**
18
+ * 属性
19
+ */
20
+ properties?: IMetaProperties[];
21
+
22
+ /**
23
+ * 引用id
24
+ */
25
+ refId?: string;
26
+ /**
27
+ * 静态的变量
28
+ */
29
+ fields?: IMetaFileds[];
30
+ /**
31
+ * 内部类
32
+ */
33
+ types?: IMetaData[];
34
+ };
35
+
36
+ export type IMetaProperties = {
37
+ /**
38
+ * 类规则名称
39
+ */
40
+ id: string;
41
+
42
+ /**
43
+ * 类型
44
+ */
45
+ type: IMetaType;
46
+
47
+ /**
48
+ * 引用id
49
+ */
50
+ refId?: string;
51
+ /**
52
+ * 静态的变量
53
+ */
54
+ fields?: IMetaFileds[];
55
+ /**
56
+ * 枚举值
57
+ */
58
+ enum?: { value: string }[];
59
+ /**
60
+ * 数组类型
61
+ */
62
+ items?: { type: IMetaType; refId?: string };
63
+ };
64
+
65
+ export type IMetaFileds = {
66
+ /**
67
+ * 规则名称
68
+ */
69
+ id: string;
70
+
71
+ /**
72
+ * 类型
73
+ */
74
+ type: IMetaType;
75
+
76
+ /**
77
+ * 引用id
78
+ */
79
+ refId?: string;
80
+
81
+ /**
82
+ * 规则值
83
+ */
84
+ value: any;
85
+ };
86
+
87
+ export interface IAPI {
88
+ // 获取元数据列表
89
+ GetMetadataList(keyWords?: string[]): Promise<{ id: string; name: string; schema: string }[]>;
90
+ // 通过元数据Id获取元数据详情
91
+ GetMetadataDetailById(metadataId: string): Promise<any>;
92
+ // 新增元数据
93
+ SaveMetadata(data: any, metadataTag: string): Promise<any>;
94
+ // 获取元数据的值
95
+ GetMetadataObjList(data: any): Promise<any[]>;
96
+ /** 通过扩展规则获取枚举类型的值 */
97
+ GetEnumDataByUrl(url: string, method: 'get' | 'post', body: any): Promise<any>;
98
+ }
package/es/theme.less CHANGED
@@ -1,77 +1,77 @@
1
- .ronds-metadata-dark {
2
- --ronds-metadata-color-border-1: #314162;
3
- --ronds-metadata-color-border-2: #0d9af3;
4
- --ronds-metadata-color-bg-2: #0d1f40;
5
- --ronds-metadata-color-bg-3: #0d1f40;
6
- --ronds-metadata-color-bg-4: #1c3771;
7
- --ronds-metadata-color-text-1: #ffffff;
8
- --ronds-metadata-color-text-2: #ffffff;
9
- --ronds-metadata-color-text-3: #ffffff;
10
-
11
- ::-webkit-scrollbar {
12
- width: 6px;
13
- height: 6px;
14
- overflow: auto;
15
- }
16
- ::-webkit-scrollbar-corner {
17
- background-color: transparent;
18
- color: transparent;
19
- }
20
-
21
- ::-webkit-scrollbar-thumb {
22
- box-shadow: inset 0 0 5px var(--scrollbar-bg-color);
23
- background: var(--scrollbar-color);
24
- min-height: 25px;
25
- min-width: 25px;
26
- border-radius: 3px;
27
-
28
- &:hover {
29
- border-radius: 2px;
30
- // box-shadow: inset 0 0 5px var(--scrollbar-color-hover);
31
- background: var(--scrollbar-color-hover);
32
- }
33
-
34
- &:active {
35
- // box-shadow: inset 0 0 5px var(--scrollbar-bg-color);
36
- background: var(--scrollbar-color-hover);
37
- }
38
- }
39
- }
40
-
41
- .ronds-metadata-normal {
42
- --ronds-metadata-color-border-1: #d9d9d9;
43
- --ronds-metadata-color-border-2: #165dff;
44
- --ronds-metadata-color-bg-2: #ffffff;
45
- --ronds-metadata-color-bg-3: #f6f5f6;
46
- --ronds-metadata-color-bg-4: #ffffff;
47
- --ronds-metadata-color-text-1: #1d2129;
48
- --ronds-metadata-color-text-2: #24292f;
49
- --ronds-metadata-color-text-3: #f2f3f5;
50
-
51
- ::-webkit-scrollbar {
52
- width: 6px;
53
- height: 6px;
54
- overflow: auto;
55
- }
56
-
57
- ::-webkit-scrollbar-thumb {
58
- background-color: var(--scrollbar-color);
59
- min-height: 25px;
60
- min-width: 25px;
61
- border-radius: 3px;
62
-
63
- &:hover {
64
- background-color: #a8a8a8;
65
- }
66
-
67
- &:active {
68
- background-color: #787878;
69
- }
70
-
71
- /* border: 1px solid #e0e0e0; */
72
- }
73
-
74
- ::-webkit-scrollbar-track {
75
- background-color: #f7f7f7;
76
- }
77
- }
1
+ .ronds-metadata-dark {
2
+ --ronds-metadata-color-border-1: #314162;
3
+ --ronds-metadata-color-border-2: #0d9af3;
4
+ --ronds-metadata-color-bg-2: #0d1f40;
5
+ --ronds-metadata-color-bg-3: #0d1f40;
6
+ --ronds-metadata-color-bg-4: #1c3771;
7
+ --ronds-metadata-color-text-1: #ffffff;
8
+ --ronds-metadata-color-text-2: #ffffff;
9
+ --ronds-metadata-color-text-3: #ffffff;
10
+
11
+ ::-webkit-scrollbar {
12
+ width: 6px;
13
+ height: 6px;
14
+ overflow: auto;
15
+ }
16
+ ::-webkit-scrollbar-corner {
17
+ background-color: transparent;
18
+ color: transparent;
19
+ }
20
+
21
+ ::-webkit-scrollbar-thumb {
22
+ box-shadow: inset 0 0 5px var(--scrollbar-bg-color);
23
+ background: var(--scrollbar-color);
24
+ min-height: 25px;
25
+ min-width: 25px;
26
+ border-radius: 3px;
27
+
28
+ &:hover {
29
+ border-radius: 2px;
30
+ // box-shadow: inset 0 0 5px var(--scrollbar-color-hover);
31
+ background: var(--scrollbar-color-hover);
32
+ }
33
+
34
+ &:active {
35
+ // box-shadow: inset 0 0 5px var(--scrollbar-bg-color);
36
+ background: var(--scrollbar-color-hover);
37
+ }
38
+ }
39
+ }
40
+
41
+ .ronds-metadata-normal {
42
+ --ronds-metadata-color-border-1: #d9d9d9;
43
+ --ronds-metadata-color-border-2: #165dff;
44
+ --ronds-metadata-color-bg-2: #ffffff;
45
+ --ronds-metadata-color-bg-3: #f6f5f6;
46
+ --ronds-metadata-color-bg-4: #ffffff;
47
+ --ronds-metadata-color-text-1: #1d2129;
48
+ --ronds-metadata-color-text-2: #24292f;
49
+ --ronds-metadata-color-text-3: #f2f3f5;
50
+
51
+ ::-webkit-scrollbar {
52
+ width: 6px;
53
+ height: 6px;
54
+ overflow: auto;
55
+ }
56
+
57
+ ::-webkit-scrollbar-thumb {
58
+ background-color: var(--scrollbar-color);
59
+ min-height: 25px;
60
+ min-width: 25px;
61
+ border-radius: 3px;
62
+
63
+ &:hover {
64
+ background-color: #a8a8a8;
65
+ }
66
+
67
+ &:active {
68
+ background-color: #787878;
69
+ }
70
+
71
+ /* border: 1px solid #e0e0e0; */
72
+ }
73
+
74
+ ::-webkit-scrollbar-track {
75
+ background-color: #f7f7f7;
76
+ }
77
+ }
package/package.json CHANGED
@@ -1,94 +1,94 @@
1
- {
2
- "public": true,
3
- "name": "ronds-metadata",
4
- "version": "1.2.2",
5
- "scripts": {
6
- "start": "dumi dev",
7
- "docs:build": "dumi build",
8
- "docs:deploy": "gh-pages -d docs-dist",
9
- "build": "father-build",
10
- "deploy": "npm run docs:build && npm run docs:deploy",
11
- "release": "npm run build && npm publish",
12
- "prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\"",
13
- "test": "umi-test",
14
- "test:coverage": "umi-test --coverage",
15
- "prepublishOnly": "npm run build"
16
- },
17
- "main": "es",
18
- "module": "es",
19
- "types": "es/index.d.ts",
20
- "gitHooks": {
21
- "pre-commit": "lint-staged"
22
- },
23
- "lint-staged": {
24
- "*.{js,jsx,less,md,json}": [
25
- "prettier --write"
26
- ],
27
- "*.ts?(x)": [
28
- "prettier --parser=typescript --write"
29
- ]
30
- },
31
- "files": [
32
- "/es"
33
- ],
34
- "dependencies": {
35
- "@antv/x6": "^1.32.2",
36
- "@antv/x6-react-shape": "^1.6.0",
37
- "@babel/helper-create-regexp-features-plugin": "^7.12.13",
38
- "@babel/runtime": "^7.11.2",
39
- "@popperjs/core": "^2.4.4",
40
- "@types/markdown-navbar": "^1.4.0",
41
- "ahooks": "^3.4.0",
42
- "axios": "^0.21.4",
43
- "babel-plugin-import": "^1.13.3",
44
- "babel-plugin-transform-remove-console": "^6.9.4",
45
- "bl": "^5.0.0",
46
- "codemirror": "^5.63.0",
47
- "codepage": "^1.15.0",
48
- "github-markdown-css": "^5.1.0",
49
- "immer": "^9.0.14",
50
- "lodash": "^4.17.21",
51
- "markdown-navbar": "^1.4.3",
52
- "qs": "^6.10.1",
53
- "react": "^17.0.2",
54
- "react-dnd": "^11.1.3",
55
- "react-dnd-html5-backend": "^11.1.3",
56
- "react-jexcel": "^1.0.2",
57
- "react-markdown": "^8.0.3",
58
- "react-markdown-editor-lite": "^1.3.2",
59
- "react-popper": "^2.2.3",
60
- "react-syntax-highlighter": "^15.5.0",
61
- "rehype-raw": "^6.1.1",
62
- "remark-gfm": "^3.0.1",
63
- "rxjs": "^7.5.4",
64
- "xlsx": "^0.18.5"
65
- },
66
- "peerDependencies": {
67
- "antd": ">=4.1.5",
68
- "react": ">=16.14.0",
69
- "react-dom": ">=16.14.0",
70
- "react-router": ">=5.0.0",
71
- "styled-components": ">=4.1.1"
72
- },
73
- "devDependencies": {
74
- "@types/react": "^17.0.2",
75
- "@types/react-dom": "^17.0.2",
76
- "@types/react-router": "^5.1.8",
77
- "@types/react-window": "^1.8.2",
78
- "@types/styled-components": "^5.1.2",
79
- "@umijs/test": "^3.0.5",
80
- "antd": "^4.18.1",
81
- "babel-loader": "^8.1.0",
82
- "copy-to-clipboard": "^3.3.1",
83
- "css-loader": "^4.2.2",
84
- "dumi": "^1.0.16",
85
- "father-build": "^1.17.2",
86
- "gh-pages": "^3.0.0",
87
- "less-loader": "^7.0.0",
88
- "lint-staged": "^10.0.7",
89
- "prettier": "^2.2.1",
90
- "style-loader": "^1.2.1",
91
- "webpack-cli": "^3.3.12",
92
- "yorkie": "^2.0.0"
93
- }
1
+ {
2
+ "public": true,
3
+ "name": "ronds-metadata",
4
+ "version": "1.2.3",
5
+ "scripts": {
6
+ "start": "dumi dev",
7
+ "docs:build": "dumi build",
8
+ "docs:deploy": "gh-pages -d docs-dist",
9
+ "build": "father-build",
10
+ "deploy": "npm run docs:build && npm run docs:deploy",
11
+ "release": "npm run build && npm publish",
12
+ "prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\"",
13
+ "test": "umi-test",
14
+ "test:coverage": "umi-test --coverage",
15
+ "prepublishOnly": "npm run build"
16
+ },
17
+ "main": "es",
18
+ "module": "es",
19
+ "types": "es/index.d.ts",
20
+ "gitHooks": {
21
+ "pre-commit": "lint-staged"
22
+ },
23
+ "lint-staged": {
24
+ "*.{js,jsx,less,md,json}": [
25
+ "prettier --write"
26
+ ],
27
+ "*.ts?(x)": [
28
+ "prettier --parser=typescript --write"
29
+ ]
30
+ },
31
+ "files": [
32
+ "/es"
33
+ ],
34
+ "dependencies": {
35
+ "@antv/x6": "^1.32.2",
36
+ "@antv/x6-react-shape": "^1.6.0",
37
+ "@babel/helper-create-regexp-features-plugin": "^7.12.13",
38
+ "@babel/runtime": "^7.11.2",
39
+ "@popperjs/core": "^2.4.4",
40
+ "@types/markdown-navbar": "^1.4.0",
41
+ "ahooks": "^3.4.0",
42
+ "axios": "^0.21.4",
43
+ "babel-plugin-import": "^1.13.3",
44
+ "babel-plugin-transform-remove-console": "^6.9.4",
45
+ "bl": "^5.0.0",
46
+ "codemirror": "^5.63.0",
47
+ "codepage": "^1.15.0",
48
+ "github-markdown-css": "^5.1.0",
49
+ "immer": "^9.0.14",
50
+ "lodash": "^4.17.21",
51
+ "markdown-navbar": "^1.4.3",
52
+ "qs": "^6.10.1",
53
+ "react": "^17.0.2",
54
+ "react-dnd": "^11.1.3",
55
+ "react-dnd-html5-backend": "^11.1.3",
56
+ "react-jexcel": "^1.0.2",
57
+ "react-markdown": "^8.0.3",
58
+ "react-markdown-editor-lite": "^1.3.2",
59
+ "react-popper": "^2.2.3",
60
+ "react-syntax-highlighter": "^15.5.0",
61
+ "rehype-raw": "^6.1.1",
62
+ "remark-gfm": "^3.0.1",
63
+ "rxjs": "^7.5.4",
64
+ "xlsx": "^0.18.5"
65
+ },
66
+ "peerDependencies": {
67
+ "antd": ">=4.1.5",
68
+ "react": ">=16.14.0",
69
+ "react-dom": ">=16.14.0",
70
+ "react-router": ">=5.0.0",
71
+ "styled-components": ">=4.1.1"
72
+ },
73
+ "devDependencies": {
74
+ "@types/react": "^17.0.2",
75
+ "@types/react-dom": "^17.0.2",
76
+ "@types/react-router": "^5.1.8",
77
+ "@types/react-window": "^1.8.2",
78
+ "@types/styled-components": "^5.1.2",
79
+ "@umijs/test": "^3.0.5",
80
+ "antd": "^4.18.1",
81
+ "babel-loader": "^8.1.0",
82
+ "copy-to-clipboard": "^3.3.1",
83
+ "css-loader": "^4.2.2",
84
+ "dumi": "^1.0.16",
85
+ "father-build": "^1.17.2",
86
+ "gh-pages": "^3.0.0",
87
+ "less-loader": "^7.0.0",
88
+ "lint-staged": "^10.0.7",
89
+ "prettier": "^2.2.1",
90
+ "style-loader": "^1.2.1",
91
+ "webpack-cli": "^3.3.12",
92
+ "yorkie": "^2.0.0"
93
+ }
94
94
  }