@teamix/pro 1.3.5 → 1.3.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 (78) hide show
  1. package/dist/pro.css +1 -1
  2. package/dist/pro.js +2962 -9964
  3. package/dist/pro.min.css +1 -1
  4. package/dist/pro.min.js +1 -1
  5. package/dist/pro.min.js.LICENSE.txt +0 -9
  6. package/es/actions/dialog-form.d.ts +2 -0
  7. package/es/actions/dialog-form.js +5 -2
  8. package/es/actions/index.d.ts +5 -1
  9. package/es/actions/index.js +30 -9
  10. package/es/card/index.d.ts +1 -1
  11. package/es/card/index.js +9 -1
  12. package/es/card/index.scss +4 -0
  13. package/es/form/Filter/LightFilter.js +12 -2
  14. package/es/form/Filter/useSpecialProps.js +2 -2
  15. package/es/form/ProForm/index.js +5 -3
  16. package/es/form/ProForm/index.scss +16 -8
  17. package/es/form/SchemaForm/reactions.js +2 -2
  18. package/es/form/typing.d.ts +1 -0
  19. package/es/index.d.ts +1 -1
  20. package/es/index.js +1 -1
  21. package/es/info/components/ProInfoItem/index.js +2 -6
  22. package/es/info/components/ProInfoItem/index.scss +0 -4
  23. package/es/info/components/baseInfo/index.js +1 -2
  24. package/es/info/typing.d.ts +0 -2
  25. package/es/info/utils/index.d.ts +0 -8
  26. package/es/info/utils/index.js +1 -28
  27. package/es/sidebar/components/tree/index.js +6 -2
  28. package/es/sidebar/components/tree-node/{componnets → components}/HoverTooltip/index.d.ts +0 -0
  29. package/es/sidebar/components/tree-node/{componnets → components}/HoverTooltip/index.js +1 -1
  30. package/es/sidebar/components/tree-node/{componnets → components}/HoverTooltip/index.scss +0 -0
  31. package/es/sidebar/components/tree-node/{componnets → components}/IconAction/index.d.ts +0 -0
  32. package/es/sidebar/components/tree-node/{componnets → components}/IconAction/index.js +0 -0
  33. package/es/sidebar/components/tree-node/{componnets → components}/IconAction/index.scss +0 -0
  34. package/es/sidebar/components/tree-node/{componnets → components}/IconSwitch/index.d.ts +0 -0
  35. package/es/sidebar/components/tree-node/{componnets → components}/IconSwitch/index.js +1 -1
  36. package/es/sidebar/components/tree-node/{componnets → components}/IconSwitch/index.scss +0 -0
  37. package/es/sidebar/components/tree-node/index.js +3 -3
  38. package/es/table/components/Pagination/index.js +4 -4
  39. package/es/table/components/ToolBar/FilterColumnIcon.js +5 -1
  40. package/es/table/index.js +9 -4
  41. package/es/table/typing.d.ts +3 -1
  42. package/lib/actions/dialog-form.d.ts +2 -0
  43. package/lib/actions/dialog-form.js +5 -2
  44. package/lib/actions/index.d.ts +5 -1
  45. package/lib/actions/index.js +29 -7
  46. package/lib/card/index.d.ts +1 -1
  47. package/lib/card/index.js +10 -1
  48. package/lib/card/index.scss +4 -0
  49. package/lib/form/Filter/LightFilter.js +14 -2
  50. package/lib/form/Filter/useSpecialProps.js +1 -1
  51. package/lib/form/ProForm/index.js +5 -3
  52. package/lib/form/ProForm/index.scss +16 -8
  53. package/lib/form/SchemaForm/reactions.js +1 -1
  54. package/lib/form/typing.d.ts +1 -0
  55. package/lib/index.d.ts +1 -1
  56. package/lib/index.js +1 -1
  57. package/lib/info/components/ProInfoItem/index.js +2 -6
  58. package/lib/info/components/ProInfoItem/index.scss +0 -4
  59. package/lib/info/components/baseInfo/index.js +0 -1
  60. package/lib/info/typing.d.ts +0 -2
  61. package/lib/info/utils/index.d.ts +0 -8
  62. package/lib/info/utils/index.js +1 -32
  63. package/lib/sidebar/components/tree/index.js +7 -3
  64. package/lib/sidebar/components/tree-node/{componnets → components}/HoverTooltip/index.d.ts +0 -0
  65. package/lib/sidebar/components/tree-node/{componnets → components}/HoverTooltip/index.js +2 -2
  66. package/lib/sidebar/components/tree-node/{componnets → components}/HoverTooltip/index.scss +0 -0
  67. package/lib/sidebar/components/tree-node/{componnets → components}/IconAction/index.d.ts +0 -0
  68. package/lib/sidebar/components/tree-node/{componnets → components}/IconAction/index.js +0 -0
  69. package/lib/sidebar/components/tree-node/{componnets → components}/IconAction/index.scss +0 -0
  70. package/lib/sidebar/components/tree-node/{componnets → components}/IconSwitch/index.d.ts +0 -0
  71. package/lib/sidebar/components/tree-node/{componnets → components}/IconSwitch/index.js +1 -1
  72. package/lib/sidebar/components/tree-node/{componnets → components}/IconSwitch/index.scss +0 -0
  73. package/lib/sidebar/components/tree-node/index.js +3 -3
  74. package/lib/table/components/Pagination/index.js +3 -3
  75. package/lib/table/components/ToolBar/FilterColumnIcon.js +5 -1
  76. package/lib/table/index.js +8 -3
  77. package/lib/table/typing.d.ts +3 -1
  78. package/package.json +18 -4
@@ -26,15 +26,6 @@ object-assign
26
26
 
27
27
  /*! js-cookie v3.0.1 | MIT */
28
28
 
29
- /**
30
- * @license
31
- * Lodash <https://lodash.com/>
32
- * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
33
- * Released under MIT license <https://lodash.com/license>
34
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
35
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
36
- */
37
-
38
29
  /** @license React v16.13.1
39
30
  * react-is.production.min.js
40
31
  *
@@ -20,6 +20,8 @@ export interface DialogFormAction extends DialogAction {
20
20
  schema: ProFormSchema | Omit<ProFormProps, 'form'>;
21
21
  /** 外部传来的 formRef,用于获取内置 form 实例 */
22
22
  formRef?: React.MutableRefObject<ProFormType | undefined>;
23
+ /** 是否开启懒惰校验,只校验第一个非法规则,默认开启 */
24
+ validateFirst?: boolean;
23
25
  }
24
26
  export declare function useDialogFormAction(action: DialogFormAction, context?: any): {
25
27
  [x: string]: (e: React.MouseEvent<HTMLElement, MouseEvent>) => Promise<void>;
@@ -90,14 +90,17 @@ var DialogForm = function DialogForm(props) {
90
90
  formProps = props.formProps,
91
91
  context = props.context,
92
92
  formRef = props.formRef,
93
- innerFormRef = props.innerFormRef;
93
+ innerFormRef = props.innerFormRef,
94
+ _props$validateFirst = props.validateFirst,
95
+ validateFirst = _props$validateFirst === void 0 ? true : _props$validateFirst;
94
96
 
95
97
  var _getSchemaAndFormProp = getSchemaAndFormProps(schema, formProps),
96
98
  formSchema = _getSchemaAndFormProp.schema,
97
99
  others = _objectWithoutProperties(_getSchemaAndFormProp, _excluded);
98
100
 
99
101
  var form = createForm({
100
- initialValues: getTargetValue(initialValues, context)
102
+ initialValues: getTargetValue(initialValues, context),
103
+ validateFirst: validateFirst
101
104
  });
102
105
 
103
106
  var _useState = useState(false),
@@ -1,6 +1,7 @@
1
- import React from 'react';
1
+ import React, { ReactNode } from 'react';
2
2
  import { ButtonProps } from '@alicloudfe/components/types/button';
3
3
  import { MenuButtonProps } from '@alicloudfe/components/types/menu-button';
4
+ import { TooltipProps } from '@alicloudfe/components/types/balloon';
4
5
  import { LinkAction } from './link';
5
6
  import { RequestAction } from './request';
6
7
  import { DialogAction } from './dialog';
@@ -29,7 +30,10 @@ export declare function useAction(config?: ProActionConfig, context?: any): any;
29
30
  export interface ProActionButtonProps extends ProActionCommonProps, ButtonProps {
30
31
  config?: ProActionConfig;
31
32
  disabled?: any;
33
+ tooltip?: ReactNode;
34
+ disabledTooltip?: ReactNode;
32
35
  icon?: string;
36
+ tooltipProps?: TooltipProps;
33
37
  onClick?: (event: React.MouseEvent<Element, MouseEvent>, context?: any) => void;
34
38
  }
35
39
  export declare const ProActionButton: (props: ProActionButtonProps) => JSX.Element;
@@ -1,5 +1,5 @@
1
1
  var _excluded = ["type"],
2
- _excluded2 = ["config", "icon", "iconSize", "type", "context", "children", "visible", "onClick"],
2
+ _excluded2 = ["config", "icon", "iconSize", "type", "context", "children", "visible", "disabled", "onClick", "tooltip", "disabledTooltip", "tooltipProps"],
3
3
  _excluded3 = ["loading"],
4
4
  _excluded4 = ["icon", "iconSize", "label", "actions", "children", "context", "type", "className", "noArrow"],
5
5
  _excluded5 = ["context", "text"],
@@ -31,9 +31,9 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
31
31
 
32
32
  import React from 'react';
33
33
  import cls from 'classnames';
34
- import { Button, MenuButton, Menu, Divider } from '@alicloudfe/components';
34
+ import { Button, MenuButton, Menu, Divider, Balloon } from '@alicloudfe/components';
35
35
  import Icon from '@teamix/icon';
36
- import { getTargetValue, getMessage } from '@teamix/utils';
36
+ import { getTargetValue, getMessage, usePrefixCls } from '@teamix/utils';
37
37
  import { useLinkAction } from './link';
38
38
  import { useRequestAction } from './request';
39
39
  import { useDialogAction } from './dialog';
@@ -165,18 +165,39 @@ export var ProActionButton = function ProActionButton(props) {
165
165
  context = props.context,
166
166
  children = props.children,
167
167
  visible = props.visible,
168
+ disabled = props.disabled,
168
169
  _onClick = props.onClick,
170
+ tooltip = props.tooltip,
171
+ disabledTooltip = props.disabledTooltip,
172
+ tooltipProps = props.tooltipProps,
169
173
  others = _objectWithoutProperties(props, _excluded2);
170
174
 
171
175
  var actionProps = useAction(config, context);
172
- var buttonProps = _onClick ? _objectSpread(_objectSpread(_objectSpread({}, actionProps), others), {}, {
176
+ var buttonProps = _onClick ? _objectSpread(_objectSpread(_objectSpread({
177
+ disabled: disabled
178
+ }, actionProps), others), {}, {
173
179
  onClick: function onClick(e) {
174
180
  return _onClick(e, context);
175
181
  }
176
- }) : _objectSpread(_objectSpread({}, actionProps), others);
177
- return /*#__PURE__*/React.createElement(Button, _objectSpread({
182
+ }) : _objectSpread(_objectSpread({
183
+ disabled: disabled
184
+ }, actionProps), others);
185
+ var content = /*#__PURE__*/React.createElement(Button, _objectSpread({
178
186
  type: type
179
187
  }, buttonProps), buttonContent(children, icon, iconSize, context));
188
+
189
+ var baseToolTipProps = _objectSpread({
190
+ triggerType: 'hover',
191
+ align: 't',
192
+ trigger: content
193
+ }, tooltipProps);
194
+
195
+ if (tooltip || disabledTooltip) {
196
+ var showToolTip = disabled ? disabledTooltip : tooltip;
197
+ content = /*#__PURE__*/React.createElement(Balloon.Tooltip, _objectSpread({}, baseToolTipProps), showToolTip);
198
+ }
199
+
200
+ return content;
180
201
  };
181
202
 
182
203
  var ProActionMenuButtonItem = function ProActionMenuButtonItem(props) {
@@ -202,9 +223,7 @@ var ProActionMenuButtonItem = function ProActionMenuButtonItem(props) {
202
223
  }
203
224
  }) : _objectSpread({}, menuItemProps);
204
225
  return /*#__PURE__*/React.createElement("div", _objectSpread({
205
- className: cls('teamix-pro-action-menu-item', 'next-menu-item', {
206
- 'next-disabled': disabled
207
- })
226
+ className: cls('teamix-pro-action-menu-item', "".concat(usePrefixCls(), "menu-item"), _defineProperty({}, "".concat(usePrefixCls(), "disabled"), disabled))
208
227
  }, buttonProps), buttonContent(children, icon, undefined, context));
209
228
  };
210
229
 
@@ -363,6 +382,8 @@ function getActionConfig(action, index, context) {
363
382
  key: getKey(index, _key),
364
383
  actions: actions.map(function (a, j) {
365
384
  return getActionConfig(a, j, context);
385
+ }).filter(function (action) {
386
+ return action.visible !== false;
366
387
  })
367
388
  }, getTargetValue(_others, context));
368
389
  }
@@ -90,7 +90,7 @@ export declare const ProCard: {
90
90
  Selectable: {
91
91
  (props: import("./selectable").ProCardSelectableProps): JSX.Element;
92
92
  defaultProps: {
93
- hoveredShadow: boolean; /** 标签组 */
93
+ hoveredShadow: boolean;
94
94
  };
95
95
  isProCard: boolean;
96
96
  };
package/es/card/index.js CHANGED
@@ -37,6 +37,7 @@ import ProCardDivider from './divider';
37
37
  import ProCardSelectable from './selectable';
38
38
  import ProCardTab from './tab';
39
39
  import './index.scss';
40
+ import ProField from '@teamix/pro-field';
40
41
  export * from './card-container';
41
42
  var cls = baseClass('teamix-pro-card');
42
43
 
@@ -219,7 +220,14 @@ export var ProCard = function ProCard(props) {
219
220
  trigger: tooltipTrigger
220
221
  }, tooltip)), tags && renderTags(tags, 'small'), description && /*#__PURE__*/React.createElement("div", {
221
222
  className: cls('title-description')
222
- }, description));
223
+ }, /*#__PURE__*/React.createElement(ProField, {
224
+ value: description,
225
+ type: "text",
226
+ render: {
227
+ ellipsis: true,
228
+ tooltip: description
229
+ }
230
+ })));
223
231
  };
224
232
 
225
233
  return /*#__PURE__*/React.createElement(BasicCard, _objectSpread({
@@ -52,6 +52,10 @@
52
52
  }
53
53
  }
54
54
 
55
+ &-name{
56
+ flex-shrink: 0;
57
+ }
58
+
55
59
  &-collapse {
56
60
  cursor: pointer;
57
61
 
@@ -12,8 +12,12 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
12
12
 
13
13
  import React, { memo, useMemo, useCallback, useRef, useEffect } from 'react';
14
14
  import cls from 'classnames';
15
+ import { observable } from '@formily/reactive';
15
16
  import { usePrefixCls } from '@teamix/utils';
16
17
  import ProForm from '../ProForm';
18
+ var lightFilterObs = observable({
19
+ onFilter: function onFilter() {}
20
+ });
17
21
  /**
18
22
  * 轻量筛选
19
23
  */
@@ -69,7 +73,7 @@ var LightFilter = /*#__PURE__*/memo(function (props) {
69
73
  filterValues: filterValues,
70
74
  onFilterChange: onFilterChange,
71
75
  buttonProps: {
72
- onClick: onFilter
76
+ onClick: "{{lightFilterObs.onFilter}}"
73
77
  }
74
78
  },
75
79
  children: schema
@@ -81,8 +85,14 @@ var LightFilter = /*#__PURE__*/memo(function (props) {
81
85
  }
82
86
  }
83
87
  }];
84
- }, [schema, onFilter, onFilterChange, defaultFilterValue]);
88
+ }, [schema, onFilterChange, defaultFilterValue]);
89
+ useEffect(function () {
90
+ lightFilterObs.onFilter = onFilter;
91
+ }, [onChange]);
85
92
  return /*#__PURE__*/React.createElement(ProForm, _objectSpread(_objectSpread({}, otherProps), {}, {
93
+ scope: _objectSpread(_objectSpread({}, otherProps === null || otherProps === void 0 ? void 0 : otherProps.scope), {}, {
94
+ lightFilterObs: lightFilterObs
95
+ }),
86
96
  form: form,
87
97
  className: cls(prefixCls, props.className),
88
98
  schema: LightSchema,
@@ -1,4 +1,4 @@
1
- import { isUsable, isStr, isPureObj } from '@teamix/utils'; // 获取Schema是否包含默认值、异步默认值、必选校验等
1
+ import { isUsable, isStr, isPlainObj } from '@teamix/utils'; // 获取Schema是否包含默认值、异步默认值、必选校验等
2
2
 
3
3
  var useSpecialProps = function useSpecialProps(props) {
4
4
  var initialValues = props.initialValues,
@@ -16,7 +16,7 @@ var useSpecialProps = function useSpecialProps(props) {
16
16
  dataSource = item.dataSource,
17
17
  children = item.children; // 字符串变量配置default值会触发onChange
18
18
 
19
- hasChangeDefault = hasChangeDefault || !!(isPureObj(dataSource) && isStr(value) && value.indexOf('.dataSource'));
19
+ hasChangeDefault = hasChangeDefault || !!(isPlainObj(dataSource) && isStr(value) && value.indexOf('.dataSource'));
20
20
  hasDefault = hasDefault || isUsable(value);
21
21
  hasRequired = hasRequired || required || !!rules;
22
22
 
@@ -1,4 +1,4 @@
1
- var _excluded = ["form", "initialValues", "initialRequest", "schema", "scope", "context", "components", "children", "layout", "labelAlign", "wrapperAlign", "labelCol", "wrapperCol", "breakpoints", "onChange", "onSubmit", "onSubmitFailed", "onInitialComplete", "className"];
1
+ var _excluded = ["form", "initialValues", "initialRequest", "schema", "scope", "context", "components", "children", "layout", "labelAlign", "wrapperAlign", "labelCol", "wrapperCol", "breakpoints", "onChange", "onSubmit", "onSubmitFailed", "onInitialComplete", "className", "validateFirst"];
2
2
 
3
3
  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; }
4
4
 
@@ -43,11 +43,12 @@ var ProForm = /*#__PURE__*/memo(function (_ref) {
43
43
  onSubmitFailed = _ref.onSubmitFailed,
44
44
  onInitialComplete = _ref.onInitialComplete,
45
45
  className = _ref.className,
46
+ validateFirst = _ref.validateFirst,
46
47
  otherProps = _objectWithoutProperties(_ref, _excluded);
47
48
 
48
49
  var form = useMemo(function () {
49
50
  return outerForm || createForm({
50
- validateFirst: true
51
+ validateFirst: validateFirst
51
52
  });
52
53
  }, []);
53
54
  var prefixCls = usePrefixCls('', {
@@ -119,6 +120,7 @@ var ProForm = /*#__PURE__*/memo(function (_ref) {
119
120
  });
120
121
  ProForm.defaultProps = {
121
122
  colon: false,
122
- labelAlign: 'left'
123
+ labelAlign: 'left',
124
+ validateFirst: true
123
125
  };
124
126
  export default ProForm;
@@ -197,14 +197,15 @@
197
197
  margin-right: 4px;
198
198
  }
199
199
  }
200
- // 数组类ArrayItem Icon 居中(移除,通过align:center配置)
201
- // .#{$form-array}-items-item-inner {
202
- // .#{$css-prefix}space-item {
203
- // > .#{$css-prefix}formily-icon {
204
- // margin-top: 9px;
205
- // }
206
- // }
207
- // }
200
+ // 数组类ArrayItem Icon text 居中
201
+ .#{$form-array}-items-item-inner {
202
+ .#{$css-prefix}space-item {
203
+ > .#{$css-prefix}formily-icon.#{$css-prefix}btn-text {
204
+ line-height: inherit !important;
205
+ margin-right: 0;
206
+ }
207
+ }
208
+ }
208
209
 
209
210
  // Editable预览态行高
210
211
  .#{$css-prefix}formily-editable-content {
@@ -212,6 +213,13 @@
212
213
  }
213
214
 
214
215
  // 折叠面板
216
+ .#{$css-prefix}formily-collapse {
217
+ .#{$css-prefix}collapse-panel-title {
218
+ .#{$css-prefix}badge-count {
219
+ transform: translateX(4px);
220
+ }
221
+ }
222
+ }
215
223
  .#{$css-prefix}formily-collapse,
216
224
  .#{$form-array}-collapse-item {
217
225
  .#{$css-prefix}collapse-panel-hidden {
@@ -10,7 +10,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
10
10
 
11
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; }
12
12
 
13
- import { isFn, isPureObj, doCommonRequest, getValueByValue } from '@teamix/utils'; // 配置请求
13
+ import { isFn, isPlainObj, doCommonRequest, getValueByValue } from '@teamix/utils'; // 配置请求
14
14
 
15
15
  var $request = function $request(field, _ref, context, type) {
16
16
  var _field$data;
@@ -29,7 +29,7 @@ var $request = function $request(field, _ref, context, type) {
29
29
  // 触发所有配置的请求
30
30
 
31
31
  var refresh = (_field$data = field.data) === null || _field$data === void 0 ? void 0 : _field$data.refresh;
32
- var refreshResult = isPureObj(refresh) ? refresh : {};
32
+ var refreshResult = isPlainObj(refresh) ? refresh : {};
33
33
  return doCommonRequest(_objectSpread(_objectSpread({}, requestConfig), {}, {
34
34
  params: _objectSpread(_objectSpread(_objectSpread({}, params), beforeRequestResult), refreshResult),
35
35
  beforeRequest: function beforeRequest() {
@@ -66,6 +66,7 @@ export interface ProFormProps extends IFormLayoutProps {
66
66
  initialValues?: AnyObject;
67
67
  initialRequest?: ProFormRequestConfig;
68
68
  previewTextPlaceholder?: ReactNode;
69
+ validateFirst?: boolean;
69
70
  onChange?: (values: any, fieldValue?: any, fieldName?: any) => any;
70
71
  onSubmit?: ((values: any) => any) | CommonRequestConfig;
71
72
  onSubmitFailed?: (feedbacks: IFormFeedback[]) => void;
package/es/index.d.ts CHANGED
@@ -26,5 +26,5 @@ export * from './table';
26
26
  export * from './sidebar';
27
27
  export * from './utils';
28
28
  export * from './timeline';
29
- declare const version = "1.3.5";
29
+ declare const version = "1.3.8";
30
30
  export { version, ProAction, ProCard, ProField, ProForm, ProInfo, ProPageContainer, ProPageHeader, ProSkeleton, ProTable, ProSidebar, ProTimeline, hooks, nocode, templates, utils, };
package/es/index.js CHANGED
@@ -31,6 +31,6 @@ export * from './sidebar';
31
31
  export * from './utils'; // export * from './sidebar';
32
32
 
33
33
  export * from './timeline';
34
- var version = '1.3.5';
34
+ var version = '1.3.8';
35
35
  export { version, ProAction, ProCard, ProField, ProForm, ProInfo, // ProLayout,
36
36
  ProPageContainer, ProPageHeader, ProSkeleton, ProTable, ProSidebar, ProTimeline, hooks, nocode, templates, utils };
@@ -14,17 +14,13 @@ var ProInfoItem = function ProInfoItem(prop) {
14
14
  headerInfoLayout = prop.headerInfoLayout,
15
15
  loading = prop.loading,
16
16
  tooltip = prop.tooltip,
17
- tooltipIcon = prop.tooltipIcon,
18
- _isLastRow = prop._isLastRow;
17
+ tooltipIcon = prop.tooltipIcon;
19
18
 
20
19
  if (baseInfoLayout) {
21
20
  var labelCol = baseInfoLayout.labelCol,
22
21
  wrapperCol = baseInfoLayout.wrapperCol;
23
22
  return /*#__PURE__*/React.createElement("div", {
24
- className: cls({
25
- '': true,
26
- isLastRow: _isLastRow
27
- })
23
+ className: cls('')
28
24
  }, /*#__PURE__*/React.createElement(Row, {
29
25
  gutter: 10,
30
26
  className: cls('base-row')
@@ -17,10 +17,6 @@ $item-padding-bottom: 8px;
17
17
  .teamix-pro-field-info-form-item {
18
18
  width: 100%;
19
19
  padding-bottom: $item-padding-bottom;
20
- &-isLastRow{
21
- padding-bottom: unset;
22
- }
23
-
24
20
  &-header-row {
25
21
  display: flex;
26
22
  align-items: center;
@@ -5,7 +5,7 @@ import './index.scss';
5
5
  import { getLayout } from '../../utils/utils';
6
6
  import defaultLayoutMap from '../../utils/layout';
7
7
  import InfoValueItem from '../InfoValueItem';
8
- import { getDataIndexValue, isLastRow } from '../../utils';
8
+ import { getDataIndexValue } from '../../utils';
9
9
  var Row = Grid.Row,
10
10
  Col = Grid.Col;
11
11
 
@@ -65,7 +65,6 @@ var ProBaseInfo = function ProBaseInfo(props) {
65
65
  }, /*#__PURE__*/React.createElement(ProInfoItem, {
66
66
  label: (_item$title = item === null || item === void 0 ? void 0 : item.title) !== null && _item$title !== void 0 ? _item$title : '',
67
67
  loading: loading,
68
- _isLastRow: !!isLastRow(columns.length, layoutSpan, index),
69
68
  value: /*#__PURE__*/React.createElement(InfoValueItem, {
70
69
  type: (_item$valueType = item === null || item === void 0 ? void 0 : item.valueType) !== null && _item$valueType !== void 0 ? _item$valueType : 'text',
71
70
  value: getDataIndexValue(item.dataIndex, (_ref = dataSource !== null && dataSource !== void 0 ? dataSource : result) !== null && _ref !== void 0 ? _ref : {}),
@@ -113,8 +113,6 @@ export declare type IProProInfoItem = {
113
113
  headerInfoLayout?: ProHeaderInfoLayoutProps;
114
114
  /** loading 状态 */
115
115
  loading?: boolean;
116
- /** isLastRow 是否是最后一行的元素 */
117
- _isLastRow?: boolean;
118
116
  } & Pick<ProInfoColumnsProps, 'tooltip' | 'tooltipIcon'>;
119
117
  /** header info 定义 */
120
118
  export declare type IProHeaderInfo = {
@@ -10,11 +10,3 @@ export declare const ProInfoGroupContext: React.Context<ProInfoGroupContextProps
10
10
  * @returns
11
11
  */
12
12
  export declare function getDataIndexValue(dataIndex: ProInfoColumnsProps['dataIndex'], dataSource: object): any;
13
- /**
14
- * 是否是最后一样的元素
15
- * @param columnsLength
16
- * @param layoutSpan
17
- * @params itemIndex
18
- * @returns
19
- */
20
- export declare const isLastRow: (columnsLength: number, layoutSpan: number, itemIndex: number) => boolean | undefined;
@@ -30,31 +30,4 @@ export function getDataIndexValue(dataIndex, dataSource) {
30
30
  }
31
31
 
32
32
  return getDeepValue(dataIndex !== null && dataIndex !== void 0 ? dataIndex : '', dataSource);
33
- }
34
- /**
35
- * 是否是最后一样的元素
36
- * @param columnsLength
37
- * @param layoutSpan
38
- * @params itemIndex
39
- * @returns
40
- */
41
-
42
- export var isLastRow = function isLastRow(columnsLength, layoutSpan, itemIndex) {
43
- if (!columnsLength || !layoutSpan) return;
44
- var lastRowColumnsIndexList = [];
45
- var rowCount = 24 / layoutSpan;
46
-
47
- if (columnsLength % rowCount === 0) {
48
- while (rowCount--) {
49
- lastRowColumnsIndexList.push(columnsLength--);
50
- }
51
- } else {
52
- var lastRowCount = columnsLength % rowCount;
53
-
54
- while (lastRowCount--) {
55
- lastRowColumnsIndexList.push(columnsLength--);
56
- }
57
- }
58
-
59
- return lastRowColumnsIndexList.includes(itemIndex + 1);
60
- };
33
+ }
@@ -36,7 +36,7 @@ import { Tree } from '@alicloudfe/components';
36
36
  import { baseClass } from '@teamix/utils';
37
37
  import React, { useEffect, useMemo, useState } from 'react';
38
38
  import { renderTreeNode, renderTreeNodeDependenceValue } from '../tree-node';
39
- import { debounce } from 'lodash';
39
+ import debounce from 'lodash.debounce';
40
40
  import './index.scss';
41
41
  import '../tree-node/index.scss';
42
42
  import { findNodeWithPath, getAllNodeKey, getTreeLevelKey, loop } from '../../utils';
@@ -121,7 +121,11 @@ var ProSidebarTree = function ProSidebarTree(props) {
121
121
 
122
122
  useEffect(function () {
123
123
  setDefaultExpandedKeys();
124
- }, []); // 更新外部传入的 dataSource
124
+ }, []); // 监听 selectedKeys,用于受控
125
+
126
+ useEffect(function () {
127
+ setSelectedKeys(selectedKeysProp);
128
+ }, [selectedKeysProp]); // 更新外部传入的 dataSource
125
129
 
126
130
  useUpdateEffect(function () {
127
131
  setDataSource(processDataSource(dataSourceProp !== null && dataSourceProp !== void 0 ? dataSourceProp : []));
@@ -17,7 +17,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
17
17
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
18
18
 
19
19
  import { Balloon } from '@alicloudfe/components';
20
- import { baseClass } from '../../../../../../../utils/src';
20
+ import { baseClass } from '@teamix/utils';
21
21
  import React, { useEffect, useState } from 'react';
22
22
  import './index.scss';
23
23
  var cls = baseClass('teamix-pro-hover-tooltip');
@@ -33,7 +33,7 @@ var ProIconSwitch = function ProIconSwitch(props) {
33
33
  setVisible = _useState2[1];
34
34
 
35
35
  useEffect(function () {
36
- setVisible(visibleProp !== null && visibleProp !== void 0 ? visibleProp : false);
36
+ setVisible(visibleProp !== null && visibleProp !== void 0 ? visibleProp : true);
37
37
  }, [visibleProp]); // 点击操作
38
38
 
39
39
  var clickHandle = function clickHandle(e, state) {
@@ -29,9 +29,9 @@ import { ProActionGroup } from '../../../actions';
29
29
  import { baseClass, renderTags } from '@teamix/utils';
30
30
  import React, { isValidElement, useState } from 'react';
31
31
  import ProField from '@teamix/pro-field';
32
- import ProIconAction from './componnets/IconAction';
33
- import ProIconSwitch from './componnets/IconSwitch';
34
- import ProHoverTooltip from './componnets/HoverTooltip';
32
+ import ProIconAction from './components/IconAction';
33
+ import ProIconSwitch from './components/IconSwitch';
34
+ import ProHoverTooltip from './components/HoverTooltip';
35
35
  var cls = baseClass('teamix-pro-sidebar-tree');
36
36
 
37
37
  var ProSideBarTreeNode = function ProSideBarTreeNode(props) {
@@ -25,7 +25,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
25
25
  // 自适应宽度的翻页器
26
26
  import React, { useState, useEffect } from 'react';
27
27
  import { Pagination, Balloon, Select, Button, Input, Icon } from '@alicloudfe/components';
28
- import { getMessage, baseClass } from '@teamix/utils';
28
+ import { getMessage, baseClass, usePrefixCls } from '@teamix/utils';
29
29
  import { useResponsiveProps } from '@teamix/hooks';
30
30
  import './index.scss';
31
31
  var cls = baseClass('teamix-pro-pagination');
@@ -160,7 +160,7 @@ export default (function (props) {
160
160
  return /*#__PURE__*/React.createElement("div", {
161
161
  className: cls('custom-jumper')
162
162
  }, /*#__PURE__*/React.createElement(Button, {
163
- className: "next-prev next-pagination-item",
163
+ className: "".concat(usePrefixCls(), "prev ").concat(usePrefixCls(), "pagination-item"),
164
164
  onClick: handlePrevClick,
165
165
  disabled: Number(currentPage) <= 1
166
166
  }, /*#__PURE__*/React.createElement(Icon, {
@@ -182,7 +182,7 @@ export default (function (props) {
182
182
  marginRight: 4
183
183
  }
184
184
  }, "/"), getTotalPage(total, pageSize)), /*#__PURE__*/React.createElement(Button, {
185
- className: "next-next next-pagination-item",
185
+ className: "".concat(usePrefixCls(), "next ").concat(usePrefixCls(), "pagination-item"),
186
186
  onClick: handleNextClick,
187
187
  //@ts-ignore
188
188
  disabled: total && Number(currentPage) >= getTotalPage(total, pageSize)
@@ -200,7 +200,7 @@ export default (function (props) {
200
200
  }, otherProps));
201
201
  } else {
202
202
  return /*#__PURE__*/React.createElement("div", {
203
- className: "".concat(cls('custom-mini-pagination'), " next-pagination")
203
+ className: "".concat(cls('custom-mini-pagination'), " ").concat(usePrefixCls(), "pagination")
204
204
  }, customTotalRender(total), customJumpRender());
205
205
  }
206
206
  }
@@ -47,8 +47,12 @@ var processColumns = function processColumns(columns) {
47
47
  columns = columns.filter(function (item) {
48
48
  return item.valueType !== 'selectGroup';
49
49
  });
50
- }
50
+ } // hidden 为 true 时不展示
51
+
51
52
 
53
+ columns = columns.filter(function (item) {
54
+ return (item === null || item === void 0 ? void 0 : item.hidden) !== true;
55
+ });
52
56
  return columns.map(function (item) {
53
57
  if (item.columnFilters === false) {
54
58
  return item;
package/es/table/index.js CHANGED
@@ -36,7 +36,7 @@ import React, { useState, useEffect, useRef } from 'react';
36
36
  import { Table, Checkbox } from '@alicloudfe/components';
37
37
  import Pagination from './components/Pagination';
38
38
  import genProColumnToColumn from './utils/genProColumnToColumn';
39
- import { baseClass, useRequest, request as utilResquest, getDeepValue, getMessage, pickProps, getCookie } from '@teamix/utils';
39
+ import { baseClass, useRequest, request as utilResquest, getDeepValue, getMessage, pickProps, getCookie, usePrefixCls } from '@teamix/utils';
40
40
  import { ProSkeletonRaw as Skeleton } from '../skeleton';
41
41
  import './index.scss';
42
42
  import Layout from './components/Layout';
@@ -65,7 +65,7 @@ var processColumns = function processColumns(columns, initialColumns) {
65
65
  var _filterColumns;
66
66
 
67
67
  var filterColumns = columns.filter(function (item) {
68
- return item.columnFilters !== false;
68
+ return item.columnFilters !== false && (item === null || item === void 0 ? void 0 : item.hidden) !== true;
69
69
  });
70
70
 
71
71
  if (isRoot) {
@@ -269,7 +269,7 @@ var ProTable = function ProTable(props) {
269
269
 
270
270
  var tableDom = tableRef.current;
271
271
  var headerDom = tableDom === null || tableDom === void 0 ? void 0 : (_tableDom$getElements = tableDom.getElementsByClassName('teamix-pro-table-layout')) === null || _tableDom$getElements === void 0 ? void 0 : _tableDom$getElements[0];
272
- var tableHeaderDom = tableDom === null || tableDom === void 0 ? void 0 : (_tableDom$getElements2 = tableDom.getElementsByClassName('next-table-header-inner')) === null || _tableDom$getElements2 === void 0 ? void 0 : _tableDom$getElements2[0];
272
+ var tableHeaderDom = tableDom === null || tableDom === void 0 ? void 0 : (_tableDom$getElements2 = tableDom.getElementsByClassName("".concat(usePrefixCls(), "table-header-inner"))) === null || _tableDom$getElements2 === void 0 ? void 0 : _tableDom$getElements2[0];
273
273
  return new Promise(function (resolve) {
274
274
  setTimeout(function () {
275
275
  var _headerDom$offsetHeig, _tableHeaderDom$offse;
@@ -692,6 +692,11 @@ var ProTable = function ProTable(props) {
692
692
  setTotal(total || (data === null || data === void 0 ? void 0 : data.length));
693
693
  setShowSkeleton(false);
694
694
  setCustomTableLoading(false);
695
+ } // 重新计算是否需要吸底
696
+
697
+
698
+ if (footerSuction) {
699
+ getFooterSuctionState();
695
700
  }
696
701
  });
697
702
  } else {
@@ -750,7 +755,7 @@ var ProTable = function ProTable(props) {
750
755
  onInit: function onInit(values) {
751
756
  // 表单初始化请求处理
752
757
  (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onInit) && (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onInit(values));
753
- !fullscreenState && _request({}, false, values);
758
+ !fullscreenState && requestWhenMount && _request({}, false, values);
754
759
  return true;
755
760
  },
756
761
  onFilter: function onFilter(values) {