@flatbiz/antd 5.0.31 → 5.0.33

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 (346) hide show
  1. package/dist/{_rollupPluginBabelHelpers-BYm17lo8.js → _rollupPluginBabelHelpers-CP5aeNcJ.js} +2 -2
  2. package/dist/{_rollupPluginBabelHelpers-BYm17lo8.js.map → _rollupPluginBabelHelpers-CP5aeNcJ.js.map} +1 -1
  3. package/dist/ace-editor-groovy/index.js +4 -4
  4. package/dist/ace-editor-java/index.js +4 -4
  5. package/dist/ace-editor-json/index.js +6 -6
  6. package/dist/ace-editor-mysql/index.js +6 -6
  7. package/dist/ace-editor-xml/index.js +6 -6
  8. package/dist/{alert-BmOT4kc3.js → alert-gN_wp9C1.js} +2 -2
  9. package/dist/{alert-BmOT4kc3.js.map → alert-gN_wp9C1.js.map} +1 -1
  10. package/dist/alert-wrapper/index.js +2 -2
  11. package/dist/amount-fen-input/index.js +2 -2
  12. package/dist/{amount-fen-input-yhjQwtSI.js → amount-fen-input-DSueMlf8.js} +2 -2
  13. package/dist/{amount-fen-input-yhjQwtSI.js.map → amount-fen-input-DSueMlf8.js.map} +1 -1
  14. package/dist/amount-fen-input-form-item/index.js +3 -3
  15. package/dist/{amount-fen-input-Ca3Kv5ei.js → amount-fen-input-goqylrM3.js} +3 -3
  16. package/dist/{amount-fen-input-Ca3Kv5ei.js.map → amount-fen-input-goqylrM3.js.map} +1 -1
  17. package/dist/anchor-steps/index.js +3 -3
  18. package/dist/{anchor-steps-BQK32Pbd.js → anchor-steps-BpBOQghC.js} +3 -3
  19. package/dist/{anchor-steps-BQK32Pbd.js.map → anchor-steps-BpBOQghC.js.map} +1 -1
  20. package/dist/block-layout/index.js +2 -2
  21. package/dist/bootstrap/index.js +7 -7
  22. package/dist/{bootstrap-NbEW5Nn8.js → bootstrap-tw4J2cHF.js} +4 -4
  23. package/dist/{bootstrap-NbEW5Nn8.js.map → bootstrap-tw4J2cHF.js.map} +1 -1
  24. package/dist/box-grid/index.js +1 -1
  25. package/dist/button-operate/index.d.ts +2 -0
  26. package/dist/button-operate/index.js +8 -8
  27. package/dist/{button-operate-C6dir05R.js → button-operate-C4nUyzrt.js} +10 -5
  28. package/dist/button-operate-C4nUyzrt.js.map +1 -0
  29. package/dist/button-wrapper/index.js +3 -3
  30. package/dist/{button-wrapper-l9FUsrWl.js → button-wrapper-C2koH6hy.js} +3 -3
  31. package/dist/{button-wrapper-l9FUsrWl.js.map → button-wrapper-C2koH6hy.js.map} +1 -1
  32. package/dist/card-layout/index.js +3 -3
  33. package/dist/{card-layout-BNs6jF2K.js → card-layout-DjLanJsj.js} +3 -3
  34. package/dist/{card-layout-BNs6jF2K.js.map → card-layout-DjLanJsj.js.map} +1 -1
  35. package/dist/card-wrapper/index.js +2 -2
  36. package/dist/{card-wrapper-w-JbDJNk.js → card-wrapper-Bu6yyUKG.js} +2 -2
  37. package/dist/{card-wrapper-w-JbDJNk.js.map → card-wrapper-Bu6yyUKG.js.map} +1 -1
  38. package/dist/cascader-wrapper/index.js +4 -4
  39. package/dist/{cascader-wrapper-DVkMvgwP.js → cascader-wrapper-c5qaaIiU.js} +3 -3
  40. package/dist/{cascader-wrapper-DVkMvgwP.js.map → cascader-wrapper-c5qaaIiU.js.map} +1 -1
  41. package/dist/{cell-render-BkfKyhww.js → cell-render-DqCOvBt_.js} +4 -4
  42. package/dist/{cell-render-BkfKyhww.js.map → cell-render-DqCOvBt_.js.map} +1 -1
  43. package/dist/check-list/index.js +1 -1
  44. package/dist/checkbox-wrapper/index.js +2 -2
  45. package/dist/{checkbox-wrapper-vfPLUiSn.js → checkbox-wrapper-OT4OlsxX.js} +2 -2
  46. package/dist/{checkbox-wrapper-vfPLUiSn.js.map → checkbox-wrapper-OT4OlsxX.js.map} +1 -1
  47. package/dist/{color-picker-Cu2FbOtD.js → color-picker-8w4ZPYlJ.js} +3 -3
  48. package/dist/{color-picker-Cu2FbOtD.js.map → color-picker-8w4ZPYlJ.js.map} +1 -1
  49. package/dist/color-picker-wrapper/index.js +3 -3
  50. package/dist/config-provider-wrapper/index.js +2 -2
  51. package/dist/{config-provider-wrapper-DDa_64Ce.js → config-provider-wrapper-Dbk1Er0W.js} +2 -2
  52. package/dist/{config-provider-wrapper-DDa_64Ce.js.map → config-provider-wrapper-Dbk1Er0W.js.map} +1 -1
  53. package/dist/{content-CQdbAO0t.js → content-BrpRj7zk.js} +4 -4
  54. package/dist/{content-CQdbAO0t.js.map → content-BrpRj7zk.js.map} +1 -1
  55. package/dist/{context-KfLOFzA0.js → context-BOYja0yN.js} +2 -2
  56. package/dist/{context-KfLOFzA0.js.map → context-BOYja0yN.js.map} +1 -1
  57. package/dist/css-node-hover/index.js +2 -2
  58. package/dist/{css-node-hover-CsHQgf77.js → css-node-hover-DrXHYNCC.js} +2 -2
  59. package/dist/{css-node-hover-CsHQgf77.js.map → css-node-hover-DrXHYNCC.js.map} +1 -1
  60. package/dist/date-picker-wrapper/index.js +2 -2
  61. package/dist/{date-picker-wrapper-Cs-HoJ6K.js → date-picker-wrapper-2KEdKz5v.js} +2 -2
  62. package/dist/{date-picker-wrapper-Cs-HoJ6K.js.map → date-picker-wrapper-2KEdKz5v.js.map} +1 -1
  63. package/dist/date-range-picker-wrapper/index.js +2 -2
  64. package/dist/{date-range-picker-wrapper-COuR09V1.js → date-range-picker-wrapper-BO6uJjDk.js} +2 -2
  65. package/dist/{date-range-picker-wrapper-COuR09V1.js.map → date-range-picker-wrapper-BO6uJjDk.js.map} +1 -1
  66. package/dist/date-range-picker-wrapper-form-item/index.js +4 -4
  67. package/dist/{date-range-picker-wrapper-form-item-BMfY0Kn1.js → date-range-picker-wrapper-form-item-CkuOvgHk.js} +4 -4
  68. package/dist/{date-range-picker-wrapper-form-item-BMfY0Kn1.js.map → date-range-picker-wrapper-form-item-CkuOvgHk.js.map} +1 -1
  69. package/dist/delete-node/index.js +3 -3
  70. package/dist/{delete-node-BF-2Gsyu.js → delete-node-C6jwhyxz.js} +3 -3
  71. package/dist/{delete-node-BF-2Gsyu.js.map → delete-node-C6jwhyxz.js.map} +1 -1
  72. package/dist/{dependencies-BNYRlfAK.js → dependencies-CwiS3Chb.js} +2 -2
  73. package/dist/{dependencies-BNYRlfAK.js.map → dependencies-CwiS3Chb.js.map} +1 -1
  74. package/dist/dialog-alert/index.js +7 -7
  75. package/dist/{dialog-alert-Da0_jALv.js → dialog-alert-BJUJNVk3.js} +3 -3
  76. package/dist/{dialog-alert-Da0_jALv.js.map → dialog-alert-BJUJNVk3.js.map} +1 -1
  77. package/dist/dialog-confirm/index.js +6 -6
  78. package/dist/{dialog-confirm-GTxDQEV0.js → dialog-confirm-CagitgW9.js} +3 -3
  79. package/dist/{dialog-confirm-GTxDQEV0.js.map → dialog-confirm-CagitgW9.js.map} +1 -1
  80. package/dist/dialog-drag-modal/index.css +1 -0
  81. package/dist/dialog-drag-modal/index.d.ts +51 -0
  82. package/dist/dialog-drag-modal/index.js +45 -0
  83. package/dist/dialog-drag-modal/index.js.map +1 -0
  84. package/dist/dialog-drawer/index.js +5 -5
  85. package/dist/{dialog-drawer-D7lYByyr.js → dialog-drawer-CTo7BS1O.js} +5 -5
  86. package/dist/{dialog-drawer-D7lYByyr.js.map → dialog-drawer-CTo7BS1O.js.map} +1 -1
  87. package/dist/dialog-drawer-content/index.js +5 -5
  88. package/dist/dialog-loading/index.js +2 -2
  89. package/dist/{dialog-loading-DdKI0dnm.js → dialog-loading-DWAkSW3k.js} +2 -2
  90. package/dist/{dialog-loading-DdKI0dnm.js.map → dialog-loading-DWAkSW3k.js.map} +1 -1
  91. package/dist/dialog-modal/index.js +5 -5
  92. package/dist/{dialog-modal-BI0jI_5f.js → dialog-modal-Nyty6_h7.js} +5 -5
  93. package/dist/{dialog-modal-BI0jI_5f.js.map → dialog-modal-Nyty6_h7.js.map} +1 -1
  94. package/dist/dialog-preview-image/index.js +2 -2
  95. package/dist/{drag-Df_cXnAY.js → drag-CD2Oqu4S.js} +4 -4
  96. package/dist/{drag-Df_cXnAY.js.map → drag-CD2Oqu4S.js.map} +1 -1
  97. package/dist/{drag-D1fxuzOc.js → drag-Wzt5Qu0X.js} +4 -4
  98. package/dist/{drag-D1fxuzOc.js.map → drag-Wzt5Qu0X.js.map} +1 -1
  99. package/dist/drag-collapse/index.js +2 -2
  100. package/dist/{drag-collapse-DU_JhQTz.js → drag-collapse-C9Ufwg8F.js} +2 -2
  101. package/dist/{drag-collapse-DU_JhQTz.js.map → drag-collapse-C9Ufwg8F.js.map} +1 -1
  102. package/dist/{drag-collapse-wL7wIgVO.js → drag-collapse-fR-vIpas.js} +2 -2
  103. package/dist/{drag-collapse-wL7wIgVO.js.map → drag-collapse-fR-vIpas.js.map} +1 -1
  104. package/dist/drag-collapse-form-list/index.js +2 -2
  105. package/dist/drag-editable-card/index.js +12 -12
  106. package/dist/drag-editable-table/index.d.ts +1 -1
  107. package/dist/drag-editable-table/index.js +24 -24
  108. package/dist/drag-editable-table-pro/index.js +9 -9
  109. package/dist/drag-form-list/index.js +7 -7
  110. package/dist/{drag-form-list-BGqbBKJM.js → drag-form-list-_DJotlyC.js} +5 -5
  111. package/dist/{drag-form-list-BGqbBKJM.js.map → drag-form-list-_DJotlyC.js.map} +1 -1
  112. package/dist/drag-modal-DTbr-E0g.js +1860 -0
  113. package/dist/drag-modal-DTbr-E0g.js.map +1 -0
  114. package/dist/drag-table/index.js +3 -3
  115. package/dist/{drag-table-vsEGr1yd.js → drag-table-CYRFOAYX.js} +3 -3
  116. package/dist/{drag-table-vsEGr1yd.js.map → drag-table-CYRFOAYX.js.map} +1 -1
  117. package/dist/dropdown-menu-wrapper/index.js +7 -7
  118. package/dist/{dropdown-menu-wrapper-ChbwSdIf.js → dropdown-menu-wrapper-Dti5BObg.js} +5 -5
  119. package/dist/{dropdown-menu-wrapper-ChbwSdIf.js.map → dropdown-menu-wrapper-Dti5BObg.js.map} +1 -1
  120. package/dist/easy-form/index.js +3 -3
  121. package/dist/easy-table/index.js +12 -12
  122. package/dist/editable-card/index.js +11 -11
  123. package/dist/{editable-card-nPOaeQf0.js → editable-card-DlqrwXa0.js} +8 -8
  124. package/dist/{editable-card-nPOaeQf0.js.map → editable-card-DlqrwXa0.js.map} +1 -1
  125. package/dist/{editable-card-B47j1yVw.js → editable-card-eGAbYXAH.js} +6 -6
  126. package/dist/{editable-card-B47j1yVw.js.map → editable-card-eGAbYXAH.js.map} +1 -1
  127. package/dist/editable-field/index.js +3 -3
  128. package/dist/{editable-field-DtbgD32w.js → editable-field-CJrq0eiF.js} +3 -3
  129. package/dist/{editable-field-DtbgD32w.js.map → editable-field-CJrq0eiF.js.map} +1 -1
  130. package/dist/editable-table/index.d.ts +1 -1
  131. package/dist/editable-table/index.js +22 -22
  132. package/dist/{editable-table-NP9LqFit.js → editable-table-D2-osC9X.js} +13 -13
  133. package/dist/{editable-table-NP9LqFit.js.map → editable-table-D2-osC9X.js.map} +1 -1
  134. package/dist/editable-table-pro/index.js +7 -7
  135. package/dist/{editable-table-pro-DWoOUJrI.js → editable-table-pro-DuxoUyNf.js} +6 -6
  136. package/dist/{editable-table-pro-DWoOUJrI.js.map → editable-table-pro-DuxoUyNf.js.map} +1 -1
  137. package/dist/{editor-BLm68Fsh.js → editor-BBLseWzD.js} +3 -3
  138. package/dist/{editor-BLm68Fsh.js.map → editor-BBLseWzD.js.map} +1 -1
  139. package/dist/{editor-CGXUpHWU.js → editor-D-wv_4El.js} +5 -5
  140. package/dist/{editor-CGXUpHWU.js.map → editor-D-wv_4El.js.map} +1 -1
  141. package/dist/{editor-CSMLoRvg.js → editor-D8ot-YJF.js} +3 -3
  142. package/dist/{editor-CSMLoRvg.js.map → editor-D8ot-YJF.js.map} +1 -1
  143. package/dist/{editor-DqEz5h5B.js → editor-DU3q52Nx.js} +5 -5
  144. package/dist/{editor-DqEz5h5B.js.map → editor-DU3q52Nx.js.map} +1 -1
  145. package/dist/{editor-BeZLWo-d.js → editor-_CPhhFJO.js} +4 -4
  146. package/dist/{editor-BeZLWo-d.js.map → editor-_CPhhFJO.js.map} +1 -1
  147. package/dist/{error-boundary-DtShAEtQ.js → error-boundary-WH8mMuvq.js} +3 -3
  148. package/dist/{error-boundary-DtShAEtQ.js.map → error-boundary-WH8mMuvq.js.map} +1 -1
  149. package/dist/error-boundary-wrapper/index.js +3 -3
  150. package/dist/fba-app/index.js +6 -6
  151. package/dist/{fba-app-DO_YME_j.js → fba-app-CQ6DtVqw.js} +6 -6
  152. package/dist/{fba-app-DO_YME_j.js.map → fba-app-CQ6DtVqw.js.map} +1 -1
  153. package/dist/fba-hooks/index.js +1 -1
  154. package/dist/file-export/index.js +2 -2
  155. package/dist/{file-export-BodnBdBJ.js → file-export-CRiO6KsI.js} +2 -2
  156. package/dist/{file-export-BodnBdBJ.js.map → file-export-CRiO6KsI.js.map} +1 -1
  157. package/dist/file-import/index.js +2 -2
  158. package/dist/{file-import-CZfgKmrO.js → file-import-DqTOsgdP.js} +2 -2
  159. package/dist/{file-import-CZfgKmrO.js.map → file-import-DqTOsgdP.js.map} +1 -1
  160. package/dist/file-select/index.js +2 -2
  161. package/dist/{file-select-C56tgs1o.js → file-select-E0G9jIBv.js} +2 -2
  162. package/dist/{file-select-C56tgs1o.js.map → file-select-E0G9jIBv.js.map} +1 -1
  163. package/dist/flex-layout/index.js +2 -2
  164. package/dist/{flex-layout-BaDncU_Z.js → flex-layout-zremxICp.js} +2 -2
  165. package/dist/{flex-layout-BaDncU_Z.js.map → flex-layout-zremxICp.js.map} +1 -1
  166. package/dist/{form-wa_Ck4Vl.js → form-3qaPduiy.js} +3 -3
  167. package/dist/{form-wa_Ck4Vl.js.map → form-3qaPduiy.js.map} +1 -1
  168. package/dist/form-grid/index.js +1 -1
  169. package/dist/form-item-group/index.js +2 -2
  170. package/dist/form-item-span/index.js +2 -2
  171. package/dist/form-item-text/index.js +5 -5
  172. package/dist/{form-item-text-DDrMFsQx.js → form-item-text-Cd-o5xce.js} +5 -5
  173. package/dist/{form-item-text-DDrMFsQx.js.map → form-item-text-Cd-o5xce.js.map} +1 -1
  174. package/dist/form-item-wrapper/index.js +2 -2
  175. package/dist/{form-item-wrapper-BneADBjX.js → form-item-wrapper-CkGsPiNS.js} +2 -2
  176. package/dist/{form-item-wrapper-BneADBjX.js.map → form-item-wrapper-CkGsPiNS.js.map} +1 -1
  177. package/dist/form-item-wrapper-dependencies/index.js +2 -2
  178. package/dist/form-list-wrapper/index.js +6 -6
  179. package/dist/{form-list-wrapper-DdhJ2Pv3.js → form-list-wrapper-Cw2GlFg4.js} +4 -4
  180. package/dist/{form-list-wrapper-DdhJ2Pv3.js.map → form-list-wrapper-Cw2GlFg4.js.map} +1 -1
  181. package/dist/form-wrapper/index.js +2 -2
  182. package/dist/{form-wrapper-DSnBmyFu.js → form-wrapper-BSwxGtCk.js} +2 -2
  183. package/dist/{form-wrapper-DSnBmyFu.js.map → form-wrapper-BSwxGtCk.js.map} +1 -1
  184. package/dist/gap/index.js +2 -2
  185. package/dist/{gap-C1UNo7Wz.js → gap-D_CWfDQP.js} +2 -2
  186. package/dist/{gap-C1UNo7Wz.js.map → gap-D_CWfDQP.js.map} +1 -1
  187. package/dist/icon-wrapper/index.js +2 -2
  188. package/dist/{icon-wrapper-HJ2r5GeZ.js → icon-wrapper-GTNh6wtb.js} +2 -2
  189. package/dist/{icon-wrapper-HJ2r5GeZ.js.map → icon-wrapper-GTNh6wtb.js.map} +1 -1
  190. package/dist/index.d.ts +72 -2
  191. package/dist/index.js +109 -107
  192. package/dist/index.js.map +1 -1
  193. package/dist/input-search-wrapper/index.js +2 -2
  194. package/dist/{input-search-wrapper-wVYGWi2O.js → input-search-wrapper-c71s0_t_.js} +2 -2
  195. package/dist/{input-search-wrapper-wVYGWi2O.js.map → input-search-wrapper-c71s0_t_.js.map} +1 -1
  196. package/dist/input-text-area-wrapper/index.js +2 -2
  197. package/dist/{input-text-area-wrapper-Cxi-wf5J.js → input-text-area-wrapper-B9n2rosB.js} +2 -2
  198. package/dist/{input-text-area-wrapper-Cxi-wf5J.js.map → input-text-area-wrapper-B9n2rosB.js.map} +1 -1
  199. package/dist/input-wrapper/index.js +2 -2
  200. package/dist/{input-wrapper-B3FjX76n.js → input-wrapper-uKQO_C6_.js} +2 -2
  201. package/dist/{input-wrapper-B3FjX76n.js.map → input-wrapper-uKQO_C6_.js.map} +1 -1
  202. package/dist/{label-value-BawoCisD.js → label-value-BadY_U3T.js} +5 -5
  203. package/dist/{label-value-BawoCisD.js.map → label-value-BadY_U3T.js.map} +1 -1
  204. package/dist/label-value-layout/index.js +2 -2
  205. package/dist/{label-value-layout-Cv5FYWlQ.js → label-value-layout-BMj_6nzd.js} +2 -2
  206. package/dist/{label-value-layout-Cv5FYWlQ.js.map → label-value-layout-BMj_6nzd.js.map} +1 -1
  207. package/dist/label-value-render/index.js +5 -5
  208. package/dist/{layout-OPf8eBBY.js → layout-Bl4P3Cv6.js} +2 -2
  209. package/dist/{layout-OPf8eBBY.js.map → layout-Bl4P3Cv6.js.map} +1 -1
  210. package/dist/local-loading/index.js +1 -1
  211. package/dist/mention-editor/index.js +3 -3
  212. package/dist/{mention-editor-GK6I91p1.js → mention-editor-OACZLcF7.js} +3 -3
  213. package/dist/{mention-editor-GK6I91p1.js.map → mention-editor-OACZLcF7.js.map} +1 -1
  214. package/dist/{mentions-CZv5lHej.js → mentions-BRY_sAl9.js} +2 -2
  215. package/dist/{mentions-CZv5lHej.js.map → mentions-BRY_sAl9.js.map} +1 -1
  216. package/dist/mentions-wrapper/index.js +2 -2
  217. package/dist/modal-action/index.js +2 -2
  218. package/dist/{modal-action-eYHh8gcR.js → modal-action-CdaBPYhO.js} +2 -2
  219. package/dist/{modal-action-eYHh8gcR.js.map → modal-action-CdaBPYhO.js.map} +1 -1
  220. package/dist/{number-range-D8E6asPy.js → number-range-CByi394c.js} +4 -4
  221. package/dist/{number-range-D8E6asPy.js.map → number-range-CByi394c.js.map} +1 -1
  222. package/dist/number-range-form-item/index.js +4 -4
  223. package/dist/{pagination-BNbiyV-n.js → pagination-B42W0Zo3.js} +2 -2
  224. package/dist/{pagination-BNbiyV-n.js.map → pagination-B42W0Zo3.js.map} +1 -1
  225. package/dist/pagination-wrapper/index.js +2 -2
  226. package/dist/pdf/index.js +1 -1
  227. package/dist/pdf-preview/index.js +2 -2
  228. package/dist/{preview-ChAgzijh.js → preview-BDryCcSx.js} +2 -2
  229. package/dist/{preview-ChAgzijh.js.map → preview-BDryCcSx.js.map} +1 -1
  230. package/dist/{preview-image-DP4umDzQ.js → preview-image-Dxw8Vx6a.js} +2 -2
  231. package/dist/{preview-image-DP4umDzQ.js.map → preview-image-Dxw8Vx6a.js.map} +1 -1
  232. package/dist/relation-tree/index.js +2 -2
  233. package/dist/{relation-tree-DC2_zwoC.js → relation-tree-C6XAfRoa.js} +2 -2
  234. package/dist/{relation-tree-DC2_zwoC.js.map → relation-tree-C6XAfRoa.js.map} +1 -1
  235. package/dist/request-status/index.js +3 -3
  236. package/dist/{request-status-BNGBHA33.js → request-status-CJ_zkp3v.js} +2 -2
  237. package/dist/{request-status-BNGBHA33.js.map → request-status-CJ_zkp3v.js.map} +1 -1
  238. package/dist/rich-text-editor/index.js +2 -2
  239. package/dist/{rich-text-editor-CNUydd_0.js → rich-text-editor-BMDEIxeg.js} +2 -2
  240. package/dist/{rich-text-editor-CNUydd_0.js.map → rich-text-editor-BMDEIxeg.js.map} +1 -1
  241. package/dist/rich-text-viewer/index.js +4 -4
  242. package/dist/{rich-text-viewer-DzVbDTzM.js → rich-text-viewer-BoeWMAbJ.js} +4 -4
  243. package/dist/{rich-text-viewer-DzVbDTzM.js.map → rich-text-viewer-BoeWMAbJ.js.map} +1 -1
  244. package/dist/roll-location-center/index.js +1 -1
  245. package/dist/roll-location-in-view/index.js +1 -1
  246. package/dist/rule-describe/index.js +3 -3
  247. package/dist/{rule-describe-C5WtQSl2.js → rule-describe-BZqpizoH.js} +2 -2
  248. package/dist/{rule-describe-C5WtQSl2.js.map → rule-describe-BZqpizoH.js.map} +1 -1
  249. package/dist/{search-cwSkh4xF.js → search-ZcmX1Q6C.js} +4 -4
  250. package/dist/{search-cwSkh4xF.js.map → search-ZcmX1Q6C.js.map} +1 -1
  251. package/dist/search-form/index.js +5 -5
  252. package/dist/search-menu/index.js +3 -3
  253. package/dist/{search-menu-mRPEczbZ.js → search-menu-BT9wgBth.js} +3 -3
  254. package/dist/{search-menu-mRPEczbZ.js.map → search-menu-BT9wgBth.js.map} +1 -1
  255. package/dist/{selector-DhN_bftS.js → selector-Bt2nQLHF.js} +23 -8
  256. package/dist/selector-Bt2nQLHF.js.map +1 -0
  257. package/dist/{selector-DCHIIlhe.js → selector-DmDKP__k.js} +3 -3
  258. package/dist/{selector-DCHIIlhe.js.map → selector-DmDKP__k.js.map} +1 -1
  259. package/dist/selector-wrapper/index.js +4 -4
  260. package/dist/{selector-wrapper-B-e6C1QH.js → selector-wrapper-gY1oRe4Y.js} +3 -3
  261. package/dist/{selector-wrapper-B-e6C1QH.js.map → selector-wrapper-gY1oRe4Y.js.map} +1 -1
  262. package/dist/selector-wrapper-search/index.js +4 -4
  263. package/dist/{selector-wrapper-search-SSgguTqk.js → selector-wrapper-search-cCVI4svG.js} +3 -3
  264. package/dist/{selector-wrapper-search-SSgguTqk.js.map → selector-wrapper-search-cCVI4svG.js.map} +1 -1
  265. package/dist/selector-wrapper-simple/index.js +4 -4
  266. package/dist/{selector-wrapper-simple-BEpLCh5_.js → selector-wrapper-simple-CdvME51-.js} +3 -3
  267. package/dist/{selector-wrapper-simple-BEpLCh5_.js.map → selector-wrapper-simple-CdvME51-.js.map} +1 -1
  268. package/dist/simple-layout/index.js +1 -1
  269. package/dist/sms-count-down/index.js +2 -2
  270. package/dist/{sms-count-down-DI31OzNh.js → sms-count-down-C2JyVn9C.js} +2 -2
  271. package/dist/{sms-count-down-DI31OzNh.js.map → sms-count-down-C2JyVn9C.js.map} +1 -1
  272. package/dist/{span-LqW6gk2r.js → span-DWxMz7SD.js} +2 -2
  273. package/dist/{span-LqW6gk2r.js.map → span-DWxMz7SD.js.map} +1 -1
  274. package/dist/{split-BFqZ2i6c.js → split-hdcaLHCj.js} +2 -2
  275. package/dist/{split-BFqZ2i6c.js.map → split-hdcaLHCj.js.map} +1 -1
  276. package/dist/split-wrapper/index.js +2 -2
  277. package/dist/{svg-DXIM5sfc.js → svg-7tZHNcxX.js} +2 -2
  278. package/dist/{svg-DXIM5sfc.js.map → svg-7tZHNcxX.js.map} +1 -1
  279. package/dist/svg-http-view/index.js +2 -2
  280. package/dist/switch-confirm-wrapper/index.js +2 -2
  281. package/dist/{switch-confirm-wrapper-BW9G4u03.js → switch-confirm-wrapper-Dy1NP5Jr.js} +2 -2
  282. package/dist/{switch-confirm-wrapper-BW9G4u03.js.map → switch-confirm-wrapper-Dy1NP5Jr.js.map} +1 -1
  283. package/dist/switch-wrapper/index.js +2 -2
  284. package/dist/{switch-wrapper-CfxaLAKg.js → switch-wrapper-6Cz0lmJf.js} +2 -2
  285. package/dist/{switch-wrapper-CfxaLAKg.js.map → switch-wrapper-6Cz0lmJf.js.map} +1 -1
  286. package/dist/{symbol-CX0y_DJ4.js → symbol-CE0FGxOG.js} +2 -2
  287. package/dist/{symbol-CX0y_DJ4.js.map → symbol-CE0FGxOG.js.map} +1 -1
  288. package/dist/table-cell-render/index.d.ts +2 -0
  289. package/dist/table-cell-render/index.js +10 -10
  290. package/dist/table-scrollbar/index.js +2 -2
  291. package/dist/{table-scrollbar-CBqQ4pYQ.js → table-scrollbar-BdG-x6ZM.js} +2 -2
  292. package/dist/{table-scrollbar-CBqQ4pYQ.js.map → table-scrollbar-BdG-x6ZM.js.map} +1 -1
  293. package/dist/{tabs-RgWLRNpM.js → tabs-Co68dF0x.js} +2 -2
  294. package/dist/{tabs-RgWLRNpM.js.map → tabs-Co68dF0x.js.map} +1 -1
  295. package/dist/tabs-sticky/index.js +2 -2
  296. package/dist/tabs-wrapper/index.css +1 -1
  297. package/dist/tabs-wrapper/index.js +2 -2
  298. package/dist/{tabs-wrapper-CAj9ErGH.js → tabs-wrapper-BXLWJgLy.js} +2 -2
  299. package/dist/{tabs-wrapper-CAj9ErGH.js.map → tabs-wrapper-BXLWJgLy.js.map} +1 -1
  300. package/dist/tag-group/index.js +2 -2
  301. package/dist/{tag-group-BInmv_6s.js → tag-group-DRGR3Av9.js} +2 -2
  302. package/dist/{tag-group-BInmv_6s.js.map → tag-group-DRGR3Av9.js.map} +1 -1
  303. package/dist/{tag-list-Z6yWz3Id.js → tag-list-DgAFiV_K.js} +2 -2
  304. package/dist/{tag-list-Z6yWz3Id.js.map → tag-list-DgAFiV_K.js.map} +1 -1
  305. package/dist/tag-list-render/index.js +2 -2
  306. package/dist/tag-wrapper/index.js +2 -2
  307. package/dist/{tag-wrapper-BmGPE1YG.js → tag-wrapper-CDjtf4e8.js} +2 -2
  308. package/dist/{tag-wrapper-BmGPE1YG.js.map → tag-wrapper-CDjtf4e8.js.map} +1 -1
  309. package/dist/text-overflow/index.js +2 -2
  310. package/dist/{text-overflow-Bk9MC6Cg.js → text-overflow-MS3fPWKe.js} +2 -2
  311. package/dist/{text-overflow-Bk9MC6Cg.js.map → text-overflow-MS3fPWKe.js.map} +1 -1
  312. package/dist/text-symbol-wrapper/index.js +2 -2
  313. package/dist/time-picker-wrapper/index.js +2 -2
  314. package/dist/{time-picker-wrapper-Dx69Z9kc.js → time-picker-wrapper-UPKqZ4U5.js} +2 -2
  315. package/dist/{time-picker-wrapper-Dx69Z9kc.js.map → time-picker-wrapper-UPKqZ4U5.js.map} +1 -1
  316. package/dist/time-range-picker-wrapper/index.js +2 -2
  317. package/dist/{time-range-picker-wrapper-BpQQjbcu.js → time-range-picker-wrapper-B7bl-p2p.js} +2 -2
  318. package/dist/{time-range-picker-wrapper-BpQQjbcu.js.map → time-range-picker-wrapper-B7bl-p2p.js.map} +1 -1
  319. package/dist/time-range-picker-wrapper-form-item/index.js +4 -4
  320. package/dist/{time-range-picker-wrapper-form-item-BSE3DCEy.js → time-range-picker-wrapper-form-item-BXkIqi-2.js} +4 -4
  321. package/dist/{time-range-picker-wrapper-form-item-BSE3DCEy.js.map → time-range-picker-wrapper-form-item-BXkIqi-2.js.map} +1 -1
  322. package/dist/tips-title/index.js +2 -2
  323. package/dist/{tips-title-DWwc8kJv.js → tips-title-Bst97YH9.js} +2 -2
  324. package/dist/{tips-title-DWwc8kJv.js.map → tips-title-Bst97YH9.js.map} +1 -1
  325. package/dist/tips-wrapper/index.js +2 -2
  326. package/dist/{tips-wrapper-Bf9nfZq3.js → tips-wrapper-DjVZ0hGy.js} +2 -2
  327. package/dist/{tips-wrapper-Bf9nfZq3.js.map → tips-wrapper-DjVZ0hGy.js.map} +1 -1
  328. package/dist/tree-modal/index.d.ts +2 -0
  329. package/dist/tree-modal/index.js +13 -13
  330. package/dist/tree-modal-selector/index.d.ts +26 -1
  331. package/dist/tree-modal-selector/index.js +14 -14
  332. package/dist/tree-selector-wrapper/index.js +4 -4
  333. package/dist/tree-wrapper/index.d.ts +2 -0
  334. package/dist/tree-wrapper/index.js +13 -13
  335. package/dist/tree-wrapper/index.js.map +1 -1
  336. package/dist/upload-wrapper/index.d.ts +1 -1
  337. package/dist/upload-wrapper/index.js +4 -4
  338. package/dist/{upload-wrapper-CwKeqggJ.js → upload-wrapper-BUz9bu5L.js} +4 -4
  339. package/dist/upload-wrapper-BUz9bu5L.js.map +1 -0
  340. package/dist/x-mind-preview/index.js +2 -2
  341. package/dist/{x-mind-preview-BxHDc_lA.js → x-mind-preview-z-MeFlwz.js} +2 -2
  342. package/dist/{x-mind-preview-BxHDc_lA.js.map → x-mind-preview-z-MeFlwz.js.map} +1 -1
  343. package/package.json +7 -3
  344. package/dist/button-operate-C6dir05R.js.map +0 -1
  345. package/dist/selector-DhN_bftS.js.map +0 -1
  346. package/dist/upload-wrapper-CwKeqggJ.js.map +0 -1
@@ -0,0 +1,1860 @@
1
+ /*! @flatjs/forge MIT @flatbiz/antd */
2
+
3
+ import { isString } from '@dimjs/lang/is-string';
4
+ import _CloseOutlined from '@ant-design/icons/es/icons/CloseOutlined.js';
5
+ import { b as _objectSpread2, i as _defineProperty, e as _inherits, f as _createClass, g as _classCallCheck, h as _callSuper, a as _slicedToArray, _ as _objectWithoutProperties } from './_rollupPluginBabelHelpers-CP5aeNcJ.js';
6
+ import { hooks } from '@wove/react/hooks';
7
+ import React__default, { useState, useMemo } from 'react';
8
+ import { createRoot } from 'react-dom/client';
9
+ import 'react-is';
10
+ import require$$2 from 'react-dom';
11
+ import { useSize } from 'ahooks';
12
+ import { Form, Space } from 'antd';
13
+ import { dom } from '@flatbiz/utils';
14
+ import { B as ButtonWrapper } from './button-wrapper-C2koH6hy.js';
15
+ import { fbaHooks } from './fba-hooks/index.js';
16
+ import { G as Gap } from './gap-D_CWfDQP.js';
17
+ import { I as IconWrapper } from './icon-wrapper-GTNh6wtb.js';
18
+ import { jsx, jsxs } from 'react/jsx-runtime';
19
+
20
+ function getDefaultExportFromCjs (x) {
21
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
22
+ }
23
+
24
+ function getAugmentedNamespace(n) {
25
+ if (n.__esModule) return n;
26
+ var f = n.default;
27
+ if (typeof f == "function") {
28
+ var a = function a () {
29
+ if (this instanceof a) {
30
+ return Reflect.construct(f, arguments, this.constructor);
31
+ }
32
+ return f.apply(this, arguments);
33
+ };
34
+ a.prototype = f.prototype;
35
+ } else a = {};
36
+ Object.defineProperty(a, '__esModule', {value: true});
37
+ Object.keys(n).forEach(function (k) {
38
+ var d = Object.getOwnPropertyDescriptor(n, k);
39
+ Object.defineProperty(a, k, d.get ? d : {
40
+ enumerable: true,
41
+ get: function () {
42
+ return n[k];
43
+ }
44
+ });
45
+ });
46
+ return a;
47
+ }
48
+
49
+ var cjs = {exports: {}};
50
+
51
+ var Draggable$1 = {};
52
+
53
+ var propTypes = {exports: {}};
54
+
55
+ /**
56
+ * Copyright (c) 2013-present, Facebook, Inc.
57
+ *
58
+ * This source code is licensed under the MIT license found in the
59
+ * LICENSE file in the root directory of this source tree.
60
+ */
61
+ var ReactPropTypesSecret_1;
62
+ var hasRequiredReactPropTypesSecret;
63
+ function requireReactPropTypesSecret() {
64
+ if (hasRequiredReactPropTypesSecret) return ReactPropTypesSecret_1;
65
+ hasRequiredReactPropTypesSecret = 1;
66
+ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
67
+ ReactPropTypesSecret_1 = ReactPropTypesSecret;
68
+ return ReactPropTypesSecret_1;
69
+ }
70
+
71
+ /**
72
+ * Copyright (c) 2013-present, Facebook, Inc.
73
+ *
74
+ * This source code is licensed under the MIT license found in the
75
+ * LICENSE file in the root directory of this source tree.
76
+ */
77
+ var factoryWithThrowingShims;
78
+ var hasRequiredFactoryWithThrowingShims;
79
+ function requireFactoryWithThrowingShims() {
80
+ if (hasRequiredFactoryWithThrowingShims) return factoryWithThrowingShims;
81
+ hasRequiredFactoryWithThrowingShims = 1;
82
+ var ReactPropTypesSecret = /*@__PURE__*/requireReactPropTypesSecret();
83
+ function emptyFunction() {}
84
+ function emptyFunctionWithReset() {}
85
+ emptyFunctionWithReset.resetWarningCache = emptyFunction;
86
+ factoryWithThrowingShims = function factoryWithThrowingShims() {
87
+ function shim(props, propName, componentName, location, propFullName, secret) {
88
+ if (secret === ReactPropTypesSecret) {
89
+ // It is still safe when called from React.
90
+ return;
91
+ }
92
+ 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');
93
+ err.name = 'Invariant Violation';
94
+ throw err;
95
+ }
96
+ shim.isRequired = shim;
97
+ function getShim() {
98
+ return shim;
99
+ }
100
+ // Important!
101
+ // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
102
+ var ReactPropTypes = {
103
+ array: shim,
104
+ bigint: shim,
105
+ bool: shim,
106
+ func: shim,
107
+ number: shim,
108
+ object: shim,
109
+ string: shim,
110
+ symbol: shim,
111
+ any: shim,
112
+ arrayOf: getShim,
113
+ element: shim,
114
+ elementType: shim,
115
+ instanceOf: getShim,
116
+ node: shim,
117
+ objectOf: getShim,
118
+ oneOf: getShim,
119
+ oneOfType: getShim,
120
+ shape: getShim,
121
+ exact: getShim,
122
+ checkPropTypes: emptyFunctionWithReset,
123
+ resetWarningCache: emptyFunction
124
+ };
125
+ ReactPropTypes.PropTypes = ReactPropTypes;
126
+ return ReactPropTypes;
127
+ };
128
+ return factoryWithThrowingShims;
129
+ }
130
+
131
+ /**
132
+ * Copyright (c) 2013-present, Facebook, Inc.
133
+ *
134
+ * This source code is licensed under the MIT license found in the
135
+ * LICENSE file in the root directory of this source tree.
136
+ */
137
+ var hasRequiredPropTypes;
138
+ function requirePropTypes() {
139
+ if (hasRequiredPropTypes) return propTypes.exports;
140
+ hasRequiredPropTypes = 1;
141
+ {
142
+ // By explicitly using `prop-types` you are opting into new production behavior.
143
+ // http://fb.me/prop-types-in-prod
144
+ propTypes.exports = /*@__PURE__*/requireFactoryWithThrowingShims()();
145
+ }
146
+ return propTypes.exports;
147
+ }
148
+
149
+ function r(e) {
150
+ var t,
151
+ f,
152
+ n = "";
153
+ 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);
154
+ return n;
155
+ }
156
+ function clsx() {
157
+ for (var e, t, f = 0, n = ""; f < arguments.length;) (e = arguments[f++]) && (t = r(e)) && (n && (n += " "), n += t);
158
+ return n;
159
+ }
160
+
161
+ var clsx_m = /*#__PURE__*/Object.freeze({
162
+ __proto__: null,
163
+ clsx: clsx,
164
+ default: clsx
165
+ });
166
+
167
+ var require$$3 = /*@__PURE__*/getAugmentedNamespace(clsx_m);
168
+
169
+ var domFns = {};
170
+
171
+ var shims = {};
172
+
173
+ var hasRequiredShims;
174
+ function requireShims() {
175
+ if (hasRequiredShims) return shims;
176
+ hasRequiredShims = 1;
177
+ Object.defineProperty(shims, "__esModule", {
178
+ value: true
179
+ });
180
+ shims.dontSetMe = dontSetMe;
181
+ shims.findInArray = findInArray;
182
+ shims.int = int;
183
+ shims.isFunction = isFunction;
184
+ shims.isNum = isNum;
185
+ // @credits https://gist.github.com/rogozhnikoff/a43cfed27c41e4e68cdc
186
+ function findInArray(array /*: Array<any> | TouchList*/, callback /*: Function*/) /*: any*/{
187
+ for (var i = 0, length = array.length; i < length; i++) {
188
+ if (callback.apply(callback, [array[i], i, array])) return array[i];
189
+ }
190
+ }
191
+ function isFunction(func /*: any*/) /*: boolean %checks*/{
192
+ // $FlowIgnore[method-unbinding]
193
+ return typeof func === 'function' || Object.prototype.toString.call(func) === '[object Function]';
194
+ }
195
+ function isNum(num /*: any*/) /*: boolean %checks*/{
196
+ return typeof num === 'number' && !isNaN(num);
197
+ }
198
+ function int(a /*: string*/) /*: number*/{
199
+ return parseInt(a, 10);
200
+ }
201
+ function dontSetMe(props /*: Object*/, propName /*: string*/, componentName /*: string*/) /*: ?Error*/{
202
+ if (props[propName]) {
203
+ return new Error("Invalid prop ".concat(propName, " passed to ").concat(componentName, " - do not set this, set it on the child."));
204
+ }
205
+ }
206
+ return shims;
207
+ }
208
+
209
+ var getPrefix = {};
210
+
211
+ var hasRequiredGetPrefix;
212
+ function requireGetPrefix() {
213
+ if (hasRequiredGetPrefix) return getPrefix;
214
+ hasRequiredGetPrefix = 1;
215
+ Object.defineProperty(getPrefix, "__esModule", {
216
+ value: true
217
+ });
218
+ getPrefix.browserPrefixToKey = browserPrefixToKey;
219
+ getPrefix.browserPrefixToStyle = browserPrefixToStyle;
220
+ getPrefix.default = void 0;
221
+ getPrefix.getPrefix = getPrefix$1;
222
+ var prefixes = ['Moz', 'Webkit', 'O', 'ms'];
223
+ function getPrefix$1() /*: string*/{
224
+ var _window$document;
225
+ var prop /*: string*/ = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'transform';
226
+ // Ensure we're running in an environment where there is actually a global
227
+ // `window` obj
228
+ if (typeof window === 'undefined') return '';
229
+
230
+ // If we're in a pseudo-browser server-side environment, this access
231
+ // path may not exist, so bail out if it doesn't.
232
+ 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;
233
+ if (!style) return '';
234
+ if (prop in style) return '';
235
+ for (var i = 0; i < prefixes.length; i++) {
236
+ if (browserPrefixToKey(prop, prefixes[i]) in style) return prefixes[i];
237
+ }
238
+ return '';
239
+ }
240
+ function browserPrefixToKey(prop /*: string*/, prefix /*: string*/) /*: string*/{
241
+ return prefix ? "".concat(prefix).concat(kebabToTitleCase(prop)) : prop;
242
+ }
243
+ function browserPrefixToStyle(prop /*: string*/, prefix /*: string*/) /*: string*/{
244
+ return prefix ? "-".concat(prefix.toLowerCase(), "-").concat(prop) : prop;
245
+ }
246
+ function kebabToTitleCase(str /*: string*/) /*: string*/{
247
+ var out = '';
248
+ var shouldCapitalize = true;
249
+ for (var i = 0; i < str.length; i++) {
250
+ if (shouldCapitalize) {
251
+ out += str[i].toUpperCase();
252
+ shouldCapitalize = false;
253
+ } else if (str[i] === '-') {
254
+ shouldCapitalize = true;
255
+ } else {
256
+ out += str[i];
257
+ }
258
+ }
259
+ return out;
260
+ }
261
+
262
+ // Default export is the prefix itself, like 'Moz', 'Webkit', etc
263
+ // Note that you may have to re-test for certain things; for instance, Chrome 50
264
+ // can handle unprefixed `transform`, but not unprefixed `user-select`
265
+ getPrefix.default = getPrefix$1() /*: string*/;
266
+ return getPrefix;
267
+ }
268
+
269
+ var hasRequiredDomFns;
270
+ function requireDomFns() {
271
+ if (hasRequiredDomFns) return domFns;
272
+ hasRequiredDomFns = 1;
273
+ Object.defineProperty(domFns, "__esModule", {
274
+ value: true
275
+ });
276
+ domFns.addClassName = addClassName;
277
+ domFns.addEvent = addEvent;
278
+ domFns.addUserSelectStyles = addUserSelectStyles;
279
+ domFns.createCSSTransform = createCSSTransform;
280
+ domFns.createSVGTransform = createSVGTransform;
281
+ domFns.getTouch = getTouch;
282
+ domFns.getTouchIdentifier = getTouchIdentifier;
283
+ domFns.getTranslation = getTranslation;
284
+ domFns.innerHeight = innerHeight;
285
+ domFns.innerWidth = innerWidth;
286
+ domFns.matchesSelector = matchesSelector;
287
+ domFns.matchesSelectorAndParentsTo = matchesSelectorAndParentsTo;
288
+ domFns.offsetXYFromParent = offsetXYFromParent;
289
+ domFns.outerHeight = outerHeight;
290
+ domFns.outerWidth = outerWidth;
291
+ domFns.removeClassName = removeClassName;
292
+ domFns.removeEvent = removeEvent;
293
+ domFns.removeUserSelectStyles = removeUserSelectStyles;
294
+ var _shims = requireShims();
295
+ var _getPrefix = _interopRequireWildcard(requireGetPrefix());
296
+ function _getRequireWildcardCache(nodeInterop) {
297
+ if (typeof WeakMap !== "function") return null;
298
+ var cacheBabelInterop = new WeakMap();
299
+ var cacheNodeInterop = new WeakMap();
300
+ return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) {
301
+ return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
302
+ })(nodeInterop);
303
+ }
304
+ function _interopRequireWildcard(obj, nodeInterop) {
305
+ if (obj && obj.__esModule) {
306
+ return obj;
307
+ }
308
+ if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
309
+ return {
310
+ default: obj
311
+ };
312
+ }
313
+ var cache = _getRequireWildcardCache(nodeInterop);
314
+ if (cache && cache.has(obj)) {
315
+ return cache.get(obj);
316
+ }
317
+ var newObj = {};
318
+ var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
319
+ for (var key in obj) {
320
+ if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
321
+ var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
322
+ if (desc && (desc.get || desc.set)) {
323
+ Object.defineProperty(newObj, key, desc);
324
+ } else {
325
+ newObj[key] = obj[key];
326
+ }
327
+ }
328
+ }
329
+ newObj.default = obj;
330
+ if (cache) {
331
+ cache.set(obj, newObj);
332
+ }
333
+ return newObj;
334
+ }
335
+ /*:: import type {ControlPosition, PositionOffsetControlPosition, MouseTouchEvent} from './types';*/
336
+ var matchesSelectorFunc = '';
337
+ function matchesSelector(el /*: Node*/, selector /*: string*/) /*: boolean*/{
338
+ if (!matchesSelectorFunc) {
339
+ matchesSelectorFunc = (0, _shims.findInArray)(['matches', 'webkitMatchesSelector', 'mozMatchesSelector', 'msMatchesSelector', 'oMatchesSelector'], function (method) {
340
+ // $FlowIgnore: Doesn't think elements are indexable
341
+ return (0, _shims.isFunction)(el[method]);
342
+ });
343
+ }
344
+
345
+ // Might not be found entirely (not an Element?) - in that case, bail
346
+ // $FlowIgnore: Doesn't think elements are indexable
347
+ if (!(0, _shims.isFunction)(el[matchesSelectorFunc])) return false;
348
+
349
+ // $FlowIgnore: Doesn't think elements are indexable
350
+ return el[matchesSelectorFunc](selector);
351
+ }
352
+
353
+ // Works up the tree to the draggable itself attempting to match selector.
354
+ function matchesSelectorAndParentsTo(el /*: Node*/, selector /*: string*/, baseNode /*: Node*/) /*: boolean*/{
355
+ var node = el;
356
+ do {
357
+ if (matchesSelector(node, selector)) return true;
358
+ if (node === baseNode) return false;
359
+ // $FlowIgnore[incompatible-type]
360
+ node = node.parentNode;
361
+ } while (node);
362
+ return false;
363
+ }
364
+ function addEvent(el /*: ?Node*/, event /*: string*/, handler /*: Function*/, inputOptions /*: Object*/) /*: void*/{
365
+ if (!el) return;
366
+ var options = _objectSpread2({
367
+ capture: true
368
+ }, inputOptions);
369
+ // $FlowIgnore[method-unbinding]
370
+ if (el.addEventListener) {
371
+ el.addEventListener(event, handler, options);
372
+ } else if (el.attachEvent) {
373
+ el.attachEvent('on' + event, handler);
374
+ } else {
375
+ // $FlowIgnore: Doesn't think elements are indexable
376
+ el['on' + event] = handler;
377
+ }
378
+ }
379
+ function removeEvent(el /*: ?Node*/, event /*: string*/, handler /*: Function*/, inputOptions /*: Object*/) /*: void*/{
380
+ if (!el) return;
381
+ var options = _objectSpread2({
382
+ capture: true
383
+ }, inputOptions);
384
+ // $FlowIgnore[method-unbinding]
385
+ if (el.removeEventListener) {
386
+ el.removeEventListener(event, handler, options);
387
+ } else if (el.detachEvent) {
388
+ el.detachEvent('on' + event, handler);
389
+ } else {
390
+ // $FlowIgnore: Doesn't think elements are indexable
391
+ el['on' + event] = null;
392
+ }
393
+ }
394
+ function outerHeight(node /*: HTMLElement*/) /*: number*/{
395
+ // This is deliberately excluding margin for our calculations, since we are using
396
+ // offsetTop which is including margin. See getBoundPosition
397
+ var height = node.clientHeight;
398
+ var computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);
399
+ height += (0, _shims.int)(computedStyle.borderTopWidth);
400
+ height += (0, _shims.int)(computedStyle.borderBottomWidth);
401
+ return height;
402
+ }
403
+ function outerWidth(node /*: HTMLElement*/) /*: number*/{
404
+ // This is deliberately excluding margin for our calculations, since we are using
405
+ // offsetLeft which is including margin. See getBoundPosition
406
+ var width = node.clientWidth;
407
+ var computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);
408
+ width += (0, _shims.int)(computedStyle.borderLeftWidth);
409
+ width += (0, _shims.int)(computedStyle.borderRightWidth);
410
+ return width;
411
+ }
412
+ function innerHeight(node /*: HTMLElement*/) /*: number*/{
413
+ var height = node.clientHeight;
414
+ var computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);
415
+ height -= (0, _shims.int)(computedStyle.paddingTop);
416
+ height -= (0, _shims.int)(computedStyle.paddingBottom);
417
+ return height;
418
+ }
419
+ function innerWidth(node /*: HTMLElement*/) /*: number*/{
420
+ var width = node.clientWidth;
421
+ var computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);
422
+ width -= (0, _shims.int)(computedStyle.paddingLeft);
423
+ width -= (0, _shims.int)(computedStyle.paddingRight);
424
+ return width;
425
+ }
426
+ /*:: interface EventWithOffset {
427
+ clientX: number, clientY: number
428
+ }*/
429
+ // Get from offsetParent
430
+ function offsetXYFromParent(evt /*: EventWithOffset*/, offsetParent /*: HTMLElement*/, scale /*: number*/) /*: ControlPosition*/{
431
+ var isBody = offsetParent === offsetParent.ownerDocument.body;
432
+ var offsetParentRect = isBody ? {
433
+ left: 0,
434
+ top: 0
435
+ } : offsetParent.getBoundingClientRect();
436
+ var x = (evt.clientX + offsetParent.scrollLeft - offsetParentRect.left) / scale;
437
+ var y = (evt.clientY + offsetParent.scrollTop - offsetParentRect.top) / scale;
438
+ return {
439
+ x: x,
440
+ y: y
441
+ };
442
+ }
443
+ function createCSSTransform(controlPos /*: ControlPosition*/, positionOffset /*: PositionOffsetControlPosition*/) /*: Object*/{
444
+ var translation = getTranslation(controlPos, positionOffset, 'px');
445
+ return _defineProperty({}, (0, _getPrefix.browserPrefixToKey)('transform', _getPrefix.default), translation);
446
+ }
447
+ function createSVGTransform(controlPos /*: ControlPosition*/, positionOffset /*: PositionOffsetControlPosition*/) /*: string*/{
448
+ var translation = getTranslation(controlPos, positionOffset, '');
449
+ return translation;
450
+ }
451
+ function getTranslation(_ref /*:: */, positionOffset /*: PositionOffsetControlPosition*/, unitSuffix /*: string*/) /*: string*/{
452
+ var x = _ref.x,
453
+ y = _ref.y;
454
+ var translation = "translate(".concat(x).concat(unitSuffix, ",").concat(y).concat(unitSuffix, ")");
455
+ if (positionOffset) {
456
+ var defaultX = "".concat(typeof positionOffset.x === 'string' ? positionOffset.x : positionOffset.x + unitSuffix);
457
+ var defaultY = "".concat(typeof positionOffset.y === 'string' ? positionOffset.y : positionOffset.y + unitSuffix);
458
+ translation = "translate(".concat(defaultX, ", ").concat(defaultY, ")") + translation;
459
+ }
460
+ return translation;
461
+ }
462
+ function getTouch(e /*: MouseTouchEvent*/, identifier /*: number*/) /*: ?{clientX: number, clientY: number}*/{
463
+ return e.targetTouches && (0, _shims.findInArray)(e.targetTouches, function (t) {
464
+ return identifier === t.identifier;
465
+ }) || e.changedTouches && (0, _shims.findInArray)(e.changedTouches, function (t) {
466
+ return identifier === t.identifier;
467
+ });
468
+ }
469
+ function getTouchIdentifier(e /*: MouseTouchEvent*/) /*: ?number*/{
470
+ if (e.targetTouches && e.targetTouches[0]) return e.targetTouches[0].identifier;
471
+ if (e.changedTouches && e.changedTouches[0]) return e.changedTouches[0].identifier;
472
+ }
473
+
474
+ // User-select Hacks:
475
+ //
476
+ // Useful for preventing blue highlights all over everything when dragging.
477
+
478
+ // Note we're passing `document` b/c we could be iframed
479
+ function addUserSelectStyles(doc /*: ?Document*/) {
480
+ if (!doc) return;
481
+ var styleEl = doc.getElementById('react-draggable-style-el');
482
+ if (!styleEl) {
483
+ styleEl = doc.createElement('style');
484
+ styleEl.type = 'text/css';
485
+ styleEl.id = 'react-draggable-style-el';
486
+ styleEl.innerHTML = '.react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n';
487
+ styleEl.innerHTML += '.react-draggable-transparent-selection *::selection {all: inherit;}\n';
488
+ doc.getElementsByTagName('head')[0].appendChild(styleEl);
489
+ }
490
+ if (doc.body) addClassName(doc.body, 'react-draggable-transparent-selection');
491
+ }
492
+ function removeUserSelectStyles(doc /*: ?Document*/) {
493
+ if (!doc) return;
494
+ try {
495
+ if (doc.body) removeClassName(doc.body, 'react-draggable-transparent-selection');
496
+ // $FlowIgnore: IE
497
+ if (doc.selection) {
498
+ // $FlowIgnore: IE
499
+ doc.selection.empty();
500
+ } else {
501
+ // Remove selection caused by scroll, unless it's a focused input
502
+ // (we use doc.defaultView in case we're in an iframe)
503
+ var selection = (doc.defaultView || window).getSelection();
504
+ if (selection && selection.type !== 'Caret') {
505
+ selection.removeAllRanges();
506
+ }
507
+ }
508
+ } catch (e) {
509
+ // probably IE
510
+ }
511
+ }
512
+ function addClassName(el /*: HTMLElement*/, className /*: string*/) {
513
+ if (el.classList) {
514
+ el.classList.add(className);
515
+ } else {
516
+ if (!el.className.match(new RegExp("(?:^|\\s)".concat(className, "(?!\\S)")))) {
517
+ el.className += " ".concat(className);
518
+ }
519
+ }
520
+ }
521
+ function removeClassName(el /*: HTMLElement*/, className /*: string*/) {
522
+ if (el.classList) {
523
+ el.classList.remove(className);
524
+ } else {
525
+ el.className = el.className.replace(new RegExp("(?:^|\\s)".concat(className, "(?!\\S)"), 'g'), '');
526
+ }
527
+ }
528
+ return domFns;
529
+ }
530
+
531
+ var positionFns = {};
532
+
533
+ var hasRequiredPositionFns;
534
+ function requirePositionFns() {
535
+ if (hasRequiredPositionFns) return positionFns;
536
+ hasRequiredPositionFns = 1;
537
+ Object.defineProperty(positionFns, "__esModule", {
538
+ value: true
539
+ });
540
+ positionFns.canDragX = canDragX;
541
+ positionFns.canDragY = canDragY;
542
+ positionFns.createCoreData = createCoreData;
543
+ positionFns.createDraggableData = createDraggableData;
544
+ positionFns.getBoundPosition = getBoundPosition;
545
+ positionFns.getControlPosition = getControlPosition;
546
+ positionFns.snapToGrid = snapToGrid;
547
+ var _shims = requireShims();
548
+ var _domFns = requireDomFns();
549
+ /*:: import type Draggable from '../Draggable';*/
550
+ /*:: import type {Bounds, ControlPosition, DraggableData, MouseTouchEvent} from './types';*/
551
+ /*:: import type DraggableCore from '../DraggableCore';*/
552
+ function getBoundPosition(draggable /*: Draggable*/, x /*: number*/, y /*: number*/) /*: [number, number]*/{
553
+ // If no bounds, short-circuit and move on
554
+ if (!draggable.props.bounds) return [x, y];
555
+
556
+ // Clone new bounds
557
+ var bounds = draggable.props.bounds;
558
+ bounds = typeof bounds === 'string' ? bounds : cloneBounds(bounds);
559
+ var node = findDOMNode(draggable);
560
+ if (typeof bounds === 'string') {
561
+ var ownerDocument = node.ownerDocument;
562
+ var ownerWindow = ownerDocument.defaultView;
563
+ var boundNode;
564
+ if (bounds === 'parent') {
565
+ boundNode = node.parentNode;
566
+ } else {
567
+ boundNode = ownerDocument.querySelector(bounds);
568
+ }
569
+ if (!(boundNode instanceof ownerWindow.HTMLElement)) {
570
+ throw new Error('Bounds selector "' + bounds + '" could not find an element.');
571
+ }
572
+ var boundNodeEl /*: HTMLElement*/ = boundNode; // for Flow, can't seem to refine correctly
573
+ var nodeStyle = ownerWindow.getComputedStyle(node);
574
+ var boundNodeStyle = ownerWindow.getComputedStyle(boundNodeEl);
575
+ // Compute bounds. This is a pain with padding and offsets but this gets it exactly right.
576
+ bounds = {
577
+ left: -node.offsetLeft + (0, _shims.int)(boundNodeStyle.paddingLeft) + (0, _shims.int)(nodeStyle.marginLeft),
578
+ top: -node.offsetTop + (0, _shims.int)(boundNodeStyle.paddingTop) + (0, _shims.int)(nodeStyle.marginTop),
579
+ right: (0, _domFns.innerWidth)(boundNodeEl) - (0, _domFns.outerWidth)(node) - node.offsetLeft + (0, _shims.int)(boundNodeStyle.paddingRight) - (0, _shims.int)(nodeStyle.marginRight),
580
+ bottom: (0, _domFns.innerHeight)(boundNodeEl) - (0, _domFns.outerHeight)(node) - node.offsetTop + (0, _shims.int)(boundNodeStyle.paddingBottom) - (0, _shims.int)(nodeStyle.marginBottom)
581
+ };
582
+ }
583
+
584
+ // Keep x and y below right and bottom limits...
585
+ if ((0, _shims.isNum)(bounds.right)) x = Math.min(x, bounds.right);
586
+ if ((0, _shims.isNum)(bounds.bottom)) y = Math.min(y, bounds.bottom);
587
+
588
+ // But above left and top limits.
589
+ if ((0, _shims.isNum)(bounds.left)) x = Math.max(x, bounds.left);
590
+ if ((0, _shims.isNum)(bounds.top)) y = Math.max(y, bounds.top);
591
+ return [x, y];
592
+ }
593
+ function snapToGrid(grid /*: [number, number]*/, pendingX /*: number*/, pendingY /*: number*/) /*: [number, number]*/{
594
+ var x = Math.round(pendingX / grid[0]) * grid[0];
595
+ var y = Math.round(pendingY / grid[1]) * grid[1];
596
+ return [x, y];
597
+ }
598
+ function canDragX(draggable /*: Draggable*/) /*: boolean*/{
599
+ return draggable.props.axis === 'both' || draggable.props.axis === 'x';
600
+ }
601
+ function canDragY(draggable /*: Draggable*/) /*: boolean*/{
602
+ return draggable.props.axis === 'both' || draggable.props.axis === 'y';
603
+ }
604
+
605
+ // Get {x, y} positions from event.
606
+ function getControlPosition(e /*: MouseTouchEvent*/, touchIdentifier /*: ?number*/, draggableCore /*: DraggableCore*/) /*: ?ControlPosition*/{
607
+ var touchObj = typeof touchIdentifier === 'number' ? (0, _domFns.getTouch)(e, touchIdentifier) : null;
608
+ if (typeof touchIdentifier === 'number' && !touchObj) return null; // not the right touch
609
+ var node = findDOMNode(draggableCore);
610
+ // User can provide an offsetParent if desired.
611
+ var offsetParent = draggableCore.props.offsetParent || node.offsetParent || node.ownerDocument.body;
612
+ return (0, _domFns.offsetXYFromParent)(touchObj || e, offsetParent, draggableCore.props.scale);
613
+ }
614
+
615
+ // Create an data object exposed by <DraggableCore>'s events
616
+ function createCoreData(draggable /*: DraggableCore*/, x /*: number*/, y /*: number*/) /*: DraggableData*/{
617
+ var isStart = !(0, _shims.isNum)(draggable.lastX);
618
+ var node = findDOMNode(draggable);
619
+ if (isStart) {
620
+ // If this is our first move, use the x and y as last coords.
621
+ return {
622
+ node: node,
623
+ deltaX: 0,
624
+ deltaY: 0,
625
+ lastX: x,
626
+ lastY: y,
627
+ x: x,
628
+ y: y
629
+ };
630
+ } else {
631
+ // Otherwise calculate proper values.
632
+ return {
633
+ node: node,
634
+ deltaX: x - draggable.lastX,
635
+ deltaY: y - draggable.lastY,
636
+ lastX: draggable.lastX,
637
+ lastY: draggable.lastY,
638
+ x: x,
639
+ y: y
640
+ };
641
+ }
642
+ }
643
+
644
+ // Create an data exposed by <Draggable>'s events
645
+ function createDraggableData(draggable /*: Draggable*/, coreData /*: DraggableData*/) /*: DraggableData*/{
646
+ var scale = draggable.props.scale;
647
+ return {
648
+ node: coreData.node,
649
+ x: draggable.state.x + coreData.deltaX / scale,
650
+ y: draggable.state.y + coreData.deltaY / scale,
651
+ deltaX: coreData.deltaX / scale,
652
+ deltaY: coreData.deltaY / scale,
653
+ lastX: draggable.state.x,
654
+ lastY: draggable.state.y
655
+ };
656
+ }
657
+
658
+ // A lot faster than stringify/parse
659
+ function cloneBounds(bounds /*: Bounds*/) /*: Bounds*/{
660
+ return {
661
+ left: bounds.left,
662
+ top: bounds.top,
663
+ right: bounds.right,
664
+ bottom: bounds.bottom
665
+ };
666
+ }
667
+ function findDOMNode(draggable /*: Draggable | DraggableCore*/) /*: HTMLElement*/{
668
+ var node = draggable.findDOMNode();
669
+ if (!node) {
670
+ throw new Error('<DraggableCore>: Unmounted during event!');
671
+ }
672
+ // $FlowIgnore we can't assert on HTMLElement due to tests... FIXME
673
+ return node;
674
+ }
675
+ return positionFns;
676
+ }
677
+
678
+ var DraggableCore = {};
679
+
680
+ var log = {};
681
+
682
+ var hasRequiredLog;
683
+ function requireLog() {
684
+ if (hasRequiredLog) return log;
685
+ hasRequiredLog = 1;
686
+ Object.defineProperty(log, "__esModule", {
687
+ value: true
688
+ });
689
+ log.default = log$1;
690
+ /*eslint no-console:0*/
691
+ function log$1() {
692
+ }
693
+ return log;
694
+ }
695
+
696
+ var hasRequiredDraggableCore;
697
+ function requireDraggableCore() {
698
+ if (hasRequiredDraggableCore) return DraggableCore;
699
+ hasRequiredDraggableCore = 1;
700
+ Object.defineProperty(DraggableCore, "__esModule", {
701
+ value: true
702
+ });
703
+ DraggableCore.default = void 0;
704
+ var React = _interopRequireWildcard(React__default);
705
+ var _propTypes = _interopRequireDefault(/*@__PURE__*/requirePropTypes());
706
+ var _reactDom = _interopRequireDefault(require$$2);
707
+ var _domFns = requireDomFns();
708
+ var _positionFns = requirePositionFns();
709
+ var _shims = requireShims();
710
+ var _log = _interopRequireDefault(requireLog());
711
+ function _interopRequireDefault(obj) {
712
+ return obj && obj.__esModule ? obj : {
713
+ default: obj
714
+ };
715
+ }
716
+ function _getRequireWildcardCache(nodeInterop) {
717
+ if (typeof WeakMap !== "function") return null;
718
+ var cacheBabelInterop = new WeakMap();
719
+ var cacheNodeInterop = new WeakMap();
720
+ return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) {
721
+ return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
722
+ })(nodeInterop);
723
+ }
724
+ function _interopRequireWildcard(obj, nodeInterop) {
725
+ if (obj && obj.__esModule) {
726
+ return obj;
727
+ }
728
+ if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
729
+ return {
730
+ default: obj
731
+ };
732
+ }
733
+ var cache = _getRequireWildcardCache(nodeInterop);
734
+ if (cache && cache.has(obj)) {
735
+ return cache.get(obj);
736
+ }
737
+ var newObj = {};
738
+ var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
739
+ for (var key in obj) {
740
+ if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
741
+ var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
742
+ if (desc && (desc.get || desc.set)) {
743
+ Object.defineProperty(newObj, key, desc);
744
+ } else {
745
+ newObj[key] = obj[key];
746
+ }
747
+ }
748
+ }
749
+ newObj.default = obj;
750
+ if (cache) {
751
+ cache.set(obj, newObj);
752
+ }
753
+ return newObj;
754
+ }
755
+ function _defineProperty(obj, key, value) {
756
+ key = _toPropertyKey(key);
757
+ if (key in obj) {
758
+ Object.defineProperty(obj, key, {
759
+ value: value,
760
+ enumerable: true,
761
+ configurable: true,
762
+ writable: true
763
+ });
764
+ } else {
765
+ obj[key] = value;
766
+ }
767
+ return obj;
768
+ }
769
+ function _toPropertyKey(arg) {
770
+ var key = _toPrimitive(arg, "string");
771
+ return typeof key === "symbol" ? key : String(key);
772
+ }
773
+ function _toPrimitive(input, hint) {
774
+ if (typeof input !== "object" || input === null) return input;
775
+ var prim = input[Symbol.toPrimitive];
776
+ if (prim !== undefined) {
777
+ var res = prim.call(input, hint || "default");
778
+ if (typeof res !== "object") return res;
779
+ throw new TypeError("@@toPrimitive must return a primitive value.");
780
+ }
781
+ return (hint === "string" ? String : Number)(input);
782
+ }
783
+ /*:: import type {EventHandler, MouseTouchEvent} from './utils/types';*/
784
+ /*:: import type {Element as ReactElement} from 'react';*/
785
+ // Simple abstraction for dragging events names.
786
+ var eventsFor = {
787
+ touch: {
788
+ start: 'touchstart',
789
+ move: 'touchmove',
790
+ stop: 'touchend'
791
+ },
792
+ mouse: {
793
+ start: 'mousedown',
794
+ move: 'mousemove',
795
+ stop: 'mouseup'
796
+ }
797
+ };
798
+
799
+ // Default to mouse events.
800
+ var dragEventFor = eventsFor.mouse;
801
+ /*:: export type DraggableData = {
802
+ node: HTMLElement,
803
+ x: number, y: number,
804
+ deltaX: number, deltaY: number,
805
+ lastX: number, lastY: number,
806
+ };*/
807
+ /*:: export type DraggableEventHandler = (e: MouseEvent, data: DraggableData) => void | false;*/
808
+ /*:: export type ControlPosition = {x: number, y: number};*/
809
+ /*:: export type PositionOffsetControlPosition = {x: number|string, y: number|string};*/
810
+ /*:: export type DraggableCoreDefaultProps = {
811
+ allowAnyClick: boolean,
812
+ disabled: boolean,
813
+ enableUserSelectHack: boolean,
814
+ onStart: DraggableEventHandler,
815
+ onDrag: DraggableEventHandler,
816
+ onStop: DraggableEventHandler,
817
+ onMouseDown: (e: MouseEvent) => void,
818
+ scale: number,
819
+ };*/
820
+ /*:: export type DraggableCoreProps = {
821
+ ...DraggableCoreDefaultProps,
822
+ cancel: string,
823
+ children: ReactElement<any>,
824
+ offsetParent: HTMLElement,
825
+ grid: [number, number],
826
+ handle: string,
827
+ nodeRef?: ?React.ElementRef<any>,
828
+ };*/
829
+ //
830
+ // Define <DraggableCore>.
831
+ //
832
+ // <DraggableCore> is for advanced usage of <Draggable>. It maintains minimal internal state so it can
833
+ // work well with libraries that require more control over the element.
834
+ //
835
+ var DraggableCore$1 = /*#__PURE__*/function (_React$Component) {
836
+ function DraggableCore() {
837
+ var _this;
838
+ _classCallCheck(this, DraggableCore);
839
+ _this = _callSuper(this, DraggableCore, arguments);
840
+ _defineProperty(_this, "dragging", false);
841
+ // Used while dragging to determine deltas.
842
+ _defineProperty(_this, "lastX", NaN);
843
+ _defineProperty(_this, "lastY", NaN);
844
+ _defineProperty(_this, "touchIdentifier", null);
845
+ _defineProperty(_this, "mounted", false);
846
+ _defineProperty(_this, "handleDragStart", function (e) {
847
+ // Make it possible to attach event handlers on top of this one.
848
+ _this.props.onMouseDown(e);
849
+
850
+ // Only accept left-clicks.
851
+ if (!_this.props.allowAnyClick && typeof e.button === 'number' && e.button !== 0) return false;
852
+
853
+ // Get nodes. Be sure to grab relative document (could be iframed)
854
+ var thisNode = _this.findDOMNode();
855
+ if (!thisNode || !thisNode.ownerDocument || !thisNode.ownerDocument.body) {
856
+ throw new Error('<DraggableCore> not mounted on DragStart!');
857
+ }
858
+ var ownerDocument = thisNode.ownerDocument;
859
+
860
+ // Short circuit if handle or cancel prop was provided and selector doesn't match.
861
+ if (_this.props.disabled || !(e.target instanceof ownerDocument.defaultView.Node) || _this.props.handle && !(0, _domFns.matchesSelectorAndParentsTo)(e.target, _this.props.handle, thisNode) || _this.props.cancel && (0, _domFns.matchesSelectorAndParentsTo)(e.target, _this.props.cancel, thisNode)) {
862
+ return;
863
+ }
864
+
865
+ // Prevent scrolling on mobile devices, like ipad/iphone.
866
+ // Important that this is after handle/cancel.
867
+ if (e.type === 'touchstart') e.preventDefault();
868
+
869
+ // Set touch identifier in component state if this is a touch event. This allows us to
870
+ // distinguish between individual touches on multitouch screens by identifying which
871
+ // touchpoint was set to this element.
872
+ var touchIdentifier = (0, _domFns.getTouchIdentifier)(e);
873
+ _this.touchIdentifier = touchIdentifier;
874
+
875
+ // Get the current drag point from the event. This is used as the offset.
876
+ var position = (0, _positionFns.getControlPosition)(e, touchIdentifier, _this);
877
+ if (position == null) return; // not possible but satisfies flow
878
+ var x = position.x,
879
+ y = position.y;
880
+
881
+ // Create an event object with all the data parents need to make a decision here.
882
+ var coreEvent = (0, _positionFns.createCoreData)(_this, x, y);
883
+ (0, _log.default)('DraggableCore: handleDragStart: %j', coreEvent);
884
+
885
+ // Call event handler. If it returns explicit false, cancel.
886
+ (0, _log.default)('calling', _this.props.onStart);
887
+ var shouldUpdate = _this.props.onStart(e, coreEvent);
888
+ if (shouldUpdate === false || _this.mounted === false) return;
889
+
890
+ // Add a style to the body to disable user-select. This prevents text from
891
+ // being selected all over the page.
892
+ if (_this.props.enableUserSelectHack) (0, _domFns.addUserSelectStyles)(ownerDocument);
893
+
894
+ // Initiate dragging. Set the current x and y as offsets
895
+ // so we know how much we've moved during the drag. This allows us
896
+ // to drag elements around even if they have been moved, without issue.
897
+ _this.dragging = true;
898
+ _this.lastX = x;
899
+ _this.lastY = y;
900
+
901
+ // Add events to the document directly so we catch when the user's mouse/touch moves outside of
902
+ // this element. We use different events depending on whether or not we have detected that this
903
+ // is a touch-capable device.
904
+ (0, _domFns.addEvent)(ownerDocument, dragEventFor.move, _this.handleDrag);
905
+ (0, _domFns.addEvent)(ownerDocument, dragEventFor.stop, _this.handleDragStop);
906
+ });
907
+ _defineProperty(_this, "handleDrag", function (e) {
908
+ // Get the current drag point from the event. This is used as the offset.
909
+ var position = (0, _positionFns.getControlPosition)(e, _this.touchIdentifier, _this);
910
+ if (position == null) return;
911
+ var x = position.x,
912
+ y = position.y;
913
+
914
+ // Snap to grid if prop has been provided
915
+ if (Array.isArray(_this.props.grid)) {
916
+ var deltaX = x - _this.lastX,
917
+ deltaY = y - _this.lastY;
918
+ var _ref = (0, _positionFns.snapToGrid)(_this.props.grid, deltaX, deltaY);
919
+ var _ref2 = _slicedToArray(_ref, 2);
920
+ deltaX = _ref2[0];
921
+ deltaY = _ref2[1];
922
+ if (!deltaX && !deltaY) return; // skip useless drag
923
+ x = _this.lastX + deltaX, y = _this.lastY + deltaY;
924
+ }
925
+ var coreEvent = (0, _positionFns.createCoreData)(_this, x, y);
926
+ (0, _log.default)('DraggableCore: handleDrag: %j', coreEvent);
927
+
928
+ // Call event handler. If it returns explicit false, trigger end.
929
+ var shouldUpdate = _this.props.onDrag(e, coreEvent);
930
+ if (shouldUpdate === false || _this.mounted === false) {
931
+ try {
932
+ // $FlowIgnore
933
+ _this.handleDragStop(new MouseEvent('mouseup'));
934
+ } catch (err) {
935
+ // Old browsers
936
+ var event = document.createEvent('MouseEvents') /*: any*/ /*: MouseTouchEvent*/;
937
+ // I see why this insanity was deprecated
938
+ // $FlowIgnore
939
+ event.initMouseEvent('mouseup', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
940
+ _this.handleDragStop(event);
941
+ }
942
+ return;
943
+ }
944
+ _this.lastX = x;
945
+ _this.lastY = y;
946
+ });
947
+ _defineProperty(_this, "handleDragStop", function (e) {
948
+ if (!_this.dragging) return;
949
+ var position = (0, _positionFns.getControlPosition)(e, _this.touchIdentifier, _this);
950
+ if (position == null) return;
951
+ var x = position.x,
952
+ y = position.y;
953
+
954
+ // Snap to grid if prop has been provided
955
+ if (Array.isArray(_this.props.grid)) {
956
+ var deltaX = x - _this.lastX || 0;
957
+ var deltaY = y - _this.lastY || 0;
958
+ var _ref3 = (0, _positionFns.snapToGrid)(_this.props.grid, deltaX, deltaY);
959
+ var _ref4 = _slicedToArray(_ref3, 2);
960
+ deltaX = _ref4[0];
961
+ deltaY = _ref4[1];
962
+ x = _this.lastX + deltaX, y = _this.lastY + deltaY;
963
+ }
964
+ var coreEvent = (0, _positionFns.createCoreData)(_this, x, y);
965
+
966
+ // Call event handler
967
+ var shouldContinue = _this.props.onStop(e, coreEvent);
968
+ if (shouldContinue === false || _this.mounted === false) return false;
969
+ var thisNode = _this.findDOMNode();
970
+ if (thisNode) {
971
+ // Remove user-select hack
972
+ if (_this.props.enableUserSelectHack) (0, _domFns.removeUserSelectStyles)(thisNode.ownerDocument);
973
+ }
974
+ (0, _log.default)('DraggableCore: handleDragStop: %j', coreEvent);
975
+
976
+ // Reset the el.
977
+ _this.dragging = false;
978
+ _this.lastX = NaN;
979
+ _this.lastY = NaN;
980
+ if (thisNode) {
981
+ // Remove event handlers
982
+ (0, _log.default)('DraggableCore: Removing handlers');
983
+ (0, _domFns.removeEvent)(thisNode.ownerDocument, dragEventFor.move, _this.handleDrag);
984
+ (0, _domFns.removeEvent)(thisNode.ownerDocument, dragEventFor.stop, _this.handleDragStop);
985
+ }
986
+ });
987
+ _defineProperty(_this, "onMouseDown", function (e) {
988
+ dragEventFor = eventsFor.mouse; // on touchscreen laptops we could switch back to mouse
989
+
990
+ return _this.handleDragStart(e);
991
+ });
992
+ _defineProperty(_this, "onMouseUp", function (e) {
993
+ dragEventFor = eventsFor.mouse;
994
+ return _this.handleDragStop(e);
995
+ });
996
+ // Same as onMouseDown (start drag), but now consider this a touch device.
997
+ _defineProperty(_this, "onTouchStart", function (e) {
998
+ // We're on a touch device now, so change the event handlers
999
+ dragEventFor = eventsFor.touch;
1000
+ return _this.handleDragStart(e);
1001
+ });
1002
+ _defineProperty(_this, "onTouchEnd", function (e) {
1003
+ // We're on a touch device now, so change the event handlers
1004
+ dragEventFor = eventsFor.touch;
1005
+ return _this.handleDragStop(e);
1006
+ });
1007
+ return _this;
1008
+ }
1009
+ _inherits(DraggableCore, _React$Component);
1010
+ return _createClass(DraggableCore, [{
1011
+ key: "componentDidMount",
1012
+ value: function componentDidMount() {
1013
+ this.mounted = true;
1014
+ // Touch handlers must be added with {passive: false} to be cancelable.
1015
+ // https://developers.google.com/web/updates/2017/01/scrolling-intervention
1016
+ var thisNode = this.findDOMNode();
1017
+ if (thisNode) {
1018
+ (0, _domFns.addEvent)(thisNode, eventsFor.touch.start, this.onTouchStart, {
1019
+ passive: false
1020
+ });
1021
+ }
1022
+ }
1023
+ }, {
1024
+ key: "componentWillUnmount",
1025
+ value: function componentWillUnmount() {
1026
+ this.mounted = false;
1027
+ // Remove any leftover event handlers. Remove both touch and mouse handlers in case
1028
+ // some browser quirk caused a touch event to fire during a mouse move, or vice versa.
1029
+ var thisNode = this.findDOMNode();
1030
+ if (thisNode) {
1031
+ var ownerDocument = thisNode.ownerDocument;
1032
+ (0, _domFns.removeEvent)(ownerDocument, eventsFor.mouse.move, this.handleDrag);
1033
+ (0, _domFns.removeEvent)(ownerDocument, eventsFor.touch.move, this.handleDrag);
1034
+ (0, _domFns.removeEvent)(ownerDocument, eventsFor.mouse.stop, this.handleDragStop);
1035
+ (0, _domFns.removeEvent)(ownerDocument, eventsFor.touch.stop, this.handleDragStop);
1036
+ (0, _domFns.removeEvent)(thisNode, eventsFor.touch.start, this.onTouchStart, {
1037
+ passive: false
1038
+ });
1039
+ if (this.props.enableUserSelectHack) (0, _domFns.removeUserSelectStyles)(ownerDocument);
1040
+ }
1041
+ }
1042
+
1043
+ // React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find
1044
+ // the underlying DOM node ourselves. See the README for more information.
1045
+ }, {
1046
+ key: "findDOMNode",
1047
+ value: function findDOMNode() /*: ?HTMLElement*/{
1048
+ var _this$props, _this$props2;
1049
+ 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);
1050
+ }
1051
+ }, {
1052
+ key: "render",
1053
+ value: function render() /*: React.Element<any>*/{
1054
+ // Reuse the child provided
1055
+ // This makes it flexible to use whatever element is wanted (div, ul, etc)
1056
+ return /*#__PURE__*/React.cloneElement(React.Children.only(this.props.children), {
1057
+ // Note: mouseMove handler is attached to document so it will still function
1058
+ // when the user drags quickly and leaves the bounds of the element.
1059
+ onMouseDown: this.onMouseDown,
1060
+ onMouseUp: this.onMouseUp,
1061
+ // onTouchStart is added on `componentDidMount` so they can be added with
1062
+ // {passive: false}, which allows it to cancel. See
1063
+ // https://developers.google.com/web/updates/2017/01/scrolling-intervention
1064
+ onTouchEnd: this.onTouchEnd
1065
+ });
1066
+ }
1067
+ }]);
1068
+ }(React.Component /*:: <DraggableCoreProps>*/);
1069
+ DraggableCore.default = DraggableCore$1;
1070
+ _defineProperty(DraggableCore$1, "displayName", 'DraggableCore');
1071
+ _defineProperty(DraggableCore$1, "propTypes", {
1072
+ /**
1073
+ * `allowAnyClick` allows dragging using any mouse button.
1074
+ * By default, we only accept the left button.
1075
+ *
1076
+ * Defaults to `false`.
1077
+ */
1078
+ allowAnyClick: _propTypes.default.bool,
1079
+ children: _propTypes.default.node.isRequired,
1080
+ /**
1081
+ * `disabled`, if true, stops the <Draggable> from dragging. All handlers,
1082
+ * with the exception of `onMouseDown`, will not fire.
1083
+ */
1084
+ disabled: _propTypes.default.bool,
1085
+ /**
1086
+ * By default, we add 'user-select:none' attributes to the document body
1087
+ * to prevent ugly text selection during drag. If this is causing problems
1088
+ * for your app, set this to `false`.
1089
+ */
1090
+ enableUserSelectHack: _propTypes.default.bool,
1091
+ /**
1092
+ * `offsetParent`, if set, uses the passed DOM node to compute drag offsets
1093
+ * instead of using the parent node.
1094
+ */
1095
+ offsetParent: function offsetParent(props /*: DraggableCoreProps*/, propName /*: $Keys<DraggableCoreProps>*/) {
1096
+ if (props[propName] && props[propName].nodeType !== 1) {
1097
+ throw new Error('Draggable\'s offsetParent must be a DOM Node.');
1098
+ }
1099
+ },
1100
+ /**
1101
+ * `grid` specifies the x and y that dragging should snap to.
1102
+ */
1103
+ grid: _propTypes.default.arrayOf(_propTypes.default.number),
1104
+ /**
1105
+ * `handle` specifies a selector to be used as the handle that initiates drag.
1106
+ *
1107
+ * Example:
1108
+ *
1109
+ * ```jsx
1110
+ * let App = React.createClass({
1111
+ * render: function () {
1112
+ * return (
1113
+ * <Draggable handle=".handle">
1114
+ * <div>
1115
+ * <div className="handle">Click me to drag</div>
1116
+ * <div>This is some other content</div>
1117
+ * </div>
1118
+ * </Draggable>
1119
+ * );
1120
+ * }
1121
+ * });
1122
+ * ```
1123
+ */
1124
+ handle: _propTypes.default.string,
1125
+ /**
1126
+ * `cancel` specifies a selector to be used to prevent drag initialization.
1127
+ *
1128
+ * Example:
1129
+ *
1130
+ * ```jsx
1131
+ * let App = React.createClass({
1132
+ * render: function () {
1133
+ * return(
1134
+ * <Draggable cancel=".cancel">
1135
+ * <div>
1136
+ * <div className="cancel">You can't drag from here</div>
1137
+ * <div>Dragging here works fine</div>
1138
+ * </div>
1139
+ * </Draggable>
1140
+ * );
1141
+ * }
1142
+ * });
1143
+ * ```
1144
+ */
1145
+ cancel: _propTypes.default.string,
1146
+ /* If running in React Strict mode, ReactDOM.findDOMNode() is deprecated.
1147
+ * Unfortunately, in order for <Draggable> to work properly, we need raw access
1148
+ * to the underlying DOM node. If you want to avoid the warning, pass a `nodeRef`
1149
+ * as in this example:
1150
+ *
1151
+ * function MyComponent() {
1152
+ * const nodeRef = React.useRef(null);
1153
+ * return (
1154
+ * <Draggable nodeRef={nodeRef}>
1155
+ * <div ref={nodeRef}>Example Target</div>
1156
+ * </Draggable>
1157
+ * );
1158
+ * }
1159
+ *
1160
+ * This can be used for arbitrarily nested components, so long as the ref ends up
1161
+ * pointing to the actual child DOM node and not a custom component.
1162
+ */
1163
+ nodeRef: _propTypes.default.object,
1164
+ /**
1165
+ * Called when dragging starts.
1166
+ * If this function returns the boolean false, dragging will be canceled.
1167
+ */
1168
+ onStart: _propTypes.default.func,
1169
+ /**
1170
+ * Called while dragging.
1171
+ * If this function returns the boolean false, dragging will be canceled.
1172
+ */
1173
+ onDrag: _propTypes.default.func,
1174
+ /**
1175
+ * Called when dragging stops.
1176
+ * If this function returns the boolean false, the drag will remain active.
1177
+ */
1178
+ onStop: _propTypes.default.func,
1179
+ /**
1180
+ * A workaround option which can be passed if onMouseDown needs to be accessed,
1181
+ * since it'll always be blocked (as there is internal use of onMouseDown)
1182
+ */
1183
+ onMouseDown: _propTypes.default.func,
1184
+ /**
1185
+ * `scale`, if set, applies scaling while dragging an element
1186
+ */
1187
+ scale: _propTypes.default.number,
1188
+ /**
1189
+ * These properties should be defined on the child, not here.
1190
+ */
1191
+ className: _shims.dontSetMe,
1192
+ style: _shims.dontSetMe,
1193
+ transform: _shims.dontSetMe
1194
+ });
1195
+ _defineProperty(DraggableCore$1, "defaultProps", {
1196
+ allowAnyClick: false,
1197
+ // by default only accept left click
1198
+ disabled: false,
1199
+ enableUserSelectHack: true,
1200
+ onStart: function onStart() {},
1201
+ onDrag: function onDrag() {},
1202
+ onStop: function onStop() {},
1203
+ onMouseDown: function onMouseDown() {},
1204
+ scale: 1
1205
+ });
1206
+ return DraggableCore;
1207
+ }
1208
+
1209
+ var _excluded = ["axis", "bounds", "children", "defaultPosition", "defaultClassName", "defaultClassNameDragging", "defaultClassNameDragged", "position", "positionOffset", "scale"];
1210
+ var hasRequiredDraggable;
1211
+ function requireDraggable() {
1212
+ if (hasRequiredDraggable) return Draggable$1;
1213
+ hasRequiredDraggable = 1;
1214
+ (function (exports) {
1215
+
1216
+ Object.defineProperty(exports, "__esModule", {
1217
+ value: true
1218
+ });
1219
+ Object.defineProperty(exports, "DraggableCore", {
1220
+ enumerable: true,
1221
+ get: function get() {
1222
+ return _DraggableCore.default;
1223
+ }
1224
+ });
1225
+ exports.default = void 0;
1226
+ var React = _interopRequireWildcard(React__default);
1227
+ var _propTypes = _interopRequireDefault(/*@__PURE__*/requirePropTypes());
1228
+ var _reactDom = _interopRequireDefault(require$$2);
1229
+ var _clsx = _interopRequireDefault(require$$3);
1230
+ var _domFns = requireDomFns();
1231
+ var _positionFns = requirePositionFns();
1232
+ var _shims = requireShims();
1233
+ var _DraggableCore = _interopRequireDefault(requireDraggableCore());
1234
+ var _log = _interopRequireDefault(requireLog());
1235
+ function _interopRequireDefault(obj) {
1236
+ return obj && obj.__esModule ? obj : {
1237
+ default: obj
1238
+ };
1239
+ }
1240
+ function _getRequireWildcardCache(nodeInterop) {
1241
+ if (typeof WeakMap !== "function") return null;
1242
+ var cacheBabelInterop = new WeakMap();
1243
+ var cacheNodeInterop = new WeakMap();
1244
+ return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) {
1245
+ return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
1246
+ })(nodeInterop);
1247
+ }
1248
+ function _interopRequireWildcard(obj, nodeInterop) {
1249
+ if (obj && obj.__esModule) {
1250
+ return obj;
1251
+ }
1252
+ if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
1253
+ return {
1254
+ default: obj
1255
+ };
1256
+ }
1257
+ var cache = _getRequireWildcardCache(nodeInterop);
1258
+ if (cache && cache.has(obj)) {
1259
+ return cache.get(obj);
1260
+ }
1261
+ var newObj = {};
1262
+ var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
1263
+ for (var key in obj) {
1264
+ if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
1265
+ var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
1266
+ if (desc && (desc.get || desc.set)) {
1267
+ Object.defineProperty(newObj, key, desc);
1268
+ } else {
1269
+ newObj[key] = obj[key];
1270
+ }
1271
+ }
1272
+ }
1273
+ newObj.default = obj;
1274
+ if (cache) {
1275
+ cache.set(obj, newObj);
1276
+ }
1277
+ return newObj;
1278
+ }
1279
+ function _extends() {
1280
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
1281
+ for (var i = 1; i < arguments.length; i++) {
1282
+ var source = arguments[i];
1283
+ for (var key in source) {
1284
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
1285
+ target[key] = source[key];
1286
+ }
1287
+ }
1288
+ }
1289
+ return target;
1290
+ };
1291
+ return _extends.apply(this, arguments);
1292
+ }
1293
+ function _defineProperty$1(obj, key, value) {
1294
+ key = _toPropertyKey(key);
1295
+ if (key in obj) {
1296
+ Object.defineProperty(obj, key, {
1297
+ value: value,
1298
+ enumerable: true,
1299
+ configurable: true,
1300
+ writable: true
1301
+ });
1302
+ } else {
1303
+ obj[key] = value;
1304
+ }
1305
+ return obj;
1306
+ }
1307
+ function _toPropertyKey(arg) {
1308
+ var key = _toPrimitive(arg, "string");
1309
+ return typeof key === "symbol" ? key : String(key);
1310
+ }
1311
+ function _toPrimitive(input, hint) {
1312
+ if (typeof input !== "object" || input === null) return input;
1313
+ var prim = input[Symbol.toPrimitive];
1314
+ if (prim !== undefined) {
1315
+ var res = prim.call(input, hint || "default");
1316
+ if (typeof res !== "object") return res;
1317
+ throw new TypeError("@@toPrimitive must return a primitive value.");
1318
+ }
1319
+ return (hint === "string" ? String : Number)(input);
1320
+ } /*:: import type {ControlPosition, PositionOffsetControlPosition, DraggableCoreProps, DraggableCoreDefaultProps} from './DraggableCore';*/
1321
+ /*:: import type {Bounds, DraggableEventHandler} from './utils/types';*/
1322
+ /*:: import type {Element as ReactElement} from 'react';*/
1323
+ /*:: type DraggableState = {
1324
+ dragging: boolean,
1325
+ dragged: boolean,
1326
+ x: number, y: number,
1327
+ slackX: number, slackY: number,
1328
+ isElementSVG: boolean,
1329
+ prevPropsPosition: ?ControlPosition,
1330
+ };*/
1331
+ /*:: export type DraggableDefaultProps = {
1332
+ ...DraggableCoreDefaultProps,
1333
+ axis: 'both' | 'x' | 'y' | 'none',
1334
+ bounds: Bounds | string | false,
1335
+ defaultClassName: string,
1336
+ defaultClassNameDragging: string,
1337
+ defaultClassNameDragged: string,
1338
+ defaultPosition: ControlPosition,
1339
+ scale: number,
1340
+ };*/
1341
+ /*:: export type DraggableProps = {
1342
+ ...DraggableCoreProps,
1343
+ ...DraggableDefaultProps,
1344
+ positionOffset: PositionOffsetControlPosition,
1345
+ position: ControlPosition,
1346
+ };*/
1347
+ //
1348
+ // Define <Draggable>
1349
+ //
1350
+ var Draggable = /*#__PURE__*/function (_React$Component) {
1351
+ function Draggable(props /*: DraggableProps*/) {
1352
+ var _this;
1353
+ _classCallCheck(this, Draggable);
1354
+ _this = _callSuper(this, Draggable, [props]);
1355
+ _defineProperty$1(_this, "onDragStart", function (e, coreData) {
1356
+ (0, _log.default)('Draggable: onDragStart: %j', coreData);
1357
+
1358
+ // Short-circuit if user's callback killed it.
1359
+ var shouldStart = _this.props.onStart(e, (0, _positionFns.createDraggableData)(_this, coreData));
1360
+ // Kills start event on core as well, so move handlers are never bound.
1361
+ if (shouldStart === false) return false;
1362
+ _this.setState({
1363
+ dragging: true,
1364
+ dragged: true
1365
+ });
1366
+ });
1367
+ _defineProperty$1(_this, "onDrag", function (e, coreData) {
1368
+ if (!_this.state.dragging) return false;
1369
+ (0, _log.default)('Draggable: onDrag: %j', coreData);
1370
+ var uiData = (0, _positionFns.createDraggableData)(_this, coreData);
1371
+ var newState = {
1372
+ x: uiData.x,
1373
+ y: uiData.y,
1374
+ slackX: 0,
1375
+ slackY: 0
1376
+ };
1377
+
1378
+ // Keep within bounds.
1379
+ if (_this.props.bounds) {
1380
+ // Save original x and y.
1381
+ var x = newState.x,
1382
+ y = newState.y;
1383
+
1384
+ // Add slack to the values used to calculate bound position. This will ensure that if
1385
+ // we start removing slack, the element won't react to it right away until it's been
1386
+ // completely removed.
1387
+ newState.x += _this.state.slackX;
1388
+ newState.y += _this.state.slackY;
1389
+
1390
+ // Get bound position. This will ceil/floor the x and y within the boundaries.
1391
+ var _ref3 = (0, _positionFns.getBoundPosition)(_this, newState.x, newState.y),
1392
+ _ref4 = _slicedToArray(_ref3, 2),
1393
+ newStateX = _ref4[0],
1394
+ newStateY = _ref4[1];
1395
+ newState.x = newStateX;
1396
+ newState.y = newStateY;
1397
+
1398
+ // Recalculate slack by noting how much was shaved by the boundPosition handler.
1399
+ newState.slackX = _this.state.slackX + (x - newState.x);
1400
+ newState.slackY = _this.state.slackY + (y - newState.y);
1401
+
1402
+ // Update the event we fire to reflect what really happened after bounds took effect.
1403
+ uiData.x = newState.x;
1404
+ uiData.y = newState.y;
1405
+ uiData.deltaX = newState.x - _this.state.x;
1406
+ uiData.deltaY = newState.y - _this.state.y;
1407
+ }
1408
+
1409
+ // Short-circuit if user's callback killed it.
1410
+ var shouldUpdate = _this.props.onDrag(e, uiData);
1411
+ if (shouldUpdate === false) return false;
1412
+ _this.setState(newState);
1413
+ });
1414
+ _defineProperty$1(_this, "onDragStop", function (e, coreData) {
1415
+ if (!_this.state.dragging) return false;
1416
+
1417
+ // Short-circuit if user's callback killed it.
1418
+ var shouldContinue = _this.props.onStop(e, (0, _positionFns.createDraggableData)(_this, coreData));
1419
+ if (shouldContinue === false) return false;
1420
+ (0, _log.default)('Draggable: onDragStop: %j', coreData);
1421
+ var newState /*: Partial<DraggableState>*/ = {
1422
+ dragging: false,
1423
+ slackX: 0,
1424
+ slackY: 0
1425
+ };
1426
+
1427
+ // If this is a controlled component, the result of this operation will be to
1428
+ // revert back to the old position. We expect a handler on `onDragStop`, at the least.
1429
+ var controlled = Boolean(_this.props.position);
1430
+ if (controlled) {
1431
+ var _this$props$position = _this.props.position,
1432
+ x = _this$props$position.x,
1433
+ y = _this$props$position.y;
1434
+ newState.x = x;
1435
+ newState.y = y;
1436
+ }
1437
+ _this.setState(newState);
1438
+ });
1439
+ _this.state = {
1440
+ // Whether or not we are currently dragging.
1441
+ dragging: false,
1442
+ // Whether or not we have been dragged before.
1443
+ dragged: false,
1444
+ // Current transform x and y.
1445
+ x: props.position ? props.position.x : props.defaultPosition.x,
1446
+ y: props.position ? props.position.y : props.defaultPosition.y,
1447
+ prevPropsPosition: _objectSpread2({}, props.position),
1448
+ // Used for compensating for out-of-bounds drags
1449
+ slackX: 0,
1450
+ slackY: 0,
1451
+ // Can only determine if SVG after mounting
1452
+ isElementSVG: false
1453
+ };
1454
+ if (props.position && !(props.onDrag || props.onStop)) {
1455
+ // eslint-disable-next-line no-console
1456
+ 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.');
1457
+ }
1458
+ return _this;
1459
+ }
1460
+ _inherits(Draggable, _React$Component);
1461
+ return _createClass(Draggable, [{
1462
+ key: "componentDidMount",
1463
+ value: function componentDidMount() {
1464
+ // Check to see if the element passed is an instanceof SVGElement
1465
+ if (typeof window.SVGElement !== 'undefined' && this.findDOMNode() instanceof window.SVGElement) {
1466
+ this.setState({
1467
+ isElementSVG: true
1468
+ });
1469
+ }
1470
+ }
1471
+ }, {
1472
+ key: "componentWillUnmount",
1473
+ value: function componentWillUnmount() {
1474
+ this.setState({
1475
+ dragging: false
1476
+ }); // prevents invariant if unmounted while dragging
1477
+ }
1478
+
1479
+ // React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find
1480
+ // the underlying DOM node ourselves. See the README for more information.
1481
+ }, {
1482
+ key: "findDOMNode",
1483
+ value: function findDOMNode() /*: ?HTMLElement*/{
1484
+ var _this$props$nodeRef$c, _this$props;
1485
+ 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);
1486
+ }
1487
+ }, {
1488
+ key: "render",
1489
+ value: function render() /*: ReactElement<any>*/{
1490
+ var _this$props2 = this.props;
1491
+ _this$props2.axis;
1492
+ _this$props2.bounds;
1493
+ var children = _this$props2.children,
1494
+ defaultPosition = _this$props2.defaultPosition,
1495
+ defaultClassName = _this$props2.defaultClassName,
1496
+ defaultClassNameDragging = _this$props2.defaultClassNameDragging,
1497
+ defaultClassNameDragged = _this$props2.defaultClassNameDragged,
1498
+ position = _this$props2.position,
1499
+ positionOffset = _this$props2.positionOffset;
1500
+ _this$props2.scale;
1501
+ var draggableCoreProps = _objectWithoutProperties(_this$props2, _excluded);
1502
+ var style = {};
1503
+ var svgTransform = null;
1504
+
1505
+ // If this is controlled, we don't want to move it - unless it's dragging.
1506
+ var controlled = Boolean(position);
1507
+ var draggable = !controlled || this.state.dragging;
1508
+ var validPosition = position || defaultPosition;
1509
+ var transformOpts = {
1510
+ // Set left if horizontal drag is enabled
1511
+ x: (0, _positionFns.canDragX)(this) && draggable ? this.state.x : validPosition.x,
1512
+ // Set top if vertical drag is enabled
1513
+ y: (0, _positionFns.canDragY)(this) && draggable ? this.state.y : validPosition.y
1514
+ };
1515
+
1516
+ // If this element was SVG, we use the `transform` attribute.
1517
+ if (this.state.isElementSVG) {
1518
+ svgTransform = (0, _domFns.createSVGTransform)(transformOpts, positionOffset);
1519
+ } else {
1520
+ // Add a CSS transform to move the element around. This allows us to move the element around
1521
+ // without worrying about whether or not it is relatively or absolutely positioned.
1522
+ // If the item you are dragging already has a transform set, wrap it in a <span> so <Draggable>
1523
+ // has a clean slate.
1524
+ style = (0, _domFns.createCSSTransform)(transformOpts, positionOffset);
1525
+ }
1526
+
1527
+ // Mark with class while dragging
1528
+ var className = (0, _clsx.default)(children.props.className || '', defaultClassName, _defineProperty(_defineProperty({}, defaultClassNameDragging, this.state.dragging), defaultClassNameDragged, this.state.dragged));
1529
+
1530
+ // Reuse the child provided
1531
+ // This makes it flexible to use whatever element is wanted (div, ul, etc)
1532
+ return /*#__PURE__*/React.createElement(_DraggableCore.default, _extends({}, draggableCoreProps, {
1533
+ onStart: this.onDragStart,
1534
+ onDrag: this.onDrag,
1535
+ onStop: this.onDragStop
1536
+ }), /*#__PURE__*/React.cloneElement(React.Children.only(children), {
1537
+ className: className,
1538
+ style: _objectSpread2(_objectSpread2({}, children.props.style), style),
1539
+ transform: svgTransform
1540
+ }));
1541
+ }
1542
+ }], [{
1543
+ key: "getDerivedStateFromProps",
1544
+ value:
1545
+ // React 16.3+
1546
+ // Arity (props, state)
1547
+ function getDerivedStateFromProps(_ref /*:: */, _ref2 /*:: */) /*: ?Partial<DraggableState>*/{
1548
+ var position = _ref.position;
1549
+ var prevPropsPosition = _ref2.prevPropsPosition;
1550
+ // Set x/y if a new position is provided in props that is different than the previous.
1551
+ if (position && (!prevPropsPosition || position.x !== prevPropsPosition.x || position.y !== prevPropsPosition.y)) {
1552
+ (0, _log.default)('Draggable: getDerivedStateFromProps %j', {
1553
+ position: position,
1554
+ prevPropsPosition: prevPropsPosition
1555
+ });
1556
+ return {
1557
+ x: position.x,
1558
+ y: position.y,
1559
+ prevPropsPosition: _objectSpread2({}, position)
1560
+ };
1561
+ }
1562
+ return null;
1563
+ }
1564
+ }]);
1565
+ }(React.Component /*:: <DraggableProps, DraggableState>*/);
1566
+ exports.default = Draggable;
1567
+ _defineProperty$1(Draggable, "displayName", 'Draggable');
1568
+ _defineProperty$1(Draggable, "propTypes", _objectSpread2(_objectSpread2({}, _DraggableCore.default.propTypes), {}, {
1569
+ /**
1570
+ * `axis` determines which axis the draggable can move.
1571
+ *
1572
+ * Note that all callbacks will still return data as normal. This only
1573
+ * controls flushing to the DOM.
1574
+ *
1575
+ * 'both' allows movement horizontally and vertically.
1576
+ * 'x' limits movement to horizontal axis.
1577
+ * 'y' limits movement to vertical axis.
1578
+ * 'none' limits all movement.
1579
+ *
1580
+ * Defaults to 'both'.
1581
+ */
1582
+ axis: _propTypes.default.oneOf(['both', 'x', 'y', 'none']),
1583
+ /**
1584
+ * `bounds` determines the range of movement available to the element.
1585
+ * Available values are:
1586
+ *
1587
+ * 'parent' restricts movement within the Draggable's parent node.
1588
+ *
1589
+ * Alternatively, pass an object with the following properties, all of which are optional:
1590
+ *
1591
+ * {left: LEFT_BOUND, right: RIGHT_BOUND, bottom: BOTTOM_BOUND, top: TOP_BOUND}
1592
+ *
1593
+ * All values are in px.
1594
+ *
1595
+ * Example:
1596
+ *
1597
+ * ```jsx
1598
+ * let App = React.createClass({
1599
+ * render: function () {
1600
+ * return (
1601
+ * <Draggable bounds={{right: 300, bottom: 300}}>
1602
+ * <div>Content</div>
1603
+ * </Draggable>
1604
+ * );
1605
+ * }
1606
+ * });
1607
+ * ```
1608
+ */
1609
+ bounds: _propTypes.default.oneOfType([_propTypes.default.shape({
1610
+ left: _propTypes.default.number,
1611
+ right: _propTypes.default.number,
1612
+ top: _propTypes.default.number,
1613
+ bottom: _propTypes.default.number
1614
+ }), _propTypes.default.string, _propTypes.default.oneOf([false])]),
1615
+ defaultClassName: _propTypes.default.string,
1616
+ defaultClassNameDragging: _propTypes.default.string,
1617
+ defaultClassNameDragged: _propTypes.default.string,
1618
+ /**
1619
+ * `defaultPosition` specifies the x and y that the dragged item should start at
1620
+ *
1621
+ * Example:
1622
+ *
1623
+ * ```jsx
1624
+ * let App = React.createClass({
1625
+ * render: function () {
1626
+ * return (
1627
+ * <Draggable defaultPosition={{x: 25, y: 25}}>
1628
+ * <div>I start with transformX: 25px and transformY: 25px;</div>
1629
+ * </Draggable>
1630
+ * );
1631
+ * }
1632
+ * });
1633
+ * ```
1634
+ */
1635
+ defaultPosition: _propTypes.default.shape({
1636
+ x: _propTypes.default.number,
1637
+ y: _propTypes.default.number
1638
+ }),
1639
+ positionOffset: _propTypes.default.shape({
1640
+ x: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
1641
+ y: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string])
1642
+ }),
1643
+ /**
1644
+ * `position`, if present, defines the current position of the element.
1645
+ *
1646
+ * This is similar to how form elements in React work - if no `position` is supplied, the component
1647
+ * is uncontrolled.
1648
+ *
1649
+ * Example:
1650
+ *
1651
+ * ```jsx
1652
+ * let App = React.createClass({
1653
+ * render: function () {
1654
+ * return (
1655
+ * <Draggable position={{x: 25, y: 25}}>
1656
+ * <div>I start with transformX: 25px and transformY: 25px;</div>
1657
+ * </Draggable>
1658
+ * );
1659
+ * }
1660
+ * });
1661
+ * ```
1662
+ */
1663
+ position: _propTypes.default.shape({
1664
+ x: _propTypes.default.number,
1665
+ y: _propTypes.default.number
1666
+ }),
1667
+ /**
1668
+ * These properties should be defined on the child, not here.
1669
+ */
1670
+ className: _shims.dontSetMe,
1671
+ style: _shims.dontSetMe,
1672
+ transform: _shims.dontSetMe
1673
+ }));
1674
+ _defineProperty$1(Draggable, "defaultProps", _objectSpread2(_objectSpread2({}, _DraggableCore.default.defaultProps), {}, {
1675
+ axis: 'both',
1676
+ bounds: false,
1677
+ defaultClassName: 'react-draggable',
1678
+ defaultClassNameDragging: 'react-draggable-dragging',
1679
+ defaultClassNameDragged: 'react-draggable-dragged',
1680
+ defaultPosition: {
1681
+ x: 0,
1682
+ y: 0
1683
+ },
1684
+ scale: 1
1685
+ }));
1686
+ })(Draggable$1);
1687
+ return Draggable$1;
1688
+ }
1689
+
1690
+ var hasRequiredCjs;
1691
+ function requireCjs() {
1692
+ if (hasRequiredCjs) return cjs.exports;
1693
+ hasRequiredCjs = 1;
1694
+ var _require$$ = requireDraggable(),
1695
+ Draggable = _require$$.default,
1696
+ DraggableCore = _require$$.DraggableCore;
1697
+
1698
+ // 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'.
1699
+ // See https://github.com/mzabriskie/react-draggable/pull/254
1700
+ // and https://github.com/mzabriskie/react-draggable/issues/266
1701
+ cjs.exports = Draggable;
1702
+ cjs.exports.default = Draggable;
1703
+ cjs.exports.DraggableCore = DraggableCore;
1704
+ return cjs.exports;
1705
+ }
1706
+
1707
+ var cjsExports = requireCjs();
1708
+ var Draggable = /*@__PURE__*/getDefaultExportFromCjs(cjsExports);
1709
+
1710
+ var ModalRender = function ModalRender(props) {
1711
+ var _props$footerOperateB, _props$footerOperateA;
1712
+ var screenType = fbaHooks.useResponsivePoint() || '';
1713
+ var _Form$useForm = Form.useForm(),
1714
+ _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
1715
+ form = _Form$useForm2[0];
1716
+ var _useState = useState(true),
1717
+ _useState2 = _slicedToArray(_useState, 2),
1718
+ open = _useState2[0],
1719
+ setOpen = _useState2[1];
1720
+ var onClose = hooks.useCallbackRef(function () {
1721
+ try {
1722
+ setOpen(false);
1723
+ setTimeout(function () {
1724
+ dom.removeBodyChild("#".concat(props.elementId));
1725
+ delete window[props.elementId];
1726
+ }, 100);
1727
+ } catch (_error) {
1728
+ //
1729
+ }
1730
+ setOpen(false);
1731
+ });
1732
+ fbaHooks.useEffectCustom(function () {
1733
+ window[props.elementId] = onClose;
1734
+ }, [onClose]);
1735
+ var hiddenFooter = props.okHidden && props.cancelHidden && !props.footer && !props.footerOperateBeforeRender && !props.footerOperateAfterRender;
1736
+ var htmlSize = useSize(document.querySelector('html'));
1737
+ var bodyStyle = useMemo(function () {
1738
+ var style = {};
1739
+ if (htmlSize) {
1740
+ var height = htmlSize.height;
1741
+ style = {
1742
+ maxHeight: "".concat(height - 200, "px")
1743
+ };
1744
+ }
1745
+ return _objectSpread2(_objectSpread2({}, style), {}, {
1746
+ height: props.bodyHeight
1747
+ });
1748
+ }, [htmlSize, props.bodyHeight]);
1749
+ var modalStyle = useMemo(function () {
1750
+ var style = {
1751
+ opacity: open ? 1 : 0
1752
+ };
1753
+ if (props.event) {
1754
+ var _props$event = props.event,
1755
+ clientX = _props$event.clientX,
1756
+ clientY = _props$event.clientY;
1757
+ style.left = "".concat(clientX + (props.xOffset || 0), "px");
1758
+ var top = clientY - 30 < 0 ? clientY : clientY - 30;
1759
+ style.top = "".concat(top, "px");
1760
+ } else {
1761
+ style.left = props.xOffset;
1762
+ }
1763
+ var isXsSm = ['xs', 'sm'].includes(screenType);
1764
+ if (isXsSm) {
1765
+ return _objectSpread2(_objectSpread2(_objectSpread2({}, style), props.style), {}, {
1766
+ width: '90%',
1767
+ left: '5%'
1768
+ });
1769
+ }
1770
+ return _objectSpread2(_objectSpread2({
1771
+ width: isXsSm ? '90%' : props.width || 500
1772
+ }, style), props.style);
1773
+ }, [open, props.width, props.event, props.xOffset, props.style, screenType]);
1774
+ return /*#__PURE__*/jsx(Draggable, {
1775
+ handle: ".dialog-drag-modal-move-handle",
1776
+ children: /*#__PURE__*/jsxs("div", {
1777
+ className: "dialog-drag-modal",
1778
+ style: modalStyle,
1779
+ children: [/*#__PURE__*/jsxs("div", {
1780
+ className: "dialog-drag-modal-header dialog-drag-modal-move-handle",
1781
+ children: [/*#__PURE__*/jsx("div", {
1782
+ className: "dialog-drag-modal-title",
1783
+ children: props.title
1784
+ }), /*#__PURE__*/jsx(IconWrapper, {
1785
+ className: "dialog-drag-modal-close",
1786
+ icon: /*#__PURE__*/jsx(_CloseOutlined, {}),
1787
+ onClick: onClose
1788
+ })]
1789
+ }), /*#__PURE__*/jsx("div", {
1790
+ className: "dialog-drag-modal-body",
1791
+ style: _objectSpread2({}, bodyStyle),
1792
+ children: typeof props.content === 'function' ? props.content(form, {
1793
+ onClose: onClose
1794
+ }) : props.content
1795
+ }), hiddenFooter ? /*#__PURE__*/jsx(Gap, {
1796
+ className: "dialog-drag-modal-move-handle",
1797
+ height: 20
1798
+ }) : /*#__PURE__*/jsx("div", {
1799
+ className: "dialog-drag-modal-footer dialog-drag-modal-move-handle",
1800
+ children: props.footer ? props.footer(form, {
1801
+ onClose: onClose
1802
+ }) : /*#__PURE__*/jsxs(Space, {
1803
+ children: [(_props$footerOperateB = props.footerOperateBeforeRender) === null || _props$footerOperateB === void 0 ? void 0 : _props$footerOperateB.call(props, form, {
1804
+ onClose: onClose
1805
+ }), /*#__PURE__*/jsx(ButtonWrapper, {
1806
+ type: "default",
1807
+ onClick: onClose,
1808
+ children: "\u53D6\u6D88"
1809
+ }), /*#__PURE__*/jsx(ButtonWrapper, {
1810
+ type: "primary",
1811
+ children: "\u63D0\u4EA4"
1812
+ }), (_props$footerOperateA = props.footerOperateAfterRender) === null || _props$footerOperateA === void 0 ? void 0 : _props$footerOperateA.call(props, form, {
1813
+ onClose: onClose
1814
+ })]
1815
+ })
1816
+ })]
1817
+ })
1818
+ });
1819
+ };
1820
+ var dialogDragModal = {
1821
+ open: function open(props) {
1822
+ if (props.modalKey && document.getElementById(props.modalKey)) {
1823
+ return;
1824
+ }
1825
+ var _dom$bodyAppendDivEle = dom.bodyAppendDivElement(props.modalKey),
1826
+ divElement = _dom$bodyAppendDivEle.divElement,
1827
+ elementId = _dom$bodyAppendDivEle.elementId;
1828
+ var idKey = props.modalKey ? "__dialog_drag_modal_elementId_".concat(props.modalKey) : '__dialog_drag_modal_elementId';
1829
+ window[idKey] = elementId;
1830
+ var root = createRoot(divElement);
1831
+ root.render(/*#__PURE__*/jsx(ModalRender, _objectSpread2(_objectSpread2({}, props), {}, {
1832
+ divElement: divElement,
1833
+ elementId: elementId
1834
+ })));
1835
+ return {
1836
+ close: function close() {
1837
+ var _window$elementId, _window;
1838
+ (_window$elementId = (_window = window)[elementId]) === null || _window$elementId === void 0 || _window$elementId.call(_window);
1839
+ }
1840
+ };
1841
+ },
1842
+ /**
1843
+ * ```
1844
+ * 1. 关闭最新弹框,如果有多个弹框只能关闭最后一个
1845
+ * 2. 多个弹框主动关闭,只能使用 dialogDrawer.open()返回值中的close
1846
+ * ```
1847
+ */
1848
+ close: function close(modalKey) {
1849
+ try {
1850
+ var _window$elementId2, _window2;
1851
+ var elementId = modalKey ? window["__dialog_drag_modal_elementId_".concat(modalKey)] : window['__dialog_drag_modal_elementId'];
1852
+ if (isString(elementId)) (_window$elementId2 = (_window2 = window)[elementId]) === null || _window$elementId2 === void 0 || _window$elementId2.call(_window2);
1853
+ } catch (_error) {
1854
+ //
1855
+ }
1856
+ }
1857
+ };
1858
+
1859
+ export { dialogDragModal as d };
1860
+ //# sourceMappingURL=drag-modal-DTbr-E0g.js.map