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,4180 +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
- /***/ 962:
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 _typeof3(obj) { "@babel/helpers - typeof"; return _typeof3 = "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; }, _typeof3(obj); }
221
- (function webpackUniversalModuleDefinition(root, factory) {
222
- if (( false ? 0 : _typeof3(exports)) === 'object' && ( false ? 0 : _typeof3(module)) === 'object') module.exports = factory(__webpack_require__(787));else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(787)], __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 (__WEBPACK_EXTERNAL_MODULE__787__) {
227
- return (/******/function () {
228
- // webpackBootstrap
229
- /******/
230
- var __webpack_modules__ = {
231
- /***/188: /***/function _(module, exports, __nested_webpack_require_1080__) {
232
- /* module decorator */module = __nested_webpack_require_1080__.nmd(module);
233
- var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
234
- function _typeof2(obj) {
235
- "@babel/helpers - typeof";
236
-
237
- return _typeof2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
238
- return typeof obj;
239
- } : function (obj) {
240
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
241
- }, _typeof2(obj);
242
- }
243
- (function webpackUniversalModuleDefinition(root, factory) {
244
- 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, __WEBPACK_AMD_DEFINE_RESULT__ = typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
245
- })(this, function () {
246
- return (/******/function () {
247
- // webpackBootstrap
248
- /******/
249
- "use strict";
250
-
251
- /******/ // The require scope
252
- /******/
253
- var __nested_webpack_require_993__ = {};
254
- /******/
255
- /************************************************************************/
256
- /******/ /* webpack/runtime/define property getters */
257
- /******/
258
- (function () {
259
- /******/ // define getter functions for harmony exports
260
- /******/__nested_webpack_require_993__.d = function (exports, definition) {
261
- /******/for (var key in definition) {
262
- /******/if (__nested_webpack_require_993__.o(definition, key) && !__nested_webpack_require_993__.o(exports, key)) {
263
- /******/Object.defineProperty(exports, key, {
264
- enumerable: true,
265
- get: definition[key]
266
- });
267
- /******/
268
- }
269
- /******/
270
- }
271
- /******/
272
- };
273
- /******/
274
- })();
275
- /******/
276
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
277
- /******/
278
- (function () {
279
- /******/__nested_webpack_require_993__.o = function (obj, prop) {
280
- return Object.prototype.hasOwnProperty.call(obj, prop);
281
- };
282
- /******/
283
- })();
284
- /******/
285
- /******/ /* webpack/runtime/make namespace object */
286
- /******/
287
- (function () {
288
- /******/ // define __esModule on exports
289
- /******/__nested_webpack_require_993__.r = function (exports) {
290
- /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
291
- /******/Object.defineProperty(exports, Symbol.toStringTag, {
292
- value: 'Module'
293
- });
294
- /******/
295
- }
296
- /******/
297
- Object.defineProperty(exports, '__esModule', {
298
- value: true
299
- });
300
- /******/
301
- };
302
- /******/
303
- })();
304
- /******/
305
- /************************************************************************/
306
- var __webpack_exports__ = {};
307
- __nested_webpack_require_993__.r(__webpack_exports__);
308
- /* harmony export */
309
- __nested_webpack_require_993__.d(__webpack_exports__, {
310
- /* harmony export */"clsWrite": function clsWrite() {
311
- return (/* binding */_clsWrite
312
- );
313
- },
314
- /* harmony export */"combinedCls": function combinedCls() {
315
- return (/* binding */_combinedCls
316
- );
317
- }
318
- /* harmony export */
319
- });
320
-
321
- function _slicedToArray(arr, i) {
322
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
323
- }
324
- function _nonIterableRest() {
325
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
326
- }
327
- function _unsupportedIterableToArray(o, minLen) {
328
- if (!o) return;
329
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
330
- var n = Object.prototype.toString.call(o).slice(8, -1);
331
- if (n === "Object" && o.constructor) n = o.constructor.name;
332
- if (n === "Map" || n === "Set") return Array.from(o);
333
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
334
- }
335
- function _arrayLikeToArray(arr, len) {
336
- if (len == null || len > arr.length) len = arr.length;
337
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
338
- return arr2;
339
- }
340
- function _iterableToArrayLimit(arr, i) {
341
- var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
342
- if (null != _i) {
343
- var _s,
344
- _e,
345
- _x,
346
- _r,
347
- _arr = [],
348
- _n = !0,
349
- _d = !1;
350
- try {
351
- if (_x = (_i = _i.call(arr)).next, 0 === i) {
352
- if (Object(_i) !== _i) return;
353
- _n = !1;
354
- } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
355
- } catch (err) {
356
- _d = !0, _e = err;
357
- } finally {
358
- try {
359
- if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
360
- } finally {
361
- if (_d) throw _e;
362
- }
363
- }
364
- return _arr;
365
- }
366
- }
367
- function _arrayWithHoles(arr) {
368
- if (Array.isArray(arr)) return arr;
369
- }
370
- function _typeof(obj) {
371
- "@babel/helpers - typeof";
372
-
373
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
374
- return typeof obj;
375
- } : function (obj) {
376
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
377
- }, _typeof(obj);
378
- }
379
- /**
380
- * Output of class name
381
- * @param {*} s - Any
382
- * @param {String} defaultCls - Default string
383
- * @param {?*} targetCls - Any
384
- * @returns {*}
385
- */
386
- function _clsWrite(s, defaultCls) {
387
- var targetCls = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
388
- return s || s === '' ? typeof targetCls === 'undefined' ? s : targetCls : defaultCls;
389
- }
390
-
391
- /**
392
- * Combined classnames
393
- * @param {*} args
394
- * @returns {String|undefined}
395
- */
396
- /* Usage:
397
-
398
- console.log(combinedCls('a-1', 'a-2', 'a-3', {
399
- 'p-1': null,
400
- 'p-2': undefined,
401
- 'p-3': true,
402
- 'p-4': false,
403
- 'p-5': 'kkk',
404
- 'p-6': 0,
405
- 'p-7': 1,
406
- 'p-8': '',
407
- undefined
408
- })); // a-1 a-2 a-3 p-3 p-5 p-7
409
- */
410
- function _combinedCls() {
411
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
412
- args[_key] = arguments[_key];
413
- }
414
- if (args) {
415
- var classes = [];
416
- for (var i = 0; i < args.length; i++) {
417
- var className = args[i];
418
- if (!className) {
419
- continue;
420
- }
421
- var type = _typeof(className);
422
- if (type === 'string' || type === 'number') {
423
- classes.push(className);
424
- } else if (type === 'object') {
425
- var _classes = Array.isArray(className) ? className : Object.entries(className).map(function (_ref) {
426
- var _ref2 = _slicedToArray(_ref, 2),
427
- key = _ref2[0],
428
- value = _ref2[1];
429
- return value ? key : null;
430
- });
431
- classes = _classes.length ? classes.concat(_classes.filter(function (c) {
432
- return !!c;
433
- })) : classes;
434
- }
435
- }
436
- return classes.join(' ').trim();
437
- }
438
- return undefined;
439
- }
440
-
441
- /******/
442
- return __webpack_exports__;
443
- /******/
444
- }()
445
- );
446
- });
447
-
448
- /***/
449
- },
450
-
451
- /***/85: /***/function _(module, exports, __nested_webpack_require_11463__) {
452
- /* module decorator */module = __nested_webpack_require_11463__.nmd(module);
453
- var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
454
- function _typeof(obj) {
455
- "@babel/helpers - typeof";
456
-
457
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
458
- return typeof obj;
459
- } : function (obj) {
460
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
461
- }, _typeof(obj);
462
- }
463
- (function webpackUniversalModuleDefinition(root, factory) {
464
- if (( false ? 0 : _typeof(exports)) === 'object' && ( false ? 0 : _typeof(module)) === 'object') module.exports = factory(__nested_webpack_require_11463__(787));else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__nested_webpack_require_11463__(787)], __WEBPACK_AMD_DEFINE_FACTORY__ = factory, __WEBPACK_AMD_DEFINE_RESULT__ = typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
465
- })(this, function (__WEBPACK_EXTERNAL_MODULE__787__) {
466
- return (/******/function () {
467
- // webpackBootstrap
468
- /******/
469
- "use strict";
470
-
471
- /******/
472
- var __webpack_modules__ = {
473
- /***/787: /***/function _(module) {
474
- module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
475
-
476
- /***/
477
- }
478
-
479
- /******/
480
- };
481
- /************************************************************************/
482
- /******/ // The module cache
483
- /******/
484
- var __webpack_module_cache__ = {};
485
- /******/
486
- /******/ // The require function
487
- /******/
488
- function __nested_webpack_require_1465__(moduleId) {
489
- /******/ // Check if module is in cache
490
- /******/var cachedModule = __webpack_module_cache__[moduleId];
491
- /******/
492
- if (cachedModule !== undefined) {
493
- /******/return cachedModule.exports;
494
- /******/
495
- }
496
- /******/ // Create a new module (and put it into the cache)
497
- /******/
498
- var module = __webpack_module_cache__[moduleId] = {
499
- /******/ // no module.id needed
500
- /******/ // no module.loaded needed
501
- /******/exports: {}
502
- /******/
503
- };
504
- /******/
505
- /******/ // Execute the module function
506
- /******/
507
- __webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_1465__);
508
- /******/
509
- /******/ // Return the exports of the module
510
- /******/
511
- return module.exports;
512
- /******/
513
- }
514
- /******/
515
- /************************************************************************/
516
- /******/ /* webpack/runtime/compat get default export */
517
- /******/
518
- (function () {
519
- /******/ // getDefaultExport function for compatibility with non-harmony modules
520
- /******/__nested_webpack_require_1465__.n = function (module) {
521
- /******/var getter = module && module.__esModule ? /******/function () {
522
- return module['default'];
523
- } : /******/function () {
524
- return module;
525
- };
526
- /******/
527
- __nested_webpack_require_1465__.d(getter, {
528
- a: getter
529
- });
530
- /******/
531
- return getter;
532
- /******/
533
- };
534
- /******/
535
- })();
536
- /******/
537
- /******/ /* webpack/runtime/define property getters */
538
- /******/
539
- (function () {
540
- /******/ // define getter functions for harmony exports
541
- /******/__nested_webpack_require_1465__.d = function (exports, definition) {
542
- /******/for (var key in definition) {
543
- /******/if (__nested_webpack_require_1465__.o(definition, key) && !__nested_webpack_require_1465__.o(exports, key)) {
544
- /******/Object.defineProperty(exports, key, {
545
- enumerable: true,
546
- get: definition[key]
547
- });
548
- /******/
549
- }
550
- /******/
551
- }
552
- /******/
553
- };
554
- /******/
555
- })();
556
- /******/
557
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
558
- /******/
559
- (function () {
560
- /******/__nested_webpack_require_1465__.o = function (obj, prop) {
561
- return Object.prototype.hasOwnProperty.call(obj, prop);
562
- };
563
- /******/
564
- })();
565
- /******/
566
- /******/ /* webpack/runtime/make namespace object */
567
- /******/
568
- (function () {
569
- /******/ // define __esModule on exports
570
- /******/__nested_webpack_require_1465__.r = function (exports) {
571
- /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
572
- /******/Object.defineProperty(exports, Symbol.toStringTag, {
573
- value: 'Module'
574
- });
575
- /******/
576
- }
577
- /******/
578
- Object.defineProperty(exports, '__esModule', {
579
- value: true
580
- });
581
- /******/
582
- };
583
- /******/
584
- })();
585
- /******/
586
- /************************************************************************/
587
- var __webpack_exports__ = {};
588
- // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
589
- (function () {
590
- __nested_webpack_require_1465__.r(__webpack_exports__);
591
- /* harmony export */
592
- __nested_webpack_require_1465__.d(__webpack_exports__, {
593
- /* harmony export */"default": function _default() {
594
- return __WEBPACK_DEFAULT_EXPORT__;
595
- }
596
- /* harmony export */
597
- });
598
- /* harmony import */
599
- var react__WEBPACK_IMPORTED_MODULE_0__ = __nested_webpack_require_1465__(787);
600
- /* harmony import */
601
- var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nested_webpack_require_1465__.n(react__WEBPACK_IMPORTED_MODULE_0__);
602
- /**
603
- * Create an available ID
604
- *
605
- */
606
-
607
- var useComId = function useComId() {
608
- return "ID-".concat((0, react__WEBPACK_IMPORTED_MODULE_0__.useId)().replace(/\:/g, "-"));
609
- };
610
- /* harmony default export */
611
- var __WEBPACK_DEFAULT_EXPORT__ = useComId;
612
- })();
613
-
614
- /******/
615
- return __webpack_exports__;
616
- /******/
617
- }()
618
- );
619
- });
620
-
621
- /***/
622
- },
623
-
624
- /***/787: /***/function _(module) {
625
- "use strict";
626
-
627
- module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
628
-
629
- /***/
630
- }
631
-
632
- /******/
633
- };
634
- /************************************************************************/
635
- /******/ // The module cache
636
- /******/
637
- var __webpack_module_cache__ = {};
638
- /******/
639
- /******/ // The require function
640
- /******/
641
- function __nested_webpack_require_19931__(moduleId) {
642
- /******/ // Check if module is in cache
643
- /******/var cachedModule = __webpack_module_cache__[moduleId];
644
- /******/
645
- if (cachedModule !== undefined) {
646
- /******/return cachedModule.exports;
647
- /******/
648
- }
649
- /******/ // Create a new module (and put it into the cache)
650
- /******/
651
- var module = __webpack_module_cache__[moduleId] = {
652
- /******/id: moduleId,
653
- /******/loaded: false,
654
- /******/exports: {}
655
- /******/
656
- };
657
- /******/
658
- /******/ // Execute the module function
659
- /******/
660
- __webpack_modules__[moduleId].call(module.exports, module, module.exports, __nested_webpack_require_19931__);
661
- /******/
662
- /******/ // Flag the module as loaded
663
- /******/
664
- module.loaded = true;
665
- /******/
666
- /******/ // Return the exports of the module
667
- /******/
668
- return module.exports;
669
- /******/
670
- }
671
- /******/
672
- /************************************************************************/
673
- /******/ /* webpack/runtime/compat get default export */
674
- /******/
675
- (function () {
676
- /******/ // getDefaultExport function for compatibility with non-harmony modules
677
- /******/__nested_webpack_require_19931__.n = function (module) {
678
- /******/var getter = module && module.__esModule ? /******/function () {
679
- return module['default'];
680
- } : /******/function () {
681
- return module;
682
- };
683
- /******/
684
- __nested_webpack_require_19931__.d(getter, {
685
- a: getter
686
- });
687
- /******/
688
- return getter;
689
- /******/
690
- };
691
- /******/
692
- })();
693
- /******/
694
- /******/ /* webpack/runtime/define property getters */
695
- /******/
696
- (function () {
697
- /******/ // define getter functions for harmony exports
698
- /******/__nested_webpack_require_19931__.d = function (exports, definition) {
699
- /******/for (var key in definition) {
700
- /******/if (__nested_webpack_require_19931__.o(definition, key) && !__nested_webpack_require_19931__.o(exports, key)) {
701
- /******/Object.defineProperty(exports, key, {
702
- enumerable: true,
703
- get: definition[key]
704
- });
705
- /******/
706
- }
707
- /******/
708
- }
709
- /******/
710
- };
711
- /******/
712
- })();
713
- /******/
714
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
715
- /******/
716
- (function () {
717
- /******/__nested_webpack_require_19931__.o = function (obj, prop) {
718
- return Object.prototype.hasOwnProperty.call(obj, prop);
719
- };
720
- /******/
721
- })();
722
- /******/
723
- /******/ /* webpack/runtime/make namespace object */
724
- /******/
725
- (function () {
726
- /******/ // define __esModule on exports
727
- /******/__nested_webpack_require_19931__.r = function (exports) {
728
- /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
729
- /******/Object.defineProperty(exports, Symbol.toStringTag, {
730
- value: 'Module'
731
- });
732
- /******/
733
- }
734
- /******/
735
- Object.defineProperty(exports, '__esModule', {
736
- value: true
737
- });
738
- /******/
739
- };
740
- /******/
741
- })();
742
- /******/
743
- /******/ /* webpack/runtime/node module decorator */
744
- /******/
745
- (function () {
746
- /******/__nested_webpack_require_19931__.nmd = function (module) {
747
- /******/module.paths = [];
748
- /******/
749
- if (!module.children) module.children = [];
750
- /******/
751
- return module;
752
- /******/
753
- };
754
- /******/
755
- })();
756
- /******/
757
- /************************************************************************/
758
- var __webpack_exports__ = {};
759
- // This entry need to be wrapped in an IIFE because it need to be in strict mode.
760
- (function () {
761
- "use strict";
762
-
763
- __nested_webpack_require_19931__.r(__webpack_exports__);
764
- /* harmony export */
765
- __nested_webpack_require_19931__.d(__webpack_exports__, {
766
- /* harmony export */"default": function _default() {
767
- return __WEBPACK_DEFAULT_EXPORT__;
768
- }
769
- /* harmony export */
770
- });
771
- /* harmony import */
772
- var react__WEBPACK_IMPORTED_MODULE_0__ = __nested_webpack_require_19931__(787);
773
- /* harmony import */
774
- var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nested_webpack_require_19931__.n(react__WEBPACK_IMPORTED_MODULE_0__);
775
- /* harmony import */
776
- var funda_utils_dist_cjs_useComId__WEBPACK_IMPORTED_MODULE_1__ = __nested_webpack_require_19931__(85);
777
- /* harmony import */
778
- var funda_utils_dist_cjs_useComId__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__nested_webpack_require_19931__.n(funda_utils_dist_cjs_useComId__WEBPACK_IMPORTED_MODULE_1__);
779
- /* harmony import */
780
- var funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__ = __nested_webpack_require_19931__(188);
781
- /* harmony import */
782
- var funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__nested_webpack_require_19931__.n(funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__);
783
- var _excluded = ["wrapperClassName", "controlClassName", "controlExClassName", "controlGroupWrapperClassName", "controlGroupTextClassName", "appearance", "isSearchInput", "readOnly", "disabled", "required", "placeholder", "value", "label", "name", "units", "iconLeft", "iconRight", "minLength", "maxLength", "btnId", "id", "icon", "autoComplete", "autoCapitalize", "spellCheck", "style", "tabIndex", "onClick", "onKeyPressedCallback", "onSubmit", "onChange", "onBlur", "onFocus", "onPressEnter"];
784
- function _extends() {
785
- _extends = Object.assign ? Object.assign.bind() : function (target) {
786
- for (var i = 1; i < arguments.length; i++) {
787
- var source = arguments[i];
788
- for (var key in source) {
789
- if (Object.prototype.hasOwnProperty.call(source, key)) {
790
- target[key] = source[key];
791
- }
792
- }
793
- }
794
- return target;
795
- };
796
- return _extends.apply(this, arguments);
797
- }
798
- function _slicedToArray(arr, i) {
799
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
800
- }
801
- function _nonIterableRest() {
802
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
803
- }
804
- function _unsupportedIterableToArray(o, minLen) {
805
- if (!o) return;
806
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
807
- var n = Object.prototype.toString.call(o).slice(8, -1);
808
- if (n === "Object" && o.constructor) n = o.constructor.name;
809
- if (n === "Map" || n === "Set") return Array.from(o);
810
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
811
- }
812
- function _arrayLikeToArray(arr, len) {
813
- if (len == null || len > arr.length) len = arr.length;
814
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
815
- return arr2;
816
- }
817
- function _iterableToArrayLimit(arr, i) {
818
- var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
819
- if (null != _i) {
820
- var _s,
821
- _e,
822
- _x,
823
- _r,
824
- _arr = [],
825
- _n = !0,
826
- _d = !1;
827
- try {
828
- if (_x = (_i = _i.call(arr)).next, 0 === i) {
829
- if (Object(_i) !== _i) return;
830
- _n = !1;
831
- } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
832
- } catch (err) {
833
- _d = !0, _e = err;
834
- } finally {
835
- try {
836
- if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
837
- } finally {
838
- if (_d) throw _e;
839
- }
840
- }
841
- return _arr;
842
- }
843
- }
844
- function _arrayWithHoles(arr) {
845
- if (Array.isArray(arr)) return arr;
846
- }
847
- function _objectWithoutProperties(source, excluded) {
848
- if (source == null) return {};
849
- var target = _objectWithoutPropertiesLoose(source, excluded);
850
- var key, i;
851
- if (Object.getOwnPropertySymbols) {
852
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
853
- for (i = 0; i < sourceSymbolKeys.length; i++) {
854
- key = sourceSymbolKeys[i];
855
- if (excluded.indexOf(key) >= 0) continue;
856
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
857
- target[key] = source[key];
858
- }
859
- }
860
- return target;
861
- }
862
- function _objectWithoutPropertiesLoose(source, excluded) {
863
- if (source == null) return {};
864
- var target = {};
865
- var sourceKeys = Object.keys(source);
866
- var key, i;
867
- for (i = 0; i < sourceKeys.length; i++) {
868
- key = sourceKeys[i];
869
- if (excluded.indexOf(key) >= 0) continue;
870
- target[key] = source[key];
871
- }
872
- return target;
873
- }
874
- var SearchBar = /*#__PURE__*/(0, react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, externalRef) {
875
- var wrapperClassName = props.wrapperClassName,
876
- controlClassName = props.controlClassName,
877
- controlExClassName = props.controlExClassName,
878
- controlGroupWrapperClassName = props.controlGroupWrapperClassName,
879
- controlGroupTextClassName = props.controlGroupTextClassName,
880
- appearance = props.appearance,
881
- isSearchInput = props.isSearchInput,
882
- readOnly = props.readOnly,
883
- disabled = props.disabled,
884
- required = props.required,
885
- placeholder = props.placeholder,
886
- value = props.value,
887
- label = props.label,
888
- name = props.name,
889
- units = props.units,
890
- iconLeft = props.iconLeft,
891
- iconRight = props.iconRight,
892
- minLength = props.minLength,
893
- maxLength = props.maxLength,
894
- btnId = props.btnId,
895
- id = props.id,
896
- icon = props.icon,
897
- autoComplete = props.autoComplete,
898
- autoCapitalize = props.autoCapitalize,
899
- spellCheck = props.spellCheck,
900
- style = props.style,
901
- tabIndex = props.tabIndex,
902
- onClick = props.onClick,
903
- onKeyPressedCallback = props.onKeyPressedCallback,
904
- onSubmit = props.onSubmit,
905
- onChange = props.onChange,
906
- onBlur = props.onBlur,
907
- onFocus = props.onFocus,
908
- onPressEnter = props.onPressEnter,
909
- attributes = _objectWithoutProperties(props, _excluded);
910
- var uniqueID = funda_utils_dist_cjs_useComId__WEBPACK_IMPORTED_MODULE_1___default()();
911
- var idRes = id || uniqueID;
912
- var rootRef = (0, react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
913
- var _useState = (0, react__WEBPACK_IMPORTED_MODULE_0__.useState)(value || ''),
914
- _useState2 = _slicedToArray(_useState, 2),
915
- changedVal = _useState2[0],
916
- setChangedVal = _useState2[1];
917
- var _useState3 = (0, react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
918
- _useState4 = _slicedToArray(_useState3, 2),
919
- onComposition = _useState4[0],
920
- setOnComposition = _useState4[1];
921
- var propExist = function propExist(p) {
922
- return typeof p !== 'undefined' && p !== null && p !== '';
923
- };
924
- function handleComposition(event) {
925
- if (event.type === 'compositionstart') {
926
- setOnComposition(true);
927
- }
928
- if (event.type === 'compositionend') {
929
- setOnComposition(false);
930
- }
931
- }
932
- function handleClick(event) {
933
- onClick === null || onClick === void 0 ? void 0 : onClick(event);
934
- }
935
- function handleSubmit(event) {
936
- onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(event);
937
- }
938
- function handleFocus(event) {
939
- var _rootRef$current;
940
- (_rootRef$current = rootRef.current) === null || _rootRef$current === void 0 ? void 0 : _rootRef$current.classList.add('focus');
941
-
942
- //
943
- onFocus === null || onFocus === void 0 ? void 0 : onFocus(event, onComposition);
944
- }
945
- function handleChange(event) {
946
- var val = event.target.value;
947
- setChangedVal(val);
948
-
949
- //----
950
- //remove focus style
951
- if (val === '') {
952
- var _rootRef$current2;
953
- (_rootRef$current2 = rootRef.current) === null || _rootRef$current2 === void 0 ? void 0 : _rootRef$current2.classList.remove('focus');
954
- }
955
-
956
- //
957
- onChange === null || onChange === void 0 ? void 0 : onChange(event, onComposition);
958
- }
959
- function handleBlur(event) {
960
- var el = event.target;
961
- var val = event.target.value;
962
-
963
- //----
964
- //remove focus style
965
- if (val === '') {
966
- var _rootRef$current3;
967
- (_rootRef$current3 = rootRef.current) === null || _rootRef$current3 === void 0 ? void 0 : _rootRef$current3.classList.remove('focus');
968
- }
969
-
970
- //
971
- onBlur === null || onBlur === void 0 ? void 0 : onBlur(event, onComposition);
972
- }
973
- function handleKeyPressed(event) {
974
- if (typeof onKeyPressedCallback === 'function') {
975
- var newData = onKeyPressedCallback(event);
976
- if (newData) setChangedVal(newData); // Avoid the error "react checkbox changing an uncontrolled input to be controlled"
977
- }
978
-
979
- if (event.key === 'Enter' || event.key === 'NumpadEnter') {
980
- // DO NOT USE "preventDefault()"
981
- onPressEnter === null || onPressEnter === void 0 ? void 0 : onPressEnter(event, onComposition);
982
- }
983
- }
984
- (0, react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
985
- // update default value
986
- //--------------
987
- setChangedVal(value || '');
988
- }, [value]);
989
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react__WEBPACK_IMPORTED_MODULE_0___default().Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
990
- className: (0, funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.clsWrite)(wrapperClassName, 'mb-3 position-relative'),
991
- ref: rootRef
992
- }, label ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react__WEBPACK_IMPORTED_MODULE_0___default().Fragment, null, typeof label === 'string' ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("label", {
993
- htmlFor: idRes,
994
- className: "form-label",
995
- dangerouslySetInnerHTML: {
996
- __html: "".concat(label)
997
- }
998
- }) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("label", {
999
- htmlFor: idRes,
1000
- className: "form-label"
1001
- }, label)) : null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
1002
- className: (0, funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.combinedCls)('position-relative', (0, funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.clsWrite)(controlGroupWrapperClassName, 'input-group'), {
1003
- 'has-left-content': propExist(iconLeft),
1004
- 'has-right-content': propExist(iconRight) || propExist(units)
1005
- })
1006
- }, propExist(iconLeft) ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react__WEBPACK_IMPORTED_MODULE_0___default().Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {
1007
- className: (0, funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.clsWrite)(controlGroupTextClassName, 'input-group-text')
1008
- }, iconLeft)) : null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", _extends({
1009
- ref: externalRef,
1010
- tabIndex: tabIndex || 0,
1011
- type: isSearchInput ? 'search' : 'text',
1012
- className: (0, funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.combinedCls)(appearance === 'pill' ? "".concat((0, funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.clsWrite)(controlClassName, 'form-control'), " border rounded-pill") : (0, funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.clsWrite)(controlClassName, 'form-control'), controlExClassName),
1013
- id: idRes,
1014
- name: name,
1015
- placeholder: placeholder || '',
1016
- value: changedVal,
1017
- minLength: minLength || null,
1018
- maxLength: maxLength || null,
1019
- autoComplete: typeof autoComplete === 'undefined' ? 'off' : autoComplete,
1020
- autoCapitalize: typeof autoCapitalize === 'undefined' ? 'off' : autoCapitalize,
1021
- spellCheck: typeof spellCheck === 'undefined' ? false : spellCheck,
1022
- onFocus: handleFocus,
1023
- onBlur: handleBlur,
1024
- onChange: handleChange,
1025
- onClick: handleClick,
1026
- onKeyDown: handleKeyPressed,
1027
- onCompositionStart: handleComposition,
1028
- onCompositionUpdate: handleComposition,
1029
- onCompositionEnd: handleComposition,
1030
- disabled: disabled || null,
1031
- readOnly: readOnly || null,
1032
- required: required || null,
1033
- style: style
1034
- }, attributes)), propExist(units) ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react__WEBPACK_IMPORTED_MODULE_0___default().Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {
1035
- className: (0, funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.clsWrite)(controlGroupTextClassName, 'input-group-text')
1036
- }, units)) : null, propExist(iconRight) ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react__WEBPACK_IMPORTED_MODULE_0___default().Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {
1037
- className: (0, funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.clsWrite)(controlGroupTextClassName, 'input-group-text')
1038
- }, iconRight)) : null, icon || icon !== '' ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react__WEBPACK_IMPORTED_MODULE_0___default().Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {
1039
- className: appearance === 'pill' ? 'position-absolute end-0' : 'input-group-text m-0 p-0 border-start-0',
1040
- style: appearance === 'pill' ? {
1041
- zIndex: 5
1042
- } : {}
1043
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
1044
- id: btnId,
1045
- type: "button",
1046
- className: appearance === 'pill' ? 'btn border-end-0 rounded-pill' : 'btn btn-sm',
1047
- onClick: handleSubmit
1048
- }, icon ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react__WEBPACK_IMPORTED_MODULE_0___default().Fragment, null, icon) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react__WEBPACK_IMPORTED_MODULE_0___default().Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
1049
- width: "1.2em",
1050
- height: "1.2em",
1051
- fill: "#333",
1052
- viewBox: "0 0 16 16"
1053
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
1054
- d: "M12.027 9.92L16 13.95 14 16l-4.075-3.976A6.465 6.465 0 0 1 6.5 13C2.91 13 0 10.083 0 6.5 0 2.91 2.917 0 6.5 0 10.09 0 13 2.917 13 6.5a6.463 6.463 0 0 1-.973 3.42zM1.997 6.452c0 2.48 2.014 4.5 4.5 4.5 2.48 0 4.5-2.015 4.5-4.5 0-2.48-2.015-4.5-4.5-4.5-2.48 0-4.5 2.014-4.5 4.5z",
1055
- fillRule: "evenodd"
1056
- })))))) : null)));
1057
- });
1058
- /* harmony default export */
1059
- var __WEBPACK_DEFAULT_EXPORT__ = SearchBar;
1060
- })();
1061
-
1062
- /******/
1063
- return __webpack_exports__;
1064
- /******/
1065
- }()
1066
- );
1067
- });
1068
-
1069
- /***/ }),
1070
-
1071
- /***/ 188:
1072
- /***/ (function(module, exports, __webpack_require__) {
1073
-
1074
- /* module decorator */ module = __webpack_require__.nmd(module);
1075
- 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); }
1076
- (function webpackUniversalModuleDefinition(root, factory) {
1077
- 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),
1078
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
1079
- (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
1080
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
1081
- })(this, function () {
1082
- return (/******/function () {
1083
- // webpackBootstrap
1084
- /******/
1085
- "use strict";
1086
-
1087
- /******/ // The require scope
1088
- /******/
1089
- var __nested_webpack_require_993__ = {};
1090
- /******/
1091
- /************************************************************************/
1092
- /******/ /* webpack/runtime/define property getters */
1093
- /******/
1094
- (function () {
1095
- /******/ // define getter functions for harmony exports
1096
- /******/__nested_webpack_require_993__.d = function (exports, definition) {
1097
- /******/for (var key in definition) {
1098
- /******/if (__nested_webpack_require_993__.o(definition, key) && !__nested_webpack_require_993__.o(exports, key)) {
1099
- /******/Object.defineProperty(exports, key, {
1100
- enumerable: true,
1101
- get: definition[key]
1102
- });
1103
- /******/
1104
- }
1105
- /******/
1106
- }
1107
- /******/
1108
- };
1109
- /******/
1110
- })();
1111
- /******/
1112
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
1113
- /******/
1114
- (function () {
1115
- /******/__nested_webpack_require_993__.o = function (obj, prop) {
1116
- return Object.prototype.hasOwnProperty.call(obj, prop);
1117
- };
1118
- /******/
1119
- })();
1120
- /******/
1121
- /******/ /* webpack/runtime/make namespace object */
1122
- /******/
1123
- (function () {
1124
- /******/ // define __esModule on exports
1125
- /******/__nested_webpack_require_993__.r = function (exports) {
1126
- /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
1127
- /******/Object.defineProperty(exports, Symbol.toStringTag, {
1128
- value: 'Module'
1129
- });
1130
- /******/
1131
- }
1132
- /******/
1133
- Object.defineProperty(exports, '__esModule', {
1134
- value: true
1135
- });
1136
- /******/
1137
- };
1138
- /******/
1139
- })();
1140
- /******/
1141
- /************************************************************************/
1142
- var __webpack_exports__ = {};
1143
- __nested_webpack_require_993__.r(__webpack_exports__);
1144
- /* harmony export */
1145
- __nested_webpack_require_993__.d(__webpack_exports__, {
1146
- /* harmony export */"clsWrite": function clsWrite() {
1147
- return (/* binding */_clsWrite
1148
- );
1149
- },
1150
- /* harmony export */"combinedCls": function combinedCls() {
1151
- return (/* binding */_combinedCls
1152
- );
1153
- }
1154
- /* harmony export */
1155
- });
1156
- function _slicedToArray(arr, i) {
1157
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
1158
- }
1159
- function _nonIterableRest() {
1160
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1161
- }
1162
- function _unsupportedIterableToArray(o, minLen) {
1163
- if (!o) return;
1164
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
1165
- var n = Object.prototype.toString.call(o).slice(8, -1);
1166
- if (n === "Object" && o.constructor) n = o.constructor.name;
1167
- if (n === "Map" || n === "Set") return Array.from(o);
1168
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
1169
- }
1170
- function _arrayLikeToArray(arr, len) {
1171
- if (len == null || len > arr.length) len = arr.length;
1172
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
1173
- return arr2;
1174
- }
1175
- function _iterableToArrayLimit(arr, i) {
1176
- var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
1177
- if (null != _i) {
1178
- var _s,
1179
- _e,
1180
- _x,
1181
- _r,
1182
- _arr = [],
1183
- _n = !0,
1184
- _d = !1;
1185
- try {
1186
- if (_x = (_i = _i.call(arr)).next, 0 === i) {
1187
- if (Object(_i) !== _i) return;
1188
- _n = !1;
1189
- } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
1190
- } catch (err) {
1191
- _d = !0, _e = err;
1192
- } finally {
1193
- try {
1194
- if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
1195
- } finally {
1196
- if (_d) throw _e;
1197
- }
1198
- }
1199
- return _arr;
1200
- }
1201
- }
1202
- function _arrayWithHoles(arr) {
1203
- if (Array.isArray(arr)) return arr;
1204
- }
1205
- function _typeof(obj) {
1206
- "@babel/helpers - typeof";
1207
-
1208
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
1209
- return typeof obj;
1210
- } : function (obj) {
1211
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
1212
- }, _typeof(obj);
1213
- }
1214
- /**
1215
- * Output of class name
1216
- * @param {*} s - Any
1217
- * @param {String} defaultCls - Default string
1218
- * @param {?*} targetCls - Any
1219
- * @returns {*}
1220
- */
1221
- function _clsWrite(s, defaultCls) {
1222
- var targetCls = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
1223
- return s || s === '' ? typeof targetCls === 'undefined' ? s : targetCls : defaultCls;
1224
- }
1225
-
1226
- /**
1227
- * Combined classnames
1228
- * @param {*} args
1229
- * @returns {String|undefined}
1230
- */
1231
- /* Usage:
1232
-
1233
- console.log(combinedCls('a-1', 'a-2', 'a-3', {
1234
- 'p-1': null,
1235
- 'p-2': undefined,
1236
- 'p-3': true,
1237
- 'p-4': false,
1238
- 'p-5': 'kkk',
1239
- 'p-6': 0,
1240
- 'p-7': 1,
1241
- 'p-8': '',
1242
- undefined
1243
- })); // a-1 a-2 a-3 p-3 p-5 p-7
1244
- */
1245
- function _combinedCls() {
1246
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1247
- args[_key] = arguments[_key];
1248
- }
1249
- if (args) {
1250
- var classes = [];
1251
- for (var i = 0; i < args.length; i++) {
1252
- var className = args[i];
1253
- if (!className) {
1254
- continue;
1255
- }
1256
- var type = _typeof(className);
1257
- if (type === 'string' || type === 'number') {
1258
- classes.push(className);
1259
- } else if (type === 'object') {
1260
- var _classes = Array.isArray(className) ? className : Object.entries(className).map(function (_ref) {
1261
- var _ref2 = _slicedToArray(_ref, 2),
1262
- key = _ref2[0],
1263
- value = _ref2[1];
1264
- return value ? key : null;
1265
- });
1266
- classes = _classes.length ? classes.concat(_classes.filter(function (c) {
1267
- return !!c;
1268
- })) : classes;
1269
- }
1270
- }
1271
- return classes.join(' ').trim();
1272
- }
1273
- return undefined;
1274
- }
1275
-
1276
- /******/
1277
- return __webpack_exports__;
1278
- /******/
1279
- }()
1280
- );
1281
- });
1282
-
1283
- /***/ }),
1284
-
1285
- /***/ 767:
1286
- /***/ (function(module, exports, __webpack_require__) {
1287
-
1288
- /* module decorator */ module = __webpack_require__.nmd(module);
1289
- 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); }
1290
- (function webpackUniversalModuleDefinition(root, factory) {
1291
- 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),
1292
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
1293
- (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
1294
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
1295
- })(this, function () {
1296
- return (/******/function () {
1297
- // webpackBootstrap
1298
- /******/
1299
- "use strict";
1300
-
1301
- /******/ // The require scope
1302
- /******/
1303
- var __nested_webpack_require_993__ = {};
1304
- /******/
1305
- /************************************************************************/
1306
- /******/ /* webpack/runtime/define property getters */
1307
- /******/
1308
- (function () {
1309
- /******/ // define getter functions for harmony exports
1310
- /******/__nested_webpack_require_993__.d = function (exports, definition) {
1311
- /******/for (var key in definition) {
1312
- /******/if (__nested_webpack_require_993__.o(definition, key) && !__nested_webpack_require_993__.o(exports, key)) {
1313
- /******/Object.defineProperty(exports, key, {
1314
- enumerable: true,
1315
- get: definition[key]
1316
- });
1317
- /******/
1318
- }
1319
- /******/
1320
- }
1321
- /******/
1322
- };
1323
- /******/
1324
- })();
1325
- /******/
1326
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
1327
- /******/
1328
- (function () {
1329
- /******/__nested_webpack_require_993__.o = function (obj, prop) {
1330
- return Object.prototype.hasOwnProperty.call(obj, prop);
1331
- };
1332
- /******/
1333
- })();
1334
- /******/
1335
- /******/ /* webpack/runtime/make namespace object */
1336
- /******/
1337
- (function () {
1338
- /******/ // define __esModule on exports
1339
- /******/__nested_webpack_require_993__.r = function (exports) {
1340
- /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
1341
- /******/Object.defineProperty(exports, Symbol.toStringTag, {
1342
- value: 'Module'
1343
- });
1344
- /******/
1345
- }
1346
- /******/
1347
- Object.defineProperty(exports, '__esModule', {
1348
- value: true
1349
- });
1350
- /******/
1351
- };
1352
- /******/
1353
- })();
1354
- /******/
1355
- /************************************************************************/
1356
- var __webpack_exports__ = {};
1357
- __nested_webpack_require_993__.r(__webpack_exports__);
1358
- /* harmony export */
1359
- __nested_webpack_require_993__.d(__webpack_exports__, {
1360
- /* harmony export */"getAbsoluteCoordinates": function getAbsoluteCoordinates() {
1361
- return (/* binding */_getAbsoluteCoordinates
1362
- );
1363
- },
1364
- /* harmony export */"getAbsolutePositionOfStage": function getAbsolutePositionOfStage() {
1365
- return (/* binding */_getAbsolutePositionOfStage
1366
- );
1367
- },
1368
- /* harmony export */"getOffset": function getOffset() {
1369
- return (/* binding */_getOffset
1370
- );
1371
- },
1372
- /* harmony export */"getPosition": function getPosition() {
1373
- return (/* binding */_getPosition
1374
- );
1375
- },
1376
- /* harmony export */"getTransitionDuration": function getTransitionDuration() {
1377
- return (/* binding */_getTransitionDuration
1378
- );
1379
- }
1380
- /* harmony export */
1381
- });
1382
- function _typeof(obj) {
1383
- "@babel/helpers - typeof";
1384
-
1385
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
1386
- return typeof obj;
1387
- } : function (obj) {
1388
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
1389
- }, _typeof(obj);
1390
- }
1391
- /**
1392
- * Get the -webkit-transition-duration property
1393
- *
1394
- * @param {HTMLElement} el - A DOM node containing one selector to match against.
1395
- * @return {number} - Returns a pure number.
1396
- */
1397
- function _getTransitionDuration(el) {
1398
- if (_typeof(el) === ( true ? "undefined" : 0)) {
1399
- return 0;
1400
- }
1401
- var style = window.getComputedStyle(el),
1402
- duration = style.webkitTransitionDuration,
1403
- delay = style.webkitTransitionDelay;
1404
- if (_typeof(duration) != ( true ? "undefined" : 0)) {
1405
- // fix miliseconds vs seconds
1406
- duration = duration.indexOf("ms") > -1 ? parseFloat(duration) : parseFloat(duration) * 1000;
1407
- delay = delay.indexOf("ms") > -1 ? parseFloat(delay) : parseFloat(delay) * 1000;
1408
- return duration;
1409
- } else {
1410
- return 0;
1411
- }
1412
- }
1413
-
1414
- /**
1415
- * Get an object's absolute position on the page
1416
- *
1417
- * @param {HTMLElement} el - A DOM node containing one selector to match against.
1418
- * @return {Json} - An object containing the properties top and left.
1419
- */
1420
- function _getAbsoluteCoordinates(el) {
1421
- var windowWidth = window.innerWidth,
1422
- leftPos = null,
1423
- topPos = null;
1424
- var pEl = el.parentElement;
1425
- if (!document.getElementsByTagName('body')[0].className.match(/rtl/)) {
1426
- leftPos = el.offsetLeft == 0 ? pEl.offsetLeft : el.offsetLeft;
1427
- topPos = el.offsetTop == 0 ? pEl.offsetTop : el.offsetTop;
1428
- } else {
1429
- // width and height in pixels, including padding and border
1430
- // Corresponds to outerWidth(), outerHeight()
1431
- leftPos = el.offsetLeft == 0 ? windowWidth - (pEl.offsetLeft + pEl.offsetWidth) : windowWidth - (el.offsetLeft + el.offsetWidth);
1432
- topPos = el.offsetTop == 0 ? windowWidth - (pEl.offsetTop + pEl.offsetHeight) : windowWidth - (el.offsetTop + el.offsetHeight);
1433
- }
1434
- return {
1435
- 'left': leftPos,
1436
- 'top': topPos
1437
- };
1438
- }
1439
-
1440
- /**
1441
- * Get the current coordinates of the first element in the set of matched elements, relative to the document.
1442
- *
1443
- * @param {Element} el - A DOM node containing one selector to match against.
1444
- * @return {Json} - An object containing the properties top and left.
1445
- */
1446
- function _getOffset(el) {
1447
- var res = {
1448
- top: 0,
1449
- left: 0
1450
- };
1451
- var box = el.getBoundingClientRect();
1452
- var top = 0,
1453
- left = 0;
1454
-
1455
- //Include scrollbar and border
1456
- top = box.top + window.pageYOffset - document.documentElement.clientTop;
1457
- left = box.left + window.pageXOffset - document.documentElement.clientLeft;
1458
- res = {
1459
- top: top,
1460
- left: left
1461
- };
1462
- return res;
1463
- }
1464
-
1465
- /**
1466
- * Get the current coordinates of the first element in the set of matched elements, relative to the offset parent.
1467
- *
1468
- * @param {HTMLElement} el - A DOM node containing one selector to match against.
1469
- * @return {Json} - An object containing the properties top and left.
1470
- */
1471
- function _getPosition(el) {
1472
- var res = {
1473
- top: 0,
1474
- left: 0
1475
- };
1476
- var top = el.offsetTop ? el.offsetTop : 0,
1477
- left = el.offsetLeft ? el.offsetLeft : 0;
1478
- res = {
1479
- top: top,
1480
- left: left
1481
- };
1482
- return res;
1483
- }
1484
-
1485
- /**
1486
- * Get the absolute position of the stage element
1487
- *
1488
- * @param {HTMLElement} domElement - A DOM node
1489
- * @param {Number | string} left - left offset
1490
- * @param {Number | string} top - top offset
1491
- * @returns
1492
- */
1493
- function _getAbsolutePositionOfStage(domElement) {
1494
- var left = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
1495
- var top = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
1496
- if (!parseInt(left)) {
1497
- left = 0;
1498
- } else {
1499
- left = parseInt(left);
1500
- }
1501
- if (!parseInt(top)) {
1502
- top = 0;
1503
- } else {
1504
- top = parseInt(top);
1505
- }
1506
- var box = domElement.getBoundingClientRect();
1507
- var body = document.body;
1508
- var docElem = document.documentElement;
1509
- var scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;
1510
- var scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;
1511
- var clientTop = docElem.clientTop || body.clientTop || 0;
1512
- var clientLeft = docElem.clientLeft || body.clientLeft || 0;
1513
- var attr = {};
1514
- attr.y = box.top + scrollTop - clientTop + top;
1515
- attr.x = box.left + scrollLeft - clientLeft + left;
1516
- attr.width = box.width;
1517
- attr.height = box.height;
1518
- return attr;
1519
- }
1520
-
1521
- /******/
1522
- return __webpack_exports__;
1523
- /******/
1524
- }()
1525
- );
1526
- });
1527
-
1528
- /***/ }),
1529
-
1530
- /***/ 761:
1531
- /***/ (function(module, exports, __webpack_require__) {
1532
-
1533
- /* module decorator */ module = __webpack_require__.nmd(module);
1534
- 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); }
1535
- (function webpackUniversalModuleDefinition(root, factory) {
1536
- 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),
1537
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
1538
- (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
1539
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
1540
- })(this, function (__WEBPACK_EXTERNAL_MODULE__787__) {
1541
- return (/******/function () {
1542
- // webpackBootstrap
1543
- /******/
1544
- "use strict";
1545
-
1546
- /******/
1547
- var __webpack_modules__ = {
1548
- /***/787: /***/function _(module) {
1549
- module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
1550
-
1551
- /***/
1552
- }
1553
-
1554
- /******/
1555
- };
1556
- /************************************************************************/
1557
- /******/ // The module cache
1558
- /******/
1559
- var __webpack_module_cache__ = {};
1560
- /******/
1561
- /******/ // The require function
1562
- /******/
1563
- function __nested_webpack_require_1465__(moduleId) {
1564
- /******/ // Check if module is in cache
1565
- /******/var cachedModule = __webpack_module_cache__[moduleId];
1566
- /******/
1567
- if (cachedModule !== undefined) {
1568
- /******/return cachedModule.exports;
1569
- /******/
1570
- }
1571
- /******/ // Create a new module (and put it into the cache)
1572
- /******/
1573
- var module = __webpack_module_cache__[moduleId] = {
1574
- /******/ // no module.id needed
1575
- /******/ // no module.loaded needed
1576
- /******/exports: {}
1577
- /******/
1578
- };
1579
- /******/
1580
- /******/ // Execute the module function
1581
- /******/
1582
- __webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_1465__);
1583
- /******/
1584
- /******/ // Return the exports of the module
1585
- /******/
1586
- return module.exports;
1587
- /******/
1588
- }
1589
- /******/
1590
- /************************************************************************/
1591
- /******/ /* webpack/runtime/compat get default export */
1592
- /******/
1593
- (function () {
1594
- /******/ // getDefaultExport function for compatibility with non-harmony modules
1595
- /******/__nested_webpack_require_1465__.n = function (module) {
1596
- /******/var getter = module && module.__esModule ? /******/function () {
1597
- return module['default'];
1598
- } : /******/function () {
1599
- return module;
1600
- };
1601
- /******/
1602
- __nested_webpack_require_1465__.d(getter, {
1603
- a: getter
1604
- });
1605
- /******/
1606
- return getter;
1607
- /******/
1608
- };
1609
- /******/
1610
- })();
1611
- /******/
1612
- /******/ /* webpack/runtime/define property getters */
1613
- /******/
1614
- (function () {
1615
- /******/ // define getter functions for harmony exports
1616
- /******/__nested_webpack_require_1465__.d = function (exports, definition) {
1617
- /******/for (var key in definition) {
1618
- /******/if (__nested_webpack_require_1465__.o(definition, key) && !__nested_webpack_require_1465__.o(exports, key)) {
1619
- /******/Object.defineProperty(exports, key, {
1620
- enumerable: true,
1621
- get: definition[key]
1622
- });
1623
- /******/
1624
- }
1625
- /******/
1626
- }
1627
- /******/
1628
- };
1629
- /******/
1630
- })();
1631
- /******/
1632
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
1633
- /******/
1634
- (function () {
1635
- /******/__nested_webpack_require_1465__.o = function (obj, prop) {
1636
- return Object.prototype.hasOwnProperty.call(obj, prop);
1637
- };
1638
- /******/
1639
- })();
1640
- /******/
1641
- /******/ /* webpack/runtime/make namespace object */
1642
- /******/
1643
- (function () {
1644
- /******/ // define __esModule on exports
1645
- /******/__nested_webpack_require_1465__.r = function (exports) {
1646
- /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
1647
- /******/Object.defineProperty(exports, Symbol.toStringTag, {
1648
- value: 'Module'
1649
- });
1650
- /******/
1651
- }
1652
- /******/
1653
- Object.defineProperty(exports, '__esModule', {
1654
- value: true
1655
- });
1656
- /******/
1657
- };
1658
- /******/
1659
- })();
1660
- /******/
1661
- /************************************************************************/
1662
- var __webpack_exports__ = {};
1663
- // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
1664
- (function () {
1665
- __nested_webpack_require_1465__.r(__webpack_exports__);
1666
- /* harmony export */
1667
- __nested_webpack_require_1465__.d(__webpack_exports__, {
1668
- /* harmony export */"default": function _default() {
1669
- return __WEBPACK_DEFAULT_EXPORT__;
1670
- }
1671
- /* harmony export */
1672
- });
1673
- /* harmony import */
1674
- var react__WEBPACK_IMPORTED_MODULE_0__ = __nested_webpack_require_1465__(787);
1675
- /* harmony import */
1676
- var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nested_webpack_require_1465__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1677
- function _toConsumableArray(arr) {
1678
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
1679
- }
1680
- function _nonIterableSpread() {
1681
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1682
- }
1683
- function _unsupportedIterableToArray(o, minLen) {
1684
- if (!o) return;
1685
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
1686
- var n = Object.prototype.toString.call(o).slice(8, -1);
1687
- if (n === "Object" && o.constructor) n = o.constructor.name;
1688
- if (n === "Map" || n === "Set") return Array.from(o);
1689
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
1690
- }
1691
- function _iterableToArray(iter) {
1692
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
1693
- }
1694
- function _arrayWithoutHoles(arr) {
1695
- if (Array.isArray(arr)) return _arrayLikeToArray(arr);
1696
- }
1697
- function _arrayLikeToArray(arr, len) {
1698
- if (len == null || len > arr.length) len = arr.length;
1699
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
1700
- return arr2;
1701
- }
1702
- /**
1703
- * Handles the event of clicking outside of the wrapped component
1704
- *
1705
- * @usage:
1706
-
1707
- const App = () => {
1708
-
1709
- const [show, setShow] = useState<boolean>(false);
1710
- const dropdownRef = useRef<HTMLDivElement>(null);
1711
-
1712
- useClickOutside({
1713
- enabled: show && dropdownRef.current,
1714
- isOutside: (event: any) => {
1715
- return event.target.closest(`.test__wrapper`) === null && event.target.closest(`.test__wrapper2`) === null;
1716
- },
1717
- handle: (event: any) => {
1718
- // do something
1719
- //...
1720
- },
1721
- spyElement: document
1722
- }, [show, dropdownRef]);
1723
- };
1724
-
1725
- */
1726
-
1727
- function useClickOutside(_ref, deps) {
1728
- var enabled = _ref.enabled,
1729
- isOutside = _ref.isOutside,
1730
- handle = _ref.handle,
1731
- _ref$spyElement = _ref.spyElement,
1732
- spyElement = _ref$spyElement === void 0 ? typeof document === 'undefined' ? null : document : _ref$spyElement;
1733
- var isOutsideRef = (0, react__WEBPACK_IMPORTED_MODULE_0__.useRef)(isOutside);
1734
- var handleRef = (0, react__WEBPACK_IMPORTED_MODULE_0__.useRef)(handle);
1735
- (0, react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
1736
- isOutsideRef.current = isOutside;
1737
-
1738
- // fix possible issue if clicking on a focusable element
1739
- handleRef.current = handle;
1740
- }, [isOutside, handle]);
1741
- (0, react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
1742
- if (enabled) {
1743
- var eventHandler = function eventHandler(event) {
1744
- var _isOutsideRef$current;
1745
- if ((_isOutsideRef$current = isOutsideRef.current) !== null && _isOutsideRef$current !== void 0 && _isOutsideRef$current.call(isOutsideRef, event)) {
1746
- var _handleRef$current;
1747
- (_handleRef$current = handleRef.current) === null || _handleRef$current === void 0 ? void 0 : _handleRef$current.call(handleRef, event);
1748
- }
1749
- };
1750
- spyElement === null || spyElement === void 0 ? void 0 : spyElement.addEventListener('pointerdown', eventHandler);
1751
- return function () {
1752
- spyElement === null || spyElement === void 0 ? void 0 : spyElement.removeEventListener('pointerdown', eventHandler);
1753
- };
1754
- }
1755
- }, [enabled].concat(_toConsumableArray(deps)));
1756
- }
1757
- /* harmony default export */
1758
- var __WEBPACK_DEFAULT_EXPORT__ = useClickOutside;
1759
- })();
1760
-
1761
- /******/
1762
- return __webpack_exports__;
1763
- /******/
1764
- }()
1765
- );
1766
- });
1767
-
1768
- /***/ }),
1769
-
1770
- /***/ 85:
1771
- /***/ (function(module, exports, __webpack_require__) {
1772
-
1773
- /* module decorator */ module = __webpack_require__.nmd(module);
1774
- 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); }
1775
- (function webpackUniversalModuleDefinition(root, factory) {
1776
- 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),
1777
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
1778
- (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
1779
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
1780
- })(this, function (__WEBPACK_EXTERNAL_MODULE__787__) {
1781
- return (/******/function () {
1782
- // webpackBootstrap
1783
- /******/
1784
- "use strict";
1785
-
1786
- /******/
1787
- var __webpack_modules__ = {
1788
- /***/787: /***/function _(module) {
1789
- module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
1790
-
1791
- /***/
1792
- }
1793
-
1794
- /******/
1795
- };
1796
- /************************************************************************/
1797
- /******/ // The module cache
1798
- /******/
1799
- var __webpack_module_cache__ = {};
1800
- /******/
1801
- /******/ // The require function
1802
- /******/
1803
- function __nested_webpack_require_1465__(moduleId) {
1804
- /******/ // Check if module is in cache
1805
- /******/var cachedModule = __webpack_module_cache__[moduleId];
1806
- /******/
1807
- if (cachedModule !== undefined) {
1808
- /******/return cachedModule.exports;
1809
- /******/
1810
- }
1811
- /******/ // Create a new module (and put it into the cache)
1812
- /******/
1813
- var module = __webpack_module_cache__[moduleId] = {
1814
- /******/ // no module.id needed
1815
- /******/ // no module.loaded needed
1816
- /******/exports: {}
1817
- /******/
1818
- };
1819
- /******/
1820
- /******/ // Execute the module function
1821
- /******/
1822
- __webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_1465__);
1823
- /******/
1824
- /******/ // Return the exports of the module
1825
- /******/
1826
- return module.exports;
1827
- /******/
1828
- }
1829
- /******/
1830
- /************************************************************************/
1831
- /******/ /* webpack/runtime/compat get default export */
1832
- /******/
1833
- (function () {
1834
- /******/ // getDefaultExport function for compatibility with non-harmony modules
1835
- /******/__nested_webpack_require_1465__.n = function (module) {
1836
- /******/var getter = module && module.__esModule ? /******/function () {
1837
- return module['default'];
1838
- } : /******/function () {
1839
- return module;
1840
- };
1841
- /******/
1842
- __nested_webpack_require_1465__.d(getter, {
1843
- a: getter
1844
- });
1845
- /******/
1846
- return getter;
1847
- /******/
1848
- };
1849
- /******/
1850
- })();
1851
- /******/
1852
- /******/ /* webpack/runtime/define property getters */
1853
- /******/
1854
- (function () {
1855
- /******/ // define getter functions for harmony exports
1856
- /******/__nested_webpack_require_1465__.d = function (exports, definition) {
1857
- /******/for (var key in definition) {
1858
- /******/if (__nested_webpack_require_1465__.o(definition, key) && !__nested_webpack_require_1465__.o(exports, key)) {
1859
- /******/Object.defineProperty(exports, key, {
1860
- enumerable: true,
1861
- get: definition[key]
1862
- });
1863
- /******/
1864
- }
1865
- /******/
1866
- }
1867
- /******/
1868
- };
1869
- /******/
1870
- })();
1871
- /******/
1872
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
1873
- /******/
1874
- (function () {
1875
- /******/__nested_webpack_require_1465__.o = function (obj, prop) {
1876
- return Object.prototype.hasOwnProperty.call(obj, prop);
1877
- };
1878
- /******/
1879
- })();
1880
- /******/
1881
- /******/ /* webpack/runtime/make namespace object */
1882
- /******/
1883
- (function () {
1884
- /******/ // define __esModule on exports
1885
- /******/__nested_webpack_require_1465__.r = function (exports) {
1886
- /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
1887
- /******/Object.defineProperty(exports, Symbol.toStringTag, {
1888
- value: 'Module'
1889
- });
1890
- /******/
1891
- }
1892
- /******/
1893
- Object.defineProperty(exports, '__esModule', {
1894
- value: true
1895
- });
1896
- /******/
1897
- };
1898
- /******/
1899
- })();
1900
- /******/
1901
- /************************************************************************/
1902
- var __webpack_exports__ = {};
1903
- // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
1904
- (function () {
1905
- __nested_webpack_require_1465__.r(__webpack_exports__);
1906
- /* harmony export */
1907
- __nested_webpack_require_1465__.d(__webpack_exports__, {
1908
- /* harmony export */"default": function _default() {
1909
- return __WEBPACK_DEFAULT_EXPORT__;
1910
- }
1911
- /* harmony export */
1912
- });
1913
- /* harmony import */
1914
- var react__WEBPACK_IMPORTED_MODULE_0__ = __nested_webpack_require_1465__(787);
1915
- /* harmony import */
1916
- var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nested_webpack_require_1465__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1917
- /**
1918
- * Create an available ID
1919
- *
1920
- */
1921
-
1922
- var useComId = function useComId() {
1923
- return "ID-".concat((0, react__WEBPACK_IMPORTED_MODULE_0__.useId)().replace(/\:/g, "-"));
1924
- };
1925
- /* harmony default export */
1926
- var __WEBPACK_DEFAULT_EXPORT__ = useComId;
1927
- })();
1928
-
1929
- /******/
1930
- return __webpack_exports__;
1931
- /******/
1932
- }()
1933
- );
1934
- });
1935
-
1936
- /***/ }),
1937
-
1938
- /***/ 702:
1939
- /***/ (function(module, exports, __webpack_require__) {
1940
-
1941
- /* module decorator */ module = __webpack_require__.nmd(module);
1942
- 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); }
1943
- (function webpackUniversalModuleDefinition(root, factory) {
1944
- 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),
1945
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
1946
- (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
1947
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
1948
- })(this, function (__WEBPACK_EXTERNAL_MODULE__787__) {
1949
- return (/******/function () {
1950
- // webpackBootstrap
1951
- /******/
1952
- "use strict";
1953
-
1954
- /******/
1955
- var __webpack_modules__ = {
1956
- /***/787: /***/function _(module) {
1957
- module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
1958
-
1959
- /***/
1960
- }
1961
-
1962
- /******/
1963
- };
1964
- /************************************************************************/
1965
- /******/ // The module cache
1966
- /******/
1967
- var __webpack_module_cache__ = {};
1968
- /******/
1969
- /******/ // The require function
1970
- /******/
1971
- function __nested_webpack_require_1465__(moduleId) {
1972
- /******/ // Check if module is in cache
1973
- /******/var cachedModule = __webpack_module_cache__[moduleId];
1974
- /******/
1975
- if (cachedModule !== undefined) {
1976
- /******/return cachedModule.exports;
1977
- /******/
1978
- }
1979
- /******/ // Create a new module (and put it into the cache)
1980
- /******/
1981
- var module = __webpack_module_cache__[moduleId] = {
1982
- /******/ // no module.id needed
1983
- /******/ // no module.loaded needed
1984
- /******/exports: {}
1985
- /******/
1986
- };
1987
- /******/
1988
- /******/ // Execute the module function
1989
- /******/
1990
- __webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_1465__);
1991
- /******/
1992
- /******/ // Return the exports of the module
1993
- /******/
1994
- return module.exports;
1995
- /******/
1996
- }
1997
- /******/
1998
- /************************************************************************/
1999
- /******/ /* webpack/runtime/compat get default export */
2000
- /******/
2001
- (function () {
2002
- /******/ // getDefaultExport function for compatibility with non-harmony modules
2003
- /******/__nested_webpack_require_1465__.n = function (module) {
2004
- /******/var getter = module && module.__esModule ? /******/function () {
2005
- return module['default'];
2006
- } : /******/function () {
2007
- return module;
2008
- };
2009
- /******/
2010
- __nested_webpack_require_1465__.d(getter, {
2011
- a: getter
2012
- });
2013
- /******/
2014
- return getter;
2015
- /******/
2016
- };
2017
- /******/
2018
- })();
2019
- /******/
2020
- /******/ /* webpack/runtime/define property getters */
2021
- /******/
2022
- (function () {
2023
- /******/ // define getter functions for harmony exports
2024
- /******/__nested_webpack_require_1465__.d = function (exports, definition) {
2025
- /******/for (var key in definition) {
2026
- /******/if (__nested_webpack_require_1465__.o(definition, key) && !__nested_webpack_require_1465__.o(exports, key)) {
2027
- /******/Object.defineProperty(exports, key, {
2028
- enumerable: true,
2029
- get: definition[key]
2030
- });
2031
- /******/
2032
- }
2033
- /******/
2034
- }
2035
- /******/
2036
- };
2037
- /******/
2038
- })();
2039
- /******/
2040
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
2041
- /******/
2042
- (function () {
2043
- /******/__nested_webpack_require_1465__.o = function (obj, prop) {
2044
- return Object.prototype.hasOwnProperty.call(obj, prop);
2045
- };
2046
- /******/
2047
- })();
2048
- /******/
2049
- /******/ /* webpack/runtime/make namespace object */
2050
- /******/
2051
- (function () {
2052
- /******/ // define __esModule on exports
2053
- /******/__nested_webpack_require_1465__.r = function (exports) {
2054
- /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
2055
- /******/Object.defineProperty(exports, Symbol.toStringTag, {
2056
- value: 'Module'
2057
- });
2058
- /******/
2059
- }
2060
- /******/
2061
- Object.defineProperty(exports, '__esModule', {
2062
- value: true
2063
- });
2064
- /******/
2065
- };
2066
- /******/
2067
- })();
2068
- /******/
2069
- /************************************************************************/
2070
- var __webpack_exports__ = {};
2071
- // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
2072
- (function () {
2073
- __nested_webpack_require_1465__.r(__webpack_exports__);
2074
- /* harmony export */
2075
- __nested_webpack_require_1465__.d(__webpack_exports__, {
2076
- /* harmony export */"default": function _default() {
2077
- return __WEBPACK_DEFAULT_EXPORT__;
2078
- }
2079
- /* harmony export */
2080
- });
2081
- /* harmony import */
2082
- var react__WEBPACK_IMPORTED_MODULE_0__ = __nested_webpack_require_1465__(787);
2083
- /* harmony import */
2084
- var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nested_webpack_require_1465__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2085
- /**
2086
- * Delay the execution of function or state update
2087
- *
2088
- * @usage:
2089
-
2090
- const App = () => {
2091
- const [count, setCount] = useState(0);
2092
- const handleClick = useDebounce(() => setCount(count + 1), 500, [count]);
2093
-
2094
- return (
2095
- <div className="app">
2096
- <button onClick={handleClick}>click</button>
2097
- <p>click {count} time</p>
2098
- </div>
2099
- );
2100
- };
2101
-
2102
- */
2103
-
2104
- var useDebounce = function useDebounce(fn, delay, dependence) {
2105
- var ref = (0, react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
2106
- return (0, react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
2107
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
2108
- args[_key] = arguments[_key];
2109
- }
2110
- clearTimeout(ref.current);
2111
- ref.current = null;
2112
- ref.current = setTimeout(function () {
2113
- fn.apply(void 0, args);
2114
- }, delay);
2115
- }, dependence);
2116
- };
2117
- /* harmony default export */
2118
- var __WEBPACK_DEFAULT_EXPORT__ = useDebounce;
2119
- })();
2120
-
2121
- /******/
2122
- return __webpack_exports__;
2123
- /******/
2124
- }()
2125
- );
2126
- });
2127
-
2128
- /***/ }),
2129
-
2130
- /***/ 499:
2131
- /***/ (function(module, exports, __webpack_require__) {
2132
-
2133
- /* module decorator */ module = __webpack_require__.nmd(module);
2134
- 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); }
2135
- (function webpackUniversalModuleDefinition(root, factory) {
2136
- 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),
2137
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
2138
- (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
2139
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
2140
- })(this, function (__WEBPACK_EXTERNAL_MODULE__787__) {
2141
- return (/******/function () {
2142
- // webpackBootstrap
2143
- /******/
2144
- "use strict";
2145
-
2146
- /******/
2147
- var __webpack_modules__ = {
2148
- /***/318: /***/function _(__unused_webpack_module, __webpack_exports__, __nested_webpack_require_1139__) {
2149
- /* harmony export */__nested_webpack_require_1139__.d(__webpack_exports__, {
2150
- /* harmony export */"debounce": function debounce() {
2151
- return (/* binding */_debounce
2152
- );
2153
- },
2154
- /* harmony export */"throttle": function throttle() {
2155
- return (/* binding */_throttle
2156
- );
2157
- }
2158
- /* harmony export */
2159
- });
2160
- /*
2161
- * Debounce
2162
- *
2163
- * @param {Function} fn - A function to be executed within the time limit.
2164
- * @param {Number} limit - Waiting time.
2165
- * @return {*} - Returns a new function.
2166
- */
2167
- function _debounce(fn) {
2168
- var limit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 300;
2169
- var timer;
2170
- return function () {
2171
- clearTimeout(timer);
2172
- timer = setTimeout(function () {
2173
- fn.apply(this, arguments);
2174
- }, limit);
2175
- };
2176
- }
2177
-
2178
- /*
2179
- * Throttle
2180
- *
2181
- * @param {Function} fn - A function to be executed within the time limit.
2182
- * @param {Number} limit - Waiting time.
2183
- * @return {*} - Returns a new function.
2184
- */
2185
- function _throttle(fn) {
2186
- var limit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 300;
2187
- var waiting = false;
2188
- return function () {
2189
- if (!waiting) {
2190
- fn.apply(this, arguments);
2191
- waiting = true;
2192
- setTimeout(function () {
2193
- waiting = false;
2194
- }, limit);
2195
- }
2196
- };
2197
- }
2198
-
2199
- /***/
2200
- },
2201
-
2202
- /***/787: /***/function _(module) {
2203
- module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
2204
-
2205
- /***/
2206
- }
2207
-
2208
- /******/
2209
- };
2210
- /************************************************************************/
2211
- /******/ // The module cache
2212
- /******/
2213
- var __webpack_module_cache__ = {};
2214
- /******/
2215
- /******/ // The require function
2216
- /******/
2217
- function __nested_webpack_require_3331__(moduleId) {
2218
- /******/ // Check if module is in cache
2219
- /******/var cachedModule = __webpack_module_cache__[moduleId];
2220
- /******/
2221
- if (cachedModule !== undefined) {
2222
- /******/return cachedModule.exports;
2223
- /******/
2224
- }
2225
- /******/ // Create a new module (and put it into the cache)
2226
- /******/
2227
- var module = __webpack_module_cache__[moduleId] = {
2228
- /******/ // no module.id needed
2229
- /******/ // no module.loaded needed
2230
- /******/exports: {}
2231
- /******/
2232
- };
2233
- /******/
2234
- /******/ // Execute the module function
2235
- /******/
2236
- __webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_3331__);
2237
- /******/
2238
- /******/ // Return the exports of the module
2239
- /******/
2240
- return module.exports;
2241
- /******/
2242
- }
2243
- /******/
2244
- /************************************************************************/
2245
- /******/ /* webpack/runtime/compat get default export */
2246
- /******/
2247
- (function () {
2248
- /******/ // getDefaultExport function for compatibility with non-harmony modules
2249
- /******/__nested_webpack_require_3331__.n = function (module) {
2250
- /******/var getter = module && module.__esModule ? /******/function () {
2251
- return module['default'];
2252
- } : /******/function () {
2253
- return module;
2254
- };
2255
- /******/
2256
- __nested_webpack_require_3331__.d(getter, {
2257
- a: getter
2258
- });
2259
- /******/
2260
- return getter;
2261
- /******/
2262
- };
2263
- /******/
2264
- })();
2265
- /******/
2266
- /******/ /* webpack/runtime/define property getters */
2267
- /******/
2268
- (function () {
2269
- /******/ // define getter functions for harmony exports
2270
- /******/__nested_webpack_require_3331__.d = function (exports, definition) {
2271
- /******/for (var key in definition) {
2272
- /******/if (__nested_webpack_require_3331__.o(definition, key) && !__nested_webpack_require_3331__.o(exports, key)) {
2273
- /******/Object.defineProperty(exports, key, {
2274
- enumerable: true,
2275
- get: definition[key]
2276
- });
2277
- /******/
2278
- }
2279
- /******/
2280
- }
2281
- /******/
2282
- };
2283
- /******/
2284
- })();
2285
- /******/
2286
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
2287
- /******/
2288
- (function () {
2289
- /******/__nested_webpack_require_3331__.o = function (obj, prop) {
2290
- return Object.prototype.hasOwnProperty.call(obj, prop);
2291
- };
2292
- /******/
2293
- })();
2294
- /******/
2295
- /******/ /* webpack/runtime/make namespace object */
2296
- /******/
2297
- (function () {
2298
- /******/ // define __esModule on exports
2299
- /******/__nested_webpack_require_3331__.r = function (exports) {
2300
- /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
2301
- /******/Object.defineProperty(exports, Symbol.toStringTag, {
2302
- value: 'Module'
2303
- });
2304
- /******/
2305
- }
2306
- /******/
2307
- Object.defineProperty(exports, '__esModule', {
2308
- value: true
2309
- });
2310
- /******/
2311
- };
2312
- /******/
2313
- })();
2314
- /******/
2315
- /************************************************************************/
2316
- var __webpack_exports__ = {};
2317
- // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
2318
- (function () {
2319
- __nested_webpack_require_3331__.r(__webpack_exports__);
2320
- /* harmony export */
2321
- __nested_webpack_require_3331__.d(__webpack_exports__, {
2322
- /* harmony export */"default": function _default() {
2323
- return __WEBPACK_DEFAULT_EXPORT__;
2324
- }
2325
- /* harmony export */
2326
- });
2327
- /* harmony import */
2328
- var react__WEBPACK_IMPORTED_MODULE_0__ = __nested_webpack_require_3331__(787);
2329
- /* harmony import */
2330
- var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nested_webpack_require_3331__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2331
- /* harmony import */
2332
- var _libs_performance__WEBPACK_IMPORTED_MODULE_1__ = __nested_webpack_require_3331__(318);
2333
- function _slicedToArray(arr, i) {
2334
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
2335
- }
2336
- function _nonIterableRest() {
2337
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2338
- }
2339
- function _unsupportedIterableToArray(o, minLen) {
2340
- if (!o) return;
2341
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
2342
- var n = Object.prototype.toString.call(o).slice(8, -1);
2343
- if (n === "Object" && o.constructor) n = o.constructor.name;
2344
- if (n === "Map" || n === "Set") return Array.from(o);
2345
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
2346
- }
2347
- function _arrayLikeToArray(arr, len) {
2348
- if (len == null || len > arr.length) len = arr.length;
2349
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
2350
- return arr2;
2351
- }
2352
- function _iterableToArrayLimit(arr, i) {
2353
- var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
2354
- if (null != _i) {
2355
- var _s,
2356
- _e,
2357
- _x,
2358
- _r,
2359
- _arr = [],
2360
- _n = !0,
2361
- _d = !1;
2362
- try {
2363
- if (_x = (_i = _i.call(arr)).next, 0 === i) {
2364
- if (Object(_i) !== _i) return;
2365
- _n = !1;
2366
- } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
2367
- } catch (err) {
2368
- _d = !0, _e = err;
2369
- } finally {
2370
- try {
2371
- if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
2372
- } finally {
2373
- if (_d) throw _e;
2374
- }
2375
- }
2376
- return _arr;
2377
- }
2378
- }
2379
- function _arrayWithHoles(arr) {
2380
- if (Array.isArray(arr)) return arr;
2381
- }
2382
- /**
2383
- * Listens for scrolls the window to a particular place in the document
2384
- *
2385
- * @usage:
2386
-
2387
- const App = () => {
2388
- const [scrollData, windowScrollUpdate] = useWindowScroll({
2389
- performance: ['debounce', 500], // "['debounce', 500]" or "['throttle', 500]"
2390
- handle: (scrollData) => {
2391
- // do something
2392
- console.log(scrollData);
2393
- }
2394
- });
2395
- };
2396
-
2397
- */
2398
-
2399
- var useWindowScroll = function useWindowScroll(_ref) {
2400
- var enabled = _ref.enabled,
2401
- performance = _ref.performance,
2402
- handle = _ref.handle;
2403
- var windowScrollUpdate;
2404
- var _performance = _slicedToArray(performance, 2),
2405
- performanceName = _performance[0],
2406
- performanceLimit = _performance[1];
2407
- var _useState = (0, react__WEBPACK_IMPORTED_MODULE_0__.useState)({
2408
- x: 0,
2409
- y: 0
2410
- }),
2411
- _useState2 = _slicedToArray(_useState, 2),
2412
- scrollData = _useState2[0],
2413
- setScrollData = _useState2[1];
2414
- var eventHandlerScroll = function eventHandlerScroll(e) {
2415
- var doc = document.documentElement;
2416
- var left = (window.pageXOffset || doc.scrollLeft) - (doc.clientLeft || 0);
2417
- var top = (window.pageYOffset || doc.scrollTop) - (doc.clientTop || 0);
2418
- var res = {
2419
- x: left,
2420
- y: top
2421
- };
2422
- setScrollData(res);
2423
- if (typeof handle === "function") handle(res);
2424
- };
2425
- if (performanceName === "debounce") windowScrollUpdate = (0, _libs_performance__WEBPACK_IMPORTED_MODULE_1__.debounce)(eventHandlerScroll, parseFloat(performanceLimit));
2426
- if (performanceName === "throttle") windowScrollUpdate = (0, _libs_performance__WEBPACK_IMPORTED_MODULE_1__.throttle)(eventHandlerScroll, parseFloat(performanceLimit));
2427
- (0, react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
2428
- window.addEventListener("scroll", windowScrollUpdate);
2429
- window.addEventListener("touchmove", windowScrollUpdate);
2430
- return function () {
2431
- window.removeEventListener("scroll", windowScrollUpdate);
2432
- window.removeEventListener("touchmove", windowScrollUpdate);
2433
- };
2434
- }, []);
2435
- return [scrollData, windowScrollUpdate];
2436
- };
2437
- /* harmony default export */
2438
- var __WEBPACK_DEFAULT_EXPORT__ = useWindowScroll;
2439
- })();
2440
-
2441
- /******/
2442
- return __webpack_exports__;
2443
- /******/
2444
- }()
2445
- );
2446
- });
2447
-
2448
- /***/ }),
2449
-
2450
- /***/ 455:
2451
- /***/ (function(module, exports, __webpack_require__) {
2452
-
2453
- /* module decorator */ module = __webpack_require__.nmd(module);
2454
- 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); }
2455
- (function webpackUniversalModuleDefinition(root, factory) {
2456
- 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),
2457
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
2458
- (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
2459
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
2460
- })(this, function () {
2461
- return (/******/function () {
2462
- // webpackBootstrap
2463
- /******/
2464
- "use strict";
2465
-
2466
- /******/ // The require scope
2467
- /******/
2468
- var __nested_webpack_require_993__ = {};
2469
- /******/
2470
- /************************************************************************/
2471
- /******/ /* webpack/runtime/define property getters */
2472
- /******/
2473
- (function () {
2474
- /******/ // define getter functions for harmony exports
2475
- /******/__nested_webpack_require_993__.d = function (exports, definition) {
2476
- /******/for (var key in definition) {
2477
- /******/if (__nested_webpack_require_993__.o(definition, key) && !__nested_webpack_require_993__.o(exports, key)) {
2478
- /******/Object.defineProperty(exports, key, {
2479
- enumerable: true,
2480
- get: definition[key]
2481
- });
2482
- /******/
2483
- }
2484
- /******/
2485
- }
2486
- /******/
2487
- };
2488
- /******/
2489
- })();
2490
- /******/
2491
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
2492
- /******/
2493
- (function () {
2494
- /******/__nested_webpack_require_993__.o = function (obj, prop) {
2495
- return Object.prototype.hasOwnProperty.call(obj, prop);
2496
- };
2497
- /******/
2498
- })();
2499
- /******/
2500
- /******/ /* webpack/runtime/make namespace object */
2501
- /******/
2502
- (function () {
2503
- /******/ // define __esModule on exports
2504
- /******/__nested_webpack_require_993__.r = function (exports) {
2505
- /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
2506
- /******/Object.defineProperty(exports, Symbol.toStringTag, {
2507
- value: 'Module'
2508
- });
2509
- /******/
2510
- }
2511
- /******/
2512
- Object.defineProperty(exports, '__esModule', {
2513
- value: true
2514
- });
2515
- /******/
2516
- };
2517
- /******/
2518
- })();
2519
- /******/
2520
- /************************************************************************/
2521
- var __webpack_exports__ = {};
2522
- __nested_webpack_require_993__.r(__webpack_exports__);
2523
- /* harmony export */
2524
- __nested_webpack_require_993__.d(__webpack_exports__, {
2525
- /* harmony export */"isEmail": function isEmail() {
2526
- return (/* binding */_isEmail
2527
- );
2528
- },
2529
- /* harmony export */"isEmpty": function isEmpty() {
2530
- return (/* binding */_isEmpty
2531
- );
2532
- },
2533
- /* harmony export */"isInt": function isInt() {
2534
- return (/* binding */_isInt
2535
- );
2536
- },
2537
- /* harmony export */"isJSON": function isJSON() {
2538
- return (/* binding */_isJSON
2539
- );
2540
- },
2541
- /* harmony export */"isMobile": function isMobile() {
2542
- return (/* binding */_isMobile
2543
- );
2544
- },
2545
- /* harmony export */"isNumber": function isNumber() {
2546
- return (/* binding */_isNumber
2547
- );
2548
- },
2549
- /* harmony export */"isTel": function isTel() {
2550
- return (/* binding */_isTel
2551
- );
2552
- },
2553
- /* harmony export */"isValidNumeric": function isValidNumeric() {
2554
- return (/* binding */_isValidNumeric
2555
- );
2556
- }
2557
- /* harmony export */
2558
- });
2559
- function _typeof(obj) {
2560
- "@babel/helpers - typeof";
2561
-
2562
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
2563
- return typeof obj;
2564
- } : function (obj) {
2565
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
2566
- }, _typeof(obj);
2567
- }
2568
- /**
2569
- * Fix And Parse JSON (Support for handling complex escape JSON strings)
2570
- * @desc recursively fix top-level key/value (recursively handles when encountering top-level values that are objects/arrays)
2571
- * @private
2572
- */
2573
- /*
2574
- - Still prioritize JSON.parse first;
2575
- - After parse fails, do unescaping (\\" → ");
2576
- - Then process the outermost layer (object or array) key by key, value by value;
2577
- - If a top-level value is an unquoted object or array (e.g., messages: [ {...} ]), recursively treat that value as a new outermost layer for fixing;
2578
- - For strings wrapped in quotes ('...' or "..."), only extract the outer layer and re-encode with JSON.stringify (ensuring internal single/double quotes won't be mistakenly changed);
2579
- - Set MAX_DEPTH to prevent infinite recursion.
2580
- */
2581
- /*
2582
- @Examples:
2583
-
2584
- // ✅ Valid JSON (contains svg and single quote content)
2585
- const okJson = `{
2586
- "label":"<svg width='16' height='16'><path fill='currentColor' d='M19 13h-6'/></svg> 新建会话",
2587
- "value":"new",
2588
- "onClick":"method.setVal(''); method.clearData();"
2589
- }`;
2590
-
2591
- const okJson2 = `{
2592
- label:"<svg width='16' height='16'><path fill='currentColor' d='M19 13h-6'/></svg> 新建会话",
2593
- value:"new",
2594
- onClick:"method.setVal(''); method.clearData();"
2595
- }`;
2596
-
2597
- // ⚠️ Single quote JSON
2598
- const badJson = "{'model':'{model}','messages':[{'role':'user','content':'{message}'}],'stream': true}";
2599
-
2600
- // ⚠️ Escaped JSON
2601
- const badJson2 = "{\\\"label\\\":\\\"<svg width='16' height='16' viewBox='0 0 24 24'><path fill='currentColor' d='M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z'/></svg> 新建会话\\\",\\\"value\\\":\\\"new\\\",\\\"onClick\\\":\\\"method.setVal(''); method.clearData();\\\"}";
2602
-
2603
- const badJson3 = "{\"label\":\"<svg width='16' height='16' viewBox='0 0 24 24'><path fill='currentColor' d='M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z'/></svg> 新建会话\",\"value\":\"new\",\"onClick\":\"method.setVal(''); method.clearData();\"}";
2604
-
2605
- const badJson4 = "[{\"label\":\"<svg fill='currentColor' width='12' height='12' viewBox='0 0 24 24'><path d='M20.5 9a3.49 3.49 0 0 0-3.45 3h-1.1a2.49 2.49 0 0 0-4.396-1.052L8.878 9.731l3.143-4.225a2.458 2.458 0 0 0 2.98-.019L17.339 8H16v1h3V6h-1v1.243l-2.336-2.512A2.473 2.473 0 0 0 16 3.5a2.5 2.5 0 0 0-5 0 2.474 2.474 0 0 0 .343 1.243L7.947 9.308 4.955 7.947a2.404 2.404 0 0 0-.161-1.438l3.704-1.385-.44 1.371.942.333L10 4 7.172 3l-.334.943 1.01.357-3.659 1.368a2.498 2.498 0 1 0-.682 4.117l2.085 2.688-2.053 2.76a2.5 2.5 0 1 0 .87 3.864l3.484 1.587-1.055.373.334.943L10 21l-1-2.828-.943.333.435 1.354-3.608-1.645A2.471 2.471 0 0 0 5 17.5a2.5 2.5 0 0 0-.058-.527l3.053-1.405 3.476 4.48a2.498 2.498 0 1 0 4.113.075L18 17.707V19h1v-3h-3v1h1.293l-2.416 2.416a2.466 2.466 0 0 0-2.667-.047l-3.283-4.23 2.554-1.176A2.494 2.494 0 0 0 15.95 13h1.1a3.493 3.493 0 1 0 3.45-4zm-7-7A1.5 1.5 0 1 1 12 3.5 1.502 1.502 0 0 1 13.5 2zm0 18a1.5 1.5 0 1 1-1.5 1.5 1.502 1.502 0 0 1 1.5-1.5zM1 7.5a1.5 1.5 0 1 1 2.457 1.145l-.144.112A1.496 1.496 0 0 1 1 7.5zm3.32 1.703a2.507 2.507 0 0 0 .264-.326l2.752 1.251-1.124 1.512zM2.5 19A1.5 1.5 0 1 1 4 17.5 1.502 1.502 0 0 1 2.5 19zm2.037-2.941a2.518 2.518 0 0 0-.193-.234l1.885-2.532 1.136 1.464zm3.76-1.731L6.849 12.46l1.42-1.908L11.1 11.84a2.29 2.29 0 0 0-.033 1.213zM13.5 14a1.5 1.5 0 1 1 1.5-1.5 1.502 1.502 0 0 1-1.5 1.5zm7 1a2.5 2.5 0 1 1 2.5-2.5 2.502 2.502 0 0 1-2.5 2.5zm1.5-2.5a1.5 1.5 0 1 1-1.5-1.5 1.502 1.502 0 0 1 1.5 1.5z'/><path fill='none' d='M0 0h24v24H0z'/></svg> 深度思考\",\"value\":\"brief\",\"onClick\":\"if(isActive){method.executeCustomMethod('changeModel', true)}else{method.executeCustomMethod('changeModel', false)}\"},{\"label\":\"<svg fill='currentColor' width='12' height='12' viewBox='0 0 24 24'><path d='M19 2H5c-1.103 0-2 .897-2 2v12c0 1.103.897 2 2 2h3.586L12 21.414 15.414 18H19c1.103 0 2-.897 2-2V4c0-1.103-.897-2-2-2zm0 14h-4.414L12 18.586 9.414 16H5V4h14v12z'/></svg> 精简回答\",\"value\":\"brief\",\"onClick\":\"if(isActive){method.setContextData({systemPrompt:'请精简回答,字数控制在150个字左右, 思考过程请简洁简短',mergedText:method.getContextData().mergedText,analyzeMetrics:method.getContextData().analyzeMetrics});}else{method.setContextData({mergedText:method.getContextData().mergedText,analyzeMetrics:method.getContextData().analyzeMetrics});}\"},{\"label\":\"<svg fill='none' width='12' height='12' viewBox='0 0 16 16'><path d='M7 0.0618896V9H15.9381C15.446 12.9463 12.0796 16 8 16C3.58172 16 0 12.4183 0 8C0 3.92038 3.05369 0.553988 7 0.0618896Z' fill='currentColor'/><path d='M9 0.0618897V7H15.9381C15.4869 3.38128 12.6187 0.513137 9 0.0618897Z' fill='currentColor'/></svg> 指标分析\",\"value\":\"lab\",\"onClick\":\"return method.executeCustomMethod('getLibList')\",\"isSelect\":true,\"dynamicOptions\":true}]";
2606
-
2607
-
2608
- // ❌ Invalid JSON with missing } or ]
2609
- const errorJson001 = "{'model':'qwen-plus','base_url':'https://dashscope.aliyuncs.com/compatible-mode/v1/','api_key':'sk-0989fb9baab8450682af4d000f5b7cba','message':'{message}','stream':'true','chatId': '{chatId}', 'token': '{token}'";
2610
-
2611
- const errorJson002 = "[{'model':'qwen-plus','base_url':'https://dashscope.aliyuncs.com/compatible-mode/v1/','api_key':'sk-0989fb9baab8450682af4d000f5b7cba','message':'{message}','stream':'true','chatId': '{chatId}', 'token': '{token}'}";
2612
-
2613
- // ❌ Invalid JSON with missing quotes
2614
- const errorJson003 = "{'model':'qwen-plus','base_url':'https://dashscope.aliyuncs.com/compatible-mode/v1/','api_key':'sk-0989fb9baab8450682af4d000f5b7cba','message':'{message}','stream':'true','chatId': {chatId}', 'token': '{token}'}";
2615
-
2616
-
2617
-
2618
- console.log('okJson =>', fixAndParseJSON(okJson)); // Can parse normally success = true
2619
- console.log('okJson =>', fixAndParseJSON(okJson2)); // Can parse normally success = true
2620
- console.log('badJson =>', fixAndParseJSON(badJson)); // Can parse after fixing success = true
2621
- console.log('badJson =>', fixAndParseJSON(badJson2)); // Can parse after fixing success = true
2622
- console.log('badJson =>', fixAndParseJSON(badJson3)); // Can parse after fixing success = true
2623
- console.log('badJson =>', fixAndParseJSON(badJson4)); // Can parse after fixing success = true
2624
- console.log('errorJson =>', fixAndParseJSON(errorJson001)); // {success: false, error: 'Invalid JSON format', details: 'Invalid object: mismatched braces'}
2625
- console.log('errorJson =>', fixAndParseJSON(errorJson002)); // {success: false, error: 'Invalid JSON format', details: "Expected property name or '}' in JSON at position 2 (line 1 column 3)"}
2626
- console.log('errorJson =>', fixAndParseJSON(errorJson003)); // {success: false, error: 'Invalid JSON format', details: 'Invalid object: mismatched braces'}
2627
-
2628
- */
2629
-
2630
- // Type definitions
2631
-
2632
- function fixAndParseJSON(input) {
2633
- var MAX_DEPTH = 6;
2634
-
2635
- // 1. Quick attempt
2636
- try {
2637
- return {
2638
- success: true,
2639
- data: JSON.parse(input)
2640
- };
2641
- } catch (e) {
2642
- // Continue with fixing
2643
- }
2644
-
2645
- // 2. Simple unescaping of escaped \" (common case from pasted JS literals)
2646
- var s = input;
2647
- if (s.includes('\\"')) s = s.replace(/\\"/g, '"');
2648
- s = s.trim();
2649
- try {
2650
- if (s.startsWith('{')) {
2651
- s = processTopObject(s, 0, MAX_DEPTH);
2652
- } else if (s.startsWith('[')) {
2653
- s = processTopArray(s, 0, MAX_DEPTH);
2654
- } else {
2655
- throw new Error('Input is not an object or array');
2656
- }
2657
- return {
2658
- success: true,
2659
- data: JSON.parse(s)
2660
- };
2661
- } catch (err) {
2662
- var error = err instanceof Error ? err : new Error('Unknown error');
2663
- return {
2664
- success: false,
2665
- error: 'Invalid JSON format',
2666
- details: error.message
2667
- };
2668
- }
2669
- }
2670
-
2671
- /* ---------- Helper (Recursive) Functions ---------- */
2672
-
2673
- function processTopObject(str, depth, MAX_DEPTH) {
2674
- if (depth > MAX_DEPTH) return str;
2675
- str = str.trim();
2676
-
2677
- // First check if braces match
2678
- var braceCount = 0;
2679
- var inString = false;
2680
- var escapeNext = false;
2681
- for (var i = 0; i < str.length; i++) {
2682
- var ch = str[i];
2683
- if (escapeNext) {
2684
- escapeNext = false;
2685
- continue;
2686
- }
2687
- if (ch === '\\') {
2688
- escapeNext = true;
2689
- continue;
2690
- }
2691
- if ((ch === '"' || ch === "'") && !escapeNext) {
2692
- inString = !inString;
2693
- continue;
2694
- }
2695
- if (!inString) {
2696
- if (ch === '{') braceCount++;else if (ch === '}') braceCount--;
2697
- }
2698
- }
2699
- if (braceCount !== 0) {
2700
- throw new Error('Invalid object: mismatched braces');
2701
- }
2702
-
2703
- // Ensure both ends are { ... }
2704
- if (!(str.startsWith('{') && str.endsWith('}'))) {
2705
- var f = str.indexOf('{'),
2706
- l = str.lastIndexOf('}');
2707
- if (f === -1 || l === -1 || l <= f) {
2708
- throw new Error('Invalid object format: missing or mismatched braces');
2709
- }
2710
- str = str.slice(f, l + 1);
2711
- }
2712
- var inner = str.slice(1, -1);
2713
- var pairs = splitTopLevel(inner);
2714
- var repairedPairs = pairs.map(function (pair) {
2715
- if (!pair || pair.trim() === '') return '';
2716
- var idx = findTopLevelColon(pair);
2717
- if (idx === -1) {
2718
- return pair; // Non key:value fragment, keep as is (rare case)
2719
- }
2720
-
2721
- var rawKey = pair.slice(0, idx).trim();
2722
- var rawVal = pair.slice(idx + 1);
2723
- var keyContent = extractKeyContent(rawKey);
2724
- var keyJson = JSON.stringify(keyContent);
2725
- var repairedValue = repairPossiblyQuotedValue(rawVal, depth + 1, MAX_DEPTH);
2726
- return keyJson + ':' + repairedValue;
2727
- });
2728
- return '{' + repairedPairs.join(',') + '}';
2729
- }
2730
- function processTopArray(str, depth, MAX_DEPTH) {
2731
- if (depth > MAX_DEPTH) return str;
2732
- str = str.trim();
2733
- if (!(str.startsWith('[') && str.endsWith(']'))) {
2734
- var f = str.indexOf('['),
2735
- l = str.lastIndexOf(']');
2736
- if (f === -1 || l === -1 || l <= f) return str;
2737
- str = str.slice(f, l + 1);
2738
- }
2739
- var inner = str.slice(1, -1);
2740
- var elements = splitTopLevel(inner);
2741
- var processed = elements.map(function (el) {
2742
- var t = el.trim();
2743
- if (t === '') return '';
2744
- if (t.startsWith('{')) return processTopObject(t, depth + 1, MAX_DEPTH);
2745
- if (t.startsWith('[')) return processTopArray(t, depth + 1, MAX_DEPTH);
2746
- return repairPossiblyQuotedValue(t, depth + 1, MAX_DEPTH);
2747
- });
2748
- return '[' + processed.join(',') + ']';
2749
- }
2750
-
2751
- // If it's a string wrapped in quotes, extract the inner content and JSON.stringify (safe escaping)
2752
- // If it's an object/array literal (not wrapped in quotes), recursively process (treat as new outermost layer)
2753
- // Otherwise return the original fragment directly (numbers/true/false/null or JS expressions)
2754
- function repairPossiblyQuotedValue(rawVal, depth, MAX_DEPTH) {
2755
- var v = rawVal.trim();
2756
- if (v === '') return v;
2757
- if (v[0] === '"' || v[0] === "'") {
2758
- var quote = v[0];
2759
- // Find the last unescaped same quote
2760
- var lastPos = -1;
2761
- for (var i = v.length - 1; i >= 0; i--) {
2762
- if (v[i] === quote) {
2763
- // check escaped
2764
- var bs = 0,
2765
- k = i - 1;
2766
- while (k >= 0 && v[k] === '\\') {
2767
- bs++;
2768
- k--;
2769
- }
2770
- if (bs % 2 === 0) {
2771
- lastPos = i;
2772
- break;
2773
- }
2774
- }
2775
- }
2776
- var inner = lastPos > 0 ? v.slice(1, lastPos) : v.slice(1);
2777
- return JSON.stringify(inner); // Use JSON.stringify to generate valid JSON string (automatically escape internal quotes, etc.)
2778
- }
2779
-
2780
- // If it's an object or array literal (not wrapped in quotes) -> recursively treat as new outermost layer
2781
- if (v.startsWith('{')) {
2782
- return processTopObject(v, depth, MAX_DEPTH);
2783
- }
2784
- if (v.startsWith('[')) {
2785
- return processTopArray(v, depth, MAX_DEPTH);
2786
- }
2787
-
2788
- // Others (numbers, boolean, null, or JS expressions): return as-is
2789
- return v;
2790
- }
2791
-
2792
- /* --------- Utilities: Split by top-level commas, find top-level colon, extract key --------- */
2793
-
2794
- // Split by top-level commas (ignore strings, sub-objects, sub-arrays, commas inside parentheses)
2795
- function splitTopLevel(str) {
2796
- var parts = [];
2797
- var buf = '';
2798
- var depthCurly = 0,
2799
- depthSquare = 0,
2800
- depthParen = 0;
2801
- var inSingle = false,
2802
- inDouble = false,
2803
- esc = false;
2804
- for (var i = 0; i < str.length; i++) {
2805
- var ch = str[i];
2806
- if (esc) {
2807
- buf += ch;
2808
- esc = false;
2809
- continue;
2810
- }
2811
- if (ch === '\\') {
2812
- buf += ch;
2813
- esc = true;
2814
- continue;
2815
- }
2816
- if (ch === "'" && !inDouble) {
2817
- inSingle = !inSingle;
2818
- buf += ch;
2819
- continue;
2820
- }
2821
- if (ch === '"' && !inSingle) {
2822
- inDouble = !inDouble;
2823
- buf += ch;
2824
- continue;
2825
- }
2826
- if (!inSingle && !inDouble) {
2827
- if (ch === '{') {
2828
- depthCurly++;
2829
- buf += ch;
2830
- continue;
2831
- }
2832
- if (ch === '}') {
2833
- depthCurly--;
2834
- buf += ch;
2835
- continue;
2836
- }
2837
- if (ch === '[') {
2838
- depthSquare++;
2839
- buf += ch;
2840
- continue;
2841
- }
2842
- if (ch === ']') {
2843
- depthSquare--;
2844
- buf += ch;
2845
- continue;
2846
- }
2847
- if (ch === '(') {
2848
- depthParen++;
2849
- buf += ch;
2850
- continue;
2851
- }
2852
- if (ch === ')') {
2853
- depthParen--;
2854
- buf += ch;
2855
- continue;
2856
- }
2857
- if (ch === ',' && depthCurly === 0 && depthSquare === 0 && depthParen === 0) {
2858
- parts.push(buf);
2859
- buf = '';
2860
- continue;
2861
- }
2862
- }
2863
- buf += ch;
2864
- }
2865
-
2866
- // Check for unclosed brackets or quotes
2867
- if (depthCurly !== 0 || depthSquare !== 0 || depthParen !== 0 || inSingle || inDouble) {
2868
- throw new Error('Invalid JSON: unclosed brackets or quotes');
2869
- }
2870
- if (buf.trim() !== '') parts.push(buf);
2871
- return parts;
2872
- }
2873
-
2874
- // Find the first "top-level" colon index (ignore inside strings & sub-levels)
2875
- function findTopLevelColon(str) {
2876
- var inSingle = false,
2877
- inDouble = false,
2878
- esc = false;
2879
- var depthCurly = 0,
2880
- depthSquare = 0,
2881
- depthParen = 0;
2882
- for (var i = 0; i < str.length; i++) {
2883
- var ch = str[i];
2884
- if (esc) {
2885
- esc = false;
2886
- continue;
2887
- }
2888
- if (ch === '\\') {
2889
- esc = true;
2890
- continue;
2891
- }
2892
- if (ch === "'" && !inDouble) {
2893
- inSingle = !inSingle;
2894
- continue;
2895
- }
2896
- if (ch === '"' && !inSingle) {
2897
- inDouble = !inDouble;
2898
- continue;
2899
- }
2900
- if (!inSingle && !inDouble) {
2901
- if (ch === '{') {
2902
- depthCurly++;
2903
- continue;
2904
- }
2905
- if (ch === '}') {
2906
- depthCurly--;
2907
- continue;
2908
- }
2909
- if (ch === '[') {
2910
- depthSquare++;
2911
- continue;
2912
- }
2913
- if (ch === ']') {
2914
- depthSquare--;
2915
- continue;
2916
- }
2917
- if (ch === '(') {
2918
- depthParen++;
2919
- continue;
2920
- }
2921
- if (ch === ')') {
2922
- depthParen--;
2923
- continue;
2924
- }
2925
- if (ch === ':' && depthCurly === 0 && depthSquare === 0 && depthParen === 0) {
2926
- return i;
2927
- }
2928
- }
2929
- }
2930
- return -1;
2931
- }
2932
-
2933
- // Extract key content (supports "key", 'key', key), returns pure key string
2934
- function extractKeyContent(rawKey) {
2935
- var r = rawKey.trim();
2936
- if (r.startsWith('"') && r.endsWith('"') || r.startsWith("'") && r.endsWith("'")) {
2937
- var inner = r.slice(1, -1).replace(/\\"/g, '"').replace(/\\'/g, "'");
2938
- return inner;
2939
- }
2940
- return r;
2941
- }
2942
-
2943
- /**
2944
- * Determine whether it is in JSON format
2945
- * @private
2946
- */
2947
- function _isJSON(input) {
2948
- if (typeof input === 'string' && input.length > 0) {
2949
- return fixAndParseJSON(input).success;
2950
- } else {
2951
- if (_typeof(input) === 'object' && Object.prototype.toString.call(input) === '[object Object]' && !input.length) {
2952
- return true;
2953
- } else {
2954
- return false;
2955
- }
2956
- }
2957
- }
2958
-
2959
- /**
2960
- * Check if a string is a valid number
2961
- * @param str - The string to check
2962
- * @returns boolean indicating if the string is a valid number
2963
- */
2964
- function _isValidNumeric(str) {
2965
- if (typeof str !== "string") return false; // we only process strings!
2966
- if (!isNaN(Number(str)) &&
2967
- // use type coercion to parse the _entirety_ of the string
2968
- !isNaN(parseFloat(str)) // ensure strings of whitespace fail
2969
- ) {
2970
- return true;
2971
- }
2972
- return false;
2973
- }
2974
-
2975
- /**
2976
- * Check if input is empty
2977
- * @param input - The input to check (string or array of strings)
2978
- * @returns boolean indicating if the input is empty
2979
- */
2980
- function _isEmpty(input) {
2981
- if (Array.isArray(input)) {
2982
- return input.some(function (str) {
2983
- return !str.replace(/\s/g, '').length === true;
2984
- });
2985
- }
2986
- return !input.replace(/\s/g, '').length === true;
2987
- }
2988
-
2989
- /**
2990
- * Check if input is a valid number
2991
- * @param input - The input to check
2992
- * @returns boolean indicating if the input is a valid number
2993
- */
2994
- function _isNumber(input) {
2995
- var reg = /^[\d|\.|,]+$/;
2996
- return reg.test(input);
2997
- }
2998
-
2999
- /**
3000
- * Check if input is a valid integer
3001
- * @param input - The input to check
3002
- * @returns boolean indicating if the input is a valid integer
3003
- */
3004
- function _isInt(input) {
3005
- if (input === "") {
3006
- return false;
3007
- }
3008
- var reg = /\D+/;
3009
- return !reg.test(input);
3010
- }
3011
-
3012
- /**
3013
- * Check if input is a valid email address
3014
- * @param input - The input to check
3015
- * @returns boolean indicating if the input is a valid email
3016
- */
3017
- function _isEmail(input) {
3018
- var reg = /^\s*([A-Za-z0-9_-]+(\.\w+)*@(\w+\.)+\w{2,3})\s*$/;
3019
- return reg.test(input);
3020
- }
3021
-
3022
- /**
3023
- * Check if input is a valid telephone number
3024
- * @param input - The input to check
3025
- * @returns boolean indicating if the input is a valid telephone number
3026
- */
3027
- function _isTel(input) {
3028
- var reg = /^[0-9- ]{7,20}$/;
3029
- return reg.test(input);
3030
- }
3031
-
3032
- /**
3033
- * Check if input is a valid mobile number
3034
- * @param input - The input to check
3035
- * @returns boolean indicating if the input is a valid mobile number
3036
- */
3037
- function _isMobile(input) {
3038
- var reg = /^1[0-9]{10}$/;
3039
- return reg.test(input);
3040
- }
3041
-
3042
- /******/
3043
- return __webpack_exports__;
3044
- /******/
3045
- }()
3046
- );
3047
- });
3048
-
3049
- /***/ }),
3050
-
3051
- /***/ 787:
3052
- /***/ ((module) => {
3053
-
3054
- "use strict";
3055
- module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
3056
-
3057
- /***/ }),
3058
-
3059
- /***/ 156:
3060
- /***/ ((module) => {
3061
-
3062
- "use strict";
3063
- module.exports = __WEBPACK_EXTERNAL_MODULE__156__;
3064
-
3065
- /***/ })
3066
-
3067
- /******/ });
3068
- /************************************************************************/
3069
- /******/ // The module cache
3070
- /******/ var __webpack_module_cache__ = {};
3071
- /******/
3072
- /******/ // The require function
3073
- /******/ function __webpack_require__(moduleId) {
3074
- /******/ // Check if module is in cache
3075
- /******/ var cachedModule = __webpack_module_cache__[moduleId];
3076
- /******/ if (cachedModule !== undefined) {
3077
- /******/ return cachedModule.exports;
3078
- /******/ }
3079
- /******/ // Create a new module (and put it into the cache)
3080
- /******/ var module = __webpack_module_cache__[moduleId] = {
3081
- /******/ id: moduleId,
3082
- /******/ loaded: false,
3083
- /******/ exports: {}
3084
- /******/ };
3085
- /******/
3086
- /******/ // Execute the module function
3087
- /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
3088
- /******/
3089
- /******/ // Flag the module as loaded
3090
- /******/ module.loaded = true;
3091
- /******/
3092
- /******/ // Return the exports of the module
3093
- /******/ return module.exports;
3094
- /******/ }
3095
- /******/
3096
- /************************************************************************/
3097
- /******/ /* webpack/runtime/compat get default export */
3098
- /******/ (() => {
3099
- /******/ // getDefaultExport function for compatibility with non-harmony modules
3100
- /******/ __webpack_require__.n = (module) => {
3101
- /******/ var getter = module && module.__esModule ?
3102
- /******/ () => (module['default']) :
3103
- /******/ () => (module);
3104
- /******/ __webpack_require__.d(getter, { a: getter });
3105
- /******/ return getter;
3106
- /******/ };
3107
- /******/ })();
3108
- /******/
3109
- /******/ /* webpack/runtime/define property getters */
3110
- /******/ (() => {
3111
- /******/ // define getter functions for harmony exports
3112
- /******/ __webpack_require__.d = (exports, definition) => {
3113
- /******/ for(var key in definition) {
3114
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
3115
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
3116
- /******/ }
3117
- /******/ }
3118
- /******/ };
3119
- /******/ })();
3120
- /******/
3121
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
3122
- /******/ (() => {
3123
- /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
3124
- /******/ })();
3125
- /******/
3126
- /******/ /* webpack/runtime/make namespace object */
3127
- /******/ (() => {
3128
- /******/ // define __esModule on exports
3129
- /******/ __webpack_require__.r = (exports) => {
3130
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
3131
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
3132
- /******/ }
3133
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
3134
- /******/ };
3135
- /******/ })();
3136
- /******/
3137
- /******/ /* webpack/runtime/node module decorator */
3138
- /******/ (() => {
3139
- /******/ __webpack_require__.nmd = (module) => {
3140
- /******/ module.paths = [];
3141
- /******/ if (!module.children) module.children = [];
3142
- /******/ return module;
3143
- /******/ };
3144
- /******/ })();
3145
- /******/
3146
- /************************************************************************/
3147
- var __webpack_exports__ = {};
3148
- // This entry need to be wrapped in an IIFE because it need to be in strict mode.
3149
- (() => {
3150
- "use strict";
3151
- __webpack_require__.r(__webpack_exports__);
3152
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3153
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
3154
- /* harmony export */ });
3155
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(787);
3156
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
3157
- /* harmony import */ var funda_root_portal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(909);
3158
- /* harmony import */ var funda_root_portal__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(funda_root_portal__WEBPACK_IMPORTED_MODULE_1__);
3159
- /* harmony import */ var funda_searchbar__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(962);
3160
- /* harmony import */ var funda_searchbar__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(funda_searchbar__WEBPACK_IMPORTED_MODULE_2__);
3161
- /* harmony import */ var funda_utils_dist_cjs_useComId__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(85);
3162
- /* harmony import */ var funda_utils_dist_cjs_useComId__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(funda_utils_dist_cjs_useComId__WEBPACK_IMPORTED_MODULE_3__);
3163
- /* harmony import */ var funda_utils_dist_cjs_validate__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(455);
3164
- /* harmony import */ var funda_utils_dist_cjs_validate__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(funda_utils_dist_cjs_validate__WEBPACK_IMPORTED_MODULE_4__);
3165
- /* harmony import */ var funda_utils_dist_cjs_useWindowScroll__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(499);
3166
- /* harmony import */ var funda_utils_dist_cjs_useWindowScroll__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(funda_utils_dist_cjs_useWindowScroll__WEBPACK_IMPORTED_MODULE_5__);
3167
- /* harmony import */ var funda_utils_dist_cjs_useClickOutside__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(761);
3168
- /* harmony import */ var funda_utils_dist_cjs_useClickOutside__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(funda_utils_dist_cjs_useClickOutside__WEBPACK_IMPORTED_MODULE_6__);
3169
- /* harmony import */ var funda_utils_dist_cjs_useDebounce__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(702);
3170
- /* harmony import */ var funda_utils_dist_cjs_useDebounce__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(funda_utils_dist_cjs_useDebounce__WEBPACK_IMPORTED_MODULE_7__);
3171
- /* harmony import */ var funda_utils_dist_cjs_getElementProperty__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(767);
3172
- /* harmony import */ var funda_utils_dist_cjs_getElementProperty__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(funda_utils_dist_cjs_getElementProperty__WEBPACK_IMPORTED_MODULE_8__);
3173
- /* harmony import */ var funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(188);
3174
- /* harmony import */ var funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_9__);
3175
- var _excluded = ["contentRef", "popupRef", "wrapperClassName", "controlClassName", "controlExClassName", "optionsExClassName", "controlGroupWrapperClassName", "controlGroupTextClassName", "exceededSidePosOffset", "appearance", "isSearchInput", "loader", "readOnly", "disabled", "required", "placeholder", "noMatchPopup", "options", "value", "label", "name", "units", "iconLeft", "iconRight", "minLength", "maxLength", "id", "autoComplete", "autoCapitalize", "spellCheck", "icon", "btnId", "fetchTrigger", "hideIcon", "renderOption", "depth", "style", "winWidth", "tabIndex", "data", "autoShowOptions", "fetchNoneInfo", "fetchUpdate", "fetchFuncAsync", "fetchFuncMethod", "fetchFuncMethodParams", "fetchCallback", "onClick", "onFetch", "onChange", "onKeyboardInput", "onBlur", "onPressEnter"];
3176
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
3177
- 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."); }
3178
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
3179
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
3180
- 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); }
3181
- 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; }
3182
- 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); }
3183
- 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); } }
3184
- 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); }); }; }
3185
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
3186
- 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."); }
3187
- 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); }
3188
- 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; }
3189
- 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; } }
3190
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
3191
- 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; }
3192
- 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; }
3193
-
3194
-
3195
-
3196
-
3197
-
3198
-
3199
-
3200
-
3201
-
3202
-
3203
- var LiveSearch = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, externalRef) {
3204
- var contentRef = props.contentRef,
3205
- popupRef = props.popupRef,
3206
- wrapperClassName = props.wrapperClassName,
3207
- controlClassName = props.controlClassName,
3208
- controlExClassName = props.controlExClassName,
3209
- optionsExClassName = props.optionsExClassName,
3210
- controlGroupWrapperClassName = props.controlGroupWrapperClassName,
3211
- controlGroupTextClassName = props.controlGroupTextClassName,
3212
- exceededSidePosOffset = props.exceededSidePosOffset,
3213
- appearance = props.appearance,
3214
- isSearchInput = props.isSearchInput,
3215
- loader = props.loader,
3216
- readOnly = props.readOnly,
3217
- disabled = props.disabled,
3218
- required = props.required,
3219
- placeholder = props.placeholder,
3220
- noMatchPopup = props.noMatchPopup,
3221
- options = props.options,
3222
- value = props.value,
3223
- label = props.label,
3224
- name = props.name,
3225
- units = props.units,
3226
- iconLeft = props.iconLeft,
3227
- iconRight = props.iconRight,
3228
- minLength = props.minLength,
3229
- maxLength = props.maxLength,
3230
- id = props.id,
3231
- autoComplete = props.autoComplete,
3232
- autoCapitalize = props.autoCapitalize,
3233
- spellCheck = props.spellCheck,
3234
- icon = props.icon,
3235
- btnId = props.btnId,
3236
- fetchTrigger = props.fetchTrigger,
3237
- hideIcon = props.hideIcon,
3238
- renderOption = props.renderOption,
3239
- depth = props.depth,
3240
- style = props.style,
3241
- winWidth = props.winWidth,
3242
- tabIndex = props.tabIndex,
3243
- data = props.data,
3244
- autoShowOptions = props.autoShowOptions,
3245
- _props$fetchNoneInfo = props.fetchNoneInfo,
3246
- fetchNoneInfo = _props$fetchNoneInfo === void 0 ? 'No match yet' : _props$fetchNoneInfo,
3247
- fetchUpdate = props.fetchUpdate,
3248
- fetchFuncAsync = props.fetchFuncAsync,
3249
- fetchFuncMethod = props.fetchFuncMethod,
3250
- fetchFuncMethodParams = props.fetchFuncMethodParams,
3251
- fetchCallback = props.fetchCallback,
3252
- onClick = props.onClick,
3253
- onFetch = props.onFetch,
3254
- onChange = props.onChange,
3255
- onKeyboardInput = props.onKeyboardInput,
3256
- onBlur = props.onBlur,
3257
- _onPressEnter = props.onPressEnter,
3258
- attributes = _objectWithoutProperties(props, _excluded);
3259
- var QUERY_STRING_PLACEHOLDER = '------'; // Invalid parameters for the first automatic request
3260
- var DEPTH = depth || 1055; // the default value same as bootstrap
3261
- var POS_OFFSET = 0;
3262
- var EXCEEDED_SIDE_POS_OFFSET = Number(exceededSidePosOffset) || 15;
3263
- var AUTO_SHOW_OPTIONS = typeof autoShowOptions !== 'undefined' && autoShowOptions === true ? true : false;
3264
- var MANUAL_REQ = typeof fetchTrigger !== 'undefined' && fetchTrigger === true ? true : false; // Manual requests
3265
- var MIN_SPACE_FOR_DROPDOWN = 200; // Minimum space needed to show dropdown below trigger
3266
-
3267
- var NO_MATCH_POPUP = typeof noMatchPopup === 'undefined' ? true : noMatchPopup;
3268
- var WIN_WIDTH = typeof winWidth === 'function' ? winWidth() : winWidth ? winWidth : 'auto';
3269
- var uniqueID = funda_utils_dist_cjs_useComId__WEBPACK_IMPORTED_MODULE_3___default()();
3270
- var idRes = id || uniqueID;
3271
- var rootRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
3272
- var inputRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
3273
- var listRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
3274
- var listContentRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
3275
- var optionsRes = options ? (0,funda_utils_dist_cjs_validate__WEBPACK_IMPORTED_MODULE_4__.isJSON)(options) ? JSON.parse(options) : options : [];
3276
-
3277
- // return a array of options
3278
- var staticOptionsData = optionsRes;
3279
-
3280
- //
3281
- var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
3282
- _useState2 = _slicedToArray(_useState, 2),
3283
- controlTempValue = _useState2[0],
3284
- setControlTempValue = _useState2[1]; // Storage for temporary input
3285
- var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
3286
- _useState4 = _slicedToArray(_useState3, 2),
3287
- firstFetch = _useState4[0],
3288
- setFirstFetch = _useState4[1];
3289
- var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(staticOptionsData),
3290
- _useState6 = _slicedToArray(_useState5, 2),
3291
- dataInit = _useState6[0],
3292
- setOrginalDataInit = _useState6[1];
3293
- var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]),
3294
- _useState8 = _slicedToArray(_useState7, 2),
3295
- orginalData = _useState8[0],
3296
- setOrginalData = _useState8[1];
3297
- var _useState9 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(value || ''),
3298
- _useState10 = _slicedToArray(_useState9, 2),
3299
- changedVal = _useState10[0],
3300
- setChangedVal = _useState10[1];
3301
- var _useState11 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
3302
- _useState12 = _slicedToArray(_useState11, 2),
3303
- isOpen = _useState12[0],
3304
- setIsOpen = _useState12[1];
3305
- var _useState13 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
3306
- _useState14 = _slicedToArray(_useState13, 2),
3307
- hasErr = _useState14[0],
3308
- setHasErr = _useState14[1];
3309
- var _useState15 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
3310
- _useState16 = _slicedToArray(_useState15, 2),
3311
- componentFirstLoad = _useState16[0],
3312
- setComponentFirstLoad = _useState16[1];
3313
- var _useState17 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
3314
- _useState18 = _slicedToArray(_useState17, 2),
3315
- reqProgress = _useState18[0],
3316
- setReqProgress = _useState18[1];
3317
-
3318
- // Mark whether it is out of focus
3319
- // Fixed the issue that caused the pop-up window to still display due to
3320
- // the delayed close in handleBlur and the timing of the call to popwinPosInit
3321
- var isBlurringRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(false);
3322
-
3323
- //performance
3324
- var handleChangeFetchSafe = funda_utils_dist_cjs_useDebounce__WEBPACK_IMPORTED_MODULE_7___default()(function (e) {
3325
- handleChange(e);
3326
- }, 350, [dataInit]);
3327
-
3328
- // exposes the following methods
3329
- (0,react__WEBPACK_IMPORTED_MODULE_0__.useImperativeHandle)(popupRef, function () {
3330
- return {
3331
- close: function close() {
3332
- cancel();
3333
- },
3334
- open: function open() {
3335
- activate();
3336
- }
3337
- };
3338
- }, [popupRef]);
3339
-
3340
- // exposes the following methods
3341
- (0,react__WEBPACK_IMPORTED_MODULE_0__.useImperativeHandle)(contentRef, function () {
3342
- return {
3343
- control: function control() {
3344
- return inputRef.current;
3345
- },
3346
- getLatestVal: function getLatestVal() {
3347
- return changedVal || '';
3348
- },
3349
- clear: function clear(cb) {
3350
- setChangedVal('');
3351
- cb === null || cb === void 0 ? void 0 : cb();
3352
- onChange === null || onChange === void 0 ? void 0 : onChange(inputRef.current, [], '', listRef.current);
3353
- },
3354
- set: function set(value, cb) {
3355
- setChangedVal("".concat(value));
3356
- cb === null || cb === void 0 ? void 0 : cb();
3357
- onChange === null || onChange === void 0 ? void 0 : onChange(inputRef.current, [], '', listRef.current);
3358
- }
3359
- };
3360
- }, [contentRef]);
3361
-
3362
- // click outside
3363
- funda_utils_dist_cjs_useClickOutside__WEBPACK_IMPORTED_MODULE_6___default()({
3364
- enabled: isOpen && rootRef.current && listRef.current,
3365
- isOutside: function isOutside(event) {
3366
- // close dropdown when other dropdown is opened
3367
- return rootRef.current !== event.target && !rootRef.current.contains(event.target) && listRef.current !== event.target && !listRef.current.contains(event.target);
3368
- },
3369
- handle: function handle(event) {
3370
- // cancel
3371
- cancel();
3372
- }
3373
- }, [isOpen, rootRef, listRef]);
3374
-
3375
- // Only single symbols such as , #, and @ are allowed, and , a, a, , etc. are not allowed.
3376
- var isSingleSpecialChar = function isSingleSpecialChar(str) {
3377
- return typeof str === 'string' && /^[^\w\s]$/.test(str);
3378
- };
3379
-
3380
- // Add function to the element that should be used as the scrollable area.
3381
- var _useWindowScroll = funda_utils_dist_cjs_useWindowScroll__WEBPACK_IMPORTED_MODULE_5___default()({
3382
- performance: ['debounce', 500],
3383
- // "['debounce', 500]" or "['throttle', 500]"
3384
- handle: function handle(scrollData) {
3385
- popwinPosInit(false);
3386
- }
3387
- }),
3388
- _useWindowScroll2 = _slicedToArray(_useWindowScroll, 2),
3389
- scrollData = _useWindowScroll2[0],
3390
- windowScrollUpdate = _useWindowScroll2[1];
3391
- function popwinPosInit() {
3392
- var showAct = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
3393
- if (listContentRef.current === null || inputRef.current === null) return;
3394
-
3395
- // If it is out of focus, do not perform position initialization
3396
- if (isBlurringRef.current && !MANUAL_REQ) return;
3397
-
3398
- //
3399
- var contentMaxHeight = 0;
3400
-
3401
- // update modal position
3402
- var _modalRef = document.querySelector("#livesearch__options-wrapper-".concat(idRes));
3403
- var _triggerRef = inputRef.current;
3404
-
3405
- // console.log(getAbsolutePositionOfStage(_triggerRef));
3406
-
3407
- if (_modalRef === null) return;
3408
- var _getAbsolutePositionO = (0,funda_utils_dist_cjs_getElementProperty__WEBPACK_IMPORTED_MODULE_8__.getAbsolutePositionOfStage)(_triggerRef),
3409
- x = _getAbsolutePositionO.x;
3410
- var _getAbsolutePositionO2 = (0,funda_utils_dist_cjs_getElementProperty__WEBPACK_IMPORTED_MODULE_8__.getAbsolutePositionOfStage)(_triggerRef),
3411
- y = _getAbsolutePositionO2.y,
3412
- width = _getAbsolutePositionO2.width,
3413
- height = _getAbsolutePositionO2.height;
3414
- var _triggerBox = _triggerRef.getBoundingClientRect();
3415
- var targetPos = '';
3416
-
3417
- // STEP 1:
3418
- //-----------
3419
- // display wrapper
3420
- if (showAct) _modalRef.classList.add('active');
3421
-
3422
- // STEP 2:
3423
- //-----------
3424
- // Detect position
3425
- if (window.innerHeight - _triggerBox.top > MIN_SPACE_FOR_DROPDOWN) {
3426
- targetPos = 'bottom';
3427
- } else {
3428
- targetPos = 'top';
3429
- }
3430
- if (typeof listContentRef.current.dataset.pos === 'undefined') listContentRef.current.dataset.pos = targetPos;
3431
-
3432
- // STEP 3:
3433
- //-----------
3434
- // Detect content MAX HEIGHT and ACTUAL HEIGHT
3435
- var _contentBox = listContentRef.current.getBoundingClientRect();
3436
- var _contentActualHeight = listContentRef.current.querySelector('.livesearch__options-contentlist-inner').clientHeight;
3437
- if (targetPos === 'top') {
3438
- contentMaxHeight = _triggerBox.top;
3439
-
3440
- // Calculate the final height with minimum height protection
3441
- var contentHeightOffset = 0;
3442
- var finalHeight = Math.max(contentMaxHeight - contentHeightOffset, 150); // Ensure minimum height of 150px
3443
-
3444
- if (_contentBox.height > _contentActualHeight) {
3445
- if (_contentActualHeight > 0) listContentRef.current.style.height = _contentActualHeight + 'px';
3446
- } else {
3447
- if (_contentActualHeight > 0) listContentRef.current.style.height = _contentActualHeight + 'px';
3448
-
3449
- // recalculate the height
3450
- _contentBox = listContentRef.current.getBoundingClientRect();
3451
- if (_contentBox.height > contentMaxHeight) listContentRef.current.style.height = finalHeight + 'px';
3452
- }
3453
- }
3454
- if (targetPos === 'bottom') {
3455
- contentMaxHeight = window.innerHeight - _triggerBox.bottom;
3456
-
3457
- // Calculate the final height with minimum height protection
3458
- var _contentHeightOffset = 10;
3459
- var _finalHeight = Math.max(contentMaxHeight - _contentHeightOffset, 150); // Ensure minimum height of 150px
3460
-
3461
- if (_contentBox.height > _contentActualHeight) {
3462
- if (_contentActualHeight > 0) listContentRef.current.style.height = _contentActualHeight + 'px';
3463
- } else {
3464
- if (_contentActualHeight > 0) listContentRef.current.style.height = _contentActualHeight + 'px';
3465
-
3466
- // recalculate the height
3467
- _contentBox = listContentRef.current.getBoundingClientRect();
3468
- if (_contentBox.height > contentMaxHeight) listContentRef.current.style.height = _finalHeight + 'px';
3469
- }
3470
- }
3471
-
3472
- // STEP 4:
3473
- //-----------
3474
- // Adjust position
3475
- if (targetPos === 'top') {
3476
- _modalRef.style.left = x + 'px';
3477
- //_modalRef.style.top = y - POS_OFFSET - (listRef.current.clientHeight) - 2 + 'px';
3478
- _modalRef.style.top = 'auto';
3479
- _modalRef.style.bottom = window.innerHeight - _triggerBox.top + POS_OFFSET + 2 + 'px';
3480
- _modalRef.style.setProperty('position', 'fixed', 'important');
3481
- _modalRef.classList.add('pos-top');
3482
- }
3483
- if (targetPos === 'bottom') {
3484
- _modalRef.style.left = x + 'px';
3485
- _modalRef.style.bottom = 'auto';
3486
- _modalRef.style.top = y + height + POS_OFFSET + 'px';
3487
- _modalRef.style.setProperty('position', 'absolute', 'important');
3488
- _modalRef.classList.remove('pos-top');
3489
- }
3490
-
3491
- // STEP 5:
3492
- //-----------
3493
- // Determine whether it exceeds the far right or left side of the screen
3494
- var _modalContent = _modalRef;
3495
- var _modalBox = _modalContent.getBoundingClientRect();
3496
- if (typeof _modalContent.dataset.offset === 'undefined' && _modalBox.left > 0) {
3497
- // 10 pixels is used to account for some bias in mobile devices
3498
- if (_modalBox.right + 10 > window.innerWidth) {
3499
- var _modalOffsetPosition = _modalBox.right - window.innerWidth + EXCEEDED_SIDE_POS_OFFSET;
3500
- _modalContent.dataset.offset = _modalOffsetPosition;
3501
- _modalContent.style.marginLeft = "-".concat(_modalOffsetPosition, "px");
3502
- // console.log('_modalPosition: ', _modalOffsetPosition)
3503
- }
3504
-
3505
- if (_modalBox.left - 10 < 0) {
3506
- var _modalOffsetPosition2 = Math.abs(_modalBox.left) + EXCEEDED_SIDE_POS_OFFSET;
3507
- _modalContent.dataset.offset = _modalOffsetPosition2;
3508
- _modalContent.style.marginLeft = "".concat(_modalOffsetPosition2, "px");
3509
- // console.log('_modalPosition: ', _modalOffsetPosition)
3510
- }
3511
- }
3512
- }
3513
-
3514
- function popwinPosHide() {
3515
- var _modalRef = document.querySelector("#livesearch__options-wrapper-".concat(idRes));
3516
- if (_modalRef !== null && listContentRef.current !== null) {
3517
- // remove classnames and styles
3518
- _modalRef.classList.remove('active');
3519
- listContentRef.current.style.removeProperty('height');
3520
-
3521
- // remove data-* attibutes
3522
- popwinContainerHeightReset();
3523
- }
3524
- }
3525
- function popwinContainerHeightReset() {
3526
- if (listContentRef.current === null) return;
3527
-
3528
- // remove data-* attibutes
3529
- listContentRef.current.removeAttribute('data-height');
3530
- listContentRef.current.removeAttribute('data-pos');
3531
- }
3532
-
3533
- //
3534
- function matchData() {
3535
- return _matchData.apply(this, arguments);
3536
- }
3537
- function _matchData() {
3538
- _matchData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
3539
- var val,
3540
- query,
3541
- emptyValShowAll,
3542
- res,
3543
- filterRes,
3544
- _oparams,
3545
- _params,
3546
- response,
3547
- _args = arguments;
3548
- return _regeneratorRuntime().wrap(function _callee$(_context) {
3549
- while (1) switch (_context.prev = _context.next) {
3550
- case 0:
3551
- val = _args.length > 0 && _args[0] !== undefined ? _args[0] : '';
3552
- query = _args.length > 1 && _args[1] !== undefined ? _args[1] : false;
3553
- emptyValShowAll = _args.length > 2 && _args[2] !== undefined ? _args[2] : false;
3554
- res = [];
3555
- filterRes = function filterRes(data) {
3556
- return data.filter(function (item) {
3557
- // Avoid fatal errors causing page crashes
3558
- var _queryString = typeof item.queryString !== 'undefined' && item.queryString !== null ? item.queryString : '';
3559
- var _val = typeof val !== 'undefined' && val !== null ? val : '';
3560
-
3561
- // STEP 1
3562
- //========
3563
- if (emptyValShowAll && _val === '') {
3564
- return true;
3565
- }
3566
-
3567
- // STEP 2
3568
- //========
3569
- // @@@ This code is triggered only if a custom request is used to update "options" @@@
3570
- if (query && _val == ' ') {
3571
- return true;
3572
- }
3573
-
3574
- // STEP 3
3575
- //========
3576
- // @@@ This code is triggered only if a custom request is used to update "options" @@@
3577
- if (query && _val != '' && isSingleSpecialChar(_val)) {
3578
- return true;
3579
- }
3580
-
3581
- // STEP 4
3582
- //========
3583
- if ((_queryString.split(',').some(function (l) {
3584
- return l.charAt(0) === _val.toLowerCase();
3585
- }) || _queryString.split(',').some(function (l) {
3586
- return l.replace(/ /g, '').indexOf(_val.toLowerCase()) >= 0;
3587
- }) || item.label.toLowerCase().indexOf(_val.toLowerCase()) >= 0) && _val != '') {
3588
- return true;
3589
- } else {
3590
- return false;
3591
- }
3592
- });
3593
- };
3594
- if (!query) {
3595
- _context.next = 15;
3596
- break;
3597
- }
3598
- _oparams = fetchFuncMethodParams || [];
3599
- _params = _oparams.map(function (item) {
3600
- return item !== '$QUERY_STRING' ? item : val;
3601
- });
3602
- _context.next = 10;
3603
- return fetchData(_params.join(','));
3604
- case 10:
3605
- response = _context.sent;
3606
- res = filterRes(response);
3607
- return _context.abrupt("return", res);
3608
- case 15:
3609
- res = filterRes(dataInit);
3610
- return _context.abrupt("return", res);
3611
- case 17:
3612
- case "end":
3613
- return _context.stop();
3614
- }
3615
- }, _callee);
3616
- }));
3617
- return _matchData.apply(this, arguments);
3618
- }
3619
- function handleChange(e) {
3620
- var val = e.target.value;
3621
- setChangedVal(val);
3622
-
3623
- // update temporary value
3624
- setControlTempValue(val);
3625
-
3626
- //
3627
- if (!MANUAL_REQ) {
3628
- matchData(val, fetchUpdate, AUTO_SHOW_OPTIONS).then(function (response) {
3629
- setOrginalData(response);
3630
-
3631
- //
3632
- onChange === null || onChange === void 0 ? void 0 : onChange(inputRef.current, response, '', listRef.current);
3633
-
3634
- //
3635
- setIsOpen(true);
3636
-
3637
- // window position
3638
- setTimeout(function () {
3639
- popwinPosInit();
3640
- }, 0);
3641
- });
3642
- } else {
3643
- //
3644
- onChange === null || onChange === void 0 ? void 0 : onChange(inputRef.current, orginalData, '', listRef.current);
3645
-
3646
- // window position
3647
- setTimeout(function () {
3648
- popwinPosInit();
3649
- }, 0);
3650
- }
3651
- }
3652
- function cancel() {
3653
- // hide list
3654
- setIsOpen(false);
3655
-
3656
- //
3657
- setOrginalData([]);
3658
- popwinPosHide();
3659
-
3660
- // update temporary value
3661
- setControlTempValue(null);
3662
- }
3663
- function fetchData(_x2) {
3664
- return _fetchData.apply(this, arguments);
3665
- }
3666
- function _fetchData() {
3667
- _fetchData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
3668
- var response, _ORGIN_DATA;
3669
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
3670
- while (1) switch (_context2.prev = _context2.next) {
3671
- case 0:
3672
- // update request process
3673
- setReqProgress(true);
3674
-
3675
- //
3676
- if (!(_typeof(fetchFuncAsync) === 'object')) {
3677
- _context2.next = 15;
3678
- break;
3679
- }
3680
- _context2.next = 4;
3681
- return fetchFuncAsync["".concat(fetchFuncMethod)].apply(fetchFuncAsync, _toConsumableArray(params.split(',')));
3682
- case 4:
3683
- response = _context2.sent;
3684
- _ORGIN_DATA = response.data; // reset data structure
3685
- if (typeof fetchCallback === 'function') {
3686
- _ORGIN_DATA = fetchCallback(_ORGIN_DATA);
3687
- }
3688
-
3689
- // Determine whether the data structure matches
3690
- if (_ORGIN_DATA.length > 0 && typeof _ORGIN_DATA[0].value === 'undefined') {
3691
- console.warn('The data structure does not match, please refer to the example in the component documentation.');
3692
- setHasErr(true);
3693
- _ORGIN_DATA = [];
3694
- }
3695
-
3696
- //
3697
- onFetch === null || onFetch === void 0 ? void 0 : onFetch(_ORGIN_DATA);
3698
-
3699
- //
3700
- setOrginalDataInit(_ORGIN_DATA);
3701
-
3702
- //
3703
- // window position
3704
- if (componentFirstLoad) {
3705
- setTimeout(function () {
3706
- popwinPosInit();
3707
- }, 500);
3708
- }
3709
-
3710
- // update request process
3711
- setReqProgress(false);
3712
- return _context2.abrupt("return", _ORGIN_DATA);
3713
- case 15:
3714
- // update request process
3715
- setReqProgress(false);
3716
- return _context2.abrupt("return", []);
3717
- case 17:
3718
- case "end":
3719
- return _context2.stop();
3720
- }
3721
- }, _callee2);
3722
- }));
3723
- return _fetchData.apply(this, arguments);
3724
- }
3725
- function handleSelect(_x3) {
3726
- return _handleSelect.apply(this, arguments);
3727
- }
3728
- function _handleSelect() {
3729
- _handleSelect = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(el) {
3730
- var dataInput,
3731
- _data,
3732
- _curData,
3733
- _data2,
3734
- res,
3735
- _args3 = arguments;
3736
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
3737
- while (1) switch (_context3.prev = _context3.next) {
3738
- case 0:
3739
- dataInput = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : false;
3740
- if (!(typeof el === 'undefined')) {
3741
- _context3.next = 3;
3742
- break;
3743
- }
3744
- return _context3.abrupt("return");
3745
- case 3:
3746
- if (!dataInput) {
3747
- _context3.next = 9;
3748
- break;
3749
- }
3750
- _data = JSON.parse(dataInput);
3751
- onChange === null || onChange === void 0 ? void 0 : onChange(inputRef.current, orginalData, _data, listRef.current);
3752
- setChangedVal(_data.label);
3753
- _context3.next = 23;
3754
- break;
3755
- case 9:
3756
- _curData = typeof el.currentTarget !== 'undefined' ? el.currentTarget.dataset.itemdata : el.dataset.itemdata;
3757
- if (!(typeof _curData === 'undefined')) {
3758
- _context3.next = 12;
3759
- break;
3760
- }
3761
- return _context3.abrupt("return");
3762
- case 12:
3763
- _data2 = JSON.parse(_curData);
3764
- res = [];
3765
- if (AUTO_SHOW_OPTIONS) {
3766
- _context3.next = 20;
3767
- break;
3768
- }
3769
- _context3.next = 17;
3770
- return matchData(inputRef.current.value, false, AUTO_SHOW_OPTIONS);
3771
- case 17:
3772
- res = _context3.sent;
3773
- _context3.next = 21;
3774
- break;
3775
- case 20:
3776
- res = dataInit;
3777
- case 21:
3778
- onChange === null || onChange === void 0 ? void 0 : onChange(inputRef.current, res, _data2, listRef.current);
3779
- setChangedVal(_data2.label);
3780
- case 23:
3781
- // cancel
3782
- cancel();
3783
- case 24:
3784
- case "end":
3785
- return _context3.stop();
3786
- }
3787
- }, _callee3);
3788
- }));
3789
- return _handleSelect.apply(this, arguments);
3790
- }
3791
- function handleFetch() {
3792
- return _handleFetch.apply(this, arguments);
3793
- }
3794
- function _handleFetch() {
3795
- _handleFetch = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
3796
- var res;
3797
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
3798
- while (1) switch (_context4.prev = _context4.next) {
3799
- case 0:
3800
- if (!MANUAL_REQ) {
3801
- _context4.next = 7;
3802
- break;
3803
- }
3804
- _context4.next = 3;
3805
- return matchData(changedVal, true, true);
3806
- case 3:
3807
- res = _context4.sent;
3808
- setOrginalData(res);
3809
-
3810
- //
3811
- setIsOpen(res.length === 0 ? true : false);
3812
-
3813
- // window position
3814
- setTimeout(function () {
3815
- popwinPosInit();
3816
- }, 0);
3817
- case 7:
3818
- case "end":
3819
- return _context4.stop();
3820
- }
3821
- }, _callee4);
3822
- }));
3823
- return _handleFetch.apply(this, arguments);
3824
- }
3825
- function activate() {
3826
- if (AUTO_SHOW_OPTIONS) {
3827
- setOrginalData(dataInit);
3828
- setIsOpen(true);
3829
- }
3830
-
3831
- // window position
3832
- setTimeout(function () {
3833
- popwinPosInit();
3834
- }, 0);
3835
- }
3836
- function handleShowList() {
3837
- // Reset the out-of-focus marker
3838
- isBlurringRef.current = false;
3839
- if (!isOpen) {
3840
- activate();
3841
- } else {
3842
- // cancel
3843
- cancel();
3844
- }
3845
-
3846
- // Every time the input changes or the search button is clicked, a data request will be triggered
3847
- if (!AUTO_SHOW_OPTIONS && (controlTempValue === '' || controlTempValue === null) || MANUAL_REQ) {
3848
- setTimeout(function () {
3849
- popwinPosHide();
3850
- }, 0);
3851
- }
3852
- onClick === null || onClick === void 0 ? void 0 : onClick(inputRef.current, listRef.current);
3853
- }
3854
- function handleBlur(e) {
3855
- // Set the out-of-focus marker
3856
- isBlurringRef.current = true;
3857
- setTimeout(function () {
3858
- // cancel
3859
- cancel(); // The delay is to avoid losing focus and not being able to click on the option
3860
-
3861
- //
3862
- onBlur === null || onBlur === void 0 ? void 0 : onBlur(inputRef.current, listRef.current);
3863
- }, 300);
3864
- }
3865
- function optionFocus(type) {
3866
- return new Promise(function (resolve) {
3867
- // Determine the "active" class name to avoid listening to other unused components of the same type
3868
- if (listRef.current === null || !rootRef.current.classList.contains('active')) return;
3869
- var options = [].slice.call(listRef.current.querySelectorAll('.list-group-item:not(.hide)'));
3870
- // Avoid selecting options that are disabled
3871
- options = options.filter(function (options) {
3872
- return !options.classList.contains('disabled');
3873
- });
3874
- var currentIndex = options.findIndex(function (e) {
3875
- return e === listRef.current.querySelector('.list-group-item.active');
3876
- });
3877
-
3878
- // get the next element in the list, "%" will loop around to 0
3879
- var nextIndex;
3880
- if (type === 'increase') {
3881
- nextIndex = currentIndex + 1 % options.length;
3882
- } else {
3883
- nextIndex = (currentIndex < 0 ? options.length : currentIndex) - 1 % options.length;
3884
- }
3885
-
3886
- //only one
3887
- if (options.length === 1) nextIndex = 0;
3888
- if (!isNaN(nextIndex)) {
3889
- options.forEach(function (node, index) {
3890
- node === null || node === void 0 ? void 0 : node.classList.remove('active');
3891
- });
3892
- var targetOption = options[nextIndex];
3893
- if (typeof targetOption !== 'undefined' && !targetOption.classList.contains('no-match')) {
3894
- targetOption.classList.add('active');
3895
- resolve(targetOption);
3896
- }
3897
- }
3898
- });
3899
- }
3900
- function handleKeyPressed(_x4) {
3901
- return _handleKeyPressed.apply(this, arguments);
3902
- }
3903
- function _handleKeyPressed() {
3904
- _handleKeyPressed = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(event) {
3905
- var key, res, currentData, _options;
3906
- return _regeneratorRuntime().wrap(function _callee5$(_context5) {
3907
- while (1) switch (_context5.prev = _context5.next) {
3908
- case 0:
3909
- key = event.code;
3910
- if (isOpen) {
3911
- _context5.next = 3;
3912
- break;
3913
- }
3914
- return _context5.abrupt("return");
3915
- case 3:
3916
- res = null;
3917
- if (!(key === 'Enter' || key === 'NumpadEnter')) {
3918
- _context5.next = 9;
3919
- break;
3920
- }
3921
- event.preventDefault();
3922
-
3923
- // Determine the "active" class name to avoid listening to other unused components of the same type
3924
- if (!(listRef.current === null || !rootRef.current.classList.contains('active'))) {
3925
- _context5.next = 8;
3926
- break;
3927
- }
3928
- return _context5.abrupt("return");
3929
- case 8:
3930
- if (listRef.current !== null) {
3931
- currentData = listRef.current.dataset.data;
3932
- if (typeof currentData !== 'undefined') {
3933
- handleSelect(null, currentData);
3934
-
3935
- //
3936
- _options = [].slice.call(listRef.current.querySelectorAll('.list-group-item:not(.no-match)'));
3937
- _options.forEach(function (node) {
3938
- node.classList.remove('active');
3939
- });
3940
-
3941
- //
3942
- onChange === null || onChange === void 0 ? void 0 : onChange(inputRef.current, _options.map(function (node) {
3943
- return JSON.parse(node.dataset.itemdata);
3944
- }), JSON.parse(currentData), listRef.current);
3945
- }
3946
- }
3947
- case 9:
3948
- if (!(key === 'ArrowUp')) {
3949
- _context5.next = 13;
3950
- break;
3951
- }
3952
- _context5.next = 12;
3953
- return optionFocus('decrease');
3954
- case 12:
3955
- res = _context5.sent;
3956
- case 13:
3957
- if (!(key === 'ArrowDown')) {
3958
- _context5.next = 17;
3959
- break;
3960
- }
3961
- _context5.next = 16;
3962
- return optionFocus('increase');
3963
- case 16:
3964
- res = _context5.sent;
3965
- case 17:
3966
- // temporary data
3967
- if (res !== null) listRef.current.dataset.data = JSON.stringify({
3968
- value: res.dataset.value,
3969
- label: res.dataset.label,
3970
- queryString: res.dataset.querystring
3971
- });
3972
- case 18:
3973
- case "end":
3974
- return _context5.stop();
3975
- }
3976
- }, _callee5);
3977
- }));
3978
- return _handleKeyPressed.apply(this, arguments);
3979
- }
3980
- (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
3981
- // Component first load
3982
- //--------------
3983
- if (!componentFirstLoad) {
3984
- setComponentFirstLoad(true);
3985
- }
3986
-
3987
- // update default value
3988
- //--------------
3989
- setChangedVal(value || '');
3990
-
3991
- // data init
3992
- //--------------
3993
- // If automatic request enabled, do not send them for the first time
3994
- if (AUTO_SHOW_OPTIONS) {
3995
- var _oparams = fetchFuncMethodParams || [];
3996
- var _params = _oparams.map(function (item) {
3997
- return item !== '$QUERY_STRING' ? item : MANUAL_REQ && !fetchUpdate ? '' : fetchUpdate ? QUERY_STRING_PLACEHOLDER : MANUAL_REQ ? QUERY_STRING_PLACEHOLDER : '';
3998
- });
3999
- if (!firstFetch) {
4000
- fetchData(_params.join(','));
4001
- setFirstFetch(true); // avoid triggering two data requests if the input value has not changed
4002
- }
4003
- }
4004
- }, [value, data]);
4005
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, label ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
4006
- className: "livesearch__wrapper__label"
4007
- }, typeof label === 'string' ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("label", {
4008
- htmlFor: "label-".concat(idRes),
4009
- className: "form-label",
4010
- dangerouslySetInnerHTML: {
4011
- __html: "".concat(label)
4012
- }
4013
- }) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("label", {
4014
- htmlFor: "label-".concat(idRes),
4015
- className: "form-label"
4016
- }, label))) : null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
4017
- ref: rootRef,
4018
- className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_9__.combinedCls)('livesearch__wrapper', (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_9__.clsWrite)(wrapperClassName, 'mb-3 position-relative'), {
4019
- 'active': isOpen
4020
- }),
4021
- onKeyDown: handleKeyPressed
4022
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((funda_searchbar__WEBPACK_IMPORTED_MODULE_2___default()), _extends({
4023
- wrapperClassName: "",
4024
- controlClassName: controlClassName,
4025
- controlExClassName: controlExClassName,
4026
- controlGroupWrapperClassName: controlGroupWrapperClassName,
4027
- controlGroupTextClassName: controlGroupTextClassName,
4028
- ref: function ref(node) {
4029
- inputRef.current = node;
4030
- if (typeof externalRef === 'function') {
4031
- externalRef(node);
4032
- } else if (externalRef) {
4033
- externalRef.current = node;
4034
- }
4035
- },
4036
- value: changedVal,
4037
- label: "",
4038
- tabIndex: tabIndex,
4039
- id: idRes,
4040
- name: name,
4041
- placeholder: placeholder,
4042
- units: units,
4043
- iconLeft: iconLeft,
4044
- iconRight: iconRight,
4045
- minLength: minLength,
4046
- maxLength: maxLength,
4047
- disabled: disabled,
4048
- required: required,
4049
- readOnly: readOnly,
4050
- style: style,
4051
- appearance: appearance,
4052
- onChange: function onChange(e) {
4053
- handleChangeFetchSafe(e);
4054
- },
4055
- onBlur: handleBlur,
4056
- onSubmit: handleFetch,
4057
- onClick: handleShowList,
4058
- icon: hideIcon ? '' : !MANUAL_REQ ? '' : icon,
4059
- btnId: btnId,
4060
- autoComplete: typeof autoComplete === 'undefined' ? 'off' : autoComplete,
4061
- autoCapitalize: typeof autoCapitalize === 'undefined' ? 'off' : autoCapitalize,
4062
- spellCheck: typeof spellCheck === 'undefined' ? false : spellCheck,
4063
- isSearchInput: isSearchInput,
4064
- onKeyPressedCallback: function onKeyPressedCallback(e) {
4065
- onKeyboardInput === null || onKeyboardInput === void 0 ? void 0 : onKeyboardInput(e, inputRef.current, listRef.current);
4066
- },
4067
- onPressEnter: function onPressEnter(event, onComposition) {
4068
- _onPressEnter === null || _onPressEnter === void 0 ? void 0 : _onPressEnter(event, onComposition);
4069
- }
4070
- }, attributes)), orginalData && !hasErr ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((funda_root_portal__WEBPACK_IMPORTED_MODULE_1___default()), {
4071
- show: true,
4072
- containerClassName: "LiveSearch"
4073
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
4074
- ref: listRef,
4075
- id: "livesearch__options-wrapper-".concat(idRes),
4076
- className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_9__.combinedCls)('livesearch__options-wrapper list-group position-absolute border shadow small', optionsExClassName, {
4077
- 'shadow-none border-0': orginalData && orginalData.length === 0 && !NO_MATCH_POPUP
4078
- }),
4079
- style: {
4080
- zIndex: DEPTH,
4081
- width: WIN_WIDTH,
4082
- display: 'none'
4083
- },
4084
- role: "tablist"
4085
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
4086
- className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_9__.combinedCls)('livesearch__options-contentlist rounded', {
4087
- 'd-none': orginalData && orginalData.length === 0 && !NO_MATCH_POPUP
4088
- }),
4089
- ref: listContentRef
4090
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
4091
- className: "livesearch__options-contentlist-inner"
4092
- }, orginalData && orginalData.length === 0 ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
4093
- tabIndex: -1,
4094
- type: "button",
4095
- className: "list-group-item list-group-item-action border-top-0 border-bottom-0 no-match livesearch__control-option-item--nomatch",
4096
- disabled: true
4097
- }, fetchNoneInfo)) : null, orginalData ? orginalData.map(function (item, index) {
4098
- var startItemBorder = index === 0 ? 'border-top-0' : '';
4099
- var endItemBorder = index === orginalData.length - 1 ? 'border-bottom-0' : '';
4100
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
4101
- tabIndex: -1,
4102
- type: "button",
4103
- "data-index": index,
4104
- key: index,
4105
- className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_9__.combinedCls)('list-group-item list-group-item-action border-start-0 border-end-0 border-top-0 border-bottom-0 livesearch__control-option-item', startItemBorder, endItemBorder, {
4106
- 'disabled': item.disabled
4107
- }),
4108
- "data-value": "".concat(item.value),
4109
- "data-label": "".concat(item.label),
4110
- "data-querystring": "".concat(typeof item.queryString === 'undefined' ? '' : item.queryString),
4111
- "data-itemdata": JSON.stringify(item),
4112
- "data-list-item-label": "".concat(typeof item.listItemLabel === 'undefined' ? '' : item.listItemLabel),
4113
- role: "tab",
4114
- onClick: handleSelect
4115
- }, typeof renderOption === 'function' ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, renderOption(item, index)) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {
4116
- dangerouslySetInnerHTML: {
4117
- __html: typeof item.listItemLabel === 'undefined' ? item.label : item.listItemLabel
4118
- }
4119
- })));
4120
- }) : null))))) : null, reqProgress ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
4121
- className: "livesearch-loader ".concat(!hideIcon ? 'pos-offset' : '')
4122
- }, loader || /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
4123
- height: "12px",
4124
- width: "12px",
4125
- viewBox: "0 0 512 512"
4126
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
4127
- fill: "inherit",
4128
- 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"
4129
- }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
4130
- fill: "inherit",
4131
- 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"
4132
- }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
4133
- fill: "inherit",
4134
- 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"
4135
- }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
4136
- fill: "inherit",
4137
- 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"
4138
- }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
4139
- fill: "inherit",
4140
- 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"
4141
- }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
4142
- fill: "inherit",
4143
- 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"
4144
- }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
4145
- fill: "inherit",
4146
- 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"
4147
- }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
4148
- fill: "inherit",
4149
- 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"
4150
- }))))) : null, hideIcon ? null : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {
4151
- className: "livesearch__wrapper-searchbtn"
4152
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
4153
- tabIndex: -1,
4154
- type: "button",
4155
- className: "btn border-end-0 rounded-pill",
4156
- style: MANUAL_REQ ? undefined : {
4157
- pointerEvents: 'none'
4158
- },
4159
- onClick: function onClick(e) {
4160
- e.preventDefault();
4161
- e.stopPropagation();
4162
- handleFetch();
4163
- }
4164
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
4165
- width: "1em",
4166
- height: "1em",
4167
- fill: "#a5a5a5",
4168
- viewBox: "0 0 16 16"
4169
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
4170
- d: "M12.027 9.92L16 13.95 14 16l-4.075-3.976A6.465 6.465 0 0 1 6.5 13C2.91 13 0 10.083 0 6.5 0 2.91 2.917 0 6.5 0 10.09 0 13 2.917 13 6.5a6.463 6.463 0 0 1-.973 3.42zM1.997 6.452c0 2.48 2.014 4.5 4.5 4.5 2.48 0 4.5-2.015 4.5-4.5 0-2.48-2.015-4.5-4.5-4.5-2.48 0-4.5 2.014-4.5 4.5z",
4171
- fillRule: "evenodd"
4172
- })))))));
4173
- });
4174
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (LiveSearch);
4175
- })();
4176
-
4177
- /******/ return __webpack_exports__;
4178
- /******/ })()
4179
- ;
4180
- });