ronds-metadata 1.1.94 → 1.1.95
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.
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Checkbox.d.ts +2 -0
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Checkbox.js +17 -0
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Color.d.ts +2 -0
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Color.js +17 -0
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Obj.js +23 -2
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Password.d.ts +2 -0
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Password.js +17 -0
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Radio.d.ts +2 -0
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Radio.js +17 -0
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Upload.d.ts +2 -0
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Upload.js +17 -0
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/HOC/index.js +4 -2
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/index.js +11 -1
- package/es/comps/FormGenerator/comps/Canvas/core/index.d.ts +3 -2
- package/es/comps/FormGenerator/comps/Canvas/core/index.js +36 -16
- package/es/comps/FormGenerator/comps/Canvas/index.js +71 -4
- package/es/comps/FormGenerator/comps/Settings/index.js +31 -11
- package/es/comps/FormGenerator/settings/index.d.ts +170 -2
- package/es/comps/FormGenerator/settings/index.js +46 -4
- package/es/comps/FormGenerator/settings/ruleConfig.js +1 -3
- package/es/comps/FormGenerator/transformer.d.ts +5 -11
- package/es/comps/FormGenerator/transformer.js +62 -16
- package/es/comps/MetadataForm/DataCell/Select.js +1 -1
- package/es/comps/MetadataForm/DataCell/layout/TableArray.js +8 -0
- package/es/comps/MetadataForm/utils.js +3 -3
- package/package.json +1 -1
@@ -0,0 +1,17 @@
|
|
1
|
+
import "antd/es/input/style";
|
2
|
+
import _Input from "antd/es/input";
|
3
|
+
import React from "react";
|
4
|
+
import { withFieldCellWrapper } from '../HOC';
|
5
|
+
|
6
|
+
var Index = function Index(props) {
|
7
|
+
var data = props.data,
|
8
|
+
fgStream = props.fgStream,
|
9
|
+
setting = props.setting;
|
10
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Input, {
|
11
|
+
disabled: setting === null || setting === void 0 ? void 0 : setting.disabled,
|
12
|
+
placeholder: setting === null || setting === void 0 ? void 0 : setting.placeholder,
|
13
|
+
allowClear: true
|
14
|
+
}));
|
15
|
+
};
|
16
|
+
|
17
|
+
export default withFieldCellWrapper(Index);
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import "antd/es/input/style";
|
2
|
+
import _Input from "antd/es/input";
|
3
|
+
import React from "react";
|
4
|
+
import { withFieldCellWrapper } from '../HOC';
|
5
|
+
|
6
|
+
var Index = function Index(props) {
|
7
|
+
var data = props.data,
|
8
|
+
fgStream = props.fgStream,
|
9
|
+
setting = props.setting;
|
10
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Input, {
|
11
|
+
disabled: setting === null || setting === void 0 ? void 0 : setting.disabled,
|
12
|
+
placeholder: setting === null || setting === void 0 ? void 0 : setting.placeholder,
|
13
|
+
allowClear: true
|
14
|
+
}));
|
15
|
+
};
|
16
|
+
|
17
|
+
export default withFieldCellWrapper(Index);
|
@@ -1,22 +1,43 @@
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
2
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
3
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
4
|
+
|
1
5
|
/*
|
2
6
|
* @Author: uloveits 719310130@qq.com
|
3
7
|
* @Date: 2023-02-06 15:05:42
|
4
8
|
* @LastEditors: uloveits 719310130@qq.com
|
5
|
-
* @LastEditTime: 2023-02-
|
9
|
+
* @LastEditTime: 2023-02-17 14:54:47
|
6
10
|
*/
|
11
|
+
import React from 'react';
|
7
12
|
import CanvasCore from '../../index';
|
8
13
|
import { withFieldCellWrapper } from '../HOC';
|
9
|
-
import
|
14
|
+
import { streamEventType } from '../../../../../settings/index';
|
10
15
|
|
11
16
|
var Index = function Index(props) {
|
12
17
|
var data = props.data,
|
13
18
|
fgStream = props.fgStream,
|
14
19
|
setting = props.setting;
|
20
|
+
|
21
|
+
var _React$useState = React.useState([]),
|
22
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
23
|
+
nodes = _React$useState2[0],
|
24
|
+
setNodes = _React$useState2[1];
|
25
|
+
|
15
26
|
var nodesRef = React.useRef([]);
|
27
|
+
React.useEffect(function () {}, [setting]);
|
16
28
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CanvasCore, {
|
29
|
+
key: data.id,
|
17
30
|
refId: data.id,
|
18
31
|
onChange: function onChange(nodes) {
|
32
|
+
setNodes(_toConsumableArray(nodes));
|
19
33
|
nodesRef.current = nodes;
|
34
|
+
fgStream && fgStream.next({
|
35
|
+
type: streamEventType.onTypesChange,
|
36
|
+
payload: _defineProperty({}, data.id, {
|
37
|
+
id: (setting === null || setting === void 0 ? void 0 : setting.id) || data.id,
|
38
|
+
nodes: nodes
|
39
|
+
})
|
40
|
+
});
|
20
41
|
}
|
21
42
|
}));
|
22
43
|
};
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import "antd/es/input/style";
|
2
|
+
import _Input from "antd/es/input";
|
3
|
+
import React from "react";
|
4
|
+
import { withFieldCellWrapper } from '../HOC';
|
5
|
+
|
6
|
+
var Index = function Index(props) {
|
7
|
+
var data = props.data,
|
8
|
+
fgStream = props.fgStream,
|
9
|
+
setting = props.setting;
|
10
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Input, {
|
11
|
+
disabled: setting === null || setting === void 0 ? void 0 : setting.disabled,
|
12
|
+
placeholder: setting === null || setting === void 0 ? void 0 : setting.placeholder,
|
13
|
+
allowClear: true
|
14
|
+
}));
|
15
|
+
};
|
16
|
+
|
17
|
+
export default withFieldCellWrapper(Index);
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import "antd/es/input/style";
|
2
|
+
import _Input from "antd/es/input";
|
3
|
+
import React from "react";
|
4
|
+
import { withFieldCellWrapper } from '../HOC';
|
5
|
+
|
6
|
+
var Index = function Index(props) {
|
7
|
+
var data = props.data,
|
8
|
+
fgStream = props.fgStream,
|
9
|
+
setting = props.setting;
|
10
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Input, {
|
11
|
+
disabled: setting === null || setting === void 0 ? void 0 : setting.disabled,
|
12
|
+
placeholder: setting === null || setting === void 0 ? void 0 : setting.placeholder,
|
13
|
+
allowClear: true
|
14
|
+
}));
|
15
|
+
};
|
16
|
+
|
17
|
+
export default withFieldCellWrapper(Index);
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import "antd/es/input/style";
|
2
|
+
import _Input from "antd/es/input";
|
3
|
+
import React from "react";
|
4
|
+
import { withFieldCellWrapper } from '../HOC';
|
5
|
+
|
6
|
+
var Index = function Index(props) {
|
7
|
+
var data = props.data,
|
8
|
+
fgStream = props.fgStream,
|
9
|
+
setting = props.setting;
|
10
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Input, {
|
11
|
+
disabled: setting === null || setting === void 0 ? void 0 : setting.disabled,
|
12
|
+
placeholder: setting === null || setting === void 0 ? void 0 : setting.placeholder,
|
13
|
+
allowClear: true
|
14
|
+
}));
|
15
|
+
};
|
16
|
+
|
17
|
+
export default withFieldCellWrapper(Index);
|
@@ -33,8 +33,10 @@ export function withFieldCellWrapper(WrappedComponent) {
|
|
33
33
|
var processFgStreamData = React.useCallback(function (p) {
|
34
34
|
switch (p === null || p === void 0 ? void 0 : p.type) {
|
35
35
|
case streamEventType.onSettingValueChange:
|
36
|
-
if (p === null || p === void 0 ? void 0 : p.payload
|
37
|
-
|
36
|
+
if ((p === null || p === void 0 ? void 0 : p.payload.refId) === refId) {
|
37
|
+
if (p === null || p === void 0 ? void 0 : p.payload[data.id]) {
|
38
|
+
setCellSetting(_objectSpread({}, p === null || p === void 0 ? void 0 : p.payload[data.id]));
|
39
|
+
}
|
38
40
|
}
|
39
41
|
|
40
42
|
break;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/*
|
2
2
|
* @Author: wangxian
|
3
3
|
* @Date: 2023-02-06 11:35:45
|
4
|
-
* @LastEditTime: 2023-02-
|
4
|
+
* @LastEditTime: 2023-02-16 14:54:43
|
5
5
|
*/
|
6
6
|
import React from 'react';
|
7
7
|
import Input from './Cell/Input';
|
@@ -11,6 +11,11 @@ import Number from './Cell/Number';
|
|
11
11
|
import Switch from './Cell/Switch';
|
12
12
|
import Select from './Cell/Select';
|
13
13
|
import MutiSelect from './Cell/MutiSelect';
|
14
|
+
import Color from './Cell/Color';
|
15
|
+
import Checkbox from './Cell/Checkbox';
|
16
|
+
import Radio from './Cell/Radio';
|
17
|
+
import Password from './Cell/Password';
|
18
|
+
import Upload from './Cell/Upload';
|
14
19
|
import Obj from './Cell/Obj';
|
15
20
|
import List from './Cell/List';
|
16
21
|
|
@@ -45,6 +50,11 @@ var DataCellMap = {
|
|
45
50
|
switch: Switch,
|
46
51
|
select: Select,
|
47
52
|
mutiSelect: MutiSelect,
|
53
|
+
color: Color,
|
54
|
+
checkbox: Checkbox,
|
55
|
+
radio: Radio,
|
56
|
+
password: Password,
|
57
|
+
upload: Upload,
|
48
58
|
obj: Obj,
|
49
59
|
list: List
|
50
60
|
};
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import React from 'react';
|
1
2
|
import { FG } from '../../../../../comps/FormGenerator/index.d';
|
2
3
|
import './index.less';
|
3
4
|
interface ICanvasCoreProps {
|
@@ -12,5 +13,5 @@ interface ICanvasCoreProps {
|
|
12
13
|
*/
|
13
14
|
onChange?: (nodes: FG.Node[]) => void;
|
14
15
|
}
|
15
|
-
declare const
|
16
|
-
export default
|
16
|
+
declare const _default: React.MemoExoticComponent<(props: ICanvasCoreProps) => JSX.Element>;
|
17
|
+
export default _default;
|
@@ -45,9 +45,6 @@ var CanvasCore = function CanvasCore(props) {
|
|
45
45
|
allSetting = _React$useState8[0],
|
46
46
|
setAllSetting = _React$useState8[1];
|
47
47
|
|
48
|
-
React.useEffect(function () {
|
49
|
-
onChange && onChange(list);
|
50
|
-
}, [list]);
|
51
48
|
var addNewNode = React.useCallback(function (_node, dropId, position) {
|
52
49
|
var _newNode;
|
53
50
|
|
@@ -86,27 +83,35 @@ var CanvasCore = function CanvasCore(props) {
|
|
86
83
|
}
|
87
84
|
|
88
85
|
if ((_newNode = newNode) === null || _newNode === void 0 ? void 0 : _newNode.id) {
|
89
|
-
setCurNodeId(newNode.id);
|
90
86
|
fGCtx.fgStream && fGCtx.fgStream.next({
|
91
87
|
type: streamEventType.onNodeSelect,
|
92
|
-
payload:
|
88
|
+
payload: {
|
89
|
+
node: newNode,
|
90
|
+
refId: refId
|
91
|
+
}
|
93
92
|
});
|
94
93
|
}
|
95
94
|
|
96
95
|
setList(_toConsumableArray(_list));
|
97
96
|
listRef.current = _list;
|
97
|
+
onChange && onChange(_list);
|
98
98
|
}, []);
|
99
99
|
var processFgStreamData = React.useCallback(function (p) {
|
100
|
-
var _p$payload, _p$payload2, _p$
|
100
|
+
var _p$payload, _p$payload$node, _p$payload2, _p$payload3;
|
101
101
|
|
102
102
|
switch (p === null || p === void 0 ? void 0 : p.type) {
|
103
|
+
case streamEventType.onNodeSelect:
|
104
|
+
setCurNodeId(p === null || p === void 0 ? void 0 : (_p$payload = p.payload) === null || _p$payload === void 0 ? void 0 : (_p$payload$node = _p$payload.node) === null || _p$payload$node === void 0 ? void 0 : _p$payload$node.id);
|
105
|
+
break;
|
106
|
+
|
103
107
|
case streamEventType.onClearCanvas:
|
104
108
|
setList([]);
|
105
109
|
listRef.current = [];
|
110
|
+
onChange && onChange([]);
|
106
111
|
break;
|
107
112
|
|
108
113
|
case streamEventType.onDropOver:
|
109
|
-
if (refId === ((_p$
|
114
|
+
if (refId === ((_p$payload2 = p.payload) === null || _p$payload2 === void 0 ? void 0 : _p$payload2.refId)) {
|
110
115
|
addNewNode(p.payload.dragItem, p.payload.dropId, p.payload.position);
|
111
116
|
}
|
112
117
|
|
@@ -122,7 +127,8 @@ var CanvasCore = function CanvasCore(props) {
|
|
122
127
|
return it.id !== p.payload.id;
|
123
128
|
});
|
124
129
|
setList(_toConsumableArray(_list));
|
125
|
-
listRef.current = _list;
|
130
|
+
listRef.current = _list;
|
131
|
+
onChange && onChange(_list); // 默认焦点放在第一个
|
126
132
|
|
127
133
|
if (_list.length > 0) {
|
128
134
|
onSelect(_list[0]);
|
@@ -135,13 +141,24 @@ var CanvasCore = function CanvasCore(props) {
|
|
135
141
|
break;
|
136
142
|
|
137
143
|
case streamEventType.onSettingValueChange:
|
138
|
-
if (p === null || p === void 0 ? void 0 : (_p$
|
139
|
-
var _p$
|
144
|
+
if (p === null || p === void 0 ? void 0 : (_p$payload3 = p.payload) === null || _p$payload3 === void 0 ? void 0 : _p$payload3.formSetting) {
|
145
|
+
var _p$payload4;
|
146
|
+
|
147
|
+
setFormSetting(_objectSpread({}, p === null || p === void 0 ? void 0 : (_p$payload4 = p.payload) === null || _p$payload4 === void 0 ? void 0 : _p$payload4.formSetting));
|
148
|
+
}
|
149
|
+
|
150
|
+
if ((p === null || p === void 0 ? void 0 : p.payload.refId) === refId) {
|
151
|
+
if (refId) {
|
152
|
+
var _p$payload5;
|
140
153
|
|
141
|
-
|
154
|
+
setAllSetting(_objectSpread({}, p === null || p === void 0 ? void 0 : (_p$payload5 = p.payload) === null || _p$payload5 === void 0 ? void 0 : _p$payload5.allSetting[refId]));
|
155
|
+
} else {
|
156
|
+
var _p$payload6;
|
157
|
+
|
158
|
+
setAllSetting(_objectSpread({}, p === null || p === void 0 ? void 0 : (_p$payload6 = p.payload) === null || _p$payload6 === void 0 ? void 0 : _p$payload6.allSetting));
|
159
|
+
}
|
142
160
|
}
|
143
161
|
|
144
|
-
setAllSetting(_objectSpread({}, p === null || p === void 0 ? void 0 : (_p$payload4 = p.payload) === null || _p$payload4 === void 0 ? void 0 : _p$payload4.allSetting));
|
145
162
|
break;
|
146
163
|
}
|
147
164
|
}, []);
|
@@ -185,10 +202,12 @@ var CanvasCore = function CanvasCore(props) {
|
|
185
202
|
dropRef = _useDrop2[1];
|
186
203
|
|
187
204
|
var onSelect = function onSelect(it) {
|
188
|
-
setCurNodeId(it.id);
|
189
205
|
fGCtx.fgStream && fGCtx.fgStream.next({
|
190
206
|
type: streamEventType.onNodeSelect,
|
191
|
-
payload:
|
207
|
+
payload: {
|
208
|
+
node: it,
|
209
|
+
refId: refId
|
210
|
+
}
|
192
211
|
});
|
193
212
|
};
|
194
213
|
|
@@ -241,7 +260,8 @@ var CanvasCore = function CanvasCore(props) {
|
|
241
260
|
}, /*#__PURE__*/React.createElement("div", {
|
242
261
|
key: it.id,
|
243
262
|
className: "drag-item ".concat(curNodeId === it.id ? 'drag-item-selected' : ''),
|
244
|
-
onClick: function onClick() {
|
263
|
+
onClick: function onClick(e) {
|
264
|
+
e.stopPropagation();
|
245
265
|
onSelect(it);
|
246
266
|
}
|
247
267
|
}, /*#__PURE__*/React.createElement(RenderField, {
|
@@ -260,4 +280,4 @@ var CanvasCore = function CanvasCore(props) {
|
|
260
280
|
}, "\u62D6\u62FD\u5DE6\u4FA7\u680F\u7684\u7EC4\u4EF6\u8FDB\u884C\u6DFB\u52A0")))));
|
261
281
|
};
|
262
282
|
|
263
|
-
export default CanvasCore;
|
283
|
+
export default /*#__PURE__*/React.memo(CanvasCore);
|
@@ -3,12 +3,13 @@ import _message from "antd/es/message";
|
|
3
3
|
import "antd/es/button/style";
|
4
4
|
import _Button from "antd/es/button";
|
5
5
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
6
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
6
7
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
7
8
|
import React from 'react';
|
8
9
|
import copy from 'copy-to-clipboard';
|
9
10
|
import { FGCtx } from '../../Provider';
|
10
11
|
import { streamEventType } from '../../settings';
|
11
|
-
import { transFG2Schema } from '../../transformer';
|
12
|
+
import { transFG2Schema, transSchema2FG } from '../../transformer';
|
12
13
|
import CanvasCore from './core';
|
13
14
|
import MetadataForm from '../../../../comps/MetadataForm';
|
14
15
|
import useObservable from '../../../../framework/rxjs-hooks/useObservable';
|
@@ -16,6 +17,7 @@ import useObservable from '../../../../framework/rxjs-hooks/useObservable';
|
|
16
17
|
var Canvas = function Canvas() {
|
17
18
|
var nodesRef = React.useRef([]);
|
18
19
|
var settingRef = React.useRef({});
|
20
|
+
var typesRef = React.useRef({});
|
19
21
|
|
20
22
|
var _React$useState = React.useState([]),
|
21
23
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
@@ -30,6 +32,13 @@ var Canvas = function Canvas() {
|
|
30
32
|
settingRef.current = p.payload.allSetting;
|
31
33
|
}
|
32
34
|
|
35
|
+
break;
|
36
|
+
|
37
|
+
case streamEventType.onTypesChange:
|
38
|
+
if (p === null || p === void 0 ? void 0 : p.payload) {
|
39
|
+
typesRef.current = _objectSpread(_objectSpread({}, typesRef.current), p === null || p === void 0 ? void 0 : p.payload);
|
40
|
+
}
|
41
|
+
|
33
42
|
break;
|
34
43
|
}
|
35
44
|
}, []);
|
@@ -45,14 +54,67 @@ var Canvas = function Canvas() {
|
|
45
54
|
|
46
55
|
var onPreview = function onPreview() {
|
47
56
|
if (schema.length === 0) {
|
48
|
-
var _schema = transFG2Schema(nodesRef.current, settingRef.current);
|
57
|
+
var _schema = transFG2Schema(nodesRef.current, settingRef.current, typesRef.current);
|
49
58
|
|
50
|
-
setSchema(_toConsumableArray(_schema));
|
59
|
+
setSchema(_toConsumableArray(_schema || []));
|
51
60
|
} else {
|
52
61
|
setSchema([]);
|
53
62
|
}
|
54
63
|
};
|
55
64
|
|
65
|
+
var onImport = function onImport() {
|
66
|
+
var _schema = [{
|
67
|
+
id: 'FormGenerator',
|
68
|
+
type: 'object',
|
69
|
+
properties: [{
|
70
|
+
id: 'obj-e5f4',
|
71
|
+
type: 'ref',
|
72
|
+
fields: [{
|
73
|
+
id: 'com.ronds.schema.default.Rule.Form',
|
74
|
+
type: 'ref',
|
75
|
+
refId: 'com.ronds.schema.default.Rule.Form',
|
76
|
+
value: {
|
77
|
+
label: '对象',
|
78
|
+
ref: {}
|
79
|
+
}
|
80
|
+
}],
|
81
|
+
refId: 'obj-e5f4_ref'
|
82
|
+
}, {
|
83
|
+
id: 'input-d4d3',
|
84
|
+
type: 'text',
|
85
|
+
fields: [{
|
86
|
+
id: 'com.ronds.schema.default.Rule.Form',
|
87
|
+
type: 'ref',
|
88
|
+
refId: 'com.ronds.schema.default.Rule.Form',
|
89
|
+
value: {
|
90
|
+
label: '输入框',
|
91
|
+
text: {}
|
92
|
+
}
|
93
|
+
}]
|
94
|
+
}],
|
95
|
+
types: [{
|
96
|
+
id: 'obj-e5f4_ref',
|
97
|
+
type: 'object',
|
98
|
+
properties: [{
|
99
|
+
id: 'textarea-eb7d',
|
100
|
+
type: 'text',
|
101
|
+
fields: [{
|
102
|
+
id: 'com.ronds.schema.default.Rule.Form',
|
103
|
+
type: 'ref',
|
104
|
+
refId: 'com.ronds.schema.default.Rule.Form',
|
105
|
+
value: {
|
106
|
+
label: '文本框',
|
107
|
+
text: {
|
108
|
+
type: 'textarea'
|
109
|
+
}
|
110
|
+
}
|
111
|
+
}]
|
112
|
+
}]
|
113
|
+
}]
|
114
|
+
}];
|
115
|
+
var a = transSchema2FG(_schema);
|
116
|
+
};
|
117
|
+
|
56
118
|
return /*#__PURE__*/React.createElement("div", {
|
57
119
|
style: {
|
58
120
|
height: '100%',
|
@@ -74,9 +136,14 @@ var Canvas = function Canvas() {
|
|
74
136
|
},
|
75
137
|
onClick: onClearCanvas
|
76
138
|
}, "\u6E05\u7A7A"), /*#__PURE__*/React.createElement(_Button, {
|
139
|
+
style: {
|
140
|
+
marginRight: '8px'
|
141
|
+
},
|
142
|
+
onClick: onImport
|
143
|
+
}, "\u5BFC\u5165"), /*#__PURE__*/React.createElement(_Button, {
|
77
144
|
type: "primary",
|
78
145
|
onClick: function onClick() {
|
79
|
-
var _schema = transFG2Schema(nodesRef.current, settingRef.current);
|
146
|
+
var _schema = transFG2Schema(nodesRef.current, settingRef.current, typesRef.current);
|
80
147
|
|
81
148
|
if (copy(JSON.stringify(_schema))) {
|
82
149
|
_message.success("\u5DF2\u590D\u5236\u5230\u526A\u5207\u677F");
|
@@ -26,23 +26,34 @@ var Settings = function Settings() {
|
|
26
26
|
curTab = _React$useState4[0],
|
27
27
|
setCurTab = _React$useState4[1];
|
28
28
|
|
29
|
+
var refIdRef = React.useRef();
|
29
30
|
var settingValueRef = React.useRef({
|
30
31
|
formSetting: formSetting.param.defaultValue
|
31
32
|
});
|
32
33
|
var processFgStreamData = React.useCallback(function (p) {
|
33
|
-
var _p$payload, _p$payload2;
|
34
|
-
|
35
34
|
switch (p === null || p === void 0 ? void 0 : p.type) {
|
36
35
|
case streamEventType.onNodeSelect:
|
37
|
-
|
38
|
-
|
36
|
+
refIdRef.current = p === null || p === void 0 ? void 0 : p.payload.refId;
|
37
|
+
|
38
|
+
var _node = p === null || p === void 0 ? void 0 : p.payload.node;
|
39
39
|
|
40
|
-
|
41
|
-
|
42
|
-
var _p$payload3;
|
40
|
+
setCurNode(_objectSpread({}, _node));
|
41
|
+
setCurTab(_node.id); // 赋值
|
43
42
|
|
44
|
-
|
45
|
-
|
43
|
+
if (refIdRef.current) {
|
44
|
+
var _key = "".concat(refIdRef.current, "_ref");
|
45
|
+
|
46
|
+
if (settingValueRef.current[_key] && settingValueRef.current[_key][_node.id]) {
|
47
|
+
setTimeout(function () {
|
48
|
+
compFormRef.current && compFormRef.current.setFieldsValue(_objectSpread({}, settingValueRef.current[_key][_node.id]));
|
49
|
+
}, 100);
|
50
|
+
}
|
51
|
+
} else {
|
52
|
+
if (settingValueRef.current[_node.id]) {
|
53
|
+
setTimeout(function () {
|
54
|
+
compFormRef.current && compFormRef.current.setFieldsValue(_objectSpread({}, settingValueRef.current[_node.id]));
|
55
|
+
}, 100);
|
56
|
+
}
|
46
57
|
}
|
47
58
|
|
48
59
|
break;
|
@@ -65,11 +76,20 @@ var Settings = function Settings() {
|
|
65
76
|
var _payload;
|
66
77
|
|
67
78
|
var _settingValue = settingValueRef.current;
|
68
|
-
|
79
|
+
|
80
|
+
if (refIdRef.current) {
|
81
|
+
var _key = "".concat(refIdRef.current, "_ref");
|
82
|
+
|
83
|
+
_settingValue = settingValueRef.current[_key] ? settingValueRef.current : _objectSpread(_objectSpread({}, settingValueRef.current), {}, _defineProperty({}, _key, {}));
|
84
|
+
_settingValue[_key][id] = allVals;
|
85
|
+
} else {
|
86
|
+
_settingValue[id] = allVals;
|
87
|
+
}
|
88
|
+
|
69
89
|
settingValueRef.current = _settingValue;
|
70
90
|
fGCtx.fgStream && fGCtx.fgStream.next({
|
71
91
|
type: streamEventType.onSettingValueChange,
|
72
|
-
payload: (_payload = {}, _defineProperty(_payload, id, allVals), _defineProperty(_payload, "allSetting", settingValueRef.current), _payload)
|
92
|
+
payload: (_payload = {}, _defineProperty(_payload, id, allVals), _defineProperty(_payload, "allSetting", settingValueRef.current), _defineProperty(_payload, "refId", refIdRef.current), _payload)
|
73
93
|
});
|
74
94
|
};
|
75
95
|
|
@@ -1008,6 +1008,62 @@ export declare const mutiSelectParam: {
|
|
1008
1008
|
isMutiple: boolean;
|
1009
1009
|
};
|
1010
1010
|
};
|
1011
|
+
export declare const colorParam: {
|
1012
|
+
type: string;
|
1013
|
+
schema: {
|
1014
|
+
id: string;
|
1015
|
+
type: string;
|
1016
|
+
properties: ({
|
1017
|
+
id: string;
|
1018
|
+
type: string;
|
1019
|
+
fields: {
|
1020
|
+
id: string;
|
1021
|
+
type: string;
|
1022
|
+
refId: string;
|
1023
|
+
value: {
|
1024
|
+
label: string;
|
1025
|
+
};
|
1026
|
+
}[];
|
1027
|
+
} | {
|
1028
|
+
id: string;
|
1029
|
+
type: string;
|
1030
|
+
fields: {
|
1031
|
+
id: string;
|
1032
|
+
type: string;
|
1033
|
+
refId: string;
|
1034
|
+
value: {
|
1035
|
+
common: {
|
1036
|
+
label: string;
|
1037
|
+
};
|
1038
|
+
'common-en-US': {};
|
1039
|
+
};
|
1040
|
+
}[];
|
1041
|
+
})[];
|
1042
|
+
types: {
|
1043
|
+
id: string;
|
1044
|
+
type: string;
|
1045
|
+
properties: {
|
1046
|
+
id: string;
|
1047
|
+
type: string;
|
1048
|
+
fields: {
|
1049
|
+
id: string;
|
1050
|
+
type: string;
|
1051
|
+
refId: string;
|
1052
|
+
value: {
|
1053
|
+
text: {};
|
1054
|
+
common: {
|
1055
|
+
label: string;
|
1056
|
+
};
|
1057
|
+
'common-en-US': {};
|
1058
|
+
};
|
1059
|
+
}[];
|
1060
|
+
}[];
|
1061
|
+
}[];
|
1062
|
+
}[];
|
1063
|
+
rule: {
|
1064
|
+
type: string;
|
1065
|
+
};
|
1066
|
+
};
|
1011
1067
|
export declare const basicComps: {
|
1012
1068
|
id: string;
|
1013
1069
|
name: string;
|
@@ -1054,6 +1110,117 @@ export declare const basicComps: {
|
|
1054
1110
|
}[];
|
1055
1111
|
};
|
1056
1112
|
}[];
|
1113
|
+
export declare const complexComps: {
|
1114
|
+
id: string;
|
1115
|
+
name: string;
|
1116
|
+
type: string;
|
1117
|
+
param: {
|
1118
|
+
type: string;
|
1119
|
+
schema: {
|
1120
|
+
id: string;
|
1121
|
+
type: string;
|
1122
|
+
properties: ({
|
1123
|
+
id: string;
|
1124
|
+
type: string;
|
1125
|
+
fields: {
|
1126
|
+
id: string;
|
1127
|
+
type: string;
|
1128
|
+
refId: string;
|
1129
|
+
value: {
|
1130
|
+
label: string;
|
1131
|
+
};
|
1132
|
+
}[];
|
1133
|
+
} | {
|
1134
|
+
id: string;
|
1135
|
+
type: string;
|
1136
|
+
fields: {
|
1137
|
+
id: string;
|
1138
|
+
type: string;
|
1139
|
+
refId: string;
|
1140
|
+
value: {
|
1141
|
+
common: {
|
1142
|
+
label: string;
|
1143
|
+
};
|
1144
|
+
'common-en-US': {};
|
1145
|
+
};
|
1146
|
+
}[];
|
1147
|
+
})[];
|
1148
|
+
types: {
|
1149
|
+
id: string;
|
1150
|
+
type: string;
|
1151
|
+
properties: {
|
1152
|
+
id: string;
|
1153
|
+
type: string;
|
1154
|
+
fields: {
|
1155
|
+
id: string;
|
1156
|
+
type: string;
|
1157
|
+
refId: string;
|
1158
|
+
value: {
|
1159
|
+
text: {};
|
1160
|
+
common: {
|
1161
|
+
label: string;
|
1162
|
+
};
|
1163
|
+
'common-en-US': {};
|
1164
|
+
};
|
1165
|
+
}[];
|
1166
|
+
}[];
|
1167
|
+
}[];
|
1168
|
+
}[];
|
1169
|
+
};
|
1170
|
+
}[];
|
1171
|
+
export declare const objParam: {
|
1172
|
+
type: string;
|
1173
|
+
schema: {
|
1174
|
+
id: string;
|
1175
|
+
type: string;
|
1176
|
+
properties: ({
|
1177
|
+
id: string;
|
1178
|
+
type: string;
|
1179
|
+
fields: {
|
1180
|
+
id: string;
|
1181
|
+
type: string;
|
1182
|
+
refId: string;
|
1183
|
+
value: {
|
1184
|
+
label: string;
|
1185
|
+
};
|
1186
|
+
}[];
|
1187
|
+
} | {
|
1188
|
+
id: string;
|
1189
|
+
type: string;
|
1190
|
+
fields: {
|
1191
|
+
id: string;
|
1192
|
+
type: string;
|
1193
|
+
refId: string;
|
1194
|
+
value: {
|
1195
|
+
common: {
|
1196
|
+
label: string;
|
1197
|
+
};
|
1198
|
+
'common-en-US': {};
|
1199
|
+
};
|
1200
|
+
}[];
|
1201
|
+
})[];
|
1202
|
+
types: {
|
1203
|
+
id: string;
|
1204
|
+
type: string;
|
1205
|
+
properties: {
|
1206
|
+
id: string;
|
1207
|
+
type: string;
|
1208
|
+
fields: {
|
1209
|
+
id: string;
|
1210
|
+
type: string;
|
1211
|
+
refId: string;
|
1212
|
+
value: {
|
1213
|
+
text: {};
|
1214
|
+
common: {
|
1215
|
+
label: string;
|
1216
|
+
};
|
1217
|
+
'common-en-US': {};
|
1218
|
+
};
|
1219
|
+
}[];
|
1220
|
+
}[];
|
1221
|
+
}[];
|
1222
|
+
}[];
|
1223
|
+
};
|
1057
1224
|
export declare const layoutComps: {
|
1058
1225
|
id: string;
|
1059
1226
|
name: string;
|
@@ -1228,7 +1395,7 @@ export declare const formSettingSchema: {
|
|
1228
1395
|
};
|
1229
1396
|
common: {
|
1230
1397
|
label: string;
|
1231
|
-
|
1398
|
+
help: string;
|
1232
1399
|
depend: {};
|
1233
1400
|
};
|
1234
1401
|
};
|
@@ -1307,7 +1474,7 @@ export declare const formSetting: {
|
|
1307
1474
|
};
|
1308
1475
|
common: {
|
1309
1476
|
label: string;
|
1310
|
-
|
1477
|
+
help: string;
|
1311
1478
|
depend: {};
|
1312
1479
|
};
|
1313
1480
|
};
|
@@ -1326,5 +1493,6 @@ export declare const streamEventType: {
|
|
1326
1493
|
onNodeCopy: string;
|
1327
1494
|
onClearCanvas: string;
|
1328
1495
|
onSettingValueChange: string;
|
1496
|
+
onTypesChange: string;
|
1329
1497
|
onDropOver: string;
|
1330
1498
|
};
|
@@ -3,7 +3,7 @@ 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-
|
6
|
+
* @LastEditTime: 2023-02-17 08:53:34
|
7
7
|
*/
|
8
8
|
import { RefRule, Rule } from './ruleConfig';
|
9
9
|
export var inputSchema = [{
|
@@ -93,6 +93,13 @@ export var mutiSelectParam = {
|
|
93
93
|
rule: {
|
94
94
|
isMutiple: true
|
95
95
|
}
|
96
|
+
};
|
97
|
+
export var colorParam = {
|
98
|
+
type: 'text',
|
99
|
+
schema: settingSchema.textarea,
|
100
|
+
rule: {
|
101
|
+
type: 'colorPicker'
|
102
|
+
}
|
96
103
|
}; // 基础组件列表渲染
|
97
104
|
|
98
105
|
export var basicComps = [{
|
@@ -130,13 +137,44 @@ export var basicComps = [{
|
|
130
137
|
name: '下拉多选',
|
131
138
|
type: 'mutiSelect',
|
132
139
|
param: mutiSelectParam
|
133
|
-
}]; //
|
140
|
+
}]; // 基础组件列表渲染
|
141
|
+
|
142
|
+
export var complexComps = [{
|
143
|
+
id: 'color',
|
144
|
+
name: '颜色选择',
|
145
|
+
type: 'color',
|
146
|
+
param: colorParam
|
147
|
+
}, {
|
148
|
+
id: 'password',
|
149
|
+
name: '密码框',
|
150
|
+
type: 'password',
|
151
|
+
param: inputParam
|
152
|
+
}, {
|
153
|
+
id: 'upload',
|
154
|
+
name: '上传',
|
155
|
+
type: 'upload',
|
156
|
+
param: textareaParam
|
157
|
+
}, {
|
158
|
+
id: 'checkbox',
|
159
|
+
name: '多选框',
|
160
|
+
type: 'checkbox',
|
161
|
+
param: dateParam
|
162
|
+
}, {
|
163
|
+
id: 'radio',
|
164
|
+
name: '单选框',
|
165
|
+
type: 'radio',
|
166
|
+
param: numberParam
|
167
|
+
}];
|
168
|
+
export var objParam = {
|
169
|
+
type: 'ref',
|
170
|
+
schema: settingSchema.input
|
171
|
+
}; // 布局组件列表渲染
|
134
172
|
|
135
173
|
export var layoutComps = [{
|
136
174
|
id: 'obj',
|
137
175
|
name: '对象',
|
138
176
|
type: 'obj',
|
139
|
-
param:
|
177
|
+
param: objParam
|
140
178
|
}, {
|
141
179
|
id: 'list',
|
142
180
|
name: '常规列表',
|
@@ -147,6 +185,9 @@ export var layoutComps = [{
|
|
147
185
|
export var sidebarCtx = [{
|
148
186
|
name: '基础组件',
|
149
187
|
children: basicComps
|
188
|
+
}, {
|
189
|
+
name: '高级组件',
|
190
|
+
children: complexComps
|
150
191
|
}, {
|
151
192
|
name: '布局组件',
|
152
193
|
children: layoutComps
|
@@ -230,7 +271,7 @@ export var formSettingSchema = [{
|
|
230
271
|
},
|
231
272
|
common: {
|
232
273
|
label: '标签宽度',
|
233
|
-
|
274
|
+
help: '不填自适应默认宽度',
|
234
275
|
depend: {}
|
235
276
|
}
|
236
277
|
}
|
@@ -256,5 +297,6 @@ export var streamEventType = {
|
|
256
297
|
onNodeCopy: 'onNodeCopy',
|
257
298
|
onClearCanvas: 'onClearCanvas',
|
258
299
|
onSettingValueChange: 'onSettingValueChange',
|
300
|
+
onTypesChange: 'onTypesChange',
|
259
301
|
onDropOver: 'onDropOver'
|
260
302
|
};
|
@@ -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-
|
6
|
+
* @LastEditTime: 2023-02-16 14:43:53
|
7
7
|
*/
|
8
8
|
import { DEFAULT_DATE_FORMAT } from '../../../comps/MetadataForm/DataCell/Input';
|
9
9
|
export var Rule = {
|
@@ -201,8 +201,6 @@ export var Rule = {
|
|
201
201
|
value: 'textarea'
|
202
202
|
}, {
|
203
203
|
value: 'upload'
|
204
|
-
}, {
|
205
|
-
value: 'buttonCell'
|
206
204
|
}],
|
207
205
|
type: 'enum',
|
208
206
|
fields: [{
|
@@ -1,13 +1,7 @@
|
|
1
1
|
import { FG } from '../../comps/FormGenerator/index.d';
|
2
|
-
export declare const transFG2Schema: (nodes: FG.Node[], settings: any) =>
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
fields: {
|
7
|
-
id: string;
|
8
|
-
type: string;
|
9
|
-
refId: string;
|
10
|
-
value: {};
|
11
|
-
}[];
|
2
|
+
export declare const transFG2Schema: (nodes: FG.Node[], settings: any, _types?: any, schemaId?: string) => any;
|
3
|
+
export declare const transSchema2FG: (schema: any) => {
|
4
|
+
nodes: any[];
|
5
|
+
setting: any[];
|
12
6
|
types: any[];
|
13
|
-
}
|
7
|
+
};
|
@@ -4,7 +4,7 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
4
|
/*
|
5
5
|
* @Author: wangxian
|
6
6
|
* @Date: 2023-02-08 14:45:46
|
7
|
-
* @LastEditTime: 2023-02-
|
7
|
+
* @LastEditTime: 2023-02-17 17:22:08
|
8
8
|
*/
|
9
9
|
import { deepClone } from '../../utils';
|
10
10
|
var EMPTY_OBJ = [{
|
@@ -16,8 +16,7 @@ var EMPTY_OBJ = [{
|
|
16
16
|
type: 'ref',
|
17
17
|
refId: 'com.ronds.schema.default.Rule.Form',
|
18
18
|
value: {}
|
19
|
-
}]
|
20
|
-
types: []
|
19
|
+
}]
|
21
20
|
}];
|
22
21
|
var EMPTY_PROP = {
|
23
22
|
id: '',
|
@@ -36,7 +35,12 @@ var renderProp = function renderProp(node, setting) {
|
|
36
35
|
var _setting = setting && deepClone(setting) || {};
|
37
36
|
|
38
37
|
_prop.id = (_setting === null || _setting === void 0 ? void 0 : _setting.id) || node.id;
|
39
|
-
_prop.type = node.param.type;
|
38
|
+
_prop.type = node.param.type; // ref类型加上refId
|
39
|
+
|
40
|
+
if (node.param.type === 'ref') {
|
41
|
+
_prop.refId = "".concat(_prop.id, "_ref");
|
42
|
+
}
|
43
|
+
|
40
44
|
_prop.fields[0].value = _objectSpread(_objectSpread({}, _setting), {}, _defineProperty({
|
41
45
|
label: (_setting === null || _setting === void 0 ? void 0 : _setting.label) || node.name
|
42
46
|
}, node.param.type, _objectSpread({}, node.param.rule || _objectSpread({}, _setting[node.param.type]))));
|
@@ -44,23 +48,65 @@ var renderProp = function renderProp(node, setting) {
|
|
44
48
|
}; // FG配置生成 metedata
|
45
49
|
|
46
50
|
|
47
|
-
export var transFG2Schema = function transFG2Schema(nodes, settings) {
|
48
|
-
|
49
|
-
|
51
|
+
export var transFG2Schema = function transFG2Schema(nodes, settings, _types, schemaId) {
|
52
|
+
try {
|
53
|
+
var schema = deepClone(EMPTY_OBJ);
|
54
|
+
|
55
|
+
if (schemaId) {
|
56
|
+
schema[0].id = schemaId;
|
57
|
+
}
|
58
|
+
|
59
|
+
var props = [];
|
60
|
+
var types = [];
|
61
|
+
|
62
|
+
for (var i = 0; i < nodes.length; i++) {
|
63
|
+
var _prop = renderProp(nodes[i], settings && settings[nodes[i].id]);
|
64
|
+
|
65
|
+
props.push(_prop);
|
66
|
+
}
|
50
67
|
|
51
|
-
|
52
|
-
var _prop = renderProp(nodes[i], settings[nodes[i].id]);
|
68
|
+
schema[0].properties = [].concat(props);
|
53
69
|
|
54
|
-
|
70
|
+
if (settings && (settings === null || settings === void 0 ? void 0 : settings.formSetting)) {
|
71
|
+
schema[0].fields[0].value = deepClone(settings.formSetting);
|
72
|
+
} else {
|
73
|
+
delete schema[0].fields;
|
74
|
+
}
|
75
|
+
|
76
|
+
if (_types) {
|
77
|
+
var typeKeys = Object.keys(_types);
|
78
|
+
|
79
|
+
for (var _i = 0; _i < typeKeys.length; _i++) {
|
80
|
+
var _type = transFG2Schema(_types[typeKeys[_i]].nodes, settings["".concat(typeKeys[_i], "_ref")], undefined, "".concat(_types[typeKeys[_i]].id, "_ref"));
|
81
|
+
|
82
|
+
types.push(_type[0]);
|
83
|
+
}
|
84
|
+
}
|
85
|
+
|
86
|
+
if (types.length > 0) {
|
87
|
+
schema[0].types = [].concat(types);
|
88
|
+
}
|
89
|
+
|
90
|
+
return schema;
|
91
|
+
} catch (error) {
|
92
|
+
console.warn('transFG2Schema.err', error);
|
55
93
|
}
|
94
|
+
};
|
95
|
+
|
96
|
+
var processProps = function processProps(prop) {}; // metadata 生成FG配置
|
97
|
+
|
56
98
|
|
57
|
-
|
99
|
+
export var transSchema2FG = function transSchema2FG(schema) {
|
100
|
+
var res = {
|
101
|
+
nodes: [],
|
102
|
+
setting: [],
|
103
|
+
types: []
|
104
|
+
};
|
105
|
+
var _props = schema[0].properties; // { id: 'input', name: '输入框', type: 'input', param: inputParam },
|
58
106
|
|
59
|
-
|
60
|
-
|
61
|
-
} else {
|
62
|
-
delete schema[0].fields;
|
107
|
+
for (var i = 0; i < _props.length; i++) {
|
108
|
+
var obj = processProps(_props[i]);
|
63
109
|
}
|
64
110
|
|
65
|
-
return
|
111
|
+
return res;
|
66
112
|
};
|
@@ -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-16
|
34
|
+
* @LastEditTime: 2023-02-16 14:32:47
|
35
35
|
*/
|
36
36
|
import React from 'react';
|
37
37
|
import { MetadataFormContext, MetadataRefContext } from '../interface';
|
@@ -279,6 +279,14 @@ var TableArray = function TableArray(props) {
|
|
279
279
|
}, [schema, processSchemaToColumns]);
|
280
280
|
|
281
281
|
var onTableChange = function onTableChange(values) {
|
282
|
+
if (typeof name === 'string') {
|
283
|
+
form.setFieldsValue(_objectSpread({}, _defineProperty({}, "".concat(name), values)));
|
284
|
+
} else {
|
285
|
+
var val = {};
|
286
|
+
assign(name, _objectSpread({}, values), val);
|
287
|
+
form.setFieldsValue(_objectSpread({}, val));
|
288
|
+
}
|
289
|
+
|
282
290
|
listRef.current = values;
|
283
291
|
};
|
284
292
|
|
@@ -9,7 +9,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
9
9
|
/*
|
10
10
|
* @Author: wangxian
|
11
11
|
* @Date: 2021-09-18 14:15:04
|
12
|
-
* @LastEditTime: 2023-02-
|
12
|
+
* @LastEditTime: 2023-02-20 10:00:50
|
13
13
|
*/
|
14
14
|
import React from 'react';
|
15
15
|
import Input from './DataCell/Input';
|
@@ -78,10 +78,10 @@ export function renderForm(schemaRef, options) {
|
|
78
78
|
var _form = [];
|
79
79
|
|
80
80
|
for (var i = 0; i < _properties.length; i++) {
|
81
|
-
var _properties$i, _properties$i2, _properties$i2$fields, _properties$i2$fields2;
|
81
|
+
var _properties$i, _properties$i2, _properties$i2$fields, _properties$i2$fields2, _properties$i3, _properties$i3$fields, _properties$i3$fields2;
|
82
82
|
|
83
83
|
var _colSpan = colSpan;
|
84
|
-
var compColSpan = ((_properties$i = _properties[i]) === null || _properties$i === void 0 ? void 0 : _properties$i.fields) && ((_properties$i2 = _properties[i]) === null || _properties$i2 === void 0 ? void 0 : (_properties$i2$fields = _properties$i2.fields[0]) === null || _properties$i2$fields === void 0 ? void 0 : (_properties$i2$fields2 = _properties$i2$fields.value) === null || _properties$i2$fields2 === void 0 ? void 0 : _properties$i2$fields2.colSpan);
|
84
|
+
var compColSpan = ((_properties$i = _properties[i]) === null || _properties$i === void 0 ? void 0 : _properties$i.fields) && (((_properties$i2 = _properties[i]) === null || _properties$i2 === void 0 ? void 0 : (_properties$i2$fields = _properties$i2.fields[0]) === null || _properties$i2$fields === void 0 ? void 0 : (_properties$i2$fields2 = _properties$i2$fields.value) === null || _properties$i2$fields2 === void 0 ? void 0 : _properties$i2$fields2.common.colSpan) || ((_properties$i3 = _properties[i]) === null || _properties$i3 === void 0 ? void 0 : (_properties$i3$fields = _properties$i3.fields[0]) === null || _properties$i3$fields === void 0 ? void 0 : (_properties$i3$fields2 = _properties$i3$fields.value) === null || _properties$i3$fields2 === void 0 ? void 0 : _properties$i3$fields2.colSpan));
|
85
85
|
|
86
86
|
if (compColSpan) {
|
87
87
|
_colSpan = compColSpan * colSpan <= 24 ? compColSpan * colSpan : 24;
|