@teamix/pro 1.5.17 → 1.5.18-beta

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 (261) hide show
  1. package/dist/fonts/txddinmedium.woff +0 -0
  2. package/dist/pro.all.min.css +1 -0
  3. package/dist/pro.css +1 -0
  4. package/dist/pro.js +114772 -0
  5. package/dist/pro.min.css +1 -0
  6. package/dist/pro.min.js +2 -0
  7. package/dist/pro.min.js.LICENSE.txt +47 -0
  8. package/dist/pro.xconsole.min.css +1 -0
  9. package/es/actions/dialog-component.js +1 -4
  10. package/es/actions/dialog-form.js +4 -3
  11. package/es/actions/dialog.js +2 -1
  12. package/es/actions/index.js +35 -22
  13. package/es/actions/quick.js +1 -4
  14. package/es/card/card-container.js +12 -5
  15. package/es/card/divider.js +2 -4
  16. package/es/card/index.js +18 -7
  17. package/es/card/selectable.js +2 -4
  18. package/es/card/tab.js +2 -4
  19. package/es/form/Components/Editable/index.js +1 -1
  20. package/es/form/Components/FormGroup/index.js +4 -3
  21. package/es/form/Components/LightFilter/index.js +11 -2
  22. package/es/form/Components/ProField/index.js +2 -4
  23. package/es/form/Components/Text/index.js +2 -4
  24. package/es/form/Filter/AdvancedFilter.js +16 -14
  25. package/es/form/Filter/LightFilter.js +13 -9
  26. package/es/form/Filter/SimpleFilter.js +8 -5
  27. package/es/form/Filter/index.js +24 -7
  28. package/es/form/Filter/index.scss +1 -0
  29. package/es/form/Filter/index2.js +22 -17
  30. package/es/form/Filter/index2.scss +1 -0
  31. package/es/form/Filter/useBindUrl.js +3 -0
  32. package/es/form/Filter/useSpecialProps.js +1 -0
  33. package/es/form/ProForm/index.js +5 -2
  34. package/es/form/ProForm/useAutoLayout.js +4 -0
  35. package/es/form/ProForm/useFormDisplayValues.js +1 -0
  36. package/es/form/SchemaForm/adapterComponent.js +1 -0
  37. package/es/form/SchemaForm/adapterDecorator.js +1 -0
  38. package/es/form/SchemaForm/adapterType.js +1 -0
  39. package/es/form/SchemaForm/index.js +13 -0
  40. package/es/form/SchemaForm/initializeFormButton.js +2 -0
  41. package/es/form/SchemaForm/initializeReactions.js +1 -0
  42. package/es/form/SchemaForm/initializeSelectTable.js +1 -0
  43. package/es/form/SchemaForm/reactions.js +5 -0
  44. package/es/form/index.js +4 -0
  45. package/es/form/utils.js +12 -0
  46. package/es/form/warning.js +2 -0
  47. package/es/index.js +3 -1
  48. package/es/info/components/InfoGroup/index.js +2 -4
  49. package/es/info/components/InfoValueItem/index.js +32 -20
  50. package/es/info/components/ProInfoItem/index.js +1 -0
  51. package/es/info/components/baseInfo/index.js +3 -0
  52. package/es/info/components/tableInfo/index.js +6 -4
  53. package/es/info/index.js +11 -5
  54. package/es/info/utils/index.js +3 -0
  55. package/es/layout/index.js +2 -0
  56. package/es/nocode/index.js +2 -0
  57. package/es/nocode/pages/index.js +3 -0
  58. package/es/nocode/pages/playground.js +3 -5
  59. package/es/nocode/pages/renderer.js +4 -6
  60. package/es/nocode/playground.js +2 -4
  61. package/es/page-header/index.js +12 -7
  62. package/es/sidebar/components/sidebar-container/index.js +10 -7
  63. package/es/sidebar/components/tree/index.js +22 -4
  64. package/es/sidebar/components/tree-node/components/HoverTooltip/index.js +3 -4
  65. package/es/sidebar/components/tree-node/components/IconAction/index.js +4 -2
  66. package/es/sidebar/components/tree-node/components/IconSwitch/index.js +1 -0
  67. package/es/sidebar/components/tree-node/index.js +29 -16
  68. package/es/sidebar/index.js +15 -4
  69. package/es/sidebar/utils/index.js +19 -11
  70. package/es/table/components/CardView/index.js +29 -13
  71. package/es/table/components/Filter/index.js +11 -0
  72. package/es/table/components/Layout/index.js +13 -8
  73. package/es/table/components/LoadMore/index.js +3 -0
  74. package/es/table/components/Pagination/index.js +12 -10
  75. package/es/table/components/QuickAction/index.js +3 -2
  76. package/es/table/components/ToolBar/CardSwitch.js +2 -0
  77. package/es/table/components/ToolBar/DensityIcon.js +7 -2
  78. package/es/table/components/ToolBar/FilterColumnIcon.js +9 -0
  79. package/es/table/components/ToolBar/FullScreenIcon.js +1 -0
  80. package/es/table/components/ToolBar/Fullscreen.js +3 -0
  81. package/es/table/components/ToolBar/RefreshIcon.js +11 -0
  82. package/es/table/components/ToolBar/index.js +13 -10
  83. package/es/table/index.js +138 -51
  84. package/es/table/index.scss +26 -0
  85. package/es/table/utils/columnRender.js +78 -27
  86. package/es/table/utils/genAutoWidthColumns.js +340 -0
  87. package/es/table/utils/index.js +6 -0
  88. package/es/table/utils/pureColumnRender.js +9 -1
  89. package/es/templates/List/index.js +4 -6
  90. package/es/templates/index.js +2 -1
  91. package/es/timeline/ProTimeLineItem/index.js +8 -4
  92. package/es/timeline/index.js +5 -5
  93. package/es/utils/message.js +3 -5
  94. package/es/xconsole.scss +23 -0
  95. package/lib/form/Filter/index.scss +1 -0
  96. package/lib/form/Filter/index2.scss +1 -0
  97. package/lib/index.d.ts +1 -1
  98. package/lib/index.js +1 -1
  99. package/lib/table/components/CardView/index.js +5 -10
  100. package/lib/table/components/ToolBar/index.js +10 -7
  101. package/lib/table/index.js +72 -25
  102. package/lib/table/index.scss +26 -0
  103. package/lib/table/typing.d.ts +11 -1
  104. package/lib/table/utils/columnRender.d.ts +1 -0
  105. package/lib/table/utils/columnRender.js +51 -4
  106. package/lib/table/utils/genAutoWidthColumns.d.ts +35 -0
  107. package/lib/table/utils/genAutoWidthColumns.js +345 -0
  108. package/lib/xconsole.scss +23 -0
  109. package/package.json +1 -1
  110. package/es/actions/base.d.ts +0 -24
  111. package/es/actions/confirm.d.ts +0 -7
  112. package/es/actions/danger-confirm.d.ts +0 -7
  113. package/es/actions/danger-pop-confirm.d.ts +0 -5
  114. package/es/actions/dialog-component.d.ts +0 -10
  115. package/es/actions/dialog-form.d.ts +0 -29
  116. package/es/actions/dialog-info.d.ts +0 -9
  117. package/es/actions/dialog-table.d.ts +0 -9
  118. package/es/actions/dialog.d.ts +0 -40
  119. package/es/actions/drawer-form.d.ts +0 -6
  120. package/es/actions/drawer-info.d.ts +0 -6
  121. package/es/actions/drawer-table.d.ts +0 -6
  122. package/es/actions/drawer.d.ts +0 -6
  123. package/es/actions/error.d.ts +0 -7
  124. package/es/actions/index.d.ts +0 -114
  125. package/es/actions/link.d.ts +0 -8
  126. package/es/actions/notice.d.ts +0 -7
  127. package/es/actions/pop-confirm.d.ts +0 -9
  128. package/es/actions/quick.d.ts +0 -2
  129. package/es/actions/request.d.ts +0 -9
  130. package/es/actions/utils.d.ts +0 -1
  131. package/es/card/card-container.d.ts +0 -18
  132. package/es/card/divider.d.ts +0 -6
  133. package/es/card/index.d.ts +0 -109
  134. package/es/card/selectable.d.ts +0 -13
  135. package/es/card/tab.d.ts +0 -6
  136. package/es/card/utils.d.ts +0 -9
  137. package/es/field/index.d.ts +0 -3
  138. package/es/form/Components/Editable/index.d.ts +0 -20
  139. package/es/form/Components/FormGroup/index.d.ts +0 -14
  140. package/es/form/Components/LightFilter/componentMap.d.ts +0 -3
  141. package/es/form/Components/LightFilter/index.d.ts +0 -17
  142. package/es/form/Components/ProField/index.d.ts +0 -2
  143. package/es/form/Components/ProField/mapDateFormat.d.ts +0 -3
  144. package/es/form/Components/Text/index.d.ts +0 -8
  145. package/es/form/Filter/AdvancedFilter.d.ts +0 -7
  146. package/es/form/Filter/Layout.d.ts +0 -5
  147. package/es/form/Filter/LightFilter.d.ts +0 -7
  148. package/es/form/Filter/SimpleFilter.d.ts +0 -7
  149. package/es/form/Filter/index.d.ts +0 -9
  150. package/es/form/Filter/index2.d.ts +0 -13
  151. package/es/form/Filter/useBindUrl.d.ts +0 -2
  152. package/es/form/Filter/useSpecialProps.d.ts +0 -6
  153. package/es/form/ProForm/addCascadeEffect.d.ts +0 -2
  154. package/es/form/ProForm/customComponent.d.ts +0 -3
  155. package/es/form/ProForm/index.d.ts +0 -5
  156. package/es/form/ProForm/useAutoLayout.d.ts +0 -9
  157. package/es/form/ProForm/useAutoSubmit.d.ts +0 -6
  158. package/es/form/ProForm/useFieldRequest.d.ts +0 -5
  159. package/es/form/ProForm/useFormDisplayValues.d.ts +0 -4
  160. package/es/form/ProForm/useInitialRequest.d.ts +0 -6
  161. package/es/form/SchemaForm/adapterComponent.d.ts +0 -5
  162. package/es/form/SchemaForm/adapterDecorator.d.ts +0 -6
  163. package/es/form/SchemaForm/adapterType.d.ts +0 -5
  164. package/es/form/SchemaForm/index.d.ts +0 -4
  165. package/es/form/SchemaForm/initializeArrayCards.d.ts +0 -3
  166. package/es/form/SchemaForm/initializeArrayCollapse.d.ts +0 -3
  167. package/es/form/SchemaForm/initializeArrayItems.d.ts +0 -3
  168. package/es/form/SchemaForm/initializeArrayTable.d.ts +0 -3
  169. package/es/form/SchemaForm/initializeDataSource.d.ts +0 -15
  170. package/es/form/SchemaForm/initializeFormButton.d.ts +0 -3
  171. package/es/form/SchemaForm/initializeFormCollapse.d.ts +0 -3
  172. package/es/form/SchemaForm/initializeFormGroup.d.ts +0 -3
  173. package/es/form/SchemaForm/initializeFormStep.d.ts +0 -5
  174. package/es/form/SchemaForm/initializeFormTab.d.ts +0 -3
  175. package/es/form/SchemaForm/initializeReactions.d.ts +0 -2
  176. package/es/form/SchemaForm/initializeRequest.d.ts +0 -11
  177. package/es/form/SchemaForm/initializeRules.d.ts +0 -11
  178. package/es/form/SchemaForm/initializeSelectTable.d.ts +0 -3
  179. package/es/form/SchemaForm/reactions.d.ts +0 -6
  180. package/es/form/docs/ActionResponse.d.ts +0 -8
  181. package/es/form/fieldTypeMap.d.ts +0 -7
  182. package/es/form/index.d.ts +0 -125
  183. package/es/form/locales/validate.d.ts +0 -159
  184. package/es/form/schemaNameMap.d.ts +0 -5
  185. package/es/form/typing.d.ts +0 -194
  186. package/es/form/utils.d.ts +0 -55
  187. package/es/form/warning.d.ts +0 -3
  188. package/es/hooks/index.d.ts +0 -2
  189. package/es/index-without-icon.d.ts +0 -32
  190. package/es/index.d.ts +0 -32
  191. package/es/info/components/InfoGroup/index.d.ts +0 -5
  192. package/es/info/components/InfoValueItem/index.d.ts +0 -5
  193. package/es/info/components/ProInfoItem/index.d.ts +0 -5
  194. package/es/info/components/baseInfo/index.d.ts +0 -8
  195. package/es/info/components/headerInfo/index.d.ts +0 -8
  196. package/es/info/components/tableInfo/index.d.ts +0 -7
  197. package/es/info/index.d.ts +0 -10
  198. package/es/info/typing.d.ts +0 -220
  199. package/es/info/utils/index.d.ts +0 -20
  200. package/es/info/utils/layout.d.ts +0 -2
  201. package/es/info/utils/utils.d.ts +0 -1
  202. package/es/layout/index.d.ts +0 -2
  203. package/es/nocode/configurators/Card.d.ts +0 -3
  204. package/es/nocode/configurators/PageHeader.d.ts +0 -3
  205. package/es/nocode/configurators/ProTable.d.ts +0 -3
  206. package/es/nocode/configurators/common.d.ts +0 -280
  207. package/es/nocode/configurators/index.d.ts +0 -15
  208. package/es/nocode/configurators/map.d.ts +0 -2
  209. package/es/nocode/index.d.ts +0 -8
  210. package/es/nocode/pages/editor.d.ts +0 -12
  211. package/es/nocode/pages/index.d.ts +0 -14
  212. package/es/nocode/pages/playground.d.ts +0 -11
  213. package/es/nocode/pages/renderer.d.ts +0 -10
  214. package/es/nocode/playground.d.ts +0 -14
  215. package/es/page-container/index.d.ts +0 -3
  216. package/es/page-header/index.d.ts +0 -74
  217. package/es/sidebar/components/sidebar-container/index.d.ts +0 -5
  218. package/es/sidebar/components/tree/index.d.ts +0 -6
  219. package/es/sidebar/components/tree-node/components/HoverTooltip/index.d.ts +0 -15
  220. package/es/sidebar/components/tree-node/components/IconAction/index.d.ts +0 -12
  221. package/es/sidebar/components/tree-node/components/IconSwitch/index.d.ts +0 -23
  222. package/es/sidebar/components/tree-node/index.d.ts +0 -7
  223. package/es/sidebar/index.d.ts +0 -9
  224. package/es/sidebar/typing.d.ts +0 -141
  225. package/es/sidebar/utils/action-ref.d.ts +0 -3
  226. package/es/sidebar/utils/index.d.ts +0 -364
  227. package/es/skeleton/index.d.ts +0 -3
  228. package/es/table/components/CardView/index.d.ts +0 -5
  229. package/es/table/components/EmptyContent/index.d.ts +0 -2
  230. package/es/table/components/Filter/index.d.ts +0 -12
  231. package/es/table/components/Layout/index.d.ts +0 -5
  232. package/es/table/components/LoadMore/index.d.ts +0 -20
  233. package/es/table/components/Pagination/index.d.ts +0 -7
  234. package/es/table/components/QuickAction/index.d.ts +0 -11
  235. package/es/table/components/ToolBar/CardSwitch.d.ts +0 -8
  236. package/es/table/components/ToolBar/DensityIcon.d.ts +0 -4
  237. package/es/table/components/ToolBar/FilterColumnIcon.d.ts +0 -4
  238. package/es/table/components/ToolBar/FullScreenIcon.d.ts +0 -4
  239. package/es/table/components/ToolBar/Fullscreen.d.ts +0 -10
  240. package/es/table/components/ToolBar/RefreshIcon.d.ts +0 -4
  241. package/es/table/components/ToolBar/index.d.ts +0 -5
  242. package/es/table/index.d.ts +0 -5
  243. package/es/table/typing.d.ts +0 -418
  244. package/es/table/utils/columnRender.d.ts +0 -13
  245. package/es/table/utils/genProColumnToColumn.d.ts +0 -13
  246. package/es/table/utils/getTableProps.d.ts +0 -2
  247. package/es/table/utils/getTableSortIcons.d.ts +0 -3
  248. package/es/table/utils/index.d.ts +0 -19
  249. package/es/table/utils/pureColumnRender.d.ts +0 -9
  250. package/es/table/utils/pureGenProColumnToColumn.d.ts +0 -7
  251. package/es/table/utils/useTableSelection.d.ts +0 -3
  252. package/es/table/utils/util.d.ts +0 -5
  253. package/es/templates/Detail/index.d.ts +0 -2
  254. package/es/templates/Form/index.d.ts +0 -2
  255. package/es/templates/List/index.d.ts +0 -9
  256. package/es/templates/index.d.ts +0 -3
  257. package/es/timeline/ProTimeLineItem/index.d.ts +0 -5
  258. package/es/timeline/index.d.ts +0 -10
  259. package/es/timeline/typing.d.ts +0 -107
  260. package/es/utils/index.d.ts +0 -3
  261. package/es/utils/message.d.ts +0 -3
@@ -22,6 +22,7 @@ var DensityIcon = function DensityIcon(props) {
22
22
  size = _useState2[0],
23
23
  setSize = _useState2[1];
24
24
  // const [fullscreen, setFullscreen] = useState<boolean>(false);
25
+
25
26
  // tooltip 开关
26
27
  var _useState3 = useState(false),
27
28
  _useState4 = _slicedToArray(_useState3, 2),
@@ -32,18 +33,21 @@ var DensityIcon = function DensityIcon(props) {
32
33
  _useState6 = _slicedToArray(_useState5, 2),
33
34
  dropdownVisible = _useState6[0],
34
35
  setDropdownVisible = _useState6[1];
36
+
35
37
  // 设置大小
36
38
  var radioOnchange = function radioOnchange(mode) {
37
39
  var _actionRef$current2, _actionRef$current2$s;
38
40
  setSize(mode);
39
41
  (_actionRef$current2 = actionRef.current) === null || _actionRef$current2 === void 0 ? void 0 : (_actionRef$current2$s = _actionRef$current2.setSize) === null || _actionRef$current2$s === void 0 ? void 0 : _actionRef$current2$s.call(_actionRef$current2, mode);
40
42
  };
43
+
41
44
  // // 销毁监听函数
42
45
  // useEffect(() => {
43
46
  // return () => {
44
47
  // actionRef.current?.off?.('densityIcon');
45
48
  // };
46
49
  // }, []);
50
+
47
51
  // // 监听全屏变化
48
52
  // actionRef.current?.on?.(
49
53
  // (state: boolean) => {
@@ -52,11 +56,11 @@ var DensityIcon = function DensityIcon(props) {
52
56
  // 'fullScreenState',
53
57
  // 'densityIcon',
54
58
  // );
59
+
55
60
  var renderDropdown = function renderDropdown() {
56
61
  return /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Dropdown
57
62
  // safeNode={() => sizeMenuRef.current || document}
58
63
  , {
59
- // safeNode={() => sizeMenuRef.current || document}
60
64
  trigger: /*#__PURE__*/React.createElement(Button, {
61
65
  iconSize: "small",
62
66
  className: cls()
@@ -70,8 +74,9 @@ var DensityIcon = function DensityIcon(props) {
70
74
  setTooltipVisible(false);
71
75
  setDropdownVisible(state);
72
76
  },
73
- triggerType: ['click'],
77
+ triggerType: ['click']
74
78
  // key={index}
79
+ ,
75
80
  align: "tr br"
76
81
  }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Menu, null, /*#__PURE__*/React.createElement(RadioItem, {
77
82
  key: "medium",
@@ -58,6 +58,7 @@ var FilterColumnIcon = function FilterColumnIcon(props) {
58
58
  _useState6 = _slicedToArray(_useState5, 2),
59
59
  newColumns = _useState6[0],
60
60
  setNewColumns = _useState6[1];
61
+
61
62
  // const [fullscreen, setFullscreen] = useState<boolean>(false);
62
63
  // tooltip 开关
63
64
  var _useState7 = useState(false),
@@ -102,6 +103,7 @@ var FilterColumnIcon = function FilterColumnIcon(props) {
102
103
  useEffect(function () {
103
104
  setNewColumns(processColumns(columns));
104
105
  }, [columns]);
106
+
105
107
  // 全选
106
108
  var onChangeAllColumns = function onChangeAllColumns(check) {
107
109
  setAllVisible(check);
@@ -113,12 +115,14 @@ var FilterColumnIcon = function FilterColumnIcon(props) {
113
115
  });
114
116
  notifyTableRender(keyNewColumns);
115
117
  };
118
+
116
119
  // 重置
117
120
  var restColumns = function restColumns(e) {
118
121
  e.stopPropagation();
119
122
  var keyNewColumns = processColumns(columns);
120
123
  notifyTableRender(keyNewColumns);
121
124
  };
125
+
122
126
  // 修改
123
127
  var onChangeColumns = function onChangeColumns(check, dataIndex) {
124
128
  var keyNewColumns = newColumns.map(function (item) {
@@ -132,11 +136,13 @@ var FilterColumnIcon = function FilterColumnIcon(props) {
132
136
  });
133
137
  notifyTableRender(keyNewColumns);
134
138
  };
139
+
135
140
  // 修改:dialog
136
141
  var onChangeColumnsForDialog = function onChangeColumnsForDialog() {
137
142
  notifyTableRender(newColumns);
138
143
  setDropdownVisible(false);
139
144
  };
145
+
140
146
  // 向上
141
147
  var moveUp = function moveUp(e, dataIndex) {
142
148
  var _newColumns$filter, _newColumns$filter2;
@@ -164,6 +170,7 @@ var FilterColumnIcon = function FilterColumnIcon(props) {
164
170
  }
165
171
  notifyTableRender([].concat(_toConsumableArray(headLock), _toConsumableArray(keyNewColumns), _toConsumableArray(tailLock)));
166
172
  };
173
+
167
174
  // 向下
168
175
  var moveDown = function moveDown(e, dataIndex) {
169
176
  var _newColumns$filter3, _newColumns$filter4;
@@ -191,6 +198,7 @@ var FilterColumnIcon = function FilterColumnIcon(props) {
191
198
  }
192
199
  notifyTableRender([].concat(_toConsumableArray(headLock), _toConsumableArray(keyNewColumns), _toConsumableArray(tailLock)));
193
200
  };
201
+
194
202
  // 通知表格渲染
195
203
  var notifyTableRender = function notifyTableRender(columns) {
196
204
  var _actionRef$current, _actionRef$current$se;
@@ -198,6 +206,7 @@ var FilterColumnIcon = function FilterColumnIcon(props) {
198
206
  setNewColumns(columns);
199
207
  (_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 ? void 0 : (_actionRef$current$se = _actionRef$current.setColumn) === null || _actionRef$current$se === void 0 ? void 0 : _actionRef$current$se.call(_actionRef$current, columns, false);
200
208
  };
209
+
201
210
  // 计算全选状态
202
211
  var calculateSelectAllState = function calculateSelectAllState(columns) {
203
212
  var flag = columns.reduce(function (acc, cur) {
@@ -10,6 +10,7 @@ var cls = usePrefixCls('teamix-pro-table-toolbar-icon');
10
10
  var FullScreenIcon = function FullScreenIcon(props) {
11
11
  var actionRef = props.actionRef,
12
12
  fullScreenState = props.fullScreenState;
13
+
13
14
  // 点击全屏
14
15
  var allScreenHandle = function allScreenHandle() {
15
16
  setTimeout(function () {
@@ -16,6 +16,7 @@ var FullScreen = function FullScreen(props) {
16
16
  actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current2 = actionRef.current) === null || _actionRef$current2 === void 0 ? void 0 : (_actionRef$current2$f = _actionRef$current2.fullScreen) === null || _actionRef$current2$f === void 0 ? void 0 : _actionRef$current2$f.call(_actionRef$current2);
17
17
  }
18
18
  };
19
+
19
20
  // 监听esc按钮
20
21
  useEffect(function () {
21
22
  window.addEventListener('keydown', closeByESC);
@@ -42,6 +43,7 @@ var FullScreen = function FullScreen(props) {
42
43
  document.body.classList.remove('teamix-pro-table-fullscreen-for-body');
43
44
  }
44
45
  };
46
+
45
47
  // 全屏开启之后
46
48
  var afterOpen = function afterOpen() {
47
49
  var _document2;
@@ -61,6 +63,7 @@ var FullScreen = function FullScreen(props) {
61
63
  if (document && ((_document2 = document) === null || _document2 === void 0 ? void 0 : _document2.body)) {
62
64
  document.body.classList.add('teamix-pro-table-fullscreen-for-body');
63
65
  }
66
+
64
67
  // 消息提示
65
68
  Message.show({
66
69
  type: 'notice',
@@ -29,26 +29,31 @@ var LayoutIcon = function LayoutIcon(props) {
29
29
  label: '每 5 分钟',
30
30
  value: 300000
31
31
  }];
32
+
32
33
  // dropdown 开关
33
34
  var _useState = useState(false),
34
35
  _useState2 = _slicedToArray(_useState, 2),
35
36
  dropdownVisible = _useState2[0],
36
37
  setDropdownVisible = _useState2[1];
38
+
37
39
  // 自动刷新状态
38
40
  var _useState3 = useState(!!autoRefresh),
39
41
  _useState4 = _slicedToArray(_useState3, 2),
40
42
  autoRefreshVisible = _useState4[0],
41
43
  setAutoRefreshVisible = _useState4[1];
44
+
42
45
  // 间隔时间 ms
43
46
  var _useState5 = useState(60000),
44
47
  _useState6 = _slicedToArray(_useState5, 2),
45
48
  times = _useState6[0],
46
49
  setTimes = _useState6[1];
50
+
47
51
  // 展示计时器时间 s
48
52
  var _useState7 = useState(60),
49
53
  _useState8 = _slicedToArray(_useState7, 2),
50
54
  remainTime = _useState8[0],
51
55
  setRemainTime = _useState8[1];
56
+
52
57
  // 循环计时器
53
58
  var timerRef = useRef({
54
59
  timer: undefined,
@@ -71,10 +76,12 @@ var LayoutIcon = function LayoutIcon(props) {
71
76
  }, 1000);
72
77
  }, 'PRO_TABLE_REFRESH_TIMER_FLAG');
73
78
  }, []);
79
+
74
80
  // 下拉菜单显示隐藏回调
75
81
  var onDropdownVisibleChange = function onDropdownVisibleChange(state) {
76
82
  setDropdownVisible(state);
77
83
  };
84
+
78
85
  // 自动刷新开启关闭回调
79
86
  var onAutoRefreshChange = function onAutoRefreshChange(visible) {
80
87
  if (visible) {
@@ -92,18 +99,21 @@ var LayoutIcon = function LayoutIcon(props) {
92
99
  }
93
100
  setAutoRefreshVisible(visible);
94
101
  };
102
+
95
103
  // 手动刷新回调
96
104
  var onManualRefresh = function onManualRefresh() {
97
105
  var _actionRef$current3, _actionRef$current3$r;
98
106
  (_actionRef$current3 = actionRef.current) === null || _actionRef$current3 === void 0 ? void 0 : (_actionRef$current3$r = _actionRef$current3.refresh) === null || _actionRef$current3$r === void 0 ? void 0 : _actionRef$current3$r.call(_actionRef$current3);
99
107
  onDropdownVisibleChange(false);
100
108
  };
109
+
101
110
  // 选择间隔时间回调
102
111
  var onTimeRadioChange = function onTimeRadioChange(timer) {
103
112
  var _actionRef$current4, _actionRef$current4$s;
104
113
  setTimes(timer);
105
114
  (_actionRef$current4 = actionRef.current) === null || _actionRef$current4 === void 0 ? void 0 : (_actionRef$current4$s = _actionRef$current4.setAutoRefreshTimers) === null || _actionRef$current4$s === void 0 ? void 0 : _actionRef$current4$s.call(_actionRef$current4, timer);
106
115
  };
116
+
107
117
  // 渲染刷新图标
108
118
  var renderRefreshIcon = function renderRefreshIcon() {
109
119
  if (!!autoRefresh && autoRefreshVisible && typeof autoRefresh !== 'function') {
@@ -123,6 +133,7 @@ var LayoutIcon = function LayoutIcon(props) {
123
133
  type: "refresh-line"
124
134
  });
125
135
  };
136
+
126
137
  // 渲染 Radio
127
138
  var renderRadio = autoRefreshRadio.map(function (item) {
128
139
  return /*#__PURE__*/React.createElement(Menu.RadioItem, {
@@ -1,5 +1,3 @@
1
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
3
1
  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; }
4
2
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
5
3
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -64,6 +62,7 @@ var ToolBar = function ToolBar(props) {
64
62
  // '.teamix-pro-form-query-filter-layout-left' 元素
65
63
  var layoutLeftDom = layoutInlineDom === null || layoutInlineDom === void 0 ? void 0 : layoutInlineDom.firstElementChild;
66
64
  var leftWidth = layoutLeftDom === null || layoutLeftDom === void 0 ? void 0 : layoutLeftDom.clientWidth;
65
+
67
66
  // 展示形式,是否平铺
68
67
  var _useSafeState = useSafeState(),
69
68
  _useSafeState2 = _slicedToArray(_useSafeState, 2),
@@ -73,15 +72,16 @@ var ToolBar = function ToolBar(props) {
73
72
  useEffect(debounce(function () {
74
73
  if ((layoutInlineSize === null || layoutInlineSize === void 0 ? void 0 : layoutInlineSize.width) && leftWidth && toolBarContentRef.current && toolBarAutoWidth) {
75
74
  var _toolBarContentRef$cu;
76
- var width = layoutInlineSize.width,
77
- height = layoutInlineSize.height;
78
- if (width - leftWidth <= ((_toolBarContentRef$cu = toolBarContentRef.current) === null || _toolBarContentRef$cu === void 0 ? void 0 : _toolBarContentRef$cu.clientWidth) + 8 || height > 40) {
75
+ var width = layoutInlineSize.width;
76
+ // 60 为容错
77
+ if (width - leftWidth - 60 <= ((_toolBarContentRef$cu = toolBarContentRef.current) === null || _toolBarContentRef$cu === void 0 ? void 0 : _toolBarContentRef$cu.clientWidth) + 8) {
79
78
  setFlat(false);
80
- } else if (height === 40) {
79
+ } else {
81
80
  setFlat(true);
82
81
  }
83
82
  }
84
83
  }, 300));
84
+
85
85
  // 初始态
86
86
  useEffect(function () {
87
87
  if (!((layoutInlineSize === null || layoutInlineSize === void 0 ? void 0 : layoutInlineSize.width) && leftWidth)) {
@@ -136,15 +136,18 @@ var ToolBar = function ToolBar(props) {
136
136
  return /*#__PURE__*/React.createElement("span", {
137
137
  className: cls('item', _defineProperty({}, name, true)),
138
138
  key: name
139
- }, type === 'preset' && /*#__PURE__*/React.createElement(Component, _objectSpread({}, props)), type === 'custom' && /*#__PURE__*/React.createElement("div", {
139
+ }, type === 'preset' && /*#__PURE__*/React.createElement(Component, props), type === 'custom' && /*#__PURE__*/React.createElement("div", {
140
140
  className: cls({
141
141
  custom: true
142
142
  })
143
143
  }, Component));
144
144
  }));
145
- }, [toolBarList]);
145
+ }, [toolBarList, props.columns]);
146
146
  var renderUnFlatShape = function renderUnFlatShape() {
147
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Balloon.Tooltip, {
147
+ if (toolBar === false) {
148
+ return /*#__PURE__*/React.createElement(React.Fragment, null);
149
+ }
150
+ return /*#__PURE__*/React.createElement(Balloon.Tooltip, {
148
151
  triggerType: ['click'],
149
152
  popupProps: {
150
153
  cache: true
@@ -156,7 +159,7 @@ var ToolBar = function ToolBar(props) {
156
159
  type: "more-line"
157
160
  })),
158
161
  align: "tr"
159
- }, renderFlatShape));
162
+ }, renderFlatShape);
160
163
  };
161
164
  return /*#__PURE__*/React.createElement("div", {
162
165
  className: cls('', {