ronds-metadata 1.3.54 → 1.3.56
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +25 -25
- package/es/api/index.js +8 -6
- package/es/comps/CodeEdit/index.d.ts +2 -1
- package/es/comps/DataMine/Line.d.ts +2 -1
- package/es/comps/DataMine/Line.js +0 -1
- package/es/comps/DataMine/index.d.ts +2 -1
- package/es/comps/DynamicPorts/comps/ContextMenu.less +8 -8
- package/es/comps/DynamicPorts/comps/DragNode.d.ts +1 -1
- package/es/comps/DynamicPorts/comps/GraphHandler/index.less +39 -39
- package/es/comps/DynamicPorts/comps/NodeElementForm.d.ts +2 -1
- package/es/comps/DynamicPorts/comps/NodeElementNormal.d.ts +2 -1
- package/es/comps/DynamicPorts/comps/contextMenu/EdgeContextMenu/index.less +5 -5
- package/es/comps/DynamicPorts/comps/contextMenu/GraphContextMenu/index.less +40 -40
- package/es/comps/DynamicPorts/comps/contextMenu/NodeContextMenu/index.d.ts +2 -1
- package/es/comps/DynamicPorts/comps/contextMenu/NodeContextMenu/index.less +42 -42
- package/es/comps/DynamicPorts/comps/shape/edge.js +7 -7
- package/es/comps/DynamicPorts/comps/shape/edge.less +8 -8
- package/es/comps/DynamicPorts/comps/shape/node.js +8 -9
- package/es/comps/DynamicPorts/graph.js +5 -4
- package/es/comps/DynamicPorts/index.d.ts +2 -1
- package/es/comps/DynamicPorts/index.less +307 -307
- package/es/comps/Editable/DataCell/ButtonCell.d.ts +1 -1
- package/es/comps/Editable/DataCell/ColorPicker.d.ts +1 -1
- package/es/comps/Editable/DataCell/Input.d.ts +1 -1
- package/es/comps/Editable/DataCell/Number.d.ts +1 -1
- package/es/comps/Editable/DataCell/Select.d.ts +1 -1
- package/es/comps/Editable/DataCell/Switch.d.ts +1 -1
- package/es/comps/Editable/DataCell/TreeSelect.d.ts +1 -1
- package/es/comps/Editable/comps/EditableAction.d.ts +2 -1
- package/es/comps/Editable/comps/Texty.d.ts +1 -1
- package/es/comps/Editable/comps/Texty.js +5 -4
- package/es/comps/Editable/comps/Texty.less +43 -43
- package/es/comps/Editable/comps/index.less +38 -38
- package/es/comps/Editable/index.d.ts +2 -1
- package/es/comps/Editable/index.less +97 -97
- package/es/comps/Editable/utils.d.ts +2 -1
- package/es/comps/FileView/index.d.ts +2 -1
- package/es/comps/FileView/index.js +2 -3
- package/es/comps/FormGenerator/comps/Canvas/Preview.d.ts +2 -1
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Checkbox.d.ts +2 -1
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Color.d.ts +1 -1
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Date.d.ts +1 -1
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Input.d.ts +1 -1
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/List.d.ts +2 -1
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/MutiSelect.d.ts +2 -1
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Number.d.ts +1 -1
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/NumberRange.d.ts +1 -1
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Obj.d.ts +2 -1
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Password.d.ts +1 -1
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Radio.d.ts +2 -1
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Select.d.ts +2 -1
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Switch.d.ts +1 -1
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Table.d.ts +2 -1
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/TextArea.d.ts +1 -1
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Upload.d.ts +1 -1
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/HOC/index.d.ts +2 -1
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/index.d.ts +2 -1
- package/es/comps/FormGenerator/comps/Canvas/core/index.d.ts +1 -1
- package/es/comps/FormGenerator/comps/Canvas/core/index.less +23 -23
- package/es/comps/FormGenerator/comps/Canvas/index.d.ts +2 -1
- package/es/comps/FormGenerator/comps/Settings/index.d.ts +2 -1
- package/es/comps/FormGenerator/comps/Settings/index.js +1 -2
- package/es/comps/FormGenerator/comps/Sidebar/Elements.d.ts +1 -1
- package/es/comps/FormGenerator/comps/Sidebar/JsonSchema.d.ts +1 -1
- package/es/comps/FormGenerator/comps/Sidebar/index.d.ts +2 -1
- package/es/comps/FormGenerator/comps/Sidebar/index.less +21 -21
- package/es/comps/FormGenerator/index.d.ts +2 -1
- package/es/comps/FormGenerator/index.less +20 -20
- package/es/comps/JsonEdit/index.d.ts +2 -1
- package/es/comps/JsonEdit/index.js +0 -1
- package/es/comps/JsonEdit/index.less +64 -64
- package/es/comps/JsonView/index.d.ts +2 -1
- package/es/comps/MdEdit/index.d.ts +2 -1
- package/es/comps/MdEditPro/index.d.ts +2 -1
- package/es/comps/MdEditPro/index.less +166 -166
- package/es/comps/MdEditPro/index2.d.ts +1 -1
- package/es/comps/MdNavbar/index.d.ts +2 -1
- package/es/comps/MdNavbar/index.less +77 -77
- package/es/comps/MdView/index.d.ts +1 -1
- package/es/comps/MdView/index.less +376 -376
- package/es/comps/MetadataEdit/components/MetaFieldsEdit.d.ts +2 -1
- package/es/comps/MetadataEdit/components/MetaPropsEdit.d.ts +2 -1
- package/es/comps/MetadataEdit/constant/index.js +0 -2
- package/es/comps/MetadataEdit/index.d.ts +2 -1
- package/es/comps/MetadataForm/DataCell/Array.d.ts +1 -1
- package/es/comps/MetadataForm/DataCell/Input.d.ts +1 -1
- package/es/comps/MetadataForm/DataCell/Input.js +15 -4
- package/es/comps/MetadataForm/DataCell/Number.d.ts +1 -1
- package/es/comps/MetadataForm/DataCell/Ref.d.ts +1 -1
- package/es/comps/MetadataForm/DataCell/Select.d.ts +1 -1
- package/es/comps/MetadataForm/DataCell/Select.js +21 -30
- package/es/comps/MetadataForm/DataCell/Switch.d.ts +1 -1
- package/es/comps/MetadataForm/DataCell/layout/TableArray.d.ts +2 -1
- package/es/comps/MetadataForm/DataCell/plugin/IconButton.d.ts +8 -0
- package/es/comps/MetadataForm/DataCell/plugin/IconButton.js +16 -0
- package/es/comps/MetadataForm/DataCell/plugin/MapTable.d.ts +12 -0
- package/es/comps/MetadataForm/DataCell/plugin/MapTable.js +116 -0
- package/es/comps/MetadataForm/DataCell/plugin/NumberRange.d.ts +2 -1
- package/es/comps/MetadataForm/DataCell/plugin/NumberRange.js +1 -2
- package/es/comps/MetadataForm/DataCell/plugin/RefreshSelect.d.ts +13 -0
- package/es/comps/MetadataForm/DataCell/plugin/RefreshSelect.js +65 -0
- package/es/comps/MetadataForm/DataCell/plugin/SparkSqlTable.d.ts +11 -0
- package/es/comps/MetadataForm/DataCell/plugin/SparkSqlTable.js +249 -0
- package/es/comps/MetadataForm/HOC/index.d.ts +2 -1
- package/es/comps/MetadataForm/index.d.ts +2 -1
- package/es/comps/MetadataForm/index.less +26 -26
- package/es/comps/MetadataForm/utils.d.ts +3 -2
- package/es/comps/Split/index.d.ts +1 -1
- package/es/comps/Split/index.less +29 -29
- package/es/framework/RxStore/demo/index.d.ts +2 -1
- package/es/framework/graph/index.less +15 -15
- package/es/framework/http/msgpack5/lib/helpers.js +0 -1
- package/es/framework/libs/iconfont/iconfont.css +323 -323
- package/es/framework/libs/iconfont/iconfont.json +548 -548
- package/es/framework/libs/jquery.min.js +4 -4
- package/es/framework/locale/dil8/di18n.js +5 -3
- package/es/framework/metadata/MetadataService.js +14 -14
- package/es/framework/metadata/index.js +14 -15
- package/es/framework/metadata/types.d.ts +103 -103
- package/es/theme.less +81 -81
- package/package.json +1 -1
@@ -1,7 +1,8 @@
|
|
1
|
+
import React from 'react';
|
1
2
|
interface IMetaFieldsEditProps {
|
2
3
|
type?: string;
|
3
4
|
defaultValues?: any;
|
4
5
|
onChange?: (values: any) => void;
|
5
6
|
}
|
6
|
-
declare const MetaFieldsEdit: (props: IMetaFieldsEditProps) => JSX.Element;
|
7
|
+
declare const MetaFieldsEdit: (props: IMetaFieldsEditProps) => React.JSX.Element;
|
7
8
|
export default MetaFieldsEdit;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import React from 'react';
|
1
2
|
import { FormInstance } from 'antd/lib/form';
|
2
3
|
interface IMetaPropsEditProps {
|
3
4
|
form: FormInstance;
|
@@ -9,5 +10,5 @@ interface IMetaPropsEditProps {
|
|
9
10
|
onAddFields?: (idx: number) => void;
|
10
11
|
onNewRefClick?: () => void;
|
11
12
|
}
|
12
|
-
declare const MetaPropsEdit: (props: IMetaPropsEditProps) => JSX.Element;
|
13
|
+
declare const MetaPropsEdit: (props: IMetaPropsEditProps) => React.JSX.Element;
|
13
14
|
export default MetaPropsEdit;
|
@@ -47,7 +47,6 @@ export var OUTERMOST_TYPES_OPTIONS = [{
|
|
47
47
|
// value: 'bool',
|
48
48
|
// },
|
49
49
|
];
|
50
|
-
|
51
50
|
export var RULE_TYPES_OPTIONS = [{
|
52
51
|
label: '引用',
|
53
52
|
value: 'ref'
|
@@ -65,7 +64,6 @@ export var RULE_TYPES_OPTIONS = [{
|
|
65
64
|
// value: 'bool',
|
66
65
|
// },
|
67
66
|
];
|
68
|
-
|
69
67
|
export var NUMBER_FORMAT_OPTIONS = [{
|
70
68
|
label: 'int',
|
71
69
|
value: 'int'
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { FormInstance } from 'antd';
|
2
|
+
import React from 'react';
|
2
3
|
import './index.less';
|
3
4
|
interface IMetadataEditProps {
|
4
5
|
/**
|
@@ -26,5 +27,5 @@ interface IMetadataEditProps {
|
|
26
27
|
*/
|
27
28
|
getFormInstance?: (form: FormInstance) => void;
|
28
29
|
}
|
29
|
-
declare const MetadataEdit: (props: IMetadataEditProps) => JSX.Element;
|
30
|
+
declare const MetadataEdit: (props: IMetadataEditProps) => React.JSX.Element;
|
30
31
|
export default MetadataEdit;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { IMetaFormProps } from '../interface';
|
3
|
-
declare function Index(props: IMetaFormProps): JSX.Element;
|
3
|
+
declare function Index(props: IMetaFormProps): React.JSX.Element;
|
4
4
|
declare const _default: React.MemoExoticComponent<typeof Index>;
|
5
5
|
export default _default;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { IMetaFormProps } from '../interface';
|
3
|
-
declare function Index(props: IMetaFormProps): JSX.Element;
|
3
|
+
declare function Index(props: IMetaFormProps): React.JSX.Element;
|
4
4
|
declare const _default: React.MemoExoticComponent<typeof Index>;
|
5
5
|
export default _default;
|
6
6
|
export declare const DEFAULT_DATE_FORMAT = "YYYY-MM-DD HH:mm:ss";
|
@@ -31,6 +31,9 @@ import NumberRange from './plugin/NumberRange';
|
|
31
31
|
import { tr } from '../../../framework/locale';
|
32
32
|
import { useAsyncMemo } from '../../../framework/hooks/use-async-memo';
|
33
33
|
import { MetadataService } from '../../../framework/metadata/MetadataService';
|
34
|
+
import SparkSqlTable from './plugin/SparkSqlTable';
|
35
|
+
import MapTable from './plugin/MapTable';
|
36
|
+
import IconButton from './plugin/IconButton';
|
34
37
|
var TextArea = _Input.TextArea;
|
35
38
|
function Index(props) {
|
36
39
|
var _extraInfo$addonAfter7;
|
@@ -188,6 +191,12 @@ function Index(props) {
|
|
188
191
|
return /*#__PURE__*/React.createElement(NumberRange, _extends({}, extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.numberRange, {
|
189
192
|
disabled: (_extraInfo$disabled7 = extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.disabled) !== null && _extraInfo$disabled7 !== void 0 ? _extraInfo$disabled7 : disabled
|
190
193
|
}));
|
194
|
+
case 'sparkSqlTable':
|
195
|
+
return /*#__PURE__*/React.createElement(SparkSqlTable, extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.sparkSqlTable);
|
196
|
+
case 'mapTable':
|
197
|
+
return /*#__PURE__*/React.createElement(MapTable, extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.mapTable);
|
198
|
+
case 'iconButton':
|
199
|
+
return /*#__PURE__*/React.createElement(IconButton, extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.iconButton);
|
191
200
|
default:
|
192
201
|
return /*#__PURE__*/React.createElement(_Input, {
|
193
202
|
addonAfter: ((_extraInfo$addonAfter2 = extraInfo.addonAfter) === null || _extraInfo$addonAfter2 === void 0 ? void 0 : _extraInfo$addonAfter2.key) ? /*#__PURE__*/React.createElement(_Form.Item, {
|
@@ -222,7 +231,7 @@ function Index(props) {
|
|
222
231
|
style: (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.color) ? {
|
223
232
|
color: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.color
|
224
233
|
} : {}
|
225
|
-
}, tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id),
|
234
|
+
}, (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.titleHidden) ? '' : tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id),
|
226
235
|
labelCol: labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? {
|
227
236
|
flex: "0 0 ".concat(labelSpan * 100 / 24, "%"),
|
228
237
|
offset: 0
|
@@ -240,7 +249,8 @@ function Index(props) {
|
|
240
249
|
message: "".concat(tr('请输入'), " ").concat(tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
|
241
250
|
}].concat(_toConsumableArray(rules)),
|
242
251
|
help: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help),
|
243
|
-
tooltip: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip)
|
252
|
+
tooltip: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip),
|
253
|
+
colon: !(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.titleHidden)
|
244
254
|
}), processInputType((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.type) || ''));
|
245
255
|
}
|
246
256
|
return !field ?
|
@@ -256,7 +266,7 @@ function Index(props) {
|
|
256
266
|
style: (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.color) ? {
|
257
267
|
color: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.color
|
258
268
|
} : {}
|
259
|
-
}, tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id),
|
269
|
+
}, (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.titleHidden) ? '' : tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id),
|
260
270
|
labelCol: labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? {
|
261
271
|
flex: "0 0 ".concat(labelSpan * 100 / 24, "%"),
|
262
272
|
offset: 0
|
@@ -274,7 +284,8 @@ function Index(props) {
|
|
274
284
|
message: "".concat(tr('请输入'), " ").concat(tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
|
275
285
|
}].concat(_toConsumableArray(rules)),
|
276
286
|
help: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help),
|
277
|
-
tooltip: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip)
|
287
|
+
tooltip: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip),
|
288
|
+
colon: !(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.titleHidden)
|
278
289
|
}, processInputType((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.type) || '')) : /*#__PURE__*/React.createElement(_Form.Item, _extends({}, field, {
|
279
290
|
style: {
|
280
291
|
flex: 1,
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { IMetaFormProps } from '../interface';
|
3
|
-
declare function Index(props: IMetaFormProps): JSX.Element;
|
3
|
+
declare function Index(props: IMetaFormProps): React.JSX.Element;
|
4
4
|
declare const _default: React.MemoExoticComponent<typeof Index>;
|
5
5
|
export default _default;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { IMetaFormProps } from '../interface';
|
3
|
-
declare function Index(props: IMetaFormProps): JSX.Element;
|
3
|
+
declare function Index(props: IMetaFormProps): React.JSX.Element;
|
4
4
|
declare const _default: React.MemoExoticComponent<typeof Index>;
|
5
5
|
export default _default;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { IMetaFormProps } from '../interface';
|
3
|
-
declare function Index(props: IMetaFormProps): JSX.Element;
|
3
|
+
declare function Index(props: IMetaFormProps): React.JSX.Element;
|
4
4
|
declare const _default: React.MemoExoticComponent<typeof Index>;
|
5
5
|
export default _default;
|
@@ -1,8 +1,6 @@
|
|
1
1
|
import "antd/es/form/style";
|
2
2
|
import _Form from "antd/es/form";
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
4
|
-
import "antd/es/button/style";
|
5
|
-
import _Button from "antd/es/button";
|
6
4
|
import "antd/es/radio/style";
|
7
5
|
import _Radio from "antd/es/radio";
|
8
6
|
import "antd/es/row/style";
|
@@ -39,10 +37,9 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
39
37
|
/*
|
40
38
|
* @Author:wangxian
|
41
39
|
* @Date: 2021-09-18 14:15:04
|
42
|
-
* @LastEditTime: 2024-07-
|
40
|
+
* @LastEditTime: 2024-07-24 15:49:09
|
43
41
|
*/
|
44
42
|
import React from 'react';
|
45
|
-
import { SyncOutlined } from '@ant-design/icons';
|
46
43
|
import { MetadataFormContext, MetadataRefContext } from '../interface';
|
47
44
|
import { useGetExtraInfo } from '../hooks';
|
48
45
|
import { MetadataService } from '../../../framework/metadata/MetadataService';
|
@@ -51,6 +48,7 @@ import { useAsyncMemo } from '../../../framework/hooks/use-async-memo';
|
|
51
48
|
import { tr } from '../../../framework/locale';
|
52
49
|
import useObservable from '../../../framework/rxjs-hooks/useObservable';
|
53
50
|
import { assignReplace, findTopParentIndex } from '../utils';
|
51
|
+
import RefreshSelect from './plugin/RefreshSelect';
|
54
52
|
function Index(props) {
|
55
53
|
var _extraInfo$http11, _extraInfo$http12, _extraInfo$http13, _extraInfo$http14, _extraInfo$http15, _extraInfo$http16;
|
56
54
|
var id = props.id,
|
@@ -517,19 +515,20 @@ function Index(props) {
|
|
517
515
|
value: it.value
|
518
516
|
}, tr(it.label)));
|
519
517
|
})));
|
518
|
+
} else if ((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.http) && (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.http.url)) {
|
519
|
+
return /*#__PURE__*/React.createElement(RefreshSelect, {
|
520
|
+
disabled: disabled,
|
521
|
+
extraInfo: extraInfo,
|
522
|
+
options: myOptions,
|
523
|
+
maxTagPlaceholder: maxTagPlaceholder,
|
524
|
+
onChange: onSelectChange,
|
525
|
+
onRefresh: function onRefresh() {
|
526
|
+
setIsRefreshHttp(!isRefreshHttp);
|
527
|
+
}
|
528
|
+
});
|
520
529
|
} else {
|
521
530
|
var _extraInfo$disabled4;
|
522
|
-
return /*#__PURE__*/React.createElement(
|
523
|
-
className: "w-full",
|
524
|
-
style: {
|
525
|
-
display: 'flex'
|
526
|
-
}
|
527
|
-
}, /*#__PURE__*/React.createElement("div", {
|
528
|
-
className: "flex-1",
|
529
|
-
style: {
|
530
|
-
width: "".concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.http) && (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.http.url) ? 'calc(100% - 32px)' : '100%')
|
531
|
-
}
|
532
|
-
}, /*#__PURE__*/React.createElement(_Select, {
|
531
|
+
return /*#__PURE__*/React.createElement(_Select, {
|
533
532
|
mode: (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.isMutiple) ? 'multiple' : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.mode,
|
534
533
|
onSelect: onSelect,
|
535
534
|
disabled: (_extraInfo$disabled4 = extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.disabled) !== null && _extraInfo$disabled4 !== void 0 ? _extraInfo$disabled4 : disabled,
|
@@ -549,17 +548,7 @@ function Index(props) {
|
|
549
548
|
maxTagCount: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.maxTagCount,
|
550
549
|
maxTagTextLength: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.maxTagTextLength,
|
551
550
|
maxTagPlaceholder: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.maxTagPlaceholder) || maxTagPlaceholder
|
552
|
-
})
|
553
|
-
style: {
|
554
|
-
width: '32px'
|
555
|
-
}
|
556
|
-
}, /*#__PURE__*/React.createElement(_Button, {
|
557
|
-
type: "link",
|
558
|
-
icon: /*#__PURE__*/React.createElement(SyncOutlined, null),
|
559
|
-
onClick: function onClick() {
|
560
|
-
setIsRefreshHttp(!isRefreshHttp);
|
561
|
-
}
|
562
|
-
})));
|
551
|
+
});
|
563
552
|
}
|
564
553
|
};
|
565
554
|
if (isObj && isRefForm && field) {
|
@@ -573,7 +562,7 @@ function Index(props) {
|
|
573
562
|
style: (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.color) ? {
|
574
563
|
color: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.color
|
575
564
|
} : {}
|
576
|
-
}, tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id),
|
565
|
+
}, (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.titleHidden) ? '' : tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id),
|
577
566
|
labelCol: labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? {
|
578
567
|
flex: "0 0 ".concat(labelSpan * 100 / 24, "%"),
|
579
568
|
offset: 0
|
@@ -591,7 +580,8 @@ function Index(props) {
|
|
591
580
|
message: "".concat(tr('请输入'), " ").concat(tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
|
592
581
|
}],
|
593
582
|
help: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help),
|
594
|
-
tooltip: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip)
|
583
|
+
tooltip: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip),
|
584
|
+
colon: !(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.titleHidden)
|
595
585
|
}), processSelectType((_extraInfo$http8 = extraInfo.http) === null || _extraInfo$http8 === void 0 ? void 0 : _extraInfo$http8.isCascader, (_extraInfo$http9 = extraInfo.http) === null || _extraInfo$http9 === void 0 ? void 0 : _extraInfo$http9.isTreeSelect, (_extraInfo$http10 = extraInfo.http) === null || _extraInfo$http10 === void 0 ? void 0 : _extraInfo$http10.isPagination));
|
596
586
|
}
|
597
587
|
return !field ? /*#__PURE__*/React.createElement(_Form.Item, {
|
@@ -604,7 +594,7 @@ function Index(props) {
|
|
604
594
|
style: (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.color) ? {
|
605
595
|
color: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.color
|
606
596
|
} : {}
|
607
|
-
}, tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id),
|
597
|
+
}, (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.titleHidden) ? '' : tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id, " "),
|
608
598
|
labelCol: labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? {
|
609
599
|
flex: "0 0 ".concat(labelSpan * 100 / 24, "%"),
|
610
600
|
offset: 0
|
@@ -622,7 +612,8 @@ function Index(props) {
|
|
622
612
|
message: "".concat(tr('请输入'), " ").concat(tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
|
623
613
|
}],
|
624
614
|
help: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help),
|
625
|
-
tooltip: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip)
|
615
|
+
tooltip: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip),
|
616
|
+
colon: !(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.titleHidden)
|
626
617
|
}, processSelectType((_extraInfo$http11 = extraInfo.http) === null || _extraInfo$http11 === void 0 ? void 0 : _extraInfo$http11.isCascader, (_extraInfo$http12 = extraInfo.http) === null || _extraInfo$http12 === void 0 ? void 0 : _extraInfo$http12.isTreeSelect, (_extraInfo$http13 = extraInfo.http) === null || _extraInfo$http13 === void 0 ? void 0 : _extraInfo$http13.isPagination)) : /*#__PURE__*/React.createElement(_Form.Item, _extends({}, field, {
|
627
618
|
style: {
|
628
619
|
flex: 1,
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { IMetaFormProps } from '../interface';
|
3
|
-
declare function Index(props: IMetaFormProps): JSX.Element;
|
3
|
+
declare function Index(props: IMetaFormProps): React.JSX.Element;
|
4
4
|
declare const _default: React.MemoExoticComponent<typeof Index>;
|
5
5
|
export default _default;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import React from 'react';
|
1
2
|
import { FormInstance } from 'antd';
|
2
3
|
interface ITableArrayProps {
|
3
4
|
name: string | string[];
|
@@ -10,5 +11,5 @@ interface ITableArrayProps {
|
|
10
11
|
addButtonHidden?: boolean;
|
11
12
|
initValue: any;
|
12
13
|
}
|
13
|
-
declare const TableArray: (props: ITableArrayProps) => JSX.Element;
|
14
|
+
declare const TableArray: (props: ITableArrayProps) => React.JSX.Element;
|
14
15
|
export default TableArray;
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import "antd/es/button/style";
|
2
|
+
import _Button from "antd/es/button";
|
3
|
+
import React from "react";
|
4
|
+
import { tr } from '@/framework/locale';
|
5
|
+
var IconButton = function IconButton(props) {
|
6
|
+
var icon = props.icon,
|
7
|
+
text = props.text,
|
8
|
+
onClick = props.onClick;
|
9
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Button, {
|
10
|
+
className: "ml-2",
|
11
|
+
type: "link",
|
12
|
+
icon: icon,
|
13
|
+
onClick: onClick
|
14
|
+
}, tr(text)));
|
15
|
+
};
|
16
|
+
export default IconButton;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
interface IMapTableProps {
|
3
|
+
columnSource: any;
|
4
|
+
dataSource: any;
|
5
|
+
columnTarget: any;
|
6
|
+
dataTarget: any;
|
7
|
+
options: any;
|
8
|
+
value?: any;
|
9
|
+
onChange?: (value: any) => void;
|
10
|
+
}
|
11
|
+
declare const MapTable: (props: IMapTableProps) => React.JSX.Element;
|
12
|
+
export default MapTable;
|
@@ -0,0 +1,116 @@
|
|
1
|
+
import "antd/es/button/style";
|
2
|
+
import _Button from "antd/es/button";
|
3
|
+
import "antd/es/table/style";
|
4
|
+
import _Table from "antd/es/table";
|
5
|
+
import "antd/es/select/style";
|
6
|
+
import _Select from "antd/es/select";
|
7
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
8
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
9
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
10
|
+
import { CloseCircleFilled, ArrowRightOutlined } from '@ant-design/icons';
|
11
|
+
import React from 'react';
|
12
|
+
var MapTable = function MapTable(props) {
|
13
|
+
var columnSource = props.columnSource,
|
14
|
+
dataSource = props.dataSource,
|
15
|
+
columnTarget = props.columnTarget,
|
16
|
+
dataTarget = props.dataTarget,
|
17
|
+
options = props.options,
|
18
|
+
value = props.value,
|
19
|
+
onChange = props.onChange;
|
20
|
+
var _React$useState = React.useState(),
|
21
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
22
|
+
mapping = _React$useState2[0],
|
23
|
+
setMapping = _React$useState2[1];
|
24
|
+
var _React$useState3 = React.useState(),
|
25
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
26
|
+
disableArray = _React$useState4[0],
|
27
|
+
setDisableArray = _React$useState4[1];
|
28
|
+
var triggerChange = function triggerChange(changedValue) {
|
29
|
+
onChange && onChange(_objectSpread({
|
30
|
+
mapping: mapping
|
31
|
+
}, changedValue));
|
32
|
+
};
|
33
|
+
var onBtnClick = function onBtnClick(index) {
|
34
|
+
var _disableArray = _toConsumableArray(disableArray);
|
35
|
+
_disableArray[index] = !_disableArray[index];
|
36
|
+
setDisableArray(_disableArray);
|
37
|
+
};
|
38
|
+
React.useEffect(function () {
|
39
|
+
if (value) {
|
40
|
+
if (value[mapping]) {
|
41
|
+
setMapping(value[mapping]);
|
42
|
+
}
|
43
|
+
}
|
44
|
+
}, [value]);
|
45
|
+
React.useEffect(function () {
|
46
|
+
setDisableArray(new Array(Math.min(dataSource.length, dataTarget.length)).fill(true));
|
47
|
+
}, []);
|
48
|
+
React.useEffect(function () {
|
49
|
+
if (disableArray) {
|
50
|
+
var _mapping = [];
|
51
|
+
disableArray.forEach(function (_, idx) {
|
52
|
+
if (disableArray[idx]) {
|
53
|
+
_mapping.push({
|
54
|
+
source: {
|
55
|
+
name: dataSource[idx].source,
|
56
|
+
dataType: dataSource[idx].type
|
57
|
+
},
|
58
|
+
target: {
|
59
|
+
name: dataTarget[idx].source,
|
60
|
+
dataType: dataTarget[idx].type
|
61
|
+
}
|
62
|
+
});
|
63
|
+
}
|
64
|
+
});
|
65
|
+
setMapping(_mapping);
|
66
|
+
triggerChange({
|
67
|
+
mapping: _mapping
|
68
|
+
});
|
69
|
+
}
|
70
|
+
}, [disableArray]);
|
71
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
72
|
+
style: {
|
73
|
+
margin: '8px'
|
74
|
+
}
|
75
|
+
}, /*#__PURE__*/React.createElement(_Select, {
|
76
|
+
defaultValue: "a1",
|
77
|
+
onChange: function onChange() {},
|
78
|
+
style: {
|
79
|
+
width: 150
|
80
|
+
},
|
81
|
+
options: options
|
82
|
+
})), /*#__PURE__*/React.createElement("div", {
|
83
|
+
style: {
|
84
|
+
display: 'flex'
|
85
|
+
}
|
86
|
+
}, /*#__PURE__*/React.createElement(_Table, {
|
87
|
+
columns: columnSource,
|
88
|
+
dataSource: dataSource,
|
89
|
+
pagination: false,
|
90
|
+
size: "small"
|
91
|
+
}), /*#__PURE__*/React.createElement("div", {
|
92
|
+
style: {
|
93
|
+
marginTop: '40px'
|
94
|
+
}
|
95
|
+
}, _toConsumableArray(Array(Math.min(dataSource.length, dataTarget.length))).map(function (_, index) {
|
96
|
+
return /*#__PURE__*/React.createElement("div", {
|
97
|
+
key: index,
|
98
|
+
style: {
|
99
|
+
margin: '6px'
|
100
|
+
}
|
101
|
+
}, /*#__PURE__*/React.createElement(_Button, {
|
102
|
+
key: index,
|
103
|
+
type: "link",
|
104
|
+
icon: disableArray && disableArray[index] ? /*#__PURE__*/React.createElement(ArrowRightOutlined, null) : /*#__PURE__*/React.createElement(CloseCircleFilled, null),
|
105
|
+
onClick: function onClick() {
|
106
|
+
return onBtnClick(index);
|
107
|
+
}
|
108
|
+
}));
|
109
|
+
})), /*#__PURE__*/React.createElement(_Table, {
|
110
|
+
columns: columnTarget,
|
111
|
+
dataSource: dataTarget,
|
112
|
+
pagination: false,
|
113
|
+
size: "small"
|
114
|
+
}))));
|
115
|
+
};
|
116
|
+
export default MapTable;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import React from 'react';
|
1
2
|
interface INumberRangeProps {
|
2
3
|
startKey?: string;
|
3
4
|
endKey?: string;
|
@@ -15,5 +16,5 @@ interface INumberRangeProps {
|
|
15
16
|
value?: any;
|
16
17
|
onChange?: (value: any) => void;
|
17
18
|
}
|
18
|
-
declare const NumberRange: (props: INumberRangeProps) => JSX.Element;
|
19
|
+
declare const NumberRange: (props: INumberRangeProps) => React.JSX.Element;
|
19
20
|
export default NumberRange;
|
@@ -59,8 +59,7 @@ var NumberRange = function NumberRange(props) {
|
|
59
59
|
}
|
60
60
|
}, [value]);
|
61
61
|
var triggerChange = function triggerChange(changedValue) {
|
62
|
-
|
63
|
-
onChange && onChange(_objectSpread((_objectSpread2 = {}, _defineProperty(_objectSpread2, addonBefore === null || addonBefore === void 0 ? void 0 : addonBefore.key, before), _defineProperty(_objectSpread2, addonAfter === null || addonAfter === void 0 ? void 0 : addonAfter.key, after), _defineProperty(_objectSpread2, startKey || 'min', min), _defineProperty(_objectSpread2, endKey || 'max', max), _objectSpread2), changedValue));
|
62
|
+
onChange && onChange(_objectSpread(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, addonBefore === null || addonBefore === void 0 ? void 0 : addonBefore.key, before), addonAfter === null || addonAfter === void 0 ? void 0 : addonAfter.key, after), startKey || 'min', min), endKey || 'max', max), changedValue));
|
64
63
|
};
|
65
64
|
var onStartChange = function onStartChange(v) {
|
66
65
|
setMin(v);
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
interface IRefreshSelectProps {
|
3
|
+
extraInfo?: any;
|
4
|
+
disabled?: boolean;
|
5
|
+
value?: any;
|
6
|
+
options: any;
|
7
|
+
maxTagPlaceholder?: any;
|
8
|
+
onChange?: (value: any) => void;
|
9
|
+
onSelect?: (value: any) => void;
|
10
|
+
onRefresh?: () => void;
|
11
|
+
}
|
12
|
+
declare const RefreshSelect: (props: IRefreshSelectProps) => React.JSX.Element;
|
13
|
+
export default RefreshSelect;
|
@@ -0,0 +1,65 @@
|
|
1
|
+
import "antd/es/button/style";
|
2
|
+
import _Button from "antd/es/button";
|
3
|
+
import "antd/es/select/style";
|
4
|
+
import _Select from "antd/es/select";
|
5
|
+
/*
|
6
|
+
* @Author: wangxian
|
7
|
+
* @Date: 2023-05-30 13:36:05
|
8
|
+
* @LastEditTime: 2024-07-25 08:35:21
|
9
|
+
*/
|
10
|
+
import { tr } from '../../../../framework/locale';
|
11
|
+
import React from 'react';
|
12
|
+
import { SyncOutlined } from '@ant-design/icons';
|
13
|
+
var RefreshSelect = function RefreshSelect(props) {
|
14
|
+
var _extraInfo$disabled, _extraInfo$disabled2;
|
15
|
+
var extraInfo = props.extraInfo,
|
16
|
+
value = props.value,
|
17
|
+
options = props.options,
|
18
|
+
disabled = props.disabled,
|
19
|
+
maxTagPlaceholder = props.maxTagPlaceholder,
|
20
|
+
onChange = props.onChange,
|
21
|
+
onSelect = props.onSelect,
|
22
|
+
onRefresh = props.onRefresh;
|
23
|
+
return /*#__PURE__*/React.createElement("div", {
|
24
|
+
className: "w-full",
|
25
|
+
style: {
|
26
|
+
display: 'flex'
|
27
|
+
}
|
28
|
+
}, /*#__PURE__*/React.createElement("div", {
|
29
|
+
className: "flex-1",
|
30
|
+
style: {
|
31
|
+
width: 'calc(100% - 32px)'
|
32
|
+
}
|
33
|
+
}, /*#__PURE__*/React.createElement(_Select, {
|
34
|
+
value: value,
|
35
|
+
mode: (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.isMutiple) ? 'multiple' : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.mode,
|
36
|
+
onSelect: onSelect,
|
37
|
+
disabled: (_extraInfo$disabled = extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.disabled) !== null && _extraInfo$disabled !== void 0 ? _extraInfo$disabled : disabled,
|
38
|
+
placeholder: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.placeholder),
|
39
|
+
options: options,
|
40
|
+
showSearch: true,
|
41
|
+
filterOption: function filterOption(input, option) {
|
42
|
+
var _option$label;
|
43
|
+
return (option === null || option === void 0 ? void 0 : (_option$label = option.label) === null || _option$label === void 0 ? void 0 : _option$label.toString().indexOf(input)) >= 0;
|
44
|
+
},
|
45
|
+
getPopupContainer: function getPopupContainer(triggerNode) {
|
46
|
+
return triggerNode.parentNode;
|
47
|
+
},
|
48
|
+
allowClear: true,
|
49
|
+
onChange: onChange,
|
50
|
+
labelInValue: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.labelInValue,
|
51
|
+
maxTagCount: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.maxTagCount,
|
52
|
+
maxTagTextLength: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.maxTagTextLength,
|
53
|
+
maxTagPlaceholder: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.maxTagPlaceholder) || maxTagPlaceholder
|
54
|
+
})), /*#__PURE__*/React.createElement("div", {
|
55
|
+
style: {
|
56
|
+
width: '32px'
|
57
|
+
}
|
58
|
+
}, /*#__PURE__*/React.createElement(_Button, {
|
59
|
+
disabled: (_extraInfo$disabled2 = extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.disabled) !== null && _extraInfo$disabled2 !== void 0 ? _extraInfo$disabled2 : disabled,
|
60
|
+
type: "link",
|
61
|
+
icon: /*#__PURE__*/React.createElement(SyncOutlined, null),
|
62
|
+
onClick: onRefresh
|
63
|
+
})));
|
64
|
+
};
|
65
|
+
export default RefreshSelect;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
interface ISparkSqlTableProps {
|
3
|
+
extraDico?: any[];
|
4
|
+
initSql?: string;
|
5
|
+
dataSource?: any[];
|
6
|
+
value?: any;
|
7
|
+
onSearch?: (data: any) => void;
|
8
|
+
onChange?: (value: any) => void;
|
9
|
+
}
|
10
|
+
declare const SparkSqlTable: (props: ISparkSqlTableProps) => React.JSX.Element;
|
11
|
+
export default SparkSqlTable;
|