acud 0.0.65 → 0.0.66

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 (85) hide show
  1. package/dist/acud.css +76 -39
  2. package/dist/acud.css.map +1 -1
  3. package/dist/acud.js +458 -205
  4. package/dist/acud.js.map +1 -1
  5. package/dist/acud.min.css +1 -1
  6. package/dist/acud.min.css.map +1 -1
  7. package/dist/acud.min.js +10 -4
  8. package/dist/acud.min.js.map +1 -1
  9. package/es/breadcrumb/BreadcrumbItem.d.ts +1 -1
  10. package/es/breadcrumb/BreadcrumbItem.js +16 -4
  11. package/es/dialog-box/style/index.css +4 -4
  12. package/es/dropdown/dropdown-button.js +7 -1
  13. package/es/dropdown/style/index.css +2 -1
  14. package/es/dropdown/style/index.less +2 -1
  15. package/es/modal/Modal.d.ts +5 -0
  16. package/es/modal/Modal.js +6 -4
  17. package/es/modal/style/index.css +24 -14
  18. package/es/modal/style/index.less +18 -6
  19. package/es/modal/style/mixin.less +2 -2
  20. package/es/progress/style/common.less +5 -3
  21. package/es/progress/style/index.css +2 -1
  22. package/es/radio/index.d.ts +3 -0
  23. package/es/style/themes/dark/components/modal.less +14 -9
  24. package/es/style/themes/default/components/modal.less +14 -14
  25. package/es/time-picker/style/index.css +1 -0
  26. package/es/time-picker/style/index.less +1 -0
  27. package/es/transfer/{dataSource.d.ts → DataSource.d.ts} +1 -1
  28. package/es/transfer/{dataSource.js → DataSource.js} +37 -6
  29. package/{lib/transfer/sourceList.d.ts → es/transfer/SourceList.d.ts} +2 -2
  30. package/es/transfer/{sourceList.js → SourceList.js} +0 -0
  31. package/es/transfer/{target.d.ts → Target.d.ts} +1 -1
  32. package/es/transfer/{target.js → Target.js} +60 -4
  33. package/{lib/transfer/targetList.d.ts → es/transfer/TargetList.d.ts} +2 -2
  34. package/es/transfer/{targetList.js → TargetList.js} +0 -0
  35. package/es/transfer/index.d.ts +3 -0
  36. package/es/transfer/index.js +9 -4
  37. package/es/transfer/style/css.js +3 -1
  38. package/es/transfer/style/index.css +25 -5
  39. package/es/transfer/style/index.d.ts +1 -0
  40. package/es/transfer/style/index.js +3 -1
  41. package/es/transfer/style/index.less +30 -5
  42. package/es/upload/UploadList/ListItem.js +7 -2
  43. package/es/upload/UploadList/index.js +4 -7
  44. package/es/upload/style/index.css +17 -13
  45. package/es/upload/style/index.less +25 -20
  46. package/es/upload/utils.js +1 -1
  47. package/lib/breadcrumb/BreadcrumbItem.d.ts +1 -1
  48. package/lib/breadcrumb/BreadcrumbItem.js +21 -8
  49. package/lib/dialog-box/style/index.css +4 -4
  50. package/lib/dropdown/dropdown-button.js +7 -1
  51. package/lib/dropdown/style/index.css +2 -1
  52. package/lib/dropdown/style/index.less +2 -1
  53. package/lib/modal/Modal.d.ts +5 -0
  54. package/lib/modal/Modal.js +6 -4
  55. package/lib/modal/style/index.css +24 -14
  56. package/lib/modal/style/index.less +18 -6
  57. package/lib/modal/style/mixin.less +2 -2
  58. package/lib/progress/style/common.less +5 -3
  59. package/lib/progress/style/index.css +2 -1
  60. package/lib/radio/index.d.ts +3 -0
  61. package/lib/style/themes/dark/components/modal.less +14 -9
  62. package/lib/style/themes/default/components/modal.less +14 -14
  63. package/lib/time-picker/style/index.css +1 -0
  64. package/lib/time-picker/style/index.less +1 -0
  65. package/lib/transfer/{dataSource.d.ts → DataSource.d.ts} +1 -1
  66. package/lib/transfer/{dataSource.js → DataSource.js} +38 -6
  67. package/{es/transfer/sourceList.d.ts → lib/transfer/SourceList.d.ts} +2 -2
  68. package/lib/transfer/{sourceList.js → SourceList.js} +0 -0
  69. package/lib/transfer/{target.d.ts → Target.d.ts} +1 -1
  70. package/lib/transfer/{target.js → Target.js} +63 -5
  71. package/{es/transfer/targetList.d.ts → lib/transfer/TargetList.d.ts} +2 -2
  72. package/lib/transfer/{targetList.js → TargetList.js} +0 -0
  73. package/lib/transfer/index.d.ts +3 -0
  74. package/lib/transfer/index.js +11 -7
  75. package/lib/transfer/style/css.js +3 -1
  76. package/lib/transfer/style/index.css +25 -5
  77. package/lib/transfer/style/index.d.ts +1 -0
  78. package/lib/transfer/style/index.js +3 -1
  79. package/lib/transfer/style/index.less +30 -5
  80. package/lib/upload/UploadList/ListItem.js +7 -2
  81. package/lib/upload/UploadList/index.js +4 -7
  82. package/lib/upload/style/index.css +17 -13
  83. package/lib/upload/style/index.less +25 -20
  84. package/lib/upload/utils.js +1 -1
  85. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  import { BaseDropdownProps } from '../dropdown/dropdown';
3
3
  export interface BreadcrumbItemProps {
4
4
  prefixCls?: string;
@@ -1,4 +1,5 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
3
 
3
4
  var __rest = this && this.__rest || function (s, e) {
4
5
  var t = {};
@@ -13,8 +14,8 @@ var __rest = this && this.__rest || function (s, e) {
13
14
  return t;
14
15
  };
15
16
 
16
- import * as React from 'react';
17
- import { OutlinedDown } from 'acud-icon';
17
+ import React, { useCallback, useState } from 'react';
18
+ import { OutlinedDown, OutlinedUp } from 'acud-icon';
18
19
  import DropDown from '../dropdown/dropdown';
19
20
  import { ConfigContext } from '../config-provider';
20
21
 
@@ -27,21 +28,32 @@ var BreadcrumbItem = function BreadcrumbItem(_a) {
27
28
  dropdownProps = _a.dropdownProps,
28
29
  restProps = __rest(_a, ["prefixCls", "separator", "children", "overlay", "dropdownProps"]);
29
30
 
31
+ var _useState = useState(false),
32
+ _useState2 = _slicedToArray(_useState, 2),
33
+ visible = _useState2[0],
34
+ setVisible = _useState2[1];
35
+
30
36
  var _React$useContext = React.useContext(ConfigContext),
31
37
  getPrefixCls = _React$useContext.getPrefixCls;
32
38
 
33
39
  var prefixCls = getPrefixCls('breadcrumb', customizePrefixCls);
40
+ var handleVisibleChange = useCallback(function (visible) {
41
+ setVisible(visible);
42
+ }, []);
34
43
  /** If overlay is have Wrap a DropDown */
35
44
 
36
45
  var renderBreadcrumbNode = function renderBreadcrumbNode(breadcrumbItem) {
37
46
  if (overlay) {
38
47
  return /*#__PURE__*/React.createElement(DropDown, _extends({
39
48
  overlay: overlay,
49
+ visible: visible,
40
50
  placement: "bottomCenter",
41
51
  overlayClassName: "".concat(prefixCls, "-dropdown")
42
- }, dropdownProps), /*#__PURE__*/React.createElement("span", {
52
+ }, dropdownProps, {
53
+ onVisibleChange: handleVisibleChange
54
+ }), /*#__PURE__*/React.createElement("span", {
43
55
  className: "".concat(prefixCls, "-overlay-link")
44
- }, breadcrumbItem, /*#__PURE__*/React.createElement(OutlinedDown, null)));
56
+ }, breadcrumbItem, visible ? /*#__PURE__*/React.createElement(OutlinedUp, null) : /*#__PURE__*/React.createElement(OutlinedDown, null)));
45
57
  }
46
58
 
47
59
  return breadcrumbItem;
@@ -58,19 +58,19 @@
58
58
  }
59
59
  .acud-dialogbox-sm {
60
60
  width: 520px;
61
- max-height: 240px;
61
+ max-height: 560px;
62
62
  }
63
63
  .acud-dialogbox-md {
64
64
  width: 800px;
65
- max-height: 400px;
65
+ max-height: 560px;
66
66
  }
67
67
  .acud-dialogbox-lg {
68
68
  width: 1120px;
69
- max-height: 480px;
69
+ max-height: 560px;
70
70
  }
71
71
  .acud-dialogbox-xl {
72
72
  width: 1200px;
73
- max-height: 480px;
73
+ max-height: 560px;
74
74
  }
75
75
  .acud-dialogbox-content {
76
76
  position: relative;
@@ -35,7 +35,10 @@ var DropdownButton = function DropdownButton(props) {
35
35
  trigger = props.trigger,
36
36
  visible = props.visible,
37
37
  onVisibleChange = props.onVisibleChange,
38
- restProps = __rest(props, ["children", "overlay", "disabled", "trigger", "visible", "onVisibleChange"]); // 菜单可见,需要将ICON旋转
38
+ overlayClassName = props.overlayClassName,
39
+ overlayStyle = props.overlayStyle,
40
+ getPopupContainer = props.getPopupContainer,
41
+ restProps = __rest(props, ["children", "overlay", "disabled", "trigger", "visible", "onVisibleChange", "overlayClassName", "overlayStyle", "getPopupContainer"]); // 菜单可见,需要将ICON旋转
39
42
 
40
43
 
41
44
  var _useState = useState(!!visible),
@@ -58,6 +61,9 @@ var DropdownButton = function DropdownButton(props) {
58
61
  placement: "bottomRight",
59
62
  trigger: trigger,
60
63
  overlay: overlay,
64
+ overlayClassName: overlayClassName,
65
+ overlayStyle: overlayStyle,
66
+ getPopupContainer: getPopupContainer,
61
67
  visible: popupVisible,
62
68
  onVisibleChange: handleVisibleChange
63
69
  }, /*#__PURE__*/React.createElement(Button, _extends({
@@ -93,9 +93,10 @@
93
93
  margin-top: -8px;
94
94
  font-size: 12px;
95
95
  line-height: 16px;
96
+ transition: transform 0.48s;
96
97
  }
97
98
  .acud-dropdown-trigger-arrow-expand {
98
- transform: rotate(-180deg);
99
+ transform: rotate(180deg);
99
100
  }
100
101
  .acud-dropdown-trigger-arrow > svg {
101
102
  width: 16px;
@@ -72,9 +72,10 @@
72
72
  margin-top: -2 * @P;
73
73
  font-size: @T2;
74
74
  line-height: 4 * @P;
75
+ transition: transform .48s;
75
76
 
76
77
  &-expand {
77
- transform: rotate(-180deg);
78
+ transform: rotate(180deg);
78
79
  }
79
80
 
80
81
  & > svg {
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import { ButtonProps } from '../button';
2
3
  declare enum SizeType {
3
4
  'small' = "sm",
4
5
  'normal' = "md",
@@ -14,8 +15,12 @@ export interface ModalProps {
14
15
  confirmLoading?: boolean;
15
16
  /** 弹框标题 */
16
17
  title?: React.ReactNode;
18
+ /** 确认按钮 props */
19
+ okButtonProps?: ButtonProps;
17
20
  /** 点击确定回调 */
18
21
  onOk?: (e: React.MouseEvent<HTMLElement>) => void;
22
+ /** 取消按钮 props */
23
+ cancelButtonProps?: ButtonProps;
19
24
  /** 点击模态框右上角叉、取消按钮、Props.maskClosable 值为 true 时的遮罩层或键盘按下 Esc 时的回调 */
20
25
  onCancel?: (e: React.MouseEvent<HTMLElement>) => void;
21
26
  afterClose?: () => void;
package/es/modal/Modal.js CHANGED
@@ -63,15 +63,17 @@ var Modal = function Modal(props) {
63
63
  var renderFooter = function renderFooter() {
64
64
  var okText = props.okText,
65
65
  cancelText = props.cancelText,
66
- confirmLoading = props.confirmLoading;
67
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
66
+ confirmLoading = props.confirmLoading,
67
+ okButtonProps = props.okButtonProps,
68
+ cancelButtonProps = props.cancelButtonProps;
69
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, _extends({
68
70
  onClick: handleCancel,
69
71
  type: "default"
70
- }, cancelText || '取消'), /*#__PURE__*/React.createElement(Button, {
72
+ }, cancelButtonProps), cancelText || '取消'), /*#__PURE__*/React.createElement(Button, _extends({
71
73
  onClick: handleOk,
72
74
  loading: confirmLoading,
73
75
  type: "primary"
74
- }, okText || '确定'));
76
+ }, okButtonProps), okText || '确定'));
75
77
  };
76
78
 
77
79
  var visible = props.visible,
@@ -55,25 +55,25 @@
55
55
  -webkit-overflow-scrolling: touch;
56
56
  z-index: 1000;
57
57
  }
58
- .acud-modal-sm {
58
+ .acud-modal-sm > .acud-modal-content {
59
59
  width: 520px;
60
- height: 240px;
61
- max-height: 240px;
60
+ min-height: 240px;
61
+ max-height: 560px;
62
62
  }
63
- .acud-modal-md {
63
+ .acud-modal-md > .acud-modal-content {
64
64
  width: 800px;
65
- height: 400px;
66
- max-height: 400px;
65
+ min-height: 400px;
66
+ max-height: 560px;
67
67
  }
68
- .acud-modal-lg {
68
+ .acud-modal-lg > .acud-modal-content {
69
69
  width: 1120px;
70
- height: 480px;
71
- max-height: 480px;
70
+ min-height: 480px;
71
+ max-height: 560px;
72
72
  }
73
- .acud-modal-xl {
73
+ .acud-modal-xl > .acud-modal-content {
74
74
  width: 1200px;
75
- height: 480px;
76
- max-height: 480px;
75
+ min-height: 480px;
76
+ max-height: 560px;
77
77
  }
78
78
  .acud-modal-content {
79
79
  position: relative;
@@ -126,6 +126,7 @@
126
126
  .acud-modal-title {
127
127
  font-size: 14px;
128
128
  line-height: 22px;
129
+ padding-right: 12px;
129
130
  word-wrap: break-word;
130
131
  }
131
132
  .acud-modal-body {
@@ -165,12 +166,21 @@
165
166
  align-items: center;
166
167
  padding-top: 2px;
167
168
  }
168
- .acud-modal-dialogbox .acud-modal-title .acudicon {
169
- font-size: 20px;
169
+ .acud-modal-dialogbox-title {
170
+ overflow: hidden;
171
+ padding-right: 12px;
170
172
  }
171
173
  .acud-modal-dialogbox-content {
174
+ width: 400px;
172
175
  padding-left: 32px;
173
176
  }
177
+ .acud-modal-dialogbox .acud-modal-title .acudicon {
178
+ font-size: 20px;
179
+ }
180
+ .acud-modal-dialogbox > .acud-modal-content {
181
+ width: 400px;
182
+ min-height: 184px;
183
+ }
174
184
  .acud-modal-dialogbox-warning .acud-modal-dialogbox-icon {
175
185
  color: #FF9326;
176
186
  }
@@ -18,19 +18,19 @@
18
18
  width: auto;
19
19
  max-width: calc(100vw - 32px);
20
20
 
21
- &-sm {
21
+ &-sm > &-content {
22
22
  .modal-size-config(sm);
23
23
  }
24
24
 
25
- &-md {
25
+ &-md > &-content {
26
26
  .modal-size-config(md);
27
27
  }
28
28
 
29
- &-lg {
29
+ &-lg > &-content {
30
30
  .modal-size-config(lg);
31
31
  }
32
32
 
33
- &-xl {
33
+ &-xl > &-content {
34
34
  .modal-size-config(xl);
35
35
  }
36
36
 
@@ -94,6 +94,7 @@
94
94
  &-title {
95
95
  font-size: @modal-heading-font-size;
96
96
  line-height: @modal-heading-height;
97
+ padding-right: @P * 3;
97
98
  word-wrap: break-word;
98
99
  }
99
100
 
@@ -143,14 +144,25 @@
143
144
  padding-top: 2px;
144
145
  }
145
146
 
147
+ &-title {
148
+ overflow: hidden;
149
+ padding-right: @P * 3;
150
+ }
151
+
152
+ &-content {
153
+ width: @P * 100;
154
+ padding-left: @P * 3 + @T6;
155
+ }
156
+
146
157
  .@{modal-prefix-cls}-title {
147
158
  .acudicon {
148
159
  font-size: @T6;
149
160
  }
150
161
  }
151
162
 
152
- &-content {
153
- padding-left: @P * 3 + @T6;
163
+ & > .@{modal-prefix-cls}-content {
164
+ width: @P * 100;
165
+ min-height: @P * 46;
154
166
  }
155
167
  }
156
168
 
@@ -39,9 +39,9 @@
39
39
 
40
40
  .modal-size-config(@type) {
41
41
  @width: ~'modal-width-@{type}';
42
- @height: ~'modal-height-@{type}';
42
+ @min-height: ~'modal-height-@{type}';
43
43
  @max-height: ~'modal-max-height-@{type}';
44
44
  width: @@width;
45
- height: @@height;
45
+ min-height: @@min-height;
46
46
  max-height: @@max-height;
47
47
  }
@@ -29,6 +29,8 @@
29
29
  }
30
30
  }
31
31
 
32
- .@{progress-prefix-cls}-label-hidden .@{progress-prefix-cls}-label {
33
- display: none;
34
- }
32
+ .@{progress-prefix-cls}-label-hidden .@{progress-prefix-cls}-label{
33
+ &.@{progress-prefix-cls}-label-outer, &.@{progress-prefix-cls}-label-inner{
34
+ display: none;
35
+ }
36
+ }
@@ -23,7 +23,8 @@
23
23
  .acud-progress-success .acud-progress-label-icon {
24
24
  font-size: 0;
25
25
  }
26
- .acud-progress-label-hidden .acud-progress-label {
26
+ .acud-progress-label-hidden .acud-progress-label.acud-progress-label-outer,
27
+ .acud-progress-label-hidden .acud-progress-label.acud-progress-label-inner {
27
28
  display: none;
28
29
  }
29
30
  .acud-progress-line {
@@ -1,2 +1,5 @@
1
1
  import Radio from './Radio';
2
+ export { RadioProps } from './Radio';
3
+ export { ContextProps } from './context';
4
+ export { BaseRadioGourpProps } from './RadioGroup';
2
5
  export default Radio;
@@ -10,15 +10,20 @@
10
10
  @modal-mask-color: fade(@G5, 50%);
11
11
 
12
12
  // 默认宽高设置
13
- @modal-width-sm: 100*@P;
14
- @modal-width-md: 150*@P;
15
- @modal-width-lg: 200*@P;
16
- @modal-width-xl: 300*@P;
17
-
18
- @modal-max-height-sm: 160*@P;
19
- @modal-max-height-md: 160*@P;
20
- @modal-max-height-lg: 160*@P;
21
- @modal-max-height-xl: 160*@P;
13
+ @modal-width-sm: 100 * @P;
14
+ @modal-width-md: 150 * @P;
15
+ @modal-width-lg: 200 * @P;
16
+ @modal-width-xl: 300 * @P;
17
+
18
+ @modal-max-height-sm: 140 * @P;
19
+ @modal-max-height-md: 140 * @P;
20
+ @modal-max-height-lg: 140 * @P;
21
+ @modal-max-height-xl: 140 * @P;
22
+
23
+ @modal-height-sm: 60 * @P;
24
+ @modal-height-md: 100 * @P;
25
+ @modal-height-lg: 120 * @P;
26
+ @modal-height-xl: 120 * @P;
22
27
 
23
28
  // Content
24
29
  @modal-content-bg-color: @G11;
@@ -10,20 +10,20 @@
10
10
  @modal-mask-color: fade(@G5, 50%);
11
11
 
12
12
  // 默认宽高设置
13
- @modal-width-sm: 130*@P;
14
- @modal-width-md: 200*@P;
15
- @modal-width-lg: 280*@P;
16
- @modal-width-xl: 300*@P;
17
-
18
- @modal-max-height-sm: 60*@P;
19
- @modal-max-height-md: 100*@P;
20
- @modal-max-height-lg: 120*@P;
21
- @modal-max-height-xl: 120*@P;
22
-
23
- @modal-height-sm: 60*@P;
24
- @modal-height-md: 100*@P;
25
- @modal-height-lg: 120*@P;
26
- @modal-height-xl: 120*@P;
13
+ @modal-width-sm: 130 * @P;
14
+ @modal-width-md: 200 * @P;
15
+ @modal-width-lg: 280 * @P;
16
+ @modal-width-xl: 300 * @P;
17
+
18
+ @modal-max-height-sm: 140 * @P;
19
+ @modal-max-height-md: 140 * @P;
20
+ @modal-max-height-lg: 140 * @P;
21
+ @modal-max-height-xl: 140 * @P;
22
+
23
+ @modal-height-sm: 60 * @P;
24
+ @modal-height-md: 100 * @P;
25
+ @modal-height-lg: 120 * @P;
26
+ @modal-height-xl: 120 * @P;
27
27
 
28
28
  // Content
29
29
  @modal-content-bg-color: @G11;
@@ -231,6 +231,7 @@
231
231
  text-align: left;
232
232
  color: #2468F2;
233
233
  cursor: pointer;
234
+ margin-top: 0;
234
235
  }
235
236
  .acud-time-panel-wrap .acud-picker-decade-panel .acud-picker-cell-inner {
236
237
  padding: 0 6px;
@@ -183,6 +183,7 @@
183
183
  text-align: left;
184
184
  color: @picker-time-active-color;
185
185
  cursor: pointer;
186
+ margin-top: 0;
186
187
  }
187
188
  // ===================== Decade Panel =====================
188
189
  &-decade-panel {
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { TransferItem, TransferProps } from './';
2
+ import { TransferItem, TransferProps } from '.';
3
3
  export interface DataSourceProps<RecordType> extends TransferProps<RecordType> {
4
4
  tKeys: string[];
5
5
  setTKeys: (t: string[]) => void;
@@ -9,20 +9,26 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
9
9
  import * as React from 'react';
10
10
  import cloneDeep from 'lodash/cloneDeep';
11
11
  import Checkbox from '../checkbox';
12
+ import Table from '../table';
12
13
  import Search from '../search';
13
- import SourceList from './sourceList';
14
+ import SourceList from './SourceList';
14
15
 
15
16
  var defaultFilterOption = function defaultFilterOption(inputValue, option) {
16
17
  return option.title.indexOf(inputValue) > -1;
17
18
  };
18
19
 
20
+ var defaultTableFilterOption = function defaultTableFilterOption(inputValue, option) {
21
+ return option.key.indexOf(inputValue) > -1;
22
+ };
23
+
19
24
  export default function dataSource(props) {
20
25
  var prefixCls = props.prefixCls,
26
+ displayType = props.displayType,
27
+ columns = props.columns,
21
28
  expansionSource = props.expansionSource,
22
29
  _props$showSelectAll = props.showSelectAll,
23
30
  showSelectAll = _props$showSelectAll === void 0 ? true : _props$showSelectAll,
24
- _props$filterOption = props.filterOption,
25
- filterOption = _props$filterOption === void 0 ? defaultFilterOption : _props$filterOption,
31
+ filterOptionProp = props.filterOption,
26
32
  showSearch = props.showSearch,
27
33
  _props$showSearchClea = props.showSearchClear,
28
34
  showSearchClear = _props$showSearchClea === void 0 ? true : _props$showSearchClea,
@@ -30,6 +36,7 @@ export default function dataSource(props) {
30
36
  setTKeys = props.setTKeys,
31
37
  leftStyle = props.leftStyle,
32
38
  locale = props.locale;
39
+ var filterOption = filterOptionProp || (displayType === 'table' ? defaultTableFilterOption : defaultFilterOption);
33
40
  var dataSourceCls = "".concat(prefixCls, "-datasource");
34
41
  var sourceTitle = locale.sourceTitle,
35
42
  searchPlaceholder = locale.searchPlaceholder,
@@ -79,7 +86,7 @@ export default function dataSource(props) {
79
86
  }
80
87
  });
81
88
  return fileterCloneSource;
82
- }, [searchValue, expansionSource]);
89
+ }, [searchValue, expansionSource, displayType]);
83
90
  var totalUndisabledKeys = React.useMemo(function () {
84
91
  var unDisabledDataSource = filterSource.filter(function (data) {
85
92
  return !data.group && !data.disabled;
@@ -112,14 +119,31 @@ export default function dataSource(props) {
112
119
  var searchValue = e.target.value;
113
120
  setSearchValue(searchValue);
114
121
  }, []);
122
+
123
+ var onSelectChange = function onSelectChange(v) {
124
+ // 排除filter中包含的tKeys,记为noneFilterKeys
125
+ // 联合noneFilterKeys与filter中的选择项,记为最终keys
126
+ var noneFilterKeys = tKeys.filter(function (key) {
127
+ return !filterSource.some(function (item) {
128
+ return item.key === key;
129
+ });
130
+ });
131
+ setTKeys([].concat(_toConsumableArray(noneFilterKeys), _toConsumableArray(v)));
132
+ };
133
+
134
+ var rowSelection = {
135
+ onChange: onSelectChange,
136
+ selectedRowKeys: tKeys
137
+ };
115
138
  return /*#__PURE__*/React.createElement("div", {
116
139
  className: dataSourceCls,
117
140
  style: leftStyle
118
141
  }, /*#__PURE__*/React.createElement("div", {
119
142
  className: "".concat(dataSourceCls, "-header")
120
- }, showSelectAll && /*#__PURE__*/React.createElement(Checkbox, {
143
+ }, showSelectAll && displayType === 'single' && /*#__PURE__*/React.createElement(Checkbox, {
121
144
  checked: allChecked,
122
145
  indeterminate: indeterminate,
146
+ className: "".concat(dataSourceCls, "-header-checkall"),
123
147
  onClick: selectAll
124
148
  }), /*#__PURE__*/React.createElement("span", {
125
149
  className: "".concat(dataSourceCls, "-label")
@@ -131,7 +155,14 @@ export default function dataSource(props) {
131
155
  allowClear: showSearchClear,
132
156
  size: "small",
133
157
  onChange: searchChange
134
- }), !!filterSource.length && /*#__PURE__*/React.createElement(SourceList, _extends({}, props, {
158
+ }), !!filterSource.length && displayType === 'table' && /*#__PURE__*/React.createElement("div", {
159
+ className: "".concat(prefixCls, "-table-box")
160
+ }, /*#__PURE__*/React.createElement(Table, {
161
+ pagination: false,
162
+ dataSource: filterSource,
163
+ columns: columns,
164
+ rowSelection: rowSelection
165
+ })), !!filterSource.length && displayType === 'single' && /*#__PURE__*/React.createElement(SourceList, _extends({}, props, {
135
166
  filterSource: filterSource
136
167
  })), filterSource.length === 0 && /*#__PURE__*/React.createElement("p", {
137
168
  className: "".concat(dataSourceCls, "-nodata")
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { DataSourceProps } from './dataSource';
3
- import { TransferItem } from './';
2
+ import { DataSourceProps } from './DataSource';
3
+ import { TransferItem } from '.';
4
4
  export interface DataSourceListProps<RecordType> extends DataSourceProps<RecordType> {
5
5
  filterSource: RecordType[];
6
6
  }
File without changes
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { TransferItem, TransferProps } from './';
2
+ import { TransferItem, TransferProps } from '.';
3
3
  export interface DataSourceProps<RecordType> extends TransferProps<RecordType> {
4
4
  tKeys: string[];
5
5
  setTKeys: (t: string[]) => void;
@@ -1,5 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
3
+ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
3
4
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
4
5
 
5
6
  /*
@@ -7,8 +8,10 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
7
8
  * author zhousheng
8
9
  */
9
10
  import * as React from 'react';
10
- import classnames from 'classnames';
11
- import TargetList from './targetList';
11
+ import classnames from 'classnames/dedupe';
12
+ import { OutlinedClose } from 'acud-icon';
13
+ import Table from '../table';
14
+ import TargetList from './TargetList';
12
15
  import Search from '../search';
13
16
 
14
17
  var defaultFilterOption = function defaultFilterOption(inputValue, option) {
@@ -19,6 +22,7 @@ export default function target(props) {
19
22
  var _classnames;
20
23
 
21
24
  var prefixCls = props.prefixCls,
25
+ displayType = props.displayType,
22
26
  _props$showClearAll = props.showClearAll,
23
27
  showClearAll = _props$showClearAll === void 0 ? true : _props$showClearAll,
24
28
  _props$filterOption = props.filterOption,
@@ -30,7 +34,8 @@ export default function target(props) {
30
34
  setTKeys = props.setTKeys,
31
35
  rightStyle = props.rightStyle,
32
36
  locale = props.locale,
33
- expansionSource = props.expansionSource;
37
+ expansionSource = props.expansionSource,
38
+ columns = props.columns;
34
39
  var targetCls = "".concat(prefixCls, "-target");
35
40
  var targetTitle = locale.targetTitle,
36
41
  searchPlaceholder = locale.searchPlaceholder,
@@ -105,6 +110,51 @@ export default function target(props) {
105
110
  var searchValue = e.target.value;
106
111
  setSearchValue(searchValue);
107
112
  }, []);
113
+ var targetColumns = React.useMemo(function () {
114
+ if (!columns) {
115
+ return;
116
+ }
117
+
118
+ var cancelItem = function cancelItem(data) {
119
+ if (data.disabled) {
120
+ return;
121
+ }
122
+
123
+ var curTKeys = _toConsumableArray(tKeys);
124
+
125
+ if (data.group) {
126
+ var deleteKeys = data.childrenKeys;
127
+ curTKeys = curTKeys.filter(function (tKey) {
128
+ return !deleteKeys.includes(tKey);
129
+ });
130
+ } else if (curTKeys.includes(data.key)) {
131
+ curTKeys.splice(curTKeys.indexOf(data.key), 1);
132
+ }
133
+
134
+ setTKeys(curTKeys);
135
+ };
136
+
137
+ var tColumns = _toConsumableArray(columns);
138
+
139
+ tColumns.push({
140
+ title: '',
141
+ key: 'action',
142
+ width: 40,
143
+ render: function render(_text, data) {
144
+ if (!data.disabled) {
145
+ return /*#__PURE__*/React.createElement(OutlinedClose, {
146
+ className: "".concat(prefixCls, "-target-item-cancel"),
147
+ onClick: function onClick() {
148
+ return cancelItem(data);
149
+ }
150
+ });
151
+ }
152
+
153
+ return null;
154
+ }
155
+ });
156
+ return tColumns;
157
+ }, [columns, tKeys]);
108
158
  var clearCls = classnames((_classnames = {}, _defineProperty(_classnames, "".concat(targetCls, "-clear-all"), true), _defineProperty(_classnames, "".concat(targetCls, "-clear-all-disabled"), filterSource.length === totalDisabledKeys.length), _classnames));
109
159
  return /*#__PURE__*/React.createElement("div", {
110
160
  className: targetCls,
@@ -125,7 +175,13 @@ export default function target(props) {
125
175
  allowClear: showSearchClear,
126
176
  size: "small",
127
177
  onChange: searchChange
128
- }), !!filterSource.length && /*#__PURE__*/React.createElement(TargetList, _extends({}, props, {
178
+ }), !!filterSource.length && displayType === 'table' && /*#__PURE__*/React.createElement("div", {
179
+ className: "".concat(prefixCls, "-table-box")
180
+ }, /*#__PURE__*/React.createElement(Table, {
181
+ pagination: false,
182
+ dataSource: filterSource,
183
+ columns: targetColumns
184
+ })), !!filterSource.length && displayType === 'single' && /*#__PURE__*/React.createElement(TargetList, _extends({}, props, {
129
185
  filterSource: filterSource
130
186
  })), filterSource.length === 0 && /*#__PURE__*/React.createElement("p", {
131
187
  className: "".concat(prefixCls, "-target-nodata")