ronds-metadata 1.2.3 → 1.2.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -337,6 +337,10 @@ var Editable = function Editable(props) {
337
337
  }
338
338
  }, /*#__PURE__*/React.createElement(DndProvider, {
339
339
  backend: HTML5Backend
340
+ }, /*#__PURE__*/React.createElement("div", {
341
+ style: {
342
+ height: "".concat((type === 'multiple' || type === 'freedom') && !readonly && isAddRow && defaultValue ? 'calc(100% - 40px)' : '100%')
343
+ }
340
344
  }, /*#__PURE__*/React.createElement(_Table, _extends({
341
345
  key: _columns.length,
342
346
  className: "ronds-edit-table",
@@ -367,7 +371,7 @@ var Editable = function Editable(props) {
367
371
  onMove: onMove
368
372
  };
369
373
  }
370
- }))), (type === 'multiple' || type === 'freedom') && !readonly && isAddRow && defaultValue && /*#__PURE__*/React.createElement(_Button, {
374
+ })))), (type === 'multiple' || type === 'freedom') && !readonly && isAddRow && defaultValue && /*#__PURE__*/React.createElement(_Button, {
371
375
  block: true,
372
376
  type: "dashed",
373
377
  style: {
@@ -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 16:38:00
15
+ * @LastEditTime: 2023-02-23 15:42:40
16
16
  */
17
17
  import React from 'react';
18
18
  import { MinusCircleOutlined, PlusOutlined } from '@ant-design/icons';
@@ -136,7 +136,7 @@ function Index(props) {
136
136
  isRefForm: isRefForm,
137
137
  isShowTypeInfo: formContext.isShowTypeInfo,
138
138
  field: field
139
- }, colSpan), /*#__PURE__*/React.createElement(MinusCircleOutlined, {
139
+ }, 23), /*#__PURE__*/React.createElement(MinusCircleOutlined, {
140
140
  style: {
141
141
  marginLeft: '10px'
142
142
  },
@@ -17,7 +17,7 @@ import _Input from "antd/es/input";
17
17
  /*
18
18
  * @Author: wangxian
19
19
  * @Date: 2021-09-18 14:15:04
20
- * @LastEditTime: 2023-02-22 15:51:51
20
+ * @LastEditTime: 2023-02-23 16:30:57
21
21
  */
22
22
  import React from 'react';
23
23
  import { UploadOutlined } from '@ant-design/icons';
@@ -73,7 +73,7 @@ function Index(props) {
73
73
 
74
74
  case 'textarea':
75
75
  return /*#__PURE__*/React.createElement(TextArea, {
76
- rows: 4,
76
+ rows: (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.textareaRows) || 4,
77
77
  disabled: (_extraInfo$disabled2 = extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.disabled) !== null && _extraInfo$disabled2 !== void 0 ? _extraInfo$disabled2 : disabled,
78
78
  placeholder: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.placeholder
79
79
  });
@@ -134,6 +134,14 @@ function Index(props) {
134
134
  color: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.color
135
135
  } : {}
136
136
  }, (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id),
137
+ labelCol: labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? {
138
+ span: labelSpan,
139
+ offset: 0
140
+ } : undefined,
141
+ wrapperCol: labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? {
142
+ span: 24 - labelSpan,
143
+ offset: 0
144
+ } : undefined,
137
145
  name: (extraInfo === null || extraInfo === void 0 ? void 0 : (_extraInfo$addonAfter5 = extraInfo.addonAfter) === null || _extraInfo$addonAfter5 === void 0 ? void 0 : _extraInfo$addonAfter5.key) ? [field === null || field === void 0 ? void 0 : field.name].concat(_toConsumableArray(name), ['value']) : [field === null || field === void 0 ? void 0 : field.name].concat(_toConsumableArray(name)),
138
146
  rules: [{
139
147
  required: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
@@ -9,7 +9,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
9
9
  /*
10
10
  * @Author: wangxian
11
11
  * @Date: 2021-09-18 14:15:04
12
- * @LastEditTime: 2023-02-21 19:16:02
12
+ * @LastEditTime: 2023-02-23 16:31:33
13
13
  */
14
14
  import React from 'react';
15
15
  import { MetadataFormContext, MetadataRefContext } from '../interface';
@@ -22,6 +22,7 @@ function Index(props) {
22
22
  name = props.name,
23
23
  isRefForm = props.isRefForm,
24
24
  disabled = props.disabled,
25
+ labelSpan = props.labelSpan,
25
26
  field = props.field,
26
27
  isObj = props.isObj;
27
28
  var formContext = React.useContext(MetadataFormContext) || {};
@@ -62,6 +63,14 @@ function Index(props) {
62
63
  color: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.color
63
64
  } : {}
64
65
  }, (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id),
66
+ labelCol: labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? {
67
+ span: labelSpan,
68
+ offset: 0
69
+ } : undefined,
70
+ wrapperCol: labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? {
71
+ span: 24 - labelSpan,
72
+ offset: 0
73
+ } : undefined,
65
74
  rules: [{
66
75
  required: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
67
76
  }].concat(_toConsumableArray(rules)),
@@ -84,6 +93,14 @@ function Index(props) {
84
93
  color: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.color
85
94
  } : {}
86
95
  }, (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id),
96
+ labelCol: labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? {
97
+ span: labelSpan,
98
+ offset: 0
99
+ } : undefined,
100
+ wrapperCol: labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? {
101
+ span: 24 - labelSpan,
102
+ offset: 0
103
+ } : undefined,
87
104
  name: name,
88
105
  rules: [{
89
106
  required: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
@@ -99,7 +116,6 @@ function Index(props) {
99
116
  paddingRight: '10px'
100
117
  },
101
118
  name: [field === null || field === void 0 ? void 0 : field.name],
102
- fieldKey: [field === null || field === void 0 ? void 0 : field.fieldKey],
103
119
  rules: [{
104
120
  required: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
105
121
  }].concat(_toConsumableArray(rules)),
@@ -30,6 +30,7 @@ function Index(props) {
30
30
  disabled = props.disabled,
31
31
  isRefForm = props.isRefForm,
32
32
  fieldRule = props.fields,
33
+ labelSpan = props.labelSpan,
33
34
  initEnumValue = props.initEnumValue,
34
35
  field = props.field,
35
36
  name = props.name;
@@ -263,6 +264,14 @@ function Index(props) {
263
264
  return !field ? /*#__PURE__*/React.createElement(_Form.Item, {
264
265
  key: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.defaultValue,
265
266
  label: (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id,
267
+ labelCol: labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? {
268
+ span: labelSpan,
269
+ offset: 0
270
+ } : undefined,
271
+ wrapperCol: labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? {
272
+ span: 24 - labelSpan,
273
+ offset: 0
274
+ } : undefined,
266
275
  initialValue: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.defaultValue,
267
276
  style: {
268
277
  display: "".concat(extraInfo.hidden ? 'none' : 'block')
@@ -53,6 +53,7 @@ function Index(props) {
53
53
  initEnumValue = _props$initEnumValue === void 0 ? {} : _props$initEnumValue,
54
54
  disabled = props.disabled,
55
55
  field = props.field,
56
+ labelSpan = props.labelSpan,
56
57
  isObj = props.isObj,
57
58
  _props$enum = props.enum,
58
59
  myEnum = _props$enum === void 0 ? [] : _props$enum;
@@ -457,6 +458,14 @@ function Index(props) {
457
458
  color: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.color
458
459
  } : {}
459
460
  }, (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id),
461
+ labelCol: labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? {
462
+ span: labelSpan,
463
+ offset: 0
464
+ } : undefined,
465
+ wrapperCol: labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? {
466
+ span: 24 - labelSpan,
467
+ offset: 0
468
+ } : undefined,
460
469
  name: [field === null || field === void 0 ? void 0 : field.name].concat(_toConsumableArray(name)),
461
470
  rules: [{
462
471
  required: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
@@ -477,6 +486,14 @@ function Index(props) {
477
486
  color: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.color
478
487
  } : {}
479
488
  }, (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id),
489
+ labelCol: labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? {
490
+ span: labelSpan,
491
+ offset: 0
492
+ } : undefined,
493
+ wrapperCol: labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? {
494
+ span: 24 - labelSpan,
495
+ offset: 0
496
+ } : undefined,
480
497
  name: name,
481
498
  rules: [{
482
499
  required: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
@@ -21,6 +21,7 @@ function Index(props) {
21
21
  name = props.name,
22
22
  isRefForm = props.isRefForm,
23
23
  disabled = props.disabled,
24
+ labelSpan = props.labelSpan,
24
25
  field = props.field,
25
26
  isObj = props.isObj;
26
27
  var formContext = React.useContext(MetadataFormContext) || {};
@@ -40,6 +41,14 @@ function Index(props) {
40
41
  color: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.color
41
42
  } : {}
42
43
  }, (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id),
44
+ labelCol: labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? {
45
+ span: labelSpan,
46
+ offset: 0
47
+ } : undefined,
48
+ wrapperCol: labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? {
49
+ span: 24 - labelSpan,
50
+ offset: 0
51
+ } : undefined,
43
52
  name: [field === null || field === void 0 ? void 0 : field.name].concat(_toConsumableArray(name)),
44
53
  valuePropName: "checked",
45
54
  rules: [{
@@ -60,6 +69,14 @@ function Index(props) {
60
69
  color: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.color
61
70
  } : {}
62
71
  }, (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id),
72
+ labelCol: labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? {
73
+ span: labelSpan,
74
+ offset: 0
75
+ } : undefined,
76
+ wrapperCol: labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? {
77
+ span: 24 - labelSpan,
78
+ offset: 0
79
+ } : undefined,
63
80
  key: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.defaultValue,
64
81
  initialValue: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.defaultValue,
65
82
  style: {
@@ -1,3 +1,5 @@
1
+ import "antd/es/form/style";
2
+ import _Form from "antd/es/form";
1
3
  import _regeneratorRuntime from "@babel/runtime/regenerator";
2
4
  import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
3
5
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
@@ -321,8 +323,16 @@ var TableArray = function TableArray(props) {
321
323
  return /*#__PURE__*/React.createElement("div", {
322
324
  style: {
323
325
  width: '100%',
326
+ padding: '0 0 8px',
324
327
  height: addButtonHidden || readonly ? "".concat(rowNumber * getCellHeight(readonly) + 45, "px") : "".concat(rowNumber * getCellHeight(readonly) + 45 + 40, "px")
325
328
  }
329
+ }, /*#__PURE__*/React.createElement(_Form.Item, {
330
+ name: name,
331
+ noStyle: true,
332
+ style: {
333
+ margin: 0,
334
+ height: '100%'
335
+ }
326
336
  }, /*#__PURE__*/React.createElement(Editable, {
327
337
  type: "multiple",
328
338
  readonly: readonly,
@@ -343,7 +353,7 @@ var TableArray = function TableArray(props) {
343
353
  y: addButtonHidden || readonly ? "".concat(rowNumber * getCellHeight(readonly) + 45, "px ") : "".concat(rowNumber * getCellHeight(readonly), "px ")
344
354
  }
345
355
  }
346
- }));
356
+ })));
347
357
  };
348
358
 
349
359
  export default TableArray;
@@ -5,7 +5,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
5
5
  /*
6
6
  * @Author: your name
7
7
  * @Date: 2021-09-18 14:15:04
8
- * @LastEditTime: 2023-02-21 19:11:53
8
+ * @LastEditTime: 2023-02-23 14:53:08
9
9
  */
10
10
  import { getLocale } from '../../../framework/locale';
11
11
  import moment from 'moment';
@@ -98,8 +98,14 @@ export var useWatchDepend = function useWatchDepend(_depends, stream$) {
98
98
 
99
99
  var processDependHiddenOrShow = function processDependHiddenOrShow(depend, changeData, stream$) {
100
100
  try {
101
- var regex = /\w+(\.\w+)?[=<>!]{1}/g;
101
+ // const regex = /\w+(\.\w+)?[=<>!]{1}/g;
102
+ var regex = /\w+(\.\w+)?[=<>!]{1}|\w+(\.\w+)?(\.indexOf\('\w+'\)[=<>!]{1})/g;
102
103
  var keys = depend.trim().match(regex);
104
+
105
+ if (!keys) {
106
+ return false;
107
+ }
108
+
103
109
  var expression = depend;
104
110
 
105
111
  for (var i = 0; i < keys.length; i++) {
@@ -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.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
- }
1
+ {
2
+ "public": true,
3
+ "name": "ronds-metadata",
4
+ "version": "1.2.4",
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
  }