d2coreui 21.0.33 → 23.0.0

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 (295) hide show
  1. package/components/clipboard/clipboardUtils.d.ts +4 -3
  2. package/components/clipboard/clipboardUtils.js +47 -22
  3. package/components/clipboard/clipboardUtils.js.map +1 -1
  4. package/components/codemirror/SyntaxHighlighter.d.ts +21 -21
  5. package/components/codemirror/SyntaxHighlighter.js +45 -44
  6. package/components/codemirror/SyntaxHighlighter.js.map +1 -1
  7. package/components/collapse/expandable.d.ts +13 -12
  8. package/components/collapse/expandable.js +20 -20
  9. package/components/collapse/expandable.js.map +1 -1
  10. package/components/color/colorPicker.d.ts +20 -20
  11. package/components/color/colorPicker.js +53 -53
  12. package/components/color/colorPicker.js.map +1 -1
  13. package/components/color/colorSwatch.d.ts +13 -12
  14. package/components/color/colorSwatch.js +62 -62
  15. package/components/color/colorSwatch.js.map +1 -1
  16. package/components/color/colorUtils.d.ts +7 -7
  17. package/components/color/colorUtils.js +43 -43
  18. package/components/color/colorUtils.js.map +1 -1
  19. package/components/date/dateRangeInput.d.ts +66 -64
  20. package/components/date/dateRangeInput.js +292 -297
  21. package/components/date/dateRangeInput.js.map +1 -1
  22. package/components/date/dateRangeInputAdvancedPanel.d.ts +27 -26
  23. package/components/date/dateRangeInputAdvancedPanel.js +130 -115
  24. package/components/date/dateRangeInputAdvancedPanel.js.map +1 -1
  25. package/components/date/dateRangeInputConfirm.d.ts +31 -29
  26. package/components/date/dateRangeInputConfirm.js +132 -121
  27. package/components/date/dateRangeInputConfirm.js.map +1 -1
  28. package/components/date/dateTimeInput.d.ts +72 -69
  29. package/components/date/dateTimeInput.js +440 -412
  30. package/components/date/dateTimeInput.js.map +1 -1
  31. package/components/date/durationInput.d.ts +59 -56
  32. package/components/date/durationInput.js +269 -280
  33. package/components/date/durationInput.js.map +1 -1
  34. package/components/form/NiceFormItem.d.ts +14 -14
  35. package/components/form/NiceFormItem.js +28 -31
  36. package/components/form/NiceFormItem.js.map +1 -1
  37. package/components/grid/cell/beanAccessor.d.ts +9 -0
  38. package/components/grid/cell/beanAccessor.js +13 -0
  39. package/components/grid/cell/beanAccessor.js.map +1 -0
  40. package/components/grid/cell/cellEditorUtils.d.ts +4 -4
  41. package/components/grid/cell/cellEditorUtils.js +8 -8
  42. package/components/grid/cell/customEnumCellEditor.d.ts +4 -26
  43. package/components/grid/cell/customEnumCellEditor.js +82 -91
  44. package/components/grid/cell/customEnumCellEditor.js.map +1 -1
  45. package/components/grid/cell/dataGridCellEditorComponent.d.ts +14 -0
  46. package/components/grid/cell/dataGridCellEditorComponent.js +49 -0
  47. package/components/grid/cell/dataGridCellEditorComponent.js.map +1 -0
  48. package/components/grid/cell/dateCellEditor.d.ts +4 -25
  49. package/components/grid/cell/dateCellEditor.js +53 -72
  50. package/components/grid/cell/dateCellEditor.js.map +1 -1
  51. package/components/grid/cell/durationCellEditor.d.ts +4 -24
  52. package/components/grid/cell/durationCellEditor.js +74 -97
  53. package/components/grid/cell/durationCellEditor.js.map +1 -1
  54. package/components/grid/cell/hexaOctetStringCellEditor.d.ts +4 -24
  55. package/components/grid/cell/hexaOctetStringCellEditor.js +70 -94
  56. package/components/grid/cell/hexaOctetStringCellEditor.js.map +1 -1
  57. package/components/grid/cell/hexaValueCellEditor.d.ts +4 -24
  58. package/components/grid/cell/hexaValueCellEditor.js +65 -89
  59. package/components/grid/cell/hexaValueCellEditor.js.map +1 -1
  60. package/components/grid/cell/numberCellEditor.d.ts +4 -27
  61. package/components/grid/cell/numberCellEditor.js +73 -95
  62. package/components/grid/cell/numberCellEditor.js.map +1 -1
  63. package/components/grid/cell/rangeSelector.d.ts +78 -78
  64. package/components/grid/cell/rangeSelector.js +526 -518
  65. package/components/grid/cell/rangeSelector.js.map +1 -1
  66. package/components/grid/cell/simpleStatusTextCellEditor.d.ts +4 -32
  67. package/components/grid/cell/simpleStatusTextCellEditor.js +106 -116
  68. package/components/grid/cell/simpleStatusTextCellEditor.js.map +1 -1
  69. package/components/grid/cell/statusTextCellEditor.d.ts +4 -32
  70. package/components/grid/cell/statusTextCellEditor.js +136 -159
  71. package/components/grid/cell/statusTextCellEditor.js.map +1 -1
  72. package/components/grid/cell/tableDefaultRowStyleRules.d.ts +20 -20
  73. package/components/grid/cell/tableDefaultRowStyleRules.js +29 -18
  74. package/components/grid/cell/tableDefaultRowStyleRules.js.map +1 -1
  75. package/components/grid/cell/textCellEditor.d.ts +4 -21
  76. package/components/grid/cell/textCellEditor.js +63 -85
  77. package/components/grid/cell/textCellEditor.js.map +1 -1
  78. package/components/grid/cell/withAgGridHooks.d.ts +3 -0
  79. package/components/grid/cell/withAgGridHooks.js +15 -0
  80. package/components/grid/cell/withAgGridHooks.js.map +1 -0
  81. package/components/grid/columnUtils.d.ts +5 -5
  82. package/components/grid/columnUtils.js +26 -26
  83. package/components/grid/columnUtils.js.map +1 -1
  84. package/components/grid/config/columnTransfer.d.ts +21 -22
  85. package/components/grid/config/columnTransfer.js +205 -201
  86. package/components/grid/config/columnTransfer.js.map +1 -1
  87. package/components/grid/config/dataGridEditor.d.ts +41 -41
  88. package/components/grid/config/dataGridEditor.js +181 -160
  89. package/components/grid/config/dataGridEditor.js.map +1 -1
  90. package/components/grid/config/rowHeightCalculator.d.ts +8 -0
  91. package/components/grid/config/rowHeightCalculator.js +20 -0
  92. package/components/grid/config/rowHeightCalculator.js.map +1 -0
  93. package/components/grid/config/rowStylePicker.d.ts +27 -25
  94. package/components/grid/config/rowStylePicker.js +127 -109
  95. package/components/grid/config/rowStylePicker.js.map +1 -1
  96. package/components/grid/dataGrid.d.ts +218 -206
  97. package/components/grid/dataGrid.js +1629 -1538
  98. package/components/grid/dataGrid.js.map +1 -1
  99. package/components/grid/detail/detailHeaderPanel.d.ts +13 -13
  100. package/components/grid/detail/detailHeaderPanel.js +25 -25
  101. package/components/grid/detail/detailHeaderPanel.js.map +1 -1
  102. package/components/grid/export/contextMenu.d.ts +18 -24
  103. package/components/grid/export/contextMenu.js +116 -113
  104. package/components/grid/export/contextMenu.js.map +1 -1
  105. package/components/grid/export/progressPopup.d.ts +29 -29
  106. package/components/grid/export/progressPopup.js +93 -93
  107. package/components/grid/export/progressPopup.js.map +1 -1
  108. package/components/grid/export/worker/clipboardExport.d.ts +1 -1
  109. package/components/grid/export/worker/clipboardExport.js +8 -8
  110. package/components/grid/export/worker/csvExport.d.ts +1 -1
  111. package/components/grid/export/worker/csvExport.js +8 -8
  112. package/components/grid/export/worker/pdfExport.d.ts +1 -1
  113. package/components/grid/export/worker/pdfExport.js +81 -81
  114. package/components/grid/export/worker/pdfExport.js.map +1 -1
  115. package/components/grid/export/worker/txtExport.d.ts +1 -1
  116. package/components/grid/export/worker/txtExport.js +19 -19
  117. package/components/grid/extendedDataGrid.d.ts +140 -140
  118. package/components/grid/extendedDataGrid.js +704 -695
  119. package/components/grid/extendedDataGrid.js.map +1 -1
  120. package/components/grid/filter/customColumnFilter.d.ts +5 -21
  121. package/components/grid/filter/customColumnFilter.js +11 -82
  122. package/components/grid/filter/customColumnFilter.js.map +1 -1
  123. package/components/grid/filter/dataGridColumnFilter.d.ts +17 -0
  124. package/components/grid/filter/dataGridColumnFilter.js +49 -0
  125. package/components/grid/filter/dataGridColumnFilter.js.map +1 -0
  126. package/components/grid/filter/dateColumnFilter.d.ts +7 -11
  127. package/components/grid/filter/dateColumnFilter.js +22 -56
  128. package/components/grid/filter/dateColumnFilter.js.map +1 -1
  129. package/components/grid/filter/textColumnFilter.d.ts +8 -20
  130. package/components/grid/filter/textColumnFilter.js +24 -76
  131. package/components/grid/filter/textColumnFilter.js.map +1 -1
  132. package/components/grid/filter/wildcardQuickFilterEngine.d.ts +7 -0
  133. package/components/grid/filter/wildcardQuickFilterEngine.js +48 -0
  134. package/components/grid/filter/wildcardQuickFilterEngine.js.map +1 -0
  135. package/components/grid/header/simpleHeader.d.ts +17 -16
  136. package/components/grid/header/simpleHeader.js +230 -186
  137. package/components/grid/header/simpleHeader.js.map +1 -1
  138. package/components/grid/panel/dataGridPagination.d.ts +16 -16
  139. package/components/grid/panel/dataGridPagination.js +58 -58
  140. package/components/grid/panel/dataGridPagination.js.map +1 -1
  141. package/components/grid/panel/loadingOverlay.d.ts +6 -6
  142. package/components/grid/panel/loadingOverlay.js +10 -10
  143. package/components/grid/panel/loadingOverlay.js.map +1 -1
  144. package/components/grid/panel/noRecordsOverlay.d.ts +6 -6
  145. package/components/grid/panel/noRecordsOverlay.js +10 -10
  146. package/components/grid/panel/noRecordsOverlay.js.map +1 -1
  147. package/components/grid/panel/tablePagination.d.ts +10 -10
  148. package/components/grid/panel/tablePagination.js +45 -45
  149. package/components/grid/panel/tablePagination.js.map +1 -1
  150. package/components/icons/dropdownArrow.d.ts +8 -0
  151. package/components/icons/dropdownArrow.js +59 -0
  152. package/components/icons/dropdownArrow.js.map +1 -0
  153. package/components/icons/undoIcon.d.ts +8 -8
  154. package/components/icons/undoIcon.js +6 -6
  155. package/components/input/autoCompleteInput.d.ts +35 -35
  156. package/components/input/autoCompleteInput.js +122 -121
  157. package/components/input/autoCompleteInput.js.map +1 -1
  158. package/components/input/draftUtils.d.ts +4 -4
  159. package/components/input/draftUtils.js +48 -48
  160. package/components/input/draftUtils.js.map +1 -1
  161. package/components/input/draftail.d.ts +1 -1
  162. package/components/input/draftail.js +1 -1
  163. package/components/input/hexaFormattedInput.d.ts +16 -16
  164. package/components/input/hexaFormattedInput.js +54 -54
  165. package/components/input/hexaFormattedInput.js.map +1 -1
  166. package/components/input/mask/helpers.d.ts +28 -28
  167. package/components/input/mask/helpers.js +112 -112
  168. package/components/input/mask/helpers.js.map +1 -1
  169. package/components/input/mask/inputMaskCore.d.ts +46 -46
  170. package/components/input/mask/inputMaskCore.js +278 -278
  171. package/components/input/mask/inputMaskCore.js.map +1 -1
  172. package/components/input/mask/pattern.d.ts +20 -20
  173. package/components/input/mask/pattern.js +78 -78
  174. package/components/input/mask/pattern.js.map +1 -1
  175. package/components/input/maskedInput.d.ts +373 -351
  176. package/components/input/maskedInput.js +224 -224
  177. package/components/input/maskedInput.js.map +1 -1
  178. package/components/input/passwordInput.d.ts +9 -9
  179. package/components/input/passwordInput.js +55 -55
  180. package/components/input/passwordInput.js.map +1 -1
  181. package/components/input/simpleAutoComplete.d.ts +12 -12
  182. package/components/input/simpleAutoComplete.js +41 -43
  183. package/components/input/simpleAutoComplete.js.map +1 -1
  184. package/components/input/textarea/extractSpansOfClasses.d.ts +15 -15
  185. package/components/input/textarea/extractSpansOfClasses.js +96 -96
  186. package/components/input/textarea/extractSpansOfClasses.js.map +1 -1
  187. package/components/input/textarea/getRanges.d.ts +1 -1
  188. package/components/input/textarea/getRanges.js +73 -73
  189. package/components/input/textarea/getRanges.js.map +1 -1
  190. package/components/input/textarea/getType.d.ts +1 -1
  191. package/components/input/textarea/getType.js +26 -26
  192. package/components/input/textarea/getType.js.map +1 -1
  193. package/components/input/textarea/highlighedContents.d.ts +6 -6
  194. package/components/input/textarea/highlighedContents.js +10 -10
  195. package/components/input/textarea/mentionsWithHighlighting.d.ts +27 -27
  196. package/components/input/textarea/mentionsWithHighlighting.js +60 -60
  197. package/components/input/textarea/mentionsWithHighlighting.js.map +1 -1
  198. package/components/keyboard/keyboardUtils.d.ts +5 -5
  199. package/components/keyboard/keyboardUtils.js +32 -32
  200. package/components/modal/draggableModalProvider.d.ts +4 -4
  201. package/components/modal/draggableModalProvider.js +21 -21
  202. package/components/modal/draggableModalProvider.js.map +1 -1
  203. package/components/modal/impl/clamp.d.ts +1 -1
  204. package/components/modal/impl/clamp.js +1 -1
  205. package/components/modal/impl/clamp.js.map +1 -1
  206. package/components/modal/impl/draggableModal.d.ts +12 -12
  207. package/components/modal/impl/draggableModal.js +17 -17
  208. package/components/modal/impl/draggableModal.js.map +1 -1
  209. package/components/modal/impl/draggableModalContext.d.ts +9 -9
  210. package/components/modal/impl/draggableModalContext.js +2 -2
  211. package/components/modal/impl/draggableModalContext.js.map +1 -1
  212. package/components/modal/impl/draggableModalInner.d.ts +15 -13
  213. package/components/modal/impl/draggableModalInner.js +57 -55
  214. package/components/modal/impl/draggableModalInner.js.map +1 -1
  215. package/components/modal/impl/draggableModalReducer.d.ts +66 -62
  216. package/components/modal/impl/draggableModalReducer.js +77 -78
  217. package/components/modal/impl/draggableModalReducer.js.map +1 -1
  218. package/components/modal/impl/getWindowSize.d.ts +4 -4
  219. package/components/modal/impl/getWindowSize.js +4 -4
  220. package/components/modal/impl/getWindowSize.js.map +1 -1
  221. package/components/modal/impl/index.d.ts +3 -3
  222. package/components/modal/impl/index.js +3 -3
  223. package/components/modal/impl/index.js.map +1 -1
  224. package/components/modal/impl/resizeHandle.d.ts +3 -3
  225. package/components/modal/impl/resizeHandle.js +4 -4
  226. package/components/modal/impl/resizeHandle.js.map +1 -1
  227. package/components/modal/impl/useDrag.d.ts +5 -5
  228. package/components/modal/impl/useDrag.js +42 -42
  229. package/components/modal/impl/useDrag.js.map +1 -1
  230. package/components/modal/impl/usePrevious.d.ts +1 -1
  231. package/components/modal/impl/usePrevious.js +8 -8
  232. package/components/modal/impl/usePrevious.js.map +1 -1
  233. package/components/modal/impl/useResize.d.ts +7 -7
  234. package/components/modal/impl/useResize.js +46 -46
  235. package/components/modal/impl/useResize.js.map +1 -1
  236. package/components/modal/modalDialog.d.ts +49 -49
  237. package/components/modal/modalDialog.js +152 -152
  238. package/components/modal/modalDialog.js.map +1 -1
  239. package/components/picker/enumValuePicker.d.ts +16 -16
  240. package/components/picker/enumValuePicker.js +34 -34
  241. package/components/picker/enumValuePicker.js.map +1 -1
  242. package/components/platformSpecific.d.ts +10 -10
  243. package/components/platformSpecific.js +27 -27
  244. package/components/scrollTo/onlyText.d.ts +4 -4
  245. package/components/scrollTo/onlyText.js +30 -30
  246. package/components/scrollTo/onlyText.js.map +1 -1
  247. package/components/scrollTo/scrollTo.d.ts +41 -39
  248. package/components/scrollTo/scrollTo.js +264 -264
  249. package/components/scrollTo/scrollTo.js.map +1 -1
  250. package/components/style/withCss.d.ts +9 -0
  251. package/components/style/withCss.js +6 -0
  252. package/components/style/withCss.js.map +1 -0
  253. package/components/style/withInputNumberCss.d.ts +6 -0
  254. package/components/style/withInputNumberCss.js +13 -0
  255. package/components/style/withInputNumberCss.js.map +1 -0
  256. package/components/table/dragSortingTable.d.ts +13 -14
  257. package/components/table/dragSortingTable.js +96 -82
  258. package/components/table/dragSortingTable.js.map +1 -1
  259. package/components/text/impl/innerSize.d.ts +2 -2
  260. package/components/text/impl/innerSize.js +12 -12
  261. package/components/text/impl/series.d.ts +1 -1
  262. package/components/text/impl/series.js +28 -28
  263. package/components/text/impl/shallowEqual.d.ts +1 -1
  264. package/components/text/impl/shallowEqual.js +18 -18
  265. package/components/text/impl/shallowEqual.js.map +1 -1
  266. package/components/text/impl/uniqueId.d.ts +1 -1
  267. package/components/text/impl/uniqueId.js +4 -4
  268. package/components/text/impl/whilst.d.ts +1 -1
  269. package/components/text/impl/whilst.js +19 -19
  270. package/components/text/impl/whilst.js.map +1 -1
  271. package/components/text/textFit.d.ts +38 -38
  272. package/components/text/textFit.js +165 -168
  273. package/components/text/textFit.js.map +1 -1
  274. package/i18n/components.cs.json +101 -100
  275. package/i18n/components.sk.json +101 -100
  276. package/i18n/components.uk.json +101 -100
  277. package/i18n/componentsLocaleHolder.d.ts +3 -3
  278. package/i18n/componentsLocaleHolder.js +28 -28
  279. package/i18n/componentsLocaleHolder.js.map +1 -1
  280. package/package.json +71 -70
  281. package/style/index.less +274 -298
  282. package/style/modal/DraggableModal.css +43 -40
  283. package/style/modal/ResizeHandle.css +27 -19
  284. package/tsconfig.build.json +24 -24
  285. package/tsconfig.json +11 -11
  286. package/components/grid/cell/wildcardQuickFilter.d.ts +0 -11
  287. package/components/grid/cell/wildcardQuickFilter.js +0 -61
  288. package/components/grid/cell/wildcardQuickFilter.js.map +0 -1
  289. package/components/table/dataTable.d.ts +0 -17
  290. package/components/table/dataTable.js +0 -79
  291. package/components/table/dataTable.js.map +0 -1
  292. package/style/antd/antd-tree-showline.css +0 -25
  293. package/style/antd/full-height-tabs.scss +0 -63
  294. package/style/draftail/draftail-editor.css +0 -179
  295. package/style/table/dragSortingTable.css +0 -7
@@ -1 +1 @@
1
- {"version":3,"file":"draggableModalProvider.js","sourceRoot":"","sources":["../../../../components/modal/draggableModalProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAC,SAAS,EAAE,UAAU,EAAC,MAAM,OAAO,CAAA;AAC3C,OAAO,EAAC,qBAAqB,EAAC,MAAM,sDAAsD,CAAA;AAC1F,OAAO,EAAC,aAAa,EAAC,MAAM,8CAA8C,CAAA;AAC1E,OAAO,EAAC,qBAAqB,EAAE,kBAAkB,EAAC,MAAM,sDAAsD,CAAA;AAE9G,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,EACnC,QAAQ,GAGX,EAAsB,EAAE;IACrB,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,UAAU,CAAC,qBAAqB,EAAE,kBAAkB,CAAC,CAAA;IAE/E,SAAS,CAAC,GAAG,EAAE;QACX,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;YAE5B,OAAO;SACV;QACD,MAAM,QAAQ,GAAG,GAAS,EAAE,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,EAAE,CAAC,CAAA;QACtF,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAA;QAC3C,QAAQ,EAAE,CAAA;QACV,OAAO,GAAG,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAA;IAC/D,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAA;IAEd,OAAO,CACH,oBAAC,qBAAqB,CAAC,QAAQ,IAC3B,KAAK,EAAE;YACH,KAAK;YACL,QAAQ;SACX,IAEA,QAAQ,CACoB,CACpC,CAAA;AACL,CAAC,CAAA","sourcesContent":["import * as React from 'react'\nimport {useEffect, useReducer} from 'react'\nimport {DraggableModalContext} from 'd2coreui/components/modal/impl/draggableModalContext'\nimport {getWindowSize} from 'd2coreui/components/modal/impl/getWindowSize'\nimport {draggableModalReducer, initialModalsState} from 'd2coreui/components/modal/impl/draggableModalReducer'\n\nexport const DraggableModalProvider = ({\n children,\n}: {\n children: React.ReactNode\n}): React.ReactElement => {\n const [state, dispatch] = useReducer(draggableModalReducer, initialModalsState)\n\n useEffect(() => {\n if (typeof window !== 'object') {\n // @ts-ignore\n return;\n }\n const onResize = (): void => dispatch({ type: 'windowResize', size: getWindowSize() })\n window.addEventListener('resize', onResize)\n onResize()\n return () => window.removeEventListener('resize', onResize)\n }, [dispatch])\n\n return (\n <DraggableModalContext.Provider\n value={{\n state,\n dispatch,\n }}\n >\n {children}\n </DraggableModalContext.Provider>\n )\n}\n"]}
1
+ {"version":3,"file":"draggableModalProvider.js","sourceRoot":"","sources":["../../../../components/modal/draggableModalProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAC,SAAS,EAAE,UAAU,EAAC,MAAM,OAAO,CAAA;AAC3C,OAAO,EAAC,qBAAqB,EAAC,MAAM,sDAAsD,CAAA;AAC1F,OAAO,EAAC,aAAa,EAAC,MAAM,8CAA8C,CAAA;AAC1E,OAAO,EAAC,qBAAqB,EAAE,kBAAkB,EAAC,MAAM,sDAAsD,CAAA;AAE9G,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,EACnC,QAAQ,GAGX,EAAsB,EAAE;IACrB,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,UAAU,CAAC,qBAAqB,EAAE,kBAAkB,CAAC,CAAA;IAE/E,SAAS,CAAC,GAAG,EAAE;QACX,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;YAE7B,OAAO;QACX,CAAC;QACD,MAAM,QAAQ,GAAG,GAAS,EAAE,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,EAAE,CAAC,CAAA;QACtF,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAA;QAC3C,QAAQ,EAAE,CAAA;QACV,OAAO,GAAG,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAA;IAC/D,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAA;IAEd,OAAO,CACH,oBAAC,qBAAqB,CAAC,QAAQ,IAC3B,KAAK,EAAE;YACH,KAAK;YACL,QAAQ;SACX,IAEA,QAAQ,CACoB,CACpC,CAAA;AACL,CAAC,CAAA","sourcesContent":["// https://github.com/CUBETIQ/antd-modal/\r\n\r\nimport * as React from 'react'\r\nimport {useEffect, useReducer} from 'react'\r\nimport {DraggableModalContext} from 'd2coreui/components/modal/impl/draggableModalContext'\r\nimport {getWindowSize} from 'd2coreui/components/modal/impl/getWindowSize'\r\nimport {draggableModalReducer, initialModalsState} from 'd2coreui/components/modal/impl/draggableModalReducer'\r\n\r\nexport const DraggableModalProvider = ({\r\n children,\r\n}: {\r\n children: React.ReactNode\r\n}): React.ReactElement => {\r\n const [state, dispatch] = useReducer(draggableModalReducer, initialModalsState)\r\n\r\n useEffect(() => {\r\n if (typeof window !== 'object') {\r\n // @ts-ignore\r\n return;\r\n }\r\n const onResize = (): void => dispatch({ type: 'windowResize', size: getWindowSize() })\r\n window.addEventListener('resize', onResize)\r\n onResize()\r\n return () => window.removeEventListener('resize', onResize)\r\n }, [dispatch])\r\n\r\n return (\r\n <DraggableModalContext.Provider\r\n value={{\r\n state,\r\n dispatch,\r\n }}\r\n >\r\n {children}\r\n </DraggableModalContext.Provider>\r\n )\r\n}\r\n"]}
@@ -1 +1 @@
1
- export declare const clamp: (min: number, max: number, value: number) => number;
1
+ export declare const clamp: (min: number, max: number, value: number) => number;
@@ -1,2 +1,2 @@
1
- export const clamp = (min, max, value) => Math.max(min, Math.min(max, value));
1
+ export const clamp = (min, max, value) => Math.max(min, Math.min(max, value));
2
2
  //# sourceMappingURL=clamp.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"clamp.js","sourceRoot":"","sources":["../../../../../components/modal/impl/clamp.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,GAAW,EAAE,GAAW,EAAE,KAAa,EAAU,EAAE,CACrE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC","sourcesContent":["export const clamp = (min: number, max: number, value: number): number =>\n Math.max(min, Math.min(max, value));\n"]}
1
+ {"version":3,"file":"clamp.js","sourceRoot":"","sources":["../../../../../components/modal/impl/clamp.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,GAAW,EAAE,GAAW,EAAE,KAAa,EAAU,EAAE,CACrE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC","sourcesContent":["// https://github.com/CUBETIQ/antd-modal/\r\n\r\nexport const clamp = (min: number, max: number, value: number): number =>\r\n Math.max(min, Math.min(max, value));\r\n"]}
@@ -1,12 +1,12 @@
1
- import * as React from 'react';
2
- import { ModalProps } from 'antd/lib/modal';
3
- import '../../../style/modal/DraggableModal.css';
4
- export interface DraggableModalProps extends Omit<ModalProps, "width"> {
5
- initialWidth?: number;
6
- initialHeight?: number;
7
- onResize?(size: {
8
- width: number;
9
- height: number;
10
- }): void;
11
- }
12
- export declare const DraggableModal: (props: DraggableModalProps) => React.ReactElement;
1
+ import { FunctionComponent } from 'react';
2
+ import { ModalProps } from 'antd/lib/modal';
3
+ import '../../../style/modal/DraggableModal.css';
4
+ export interface DraggableModalProps extends Omit<ModalProps, "width"> {
5
+ initialWidth?: number;
6
+ initialHeight?: number;
7
+ onResize?(size: {
8
+ width: number;
9
+ height: number;
10
+ }): void;
11
+ }
12
+ export declare const DraggableModal: FunctionComponent<DraggableModalProps>;
@@ -1,18 +1,18 @@
1
- import * as React from 'react';
2
- import { useContext } from 'react';
3
- import { useUID } from 'react-uid';
4
- import { DraggableModalContext } from './draggableModalContext';
5
- import { DraggableModalInner } from './draggableModalInner';
6
- import { getOrCreateModalState } from './draggableModalReducer';
7
- import '../../../style/modal/DraggableModal.css';
8
- export const DraggableModal = (props) => {
9
- const id = useUID();
10
- const modalProvider = useContext(DraggableModalContext);
11
- if (!modalProvider) {
12
- throw new Error('No Provider');
13
- }
14
- const { dispatch, state } = modalProvider;
15
- const modalState = getOrCreateModalState(state, id, props.initialWidth, props.initialHeight);
16
- return React.createElement(DraggableModalInner, Object.assign({ id: id, dispatch: dispatch, modalState: modalState }, props));
17
- };
1
+ import * as React from 'react';
2
+ import { useContext } from 'react';
3
+ import { useUID } from 'react-uid';
4
+ import { DraggableModalContext } from './draggableModalContext';
5
+ import { DraggableModalInner } from './draggableModalInner';
6
+ import { getModalState } from './draggableModalReducer';
7
+ import '../../../style/modal/DraggableModal.css';
8
+ export const DraggableModal = (props) => {
9
+ const id = useUID();
10
+ const modalProvider = useContext(DraggableModalContext);
11
+ if (!modalProvider) {
12
+ throw new Error('No Provider');
13
+ }
14
+ const { dispatch, state } = modalProvider;
15
+ const modalState = getModalState({ state, id, initialWidth: props.initialWidth, initialHeight: props.initialHeight });
16
+ return React.createElement(DraggableModalInner, Object.assign({ id: id, dispatch: dispatch, modalState: modalState }, props));
17
+ };
18
18
  //# sourceMappingURL=draggableModal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"draggableModal.js","sourceRoot":"","sources":["../../../../../components/modal/impl/draggableModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAC,UAAU,EAAC,MAAM,OAAO,CAAA;AAChC,OAAO,EAAC,MAAM,EAAC,MAAM,WAAW,CAAA;AAChC,OAAO,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAA;AAC7D,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAA;AACzD,OAAO,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAA;AAE7D,OAAO,yCAAyC,CAAA;AAShD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAA0B,EAAsB,EAAE;IAE7E,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC;IAGpB,MAAM,aAAa,GAAG,UAAU,CAAC,qBAAqB,CAAC,CAAC;IACxD,IAAI,CAAC,aAAa,EAAE;QAChB,MAAM,IAAI,KAAK,CAAC,aAAa,CAAC,CAAA;KACjC;IAED,MAAM,EAAC,QAAQ,EAAE,KAAK,EAAC,GAAG,aAAa,CAAC;IACxC,MAAM,UAAU,GAAG,qBAAqB,CAAC,KAAK,EAAE,EAAE,EAAE,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;IAK7F,OAAO,oBAAC,mBAAmB,kBAAC,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,IAAM,KAAK,EAAI,CAAA;AACjG,CAAC,CAAC","sourcesContent":["import * as React from 'react'\nimport {useContext} from 'react'\nimport {useUID} from 'react-uid'\nimport {DraggableModalContext} from './draggableModalContext'\nimport {DraggableModalInner} from './draggableModalInner'\nimport {getOrCreateModalState} from './draggableModalReducer'\nimport {ModalProps} from 'antd/lib/modal'\nimport '../../../style/modal/DraggableModal.css'\n\nexport interface DraggableModalProps extends Omit<ModalProps, \"width\"> {\n initialWidth?: number,\n initialHeight?: number\n // resize dialog handler\n onResize?(size: { width: number, height: number }): void\n}\n\nexport const DraggableModal = (props: DraggableModalProps): React.ReactElement => {\n // Get the unique ID of this modal.\n const id = useUID();\n\n // Get modal provider.\n const modalProvider = useContext(DraggableModalContext);\n if (!modalProvider) {\n throw new Error('No Provider')\n }\n\n const {dispatch, state} = modalProvider;\n const modalState = getOrCreateModalState(state, id, props.initialWidth, props.initialHeight);\n\n // We do this so that we don't re-render all modals for every state change.\n // DraggableModalInner uses React.memo, so it only re-renders if\n // if props change (e.g. modalState).\n return <DraggableModalInner id={id} dispatch={dispatch} modalState={modalState} {...props} />\n};\n"]}
1
+ {"version":3,"file":"draggableModal.js","sourceRoot":"","sources":["../../../../../components/modal/impl/draggableModal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAoB,UAAU,EAAC,MAAM,OAAO,CAAA;AACnD,OAAO,EAAC,MAAM,EAAC,MAAM,WAAW,CAAA;AAChC,OAAO,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAA;AAC7D,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAA;AACzD,OAAO,EAAC,aAAa,EAAC,MAAM,yBAAyB,CAAA;AAErD,OAAO,yCAAyC,CAAA;AAShD,MAAM,CAAC,MAAM,cAAc,GAA2C,CAAC,KAA0B,EAAsB,EAAE;IAErH,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC;IAGpB,MAAM,aAAa,GAAG,UAAU,CAAC,qBAAqB,CAAC,CAAC;IACxD,IAAI,CAAC,aAAa,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,aAAa,CAAC,CAAA;IAClC,CAAC;IAED,MAAM,EAAC,QAAQ,EAAE,KAAK,EAAC,GAAG,aAAa,CAAC;IACxC,MAAM,UAAU,GAAG,aAAa,CAAC,EAAC,KAAK,EAAE,EAAE,EAAE,YAAY,EAAE,KAAK,CAAC,YAAY,EAAE,aAAa,EAAE,KAAK,CAAC,aAAa,EAAC,CAAC,CAAC;IAKpH,OAAO,oBAAC,mBAAmB,kBAAC,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,IAAM,KAAK,EAAI,CAAA;AACjG,CAAC,CAAC","sourcesContent":["// https://github.com/CUBETIQ/antd-modal/\r\n\r\nimport * as React from 'react'\r\nimport {FunctionComponent, useContext} from 'react'\r\nimport {useUID} from 'react-uid'\r\nimport {DraggableModalContext} from './draggableModalContext'\r\nimport {DraggableModalInner} from './draggableModalInner'\r\nimport {getModalState} from './draggableModalReducer'\r\nimport {ModalProps} from 'antd/lib/modal'\r\nimport '../../../style/modal/DraggableModal.css'\r\n\r\nexport interface DraggableModalProps extends Omit<ModalProps, \"width\"> {\r\n initialWidth?: number,\r\n initialHeight?: number\r\n // resize dialog handler\r\n onResize?(size: { width: number, height: number }): void\r\n}\r\n\r\nexport const DraggableModal: FunctionComponent<DraggableModalProps> = (props: DraggableModalProps): React.ReactElement => {\r\n // Get the unique ID of this modal.\r\n const id = useUID();\r\n\r\n // Get modal provider.\r\n const modalProvider = useContext(DraggableModalContext);\r\n if (!modalProvider) {\r\n throw new Error('No Provider')\r\n }\r\n\r\n const {dispatch, state} = modalProvider;\r\n const modalState = getModalState({state, id, initialWidth: props.initialWidth, initialHeight: props.initialHeight});\r\n\r\n // We do this so that we don't re-render all modals for every state change.\r\n // DraggableModalInner uses React.memo, so it only re-renders if\r\n // if props change (e.g. modalState).\r\n return <DraggableModalInner id={id} dispatch={dispatch} modalState={modalState} {...props} />\r\n};\r\n"]}
@@ -1,9 +1,9 @@
1
- import * as React from 'react';
2
- import { Action, ModalsState } from './draggableModalReducer';
3
- export interface DraggableModalContextMethods {
4
- dispatch: (action: Action) => void;
5
- }
6
- export interface DraggableModalContextValue extends DraggableModalContextMethods {
7
- state: ModalsState;
8
- }
9
- export declare const DraggableModalContext: React.Context<DraggableModalContextValue | null>;
1
+ import * as React from 'react';
2
+ import { Action, ModalsState } from './draggableModalReducer';
3
+ export interface DraggableModalContextMethods {
4
+ dispatch: (action: Action) => void;
5
+ }
6
+ export interface DraggableModalContextValue extends DraggableModalContextMethods {
7
+ state: ModalsState;
8
+ }
9
+ export declare const DraggableModalContext: React.Context<DraggableModalContextValue | null>;
@@ -1,3 +1,3 @@
1
- import * as React from 'react';
2
- export const DraggableModalContext = React.createContext(null);
1
+ import * as React from 'react';
2
+ export const DraggableModalContext = React.createContext(null);
3
3
  //# sourceMappingURL=draggableModalContext.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"draggableModalContext.js","sourceRoot":"","sources":["../../../../../components/modal/impl/draggableModalContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAW9B,MAAM,CAAC,MAAM,qBAAqB,GAAG,KAAK,CAAC,aAAa,CAAoC,IAAI,CAAC,CAAA","sourcesContent":["import * as React from 'react'\nimport {Action, ModalsState} from './draggableModalReducer'\n\nexport interface DraggableModalContextMethods {\n dispatch: (action: Action) => void\n}\n\nexport interface DraggableModalContextValue extends DraggableModalContextMethods {\n state: ModalsState\n}\n\nexport const DraggableModalContext = React.createContext<DraggableModalContextValue | null>(null)\n"]}
1
+ {"version":3,"file":"draggableModalContext.js","sourceRoot":"","sources":["../../../../../components/modal/impl/draggableModalContext.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAW9B,MAAM,CAAC,MAAM,qBAAqB,GAAG,KAAK,CAAC,aAAa,CAAoC,IAAI,CAAC,CAAA","sourcesContent":["// https://github.com/CUBETIQ/antd-modal/\r\n\r\nimport * as React from 'react'\r\nimport {Action, ModalsState} from './draggableModalReducer'\r\n\r\nexport interface DraggableModalContextMethods {\r\n dispatch: (action: Action) => void\r\n}\r\n\r\nexport interface DraggableModalContextValue extends DraggableModalContextMethods {\r\n state: ModalsState\r\n}\r\n\r\nexport const DraggableModalContext = React.createContext<DraggableModalContextValue | null>(null)\r\n"]}
@@ -1,13 +1,15 @@
1
- import * as React from 'react';
2
- import { DraggableModalContextMethods } from './draggableModalContext';
3
- import { ModalID, ModalState } from './draggableModalReducer';
4
- import { DraggableModalProps } from "./draggableModal";
5
- interface ContextProps extends DraggableModalContextMethods {
6
- id: ModalID;
7
- modalState: ModalState;
8
- }
9
- export interface DraggableModalInnerProps extends DraggableModalProps, ContextProps {
10
- children?: React.ReactNode;
11
- }
12
- export declare const DraggableModalInner: React.MemoExoticComponent<({ id, modalState, dispatch, open, children, title, onResize, ...otherProps }: DraggableModalInnerProps) => JSX.Element>;
13
- export {};
1
+ import * as React from 'react';
2
+ import { DraggableModalContextMethods } from './draggableModalContext';
3
+ import { ModalID, ModalState } from './draggableModalReducer';
4
+ import { DraggableModalProps } from "./draggableModal";
5
+ interface ContextProps extends DraggableModalContextMethods {
6
+ id: ModalID;
7
+ modalState: ModalState;
8
+ initialWidth?: number;
9
+ initialHeight?: number;
10
+ }
11
+ export interface DraggableModalInnerProps extends DraggableModalProps, ContextProps {
12
+ children?: React.ReactNode;
13
+ }
14
+ export declare const DraggableModalInner: React.MemoExoticComponent<({ id, modalState, dispatch, open, children, title, initialWidth, initialHeight, onResize, ...otherProps }: DraggableModalInnerProps) => React.JSX.Element>;
15
+ export {};
@@ -1,56 +1,58 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
- import * as React from 'react';
13
- import { memo, useCallback, useEffect, useMemo } from 'react';
14
- import { Modal } from 'antd';
15
- import { ResizeHandle } from './resizeHandle';
16
- import { useDrag } from './useDrag';
17
- import { usePrevious } from './usePrevious';
18
- import { useResize } from './useResize';
19
- const modalStyle = { margin: 0, paddingBottom: 0, pointerEvents: 'auto' };
20
- export const DraggableModalInner = memo((_a) => {
21
- var { id, modalState, dispatch, open, children, title, onResize } = _a, otherProps = __rest(_a, ["id", "modalState", "dispatch", "open", "children", "title", "onResize"]);
22
- useEffect(() => {
23
- dispatch({ type: 'mount', id, size: { width: otherProps.initialWidth, height: otherProps.initialHeight } });
24
- return () => dispatch({ type: 'unmount', id });
25
- }, [dispatch, id]);
26
- const visiblePrevious = usePrevious(open);
27
- useEffect(() => {
28
- if (open !== visiblePrevious) {
29
- if (open) {
30
- dispatch({ type: 'show', id });
31
- }
32
- else {
33
- dispatch({ type: 'hide', id });
34
- }
35
- }
36
- }, [open, visiblePrevious, id, dispatch]);
37
- const { zIndex, x, y, width, height } = modalState;
38
- const style = useMemo(() => (Object.assign(Object.assign({}, modalStyle), { top: y, left: x, height })), [y, x, height]);
39
- const onFocus = useCallback(() => dispatch({ type: 'focus', id }), [id, dispatch]);
40
- const onDragWithID = useCallback(args => dispatch(Object.assign({ type: 'drag', id }, args)), [
41
- dispatch,
42
- id,
43
- ]);
44
- const onResizeWithID = useCallback((args) => {
45
- onResize === null || onResize === void 0 ? void 0 : onResize({ width: args.width, height: args.height });
46
- return dispatch(Object.assign({ type: 'resize', id }, args));
47
- }, [dispatch, id,]);
48
- const onMouseDrag = useDrag(x, y, onDragWithID);
49
- const onMouseResize = useResize(x, y, width, height, onResizeWithID);
50
- const titleElement = useMemo(() => (React.createElement("div", { className: "ant-design-draggable-modal-title", onMouseDown: onMouseDrag, onClick: onFocus }, title)), [onMouseDrag, onFocus, title]);
51
- return (React.createElement(Modal, Object.assign({ wrapClassName: "ant-design-draggable-modal", style: style, destroyOnClose: true, width: width, zIndex: zIndex, title: titleElement, open: open }, otherProps),
52
- children,
53
- React.createElement(ResizeHandle, { onMouseDown: onMouseResize })));
54
- });
55
- DraggableModalInner.displayName = 'DraggableModalInner';
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import * as React from 'react';
13
+ import { memo, useCallback, useEffect, useMemo } from 'react';
14
+ import { Modal } from 'antd';
15
+ import { ResizeHandle } from './resizeHandle';
16
+ import { useDrag } from './useDrag';
17
+ import { usePrevious } from './usePrevious';
18
+ import { useResize } from './useResize';
19
+ const modalStyle = { margin: 0, paddingBottom: 0, pointerEvents: 'auto' };
20
+ export const DraggableModalInner = memo((_a) => {
21
+ var { id, modalState, dispatch, open, children, title, initialWidth, initialHeight, onResize } = _a, otherProps = __rest(_a, ["id", "modalState", "dispatch", "open", "children", "title", "initialWidth", "initialHeight", "onResize"]);
22
+ useEffect(() => {
23
+ dispatch({ type: 'mount', id, intialState: { initialWidth, initialHeight } });
24
+ return () => dispatch({ type: 'unmount', id });
25
+ }, [dispatch, id, initialWidth, initialHeight]);
26
+ const visiblePrevious = usePrevious(open);
27
+ useEffect(() => {
28
+ if (open !== visiblePrevious) {
29
+ if (open) {
30
+ dispatch({ type: 'show', id });
31
+ }
32
+ else {
33
+ dispatch({ type: 'hide', id });
34
+ }
35
+ }
36
+ }, [open, visiblePrevious, id, dispatch]);
37
+ const { zIndex, x, y, width, height } = modalState;
38
+ const style = useMemo(() => (Object.assign(Object.assign({}, modalStyle), { top: y, left: x, height })), [y, x, height]);
39
+ const onFocus = useCallback(() => dispatch({ type: 'focus', id }), [id, dispatch]);
40
+ const onDragWithID = useCallback((args) => dispatch(Object.assign({ type: 'drag', id }, args)), [
41
+ dispatch,
42
+ id,
43
+ ]);
44
+ const onResizeWithID = useCallback((args) => {
45
+ onResize === null || onResize === void 0 ? void 0 : onResize({ width: args.width, height: args.height });
46
+ return dispatch(Object.assign({ type: 'resize', id }, args));
47
+ }, [dispatch, id,]);
48
+ const onMouseDrag = useDrag(x, y, onDragWithID);
49
+ const onMouseResize = useResize(x, y, width, height, onResizeWithID);
50
+ const titleElement = useMemo(() => (React.createElement("div", { className: "ant-design-draggable-modal-title", onMouseDown: onMouseDrag, onClick: onFocus }, title)), [onMouseDrag, onFocus, title]);
51
+ return (React.createElement(Modal, Object.assign({ wrapClassName: "ant-design-draggable-modal", style: style, destroyOnClose: true, mask: false, maskClosable: false, width: width, zIndex: zIndex, title: titleElement, open: open }, otherProps),
52
+ children,
53
+ React.createElement(ResizeHandle, { onMouseDown: onMouseResize })));
54
+ });
55
+ if (process.env.NODE_ENV !== 'production') {
56
+ DraggableModalInner.displayName = 'DraggableModalInner';
57
+ }
56
58
  //# sourceMappingURL=draggableModalInner.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"draggableModalInner.js","sourceRoot":"","sources":["../../../../../components/modal/impl/draggableModalInner.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAC,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAC,MAAM,OAAO,CAAA;AAC3D,OAAO,EAAC,KAAK,EAAC,MAAM,MAAM,CAAA;AAC1B,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAA;AAC3C,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAA;AAEjC,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAA;AAEzC,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAA;AAGrC,MAAM,UAAU,GAAwB,EAAC,MAAM,EAAE,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,aAAa,EAAE,MAAM,EAAC,CAAA;AAY5F,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CACnC,CAAC,EAS2B,EAAE,EAAE;QAT/B,EACI,EAAE,EACF,UAAU,EACV,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,QAAQ,OAEe,EADpB,UAAU,cARjB,yEASC,CAD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AAC,WAAW,GAAG,qBAAqB,CAAC","sourcesContent":["import * as React from 'react'\nimport {memo, useCallback, useEffect, useMemo} from 'react'\nimport {Modal} from 'antd'\nimport {ResizeHandle} from './resizeHandle'\nimport {useDrag} from './useDrag'\nimport {DraggableModalContextMethods} from './draggableModalContext'\nimport {usePrevious} from './usePrevious'\nimport {ModalID, ModalState} from './draggableModalReducer'\nimport {useResize} from './useResize'\nimport {DraggableModalProps} from \"./draggableModal\";\n\nconst modalStyle: React.CSSProperties = {margin: 0, paddingBottom: 0, pointerEvents: 'auto'}\n\ninterface ContextProps extends DraggableModalContextMethods {\n id: ModalID\n modalState: ModalState\n}\n\n//export type DraggableModalInnerProps = ModalProps & { children?: React.ReactNode } & ContextProps\nexport interface DraggableModalInnerProps extends DraggableModalProps, ContextProps {\n children?: React.ReactNode\n}\n\nexport const DraggableModalInner = memo(\n ({\n id,\n modalState,\n dispatch,\n open,\n children,\n title,\n onResize,\n ...otherProps\n }: DraggableModalInnerProps) => {\n // Call on mount and unmount.\n useEffect(() => {\n dispatch({type: 'mount', id, size: {width: otherProps.initialWidth, height: otherProps.initialHeight}});\n return () => dispatch({type: 'unmount', id})\n }, [dispatch, id]);\n\n // Bring this to the front if it's been opened with props.\n const visiblePrevious = usePrevious(open);\n useEffect(() => {\n if (open !== visiblePrevious) {\n if (open) {\n dispatch({type: 'show', id})\n } else {\n dispatch({type: 'hide', id})\n }\n }\n }, [open, visiblePrevious, id, dispatch]);\n\n const {zIndex, x, y, width, height} = modalState;\n\n const style: React.CSSProperties = useMemo(\n () => ({...modalStyle, top: y, left: x, height}),\n [y, x, height],\n );\n\n const onFocus = useCallback(() => dispatch({type: 'focus', id}), [id, dispatch])\n\n const onDragWithID = useCallback(args => dispatch({type: 'drag', id, ...args}), [\n dispatch,\n id,\n ]);\n\n const onResizeWithID = useCallback((args) => {\n onResize?.({width: args.width, height: args.height});\n return dispatch({type: 'resize', id, ...args});\n }, [dispatch, id,]);\n\n const onMouseDrag = useDrag(x, y, onDragWithID);\n const onMouseResize = useResize(x, y, width, height, onResizeWithID);\n\n const titleElement = useMemo(\n () => (\n <div\n className=\"ant-design-draggable-modal-title\"\n onMouseDown={onMouseDrag}\n onClick={onFocus}\n >\n {title}\n </div>\n ),\n [onMouseDrag, onFocus, title],\n );\n\n return (\n <Modal\n wrapClassName=\"ant-design-draggable-modal\"\n style={style}\n destroyOnClose={true}\n width={width}\n zIndex={zIndex}\n title={titleElement}\n open={open}\n {...otherProps}\n >\n {children}\n <ResizeHandle onMouseDown={onMouseResize}/>\n </Modal>\n )\n },\n);\n\nDraggableModalInner.displayName = 'DraggableModalInner';\n"]}
1
+ {"version":3,"file":"draggableModalInner.js","sourceRoot":"","sources":["../../../../../components/modal/impl/draggableModalInner.tsx"],"names":[],"mappings":";;;;;;;;;;;AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAC,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAC,MAAM,OAAO,CAAA;AAC3D,OAAO,EAAC,KAAK,EAAC,MAAM,MAAM,CAAA;AAC1B,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAA;AAC3C,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAA;AAEjC,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAA;AAEzC,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAA;AAGrC,MAAM,UAAU,GAAwB,EAAC,MAAM,EAAE,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,aAAa,EAAE,MAAM,EAAC,CAAA;AAc5F,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CACnC,CAAC,EAW2B,EAAE,EAAE;QAX/B,EACI,EAAE,EACF,UAAU,EACV,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,YAAY,EACZ,aAAa,EACb,QAAQ,OAEe,EADpB,UAAU,cAVjB,0GAWC,CADgB;IAGd,SAAS,CAAC,GA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;AACL,CAAC,CACJ,CAAC;AAEF,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE,CAAC;IACxC,mBAAmB,CAAC,WAAW,GAAG,qBAAqB,CAAA;AAC3D,CAAC","sourcesContent":["// https://github.com/CUBETIQ/antd-modal/\r\n\r\nimport * as React from 'react'\r\nimport {memo, useCallback, useEffect, useMemo} from 'react'\r\nimport {Modal} from 'antd'\r\nimport {ResizeHandle} from './resizeHandle'\r\nimport {useDrag} from './useDrag'\r\nimport {DraggableModalContextMethods} from './draggableModalContext'\r\nimport {usePrevious} from './usePrevious'\r\nimport {ModalID, ModalState} from './draggableModalReducer'\r\nimport {useResize} from './useResize'\r\nimport {DraggableModalProps} from \"./draggableModal\";\r\n\r\nconst modalStyle: React.CSSProperties = {margin: 0, paddingBottom: 0, pointerEvents: 'auto'}\r\n\r\ninterface ContextProps extends DraggableModalContextMethods {\r\n id: ModalID\r\n modalState: ModalState\r\n initialWidth?: number\r\n initialHeight?: number\r\n}\r\n\r\n//export type DraggableModalInnerProps = ModalProps & { children?: React.ReactNode } & ContextProps\r\nexport interface DraggableModalInnerProps extends DraggableModalProps, ContextProps {\r\n children?: React.ReactNode\r\n}\r\n\r\nexport const DraggableModalInner = memo(\r\n ({\r\n id,\r\n modalState,\r\n dispatch,\r\n open,\r\n children,\r\n title,\r\n initialWidth,\r\n initialHeight,\r\n onResize,\r\n ...otherProps\r\n }: DraggableModalInnerProps) => {\r\n // Call on mount and unmount.\r\n useEffect(() => {\r\n dispatch({type: 'mount', id, intialState: {initialWidth, initialHeight}});\r\n return () => dispatch({type: 'unmount', id})\r\n }, [dispatch, id, initialWidth, initialHeight]);\r\n\r\n // Bring this to the front if it's been opened with props.\r\n const visiblePrevious = usePrevious(open);\r\n useEffect(() => {\r\n if (open !== visiblePrevious) {\r\n if (open) {\r\n dispatch({type: 'show', id})\r\n } else {\r\n dispatch({type: 'hide', id})\r\n }\r\n }\r\n }, [open, visiblePrevious, id, dispatch]);\r\n\r\n const {zIndex, x, y, width, height} = modalState;\r\n\r\n const style: React.CSSProperties = useMemo(\r\n () => ({...modalStyle, top: y, left: x, height}),\r\n [y, x, height],\r\n );\r\n\r\n const onFocus = useCallback(() => dispatch({type: 'focus', id}), [id, dispatch])\r\n\r\n const onDragWithID = useCallback((args: any) => dispatch({type: 'drag', id, ...args}), [\r\n dispatch,\r\n id,\r\n ]);\r\n\r\n const onResizeWithID = useCallback((args: any) => {\r\n onResize?.({width: args.width, height: args.height});\r\n return dispatch({type: 'resize', id, ...args})\r\n }, [dispatch, id,]);\r\n\r\n const onMouseDrag = useDrag(x, y, onDragWithID);\r\n const onMouseResize = useResize(x, y, width, height, onResizeWithID);\r\n\r\n const titleElement = useMemo(\r\n () => (\r\n <div\r\n className=\"ant-design-draggable-modal-title\"\r\n onMouseDown={onMouseDrag}\r\n onClick={onFocus}\r\n >\r\n {title}\r\n </div>\r\n ),\r\n [onMouseDrag, onFocus, title],\r\n );\r\n\r\n return (\r\n <Modal\r\n wrapClassName=\"ant-design-draggable-modal\"\r\n style={style}\r\n destroyOnClose={true}\r\n mask={false}\r\n maskClosable={false}\r\n width={width}\r\n zIndex={zIndex}\r\n title={titleElement}\r\n open={open}\r\n {...otherProps}\r\n >\r\n {children}\r\n <ResizeHandle onMouseDown={onMouseResize}/>\r\n </Modal>\r\n )\r\n }\r\n);\r\n\r\nif (process.env.NODE_ENV !== 'production') {\r\n DraggableModalInner.displayName = 'DraggableModalInner'\r\n}\r\n"]}
@@ -1,62 +1,66 @@
1
- export declare type ModalID = string;
2
- export interface ModalState {
3
- x: number;
4
- y: number;
5
- width: number;
6
- height: number;
7
- zIndex: number;
8
- visible: boolean;
9
- }
10
- export interface ModalsState {
11
- maxZIndex: number;
12
- windowSize: {
13
- width: number;
14
- height: number;
15
- };
16
- modals: {
17
- [key: string]: ModalState;
18
- };
19
- }
20
- export declare const initialModalsState: ModalsState;
21
- export declare const initialModalState: ModalState;
22
- export declare type Action = {
23
- type: 'show';
24
- id: ModalID;
25
- } | {
26
- type: 'hide';
27
- id: ModalID;
28
- } | {
29
- type: 'focus';
30
- id: ModalID;
31
- } | {
32
- type: 'unmount';
33
- id: ModalID;
34
- } | {
35
- type: 'mount';
36
- id: ModalID;
37
- size: {
38
- width?: number;
39
- height?: number;
40
- };
41
- } | {
42
- type: 'windowResize';
43
- size: {
44
- width: number;
45
- height: number;
46
- };
47
- } | {
48
- type: 'drag';
49
- id: ModalID;
50
- x: number;
51
- y: number;
52
- } | {
53
- type: 'resize';
54
- id: ModalID;
55
- x: number;
56
- y: number;
57
- width: number;
58
- height: number;
59
- };
60
- export declare const getOrCreateModalState: (state: ModalsState, id: ModalID, initialWidth: number | undefined, initialHeight: number | undefined) => ModalState;
61
- export declare const getModalState: (state: ModalsState, id: ModalID) => ModalState;
62
- export declare const draggableModalReducer: (state: ModalsState, action: Action) => ModalsState;
1
+ export type ModalID = string;
2
+ export interface ModalState {
3
+ x: number;
4
+ y: number;
5
+ width: number;
6
+ height: number;
7
+ zIndex: number;
8
+ visible: boolean;
9
+ }
10
+ export interface ModalsState {
11
+ maxZIndex: number;
12
+ windowSize: {
13
+ width: number;
14
+ height: number;
15
+ };
16
+ modals: {
17
+ [key: string]: ModalState;
18
+ };
19
+ }
20
+ export declare const initialModalsState: ModalsState;
21
+ export declare const initialModalState: ModalState;
22
+ export type Action = {
23
+ type: 'show';
24
+ id: ModalID;
25
+ } | {
26
+ type: 'hide';
27
+ id: ModalID;
28
+ } | {
29
+ type: 'focus';
30
+ id: ModalID;
31
+ } | {
32
+ type: 'unmount';
33
+ id: ModalID;
34
+ } | {
35
+ type: 'mount';
36
+ id: ModalID;
37
+ intialState: {
38
+ initialWidth?: number;
39
+ initialHeight?: number;
40
+ };
41
+ } | {
42
+ type: 'windowResize';
43
+ size: {
44
+ width: number;
45
+ height: number;
46
+ };
47
+ } | {
48
+ type: 'drag';
49
+ id: ModalID;
50
+ x: number;
51
+ y: number;
52
+ } | {
53
+ type: 'resize';
54
+ id: ModalID;
55
+ x: number;
56
+ y: number;
57
+ width: number;
58
+ height: number;
59
+ };
60
+ export declare const getModalState: ({ state, id, initialWidth, initialHeight, }: {
61
+ state: ModalsState;
62
+ id: ModalID;
63
+ initialWidth?: number;
64
+ initialHeight?: number;
65
+ }) => ModalState;
66
+ export declare const draggableModalReducer: (state: ModalsState, action: Action) => ModalsState;