@vtx/components 2.5.6 → 2.5.9

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 (229) hide show
  1. package/lib/_util/filterSpecialCharacters.js +55 -44
  2. package/lib/_util/filterSpecialCharacters.js.map +1 -1
  3. package/lib/_util/getComponentProps.js +1 -4
  4. package/lib/_util/getComponentProps.js.map +1 -1
  5. package/lib/_util/getUrlParam.js +0 -6
  6. package/lib/_util/getUrlParam.js.map +1 -1
  7. package/lib/_util/isFunction.js +0 -1
  8. package/lib/_util/isFunction.js.map +1 -1
  9. package/lib/_util/isObject.js +0 -1
  10. package/lib/_util/isObject.js.map +1 -1
  11. package/lib/_util/useInterval.js +0 -3
  12. package/lib/_util/useInterval.js.map +1 -1
  13. package/lib/_util/useSet.js +17 -35
  14. package/lib/_util/useSet.js.map +1 -1
  15. package/lib/config.js.map +1 -1
  16. package/lib/index.js +40 -62
  17. package/lib/index.js.map +1 -1
  18. package/lib/vtx-color-picker/index.js +10 -24
  19. package/lib/vtx-color-picker/index.js.map +1 -1
  20. package/lib/vtx-color-picker/style/css.js +0 -2
  21. package/lib/vtx-color-picker/style/css.js.map +1 -1
  22. package/lib/vtx-color-picker/style/index.js +0 -2
  23. package/lib/vtx-color-picker/style/index.js.map +1 -1
  24. package/lib/vtx-combogrid/Combogrid.js +41 -79
  25. package/lib/vtx-combogrid/Combogrid.js.map +1 -1
  26. package/lib/vtx-combogrid/index.js +26 -49
  27. package/lib/vtx-combogrid/index.js.map +1 -1
  28. package/lib/vtx-combogrid/style/css.js +0 -7
  29. package/lib/vtx-combogrid/style/css.js.map +1 -1
  30. package/lib/vtx-combogrid/style/index.js +0 -7
  31. package/lib/vtx-combogrid/style/index.js.map +1 -1
  32. package/lib/vtx-datagrid/Alert.js +3 -11
  33. package/lib/vtx-datagrid/Alert.js.map +1 -1
  34. package/lib/vtx-datagrid/ColumnSetting.js +19 -41
  35. package/lib/vtx-datagrid/ColumnSetting.js.map +1 -1
  36. package/lib/vtx-datagrid/ResizeableTitle.js +3 -12
  37. package/lib/vtx-datagrid/ResizeableTitle.js.map +1 -1
  38. package/lib/vtx-datagrid/index.js +84 -142
  39. package/lib/vtx-datagrid/index.js.map +1 -1
  40. package/lib/vtx-datagrid/renderColumnButtons.js +8 -36
  41. package/lib/vtx-datagrid/renderColumnButtons.js.map +1 -1
  42. package/lib/vtx-datagrid/style/css.js +0 -10
  43. package/lib/vtx-datagrid/style/css.js.map +1 -1
  44. package/lib/vtx-datagrid/style/index.js +0 -10
  45. package/lib/vtx-datagrid/style/index.js.map +1 -1
  46. package/lib/vtx-date-picker/QdatePicker.js +22 -50
  47. package/lib/vtx-date-picker/QdatePicker.js.map +1 -1
  48. package/lib/vtx-date-picker/YearPicker.js +13 -34
  49. package/lib/vtx-date-picker/YearPicker.js.map +1 -1
  50. package/lib/vtx-date-picker/generatePicker.js +17 -56
  51. package/lib/vtx-date-picker/generatePicker.js.map +1 -1
  52. package/lib/vtx-date-picker/index.js +2 -8
  53. package/lib/vtx-date-picker/index.js.map +1 -1
  54. package/lib/vtx-date-picker/style/css.js +0 -1
  55. package/lib/vtx-date-picker/style/css.js.map +1 -1
  56. package/lib/vtx-date-picker/style/index.js +0 -1
  57. package/lib/vtx-date-picker/style/index.js.map +1 -1
  58. package/lib/vtx-editor/index.js +10 -26
  59. package/lib/vtx-editor/index.js.map +1 -1
  60. package/lib/vtx-editor/style/css.js +0 -2
  61. package/lib/vtx-editor/style/css.js.map +1 -1
  62. package/lib/vtx-editor/style/index.js +0 -2
  63. package/lib/vtx-editor/style/index.js.map +1 -1
  64. package/lib/vtx-export/index.js +22 -54
  65. package/lib/vtx-export/index.js.map +1 -1
  66. package/lib/vtx-export/style/css.js +0 -6
  67. package/lib/vtx-export/style/css.js.map +1 -1
  68. package/lib/vtx-export/style/index.js +0 -6
  69. package/lib/vtx-export/style/index.js.map +1 -1
  70. package/lib/vtx-form-layout/Card.js +9 -30
  71. package/lib/vtx-form-layout/Card.js.map +1 -1
  72. package/lib/vtx-form-layout/Divider.js +0 -5
  73. package/lib/vtx-form-layout/Divider.js.map +1 -1
  74. package/lib/vtx-form-layout/FormItem.js +13 -36
  75. package/lib/vtx-form-layout/FormItem.js.map +1 -1
  76. package/lib/vtx-form-layout/Pane.js +2 -7
  77. package/lib/vtx-form-layout/Pane.js.map +1 -1
  78. package/lib/vtx-form-layout/Row.js +0 -6
  79. package/lib/vtx-form-layout/Row.js.map +1 -1
  80. package/lib/vtx-form-layout/context.js +0 -2
  81. package/lib/vtx-form-layout/context.js.map +1 -1
  82. package/lib/vtx-form-layout/index.js +8 -22
  83. package/lib/vtx-form-layout/index.js.map +1 -1
  84. package/lib/vtx-form-layout/style/css.js +0 -8
  85. package/lib/vtx-form-layout/style/css.js.map +1 -1
  86. package/lib/vtx-form-layout/style/index.js +0 -8
  87. package/lib/vtx-form-layout/style/index.js.map +1 -1
  88. package/lib/vtx-image/Image.js +60 -96
  89. package/lib/vtx-image/Image.js.map +1 -1
  90. package/lib/vtx-image/Preview.js +26 -57
  91. package/lib/vtx-image/Preview.js.map +1 -1
  92. package/lib/vtx-image/PreviewGroup.js +17 -46
  93. package/lib/vtx-image/PreviewGroup.js.map +1 -1
  94. package/lib/vtx-image/index.js +3 -9
  95. package/lib/vtx-image/index.js.map +1 -1
  96. package/lib/vtx-image/style/css.js +0 -1
  97. package/lib/vtx-image/style/css.js.map +1 -1
  98. package/lib/vtx-image/style/index.js +0 -1
  99. package/lib/vtx-image/style/index.js.map +1 -1
  100. package/lib/vtx-import/index.js +40 -75
  101. package/lib/vtx-import/index.js.map +1 -1
  102. package/lib/vtx-import/result.js +9 -26
  103. package/lib/vtx-import/result.js.map +1 -1
  104. package/lib/vtx-import/style/css.js +0 -2
  105. package/lib/vtx-import/style/css.js.map +1 -1
  106. package/lib/vtx-import/style/index.js +0 -2
  107. package/lib/vtx-import/style/index.js.map +1 -1
  108. package/lib/vtx-input/TextArea.js +11 -25
  109. package/lib/vtx-input/TextArea.js.map +1 -1
  110. package/lib/vtx-input/index.js +18 -42
  111. package/lib/vtx-input/index.js.map +1 -1
  112. package/lib/vtx-input/style/css.js +0 -1
  113. package/lib/vtx-input/style/css.js.map +1 -1
  114. package/lib/vtx-input/style/index.js +0 -1
  115. package/lib/vtx-input/style/index.js.map +1 -1
  116. package/lib/vtx-input/useLength.js +5 -17
  117. package/lib/vtx-input/useLength.js.map +1 -1
  118. package/lib/vtx-modal/Title.js +1 -6
  119. package/lib/vtx-modal/Title.js.map +1 -1
  120. package/lib/vtx-modal/index.js +36 -74
  121. package/lib/vtx-modal/index.js.map +1 -1
  122. package/lib/vtx-modal/style/css.js +0 -2
  123. package/lib/vtx-modal/style/css.js.map +1 -1
  124. package/lib/vtx-modal/style/index.js +0 -2
  125. package/lib/vtx-modal/style/index.js.map +1 -1
  126. package/lib/vtx-page-layout/Basic.js +2 -6
  127. package/lib/vtx-page-layout/Basic.js.map +1 -1
  128. package/lib/vtx-page-layout/Content.js +9 -21
  129. package/lib/vtx-page-layout/Content.js.map +1 -1
  130. package/lib/vtx-page-layout/Pane.js +2 -10
  131. package/lib/vtx-page-layout/Pane.js.map +1 -1
  132. package/lib/vtx-page-layout/TableLayout.js +18 -48
  133. package/lib/vtx-page-layout/TableLayout.js.map +1 -1
  134. package/lib/vtx-page-layout/TableWrap.js +5 -17
  135. package/lib/vtx-page-layout/TableWrap.js.map +1 -1
  136. package/lib/vtx-page-layout/container.js +16 -46
  137. package/lib/vtx-page-layout/container.js.map +1 -1
  138. package/lib/vtx-page-layout/index.js +0 -8
  139. package/lib/vtx-page-layout/index.js.map +1 -1
  140. package/lib/vtx-page-layout/style/css.js.map +1 -1
  141. package/lib/vtx-page-layout/style/index.js.map +1 -1
  142. package/lib/vtx-rps-frame/index.js +54 -65
  143. package/lib/vtx-rps-frame/index.js.map +1 -1
  144. package/lib/vtx-rps-frame/style/css.js.map +1 -1
  145. package/lib/vtx-rps-frame/style/index.js.map +1 -1
  146. package/lib/vtx-scrollable-row/index.js +26 -62
  147. package/lib/vtx-scrollable-row/index.js.map +1 -1
  148. package/lib/vtx-scrollable-row/style/css.js +0 -1
  149. package/lib/vtx-scrollable-row/style/css.js.map +1 -1
  150. package/lib/vtx-scrollable-row/style/index.js +0 -1
  151. package/lib/vtx-scrollable-row/style/index.js.map +1 -1
  152. package/lib/vtx-search/VtxCol.js +2 -23
  153. package/lib/vtx-search/VtxCol.js.map +1 -1
  154. package/lib/vtx-search/VtxRow.js +6 -12
  155. package/lib/vtx-search/VtxRow.js.map +1 -1
  156. package/lib/vtx-search/index.js +43 -94
  157. package/lib/vtx-search/index.js.map +1 -1
  158. package/lib/vtx-search/style/css.js +0 -5
  159. package/lib/vtx-search/style/css.js.map +1 -1
  160. package/lib/vtx-search/style/index.js +0 -5
  161. package/lib/vtx-search/style/index.js.map +1 -1
  162. package/lib/vtx-search-map-input/index.js +44 -73
  163. package/lib/vtx-search-map-input/index.js.map +1 -1
  164. package/lib/vtx-search-map-input/style/css.js +1 -1
  165. package/lib/vtx-search-map-input/style/css.js.map +1 -1
  166. package/lib/vtx-search-map-input/style/index.js +1 -1
  167. package/lib/vtx-search-map-input/style/index.js.map +1 -1
  168. package/lib/vtx-select/index.js +28 -72
  169. package/lib/vtx-select/index.js.map +1 -1
  170. package/lib/vtx-select/style/css.js +0 -8
  171. package/lib/vtx-select/style/css.js.map +1 -1
  172. package/lib/vtx-select/style/index.js +0 -8
  173. package/lib/vtx-select/style/index.js.map +1 -1
  174. package/lib/vtx-signature/index.js +17 -31
  175. package/lib/vtx-signature/index.js.map +1 -1
  176. package/lib/vtx-signature/style/css.js +0 -2
  177. package/lib/vtx-signature/style/css.js.map +1 -1
  178. package/lib/vtx-signature/style/index.js +0 -2
  179. package/lib/vtx-signature/style/index.js.map +1 -1
  180. package/lib/vtx-split-pane/Pane.js +7 -19
  181. package/lib/vtx-split-pane/Pane.js.map +1 -1
  182. package/lib/vtx-split-pane/Resizer.js +16 -36
  183. package/lib/vtx-split-pane/Resizer.js.map +1 -1
  184. package/lib/vtx-split-pane/SplitPane.js +52 -104
  185. package/lib/vtx-split-pane/SplitPane.js.map +1 -1
  186. package/lib/vtx-split-pane/index.js +0 -4
  187. package/lib/vtx-split-pane/index.js.map +1 -1
  188. package/lib/vtx-split-pane/style/css.js +0 -3
  189. package/lib/vtx-split-pane/style/css.js.map +1 -1
  190. package/lib/vtx-split-pane/style/index.js +0 -3
  191. package/lib/vtx-split-pane/style/index.js.map +1 -1
  192. package/lib/vtx-statistics-column/Back.js +2 -8
  193. package/lib/vtx-statistics-column/Back.js.map +1 -1
  194. package/lib/vtx-statistics-column/Item.js +10 -27
  195. package/lib/vtx-statistics-column/Item.js.map +1 -1
  196. package/lib/vtx-statistics-column/Total.js +10 -27
  197. package/lib/vtx-statistics-column/Total.js.map +1 -1
  198. package/lib/vtx-statistics-column/context.js +0 -2
  199. package/lib/vtx-statistics-column/context.js.map +1 -1
  200. package/lib/vtx-statistics-column/index.js +0 -16
  201. package/lib/vtx-statistics-column/index.js.map +1 -1
  202. package/lib/vtx-statistics-column/style/css.js.map +1 -1
  203. package/lib/vtx-statistics-column/style/index.js.map +1 -1
  204. package/lib/vtx-time-picker/index.js +5 -16
  205. package/lib/vtx-time-picker/index.js.map +1 -1
  206. package/lib/vtx-time-picker/style/css.js.map +1 -1
  207. package/lib/vtx-time-picker/style/index.js.map +1 -1
  208. package/lib/vtx-upload/FilePreview.js +11 -30
  209. package/lib/vtx-upload/FilePreview.js.map +1 -1
  210. package/lib/vtx-upload/index.js +75 -139
  211. package/lib/vtx-upload/index.js.map +1 -1
  212. package/lib/vtx-upload/style/css.js +0 -6
  213. package/lib/vtx-upload/style/css.js.map +1 -1
  214. package/lib/vtx-upload/style/index.js +0 -6
  215. package/lib/vtx-upload/style/index.js.map +1 -1
  216. package/lib/vtx-ztree/index.js +57 -109
  217. package/lib/vtx-ztree/index.js.map +1 -1
  218. package/lib/vtx-ztree/style/css.js +0 -1
  219. package/lib/vtx-ztree/style/css.js.map +1 -1
  220. package/lib/vtx-ztree/style/index.js +0 -1
  221. package/lib/vtx-ztree/style/index.js.map +1 -1
  222. package/lib/vtx-ztree-select/index.js +48 -105
  223. package/lib/vtx-ztree-select/index.js.map +1 -1
  224. package/lib/vtx-ztree-select/style/css.js +0 -4
  225. package/lib/vtx-ztree-select/style/css.js.map +1 -1
  226. package/lib/vtx-ztree-select/style/index.js +0 -4
  227. package/lib/vtx-ztree-select/style/index.js.map +1 -1
  228. package/package.json +1 -1
  229. package/CHANGELOG.md +0 -759
@@ -1,46 +1,32 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
-
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports["default"] = void 0;
9
-
10
8
  var _react = _interopRequireWildcard(require("react"));
11
-
12
9
  var _propTypes = _interopRequireDefault(require("prop-types"));
13
-
14
10
  var _rcColorPicker = _interopRequireDefault(require("rc-color-picker"));
15
-
16
11
  var _input = _interopRequireDefault(require("antd/es/input"));
17
-
18
12
  var _classnames = _interopRequireDefault(require("classnames"));
19
-
13
+ var _excluded = ["value", "onChange", "className", "style", "disabled"];
20
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
21
-
22
- function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
23
-
24
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
25
-
26
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
27
-
15
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
16
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
28
18
  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; }
29
-
30
19
  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; }
31
-
32
20
  var VtxColorPicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
33
21
  var value = props.value,
34
- onChange = props.onChange,
35
- className = props.className,
36
- style = props.style,
37
- disabled = props.disabled,
38
- rest = _objectWithoutProperties(props, ["value", "onChange", "className", "style", "disabled"]);
39
-
22
+ onChange = props.onChange,
23
+ className = props.className,
24
+ style = props.style,
25
+ disabled = props.disabled,
26
+ rest = _objectWithoutProperties(props, _excluded);
40
27
  var onPickerChange = function onPickerChange(e) {
41
28
  onChange && onChange(e.color);
42
29
  };
43
-
44
30
  return /*#__PURE__*/_react["default"].createElement(_input["default"], {
45
31
  ref: ref,
46
32
  value: value,
@@ -1 +1 @@
1
- {"version":3,"sources":["vtx-color-picker/index.jsx"],"names":["VtxColorPicker","props","ref","value","onChange","className","style","disabled","rest","onPickerChange","e","color","propTypes","PropTypes","string","func","bool","object"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;AAEA,IAAMA,cAAc,gBAAG,uBAAW,UAACC,KAAD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';\nimport ColorPicker from 'rc-color-picker';\nimport Input from 'antd/es/input';\nimport classnames from 'classnames';\n\nconst VtxColorPicker = forwardRef((props, ref) => {\n const { value, onChange, className, style, disabled, ...rest } = props;\n\n const onPickerChange = e => {\n onChange && onChange(e.color);\n };\n\n return (\n <Input\n ref={ref}\n value={value}\n placeholder=\"请选择\"\n readOnly\n disabled={disabled}\n className={classnames('vtx-color-picker', className)}\n style={style}\n addonAfter={\n disabled ? null : (\n <ColorPicker\n defaultColor=\"#fff\"\n {...rest}\n animation=\"slide-up\"\n color={value}\n onChange={onPickerChange}\n />\n )\n }\n />\n );\n});\n\nVtxColorPicker.propTypes = {\n value: PropTypes.string,\n onChange: PropTypes.func,\n disabled: PropTypes.bool,\n className: PropTypes.string,\n style: PropTypes.object,\n};\n\nexport default VtxColorPicker;\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":["VtxColorPicker","forwardRef","props","ref","value","onChange","className","style","disabled","rest","onPickerChange","e","color","classnames","propTypes","PropTypes","string","func","bool","object"],"sources":["vtx-color-picker/index.jsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport PropTypes from 'prop-types';\nimport ColorPicker from 'rc-color-picker';\nimport Input from 'antd/es/input';\nimport classnames from 'classnames';\n\nconst VtxColorPicker = forwardRef((props, ref) => {\n const { value, onChange, className, style, disabled, ...rest } = props;\n\n const onPickerChange = e => {\n onChange && onChange(e.color);\n };\n\n return (\n <Input\n ref={ref}\n value={value}\n placeholder=\"请选择\"\n readOnly\n disabled={disabled}\n className={classnames('vtx-color-picker', className)}\n style={style}\n addonAfter={\n disabled ? null : (\n <ColorPicker\n defaultColor=\"#fff\"\n {...rest}\n animation=\"slide-up\"\n color={value}\n onChange={onPickerChange}\n />\n )\n }\n />\n );\n});\n\nVtxColorPicker.propTypes = {\n value: PropTypes.string,\n onChange: PropTypes.func,\n disabled: PropTypes.bool,\n className: PropTypes.string,\n style: PropTypes.object,\n};\n\nexport default VtxColorPicker;\n"],"mappings":";;;;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 +1,6 @@
1
1
  "use strict";
2
2
 
3
3
  require("antd/es/input/style/css");
4
-
5
4
  require("rc-color-picker/assets/index.css");
6
-
7
5
  require("./index.css");
8
6
  //# sourceMappingURL=css.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["vtx-color-picker/style/index.js"],"names":[],"mappings":";;AAAA;;AACA;;AACA","sourcesContent":["import 'antd/es/input/style/css';\nimport 'rc-color-picker/assets/index.css';\nimport './index.less';\n"],"file":"css.js"}
1
+ {"version":3,"file":"css.js","names":[],"sources":["vtx-color-picker/style/index.js"],"sourcesContent":["import 'antd/es/input/style/css';\nimport 'rc-color-picker/assets/index.css';\nimport './index.less';\n"],"mappings":";;AAAA;AACA;AACA"}
@@ -1,8 +1,6 @@
1
1
  "use strict";
2
2
 
3
3
  require("antd/es/input/style/css");
4
-
5
4
  require("rc-color-picker/assets/index.css");
6
-
7
5
  require("./index.less");
8
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["vtx-color-picker/style/index.js"],"names":[],"mappings":";;AAAA;;AACA;;AACA","sourcesContent":["import 'antd/es/input/style/css';\nimport 'rc-color-picker/assets/index.css';\nimport './index.less';\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["vtx-color-picker/style/index.js"],"sourcesContent":["import 'antd/es/input/style/css';\nimport 'rc-color-picker/assets/index.css';\nimport './index.less';\n"],"mappings":";;AAAA;AACA;AACA"}
@@ -1,99 +1,70 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
-
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports["default"] = void 0;
9
-
10
8
  var _react = _interopRequireWildcard(require("react"));
11
-
12
9
  var _form = _interopRequireDefault(require("antd/es/form"));
13
-
14
10
  var _row = _interopRequireDefault(require("antd/es/row"));
15
-
16
11
  var _col = _interopRequireDefault(require("antd/es/col"));
17
-
18
12
  var _button = _interopRequireDefault(require("antd/es/button"));
19
-
20
13
  var _useAntdTable2 = _interopRequireDefault(require("ahooks/es/useAntdTable"));
21
-
22
14
  var _propTypes = _interopRequireDefault(require("prop-types"));
23
-
24
15
  var _vtxDatagrid = _interopRequireDefault(require("../vtx-datagrid"));
25
-
16
+ var _excluded = ["prefixCls", "setPopoverVisible", "multiple", "onChange", "getTableData", "columns", "searchForms", "form", "selectedRowKeys", "setSelectedRowKeys", "spread"];
26
17
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
27
-
28
- function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
29
-
30
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
31
-
32
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
33
-
34
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
35
-
36
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
37
-
18
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
19
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
20
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
21
+ 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; }
22
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
38
23
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
39
-
40
24
  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; }
41
-
42
25
  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; }
43
-
44
26
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
45
-
46
27
  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."); }
47
-
48
28
  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); }
49
-
50
29
  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; }
51
-
52
- function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
53
-
30
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
54
31
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
55
-
56
32
  function VtxCombogrid(props, ref) {
57
33
  var _useState = (0, _react.useState)(false),
58
- _useState2 = _slicedToArray(_useState, 2),
59
- more = _useState2[0],
60
- setMore = _useState2[1];
61
-
34
+ _useState2 = _slicedToArray(_useState, 2),
35
+ more = _useState2[0],
36
+ setMore = _useState2[1];
62
37
  var prefixCls = props.prefixCls,
63
- setPopoverVisible = props.setPopoverVisible,
64
- multiple = props.multiple,
65
- _onChange = props.onChange,
66
- getTableData = props.getTableData,
67
- columns = props.columns,
68
- _props$searchForms = props.searchForms,
69
- searchForms = _props$searchForms === void 0 ? [] : _props$searchForms,
70
- form = props.form,
71
- selectedRowKeys = props.selectedRowKeys,
72
- setSelectedRowKeys = props.setSelectedRowKeys,
73
- spread = props.spread,
74
- rest = _objectWithoutProperties(props, ["prefixCls", "setPopoverVisible", "multiple", "onChange", "getTableData", "columns", "searchForms", "form", "selectedRowKeys", "setSelectedRowKeys", "spread"]);
75
-
38
+ setPopoverVisible = props.setPopoverVisible,
39
+ multiple = props.multiple,
40
+ _onChange = props.onChange,
41
+ getTableData = props.getTableData,
42
+ columns = props.columns,
43
+ _props$searchForms = props.searchForms,
44
+ searchForms = _props$searchForms === void 0 ? [] : _props$searchForms,
45
+ form = props.form,
46
+ selectedRowKeys = props.selectedRowKeys,
47
+ setSelectedRowKeys = props.setSelectedRowKeys,
48
+ spread = props.spread,
49
+ rest = _objectWithoutProperties(props, _excluded);
76
50
  var getFieldDecorator = form.getFieldDecorator;
77
-
78
51
  var _useAntdTable = (0, _useAntdTable2["default"])(getTableData, {
79
- defaultPageSize: 10,
80
- form: form
81
- }),
82
- tableProps = _useAntdTable.tableProps,
83
- search = _useAntdTable.search;
84
-
52
+ defaultPageSize: 10,
53
+ form: form
54
+ }),
55
+ tableProps = _useAntdTable.tableProps,
56
+ search = _useAntdTable.search;
85
57
  var submit = search.submit,
86
- reset = search.reset; // 表格
58
+ reset = search.reset;
87
59
 
60
+ // 表格
88
61
  var pagination = tableProps.pagination;
89
62
  var current = pagination.current,
90
- pageSize = pagination.pageSize;
91
-
63
+ pageSize = pagination.pageSize;
92
64
  var clearSelectedRow = function clearSelectedRow() {
93
65
  _onChange && _onChange([]);
94
66
  setSelectedRowKeys([]);
95
67
  };
96
-
97
68
  var newTableProps = _objectSpread(_objectSpread({}, tableProps), {}, {
98
69
  columns: columns,
99
70
  startIndex: (current - 1) * pageSize + 1,
@@ -112,7 +83,6 @@ function VtxCombogrid(props, ref) {
112
83
  if (multiple) {
113
84
  return {};
114
85
  }
115
-
116
86
  return {
117
87
  onClick: function onClick() {
118
88
  _onChange && _onChange([record]);
@@ -121,7 +91,6 @@ function VtxCombogrid(props, ref) {
121
91
  };
122
92
  }
123
93
  });
124
-
125
94
  if (multiple) {
126
95
  newTableProps = _objectSpread(_objectSpread({}, newTableProps), {}, {
127
96
  rowSelection: {
@@ -132,46 +101,42 @@ function VtxCombogrid(props, ref) {
132
101
  }
133
102
  }
134
103
  });
135
- } // 查询和清空会重置selectedRowKeys,因此也需清空文本中的value值
136
-
104
+ }
137
105
 
106
+ // 查询和清空会重置selectedRowKeys,因此也需清空文本中的value值
138
107
  var query = function query() {
139
108
  submit();
140
-
141
109
  if (multiple && selectedRowKeys.length) {
142
110
  clearSelectedRow();
143
111
  }
144
112
  };
145
-
146
113
  var clear = function clear() {
147
114
  reset();
148
-
149
115
  if (multiple && selectedRowKeys.length) {
150
116
  clearSelectedRow();
151
117
  }
152
- }; // 暴露给父组件使用
153
-
118
+ };
154
119
 
120
+ // 暴露给父组件使用
155
121
  (0, _react.useImperativeHandle)(ref, function () {
156
122
  return {
157
123
  clear: clear
158
124
  };
159
- }); // 查询条件是否超过2个,超过2个默认隐藏
125
+ });
160
126
 
127
+ // 查询条件是否超过2个,超过2个默认隐藏
161
128
  var formLen = searchForms.length;
162
129
  var isMore = formLen > 2;
163
130
  var moreSearchForm = [];
164
-
165
131
  if (isMore) {
166
132
  moreSearchForm = searchForms.slice(2);
167
133
  }
168
-
169
134
  var renderFormItem = function renderFormItem(field) {
170
135
  var name = field.name,
171
- label = field.label,
172
- render = field.render,
173
- _field$fieldDecorator = field.fieldDecoratorOptions,
174
- fieldDecoratorOptions = _field$fieldDecorator === void 0 ? {} : _field$fieldDecorator;
136
+ label = field.label,
137
+ render = field.render,
138
+ _field$fieldDecorator = field.fieldDecoratorOptions,
139
+ fieldDecoratorOptions = _field$fieldDecorator === void 0 ? {} : _field$fieldDecorator;
175
140
  return /*#__PURE__*/_react["default"].createElement(_col["default"], {
176
141
  span: 12,
177
142
  key: name
@@ -185,7 +150,6 @@ function VtxCombogrid(props, ref) {
185
150
  }
186
151
  }, getFieldDecorator(name, fieldDecoratorOptions)(render && render(form))));
187
152
  };
188
-
189
153
  return /*#__PURE__*/_react["default"].createElement("div", {
190
154
  className: "".concat(prefixCls, "-popover"),
191
155
  ref: ref
@@ -222,9 +186,7 @@ function VtxCombogrid(props, ref) {
222
186
  toolbar: false
223
187
  }, newTableProps, rest))));
224
188
  }
225
-
226
189
  var _default = _form["default"].create()( /*#__PURE__*/_react["default"].forwardRef(VtxCombogrid));
227
-
228
190
  exports["default"] = _default;
229
191
  VtxCombogrid.propTypes = {
230
192
  prefixCls: _propTypes["default"].string,
@@ -1 +1 @@
1
- {"version":3,"sources":["vtx-combogrid/Combogrid.jsx"],"names":["VtxCombogrid","props","ref","more","setMore","prefixCls","setPopoverVisible","multiple","onChange","getTableData","columns","searchForms","form","selectedRowKeys","setSelectedRowKeys","spread","rest","getFieldDecorator","defaultPageSize","tableProps","search","submit","reset","pagination","current","pageSize","clearSelectedRow","newTableProps","startIndex","size","headFootHeight","claerRowSelection","showSizeChanger","onRow","record","onClick","rowSelection","selectedRows","query","length","clear","formLen","isMore","moreSearchForm","slice","renderFormItem","field","name","label","render","fieldDecoratorOptions","span","map","item","idx","Form","create","React","forwardRef","propTypes","PropTypes","string","func","isRequired","array","object","bool","defaultSelectedRowKeys"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,SAASA,YAAT,CAAsBC,KAAtB,EAA6BC,GAA7B,EAAkC;AAAA,kBACN,qBAAS,KAAT,CADM;A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gCAAC,uBAAD;AAAa,IAAA,OAAO,EAAE;AAAtB,KAAiCsB,aAAjC,EAAoDX,IAApD,EADJ,CArCJ,CADJ;AA2CH;;eAEcuC,iBAAKC,MAAL,iBAAcC,kBAAMC,UAAN,CAAiB1D,YAAjB,CAAd,C;;;AAEfA,YAAY,CAAC2D,SAAb,GAAyB;AACrBtD,EAAAA,SAAS,EAAEuD,sBAAUC,MADA;AAErBpD,EAAAA,YAAY,EAAEmD,sBAAUE,IAAV,CAAeC,UAFR;AAGrBrD,EAAAA,OAAO,EAAEkD,sBAAUI,KAHE;AAIrBrD,EAAAA,WAAW,EAAEiD,sBAAUI,KAJF;AAKrBpD,EAAAA,IAAI,EAAEgD,sBAAUK,MALK;AAMrB1D,EAAAA,QAAQ,EAAEqD,sBAAUM,IANC;AAOrB1D,EAAAA,QAAQ,EAAEoD,sBAAUE,IAPC;AAQrBxD,EAAAA,iBAAiB,EAAEsD,sBAAUE,IARR;AASrBjD,EAAAA,eAAe,EAAE+C,sBAAUI,KATN;AAUrBlD,EAAAA,kBAAkB,EAAE8C,sBAAUE,IAVT;AAWrB/C,EAAAA,MAAM,EAAE6C,sBAAUM,IAXG;AAYrBC,EAAAA,sBAAsB,EAAEP,sBAAUI;AAZb,CAAzB","sourcesContent":["import React, { useState, useImperativeHandle } from 'react';\nimport Form from 'antd/es/form';\nimport Row from 'antd/es/row';\nimport Col from 'antd/es/col';\nimport Button from 'antd/es/button';\nimport useAntdTable from 'ahooks/es/useAntdTable';\nimport PropTypes from 'prop-types';\nimport VtxDatagrid from '../vtx-datagrid';\n\nfunction VtxCombogrid(props, ref) {\n const [more, setMore] = useState(false);\n const {\n prefixCls,\n setPopoverVisible,\n multiple,\n onChange,\n getTableData,\n columns,\n searchForms = [],\n form,\n selectedRowKeys,\n setSelectedRowKeys,\n spread,\n ...rest\n } = props;\n const { getFieldDecorator } = form;\n\n const { tableProps, search } = useAntdTable(getTableData, {\n defaultPageSize: 10,\n form,\n });\n const { submit, reset } = search;\n\n // 表格\n const { pagination } = tableProps;\n const { current, pageSize } = pagination;\n\n const clearSelectedRow = () => {\n onChange && onChange([]);\n setSelectedRowKeys([]);\n };\n\n let newTableProps = {\n ...tableProps,\n columns,\n startIndex: (current - 1) * pageSize + 1,\n size: 'small',\n headFootHeight: 95,\n claerRowSelection: clearSelectedRow,\n pagination: {\n ...pagination,\n showSizeChanger: false,\n onChange() {\n if (!spread) {\n clearSelectedRow();\n }\n },\n },\n onRow: record => {\n if (multiple) {\n return {};\n }\n return {\n onClick: () => {\n onChange && onChange([record]);\n setPopoverVisible(false);\n },\n };\n },\n };\n\n if (multiple) {\n newTableProps = {\n ...newTableProps,\n rowSelection: {\n selectedRowKeys,\n onChange(selectedRowKeys, selectedRows) {\n setSelectedRowKeys(selectedRowKeys);\n onChange && onChange(selectedRows);\n },\n },\n };\n }\n\n // 查询和清空会重置selectedRowKeys,因此也需清空文本中的value值\n const query = () => {\n submit();\n if (multiple && selectedRowKeys.length) {\n clearSelectedRow();\n }\n };\n const clear = () => {\n reset();\n if (multiple && selectedRowKeys.length) {\n clearSelectedRow();\n }\n };\n\n // 暴露给父组件使用\n useImperativeHandle(ref, () => ({\n clear,\n }));\n\n // 查询条件是否超过2个,超过2个默认隐藏\n const formLen = searchForms.length;\n const isMore = formLen > 2;\n let moreSearchForm = [];\n if (isMore) {\n moreSearchForm = searchForms.slice(2);\n }\n\n const renderFormItem = field => {\n const { name, label, render, fieldDecoratorOptions = {} } = field;\n return (\n <Col span={12} key={name}>\n <Form.Item label={label} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }}>\n {getFieldDecorator(name, fieldDecoratorOptions)(render && render(form))}\n </Form.Item>\n </Col>\n );\n };\n\n return (\n <div className={`${prefixCls}-popover`} ref={ref}>\n {formLen > 0 && (\n <Row gutter={8}>\n <Col span={18}>\n <Row>\n {searchForms.map((item, idx) => {\n if (idx < 2) {\n return renderFormItem(item);\n }\n })}\n </Row>\n {more && (\n <Row>\n {moreSearchForm.map(item => {\n return renderFormItem(item);\n })}\n </Row>\n )}\n </Col>\n <Col span={6} className={`${prefixCls}-btns`}>\n <Button onClick={query} type=\"primary\" size=\"small\">\n 查询\n </Button>\n <Button onClick={clear} size=\"small\">\n 清空\n </Button>\n {isMore && (\n <Button\n icon=\"more\"\n size=\"small\"\n title=\"更多\"\n onClick={() => setMore(!more)}\n />\n )}\n </Col>\n </Row>\n )}\n <div className={`${prefixCls}-main`}>\n <VtxDatagrid toolbar={false} {...newTableProps} {...rest} />\n </div>\n </div>\n );\n}\n\nexport default Form.create()(React.forwardRef(VtxCombogrid));\n\nVtxCombogrid.propTypes = {\n prefixCls: PropTypes.string,\n getTableData: PropTypes.func.isRequired,\n columns: PropTypes.array,\n searchForms: PropTypes.array,\n form: PropTypes.object,\n multiple: PropTypes.bool,\n onChange: PropTypes.func,\n setPopoverVisible: PropTypes.func,\n selectedRowKeys: PropTypes.array,\n setSelectedRowKeys: PropTypes.func,\n spread: PropTypes.bool,\n defaultSelectedRowKeys: PropTypes.array,\n};\n"],"file":"Combogrid.js"}
1
+ {"version":3,"file":"Combogrid.js","names":["VtxCombogrid","props","ref","useState","more","setMore","prefixCls","setPopoverVisible","multiple","onChange","getTableData","columns","searchForms","form","selectedRowKeys","setSelectedRowKeys","spread","rest","getFieldDecorator","useAntdTable","defaultPageSize","tableProps","search","submit","reset","pagination","current","pageSize","clearSelectedRow","newTableProps","startIndex","size","headFootHeight","claerRowSelection","showSizeChanger","onRow","record","onClick","rowSelection","selectedRows","query","length","clear","useImperativeHandle","formLen","isMore","moreSearchForm","slice","renderFormItem","field","name","label","render","fieldDecoratorOptions","span","map","item","idx","Form","create","React","forwardRef","propTypes","PropTypes","string","func","isRequired","array","object","bool","defaultSelectedRowKeys"],"sources":["vtx-combogrid/Combogrid.jsx"],"sourcesContent":["import React, { useState, useImperativeHandle } from 'react';\nimport Form from 'antd/es/form';\nimport Row from 'antd/es/row';\nimport Col from 'antd/es/col';\nimport Button from 'antd/es/button';\nimport useAntdTable from 'ahooks/es/useAntdTable';\nimport PropTypes from 'prop-types';\nimport VtxDatagrid from '../vtx-datagrid';\n\nfunction VtxCombogrid(props, ref) {\n const [more, setMore] = useState(false);\n const {\n prefixCls,\n setPopoverVisible,\n multiple,\n onChange,\n getTableData,\n columns,\n searchForms = [],\n form,\n selectedRowKeys,\n setSelectedRowKeys,\n spread,\n ...rest\n } = props;\n const { getFieldDecorator } = form;\n\n const { tableProps, search } = useAntdTable(getTableData, {\n defaultPageSize: 10,\n form,\n });\n const { submit, reset } = search;\n\n // 表格\n const { pagination } = tableProps;\n const { current, pageSize } = pagination;\n\n const clearSelectedRow = () => {\n onChange && onChange([]);\n setSelectedRowKeys([]);\n };\n\n let newTableProps = {\n ...tableProps,\n columns,\n startIndex: (current - 1) * pageSize + 1,\n size: 'small',\n headFootHeight: 95,\n claerRowSelection: clearSelectedRow,\n pagination: {\n ...pagination,\n showSizeChanger: false,\n onChange() {\n if (!spread) {\n clearSelectedRow();\n }\n },\n },\n onRow: record => {\n if (multiple) {\n return {};\n }\n return {\n onClick: () => {\n onChange && onChange([record]);\n setPopoverVisible(false);\n },\n };\n },\n };\n\n if (multiple) {\n newTableProps = {\n ...newTableProps,\n rowSelection: {\n selectedRowKeys,\n onChange(selectedRowKeys, selectedRows) {\n setSelectedRowKeys(selectedRowKeys);\n onChange && onChange(selectedRows);\n },\n },\n };\n }\n\n // 查询和清空会重置selectedRowKeys,因此也需清空文本中的value值\n const query = () => {\n submit();\n if (multiple && selectedRowKeys.length) {\n clearSelectedRow();\n }\n };\n const clear = () => {\n reset();\n if (multiple && selectedRowKeys.length) {\n clearSelectedRow();\n }\n };\n\n // 暴露给父组件使用\n useImperativeHandle(ref, () => ({\n clear,\n }));\n\n // 查询条件是否超过2个,超过2个默认隐藏\n const formLen = searchForms.length;\n const isMore = formLen > 2;\n let moreSearchForm = [];\n if (isMore) {\n moreSearchForm = searchForms.slice(2);\n }\n\n const renderFormItem = field => {\n const { name, label, render, fieldDecoratorOptions = {} } = field;\n return (\n <Col span={12} key={name}>\n <Form.Item label={label} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }}>\n {getFieldDecorator(name, fieldDecoratorOptions)(render && render(form))}\n </Form.Item>\n </Col>\n );\n };\n\n return (\n <div className={`${prefixCls}-popover`} ref={ref}>\n {formLen > 0 && (\n <Row gutter={8}>\n <Col span={18}>\n <Row>\n {searchForms.map((item, idx) => {\n if (idx < 2) {\n return renderFormItem(item);\n }\n })}\n </Row>\n {more && (\n <Row>\n {moreSearchForm.map(item => {\n return renderFormItem(item);\n })}\n </Row>\n )}\n </Col>\n <Col span={6} className={`${prefixCls}-btns`}>\n <Button onClick={query} type=\"primary\" size=\"small\">\n 查询\n </Button>\n <Button onClick={clear} size=\"small\">\n 清空\n </Button>\n {isMore && (\n <Button\n icon=\"more\"\n size=\"small\"\n title=\"更多\"\n onClick={() => setMore(!more)}\n />\n )}\n </Col>\n </Row>\n )}\n <div className={`${prefixCls}-main`}>\n <VtxDatagrid toolbar={false} {...newTableProps} {...rest} />\n </div>\n </div>\n );\n}\n\nexport default Form.create()(React.forwardRef(VtxCombogrid));\n\nVtxCombogrid.propTypes = {\n prefixCls: PropTypes.string,\n getTableData: PropTypes.func.isRequired,\n columns: PropTypes.array,\n searchForms: PropTypes.array,\n form: PropTypes.object,\n multiple: PropTypes.bool,\n onChange: PropTypes.func,\n setPopoverVisible: PropTypes.func,\n selectedRowKeys: PropTypes.array,\n setSelectedRowKeys: PropTypes.func,\n spread: PropTypes.bool,\n defaultSelectedRowKeys: PropTypes.array,\n};\n"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAA0C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAE1C,SAASA,YAAY,CAACC,KAAK,EAAEC,GAAG,EAAE;EAC9B,gBAAwB,IAAAC,eAAQ,EAAC,KAAK,CAAC;IAAA;IAAhCC,IA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AACE,IAAI;EAClCjD,MAAM,EAAE+C,qBAAS,CAACM,IAAI;EACtBC,sBAAsB,EAAEP,qBAAS,CAACI;AACtC,CAAC"}
@@ -1,77 +1,56 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
-
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports["default"] = void 0;
9
-
10
8
  var _react = _interopRequireWildcard(require("react"));
11
-
12
9
  var _input = _interopRequireDefault(require("antd/es/input"));
13
-
14
10
  var _popover = _interopRequireDefault(require("antd/es/popover"));
15
-
16
11
  var _propTypes = _interopRequireDefault(require("prop-types"));
17
-
18
12
  var _Combogrid = _interopRequireDefault(require("./Combogrid"));
19
-
13
+ var _excluded = ["className", "style", "placeholder", "prefixCls", "value", "allowClear", "selectedRowKeys"];
20
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
21
-
22
- function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
23
-
24
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
25
-
26
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
27
-
15
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
16
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
28
18
  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; }
29
-
30
19
  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; }
31
-
32
20
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
33
-
34
21
  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."); }
35
-
36
22
  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); }
37
-
38
23
  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; }
39
-
40
- function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
41
-
24
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
42
25
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
43
-
44
26
  function VtxCombogrid(props, ref) {
45
27
  var _useState = (0, _react.useState)(function () {
46
- return [];
47
- }),
48
- _useState2 = _slicedToArray(_useState, 2),
49
- selectedRowKeys = _useState2[0],
50
- setSelectedRowKeys = _useState2[1];
51
-
28
+ return [];
29
+ }),
30
+ _useState2 = _slicedToArray(_useState, 2),
31
+ selectedRowKeys = _useState2[0],
32
+ setSelectedRowKeys = _useState2[1];
52
33
  var _useState3 = (0, _react.useState)(false),
53
- _useState4 = _slicedToArray(_useState3, 2),
54
- visible = _useState4[0],
55
- setVisible = _useState4[1];
56
-
34
+ _useState4 = _slicedToArray(_useState3, 2),
35
+ visible = _useState4[0],
36
+ setVisible = _useState4[1];
57
37
  var comboRef = (0, _react.useRef)();
58
-
59
38
  var className = props.className,
60
- style = props.style,
61
- placeholder = props.placeholder,
62
- _props$prefixCls = props.prefixCls,
63
- prefixCls = _props$prefixCls === void 0 ? 'vtx-combogrid' : _props$prefixCls,
64
- value = props.value,
65
- _props$allowClear = props.allowClear,
66
- allowClear = _props$allowClear === void 0 ? true : _props$allowClear,
67
- _props$selectedRowKey = props.selectedRowKeys,
68
- defaultSelectedRowKeys = _props$selectedRowKey === void 0 ? [] : _props$selectedRowKey,
69
- rest = _objectWithoutProperties(props, ["className", "style", "placeholder", "prefixCls", "value", "allowClear", "selectedRowKeys"]);
70
-
39
+ style = props.style,
40
+ placeholder = props.placeholder,
41
+ _props$prefixCls = props.prefixCls,
42
+ prefixCls = _props$prefixCls === void 0 ? 'vtx-combogrid' : _props$prefixCls,
43
+ value = props.value,
44
+ _props$allowClear = props.allowClear,
45
+ allowClear = _props$allowClear === void 0 ? true : _props$allowClear,
46
+ _props$selectedRowKey = props.selectedRowKeys,
47
+ defaultSelectedRowKeys = _props$selectedRowKey === void 0 ? [] : _props$selectedRowKey,
48
+ rest = _objectWithoutProperties(props, _excluded);
71
49
  (0, _react.useEffect)(function () {
72
50
  setSelectedRowKeys(defaultSelectedRowKeys);
73
- }, [defaultSelectedRowKeys.join(',')]); // 暴露给父组件使用
51
+ }, [defaultSelectedRowKeys.join(',')]);
74
52
 
53
+ // 暴露给父组件使用
75
54
  (0, _react.useImperativeHandle)(ref, function () {
76
55
  return {
77
56
  // 重置
@@ -114,9 +93,7 @@ function VtxCombogrid(props, ref) {
114
93
  placeholder: placeholder
115
94
  }));
116
95
  }
117
-
118
96
  var _default = /*#__PURE__*/_react["default"].forwardRef(VtxCombogrid);
119
-
120
97
  exports["default"] = _default;
121
98
  VtxCombogrid.propTypes = {
122
99
  prefixCls: _propTypes["default"].string,
@@ -1 +1 @@
1
- {"version":3,"sources":["vtx-combogrid/index.jsx"],"names":["VtxCombogrid","props","ref","selectedRowKeys","setSelectedRowKeys","visible","setVisible","comboRef","className","style","placeholder","prefixCls","value","allowClear","defaultSelectedRowKeys","rest","join","reset","current","clear","e","target","onChange","React","forwardRef","propTypes","PropTypes","string","bool","object","array"],"mappings":";;;;;;;;;AAAA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,SAASA,YAAT,CAAsBC,KAAtB,EAA6BC,GAA7B,EAAkC;AAAA,kBACgB,qBAAS,YAAM;AACzD,WAAO,EAAP;AACH,GAF6C,CADhB;AAAA;AAAA,MACvBC,eADuB;AAAA,MACNC,kBADM;;AAAA,mBAIA,qBAAS,KAAT,CAJA;AAAA;AAAA,MAIvBC,OAJuB;AAAA,MAIdC,UAJc;;AAK9B,MAAM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IAAA,eAAe,EAAE,yBAAAA,OAAO;AAAA,aAAIC,UAAU,CAACD,OAAD,CAAd;AAAA,KAf5B;AAgBI,IAAA,gBAAgB,YAAKM,SAAL;AAhBpB,kBAkBI,gCAAC,iBAAD;AACI,IAAA,KAAK,EAAEC,KADX;AAEI,IAAA,UAAU,EAAEC,UAFhB;AAGI,IAAA,OAAO,EAAE;AAAA,aAAMP,UAAU,CAAC,IAAD,CAAhB;AAAA,KAHb;AAII,IAAA,QAAQ,EAAE,kBAAAc,CAAC,EAAI;AACX;AACA,UAAI,CAACA,CAAC,CAACC,MAAF,CAAST,KAAd,EAAqB;AACjBG,QAAAA,IAAI,CAACO,QAAL,IAAiBP,IAAI,CAACO,QAAL,EAAjB;AACAlB,QAAAA,kBAAkB,CAAC,EAAD,CAAlB;AACH;AACJ,KAVL;AAWI,IAAA,SAAS,EAAEI,SAXf;AAYI,IAAA,KAAK,EAAEC,KAZX;AAaI,IAAA,WAAW,EAAEC;AAbjB,IAlBJ,CADJ;AAoCH;;4BAEca,kBAAMC,UAAN,CAAiBxB,YAAjB,C;;;AAEfA,YAAY,CAACyB,SAAb,GAAyB;AACrBd,EAAAA,SAAS,EAAEe,sBAAUC,MADA;AAErBjB,EAAAA,WAAW,EAAEgB,sBAAUC,MAFF;AAGrBf,EAAAA,KAAK,EAAEc,sBAAUC,MAHI;AAIrBd,EAAAA,UAAU,EAAEa,sBAAUE,IAJD;AAKrBpB,EAAAA,SAAS,EAAEkB,sBAAUC,MALA;AAMrBlB,EAAAA,KAAK,EAAEiB,sBAAUG,MANI;AAOrB1B,EAAAA,eAAe,EAAEuB,sBAAUI;AAPN,CAAzB","sourcesContent":["import React, { useState, useEffect, useRef, useImperativeHandle } from 'react';\n\nimport Input from 'antd/es/input';\nimport Popover from 'antd/es/popover';\nimport PropTypes from 'prop-types';\nimport Combogrid from './Combogrid';\n\nfunction VtxCombogrid(props, ref) {\n const [selectedRowKeys, setSelectedRowKeys] = useState(() => {\n return [];\n });\n const [visible, setVisible] = useState(false);\n const comboRef = useRef();\n const {\n className,\n style,\n placeholder,\n prefixCls = 'vtx-combogrid',\n value,\n allowClear = true,\n selectedRowKeys: defaultSelectedRowKeys = [],\n ...rest\n } = props;\n\n useEffect(() => {\n setSelectedRowKeys(defaultSelectedRowKeys);\n }, [defaultSelectedRowKeys.join(',')]);\n\n // 暴露给父组件使用\n useImperativeHandle(ref, () => ({\n // 重置\n reset() {\n comboRef.current && comboRef.current.clear();\n },\n }));\n\n return (\n <Popover\n content={\n <Combogrid\n {...rest}\n selectedRowKeys={selectedRowKeys}\n defaultSelectedRowKeys={defaultSelectedRowKeys}\n setSelectedRowKeys={setSelectedRowKeys}\n setPopoverVisible={setVisible}\n prefixCls={prefixCls}\n wrappedComponentRef={comboRef}\n />\n }\n placement=\"bottomLeft\"\n trigger=\"click\"\n visible={visible}\n onVisibleChange={visible => setVisible(visible)}\n overlayClassName={`${prefixCls}-dropdown`}\n >\n <Input\n value={value}\n allowClear={allowClear}\n onClick={() => setVisible(true)}\n onChange={e => {\n // 只对清空产生值的变化做处理\n if (!e.target.value) {\n rest.onChange && rest.onChange();\n setSelectedRowKeys([]);\n }\n }}\n className={className}\n style={style}\n placeholder={placeholder}\n />\n </Popover>\n );\n}\n\nexport default React.forwardRef(VtxCombogrid);\n\nVtxCombogrid.propTypes = {\n prefixCls: PropTypes.string,\n placeholder: PropTypes.string,\n value: PropTypes.string,\n allowClear: PropTypes.bool,\n className: PropTypes.string,\n style: PropTypes.object,\n selectedRowKeys: PropTypes.array,\n};\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":["VtxCombogrid","props","ref","useState","selectedRowKeys","setSelectedRowKeys","visible","setVisible","comboRef","useRef","className","style","placeholder","prefixCls","value","allowClear","defaultSelectedRowKeys","rest","useEffect","join","useImperativeHandle","reset","current","clear","e","target","onChange","React","forwardRef","propTypes","PropTypes","string","bool","object","array"],"sources":["vtx-combogrid/index.jsx"],"sourcesContent":["import React, { useState, useEffect, useRef, useImperativeHandle } from 'react';\n\nimport Input from 'antd/es/input';\nimport Popover from 'antd/es/popover';\nimport PropTypes from 'prop-types';\nimport Combogrid from './Combogrid';\n\nfunction VtxCombogrid(props, ref) {\n const [selectedRowKeys, setSelectedRowKeys] = useState(() => {\n return [];\n });\n const [visible, setVisible] = useState(false);\n const comboRef = useRef();\n const {\n className,\n style,\n placeholder,\n prefixCls = 'vtx-combogrid',\n value,\n allowClear = true,\n selectedRowKeys: defaultSelectedRowKeys = [],\n ...rest\n } = props;\n\n useEffect(() => {\n setSelectedRowKeys(defaultSelectedRowKeys);\n }, [defaultSelectedRowKeys.join(',')]);\n\n // 暴露给父组件使用\n useImperativeHandle(ref, () => ({\n // 重置\n reset() {\n comboRef.current && comboRef.current.clear();\n },\n }));\n\n return (\n <Popover\n content={\n <Combogrid\n {...rest}\n selectedRowKeys={selectedRowKeys}\n defaultSelectedRowKeys={defaultSelectedRowKeys}\n setSelectedRowKeys={setSelectedRowKeys}\n setPopoverVisible={setVisible}\n prefixCls={prefixCls}\n wrappedComponentRef={comboRef}\n />\n }\n placement=\"bottomLeft\"\n trigger=\"click\"\n visible={visible}\n onVisibleChange={visible => setVisible(visible)}\n overlayClassName={`${prefixCls}-dropdown`}\n >\n <Input\n value={value}\n allowClear={allowClear}\n onClick={() => setVisible(true)}\n onChange={e => {\n // 只对清空产生值的变化做处理\n if (!e.target.value) {\n rest.onChange && rest.onChange();\n setSelectedRowKeys([]);\n }\n }}\n className={className}\n style={style}\n placeholder={placeholder}\n />\n </Popover>\n );\n}\n\nexport default React.forwardRef(VtxCombogrid);\n\nVtxCombogrid.propTypes = {\n prefixCls: PropTypes.string,\n placeholder: PropTypes.string,\n value: PropTypes.string,\n allowClear: PropTypes.bool,\n className: PropTypes.string,\n style: PropTypes.object,\n selectedRowKeys: PropTypes.array,\n};\n"],"mappings":";;;;;;;AAAA;AAEA;AACA;AACA;AACA;AAAoC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA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mBAAmB,EAAEL;IAAS,GAErC;IACD,SAAS,EAAC,YAAY;IACtB,OAAO,EAAC,OAAO;IACf,OAAO,EAAEF,OAAQ;IACjB,eAAe,EAAE,yBAAAA,OAAO;MAAA,OAAIC,UAAU,CAACD,OAAO,CAAC;IAAA,CAAC;IAChD,gBAAgB,YAAKO,SAAS;EAAY,gBAE1C,gCAAC,iBAAK;IACF,KAAK,EAAEC,KAAM;IACb,UAAU,EAAEC,UAAW;IACvB,OAAO,EAAE;MAAA,OAAMR,UAAU,CAAC,IAAI,CAAC;IAAA,CAAC;IAChC,QAAQ,EAAE,kBAAAiB,CAAC,EAAI;MACX;MACA,IAAI,CAACA,CAAC,CAACC,MAAM,CAACX,KAAK,EAAE;QACjBG,IAAI,CAACS,QAAQ,IAAIT,IAAI,CAACS,QAAQ,EAAE;QAChCrB,kBAAkB,CAAC,EAAE,CAAC;MAC1B;IACJ,CAAE;IACF,SAAS,EAAEK,SAAU;IACrB,KAAK,EAAEC,KAAM;IACb,WAAW,EAAEC;EAAY,EAC3B,CACI;AAElB;AAAC,4BAEce,iBAAK,CAACC,UAAU,CAAC5B,YAAY,CAAC;AAAA;AAE7CA,YAAY,CAAC6B,SAAS,GAAG;EACrBhB,SAAS,EAAEiB,qBAAS,CAACC,MAAM;EAC3BnB,WAAW,EAAEkB,qBAAS,CAACC,MAAM;EAC7BjB,KAAK,EAAEgB,qBAAS,CAACC,MAAM;EACvBhB,UAAU,EAAEe,qBAAS,CAACE,IAAI;EAC1BtB,SAAS,EAAEoB,qBAAS,CAACC,MAAM;EAC3BpB,KAAK,EAAEmB,qBAAS,CAACG,MAAM;EACvB7B,eAAe,EAAE0B,qBAAS,CAACI;AAC/B,CAAC"}
@@ -1,18 +1,11 @@
1
1
  "use strict";
2
2
 
3
3
  require("antd/es/input/style/css");
4
-
5
4
  require("antd/es/popover/style/css");
6
-
7
5
  require("antd/es/button/style/css");
8
-
9
6
  require("antd/es/form/style/css");
10
-
11
7
  require("antd/es/row/style/css");
12
-
13
8
  require("antd/es/col/style/css");
14
-
15
9
  require("../../vtx-datagrid/style");
16
-
17
10
  require("./index.css");
18
11
  //# sourceMappingURL=css.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["vtx-combogrid/style/index.js"],"names":[],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA","sourcesContent":["import 'antd/es/input/style/css';\nimport 'antd/es/popover/style/css';\nimport 'antd/es/button/style/css';\nimport 'antd/es/form/style/css';\nimport 'antd/es/row/style/css';\nimport 'antd/es/col/style/css';\nimport '../../vtx-datagrid/style';\nimport './index.less';\n"],"file":"css.js"}
1
+ {"version":3,"file":"css.js","names":[],"sources":["vtx-combogrid/style/index.js"],"sourcesContent":["import 'antd/es/input/style/css';\nimport 'antd/es/popover/style/css';\nimport 'antd/es/button/style/css';\nimport 'antd/es/form/style/css';\nimport 'antd/es/row/style/css';\nimport 'antd/es/col/style/css';\nimport '../../vtx-datagrid/style';\nimport './index.less';\n"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
@@ -1,18 +1,11 @@
1
1
  "use strict";
2
2
 
3
3
  require("antd/es/input/style/css");
4
-
5
4
  require("antd/es/popover/style/css");
6
-
7
5
  require("antd/es/button/style/css");
8
-
9
6
  require("antd/es/form/style/css");
10
-
11
7
  require("antd/es/row/style/css");
12
-
13
8
  require("antd/es/col/style/css");
14
-
15
9
  require("../../vtx-datagrid/style");
16
-
17
10
  require("./index.less");
18
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["vtx-combogrid/style/index.js"],"names":[],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA","sourcesContent":["import 'antd/es/input/style/css';\nimport 'antd/es/popover/style/css';\nimport 'antd/es/button/style/css';\nimport 'antd/es/form/style/css';\nimport 'antd/es/row/style/css';\nimport 'antd/es/col/style/css';\nimport '../../vtx-datagrid/style';\nimport './index.less';\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["vtx-combogrid/style/index.js"],"sourcesContent":["import 'antd/es/input/style/css';\nimport 'antd/es/popover/style/css';\nimport 'antd/es/button/style/css';\nimport 'antd/es/form/style/css';\nimport 'antd/es/row/style/css';\nimport 'antd/es/col/style/css';\nimport '../../vtx-datagrid/style';\nimport './index.less';\n"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}