@lm_fe/components_m 0.1.201 → 0.2.2

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 (621) hide show
  1. package/README.md +0 -0
  2. package/dist/BaseEditPanel/BaseEditPanelFormFC.d.ts +3 -0
  3. package/dist/BaseEditPanel/PanelWithChildFC.d.ts +10 -15
  4. package/dist/BaseList/index.d.ts +2 -2
  5. package/dist/BaseList/methods/index.d.ts +1 -4
  6. package/dist/BaseListOld/methods/index.d.ts +1 -5
  7. package/dist/BaseModalForm/DynamicForm.d.ts +0 -24
  8. package/dist/BaseModalForm/PatientList/index.d.ts +2 -2
  9. package/dist/BaseModalForm/index.d.ts +2 -2
  10. package/dist/BusinessComponents/BloodPressure/index.d.ts +2 -1
  11. package/dist/BusinessComponents/DiagnosisListInduced/index.d.ts +2 -1
  12. package/dist/BusinessComponents/DiagnosisListv2/template/index.d.ts +1 -2
  13. package/dist/BusinessComponents/HighriskGrade/index.d.ts +1 -1
  14. package/dist/BusinessComponents/HighriskSign/index.d.ts +1 -1
  15. package/dist/BusinessComponents/InspectionResultTextarea/utils.d.ts +0 -8
  16. package/dist/BusinessComponents/LaborProcess/index.d.ts +3 -3
  17. package/dist/BusinessComponents/NurseChildren/index.d.ts +5 -5
  18. package/dist/BusinessComponents/NurseChildren2/index.d.ts +1 -2
  19. package/dist/BusinessComponents/NursingFetusv2/index.d.ts +1 -2
  20. package/dist/BusinessComponents/NursingFetusv3/index.d.ts +3 -3
  21. package/dist/BusinessComponents/PregnancyHistory/config/index-table.d.ts +1 -1
  22. package/dist/BusinessComponents/ResultTextarea/index copy.d.ts +13 -0
  23. package/dist/BusinessComponents/ResultTextarea/index.d.ts +1 -1
  24. package/dist/BusinessComponents/ResultTextarea/utils.d.ts +0 -8
  25. package/dist/BusinessComponents/TemplateTexDeathclassification1/index.d.ts +2 -1
  26. package/dist/BusinessComponents/TemplateTextareav2/components/TemplateSelect.d.ts +2 -1
  27. package/dist/BusinessComponents/TreatmentProgram/TreatmentProgramTable/index.d.ts +3 -4
  28. package/dist/BusinessComponents/UltrosoundResultTextarea/utils.d.ts +0 -8
  29. package/dist/ConfigComponents/CheckboxWithInput/index.d.ts +2 -1
  30. package/dist/ConfigComponents/InputWithRange/index.d.ts +2 -1
  31. package/dist/ConfigComponents/NeonatalCareRecordTable/table/default.d.ts +3 -3
  32. package/dist/ConfigComponents/NeonatalCareRecordTable/table/gysy.d.ts +11 -11
  33. package/dist/ConfigComponents/NeonatalCareRecordTable/table/indx.d.ts +14 -14
  34. package/dist/ConfigComponents/NeonatalScaleExamination/table.d.ts +4 -4
  35. package/dist/ConfigComponents/NormalNursingTable/table.d.ts +1 -1
  36. package/dist/ConfigComponents/ObserMagnesiumsulphateTable/table.d.ts +3 -3
  37. package/dist/ConfigComponents/PastDeliveryNursingTable/table.d.ts +6 -6
  38. package/dist/ConfigComponents/PreDeliverNursingTable/table/default.d.ts +4 -4
  39. package/dist/ConfigComponents/SpecialNursingTable/table.d.ts +2 -2
  40. package/dist/FU_components/ArrayInput/index copy.d.ts +4 -0
  41. package/dist/FU_components/ArrayInput/index.d.ts +1 -4
  42. package/dist/FU_components/ArrayInput/types.d.ts +8 -9
  43. package/dist/FU_components/ArrayPanel/Display.d.ts +0 -1
  44. package/dist/FU_components/ArrayPanel/Inner.d.ts +5 -3
  45. package/dist/FU_components/CommonFormTabs/index.d.ts +1 -1
  46. package/dist/FU_components/CommonFormTabs/types.d.ts +4 -2
  47. package/dist/FU_components/CommonFormTabs/utils.d.ts +4 -0
  48. package/dist/FU_components/DateRange/index copy.d.ts +7 -0
  49. package/dist/FU_components/DateRange/index.d.ts +1 -7
  50. package/dist/FU_components/DateTimeInput/Inner.d.ts +2 -0
  51. package/dist/FU_components/DateTimeInput/index.d.ts +3 -1
  52. package/dist/FU_components/FormSection/FormSectionForm.d.ts +4 -0
  53. package/dist/FU_components/FormSection/RenderFormSectionComponent.d.ts +3 -3
  54. package/dist/FU_components/FormSection/form_control.d.ts +9 -0
  55. package/dist/FU_components/FormSection/helper.d.ts +7 -7
  56. package/dist/FU_components/FormSection/types.d.ts +4 -1
  57. package/dist/FU_components/FormSection/use_chrono.d.ts +17 -2
  58. package/dist/FU_components/HbvdnaInput/index.d.ts +2 -1
  59. package/dist/FU_components/HighriskGradeColorSpan/index.d.ts +1 -1
  60. package/dist/FU_components/IdNOButton/index copy.d.ts +1 -1
  61. package/dist/FU_components/MchcDriverStatus/Inner.d.ts +1 -1
  62. package/dist/FU_components/MyAutoComplete/index copy.d.ts +4 -0
  63. package/dist/FU_components/MyAutoComplete/index.d.ts +1 -4
  64. package/dist/FU_components/MyAutoComplete/types.d.ts +1 -1
  65. package/dist/FU_components/MyBaseList/methods/index.d.ts +1 -1
  66. package/dist/FU_components/MyBaseTable/strategies.d.ts +0 -5
  67. package/dist/FU_components/MyButton/{index.d.ts → index copy.d.ts } +1 -1
  68. package/dist/FU_components/MyEditTable/Inner.d.ts +4 -0
  69. package/dist/FU_components/MyEditTable/index.d.ts +2 -19
  70. package/dist/FU_components/MyEditTable/types.d.ts +16 -0
  71. package/dist/FU_components/MyReferralOrganizationSelect/index.d.ts +1 -1
  72. package/dist/FU_components/MySearchSelect/index.d.ts +2 -1
  73. package/dist/FU_components/MySelect/index.d.ts +1 -8
  74. package/dist/FU_components/MySelect/types.d.ts +3 -5
  75. package/dist/FU_components/OkButton/index.d.ts +2 -7
  76. package/dist/FU_components/PressureInput/index.d.ts +4 -0
  77. package/dist/FU_components/ResultTextarea/index.d.ts +19 -0
  78. package/dist/FU_components/index.d.ts +1 -3
  79. package/dist/FU_components/types.d.ts +1 -12
  80. package/dist/GeneralComponents/CaseTemplete/Inner.d.ts +4 -1
  81. package/dist/GeneralComponents/CheckboxGroupObject/index.d.ts +1 -1
  82. package/dist/GeneralComponents/CheckboxWithInput_gold/components.d.ts +200 -45
  83. package/dist/GeneralComponents/CheckboxWithInput_gold/index.d.ts +1 -5
  84. package/dist/GeneralComponents/CheckboxWithInput_gold/types.d.ts +1 -1
  85. package/dist/GeneralComponents/CheckboxWithInput_gold/utils.d.ts +0 -4
  86. package/dist/GeneralComponents/CustomIcon/index.d.ts +0 -1
  87. package/dist/GeneralComponents/DatePicker/Inner.d.ts +1 -1
  88. package/dist/GeneralComponents/DatePicker/index.d.ts +2 -2
  89. package/dist/GeneralComponents/DatePicker/utils.d.ts +35 -0
  90. package/dist/GeneralComponents/EditInTable/EditInTable_Inner copy.d.ts +3 -24
  91. package/dist/GeneralComponents/EditInTable/components.d.ts +1 -1
  92. package/dist/GeneralComponents/EditInTable/index.d.ts +2 -2
  93. package/dist/GeneralComponents/EditInTable/utils.d.ts +6 -1
  94. package/dist/GeneralComponents/ImageUploadPreview/Inner.d.ts +2 -1
  95. package/dist/GeneralComponents/ImageUploadPreview/index.d.ts +2 -1
  96. package/dist/GeneralComponents/InputNumber/index.d.ts +4 -4
  97. package/dist/GeneralComponents/MobileEditor/Inner.d.ts +6 -9
  98. package/dist/GeneralComponents/MobileEditor/index.d.ts +3 -2
  99. package/dist/GeneralComponents/UploadFile/index.d.ts +9 -1
  100. package/dist/GeneralComponents/UploadFileUrlEdit/index.d.ts +2 -1
  101. package/dist/MyForm/components/Base/CheckboxWithExtra.d.ts +3 -2
  102. package/dist/MyForm/components/MyButton/index.d.ts +1 -1
  103. package/dist/MyForm/components/MySelect/DefaultSelect.d.ts +3 -2
  104. package/dist/MyForm/components/MyTable/index.d.ts +1 -1
  105. package/dist/MyForm/components/MyTable/index2.d.ts +1 -1
  106. package/dist/MyForm/components/_MyFormComponent.d.ts +252 -0
  107. package/dist/MyForm/components/business/NormalButton/index.d.ts +1 -1
  108. package/dist/MyForm/components/business/PdProcedure/config/table.d.ts +1 -1
  109. package/dist/MyForm/components/business/PregnancyHistory/MyForm_Business_PregnancyHistory.d.ts +1 -1
  110. package/dist/MyForm/components/business/PregnancyHistory/config.d.ts +37 -9
  111. package/dist/MyForm/components/business/TextareaWithBtn/index.d.ts +4 -7
  112. package/dist/MyForm/form_new.d.ts +20 -1
  113. package/dist/a_chunks/.root.js +73 -130
  114. package/dist/a_chunks/.root10.js +124 -319
  115. package/dist/a_chunks/.root100.js +22 -393
  116. package/dist/a_chunks/.root101.js +83 -987
  117. package/dist/a_chunks/.root102.js +13 -278
  118. package/dist/a_chunks/.root103.js +83 -128
  119. package/dist/a_chunks/.root104.js +64 -277
  120. package/dist/a_chunks/.root105.js +133 -492
  121. package/dist/a_chunks/.root106.js +45 -106
  122. package/dist/a_chunks/.root107.js +43 -210
  123. package/dist/a_chunks/.root108.js +71 -174
  124. package/dist/a_chunks/.root109.js +38 -910
  125. package/dist/a_chunks/.root11.js +55 -89
  126. package/dist/a_chunks/.root110.js +46 -939
  127. package/dist/a_chunks/.root111.js +188 -169
  128. package/dist/a_chunks/.root112.js +16 -414
  129. package/dist/a_chunks/.root113.js +23 -257
  130. package/dist/a_chunks/.root114.js +1994 -163
  131. package/dist/a_chunks/.root115.js +33 -343
  132. package/dist/a_chunks/.root116.js +67 -150
  133. package/dist/a_chunks/.root117.js +35 -124
  134. package/dist/a_chunks/.root118.js +49 -523
  135. package/dist/a_chunks/.root119.js +58 -580
  136. package/dist/a_chunks/.root12.js +133 -117
  137. package/dist/a_chunks/.root120.js +62 -277
  138. package/dist/a_chunks/.root121.js +75 -512
  139. package/dist/a_chunks/.root122.js +75 -633
  140. package/dist/a_chunks/.root123.js +29 -669
  141. package/dist/a_chunks/.root124.js +57 -273
  142. package/dist/a_chunks/.root125.js +107 -200
  143. package/dist/a_chunks/.root126.js +179 -81
  144. package/dist/a_chunks/.root127.js +85 -792
  145. package/dist/a_chunks/.root128.js +108 -260
  146. package/dist/a_chunks/.root129.js +172 -1085
  147. package/dist/a_chunks/.root13.js +284 -119
  148. package/dist/a_chunks/.root130.js +200 -532
  149. package/dist/a_chunks/.root131.js +2 -242
  150. package/dist/a_chunks/.root132.js +185 -131
  151. package/dist/a_chunks/.root133.js +324 -180
  152. package/dist/a_chunks/.root134.js +13 -409
  153. package/dist/a_chunks/.root135.js +160 -1135
  154. package/dist/a_chunks/.root14.js +251 -316
  155. package/dist/a_chunks/.root15.js +58 -266
  156. package/dist/a_chunks/.root16.js +74 -240
  157. package/dist/a_chunks/.root17.js +38 -127
  158. package/dist/a_chunks/.root18.js +87 -148
  159. package/dist/a_chunks/.root19.js +182 -109
  160. package/dist/a_chunks/.root2.js +97 -163
  161. package/dist/a_chunks/.root20.js +237 -157
  162. package/dist/a_chunks/.root21.js +19 -258
  163. package/dist/a_chunks/.root22.js +20 -320
  164. package/dist/a_chunks/.root23.js +197 -20
  165. package/dist/a_chunks/.root24.js +190 -89
  166. package/dist/a_chunks/.root25.js +73 -196
  167. package/dist/a_chunks/.root26.js +102 -257
  168. package/dist/a_chunks/.root27.js +69 -142
  169. package/dist/a_chunks/.root28.js +79 -375
  170. package/dist/a_chunks/.root29.js +34 -542
  171. package/dist/a_chunks/.root3.js +103 -170
  172. package/dist/a_chunks/.root30.js +19 -2226
  173. package/dist/a_chunks/.root31.js +50 -279
  174. package/dist/a_chunks/.root32.js +49 -81
  175. package/dist/a_chunks/.root33.js +49 -84
  176. package/dist/a_chunks/.root34.js +200 -223
  177. package/dist/a_chunks/.root35.js +112 -279
  178. package/dist/a_chunks/.root36.js +136 -158
  179. package/dist/a_chunks/.root37.js +19 -146
  180. package/dist/a_chunks/.root38.js +101 -78
  181. package/dist/a_chunks/.root39.js +581 -34
  182. package/dist/a_chunks/.root4.js +635 -1056
  183. package/dist/a_chunks/.root40.js +25 -268
  184. package/dist/a_chunks/.root41.js +312 -18
  185. package/dist/a_chunks/.root42.js +138 -192
  186. package/dist/a_chunks/.root43.js +62 -128
  187. package/dist/a_chunks/.root44.js +264 -36
  188. package/dist/a_chunks/.root45.js +257 -20
  189. package/dist/a_chunks/.root46.js +2274 -47
  190. package/dist/a_chunks/.root47.js +490 -227
  191. package/dist/a_chunks/.root48.js +190 -160
  192. package/dist/a_chunks/.root49.js +168 -74
  193. package/dist/a_chunks/.root5.js +98 -349
  194. package/dist/a_chunks/.root50.js +146 -190
  195. package/dist/a_chunks/.root51.js +379 -305
  196. package/dist/a_chunks/.root52.js +237 -101
  197. package/dist/a_chunks/.root53.js +29 -296
  198. package/dist/a_chunks/.root54.js +69 -23
  199. package/dist/a_chunks/.root55.js +71 -660
  200. package/dist/a_chunks/.root56.js +356 -3320
  201. package/dist/a_chunks/.root57.js +206 -544
  202. package/dist/a_chunks/.root58.js +275 -185
  203. package/dist/a_chunks/.root59.js +150 -147
  204. package/dist/a_chunks/.root6.js +1003 -188
  205. package/dist/a_chunks/.root60.js +132 -882
  206. package/dist/a_chunks/.root61.js +288 -98
  207. package/dist/a_chunks/.root62.js +293 -213
  208. package/dist/a_chunks/.root63.js +299 -294
  209. package/dist/a_chunks/.root64.js +295 -450
  210. package/dist/a_chunks/.root65.js +924 -458
  211. package/dist/a_chunks/.root66.js +58 -1053
  212. package/dist/a_chunks/.root67.js +813 -255
  213. package/dist/a_chunks/.root68.js +892 -192
  214. package/dist/a_chunks/.root69.js +80 -1070
  215. package/dist/a_chunks/.root7.js +269 -725
  216. package/dist/a_chunks/.root70.js +333 -830
  217. package/dist/a_chunks/.root71.js +155 -376
  218. package/dist/a_chunks/.root72.js +245 -204
  219. package/dist/a_chunks/.root73.js +76 -148
  220. package/dist/a_chunks/.root74.js +54 -344
  221. package/dist/a_chunks/.root75.js +610 -530
  222. package/dist/a_chunks/.root76.js +34 -533
  223. package/dist/a_chunks/.root77.js +140 -328
  224. package/dist/a_chunks/.root78.js +472 -286
  225. package/dist/a_chunks/.root79.js +199 -2292
  226. package/dist/a_chunks/.root8.js +128 -163
  227. package/dist/a_chunks/.root80.js +476 -168
  228. package/dist/a_chunks/.root81.js +530 -535
  229. package/dist/a_chunks/.root82.js +565 -248
  230. package/dist/a_chunks/.root83.js +126 -242
  231. package/dist/a_chunks/.root84.js +14 -241
  232. package/dist/a_chunks/.root85.js +678 -430
  233. package/dist/a_chunks/.root86.js +161 -317
  234. package/dist/a_chunks/.root87.js +455 -88
  235. package/dist/a_chunks/.root88.js +175 -98
  236. package/dist/a_chunks/.root89.js +63 -237
  237. package/dist/a_chunks/.root9.js +93 -675
  238. package/dist/a_chunks/.root90.js +108 -348
  239. package/dist/a_chunks/.root91.js +331 -124
  240. package/dist/a_chunks/.root92.js +438 -139
  241. package/dist/a_chunks/.root93.js +102 -434
  242. package/dist/a_chunks/.root94.js +821 -346
  243. package/dist/a_chunks/.root95.js +39 -214
  244. package/dist/a_chunks/.root96.js +57 -349
  245. package/dist/a_chunks/.root97.js +274 -510
  246. package/dist/a_chunks/.root98.js +22 -366
  247. package/dist/a_chunks/.root99.js +57 -375
  248. package/dist/a_chunks/Inner.js +149 -262
  249. package/dist/a_chunks/TableEditableCell.js +12 -10
  250. package/dist/a_chunks/TemplateModal.js +111 -132
  251. package/dist/a_chunks/deathclassification.js +17 -33
  252. package/dist/a_chunks/index.js +2930 -5417
  253. package/dist/a_chunks/index2.js +2 -4
  254. package/dist/doctor-end/index.d.ts +0 -2
  255. package/dist/index.d.ts +3 -8
  256. package/dist/index.js +8 -77
  257. package/dist/layout/header.d.ts +0 -1
  258. package/dist/modals/index.d.ts +1 -16
  259. package/dist/modals/meta.d.ts +1 -16
  260. package/dist/newly-component/hepatitis-new-baby/components/Form.d.ts +2 -1
  261. package/dist/newly-component/hepatitis-new-baby/index.d.ts +2 -1
  262. package/dist/selects/NormalSelect/index.d.ts +1 -1
  263. package/dist/selects/SelectWithNo/index copy.d.ts +2 -0
  264. package/dist/selects/SelectWithNo/index.d.ts +2 -2
  265. package/dist/utils/InterceptComponent.d.ts +1 -0
  266. package/dist/utils/dictionary.d.ts +2 -13
  267. package/dist/utils/format.d.ts +4 -4
  268. package/dist/utils/index.d.ts +1 -1
  269. package/dist/utils/useMarshal.d.ts +3 -3
  270. package/dist/utils/utils.d.ts +0 -4
  271. package/package.json +32 -19
  272. package/dist/ConfigComponents/OxytocinNursingTable/EditInTable/BaseTable.d.ts +0 -5
  273. package/dist/ConfigComponents/OxytocinNursingTable/EditInTable/EditInTableNoForm.d.ts +0 -51
  274. package/dist/ConfigComponents/OxytocinNursingTable/EditInTable/index.d.ts +0 -49
  275. package/dist/ConfigComponents/OxytocinNursingTable/index.d.ts +0 -2
  276. package/dist/ConfigComponents/OxytocinNursingTable/table/default.d.ts +0 -255
  277. package/dist/ConfigComponents/OxytocinNursingTable/table/gysy.d.ts +0 -234
  278. package/dist/ConfigComponents/OxytocinNursingTable/table/index.d.ts +0 -3
  279. package/dist/ConfigComponents/RevertEditInTable/index.d.ts +0 -1
  280. package/dist/FU_components/FormSection/utils.d.ts +0 -81
  281. package/dist/FU_components/SimpleForm/components/TabForm/index.d.ts +0 -14
  282. package/dist/FU_components/SimpleForm/components/extra/Custom.d.ts +0 -5
  283. package/dist/FU_components/SimpleForm/components/extra/SimpleSelect.d.ts +0 -6
  284. package/dist/FU_components/SimpleForm/index.d.ts +0 -45
  285. package/dist/FU_components/SimpleForm/types/help.d.ts +0 -3
  286. package/dist/FU_components/SimpleForm/types/lmTypes.d.ts +0 -85
  287. package/dist/FU_components/SimpleForm/types/metaTypes.d.ts +0 -28
  288. package/dist/GeneralComponents/CustomFormField/index.d.ts +0 -12
  289. package/dist/GeneralComponents/EditInTable/EditInTable_Inner copy 2.d.ts +0 -24
  290. package/dist/GeneralComponents/IconSelect/index.d.ts +0 -5
  291. package/dist/GeneralComponents/SelectTable/index.d.ts +0 -44
  292. package/dist/GeneralComponents/SoDiaoEditor/config.d.ts +0 -44
  293. package/dist/GeneralComponents/SoDiaoEditor/index.d.ts +0 -11
  294. package/dist/a_chunks/.root.js.map +0 -1
  295. package/dist/a_chunks/.root10.js.map +0 -1
  296. package/dist/a_chunks/.root100.js.map +0 -1
  297. package/dist/a_chunks/.root101.js.map +0 -1
  298. package/dist/a_chunks/.root102.js.map +0 -1
  299. package/dist/a_chunks/.root103.js.map +0 -1
  300. package/dist/a_chunks/.root104.js.map +0 -1
  301. package/dist/a_chunks/.root105.js.map +0 -1
  302. package/dist/a_chunks/.root106.js.map +0 -1
  303. package/dist/a_chunks/.root107.js.map +0 -1
  304. package/dist/a_chunks/.root108.js.map +0 -1
  305. package/dist/a_chunks/.root109.js.map +0 -1
  306. package/dist/a_chunks/.root11.js.map +0 -1
  307. package/dist/a_chunks/.root110.js.map +0 -1
  308. package/dist/a_chunks/.root111.js.map +0 -1
  309. package/dist/a_chunks/.root112.js.map +0 -1
  310. package/dist/a_chunks/.root113.js.map +0 -1
  311. package/dist/a_chunks/.root114.js.map +0 -1
  312. package/dist/a_chunks/.root115.js.map +0 -1
  313. package/dist/a_chunks/.root116.js.map +0 -1
  314. package/dist/a_chunks/.root117.js.map +0 -1
  315. package/dist/a_chunks/.root118.js.map +0 -1
  316. package/dist/a_chunks/.root119.js.map +0 -1
  317. package/dist/a_chunks/.root12.js.map +0 -1
  318. package/dist/a_chunks/.root120.js.map +0 -1
  319. package/dist/a_chunks/.root121.js.map +0 -1
  320. package/dist/a_chunks/.root122.js.map +0 -1
  321. package/dist/a_chunks/.root123.js.map +0 -1
  322. package/dist/a_chunks/.root124.js.map +0 -1
  323. package/dist/a_chunks/.root125.js.map +0 -1
  324. package/dist/a_chunks/.root126.js.map +0 -1
  325. package/dist/a_chunks/.root127.js.map +0 -1
  326. package/dist/a_chunks/.root128.js.map +0 -1
  327. package/dist/a_chunks/.root129.js.map +0 -1
  328. package/dist/a_chunks/.root13.js.map +0 -1
  329. package/dist/a_chunks/.root130.js.map +0 -1
  330. package/dist/a_chunks/.root131.js.map +0 -1
  331. package/dist/a_chunks/.root132.js.map +0 -1
  332. package/dist/a_chunks/.root133.js.map +0 -1
  333. package/dist/a_chunks/.root134.js.map +0 -1
  334. package/dist/a_chunks/.root135.js.map +0 -1
  335. package/dist/a_chunks/.root136.js +0 -507
  336. package/dist/a_chunks/.root136.js.map +0 -1
  337. package/dist/a_chunks/.root137.js +0 -570
  338. package/dist/a_chunks/.root137.js.map +0 -1
  339. package/dist/a_chunks/.root138.js +0 -197
  340. package/dist/a_chunks/.root138.js.map +0 -1
  341. package/dist/a_chunks/.root139.js +0 -903
  342. package/dist/a_chunks/.root139.js.map +0 -1
  343. package/dist/a_chunks/.root14.js.map +0 -1
  344. package/dist/a_chunks/.root140.js +0 -267
  345. package/dist/a_chunks/.root140.js.map +0 -1
  346. package/dist/a_chunks/.root141.js +0 -179
  347. package/dist/a_chunks/.root141.js.map +0 -1
  348. package/dist/a_chunks/.root142.js +0 -114
  349. package/dist/a_chunks/.root142.js.map +0 -1
  350. package/dist/a_chunks/.root143.js +0 -133
  351. package/dist/a_chunks/.root143.js.map +0 -1
  352. package/dist/a_chunks/.root144.js +0 -351
  353. package/dist/a_chunks/.root144.js.map +0 -1
  354. package/dist/a_chunks/.root145.js +0 -99
  355. package/dist/a_chunks/.root145.js.map +0 -1
  356. package/dist/a_chunks/.root146.js +0 -136
  357. package/dist/a_chunks/.root146.js.map +0 -1
  358. package/dist/a_chunks/.root147.js +0 -445
  359. package/dist/a_chunks/.root147.js.map +0 -1
  360. package/dist/a_chunks/.root148.js +0 -618
  361. package/dist/a_chunks/.root148.js.map +0 -1
  362. package/dist/a_chunks/.root149.js +0 -329
  363. package/dist/a_chunks/.root149.js.map +0 -1
  364. package/dist/a_chunks/.root15.js.map +0 -1
  365. package/dist/a_chunks/.root150.js +0 -381
  366. package/dist/a_chunks/.root150.js.map +0 -1
  367. package/dist/a_chunks/.root151.js +0 -299
  368. package/dist/a_chunks/.root151.js.map +0 -1
  369. package/dist/a_chunks/.root152.js +0 -105
  370. package/dist/a_chunks/.root152.js.map +0 -1
  371. package/dist/a_chunks/.root153.js +0 -117
  372. package/dist/a_chunks/.root153.js.map +0 -1
  373. package/dist/a_chunks/.root154.js +0 -101
  374. package/dist/a_chunks/.root154.js.map +0 -1
  375. package/dist/a_chunks/.root155.js +0 -279
  376. package/dist/a_chunks/.root155.js.map +0 -1
  377. package/dist/a_chunks/.root156.js +0 -91
  378. package/dist/a_chunks/.root156.js.map +0 -1
  379. package/dist/a_chunks/.root157.js +0 -154
  380. package/dist/a_chunks/.root157.js.map +0 -1
  381. package/dist/a_chunks/.root158.js +0 -213
  382. package/dist/a_chunks/.root158.js.map +0 -1
  383. package/dist/a_chunks/.root159.js +0 -122
  384. package/dist/a_chunks/.root159.js.map +0 -1
  385. package/dist/a_chunks/.root16.js.map +0 -1
  386. package/dist/a_chunks/.root160.js +0 -123
  387. package/dist/a_chunks/.root160.js.map +0 -1
  388. package/dist/a_chunks/.root161.js +0 -45
  389. package/dist/a_chunks/.root161.js.map +0 -1
  390. package/dist/a_chunks/.root162.js +0 -46
  391. package/dist/a_chunks/.root162.js.map +0 -1
  392. package/dist/a_chunks/.root163.js +0 -77
  393. package/dist/a_chunks/.root163.js.map +0 -1
  394. package/dist/a_chunks/.root164.js +0 -206
  395. package/dist/a_chunks/.root164.js.map +0 -1
  396. package/dist/a_chunks/.root165.js +0 -108
  397. package/dist/a_chunks/.root165.js.map +0 -1
  398. package/dist/a_chunks/.root166.js +0 -108
  399. package/dist/a_chunks/.root166.js.map +0 -1
  400. package/dist/a_chunks/.root167.js +0 -2074
  401. package/dist/a_chunks/.root167.js.map +0 -1
  402. package/dist/a_chunks/.root168.js +0 -112
  403. package/dist/a_chunks/.root168.js.map +0 -1
  404. package/dist/a_chunks/.root169.js +0 -147
  405. package/dist/a_chunks/.root169.js.map +0 -1
  406. package/dist/a_chunks/.root17.js.map +0 -1
  407. package/dist/a_chunks/.root170.js +0 -114
  408. package/dist/a_chunks/.root170.js.map +0 -1
  409. package/dist/a_chunks/.root171.js +0 -59
  410. package/dist/a_chunks/.root171.js.map +0 -1
  411. package/dist/a_chunks/.root172.js +0 -69
  412. package/dist/a_chunks/.root172.js.map +0 -1
  413. package/dist/a_chunks/.root173.js +0 -146
  414. package/dist/a_chunks/.root173.js.map +0 -1
  415. package/dist/a_chunks/.root174.js +0 -112
  416. package/dist/a_chunks/.root174.js.map +0 -1
  417. package/dist/a_chunks/.root175.js +0 -113
  418. package/dist/a_chunks/.root175.js.map +0 -1
  419. package/dist/a_chunks/.root176.js +0 -109
  420. package/dist/a_chunks/.root176.js.map +0 -1
  421. package/dist/a_chunks/.root177.js +0 -129
  422. package/dist/a_chunks/.root177.js.map +0 -1
  423. package/dist/a_chunks/.root178.js +0 -182
  424. package/dist/a_chunks/.root178.js.map +0 -1
  425. package/dist/a_chunks/.root179.js +0 -253
  426. package/dist/a_chunks/.root179.js.map +0 -1
  427. package/dist/a_chunks/.root18.js.map +0 -1
  428. package/dist/a_chunks/.root180.js +0 -458
  429. package/dist/a_chunks/.root180.js.map +0 -1
  430. package/dist/a_chunks/.root181.js +0 -1511
  431. package/dist/a_chunks/.root181.js.map +0 -1
  432. package/dist/a_chunks/.root182.js +0 -91
  433. package/dist/a_chunks/.root182.js.map +0 -1
  434. package/dist/a_chunks/.root183.js +0 -115
  435. package/dist/a_chunks/.root183.js.map +0 -1
  436. package/dist/a_chunks/.root184.js +0 -1202
  437. package/dist/a_chunks/.root184.js.map +0 -1
  438. package/dist/a_chunks/.root185.js +0 -83
  439. package/dist/a_chunks/.root185.js.map +0 -1
  440. package/dist/a_chunks/.root186.js +0 -267
  441. package/dist/a_chunks/.root186.js.map +0 -1
  442. package/dist/a_chunks/.root187.js +0 -18
  443. package/dist/a_chunks/.root187.js.map +0 -1
  444. package/dist/a_chunks/.root19.js.map +0 -1
  445. package/dist/a_chunks/.root2.js.map +0 -1
  446. package/dist/a_chunks/.root20.js.map +0 -1
  447. package/dist/a_chunks/.root21.js.map +0 -1
  448. package/dist/a_chunks/.root22.js.map +0 -1
  449. package/dist/a_chunks/.root23.js.map +0 -1
  450. package/dist/a_chunks/.root24.js.map +0 -1
  451. package/dist/a_chunks/.root25.js.map +0 -1
  452. package/dist/a_chunks/.root26.js.map +0 -1
  453. package/dist/a_chunks/.root27.js.map +0 -1
  454. package/dist/a_chunks/.root28.js.map +0 -1
  455. package/dist/a_chunks/.root29.js.map +0 -1
  456. package/dist/a_chunks/.root3.js.map +0 -1
  457. package/dist/a_chunks/.root30.js.map +0 -1
  458. package/dist/a_chunks/.root31.js.map +0 -1
  459. package/dist/a_chunks/.root32.js.map +0 -1
  460. package/dist/a_chunks/.root33.js.map +0 -1
  461. package/dist/a_chunks/.root34.js.map +0 -1
  462. package/dist/a_chunks/.root35.js.map +0 -1
  463. package/dist/a_chunks/.root36.js.map +0 -1
  464. package/dist/a_chunks/.root37.js.map +0 -1
  465. package/dist/a_chunks/.root38.js.map +0 -1
  466. package/dist/a_chunks/.root39.js.map +0 -1
  467. package/dist/a_chunks/.root4.js.map +0 -1
  468. package/dist/a_chunks/.root40.js.map +0 -1
  469. package/dist/a_chunks/.root41.js.map +0 -1
  470. package/dist/a_chunks/.root42.js.map +0 -1
  471. package/dist/a_chunks/.root43.js.map +0 -1
  472. package/dist/a_chunks/.root44.js.map +0 -1
  473. package/dist/a_chunks/.root45.js.map +0 -1
  474. package/dist/a_chunks/.root46.js.map +0 -1
  475. package/dist/a_chunks/.root47.js.map +0 -1
  476. package/dist/a_chunks/.root48.js.map +0 -1
  477. package/dist/a_chunks/.root49.js.map +0 -1
  478. package/dist/a_chunks/.root5.js.map +0 -1
  479. package/dist/a_chunks/.root50.js.map +0 -1
  480. package/dist/a_chunks/.root51.js.map +0 -1
  481. package/dist/a_chunks/.root52.js.map +0 -1
  482. package/dist/a_chunks/.root53.js.map +0 -1
  483. package/dist/a_chunks/.root54.js.map +0 -1
  484. package/dist/a_chunks/.root55.js.map +0 -1
  485. package/dist/a_chunks/.root56.js.map +0 -1
  486. package/dist/a_chunks/.root57.js.map +0 -1
  487. package/dist/a_chunks/.root58.js.map +0 -1
  488. package/dist/a_chunks/.root59.js.map +0 -1
  489. package/dist/a_chunks/.root6.js.map +0 -1
  490. package/dist/a_chunks/.root60.js.map +0 -1
  491. package/dist/a_chunks/.root61.js.map +0 -1
  492. package/dist/a_chunks/.root62.js.map +0 -1
  493. package/dist/a_chunks/.root63.js.map +0 -1
  494. package/dist/a_chunks/.root64.js.map +0 -1
  495. package/dist/a_chunks/.root65.js.map +0 -1
  496. package/dist/a_chunks/.root66.js.map +0 -1
  497. package/dist/a_chunks/.root67.js.map +0 -1
  498. package/dist/a_chunks/.root68.js.map +0 -1
  499. package/dist/a_chunks/.root69.js.map +0 -1
  500. package/dist/a_chunks/.root7.js.map +0 -1
  501. package/dist/a_chunks/.root70.js.map +0 -1
  502. package/dist/a_chunks/.root71.js.map +0 -1
  503. package/dist/a_chunks/.root72.js.map +0 -1
  504. package/dist/a_chunks/.root73.js.map +0 -1
  505. package/dist/a_chunks/.root74.js.map +0 -1
  506. package/dist/a_chunks/.root75.js.map +0 -1
  507. package/dist/a_chunks/.root76.js.map +0 -1
  508. package/dist/a_chunks/.root77.js.map +0 -1
  509. package/dist/a_chunks/.root78.js.map +0 -1
  510. package/dist/a_chunks/.root79.js.map +0 -1
  511. package/dist/a_chunks/.root8.js.map +0 -1
  512. package/dist/a_chunks/.root80.js.map +0 -1
  513. package/dist/a_chunks/.root81.js.map +0 -1
  514. package/dist/a_chunks/.root82.js.map +0 -1
  515. package/dist/a_chunks/.root83.js.map +0 -1
  516. package/dist/a_chunks/.root84.js.map +0 -1
  517. package/dist/a_chunks/.root85.js.map +0 -1
  518. package/dist/a_chunks/.root86.js.map +0 -1
  519. package/dist/a_chunks/.root87.js.map +0 -1
  520. package/dist/a_chunks/.root88.js.map +0 -1
  521. package/dist/a_chunks/.root89.js.map +0 -1
  522. package/dist/a_chunks/.root9.js.map +0 -1
  523. package/dist/a_chunks/.root90.js.map +0 -1
  524. package/dist/a_chunks/.root91.js.map +0 -1
  525. package/dist/a_chunks/.root92.js.map +0 -1
  526. package/dist/a_chunks/.root93.js.map +0 -1
  527. package/dist/a_chunks/.root94.js.map +0 -1
  528. package/dist/a_chunks/.root95.js.map +0 -1
  529. package/dist/a_chunks/.root96.js.map +0 -1
  530. package/dist/a_chunks/.root97.js.map +0 -1
  531. package/dist/a_chunks/.root98.js.map +0 -1
  532. package/dist/a_chunks/.root99.js.map +0 -1
  533. package/dist/a_chunks/Inner.js.map +0 -1
  534. package/dist/a_chunks/TableEditableCell.js.map +0 -1
  535. package/dist/a_chunks/TemplateModal.js.map +0 -1
  536. package/dist/a_chunks/_commonjsHelpers.js +0 -22
  537. package/dist/a_chunks/_commonjsHelpers.js.map +0 -1
  538. package/dist/a_chunks/common-table-item.js +0 -771
  539. package/dist/a_chunks/common-table-item.js.map +0 -1
  540. package/dist/a_chunks/data.js +0 -570
  541. package/dist/a_chunks/data.js.map +0 -1
  542. package/dist/a_chunks/deathclassification.js.map +0 -1
  543. package/dist/a_chunks/func.js +0 -277
  544. package/dist/a_chunks/func.js.map +0 -1
  545. package/dist/a_chunks/index.js.map +0 -1
  546. package/dist/a_chunks/index2.js.map +0 -1
  547. package/dist/a_chunks/index3.js +0 -479
  548. package/dist/a_chunks/index3.js.map +0 -1
  549. package/dist/a_chunks/index4.js +0 -119
  550. package/dist/a_chunks/index4.js.map +0 -1
  551. package/dist/a_chunks/requestMethods.js +0 -56
  552. package/dist/a_chunks/requestMethods.js.map +0 -1
  553. package/dist/curve/components/BmiCanvas/index.d.ts +0 -29
  554. package/dist/curve/components/FetusCanvas/config.d.ts +0 -3
  555. package/dist/curve/components/FetusCanvas/index.d.ts +0 -26
  556. package/dist/curve/components/FetusCanvas/requestMethods.d.ts +0 -9
  557. package/dist/curve/components/FetusCanvasNICHD/config.d.ts +0 -3
  558. package/dist/curve/components/FetusCanvasNICHD/data.d.ts +0 -84
  559. package/dist/curve/components/FetusCanvasNICHD/index.d.ts +0 -28
  560. package/dist/curve/components/Pregnogram/index.d.ts +0 -19
  561. package/dist/curve/components/api.d.ts +0 -23
  562. package/dist/curve/components-new/BmiCanvas/index.d.ts +0 -22
  563. package/dist/curve/components-new/FetusCanvas/config.d.ts +0 -3
  564. package/dist/curve/components-new/FetusCanvas/index.d.ts +0 -19
  565. package/dist/curve/components-new/FetusCanvas/requestMethods.d.ts +0 -9
  566. package/dist/curve/components-new/FetusCanvasNICHD/config.d.ts +0 -3
  567. package/dist/curve/components-new/FetusCanvasNICHD/data.d.ts +0 -84
  568. package/dist/curve/components-new/FetusCanvasNICHD/index.d.ts +0 -21
  569. package/dist/curve/components-new/Pregnogram/index.d.ts +0 -13
  570. package/dist/curve/data.d.ts +0 -120
  571. package/dist/curve/func.d.ts +0 -9
  572. package/dist/curve/index.d.ts +0 -5
  573. package/dist/curve/intro-steps.d.ts +0 -7
  574. package/dist/doctor-end/DiagReminder_copy/index.d.ts +0 -3
  575. package/dist/doctor-end/ScarredUterus/index.d.ts +0 -15
  576. package/dist/doctor-end/SyphilisManagement/index.d.ts +0 -15
  577. package/dist/doctor-end/Thrombus/index.d.ts +0 -22
  578. package/dist/doctor-end/high-risk-warn/add-diagnoses/add-diagnoses.d.ts +0 -11
  579. package/dist/doctor-end/high-risk-warn/high-risk-warn.d.ts +0 -15
  580. package/dist/doctor-end/high-risk-warn/util.d.ts +0 -12
  581. package/dist/doctor-end/message-multiterm-modal/message-multiterm-modal.d.ts +0 -11
  582. package/dist/index.js.map +0 -1
  583. package/dist/layout/components/MenuSearch/Inner.d.ts +0 -7
  584. package/dist/layout/components/MenuSearch/index.d.ts +0 -1
  585. package/dist/layout/index.d.ts +0 -1
  586. package/dist/modals/entries/StupidTemplateModal2/components/TemplateSelect.d.ts +0 -2
  587. package/dist/modals/entries/StupidTemplateModal2/index.d.ts +0 -22
  588. package/dist/modals/entries/StupidTemplateModal2/methods/index.d.ts +0 -16
  589. package/dist/modals/entries/modal_form/index.d.ts +0 -27
  590. package/dist/modals/entries/print_modal/index.d.ts +0 -3
  591. package/dist/modals/entries/template_modal3/EditModal.d.ts +0 -1
  592. package/dist/modals/entries/template_modal3/common.d.ts +0 -4
  593. package/dist/modals/entries/template_modal3/components/TemplateSelect.d.ts +0 -1
  594. package/dist/modals/entries/template_modal3/index copy 2.d.ts +0 -19
  595. package/dist/modals/entries/template_modal3/index copy.d.ts +0 -22
  596. package/dist/modals/entries/template_modal3/index.d.ts +0 -18
  597. package/dist/modals/entries/template_modal3/methods/index.d.ts +0 -15
  598. package/dist/modals/entries/template_modal3/types.d.ts +0 -28
  599. package/dist/modals/entries/test/index.d.ts +0 -6
  600. package/dist/modals/entries/text_search/index.d.ts +0 -8
  601. package/dist/modals/entries//344/271/231/350/202/235/347/256/241/347/220/206/index.d.ts +0 -7
  602. package/dist/modals/entries//345/255/220/347/227/253/345/211/215/346/234/237/351/243/216/351/231/251/350/257/204/344/274/260/350/241/250/index.d.ts +0 -9
  603. package/dist/modals/entries//346/242/205/346/257/222/347/256/241/347/220/206/index.d.ts +0 -7
  604. package/dist/modals/entries//346/267/261/351/235/231/350/204/211/350/241/200/346/240/223/351/253/230/345/215/261/345/233/240/347/264/240/345/255/225/346/234/237/347/224/250/350/215/257/347/255/233/346/237/245/350/241/250/2015RCOG/351/231/215/344/275/216/345/246/212/345/250/240/345/217/212/344/272/247/350/244/245/346/234/237/351/235/231/350/204/211/350/241/200/346/240/223/346/240/223/345/241/236/347/232/204/351/243/216/351/231/251_/345/271/277/344/270/211/ThrombusGysy.d.ts +0 -9
  605. package/dist/modals/entries//346/267/261/351/235/231/350/204/211/350/241/200/346/240/223/351/253/230/345/215/261/345/233/240/347/264/240/345/255/225/346/234/237/347/224/250/350/215/257/347/255/233/346/237/245/350/241/250/2015RCOG/351/231/215/344/275/216/345/246/212/345/250/240/345/217/212/344/272/247/350/244/245/346/234/237/351/235/231/350/204/211/350/241/200/346/240/223/346/240/223/345/241/236/347/232/204/351/243/216/351/231/251_/345/271/277/344/270/211/components.d.ts +0 -7
  606. package/dist/modals/entries//346/267/261/351/235/231/350/204/211/350/241/200/346/240/223/351/253/230/345/215/261/345/233/240/347/264/240/345/255/225/346/234/237/347/224/250/350/215/257/347/255/233/346/237/245/350/241/250/2015RCOG/351/231/215/344/275/216/345/246/212/345/250/240/345/217/212/344/272/247/350/244/245/346/234/237/351/235/231/350/204/211/350/241/200/346/240/223/346/240/223/345/241/236/347/232/204/351/243/216/351/231/251_/345/271/277/344/270/211/config.d.ts +0 -28
  607. package/dist/modals/entries//346/267/261/351/235/231/350/204/211/350/241/200/346/240/223/351/253/230/345/215/261/345/233/240/347/264/240/345/255/225/346/234/237/347/224/250/350/215/257/347/255/233/346/237/245/350/241/250/2015RCOG/351/231/215/344/275/216/345/246/212/345/250/240/345/217/212/344/272/247/350/244/245/346/234/237/351/235/231/350/204/211/350/241/200/346/240/223/346/240/223/345/241/236/347/232/204/351/243/216/351/231/251_/345/271/277/344/270/211/utils.d.ts +0 -9
  608. package/dist/modals/entries//346/267/261/351/235/231/350/204/211/350/241/200/346/240/223/351/253/230/345/215/261/345/233/240/347/264/240/345/255/225/346/234/237/347/224/250/350/215/257/347/255/233/346/237/245/350/241/250/Default/ThrombusDefault.d.ts +0 -7
  609. package/dist/modals/entries//346/267/261/351/235/231/350/204/211/350/241/200/346/240/223/351/253/230/345/215/261/345/233/240/347/264/240/345/255/225/346/234/237/347/224/250/350/215/257/347/255/233/346/237/245/350/241/250/index.d.ts +0 -3
  610. package/dist/modals/entries//346/267/261/351/235/231/350/204/211/350/241/200/346/240/223/351/253/230/345/215/261/345/233/240/347/264/240/345/255/225/346/234/237/347/224/250/350/215/257/347/255/233/346/237/245/350/241/250/types.d.ts +0 -5
  611. package/dist/modals/entries//347/230/242/347/227/225/345/255/220/345/256/253/351/230/264/351/201/223/350/257/225/344/272/247/350/241/250/index.d.ts +0 -6
  612. package/dist/modals/entries//350/257/212/346/226/255/345/216/206/345/217/262/index.d.ts +0 -8
  613. package/dist/modals/entries//351/242/204/350/255/246/346/217/220/351/206/222_/351/253/230/345/215/261/345/277/253/350/256/257/add-diagnoses/add-diagnoses.d.ts +0 -12
  614. package/dist/modals/entries//351/242/204/350/255/246/346/217/220/351/206/222_/351/253/230/345/215/261/345/277/253/350/256/257/index.d.ts +0 -20
  615. package/dist/modals/entries//351/242/204/350/255/246/346/217/220/351/206/222_/351/253/230/345/215/261/345/277/253/350/256/257/util.d.ts +0 -66
  616. package/dist/modals/entries//351/253/230/345/215/261/345/233/240/347/264/240/347/256/241/347/220/206/HighriskSign.d.ts +0 -13
  617. package/dist/modals/entries//351/253/230/345/215/261/345/233/240/347/264/240/347/256/241/347/220/206/HighriskTimeline.d.ts +0 -9
  618. package/dist/modals/entries//351/253/230/345/215/261/345/233/240/347/264/240/347/256/241/347/220/206/index copy.d.ts" +0 -12
  619. package/dist/modals/entries//351/253/230/345/215/261/345/233/240/347/264/240/347/256/241/347/220/206/index.d.ts +0 -13
  620. package/dist/utils/adapter.d.ts +0 -97
  621. /package/dist/FU_components/MyBaseList/{_MyBaseList.d.ts → _MyBaseList copy.d.ts} +0 -0
@@ -1,3357 +1,393 @@
1
- import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
2
- import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
1
+ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
3
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
3
  import _createClass from "@babel/runtime/helpers/createClass";
5
4
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
5
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
6
  import _inherits from "@babel/runtime/helpers/inherits";
8
- import _defineProperty2 from "@babel/runtime/helpers/defineProperty";
9
- import _typeof from "@babel/runtime/helpers/typeof";
10
- var _excluded2 = ["axis", "bounds", "children", "defaultPosition", "defaultClassName", "defaultClassNameDragging", "defaultClassNameDragged", "position", "positionOffset", "scale"],
11
- _excluded3 = ["onResize", "width"];
7
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
+ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
9
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
12
10
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
13
11
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
14
- 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; }
15
- function _objectSpread2(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) { _defineProperty2(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; }
16
- import React$3 from 'react';
17
- import require$$2 from 'react-dom';
18
- import { g as getAugmentedNamespace } from './_commonjsHelpers.js';
19
- var reactResizable = {
20
- exports: {}
21
- };
22
- var Resizable$2 = {};
23
- var cjs = {
24
- exports: {}
25
- };
26
- var Draggable$1 = {};
27
- var propTypes$1 = {
28
- exports: {}
29
- };
30
- var reactIs = {
31
- exports: {}
32
- };
33
- var reactIs_production_min = {};
34
-
35
- /** @license React v16.13.1
36
- * react-is.production.min.js
37
- *
38
- * Copyright (c) Facebook, Inc. and its affiliates.
39
- *
40
- * This source code is licensed under the MIT license found in the
41
- * LICENSE file in the root directory of this source tree.
42
- */
43
- var b = "function" === typeof Symbol && Symbol["for"],
44
- c = b ? Symbol["for"]("react.element") : 60103,
45
- d = b ? Symbol["for"]("react.portal") : 60106,
46
- e = b ? Symbol["for"]("react.fragment") : 60107,
47
- f = b ? Symbol["for"]("react.strict_mode") : 60108,
48
- g = b ? Symbol["for"]("react.profiler") : 60114,
49
- h = b ? Symbol["for"]("react.provider") : 60109,
50
- k = b ? Symbol["for"]("react.context") : 60110,
51
- l = b ? Symbol["for"]("react.async_mode") : 60111,
52
- m = b ? Symbol["for"]("react.concurrent_mode") : 60111,
53
- n = b ? Symbol["for"]("react.forward_ref") : 60112,
54
- p = b ? Symbol["for"]("react.suspense") : 60113,
55
- q = b ? Symbol["for"]("react.suspense_list") : 60120,
56
- r$1 = b ? Symbol["for"]("react.memo") : 60115,
57
- t = b ? Symbol["for"]("react.lazy") : 60116,
58
- v = b ? Symbol["for"]("react.block") : 60121,
59
- w = b ? Symbol["for"]("react.fundamental") : 60117,
60
- x = b ? Symbol["for"]("react.responder") : 60118,
61
- y = b ? Symbol["for"]("react.scope") : 60119;
62
- function z(a) {
63
- if ("object" === _typeof(a) && null !== a) {
64
- var u = a.$$typeof;
65
- switch (u) {
66
- case c:
67
- switch (a = a.type, a) {
68
- case l:
69
- case m:
70
- case e:
71
- case g:
72
- case f:
73
- case p:
74
- return a;
75
- default:
76
- switch (a = a && a.$$typeof, a) {
77
- case k:
78
- case n:
79
- case t:
80
- case r$1:
81
- case h:
82
- return a;
83
- default:
84
- return u;
85
- }
86
- }
87
- case d:
88
- return u;
89
- }
90
- }
91
- }
92
- function A(a) {
93
- return z(a) === m;
94
- }
95
- reactIs_production_min.AsyncMode = l;
96
- reactIs_production_min.ConcurrentMode = m;
97
- reactIs_production_min.ContextConsumer = k;
98
- reactIs_production_min.ContextProvider = h;
99
- reactIs_production_min.Element = c;
100
- reactIs_production_min.ForwardRef = n;
101
- reactIs_production_min.Fragment = e;
102
- reactIs_production_min.Lazy = t;
103
- reactIs_production_min.Memo = r$1;
104
- reactIs_production_min.Portal = d;
105
- reactIs_production_min.Profiler = g;
106
- reactIs_production_min.StrictMode = f;
107
- reactIs_production_min.Suspense = p;
108
- reactIs_production_min.isAsyncMode = function (a) {
109
- return A(a) || z(a) === l;
110
- };
111
- reactIs_production_min.isConcurrentMode = A;
112
- reactIs_production_min.isContextConsumer = function (a) {
113
- return z(a) === k;
114
- };
115
- reactIs_production_min.isContextProvider = function (a) {
116
- return z(a) === h;
117
- };
118
- reactIs_production_min.isElement = function (a) {
119
- return "object" === _typeof(a) && null !== a && a.$$typeof === c;
120
- };
121
- reactIs_production_min.isForwardRef = function (a) {
122
- return z(a) === n;
123
- };
124
- reactIs_production_min.isFragment = function (a) {
125
- return z(a) === e;
126
- };
127
- reactIs_production_min.isLazy = function (a) {
128
- return z(a) === t;
129
- };
130
- reactIs_production_min.isMemo = function (a) {
131
- return z(a) === r$1;
132
- };
133
- reactIs_production_min.isPortal = function (a) {
134
- return z(a) === d;
135
- };
136
- reactIs_production_min.isProfiler = function (a) {
137
- return z(a) === g;
138
- };
139
- reactIs_production_min.isStrictMode = function (a) {
140
- return z(a) === f;
141
- };
142
- reactIs_production_min.isSuspense = function (a) {
143
- return z(a) === p;
144
- };
145
- reactIs_production_min.isValidElementType = function (a) {
146
- return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === _typeof(a) && null !== a && (a.$$typeof === t || a.$$typeof === r$1 || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
147
- };
148
- reactIs_production_min.typeOf = z;
149
- var reactIs_development = {};
150
-
151
- /** @license React v16.13.1
152
- * react-is.development.js
153
- *
154
- * Copyright (c) Facebook, Inc. and its affiliates.
155
- *
156
- * This source code is licensed under the MIT license found in the
157
- * LICENSE file in the root directory of this source tree.
158
- */
159
- if (process.env.NODE_ENV !== "production") {
160
- (function () {
161
- // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
162
- // nor polyfill, then a plain number is used for performance.
163
- var hasSymbol = typeof Symbol === 'function' && Symbol["for"];
164
- var REACT_ELEMENT_TYPE = hasSymbol ? Symbol["for"]('react.element') : 0xeac7;
165
- var REACT_PORTAL_TYPE = hasSymbol ? Symbol["for"]('react.portal') : 0xeaca;
166
- var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol["for"]('react.fragment') : 0xeacb;
167
- var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol["for"]('react.strict_mode') : 0xeacc;
168
- var REACT_PROFILER_TYPE = hasSymbol ? Symbol["for"]('react.profiler') : 0xead2;
169
- var REACT_PROVIDER_TYPE = hasSymbol ? Symbol["for"]('react.provider') : 0xeacd;
170
- var REACT_CONTEXT_TYPE = hasSymbol ? Symbol["for"]('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
171
- // (unstable) APIs that have been removed. Can we remove the symbols?
172
-
173
- var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol["for"]('react.async_mode') : 0xeacf;
174
- var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol["for"]('react.concurrent_mode') : 0xeacf;
175
- var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol["for"]('react.forward_ref') : 0xead0;
176
- var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol["for"]('react.suspense') : 0xead1;
177
- var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol["for"]('react.suspense_list') : 0xead8;
178
- var REACT_MEMO_TYPE = hasSymbol ? Symbol["for"]('react.memo') : 0xead3;
179
- var REACT_LAZY_TYPE = hasSymbol ? Symbol["for"]('react.lazy') : 0xead4;
180
- var REACT_BLOCK_TYPE = hasSymbol ? Symbol["for"]('react.block') : 0xead9;
181
- var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol["for"]('react.fundamental') : 0xead5;
182
- var REACT_RESPONDER_TYPE = hasSymbol ? Symbol["for"]('react.responder') : 0xead6;
183
- var REACT_SCOPE_TYPE = hasSymbol ? Symbol["for"]('react.scope') : 0xead7;
184
- function isValidElementType(type) {
185
- return typeof type === 'string' || typeof type === 'function' ||
186
- // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
187
- type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || _typeof(type) === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
188
- }
189
- function typeOf(object) {
190
- if (_typeof(object) === 'object' && object !== null) {
191
- var $$typeof = object.$$typeof;
192
- switch ($$typeof) {
193
- case REACT_ELEMENT_TYPE:
194
- var type = object.type;
195
- switch (type) {
196
- case REACT_ASYNC_MODE_TYPE:
197
- case REACT_CONCURRENT_MODE_TYPE:
198
- case REACT_FRAGMENT_TYPE:
199
- case REACT_PROFILER_TYPE:
200
- case REACT_STRICT_MODE_TYPE:
201
- case REACT_SUSPENSE_TYPE:
202
- return type;
203
- default:
204
- var $$typeofType = type && type.$$typeof;
205
- switch ($$typeofType) {
206
- case REACT_CONTEXT_TYPE:
207
- case REACT_FORWARD_REF_TYPE:
208
- case REACT_LAZY_TYPE:
209
- case REACT_MEMO_TYPE:
210
- case REACT_PROVIDER_TYPE:
211
- return $$typeofType;
212
- default:
213
- return $$typeof;
214
- }
215
- }
216
- case REACT_PORTAL_TYPE:
217
- return $$typeof;
218
- }
219
- }
220
- return undefined;
221
- } // AsyncMode is deprecated along with isAsyncMode
222
-
223
- var AsyncMode = REACT_ASYNC_MODE_TYPE;
224
- var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
225
- var ContextConsumer = REACT_CONTEXT_TYPE;
226
- var ContextProvider = REACT_PROVIDER_TYPE;
227
- var Element = REACT_ELEMENT_TYPE;
228
- var ForwardRef = REACT_FORWARD_REF_TYPE;
229
- var Fragment = REACT_FRAGMENT_TYPE;
230
- var Lazy = REACT_LAZY_TYPE;
231
- var Memo = REACT_MEMO_TYPE;
232
- var Portal = REACT_PORTAL_TYPE;
233
- var Profiler = REACT_PROFILER_TYPE;
234
- var StrictMode = REACT_STRICT_MODE_TYPE;
235
- var Suspense = REACT_SUSPENSE_TYPE;
236
- var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
237
-
238
- function isAsyncMode(object) {
239
- {
240
- if (!hasWarnedAboutDeprecatedIsAsyncMode) {
241
- hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
242
-
243
- console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
244
- }
245
- }
246
- return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
247
- }
248
- function isConcurrentMode(object) {
249
- return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
250
- }
251
- function isContextConsumer(object) {
252
- return typeOf(object) === REACT_CONTEXT_TYPE;
253
- }
254
- function isContextProvider(object) {
255
- return typeOf(object) === REACT_PROVIDER_TYPE;
256
- }
257
- function isElement(object) {
258
- return _typeof(object) === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
259
- }
260
- function isForwardRef(object) {
261
- return typeOf(object) === REACT_FORWARD_REF_TYPE;
262
- }
263
- function isFragment(object) {
264
- return typeOf(object) === REACT_FRAGMENT_TYPE;
265
- }
266
- function isLazy(object) {
267
- return typeOf(object) === REACT_LAZY_TYPE;
268
- }
269
- function isMemo(object) {
270
- return typeOf(object) === REACT_MEMO_TYPE;
271
- }
272
- function isPortal(object) {
273
- return typeOf(object) === REACT_PORTAL_TYPE;
274
- }
275
- function isProfiler(object) {
276
- return typeOf(object) === REACT_PROFILER_TYPE;
277
- }
278
- function isStrictMode(object) {
279
- return typeOf(object) === REACT_STRICT_MODE_TYPE;
280
- }
281
- function isSuspense(object) {
282
- return typeOf(object) === REACT_SUSPENSE_TYPE;
283
- }
284
- reactIs_development.AsyncMode = AsyncMode;
285
- reactIs_development.ConcurrentMode = ConcurrentMode;
286
- reactIs_development.ContextConsumer = ContextConsumer;
287
- reactIs_development.ContextProvider = ContextProvider;
288
- reactIs_development.Element = Element;
289
- reactIs_development.ForwardRef = ForwardRef;
290
- reactIs_development.Fragment = Fragment;
291
- reactIs_development.Lazy = Lazy;
292
- reactIs_development.Memo = Memo;
293
- reactIs_development.Portal = Portal;
294
- reactIs_development.Profiler = Profiler;
295
- reactIs_development.StrictMode = StrictMode;
296
- reactIs_development.Suspense = Suspense;
297
- reactIs_development.isAsyncMode = isAsyncMode;
298
- reactIs_development.isConcurrentMode = isConcurrentMode;
299
- reactIs_development.isContextConsumer = isContextConsumer;
300
- reactIs_development.isContextProvider = isContextProvider;
301
- reactIs_development.isElement = isElement;
302
- reactIs_development.isForwardRef = isForwardRef;
303
- reactIs_development.isFragment = isFragment;
304
- reactIs_development.isLazy = isLazy;
305
- reactIs_development.isMemo = isMemo;
306
- reactIs_development.isPortal = isPortal;
307
- reactIs_development.isProfiler = isProfiler;
308
- reactIs_development.isStrictMode = isStrictMode;
309
- reactIs_development.isSuspense = isSuspense;
310
- reactIs_development.isValidElementType = isValidElementType;
311
- reactIs_development.typeOf = typeOf;
312
- })();
313
- }
314
- if (process.env.NODE_ENV === 'production') {
315
- reactIs.exports = reactIs_production_min;
316
- } else {
317
- reactIs.exports = reactIs_development;
318
- }
319
-
320
- /*
321
- object-assign
322
- (c) Sindre Sorhus
323
- @license MIT
324
- */
325
- /* eslint-disable no-unused-vars */
326
- var getOwnPropertySymbols = Object.getOwnPropertySymbols;
327
- var hasOwnProperty = Object.prototype.hasOwnProperty;
328
- var propIsEnumerable = Object.prototype.propertyIsEnumerable;
329
- function toObject(val) {
330
- if (val === null || val === undefined) {
331
- throw new TypeError('Object.assign cannot be called with null or undefined');
332
- }
333
- return Object(val);
334
- }
335
- function shouldUseNative() {
336
- try {
337
- if (!Object.assign) {
338
- return false;
339
- }
340
-
341
- // Detect buggy property enumeration order in older V8 versions.
342
-
343
- // https://bugs.chromium.org/p/v8/issues/detail?id=4118
344
- var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
345
- test1[5] = 'de';
346
- if (Object.getOwnPropertyNames(test1)[0] === '5') {
347
- return false;
348
- }
349
-
350
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
351
- var test2 = {};
352
- for (var i = 0; i < 10; i++) {
353
- test2['_' + String.fromCharCode(i)] = i;
354
- }
355
- var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
356
- return test2[n];
357
- });
358
- if (order2.join('') !== '0123456789') {
359
- return false;
360
- }
361
-
362
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
363
- var test3 = {};
364
- 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
365
- test3[letter] = letter;
366
- });
367
- if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') {
368
- return false;
369
- }
370
- return true;
371
- } catch (err) {
372
- // We don't expect any of the above to throw, but better to be safe.
373
- return false;
374
- }
375
- }
376
- var objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
377
- var from;
378
- var to = toObject(target);
379
- var symbols;
380
- for (var s = 1; s < arguments.length; s++) {
381
- from = Object(arguments[s]);
382
- for (var key in from) {
383
- if (hasOwnProperty.call(from, key)) {
384
- to[key] = from[key];
385
- }
386
- }
387
- if (getOwnPropertySymbols) {
388
- symbols = getOwnPropertySymbols(from);
389
- for (var i = 0; i < symbols.length; i++) {
390
- if (propIsEnumerable.call(from, symbols[i])) {
391
- to[symbols[i]] = from[symbols[i]];
392
- }
393
- }
394
- }
395
- }
396
- return to;
397
- };
398
-
399
- /**
400
- * Copyright (c) 2013-present, Facebook, Inc.
401
- *
402
- * This source code is licensed under the MIT license found in the
403
- * LICENSE file in the root directory of this source tree.
404
- */
405
- var ReactPropTypesSecret$3 = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
406
- var ReactPropTypesSecret_1 = ReactPropTypesSecret$3;
407
- var has$2 = Function.call.bind(Object.prototype.hasOwnProperty);
408
-
409
- /**
410
- * Copyright (c) 2013-present, Facebook, Inc.
411
- *
412
- * This source code is licensed under the MIT license found in the
413
- * LICENSE file in the root directory of this source tree.
414
- */
415
- var printWarning$1 = function printWarning$1() {};
416
- if (process.env.NODE_ENV !== 'production') {
417
- var ReactPropTypesSecret$2 = ReactPropTypesSecret_1;
418
- var loggedTypeFailures = {};
419
- var has$1 = has$2;
420
- printWarning$1 = function printWarning$1(text) {
421
- var message = 'Warning: ' + text;
422
- if (typeof console !== 'undefined') {
423
- console.error(message);
424
- }
425
- try {
426
- // --- Welcome to debugging React ---
427
- // This error was thrown as a convenience so that you can use this stack
428
- // to find the callsite that caused this warning to fire.
429
- throw new Error(message);
430
- } catch (x) {/**/}
431
- };
432
- }
433
-
434
- /**
435
- * Assert that the values match with the type specs.
436
- * Error messages are memorized and will only be shown once.
437
- *
438
- * @param {object} typeSpecs Map of name to a ReactPropType
439
- * @param {object} values Runtime values that need to be type-checked
440
- * @param {string} location e.g. "prop", "context", "child context"
441
- * @param {string} componentName Name of the component for error messages.
442
- * @param {?Function} getStack Returns the component stack.
443
- * @private
444
- */
445
- function checkPropTypes$1(typeSpecs, values, location, componentName, getStack) {
446
- if (process.env.NODE_ENV !== 'production') {
447
- for (var typeSpecName in typeSpecs) {
448
- if (has$1(typeSpecs, typeSpecName)) {
449
- var error;
450
- // Prop type validation may throw. In case they do, we don't want to
451
- // fail the render phase where it didn't fail before. So we log it.
452
- // After these have been cleaned up, we'll let them throw.
453
- try {
454
- // This is intentionally an invariant that gets caught. It's the same
455
- // behavior as without this statement except with a better message.
456
- if (typeof typeSpecs[typeSpecName] !== 'function') {
457
- var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + _typeof(typeSpecs[typeSpecName]) + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
458
- err.name = 'Invariant Violation';
459
- throw err;
460
- }
461
- error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret$2);
462
- } catch (ex) {
463
- error = ex;
464
- }
465
- if (error && !(error instanceof Error)) {
466
- printWarning$1((componentName || 'React class') + ': type specification of ' + location + ' `' + typeSpecName + '` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a ' + _typeof(error) + '. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).');
467
- }
468
- if (error instanceof Error && !(error.message in loggedTypeFailures)) {
469
- // Only monitor this failure once because there tends to be a lot of the
470
- // same error.
471
- loggedTypeFailures[error.message] = true;
472
- var stack = getStack ? getStack() : '';
473
- printWarning$1('Failed ' + location + ' type: ' + error.message + (stack != null ? stack : ''));
474
- }
475
- }
476
- }
477
- }
478
- }
479
-
480
- /**
481
- * Resets warning cache when testing.
482
- *
483
- * @private
484
- */
485
- checkPropTypes$1.resetWarningCache = function () {
486
- if (process.env.NODE_ENV !== 'production') {
487
- loggedTypeFailures = {};
488
- }
489
- };
490
- var checkPropTypes_1 = checkPropTypes$1;
491
-
492
- /**
493
- * Copyright (c) 2013-present, Facebook, Inc.
494
- *
495
- * This source code is licensed under the MIT license found in the
496
- * LICENSE file in the root directory of this source tree.
497
- */
498
- var ReactIs$1 = reactIs.exports;
499
- var assign = objectAssign;
500
- var ReactPropTypesSecret$1 = ReactPropTypesSecret_1;
501
- var has = has$2;
502
- var checkPropTypes = checkPropTypes_1;
503
- var printWarning = function printWarning() {};
504
- if (process.env.NODE_ENV !== 'production') {
505
- printWarning = function printWarning(text) {
506
- var message = 'Warning: ' + text;
507
- if (typeof console !== 'undefined') {
508
- console.error(message);
509
- }
510
- try {
511
- // --- Welcome to debugging React ---
512
- // This error was thrown as a convenience so that you can use this stack
513
- // to find the callsite that caused this warning to fire.
514
- throw new Error(message);
515
- } catch (x) {}
516
- };
517
- }
518
- function emptyFunctionThatReturnsNull() {
519
- return null;
520
- }
521
- var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, throwOnDirectAccess) {
522
- /* global Symbol */
523
- var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
524
- var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
525
-
526
- /**
527
- * Returns the iterator method function contained on the iterable object.
528
- *
529
- * Be sure to invoke the function with the iterable as context:
530
- *
531
- * var iteratorFn = getIteratorFn(myIterable);
532
- * if (iteratorFn) {
533
- * var iterator = iteratorFn.call(myIterable);
534
- * ...
535
- * }
536
- *
537
- * @param {?object} maybeIterable
538
- * @return {?function}
539
- */
540
- function getIteratorFn(maybeIterable) {
541
- var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
542
- if (typeof iteratorFn === 'function') {
543
- return iteratorFn;
544
- }
545
- }
546
-
547
- /**
548
- * Collection of methods that allow declaration and validation of props that are
549
- * supplied to React components. Example usage:
550
- *
551
- * var Props = require('ReactPropTypes');
552
- * var MyArticle = React.createClass({
553
- * propTypes: {
554
- * // An optional string prop named "description".
555
- * description: Props.string,
556
- *
557
- * // A required enum prop named "category".
558
- * category: Props.oneOf(['News','Photos']).isRequired,
559
- *
560
- * // A prop named "dialog" that requires an instance of Dialog.
561
- * dialog: Props.instanceOf(Dialog).isRequired
562
- * },
563
- * render: function() { ... }
564
- * });
565
- *
566
- * A more formal specification of how these methods are used:
567
- *
568
- * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
569
- * decl := ReactPropTypes.{type}(.isRequired)?
570
- *
571
- * Each and every declaration produces a function with the same signature. This
572
- * allows the creation of custom validation functions. For example:
573
- *
574
- * var MyLink = React.createClass({
575
- * propTypes: {
576
- * // An optional string or URI prop named "href".
577
- * href: function(props, propName, componentName) {
578
- * var propValue = props[propName];
579
- * if (propValue != null && typeof propValue !== 'string' &&
580
- * !(propValue instanceof URI)) {
581
- * return new Error(
582
- * 'Expected a string or an URI for ' + propName + ' in ' +
583
- * componentName
584
- * );
585
- * }
586
- * }
587
- * },
588
- * render: function() {...}
589
- * });
590
- *
591
- * @internal
592
- */
593
-
594
- var ANONYMOUS = '<<anonymous>>';
595
-
596
- // Important!
597
- // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
598
- var ReactPropTypes = {
599
- array: createPrimitiveTypeChecker('array'),
600
- bigint: createPrimitiveTypeChecker('bigint'),
601
- bool: createPrimitiveTypeChecker('boolean'),
602
- func: createPrimitiveTypeChecker('function'),
603
- number: createPrimitiveTypeChecker('number'),
604
- object: createPrimitiveTypeChecker('object'),
605
- string: createPrimitiveTypeChecker('string'),
606
- symbol: createPrimitiveTypeChecker('symbol'),
607
- any: createAnyTypeChecker(),
608
- arrayOf: createArrayOfTypeChecker,
609
- element: createElementTypeChecker(),
610
- elementType: createElementTypeTypeChecker(),
611
- instanceOf: createInstanceTypeChecker,
612
- node: createNodeChecker(),
613
- objectOf: createObjectOfTypeChecker,
614
- oneOf: createEnumTypeChecker,
615
- oneOfType: createUnionTypeChecker,
616
- shape: createShapeTypeChecker,
617
- exact: createStrictShapeTypeChecker
618
- };
619
-
620
- /**
621
- * inlined Object.is polyfill to avoid requiring consumers ship their own
622
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
623
- */
624
- /*eslint-disable no-self-compare*/
625
- function is(x, y) {
626
- // SameValue algorithm
627
- if (x === y) {
628
- // Steps 1-5, 7-10
629
- // Steps 6.b-6.e: +0 != -0
630
- return x !== 0 || 1 / x === 1 / y;
631
- } else {
632
- // Step 6.a: NaN == NaN
633
- return x !== x && y !== y;
634
- }
635
- }
636
- /*eslint-enable no-self-compare*/
637
-
638
- /**
639
- * We use an Error-like object for backward compatibility as people may call
640
- * PropTypes directly and inspect their output. However, we don't use real
641
- * Errors anymore. We don't inspect their stack anyway, and creating them
642
- * is prohibitively expensive if they are created too often, such as what
643
- * happens in oneOfType() for any type before the one that matched.
644
- */
645
- function PropTypeError(message, data) {
646
- this.message = message;
647
- this.data = data && _typeof(data) === 'object' ? data : {};
648
- this.stack = '';
649
- }
650
- // Make `instanceof Error` still work for returned errors.
651
- PropTypeError.prototype = Error.prototype;
652
- function createChainableTypeChecker(validate) {
653
- if (process.env.NODE_ENV !== 'production') {
654
- var manualPropTypeCallCache = {};
655
- var manualPropTypeWarningCount = 0;
656
- }
657
- function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
658
- componentName = componentName || ANONYMOUS;
659
- propFullName = propFullName || propName;
660
- if (secret !== ReactPropTypesSecret$1) {
661
- if (throwOnDirectAccess) {
662
- // New behavior only for users of `prop-types` package
663
- var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use `PropTypes.checkPropTypes()` to call them. ' + 'Read more at http://fb.me/use-check-prop-types');
664
- err.name = 'Invariant Violation';
665
- throw err;
666
- } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
667
- // Old behavior for people using React.PropTypes
668
- var cacheKey = componentName + ':' + propName;
669
- if (!manualPropTypeCallCache[cacheKey] &&
670
- // Avoid spamming the console because they are often not actionable except for lib authors
671
- manualPropTypeWarningCount < 3) {
672
- printWarning('You are manually calling a React.PropTypes validation ' + 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' + 'and will throw in the standalone `prop-types` package. ' + 'You may be seeing this warning due to a third-party PropTypes ' + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.');
673
- manualPropTypeCallCache[cacheKey] = true;
674
- manualPropTypeWarningCount++;
675
- }
676
- }
677
- }
678
- if (props[propName] == null) {
679
- if (isRequired) {
680
- if (props[propName] === null) {
681
- return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
682
- }
683
- return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
684
- }
685
- return null;
686
- } else {
687
- return validate(props, propName, componentName, location, propFullName);
688
- }
689
- }
690
- var chainedCheckType = checkType.bind(null, false);
691
- chainedCheckType.isRequired = checkType.bind(null, true);
692
- return chainedCheckType;
693
- }
694
- function createPrimitiveTypeChecker(expectedType) {
695
- function validate(props, propName, componentName, location, propFullName, secret) {
696
- var propValue = props[propName];
697
- var propType = getPropType(propValue);
698
- if (propType !== expectedType) {
699
- // `propValue` being instance of, say, date/regexp, pass the 'object'
700
- // check, but we can offer a more precise error message here rather than
701
- // 'of type `object`'.
702
- var preciseType = getPreciseType(propValue);
703
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'), {
704
- expectedType: expectedType
705
- });
706
- }
707
- return null;
708
- }
709
- return createChainableTypeChecker(validate);
710
- }
711
- function createAnyTypeChecker() {
712
- return createChainableTypeChecker(emptyFunctionThatReturnsNull);
713
- }
714
- function createArrayOfTypeChecker(typeChecker) {
715
- function validate(props, propName, componentName, location, propFullName) {
716
- if (typeof typeChecker !== 'function') {
717
- return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
718
- }
719
- var propValue = props[propName];
720
- if (!Array.isArray(propValue)) {
721
- var propType = getPropType(propValue);
722
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
723
- }
724
- for (var i = 0; i < propValue.length; i++) {
725
- var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret$1);
726
- if (error instanceof Error) {
727
- return error;
728
- }
729
- }
730
- return null;
731
- }
732
- return createChainableTypeChecker(validate);
733
- }
734
- function createElementTypeChecker() {
735
- function validate(props, propName, componentName, location, propFullName) {
736
- var propValue = props[propName];
737
- if (!isValidElement(propValue)) {
738
- var propType = getPropType(propValue);
739
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
740
- }
741
- return null;
742
- }
743
- return createChainableTypeChecker(validate);
744
- }
745
- function createElementTypeTypeChecker() {
746
- function validate(props, propName, componentName, location, propFullName) {
747
- var propValue = props[propName];
748
- if (!ReactIs$1.isValidElementType(propValue)) {
749
- var propType = getPropType(propValue);
750
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
751
- }
752
- return null;
753
- }
754
- return createChainableTypeChecker(validate);
755
- }
756
- function createInstanceTypeChecker(expectedClass) {
757
- function validate(props, propName, componentName, location, propFullName) {
758
- if (!(props[propName] instanceof expectedClass)) {
759
- var expectedClassName = expectedClass.name || ANONYMOUS;
760
- var actualClassName = getClassName(props[propName]);
761
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
762
- }
763
- return null;
764
- }
765
- return createChainableTypeChecker(validate);
766
- }
767
- function createEnumTypeChecker(expectedValues) {
768
- if (!Array.isArray(expectedValues)) {
769
- if (process.env.NODE_ENV !== 'production') {
770
- if (arguments.length > 1) {
771
- printWarning('Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' + 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).');
772
- } else {
773
- printWarning('Invalid argument supplied to oneOf, expected an array.');
774
- }
775
- }
776
- return emptyFunctionThatReturnsNull;
777
- }
778
- function validate(props, propName, componentName, location, propFullName) {
779
- var propValue = props[propName];
780
- for (var i = 0; i < expectedValues.length; i++) {
781
- if (is(propValue, expectedValues[i])) {
782
- return null;
783
- }
784
- }
785
- var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
786
- var type = getPreciseType(value);
787
- if (type === 'symbol') {
788
- return String(value);
789
- }
790
- return value;
791
- });
792
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
793
- }
794
- return createChainableTypeChecker(validate);
795
- }
796
- function createObjectOfTypeChecker(typeChecker) {
797
- function validate(props, propName, componentName, location, propFullName) {
798
- if (typeof typeChecker !== 'function') {
799
- return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
800
- }
801
- var propValue = props[propName];
802
- var propType = getPropType(propValue);
803
- if (propType !== 'object') {
804
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
805
- }
806
- for (var key in propValue) {
807
- if (has(propValue, key)) {
808
- var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret$1);
809
- if (error instanceof Error) {
810
- return error;
811
- }
812
- }
813
- }
814
- return null;
815
- }
816
- return createChainableTypeChecker(validate);
817
- }
818
- function createUnionTypeChecker(arrayOfTypeCheckers) {
819
- if (!Array.isArray(arrayOfTypeCheckers)) {
820
- process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
821
- return emptyFunctionThatReturnsNull;
822
- }
823
- for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
824
- var checker = arrayOfTypeCheckers[i];
825
- if (typeof checker !== 'function') {
826
- printWarning('Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.');
827
- return emptyFunctionThatReturnsNull;
828
- }
829
- }
830
- function validate(props, propName, componentName, location, propFullName) {
831
- var expectedTypes = [];
832
- for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
833
- var checker = arrayOfTypeCheckers[i];
834
- var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret$1);
835
- if (checkerResult == null) {
836
- return null;
837
- }
838
- if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
839
- expectedTypes.push(checkerResult.data.expectedType);
840
- }
841
- }
842
- var expectedTypesMessage = expectedTypes.length > 0 ? ', expected one of type [' + expectedTypes.join(', ') + ']' : '';
843
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
844
- }
845
- return createChainableTypeChecker(validate);
846
- }
847
- function createNodeChecker() {
848
- function validate(props, propName, componentName, location, propFullName) {
849
- if (!isNode(props[propName])) {
850
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
851
- }
852
- return null;
853
- }
854
- return createChainableTypeChecker(validate);
855
- }
856
- function invalidValidatorError(componentName, location, propFullName, key, type) {
857
- return new PropTypeError((componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.');
858
- }
859
- function createShapeTypeChecker(shapeTypes) {
860
- function validate(props, propName, componentName, location, propFullName) {
861
- var propValue = props[propName];
862
- var propType = getPropType(propValue);
863
- if (propType !== 'object') {
864
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
865
- }
866
- for (var key in shapeTypes) {
867
- var checker = shapeTypes[key];
868
- if (typeof checker !== 'function') {
869
- return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
870
- }
871
- var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret$1);
872
- if (error) {
873
- return error;
874
- }
875
- }
876
- return null;
877
- }
878
- return createChainableTypeChecker(validate);
879
- }
880
- function createStrictShapeTypeChecker(shapeTypes) {
881
- function validate(props, propName, componentName, location, propFullName) {
882
- var propValue = props[propName];
883
- var propType = getPropType(propValue);
884
- if (propType !== 'object') {
885
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
886
- }
887
- // We need to check all keys in case some are required but missing from props.
888
- var allKeys = assign({}, props[propName], shapeTypes);
889
- for (var key in allKeys) {
890
- var checker = shapeTypes[key];
891
- if (has(shapeTypes, key) && typeof checker !== 'function') {
892
- return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
893
- }
894
- if (!checker) {
895
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' + '\nBad object: ' + JSON.stringify(props[propName], null, ' ') + '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' '));
896
- }
897
- var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret$1);
898
- if (error) {
899
- return error;
900
- }
901
- }
902
- return null;
903
- }
904
- return createChainableTypeChecker(validate);
905
- }
906
- function isNode(propValue) {
907
- switch (_typeof(propValue)) {
908
- case 'number':
909
- case 'string':
910
- case 'undefined':
911
- return true;
912
- case 'boolean':
913
- return !propValue;
914
- case 'object':
915
- if (Array.isArray(propValue)) {
916
- return propValue.every(isNode);
917
- }
918
- if (propValue === null || isValidElement(propValue)) {
919
- return true;
920
- }
921
- var iteratorFn = getIteratorFn(propValue);
922
- if (iteratorFn) {
923
- var iterator = iteratorFn.call(propValue);
924
- var step;
925
- if (iteratorFn !== propValue.entries) {
926
- while (!(step = iterator.next()).done) {
927
- if (!isNode(step.value)) {
928
- return false;
929
- }
930
- }
931
- } else {
932
- // Iterator will provide entry [k,v] tuples rather than values.
933
- while (!(step = iterator.next()).done) {
934
- var entry = step.value;
935
- if (entry) {
936
- if (!isNode(entry[1])) {
937
- return false;
938
- }
939
- }
940
- }
941
- }
942
- } else {
943
- return false;
944
- }
945
- return true;
946
- default:
947
- return false;
948
- }
949
- }
950
- function isSymbol(propType, propValue) {
951
- // Native Symbol.
952
- if (propType === 'symbol') {
953
- return true;
954
- }
955
-
956
- // falsy value can't be a Symbol
957
- if (!propValue) {
958
- return false;
959
- }
960
-
961
- // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
962
- if (propValue['@@toStringTag'] === 'Symbol') {
963
- return true;
964
- }
965
-
966
- // Fallback for non-spec compliant Symbols which are polyfilled.
967
- if (typeof Symbol === 'function' && propValue instanceof Symbol) {
968
- return true;
969
- }
970
- return false;
971
- }
972
-
973
- // Equivalent of `typeof` but with special handling for array and regexp.
974
- function getPropType(propValue) {
975
- var propType = _typeof(propValue);
976
- if (Array.isArray(propValue)) {
977
- return 'array';
978
- }
979
- if (propValue instanceof RegExp) {
980
- // Old webkits (at least until Android 4.0) return 'function' rather than
981
- // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
982
- // passes PropTypes.object.
983
- return 'object';
984
- }
985
- if (isSymbol(propType, propValue)) {
986
- return 'symbol';
987
- }
988
- return propType;
989
- }
990
-
991
- // This handles more types than `getPropType`. Only used for error messages.
992
- // See `createPrimitiveTypeChecker`.
993
- function getPreciseType(propValue) {
994
- if (typeof propValue === 'undefined' || propValue === null) {
995
- return '' + propValue;
996
- }
997
- var propType = getPropType(propValue);
998
- if (propType === 'object') {
999
- if (propValue instanceof Date) {
1000
- return 'date';
1001
- } else if (propValue instanceof RegExp) {
1002
- return 'regexp';
1003
- }
1004
- }
1005
- return propType;
1006
- }
1007
-
1008
- // Returns a string that is postfixed to a warning about an invalid type.
1009
- // For example, "undefined" or "of type array"
1010
- function getPostfixForTypeWarning(value) {
1011
- var type = getPreciseType(value);
1012
- switch (type) {
1013
- case 'array':
1014
- case 'object':
1015
- return 'an ' + type;
1016
- case 'boolean':
1017
- case 'date':
1018
- case 'regexp':
1019
- return 'a ' + type;
1020
- default:
1021
- return type;
1022
- }
1023
- }
1024
-
1025
- // Returns class name of the object, if any.
1026
- function getClassName(propValue) {
1027
- if (!propValue.constructor || !propValue.constructor.name) {
1028
- return ANONYMOUS;
1029
- }
1030
- return propValue.constructor.name;
1031
- }
1032
- ReactPropTypes.checkPropTypes = checkPropTypes;
1033
- ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
1034
- ReactPropTypes.PropTypes = ReactPropTypes;
1035
- return ReactPropTypes;
1036
- };
1037
-
1038
- /**
1039
- * Copyright (c) 2013-present, Facebook, Inc.
1040
- *
1041
- * This source code is licensed under the MIT license found in the
1042
- * LICENSE file in the root directory of this source tree.
1043
- */
1044
- var ReactPropTypesSecret = ReactPropTypesSecret_1;
1045
- function emptyFunction() {}
1046
- function emptyFunctionWithReset() {}
1047
- emptyFunctionWithReset.resetWarningCache = emptyFunction;
1048
- var factoryWithThrowingShims = function factoryWithThrowingShims() {
1049
- function shim(props, propName, componentName, location, propFullName, secret) {
1050
- if (secret === ReactPropTypesSecret) {
1051
- // It is still safe when called from React.
1052
- return;
1053
- }
1054
- var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types');
1055
- err.name = 'Invariant Violation';
1056
- throw err;
1057
- }
1058
- shim.isRequired = shim;
1059
- function getShim() {
1060
- return shim;
1061
- }
1062
- // Important!
1063
- // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
1064
- var ReactPropTypes = {
1065
- array: shim,
1066
- bigint: shim,
1067
- bool: shim,
1068
- func: shim,
1069
- number: shim,
1070
- object: shim,
1071
- string: shim,
1072
- symbol: shim,
1073
- any: shim,
1074
- arrayOf: getShim,
1075
- element: shim,
1076
- elementType: shim,
1077
- instanceOf: getShim,
1078
- node: shim,
1079
- objectOf: getShim,
1080
- oneOf: getShim,
1081
- oneOfType: getShim,
1082
- shape: getShim,
1083
- exact: getShim,
1084
- checkPropTypes: emptyFunctionWithReset,
1085
- resetWarningCache: emptyFunction
1086
- };
1087
- ReactPropTypes.PropTypes = ReactPropTypes;
1088
- return ReactPropTypes;
1089
- };
1090
-
1091
- /**
1092
- * Copyright (c) 2013-present, Facebook, Inc.
1093
- *
1094
- * This source code is licensed under the MIT license found in the
1095
- * LICENSE file in the root directory of this source tree.
1096
- */
1097
- if (process.env.NODE_ENV !== 'production') {
1098
- var ReactIs = reactIs.exports;
1099
-
1100
- // By explicitly using `prop-types` you are opting into new development behavior.
1101
- // http://fb.me/prop-types-in-prod
1102
- var throwOnDirectAccess = true;
1103
- propTypes$1.exports = factoryWithTypeCheckers(ReactIs.isElement, throwOnDirectAccess);
1104
- } else {
1105
- // By explicitly using `prop-types` you are opting into new production behavior.
1106
- // http://fb.me/prop-types-in-prod
1107
- propTypes$1.exports = factoryWithThrowingShims();
1108
- }
1109
- function r(e) {
1110
- var t,
1111
- f,
1112
- n = "";
1113
- if ("string" == typeof e || "number" == typeof e) n += e;else if ("object" == _typeof(e)) if (Array.isArray(e)) for (t = 0; t < e.length; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);else for (t in e) e[t] && (n && (n += " "), n += t);
1114
- return n;
1115
- }
1116
- function clsx() {
1117
- for (var e, t, f = 0, n = ""; f < arguments.length;) (e = arguments[f++]) && (t = r(e)) && (n && (n += " "), n += t);
1118
- return n;
1119
- }
1120
- var clsx_m = {
1121
- __proto__: null,
1122
- clsx: clsx,
1123
- 'default': clsx
1124
- };
1125
- var require$$3 = /*@__PURE__*/getAugmentedNamespace(clsx_m);
1126
- var domFns = {};
1127
- var shims = {};
1128
- Object.defineProperty(shims, "__esModule", {
1129
- value: true
1130
- });
1131
- shims.dontSetMe = dontSetMe;
1132
- shims.findInArray = findInArray;
1133
- shims["int"] = _int;
1134
- shims.isFunction = isFunction;
1135
- shims.isNum = isNum;
1136
- // @credits https://gist.github.com/rogozhnikoff/a43cfed27c41e4e68cdc
1137
- function findInArray(array /*: Array<any> | TouchList*/, callback /*: Function*/) /*: any*/{
1138
- for (var i = 0, length = array.length; i < length; i++) {
1139
- if (callback.apply(callback, [array[i], i, array])) return array[i];
1140
- }
1141
- }
1142
- function isFunction(func /*: any*/) /*: boolean %checks*/{
1143
- // $FlowIgnore[method-unbinding]
1144
- return typeof func === 'function' || Object.prototype.toString.call(func) === '[object Function]';
1145
- }
1146
- function isNum(num /*: any*/) /*: boolean %checks*/{
1147
- return typeof num === 'number' && !isNaN(num);
1148
- }
1149
- function _int(a /*: string*/) /*: number*/{
1150
- return parseInt(a, 10);
1151
- }
1152
- function dontSetMe(props /*: Object*/, propName /*: string*/, componentName /*: string*/) /*: ?Error*/{
1153
- if (props[propName]) {
1154
- return new Error("Invalid prop ".concat(propName, " passed to ").concat(componentName, " - do not set this, set it on the child."));
1155
- }
1156
- }
1157
- var getPrefix$1 = {};
1158
- Object.defineProperty(getPrefix$1, "__esModule", {
1159
- value: true
1160
- });
1161
- getPrefix$1.browserPrefixToKey = browserPrefixToKey;
1162
- getPrefix$1.browserPrefixToStyle = browserPrefixToStyle;
1163
- getPrefix$1["default"] = void 0;
1164
- getPrefix$1.getPrefix = getPrefix;
1165
- var prefixes = ['Moz', 'Webkit', 'O', 'ms'];
1166
- function getPrefix() /*: string*/{
1167
- var _window$document;
1168
- var prop /*: string*/ = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'transform';
1169
- // Ensure we're running in an environment where there is actually a global
1170
- // `window` obj
1171
- if (typeof window === 'undefined') return '';
1172
-
1173
- // If we're in a pseudo-browser server-side environment, this access
1174
- // path may not exist, so bail out if it doesn't.
1175
- var style = (_window$document = window.document) === null || _window$document === void 0 || (_window$document = _window$document.documentElement) === null || _window$document === void 0 ? void 0 : _window$document.style;
1176
- if (!style) return '';
1177
- if (prop in style) return '';
1178
- for (var i = 0; i < prefixes.length; i++) {
1179
- if (browserPrefixToKey(prop, prefixes[i]) in style) return prefixes[i];
1180
- }
1181
- return '';
1182
- }
1183
- function browserPrefixToKey(prop /*: string*/, prefix /*: string*/) /*: string*/{
1184
- return prefix ? "".concat(prefix).concat(kebabToTitleCase(prop)) : prop;
1185
- }
1186
- function browserPrefixToStyle(prop /*: string*/, prefix /*: string*/) /*: string*/{
1187
- return prefix ? "-".concat(prefix.toLowerCase(), "-").concat(prop) : prop;
1188
- }
1189
- function kebabToTitleCase(str /*: string*/) /*: string*/{
1190
- var out = '';
1191
- var shouldCapitalize = true;
1192
- for (var i = 0; i < str.length; i++) {
1193
- if (shouldCapitalize) {
1194
- out += str[i].toUpperCase();
1195
- shouldCapitalize = false;
1196
- } else if (str[i] === '-') {
1197
- shouldCapitalize = true;
1198
- } else {
1199
- out += str[i];
1200
- }
1201
- }
1202
- return out;
1203
- }
1204
-
1205
- // Default export is the prefix itself, like 'Moz', 'Webkit', etc
1206
- // Note that you may have to re-test for certain things; for instance, Chrome 50
1207
- // can handle unprefixed `transform`, but not unprefixed `user-select`
1208
- getPrefix$1["default"] = getPrefix() /*: string*/;
1209
- Object.defineProperty(domFns, "__esModule", {
1210
- value: true
1211
- });
1212
- domFns.addClassName = addClassName;
1213
- domFns.addEvent = addEvent;
1214
- domFns.addUserSelectStyles = addUserSelectStyles;
1215
- domFns.createCSSTransform = createCSSTransform;
1216
- domFns.createSVGTransform = createSVGTransform;
1217
- domFns.getTouch = getTouch;
1218
- domFns.getTouchIdentifier = getTouchIdentifier;
1219
- domFns.getTranslation = getTranslation;
1220
- domFns.innerHeight = innerHeight;
1221
- domFns.innerWidth = innerWidth;
1222
- domFns.matchesSelector = matchesSelector;
1223
- domFns.matchesSelectorAndParentsTo = matchesSelectorAndParentsTo;
1224
- domFns.offsetXYFromParent = offsetXYFromParent;
1225
- domFns.outerHeight = outerHeight;
1226
- domFns.outerWidth = outerWidth;
1227
- domFns.removeClassName = removeClassName;
1228
- domFns.removeEvent = removeEvent;
1229
- domFns.removeUserSelectStyles = removeUserSelectStyles;
1230
- var _shims$2 = shims;
1231
- var _getPrefix = _interopRequireWildcard$3(getPrefix$1);
1232
- function _getRequireWildcardCache$3(nodeInterop) {
1233
- if (typeof WeakMap !== "function") return null;
1234
- var cacheBabelInterop = new WeakMap();
1235
- var cacheNodeInterop = new WeakMap();
1236
- return (_getRequireWildcardCache$3 = function _getRequireWildcardCache$3(nodeInterop) {
1237
- return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
1238
- })(nodeInterop);
1239
- }
1240
- function _interopRequireWildcard$3(obj, nodeInterop) {
1241
- if (!nodeInterop && obj && obj.__esModule) {
1242
- return obj;
1243
- }
1244
- if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") {
1245
- return {
1246
- "default": obj
1247
- };
1248
- }
1249
- var cache = _getRequireWildcardCache$3(nodeInterop);
1250
- if (cache && cache.has(obj)) {
1251
- return cache.get(obj);
1252
- }
1253
- var newObj = {};
1254
- var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
1255
- for (var key in obj) {
1256
- if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
1257
- var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
1258
- if (desc && (desc.get || desc.set)) {
1259
- Object.defineProperty(newObj, key, desc);
1260
- } else {
1261
- newObj[key] = obj[key];
1262
- }
1263
- }
1264
- }
1265
- newObj["default"] = obj;
1266
- if (cache) {
1267
- cache.set(obj, newObj);
1268
- }
1269
- return newObj;
1270
- }
1271
- /*:: import type {ControlPosition, PositionOffsetControlPosition, MouseTouchEvent} from './types';*/
1272
- var matchesSelectorFunc = '';
1273
- function matchesSelector(el /*: Node*/, selector /*: string*/) /*: boolean*/{
1274
- if (!matchesSelectorFunc) {
1275
- matchesSelectorFunc = (0, _shims$2.findInArray)(['matches', 'webkitMatchesSelector', 'mozMatchesSelector', 'msMatchesSelector', 'oMatchesSelector'], function (method) {
1276
- // $FlowIgnore: Doesn't think elements are indexable
1277
- return (0, _shims$2.isFunction)(el[method]);
1278
- });
1279
- }
1280
-
1281
- // Might not be found entirely (not an Element?) - in that case, bail
1282
- // $FlowIgnore: Doesn't think elements are indexable
1283
- if (!(0, _shims$2.isFunction)(el[matchesSelectorFunc])) return false;
1284
-
1285
- // $FlowIgnore: Doesn't think elements are indexable
1286
- return el[matchesSelectorFunc](selector);
1287
- }
1288
-
1289
- // Works up the tree to the draggable itself attempting to match selector.
1290
- function matchesSelectorAndParentsTo(el /*: Node*/, selector /*: string*/, baseNode /*: Node*/) /*: boolean*/{
1291
- var node = el;
1292
- do {
1293
- if (matchesSelector(node, selector)) return true;
1294
- if (node === baseNode) return false;
1295
- // $FlowIgnore[incompatible-type]
1296
- node = node.parentNode;
1297
- } while (node);
1298
- return false;
1299
- }
1300
- function addEvent(el /*: ?Node*/, event /*: string*/, handler /*: Function*/, inputOptions /*: Object*/) /*: void*/{
1301
- if (!el) return;
1302
- var options = _objectSpread2({
1303
- capture: true
1304
- }, inputOptions);
1305
- // $FlowIgnore[method-unbinding]
1306
- if (el.addEventListener) {
1307
- el.addEventListener(event, handler, options);
1308
- } else if (el.attachEvent) {
1309
- el.attachEvent('on' + event, handler);
1310
- } else {
1311
- // $FlowIgnore: Doesn't think elements are indexable
1312
- el['on' + event] = handler;
1313
- }
1314
- }
1315
- function removeEvent(el /*: ?Node*/, event /*: string*/, handler /*: Function*/, inputOptions /*: Object*/) /*: void*/{
1316
- if (!el) return;
1317
- var options = _objectSpread2({
1318
- capture: true
1319
- }, inputOptions);
1320
- // $FlowIgnore[method-unbinding]
1321
- if (el.removeEventListener) {
1322
- el.removeEventListener(event, handler, options);
1323
- } else if (el.detachEvent) {
1324
- el.detachEvent('on' + event, handler);
1325
- } else {
1326
- // $FlowIgnore: Doesn't think elements are indexable
1327
- el['on' + event] = null;
1328
- }
1329
- }
1330
- function outerHeight(node /*: HTMLElement*/) /*: number*/{
1331
- // This is deliberately excluding margin for our calculations, since we are using
1332
- // offsetTop which is including margin. See getBoundPosition
1333
- var height = node.clientHeight;
1334
- var computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);
1335
- height += (0, _shims$2["int"])(computedStyle.borderTopWidth);
1336
- height += (0, _shims$2["int"])(computedStyle.borderBottomWidth);
1337
- return height;
1338
- }
1339
- function outerWidth(node /*: HTMLElement*/) /*: number*/{
1340
- // This is deliberately excluding margin for our calculations, since we are using
1341
- // offsetLeft which is including margin. See getBoundPosition
1342
- var width = node.clientWidth;
1343
- var computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);
1344
- width += (0, _shims$2["int"])(computedStyle.borderLeftWidth);
1345
- width += (0, _shims$2["int"])(computedStyle.borderRightWidth);
1346
- return width;
1347
- }
1348
- function innerHeight(node /*: HTMLElement*/) /*: number*/{
1349
- var height = node.clientHeight;
1350
- var computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);
1351
- height -= (0, _shims$2["int"])(computedStyle.paddingTop);
1352
- height -= (0, _shims$2["int"])(computedStyle.paddingBottom);
1353
- return height;
1354
- }
1355
- function innerWidth(node /*: HTMLElement*/) /*: number*/{
1356
- var width = node.clientWidth;
1357
- var computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);
1358
- width -= (0, _shims$2["int"])(computedStyle.paddingLeft);
1359
- width -= (0, _shims$2["int"])(computedStyle.paddingRight);
1360
- return width;
1361
- }
1362
- /*:: interface EventWithOffset {
1363
- clientX: number, clientY: number
1364
- }*/
1365
- // Get from offsetParent
1366
- function offsetXYFromParent(evt /*: EventWithOffset*/, offsetParent /*: HTMLElement*/, scale /*: number*/) /*: ControlPosition*/{
1367
- var isBody = offsetParent === offsetParent.ownerDocument.body;
1368
- var offsetParentRect = isBody ? {
1369
- left: 0,
1370
- top: 0
1371
- } : offsetParent.getBoundingClientRect();
1372
- var x = (evt.clientX + offsetParent.scrollLeft - offsetParentRect.left) / scale;
1373
- var y = (evt.clientY + offsetParent.scrollTop - offsetParentRect.top) / scale;
1374
- return {
1375
- x: x,
1376
- y: y
1377
- };
1378
- }
1379
- function createCSSTransform(controlPos /*: ControlPosition*/, positionOffset /*: PositionOffsetControlPosition*/) /*: Object*/{
1380
- var translation = getTranslation(controlPos, positionOffset, 'px');
1381
- return _defineProperty2({}, (0, _getPrefix.browserPrefixToKey)('transform', _getPrefix["default"]), translation);
1382
- }
1383
- function createSVGTransform(controlPos /*: ControlPosition*/, positionOffset /*: PositionOffsetControlPosition*/) /*: string*/{
1384
- var translation = getTranslation(controlPos, positionOffset, '');
1385
- return translation;
1386
- }
1387
- function getTranslation(_ref /*:: */, positionOffset /*: PositionOffsetControlPosition*/, unitSuffix /*: string*/) /*: string*/{
1388
- var x = _ref.x,
1389
- y = _ref.y;
1390
- var translation = "translate(".concat(x).concat(unitSuffix, ",").concat(y).concat(unitSuffix, ")");
1391
- if (positionOffset) {
1392
- var defaultX = "".concat(typeof positionOffset.x === 'string' ? positionOffset.x : positionOffset.x + unitSuffix);
1393
- var defaultY = "".concat(typeof positionOffset.y === 'string' ? positionOffset.y : positionOffset.y + unitSuffix);
1394
- translation = "translate(".concat(defaultX, ", ").concat(defaultY, ")") + translation;
1395
- }
1396
- return translation;
1397
- }
1398
- function getTouch(e /*: MouseTouchEvent*/, identifier /*: number*/) /*: ?{clientX: number, clientY: number}*/{
1399
- return e.targetTouches && (0, _shims$2.findInArray)(e.targetTouches, function (t) {
1400
- return identifier === t.identifier;
1401
- }) || e.changedTouches && (0, _shims$2.findInArray)(e.changedTouches, function (t) {
1402
- return identifier === t.identifier;
1403
- });
1404
- }
1405
- function getTouchIdentifier(e /*: MouseTouchEvent*/) /*: ?number*/{
1406
- if (e.targetTouches && e.targetTouches[0]) return e.targetTouches[0].identifier;
1407
- if (e.changedTouches && e.changedTouches[0]) return e.changedTouches[0].identifier;
1408
- }
1409
-
1410
- // User-select Hacks:
1411
- //
1412
- // Useful for preventing blue highlights all over everything when dragging.
1413
-
1414
- // Note we're passing `document` b/c we could be iframed
1415
- function addUserSelectStyles(doc /*: ?Document*/) {
1416
- if (!doc) return;
1417
- var styleEl = doc.getElementById('react-draggable-style-el');
1418
- if (!styleEl) {
1419
- styleEl = doc.createElement('style');
1420
- styleEl.type = 'text/css';
1421
- styleEl.id = 'react-draggable-style-el';
1422
- styleEl.innerHTML = '.react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n';
1423
- styleEl.innerHTML += '.react-draggable-transparent-selection *::selection {all: inherit;}\n';
1424
- doc.getElementsByTagName('head')[0].appendChild(styleEl);
1425
- }
1426
- if (doc.body) addClassName(doc.body, 'react-draggable-transparent-selection');
1427
- }
1428
- function removeUserSelectStyles(doc /*: ?Document*/) {
1429
- if (!doc) return;
1430
- try {
1431
- if (doc.body) removeClassName(doc.body, 'react-draggable-transparent-selection');
1432
- // $FlowIgnore: IE
1433
- if (doc.selection) {
1434
- // $FlowIgnore: IE
1435
- doc.selection.empty();
1436
- } else {
1437
- // Remove selection caused by scroll, unless it's a focused input
1438
- // (we use doc.defaultView in case we're in an iframe)
1439
- var selection = (doc.defaultView || window).getSelection();
1440
- if (selection && selection.type !== 'Caret') {
1441
- selection.removeAllRanges();
1442
- }
1443
- }
1444
- } catch (e) {
1445
- // probably IE
1446
- }
1447
- }
1448
- function addClassName(el /*: HTMLElement*/, className /*: string*/) {
1449
- if (el.classList) {
1450
- el.classList.add(className);
1451
- } else {
1452
- if (!el.className.match(new RegExp("(?:^|\\s)".concat(className, "(?!\\S)")))) {
1453
- el.className += " ".concat(className);
1454
- }
1455
- }
1456
- }
1457
- function removeClassName(el /*: HTMLElement*/, className /*: string*/) {
1458
- if (el.classList) {
1459
- el.classList.remove(className);
1460
- } else {
1461
- el.className = el.className.replace(new RegExp("(?:^|\\s)".concat(className, "(?!\\S)"), 'g'), '');
1462
- }
1463
- }
1464
- var positionFns = {};
1465
- Object.defineProperty(positionFns, "__esModule", {
1466
- value: true
1467
- });
1468
- positionFns.canDragX = canDragX;
1469
- positionFns.canDragY = canDragY;
1470
- positionFns.createCoreData = createCoreData;
1471
- positionFns.createDraggableData = createDraggableData;
1472
- positionFns.getBoundPosition = getBoundPosition;
1473
- positionFns.getControlPosition = getControlPosition;
1474
- positionFns.snapToGrid = snapToGrid;
1475
- var _shims$1 = shims;
1476
- var _domFns$1 = domFns;
1477
- /*:: import type Draggable from '../Draggable';*/
1478
- /*:: import type {Bounds, ControlPosition, DraggableData, MouseTouchEvent} from './types';*/
1479
- /*:: import type DraggableCore from '../DraggableCore';*/
1480
- function getBoundPosition(draggable /*: Draggable*/, x /*: number*/, y /*: number*/) /*: [number, number]*/{
1481
- // If no bounds, short-circuit and move on
1482
- if (!draggable.props.bounds) return [x, y];
1483
-
1484
- // Clone new bounds
1485
- var bounds = draggable.props.bounds;
1486
- bounds = typeof bounds === 'string' ? bounds : cloneBounds(bounds);
1487
- var node = findDOMNode(draggable);
1488
- if (typeof bounds === 'string') {
1489
- var ownerDocument = node.ownerDocument;
1490
- var ownerWindow = ownerDocument.defaultView;
1491
- var boundNode;
1492
- if (bounds === 'parent') {
1493
- boundNode = node.parentNode;
1494
- } else {
1495
- boundNode = ownerDocument.querySelector(bounds);
1496
- }
1497
- if (!(boundNode instanceof ownerWindow.HTMLElement)) {
1498
- throw new Error('Bounds selector "' + bounds + '" could not find an element.');
1499
- }
1500
- var boundNodeEl /*: HTMLElement*/ = boundNode; // for Flow, can't seem to refine correctly
1501
- var nodeStyle = ownerWindow.getComputedStyle(node);
1502
- var boundNodeStyle = ownerWindow.getComputedStyle(boundNodeEl);
1503
- // Compute bounds. This is a pain with padding and offsets but this gets it exactly right.
1504
- bounds = {
1505
- left: -node.offsetLeft + (0, _shims$1["int"])(boundNodeStyle.paddingLeft) + (0, _shims$1["int"])(nodeStyle.marginLeft),
1506
- top: -node.offsetTop + (0, _shims$1["int"])(boundNodeStyle.paddingTop) + (0, _shims$1["int"])(nodeStyle.marginTop),
1507
- right: (0, _domFns$1.innerWidth)(boundNodeEl) - (0, _domFns$1.outerWidth)(node) - node.offsetLeft + (0, _shims$1["int"])(boundNodeStyle.paddingRight) - (0, _shims$1["int"])(nodeStyle.marginRight),
1508
- bottom: (0, _domFns$1.innerHeight)(boundNodeEl) - (0, _domFns$1.outerHeight)(node) - node.offsetTop + (0, _shims$1["int"])(boundNodeStyle.paddingBottom) - (0, _shims$1["int"])(nodeStyle.marginBottom)
1509
- };
1510
- }
1511
-
1512
- // Keep x and y below right and bottom limits...
1513
- if ((0, _shims$1.isNum)(bounds.right)) x = Math.min(x, bounds.right);
1514
- if ((0, _shims$1.isNum)(bounds.bottom)) y = Math.min(y, bounds.bottom);
1515
-
1516
- // But above left and top limits.
1517
- if ((0, _shims$1.isNum)(bounds.left)) x = Math.max(x, bounds.left);
1518
- if ((0, _shims$1.isNum)(bounds.top)) y = Math.max(y, bounds.top);
1519
- return [x, y];
1520
- }
1521
- function snapToGrid(grid /*: [number, number]*/, pendingX /*: number*/, pendingY /*: number*/) /*: [number, number]*/{
1522
- var x = Math.round(pendingX / grid[0]) * grid[0];
1523
- var y = Math.round(pendingY / grid[1]) * grid[1];
1524
- return [x, y];
1525
- }
1526
- function canDragX(draggable /*: Draggable*/) /*: boolean*/{
1527
- return draggable.props.axis === 'both' || draggable.props.axis === 'x';
1528
- }
1529
- function canDragY(draggable /*: Draggable*/) /*: boolean*/{
1530
- return draggable.props.axis === 'both' || draggable.props.axis === 'y';
1531
- }
1532
-
1533
- // Get {x, y} positions from event.
1534
- function getControlPosition(e /*: MouseTouchEvent*/, touchIdentifier /*: ?number*/, draggableCore /*: DraggableCore*/) /*: ?ControlPosition*/{
1535
- var touchObj = typeof touchIdentifier === 'number' ? (0, _domFns$1.getTouch)(e, touchIdentifier) : null;
1536
- if (typeof touchIdentifier === 'number' && !touchObj) return null; // not the right touch
1537
- var node = findDOMNode(draggableCore);
1538
- // User can provide an offsetParent if desired.
1539
- var offsetParent = draggableCore.props.offsetParent || node.offsetParent || node.ownerDocument.body;
1540
- return (0, _domFns$1.offsetXYFromParent)(touchObj || e, offsetParent, draggableCore.props.scale);
1541
- }
1542
-
1543
- // Create an data object exposed by <DraggableCore>'s events
1544
- function createCoreData(draggable /*: DraggableCore*/, x /*: number*/, y /*: number*/) /*: DraggableData*/{
1545
- var isStart = !(0, _shims$1.isNum)(draggable.lastX);
1546
- var node = findDOMNode(draggable);
1547
- if (isStart) {
1548
- // If this is our first move, use the x and y as last coords.
1549
- return {
1550
- node: node,
1551
- deltaX: 0,
1552
- deltaY: 0,
1553
- lastX: x,
1554
- lastY: y,
1555
- x: x,
1556
- y: y
1557
- };
1558
- } else {
1559
- // Otherwise calculate proper values.
1560
- return {
1561
- node: node,
1562
- deltaX: x - draggable.lastX,
1563
- deltaY: y - draggable.lastY,
1564
- lastX: draggable.lastX,
1565
- lastY: draggable.lastY,
1566
- x: x,
1567
- y: y
1568
- };
1569
- }
1570
- }
1571
-
1572
- // Create an data exposed by <Draggable>'s events
1573
- function createDraggableData(draggable /*: Draggable*/, coreData /*: DraggableData*/) /*: DraggableData*/{
1574
- var scale = draggable.props.scale;
1575
- return {
1576
- node: coreData.node,
1577
- x: draggable.state.x + coreData.deltaX / scale,
1578
- y: draggable.state.y + coreData.deltaY / scale,
1579
- deltaX: coreData.deltaX / scale,
1580
- deltaY: coreData.deltaY / scale,
1581
- lastX: draggable.state.x,
1582
- lastY: draggable.state.y
1583
- };
1584
- }
1585
-
1586
- // A lot faster than stringify/parse
1587
- function cloneBounds(bounds /*: Bounds*/) /*: Bounds*/{
1588
- return {
1589
- left: bounds.left,
1590
- top: bounds.top,
1591
- right: bounds.right,
1592
- bottom: bounds.bottom
1593
- };
1594
- }
1595
- function findDOMNode(draggable /*: Draggable | DraggableCore*/) /*: HTMLElement*/{
1596
- var node = draggable.findDOMNode();
1597
- if (!node) {
1598
- throw new Error('<DraggableCore>: Unmounted during event!');
1599
- }
1600
- // $FlowIgnore we can't assert on HTMLElement due to tests... FIXME
1601
- return node;
1602
- }
1603
- var DraggableCore$2 = {};
1604
- var log$1 = {};
1605
- Object.defineProperty(log$1, "__esModule", {
1606
- value: true
1607
- });
1608
- log$1["default"] = log;
1609
- /*eslint no-console:0*/
1610
- function log() {}
1611
- Object.defineProperty(DraggableCore$2, "__esModule", {
1612
- value: true
1613
- });
1614
- DraggableCore$2["default"] = void 0;
1615
- var React$2 = _interopRequireWildcard$2(React$3);
1616
- var _propTypes$3 = _interopRequireDefault$3(propTypes$1.exports);
1617
- var _reactDom = _interopRequireDefault$3(require$$2);
1618
- var _domFns = domFns;
1619
- var _positionFns = positionFns;
1620
- var _shims = shims;
1621
- var _log = _interopRequireDefault$3(log$1);
1622
- function _interopRequireDefault$3(obj) {
1623
- return obj && obj.__esModule ? obj : {
1624
- "default": obj
1625
- };
1626
- }
1627
- function _getRequireWildcardCache$2(nodeInterop) {
1628
- if (typeof WeakMap !== "function") return null;
1629
- var cacheBabelInterop = new WeakMap();
1630
- var cacheNodeInterop = new WeakMap();
1631
- return (_getRequireWildcardCache$2 = function _getRequireWildcardCache$2(nodeInterop) {
1632
- return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
1633
- })(nodeInterop);
1634
- }
1635
- function _interopRequireWildcard$2(obj, nodeInterop) {
1636
- if (!nodeInterop && obj && obj.__esModule) {
1637
- return obj;
1638
- }
1639
- if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") {
1640
- return {
1641
- "default": obj
1642
- };
1643
- }
1644
- var cache = _getRequireWildcardCache$2(nodeInterop);
1645
- if (cache && cache.has(obj)) {
1646
- return cache.get(obj);
1647
- }
1648
- var newObj = {};
1649
- var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
1650
- for (var key in obj) {
1651
- if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
1652
- var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
1653
- if (desc && (desc.get || desc.set)) {
1654
- Object.defineProperty(newObj, key, desc);
1655
- } else {
1656
- newObj[key] = obj[key];
1657
- }
1658
- }
1659
- }
1660
- newObj["default"] = obj;
1661
- if (cache) {
1662
- cache.set(obj, newObj);
1663
- }
1664
- return newObj;
1665
- }
1666
- function _defineProperty$3(obj, key, value) {
1667
- key = _toPropertyKey(key);
1668
- if (key in obj) {
1669
- Object.defineProperty(obj, key, {
1670
- value: value,
1671
- enumerable: true,
1672
- configurable: true,
1673
- writable: true
1674
- });
1675
- } else {
1676
- obj[key] = value;
1677
- }
1678
- return obj;
1679
- }
1680
- function _toPropertyKey(arg) {
1681
- var key = _toPrimitive(arg, "string");
1682
- return _typeof(key) === "symbol" ? key : String(key);
1683
- }
1684
- function _toPrimitive(input, hint) {
1685
- if (_typeof(input) !== "object" || input === null) return input;
1686
- var prim = input[Symbol.toPrimitive];
1687
- if (prim !== undefined) {
1688
- var res = prim.call(input, hint || "default");
1689
- if (_typeof(res) !== "object") return res;
1690
- throw new TypeError("@@toPrimitive must return a primitive value.");
1691
- }
1692
- return (hint === "string" ? String : Number)(input);
1693
- }
1694
- /*:: import type {EventHandler, MouseTouchEvent} from './utils/types';*/
1695
- /*:: import type {Element as ReactElement} from 'react';*/
1696
- // Simple abstraction for dragging events names.
1697
- var eventsFor = {
1698
- touch: {
1699
- start: 'touchstart',
1700
- move: 'touchmove',
1701
- stop: 'touchend'
1702
- },
1703
- mouse: {
1704
- start: 'mousedown',
1705
- move: 'mousemove',
1706
- stop: 'mouseup'
1707
- }
1708
- };
1709
-
1710
- // Default to mouse events.
1711
- var dragEventFor = eventsFor.mouse;
1712
- /*:: export type DraggableData = {
1713
- node: HTMLElement,
1714
- x: number, y: number,
1715
- deltaX: number, deltaY: number,
1716
- lastX: number, lastY: number,
1717
- };*/
1718
- /*:: export type DraggableEventHandler = (e: MouseEvent, data: DraggableData) => void | false;*/
1719
- /*:: export type ControlPosition = {x: number, y: number};*/
1720
- /*:: export type PositionOffsetControlPosition = {x: number|string, y: number|string};*/
1721
- /*:: export type DraggableCoreDefaultProps = {
1722
- allowAnyClick: boolean,
1723
- disabled: boolean,
1724
- enableUserSelectHack: boolean,
1725
- onStart: DraggableEventHandler,
1726
- onDrag: DraggableEventHandler,
1727
- onStop: DraggableEventHandler,
1728
- onMouseDown: (e: MouseEvent) => void,
1729
- scale: number,
1730
- };*/
1731
- /*:: export type DraggableCoreProps = {
1732
- ...DraggableCoreDefaultProps,
1733
- cancel: string,
1734
- children: ReactElement<any>,
1735
- offsetParent: HTMLElement,
1736
- grid: [number, number],
1737
- handle: string,
1738
- nodeRef?: ?React.ElementRef<any>,
1739
- };*/
1740
- //
1741
- // Define <DraggableCore>.
1742
- //
1743
- // <DraggableCore> is for advanced usage of <Draggable>. It maintains minimal internal state so it can
1744
- // work well with libraries that require more control over the element.
1745
- //
1746
- var DraggableCore$1 = /*#__PURE__*/function (_React$2$Component) {
1747
- function DraggableCore$1() {
1748
- var _this4;
1749
- _classCallCheck(this, DraggableCore$1);
1750
- _this4 = _callSuper(this, DraggableCore$1, arguments);
1751
- _defineProperty$3(_this4, "dragging", false);
1752
- // Used while dragging to determine deltas.
1753
- _defineProperty$3(_this4, "lastX", NaN);
1754
- _defineProperty$3(_this4, "lastY", NaN);
1755
- _defineProperty$3(_this4, "touchIdentifier", null);
1756
- _defineProperty$3(_this4, "mounted", false);
1757
- _defineProperty$3(_this4, "handleDragStart", function (e) {
1758
- // Make it possible to attach event handlers on top of this one.
1759
- _this4.props.onMouseDown(e);
1760
-
1761
- // Only accept left-clicks.
1762
- if (!_this4.props.allowAnyClick && typeof e.button === 'number' && e.button !== 0) return false;
1763
-
1764
- // Get nodes. Be sure to grab relative document (could be iframed)
1765
- var thisNode = _this4.findDOMNode();
1766
- if (!thisNode || !thisNode.ownerDocument || !thisNode.ownerDocument.body) {
1767
- throw new Error('<DraggableCore> not mounted on DragStart!');
1768
- }
1769
- var ownerDocument = thisNode.ownerDocument;
1770
-
1771
- // Short circuit if handle or cancel prop was provided and selector doesn't match.
1772
- if (_this4.props.disabled || !(e.target instanceof ownerDocument.defaultView.Node) || _this4.props.handle && !(0, _domFns.matchesSelectorAndParentsTo)(e.target, _this4.props.handle, thisNode) || _this4.props.cancel && (0, _domFns.matchesSelectorAndParentsTo)(e.target, _this4.props.cancel, thisNode)) {
1773
- return;
1774
- }
1775
-
1776
- // Prevent scrolling on mobile devices, like ipad/iphone.
1777
- // Important that this is after handle/cancel.
1778
- if (e.type === 'touchstart') e.preventDefault();
1779
-
1780
- // Set touch identifier in component state if this is a touch event. This allows us to
1781
- // distinguish between individual touches on multitouch screens by identifying which
1782
- // touchpoint was set to this element.
1783
- var touchIdentifier = (0, _domFns.getTouchIdentifier)(e);
1784
- _this4.touchIdentifier = touchIdentifier;
1785
-
1786
- // Get the current drag point from the event. This is used as the offset.
1787
- var position = (0, _positionFns.getControlPosition)(e, touchIdentifier, _this4);
1788
- if (position == null) return; // not possible but satisfies flow
1789
- var x = position.x,
1790
- y = position.y;
1791
-
1792
- // Create an event object with all the data parents need to make a decision here.
1793
- var coreEvent = (0, _positionFns.createCoreData)(_this4, x, y);
1794
- (0, _log["default"])('DraggableCore: handleDragStart: %j', coreEvent);
1795
-
1796
- // Call event handler. If it returns explicit false, cancel.
1797
- (0, _log["default"])('calling', _this4.props.onStart);
1798
- var shouldUpdate = _this4.props.onStart(e, coreEvent);
1799
- if (shouldUpdate === false || _this4.mounted === false) return;
1800
-
1801
- // Add a style to the body to disable user-select. This prevents text from
1802
- // being selected all over the page.
1803
- if (_this4.props.enableUserSelectHack) (0, _domFns.addUserSelectStyles)(ownerDocument);
1804
-
1805
- // Initiate dragging. Set the current x and y as offsets
1806
- // so we know how much we've moved during the drag. This allows us
1807
- // to drag elements around even if they have been moved, without issue.
1808
- _this4.dragging = true;
1809
- _this4.lastX = x;
1810
- _this4.lastY = y;
1811
-
1812
- // Add events to the document directly so we catch when the user's mouse/touch moves outside of
1813
- // this element. We use different events depending on whether or not we have detected that this
1814
- // is a touch-capable device.
1815
- (0, _domFns.addEvent)(ownerDocument, dragEventFor.move, _this4.handleDrag);
1816
- (0, _domFns.addEvent)(ownerDocument, dragEventFor.stop, _this4.handleDragStop);
1817
- });
1818
- _defineProperty$3(_this4, "handleDrag", function (e) {
1819
- // Get the current drag point from the event. This is used as the offset.
1820
- var position = (0, _positionFns.getControlPosition)(e, _this4.touchIdentifier, _this4);
1821
- if (position == null) return;
1822
- var x = position.x,
1823
- y = position.y;
1824
-
1825
- // Snap to grid if prop has been provided
1826
- if (Array.isArray(_this4.props.grid)) {
1827
- var deltaX = x - _this4.lastX,
1828
- deltaY = y - _this4.lastY;
1829
- var _ref4 = (0, _positionFns.snapToGrid)(_this4.props.grid, deltaX, deltaY);
1830
- var _ref5 = _slicedToArray(_ref4, 2);
1831
- deltaX = _ref5[0];
1832
- deltaY = _ref5[1];
1833
- if (!deltaX && !deltaY) return; // skip useless drag
1834
- x = _this4.lastX + deltaX, y = _this4.lastY + deltaY;
1835
- }
1836
- var coreEvent = (0, _positionFns.createCoreData)(_this4, x, y);
1837
- (0, _log["default"])('DraggableCore: handleDrag: %j', coreEvent);
1838
-
1839
- // Call event handler. If it returns explicit false, trigger end.
1840
- var shouldUpdate = _this4.props.onDrag(e, coreEvent);
1841
- if (shouldUpdate === false || _this4.mounted === false) {
1842
- try {
1843
- // $FlowIgnore
1844
- _this4.handleDragStop(new MouseEvent('mouseup'));
1845
- } catch (err) {
1846
- // Old browsers
1847
- var event = document.createEvent('MouseEvents') /*: any*/ /*: MouseTouchEvent*/;
1848
- // I see why this insanity was deprecated
1849
- // $FlowIgnore
1850
- event.initMouseEvent('mouseup', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
1851
- _this4.handleDragStop(event);
1852
- }
1853
- return;
1854
- }
1855
- _this4.lastX = x;
1856
- _this4.lastY = y;
1857
- });
1858
- _defineProperty$3(_this4, "handleDragStop", function (e) {
1859
- if (!_this4.dragging) return;
1860
- var position = (0, _positionFns.getControlPosition)(e, _this4.touchIdentifier, _this4);
1861
- if (position == null) return;
1862
- var x = position.x,
1863
- y = position.y;
1864
-
1865
- // Snap to grid if prop has been provided
1866
- if (Array.isArray(_this4.props.grid)) {
1867
- var deltaX = x - _this4.lastX || 0;
1868
- var deltaY = y - _this4.lastY || 0;
1869
- var _ref6 = (0, _positionFns.snapToGrid)(_this4.props.grid, deltaX, deltaY);
1870
- var _ref7 = _slicedToArray(_ref6, 2);
1871
- deltaX = _ref7[0];
1872
- deltaY = _ref7[1];
1873
- x = _this4.lastX + deltaX, y = _this4.lastY + deltaY;
1874
- }
1875
- var coreEvent = (0, _positionFns.createCoreData)(_this4, x, y);
1876
-
1877
- // Call event handler
1878
- var shouldContinue = _this4.props.onStop(e, coreEvent);
1879
- if (shouldContinue === false || _this4.mounted === false) return false;
1880
- var thisNode = _this4.findDOMNode();
1881
- if (thisNode) {
1882
- // Remove user-select hack
1883
- if (_this4.props.enableUserSelectHack) (0, _domFns.removeUserSelectStyles)(thisNode.ownerDocument);
1884
- }
1885
- (0, _log["default"])('DraggableCore: handleDragStop: %j', coreEvent);
1886
-
1887
- // Reset the el.
1888
- _this4.dragging = false;
1889
- _this4.lastX = NaN;
1890
- _this4.lastY = NaN;
1891
- if (thisNode) {
1892
- // Remove event handlers
1893
- (0, _log["default"])('DraggableCore: Removing handlers');
1894
- (0, _domFns.removeEvent)(thisNode.ownerDocument, dragEventFor.move, _this4.handleDrag);
1895
- (0, _domFns.removeEvent)(thisNode.ownerDocument, dragEventFor.stop, _this4.handleDragStop);
12
+ 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; }
13
+ 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; }
14
+ import { MyIcon } from '@lm_fe/components';
15
+ import { Form, Tabs } from 'antd';
16
+ import { map, get, set, cloneDeep, keys } from 'lodash';
17
+ import React$1, { Component } from 'react';
18
+ import { request, safe_json_parse } from '@lm_fe/utils';
19
+ import { SMchc_FormDescriptions } from '@lm_fe/service';
20
+ import { a5 as BaseEditPanelForm, a6 as formItemLayout, a7 as BaseEditPanel, a8 as formDescriptionsWithoutSectionApi } from './index.js';
21
+ import dayjs from 'dayjs';
22
+ import '@lm_fe/provoke';
23
+ import 'classnames';
24
+ import '@lm_fe/env';
25
+ import 'reconnecting-websocket';
26
+ import 'store';
27
+
28
+ // 获取公开项目的数据字典
29
+ function getTreatmentProgramDict() {
30
+ return _getTreatmentProgramDict.apply(this, arguments);
31
+ } // import { formatTimeToStandardApi } from '@/utils/format';
32
+ function _getTreatmentProgramDict() {
33
+ _getTreatmentProgramDict = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
34
+ var res, ProgramDictObj;
35
+ return _regeneratorRuntime.wrap(function _callee3$(_context3) {
36
+ while (1) switch (_context3.prev = _context3.next) {
37
+ case 0:
38
+ _context3.next = 2;
39
+ return request.get("/api/postpartum/treatment/getOpenTreatmentProgram");
40
+ case 2:
41
+ res = _context3.sent;
42
+ ProgramDictObj = {};
43
+ res.data.map(function (program) {
44
+ ProgramDictObj[program.projectName] = program.id;
45
+ });
46
+ return _context3.abrupt("return", ProgramDictObj);
47
+ case 6:
48
+ case "end":
49
+ return _context3.stop();
1896
50
  }
51
+ }, _callee3);
52
+ }));
53
+ return _getTreatmentProgramDict.apply(this, arguments);
54
+ }
55
+ var toApi = function toApi(data, programDict) {
56
+ return map(data, function (item) {
57
+ return _objectSpread(_objectSpread({}, item), {}, {
58
+ projectId: programDict[item.projectName]
1897
59
  });
1898
- _defineProperty$3(_this4, "onMouseDown", function (e) {
1899
- dragEventFor = eventsFor.mouse; // on touchscreen laptops we could switch back to mouse
1900
-
1901
- return _this4.handleDragStart(e);
1902
- });
1903
- _defineProperty$3(_this4, "onMouseUp", function (e) {
1904
- dragEventFor = eventsFor.mouse;
1905
- return _this4.handleDragStop(e);
1906
- });
1907
- // Same as onMouseDown (start drag), but now consider this a touch device.
1908
- _defineProperty$3(_this4, "onTouchStart", function (e) {
1909
- // We're on a touch device now, so change the event handlers
1910
- dragEventFor = eventsFor.touch;
1911
- return _this4.handleDragStart(e);
1912
- });
1913
- _defineProperty$3(_this4, "onTouchEnd", function (e) {
1914
- // We're on a touch device now, so change the event handlers
1915
- dragEventFor = eventsFor.touch;
1916
- return _this4.handleDragStop(e);
1917
- });
1918
- return _this4;
1919
- }
1920
- _inherits(DraggableCore$1, _React$2$Component);
1921
- return _createClass(DraggableCore$1, [{
1922
- key: "componentDidMount",
1923
- value: function componentDidMount() {
1924
- this.mounted = true;
1925
- // Touch handlers must be added with {passive: false} to be cancelable.
1926
- // https://developers.google.com/web/updates/2017/01/scrolling-intervention
1927
- var thisNode = this.findDOMNode();
1928
- if (thisNode) {
1929
- (0, _domFns.addEvent)(thisNode, eventsFor.touch.start, this.onTouchStart, {
1930
- passive: false
1931
- });
1932
- }
60
+ });
61
+ };
62
+ var fromApi = function fromApi(data, nativeFormDescriptions) {
63
+ var result = _objectSpread({}, data);
64
+ map(nativeFormDescriptions, function (desctiption, key) {
65
+ var tranferRules = desctiption.tranfer_rules;
66
+ var type = 'default';
67
+ var path = key;
68
+ if (safe_json_parse(tranferRules)) {
69
+ var tranferRulesJson = safe_json_parse(tranferRules);
70
+ type = get(tranferRulesJson, 'type') ? get(tranferRulesJson, 'type') : 'default';
71
+ path = get(tranferRulesJson, 'path') ? get(tranferRulesJson, 'path') : key;
1933
72
  }
1934
- }, {
1935
- key: "componentWillUnmount",
1936
- value: function componentWillUnmount() {
1937
- this.mounted = false;
1938
- // Remove any leftover event handlers. Remove both touch and mouse handlers in case
1939
- // some browser quirk caused a touch event to fire during a mouse move, or vice versa.
1940
- var thisNode = this.findDOMNode();
1941
- if (thisNode) {
1942
- var ownerDocument = thisNode.ownerDocument;
1943
- (0, _domFns.removeEvent)(ownerDocument, eventsFor.mouse.move, this.handleDrag);
1944
- (0, _domFns.removeEvent)(ownerDocument, eventsFor.touch.move, this.handleDrag);
1945
- (0, _domFns.removeEvent)(ownerDocument, eventsFor.mouse.stop, this.handleDragStop);
1946
- (0, _domFns.removeEvent)(ownerDocument, eventsFor.touch.stop, this.handleDragStop);
1947
- (0, _domFns.removeEvent)(thisNode, eventsFor.touch.start, this.onTouchStart, {
1948
- passive: false
73
+ switch (type) {
74
+ case 'key_and_keyNote':
75
+ set(result, "".concat(key, ".key"), get(data, path));
76
+ set(result, "".concat(key, ".keyNote"), get(data, "".concat(path, "Note")));
77
+ break;
78
+ case 'stage':
79
+ set(result, "".concat(key, ".0"), get(data, "".concat(key, "h")));
80
+ set(result, "".concat(key, ".1"), get(data, "".concat(key, "m")));
81
+ break;
82
+ case 'apgar':
83
+ map(data, function (record, index) {
84
+ if (index.indexOf('apgar') > -1) {
85
+ set(result, "".concat(key, ".").concat(index), record);
86
+ }
1949
87
  });
1950
- if (this.props.enableUserSelectHack) (0, _domFns.removeUserSelectStyles)(ownerDocument);
1951
- }
1952
- }
1953
-
1954
- // React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find
1955
- // the underlying DOM node ourselves. See the README for more information.
1956
- }, {
1957
- key: "findDOMNode",
1958
- value: function findDOMNode() /*: ?HTMLElement*/{
1959
- var _this$props, _this$props2;
1960
- return (_this$props = this.props) !== null && _this$props !== void 0 && _this$props.nodeRef ? (_this$props2 = this.props) === null || _this$props2 === void 0 || (_this$props2 = _this$props2.nodeRef) === null || _this$props2 === void 0 ? void 0 : _this$props2.current : _reactDom["default"].findDOMNode(this);
1961
- }
1962
- }, {
1963
- key: "render",
1964
- value: function render() /*: React.Element<any>*/{
1965
- // Reuse the child provided
1966
- // This makes it flexible to use whatever element is wanted (div, ul, etc)
1967
- return /*#__PURE__*/React$2.cloneElement(React$2.Children.only(this.props.children), {
1968
- // Note: mouseMove handler is attached to document so it will still function
1969
- // when the user drags quickly and leaves the bounds of the element.
1970
- onMouseDown: this.onMouseDown,
1971
- onMouseUp: this.onMouseUp,
1972
- // onTouchStart is added on `componentDidMount` so they can be added with
1973
- // {passive: false}, which allows it to cancel. See
1974
- // https://developers.google.com/web/updates/2017/01/scrolling-intervention
1975
- onTouchEnd: this.onTouchEnd
1976
- });
1977
- }
1978
- }]);
1979
- }(React$2.Component /*:: <DraggableCoreProps>*/);
1980
- DraggableCore$2["default"] = DraggableCore$1;
1981
- _defineProperty$3(DraggableCore$1, "displayName", 'DraggableCore');
1982
- _defineProperty$3(DraggableCore$1, "propTypes", {
1983
- /**
1984
- * `allowAnyClick` allows dragging using any mouse button.
1985
- * By default, we only accept the left button.
1986
- *
1987
- * Defaults to `false`.
1988
- */
1989
- allowAnyClick: _propTypes$3["default"].bool,
1990
- children: _propTypes$3["default"].node.isRequired,
1991
- /**
1992
- * `disabled`, if true, stops the <Draggable> from dragging. All handlers,
1993
- * with the exception of `onMouseDown`, will not fire.
1994
- */
1995
- disabled: _propTypes$3["default"].bool,
1996
- /**
1997
- * By default, we add 'user-select:none' attributes to the document body
1998
- * to prevent ugly text selection during drag. If this is causing problems
1999
- * for your app, set this to `false`.
2000
- */
2001
- enableUserSelectHack: _propTypes$3["default"].bool,
2002
- /**
2003
- * `offsetParent`, if set, uses the passed DOM node to compute drag offsets
2004
- * instead of using the parent node.
2005
- */
2006
- offsetParent: function offsetParent(props /*: DraggableCoreProps*/, propName /*: $Keys<DraggableCoreProps>*/) {
2007
- if (props[propName] && props[propName].nodeType !== 1) {
2008
- throw new Error('Draggable\'s offsetParent must be a DOM Node.');
88
+ break;
89
+ case 'moment':
90
+ set(result, key, get(data, path) ? dayjs(get(data, path)) : undefined);
91
+ break;
92
+ case 'default':
93
+ default:
94
+ set(result, key, get(data, path));
95
+ break;
2009
96
  }
2010
- },
2011
- /**
2012
- * `grid` specifies the x and y that dragging should snap to.
2013
- */
2014
- grid: _propTypes$3["default"].arrayOf(_propTypes$3["default"].number),
2015
- /**
2016
- * `handle` specifies a selector to be used as the handle that initiates drag.
2017
- *
2018
- * Example:
2019
- *
2020
- * ```jsx
2021
- * let App = React.createClass({
2022
- * render: function () {
2023
- * return (
2024
- * <Draggable handle=".handle">
2025
- * <div>
2026
- * <div className="handle">Click me to drag</div>
2027
- * <div>This is some other content</div>
2028
- * </div>
2029
- * </Draggable>
2030
- * );
2031
- * }
2032
- * });
2033
- * ```
2034
- */
2035
- handle: _propTypes$3["default"].string,
2036
- /**
2037
- * `cancel` specifies a selector to be used to prevent drag initialization.
2038
- *
2039
- * Example:
2040
- *
2041
- * ```jsx
2042
- * let App = React.createClass({
2043
- * render: function () {
2044
- * return(
2045
- * <Draggable cancel=".cancel">
2046
- * <div>
2047
- * <div className="cancel">You can't drag from here</div>
2048
- * <div>Dragging here works fine</div>
2049
- * </div>
2050
- * </Draggable>
2051
- * );
2052
- * }
2053
- * });
2054
- * ```
2055
- */
2056
- cancel: _propTypes$3["default"].string,
2057
- /* If running in React Strict mode, ReactDOM.findDOMNode() is deprecated.
2058
- * Unfortunately, in order for <Draggable> to work properly, we need raw access
2059
- * to the underlying DOM node. If you want to avoid the warning, pass a `nodeRef`
2060
- * as in this example:
2061
- *
2062
- * function MyComponent() {
2063
- * const nodeRef = React.useRef(null);
2064
- * return (
2065
- * <Draggable nodeRef={nodeRef}>
2066
- * <div ref={nodeRef}>Example Target</div>
2067
- * </Draggable>
2068
- * );
2069
- * }
2070
- *
2071
- * This can be used for arbitrarily nested components, so long as the ref ends up
2072
- * pointing to the actual child DOM node and not a custom component.
2073
- */
2074
- nodeRef: _propTypes$3["default"].object,
2075
- /**
2076
- * Called when dragging starts.
2077
- * If this function returns the boolean false, dragging will be canceled.
2078
- */
2079
- onStart: _propTypes$3["default"].func,
2080
- /**
2081
- * Called while dragging.
2082
- * If this function returns the boolean false, dragging will be canceled.
2083
- */
2084
- onDrag: _propTypes$3["default"].func,
2085
- /**
2086
- * Called when dragging stops.
2087
- * If this function returns the boolean false, the drag will remain active.
2088
- */
2089
- onStop: _propTypes$3["default"].func,
2090
- /**
2091
- * A workaround option which can be passed if onMouseDown needs to be accessed,
2092
- * since it'll always be blocked (as there is internal use of onMouseDown)
2093
- */
2094
- onMouseDown: _propTypes$3["default"].func,
2095
- /**
2096
- * `scale`, if set, applies scaling while dragging an element
2097
- */
2098
- scale: _propTypes$3["default"].number,
2099
- /**
2100
- * These properties should be defined on the child, not here.
2101
- */
2102
- className: _shims.dontSetMe,
2103
- style: _shims.dontSetMe,
2104
- transform: _shims.dontSetMe
2105
- });
2106
- _defineProperty$3(DraggableCore$1, "defaultProps", {
2107
- allowAnyClick: false,
2108
- // by default only accept left click
2109
- disabled: false,
2110
- enableUserSelectHack: true,
2111
- onStart: function onStart() {},
2112
- onDrag: function onDrag() {},
2113
- onStop: function onStop() {},
2114
- onMouseDown: function onMouseDown() {},
2115
- scale: 1
2116
- });
2117
- (function (exports) {
2118
- Object.defineProperty(exports, "__esModule", {
2119
- value: true
2120
97
  });
2121
- Object.defineProperty(exports, "DraggableCore", {
2122
- enumerable: true,
2123
- get: function get() {
2124
- return _DraggableCore["default"];
2125
- }
98
+ return _objectSpread(_objectSpread({}, result), {}, {
99
+ id: get(data, 'id')
2126
100
  });
2127
- exports["default"] = void 0;
2128
- var React = _interopRequireWildcard(React$3);
2129
- var _propTypes = _interopRequireDefault(propTypes$1.exports);
2130
- var _reactDom = _interopRequireDefault(require$$2);
2131
- var _clsx = _interopRequireDefault(require$$3);
2132
- var _domFns = domFns;
2133
- var _positionFns = positionFns;
2134
- var _shims = shims;
2135
- var _DraggableCore = _interopRequireDefault(DraggableCore$2);
2136
- var _log = _interopRequireDefault(log$1);
2137
- function _interopRequireDefault(obj) {
2138
- return obj && obj.__esModule ? obj : {
2139
- "default": obj
2140
- };
2141
- }
2142
- function _getRequireWildcardCache(nodeInterop) {
2143
- if (typeof WeakMap !== "function") return null;
2144
- var cacheBabelInterop = new WeakMap();
2145
- var cacheNodeInterop = new WeakMap();
2146
- return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) {
2147
- return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
2148
- })(nodeInterop);
101
+ };
102
+ //数据转换
103
+ var valueToApi = function valueToApi(values) {
104
+ map(values, function (data, key) {
105
+ // if ((key === 'fetusDeliverytime' || key === 'placentaDeliverytime') && data) {
106
+ // set(values, `${key}`, data?.format( 'YYYY-MM-DD HH:mm'));
107
+ // }
108
+ });
109
+ return values;
110
+ };
111
+ var AdmissionForm = /*#__PURE__*/function (_BaseEditPanelForm) {
112
+ function AdmissionForm() {
113
+ _classCallCheck(this, AdmissionForm);
114
+ return _callSuper(this, AdmissionForm, arguments);
2149
115
  }
2150
- function _interopRequireWildcard(obj, nodeInterop) {
2151
- if (!nodeInterop && obj && obj.__esModule) {
2152
- return obj;
2153
- }
2154
- if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") {
2155
- return {
2156
- "default": obj
2157
- };
2158
- }
2159
- var cache = _getRequireWildcardCache(nodeInterop);
2160
- if (cache && cache.has(obj)) {
2161
- return cache.get(obj);
2162
- }
2163
- var newObj = {};
2164
- var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
2165
- for (var key in obj) {
2166
- if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
2167
- var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
2168
- if (desc && (desc.get || desc.set)) {
2169
- Object.defineProperty(newObj, key, desc);
2170
- } else {
2171
- newObj[key] = obj[key];
2172
- }
2173
- }
116
+ _inherits(AdmissionForm, _BaseEditPanelForm);
117
+ return _createClass(AdmissionForm, [{
118
+ key: "render",
119
+ value: function render() {
120
+ var onValuesChange = this.props.onValuesChange;
121
+ return /*#__PURE__*/React$1.createElement(Form, _objectSpread({
122
+ autoComplete: "off",
123
+ ref: this.formRef,
124
+ onBlur: this.handleItemBlur,
125
+ onValuesChange: onValuesChange
126
+ }, formItemLayout), this.renderEditContent());
2174
127
  }
2175
- newObj["default"] = obj;
2176
- if (cache) {
2177
- cache.set(obj, newObj);
128
+ }]);
129
+ }(BaseEditPanelForm);
130
+ var AdmissionPanel = /*#__PURE__*/function (_BaseEditPanel) {
131
+ function AdmissionPanel() {
132
+ var _this;
133
+ _classCallCheck(this, AdmissionPanel);
134
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
135
+ args[_key] = arguments[_key];
2178
136
  }
2179
- return newObj;
137
+ _this = _callSuper(this, AdmissionPanel, [].concat(args));
138
+ _defineProperty(_this, "formRef", void 0);
139
+ return _this;
2180
140
  }
2181
- function _extends() {
2182
- _extends = Object.assign ? Object.assign.bind() : function (target) {
2183
- for (var i = 1; i < arguments.length; i++) {
2184
- var source = arguments[i];
2185
- for (var key in source) {
2186
- if (Object.prototype.hasOwnProperty.call(source, key)) {
2187
- target[key] = source[key];
141
+ _inherits(AdmissionPanel, _BaseEditPanel);
142
+ return _createClass(AdmissionPanel, [{
143
+ key: "componentDidMount",
144
+ value: function () {
145
+ var _componentDidMount = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
146
+ var _this$props, data, moduleName, _this$props$fromApi, fromApi$1, formDescriptions, formDescriptionsWithoutSection, formKey;
147
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
148
+ while (1) switch (_context.prev = _context.next) {
149
+ case 0:
150
+ _this$props = this.props, data = _this$props.data, moduleName = _this$props.moduleName, _this$props$fromApi = _this$props.fromApi, fromApi$1 = _this$props$fromApi === void 0 ? fromApi : _this$props$fromApi;
151
+ _context.next = 3;
152
+ return SMchc_FormDescriptions.getModuleParseCache(moduleName);
153
+ case 3:
154
+ formDescriptions = _context.sent;
155
+ formDescriptionsWithoutSection = formDescriptionsWithoutSectionApi(formDescriptions);
156
+ formKey = get(data, 'id') || Math.random();
157
+ this.setState({
158
+ formDescriptions: formDescriptions,
159
+ formDescriptionsWithoutSection: formDescriptionsWithoutSection,
160
+ data: fromApi$1(data, formDescriptionsWithoutSection),
161
+ formKey: formKey
162
+ });
163
+ case 7:
164
+ case "end":
165
+ return _context.stop();
2188
166
  }
2189
- }
2190
- }
2191
- return target;
2192
- };
2193
- return _extends.apply(this, arguments);
2194
- }
2195
- function _defineProperty(obj, key, value) {
2196
- key = _toPropertyKey(key);
2197
- if (key in obj) {
2198
- Object.defineProperty(obj, key, {
2199
- value: value,
2200
- enumerable: true,
2201
- configurable: true,
2202
- writable: true
2203
- });
2204
- } else {
2205
- obj[key] = value;
2206
- }
2207
- return obj;
2208
- }
2209
- function _toPropertyKey(arg) {
2210
- var key = _toPrimitive(arg, "string");
2211
- return _typeof(key) === "symbol" ? key : String(key);
2212
- }
2213
- function _toPrimitive(input, hint) {
2214
- if (_typeof(input) !== "object" || input === null) return input;
2215
- var prim = input[Symbol.toPrimitive];
2216
- if (prim !== undefined) {
2217
- var res = prim.call(input, hint || "default");
2218
- if (_typeof(res) !== "object") return res;
2219
- throw new TypeError("@@toPrimitive must return a primitive value.");
2220
- }
2221
- return (hint === "string" ? String : Number)(input);
2222
- } /*:: import type {ControlPosition, PositionOffsetControlPosition, DraggableCoreProps, DraggableCoreDefaultProps} from './DraggableCore';*/
2223
- /*:: import type {Bounds, DraggableEventHandler} from './utils/types';*/
2224
- /*:: import type {Element as ReactElement} from 'react';*/
2225
- /*:: type DraggableState = {
2226
- dragging: boolean,
2227
- dragged: boolean,
2228
- x: number, y: number,
2229
- slackX: number, slackY: number,
2230
- isElementSVG: boolean,
2231
- prevPropsPosition: ?ControlPosition,
2232
- };*/
2233
- /*:: export type DraggableDefaultProps = {
2234
- ...DraggableCoreDefaultProps,
2235
- axis: 'both' | 'x' | 'y' | 'none',
2236
- bounds: Bounds | string | false,
2237
- defaultClassName: string,
2238
- defaultClassNameDragging: string,
2239
- defaultClassNameDragged: string,
2240
- defaultPosition: ControlPosition,
2241
- scale: number,
2242
- };*/
2243
- /*:: export type DraggableProps = {
2244
- ...DraggableCoreProps,
2245
- ...DraggableDefaultProps,
2246
- positionOffset: PositionOffsetControlPosition,
2247
- position: ControlPosition,
2248
- };*/
2249
- //
2250
- // Define <Draggable>
2251
- //
2252
- var Draggable = /*#__PURE__*/function (_React$Component2) {
2253
- function Draggable(props /*: DraggableProps*/) {
2254
- var _this5;
2255
- _classCallCheck(this, Draggable);
2256
- _this5 = _callSuper(this, Draggable, [props]);
2257
- _defineProperty(_this5, "onDragStart", function (e, coreData) {
2258
- (0, _log["default"])('Draggable: onDragStart: %j', coreData);
2259
-
2260
- // Short-circuit if user's callback killed it.
2261
- var shouldStart = _this5.props.onStart(e, (0, _positionFns.createDraggableData)(_this5, coreData));
2262
- // Kills start event on core as well, so move handlers are never bound.
2263
- if (shouldStart === false) return false;
2264
- _this5.setState({
2265
- dragging: true,
2266
- dragged: true
2267
- });
2268
- });
2269
- _defineProperty(_this5, "onDrag", function (e, coreData) {
2270
- if (!_this5.state.dragging) return false;
2271
- (0, _log["default"])('Draggable: onDrag: %j', coreData);
2272
- var uiData = (0, _positionFns.createDraggableData)(_this5, coreData);
2273
- var newState = {
2274
- x: uiData.x,
2275
- y: uiData.y,
2276
- slackX: 0,
2277
- slackY: 0
2278
- };
2279
-
2280
- // Keep within bounds.
2281
- if (_this5.props.bounds) {
2282
- // Save original x and y.
2283
- var _x = newState.x,
2284
- _y = newState.y;
2285
-
2286
- // Add slack to the values used to calculate bound position. This will ensure that if
2287
- // we start removing slack, the element won't react to it right away until it's been
2288
- // completely removed.
2289
- newState.x += _this5.state.slackX;
2290
- newState.y += _this5.state.slackY;
2291
-
2292
- // Get bound position. This will ceil/floor the x and y within the boundaries.
2293
- var _ref8 = (0, _positionFns.getBoundPosition)(_this5, newState.x, newState.y),
2294
- _ref9 = _slicedToArray(_ref8, 2),
2295
- newStateX = _ref9[0],
2296
- newStateY = _ref9[1];
2297
- newState.x = newStateX;
2298
- newState.y = newStateY;
2299
-
2300
- // Recalculate slack by noting how much was shaved by the boundPosition handler.
2301
- newState.slackX = _this5.state.slackX + (_x - newState.x);
2302
- newState.slackY = _this5.state.slackY + (_y - newState.y);
2303
-
2304
- // Update the event we fire to reflect what really happened after bounds took effect.
2305
- uiData.x = newState.x;
2306
- uiData.y = newState.y;
2307
- uiData.deltaX = newState.x - _this5.state.x;
2308
- uiData.deltaY = newState.y - _this5.state.y;
2309
- }
2310
-
2311
- // Short-circuit if user's callback killed it.
2312
- var shouldUpdate = _this5.props.onDrag(e, uiData);
2313
- if (shouldUpdate === false) return false;
2314
- _this5.setState(newState);
2315
- });
2316
- _defineProperty(_this5, "onDragStop", function (e, coreData) {
2317
- if (!_this5.state.dragging) return false;
2318
-
2319
- // Short-circuit if user's callback killed it.
2320
- var shouldContinue = _this5.props.onStop(e, (0, _positionFns.createDraggableData)(_this5, coreData));
2321
- if (shouldContinue === false) return false;
2322
- (0, _log["default"])('Draggable: onDragStop: %j', coreData);
2323
- var newState /*: Partial<DraggableState>*/ = {
2324
- dragging: false,
2325
- slackX: 0,
2326
- slackY: 0
2327
- };
2328
-
2329
- // If this is a controlled component, the result of this operation will be to
2330
- // revert back to the old position. We expect a handler on `onDragStop`, at the least.
2331
- var controlled = Boolean(_this5.props.position);
2332
- if (controlled) {
2333
- var _this5$props$position = _this5.props.position,
2334
- _x2 = _this5$props$position.x,
2335
- _y2 = _this5$props$position.y;
2336
- newState.x = _x2;
2337
- newState.y = _y2;
2338
- }
2339
- _this5.setState(newState);
2340
- });
2341
- _this5.state = {
2342
- // Whether or not we are currently dragging.
2343
- dragging: false,
2344
- // Whether or not we have been dragged before.
2345
- dragged: false,
2346
- // Current transform x and y.
2347
- x: props.position ? props.position.x : props.defaultPosition.x,
2348
- y: props.position ? props.position.y : props.defaultPosition.y,
2349
- prevPropsPosition: _objectSpread2({}, props.position),
2350
- // Used for compensating for out-of-bounds drags
2351
- slackX: 0,
2352
- slackY: 0,
2353
- // Can only determine if SVG after mounting
2354
- isElementSVG: false
2355
- };
2356
- if (props.position && !(props.onDrag || props.onStop)) {
2357
- // eslint-disable-next-line no-console
2358
- console.warn('A `position` was applied to this <Draggable>, without drag handlers. This will make this ' + 'component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the ' + '`position` of this element.');
167
+ }, _callee, this);
168
+ }));
169
+ function componentDidMount() {
170
+ return _componentDidMount.apply(this, arguments);
2359
171
  }
2360
- return _this5;
172
+ return componentDidMount;
173
+ }()
174
+ }, {
175
+ key: "render",
176
+ value: function render() {
177
+ var _this2 = this;
178
+ var _this$props2 = this.props,
179
+ Form = _this$props2.Form,
180
+ onValuesChange = _this$props2.onValuesChange;
181
+ var _this$state = this.state,
182
+ formDescriptions = _this$state.formDescriptions,
183
+ formDescriptionsWithoutSection = _this$state.formDescriptionsWithoutSection,
184
+ data = _this$state.data,
185
+ formKey = _this$state.formKey,
186
+ spinning = _this$state.spinning;
187
+ return React.createElement("div", {
188
+ className: "base-edit-panel"
189
+ }, React.createElement(Form, {
190
+ ref: function ref(_ref) {
191
+ return _this2.formRef = _ref;
192
+ },
193
+ key: formKey,
194
+ spinning: spinning,
195
+ data: data,
196
+ onFinish: this.handleSubmit,
197
+ formDescriptions: formDescriptions,
198
+ formDescriptionsWithoutSection: formDescriptionsWithoutSection,
199
+ history: history,
200
+ onValuesChange: onValuesChange
201
+ }));
2361
202
  }
2362
- _inherits(Draggable, _React$Component2);
2363
- return _createClass(Draggable, [{
2364
- key: "componentDidMount",
2365
- value: function componentDidMount() {
2366
- // Check to see if the element passed is an instanceof SVGElement
2367
- if (typeof window.SVGElement !== 'undefined' && this.findDOMNode() instanceof window.SVGElement) {
2368
- this.setState({
2369
- isElementSVG: true
2370
- });
2371
- }
2372
- }
2373
- }, {
2374
- key: "componentWillUnmount",
2375
- value: function componentWillUnmount() {
2376
- this.setState({
2377
- dragging: false
2378
- }); // prevents invariant if unmounted while dragging
2379
- }
2380
-
2381
- // React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find
2382
- // the underlying DOM node ourselves. See the README for more information.
2383
- }, {
2384
- key: "findDOMNode",
2385
- value: function findDOMNode() /*: ?HTMLElement*/{
2386
- var _this$props$nodeRef$c, _this$props;
2387
- return (_this$props$nodeRef$c = (_this$props = this.props) === null || _this$props === void 0 || (_this$props = _this$props.nodeRef) === null || _this$props === void 0 ? void 0 : _this$props.current) !== null && _this$props$nodeRef$c !== void 0 ? _this$props$nodeRef$c : _reactDom["default"].findDOMNode(this);
2388
- }
2389
- }, {
2390
- key: "render",
2391
- value: function render() /*: ReactElement<any>*/{
2392
- var _this$props3 = this.props,
2393
- axis = _this$props3.axis,
2394
- bounds = _this$props3.bounds,
2395
- children = _this$props3.children,
2396
- defaultPosition = _this$props3.defaultPosition,
2397
- defaultClassName = _this$props3.defaultClassName,
2398
- defaultClassNameDragging = _this$props3.defaultClassNameDragging,
2399
- defaultClassNameDragged = _this$props3.defaultClassNameDragged,
2400
- position = _this$props3.position,
2401
- positionOffset = _this$props3.positionOffset,
2402
- scale = _this$props3.scale,
2403
- draggableCoreProps = _objectWithoutProperties(_this$props3, _excluded2);
2404
- var style = {};
2405
- var svgTransform = null;
2406
-
2407
- // If this is controlled, we don't want to move it - unless it's dragging.
2408
- var controlled = Boolean(position);
2409
- var draggable = !controlled || this.state.dragging;
2410
- var validPosition = position || defaultPosition;
2411
- var transformOpts = {
2412
- // Set left if horizontal drag is enabled
2413
- x: (0, _positionFns.canDragX)(this) && draggable ? this.state.x : validPosition.x,
2414
- // Set top if vertical drag is enabled
2415
- y: (0, _positionFns.canDragY)(this) && draggable ? this.state.y : validPosition.y
2416
- };
2417
-
2418
- // If this element was SVG, we use the `transform` attribute.
2419
- if (this.state.isElementSVG) {
2420
- svgTransform = (0, _domFns.createSVGTransform)(transformOpts, positionOffset);
2421
- } else {
2422
- // Add a CSS transform to move the element around. This allows us to move the element around
2423
- // without worrying about whether or not it is relatively or absolutely positioned.
2424
- // If the item you are dragging already has a transform set, wrap it in a <span> so <Draggable>
2425
- // has a clean slate.
2426
- style = (0, _domFns.createCSSTransform)(transformOpts, positionOffset);
2427
- }
2428
-
2429
- // Mark with class while dragging
2430
- var className = (0, _clsx["default"])(children.props.className || '', defaultClassName, _defineProperty2(_defineProperty2({}, defaultClassNameDragging, this.state.dragging), defaultClassNameDragged, this.state.dragged));
2431
-
2432
- // Reuse the child provided
2433
- // This makes it flexible to use whatever element is wanted (div, ul, etc)
2434
- return /*#__PURE__*/React.createElement(_DraggableCore["default"], _extends({}, draggableCoreProps, {
2435
- onStart: this.onDragStart,
2436
- onDrag: this.onDrag,
2437
- onStop: this.onDragStop
2438
- }), /*#__PURE__*/React.cloneElement(React.Children.only(children), {
2439
- className: className,
2440
- style: _objectSpread2(_objectSpread2({}, children.props.style), style),
2441
- transform: svgTransform
2442
- }));
2443
- }
2444
- }], [{
2445
- key: "getDerivedStateFromProps",
2446
- value:
2447
- // React 16.3+
2448
- // Arity (props, state)
2449
- function getDerivedStateFromProps(_ref /*:: */, _ref2 /*:: */) /*: ?Partial<DraggableState>*/{
2450
- var position = _ref.position;
2451
- var prevPropsPosition = _ref2.prevPropsPosition;
2452
- // Set x/y if a new position is provided in props that is different than the previous.
2453
- if (position && (!prevPropsPosition || position.x !== prevPropsPosition.x || position.y !== prevPropsPosition.y)) {
2454
- (0, _log["default"])('Draggable: getDerivedStateFromProps %j', {
2455
- position: position,
2456
- prevPropsPosition: prevPropsPosition
2457
- });
2458
- return {
2459
- x: position.x,
2460
- y: position.y,
2461
- prevPropsPosition: _objectSpread2({}, position)
2462
- };
2463
- }
2464
- return null;
2465
- }
2466
- }]);
2467
- }(React.Component /*:: <DraggableProps, DraggableState>*/);
2468
- exports["default"] = Draggable;
2469
- _defineProperty(Draggable, "displayName", 'Draggable');
2470
- _defineProperty(Draggable, "propTypes", _objectSpread2(_objectSpread2({}, _DraggableCore["default"].propTypes), {}, {
2471
- /**
2472
- * `axis` determines which axis the draggable can move.
2473
- *
2474
- * Note that all callbacks will still return data as normal. This only
2475
- * controls flushing to the DOM.
2476
- *
2477
- * 'both' allows movement horizontally and vertically.
2478
- * 'x' limits movement to horizontal axis.
2479
- * 'y' limits movement to vertical axis.
2480
- * 'none' limits all movement.
2481
- *
2482
- * Defaults to 'both'.
2483
- */
2484
- axis: _propTypes["default"].oneOf(['both', 'x', 'y', 'none']),
2485
- /**
2486
- * `bounds` determines the range of movement available to the element.
2487
- * Available values are:
2488
- *
2489
- * 'parent' restricts movement within the Draggable's parent node.
2490
- *
2491
- * Alternatively, pass an object with the following properties, all of which are optional:
2492
- *
2493
- * {left: LEFT_BOUND, right: RIGHT_BOUND, bottom: BOTTOM_BOUND, top: TOP_BOUND}
2494
- *
2495
- * All values are in px.
2496
- *
2497
- * Example:
2498
- *
2499
- * ```jsx
2500
- * let App = React.createClass({
2501
- * render: function () {
2502
- * return (
2503
- * <Draggable bounds={{right: 300, bottom: 300}}>
2504
- * <div>Content</div>
2505
- * </Draggable>
2506
- * );
2507
- * }
2508
- * });
2509
- * ```
2510
- */
2511
- bounds: _propTypes["default"].oneOfType([_propTypes["default"].shape({
2512
- left: _propTypes["default"].number,
2513
- right: _propTypes["default"].number,
2514
- top: _propTypes["default"].number,
2515
- bottom: _propTypes["default"].number
2516
- }), _propTypes["default"].string, _propTypes["default"].oneOf([false])]),
2517
- defaultClassName: _propTypes["default"].string,
2518
- defaultClassNameDragging: _propTypes["default"].string,
2519
- defaultClassNameDragged: _propTypes["default"].string,
2520
- /**
2521
- * `defaultPosition` specifies the x and y that the dragged item should start at
2522
- *
2523
- * Example:
2524
- *
2525
- * ```jsx
2526
- * let App = React.createClass({
2527
- * render: function () {
2528
- * return (
2529
- * <Draggable defaultPosition={{x: 25, y: 25}}>
2530
- * <div>I start with transformX: 25px and transformY: 25px;</div>
2531
- * </Draggable>
2532
- * );
2533
- * }
2534
- * });
2535
- * ```
2536
- */
2537
- defaultPosition: _propTypes["default"].shape({
2538
- x: _propTypes["default"].number,
2539
- y: _propTypes["default"].number
2540
- }),
2541
- positionOffset: _propTypes["default"].shape({
2542
- x: _propTypes["default"].oneOfType([_propTypes["default"].number, _propTypes["default"].string]),
2543
- y: _propTypes["default"].oneOfType([_propTypes["default"].number, _propTypes["default"].string])
2544
- }),
2545
- /**
2546
- * `position`, if present, defines the current position of the element.
2547
- *
2548
- * This is similar to how form elements in React work - if no `position` is supplied, the component
2549
- * is uncontrolled.
2550
- *
2551
- * Example:
2552
- *
2553
- * ```jsx
2554
- * let App = React.createClass({
2555
- * render: function () {
2556
- * return (
2557
- * <Draggable position={{x: 25, y: 25}}>
2558
- * <div>I start with transformX: 25px and transformY: 25px;</div>
2559
- * </Draggable>
2560
- * );
2561
- * }
2562
- * });
2563
- * ```
2564
- */
2565
- position: _propTypes["default"].shape({
2566
- x: _propTypes["default"].number,
2567
- y: _propTypes["default"].number
2568
- }),
2569
- /**
2570
- * These properties should be defined on the child, not here.
2571
- */
2572
- className: _shims.dontSetMe,
2573
- style: _shims.dontSetMe,
2574
- transform: _shims.dontSetMe
2575
- }));
2576
- _defineProperty(Draggable, "defaultProps", _objectSpread2(_objectSpread2({}, _DraggableCore["default"].defaultProps), {}, {
2577
- axis: 'both',
2578
- bounds: false,
2579
- defaultClassName: 'react-draggable',
2580
- defaultClassNameDragging: 'react-draggable-dragging',
2581
- defaultClassNameDragged: 'react-draggable-dragged',
2582
- defaultPosition: {
2583
- x: 0,
2584
- y: 0
2585
- },
2586
- scale: 1
2587
- }));
2588
- })(Draggable$1);
2589
- var Draggable = Draggable$1["default"],
2590
- DraggableCore = Draggable$1.DraggableCore;
2591
-
2592
- // Previous versions of this lib exported <Draggable> as the root export. As to no-// them, or TypeScript, we export *both* as the root and as 'default'.
2593
- // See https://github.com/mzabriskie/react-draggable/pull/254
2594
- // and https://github.com/mzabriskie/react-draggable/issues/266
2595
- cjs.exports = Draggable;
2596
- cjs.exports["default"] = Draggable;
2597
- cjs.exports.DraggableCore = DraggableCore;
2598
- var utils = {};
2599
- utils.__esModule = true;
2600
- utils.cloneElement = cloneElement;
2601
- var _react = _interopRequireDefault$2(React$3);
2602
- function _interopRequireDefault$2(obj) {
2603
- return obj && obj.__esModule ? obj : {
2604
- "default": obj
2605
- };
2606
- }
2607
- function ownKeys$2(object, enumerableOnly) {
2608
- var keys = Object.keys(object);
2609
- if (Object.getOwnPropertySymbols) {
2610
- var symbols = Object.getOwnPropertySymbols(object);
2611
- if (enumerableOnly) {
2612
- symbols = symbols.filter(function (sym) {
2613
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
203
+ }]);
204
+ }(BaseEditPanel);
205
+ _defineProperty(AdmissionPanel, "defaultProps", {
206
+ baseUrl: '',
207
+ moduleName: 'treatment-program',
208
+ title: '预约项目',
209
+ Form: AdmissionForm
210
+ });
211
+ var TITLE = '治疗项目';
212
+ var NursingFetus = /*#__PURE__*/function (_Component) {
213
+ function NursingFetus() {
214
+ var _this3;
215
+ _classCallCheck(this, NursingFetus);
216
+ for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
217
+ args[_key2] = arguments[_key2];
218
+ }
219
+ _this3 = _callSuper(this, NursingFetus, [].concat(args));
220
+ _defineProperty(_this3, "state", {
221
+ tabs: [{
222
+ title: "".concat(TITLE, "1"),
223
+ key: 'tab1',
224
+ value: {}
225
+ }],
226
+ activeKey: 'tab1',
227
+ programDict: {}
228
+ });
229
+ _defineProperty(_this3, "formRefs", {});
230
+ _defineProperty(_this3, "onChange", function (activeKey) {
231
+ _this3.setState({
232
+ activeKey: activeKey
2614
233
  });
2615
- }
2616
- keys.push.apply(keys, symbols);
2617
- }
2618
- return keys;
2619
- }
2620
- function _objectSpread$2(target) {
2621
- for (var i = 1; i < arguments.length; i++) {
2622
- var source = arguments[i] != null ? arguments[i] : {};
2623
- if (i % 2) {
2624
- ownKeys$2(Object(source), true).forEach(function (key) {
2625
- _defineProperty$2(target, key, source[key]);
234
+ });
235
+ _defineProperty(_this3, "onEdit", function (targetKey, action) {
236
+ _this3[action](targetKey);
237
+ });
238
+ _defineProperty(_this3, "add", function () {
239
+ var tabs = _this3.state.tabs;
240
+ var activeKey = Math.random().toString();
241
+ var newPanes = _toConsumableArray(tabs);
242
+ newPanes.push({
243
+ title: "".concat(TITLE).concat(tabs.length + 1),
244
+ key: activeKey
2626
245
  });
2627
- } else if (Object.getOwnPropertyDescriptors) {
2628
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
2629
- } else {
2630
- ownKeys$2(Object(source)).forEach(function (key) {
2631
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
246
+ _this3.setState({
247
+ tabs: newPanes,
248
+ activeKey: activeKey
2632
249
  });
2633
- }
2634
- }
2635
- return target;
2636
- }
2637
- function _defineProperty$2(obj, key, value) {
2638
- if (key in obj) {
2639
- Object.defineProperty(obj, key, {
2640
- value: value,
2641
- enumerable: true,
2642
- configurable: true,
2643
- writable: true
2644
250
  });
2645
- } else {
2646
- obj[key] = value;
2647
- }
2648
- return obj;
2649
- }
2650
-
2651
- // React.addons.cloneWithProps look-alike that merges style & className.
2652
- function cloneElement(element, props) {
2653
- if (props.style && element.props.style) {
2654
- props.style = _objectSpread$2(_objectSpread$2({}, element.props.style), props.style);
2655
- }
2656
- if (props.className && element.props.className) {
2657
- props.className = element.props.className + " " + props.className;
2658
- }
2659
- return /*#__PURE__*/_react["default"].cloneElement(element, props);
2660
- }
2661
- var propTypes = {};
2662
- propTypes.__esModule = true;
2663
- propTypes.resizableProps = void 0;
2664
- var _propTypes$2 = _interopRequireDefault$1(propTypes$1.exports);
2665
- function _interopRequireDefault$1(obj) {
2666
- return obj && obj.__esModule ? obj : {
2667
- "default": obj
2668
- };
2669
- }
2670
- var resizableProps = {
2671
- /*
2672
- * Restricts resizing to a particular axis (default: 'both')
2673
- * 'both' - allows resizing by width or height
2674
- * 'x' - only allows the width to be changed
2675
- * 'y' - only allows the height to be changed
2676
- * 'none' - disables resizing altogether
2677
- * */
2678
- axis: _propTypes$2["default"].oneOf(['both', 'x', 'y', 'none']),
2679
- className: _propTypes$2["default"].string,
2680
- /*
2681
- * Require that one and only one child be present.
2682
- * */
2683
- children: _propTypes$2["default"].element.isRequired,
2684
- /*
2685
- * These will be passed wholesale to react-draggable's DraggableCore
2686
- * */
2687
- draggableOpts: _propTypes$2["default"].shape({
2688
- allowAnyClick: _propTypes$2["default"].bool,
2689
- cancel: _propTypes$2["default"].string,
2690
- children: _propTypes$2["default"].node,
2691
- disabled: _propTypes$2["default"].bool,
2692
- enableUserSelectHack: _propTypes$2["default"].bool,
2693
- offsetParent: _propTypes$2["default"].node,
2694
- grid: _propTypes$2["default"].arrayOf(_propTypes$2["default"].number),
2695
- handle: _propTypes$2["default"].string,
2696
- nodeRef: _propTypes$2["default"].object,
2697
- onStart: _propTypes$2["default"].func,
2698
- onDrag: _propTypes$2["default"].func,
2699
- onStop: _propTypes$2["default"].func,
2700
- onMouseDown: _propTypes$2["default"].func,
2701
- scale: _propTypes$2["default"].number
2702
- }),
2703
- /*
2704
- * Initial height
2705
- * */
2706
- height: _propTypes$2["default"].number.isRequired,
2707
- /*
2708
- * Customize cursor resize handle
2709
- * */
2710
- handle: _propTypes$2["default"].oneOfType([_propTypes$2["default"].node, _propTypes$2["default"].func]),
2711
- /*
2712
- * If you change this, be sure to update your css
2713
- * */
2714
- handleSize: _propTypes$2["default"].arrayOf(_propTypes$2["default"].number),
2715
- lockAspectRatio: _propTypes$2["default"].bool,
2716
- /*
2717
- * Max X & Y measure
2718
- * */
2719
- maxConstraints: _propTypes$2["default"].arrayOf(_propTypes$2["default"].number),
2720
- /*
2721
- * Min X & Y measure
2722
- * */
2723
- minConstraints: _propTypes$2["default"].arrayOf(_propTypes$2["default"].number),
2724
- /*
2725
- * Called on stop resize event
2726
- * */
2727
- onResizeStop: _propTypes$2["default"].func,
2728
- /*
2729
- * Called on start resize event
2730
- * */
2731
- onResizeStart: _propTypes$2["default"].func,
2732
- /*
2733
- * Called on resize event
2734
- * */
2735
- onResize: _propTypes$2["default"].func,
2736
- /*
2737
- * Defines which resize handles should be rendered (default: 'se')
2738
- * 's' - South handle (bottom-center)
2739
- * 'w' - West handle (left-center)
2740
- * 'e' - East handle (right-center)
2741
- * 'n' - North handle (top-center)
2742
- * 'sw' - Southwest handle (bottom-left)
2743
- * 'nw' - Northwest handle (top-left)
2744
- * 'se' - Southeast handle (bottom-right)
2745
- * 'ne' - Northeast handle (top-center)
2746
- * */
2747
- resizeHandles: _propTypes$2["default"].arrayOf(_propTypes$2["default"].oneOf(['s', 'w', 'e', 'n', 'sw', 'nw', 'se', 'ne'])),
2748
- /*
2749
- * If `transform: scale(n)` is set on the parent, this should be set to `n`.
2750
- * */
2751
- transformScale: _propTypes$2["default"].number,
2752
- /*
2753
- * Initial width
2754
- */
2755
- width: _propTypes$2["default"].number.isRequired
2756
- };
2757
- propTypes.resizableProps = resizableProps;
2758
- Resizable$2.__esModule = true;
2759
- Resizable$2["default"] = void 0;
2760
- var React$1 = _interopRequireWildcard$1(React$3);
2761
- var _reactDraggable = cjs.exports;
2762
- var _utils = utils;
2763
- var _propTypes$1 = propTypes;
2764
- var _excluded$1 = ["children", "className", "draggableOpts", "width", "height", "handle", "handleSize", "lockAspectRatio", "axis", "minConstraints", "maxConstraints", "onResize", "onResizeStop", "onResizeStart", "resizeHandles", "transformScale"];
2765
- function _getRequireWildcardCache$1(nodeInterop) {
2766
- if (typeof WeakMap !== "function") return null;
2767
- var cacheBabelInterop = new WeakMap();
2768
- var cacheNodeInterop = new WeakMap();
2769
- return (_getRequireWildcardCache$1 = function _getRequireWildcardCache(nodeInterop) {
2770
- return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
2771
- })(nodeInterop);
2772
- }
2773
- function _interopRequireWildcard$1(obj, nodeInterop) {
2774
- if (!nodeInterop && obj && obj.__esModule) {
2775
- return obj;
2776
- }
2777
- if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") {
2778
- return {
2779
- "default": obj
2780
- };
2781
- }
2782
- var cache = _getRequireWildcardCache$1(nodeInterop);
2783
- if (cache && cache.has(obj)) {
2784
- return cache.get(obj);
2785
- }
2786
- var newObj = {};
2787
- var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
2788
- for (var key in obj) {
2789
- if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
2790
- var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
2791
- if (desc && (desc.get || desc.set)) {
2792
- Object.defineProperty(newObj, key, desc);
2793
- } else {
2794
- newObj[key] = obj[key];
2795
- }
2796
- }
2797
- }
2798
- newObj["default"] = obj;
2799
- if (cache) {
2800
- cache.set(obj, newObj);
2801
- }
2802
- return newObj;
2803
- }
2804
- function _extends$1() {
2805
- _extends$1 = Object.assign || function (target) {
2806
- for (var i = 1; i < arguments.length; i++) {
2807
- var source = arguments[i];
2808
- for (var key in source) {
2809
- if (Object.prototype.hasOwnProperty.call(source, key)) {
2810
- target[key] = source[key];
251
+ _defineProperty(_this3, "remove", function (targetKey) {
252
+ if (!confirm('确定删除吗?')) return;
253
+ var _this3$state = _this3.state,
254
+ tabs = _this3$state.tabs,
255
+ activeKey = _this3$state.activeKey;
256
+ var _this3$props = _this3.props,
257
+ value = _this3$props.value,
258
+ onChange = _this3$props.onChange;
259
+ var values = cloneDeep(value);
260
+ var newActiveKey = activeKey;
261
+ var lastIndex;
262
+ console.log(targetKey, 'targetKey');
263
+ tabs.forEach(function (pane, i) {
264
+ if (pane.key === targetKey) {
265
+ lastIndex = i - 1;
266
+ // console.log(i, 'is');
267
+ // console.log(values[i]);
268
+ if (values[i] && values[i].id) {
269
+ // 判断项目是否已经添加成功
270
+ values.splice(i, 1);
271
+ onChange && onChange(values);
272
+ }
2811
273
  }
2812
- }
2813
- }
2814
- return target;
2815
- };
2816
- return _extends$1.apply(this, arguments);
2817
- }
2818
- function _objectWithoutPropertiesLoose$1(source, excluded) {
2819
- if (source == null) return {};
2820
- var target = {};
2821
- var sourceKeys = Object.keys(source);
2822
- var key, i;
2823
- for (i = 0; i < sourceKeys.length; i++) {
2824
- key = sourceKeys[i];
2825
- if (excluded.indexOf(key) >= 0) continue;
2826
- target[key] = source[key];
2827
- }
2828
- return target;
2829
- }
2830
- function ownKeys$1(object, enumerableOnly) {
2831
- var keys = Object.keys(object);
2832
- if (Object.getOwnPropertySymbols) {
2833
- var symbols = Object.getOwnPropertySymbols(object);
2834
- if (enumerableOnly) {
2835
- symbols = symbols.filter(function (sym) {
2836
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
2837
- });
2838
- }
2839
- keys.push.apply(keys, symbols);
2840
- }
2841
- return keys;
2842
- }
2843
- function _objectSpread$1(target) {
2844
- for (var i = 1; i < arguments.length; i++) {
2845
- var source = arguments[i] != null ? arguments[i] : {};
2846
- if (i % 2) {
2847
- ownKeys$1(Object(source), true).forEach(function (key) {
2848
- _defineProperty$1(target, key, source[key]);
2849
274
  });
2850
- } else if (Object.getOwnPropertyDescriptors) {
2851
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
2852
- } else {
2853
- ownKeys$1(Object(source)).forEach(function (key) {
2854
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
275
+ var newPanes = tabs.filter(function (pane) {
276
+ return pane.key !== targetKey;
2855
277
  });
2856
- }
2857
- }
2858
- return target;
2859
- }
2860
- function _defineProperty$1(obj, key, value) {
2861
- if (key in obj) {
2862
- Object.defineProperty(obj, key, {
2863
- value: value,
2864
- enumerable: true,
2865
- configurable: true,
2866
- writable: true
2867
- });
2868
- } else {
2869
- obj[key] = value;
2870
- }
2871
- return obj;
2872
- }
2873
- function _inheritsLoose$1(subClass, superClass) {
2874
- subClass.prototype = Object.create(superClass.prototype);
2875
- subClass.prototype.constructor = subClass;
2876
- _setPrototypeOf$1(subClass, superClass);
2877
- }
2878
- function _setPrototypeOf$1(o, p) {
2879
- _setPrototypeOf$1 = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
2880
- o.__proto__ = p;
2881
- return o;
2882
- };
2883
- return _setPrototypeOf$1(o, p);
2884
- }
2885
-
2886
- // The base <Resizable> component.
2887
- // This component does not have state and relies on the parent to set its props based on callback data.
2888
- var Resizable$1 = /*#__PURE__*/function (_React$Component) {
2889
- _inheritsLoose$1(Resizable, _React$Component);
2890
- function Resizable() {
2891
- var _this;
2892
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
2893
- args[_key] = arguments[_key];
2894
- }
2895
- _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
2896
- _this.handleRefs = {};
2897
- _this.lastHandleRect = null;
2898
- _this.slack = null;
2899
- return _this;
2900
- }
2901
- var _proto = Resizable.prototype;
2902
- _proto.componentWillUnmount = function componentWillUnmount() {
2903
- this.resetData();
2904
- };
2905
- _proto.resetData = function resetData() {
2906
- this.lastHandleRect = this.slack = null;
2907
- } // Clamp width and height within provided constraints
2908
- ;
2909
- _proto.runConstraints = function runConstraints(width, height) {
2910
- var _this$props = this.props,
2911
- minConstraints = _this$props.minConstraints,
2912
- maxConstraints = _this$props.maxConstraints,
2913
- lockAspectRatio = _this$props.lockAspectRatio; // short circuit
2914
-
2915
- if (!minConstraints && !maxConstraints && !lockAspectRatio) return [width, height]; // If constraining to min and max, we need to also fit width and height to aspect ratio.
2916
-
2917
- if (lockAspectRatio) {
2918
- var ratio = this.props.width / this.props.height;
2919
- var deltaW = width - this.props.width;
2920
- var deltaH = height - this.props.height; // Find which coordinate was greater and should push the other toward it.
2921
- // E.g.:
2922
- // ratio = 1, deltaW = 10, deltaH = 5, deltaH should become 10.
2923
- // ratio = 2, deltaW = 10, deltaH = 6, deltaW should become 12.
2924
-
2925
- if (Math.abs(deltaW) > Math.abs(deltaH * ratio)) {
2926
- height = width / ratio;
2927
- } else {
2928
- width = height * ratio;
2929
- }
2930
- }
2931
- var oldW = width,
2932
- oldH = height; // Add slack to the values used to calculate bound position. This will ensure that if
2933
- // we start removing slack, the element won't react to it right away until it's been
2934
- // completely removed.
2935
-
2936
- var _ref = this.slack || [0, 0],
2937
- slackW = _ref[0],
2938
- slackH = _ref[1];
2939
- width += slackW;
2940
- height += slackH;
2941
- if (minConstraints) {
2942
- width = Math.max(minConstraints[0], width);
2943
- height = Math.max(minConstraints[1], height);
2944
- }
2945
- if (maxConstraints) {
2946
- width = Math.min(maxConstraints[0], width);
2947
- height = Math.min(maxConstraints[1], height);
2948
- } // If the width or height changed, we must have introduced some slack. Record it for the next iteration.
2949
-
2950
- this.slack = [slackW + (oldW - width), slackH + (oldH - height)];
2951
- return [width, height];
2952
- }
2953
- /**
2954
- * Wrapper around drag events to provide more useful data.
2955
- *
2956
- * @param {String} handlerName Handler name to wrap.
2957
- * @return {Function} Handler function.
2958
- */;
2959
- _proto.resizeHandler = function resizeHandler(handlerName, axis) {
2960
- var _this2 = this;
2961
- return function (e, _ref2) {
2962
- var node = _ref2.node,
2963
- deltaX = _ref2.deltaX,
2964
- deltaY = _ref2.deltaY;
2965
- // Reset data in case it was left over somehow (should not be possible)
2966
- if (handlerName === 'onResizeStart') _this2.resetData(); // Axis restrictions
2967
-
2968
- var canDragX = (_this2.props.axis === 'both' || _this2.props.axis === 'x') && axis !== 'n' && axis !== 's';
2969
- var canDragY = (_this2.props.axis === 'both' || _this2.props.axis === 'y') && axis !== 'e' && axis !== 'w'; // No dragging possible.
2970
-
2971
- if (!canDragX && !canDragY) return; // Decompose axis for later use
2972
-
2973
- var axisV = axis[0];
2974
- var axisH = axis[axis.length - 1]; // intentionally not axis[1], so that this catches axis === 'w' for example
2975
- // Track the element being dragged to account for changes in position.
2976
- // If a handle's position is changed between callbacks, we need to factor this in to the next callback.
2977
- // Failure to do so will cause the element to "skip" when resized upwards or leftwards.
2978
-
2979
- var handleRect = node.getBoundingClientRect();
2980
- if (_this2.lastHandleRect != null) {
2981
- // If the handle has repositioned on either axis since last render,
2982
- // we need to increase our callback values by this much.
2983
- // Only checking 'n', 'w' since resizing by 's', 'w' won't affect the overall position on page,
2984
- if (axisH === 'w') {
2985
- var deltaLeftSinceLast = handleRect.left - _this2.lastHandleRect.left;
2986
- deltaX += deltaLeftSinceLast;
2987
- }
2988
- if (axisV === 'n') {
2989
- var deltaTopSinceLast = handleRect.top - _this2.lastHandleRect.top;
2990
- deltaY += deltaTopSinceLast;
278
+ if (newPanes.length && newActiveKey === targetKey) {
279
+ if (lastIndex >= 0) {
280
+ newActiveKey = newPanes[lastIndex].key;
281
+ } else {
282
+ newActiveKey = newPanes[0].key;
2991
283
  }
2992
- } // Storage of last rect so we know how much it has really moved.
2993
-
2994
- _this2.lastHandleRect = handleRect; // Reverse delta if using top or left drag handles.
2995
-
2996
- if (axisH === 'w') deltaX = -deltaX;
2997
- if (axisV === 'n') deltaY = -deltaY; // Update w/h by the deltas. Also factor in transformScale.
2998
-
2999
- var width = _this2.props.width + (canDragX ? deltaX / _this2.props.transformScale : 0);
3000
- var height = _this2.props.height + (canDragY ? deltaY / _this2.props.transformScale : 0); // Run user-provided constraints.
3001
-
3002
- var _this2$runConstraints = _this2.runConstraints(width, height);
3003
- width = _this2$runConstraints[0];
3004
- height = _this2$runConstraints[1];
3005
- var dimensionsChanged = width !== _this2.props.width || height !== _this2.props.height; // Call user-supplied callback if present.
3006
-
3007
- var cb = typeof _this2.props[handlerName] === 'function' ? _this2.props[handlerName] : null; // Don't call 'onResize' if dimensions haven't changed.
3008
-
3009
- var shouldSkipCb = handlerName === 'onResize' && !dimensionsChanged;
3010
- if (cb && !shouldSkipCb) {
3011
- e.persist == null ? void 0 : e.persist();
3012
- cb(e, {
3013
- node: node,
3014
- size: {
3015
- width: width,
3016
- height: height
3017
- },
3018
- handle: axis
3019
- });
3020
- } // Reset internal data
3021
-
3022
- if (handlerName === 'onResizeStop') _this2.resetData();
3023
- };
3024
- } // Render a resize handle given an axis & DOM ref. Ref *must* be attached for
3025
- // the underlying draggable library to work properly.
3026
- ;
3027
- _proto.renderResizeHandle = function renderResizeHandle(handleAxis, ref) {
3028
- var handle = this.props.handle; // No handle provided, make the default
3029
-
3030
- if (!handle) {
3031
- return /*#__PURE__*/React$1.createElement("span", {
3032
- className: "react-resizable-handle react-resizable-handle-" + handleAxis,
3033
- ref: ref
284
+ }
285
+ // console.log(newPanes, newActiveKey);
286
+ _this3.setState({
287
+ tabs: newPanes,
288
+ activeKey: newActiveKey
3034
289
  });
3035
- } // Handle is a function, such as:
3036
- // `handle={(handleAxis) => <span className={...} />}`
3037
-
3038
- if (typeof handle === 'function') {
3039
- return handle(handleAxis, ref);
3040
- } // Handle is a React component (composite or DOM).
3041
-
3042
- var isDOMElement = typeof handle.type === 'string';
3043
- var props = _objectSpread$1({
3044
- ref: ref
3045
- }, isDOMElement ? {} : {
3046
- handleAxis: handleAxis
3047
290
  });
3048
- return /*#__PURE__*/React$1.cloneElement(handle, props);
3049
- };
3050
- _proto.render = function render() {
3051
- var _this3 = this;
3052
-
3053
- // Pass along only props not meant for the `<Resizable>`.`
3054
- // eslint-disable-next-line no-unused-vars
3055
- var _this$props2 = this.props,
3056
- children = _this$props2.children,
3057
- className = _this$props2.className,
3058
- draggableOpts = _this$props2.draggableOpts;
3059
- _this$props2.width;
3060
- _this$props2.height;
3061
- _this$props2.handle;
3062
- _this$props2.handleSize;
3063
- _this$props2.lockAspectRatio;
3064
- _this$props2.axis;
3065
- _this$props2.minConstraints;
3066
- _this$props2.maxConstraints;
3067
- _this$props2.onResize;
3068
- _this$props2.onResizeStop;
3069
- _this$props2.onResizeStart;
3070
- var resizeHandles = _this$props2.resizeHandles;
3071
- _this$props2.transformScale;
3072
- var p = _objectWithoutPropertiesLoose$1(_this$props2, _excluded$1); // What we're doing here is getting the child of this element, and cloning it with this element's props.
3073
- // We are then defining its children as:
3074
- // 1. Its original children (resizable's child's children), and
3075
- // 2. One or more draggable handles.
3076
-
3077
- return (0, _utils.cloneElement)(children, _objectSpread$1(_objectSpread$1({}, p), {}, {
3078
- className: (className ? className + " " : '') + "react-resizable",
3079
- children: [].concat(children.props.children, resizeHandles.map(function (handleAxis) {
3080
- var _this3$handleRefs$han;
3081
-
3082
- // Create a ref to the handle so that `<DraggableCore>` doesn't have to use ReactDOM.findDOMNode().
3083
- var ref = (_this3$handleRefs$han = _this3.handleRefs[handleAxis]) != null ? _this3$handleRefs$han : _this3.handleRefs[handleAxis] = /*#__PURE__*/React$1.createRef();
3084
- return /*#__PURE__*/React$1.createElement(_reactDraggable.DraggableCore, _extends$1({}, draggableOpts, {
3085
- nodeRef: ref,
3086
- key: "resizableHandle-" + handleAxis,
3087
- onStop: _this3.resizeHandler('onResizeStop', handleAxis),
3088
- onStart: _this3.resizeHandler('onResizeStart', handleAxis),
3089
- onDrag: _this3.resizeHandler('onResize', handleAxis)
3090
- }), _this3.renderResizeHandle(handleAxis, ref));
3091
- }))
3092
- }));
3093
- };
3094
- return Resizable;
3095
- }(React$1.Component);
3096
- Resizable$2["default"] = Resizable$1;
3097
- Resizable$1.propTypes = _propTypes$1.resizableProps;
3098
- Resizable$1.defaultProps = {
3099
- axis: 'both',
3100
- handleSize: [20, 20],
3101
- lockAspectRatio: false,
3102
- minConstraints: [20, 20],
3103
- maxConstraints: [Infinity, Infinity],
3104
- resizeHandles: ['se'],
3105
- transformScale: 1
3106
- };
3107
- var ResizableBox$1 = {};
3108
- ResizableBox$1.__esModule = true;
3109
- ResizableBox$1["default"] = void 0;
3110
- var React = _interopRequireWildcard(React$3);
3111
- var _propTypes = _interopRequireDefault(propTypes$1.exports);
3112
- var _Resizable = _interopRequireDefault(Resizable$2);
3113
- var _propTypes2 = propTypes;
3114
- var _excluded = ["handle", "handleSize", "onResize", "onResizeStart", "onResizeStop", "draggableOpts", "minConstraints", "maxConstraints", "lockAspectRatio", "axis", "width", "height", "resizeHandles", "style", "transformScale"];
3115
- function _interopRequireDefault(obj) {
3116
- return obj && obj.__esModule ? obj : {
3117
- "default": obj
3118
- };
3119
- }
3120
- function _getRequireWildcardCache(nodeInterop) {
3121
- if (typeof WeakMap !== "function") return null;
3122
- var cacheBabelInterop = new WeakMap();
3123
- var cacheNodeInterop = new WeakMap();
3124
- return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) {
3125
- return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
3126
- })(nodeInterop);
3127
- }
3128
- function _interopRequireWildcard(obj, nodeInterop) {
3129
- if (!nodeInterop && obj && obj.__esModule) {
3130
- return obj;
3131
- }
3132
- if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") {
3133
- return {
3134
- "default": obj
3135
- };
3136
- }
3137
- var cache = _getRequireWildcardCache(nodeInterop);
3138
- if (cache && cache.has(obj)) {
3139
- return cache.get(obj);
3140
- }
3141
- var newObj = {};
3142
- var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
3143
- for (var key in obj) {
3144
- if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
3145
- var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
3146
- if (desc && (desc.get || desc.set)) {
3147
- Object.defineProperty(newObj, key, desc);
3148
- } else {
3149
- newObj[key] = obj[key];
3150
- }
3151
- }
3152
- }
3153
- newObj["default"] = obj;
3154
- if (cache) {
3155
- cache.set(obj, newObj);
3156
- }
3157
- return newObj;
3158
- }
3159
- function _extends() {
3160
- _extends = Object.assign || function (target) {
3161
- for (var i = 1; i < arguments.length; i++) {
3162
- var source = arguments[i];
3163
- for (var key in source) {
3164
- if (Object.prototype.hasOwnProperty.call(source, key)) {
3165
- target[key] = source[key];
291
+ _defineProperty(_this3, "handleChange", function (changedValues, allValues) {
292
+ var _this3$props2 = _this3.props,
293
+ value = _this3$props2.value,
294
+ onChange = _this3$props2.onChange;
295
+ var programDict = _this3.state.programDict;
296
+ var values = cloneDeep(value);
297
+ var changedField = get(keys(changedValues), '0');
298
+ // console.log('changedValues', changedValues);
299
+ // console.log('changedField', changedField);
300
+ map(_this3.formRefs, function (item, index) {
301
+ var form = get(item, 'formRef.form');
302
+ var formData = form.getFieldsValue();
303
+ formData = valueToApi(formData);
304
+ values[index] = _objectSpread(_objectSpread({}, values[index]), formData);
305
+ if (changedField === 'totalNumbe' || changedField === 'treamentNumbe') {
306
+ var totalNumbe = form.getFieldValue('totalNumbe') || 0;
307
+ var treamentNumbe = form.getFieldValue('treamentNumbe') || 0;
308
+ form.setFieldsValue({
309
+ residueNumber: totalNumbe - treamentNumbe
310
+ });
311
+ set(values[index], 'residueNumber', totalNumbe - treamentNumbe);
3166
312
  }
3167
- }
3168
- }
3169
- return target;
3170
- };
3171
- return _extends.apply(this, arguments);
3172
- }
3173
- function ownKeys(object, enumerableOnly) {
3174
- var keys = Object.keys(object);
3175
- if (Object.getOwnPropertySymbols) {
3176
- var symbols = Object.getOwnPropertySymbols(object);
3177
- if (enumerableOnly) {
3178
- symbols = symbols.filter(function (sym) {
3179
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
3180
- });
3181
- }
3182
- keys.push.apply(keys, symbols);
3183
- }
3184
- return keys;
3185
- }
3186
- function _objectSpread(target) {
3187
- for (var i = 1; i < arguments.length; i++) {
3188
- var source = arguments[i] != null ? arguments[i] : {};
3189
- if (i % 2) {
3190
- ownKeys(Object(source), true).forEach(function (key) {
3191
- _defineProperty(target, key, source[key]);
3192
313
  });
3193
- } else if (Object.getOwnPropertyDescriptors) {
3194
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
3195
- } else {
3196
- ownKeys(Object(source)).forEach(function (key) {
3197
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
3198
- });
3199
- }
3200
- }
3201
- return target;
3202
- }
3203
- function _defineProperty(obj, key, value) {
3204
- if (key in obj) {
3205
- Object.defineProperty(obj, key, {
3206
- value: value,
3207
- enumerable: true,
3208
- configurable: true,
3209
- writable: true
314
+ var data = toApi(values, programDict);
315
+ // console.log('data', data);
316
+ onChange && onChange(data);
3210
317
  });
3211
- } else {
3212
- obj[key] = value;
3213
- }
3214
- return obj;
3215
- }
3216
- function _objectWithoutPropertiesLoose(source, excluded) {
3217
- if (source == null) return {};
3218
- var target = {};
3219
- var sourceKeys = Object.keys(source);
3220
- var key, i;
3221
- for (i = 0; i < sourceKeys.length; i++) {
3222
- key = sourceKeys[i];
3223
- if (excluded.indexOf(key) >= 0) continue;
3224
- target[key] = source[key];
3225
- }
3226
- return target;
3227
- }
3228
- function _inheritsLoose(subClass, superClass) {
3229
- subClass.prototype = Object.create(superClass.prototype);
3230
- subClass.prototype.constructor = subClass;
3231
- _setPrototypeOf(subClass, superClass);
3232
- }
3233
- function _setPrototypeOf(o, p) {
3234
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
3235
- o.__proto__ = p;
3236
- return o;
3237
- };
3238
- return _setPrototypeOf(o, p);
3239
- }
3240
- var ResizableBox = /*#__PURE__*/function (_React$Component) {
3241
- _inheritsLoose(ResizableBox, _React$Component);
3242
- function ResizableBox() {
3243
- var _this;
3244
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
3245
- args[_key] = arguments[_key];
3246
- }
3247
- _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
3248
- _this.state = {
3249
- width: _this.props.width,
3250
- height: _this.props.height,
3251
- propsWidth: _this.props.width,
3252
- propsHeight: _this.props.height
3253
- };
3254
- _this.onResize = function (e, data) {
3255
- var size = data.size;
3256
- if (_this.props.onResize) {
3257
- e.persist == null ? void 0 : e.persist();
3258
- _this.setState(size, function () {
3259
- return _this.props.onResize && _this.props.onResize(e, data);
3260
- });
3261
- } else {
3262
- _this.setState(size);
3263
- }
3264
- };
3265
- return _this;
3266
- }
3267
- ResizableBox.getDerivedStateFromProps = function getDerivedStateFromProps(props, state) {
3268
- // If parent changes height/width, set that in our state.
3269
- if (state.propsWidth !== props.width || state.propsHeight !== props.height) {
3270
- return {
3271
- width: props.width,
3272
- height: props.height,
3273
- propsWidth: props.width,
3274
- propsHeight: props.height
3275
- };
3276
- }
3277
- return null;
3278
- };
3279
- var _proto = ResizableBox.prototype;
3280
- _proto.render = function render() {
3281
- // Basic wrapper around a Resizable instance.
3282
- // If you use Resizable directly, you are responsible for updating the child component
3283
- // with a new width and height.
3284
- var _this$props = this.props,
3285
- handle = _this$props.handle,
3286
- handleSize = _this$props.handleSize;
3287
- _this$props.onResize;
3288
- var onResizeStart = _this$props.onResizeStart,
3289
- onResizeStop = _this$props.onResizeStop,
3290
- draggableOpts = _this$props.draggableOpts,
3291
- minConstraints = _this$props.minConstraints,
3292
- maxConstraints = _this$props.maxConstraints,
3293
- lockAspectRatio = _this$props.lockAspectRatio,
3294
- axis = _this$props.axis;
3295
- _this$props.width;
3296
- _this$props.height;
3297
- var resizeHandles = _this$props.resizeHandles,
3298
- style = _this$props.style,
3299
- transformScale = _this$props.transformScale,
3300
- props = _objectWithoutPropertiesLoose(_this$props, _excluded);
3301
- return /*#__PURE__*/React.createElement(_Resizable["default"], {
3302
- axis: axis,
3303
- draggableOpts: draggableOpts,
3304
- handle: handle,
3305
- handleSize: handleSize,
3306
- height: this.state.height,
3307
- lockAspectRatio: lockAspectRatio,
3308
- maxConstraints: maxConstraints,
3309
- minConstraints: minConstraints,
3310
- onResizeStart: onResizeStart,
3311
- onResize: this.onResize,
3312
- onResizeStop: onResizeStop,
3313
- resizeHandles: resizeHandles,
3314
- transformScale: transformScale,
3315
- width: this.state.width
3316
- }, /*#__PURE__*/React.createElement("div", _extends({}, props, {
3317
- style: _objectSpread(_objectSpread({}, style), {}, {
3318
- width: this.state.width + 'px',
3319
- height: this.state.height + 'px'
3320
- })
3321
- })));
3322
- };
3323
- return ResizableBox;
3324
- }(React.Component);
3325
- ResizableBox$1["default"] = ResizableBox;
3326
- ResizableBox.propTypes = _objectSpread(_objectSpread({}, _propTypes2.resizableProps), {}, {
3327
- children: _propTypes["default"].element
3328
- });
3329
- reactResizable.exports = function () {
3330
- throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable");
3331
- };
3332
- var Resizable = reactResizable.exports.Resizable = Resizable$2["default"];
3333
- reactResizable.exports.ResizableBox = ResizableBox$1["default"];
3334
- var ResizableTitle = function ResizableTitle(props) {
3335
- var onResize = props.onResize,
3336
- width = props.width,
3337
- restProps = _objectWithoutProperties(props, _excluded3);
3338
- if (!width) {
3339
- return /*#__PURE__*/React$3.createElement("th", restProps);
318
+ return _this3;
3340
319
  }
3341
- return /*#__PURE__*/React$3.createElement(Resizable, {
3342
- width: width,
3343
- height: 0,
3344
- handle: /*#__PURE__*/React$3.createElement("span", {
3345
- className: "react-resizable-handle",
3346
- onClick: function onClick(e) {
3347
- e.stopPropagation();
320
+ _inherits(NursingFetus, _Component);
321
+ return _createClass(NursingFetus, [{
322
+ key: "componentDidMount",
323
+ value: function () {
324
+ var _componentDidMount2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
325
+ var value, programDict;
326
+ return _regeneratorRuntime.wrap(function _callee2$(_context2) {
327
+ while (1) switch (_context2.prev = _context2.next) {
328
+ case 0:
329
+ value = this.props.value; // console.log('value', value);
330
+ if (value && value.length > 0) {
331
+ this.setState({
332
+ tabs: map(value, function (item, index) {
333
+ return {
334
+ title: "".concat(TITLE).concat(index + 1),
335
+ key: "tab".concat(index + 1),
336
+ value: item
337
+ };
338
+ })
339
+ });
340
+ }
341
+ _context2.next = 4;
342
+ return getTreatmentProgramDict();
343
+ case 4:
344
+ programDict = _context2.sent;
345
+ this.setState({
346
+ programDict: programDict
347
+ });
348
+ case 6:
349
+ case "end":
350
+ return _context2.stop();
351
+ }
352
+ }, _callee2, this);
353
+ }));
354
+ function componentDidMount() {
355
+ return _componentDidMount2.apply(this, arguments);
3348
356
  }
3349
- }),
3350
- onResize: onResize,
3351
- draggableOpts: {
3352
- enableUserSelectHack: false
357
+ return componentDidMount;
358
+ }()
359
+ }, {
360
+ key: "render",
361
+ value: function render() {
362
+ var _this4 = this;
363
+ var _this$state2 = this.state,
364
+ tabs = _this$state2.tabs,
365
+ activeKey = _this$state2.activeKey;
366
+ var value = this.props.value;
367
+ return /*#__PURE__*/React$1.createElement(Tabs, {
368
+ type: "editable-card",
369
+ onChange: this.onChange,
370
+ addIcon: /*#__PURE__*/React$1.createElement("div", null, /*#__PURE__*/React$1.createElement(MyIcon, {
371
+ value: 'PlusOutlined'
372
+ }), "\u6DFB\u52A0", TITLE),
373
+ activeKey: activeKey,
374
+ onEdit: this.onEdit
375
+ }, map(tabs, function (tab, index) {
376
+ return /*#__PURE__*/React$1.createElement(Tabs.TabPane, {
377
+ tab: tab.title,
378
+ key: tab.key,
379
+ forceRender: true,
380
+ closable: index === 0 ? false : true
381
+ }, /*#__PURE__*/React$1.createElement(AdmissionPanel, {
382
+ ref: function ref(_ref2) {
383
+ _this4.formRefs[index] = _ref2;
384
+ },
385
+ // @ts-ignore
386
+ data: value && (value.length > 0 ? value[index] : tab.value) || tab.value,
387
+ onValuesChange: _this4.handleChange
388
+ }));
389
+ }));
3353
390
  }
3354
- }, /*#__PURE__*/React$3.createElement("th", restProps));
3355
- };
3356
- export { ResizableTitle as default };
3357
- //# sourceMappingURL=.root56.js.map
391
+ }]);
392
+ }(Component);
393
+ export { NursingFetus as default };