@hw-component/form 0.0.4 → 0.0.5-beta-v1

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 (394) hide show
  1. package/es/CheckboxGroup/CheckBox/index.d.ts +2 -5
  2. package/es/CheckboxGroup/CheckBox/index.js +15 -9
  3. package/es/CheckboxGroup/hooks.d.ts +1 -1
  4. package/es/CheckboxGroup/hooks.js +18 -19
  5. package/es/CheckboxGroup/index.d.ts +2 -3
  6. package/es/CheckboxGroup/index.js +70 -26
  7. package/es/CheckboxGroup/modal.d.ts +13 -0
  8. package/es/DialogForm/DrawerForm/Footer.d.ts +7 -0
  9. package/es/DialogForm/DrawerForm/Footer.js +27 -0
  10. package/es/DialogForm/DrawerForm/Title.d.ts +3 -0
  11. package/es/DialogForm/DrawerForm/Title.js +21 -0
  12. package/es/DialogForm/DrawerForm/index.d.ts +3 -0
  13. package/es/DialogForm/DrawerForm/index.js +138 -0
  14. package/es/DialogForm/ModalForm.d.ts +3 -0
  15. package/es/DialogForm/ModalForm.js +119 -0
  16. package/es/DialogForm/hooks.d.ts +16 -0
  17. package/es/DialogForm/hooks.js +150 -0
  18. package/es/DialogForm/modal.d.ts +33 -0
  19. package/es/Form/Context/FormConfigProvider.d.ts +5 -0
  20. package/es/Form/Context/FormConfigProvider.js +49 -0
  21. package/es/Form/Context/index.d.ts +5 -0
  22. package/es/Form/Context/index.js +11 -0
  23. package/es/Form/FormItem/BasicItem.d.ts +4 -0
  24. package/es/Form/FormItem/BasicItem.js +93 -0
  25. package/es/Form/FormItem/Helper.d.ts +7 -0
  26. package/es/Form/FormItem/Helper.js +26 -0
  27. package/es/Form/FormItem/RegularFormItem.d.ts +3 -0
  28. package/es/Form/FormItem/RegularFormItem.js +25 -0
  29. package/es/Form/FormItem/UpFormItem.d.ts +3 -0
  30. package/es/Form/FormItem/UpFormItem.js +43 -0
  31. package/es/Form/FormItem/hooks.d.ts +8 -0
  32. package/es/Form/FormItem/hooks.js +38 -0
  33. package/es/Form/FormItem/index.d.ts +3 -0
  34. package/es/Form/FormItem/index.js +22 -0
  35. package/es/Form/HFormConnect.d.ts +5 -0
  36. package/es/Form/HFormConnect.js +68 -0
  37. package/es/Form/InitSet.d.ts +2 -0
  38. package/es/Form/InitSet.js +16 -0
  39. package/es/Form/Label.d.ts +10 -0
  40. package/es/Form/Label.js +49 -0
  41. package/es/Form/config.d.ts +29 -0
  42. package/es/Form/config.js +45 -0
  43. package/es/Form/hooks/index.d.ts +16 -0
  44. package/es/Form/hooks/index.js +158 -0
  45. package/es/Form/hooks/useDefaultRender.d.ts +3 -0
  46. package/es/Form/hooks/useDefaultRender.js +49 -0
  47. package/es/Form/hooks/useHForm.d.ts +3 -0
  48. package/es/Form/hooks/useHForm.js +194 -0
  49. package/es/Form/hooks/useInitConfigData.d.ts +8 -0
  50. package/es/Form/hooks/useInitConfigData.js +172 -0
  51. package/es/Form/index.d.ts +3 -0
  52. package/es/Form/index.js +103 -0
  53. package/es/Form/modal.d.ts +123 -0
  54. package/es/Input/ButtonInput.d.ts +2 -2
  55. package/es/Input/ButtonInput.js +34 -19
  56. package/es/Input/ColorInput/Picker.d.ts +3 -0
  57. package/es/Input/ColorInput/Picker.js +22 -0
  58. package/es/Input/ColorInput/data.d.ts +1 -0
  59. package/es/Input/ColorInput/data.js +5 -0
  60. package/es/Input/ColorInput/index.d.ts +3 -0
  61. package/es/Input/ColorInput/index.js +87 -0
  62. package/es/Input/InputNumber.d.ts +0 -1
  63. package/es/Input/InputNumber.js +18 -8
  64. package/es/Input/SelectInput.d.ts +2 -1
  65. package/es/Input/SelectInput.js +43 -14
  66. package/es/Input/defaultConfig.js +2 -2
  67. package/es/Input/index.d.ts +0 -1
  68. package/es/Input/index.js +17 -6
  69. package/es/Input/modal.d.ts +30 -0
  70. package/es/PageHandler/ErrorComponent.d.ts +3 -0
  71. package/es/PageHandler/ErrorComponent.js +38 -0
  72. package/es/PageHandler/LoadingComponent.d.ts +2 -0
  73. package/es/PageHandler/LoadingComponent.js +19 -0
  74. package/es/PageHandler/index.d.ts +4 -0
  75. package/es/PageHandler/index.js +26 -0
  76. package/es/PageHandler/modal.d.ts +6 -0
  77. package/es/RadioGroup/index.d.ts +2 -3
  78. package/es/RadioGroup/index.js +25 -10
  79. package/es/Select/components/AllSelect.d.ts +3 -4
  80. package/es/Select/components/AllSelect.js +36 -18
  81. package/es/Select/components/CheckBoxOption.js +8 -6
  82. package/es/Select/components/DropdownComponent.js +18 -13
  83. package/es/Select/components/NoFindItem.d.ts +0 -1
  84. package/es/Select/components/NoFindItem.js +7 -6
  85. package/es/Select/components/NotFoundContent.d.ts +0 -1
  86. package/es/Select/components/NotFoundContent.js +25 -22
  87. package/es/Select/defaultConfig.d.ts +0 -1
  88. package/es/Select/defaultConfig.js +5 -5
  89. package/es/Select/hooks/changeHooks.js +7 -4
  90. package/es/Select/hooks/norHooks.d.ts +10 -3
  91. package/es/Select/hooks/norHooks.js +53 -17
  92. package/es/Select/index.d.ts +2 -3
  93. package/es/Select/index.js +65 -36
  94. package/es/Select/modal.d.ts +9 -1
  95. package/es/Select/utils.js +2 -2
  96. package/es/Submit/index.d.ts +9 -0
  97. package/es/Submit/index.js +55 -0
  98. package/es/Switch/index.d.ts +4 -3
  99. package/es/Switch/index.js +37 -18
  100. package/es/TDPicker/RangePicker.d.ts +8 -0
  101. package/es/TDPicker/RangePicker.js +126 -0
  102. package/es/TDPicker/TimePicker.d.ts +3 -0
  103. package/es/TDPicker/TimePicker.js +45 -0
  104. package/es/TDPicker/hooks.d.ts +33 -0
  105. package/es/TDPicker/hooks.js +132 -0
  106. package/es/TDPicker/index.d.ts +4 -0
  107. package/es/TDPicker/index.js +48 -0
  108. package/es/TDPicker/modal.d.ts +35 -0
  109. package/es/TextArea/index.d.ts +3 -0
  110. package/es/TextArea/index.js +31 -0
  111. package/es/Upload/Btn.d.ts +3 -0
  112. package/es/Upload/Btn.js +36 -0
  113. package/es/Upload/MediaTypeEle/TypeEle.d.ts +9 -0
  114. package/es/Upload/MediaTypeEle/TypeEle.js +42 -0
  115. package/es/Upload/MediaTypeEle/index.d.ts +3 -0
  116. package/es/Upload/MediaTypeEle/index.js +37 -0
  117. package/es/Upload/Preview/index.d.ts +5 -0
  118. package/es/Upload/Preview/index.js +22 -0
  119. package/es/Upload/UrlUpload/index.d.ts +3 -0
  120. package/es/Upload/UrlUpload/index.js +132 -0
  121. package/es/Upload/enums.d.ts +5 -0
  122. package/es/Upload/enums.js +10 -0
  123. package/es/Upload/hooks/change.d.ts +3 -0
  124. package/es/Upload/hooks/change.js +109 -0
  125. package/es/Upload/hooks/customRequest.d.ts +3 -0
  126. package/es/Upload/hooks/customRequest.js +132 -0
  127. package/es/Upload/hooks/propsMaker.d.ts +2 -0
  128. package/es/Upload/hooks/propsMaker.js +37 -0
  129. package/es/Upload/index.d.ts +3 -0
  130. package/es/Upload/index.js +144 -0
  131. package/es/Upload/modal.d.ts +30 -0
  132. package/es/Upload/util.d.ts +5 -0
  133. package/es/Upload/util.js +34 -0
  134. package/es/config.d.ts +2 -14
  135. package/es/config.js +57 -10
  136. package/{lib/hooks/useChangeOptions.d.ts → es/hooks/index.d.ts} +3 -0
  137. package/es/hooks/index.js +75 -0
  138. package/es/index.css +42 -1
  139. package/es/index.d.ts +26 -11
  140. package/es/index.js +33 -13
  141. package/es/modal.d.ts +16 -0
  142. package/lib/CheckboxGroup/CheckBox/index.d.ts +2 -5
  143. package/lib/CheckboxGroup/CheckBox/index.js +12 -6
  144. package/lib/CheckboxGroup/hooks.d.ts +1 -1
  145. package/lib/CheckboxGroup/hooks.js +16 -17
  146. package/lib/CheckboxGroup/index.d.ts +2 -3
  147. package/lib/CheckboxGroup/index.js +68 -24
  148. package/lib/CheckboxGroup/modal.d.ts +13 -0
  149. package/lib/DialogForm/DrawerForm/Footer.d.ts +7 -0
  150. package/lib/DialogForm/DrawerForm/Footer.js +30 -0
  151. package/lib/DialogForm/DrawerForm/Title.d.ts +3 -0
  152. package/lib/DialogForm/DrawerForm/Title.js +24 -0
  153. package/lib/DialogForm/DrawerForm/index.d.ts +3 -0
  154. package/lib/DialogForm/DrawerForm/index.js +141 -0
  155. package/lib/DialogForm/ModalForm.d.ts +3 -0
  156. package/lib/DialogForm/ModalForm.js +122 -0
  157. package/lib/DialogForm/hooks.d.ts +16 -0
  158. package/lib/DialogForm/hooks.js +154 -0
  159. package/lib/DialogForm/modal.d.ts +33 -0
  160. package/lib/Form/Context/FormConfigProvider.d.ts +5 -0
  161. package/lib/Form/Context/FormConfigProvider.js +53 -0
  162. package/lib/Form/Context/index.d.ts +5 -0
  163. package/lib/Form/Context/index.js +14 -0
  164. package/lib/Form/FormItem/BasicItem.d.ts +4 -0
  165. package/lib/Form/FormItem/BasicItem.js +96 -0
  166. package/lib/Form/FormItem/Helper.d.ts +7 -0
  167. package/lib/Form/FormItem/Helper.js +29 -0
  168. package/lib/Form/FormItem/RegularFormItem.d.ts +3 -0
  169. package/lib/Form/FormItem/RegularFormItem.js +28 -0
  170. package/lib/Form/FormItem/UpFormItem.d.ts +3 -0
  171. package/lib/Form/FormItem/UpFormItem.js +46 -0
  172. package/lib/Form/FormItem/hooks.d.ts +8 -0
  173. package/lib/Form/FormItem/hooks.js +41 -0
  174. package/lib/Form/FormItem/index.d.ts +3 -0
  175. package/lib/Form/FormItem/index.js +25 -0
  176. package/lib/Form/HFormConnect.d.ts +5 -0
  177. package/lib/Form/HFormConnect.js +71 -0
  178. package/lib/Form/InitSet.d.ts +2 -0
  179. package/lib/Form/InitSet.js +19 -0
  180. package/lib/Form/Label.d.ts +10 -0
  181. package/lib/Form/Label.js +52 -0
  182. package/lib/Form/config.d.ts +29 -0
  183. package/lib/Form/config.js +49 -0
  184. package/lib/Form/hooks/index.d.ts +16 -0
  185. package/lib/Form/hooks/index.js +162 -0
  186. package/lib/Form/hooks/useDefaultRender.d.ts +3 -0
  187. package/lib/Form/hooks/useDefaultRender.js +50 -0
  188. package/lib/Form/hooks/useHForm.d.ts +3 -0
  189. package/lib/Form/hooks/useHForm.js +197 -0
  190. package/lib/Form/hooks/useInitConfigData.d.ts +8 -0
  191. package/lib/Form/hooks/useInitConfigData.js +175 -0
  192. package/lib/Form/index.d.ts +3 -0
  193. package/lib/Form/index.js +106 -0
  194. package/lib/Form/modal.d.ts +123 -0
  195. package/lib/Input/ButtonInput.d.ts +2 -2
  196. package/lib/Input/ButtonInput.js +32 -17
  197. package/lib/Input/ColorInput/Picker.d.ts +3 -0
  198. package/lib/Input/ColorInput/Picker.js +25 -0
  199. package/lib/Input/ColorInput/data.d.ts +1 -0
  200. package/lib/Input/ColorInput/data.js +6 -0
  201. package/lib/Input/ColorInput/index.d.ts +3 -0
  202. package/lib/Input/ColorInput/index.js +90 -0
  203. package/lib/Input/InputNumber.d.ts +0 -1
  204. package/lib/Input/InputNumber.js +15 -5
  205. package/lib/Input/SelectInput.d.ts +2 -1
  206. package/lib/Input/SelectInput.js +42 -12
  207. package/lib/Input/index.d.ts +0 -1
  208. package/lib/Input/index.js +15 -4
  209. package/lib/Input/modal.d.ts +30 -0
  210. package/lib/PageHandler/ErrorComponent.d.ts +3 -0
  211. package/lib/PageHandler/ErrorComponent.js +41 -0
  212. package/lib/PageHandler/LoadingComponent.d.ts +2 -0
  213. package/lib/PageHandler/LoadingComponent.js +22 -0
  214. package/lib/PageHandler/index.d.ts +4 -0
  215. package/lib/PageHandler/index.js +29 -0
  216. package/lib/PageHandler/modal.d.ts +6 -0
  217. package/lib/RadioGroup/index.d.ts +2 -3
  218. package/lib/RadioGroup/index.js +23 -8
  219. package/lib/Select/components/AllSelect.d.ts +3 -4
  220. package/lib/Select/components/AllSelect.js +34 -16
  221. package/lib/Select/components/CheckBoxOption.js +6 -4
  222. package/lib/Select/components/DropdownComponent.js +16 -11
  223. package/lib/Select/components/NoFindItem.d.ts +0 -1
  224. package/lib/Select/components/NoFindItem.js +5 -4
  225. package/lib/Select/components/NotFoundContent.d.ts +0 -1
  226. package/lib/Select/components/NotFoundContent.js +23 -20
  227. package/lib/Select/defaultConfig.d.ts +0 -1
  228. package/lib/Select/defaultConfig.js +3 -3
  229. package/lib/Select/hooks/changeHooks.js +5 -2
  230. package/lib/Select/hooks/norHooks.d.ts +10 -3
  231. package/lib/Select/hooks/norHooks.js +50 -14
  232. package/lib/Select/index.d.ts +2 -3
  233. package/lib/Select/index.js +62 -33
  234. package/lib/Select/modal.d.ts +9 -1
  235. package/lib/Submit/index.d.ts +9 -0
  236. package/lib/Submit/index.js +58 -0
  237. package/lib/Switch/index.d.ts +4 -3
  238. package/lib/Switch/index.js +34 -15
  239. package/lib/TDPicker/RangePicker.d.ts +8 -0
  240. package/lib/TDPicker/RangePicker.js +129 -0
  241. package/lib/TDPicker/TimePicker.d.ts +3 -0
  242. package/lib/TDPicker/TimePicker.js +48 -0
  243. package/lib/TDPicker/hooks.d.ts +33 -0
  244. package/lib/TDPicker/hooks.js +139 -0
  245. package/lib/TDPicker/index.d.ts +4 -0
  246. package/lib/TDPicker/index.js +51 -0
  247. package/lib/TDPicker/modal.d.ts +35 -0
  248. package/lib/TextArea/index.d.ts +3 -0
  249. package/lib/TextArea/index.js +34 -0
  250. package/lib/Upload/Btn.d.ts +3 -0
  251. package/lib/Upload/Btn.js +39 -0
  252. package/lib/Upload/MediaTypeEle/TypeEle.d.ts +9 -0
  253. package/lib/Upload/MediaTypeEle/TypeEle.js +45 -0
  254. package/lib/Upload/MediaTypeEle/index.d.ts +3 -0
  255. package/lib/Upload/MediaTypeEle/index.js +40 -0
  256. package/lib/Upload/Preview/index.d.ts +5 -0
  257. package/lib/Upload/Preview/index.js +25 -0
  258. package/lib/Upload/UrlUpload/index.d.ts +3 -0
  259. package/lib/Upload/UrlUpload/index.js +135 -0
  260. package/lib/Upload/enums.d.ts +5 -0
  261. package/lib/Upload/enums.js +9 -0
  262. package/lib/Upload/hooks/change.d.ts +3 -0
  263. package/lib/Upload/hooks/change.js +110 -0
  264. package/lib/Upload/hooks/customRequest.d.ts +3 -0
  265. package/lib/Upload/hooks/customRequest.js +133 -0
  266. package/lib/Upload/hooks/propsMaker.d.ts +2 -0
  267. package/lib/Upload/hooks/propsMaker.js +38 -0
  268. package/lib/Upload/index.d.ts +3 -0
  269. package/lib/Upload/index.js +147 -0
  270. package/lib/Upload/modal.d.ts +30 -0
  271. package/lib/Upload/util.d.ts +5 -0
  272. package/lib/Upload/util.js +38 -0
  273. package/lib/config.d.ts +2 -14
  274. package/lib/config.js +55 -8
  275. package/{es/hooks/useChangeOptions.d.ts → lib/hooks/index.d.ts} +3 -0
  276. package/lib/hooks/index.js +78 -0
  277. package/lib/index.css +42 -1
  278. package/lib/index.d.ts +26 -11
  279. package/lib/index.js +52 -23
  280. package/lib/modal.d.ts +16 -0
  281. package/package.json +7 -4
  282. package/scripts/rollup.config.js +2 -4
  283. package/scripts/webpack.config.js +5 -8
  284. package/src/Layout.tsx +4 -4
  285. package/src/components/CheckboxGroup/CheckBox/index.tsx +7 -7
  286. package/src/components/CheckboxGroup/hooks.ts +12 -13
  287. package/src/components/CheckboxGroup/index.tsx +40 -7
  288. package/src/components/CheckboxGroup/{modal.d.ts → modal.ts} +4 -1
  289. package/src/components/DialogForm/DrawerForm/Footer.tsx +20 -0
  290. package/src/components/DialogForm/DrawerForm/Title.tsx +12 -0
  291. package/src/components/DialogForm/DrawerForm/index.tsx +95 -0
  292. package/src/components/DialogForm/ModalForm.tsx +77 -0
  293. package/src/components/DialogForm/hooks.ts +109 -0
  294. package/src/components/DialogForm/modal.ts +36 -0
  295. package/src/components/Form/Context/FormConfigProvider.tsx +38 -0
  296. package/src/components/Form/Context/index.tsx +14 -0
  297. package/src/components/Form/FormItem/BasicItem.tsx +76 -0
  298. package/src/components/Form/FormItem/Helper.tsx +25 -0
  299. package/src/components/Form/FormItem/RegularFormItem.tsx +7 -0
  300. package/src/components/Form/FormItem/UpFormItem.tsx +20 -0
  301. package/src/components/Form/FormItem/hooks.tsx +40 -0
  302. package/src/components/Form/FormItem/index.tsx +8 -0
  303. package/src/components/Form/HFormConnect.tsx +67 -0
  304. package/src/components/Form/InitSet.tsx +10 -0
  305. package/src/components/Form/Label.tsx +50 -0
  306. package/src/components/Form/config.ts +43 -0
  307. package/src/components/Form/hooks/index.ts +111 -0
  308. package/src/components/Form/hooks/useDefaultRender.tsx +42 -0
  309. package/src/components/Form/hooks/useHForm.ts +164 -0
  310. package/src/components/Form/hooks/useInitConfigData.tsx +194 -0
  311. package/src/components/Form/index.less +22 -0
  312. package/src/components/Form/index.tsx +85 -0
  313. package/src/components/Form/modal.ts +179 -0
  314. package/src/components/Input/ButtonInput.tsx +11 -5
  315. package/src/components/Input/ColorInput/Picker.tsx +18 -0
  316. package/src/components/Input/ColorInput/data.ts +102 -0
  317. package/src/components/Input/ColorInput/index.less +10 -0
  318. package/src/components/Input/ColorInput/index.tsx +48 -0
  319. package/src/components/Input/SelectInput.tsx +33 -3
  320. package/src/components/Input/modal.ts +36 -0
  321. package/src/components/PageHandler/ErrorComponent.tsx +20 -0
  322. package/src/components/PageHandler/LoadingComponent.tsx +9 -0
  323. package/src/components/PageHandler/index.tsx +14 -0
  324. package/src/components/PageHandler/modal.ts +6 -0
  325. package/src/components/RadioGroup/index.tsx +8 -4
  326. package/src/components/Select/components/AllSelect.tsx +28 -17
  327. package/src/components/Select/components/DropdownComponent.tsx +1 -0
  328. package/src/components/Select/components/NotFoundContent.tsx +1 -1
  329. package/src/components/Select/hooks/changeHooks.tsx +6 -2
  330. package/src/components/Select/hooks/norHooks.ts +33 -6
  331. package/src/components/Select/index.less +20 -4
  332. package/src/components/Select/index.tsx +25 -11
  333. package/src/components/Select/modal.ts +17 -8
  334. package/src/components/Submit/index.tsx +46 -0
  335. package/src/components/Switch/index.tsx +14 -9
  336. package/src/components/TDPicker/RangePicker.tsx +109 -0
  337. package/src/components/TDPicker/TimePicker.tsx +25 -0
  338. package/src/components/TDPicker/hooks.ts +150 -0
  339. package/src/components/TDPicker/index.tsx +28 -0
  340. package/src/components/TDPicker/modal.ts +46 -0
  341. package/src/components/TextArea/index.tsx +8 -0
  342. package/src/components/Upload/Btn.tsx +24 -0
  343. package/src/components/Upload/MediaTypeEle/TypeEle.tsx +26 -0
  344. package/src/components/Upload/MediaTypeEle/index.tsx +34 -0
  345. package/src/components/Upload/Preview/index.tsx +14 -0
  346. package/src/components/Upload/UrlUpload/index.tsx +91 -0
  347. package/src/components/Upload/enums.ts +5 -0
  348. package/src/components/Upload/hooks/change.ts +79 -0
  349. package/src/components/Upload/hooks/customRequest.ts +87 -0
  350. package/src/components/Upload/hooks/propsMaker.ts +20 -0
  351. package/src/components/Upload/index.tsx +119 -0
  352. package/src/components/Upload/modal.ts +33 -0
  353. package/src/components/Upload/util.ts +27 -0
  354. package/src/components/config.ts +35 -8
  355. package/src/components/hooks/index.ts +53 -0
  356. package/src/components/index.tsx +30 -11
  357. package/src/components/modal.ts +20 -0
  358. package/src/components/styles/index.less +3 -0
  359. package/src/components/styles/local.less +1 -1
  360. package/src/components/typings.d.ts +0 -5
  361. package/src/pages/Checkbox/index.tsx +4 -5
  362. package/src/pages/DatePicker/index.tsx +20 -2
  363. package/src/pages/DrawerForm/index.tsx +127 -0
  364. package/src/pages/Form/index.tsx +203 -0
  365. package/src/pages/Input/index.tsx +2 -0
  366. package/src/pages/ModalForm/index.tsx +147 -0
  367. package/src/pages/Select/index.tsx +6 -3
  368. package/src/pages/Switch/index.tsx +1 -1
  369. package/src/pages/Upload/index.tsx +14 -0
  370. package/src/routes.tsx +24 -0
  371. package/tsconfig.json +1 -1
  372. package/es/DatePicker/RangePicker.d.ts +0 -4
  373. package/es/DatePicker/RangePicker.js +0 -23
  374. package/es/DatePicker/index.d.ts +0 -4
  375. package/es/DatePicker/index.js +0 -39
  376. package/es/TimePicker/index.d.ts +0 -2
  377. package/es/hooks/useChangeOptions.js +0 -25
  378. package/es/hooks/useClassName.d.ts +0 -1
  379. package/es/hooks/useClassName.js +0 -15
  380. package/lib/DatePicker/RangePicker.d.ts +0 -4
  381. package/lib/DatePicker/RangePicker.js +0 -26
  382. package/lib/DatePicker/index.d.ts +0 -4
  383. package/lib/DatePicker/index.js +0 -42
  384. package/lib/TimePicker/index.d.ts +0 -2
  385. package/lib/hooks/useChangeOptions.js +0 -26
  386. package/lib/hooks/useClassName.d.ts +0 -1
  387. package/lib/hooks/useClassName.js +0 -16
  388. package/src/components/DatePicker/RangePicker.tsx +0 -19
  389. package/src/components/DatePicker/index.tsx +0 -38
  390. package/src/components/DatePicker/modal.d.ts +0 -17
  391. package/src/components/Input/modal.d.ts +0 -26
  392. package/src/components/TimePicker/index.tsx +0 -1
  393. package/src/components/hooks/useChangeOptions.ts +0 -22
  394. package/src/components/hooks/useClassName.ts +0 -9
@@ -1,20 +1,30 @@
1
- // welcome to ww-building-blocks-tmp
2
- import React from 'react';
3
- import _extends from '@babel/runtime-corejs3/helpers/extends';
1
+ // welcome to hoo hoo hoo
2
+ import _Object$keys from '@babel/runtime-corejs3/core-js/object/keys';
3
+ import _Object$getOwnPropertySymbols from '@babel/runtime-corejs3/core-js/object/get-own-property-symbols';
4
+ import _filterInstanceProperty from '@babel/runtime-corejs3/core-js/instance/filter';
5
+ import _Object$getOwnPropertyDescriptor from '@babel/runtime-corejs3/core-js/object/get-own-property-descriptor';
6
+ import _forEachInstanceProperty from '@babel/runtime-corejs3/core-js/instance/for-each';
7
+ import _Object$getOwnPropertyDescriptors from '@babel/runtime-corejs3/core-js/object/get-own-property-descriptors';
8
+ import _Object$defineProperties from '@babel/runtime-corejs3/core-js/object/define-properties';
9
+ import _Object$defineProperty from '@babel/runtime-corejs3/core-js/object/define-property';
10
+ import _defineProperty from '@babel/runtime-corejs3/helpers/defineProperty';
4
11
  import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/objectWithoutProperties';
5
- import { InputNumber as InputNumber$1 } from 'antd';
12
+ import { jsx } from 'react/jsx-runtime';
13
+ import { InputNumber } from 'antd';
6
14
 
7
15
  var _excluded = ["style"];
8
- var InputNumber = (function (_ref) {
16
+ function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
17
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
18
+ var HInputNumber = (function (_ref) {
9
19
  var _ref$style = _ref.style,
10
20
  style = _ref$style === void 0 ? {
11
21
  width: "100%"
12
22
  } : _ref$style,
13
23
  props = _objectWithoutProperties(_ref, _excluded);
14
- return /*#__PURE__*/React.createElement(InputNumber$1, _extends({
24
+ return jsx(InputNumber, _objectSpread({
15
25
  style: style
16
26
  }, props));
17
27
  });
18
28
 
19
- export { InputNumber as default };
20
- // powered by ww
29
+ export { HInputNumber as default };
30
+ // powered by hdj
@@ -4,5 +4,6 @@ export declare enum SelectInputType {
4
4
  input = 0,
5
5
  select = 1
6
6
  }
7
- declare const _default: ({ selectProps, value, onChange, valueName, ...props }: HSelectInputProps) => JSX.Element;
7
+ export declare const Index: ({ selectProps, value, onChange, valueName, addFormat, addDispatchListener, ...props }: HSelectInputProps) => JSX.Element;
8
+ declare const _default: import("react").ForwardRefExoticComponent<import("../Form/modal").HFormItemProps & import("react").RefAttributes<any>>;
8
9
  export default _default;
@@ -1,30 +1,31 @@
1
- // welcome to ww-building-blocks-tmp
2
- import React from 'react';
1
+ // welcome to hoo hoo hoo
3
2
  import _Object$keys from '@babel/runtime-corejs3/core-js/object/keys';
4
3
  import _Object$getOwnPropertySymbols from '@babel/runtime-corejs3/core-js/object/get-own-property-symbols';
5
4
  import _filterInstanceProperty from '@babel/runtime-corejs3/core-js/instance/filter';
6
5
  import _Object$getOwnPropertyDescriptor from '@babel/runtime-corejs3/core-js/object/get-own-property-descriptor';
7
- import _forEachInstanceProperty from '@babel/runtime-corejs3/core-js/instance/for-each';
8
6
  import _Object$getOwnPropertyDescriptors from '@babel/runtime-corejs3/core-js/object/get-own-property-descriptors';
9
7
  import _Object$defineProperties from '@babel/runtime-corejs3/core-js/object/define-properties';
10
8
  import _Object$defineProperty from '@babel/runtime-corejs3/core-js/object/define-property';
11
- import _extends from '@babel/runtime-corejs3/helpers/extends';
12
9
  import _defineProperty from '@babel/runtime-corejs3/helpers/defineProperty';
13
10
  import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/objectWithoutProperties';
11
+ import _forEachInstanceProperty from '@babel/runtime-corejs3/core-js/instance/for-each';
12
+ import _Object$values from '@babel/runtime-corejs3/core-js/object/values';
13
+ import { jsx } from 'react/jsx-runtime';
14
14
  import { Input } from 'antd';
15
15
  import HSelect from '../Select/index.js';
16
16
  import { defaultValueName, defaultSelectStyle } from './defaultConfig.js';
17
+ import HFormConnect from '../Form/HFormConnect.js';
17
18
 
18
- var _excluded = ["selectProps", "value", "onChange", "valueName"],
19
- _excluded2 = ["style"];
19
+ var _excluded = ["selectProps", "value", "onChange", "valueName", "addFormat", "addDispatchListener"],
20
+ _excluded2 = ["style", "placeholder"];
20
21
  function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
21
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
22
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context2 = ownKeys(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context3 = ownKeys(Object(source))).call(_context3, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
22
23
  var SelectInputType;
23
24
  (function (SelectInputType) {
24
25
  SelectInputType[SelectInputType["input"] = 0] = "input";
25
26
  SelectInputType[SelectInputType["select"] = 1] = "select";
26
27
  })(SelectInputType || (SelectInputType = {}));
27
- var SelectInput = (function (_ref) {
28
+ var Index = function Index(_ref) {
28
29
  var _ref$selectProps = _ref.selectProps,
29
30
  selectProps = _ref$selectProps === void 0 ? {} : _ref$selectProps,
30
31
  _ref$value = _ref.value,
@@ -32,7 +33,9 @@ var SelectInput = (function (_ref) {
32
33
  onChange = _ref.onChange,
33
34
  _ref$valueName = _ref.valueName,
34
35
  valueName = _ref$valueName === void 0 ? defaultValueName : _ref$valueName,
35
- props = _objectWithoutProperties(_ref, _excluded);
36
+ addFormat = _ref.addFormat;
37
+ _ref.addDispatchListener;
38
+ var props = _objectWithoutProperties(_ref, _excluded);
36
39
  var _valueName$input = valueName.input,
37
40
  input = _valueName$input === void 0 ? "" : _valueName$input,
38
41
  _valueName$select = valueName.select,
@@ -41,6 +44,8 @@ var SelectInput = (function (_ref) {
41
44
  selectVal = value[select];
42
45
  var _selectProps$style = selectProps.style,
43
46
  style = _selectProps$style === void 0 ? defaultSelectStyle : _selectProps$style,
47
+ _selectProps$placehol = selectProps.placeholder,
48
+ placeholder = _selectProps$placehol === void 0 ? "请选择" : _selectProps$placehol,
44
49
  sProps = _objectWithoutProperties(selectProps, _excluded2);
45
50
  var change = function change(val, key) {
46
51
  var newVal = _objectSpread({}, value);
@@ -48,20 +53,44 @@ var SelectInput = (function (_ref) {
48
53
  var type = key === input ? SelectInputType.input : SelectInputType.select;
49
54
  onChange === null || onChange === void 0 ? void 0 : onChange(newVal, type);
50
55
  };
51
- return /*#__PURE__*/React.createElement(Input, _extends({
56
+ addFormat === null || addFormat === void 0 ? void 0 : addFormat({
57
+ "float": {
58
+ inputValue: function inputValue(item, initValue) {
59
+ var _context;
60
+ var _item$name = item.name,
61
+ name = _item$name === void 0 ? "" : _item$name;
62
+ var resultObj = {};
63
+ _forEachInstanceProperty(_context = _Object$values(valueName)).call(_context, function (key) {
64
+ resultObj[key] = initValue[key];
65
+ });
66
+ return _defineProperty({}, name, resultObj);
67
+ },
68
+ outputValue: function outputValue(item, _outputValue) {
69
+ var _item$name2 = item.name,
70
+ name = _item$name2 === void 0 ? "" : _item$name2;
71
+ var _outputValue$name = _outputValue[name],
72
+ itemVal = _outputValue$name === void 0 ? {} : _outputValue$name;
73
+ var newItemVal = _defineProperty({}, itemVal[select], itemVal[input]);
74
+ return _objectSpread({}, newItemVal);
75
+ }
76
+ }
77
+ });
78
+ return jsx(Input, _objectSpread({
52
79
  value: inputVal,
53
80
  onChange: function onChange(e) {
54
81
  change(e.target.value, input);
55
82
  },
56
- addonBefore: /*#__PURE__*/React.createElement(HSelect, _extends({}, sProps, {
83
+ addonBefore: jsx(HSelect, _objectSpread(_objectSpread({}, sProps), {}, {
57
84
  style: style,
85
+ placeholder: placeholder,
58
86
  value: selectVal,
59
87
  onChange: function onChange(val) {
60
88
  change(val, select);
61
89
  }
62
90
  }))
63
91
  }, props));
64
- });
92
+ };
93
+ var HSelectInput = HFormConnect(Index);
65
94
 
66
- export { SelectInputType, SelectInput as default };
67
- // powered by ww
95
+ export { Index, SelectInputType, HSelectInput as default };
96
+ // powered by hdj
@@ -1,4 +1,4 @@
1
- // welcome to ww-building-blocks-tmp
1
+ // welcome to hoo hoo hoo
2
2
  var defaultSelectStyle = {
3
3
  width: 128
4
4
  };
@@ -8,4 +8,4 @@ var defaultValueName = {
8
8
  };
9
9
 
10
10
  export { defaultSelectStyle, defaultValueName };
11
- // powered by ww
11
+ // powered by hdj
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { HInputProps } from "./modal";
3
2
  declare const _default: ({ ...props }: HInputProps) => JSX.Element;
4
3
  export default _default;
package/es/Input/index.js CHANGED
@@ -1,13 +1,24 @@
1
- // welcome to ww-building-blocks-tmp
2
- import React from 'react';
1
+ // welcome to hoo hoo hoo
2
+ import _Object$keys from '@babel/runtime-corejs3/core-js/object/keys';
3
+ import _Object$getOwnPropertySymbols from '@babel/runtime-corejs3/core-js/object/get-own-property-symbols';
4
+ import _filterInstanceProperty from '@babel/runtime-corejs3/core-js/instance/filter';
5
+ import _Object$getOwnPropertyDescriptor from '@babel/runtime-corejs3/core-js/object/get-own-property-descriptor';
6
+ import _forEachInstanceProperty from '@babel/runtime-corejs3/core-js/instance/for-each';
7
+ import _Object$getOwnPropertyDescriptors from '@babel/runtime-corejs3/core-js/object/get-own-property-descriptors';
8
+ import _Object$defineProperties from '@babel/runtime-corejs3/core-js/object/define-properties';
9
+ import _Object$defineProperty from '@babel/runtime-corejs3/core-js/object/define-property';
10
+ import _defineProperty from '@babel/runtime-corejs3/helpers/defineProperty';
3
11
  import _objectDestructuringEmpty from '@babel/runtime-corejs3/helpers/objectDestructuringEmpty';
4
12
  import _extends from '@babel/runtime-corejs3/helpers/extends';
13
+ import { jsx } from 'react/jsx-runtime';
5
14
  import { Input } from 'antd';
6
15
 
7
- var index = (function (_ref) {
16
+ function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
17
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
18
+ var HInput = (function (_ref) {
8
19
  var props = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
9
- return /*#__PURE__*/React.createElement(Input, props);
20
+ return jsx(Input, _objectSpread({}, props));
10
21
  });
11
22
 
12
- export { index as default };
13
- // powered by ww
23
+ export { HInput as default };
24
+ // powered by hdj
@@ -0,0 +1,30 @@
1
+ import type { ButtonProps, InputProps } from "antd";
2
+ import type { HSelectProps } from "../Select/modal";
3
+ import type { SelectInputType } from "./SelectInput";
4
+ import type { PromiseFnResult } from "../modal";
5
+ import type { addFormatItemModal } from "../Form/modal";
6
+ import type { AddDispatchListenerFn } from "../Form/modal";
7
+ export interface HInputProps<V = any> extends Omit<InputProps, "onChange" | "value"> {
8
+ onChange?: (value: V) => void;
9
+ value?: V;
10
+ }
11
+ interface ValueNameModal {
12
+ input?: string;
13
+ select?: string;
14
+ }
15
+ export interface HSelectInputProps extends Omit<HInputProps, "value" | "onChange"> {
16
+ selectProps?: HSelectProps;
17
+ value?: Record<string, any>;
18
+ onChange?: (value: Record<string, any>, type: SelectInputType) => void;
19
+ valueName?: ValueNameModal;
20
+ addFormat?: (config: Record<string, addFormatItemModal>) => void;
21
+ addDispatchListener?: AddDispatchListenerFn;
22
+ }
23
+ export interface HButtonProps extends Omit<ButtonProps, "onClick"> {
24
+ onClick: (value: string | readonly string[] | number | undefined, onChange?: (val: any) => void) => void;
25
+ }
26
+ export interface HButtonInputProps extends HInputProps {
27
+ buttonProps?: HButtonProps;
28
+ request?: PromiseFnResult;
29
+ }
30
+ export {};
@@ -0,0 +1,3 @@
1
+ import type { IHPageHandler } from "./modal";
2
+ declare const _default: ({ error, reload }: IHPageHandler) => JSX.Element;
3
+ export default _default;
@@ -0,0 +1,38 @@
1
+ // welcome to hoo hoo hoo
2
+ import { jsx, jsxs } from 'react/jsx-runtime';
3
+ import { Typography, Row, Space, Button } from 'antd';
4
+ import { ExclamationCircleOutlined } from '@ant-design/icons';
5
+
6
+ var Text = Typography.Text;
7
+ var ErrorComponent = (function (_ref) {
8
+ var error = _ref.error,
9
+ reload = _ref.reload;
10
+ return jsx(Row, {
11
+ justify: "center",
12
+ align: "middle",
13
+ style: {
14
+ height: 125
15
+ },
16
+ children: jsxs(Space, {
17
+ align: "center",
18
+ direction: "vertical",
19
+ children: [jsx(Text, {
20
+ type: "danger",
21
+ children: jsx(ExclamationCircleOutlined, {
22
+ size: 24
23
+ })
24
+ }), jsx(Text, {
25
+ type: "danger",
26
+ children: error === null || error === void 0 ? void 0 : error.message
27
+ }), jsx(Button, {
28
+ type: "primary",
29
+ size: "small",
30
+ onClick: reload,
31
+ children: "\u91CD\u65B0\u52A0\u8F7D"
32
+ })]
33
+ })
34
+ });
35
+ });
36
+
37
+ export { ErrorComponent as default };
38
+ // powered by hdj
@@ -0,0 +1,2 @@
1
+ declare const _default: () => JSX.Element;
2
+ export default _default;
@@ -0,0 +1,19 @@
1
+ // welcome to hoo hoo hoo
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import { Row, Spin } from 'antd';
4
+
5
+ var Loading = (function () {
6
+ return jsx(Row, {
7
+ justify: "center",
8
+ align: "middle",
9
+ style: {
10
+ height: 125
11
+ },
12
+ children: jsx(Spin, {
13
+ size: "large"
14
+ })
15
+ });
16
+ });
17
+
18
+ export { Loading as default };
19
+ // powered by hdj
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import type { IHPageHandler } from "./modal";
3
+ declare const Index: React.FC<IHPageHandler>;
4
+ export default Index;
@@ -0,0 +1,26 @@
1
+ // welcome to hoo hoo hoo
2
+ import { jsx, Fragment } from 'react/jsx-runtime';
3
+ import Loading from './LoadingComponent.js';
4
+ import ErrorComponent from './ErrorComponent.js';
5
+
6
+ var Index = function Index(_ref) {
7
+ var error = _ref.error,
8
+ data = _ref.data,
9
+ reload = _ref.reload,
10
+ children = _ref.children;
11
+ if (error) {
12
+ return jsx(ErrorComponent, {
13
+ error: error,
14
+ reload: reload
15
+ });
16
+ }
17
+ if (data) {
18
+ return jsx(Fragment, {
19
+ children: children
20
+ });
21
+ }
22
+ return jsx(Loading, {});
23
+ };
24
+
25
+ export { Index as default };
26
+ // powered by hdj
@@ -0,0 +1,6 @@
1
+ export interface IHPageHandler<T = any> {
2
+ loading?: boolean;
3
+ error?: Error;
4
+ reload: VoidFunction;
5
+ data?: T;
6
+ }
@@ -1,9 +1,8 @@
1
- /// <reference types="react" />
2
1
  import type { SelectProps, RadioGroupProps } from "antd/es";
3
- interface IProps extends Omit<RadioGroupProps, "onChange" | "options"> {
2
+ export interface HRadioGroupProps extends Omit<RadioGroupProps, "onChange" | "options"> {
4
3
  onChange?: (value: any) => void;
5
4
  fieldNames?: SelectProps["fieldNames"];
6
5
  options?: (Record<string, any> | string | number)[];
7
6
  }
8
- declare const _default: ({ value, options, onChange, fieldNames, ...props }: IProps) => JSX.Element;
7
+ declare const _default: ({ value, options, onChange, fieldNames: propsFieldNames, ...props }: HRadioGroupProps) => JSX.Element;
9
8
  export default _default;
@@ -1,20 +1,35 @@
1
- // welcome to ww-building-blocks-tmp
2
- import React, { useMemo } from 'react';
3
- import _extends from '@babel/runtime-corejs3/helpers/extends';
1
+ // welcome to hoo hoo hoo
2
+ import _defineProperty from '@babel/runtime-corejs3/helpers/defineProperty';
4
3
  import _typeof from '@babel/runtime-corejs3/helpers/typeof';
5
4
  import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/objectWithoutProperties';
6
5
  import _mapInstanceProperty from '@babel/runtime-corejs3/core-js/instance/map';
6
+ import _Object$keys from '@babel/runtime-corejs3/core-js/object/keys';
7
+ import _Object$getOwnPropertySymbols from '@babel/runtime-corejs3/core-js/object/get-own-property-symbols';
8
+ import _filterInstanceProperty from '@babel/runtime-corejs3/core-js/instance/filter';
9
+ import _Object$getOwnPropertyDescriptor from '@babel/runtime-corejs3/core-js/object/get-own-property-descriptor';
10
+ import _forEachInstanceProperty from '@babel/runtime-corejs3/core-js/instance/for-each';
11
+ import _Object$getOwnPropertyDescriptors from '@babel/runtime-corejs3/core-js/object/get-own-property-descriptors';
12
+ import _Object$defineProperties from '@babel/runtime-corejs3/core-js/object/define-properties';
13
+ import _Object$defineProperty from '@babel/runtime-corejs3/core-js/object/define-property';
14
+ import { jsx } from 'react/jsx-runtime';
7
15
  import { Radio } from 'antd';
8
- import { baseConfig } from '../config.js';
16
+ import { useMemo } from 'react';
17
+ import { useMatchConfigProps } from '../hooks/index.js';
9
18
 
10
19
  var _excluded = ["value", "options", "onChange", "fieldNames"];
11
- var index = (function (_ref) {
20
+ function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
21
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
22
+ var HRadioGroup = (function (_ref) {
12
23
  var value = _ref.value,
13
24
  options = _ref.options,
14
25
  _onChange = _ref.onChange,
15
- _ref$fieldNames = _ref.fieldNames,
16
- fieldNames = _ref$fieldNames === void 0 ? baseConfig.defaultFieldNames : _ref$fieldNames,
26
+ propsFieldNames = _ref.fieldNames,
17
27
  props = _objectWithoutProperties(_ref, _excluded);
28
+ var _useMatchConfigProps = useMatchConfigProps({
29
+ fieldNames: propsFieldNames
30
+ }),
31
+ _useMatchConfigProps$ = _useMatchConfigProps.fieldNames,
32
+ fieldNames = _useMatchConfigProps$ === void 0 ? {} : _useMatchConfigProps$;
18
33
  var relOptions = useMemo(function () {
19
34
  return options === null || options === void 0 ? void 0 : _mapInstanceProperty(options).call(options, function (item) {
20
35
  var type = _typeof(item);
@@ -31,7 +46,7 @@ var index = (function (_ref) {
31
46
  };
32
47
  });
33
48
  }, [options, fieldNames]);
34
- return /*#__PURE__*/React.createElement(Radio.Group, _extends({
49
+ return jsx(Radio.Group, _objectSpread({
35
50
  options: relOptions,
36
51
  value: value,
37
52
  onChange: function onChange(e) {
@@ -40,5 +55,5 @@ var index = (function (_ref) {
40
55
  }, props));
41
56
  });
42
57
 
43
- export { index as default };
44
- // powered by ww
58
+ export { HRadioGroup as default };
59
+ // powered by hdj
@@ -1,8 +1,7 @@
1
- /// <reference types="react" />
2
1
  import type { HSelectProps } from "@/components/Select/modal";
3
- import "../index.less";
2
+ import React from "react";
4
3
  interface IProps extends HSelectProps {
5
4
  checked?: boolean;
6
5
  }
7
- declare const _default: ({ allSelect, mode, onChange, value, serviceSearch, options, fieldNames, }: IProps) => JSX.Element | null;
8
- export default _default;
6
+ declare const Index: React.FC<IProps>;
7
+ export default Index;
@@ -1,23 +1,30 @@
1
- // welcome to ww-building-blocks-tmp
2
- import React from 'react';
1
+ // welcome to hoo hoo hoo
2
+ import _concatInstanceProperty from '@babel/runtime-corejs3/core-js/instance/concat';
3
+ import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
3
4
  import { Space, Checkbox } from 'antd';
4
5
  import { itemOpProvider } from '../utils.js';
5
- import { useClassName } from '../../hooks/useClassName.js';
6
+ import { useClassName } from '../../hooks/index.js';
6
7
 
7
- var AllSelect = (function (_ref) {
8
+ var useRootClassName = function useRootClassName(checked) {
9
+ var _context;
10
+ var norClassNames = ["select-item", "select-item-option"];
11
+ return checked ? _concatInstanceProperty(_context = []).call(_context, norClassNames, ["select-item-option-selected"]) : norClassNames;
12
+ };
13
+ var Index = function Index(_ref) {
8
14
  var allSelect = _ref.allSelect,
9
15
  mode = _ref.mode,
10
16
  onChange = _ref.onChange,
11
17
  value = _ref.value,
12
18
  serviceSearch = _ref.serviceSearch,
13
19
  options = _ref.options,
14
- fieldNames = _ref.fieldNames;
15
- if (!allSelect || mode !== "multiple" || serviceSearch) {
16
- return null;
17
- }
20
+ _ref$fieldNames = _ref.fieldNames,
21
+ fieldNames = _ref$fieldNames === void 0 ? {} : _ref$fieldNames,
22
+ children = _ref.children;
18
23
  var opLen = (options === null || options === void 0 ? void 0 : options.length) || 0;
19
24
  var checked = (value === null || value === void 0 ? void 0 : value.length) >= opLen;
20
- var optionsClassName = useClassName("hw-option");
25
+ var classNames = useRootClassName(checked);
26
+ var optionsClassName = useClassName(classNames);
27
+ var allCheckBox = useClassName("hw-all-check-box");
21
28
  var change = function change() {
22
29
  if (!checked) {
23
30
  var subItemOps = itemOpProvider(options, fieldNames);
@@ -26,13 +33,24 @@ var AllSelect = (function (_ref) {
26
33
  }
27
34
  onChange === null || onChange === void 0 ? void 0 : onChange([], []);
28
35
  };
29
- return /*#__PURE__*/React.createElement("div", {
30
- className: "ant-select-item ant-select-item-option ".concat(optionsClassName),
31
- onClick: change
32
- }, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Checkbox, {
33
- checked: checked
34
- }), "\u5168\u90E8"));
35
- });
36
+ if (!allSelect || mode !== "multiple" || serviceSearch) {
37
+ return jsx(Fragment, {
38
+ children: children
39
+ });
40
+ }
41
+ return jsxs("div", {
42
+ className: allCheckBox,
43
+ children: [jsx("div", {
44
+ className: optionsClassName,
45
+ onClick: change,
46
+ children: jsxs(Space, {
47
+ children: [jsx(Checkbox, {
48
+ checked: checked
49
+ }), "\u5168\u90E8"]
50
+ })
51
+ }), children]
52
+ });
53
+ };
36
54
 
37
- export { AllSelect as default };
38
- // powered by ww
55
+ export { Index as default };
56
+ // powered by hdj
@@ -1,14 +1,16 @@
1
- // welcome to ww-building-blocks-tmp
1
+ // welcome to hoo hoo hoo
2
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
3
  import { Space, Checkbox } from 'antd';
3
- import React from 'react';
4
4
 
5
5
  var CheckBoxOption = (function (_ref) {
6
6
  var label = _ref.label,
7
7
  checked = _ref.checked;
8
- return /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Checkbox, {
9
- checked: checked
10
- }), label);
8
+ return jsxs(Space, {
9
+ children: [jsx(Checkbox, {
10
+ checked: checked
11
+ }), label]
12
+ });
11
13
  });
12
14
 
13
15
  export { CheckBoxOption as default };
14
- // powered by ww
16
+ // powered by hdj
@@ -1,5 +1,5 @@
1
- // welcome to ww-building-blocks-tmp
2
- import React from 'react';
1
+ // welcome to hoo hoo hoo
2
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
3
  import { Typography, Row, Space, Spin } from 'antd';
4
4
  import NotFoundContent from './NotFoundContent.js';
5
5
 
@@ -13,27 +13,32 @@ 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(Row, {
16
+ return jsx(Row, {
17
17
  style: {
18
18
  height: 125
19
19
  },
20
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...")));
21
+ align: "middle",
22
+ children: jsxs(Space, {
23
+ direction: "vertical",
24
+ align: "center",
25
+ children: [jsx(Spin, {}), jsx(Text, {
26
+ type: "secondary",
27
+ children: "\u62FC\u547D\u52A0\u8F7D\u4E2D..."
28
+ })]
29
+ })
30
+ });
28
31
  }
29
32
  if (error && len === 0) {
30
- return /*#__PURE__*/React.createElement(NotFoundContent, {
33
+ return jsx(NotFoundContent, {
31
34
  error: error,
32
35
  reload: reload
33
36
  });
34
37
  }
35
- return /*#__PURE__*/React.createElement(React.Fragment, null, children);
38
+ return jsx(Fragment, {
39
+ children: children
40
+ });
36
41
  };
37
42
 
38
43
  export { Index as default };
39
- // powered by ww
44
+ // powered by hdj
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface IProps {
3
2
  label: string;
4
3
  }
@@ -1,13 +1,14 @@
1
- // welcome to ww-building-blocks-tmp
2
- import React from 'react';
1
+ // welcome to hoo hoo hoo
2
+ import { jsx } from 'react/jsx-runtime';
3
3
  import { Typography } from 'antd';
4
4
 
5
5
  var NoFindItem = (function (_ref) {
6
6
  var label = _ref.label;
7
- return /*#__PURE__*/React.createElement(Typography.Text, {
8
- type: "danger"
9
- }, label);
7
+ return jsx(Typography.Text, {
8
+ type: "danger",
9
+ children: label
10
+ });
10
11
  });
11
12
 
12
13
  export { NoFindItem as default };
13
- // powered by ww
14
+ // powered by hdj
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface IProps {
3
2
  error?: Error;
4
3
  reload: VoidFunction;