@teamix/pro 1.1.4 → 1.1.8

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 (142) hide show
  1. package/README.md +97 -0
  2. package/dist/212.js +2 -2
  3. package/dist/pro.css +1 -1
  4. package/dist/pro.js +3147 -1872
  5. package/dist/pro.min.css +1 -1
  6. package/dist/pro.min.js +1 -1
  7. package/dist/pro.min.js.LICENSE.txt +1 -1
  8. package/es/actions/dialog-form.d.ts +3 -3
  9. package/es/actions/dialog-table.d.ts +6 -1
  10. package/es/actions/dialog-table.js +10 -1
  11. package/es/actions/drawer-table.d.ts +4 -0
  12. package/es/actions/drawer-table.js +7 -1
  13. package/es/actions/index.d.ts +6 -11
  14. package/es/actions/index.js +41 -21
  15. package/es/actions/index.scss +1 -1
  16. package/es/card/index.d.ts +17 -0
  17. package/es/form/Components/ProField/index.d.ts +8 -0
  18. package/es/form/ProForm/index.d.ts +2 -2
  19. package/es/form/ProForm/index.js +9 -2
  20. package/es/form/ProForm/index.scss +40 -7
  21. package/es/form/SchemaForm/adapterType.js +3 -3
  22. package/es/form/SchemaForm/index.d.ts +2 -2
  23. package/es/form/SchemaForm/index.js +9 -5
  24. package/es/form/SchemaForm/initializeArrayCards.js +10 -55
  25. package/es/form/SchemaForm/initializeArrayCollapse.js +10 -64
  26. package/es/form/SchemaForm/initializeArrayIcon.js +19 -7
  27. package/es/form/SchemaForm/initializeArrayItems.js +16 -75
  28. package/es/form/SchemaForm/initializeArrayTable.js +23 -33
  29. package/es/form/SchemaForm/initializeFormButton.js +35 -38
  30. package/es/form/SchemaForm/initializeFormGroup.d.ts +2 -2
  31. package/es/form/SchemaForm/initializeFormStep.d.ts +4 -2
  32. package/es/form/SchemaForm/initializeFormStep.js +21 -7
  33. package/es/form/SchemaForm/initializeFormTab.d.ts +2 -2
  34. package/es/form/SchemaForm/initializeProField.js +3 -3
  35. package/es/form/SchemaForm/reactions.d.ts +1 -1
  36. package/es/form/SchemaForm/reactions.js +2 -2
  37. package/es/form/index.d.ts +17 -9
  38. package/es/form/index.js +21 -9
  39. package/es/form/typing.d.ts +13 -22
  40. package/es/form/warning.js +2 -6
  41. package/es/index.d.ts +4 -3
  42. package/es/index.js +4 -3
  43. package/es/info/components/FormItem/index.js +4 -4
  44. package/es/info/components/FormItem/index.scss +11 -0
  45. package/es/info/components/InfoGroup/index.js +37 -6
  46. package/es/info/components/InfoGroup/index.scss +6 -0
  47. package/es/info/components/InfoValueItem/index.js +14 -2
  48. package/es/info/components/baseInfo/index.js +10 -9
  49. package/es/info/components/headerInfo/index.js +10 -9
  50. package/es/info/components/tableInfo/index.js +7 -4
  51. package/es/info/components/tableInfo/index.scss +1 -1
  52. package/es/info/index.d.ts +1 -0
  53. package/es/info/index.js +9 -7
  54. package/es/info/index.scss +4 -0
  55. package/es/info/typing.d.ts +17 -3
  56. package/es/info/utils/index.d.ts +11 -2
  57. package/es/info/utils/index.js +21 -0
  58. package/es/nocode/configurators/PageHeader.js +49 -43
  59. package/es/nocode/configurators/ProTable.js +12 -9
  60. package/es/nocode/configurators/common.d.ts +117 -105
  61. package/es/nocode/configurators/common.js +38 -34
  62. package/es/nocode/index.scss +1 -4
  63. package/es/page-header/index.d.ts +3 -0
  64. package/es/page-header/index.js +40 -13
  65. package/es/page-header/index.scss +6 -4
  66. package/es/table/components/Filter/index.js +8 -16
  67. package/es/table/components/Layout/index.js +2 -1
  68. package/es/table/components/Layout/index.scss +1 -1
  69. package/es/table/components/ToolBar/FilterColumnIcon.js +77 -17
  70. package/es/table/components/ToolBar/index.scss +10 -0
  71. package/es/table/index.d.ts +0 -1
  72. package/es/table/index.js +75 -56
  73. package/es/table/index.scss +0 -1
  74. package/es/table/typing.d.ts +3 -1
  75. package/lib/actions/dialog-form.d.ts +3 -3
  76. package/lib/actions/dialog-table.d.ts +6 -1
  77. package/lib/actions/dialog-table.js +20 -1
  78. package/lib/actions/drawer-table.d.ts +4 -0
  79. package/lib/actions/drawer-table.js +14 -1
  80. package/lib/actions/index.d.ts +6 -11
  81. package/lib/actions/index.js +44 -20
  82. package/lib/actions/index.scss +1 -1
  83. package/lib/card/index.d.ts +17 -0
  84. package/lib/form/Components/ProField/index.d.ts +8 -0
  85. package/lib/form/ProForm/index.d.ts +2 -2
  86. package/lib/form/ProForm/index.js +10 -2
  87. package/lib/form/ProForm/index.scss +40 -7
  88. package/lib/form/SchemaForm/adapterType.js +3 -3
  89. package/lib/form/SchemaForm/index.d.ts +2 -2
  90. package/lib/form/SchemaForm/index.js +10 -5
  91. package/lib/form/SchemaForm/initializeArrayCards.js +10 -54
  92. package/lib/form/SchemaForm/initializeArrayCollapse.js +10 -63
  93. package/lib/form/SchemaForm/initializeArrayIcon.js +19 -7
  94. package/lib/form/SchemaForm/initializeArrayItems.js +16 -74
  95. package/lib/form/SchemaForm/initializeArrayTable.js +23 -33
  96. package/lib/form/SchemaForm/initializeFormButton.js +35 -38
  97. package/lib/form/SchemaForm/initializeFormGroup.d.ts +2 -2
  98. package/lib/form/SchemaForm/initializeFormStep.d.ts +4 -2
  99. package/lib/form/SchemaForm/initializeFormStep.js +21 -7
  100. package/lib/form/SchemaForm/initializeFormTab.d.ts +2 -2
  101. package/lib/form/SchemaForm/initializeProField.js +3 -3
  102. package/lib/form/SchemaForm/reactions.d.ts +1 -1
  103. package/lib/form/SchemaForm/reactions.js +2 -2
  104. package/lib/form/index.d.ts +17 -9
  105. package/lib/form/index.js +81 -56
  106. package/lib/form/typing.d.ts +13 -22
  107. package/lib/form/warning.js +2 -6
  108. package/lib/index.d.ts +4 -3
  109. package/lib/index.js +16 -4
  110. package/lib/info/components/FormItem/index.js +4 -4
  111. package/lib/info/components/FormItem/index.scss +11 -0
  112. package/lib/info/components/InfoGroup/index.js +46 -6
  113. package/lib/info/components/InfoGroup/index.scss +6 -0
  114. package/lib/info/components/InfoValueItem/index.js +15 -3
  115. package/lib/info/components/baseInfo/index.js +10 -9
  116. package/lib/info/components/headerInfo/index.js +11 -10
  117. package/lib/info/components/tableInfo/index.js +7 -3
  118. package/lib/info/components/tableInfo/index.scss +1 -1
  119. package/lib/info/index.d.ts +1 -0
  120. package/lib/info/index.js +8 -6
  121. package/lib/info/index.scss +4 -0
  122. package/lib/info/typing.d.ts +17 -3
  123. package/lib/info/utils/index.d.ts +11 -2
  124. package/lib/info/utils/index.js +31 -0
  125. package/lib/nocode/configurators/PageHeader.js +49 -43
  126. package/lib/nocode/configurators/ProTable.js +12 -9
  127. package/lib/nocode/configurators/common.d.ts +117 -105
  128. package/lib/nocode/configurators/common.js +38 -34
  129. package/lib/nocode/index.scss +1 -4
  130. package/lib/page-header/index.d.ts +3 -0
  131. package/lib/page-header/index.js +42 -13
  132. package/lib/page-header/index.scss +6 -4
  133. package/lib/table/components/Filter/index.js +7 -15
  134. package/lib/table/components/Layout/index.js +2 -1
  135. package/lib/table/components/Layout/index.scss +1 -1
  136. package/lib/table/components/ToolBar/FilterColumnIcon.js +75 -16
  137. package/lib/table/components/ToolBar/index.scss +10 -0
  138. package/lib/table/index.d.ts +0 -1
  139. package/lib/table/index.js +76 -65
  140. package/lib/table/index.scss +0 -1
  141. package/lib/table/typing.d.ts +3 -1
  142. package/package.json +5 -5
@@ -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
 
@@ -4,8 +4,11 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _excluded = ["component", "props"],
8
- _excluded2 = ["props", "component"];
7
+ var _excluded = ["sticky"];
8
+
9
+ 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; }
10
+
11
+ 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; }
9
12
 
10
13
  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
14
 
@@ -13,10 +16,6 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
13
16
 
14
17
  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
18
 
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; }
17
-
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; }
19
-
20
19
  var buttonTextMap = {
21
20
  Submit: '提交',
22
21
  Reset: '重置'
@@ -24,58 +23,56 @@ var buttonTextMap = {
24
23
 
25
24
  var initializeButton = function initializeButton(item) {
26
25
  var component = item.component,
27
- props = item.props,
28
- otherProps = _objectWithoutProperties(item, _excluded);
29
-
30
- return _objectSpread({
26
+ _item$props = item.props,
27
+ props = _item$props === void 0 ? {} : _item$props;
28
+ return _objectSpread(_objectSpread({}, item), {}, {
31
29
  component: component,
32
30
  props: _objectSpread({
33
31
  children: buttonTextMap[component]
34
32
  }, props)
35
- }, otherProps);
33
+ });
36
34
  };
37
35
 
38
36
  var initialize = function initialize(item) {
39
- var _item$props = item.props,
40
- props = _item$props === void 0 ? {} : _item$props,
41
- component = item.component,
42
- otherProps = _objectWithoutProperties(item, _excluded2);
37
+ var component = item.component,
38
+ _item$props2 = item.props,
39
+ props = _item$props2 === void 0 ? {} : _item$props2,
40
+ _item$decoratorProps = item.decoratorProps,
41
+ decoratorProps = _item$decoratorProps === void 0 ? {} : _item$decoratorProps;
43
42
 
44
43
  var sticky = props.sticky,
45
- align = props.align,
46
- gutter = props.gutter;
47
- var alignProps = align ? {
48
- align: align
49
- } : {};
50
- var gutterProps = gutter ? {
51
- gutter: gutter
52
- } : {};
44
+ otherProps = _objectWithoutProperties(props, _excluded); // 单个按钮
45
+
53
46
 
54
47
  if (component && ['Submit', 'Reset'].includes(component)) {
55
48
  return initializeButton(item);
56
49
  }
57
50
 
58
- var decoratorTemp = {
59
- title: ' ',
51
+ var commonMode = _objectSpread(_objectSpread({
52
+ title: ' '
53
+ }, item), {}, {
54
+ component: component,
55
+ props: otherProps,
60
56
  decorator: 'FormButtonGroup.FormItem',
61
- decoratorProps: {
57
+ decoratorProps: _objectSpread({
62
58
  inset: false
63
- },
64
- props: _objectSpread(_objectSpread({}, alignProps), gutterProps)
65
- };
59
+ }, decoratorProps)
60
+ }); // 吸底模式
61
+
66
62
 
67
63
  if (sticky) {
68
- decoratorTemp = {
69
- title: '',
70
- decorator: 'FormButtonGroup.Sticky',
71
- decoratorProps: _objectSpread({}, alignProps),
72
- props: _objectSpread({}, gutterProps)
64
+ return {
65
+ component: 'Affix',
66
+ props: {
67
+ offsetBottom: 0,
68
+ className: 'teamix-pro-form-button-affix'
69
+ },
70
+ children: [commonMode]
73
71
  };
74
- }
72
+ } // 普通模式
73
+
75
74
 
76
- return _objectSpread(_objectSpread({
77
- component: component
78
- }, decoratorTemp), otherProps);
75
+ return commonMode;
79
76
  };
80
77
 
81
78
  var _default = initialize;
@@ -1,3 +1,3 @@
1
- import type { ISchemaProItem } from '../typing';
2
- declare const initialize: (item: ISchemaProItem) => ISchemaProItem;
1
+ import type { IFormSchemaItem } from '../typing';
2
+ declare const initialize: (item: IFormSchemaItem) => IFormSchemaItem;
3
3
  export default initialize;
@@ -1,3 +1,5 @@
1
- import type { ISchemaProItem } from '../typing';
2
- declare const initialize: (item: ISchemaProItem) => ISchemaProItem;
1
+ import type { IFormSchemaItem } from '../typing';
2
+ declare const initialize: (item: IFormSchemaItem & {
3
+ col?: number;
4
+ }) => IFormSchemaItem;
3
5
  export default initialize;
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  var _excluded = ["props", "children", "title"],
8
- _excluded2 = ["props", "children"];
8
+ _excluded2 = ["col", "style"];
9
9
 
10
10
  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
11
 
@@ -17,6 +17,13 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
17
17
 
18
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; }
19
19
 
20
+ var getWidth = function getWidth(col, length) {
21
+ var newCol = col !== null && col !== void 0 ? col : (length + 1) * 4;
22
+ newCol = newCol > 24 ? 24 : newCol;
23
+ var width = 100 / 24 * newCol;
24
+ return "".concat(width, "%");
25
+ };
26
+
20
27
  var initializeStepPane = function initializeStepPane(item) {
21
28
  var _item$props = item.props,
22
29
  props = _item$props === void 0 ? {} : _item$props,
@@ -38,17 +45,24 @@ var initialize = function initialize(item) {
38
45
  var _item$props2 = item.props,
39
46
  props = _item$props2 === void 0 ? {} : _item$props2,
40
47
  _item$children2 = item.children,
41
- children = _item$children2 === void 0 ? [] : _item$children2,
42
- otherProps = _objectWithoutProperties(item, _excluded2);
48
+ children = _item$children2 === void 0 ? [] : _item$children2;
43
49
 
44
- return _objectSpread({
50
+ var col = props.col,
51
+ style = props.style,
52
+ otherProps = _objectWithoutProperties(props, _excluded2);
53
+
54
+ var width = getWidth(col, children.length);
55
+ return _objectSpread(_objectSpread({}, item), {}, {
45
56
  props: _objectSpread({
46
- labelPlacement: 'hoz'
47
- }, props),
57
+ labelPlacement: 'hoz',
58
+ style: _objectSpread({
59
+ width: width
60
+ }, style)
61
+ }, otherProps),
48
62
  children: children.map(function (item) {
49
63
  return initializeStepPane(item);
50
64
  })
51
- }, otherProps);
65
+ });
52
66
  };
53
67
 
54
68
  var _default = initialize;
@@ -1,3 +1,3 @@
1
- import type { ISchemaProItem } from '../typing';
2
- declare const initialize: (item: ISchemaProItem) => ISchemaProItem;
1
+ import type { IFormSchemaItem } from '../typing';
2
+ declare const initialize: (item: IFormSchemaItem) => IFormSchemaItem;
3
3
  export default initialize;
@@ -40,7 +40,7 @@ var proFieldTypeMap = {
40
40
  YearPicker: 'dateYear',
41
41
  QuarterPicker: 'dateQuarter',
42
42
  DateRangePicker: 'dateRange',
43
- // TimeRangePicker: 'timeRange',
43
+ TimeRangePicker: 'timeRange',
44
44
  DateTimeRangePicker: 'dateTimeRange',
45
45
  WeekRangePicker: 'dateWeekRange',
46
46
  MonthRangePicker: 'dateMonthRange',
@@ -49,10 +49,10 @@ var proFieldTypeMap = {
49
49
  Transfer: 'transfer',
50
50
  ColorPicker: 'color',
51
51
  ColorRadio: 'colorRadio',
52
- ColorSwatches: 'colorSwatches',
53
- ColorTwitter: 'colorTwitter',
54
52
  IconPicker: 'icon',
55
53
  JsonInput: 'json',
54
+ TagPicker: 'tagFilter',
55
+ Range: 'range',
56
56
  Search: 'search' // Upload: 'upload',
57
57
 
58
58
  };
@@ -1,4 +1,4 @@
1
- import type { IRequestConfig } from '../';
1
+ import type { IRequestConfig } from '../typing';
2
2
  declare const useRequest: (requestConfig: IRequestConfig) => (field: any) => Promise<any>;
3
3
  declare const useAsyncDataSource: (services: any) => (field: any) => void;
4
4
  export { useRequest, useAsyncDataSource };
@@ -15,7 +15,7 @@ var useRequest = function useRequest(requestConfig) {
15
15
  params = requestConfig.params,
16
16
  data = requestConfig.data,
17
17
  when = requestConfig.when,
18
- formatter = requestConfig.formatter,
18
+ formatResult = requestConfig.formatResult,
19
19
  onSuccess = requestConfig.onSuccess,
20
20
  onError = requestConfig.onError;
21
21
  var whenResult = (0, _utils.isFn)(when) ? when(field) : {};
@@ -35,7 +35,7 @@ var useRequest = function useRequest(requestConfig) {
35
35
  data: newData !== null && newData !== void 0 ? newData : data
36
36
  }).then(function (data) {
37
37
  // 默认按request返回res.data.data处理
38
- var dataSource = formatter ? formatter(data, {
38
+ var dataSource = formatResult ? formatResult(data, {
39
39
  paramMap: _utils.paramMap,
40
40
  listToTree: _utils.listToTree
41
41
  }) : data;
@@ -1,20 +1,28 @@
1
1
  /**
2
- * 导出全部 @teamix/formily 方法,支持完全自主定义表单
2
+ * 导出ProForm的TS
3
+ */
4
+ export * from './typing';
5
+ /**
6
+ * 使用别名导出formily相关内容
3
7
  */
4
8
  export * as formilyCore from '@formily/core';
5
9
  export * as formilyReact from '@formily/react';
6
- export * from '@teamix/formily';
7
- export * from './Filter';
8
- export * from './typing';
10
+ export * as formilyReactive from '@formily/reactive';
11
+ export * as formilyTeamix from '@teamix/formily';
9
12
  /**
10
- * 导出常用方法等
13
+ * 导出常用formily内容,需谨慎限制
11
14
  */
12
15
  import { createForm, registerValidateRules as registerRules, registerValidateFormats as registerFormats, registerValidateLocale, setValidateLanguage } from '@formily/core';
13
- import { createSchemaField, Field, FormConsumer } from '@formily/react';
14
- import { toJS } from '@formily/reactive';
15
- export { createForm, registerRules, registerFormats, registerValidateLocale, setValidateLanguage, Field, createSchemaField, FormConsumer, toJS, };
16
+ import { FormConsumer } from '@formily/react';
17
+ import { FormDialog, FormDrawer, FormStep, FormTab, FormCollapse } from '@teamix/formily';
18
+ export { createForm, FormConsumer, FormDialog, FormDrawer, FormStep, FormTab, FormCollapse, registerRules, registerFormats, registerValidateLocale, setValidateLanguage, };
19
+ /**
20
+ * 导出 Filter 组件
21
+ */
22
+ import { AdvancedFilter, SimpleFilter, QueryFilter } from './Filter';
23
+ export { AdvancedFilter, SimpleFilter, QueryFilter };
16
24
  /**
17
- * 导出封装的 ProForm 组件,支持快速搭建表单
25
+ * 导出 ProForm 组件,支持快速搭建表单
18
26
  */
19
27
  import ProForm from './ProForm';
20
28
  export default ProForm;