funda-ui 4.5.682 → 4.5.711

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