funda-ui 4.5.711 → 4.5.713

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 (483) hide show
  1. package/README.md +4 -105
  2. package/package.json +11 -556
  3. package/.gitattributes +0 -2
  4. package/README_PUBLISH.md +0 -126
  5. package/logo.png +0 -0
  6. package/preview.png +0 -0
  7. package/publish/LICENSE +0 -21
  8. package/publish/README.md +0 -126
  9. package/publish/lib/cjs/Accordion/index.d.ts +0 -2
  10. package/publish/lib/cjs/Accordion/index.js +0 -1035
  11. package/publish/lib/cjs/BackToTop/index.d.ts +0 -17
  12. package/publish/lib/cjs/BackToTop/index.js +0 -904
  13. package/publish/lib/cjs/CascadingSelect/index.d.ts +0 -60
  14. package/publish/lib/cjs/CascadingSelect/index.js +0 -2943
  15. package/publish/lib/cjs/CascadingSelectE2E/index.d.ts +0 -71
  16. package/publish/lib/cjs/CascadingSelectE2E/index.js +0 -3540
  17. package/publish/lib/cjs/Checkbox/index.d.ts +0 -28
  18. package/publish/lib/cjs/Checkbox/index.js +0 -662
  19. package/publish/lib/cjs/ColorPicker/index.d.ts +0 -27
  20. package/publish/lib/cjs/ColorPicker/index.js +0 -662
  21. package/publish/lib/cjs/Date/index.d.ts +0 -70
  22. package/publish/lib/cjs/Date/index.js +0 -6200
  23. package/publish/lib/cjs/DigitalClock/index.d.ts +0 -7
  24. package/publish/lib/cjs/DigitalClock/index.js +0 -402
  25. package/publish/lib/cjs/DragDropList/index.d.ts +0 -44
  26. package/publish/lib/cjs/DragDropList/index.js +0 -1587
  27. package/publish/lib/cjs/DropdownMenu/index.d.ts +0 -38
  28. package/publish/lib/cjs/DropdownMenu/index.js +0 -1498
  29. package/publish/lib/cjs/DynamicFields/index.d.ts +0 -40
  30. package/publish/lib/cjs/DynamicFields/index.js +0 -810
  31. package/publish/lib/cjs/EventCalendar/index.d.ts +0 -61
  32. package/publish/lib/cjs/EventCalendar/index.js +0 -3740
  33. package/publish/lib/cjs/EventCalendarTimeline/index.d.ts +0 -100
  34. package/publish/lib/cjs/EventCalendarTimeline/index.js +0 -6084
  35. package/publish/lib/cjs/File/index.d.ts +0 -40
  36. package/publish/lib/cjs/File/index.js +0 -1751
  37. package/publish/lib/cjs/HorizontalScrollContent/index.d.ts +0 -14
  38. package/publish/lib/cjs/HorizontalScrollContent/index.js +0 -426
  39. package/publish/lib/cjs/Input/index.d.ts +0 -59
  40. package/publish/lib/cjs/Input/index.js +0 -1455
  41. package/publish/lib/cjs/LiveSearch/index.d.ts +0 -69
  42. package/publish/lib/cjs/LiveSearch/index.js +0 -3626
  43. package/publish/lib/cjs/MasonryLayout/index.d.ts +0 -14
  44. package/publish/lib/cjs/MasonryLayout/index.js +0 -689
  45. package/publish/lib/cjs/ModalDialog/index.d.ts +0 -79
  46. package/publish/lib/cjs/ModalDialog/index.js +0 -1695
  47. package/publish/lib/cjs/ModeSwitch/index.d.ts +0 -17
  48. package/publish/lib/cjs/ModeSwitch/index.js +0 -202
  49. package/publish/lib/cjs/MultilevelDropdownMenu/index.d.ts +0 -20
  50. package/publish/lib/cjs/MultilevelDropdownMenu/index.js +0 -930
  51. package/publish/lib/cjs/MultipleCheckboxes/index.d.ts +0 -41
  52. package/publish/lib/cjs/MultipleCheckboxes/index.js +0 -1717
  53. package/publish/lib/cjs/MultipleSelect/index.d.ts +0 -65
  54. package/publish/lib/cjs/MultipleSelect/index.js +0 -3704
  55. package/publish/lib/cjs/NativeSelect/index.d.ts +0 -37
  56. package/publish/lib/cjs/NativeSelect/index.js +0 -1631
  57. package/publish/lib/cjs/NumberInput/index.d.ts +0 -40
  58. package/publish/lib/cjs/NumberInput/index.js +0 -1188
  59. package/publish/lib/cjs/Pagination/index.d.ts +0 -51
  60. package/publish/lib/cjs/Pagination/index.js +0 -612
  61. package/publish/lib/cjs/Radio/index.d.ts +0 -45
  62. package/publish/lib/cjs/Radio/index.js +0 -1391
  63. package/publish/lib/cjs/RangeSlider/index.d.ts +0 -22
  64. package/publish/lib/cjs/RangeSlider/index.js +0 -2665
  65. package/publish/lib/cjs/RootPortal/index.d.ts +0 -8
  66. package/publish/lib/cjs/RootPortal/index.js +0 -141
  67. package/publish/lib/cjs/ScrollReveal/index.d.ts +0 -21
  68. package/publish/lib/cjs/ScrollReveal/index.js +0 -401
  69. package/publish/lib/cjs/Scrollbar/index.d.ts +0 -17
  70. package/publish/lib/cjs/Scrollbar/index.js +0 -1107
  71. package/publish/lib/cjs/SearchBar/index.d.ts +0 -41
  72. package/publish/lib/cjs/SearchBar/index.js +0 -701
  73. package/publish/lib/cjs/Select/index.d.ts +0 -99
  74. package/publish/lib/cjs/Select/index.js +0 -5697
  75. package/publish/lib/cjs/ShowMoreLess/index.d.ts +0 -36
  76. package/publish/lib/cjs/ShowMoreLess/index.js +0 -387
  77. package/publish/lib/cjs/Switch/index.d.ts +0 -25
  78. package/publish/lib/cjs/Switch/index.js +0 -628
  79. package/publish/lib/cjs/Table/index.d.ts +0 -12
  80. package/publish/lib/cjs/Table/index.js +0 -2062
  81. package/publish/lib/cjs/Tabs/index.d.ts +0 -3
  82. package/publish/lib/cjs/Tabs/index.js +0 -771
  83. package/publish/lib/cjs/TagInput/index.d.ts +0 -31
  84. package/publish/lib/cjs/TagInput/index.js +0 -1144
  85. package/publish/lib/cjs/Textarea/index.d.ts +0 -50
  86. package/publish/lib/cjs/Textarea/index.js +0 -1784
  87. package/publish/lib/cjs/Toast/index.d.ts +0 -34
  88. package/publish/lib/cjs/Toast/index.js +0 -861
  89. package/publish/lib/cjs/Tooltip/index.d.ts +0 -23
  90. package/publish/lib/cjs/Tooltip/index.js +0 -1674
  91. package/publish/lib/cjs/Tree/index.d.ts +0 -62
  92. package/publish/lib/cjs/Tree/index.js +0 -1960
  93. package/publish/lib/cjs/Utils/anim.d.ts +0 -11
  94. package/publish/lib/cjs/Utils/anim.js +0 -400
  95. package/publish/lib/cjs/Utils/bodyScrollLock.d.ts +0 -8
  96. package/publish/lib/cjs/Utils/bodyScrollLock.js +0 -311
  97. package/publish/lib/cjs/Utils/buffer.d.ts +0 -67
  98. package/publish/lib/cjs/Utils/buffer.js +0 -343
  99. package/publish/lib/cjs/Utils/cls.d.ts +0 -15
  100. package/publish/lib/cjs/Utils/cls.js +0 -124
  101. package/publish/lib/cjs/Utils/convert.d.ts +0 -25
  102. package/publish/lib/cjs/Utils/convert.js +0 -109
  103. package/publish/lib/cjs/Utils/date.d.ts +0 -217
  104. package/publish/lib/cjs/Utils/date.js +0 -567
  105. package/publish/lib/cjs/Utils/dom.d.ts +0 -13
  106. package/publish/lib/cjs/Utils/dom.js +0 -215
  107. package/publish/lib/cjs/Utils/easing.d.ts +0 -29
  108. package/publish/lib/cjs/Utils/easing.js +0 -221
  109. package/publish/lib/cjs/Utils/extract.d.ts +0 -28
  110. package/publish/lib/cjs/Utils/extract.js +0 -130
  111. package/publish/lib/cjs/Utils/getElementProperty.d.ts +0 -52
  112. package/publish/lib/cjs/Utils/getElementProperty.js +0 -189
  113. package/publish/lib/cjs/Utils/guid.d.ts +0 -7
  114. package/publish/lib/cjs/Utils/guid.js +0 -67
  115. package/publish/lib/cjs/Utils/initDefaultOptions.d.ts +0 -21
  116. package/publish/lib/cjs/Utils/initDefaultOptions.js +0 -131
  117. package/publish/lib/cjs/Utils/inputsCalculation.d.ts +0 -28
  118. package/publish/lib/cjs/Utils/inputsCalculation.js +0 -188
  119. package/publish/lib/cjs/Utils/math.d.ts +0 -77
  120. package/publish/lib/cjs/Utils/math.js +0 -305
  121. package/publish/lib/cjs/Utils/object.d.ts +0 -18
  122. package/publish/lib/cjs/Utils/object.js +0 -120
  123. package/publish/lib/cjs/Utils/os.d.ts +0 -2
  124. package/publish/lib/cjs/Utils/os.js +0 -104
  125. package/publish/lib/cjs/Utils/performance.d.ts +0 -3
  126. package/publish/lib/cjs/Utils/performance.js +0 -94
  127. package/publish/lib/cjs/Utils/tree.d.ts +0 -40
  128. package/publish/lib/cjs/Utils/tree.js +0 -195
  129. package/publish/lib/cjs/Utils/useAutosizeTextArea.d.ts +0 -10
  130. package/publish/lib/cjs/Utils/useAutosizeTextArea.js +0 -227
  131. package/publish/lib/cjs/Utils/useBoundedDrag.d.ts +0 -125
  132. package/publish/lib/cjs/Utils/useBoundedDrag.js +0 -380
  133. package/publish/lib/cjs/Utils/useClickOutside.d.ts +0 -33
  134. package/publish/lib/cjs/Utils/useClickOutside.js +0 -166
  135. package/publish/lib/cjs/Utils/useComId.d.ts +0 -6
  136. package/publish/lib/cjs/Utils/useComId.js +0 -114
  137. package/publish/lib/cjs/Utils/useDebounce.d.ts +0 -20
  138. package/publish/lib/cjs/Utils/useDebounce.js +0 -138
  139. package/publish/lib/cjs/Utils/useDragDropPosition.d.ts +0 -169
  140. package/publish/lib/cjs/Utils/useDragDropPosition.js +0 -456
  141. package/publish/lib/cjs/Utils/useDraggable.d.ts +0 -62
  142. package/publish/lib/cjs/Utils/useDraggable.js +0 -348
  143. package/publish/lib/cjs/Utils/useInterval.d.ts +0 -5
  144. package/publish/lib/cjs/Utils/useInterval.js +0 -168
  145. package/publish/lib/cjs/Utils/useIsMobile.d.ts +0 -2
  146. package/publish/lib/cjs/Utils/useIsMobile.js +0 -168
  147. package/publish/lib/cjs/Utils/useKeyPress.d.ts +0 -44
  148. package/publish/lib/cjs/Utils/useKeyPress.js +0 -200
  149. package/publish/lib/cjs/Utils/useThrottle.d.ts +0 -2
  150. package/publish/lib/cjs/Utils/useThrottle.js +0 -136
  151. package/publish/lib/cjs/Utils/useWindowScroll.d.ts +0 -12
  152. package/publish/lib/cjs/Utils/useWindowScroll.js +0 -217
  153. package/publish/lib/cjs/Utils/viewport.d.ts +0 -7
  154. package/publish/lib/cjs/Utils/viewport.js +0 -64
  155. package/publish/lib/cjs/index.d.ts +0 -45
  156. package/publish/lib/cjs/index.js +0 -46
  157. package/publish/lib/css/BackToTop/index.css +0 -34
  158. package/publish/lib/css/CascadingSelect/index.css +0 -216
  159. package/publish/lib/css/CascadingSelectE2E/index.css +0 -216
  160. package/publish/lib/css/ColorPicker/index.css +0 -58
  161. package/publish/lib/css/Date/index.css +0 -434
  162. package/publish/lib/css/DragDropList/index.css +0 -188
  163. package/publish/lib/css/DropdownMenu/index.css +0 -151
  164. package/publish/lib/css/EventCalendar/index.css +0 -300
  165. package/publish/lib/css/EventCalendarTimeline/index.css +0 -694
  166. package/publish/lib/css/HorizontalScrollContent/index.css +0 -70
  167. package/publish/lib/css/LiveSearch/index.css +0 -55
  168. package/publish/lib/css/MultilevelDropdownMenu/index.css +0 -38
  169. package/publish/lib/css/MultipleSelect/index.css +0 -313
  170. package/publish/lib/css/RangeSlider/index.css +0 -150
  171. package/publish/lib/css/Scrollbar/index.css +0 -176
  172. package/publish/lib/css/Select/index.css +0 -368
  173. package/publish/lib/css/ShowMoreLess/index.css +0 -23
  174. package/publish/lib/css/Table/index.css +0 -584
  175. package/publish/lib/css/TagInput/index.css +0 -91
  176. package/publish/lib/css/Toast/index.css +0 -201
  177. package/publish/lib/css/Tooltip/index.css +0 -197
  178. package/publish/lib/css/Tree/index.css +0 -232
  179. package/publish/lib/esm/Accordion/Accordion.tsx +0 -184
  180. package/publish/lib/esm/Accordion/AccordionItem.tsx +0 -143
  181. package/publish/lib/esm/Accordion/index.tsx +0 -2
  182. package/publish/lib/esm/BackToTop/index.scss +0 -47
  183. package/publish/lib/esm/BackToTop/index.tsx +0 -177
  184. package/publish/lib/esm/CascadingSelect/Group.tsx +0 -82
  185. package/publish/lib/esm/CascadingSelect/index.scss +0 -291
  186. package/publish/lib/esm/CascadingSelect/index.tsx +0 -1203
  187. package/publish/lib/esm/CascadingSelectE2E/Group.tsx +0 -83
  188. package/publish/lib/esm/CascadingSelectE2E/index.scss +0 -293
  189. package/publish/lib/esm/CascadingSelectE2E/index.tsx +0 -1471
  190. package/publish/lib/esm/Checkbox/index.tsx +0 -193
  191. package/publish/lib/esm/ColorPicker/index.scss +0 -91
  192. package/publish/lib/esm/ColorPicker/index.tsx +0 -204
  193. package/publish/lib/esm/Date/Calendar.tsx +0 -723
  194. package/publish/lib/esm/Date/index.scss +0 -567
  195. package/publish/lib/esm/Date/index.tsx +0 -1683
  196. package/publish/lib/esm/Date/localization/en_US.js +0 -13
  197. package/publish/lib/esm/Date/localization/zh_CN.js +0 -12
  198. package/publish/lib/esm/DigitalClock/index.tsx +0 -74
  199. package/publish/lib/esm/DragDropList/index.scss +0 -245
  200. package/publish/lib/esm/DragDropList/index.tsx +0 -494
  201. package/publish/lib/esm/DropdownMenu/Option.tsx +0 -55
  202. package/publish/lib/esm/DropdownMenu/index.scss +0 -205
  203. package/publish/lib/esm/DropdownMenu/index.tsx +0 -377
  204. package/publish/lib/esm/DynamicFields/index.tsx +0 -404
  205. package/publish/lib/esm/EventCalendar/index.scss +0 -407
  206. package/publish/lib/esm/EventCalendar/index.tsx +0 -1004
  207. package/publish/lib/esm/EventCalendarTimeline/index.scss +0 -926
  208. package/publish/lib/esm/EventCalendarTimeline/index.tsx +0 -2683
  209. package/publish/lib/esm/File/index.tsx +0 -477
  210. package/publish/lib/esm/HorizontalScrollContent/index.scss +0 -87
  211. package/publish/lib/esm/HorizontalScrollContent/index.tsx +0 -171
  212. package/publish/lib/esm/Input/index.tsx +0 -614
  213. package/publish/lib/esm/LiveSearch/index.scss +0 -82
  214. package/publish/lib/esm/LiveSearch/index.tsx +0 -960
  215. package/publish/lib/esm/MasonryLayout/index.tsx +0 -326
  216. package/publish/lib/esm/ModalDialog/index.tsx +0 -552
  217. package/publish/lib/esm/ModeSwitch/index.tsx +0 -82
  218. package/publish/lib/esm/MultilevelDropdownMenu/ItemList.tsx +0 -265
  219. package/publish/lib/esm/MultilevelDropdownMenu/index.scss +0 -79
  220. package/publish/lib/esm/MultilevelDropdownMenu/index.tsx +0 -77
  221. package/publish/lib/esm/MultipleCheckboxes/index.tsx +0 -669
  222. package/publish/lib/esm/MultipleSelect/index.scss +0 -398
  223. package/publish/lib/esm/MultipleSelect/index.tsx +0 -766
  224. package/publish/lib/esm/MultipleSelect/utils/func.ts +0 -61
  225. package/publish/lib/esm/NativeSelect/index.tsx +0 -396
  226. package/publish/lib/esm/NativeSelect/utils/func.ts +0 -49
  227. package/publish/lib/esm/NumberInput/index.tsx +0 -385
  228. package/publish/lib/esm/Pagination/index.tsx +0 -286
  229. package/publish/lib/esm/Pagination/pagination-navigators.tsx +0 -60
  230. package/publish/lib/esm/Radio/index.tsx +0 -670
  231. package/publish/lib/esm/RangeSlider/index.scss +0 -186
  232. package/publish/lib/esm/RangeSlider/index.tsx +0 -241
  233. package/publish/lib/esm/RootPortal/index.tsx +0 -53
  234. package/publish/lib/esm/ScrollReveal/index.tsx +0 -148
  235. package/publish/lib/esm/Scrollbar/index.scss +0 -221
  236. package/publish/lib/esm/Scrollbar/index.tsx +0 -561
  237. package/publish/lib/esm/SearchBar/index.tsx +0 -253
  238. package/publish/lib/esm/Select/index.scss +0 -553
  239. package/publish/lib/esm/Select/index.tsx +0 -2816
  240. package/publish/lib/esm/Select/utils/func.ts +0 -106
  241. package/publish/lib/esm/ShowMoreLess/index.scss +0 -27
  242. package/publish/lib/esm/ShowMoreLess/index.tsx +0 -145
  243. package/publish/lib/esm/Switch/index.tsx +0 -147
  244. package/publish/lib/esm/Table/Table.tsx +0 -257
  245. package/publish/lib/esm/Table/TableBody.tsx +0 -41
  246. package/publish/lib/esm/Table/TableCaption.tsx +0 -34
  247. package/publish/lib/esm/Table/TableCell.tsx +0 -123
  248. package/publish/lib/esm/Table/TableColgroup.tsx +0 -38
  249. package/publish/lib/esm/Table/TableContext.tsx +0 -26
  250. package/publish/lib/esm/Table/TableFoot.tsx +0 -28
  251. package/publish/lib/esm/Table/TableHead.tsx +0 -28
  252. package/publish/lib/esm/Table/TableRow.tsx +0 -76
  253. package/publish/lib/esm/Table/index.scss +0 -418
  254. package/publish/lib/esm/Table/index.tsx +0 -14
  255. package/publish/lib/esm/Table/utils/DragHandleSprite.tsx +0 -46
  256. package/publish/lib/esm/Table/utils/SortSprite.tsx +0 -57
  257. package/publish/lib/esm/Table/utils/TableFilter.tsx +0 -56
  258. package/publish/lib/esm/Table/utils/ToggleSelection.tsx +0 -225
  259. package/publish/lib/esm/Table/utils/func.ts +0 -171
  260. package/publish/lib/esm/Table/utils/hooks/useTableDraggable.tsx +0 -342
  261. package/publish/lib/esm/Table/utils/hooks/useTableKeyPress.tsx +0 -154
  262. package/publish/lib/esm/Table/utils/hooks/useTableResponsive.tsx +0 -92
  263. package/publish/lib/esm/Table/utils/hooks/useTableSort.tsx +0 -143
  264. package/publish/lib/esm/Tabs/TabList.tsx +0 -50
  265. package/publish/lib/esm/Tabs/TabPanel.tsx +0 -44
  266. package/publish/lib/esm/Tabs/Tabs.tsx +0 -282
  267. package/publish/lib/esm/Tabs/index.tsx +0 -3
  268. package/publish/lib/esm/TagInput/index.scss +0 -126
  269. package/publish/lib/esm/TagInput/index.tsx +0 -352
  270. package/publish/lib/esm/Textarea/index.tsx +0 -608
  271. package/publish/lib/esm/Toast/Item.tsx +0 -124
  272. package/publish/lib/esm/Toast/index.scss +0 -269
  273. package/publish/lib/esm/Toast/index.tsx +0 -374
  274. package/publish/lib/esm/Tooltip/index.scss +0 -269
  275. package/publish/lib/esm/Tooltip/index.tsx +0 -312
  276. package/publish/lib/esm/Tree/TreeList.tsx +0 -616
  277. package/publish/lib/esm/Tree/index.scss +0 -386
  278. package/publish/lib/esm/Tree/index.tsx +0 -396
  279. package/publish/lib/esm/Tree/init-height.tsx +0 -27
  280. package/publish/lib/esm/Tree/utils/func.ts +0 -15
  281. package/publish/lib/esm/Utils/hooks/useAutosizeTextArea.tsx +0 -125
  282. package/publish/lib/esm/Utils/hooks/useBoundedDrag.tsx +0 -301
  283. package/publish/lib/esm/Utils/hooks/useClickOutside.tsx +0 -69
  284. package/publish/lib/esm/Utils/hooks/useComId.tsx +0 -13
  285. package/publish/lib/esm/Utils/hooks/useDebounce.tsx +0 -40
  286. package/publish/lib/esm/Utils/hooks/useDragDropPosition.tsx +0 -420
  287. package/publish/lib/esm/Utils/hooks/useDraggable.tsx +0 -265
  288. package/publish/lib/esm/Utils/hooks/useInterval.tsx +0 -74
  289. package/publish/lib/esm/Utils/hooks/useIsMobile.tsx +0 -56
  290. package/publish/lib/esm/Utils/hooks/useKeyPress.tsx +0 -104
  291. package/publish/lib/esm/Utils/hooks/useThrottle.tsx +0 -39
  292. package/publish/lib/esm/Utils/hooks/useWindowScroll.tsx +0 -83
  293. package/publish/lib/esm/Utils/libs/anim.ts +0 -96
  294. package/publish/lib/esm/Utils/libs/buffer.ts +0 -262
  295. package/publish/lib/esm/Utils/libs/cls.ts +0 -64
  296. package/publish/lib/esm/Utils/libs/convert.ts +0 -59
  297. package/publish/lib/esm/Utils/libs/date.ts +0 -578
  298. package/publish/lib/esm/Utils/libs/dom.ts +0 -150
  299. package/publish/lib/esm/Utils/libs/easing.ts +0 -201
  300. package/publish/lib/esm/Utils/libs/extract.ts +0 -86
  301. package/publish/lib/esm/Utils/libs/getElementProperty.ts +0 -150
  302. package/publish/lib/esm/Utils/libs/guid.ts +0 -16
  303. package/publish/lib/esm/Utils/libs/initDefaultOptions.ts +0 -104
  304. package/publish/lib/esm/Utils/libs/inputsCalculation.ts +0 -160
  305. package/publish/lib/esm/Utils/libs/math.ts +0 -276
  306. package/publish/lib/esm/Utils/libs/object.ts +0 -68
  307. package/publish/lib/esm/Utils/libs/os.ts +0 -63
  308. package/publish/lib/esm/Utils/libs/performance.ts +0 -47
  309. package/publish/lib/esm/Utils/libs/tree.ts +0 -119
  310. package/publish/lib/esm/Utils/libs/viewport.ts +0 -20
  311. package/publish/lib/esm/Utils/plugins/bodyScrollLock.ts +0 -286
  312. package/publish/lib/esm/index.js +0 -43
  313. package/publish/package.json +0 -1
  314. /package/{publish/Accordion → Accordion}/index.d.ts +0 -0
  315. /package/{publish/Accordion → Accordion}/index.js +0 -0
  316. /package/{publish/BackToTop → BackToTop}/index.css +0 -0
  317. /package/{publish/BackToTop → BackToTop}/index.d.ts +0 -0
  318. /package/{publish/BackToTop → BackToTop}/index.js +0 -0
  319. /package/{publish/CascadingSelect → CascadingSelect}/index.css +0 -0
  320. /package/{publish/CascadingSelect → CascadingSelect}/index.d.ts +0 -0
  321. /package/{publish/CascadingSelect → CascadingSelect}/index.js +0 -0
  322. /package/{publish/CascadingSelectE2E → CascadingSelectE2E}/index.css +0 -0
  323. /package/{publish/CascadingSelectE2E → CascadingSelectE2E}/index.d.ts +0 -0
  324. /package/{publish/CascadingSelectE2E → CascadingSelectE2E}/index.js +0 -0
  325. /package/{publish/Checkbox → Checkbox}/index.d.ts +0 -0
  326. /package/{publish/Checkbox → Checkbox}/index.js +0 -0
  327. /package/{publish/ColorPicker → ColorPicker}/index.css +0 -0
  328. /package/{publish/ColorPicker → ColorPicker}/index.d.ts +0 -0
  329. /package/{publish/ColorPicker → ColorPicker}/index.js +0 -0
  330. /package/{publish/Date → Date}/index.css +0 -0
  331. /package/{publish/Date → Date}/index.d.ts +0 -0
  332. /package/{publish/Date → Date}/index.js +0 -0
  333. /package/{publish/DigitalClock → DigitalClock}/index.d.ts +0 -0
  334. /package/{publish/DigitalClock → DigitalClock}/index.js +0 -0
  335. /package/{publish/DragDropList → DragDropList}/index.css +0 -0
  336. /package/{publish/DragDropList → DragDropList}/index.d.ts +0 -0
  337. /package/{publish/DragDropList → DragDropList}/index.js +0 -0
  338. /package/{publish/DropdownMenu → DropdownMenu}/index.css +0 -0
  339. /package/{publish/DropdownMenu → DropdownMenu}/index.d.ts +0 -0
  340. /package/{publish/DropdownMenu → DropdownMenu}/index.js +0 -0
  341. /package/{publish/DynamicFields → DynamicFields}/index.d.ts +0 -0
  342. /package/{publish/DynamicFields → DynamicFields}/index.js +0 -0
  343. /package/{publish/EventCalendar → EventCalendar}/index.css +0 -0
  344. /package/{publish/EventCalendar → EventCalendar}/index.d.ts +0 -0
  345. /package/{publish/EventCalendar → EventCalendar}/index.js +0 -0
  346. /package/{publish/EventCalendarTimeline → EventCalendarTimeline}/index.css +0 -0
  347. /package/{publish/EventCalendarTimeline → EventCalendarTimeline}/index.d.ts +0 -0
  348. /package/{publish/EventCalendarTimeline → EventCalendarTimeline}/index.js +0 -0
  349. /package/{publish/File → File}/index.d.ts +0 -0
  350. /package/{publish/File → File}/index.js +0 -0
  351. /package/{publish/HorizontalScrollContent → HorizontalScrollContent}/index.css +0 -0
  352. /package/{publish/HorizontalScrollContent → HorizontalScrollContent}/index.d.ts +0 -0
  353. /package/{publish/HorizontalScrollContent → HorizontalScrollContent}/index.js +0 -0
  354. /package/{publish/Input → Input}/index.d.ts +0 -0
  355. /package/{publish/Input → Input}/index.js +0 -0
  356. /package/{publish/LiveSearch → LiveSearch}/index.css +0 -0
  357. /package/{publish/LiveSearch → LiveSearch}/index.d.ts +0 -0
  358. /package/{publish/LiveSearch → LiveSearch}/index.js +0 -0
  359. /package/{publish/MasonryLayout → MasonryLayout}/index.d.ts +0 -0
  360. /package/{publish/MasonryLayout → MasonryLayout}/index.js +0 -0
  361. /package/{publish/ModalDialog → ModalDialog}/index.d.ts +0 -0
  362. /package/{publish/ModalDialog → ModalDialog}/index.js +0 -0
  363. /package/{publish/ModeSwitch → ModeSwitch}/index.d.ts +0 -0
  364. /package/{publish/ModeSwitch → ModeSwitch}/index.js +0 -0
  365. /package/{publish/MultilevelDropdownMenu → MultilevelDropdownMenu}/index.css +0 -0
  366. /package/{publish/MultilevelDropdownMenu → MultilevelDropdownMenu}/index.d.ts +0 -0
  367. /package/{publish/MultilevelDropdownMenu → MultilevelDropdownMenu}/index.js +0 -0
  368. /package/{publish/MultipleCheckboxes → MultipleCheckboxes}/index.d.ts +0 -0
  369. /package/{publish/MultipleCheckboxes → MultipleCheckboxes}/index.js +0 -0
  370. /package/{publish/MultipleSelect → MultipleSelect}/index.css +0 -0
  371. /package/{publish/MultipleSelect → MultipleSelect}/index.d.ts +0 -0
  372. /package/{publish/MultipleSelect → MultipleSelect}/index.js +0 -0
  373. /package/{publish/NativeSelect → NativeSelect}/index.d.ts +0 -0
  374. /package/{publish/NativeSelect → NativeSelect}/index.js +0 -0
  375. /package/{publish/NumberInput → NumberInput}/index.d.ts +0 -0
  376. /package/{publish/NumberInput → NumberInput}/index.js +0 -0
  377. /package/{publish/Pagination → Pagination}/index.d.ts +0 -0
  378. /package/{publish/Pagination → Pagination}/index.js +0 -0
  379. /package/{publish/Radio → Radio}/index.d.ts +0 -0
  380. /package/{publish/Radio → Radio}/index.js +0 -0
  381. /package/{publish/RangeSlider → RangeSlider}/index.css +0 -0
  382. /package/{publish/RangeSlider → RangeSlider}/index.d.ts +0 -0
  383. /package/{publish/RangeSlider → RangeSlider}/index.js +0 -0
  384. /package/{publish/RootPortal → RootPortal}/index.d.ts +0 -0
  385. /package/{publish/RootPortal → RootPortal}/index.js +0 -0
  386. /package/{publish/ScrollReveal → ScrollReveal}/index.d.ts +0 -0
  387. /package/{publish/ScrollReveal → ScrollReveal}/index.js +0 -0
  388. /package/{publish/Scrollbar → Scrollbar}/index.css +0 -0
  389. /package/{publish/Scrollbar → Scrollbar}/index.d.ts +0 -0
  390. /package/{publish/Scrollbar → Scrollbar}/index.js +0 -0
  391. /package/{publish/SearchBar → SearchBar}/index.d.ts +0 -0
  392. /package/{publish/SearchBar → SearchBar}/index.js +0 -0
  393. /package/{publish/Select → Select}/index.css +0 -0
  394. /package/{publish/Select → Select}/index.d.ts +0 -0
  395. /package/{publish/Select → Select}/index.js +0 -0
  396. /package/{publish/ShowMoreLess → ShowMoreLess}/index.css +0 -0
  397. /package/{publish/ShowMoreLess → ShowMoreLess}/index.d.ts +0 -0
  398. /package/{publish/ShowMoreLess → ShowMoreLess}/index.js +0 -0
  399. /package/{publish/Switch → Switch}/index.d.ts +0 -0
  400. /package/{publish/Switch → Switch}/index.js +0 -0
  401. /package/{publish/Table → Table}/index.css +0 -0
  402. /package/{publish/Table → Table}/index.d.ts +0 -0
  403. /package/{publish/Table → Table}/index.js +0 -0
  404. /package/{publish/Tabs → Tabs}/index.d.ts +0 -0
  405. /package/{publish/Tabs → Tabs}/index.js +0 -0
  406. /package/{publish/TagInput → TagInput}/index.css +0 -0
  407. /package/{publish/TagInput → TagInput}/index.d.ts +0 -0
  408. /package/{publish/TagInput → TagInput}/index.js +0 -0
  409. /package/{publish/Textarea → Textarea}/index.d.ts +0 -0
  410. /package/{publish/Textarea → Textarea}/index.js +0 -0
  411. /package/{publish/Toast → Toast}/index.css +0 -0
  412. /package/{publish/Toast → Toast}/index.d.ts +0 -0
  413. /package/{publish/Toast → Toast}/index.js +0 -0
  414. /package/{publish/Tooltip → Tooltip}/index.css +0 -0
  415. /package/{publish/Tooltip → Tooltip}/index.d.ts +0 -0
  416. /package/{publish/Tooltip → Tooltip}/index.js +0 -0
  417. /package/{publish/Tree → Tree}/index.css +0 -0
  418. /package/{publish/Tree → Tree}/index.d.ts +0 -0
  419. /package/{publish/Tree → Tree}/index.js +0 -0
  420. /package/{publish/Utils → Utils}/anim.d.ts +0 -0
  421. /package/{publish/Utils → Utils}/anim.js +0 -0
  422. /package/{publish/Utils → Utils}/bodyScrollLock.d.ts +0 -0
  423. /package/{publish/Utils → Utils}/bodyScrollLock.js +0 -0
  424. /package/{publish/Utils → Utils}/buffer.d.ts +0 -0
  425. /package/{publish/Utils → Utils}/buffer.js +0 -0
  426. /package/{publish/Utils → Utils}/cls.d.ts +0 -0
  427. /package/{publish/Utils → Utils}/cls.js +0 -0
  428. /package/{publish/Utils → Utils}/convert.d.ts +0 -0
  429. /package/{publish/Utils → Utils}/convert.js +0 -0
  430. /package/{publish/Utils → Utils}/date.d.ts +0 -0
  431. /package/{publish/Utils → Utils}/date.js +0 -0
  432. /package/{publish/Utils → Utils}/dom.d.ts +0 -0
  433. /package/{publish/Utils → Utils}/dom.js +0 -0
  434. /package/{publish/Utils → Utils}/easing.d.ts +0 -0
  435. /package/{publish/Utils → Utils}/easing.js +0 -0
  436. /package/{publish/Utils → Utils}/extract.d.ts +0 -0
  437. /package/{publish/Utils → Utils}/extract.js +0 -0
  438. /package/{publish/Utils → Utils}/getElementProperty.d.ts +0 -0
  439. /package/{publish/Utils → Utils}/getElementProperty.js +0 -0
  440. /package/{publish/Utils → Utils}/guid.d.ts +0 -0
  441. /package/{publish/Utils → Utils}/guid.js +0 -0
  442. /package/{publish/Utils → Utils}/initDefaultOptions.d.ts +0 -0
  443. /package/{publish/Utils → Utils}/initDefaultOptions.js +0 -0
  444. /package/{publish/Utils → Utils}/inputsCalculation.d.ts +0 -0
  445. /package/{publish/Utils → Utils}/inputsCalculation.js +0 -0
  446. /package/{publish/Utils → Utils}/math.d.ts +0 -0
  447. /package/{publish/Utils → Utils}/math.js +0 -0
  448. /package/{publish/Utils → Utils}/object.d.ts +0 -0
  449. /package/{publish/Utils → Utils}/object.js +0 -0
  450. /package/{publish/Utils → Utils}/os.d.ts +0 -0
  451. /package/{publish/Utils → Utils}/os.js +0 -0
  452. /package/{publish/Utils → Utils}/performance.d.ts +0 -0
  453. /package/{publish/Utils → Utils}/performance.js +0 -0
  454. /package/{publish/Utils → Utils}/tree.d.ts +0 -0
  455. /package/{publish/Utils → Utils}/tree.js +0 -0
  456. /package/{publish/Utils → Utils}/useAutosizeTextArea.d.ts +0 -0
  457. /package/{publish/Utils → Utils}/useAutosizeTextArea.js +0 -0
  458. /package/{publish/Utils → Utils}/useBoundedDrag.d.ts +0 -0
  459. /package/{publish/Utils → Utils}/useBoundedDrag.js +0 -0
  460. /package/{publish/Utils → Utils}/useClickOutside.d.ts +0 -0
  461. /package/{publish/Utils → Utils}/useClickOutside.js +0 -0
  462. /package/{publish/Utils → Utils}/useComId.d.ts +0 -0
  463. /package/{publish/Utils → Utils}/useComId.js +0 -0
  464. /package/{publish/Utils → Utils}/useDebounce.d.ts +0 -0
  465. /package/{publish/Utils → Utils}/useDebounce.js +0 -0
  466. /package/{publish/Utils → Utils}/useDragDropPosition.d.ts +0 -0
  467. /package/{publish/Utils → Utils}/useDragDropPosition.js +0 -0
  468. /package/{publish/Utils → Utils}/useDraggable.d.ts +0 -0
  469. /package/{publish/Utils → Utils}/useDraggable.js +0 -0
  470. /package/{publish/Utils → Utils}/useInterval.d.ts +0 -0
  471. /package/{publish/Utils → Utils}/useInterval.js +0 -0
  472. /package/{publish/Utils → Utils}/useIsMobile.d.ts +0 -0
  473. /package/{publish/Utils → Utils}/useIsMobile.js +0 -0
  474. /package/{publish/Utils → Utils}/useKeyPress.d.ts +0 -0
  475. /package/{publish/Utils → Utils}/useKeyPress.js +0 -0
  476. /package/{publish/Utils → Utils}/useThrottle.d.ts +0 -0
  477. /package/{publish/Utils → Utils}/useThrottle.js +0 -0
  478. /package/{publish/Utils → Utils}/useWindowScroll.d.ts +0 -0
  479. /package/{publish/Utils → Utils}/useWindowScroll.js +0 -0
  480. /package/{publish/Utils → Utils}/viewport.d.ts +0 -0
  481. /package/{publish/Utils → Utils}/viewport.js +0 -0
  482. /package/{publish/all.d.ts → all.d.ts} +0 -0
  483. /package/{publish/all.js → all.js} +0 -0
@@ -1,3740 +0,0 @@
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
- /***/ 483:
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 _typeof2(obj) { "@babel/helpers - typeof"; return _typeof2 = "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; }, _typeof2(obj); }
19
- (function webpackUniversalModuleDefinition(root, factory) {
20
- if (( false ? 0 : _typeof2(exports)) === 'object' && ( false ? 0 : _typeof2(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
- var __webpack_modules__ = {
29
- /***/909: /***/function _(module, exports, __nested_webpack_require_1189__) {
30
- /* module decorator */module = __nested_webpack_require_1189__.nmd(module);
31
- var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
32
- function _typeof(obj) {
33
- "@babel/helpers - typeof";
34
-
35
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
36
- return typeof obj;
37
- } : function (obj) {
38
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
39
- }, _typeof(obj);
40
- }
41
- (function webpackUniversalModuleDefinition(root, factory) {
42
- if (( false ? 0 : _typeof(exports)) === 'object' && ( false ? 0 : _typeof(module)) === 'object') module.exports = factory(__nested_webpack_require_1189__(787), __nested_webpack_require_1189__(156));else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__nested_webpack_require_1189__(787), __nested_webpack_require_1189__(156)], __WEBPACK_AMD_DEFINE_FACTORY__ = factory, __WEBPACK_AMD_DEFINE_RESULT__ = typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
43
- })(this, function (__WEBPACK_EXTERNAL_MODULE__787__, __WEBPACK_EXTERNAL_MODULE__156__) {
44
- return (/******/function () {
45
- // webpackBootstrap
46
- /******/
47
- "use strict";
48
-
49
- /******/
50
- var __webpack_modules__ = {
51
- /***/787: /***/function _(module) {
52
- module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
53
-
54
- /***/
55
- },
56
-
57
- /***/156: /***/function _(module) {
58
- module.exports = __WEBPACK_EXTERNAL_MODULE__156__;
59
-
60
- /***/
61
- }
62
-
63
- /******/
64
- };
65
- /************************************************************************/
66
- /******/ // The module cache
67
- /******/
68
- var __webpack_module_cache__ = {};
69
- /******/
70
- /******/ // The require function
71
- /******/
72
- function __nested_webpack_require_1708__(moduleId) {
73
- /******/ // Check if module is in cache
74
- /******/var cachedModule = __webpack_module_cache__[moduleId];
75
- /******/
76
- if (cachedModule !== undefined) {
77
- /******/return cachedModule.exports;
78
- /******/
79
- }
80
- /******/ // Create a new module (and put it into the cache)
81
- /******/
82
- var module = __webpack_module_cache__[moduleId] = {
83
- /******/ // no module.id needed
84
- /******/ // no module.loaded needed
85
- /******/exports: {}
86
- /******/
87
- };
88
- /******/
89
- /******/ // Execute the module function
90
- /******/
91
- __webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_1708__);
92
- /******/
93
- /******/ // Return the exports of the module
94
- /******/
95
- return module.exports;
96
- /******/
97
- }
98
- /******/
99
- /************************************************************************/
100
- /******/ /* webpack/runtime/compat get default export */
101
- /******/
102
- (function () {
103
- /******/ // getDefaultExport function for compatibility with non-harmony modules
104
- /******/__nested_webpack_require_1708__.n = function (module) {
105
- /******/var getter = module && module.__esModule ? /******/function () {
106
- return module['default'];
107
- } : /******/function () {
108
- return module;
109
- };
110
- /******/
111
- __nested_webpack_require_1708__.d(getter, {
112
- a: getter
113
- });
114
- /******/
115
- return getter;
116
- /******/
117
- };
118
- /******/
119
- })();
120
- /******/
121
- /******/ /* webpack/runtime/define property getters */
122
- /******/
123
- (function () {
124
- /******/ // define getter functions for harmony exports
125
- /******/__nested_webpack_require_1708__.d = function (exports, definition) {
126
- /******/for (var key in definition) {
127
- /******/if (__nested_webpack_require_1708__.o(definition, key) && !__nested_webpack_require_1708__.o(exports, key)) {
128
- /******/Object.defineProperty(exports, key, {
129
- enumerable: true,
130
- get: definition[key]
131
- });
132
- /******/
133
- }
134
- /******/
135
- }
136
- /******/
137
- };
138
- /******/
139
- })();
140
- /******/
141
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
142
- /******/
143
- (function () {
144
- /******/__nested_webpack_require_1708__.o = function (obj, prop) {
145
- return Object.prototype.hasOwnProperty.call(obj, prop);
146
- };
147
- /******/
148
- })();
149
- /******/
150
- /******/ /* webpack/runtime/make namespace object */
151
- /******/
152
- (function () {
153
- /******/ // define __esModule on exports
154
- /******/__nested_webpack_require_1708__.r = function (exports) {
155
- /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
156
- /******/Object.defineProperty(exports, Symbol.toStringTag, {
157
- value: 'Module'
158
- });
159
- /******/
160
- }
161
- /******/
162
- Object.defineProperty(exports, '__esModule', {
163
- value: true
164
- });
165
- /******/
166
- };
167
- /******/
168
- })();
169
- /******/
170
- /************************************************************************/
171
- var __webpack_exports__ = {};
172
- // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
173
- (function () {
174
- __nested_webpack_require_1708__.r(__webpack_exports__);
175
- /* harmony export */
176
- __nested_webpack_require_1708__.d(__webpack_exports__, {
177
- /* harmony export */"default": function _default() {
178
- return __WEBPACK_DEFAULT_EXPORT__;
179
- }
180
- /* harmony export */
181
- });
182
- /* harmony import */
183
- var react__WEBPACK_IMPORTED_MODULE_0__ = __nested_webpack_require_1708__(787);
184
- /* harmony import */
185
- var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nested_webpack_require_1708__.n(react__WEBPACK_IMPORTED_MODULE_0__);
186
- /* harmony import */
187
- var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __nested_webpack_require_1708__(156);
188
- /* harmony import */
189
- var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__nested_webpack_require_1708__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);
190
- var RootPortal = function RootPortal(props) {
191
- var containerClassName = props.containerClassName,
192
- show = props.show,
193
- children = props.children;
194
- var containerRef = (0, react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
195
-
196
- // Move HTML templates to tag end body </body>
197
- // render() don't use "Fragment", in order to avoid error "Failed to execute 'insertBefore' on 'Node'"
198
- // prevent "transform", "filter", "perspective" attribute destruction fixed viewport orientation
199
- // ###
200
- // ###
201
- // Use `containerRef.current` to ensure the correctness of the nextjs framework. It may report an error document as undefined
202
-
203
- (0, react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
204
- containerRef.current = document.createElement('div');
205
- containerRef.current.className = "root-portal-container ".concat(containerClassName || '');
206
- document.body.appendChild(containerRef.current);
207
- return function () {
208
- if (containerRef.current) {
209
- containerRef.current.remove();
210
- }
211
- };
212
- }, []);
213
- 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));
214
- };
215
- /* harmony default export */
216
- var __WEBPACK_DEFAULT_EXPORT__ = RootPortal;
217
- })();
218
-
219
- /******/
220
- return __webpack_exports__;
221
- /******/
222
- }()
223
- );
224
- });
225
-
226
- /***/
227
- },
228
-
229
- /***/70: /***/function _(module, exports, __nested_webpack_require_11296__) {
230
- /* module decorator */module = __nested_webpack_require_11296__.nmd(module);
231
- var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
232
- function _typeof(obj) {
233
- "@babel/helpers - typeof";
234
-
235
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
236
- return typeof obj;
237
- } : function (obj) {
238
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
239
- }, _typeof(obj);
240
- }
241
- (function webpackUniversalModuleDefinition(root, factory) {
242
- 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, __WEBPACK_AMD_DEFINE_RESULT__ = typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
243
- })(this, function () {
244
- return (/******/function () {
245
- // webpackBootstrap
246
- /******/
247
- "use strict";
248
-
249
- /******/ // The require scope
250
- /******/
251
- var __nested_webpack_require_987__ = {};
252
- /******/
253
- /************************************************************************/
254
- /******/ /* webpack/runtime/define property getters */
255
- /******/
256
- (function () {
257
- /******/ // define getter functions for harmony exports
258
- /******/__nested_webpack_require_987__.d = function (exports, definition) {
259
- /******/for (var key in definition) {
260
- /******/if (__nested_webpack_require_987__.o(definition, key) && !__nested_webpack_require_987__.o(exports, key)) {
261
- /******/Object.defineProperty(exports, key, {
262
- enumerable: true,
263
- get: definition[key]
264
- });
265
- /******/
266
- }
267
- /******/
268
- }
269
- /******/
270
- };
271
- /******/
272
- })();
273
- /******/
274
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
275
- /******/
276
- (function () {
277
- /******/__nested_webpack_require_987__.o = function (obj, prop) {
278
- return Object.prototype.hasOwnProperty.call(obj, prop);
279
- };
280
- /******/
281
- })();
282
- /******/
283
- /******/ /* webpack/runtime/make namespace object */
284
- /******/
285
- (function () {
286
- /******/ // define __esModule on exports
287
- /******/__nested_webpack_require_987__.r = function (exports) {
288
- /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
289
- /******/Object.defineProperty(exports, Symbol.toStringTag, {
290
- value: 'Module'
291
- });
292
- /******/
293
- }
294
- /******/
295
- Object.defineProperty(exports, '__esModule', {
296
- value: true
297
- });
298
- /******/
299
- };
300
- /******/
301
- })();
302
- /******/
303
- /************************************************************************/
304
- var __webpack_exports__ = {};
305
- __nested_webpack_require_987__.r(__webpack_exports__);
306
- /* harmony export */
307
- __nested_webpack_require_987__.d(__webpack_exports__, {
308
- /* harmony export */"clearAllBodyScrollLocks": function clearAllBodyScrollLocks() {
309
- return (/* binding */_clearAllBodyScrollLocks
310
- );
311
- },
312
- /* harmony export */"disableBodyScroll": function disableBodyScroll() {
313
- return (/* binding */_disableBodyScroll
314
- );
315
- },
316
- /* harmony export */"enableBodyScroll": function enableBodyScroll() {
317
- return (/* binding */_enableBodyScroll
318
- );
319
- }
320
- /* harmony export */
321
- });
322
-
323
- function _toConsumableArray(arr) {
324
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
325
- }
326
- function _nonIterableSpread() {
327
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
328
- }
329
- function _unsupportedIterableToArray(o, minLen) {
330
- if (!o) return;
331
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
332
- var n = Object.prototype.toString.call(o).slice(8, -1);
333
- if (n === "Object" && o.constructor) n = o.constructor.name;
334
- if (n === "Map" || n === "Set") return Array.from(o);
335
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
336
- }
337
- function _iterableToArray(iter) {
338
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
339
- }
340
- function _arrayWithoutHoles(arr) {
341
- if (Array.isArray(arr)) return _arrayLikeToArray(arr);
342
- }
343
- function _arrayLikeToArray(arr, len) {
344
- if (len == null || len > arr.length) len = arr.length;
345
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
346
- return arr2;
347
- }
348
- // =================================================================
349
- // based on https://github.com/willmcpo/body-scroll-lock
350
- // =================================================================
351
-
352
- // @flow
353
- // Adopted and modified solution from Bohdan Didukh (2017)
354
- // https://stackoverflow.com/questions/41594997/ios-10-safari-prevent-scrolling-behind-a-fixed-overlay-and-maintain-scroll-posi
355
-
356
- // Older browsers don't support event options, feature detect it.
357
- var hasPassiveEvents = false;
358
- if (typeof window !== 'undefined') {
359
- var passiveTestOptions = {
360
- get passive() {
361
- hasPassiveEvents = true;
362
- return undefined;
363
- }
364
- };
365
- window.addEventListener('testPassive', null, passiveTestOptions);
366
- window.removeEventListener('testPassive', null, passiveTestOptions);
367
- }
368
- 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);
369
- var locks = [];
370
- var documentListenerAdded = false;
371
- var initialClientY = -1;
372
- var previousBodyOverflowSetting;
373
- var previousBodyPosition;
374
- var previousBodyPaddingRight;
375
-
376
- // returns true if `el` should be allowed to receive touchmove events.
377
- var allowTouchMove = function allowTouchMove(el) {
378
- return locks.some(function (lock) {
379
- if (lock.options.allowTouchMove && lock.options.allowTouchMove(el)) {
380
- return true;
381
- }
382
- return false;
383
- });
384
- };
385
- var preventDefault = function preventDefault(rawEvent) {
386
- var e = rawEvent || window.event;
387
-
388
- // For the case whereby consumers adds a touchmove event listener to document.
389
- // Recall that we do document.addEventListener('touchmove', preventDefault, { passive: false })
390
- // in disableBodyScroll - so if we provide this opportunity to allowTouchMove, then
391
- // the touchmove event on document will break.
392
- if (allowTouchMove(e.target)) {
393
- return true;
394
- }
395
-
396
- // Do not prevent if the event has more than one touch (usually meaning this is a multi touch gesture like pinch to zoom).
397
- if (e.touches.length > 1) return true;
398
- if (e.preventDefault) e.preventDefault();
399
- return false;
400
- };
401
- var setOverflowHidden = function setOverflowHidden(options) {
402
- // If previousBodyPaddingRight is already set, don't set it again.
403
- if (previousBodyPaddingRight === undefined) {
404
- var reserveScrollBarGap = !!options && options.reserveScrollBarGap === true;
405
- var scrollBarGap = window.innerWidth - document.documentElement.clientWidth;
406
- if (reserveScrollBarGap && scrollBarGap > 0) {
407
- var computedBodyPaddingRight = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right'), 10);
408
- previousBodyPaddingRight = document.body.style.paddingRight;
409
- document.body.style.paddingRight = "".concat(computedBodyPaddingRight + scrollBarGap, "px");
410
- }
411
- }
412
-
413
- // If previousBodyOverflowSetting is already set, don't set it again.
414
- if (previousBodyOverflowSetting === undefined) {
415
- previousBodyOverflowSetting = document.body.style.overflow;
416
- document.body.style.overflow = 'hidden';
417
- }
418
- };
419
- var restoreOverflowSetting = function restoreOverflowSetting() {
420
- if (previousBodyPaddingRight !== undefined) {
421
- document.body.style.paddingRight = previousBodyPaddingRight;
422
-
423
- // Restore previousBodyPaddingRight to undefined so setOverflowHidden knows it
424
- // can be set again.
425
- previousBodyPaddingRight = undefined;
426
- }
427
- if (previousBodyOverflowSetting !== undefined) {
428
- document.body.style.overflow = previousBodyOverflowSetting;
429
-
430
- // Restore previousBodyOverflowSetting to undefined
431
- // so setOverflowHidden knows it can be set again.
432
- previousBodyOverflowSetting = undefined;
433
- }
434
- };
435
- var setPositionFixed = function setPositionFixed() {
436
- return window.requestAnimationFrame(function () {
437
- // If previousBodyPosition is already set, don't set it again.
438
- if (previousBodyPosition === undefined) {
439
- previousBodyPosition = {
440
- position: document.body.style.position,
441
- top: document.body.style.top,
442
- left: document.body.style.left
443
- };
444
-
445
- // Update the dom inside an animation frame
446
- var _window = window,
447
- scrollY = _window.scrollY,
448
- scrollX = _window.scrollX,
449
- innerHeight = _window.innerHeight;
450
- document.body.style.position = 'fixed';
451
- document.body.style.top = "".concat(-scrollY, "px");
452
- document.body.style.left = "".concat(-scrollX, "px");
453
- setTimeout(function () {
454
- return window.requestAnimationFrame(function () {
455
- // Attempt to check if the bottom bar appeared due to the position change
456
- var bottomBarHeight = innerHeight - window.innerHeight;
457
- if (bottomBarHeight && scrollY >= innerHeight) {
458
- // Move the content further up so that the bottom bar doesn't hide it
459
- document.body.style.top = "".concat(-(scrollY + bottomBarHeight));
460
- }
461
- });
462
- }, 300);
463
- }
464
- });
465
- };
466
- var restorePositionSetting = function restorePositionSetting() {
467
- if (previousBodyPosition !== undefined) {
468
- // Convert the position from "px" to Int
469
- var y = -parseInt(document.body.style.top, 10);
470
- var x = -parseInt(document.body.style.left, 10);
471
-
472
- // Restore styles
473
- document.body.style.position = previousBodyPosition.position;
474
- document.body.style.top = previousBodyPosition.top;
475
- document.body.style.left = previousBodyPosition.left;
476
-
477
- // Restore scroll
478
- window.scrollTo(x, y);
479
- previousBodyPosition = undefined;
480
- }
481
- };
482
-
483
- // https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollHeight#Problems_and_solutions
484
- var isTargetElementTotallyScrolled = function isTargetElementTotallyScrolled(targetElement) {
485
- return targetElement ? targetElement.scrollHeight - targetElement.scrollTop <= targetElement.clientHeight : false;
486
- };
487
- var handleScroll = function handleScroll(event, targetElement) {
488
- var clientY = event.targetTouches[0].clientY - initialClientY;
489
- if (allowTouchMove(event.target)) {
490
- return false;
491
- }
492
- if (targetElement && targetElement.scrollTop === 0 && clientY > 0) {
493
- // element is at the top of its scroll.
494
- return preventDefault(event);
495
- }
496
- if (isTargetElementTotallyScrolled(targetElement) && clientY < 0) {
497
- // element is at the bottom of its scroll.
498
- return preventDefault(event);
499
- }
500
- event.stopPropagation();
501
- return true;
502
- };
503
- var _disableBodyScroll = function disableBodyScroll(targetElement, options) {
504
- // targetElement must be provided
505
- if (!targetElement) {
506
- // eslint-disable-next-line no-console
507
- console.error('disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.');
508
- return;
509
- }
510
-
511
- // disableBodyScroll must not have been called on this targetElement before
512
- if (locks.some(function (lock) {
513
- return lock.targetElement === targetElement;
514
- })) {
515
- return;
516
- }
517
- var lock = {
518
- targetElement: targetElement,
519
- options: options || {}
520
- };
521
- locks = [].concat(_toConsumableArray(locks), [lock]);
522
- if (isIosDevice) {
523
- setPositionFixed();
524
- } else {
525
- setOverflowHidden(options);
526
- }
527
- if (isIosDevice) {
528
- targetElement.ontouchstart = function (event) {
529
- if (event.targetTouches.length === 1) {
530
- // detect single touch.
531
- initialClientY = event.targetTouches[0].clientY;
532
- }
533
- };
534
- targetElement.ontouchmove = function (event) {
535
- if (event.targetTouches.length === 1) {
536
- // detect single touch.
537
- handleScroll(event, targetElement);
538
- }
539
- };
540
- if (!documentListenerAdded) {
541
- document.addEventListener('touchmove', preventDefault, hasPassiveEvents ? {
542
- passive: false
543
- } : undefined);
544
- documentListenerAdded = true;
545
- }
546
- }
547
- };
548
- var _clearAllBodyScrollLocks = function clearAllBodyScrollLocks() {
549
- if (isIosDevice) {
550
- // Clear all locks ontouchstart/ontouchmove handlers, and the references.
551
- locks.forEach(function (lock) {
552
- lock.targetElement.ontouchstart = null;
553
- lock.targetElement.ontouchmove = null;
554
- });
555
- if (documentListenerAdded) {
556
- document.removeEventListener('touchmove', preventDefault, hasPassiveEvents ? {
557
- passive: false
558
- } : undefined);
559
- documentListenerAdded = false;
560
- }
561
-
562
- // Reset initial clientY.
563
- initialClientY = -1;
564
- }
565
- if (isIosDevice) {
566
- restorePositionSetting();
567
- } else {
568
- restoreOverflowSetting();
569
- }
570
- locks = [];
571
- };
572
- var _enableBodyScroll = function enableBodyScroll(targetElement) {
573
- if (!targetElement) {
574
- // eslint-disable-next-line no-console
575
- console.error('enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.');
576
- return;
577
- }
578
- locks = locks.filter(function (lock) {
579
- return lock.targetElement !== targetElement;
580
- });
581
- if (isIosDevice) {
582
- targetElement.ontouchstart = null;
583
- targetElement.ontouchmove = null;
584
- if (documentListenerAdded && locks.length === 0) {
585
- document.removeEventListener('touchmove', preventDefault, hasPassiveEvents ? {
586
- passive: false
587
- } : undefined);
588
- documentListenerAdded = false;
589
- }
590
- }
591
- if (isIosDevice) {
592
- restorePositionSetting();
593
- } else {
594
- restoreOverflowSetting();
595
- }
596
- };
597
- /******/
598
- return __webpack_exports__;
599
- /******/
600
- }()
601
- );
602
- });
603
-
604
- /***/
605
- },
606
-
607
- /***/85: /***/function _(module, exports, __nested_webpack_require_30872__) {
608
- /* module decorator */module = __nested_webpack_require_30872__.nmd(module);
609
- var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
610
- function _typeof(obj) {
611
- "@babel/helpers - typeof";
612
-
613
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
614
- return typeof obj;
615
- } : function (obj) {
616
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
617
- }, _typeof(obj);
618
- }
619
- (function webpackUniversalModuleDefinition(root, factory) {
620
- if (( false ? 0 : _typeof(exports)) === 'object' && ( false ? 0 : _typeof(module)) === 'object') module.exports = factory(__nested_webpack_require_30872__(787));else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__nested_webpack_require_30872__(787)], __WEBPACK_AMD_DEFINE_FACTORY__ = factory, __WEBPACK_AMD_DEFINE_RESULT__ = typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
621
- })(this, function (__WEBPACK_EXTERNAL_MODULE__787__) {
622
- return (/******/function () {
623
- // webpackBootstrap
624
- /******/
625
- "use strict";
626
-
627
- /******/
628
- var __webpack_modules__ = {
629
- /***/787: /***/function _(module) {
630
- module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
631
-
632
- /***/
633
- }
634
-
635
- /******/
636
- };
637
- /************************************************************************/
638
- /******/ // The module cache
639
- /******/
640
- var __webpack_module_cache__ = {};
641
- /******/
642
- /******/ // The require function
643
- /******/
644
- function __nested_webpack_require_1465__(moduleId) {
645
- /******/ // Check if module is in cache
646
- /******/var cachedModule = __webpack_module_cache__[moduleId];
647
- /******/
648
- if (cachedModule !== undefined) {
649
- /******/return cachedModule.exports;
650
- /******/
651
- }
652
- /******/ // Create a new module (and put it into the cache)
653
- /******/
654
- var module = __webpack_module_cache__[moduleId] = {
655
- /******/ // no module.id needed
656
- /******/ // no module.loaded needed
657
- /******/exports: {}
658
- /******/
659
- };
660
- /******/
661
- /******/ // Execute the module function
662
- /******/
663
- __webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_1465__);
664
- /******/
665
- /******/ // Return the exports of the module
666
- /******/
667
- return module.exports;
668
- /******/
669
- }
670
- /******/
671
- /************************************************************************/
672
- /******/ /* webpack/runtime/compat get default export */
673
- /******/
674
- (function () {
675
- /******/ // getDefaultExport function for compatibility with non-harmony modules
676
- /******/__nested_webpack_require_1465__.n = function (module) {
677
- /******/var getter = module && module.__esModule ? /******/function () {
678
- return module['default'];
679
- } : /******/function () {
680
- return module;
681
- };
682
- /******/
683
- __nested_webpack_require_1465__.d(getter, {
684
- a: getter
685
- });
686
- /******/
687
- return getter;
688
- /******/
689
- };
690
- /******/
691
- })();
692
- /******/
693
- /******/ /* webpack/runtime/define property getters */
694
- /******/
695
- (function () {
696
- /******/ // define getter functions for harmony exports
697
- /******/__nested_webpack_require_1465__.d = function (exports, definition) {
698
- /******/for (var key in definition) {
699
- /******/if (__nested_webpack_require_1465__.o(definition, key) && !__nested_webpack_require_1465__.o(exports, key)) {
700
- /******/Object.defineProperty(exports, key, {
701
- enumerable: true,
702
- get: definition[key]
703
- });
704
- /******/
705
- }
706
- /******/
707
- }
708
- /******/
709
- };
710
- /******/
711
- })();
712
- /******/
713
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
714
- /******/
715
- (function () {
716
- /******/__nested_webpack_require_1465__.o = function (obj, prop) {
717
- return Object.prototype.hasOwnProperty.call(obj, prop);
718
- };
719
- /******/
720
- })();
721
- /******/
722
- /******/ /* webpack/runtime/make namespace object */
723
- /******/
724
- (function () {
725
- /******/ // define __esModule on exports
726
- /******/__nested_webpack_require_1465__.r = function (exports) {
727
- /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
728
- /******/Object.defineProperty(exports, Symbol.toStringTag, {
729
- value: 'Module'
730
- });
731
- /******/
732
- }
733
- /******/
734
- Object.defineProperty(exports, '__esModule', {
735
- value: true
736
- });
737
- /******/
738
- };
739
- /******/
740
- })();
741
- /******/
742
- /************************************************************************/
743
- var __webpack_exports__ = {};
744
- // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
745
- (function () {
746
- __nested_webpack_require_1465__.r(__webpack_exports__);
747
- /* harmony export */
748
- __nested_webpack_require_1465__.d(__webpack_exports__, {
749
- /* harmony export */"default": function _default() {
750
- return __WEBPACK_DEFAULT_EXPORT__;
751
- }
752
- /* harmony export */
753
- });
754
- /* harmony import */
755
- var react__WEBPACK_IMPORTED_MODULE_0__ = __nested_webpack_require_1465__(787);
756
- /* harmony import */
757
- var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nested_webpack_require_1465__.n(react__WEBPACK_IMPORTED_MODULE_0__);
758
- /**
759
- * Create an available ID
760
- *
761
- */
762
-
763
- var useComId = function useComId() {
764
- return "ID-".concat((0, react__WEBPACK_IMPORTED_MODULE_0__.useId)().replace(/\:/g, "-"));
765
- };
766
- /* harmony default export */
767
- var __WEBPACK_DEFAULT_EXPORT__ = useComId;
768
- })();
769
-
770
- /******/
771
- return __webpack_exports__;
772
- /******/
773
- }()
774
- );
775
- });
776
-
777
- /***/
778
- },
779
-
780
- /***/771: /***/function _(module, exports, __nested_webpack_require_38960__) {
781
- /* module decorator */module = __nested_webpack_require_38960__.nmd(module);
782
- var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
783
- function _typeof(obj) {
784
- "@babel/helpers - typeof";
785
-
786
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
787
- return typeof obj;
788
- } : function (obj) {
789
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
790
- }, _typeof(obj);
791
- }
792
- (function webpackUniversalModuleDefinition(root, factory) {
793
- if (( false ? 0 : _typeof(exports)) === 'object' && ( false ? 0 : _typeof(module)) === 'object') module.exports = factory(__nested_webpack_require_38960__(787));else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__nested_webpack_require_38960__(787)], __WEBPACK_AMD_DEFINE_FACTORY__ = factory, __WEBPACK_AMD_DEFINE_RESULT__ = typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
794
- })(this, function (__WEBPACK_EXTERNAL_MODULE__787__) {
795
- return (/******/function () {
796
- // webpackBootstrap
797
- /******/
798
- "use strict";
799
-
800
- /******/
801
- var __webpack_modules__ = {
802
- /***/787: /***/function _(module) {
803
- module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
804
-
805
- /***/
806
- }
807
-
808
- /******/
809
- };
810
- /************************************************************************/
811
- /******/ // The module cache
812
- /******/
813
- var __webpack_module_cache__ = {};
814
- /******/
815
- /******/ // The require function
816
- /******/
817
- function __nested_webpack_require_1465__(moduleId) {
818
- /******/ // Check if module is in cache
819
- /******/var cachedModule = __webpack_module_cache__[moduleId];
820
- /******/
821
- if (cachedModule !== undefined) {
822
- /******/return cachedModule.exports;
823
- /******/
824
- }
825
- /******/ // Create a new module (and put it into the cache)
826
- /******/
827
- var module = __webpack_module_cache__[moduleId] = {
828
- /******/ // no module.id needed
829
- /******/ // no module.loaded needed
830
- /******/exports: {}
831
- /******/
832
- };
833
- /******/
834
- /******/ // Execute the module function
835
- /******/
836
- __webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_1465__);
837
- /******/
838
- /******/ // Return the exports of the module
839
- /******/
840
- return module.exports;
841
- /******/
842
- }
843
- /******/
844
- /************************************************************************/
845
- /******/ /* webpack/runtime/compat get default export */
846
- /******/
847
- (function () {
848
- /******/ // getDefaultExport function for compatibility with non-harmony modules
849
- /******/__nested_webpack_require_1465__.n = function (module) {
850
- /******/var getter = module && module.__esModule ? /******/function () {
851
- return module['default'];
852
- } : /******/function () {
853
- return module;
854
- };
855
- /******/
856
- __nested_webpack_require_1465__.d(getter, {
857
- a: getter
858
- });
859
- /******/
860
- return getter;
861
- /******/
862
- };
863
- /******/
864
- })();
865
- /******/
866
- /******/ /* webpack/runtime/define property getters */
867
- /******/
868
- (function () {
869
- /******/ // define getter functions for harmony exports
870
- /******/__nested_webpack_require_1465__.d = function (exports, definition) {
871
- /******/for (var key in definition) {
872
- /******/if (__nested_webpack_require_1465__.o(definition, key) && !__nested_webpack_require_1465__.o(exports, key)) {
873
- /******/Object.defineProperty(exports, key, {
874
- enumerable: true,
875
- get: definition[key]
876
- });
877
- /******/
878
- }
879
- /******/
880
- }
881
- /******/
882
- };
883
- /******/
884
- })();
885
- /******/
886
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
887
- /******/
888
- (function () {
889
- /******/__nested_webpack_require_1465__.o = function (obj, prop) {
890
- return Object.prototype.hasOwnProperty.call(obj, prop);
891
- };
892
- /******/
893
- })();
894
- /******/
895
- /******/ /* webpack/runtime/make namespace object */
896
- /******/
897
- (function () {
898
- /******/ // define __esModule on exports
899
- /******/__nested_webpack_require_1465__.r = function (exports) {
900
- /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
901
- /******/Object.defineProperty(exports, Symbol.toStringTag, {
902
- value: 'Module'
903
- });
904
- /******/
905
- }
906
- /******/
907
- Object.defineProperty(exports, '__esModule', {
908
- value: true
909
- });
910
- /******/
911
- };
912
- /******/
913
- })();
914
- /******/
915
- /************************************************************************/
916
- var __webpack_exports__ = {};
917
- // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
918
- (function () {
919
- __nested_webpack_require_1465__.r(__webpack_exports__);
920
- /* harmony export */
921
- __nested_webpack_require_1465__.d(__webpack_exports__, {
922
- /* harmony export */"default": function _default() {
923
- return __WEBPACK_DEFAULT_EXPORT__;
924
- }
925
- /* harmony export */
926
- });
927
- /* harmony import */
928
- var react__WEBPACK_IMPORTED_MODULE_0__ = __nested_webpack_require_1465__(787);
929
- /* harmony import */
930
- var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nested_webpack_require_1465__.n(react__WEBPACK_IMPORTED_MODULE_0__);
931
- function _slicedToArray(arr, i) {
932
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
933
- }
934
- function _nonIterableRest() {
935
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
936
- }
937
- function _unsupportedIterableToArray(o, minLen) {
938
- if (!o) return;
939
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
940
- var n = Object.prototype.toString.call(o).slice(8, -1);
941
- if (n === "Object" && o.constructor) n = o.constructor.name;
942
- if (n === "Map" || n === "Set") return Array.from(o);
943
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
944
- }
945
- function _arrayLikeToArray(arr, len) {
946
- if (len == null || len > arr.length) len = arr.length;
947
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
948
- return arr2;
949
- }
950
- function _iterableToArrayLimit(arr, i) {
951
- var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
952
- if (null != _i) {
953
- var _s,
954
- _e,
955
- _x,
956
- _r,
957
- _arr = [],
958
- _n = !0,
959
- _d = !1;
960
- try {
961
- if (_x = (_i = _i.call(arr)).next, 0 === i) {
962
- if (Object(_i) !== _i) return;
963
- _n = !1;
964
- } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
965
- } catch (err) {
966
- _d = !0, _e = err;
967
- } finally {
968
- try {
969
- if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
970
- } finally {
971
- if (_d) throw _e;
972
- }
973
- }
974
- return _arr;
975
- }
976
- }
977
- function _arrayWithHoles(arr) {
978
- if (Array.isArray(arr)) return arr;
979
- }
980
- /**
981
- * Drag & Drop Element
982
- *
983
- * @usage:
984
-
985
-
986
- const App = () => {
987
- const {
988
- dragContentHandle,
989
- dragHandle,
990
- resetPosition
991
- }: any = useDraggable({
992
- enabled: true, // if `false`, drag and drop is disabled
993
- preventOutsideScreen: {
994
- xAxis: true,
995
- yAxis: true
996
- },
997
- onStart: (coordinates: Record<string, number>, handleEl: HTMLElement | null, contentEl: HTMLElement | null) => {
998
-
999
- },
1000
- onDrag: (coordinates: Record<string, number>, handleEl: HTMLElement | null, contentEl: HTMLElement | null) => {
1001
- console.log(coordinates); // {dx: -164, dy: -37}
1002
-
1003
- },
1004
- onStop: (coordinates: Record<string, number>, handleEl: HTMLElement | null, contentEl: HTMLElement | null) => {
1005
-
1006
- }
1007
- });
1008
-
1009
- const resetModal = () => {
1010
- resetPosition?.();
1011
- };
1012
-
1013
- return (
1014
- <div className="container" ref={dragContentHandle}>
1015
- <div ref={dragHandle} className="handle">Drag me</div>
1016
- <div className="content">
1017
- content...
1018
- </div>
1019
- </div>
1020
- );
1021
- };
1022
-
1023
-
1024
- */
1025
-
1026
- var useDraggable = function useDraggable(_ref) {
1027
- var enabled = _ref.enabled,
1028
- preventOutsideScreen = _ref.preventOutsideScreen,
1029
- onStart = _ref.onStart,
1030
- onStop = _ref.onStop,
1031
- onDrag = _ref.onDrag;
1032
- var DRAG_DISABLED = typeof enabled === "undefined" || enabled === false;
1033
- var dragging = false; // DO NOT USE 'useState()'
1034
- var _useState = (0, react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
1035
- _useState2 = _slicedToArray(_useState, 2),
1036
- node = _useState2[0],
1037
- setNode = _useState2[1];
1038
- var _useState3 = (0, react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
1039
- _useState4 = _slicedToArray(_useState3, 2),
1040
- targetNode = _useState4[0],
1041
- setTargetNode = _useState4[1];
1042
- var _useState5 = (0, react__WEBPACK_IMPORTED_MODULE_0__.useState)({
1043
- dx: 0,
1044
- dy: 0
1045
- }),
1046
- _useState6 = _slicedToArray(_useState5, 2),
1047
- _useState6$ = _useState6[0],
1048
- dx = _useState6$.dx,
1049
- dy = _useState6$.dy,
1050
- setOffset = _useState6[1];
1051
- var ref = (0, react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (nodeEle) {
1052
- setNode(nodeEle);
1053
- }, []);
1054
- var targetRef = (0, react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (nodeEle) {
1055
- setTargetNode(nodeEle);
1056
- }, []);
1057
- var withoutViewport = function withoutViewport(startPos, e, targetEl) {
1058
- if (!targetEl || typeof preventOutsideScreen === 'undefined') return null;
1059
-
1060
- // latest mouse coordinates
1061
- var mouseX = e.clientX;
1062
- var mouseY = e.clientY;
1063
-
1064
- // the size of the parent element
1065
- var parentWidth = window.innerWidth;
1066
- var parentHeight = window.innerHeight;
1067
-
1068
- // the size of the child element
1069
- var childrenWidth = targetEl.clientWidth;
1070
- var childrenHight = targetEl.clientHeight;
1071
- var minLeft = -(parentWidth - childrenWidth) / 2;
1072
- var maxLeft = (parentWidth - childrenWidth) / 2;
1073
- var minTop = -(parentHeight - childrenHight) / 2;
1074
- var maxTop = (parentHeight - childrenHight) / 2;
1075
-
1076
- // calculates the left and top offsets after the move
1077
- var nLeft = mouseX - startPos.x;
1078
- var nTop = mouseY - startPos.y;
1079
-
1080
- // Determine whether the left or right distance is out of bounds
1081
- if (preventOutsideScreen.xAxis) {
1082
- nLeft = nLeft <= minLeft ? minLeft : nLeft;
1083
- nLeft = nLeft >= maxLeft ? maxLeft : nLeft;
1084
- }
1085
- if (preventOutsideScreen.yAxis) {
1086
- nTop = nTop <= minTop ? minTop : nTop;
1087
- nTop = nTop >= maxTop ? maxTop : nTop;
1088
- }
1089
- return [nLeft, nTop];
1090
- };
1091
- var handleMouseDown = (0, react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (e) {
1092
- dragging = true;
1093
- onStart === null || onStart === void 0 ? void 0 : onStart({
1094
- dx: dx,
1095
- dy: dy
1096
- }, targetNode, node);
1097
- var startPos = {
1098
- x: e.clientX - dx,
1099
- y: e.clientY - dy
1100
- };
1101
- var handleMouseMove = function handleMouseMove(e) {
1102
- if (!dragging) return;
1103
- var dx = e.clientX - startPos.x;
1104
- var dy = e.clientY - startPos.y;
1105
-
1106
- // prevent dragged item to be dragged outside of screen
1107
- if (preventOutsideScreen && node) {
1108
- var _data = withoutViewport(startPos, e, node);
1109
- if (_data !== null) {
1110
- dx = _data[0];
1111
- dy = _data[1];
1112
- }
1113
- }
1114
- setOffset({
1115
- dx: dx,
1116
- dy: dy
1117
- });
1118
- onDrag === null || onDrag === void 0 ? void 0 : onDrag({
1119
- dx: dx,
1120
- dy: dy
1121
- }, targetNode, node);
1122
- e.stopPropagation();
1123
- e.preventDefault();
1124
- };
1125
- var handleMouseUp = function handleMouseUp() {
1126
- dragging = false;
1127
- onStop === null || onStop === void 0 ? void 0 : onStop({
1128
- dx: dx,
1129
- dy: dy
1130
- }, targetNode, node);
1131
- document.removeEventListener('mousemove', handleMouseMove);
1132
- document.removeEventListener('mouseup', handleMouseUp);
1133
- };
1134
- document.addEventListener('mousemove', handleMouseMove);
1135
- document.addEventListener('mouseup', handleMouseUp);
1136
- }, [dx, dy, node]);
1137
- var handleTouchStart = (0, react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (e) {
1138
- dragging = true;
1139
- onStart === null || onStart === void 0 ? void 0 : onStart({
1140
- dx: dx,
1141
- dy: dy
1142
- }, targetNode, node);
1143
- var touch = e.touches[0];
1144
- var startPos = {
1145
- x: touch.clientX - dx,
1146
- y: touch.clientY - dy
1147
- };
1148
- var handleTouchMove = function handleTouchMove(e) {
1149
- if (!dragging) return;
1150
- var touch = e.touches[0];
1151
- var dx = touch.clientX - startPos.x;
1152
- var dy = touch.clientY - startPos.y;
1153
-
1154
- // prevent dragged item to be dragged outside of screen
1155
- if (preventOutsideScreen && node) {
1156
- var _data = withoutViewport(startPos, touch, node);
1157
- if (_data !== null) {
1158
- dx = _data[0];
1159
- dy = _data[1];
1160
- }
1161
- }
1162
- setOffset({
1163
- dx: dx,
1164
- dy: dy
1165
- });
1166
- onDrag === null || onDrag === void 0 ? void 0 : onDrag({
1167
- dx: dx,
1168
- dy: dy
1169
- }, targetNode, node);
1170
- e.stopPropagation();
1171
- e.preventDefault();
1172
- };
1173
- var handleTouchEnd = function handleTouchEnd() {
1174
- dragging = false;
1175
- onStop === null || onStop === void 0 ? void 0 : onStop({
1176
- dx: dx,
1177
- dy: dy
1178
- }, targetNode, node);
1179
- document.removeEventListener('touchmove', handleTouchMove);
1180
- document.removeEventListener('touchend', handleTouchEnd);
1181
- };
1182
- document.addEventListener('touchmove', handleTouchMove);
1183
- document.addEventListener('touchend', handleTouchEnd);
1184
- }, [dx, dy, node]);
1185
- (0, react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
1186
- if (node) {
1187
- node.style.transform = "translate3d(".concat(dx, "px, ").concat(dy, "px, 0)");
1188
- }
1189
- }, [node, dx, dy]);
1190
- (0, react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
1191
- if (DRAG_DISABLED) {
1192
- return;
1193
- }
1194
- if (!targetNode) {
1195
- return;
1196
- }
1197
- targetNode.addEventListener("mousedown", handleMouseDown);
1198
- targetNode.addEventListener("touchstart", handleTouchStart);
1199
- return function () {
1200
- targetNode.removeEventListener("mousedown", handleMouseDown);
1201
- targetNode.removeEventListener("touchstart", handleTouchStart);
1202
- };
1203
- }, [targetNode, dx, dy]);
1204
- return {
1205
- dragContentHandle: ref,
1206
- dragHandle: targetRef,
1207
- resetPosition: function resetPosition() {
1208
- // reset position
1209
- setOffset({
1210
- dx: 0,
1211
- dy: 0
1212
- });
1213
- }
1214
- };
1215
- };
1216
- /* harmony default export */
1217
- var __WEBPACK_DEFAULT_EXPORT__ = useDraggable;
1218
- })();
1219
-
1220
- /******/
1221
- return __webpack_exports__;
1222
- /******/
1223
- }()
1224
- );
1225
- });
1226
-
1227
- /***/
1228
- },
1229
-
1230
- /***/787: /***/function _(module) {
1231
- "use strict";
1232
-
1233
- module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
1234
-
1235
- /***/
1236
- },
1237
-
1238
- /***/156: /***/function _(module) {
1239
- "use strict";
1240
-
1241
- module.exports = __WEBPACK_EXTERNAL_MODULE__156__;
1242
-
1243
- /***/
1244
- }
1245
-
1246
- /******/
1247
- };
1248
- /************************************************************************/
1249
- /******/ // The module cache
1250
- /******/
1251
- var __webpack_module_cache__ = {};
1252
- /******/
1253
- /******/ // The require function
1254
- /******/
1255
- function __nested_webpack_require_61476__(moduleId) {
1256
- /******/ // Check if module is in cache
1257
- /******/var cachedModule = __webpack_module_cache__[moduleId];
1258
- /******/
1259
- if (cachedModule !== undefined) {
1260
- /******/return cachedModule.exports;
1261
- /******/
1262
- }
1263
- /******/ // Create a new module (and put it into the cache)
1264
- /******/
1265
- var module = __webpack_module_cache__[moduleId] = {
1266
- /******/id: moduleId,
1267
- /******/loaded: false,
1268
- /******/exports: {}
1269
- /******/
1270
- };
1271
- /******/
1272
- /******/ // Execute the module function
1273
- /******/
1274
- __webpack_modules__[moduleId].call(module.exports, module, module.exports, __nested_webpack_require_61476__);
1275
- /******/
1276
- /******/ // Flag the module as loaded
1277
- /******/
1278
- module.loaded = true;
1279
- /******/
1280
- /******/ // Return the exports of the module
1281
- /******/
1282
- return module.exports;
1283
- /******/
1284
- }
1285
- /******/
1286
- /************************************************************************/
1287
- /******/ /* webpack/runtime/compat get default export */
1288
- /******/
1289
- (function () {
1290
- /******/ // getDefaultExport function for compatibility with non-harmony modules
1291
- /******/__nested_webpack_require_61476__.n = function (module) {
1292
- /******/var getter = module && module.__esModule ? /******/function () {
1293
- return module['default'];
1294
- } : /******/function () {
1295
- return module;
1296
- };
1297
- /******/
1298
- __nested_webpack_require_61476__.d(getter, {
1299
- a: getter
1300
- });
1301
- /******/
1302
- return getter;
1303
- /******/
1304
- };
1305
- /******/
1306
- })();
1307
- /******/
1308
- /******/ /* webpack/runtime/define property getters */
1309
- /******/
1310
- (function () {
1311
- /******/ // define getter functions for harmony exports
1312
- /******/__nested_webpack_require_61476__.d = function (exports, definition) {
1313
- /******/for (var key in definition) {
1314
- /******/if (__nested_webpack_require_61476__.o(definition, key) && !__nested_webpack_require_61476__.o(exports, key)) {
1315
- /******/Object.defineProperty(exports, key, {
1316
- enumerable: true,
1317
- get: definition[key]
1318
- });
1319
- /******/
1320
- }
1321
- /******/
1322
- }
1323
- /******/
1324
- };
1325
- /******/
1326
- })();
1327
- /******/
1328
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
1329
- /******/
1330
- (function () {
1331
- /******/__nested_webpack_require_61476__.o = function (obj, prop) {
1332
- return Object.prototype.hasOwnProperty.call(obj, prop);
1333
- };
1334
- /******/
1335
- })();
1336
- /******/
1337
- /******/ /* webpack/runtime/make namespace object */
1338
- /******/
1339
- (function () {
1340
- /******/ // define __esModule on exports
1341
- /******/__nested_webpack_require_61476__.r = function (exports) {
1342
- /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
1343
- /******/Object.defineProperty(exports, Symbol.toStringTag, {
1344
- value: 'Module'
1345
- });
1346
- /******/
1347
- }
1348
- /******/
1349
- Object.defineProperty(exports, '__esModule', {
1350
- value: true
1351
- });
1352
- /******/
1353
- };
1354
- /******/
1355
- })();
1356
- /******/
1357
- /******/ /* webpack/runtime/node module decorator */
1358
- /******/
1359
- (function () {
1360
- /******/__nested_webpack_require_61476__.nmd = function (module) {
1361
- /******/module.paths = [];
1362
- /******/
1363
- if (!module.children) module.children = [];
1364
- /******/
1365
- return module;
1366
- /******/
1367
- };
1368
- /******/
1369
- })();
1370
- /******/
1371
- /************************************************************************/
1372
- var __webpack_exports__ = {};
1373
- // This entry need to be wrapped in an IIFE because it need to be in strict mode.
1374
- (function () {
1375
- "use strict";
1376
-
1377
- __nested_webpack_require_61476__.r(__webpack_exports__);
1378
- /* harmony export */
1379
- __nested_webpack_require_61476__.d(__webpack_exports__, {
1380
- /* harmony export */"default": function _default() {
1381
- return __WEBPACK_DEFAULT_EXPORT__;
1382
- }
1383
- /* harmony export */
1384
- });
1385
- /* harmony import */
1386
- var react__WEBPACK_IMPORTED_MODULE_0__ = __nested_webpack_require_61476__(787);
1387
- /* harmony import */
1388
- var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nested_webpack_require_61476__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1389
- /* harmony import */
1390
- var funda_root_portal__WEBPACK_IMPORTED_MODULE_1__ = __nested_webpack_require_61476__(909);
1391
- /* harmony import */
1392
- var funda_root_portal__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__nested_webpack_require_61476__.n(funda_root_portal__WEBPACK_IMPORTED_MODULE_1__);
1393
- /* harmony import */
1394
- var funda_utils_dist_cjs_useComId__WEBPACK_IMPORTED_MODULE_2__ = __nested_webpack_require_61476__(85);
1395
- /* harmony import */
1396
- var funda_utils_dist_cjs_useComId__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__nested_webpack_require_61476__.n(funda_utils_dist_cjs_useComId__WEBPACK_IMPORTED_MODULE_2__);
1397
- /* harmony import */
1398
- var funda_utils_dist_cjs_useDraggable__WEBPACK_IMPORTED_MODULE_3__ = __nested_webpack_require_61476__(771);
1399
- /* harmony import */
1400
- var funda_utils_dist_cjs_useDraggable__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__nested_webpack_require_61476__.n(funda_utils_dist_cjs_useDraggable__WEBPACK_IMPORTED_MODULE_3__);
1401
- /* harmony import */
1402
- var funda_utils_dist_cjs_bodyScrollLock__WEBPACK_IMPORTED_MODULE_4__ = __nested_webpack_require_61476__(70);
1403
- /* harmony import */
1404
- var funda_utils_dist_cjs_bodyScrollLock__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__nested_webpack_require_61476__.n(funda_utils_dist_cjs_bodyScrollLock__WEBPACK_IMPORTED_MODULE_4__);
1405
- function _slicedToArray(arr, i) {
1406
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
1407
- }
1408
- function _nonIterableRest() {
1409
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1410
- }
1411
- function _unsupportedIterableToArray(o, minLen) {
1412
- if (!o) return;
1413
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
1414
- var n = Object.prototype.toString.call(o).slice(8, -1);
1415
- if (n === "Object" && o.constructor) n = o.constructor.name;
1416
- if (n === "Map" || n === "Set") return Array.from(o);
1417
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
1418
- }
1419
- function _arrayLikeToArray(arr, len) {
1420
- if (len == null || len > arr.length) len = arr.length;
1421
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
1422
- return arr2;
1423
- }
1424
- function _iterableToArrayLimit(arr, i) {
1425
- var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
1426
- if (null != _i) {
1427
- var _s,
1428
- _e,
1429
- _x,
1430
- _r,
1431
- _arr = [],
1432
- _n = !0,
1433
- _d = !1;
1434
- try {
1435
- if (_x = (_i = _i.call(arr)).next, 0 === i) {
1436
- if (Object(_i) !== _i) return;
1437
- _n = !1;
1438
- } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
1439
- } catch (err) {
1440
- _d = !0, _e = err;
1441
- } finally {
1442
- try {
1443
- if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
1444
- } finally {
1445
- if (_d) throw _e;
1446
- }
1447
- }
1448
- return _arr;
1449
- }
1450
- }
1451
- function _arrayWithHoles(arr) {
1452
- if (Array.isArray(arr)) return arr;
1453
- }
1454
-
1455
- // Destroys body scroll locking
1456
-
1457
- var ModalDialog = /*#__PURE__*/(0, react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, externalRef) {
1458
- var modalContentClassName = props.modalContentClassName,
1459
- modalHeaderClassName = props.modalHeaderClassName,
1460
- modalTitleClassName = props.modalTitleClassName,
1461
- modalBodyClassName = props.modalBodyClassName,
1462
- modalFooterClassName = props.modalFooterClassName,
1463
- modalFooterExpandedContentClassName = props.modalFooterExpandedContentClassName,
1464
- lockBodyScroll = props.lockBodyScroll,
1465
- draggable = props.draggable,
1466
- draggedPreventOutsideScreen = props.draggedPreventOutsideScreen,
1467
- depth = props.depth,
1468
- show = props.show,
1469
- maxWidth = props.maxWidth,
1470
- minHeight = props.minHeight,
1471
- fullscreen = props.fullscreen,
1472
- enableVideo = props.enableVideo,
1473
- heading = props.heading,
1474
- footerExpandedContent = props.footerExpandedContent,
1475
- triggerClassName = props.triggerClassName,
1476
- triggerContent = props.triggerContent,
1477
- closeBtnClassName = props.closeBtnClassName,
1478
- closeBtnLabel = props.closeBtnLabel,
1479
- submitBtnClassName = props.submitBtnClassName,
1480
- submitBtnLabel = props.submitBtnLabel,
1481
- autoClose = props.autoClose,
1482
- maskDisabled = props.maskDisabled,
1483
- maskOpacity = props.maskOpacity,
1484
- closeOnlyBtn = props.closeOnlyBtn,
1485
- closeDisabled = props.closeDisabled,
1486
- data = props.data,
1487
- onLoad = props.onLoad,
1488
- onOpen = props.onOpen,
1489
- onClose = props.onClose,
1490
- onSubmit = props.onSubmit,
1491
- id = props.id,
1492
- children = props.children;
1493
- var DEPTH = depth || 1055; // the default value same as bootstrap
1494
- var M_WIDTH = fullscreen ? undefined : typeof maxWidth === 'function' ? maxWidth() : maxWidth ? maxWidth : undefined;
1495
- var M_HEIGHT = typeof minHeight === 'function' ? minHeight() : minHeight ? minHeight : undefined;
1496
- var LOCK_BODY_SCROLL = typeof lockBodyScroll === 'undefined' ? false : lockBodyScroll;
1497
- var uniqueID = funda_utils_dist_cjs_useComId__WEBPACK_IMPORTED_MODULE_2___default()();
1498
- var modalRef = (0, react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
1499
- var triggerRef = (0, react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
1500
- var idRes = id || uniqueID;
1501
- var _useState = (0, react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
1502
- _useState2 = _slicedToArray(_useState, 2),
1503
- modalShow = _useState2[0],
1504
- setModalShow = _useState2[1];
1505
- var _useState3 = (0, react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
1506
- _useState4 = _slicedToArray(_useState3, 2),
1507
- incomingData = _useState4[0],
1508
- setIncomingData = _useState4[1];
1509
-
1510
- // drag and drop
1511
- var _useState5 = (0, react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
1512
- _useState6 = _slicedToArray(_useState5, 2),
1513
- isDragging = _useState6[0],
1514
- setIsDragging = _useState6[1];
1515
- var _useDraggable = funda_utils_dist_cjs_useDraggable__WEBPACK_IMPORTED_MODULE_3___default()({
1516
- enabled: draggable,
1517
- preventOutsideScreen: draggedPreventOutsideScreen,
1518
- onStart: function onStart(coordinates, handleEl, contentEl) {
1519
- setIsDragging(true);
1520
- },
1521
- onDrag: function onDrag(coordinates, handleEl, contentEl) {},
1522
- onStop: function onStop(coordinates, handleEl, contentEl) {
1523
- setIsDragging(false);
1524
- }
1525
- }),
1526
- dragContentHandle = _useDraggable.dragContentHandle,
1527
- dragHandle = _useDraggable.dragHandle,
1528
- resetPosition = _useDraggable.resetPosition;
1529
-
1530
- // exposes the following methods
1531
- (0, react__WEBPACK_IMPORTED_MODULE_0__.useImperativeHandle)(externalRef, function () {
1532
- return {
1533
- open: function open() {
1534
- handleOpenWin(null);
1535
- },
1536
- close: function close() {
1537
- handleCloseWin(null);
1538
- }
1539
- };
1540
- }, [externalRef]);
1541
-
1542
- //
1543
- function handleCloseWin(e) {
1544
- if (typeof e !== 'undefined' && e !== null) {
1545
- e.preventDefault();
1546
-
1547
- // Prevent click events of parent nested Modal
1548
- e.stopPropagation();
1549
- }
1550
- closeAction();
1551
-
1552
- // reset modal coordinates
1553
- setTimeout(function () {
1554
- resetPosition === null || resetPosition === void 0 ? void 0 : resetPosition();
1555
- }, 300);
1556
-
1557
- //
1558
- onClose === null || onClose === void 0 ? void 0 : onClose(e);
1559
- }
1560
- function handleOpenWin(e) {
1561
- if (typeof e !== 'undefined' && e !== null) {
1562
- e.preventDefault();
1563
-
1564
- // Prevent click events of parent nested Modal
1565
- e.stopPropagation();
1566
- }
1567
- openAction();
1568
-
1569
- //
1570
- var callback = function callback(e) {
1571
- return function () {
1572
- handleCloseWin(e);
1573
- };
1574
- };
1575
- onOpen === null || onOpen === void 0 ? void 0 : onOpen(e, callback(e));
1576
- }
1577
- function closeAction() {
1578
- // pause video without controls
1579
- //------------------------------------------
1580
- if (window.curVideo !== null && typeof window.curVideo !== 'undefined') window.curVideo.pause();
1581
-
1582
- // close Modal Dialog
1583
- //------------------------------------------
1584
- var $mask = document.querySelector("#mask-".concat(idRes, " > .modal-backdrop"));
1585
- setModalShow(false);
1586
- if ($mask !== null) $mask.classList.remove('show');
1587
- setTimeout(function () {
1588
- if (modalRef.current !== null) modalRef.current.style.display = 'none';
1589
- if ($mask !== null) $mask.style.display = 'none';
1590
- }, 300);
1591
-
1592
- // Unlocks the page
1593
- //------------------------------------------
1594
- if (LOCK_BODY_SCROLL) (0, funda_utils_dist_cjs_bodyScrollLock__WEBPACK_IMPORTED_MODULE_4__.enableBodyScroll)(document.querySelector('body'));
1595
-
1596
- // Cancels a timeout previously established by calling setTimeout().
1597
- //------------------------------------------
1598
- clearTimeout(window.setCloseModalDialog);
1599
- }
1600
- function openAction() {
1601
- if (modalRef.current === null) return;
1602
-
1603
- // Video PopUp Interaction
1604
- //------------------------------------------
1605
- var hasVideo = modalRef.current.classList.contains('is-video') ? true : false;
1606
- if (hasVideo) {
1607
- var windowWidth = window.innerWidth;
1608
- var windowHeight = window.innerHeight;
1609
- var $videoWrapper = modalRef.current.querySelector('.modal-dialog__video');
1610
- var isIframe = $videoWrapper.getElementsByTagName('iframe').length > 0 ? true : false;
1611
- var $video = isIframe ? $videoWrapper.getElementsByTagName('iframe')[0] : $videoWrapper.getElementsByTagName('video')[0];
1612
-
1613
- //
1614
- var setVideo = function setVideo(currentWidth, currentHeight, obj) {
1615
- var newMaxW = windowWidth - 80,
1616
- newMaxH = windowHeight - 80;
1617
- var newW = currentWidth,
1618
- newH = currentHeight;
1619
- if (currentHeight > newMaxH) {
1620
- newH = newMaxH;
1621
-
1622
- //Scaled/Proportional Content
1623
- newW = currentWidth * (newH / currentHeight);
1624
- }
1625
- if (newW > newMaxW) {
1626
- newW = newMaxW;
1627
-
1628
- //Scaled/Proportional Content
1629
- newH = currentHeight * (newW / currentWidth);
1630
- }
1631
- obj.height = newH + 'px';
1632
- obj.width = newW + 'px';
1633
-
1634
- //
1635
- modalRef.current.querySelector('.modal-dialog').style.width = newW + 'px';
1636
- };
1637
- if (isIframe) {
1638
- var _w = parseFloat(modalRef.current.querySelector('.modal-dialog').style.maxWidth);
1639
- if (isNaN(_w)) _w = 500;
1640
- var _h = _w * 0.5625;
1641
- setVideo(_w, _h, $video);
1642
- } else {
1643
- var _sources = $video.getElementsByTagName('source');
1644
- var _src = _sources.length > 0 ? _sources[0].src : $video.src;
1645
- getVideoDimensions(_src).then(function (res) {
1646
- setVideo(res.width, res.height, $video);
1647
- });
1648
- }
1649
-
1650
- //Set current video when the tag is <video>
1651
- window.curVideo = $video.tagName === 'VIDEO' ? $video : null;
1652
- }
1653
-
1654
- // fire Modal Dialog
1655
- //------------------------------------------
1656
- var $mask = document.querySelector("#mask-".concat(idRes, " > .modal-backdrop"));
1657
- modalRef.current.style.display = 'block';
1658
- if ($mask !== null) $mask.style.display = 'block';
1659
- setTimeout(function () {
1660
- setModalShow(true);
1661
- if ($mask !== null) $mask.classList.add('show');
1662
- }, 0);
1663
-
1664
- // Locks the page
1665
- //------------------------------------------
1666
- //
1667
- // Get a target element that you want to persist scrolling for (such as a modal/lightbox/flyout/nav).
1668
- // Specifically, the target element is the one we would like to allow scroll on (NOT a parent of that element).
1669
- // This is also the element to apply the CSS '-webkit-overflow-scrolling: touch;' if desired.
1670
- if (LOCK_BODY_SCROLL) (0, funda_utils_dist_cjs_bodyScrollLock__WEBPACK_IMPORTED_MODULE_4__.disableBodyScroll)(document.querySelector('body'));
1671
-
1672
- //auto close
1673
- //------------------------------------------
1674
- if (autoClose && !isNaN(autoClose)) {
1675
- //
1676
- window.setCloseModalDialog = setTimeout(function () {
1677
- closeAction();
1678
- //
1679
- onClose === null || onClose === void 0 ? void 0 : onClose(null);
1680
- }, autoClose);
1681
- }
1682
- }
1683
-
1684
- //Returns the dimensions of a video asynchrounsly.
1685
- function getVideoDimensions(url) {
1686
- return new Promise(function (resolve) {
1687
- // create the video element
1688
- var video = document.createElement('video');
1689
-
1690
- // place a listener on it
1691
- video.addEventListener("loadedmetadata", function () {
1692
- // retrieve dimensions
1693
- var height = this.videoHeight;
1694
- var width = this.videoWidth;
1695
- // send back result
1696
- resolve({
1697
- height: height,
1698
- width: width
1699
- });
1700
- }, false);
1701
-
1702
- // start download meta-datas
1703
- video.src = url;
1704
- });
1705
- }
1706
- (0, react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
1707
- // update incoming data
1708
- //--------------
1709
- setIncomingData(data);
1710
-
1711
- // show (ONLY, DO NOT USE `if ... else ...`)
1712
- //--------------
1713
- if (show) {
1714
- handleOpenWin(null);
1715
- }
1716
-
1717
- // Pass the function to be called
1718
- //--------------
1719
- onLoad === null || onLoad === void 0 ? void 0 : onLoad(function () {
1720
- return handleOpenWin;
1721
- }, function () {
1722
- return handleCloseWin;
1723
- });
1724
-
1725
- // Remove the global list of events, especially as scroll and interval.
1726
- //--------------
1727
- return function () {
1728
- if (LOCK_BODY_SCROLL) (0, funda_utils_dist_cjs_bodyScrollLock__WEBPACK_IMPORTED_MODULE_4__.clearAllBodyScrollLocks)();
1729
-
1730
- // Cancels a timeout previously established by calling setTimeout().
1731
- clearTimeout(window.setCloseModalDialog);
1732
- };
1733
- }, [show, data, modalRef.current]); // When show`` defaults to true, `modalRef.current` will be null
1734
-
1735
- 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", {
1736
- className: triggerClassName ? triggerClassName : 'd-inline w-auto',
1737
- ref: triggerRef,
1738
- onClick: handleOpenWin
1739
- }, triggerContent)) : null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(funda_root_portal__WEBPACK_IMPORTED_MODULE_1___default(), {
1740
- show: true,
1741
- containerClassName: "ModalDialog"
1742
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
1743
- ref: modalRef,
1744
- className: enableVideo ? "modal fade is-video ".concat(modalShow ? 'show' : '') : "modal fade ".concat(modalShow ? 'show' : ''),
1745
- tabIndex: -1,
1746
- "aria-hidden": "true",
1747
- style: {
1748
- pointerEvents: 'none',
1749
- zIndex: DEPTH
1750
- },
1751
- "data-mask": "mask-".concat(idRes)
1752
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
1753
- className: "modal-dialog modal-dialog-centered modal-dialog-scrollable ".concat(fullscreen ? 'modal-fullscreen' : ''),
1754
- style: M_WIDTH ? {
1755
- maxWidth: "".concat(M_WIDTH)
1756
- } : {}
1757
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
1758
- ref: dragContentHandle,
1759
- className: "".concat(enableVideo ? 'modal-content bg-transparent shadow-none border-0' : 'modal-content', " ").concat(modalContentClassName || '', " ").concat(isDragging ? 'dragging' : ''),
1760
- style: {
1761
- overflow: 'inherit',
1762
- minHeight: M_HEIGHT ? M_HEIGHT : 'auto'
1763
- }
1764
- }, (!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", {
1765
- ref: dragHandle,
1766
- className: "".concat(enableVideo ? 'modal-header border-0 px-0' : 'modal-header', " ").concat(modalHeaderClassName || ''),
1767
- style: {
1768
- cursor: draggable ? 'move' : 'default'
1769
- }
1770
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("h5", {
1771
- className: "modal-title ".concat(modalTitleClassName || '')
1772
- }, heading || ''), !closeDisabled ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
1773
- type: "button",
1774
- className: enableVideo ? 'btn-close btn-close-white' : 'btn-close',
1775
- "data-close": "1",
1776
- onClick: handleCloseWin
1777
- }) : null)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
1778
- className: "".concat(enableVideo ? 'modal-body m-0 p-0' : 'modal-body', " ").concat(modalBodyClassName || '')
1779
- }, 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", {
1780
- className: "modal-dialog__video"
1781
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
1782
- className: "ratio ratio-16x9"
1783
- }, 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", {
1784
- className: "modal-footer modal-expanded-footer ".concat(modalFooterExpandedContentClassName || '')
1785
- }, 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", {
1786
- className: "modal-footer ".concat(modalFooterClassName || '')
1787
- }, !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", {
1788
- "data-close": "1",
1789
- onClick: handleCloseWin,
1790
- type: "button",
1791
- className: closeBtnClassName ? closeBtnClassName : 'btn btn-secondary'
1792
- }, closeBtnLabel) : null) : null, submitBtnLabel ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
1793
- "data-confirm": "1",
1794
- "data-incoming-data": "".concat(incomingData),
1795
- onClick: function onClick(e) {
1796
- var callback = function callback(e) {
1797
- return function () {
1798
- handleCloseWin(e);
1799
- };
1800
- };
1801
- onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(e, callback(e), incomingData);
1802
- },
1803
- type: "button",
1804
- className: submitBtnClassName ? submitBtnClassName : 'btn btn-primary'
1805
- }, submitBtnLabel) : null)) : null))), !maskDisabled ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
1806
- id: "mask-".concat(idRes)
1807
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
1808
- id: "mask-".concat(idRes),
1809
- className: modalShow ? 'modal-backdrop fade show' : 'modal-backdrop fade',
1810
- style: maskOpacity ? {
1811
- display: modalShow ? 'block' : 'none',
1812
- opacity: maskOpacity,
1813
- zIndex: DEPTH - 5
1814
- } : {
1815
- display: modalShow ? 'block' : 'none',
1816
- zIndex: DEPTH - 5
1817
- },
1818
- onClick: function onClick(e) {
1819
- if ((typeof closeDisabled === 'undefined' || closeDisabled === false) && (typeof closeOnlyBtn === 'undefined' || closeOnlyBtn === false)) {
1820
- handleCloseWin(null);
1821
- }
1822
- }
1823
- })) : null));
1824
- });
1825
- /* harmony default export */
1826
- var __WEBPACK_DEFAULT_EXPORT__ = ModalDialog;
1827
- })();
1828
-
1829
- /******/
1830
- return __webpack_exports__;
1831
- /******/
1832
- }()
1833
- );
1834
- });
1835
-
1836
- /***/ }),
1837
-
1838
- /***/ 188:
1839
- /***/ (function(module, exports, __webpack_require__) {
1840
-
1841
- /* module decorator */ module = __webpack_require__.nmd(module);
1842
- var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof2(obj) { "@babel/helpers - typeof"; return _typeof2 = "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; }, _typeof2(obj); }
1843
- (function webpackUniversalModuleDefinition(root, factory) {
1844
- if (( false ? 0 : _typeof2(exports)) === 'object' && ( false ? 0 : _typeof2(module)) === 'object') module.exports = factory();else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
1845
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
1846
- (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
1847
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
1848
- })(this, function () {
1849
- return (/******/function () {
1850
- // webpackBootstrap
1851
- /******/
1852
- "use strict";
1853
-
1854
- /******/ // The require scope
1855
- /******/
1856
- var __nested_webpack_require_993__ = {};
1857
- /******/
1858
- /************************************************************************/
1859
- /******/ /* webpack/runtime/define property getters */
1860
- /******/
1861
- (function () {
1862
- /******/ // define getter functions for harmony exports
1863
- /******/__nested_webpack_require_993__.d = function (exports, definition) {
1864
- /******/for (var key in definition) {
1865
- /******/if (__nested_webpack_require_993__.o(definition, key) && !__nested_webpack_require_993__.o(exports, key)) {
1866
- /******/Object.defineProperty(exports, key, {
1867
- enumerable: true,
1868
- get: definition[key]
1869
- });
1870
- /******/
1871
- }
1872
- /******/
1873
- }
1874
- /******/
1875
- };
1876
- /******/
1877
- })();
1878
- /******/
1879
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
1880
- /******/
1881
- (function () {
1882
- /******/__nested_webpack_require_993__.o = function (obj, prop) {
1883
- return Object.prototype.hasOwnProperty.call(obj, prop);
1884
- };
1885
- /******/
1886
- })();
1887
- /******/
1888
- /******/ /* webpack/runtime/make namespace object */
1889
- /******/
1890
- (function () {
1891
- /******/ // define __esModule on exports
1892
- /******/__nested_webpack_require_993__.r = function (exports) {
1893
- /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
1894
- /******/Object.defineProperty(exports, Symbol.toStringTag, {
1895
- value: 'Module'
1896
- });
1897
- /******/
1898
- }
1899
- /******/
1900
- Object.defineProperty(exports, '__esModule', {
1901
- value: true
1902
- });
1903
- /******/
1904
- };
1905
- /******/
1906
- })();
1907
- /******/
1908
- /************************************************************************/
1909
- var __webpack_exports__ = {};
1910
- __nested_webpack_require_993__.r(__webpack_exports__);
1911
- /* harmony export */
1912
- __nested_webpack_require_993__.d(__webpack_exports__, {
1913
- /* harmony export */"clsWrite": function clsWrite() {
1914
- return (/* binding */_clsWrite
1915
- );
1916
- },
1917
- /* harmony export */"combinedCls": function combinedCls() {
1918
- return (/* binding */_combinedCls
1919
- );
1920
- }
1921
- /* harmony export */
1922
- });
1923
- function _slicedToArray(arr, i) {
1924
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
1925
- }
1926
- function _nonIterableRest() {
1927
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1928
- }
1929
- function _unsupportedIterableToArray(o, minLen) {
1930
- if (!o) return;
1931
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
1932
- var n = Object.prototype.toString.call(o).slice(8, -1);
1933
- if (n === "Object" && o.constructor) n = o.constructor.name;
1934
- if (n === "Map" || n === "Set") return Array.from(o);
1935
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
1936
- }
1937
- function _arrayLikeToArray(arr, len) {
1938
- if (len == null || len > arr.length) len = arr.length;
1939
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
1940
- return arr2;
1941
- }
1942
- function _iterableToArrayLimit(arr, i) {
1943
- var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
1944
- if (null != _i) {
1945
- var _s,
1946
- _e,
1947
- _x,
1948
- _r,
1949
- _arr = [],
1950
- _n = !0,
1951
- _d = !1;
1952
- try {
1953
- if (_x = (_i = _i.call(arr)).next, 0 === i) {
1954
- if (Object(_i) !== _i) return;
1955
- _n = !1;
1956
- } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
1957
- } catch (err) {
1958
- _d = !0, _e = err;
1959
- } finally {
1960
- try {
1961
- if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
1962
- } finally {
1963
- if (_d) throw _e;
1964
- }
1965
- }
1966
- return _arr;
1967
- }
1968
- }
1969
- function _arrayWithHoles(arr) {
1970
- if (Array.isArray(arr)) return arr;
1971
- }
1972
- function _typeof(obj) {
1973
- "@babel/helpers - typeof";
1974
-
1975
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
1976
- return typeof obj;
1977
- } : function (obj) {
1978
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
1979
- }, _typeof(obj);
1980
- }
1981
- /**
1982
- * Output of class name
1983
- * @param {*} s - Any
1984
- * @param {String} defaultCls - Default string
1985
- * @param {?*} targetCls - Any
1986
- * @returns {*}
1987
- */
1988
- function _clsWrite(s, defaultCls) {
1989
- var targetCls = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
1990
- return s || s === '' ? typeof targetCls === 'undefined' ? s : targetCls : defaultCls;
1991
- }
1992
-
1993
- /**
1994
- * Combined classnames
1995
- * @param {*} args
1996
- * @returns {String|undefined}
1997
- */
1998
- /* Usage:
1999
-
2000
- console.log(combinedCls('a-1', 'a-2', 'a-3', {
2001
- 'p-1': null,
2002
- 'p-2': undefined,
2003
- 'p-3': true,
2004
- 'p-4': false,
2005
- 'p-5': 'kkk',
2006
- 'p-6': 0,
2007
- 'p-7': 1,
2008
- 'p-8': '',
2009
- undefined
2010
- })); // a-1 a-2 a-3 p-3 p-5 p-7
2011
- */
2012
- function _combinedCls() {
2013
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
2014
- args[_key] = arguments[_key];
2015
- }
2016
- if (args) {
2017
- var classes = [];
2018
- for (var i = 0; i < args.length; i++) {
2019
- var className = args[i];
2020
- if (!className) {
2021
- continue;
2022
- }
2023
- var type = _typeof(className);
2024
- if (type === 'string' || type === 'number') {
2025
- classes.push(className);
2026
- } else if (type === 'object') {
2027
- var _classes = Array.isArray(className) ? className : Object.entries(className).map(function (_ref) {
2028
- var _ref2 = _slicedToArray(_ref, 2),
2029
- key = _ref2[0],
2030
- value = _ref2[1];
2031
- return value ? key : null;
2032
- });
2033
- classes = _classes.length ? classes.concat(_classes.filter(function (c) {
2034
- return !!c;
2035
- })) : classes;
2036
- }
2037
- }
2038
- return classes.join(' ').trim();
2039
- }
2040
- return undefined;
2041
- }
2042
-
2043
- /******/
2044
- return __webpack_exports__;
2045
- /******/
2046
- }()
2047
- );
2048
- });
2049
-
2050
- /***/ }),
2051
-
2052
- /***/ 322:
2053
- /***/ (function(module, exports, __webpack_require__) {
2054
-
2055
- /* module decorator */ module = __webpack_require__.nmd(module);
2056
- 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); }
2057
- (function webpackUniversalModuleDefinition(root, factory) {
2058
- 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),
2059
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
2060
- (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
2061
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
2062
- })(this, function () {
2063
- return (/******/function () {
2064
- // webpackBootstrap
2065
- /******/
2066
- "use strict";
2067
-
2068
- /******/ // The require scope
2069
- /******/
2070
- var __nested_webpack_require_987__ = {};
2071
- /******/
2072
- /************************************************************************/
2073
- /******/ /* webpack/runtime/define property getters */
2074
- /******/
2075
- (function () {
2076
- /******/ // define getter functions for harmony exports
2077
- /******/__nested_webpack_require_987__.d = function (exports, definition) {
2078
- /******/for (var key in definition) {
2079
- /******/if (__nested_webpack_require_987__.o(definition, key) && !__nested_webpack_require_987__.o(exports, key)) {
2080
- /******/Object.defineProperty(exports, key, {
2081
- enumerable: true,
2082
- get: definition[key]
2083
- });
2084
- /******/
2085
- }
2086
- /******/
2087
- }
2088
- /******/
2089
- };
2090
- /******/
2091
- })();
2092
- /******/
2093
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
2094
- /******/
2095
- (function () {
2096
- /******/__nested_webpack_require_987__.o = function (obj, prop) {
2097
- return Object.prototype.hasOwnProperty.call(obj, prop);
2098
- };
2099
- /******/
2100
- })();
2101
- /******/
2102
- /******/ /* webpack/runtime/make namespace object */
2103
- /******/
2104
- (function () {
2105
- /******/ // define __esModule on exports
2106
- /******/__nested_webpack_require_987__.r = function (exports) {
2107
- /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
2108
- /******/Object.defineProperty(exports, Symbol.toStringTag, {
2109
- value: 'Module'
2110
- });
2111
- /******/
2112
- }
2113
- /******/
2114
- Object.defineProperty(exports, '__esModule', {
2115
- value: true
2116
- });
2117
- /******/
2118
- };
2119
- /******/
2120
- })();
2121
- /******/
2122
- /************************************************************************/
2123
- var __webpack_exports__ = {};
2124
- __nested_webpack_require_987__.r(__webpack_exports__);
2125
- /* harmony export */
2126
- __nested_webpack_require_987__.d(__webpack_exports__, {
2127
- /* harmony export */"dateFormat": function dateFormat() {
2128
- return (/* binding */_dateFormat
2129
- );
2130
- },
2131
- /* harmony export */"getCalendarDate": function getCalendarDate() {
2132
- return (/* binding */_getCalendarDate
2133
- );
2134
- },
2135
- /* harmony export */"getCurrentDate": function getCurrentDate() {
2136
- return (/* binding */_getCurrentDate
2137
- );
2138
- },
2139
- /* harmony export */"getCurrentDay": function getCurrentDay() {
2140
- return (/* binding */_getCurrentDay
2141
- );
2142
- },
2143
- /* harmony export */"getCurrentMonth": function getCurrentMonth() {
2144
- return (/* binding */_getCurrentMonth
2145
- );
2146
- },
2147
- /* harmony export */"getCurrentYear": function getCurrentYear() {
2148
- return (/* binding */_getCurrentYear
2149
- );
2150
- },
2151
- /* harmony export */"getDateDetails": function getDateDetails() {
2152
- return (/* binding */_getDateDetails
2153
- );
2154
- },
2155
- /* harmony export */"getFirstAndLastMonthDay": function getFirstAndLastMonthDay() {
2156
- return (/* binding */_getFirstAndLastMonthDay
2157
- );
2158
- },
2159
- /* harmony export */"getFullTime": function getFullTime() {
2160
- return (/* binding */_getFullTime
2161
- );
2162
- },
2163
- /* harmony export */"getLastDayInMonth": function getLastDayInMonth() {
2164
- return (/* binding */_getLastDayInMonth
2165
- );
2166
- },
2167
- /* harmony export */"getMonthDates": function getMonthDates() {
2168
- return (/* binding */_getMonthDates
2169
- );
2170
- },
2171
- /* harmony export */"getNextMonthDate": function getNextMonthDate() {
2172
- return (/* binding */_getNextMonthDate
2173
- );
2174
- },
2175
- /* harmony export */"getNextYearDate": function getNextYearDate() {
2176
- return (/* binding */_getNextYearDate
2177
- );
2178
- },
2179
- /* harmony export */"getNow": function getNow() {
2180
- return (/* binding */_getNow
2181
- );
2182
- },
2183
- /* harmony export */"getPrevMonthDate": function getPrevMonthDate() {
2184
- return (/* binding */_getPrevMonthDate
2185
- );
2186
- },
2187
- /* harmony export */"getPrevYearDate": function getPrevYearDate() {
2188
- return (/* binding */_getPrevYearDate
2189
- );
2190
- },
2191
- /* harmony export */"getSpecifiedDate": function getSpecifiedDate() {
2192
- return (/* binding */_getSpecifiedDate
2193
- );
2194
- },
2195
- /* harmony export */"getTodayDate": function getTodayDate() {
2196
- return (/* binding */_getTodayDate
2197
- );
2198
- },
2199
- /* harmony export */"getTomorrowDate": function getTomorrowDate() {
2200
- return (/* binding */_getTomorrowDate
2201
- );
2202
- },
2203
- /* harmony export */"getWeekDatesFromMon": function getWeekDatesFromMon() {
2204
- return (/* binding */_getWeekDatesFromMon
2205
- );
2206
- },
2207
- /* harmony export */"getWeekDatesFromSun": function getWeekDatesFromSun() {
2208
- return (/* binding */_getWeekDatesFromSun
2209
- );
2210
- },
2211
- /* harmony export */"getYesterdayDate": function getYesterdayDate() {
2212
- return (/* binding */_getYesterdayDate
2213
- );
2214
- },
2215
- /* harmony export */"isTimeString": function isTimeString() {
2216
- return (/* binding */_isTimeString
2217
- );
2218
- },
2219
- /* harmony export */"isValidDate": function isValidDate() {
2220
- return (/* binding */_isValidDate
2221
- );
2222
- },
2223
- /* harmony export */"isValidDay": function isValidDay() {
2224
- return (/* binding */_isValidDay
2225
- );
2226
- },
2227
- /* harmony export */"isValidHours": function isValidHours() {
2228
- return (/* binding */_isValidHours
2229
- );
2230
- },
2231
- /* harmony export */"isValidMinutesAndSeconds": function isValidMinutesAndSeconds() {
2232
- return (/* binding */_isValidMinutesAndSeconds
2233
- );
2234
- },
2235
- /* harmony export */"isValidMonth": function isValidMonth() {
2236
- return (/* binding */_isValidMonth
2237
- );
2238
- },
2239
- /* harmony export */"isValidYear": function isValidYear() {
2240
- return (/* binding */_isValidYear
2241
- );
2242
- },
2243
- /* harmony export */"padZero": function padZero() {
2244
- return (/* binding */_padZero
2245
- );
2246
- },
2247
- /* harmony export */"setDateDays": function setDateDays() {
2248
- return (/* binding */_setDateDays
2249
- );
2250
- },
2251
- /* harmony export */"setDateHours": function setDateHours() {
2252
- return (/* binding */_setDateHours
2253
- );
2254
- },
2255
- /* harmony export */"setDateMinutes": function setDateMinutes() {
2256
- return (/* binding */_setDateMinutes
2257
- );
2258
- },
2259
- /* harmony export */"timestampToDate": function timestampToDate() {
2260
- return (/* binding */_timestampToDate
2261
- );
2262
- }
2263
- /* harmony export */
2264
- });
2265
- /**
2266
- * The check string contains only hours, minutes, and seconds
2267
- * @returns {Boolean}
2268
- */
2269
- function _isTimeString(str) {
2270
- // match "HH:mm:ss"
2271
- var timePattern = /^([01]\d|2[0-3]):([0-5]\d):([0-5]\d)$/;
2272
- return timePattern.test(str);
2273
- }
2274
-
2275
- /**
2276
- * Get now
2277
- * @returns {Date} // Wed Apr 17 2024 14:31:36 GMT+0800 (China Standard Time)
2278
- */
2279
- var _getNow = function getNow() {
2280
- return new Date(Date.now());
2281
- };
2282
-
2283
- /**
2284
- * Zero Padding
2285
- * @param {Number} num
2286
- * @param {Boolean} padZeroEnabled
2287
- * @returns {String} '01', '05', '12'
2288
- */
2289
- var _padZero = function padZero(num) {
2290
- var padZeroEnabled = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
2291
- if (padZeroEnabled) {
2292
- return num < 10 ? '0' + num : num.toString();
2293
- } else {
2294
- return num.toString();
2295
- }
2296
- };
2297
-
2298
- /**
2299
- * Hours validation
2300
- * @param {*} v
2301
- * @returns {Boolean}
2302
- */
2303
- var _isValidHours = function isValidHours(v) {
2304
- return /^([01]?[0-9]|2[0-3])$/.test(v); // 0~23, 00~23
2305
- };
2306
-
2307
- /**
2308
- * Minutes and Seconds validation
2309
- * @param {*} v
2310
- * @returns {Boolean}
2311
- */
2312
- var _isValidMinutesAndSeconds = function isValidMinutesAndSeconds(v) {
2313
- return /^([01]?[0-9]|[0-5][0-9])$/.test(v); // 0~59, 00~59
2314
- };
2315
-
2316
- /**
2317
- * Year validation
2318
- * @param {*} v
2319
- * @returns {Boolean}
2320
- */
2321
- var _isValidYear = function isValidYear(v) {
2322
- return /^([1-9][0-9])\d{2}$/.test(v); // 1000 ~ 9999
2323
- };
2324
-
2325
- /**
2326
- * Month validation
2327
- * @param {*} v
2328
- * @returns {Boolean}
2329
- */
2330
- var _isValidMonth = function isValidMonth(v) {
2331
- return /^(0?[1-9]|1[0-2])$/.test(v); // 01~12, 1~12
2332
- };
2333
-
2334
- /**
2335
- * Day validation
2336
- * @param {*} v
2337
- * @returns {Boolean}
2338
- */
2339
- var _isValidDay = function isValidDay(v) {
2340
- return /^(0?[1-9]|[1-2][0-9]|3[0-1])$/.test(v); // 01~31, 1~31
2341
- };
2342
-
2343
- /**
2344
- * Check if the string is legitimate
2345
- * @param {String} v
2346
- * @returns {Boolean}
2347
- */
2348
- var _isValidDate = function isValidDate(v) {
2349
- return !(String(new Date(v)).toLowerCase() === 'invalid date');
2350
- };
2351
-
2352
- /**
2353
- * Get calendar date
2354
- * @param {Date | String} v
2355
- * @returns {Date | String} yyyy-MM-dd
2356
- */
2357
- function _dateFormat(v) {
2358
- var date = typeof v === 'string' ? new Date(v.replace(/-/g, "/")) : v; // fix "Invalid date in safari"
2359
- return date;
2360
- }
2361
-
2362
- /**
2363
- * Get date details
2364
- * @param {Date | String} v
2365
- * @param {Boolean} padZeroEnabled
2366
- * @typedef {Object} JSON
2367
- */
2368
- function _getDateDetails(v) {
2369
- var padZeroEnabled = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
2370
- var date = _dateFormat(v);
2371
- var year = date.getFullYear();
2372
- var month = _padZero(date.getMonth() + 1, padZeroEnabled);
2373
- var day = _padZero(date.getDate(), padZeroEnabled);
2374
- var hours = _padZero(date.getHours(), padZeroEnabled);
2375
- var minutes = _padZero(date.getMinutes(), padZeroEnabled);
2376
- var seconds = _padZero(date.getSeconds(), padZeroEnabled);
2377
- return {
2378
- year: String(year),
2379
- month: month,
2380
- day: day,
2381
- hours: hours,
2382
- minutes: minutes,
2383
- seconds: seconds
2384
- };
2385
- }
2386
-
2387
- /**
2388
- * Get calendar date
2389
- * @param {Date | String} v
2390
- * @param {Boolean} padZeroEnabled
2391
- * @returns {String} yyyy-MM-dd
2392
- */
2393
- function _getCalendarDate(v) {
2394
- var padZeroEnabled = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
2395
- var date = _dateFormat(v);
2396
- var year = date.getFullYear();
2397
- var month = _padZero(date.getMonth() + 1, padZeroEnabled);
2398
- var day = _padZero(date.getDate(), padZeroEnabled);
2399
- var hours = _padZero(date.getHours(), padZeroEnabled);
2400
- var minutes = _padZero(date.getMinutes(), padZeroEnabled);
2401
- var seconds = _padZero(date.getSeconds(), padZeroEnabled);
2402
- var res = "".concat(year, "-").concat(month, "-").concat(day);
2403
- return res;
2404
- }
2405
-
2406
- /**
2407
- * Get today date
2408
- * @returns {String} yyyy-MM-dd
2409
- */
2410
- function _getTodayDate() {
2411
- return _getCalendarDate(new Date());
2412
- }
2413
-
2414
- /**
2415
- * Get tomorrow date
2416
- * @param {Date | String} v
2417
- * @returns {String} yyyy-MM-dd
2418
- */
2419
- function _getTomorrowDate(v) {
2420
- var today = _dateFormat(v);
2421
- var _tomorrow = today;
2422
- _tomorrow.setDate(_tomorrow.getDate() + 1);
2423
- var tomorrow = _getCalendarDate(_tomorrow);
2424
- return tomorrow;
2425
- }
2426
-
2427
- /**
2428
- * Get yesterday date
2429
- * @param {Date | String} v
2430
- * @returns {String} yyyy-MM-dd
2431
- */
2432
- function _getYesterdayDate(v) {
2433
- var today = _dateFormat(v);
2434
- var _yesterday = today;
2435
- _yesterday.setDate(_yesterday.getDate() - 1);
2436
- var yesterday = _getCalendarDate(_yesterday);
2437
- return yesterday;
2438
- }
2439
-
2440
- /**
2441
- * Get specified date
2442
- * @param {Date | String} v
2443
- * @param {Number} days The number of days forward or backward, which can be a negative number
2444
- * @returns {String} yyyy-MM-dd
2445
- */
2446
- /* console.log(getSpecifiedDate(getTodayDate(), -180)); // 2023-08-27 (180 days before February 23, 202) */
2447
- function _getSpecifiedDate(v, days) {
2448
- var today = _dateFormat(v);
2449
- var _specifiedDay = today;
2450
- _specifiedDay.setDate(_specifiedDay.getDate() + days);
2451
- var specifiedDay = _getCalendarDate(_specifiedDay);
2452
- return specifiedDay;
2453
- }
2454
-
2455
- /**
2456
- * Get next month date
2457
- * @param {Date | String} v
2458
- * @returns {String} yyyy-MM-dd
2459
- */
2460
- function _getNextMonthDate(v) {
2461
- var today = _dateFormat(v);
2462
- today.setMonth(today.getMonth() + 1);
2463
- return _getCalendarDate(today);
2464
- }
2465
-
2466
- /**
2467
- * Get previous month date
2468
- * @param {Date | String} v
2469
- * @returns {String} yyyy-MM-dd
2470
- */
2471
- function _getPrevMonthDate(v) {
2472
- var today = _dateFormat(v);
2473
- today.setMonth(today.getMonth() - 1);
2474
- return _getCalendarDate(today);
2475
- }
2476
-
2477
- /**
2478
- * Get next year date
2479
- * @param {Date | String} v
2480
- * @returns {String} yyyy-MM-dd
2481
- */
2482
- function _getNextYearDate(v) {
2483
- var today = _dateFormat(v);
2484
- var current = new Date(today);
2485
- current.setFullYear(current.getFullYear() + 1);
2486
- return _getCalendarDate(current);
2487
- }
2488
-
2489
- /**
2490
- * Get previous year date
2491
- * @param {Date | String} v
2492
- * @returns {String} yyyy-MM-dd
2493
- */
2494
- function _getPrevYearDate(v) {
2495
- var today = _dateFormat(v);
2496
- var current = new Date(today);
2497
- current.setFullYear(current.getFullYear() - 1);
2498
- return _getCalendarDate(current);
2499
- }
2500
-
2501
- /**
2502
- * Get last day in month
2503
- * @param {Date | String} v
2504
- * @param {?Number} targetMonth
2505
- * @returns {String | Number} yyyy-MM-dd
2506
- */
2507
- /*
2508
- Example: Get last day in next month
2509
-
2510
- const _day = '2024-01-01';
2511
- const y = new Date(getNextMonthDate(_day)).getFullYear();
2512
- const m = String(new Date(getNextMonthDate(_day)).getMonth() + 1).padStart(2, '0');
2513
- const d = getLastDayInMonth(getNextMonthDate(_day), new Date(getNextMonthDate(_day)).getMonth() + 1);
2514
-
2515
- const lastDayOfNextMonth = `${y}-${m}-${d}`; // 2024-02-29
2516
-
2517
- */
2518
- function _getLastDayInMonth(v) {
2519
- var targetMonth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
2520
- var date = _dateFormat(v);
2521
- return new Date(date.getFullYear(), typeof targetMonth !== 'undefined' ? targetMonth : date.getMonth() - 1, 0).getDate();
2522
- }
2523
-
2524
- /**
2525
- * Get current year
2526
- * @returns {Number}
2527
- */
2528
- function _getCurrentYear() {
2529
- return new Date().getFullYear();
2530
- }
2531
-
2532
- /**
2533
- * Get current month
2534
- * @param {Boolean} padZeroEnabled
2535
- * @returns {Number}
2536
- */
2537
- function _getCurrentMonth() {
2538
- var padZeroEnabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
2539
- var m = new Date().getMonth() + 1;
2540
- return padZeroEnabled ? String(m).padStart(2, '0') : m;
2541
- }
2542
-
2543
- /**
2544
- * Get current day
2545
- * @param {Boolean} padZeroEnabled
2546
- * @returns {Number}
2547
- */
2548
- function _getCurrentDay() {
2549
- var padZeroEnabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
2550
- var d = new Date().getDate();
2551
- return padZeroEnabled ? String(d).padStart(2, '0') : d;
2552
- }
2553
-
2554
- /**
2555
- * Get first and last month day
2556
- * @param {Number} v
2557
- * @param {Boolean} padZeroEnabled
2558
- * @returns {Array}
2559
- */
2560
- function _getFirstAndLastMonthDay(year) {
2561
- var padZeroEnabled = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
2562
- var theFirst = new Date(year, 0, 1).getDate();
2563
- var theLast = new Date(year, 11, 31).getDate();
2564
- var padZero = function padZero(num) {
2565
- if (padZeroEnabled) {
2566
- return num < 10 ? '0' + num : num.toString();
2567
- } else {
2568
- return num.toString();
2569
- }
2570
- };
2571
- return [padZero(theFirst), padZero(theLast)];
2572
- }
2573
-
2574
- /**
2575
- * Get current date
2576
- * @param {Boolean} padZeroEnabled
2577
- * @typedef {String} JSON
2578
- */
2579
- function _getCurrentDate() {
2580
- var padZeroEnabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
2581
- var date = new Date();
2582
- var padZero = function padZero(num) {
2583
- if (padZeroEnabled) {
2584
- return num < 10 ? '0' + num : num.toString();
2585
- } else {
2586
- return num.toString();
2587
- }
2588
- };
2589
- var year = date.getFullYear();
2590
- var month = padZero(date.getMonth() + 1);
2591
- var day = padZero(date.getDate());
2592
- var hours = padZero(date.getHours());
2593
- var minutes = padZero(date.getMinutes());
2594
- return {
2595
- today: "".concat(year, "-").concat(month, "-").concat(day),
2596
- yearStart: "".concat(year, "-01-01"),
2597
- yearEnd: "".concat(year, "-12-").concat(_getLastDayInMonth(date, 12))
2598
- };
2599
- }
2600
-
2601
- /**
2602
- * Get full time
2603
- * @param {Date | String} v
2604
- * @param {Boolean} padZeroEnabled
2605
- * @param {Boolean} hasSeconds
2606
- * @returns {String} yyyy-MM-dd HH:mm:ss
2607
- */
2608
- function _getFullTime(v) {
2609
- var padZeroEnabled = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
2610
- var hasSeconds = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
2611
- var date = _dateFormat(v);
2612
- var padZero = function padZero(num) {
2613
- if (padZeroEnabled) {
2614
- return num < 10 ? '0' + num : num.toString();
2615
- } else {
2616
- return num.toString();
2617
- }
2618
- };
2619
- var year = date.getFullYear();
2620
- var month = padZero(date.getMonth() + 1);
2621
- var day = padZero(date.getDate());
2622
- var hours = padZero(date.getHours());
2623
- var minutes = padZero(date.getMinutes());
2624
- var seconds = padZero(date.getSeconds());
2625
- var res = "".concat(year, "-").concat(month, "-").concat(day, " ").concat(hours, ":").concat(minutes, ":").concat(seconds);
2626
- var res2 = "".concat(year, "-").concat(month, "-").concat(day, " ").concat(hours, ":").concat(minutes);
2627
- return hasSeconds ? res : res2;
2628
- }
2629
-
2630
- /**
2631
- * Add hours
2632
- * @param {Date | String} v
2633
- * @param {Number} offset
2634
- * @param {Boolean} padZeroEnabled
2635
- * @returns {String} yyyy-MM-dd HH:mm:ss
2636
- */
2637
- function _setDateHours(v, offset) {
2638
- var padZeroEnabled = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
2639
- var date = _dateFormat(v);
2640
- var _cur = new Date(date).setTime(new Date(date).getTime() + offset * 60 * 60 * 1000);
2641
- return _getFullTime(new Date(_cur), padZeroEnabled);
2642
- }
2643
-
2644
- /**
2645
- * Add minutes
2646
- * @param {Date | String} v
2647
- * @param {Number} offset
2648
- * @param {Boolean} padZeroEnabled
2649
- * @returns {String} yyyy-MM-dd HH:mm:ss
2650
- */
2651
- function _setDateMinutes(v, offset) {
2652
- var padZeroEnabled = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
2653
- var date = _dateFormat(v);
2654
- var _cur = new Date(date).setTime(new Date(date).getTime() + offset * 60 * 1000);
2655
- return _getFullTime(new Date(_cur), padZeroEnabled);
2656
- }
2657
- /**
2658
- * Add days
2659
- * @param {Date | String} v
2660
- * @param {Number} offset
2661
- * @param {Boolean} padZeroEnabled
2662
- * @returns {String} yyyy-MM-dd HH:mm:ss
2663
- */
2664
- function _setDateDays(v, offset) {
2665
- var padZeroEnabled = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
2666
- var date = _dateFormat(v);
2667
- var _cur = new Date(date).setTime(new Date(date).getTime() + offset * 24 * 60 * 60 * 1000);
2668
- return _getFullTime(new Date(_cur), padZeroEnabled);
2669
- }
2670
-
2671
- /**
2672
- * Convert timestamp to date
2673
- * @param {Number} v
2674
- * @param {Boolean} padZeroEnabled
2675
- * @returns {String} yyyy-MM-dd HH:mm:ss
2676
- */
2677
- function _timestampToDate(v) {
2678
- var padZeroEnabled = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
2679
- return _getFullTime(new Date(v), padZeroEnabled);
2680
- }
2681
-
2682
- /**
2683
- * Get the date of the specified month
2684
- * @param {Number} year
2685
- * @param {Number} month
2686
- * @returns {Array<string>}
2687
- */
2688
- function _getMonthDates(year, month) {
2689
- var dates = [];
2690
-
2691
- // Get the total number of days in the month
2692
- var daysInMonth = new Date(year, month, 0).getDate();
2693
- for (var day = 1; day <= daysInMonth; day++) {
2694
- dates.push("".concat(year, "-").concat(String(month).padStart(2, '0'), "-").concat(String(day).padStart(2, '0'))); // 'YYYY-MM-DD'
2695
- }
2696
-
2697
- return dates;
2698
- }
2699
-
2700
- /**
2701
- * Get the date of the specified week (From Sunday)
2702
- * @param {Number} weekOffset
2703
- * @returns {Array<Date>}
2704
- */
2705
- function _getWeekDatesFromSun(weekOffset) {
2706
- var dates = [];
2707
- var currentDate = new Date();
2708
-
2709
- // Calculate the date of Sunday
2710
- var dayOfWeek = currentDate.getDay(); // 0 is Sunday
2711
- currentDate.setDate(currentDate.getDate() - dayOfWeek + weekOffset * 7);
2712
-
2713
- // Get the date of the week
2714
- for (var i = 0; i < 7; i++) {
2715
- var date = new Date(currentDate);
2716
- date.setDate(currentDate.getDate() + i);
2717
- dates.push(date);
2718
- }
2719
- return dates;
2720
- }
2721
-
2722
- /**
2723
- * Get the date of the specified week (From Monday)
2724
- * @param {Number} weekOffset
2725
- * @returns {Array<Date>}
2726
- */
2727
- function _getWeekDatesFromMon(weekOffset) {
2728
- var dates = [];
2729
- var currentDate = new Date();
2730
-
2731
- // Set the date to Monday
2732
- var dayOfWeek = currentDate.getDay();
2733
- var diffToMonday = dayOfWeek === 0 ? -6 : 1 - dayOfWeek;
2734
- currentDate.setDate(currentDate.getDate() + diffToMonday + weekOffset * 7);
2735
-
2736
- // Get the date of the week
2737
- for (var i = 0; i < 7; i++) {
2738
- var date = new Date(currentDate);
2739
- date.setDate(currentDate.getDate() + i);
2740
- dates.push(date);
2741
- }
2742
- return dates;
2743
- }
2744
-
2745
- /******/
2746
- return __webpack_exports__;
2747
- /******/
2748
- }()
2749
- );
2750
- });
2751
-
2752
- /***/ }),
2753
-
2754
- /***/ 787:
2755
- /***/ ((module) => {
2756
-
2757
- "use strict";
2758
- module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
2759
-
2760
- /***/ }),
2761
-
2762
- /***/ 156:
2763
- /***/ ((module) => {
2764
-
2765
- "use strict";
2766
- module.exports = __WEBPACK_EXTERNAL_MODULE__156__;
2767
-
2768
- /***/ })
2769
-
2770
- /******/ });
2771
- /************************************************************************/
2772
- /******/ // The module cache
2773
- /******/ var __webpack_module_cache__ = {};
2774
- /******/
2775
- /******/ // The require function
2776
- /******/ function __webpack_require__(moduleId) {
2777
- /******/ // Check if module is in cache
2778
- /******/ var cachedModule = __webpack_module_cache__[moduleId];
2779
- /******/ if (cachedModule !== undefined) {
2780
- /******/ return cachedModule.exports;
2781
- /******/ }
2782
- /******/ // Create a new module (and put it into the cache)
2783
- /******/ var module = __webpack_module_cache__[moduleId] = {
2784
- /******/ id: moduleId,
2785
- /******/ loaded: false,
2786
- /******/ exports: {}
2787
- /******/ };
2788
- /******/
2789
- /******/ // Execute the module function
2790
- /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
2791
- /******/
2792
- /******/ // Flag the module as loaded
2793
- /******/ module.loaded = true;
2794
- /******/
2795
- /******/ // Return the exports of the module
2796
- /******/ return module.exports;
2797
- /******/ }
2798
- /******/
2799
- /************************************************************************/
2800
- /******/ /* webpack/runtime/compat get default export */
2801
- /******/ (() => {
2802
- /******/ // getDefaultExport function for compatibility with non-harmony modules
2803
- /******/ __webpack_require__.n = (module) => {
2804
- /******/ var getter = module && module.__esModule ?
2805
- /******/ () => (module['default']) :
2806
- /******/ () => (module);
2807
- /******/ __webpack_require__.d(getter, { a: getter });
2808
- /******/ return getter;
2809
- /******/ };
2810
- /******/ })();
2811
- /******/
2812
- /******/ /* webpack/runtime/define property getters */
2813
- /******/ (() => {
2814
- /******/ // define getter functions for harmony exports
2815
- /******/ __webpack_require__.d = (exports, definition) => {
2816
- /******/ for(var key in definition) {
2817
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
2818
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
2819
- /******/ }
2820
- /******/ }
2821
- /******/ };
2822
- /******/ })();
2823
- /******/
2824
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
2825
- /******/ (() => {
2826
- /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
2827
- /******/ })();
2828
- /******/
2829
- /******/ /* webpack/runtime/make namespace object */
2830
- /******/ (() => {
2831
- /******/ // define __esModule on exports
2832
- /******/ __webpack_require__.r = (exports) => {
2833
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
2834
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2835
- /******/ }
2836
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
2837
- /******/ };
2838
- /******/ })();
2839
- /******/
2840
- /******/ /* webpack/runtime/node module decorator */
2841
- /******/ (() => {
2842
- /******/ __webpack_require__.nmd = (module) => {
2843
- /******/ module.paths = [];
2844
- /******/ if (!module.children) module.children = [];
2845
- /******/ return module;
2846
- /******/ };
2847
- /******/ })();
2848
- /******/
2849
- /************************************************************************/
2850
- var __webpack_exports__ = {};
2851
- // This entry need to be wrapped in an IIFE because it need to be in strict mode.
2852
- (() => {
2853
- "use strict";
2854
- __webpack_require__.r(__webpack_exports__);
2855
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2856
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2857
- /* harmony export */ });
2858
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(787);
2859
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2860
- /* harmony import */ var funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(322);
2861
- /* harmony import */ var funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__);
2862
- /* harmony import */ var funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(188);
2863
- /* harmony import */ var funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__);
2864
- /* harmony import */ var funda_modaldialog__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(483);
2865
- /* harmony import */ var funda_modaldialog__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(funda_modaldialog__WEBPACK_IMPORTED_MODULE_3__);
2866
- 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); }
2867
- function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
2868
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
2869
- function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
2870
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2871
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
2872
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2873
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
2874
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
2875
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
2876
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
2877
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
2878
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
2879
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2880
- 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."); }
2881
- 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); }
2882
- 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; }
2883
- 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; } }
2884
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2885
-
2886
-
2887
-
2888
-
2889
- var EventCalendar = function EventCalendar(props) {
2890
- var contentRef = props.contentRef,
2891
- calendarWrapperClassName = props.calendarWrapperClassName,
2892
- customTodayDate = props.customTodayDate,
2893
- eventsValue = props.eventsValue,
2894
- langWeek = props.langWeek,
2895
- langWeekFull = props.langWeekFull,
2896
- langMonths = props.langMonths,
2897
- langMonthsFull = props.langMonthsFull,
2898
- langToday = props.langToday,
2899
- onChangeDate = props.onChangeDate,
2900
- onChangeMonth = props.onChangeMonth,
2901
- onChangeYear = props.onChangeYear,
2902
- onChangeToday = props.onChangeToday,
2903
- onListRenderComplete = props.onListRenderComplete,
2904
- iconRemove = props.iconRemove,
2905
- iconAdd = props.iconAdd,
2906
- cellCloseBtnClassName = props.cellCloseBtnClassName,
2907
- cellCloseBtnLabel = props.cellCloseBtnLabel,
2908
- cellAddBtnClassName = props.cellAddBtnClassName,
2909
- cellAddBtnLabel = props.cellAddBtnLabel,
2910
- modalMaskOpacity = props.modalMaskOpacity,
2911
- modalMaxWidth = props.modalMaxWidth,
2912
- modalMinHeight = props.modalMinHeight,
2913
- modalHeading = props.modalHeading,
2914
- modalContent = props.modalContent,
2915
- modalDeleteContent = props.modalDeleteContent,
2916
- modalCloseBtnClassName = props.modalCloseBtnClassName,
2917
- modalCloseBtnLabel = props.modalCloseBtnLabel,
2918
- modalSubmitBtnClassName = props.modalSubmitBtnClassName,
2919
- modalSubmitBtnLabel = props.modalSubmitBtnLabel,
2920
- modalSubmitDeleteBtnClassName = props.modalSubmitDeleteBtnClassName,
2921
- modalSubmitDeleteBtnLabel = props.modalSubmitDeleteBtnLabel,
2922
- onModalEditOpen = props.onModalEditOpen,
2923
- onModalEditClose = props.onModalEditClose,
2924
- onModalDeleteOpen = props.onModalDeleteOpen,
2925
- onModalDeleteClose = props.onModalDeleteClose,
2926
- onModalEditEvent = props.onModalEditEvent,
2927
- onModalDeleteEvent = props.onModalDeleteEvent,
2928
- onCellMouseEnter = props.onCellMouseEnter,
2929
- onCellMouseLeave = props.onCellMouseLeave,
2930
- onCellClick = props.onCellClick,
2931
- onCellDoubleClick = props.onCellDoubleClick,
2932
- onCellMouseUp = props.onCellMouseUp,
2933
- onKeyPressed = props.onKeyPressed;
2934
- var DAYS = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
2935
- var DAYS_LEAP = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
2936
- var WEEK = langWeek || ['MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT', 'SUN'];
2937
- var WEEK_FULL = langWeekFull || ['MONDAY', 'TUESDAY', 'WEDNESDAY', 'THURSDAY', 'FRIDAY', 'SATURDAY', 'SUNDAY'];
2938
- var MONTHS = langMonths || ['JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC'];
2939
- var MONTHS_FULL = langMonthsFull || ['January', 'Febuary', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
2940
- var START_WEEK_ON = 1; // represents "Monday/1" in JavaScript
2941
-
2942
- // orginal data
2943
- var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]),
2944
- _useState2 = _slicedToArray(_useState, 2),
2945
- orginalData = _useState2[0],
2946
- setOrginalData = _useState2[1];
2947
- var now = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
2948
- return new Date();
2949
- }, []);
2950
- var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(now),
2951
- _useState4 = _slicedToArray(_useState3, 2),
2952
- date = _useState4[0],
2953
- setDate = _useState4[1];
2954
- var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(date.getDate()),
2955
- _useState6 = _slicedToArray(_useState5, 2),
2956
- day = _useState6[0],
2957
- setDay = _useState6[1];
2958
- var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(date.getMonth()),
2959
- _useState8 = _slicedToArray(_useState7, 2),
2960
- month = _useState8[0],
2961
- setMonth = _useState8[1];
2962
- var _useState9 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(date.getFullYear()),
2963
- _useState10 = _slicedToArray(_useState9, 2),
2964
- year = _useState10[0],
2965
- setYear = _useState10[1];
2966
- var _useState11 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(getStartDayOfMonth(date)),
2967
- _useState12 = _slicedToArray(_useState11, 2),
2968
- startDay = _useState12[0],
2969
- setStartDay = _useState12[1];
2970
-
2971
- // selection tab
2972
- // gets the today date time object
2973
- var _useState13 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(now.getMonth()),
2974
- _useState14 = _slicedToArray(_useState13, 2),
2975
- selectedMonth = _useState14[0],
2976
- setSelectedMonth = _useState14[1];
2977
- var _useState15 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(now.getFullYear()),
2978
- _useState16 = _slicedToArray(_useState15, 2),
2979
- selectedYear = _useState16[0],
2980
- setSelectedYear = _useState16[1];
2981
- var _useState17 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]),
2982
- _useState18 = _slicedToArray(_useState17, 2),
2983
- yearsArray = _useState18[0],
2984
- setYearsCollection = _useState18[1];
2985
-
2986
- //
2987
- var _useState19 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
2988
- _useState20 = _slicedToArray(_useState19, 2),
2989
- winYear = _useState20[0],
2990
- setWinYear = _useState20[1];
2991
- var _useState21 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
2992
- _useState22 = _slicedToArray(_useState21, 2),
2993
- winMonth = _useState22[0],
2994
- setWinMonth = _useState22[1];
2995
-
2996
- // modal dialog
2997
- var modalEditHandleRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
2998
- var modalDeleteHandleRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
2999
- var EVENTS_ENABLED = typeof modalContent !== 'undefined';
3000
- var EVENTS_DELETE_ENABLED = typeof modalDeleteContent !== 'undefined';
3001
- var _useState23 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
3002
- _useState24 = _slicedToArray(_useState23, 2),
3003
- showEdit = _useState24[0],
3004
- setShowEdit = _useState24[1];
3005
- var _useState25 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
3006
- _useState26 = _slicedToArray(_useState25, 2),
3007
- showDelete = _useState26[0],
3008
- setShowDelete = _useState26[1];
3009
-
3010
- // Open temporary storage for pop-ups
3011
- var _useState27 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(-1),
3012
- _useState28 = _slicedToArray(_useState27, 2),
3013
- tableCellId = _useState28[0],
3014
- setTableCellId = _useState28[1];
3015
- var findMondayAndTruncate = function findMondayAndTruncate(dates) {
3016
- var _res = dates.map(function (s) {
3017
- return new Date(s);
3018
- });
3019
- // Find the first Monday in the sequence
3020
- for (var i = 0; i < _res.length; i++) {
3021
- var _date2 = _res[i];
3022
- if (_date2.getDay() === START_WEEK_ON) {
3023
- // Return dates starting from Monday onwards
3024
- return dates.slice(i);
3025
- }
3026
- }
3027
- return []; // Return empty array if no Monday found
3028
- };
3029
-
3030
- // exposes the following methods
3031
- (0,react__WEBPACK_IMPORTED_MODULE_0__.useImperativeHandle)(contentRef, function () {
3032
- return {
3033
- today: function today() {
3034
- handleTodayChange();
3035
- },
3036
- next: function next() {
3037
- handleNextChange();
3038
- },
3039
- prev: function prev() {
3040
- handlePrevChange();
3041
- },
3042
- closeModal: function closeModal() {
3043
- if (modalEditHandleRef.current) modalEditHandleRef.current.close();
3044
- if (modalDeleteHandleRef.current) modalDeleteHandleRef.current.close();
3045
- }
3046
- };
3047
- }, [contentRef]);
3048
-
3049
- // helper buttons
3050
- var _delBtn = function _delBtn() {
3051
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, iconRemove ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, iconRemove) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
3052
- width: "20px",
3053
- height: "20px",
3054
- viewBox: "0 0 24 24",
3055
- fill: "none"
3056
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
3057
- fillRule: "evenodd",
3058
- clipRule: "evenodd",
3059
- d: "M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10ZM8 11a1 1 0 1 0 0 2h8a1 1 0 1 0 0-2H8Z",
3060
- fill: "#000"
3061
- }))), cellCloseBtnLabel || '');
3062
- };
3063
- var _addBtn = function _addBtn() {
3064
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, iconAdd ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, iconAdd) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
3065
- width: "20px",
3066
- height: "20px",
3067
- viewBox: "0 0 32 32"
3068
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", {
3069
- stroke: "none",
3070
- strokeWidth: "1",
3071
- fill: "none",
3072
- fillRule: "evenodd"
3073
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", {
3074
- transform: "translate(-102.000000, -1037.000000)",
3075
- fill: "#000000"
3076
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
3077
- d: "M124,1054 L119,1054 L119,1059 C119,1059.55 118.552,1060 118,1060 C117.448,1060 117,1059.55 117,1059 L117,1054 L112,1054 C111.448,1054 111,1053.55 111,1053 C111,1052.45 111.448,1052 112,1052 L117,1052 L117,1047 C117,1046.45 117.448,1046 118,1046 C118.552,1046 119,1046.45 119,1047 L119,1052 L124,1052 C124.552,1052 125,1052.45 125,1053 C125,1053.55 124.552,1054 124,1054 L124,1054 Z M130,1037 L106,1037 C103.791,1037 102,1038.79 102,1041 L102,1065 C102,1067.21 103.791,1069 106,1069 L130,1069 C132.209,1069 134,1067.21 134,1065 L134,1041 C134,1038.79 132.209,1037 130,1037 L130,1037 Z"
3078
- }))))), cellAddBtnLabel || '');
3079
- };
3080
- var queryItemObj = function queryItemObj() {
3081
- var _perData = orginalData.filter(function (item) {
3082
- return (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.getCalendarDate)(item.date) === (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.getCalendarDate)("".concat(year, "-").concat(month + 1, "-").concat(day));
3083
- });
3084
- var _currentData = undefined;
3085
- if (_perData[0]) {
3086
- var _items = _perData[0].list;
3087
- if (tableCellId === -1) {
3088
- // add new
3089
- _currentData = {
3090
- id: 0,
3091
- date: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.getCalendarDate)("".concat(year, "-").concat(month + 1, "-").concat(day))
3092
- };
3093
- } else {
3094
- // edit or delete
3095
- _currentData = _items.filter(function (item) {
3096
- return item.id == tableCellId;
3097
- })[0];
3098
- }
3099
- }
3100
- return _perData[0] ? _currentData : {
3101
- id: 0,
3102
- date: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.getCalendarDate)("".concat(year, "-").concat(month + 1, "-").concat(day))
3103
- };
3104
- };
3105
-
3106
- // cell
3107
- var getCells = function getCells() {
3108
- var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'none';
3109
- var currentMonth = month;
3110
- var currentStartDay = startDay;
3111
-
3112
- // previous month
3113
- if (type === 'forward') {
3114
- var _date = new Date(year, currentMonth - 1, day);
3115
- currentMonth = _date.getMonth();
3116
- currentStartDay = getStartDayOfMonth(_date);
3117
- }
3118
-
3119
- // next month
3120
- if (type === 'back') {
3121
- var _date3 = new Date(year, currentMonth + 1, day);
3122
- currentMonth = _date3.getMonth();
3123
- currentStartDay = getStartDayOfMonth(_date3);
3124
- }
3125
-
3126
- //
3127
- var allDays = Array(days[currentMonth] + (currentStartDay - 1)).fill(null).map(function (_, i) {
3128
- return i;
3129
- }); // [0,1,..,30,31]
3130
- var rows = Math.ceil(allDays.length / 7); // 5
3131
-
3132
- //
3133
- var _tempCells = Array.from({
3134
- length: rows
3135
- }).fill(null);
3136
- var _getForwardFill = function _getForwardFill(_year, _month) {
3137
- // Get the last day of the previous month
3138
- var lastDayOfLastMonth = new Date(_year, _month - 1, 0);
3139
- var last7Days = [];
3140
-
3141
- // Rewind 7 days forward from the last day
3142
- for (var i = 0; i < 7; i++) {
3143
- last7Days.unshift(new Date(lastDayOfLastMonth));
3144
- lastDayOfLastMonth.setDate(lastDayOfLastMonth.getDate() - 1);
3145
- }
3146
- return last7Days.map(function (v) {
3147
- return (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.getCalendarDate)(v);
3148
- });
3149
- };
3150
- var _getBackFill = function _getBackFill(_year, _month) {
3151
- // Get the first day of the next month
3152
- var firstDayOfNextMonth = new Date(_year, _month, 1);
3153
- var first7Days = [];
3154
-
3155
- // Rewind 7 days forward from the first day of the next month
3156
- for (var i = 0; i < 7; i++) {
3157
- first7Days.push(new Date(firstDayOfNextMonth));
3158
- firstDayOfNextMonth.setDate(firstDayOfNextMonth.getDate() + 1);
3159
- }
3160
- return first7Days.map(function (v) {
3161
- return (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.getCalendarDate)(v);
3162
- });
3163
- };
3164
-
3165
- // The remaining date of the previous month
3166
- // If the number is 7, the calendar does not include the date of the previous month
3167
- var remainPrevDate = findMondayAndTruncate(_getForwardFill(year, month + 1));
3168
- var remainPrevDateTotal = remainPrevDate.length === 7 ? 0 : remainPrevDate.length;
3169
- return {
3170
- rowsTotal: orginalData.length,
3171
- colsTotal: allDays.length,
3172
- forwardFillTotal: remainPrevDateTotal,
3173
- list: _tempCells.map(function (_, j) {
3174
- var _col = allDays.slice(j * 7, (j + 1) * 7);
3175
-
3176
- // back fill
3177
- var backFillArr = [];
3178
- for (var k = 0; k < 7 - _col.length; k++) {
3179
- backFillArr.push(null);
3180
- }
3181
- _col.splice.apply(_col, [_col.length, 0].concat(_toConsumableArray(backFillArr)));
3182
-
3183
- //
3184
- var isFirstGroup = j === 0;
3185
- var isLastGroup = j === _tempCells.length - 1;
3186
-
3187
- // forward fill
3188
- var __forwardFillDate = _getForwardFill(year, month + 1);
3189
-
3190
- // back fill
3191
- var __backFillDate = _getBackFill(year, month + 1);
3192
- var _getDateShow = function _getDateShow(_dayIndex, _m, _startDay, _month) {
3193
- var currentDay = typeof _dayIndex === 'number' ? _dayIndex - (_startDay - 2) : 0; // ..., -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, ...
3194
-
3195
- // date
3196
- var _dateShow = currentDay > 0 ? "".concat(year, "-").concat(_month + 1, "-").concat(currentDay) : '';
3197
-
3198
- // forward & back
3199
- if (isFirstGroup && _dateShow === '') {
3200
- _dateShow = __forwardFillDate.at(currentDay - 1);
3201
- }
3202
- if (isLastGroup && _dateShow === '') {
3203
- _dateShow = __backFillDate.at(_m);
3204
- }
3205
- return {
3206
- date: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.getCalendarDate)(_dateShow),
3207
- firstGroup: isFirstGroup,
3208
- lastGroup: isLastGroup,
3209
- validDisplayDate: currentDay > 0 && currentDay <= days[month]
3210
- };
3211
- };
3212
-
3213
- //
3214
- return {
3215
- month: currentMonth,
3216
- startDay: currentStartDay,
3217
- row: j,
3218
- col: _col,
3219
- dateInfo: _col.map(function (k, m) {
3220
- var _lastWeekDays = _col.filter(Boolean).length;
3221
- return _getDateShow(k, m - _lastWeekDays, currentStartDay, currentMonth);
3222
- }),
3223
- weekDisplay: _col.map(function (k, m) {
3224
- return WEEK[m];
3225
- }),
3226
- week: _col.map(function (k, m) {
3227
- return m;
3228
- })
3229
- };
3230
- })
3231
- };
3232
- };
3233
- function updateTodayDate(inputDate) {
3234
- setDay(inputDate.getDate());
3235
- setMonth(inputDate.getMonth());
3236
- setYear(inputDate.getFullYear());
3237
- setStartDay(getStartDayOfMonth(inputDate));
3238
-
3239
- // update selector
3240
- setSelectedMonth(inputDate.getMonth());
3241
- setSelectedYear(inputDate.getFullYear());
3242
- }
3243
- function getStartDayOfMonth(date) {
3244
- var startDate = new Date(date.getFullYear(), date.getMonth(), 1).getDay();
3245
- return startDate === 0 ? 7 : startDate;
3246
- }
3247
- function isLeapYear(year) {
3248
- return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;
3249
- }
3250
- var days = isLeapYear(year) ? DAYS_LEAP : DAYS;
3251
- function handlePrevChange() {
3252
- setDate(function (prevState) {
3253
- var _date = new Date(year, month - 1, day);
3254
-
3255
- // update
3256
- setSelectedMonth(_date.getMonth());
3257
- setSelectedYear(_date.getFullYear());
3258
-
3259
- //
3260
- onChangeMonth === null || onChangeMonth === void 0 ? void 0 : onChangeMonth({
3261
- day: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.padZero)(day),
3262
- month: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.padZero)(_date.getMonth() + 1),
3263
- year: _date.getFullYear().toString()
3264
- });
3265
- return _date;
3266
- });
3267
- }
3268
- function handleNextChange() {
3269
- setDate(function (prevState) {
3270
- var _date = new Date(year, month + 1, day);
3271
-
3272
- // update
3273
- setSelectedMonth(_date.getMonth());
3274
- setSelectedYear(_date.getFullYear());
3275
-
3276
- //
3277
- onChangeMonth === null || onChangeMonth === void 0 ? void 0 : onChangeMonth({
3278
- day: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.padZero)(day),
3279
- month: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.padZero)(_date.getMonth() + 1),
3280
- year: _date.getFullYear().toString()
3281
- });
3282
- return _date;
3283
- });
3284
- }
3285
- function handleDayChange(e, currentDay) {
3286
- setDate(new Date(year, month, currentDay));
3287
- }
3288
- function handleYearChange(currentValue) {
3289
- setSelectedYear(currentValue);
3290
- setYear(currentValue);
3291
- setDate(new Date(currentValue, month, day));
3292
-
3293
- // close win
3294
- setWinYear(false);
3295
- }
3296
- function handleMonthChange(currentIndex) {
3297
- setSelectedMonth(currentIndex);
3298
- setMonth(currentIndex);
3299
- setDate(new Date(year, currentIndex, day));
3300
-
3301
- // close win
3302
- setWinMonth(false);
3303
-
3304
- //
3305
- onChangeMonth === null || onChangeMonth === void 0 ? void 0 : onChangeMonth({
3306
- day: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.padZero)(day),
3307
- month: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.padZero)(currentIndex + 1),
3308
- year: year.toString()
3309
- });
3310
- }
3311
- function handleTodayChange() {
3312
- setSelectedMonth(now.getMonth());
3313
- setSelectedYear(now.getFullYear());
3314
- updateTodayDate(now);
3315
-
3316
- //
3317
- var _now = (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.getTodayDate)().split('-');
3318
- onChangeToday === null || onChangeToday === void 0 ? void 0 : onChangeToday({
3319
- day: _now[2],
3320
- month: _now[1],
3321
- year: _now[0]
3322
- });
3323
- }
3324
- function handleShowWinYear() {
3325
- setWinYear(function (prevState) {
3326
- return !prevState;
3327
- });
3328
- }
3329
- function handleShowWinMonth() {
3330
- setWinMonth(function (prevState) {
3331
- return !prevState;
3332
- });
3333
- }
3334
-
3335
- //if user change the selectedYear, then udate the years array that is displayed on year tab view
3336
- (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
3337
- var years = [];
3338
- for (var y = selectedYear - 10; y < selectedYear + 10; y++) {
3339
- years.push(y);
3340
- }
3341
- setYearsCollection(years);
3342
- }, [selectedYear]);
3343
- (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
3344
- // Guaranteed year change triggered by the front and rear buttons
3345
- onChangeYear === null || onChangeYear === void 0 ? void 0 : onChangeYear({
3346
- day: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.padZero)(day),
3347
- month: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.padZero)(month + 1),
3348
- year: year.toString()
3349
- });
3350
- }, [year]);
3351
- (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
3352
- updateTodayDate(date);
3353
- }, [date]);
3354
- (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
3355
- // update events value
3356
- if (Array.isArray(eventsValue)) setOrginalData(eventsValue);
3357
-
3358
- // update current today
3359
- if (typeof customTodayDate === 'string' && customTodayDate !== '' && (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.isValidDate)(customTodayDate)) {
3360
- var _customNow = new Date(customTodayDate);
3361
- updateTodayDate(_customNow);
3362
- }
3363
-
3364
- // Call a function when the list has been rendered completely
3365
- onListRenderComplete === null || onListRenderComplete === void 0 ? void 0 : onListRenderComplete();
3366
- }, [eventsValue, customTodayDate]);
3367
- return /*#__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", {
3368
- className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.combinedCls)("custom-event-cal__wrapper", calendarWrapperClassName),
3369
- onKeyDown: function onKeyDown(e) {
3370
- onKeyPressed === null || onKeyPressed === void 0 ? void 0 : onKeyPressed(e);
3371
- },
3372
- tabIndex: -1
3373
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
3374
- className: "custom-event-cal__header bg-body-tertiary"
3375
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
3376
- tabIndex: -1,
3377
- type: "button",
3378
- className: "custom-event-cal__btn custom-event-cal__btn--prev",
3379
- onClick: handlePrevChange
3380
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
3381
- width: "20px",
3382
- height: "20px",
3383
- viewBox: "0 0 24 24",
3384
- fill: "none"
3385
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
3386
- d: "M14.2893 5.70708C13.8988 5.31655 13.2657 5.31655 12.8751 5.70708L7.98768 10.5993C7.20729 11.3805 7.2076 12.6463 7.98837 13.427L12.8787 18.3174C13.2693 18.7079 13.9024 18.7079 14.293 18.3174C14.6835 17.9269 14.6835 17.2937 14.293 16.9032L10.1073 12.7175C9.71678 12.327 9.71678 11.6939 10.1073 11.3033L14.2893 7.12129C14.6799 6.73077 14.6799 6.0976 14.2893 5.70708Z",
3387
- fill: "#000"
3388
- }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
3389
- className: "custom-event-cal__header__btns"
3390
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
3391
- tabIndex: -1,
3392
- type: "button",
3393
- className: "custom-event-cal__btn ".concat(winMonth ? 'active' : ''),
3394
- onClick: handleShowWinMonth
3395
- }, MONTHS[month], /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
3396
- width: "12px",
3397
- height: "12px",
3398
- viewBox: "0 0 24 24"
3399
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
3400
- d: "M11.178 19.569a.998.998 0 0 0 1.644 0l9-13A.999.999 0 0 0 21 5H3a1.002 1.002 0 0 0-.822 1.569l9 13z",
3401
- fill: "#000000"
3402
- }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
3403
- tabIndex: -1,
3404
- type: "button",
3405
- className: "custom-event-cal__btn ".concat(winYear ? 'active' : ''),
3406
- onClick: handleShowWinYear
3407
- }, year, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
3408
- width: "12px",
3409
- height: "12px",
3410
- viewBox: "0 0 24 24"
3411
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
3412
- d: "M11.178 19.569a.998.998 0 0 0 1.644 0l9-13A.999.999 0 0 0 21 5H3a1.002 1.002 0 0 0-.822 1.569l9 13z",
3413
- fill: "#000000"
3414
- })))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
3415
- tabIndex: -1,
3416
- type: "button",
3417
- className: "custom-event-cal__btn custom-event-cal__btn--next",
3418
- onClick: handleNextChange
3419
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
3420
- width: "20px",
3421
- height: "20px",
3422
- viewBox: "0 0 24 24",
3423
- fill: "none"
3424
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
3425
- d: "M9.71069 18.2929C10.1012 18.6834 10.7344 18.6834 11.1249 18.2929L16.0123 13.4006C16.7927 12.6195 16.7924 11.3537 16.0117 10.5729L11.1213 5.68254C10.7308 5.29202 10.0976 5.29202 9.70708 5.68254C9.31655 6.07307 9.31655 6.70623 9.70708 7.09676L13.8927 11.2824C14.2833 11.6729 14.2833 12.3061 13.8927 12.6966L9.71069 16.8787C9.32016 17.2692 9.32016 17.9023 9.71069 18.2929Z",
3426
- fill: "#000"
3427
- })))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
3428
- className: "custom-event-cal__body"
3429
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
3430
- className: "custom-event-cal__row"
3431
- }, WEEK.map(function (s, i) {
3432
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
3433
- className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.combinedCls)('custom-event-cal__cell custom-event-cal__day custom-event-cal__day--week custom-event-cal__day--disabled bg-secondary-subtle empty', {
3434
- 'last-cell': i === WEEK.length - 1
3435
- }),
3436
- key: i,
3437
- "data-week": i,
3438
- dangerouslySetInnerHTML: {
3439
- __html: s
3440
- }
3441
- });
3442
- })), getCells().list.map(function (item, j) {
3443
- var isLastRow = j === getCells().list.length - 1;
3444
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
3445
- key: 'row' + item.row,
3446
- className: "custom-event-cal__row"
3447
- }, item.col.map(function (dayIndex, i) {
3448
- var isLastCell = i === item.col.length - 1;
3449
-
3450
- // date
3451
- var _dateShow = item.dateInfo[i].date;
3452
- var _dateDayShow = _dateShow.split('-').at(-1);
3453
-
3454
- // week day
3455
- var weekDay = item.week[i];
3456
-
3457
- // helper
3458
- var d = parseFloat(_dateDayShow);
3459
- var _currentData = orginalData.filter(function (item) {
3460
- return (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.getCalendarDate)(item.date) === _dateShow;
3461
- });
3462
- var isInteractive = item.dateInfo[i].validDisplayDate; // The date on which the user interaction can occur, e.g. click, modify
3463
- var isForward = item.dateInfo[i].firstGroup && !isInteractive;
3464
- var isBack = item.dateInfo[i].lastGroup && !isInteractive;
3465
- var _eventContent = function _eventContent() {
3466
- if (_currentData.length === 0 || !Array.isArray(_currentData) || typeof _currentData[0].list === 'undefined') {
3467
- return null;
3468
- }
3469
-
3470
- //
3471
- var _items = _currentData[0].list;
3472
- return _items.map(function (cellItem, cellItemIndex) {
3473
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
3474
- className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.combinedCls)("custom-event-cal__cell-item custom-event-cal__cell-item-".concat(cellItemIndex), {
3475
- 'first': cellItemIndex === 0,
3476
- 'last': cellItemIndex === _items.length - 1
3477
- }),
3478
- key: "cell-item-".concat(cellItemIndex, "}"),
3479
- "data-date": _dateShow,
3480
- "data-day": _dateDayShow,
3481
- "data-week": weekDay,
3482
- onClick: function onClick(e) {
3483
- var _cellItem$callback;
3484
- e.stopPropagation();
3485
-
3486
- // update cell data
3487
- setTableCellId(cellItem.id);
3488
-
3489
- // Callback
3490
- (_cellItem$callback = cellItem.callback) === null || _cellItem$callback === void 0 ? void 0 : _cellItem$callback.call(cellItem);
3491
- if (isInteractive) {
3492
- handleDayChange(e, d); // update current day
3493
-
3494
- //
3495
- var _now = cellItem.date.split('-');
3496
- onChangeDate === null || onChangeDate === void 0 ? void 0 : onChangeDate(e, _objectSpread(_objectSpread({}, cellItem), {}, {
3497
- day: _now[2],
3498
- month: _now[1],
3499
- year: _now[0]
3500
- }));
3501
- if (EVENTS_ENABLED) {
3502
- onModalEditOpen === null || onModalEditOpen === void 0 ? void 0 : onModalEditOpen(cellItem, function () {
3503
- return setShowEdit(true);
3504
- }, 'normal');
3505
- }
3506
- }
3507
- }
3508
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
3509
- className: "custom-event-cal__day__event",
3510
- style: typeof cellItem !== 'undefined' && cellItem.eventStyles !== 'undefined' ? cellItem.eventStyles : {},
3511
- dangerouslySetInnerHTML: typeof cellItem.data === 'string' ? {
3512
- __html: cellItem.data
3513
- } : undefined
3514
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().isValidElement(cellItem.data) ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, cellItem.data) : null), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
3515
- className: "custom-event-cal__day__eventdel ".concat(cellCloseBtnClassName || '')
3516
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a", {
3517
- href: "#",
3518
- tabIndex: -1,
3519
- className: "align-middle",
3520
- "data-date": (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.getCalendarDate)(_dateShow),
3521
- "data-day": (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.padZero)(d),
3522
- "data-week": i,
3523
- onClick: function onClick(e) {
3524
- e.preventDefault();
3525
- e.stopPropagation();
3526
-
3527
- // update cell data
3528
- setTableCellId(cellItem.id);
3529
- var _existsContent = cellItem;
3530
-
3531
- //
3532
- if (isInteractive) {
3533
- handleDayChange(e, d); // update current day
3534
-
3535
- //
3536
- var _now = (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.getCalendarDate)("".concat(year, "-").concat(month + 1, "-").concat(d)).split('-');
3537
- onChangeDate === null || onChangeDate === void 0 ? void 0 : onChangeDate(e, {
3538
- id: 0,
3539
- date: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.getCalendarDate)("".concat(year, "-").concat(month + 1, "-").concat(d)),
3540
- day: _now[2],
3541
- month: _now[1],
3542
- year: _now[0]
3543
- });
3544
- if (EVENTS_DELETE_ENABLED) {
3545
- onModalDeleteOpen === null || onModalDeleteOpen === void 0 ? void 0 : onModalDeleteOpen(_existsContent, function () {
3546
- return setShowDelete(true);
3547
- });
3548
- }
3549
- }
3550
- }
3551
- }, _delBtn())));
3552
- });
3553
- };
3554
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
3555
- className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.combinedCls)('custom-event-cal__cell custom-event-cal__day', {
3556
- 'empty': !isInteractive,
3557
- 'today': d === now.getDate(),
3558
- 'selected': d === day,
3559
- 'last-cell': isLastCell,
3560
- 'last-row': isLastRow
3561
- }),
3562
- key: "col" + i,
3563
- "data-date": (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.getCalendarDate)(_dateShow),
3564
- "data-day": (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.padZero)(d),
3565
- "data-week": i,
3566
- onMouseEnter: function onMouseEnter(e) {
3567
- onCellMouseEnter === null || onCellMouseEnter === void 0 ? void 0 : onCellMouseEnter(e);
3568
- },
3569
- onMouseDown: function onMouseDown(e) {
3570
- //
3571
- onCellClick === null || onCellClick === void 0 ? void 0 : onCellClick(e);
3572
- if (isInteractive) {
3573
- handleDayChange(e, d); // update current day
3574
- onChangeDate === null || onChangeDate === void 0 ? void 0 : onChangeDate(e, null);
3575
- }
3576
- },
3577
- onDoubleClick: function onDoubleClick(e) {
3578
- //
3579
- onCellDoubleClick === null || onCellDoubleClick === void 0 ? void 0 : onCellDoubleClick(e);
3580
- },
3581
- onMouseLeave: function onMouseLeave(e) {
3582
- onCellMouseLeave === null || onCellMouseLeave === void 0 ? void 0 : onCellMouseLeave(e);
3583
- },
3584
- onMouseUp: function onMouseUp(e) {
3585
- onCellMouseUp === null || onCellMouseUp === void 0 ? void 0 : onCellMouseUp(e);
3586
- }
3587
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {
3588
- className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.combinedCls)({
3589
- 'disabled': !isInteractive
3590
- })
3591
- }, d), _eventContent(), isForward || isBack ? 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", {
3592
- className: "custom-event-cal__day__eventadd ".concat(cellAddBtnClassName || '')
3593
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a", {
3594
- href: "#",
3595
- tabIndex: -1,
3596
- className: "align-middle",
3597
- "data-date": (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.getCalendarDate)(_dateShow),
3598
- "data-day": (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.padZero)(d),
3599
- "data-week": i,
3600
- onClick: function onClick(e) {
3601
- e.preventDefault();
3602
- e.stopPropagation();
3603
-
3604
- // update cell data
3605
- setTableCellId(-1);
3606
-
3607
- //
3608
- if (isInteractive) {
3609
- handleDayChange(e, d); // update current day
3610
-
3611
- //
3612
- var _now = (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.getCalendarDate)("".concat(year, "-").concat(month + 1, "-").concat(d)).split('-');
3613
- onChangeDate === null || onChangeDate === void 0 ? void 0 : onChangeDate(e, {
3614
- id: 0,
3615
- date: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.getCalendarDate)("".concat(year, "-").concat(month + 1, "-").concat(d)),
3616
- day: _now[2],
3617
- month: _now[1],
3618
- year: _now[0]
3619
- });
3620
- if (EVENTS_ENABLED) {
3621
- onModalEditOpen === null || onModalEditOpen === void 0 ? void 0 : onModalEditOpen({
3622
- id: 0,
3623
- date: (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.getCalendarDate)("".concat(year, "-").concat(month + 1, "-").concat(d))
3624
- }, function () {
3625
- return setShowEdit(true);
3626
- }, 'new');
3627
- }
3628
- }
3629
- }
3630
- }, _addBtn()))));
3631
- }));
3632
- })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
3633
- className: "custom-event-cal__month-wrapper shadow p-3 mb-5 bg-body-tertiary rounded ".concat(winMonth ? 'active' : '')
3634
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
3635
- className: "custom-event-cal__month-container"
3636
- }, MONTHS_FULL.map(function (month, index) {
3637
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
3638
- "data-month": (0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_1__.padZero)(index + 1),
3639
- className: "custom-event-cal__month ".concat(selectedMonth === index ? ' selected' : ''),
3640
- key: month + index,
3641
- onClick: function onClick() {
3642
- handleMonthChange(index);
3643
- }
3644
- }, month);
3645
- }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
3646
- className: "custom-event-cal__year-wrapper shadow p-3 mb-5 bg-body-tertiary rounded ".concat(winYear ? 'active' : '')
3647
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
3648
- className: "custom-event-cal__year-container bg-body-tertiary"
3649
- }, yearsArray.map(function (year, index) {
3650
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
3651
- "data-year": year,
3652
- className: "custom-event-cal__year ".concat(selectedYear === year ? ' selected' : ''),
3653
- key: year + index,
3654
- onClick: function onClick() {
3655
- handleYearChange(year);
3656
- }
3657
- }, year);
3658
- }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
3659
- className: "custom-event-cal__today-wrapper p-2 bg-body-tertiary"
3660
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
3661
- tabIndex: -1,
3662
- type: "button",
3663
- className: "custom-event-cal__btn custom-event-cal__btn--today",
3664
- onClick: handleTodayChange
3665
- }, langToday || 'Today'))), EVENTS_ENABLED ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((funda_modaldialog__WEBPACK_IMPORTED_MODULE_3___default()), {
3666
- ref: modalDeleteHandleRef,
3667
- show: showDelete,
3668
- maskOpacity: modalMaskOpacity,
3669
- triggerClassName: "",
3670
- triggerContent: "",
3671
- closeBtnClassName: modalCloseBtnClassName || 'btn btn-secondary',
3672
- closeBtnLabel: modalCloseBtnLabel || 'Close',
3673
- submitBtnClassName: modalSubmitDeleteBtnClassName || 'btn btn-danger',
3674
- submitBtnLabel: modalSubmitDeleteBtnLabel || /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, "Delete"),
3675
- onClose: function onClose(e) {
3676
- setTimeout(function () {
3677
- setShowDelete(false);
3678
- onModalDeleteClose === null || onModalDeleteClose === void 0 ? void 0 : onModalDeleteClose(queryItemObj());
3679
- }, 350);
3680
- },
3681
- onSubmit: /*#__PURE__*/function () {
3682
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(e, closewin, data) {
3683
- return _regeneratorRuntime().wrap(function _callee$(_context) {
3684
- while (1) switch (_context.prev = _context.next) {
3685
- case 0:
3686
- onModalDeleteEvent === null || onModalDeleteEvent === void 0 ? void 0 : onModalDeleteEvent(queryItemObj(), closewin);
3687
- case 1:
3688
- case "end":
3689
- return _context.stop();
3690
- }
3691
- }, _callee);
3692
- }));
3693
- return function (_x2, _x3, _x4) {
3694
- return _ref.apply(this, arguments);
3695
- };
3696
- }()
3697
- }, modalDeleteContent || 'Are you sure?'), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((funda_modaldialog__WEBPACK_IMPORTED_MODULE_3___default()), {
3698
- ref: modalEditHandleRef,
3699
- show: showEdit,
3700
- maskOpacity: modalMaskOpacity,
3701
- heading: modalHeading,
3702
- maxWidth: modalMaxWidth,
3703
- minHeight: modalMinHeight,
3704
- triggerClassName: "",
3705
- triggerContent: "",
3706
- closeBtnClassName: modalCloseBtnClassName || 'btn btn-secondary',
3707
- closeBtnLabel: modalCloseBtnLabel || 'Close',
3708
- submitBtnClassName: modalSubmitBtnClassName || 'btn btn-primary',
3709
- submitBtnLabel: modalSubmitBtnLabel || /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, "Save"),
3710
- onClose: function onClose(e) {
3711
- setTimeout(function () {
3712
- setShowEdit(false);
3713
- onModalEditClose === null || onModalEditClose === void 0 ? void 0 : onModalEditClose(queryItemObj());
3714
- }, 350);
3715
- },
3716
- onSubmit: /*#__PURE__*/function () {
3717
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(e, closewin, data) {
3718
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
3719
- while (1) switch (_context2.prev = _context2.next) {
3720
- case 0:
3721
- onModalEditEvent === null || onModalEditEvent === void 0 ? void 0 : onModalEditEvent(queryItemObj(), closewin);
3722
- case 1:
3723
- case "end":
3724
- return _context2.stop();
3725
- }
3726
- }, _callee2);
3727
- }));
3728
- return function (_x5, _x6, _x7) {
3729
- return _ref2.apply(this, arguments);
3730
- };
3731
- }()
3732
- }, modalContent)) : null);
3733
- };
3734
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (EventCalendar);
3735
- })();
3736
-
3737
- /******/ return __webpack_exports__;
3738
- /******/ })()
3739
- ;
3740
- });