funda-ui 4.7.624 → 4.7.625

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