ronds-metadata 1.3.55 → 1.3.56

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.
Files changed (121) hide show
  1. package/README.md +25 -25
  2. package/es/api/index.js +6 -4
  3. package/es/comps/CodeEdit/index.d.ts +2 -1
  4. package/es/comps/DataMine/Line.d.ts +2 -1
  5. package/es/comps/DataMine/Line.js +0 -1
  6. package/es/comps/DataMine/index.d.ts +2 -1
  7. package/es/comps/DynamicPorts/comps/ContextMenu.less +8 -8
  8. package/es/comps/DynamicPorts/comps/DragNode.d.ts +1 -1
  9. package/es/comps/DynamicPorts/comps/GraphHandler/index.less +39 -39
  10. package/es/comps/DynamicPorts/comps/NodeElementForm.d.ts +2 -1
  11. package/es/comps/DynamicPorts/comps/NodeElementNormal.d.ts +2 -1
  12. package/es/comps/DynamicPorts/comps/contextMenu/EdgeContextMenu/index.less +5 -5
  13. package/es/comps/DynamicPorts/comps/contextMenu/GraphContextMenu/index.less +40 -40
  14. package/es/comps/DynamicPorts/comps/contextMenu/NodeContextMenu/index.d.ts +2 -1
  15. package/es/comps/DynamicPorts/comps/contextMenu/NodeContextMenu/index.less +42 -42
  16. package/es/comps/DynamicPorts/comps/shape/edge.js +7 -7
  17. package/es/comps/DynamicPorts/comps/shape/edge.less +8 -8
  18. package/es/comps/DynamicPorts/comps/shape/node.js +8 -9
  19. package/es/comps/DynamicPorts/graph.js +5 -4
  20. package/es/comps/DynamicPorts/index.d.ts +2 -1
  21. package/es/comps/DynamicPorts/index.less +307 -307
  22. package/es/comps/Editable/DataCell/ButtonCell.d.ts +1 -1
  23. package/es/comps/Editable/DataCell/ColorPicker.d.ts +1 -1
  24. package/es/comps/Editable/DataCell/Input.d.ts +1 -1
  25. package/es/comps/Editable/DataCell/Number.d.ts +1 -1
  26. package/es/comps/Editable/DataCell/Select.d.ts +1 -1
  27. package/es/comps/Editable/DataCell/Switch.d.ts +1 -1
  28. package/es/comps/Editable/DataCell/TreeSelect.d.ts +1 -1
  29. package/es/comps/Editable/comps/EditableAction.d.ts +2 -1
  30. package/es/comps/Editable/comps/Texty.d.ts +1 -1
  31. package/es/comps/Editable/comps/Texty.js +5 -4
  32. package/es/comps/Editable/comps/Texty.less +43 -43
  33. package/es/comps/Editable/comps/index.less +38 -38
  34. package/es/comps/Editable/index.d.ts +2 -1
  35. package/es/comps/Editable/index.less +97 -97
  36. package/es/comps/Editable/utils.d.ts +2 -1
  37. package/es/comps/FileView/index.d.ts +2 -1
  38. package/es/comps/FileView/index.js +2 -3
  39. package/es/comps/FormGenerator/comps/Canvas/Preview.d.ts +2 -1
  40. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Checkbox.d.ts +2 -1
  41. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Color.d.ts +1 -1
  42. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Date.d.ts +1 -1
  43. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Input.d.ts +1 -1
  44. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/List.d.ts +2 -1
  45. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/MutiSelect.d.ts +2 -1
  46. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Number.d.ts +1 -1
  47. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/NumberRange.d.ts +1 -1
  48. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Obj.d.ts +2 -1
  49. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Password.d.ts +1 -1
  50. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Radio.d.ts +2 -1
  51. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Select.d.ts +2 -1
  52. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Switch.d.ts +1 -1
  53. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Table.d.ts +2 -1
  54. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/TextArea.d.ts +1 -1
  55. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Upload.d.ts +1 -1
  56. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/HOC/index.d.ts +2 -1
  57. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/index.d.ts +2 -1
  58. package/es/comps/FormGenerator/comps/Canvas/core/index.d.ts +1 -1
  59. package/es/comps/FormGenerator/comps/Canvas/core/index.less +23 -23
  60. package/es/comps/FormGenerator/comps/Canvas/index.d.ts +2 -1
  61. package/es/comps/FormGenerator/comps/Settings/index.d.ts +2 -1
  62. package/es/comps/FormGenerator/comps/Settings/index.js +1 -2
  63. package/es/comps/FormGenerator/comps/Sidebar/Elements.d.ts +1 -1
  64. package/es/comps/FormGenerator/comps/Sidebar/JsonSchema.d.ts +1 -1
  65. package/es/comps/FormGenerator/comps/Sidebar/index.d.ts +2 -1
  66. package/es/comps/FormGenerator/comps/Sidebar/index.less +21 -21
  67. package/es/comps/FormGenerator/index.d.ts +2 -1
  68. package/es/comps/FormGenerator/index.less +20 -20
  69. package/es/comps/JsonEdit/index.d.ts +2 -1
  70. package/es/comps/JsonEdit/index.js +0 -1
  71. package/es/comps/JsonEdit/index.less +64 -64
  72. package/es/comps/JsonView/index.d.ts +2 -1
  73. package/es/comps/MdEdit/index.d.ts +2 -1
  74. package/es/comps/MdEditPro/index.d.ts +2 -1
  75. package/es/comps/MdEditPro/index.less +166 -166
  76. package/es/comps/MdEditPro/index2.d.ts +1 -1
  77. package/es/comps/MdNavbar/index.d.ts +2 -1
  78. package/es/comps/MdNavbar/index.less +77 -77
  79. package/es/comps/MdView/index.d.ts +1 -1
  80. package/es/comps/MdView/index.less +376 -376
  81. package/es/comps/MetadataEdit/components/MetaFieldsEdit.d.ts +2 -1
  82. package/es/comps/MetadataEdit/components/MetaPropsEdit.d.ts +2 -1
  83. package/es/comps/MetadataEdit/constant/index.js +0 -2
  84. package/es/comps/MetadataEdit/index.d.ts +2 -1
  85. package/es/comps/MetadataForm/DataCell/Array.d.ts +1 -1
  86. package/es/comps/MetadataForm/DataCell/Input.d.ts +1 -1
  87. package/es/comps/MetadataForm/DataCell/Input.js +15 -4
  88. package/es/comps/MetadataForm/DataCell/Number.d.ts +1 -1
  89. package/es/comps/MetadataForm/DataCell/Ref.d.ts +1 -1
  90. package/es/comps/MetadataForm/DataCell/Select.d.ts +1 -1
  91. package/es/comps/MetadataForm/DataCell/Select.js +6 -4
  92. package/es/comps/MetadataForm/DataCell/Switch.d.ts +1 -1
  93. package/es/comps/MetadataForm/DataCell/layout/TableArray.d.ts +2 -1
  94. package/es/comps/MetadataForm/DataCell/plugin/IconButton.d.ts +8 -0
  95. package/es/comps/MetadataForm/DataCell/plugin/IconButton.js +16 -0
  96. package/es/comps/MetadataForm/DataCell/plugin/MapTable.d.ts +12 -0
  97. package/es/comps/MetadataForm/DataCell/plugin/MapTable.js +116 -0
  98. package/es/comps/MetadataForm/DataCell/plugin/NumberRange.d.ts +2 -1
  99. package/es/comps/MetadataForm/DataCell/plugin/NumberRange.js +1 -2
  100. package/es/comps/MetadataForm/DataCell/plugin/RefreshSelect.d.ts +2 -1
  101. package/es/comps/MetadataForm/DataCell/plugin/RefreshSelect.js +3 -2
  102. package/es/comps/MetadataForm/DataCell/plugin/SparkSqlTable.d.ts +11 -0
  103. package/es/comps/MetadataForm/DataCell/plugin/SparkSqlTable.js +249 -0
  104. package/es/comps/MetadataForm/HOC/index.d.ts +2 -1
  105. package/es/comps/MetadataForm/index.d.ts +2 -1
  106. package/es/comps/MetadataForm/index.less +26 -26
  107. package/es/comps/MetadataForm/utils.d.ts +3 -2
  108. package/es/comps/Split/index.d.ts +1 -1
  109. package/es/comps/Split/index.less +29 -29
  110. package/es/framework/RxStore/demo/index.d.ts +2 -1
  111. package/es/framework/graph/index.less +15 -15
  112. package/es/framework/http/msgpack5/lib/helpers.js +0 -1
  113. package/es/framework/libs/iconfont/iconfont.css +323 -323
  114. package/es/framework/libs/iconfont/iconfont.json +548 -548
  115. package/es/framework/libs/jquery.min.js +4 -4
  116. package/es/framework/locale/dil8/di18n.js +5 -3
  117. package/es/framework/metadata/MetadataService.js +14 -14
  118. package/es/framework/metadata/index.js +14 -15
  119. package/es/framework/metadata/types.d.ts +103 -103
  120. package/es/theme.less +81 -81
  121. 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;
@@ -562,7 +562,7 @@ function Index(props) {
562
562
  style: (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.color) ? {
563
563
  color: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.color
564
564
  } : {}
565
- }, 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),
566
566
  labelCol: labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? {
567
567
  flex: "0 0 ".concat(labelSpan * 100 / 24, "%"),
568
568
  offset: 0
@@ -580,7 +580,8 @@ function Index(props) {
580
580
  message: "".concat(tr('请输入'), " ").concat(tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
581
581
  }],
582
582
  help: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help),
583
- 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)
584
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));
585
586
  }
586
587
  return !field ? /*#__PURE__*/React.createElement(_Form.Item, {
@@ -593,7 +594,7 @@ function Index(props) {
593
594
  style: (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.color) ? {
594
595
  color: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.color
595
596
  } : {}
596
- }, 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, " "),
597
598
  labelCol: labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? {
598
599
  flex: "0 0 ".concat(labelSpan * 100 / 24, "%"),
599
600
  offset: 0
@@ -611,7 +612,8 @@ function Index(props) {
611
612
  message: "".concat(tr('请输入'), " ").concat(tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
612
613
  }],
613
614
  help: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help),
614
- 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)
615
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, {
616
618
  style: {
617
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,8 @@
1
+ /// <reference types="react" />
2
+ interface IIconButtonProps {
3
+ icon: React.ReactNode;
4
+ text: string;
5
+ onClick: () => void;
6
+ }
7
+ declare const IconButton: (props: IIconButtonProps) => import("react").JSX.Element;
8
+ export default IconButton;
@@ -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
- var _objectSpread2;
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);
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  interface IRefreshSelectProps {
2
3
  extraInfo?: any;
3
4
  disabled?: boolean;
@@ -8,5 +9,5 @@ interface IRefreshSelectProps {
8
9
  onSelect?: (value: any) => void;
9
10
  onRefresh?: () => void;
10
11
  }
11
- declare const RefreshSelect: (props: IRefreshSelectProps) => JSX.Element;
12
+ declare const RefreshSelect: (props: IRefreshSelectProps) => React.JSX.Element;
12
13
  export default RefreshSelect;
@@ -5,13 +5,13 @@ import _Select from "antd/es/select";
5
5
  /*
6
6
  * @Author: wangxian
7
7
  * @Date: 2023-05-30 13:36:05
8
- * @LastEditTime: 2024-07-24 15:44:03
8
+ * @LastEditTime: 2024-07-25 08:35:21
9
9
  */
10
10
  import { tr } from '../../../../framework/locale';
11
11
  import React from 'react';
12
12
  import { SyncOutlined } from '@ant-design/icons';
13
13
  var RefreshSelect = function RefreshSelect(props) {
14
- var _extraInfo$disabled;
14
+ var _extraInfo$disabled, _extraInfo$disabled2;
15
15
  var extraInfo = props.extraInfo,
16
16
  value = props.value,
17
17
  options = props.options,
@@ -56,6 +56,7 @@ var RefreshSelect = function RefreshSelect(props) {
56
56
  width: '32px'
57
57
  }
58
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,
59
60
  type: "link",
60
61
  icon: /*#__PURE__*/React.createElement(SyncOutlined, null),
61
62
  onClick: onRefresh
@@ -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;