ronds-metadata 1.2.12 → 1.2.13

Sign up to get free protection for your applications and to get access to all the features.
@@ -9,6 +9,7 @@ var Index = function Index(props) {
9
9
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_DatePicker, {
10
10
  showTime: true,
11
11
  format: DEFAULT_DATE_FORMAT,
12
+ placeholder: setting === null || setting === void 0 ? void 0 : setting.placeholder,
12
13
  disabled: setting === null || setting === void 0 ? void 0 : setting.disabled
13
14
  }));
14
15
  };
@@ -3,6 +3,8 @@ import _Button from "antd/es/button";
3
3
  import "antd/es/form/style";
4
4
  import _Form from "antd/es/form";
5
5
  import _extends from "@babel/runtime/helpers/esm/extends";
6
+ import "antd/es/tooltip/style";
7
+ import _Tooltip from "antd/es/tooltip";
6
8
  import _objectDestructuringEmpty from "@babel/runtime/helpers/esm/objectDestructuringEmpty";
7
9
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
8
10
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
@@ -14,7 +16,7 @@ import { dragItemType, streamEventType } from '../../../../../settings';
14
16
  import useObservable from '../../../../../../../framework/rxjs-hooks/useObservable';
15
17
  export function withFieldCellWrapper(WrappedComponent) {
16
18
  return function (props) {
17
- var _cellSetting$depend, _cellSetting$depend2, _cellSetting$depend3, _cellSetting$depend4;
19
+ var _cellSetting$depend, _cellSetting$depend2, _cellSetting$depend3, _cellSetting$depend4, _cellSetting$depend5, _cellSetting$depend6;
18
20
 
19
21
  var data = props.data,
20
22
  refId = props.refId,
@@ -207,11 +209,21 @@ export function withFieldCellWrapper(WrappedComponent) {
207
209
  style: {
208
210
  color: 'var(--ronds-metadata-color-text-2)'
209
211
  }
210
- }, " [ hidden:", cellSetting === null || cellSetting === void 0 ? void 0 : (_cellSetting$depend2 = cellSetting.depend) === null || _cellSetting$depend2 === void 0 ? void 0 : _cellSetting$depend2.hidden, " ] "), (cellSetting === null || cellSetting === void 0 ? void 0 : (_cellSetting$depend3 = cellSetting.depend) === null || _cellSetting$depend3 === void 0 ? void 0 : _cellSetting$depend3.show) && /*#__PURE__*/React.createElement("span", {
212
+ }, /*#__PURE__*/React.createElement(_Tooltip, {
213
+ title: cellSetting === null || cellSetting === void 0 ? void 0 : (_cellSetting$depend2 = cellSetting.depend) === null || _cellSetting$depend2 === void 0 ? void 0 : _cellSetting$depend2.hidden
214
+ }, "[ depend.hidden ]")), (cellSetting === null || cellSetting === void 0 ? void 0 : (_cellSetting$depend3 = cellSetting.depend) === null || _cellSetting$depend3 === void 0 ? void 0 : _cellSetting$depend3.show) && /*#__PURE__*/React.createElement("span", {
211
215
  style: {
212
216
  color: 'var(--ronds-metadata-color-text-2)'
213
217
  }
214
- }, " [ show:", cellSetting === null || cellSetting === void 0 ? void 0 : (_cellSetting$depend4 = cellSetting.depend) === null || _cellSetting$depend4 === void 0 ? void 0 : _cellSetting$depend4.show, " ] ")), /*#__PURE__*/React.createElement(_Form.Item, {
218
+ }, /*#__PURE__*/React.createElement(_Tooltip, {
219
+ title: cellSetting === null || cellSetting === void 0 ? void 0 : (_cellSetting$depend4 = cellSetting.depend) === null || _cellSetting$depend4 === void 0 ? void 0 : _cellSetting$depend4.show
220
+ }, "[ depend.show ]"), ' '), (cellSetting === null || cellSetting === void 0 ? void 0 : (_cellSetting$depend5 = cellSetting.depend) === null || _cellSetting$depend5 === void 0 ? void 0 : _cellSetting$depend5.notRequire) && /*#__PURE__*/React.createElement("span", {
221
+ style: {
222
+ color: 'var(--ronds-metadata-color-text-2)'
223
+ }
224
+ }, /*#__PURE__*/React.createElement(_Tooltip, {
225
+ title: cellSetting === null || cellSetting === void 0 ? void 0 : (_cellSetting$depend6 = cellSetting.depend) === null || _cellSetting$depend6 === void 0 ? void 0 : _cellSetting$depend6.notRequire
226
+ }, "[ depend.notRequire ]"), ' ')), /*#__PURE__*/React.createElement(_Form.Item, {
215
227
  key: "".concat(cellSetting === null || cellSetting === void 0 ? void 0 : cellSetting.defaultValue),
216
228
  name: (cellSetting === null || cellSetting === void 0 ? void 0 : cellSetting.id) || data.id,
217
229
  label: /*#__PURE__*/React.createElement("span", {
@@ -1,23 +1,23 @@
1
- .canvas-wrapper {
2
- .drag-item {
3
- position: relative;
4
- border: 1px dashed var(--ronds-metadata-color-border-1);
5
- background: var(--ronds-metadata-color-bg-4);
6
- margin-bottom: 8px;
7
- }
8
-
9
- .drag-item-selected {
10
- border: 1px solid var(--ronds-metadata-color-border-2);
11
- }
12
-
13
- .ant-form-item {
14
- margin-bottom: '4px' !important;
15
- }
16
- .ant-form-item-label {
17
- padding: 0 0 2px !important;
18
- }
19
- .ant-input-number,
20
- .ant-picker {
21
- width: 100%;
22
- }
23
- }
1
+ .canvas-wrapper {
2
+ .drag-item {
3
+ position: relative;
4
+ border: 1px dashed var(--ronds-metadata-color-border-1);
5
+ background: var(--ronds-metadata-color-bg-4);
6
+ margin-bottom: 8px;
7
+ }
8
+
9
+ .drag-item-selected {
10
+ border: 1px solid var(--ronds-metadata-color-border-2);
11
+ }
12
+
13
+ .ant-form-item {
14
+ margin-bottom: '4px' !important;
15
+ }
16
+ .ant-form-item-label {
17
+ padding: 0 0 2px !important;
18
+ }
19
+ .ant-input-number,
20
+ .ant-picker {
21
+ width: 100%;
22
+ }
23
+ }
@@ -3,67 +3,67 @@ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
3
3
  /*
4
4
  * @Author: wangxian
5
5
  * @Date: 2023-02-06 08:24:17
6
- * @LastEditTime: 2023-02-27 10:08:44
6
+ * @LastEditTime: 2023-02-28 11:34:40
7
7
  */
8
8
  import { RefRule, Rule } from './ruleConfig';
9
9
  export var inputSchema = [{
10
10
  id: 'inputSchema',
11
11
  type: 'object',
12
- properties: [Rule.common.id, Rule.common.label, Rule.common.color, Rule.common.colSpan, Rule.common.defaultValue, Rule.common.help, Rule.common.tooltip, Rule.common.placeholder, Rule.common.require, Rule.common.disabled, Rule.common.hidden, RefRule.common.depend.props, RefRule.common.rules.props],
12
+ properties: [Rule.common.id, Rule.common.label, Rule.common.color, Rule.common.colSpan, Rule.common.defaultValue, Rule.common.help, Rule.common.tooltip, Rule.common.placeholder, Rule.common.require, Rule.common.disabled, Rule.common.br, Rule.common.hidden, RefRule.common.depend.props, RefRule.common.rules.props],
13
13
  types: [].concat(_toConsumableArray(RefRule.common.depend.types), _toConsumableArray(RefRule.common.rules.types))
14
14
  }];
15
15
  export var textareaSchema = [{
16
16
  id: 'textareaSchema',
17
17
  type: 'object',
18
- properties: [Rule.common.id, Rule.common.label, Rule.common.color, Rule.common.colSpan, Rule.common.defaultValue, Rule.common.help, Rule.common.tooltip, Rule.common.placeholder, Rule.common.require, Rule.common.disabled, Rule.common.hidden, RefRule.common.depend.props, RefRule.common.rules.props],
18
+ properties: [Rule.common.id, Rule.common.label, Rule.common.color, Rule.common.colSpan, Rule.common.defaultValue, Rule.common.help, Rule.common.tooltip, Rule.common.placeholder, Rule.common.require, Rule.common.disabled, Rule.common.br, Rule.common.hidden, RefRule.common.depend.props, RefRule.common.rules.props],
19
19
  types: [].concat(_toConsumableArray(RefRule.common.depend.types), _toConsumableArray(RefRule.common.rules.types))
20
20
  }];
21
21
  export var dateSchema = [{
22
22
  id: 'dateSchema',
23
23
  type: 'object',
24
- properties: [Rule.common.id, Rule.common.label, Rule.common.color, Rule.common.colSpan, Rule.common.defaultValue, Rule.common.help, Rule.common.tooltip, Rule.common.placeholder, Rule.common.require, Rule.common.disabled, Rule.common.hidden, RefRule.common.depend.props, RefRule.common.rules.props, RefRule.text.props],
24
+ properties: [Rule.common.id, Rule.common.label, Rule.common.color, Rule.common.colSpan, Rule.common.defaultValue, Rule.common.help, Rule.common.tooltip, Rule.common.placeholder, Rule.common.require, Rule.common.disabled, Rule.common.br, Rule.common.hidden, RefRule.common.depend.props, RefRule.common.rules.props, RefRule.text.props],
25
25
  types: [].concat(_toConsumableArray(RefRule.common.depend.types), _toConsumableArray(RefRule.text.types), _toConsumableArray(RefRule.common.rules.types))
26
26
  }];
27
27
  export var numberSchema = [{
28
28
  id: 'numberSchema',
29
29
  type: 'object',
30
- properties: [Rule.common.id, Rule.common.label, Rule.common.color, Rule.common.colSpan, Rule.common.defaultValue, Rule.common.help, Rule.common.tooltip, Rule.common.placeholder, Rule.common.require, Rule.common.disabled, Rule.common.hidden, RefRule.common.depend.props, RefRule.common.rules.props],
30
+ properties: [Rule.common.id, Rule.common.label, Rule.common.color, Rule.common.colSpan, Rule.common.defaultValue, Rule.common.help, Rule.common.tooltip, Rule.common.placeholder, Rule.common.require, Rule.common.disabled, Rule.common.br, Rule.common.hidden, RefRule.common.depend.props, RefRule.common.rules.props],
31
31
  types: [].concat(_toConsumableArray(RefRule.common.depend.types), _toConsumableArray(RefRule.common.rules.types))
32
32
  }];
33
33
  export var switchSchema = [{
34
34
  id: 'switchSchema',
35
35
  type: 'object',
36
- properties: [Rule.common.id, Rule.common.label, Rule.common.color, Rule.common.colSpan, Rule.common.defaultValue, Rule.common.help, Rule.common.tooltip, Rule.common.require, Rule.common.disabled, Rule.common.hidden, RefRule.common.depend.props],
36
+ properties: [Rule.common.id, Rule.common.label, Rule.common.color, Rule.common.colSpan, Rule.common.defaultValue, Rule.common.help, Rule.common.tooltip, Rule.common.require, Rule.common.disabled, Rule.common.br, Rule.common.hidden, RefRule.common.depend.props],
37
37
  types: _toConsumableArray(RefRule.common.depend.types)
38
38
  }];
39
39
  export var selectSchema = [{
40
40
  id: 'selectSchema',
41
41
  type: 'object',
42
- properties: [Rule.common.id, Rule.common.label, RefRule.enum.props, Rule.common.color, Rule.common.colSpan, Rule.common.defaultValue, Rule.common.help, Rule.common.tooltip, Rule.common.require, Rule.common.disabled, Rule.common.hidden, RefRule.common.depend.props],
42
+ properties: [Rule.common.id, Rule.common.label, RefRule.enum.props, Rule.common.color, Rule.common.colSpan, Rule.common.defaultValue, Rule.common.help, Rule.common.tooltip, Rule.common.require, Rule.common.disabled, Rule.common.br, Rule.common.hidden, RefRule.common.depend.props],
43
43
  types: [].concat(_toConsumableArray(RefRule.common.depend.types), _toConsumableArray(RefRule.enum.types))
44
44
  }];
45
45
  export var colorSchema = [{
46
46
  id: 'colorSchema',
47
47
  type: 'object',
48
- properties: [Rule.common.id, Rule.common.label, Rule.common.color, Rule.common.colSpan, Rule.common.defaultValue, Rule.common.help, Rule.common.tooltip, Rule.common.require, Rule.common.disabled, Rule.common.hidden, RefRule.common.depend.props],
48
+ properties: [Rule.common.id, Rule.common.label, Rule.common.color, Rule.common.colSpan, Rule.common.defaultValue, Rule.common.help, Rule.common.tooltip, Rule.common.require, Rule.common.disabled, Rule.common.br, Rule.common.hidden, RefRule.common.depend.props],
49
49
  types: _toConsumableArray(RefRule.common.depend.types)
50
50
  }];
51
51
  export var passwordSchema = [{
52
52
  id: 'passwordSchema',
53
53
  type: 'object',
54
- properties: [Rule.common.id, Rule.common.label, Rule.common.color, Rule.common.colSpan, Rule.common.defaultValue, Rule.common.help, Rule.common.tooltip, Rule.common.placeholder, Rule.common.require, Rule.common.disabled, Rule.common.hidden, RefRule.common.depend.props, RefRule.common.rules.props],
54
+ properties: [Rule.common.id, Rule.common.label, Rule.common.color, Rule.common.colSpan, Rule.common.defaultValue, Rule.common.help, Rule.common.tooltip, Rule.common.placeholder, Rule.common.require, Rule.common.disabled, Rule.common.br, Rule.common.hidden, RefRule.common.depend.props, RefRule.common.rules.props],
55
55
  types: [].concat(_toConsumableArray(RefRule.common.depend.types), _toConsumableArray(RefRule.common.rules.types))
56
56
  }];
57
57
  export var uploadSchema = [{
58
58
  id: 'uploadSchema',
59
59
  type: 'object',
60
- properties: [Rule.common.id, Rule.common.label, Rule.common.color, Rule.common.colSpan, Rule.common.help, Rule.common.tooltip, Rule.common.require, Rule.common.disabled, RefRule.common.depend.props],
60
+ properties: [Rule.common.id, Rule.common.label, Rule.common.color, Rule.common.colSpan, Rule.common.help, Rule.common.tooltip, Rule.common.require, Rule.common.disabled, Rule.common.br, RefRule.common.depend.props],
61
61
  types: _toConsumableArray(RefRule.common.depend.types)
62
62
  }];
63
63
  export var checkboxSchema = [{
64
64
  id: 'checkboxSchema',
65
65
  type: 'object',
66
- properties: [Rule.common.id, Rule.common.label, RefRule.enum.props, Rule.common.color, Rule.common.colSpan, Rule.common.defaultValue, Rule.common.help, Rule.common.tooltip, Rule.common.require, Rule.common.disabled, Rule.common.hidden, RefRule.common.depend.props],
66
+ properties: [Rule.common.id, Rule.common.label, RefRule.enum.props, Rule.common.color, Rule.common.colSpan, Rule.common.defaultValue, Rule.common.help, Rule.common.tooltip, Rule.common.require, Rule.common.disabled, Rule.common.br, Rule.common.hidden, RefRule.common.depend.props],
67
67
  types: [].concat(_toConsumableArray(RefRule.common.depend.types), _toConsumableArray(RefRule.enum.types))
68
68
  }];
69
69
  export var settingSchema = {
@@ -105,6 +105,19 @@ export declare const Rule: {
105
105
  };
106
106
  }[];
107
107
  };
108
+ br: {
109
+ id: string;
110
+ type: string;
111
+ fields: {
112
+ id: string;
113
+ type: string;
114
+ refId: string;
115
+ value: {
116
+ label: string;
117
+ help: string;
118
+ };
119
+ }[];
120
+ };
108
121
  require: {
109
122
  id: string;
110
123
  type: string;
@@ -179,6 +192,23 @@ export declare const Rule: {
179
192
  };
180
193
  }[];
181
194
  };
195
+ notRequire: {
196
+ id: string;
197
+ type: string;
198
+ fields: {
199
+ id: string;
200
+ type: string;
201
+ refId: string;
202
+ value: {
203
+ text: {};
204
+ common: {
205
+ label: string;
206
+ depend: {};
207
+ };
208
+ 'common-en-US': {};
209
+ };
210
+ }[];
211
+ };
182
212
  };
183
213
  text: {
184
214
  type: {
@@ -3,7 +3,7 @@ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
3
3
  /*
4
4
  * @Author: wangxian
5
5
  * @Date: 2023-02-08 10:36:25
6
- * @LastEditTime: 2023-02-16 14:43:53
6
+ * @LastEditTime: 2023-02-28 13:48:31
7
7
  */
8
8
  import { DEFAULT_DATE_FORMAT } from '../../../comps/MetadataForm/DataCell/Input';
9
9
  export var Rule = {
@@ -113,6 +113,19 @@ export var Rule = {
113
113
  }
114
114
  }]
115
115
  },
116
+ br: {
117
+ id: 'br',
118
+ type: 'bool',
119
+ fields: [{
120
+ id: 'com.ronds.schema.default.Rule.Form',
121
+ type: 'ref',
122
+ refId: 'com.ronds.schema.default.Rule.Form',
123
+ value: {
124
+ label: '是否换行',
125
+ help: '后面字段另起一行'
126
+ }
127
+ }]
128
+ },
116
129
  require: {
117
130
  id: 'require',
118
131
  type: 'bool',
@@ -186,6 +199,23 @@ export var Rule = {
186
199
  'common-en-US': {}
187
200
  }
188
201
  }]
202
+ },
203
+ notRequire: {
204
+ id: 'notRequire',
205
+ type: 'text',
206
+ fields: [{
207
+ id: 'Rule.Form',
208
+ type: 'ref',
209
+ refId: 'com.ronds.schema.default.Rule.Form',
210
+ value: {
211
+ text: {},
212
+ common: {
213
+ label: '非必填',
214
+ depend: {}
215
+ },
216
+ 'common-en-US': {}
217
+ }
218
+ }]
189
219
  }
190
220
  },
191
221
  text: {
@@ -474,7 +504,7 @@ export var RefRule = {
474
504
  types: [{
475
505
  id: 'dependRule',
476
506
  type: 'object',
477
- properties: [Rule.depend.show, Rule.depend.hidden]
507
+ properties: [Rule.depend.show, Rule.depend.hidden, Rule.depend.notRequire]
478
508
  }]
479
509
  },
480
510
  rules: {
@@ -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
+ }