@teamix/pro 1.1.6 → 1.1.7

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 (59) hide show
  1. package/README.md +97 -0
  2. package/dist/pro.css +1 -1
  3. package/dist/pro.js +288 -385
  4. package/dist/pro.min.css +1 -1
  5. package/dist/pro.min.js +1 -1
  6. package/dist/pro.min.js.LICENSE.txt +1 -1
  7. package/es/form/ProForm/index.scss +7 -1
  8. package/es/form/SchemaForm/index.js +3 -2
  9. package/es/form/SchemaForm/initializeArrayCards.js +10 -55
  10. package/es/form/SchemaForm/initializeArrayCollapse.js +10 -64
  11. package/es/form/SchemaForm/initializeArrayIcon.js +13 -6
  12. package/es/form/SchemaForm/initializeArrayItems.js +16 -75
  13. package/es/form/SchemaForm/initializeArrayTable.js +23 -33
  14. package/es/form/typing.d.ts +2 -5
  15. package/es/index.d.ts +1 -1
  16. package/es/index.js +1 -1
  17. package/es/info/components/FormItem/index.js +4 -4
  18. package/es/info/components/FormItem/index.scss +11 -0
  19. package/es/info/components/InfoValueItem/index.js +12 -1
  20. package/es/info/components/baseInfo/index.js +3 -4
  21. package/es/info/components/headerInfo/index.js +3 -4
  22. package/es/info/components/tableInfo/index.js +4 -3
  23. package/es/info/components/tableInfo/index.scss +1 -1
  24. package/es/info/index.scss +4 -0
  25. package/es/info/typing.d.ts +1 -1
  26. package/es/info/utils/index.d.ts +8 -1
  27. package/es/info/utils/index.js +18 -1
  28. package/es/nocode/configurators/PageHeader.js +49 -43
  29. package/es/nocode/configurators/ProTable.js +12 -9
  30. package/es/nocode/configurators/common.d.ts +117 -105
  31. package/es/nocode/configurators/common.js +38 -34
  32. package/es/table/components/Filter/index.js +8 -16
  33. package/lib/form/ProForm/index.scss +7 -1
  34. package/lib/form/SchemaForm/index.js +3 -2
  35. package/lib/form/SchemaForm/initializeArrayCards.js +10 -54
  36. package/lib/form/SchemaForm/initializeArrayCollapse.js +10 -63
  37. package/lib/form/SchemaForm/initializeArrayIcon.js +13 -6
  38. package/lib/form/SchemaForm/initializeArrayItems.js +16 -74
  39. package/lib/form/SchemaForm/initializeArrayTable.js +23 -33
  40. package/lib/form/typing.d.ts +2 -5
  41. package/lib/index.d.ts +1 -1
  42. package/lib/index.js +1 -1
  43. package/lib/info/components/FormItem/index.js +4 -4
  44. package/lib/info/components/FormItem/index.scss +11 -0
  45. package/lib/info/components/InfoValueItem/index.js +12 -1
  46. package/lib/info/components/baseInfo/index.js +4 -6
  47. package/lib/info/components/headerInfo/index.js +6 -8
  48. package/lib/info/components/tableInfo/index.js +4 -2
  49. package/lib/info/components/tableInfo/index.scss +1 -1
  50. package/lib/info/index.scss +4 -0
  51. package/lib/info/typing.d.ts +1 -1
  52. package/lib/info/utils/index.d.ts +8 -1
  53. package/lib/info/utils/index.js +21 -1
  54. package/lib/nocode/configurators/PageHeader.js +49 -43
  55. package/lib/nocode/configurators/ProTable.js +12 -9
  56. package/lib/nocode/configurators/common.d.ts +117 -105
  57. package/lib/nocode/configurators/common.js +38 -34
  58. package/lib/table/components/Filter/index.js +7 -15
  59. package/package.json +2 -2
@@ -4,12 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _excluded = ["props", "children", "items"],
8
- _excluded2 = ["itemType"];
9
-
10
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
11
-
12
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
13
7
 
14
8
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
15
9
 
@@ -17,58 +11,20 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
17
11
 
18
12
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
19
13
 
20
- var initializeChildren = function initializeChildren(item) {
21
- return item;
22
- };
23
-
24
- var initializeAddition = function initializeAddition(item) {
25
- return _objectSpread(_objectSpread({}, item), {}, {
26
- component: 'ArrayCards.Addition'
27
- });
28
- };
29
-
30
- var initializeString = function initializeString(items) {
31
- return [{
32
- name: 'items',
33
- children: items.map(function (item) {
34
- return initializeChildren(item);
35
- })
36
- }];
37
- };
14
+ var initializeItems = function initializeItems(items) {
15
+ if (items) {
16
+ return _objectSpread(_objectSpread({}, items), {}, {
17
+ name: 'items'
18
+ });
19
+ }
38
20
 
39
- var initializeObject = function initializeObject(items) {
40
- return [{
41
- name: 'items',
42
- type: 'object',
43
- children: items.map(function (item) {
44
- return initializeChildren(item);
45
- })
46
- }];
21
+ return items;
47
22
  };
48
23
 
49
24
  var initialize = function initialize(item) {
50
- var _item$props = item.props,
51
- props = _item$props === void 0 ? {} : _item$props,
52
- _item$children = item.children,
53
- children = _item$children === void 0 ? [] : _item$children,
54
- _item$items = item.items,
55
- items = _item$items === void 0 ? [] : _item$items,
56
- other = _objectWithoutProperties(item, _excluded);
57
-
58
- var _props$itemType = props.itemType,
59
- itemType = _props$itemType === void 0 ? 'string' : _props$itemType,
60
- otherProps = _objectWithoutProperties(props, _excluded2);
61
-
62
- var renderItemsMap = {
63
- string: initializeString(items),
64
- object: initializeObject(items)
65
- };
66
- return _objectSpread(_objectSpread({}, other), {}, {
67
- props: otherProps,
68
- children: children.map(function (item) {
69
- return initializeAddition(item);
70
- }),
71
- items: renderItemsMap[itemType]
25
+ var items = item.items;
26
+ return _objectSpread(_objectSpread({}, item), {}, {
27
+ items: items ? initializeItems(items) : {}
72
28
  });
73
29
  };
74
30
 
@@ -4,12 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _excluded = ["props", "children", "items"],
8
- _excluded2 = ["itemType", "title"];
9
-
10
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
11
-
12
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
13
7
 
14
8
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
15
9
 
@@ -17,67 +11,20 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
17
11
 
18
12
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
19
13
 
20
- var initializeChildren = function initializeChildren(item) {
21
- return item;
22
- };
23
-
24
- var initializeAddition = function initializeAddition(item) {
25
- return _objectSpread(_objectSpread({}, item), {}, {
26
- component: 'ArrayCollapse.Addition'
27
- });
28
- };
29
-
30
- var initializeString = function initializeString(items, props) {
31
- return [{
32
- name: 'items',
33
- component: 'ArrayCollapse.CollapsePanel',
34
- props: props,
35
- children: items.map(function (item) {
36
- return initializeChildren(item);
37
- })
38
- }];
39
- };
14
+ var initializeItems = function initializeItems(items) {
15
+ if (items) {
16
+ return _objectSpread(_objectSpread({}, items), {}, {
17
+ name: 'items'
18
+ });
19
+ }
40
20
 
41
- var initializeObject = function initializeObject(items, props) {
42
- return [{
43
- type: 'object',
44
- name: 'items',
45
- component: 'ArrayCollapse.CollapsePanel',
46
- props: props,
47
- children: items.map(function (item) {
48
- return initializeChildren(item);
49
- })
50
- }];
21
+ return items;
51
22
  };
52
23
 
53
24
  var initialize = function initialize(item) {
54
- var _item$props = item.props,
55
- props = _item$props === void 0 ? {} : _item$props,
56
- _item$children = item.children,
57
- children = _item$children === void 0 ? [] : _item$children,
58
- _item$items = item.items,
59
- items = _item$items === void 0 ? [] : _item$items,
60
- other = _objectWithoutProperties(item, _excluded);
61
-
62
- var _props$itemType = props.itemType,
63
- itemType = _props$itemType === void 0 ? 'string' : _props$itemType,
64
- title = props.title,
65
- otherProps = _objectWithoutProperties(props, _excluded2);
66
-
67
- var renderItemsMap = {
68
- string: initializeString(items, {
69
- title: title
70
- }),
71
- object: initializeObject(items, {
72
- title: title
73
- })
74
- };
75
- return _objectSpread(_objectSpread({}, other), {}, {
76
- props: otherProps,
77
- children: children.map(function (item) {
78
- return initializeAddition(item);
79
- }),
80
- items: renderItemsMap[itemType]
25
+ var items = item.items;
26
+ return _objectSpread(_objectSpread({}, item), {}, {
27
+ items: items ? initializeItems(items) : {}
81
28
  });
82
29
  };
83
30
 
@@ -9,7 +9,8 @@ var _react = _interopRequireDefault(require("react"));
9
9
 
10
10
  var _icon = _interopRequireDefault(require("@teamix/icon"));
11
11
 
12
- var _excluded = ["component", "props"];
12
+ var _excluded = ["component", "props"],
13
+ _excluded2 = ["icon"];
13
14
 
14
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
16
 
@@ -25,12 +26,18 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
25
26
 
26
27
  var initialize = function initialize(item) {
27
28
  var component = item.component,
28
- props = item.props,
29
+ _item$props = item.props,
30
+ props = _item$props === void 0 ? {} : _item$props,
29
31
  other = _objectWithoutProperties(item, _excluded);
30
32
 
33
+ var icon = props.icon,
34
+ otherProps = _objectWithoutProperties(props, _excluded2);
35
+
31
36
  var iconType = '';
32
37
 
33
- if (component) {
38
+ if (icon) {
39
+ iconType = icon;
40
+ } else if (component) {
34
41
  if (/Addition/.test(component)) {
35
42
  iconType = 'add-line';
36
43
  } else if (/Remove/.test(component)) {
@@ -48,12 +55,12 @@ var initialize = function initialize(item) {
48
55
  component: component,
49
56
  props: _objectSpread({
50
57
  icon: function icon(props) {
51
- return /*#__PURE__*/_react.default.createElement(_icon.default, _objectSpread({
58
+ return /*#__PURE__*/_react.default.createElement(_icon.default, _objectSpread(_objectSpread({}, props), {}, {
52
59
  type: iconType,
53
60
  size: "small"
54
- }, props));
61
+ }));
55
62
  }
56
- }, props)
63
+ }, otherProps)
57
64
  });
58
65
  };
59
66
 
@@ -4,8 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _excluded = ["decoratorProps"],
8
- _excluded2 = ["props", "children", "items"];
9
7
 
10
8
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
11
9
 
@@ -13,90 +11,34 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
13
11
 
14
12
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
15
13
 
16
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
14
+ var initializeItems = function initializeItems(items) {
15
+ if (items) {
16
+ return _objectSpread(_objectSpread({}, items), {}, {
17
+ name: 'items'
18
+ });
19
+ }
17
20
 
18
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
21
+ return items;
22
+ };
19
23
 
20
24
  var initializeChildren = function initializeChildren(item) {
21
- var decoratorProps = item.decoratorProps,
22
- otherProps = _objectWithoutProperties(item, _excluded);
23
-
24
- return _objectSpread({
25
+ var decoratorProps = item.decoratorProps;
26
+ return _objectSpread(_objectSpread({}, item), decoratorProps ? {
25
27
  decoratorProps: _objectSpread({
26
28
  feedbackLayout: 'none'
27
29
  }, decoratorProps)
28
- }, otherProps);
29
- };
30
-
31
- var initializeAddition = function initializeAddition(item) {
32
- return _objectSpread(_objectSpread({}, item), {}, {
33
- component: 'ArrayItems.Addition'
34
- });
35
- };
36
-
37
- var initializeString = function initializeString(items, props) {
38
- return [{
39
- name: 'items',
40
- component: 'FormFlex',
41
- props: props,
42
- decoratorProps: {
43
- feedbackLayout: 'none'
44
- },
45
- children: items.map(function (item) {
46
- return initializeChildren(item);
47
- })
48
- }];
49
- };
50
-
51
- var initializeObject = function initializeObject(items, props) {
52
- return [{
53
- name: 'items',
54
- type: 'object',
55
- children: [{
56
- component: 'FormFlex',
57
- props: props,
58
- children: items.map(function (item) {
59
- return initializeChildren(item);
60
- })
61
- }]
62
- }];
63
- };
64
-
65
- var initializeItems = function initializeItems(items, decoratorProps) {
66
- return [{
67
- name: 'items',
68
- type: 'object',
69
- decorator: 'ArrayItems.Item',
70
- decoratorProps: decoratorProps,
71
- children: items
72
- }];
30
+ } : {});
73
31
  };
74
32
 
75
33
  var initialize = function initialize(item) {
76
- var _item$props = item.props,
77
- props = _item$props === void 0 ? {} : _item$props,
78
- _item$children = item.children,
34
+ var _item$children = item.children,
79
35
  children = _item$children === void 0 ? [] : _item$children,
80
- _item$items = item.items,
81
- items = _item$items === void 0 ? [] : _item$items,
82
- otherProps = _objectWithoutProperties(item, _excluded2);
83
-
84
- var _props$itemType = props.itemType,
85
- itemType = _props$itemType === void 0 ? 'string' : _props$itemType,
86
- _props$itemTypeProps = props.itemTypeProps,
87
- itemTypeProps = _props$itemTypeProps === void 0 ? {} : _props$itemTypeProps;
88
- var renderItemsMap = {
89
- string: initializeString(items, itemTypeProps),
90
- object: initializeObject(items, itemTypeProps),
91
- card: initializeItems(items, {
92
- type: 'card'
93
- })
94
- };
95
- return _objectSpread(_objectSpread({}, otherProps), {}, {
36
+ items = item.items;
37
+ return _objectSpread(_objectSpread({}, item), {}, {
96
38
  children: children.map(function (item) {
97
- return initializeAddition(item);
39
+ return initializeChildren(item);
98
40
  }),
99
- items: renderItemsMap[itemType]
41
+ items: items ? initializeItems(items) : {}
100
42
  });
101
43
  };
102
44
 
@@ -4,12 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _excluded = ["title", "decoratorProps"],
8
- _excluded2 = ["props", "children", "items"];
9
-
10
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
11
-
12
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
7
+ var _excluded = ["title", "decoratorProps"];
13
8
 
14
9
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
15
10
 
@@ -17,55 +12,50 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
17
12
 
18
13
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
19
14
 
20
- var initializeChildren = function initializeChildren(item) {
21
- return _objectSpread(_objectSpread({}, item), {}, {
22
- component: 'ArrayTable.Addition'
23
- });
24
- };
15
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
16
+
17
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
25
18
 
26
19
  var initializeColumn = function initializeColumn(item) {
27
20
  var title = item.title,
28
21
  decoratorProps = item.decoratorProps,
29
- otherProps = _objectWithoutProperties(item, _excluded);
22
+ children = _objectWithoutProperties(item, _excluded);
30
23
 
31
- return _objectSpread(_objectSpread({}, otherProps), {}, {
24
+ return {
32
25
  component: 'ArrayTable.Column',
33
26
  props: _objectSpread(_objectSpread({}, decoratorProps), {}, {
34
27
  title: title
35
28
  }),
36
- children: [_objectSpread({}, otherProps)]
37
- });
29
+ children: [_objectSpread({}, children)]
30
+ };
38
31
  };
39
32
 
40
33
  var initializeItems = function initializeItems(items) {
41
- return [{
42
- name: 'items',
43
- type: 'object',
44
- children: items.map(function (item) {
45
- return initializeColumn(item);
46
- })
47
- }];
34
+ if (items) {
35
+ var _items$children;
36
+
37
+ return _objectSpread(_objectSpread({}, items), {}, {
38
+ name: 'items',
39
+ children: (_items$children = items.children) === null || _items$children === void 0 ? void 0 : _items$children.map(function (item) {
40
+ return initializeColumn(item);
41
+ })
42
+ });
43
+ }
44
+
45
+ return items;
48
46
  };
49
47
 
50
48
  var initialize = function initialize(item) {
51
49
  var _item$props = item.props,
52
50
  props = _item$props === void 0 ? {} : _item$props,
53
- _item$children = item.children,
54
- children = _item$children === void 0 ? [] : _item$children,
55
- _item$items = item.items,
56
- items = _item$items === void 0 ? [] : _item$items,
57
- otherProps = _objectWithoutProperties(item, _excluded2);
58
-
59
- return _objectSpread(_objectSpread({}, otherProps), {}, {
51
+ items = item.items;
52
+ return _objectSpread(_objectSpread({}, item), {}, {
60
53
  props: _objectSpread({
61
54
  pagination: {
62
55
  pageSize: 10
63
56
  }
64
57
  }, props),
65
- children: children.map(function (item) {
66
- return initializeChildren(item);
67
- }),
68
- items: initializeItems(items)
58
+ items: items ? initializeItems(items) : {}
69
59
  });
70
60
  };
71
61
 
@@ -28,7 +28,7 @@ export interface IFormSchemaItem {
28
28
  dataSource?: any[];
29
29
  reactions?: any;
30
30
  rules?: any;
31
- items?: IFormSchemaItem[];
31
+ items?: IFormSchemaItem;
32
32
  children?: IFormSchemaItem[];
33
33
  content?: any;
34
34
  tooltip?: string;
@@ -44,11 +44,8 @@ export interface IFormSchemaItem {
44
44
  request?: IRequestConfig;
45
45
  }
46
46
  export declare type IFormSchema = IFormSchemaItem[];
47
- export interface IInitialize {
48
- (items: IFormSchemaItem[], props?: any): IFormSchemaItem[];
49
- }
50
47
  export interface IInitializeItem {
51
- (items: IFormSchemaItem, props?: any): IFormSchemaItem;
48
+ (item: IFormSchemaItem, props?: any): IFormSchemaItem;
52
49
  }
53
50
  export interface IFormProps extends IFormLayoutProps {
54
51
  form?: FormType | false;
package/lib/index.d.ts CHANGED
@@ -20,5 +20,5 @@ export * from './page-container';
20
20
  export * from './page-header';
21
21
  export * from './skeleton';
22
22
  export * from './table';
23
- declare const version = "1.1.5";
23
+ declare const version = "1.1.6";
24
24
  export { version, ProAction, ProCard, ProField, ProForm, ProInfo, ProPageContainer, ProPageHeader, ProSkeleton, ProTable, hooks, nocode, templates, utils, };
package/lib/index.js CHANGED
@@ -240,5 +240,5 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
240
240
  // 设置图标源
241
241
  _icon.default.setConfig(_utils.default.getTeamixIconConfig());
242
242
 
243
- var version = '1.1.5';
243
+ var version = '1.1.6';
244
244
  exports.version = version;
@@ -46,9 +46,7 @@ var FormItem = function FormItem(prop) {
46
46
  span: wrapperCol.span,
47
47
  className: cls('value')
48
48
  }, loading && /*#__PURE__*/_react.default.createElement("div", {
49
- style: {
50
- width: '100%'
51
- }
49
+ className: cls('base-skeleton-box')
52
50
  }, /*#__PURE__*/_react.default.createElement(_.BaseSkeleton.Info, null)), !loading && /*#__PURE__*/_react.default.createElement("div", null, value))));
53
51
  }
54
52
 
@@ -68,7 +66,9 @@ var FormItem = function FormItem(prop) {
68
66
  style: {
69
67
  marginLeft: labelGutter
70
68
  }
71
- }, loading && /*#__PURE__*/_react.default.createElement(_.BaseSkeleton.Info, null), !loading && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, value))));
69
+ }, loading && /*#__PURE__*/_react.default.createElement("div", {
70
+ className: cls('base-skeleton-box')
71
+ }, /*#__PURE__*/_react.default.createElement(_.BaseSkeleton.Info, null)), !loading && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, value))));
72
72
  }
73
73
 
74
74
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null);
@@ -31,6 +31,7 @@ $item-padding-bottom: 8px;
31
31
  font-size: $text-size;
32
32
  display: unset;
33
33
  width: 100%;
34
+ padding-right: 20px;
34
35
  }
35
36
 
36
37
  .teamix-pro-field-info-form-item-header-label {
@@ -47,3 +48,13 @@ $item-padding-bottom: 8px;
47
48
  display: inline-block;
48
49
  width: 100%;
49
50
  }
51
+
52
+ .teamix-pro-field-info-form-item-base-skeleton-box {
53
+ width: 100%;
54
+ height: 100%;
55
+ display: flex;
56
+ align-items: center;
57
+ span {
58
+ width: 100%
59
+ }
60
+ }
@@ -79,7 +79,18 @@ var InfoValueItem = function InfoValueItem(props) {
79
79
  _infoItem$successMess = infoItem.successMessage,
80
80
  successMessage = _infoItem$successMess === void 0 ? 'success' : _infoItem$successMess,
81
81
  actions = infoItem.actions,
82
- extra = infoItem.extra; // 浮层的显隐状态
82
+ extra = infoItem.extra; // 由info接管field中的value。重新实现
83
+ // let fieldRender = render;
84
+ // let newValue = value;
85
+ // if (render && typeof render !== 'function') {
86
+ // const { value, ...others } = render;
87
+ // fieldRender = others;
88
+ // if (value) {
89
+ // newValue = getTargetValue(`${value}`, { ...record, record });
90
+ // console.log("newValue", newValue);
91
+ // }
92
+ // }
93
+ // 浮层的显隐状态
83
94
 
84
95
  var _useState = (0, _react.useState)(false),
85
96
  _useState2 = _slicedToArray(_useState, 2),
@@ -21,13 +21,11 @@ var _hooks = require("@teamix/hooks");
21
21
 
22
22
  var _utils = require("../../utils/utils");
23
23
 
24
- var _utils2 = require("@teamix/utils");
25
-
26
24
  var _layout = _interopRequireDefault(require("../../utils/layout"));
27
25
 
28
26
  var _InfoValueItem = _interopRequireDefault(require("../InfoValueItem"));
29
27
 
30
- var _utils3 = require("../../utils");
28
+ var _utils2 = require("../../utils");
31
29
 
32
30
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
33
31
 
@@ -53,7 +51,7 @@ var ProBaseInfo = function ProBaseInfo(props) {
53
51
  loading = props.loading,
54
52
  result = props.result,
55
53
  actionRef = props.actionRef;
56
- var context = (0, _react.useContext)(_utils3.ProInfoGroupContext);
54
+ var context = (0, _react.useContext)(_utils2.ProInfoGroupContext);
57
55
  var ref = (0, _react.useRef)();
58
56
  var size = context.visible ? context.size : (0, _hooks.useSize)(ref);
59
57
 
@@ -61,7 +59,7 @@ var ProBaseInfo = function ProBaseInfo(props) {
61
59
 
62
60
  var renderContent = function renderContent() {
63
61
  return columns.map(function (item, index) {
64
- var _item$title, _item$valueType, _item$dataIndex;
62
+ var _item$title, _item$valueType;
65
63
 
66
64
  var span = item.colSpan ? defaultLayout.span * item.colSpan : defaultLayout.span;
67
65
  return /*#__PURE__*/_react.default.createElement(Col, {
@@ -72,7 +70,7 @@ var ProBaseInfo = function ProBaseInfo(props) {
72
70
  loading: loading,
73
71
  value: /*#__PURE__*/_react.default.createElement(_InfoValueItem.default, {
74
72
  type: (_item$valueType = item === null || item === void 0 ? void 0 : item.valueType) !== null && _item$valueType !== void 0 ? _item$valueType : 'text',
75
- value: (0, _utils2.getTargetValue)("{{".concat((_item$dataIndex = item === null || item === void 0 ? void 0 : item.dataIndex) !== null && _item$dataIndex !== void 0 ? _item$dataIndex : '', "}}"), dataSource !== null && dataSource !== void 0 ? dataSource : result),
73
+ value: (0, _utils2.getDataIndexValue)(item.dataIndex, dataSource !== null && dataSource !== void 0 ? dataSource : result),
76
74
  render: item.render,
77
75
  dataSource: item.dataSource,
78
76
  infoItem: item,
@@ -11,8 +11,6 @@ var _components = require("@alicloudfe/components");
11
11
 
12
12
  var _card = _interopRequireDefault(require("../../../card"));
13
13
 
14
- var _utils = require("@teamix/utils");
15
-
16
14
  var _react = _interopRequireWildcard(require("react"));
17
15
 
18
16
  var _FormItem = _interopRequireDefault(require("../FormItem"));
@@ -23,11 +21,11 @@ var _layout = _interopRequireDefault(require("../../utils/layout"));
23
21
 
24
22
  var _hooks = require("@teamix/hooks");
25
23
 
26
- var _utils2 = require("../../utils/utils");
24
+ var _utils = require("../../utils/utils");
27
25
 
28
26
  var _InfoValueItem = _interopRequireDefault(require("../InfoValueItem"));
29
27
 
30
- var _utils3 = require("../../utils");
28
+ var _utils2 = require("../../utils");
31
29
 
32
30
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
33
31
 
@@ -54,15 +52,15 @@ var ProHeaderInfo = function ProHeaderInfo(props) {
54
52
  loading = props.loading,
55
53
  result = props.result,
56
54
  actionRef = props.actionRef;
57
- var context = (0, _react.useContext)(_utils3.ProInfoGroupContext);
55
+ var context = (0, _react.useContext)(_utils2.ProInfoGroupContext);
58
56
  var ref = (0, _react.useRef)();
59
57
  var size = context.visible ? context.size : (0, _hooks.useSize)(ref);
60
58
 
61
- var defaultLayout = _layout.default[(0, _utils2.getLayout)((_size$width = size === null || size === void 0 ? void 0 : size.width) !== null && _size$width !== void 0 ? _size$width : 0)];
59
+ var defaultLayout = _layout.default[(0, _utils.getLayout)((_size$width = size === null || size === void 0 ? void 0 : size.width) !== null && _size$width !== void 0 ? _size$width : 0)];
62
60
 
63
61
  var renderContent = function renderContent() {
64
62
  return columns.map(function (item, index) {
65
- var _item$title, _item$valueType, _item$dataIndex;
63
+ var _item$title, _item$valueType;
66
64
 
67
65
  var span = 24;
68
66
 
@@ -84,7 +82,7 @@ var ProHeaderInfo = function ProHeaderInfo(props) {
84
82
  loading: loading,
85
83
  value: /*#__PURE__*/_react.default.createElement(_InfoValueItem.default, {
86
84
  type: (_item$valueType = item === null || item === void 0 ? void 0 : item.valueType) !== null && _item$valueType !== void 0 ? _item$valueType : 'text',
87
- value: (0, _utils.getTargetValue)("{{".concat((_item$dataIndex = item === null || item === void 0 ? void 0 : item.dataIndex) !== null && _item$dataIndex !== void 0 ? _item$dataIndex : '', "}}"), dataSource !== null && dataSource !== void 0 ? dataSource : result),
85
+ value: (0, _utils2.getDataIndexValue)(item.dataIndex, dataSource !== null && dataSource !== void 0 ? dataSource : result),
88
86
  render: item.render,
89
87
  dataSource: item.dataSource,
90
88
  infoItem: item,
@@ -21,6 +21,8 @@ var _InfoValueItem = _interopRequireDefault(require("../InfoValueItem"));
21
21
 
22
22
  var _2 = require("../../..");
23
23
 
24
+ var _utils2 = require("../../utils");
25
+
24
26
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
27
 
26
28
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -109,7 +111,7 @@ var ProTableInfo = function ProTableInfo(props) {
109
111
  }
110
112
 
111
113
  var itemData = filterColumns.map(function (item, index) {
112
- var _item$title, _item$valueType, _item$dataIndex, _data;
114
+ var _item$title, _item$valueType, _data;
113
115
 
114
116
  var data = (_data = {}, _defineProperty(_data, "label_".concat(index), /*#__PURE__*/_react.default.createElement(_utils.LabelIconTip, {
115
117
  label: (_item$title = item === null || item === void 0 ? void 0 : item.title) !== null && _item$title !== void 0 ? _item$title : '',
@@ -117,7 +119,7 @@ var ProTableInfo = function ProTableInfo(props) {
117
119
  icon: item.tooltipIcon
118
120
  })), _defineProperty(_data, "value_".concat(index), /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, loading && /*#__PURE__*/_react.default.createElement(_2.BaseSkeleton.Info, null), !loading && /*#__PURE__*/_react.default.createElement(_InfoValueItem.default, {
119
121
  type: (_item$valueType = item === null || item === void 0 ? void 0 : item.valueType) !== null && _item$valueType !== void 0 ? _item$valueType : 'text',
120
- value: (0, _utils.getTargetValue)("{{".concat((_item$dataIndex = item === null || item === void 0 ? void 0 : item.dataIndex) !== null && _item$dataIndex !== void 0 ? _item$dataIndex : '', "}}"), dataSource !== null && dataSource !== void 0 ? dataSource : result),
122
+ value: (0, _utils2.getDataIndexValue)(item.dataIndex, dataSource !== null && dataSource !== void 0 ? dataSource : result),
121
123
  render: item.render,
122
124
  dataSource: item.dataSource,
123
125
  infoItem: item,