funda-ui 4.5.712 → 4.5.766

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 (501) hide show
  1. package/Chatbox/index.d.ts +54 -0
  2. package/{publish/lib/cjs/Date → Chatbox}/index.js +2465 -3802
  3. package/README.md +4 -105
  4. package/Utils/useStreamController.d.ts +71 -0
  5. package/Utils/useStreamController.js +494 -0
  6. package/{publish/all.d.ts → all.d.ts} +1 -0
  7. package/{publish/all.js → all.js} +1 -0
  8. package/lib/cjs/Chatbox/index.d.ts +54 -0
  9. package/lib/cjs/Chatbox/index.js +4863 -0
  10. package/lib/cjs/Utils/useStreamController.d.ts +71 -0
  11. package/lib/cjs/Utils/useStreamController.js +494 -0
  12. package/lib/cjs/index.d.ts +1 -0
  13. package/lib/cjs/index.js +1 -0
  14. package/lib/esm/Chatbox/PureLoader.tsx +45 -0
  15. package/lib/esm/Chatbox/TypingEffect.tsx +32 -0
  16. package/lib/esm/Chatbox/index.scss +502 -0
  17. package/lib/esm/Chatbox/index.tsx +1171 -0
  18. package/lib/esm/Chatbox/useStreamController.tsx +277 -0
  19. package/lib/esm/Chatbox/utils/func.ts +107 -0
  20. package/lib/esm/Textarea/index.tsx +1 -0
  21. package/lib/esm/Utils/hooks/useStreamController.tsx +277 -0
  22. package/lib/esm/index.js +1 -0
  23. package/package.json +44 -41
  24. package/.gitattributes +0 -2
  25. package/README_PUBLISH.md +0 -126
  26. package/logo.png +0 -0
  27. package/preview.png +0 -0
  28. package/publish/LICENSE +0 -21
  29. package/publish/README.md +0 -126
  30. package/publish/lib/cjs/Accordion/index.d.ts +0 -2
  31. package/publish/lib/cjs/Accordion/index.js +0 -1035
  32. package/publish/lib/cjs/BackToTop/index.d.ts +0 -17
  33. package/publish/lib/cjs/BackToTop/index.js +0 -904
  34. package/publish/lib/cjs/CascadingSelect/index.d.ts +0 -60
  35. package/publish/lib/cjs/CascadingSelect/index.js +0 -2943
  36. package/publish/lib/cjs/CascadingSelectE2E/index.d.ts +0 -71
  37. package/publish/lib/cjs/CascadingSelectE2E/index.js +0 -3540
  38. package/publish/lib/cjs/Checkbox/index.d.ts +0 -28
  39. package/publish/lib/cjs/Checkbox/index.js +0 -662
  40. package/publish/lib/cjs/ColorPicker/index.d.ts +0 -27
  41. package/publish/lib/cjs/ColorPicker/index.js +0 -662
  42. package/publish/lib/cjs/Date/index.d.ts +0 -70
  43. package/publish/lib/cjs/DigitalClock/index.d.ts +0 -7
  44. package/publish/lib/cjs/DigitalClock/index.js +0 -402
  45. package/publish/lib/cjs/DragDropList/index.d.ts +0 -44
  46. package/publish/lib/cjs/DragDropList/index.js +0 -1587
  47. package/publish/lib/cjs/DropdownMenu/index.d.ts +0 -38
  48. package/publish/lib/cjs/DropdownMenu/index.js +0 -1498
  49. package/publish/lib/cjs/DynamicFields/index.d.ts +0 -40
  50. package/publish/lib/cjs/DynamicFields/index.js +0 -810
  51. package/publish/lib/cjs/EventCalendar/index.d.ts +0 -61
  52. package/publish/lib/cjs/EventCalendar/index.js +0 -3740
  53. package/publish/lib/cjs/EventCalendarTimeline/index.d.ts +0 -100
  54. package/publish/lib/cjs/EventCalendarTimeline/index.js +0 -6084
  55. package/publish/lib/cjs/File/index.d.ts +0 -40
  56. package/publish/lib/cjs/File/index.js +0 -1751
  57. package/publish/lib/cjs/HorizontalScrollContent/index.d.ts +0 -14
  58. package/publish/lib/cjs/HorizontalScrollContent/index.js +0 -426
  59. package/publish/lib/cjs/Input/index.d.ts +0 -59
  60. package/publish/lib/cjs/Input/index.js +0 -1455
  61. package/publish/lib/cjs/LiveSearch/index.d.ts +0 -69
  62. package/publish/lib/cjs/LiveSearch/index.js +0 -3626
  63. package/publish/lib/cjs/MasonryLayout/index.d.ts +0 -14
  64. package/publish/lib/cjs/MasonryLayout/index.js +0 -689
  65. package/publish/lib/cjs/ModalDialog/index.d.ts +0 -79
  66. package/publish/lib/cjs/ModalDialog/index.js +0 -1695
  67. package/publish/lib/cjs/ModeSwitch/index.d.ts +0 -17
  68. package/publish/lib/cjs/ModeSwitch/index.js +0 -202
  69. package/publish/lib/cjs/MultilevelDropdownMenu/index.d.ts +0 -20
  70. package/publish/lib/cjs/MultilevelDropdownMenu/index.js +0 -930
  71. package/publish/lib/cjs/MultipleCheckboxes/index.d.ts +0 -41
  72. package/publish/lib/cjs/MultipleCheckboxes/index.js +0 -1717
  73. package/publish/lib/cjs/MultipleSelect/index.d.ts +0 -65
  74. package/publish/lib/cjs/MultipleSelect/index.js +0 -3704
  75. package/publish/lib/cjs/NativeSelect/index.d.ts +0 -37
  76. package/publish/lib/cjs/NativeSelect/index.js +0 -1631
  77. package/publish/lib/cjs/NumberInput/index.d.ts +0 -40
  78. package/publish/lib/cjs/NumberInput/index.js +0 -1188
  79. package/publish/lib/cjs/Pagination/index.d.ts +0 -51
  80. package/publish/lib/cjs/Pagination/index.js +0 -612
  81. package/publish/lib/cjs/Radio/index.d.ts +0 -45
  82. package/publish/lib/cjs/Radio/index.js +0 -1391
  83. package/publish/lib/cjs/RangeSlider/index.d.ts +0 -22
  84. package/publish/lib/cjs/RangeSlider/index.js +0 -2665
  85. package/publish/lib/cjs/RootPortal/index.d.ts +0 -8
  86. package/publish/lib/cjs/RootPortal/index.js +0 -141
  87. package/publish/lib/cjs/ScrollReveal/index.d.ts +0 -21
  88. package/publish/lib/cjs/ScrollReveal/index.js +0 -401
  89. package/publish/lib/cjs/Scrollbar/index.d.ts +0 -17
  90. package/publish/lib/cjs/Scrollbar/index.js +0 -1107
  91. package/publish/lib/cjs/SearchBar/index.d.ts +0 -41
  92. package/publish/lib/cjs/SearchBar/index.js +0 -701
  93. package/publish/lib/cjs/Select/index.d.ts +0 -99
  94. package/publish/lib/cjs/Select/index.js +0 -5697
  95. package/publish/lib/cjs/ShowMoreLess/index.d.ts +0 -36
  96. package/publish/lib/cjs/ShowMoreLess/index.js +0 -387
  97. package/publish/lib/cjs/Switch/index.d.ts +0 -25
  98. package/publish/lib/cjs/Switch/index.js +0 -628
  99. package/publish/lib/cjs/Table/index.d.ts +0 -12
  100. package/publish/lib/cjs/Table/index.js +0 -2062
  101. package/publish/lib/cjs/Tabs/index.d.ts +0 -3
  102. package/publish/lib/cjs/Tabs/index.js +0 -771
  103. package/publish/lib/cjs/TagInput/index.d.ts +0 -31
  104. package/publish/lib/cjs/TagInput/index.js +0 -1144
  105. package/publish/lib/cjs/Textarea/index.d.ts +0 -50
  106. package/publish/lib/cjs/Textarea/index.js +0 -1784
  107. package/publish/lib/cjs/Toast/index.d.ts +0 -34
  108. package/publish/lib/cjs/Toast/index.js +0 -861
  109. package/publish/lib/cjs/Tooltip/index.d.ts +0 -23
  110. package/publish/lib/cjs/Tooltip/index.js +0 -1674
  111. package/publish/lib/cjs/Tree/index.d.ts +0 -62
  112. package/publish/lib/cjs/Tree/index.js +0 -1960
  113. package/publish/lib/cjs/Utils/anim.d.ts +0 -11
  114. package/publish/lib/cjs/Utils/anim.js +0 -400
  115. package/publish/lib/cjs/Utils/bodyScrollLock.d.ts +0 -8
  116. package/publish/lib/cjs/Utils/bodyScrollLock.js +0 -311
  117. package/publish/lib/cjs/Utils/buffer.d.ts +0 -67
  118. package/publish/lib/cjs/Utils/buffer.js +0 -343
  119. package/publish/lib/cjs/Utils/cls.d.ts +0 -15
  120. package/publish/lib/cjs/Utils/cls.js +0 -124
  121. package/publish/lib/cjs/Utils/convert.d.ts +0 -25
  122. package/publish/lib/cjs/Utils/convert.js +0 -109
  123. package/publish/lib/cjs/Utils/date.d.ts +0 -217
  124. package/publish/lib/cjs/Utils/date.js +0 -567
  125. package/publish/lib/cjs/Utils/dom.d.ts +0 -13
  126. package/publish/lib/cjs/Utils/dom.js +0 -215
  127. package/publish/lib/cjs/Utils/easing.d.ts +0 -29
  128. package/publish/lib/cjs/Utils/easing.js +0 -221
  129. package/publish/lib/cjs/Utils/extract.d.ts +0 -28
  130. package/publish/lib/cjs/Utils/extract.js +0 -130
  131. package/publish/lib/cjs/Utils/getElementProperty.d.ts +0 -52
  132. package/publish/lib/cjs/Utils/getElementProperty.js +0 -189
  133. package/publish/lib/cjs/Utils/guid.d.ts +0 -7
  134. package/publish/lib/cjs/Utils/guid.js +0 -67
  135. package/publish/lib/cjs/Utils/initDefaultOptions.d.ts +0 -21
  136. package/publish/lib/cjs/Utils/initDefaultOptions.js +0 -131
  137. package/publish/lib/cjs/Utils/inputsCalculation.d.ts +0 -28
  138. package/publish/lib/cjs/Utils/inputsCalculation.js +0 -188
  139. package/publish/lib/cjs/Utils/math.d.ts +0 -77
  140. package/publish/lib/cjs/Utils/math.js +0 -305
  141. package/publish/lib/cjs/Utils/object.d.ts +0 -18
  142. package/publish/lib/cjs/Utils/object.js +0 -120
  143. package/publish/lib/cjs/Utils/os.d.ts +0 -2
  144. package/publish/lib/cjs/Utils/os.js +0 -104
  145. package/publish/lib/cjs/Utils/performance.d.ts +0 -3
  146. package/publish/lib/cjs/Utils/performance.js +0 -94
  147. package/publish/lib/cjs/Utils/tree.d.ts +0 -40
  148. package/publish/lib/cjs/Utils/tree.js +0 -195
  149. package/publish/lib/cjs/Utils/useAutosizeTextArea.d.ts +0 -10
  150. package/publish/lib/cjs/Utils/useAutosizeTextArea.js +0 -227
  151. package/publish/lib/cjs/Utils/useBoundedDrag.d.ts +0 -125
  152. package/publish/lib/cjs/Utils/useBoundedDrag.js +0 -380
  153. package/publish/lib/cjs/Utils/useClickOutside.d.ts +0 -33
  154. package/publish/lib/cjs/Utils/useClickOutside.js +0 -166
  155. package/publish/lib/cjs/Utils/useComId.d.ts +0 -6
  156. package/publish/lib/cjs/Utils/useComId.js +0 -114
  157. package/publish/lib/cjs/Utils/useDebounce.d.ts +0 -20
  158. package/publish/lib/cjs/Utils/useDebounce.js +0 -138
  159. package/publish/lib/cjs/Utils/useDragDropPosition.d.ts +0 -169
  160. package/publish/lib/cjs/Utils/useDragDropPosition.js +0 -456
  161. package/publish/lib/cjs/Utils/useDraggable.d.ts +0 -62
  162. package/publish/lib/cjs/Utils/useDraggable.js +0 -348
  163. package/publish/lib/cjs/Utils/useInterval.d.ts +0 -5
  164. package/publish/lib/cjs/Utils/useInterval.js +0 -168
  165. package/publish/lib/cjs/Utils/useIsMobile.d.ts +0 -2
  166. package/publish/lib/cjs/Utils/useIsMobile.js +0 -168
  167. package/publish/lib/cjs/Utils/useKeyPress.d.ts +0 -44
  168. package/publish/lib/cjs/Utils/useKeyPress.js +0 -200
  169. package/publish/lib/cjs/Utils/useThrottle.d.ts +0 -2
  170. package/publish/lib/cjs/Utils/useThrottle.js +0 -136
  171. package/publish/lib/cjs/Utils/useWindowScroll.d.ts +0 -12
  172. package/publish/lib/cjs/Utils/useWindowScroll.js +0 -217
  173. package/publish/lib/cjs/Utils/viewport.d.ts +0 -7
  174. package/publish/lib/cjs/Utils/viewport.js +0 -64
  175. package/publish/lib/cjs/index.d.ts +0 -45
  176. package/publish/lib/cjs/index.js +0 -46
  177. package/publish/lib/css/BackToTop/index.css +0 -34
  178. package/publish/lib/css/CascadingSelect/index.css +0 -216
  179. package/publish/lib/css/CascadingSelectE2E/index.css +0 -216
  180. package/publish/lib/css/ColorPicker/index.css +0 -58
  181. package/publish/lib/css/Date/index.css +0 -434
  182. package/publish/lib/css/DragDropList/index.css +0 -188
  183. package/publish/lib/css/DropdownMenu/index.css +0 -151
  184. package/publish/lib/css/EventCalendar/index.css +0 -300
  185. package/publish/lib/css/EventCalendarTimeline/index.css +0 -694
  186. package/publish/lib/css/HorizontalScrollContent/index.css +0 -70
  187. package/publish/lib/css/LiveSearch/index.css +0 -55
  188. package/publish/lib/css/MultilevelDropdownMenu/index.css +0 -38
  189. package/publish/lib/css/MultipleSelect/index.css +0 -313
  190. package/publish/lib/css/RangeSlider/index.css +0 -150
  191. package/publish/lib/css/Scrollbar/index.css +0 -176
  192. package/publish/lib/css/Select/index.css +0 -368
  193. package/publish/lib/css/ShowMoreLess/index.css +0 -23
  194. package/publish/lib/css/Table/index.css +0 -584
  195. package/publish/lib/css/TagInput/index.css +0 -91
  196. package/publish/lib/css/Toast/index.css +0 -201
  197. package/publish/lib/css/Tooltip/index.css +0 -197
  198. package/publish/lib/css/Tree/index.css +0 -232
  199. package/publish/lib/esm/Accordion/Accordion.tsx +0 -184
  200. package/publish/lib/esm/Accordion/AccordionItem.tsx +0 -143
  201. package/publish/lib/esm/Accordion/index.tsx +0 -2
  202. package/publish/lib/esm/BackToTop/index.scss +0 -47
  203. package/publish/lib/esm/BackToTop/index.tsx +0 -177
  204. package/publish/lib/esm/CascadingSelect/Group.tsx +0 -82
  205. package/publish/lib/esm/CascadingSelect/index.scss +0 -291
  206. package/publish/lib/esm/CascadingSelect/index.tsx +0 -1203
  207. package/publish/lib/esm/CascadingSelectE2E/Group.tsx +0 -83
  208. package/publish/lib/esm/CascadingSelectE2E/index.scss +0 -293
  209. package/publish/lib/esm/CascadingSelectE2E/index.tsx +0 -1471
  210. package/publish/lib/esm/Checkbox/index.tsx +0 -193
  211. package/publish/lib/esm/ColorPicker/index.scss +0 -91
  212. package/publish/lib/esm/ColorPicker/index.tsx +0 -204
  213. package/publish/lib/esm/Date/Calendar.tsx +0 -723
  214. package/publish/lib/esm/Date/index.scss +0 -567
  215. package/publish/lib/esm/Date/index.tsx +0 -1683
  216. package/publish/lib/esm/Date/localization/en_US.js +0 -13
  217. package/publish/lib/esm/Date/localization/zh_CN.js +0 -12
  218. package/publish/lib/esm/DigitalClock/index.tsx +0 -74
  219. package/publish/lib/esm/DragDropList/index.scss +0 -245
  220. package/publish/lib/esm/DragDropList/index.tsx +0 -494
  221. package/publish/lib/esm/DropdownMenu/Option.tsx +0 -55
  222. package/publish/lib/esm/DropdownMenu/index.scss +0 -205
  223. package/publish/lib/esm/DropdownMenu/index.tsx +0 -377
  224. package/publish/lib/esm/DynamicFields/index.tsx +0 -404
  225. package/publish/lib/esm/EventCalendar/index.scss +0 -407
  226. package/publish/lib/esm/EventCalendar/index.tsx +0 -1004
  227. package/publish/lib/esm/EventCalendarTimeline/index.scss +0 -926
  228. package/publish/lib/esm/EventCalendarTimeline/index.tsx +0 -2683
  229. package/publish/lib/esm/File/index.tsx +0 -477
  230. package/publish/lib/esm/HorizontalScrollContent/index.scss +0 -87
  231. package/publish/lib/esm/HorizontalScrollContent/index.tsx +0 -171
  232. package/publish/lib/esm/Input/index.tsx +0 -614
  233. package/publish/lib/esm/LiveSearch/index.scss +0 -82
  234. package/publish/lib/esm/LiveSearch/index.tsx +0 -960
  235. package/publish/lib/esm/MasonryLayout/index.tsx +0 -326
  236. package/publish/lib/esm/ModalDialog/index.tsx +0 -552
  237. package/publish/lib/esm/ModeSwitch/index.tsx +0 -82
  238. package/publish/lib/esm/MultilevelDropdownMenu/ItemList.tsx +0 -265
  239. package/publish/lib/esm/MultilevelDropdownMenu/index.scss +0 -79
  240. package/publish/lib/esm/MultilevelDropdownMenu/index.tsx +0 -77
  241. package/publish/lib/esm/MultipleCheckboxes/index.tsx +0 -669
  242. package/publish/lib/esm/MultipleSelect/index.scss +0 -398
  243. package/publish/lib/esm/MultipleSelect/index.tsx +0 -766
  244. package/publish/lib/esm/MultipleSelect/utils/func.ts +0 -61
  245. package/publish/lib/esm/NativeSelect/index.tsx +0 -396
  246. package/publish/lib/esm/NativeSelect/utils/func.ts +0 -49
  247. package/publish/lib/esm/NumberInput/index.tsx +0 -385
  248. package/publish/lib/esm/Pagination/index.tsx +0 -286
  249. package/publish/lib/esm/Pagination/pagination-navigators.tsx +0 -60
  250. package/publish/lib/esm/Radio/index.tsx +0 -670
  251. package/publish/lib/esm/RangeSlider/index.scss +0 -186
  252. package/publish/lib/esm/RangeSlider/index.tsx +0 -241
  253. package/publish/lib/esm/RootPortal/index.tsx +0 -53
  254. package/publish/lib/esm/ScrollReveal/index.tsx +0 -148
  255. package/publish/lib/esm/Scrollbar/index.scss +0 -221
  256. package/publish/lib/esm/Scrollbar/index.tsx +0 -561
  257. package/publish/lib/esm/SearchBar/index.tsx +0 -253
  258. package/publish/lib/esm/Select/index.scss +0 -553
  259. package/publish/lib/esm/Select/index.tsx +0 -2816
  260. package/publish/lib/esm/Select/utils/func.ts +0 -106
  261. package/publish/lib/esm/ShowMoreLess/index.scss +0 -27
  262. package/publish/lib/esm/ShowMoreLess/index.tsx +0 -145
  263. package/publish/lib/esm/Switch/index.tsx +0 -147
  264. package/publish/lib/esm/Table/Table.tsx +0 -257
  265. package/publish/lib/esm/Table/TableBody.tsx +0 -41
  266. package/publish/lib/esm/Table/TableCaption.tsx +0 -34
  267. package/publish/lib/esm/Table/TableCell.tsx +0 -123
  268. package/publish/lib/esm/Table/TableColgroup.tsx +0 -38
  269. package/publish/lib/esm/Table/TableContext.tsx +0 -26
  270. package/publish/lib/esm/Table/TableFoot.tsx +0 -28
  271. package/publish/lib/esm/Table/TableHead.tsx +0 -28
  272. package/publish/lib/esm/Table/TableRow.tsx +0 -76
  273. package/publish/lib/esm/Table/index.scss +0 -418
  274. package/publish/lib/esm/Table/index.tsx +0 -14
  275. package/publish/lib/esm/Table/utils/DragHandleSprite.tsx +0 -46
  276. package/publish/lib/esm/Table/utils/SortSprite.tsx +0 -57
  277. package/publish/lib/esm/Table/utils/TableFilter.tsx +0 -56
  278. package/publish/lib/esm/Table/utils/ToggleSelection.tsx +0 -225
  279. package/publish/lib/esm/Table/utils/func.ts +0 -171
  280. package/publish/lib/esm/Table/utils/hooks/useTableDraggable.tsx +0 -342
  281. package/publish/lib/esm/Table/utils/hooks/useTableKeyPress.tsx +0 -154
  282. package/publish/lib/esm/Table/utils/hooks/useTableResponsive.tsx +0 -92
  283. package/publish/lib/esm/Table/utils/hooks/useTableSort.tsx +0 -143
  284. package/publish/lib/esm/Tabs/TabList.tsx +0 -50
  285. package/publish/lib/esm/Tabs/TabPanel.tsx +0 -44
  286. package/publish/lib/esm/Tabs/Tabs.tsx +0 -282
  287. package/publish/lib/esm/Tabs/index.tsx +0 -3
  288. package/publish/lib/esm/TagInput/index.scss +0 -126
  289. package/publish/lib/esm/TagInput/index.tsx +0 -352
  290. package/publish/lib/esm/Textarea/index.tsx +0 -608
  291. package/publish/lib/esm/Toast/Item.tsx +0 -124
  292. package/publish/lib/esm/Toast/index.scss +0 -269
  293. package/publish/lib/esm/Toast/index.tsx +0 -374
  294. package/publish/lib/esm/Tooltip/index.scss +0 -269
  295. package/publish/lib/esm/Tooltip/index.tsx +0 -312
  296. package/publish/lib/esm/Tree/TreeList.tsx +0 -616
  297. package/publish/lib/esm/Tree/index.scss +0 -386
  298. package/publish/lib/esm/Tree/index.tsx +0 -396
  299. package/publish/lib/esm/Tree/init-height.tsx +0 -27
  300. package/publish/lib/esm/Tree/utils/func.ts +0 -15
  301. package/publish/lib/esm/Utils/hooks/useAutosizeTextArea.tsx +0 -125
  302. package/publish/lib/esm/Utils/hooks/useBoundedDrag.tsx +0 -301
  303. package/publish/lib/esm/Utils/hooks/useClickOutside.tsx +0 -69
  304. package/publish/lib/esm/Utils/hooks/useComId.tsx +0 -13
  305. package/publish/lib/esm/Utils/hooks/useDebounce.tsx +0 -40
  306. package/publish/lib/esm/Utils/hooks/useDragDropPosition.tsx +0 -420
  307. package/publish/lib/esm/Utils/hooks/useDraggable.tsx +0 -265
  308. package/publish/lib/esm/Utils/hooks/useInterval.tsx +0 -74
  309. package/publish/lib/esm/Utils/hooks/useIsMobile.tsx +0 -56
  310. package/publish/lib/esm/Utils/hooks/useKeyPress.tsx +0 -104
  311. package/publish/lib/esm/Utils/hooks/useThrottle.tsx +0 -39
  312. package/publish/lib/esm/Utils/hooks/useWindowScroll.tsx +0 -83
  313. package/publish/lib/esm/Utils/libs/anim.ts +0 -96
  314. package/publish/lib/esm/Utils/libs/buffer.ts +0 -262
  315. package/publish/lib/esm/Utils/libs/cls.ts +0 -64
  316. package/publish/lib/esm/Utils/libs/convert.ts +0 -59
  317. package/publish/lib/esm/Utils/libs/date.ts +0 -578
  318. package/publish/lib/esm/Utils/libs/dom.ts +0 -150
  319. package/publish/lib/esm/Utils/libs/easing.ts +0 -201
  320. package/publish/lib/esm/Utils/libs/extract.ts +0 -86
  321. package/publish/lib/esm/Utils/libs/getElementProperty.ts +0 -150
  322. package/publish/lib/esm/Utils/libs/guid.ts +0 -16
  323. package/publish/lib/esm/Utils/libs/initDefaultOptions.ts +0 -104
  324. package/publish/lib/esm/Utils/libs/inputsCalculation.ts +0 -160
  325. package/publish/lib/esm/Utils/libs/math.ts +0 -276
  326. package/publish/lib/esm/Utils/libs/object.ts +0 -68
  327. package/publish/lib/esm/Utils/libs/os.ts +0 -63
  328. package/publish/lib/esm/Utils/libs/performance.ts +0 -47
  329. package/publish/lib/esm/Utils/libs/tree.ts +0 -119
  330. package/publish/lib/esm/Utils/libs/viewport.ts +0 -20
  331. package/publish/lib/esm/Utils/plugins/bodyScrollLock.ts +0 -286
  332. package/publish/lib/esm/index.js +0 -43
  333. package/publish/package.json +0 -1
  334. /package/{publish/Accordion → Accordion}/index.d.ts +0 -0
  335. /package/{publish/Accordion → Accordion}/index.js +0 -0
  336. /package/{publish/BackToTop → BackToTop}/index.css +0 -0
  337. /package/{publish/BackToTop → BackToTop}/index.d.ts +0 -0
  338. /package/{publish/BackToTop → BackToTop}/index.js +0 -0
  339. /package/{publish/CascadingSelect → CascadingSelect}/index.css +0 -0
  340. /package/{publish/CascadingSelect → CascadingSelect}/index.d.ts +0 -0
  341. /package/{publish/CascadingSelect → CascadingSelect}/index.js +0 -0
  342. /package/{publish/CascadingSelectE2E → CascadingSelectE2E}/index.css +0 -0
  343. /package/{publish/CascadingSelectE2E → CascadingSelectE2E}/index.d.ts +0 -0
  344. /package/{publish/CascadingSelectE2E → CascadingSelectE2E}/index.js +0 -0
  345. /package/{publish/Checkbox → Checkbox}/index.d.ts +0 -0
  346. /package/{publish/Checkbox → Checkbox}/index.js +0 -0
  347. /package/{publish/ColorPicker → ColorPicker}/index.css +0 -0
  348. /package/{publish/ColorPicker → ColorPicker}/index.d.ts +0 -0
  349. /package/{publish/ColorPicker → ColorPicker}/index.js +0 -0
  350. /package/{publish/Date → Date}/index.css +0 -0
  351. /package/{publish/Date → Date}/index.d.ts +0 -0
  352. /package/{publish/Date → Date}/index.js +0 -0
  353. /package/{publish/DigitalClock → DigitalClock}/index.d.ts +0 -0
  354. /package/{publish/DigitalClock → DigitalClock}/index.js +0 -0
  355. /package/{publish/DragDropList → DragDropList}/index.css +0 -0
  356. /package/{publish/DragDropList → DragDropList}/index.d.ts +0 -0
  357. /package/{publish/DragDropList → DragDropList}/index.js +0 -0
  358. /package/{publish/DropdownMenu → DropdownMenu}/index.css +0 -0
  359. /package/{publish/DropdownMenu → DropdownMenu}/index.d.ts +0 -0
  360. /package/{publish/DropdownMenu → DropdownMenu}/index.js +0 -0
  361. /package/{publish/DynamicFields → DynamicFields}/index.d.ts +0 -0
  362. /package/{publish/DynamicFields → DynamicFields}/index.js +0 -0
  363. /package/{publish/EventCalendar → EventCalendar}/index.css +0 -0
  364. /package/{publish/EventCalendar → EventCalendar}/index.d.ts +0 -0
  365. /package/{publish/EventCalendar → EventCalendar}/index.js +0 -0
  366. /package/{publish/EventCalendarTimeline → EventCalendarTimeline}/index.css +0 -0
  367. /package/{publish/EventCalendarTimeline → EventCalendarTimeline}/index.d.ts +0 -0
  368. /package/{publish/EventCalendarTimeline → EventCalendarTimeline}/index.js +0 -0
  369. /package/{publish/File → File}/index.d.ts +0 -0
  370. /package/{publish/File → File}/index.js +0 -0
  371. /package/{publish/HorizontalScrollContent → HorizontalScrollContent}/index.css +0 -0
  372. /package/{publish/HorizontalScrollContent → HorizontalScrollContent}/index.d.ts +0 -0
  373. /package/{publish/HorizontalScrollContent → HorizontalScrollContent}/index.js +0 -0
  374. /package/{publish/Input → Input}/index.d.ts +0 -0
  375. /package/{publish/Input → Input}/index.js +0 -0
  376. /package/{publish/LiveSearch → LiveSearch}/index.css +0 -0
  377. /package/{publish/LiveSearch → LiveSearch}/index.d.ts +0 -0
  378. /package/{publish/LiveSearch → LiveSearch}/index.js +0 -0
  379. /package/{publish/MasonryLayout → MasonryLayout}/index.d.ts +0 -0
  380. /package/{publish/MasonryLayout → MasonryLayout}/index.js +0 -0
  381. /package/{publish/ModalDialog → ModalDialog}/index.d.ts +0 -0
  382. /package/{publish/ModalDialog → ModalDialog}/index.js +0 -0
  383. /package/{publish/ModeSwitch → ModeSwitch}/index.d.ts +0 -0
  384. /package/{publish/ModeSwitch → ModeSwitch}/index.js +0 -0
  385. /package/{publish/MultilevelDropdownMenu → MultilevelDropdownMenu}/index.css +0 -0
  386. /package/{publish/MultilevelDropdownMenu → MultilevelDropdownMenu}/index.d.ts +0 -0
  387. /package/{publish/MultilevelDropdownMenu → MultilevelDropdownMenu}/index.js +0 -0
  388. /package/{publish/MultipleCheckboxes → MultipleCheckboxes}/index.d.ts +0 -0
  389. /package/{publish/MultipleCheckboxes → MultipleCheckboxes}/index.js +0 -0
  390. /package/{publish/MultipleSelect → MultipleSelect}/index.css +0 -0
  391. /package/{publish/MultipleSelect → MultipleSelect}/index.d.ts +0 -0
  392. /package/{publish/MultipleSelect → MultipleSelect}/index.js +0 -0
  393. /package/{publish/NativeSelect → NativeSelect}/index.d.ts +0 -0
  394. /package/{publish/NativeSelect → NativeSelect}/index.js +0 -0
  395. /package/{publish/NumberInput → NumberInput}/index.d.ts +0 -0
  396. /package/{publish/NumberInput → NumberInput}/index.js +0 -0
  397. /package/{publish/Pagination → Pagination}/index.d.ts +0 -0
  398. /package/{publish/Pagination → Pagination}/index.js +0 -0
  399. /package/{publish/Radio → Radio}/index.d.ts +0 -0
  400. /package/{publish/Radio → Radio}/index.js +0 -0
  401. /package/{publish/RangeSlider → RangeSlider}/index.css +0 -0
  402. /package/{publish/RangeSlider → RangeSlider}/index.d.ts +0 -0
  403. /package/{publish/RangeSlider → RangeSlider}/index.js +0 -0
  404. /package/{publish/RootPortal → RootPortal}/index.d.ts +0 -0
  405. /package/{publish/RootPortal → RootPortal}/index.js +0 -0
  406. /package/{publish/ScrollReveal → ScrollReveal}/index.d.ts +0 -0
  407. /package/{publish/ScrollReveal → ScrollReveal}/index.js +0 -0
  408. /package/{publish/Scrollbar → Scrollbar}/index.css +0 -0
  409. /package/{publish/Scrollbar → Scrollbar}/index.d.ts +0 -0
  410. /package/{publish/Scrollbar → Scrollbar}/index.js +0 -0
  411. /package/{publish/SearchBar → SearchBar}/index.d.ts +0 -0
  412. /package/{publish/SearchBar → SearchBar}/index.js +0 -0
  413. /package/{publish/Select → Select}/index.css +0 -0
  414. /package/{publish/Select → Select}/index.d.ts +0 -0
  415. /package/{publish/Select → Select}/index.js +0 -0
  416. /package/{publish/ShowMoreLess → ShowMoreLess}/index.css +0 -0
  417. /package/{publish/ShowMoreLess → ShowMoreLess}/index.d.ts +0 -0
  418. /package/{publish/ShowMoreLess → ShowMoreLess}/index.js +0 -0
  419. /package/{publish/Switch → Switch}/index.d.ts +0 -0
  420. /package/{publish/Switch → Switch}/index.js +0 -0
  421. /package/{publish/Table → Table}/index.css +0 -0
  422. /package/{publish/Table → Table}/index.d.ts +0 -0
  423. /package/{publish/Table → Table}/index.js +0 -0
  424. /package/{publish/Tabs → Tabs}/index.d.ts +0 -0
  425. /package/{publish/Tabs → Tabs}/index.js +0 -0
  426. /package/{publish/TagInput → TagInput}/index.css +0 -0
  427. /package/{publish/TagInput → TagInput}/index.d.ts +0 -0
  428. /package/{publish/TagInput → TagInput}/index.js +0 -0
  429. /package/{publish/Textarea → Textarea}/index.d.ts +0 -0
  430. /package/{publish/Textarea → Textarea}/index.js +0 -0
  431. /package/{publish/Toast → Toast}/index.css +0 -0
  432. /package/{publish/Toast → Toast}/index.d.ts +0 -0
  433. /package/{publish/Toast → Toast}/index.js +0 -0
  434. /package/{publish/Tooltip → Tooltip}/index.css +0 -0
  435. /package/{publish/Tooltip → Tooltip}/index.d.ts +0 -0
  436. /package/{publish/Tooltip → Tooltip}/index.js +0 -0
  437. /package/{publish/Tree → Tree}/index.css +0 -0
  438. /package/{publish/Tree → Tree}/index.d.ts +0 -0
  439. /package/{publish/Tree → Tree}/index.js +0 -0
  440. /package/{publish/Utils → Utils}/anim.d.ts +0 -0
  441. /package/{publish/Utils → Utils}/anim.js +0 -0
  442. /package/{publish/Utils → Utils}/bodyScrollLock.d.ts +0 -0
  443. /package/{publish/Utils → Utils}/bodyScrollLock.js +0 -0
  444. /package/{publish/Utils → Utils}/buffer.d.ts +0 -0
  445. /package/{publish/Utils → Utils}/buffer.js +0 -0
  446. /package/{publish/Utils → Utils}/cls.d.ts +0 -0
  447. /package/{publish/Utils → Utils}/cls.js +0 -0
  448. /package/{publish/Utils → Utils}/convert.d.ts +0 -0
  449. /package/{publish/Utils → Utils}/convert.js +0 -0
  450. /package/{publish/Utils → Utils}/date.d.ts +0 -0
  451. /package/{publish/Utils → Utils}/date.js +0 -0
  452. /package/{publish/Utils → Utils}/dom.d.ts +0 -0
  453. /package/{publish/Utils → Utils}/dom.js +0 -0
  454. /package/{publish/Utils → Utils}/easing.d.ts +0 -0
  455. /package/{publish/Utils → Utils}/easing.js +0 -0
  456. /package/{publish/Utils → Utils}/extract.d.ts +0 -0
  457. /package/{publish/Utils → Utils}/extract.js +0 -0
  458. /package/{publish/Utils → Utils}/getElementProperty.d.ts +0 -0
  459. /package/{publish/Utils → Utils}/getElementProperty.js +0 -0
  460. /package/{publish/Utils → Utils}/guid.d.ts +0 -0
  461. /package/{publish/Utils → Utils}/guid.js +0 -0
  462. /package/{publish/Utils → Utils}/initDefaultOptions.d.ts +0 -0
  463. /package/{publish/Utils → Utils}/initDefaultOptions.js +0 -0
  464. /package/{publish/Utils → Utils}/inputsCalculation.d.ts +0 -0
  465. /package/{publish/Utils → Utils}/inputsCalculation.js +0 -0
  466. /package/{publish/Utils → Utils}/math.d.ts +0 -0
  467. /package/{publish/Utils → Utils}/math.js +0 -0
  468. /package/{publish/Utils → Utils}/object.d.ts +0 -0
  469. /package/{publish/Utils → Utils}/object.js +0 -0
  470. /package/{publish/Utils → Utils}/os.d.ts +0 -0
  471. /package/{publish/Utils → Utils}/os.js +0 -0
  472. /package/{publish/Utils → Utils}/performance.d.ts +0 -0
  473. /package/{publish/Utils → Utils}/performance.js +0 -0
  474. /package/{publish/Utils → Utils}/tree.d.ts +0 -0
  475. /package/{publish/Utils → Utils}/tree.js +0 -0
  476. /package/{publish/Utils → Utils}/useAutosizeTextArea.d.ts +0 -0
  477. /package/{publish/Utils → Utils}/useAutosizeTextArea.js +0 -0
  478. /package/{publish/Utils → Utils}/useBoundedDrag.d.ts +0 -0
  479. /package/{publish/Utils → Utils}/useBoundedDrag.js +0 -0
  480. /package/{publish/Utils → Utils}/useClickOutside.d.ts +0 -0
  481. /package/{publish/Utils → Utils}/useClickOutside.js +0 -0
  482. /package/{publish/Utils → Utils}/useComId.d.ts +0 -0
  483. /package/{publish/Utils → Utils}/useComId.js +0 -0
  484. /package/{publish/Utils → Utils}/useDebounce.d.ts +0 -0
  485. /package/{publish/Utils → Utils}/useDebounce.js +0 -0
  486. /package/{publish/Utils → Utils}/useDragDropPosition.d.ts +0 -0
  487. /package/{publish/Utils → Utils}/useDragDropPosition.js +0 -0
  488. /package/{publish/Utils → Utils}/useDraggable.d.ts +0 -0
  489. /package/{publish/Utils → Utils}/useDraggable.js +0 -0
  490. /package/{publish/Utils → Utils}/useInterval.d.ts +0 -0
  491. /package/{publish/Utils → Utils}/useInterval.js +0 -0
  492. /package/{publish/Utils → Utils}/useIsMobile.d.ts +0 -0
  493. /package/{publish/Utils → Utils}/useIsMobile.js +0 -0
  494. /package/{publish/Utils → Utils}/useKeyPress.d.ts +0 -0
  495. /package/{publish/Utils → Utils}/useKeyPress.js +0 -0
  496. /package/{publish/Utils → Utils}/useThrottle.d.ts +0 -0
  497. /package/{publish/Utils → Utils}/useThrottle.js +0 -0
  498. /package/{publish/Utils → Utils}/useWindowScroll.d.ts +0 -0
  499. /package/{publish/Utils → Utils}/useWindowScroll.js +0 -0
  500. /package/{publish/Utils → Utils}/viewport.d.ts +0 -0
  501. /package/{publish/Utils → Utils}/viewport.js +0 -0
@@ -1,2943 +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
- /***/ 909:
15
- /***/ (function(module, exports, __webpack_require__) {
16
-
17
- /* module decorator */ module = __webpack_require__.nmd(module);
18
- var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
19
- (function webpackUniversalModuleDefinition(root, factory) {
20
- if (( false ? 0 : _typeof(exports)) === 'object' && ( false ? 0 : _typeof(module)) === 'object') module.exports = factory(__webpack_require__(787), __webpack_require__(156));else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(787), __webpack_require__(156)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
21
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
22
- (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
23
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
24
- })(this, function (__WEBPACK_EXTERNAL_MODULE__787__, __WEBPACK_EXTERNAL_MODULE__156__) {
25
- return (/******/function () {
26
- // webpackBootstrap
27
- /******/
28
- "use strict";
29
-
30
- /******/
31
- var __webpack_modules__ = {
32
- /***/787: /***/function _(module) {
33
- module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
34
-
35
- /***/
36
- },
37
-
38
- /***/156: /***/function _(module) {
39
- module.exports = __WEBPACK_EXTERNAL_MODULE__156__;
40
-
41
- /***/
42
- }
43
-
44
- /******/
45
- };
46
- /************************************************************************/
47
- /******/ // The module cache
48
- /******/
49
- var __webpack_module_cache__ = {};
50
- /******/
51
- /******/ // The require function
52
- /******/
53
- function __nested_webpack_require_1708__(moduleId) {
54
- /******/ // Check if module is in cache
55
- /******/var cachedModule = __webpack_module_cache__[moduleId];
56
- /******/
57
- if (cachedModule !== undefined) {
58
- /******/return cachedModule.exports;
59
- /******/
60
- }
61
- /******/ // Create a new module (and put it into the cache)
62
- /******/
63
- var module = __webpack_module_cache__[moduleId] = {
64
- /******/ // no module.id needed
65
- /******/ // no module.loaded needed
66
- /******/exports: {}
67
- /******/
68
- };
69
- /******/
70
- /******/ // Execute the module function
71
- /******/
72
- __webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_1708__);
73
- /******/
74
- /******/ // Return the exports of the module
75
- /******/
76
- return module.exports;
77
- /******/
78
- }
79
- /******/
80
- /************************************************************************/
81
- /******/ /* webpack/runtime/compat get default export */
82
- /******/
83
- (function () {
84
- /******/ // getDefaultExport function for compatibility with non-harmony modules
85
- /******/__nested_webpack_require_1708__.n = function (module) {
86
- /******/var getter = module && module.__esModule ? /******/function () {
87
- return module['default'];
88
- } : /******/function () {
89
- return module;
90
- };
91
- /******/
92
- __nested_webpack_require_1708__.d(getter, {
93
- a: getter
94
- });
95
- /******/
96
- return getter;
97
- /******/
98
- };
99
- /******/
100
- })();
101
- /******/
102
- /******/ /* webpack/runtime/define property getters */
103
- /******/
104
- (function () {
105
- /******/ // define getter functions for harmony exports
106
- /******/__nested_webpack_require_1708__.d = function (exports, definition) {
107
- /******/for (var key in definition) {
108
- /******/if (__nested_webpack_require_1708__.o(definition, key) && !__nested_webpack_require_1708__.o(exports, key)) {
109
- /******/Object.defineProperty(exports, key, {
110
- enumerable: true,
111
- get: definition[key]
112
- });
113
- /******/
114
- }
115
- /******/
116
- }
117
- /******/
118
- };
119
- /******/
120
- })();
121
- /******/
122
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
123
- /******/
124
- (function () {
125
- /******/__nested_webpack_require_1708__.o = function (obj, prop) {
126
- return Object.prototype.hasOwnProperty.call(obj, prop);
127
- };
128
- /******/
129
- })();
130
- /******/
131
- /******/ /* webpack/runtime/make namespace object */
132
- /******/
133
- (function () {
134
- /******/ // define __esModule on exports
135
- /******/__nested_webpack_require_1708__.r = function (exports) {
136
- /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
137
- /******/Object.defineProperty(exports, Symbol.toStringTag, {
138
- value: 'Module'
139
- });
140
- /******/
141
- }
142
- /******/
143
- Object.defineProperty(exports, '__esModule', {
144
- value: true
145
- });
146
- /******/
147
- };
148
- /******/
149
- })();
150
- /******/
151
- /************************************************************************/
152
- var __webpack_exports__ = {};
153
- // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
154
- (function () {
155
- __nested_webpack_require_1708__.r(__webpack_exports__);
156
- /* harmony export */
157
- __nested_webpack_require_1708__.d(__webpack_exports__, {
158
- /* harmony export */"default": function _default() {
159
- return __WEBPACK_DEFAULT_EXPORT__;
160
- }
161
- /* harmony export */
162
- });
163
- /* harmony import */
164
- var react__WEBPACK_IMPORTED_MODULE_0__ = __nested_webpack_require_1708__(787);
165
- /* harmony import */
166
- var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nested_webpack_require_1708__.n(react__WEBPACK_IMPORTED_MODULE_0__);
167
- /* harmony import */
168
- var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __nested_webpack_require_1708__(156);
169
- /* harmony import */
170
- var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__nested_webpack_require_1708__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);
171
- var RootPortal = function RootPortal(props) {
172
- var containerClassName = props.containerClassName,
173
- show = props.show,
174
- children = props.children;
175
- var containerRef = (0, react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
176
-
177
- // Move HTML templates to tag end body </body>
178
- // render() don't use "Fragment", in order to avoid error "Failed to execute 'insertBefore' on 'Node'"
179
- // prevent "transform", "filter", "perspective" attribute destruction fixed viewport orientation
180
- // ###
181
- // ###
182
- // Use `containerRef.current` to ensure the correctness of the nextjs framework. It may report an error document as undefined
183
-
184
- (0, react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
185
- containerRef.current = document.createElement('div');
186
- containerRef.current.className = "root-portal-container ".concat(containerClassName || '');
187
- document.body.appendChild(containerRef.current);
188
- return function () {
189
- if (containerRef.current) {
190
- containerRef.current.remove();
191
- }
192
- };
193
- }, []);
194
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react__WEBPACK_IMPORTED_MODULE_0___default().Fragment, null, containerRef.current && show && /*#__PURE__*/(0, react_dom__WEBPACK_IMPORTED_MODULE_1__.createPortal)(children, containerRef.current));
195
- };
196
- /* harmony default export */
197
- var __WEBPACK_DEFAULT_EXPORT__ = RootPortal;
198
- })();
199
-
200
- /******/
201
- return __webpack_exports__;
202
- /******/
203
- }()
204
- );
205
- });
206
-
207
- /***/ }),
208
-
209
- /***/ 188:
210
- /***/ (function(module, exports, __webpack_require__) {
211
-
212
- /* module decorator */ module = __webpack_require__.nmd(module);
213
- var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function _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); }
214
- (function webpackUniversalModuleDefinition(root, factory) {
215
- 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),
216
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
217
- (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
218
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
219
- })(this, function () {
220
- return (/******/function () {
221
- // webpackBootstrap
222
- /******/
223
- "use strict";
224
-
225
- /******/ // The require scope
226
- /******/
227
- var __nested_webpack_require_993__ = {};
228
- /******/
229
- /************************************************************************/
230
- /******/ /* webpack/runtime/define property getters */
231
- /******/
232
- (function () {
233
- /******/ // define getter functions for harmony exports
234
- /******/__nested_webpack_require_993__.d = function (exports, definition) {
235
- /******/for (var key in definition) {
236
- /******/if (__nested_webpack_require_993__.o(definition, key) && !__nested_webpack_require_993__.o(exports, key)) {
237
- /******/Object.defineProperty(exports, key, {
238
- enumerable: true,
239
- get: definition[key]
240
- });
241
- /******/
242
- }
243
- /******/
244
- }
245
- /******/
246
- };
247
- /******/
248
- })();
249
- /******/
250
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
251
- /******/
252
- (function () {
253
- /******/__nested_webpack_require_993__.o = function (obj, prop) {
254
- return Object.prototype.hasOwnProperty.call(obj, prop);
255
- };
256
- /******/
257
- })();
258
- /******/
259
- /******/ /* webpack/runtime/make namespace object */
260
- /******/
261
- (function () {
262
- /******/ // define __esModule on exports
263
- /******/__nested_webpack_require_993__.r = function (exports) {
264
- /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
265
- /******/Object.defineProperty(exports, Symbol.toStringTag, {
266
- value: 'Module'
267
- });
268
- /******/
269
- }
270
- /******/
271
- Object.defineProperty(exports, '__esModule', {
272
- value: true
273
- });
274
- /******/
275
- };
276
- /******/
277
- })();
278
- /******/
279
- /************************************************************************/
280
- var __webpack_exports__ = {};
281
- __nested_webpack_require_993__.r(__webpack_exports__);
282
- /* harmony export */
283
- __nested_webpack_require_993__.d(__webpack_exports__, {
284
- /* harmony export */"clsWrite": function clsWrite() {
285
- return (/* binding */_clsWrite
286
- );
287
- },
288
- /* harmony export */"combinedCls": function combinedCls() {
289
- return (/* binding */_combinedCls
290
- );
291
- }
292
- /* harmony export */
293
- });
294
- function _slicedToArray(arr, i) {
295
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
296
- }
297
- function _nonIterableRest() {
298
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
299
- }
300
- function _unsupportedIterableToArray(o, minLen) {
301
- if (!o) return;
302
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
303
- var n = Object.prototype.toString.call(o).slice(8, -1);
304
- if (n === "Object" && o.constructor) n = o.constructor.name;
305
- if (n === "Map" || n === "Set") return Array.from(o);
306
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
307
- }
308
- function _arrayLikeToArray(arr, len) {
309
- if (len == null || len > arr.length) len = arr.length;
310
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
311
- return arr2;
312
- }
313
- function _iterableToArrayLimit(arr, i) {
314
- var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
315
- if (null != _i) {
316
- var _s,
317
- _e,
318
- _x,
319
- _r,
320
- _arr = [],
321
- _n = !0,
322
- _d = !1;
323
- try {
324
- if (_x = (_i = _i.call(arr)).next, 0 === i) {
325
- if (Object(_i) !== _i) return;
326
- _n = !1;
327
- } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
328
- } catch (err) {
329
- _d = !0, _e = err;
330
- } finally {
331
- try {
332
- if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
333
- } finally {
334
- if (_d) throw _e;
335
- }
336
- }
337
- return _arr;
338
- }
339
- }
340
- function _arrayWithHoles(arr) {
341
- if (Array.isArray(arr)) return arr;
342
- }
343
- function _typeof(obj) {
344
- "@babel/helpers - typeof";
345
-
346
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
347
- return typeof obj;
348
- } : function (obj) {
349
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
350
- }, _typeof(obj);
351
- }
352
- /**
353
- * Output of class name
354
- * @param {*} s - Any
355
- * @param {String} defaultCls - Default string
356
- * @param {?*} targetCls - Any
357
- * @returns {*}
358
- */
359
- function _clsWrite(s, defaultCls) {
360
- var targetCls = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
361
- return s || s === '' ? typeof targetCls === 'undefined' ? s : targetCls : defaultCls;
362
- }
363
-
364
- /**
365
- * Combined classnames
366
- * @param {*} args
367
- * @returns {String|undefined}
368
- */
369
- /* Usage:
370
-
371
- console.log(combinedCls('a-1', 'a-2', 'a-3', {
372
- 'p-1': null,
373
- 'p-2': undefined,
374
- 'p-3': true,
375
- 'p-4': false,
376
- 'p-5': 'kkk',
377
- 'p-6': 0,
378
- 'p-7': 1,
379
- 'p-8': '',
380
- undefined
381
- })); // a-1 a-2 a-3 p-3 p-5 p-7
382
- */
383
- function _combinedCls() {
384
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
385
- args[_key] = arguments[_key];
386
- }
387
- if (args) {
388
- var classes = [];
389
- for (var i = 0; i < args.length; i++) {
390
- var className = args[i];
391
- if (!className) {
392
- continue;
393
- }
394
- var type = _typeof(className);
395
- if (type === 'string' || type === 'number') {
396
- classes.push(className);
397
- } else if (type === 'object') {
398
- var _classes = Array.isArray(className) ? className : Object.entries(className).map(function (_ref) {
399
- var _ref2 = _slicedToArray(_ref, 2),
400
- key = _ref2[0],
401
- value = _ref2[1];
402
- return value ? key : null;
403
- });
404
- classes = _classes.length ? classes.concat(_classes.filter(function (c) {
405
- return !!c;
406
- })) : classes;
407
- }
408
- }
409
- return classes.join(' ').trim();
410
- }
411
- return undefined;
412
- }
413
-
414
- /******/
415
- return __webpack_exports__;
416
- /******/
417
- }()
418
- );
419
- });
420
-
421
- /***/ }),
422
-
423
- /***/ 79:
424
- /***/ (function(module, exports, __webpack_require__) {
425
-
426
- /* module decorator */ module = __webpack_require__.nmd(module);
427
- 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); }
428
- (function webpackUniversalModuleDefinition(root, factory) {
429
- 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),
430
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
431
- (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
432
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
433
- })(this, function () {
434
- return (/******/function () {
435
- // webpackBootstrap
436
- /******/
437
- "use strict";
438
-
439
- /******/ // The require scope
440
- /******/
441
- var __nested_webpack_require_987__ = {};
442
- /******/
443
- /************************************************************************/
444
- /******/ /* webpack/runtime/define property getters */
445
- /******/
446
- (function () {
447
- /******/ // define getter functions for harmony exports
448
- /******/__nested_webpack_require_987__.d = function (exports, definition) {
449
- /******/for (var key in definition) {
450
- /******/if (__nested_webpack_require_987__.o(definition, key) && !__nested_webpack_require_987__.o(exports, key)) {
451
- /******/Object.defineProperty(exports, key, {
452
- enumerable: true,
453
- get: definition[key]
454
- });
455
- /******/
456
- }
457
- /******/
458
- }
459
- /******/
460
- };
461
- /******/
462
- })();
463
- /******/
464
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
465
- /******/
466
- (function () {
467
- /******/__nested_webpack_require_987__.o = function (obj, prop) {
468
- return Object.prototype.hasOwnProperty.call(obj, prop);
469
- };
470
- /******/
471
- })();
472
- /******/
473
- /******/ /* webpack/runtime/make namespace object */
474
- /******/
475
- (function () {
476
- /******/ // define __esModule on exports
477
- /******/__nested_webpack_require_987__.r = function (exports) {
478
- /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
479
- /******/Object.defineProperty(exports, Symbol.toStringTag, {
480
- value: 'Module'
481
- });
482
- /******/
483
- }
484
- /******/
485
- Object.defineProperty(exports, '__esModule', {
486
- value: true
487
- });
488
- /******/
489
- };
490
- /******/
491
- })();
492
- /******/
493
- /************************************************************************/
494
- var __webpack_exports__ = {};
495
- __nested_webpack_require_987__.r(__webpack_exports__);
496
- /* harmony export */
497
- __nested_webpack_require_987__.d(__webpack_exports__, {
498
- /* harmony export */"convertArrToValByBraces": function convertArrToValByBraces() {
499
- return (/* binding */_convertArrToValByBraces
500
- );
501
- },
502
- /* harmony export */"convertArrToValByBrackets": function convertArrToValByBrackets() {
503
- return (/* binding */_convertArrToValByBrackets
504
- );
505
- },
506
- /* harmony export */"convertStringByCommaToValByBraces": function convertStringByCommaToValByBraces() {
507
- return (/* binding */_convertStringByCommaToValByBraces
508
- );
509
- },
510
- /* harmony export */"convertStringByCommaToValByBrackets": function convertStringByCommaToValByBrackets() {
511
- return (/* binding */_convertStringByCommaToValByBrackets
512
- );
513
- }
514
- /* harmony export */
515
- });
516
- /**
517
- * Convert value to string separated by square brackets
518
- * @param {String} str such as: 1,2,3
519
- * @returns {String} such as: [1][2][3]
520
- */
521
- function _convertStringByCommaToValByBrackets(str) {
522
- if (typeof str === 'undefined' || str === null || str === '') {
523
- return '';
524
- }
525
- return str.split(',').map(function (v) {
526
- return v.toString().includes('[') && v.toString().includes(']') ? "".concat(v) : "[".concat(v, "]");
527
- }).join('');
528
- }
529
-
530
- /**
531
- * Convert array value to string separated by square brackets
532
- * @param {String[]} arr such as: ['1','2','3']
533
- * @returns {String} such as: [1][2][3]
534
- */
535
- function _convertArrToValByBrackets(arr) {
536
- if (!Array.isArray(arr)) return '';
537
- return arr.map(function (v) {
538
- return v.toString().includes('[') && v.toString().includes(']') ? "".concat(v) : "[".concat(v, "]");
539
- }).join('');
540
- }
541
-
542
- /**
543
- * Convert value to string separated by curly braces
544
- * @param {String} str such as: 1,2,3
545
- * @returns {String} such as: {1}{2}{3}
546
- */
547
- function _convertStringByCommaToValByBraces(str) {
548
- if (typeof str === 'undefined' || str === null || str === '') {
549
- return '';
550
- }
551
- return str.split(',').map(function (v) {
552
- return v.toString().includes('{') && v.toString().includes('}') ? "".concat(v) : "{".concat(v, "}");
553
- }).join('');
554
- }
555
-
556
- /**
557
- * Convert array value to string separated by curly braces
558
- * @param {String[]} arr such as: ['1','2','3']
559
- * @returns {String} such as: {1}{2}{3}
560
- */
561
- function _convertArrToValByBraces(arr) {
562
- if (!Array.isArray(arr)) return '';
563
- return arr.map(function (v) {
564
- return v.toString().includes('{') && v.toString().includes('}') ? "".concat(v) : "{".concat(v, "}");
565
- }).join('');
566
- }
567
-
568
- /******/
569
- return __webpack_exports__;
570
- /******/
571
- }()
572
- );
573
- });
574
-
575
- /***/ }),
576
-
577
- /***/ 135:
578
- /***/ (function(module, exports, __webpack_require__) {
579
-
580
- /* module decorator */ module = __webpack_require__.nmd(module);
581
- 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); }
582
- (function webpackUniversalModuleDefinition(root, factory) {
583
- 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),
584
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
585
- (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
586
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
587
- })(this, function () {
588
- return (/******/function () {
589
- // webpackBootstrap
590
- /******/
591
- "use strict";
592
-
593
- /******/ // The require scope
594
- /******/
595
- var __nested_webpack_require_987__ = {};
596
- /******/
597
- /************************************************************************/
598
- /******/ /* webpack/runtime/define property getters */
599
- /******/
600
- (function () {
601
- /******/ // define getter functions for harmony exports
602
- /******/__nested_webpack_require_987__.d = function (exports, definition) {
603
- /******/for (var key in definition) {
604
- /******/if (__nested_webpack_require_987__.o(definition, key) && !__nested_webpack_require_987__.o(exports, key)) {
605
- /******/Object.defineProperty(exports, key, {
606
- enumerable: true,
607
- get: definition[key]
608
- });
609
- /******/
610
- }
611
- /******/
612
- }
613
- /******/
614
- };
615
- /******/
616
- })();
617
- /******/
618
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
619
- /******/
620
- (function () {
621
- /******/__nested_webpack_require_987__.o = function (obj, prop) {
622
- return Object.prototype.hasOwnProperty.call(obj, prop);
623
- };
624
- /******/
625
- })();
626
- /******/
627
- /******/ /* webpack/runtime/make namespace object */
628
- /******/
629
- (function () {
630
- /******/ // define __esModule on exports
631
- /******/__nested_webpack_require_987__.r = function (exports) {
632
- /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
633
- /******/Object.defineProperty(exports, Symbol.toStringTag, {
634
- value: 'Module'
635
- });
636
- /******/
637
- }
638
- /******/
639
- Object.defineProperty(exports, '__esModule', {
640
- value: true
641
- });
642
- /******/
643
- };
644
- /******/
645
- })();
646
- /******/
647
- /************************************************************************/
648
- var __webpack_exports__ = {};
649
- __nested_webpack_require_987__.r(__webpack_exports__);
650
- /* harmony export */
651
- __nested_webpack_require_987__.d(__webpack_exports__, {
652
- /* harmony export */"extractContentsOfBraces": function extractContentsOfBraces() {
653
- return (/* binding */_extractContentsOfBraces
654
- );
655
- },
656
- /* harmony export */"extractContentsOfBrackets": function extractContentsOfBrackets() {
657
- return (/* binding */_extractContentsOfBrackets
658
- );
659
- },
660
- /* harmony export */"extractContentsOfParentheses": function extractContentsOfParentheses() {
661
- return (/* binding */_extractContentsOfParentheses
662
- );
663
- },
664
- /* harmony export */"extractorExist": function extractorExist() {
665
- return (/* binding */_extractorExist
666
- );
667
- }
668
- /* harmony export */
669
- });
670
- /**
671
- * Determine whether an extractor is included
672
- * @param {String} str => input string. such as 'a[1], b[2]', '{a[1]}'
673
- * @returns {Boolean}
674
- */
675
- function _extractorExist(str) {
676
- if (typeof str === 'undefined' || str === null || str === '') {
677
- return false;
678
- }
679
- var res = false;
680
- if (str !== null && str !== void 0 && str.match(/(\[.*?\])/gi)) {
681
- res = true;
682
- }
683
- return res;
684
- }
685
-
686
- /**
687
- * Extract the contents of square brackets
688
- * @param {String} str => input string. such as '[1,2] [f][c]'
689
- * @param {Boolean} commaSeparated => flag to determine if the result should be comma separated or not
690
- * @returns {Array<string>|string} such as: ['1,2','f','c']
691
- */
692
- function _extractContentsOfBrackets(str) {
693
- var commaSeparated = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
694
- if (typeof str === 'undefined' || str === null || str === '') {
695
- return !commaSeparated ? [] : '';
696
- }
697
- var res = str.match(/[^\[]+(?=(\[ \])|\])/g);
698
- if (commaSeparated) {
699
- return res === null ? '' : res.join(',').replace(/\,+$/, '');
700
- } else {
701
- return res === null ? '' : res;
702
- }
703
- }
704
-
705
- /**
706
- * Extract the contents of curly braces
707
- * @param {String} str => input string. such as '{1,2} {f}{c}'
708
- * @param {Boolean} commaSeparated => flag to determine if the result should be comma separated or not
709
- * @returns {Array<string>|string} such as: ['1,2','f','c']
710
- */
711
- function _extractContentsOfBraces(str) {
712
- var commaSeparated = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
713
- if (typeof str === 'undefined' || str === null || str === '') {
714
- return !commaSeparated ? [] : '';
715
- }
716
- var res = str.match(/[^\{]+(?=(\{ \})|\})/g);
717
- if (commaSeparated) {
718
- return res === null ? '' : res.join(',').replace(/\,+$/, '');
719
- } else {
720
- return res === null ? '' : res;
721
- }
722
- }
723
-
724
- /**
725
- * Extract the contents of parentheses
726
- * @param {String} str => input string. such as '(1,2) (f)(c)'
727
- * @param {Boolean} commaSeparated => flag to determine if the result should be comma separated or not
728
- * @returns {Array<string>|string} such as: ['1,2','f','c']
729
- */
730
- function _extractContentsOfParentheses(str) {
731
- var commaSeparated = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
732
- if (typeof str === 'undefined' || str === null || str === '') {
733
- return !commaSeparated ? [] : '';
734
- }
735
- var res = str.match(/[^\(]+(?=(\( \))|\))/g);
736
- if (commaSeparated) {
737
- return res === null ? '' : res.join(',').replace(/\,+$/, '');
738
- } else {
739
- return res === null ? '' : res;
740
- }
741
- }
742
-
743
- /******/
744
- return __webpack_exports__;
745
- /******/
746
- }()
747
- );
748
- });
749
-
750
- /***/ }),
751
-
752
- /***/ 767:
753
- /***/ (function(module, exports, __webpack_require__) {
754
-
755
- /* module decorator */ module = __webpack_require__.nmd(module);
756
- 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); }
757
- (function webpackUniversalModuleDefinition(root, factory) {
758
- 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),
759
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
760
- (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
761
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
762
- })(this, function () {
763
- return (/******/function () {
764
- // webpackBootstrap
765
- /******/
766
- "use strict";
767
-
768
- /******/ // The require scope
769
- /******/
770
- var __nested_webpack_require_993__ = {};
771
- /******/
772
- /************************************************************************/
773
- /******/ /* webpack/runtime/define property getters */
774
- /******/
775
- (function () {
776
- /******/ // define getter functions for harmony exports
777
- /******/__nested_webpack_require_993__.d = function (exports, definition) {
778
- /******/for (var key in definition) {
779
- /******/if (__nested_webpack_require_993__.o(definition, key) && !__nested_webpack_require_993__.o(exports, key)) {
780
- /******/Object.defineProperty(exports, key, {
781
- enumerable: true,
782
- get: definition[key]
783
- });
784
- /******/
785
- }
786
- /******/
787
- }
788
- /******/
789
- };
790
- /******/
791
- })();
792
- /******/
793
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
794
- /******/
795
- (function () {
796
- /******/__nested_webpack_require_993__.o = function (obj, prop) {
797
- return Object.prototype.hasOwnProperty.call(obj, prop);
798
- };
799
- /******/
800
- })();
801
- /******/
802
- /******/ /* webpack/runtime/make namespace object */
803
- /******/
804
- (function () {
805
- /******/ // define __esModule on exports
806
- /******/__nested_webpack_require_993__.r = function (exports) {
807
- /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
808
- /******/Object.defineProperty(exports, Symbol.toStringTag, {
809
- value: 'Module'
810
- });
811
- /******/
812
- }
813
- /******/
814
- Object.defineProperty(exports, '__esModule', {
815
- value: true
816
- });
817
- /******/
818
- };
819
- /******/
820
- })();
821
- /******/
822
- /************************************************************************/
823
- var __webpack_exports__ = {};
824
- __nested_webpack_require_993__.r(__webpack_exports__);
825
- /* harmony export */
826
- __nested_webpack_require_993__.d(__webpack_exports__, {
827
- /* harmony export */"getAbsoluteCoordinates": function getAbsoluteCoordinates() {
828
- return (/* binding */_getAbsoluteCoordinates
829
- );
830
- },
831
- /* harmony export */"getAbsolutePositionOfStage": function getAbsolutePositionOfStage() {
832
- return (/* binding */_getAbsolutePositionOfStage
833
- );
834
- },
835
- /* harmony export */"getOffset": function getOffset() {
836
- return (/* binding */_getOffset
837
- );
838
- },
839
- /* harmony export */"getPosition": function getPosition() {
840
- return (/* binding */_getPosition
841
- );
842
- },
843
- /* harmony export */"getTransitionDuration": function getTransitionDuration() {
844
- return (/* binding */_getTransitionDuration
845
- );
846
- }
847
- /* harmony export */
848
- });
849
- function _typeof(obj) {
850
- "@babel/helpers - typeof";
851
-
852
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
853
- return typeof obj;
854
- } : function (obj) {
855
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
856
- }, _typeof(obj);
857
- }
858
- /**
859
- * Get the -webkit-transition-duration property
860
- *
861
- * @param {HTMLElement} el - A DOM node containing one selector to match against.
862
- * @return {number} - Returns a pure number.
863
- */
864
- function _getTransitionDuration(el) {
865
- if (_typeof(el) === ( true ? "undefined" : 0)) {
866
- return 0;
867
- }
868
- var style = window.getComputedStyle(el),
869
- duration = style.webkitTransitionDuration,
870
- delay = style.webkitTransitionDelay;
871
- if (_typeof(duration) != ( true ? "undefined" : 0)) {
872
- // fix miliseconds vs seconds
873
- duration = duration.indexOf("ms") > -1 ? parseFloat(duration) : parseFloat(duration) * 1000;
874
- delay = delay.indexOf("ms") > -1 ? parseFloat(delay) : parseFloat(delay) * 1000;
875
- return duration;
876
- } else {
877
- return 0;
878
- }
879
- }
880
-
881
- /**
882
- * Get an object's absolute position on the page
883
- *
884
- * @param {HTMLElement} el - A DOM node containing one selector to match against.
885
- * @return {Json} - An object containing the properties top and left.
886
- */
887
- function _getAbsoluteCoordinates(el) {
888
- var windowWidth = window.innerWidth,
889
- leftPos = null,
890
- topPos = null;
891
- var pEl = el.parentElement;
892
- if (!document.getElementsByTagName('body')[0].className.match(/rtl/)) {
893
- leftPos = el.offsetLeft == 0 ? pEl.offsetLeft : el.offsetLeft;
894
- topPos = el.offsetTop == 0 ? pEl.offsetTop : el.offsetTop;
895
- } else {
896
- // width and height in pixels, including padding and border
897
- // Corresponds to outerWidth(), outerHeight()
898
- leftPos = el.offsetLeft == 0 ? windowWidth - (pEl.offsetLeft + pEl.offsetWidth) : windowWidth - (el.offsetLeft + el.offsetWidth);
899
- topPos = el.offsetTop == 0 ? windowWidth - (pEl.offsetTop + pEl.offsetHeight) : windowWidth - (el.offsetTop + el.offsetHeight);
900
- }
901
- return {
902
- 'left': leftPos,
903
- 'top': topPos
904
- };
905
- }
906
-
907
- /**
908
- * Get the current coordinates of the first element in the set of matched elements, relative to the document.
909
- *
910
- * @param {Element} el - A DOM node containing one selector to match against.
911
- * @return {Json} - An object containing the properties top and left.
912
- */
913
- function _getOffset(el) {
914
- var res = {
915
- top: 0,
916
- left: 0
917
- };
918
- var box = el.getBoundingClientRect();
919
- var top = 0,
920
- left = 0;
921
-
922
- //Include scrollbar and border
923
- top = box.top + window.pageYOffset - document.documentElement.clientTop;
924
- left = box.left + window.pageXOffset - document.documentElement.clientLeft;
925
- res = {
926
- top: top,
927
- left: left
928
- };
929
- return res;
930
- }
931
-
932
- /**
933
- * Get the current coordinates of the first element in the set of matched elements, relative to the offset parent.
934
- *
935
- * @param {HTMLElement} el - A DOM node containing one selector to match against.
936
- * @return {Json} - An object containing the properties top and left.
937
- */
938
- function _getPosition(el) {
939
- var res = {
940
- top: 0,
941
- left: 0
942
- };
943
- var top = el.offsetTop ? el.offsetTop : 0,
944
- left = el.offsetLeft ? el.offsetLeft : 0;
945
- res = {
946
- top: top,
947
- left: left
948
- };
949
- return res;
950
- }
951
-
952
- /**
953
- * Get the absolute position of the stage element
954
- *
955
- * @param {HTMLElement} domElement - A DOM node
956
- * @param {Number | string} left - left offset
957
- * @param {Number | string} top - top offset
958
- * @returns
959
- */
960
- function _getAbsolutePositionOfStage(domElement) {
961
- var left = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
962
- var top = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
963
- if (!parseInt(left)) {
964
- left = 0;
965
- } else {
966
- left = parseInt(left);
967
- }
968
- if (!parseInt(top)) {
969
- top = 0;
970
- } else {
971
- top = parseInt(top);
972
- }
973
- var box = domElement.getBoundingClientRect();
974
- var body = document.body;
975
- var docElem = document.documentElement;
976
- var scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;
977
- var scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;
978
- var clientTop = docElem.clientTop || body.clientTop || 0;
979
- var clientLeft = docElem.clientLeft || body.clientLeft || 0;
980
- var attr = {};
981
- attr.y = box.top + scrollTop - clientTop + top;
982
- attr.x = box.left + scrollLeft - clientLeft + left;
983
- attr.width = box.width;
984
- attr.height = box.height;
985
- return attr;
986
- }
987
-
988
- /******/
989
- return __webpack_exports__;
990
- /******/
991
- }()
992
- );
993
- });
994
-
995
- /***/ }),
996
-
997
- /***/ 761:
998
- /***/ (function(module, exports, __webpack_require__) {
999
-
1000
- /* module decorator */ module = __webpack_require__.nmd(module);
1001
- 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); }
1002
- (function webpackUniversalModuleDefinition(root, factory) {
1003
- if (( false ? 0 : _typeof(exports)) === 'object' && ( false ? 0 : _typeof(module)) === 'object') module.exports = factory(__webpack_require__(787));else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(787)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
1004
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
1005
- (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
1006
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
1007
- })(this, function (__WEBPACK_EXTERNAL_MODULE__787__) {
1008
- return (/******/function () {
1009
- // webpackBootstrap
1010
- /******/
1011
- "use strict";
1012
-
1013
- /******/
1014
- var __webpack_modules__ = {
1015
- /***/787: /***/function _(module) {
1016
- module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
1017
-
1018
- /***/
1019
- }
1020
-
1021
- /******/
1022
- };
1023
- /************************************************************************/
1024
- /******/ // The module cache
1025
- /******/
1026
- var __webpack_module_cache__ = {};
1027
- /******/
1028
- /******/ // The require function
1029
- /******/
1030
- function __nested_webpack_require_1465__(moduleId) {
1031
- /******/ // Check if module is in cache
1032
- /******/var cachedModule = __webpack_module_cache__[moduleId];
1033
- /******/
1034
- if (cachedModule !== undefined) {
1035
- /******/return cachedModule.exports;
1036
- /******/
1037
- }
1038
- /******/ // Create a new module (and put it into the cache)
1039
- /******/
1040
- var module = __webpack_module_cache__[moduleId] = {
1041
- /******/ // no module.id needed
1042
- /******/ // no module.loaded needed
1043
- /******/exports: {}
1044
- /******/
1045
- };
1046
- /******/
1047
- /******/ // Execute the module function
1048
- /******/
1049
- __webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_1465__);
1050
- /******/
1051
- /******/ // Return the exports of the module
1052
- /******/
1053
- return module.exports;
1054
- /******/
1055
- }
1056
- /******/
1057
- /************************************************************************/
1058
- /******/ /* webpack/runtime/compat get default export */
1059
- /******/
1060
- (function () {
1061
- /******/ // getDefaultExport function for compatibility with non-harmony modules
1062
- /******/__nested_webpack_require_1465__.n = function (module) {
1063
- /******/var getter = module && module.__esModule ? /******/function () {
1064
- return module['default'];
1065
- } : /******/function () {
1066
- return module;
1067
- };
1068
- /******/
1069
- __nested_webpack_require_1465__.d(getter, {
1070
- a: getter
1071
- });
1072
- /******/
1073
- return getter;
1074
- /******/
1075
- };
1076
- /******/
1077
- })();
1078
- /******/
1079
- /******/ /* webpack/runtime/define property getters */
1080
- /******/
1081
- (function () {
1082
- /******/ // define getter functions for harmony exports
1083
- /******/__nested_webpack_require_1465__.d = function (exports, definition) {
1084
- /******/for (var key in definition) {
1085
- /******/if (__nested_webpack_require_1465__.o(definition, key) && !__nested_webpack_require_1465__.o(exports, key)) {
1086
- /******/Object.defineProperty(exports, key, {
1087
- enumerable: true,
1088
- get: definition[key]
1089
- });
1090
- /******/
1091
- }
1092
- /******/
1093
- }
1094
- /******/
1095
- };
1096
- /******/
1097
- })();
1098
- /******/
1099
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
1100
- /******/
1101
- (function () {
1102
- /******/__nested_webpack_require_1465__.o = function (obj, prop) {
1103
- return Object.prototype.hasOwnProperty.call(obj, prop);
1104
- };
1105
- /******/
1106
- })();
1107
- /******/
1108
- /******/ /* webpack/runtime/make namespace object */
1109
- /******/
1110
- (function () {
1111
- /******/ // define __esModule on exports
1112
- /******/__nested_webpack_require_1465__.r = function (exports) {
1113
- /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
1114
- /******/Object.defineProperty(exports, Symbol.toStringTag, {
1115
- value: 'Module'
1116
- });
1117
- /******/
1118
- }
1119
- /******/
1120
- Object.defineProperty(exports, '__esModule', {
1121
- value: true
1122
- });
1123
- /******/
1124
- };
1125
- /******/
1126
- })();
1127
- /******/
1128
- /************************************************************************/
1129
- var __webpack_exports__ = {};
1130
- // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
1131
- (function () {
1132
- __nested_webpack_require_1465__.r(__webpack_exports__);
1133
- /* harmony export */
1134
- __nested_webpack_require_1465__.d(__webpack_exports__, {
1135
- /* harmony export */"default": function _default() {
1136
- return __WEBPACK_DEFAULT_EXPORT__;
1137
- }
1138
- /* harmony export */
1139
- });
1140
- /* harmony import */
1141
- var react__WEBPACK_IMPORTED_MODULE_0__ = __nested_webpack_require_1465__(787);
1142
- /* harmony import */
1143
- var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nested_webpack_require_1465__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1144
- function _toConsumableArray(arr) {
1145
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
1146
- }
1147
- function _nonIterableSpread() {
1148
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1149
- }
1150
- function _unsupportedIterableToArray(o, minLen) {
1151
- if (!o) return;
1152
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
1153
- var n = Object.prototype.toString.call(o).slice(8, -1);
1154
- if (n === "Object" && o.constructor) n = o.constructor.name;
1155
- if (n === "Map" || n === "Set") return Array.from(o);
1156
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
1157
- }
1158
- function _iterableToArray(iter) {
1159
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
1160
- }
1161
- function _arrayWithoutHoles(arr) {
1162
- if (Array.isArray(arr)) return _arrayLikeToArray(arr);
1163
- }
1164
- function _arrayLikeToArray(arr, len) {
1165
- if (len == null || len > arr.length) len = arr.length;
1166
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
1167
- return arr2;
1168
- }
1169
- /**
1170
- * Handles the event of clicking outside of the wrapped component
1171
- *
1172
- * @usage:
1173
-
1174
- const App = () => {
1175
-
1176
- const [show, setShow] = useState<boolean>(false);
1177
- const dropdownRef = useRef<HTMLDivElement>(null);
1178
-
1179
- useClickOutside({
1180
- enabled: show && dropdownRef.current,
1181
- isOutside: (event: any) => {
1182
- return event.target.closest(`.test__wrapper`) === null && event.target.closest(`.test__wrapper2`) === null;
1183
- },
1184
- handle: (event: any) => {
1185
- // do something
1186
- //...
1187
- },
1188
- spyElement: document
1189
- }, [show, dropdownRef]);
1190
- };
1191
-
1192
- */
1193
-
1194
- function useClickOutside(_ref, deps) {
1195
- var enabled = _ref.enabled,
1196
- isOutside = _ref.isOutside,
1197
- handle = _ref.handle,
1198
- _ref$spyElement = _ref.spyElement,
1199
- spyElement = _ref$spyElement === void 0 ? typeof document === 'undefined' ? null : document : _ref$spyElement;
1200
- var isOutsideRef = (0, react__WEBPACK_IMPORTED_MODULE_0__.useRef)(isOutside);
1201
- var handleRef = (0, react__WEBPACK_IMPORTED_MODULE_0__.useRef)(handle);
1202
- (0, react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
1203
- isOutsideRef.current = isOutside;
1204
-
1205
- // fix possible issue if clicking on a focusable element
1206
- handleRef.current = handle;
1207
- }, [isOutside, handle]);
1208
- (0, react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
1209
- if (enabled) {
1210
- var eventHandler = function eventHandler(event) {
1211
- var _isOutsideRef$current;
1212
- if ((_isOutsideRef$current = isOutsideRef.current) !== null && _isOutsideRef$current !== void 0 && _isOutsideRef$current.call(isOutsideRef, event)) {
1213
- var _handleRef$current;
1214
- (_handleRef$current = handleRef.current) === null || _handleRef$current === void 0 ? void 0 : _handleRef$current.call(handleRef, event);
1215
- }
1216
- };
1217
- spyElement === null || spyElement === void 0 ? void 0 : spyElement.addEventListener('pointerdown', eventHandler);
1218
- return function () {
1219
- spyElement === null || spyElement === void 0 ? void 0 : spyElement.removeEventListener('pointerdown', eventHandler);
1220
- };
1221
- }
1222
- }, [enabled].concat(_toConsumableArray(deps)));
1223
- }
1224
- /* harmony default export */
1225
- var __WEBPACK_DEFAULT_EXPORT__ = useClickOutside;
1226
- })();
1227
-
1228
- /******/
1229
- return __webpack_exports__;
1230
- /******/
1231
- }()
1232
- );
1233
- });
1234
-
1235
- /***/ }),
1236
-
1237
- /***/ 85:
1238
- /***/ (function(module, exports, __webpack_require__) {
1239
-
1240
- /* module decorator */ module = __webpack_require__.nmd(module);
1241
- 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); }
1242
- (function webpackUniversalModuleDefinition(root, factory) {
1243
- if (( false ? 0 : _typeof(exports)) === 'object' && ( false ? 0 : _typeof(module)) === 'object') module.exports = factory(__webpack_require__(787));else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(787)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
1244
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
1245
- (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
1246
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
1247
- })(this, function (__WEBPACK_EXTERNAL_MODULE__787__) {
1248
- return (/******/function () {
1249
- // webpackBootstrap
1250
- /******/
1251
- "use strict";
1252
-
1253
- /******/
1254
- var __webpack_modules__ = {
1255
- /***/787: /***/function _(module) {
1256
- module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
1257
-
1258
- /***/
1259
- }
1260
-
1261
- /******/
1262
- };
1263
- /************************************************************************/
1264
- /******/ // The module cache
1265
- /******/
1266
- var __webpack_module_cache__ = {};
1267
- /******/
1268
- /******/ // The require function
1269
- /******/
1270
- function __nested_webpack_require_1465__(moduleId) {
1271
- /******/ // Check if module is in cache
1272
- /******/var cachedModule = __webpack_module_cache__[moduleId];
1273
- /******/
1274
- if (cachedModule !== undefined) {
1275
- /******/return cachedModule.exports;
1276
- /******/
1277
- }
1278
- /******/ // Create a new module (and put it into the cache)
1279
- /******/
1280
- var module = __webpack_module_cache__[moduleId] = {
1281
- /******/ // no module.id needed
1282
- /******/ // no module.loaded needed
1283
- /******/exports: {}
1284
- /******/
1285
- };
1286
- /******/
1287
- /******/ // Execute the module function
1288
- /******/
1289
- __webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_1465__);
1290
- /******/
1291
- /******/ // Return the exports of the module
1292
- /******/
1293
- return module.exports;
1294
- /******/
1295
- }
1296
- /******/
1297
- /************************************************************************/
1298
- /******/ /* webpack/runtime/compat get default export */
1299
- /******/
1300
- (function () {
1301
- /******/ // getDefaultExport function for compatibility with non-harmony modules
1302
- /******/__nested_webpack_require_1465__.n = function (module) {
1303
- /******/var getter = module && module.__esModule ? /******/function () {
1304
- return module['default'];
1305
- } : /******/function () {
1306
- return module;
1307
- };
1308
- /******/
1309
- __nested_webpack_require_1465__.d(getter, {
1310
- a: getter
1311
- });
1312
- /******/
1313
- return getter;
1314
- /******/
1315
- };
1316
- /******/
1317
- })();
1318
- /******/
1319
- /******/ /* webpack/runtime/define property getters */
1320
- /******/
1321
- (function () {
1322
- /******/ // define getter functions for harmony exports
1323
- /******/__nested_webpack_require_1465__.d = function (exports, definition) {
1324
- /******/for (var key in definition) {
1325
- /******/if (__nested_webpack_require_1465__.o(definition, key) && !__nested_webpack_require_1465__.o(exports, key)) {
1326
- /******/Object.defineProperty(exports, key, {
1327
- enumerable: true,
1328
- get: definition[key]
1329
- });
1330
- /******/
1331
- }
1332
- /******/
1333
- }
1334
- /******/
1335
- };
1336
- /******/
1337
- })();
1338
- /******/
1339
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
1340
- /******/
1341
- (function () {
1342
- /******/__nested_webpack_require_1465__.o = function (obj, prop) {
1343
- return Object.prototype.hasOwnProperty.call(obj, prop);
1344
- };
1345
- /******/
1346
- })();
1347
- /******/
1348
- /******/ /* webpack/runtime/make namespace object */
1349
- /******/
1350
- (function () {
1351
- /******/ // define __esModule on exports
1352
- /******/__nested_webpack_require_1465__.r = function (exports) {
1353
- /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
1354
- /******/Object.defineProperty(exports, Symbol.toStringTag, {
1355
- value: 'Module'
1356
- });
1357
- /******/
1358
- }
1359
- /******/
1360
- Object.defineProperty(exports, '__esModule', {
1361
- value: true
1362
- });
1363
- /******/
1364
- };
1365
- /******/
1366
- })();
1367
- /******/
1368
- /************************************************************************/
1369
- var __webpack_exports__ = {};
1370
- // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
1371
- (function () {
1372
- __nested_webpack_require_1465__.r(__webpack_exports__);
1373
- /* harmony export */
1374
- __nested_webpack_require_1465__.d(__webpack_exports__, {
1375
- /* harmony export */"default": function _default() {
1376
- return __WEBPACK_DEFAULT_EXPORT__;
1377
- }
1378
- /* harmony export */
1379
- });
1380
- /* harmony import */
1381
- var react__WEBPACK_IMPORTED_MODULE_0__ = __nested_webpack_require_1465__(787);
1382
- /* harmony import */
1383
- var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nested_webpack_require_1465__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1384
- /**
1385
- * Create an available ID
1386
- *
1387
- */
1388
-
1389
- var useComId = function useComId() {
1390
- return "ID-".concat((0, react__WEBPACK_IMPORTED_MODULE_0__.useId)().replace(/\:/g, "-"));
1391
- };
1392
- /* harmony default export */
1393
- var __WEBPACK_DEFAULT_EXPORT__ = useComId;
1394
- })();
1395
-
1396
- /******/
1397
- return __webpack_exports__;
1398
- /******/
1399
- }()
1400
- );
1401
- });
1402
-
1403
- /***/ }),
1404
-
1405
- /***/ 499:
1406
- /***/ (function(module, exports, __webpack_require__) {
1407
-
1408
- /* module decorator */ module = __webpack_require__.nmd(module);
1409
- 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); }
1410
- (function webpackUniversalModuleDefinition(root, factory) {
1411
- if (( false ? 0 : _typeof(exports)) === 'object' && ( false ? 0 : _typeof(module)) === 'object') module.exports = factory(__webpack_require__(787));else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(787)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
1412
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
1413
- (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
1414
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
1415
- })(this, function (__WEBPACK_EXTERNAL_MODULE__787__) {
1416
- return (/******/function () {
1417
- // webpackBootstrap
1418
- /******/
1419
- "use strict";
1420
-
1421
- /******/
1422
- var __webpack_modules__ = {
1423
- /***/318: /***/function _(__unused_webpack_module, __webpack_exports__, __nested_webpack_require_1139__) {
1424
- /* harmony export */__nested_webpack_require_1139__.d(__webpack_exports__, {
1425
- /* harmony export */"debounce": function debounce() {
1426
- return (/* binding */_debounce
1427
- );
1428
- },
1429
- /* harmony export */"throttle": function throttle() {
1430
- return (/* binding */_throttle
1431
- );
1432
- }
1433
- /* harmony export */
1434
- });
1435
- /*
1436
- * Debounce
1437
- *
1438
- * @param {Function} fn - A function to be executed within the time limit.
1439
- * @param {Number} limit - Waiting time.
1440
- * @return {*} - Returns a new function.
1441
- */
1442
- function _debounce(fn) {
1443
- var limit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 300;
1444
- var timer;
1445
- return function () {
1446
- clearTimeout(timer);
1447
- timer = setTimeout(function () {
1448
- fn.apply(this, arguments);
1449
- }, limit);
1450
- };
1451
- }
1452
-
1453
- /*
1454
- * Throttle
1455
- *
1456
- * @param {Function} fn - A function to be executed within the time limit.
1457
- * @param {Number} limit - Waiting time.
1458
- * @return {*} - Returns a new function.
1459
- */
1460
- function _throttle(fn) {
1461
- var limit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 300;
1462
- var waiting = false;
1463
- return function () {
1464
- if (!waiting) {
1465
- fn.apply(this, arguments);
1466
- waiting = true;
1467
- setTimeout(function () {
1468
- waiting = false;
1469
- }, limit);
1470
- }
1471
- };
1472
- }
1473
-
1474
- /***/
1475
- },
1476
-
1477
- /***/787: /***/function _(module) {
1478
- module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
1479
-
1480
- /***/
1481
- }
1482
-
1483
- /******/
1484
- };
1485
- /************************************************************************/
1486
- /******/ // The module cache
1487
- /******/
1488
- var __webpack_module_cache__ = {};
1489
- /******/
1490
- /******/ // The require function
1491
- /******/
1492
- function __nested_webpack_require_3331__(moduleId) {
1493
- /******/ // Check if module is in cache
1494
- /******/var cachedModule = __webpack_module_cache__[moduleId];
1495
- /******/
1496
- if (cachedModule !== undefined) {
1497
- /******/return cachedModule.exports;
1498
- /******/
1499
- }
1500
- /******/ // Create a new module (and put it into the cache)
1501
- /******/
1502
- var module = __webpack_module_cache__[moduleId] = {
1503
- /******/ // no module.id needed
1504
- /******/ // no module.loaded needed
1505
- /******/exports: {}
1506
- /******/
1507
- };
1508
- /******/
1509
- /******/ // Execute the module function
1510
- /******/
1511
- __webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_3331__);
1512
- /******/
1513
- /******/ // Return the exports of the module
1514
- /******/
1515
- return module.exports;
1516
- /******/
1517
- }
1518
- /******/
1519
- /************************************************************************/
1520
- /******/ /* webpack/runtime/compat get default export */
1521
- /******/
1522
- (function () {
1523
- /******/ // getDefaultExport function for compatibility with non-harmony modules
1524
- /******/__nested_webpack_require_3331__.n = function (module) {
1525
- /******/var getter = module && module.__esModule ? /******/function () {
1526
- return module['default'];
1527
- } : /******/function () {
1528
- return module;
1529
- };
1530
- /******/
1531
- __nested_webpack_require_3331__.d(getter, {
1532
- a: getter
1533
- });
1534
- /******/
1535
- return getter;
1536
- /******/
1537
- };
1538
- /******/
1539
- })();
1540
- /******/
1541
- /******/ /* webpack/runtime/define property getters */
1542
- /******/
1543
- (function () {
1544
- /******/ // define getter functions for harmony exports
1545
- /******/__nested_webpack_require_3331__.d = function (exports, definition) {
1546
- /******/for (var key in definition) {
1547
- /******/if (__nested_webpack_require_3331__.o(definition, key) && !__nested_webpack_require_3331__.o(exports, key)) {
1548
- /******/Object.defineProperty(exports, key, {
1549
- enumerable: true,
1550
- get: definition[key]
1551
- });
1552
- /******/
1553
- }
1554
- /******/
1555
- }
1556
- /******/
1557
- };
1558
- /******/
1559
- })();
1560
- /******/
1561
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
1562
- /******/
1563
- (function () {
1564
- /******/__nested_webpack_require_3331__.o = function (obj, prop) {
1565
- return Object.prototype.hasOwnProperty.call(obj, prop);
1566
- };
1567
- /******/
1568
- })();
1569
- /******/
1570
- /******/ /* webpack/runtime/make namespace object */
1571
- /******/
1572
- (function () {
1573
- /******/ // define __esModule on exports
1574
- /******/__nested_webpack_require_3331__.r = function (exports) {
1575
- /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
1576
- /******/Object.defineProperty(exports, Symbol.toStringTag, {
1577
- value: 'Module'
1578
- });
1579
- /******/
1580
- }
1581
- /******/
1582
- Object.defineProperty(exports, '__esModule', {
1583
- value: true
1584
- });
1585
- /******/
1586
- };
1587
- /******/
1588
- })();
1589
- /******/
1590
- /************************************************************************/
1591
- var __webpack_exports__ = {};
1592
- // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
1593
- (function () {
1594
- __nested_webpack_require_3331__.r(__webpack_exports__);
1595
- /* harmony export */
1596
- __nested_webpack_require_3331__.d(__webpack_exports__, {
1597
- /* harmony export */"default": function _default() {
1598
- return __WEBPACK_DEFAULT_EXPORT__;
1599
- }
1600
- /* harmony export */
1601
- });
1602
- /* harmony import */
1603
- var react__WEBPACK_IMPORTED_MODULE_0__ = __nested_webpack_require_3331__(787);
1604
- /* harmony import */
1605
- var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nested_webpack_require_3331__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1606
- /* harmony import */
1607
- var _libs_performance__WEBPACK_IMPORTED_MODULE_1__ = __nested_webpack_require_3331__(318);
1608
- function _slicedToArray(arr, i) {
1609
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
1610
- }
1611
- function _nonIterableRest() {
1612
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1613
- }
1614
- function _unsupportedIterableToArray(o, minLen) {
1615
- if (!o) return;
1616
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
1617
- var n = Object.prototype.toString.call(o).slice(8, -1);
1618
- if (n === "Object" && o.constructor) n = o.constructor.name;
1619
- if (n === "Map" || n === "Set") return Array.from(o);
1620
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
1621
- }
1622
- function _arrayLikeToArray(arr, len) {
1623
- if (len == null || len > arr.length) len = arr.length;
1624
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
1625
- return arr2;
1626
- }
1627
- function _iterableToArrayLimit(arr, i) {
1628
- var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
1629
- if (null != _i) {
1630
- var _s,
1631
- _e,
1632
- _x,
1633
- _r,
1634
- _arr = [],
1635
- _n = !0,
1636
- _d = !1;
1637
- try {
1638
- if (_x = (_i = _i.call(arr)).next, 0 === i) {
1639
- if (Object(_i) !== _i) return;
1640
- _n = !1;
1641
- } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
1642
- } catch (err) {
1643
- _d = !0, _e = err;
1644
- } finally {
1645
- try {
1646
- if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
1647
- } finally {
1648
- if (_d) throw _e;
1649
- }
1650
- }
1651
- return _arr;
1652
- }
1653
- }
1654
- function _arrayWithHoles(arr) {
1655
- if (Array.isArray(arr)) return arr;
1656
- }
1657
- /**
1658
- * Listens for scrolls the window to a particular place in the document
1659
- *
1660
- * @usage:
1661
-
1662
- const App = () => {
1663
- const [scrollData, windowScrollUpdate] = useWindowScroll({
1664
- performance: ['debounce', 500], // "['debounce', 500]" or "['throttle', 500]"
1665
- handle: (scrollData) => {
1666
- // do something
1667
- console.log(scrollData);
1668
- }
1669
- });
1670
- };
1671
-
1672
- */
1673
-
1674
- var useWindowScroll = function useWindowScroll(_ref) {
1675
- var enabled = _ref.enabled,
1676
- performance = _ref.performance,
1677
- handle = _ref.handle;
1678
- var windowScrollUpdate;
1679
- var _performance = _slicedToArray(performance, 2),
1680
- performanceName = _performance[0],
1681
- performanceLimit = _performance[1];
1682
- var _useState = (0, react__WEBPACK_IMPORTED_MODULE_0__.useState)({
1683
- x: 0,
1684
- y: 0
1685
- }),
1686
- _useState2 = _slicedToArray(_useState, 2),
1687
- scrollData = _useState2[0],
1688
- setScrollData = _useState2[1];
1689
- var eventHandlerScroll = function eventHandlerScroll(e) {
1690
- var doc = document.documentElement;
1691
- var left = (window.pageXOffset || doc.scrollLeft) - (doc.clientLeft || 0);
1692
- var top = (window.pageYOffset || doc.scrollTop) - (doc.clientTop || 0);
1693
- var res = {
1694
- x: left,
1695
- y: top
1696
- };
1697
- setScrollData(res);
1698
- if (typeof handle === "function") handle(res);
1699
- };
1700
- if (performanceName === "debounce") windowScrollUpdate = (0, _libs_performance__WEBPACK_IMPORTED_MODULE_1__.debounce)(eventHandlerScroll, parseFloat(performanceLimit));
1701
- if (performanceName === "throttle") windowScrollUpdate = (0, _libs_performance__WEBPACK_IMPORTED_MODULE_1__.throttle)(eventHandlerScroll, parseFloat(performanceLimit));
1702
- (0, react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
1703
- window.addEventListener("scroll", windowScrollUpdate);
1704
- window.addEventListener("touchmove", windowScrollUpdate);
1705
- return function () {
1706
- window.removeEventListener("scroll", windowScrollUpdate);
1707
- window.removeEventListener("touchmove", windowScrollUpdate);
1708
- };
1709
- }, []);
1710
- return [scrollData, windowScrollUpdate];
1711
- };
1712
- /* harmony default export */
1713
- var __WEBPACK_DEFAULT_EXPORT__ = useWindowScroll;
1714
- })();
1715
-
1716
- /******/
1717
- return __webpack_exports__;
1718
- /******/
1719
- }()
1720
- );
1721
- });
1722
-
1723
- /***/ }),
1724
-
1725
- /***/ 787:
1726
- /***/ ((module) => {
1727
-
1728
- "use strict";
1729
- module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
1730
-
1731
- /***/ }),
1732
-
1733
- /***/ 156:
1734
- /***/ ((module) => {
1735
-
1736
- "use strict";
1737
- module.exports = __WEBPACK_EXTERNAL_MODULE__156__;
1738
-
1739
- /***/ })
1740
-
1741
- /******/ });
1742
- /************************************************************************/
1743
- /******/ // The module cache
1744
- /******/ var __webpack_module_cache__ = {};
1745
- /******/
1746
- /******/ // The require function
1747
- /******/ function __webpack_require__(moduleId) {
1748
- /******/ // Check if module is in cache
1749
- /******/ var cachedModule = __webpack_module_cache__[moduleId];
1750
- /******/ if (cachedModule !== undefined) {
1751
- /******/ return cachedModule.exports;
1752
- /******/ }
1753
- /******/ // Create a new module (and put it into the cache)
1754
- /******/ var module = __webpack_module_cache__[moduleId] = {
1755
- /******/ id: moduleId,
1756
- /******/ loaded: false,
1757
- /******/ exports: {}
1758
- /******/ };
1759
- /******/
1760
- /******/ // Execute the module function
1761
- /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
1762
- /******/
1763
- /******/ // Flag the module as loaded
1764
- /******/ module.loaded = true;
1765
- /******/
1766
- /******/ // Return the exports of the module
1767
- /******/ return module.exports;
1768
- /******/ }
1769
- /******/
1770
- /************************************************************************/
1771
- /******/ /* webpack/runtime/compat get default export */
1772
- /******/ (() => {
1773
- /******/ // getDefaultExport function for compatibility with non-harmony modules
1774
- /******/ __webpack_require__.n = (module) => {
1775
- /******/ var getter = module && module.__esModule ?
1776
- /******/ () => (module['default']) :
1777
- /******/ () => (module);
1778
- /******/ __webpack_require__.d(getter, { a: getter });
1779
- /******/ return getter;
1780
- /******/ };
1781
- /******/ })();
1782
- /******/
1783
- /******/ /* webpack/runtime/define property getters */
1784
- /******/ (() => {
1785
- /******/ // define getter functions for harmony exports
1786
- /******/ __webpack_require__.d = (exports, definition) => {
1787
- /******/ for(var key in definition) {
1788
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
1789
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
1790
- /******/ }
1791
- /******/ }
1792
- /******/ };
1793
- /******/ })();
1794
- /******/
1795
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
1796
- /******/ (() => {
1797
- /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
1798
- /******/ })();
1799
- /******/
1800
- /******/ /* webpack/runtime/make namespace object */
1801
- /******/ (() => {
1802
- /******/ // define __esModule on exports
1803
- /******/ __webpack_require__.r = (exports) => {
1804
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
1805
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
1806
- /******/ }
1807
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
1808
- /******/ };
1809
- /******/ })();
1810
- /******/
1811
- /******/ /* webpack/runtime/node module decorator */
1812
- /******/ (() => {
1813
- /******/ __webpack_require__.nmd = (module) => {
1814
- /******/ module.paths = [];
1815
- /******/ if (!module.children) module.children = [];
1816
- /******/ return module;
1817
- /******/ };
1818
- /******/ })();
1819
- /******/
1820
- /************************************************************************/
1821
- var __webpack_exports__ = {};
1822
- // This entry need to be wrapped in an IIFE because it need to be in strict mode.
1823
- (() => {
1824
- "use strict";
1825
- // ESM COMPAT FLAG
1826
- __webpack_require__.r(__webpack_exports__);
1827
-
1828
- // EXPORTS
1829
- __webpack_require__.d(__webpack_exports__, {
1830
- "default": () => (/* binding */ src)
1831
- });
1832
-
1833
- // EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"}
1834
- var external_root_React_commonjs2_react_commonjs_react_amd_react_ = __webpack_require__(787);
1835
- var external_root_React_commonjs2_react_commonjs_react_amd_react_default = /*#__PURE__*/__webpack_require__.n(external_root_React_commonjs2_react_commonjs_react_amd_react_);
1836
- // EXTERNAL MODULE: ../RootPortal/dist/cjs/index.js
1837
- var cjs = __webpack_require__(909);
1838
- var cjs_default = /*#__PURE__*/__webpack_require__.n(cjs);
1839
- // EXTERNAL MODULE: ../Utils/dist/cjs/useComId.js
1840
- var useComId = __webpack_require__(85);
1841
- var useComId_default = /*#__PURE__*/__webpack_require__.n(useComId);
1842
- // EXTERNAL MODULE: ../Utils/dist/cjs/useWindowScroll.js
1843
- var useWindowScroll = __webpack_require__(499);
1844
- var useWindowScroll_default = /*#__PURE__*/__webpack_require__.n(useWindowScroll);
1845
- // EXTERNAL MODULE: ../Utils/dist/cjs/useClickOutside.js
1846
- var useClickOutside = __webpack_require__(761);
1847
- var useClickOutside_default = /*#__PURE__*/__webpack_require__.n(useClickOutside);
1848
- // EXTERNAL MODULE: ../Utils/dist/cjs/extract.js
1849
- var extract = __webpack_require__(135);
1850
- // EXTERNAL MODULE: ../Utils/dist/cjs/convert.js
1851
- var convert = __webpack_require__(79);
1852
- // EXTERNAL MODULE: ../Utils/dist/cjs/getElementProperty.js
1853
- var getElementProperty = __webpack_require__(767);
1854
- // EXTERNAL MODULE: ../Utils/dist/cjs/cls.js
1855
- var cls = __webpack_require__(188);
1856
- ;// CONCATENATED MODULE: ./src/Group.tsx
1857
-
1858
-
1859
- function Group(props) {
1860
- var level = props.level,
1861
- columnTitle = props.columnTitle,
1862
- data = props.data,
1863
- cleanNodeBtnClassName = props.cleanNodeBtnClassName,
1864
- cleanNodeBtnContent = props.cleanNodeBtnContent,
1865
- selectEv = props.selectEv;
1866
- return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, data.map(function (item, index) {
1867
- if (item.id.toString().indexOf('$EMPTY_ID_') < 0) {
1868
- return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
1869
- key: index,
1870
- "data-opt": "true",
1871
- "data-index": index,
1872
- "data-id": item.id,
1873
- "data-value": JSON.stringify(item),
1874
- "data-level": level,
1875
- className: (0,cls.combinedCls)('cas-select__opt', {
1876
- 'active': item.current
1877
- }),
1878
- dangerouslySetInnerHTML: {
1879
- __html: typeof item.label !== 'undefined' ? item.label : item.name // "item.label" usually uses hierarchical style
1880
- },
1881
-
1882
- onClick: function onClick(e) {
1883
- return selectEv === null || selectEv === void 0 ? void 0 : selectEv(e, item, index);
1884
- }
1885
- });
1886
- } else {
1887
- return columnTitle[level] === '' ? null : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("h3", {
1888
- key: index,
1889
- className: "cas-select__opt-header"
1890
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
1891
- dangerouslySetInnerHTML: {
1892
- __html: columnTitle[level]
1893
- }
1894
- }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
1895
- className: "cas-select__opt-header__clean"
1896
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("a", {
1897
- tabIndex: -1,
1898
- href: "#",
1899
- className: cleanNodeBtnClassName || 'btn btn-link p-0 m-0 text-decoration-none',
1900
- "data-opt": "true",
1901
- "data-opt-header": "true",
1902
- "data-index": index,
1903
- "data-id": item.id,
1904
- "data-value": JSON.stringify(item),
1905
- "data-level": level,
1906
- onClick: function onClick(e) {
1907
- return selectEv === null || selectEv === void 0 ? void 0 : selectEv(e, item, index);
1908
- }
1909
- }, cleanNodeBtnContent || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("svg", {
1910
- width: "12px",
1911
- height: "12px",
1912
- viewBox: "0 0 16 16"
1913
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("path", {
1914
- fill: "inherit",
1915
- d: "M9.41 8l3.29-3.29c.19-.18.3-.43.3-.71a1.003 1.003 0 00-1.71-.71L8 6.59l-3.29-3.3a1.003 1.003 0 00-1.42 1.42L6.59 8 3.3 11.29c-.19.18-.3.43-.3.71a1.003 1.003 0 001.71.71L8 9.41l3.29 3.29c.18.19.43.3.71.3a1.003 1.003 0 00.71-1.71L9.41 8z",
1916
- fillRule: "evenodd"
1917
- })))));
1918
- }
1919
- }));
1920
- }
1921
- ;// CONCATENATED MODULE: ./src/index.tsx
1922
- var _excluded = ["popupRef", "wrapperClassName", "controlClassName", "controlExClassName", "exceededSidePosOffset", "disabled", "required", "value", "label", "placeholder", "name", "id", "extractValueByBraces", "columnTitle", "depth", "loader", "displayResult", "displayResultArrow", "controlArrow", "valueType", "showCloseBtn", "style", "tabIndex", "triggerClassName", "triggerContent", "cleanNodeBtnClassName", "cleanNodeBtnContent", "fetchFuncAsync", "fetchFuncMethod", "fetchFuncMethodParams", "fetchCallback", "onFetch", "onChange", "onBlur", "onFocus"];
1923
- 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; }
1924
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
1925
- 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."); }
1926
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
1927
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
1928
- 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); }
1929
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1930
- 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); } }
1931
- 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); }); }; }
1932
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
1933
- 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."); }
1934
- 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); }
1935
- 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; }
1936
- 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; } }
1937
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
1938
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
1939
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
1940
-
1941
-
1942
-
1943
-
1944
-
1945
-
1946
-
1947
-
1948
-
1949
-
1950
- var CascadingSelect = function CascadingSelect(props) {
1951
- var popupRef = props.popupRef,
1952
- wrapperClassName = props.wrapperClassName,
1953
- controlClassName = props.controlClassName,
1954
- controlExClassName = props.controlExClassName,
1955
- exceededSidePosOffset = props.exceededSidePosOffset,
1956
- disabled = props.disabled,
1957
- required = props.required,
1958
- value = props.value,
1959
- label = props.label,
1960
- placeholder = props.placeholder,
1961
- name = props.name,
1962
- id = props.id,
1963
- extractValueByBraces = props.extractValueByBraces,
1964
- columnTitle = props.columnTitle,
1965
- depth = props.depth,
1966
- loader = props.loader,
1967
- displayResult = props.displayResult,
1968
- displayResultArrow = props.displayResultArrow,
1969
- controlArrow = props.controlArrow,
1970
- valueType = props.valueType,
1971
- showCloseBtn = props.showCloseBtn,
1972
- style = props.style,
1973
- tabIndex = props.tabIndex,
1974
- triggerClassName = props.triggerClassName,
1975
- triggerContent = props.triggerContent,
1976
- cleanNodeBtnClassName = props.cleanNodeBtnClassName,
1977
- cleanNodeBtnContent = props.cleanNodeBtnContent,
1978
- fetchFuncAsync = props.fetchFuncAsync,
1979
- fetchFuncMethod = props.fetchFuncMethod,
1980
- fetchFuncMethodParams = props.fetchFuncMethodParams,
1981
- fetchCallback = props.fetchCallback,
1982
- onFetch = props.onFetch,
1983
- onChange = props.onChange,
1984
- onBlur = props.onBlur,
1985
- onFocus = props.onFocus,
1986
- attributes = _objectWithoutProperties(props, _excluded);
1987
- var DEPTH = depth || 1055; // the default value same as bootstrap
1988
- var POS_OFFSET = 0;
1989
- var EXCEEDED_SIDE_POS_OFFSET = Number(exceededSidePosOffset) || 15;
1990
- var VALUE_BY_BRACES = typeof extractValueByBraces === 'undefined' ? true : extractValueByBraces;
1991
- var uniqueID = useComId_default()();
1992
- var idRes = id || uniqueID;
1993
- var rootRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
1994
- var valRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
1995
- var listRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
1996
-
1997
- // exposes the following methods
1998
- (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(popupRef, function () {
1999
- return {
2000
- close: function close() {
2001
- cancel();
2002
- }
2003
- };
2004
- }, [popupRef]);
2005
-
2006
- // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
2007
- // DO NOT USE `useState()` for `dictionaryData`, `listData`,
2008
- // because the list uses vanilla JS DOM events which will cause the results of useState not to be displayed in real time.
2009
- // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
2010
-
2011
- var dictionaryData = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)([]);
2012
- var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
2013
- _useState2 = _slicedToArray(_useState, 2),
2014
- loading = _useState2[0],
2015
- setLoading = _useState2[1];
2016
- var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)([]),
2017
- _useState4 = _slicedToArray(_useState3, 2),
2018
- columnTitleData = _useState4[0],
2019
- setColumnTitleData = _useState4[1];
2020
- var _useState5 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
2021
- _useState6 = _slicedToArray(_useState5, 2),
2022
- hasErr = _useState6[0],
2023
- setHasErr = _useState6[1];
2024
- var _useState7 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(value || ''),
2025
- _useState8 = _slicedToArray(_useState7, 2),
2026
- changedVal = _useState8[0],
2027
- setChangedVal = _useState8[1];
2028
-
2029
- //for variable
2030
- var listData = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)([]);
2031
- var selectedData = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
2032
- labels: [],
2033
- values: []
2034
- });
2035
- var _useState9 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
2036
- _useState10 = _slicedToArray(_useState9, 2),
2037
- isShow = _useState10[0],
2038
- setIsShow = _useState10[1];
2039
-
2040
- // click outside
2041
- useClickOutside_default()({
2042
- enabled: isShow && rootRef.current && listRef.current,
2043
- isOutside: function isOutside(event) {
2044
- // close dropdown when other dropdown is opened
2045
- return rootRef.current !== event.target && !rootRef.current.contains(event.target) && listRef.current !== event.target && !listRef.current.contains(event.target);
2046
- },
2047
- handle: function handle(event) {
2048
- cancel();
2049
- }
2050
- }, [isShow, rootRef, listRef]);
2051
-
2052
- // Add function to the element that should be used as the scrollable area.
2053
- var _useWindowScroll = useWindowScroll_default()({
2054
- performance: ['debounce', 500],
2055
- // "['debounce', 500]" or "['throttle', 500]"
2056
- handle: function handle(scrollData) {
2057
- popwinPosInit(false);
2058
- }
2059
- }),
2060
- _useWindowScroll2 = _slicedToArray(_useWindowScroll, 2),
2061
- scrollData = _useWindowScroll2[0],
2062
- windowScrollUpdate = _useWindowScroll2[1];
2063
- function popwinPosInit() {
2064
- var showAct = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
2065
- if (rootRef.current === null || valRef.current === null) return;
2066
-
2067
- // update modal position
2068
- var _modalRef = document.querySelector("#cas-select__items-wrapper-".concat(idRes));
2069
- var _triggerRef = valRef.current;
2070
- var _triggerXaxisRef = rootRef.current;
2071
-
2072
- // console.log(getAbsolutePositionOfStage(_triggerRef));
2073
-
2074
- if (_modalRef === null) return;
2075
- var _getAbsolutePositionO = (0,getElementProperty.getAbsolutePositionOfStage)(_triggerXaxisRef),
2076
- x = _getAbsolutePositionO.x;
2077
- var _getAbsolutePositionO2 = (0,getElementProperty.getAbsolutePositionOfStage)(_triggerRef),
2078
- y = _getAbsolutePositionO2.y,
2079
- width = _getAbsolutePositionO2.width,
2080
- height = _getAbsolutePositionO2.height;
2081
- var _triggerBox = _triggerRef.getBoundingClientRect();
2082
- var targetPos = '';
2083
-
2084
- // STEP 1:
2085
- //-----------
2086
- // display wrapper
2087
- if (showAct) _modalRef.classList.add('active');
2088
-
2089
- // STEP 2:
2090
- //-----------
2091
- // Detect position
2092
- if (window.innerHeight - _triggerBox.top > 100) {
2093
- targetPos = 'bottom';
2094
- } else {
2095
- targetPos = 'top';
2096
- }
2097
-
2098
- // STEP 3:
2099
- //-----------
2100
- // Adjust position
2101
- if (targetPos === 'top') {
2102
- _modalRef.style.left = x + 'px';
2103
- //_modalRef.style.top = y - POS_OFFSET - (listRef.current.clientHeight) - 2 + 'px';
2104
- _modalRef.style.top = 'auto';
2105
- _modalRef.style.bottom = window.innerHeight - _triggerBox.top + POS_OFFSET + 2 + 'px';
2106
- _modalRef.style.setProperty('position', 'fixed', 'important');
2107
- _modalRef.classList.add('pos-top');
2108
- }
2109
- if (targetPos === 'bottom') {
2110
- _modalRef.style.left = x + 'px';
2111
- _modalRef.style.bottom = 'auto';
2112
- _modalRef.style.top = y + height + POS_OFFSET + 'px';
2113
- _modalRef.style.setProperty('position', 'absolute', 'important');
2114
- _modalRef.classList.remove('pos-top');
2115
- }
2116
-
2117
- // STEP 4:
2118
- //-----------
2119
- // Determine whether it exceeds the far right or left side of the screen
2120
- var _modalContent = _modalRef;
2121
- var _modalBox = _modalContent.getBoundingClientRect();
2122
- if (typeof _modalContent.dataset.offset === 'undefined' && _modalBox.left > 0) {
2123
- // 10 pixels is used to account for some bias in mobile devices
2124
- if (_modalBox.right + 10 > window.innerWidth) {
2125
- var _modalOffsetPosition = _modalBox.right - window.innerWidth + EXCEEDED_SIDE_POS_OFFSET;
2126
- _modalContent.dataset.offset = _modalOffsetPosition;
2127
- _modalContent.style.marginLeft = "-".concat(_modalOffsetPosition, "px");
2128
- // console.log('_modalPosition: ', _modalOffsetPosition)
2129
- }
2130
-
2131
- if (_modalBox.left - 10 < 0) {
2132
- var _modalOffsetPosition2 = Math.abs(_modalBox.left) + EXCEEDED_SIDE_POS_OFFSET;
2133
- _modalContent.dataset.offset = _modalOffsetPosition2;
2134
- _modalContent.style.marginLeft = "".concat(_modalOffsetPosition2, "px");
2135
- // console.log('_modalPosition: ', _modalOffsetPosition)
2136
- }
2137
- }
2138
- }
2139
-
2140
- function popwinPosHide() {
2141
- var _modalRef = document.querySelector("#cas-select__items-wrapper-".concat(idRes));
2142
- if (_modalRef !== null) {
2143
- // remove classnames and styles
2144
- _modalRef.classList.remove('active');
2145
- }
2146
- }
2147
- function updateColDisplay(useFetch) {
2148
- var emptyAction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
2149
- var level = arguments.length > 2 ? arguments[2] : undefined;
2150
- if (listRef.current === null) return;
2151
- var latestDisplayColIndex = 0;
2152
- var currentItemsInner = listRef.current.querySelector('.cas-select__items-inner');
2153
- if (currentItemsInner !== null) {
2154
- var colItemsWrapper = [].slice.call(currentItemsInner.querySelectorAll('.cas-select__items-col'));
2155
- colItemsWrapper.forEach(function (perCol) {
2156
- perCol.classList.remove('hide-col');
2157
- });
2158
- colItemsWrapper.some(function (perCol, i) {
2159
- var hasActive = [].slice.call(perCol.querySelectorAll('[data-opt]')).some(function (el) {
2160
- return el.classList.contains('active');
2161
- });
2162
- if (!hasActive) {
2163
- latestDisplayColIndex = i;
2164
- return true;
2165
- }
2166
- return false;
2167
- });
2168
-
2169
- // remove columns behind the current empty trigger
2170
- colItemsWrapper.forEach(function (perCol, i) {
2171
- if (!emptyAction) {
2172
- if (useFetch) {
2173
- if (i > latestDisplayColIndex && latestDisplayColIndex > 0) perCol.classList.add('hide-col');
2174
- } else {
2175
- if (i === latestDisplayColIndex && latestDisplayColIndex > 0) perCol.classList.add('hide-col');
2176
- }
2177
- } else {
2178
- if (typeof level !== 'undefined' && Number.isInteger(level)) {
2179
- if (i > level) perCol.classList.add('hide-col');
2180
- }
2181
- }
2182
- });
2183
- }
2184
- }
2185
- function cancel() {
2186
- // hide list
2187
- setIsShow(false);
2188
- popwinPosHide();
2189
- }
2190
- function activate() {
2191
- // show list
2192
- setIsShow(true);
2193
-
2194
- // window position
2195
- setTimeout(function () {
2196
- popwinPosInit();
2197
- }, 0);
2198
- }
2199
- function fetchData(_x2) {
2200
- return _fetchData.apply(this, arguments);
2201
- } //
2202
- function _fetchData() {
2203
- _fetchData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
2204
- var response, _ORGIN_DATA, _EMPTY_SUPPORTED_DATA;
2205
- return _regeneratorRuntime().wrap(function _callee$(_context) {
2206
- while (1) switch (_context.prev = _context.next) {
2207
- case 0:
2208
- if (!(_typeof(fetchFuncAsync) === 'object')) {
2209
- _context.next = 21;
2210
- break;
2211
- }
2212
- //
2213
- setLoading(true);
2214
- _context.next = 4;
2215
- return fetchFuncAsync["".concat(fetchFuncMethod)].apply(fetchFuncAsync, _toConsumableArray(params.split(',')));
2216
- case 4:
2217
- response = _context.sent;
2218
- _ORGIN_DATA = response.data; // loading
2219
- setLoading(false);
2220
- if (!(typeof _ORGIN_DATA[0] === 'undefined')) {
2221
- _context.next = 9;
2222
- break;
2223
- }
2224
- return _context.abrupt("return");
2225
- case 9:
2226
- // reset data structure
2227
- if (typeof fetchCallback === 'function') {
2228
- _ORGIN_DATA = fetchCallback(_ORGIN_DATA);
2229
- }
2230
-
2231
- // Determine whether the data structure matches
2232
- if (_ORGIN_DATA.length > 0 && typeof _ORGIN_DATA[0].id === 'undefined') {
2233
- console.warn('The data structure does not match, please refer to the example in the component documentation.');
2234
- setHasErr(true);
2235
- _ORGIN_DATA = [];
2236
- }
2237
-
2238
- // STEP 1: ===========
2239
- // column titles
2240
- fillColumnTitle(_ORGIN_DATA);
2241
-
2242
- // STEP 2: ===========
2243
- // dictionary data (orginal)
2244
- dictionaryData.current = _ORGIN_DATA;
2245
-
2246
- // STEP 3: ===========
2247
- // Add an empty item to each list to support empty item selection
2248
- _EMPTY_SUPPORTED_DATA = JSON.parse(JSON.stringify(_ORGIN_DATA));
2249
- addEmptyOpt(_EMPTY_SUPPORTED_DATA, 0);
2250
-
2251
- // STEP 4: ===========
2252
- // Turn the data of each group into an array
2253
- listData.current = [_EMPTY_SUPPORTED_DATA];
2254
-
2255
- // STEP 5: ===========
2256
- //
2257
- onFetch === null || onFetch === void 0 ? void 0 : onFetch(_EMPTY_SUPPORTED_DATA, _ORGIN_DATA);
2258
-
2259
- // STEP 6: ===========
2260
- // update column display with DOM
2261
- updateColDisplay(true, false, undefined);
2262
- return _context.abrupt("return", [_ORGIN_DATA, _EMPTY_SUPPORTED_DATA]);
2263
- case 21:
2264
- return _context.abrupt("return", []);
2265
- case 22:
2266
- case "end":
2267
- return _context.stop();
2268
- }
2269
- }, _callee);
2270
- }));
2271
- return _fetchData.apply(this, arguments);
2272
- }
2273
- function doFetch() {
2274
- // data fetch action
2275
- var _params = fetchFuncMethodParams || [];
2276
- return fetchData(_params.join(','));
2277
- }
2278
- function handleFocus(event) {
2279
- var _rootRef$current;
2280
- (_rootRef$current = rootRef.current) === null || _rootRef$current === void 0 ? void 0 : _rootRef$current.classList.add('focus');
2281
-
2282
- //
2283
- handleDisplayOptions(null);
2284
-
2285
- //
2286
- onFocus === null || onFocus === void 0 ? void 0 : onFocus(event);
2287
- }
2288
- function handleBlur(event) {
2289
- var _rootRef$current2;
2290
- //----
2291
- //remove focus style
2292
- (_rootRef$current2 = rootRef.current) === null || _rootRef$current2 === void 0 ? void 0 : _rootRef$current2.classList.remove('focus');
2293
-
2294
- //
2295
- onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);
2296
- }
2297
- function handleDisplayOptions(event) {
2298
- if (event) event.preventDefault();
2299
-
2300
- //
2301
- activate();
2302
- }
2303
- function handleClickItem(e, resValue, index, level, curData) {
2304
- e.preventDefault();
2305
-
2306
- // update column display with DOM
2307
- //////////////////////////////////////////
2308
- updateColDisplay(true, false, level);
2309
-
2310
- // update value
2311
- //////////////////////////////////////////
2312
- var inputVal = updateValue(dictionaryData.current, resValue.id, level);
2313
-
2314
- // callback
2315
- //////////////////////////////////////////
2316
- if (typeof onChange === 'function') {
2317
- onChange(valRef.current, resValue, index, level, inputVal, cancel);
2318
- }
2319
-
2320
- // update data
2321
- //////////////////////////////////////////
2322
- var newData = curData; // such as: [Array(6), Array(3)]
2323
-
2324
- // All the elements from start(array.length - start) to the end of the array will be deleted.
2325
- newData.splice(level + 1);
2326
-
2327
- // active status
2328
- if (resValue.children) {
2329
- var childList = resValue.children;
2330
- markAllItems(childList);
2331
- newData[level + 1] = childList;
2332
- }
2333
- markCurrent(newData[level], index);
2334
-
2335
- // update actived items
2336
- //////////////////////////////////////////
2337
- listData.current = newData;
2338
-
2339
- // close modal
2340
- //////////////////////////////////////////
2341
- if (typeof resValue.children === 'undefined' && resValue.id.toString().indexOf('$EMPTY_ID_') < 0) {
2342
- //
2343
- cancel();
2344
- }
2345
-
2346
- // active current option with DOM
2347
- //////////////////////////////////////////
2348
- var currentItemsInner = e.currentTarget.closest('.cas-select__items-inner');
2349
- if (currentItemsInner !== null) {
2350
- curData.forEach(function (v, col) {
2351
- var colItemsWrapper = currentItemsInner.querySelectorAll('.cas-select__items-col');
2352
- colItemsWrapper.forEach(function (perCol) {
2353
- var _col = Number(perCol.dataset.col);
2354
- if (_col >= level) {
2355
- [].slice.call(perCol.querySelectorAll('[data-opt]')).forEach(function (node) {
2356
- node.classList.remove('active');
2357
- });
2358
- }
2359
- });
2360
- });
2361
-
2362
- // not header option
2363
- if (typeof e.currentTarget.dataset.optHeader === 'undefined') e.currentTarget.classList.add('active');
2364
- }
2365
- }
2366
-
2367
- /**
2368
- * Active the selected item
2369
- * @param arr
2370
- * @param index
2371
- * @returns
2372
- */
2373
- function markCurrent(arr, index) {
2374
- if (!Array.isArray(arr)) return;
2375
-
2376
- // click an item
2377
- //////////////////////////////////////////
2378
- for (var i = 0; i < arr.length; i++) {
2379
- if (i === index) {
2380
- arr[i].current = true;
2381
- } else {
2382
- arr[i].current = false;
2383
- }
2384
- }
2385
-
2386
- // return result
2387
- //////////////////////////////////////////
2388
- return arr;
2389
- }
2390
-
2391
- /**
2392
- * Deactivate all items
2393
- * @param arr
2394
- * @returns
2395
- */
2396
- function markAllItems(arr) {
2397
- for (var i = 0; i < arr.length; i++) {
2398
- arr[i].current = false;
2399
- if (arr[i].children) markAllItems(arr[i].children);
2400
- }
2401
- }
2402
- function updateValue(arr, targetVal) {
2403
- var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
2404
- var inputEl = valRef.current;
2405
- var _valueData, _labelData;
2406
- if (targetVal.toString().indexOf('$EMPTY_ID_') >= 0) {
2407
- // If clearing the current column
2408
- //////////////////////////////////////////
2409
- _valueData = selectedData.current.values;
2410
- _labelData = selectedData.current.labels;
2411
-
2412
- // update result to input
2413
- _valueData.splice(level);
2414
- _labelData.splice(level);
2415
-
2416
- //
2417
- selectedData.current = {
2418
- labels: _labelData,
2419
- values: _valueData
2420
- };
2421
- } else {
2422
- // click an item
2423
- //////////////////////////////////////////
2424
- //search JSON key that contains specific string
2425
- var _labels = queryResultOfJSON(arr, targetVal, 'value');
2426
- var _values = queryResultOfJSON(arr, targetVal, 'key');
2427
-
2428
- // update result to input
2429
- _valueData = _values ? _values.map(function (item) {
2430
- return item;
2431
- }) : [];
2432
- _labelData = _labels ? _labels.map(function (item) {
2433
- return item;
2434
- }) : [];
2435
-
2436
- //
2437
- selectedData.current = {
2438
- labels: _labelData,
2439
- values: _valueData
2440
- };
2441
- }
2442
-
2443
- // update selected data
2444
- //////////////////////////////////////////
2445
- var inputVal_0 = VALUE_BY_BRACES ? (0,convert.convertArrToValByBraces)(_valueData.map(function (item, i) {
2446
- return "".concat(item, "[").concat(_valueData[i], "]");
2447
- })) : _valueData.map(function (item, i) {
2448
- return "".concat(item, "[").concat(_valueData[i], "]");
2449
- }).join(',');
2450
- var inputVal_1 = VALUE_BY_BRACES ? (0,convert.convertArrToValByBraces)(_labelData.map(function (item, i) {
2451
- return "".concat(item, "[").concat(_valueData[i], "]");
2452
- })) : _labelData.map(function (item, i) {
2453
- return "".concat(item, "[").concat(_valueData[i], "]");
2454
- }).join(',');
2455
- if (valueType === 'value') {
2456
- if (inputEl !== null) setChangedVal(inputVal_0);
2457
- } else {
2458
- if (inputEl !== null) setChangedVal(inputVal_1);
2459
- }
2460
- return {
2461
- 0: inputVal_0,
2462
- 1: inputVal_1
2463
- };
2464
- }
2465
- function cleanValue() {
2466
- selectedData.current = {
2467
- labels: [],
2468
- values: []
2469
- };
2470
- dictionaryData.current = [];
2471
- listData.current = [];
2472
- setChangedVal('');
2473
- }
2474
- function chkValueExist(v) {
2475
- return typeof v !== 'undefined' && v !== '';
2476
- }
2477
- function initDefaultValue(defaultValue) {
2478
- var _doFetch;
2479
- // STEP 1:
2480
- // change the value to trigger component rendering
2481
- //--------------------------------
2482
- if (!chkValueExist(defaultValue)) {
2483
- cleanValue();
2484
- } else {
2485
- setChangedVal(defaultValue);
2486
- }
2487
-
2488
- // STEP 2:
2489
- // do fetch
2490
- //--------------------------------
2491
- (_doFetch = doFetch()) === null || _doFetch === void 0 ? void 0 : _doFetch.then(function (response) {
2492
- var _data = response[1];
2493
-
2494
- // Determine whether the splicing value of the default value is empty
2495
- if (chkValueExist(defaultValue)) {
2496
- // if the default value uses the pure string
2497
- if (!(0,extract.extractorExist)(defaultValue)) {
2498
- //Set a default value
2499
- selectedData.current = {
2500
- labels: [defaultValue],
2501
- values: ['']
2502
- };
2503
- setChangedVal(defaultValue);
2504
- return; // required RETURN
2505
- }
2506
-
2507
- var rowQueryAttr = valueType === 'value' ? 'id' : 'name';
2508
- var targetVal = defaultValue.match(/(\[.*?\])/gi).map(function (item, i) {
2509
- return VALUE_BY_BRACES ? (0,extract.extractContentsOfBraces)(defaultValue)[i].replace(item, '') : defaultValue.split(',')[i].replace(item, '');
2510
- });
2511
-
2512
- //
2513
- var _allColumnsData = [];
2514
- var _allLables = [];
2515
- var _allValues = [];
2516
-
2517
- // loop over each column
2518
- //////////////////////////////////////////
2519
- var _loop = function _loop(col) {
2520
- if (col === 0) {
2521
- // STEP 1: ===========
2522
- //active item from current column
2523
- //////////////////////////////////////////
2524
- var newData = JSON.parse(JSON.stringify(_data));
2525
- var activedIndex = _data.findIndex(function (item) {
2526
- return item[rowQueryAttr].toString() === targetVal[col].toString();
2527
- });
2528
- markAllItems(newData);
2529
- markCurrent(newData, activedIndex);
2530
-
2531
- //
2532
- if (activedIndex !== -1) {
2533
- _allLables.push(newData[activedIndex].name);
2534
- }
2535
- _allColumnsData.push(newData);
2536
- }
2537
- if (col > 0) {
2538
- var _findNode = searchObject(_data, function (v) {
2539
- return v != null && v != undefined && v[rowQueryAttr] == targetVal[col - 1];
2540
- });
2541
- var childList = typeof _findNode[0] !== 'undefined' ? _findNode[0].children : undefined;
2542
-
2543
- // STEP 1: ===========
2544
- //active item from current column
2545
- //////////////////////////////////////////
2546
- if (typeof childList !== 'undefined') {
2547
- var _newData = JSON.parse(JSON.stringify(childList));
2548
- var _activedIndex = _newData.findIndex(function (item) {
2549
- if (typeof targetVal[col] === 'undefined') return -1;
2550
- return item[rowQueryAttr].toString() === targetVal[col].toString();
2551
- });
2552
- markAllItems(_newData);
2553
- markCurrent(_newData, _activedIndex);
2554
-
2555
- //
2556
- if (_activedIndex !== -1) {
2557
- _allLables.push(_newData[_activedIndex].name);
2558
- }
2559
- _allColumnsData.push(_newData);
2560
- }
2561
- }
2562
- };
2563
- for (var col = 0; col <= targetVal.length; col++) {
2564
- _loop(col);
2565
- }
2566
-
2567
- // STEP 2: ===========
2568
- // update actived items
2569
- //////////////////////////////////////////
2570
- listData.current = _allColumnsData;
2571
-
2572
- // STEP 3: ===========
2573
- // Set a default value
2574
- //////////////////////////////////////////
2575
- selectedData.current = {
2576
- labels: _allLables,
2577
- values: _allValues
2578
- };
2579
- }
2580
- });
2581
-
2582
- // Determine whether the splicing value of the default value is empty
2583
- if (typeof defaultValue !== 'undefined' && defaultValue !== '') {
2584
- var formattedDefaultValue = VALUE_BY_BRACES ? (0,extract.extractContentsOfBraces)(defaultValue) : defaultValue.split(',');
2585
- var emptyDefaultValueCheck = Array.isArray(formattedDefaultValue) ? formattedDefaultValue.every(function (item, index) {
2586
- if (item !== '[]') {
2587
- return false;
2588
- }
2589
- return true;
2590
- }) : true;
2591
- if (emptyDefaultValueCheck) {
2592
- cleanValue();
2593
- }
2594
- }
2595
- }
2596
- function fillColumnTitle(obj) {
2597
- var _Array;
2598
- var dataDepth = getDepth(obj);
2599
- var oldColumnTitleData = columnTitle ? columnTitle : [];
2600
- var newColumnTitleData = (_Array = new Array(dataDepth)) === null || _Array === void 0 ? void 0 : _Array.fill('');
2601
- oldColumnTitleData.forEach(function (item, index) {
2602
- newColumnTitleData[index] = item;
2603
- });
2604
-
2605
- //
2606
- if (oldColumnTitleData.length > dataDepth) {
2607
- newColumnTitleData.splice(dataDepth, oldColumnTitleData.length - dataDepth);
2608
- }
2609
- setColumnTitleData(newColumnTitleData);
2610
- }
2611
- function getDepth(obj) {
2612
- var depth = 0;
2613
- obj.forEach(function (item) {
2614
- if (item.children) {
2615
- item.children.forEach(function (d) {
2616
- var tmpDepth = getDepth(item.children);
2617
- if (tmpDepth > depth) {
2618
- depth = tmpDepth;
2619
- }
2620
- });
2621
- }
2622
- });
2623
- return 1 + depth;
2624
- }
2625
- function addEmptyOpt(obj, index) {
2626
- index++;
2627
- obj.unshift({
2628
- id: "$EMPTY_ID_" + index,
2629
- name: "",
2630
- itemDepth: obj.length === 0 ? 0 : obj[0].itemDepth
2631
- });
2632
- obj.forEach(function (item, depth) {
2633
- if (item.children) {
2634
- addEmptyOpt(item.children, index * (depth + 1));
2635
- }
2636
- });
2637
- }
2638
- function searchObject(object, matchCallback) {
2639
- var result = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
2640
- var searched = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
2641
- if (searched.indexOf(object) !== -1 && object === Object(object)) {
2642
- return;
2643
- }
2644
- searched.push(object);
2645
- if (matchCallback(object)) {
2646
- result.push(object);
2647
- }
2648
- try {
2649
- if (object === Object(object)) {
2650
- for (var property in object) {
2651
- if (property.indexOf("$") !== 0) {
2652
- searchObject(object[property], matchCallback, result, searched);
2653
- }
2654
- }
2655
- }
2656
- } catch (e) {
2657
- throw e;
2658
- }
2659
- return result;
2660
- }
2661
- function queryResultOfJSON(data, targetVal, returnType) {
2662
- var callbackValueNested = [];
2663
- var lastFirstLevelName = '';
2664
- var loop = true;
2665
- var resDepth = 0;
2666
- var rowQueryAttr = 'id';
2667
- var getIndexOf = function getIndexOf(arr, val) {
2668
- for (var i = 0; i < arr.length; i++) {
2669
- if (arr[i][rowQueryAttr].toString() === val.toString()) return i;
2670
- }
2671
- return -1;
2672
- };
2673
- var searchJsonStr = function searchJsonStr(list, depth) {
2674
- // `depth` is very important, it is used to accurately judge the final result
2675
- if (typeof depth === 'undefined') {
2676
- depth = 0;
2677
- } else {
2678
- depth++;
2679
- }
2680
- for (var i = 0; i < list.length; i++) {
2681
- var row = list[i];
2682
- var callbackValue = void 0;
2683
- if (returnType === 'key') callbackValue = row[rowQueryAttr].toString();
2684
- if (returnType === 'value') callbackValue = row.name.toString();
2685
- if (loop) {
2686
- // get first-level item
2687
- if (getIndexOf(data, row[rowQueryAttr]) !== -1) {
2688
- callbackValueNested.push(callbackValue);
2689
- lastFirstLevelName = callbackValue;
2690
- }
2691
-
2692
- // get child-level item
2693
- if (row.children) {
2694
- callbackValueNested.push(callbackValue);
2695
- }
2696
- }
2697
-
2698
- //check the value
2699
- if (row[rowQueryAttr].toString() === targetVal.toString()) {
2700
- callbackValueNested.push(callbackValue);
2701
- loop = false;
2702
- resDepth = depth;
2703
- break;
2704
- }
2705
-
2706
- // Note: Recursion must be placed here
2707
- if (loop) {
2708
- if (row.children) {
2709
- searchJsonStr(row.children, depth);
2710
- }
2711
- }
2712
- }
2713
- };
2714
- searchJsonStr(data);
2715
-
2716
- // (1) Remove duplicate values
2717
- //------------------------------------------
2718
- callbackValueNested = callbackValueNested.filter(function (item, index, arr) {
2719
- return arr.indexOf(item, 0) === index;
2720
- });
2721
-
2722
- // (2) Delete needless first-level
2723
- //------------------------------------------
2724
- var resAll = callbackValueNested.slice(callbackValueNested.indexOf(lastFirstLevelName), callbackValueNested.length);
2725
-
2726
- // (3) Returns result
2727
- //------------------------------------------
2728
- if (resAll.length > 1) {
2729
- // Get first-level item
2730
- resAll.splice(1);
2731
-
2732
- // Get child-level item
2733
- var resChild = callbackValueNested.slice(-resDepth); // Get the last elements in reverse
2734
-
2735
- // Combine
2736
- resAll = resAll.concat(resChild);
2737
- }
2738
- return resAll;
2739
- }
2740
- function displayInfo() {
2741
- var _data = selectedData.current;
2742
- var formattedDefaultValue = changedVal !== '' ? VALUE_BY_BRACES ? (0,extract.extractContentsOfBraces)(changedVal) : changedVal.split(',') : [];
2743
- var _labels = Array.isArray(_data.labels) && _data.labels.length > 0 ? _data.labels : [];
2744
-
2745
- // Prevent value from being a pure string that does not include "[]"
2746
- if (formattedDefaultValue === '') formattedDefaultValue = [];
2747
-
2748
- // Sometimes the array may be empty due to rendering speed
2749
- if (_labels.length === 0) {
2750
- _labels = formattedDefaultValue.map(function (s) {
2751
- return s.toString().replace(/[\w\s]/gi, '').replace(/\[\]/g, '');
2752
- });
2753
- }
2754
-
2755
- // Traversing the next level, if there is no match, the last label will be empty
2756
- _labels = _labels.filter(function (v) {
2757
- return v != '';
2758
- });
2759
- return _labels.length > 0 ? _labels.map(function (item, i, arr) {
2760
- if (arr.length - 1 === i) {
2761
- return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
2762
- key: i
2763
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
2764
- dangerouslySetInnerHTML: {
2765
- __html: item
2766
- }
2767
- }));
2768
- } else {
2769
- return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
2770
- key: i
2771
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
2772
- dangerouslySetInnerHTML: {
2773
- __html: item
2774
- }
2775
- }), arrowGenerator());
2776
- }
2777
- }) : '';
2778
- }
2779
- function arrowGenerator() {
2780
- return displayResultArrow ? displayResultArrow : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("svg", {
2781
- viewBox: "0 0 22 22",
2782
- width: "8px"
2783
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("path", {
2784
- d: "m345.44 248.29l-194.29 194.28c-12.359 12.365-32.397 12.365-44.75 0-12.354-12.354-12.354-32.391 0-44.744l171.91-171.91-171.91-171.9c-12.354-12.359-12.354-32.394 0-44.748 12.354-12.359 32.391-12.359 44.75 0l194.29 194.28c6.177 6.18 9.262 14.271 9.262 22.366 0 8.099-3.091 16.196-9.267 22.373",
2785
- transform: "matrix(.03541-.00013.00013.03541 2.98 3.02)",
2786
- fill: "#a5a5a5"
2787
- }));
2788
- }
2789
- (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
2790
- // Initialize default value (request parameters for each level)
2791
- //--------------
2792
- initDefaultValue(value);
2793
- }, [value]);
2794
- return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
2795
- className: (0,cls.clsWrite)(wrapperClassName, 'cas-select__wrapper mb-3 position-relative', "cas-select__wrapper ".concat(wrapperClassName)),
2796
- ref: rootRef,
2797
- "data-overlay-id": "cas-select__items-wrapper-".concat(idRes)
2798
- }, label ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, typeof label === 'string' ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("label", {
2799
- htmlFor: idRes,
2800
- className: "form-label",
2801
- dangerouslySetInnerHTML: {
2802
- __html: "".concat(label)
2803
- }
2804
- }) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("label", {
2805
- htmlFor: idRes,
2806
- className: "form-label"
2807
- }, label)) : null, triggerContent ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
2808
- className: (0,cls.clsWrite)(wrapperClassName, 'cas-select__trigger d-inline w-auto', "cas-select__trigger ".concat(triggerClassName)),
2809
- onClick: handleDisplayOptions
2810
- }, triggerContent)) : null, !hasErr ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((cjs_default()), {
2811
- show: true,
2812
- containerClassName: "CascadingSelect"
2813
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
2814
- ref: listRef,
2815
- id: "cas-select__items-wrapper-".concat(idRes),
2816
- className: "cas-select__items-wrapper position-absolute border shadow small",
2817
- style: {
2818
- zIndex: DEPTH,
2819
- display: 'none'
2820
- }
2821
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("ul", {
2822
- className: "cas-select__items-inner"
2823
- }, loading ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
2824
- className: "cas-select__items-loader"
2825
- }, loader || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("svg", {
2826
- height: "12px",
2827
- width: "12px",
2828
- viewBox: "0 0 512 512"
2829
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("g", null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("path", {
2830
- fill: "inherit",
2831
- d: "M256,0c-23.357,0-42.297,18.932-42.297,42.288c0,23.358,18.94,42.288,42.297,42.288c23.357,0,42.279-18.93,42.279-42.288C298.279,18.932,279.357,0,256,0z"
2832
- }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("path", {
2833
- fill: "inherit",
2834
- d: "M256,427.424c-23.357,0-42.297,18.931-42.297,42.288C213.703,493.07,232.643,512,256,512c23.357,0,42.279-18.93,42.279-42.288C298.279,446.355,279.357,427.424,256,427.424z"
2835
- }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("path", {
2836
- fill: "inherit",
2837
- d: "M74.974,74.983c-16.52,16.511-16.52,43.286,0,59.806c16.52,16.52,43.287,16.52,59.806,0c16.52-16.511,16.52-43.286,0-59.806C118.261,58.463,91.494,58.463,74.974,74.983z"
2838
- }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("path", {
2839
- fill: "inherit",
2840
- d: "M377.203,377.211c-16.503,16.52-16.503,43.296,0,59.815c16.519,16.52,43.304,16.52,59.806,0c16.52-16.51,16.52-43.295,0-59.815C420.489,360.692,393.722,360.7,377.203,377.211z"
2841
- }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("path", {
2842
- fill: "inherit",
2843
- d: "M84.567,256c0.018-23.348-18.922-42.279-42.279-42.279c-23.357-0.009-42.297,18.932-42.279,42.288c-0.018,23.348,18.904,42.279,42.279,42.279C65.645,298.288,84.567,279.358,84.567,256z"
2844
- }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("path", {
2845
- fill: "inherit",
2846
- d: "M469.712,213.712c-23.357,0-42.279,18.941-42.297,42.288c0,23.358,18.94,42.288,42.297,42.297c23.357,0,42.297-18.94,42.279-42.297C512.009,232.652,493.069,213.712,469.712,213.712z"
2847
- }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("path", {
2848
- fill: "inherit",
2849
- d: "M74.991,377.22c-16.519,16.511-16.519,43.296,0,59.806c16.503,16.52,43.27,16.52,59.789,0c16.52-16.519,16.52-43.295,0-59.815C118.278,360.692,91.511,360.692,74.991,377.22z"
2850
- }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("path", {
2851
- fill: "inherit",
2852
- d: "M437.026,134.798c16.52-16.52,16.52-43.304,0-59.824c-16.519-16.511-43.304-16.52-59.823,0c-16.52,16.52-16.503,43.295,0,59.815C393.722,151.309,420.507,151.309,437.026,134.798z"
2853
- }))))) : null, showCloseBtn ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("a", {
2854
- href: "#",
2855
- tabIndex: -1,
2856
- onClick: function onClick(e) {
2857
- e.preventDefault();
2858
- cancel();
2859
- },
2860
- className: "cas-select__close position-absolute top-0 end-0 mt-0 mx-1"
2861
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("svg", {
2862
- width: "10px",
2863
- height: "10px",
2864
- viewBox: "0 0 1024 1024"
2865
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("path", {
2866
- fill: "#000",
2867
- d: "M195.2 195.2a64 64 0 0 1 90.496 0L512 421.504 738.304 195.2a64 64 0 0 1 90.496 90.496L602.496 512 828.8 738.304a64 64 0 0 1-90.496 90.496L512 602.496 285.696 828.8a64 64 0 0 1-90.496-90.496L421.504 512 195.2 285.696a64 64 0 0 1 0-90.496z"
2868
- }))) : null, listData.current.map(function (item, level) {
2869
- if (item.length > 0) {
2870
- return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("li", {
2871
- key: level,
2872
- "data-col": level,
2873
- className: "cas-select__items-col"
2874
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Group, {
2875
- level: level,
2876
- columnTitle: columnTitleData,
2877
- data: item,
2878
- cleanNodeBtnClassName: cleanNodeBtnClassName,
2879
- cleanNodeBtnContent: cleanNodeBtnContent,
2880
- selectEv: function selectEv(e, value, index) {
2881
- return handleClickItem(e, value, index, level, listData.current);
2882
- }
2883
- }));
2884
- } else {
2885
- return null;
2886
- }
2887
- })))) : null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
2888
- className: "cas-select__val",
2889
- onClick: handleDisplayOptions
2890
- }, displayResult ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
2891
- className: "cas-select__result"
2892
- }, displayInfo()) : null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("input", _extends({
2893
- ref: valRef,
2894
- id: idRes,
2895
- "data-overlay-id": "cas-select__items-wrapper-".concat(idRes),
2896
- name: name,
2897
- className: (0,cls.combinedCls)((0,cls.clsWrite)(controlClassName, 'form-control'), controlExClassName),
2898
- placeholder: placeholder,
2899
- value: changedVal // placeholder will not change if defaultValue is used
2900
- ,
2901
- onFocus: handleFocus,
2902
- onBlur: handleBlur,
2903
- disabled: disabled || null,
2904
- required: required || null,
2905
- style: style,
2906
- tabIndex: tabIndex || 0,
2907
- readOnly: true
2908
- }, attributes)), isShow ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
2909
- className: "cas-select__closemask",
2910
- onClick: function onClick(e) {
2911
- e.preventDefault();
2912
- cancel();
2913
- }
2914
- }) : null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
2915
- className: "arrow",
2916
- style: {
2917
- pointerEvents: 'none'
2918
- }
2919
- }, controlArrow ? controlArrow : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("svg", {
2920
- width: "10px",
2921
- height: "10px",
2922
- viewBox: "0 -4.5 20 20"
2923
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("g", {
2924
- stroke: "none",
2925
- strokeWidth: "1",
2926
- fill: "none"
2927
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("g", {
2928
- transform: "translate(-180.000000, -6684.000000)",
2929
- className: "arrow-fill-g",
2930
- fill: "#a5a5a5"
2931
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("g", {
2932
- transform: "translate(56.000000, 160.000000)"
2933
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("path", {
2934
- d: "M144,6525.39 L142.594,6524 L133.987,6532.261 L133.069,6531.38 L133.074,6531.385 L125.427,6524.045 L124,6525.414 C126.113,6527.443 132.014,6533.107 133.987,6535 C135.453,6533.594 134.024,6534.965 144,6525.39"
2935
- })))))))));
2936
- };
2937
- /* harmony default export */ const src = (CascadingSelect);
2938
- })();
2939
-
2940
- /******/ return __webpack_exports__;
2941
- /******/ })()
2942
- ;
2943
- });