funda-ui 4.5.682 → 4.5.711

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 (506) hide show
  1. package/.gitattributes +2 -0
  2. package/README.md +105 -4
  3. package/README_PUBLISH.md +126 -0
  4. package/lib/cjs/DragDropList/index.d.ts +1 -0
  5. package/lib/cjs/DragDropList/index.js +4 -6
  6. package/lib/cjs/MultipleSelect/index.d.ts +1 -0
  7. package/lib/cjs/MultipleSelect/index.js +23 -25
  8. package/lib/cjs/Textarea/index.d.ts +1 -0
  9. package/lib/cjs/Textarea/index.js +55 -13
  10. package/lib/cjs/Tree/index.d.ts +1 -0
  11. package/lib/cjs/Tree/index.js +29 -0
  12. package/lib/cjs/Utils/useAutosizeTextArea.d.ts +4 -1
  13. package/lib/cjs/Utils/useAutosizeTextArea.js +37 -2
  14. package/lib/cjs/Utils/useBoundedDrag.d.ts +0 -2
  15. package/lib/cjs/Utils/useBoundedDrag.js +0 -2
  16. package/lib/cjs/Utils/useIsMobile.d.ts +2 -0
  17. package/lib/cjs/Utils/useIsMobile.js +168 -0
  18. package/lib/cjs/index.js +0 -1
  19. package/lib/esm/DragDropList/index.tsx +1 -0
  20. package/lib/esm/MultipleSelect/index.tsx +1 -0
  21. package/lib/esm/Textarea/index.tsx +17 -12
  22. package/lib/esm/Tree/TreeList.tsx +32 -0
  23. package/lib/esm/Tree/index.tsx +3 -0
  24. package/lib/esm/Utils/hooks/useAutosizeTextArea.tsx +39 -4
  25. package/lib/esm/Utils/hooks/useBoundedDrag.tsx +0 -2
  26. package/lib/esm/Utils/hooks/useIsMobile.tsx +56 -0
  27. package/logo.png +0 -0
  28. package/package.json +556 -11
  29. package/preview.png +0 -0
  30. package/{DragDropList → publish/DragDropList}/index.d.ts +1 -0
  31. package/{DragDropList → publish/DragDropList}/index.js +4 -6
  32. package/publish/LICENSE +21 -0
  33. package/{MultipleSelect → publish/MultipleSelect}/index.d.ts +1 -0
  34. package/{MultipleSelect → publish/MultipleSelect}/index.js +23 -25
  35. package/publish/README.md +126 -0
  36. package/{Textarea → publish/Textarea}/index.d.ts +1 -0
  37. package/{Textarea → publish/Textarea}/index.js +55 -13
  38. package/{Tree → publish/Tree}/index.d.ts +1 -0
  39. package/{Tree → publish/Tree}/index.js +29 -0
  40. package/{Utils → publish/Utils}/useAutosizeTextArea.d.ts +4 -1
  41. package/{Utils → publish/Utils}/useAutosizeTextArea.js +37 -2
  42. package/{Utils → publish/Utils}/useBoundedDrag.d.ts +0 -2
  43. package/{Utils → publish/Utils}/useBoundedDrag.js +0 -2
  44. package/publish/Utils/useIsMobile.d.ts +2 -0
  45. package/publish/Utils/useIsMobile.js +168 -0
  46. package/{all.js → publish/all.js} +0 -1
  47. package/publish/lib/cjs/Accordion/index.d.ts +2 -0
  48. package/publish/lib/cjs/Accordion/index.js +1035 -0
  49. package/publish/lib/cjs/BackToTop/index.d.ts +17 -0
  50. package/publish/lib/cjs/BackToTop/index.js +904 -0
  51. package/publish/lib/cjs/CascadingSelect/index.d.ts +60 -0
  52. package/publish/lib/cjs/CascadingSelect/index.js +2943 -0
  53. package/publish/lib/cjs/CascadingSelectE2E/index.d.ts +71 -0
  54. package/publish/lib/cjs/CascadingSelectE2E/index.js +3540 -0
  55. package/publish/lib/cjs/Checkbox/index.d.ts +28 -0
  56. package/publish/lib/cjs/Checkbox/index.js +662 -0
  57. package/publish/lib/cjs/ColorPicker/index.d.ts +27 -0
  58. package/publish/lib/cjs/ColorPicker/index.js +662 -0
  59. package/publish/lib/cjs/Date/index.d.ts +70 -0
  60. package/publish/lib/cjs/Date/index.js +6200 -0
  61. package/publish/lib/cjs/DigitalClock/index.d.ts +7 -0
  62. package/publish/lib/cjs/DigitalClock/index.js +402 -0
  63. package/publish/lib/cjs/DragDropList/index.d.ts +44 -0
  64. package/publish/lib/cjs/DragDropList/index.js +1587 -0
  65. package/publish/lib/cjs/DropdownMenu/index.d.ts +38 -0
  66. package/publish/lib/cjs/DropdownMenu/index.js +1498 -0
  67. package/publish/lib/cjs/DynamicFields/index.d.ts +40 -0
  68. package/publish/lib/cjs/DynamicFields/index.js +810 -0
  69. package/publish/lib/cjs/EventCalendar/index.d.ts +61 -0
  70. package/publish/lib/cjs/EventCalendar/index.js +3740 -0
  71. package/publish/lib/cjs/EventCalendarTimeline/index.d.ts +100 -0
  72. package/publish/lib/cjs/EventCalendarTimeline/index.js +6084 -0
  73. package/publish/lib/cjs/File/index.d.ts +40 -0
  74. package/publish/lib/cjs/File/index.js +1751 -0
  75. package/publish/lib/cjs/HorizontalScrollContent/index.d.ts +14 -0
  76. package/publish/lib/cjs/HorizontalScrollContent/index.js +426 -0
  77. package/publish/lib/cjs/Input/index.d.ts +59 -0
  78. package/publish/lib/cjs/Input/index.js +1455 -0
  79. package/publish/lib/cjs/LiveSearch/index.d.ts +69 -0
  80. package/publish/lib/cjs/LiveSearch/index.js +3626 -0
  81. package/publish/lib/cjs/MasonryLayout/index.d.ts +14 -0
  82. package/publish/lib/cjs/MasonryLayout/index.js +689 -0
  83. package/publish/lib/cjs/ModalDialog/index.d.ts +79 -0
  84. package/publish/lib/cjs/ModalDialog/index.js +1695 -0
  85. package/publish/lib/cjs/ModeSwitch/index.d.ts +17 -0
  86. package/publish/lib/cjs/ModeSwitch/index.js +202 -0
  87. package/publish/lib/cjs/MultilevelDropdownMenu/index.d.ts +20 -0
  88. package/publish/lib/cjs/MultilevelDropdownMenu/index.js +930 -0
  89. package/publish/lib/cjs/MultipleCheckboxes/index.d.ts +41 -0
  90. package/publish/lib/cjs/MultipleCheckboxes/index.js +1717 -0
  91. package/publish/lib/cjs/MultipleSelect/index.d.ts +65 -0
  92. package/publish/lib/cjs/MultipleSelect/index.js +3704 -0
  93. package/publish/lib/cjs/NativeSelect/index.d.ts +37 -0
  94. package/publish/lib/cjs/NativeSelect/index.js +1631 -0
  95. package/publish/lib/cjs/NumberInput/index.d.ts +40 -0
  96. package/publish/lib/cjs/NumberInput/index.js +1188 -0
  97. package/publish/lib/cjs/Pagination/index.d.ts +51 -0
  98. package/publish/lib/cjs/Pagination/index.js +612 -0
  99. package/publish/lib/cjs/Radio/index.d.ts +45 -0
  100. package/publish/lib/cjs/Radio/index.js +1391 -0
  101. package/publish/lib/cjs/RangeSlider/index.d.ts +22 -0
  102. package/publish/lib/cjs/RangeSlider/index.js +2665 -0
  103. package/publish/lib/cjs/RootPortal/index.d.ts +8 -0
  104. package/publish/lib/cjs/RootPortal/index.js +141 -0
  105. package/publish/lib/cjs/ScrollReveal/index.d.ts +21 -0
  106. package/publish/lib/cjs/ScrollReveal/index.js +401 -0
  107. package/publish/lib/cjs/Scrollbar/index.d.ts +17 -0
  108. package/publish/lib/cjs/Scrollbar/index.js +1107 -0
  109. package/publish/lib/cjs/SearchBar/index.d.ts +41 -0
  110. package/publish/lib/cjs/SearchBar/index.js +701 -0
  111. package/publish/lib/cjs/Select/index.d.ts +99 -0
  112. package/publish/lib/cjs/Select/index.js +5697 -0
  113. package/publish/lib/cjs/ShowMoreLess/index.d.ts +36 -0
  114. package/publish/lib/cjs/ShowMoreLess/index.js +387 -0
  115. package/publish/lib/cjs/Switch/index.d.ts +25 -0
  116. package/publish/lib/cjs/Switch/index.js +628 -0
  117. package/publish/lib/cjs/Table/index.d.ts +12 -0
  118. package/publish/lib/cjs/Table/index.js +2062 -0
  119. package/publish/lib/cjs/Tabs/index.d.ts +3 -0
  120. package/publish/lib/cjs/Tabs/index.js +771 -0
  121. package/publish/lib/cjs/TagInput/index.d.ts +31 -0
  122. package/publish/lib/cjs/TagInput/index.js +1144 -0
  123. package/publish/lib/cjs/Textarea/index.d.ts +50 -0
  124. package/publish/lib/cjs/Textarea/index.js +1784 -0
  125. package/publish/lib/cjs/Toast/index.d.ts +34 -0
  126. package/publish/lib/cjs/Toast/index.js +861 -0
  127. package/publish/lib/cjs/Tooltip/index.d.ts +23 -0
  128. package/publish/lib/cjs/Tooltip/index.js +1674 -0
  129. package/publish/lib/cjs/Tree/index.d.ts +62 -0
  130. package/publish/lib/cjs/Tree/index.js +1960 -0
  131. package/publish/lib/cjs/Utils/anim.d.ts +11 -0
  132. package/publish/lib/cjs/Utils/anim.js +400 -0
  133. package/publish/lib/cjs/Utils/bodyScrollLock.d.ts +8 -0
  134. package/publish/lib/cjs/Utils/bodyScrollLock.js +311 -0
  135. package/publish/lib/cjs/Utils/buffer.d.ts +67 -0
  136. package/publish/lib/cjs/Utils/buffer.js +343 -0
  137. package/publish/lib/cjs/Utils/cls.d.ts +15 -0
  138. package/publish/lib/cjs/Utils/cls.js +124 -0
  139. package/publish/lib/cjs/Utils/convert.d.ts +25 -0
  140. package/publish/lib/cjs/Utils/convert.js +109 -0
  141. package/publish/lib/cjs/Utils/date.d.ts +217 -0
  142. package/publish/lib/cjs/Utils/date.js +567 -0
  143. package/publish/lib/cjs/Utils/dom.d.ts +13 -0
  144. package/publish/lib/cjs/Utils/dom.js +215 -0
  145. package/publish/lib/cjs/Utils/easing.d.ts +29 -0
  146. package/publish/lib/cjs/Utils/easing.js +221 -0
  147. package/publish/lib/cjs/Utils/extract.d.ts +28 -0
  148. package/publish/lib/cjs/Utils/extract.js +130 -0
  149. package/publish/lib/cjs/Utils/getElementProperty.d.ts +52 -0
  150. package/publish/lib/cjs/Utils/getElementProperty.js +189 -0
  151. package/publish/lib/cjs/Utils/guid.d.ts +7 -0
  152. package/publish/lib/cjs/Utils/guid.js +67 -0
  153. package/publish/lib/cjs/Utils/initDefaultOptions.d.ts +21 -0
  154. package/publish/lib/cjs/Utils/initDefaultOptions.js +131 -0
  155. package/publish/lib/cjs/Utils/inputsCalculation.d.ts +28 -0
  156. package/publish/lib/cjs/Utils/inputsCalculation.js +188 -0
  157. package/publish/lib/cjs/Utils/math.d.ts +77 -0
  158. package/publish/lib/cjs/Utils/math.js +305 -0
  159. package/publish/lib/cjs/Utils/object.d.ts +18 -0
  160. package/publish/lib/cjs/Utils/object.js +120 -0
  161. package/publish/lib/cjs/Utils/os.d.ts +2 -0
  162. package/publish/lib/cjs/Utils/os.js +104 -0
  163. package/publish/lib/cjs/Utils/performance.d.ts +3 -0
  164. package/publish/lib/cjs/Utils/performance.js +94 -0
  165. package/publish/lib/cjs/Utils/tree.d.ts +40 -0
  166. package/publish/lib/cjs/Utils/tree.js +195 -0
  167. package/publish/lib/cjs/Utils/useAutosizeTextArea.d.ts +10 -0
  168. package/publish/lib/cjs/Utils/useAutosizeTextArea.js +227 -0
  169. package/publish/lib/cjs/Utils/useBoundedDrag.d.ts +125 -0
  170. package/publish/lib/cjs/Utils/useBoundedDrag.js +380 -0
  171. package/publish/lib/cjs/Utils/useClickOutside.d.ts +33 -0
  172. package/publish/lib/cjs/Utils/useClickOutside.js +166 -0
  173. package/publish/lib/cjs/Utils/useComId.d.ts +6 -0
  174. package/publish/lib/cjs/Utils/useComId.js +114 -0
  175. package/publish/lib/cjs/Utils/useDebounce.d.ts +20 -0
  176. package/publish/lib/cjs/Utils/useDebounce.js +138 -0
  177. package/publish/lib/cjs/Utils/useDragDropPosition.d.ts +169 -0
  178. package/publish/lib/cjs/Utils/useDragDropPosition.js +456 -0
  179. package/publish/lib/cjs/Utils/useDraggable.d.ts +62 -0
  180. package/publish/lib/cjs/Utils/useDraggable.js +348 -0
  181. package/publish/lib/cjs/Utils/useInterval.d.ts +5 -0
  182. package/publish/lib/cjs/Utils/useInterval.js +168 -0
  183. package/publish/lib/cjs/Utils/useIsMobile.d.ts +2 -0
  184. package/publish/lib/cjs/Utils/useIsMobile.js +168 -0
  185. package/publish/lib/cjs/Utils/useKeyPress.d.ts +44 -0
  186. package/publish/lib/cjs/Utils/useKeyPress.js +200 -0
  187. package/publish/lib/cjs/Utils/useThrottle.d.ts +2 -0
  188. package/publish/lib/cjs/Utils/useThrottle.js +136 -0
  189. package/publish/lib/cjs/Utils/useWindowScroll.d.ts +12 -0
  190. package/publish/lib/cjs/Utils/useWindowScroll.js +217 -0
  191. package/publish/lib/cjs/Utils/viewport.d.ts +7 -0
  192. package/publish/lib/cjs/Utils/viewport.js +64 -0
  193. package/publish/lib/cjs/index.d.ts +45 -0
  194. package/publish/lib/cjs/index.js +46 -0
  195. package/publish/lib/css/BackToTop/index.css +34 -0
  196. package/publish/lib/css/CascadingSelect/index.css +216 -0
  197. package/publish/lib/css/CascadingSelectE2E/index.css +216 -0
  198. package/publish/lib/css/ColorPicker/index.css +58 -0
  199. package/publish/lib/css/Date/index.css +434 -0
  200. package/publish/lib/css/DragDropList/index.css +188 -0
  201. package/publish/lib/css/DropdownMenu/index.css +151 -0
  202. package/publish/lib/css/EventCalendar/index.css +300 -0
  203. package/publish/lib/css/EventCalendarTimeline/index.css +694 -0
  204. package/publish/lib/css/HorizontalScrollContent/index.css +70 -0
  205. package/publish/lib/css/LiveSearch/index.css +55 -0
  206. package/publish/lib/css/MultilevelDropdownMenu/index.css +38 -0
  207. package/publish/lib/css/MultipleSelect/index.css +313 -0
  208. package/publish/lib/css/RangeSlider/index.css +150 -0
  209. package/publish/lib/css/Scrollbar/index.css +176 -0
  210. package/publish/lib/css/Select/index.css +368 -0
  211. package/publish/lib/css/ShowMoreLess/index.css +23 -0
  212. package/publish/lib/css/Table/index.css +584 -0
  213. package/publish/lib/css/TagInput/index.css +91 -0
  214. package/publish/lib/css/Toast/index.css +201 -0
  215. package/publish/lib/css/Tooltip/index.css +197 -0
  216. package/publish/lib/css/Tree/index.css +232 -0
  217. package/publish/lib/esm/Accordion/Accordion.tsx +184 -0
  218. package/publish/lib/esm/Accordion/AccordionItem.tsx +143 -0
  219. package/publish/lib/esm/Accordion/index.tsx +2 -0
  220. package/publish/lib/esm/BackToTop/index.scss +47 -0
  221. package/publish/lib/esm/BackToTop/index.tsx +177 -0
  222. package/publish/lib/esm/CascadingSelect/Group.tsx +82 -0
  223. package/publish/lib/esm/CascadingSelect/index.scss +291 -0
  224. package/publish/lib/esm/CascadingSelect/index.tsx +1203 -0
  225. package/publish/lib/esm/CascadingSelectE2E/Group.tsx +83 -0
  226. package/publish/lib/esm/CascadingSelectE2E/index.scss +293 -0
  227. package/publish/lib/esm/CascadingSelectE2E/index.tsx +1471 -0
  228. package/publish/lib/esm/Checkbox/index.tsx +193 -0
  229. package/publish/lib/esm/ColorPicker/index.scss +91 -0
  230. package/publish/lib/esm/ColorPicker/index.tsx +204 -0
  231. package/publish/lib/esm/Date/Calendar.tsx +723 -0
  232. package/publish/lib/esm/Date/index.scss +567 -0
  233. package/publish/lib/esm/Date/index.tsx +1683 -0
  234. package/publish/lib/esm/Date/localization/en_US.js +13 -0
  235. package/publish/lib/esm/Date/localization/zh_CN.js +12 -0
  236. package/publish/lib/esm/DigitalClock/index.tsx +74 -0
  237. package/publish/lib/esm/DragDropList/index.scss +245 -0
  238. package/publish/lib/esm/DragDropList/index.tsx +494 -0
  239. package/publish/lib/esm/DropdownMenu/Option.tsx +55 -0
  240. package/publish/lib/esm/DropdownMenu/index.scss +205 -0
  241. package/publish/lib/esm/DropdownMenu/index.tsx +377 -0
  242. package/publish/lib/esm/DynamicFields/index.tsx +404 -0
  243. package/publish/lib/esm/EventCalendar/index.scss +407 -0
  244. package/publish/lib/esm/EventCalendar/index.tsx +1004 -0
  245. package/publish/lib/esm/EventCalendarTimeline/index.scss +926 -0
  246. package/publish/lib/esm/EventCalendarTimeline/index.tsx +2683 -0
  247. package/publish/lib/esm/File/index.tsx +477 -0
  248. package/publish/lib/esm/HorizontalScrollContent/index.scss +87 -0
  249. package/publish/lib/esm/HorizontalScrollContent/index.tsx +171 -0
  250. package/publish/lib/esm/Input/index.tsx +614 -0
  251. package/publish/lib/esm/LiveSearch/index.scss +82 -0
  252. package/publish/lib/esm/LiveSearch/index.tsx +960 -0
  253. package/publish/lib/esm/MasonryLayout/index.tsx +326 -0
  254. package/publish/lib/esm/ModalDialog/index.tsx +552 -0
  255. package/publish/lib/esm/ModeSwitch/index.tsx +82 -0
  256. package/publish/lib/esm/MultilevelDropdownMenu/ItemList.tsx +265 -0
  257. package/publish/lib/esm/MultilevelDropdownMenu/index.scss +79 -0
  258. package/publish/lib/esm/MultilevelDropdownMenu/index.tsx +77 -0
  259. package/publish/lib/esm/MultipleCheckboxes/index.tsx +669 -0
  260. package/publish/lib/esm/MultipleSelect/index.scss +398 -0
  261. package/publish/lib/esm/MultipleSelect/index.tsx +766 -0
  262. package/publish/lib/esm/MultipleSelect/utils/func.ts +61 -0
  263. package/publish/lib/esm/NativeSelect/index.tsx +396 -0
  264. package/publish/lib/esm/NativeSelect/utils/func.ts +49 -0
  265. package/publish/lib/esm/NumberInput/index.tsx +385 -0
  266. package/publish/lib/esm/Pagination/index.tsx +286 -0
  267. package/publish/lib/esm/Pagination/pagination-navigators.tsx +60 -0
  268. package/publish/lib/esm/Radio/index.tsx +670 -0
  269. package/publish/lib/esm/RangeSlider/index.scss +186 -0
  270. package/publish/lib/esm/RangeSlider/index.tsx +241 -0
  271. package/publish/lib/esm/RootPortal/index.tsx +53 -0
  272. package/publish/lib/esm/ScrollReveal/index.tsx +148 -0
  273. package/publish/lib/esm/Scrollbar/index.scss +221 -0
  274. package/publish/lib/esm/Scrollbar/index.tsx +561 -0
  275. package/publish/lib/esm/SearchBar/index.tsx +253 -0
  276. package/publish/lib/esm/Select/index.scss +553 -0
  277. package/publish/lib/esm/Select/index.tsx +2816 -0
  278. package/publish/lib/esm/Select/utils/func.ts +106 -0
  279. package/publish/lib/esm/ShowMoreLess/index.scss +27 -0
  280. package/publish/lib/esm/ShowMoreLess/index.tsx +145 -0
  281. package/publish/lib/esm/Switch/index.tsx +147 -0
  282. package/publish/lib/esm/Table/Table.tsx +257 -0
  283. package/publish/lib/esm/Table/TableBody.tsx +41 -0
  284. package/publish/lib/esm/Table/TableCaption.tsx +34 -0
  285. package/publish/lib/esm/Table/TableCell.tsx +123 -0
  286. package/publish/lib/esm/Table/TableColgroup.tsx +38 -0
  287. package/publish/lib/esm/Table/TableContext.tsx +26 -0
  288. package/publish/lib/esm/Table/TableFoot.tsx +28 -0
  289. package/publish/lib/esm/Table/TableHead.tsx +28 -0
  290. package/publish/lib/esm/Table/TableRow.tsx +76 -0
  291. package/publish/lib/esm/Table/index.scss +418 -0
  292. package/publish/lib/esm/Table/index.tsx +14 -0
  293. package/publish/lib/esm/Table/utils/DragHandleSprite.tsx +46 -0
  294. package/publish/lib/esm/Table/utils/SortSprite.tsx +57 -0
  295. package/publish/lib/esm/Table/utils/TableFilter.tsx +56 -0
  296. package/publish/lib/esm/Table/utils/ToggleSelection.tsx +225 -0
  297. package/publish/lib/esm/Table/utils/func.ts +171 -0
  298. package/publish/lib/esm/Table/utils/hooks/useTableDraggable.tsx +342 -0
  299. package/publish/lib/esm/Table/utils/hooks/useTableKeyPress.tsx +154 -0
  300. package/publish/lib/esm/Table/utils/hooks/useTableResponsive.tsx +92 -0
  301. package/publish/lib/esm/Table/utils/hooks/useTableSort.tsx +143 -0
  302. package/publish/lib/esm/Tabs/TabList.tsx +50 -0
  303. package/publish/lib/esm/Tabs/TabPanel.tsx +44 -0
  304. package/publish/lib/esm/Tabs/Tabs.tsx +282 -0
  305. package/publish/lib/esm/Tabs/index.tsx +3 -0
  306. package/publish/lib/esm/TagInput/index.scss +126 -0
  307. package/publish/lib/esm/TagInput/index.tsx +352 -0
  308. package/publish/lib/esm/Textarea/index.tsx +608 -0
  309. package/publish/lib/esm/Toast/Item.tsx +124 -0
  310. package/publish/lib/esm/Toast/index.scss +269 -0
  311. package/publish/lib/esm/Toast/index.tsx +374 -0
  312. package/publish/lib/esm/Tooltip/index.scss +269 -0
  313. package/publish/lib/esm/Tooltip/index.tsx +312 -0
  314. package/publish/lib/esm/Tree/TreeList.tsx +616 -0
  315. package/publish/lib/esm/Tree/index.scss +386 -0
  316. package/publish/lib/esm/Tree/index.tsx +396 -0
  317. package/publish/lib/esm/Tree/init-height.tsx +27 -0
  318. package/publish/lib/esm/Tree/utils/func.ts +15 -0
  319. package/publish/lib/esm/Utils/hooks/useAutosizeTextArea.tsx +125 -0
  320. package/publish/lib/esm/Utils/hooks/useBoundedDrag.tsx +301 -0
  321. package/publish/lib/esm/Utils/hooks/useClickOutside.tsx +69 -0
  322. package/publish/lib/esm/Utils/hooks/useComId.tsx +13 -0
  323. package/publish/lib/esm/Utils/hooks/useDebounce.tsx +40 -0
  324. package/publish/lib/esm/Utils/hooks/useDragDropPosition.tsx +420 -0
  325. package/publish/lib/esm/Utils/hooks/useDraggable.tsx +265 -0
  326. package/publish/lib/esm/Utils/hooks/useInterval.tsx +74 -0
  327. package/publish/lib/esm/Utils/hooks/useIsMobile.tsx +56 -0
  328. package/publish/lib/esm/Utils/hooks/useKeyPress.tsx +104 -0
  329. package/publish/lib/esm/Utils/hooks/useThrottle.tsx +39 -0
  330. package/publish/lib/esm/Utils/hooks/useWindowScroll.tsx +83 -0
  331. package/publish/lib/esm/Utils/libs/anim.ts +96 -0
  332. package/publish/lib/esm/Utils/libs/buffer.ts +262 -0
  333. package/publish/lib/esm/Utils/libs/cls.ts +64 -0
  334. package/publish/lib/esm/Utils/libs/convert.ts +59 -0
  335. package/publish/lib/esm/Utils/libs/date.ts +578 -0
  336. package/publish/lib/esm/Utils/libs/dom.ts +150 -0
  337. package/publish/lib/esm/Utils/libs/easing.ts +201 -0
  338. package/publish/lib/esm/Utils/libs/extract.ts +86 -0
  339. package/publish/lib/esm/Utils/libs/getElementProperty.ts +150 -0
  340. package/publish/lib/esm/Utils/libs/guid.ts +16 -0
  341. package/publish/lib/esm/Utils/libs/initDefaultOptions.ts +104 -0
  342. package/publish/lib/esm/Utils/libs/inputsCalculation.ts +160 -0
  343. package/publish/lib/esm/Utils/libs/math.ts +276 -0
  344. package/publish/lib/esm/Utils/libs/object.ts +68 -0
  345. package/publish/lib/esm/Utils/libs/os.ts +63 -0
  346. package/publish/lib/esm/Utils/libs/performance.ts +47 -0
  347. package/publish/lib/esm/Utils/libs/tree.ts +119 -0
  348. package/publish/lib/esm/Utils/libs/viewport.ts +20 -0
  349. package/publish/lib/esm/Utils/plugins/bodyScrollLock.ts +286 -0
  350. package/publish/lib/esm/index.js +43 -0
  351. package/publish/package.json +1 -0
  352. /package/{Accordion → publish/Accordion}/index.d.ts +0 -0
  353. /package/{Accordion → publish/Accordion}/index.js +0 -0
  354. /package/{BackToTop → publish/BackToTop}/index.css +0 -0
  355. /package/{BackToTop → publish/BackToTop}/index.d.ts +0 -0
  356. /package/{BackToTop → publish/BackToTop}/index.js +0 -0
  357. /package/{CascadingSelect → publish/CascadingSelect}/index.css +0 -0
  358. /package/{CascadingSelect → publish/CascadingSelect}/index.d.ts +0 -0
  359. /package/{CascadingSelect → publish/CascadingSelect}/index.js +0 -0
  360. /package/{CascadingSelectE2E → publish/CascadingSelectE2E}/index.css +0 -0
  361. /package/{CascadingSelectE2E → publish/CascadingSelectE2E}/index.d.ts +0 -0
  362. /package/{CascadingSelectE2E → publish/CascadingSelectE2E}/index.js +0 -0
  363. /package/{Checkbox → publish/Checkbox}/index.d.ts +0 -0
  364. /package/{Checkbox → publish/Checkbox}/index.js +0 -0
  365. /package/{ColorPicker → publish/ColorPicker}/index.css +0 -0
  366. /package/{ColorPicker → publish/ColorPicker}/index.d.ts +0 -0
  367. /package/{ColorPicker → publish/ColorPicker}/index.js +0 -0
  368. /package/{Date → publish/Date}/index.css +0 -0
  369. /package/{Date → publish/Date}/index.d.ts +0 -0
  370. /package/{Date → publish/Date}/index.js +0 -0
  371. /package/{DigitalClock → publish/DigitalClock}/index.d.ts +0 -0
  372. /package/{DigitalClock → publish/DigitalClock}/index.js +0 -0
  373. /package/{DragDropList → publish/DragDropList}/index.css +0 -0
  374. /package/{DropdownMenu → publish/DropdownMenu}/index.css +0 -0
  375. /package/{DropdownMenu → publish/DropdownMenu}/index.d.ts +0 -0
  376. /package/{DropdownMenu → publish/DropdownMenu}/index.js +0 -0
  377. /package/{DynamicFields → publish/DynamicFields}/index.d.ts +0 -0
  378. /package/{DynamicFields → publish/DynamicFields}/index.js +0 -0
  379. /package/{EventCalendar → publish/EventCalendar}/index.css +0 -0
  380. /package/{EventCalendar → publish/EventCalendar}/index.d.ts +0 -0
  381. /package/{EventCalendar → publish/EventCalendar}/index.js +0 -0
  382. /package/{EventCalendarTimeline → publish/EventCalendarTimeline}/index.css +0 -0
  383. /package/{EventCalendarTimeline → publish/EventCalendarTimeline}/index.d.ts +0 -0
  384. /package/{EventCalendarTimeline → publish/EventCalendarTimeline}/index.js +0 -0
  385. /package/{File → publish/File}/index.d.ts +0 -0
  386. /package/{File → publish/File}/index.js +0 -0
  387. /package/{HorizontalScrollContent → publish/HorizontalScrollContent}/index.css +0 -0
  388. /package/{HorizontalScrollContent → publish/HorizontalScrollContent}/index.d.ts +0 -0
  389. /package/{HorizontalScrollContent → publish/HorizontalScrollContent}/index.js +0 -0
  390. /package/{Input → publish/Input}/index.d.ts +0 -0
  391. /package/{Input → publish/Input}/index.js +0 -0
  392. /package/{LiveSearch → publish/LiveSearch}/index.css +0 -0
  393. /package/{LiveSearch → publish/LiveSearch}/index.d.ts +0 -0
  394. /package/{LiveSearch → publish/LiveSearch}/index.js +0 -0
  395. /package/{MasonryLayout → publish/MasonryLayout}/index.d.ts +0 -0
  396. /package/{MasonryLayout → publish/MasonryLayout}/index.js +0 -0
  397. /package/{ModalDialog → publish/ModalDialog}/index.d.ts +0 -0
  398. /package/{ModalDialog → publish/ModalDialog}/index.js +0 -0
  399. /package/{ModeSwitch → publish/ModeSwitch}/index.d.ts +0 -0
  400. /package/{ModeSwitch → publish/ModeSwitch}/index.js +0 -0
  401. /package/{MultilevelDropdownMenu → publish/MultilevelDropdownMenu}/index.css +0 -0
  402. /package/{MultilevelDropdownMenu → publish/MultilevelDropdownMenu}/index.d.ts +0 -0
  403. /package/{MultilevelDropdownMenu → publish/MultilevelDropdownMenu}/index.js +0 -0
  404. /package/{MultipleCheckboxes → publish/MultipleCheckboxes}/index.d.ts +0 -0
  405. /package/{MultipleCheckboxes → publish/MultipleCheckboxes}/index.js +0 -0
  406. /package/{MultipleSelect → publish/MultipleSelect}/index.css +0 -0
  407. /package/{NativeSelect → publish/NativeSelect}/index.d.ts +0 -0
  408. /package/{NativeSelect → publish/NativeSelect}/index.js +0 -0
  409. /package/{NumberInput → publish/NumberInput}/index.d.ts +0 -0
  410. /package/{NumberInput → publish/NumberInput}/index.js +0 -0
  411. /package/{Pagination → publish/Pagination}/index.d.ts +0 -0
  412. /package/{Pagination → publish/Pagination}/index.js +0 -0
  413. /package/{Radio → publish/Radio}/index.d.ts +0 -0
  414. /package/{Radio → publish/Radio}/index.js +0 -0
  415. /package/{RangeSlider → publish/RangeSlider}/index.css +0 -0
  416. /package/{RangeSlider → publish/RangeSlider}/index.d.ts +0 -0
  417. /package/{RangeSlider → publish/RangeSlider}/index.js +0 -0
  418. /package/{RootPortal → publish/RootPortal}/index.d.ts +0 -0
  419. /package/{RootPortal → publish/RootPortal}/index.js +0 -0
  420. /package/{ScrollReveal → publish/ScrollReveal}/index.d.ts +0 -0
  421. /package/{ScrollReveal → publish/ScrollReveal}/index.js +0 -0
  422. /package/{Scrollbar → publish/Scrollbar}/index.css +0 -0
  423. /package/{Scrollbar → publish/Scrollbar}/index.d.ts +0 -0
  424. /package/{Scrollbar → publish/Scrollbar}/index.js +0 -0
  425. /package/{SearchBar → publish/SearchBar}/index.d.ts +0 -0
  426. /package/{SearchBar → publish/SearchBar}/index.js +0 -0
  427. /package/{Select → publish/Select}/index.css +0 -0
  428. /package/{Select → publish/Select}/index.d.ts +0 -0
  429. /package/{Select → publish/Select}/index.js +0 -0
  430. /package/{ShowMoreLess → publish/ShowMoreLess}/index.css +0 -0
  431. /package/{ShowMoreLess → publish/ShowMoreLess}/index.d.ts +0 -0
  432. /package/{ShowMoreLess → publish/ShowMoreLess}/index.js +0 -0
  433. /package/{Switch → publish/Switch}/index.d.ts +0 -0
  434. /package/{Switch → publish/Switch}/index.js +0 -0
  435. /package/{Table → publish/Table}/index.css +0 -0
  436. /package/{Table → publish/Table}/index.d.ts +0 -0
  437. /package/{Table → publish/Table}/index.js +0 -0
  438. /package/{Tabs → publish/Tabs}/index.d.ts +0 -0
  439. /package/{Tabs → publish/Tabs}/index.js +0 -0
  440. /package/{TagInput → publish/TagInput}/index.css +0 -0
  441. /package/{TagInput → publish/TagInput}/index.d.ts +0 -0
  442. /package/{TagInput → publish/TagInput}/index.js +0 -0
  443. /package/{Toast → publish/Toast}/index.css +0 -0
  444. /package/{Toast → publish/Toast}/index.d.ts +0 -0
  445. /package/{Toast → publish/Toast}/index.js +0 -0
  446. /package/{Tooltip → publish/Tooltip}/index.css +0 -0
  447. /package/{Tooltip → publish/Tooltip}/index.d.ts +0 -0
  448. /package/{Tooltip → publish/Tooltip}/index.js +0 -0
  449. /package/{Tree → publish/Tree}/index.css +0 -0
  450. /package/{Utils → publish/Utils}/anim.d.ts +0 -0
  451. /package/{Utils → publish/Utils}/anim.js +0 -0
  452. /package/{Utils → publish/Utils}/bodyScrollLock.d.ts +0 -0
  453. /package/{Utils → publish/Utils}/bodyScrollLock.js +0 -0
  454. /package/{Utils → publish/Utils}/buffer.d.ts +0 -0
  455. /package/{Utils → publish/Utils}/buffer.js +0 -0
  456. /package/{Utils → publish/Utils}/cls.d.ts +0 -0
  457. /package/{Utils → publish/Utils}/cls.js +0 -0
  458. /package/{Utils → publish/Utils}/convert.d.ts +0 -0
  459. /package/{Utils → publish/Utils}/convert.js +0 -0
  460. /package/{Utils → publish/Utils}/date.d.ts +0 -0
  461. /package/{Utils → publish/Utils}/date.js +0 -0
  462. /package/{Utils → publish/Utils}/dom.d.ts +0 -0
  463. /package/{Utils → publish/Utils}/dom.js +0 -0
  464. /package/{Utils → publish/Utils}/easing.d.ts +0 -0
  465. /package/{Utils → publish/Utils}/easing.js +0 -0
  466. /package/{Utils → publish/Utils}/extract.d.ts +0 -0
  467. /package/{Utils → publish/Utils}/extract.js +0 -0
  468. /package/{Utils → publish/Utils}/getElementProperty.d.ts +0 -0
  469. /package/{Utils → publish/Utils}/getElementProperty.js +0 -0
  470. /package/{Utils → publish/Utils}/guid.d.ts +0 -0
  471. /package/{Utils → publish/Utils}/guid.js +0 -0
  472. /package/{Utils → publish/Utils}/initDefaultOptions.d.ts +0 -0
  473. /package/{Utils → publish/Utils}/initDefaultOptions.js +0 -0
  474. /package/{Utils → publish/Utils}/inputsCalculation.d.ts +0 -0
  475. /package/{Utils → publish/Utils}/inputsCalculation.js +0 -0
  476. /package/{Utils → publish/Utils}/math.d.ts +0 -0
  477. /package/{Utils → publish/Utils}/math.js +0 -0
  478. /package/{Utils → publish/Utils}/object.d.ts +0 -0
  479. /package/{Utils → publish/Utils}/object.js +0 -0
  480. /package/{Utils → publish/Utils}/os.d.ts +0 -0
  481. /package/{Utils → publish/Utils}/os.js +0 -0
  482. /package/{Utils → publish/Utils}/performance.d.ts +0 -0
  483. /package/{Utils → publish/Utils}/performance.js +0 -0
  484. /package/{Utils → publish/Utils}/tree.d.ts +0 -0
  485. /package/{Utils → publish/Utils}/tree.js +0 -0
  486. /package/{Utils → publish/Utils}/useClickOutside.d.ts +0 -0
  487. /package/{Utils → publish/Utils}/useClickOutside.js +0 -0
  488. /package/{Utils → publish/Utils}/useComId.d.ts +0 -0
  489. /package/{Utils → publish/Utils}/useComId.js +0 -0
  490. /package/{Utils → publish/Utils}/useDebounce.d.ts +0 -0
  491. /package/{Utils → publish/Utils}/useDebounce.js +0 -0
  492. /package/{Utils → publish/Utils}/useDragDropPosition.d.ts +0 -0
  493. /package/{Utils → publish/Utils}/useDragDropPosition.js +0 -0
  494. /package/{Utils → publish/Utils}/useDraggable.d.ts +0 -0
  495. /package/{Utils → publish/Utils}/useDraggable.js +0 -0
  496. /package/{Utils → publish/Utils}/useInterval.d.ts +0 -0
  497. /package/{Utils → publish/Utils}/useInterval.js +0 -0
  498. /package/{Utils → publish/Utils}/useKeyPress.d.ts +0 -0
  499. /package/{Utils → publish/Utils}/useKeyPress.js +0 -0
  500. /package/{Utils → publish/Utils}/useThrottle.d.ts +0 -0
  501. /package/{Utils → publish/Utils}/useThrottle.js +0 -0
  502. /package/{Utils → publish/Utils}/useWindowScroll.d.ts +0 -0
  503. /package/{Utils → publish/Utils}/useWindowScroll.js +0 -0
  504. /package/{Utils → publish/Utils}/viewport.d.ts +0 -0
  505. /package/{Utils → publish/Utils}/viewport.js +0 -0
  506. /package/{all.d.ts → publish/all.d.ts} +0 -0
@@ -0,0 +1,1695 @@
1
+ (function webpackUniversalModuleDefinition(root, factory) {
2
+ if(typeof exports === 'object' && typeof module === 'object')
3
+ module.exports = factory(require("react"), require("react-dom"));
4
+ else if(typeof define === 'function' && define.amd)
5
+ define(["react", "react-dom"], factory);
6
+ else if(typeof exports === 'object')
7
+ exports["RPB"] = factory(require("react"), require("react-dom"));
8
+ else
9
+ root["RPB"] = factory(root["React"], root["ReactDOM"]);
10
+ })(this, (__WEBPACK_EXTERNAL_MODULE__787__, __WEBPACK_EXTERNAL_MODULE__156__) => {
11
+ return /******/ (() => { // webpackBootstrap
12
+ /******/ var __webpack_modules__ = ({
13
+
14
+ /***/ 909:
15
+ /***/ (function(module, exports, __webpack_require__) {
16
+
17
+ /* module decorator */ module = __webpack_require__.nmd(module);
18
+ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
19
+ (function webpackUniversalModuleDefinition(root, factory) {
20
+ if (( false ? 0 : _typeof(exports)) === 'object' && ( false ? 0 : _typeof(module)) === 'object') module.exports = factory(__webpack_require__(787), __webpack_require__(156));else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(787), __webpack_require__(156)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
21
+ __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
22
+ (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
23
+ __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
24
+ })(this, function (__WEBPACK_EXTERNAL_MODULE__787__, __WEBPACK_EXTERNAL_MODULE__156__) {
25
+ return (/******/function () {
26
+ // webpackBootstrap
27
+ /******/
28
+ "use strict";
29
+
30
+ /******/
31
+ var __webpack_modules__ = {
32
+ /***/787: /***/function _(module) {
33
+ module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
34
+
35
+ /***/
36
+ },
37
+
38
+ /***/156: /***/function _(module) {
39
+ module.exports = __WEBPACK_EXTERNAL_MODULE__156__;
40
+
41
+ /***/
42
+ }
43
+
44
+ /******/
45
+ };
46
+ /************************************************************************/
47
+ /******/ // The module cache
48
+ /******/
49
+ var __webpack_module_cache__ = {};
50
+ /******/
51
+ /******/ // The require function
52
+ /******/
53
+ function __nested_webpack_require_1708__(moduleId) {
54
+ /******/ // Check if module is in cache
55
+ /******/var cachedModule = __webpack_module_cache__[moduleId];
56
+ /******/
57
+ if (cachedModule !== undefined) {
58
+ /******/return cachedModule.exports;
59
+ /******/
60
+ }
61
+ /******/ // Create a new module (and put it into the cache)
62
+ /******/
63
+ var module = __webpack_module_cache__[moduleId] = {
64
+ /******/ // no module.id needed
65
+ /******/ // no module.loaded needed
66
+ /******/exports: {}
67
+ /******/
68
+ };
69
+ /******/
70
+ /******/ // Execute the module function
71
+ /******/
72
+ __webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_1708__);
73
+ /******/
74
+ /******/ // Return the exports of the module
75
+ /******/
76
+ return module.exports;
77
+ /******/
78
+ }
79
+ /******/
80
+ /************************************************************************/
81
+ /******/ /* webpack/runtime/compat get default export */
82
+ /******/
83
+ (function () {
84
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
85
+ /******/__nested_webpack_require_1708__.n = function (module) {
86
+ /******/var getter = module && module.__esModule ? /******/function () {
87
+ return module['default'];
88
+ } : /******/function () {
89
+ return module;
90
+ };
91
+ /******/
92
+ __nested_webpack_require_1708__.d(getter, {
93
+ a: getter
94
+ });
95
+ /******/
96
+ return getter;
97
+ /******/
98
+ };
99
+ /******/
100
+ })();
101
+ /******/
102
+ /******/ /* webpack/runtime/define property getters */
103
+ /******/
104
+ (function () {
105
+ /******/ // define getter functions for harmony exports
106
+ /******/__nested_webpack_require_1708__.d = function (exports, definition) {
107
+ /******/for (var key in definition) {
108
+ /******/if (__nested_webpack_require_1708__.o(definition, key) && !__nested_webpack_require_1708__.o(exports, key)) {
109
+ /******/Object.defineProperty(exports, key, {
110
+ enumerable: true,
111
+ get: definition[key]
112
+ });
113
+ /******/
114
+ }
115
+ /******/
116
+ }
117
+ /******/
118
+ };
119
+ /******/
120
+ })();
121
+ /******/
122
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
123
+ /******/
124
+ (function () {
125
+ /******/__nested_webpack_require_1708__.o = function (obj, prop) {
126
+ return Object.prototype.hasOwnProperty.call(obj, prop);
127
+ };
128
+ /******/
129
+ })();
130
+ /******/
131
+ /******/ /* webpack/runtime/make namespace object */
132
+ /******/
133
+ (function () {
134
+ /******/ // define __esModule on exports
135
+ /******/__nested_webpack_require_1708__.r = function (exports) {
136
+ /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
137
+ /******/Object.defineProperty(exports, Symbol.toStringTag, {
138
+ value: 'Module'
139
+ });
140
+ /******/
141
+ }
142
+ /******/
143
+ Object.defineProperty(exports, '__esModule', {
144
+ value: true
145
+ });
146
+ /******/
147
+ };
148
+ /******/
149
+ })();
150
+ /******/
151
+ /************************************************************************/
152
+ var __webpack_exports__ = {};
153
+ // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
154
+ (function () {
155
+ __nested_webpack_require_1708__.r(__webpack_exports__);
156
+ /* harmony export */
157
+ __nested_webpack_require_1708__.d(__webpack_exports__, {
158
+ /* harmony export */"default": function _default() {
159
+ return __WEBPACK_DEFAULT_EXPORT__;
160
+ }
161
+ /* harmony export */
162
+ });
163
+ /* harmony import */
164
+ var react__WEBPACK_IMPORTED_MODULE_0__ = __nested_webpack_require_1708__(787);
165
+ /* harmony import */
166
+ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nested_webpack_require_1708__.n(react__WEBPACK_IMPORTED_MODULE_0__);
167
+ /* harmony import */
168
+ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __nested_webpack_require_1708__(156);
169
+ /* harmony import */
170
+ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__nested_webpack_require_1708__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);
171
+ var RootPortal = function RootPortal(props) {
172
+ var containerClassName = props.containerClassName,
173
+ show = props.show,
174
+ children = props.children;
175
+ var containerRef = (0, react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
176
+
177
+ // Move HTML templates to tag end body </body>
178
+ // render() don't use "Fragment", in order to avoid error "Failed to execute 'insertBefore' on 'Node'"
179
+ // prevent "transform", "filter", "perspective" attribute destruction fixed viewport orientation
180
+ // ###
181
+ // ###
182
+ // Use `containerRef.current` to ensure the correctness of the nextjs framework. It may report an error document as undefined
183
+
184
+ (0, react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
185
+ containerRef.current = document.createElement('div');
186
+ containerRef.current.className = "root-portal-container ".concat(containerClassName || '');
187
+ document.body.appendChild(containerRef.current);
188
+ return function () {
189
+ if (containerRef.current) {
190
+ containerRef.current.remove();
191
+ }
192
+ };
193
+ }, []);
194
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react__WEBPACK_IMPORTED_MODULE_0___default().Fragment, null, containerRef.current && show && /*#__PURE__*/(0, react_dom__WEBPACK_IMPORTED_MODULE_1__.createPortal)(children, containerRef.current));
195
+ };
196
+ /* harmony default export */
197
+ var __WEBPACK_DEFAULT_EXPORT__ = RootPortal;
198
+ })();
199
+
200
+ /******/
201
+ return __webpack_exports__;
202
+ /******/
203
+ }()
204
+ );
205
+ });
206
+
207
+ /***/ }),
208
+
209
+ /***/ 70:
210
+ /***/ (function(module, exports, __webpack_require__) {
211
+
212
+ /* module decorator */ module = __webpack_require__.nmd(module);
213
+ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
214
+ (function webpackUniversalModuleDefinition(root, factory) {
215
+ if (( false ? 0 : _typeof(exports)) === 'object' && ( false ? 0 : _typeof(module)) === 'object') module.exports = factory();else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
216
+ __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
217
+ (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
218
+ __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
219
+ })(this, function () {
220
+ return (/******/function () {
221
+ // webpackBootstrap
222
+ /******/
223
+ "use strict";
224
+
225
+ /******/ // The require scope
226
+ /******/
227
+ var __nested_webpack_require_987__ = {};
228
+ /******/
229
+ /************************************************************************/
230
+ /******/ /* webpack/runtime/define property getters */
231
+ /******/
232
+ (function () {
233
+ /******/ // define getter functions for harmony exports
234
+ /******/__nested_webpack_require_987__.d = function (exports, definition) {
235
+ /******/for (var key in definition) {
236
+ /******/if (__nested_webpack_require_987__.o(definition, key) && !__nested_webpack_require_987__.o(exports, key)) {
237
+ /******/Object.defineProperty(exports, key, {
238
+ enumerable: true,
239
+ get: definition[key]
240
+ });
241
+ /******/
242
+ }
243
+ /******/
244
+ }
245
+ /******/
246
+ };
247
+ /******/
248
+ })();
249
+ /******/
250
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
251
+ /******/
252
+ (function () {
253
+ /******/__nested_webpack_require_987__.o = function (obj, prop) {
254
+ return Object.prototype.hasOwnProperty.call(obj, prop);
255
+ };
256
+ /******/
257
+ })();
258
+ /******/
259
+ /******/ /* webpack/runtime/make namespace object */
260
+ /******/
261
+ (function () {
262
+ /******/ // define __esModule on exports
263
+ /******/__nested_webpack_require_987__.r = function (exports) {
264
+ /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
265
+ /******/Object.defineProperty(exports, Symbol.toStringTag, {
266
+ value: 'Module'
267
+ });
268
+ /******/
269
+ }
270
+ /******/
271
+ Object.defineProperty(exports, '__esModule', {
272
+ value: true
273
+ });
274
+ /******/
275
+ };
276
+ /******/
277
+ })();
278
+ /******/
279
+ /************************************************************************/
280
+ var __webpack_exports__ = {};
281
+ __nested_webpack_require_987__.r(__webpack_exports__);
282
+ /* harmony export */
283
+ __nested_webpack_require_987__.d(__webpack_exports__, {
284
+ /* harmony export */"clearAllBodyScrollLocks": function clearAllBodyScrollLocks() {
285
+ return (/* binding */_clearAllBodyScrollLocks
286
+ );
287
+ },
288
+ /* harmony export */"disableBodyScroll": function disableBodyScroll() {
289
+ return (/* binding */_disableBodyScroll
290
+ );
291
+ },
292
+ /* harmony export */"enableBodyScroll": function enableBodyScroll() {
293
+ return (/* binding */_enableBodyScroll
294
+ );
295
+ }
296
+ /* harmony export */
297
+ });
298
+ function _toConsumableArray(arr) {
299
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
300
+ }
301
+ function _nonIterableSpread() {
302
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
303
+ }
304
+ function _unsupportedIterableToArray(o, minLen) {
305
+ if (!o) return;
306
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
307
+ var n = Object.prototype.toString.call(o).slice(8, -1);
308
+ if (n === "Object" && o.constructor) n = o.constructor.name;
309
+ if (n === "Map" || n === "Set") return Array.from(o);
310
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
311
+ }
312
+ function _iterableToArray(iter) {
313
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
314
+ }
315
+ function _arrayWithoutHoles(arr) {
316
+ if (Array.isArray(arr)) return _arrayLikeToArray(arr);
317
+ }
318
+ function _arrayLikeToArray(arr, len) {
319
+ if (len == null || len > arr.length) len = arr.length;
320
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
321
+ return arr2;
322
+ }
323
+ // =================================================================
324
+ // based on https://github.com/willmcpo/body-scroll-lock
325
+ // =================================================================
326
+
327
+ // @flow
328
+ // Adopted and modified solution from Bohdan Didukh (2017)
329
+ // https://stackoverflow.com/questions/41594997/ios-10-safari-prevent-scrolling-behind-a-fixed-overlay-and-maintain-scroll-posi
330
+
331
+ // Older browsers don't support event options, feature detect it.
332
+ var hasPassiveEvents = false;
333
+ if (typeof window !== 'undefined') {
334
+ var passiveTestOptions = {
335
+ get passive() {
336
+ hasPassiveEvents = true;
337
+ return undefined;
338
+ }
339
+ };
340
+ window.addEventListener('testPassive', null, passiveTestOptions);
341
+ window.removeEventListener('testPassive', null, passiveTestOptions);
342
+ }
343
+ var isIosDevice = typeof window !== 'undefined' && window.navigator && window.navigator.platform && (/iP(ad|hone|od)/.test(window.navigator.platform) || window.navigator.platform === 'MacIntel' && window.navigator.maxTouchPoints > 1);
344
+ var locks = [];
345
+ var documentListenerAdded = false;
346
+ var initialClientY = -1;
347
+ var previousBodyOverflowSetting;
348
+ var previousBodyPosition;
349
+ var previousBodyPaddingRight;
350
+
351
+ // returns true if `el` should be allowed to receive touchmove events.
352
+ var allowTouchMove = function allowTouchMove(el) {
353
+ return locks.some(function (lock) {
354
+ if (lock.options.allowTouchMove && lock.options.allowTouchMove(el)) {
355
+ return true;
356
+ }
357
+ return false;
358
+ });
359
+ };
360
+ var preventDefault = function preventDefault(rawEvent) {
361
+ var e = rawEvent || window.event;
362
+
363
+ // For the case whereby consumers adds a touchmove event listener to document.
364
+ // Recall that we do document.addEventListener('touchmove', preventDefault, { passive: false })
365
+ // in disableBodyScroll - so if we provide this opportunity to allowTouchMove, then
366
+ // the touchmove event on document will break.
367
+ if (allowTouchMove(e.target)) {
368
+ return true;
369
+ }
370
+
371
+ // Do not prevent if the event has more than one touch (usually meaning this is a multi touch gesture like pinch to zoom).
372
+ if (e.touches.length > 1) return true;
373
+ if (e.preventDefault) e.preventDefault();
374
+ return false;
375
+ };
376
+ var setOverflowHidden = function setOverflowHidden(options) {
377
+ // If previousBodyPaddingRight is already set, don't set it again.
378
+ if (previousBodyPaddingRight === undefined) {
379
+ var reserveScrollBarGap = !!options && options.reserveScrollBarGap === true;
380
+ var scrollBarGap = window.innerWidth - document.documentElement.clientWidth;
381
+ if (reserveScrollBarGap && scrollBarGap > 0) {
382
+ var computedBodyPaddingRight = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right'), 10);
383
+ previousBodyPaddingRight = document.body.style.paddingRight;
384
+ document.body.style.paddingRight = "".concat(computedBodyPaddingRight + scrollBarGap, "px");
385
+ }
386
+ }
387
+
388
+ // If previousBodyOverflowSetting is already set, don't set it again.
389
+ if (previousBodyOverflowSetting === undefined) {
390
+ previousBodyOverflowSetting = document.body.style.overflow;
391
+ document.body.style.overflow = 'hidden';
392
+ }
393
+ };
394
+ var restoreOverflowSetting = function restoreOverflowSetting() {
395
+ if (previousBodyPaddingRight !== undefined) {
396
+ document.body.style.paddingRight = previousBodyPaddingRight;
397
+
398
+ // Restore previousBodyPaddingRight to undefined so setOverflowHidden knows it
399
+ // can be set again.
400
+ previousBodyPaddingRight = undefined;
401
+ }
402
+ if (previousBodyOverflowSetting !== undefined) {
403
+ document.body.style.overflow = previousBodyOverflowSetting;
404
+
405
+ // Restore previousBodyOverflowSetting to undefined
406
+ // so setOverflowHidden knows it can be set again.
407
+ previousBodyOverflowSetting = undefined;
408
+ }
409
+ };
410
+ var setPositionFixed = function setPositionFixed() {
411
+ return window.requestAnimationFrame(function () {
412
+ // If previousBodyPosition is already set, don't set it again.
413
+ if (previousBodyPosition === undefined) {
414
+ previousBodyPosition = {
415
+ position: document.body.style.position,
416
+ top: document.body.style.top,
417
+ left: document.body.style.left
418
+ };
419
+
420
+ // Update the dom inside an animation frame
421
+ var _window = window,
422
+ scrollY = _window.scrollY,
423
+ scrollX = _window.scrollX,
424
+ innerHeight = _window.innerHeight;
425
+ document.body.style.position = 'fixed';
426
+ document.body.style.top = "".concat(-scrollY, "px");
427
+ document.body.style.left = "".concat(-scrollX, "px");
428
+ setTimeout(function () {
429
+ return window.requestAnimationFrame(function () {
430
+ // Attempt to check if the bottom bar appeared due to the position change
431
+ var bottomBarHeight = innerHeight - window.innerHeight;
432
+ if (bottomBarHeight && scrollY >= innerHeight) {
433
+ // Move the content further up so that the bottom bar doesn't hide it
434
+ document.body.style.top = "".concat(-(scrollY + bottomBarHeight));
435
+ }
436
+ });
437
+ }, 300);
438
+ }
439
+ });
440
+ };
441
+ var restorePositionSetting = function restorePositionSetting() {
442
+ if (previousBodyPosition !== undefined) {
443
+ // Convert the position from "px" to Int
444
+ var y = -parseInt(document.body.style.top, 10);
445
+ var x = -parseInt(document.body.style.left, 10);
446
+
447
+ // Restore styles
448
+ document.body.style.position = previousBodyPosition.position;
449
+ document.body.style.top = previousBodyPosition.top;
450
+ document.body.style.left = previousBodyPosition.left;
451
+
452
+ // Restore scroll
453
+ window.scrollTo(x, y);
454
+ previousBodyPosition = undefined;
455
+ }
456
+ };
457
+
458
+ // https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollHeight#Problems_and_solutions
459
+ var isTargetElementTotallyScrolled = function isTargetElementTotallyScrolled(targetElement) {
460
+ return targetElement ? targetElement.scrollHeight - targetElement.scrollTop <= targetElement.clientHeight : false;
461
+ };
462
+ var handleScroll = function handleScroll(event, targetElement) {
463
+ var clientY = event.targetTouches[0].clientY - initialClientY;
464
+ if (allowTouchMove(event.target)) {
465
+ return false;
466
+ }
467
+ if (targetElement && targetElement.scrollTop === 0 && clientY > 0) {
468
+ // element is at the top of its scroll.
469
+ return preventDefault(event);
470
+ }
471
+ if (isTargetElementTotallyScrolled(targetElement) && clientY < 0) {
472
+ // element is at the bottom of its scroll.
473
+ return preventDefault(event);
474
+ }
475
+ event.stopPropagation();
476
+ return true;
477
+ };
478
+ var _disableBodyScroll = function disableBodyScroll(targetElement, options) {
479
+ // targetElement must be provided
480
+ if (!targetElement) {
481
+ // eslint-disable-next-line no-console
482
+ console.error('disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.');
483
+ return;
484
+ }
485
+
486
+ // disableBodyScroll must not have been called on this targetElement before
487
+ if (locks.some(function (lock) {
488
+ return lock.targetElement === targetElement;
489
+ })) {
490
+ return;
491
+ }
492
+ var lock = {
493
+ targetElement: targetElement,
494
+ options: options || {}
495
+ };
496
+ locks = [].concat(_toConsumableArray(locks), [lock]);
497
+ if (isIosDevice) {
498
+ setPositionFixed();
499
+ } else {
500
+ setOverflowHidden(options);
501
+ }
502
+ if (isIosDevice) {
503
+ targetElement.ontouchstart = function (event) {
504
+ if (event.targetTouches.length === 1) {
505
+ // detect single touch.
506
+ initialClientY = event.targetTouches[0].clientY;
507
+ }
508
+ };
509
+ targetElement.ontouchmove = function (event) {
510
+ if (event.targetTouches.length === 1) {
511
+ // detect single touch.
512
+ handleScroll(event, targetElement);
513
+ }
514
+ };
515
+ if (!documentListenerAdded) {
516
+ document.addEventListener('touchmove', preventDefault, hasPassiveEvents ? {
517
+ passive: false
518
+ } : undefined);
519
+ documentListenerAdded = true;
520
+ }
521
+ }
522
+ };
523
+ var _clearAllBodyScrollLocks = function clearAllBodyScrollLocks() {
524
+ if (isIosDevice) {
525
+ // Clear all locks ontouchstart/ontouchmove handlers, and the references.
526
+ locks.forEach(function (lock) {
527
+ lock.targetElement.ontouchstart = null;
528
+ lock.targetElement.ontouchmove = null;
529
+ });
530
+ if (documentListenerAdded) {
531
+ document.removeEventListener('touchmove', preventDefault, hasPassiveEvents ? {
532
+ passive: false
533
+ } : undefined);
534
+ documentListenerAdded = false;
535
+ }
536
+
537
+ // Reset initial clientY.
538
+ initialClientY = -1;
539
+ }
540
+ if (isIosDevice) {
541
+ restorePositionSetting();
542
+ } else {
543
+ restoreOverflowSetting();
544
+ }
545
+ locks = [];
546
+ };
547
+ var _enableBodyScroll = function enableBodyScroll(targetElement) {
548
+ if (!targetElement) {
549
+ // eslint-disable-next-line no-console
550
+ console.error('enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.');
551
+ return;
552
+ }
553
+ locks = locks.filter(function (lock) {
554
+ return lock.targetElement !== targetElement;
555
+ });
556
+ if (isIosDevice) {
557
+ targetElement.ontouchstart = null;
558
+ targetElement.ontouchmove = null;
559
+ if (documentListenerAdded && locks.length === 0) {
560
+ document.removeEventListener('touchmove', preventDefault, hasPassiveEvents ? {
561
+ passive: false
562
+ } : undefined);
563
+ documentListenerAdded = false;
564
+ }
565
+ }
566
+ if (isIosDevice) {
567
+ restorePositionSetting();
568
+ } else {
569
+ restoreOverflowSetting();
570
+ }
571
+ };
572
+ /******/
573
+ return __webpack_exports__;
574
+ /******/
575
+ }()
576
+ );
577
+ });
578
+
579
+ /***/ }),
580
+
581
+ /***/ 85:
582
+ /***/ (function(module, exports, __webpack_require__) {
583
+
584
+ /* module decorator */ module = __webpack_require__.nmd(module);
585
+ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
586
+ (function webpackUniversalModuleDefinition(root, factory) {
587
+ if (( false ? 0 : _typeof(exports)) === 'object' && ( false ? 0 : _typeof(module)) === 'object') module.exports = factory(__webpack_require__(787));else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(787)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
588
+ __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
589
+ (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
590
+ __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
591
+ })(this, function (__WEBPACK_EXTERNAL_MODULE__787__) {
592
+ return (/******/function () {
593
+ // webpackBootstrap
594
+ /******/
595
+ "use strict";
596
+
597
+ /******/
598
+ var __webpack_modules__ = {
599
+ /***/787: /***/function _(module) {
600
+ module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
601
+
602
+ /***/
603
+ }
604
+
605
+ /******/
606
+ };
607
+ /************************************************************************/
608
+ /******/ // The module cache
609
+ /******/
610
+ var __webpack_module_cache__ = {};
611
+ /******/
612
+ /******/ // The require function
613
+ /******/
614
+ function __nested_webpack_require_1465__(moduleId) {
615
+ /******/ // Check if module is in cache
616
+ /******/var cachedModule = __webpack_module_cache__[moduleId];
617
+ /******/
618
+ if (cachedModule !== undefined) {
619
+ /******/return cachedModule.exports;
620
+ /******/
621
+ }
622
+ /******/ // Create a new module (and put it into the cache)
623
+ /******/
624
+ var module = __webpack_module_cache__[moduleId] = {
625
+ /******/ // no module.id needed
626
+ /******/ // no module.loaded needed
627
+ /******/exports: {}
628
+ /******/
629
+ };
630
+ /******/
631
+ /******/ // Execute the module function
632
+ /******/
633
+ __webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_1465__);
634
+ /******/
635
+ /******/ // Return the exports of the module
636
+ /******/
637
+ return module.exports;
638
+ /******/
639
+ }
640
+ /******/
641
+ /************************************************************************/
642
+ /******/ /* webpack/runtime/compat get default export */
643
+ /******/
644
+ (function () {
645
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
646
+ /******/__nested_webpack_require_1465__.n = function (module) {
647
+ /******/var getter = module && module.__esModule ? /******/function () {
648
+ return module['default'];
649
+ } : /******/function () {
650
+ return module;
651
+ };
652
+ /******/
653
+ __nested_webpack_require_1465__.d(getter, {
654
+ a: getter
655
+ });
656
+ /******/
657
+ return getter;
658
+ /******/
659
+ };
660
+ /******/
661
+ })();
662
+ /******/
663
+ /******/ /* webpack/runtime/define property getters */
664
+ /******/
665
+ (function () {
666
+ /******/ // define getter functions for harmony exports
667
+ /******/__nested_webpack_require_1465__.d = function (exports, definition) {
668
+ /******/for (var key in definition) {
669
+ /******/if (__nested_webpack_require_1465__.o(definition, key) && !__nested_webpack_require_1465__.o(exports, key)) {
670
+ /******/Object.defineProperty(exports, key, {
671
+ enumerable: true,
672
+ get: definition[key]
673
+ });
674
+ /******/
675
+ }
676
+ /******/
677
+ }
678
+ /******/
679
+ };
680
+ /******/
681
+ })();
682
+ /******/
683
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
684
+ /******/
685
+ (function () {
686
+ /******/__nested_webpack_require_1465__.o = function (obj, prop) {
687
+ return Object.prototype.hasOwnProperty.call(obj, prop);
688
+ };
689
+ /******/
690
+ })();
691
+ /******/
692
+ /******/ /* webpack/runtime/make namespace object */
693
+ /******/
694
+ (function () {
695
+ /******/ // define __esModule on exports
696
+ /******/__nested_webpack_require_1465__.r = function (exports) {
697
+ /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
698
+ /******/Object.defineProperty(exports, Symbol.toStringTag, {
699
+ value: 'Module'
700
+ });
701
+ /******/
702
+ }
703
+ /******/
704
+ Object.defineProperty(exports, '__esModule', {
705
+ value: true
706
+ });
707
+ /******/
708
+ };
709
+ /******/
710
+ })();
711
+ /******/
712
+ /************************************************************************/
713
+ var __webpack_exports__ = {};
714
+ // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
715
+ (function () {
716
+ __nested_webpack_require_1465__.r(__webpack_exports__);
717
+ /* harmony export */
718
+ __nested_webpack_require_1465__.d(__webpack_exports__, {
719
+ /* harmony export */"default": function _default() {
720
+ return __WEBPACK_DEFAULT_EXPORT__;
721
+ }
722
+ /* harmony export */
723
+ });
724
+ /* harmony import */
725
+ var react__WEBPACK_IMPORTED_MODULE_0__ = __nested_webpack_require_1465__(787);
726
+ /* harmony import */
727
+ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nested_webpack_require_1465__.n(react__WEBPACK_IMPORTED_MODULE_0__);
728
+ /**
729
+ * Create an available ID
730
+ *
731
+ */
732
+
733
+ var useComId = function useComId() {
734
+ return "ID-".concat((0, react__WEBPACK_IMPORTED_MODULE_0__.useId)().replace(/\:/g, "-"));
735
+ };
736
+ /* harmony default export */
737
+ var __WEBPACK_DEFAULT_EXPORT__ = useComId;
738
+ })();
739
+
740
+ /******/
741
+ return __webpack_exports__;
742
+ /******/
743
+ }()
744
+ );
745
+ });
746
+
747
+ /***/ }),
748
+
749
+ /***/ 771:
750
+ /***/ (function(module, exports, __webpack_require__) {
751
+
752
+ /* module decorator */ module = __webpack_require__.nmd(module);
753
+ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
754
+ (function webpackUniversalModuleDefinition(root, factory) {
755
+ if (( false ? 0 : _typeof(exports)) === 'object' && ( false ? 0 : _typeof(module)) === 'object') module.exports = factory(__webpack_require__(787));else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(787)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
756
+ __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
757
+ (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
758
+ __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
759
+ })(this, function (__WEBPACK_EXTERNAL_MODULE__787__) {
760
+ return (/******/function () {
761
+ // webpackBootstrap
762
+ /******/
763
+ "use strict";
764
+
765
+ /******/
766
+ var __webpack_modules__ = {
767
+ /***/787: /***/function _(module) {
768
+ module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
769
+
770
+ /***/
771
+ }
772
+
773
+ /******/
774
+ };
775
+ /************************************************************************/
776
+ /******/ // The module cache
777
+ /******/
778
+ var __webpack_module_cache__ = {};
779
+ /******/
780
+ /******/ // The require function
781
+ /******/
782
+ function __nested_webpack_require_1465__(moduleId) {
783
+ /******/ // Check if module is in cache
784
+ /******/var cachedModule = __webpack_module_cache__[moduleId];
785
+ /******/
786
+ if (cachedModule !== undefined) {
787
+ /******/return cachedModule.exports;
788
+ /******/
789
+ }
790
+ /******/ // Create a new module (and put it into the cache)
791
+ /******/
792
+ var module = __webpack_module_cache__[moduleId] = {
793
+ /******/ // no module.id needed
794
+ /******/ // no module.loaded needed
795
+ /******/exports: {}
796
+ /******/
797
+ };
798
+ /******/
799
+ /******/ // Execute the module function
800
+ /******/
801
+ __webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_1465__);
802
+ /******/
803
+ /******/ // Return the exports of the module
804
+ /******/
805
+ return module.exports;
806
+ /******/
807
+ }
808
+ /******/
809
+ /************************************************************************/
810
+ /******/ /* webpack/runtime/compat get default export */
811
+ /******/
812
+ (function () {
813
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
814
+ /******/__nested_webpack_require_1465__.n = function (module) {
815
+ /******/var getter = module && module.__esModule ? /******/function () {
816
+ return module['default'];
817
+ } : /******/function () {
818
+ return module;
819
+ };
820
+ /******/
821
+ __nested_webpack_require_1465__.d(getter, {
822
+ a: getter
823
+ });
824
+ /******/
825
+ return getter;
826
+ /******/
827
+ };
828
+ /******/
829
+ })();
830
+ /******/
831
+ /******/ /* webpack/runtime/define property getters */
832
+ /******/
833
+ (function () {
834
+ /******/ // define getter functions for harmony exports
835
+ /******/__nested_webpack_require_1465__.d = function (exports, definition) {
836
+ /******/for (var key in definition) {
837
+ /******/if (__nested_webpack_require_1465__.o(definition, key) && !__nested_webpack_require_1465__.o(exports, key)) {
838
+ /******/Object.defineProperty(exports, key, {
839
+ enumerable: true,
840
+ get: definition[key]
841
+ });
842
+ /******/
843
+ }
844
+ /******/
845
+ }
846
+ /******/
847
+ };
848
+ /******/
849
+ })();
850
+ /******/
851
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
852
+ /******/
853
+ (function () {
854
+ /******/__nested_webpack_require_1465__.o = function (obj, prop) {
855
+ return Object.prototype.hasOwnProperty.call(obj, prop);
856
+ };
857
+ /******/
858
+ })();
859
+ /******/
860
+ /******/ /* webpack/runtime/make namespace object */
861
+ /******/
862
+ (function () {
863
+ /******/ // define __esModule on exports
864
+ /******/__nested_webpack_require_1465__.r = function (exports) {
865
+ /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
866
+ /******/Object.defineProperty(exports, Symbol.toStringTag, {
867
+ value: 'Module'
868
+ });
869
+ /******/
870
+ }
871
+ /******/
872
+ Object.defineProperty(exports, '__esModule', {
873
+ value: true
874
+ });
875
+ /******/
876
+ };
877
+ /******/
878
+ })();
879
+ /******/
880
+ /************************************************************************/
881
+ var __webpack_exports__ = {};
882
+ // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
883
+ (function () {
884
+ __nested_webpack_require_1465__.r(__webpack_exports__);
885
+ /* harmony export */
886
+ __nested_webpack_require_1465__.d(__webpack_exports__, {
887
+ /* harmony export */"default": function _default() {
888
+ return __WEBPACK_DEFAULT_EXPORT__;
889
+ }
890
+ /* harmony export */
891
+ });
892
+ /* harmony import */
893
+ var react__WEBPACK_IMPORTED_MODULE_0__ = __nested_webpack_require_1465__(787);
894
+ /* harmony import */
895
+ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nested_webpack_require_1465__.n(react__WEBPACK_IMPORTED_MODULE_0__);
896
+ function _slicedToArray(arr, i) {
897
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
898
+ }
899
+ function _nonIterableRest() {
900
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
901
+ }
902
+ function _unsupportedIterableToArray(o, minLen) {
903
+ if (!o) return;
904
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
905
+ var n = Object.prototype.toString.call(o).slice(8, -1);
906
+ if (n === "Object" && o.constructor) n = o.constructor.name;
907
+ if (n === "Map" || n === "Set") return Array.from(o);
908
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
909
+ }
910
+ function _arrayLikeToArray(arr, len) {
911
+ if (len == null || len > arr.length) len = arr.length;
912
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
913
+ return arr2;
914
+ }
915
+ function _iterableToArrayLimit(arr, i) {
916
+ var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
917
+ if (null != _i) {
918
+ var _s,
919
+ _e,
920
+ _x,
921
+ _r,
922
+ _arr = [],
923
+ _n = !0,
924
+ _d = !1;
925
+ try {
926
+ if (_x = (_i = _i.call(arr)).next, 0 === i) {
927
+ if (Object(_i) !== _i) return;
928
+ _n = !1;
929
+ } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
930
+ } catch (err) {
931
+ _d = !0, _e = err;
932
+ } finally {
933
+ try {
934
+ if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
935
+ } finally {
936
+ if (_d) throw _e;
937
+ }
938
+ }
939
+ return _arr;
940
+ }
941
+ }
942
+ function _arrayWithHoles(arr) {
943
+ if (Array.isArray(arr)) return arr;
944
+ }
945
+ /**
946
+ * Drag & Drop Element
947
+ *
948
+ * @usage:
949
+
950
+
951
+ const App = () => {
952
+ const {
953
+ dragContentHandle,
954
+ dragHandle,
955
+ resetPosition
956
+ }: any = useDraggable({
957
+ enabled: true, // if `false`, drag and drop is disabled
958
+ preventOutsideScreen: {
959
+ xAxis: true,
960
+ yAxis: true
961
+ },
962
+ onStart: (coordinates: Record<string, number>, handleEl: HTMLElement | null, contentEl: HTMLElement | null) => {
963
+
964
+ },
965
+ onDrag: (coordinates: Record<string, number>, handleEl: HTMLElement | null, contentEl: HTMLElement | null) => {
966
+ console.log(coordinates); // {dx: -164, dy: -37}
967
+
968
+ },
969
+ onStop: (coordinates: Record<string, number>, handleEl: HTMLElement | null, contentEl: HTMLElement | null) => {
970
+
971
+ }
972
+ });
973
+
974
+ const resetModal = () => {
975
+ resetPosition?.();
976
+ };
977
+
978
+ return (
979
+ <div className="container" ref={dragContentHandle}>
980
+ <div ref={dragHandle} className="handle">Drag me</div>
981
+ <div className="content">
982
+ content...
983
+ </div>
984
+ </div>
985
+ );
986
+ };
987
+
988
+
989
+ */
990
+
991
+ var useDraggable = function useDraggable(_ref) {
992
+ var enabled = _ref.enabled,
993
+ preventOutsideScreen = _ref.preventOutsideScreen,
994
+ onStart = _ref.onStart,
995
+ onStop = _ref.onStop,
996
+ onDrag = _ref.onDrag;
997
+ var DRAG_DISABLED = typeof enabled === "undefined" || enabled === false;
998
+ var dragging = false; // DO NOT USE 'useState()'
999
+ var _useState = (0, react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
1000
+ _useState2 = _slicedToArray(_useState, 2),
1001
+ node = _useState2[0],
1002
+ setNode = _useState2[1];
1003
+ var _useState3 = (0, react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
1004
+ _useState4 = _slicedToArray(_useState3, 2),
1005
+ targetNode = _useState4[0],
1006
+ setTargetNode = _useState4[1];
1007
+ var _useState5 = (0, react__WEBPACK_IMPORTED_MODULE_0__.useState)({
1008
+ dx: 0,
1009
+ dy: 0
1010
+ }),
1011
+ _useState6 = _slicedToArray(_useState5, 2),
1012
+ _useState6$ = _useState6[0],
1013
+ dx = _useState6$.dx,
1014
+ dy = _useState6$.dy,
1015
+ setOffset = _useState6[1];
1016
+ var ref = (0, react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (nodeEle) {
1017
+ setNode(nodeEle);
1018
+ }, []);
1019
+ var targetRef = (0, react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (nodeEle) {
1020
+ setTargetNode(nodeEle);
1021
+ }, []);
1022
+ var withoutViewport = function withoutViewport(startPos, e, targetEl) {
1023
+ if (!targetEl || typeof preventOutsideScreen === 'undefined') return null;
1024
+
1025
+ // latest mouse coordinates
1026
+ var mouseX = e.clientX;
1027
+ var mouseY = e.clientY;
1028
+
1029
+ // the size of the parent element
1030
+ var parentWidth = window.innerWidth;
1031
+ var parentHeight = window.innerHeight;
1032
+
1033
+ // the size of the child element
1034
+ var childrenWidth = targetEl.clientWidth;
1035
+ var childrenHight = targetEl.clientHeight;
1036
+ var minLeft = -(parentWidth - childrenWidth) / 2;
1037
+ var maxLeft = (parentWidth - childrenWidth) / 2;
1038
+ var minTop = -(parentHeight - childrenHight) / 2;
1039
+ var maxTop = (parentHeight - childrenHight) / 2;
1040
+
1041
+ // calculates the left and top offsets after the move
1042
+ var nLeft = mouseX - startPos.x;
1043
+ var nTop = mouseY - startPos.y;
1044
+
1045
+ // Determine whether the left or right distance is out of bounds
1046
+ if (preventOutsideScreen.xAxis) {
1047
+ nLeft = nLeft <= minLeft ? minLeft : nLeft;
1048
+ nLeft = nLeft >= maxLeft ? maxLeft : nLeft;
1049
+ }
1050
+ if (preventOutsideScreen.yAxis) {
1051
+ nTop = nTop <= minTop ? minTop : nTop;
1052
+ nTop = nTop >= maxTop ? maxTop : nTop;
1053
+ }
1054
+ return [nLeft, nTop];
1055
+ };
1056
+ var handleMouseDown = (0, react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (e) {
1057
+ dragging = true;
1058
+ onStart === null || onStart === void 0 ? void 0 : onStart({
1059
+ dx: dx,
1060
+ dy: dy
1061
+ }, targetNode, node);
1062
+ var startPos = {
1063
+ x: e.clientX - dx,
1064
+ y: e.clientY - dy
1065
+ };
1066
+ var handleMouseMove = function handleMouseMove(e) {
1067
+ if (!dragging) return;
1068
+ var dx = e.clientX - startPos.x;
1069
+ var dy = e.clientY - startPos.y;
1070
+
1071
+ // prevent dragged item to be dragged outside of screen
1072
+ if (preventOutsideScreen && node) {
1073
+ var _data = withoutViewport(startPos, e, node);
1074
+ if (_data !== null) {
1075
+ dx = _data[0];
1076
+ dy = _data[1];
1077
+ }
1078
+ }
1079
+ setOffset({
1080
+ dx: dx,
1081
+ dy: dy
1082
+ });
1083
+ onDrag === null || onDrag === void 0 ? void 0 : onDrag({
1084
+ dx: dx,
1085
+ dy: dy
1086
+ }, targetNode, node);
1087
+ e.stopPropagation();
1088
+ e.preventDefault();
1089
+ };
1090
+ var handleMouseUp = function handleMouseUp() {
1091
+ dragging = false;
1092
+ onStop === null || onStop === void 0 ? void 0 : onStop({
1093
+ dx: dx,
1094
+ dy: dy
1095
+ }, targetNode, node);
1096
+ document.removeEventListener('mousemove', handleMouseMove);
1097
+ document.removeEventListener('mouseup', handleMouseUp);
1098
+ };
1099
+ document.addEventListener('mousemove', handleMouseMove);
1100
+ document.addEventListener('mouseup', handleMouseUp);
1101
+ }, [dx, dy, node]);
1102
+ var handleTouchStart = (0, react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (e) {
1103
+ dragging = true;
1104
+ onStart === null || onStart === void 0 ? void 0 : onStart({
1105
+ dx: dx,
1106
+ dy: dy
1107
+ }, targetNode, node);
1108
+ var touch = e.touches[0];
1109
+ var startPos = {
1110
+ x: touch.clientX - dx,
1111
+ y: touch.clientY - dy
1112
+ };
1113
+ var handleTouchMove = function handleTouchMove(e) {
1114
+ if (!dragging) return;
1115
+ var touch = e.touches[0];
1116
+ var dx = touch.clientX - startPos.x;
1117
+ var dy = touch.clientY - startPos.y;
1118
+
1119
+ // prevent dragged item to be dragged outside of screen
1120
+ if (preventOutsideScreen && node) {
1121
+ var _data = withoutViewport(startPos, touch, node);
1122
+ if (_data !== null) {
1123
+ dx = _data[0];
1124
+ dy = _data[1];
1125
+ }
1126
+ }
1127
+ setOffset({
1128
+ dx: dx,
1129
+ dy: dy
1130
+ });
1131
+ onDrag === null || onDrag === void 0 ? void 0 : onDrag({
1132
+ dx: dx,
1133
+ dy: dy
1134
+ }, targetNode, node);
1135
+ e.stopPropagation();
1136
+ e.preventDefault();
1137
+ };
1138
+ var handleTouchEnd = function handleTouchEnd() {
1139
+ dragging = false;
1140
+ onStop === null || onStop === void 0 ? void 0 : onStop({
1141
+ dx: dx,
1142
+ dy: dy
1143
+ }, targetNode, node);
1144
+ document.removeEventListener('touchmove', handleTouchMove);
1145
+ document.removeEventListener('touchend', handleTouchEnd);
1146
+ };
1147
+ document.addEventListener('touchmove', handleTouchMove);
1148
+ document.addEventListener('touchend', handleTouchEnd);
1149
+ }, [dx, dy, node]);
1150
+ (0, react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
1151
+ if (node) {
1152
+ node.style.transform = "translate3d(".concat(dx, "px, ").concat(dy, "px, 0)");
1153
+ }
1154
+ }, [node, dx, dy]);
1155
+ (0, react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
1156
+ if (DRAG_DISABLED) {
1157
+ return;
1158
+ }
1159
+ if (!targetNode) {
1160
+ return;
1161
+ }
1162
+ targetNode.addEventListener("mousedown", handleMouseDown);
1163
+ targetNode.addEventListener("touchstart", handleTouchStart);
1164
+ return function () {
1165
+ targetNode.removeEventListener("mousedown", handleMouseDown);
1166
+ targetNode.removeEventListener("touchstart", handleTouchStart);
1167
+ };
1168
+ }, [targetNode, dx, dy]);
1169
+ return {
1170
+ dragContentHandle: ref,
1171
+ dragHandle: targetRef,
1172
+ resetPosition: function resetPosition() {
1173
+ // reset position
1174
+ setOffset({
1175
+ dx: 0,
1176
+ dy: 0
1177
+ });
1178
+ }
1179
+ };
1180
+ };
1181
+ /* harmony default export */
1182
+ var __WEBPACK_DEFAULT_EXPORT__ = useDraggable;
1183
+ })();
1184
+
1185
+ /******/
1186
+ return __webpack_exports__;
1187
+ /******/
1188
+ }()
1189
+ );
1190
+ });
1191
+
1192
+ /***/ }),
1193
+
1194
+ /***/ 787:
1195
+ /***/ ((module) => {
1196
+
1197
+ "use strict";
1198
+ module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
1199
+
1200
+ /***/ }),
1201
+
1202
+ /***/ 156:
1203
+ /***/ ((module) => {
1204
+
1205
+ "use strict";
1206
+ module.exports = __WEBPACK_EXTERNAL_MODULE__156__;
1207
+
1208
+ /***/ })
1209
+
1210
+ /******/ });
1211
+ /************************************************************************/
1212
+ /******/ // The module cache
1213
+ /******/ var __webpack_module_cache__ = {};
1214
+ /******/
1215
+ /******/ // The require function
1216
+ /******/ function __webpack_require__(moduleId) {
1217
+ /******/ // Check if module is in cache
1218
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
1219
+ /******/ if (cachedModule !== undefined) {
1220
+ /******/ return cachedModule.exports;
1221
+ /******/ }
1222
+ /******/ // Create a new module (and put it into the cache)
1223
+ /******/ var module = __webpack_module_cache__[moduleId] = {
1224
+ /******/ id: moduleId,
1225
+ /******/ loaded: false,
1226
+ /******/ exports: {}
1227
+ /******/ };
1228
+ /******/
1229
+ /******/ // Execute the module function
1230
+ /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
1231
+ /******/
1232
+ /******/ // Flag the module as loaded
1233
+ /******/ module.loaded = true;
1234
+ /******/
1235
+ /******/ // Return the exports of the module
1236
+ /******/ return module.exports;
1237
+ /******/ }
1238
+ /******/
1239
+ /************************************************************************/
1240
+ /******/ /* webpack/runtime/compat get default export */
1241
+ /******/ (() => {
1242
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
1243
+ /******/ __webpack_require__.n = (module) => {
1244
+ /******/ var getter = module && module.__esModule ?
1245
+ /******/ () => (module['default']) :
1246
+ /******/ () => (module);
1247
+ /******/ __webpack_require__.d(getter, { a: getter });
1248
+ /******/ return getter;
1249
+ /******/ };
1250
+ /******/ })();
1251
+ /******/
1252
+ /******/ /* webpack/runtime/define property getters */
1253
+ /******/ (() => {
1254
+ /******/ // define getter functions for harmony exports
1255
+ /******/ __webpack_require__.d = (exports, definition) => {
1256
+ /******/ for(var key in definition) {
1257
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
1258
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
1259
+ /******/ }
1260
+ /******/ }
1261
+ /******/ };
1262
+ /******/ })();
1263
+ /******/
1264
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
1265
+ /******/ (() => {
1266
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
1267
+ /******/ })();
1268
+ /******/
1269
+ /******/ /* webpack/runtime/make namespace object */
1270
+ /******/ (() => {
1271
+ /******/ // define __esModule on exports
1272
+ /******/ __webpack_require__.r = (exports) => {
1273
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
1274
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
1275
+ /******/ }
1276
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
1277
+ /******/ };
1278
+ /******/ })();
1279
+ /******/
1280
+ /******/ /* webpack/runtime/node module decorator */
1281
+ /******/ (() => {
1282
+ /******/ __webpack_require__.nmd = (module) => {
1283
+ /******/ module.paths = [];
1284
+ /******/ if (!module.children) module.children = [];
1285
+ /******/ return module;
1286
+ /******/ };
1287
+ /******/ })();
1288
+ /******/
1289
+ /************************************************************************/
1290
+ var __webpack_exports__ = {};
1291
+ // This entry need to be wrapped in an IIFE because it need to be in strict mode.
1292
+ (() => {
1293
+ "use strict";
1294
+ __webpack_require__.r(__webpack_exports__);
1295
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1296
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1297
+ /* harmony export */ });
1298
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(787);
1299
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1300
+ /* harmony import */ var funda_root_portal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(909);
1301
+ /* harmony import */ var funda_root_portal__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(funda_root_portal__WEBPACK_IMPORTED_MODULE_1__);
1302
+ /* harmony import */ var funda_utils_dist_cjs_useComId__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(85);
1303
+ /* harmony import */ var funda_utils_dist_cjs_useComId__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(funda_utils_dist_cjs_useComId__WEBPACK_IMPORTED_MODULE_2__);
1304
+ /* harmony import */ var funda_utils_dist_cjs_useDraggable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(771);
1305
+ /* harmony import */ var funda_utils_dist_cjs_useDraggable__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(funda_utils_dist_cjs_useDraggable__WEBPACK_IMPORTED_MODULE_3__);
1306
+ /* harmony import */ var funda_utils_dist_cjs_bodyScrollLock__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(70);
1307
+ /* harmony import */ var funda_utils_dist_cjs_bodyScrollLock__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(funda_utils_dist_cjs_bodyScrollLock__WEBPACK_IMPORTED_MODULE_4__);
1308
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
1309
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
1310
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
1311
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
1312
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
1313
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
1314
+
1315
+
1316
+
1317
+
1318
+
1319
+ // Destroys body scroll locking
1320
+
1321
+ var ModalDialog = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, externalRef) {
1322
+ var modalContentClassName = props.modalContentClassName,
1323
+ modalHeaderClassName = props.modalHeaderClassName,
1324
+ modalTitleClassName = props.modalTitleClassName,
1325
+ modalBodyClassName = props.modalBodyClassName,
1326
+ modalFooterClassName = props.modalFooterClassName,
1327
+ modalFooterExpandedContentClassName = props.modalFooterExpandedContentClassName,
1328
+ lockBodyScroll = props.lockBodyScroll,
1329
+ draggable = props.draggable,
1330
+ draggedPreventOutsideScreen = props.draggedPreventOutsideScreen,
1331
+ depth = props.depth,
1332
+ show = props.show,
1333
+ maxWidth = props.maxWidth,
1334
+ minHeight = props.minHeight,
1335
+ fullscreen = props.fullscreen,
1336
+ enableVideo = props.enableVideo,
1337
+ heading = props.heading,
1338
+ footerExpandedContent = props.footerExpandedContent,
1339
+ triggerClassName = props.triggerClassName,
1340
+ triggerContent = props.triggerContent,
1341
+ closeBtnClassName = props.closeBtnClassName,
1342
+ closeBtnLabel = props.closeBtnLabel,
1343
+ submitBtnClassName = props.submitBtnClassName,
1344
+ submitBtnLabel = props.submitBtnLabel,
1345
+ autoClose = props.autoClose,
1346
+ maskDisabled = props.maskDisabled,
1347
+ maskOpacity = props.maskOpacity,
1348
+ closeOnlyBtn = props.closeOnlyBtn,
1349
+ closeDisabled = props.closeDisabled,
1350
+ data = props.data,
1351
+ onLoad = props.onLoad,
1352
+ onOpen = props.onOpen,
1353
+ onClose = props.onClose,
1354
+ onSubmit = props.onSubmit,
1355
+ id = props.id,
1356
+ children = props.children;
1357
+ var DEPTH = depth || 1055; // the default value same as bootstrap
1358
+ var M_WIDTH = fullscreen ? undefined : typeof maxWidth === 'function' ? maxWidth() : maxWidth ? maxWidth : undefined;
1359
+ var M_HEIGHT = typeof minHeight === 'function' ? minHeight() : minHeight ? minHeight : undefined;
1360
+ var LOCK_BODY_SCROLL = typeof lockBodyScroll === 'undefined' ? false : lockBodyScroll;
1361
+ var uniqueID = funda_utils_dist_cjs_useComId__WEBPACK_IMPORTED_MODULE_2___default()();
1362
+ var modalRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
1363
+ var triggerRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
1364
+ var idRes = id || uniqueID;
1365
+ var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
1366
+ _useState2 = _slicedToArray(_useState, 2),
1367
+ modalShow = _useState2[0],
1368
+ setModalShow = _useState2[1];
1369
+ var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
1370
+ _useState4 = _slicedToArray(_useState3, 2),
1371
+ incomingData = _useState4[0],
1372
+ setIncomingData = _useState4[1];
1373
+
1374
+ // drag and drop
1375
+ var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
1376
+ _useState6 = _slicedToArray(_useState5, 2),
1377
+ isDragging = _useState6[0],
1378
+ setIsDragging = _useState6[1];
1379
+ var _useDraggable = funda_utils_dist_cjs_useDraggable__WEBPACK_IMPORTED_MODULE_3___default()({
1380
+ enabled: draggable,
1381
+ preventOutsideScreen: draggedPreventOutsideScreen,
1382
+ onStart: function onStart(coordinates, handleEl, contentEl) {
1383
+ setIsDragging(true);
1384
+ },
1385
+ onDrag: function onDrag(coordinates, handleEl, contentEl) {},
1386
+ onStop: function onStop(coordinates, handleEl, contentEl) {
1387
+ setIsDragging(false);
1388
+ }
1389
+ }),
1390
+ dragContentHandle = _useDraggable.dragContentHandle,
1391
+ dragHandle = _useDraggable.dragHandle,
1392
+ resetPosition = _useDraggable.resetPosition;
1393
+
1394
+ // exposes the following methods
1395
+ (0,react__WEBPACK_IMPORTED_MODULE_0__.useImperativeHandle)(externalRef, function () {
1396
+ return {
1397
+ open: function open() {
1398
+ handleOpenWin(null);
1399
+ },
1400
+ close: function close() {
1401
+ handleCloseWin(null);
1402
+ }
1403
+ };
1404
+ }, [externalRef]);
1405
+
1406
+ //
1407
+ function handleCloseWin(e) {
1408
+ if (typeof e !== 'undefined' && e !== null) {
1409
+ e.preventDefault();
1410
+
1411
+ // Prevent click events of parent nested Modal
1412
+ e.stopPropagation();
1413
+ }
1414
+ closeAction();
1415
+
1416
+ // reset modal coordinates
1417
+ setTimeout(function () {
1418
+ resetPosition === null || resetPosition === void 0 ? void 0 : resetPosition();
1419
+ }, 300);
1420
+
1421
+ //
1422
+ onClose === null || onClose === void 0 ? void 0 : onClose(e);
1423
+ }
1424
+ function handleOpenWin(e) {
1425
+ if (typeof e !== 'undefined' && e !== null) {
1426
+ e.preventDefault();
1427
+
1428
+ // Prevent click events of parent nested Modal
1429
+ e.stopPropagation();
1430
+ }
1431
+ openAction();
1432
+
1433
+ //
1434
+ var callback = function callback(e) {
1435
+ return function () {
1436
+ handleCloseWin(e);
1437
+ };
1438
+ };
1439
+ onOpen === null || onOpen === void 0 ? void 0 : onOpen(e, callback(e));
1440
+ }
1441
+ function closeAction() {
1442
+ // pause video without controls
1443
+ //------------------------------------------
1444
+ if (window.curVideo !== null && typeof window.curVideo !== 'undefined') window.curVideo.pause();
1445
+
1446
+ // close Modal Dialog
1447
+ //------------------------------------------
1448
+ var $mask = document.querySelector("#mask-".concat(idRes, " > .modal-backdrop"));
1449
+ setModalShow(false);
1450
+ if ($mask !== null) $mask.classList.remove('show');
1451
+ setTimeout(function () {
1452
+ if (modalRef.current !== null) modalRef.current.style.display = 'none';
1453
+ if ($mask !== null) $mask.style.display = 'none';
1454
+ }, 300);
1455
+
1456
+ // Unlocks the page
1457
+ //------------------------------------------
1458
+ if (LOCK_BODY_SCROLL) (0,funda_utils_dist_cjs_bodyScrollLock__WEBPACK_IMPORTED_MODULE_4__.enableBodyScroll)(document.querySelector('body'));
1459
+
1460
+ // Cancels a timeout previously established by calling setTimeout().
1461
+ //------------------------------------------
1462
+ clearTimeout(window.setCloseModalDialog);
1463
+ }
1464
+ function openAction() {
1465
+ if (modalRef.current === null) return;
1466
+
1467
+ // Video PopUp Interaction
1468
+ //------------------------------------------
1469
+ var hasVideo = modalRef.current.classList.contains('is-video') ? true : false;
1470
+ if (hasVideo) {
1471
+ var windowWidth = window.innerWidth;
1472
+ var windowHeight = window.innerHeight;
1473
+ var $videoWrapper = modalRef.current.querySelector('.modal-dialog__video');
1474
+ var isIframe = $videoWrapper.getElementsByTagName('iframe').length > 0 ? true : false;
1475
+ var $video = isIframe ? $videoWrapper.getElementsByTagName('iframe')[0] : $videoWrapper.getElementsByTagName('video')[0];
1476
+
1477
+ //
1478
+ var setVideo = function setVideo(currentWidth, currentHeight, obj) {
1479
+ var newMaxW = windowWidth - 80,
1480
+ newMaxH = windowHeight - 80;
1481
+ var newW = currentWidth,
1482
+ newH = currentHeight;
1483
+ if (currentHeight > newMaxH) {
1484
+ newH = newMaxH;
1485
+
1486
+ //Scaled/Proportional Content
1487
+ newW = currentWidth * (newH / currentHeight);
1488
+ }
1489
+ if (newW > newMaxW) {
1490
+ newW = newMaxW;
1491
+
1492
+ //Scaled/Proportional Content
1493
+ newH = currentHeight * (newW / currentWidth);
1494
+ }
1495
+ obj.height = newH + 'px';
1496
+ obj.width = newW + 'px';
1497
+
1498
+ //
1499
+ modalRef.current.querySelector('.modal-dialog').style.width = newW + 'px';
1500
+ };
1501
+ if (isIframe) {
1502
+ var _w = parseFloat(modalRef.current.querySelector('.modal-dialog').style.maxWidth);
1503
+ if (isNaN(_w)) _w = 500;
1504
+ var _h = _w * 0.5625;
1505
+ setVideo(_w, _h, $video);
1506
+ } else {
1507
+ var _sources = $video.getElementsByTagName('source');
1508
+ var _src = _sources.length > 0 ? _sources[0].src : $video.src;
1509
+ getVideoDimensions(_src).then(function (res) {
1510
+ setVideo(res.width, res.height, $video);
1511
+ });
1512
+ }
1513
+
1514
+ //Set current video when the tag is <video>
1515
+ window.curVideo = $video.tagName === 'VIDEO' ? $video : null;
1516
+ }
1517
+
1518
+ // fire Modal Dialog
1519
+ //------------------------------------------
1520
+ var $mask = document.querySelector("#mask-".concat(idRes, " > .modal-backdrop"));
1521
+ modalRef.current.style.display = 'block';
1522
+ if ($mask !== null) $mask.style.display = 'block';
1523
+ setTimeout(function () {
1524
+ setModalShow(true);
1525
+ if ($mask !== null) $mask.classList.add('show');
1526
+ }, 0);
1527
+
1528
+ // Locks the page
1529
+ //------------------------------------------
1530
+ //
1531
+ // Get a target element that you want to persist scrolling for (such as a modal/lightbox/flyout/nav).
1532
+ // Specifically, the target element is the one we would like to allow scroll on (NOT a parent of that element).
1533
+ // This is also the element to apply the CSS '-webkit-overflow-scrolling: touch;' if desired.
1534
+ if (LOCK_BODY_SCROLL) (0,funda_utils_dist_cjs_bodyScrollLock__WEBPACK_IMPORTED_MODULE_4__.disableBodyScroll)(document.querySelector('body'));
1535
+
1536
+ //auto close
1537
+ //------------------------------------------
1538
+ if (autoClose && !isNaN(autoClose)) {
1539
+ //
1540
+ window.setCloseModalDialog = setTimeout(function () {
1541
+ closeAction();
1542
+ //
1543
+ onClose === null || onClose === void 0 ? void 0 : onClose(null);
1544
+ }, autoClose);
1545
+ }
1546
+ }
1547
+
1548
+ //Returns the dimensions of a video asynchrounsly.
1549
+ function getVideoDimensions(url) {
1550
+ return new Promise(function (resolve) {
1551
+ // create the video element
1552
+ var video = document.createElement('video');
1553
+
1554
+ // place a listener on it
1555
+ video.addEventListener("loadedmetadata", function () {
1556
+ // retrieve dimensions
1557
+ var height = this.videoHeight;
1558
+ var width = this.videoWidth;
1559
+ // send back result
1560
+ resolve({
1561
+ height: height,
1562
+ width: width
1563
+ });
1564
+ }, false);
1565
+
1566
+ // start download meta-datas
1567
+ video.src = url;
1568
+ });
1569
+ }
1570
+ (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
1571
+ // update incoming data
1572
+ //--------------
1573
+ setIncomingData(data);
1574
+
1575
+ // show (ONLY, DO NOT USE `if ... else ...`)
1576
+ //--------------
1577
+ if (show) {
1578
+ handleOpenWin(null);
1579
+ }
1580
+
1581
+ // Pass the function to be called
1582
+ //--------------
1583
+ onLoad === null || onLoad === void 0 ? void 0 : onLoad(function () {
1584
+ return handleOpenWin;
1585
+ }, function () {
1586
+ return handleCloseWin;
1587
+ });
1588
+
1589
+ // Remove the global list of events, especially as scroll and interval.
1590
+ //--------------
1591
+ return function () {
1592
+ if (LOCK_BODY_SCROLL) (0,funda_utils_dist_cjs_bodyScrollLock__WEBPACK_IMPORTED_MODULE_4__.clearAllBodyScrollLocks)();
1593
+
1594
+ // Cancels a timeout previously established by calling setTimeout().
1595
+ clearTimeout(window.setCloseModalDialog);
1596
+ };
1597
+ }, [show, data, modalRef.current]); // When show`` defaults to true, `modalRef.current` will be null
1598
+
1599
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, triggerContent ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
1600
+ className: triggerClassName ? triggerClassName : 'd-inline w-auto',
1601
+ ref: triggerRef,
1602
+ onClick: handleOpenWin
1603
+ }, triggerContent)) : null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((funda_root_portal__WEBPACK_IMPORTED_MODULE_1___default()), {
1604
+ show: true,
1605
+ containerClassName: "ModalDialog"
1606
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
1607
+ ref: modalRef,
1608
+ className: enableVideo ? "modal fade is-video ".concat(modalShow ? 'show' : '') : "modal fade ".concat(modalShow ? 'show' : ''),
1609
+ tabIndex: -1,
1610
+ "aria-hidden": "true",
1611
+ style: {
1612
+ pointerEvents: 'none',
1613
+ zIndex: DEPTH
1614
+ },
1615
+ "data-mask": "mask-".concat(idRes)
1616
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
1617
+ className: "modal-dialog modal-dialog-centered modal-dialog-scrollable ".concat(fullscreen ? 'modal-fullscreen' : ''),
1618
+ style: M_WIDTH ? {
1619
+ maxWidth: "".concat(M_WIDTH)
1620
+ } : {}
1621
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
1622
+ ref: dragContentHandle,
1623
+ className: "".concat(enableVideo ? 'modal-content bg-transparent shadow-none border-0' : 'modal-content', " ").concat(modalContentClassName || '', " ").concat(isDragging ? 'dragging' : ''),
1624
+ style: {
1625
+ overflow: 'inherit',
1626
+ minHeight: M_HEIGHT ? M_HEIGHT : 'auto'
1627
+ }
1628
+ }, (!heading || heading === '') && closeDisabled ? null : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
1629
+ ref: dragHandle,
1630
+ className: "".concat(enableVideo ? 'modal-header border-0 px-0' : 'modal-header', " ").concat(modalHeaderClassName || ''),
1631
+ style: {
1632
+ cursor: draggable ? 'move' : 'default'
1633
+ }
1634
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("h5", {
1635
+ className: "modal-title ".concat(modalTitleClassName || '')
1636
+ }, heading || ''), !closeDisabled ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
1637
+ type: "button",
1638
+ className: enableVideo ? 'btn-close btn-close-white' : 'btn-close',
1639
+ "data-close": "1",
1640
+ onClick: handleCloseWin
1641
+ }) : null)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
1642
+ className: "".concat(enableVideo ? 'modal-body m-0 p-0' : 'modal-body', " ").concat(modalBodyClassName || '')
1643
+ }, enableVideo ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
1644
+ className: "modal-dialog__video"
1645
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
1646
+ className: "ratio ratio-16x9"
1647
+ }, children))) : children), footerExpandedContent ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
1648
+ className: "modal-footer modal-expanded-footer ".concat(modalFooterExpandedContentClassName || '')
1649
+ }, footerExpandedContent)) : null, closeBtnLabel || submitBtnLabel ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
1650
+ className: "modal-footer ".concat(modalFooterClassName || '')
1651
+ }, !closeDisabled ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, closeBtnLabel ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
1652
+ "data-close": "1",
1653
+ onClick: handleCloseWin,
1654
+ type: "button",
1655
+ className: closeBtnClassName ? closeBtnClassName : 'btn btn-secondary'
1656
+ }, closeBtnLabel) : null) : null, submitBtnLabel ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
1657
+ "data-confirm": "1",
1658
+ "data-incoming-data": "".concat(incomingData),
1659
+ onClick: function onClick(e) {
1660
+ var callback = function callback(e) {
1661
+ return function () {
1662
+ handleCloseWin(e);
1663
+ };
1664
+ };
1665
+ onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(e, callback(e), incomingData);
1666
+ },
1667
+ type: "button",
1668
+ className: submitBtnClassName ? submitBtnClassName : 'btn btn-primary'
1669
+ }, submitBtnLabel) : null)) : null))), !maskDisabled ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
1670
+ id: "mask-".concat(idRes)
1671
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
1672
+ id: "mask-".concat(idRes),
1673
+ className: modalShow ? 'modal-backdrop fade show' : 'modal-backdrop fade',
1674
+ style: maskOpacity ? {
1675
+ display: modalShow ? 'block' : 'none',
1676
+ opacity: maskOpacity,
1677
+ zIndex: DEPTH - 5
1678
+ } : {
1679
+ display: modalShow ? 'block' : 'none',
1680
+ zIndex: DEPTH - 5
1681
+ },
1682
+ onClick: function onClick(e) {
1683
+ if ((typeof closeDisabled === 'undefined' || closeDisabled === false) && (typeof closeOnlyBtn === 'undefined' || closeOnlyBtn === false)) {
1684
+ handleCloseWin(null);
1685
+ }
1686
+ }
1687
+ })) : null));
1688
+ });
1689
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ModalDialog);
1690
+ })();
1691
+
1692
+ /******/ return __webpack_exports__;
1693
+ /******/ })()
1694
+ ;
1695
+ });