funda-ui 4.5.712 → 4.5.713

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (483) hide show
  1. package/README.md +4 -105
  2. package/package.json +44 -41
  3. package/.gitattributes +0 -2
  4. package/README_PUBLISH.md +0 -126
  5. package/logo.png +0 -0
  6. package/preview.png +0 -0
  7. package/publish/LICENSE +0 -21
  8. package/publish/README.md +0 -126
  9. package/publish/lib/cjs/Accordion/index.d.ts +0 -2
  10. package/publish/lib/cjs/Accordion/index.js +0 -1035
  11. package/publish/lib/cjs/BackToTop/index.d.ts +0 -17
  12. package/publish/lib/cjs/BackToTop/index.js +0 -904
  13. package/publish/lib/cjs/CascadingSelect/index.d.ts +0 -60
  14. package/publish/lib/cjs/CascadingSelect/index.js +0 -2943
  15. package/publish/lib/cjs/CascadingSelectE2E/index.d.ts +0 -71
  16. package/publish/lib/cjs/CascadingSelectE2E/index.js +0 -3540
  17. package/publish/lib/cjs/Checkbox/index.d.ts +0 -28
  18. package/publish/lib/cjs/Checkbox/index.js +0 -662
  19. package/publish/lib/cjs/ColorPicker/index.d.ts +0 -27
  20. package/publish/lib/cjs/ColorPicker/index.js +0 -662
  21. package/publish/lib/cjs/Date/index.d.ts +0 -70
  22. package/publish/lib/cjs/Date/index.js +0 -6200
  23. package/publish/lib/cjs/DigitalClock/index.d.ts +0 -7
  24. package/publish/lib/cjs/DigitalClock/index.js +0 -402
  25. package/publish/lib/cjs/DragDropList/index.d.ts +0 -44
  26. package/publish/lib/cjs/DragDropList/index.js +0 -1587
  27. package/publish/lib/cjs/DropdownMenu/index.d.ts +0 -38
  28. package/publish/lib/cjs/DropdownMenu/index.js +0 -1498
  29. package/publish/lib/cjs/DynamicFields/index.d.ts +0 -40
  30. package/publish/lib/cjs/DynamicFields/index.js +0 -810
  31. package/publish/lib/cjs/EventCalendar/index.d.ts +0 -61
  32. package/publish/lib/cjs/EventCalendar/index.js +0 -3740
  33. package/publish/lib/cjs/EventCalendarTimeline/index.d.ts +0 -100
  34. package/publish/lib/cjs/EventCalendarTimeline/index.js +0 -6084
  35. package/publish/lib/cjs/File/index.d.ts +0 -40
  36. package/publish/lib/cjs/File/index.js +0 -1751
  37. package/publish/lib/cjs/HorizontalScrollContent/index.d.ts +0 -14
  38. package/publish/lib/cjs/HorizontalScrollContent/index.js +0 -426
  39. package/publish/lib/cjs/Input/index.d.ts +0 -59
  40. package/publish/lib/cjs/Input/index.js +0 -1455
  41. package/publish/lib/cjs/LiveSearch/index.d.ts +0 -69
  42. package/publish/lib/cjs/LiveSearch/index.js +0 -3626
  43. package/publish/lib/cjs/MasonryLayout/index.d.ts +0 -14
  44. package/publish/lib/cjs/MasonryLayout/index.js +0 -689
  45. package/publish/lib/cjs/ModalDialog/index.d.ts +0 -79
  46. package/publish/lib/cjs/ModalDialog/index.js +0 -1695
  47. package/publish/lib/cjs/ModeSwitch/index.d.ts +0 -17
  48. package/publish/lib/cjs/ModeSwitch/index.js +0 -202
  49. package/publish/lib/cjs/MultilevelDropdownMenu/index.d.ts +0 -20
  50. package/publish/lib/cjs/MultilevelDropdownMenu/index.js +0 -930
  51. package/publish/lib/cjs/MultipleCheckboxes/index.d.ts +0 -41
  52. package/publish/lib/cjs/MultipleCheckboxes/index.js +0 -1717
  53. package/publish/lib/cjs/MultipleSelect/index.d.ts +0 -65
  54. package/publish/lib/cjs/MultipleSelect/index.js +0 -3704
  55. package/publish/lib/cjs/NativeSelect/index.d.ts +0 -37
  56. package/publish/lib/cjs/NativeSelect/index.js +0 -1631
  57. package/publish/lib/cjs/NumberInput/index.d.ts +0 -40
  58. package/publish/lib/cjs/NumberInput/index.js +0 -1188
  59. package/publish/lib/cjs/Pagination/index.d.ts +0 -51
  60. package/publish/lib/cjs/Pagination/index.js +0 -612
  61. package/publish/lib/cjs/Radio/index.d.ts +0 -45
  62. package/publish/lib/cjs/Radio/index.js +0 -1391
  63. package/publish/lib/cjs/RangeSlider/index.d.ts +0 -22
  64. package/publish/lib/cjs/RangeSlider/index.js +0 -2665
  65. package/publish/lib/cjs/RootPortal/index.d.ts +0 -8
  66. package/publish/lib/cjs/RootPortal/index.js +0 -141
  67. package/publish/lib/cjs/ScrollReveal/index.d.ts +0 -21
  68. package/publish/lib/cjs/ScrollReveal/index.js +0 -401
  69. package/publish/lib/cjs/Scrollbar/index.d.ts +0 -17
  70. package/publish/lib/cjs/Scrollbar/index.js +0 -1107
  71. package/publish/lib/cjs/SearchBar/index.d.ts +0 -41
  72. package/publish/lib/cjs/SearchBar/index.js +0 -701
  73. package/publish/lib/cjs/Select/index.d.ts +0 -99
  74. package/publish/lib/cjs/Select/index.js +0 -5697
  75. package/publish/lib/cjs/ShowMoreLess/index.d.ts +0 -36
  76. package/publish/lib/cjs/ShowMoreLess/index.js +0 -387
  77. package/publish/lib/cjs/Switch/index.d.ts +0 -25
  78. package/publish/lib/cjs/Switch/index.js +0 -628
  79. package/publish/lib/cjs/Table/index.d.ts +0 -12
  80. package/publish/lib/cjs/Table/index.js +0 -2062
  81. package/publish/lib/cjs/Tabs/index.d.ts +0 -3
  82. package/publish/lib/cjs/Tabs/index.js +0 -771
  83. package/publish/lib/cjs/TagInput/index.d.ts +0 -31
  84. package/publish/lib/cjs/TagInput/index.js +0 -1144
  85. package/publish/lib/cjs/Textarea/index.d.ts +0 -50
  86. package/publish/lib/cjs/Textarea/index.js +0 -1784
  87. package/publish/lib/cjs/Toast/index.d.ts +0 -34
  88. package/publish/lib/cjs/Toast/index.js +0 -861
  89. package/publish/lib/cjs/Tooltip/index.d.ts +0 -23
  90. package/publish/lib/cjs/Tooltip/index.js +0 -1674
  91. package/publish/lib/cjs/Tree/index.d.ts +0 -62
  92. package/publish/lib/cjs/Tree/index.js +0 -1960
  93. package/publish/lib/cjs/Utils/anim.d.ts +0 -11
  94. package/publish/lib/cjs/Utils/anim.js +0 -400
  95. package/publish/lib/cjs/Utils/bodyScrollLock.d.ts +0 -8
  96. package/publish/lib/cjs/Utils/bodyScrollLock.js +0 -311
  97. package/publish/lib/cjs/Utils/buffer.d.ts +0 -67
  98. package/publish/lib/cjs/Utils/buffer.js +0 -343
  99. package/publish/lib/cjs/Utils/cls.d.ts +0 -15
  100. package/publish/lib/cjs/Utils/cls.js +0 -124
  101. package/publish/lib/cjs/Utils/convert.d.ts +0 -25
  102. package/publish/lib/cjs/Utils/convert.js +0 -109
  103. package/publish/lib/cjs/Utils/date.d.ts +0 -217
  104. package/publish/lib/cjs/Utils/date.js +0 -567
  105. package/publish/lib/cjs/Utils/dom.d.ts +0 -13
  106. package/publish/lib/cjs/Utils/dom.js +0 -215
  107. package/publish/lib/cjs/Utils/easing.d.ts +0 -29
  108. package/publish/lib/cjs/Utils/easing.js +0 -221
  109. package/publish/lib/cjs/Utils/extract.d.ts +0 -28
  110. package/publish/lib/cjs/Utils/extract.js +0 -130
  111. package/publish/lib/cjs/Utils/getElementProperty.d.ts +0 -52
  112. package/publish/lib/cjs/Utils/getElementProperty.js +0 -189
  113. package/publish/lib/cjs/Utils/guid.d.ts +0 -7
  114. package/publish/lib/cjs/Utils/guid.js +0 -67
  115. package/publish/lib/cjs/Utils/initDefaultOptions.d.ts +0 -21
  116. package/publish/lib/cjs/Utils/initDefaultOptions.js +0 -131
  117. package/publish/lib/cjs/Utils/inputsCalculation.d.ts +0 -28
  118. package/publish/lib/cjs/Utils/inputsCalculation.js +0 -188
  119. package/publish/lib/cjs/Utils/math.d.ts +0 -77
  120. package/publish/lib/cjs/Utils/math.js +0 -305
  121. package/publish/lib/cjs/Utils/object.d.ts +0 -18
  122. package/publish/lib/cjs/Utils/object.js +0 -120
  123. package/publish/lib/cjs/Utils/os.d.ts +0 -2
  124. package/publish/lib/cjs/Utils/os.js +0 -104
  125. package/publish/lib/cjs/Utils/performance.d.ts +0 -3
  126. package/publish/lib/cjs/Utils/performance.js +0 -94
  127. package/publish/lib/cjs/Utils/tree.d.ts +0 -40
  128. package/publish/lib/cjs/Utils/tree.js +0 -195
  129. package/publish/lib/cjs/Utils/useAutosizeTextArea.d.ts +0 -10
  130. package/publish/lib/cjs/Utils/useAutosizeTextArea.js +0 -227
  131. package/publish/lib/cjs/Utils/useBoundedDrag.d.ts +0 -125
  132. package/publish/lib/cjs/Utils/useBoundedDrag.js +0 -380
  133. package/publish/lib/cjs/Utils/useClickOutside.d.ts +0 -33
  134. package/publish/lib/cjs/Utils/useClickOutside.js +0 -166
  135. package/publish/lib/cjs/Utils/useComId.d.ts +0 -6
  136. package/publish/lib/cjs/Utils/useComId.js +0 -114
  137. package/publish/lib/cjs/Utils/useDebounce.d.ts +0 -20
  138. package/publish/lib/cjs/Utils/useDebounce.js +0 -138
  139. package/publish/lib/cjs/Utils/useDragDropPosition.d.ts +0 -169
  140. package/publish/lib/cjs/Utils/useDragDropPosition.js +0 -456
  141. package/publish/lib/cjs/Utils/useDraggable.d.ts +0 -62
  142. package/publish/lib/cjs/Utils/useDraggable.js +0 -348
  143. package/publish/lib/cjs/Utils/useInterval.d.ts +0 -5
  144. package/publish/lib/cjs/Utils/useInterval.js +0 -168
  145. package/publish/lib/cjs/Utils/useIsMobile.d.ts +0 -2
  146. package/publish/lib/cjs/Utils/useIsMobile.js +0 -168
  147. package/publish/lib/cjs/Utils/useKeyPress.d.ts +0 -44
  148. package/publish/lib/cjs/Utils/useKeyPress.js +0 -200
  149. package/publish/lib/cjs/Utils/useThrottle.d.ts +0 -2
  150. package/publish/lib/cjs/Utils/useThrottle.js +0 -136
  151. package/publish/lib/cjs/Utils/useWindowScroll.d.ts +0 -12
  152. package/publish/lib/cjs/Utils/useWindowScroll.js +0 -217
  153. package/publish/lib/cjs/Utils/viewport.d.ts +0 -7
  154. package/publish/lib/cjs/Utils/viewport.js +0 -64
  155. package/publish/lib/cjs/index.d.ts +0 -45
  156. package/publish/lib/cjs/index.js +0 -46
  157. package/publish/lib/css/BackToTop/index.css +0 -34
  158. package/publish/lib/css/CascadingSelect/index.css +0 -216
  159. package/publish/lib/css/CascadingSelectE2E/index.css +0 -216
  160. package/publish/lib/css/ColorPicker/index.css +0 -58
  161. package/publish/lib/css/Date/index.css +0 -434
  162. package/publish/lib/css/DragDropList/index.css +0 -188
  163. package/publish/lib/css/DropdownMenu/index.css +0 -151
  164. package/publish/lib/css/EventCalendar/index.css +0 -300
  165. package/publish/lib/css/EventCalendarTimeline/index.css +0 -694
  166. package/publish/lib/css/HorizontalScrollContent/index.css +0 -70
  167. package/publish/lib/css/LiveSearch/index.css +0 -55
  168. package/publish/lib/css/MultilevelDropdownMenu/index.css +0 -38
  169. package/publish/lib/css/MultipleSelect/index.css +0 -313
  170. package/publish/lib/css/RangeSlider/index.css +0 -150
  171. package/publish/lib/css/Scrollbar/index.css +0 -176
  172. package/publish/lib/css/Select/index.css +0 -368
  173. package/publish/lib/css/ShowMoreLess/index.css +0 -23
  174. package/publish/lib/css/Table/index.css +0 -584
  175. package/publish/lib/css/TagInput/index.css +0 -91
  176. package/publish/lib/css/Toast/index.css +0 -201
  177. package/publish/lib/css/Tooltip/index.css +0 -197
  178. package/publish/lib/css/Tree/index.css +0 -232
  179. package/publish/lib/esm/Accordion/Accordion.tsx +0 -184
  180. package/publish/lib/esm/Accordion/AccordionItem.tsx +0 -143
  181. package/publish/lib/esm/Accordion/index.tsx +0 -2
  182. package/publish/lib/esm/BackToTop/index.scss +0 -47
  183. package/publish/lib/esm/BackToTop/index.tsx +0 -177
  184. package/publish/lib/esm/CascadingSelect/Group.tsx +0 -82
  185. package/publish/lib/esm/CascadingSelect/index.scss +0 -291
  186. package/publish/lib/esm/CascadingSelect/index.tsx +0 -1203
  187. package/publish/lib/esm/CascadingSelectE2E/Group.tsx +0 -83
  188. package/publish/lib/esm/CascadingSelectE2E/index.scss +0 -293
  189. package/publish/lib/esm/CascadingSelectE2E/index.tsx +0 -1471
  190. package/publish/lib/esm/Checkbox/index.tsx +0 -193
  191. package/publish/lib/esm/ColorPicker/index.scss +0 -91
  192. package/publish/lib/esm/ColorPicker/index.tsx +0 -204
  193. package/publish/lib/esm/Date/Calendar.tsx +0 -723
  194. package/publish/lib/esm/Date/index.scss +0 -567
  195. package/publish/lib/esm/Date/index.tsx +0 -1683
  196. package/publish/lib/esm/Date/localization/en_US.js +0 -13
  197. package/publish/lib/esm/Date/localization/zh_CN.js +0 -12
  198. package/publish/lib/esm/DigitalClock/index.tsx +0 -74
  199. package/publish/lib/esm/DragDropList/index.scss +0 -245
  200. package/publish/lib/esm/DragDropList/index.tsx +0 -494
  201. package/publish/lib/esm/DropdownMenu/Option.tsx +0 -55
  202. package/publish/lib/esm/DropdownMenu/index.scss +0 -205
  203. package/publish/lib/esm/DropdownMenu/index.tsx +0 -377
  204. package/publish/lib/esm/DynamicFields/index.tsx +0 -404
  205. package/publish/lib/esm/EventCalendar/index.scss +0 -407
  206. package/publish/lib/esm/EventCalendar/index.tsx +0 -1004
  207. package/publish/lib/esm/EventCalendarTimeline/index.scss +0 -926
  208. package/publish/lib/esm/EventCalendarTimeline/index.tsx +0 -2683
  209. package/publish/lib/esm/File/index.tsx +0 -477
  210. package/publish/lib/esm/HorizontalScrollContent/index.scss +0 -87
  211. package/publish/lib/esm/HorizontalScrollContent/index.tsx +0 -171
  212. package/publish/lib/esm/Input/index.tsx +0 -614
  213. package/publish/lib/esm/LiveSearch/index.scss +0 -82
  214. package/publish/lib/esm/LiveSearch/index.tsx +0 -960
  215. package/publish/lib/esm/MasonryLayout/index.tsx +0 -326
  216. package/publish/lib/esm/ModalDialog/index.tsx +0 -552
  217. package/publish/lib/esm/ModeSwitch/index.tsx +0 -82
  218. package/publish/lib/esm/MultilevelDropdownMenu/ItemList.tsx +0 -265
  219. package/publish/lib/esm/MultilevelDropdownMenu/index.scss +0 -79
  220. package/publish/lib/esm/MultilevelDropdownMenu/index.tsx +0 -77
  221. package/publish/lib/esm/MultipleCheckboxes/index.tsx +0 -669
  222. package/publish/lib/esm/MultipleSelect/index.scss +0 -398
  223. package/publish/lib/esm/MultipleSelect/index.tsx +0 -766
  224. package/publish/lib/esm/MultipleSelect/utils/func.ts +0 -61
  225. package/publish/lib/esm/NativeSelect/index.tsx +0 -396
  226. package/publish/lib/esm/NativeSelect/utils/func.ts +0 -49
  227. package/publish/lib/esm/NumberInput/index.tsx +0 -385
  228. package/publish/lib/esm/Pagination/index.tsx +0 -286
  229. package/publish/lib/esm/Pagination/pagination-navigators.tsx +0 -60
  230. package/publish/lib/esm/Radio/index.tsx +0 -670
  231. package/publish/lib/esm/RangeSlider/index.scss +0 -186
  232. package/publish/lib/esm/RangeSlider/index.tsx +0 -241
  233. package/publish/lib/esm/RootPortal/index.tsx +0 -53
  234. package/publish/lib/esm/ScrollReveal/index.tsx +0 -148
  235. package/publish/lib/esm/Scrollbar/index.scss +0 -221
  236. package/publish/lib/esm/Scrollbar/index.tsx +0 -561
  237. package/publish/lib/esm/SearchBar/index.tsx +0 -253
  238. package/publish/lib/esm/Select/index.scss +0 -553
  239. package/publish/lib/esm/Select/index.tsx +0 -2816
  240. package/publish/lib/esm/Select/utils/func.ts +0 -106
  241. package/publish/lib/esm/ShowMoreLess/index.scss +0 -27
  242. package/publish/lib/esm/ShowMoreLess/index.tsx +0 -145
  243. package/publish/lib/esm/Switch/index.tsx +0 -147
  244. package/publish/lib/esm/Table/Table.tsx +0 -257
  245. package/publish/lib/esm/Table/TableBody.tsx +0 -41
  246. package/publish/lib/esm/Table/TableCaption.tsx +0 -34
  247. package/publish/lib/esm/Table/TableCell.tsx +0 -123
  248. package/publish/lib/esm/Table/TableColgroup.tsx +0 -38
  249. package/publish/lib/esm/Table/TableContext.tsx +0 -26
  250. package/publish/lib/esm/Table/TableFoot.tsx +0 -28
  251. package/publish/lib/esm/Table/TableHead.tsx +0 -28
  252. package/publish/lib/esm/Table/TableRow.tsx +0 -76
  253. package/publish/lib/esm/Table/index.scss +0 -418
  254. package/publish/lib/esm/Table/index.tsx +0 -14
  255. package/publish/lib/esm/Table/utils/DragHandleSprite.tsx +0 -46
  256. package/publish/lib/esm/Table/utils/SortSprite.tsx +0 -57
  257. package/publish/lib/esm/Table/utils/TableFilter.tsx +0 -56
  258. package/publish/lib/esm/Table/utils/ToggleSelection.tsx +0 -225
  259. package/publish/lib/esm/Table/utils/func.ts +0 -171
  260. package/publish/lib/esm/Table/utils/hooks/useTableDraggable.tsx +0 -342
  261. package/publish/lib/esm/Table/utils/hooks/useTableKeyPress.tsx +0 -154
  262. package/publish/lib/esm/Table/utils/hooks/useTableResponsive.tsx +0 -92
  263. package/publish/lib/esm/Table/utils/hooks/useTableSort.tsx +0 -143
  264. package/publish/lib/esm/Tabs/TabList.tsx +0 -50
  265. package/publish/lib/esm/Tabs/TabPanel.tsx +0 -44
  266. package/publish/lib/esm/Tabs/Tabs.tsx +0 -282
  267. package/publish/lib/esm/Tabs/index.tsx +0 -3
  268. package/publish/lib/esm/TagInput/index.scss +0 -126
  269. package/publish/lib/esm/TagInput/index.tsx +0 -352
  270. package/publish/lib/esm/Textarea/index.tsx +0 -608
  271. package/publish/lib/esm/Toast/Item.tsx +0 -124
  272. package/publish/lib/esm/Toast/index.scss +0 -269
  273. package/publish/lib/esm/Toast/index.tsx +0 -374
  274. package/publish/lib/esm/Tooltip/index.scss +0 -269
  275. package/publish/lib/esm/Tooltip/index.tsx +0 -312
  276. package/publish/lib/esm/Tree/TreeList.tsx +0 -616
  277. package/publish/lib/esm/Tree/index.scss +0 -386
  278. package/publish/lib/esm/Tree/index.tsx +0 -396
  279. package/publish/lib/esm/Tree/init-height.tsx +0 -27
  280. package/publish/lib/esm/Tree/utils/func.ts +0 -15
  281. package/publish/lib/esm/Utils/hooks/useAutosizeTextArea.tsx +0 -125
  282. package/publish/lib/esm/Utils/hooks/useBoundedDrag.tsx +0 -301
  283. package/publish/lib/esm/Utils/hooks/useClickOutside.tsx +0 -69
  284. package/publish/lib/esm/Utils/hooks/useComId.tsx +0 -13
  285. package/publish/lib/esm/Utils/hooks/useDebounce.tsx +0 -40
  286. package/publish/lib/esm/Utils/hooks/useDragDropPosition.tsx +0 -420
  287. package/publish/lib/esm/Utils/hooks/useDraggable.tsx +0 -265
  288. package/publish/lib/esm/Utils/hooks/useInterval.tsx +0 -74
  289. package/publish/lib/esm/Utils/hooks/useIsMobile.tsx +0 -56
  290. package/publish/lib/esm/Utils/hooks/useKeyPress.tsx +0 -104
  291. package/publish/lib/esm/Utils/hooks/useThrottle.tsx +0 -39
  292. package/publish/lib/esm/Utils/hooks/useWindowScroll.tsx +0 -83
  293. package/publish/lib/esm/Utils/libs/anim.ts +0 -96
  294. package/publish/lib/esm/Utils/libs/buffer.ts +0 -262
  295. package/publish/lib/esm/Utils/libs/cls.ts +0 -64
  296. package/publish/lib/esm/Utils/libs/convert.ts +0 -59
  297. package/publish/lib/esm/Utils/libs/date.ts +0 -578
  298. package/publish/lib/esm/Utils/libs/dom.ts +0 -150
  299. package/publish/lib/esm/Utils/libs/easing.ts +0 -201
  300. package/publish/lib/esm/Utils/libs/extract.ts +0 -86
  301. package/publish/lib/esm/Utils/libs/getElementProperty.ts +0 -150
  302. package/publish/lib/esm/Utils/libs/guid.ts +0 -16
  303. package/publish/lib/esm/Utils/libs/initDefaultOptions.ts +0 -104
  304. package/publish/lib/esm/Utils/libs/inputsCalculation.ts +0 -160
  305. package/publish/lib/esm/Utils/libs/math.ts +0 -276
  306. package/publish/lib/esm/Utils/libs/object.ts +0 -68
  307. package/publish/lib/esm/Utils/libs/os.ts +0 -63
  308. package/publish/lib/esm/Utils/libs/performance.ts +0 -47
  309. package/publish/lib/esm/Utils/libs/tree.ts +0 -119
  310. package/publish/lib/esm/Utils/libs/viewport.ts +0 -20
  311. package/publish/lib/esm/Utils/plugins/bodyScrollLock.ts +0 -286
  312. package/publish/lib/esm/index.js +0 -43
  313. package/publish/package.json +0 -1
  314. /package/{publish/Accordion → Accordion}/index.d.ts +0 -0
  315. /package/{publish/Accordion → Accordion}/index.js +0 -0
  316. /package/{publish/BackToTop → BackToTop}/index.css +0 -0
  317. /package/{publish/BackToTop → BackToTop}/index.d.ts +0 -0
  318. /package/{publish/BackToTop → BackToTop}/index.js +0 -0
  319. /package/{publish/CascadingSelect → CascadingSelect}/index.css +0 -0
  320. /package/{publish/CascadingSelect → CascadingSelect}/index.d.ts +0 -0
  321. /package/{publish/CascadingSelect → CascadingSelect}/index.js +0 -0
  322. /package/{publish/CascadingSelectE2E → CascadingSelectE2E}/index.css +0 -0
  323. /package/{publish/CascadingSelectE2E → CascadingSelectE2E}/index.d.ts +0 -0
  324. /package/{publish/CascadingSelectE2E → CascadingSelectE2E}/index.js +0 -0
  325. /package/{publish/Checkbox → Checkbox}/index.d.ts +0 -0
  326. /package/{publish/Checkbox → Checkbox}/index.js +0 -0
  327. /package/{publish/ColorPicker → ColorPicker}/index.css +0 -0
  328. /package/{publish/ColorPicker → ColorPicker}/index.d.ts +0 -0
  329. /package/{publish/ColorPicker → ColorPicker}/index.js +0 -0
  330. /package/{publish/Date → Date}/index.css +0 -0
  331. /package/{publish/Date → Date}/index.d.ts +0 -0
  332. /package/{publish/Date → Date}/index.js +0 -0
  333. /package/{publish/DigitalClock → DigitalClock}/index.d.ts +0 -0
  334. /package/{publish/DigitalClock → DigitalClock}/index.js +0 -0
  335. /package/{publish/DragDropList → DragDropList}/index.css +0 -0
  336. /package/{publish/DragDropList → DragDropList}/index.d.ts +0 -0
  337. /package/{publish/DragDropList → DragDropList}/index.js +0 -0
  338. /package/{publish/DropdownMenu → DropdownMenu}/index.css +0 -0
  339. /package/{publish/DropdownMenu → DropdownMenu}/index.d.ts +0 -0
  340. /package/{publish/DropdownMenu → DropdownMenu}/index.js +0 -0
  341. /package/{publish/DynamicFields → DynamicFields}/index.d.ts +0 -0
  342. /package/{publish/DynamicFields → DynamicFields}/index.js +0 -0
  343. /package/{publish/EventCalendar → EventCalendar}/index.css +0 -0
  344. /package/{publish/EventCalendar → EventCalendar}/index.d.ts +0 -0
  345. /package/{publish/EventCalendar → EventCalendar}/index.js +0 -0
  346. /package/{publish/EventCalendarTimeline → EventCalendarTimeline}/index.css +0 -0
  347. /package/{publish/EventCalendarTimeline → EventCalendarTimeline}/index.d.ts +0 -0
  348. /package/{publish/EventCalendarTimeline → EventCalendarTimeline}/index.js +0 -0
  349. /package/{publish/File → File}/index.d.ts +0 -0
  350. /package/{publish/File → File}/index.js +0 -0
  351. /package/{publish/HorizontalScrollContent → HorizontalScrollContent}/index.css +0 -0
  352. /package/{publish/HorizontalScrollContent → HorizontalScrollContent}/index.d.ts +0 -0
  353. /package/{publish/HorizontalScrollContent → HorizontalScrollContent}/index.js +0 -0
  354. /package/{publish/Input → Input}/index.d.ts +0 -0
  355. /package/{publish/Input → Input}/index.js +0 -0
  356. /package/{publish/LiveSearch → LiveSearch}/index.css +0 -0
  357. /package/{publish/LiveSearch → LiveSearch}/index.d.ts +0 -0
  358. /package/{publish/LiveSearch → LiveSearch}/index.js +0 -0
  359. /package/{publish/MasonryLayout → MasonryLayout}/index.d.ts +0 -0
  360. /package/{publish/MasonryLayout → MasonryLayout}/index.js +0 -0
  361. /package/{publish/ModalDialog → ModalDialog}/index.d.ts +0 -0
  362. /package/{publish/ModalDialog → ModalDialog}/index.js +0 -0
  363. /package/{publish/ModeSwitch → ModeSwitch}/index.d.ts +0 -0
  364. /package/{publish/ModeSwitch → ModeSwitch}/index.js +0 -0
  365. /package/{publish/MultilevelDropdownMenu → MultilevelDropdownMenu}/index.css +0 -0
  366. /package/{publish/MultilevelDropdownMenu → MultilevelDropdownMenu}/index.d.ts +0 -0
  367. /package/{publish/MultilevelDropdownMenu → MultilevelDropdownMenu}/index.js +0 -0
  368. /package/{publish/MultipleCheckboxes → MultipleCheckboxes}/index.d.ts +0 -0
  369. /package/{publish/MultipleCheckboxes → MultipleCheckboxes}/index.js +0 -0
  370. /package/{publish/MultipleSelect → MultipleSelect}/index.css +0 -0
  371. /package/{publish/MultipleSelect → MultipleSelect}/index.d.ts +0 -0
  372. /package/{publish/MultipleSelect → MultipleSelect}/index.js +0 -0
  373. /package/{publish/NativeSelect → NativeSelect}/index.d.ts +0 -0
  374. /package/{publish/NativeSelect → NativeSelect}/index.js +0 -0
  375. /package/{publish/NumberInput → NumberInput}/index.d.ts +0 -0
  376. /package/{publish/NumberInput → NumberInput}/index.js +0 -0
  377. /package/{publish/Pagination → Pagination}/index.d.ts +0 -0
  378. /package/{publish/Pagination → Pagination}/index.js +0 -0
  379. /package/{publish/Radio → Radio}/index.d.ts +0 -0
  380. /package/{publish/Radio → Radio}/index.js +0 -0
  381. /package/{publish/RangeSlider → RangeSlider}/index.css +0 -0
  382. /package/{publish/RangeSlider → RangeSlider}/index.d.ts +0 -0
  383. /package/{publish/RangeSlider → RangeSlider}/index.js +0 -0
  384. /package/{publish/RootPortal → RootPortal}/index.d.ts +0 -0
  385. /package/{publish/RootPortal → RootPortal}/index.js +0 -0
  386. /package/{publish/ScrollReveal → ScrollReveal}/index.d.ts +0 -0
  387. /package/{publish/ScrollReveal → ScrollReveal}/index.js +0 -0
  388. /package/{publish/Scrollbar → Scrollbar}/index.css +0 -0
  389. /package/{publish/Scrollbar → Scrollbar}/index.d.ts +0 -0
  390. /package/{publish/Scrollbar → Scrollbar}/index.js +0 -0
  391. /package/{publish/SearchBar → SearchBar}/index.d.ts +0 -0
  392. /package/{publish/SearchBar → SearchBar}/index.js +0 -0
  393. /package/{publish/Select → Select}/index.css +0 -0
  394. /package/{publish/Select → Select}/index.d.ts +0 -0
  395. /package/{publish/Select → Select}/index.js +0 -0
  396. /package/{publish/ShowMoreLess → ShowMoreLess}/index.css +0 -0
  397. /package/{publish/ShowMoreLess → ShowMoreLess}/index.d.ts +0 -0
  398. /package/{publish/ShowMoreLess → ShowMoreLess}/index.js +0 -0
  399. /package/{publish/Switch → Switch}/index.d.ts +0 -0
  400. /package/{publish/Switch → Switch}/index.js +0 -0
  401. /package/{publish/Table → Table}/index.css +0 -0
  402. /package/{publish/Table → Table}/index.d.ts +0 -0
  403. /package/{publish/Table → Table}/index.js +0 -0
  404. /package/{publish/Tabs → Tabs}/index.d.ts +0 -0
  405. /package/{publish/Tabs → Tabs}/index.js +0 -0
  406. /package/{publish/TagInput → TagInput}/index.css +0 -0
  407. /package/{publish/TagInput → TagInput}/index.d.ts +0 -0
  408. /package/{publish/TagInput → TagInput}/index.js +0 -0
  409. /package/{publish/Textarea → Textarea}/index.d.ts +0 -0
  410. /package/{publish/Textarea → Textarea}/index.js +0 -0
  411. /package/{publish/Toast → Toast}/index.css +0 -0
  412. /package/{publish/Toast → Toast}/index.d.ts +0 -0
  413. /package/{publish/Toast → Toast}/index.js +0 -0
  414. /package/{publish/Tooltip → Tooltip}/index.css +0 -0
  415. /package/{publish/Tooltip → Tooltip}/index.d.ts +0 -0
  416. /package/{publish/Tooltip → Tooltip}/index.js +0 -0
  417. /package/{publish/Tree → Tree}/index.css +0 -0
  418. /package/{publish/Tree → Tree}/index.d.ts +0 -0
  419. /package/{publish/Tree → Tree}/index.js +0 -0
  420. /package/{publish/Utils → Utils}/anim.d.ts +0 -0
  421. /package/{publish/Utils → Utils}/anim.js +0 -0
  422. /package/{publish/Utils → Utils}/bodyScrollLock.d.ts +0 -0
  423. /package/{publish/Utils → Utils}/bodyScrollLock.js +0 -0
  424. /package/{publish/Utils → Utils}/buffer.d.ts +0 -0
  425. /package/{publish/Utils → Utils}/buffer.js +0 -0
  426. /package/{publish/Utils → Utils}/cls.d.ts +0 -0
  427. /package/{publish/Utils → Utils}/cls.js +0 -0
  428. /package/{publish/Utils → Utils}/convert.d.ts +0 -0
  429. /package/{publish/Utils → Utils}/convert.js +0 -0
  430. /package/{publish/Utils → Utils}/date.d.ts +0 -0
  431. /package/{publish/Utils → Utils}/date.js +0 -0
  432. /package/{publish/Utils → Utils}/dom.d.ts +0 -0
  433. /package/{publish/Utils → Utils}/dom.js +0 -0
  434. /package/{publish/Utils → Utils}/easing.d.ts +0 -0
  435. /package/{publish/Utils → Utils}/easing.js +0 -0
  436. /package/{publish/Utils → Utils}/extract.d.ts +0 -0
  437. /package/{publish/Utils → Utils}/extract.js +0 -0
  438. /package/{publish/Utils → Utils}/getElementProperty.d.ts +0 -0
  439. /package/{publish/Utils → Utils}/getElementProperty.js +0 -0
  440. /package/{publish/Utils → Utils}/guid.d.ts +0 -0
  441. /package/{publish/Utils → Utils}/guid.js +0 -0
  442. /package/{publish/Utils → Utils}/initDefaultOptions.d.ts +0 -0
  443. /package/{publish/Utils → Utils}/initDefaultOptions.js +0 -0
  444. /package/{publish/Utils → Utils}/inputsCalculation.d.ts +0 -0
  445. /package/{publish/Utils → Utils}/inputsCalculation.js +0 -0
  446. /package/{publish/Utils → Utils}/math.d.ts +0 -0
  447. /package/{publish/Utils → Utils}/math.js +0 -0
  448. /package/{publish/Utils → Utils}/object.d.ts +0 -0
  449. /package/{publish/Utils → Utils}/object.js +0 -0
  450. /package/{publish/Utils → Utils}/os.d.ts +0 -0
  451. /package/{publish/Utils → Utils}/os.js +0 -0
  452. /package/{publish/Utils → Utils}/performance.d.ts +0 -0
  453. /package/{publish/Utils → Utils}/performance.js +0 -0
  454. /package/{publish/Utils → Utils}/tree.d.ts +0 -0
  455. /package/{publish/Utils → Utils}/tree.js +0 -0
  456. /package/{publish/Utils → Utils}/useAutosizeTextArea.d.ts +0 -0
  457. /package/{publish/Utils → Utils}/useAutosizeTextArea.js +0 -0
  458. /package/{publish/Utils → Utils}/useBoundedDrag.d.ts +0 -0
  459. /package/{publish/Utils → Utils}/useBoundedDrag.js +0 -0
  460. /package/{publish/Utils → Utils}/useClickOutside.d.ts +0 -0
  461. /package/{publish/Utils → Utils}/useClickOutside.js +0 -0
  462. /package/{publish/Utils → Utils}/useComId.d.ts +0 -0
  463. /package/{publish/Utils → Utils}/useComId.js +0 -0
  464. /package/{publish/Utils → Utils}/useDebounce.d.ts +0 -0
  465. /package/{publish/Utils → Utils}/useDebounce.js +0 -0
  466. /package/{publish/Utils → Utils}/useDragDropPosition.d.ts +0 -0
  467. /package/{publish/Utils → Utils}/useDragDropPosition.js +0 -0
  468. /package/{publish/Utils → Utils}/useDraggable.d.ts +0 -0
  469. /package/{publish/Utils → Utils}/useDraggable.js +0 -0
  470. /package/{publish/Utils → Utils}/useInterval.d.ts +0 -0
  471. /package/{publish/Utils → Utils}/useInterval.js +0 -0
  472. /package/{publish/Utils → Utils}/useIsMobile.d.ts +0 -0
  473. /package/{publish/Utils → Utils}/useIsMobile.js +0 -0
  474. /package/{publish/Utils → Utils}/useKeyPress.d.ts +0 -0
  475. /package/{publish/Utils → Utils}/useKeyPress.js +0 -0
  476. /package/{publish/Utils → Utils}/useThrottle.d.ts +0 -0
  477. /package/{publish/Utils → Utils}/useThrottle.js +0 -0
  478. /package/{publish/Utils → Utils}/useWindowScroll.d.ts +0 -0
  479. /package/{publish/Utils → Utils}/useWindowScroll.js +0 -0
  480. /package/{publish/Utils → Utils}/viewport.d.ts +0 -0
  481. /package/{publish/Utils → Utils}/viewport.js +0 -0
  482. /package/{publish/all.d.ts → all.d.ts} +0 -0
  483. /package/{publish/all.js → all.js} +0 -0
@@ -1,1960 +0,0 @@
1
- (function webpackUniversalModuleDefinition(root, factory) {
2
- if(typeof exports === 'object' && typeof module === 'object')
3
- module.exports = factory(require("react"));
4
- else if(typeof define === 'function' && define.amd)
5
- define(["react"], factory);
6
- else if(typeof exports === 'object')
7
- exports["RPB"] = factory(require("react"));
8
- else
9
- root["RPB"] = factory(root["React"]);
10
- })(this, (__WEBPACK_EXTERNAL_MODULE__787__) => {
11
- return /******/ (() => { // webpackBootstrap
12
- /******/ var __webpack_modules__ = ({
13
-
14
- /***/ 188:
15
- /***/ (function(module, exports, __webpack_require__) {
16
-
17
- /* module decorator */ module = __webpack_require__.nmd(module);
18
- var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof2(obj) { "@babel/helpers - typeof"; return _typeof2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof2(obj); }
19
- (function webpackUniversalModuleDefinition(root, factory) {
20
- if (( false ? 0 : _typeof2(exports)) === 'object' && ( false ? 0 : _typeof2(module)) === 'object') module.exports = factory();else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __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 () {
25
- return (/******/function () {
26
- // webpackBootstrap
27
- /******/
28
- "use strict";
29
-
30
- /******/ // The require scope
31
- /******/
32
- var __nested_webpack_require_993__ = {};
33
- /******/
34
- /************************************************************************/
35
- /******/ /* webpack/runtime/define property getters */
36
- /******/
37
- (function () {
38
- /******/ // define getter functions for harmony exports
39
- /******/__nested_webpack_require_993__.d = function (exports, definition) {
40
- /******/for (var key in definition) {
41
- /******/if (__nested_webpack_require_993__.o(definition, key) && !__nested_webpack_require_993__.o(exports, key)) {
42
- /******/Object.defineProperty(exports, key, {
43
- enumerable: true,
44
- get: definition[key]
45
- });
46
- /******/
47
- }
48
- /******/
49
- }
50
- /******/
51
- };
52
- /******/
53
- })();
54
- /******/
55
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
56
- /******/
57
- (function () {
58
- /******/__nested_webpack_require_993__.o = function (obj, prop) {
59
- return Object.prototype.hasOwnProperty.call(obj, prop);
60
- };
61
- /******/
62
- })();
63
- /******/
64
- /******/ /* webpack/runtime/make namespace object */
65
- /******/
66
- (function () {
67
- /******/ // define __esModule on exports
68
- /******/__nested_webpack_require_993__.r = function (exports) {
69
- /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
70
- /******/Object.defineProperty(exports, Symbol.toStringTag, {
71
- value: 'Module'
72
- });
73
- /******/
74
- }
75
- /******/
76
- Object.defineProperty(exports, '__esModule', {
77
- value: true
78
- });
79
- /******/
80
- };
81
- /******/
82
- })();
83
- /******/
84
- /************************************************************************/
85
- var __webpack_exports__ = {};
86
- __nested_webpack_require_993__.r(__webpack_exports__);
87
- /* harmony export */
88
- __nested_webpack_require_993__.d(__webpack_exports__, {
89
- /* harmony export */"clsWrite": function clsWrite() {
90
- return (/* binding */_clsWrite
91
- );
92
- },
93
- /* harmony export */"combinedCls": function combinedCls() {
94
- return (/* binding */_combinedCls
95
- );
96
- }
97
- /* harmony export */
98
- });
99
- function _slicedToArray(arr, i) {
100
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
101
- }
102
- function _nonIterableRest() {
103
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
104
- }
105
- function _unsupportedIterableToArray(o, minLen) {
106
- if (!o) return;
107
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
108
- var n = Object.prototype.toString.call(o).slice(8, -1);
109
- if (n === "Object" && o.constructor) n = o.constructor.name;
110
- if (n === "Map" || n === "Set") return Array.from(o);
111
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
112
- }
113
- function _arrayLikeToArray(arr, len) {
114
- if (len == null || len > arr.length) len = arr.length;
115
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
116
- return arr2;
117
- }
118
- function _iterableToArrayLimit(arr, i) {
119
- var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
120
- if (null != _i) {
121
- var _s,
122
- _e,
123
- _x,
124
- _r,
125
- _arr = [],
126
- _n = !0,
127
- _d = !1;
128
- try {
129
- if (_x = (_i = _i.call(arr)).next, 0 === i) {
130
- if (Object(_i) !== _i) return;
131
- _n = !1;
132
- } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
133
- } catch (err) {
134
- _d = !0, _e = err;
135
- } finally {
136
- try {
137
- if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
138
- } finally {
139
- if (_d) throw _e;
140
- }
141
- }
142
- return _arr;
143
- }
144
- }
145
- function _arrayWithHoles(arr) {
146
- if (Array.isArray(arr)) return arr;
147
- }
148
- function _typeof(obj) {
149
- "@babel/helpers - typeof";
150
-
151
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
152
- return typeof obj;
153
- } : function (obj) {
154
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
155
- }, _typeof(obj);
156
- }
157
- /**
158
- * Output of class name
159
- * @param {*} s - Any
160
- * @param {String} defaultCls - Default string
161
- * @param {?*} targetCls - Any
162
- * @returns {*}
163
- */
164
- function _clsWrite(s, defaultCls) {
165
- var targetCls = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
166
- return s || s === '' ? typeof targetCls === 'undefined' ? s : targetCls : defaultCls;
167
- }
168
-
169
- /**
170
- * Combined classnames
171
- * @param {*} args
172
- * @returns {String|undefined}
173
- */
174
- /* Usage:
175
-
176
- console.log(combinedCls('a-1', 'a-2', 'a-3', {
177
- 'p-1': null,
178
- 'p-2': undefined,
179
- 'p-3': true,
180
- 'p-4': false,
181
- 'p-5': 'kkk',
182
- 'p-6': 0,
183
- 'p-7': 1,
184
- 'p-8': '',
185
- undefined
186
- })); // a-1 a-2 a-3 p-3 p-5 p-7
187
- */
188
- function _combinedCls() {
189
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
190
- args[_key] = arguments[_key];
191
- }
192
- if (args) {
193
- var classes = [];
194
- for (var i = 0; i < args.length; i++) {
195
- var className = args[i];
196
- if (!className) {
197
- continue;
198
- }
199
- var type = _typeof(className);
200
- if (type === 'string' || type === 'number') {
201
- classes.push(className);
202
- } else if (type === 'object') {
203
- var _classes = Array.isArray(className) ? className : Object.entries(className).map(function (_ref) {
204
- var _ref2 = _slicedToArray(_ref, 2),
205
- key = _ref2[0],
206
- value = _ref2[1];
207
- return value ? key : null;
208
- });
209
- classes = _classes.length ? classes.concat(_classes.filter(function (c) {
210
- return !!c;
211
- })) : classes;
212
- }
213
- }
214
- return classes.join(' ').trim();
215
- }
216
- return undefined;
217
- }
218
-
219
- /******/
220
- return __webpack_exports__;
221
- /******/
222
- }()
223
- );
224
- });
225
-
226
- /***/ }),
227
-
228
- /***/ 997:
229
- /***/ (function(module, exports, __webpack_require__) {
230
-
231
- /* module decorator */ module = __webpack_require__.nmd(module);
232
- 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); }
233
- (function webpackUniversalModuleDefinition(root, factory) {
234
- 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),
235
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
236
- (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
237
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
238
- })(this, function () {
239
- return (/******/function () {
240
- // webpackBootstrap
241
- /******/
242
- "use strict";
243
-
244
- /******/ // The require scope
245
- /******/
246
- var __nested_webpack_require_987__ = {};
247
- /******/
248
- /************************************************************************/
249
- /******/ /* webpack/runtime/define property getters */
250
- /******/
251
- (function () {
252
- /******/ // define getter functions for harmony exports
253
- /******/__nested_webpack_require_987__.d = function (exports, definition) {
254
- /******/for (var key in definition) {
255
- /******/if (__nested_webpack_require_987__.o(definition, key) && !__nested_webpack_require_987__.o(exports, key)) {
256
- /******/Object.defineProperty(exports, key, {
257
- enumerable: true,
258
- get: definition[key]
259
- });
260
- /******/
261
- }
262
- /******/
263
- }
264
- /******/
265
- };
266
- /******/
267
- })();
268
- /******/
269
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
270
- /******/
271
- (function () {
272
- /******/__nested_webpack_require_987__.o = function (obj, prop) {
273
- return Object.prototype.hasOwnProperty.call(obj, prop);
274
- };
275
- /******/
276
- })();
277
- /******/
278
- /******/ /* webpack/runtime/make namespace object */
279
- /******/
280
- (function () {
281
- /******/ // define __esModule on exports
282
- /******/__nested_webpack_require_987__.r = function (exports) {
283
- /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
284
- /******/Object.defineProperty(exports, Symbol.toStringTag, {
285
- value: 'Module'
286
- });
287
- /******/
288
- }
289
- /******/
290
- Object.defineProperty(exports, '__esModule', {
291
- value: true
292
- });
293
- /******/
294
- };
295
- /******/
296
- })();
297
- /******/
298
- /************************************************************************/
299
- var __webpack_exports__ = {};
300
- __nested_webpack_require_987__.r(__webpack_exports__);
301
- /* harmony export */
302
- __nested_webpack_require_987__.d(__webpack_exports__, {
303
- /* harmony export */"getAllSiblings": function getAllSiblings() {
304
- return (/* binding */_getAllSiblings
305
- );
306
- },
307
- /* harmony export */"getChildren": function getChildren() {
308
- return (/* binding */_getChildren
309
- );
310
- },
311
- /* harmony export */"getDocument": function getDocument() {
312
- return (/* binding */_getDocument
313
- );
314
- },
315
- /* harmony export */"getNextSiblings": function getNextSiblings() {
316
- return (/* binding */_getNextSiblings
317
- );
318
- },
319
- /* harmony export */"getParents": function getParents() {
320
- return (/* binding */_getParents
321
- );
322
- },
323
- /* harmony export */"getPreviousSiblings": function getPreviousSiblings() {
324
- return (/* binding */_getPreviousSiblings
325
- );
326
- },
327
- /* harmony export */"isElement": function isElement() {
328
- return (/* binding */_isElement
329
- );
330
- },
331
- /* harmony export */"isHTMLElement": function isHTMLElement() {
332
- return (/* binding */_isHTMLElement
333
- );
334
- },
335
- /* harmony export */"isNode": function isNode() {
336
- return (/* binding */_isNode
337
- );
338
- },
339
- /* harmony export */"isRootElement": function isRootElement() {
340
- return (/* binding */_isRootElement
341
- );
342
- },
343
- /* harmony export */"isShadowRoot": function isShadowRoot() {
344
- return (/* binding */_isShadowRoot
345
- );
346
- },
347
- /* harmony export */"nodeContains": function nodeContains() {
348
- return (/* binding */_nodeContains
349
- );
350
- }
351
- /* harmony export */
352
- });
353
- function _createForOfIteratorHelper(o, allowArrayLike) {
354
- var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
355
- if (!it) {
356
- if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
357
- if (it) o = it;
358
- var i = 0;
359
- var F = function F() {};
360
- return {
361
- s: F,
362
- n: function n() {
363
- if (i >= o.length) return {
364
- done: true
365
- };
366
- return {
367
- done: false,
368
- value: o[i++]
369
- };
370
- },
371
- e: function e(_e) {
372
- throw _e;
373
- },
374
- f: F
375
- };
376
- }
377
- throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
378
- }
379
- var normalCompletion = true,
380
- didErr = false,
381
- err;
382
- return {
383
- s: function s() {
384
- it = it.call(o);
385
- },
386
- n: function n() {
387
- var step = it.next();
388
- normalCompletion = step.done;
389
- return step;
390
- },
391
- e: function e(_e2) {
392
- didErr = true;
393
- err = _e2;
394
- },
395
- f: function f() {
396
- try {
397
- if (!normalCompletion && it["return"] != null) it["return"]();
398
- } finally {
399
- if (didErr) throw err;
400
- }
401
- }
402
- };
403
- }
404
- function _toConsumableArray(arr) {
405
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
406
- }
407
- function _nonIterableSpread() {
408
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
409
- }
410
- function _unsupportedIterableToArray(o, minLen) {
411
- if (!o) return;
412
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
413
- var n = Object.prototype.toString.call(o).slice(8, -1);
414
- if (n === "Object" && o.constructor) n = o.constructor.name;
415
- if (n === "Map" || n === "Set") return Array.from(o);
416
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
417
- }
418
- function _iterableToArray(iter) {
419
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
420
- }
421
- function _arrayWithoutHoles(arr) {
422
- if (Array.isArray(arr)) return _arrayLikeToArray(arr);
423
- }
424
- function _arrayLikeToArray(arr, len) {
425
- if (len == null || len > arr.length) len = arr.length;
426
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
427
- return arr2;
428
- }
429
- /**
430
- * Dom Utilities
431
- * @param {HTMLElement} el - Element
432
- * @param {?String} filter - A filter string
433
- * @returns HtmlElementCollection
434
- */
435
- function matches(el, filter) {
436
- if (el && el.nodeType === 1) {
437
- if (filter) {
438
- return el.matches(filter);
439
- }
440
- return true;
441
- }
442
- return false;
443
- }
444
-
445
- // the next siblings
446
- function _getNextSiblings(el) {
447
- var filter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
448
- var sibs = [];
449
- while (el = el.nextSibling) {
450
- if (matches(el, filter)) {
451
- sibs.push(el);
452
- }
453
- }
454
- return sibs;
455
- }
456
-
457
- // previous siblings
458
- function _getPreviousSiblings(el) {
459
- var filter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
460
- var sibs = [];
461
- while (el = el.previousSibling) {
462
- if (matches(el, filter)) {
463
- sibs.push(el);
464
- }
465
- }
466
- return sibs;
467
- }
468
-
469
- // parent and get all the siblings
470
- function _getAllSiblings(el) {
471
- var filter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
472
- var sibs = [];
473
- el = el.parentNode.firstChild;
474
- while (el = el.nextSibling) {
475
- if (matches(el, filter)) {
476
- sibs.push(el);
477
- }
478
- }
479
- return sibs;
480
- }
481
-
482
- // all parent nodes
483
- function _getParents(el) {
484
- var filter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
485
- var parents = [];
486
- while (el = el.parentNode) {
487
- if (matches(el, filter)) {
488
- parents.push(el);
489
- }
490
- }
491
- return parents;
492
- }
493
-
494
- // all child nodes
495
- function _getChildren(el) {
496
- var filter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
497
- var all = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
498
- all.push.apply(all, _toConsumableArray(el.childNodes));
499
- var _iterator = _createForOfIteratorHelper(el.childNodes),
500
- _step;
501
- try {
502
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
503
- var child = _step.value;
504
- _getChildren(child, filter, all);
505
- }
506
- } catch (err) {
507
- _iterator.e(err);
508
- } finally {
509
- _iterator.f();
510
- }
511
- var res = all.filter(function (item) {
512
- return matches(item, filter);
513
- });
514
- return res;
515
- }
516
- function _isRootElement(element) {
517
- return element.matches('html,body');
518
- }
519
- function _getDocument(node) {
520
- if (typeof node === 'undefined') {
521
- return document;
522
- } else {
523
- return node.ownerDocument;
524
- }
525
- }
526
- function _isNode(value) {
527
- return value instanceof Node;
528
- }
529
- function _isElement(value) {
530
- return value instanceof Element;
531
- }
532
- function _isHTMLElement(value) {
533
- return value instanceof HTMLElement;
534
- }
535
- function _isShadowRoot(value) {
536
- // Browsers without `ShadowRoot` support.
537
- if (typeof ShadowRoot === 'undefined') {
538
- return false;
539
- }
540
- return value instanceof ShadowRoot;
541
- }
542
-
543
- /* console.log(nodeContains(document.body, document.getElementById('obj'))) */
544
- function _nodeContains(parent, child) {
545
- var _child$getRootNode;
546
- if (!parent || !child) {
547
- return false;
548
- }
549
- var rootNode = (_child$getRootNode = child.getRootNode) === null || _child$getRootNode === void 0 ? void 0 : _child$getRootNode.call(child);
550
-
551
- // First, attempt with faster native method
552
- if (parent.contains(child)) {
553
- return true;
554
- }
555
-
556
- // then fallback to custom implementation with Shadow DOM support
557
- if (rootNode && _isShadowRoot(rootNode)) {
558
- var next = child;
559
- while (next) {
560
- if (parent === next) {
561
- return true;
562
- }
563
- // @ts-ignore
564
- next = next.parentNode || next.host;
565
- }
566
- }
567
-
568
- // Give up, the result is false
569
- return false;
570
- }
571
-
572
- /******/
573
- return __webpack_exports__;
574
- /******/
575
- }()
576
- );
577
- });
578
-
579
- /***/ }),
580
-
581
- /***/ 575:
582
- /***/ (function(module, exports, __webpack_require__) {
583
-
584
- /* module decorator */ module = __webpack_require__.nmd(module);
585
- var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function _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); }
586
- (function webpackUniversalModuleDefinition(root, factory) {
587
- 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),
588
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
589
- (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
590
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
591
- })(this, function () {
592
- return (/******/function () {
593
- // webpackBootstrap
594
- /******/
595
- "use strict";
596
-
597
- /******/ // The require scope
598
- /******/
599
- var __nested_webpack_require_993__ = {};
600
- /******/
601
- /************************************************************************/
602
- /******/ /* webpack/runtime/define property getters */
603
- /******/
604
- (function () {
605
- /******/ // define getter functions for harmony exports
606
- /******/__nested_webpack_require_993__.d = function (exports, definition) {
607
- /******/for (var key in definition) {
608
- /******/if (__nested_webpack_require_993__.o(definition, key) && !__nested_webpack_require_993__.o(exports, key)) {
609
- /******/Object.defineProperty(exports, key, {
610
- enumerable: true,
611
- get: definition[key]
612
- });
613
- /******/
614
- }
615
- /******/
616
- }
617
- /******/
618
- };
619
- /******/
620
- })();
621
- /******/
622
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
623
- /******/
624
- (function () {
625
- /******/__nested_webpack_require_993__.o = function (obj, prop) {
626
- return Object.prototype.hasOwnProperty.call(obj, prop);
627
- };
628
- /******/
629
- })();
630
- /******/
631
- /******/ /* webpack/runtime/make namespace object */
632
- /******/
633
- (function () {
634
- /******/ // define __esModule on exports
635
- /******/__nested_webpack_require_993__.r = function (exports) {
636
- /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
637
- /******/Object.defineProperty(exports, Symbol.toStringTag, {
638
- value: 'Module'
639
- });
640
- /******/
641
- }
642
- /******/
643
- Object.defineProperty(exports, '__esModule', {
644
- value: true
645
- });
646
- /******/
647
- };
648
- /******/
649
- })();
650
- /******/
651
- /************************************************************************/
652
- var __webpack_exports__ = {};
653
- __nested_webpack_require_993__.r(__webpack_exports__);
654
- /* harmony export */
655
- __nested_webpack_require_993__.d(__webpack_exports__, {
656
- /* harmony export */"deepClone": function deepClone() {
657
- return (/* binding */_deepClone
658
- );
659
- },
660
- /* harmony export */"flatData": function flatData() {
661
- return (/* binding */_flatData
662
- );
663
- },
664
- /* harmony export */"removeArrDuplicateItems": function removeArrDuplicateItems() {
665
- return (/* binding */_removeArrDuplicateItems
666
- );
667
- }
668
- /* harmony export */
669
- });
670
- function _typeof(obj) {
671
- "@babel/helpers - typeof";
672
-
673
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
674
- return typeof obj;
675
- } : function (obj) {
676
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
677
- }, _typeof(obj);
678
- }
679
- /**
680
- * Remove Duplicate objects from JSON Array
681
- * @param {Array} obj
682
- * @param {String} fieldName
683
- */
684
- function _removeArrDuplicateItems(obj, fieldName) {
685
- if (!Array.isArray(obj)) return [];
686
- var clean = obj.filter(function (item, index, self) {
687
- return index === self.findIndex(function (t) {
688
- return t[fieldName] === item[fieldName];
689
- });
690
- });
691
- return clean;
692
- }
693
- ;
694
-
695
- /**
696
- * Deep clone
697
- * @param {*} obj
698
- */
699
- function _deepClone(obj) {
700
- if (Array.isArray(obj)) {
701
- return obj.map(function (item) {
702
- return _deepClone(item);
703
- });
704
- } else if (_typeof(obj) === 'object' && obj !== null) {
705
- var clone = {};
706
- for (var key in obj) {
707
- if (obj.hasOwnProperty(key)) {
708
- clone[key] = _deepClone(obj[key]);
709
- }
710
- }
711
- return clone;
712
- } else {
713
- return obj;
714
- }
715
- }
716
-
717
- /**
718
- * Flat Data
719
- * @param {*} data
720
- * @returns
721
- */
722
- function _flatData(data) {
723
- var result = [];
724
- var iterate = function iterate(obj) {
725
- if (!obj) {
726
- return;
727
- }
728
- obj.forEach(function (item) {
729
- result.push(item);
730
- if (item.children) {
731
- iterate(item.children);
732
- }
733
-
734
- // delete current item children
735
- delete item.children;
736
- });
737
- };
738
- iterate(data);
739
- return result;
740
- }
741
-
742
- /******/
743
- return __webpack_exports__;
744
- /******/
745
- }()
746
- );
747
- });
748
-
749
- /***/ }),
750
-
751
- /***/ 85:
752
- /***/ (function(module, exports, __webpack_require__) {
753
-
754
- /* module decorator */ module = __webpack_require__.nmd(module);
755
- 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); }
756
- (function webpackUniversalModuleDefinition(root, factory) {
757
- 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),
758
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
759
- (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
760
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
761
- })(this, function (__WEBPACK_EXTERNAL_MODULE__787__) {
762
- return (/******/function () {
763
- // webpackBootstrap
764
- /******/
765
- "use strict";
766
-
767
- /******/
768
- var __webpack_modules__ = {
769
- /***/787: /***/function _(module) {
770
- module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
771
-
772
- /***/
773
- }
774
-
775
- /******/
776
- };
777
- /************************************************************************/
778
- /******/ // The module cache
779
- /******/
780
- var __webpack_module_cache__ = {};
781
- /******/
782
- /******/ // The require function
783
- /******/
784
- function __nested_webpack_require_1465__(moduleId) {
785
- /******/ // Check if module is in cache
786
- /******/var cachedModule = __webpack_module_cache__[moduleId];
787
- /******/
788
- if (cachedModule !== undefined) {
789
- /******/return cachedModule.exports;
790
- /******/
791
- }
792
- /******/ // Create a new module (and put it into the cache)
793
- /******/
794
- var module = __webpack_module_cache__[moduleId] = {
795
- /******/ // no module.id needed
796
- /******/ // no module.loaded needed
797
- /******/exports: {}
798
- /******/
799
- };
800
- /******/
801
- /******/ // Execute the module function
802
- /******/
803
- __webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_1465__);
804
- /******/
805
- /******/ // Return the exports of the module
806
- /******/
807
- return module.exports;
808
- /******/
809
- }
810
- /******/
811
- /************************************************************************/
812
- /******/ /* webpack/runtime/compat get default export */
813
- /******/
814
- (function () {
815
- /******/ // getDefaultExport function for compatibility with non-harmony modules
816
- /******/__nested_webpack_require_1465__.n = function (module) {
817
- /******/var getter = module && module.__esModule ? /******/function () {
818
- return module['default'];
819
- } : /******/function () {
820
- return module;
821
- };
822
- /******/
823
- __nested_webpack_require_1465__.d(getter, {
824
- a: getter
825
- });
826
- /******/
827
- return getter;
828
- /******/
829
- };
830
- /******/
831
- })();
832
- /******/
833
- /******/ /* webpack/runtime/define property getters */
834
- /******/
835
- (function () {
836
- /******/ // define getter functions for harmony exports
837
- /******/__nested_webpack_require_1465__.d = function (exports, definition) {
838
- /******/for (var key in definition) {
839
- /******/if (__nested_webpack_require_1465__.o(definition, key) && !__nested_webpack_require_1465__.o(exports, key)) {
840
- /******/Object.defineProperty(exports, key, {
841
- enumerable: true,
842
- get: definition[key]
843
- });
844
- /******/
845
- }
846
- /******/
847
- }
848
- /******/
849
- };
850
- /******/
851
- })();
852
- /******/
853
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
854
- /******/
855
- (function () {
856
- /******/__nested_webpack_require_1465__.o = function (obj, prop) {
857
- return Object.prototype.hasOwnProperty.call(obj, prop);
858
- };
859
- /******/
860
- })();
861
- /******/
862
- /******/ /* webpack/runtime/make namespace object */
863
- /******/
864
- (function () {
865
- /******/ // define __esModule on exports
866
- /******/__nested_webpack_require_1465__.r = function (exports) {
867
- /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
868
- /******/Object.defineProperty(exports, Symbol.toStringTag, {
869
- value: 'Module'
870
- });
871
- /******/
872
- }
873
- /******/
874
- Object.defineProperty(exports, '__esModule', {
875
- value: true
876
- });
877
- /******/
878
- };
879
- /******/
880
- })();
881
- /******/
882
- /************************************************************************/
883
- var __webpack_exports__ = {};
884
- // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
885
- (function () {
886
- __nested_webpack_require_1465__.r(__webpack_exports__);
887
- /* harmony export */
888
- __nested_webpack_require_1465__.d(__webpack_exports__, {
889
- /* harmony export */"default": function _default() {
890
- return __WEBPACK_DEFAULT_EXPORT__;
891
- }
892
- /* harmony export */
893
- });
894
- /* harmony import */
895
- var react__WEBPACK_IMPORTED_MODULE_0__ = __nested_webpack_require_1465__(787);
896
- /* harmony import */
897
- var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nested_webpack_require_1465__.n(react__WEBPACK_IMPORTED_MODULE_0__);
898
- /**
899
- * Create an available ID
900
- *
901
- */
902
-
903
- var useComId = function useComId() {
904
- return "ID-".concat((0, react__WEBPACK_IMPORTED_MODULE_0__.useId)().replace(/\:/g, "-"));
905
- };
906
- /* harmony default export */
907
- var __WEBPACK_DEFAULT_EXPORT__ = useComId;
908
- })();
909
-
910
- /******/
911
- return __webpack_exports__;
912
- /******/
913
- }()
914
- );
915
- });
916
-
917
- /***/ }),
918
-
919
- /***/ 787:
920
- /***/ ((module) => {
921
-
922
- "use strict";
923
- module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
924
-
925
- /***/ })
926
-
927
- /******/ });
928
- /************************************************************************/
929
- /******/ // The module cache
930
- /******/ var __webpack_module_cache__ = {};
931
- /******/
932
- /******/ // The require function
933
- /******/ function __webpack_require__(moduleId) {
934
- /******/ // Check if module is in cache
935
- /******/ var cachedModule = __webpack_module_cache__[moduleId];
936
- /******/ if (cachedModule !== undefined) {
937
- /******/ return cachedModule.exports;
938
- /******/ }
939
- /******/ // Create a new module (and put it into the cache)
940
- /******/ var module = __webpack_module_cache__[moduleId] = {
941
- /******/ id: moduleId,
942
- /******/ loaded: false,
943
- /******/ exports: {}
944
- /******/ };
945
- /******/
946
- /******/ // Execute the module function
947
- /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
948
- /******/
949
- /******/ // Flag the module as loaded
950
- /******/ module.loaded = true;
951
- /******/
952
- /******/ // Return the exports of the module
953
- /******/ return module.exports;
954
- /******/ }
955
- /******/
956
- /************************************************************************/
957
- /******/ /* webpack/runtime/compat get default export */
958
- /******/ (() => {
959
- /******/ // getDefaultExport function for compatibility with non-harmony modules
960
- /******/ __webpack_require__.n = (module) => {
961
- /******/ var getter = module && module.__esModule ?
962
- /******/ () => (module['default']) :
963
- /******/ () => (module);
964
- /******/ __webpack_require__.d(getter, { a: getter });
965
- /******/ return getter;
966
- /******/ };
967
- /******/ })();
968
- /******/
969
- /******/ /* webpack/runtime/define property getters */
970
- /******/ (() => {
971
- /******/ // define getter functions for harmony exports
972
- /******/ __webpack_require__.d = (exports, definition) => {
973
- /******/ for(var key in definition) {
974
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
975
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
976
- /******/ }
977
- /******/ }
978
- /******/ };
979
- /******/ })();
980
- /******/
981
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
982
- /******/ (() => {
983
- /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
984
- /******/ })();
985
- /******/
986
- /******/ /* webpack/runtime/make namespace object */
987
- /******/ (() => {
988
- /******/ // define __esModule on exports
989
- /******/ __webpack_require__.r = (exports) => {
990
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
991
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
992
- /******/ }
993
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
994
- /******/ };
995
- /******/ })();
996
- /******/
997
- /******/ /* webpack/runtime/node module decorator */
998
- /******/ (() => {
999
- /******/ __webpack_require__.nmd = (module) => {
1000
- /******/ module.paths = [];
1001
- /******/ if (!module.children) module.children = [];
1002
- /******/ return module;
1003
- /******/ };
1004
- /******/ })();
1005
- /******/
1006
- /************************************************************************/
1007
- var __webpack_exports__ = {};
1008
- // This entry need to be wrapped in an IIFE because it need to be in strict mode.
1009
- (() => {
1010
- "use strict";
1011
- // ESM COMPAT FLAG
1012
- __webpack_require__.r(__webpack_exports__);
1013
-
1014
- // EXPORTS
1015
- __webpack_require__.d(__webpack_exports__, {
1016
- "default": () => (/* binding */ src)
1017
- });
1018
-
1019
- // EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"}
1020
- var external_root_React_commonjs2_react_commonjs_react_amd_react_ = __webpack_require__(787);
1021
- var external_root_React_commonjs2_react_commonjs_react_amd_react_default = /*#__PURE__*/__webpack_require__.n(external_root_React_commonjs2_react_commonjs_react_amd_react_);
1022
- // EXTERNAL MODULE: ../Utils/dist/cjs/useComId.js
1023
- var useComId = __webpack_require__(85);
1024
- var useComId_default = /*#__PURE__*/__webpack_require__.n(useComId);
1025
- // EXTERNAL MODULE: ../Utils/dist/cjs/object.js
1026
- var object = __webpack_require__(575);
1027
- // EXTERNAL MODULE: ../Utils/dist/cjs/dom.js
1028
- var dom = __webpack_require__(997);
1029
- // EXTERNAL MODULE: ../Utils/dist/cjs/cls.js
1030
- var cls = __webpack_require__(188);
1031
- ;// CONCATENATED MODULE: ./src/init-height.tsx
1032
- 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); }
1033
- 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; }
1034
- 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); } }
1035
- 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); }); }; }
1036
- var initUlHeight = function initUlHeight(inputUl) {
1037
- [].slice.call(inputUl).forEach(function (el) {
1038
- if (typeof el.dataset.maxheight === 'undefined') {
1039
- var _li = [].slice.call(el.querySelectorAll('li'));
1040
- var _allHeight = 0;
1041
- _li.forEach(function (li) {
1042
- _allHeight += li.scrollHeight;
1043
- });
1044
- el.dataset.maxheight = "".concat(_allHeight, "px");
1045
- el.style.maxHeight = "".concat(_allHeight, "px");
1046
- } else {
1047
- el.style.maxHeight = el.dataset.maxheight;
1048
- }
1049
- });
1050
- };
1051
- var initAsyncItems = /*#__PURE__*/function () {
1052
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(inputUl) {
1053
- return _regeneratorRuntime().wrap(function _callee$(_context) {
1054
- while (1) switch (_context.prev = _context.next) {
1055
- case 0:
1056
- [].slice.call(inputUl).forEach(function (el) {
1057
- el.removeAttribute('data-maxheight');
1058
- });
1059
- case 1:
1060
- case "end":
1061
- return _context.stop();
1062
- }
1063
- }, _callee);
1064
- }));
1065
- return function initAsyncItems(_x) {
1066
- return _ref.apply(this, arguments);
1067
- };
1068
- }();
1069
-
1070
- ;// CONCATENATED MODULE: ./src/utils/func.ts
1071
- var removeItemOnce = function removeItemOnce(arr, key) {
1072
- return arr.filter(function (item) {
1073
- return item.key !== key;
1074
- });
1075
- };
1076
- var activeClass = function activeClass(el, mode) {
1077
- var classname = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'active';
1078
- if (mode === 'add') {
1079
- el.classList.add(classname);
1080
- } else {
1081
- el.classList.remove(classname);
1082
- }
1083
- };
1084
- ;// CONCATENATED MODULE: ./src/TreeList.tsx
1085
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
1086
- 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."); }
1087
- 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; } }
1088
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
1089
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function (_e2) { function e(_x2) { return _e2.apply(this, arguments); } e.toString = function () { return _e2.toString(); }; return e; }(function (e) { throw e; }), f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function (_e3) { function e(_x3) { return _e3.apply(this, arguments); } e.toString = function () { return _e3.toString(); }; return e; }(function (e) { didErr = true; err = e; }), f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
1090
- 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); }
1091
- 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; }
1092
-
1093
-
1094
- // HAS CHECKBOX
1095
-
1096
-
1097
-
1098
-
1099
-
1100
- function TreeList(props) {
1101
- var rootNode = props.rootNode,
1102
- checkboxNamePrefix = props.checkboxNamePrefix,
1103
- alternateCollapse = props.alternateCollapse,
1104
- first = props.first,
1105
- disableArrow = props.disableArrow,
1106
- disableCollapse = props.disableCollapse,
1107
- arrow = props.arrow,
1108
- arrowIcons = props.arrowIcons,
1109
- childClassName = props.childClassName,
1110
- orginalData = props.orginalData,
1111
- data = props.data,
1112
- getCheckedPrint = props.getCheckedPrint,
1113
- updateCheckedPrint = props.updateCheckedPrint,
1114
- getCheckedData = props.getCheckedData,
1115
- updategetCheckedData = props.updategetCheckedData,
1116
- onSelect = props.onSelect,
1117
- onDoubleSelect = props.onDoubleSelect,
1118
- onCollapse = props.onCollapse,
1119
- onCheck = props.onCheck,
1120
- evInitValue = props.evInitValue;
1121
- var rootRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
1122
- var customIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("var", {
1123
- className: "default-icon"
1124
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("svg", {
1125
- width: "0.75em",
1126
- height: "0.75em",
1127
- viewBox: "0 0 20 20",
1128
- fill: "none"
1129
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("path", {
1130
- d: "M15.795 11.272L7.795 16.272C6.79593 16.8964 5.5 16.1782 5.5 15L5.5 5.00002C5.5 3.82186 6.79593 3.1036 7.795 3.72802L15.795 8.72802C16.735 9.31552 16.735 10.6845 15.795 11.272Z",
1131
- fill: "currentColor"
1132
- })));
1133
- var loadingIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("var", {
1134
- className: "loading-icon"
1135
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("svg", {
1136
- width: "1em",
1137
- height: "1em",
1138
- viewBox: "0 0 512 512"
1139
- }, /*#__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", {
1140
- fill: "currentColor",
1141
- 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"
1142
- }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("path", {
1143
- fill: "currentColor",
1144
- 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"
1145
- }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("path", {
1146
- fill: "currentColor",
1147
- 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"
1148
- }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("path", {
1149
- fill: "currentColor",
1150
- 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"
1151
- }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("path", {
1152
- fill: "currentColor",
1153
- 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"
1154
- }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("path", {
1155
- fill: "currentColor",
1156
- 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"
1157
- }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("path", {
1158
- fill: "currentColor",
1159
- 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"
1160
- }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("path", {
1161
- fill: "currentColor",
1162
- 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"
1163
- }))));
1164
- var formatCheckboxControlVal = function formatCheckboxControlVal(el) {
1165
- var _el$dataset$name;
1166
- return {
1167
- name: (_el$dataset$name = el.dataset.name) === null || _el$dataset$name === void 0 ? void 0 : _el$dataset$name.replace(/-label$/, ''),
1168
- key: el.dataset.key,
1169
- slug: el.value,
1170
- link: el.dataset.link
1171
- };
1172
- };
1173
- var setCheckboxCheckedData = function setCheckboxCheckedData(arr, key, val) {
1174
- arr.forEach(function (item, index) {
1175
- if (item.key === key) arr[index].checked = val;
1176
- });
1177
- };
1178
-
1179
- // check whether the node is in the Indeterminate state
1180
- var isIndeterminate = function isIndeterminate(node) {
1181
- if (!node.children || node.children.length === 0) {
1182
- return false;
1183
- }
1184
- var hasChecked = false;
1185
- var hasUnchecked = false;
1186
- var _iterator = _createForOfIteratorHelper(node.children),
1187
- _step;
1188
- try {
1189
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
1190
- var child = _step.value;
1191
- if (isIndeterminate(child)) {
1192
- return true;
1193
- }
1194
- if (child.checked) {
1195
- hasChecked = true;
1196
- } else {
1197
- hasUnchecked = true;
1198
- }
1199
-
1200
- // If there are some selected and some unchecked, the node is Indeterminate
1201
- if (hasChecked && hasUnchecked) {
1202
- return true;
1203
- }
1204
- }
1205
-
1206
- // If all child nodes are the same, it is not Indeterminate
1207
- } catch (err) {
1208
- _iterator.e(err);
1209
- } finally {
1210
- _iterator.f();
1211
- }
1212
- return false;
1213
- };
1214
- var updateTreeCheckedItems = function updateTreeCheckedItems(arr, flatArr) {
1215
- if (!Array.isArray(arr)) return;
1216
- var _loop = function _loop() {
1217
- var orginalDataKey = arr[i].key;
1218
- var targetItem = flatArr.find(function (v) {
1219
- return v.key === orginalDataKey;
1220
- });
1221
- if (typeof targetItem !== 'undefined') {
1222
- // update value of checked
1223
- arr[i].checked = targetItem.checked;
1224
- }
1225
- if (arr[i].children) updateTreeCheckedItems(arr[i].children, flatArr);
1226
- };
1227
- for (var i = 0; i < arr.length; i++) {
1228
- _loop();
1229
- }
1230
- };
1231
- var updateIndeterminateData = function updateIndeterminateData(arr, flatArr) {
1232
- if (!Array.isArray(arr)) return;
1233
- var _loop2 = function _loop2() {
1234
- var orginalDataKey = arr[i].key;
1235
- var targetItem = flatArr.find(function (v) {
1236
- return v.key === orginalDataKey;
1237
- });
1238
- if (typeof targetItem !== 'undefined') {
1239
- // update indeterminate of item
1240
- targetItem.indeterminate = isIndeterminate(arr[i]);
1241
- }
1242
- if (arr[i].children) updateIndeterminateData(arr[i].children, flatArr);
1243
- };
1244
- for (var i = 0; i < arr.length; i++) {
1245
- _loop2();
1246
- }
1247
- };
1248
- var setCheckboxIndeterminateStatus = function setCheckboxIndeterminateStatus(checkedData, printData, el) {
1249
- // update checked items from orginal data
1250
- updateTreeCheckedItems(orginalData, checkedData);
1251
-
1252
- // check whether the node is in the Indeterminate state
1253
- updateIndeterminateData(orginalData, checkedData);
1254
- return [checkedData, printData];
1255
- };
1256
- var closeChild = function closeChild(hyperlink, ul) {
1257
- if (ul.length === 0) return;
1258
- activeClass(hyperlink, 'remove');
1259
- hyperlink.setAttribute('aria-expanded', 'false');
1260
- activeClass(hyperlink.parentNode, 'remove');
1261
-
1262
- //to close
1263
- [].slice.call(ul).forEach(function (element) {
1264
- element.style.maxHeight = 0;
1265
- });
1266
- };
1267
- var openChild = function openChild(hyperlink, ul) {
1268
- if (ul.length === 0) return;
1269
- activeClass(hyperlink, 'add');
1270
- hyperlink.setAttribute('aria-expanded', 'true');
1271
- activeClass(hyperlink.parentNode, 'add');
1272
-
1273
- // init <ul> height
1274
- initUlHeight(ul);
1275
- };
1276
- function handleCollapse(e) {
1277
- if (disableCollapse) return;
1278
- e.preventDefault();
1279
- e.stopPropagation();
1280
- var hyperlink = e.currentTarget;
1281
- var url = hyperlink.getAttribute('href');
1282
- var subElement = (0,dom.getNextSiblings)(hyperlink, 'ul');
1283
-
1284
- // loading
1285
- //=====================
1286
- if (hyperlink.classList.contains('async-ready')) {
1287
- activeClass(hyperlink, 'add', 'loading');
1288
- }
1289
-
1290
- // calback
1291
- //=====================
1292
- var fetchFunc = hyperlink.classList.contains('async-ready') ? typeof evInitValue !== 'function' ? function () {
1293
- return void 0;
1294
- } : evInitValue : function () {
1295
- return void 0;
1296
- };
1297
- onCollapse === null || onCollapse === void 0 ? void 0 : onCollapse(e, {
1298
- key: hyperlink.dataset.key,
1299
- slug: hyperlink.dataset.slug,
1300
- link: hyperlink.dataset.link,
1301
- optiondata: hyperlink.dataset.optiondata
1302
- }, fetchFunc);
1303
-
1304
- // hide child if expandedLink doesn't exist, on the contrary
1305
- //=====================
1306
- if (hyperlink.classList.contains('loading')) return;
1307
- if (hyperlink.getAttribute('aria-expanded') === 'false' || hyperlink.getAttribute('aria-expanded') === null) {
1308
- //Hide all other siblings of the selected <ul>
1309
- if (alternateCollapse) {
1310
- [].slice.call(rootRef.current.children).forEach(function (li) {
1311
- activeClass(li, 'remove');
1312
- var _li = li.firstChild;
1313
- activeClass(_li, 'remove');
1314
- _li.setAttribute('aria-expanded', false);
1315
- [].slice.call((0,dom.getNextSiblings)(_li, 'ul')).forEach(function (element) {
1316
- element.style.maxHeight = 0;
1317
- });
1318
- });
1319
- }
1320
-
1321
- //open current
1322
- openChild(hyperlink, subElement);
1323
- } else {
1324
- //close current
1325
- closeChild(hyperlink, subElement);
1326
- }
1327
- }
1328
- function handleSelect(e) {
1329
- e.preventDefault();
1330
- e.stopPropagation();
1331
- var hyperlink = e.currentTarget;
1332
- if (hyperlink.classList.contains('selected')) {
1333
- activeClass(hyperlink, 'remove', 'selected');
1334
- } else {
1335
- [].slice.call(hyperlink.closest('.tree-diagram__wrapper').querySelectorAll('li > a')).forEach(function (node) {
1336
- activeClass(node, 'remove', 'selected');
1337
- });
1338
- activeClass(hyperlink, 'add', 'selected');
1339
- }
1340
- onSelect === null || onSelect === void 0 ? void 0 : onSelect(e, {
1341
- key: hyperlink.dataset.key,
1342
- slug: hyperlink.dataset.slug,
1343
- link: hyperlink.dataset.link,
1344
- optiondata: hyperlink.dataset.optiondata
1345
- }, typeof evInitValue !== 'function' ? function () {
1346
- return void 0;
1347
- } : evInitValue);
1348
- if (disableArrow) {
1349
- handleCollapse(e);
1350
- }
1351
- }
1352
- function handleDoubleSelect(e) {
1353
- e.preventDefault();
1354
- e.stopPropagation();
1355
- var hyperlink = e.currentTarget;
1356
- if (hyperlink.classList.contains('selected')) {
1357
- activeClass(hyperlink, 'remove', 'selected');
1358
- } else {
1359
- [].slice.call(hyperlink.closest('.tree-diagram__wrapper').querySelectorAll('li > a')).forEach(function (node) {
1360
- activeClass(node, 'remove', 'selected');
1361
- });
1362
- activeClass(hyperlink, 'add', 'selected');
1363
- }
1364
- onDoubleSelect === null || onDoubleSelect === void 0 ? void 0 : onDoubleSelect(e, {
1365
- key: hyperlink.dataset.key,
1366
- slug: hyperlink.dataset.slug,
1367
- link: hyperlink.dataset.link,
1368
- optiondata: hyperlink.dataset.optiondata
1369
- }, typeof evInitValue !== 'function' ? function () {
1370
- return void 0;
1371
- } : evInitValue);
1372
- if (disableArrow) {
1373
- handleCollapse(e);
1374
- }
1375
- }
1376
- function titleArrowGenerator() {
1377
- return disableArrow ? loadingIcon : null;
1378
- }
1379
- function arrowGenerator() {
1380
- if (arrowIcons && Array.isArray(arrowIcons)) {
1381
- return arrowIcons.length > 1 ? /*#__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("var", {
1382
- className: "default-icon"
1383
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", null, arrowIcons[0]), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", null, arrowIcons[1])), loadingIcon) : /*#__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("var", {
1384
- className: "default-icon"
1385
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", null, arrowIcons[0]), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", null, arrowIcons[0])), loadingIcon);
1386
- } else {
1387
- return arrow ? arrow : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, customIcon, loadingIcon);
1388
- }
1389
- }
1390
- function checkedAct(el, val) {
1391
- if (el === null) return;
1392
- var _curKey = el.dataset.key;
1393
- var _checkedData = getCheckedData;
1394
- var _res = getCheckedPrint;
1395
-
1396
- // STEP 1:
1397
- // Current checkbox
1398
- //-----------
1399
- if (val === true) {
1400
- _res.push(formatCheckboxControlVal(el));
1401
- setCheckboxCheckedData(_checkedData, _curKey, true);
1402
- } else {
1403
- setCheckboxCheckedData(_checkedData, _curKey, false);
1404
- _res = removeItemOnce(_res, _curKey);
1405
- }
1406
-
1407
- // STEP 2:
1408
- // All child checkboxes
1409
- //-----------
1410
- [].slice.call((0,dom.getChildren)(el.closest('li'), '[type="checkbox"]')).forEach(function (node) {
1411
- if (val === true) {
1412
- if (node.dataset.key !== _curKey) {
1413
- setCheckboxCheckedData(_checkedData, node.dataset.key, true);
1414
- _res.push(formatCheckboxControlVal(node));
1415
- }
1416
- } else {
1417
- setCheckboxCheckedData(_checkedData, node.dataset.key, false);
1418
- _res = removeItemOnce(_res, node.dataset.key);
1419
- }
1420
- });
1421
-
1422
- // STEP 3:
1423
- // ALl parent checkboxes
1424
- //-----------
1425
- var _setCheckboxIndetermi = setCheckboxIndeterminateStatus(_checkedData, _res, el),
1426
- _setCheckboxIndetermi2 = _slicedToArray(_setCheckboxIndetermi, 2),
1427
- updatedCheckedData = _setCheckboxIndetermi2[0],
1428
- updatedPrintData = _setCheckboxIndetermi2[1];
1429
- var _updatedCheckedData = updatedCheckedData;
1430
- var _updatedPrintData = updatedPrintData;
1431
-
1432
- // STEP 4:
1433
- // Update checked data
1434
- //-----------
1435
- updategetCheckedData(_updatedCheckedData);
1436
-
1437
- // STEP 5:
1438
- // Array deduplication
1439
- //-----------
1440
- _updatedPrintData = _updatedPrintData.filter(function (item, index, self) {
1441
- return index === self.findIndex(function (t) {
1442
- return t.key === item.key;
1443
- });
1444
- });
1445
-
1446
- // STEP 6:
1447
- // Update checked print
1448
- //-----------
1449
- updateCheckedPrint(_updatedPrintData);
1450
-
1451
- // STEP 7:
1452
- // callback
1453
- //-----------
1454
- onCheck === null || onCheck === void 0 ? void 0 : onCheck(_updatedPrintData);
1455
- }
1456
- (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
1457
- // Activate current item
1458
- //=====================
1459
- var allItems = rootRef.current ? [].slice.call(document.querySelectorAll(".".concat(childClassName, " a"))).map(function (item) {
1460
- var _item$parentNode$clas;
1461
- return {
1462
- href: item.getAttribute('href'),
1463
- el: item,
1464
- actived: (_item$parentNode$clas = item.parentNode.classList) !== null && _item$parentNode$clas !== void 0 && _item$parentNode$clas.contains('active') ? true : false,
1465
- expandedLink: document.body.contains(item.parentNode.parentNode.previousSibling) ? item.parentNode.parentNode.previousSibling : false
1466
- };
1467
- }) : [];
1468
- allItems.forEach(function (hyperlink) {
1469
- // Expand the currently active item by default
1470
- if (hyperlink.actived) {
1471
- hyperlink.el.setAttribute('aria-expanded', 'true');
1472
- if (hyperlink.expandedLink) {
1473
- var expandedLink = hyperlink.expandedLink; // <a>
1474
- activeClass(expandedLink.parentNode, 'add');
1475
- expandedLink.setAttribute('aria-expanded', true);
1476
- }
1477
-
1478
- // init <ul> height
1479
- var ul = (0,dom.getNextSiblings)(hyperlink.el, 'ul');
1480
- initUlHeight(ul);
1481
- }
1482
- });
1483
-
1484
- // Initialize indeterminate status of all checkboxes
1485
- //=====================
1486
- setCheckboxIndeterminateStatus(getCheckedData, getCheckedPrint, null);
1487
- }, [data]);
1488
- if (data) {
1489
- 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("ul", {
1490
- className: (0,cls.combinedCls)(childClassName, {
1491
- 'first': first
1492
- }),
1493
- ref: rootRef,
1494
- style: !first ? {
1495
- maxHeight: '0px'
1496
- } : {}
1497
- }, data.map(function (item, i) {
1498
- var _filter$, _filter$2;
1499
- var _async = item.childrenAsync ? 'async-ready' : '';
1500
- var _cusIcons = arrowIcons ? 'custom-icons' : '';
1501
- if (item.heading) return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("li", {
1502
- className: (0,cls.combinedCls)('nav-item', {
1503
- 'first': first
1504
- }),
1505
- key: item.key
1506
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("a", {
1507
- tabIndex: -1,
1508
- className: "nav-link disabled",
1509
- href: "#",
1510
- "aria-disabled": "true",
1511
- "data-link": item.link,
1512
- "data-slug": item.slug,
1513
- "data-key": item.key,
1514
- "data-optiondata": JSON.stringify(item)
1515
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", null, item.icon ? item.icon.indexOf('</svg>') < 0 ? /*#__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("i", {
1516
- className: item.icon
1517
- }), " ") : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("var", {
1518
- dangerouslySetInnerHTML: {
1519
- __html: "".concat(item.icon)
1520
- }
1521
- }) : null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("i", {
1522
- dangerouslySetInnerHTML: {
1523
- __html: "".concat(item.title)
1524
- }
1525
- }))));
1526
- return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("li", {
1527
- className: (0,cls.combinedCls)('nav-item', {
1528
- 'first': first,
1529
- 'active': item.active
1530
- }),
1531
- key: item.key,
1532
- onMouseEnter: typeof item.itemMouseEnterCallback !== 'undefined' ? item.itemMouseEnterCallback : function () {
1533
- return void 0;
1534
- },
1535
- onMouseLeave: typeof item.itemMouseLeaveCallback !== 'undefined' ? item.itemMouseLeaveCallback : function () {
1536
- return void 0;
1537
- }
1538
- }, item.children && item.children.length || item.childrenAsync ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
1539
- "aria-expanded": item.active ? 'true' : 'false',
1540
- className: item.active ? "arrow active ".concat(_async, " ").concat(_cusIcons) : "arrow ".concat(_async, " ").concat(_cusIcons),
1541
- onClick: handleCollapse,
1542
- "data-link": item.link,
1543
- "data-slug": item.slug,
1544
- "data-key": item.key,
1545
- "data-optiondata": JSON.stringify(item)
1546
- }, arrowGenerator()) : '', /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
1547
- className: "checkbox-trigger"
1548
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
1549
- className: "form-check__wrapper"
1550
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
1551
- className: "form-check d-inline-block"
1552
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("input", {
1553
- type: "checkbox",
1554
- className: (0,cls.combinedCls)('form-check-input', {
1555
- 'indeterminate': (_filter$ = getCheckedData.filter(function (cur) {
1556
- return cur.key === item.key;
1557
- })[0]) === null || _filter$ === void 0 ? void 0 : _filter$.indeterminate
1558
- }),
1559
- name: "checkbox-".concat(checkboxNamePrefix, "-").concat(item.key),
1560
- tabIndex: -1,
1561
- "data-name": "checkbox-".concat(checkboxNamePrefix, "-").concat(item.key),
1562
- "data-key": item.key,
1563
- "data-link": item.link,
1564
- value: item.slug,
1565
- checked: (_filter$2 = getCheckedData.filter(function (cur) {
1566
- return cur.key === item.key;
1567
- })[0]) === null || _filter$2 === void 0 ? void 0 : _filter$2.checked,
1568
- onChange: function onChange(e) {
1569
- var _filter$3;
1570
- checkedAct(e.target, !((_filter$3 = getCheckedData.filter(function (cur) {
1571
- return cur.key === item.key;
1572
- })[0]) !== null && _filter$3 !== void 0 && _filter$3.checked));
1573
- }
1574
- })))), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("a", {
1575
- tabIndex: -1,
1576
- className: (0,cls.combinedCls)('nav-link', _async, {
1577
- 'selected': item.selected,
1578
- 'active': item.active
1579
- }),
1580
- href: item.link === '#' ? "".concat(item.link, "-").concat(i) : item.link,
1581
- "aria-expanded": "false",
1582
- onClick: handleSelect,
1583
- onDoubleClick: handleDoubleSelect,
1584
- "data-link": item.link,
1585
- "data-slug": item.slug,
1586
- "data-key": item.key,
1587
- "data-optiondata": JSON.stringify(item),
1588
- onMouseEnter: typeof item.itemLinkMouseEnterCallback !== 'undefined' ? item.itemLinkMouseEnterCallback : function () {
1589
- return void 0;
1590
- },
1591
- onMouseLeave: typeof item.itemLinkMouseLeaveCallback !== 'undefined' ? item.itemLinkMouseLeaveCallback : function () {
1592
- return void 0;
1593
- }
1594
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", null, item.icon ? item.icon.indexOf('</svg>') < 0 ? /*#__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("i", {
1595
- className: item.icon
1596
- }), " ") : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("var", {
1597
- dangerouslySetInnerHTML: {
1598
- __html: "".concat(item.icon)
1599
- }
1600
- }) : null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("i", {
1601
- dangerouslySetInnerHTML: {
1602
- __html: "".concat(item.title)
1603
- }
1604
- }), titleArrowGenerator()), item.customContentToHyperlink), item.customContentToLiTag, item.children && item.children.length > 0 && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(TreeList, {
1605
- rootNode: rootNode,
1606
- checkboxNamePrefix: checkboxNamePrefix,
1607
- orginalData: orginalData,
1608
- data: item.children,
1609
- first: false,
1610
- arrow: arrow,
1611
- onSelect: onSelect,
1612
- onDoubleSelect: onDoubleSelect,
1613
- onCollapse: onCollapse,
1614
- onCheck: onCheck,
1615
- disableArrow: disableArrow,
1616
- disableCollapse: disableCollapse,
1617
- arrowIcons: arrowIcons,
1618
- evInitValue: evInitValue,
1619
- getCheckedPrint: getCheckedPrint,
1620
- updateCheckedPrint: updateCheckedPrint,
1621
- getCheckedData: getCheckedData,
1622
- updategetCheckedData: updategetCheckedData
1623
- }));
1624
- })));
1625
- } else {
1626
- 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);
1627
- }
1628
- }
1629
- ;// CONCATENATED MODULE: ./src/index.tsx
1630
- function src_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ src_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" == src_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; }
1631
- function src_typeof(obj) { "@babel/helpers - typeof"; return src_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; }, src_typeof(obj); }
1632
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || src_unsupportedIterableToArray(arr) || _nonIterableSpread(); }
1633
- 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."); }
1634
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
1635
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return src_arrayLikeToArray(arr); }
1636
- function src_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); } }
1637
- function src_asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { src_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { src_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
1638
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
1639
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1640
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1641
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return src_typeof(key) === "symbol" ? key : String(key); }
1642
- function _toPrimitive(input, hint) { if (src_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (src_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
1643
- function src_slicedToArray(arr, i) { return src_arrayWithHoles(arr) || src_iterableToArrayLimit(arr, i) || src_unsupportedIterableToArray(arr, i) || src_nonIterableRest(); }
1644
- function src_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."); }
1645
- function src_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return src_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 src_arrayLikeToArray(o, minLen); }
1646
- function src_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; }
1647
- function src_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; } }
1648
- function src_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
1649
-
1650
-
1651
-
1652
-
1653
-
1654
- var Tree = function Tree(props) {
1655
- var id = props.id,
1656
- checkable = props.checkable,
1657
- showLine = props.showLine,
1658
- lineStyle = props.lineStyle,
1659
- alternateCollapse = props.alternateCollapse,
1660
- disableArrow = props.disableArrow,
1661
- disableCollapse = props.disableCollapse,
1662
- arrow = props.arrow,
1663
- arrowIcons = props.arrowIcons,
1664
- treeClassName = props.treeClassName,
1665
- childClassName = props.childClassName,
1666
- data = props.data,
1667
- retrieveData = props.retrieveData,
1668
- onSelect = props.onSelect,
1669
- onDoubleSelect = props.onDoubleSelect,
1670
- onCollapse = props.onCollapse,
1671
- onCheck = props.onCheck;
1672
- var uniqueID = useComId_default()();
1673
- var idRes = id || uniqueID;
1674
- var rootRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
1675
- var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(null),
1676
- _useState2 = src_slicedToArray(_useState, 2),
1677
- orginalData = _useState2[0],
1678
- setOrginalData = _useState2[1];
1679
- var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(null),
1680
- _useState4 = src_slicedToArray(_useState3, 2),
1681
- list = _useState4[0],
1682
- setList = _useState4[1];
1683
- var _useState5 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)([]),
1684
- _useState6 = src_slicedToArray(_useState5, 2),
1685
- flatList = _useState6[0],
1686
- setFlatList = _useState6[1];
1687
- var _useState7 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)([]),
1688
- _useState8 = src_slicedToArray(_useState7, 2),
1689
- checkedPrint = _useState8[0],
1690
- setCheckedPrint = _useState8[1];
1691
- var _useState9 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)([]),
1692
- _useState10 = src_slicedToArray(_useState9, 2),
1693
- checkedData = _useState10[0],
1694
- setCheckedData = _useState10[1];
1695
- var expandClassName = "".concat(showLine ? 'show-line' : '', " ").concat(disableArrow ? 'hide-arrow' : '', " ").concat(disableCollapse ? 'collapse-disabled' : '', " ").concat(lineStyle ? "line--".concat(lineStyle) : '', " ").concat(checkable ? 'has-checkbox' : '');
1696
- var updateTreeData = function updateTreeData(list, key, children) {
1697
- return list ? list.map(function (node) {
1698
- if (node.key === key) {
1699
- return _objectSpread(_objectSpread({}, node), {}, {
1700
- children: children
1701
- });
1702
- }
1703
- if (node.children) {
1704
- return _objectSpread(_objectSpread({}, node), {}, {
1705
- children: updateTreeData(node.children, key, children)
1706
- });
1707
- }
1708
- return node;
1709
- }) : [];
1710
- };
1711
- function fetchData(_x2, _x3) {
1712
- return _fetchData.apply(this, arguments);
1713
- }
1714
- function _fetchData() {
1715
- _fetchData = src_asyncToGenerator( /*#__PURE__*/src_regeneratorRuntime().mark(function _callee(fetch, params) {
1716
- var _fetch$fetchFuncAsync, response, _ORGIN_DATA;
1717
- return src_regeneratorRuntime().wrap(function _callee$(_context) {
1718
- while (1) switch (_context.prev = _context.next) {
1719
- case 0:
1720
- if (!(src_typeof(fetch.fetchFuncAsync) === 'object')) {
1721
- _context.next = 14;
1722
- break;
1723
- }
1724
- _context.next = 3;
1725
- return (_fetch$fetchFuncAsync = fetch.fetchFuncAsync)["".concat(fetch.fetchFuncMethod)].apply(_fetch$fetchFuncAsync, _toConsumableArray(params.split(',')));
1726
- case 3:
1727
- response = _context.sent;
1728
- _ORGIN_DATA = response.data;
1729
- if (!(Array.isArray(_ORGIN_DATA) && _ORGIN_DATA.length > 0)) {
1730
- _context.next = 11;
1731
- break;
1732
- }
1733
- // reset data structure
1734
- if (typeof fetch.fetchCallback === 'function') {
1735
- _ORGIN_DATA = fetch.fetchCallback(_ORGIN_DATA);
1736
- }
1737
-
1738
- // Determine whether the data structure matches
1739
- if (_ORGIN_DATA.length > 0 && typeof _ORGIN_DATA[0].title === 'undefined') {
1740
- console.warn('The data structure does not match, please refer to the example in the component documentation.');
1741
- _ORGIN_DATA = [];
1742
- }
1743
- return _context.abrupt("return", _ORGIN_DATA);
1744
- case 11:
1745
- return _context.abrupt("return", []);
1746
- case 12:
1747
- _context.next = 15;
1748
- break;
1749
- case 14:
1750
- return _context.abrupt("return", []);
1751
- case 15:
1752
- case "end":
1753
- return _context.stop();
1754
- }
1755
- }, _callee);
1756
- }));
1757
- return _fetchData.apply(this, arguments);
1758
- }
1759
- function updateShowProp(obj, retrieveData) {
1760
- var val = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
1761
- obj.forEach(function (item, index) {
1762
- if (retrieveData.length === 0) {
1763
- item.show = true;
1764
- } else {
1765
- if (typeof val !== 'undefined') {
1766
- item.show = val;
1767
- } else {
1768
- var _item$title;
1769
- if (retrieveData.map(function (v) {
1770
- var _v$title;
1771
- return (_v$title = v.title) === null || _v$title === void 0 ? void 0 : _v$title.toLowerCase();
1772
- }).includes((_item$title = item.title) === null || _item$title === void 0 ? void 0 : _item$title.toLowerCase())) {
1773
- item.show = true;
1774
- } else {
1775
- item.show = false;
1776
- }
1777
- }
1778
- }
1779
-
1780
- //
1781
- if (item.children) {
1782
- updateShowProp(item.children, retrieveData, val);
1783
- }
1784
- });
1785
- }
1786
- function addKey(obj, depth, init) {
1787
- obj.forEach(function (item, index) {
1788
- item.key = "".concat(depth, "-").concat(index).substring(1);
1789
- if (item.children) {
1790
- addKey(item.children, "".concat(depth, "-").concat(index), init + 1);
1791
- }
1792
- });
1793
- }
1794
- function initCheckboxesVal(obj) {
1795
- obj.forEach(function (item) {
1796
- if (item.checked === true) setCheckedPrint(function (prevState) {
1797
- return [{
1798
- name: "checkbox-".concat(idRes, "-").concat(item.key),
1799
- key: item.key,
1800
- slug: item.slug,
1801
- link: item.link
1802
- }].concat(_toConsumableArray(prevState));
1803
- });
1804
- if (item.children) {
1805
- initCheckboxesVal(item.children);
1806
- }
1807
- });
1808
- }
1809
- function initCheckboxesData(obj) {
1810
- obj.forEach(function (item) {
1811
- setCheckedData(function (prevState) {
1812
- return [{
1813
- key: item.key,
1814
- checked: item.checked === true,
1815
- show: true,
1816
- indeterminate: false
1817
- }].concat(_toConsumableArray(prevState));
1818
- });
1819
- if (item.children) {
1820
- initCheckboxesData(item.children);
1821
- }
1822
- });
1823
- }
1824
- function initDefaultValue(key) {
1825
- var fetch = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
1826
- var firstRender = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
1827
- var retrieveData = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
1828
- if (firstRender) {
1829
- addKey(data, '', 0);
1830
-
1831
- // filter showing items
1832
- if (Array.isArray(retrieveData)) {
1833
- updateShowProp(data, retrieveData);
1834
- } else {
1835
- updateShowProp(data, retrieveData, true);
1836
- }
1837
-
1838
- // Initialize default value of checkboxes
1839
- if (checkable) {
1840
- initCheckboxesVal(data);
1841
- initCheckboxesData(data);
1842
- }
1843
-
1844
- // update list
1845
- setList(data);
1846
-
1847
- // update retrive list
1848
- var _clone = (0,object.deepClone)(data);
1849
- setFlatList((0,object.flatData)(_clone));
1850
- return;
1851
- }
1852
- if (fetch && src_typeof(fetch.fetchFuncAsync) === 'object') {
1853
- //
1854
- var _params = fetch.fetchFuncMethodParams || [];
1855
- fetchData(fetch, _params.join(',')).then(function (response) {
1856
- var _childrenData = response;
1857
- if (_childrenData.length > 0) {
1858
- // add children to node
1859
- var _newData = updateTreeData(list, key ? key : '', _childrenData);
1860
-
1861
- // update data
1862
- addKey(_newData, '', 0);
1863
-
1864
- // filter showing items
1865
- if (Array.isArray(retrieveData)) {
1866
- updateShowProp(_newData, retrieveData);
1867
- } else {
1868
- updateShowProp(_newData, retrieveData, true);
1869
- }
1870
-
1871
- // Initialize default value of checkboxes
1872
- if (checkable) {
1873
- _childrenData.forEach(function (newitem) {
1874
- setCheckedData(function (prevState) {
1875
- return [{
1876
- key: newitem.key,
1877
- checked: newitem.checked === true,
1878
- show: true,
1879
- indeterminate: false
1880
- }].concat(_toConsumableArray(prevState));
1881
- });
1882
- });
1883
- }
1884
-
1885
- // update list
1886
- setList(_newData);
1887
-
1888
- // update retrive list
1889
- var _clone2 = (0,object.deepClone)(_newData);
1890
- setFlatList((0,object.flatData)(_clone2));
1891
- }
1892
-
1893
- // loading status
1894
- setTimeout(function () {
1895
- [].slice.call(rootRef.current.querySelectorAll('.arrow.async-ready, .nav-link.async-ready')).forEach(function (node) {
1896
- node.classList.remove('loading');
1897
- if (node.parentElement.querySelector('ul') !== null) {
1898
- node.classList.remove('async-ready');
1899
- node.click();
1900
- }
1901
- });
1902
-
1903
- // init <ul> height
1904
- // Initialize async items
1905
- var ul = [].slice.call(rootRef.current.querySelectorAll('ul'));
1906
- initAsyncItems(ul).then(function () {
1907
- initUlHeight(ul);
1908
- });
1909
- }, 500);
1910
- });
1911
- }
1912
- }
1913
- function filterRetriveData(flatData, retrieveData) {
1914
- return flatData.filter(function (item) {
1915
- var _item$title2;
1916
- return retrieveData.map(function (v) {
1917
- var _v$title2;
1918
- return (_v$title2 = v.title) === null || _v$title2 === void 0 ? void 0 : _v$title2.toLowerCase();
1919
- }).includes((_item$title2 = item.title) === null || _item$title2 === void 0 ? void 0 : _item$title2.toLowerCase());
1920
- });
1921
- }
1922
- (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
1923
- initDefaultValue(null, null, true, retrieveData);
1924
- setOrginalData(data);
1925
- }, [data, retrieveData]);
1926
- 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("nav", {
1927
- tabIndex: 0,
1928
- id: idRes,
1929
- ref: rootRef,
1930
- className: treeClassName ? "tree-diagram__wrapper ".concat(treeClassName, " ").concat(expandClassName) : "tree-diagram__wrapper tree-diagram-default ".concat(expandClassName)
1931
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(TreeList, {
1932
- rootNode: rootRef,
1933
- checkboxNamePrefix: idRes,
1934
- alternateCollapse: alternateCollapse,
1935
- first: true,
1936
- disableArrow: disableArrow,
1937
- disableCollapse: disableCollapse,
1938
- arrow: arrow,
1939
- arrowIcons: arrowIcons,
1940
- orginalData: orginalData,
1941
- data: Array.isArray(retrieveData) && retrieveData.length > 0 ? filterRetriveData(flatList, retrieveData) : list,
1942
- childClassName: childClassName || 'tree-diagram-default-nav',
1943
- onSelect: onSelect,
1944
- onDoubleSelect: onDoubleSelect,
1945
- onCollapse: onCollapse,
1946
- onCheck: onCheck,
1947
- evInitValue: initDefaultValue,
1948
- updateCheckedPrint: setCheckedPrint,
1949
- getCheckedPrint: checkedPrint,
1950
- updategetCheckedData: setCheckedData,
1951
- getCheckedData: checkedData
1952
- })));
1953
- };
1954
- /* harmony default export */ const src = (Tree);
1955
- })();
1956
-
1957
- /******/ return __webpack_exports__;
1958
- /******/ })()
1959
- ;
1960
- });