wt-enjoy-link-antd-repack 4.1.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (286) hide show
  1. package/README.md +26 -0
  2. package/dist/esm/assets/location.png +0 -0
  3. package/dist/esm/component/BiuAButton/index.d.ts +18 -0
  4. package/dist/esm/component/BiuAButton/index.js +8 -0
  5. package/dist/esm/component/BiuACard/index.d.ts +2 -0
  6. package/dist/esm/component/BiuACard/index.js +9 -0
  7. package/dist/esm/component/BiuACascader/index.d.ts +10 -0
  8. package/dist/esm/component/BiuACascader/index.js +8 -0
  9. package/dist/esm/component/BiuADatePicker/index.d.ts +19 -0
  10. package/dist/esm/component/BiuADatePicker/index.js +18 -0
  11. package/dist/esm/component/BiuAForm/index.d.ts +7 -0
  12. package/dist/esm/component/BiuAForm/index.js +10 -0
  13. package/dist/esm/component/BiuAInput/index.d.ts +14 -0
  14. package/dist/esm/component/BiuAInput/index.js +32 -0
  15. package/dist/esm/component/BiuASelect/index.d.ts +6 -0
  16. package/dist/esm/component/BiuASelect/index.js +14 -0
  17. package/dist/esm/component/BiuASwitch/index.d.ts +2 -0
  18. package/dist/esm/component/BiuASwitch/index.js +9 -0
  19. package/dist/esm/component/BiuATimePicker/index.d.ts +4 -0
  20. package/dist/esm/component/BiuATimePicker/index.js +8 -0
  21. package/dist/esm/component/BiuATreeSelect/index.d.ts +2 -0
  22. package/dist/esm/component/BiuATreeSelect/index.js +8 -0
  23. package/dist/esm/component/BiuBar/index.d.ts +13 -0
  24. package/dist/esm/component/BiuBar/index.js +42 -0
  25. package/dist/esm/component/BiuComSelect/index.d.ts +24 -0
  26. package/dist/esm/component/BiuComSelect/index.js +104 -0
  27. package/dist/esm/component/BiuCue/index.d.ts +18 -0
  28. package/dist/esm/component/BiuCue/index.js +44 -0
  29. package/dist/esm/component/BiuCustomSelect/index.d.ts +19 -0
  30. package/dist/esm/component/BiuCustomSelect/index.js +153 -0
  31. package/dist/esm/component/BiuCustomTable/index.d.ts +14 -0
  32. package/dist/esm/component/BiuCustomTable/index.js +76 -0
  33. package/dist/esm/component/BiuCustomerOperCard/component/editTable.d.ts +8 -0
  34. package/dist/esm/component/BiuCustomerOperCard/component/editTable.js +264 -0
  35. package/dist/esm/component/BiuCustomerOperCard/component/index.d.ts +1 -0
  36. package/dist/esm/component/BiuCustomerOperCard/component/index.js +1 -0
  37. package/dist/esm/component/BiuCustomerOperCard/index.d.ts +20 -0
  38. package/dist/esm/component/BiuCustomerOperCard/index.js +56 -0
  39. package/dist/esm/component/BiuCustomerOperCard/type.d.ts +117 -0
  40. package/dist/esm/component/BiuCustomerOperCard/type.js +1 -0
  41. package/dist/esm/component/BiuCustomerOperCard/utils.d.ts +48 -0
  42. package/dist/esm/component/BiuCustomerOperCard/utils.js +236 -0
  43. package/dist/esm/component/BiuDescriptions/index.d.ts +9 -0
  44. package/dist/esm/component/BiuDescriptions/index.js +39 -0
  45. package/dist/esm/component/BiuDetailDrawer/index.d.ts +15 -0
  46. package/dist/esm/component/BiuDetailDrawer/index.js +54 -0
  47. package/dist/esm/component/BiuDivider/index.d.ts +4 -0
  48. package/dist/esm/component/BiuDivider/index.js +29 -0
  49. package/dist/esm/component/BiuField/component/AddressTableSelect.d.ts +3 -0
  50. package/dist/esm/component/BiuField/component/AddressTableSelect.js +150 -0
  51. package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/index.d.ts +3 -0
  52. package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/index.js +3 -0
  53. package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/useConvertSubValue.d.ts +2 -0
  54. package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/useConvertSubValue.js +49 -0
  55. package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/useConvertUnSubValue.d.ts +2 -0
  56. package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/useConvertUnSubValue.js +98 -0
  57. package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/useInConvertUnSubValue.d.ts +5 -0
  58. package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/useInConvertUnSubValue.js +82 -0
  59. package/dist/esm/component/BiuField/component/DepartOrgSelect/index.d.ts +14 -0
  60. package/dist/esm/component/BiuField/component/DepartOrgSelect/index.js +393 -0
  61. package/dist/esm/component/BiuField/component/DepartOrgSelect/type.d.ts +123 -0
  62. package/dist/esm/component/BiuField/component/DepartOrgSelect/type.js +1 -0
  63. package/dist/esm/component/BiuField/component/DepartOrgSelect/utils.d.ts +5 -0
  64. package/dist/esm/component/BiuField/component/DepartOrgSelect/utils.js +59 -0
  65. package/dist/esm/component/BiuField/component/OMSSystem/cityAreaSelect.d.ts +12 -0
  66. package/dist/esm/component/BiuField/component/OMSSystem/cityAreaSelect.js +130 -0
  67. package/dist/esm/component/BiuField/component/OMSSystem/warehouseSel.d.ts +7 -0
  68. package/dist/esm/component/BiuField/component/OMSSystem/warehouseSel.js +80 -0
  69. package/dist/esm/component/BiuField/component/SNInput.d.ts +13 -0
  70. package/dist/esm/component/BiuField/component/SNInput.js +622 -0
  71. package/dist/esm/component/BiuField/component/TableSelectLocal/addressSelect.d.ts +23 -0
  72. package/dist/esm/component/BiuField/component/TableSelectLocal/addressSelect.js +187 -0
  73. package/dist/esm/component/BiuField/component/TableSelectLocal/base.d.ts +13 -0
  74. package/dist/esm/component/BiuField/component/TableSelectLocal/base.js +153 -0
  75. package/dist/esm/component/BiuField/component/TableSelectLocal/goodSelect.d.ts +21 -0
  76. package/dist/esm/component/BiuField/component/TableSelectLocal/goodSelect.js +238 -0
  77. package/dist/esm/component/BiuField/component/TableSelectLocal/index.d.ts +3 -0
  78. package/dist/esm/component/BiuField/component/TableSelectLocal/index.js +66 -0
  79. package/dist/esm/component/BiuField/component/TableSelectLocal/interface.d.ts +16 -0
  80. package/dist/esm/component/BiuField/component/TableSelectLocal/interface.js +1 -0
  81. package/dist/esm/component/BiuField/component/TableSelectLocal/locationSelect.d.ts +24 -0
  82. package/dist/esm/component/BiuField/component/TableSelectLocal/locationSelect.js +164 -0
  83. package/dist/esm/component/BiuField/component/TableSelectLocal/package.d.ts +3 -0
  84. package/dist/esm/component/BiuField/component/TableSelectLocal/package.js +149 -0
  85. package/dist/esm/component/BiuField/component/TableSelectLocal/supplierSelect.d.ts +18 -0
  86. package/dist/esm/component/BiuField/component/TableSelectLocal/supplierSelect.js +145 -0
  87. package/dist/esm/component/BiuField/component/TableSelectLocal/warehouseAreaSelect.d.ts +3 -0
  88. package/dist/esm/component/BiuField/component/TableSelectLocal/warehouseAreaSelect.js +113 -0
  89. package/dist/esm/component/BiuField/component/TableSelectLocal/warehouseInfoSelects.d.ts +18 -0
  90. package/dist/esm/component/BiuField/component/TableSelectLocal/warehouseInfoSelects.js +100 -0
  91. package/dist/esm/component/BiuField/component/appliedgoodsTypeSelect.d.ts +9 -0
  92. package/dist/esm/component/BiuField/component/appliedgoodsTypeSelect.js +75 -0
  93. package/dist/esm/component/BiuField/component/autoComplete.d.ts +8 -0
  94. package/dist/esm/component/BiuField/component/autoComplete.js +82 -0
  95. package/dist/esm/component/BiuField/component/boxTypeSelect.d.ts +11 -0
  96. package/dist/esm/component/BiuField/component/boxTypeSelect.js +139 -0
  97. package/dist/esm/component/BiuField/component/businessdistrictselect.d.ts +55 -0
  98. package/dist/esm/component/BiuField/component/businessdistrictselect.js +414 -0
  99. package/dist/esm/component/BiuField/component/carrierInfoSelect.d.ts +13 -0
  100. package/dist/esm/component/BiuField/component/carrierInfoSelect.js +145 -0
  101. package/dist/esm/component/BiuField/component/channelSelect.d.ts +8 -0
  102. package/dist/esm/component/BiuField/component/channelSelect.js +94 -0
  103. package/dist/esm/component/BiuField/component/cityAreaCascader.d.ts +11 -0
  104. package/dist/esm/component/BiuField/component/cityAreaCascader.js +86 -0
  105. package/dist/esm/component/BiuField/component/clientInfoTableSelect.d.ts +3 -0
  106. package/dist/esm/component/BiuField/component/clientInfoTableSelect.js +175 -0
  107. package/dist/esm/component/BiuField/component/customMenu.d.ts +3 -0
  108. package/dist/esm/component/BiuField/component/customMenu.js +110 -0
  109. package/dist/esm/component/BiuField/component/databaseSelect.d.ts +6 -0
  110. package/dist/esm/component/BiuField/component/databaseSelect.js +42 -0
  111. package/dist/esm/component/BiuField/component/departmentTreeSelect.d.ts +3 -0
  112. package/dist/esm/component/BiuField/component/departmentTreeSelect.js +107 -0
  113. package/dist/esm/component/BiuField/component/dicNameSelect.d.ts +12 -0
  114. package/dist/esm/component/BiuField/component/dicNameSelect.js +53 -0
  115. package/dist/esm/component/BiuField/component/dicTypeSelect.d.ts +41 -0
  116. package/dist/esm/component/BiuField/component/dicTypeSelect.js +84 -0
  117. package/dist/esm/component/BiuField/component/dockingPartySelect.d.ts +8 -0
  118. package/dist/esm/component/BiuField/component/dockingPartySelect.js +63 -0
  119. package/dist/esm/component/BiuField/component/editLocationSelect.d.ts +18 -0
  120. package/dist/esm/component/BiuField/component/editLocationSelect.js +119 -0
  121. package/dist/esm/component/BiuField/component/electronicFaceSheet/accountSelect.d.ts +3 -0
  122. package/dist/esm/component/BiuField/component/electronicFaceSheet/accountSelect.js +36 -0
  123. package/dist/esm/component/BiuField/component/electronicFaceSheet/addresSelect.d.ts +14 -0
  124. package/dist/esm/component/BiuField/component/electronicFaceSheet/addresSelect.js +97 -0
  125. package/dist/esm/component/BiuField/component/electronicFaceSheet/platformSelect.d.ts +7 -0
  126. package/dist/esm/component/BiuField/component/electronicFaceSheet/platformSelect.js +73 -0
  127. package/dist/esm/component/BiuField/component/goodsTypeSelect.d.ts +10 -0
  128. package/dist/esm/component/BiuField/component/goodsTypeSelect.js +92 -0
  129. package/dist/esm/component/BiuField/component/index.d.ts +37 -0
  130. package/dist/esm/component/BiuField/component/index.js +37 -0
  131. package/dist/esm/component/BiuField/component/interfaceNameSelect.d.ts +9 -0
  132. package/dist/esm/component/BiuField/component/interfaceNameSelect.js +65 -0
  133. package/dist/esm/component/BiuField/component/lpnSelect.d.ts +3 -0
  134. package/dist/esm/component/BiuField/component/lpnSelect.js +88 -0
  135. package/dist/esm/component/BiuField/component/orderTypeSelect.d.ts +15 -0
  136. package/dist/esm/component/BiuField/component/orderTypeSelect.js +79 -0
  137. package/dist/esm/component/BiuField/component/orderTypeTableSelect.d.ts +3 -0
  138. package/dist/esm/component/BiuField/component/orderTypeTableSelect.js +45 -0
  139. package/dist/esm/component/BiuField/component/parkSelect.d.ts +12 -0
  140. package/dist/esm/component/BiuField/component/parkSelect.js +88 -0
  141. package/dist/esm/component/BiuField/component/personnelinfoselect.d.ts +57 -0
  142. package/dist/esm/component/BiuField/component/personnelinfoselect.js +431 -0
  143. package/dist/esm/component/BiuField/component/propertNameSelect.d.ts +9 -0
  144. package/dist/esm/component/BiuField/component/propertNameSelect.js +114 -0
  145. package/dist/esm/component/BiuField/component/shipperTableSelect.d.ts +3 -0
  146. package/dist/esm/component/BiuField/component/shipperTableSelect.js +94 -0
  147. package/dist/esm/component/BiuField/component/userSelect.d.ts +8 -0
  148. package/dist/esm/component/BiuField/component/userSelect.js +163 -0
  149. package/dist/esm/component/BiuField/component/warehouseAreaSelect.d.ts +9 -0
  150. package/dist/esm/component/BiuField/component/warehouseAreaSelect.js +103 -0
  151. package/dist/esm/component/BiuField/component/warehouseInfoSelect.d.ts +13 -0
  152. package/dist/esm/component/BiuField/component/warehouseInfoSelect.js +92 -0
  153. package/dist/esm/component/BiuField/component/warehouseLoctionSelect.d.ts +14 -0
  154. package/dist/esm/component/BiuField/component/warehouseLoctionSelect.js +124 -0
  155. package/dist/esm/component/BiuField/index.d.ts +8 -0
  156. package/dist/esm/component/BiuField/index.js +607 -0
  157. package/dist/esm/component/BiuFileInput/index.d.ts +11 -0
  158. package/dist/esm/component/BiuFileInput/index.js +53 -0
  159. package/dist/esm/component/BiuForm/index.d.ts +12 -0
  160. package/dist/esm/component/BiuForm/index.js +241 -0
  161. package/dist/esm/component/BiuForm/type.d.ts +45 -0
  162. package/dist/esm/component/BiuForm/type.js +1 -0
  163. package/dist/esm/component/BiuForm/utils.d.ts +2 -0
  164. package/dist/esm/component/BiuForm/utils.js +46 -0
  165. package/dist/esm/component/BiuIcon/index.d.ts +3 -0
  166. package/dist/esm/component/BiuIcon/index.js +15 -0
  167. package/dist/esm/component/BiuMapSelectSite/index.d.ts +48 -0
  168. package/dist/esm/component/BiuMapSelectSite/index.js +453 -0
  169. package/dist/esm/component/BiuModal/index.d.ts +24 -0
  170. package/dist/esm/component/BiuModal/index.js +239 -0
  171. package/dist/esm/component/BiuOperForm/index.d.ts +15 -0
  172. package/dist/esm/component/BiuOperForm/index.js +375 -0
  173. package/dist/esm/component/BiuOperForm/type.d.ts +23 -0
  174. package/dist/esm/component/BiuOperForm/type.js +1 -0
  175. package/dist/esm/component/BiuOperTable/index.d.ts +15 -0
  176. package/dist/esm/component/BiuOperTable/index.js +349 -0
  177. package/dist/esm/component/BiuOperTable/type.d.ts +142 -0
  178. package/dist/esm/component/BiuOperTable/type.js +1 -0
  179. package/dist/esm/component/BiuOperTable/utils.d.ts +6 -0
  180. package/dist/esm/component/BiuOperTable/utils.js +13 -0
  181. package/dist/esm/component/BiuPagination/index.d.ts +14 -0
  182. package/dist/esm/component/BiuPagination/index.js +34 -0
  183. package/dist/esm/component/BiuResizeTable/component/biuTableCell.d.ts +1 -0
  184. package/dist/esm/component/BiuResizeTable/component/biuTableCell.js +74 -0
  185. package/dist/esm/component/BiuResizeTable/component/index.d.ts +1 -0
  186. package/dist/esm/component/BiuResizeTable/component/index.js +1 -0
  187. package/dist/esm/component/BiuResizeTable/index.d.ts +2 -0
  188. package/dist/esm/component/BiuResizeTable/index.js +71 -0
  189. package/dist/esm/component/BiuResizeTable/index.less +19 -0
  190. package/dist/esm/component/BiuSplit/index.d.ts +32 -0
  191. package/dist/esm/component/BiuSplit/index.js +57 -0
  192. package/dist/esm/component/BiuTable/component/index.d.ts +3 -0
  193. package/dist/esm/component/BiuTable/component/index.js +3 -0
  194. package/dist/esm/component/BiuTable/component/tableActionBarRender.d.ts +9 -0
  195. package/dist/esm/component/BiuTable/component/tableActionBarRender.js +88 -0
  196. package/dist/esm/component/BiuTable/component/tableCellRender.d.ts +14 -0
  197. package/dist/esm/component/BiuTable/component/tableCellRender.js +108 -0
  198. package/dist/esm/component/BiuTable/component/tableSettingRender.d.ts +2 -0
  199. package/dist/esm/component/BiuTable/component/tableSettingRender.js +345 -0
  200. package/dist/esm/component/BiuTable/context.d.ts +2 -0
  201. package/dist/esm/component/BiuTable/context.js +2 -0
  202. package/dist/esm/component/BiuTable/hooks/index.d.ts +1 -0
  203. package/dist/esm/component/BiuTable/hooks/index.js +1 -0
  204. package/dist/esm/component/BiuTable/hooks/useFetchData.d.ts +4 -0
  205. package/dist/esm/component/BiuTable/hooks/useFetchData.js +64 -0
  206. package/dist/esm/component/BiuTable/index.d.ts +42 -0
  207. package/dist/esm/component/BiuTable/index.js +484 -0
  208. package/dist/esm/component/BiuTable/type.d.ts +168 -0
  209. package/dist/esm/component/BiuTable/type.js +1 -0
  210. package/dist/esm/component/BiuTable/utils.d.ts +10 -0
  211. package/dist/esm/component/BiuTable/utils.js +117 -0
  212. package/dist/esm/component/BiuTableLink/index.d.ts +11 -0
  213. package/dist/esm/component/BiuTableLink/index.js +54 -0
  214. package/dist/esm/component/BiuTableSelect/index.d.ts +49 -0
  215. package/dist/esm/component/BiuTableSelect/index.js +209 -0
  216. package/dist/esm/component/BiuTabs/index.d.ts +4 -0
  217. package/dist/esm/component/BiuTabs/index.js +18 -0
  218. package/dist/esm/component/BiuVirtualTable/index.d.ts +21 -0
  219. package/dist/esm/component/BiuVirtualTable/index.js +161 -0
  220. package/dist/esm/component/index.d.ts +35 -0
  221. package/dist/esm/component/index.js +35 -0
  222. package/dist/esm/constant/Cache_Key.d.ts +28 -0
  223. package/dist/esm/constant/Cache_Key.js +28 -0
  224. package/dist/esm/constant/DateTime.d.ts +12 -0
  225. package/dist/esm/constant/DateTime.js +15 -0
  226. package/dist/esm/constant/External.d.ts +64 -0
  227. package/dist/esm/constant/External.js +260 -0
  228. package/dist/esm/constant/Gateway_Path.d.ts +5 -0
  229. package/dist/esm/constant/Gateway_Path.js +5 -0
  230. package/dist/esm/constant/Layout.d.ts +210 -0
  231. package/dist/esm/constant/Layout.js +215 -0
  232. package/dist/esm/constant/Regexp.d.ts +109 -0
  233. package/dist/esm/constant/Regexp.js +130 -0
  234. package/dist/esm/constant/index.d.ts +6 -0
  235. package/dist/esm/constant/index.js +6 -0
  236. package/dist/esm/hooks/index.d.ts +6 -0
  237. package/dist/esm/hooks/index.js +6 -0
  238. package/dist/esm/hooks/useAuth.d.ts +4 -0
  239. package/dist/esm/hooks/useAuth.js +22 -0
  240. package/dist/esm/hooks/useCurrentSystem.d.ts +6 -0
  241. package/dist/esm/hooks/useCurrentSystem.js +15 -0
  242. package/dist/esm/hooks/useLayoutInfo.d.ts +10 -0
  243. package/dist/esm/hooks/useLayoutInfo.js +14 -0
  244. package/dist/esm/hooks/useReducerState.d.ts +16 -0
  245. package/dist/esm/hooks/useReducerState.js +43 -0
  246. package/dist/esm/hooks/useUserInfo.d.ts +4 -0
  247. package/dist/esm/hooks/useUserInfo.js +15 -0
  248. package/dist/esm/hooks/useWareInfo.d.ts +4 -0
  249. package/dist/esm/hooks/useWareInfo.js +15 -0
  250. package/dist/esm/index.d.ts +5 -0
  251. package/dist/esm/index.js +5 -0
  252. package/dist/esm/package/index.d.ts +1 -0
  253. package/dist/esm/package/index.js +1 -0
  254. package/dist/esm/package/requestWrapper/baseRequest.d.ts +3 -0
  255. package/dist/esm/package/requestWrapper/baseRequest.js +47 -0
  256. package/dist/esm/package/requestWrapper/index.d.ts +4 -0
  257. package/dist/esm/package/requestWrapper/index.js +402 -0
  258. package/dist/esm/package/requestWrapper/type.d.ts +36 -0
  259. package/dist/esm/package/requestWrapper/type.js +1 -0
  260. package/dist/esm/package/requestWrapper/utils.d.ts +10 -0
  261. package/dist/esm/package/requestWrapper/utils.js +35 -0
  262. package/dist/esm/utils/authUtils.d.ts +18 -0
  263. package/dist/esm/utils/authUtils.js +36 -0
  264. package/dist/esm/utils/cacheUtils.d.ts +4 -0
  265. package/dist/esm/utils/cacheUtils.js +24 -0
  266. package/dist/esm/utils/chainUtils.d.ts +26 -0
  267. package/dist/esm/utils/chainUtils.js +54 -0
  268. package/dist/esm/utils/dateUtils.d.ts +23 -0
  269. package/dist/esm/utils/dateUtils.js +55 -0
  270. package/dist/esm/utils/decimalUtils.d.ts +5 -0
  271. package/dist/esm/utils/decimalUtils.js +7 -0
  272. package/dist/esm/utils/excelUtils.d.ts +22 -0
  273. package/dist/esm/utils/excelUtils.js +153 -0
  274. package/dist/esm/utils/index.d.ts +11 -0
  275. package/dist/esm/utils/index.js +11 -0
  276. package/dist/esm/utils/layoutUtils.d.ts +1 -0
  277. package/dist/esm/utils/layoutUtils.js +13 -0
  278. package/dist/esm/utils/objectUtils.d.ts +1 -0
  279. package/dist/esm/utils/objectUtils.js +3 -0
  280. package/dist/esm/utils/soundUtils.d.ts +5 -0
  281. package/dist/esm/utils/soundUtils.js +29 -0
  282. package/dist/esm/utils/stringUtils.d.ts +24 -0
  283. package/dist/esm/utils/stringUtils.js +39 -0
  284. package/dist/esm/utils/sysUtils.d.ts +4 -0
  285. package/dist/esm/utils/sysUtils.js +4 -0
  286. package/package.json +59 -0
@@ -0,0 +1,239 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ var _excluded = ["open", "onOk", "onCancel", "width", "title", "footer", "cancelText", "cancelButtonProps", "okText", "hiddenOkButton", "hiddenCancelButton", "okButtonProps", "fullScreen", "onFullScreenChange"];
3
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
7
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
8
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
9
+ 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."); }
10
+ 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); }
11
+ 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; }
12
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
13
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
14
+ 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; }
15
+ 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; }
16
+ import { CloseOutlined, CompressOutlined, ExpandOutlined } from '@ant-design/icons';
17
+ import { useBoolean } from 'ahooks';
18
+ import { Modal, Space } from 'antd';
19
+ import React, { useCallback, useMemo, useRef, useState } from 'react';
20
+ import Draggable from 'react-draggable';
21
+ import { styled } from 'styled-components';
22
+ import { BiuAButton } from "./..";
23
+ import { jsx as _jsx } from "react/jsx-runtime";
24
+ import { jsxs as _jsxs } from "react/jsx-runtime";
25
+ var StyledModal = styled(Modal).withConfig({
26
+ displayName: "StyledModal",
27
+ componentId: "enjoy-link-antd-repack__sc-1ma1tg5-0"
28
+ })(["height:", ";width:", ";max-width:", ";.react-draggable{width:100%;height:100%;}.ant-modal-content{height:", ";display:", ";flex-direction:column;}.ant-modal-body{flex:", ";}.ant-modal-header{padding:12px 20px !important;font-size:16px !important;font-weight:normal !important;}.ant-modal-body{padding:15px !important;overflow:auto !important;", "}.ant-modal-footer{padding:12px 20px !important;}.ant-btn{height:26px !important;}.ant-modal-close-x{width:50px !important;height:50px !important;line-height:50px !important;}"], function (props) {
29
+ return props.fullScreen ? '100vh !important;' : '';
30
+ }, function (props) {
31
+ return props.fullScreen ? '100vw !important;' : '';
32
+ }, function (props) {
33
+ return props.fullScreen ? '100% !important;' : '';
34
+ }, function (props) {
35
+ return props.fullScreen ? '100% !important;' : '';
36
+ }, function (props) {
37
+ return props.fullScreen ? 'flex !important;' : '';
38
+ }, function (props) {
39
+ return props.fullScreen ? '1 !important;' : '';
40
+ }, function (props) {
41
+ return props.fullScreen ? '' : ' max-height: 75vh;';
42
+ });
43
+ var BiuModalTitle = /*#__PURE__*/React.memo(function (props) {
44
+ var title = props.title,
45
+ onCancel = props.onCancel,
46
+ enterFullscreen = props.enterFullscreen,
47
+ exitFullscreen = props.exitFullscreen,
48
+ fullScreen = props.fullScreen,
49
+ onMouseOver = props.onMouseOver,
50
+ onMouseOut = props.onMouseOut;
51
+ return /*#__PURE__*/_jsxs("div", {
52
+ style: {
53
+ width: '100%',
54
+ display: 'flex',
55
+ cursor: fullScreen ? undefined : 'move'
56
+ },
57
+ onMouseOut: onMouseOut,
58
+ onMouseOver: onMouseOver,
59
+ children: [/*#__PURE__*/_jsx("div", {
60
+ style: {
61
+ flex: '1'
62
+ },
63
+ children: title
64
+ }), /*#__PURE__*/_jsxs(Space, {
65
+ size: 'large',
66
+ children: [fullScreen ? /*#__PURE__*/_jsx(CompressOutlined, {
67
+ style: {
68
+ cursor: 'pointer',
69
+ color: 'rgb(24, 144, 255)'
70
+ },
71
+ onClick: exitFullscreen
72
+ }) : /*#__PURE__*/_jsx(ExpandOutlined, {
73
+ style: {
74
+ cursor: 'pointer',
75
+ color: 'rgb(24, 144, 255)'
76
+ },
77
+ onClick: enterFullscreen
78
+ }), /*#__PURE__*/_jsx(CloseOutlined, {
79
+ style: {
80
+ cursor: 'pointer',
81
+ color: 'rgb(24, 144, 255)'
82
+ },
83
+ onClick: onCancel
84
+ })]
85
+ })]
86
+ });
87
+ });
88
+ export var BiuModal = /*#__PURE__*/React.memo(function (props) {
89
+ var open = props.open,
90
+ onOk = props.onOk,
91
+ onCancel = props.onCancel,
92
+ _props$width = props.width,
93
+ width = _props$width === void 0 ? 720 : _props$width,
94
+ title = props.title,
95
+ footer = props.footer,
96
+ _props$cancelText = props.cancelText,
97
+ cancelText = _props$cancelText === void 0 ? '取消' : _props$cancelText,
98
+ cancelButtonProps = props.cancelButtonProps,
99
+ _props$okText = props.okText,
100
+ okText = _props$okText === void 0 ? '提交' : _props$okText,
101
+ hiddenOkButton = props.hiddenOkButton,
102
+ hiddenCancelButton = props.hiddenCancelButton,
103
+ okButtonProps = props.okButtonProps,
104
+ _props$fullScreen = props.fullScreen,
105
+ fullScreen = _props$fullScreen === void 0 ? true : _props$fullScreen,
106
+ onFullScreenChange = props.onFullScreenChange,
107
+ modalProps = _objectWithoutProperties(props, _excluded);
108
+ var _useBoolean = useBoolean(),
109
+ _useBoolean2 = _slicedToArray(_useBoolean, 2),
110
+ loading = _useBoolean2[0],
111
+ _useBoolean2$ = _useBoolean2[1],
112
+ setFalse = _useBoolean2$.setFalse,
113
+ setTrue = _useBoolean2$.setTrue;
114
+ var draggleRef = useRef(null);
115
+ var handleConfirm = useCallback(function () {
116
+ setTrue();
117
+ if (onOk) {
118
+ onOk().then(function () {
119
+ setFalse();
120
+ });
121
+ } else {
122
+ setFalse();
123
+ }
124
+ }, [onOk, setFalse, setTrue]);
125
+ var _useState = useState(true),
126
+ _useState2 = _slicedToArray(_useState, 2),
127
+ disabled = _useState2[0],
128
+ setDisabled = _useState2[1];
129
+ var _useState3 = useState({
130
+ x: 0,
131
+ y: 0
132
+ }),
133
+ _useState4 = _slicedToArray(_useState3, 2),
134
+ position = _useState4[0],
135
+ setPosition = _useState4[1];
136
+ var _useState5 = useState({
137
+ left: 0,
138
+ top: 0,
139
+ bottom: 0,
140
+ right: 0
141
+ }),
142
+ _useState6 = _slicedToArray(_useState5, 2),
143
+ bounds = _useState6[0],
144
+ setBounds = _useState6[1];
145
+ var customFooter = useMemo(function () {
146
+ return footer || [hiddenCancelButton ? undefined : /*#__PURE__*/_jsx(BiuAButton, _objectSpread(_objectSpread({
147
+ onClick: onCancel
148
+ }, cancelButtonProps), {}, {
149
+ children: cancelText
150
+ }), 'cancel'), hiddenOkButton ? undefined : /*#__PURE__*/_jsx(BiuAButton, _objectSpread(_objectSpread({
151
+ type: "primary",
152
+ onClick: handleConfirm,
153
+ loading: loading
154
+ }, okButtonProps), {}, {
155
+ children: okText
156
+ }), 'submit')];
157
+ }, [cancelButtonProps, cancelText, footer, handleConfirm, hiddenCancelButton, hiddenOkButton, loading, okButtonProps, okText, onCancel]);
158
+ var _useBoolean3 = useBoolean(fullScreen),
159
+ _useBoolean4 = _slicedToArray(_useBoolean3, 2),
160
+ isFullscreen = _useBoolean4[0],
161
+ _useBoolean4$ = _useBoolean4[1],
162
+ _exitFullscreen = _useBoolean4$.setFalse,
163
+ _enterFullscreen = _useBoolean4$.setTrue;
164
+ var _onStart = useCallback(function (_event, uiData) {
165
+ var _draggleRef$current;
166
+ var _window$document$docu = window.document.documentElement,
167
+ clientWidth = _window$document$docu.clientWidth,
168
+ clientHeight = _window$document$docu.clientHeight;
169
+ var targetRect = (_draggleRef$current = draggleRef.current) === null || _draggleRef$current === void 0 ? void 0 : _draggleRef$current.getBoundingClientRect();
170
+ if (!targetRect) {
171
+ return;
172
+ }
173
+ setBounds({
174
+ left: -targetRect.left + uiData.x,
175
+ right: clientWidth - (targetRect.right - uiData.x),
176
+ top: -targetRect.top + uiData.y,
177
+ bottom: clientHeight - (targetRect.bottom - uiData.y)
178
+ });
179
+ }, []);
180
+ return /*#__PURE__*/_jsx(StyledModal, _objectSpread(_objectSpread({
181
+ fullScreen: isFullscreen,
182
+ title: /*#__PURE__*/_jsx(BiuModalTitle, {
183
+ title: title,
184
+ fullScreen: isFullscreen,
185
+ exitFullscreen: function exitFullscreen() {
186
+ _exitFullscreen();
187
+ if (onFullScreenChange) {
188
+ onFullScreenChange(false);
189
+ }
190
+ },
191
+ enterFullscreen: function enterFullscreen() {
192
+ setPosition({
193
+ x: 0,
194
+ y: 0
195
+ });
196
+ _enterFullscreen();
197
+ if (onFullScreenChange) {
198
+ onFullScreenChange(true);
199
+ }
200
+ },
201
+ onCancel: onCancel,
202
+ onMouseOver: function onMouseOver() {
203
+ if (disabled) {
204
+ setDisabled(false);
205
+ }
206
+ },
207
+ onMouseOut: function onMouseOut() {
208
+ setDisabled(true);
209
+ }
210
+ }),
211
+ centered: true,
212
+ width: width,
213
+ footer: customFooter,
214
+ open: open,
215
+ destroyOnClose: true,
216
+ modalRender: function modalRender(modal) {
217
+ return /*#__PURE__*/_jsx(Draggable, {
218
+ position: position,
219
+ disabled: disabled,
220
+ bounds: bounds,
221
+ onStart: function onStart(event, uiData) {
222
+ if (!isFullscreen) _onStart(event, uiData);
223
+ },
224
+ onStop: function onStop(event, uiData) {
225
+ setPosition({
226
+ x: uiData.x,
227
+ y: uiData.y
228
+ });
229
+ },
230
+ children: /*#__PURE__*/_jsx("div", {
231
+ ref: draggleRef,
232
+ children: modal
233
+ })
234
+ });
235
+ }
236
+ }, modalProps), {}, {
237
+ closable: false
238
+ }));
239
+ });
@@ -0,0 +1,15 @@
1
+ import type { CardProps, FormInstance, FormProps } from 'antd';
2
+ import React from 'react';
3
+ import type { BiuOperFormItemPropsType } from './type';
4
+ export type OperCardFormProps = {
5
+ cardProps: CardProps | CardProps[];
6
+ formItemOptions: BiuOperFormItemPropsType[];
7
+ initialModel: Record<string, any>;
8
+ initialValues: Record<string, any>;
9
+ };
10
+ export declare const BiuCustomerFormItem: React.MemoExoticComponent<(props: BiuOperFormItemPropsType) => import("react/jsx-runtime").JSX.Element>;
11
+ export type BiuOperCardFormInstance = {
12
+ getValues: (omitArrs?: string[]) => Promise<any>;
13
+ } & FormInstance;
14
+ export declare const BiuOperForm: React.MemoExoticComponent<React.ForwardRefExoticComponent<Partial<OperCardFormProps> & FormProps<any> & React.RefAttributes<unknown>>>;
15
+ export * from './type';
@@ -0,0 +1,375 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ var _excluded = ["formItemType", "id", "rules", "required", "requiredmessage", "layout", "span", "labelLetter", "label", "style", "options", "width", "colon"],
3
+ _excluded2 = ["cardProps", "formItemOptions", "initialModel", "initialValues", "layout"],
4
+ _excluded3 = ["visible"],
5
+ _excluded4 = ["title"],
6
+ _excluded5 = ["title"],
7
+ _excluded6 = ["visible"],
8
+ _excluded7 = ["visible"];
9
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
10
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
11
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
12
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
13
+ 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."); }
14
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
15
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
16
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
17
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
18
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
19
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
20
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
21
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
22
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
23
+ 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); }
24
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
25
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
26
+ 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; }
27
+ 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; }
28
+ 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; }
29
+ import { Col, Row, Tooltip } from 'antd';
30
+ import { isBoolean, isFunction, omit } from 'lodash';
31
+ import moment from 'moment';
32
+ import React, { forwardRef, useEffect, useImperativeHandle, useMemo } from 'react';
33
+ import { styled } from 'styled-components';
34
+ import { BiuDivider, BiuField, BiuAForm, BiuAFormItem } from "./..";
35
+ import { jsx as _jsx } from "react/jsx-runtime";
36
+ import { jsxs as _jsxs } from "react/jsx-runtime";
37
+ var BiuOperFormLayout = {
38
+ default: {
39
+ xs: {
40
+ span: 24
41
+ },
42
+ sm: {
43
+ span: 12
44
+ },
45
+ md: {
46
+ span: 12
47
+ },
48
+ lg: {
49
+ span: 8
50
+ },
51
+ xl: {
52
+ span: 8
53
+ },
54
+ xxl: {
55
+ span: 8
56
+ }
57
+ },
58
+ large: {
59
+ xs: {
60
+ span: 12
61
+ },
62
+ sm: {
63
+ span: 8
64
+ },
65
+ md: {
66
+ span: 8
67
+ },
68
+ lg: {
69
+ span: 6
70
+ },
71
+ xl: {
72
+ span: 6
73
+ },
74
+ xxl: {
75
+ span: 6
76
+ }
77
+ },
78
+ small: {
79
+ xs: {
80
+ span: 24
81
+ },
82
+ sm: {
83
+ span: 24
84
+ },
85
+ md: {
86
+ span: 24
87
+ },
88
+ lg: {
89
+ span: 12
90
+ },
91
+ xl: {
92
+ span: 12
93
+ },
94
+ xxl: {
95
+ span: 12
96
+ }
97
+ }
98
+ };
99
+ var StyledLabel = styled.div.withConfig({
100
+ displayName: "StyledLabel",
101
+ componentId: "enjoy-link-antd-repack__sc-1ma45hh-0"
102
+ })(["font-size:14px;font-weight:normal;height:38px;line-height:38px;display:flex;flex-direction:row;text-align:right;"]);
103
+ var FormLabelRender = /*#__PURE__*/React.memo(function (props) {
104
+ var title = props.title,
105
+ labelWidth = props.labelWidth,
106
+ required = props.required,
107
+ colon = props.colon;
108
+ return /*#__PURE__*/_jsx(Tooltip, {
109
+ getPopupContainer: function getPopupContainer() {
110
+ return document.body;
111
+ },
112
+ placement: "top",
113
+ title: title,
114
+ children: /*#__PURE__*/_jsxs(StyledLabel, {
115
+ style: {
116
+ width: labelWidth,
117
+ maxWidth: labelWidth
118
+ },
119
+ children: [/*#__PURE__*/_jsx("span", {
120
+ style: {
121
+ flex: '1',
122
+ overflow: 'hidden',
123
+ textOverflow: 'ellipsis',
124
+ color: required ? 'rgb(245,108,108)' : 'black',
125
+ whiteSpace: 'nowrap'
126
+ },
127
+ children: title
128
+ }), colon && /*#__PURE__*/_jsx("span", {
129
+ style: {
130
+ padding: '0 8px 0 0',
131
+ color: required ? 'rgb(245,108,108)' : 'black'
132
+ },
133
+ children: "\xA0:"
134
+ })]
135
+ })
136
+ });
137
+ });
138
+ export var BiuCustomerFormItem = /*#__PURE__*/React.memo(function (props) {
139
+ var formItemType = props.formItemType,
140
+ id = props.id,
141
+ rules = props.rules,
142
+ required = props.required,
143
+ requiredmessage = props.requiredmessage,
144
+ layout = props.layout,
145
+ span = props.span,
146
+ labelLetter = props.labelLetter,
147
+ label = props.label,
148
+ style = props.style,
149
+ options = props.options,
150
+ _props$width = props.width,
151
+ width = _props$width === void 0 ? 100 : _props$width,
152
+ _props$colon = props.colon,
153
+ colon = _props$colon === void 0 ? true : _props$colon,
154
+ restProps = _objectWithoutProperties(props, _excluded);
155
+ var validateRules = useMemo(function () {
156
+ if (required === true && (!Array.isArray(rules) || rules.length === 0)) {
157
+ if (formItemType === 'text' || formItemType === undefined) {
158
+ return [{
159
+ whitespace: true,
160
+ message: requiredmessage
161
+ }, {
162
+ required: true,
163
+ message: requiredmessage
164
+ }];
165
+ } else {
166
+ return [{
167
+ required: true,
168
+ message: requiredmessage
169
+ }];
170
+ }
171
+ }
172
+ return _toConsumableArray(rules || []);
173
+ }, [formItemType, required, requiredmessage, rules]);
174
+ return /*#__PURE__*/_jsx(Col, _objectSpread(_objectSpread({}, span ? {
175
+ span: span
176
+ } : BiuOperFormLayout[layout || 'default']), {}, {
177
+ children: formItemType === 'slot' ? /*#__PURE__*/_jsx(BiuAFormItem, _objectSpread(_objectSpread({
178
+ name: id
179
+ }, options), {}, {
180
+ colon: false,
181
+ rules: validateRules,
182
+ label: label ? /*#__PURE__*/_jsx(FormLabelRender, {
183
+ required: required,
184
+ title: label,
185
+ labelWidth: width,
186
+ colon: colon
187
+ }) : undefined,
188
+ children: /*#__PURE__*/_jsx(BiuField, _objectSpread({
189
+ valueType: "customer"
190
+ }, restProps))
191
+ })) : /*#__PURE__*/_jsx(BiuAFormItem, _objectSpread(_objectSpread({
192
+ name: id
193
+ }, options), {}, {
194
+ colon: false,
195
+ rules: formItemType !== 'customer' ? validateRules : [],
196
+ label: label ? /*#__PURE__*/_jsx(FormLabelRender, {
197
+ required: required,
198
+ title: label,
199
+ labelWidth: width,
200
+ colon: colon
201
+ }) : undefined,
202
+ children: /*#__PURE__*/_jsx(BiuField, _objectSpread({
203
+ style: {
204
+ width: '100%'
205
+ },
206
+ valueType: formItemType !== null && formItemType !== void 0 ? formItemType : 'boxtypeselect'
207
+ }, restProps))
208
+ }))
209
+ }));
210
+ });
211
+ var StyledForm = styled(BiuAForm).withConfig({
212
+ displayName: "StyledForm",
213
+ componentId: "enjoy-link-antd-repack__sc-1ma45hh-1"
214
+ })([".ant-col{padding:0px !important;}.arco-form-item-label{font-size:14px;}.ant-form-item-label > label::after{margin:0px !important;}.ant-form-item-tooltip{padding-right:5px !important;}"]);
215
+ export var BiuOperForm = /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props, ref) {
216
+ var cardProps = props.cardProps,
217
+ _props$formItemOption = props.formItemOptions,
218
+ formItemOptions = _props$formItemOption === void 0 ? [] : _props$formItemOption,
219
+ initialModel = props.initialModel,
220
+ _props$initialValues = props.initialValues,
221
+ initialValues = _props$initialValues === void 0 ? {} : _props$initialValues,
222
+ layout = props.layout,
223
+ restProps = _objectWithoutProperties(props, _excluded2);
224
+ var _BiuAForm$useForm = BiuAForm.useForm(),
225
+ _BiuAForm$useForm2 = _slicedToArray(_BiuAForm$useForm, 1),
226
+ form = _BiuAForm$useForm2[0];
227
+ useEffect(function () {
228
+ if (initialModel) {
229
+ form.setFieldsValue(_objectSpread({}, initialModel));
230
+ }
231
+ }, [form, initialModel]);
232
+ useImperativeHandle(ref, function () {
233
+ return _objectSpread({
234
+ getValues: function () {
235
+ var _getValues = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
236
+ var omitArrs,
237
+ baseData,
238
+ values,
239
+ _args = arguments;
240
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
241
+ while (1) switch (_context.prev = _context.next) {
242
+ case 0:
243
+ omitArrs = _args.length > 0 && _args[0] !== undefined ? _args[0] : [];
244
+ form.submit();
245
+ _context.prev = 2;
246
+ _context.next = 5;
247
+ return form.validateFields();
248
+ case 5:
249
+ baseData = _context.sent;
250
+ _context.next = 11;
251
+ break;
252
+ case 8:
253
+ _context.prev = 8;
254
+ _context.t0 = _context["catch"](2);
255
+ return _context.abrupt("return", console.error('表单验证结果', _context.t0));
256
+ case 11:
257
+ values = Object.keys(baseData).reduce(function (obj, key) {
258
+ var tmpData = baseData[key];
259
+ if (moment.isMoment(tmpData)) {
260
+ var _showTime;
261
+ var dateOption = formItemOptions.filter(function (item) {
262
+ return item.id === key;
263
+ })[0];
264
+ var format = dateOption.formItemType === 'datetime' ? "YYYY-MM-DD ".concat(dateOption !== null && dateOption !== void 0 && (_showTime = dateOption.showTime) !== null && _showTime !== void 0 && _showTime.format ? dateOption.showTime.format : 'HH:mm:ss') : 'YYYY-MM-DD';
265
+ return _objectSpread(_objectSpread({}, obj), {}, _defineProperty({}, key, tmpData.format(format)));
266
+ }
267
+ return _objectSpread(_objectSpread({}, obj), {}, _defineProperty({}, key, tmpData));
268
+ }, {});
269
+ return _context.abrupt("return", omit(values, omitArrs));
270
+ case 13:
271
+ case "end":
272
+ return _context.stop();
273
+ }
274
+ }, _callee, null, [[2, 8]]);
275
+ }));
276
+ function getValues() {
277
+ return _getValues.apply(this, arguments);
278
+ }
279
+ return getValues;
280
+ }()
281
+ }, form);
282
+ }, [form, formItemOptions]);
283
+ var SimpleForm = useMemo(function () {
284
+ return /*#__PURE__*/_jsx(StyledForm, _objectSpread(_objectSpread({
285
+ initialValues: initialValues,
286
+ form: form,
287
+ layout: layout || 'horizontal',
288
+ requiredMark: false,
289
+ autoComplete: "off"
290
+ }, restProps), {}, {
291
+ colon: false,
292
+ children: /*#__PURE__*/_jsx(Row, {
293
+ children: formItemOptions.filter(function (_ref) {
294
+ var _ref$visible = _ref.visible,
295
+ visible = _ref$visible === void 0 ? true : _ref$visible;
296
+ return isFunction(visible) && visible() || isBoolean(visible) && visible;
297
+ }).map(function (_ref2) {
298
+ var visible = _ref2.visible,
299
+ formItemRestProps = _objectWithoutProperties(_ref2, _excluded3);
300
+ return /*#__PURE__*/_jsx(BiuCustomerFormItem, _objectSpread({
301
+ defaultLabel: initialModel ? initialModel[formItemRestProps.defaultLableId || "".concat(formItemRestProps.id, "Name")] : undefined
302
+ }, formItemRestProps), formItemRestProps.id);
303
+ })
304
+ })
305
+ }));
306
+ }, [form, formItemOptions, initialModel, initialValues, layout, restProps]);
307
+ if (!Array.isArray(cardProps)) {
308
+ if (cardProps === undefined || cardProps === null) return SimpleForm;
309
+ var title = cardProps.title,
310
+ restMuProps = _objectWithoutProperties(cardProps, _excluded4);
311
+ if (title === undefined || title === null) {
312
+ return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({}, restMuProps), {}, {
313
+ children: SimpleForm
314
+ }));
315
+ }
316
+ return /*#__PURE__*/_jsxs("div", _objectSpread(_objectSpread({}, restMuProps), {}, {
317
+ children: [/*#__PURE__*/_jsx(BiuDivider, {
318
+ children: title
319
+ }), SimpleForm]
320
+ }), title);
321
+ }
322
+ var formOptionsArray = formItemOptions.reduce(function (arr, cur) {
323
+ if (arr[cur.cardIdx || 0] === undefined) arr[cur.cardIdx || 0] = [];
324
+ arr[cur.cardIdx || 0].push(cur);
325
+ return arr;
326
+ }, []);
327
+ return /*#__PURE__*/_jsx(StyledForm, _objectSpread(_objectSpread({
328
+ initialValues: initialValues,
329
+ form: form,
330
+ layout: layout !== null && layout !== void 0 ? layout : 'horizontal',
331
+ autoComplete: "off",
332
+ requiredMark: false
333
+ }, restProps), {}, {
334
+ colon: false,
335
+ children: cardProps.map(function (_ref3, index) {
336
+ var title = _ref3.title,
337
+ restCardProps = _objectWithoutProperties(_ref3, _excluded5);
338
+ if (title === undefined || title === null) {
339
+ /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({}, restCardProps), {}, {
340
+ children: /*#__PURE__*/_jsx(Row, {
341
+ children: (formOptionsArray[index] || []).filter(function (_ref4) {
342
+ var _ref4$visible = _ref4.visible,
343
+ visible = _ref4$visible === void 0 ? true : _ref4$visible;
344
+ return isFunction(visible) && visible() || isBoolean(visible) && visible;
345
+ }).map(function (_ref5) {
346
+ var visible = _ref5.visible,
347
+ restFormProps = _objectWithoutProperties(_ref5, _excluded6);
348
+ return /*#__PURE__*/_jsx(BiuCustomerFormItem, _objectSpread({
349
+ defaultLabel: initialModel ? initialModel[restFormProps.defaultLableId || "".concat(restProps.id, "Name")] : undefined
350
+ }, restFormProps), restProps.id);
351
+ })
352
+ })
353
+ }));
354
+ }
355
+ return /*#__PURE__*/_jsxs("div", _objectSpread(_objectSpread({}, restCardProps), {}, {
356
+ children: [/*#__PURE__*/_jsx(BiuDivider, {
357
+ children: title
358
+ }), /*#__PURE__*/_jsx(Row, {
359
+ children: (formOptionsArray[index] || []).filter(function (_ref6) {
360
+ var _ref6$visible = _ref6.visible,
361
+ visible = _ref6$visible === void 0 ? true : _ref6$visible;
362
+ return isFunction(visible) && visible() || isBoolean(visible) && visible;
363
+ }).map(function (_ref7) {
364
+ var visible = _ref7.visible,
365
+ restFormProps = _objectWithoutProperties(_ref7, _excluded7);
366
+ return /*#__PURE__*/_jsx(BiuCustomerFormItem, _objectSpread({
367
+ defaultLabel: initialModel ? initialModel[restFormProps.defaultLableId || "".concat(restProps.id, "Name")] : undefined
368
+ }, restFormProps), restProps.id);
369
+ })
370
+ })]
371
+ }), title);
372
+ })
373
+ }));
374
+ }));
375
+ export * from "./type";