@vtx/components 4.0.0-beta.8 → 4.0.0-beta.81

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 (196) hide show
  1. package/README.md +19 -19
  2. package/es/index.js +3 -0
  3. package/es/utils/components/LabelIconTip/index.js +7 -7
  4. package/es/utils/conversionMomentValue/index.js +25 -25
  5. package/es/utils/filterSpecialCharacters.js +53 -52
  6. package/es/utils/genCopyable/index.js +6 -6
  7. package/es/utils/getFieldPropsOrFormItemProps/index.js +7 -7
  8. package/es/utils/hooks/useDebounceFn/index.js +4 -4
  9. package/es/utils/hooks/useDebounceValue/index.js +6 -6
  10. package/es/utils/hooks/useDeepCompareMemo/index.js +7 -7
  11. package/es/utils/hooks/useLatest/index.js +2 -2
  12. package/es/utils/hooks/useRefCallback/index.js +5 -5
  13. package/es/utils/index.js +1 -2
  14. package/es/utils/isBrowser/index.js +7 -7
  15. package/es/utils/isUrl/index.js +4 -4
  16. package/es/utils/merge/index.js +4 -4
  17. package/es/utils/nanoid/index.js +4 -4
  18. package/es/utils/omitBoolean/index.js +4 -4
  19. package/es/utils/parseValueToMoment/index.js +4 -4
  20. package/es/utils/proFieldParsingText/index.js +10 -10
  21. package/es/utils/transformKeySubmitValue/index.js +57 -57
  22. package/es/utils/useEditableArray/index.js +46 -46
  23. package/es/utils/useEditableMap/index.js +22 -22
  24. package/es/utils/useMediaQuery/index.js +5 -5
  25. package/es/vtx-combogrid/Combogrid.js +5 -4
  26. package/es/vtx-combogrid/index.js +7 -4
  27. package/es/vtx-datagrid/Store/Provide.js +106 -137
  28. package/es/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +11 -7
  29. package/es/vtx-datagrid/ToolBar/components/ColumnSetting/style.js +5 -2
  30. package/es/vtx-datagrid/ToolBar/components/Density/index.js +3 -0
  31. package/es/vtx-datagrid/ToolBar/components/TableStyle/index.js +3 -0
  32. package/es/vtx-datagrid/columnState.js +91 -0
  33. package/es/vtx-datagrid/index.js +124 -32
  34. package/es/vtx-datagrid/mergeComponents.js +15 -0
  35. package/es/vtx-datagrid/renderColumnButtons.js +30 -11
  36. package/es/vtx-datagrid/style/index.js +102 -20
  37. package/es/vtx-datagrid/style/index.less +242 -242
  38. package/es/vtx-date-picker/QdatePicker.js +1 -1
  39. package/es/vtx-date-picker/style/index.less +39 -39
  40. package/es/vtx-descriptions/Descriptions.js +29 -0
  41. package/es/vtx-descriptions/index.js +3 -0
  42. package/es/vtx-descriptions/style/index.js +19 -0
  43. package/es/vtx-ellipsis-text/index.js +7 -2
  44. package/es/vtx-ellipsis-text/style/index.js +3 -1
  45. package/es/vtx-export/index.js +33 -33
  46. package/es/vtx-export-async/History.js +15 -7
  47. package/es/vtx-export-async/index.js +45 -15
  48. package/es/vtx-export-async/util.js +16 -5
  49. package/es/vtx-form-layout/Card.js +10 -10
  50. package/es/vtx-form-layout/Divider.js +1 -1
  51. package/es/vtx-form-layout/FormItem.js +16 -16
  52. package/es/vtx-form-layout/Pane.js +23 -12
  53. package/es/vtx-icon/index.js +54 -45
  54. package/es/vtx-icon/index.js1 +90 -0
  55. package/es/vtx-image/Preview.js +11 -6
  56. package/es/vtx-image/style/index.js +0 -1
  57. package/es/vtx-import/index.js +211 -70
  58. package/es/vtx-import/result.js +28 -26
  59. package/es/vtx-import/style/index.js +16 -1
  60. package/es/vtx-import2/Content.js +2 -1
  61. package/es/vtx-import2/index.js +30 -19
  62. package/es/vtx-import2/style/index.js +60 -9
  63. package/es/vtx-modal/index.js +11 -6
  64. package/es/vtx-page-layout/Basic.js +2 -2
  65. package/es/vtx-page-layout/TabLayout.js +6 -6
  66. package/es/vtx-page-layout/TableLayout.js +10 -10
  67. package/es/vtx-page-layout/TreeLayout.js +6 -6
  68. package/es/vtx-page-layout/container.js +2 -2
  69. package/es/vtx-page-layout/style/index.js +4 -2
  70. package/es/vtx-provider/index.js +37 -33
  71. package/es/vtx-provider/intl.js +9 -9
  72. package/es/vtx-provider/locale/en_US.js +57 -3
  73. package/es/vtx-provider/locale/zh_CN.js +57 -3
  74. package/es/vtx-provider/useStyle/index.js +17 -17
  75. package/es/vtx-search/index.js +13 -9
  76. package/es/vtx-search/style/index.js +2 -1
  77. package/es/vtx-select/index.js +102 -36
  78. package/es/vtx-select/style/index.js +11 -56
  79. package/es/vtx-signature/index.js +5 -4
  80. package/es/vtx-signature/style/index.js +1 -1
  81. package/es/vtx-split-pane/Resizer.js +0 -1
  82. package/es/vtx-split-pane/SplitPane.js +42 -34
  83. package/es/vtx-split-pane/style/index.js +8 -112
  84. package/es/vtx-time-picker/index.js +27 -1
  85. package/es/vtx-transfer/Transfer.js +29 -0
  86. package/es/vtx-transfer/index.js +3 -0
  87. package/es/vtx-transfer/style/index.js +19 -0
  88. package/es/vtx-transfer-select/TransferSelect.js +143 -0
  89. package/es/vtx-transfer-select/index.js +3 -0
  90. package/es/vtx-transfer-select/style/index.js +19 -0
  91. package/es/vtx-tree/index.js +98 -35
  92. package/es/vtx-tree-select/index.js +71 -105
  93. package/es/vtx-tree-select/style/index.js +9 -3
  94. package/es/vtx-upload/FilePreview.js +2 -1
  95. package/es/vtx-wang-editor/index.js +93 -39
  96. package/es/vtx-wang-editor/style/index.less +12 -12
  97. package/es/vtx-wang-editor/wangEditorUtil.js +4 -0
  98. package/lib/index.js +36 -0
  99. package/lib/utils/components/LabelIconTip/index.js +7 -7
  100. package/lib/utils/conversionMomentValue/index.js +25 -25
  101. package/lib/utils/filterSpecialCharacters.js +54 -52
  102. package/lib/utils/genCopyable/index.js +6 -6
  103. package/lib/utils/getFieldPropsOrFormItemProps/index.js +7 -7
  104. package/lib/utils/hooks/useDebounceFn/index.js +4 -4
  105. package/lib/utils/hooks/useDebounceValue/index.js +6 -6
  106. package/lib/utils/hooks/useDeepCompareMemo/index.js +7 -7
  107. package/lib/utils/hooks/useLatest/index.js +2 -2
  108. package/lib/utils/hooks/useRefCallback/index.js +5 -5
  109. package/lib/utils/index.js +0 -7
  110. package/lib/utils/isBrowser/index.js +7 -7
  111. package/lib/utils/isUrl/index.js +4 -4
  112. package/lib/utils/merge/index.js +4 -4
  113. package/lib/utils/nanoid/index.js +4 -4
  114. package/lib/utils/omitBoolean/index.js +4 -4
  115. package/lib/utils/parseValueToMoment/index.js +4 -4
  116. package/lib/utils/proFieldParsingText/index.js +10 -10
  117. package/lib/utils/transformKeySubmitValue/index.js +57 -57
  118. package/lib/utils/useEditableArray/index.js +46 -46
  119. package/lib/utils/useEditableMap/index.js +22 -22
  120. package/lib/utils/useMediaQuery/index.js +5 -5
  121. package/lib/vtx-combogrid/Combogrid.js +5 -4
  122. package/lib/vtx-combogrid/index.js +7 -4
  123. package/lib/vtx-datagrid/Store/Provide.js +113 -143
  124. package/lib/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +11 -7
  125. package/lib/vtx-datagrid/ToolBar/components/ColumnSetting/style.js +5 -2
  126. package/lib/vtx-datagrid/ToolBar/components/Density/index.js +3 -0
  127. package/lib/vtx-datagrid/ToolBar/components/TableStyle/index.js +3 -0
  128. package/lib/vtx-datagrid/columnState.js +100 -0
  129. package/lib/vtx-datagrid/index.js +124 -32
  130. package/lib/vtx-datagrid/mergeComponents.js +21 -0
  131. package/lib/vtx-datagrid/renderColumnButtons.js +30 -11
  132. package/lib/vtx-datagrid/style/index.js +102 -20
  133. package/lib/vtx-datagrid/style/index.less +242 -242
  134. package/lib/vtx-date-picker/QdatePicker.js +1 -1
  135. package/lib/vtx-date-picker/style/index.less +39 -39
  136. package/lib/vtx-descriptions/Descriptions.js +38 -0
  137. package/lib/vtx-descriptions/index.js +15 -0
  138. package/lib/vtx-descriptions/style/index.js +25 -0
  139. package/lib/vtx-ellipsis-text/index.js +7 -2
  140. package/lib/vtx-ellipsis-text/style/index.js +3 -1
  141. package/lib/vtx-export/index.js +34 -34
  142. package/lib/vtx-export-async/History.js +14 -8
  143. package/lib/vtx-export-async/index.js +43 -13
  144. package/lib/vtx-export-async/util.js +16 -5
  145. package/lib/vtx-form-layout/Card.js +9 -9
  146. package/lib/vtx-form-layout/Divider.js +1 -1
  147. package/lib/vtx-form-layout/FormItem.js +16 -16
  148. package/lib/vtx-form-layout/Pane.js +22 -11
  149. package/lib/vtx-icon/index.js +54 -52
  150. package/lib/vtx-icon/index.js1 +90 -0
  151. package/lib/vtx-image/Preview.js +11 -6
  152. package/lib/vtx-image/style/index.js +0 -1
  153. package/lib/vtx-import/index.js +209 -71
  154. package/lib/vtx-import/result.js +29 -27
  155. package/lib/vtx-import/style/index.js +16 -1
  156. package/lib/vtx-import2/Content.js +2 -1
  157. package/lib/vtx-import2/index.js +29 -18
  158. package/lib/vtx-import2/style/index.js +60 -9
  159. package/lib/vtx-modal/index.js +11 -6
  160. package/lib/vtx-page-layout/Basic.js +2 -2
  161. package/lib/vtx-page-layout/TabLayout.js +6 -6
  162. package/lib/vtx-page-layout/TableLayout.js +10 -10
  163. package/lib/vtx-page-layout/TreeLayout.js +6 -6
  164. package/lib/vtx-page-layout/container.js +2 -2
  165. package/lib/vtx-page-layout/style/index.js +4 -2
  166. package/lib/vtx-provider/index.js +37 -33
  167. package/lib/vtx-provider/intl.js +9 -9
  168. package/lib/vtx-provider/locale/en_US.js +57 -3
  169. package/lib/vtx-provider/locale/zh_CN.js +57 -3
  170. package/lib/vtx-provider/useStyle/index.js +17 -17
  171. package/lib/vtx-search/index.js +13 -9
  172. package/lib/vtx-search/style/index.js +2 -1
  173. package/lib/vtx-select/index.js +104 -38
  174. package/lib/vtx-select/style/index.js +11 -56
  175. package/lib/vtx-signature/index.js +4 -3
  176. package/lib/vtx-signature/style/index.js +1 -1
  177. package/lib/vtx-split-pane/Resizer.js +0 -1
  178. package/lib/vtx-split-pane/SplitPane.js +40 -31
  179. package/lib/vtx-split-pane/style/index.js +8 -112
  180. package/lib/vtx-time-picker/index.js +27 -1
  181. package/lib/vtx-transfer/Transfer.js +38 -0
  182. package/lib/vtx-transfer/index.js +15 -0
  183. package/lib/vtx-transfer/style/index.js +25 -0
  184. package/lib/vtx-transfer-select/TransferSelect.js +151 -0
  185. package/lib/vtx-transfer-select/index.js +15 -0
  186. package/lib/vtx-transfer-select/style/index.js +25 -0
  187. package/lib/vtx-tree/index.js +96 -33
  188. package/lib/vtx-tree-select/index.js +71 -105
  189. package/lib/vtx-tree-select/style/index.js +9 -3
  190. package/lib/vtx-upload/FilePreview.js +2 -1
  191. package/lib/vtx-wang-editor/index.js +91 -37
  192. package/lib/vtx-wang-editor/style/index.less +12 -12
  193. package/lib/vtx-wang-editor/wangEditorUtil.js +4 -0
  194. package/package.json +240 -225
  195. package/es/utils/hooks/useFetchData/index.js +0 -82
  196. package/lib/utils/hooks/useFetchData/index.js +0 -89
@@ -7,66 +7,21 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
7
7
  import { useStyle as useAntdStyle } from "../../vtx-provider";
8
8
  var genVtxSelectStyle = function genVtxSelectStyle(token) {
9
9
  var componentCls = token.componentCls;
10
- return _defineProperty(_defineProperty({}, componentCls, {
11
- backgroundColor: 'transparent',
12
- position: 'relative',
13
- display: 'inline-block',
14
- width: '100%',
15
- '.vtx-select-count': {
16
- position: 'absolute',
17
- top: '0',
18
- verticalAlign: 'top'
19
- },
20
- '.vtx-all-list': {
21
- position: 'absolute',
22
- zIndex: 999,
23
- boxSizing: 'border-box',
24
- width: '100%',
25
- padding: '5px',
26
- boxShadow: '0 2px 8px #d9d9d9',
27
- backgroundColor: 'red !important'
28
- },
29
- '.ant-select-selection--multiple': {
30
- maxHeight: '32px',
31
- overflow: 'hidden'
32
- }
33
- }), '.vtx-multi-select', {
34
- position: 'relative',
35
- display: 'inline-block',
36
- width: '100%',
37
- maxHeight: '32px !important',
38
- boxSizing: 'border-box',
39
- '.vtx-select-count': {
40
- position: 'absolute',
41
- top: 0,
42
- right: 0,
43
- verticalAlign: 'top',
44
- borderLeft: 'none',
45
- borderTopLeftRadius: 0,
46
- 'border-bottom-left-radius': 0
47
- },
48
- '.vtx-all-list': {
49
- position: 'absolute',
50
- zIndex: 999,
51
- boxSizing: 'border-box',
52
- width: '100%',
53
- padding: '5px',
54
- boxShadow: '0 2px 8px #d9d9d9'
55
- },
56
- '.ant-select-selector': {
57
- 'border-top-right-radius': 0,
58
- 'border-bottom-right-radius': 0,
59
- maxHeight: '32px !important',
60
- overflow: 'hidden'
61
- },
62
- '.ant-select-selection--multiple': {
63
- maxHeight: '32px',
64
- overflow: 'hidden'
10
+ return _defineProperty(_defineProperty(_defineProperty({}, componentCls, _defineProperty({
11
+ width: "100%"
12
+ }, '.ant-select', {
13
+ overflow: "hidden"
14
+ })), "".concat(componentCls, "-multi"), {
15
+ ".ant-select-content": {
16
+ flexWrap: "nowrap"
65
17
  }
18
+ }), "".concat(componentCls, "-all-list"), {
19
+ maxHeight: 300,
20
+ overflowY: "auto"
66
21
  });
67
22
  };
68
23
  export function useStyle(prefixCls) {
69
- return useAntdStyle('VtxSelect', function (token) {
24
+ return useAntdStyle('', function (token) {
70
25
  var vtxSelectToken = _objectSpread(_objectSpread({}, token), {}, {
71
26
  componentCls: ".".concat(prefixCls)
72
27
  });
@@ -1,4 +1,4 @@
1
- import React, { forwardRef, useRef, useEffect, useContext } from 'react';
1
+ import React, { forwardRef, useRef, useLayoutEffect, useContext } from 'react';
2
2
  import SignaturePad from 'signature_pad';
3
3
  import debounce from 'lodash-es/debounce';
4
4
  import PropTypes from 'prop-types';
@@ -44,7 +44,7 @@ var VtxSignature = /*#__PURE__*/forwardRef(function (props, ref) {
44
44
  clear();
45
45
  }
46
46
  }
47
- useEffect(function () {
47
+ useLayoutEffect(function () {
48
48
  signaturePad.current = new SignaturePad(canvasRef.current, {
49
49
  dotSize: dotSize,
50
50
  minWidth: minWidth,
@@ -65,7 +65,9 @@ var VtxSignature = /*#__PURE__*/forwardRef(function (props, ref) {
65
65
  _onEnd && _onEnd();
66
66
  }
67
67
  });
68
- resizeCanvas();
68
+ setTimeout(function () {
69
+ resizeCanvas();
70
+ }, 0);
69
71
  window.addEventListener('resize', debounce(resizeCanvas, 150));
70
72
  return function () {
71
73
  window.removeEventListener('resize', debounce(resizeCanvas, 150));
@@ -82,7 +84,6 @@ var VtxSignature = /*#__PURE__*/forwardRef(function (props, ref) {
82
84
  };
83
85
  return wrapSSR( /*#__PURE__*/_jsxs("div", {
84
86
  className: classnames(prefixCls, hashId),
85
- ref: ref,
86
87
  children: [/*#__PURE__*/_jsx("div", {
87
88
  className: classnames("".concat(prefixCls, "--body")),
88
89
  children: /*#__PURE__*/_jsx("canvas", {
@@ -11,7 +11,7 @@ var genVtxSignatureStyle = function genVtxSignatureStyle(token) {
11
11
  position: 'relative',
12
12
  display: 'flex',
13
13
  flexDirection: 'column',
14
- height: '300px',
14
+ height: 300,
15
15
  padding: '16px',
16
16
  backgroundColor: token.colorBgBase,
17
17
  border: "1px solid ".concat(token.colorBorder),
@@ -43,5 +43,4 @@ function Resizer(props) {
43
43
  }));
44
44
  }
45
45
  Resizer.propTypes = {};
46
- Resizer.defaultProps = {};
47
46
  export default Resizer;
@@ -1,12 +1,18 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ var _excluded = ["children", "defaultSize", "minSize", "maxSize", "style", "direction", "orientation", "handle", "draggerIcon"];
3
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
7
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
8
+ 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; }
9
+ 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; }
10
+ import { Splitter } from 'antd';
1
11
  import classnames from 'classnames';
2
- import React, { cloneElement, useContext, useRef } from 'react';
3
- import { Panel, PanelGroup, PanelResizeHandle } from 'react-resizable-panels';
4
- import Resizer from "./Resizer";
5
- import { useStyle } from "./style";
12
+ import React, { cloneElement, Fragment, useContext } from 'react';
6
13
  import { VtxProvider } from "../vtx-provider";
14
+ import { useStyle } from "./style";
7
15
  import { jsx as _jsx } from "react/jsx-runtime";
8
- import { Fragment as _Fragment } from "react/jsx-runtime";
9
- import { jsxs as _jsxs } from "react/jsx-runtime";
10
16
  function removeNullChildren(children) {
11
17
  return React.Children.toArray(children).filter(function (c) {
12
18
  return c;
@@ -19,42 +25,44 @@ function VtxSplitPane(props) {
19
25
  var _useStyle = useStyle(prefixCls),
20
26
  wrapSSR = _useStyle.wrapSSR,
21
27
  hashId = _useStyle.hashId;
22
- var splitPane = useRef();
23
28
  var children = props.children,
29
+ defaultSize = props.defaultSize,
30
+ minSize = props.minSize,
31
+ maxSize = props.maxSize,
24
32
  style = props.style,
25
- _props$direction = props.direction,
26
- direction = _props$direction === void 0 ? 'horizontal' : _props$direction;
33
+ direction = props.direction,
34
+ orientation = props.orientation,
35
+ handle = props.handle,
36
+ draggerIcon = props.draggerIcon,
37
+ rest = _objectWithoutProperties(props, _excluded);
27
38
  var notNullChildren = removeNullChildren(children);
28
- var refs = useRef([]);
39
+ var mergedOrientation = orientation || direction;
40
+ var mergedDraggerIcon = draggerIcon !== null && draggerIcon !== void 0 ? draggerIcon : handle;
29
41
  return wrapSSR( /*#__PURE__*/_jsx("div", {
30
- className: classnames("".concat(prefixCls, " ").concat(prefixCls, "-").concat(direction), hashId),
31
- ref: splitPane,
42
+ className: classnames("".concat(prefixCls), hashId),
32
43
  style: style,
33
- children: /*#__PURE__*/_jsx(PanelGroup, {
34
- direction: direction,
44
+ children: /*#__PURE__*/_jsx(Splitter, _objectSpread(_objectSpread({}, rest), {}, {
45
+ orientation: mergedOrientation,
46
+ draggerIcon: mergedDraggerIcon,
35
47
  children: notNullChildren === null || notNullChildren === void 0 ? void 0 : notNullChildren.map(function (v, index) {
36
- return /*#__PURE__*/_jsxs(_Fragment, {
37
- children: [/*#__PURE__*/cloneElement(notNullChildren[index], {
38
- ref: function ref(el) {
39
- refs.current[index] = el;
40
- },
41
- collapsible: true
42
- }), index !== (notNullChildren === null || notNullChildren === void 0 ? void 0 : notNullChildren.length) - 1 && /*#__PURE__*/_jsx(_Fragment, {
43
- children: /*#__PURE__*/_jsx(PanelResizeHandle, {
44
- className: classnames("".concat(prefixCls, "-outer"), hashId),
45
- children: /*#__PURE__*/_jsx(Resizer, {
46
- refs: refs,
47
- index: index,
48
- direction: direction
49
- })
50
- })
51
- })]
52
- });
48
+ var _v$props;
49
+ return /*#__PURE__*/_jsx(Fragment, {
50
+ children: /*#__PURE__*/cloneElement(notNullChildren[index], _objectSpread(_objectSpread(_objectSpread({}, index === 0 ? {
51
+ max: maxSize,
52
+ min: minSize,
53
+ defaultSize: defaultSize
54
+ } : {}), v.props), {}, {
55
+ collapsible: _objectSpread({
56
+ start: true,
57
+ end: true,
58
+ showCollapsibleIcon: 'auto'
59
+ }, (_v$props = v.props) === null || _v$props === void 0 ? void 0 : _v$props.collapsible)
60
+ }))
61
+ }, v.key || index);
53
62
  })
54
- })
63
+ }))
55
64
  }));
56
65
  }
57
66
  VtxSplitPane.propTypes = {};
58
- VtxSplitPane.defaultProps = {};
59
- VtxSplitPane.Pane = Panel;
67
+ VtxSplitPane.Pane = Splitter.Panel;
60
68
  export default VtxSplitPane;
@@ -7,121 +7,17 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
7
7
  import { useStyle as useAntdStyle } from "../../vtx-provider";
8
8
  var genVtxSplitPaneStyle = function genVtxSplitPaneStyle(token) {
9
9
  var componentCls = token.componentCls;
10
- return _defineProperty(_defineProperty({}, componentCls, _defineProperty(_defineProperty(_defineProperty(_defineProperty({
10
+ return _defineProperty({}, componentCls, {
11
11
  height: '100%',
12
12
  overflow: 'hidden',
13
- '&-outer': _defineProperty(_defineProperty(_defineProperty(_defineProperty({
14
- backgroundColor: 'transparent',
15
- position: 'relative',
16
- outline: 'none',
17
- '&-resizer': _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
18
- position: 'absolute',
19
- height: '100%',
20
- width: 6,
21
- zIndex: 1
22
- }, '&-left,&-right', {
23
- position: 'absolute',
24
- top: '50%',
25
- zIndex: 1001,
26
- opacity: 0,
27
- width: '16px !important',
28
- height: '24px !important',
29
- backgroundColor: token.colorBorder,
30
- color: token.colorTextSecondary,
31
- borderColor: "transparent !important",
32
- fontSize: 12,
33
- '&:hover': {
34
- color: token.colorTextSecondary,
35
- backgroundColor: "".concat(token.colorPrimaryBg, " !important")
36
- }
37
- }), '&-left', {
38
- transform: 'translate(-16px,-50%)'
39
- }), '&-right', {
40
- transform: 'translate(6px,-50%)'
41
- }), '&::after', {
42
- position: 'absolute',
43
- content: "' '",
44
- left: 0,
45
- top: 0,
46
- bottom: 0,
47
- right: 4,
48
- borderRadius: token.borderRadius
49
- }), '&:hover', _defineProperty({}, '.vtx-split-pane-outer-resizer-left,.vtx-split-pane-outer-resizer-right', {
50
- opacity: 1
51
- })), '.ant-btn-icon', {
52
- color: token.colorTextSecondary
53
- })
54
- }, "&[data-resize-handle-state='hover']", _defineProperty(_defineProperty({}, '.vtx-split-pane-outer-resizer-left,.vtx-split-pane-outer-resizer-right', {
55
- opacity: 1
56
- }), '.vtx-split-pane-outer-resizer::after', {
57
- background: "linear-gradient(to bottom , rgba(0,0,0,0), ".concat(token.colorSplit, ", rgba(0,0,0,0)) !important")
58
- })), "&[data-resize-handle-state='active']", _defineProperty(_defineProperty({}, '.vtx-split-pane-outer-resizer-left,.vtx-split-pane-outer-resizer-right', {
59
- opacity: 1
60
- }), '.vtx-split-pane-outer-resizer::after', {
61
- background: "linear-gradient(to bottom , rgba(0,0,0,0), ".concat(token.colorSplit, ", rgba(0,0,0,0)) !important")
62
- })), "&[data-resize-handle-state='drag']", _defineProperty(_defineProperty({}, '.vtx-split-pane-outer-resizer-left,.vtx-split-pane-outer-resizer-right', {
63
- opacity: 1
64
- }), '.vtx-split-pane-outer-resizer::after', {
65
- background: "linear-gradient(to bottom , rgba(0,0,0,0), ".concat(token.colorSplit, ", rgba(0,0,0,0)) !important")
66
- })), "&[data-resize-handle-state='inactive']", {
67
- backgroundColor: 'transparent'
68
- }),
69
- '&-item': {
70
- position: 'relative',
71
- display: 'inline-block',
72
- height: '100%',
73
- verticalAlign: 'top'
13
+ backgroundColor: token.colorBgLayout,
14
+ '.ant-splitter-bar .ant-splitter-bar-dragger::before': {
15
+ background: 'transparent'
16
+ },
17
+ '.ant-splitter-bar .ant-splitter-bar-dragger-active::before': {
18
+ background: 'var(--ant-control-item-bg-active)'
74
19
  }
75
- }, '&-resizer-left', {
76
- borderRight: "1px solid ".concat(token.colorBorderSecondary),
77
- '&:hover': {
78
- borderRight: "1px solid ".concat(token.colorBorderSecondary),
79
- transition: 'border-right 0.2s ease-in-out'
80
- }
81
- }), '&-resizer-right', {
82
- borderLeft: "1px solid ".concat(token.colorBorderSecondary),
83
- '&:hover': {
84
- borderLeft: "1px solid ".concat(token.colorBorderSecondary),
85
- transition: 'border-right 0.2s ease-in-out'
86
- }
87
- }), '&-resizer.disabled', {
88
- cursor: 'not-allowed'
89
- }), '&-resizer.disabled:hover', {
90
- borderColor: 'transparent'
91
- })), "".concat(componentCls, "-vertical"), _defineProperty({}, "".concat(componentCls, "-outer"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({
92
- '&-resizer': _defineProperty(_defineProperty(_defineProperty(_defineProperty({
93
- width: '100%',
94
- height: 6
95
- }, '&-left,&-right', {
96
- top: 'auto',
97
- left: '50%',
98
- height: '16px !important',
99
- width: '24px !important'
100
- }), '&-left', {
101
- transform: 'translate(-50%,-16px)'
102
- }), '&-right', {
103
- transform: 'translate(-50%, 6px)'
104
- }), '&::after', {
105
- left: 0,
106
- top: 0,
107
- bottom: 4,
108
- right: 0
109
- })
110
- }, "&[data-resize-handle-state='hover']", _defineProperty(_defineProperty({}, '.vtx-split-pane-outer-resizer-left,.vtx-split-pane-outer-resizer-right', {
111
- opacity: 1
112
- }), '.vtx-split-pane-outer-resizer::after', {
113
- background: "linear-gradient(to right , rgba(0,0,0,0), ".concat(token.colorSplit, ", rgba(0,0,0,0)) !important")
114
- })), "&[data-resize-handle-state='active']", _defineProperty(_defineProperty({}, '.vtx-split-pane-outer-resizer-left,.vtx-split-pane-outer-resizer-right', {
115
- opacity: 1
116
- }), '.vtx-split-pane-outer-resizer::after', {
117
- background: "linear-gradient(to right , rgba(0,0,0,0), ".concat(token.colorSplit, ", rgba(0,0,0,0)) !important")
118
- })), "&[data-resize-handle-state='drag']", _defineProperty(_defineProperty({}, '.vtx-split-pane-outer-resizer-left,.vtx-split-pane-outer-resizer-right', {
119
- opacity: 1
120
- }), '.vtx-split-pane-outer-resizer::after', {
121
- background: "linear-gradient(to right , rgba(0,0,0,0), ".concat(token.colorSplit, ", rgba(0,0,0,0)) !important")
122
- })), "&[data-resize-handle-state='inactive']", {
123
- backgroundColor: 'transparent'
124
- })));
20
+ });
125
21
  };
126
22
  export function useStyle(prefixCls) {
127
23
  return useAntdStyle(prefixCls, function (token) {
@@ -1,5 +1,6 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["value", "format"];
2
+ var _excluded = ["value", "format"],
3
+ _excluded2 = ["value", "format"];
3
4
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
5
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
6
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
@@ -12,6 +13,7 @@ import { TimePicker } from 'antd';
12
13
  import dayjs from 'dayjs';
13
14
  import PropTypes from 'prop-types';
14
15
  import { jsx as _jsx } from "react/jsx-runtime";
16
+ var RangePicker = TimePicker.RangePicker;
15
17
  var VtxTimePicker = /*#__PURE__*/forwardRef(function (props, ref) {
16
18
  var value = props.value,
17
19
  _props$format = props.format,
@@ -28,7 +30,31 @@ var VtxTimePicker = /*#__PURE__*/forwardRef(function (props, ref) {
28
30
  }
29
31
  }));
30
32
  });
33
+
34
+ // 时间范围选择器
35
+ var VtxTimeRangePicker = /*#__PURE__*/forwardRef(function (props, ref) {
36
+ var value = props.value,
37
+ _props$format2 = props.format,
38
+ format = _props$format2 === void 0 ? 'HH:mm:ss' : _props$format2,
39
+ rest = _objectWithoutProperties(props, _excluded2);
40
+ var newValue = value && Array.isArray(value) ? value.map(function (item) {
41
+ return item ? dayjs.isDayjs(item) ? item : dayjs(item, format) : null;
42
+ }) : null;
43
+ return /*#__PURE__*/_jsx(RangePicker, _objectSpread(_objectSpread({
44
+ value: newValue,
45
+ format: format
46
+ }, rest), {}, {
47
+ ref: ref,
48
+ style: {
49
+ width: '100%'
50
+ }
51
+ }));
52
+ });
31
53
  VtxTimePicker.displayName = 'VtxTimePicker';
54
+ VtxTimeRangePicker.displayName = 'VtxTimeRangePicker';
55
+
56
+ // 将范围选择器作为 VtxTimePicker 的属性
57
+ VtxTimePicker.VtxTimeRangePicker = VtxTimeRangePicker;
32
58
  export { VtxTimePicker };
33
59
  export default VtxTimePicker;
34
60
  VtxTimePicker.propTypes = {
@@ -0,0 +1,29 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure " + obj); }
8
+ import classnames from 'classnames';
9
+ import React, { useContext } from 'react';
10
+ import { Transfer } from 'antd';
11
+ import { useStyle } from "./style";
12
+ import { VtxProvider } from "../vtx-provider";
13
+ import { jsx as _jsx } from "react/jsx-runtime";
14
+ function VtxTransfer(props) {
15
+ var _useContext = useContext(VtxProvider),
16
+ getPrefixCls = _useContext.getPrefixCls;
17
+ var prefixCls = getPrefixCls('VtxTransfer', props.prefixCls);
18
+ var _useStyle = useStyle(prefixCls),
19
+ wrapSSR = _useStyle.wrapSSR,
20
+ hashId = _useStyle.hashId;
21
+ var rest = Object.assign({}, (_objectDestructuringEmpty(props), props));
22
+ return wrapSSR( /*#__PURE__*/_jsx(Transfer, _objectSpread({
23
+ classNames: {
24
+ root: classnames(hashId, prefixCls)
25
+ }
26
+ }, rest)));
27
+ }
28
+ VtxTransfer.propTypes = {};
29
+ export default VtxTransfer;
@@ -0,0 +1,3 @@
1
+ import VtxTransfer from "./Transfer";
2
+ export default VtxTransfer;
3
+ export { VtxTransfer };
@@ -0,0 +1,19 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ import { useStyle as useAntdStyle } from "../../vtx-provider";
8
+ var genStyle = function genStyle(token) {
9
+ var componentCls = token.componentCls;
10
+ return _defineProperty({}, componentCls, {});
11
+ };
12
+ export function useStyle(prefixCls) {
13
+ return useAntdStyle('', function (token) {
14
+ var _token = _objectSpread(_objectSpread({}, token), {}, {
15
+ componentCls: ".".concat(prefixCls)
16
+ });
17
+ return [genStyle(_token)];
18
+ });
19
+ }
@@ -0,0 +1,143 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ var _excluded = ["leftColumns", "rightColumns"],
3
+ _excluded2 = ["popoverProps", "disabled", "leftColumns", "rightColumns", "styles"];
4
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
5
+ 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."); }
6
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
7
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
8
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
9
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
10
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
11
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
12
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
13
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
14
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
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
+ 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; }
17
+ import classnames from 'classnames';
18
+ import React, { useState, useContext } from 'react';
19
+ import { Transfer } from 'antd';
20
+ import { useStyle } from "./style";
21
+ import { VtxProvider } from "../vtx-provider";
22
+ import { Select, Popover, Table } from 'antd';
23
+ import VtxIcon from "../vtx-icon";
24
+ import VtxDatagrid from "../vtx-datagrid";
25
+ import { jsx as _jsx } from "react/jsx-runtime";
26
+ var mockTags = ['cat', 'dog', 'bird'];
27
+ var mockData = Array.from({
28
+ length: 20
29
+ }).map(function (_, i) {
30
+ return {
31
+ key: i.toString(),
32
+ title: "content".concat(i + 1),
33
+ description: "description of content".concat(i + 1),
34
+ tag: mockTags[i % 3]
35
+ };
36
+ });
37
+ var TableTransfer = function TableTransfer(props) {
38
+ var leftColumns = props.leftColumns,
39
+ rightColumns = props.rightColumns,
40
+ restProps = _objectWithoutProperties(props, _excluded);
41
+ return /*#__PURE__*/_jsx(Transfer, _objectSpread(_objectSpread({
42
+ style: {
43
+ width: '100%'
44
+ }
45
+ }, restProps), {}, {
46
+ children: function children(_ref) {
47
+ var direction = _ref.direction,
48
+ filteredItems = _ref.filteredItems,
49
+ onItemSelect = _ref.onItemSelect,
50
+ onItemSelectAll = _ref.onItemSelectAll,
51
+ listSelectedKeys = _ref.selectedKeys,
52
+ listDisabled = _ref.disabled;
53
+ var columns = direction === 'left' ? leftColumns : rightColumns;
54
+ var rowSelection = {
55
+ getCheckboxProps: function getCheckboxProps() {
56
+ return {
57
+ disabled: listDisabled
58
+ };
59
+ },
60
+ onChange: function onChange(selectedRowKeys) {
61
+ onItemSelectAll(selectedRowKeys, 'replace');
62
+ },
63
+ selectedRowKeys: listSelectedKeys,
64
+ selections: [Table.SELECTION_ALL, Table.SELECTION_INVERT, Table.SELECTION_NONE]
65
+ };
66
+ return /*#__PURE__*/_jsx(Table, {
67
+ rowSelection: rowSelection,
68
+ columns: columns,
69
+ dataSource: filteredItems,
70
+ size: "small",
71
+ style: {
72
+ pointerEvents: listDisabled ? 'none' : undefined
73
+ },
74
+ onRow: function onRow(_ref2) {
75
+ var key = _ref2.key,
76
+ itemDisabled = _ref2.disabled;
77
+ return {
78
+ onClick: function onClick() {
79
+ if (itemDisabled || listDisabled) {
80
+ return;
81
+ }
82
+ onItemSelect(key, !listSelectedKeys.includes(key));
83
+ }
84
+ };
85
+ }
86
+ });
87
+ }
88
+ }));
89
+ };
90
+ function TransferSelect(props) {
91
+ var _useState = useState(function () {
92
+ return [];
93
+ }),
94
+ _useState2 = _slicedToArray(_useState, 2),
95
+ selectedRowKeys = _useState2[0],
96
+ setSelectedRowKeys = _useState2[1];
97
+ var _useState3 = useState([]),
98
+ _useState4 = _slicedToArray(_useState3, 2),
99
+ targetKeys = _useState4[0],
100
+ setTargetKeys = _useState4[1];
101
+ var onChange = function onChange(nextTargetKeys) {
102
+ setTargetKeys(nextTargetKeys);
103
+ };
104
+ var _useState5 = useState(false),
105
+ _useState6 = _slicedToArray(_useState5, 2),
106
+ visible = _useState6[0],
107
+ setVisible = _useState6[1];
108
+ var _useContext = useContext(VtxProvider),
109
+ getPrefixCls = _useContext.getPrefixCls;
110
+ var prefixCls = getPrefixCls('VtxTransferSelect', props.prefixCls);
111
+ var _useStyle = useStyle(prefixCls),
112
+ wrapSSR = _useStyle.wrapSSR,
113
+ hashId = _useStyle.hashId;
114
+ var _props$popoverProps = props.popoverProps,
115
+ popoverProps = _props$popoverProps === void 0 ? {} : _props$popoverProps,
116
+ _props$disabled = props.disabled,
117
+ disabled = _props$disabled === void 0 ? false : _props$disabled,
118
+ leftColumns = props.leftColumns,
119
+ rightColumns = props.rightColumns,
120
+ styles = props.styles,
121
+ rest = _objectWithoutProperties(props, _excluded2);
122
+ return wrapSSR( /*#__PURE__*/_jsx(Select, {
123
+ suffixIcon: /*#__PURE__*/_jsx(VtxIcon, {
124
+ type: "downOutlined",
125
+ fileType: "svg"
126
+ }),
127
+ styles: _objectSpread({}, styles),
128
+ popupRender: function popupRender(node) {
129
+ return /*#__PURE__*/_jsx(TableTransfer, {
130
+ classNames: {
131
+ root: classnames(hashId, prefixCls)
132
+ },
133
+ dataSource: mockData,
134
+ onChange: onChange,
135
+ leftColumns: leftColumns,
136
+ rightColumns: rightColumns,
137
+ targetKeys: targetKeys
138
+ });
139
+ }
140
+ }));
141
+ }
142
+ TransferSelect.propTypes = {};
143
+ export default TransferSelect;
@@ -0,0 +1,3 @@
1
+ import VtxTransferSelect from "./TransferSelect";
2
+ export default VtxTransferSelect;
3
+ export { VtxTransferSelect };
@@ -0,0 +1,19 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ import { useStyle as useAntdStyle } from "../../vtx-provider";
8
+ var genStyle = function genStyle(token) {
9
+ var componentCls = token.componentCls;
10
+ return _defineProperty({}, componentCls, {});
11
+ };
12
+ export function useStyle(prefixCls) {
13
+ return useAntdStyle('', function (token) {
14
+ var _token = _objectSpread(_objectSpread({}, token), {}, {
15
+ componentCls: ".".concat(prefixCls)
16
+ });
17
+ return [genStyle(_token)];
18
+ });
19
+ }