@hw-component/form 0.0.1-beta → 0.0.1-beta-v2

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 (246) hide show
  1. package/es/CheckboxGroup/CheckBox/index.js +16 -24
  2. package/es/CheckboxGroup/hooks.d.ts +3 -9
  3. package/es/CheckboxGroup/hooks.js +64 -115
  4. package/es/CheckboxGroup/index.d.ts +1 -6
  5. package/es/CheckboxGroup/index.js +58 -117
  6. package/es/CheckboxGroup/modal.d.ts +8 -9
  7. package/es/Form/Context/FormConfigProvider.js +19 -64
  8. package/es/Form/Context/index.d.ts +1 -4
  9. package/es/Form/Context/index.js +3 -3
  10. package/es/Form/FormItem/BasicItem.js +42 -80
  11. package/es/Form/FormItem/Helper.d.ts +1 -1
  12. package/es/Form/FormItem/Helper.js +9 -17
  13. package/es/Form/FormItem/RegularFormItem.js +8 -11
  14. package/es/Form/FormItem/UpFormItem.d.ts +1 -6
  15. package/es/Form/FormItem/UpFormItem.js +17 -27
  16. package/es/Form/FormItem/hooks.d.ts +4 -21
  17. package/es/Form/FormItem/hooks.js +9 -12
  18. package/es/Form/FormItem/index.js +5 -5
  19. package/es/Form/HFormConnect.d.ts +1 -9
  20. package/es/Form/HFormConnect.js +30 -90
  21. package/es/Form/InitSet.d.ts +1 -4
  22. package/es/Form/InitSet.js +6 -7
  23. package/es/Form/Label.d.ts +4 -4
  24. package/es/Form/Label.js +19 -36
  25. package/es/Form/config.d.ts +22 -100
  26. package/es/Form/config.js +19 -19
  27. package/es/Form/hooks/index.d.ts +1 -14
  28. package/es/Form/hooks/index.js +32 -80
  29. package/es/Form/hooks/useHForm.js +143 -224
  30. package/es/Form/hooks/useInitConfigData.d.ts +1 -4
  31. package/es/Form/hooks/useInitConfigData.js +61 -143
  32. package/es/Form/index.d.ts +1 -11
  33. package/es/Form/index.js +79 -79
  34. package/es/Form/modal.d.ts +54 -89
  35. package/es/Input/ButtonInput.js +51 -73
  36. package/es/Input/InputNumber.js +12 -21
  37. package/es/Input/SelectInput.d.ts +4 -16
  38. package/es/Input/SelectInput.js +62 -116
  39. package/es/Input/defaultConfig.d.ts +3 -3
  40. package/es/Input/defaultConfig.js +2 -2
  41. package/es/Input/index.js +7 -7
  42. package/es/Input/modal.d.ts +13 -15
  43. package/es/ModalForm/hooks.d.ts +12 -0
  44. package/es/ModalForm/hooks.js +63 -0
  45. package/es/ModalForm/index.d.ts +4 -0
  46. package/es/ModalForm/index.js +72 -0
  47. package/es/ModalForm/modal.d.ts +20 -0
  48. package/es/PageHandler/ErrorComponent.js +25 -47
  49. package/es/PageHandler/LoadingComponent.js +13 -17
  50. package/es/PageHandler/index.js +7 -7
  51. package/es/PageHandler/modal.d.ts +4 -4
  52. package/es/RadioGroup/index.d.ts +5 -12
  53. package/es/RadioGroup/index.js +33 -46
  54. package/es/Select/components/AllSelect.d.ts +1 -1
  55. package/es/Select/components/AllSelect.js +18 -40
  56. package/es/Select/components/CheckBoxOption.d.ts +3 -6
  57. package/es/Select/components/CheckBoxOption.js +7 -12
  58. package/es/Select/components/DropdownComponent.d.ts +4 -4
  59. package/es/Select/components/DropdownComponent.js +17 -30
  60. package/es/Select/components/NoFindItem.d.ts +1 -1
  61. package/es/Select/components/NoFindItem.js +7 -11
  62. package/es/Select/components/NotFoundContent.d.ts +2 -2
  63. package/es/Select/components/NotFoundContent.js +27 -49
  64. package/es/Select/defaultConfig.d.ts +1 -1
  65. package/es/Select/defaultConfig.js +16 -20
  66. package/es/Select/hooks/changeHooks.d.ts +2 -2
  67. package/es/Select/hooks/changeHooks.js +71 -147
  68. package/es/Select/hooks/norHooks.d.ts +9 -27
  69. package/es/Select/hooks/norHooks.js +39 -51
  70. package/es/Select/index.d.ts +1 -22
  71. package/es/Select/index.js +65 -124
  72. package/es/Select/modal.d.ts +15 -15
  73. package/es/Select/utils.js +15 -60
  74. package/es/Submit/index.d.ts +3 -9
  75. package/es/Submit/index.js +13 -18
  76. package/es/Switch/index.d.ts +4 -4
  77. package/es/Switch/index.js +20 -46
  78. package/es/TDPicker/RangePicker.d.ts +3 -8
  79. package/es/TDPicker/RangePicker.js +67 -138
  80. package/es/TDPicker/TimePicker.d.ts +1 -6
  81. package/es/TDPicker/TimePicker.js +13 -19
  82. package/es/TDPicker/hooks.d.ts +22 -42
  83. package/es/TDPicker/hooks.js +72 -106
  84. package/es/TDPicker/index.d.ts +1 -7
  85. package/es/TDPicker/index.js +14 -20
  86. package/es/TDPicker/modal.d.ts +16 -21
  87. package/es/TextArea/index.d.ts +1 -0
  88. package/es/Upload/Btn.d.ts +1 -5
  89. package/es/Upload/Btn.js +19 -35
  90. package/es/Upload/MediaTypeEle/TypeEle.d.ts +5 -10
  91. package/es/Upload/MediaTypeEle/TypeEle.js +23 -31
  92. package/es/Upload/MediaTypeEle/index.d.ts +1 -5
  93. package/es/Upload/MediaTypeEle/index.js +18 -21
  94. package/es/Upload/Preview/index.d.ts +1 -5
  95. package/es/Upload/Preview/index.js +13 -17
  96. package/es/Upload/UrlUpload/index.d.ts +1 -7
  97. package/es/Upload/UrlUpload/index.js +51 -72
  98. package/es/Upload/enums.d.ts +3 -3
  99. package/es/Upload/enums.js +3 -3
  100. package/es/Upload/hooks/change.d.ts +1 -8
  101. package/es/Upload/hooks/change.js +58 -115
  102. package/es/Upload/hooks/customRequest.d.ts +1 -5
  103. package/es/Upload/hooks/customRequest.js +46 -63
  104. package/es/Upload/hooks/propsMaker.d.ts +1 -5
  105. package/es/Upload/hooks/propsMaker.js +13 -52
  106. package/es/Upload/index.d.ts +1 -3
  107. package/es/Upload/index.js +61 -131
  108. package/es/Upload/modal.d.ts +15 -17
  109. package/es/Upload/util.d.ts +2 -8
  110. package/es/Upload/util.js +7 -15
  111. package/es/config.js +31 -34
  112. package/es/hooks/index.d.ts +7 -14
  113. package/es/hooks/index.js +49 -124
  114. package/es/index.d.ts +18 -98
  115. package/es/index.js +8 -22
  116. package/es/modal.d.ts +6 -6
  117. package/lib/CheckboxGroup/CheckBox/index.js +18 -26
  118. package/lib/CheckboxGroup/hooks.d.ts +3 -9
  119. package/lib/CheckboxGroup/hooks.js +65 -116
  120. package/lib/CheckboxGroup/index.d.ts +1 -6
  121. package/lib/CheckboxGroup/index.js +60 -119
  122. package/lib/CheckboxGroup/modal.d.ts +8 -9
  123. package/lib/Form/Context/FormConfigProvider.js +21 -66
  124. package/lib/Form/Context/index.d.ts +1 -4
  125. package/lib/Form/Context/index.js +4 -4
  126. package/lib/Form/FormItem/BasicItem.js +44 -82
  127. package/lib/Form/FormItem/Helper.d.ts +1 -1
  128. package/lib/Form/FormItem/Helper.js +11 -19
  129. package/lib/Form/FormItem/RegularFormItem.js +10 -13
  130. package/lib/Form/FormItem/UpFormItem.d.ts +1 -6
  131. package/lib/Form/FormItem/UpFormItem.js +19 -29
  132. package/lib/Form/FormItem/hooks.d.ts +4 -21
  133. package/lib/Form/FormItem/hooks.js +10 -13
  134. package/lib/Form/FormItem/index.js +7 -7
  135. package/lib/Form/HFormConnect.d.ts +1 -9
  136. package/lib/Form/HFormConnect.js +32 -92
  137. package/lib/Form/InitSet.d.ts +1 -4
  138. package/lib/Form/InitSet.js +8 -9
  139. package/lib/Form/Label.d.ts +4 -4
  140. package/lib/Form/Label.js +21 -41
  141. package/lib/Form/config.d.ts +22 -100
  142. package/lib/Form/config.js +21 -21
  143. package/lib/Form/hooks/index.d.ts +1 -14
  144. package/lib/Form/hooks/index.js +32 -81
  145. package/lib/Form/hooks/useHForm.js +145 -226
  146. package/lib/Form/hooks/useInitConfigData.d.ts +1 -4
  147. package/lib/Form/hooks/useInitConfigData.js +63 -144
  148. package/lib/Form/index.d.ts +1 -11
  149. package/lib/Form/index.js +83 -83
  150. package/lib/Form/modal.d.ts +54 -89
  151. package/lib/Input/ButtonInput.js +53 -75
  152. package/lib/Input/InputNumber.js +14 -23
  153. package/lib/Input/SelectInput.d.ts +4 -16
  154. package/lib/Input/SelectInput.js +66 -128
  155. package/lib/Input/defaultConfig.d.ts +3 -3
  156. package/lib/Input/defaultConfig.js +3 -3
  157. package/lib/Input/index.js +9 -9
  158. package/lib/Input/modal.d.ts +13 -15
  159. package/lib/ModalForm/hooks.d.ts +12 -0
  160. package/lib/ModalForm/hooks.js +66 -0
  161. package/lib/ModalForm/index.d.ts +4 -0
  162. package/lib/ModalForm/index.js +75 -0
  163. package/lib/ModalForm/modal.d.ts +20 -0
  164. package/lib/PageHandler/ErrorComponent.js +27 -49
  165. package/lib/PageHandler/LoadingComponent.js +15 -19
  166. package/lib/PageHandler/index.js +9 -9
  167. package/lib/PageHandler/modal.d.ts +4 -4
  168. package/lib/RadioGroup/index.d.ts +5 -12
  169. package/lib/RadioGroup/index.js +35 -48
  170. package/lib/Select/components/AllSelect.d.ts +1 -1
  171. package/lib/Select/components/AllSelect.js +20 -42
  172. package/lib/Select/components/CheckBoxOption.d.ts +3 -6
  173. package/lib/Select/components/CheckBoxOption.js +9 -14
  174. package/lib/Select/components/DropdownComponent.d.ts +4 -4
  175. package/lib/Select/components/DropdownComponent.js +19 -32
  176. package/lib/Select/components/NoFindItem.d.ts +1 -1
  177. package/lib/Select/components/NoFindItem.js +9 -13
  178. package/lib/Select/components/NotFoundContent.d.ts +2 -2
  179. package/lib/Select/components/NotFoundContent.js +29 -51
  180. package/lib/Select/defaultConfig.d.ts +1 -1
  181. package/lib/Select/defaultConfig.js +17 -21
  182. package/lib/Select/hooks/changeHooks.d.ts +2 -2
  183. package/lib/Select/hooks/changeHooks.js +72 -148
  184. package/lib/Select/hooks/norHooks.d.ts +9 -27
  185. package/lib/Select/hooks/norHooks.js +40 -52
  186. package/lib/Select/index.d.ts +1 -22
  187. package/lib/Select/index.js +67 -128
  188. package/lib/Select/modal.d.ts +15 -15
  189. package/lib/Select/utils.js +16 -61
  190. package/lib/Submit/index.d.ts +3 -9
  191. package/lib/Submit/index.js +15 -20
  192. package/lib/Switch/index.d.ts +4 -4
  193. package/lib/Switch/index.js +22 -48
  194. package/lib/TDPicker/RangePicker.d.ts +3 -8
  195. package/lib/TDPicker/RangePicker.js +69 -136
  196. package/lib/TDPicker/TimePicker.d.ts +1 -6
  197. package/lib/TDPicker/TimePicker.js +15 -21
  198. package/lib/TDPicker/hooks.d.ts +22 -42
  199. package/lib/TDPicker/hooks.js +72 -98
  200. package/lib/TDPicker/index.d.ts +1 -7
  201. package/lib/TDPicker/index.js +16 -22
  202. package/lib/TDPicker/modal.d.ts +16 -21
  203. package/lib/TextArea/index.d.ts +1 -0
  204. package/lib/Upload/Btn.d.ts +1 -5
  205. package/lib/Upload/Btn.js +21 -37
  206. package/lib/Upload/MediaTypeEle/TypeEle.d.ts +5 -10
  207. package/lib/Upload/MediaTypeEle/TypeEle.js +25 -33
  208. package/lib/Upload/MediaTypeEle/index.d.ts +1 -5
  209. package/lib/Upload/MediaTypeEle/index.js +20 -23
  210. package/lib/Upload/Preview/index.d.ts +1 -5
  211. package/lib/Upload/Preview/index.js +15 -19
  212. package/lib/Upload/UrlUpload/index.d.ts +1 -7
  213. package/lib/Upload/UrlUpload/index.js +53 -74
  214. package/lib/Upload/enums.d.ts +3 -3
  215. package/lib/Upload/enums.js +4 -4
  216. package/lib/Upload/hooks/change.d.ts +1 -8
  217. package/lib/Upload/hooks/change.js +59 -116
  218. package/lib/Upload/hooks/customRequest.d.ts +1 -5
  219. package/lib/Upload/hooks/customRequest.js +47 -64
  220. package/lib/Upload/hooks/propsMaker.d.ts +1 -5
  221. package/lib/Upload/hooks/propsMaker.js +15 -55
  222. package/lib/Upload/index.d.ts +1 -3
  223. package/lib/Upload/index.js +63 -133
  224. package/lib/Upload/modal.d.ts +15 -17
  225. package/lib/Upload/util.d.ts +2 -8
  226. package/lib/Upload/util.js +8 -16
  227. package/lib/config.js +32 -35
  228. package/lib/hooks/index.d.ts +7 -14
  229. package/lib/hooks/index.js +50 -125
  230. package/lib/index.d.ts +18 -98
  231. package/lib/index.js +10 -5
  232. package/lib/modal.d.ts +6 -6
  233. package/package.json +1 -1
  234. package/src/components/Form/InitSet.tsx +3 -5
  235. package/src/components/Form/hooks/index.ts +0 -20
  236. package/src/components/Form/hooks/useHForm.ts +8 -4
  237. package/src/components/Form/index.tsx +25 -7
  238. package/src/components/Form/modal.ts +4 -2
  239. package/src/components/Input/SelectInput.tsx +3 -2
  240. package/src/components/Input/modal.ts +2 -0
  241. package/src/components/ModalForm/hooks.ts +45 -0
  242. package/src/components/ModalForm/index.tsx +69 -0
  243. package/src/components/ModalForm/modal.ts +22 -0
  244. package/src/components/index.tsx +4 -0
  245. package/src/pages/ModalForm/index.tsx +127 -0
  246. package/src/routes.tsx +6 -1
@@ -1,16 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  import type { SelectProps, RadioGroupProps } from "antd/es";
3
- export interface HRadioGroupProps
4
- extends Omit<RadioGroupProps, "onChange" | "options"> {
5
- onChange?: (value: any) => void;
6
- fieldNames?: SelectProps["fieldNames"];
7
- options?: (Record<string, any> | string | number)[];
3
+ export interface HRadioGroupProps extends Omit<RadioGroupProps, "onChange" | "options"> {
4
+ onChange?: (value: any) => void;
5
+ fieldNames?: SelectProps["fieldNames"];
6
+ options?: (Record<string, any> | string | number)[];
8
7
  }
9
- declare const _default: ({
10
- value,
11
- options,
12
- onChange,
13
- fieldNames: propsFieldNames,
14
- ...props
15
- }: HRadioGroupProps) => JSX.Element;
8
+ declare const _default: ({ value, options, onChange, fieldNames: propsFieldNames, ...props }: HRadioGroupProps) => JSX.Element;
16
9
  export default _default;
@@ -1,61 +1,48 @@
1
1
  // welcome to hoo hoo hoo
2
- import React, { useMemo } from "react";
3
- import _extends from "@babel/runtime-corejs3/helpers/extends";
4
- import _typeof from "@babel/runtime-corejs3/helpers/typeof";
5
- import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/objectWithoutProperties";
6
- import _mapInstanceProperty from "@babel/runtime-corejs3/core-js/instance/map";
7
- import { Radio } from "antd";
8
- import { useMatchConfigProps } from "../hooks/index.js";
2
+ import React, { useMemo } from 'react';
3
+ import _extends from '@babel/runtime-corejs3/helpers/extends';
4
+ import _typeof from '@babel/runtime-corejs3/helpers/typeof';
5
+ import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/objectWithoutProperties';
6
+ import _mapInstanceProperty from '@babel/runtime-corejs3/core-js/instance/map';
7
+ import { Radio } from 'antd';
8
+ import { useMatchConfigProps } from '../hooks/index.js';
9
9
 
10
10
  var _excluded = ["value", "options", "onChange", "fieldNames"];
11
- var HRadioGroup = function (_ref) {
11
+ var HRadioGroup = (function (_ref) {
12
12
  var value = _ref.value,
13
13
  options = _ref.options,
14
14
  _onChange = _ref.onChange,
15
15
  propsFieldNames = _ref.fieldNames,
16
16
  props = _objectWithoutProperties(_ref, _excluded);
17
17
  var _useMatchConfigProps = useMatchConfigProps({
18
- fieldNames: propsFieldNames,
18
+ fieldNames: propsFieldNames
19
19
  }),
20
20
  _useMatchConfigProps$ = _useMatchConfigProps.fieldNames,
21
21
  fieldNames = _useMatchConfigProps$ === void 0 ? {} : _useMatchConfigProps$;
22
- var relOptions = useMemo(
23
- function () {
24
- return options === null || options === void 0
25
- ? void 0
26
- : _mapInstanceProperty(options).call(options, function (item) {
27
- var type = _typeof(item);
28
- if (type === "string" || type === "number") {
29
- return item;
30
- }
31
- var _fieldNames$label = fieldNames.label,
32
- labelKey = _fieldNames$label === void 0 ? "" : _fieldNames$label,
33
- _fieldNames$value = fieldNames.value,
34
- valueKey = _fieldNames$value === void 0 ? "" : _fieldNames$value;
35
- return {
36
- label: item[labelKey],
37
- value: item[valueKey],
38
- };
39
- });
40
- },
41
- [options, fieldNames]
42
- );
43
- return /*#__PURE__*/ React.createElement(
44
- Radio.Group,
45
- _extends(
46
- {
47
- options: relOptions,
48
- value: value,
49
- onChange: function onChange(e) {
50
- _onChange === null || _onChange === void 0
51
- ? void 0
52
- : _onChange(e.target.value);
53
- },
54
- },
55
- props
56
- )
57
- );
58
- };
22
+ var relOptions = useMemo(function () {
23
+ return options === null || options === void 0 ? void 0 : _mapInstanceProperty(options).call(options, function (item) {
24
+ var type = _typeof(item);
25
+ if (type === "string" || type === "number") {
26
+ return item;
27
+ }
28
+ var _fieldNames$label = fieldNames.label,
29
+ labelKey = _fieldNames$label === void 0 ? "" : _fieldNames$label,
30
+ _fieldNames$value = fieldNames.value,
31
+ valueKey = _fieldNames$value === void 0 ? "" : _fieldNames$value;
32
+ return {
33
+ label: item[labelKey],
34
+ value: item[valueKey]
35
+ };
36
+ });
37
+ }, [options, fieldNames]);
38
+ return /*#__PURE__*/React.createElement(Radio.Group, _extends({
39
+ options: relOptions,
40
+ value: value,
41
+ onChange: function onChange(e) {
42
+ _onChange === null || _onChange === void 0 ? void 0 : _onChange(e.target.value);
43
+ }
44
+ }, props));
45
+ });
59
46
 
60
47
  export { HRadioGroup as default };
61
48
  // powered by hdj
@@ -1,7 +1,7 @@
1
1
  import type { HSelectProps } from "@/components/Select/modal";
2
2
  import React from "react";
3
3
  interface IProps extends HSelectProps {
4
- checked?: boolean;
4
+ checked?: boolean;
5
5
  }
6
6
  declare const Index: React.FC<IProps>;
7
7
  export default Index;
@@ -1,18 +1,14 @@
1
1
  // welcome to hoo hoo hoo
2
- import _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/concat";
3
- import { Space, Checkbox } from "antd";
4
- import { itemOpProvider } from "../utils.js";
5
- import { useClassName } from "../../hooks/index.js";
6
- import React from "react";
2
+ import _concatInstanceProperty from '@babel/runtime-corejs3/core-js/instance/concat';
3
+ import { Space, Checkbox } from 'antd';
4
+ import { itemOpProvider } from '../utils.js';
5
+ import { useClassName } from '../../hooks/index.js';
6
+ import React from 'react';
7
7
 
8
8
  var useRootClassName = function useRootClassName(checked) {
9
9
  var _context;
10
10
  var norClassNames = ["select-item", "select-item-option"];
11
- return checked
12
- ? _concatInstanceProperty((_context = [])).call(_context, norClassNames, [
13
- "select-item-option-selected",
14
- ])
15
- : norClassNames;
11
+ return checked ? _concatInstanceProperty(_context = []).call(_context, norClassNames, ["select-item-option-selected"]) : norClassNames;
16
12
  };
17
13
  var Index = function Index(_ref) {
18
14
  var allSelect = _ref.allSelect,
@@ -24,48 +20,30 @@ var Index = function Index(_ref) {
24
20
  _ref$fieldNames = _ref.fieldNames,
25
21
  fieldNames = _ref$fieldNames === void 0 ? {} : _ref$fieldNames,
26
22
  children = _ref.children;
27
- var opLen =
28
- (options === null || options === void 0 ? void 0 : options.length) || 0;
29
- var checked =
30
- (value === null || value === void 0 ? void 0 : value.length) >= opLen;
23
+ var opLen = (options === null || options === void 0 ? void 0 : options.length) || 0;
24
+ var checked = (value === null || value === void 0 ? void 0 : value.length) >= opLen;
31
25
  var classNames = useRootClassName(checked);
32
26
  var optionsClassName = useClassName(classNames);
33
27
  var allCheckBox = useClassName("hw-all-check-box");
34
28
  var change = function change() {
35
29
  if (!checked) {
36
30
  var subItemOps = itemOpProvider(options, fieldNames);
37
- onChange === null || onChange === void 0
38
- ? void 0
39
- : onChange(options, subItemOps);
31
+ onChange === null || onChange === void 0 ? void 0 : onChange(options, subItemOps);
40
32
  return;
41
33
  }
42
34
  onChange === null || onChange === void 0 ? void 0 : onChange([], []);
43
35
  };
44
36
  if (!allSelect || mode !== "multiple" || serviceSearch) {
45
- return /*#__PURE__*/ React.createElement(React.Fragment, null, children);
37
+ return /*#__PURE__*/React.createElement(React.Fragment, null, children);
46
38
  }
47
- return /*#__PURE__*/ React.createElement(
48
- "div",
49
- {
50
- className: allCheckBox,
51
- },
52
- /*#__PURE__*/ React.createElement(
53
- "div",
54
- {
55
- className: optionsClassName,
56
- onClick: change,
57
- },
58
- /*#__PURE__*/ React.createElement(
59
- Space,
60
- null,
61
- /*#__PURE__*/ React.createElement(Checkbox, {
62
- checked: checked,
63
- }),
64
- "\u5168\u90E8"
65
- )
66
- ),
67
- children
68
- );
39
+ return /*#__PURE__*/React.createElement("div", {
40
+ className: allCheckBox
41
+ }, /*#__PURE__*/React.createElement("div", {
42
+ className: optionsClassName,
43
+ onClick: change
44
+ }, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Checkbox, {
45
+ checked: checked
46
+ }), "\u5168\u90E8")), children);
69
47
  };
70
48
 
71
49
  export { Index as default };
@@ -1,10 +1,7 @@
1
1
  import React from "react";
2
2
  interface ICheckBoxOptionProps {
3
- label?: React.ReactNode;
4
- checked: boolean;
3
+ label?: React.ReactNode;
4
+ checked: boolean;
5
5
  }
6
- declare const _default: ({
7
- label,
8
- checked,
9
- }: ICheckBoxOptionProps) => JSX.Element;
6
+ declare const _default: ({ label, checked }: ICheckBoxOptionProps) => JSX.Element;
10
7
  export default _default;
@@ -1,19 +1,14 @@
1
1
  // welcome to hoo hoo hoo
2
- import { Space, Checkbox } from "antd";
3
- import React from "react";
2
+ import { Space, Checkbox } from 'antd';
3
+ import React from 'react';
4
4
 
5
- var CheckBoxOption = function (_ref) {
5
+ var CheckBoxOption = (function (_ref) {
6
6
  var label = _ref.label,
7
7
  checked = _ref.checked;
8
- return /*#__PURE__*/ React.createElement(
9
- Space,
10
- null,
11
- /*#__PURE__*/ React.createElement(Checkbox, {
12
- checked: checked,
13
- }),
14
- label
15
- );
16
- };
8
+ return /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Checkbox, {
9
+ checked: checked
10
+ }), label);
11
+ });
17
12
 
18
13
  export { CheckBoxOption as default };
19
14
  // powered by hdj
@@ -1,9 +1,9 @@
1
1
  import React from "react";
2
2
  interface IProps {
3
- loading?: boolean;
4
- options?: any[];
5
- error?: Error;
6
- reload: VoidFunction;
3
+ loading?: boolean;
4
+ options?: any[];
5
+ error?: Error;
6
+ reload: VoidFunction;
7
7
  }
8
8
  declare const Index: React.FC<IProps>;
9
9
  export default Index;
@@ -1,7 +1,7 @@
1
1
  // welcome to hoo hoo hoo
2
- import React from "react";
3
- import { Typography, Row, Space, Spin } from "antd";
4
- import NotFoundContent from "./NotFoundContent.js";
2
+ import React from 'react';
3
+ import { Typography, Row, Space, Spin } from 'antd';
4
+ import NotFoundContent from './NotFoundContent.js';
5
5
 
6
6
  var Text = Typography.Text;
7
7
  var Index = function Index(_ref) {
@@ -13,39 +13,26 @@ var Index = function Index(_ref) {
13
13
  children = _ref.children;
14
14
  var len = options === null || options === void 0 ? void 0 : options.length;
15
15
  if (loading && len === 0) {
16
- return /*#__PURE__*/ React.createElement(
17
- Row,
18
- {
19
- style: {
20
- height: 125,
21
- },
22
- justify: "center",
23
- align: "middle",
16
+ return /*#__PURE__*/React.createElement(Row, {
17
+ style: {
18
+ height: 125
24
19
  },
25
- /*#__PURE__*/ React.createElement(
26
- Space,
27
- {
28
- direction: "vertical",
29
- align: "center",
30
- },
31
- /*#__PURE__*/ React.createElement(Spin, null),
32
- /*#__PURE__*/ React.createElement(
33
- Text,
34
- {
35
- type: "secondary",
36
- },
37
- "\u62FC\u547D\u52A0\u8F7D\u4E2D..."
38
- )
39
- )
40
- );
20
+ justify: "center",
21
+ align: "middle"
22
+ }, /*#__PURE__*/React.createElement(Space, {
23
+ direction: "vertical",
24
+ align: "center"
25
+ }, /*#__PURE__*/React.createElement(Spin, null), /*#__PURE__*/React.createElement(Text, {
26
+ type: "secondary"
27
+ }, "\u62FC\u547D\u52A0\u8F7D\u4E2D...")));
41
28
  }
42
29
  if (error && len === 0) {
43
- return /*#__PURE__*/ React.createElement(NotFoundContent, {
30
+ return /*#__PURE__*/React.createElement(NotFoundContent, {
44
31
  error: error,
45
- reload: reload,
32
+ reload: reload
46
33
  });
47
34
  }
48
- return /*#__PURE__*/ React.createElement(React.Fragment, null, children);
35
+ return /*#__PURE__*/React.createElement(React.Fragment, null, children);
49
36
  };
50
37
 
51
38
  export { Index as default };
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  interface IProps {
3
- label: string;
3
+ label: string;
4
4
  }
5
5
  declare const _default: ({ label }: IProps) => JSX.Element;
6
6
  export default _default;
@@ -1,17 +1,13 @@
1
1
  // welcome to hoo hoo hoo
2
- import React from "react";
3
- import { Typography } from "antd";
2
+ import React from 'react';
3
+ import { Typography } from 'antd';
4
4
 
5
- var NoFindItem = function (_ref) {
5
+ var NoFindItem = (function (_ref) {
6
6
  var label = _ref.label;
7
- return /*#__PURE__*/ React.createElement(
8
- Typography.Text,
9
- {
10
- type: "danger",
11
- },
12
- label
13
- );
14
- };
7
+ return /*#__PURE__*/React.createElement(Typography.Text, {
8
+ type: "danger"
9
+ }, label);
10
+ });
15
11
 
16
12
  export { NoFindItem as default };
17
13
  // powered by hdj
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  interface IProps {
3
- error?: Error;
4
- reload: VoidFunction;
3
+ error?: Error;
4
+ reload: VoidFunction;
5
5
  }
6
6
  declare const _default: ({ error, reload }: IProps) => JSX.Element;
7
7
  export default _default;
@@ -1,60 +1,38 @@
1
1
  // welcome to hoo hoo hoo
2
- import React from "react";
3
- import { Typography, Row, Space, Button, Empty } from "antd";
4
- import { ExclamationCircleOutlined } from "@ant-design/icons";
2
+ import React from 'react';
3
+ import { Typography, Row, Space, Button, Empty } from 'antd';
4
+ import { ExclamationCircleOutlined } from '@ant-design/icons';
5
5
 
6
6
  var Text = Typography.Text;
7
- var NotFoundContent = function (_ref) {
7
+ var NotFoundContent = (function (_ref) {
8
8
  var error = _ref.error,
9
9
  reload = _ref.reload;
10
10
  if (error) {
11
- return /*#__PURE__*/ React.createElement(
12
- Row,
13
- {
14
- justify: "center",
15
- align: "middle",
16
- style: {
17
- height: 125,
18
- },
19
- },
20
- /*#__PURE__*/ React.createElement(
21
- Space,
22
- {
23
- align: "center",
24
- direction: "vertical",
25
- },
26
- /*#__PURE__*/ React.createElement(
27
- Text,
28
- {
29
- type: "danger",
30
- },
31
- /*#__PURE__*/ React.createElement(ExclamationCircleOutlined, {
32
- size: 24,
33
- })
34
- ),
35
- /*#__PURE__*/ React.createElement(
36
- Text,
37
- {
38
- type: "danger",
39
- },
40
- error.message
41
- ),
42
- /*#__PURE__*/ React.createElement(
43
- Button,
44
- {
45
- type: "primary",
46
- size: "small",
47
- onClick: reload,
48
- },
49
- "\u91CD\u65B0\u52A0\u8F7D"
50
- )
51
- )
52
- );
11
+ return /*#__PURE__*/React.createElement(Row, {
12
+ justify: "center",
13
+ align: "middle",
14
+ style: {
15
+ height: 125
16
+ }
17
+ }, /*#__PURE__*/React.createElement(Space, {
18
+ align: "center",
19
+ direction: "vertical"
20
+ }, /*#__PURE__*/React.createElement(Text, {
21
+ type: "danger"
22
+ }, /*#__PURE__*/React.createElement(ExclamationCircleOutlined, {
23
+ size: 24
24
+ })), /*#__PURE__*/React.createElement(Text, {
25
+ type: "danger"
26
+ }, error.message), /*#__PURE__*/React.createElement(Button, {
27
+ type: "primary",
28
+ size: "small",
29
+ onClick: reload
30
+ }, "\u91CD\u65B0\u52A0\u8F7D")));
53
31
  }
54
- return /*#__PURE__*/ React.createElement(Empty, {
55
- image: Empty.PRESENTED_IMAGE_SIMPLE,
32
+ return /*#__PURE__*/React.createElement(Empty, {
33
+ image: Empty.PRESENTED_IMAGE_SIMPLE
56
34
  });
57
- };
35
+ });
58
36
 
59
37
  export { NotFoundContent as default };
60
38
  // powered by hdj
@@ -2,5 +2,5 @@
2
2
  import type { HSelectProps } from "@/components/Select/modal";
3
3
  export declare const defaultModeConfig: HSelectProps["modeConfig"];
4
4
  export declare const defaultSelectConfig: {
5
- noMatchItemRender: () => JSX.Element;
5
+ noMatchItemRender: () => JSX.Element;
6
6
  };
@@ -1,36 +1,32 @@
1
1
  // welcome to hoo hoo hoo
2
- import React from "react";
3
- import _mapInstanceProperty from "@babel/runtime-corejs3/core-js/instance/map";
4
- import _indexOfInstanceProperty from "@babel/runtime-corejs3/core-js/instance/index-of";
5
- import CheckBoxOption from "./components/CheckBoxOption.js";
6
- import NoFindItem from "./components/NoFindItem.js";
2
+ import React from 'react';
3
+ import _mapInstanceProperty from '@babel/runtime-corejs3/core-js/instance/map';
4
+ import _indexOfInstanceProperty from '@babel/runtime-corejs3/core-js/instance/index-of';
5
+ import CheckBoxOption from './components/CheckBoxOption.js';
6
+ import NoFindItem from './components/NoFindItem.js';
7
7
 
8
8
  var defaultModeConfig = {
9
9
  multiple: {
10
10
  icon: null,
11
11
  render: function render(item, value) {
12
- var checkVal =
13
- value === null || value === void 0
14
- ? void 0
15
- : _mapInstanceProperty(value).call(value, function (itemVal) {
16
- return itemVal.value;
17
- });
12
+ var checkVal = value === null || value === void 0 ? void 0 : _mapInstanceProperty(value).call(value, function (itemVal) {
13
+ return itemVal.value;
14
+ });
18
15
  var newVal = checkVal || [];
19
- var checked =
20
- _indexOfInstanceProperty(newVal).call(newVal, item.value) !== -1;
21
- return /*#__PURE__*/ React.createElement(CheckBoxOption, {
16
+ var checked = _indexOfInstanceProperty(newVal).call(newVal, item.value) !== -1;
17
+ return /*#__PURE__*/React.createElement(CheckBoxOption, {
22
18
  label: item.label,
23
- checked: checked,
19
+ checked: checked
24
20
  });
25
- },
26
- },
21
+ }
22
+ }
27
23
  };
28
24
  var defaultSelectConfig = {
29
25
  noMatchItemRender: function noMatchItemRender() {
30
- return /*#__PURE__*/ React.createElement(NoFindItem, {
31
- label: "选项被删除,请重新选择",
26
+ return /*#__PURE__*/React.createElement(NoFindItem, {
27
+ label: "选项被删除,请重新选择"
32
28
  });
33
- },
29
+ }
34
30
  };
35
31
 
36
32
  export { defaultModeConfig, defaultSelectConfig };
@@ -1,5 +1,5 @@
1
1
  import type { PartialHSelectProps } from "@/components/Select/modal";
2
2
  export declare const useValueChange: (params: PartialHSelectProps) => {
3
- val: any;
4
- change: (changeVal: any, itemOps: any) => void;
3
+ val: any;
4
+ change: (changeVal: any, itemOps: any) => void;
5
5
  };