funda-ui 4.5.712 → 4.5.713

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (483) hide show
  1. package/README.md +4 -105
  2. package/package.json +44 -41
  3. package/.gitattributes +0 -2
  4. package/README_PUBLISH.md +0 -126
  5. package/logo.png +0 -0
  6. package/preview.png +0 -0
  7. package/publish/LICENSE +0 -21
  8. package/publish/README.md +0 -126
  9. package/publish/lib/cjs/Accordion/index.d.ts +0 -2
  10. package/publish/lib/cjs/Accordion/index.js +0 -1035
  11. package/publish/lib/cjs/BackToTop/index.d.ts +0 -17
  12. package/publish/lib/cjs/BackToTop/index.js +0 -904
  13. package/publish/lib/cjs/CascadingSelect/index.d.ts +0 -60
  14. package/publish/lib/cjs/CascadingSelect/index.js +0 -2943
  15. package/publish/lib/cjs/CascadingSelectE2E/index.d.ts +0 -71
  16. package/publish/lib/cjs/CascadingSelectE2E/index.js +0 -3540
  17. package/publish/lib/cjs/Checkbox/index.d.ts +0 -28
  18. package/publish/lib/cjs/Checkbox/index.js +0 -662
  19. package/publish/lib/cjs/ColorPicker/index.d.ts +0 -27
  20. package/publish/lib/cjs/ColorPicker/index.js +0 -662
  21. package/publish/lib/cjs/Date/index.d.ts +0 -70
  22. package/publish/lib/cjs/Date/index.js +0 -6200
  23. package/publish/lib/cjs/DigitalClock/index.d.ts +0 -7
  24. package/publish/lib/cjs/DigitalClock/index.js +0 -402
  25. package/publish/lib/cjs/DragDropList/index.d.ts +0 -44
  26. package/publish/lib/cjs/DragDropList/index.js +0 -1587
  27. package/publish/lib/cjs/DropdownMenu/index.d.ts +0 -38
  28. package/publish/lib/cjs/DropdownMenu/index.js +0 -1498
  29. package/publish/lib/cjs/DynamicFields/index.d.ts +0 -40
  30. package/publish/lib/cjs/DynamicFields/index.js +0 -810
  31. package/publish/lib/cjs/EventCalendar/index.d.ts +0 -61
  32. package/publish/lib/cjs/EventCalendar/index.js +0 -3740
  33. package/publish/lib/cjs/EventCalendarTimeline/index.d.ts +0 -100
  34. package/publish/lib/cjs/EventCalendarTimeline/index.js +0 -6084
  35. package/publish/lib/cjs/File/index.d.ts +0 -40
  36. package/publish/lib/cjs/File/index.js +0 -1751
  37. package/publish/lib/cjs/HorizontalScrollContent/index.d.ts +0 -14
  38. package/publish/lib/cjs/HorizontalScrollContent/index.js +0 -426
  39. package/publish/lib/cjs/Input/index.d.ts +0 -59
  40. package/publish/lib/cjs/Input/index.js +0 -1455
  41. package/publish/lib/cjs/LiveSearch/index.d.ts +0 -69
  42. package/publish/lib/cjs/LiveSearch/index.js +0 -3626
  43. package/publish/lib/cjs/MasonryLayout/index.d.ts +0 -14
  44. package/publish/lib/cjs/MasonryLayout/index.js +0 -689
  45. package/publish/lib/cjs/ModalDialog/index.d.ts +0 -79
  46. package/publish/lib/cjs/ModalDialog/index.js +0 -1695
  47. package/publish/lib/cjs/ModeSwitch/index.d.ts +0 -17
  48. package/publish/lib/cjs/ModeSwitch/index.js +0 -202
  49. package/publish/lib/cjs/MultilevelDropdownMenu/index.d.ts +0 -20
  50. package/publish/lib/cjs/MultilevelDropdownMenu/index.js +0 -930
  51. package/publish/lib/cjs/MultipleCheckboxes/index.d.ts +0 -41
  52. package/publish/lib/cjs/MultipleCheckboxes/index.js +0 -1717
  53. package/publish/lib/cjs/MultipleSelect/index.d.ts +0 -65
  54. package/publish/lib/cjs/MultipleSelect/index.js +0 -3704
  55. package/publish/lib/cjs/NativeSelect/index.d.ts +0 -37
  56. package/publish/lib/cjs/NativeSelect/index.js +0 -1631
  57. package/publish/lib/cjs/NumberInput/index.d.ts +0 -40
  58. package/publish/lib/cjs/NumberInput/index.js +0 -1188
  59. package/publish/lib/cjs/Pagination/index.d.ts +0 -51
  60. package/publish/lib/cjs/Pagination/index.js +0 -612
  61. package/publish/lib/cjs/Radio/index.d.ts +0 -45
  62. package/publish/lib/cjs/Radio/index.js +0 -1391
  63. package/publish/lib/cjs/RangeSlider/index.d.ts +0 -22
  64. package/publish/lib/cjs/RangeSlider/index.js +0 -2665
  65. package/publish/lib/cjs/RootPortal/index.d.ts +0 -8
  66. package/publish/lib/cjs/RootPortal/index.js +0 -141
  67. package/publish/lib/cjs/ScrollReveal/index.d.ts +0 -21
  68. package/publish/lib/cjs/ScrollReveal/index.js +0 -401
  69. package/publish/lib/cjs/Scrollbar/index.d.ts +0 -17
  70. package/publish/lib/cjs/Scrollbar/index.js +0 -1107
  71. package/publish/lib/cjs/SearchBar/index.d.ts +0 -41
  72. package/publish/lib/cjs/SearchBar/index.js +0 -701
  73. package/publish/lib/cjs/Select/index.d.ts +0 -99
  74. package/publish/lib/cjs/Select/index.js +0 -5697
  75. package/publish/lib/cjs/ShowMoreLess/index.d.ts +0 -36
  76. package/publish/lib/cjs/ShowMoreLess/index.js +0 -387
  77. package/publish/lib/cjs/Switch/index.d.ts +0 -25
  78. package/publish/lib/cjs/Switch/index.js +0 -628
  79. package/publish/lib/cjs/Table/index.d.ts +0 -12
  80. package/publish/lib/cjs/Table/index.js +0 -2062
  81. package/publish/lib/cjs/Tabs/index.d.ts +0 -3
  82. package/publish/lib/cjs/Tabs/index.js +0 -771
  83. package/publish/lib/cjs/TagInput/index.d.ts +0 -31
  84. package/publish/lib/cjs/TagInput/index.js +0 -1144
  85. package/publish/lib/cjs/Textarea/index.d.ts +0 -50
  86. package/publish/lib/cjs/Textarea/index.js +0 -1784
  87. package/publish/lib/cjs/Toast/index.d.ts +0 -34
  88. package/publish/lib/cjs/Toast/index.js +0 -861
  89. package/publish/lib/cjs/Tooltip/index.d.ts +0 -23
  90. package/publish/lib/cjs/Tooltip/index.js +0 -1674
  91. package/publish/lib/cjs/Tree/index.d.ts +0 -62
  92. package/publish/lib/cjs/Tree/index.js +0 -1960
  93. package/publish/lib/cjs/Utils/anim.d.ts +0 -11
  94. package/publish/lib/cjs/Utils/anim.js +0 -400
  95. package/publish/lib/cjs/Utils/bodyScrollLock.d.ts +0 -8
  96. package/publish/lib/cjs/Utils/bodyScrollLock.js +0 -311
  97. package/publish/lib/cjs/Utils/buffer.d.ts +0 -67
  98. package/publish/lib/cjs/Utils/buffer.js +0 -343
  99. package/publish/lib/cjs/Utils/cls.d.ts +0 -15
  100. package/publish/lib/cjs/Utils/cls.js +0 -124
  101. package/publish/lib/cjs/Utils/convert.d.ts +0 -25
  102. package/publish/lib/cjs/Utils/convert.js +0 -109
  103. package/publish/lib/cjs/Utils/date.d.ts +0 -217
  104. package/publish/lib/cjs/Utils/date.js +0 -567
  105. package/publish/lib/cjs/Utils/dom.d.ts +0 -13
  106. package/publish/lib/cjs/Utils/dom.js +0 -215
  107. package/publish/lib/cjs/Utils/easing.d.ts +0 -29
  108. package/publish/lib/cjs/Utils/easing.js +0 -221
  109. package/publish/lib/cjs/Utils/extract.d.ts +0 -28
  110. package/publish/lib/cjs/Utils/extract.js +0 -130
  111. package/publish/lib/cjs/Utils/getElementProperty.d.ts +0 -52
  112. package/publish/lib/cjs/Utils/getElementProperty.js +0 -189
  113. package/publish/lib/cjs/Utils/guid.d.ts +0 -7
  114. package/publish/lib/cjs/Utils/guid.js +0 -67
  115. package/publish/lib/cjs/Utils/initDefaultOptions.d.ts +0 -21
  116. package/publish/lib/cjs/Utils/initDefaultOptions.js +0 -131
  117. package/publish/lib/cjs/Utils/inputsCalculation.d.ts +0 -28
  118. package/publish/lib/cjs/Utils/inputsCalculation.js +0 -188
  119. package/publish/lib/cjs/Utils/math.d.ts +0 -77
  120. package/publish/lib/cjs/Utils/math.js +0 -305
  121. package/publish/lib/cjs/Utils/object.d.ts +0 -18
  122. package/publish/lib/cjs/Utils/object.js +0 -120
  123. package/publish/lib/cjs/Utils/os.d.ts +0 -2
  124. package/publish/lib/cjs/Utils/os.js +0 -104
  125. package/publish/lib/cjs/Utils/performance.d.ts +0 -3
  126. package/publish/lib/cjs/Utils/performance.js +0 -94
  127. package/publish/lib/cjs/Utils/tree.d.ts +0 -40
  128. package/publish/lib/cjs/Utils/tree.js +0 -195
  129. package/publish/lib/cjs/Utils/useAutosizeTextArea.d.ts +0 -10
  130. package/publish/lib/cjs/Utils/useAutosizeTextArea.js +0 -227
  131. package/publish/lib/cjs/Utils/useBoundedDrag.d.ts +0 -125
  132. package/publish/lib/cjs/Utils/useBoundedDrag.js +0 -380
  133. package/publish/lib/cjs/Utils/useClickOutside.d.ts +0 -33
  134. package/publish/lib/cjs/Utils/useClickOutside.js +0 -166
  135. package/publish/lib/cjs/Utils/useComId.d.ts +0 -6
  136. package/publish/lib/cjs/Utils/useComId.js +0 -114
  137. package/publish/lib/cjs/Utils/useDebounce.d.ts +0 -20
  138. package/publish/lib/cjs/Utils/useDebounce.js +0 -138
  139. package/publish/lib/cjs/Utils/useDragDropPosition.d.ts +0 -169
  140. package/publish/lib/cjs/Utils/useDragDropPosition.js +0 -456
  141. package/publish/lib/cjs/Utils/useDraggable.d.ts +0 -62
  142. package/publish/lib/cjs/Utils/useDraggable.js +0 -348
  143. package/publish/lib/cjs/Utils/useInterval.d.ts +0 -5
  144. package/publish/lib/cjs/Utils/useInterval.js +0 -168
  145. package/publish/lib/cjs/Utils/useIsMobile.d.ts +0 -2
  146. package/publish/lib/cjs/Utils/useIsMobile.js +0 -168
  147. package/publish/lib/cjs/Utils/useKeyPress.d.ts +0 -44
  148. package/publish/lib/cjs/Utils/useKeyPress.js +0 -200
  149. package/publish/lib/cjs/Utils/useThrottle.d.ts +0 -2
  150. package/publish/lib/cjs/Utils/useThrottle.js +0 -136
  151. package/publish/lib/cjs/Utils/useWindowScroll.d.ts +0 -12
  152. package/publish/lib/cjs/Utils/useWindowScroll.js +0 -217
  153. package/publish/lib/cjs/Utils/viewport.d.ts +0 -7
  154. package/publish/lib/cjs/Utils/viewport.js +0 -64
  155. package/publish/lib/cjs/index.d.ts +0 -45
  156. package/publish/lib/cjs/index.js +0 -46
  157. package/publish/lib/css/BackToTop/index.css +0 -34
  158. package/publish/lib/css/CascadingSelect/index.css +0 -216
  159. package/publish/lib/css/CascadingSelectE2E/index.css +0 -216
  160. package/publish/lib/css/ColorPicker/index.css +0 -58
  161. package/publish/lib/css/Date/index.css +0 -434
  162. package/publish/lib/css/DragDropList/index.css +0 -188
  163. package/publish/lib/css/DropdownMenu/index.css +0 -151
  164. package/publish/lib/css/EventCalendar/index.css +0 -300
  165. package/publish/lib/css/EventCalendarTimeline/index.css +0 -694
  166. package/publish/lib/css/HorizontalScrollContent/index.css +0 -70
  167. package/publish/lib/css/LiveSearch/index.css +0 -55
  168. package/publish/lib/css/MultilevelDropdownMenu/index.css +0 -38
  169. package/publish/lib/css/MultipleSelect/index.css +0 -313
  170. package/publish/lib/css/RangeSlider/index.css +0 -150
  171. package/publish/lib/css/Scrollbar/index.css +0 -176
  172. package/publish/lib/css/Select/index.css +0 -368
  173. package/publish/lib/css/ShowMoreLess/index.css +0 -23
  174. package/publish/lib/css/Table/index.css +0 -584
  175. package/publish/lib/css/TagInput/index.css +0 -91
  176. package/publish/lib/css/Toast/index.css +0 -201
  177. package/publish/lib/css/Tooltip/index.css +0 -197
  178. package/publish/lib/css/Tree/index.css +0 -232
  179. package/publish/lib/esm/Accordion/Accordion.tsx +0 -184
  180. package/publish/lib/esm/Accordion/AccordionItem.tsx +0 -143
  181. package/publish/lib/esm/Accordion/index.tsx +0 -2
  182. package/publish/lib/esm/BackToTop/index.scss +0 -47
  183. package/publish/lib/esm/BackToTop/index.tsx +0 -177
  184. package/publish/lib/esm/CascadingSelect/Group.tsx +0 -82
  185. package/publish/lib/esm/CascadingSelect/index.scss +0 -291
  186. package/publish/lib/esm/CascadingSelect/index.tsx +0 -1203
  187. package/publish/lib/esm/CascadingSelectE2E/Group.tsx +0 -83
  188. package/publish/lib/esm/CascadingSelectE2E/index.scss +0 -293
  189. package/publish/lib/esm/CascadingSelectE2E/index.tsx +0 -1471
  190. package/publish/lib/esm/Checkbox/index.tsx +0 -193
  191. package/publish/lib/esm/ColorPicker/index.scss +0 -91
  192. package/publish/lib/esm/ColorPicker/index.tsx +0 -204
  193. package/publish/lib/esm/Date/Calendar.tsx +0 -723
  194. package/publish/lib/esm/Date/index.scss +0 -567
  195. package/publish/lib/esm/Date/index.tsx +0 -1683
  196. package/publish/lib/esm/Date/localization/en_US.js +0 -13
  197. package/publish/lib/esm/Date/localization/zh_CN.js +0 -12
  198. package/publish/lib/esm/DigitalClock/index.tsx +0 -74
  199. package/publish/lib/esm/DragDropList/index.scss +0 -245
  200. package/publish/lib/esm/DragDropList/index.tsx +0 -494
  201. package/publish/lib/esm/DropdownMenu/Option.tsx +0 -55
  202. package/publish/lib/esm/DropdownMenu/index.scss +0 -205
  203. package/publish/lib/esm/DropdownMenu/index.tsx +0 -377
  204. package/publish/lib/esm/DynamicFields/index.tsx +0 -404
  205. package/publish/lib/esm/EventCalendar/index.scss +0 -407
  206. package/publish/lib/esm/EventCalendar/index.tsx +0 -1004
  207. package/publish/lib/esm/EventCalendarTimeline/index.scss +0 -926
  208. package/publish/lib/esm/EventCalendarTimeline/index.tsx +0 -2683
  209. package/publish/lib/esm/File/index.tsx +0 -477
  210. package/publish/lib/esm/HorizontalScrollContent/index.scss +0 -87
  211. package/publish/lib/esm/HorizontalScrollContent/index.tsx +0 -171
  212. package/publish/lib/esm/Input/index.tsx +0 -614
  213. package/publish/lib/esm/LiveSearch/index.scss +0 -82
  214. package/publish/lib/esm/LiveSearch/index.tsx +0 -960
  215. package/publish/lib/esm/MasonryLayout/index.tsx +0 -326
  216. package/publish/lib/esm/ModalDialog/index.tsx +0 -552
  217. package/publish/lib/esm/ModeSwitch/index.tsx +0 -82
  218. package/publish/lib/esm/MultilevelDropdownMenu/ItemList.tsx +0 -265
  219. package/publish/lib/esm/MultilevelDropdownMenu/index.scss +0 -79
  220. package/publish/lib/esm/MultilevelDropdownMenu/index.tsx +0 -77
  221. package/publish/lib/esm/MultipleCheckboxes/index.tsx +0 -669
  222. package/publish/lib/esm/MultipleSelect/index.scss +0 -398
  223. package/publish/lib/esm/MultipleSelect/index.tsx +0 -766
  224. package/publish/lib/esm/MultipleSelect/utils/func.ts +0 -61
  225. package/publish/lib/esm/NativeSelect/index.tsx +0 -396
  226. package/publish/lib/esm/NativeSelect/utils/func.ts +0 -49
  227. package/publish/lib/esm/NumberInput/index.tsx +0 -385
  228. package/publish/lib/esm/Pagination/index.tsx +0 -286
  229. package/publish/lib/esm/Pagination/pagination-navigators.tsx +0 -60
  230. package/publish/lib/esm/Radio/index.tsx +0 -670
  231. package/publish/lib/esm/RangeSlider/index.scss +0 -186
  232. package/publish/lib/esm/RangeSlider/index.tsx +0 -241
  233. package/publish/lib/esm/RootPortal/index.tsx +0 -53
  234. package/publish/lib/esm/ScrollReveal/index.tsx +0 -148
  235. package/publish/lib/esm/Scrollbar/index.scss +0 -221
  236. package/publish/lib/esm/Scrollbar/index.tsx +0 -561
  237. package/publish/lib/esm/SearchBar/index.tsx +0 -253
  238. package/publish/lib/esm/Select/index.scss +0 -553
  239. package/publish/lib/esm/Select/index.tsx +0 -2816
  240. package/publish/lib/esm/Select/utils/func.ts +0 -106
  241. package/publish/lib/esm/ShowMoreLess/index.scss +0 -27
  242. package/publish/lib/esm/ShowMoreLess/index.tsx +0 -145
  243. package/publish/lib/esm/Switch/index.tsx +0 -147
  244. package/publish/lib/esm/Table/Table.tsx +0 -257
  245. package/publish/lib/esm/Table/TableBody.tsx +0 -41
  246. package/publish/lib/esm/Table/TableCaption.tsx +0 -34
  247. package/publish/lib/esm/Table/TableCell.tsx +0 -123
  248. package/publish/lib/esm/Table/TableColgroup.tsx +0 -38
  249. package/publish/lib/esm/Table/TableContext.tsx +0 -26
  250. package/publish/lib/esm/Table/TableFoot.tsx +0 -28
  251. package/publish/lib/esm/Table/TableHead.tsx +0 -28
  252. package/publish/lib/esm/Table/TableRow.tsx +0 -76
  253. package/publish/lib/esm/Table/index.scss +0 -418
  254. package/publish/lib/esm/Table/index.tsx +0 -14
  255. package/publish/lib/esm/Table/utils/DragHandleSprite.tsx +0 -46
  256. package/publish/lib/esm/Table/utils/SortSprite.tsx +0 -57
  257. package/publish/lib/esm/Table/utils/TableFilter.tsx +0 -56
  258. package/publish/lib/esm/Table/utils/ToggleSelection.tsx +0 -225
  259. package/publish/lib/esm/Table/utils/func.ts +0 -171
  260. package/publish/lib/esm/Table/utils/hooks/useTableDraggable.tsx +0 -342
  261. package/publish/lib/esm/Table/utils/hooks/useTableKeyPress.tsx +0 -154
  262. package/publish/lib/esm/Table/utils/hooks/useTableResponsive.tsx +0 -92
  263. package/publish/lib/esm/Table/utils/hooks/useTableSort.tsx +0 -143
  264. package/publish/lib/esm/Tabs/TabList.tsx +0 -50
  265. package/publish/lib/esm/Tabs/TabPanel.tsx +0 -44
  266. package/publish/lib/esm/Tabs/Tabs.tsx +0 -282
  267. package/publish/lib/esm/Tabs/index.tsx +0 -3
  268. package/publish/lib/esm/TagInput/index.scss +0 -126
  269. package/publish/lib/esm/TagInput/index.tsx +0 -352
  270. package/publish/lib/esm/Textarea/index.tsx +0 -608
  271. package/publish/lib/esm/Toast/Item.tsx +0 -124
  272. package/publish/lib/esm/Toast/index.scss +0 -269
  273. package/publish/lib/esm/Toast/index.tsx +0 -374
  274. package/publish/lib/esm/Tooltip/index.scss +0 -269
  275. package/publish/lib/esm/Tooltip/index.tsx +0 -312
  276. package/publish/lib/esm/Tree/TreeList.tsx +0 -616
  277. package/publish/lib/esm/Tree/index.scss +0 -386
  278. package/publish/lib/esm/Tree/index.tsx +0 -396
  279. package/publish/lib/esm/Tree/init-height.tsx +0 -27
  280. package/publish/lib/esm/Tree/utils/func.ts +0 -15
  281. package/publish/lib/esm/Utils/hooks/useAutosizeTextArea.tsx +0 -125
  282. package/publish/lib/esm/Utils/hooks/useBoundedDrag.tsx +0 -301
  283. package/publish/lib/esm/Utils/hooks/useClickOutside.tsx +0 -69
  284. package/publish/lib/esm/Utils/hooks/useComId.tsx +0 -13
  285. package/publish/lib/esm/Utils/hooks/useDebounce.tsx +0 -40
  286. package/publish/lib/esm/Utils/hooks/useDragDropPosition.tsx +0 -420
  287. package/publish/lib/esm/Utils/hooks/useDraggable.tsx +0 -265
  288. package/publish/lib/esm/Utils/hooks/useInterval.tsx +0 -74
  289. package/publish/lib/esm/Utils/hooks/useIsMobile.tsx +0 -56
  290. package/publish/lib/esm/Utils/hooks/useKeyPress.tsx +0 -104
  291. package/publish/lib/esm/Utils/hooks/useThrottle.tsx +0 -39
  292. package/publish/lib/esm/Utils/hooks/useWindowScroll.tsx +0 -83
  293. package/publish/lib/esm/Utils/libs/anim.ts +0 -96
  294. package/publish/lib/esm/Utils/libs/buffer.ts +0 -262
  295. package/publish/lib/esm/Utils/libs/cls.ts +0 -64
  296. package/publish/lib/esm/Utils/libs/convert.ts +0 -59
  297. package/publish/lib/esm/Utils/libs/date.ts +0 -578
  298. package/publish/lib/esm/Utils/libs/dom.ts +0 -150
  299. package/publish/lib/esm/Utils/libs/easing.ts +0 -201
  300. package/publish/lib/esm/Utils/libs/extract.ts +0 -86
  301. package/publish/lib/esm/Utils/libs/getElementProperty.ts +0 -150
  302. package/publish/lib/esm/Utils/libs/guid.ts +0 -16
  303. package/publish/lib/esm/Utils/libs/initDefaultOptions.ts +0 -104
  304. package/publish/lib/esm/Utils/libs/inputsCalculation.ts +0 -160
  305. package/publish/lib/esm/Utils/libs/math.ts +0 -276
  306. package/publish/lib/esm/Utils/libs/object.ts +0 -68
  307. package/publish/lib/esm/Utils/libs/os.ts +0 -63
  308. package/publish/lib/esm/Utils/libs/performance.ts +0 -47
  309. package/publish/lib/esm/Utils/libs/tree.ts +0 -119
  310. package/publish/lib/esm/Utils/libs/viewport.ts +0 -20
  311. package/publish/lib/esm/Utils/plugins/bodyScrollLock.ts +0 -286
  312. package/publish/lib/esm/index.js +0 -43
  313. package/publish/package.json +0 -1
  314. /package/{publish/Accordion → Accordion}/index.d.ts +0 -0
  315. /package/{publish/Accordion → Accordion}/index.js +0 -0
  316. /package/{publish/BackToTop → BackToTop}/index.css +0 -0
  317. /package/{publish/BackToTop → BackToTop}/index.d.ts +0 -0
  318. /package/{publish/BackToTop → BackToTop}/index.js +0 -0
  319. /package/{publish/CascadingSelect → CascadingSelect}/index.css +0 -0
  320. /package/{publish/CascadingSelect → CascadingSelect}/index.d.ts +0 -0
  321. /package/{publish/CascadingSelect → CascadingSelect}/index.js +0 -0
  322. /package/{publish/CascadingSelectE2E → CascadingSelectE2E}/index.css +0 -0
  323. /package/{publish/CascadingSelectE2E → CascadingSelectE2E}/index.d.ts +0 -0
  324. /package/{publish/CascadingSelectE2E → CascadingSelectE2E}/index.js +0 -0
  325. /package/{publish/Checkbox → Checkbox}/index.d.ts +0 -0
  326. /package/{publish/Checkbox → Checkbox}/index.js +0 -0
  327. /package/{publish/ColorPicker → ColorPicker}/index.css +0 -0
  328. /package/{publish/ColorPicker → ColorPicker}/index.d.ts +0 -0
  329. /package/{publish/ColorPicker → ColorPicker}/index.js +0 -0
  330. /package/{publish/Date → Date}/index.css +0 -0
  331. /package/{publish/Date → Date}/index.d.ts +0 -0
  332. /package/{publish/Date → Date}/index.js +0 -0
  333. /package/{publish/DigitalClock → DigitalClock}/index.d.ts +0 -0
  334. /package/{publish/DigitalClock → DigitalClock}/index.js +0 -0
  335. /package/{publish/DragDropList → DragDropList}/index.css +0 -0
  336. /package/{publish/DragDropList → DragDropList}/index.d.ts +0 -0
  337. /package/{publish/DragDropList → DragDropList}/index.js +0 -0
  338. /package/{publish/DropdownMenu → DropdownMenu}/index.css +0 -0
  339. /package/{publish/DropdownMenu → DropdownMenu}/index.d.ts +0 -0
  340. /package/{publish/DropdownMenu → DropdownMenu}/index.js +0 -0
  341. /package/{publish/DynamicFields → DynamicFields}/index.d.ts +0 -0
  342. /package/{publish/DynamicFields → DynamicFields}/index.js +0 -0
  343. /package/{publish/EventCalendar → EventCalendar}/index.css +0 -0
  344. /package/{publish/EventCalendar → EventCalendar}/index.d.ts +0 -0
  345. /package/{publish/EventCalendar → EventCalendar}/index.js +0 -0
  346. /package/{publish/EventCalendarTimeline → EventCalendarTimeline}/index.css +0 -0
  347. /package/{publish/EventCalendarTimeline → EventCalendarTimeline}/index.d.ts +0 -0
  348. /package/{publish/EventCalendarTimeline → EventCalendarTimeline}/index.js +0 -0
  349. /package/{publish/File → File}/index.d.ts +0 -0
  350. /package/{publish/File → File}/index.js +0 -0
  351. /package/{publish/HorizontalScrollContent → HorizontalScrollContent}/index.css +0 -0
  352. /package/{publish/HorizontalScrollContent → HorizontalScrollContent}/index.d.ts +0 -0
  353. /package/{publish/HorizontalScrollContent → HorizontalScrollContent}/index.js +0 -0
  354. /package/{publish/Input → Input}/index.d.ts +0 -0
  355. /package/{publish/Input → Input}/index.js +0 -0
  356. /package/{publish/LiveSearch → LiveSearch}/index.css +0 -0
  357. /package/{publish/LiveSearch → LiveSearch}/index.d.ts +0 -0
  358. /package/{publish/LiveSearch → LiveSearch}/index.js +0 -0
  359. /package/{publish/MasonryLayout → MasonryLayout}/index.d.ts +0 -0
  360. /package/{publish/MasonryLayout → MasonryLayout}/index.js +0 -0
  361. /package/{publish/ModalDialog → ModalDialog}/index.d.ts +0 -0
  362. /package/{publish/ModalDialog → ModalDialog}/index.js +0 -0
  363. /package/{publish/ModeSwitch → ModeSwitch}/index.d.ts +0 -0
  364. /package/{publish/ModeSwitch → ModeSwitch}/index.js +0 -0
  365. /package/{publish/MultilevelDropdownMenu → MultilevelDropdownMenu}/index.css +0 -0
  366. /package/{publish/MultilevelDropdownMenu → MultilevelDropdownMenu}/index.d.ts +0 -0
  367. /package/{publish/MultilevelDropdownMenu → MultilevelDropdownMenu}/index.js +0 -0
  368. /package/{publish/MultipleCheckboxes → MultipleCheckboxes}/index.d.ts +0 -0
  369. /package/{publish/MultipleCheckboxes → MultipleCheckboxes}/index.js +0 -0
  370. /package/{publish/MultipleSelect → MultipleSelect}/index.css +0 -0
  371. /package/{publish/MultipleSelect → MultipleSelect}/index.d.ts +0 -0
  372. /package/{publish/MultipleSelect → MultipleSelect}/index.js +0 -0
  373. /package/{publish/NativeSelect → NativeSelect}/index.d.ts +0 -0
  374. /package/{publish/NativeSelect → NativeSelect}/index.js +0 -0
  375. /package/{publish/NumberInput → NumberInput}/index.d.ts +0 -0
  376. /package/{publish/NumberInput → NumberInput}/index.js +0 -0
  377. /package/{publish/Pagination → Pagination}/index.d.ts +0 -0
  378. /package/{publish/Pagination → Pagination}/index.js +0 -0
  379. /package/{publish/Radio → Radio}/index.d.ts +0 -0
  380. /package/{publish/Radio → Radio}/index.js +0 -0
  381. /package/{publish/RangeSlider → RangeSlider}/index.css +0 -0
  382. /package/{publish/RangeSlider → RangeSlider}/index.d.ts +0 -0
  383. /package/{publish/RangeSlider → RangeSlider}/index.js +0 -0
  384. /package/{publish/RootPortal → RootPortal}/index.d.ts +0 -0
  385. /package/{publish/RootPortal → RootPortal}/index.js +0 -0
  386. /package/{publish/ScrollReveal → ScrollReveal}/index.d.ts +0 -0
  387. /package/{publish/ScrollReveal → ScrollReveal}/index.js +0 -0
  388. /package/{publish/Scrollbar → Scrollbar}/index.css +0 -0
  389. /package/{publish/Scrollbar → Scrollbar}/index.d.ts +0 -0
  390. /package/{publish/Scrollbar → Scrollbar}/index.js +0 -0
  391. /package/{publish/SearchBar → SearchBar}/index.d.ts +0 -0
  392. /package/{publish/SearchBar → SearchBar}/index.js +0 -0
  393. /package/{publish/Select → Select}/index.css +0 -0
  394. /package/{publish/Select → Select}/index.d.ts +0 -0
  395. /package/{publish/Select → Select}/index.js +0 -0
  396. /package/{publish/ShowMoreLess → ShowMoreLess}/index.css +0 -0
  397. /package/{publish/ShowMoreLess → ShowMoreLess}/index.d.ts +0 -0
  398. /package/{publish/ShowMoreLess → ShowMoreLess}/index.js +0 -0
  399. /package/{publish/Switch → Switch}/index.d.ts +0 -0
  400. /package/{publish/Switch → Switch}/index.js +0 -0
  401. /package/{publish/Table → Table}/index.css +0 -0
  402. /package/{publish/Table → Table}/index.d.ts +0 -0
  403. /package/{publish/Table → Table}/index.js +0 -0
  404. /package/{publish/Tabs → Tabs}/index.d.ts +0 -0
  405. /package/{publish/Tabs → Tabs}/index.js +0 -0
  406. /package/{publish/TagInput → TagInput}/index.css +0 -0
  407. /package/{publish/TagInput → TagInput}/index.d.ts +0 -0
  408. /package/{publish/TagInput → TagInput}/index.js +0 -0
  409. /package/{publish/Textarea → Textarea}/index.d.ts +0 -0
  410. /package/{publish/Textarea → Textarea}/index.js +0 -0
  411. /package/{publish/Toast → Toast}/index.css +0 -0
  412. /package/{publish/Toast → Toast}/index.d.ts +0 -0
  413. /package/{publish/Toast → Toast}/index.js +0 -0
  414. /package/{publish/Tooltip → Tooltip}/index.css +0 -0
  415. /package/{publish/Tooltip → Tooltip}/index.d.ts +0 -0
  416. /package/{publish/Tooltip → Tooltip}/index.js +0 -0
  417. /package/{publish/Tree → Tree}/index.css +0 -0
  418. /package/{publish/Tree → Tree}/index.d.ts +0 -0
  419. /package/{publish/Tree → Tree}/index.js +0 -0
  420. /package/{publish/Utils → Utils}/anim.d.ts +0 -0
  421. /package/{publish/Utils → Utils}/anim.js +0 -0
  422. /package/{publish/Utils → Utils}/bodyScrollLock.d.ts +0 -0
  423. /package/{publish/Utils → Utils}/bodyScrollLock.js +0 -0
  424. /package/{publish/Utils → Utils}/buffer.d.ts +0 -0
  425. /package/{publish/Utils → Utils}/buffer.js +0 -0
  426. /package/{publish/Utils → Utils}/cls.d.ts +0 -0
  427. /package/{publish/Utils → Utils}/cls.js +0 -0
  428. /package/{publish/Utils → Utils}/convert.d.ts +0 -0
  429. /package/{publish/Utils → Utils}/convert.js +0 -0
  430. /package/{publish/Utils → Utils}/date.d.ts +0 -0
  431. /package/{publish/Utils → Utils}/date.js +0 -0
  432. /package/{publish/Utils → Utils}/dom.d.ts +0 -0
  433. /package/{publish/Utils → Utils}/dom.js +0 -0
  434. /package/{publish/Utils → Utils}/easing.d.ts +0 -0
  435. /package/{publish/Utils → Utils}/easing.js +0 -0
  436. /package/{publish/Utils → Utils}/extract.d.ts +0 -0
  437. /package/{publish/Utils → Utils}/extract.js +0 -0
  438. /package/{publish/Utils → Utils}/getElementProperty.d.ts +0 -0
  439. /package/{publish/Utils → Utils}/getElementProperty.js +0 -0
  440. /package/{publish/Utils → Utils}/guid.d.ts +0 -0
  441. /package/{publish/Utils → Utils}/guid.js +0 -0
  442. /package/{publish/Utils → Utils}/initDefaultOptions.d.ts +0 -0
  443. /package/{publish/Utils → Utils}/initDefaultOptions.js +0 -0
  444. /package/{publish/Utils → Utils}/inputsCalculation.d.ts +0 -0
  445. /package/{publish/Utils → Utils}/inputsCalculation.js +0 -0
  446. /package/{publish/Utils → Utils}/math.d.ts +0 -0
  447. /package/{publish/Utils → Utils}/math.js +0 -0
  448. /package/{publish/Utils → Utils}/object.d.ts +0 -0
  449. /package/{publish/Utils → Utils}/object.js +0 -0
  450. /package/{publish/Utils → Utils}/os.d.ts +0 -0
  451. /package/{publish/Utils → Utils}/os.js +0 -0
  452. /package/{publish/Utils → Utils}/performance.d.ts +0 -0
  453. /package/{publish/Utils → Utils}/performance.js +0 -0
  454. /package/{publish/Utils → Utils}/tree.d.ts +0 -0
  455. /package/{publish/Utils → Utils}/tree.js +0 -0
  456. /package/{publish/Utils → Utils}/useAutosizeTextArea.d.ts +0 -0
  457. /package/{publish/Utils → Utils}/useAutosizeTextArea.js +0 -0
  458. /package/{publish/Utils → Utils}/useBoundedDrag.d.ts +0 -0
  459. /package/{publish/Utils → Utils}/useBoundedDrag.js +0 -0
  460. /package/{publish/Utils → Utils}/useClickOutside.d.ts +0 -0
  461. /package/{publish/Utils → Utils}/useClickOutside.js +0 -0
  462. /package/{publish/Utils → Utils}/useComId.d.ts +0 -0
  463. /package/{publish/Utils → Utils}/useComId.js +0 -0
  464. /package/{publish/Utils → Utils}/useDebounce.d.ts +0 -0
  465. /package/{publish/Utils → Utils}/useDebounce.js +0 -0
  466. /package/{publish/Utils → Utils}/useDragDropPosition.d.ts +0 -0
  467. /package/{publish/Utils → Utils}/useDragDropPosition.js +0 -0
  468. /package/{publish/Utils → Utils}/useDraggable.d.ts +0 -0
  469. /package/{publish/Utils → Utils}/useDraggable.js +0 -0
  470. /package/{publish/Utils → Utils}/useInterval.d.ts +0 -0
  471. /package/{publish/Utils → Utils}/useInterval.js +0 -0
  472. /package/{publish/Utils → Utils}/useIsMobile.d.ts +0 -0
  473. /package/{publish/Utils → Utils}/useIsMobile.js +0 -0
  474. /package/{publish/Utils → Utils}/useKeyPress.d.ts +0 -0
  475. /package/{publish/Utils → Utils}/useKeyPress.js +0 -0
  476. /package/{publish/Utils → Utils}/useThrottle.d.ts +0 -0
  477. /package/{publish/Utils → Utils}/useThrottle.js +0 -0
  478. /package/{publish/Utils → Utils}/useWindowScroll.d.ts +0 -0
  479. /package/{publish/Utils → Utils}/useWindowScroll.js +0 -0
  480. /package/{publish/Utils → Utils}/viewport.d.ts +0 -0
  481. /package/{publish/Utils → Utils}/viewport.js +0 -0
  482. /package/{publish/all.d.ts → all.d.ts} +0 -0
  483. /package/{publish/all.js → all.js} +0 -0
@@ -1,2665 +0,0 @@
1
- (function webpackUniversalModuleDefinition(root, factory) {
2
- if(typeof exports === 'object' && typeof module === 'object')
3
- module.exports = factory(require("react"));
4
- else if(typeof define === 'function' && define.amd)
5
- define(["react"], factory);
6
- else if(typeof exports === 'object')
7
- exports["RPB"] = factory(require("react"));
8
- else
9
- root["RPB"] = factory(root["React"]);
10
- })(this, (__WEBPACK_EXTERNAL_MODULE__787__) => {
11
- return /******/ (() => { // webpackBootstrap
12
- /******/ var __webpack_modules__ = ({
13
-
14
- /***/ 390:
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 _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); }
19
- (function webpackUniversalModuleDefinition(root, factory) {
20
- 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),
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__) {
25
- return (/******/function () {
26
- // webpackBootstrap
27
- /******/
28
- var __webpack_modules__ = {
29
- /***/188: /***/function _(module, exports, __nested_webpack_require_1080__) {
30
- /* module decorator */module = __nested_webpack_require_1080__.nmd(module);
31
- var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
32
- function _typeof2(obj) {
33
- "@babel/helpers - typeof";
34
-
35
- return _typeof2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
36
- return typeof obj;
37
- } : function (obj) {
38
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
39
- }, _typeof2(obj);
40
- }
41
- (function webpackUniversalModuleDefinition(root, factory) {
42
- 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 {}
43
- })(this, function () {
44
- return (/******/function () {
45
- // webpackBootstrap
46
- /******/
47
- "use strict";
48
-
49
- /******/ // The require scope
50
- /******/
51
- var __nested_webpack_require_993__ = {};
52
- /******/
53
- /************************************************************************/
54
- /******/ /* webpack/runtime/define property getters */
55
- /******/
56
- (function () {
57
- /******/ // define getter functions for harmony exports
58
- /******/__nested_webpack_require_993__.d = function (exports, definition) {
59
- /******/for (var key in definition) {
60
- /******/if (__nested_webpack_require_993__.o(definition, key) && !__nested_webpack_require_993__.o(exports, key)) {
61
- /******/Object.defineProperty(exports, key, {
62
- enumerable: true,
63
- get: definition[key]
64
- });
65
- /******/
66
- }
67
- /******/
68
- }
69
- /******/
70
- };
71
- /******/
72
- })();
73
- /******/
74
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
75
- /******/
76
- (function () {
77
- /******/__nested_webpack_require_993__.o = function (obj, prop) {
78
- return Object.prototype.hasOwnProperty.call(obj, prop);
79
- };
80
- /******/
81
- })();
82
- /******/
83
- /******/ /* webpack/runtime/make namespace object */
84
- /******/
85
- (function () {
86
- /******/ // define __esModule on exports
87
- /******/__nested_webpack_require_993__.r = function (exports) {
88
- /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
89
- /******/Object.defineProperty(exports, Symbol.toStringTag, {
90
- value: 'Module'
91
- });
92
- /******/
93
- }
94
- /******/
95
- Object.defineProperty(exports, '__esModule', {
96
- value: true
97
- });
98
- /******/
99
- };
100
- /******/
101
- })();
102
- /******/
103
- /************************************************************************/
104
- var __webpack_exports__ = {};
105
- __nested_webpack_require_993__.r(__webpack_exports__);
106
- /* harmony export */
107
- __nested_webpack_require_993__.d(__webpack_exports__, {
108
- /* harmony export */"clsWrite": function clsWrite() {
109
- return (/* binding */_clsWrite
110
- );
111
- },
112
- /* harmony export */"combinedCls": function combinedCls() {
113
- return (/* binding */_combinedCls
114
- );
115
- }
116
- /* harmony export */
117
- });
118
-
119
- function _slicedToArray(arr, i) {
120
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
121
- }
122
- function _nonIterableRest() {
123
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
124
- }
125
- function _unsupportedIterableToArray(o, minLen) {
126
- if (!o) return;
127
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
128
- var n = Object.prototype.toString.call(o).slice(8, -1);
129
- if (n === "Object" && o.constructor) n = o.constructor.name;
130
- if (n === "Map" || n === "Set") return Array.from(o);
131
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
132
- }
133
- function _arrayLikeToArray(arr, len) {
134
- if (len == null || len > arr.length) len = arr.length;
135
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
136
- return arr2;
137
- }
138
- function _iterableToArrayLimit(arr, i) {
139
- var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
140
- if (null != _i) {
141
- var _s,
142
- _e,
143
- _x,
144
- _r,
145
- _arr = [],
146
- _n = !0,
147
- _d = !1;
148
- try {
149
- if (_x = (_i = _i.call(arr)).next, 0 === i) {
150
- if (Object(_i) !== _i) return;
151
- _n = !1;
152
- } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
153
- } catch (err) {
154
- _d = !0, _e = err;
155
- } finally {
156
- try {
157
- if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
158
- } finally {
159
- if (_d) throw _e;
160
- }
161
- }
162
- return _arr;
163
- }
164
- }
165
- function _arrayWithHoles(arr) {
166
- if (Array.isArray(arr)) return arr;
167
- }
168
- function _typeof(obj) {
169
- "@babel/helpers - typeof";
170
-
171
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
172
- return typeof obj;
173
- } : function (obj) {
174
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
175
- }, _typeof(obj);
176
- }
177
- /**
178
- * Output of class name
179
- * @param {*} s - Any
180
- * @param {String} defaultCls - Default string
181
- * @param {?*} targetCls - Any
182
- * @returns {*}
183
- */
184
- function _clsWrite(s, defaultCls) {
185
- var targetCls = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
186
- return s || s === '' ? typeof targetCls === 'undefined' ? s : targetCls : defaultCls;
187
- }
188
-
189
- /**
190
- * Combined classnames
191
- * @param {*} args
192
- * @returns {String|undefined}
193
- */
194
- /* Usage:
195
-
196
- console.log(combinedCls('a-1', 'a-2', 'a-3', {
197
- 'p-1': null,
198
- 'p-2': undefined,
199
- 'p-3': true,
200
- 'p-4': false,
201
- 'p-5': 'kkk',
202
- 'p-6': 0,
203
- 'p-7': 1,
204
- 'p-8': '',
205
- undefined
206
- })); // a-1 a-2 a-3 p-3 p-5 p-7
207
- */
208
- function _combinedCls() {
209
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
210
- args[_key] = arguments[_key];
211
- }
212
- if (args) {
213
- var classes = [];
214
- for (var i = 0; i < args.length; i++) {
215
- var className = args[i];
216
- if (!className) {
217
- continue;
218
- }
219
- var type = _typeof(className);
220
- if (type === 'string' || type === 'number') {
221
- classes.push(className);
222
- } else if (type === 'object') {
223
- var _classes = Array.isArray(className) ? className : Object.entries(className).map(function (_ref) {
224
- var _ref2 = _slicedToArray(_ref, 2),
225
- key = _ref2[0],
226
- value = _ref2[1];
227
- return value ? key : null;
228
- });
229
- classes = _classes.length ? classes.concat(_classes.filter(function (c) {
230
- return !!c;
231
- })) : classes;
232
- }
233
- }
234
- return classes.join(' ').trim();
235
- }
236
- return undefined;
237
- }
238
-
239
- /******/
240
- return __webpack_exports__;
241
- /******/
242
- }()
243
- );
244
- });
245
-
246
- /***/
247
- },
248
-
249
- /***/954: /***/function _(module, exports, __nested_webpack_require_11464__) {
250
- /* module decorator */module = __nested_webpack_require_11464__.nmd(module);
251
- var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
252
- function _typeof(obj) {
253
- "@babel/helpers - typeof";
254
-
255
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
256
- return typeof obj;
257
- } : function (obj) {
258
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
259
- }, _typeof(obj);
260
- }
261
- (function webpackUniversalModuleDefinition(root, factory) {
262
- if (( false ? 0 : _typeof(exports)) === 'object' && ( false ? 0 : _typeof(module)) === 'object') module.exports = factory();else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = factory, __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 {}
263
- })(this, function () {
264
- return (/******/function () {
265
- // webpackBootstrap
266
- /******/
267
- "use strict";
268
-
269
- /******/ // The require scope
270
- /******/
271
- var __nested_webpack_require_987__ = {};
272
- /******/
273
- /************************************************************************/
274
- /******/ /* webpack/runtime/define property getters */
275
- /******/
276
- (function () {
277
- /******/ // define getter functions for harmony exports
278
- /******/__nested_webpack_require_987__.d = function (exports, definition) {
279
- /******/for (var key in definition) {
280
- /******/if (__nested_webpack_require_987__.o(definition, key) && !__nested_webpack_require_987__.o(exports, key)) {
281
- /******/Object.defineProperty(exports, key, {
282
- enumerable: true,
283
- get: definition[key]
284
- });
285
- /******/
286
- }
287
- /******/
288
- }
289
- /******/
290
- };
291
- /******/
292
- })();
293
- /******/
294
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
295
- /******/
296
- (function () {
297
- /******/__nested_webpack_require_987__.o = function (obj, prop) {
298
- return Object.prototype.hasOwnProperty.call(obj, prop);
299
- };
300
- /******/
301
- })();
302
- /******/
303
- /******/ /* webpack/runtime/make namespace object */
304
- /******/
305
- (function () {
306
- /******/ // define __esModule on exports
307
- /******/__nested_webpack_require_987__.r = function (exports) {
308
- /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
309
- /******/Object.defineProperty(exports, Symbol.toStringTag, {
310
- value: 'Module'
311
- });
312
- /******/
313
- }
314
- /******/
315
- Object.defineProperty(exports, '__esModule', {
316
- value: true
317
- });
318
- /******/
319
- };
320
- /******/
321
- })();
322
- /******/
323
- /************************************************************************/
324
- var __webpack_exports__ = {};
325
- __nested_webpack_require_987__.r(__webpack_exports__);
326
- /* harmony export */
327
- __nested_webpack_require_987__.d(__webpack_exports__, {
328
- /* harmony export */"actualPropertyValue": function actualPropertyValue() {
329
- return (/* binding */_actualPropertyValue
330
- );
331
- },
332
- /* harmony export */"getElCSS": function getElCSS() {
333
- return (/* binding */_getElCSS
334
- );
335
- },
336
- /* harmony export */"getTextTop": function getTextTop() {
337
- return (/* binding */_getTextTop
338
- );
339
- },
340
- /* harmony export */"getTextWidth": function getTextWidth() {
341
- return (/* binding */_getTextWidth
342
- );
343
- }
344
- /* harmony export */
345
- });
346
- /**
347
- * Gets the relative upside of the text
348
- * @param {Element} el - A DOM node containing one selector to match against.
349
- * @returns {Number} - Returns a pure number.
350
- */
351
- function _getTextTop(el) {
352
- var styles = window.getComputedStyle(el);
353
- var fontSize = parseFloat(styles.fontSize);
354
- var lineHeight = parseFloat(styles.lineHeight) || fontSize;
355
- var paddingTop = parseFloat(styles.paddingTop);
356
- var borderWidth = parseFloat(styles.borderWidth);
357
- var textTop = paddingTop + (lineHeight - fontSize) / 2 - borderWidth * 2;
358
- return textTop;
359
- }
360
-
361
- /**
362
- * Get the actual value with user specific methed
363
- * it can be 'width', 'height', 'outerWidth', 'outerHeight'
364
- * @private
365
- * @param {Element} el - A DOM node containing one selector to match against.
366
- * @param {String} prop - A string naming the property of style.
367
- * @param {?Json} config - Whether or not margin is included. The key `includeMargin`
368
- takes effect when set to true
369
- * @return {Number} - Returns a pure number.
370
- */
371
- function _actualPropertyValue(el, prop) {
372
- var config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
373
- if (el === null) return 0;
374
- var style = window.getComputedStyle ? window.getComputedStyle(el) : el.currentStyle,
375
- display = style.display,
376
- position = style.position,
377
- visibility = style.visibility;
378
- var marginWidth = 0;
379
- var marginHeight = 0;
380
- var maxVal;
381
- var actualVal;
382
- if (config && config.includeMargin === true) {
383
- marginWidth = parseFloat(style.marginLeft) + parseFloat(style.marginRight);
384
- marginHeight = parseFloat(style.marginTop) + parseFloat(style.marginBottom);
385
- }
386
- if (prop === 'fontSize') {
387
- actualVal = parseFloat(style.fontSize);
388
- }
389
- if (prop === 'fontFamily') {
390
- actualVal = style.fontFamily;
391
- }
392
- if (prop === 'letterSpacing') {
393
- actualVal = style.letterSpacing;
394
- }
395
- if (prop === 'width') {
396
- maxVal = parseFloat(style.maxWidth);
397
-
398
- // if its not hidden we just return normal height
399
- if (display !== 'none' && maxVal !== 0) {
400
- return el.clientWidth;
401
- }
402
- }
403
- if (prop === 'height') {
404
- maxVal = parseFloat(style.maxHeight);
405
- if (display !== 'none' && maxVal !== 0) {
406
- return el.clientHeight;
407
- }
408
- }
409
- if (prop === 'outerWidth') {
410
- maxVal = parseFloat(style.maxWidth);
411
- if (display !== 'none' && maxVal !== 0) {
412
- return el.offsetWidth + marginWidth;
413
- }
414
- }
415
- if (prop === 'outerHeight') {
416
- maxVal = parseFloat(style.maxHeight);
417
- if (display !== 'none' && maxVal !== 0) {
418
- return el.offsetHeight + marginHeight;
419
- }
420
- }
421
-
422
- // the element is hidden so:
423
- // making the el block so we can meassure its height but still be hidden
424
- el.style.position = 'absolute';
425
- el.style.visibility = 'hidden';
426
- el.style.display = 'block';
427
- if (prop === 'width') actualVal = el.clientWidth;
428
- if (prop === 'height') actualVal = el.clientHeight;
429
- if (prop === 'outerWidth') actualVal = el.offsetWidth + marginWidth;
430
- if (prop === 'outerHeight') actualVal = el.offsetHeight + marginHeight;
431
-
432
- // reverting to the original values
433
- el.style.display = display;
434
- el.style.position = position;
435
- el.style.visibility = visibility;
436
- return actualVal;
437
- }
438
- function _getElCSS(input, prop, isNumber) {
439
- var _document$defaultView;
440
- var val = (_document$defaultView = document.defaultView) === null || _document$defaultView === void 0 ? void 0 : _document$defaultView.getComputedStyle(input, null).getPropertyValue(prop);
441
- return isNumber ? isNaN(parseFloat(val)) ? 0 : parseFloat(val) : val;
442
- }
443
-
444
- /**
445
- * Get cursor or text position in pixels for input element
446
- *
447
- * @param {HTMLInputElement} input Required HTMLElement with `value` attribute
448
- * @param {HTMLSpanElement} fauxContainer Container of faux.
449
- * @param {HTMLElement} rawTextContainer The raw text container for the comparison
450
- * @returns {Number}
451
- */
452
-
453
- function _getTextWidth(input, fauxContainer, rawTextContainer) {
454
- if (input === null || fauxContainer === null || rawTextContainer === null) return 0;
455
- var _off = input.selectionStart;
456
- var _faux = fauxContainer;
457
- var _fauxContainer = rawTextContainer;
458
- if (_faux && _fauxContainer) {
459
- // Styles to simulate a node in an input field
460
- // use pre-wrap instead of wrap for white-space to support wrapping in textareas
461
- var listOfModifiers = ['direction', 'font-family', 'font-size', 'font-size-adjust', 'font-variant', 'font-weight', 'font-style', 'letter-spacing', 'line-height', 'text-align', 'text-indent', 'text-transform', 'word-wrap', 'word-spacing'];
462
-
463
- // default styles
464
- _faux.style.setProperty('white-space', 'pre-wrap');
465
- _faux.style.setProperty('padding', '0');
466
- _faux.style.setProperty('margin', '0');
467
- _faux.style.setProperty('display', 'none');
468
- for (var i = 0; i < listOfModifiers.length; i++) {
469
- var propertyValue = _getElCSS(_fauxContainer, listOfModifiers[i], false);
470
- _faux.style.setProperty(listOfModifiers[i], propertyValue);
471
- }
472
- _faux.textContent = input.value.substring(0, _off).replace(/\s/g, "\xA0");
473
- return _actualPropertyValue(_faux, 'outerWidth');
474
- }
475
- }
476
-
477
- /******/
478
- return __webpack_exports__;
479
- /******/
480
- }()
481
- );
482
- });
483
-
484
- /***/
485
- },
486
-
487
- /***/85: /***/function _(module, exports, __nested_webpack_require_23663__) {
488
- /* module decorator */module = __nested_webpack_require_23663__.nmd(module);
489
- var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
490
- function _typeof(obj) {
491
- "@babel/helpers - typeof";
492
-
493
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
494
- return typeof obj;
495
- } : function (obj) {
496
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
497
- }, _typeof(obj);
498
- }
499
- (function webpackUniversalModuleDefinition(root, factory) {
500
- if (( false ? 0 : _typeof(exports)) === 'object' && ( false ? 0 : _typeof(module)) === 'object') module.exports = factory(__nested_webpack_require_23663__(787));else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__nested_webpack_require_23663__(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 {}
501
- })(this, function (__WEBPACK_EXTERNAL_MODULE__787__) {
502
- return (/******/function () {
503
- // webpackBootstrap
504
- /******/
505
- "use strict";
506
-
507
- /******/
508
- var __webpack_modules__ = {
509
- /***/787: /***/function _(module) {
510
- module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
511
-
512
- /***/
513
- }
514
-
515
- /******/
516
- };
517
- /************************************************************************/
518
- /******/ // The module cache
519
- /******/
520
- var __webpack_module_cache__ = {};
521
- /******/
522
- /******/ // The require function
523
- /******/
524
- function __nested_webpack_require_1465__(moduleId) {
525
- /******/ // Check if module is in cache
526
- /******/var cachedModule = __webpack_module_cache__[moduleId];
527
- /******/
528
- if (cachedModule !== undefined) {
529
- /******/return cachedModule.exports;
530
- /******/
531
- }
532
- /******/ // Create a new module (and put it into the cache)
533
- /******/
534
- var module = __webpack_module_cache__[moduleId] = {
535
- /******/ // no module.id needed
536
- /******/ // no module.loaded needed
537
- /******/exports: {}
538
- /******/
539
- };
540
- /******/
541
- /******/ // Execute the module function
542
- /******/
543
- __webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_1465__);
544
- /******/
545
- /******/ // Return the exports of the module
546
- /******/
547
- return module.exports;
548
- /******/
549
- }
550
- /******/
551
- /************************************************************************/
552
- /******/ /* webpack/runtime/compat get default export */
553
- /******/
554
- (function () {
555
- /******/ // getDefaultExport function for compatibility with non-harmony modules
556
- /******/__nested_webpack_require_1465__.n = function (module) {
557
- /******/var getter = module && module.__esModule ? /******/function () {
558
- return module['default'];
559
- } : /******/function () {
560
- return module;
561
- };
562
- /******/
563
- __nested_webpack_require_1465__.d(getter, {
564
- a: getter
565
- });
566
- /******/
567
- return getter;
568
- /******/
569
- };
570
- /******/
571
- })();
572
- /******/
573
- /******/ /* webpack/runtime/define property getters */
574
- /******/
575
- (function () {
576
- /******/ // define getter functions for harmony exports
577
- /******/__nested_webpack_require_1465__.d = function (exports, definition) {
578
- /******/for (var key in definition) {
579
- /******/if (__nested_webpack_require_1465__.o(definition, key) && !__nested_webpack_require_1465__.o(exports, key)) {
580
- /******/Object.defineProperty(exports, key, {
581
- enumerable: true,
582
- get: definition[key]
583
- });
584
- /******/
585
- }
586
- /******/
587
- }
588
- /******/
589
- };
590
- /******/
591
- })();
592
- /******/
593
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
594
- /******/
595
- (function () {
596
- /******/__nested_webpack_require_1465__.o = function (obj, prop) {
597
- return Object.prototype.hasOwnProperty.call(obj, prop);
598
- };
599
- /******/
600
- })();
601
- /******/
602
- /******/ /* webpack/runtime/make namespace object */
603
- /******/
604
- (function () {
605
- /******/ // define __esModule on exports
606
- /******/__nested_webpack_require_1465__.r = function (exports) {
607
- /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
608
- /******/Object.defineProperty(exports, Symbol.toStringTag, {
609
- value: 'Module'
610
- });
611
- /******/
612
- }
613
- /******/
614
- Object.defineProperty(exports, '__esModule', {
615
- value: true
616
- });
617
- /******/
618
- };
619
- /******/
620
- })();
621
- /******/
622
- /************************************************************************/
623
- var __webpack_exports__ = {};
624
- // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
625
- (function () {
626
- __nested_webpack_require_1465__.r(__webpack_exports__);
627
- /* harmony export */
628
- __nested_webpack_require_1465__.d(__webpack_exports__, {
629
- /* harmony export */"default": function _default() {
630
- return __WEBPACK_DEFAULT_EXPORT__;
631
- }
632
- /* harmony export */
633
- });
634
- /* harmony import */
635
- var react__WEBPACK_IMPORTED_MODULE_0__ = __nested_webpack_require_1465__(787);
636
- /* harmony import */
637
- var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nested_webpack_require_1465__.n(react__WEBPACK_IMPORTED_MODULE_0__);
638
- /**
639
- * Create an available ID
640
- *
641
- */
642
-
643
- var useComId = function useComId() {
644
- return "ID-".concat((0, react__WEBPACK_IMPORTED_MODULE_0__.useId)().replace(/\:/g, "-"));
645
- };
646
- /* harmony default export */
647
- var __WEBPACK_DEFAULT_EXPORT__ = useComId;
648
- })();
649
-
650
- /******/
651
- return __webpack_exports__;
652
- /******/
653
- }()
654
- );
655
- });
656
-
657
- /***/
658
- },
659
-
660
- /***/702: /***/function _(module, exports, __nested_webpack_require_31751__) {
661
- /* module decorator */module = __nested_webpack_require_31751__.nmd(module);
662
- var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
663
- function _typeof(obj) {
664
- "@babel/helpers - typeof";
665
-
666
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
667
- return typeof obj;
668
- } : function (obj) {
669
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
670
- }, _typeof(obj);
671
- }
672
- (function webpackUniversalModuleDefinition(root, factory) {
673
- if (( false ? 0 : _typeof(exports)) === 'object' && ( false ? 0 : _typeof(module)) === 'object') module.exports = factory(__nested_webpack_require_31751__(787));else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__nested_webpack_require_31751__(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 {}
674
- })(this, function (__WEBPACK_EXTERNAL_MODULE__787__) {
675
- return (/******/function () {
676
- // webpackBootstrap
677
- /******/
678
- "use strict";
679
-
680
- /******/
681
- var __webpack_modules__ = {
682
- /***/787: /***/function _(module) {
683
- module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
684
-
685
- /***/
686
- }
687
-
688
- /******/
689
- };
690
- /************************************************************************/
691
- /******/ // The module cache
692
- /******/
693
- var __webpack_module_cache__ = {};
694
- /******/
695
- /******/ // The require function
696
- /******/
697
- function __nested_webpack_require_1465__(moduleId) {
698
- /******/ // Check if module is in cache
699
- /******/var cachedModule = __webpack_module_cache__[moduleId];
700
- /******/
701
- if (cachedModule !== undefined) {
702
- /******/return cachedModule.exports;
703
- /******/
704
- }
705
- /******/ // Create a new module (and put it into the cache)
706
- /******/
707
- var module = __webpack_module_cache__[moduleId] = {
708
- /******/ // no module.id needed
709
- /******/ // no module.loaded needed
710
- /******/exports: {}
711
- /******/
712
- };
713
- /******/
714
- /******/ // Execute the module function
715
- /******/
716
- __webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_1465__);
717
- /******/
718
- /******/ // Return the exports of the module
719
- /******/
720
- return module.exports;
721
- /******/
722
- }
723
- /******/
724
- /************************************************************************/
725
- /******/ /* webpack/runtime/compat get default export */
726
- /******/
727
- (function () {
728
- /******/ // getDefaultExport function for compatibility with non-harmony modules
729
- /******/__nested_webpack_require_1465__.n = function (module) {
730
- /******/var getter = module && module.__esModule ? /******/function () {
731
- return module['default'];
732
- } : /******/function () {
733
- return module;
734
- };
735
- /******/
736
- __nested_webpack_require_1465__.d(getter, {
737
- a: getter
738
- });
739
- /******/
740
- return getter;
741
- /******/
742
- };
743
- /******/
744
- })();
745
- /******/
746
- /******/ /* webpack/runtime/define property getters */
747
- /******/
748
- (function () {
749
- /******/ // define getter functions for harmony exports
750
- /******/__nested_webpack_require_1465__.d = function (exports, definition) {
751
- /******/for (var key in definition) {
752
- /******/if (__nested_webpack_require_1465__.o(definition, key) && !__nested_webpack_require_1465__.o(exports, key)) {
753
- /******/Object.defineProperty(exports, key, {
754
- enumerable: true,
755
- get: definition[key]
756
- });
757
- /******/
758
- }
759
- /******/
760
- }
761
- /******/
762
- };
763
- /******/
764
- })();
765
- /******/
766
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
767
- /******/
768
- (function () {
769
- /******/__nested_webpack_require_1465__.o = function (obj, prop) {
770
- return Object.prototype.hasOwnProperty.call(obj, prop);
771
- };
772
- /******/
773
- })();
774
- /******/
775
- /******/ /* webpack/runtime/make namespace object */
776
- /******/
777
- (function () {
778
- /******/ // define __esModule on exports
779
- /******/__nested_webpack_require_1465__.r = function (exports) {
780
- /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
781
- /******/Object.defineProperty(exports, Symbol.toStringTag, {
782
- value: 'Module'
783
- });
784
- /******/
785
- }
786
- /******/
787
- Object.defineProperty(exports, '__esModule', {
788
- value: true
789
- });
790
- /******/
791
- };
792
- /******/
793
- })();
794
- /******/
795
- /************************************************************************/
796
- var __webpack_exports__ = {};
797
- // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
798
- (function () {
799
- __nested_webpack_require_1465__.r(__webpack_exports__);
800
- /* harmony export */
801
- __nested_webpack_require_1465__.d(__webpack_exports__, {
802
- /* harmony export */"default": function _default() {
803
- return __WEBPACK_DEFAULT_EXPORT__;
804
- }
805
- /* harmony export */
806
- });
807
- /* harmony import */
808
- var react__WEBPACK_IMPORTED_MODULE_0__ = __nested_webpack_require_1465__(787);
809
- /* harmony import */
810
- var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nested_webpack_require_1465__.n(react__WEBPACK_IMPORTED_MODULE_0__);
811
- /**
812
- * Delay the execution of function or state update
813
- *
814
- * @usage:
815
-
816
- const App = () => {
817
- const [count, setCount] = useState(0);
818
- const handleClick = useDebounce(() => setCount(count + 1), 500, [count]);
819
-
820
- return (
821
- <div className="app">
822
- <button onClick={handleClick}>click</button>
823
- <p>click {count} time</p>
824
- </div>
825
- );
826
- };
827
-
828
- */
829
-
830
- var useDebounce = function useDebounce(fn, delay, dependence) {
831
- var ref = (0, react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
832
- return (0, react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
833
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
834
- args[_key] = arguments[_key];
835
- }
836
- clearTimeout(ref.current);
837
- ref.current = null;
838
- ref.current = setTimeout(function () {
839
- fn.apply(void 0, args);
840
- }, delay);
841
- }, dependence);
842
- };
843
- /* harmony default export */
844
- var __WEBPACK_DEFAULT_EXPORT__ = useDebounce;
845
- })();
846
-
847
- /******/
848
- return __webpack_exports__;
849
- /******/
850
- }()
851
- );
852
- });
853
-
854
- /***/
855
- },
856
-
857
- /***/787: /***/function _(module) {
858
- "use strict";
859
-
860
- module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
861
-
862
- /***/
863
- }
864
-
865
- /******/
866
- };
867
- /************************************************************************/
868
- /******/ // The module cache
869
- /******/
870
- var __webpack_module_cache__ = {};
871
- /******/
872
- /******/ // The require function
873
- /******/
874
- function __nested_webpack_require_41372__(moduleId) {
875
- /******/ // Check if module is in cache
876
- /******/var cachedModule = __webpack_module_cache__[moduleId];
877
- /******/
878
- if (cachedModule !== undefined) {
879
- /******/return cachedModule.exports;
880
- /******/
881
- }
882
- /******/ // Create a new module (and put it into the cache)
883
- /******/
884
- var module = __webpack_module_cache__[moduleId] = {
885
- /******/id: moduleId,
886
- /******/loaded: false,
887
- /******/exports: {}
888
- /******/
889
- };
890
- /******/
891
- /******/ // Execute the module function
892
- /******/
893
- __webpack_modules__[moduleId].call(module.exports, module, module.exports, __nested_webpack_require_41372__);
894
- /******/
895
- /******/ // Flag the module as loaded
896
- /******/
897
- module.loaded = true;
898
- /******/
899
- /******/ // Return the exports of the module
900
- /******/
901
- return module.exports;
902
- /******/
903
- }
904
- /******/
905
- /************************************************************************/
906
- /******/ /* webpack/runtime/compat get default export */
907
- /******/
908
- (function () {
909
- /******/ // getDefaultExport function for compatibility with non-harmony modules
910
- /******/__nested_webpack_require_41372__.n = function (module) {
911
- /******/var getter = module && module.__esModule ? /******/function () {
912
- return module['default'];
913
- } : /******/function () {
914
- return module;
915
- };
916
- /******/
917
- __nested_webpack_require_41372__.d(getter, {
918
- a: getter
919
- });
920
- /******/
921
- return getter;
922
- /******/
923
- };
924
- /******/
925
- })();
926
- /******/
927
- /******/ /* webpack/runtime/define property getters */
928
- /******/
929
- (function () {
930
- /******/ // define getter functions for harmony exports
931
- /******/__nested_webpack_require_41372__.d = function (exports, definition) {
932
- /******/for (var key in definition) {
933
- /******/if (__nested_webpack_require_41372__.o(definition, key) && !__nested_webpack_require_41372__.o(exports, key)) {
934
- /******/Object.defineProperty(exports, key, {
935
- enumerable: true,
936
- get: definition[key]
937
- });
938
- /******/
939
- }
940
- /******/
941
- }
942
- /******/
943
- };
944
- /******/
945
- })();
946
- /******/
947
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
948
- /******/
949
- (function () {
950
- /******/__nested_webpack_require_41372__.o = function (obj, prop) {
951
- return Object.prototype.hasOwnProperty.call(obj, prop);
952
- };
953
- /******/
954
- })();
955
- /******/
956
- /******/ /* webpack/runtime/make namespace object */
957
- /******/
958
- (function () {
959
- /******/ // define __esModule on exports
960
- /******/__nested_webpack_require_41372__.r = function (exports) {
961
- /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
962
- /******/Object.defineProperty(exports, Symbol.toStringTag, {
963
- value: 'Module'
964
- });
965
- /******/
966
- }
967
- /******/
968
- Object.defineProperty(exports, '__esModule', {
969
- value: true
970
- });
971
- /******/
972
- };
973
- /******/
974
- })();
975
- /******/
976
- /******/ /* webpack/runtime/node module decorator */
977
- /******/
978
- (function () {
979
- /******/__nested_webpack_require_41372__.nmd = function (module) {
980
- /******/module.paths = [];
981
- /******/
982
- if (!module.children) module.children = [];
983
- /******/
984
- return module;
985
- /******/
986
- };
987
- /******/
988
- })();
989
- /******/
990
- /************************************************************************/
991
- var __webpack_exports__ = {};
992
- // This entry need to be wrapped in an IIFE because it need to be in strict mode.
993
- (function () {
994
- "use strict";
995
-
996
- __nested_webpack_require_41372__.r(__webpack_exports__);
997
- /* harmony export */
998
- __nested_webpack_require_41372__.d(__webpack_exports__, {
999
- /* harmony export */"default": function _default() {
1000
- return __WEBPACK_DEFAULT_EXPORT__;
1001
- }
1002
- /* harmony export */
1003
- });
1004
- /* harmony import */
1005
- var react__WEBPACK_IMPORTED_MODULE_0__ = __nested_webpack_require_41372__(787);
1006
- /* harmony import */
1007
- var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nested_webpack_require_41372__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1008
- /* harmony import */
1009
- var funda_utils_dist_cjs_useComId__WEBPACK_IMPORTED_MODULE_1__ = __nested_webpack_require_41372__(85);
1010
- /* harmony import */
1011
- var funda_utils_dist_cjs_useComId__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__nested_webpack_require_41372__.n(funda_utils_dist_cjs_useComId__WEBPACK_IMPORTED_MODULE_1__);
1012
- /* harmony import */
1013
- var funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__ = __nested_webpack_require_41372__(188);
1014
- /* harmony import */
1015
- var funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__nested_webpack_require_41372__.n(funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__);
1016
- /* harmony import */
1017
- var funda_utils_dist_cjs_inputsCalculation__WEBPACK_IMPORTED_MODULE_3__ = __nested_webpack_require_41372__(954);
1018
- /* harmony import */
1019
- var funda_utils_dist_cjs_inputsCalculation__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__nested_webpack_require_41372__.n(funda_utils_dist_cjs_inputsCalculation__WEBPACK_IMPORTED_MODULE_3__);
1020
- /* harmony import */
1021
- var funda_utils_dist_cjs_useDebounce__WEBPACK_IMPORTED_MODULE_4__ = __nested_webpack_require_41372__(702);
1022
- /* harmony import */
1023
- var funda_utils_dist_cjs_useDebounce__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__nested_webpack_require_41372__.n(funda_utils_dist_cjs_useDebounce__WEBPACK_IMPORTED_MODULE_4__);
1024
- var _excluded = ["contentRef", "wrapperClassName", "controlClassName", "controlExClassName", "controlGroupWrapperClassName", "controlGroupTextClassName", "type", "disabled", "required", "placeholder", "pattern", "readOnly", "defaultValue", "value", "requiredLabel", "label", "units", "name", "step", "min", "max", "src", "size", "minLength", "maxLength", "alt", "inputMode", "id", "appendControl", "aiPredict", "aiPredictRemainingTextRGB", "aiPredictConfirmKey", "aiPredictFetchFuncAsync", "aiPredictFetchFuncMethod", "aiPredictFetchFuncMethodParams", "aiPredictFetchCallback", "iconLeft", "iconRight", "autoComplete", "autoCapitalize", "spellCheck", "style", "tabIndex", "onChangeCallback", "onInputCallback", "onKeyPressedCallback", "onChange", "onBlur", "onFocus", "onPressEnter", "onKeyDown", "onKeyUp"];
1025
- function _regeneratorRuntime() {
1026
- "use strict";
1027
-
1028
- /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
1029
- _regeneratorRuntime = function _regeneratorRuntime() {
1030
- return exports;
1031
- };
1032
- var exports = {},
1033
- Op = Object.prototype,
1034
- hasOwn = Op.hasOwnProperty,
1035
- defineProperty = Object.defineProperty || function (obj, key, desc) {
1036
- obj[key] = desc.value;
1037
- },
1038
- $Symbol = "function" == typeof Symbol ? Symbol : {},
1039
- iteratorSymbol = $Symbol.iterator || "@@iterator",
1040
- asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
1041
- toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
1042
- function define(obj, key, value) {
1043
- return Object.defineProperty(obj, key, {
1044
- value: value,
1045
- enumerable: !0,
1046
- configurable: !0,
1047
- writable: !0
1048
- }), obj[key];
1049
- }
1050
- try {
1051
- define({}, "");
1052
- } catch (err) {
1053
- define = function define(obj, key, value) {
1054
- return obj[key] = value;
1055
- };
1056
- }
1057
- function wrap(innerFn, outerFn, self, tryLocsList) {
1058
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
1059
- generator = Object.create(protoGenerator.prototype),
1060
- context = new Context(tryLocsList || []);
1061
- return defineProperty(generator, "_invoke", {
1062
- value: makeInvokeMethod(innerFn, self, context)
1063
- }), generator;
1064
- }
1065
- function tryCatch(fn, obj, arg) {
1066
- try {
1067
- return {
1068
- type: "normal",
1069
- arg: fn.call(obj, arg)
1070
- };
1071
- } catch (err) {
1072
- return {
1073
- type: "throw",
1074
- arg: err
1075
- };
1076
- }
1077
- }
1078
- exports.wrap = wrap;
1079
- var ContinueSentinel = {};
1080
- function Generator() {}
1081
- function GeneratorFunction() {}
1082
- function GeneratorFunctionPrototype() {}
1083
- var IteratorPrototype = {};
1084
- define(IteratorPrototype, iteratorSymbol, function () {
1085
- return this;
1086
- });
1087
- var getProto = Object.getPrototypeOf,
1088
- NativeIteratorPrototype = getProto && getProto(getProto(values([])));
1089
- NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
1090
- var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
1091
- function defineIteratorMethods(prototype) {
1092
- ["next", "throw", "return"].forEach(function (method) {
1093
- define(prototype, method, function (arg) {
1094
- return this._invoke(method, arg);
1095
- });
1096
- });
1097
- }
1098
- function AsyncIterator(generator, PromiseImpl) {
1099
- function invoke(method, arg, resolve, reject) {
1100
- var record = tryCatch(generator[method], generator, arg);
1101
- if ("throw" !== record.type) {
1102
- var result = record.arg,
1103
- value = result.value;
1104
- return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
1105
- invoke("next", value, resolve, reject);
1106
- }, function (err) {
1107
- invoke("throw", err, resolve, reject);
1108
- }) : PromiseImpl.resolve(value).then(function (unwrapped) {
1109
- result.value = unwrapped, resolve(result);
1110
- }, function (error) {
1111
- return invoke("throw", error, resolve, reject);
1112
- });
1113
- }
1114
- reject(record.arg);
1115
- }
1116
- var previousPromise;
1117
- defineProperty(this, "_invoke", {
1118
- value: function value(method, arg) {
1119
- function callInvokeWithMethodAndArg() {
1120
- return new PromiseImpl(function (resolve, reject) {
1121
- invoke(method, arg, resolve, reject);
1122
- });
1123
- }
1124
- return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
1125
- }
1126
- });
1127
- }
1128
- function makeInvokeMethod(innerFn, self, context) {
1129
- var state = "suspendedStart";
1130
- return function (method, arg) {
1131
- if ("executing" === state) throw new Error("Generator is already running");
1132
- if ("completed" === state) {
1133
- if ("throw" === method) throw arg;
1134
- return doneResult();
1135
- }
1136
- for (context.method = method, context.arg = arg;;) {
1137
- var delegate = context.delegate;
1138
- if (delegate) {
1139
- var delegateResult = maybeInvokeDelegate(delegate, context);
1140
- if (delegateResult) {
1141
- if (delegateResult === ContinueSentinel) continue;
1142
- return delegateResult;
1143
- }
1144
- }
1145
- if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
1146
- if ("suspendedStart" === state) throw state = "completed", context.arg;
1147
- context.dispatchException(context.arg);
1148
- } else "return" === context.method && context.abrupt("return", context.arg);
1149
- state = "executing";
1150
- var record = tryCatch(innerFn, self, context);
1151
- if ("normal" === record.type) {
1152
- if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
1153
- return {
1154
- value: record.arg,
1155
- done: context.done
1156
- };
1157
- }
1158
- "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
1159
- }
1160
- };
1161
- }
1162
- function maybeInvokeDelegate(delegate, context) {
1163
- var methodName = context.method,
1164
- method = delegate.iterator[methodName];
1165
- 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;
1166
- var record = tryCatch(method, delegate.iterator, context.arg);
1167
- if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
1168
- var info = record.arg;
1169
- 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);
1170
- }
1171
- function pushTryEntry(locs) {
1172
- var entry = {
1173
- tryLoc: locs[0]
1174
- };
1175
- 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
1176
- }
1177
- function resetTryEntry(entry) {
1178
- var record = entry.completion || {};
1179
- record.type = "normal", delete record.arg, entry.completion = record;
1180
- }
1181
- function Context(tryLocsList) {
1182
- this.tryEntries = [{
1183
- tryLoc: "root"
1184
- }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
1185
- }
1186
- function values(iterable) {
1187
- if (iterable) {
1188
- var iteratorMethod = iterable[iteratorSymbol];
1189
- if (iteratorMethod) return iteratorMethod.call(iterable);
1190
- if ("function" == typeof iterable.next) return iterable;
1191
- if (!isNaN(iterable.length)) {
1192
- var i = -1,
1193
- next = function next() {
1194
- for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
1195
- return next.value = undefined, next.done = !0, next;
1196
- };
1197
- return next.next = next;
1198
- }
1199
- }
1200
- return {
1201
- next: doneResult
1202
- };
1203
- }
1204
- function doneResult() {
1205
- return {
1206
- value: undefined,
1207
- done: !0
1208
- };
1209
- }
1210
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
1211
- value: GeneratorFunctionPrototype,
1212
- configurable: !0
1213
- }), defineProperty(GeneratorFunctionPrototype, "constructor", {
1214
- value: GeneratorFunction,
1215
- configurable: !0
1216
- }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
1217
- var ctor = "function" == typeof genFun && genFun.constructor;
1218
- return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
1219
- }, exports.mark = function (genFun) {
1220
- return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
1221
- }, exports.awrap = function (arg) {
1222
- return {
1223
- __await: arg
1224
- };
1225
- }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
1226
- return this;
1227
- }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
1228
- void 0 === PromiseImpl && (PromiseImpl = Promise);
1229
- var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
1230
- return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
1231
- return result.done ? result.value : iter.next();
1232
- });
1233
- }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
1234
- return this;
1235
- }), define(Gp, "toString", function () {
1236
- return "[object Generator]";
1237
- }), exports.keys = function (val) {
1238
- var object = Object(val),
1239
- keys = [];
1240
- for (var key in object) keys.push(key);
1241
- return keys.reverse(), function next() {
1242
- for (; keys.length;) {
1243
- var key = keys.pop();
1244
- if (key in object) return next.value = key, next.done = !1, next;
1245
- }
1246
- return next.done = !0, next;
1247
- };
1248
- }, exports.values = values, Context.prototype = {
1249
- constructor: Context,
1250
- reset: function reset(skipTempReset) {
1251
- 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);
1252
- },
1253
- stop: function stop() {
1254
- this.done = !0;
1255
- var rootRecord = this.tryEntries[0].completion;
1256
- if ("throw" === rootRecord.type) throw rootRecord.arg;
1257
- return this.rval;
1258
- },
1259
- dispatchException: function dispatchException(exception) {
1260
- if (this.done) throw exception;
1261
- var context = this;
1262
- function handle(loc, caught) {
1263
- return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
1264
- }
1265
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
1266
- var entry = this.tryEntries[i],
1267
- record = entry.completion;
1268
- if ("root" === entry.tryLoc) return handle("end");
1269
- if (entry.tryLoc <= this.prev) {
1270
- var hasCatch = hasOwn.call(entry, "catchLoc"),
1271
- hasFinally = hasOwn.call(entry, "finallyLoc");
1272
- if (hasCatch && hasFinally) {
1273
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
1274
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
1275
- } else if (hasCatch) {
1276
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
1277
- } else {
1278
- if (!hasFinally) throw new Error("try statement without catch or finally");
1279
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
1280
- }
1281
- }
1282
- }
1283
- },
1284
- abrupt: function abrupt(type, arg) {
1285
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
1286
- var entry = this.tryEntries[i];
1287
- if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
1288
- var finallyEntry = entry;
1289
- break;
1290
- }
1291
- }
1292
- finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
1293
- var record = finallyEntry ? finallyEntry.completion : {};
1294
- return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
1295
- },
1296
- complete: function complete(record, afterLoc) {
1297
- if ("throw" === record.type) throw record.arg;
1298
- 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;
1299
- },
1300
- finish: function finish(finallyLoc) {
1301
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
1302
- var entry = this.tryEntries[i];
1303
- if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
1304
- }
1305
- },
1306
- "catch": function _catch(tryLoc) {
1307
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
1308
- var entry = this.tryEntries[i];
1309
- if (entry.tryLoc === tryLoc) {
1310
- var record = entry.completion;
1311
- if ("throw" === record.type) {
1312
- var thrown = record.arg;
1313
- resetTryEntry(entry);
1314
- }
1315
- return thrown;
1316
- }
1317
- }
1318
- throw new Error("illegal catch attempt");
1319
- },
1320
- delegateYield: function delegateYield(iterable, resultName, nextLoc) {
1321
- return this.delegate = {
1322
- iterator: values(iterable),
1323
- resultName: resultName,
1324
- nextLoc: nextLoc
1325
- }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
1326
- }
1327
- }, exports;
1328
- }
1329
- function _toConsumableArray(arr) {
1330
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
1331
- }
1332
- function _nonIterableSpread() {
1333
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1334
- }
1335
- function _iterableToArray(iter) {
1336
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
1337
- }
1338
- function _arrayWithoutHoles(arr) {
1339
- if (Array.isArray(arr)) return _arrayLikeToArray(arr);
1340
- }
1341
- function _typeof(obj) {
1342
- "@babel/helpers - typeof";
1343
-
1344
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
1345
- return typeof obj;
1346
- } : function (obj) {
1347
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
1348
- }, _typeof(obj);
1349
- }
1350
- function _extends() {
1351
- _extends = Object.assign ? Object.assign.bind() : function (target) {
1352
- for (var i = 1; i < arguments.length; i++) {
1353
- var source = arguments[i];
1354
- for (var key in source) {
1355
- if (Object.prototype.hasOwnProperty.call(source, key)) {
1356
- target[key] = source[key];
1357
- }
1358
- }
1359
- }
1360
- return target;
1361
- };
1362
- return _extends.apply(this, arguments);
1363
- }
1364
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
1365
- try {
1366
- var info = gen[key](arg);
1367
- var value = info.value;
1368
- } catch (error) {
1369
- reject(error);
1370
- return;
1371
- }
1372
- if (info.done) {
1373
- resolve(value);
1374
- } else {
1375
- Promise.resolve(value).then(_next, _throw);
1376
- }
1377
- }
1378
- function _asyncToGenerator(fn) {
1379
- return function () {
1380
- var self = this,
1381
- args = arguments;
1382
- return new Promise(function (resolve, reject) {
1383
- var gen = fn.apply(self, args);
1384
- function _next(value) {
1385
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
1386
- }
1387
- function _throw(err) {
1388
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
1389
- }
1390
- _next(undefined);
1391
- });
1392
- };
1393
- }
1394
- function _slicedToArray(arr, i) {
1395
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
1396
- }
1397
- function _nonIterableRest() {
1398
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1399
- }
1400
- function _unsupportedIterableToArray(o, minLen) {
1401
- if (!o) return;
1402
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
1403
- var n = Object.prototype.toString.call(o).slice(8, -1);
1404
- if (n === "Object" && o.constructor) n = o.constructor.name;
1405
- if (n === "Map" || n === "Set") return Array.from(o);
1406
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
1407
- }
1408
- function _arrayLikeToArray(arr, len) {
1409
- if (len == null || len > arr.length) len = arr.length;
1410
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
1411
- return arr2;
1412
- }
1413
- function _iterableToArrayLimit(arr, i) {
1414
- var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
1415
- if (null != _i) {
1416
- var _s,
1417
- _e,
1418
- _x,
1419
- _r,
1420
- _arr = [],
1421
- _n = !0,
1422
- _d = !1;
1423
- try {
1424
- if (_x = (_i = _i.call(arr)).next, 0 === i) {
1425
- if (Object(_i) !== _i) return;
1426
- _n = !1;
1427
- } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
1428
- } catch (err) {
1429
- _d = !0, _e = err;
1430
- } finally {
1431
- try {
1432
- if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
1433
- } finally {
1434
- if (_d) throw _e;
1435
- }
1436
- }
1437
- return _arr;
1438
- }
1439
- }
1440
- function _arrayWithHoles(arr) {
1441
- if (Array.isArray(arr)) return arr;
1442
- }
1443
- function _objectWithoutProperties(source, excluded) {
1444
- if (source == null) return {};
1445
- var target = _objectWithoutPropertiesLoose(source, excluded);
1446
- var key, i;
1447
- if (Object.getOwnPropertySymbols) {
1448
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
1449
- for (i = 0; i < sourceSymbolKeys.length; i++) {
1450
- key = sourceSymbolKeys[i];
1451
- if (excluded.indexOf(key) >= 0) continue;
1452
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
1453
- target[key] = source[key];
1454
- }
1455
- }
1456
- return target;
1457
- }
1458
- function _objectWithoutPropertiesLoose(source, excluded) {
1459
- if (source == null) return {};
1460
- var target = {};
1461
- var sourceKeys = Object.keys(source);
1462
- var key, i;
1463
- for (i = 0; i < sourceKeys.length; i++) {
1464
- key = sourceKeys[i];
1465
- if (excluded.indexOf(key) >= 0) continue;
1466
- target[key] = source[key];
1467
- }
1468
- return target;
1469
- }
1470
- var Input = /*#__PURE__*/(0, react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, externalRef) {
1471
- var contentRef = props.contentRef,
1472
- wrapperClassName = props.wrapperClassName,
1473
- controlClassName = props.controlClassName,
1474
- controlExClassName = props.controlExClassName,
1475
- controlGroupWrapperClassName = props.controlGroupWrapperClassName,
1476
- controlGroupTextClassName = props.controlGroupTextClassName,
1477
- type = props.type,
1478
- disabled = props.disabled,
1479
- required = props.required,
1480
- placeholder = props.placeholder,
1481
- pattern = props.pattern,
1482
- readOnly = props.readOnly,
1483
- defaultValue = props.defaultValue,
1484
- value = props.value,
1485
- requiredLabel = props.requiredLabel,
1486
- label = props.label,
1487
- units = props.units,
1488
- name = props.name,
1489
- step = props.step,
1490
- min = props.min,
1491
- max = props.max,
1492
- src = props.src,
1493
- size = props.size,
1494
- minLength = props.minLength,
1495
- maxLength = props.maxLength,
1496
- alt = props.alt,
1497
- inputMode = props.inputMode,
1498
- id = props.id,
1499
- appendControl = props.appendControl,
1500
- _props$aiPredict = props.aiPredict,
1501
- aiPredict = _props$aiPredict === void 0 ? false : _props$aiPredict,
1502
- _props$aiPredictRemai = props.aiPredictRemainingTextRGB,
1503
- aiPredictRemainingTextRGB = _props$aiPredictRemai === void 0 ? [153, 153, 153] : _props$aiPredictRemai,
1504
- _props$aiPredictConfi = props.aiPredictConfirmKey,
1505
- aiPredictConfirmKey = _props$aiPredictConfi === void 0 ? [['Enter'], ['Tab'], ['Shift', ' ']] : _props$aiPredictConfi,
1506
- aiPredictFetchFuncAsync = props.aiPredictFetchFuncAsync,
1507
- aiPredictFetchFuncMethod = props.aiPredictFetchFuncMethod,
1508
- aiPredictFetchFuncMethodParams = props.aiPredictFetchFuncMethodParams,
1509
- aiPredictFetchCallback = props.aiPredictFetchCallback,
1510
- iconLeft = props.iconLeft,
1511
- iconRight = props.iconRight,
1512
- autoComplete = props.autoComplete,
1513
- autoCapitalize = props.autoCapitalize,
1514
- spellCheck = props.spellCheck,
1515
- style = props.style,
1516
- tabIndex = props.tabIndex,
1517
- onChangeCallback = props.onChangeCallback,
1518
- onInputCallback = props.onInputCallback,
1519
- onKeyPressedCallback = props.onKeyPressedCallback,
1520
- onChange = props.onChange,
1521
- onBlur = props.onBlur,
1522
- onFocus = props.onFocus,
1523
- onPressEnter = props.onPressEnter,
1524
- onKeyDown = props.onKeyDown,
1525
- onKeyUp = props.onKeyUp,
1526
- attributes = _objectWithoutProperties(props, _excluded);
1527
- var uniqueID = funda_utils_dist_cjs_useComId__WEBPACK_IMPORTED_MODULE_1___default()();
1528
- var idRes = id || uniqueID;
1529
- var rootRef = (0, react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
1530
- var valRef = (0, react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
1531
- var typeRes = typeof type === 'undefined' ? 'text' : type;
1532
- var _useState = (0, react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
1533
- _useState2 = _slicedToArray(_useState, 2),
1534
- onComposition = _useState2[0],
1535
- setOnComposition = _useState2[1];
1536
- var _useState3 = (0, react__WEBPACK_IMPORTED_MODULE_0__.useState)(value || ''),
1537
- _useState4 = _slicedToArray(_useState3, 2),
1538
- changedVal = _useState4[0],
1539
- setChangedVal = _useState4[1];
1540
-
1541
- //================================================================
1542
- // AI Predict
1543
- //================================================================
1544
- var _useState5 = (0, react__WEBPACK_IMPORTED_MODULE_0__.useState)(''),
1545
- _useState6 = _slicedToArray(_useState5, 2),
1546
- currentSuggestion = _useState6[0],
1547
- setCurrentSuggestion = _useState6[1];
1548
- var _useState7 = (0, react__WEBPACK_IMPORTED_MODULE_0__.useState)([]),
1549
- _useState8 = _slicedToArray(_useState7, 2),
1550
- tempMatchedSuggestion = _useState8[0],
1551
- setTempMatchedSuggestion = _useState8[1];
1552
- var _useState9 = (0, react__WEBPACK_IMPORTED_MODULE_0__.useState)(0),
1553
- _useState10 = _slicedToArray(_useState9, 2),
1554
- textWidth = _useState10[0],
1555
- setTextWidth = _useState10[1];
1556
- var aiInputRef = (0, react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
1557
- var originInputComputedStyle = (0, react__WEBPACK_IMPORTED_MODULE_0__.useRef)({
1558
- fontSize: 16,
1559
- fontFamily: 'inherit',
1560
- letterSpacing: 'normal',
1561
- textTop: 10
1562
- });
1563
- var _useState11 = (0, react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
1564
- _useState12 = _slicedToArray(_useState11, 2),
1565
- hasErr = _useState12[0],
1566
- setHasErr = _useState12[1];
1567
- var currentSuggestionIndex = (0, react__WEBPACK_IMPORTED_MODULE_0__.useRef)(0);
1568
-
1569
- // A list of suggestions
1570
- //----------------
1571
- var _useState13 = (0, react__WEBPACK_IMPORTED_MODULE_0__.useState)([]),
1572
- _useState14 = _slicedToArray(_useState13, 2),
1573
- suggestions = _useState14[0],
1574
- setSuggestions = _useState14[1];
1575
-
1576
- //performance
1577
- var handleChangeSuggestionsFetchSafe = funda_utils_dist_cjs_useDebounce__WEBPACK_IMPORTED_MODULE_4___default()(function (e, curVal) {
1578
- var _oparams = aiPredictFetchFuncMethodParams || [];
1579
- var _params = _oparams.map(function (item) {
1580
- return item !== '$QUERY_STRING' ? item : curVal;
1581
- });
1582
- fetchSuggestionsData(_params.join(',')).then(function (resSuggestions) {
1583
- handleInputAiPredictChange(curVal, resSuggestions);
1584
- });
1585
- }, 350, []);
1586
- function fetchSuggestionsData(_x2) {
1587
- return _fetchSuggestionsData.apply(this, arguments);
1588
- } // Calculates the width of the input text
1589
- //----------------
1590
- function _fetchSuggestionsData() {
1591
- _fetchSuggestionsData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
1592
- var response, _ORGIN_DATA;
1593
- return _regeneratorRuntime().wrap(function _callee$(_context) {
1594
- while (1) switch (_context.prev = _context.next) {
1595
- case 0:
1596
- if (!(_typeof(aiPredictFetchFuncAsync) === 'object')) {
1597
- _context.next = 11;
1598
- break;
1599
- }
1600
- _context.next = 3;
1601
- return aiPredictFetchFuncAsync["".concat(aiPredictFetchFuncMethod)].apply(aiPredictFetchFuncAsync, _toConsumableArray(params.split(',')));
1602
- case 3:
1603
- response = _context.sent;
1604
- _ORGIN_DATA = response.data; // reset data structure
1605
- if (typeof aiPredictFetchCallback === 'function') {
1606
- _ORGIN_DATA = aiPredictFetchCallback(_ORGIN_DATA);
1607
- }
1608
-
1609
- // Determine whether the data structure matches
1610
- if (!Array.isArray(_ORGIN_DATA)) {
1611
- console.warn('The data structure does not match, please refer to the example in the component documentation.');
1612
- setHasErr(true);
1613
- _ORGIN_DATA = [];
1614
- }
1615
-
1616
- //
1617
- setSuggestions(_ORGIN_DATA);
1618
- return _context.abrupt("return", _ORGIN_DATA);
1619
- case 11:
1620
- return _context.abrupt("return", []);
1621
- case 12:
1622
- case "end":
1623
- return _context.stop();
1624
- }
1625
- }, _callee);
1626
- }));
1627
- return _fetchSuggestionsData.apply(this, arguments);
1628
- }
1629
- var calculateTextWidth = function calculateTextWidth(text) {
1630
- if (valRef.current) {
1631
- var canvas = document.createElement('canvas');
1632
- var context = canvas.getContext('2d');
1633
- context.font = "".concat(originInputComputedStyle.current.fontSize, "px ").concat(originInputComputedStyle.current.fontFamily);
1634
- return context.measureText(text).width;
1635
- }
1636
- return 0;
1637
- };
1638
-
1639
- // Get the rest of the suggested text
1640
- //----------------
1641
- var getRemainingText = function getRemainingText(fullSuggestion) {
1642
- if (!changedVal || !fullSuggestion) return '';
1643
-
1644
- // Only the parts of the suggested text that were not entered are returned
1645
- var lastInputChar = changedVal[changedVal.length - 1];
1646
- var lastCharIndex = fullSuggestion.toLowerCase().lastIndexOf(lastInputChar.toLowerCase());
1647
- return fullSuggestion.slice(lastCharIndex + 1);
1648
- };
1649
-
1650
- // Match exactly from the start
1651
- //----------------
1652
- var preciseMatch = function preciseMatch(input, suggestions) {
1653
- if (!input) return '';
1654
- var filtered = suggestions.filter(function (s) {
1655
- return s.toLowerCase().startsWith(input.toLowerCase());
1656
- });
1657
- setTempMatchedSuggestion(filtered);
1658
- return filtered;
1659
- };
1660
-
1661
- // Fuzzy matching
1662
- //----------------
1663
- var fuzzyMatch = function fuzzyMatch(input, suggestions) {
1664
- if (!input) return '';
1665
-
1666
- // Convert input to a regular expression pattern with support for arbitrary position matching
1667
- var pattern = input.split('').map(function (_char) {
1668
- return _char.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
1669
- }).join('.*');
1670
- var regex = new RegExp(pattern, 'i');
1671
-
1672
- // Find the first matching suggestion (multiple matches)
1673
- var filtered = suggestions.filter(function (suggestion) {
1674
- return regex.test(suggestion);
1675
- });
1676
- setTempMatchedSuggestion(filtered);
1677
- return filtered;
1678
- };
1679
-
1680
- // Handle input variations
1681
- //----------------
1682
- var handleInputAiPredictChange = function handleInputAiPredictChange(newValue, curSuggestions) {
1683
- setTextWidth(calculateTextWidth(newValue));
1684
-
1685
- // Match results
1686
- var matchedSuggestion = fuzzyMatch(newValue, curSuggestions);
1687
- setCurrentSuggestion(matchedSuggestion[0] || '');
1688
- };
1689
-
1690
- // Calculate the color shade of the prompt text
1691
- //----------------
1692
- var calculateOpacity = function calculateOpacity() {
1693
- // Transparency is calculated based on the input length
1694
- var baseOpacity = 0.5;
1695
- var inputLength = changedVal.length;
1696
- return Math.max(0.2, baseOpacity - inputLength * 0.05);
1697
- };
1698
-
1699
- // Confirm
1700
- //----------------
1701
- var handleAiPredictKeyDown = function handleAiPredictKeyDown(e) {
1702
- // Prevents the default behavior of the enter key
1703
- e.preventDefault();
1704
- var remainingText = getRemainingText(currentSuggestion);
1705
- if (remainingText) {
1706
- // Only the second half of the text is added
1707
- handleChange(e, changedVal + remainingText);
1708
- setCurrentSuggestion('');
1709
- }
1710
- };
1711
-
1712
- //
1713
- var remainingText = getRemainingText(currentSuggestion);
1714
-
1715
- //================================================================
1716
- // General
1717
- //================================================================
1718
- // exposes the following methods
1719
- (0, react__WEBPACK_IMPORTED_MODULE_0__.useImperativeHandle)(contentRef, function () {
1720
- return {
1721
- control: function control() {
1722
- return valRef.current;
1723
- },
1724
- clear: function clear(cb) {
1725
- setChangedVal('');
1726
- cb === null || cb === void 0 ? void 0 : cb();
1727
- },
1728
- set: function set(value, cb) {
1729
- setChangedVal("".concat(value));
1730
- cb === null || cb === void 0 ? void 0 : cb();
1731
- },
1732
- aiPredictReset: function aiPredictReset() {
1733
- setTimeout(function () {
1734
- // Avoid conflicts with other asynchronous states, resulting in invalid clearing
1735
- setCurrentSuggestion('');
1736
- }, 0);
1737
- }
1738
- };
1739
- }, [contentRef]);
1740
- var propExist = function propExist(p) {
1741
- return typeof p !== 'undefined' && p !== null && p !== '';
1742
- };
1743
- function handleComposition(event) {
1744
- if (event.type === 'compositionstart') {
1745
- setOnComposition(true);
1746
- }
1747
- if (event.type === 'compositionend') {
1748
- setOnComposition(false);
1749
- }
1750
- }
1751
- function handleFocus(event) {
1752
- var _rootRef$current;
1753
- (_rootRef$current = rootRef.current) === null || _rootRef$current === void 0 ? void 0 : _rootRef$current.classList.add('focus');
1754
-
1755
- //
1756
- onFocus === null || onFocus === void 0 ? void 0 : onFocus(event, onComposition, valRef.current);
1757
- }
1758
- function handleChange(event, curVal) {
1759
- setChangedVal(curVal);
1760
-
1761
- //----
1762
- //remove focus style
1763
- if (curVal === '') {
1764
- var _rootRef$current2;
1765
- (_rootRef$current2 = rootRef.current) === null || _rootRef$current2 === void 0 ? void 0 : _rootRef$current2.classList.remove('focus');
1766
- }
1767
-
1768
- //
1769
- onChange === null || onChange === void 0 ? void 0 : onChange(event, onComposition, valRef.current, curVal);
1770
-
1771
- // It fires in real time as the user enters
1772
- if (typeof onInputCallback === 'function') {
1773
- var newData = onInputCallback(event, valRef.current);
1774
- if (newData) setChangedVal(newData); // Avoid the error "react checkbox changing an uncontrolled input to be controlled"
1775
- }
1776
- }
1777
-
1778
- function handleBlur(event) {
1779
- var el = event.target;
1780
- var val = event.target.value;
1781
-
1782
- //----
1783
- //remove focus style
1784
- if (val === '') {
1785
- var _rootRef$current3;
1786
- (_rootRef$current3 = rootRef.current) === null || _rootRef$current3 === void 0 ? void 0 : _rootRef$current3.classList.remove('focus');
1787
- }
1788
-
1789
- //
1790
- onBlur === null || onBlur === void 0 ? void 0 : onBlur(event, onComposition, valRef.current);
1791
-
1792
- // It fires when focus is lost
1793
- if (typeof onChangeCallback === 'function') {
1794
- var newData = onChangeCallback(event, valRef.current);
1795
- if (newData) setChangedVal(newData); // Avoid the error "react checkbox changing an uncontrolled input to be controlled"
1796
- }
1797
- }
1798
-
1799
- function handleKeyPressed(event) {
1800
- onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(event, valRef.current);
1801
- if (typeof onKeyPressedCallback === 'function') {
1802
- var newData = onKeyPressedCallback(event, valRef.current);
1803
- if (newData) setChangedVal(newData); // Avoid the error "react checkbox changing an uncontrolled input to be controlled"
1804
- }
1805
-
1806
- if (event.code == "Enter") {
1807
- // DO NOT USE "preventDefault()"
1808
- onPressEnter === null || onPressEnter === void 0 ? void 0 : onPressEnter(event, valRef.current);
1809
- }
1810
-
1811
- // AI Predict
1812
- //----
1813
- if (aiPredict && currentSuggestion !== '') {
1814
- var keyBindings = aiPredictConfirmKey;
1815
- // The parameter 'registerKeyEvents' is an array, and each element is an object
1816
- // eg. { keys: ["Control", "S"], action: () => { console.log("Ctrl+S"); } }
1817
- var registerKeyEvents = keyBindings.map(function (s) {
1818
- return {
1819
- keys: s,
1820
- action: function action() {
1821
- handleAiPredictKeyDown(event);
1822
- }
1823
- };
1824
- });
1825
- registerKeyEvents.forEach(function (binding) {
1826
- var keysPressed = binding.keys.every(function (key) {
1827
- return key === "Shift" ? event.shiftKey : key === "Control" ? event.ctrlKey : key === "Alt" ? event.altKey : key === "Meta" ? event.metaKey : event.key === key;
1828
- });
1829
- if (keysPressed) {
1830
- binding.action();
1831
- }
1832
- });
1833
-
1834
- // switch result of suggestions
1835
- if (event.code === 'ArrowUp') {
1836
- currentSuggestionIndex.current = (currentSuggestionIndex.current - 1 + tempMatchedSuggestion.length) % tempMatchedSuggestion.length;
1837
- }
1838
- if (event.code === 'ArrowDown') {
1839
- currentSuggestionIndex.current = (currentSuggestionIndex.current + 1) % tempMatchedSuggestion.length;
1840
- }
1841
- setCurrentSuggestion(tempMatchedSuggestion[currentSuggestionIndex.current] || '');
1842
- }
1843
- }
1844
- function handleKeyUp(event) {
1845
- onKeyUp === null || onKeyUp === void 0 ? void 0 : onKeyUp(event, valRef.current);
1846
- }
1847
- (0, react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
1848
- // update default value
1849
- //--------------
1850
- if (typeof value !== 'undefined') {
1851
- setChangedVal("".concat(value)); // Avoid displaying the number 0
1852
- }
1853
- }, [value]);
1854
- (0, react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
1855
- // update default value (It does not re-render the component because the incoming value changes.)
1856
- //--------------
1857
- if (typeof defaultValue !== 'undefined') {
1858
- //REQUIRED
1859
- setChangedVal("".concat(defaultValue)); // Avoid displaying the number 0
1860
- }
1861
-
1862
- // AI Predict initalization
1863
- //--------------
1864
- if (aiPredict && valRef.current !== null) {
1865
- originInputComputedStyle.current = {
1866
- fontSize: (0, funda_utils_dist_cjs_inputsCalculation__WEBPACK_IMPORTED_MODULE_3__.actualPropertyValue)(valRef.current, 'fontSize'),
1867
- fontFamily: (0, funda_utils_dist_cjs_inputsCalculation__WEBPACK_IMPORTED_MODULE_3__.actualPropertyValue)(valRef.current, 'fontFamily'),
1868
- letterSpacing: (0, funda_utils_dist_cjs_inputsCalculation__WEBPACK_IMPORTED_MODULE_3__.actualPropertyValue)(valRef.current, 'letterSpacing'),
1869
- textTop: (0, funda_utils_dist_cjs_inputsCalculation__WEBPACK_IMPORTED_MODULE_3__.getTextTop)(valRef.current)
1870
- };
1871
- }
1872
- }, []);
1873
- 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", {
1874
- className: (0, funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.clsWrite)(wrapperClassName, 'mb-3 position-relative'),
1875
- ref: rootRef
1876
- }, 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", {
1877
- htmlFor: idRes,
1878
- className: "form-label",
1879
- dangerouslySetInnerHTML: {
1880
- __html: "".concat(label)
1881
- }
1882
- }) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("label", {
1883
- htmlFor: idRes,
1884
- className: "form-label"
1885
- }, label)) : null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
1886
- className: (0, funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.combinedCls)('position-relative z-1', (0, funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.clsWrite)(controlGroupWrapperClassName, 'input-group'), {
1887
- 'has-left-content': propExist(iconLeft),
1888
- 'has-right-content': propExist(iconRight) || propExist(units)
1889
- })
1890
- }, 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", {
1891
- className: (0, funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.clsWrite)(controlGroupTextClassName, 'input-group-text')
1892
- }, iconLeft)) : null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
1893
- className: "input-group-control-container flex-fill position-relative"
1894
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", _extends({
1895
- ref: function ref(node) {
1896
- valRef.current = node;
1897
- if (typeof externalRef === 'function') {
1898
- externalRef(node);
1899
- } else if (externalRef) {
1900
- externalRef.current = node;
1901
- }
1902
- },
1903
- tabIndex: tabIndex || 0,
1904
- type: typeRes,
1905
- className: (0, funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.combinedCls)((0, funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.clsWrite)(controlClassName, 'form-control'), controlExClassName, {
1906
- 'rounded': !propExist(iconLeft) && !propExist(iconRight) && !propExist(units),
1907
- 'rounded-start-0': propExist(iconLeft),
1908
- 'rounded-end-0': propExist(iconRight) || propExist(units)
1909
- }),
1910
- id: idRes,
1911
- name: name,
1912
- step: step || null,
1913
- min: min || null,
1914
- max: max || null,
1915
- src: src || null,
1916
- size: size || null,
1917
- alt: alt || null,
1918
- inputMode: inputMode || 'text',
1919
- pattern: pattern || null,
1920
- placeholder: placeholder || '',
1921
- value: changedVal,
1922
- minLength: minLength || null,
1923
- maxLength: maxLength || null,
1924
- autoComplete: typeof autoComplete === 'undefined' ? 'on' : autoComplete,
1925
- autoCapitalize: typeof autoCapitalize === 'undefined' ? 'off' : autoCapitalize,
1926
- spellCheck: typeof spellCheck === 'undefined' ? false : spellCheck,
1927
- onFocus: handleFocus,
1928
- onBlur: handleBlur,
1929
- onChange: function onChange(e) {
1930
- handleChange(e, e.target.value);
1931
-
1932
- // AI Predict
1933
- if (aiPredict) {
1934
- handleChangeSuggestionsFetchSafe(e, e.target.value);
1935
- }
1936
- },
1937
- onKeyDown: handleKeyPressed,
1938
- onKeyUp: handleKeyUp,
1939
- onCompositionStart: handleComposition,
1940
- onCompositionUpdate: handleComposition,
1941
- onCompositionEnd: handleComposition,
1942
- disabled: disabled || null,
1943
- required: required || null,
1944
- readOnly: readOnly || null,
1945
- style: style
1946
- }, attributes)), appendControl || '', aiPredict && remainingText && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
1947
- ref: aiInputRef,
1948
- className: "position-absolute z-1",
1949
- "data-ai": "predict",
1950
- style: {
1951
- left: "".concat(originInputComputedStyle.current.fontSize + textWidth, "px"),
1952
- top: originInputComputedStyle.current.textTop + 'px',
1953
- color: "rgba(".concat(aiPredictRemainingTextRGB[0], ", ").concat(aiPredictRemainingTextRGB[1], ", ").concat(aiPredictRemainingTextRGB[2], ", ").concat(calculateOpacity(), ")"),
1954
- pointerEvents: 'none',
1955
- fontSize: originInputComputedStyle.current.fontSize + 'px',
1956
- fontFamily: originInputComputedStyle.current.fontFamily,
1957
- letterSpacing: originInputComputedStyle.current.letterSpacing
1958
- }
1959
- }, remainingText), required ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react__WEBPACK_IMPORTED_MODULE_0___default().Fragment, null, requiredLabel || requiredLabel === '' ? requiredLabel : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {
1960
- className: "position-absolute end-0 top-0 my-2 mx-2"
1961
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {
1962
- className: "text-danger"
1963
- }, "*"))) : ''), 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", {
1964
- className: (0, funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.clsWrite)(controlGroupTextClassName, 'input-group-text')
1965
- }, 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", {
1966
- className: (0, funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.clsWrite)(controlGroupTextClassName, 'input-group-text')
1967
- }, iconRight)) : null)));
1968
- });
1969
- /* harmony default export */
1970
- var __WEBPACK_DEFAULT_EXPORT__ = Input;
1971
- })();
1972
-
1973
- /******/
1974
- return __webpack_exports__;
1975
- /******/
1976
- }()
1977
- );
1978
- });
1979
-
1980
- /***/ }),
1981
-
1982
- /***/ 188:
1983
- /***/ (function(module, exports, __webpack_require__) {
1984
-
1985
- /* module decorator */ module = __webpack_require__.nmd(module);
1986
- 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); }
1987
- (function webpackUniversalModuleDefinition(root, factory) {
1988
- 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),
1989
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
1990
- (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
1991
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
1992
- })(this, function () {
1993
- return (/******/function () {
1994
- // webpackBootstrap
1995
- /******/
1996
- "use strict";
1997
-
1998
- /******/ // The require scope
1999
- /******/
2000
- var __nested_webpack_require_993__ = {};
2001
- /******/
2002
- /************************************************************************/
2003
- /******/ /* webpack/runtime/define property getters */
2004
- /******/
2005
- (function () {
2006
- /******/ // define getter functions for harmony exports
2007
- /******/__nested_webpack_require_993__.d = function (exports, definition) {
2008
- /******/for (var key in definition) {
2009
- /******/if (__nested_webpack_require_993__.o(definition, key) && !__nested_webpack_require_993__.o(exports, key)) {
2010
- /******/Object.defineProperty(exports, key, {
2011
- enumerable: true,
2012
- get: definition[key]
2013
- });
2014
- /******/
2015
- }
2016
- /******/
2017
- }
2018
- /******/
2019
- };
2020
- /******/
2021
- })();
2022
- /******/
2023
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
2024
- /******/
2025
- (function () {
2026
- /******/__nested_webpack_require_993__.o = function (obj, prop) {
2027
- return Object.prototype.hasOwnProperty.call(obj, prop);
2028
- };
2029
- /******/
2030
- })();
2031
- /******/
2032
- /******/ /* webpack/runtime/make namespace object */
2033
- /******/
2034
- (function () {
2035
- /******/ // define __esModule on exports
2036
- /******/__nested_webpack_require_993__.r = function (exports) {
2037
- /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
2038
- /******/Object.defineProperty(exports, Symbol.toStringTag, {
2039
- value: 'Module'
2040
- });
2041
- /******/
2042
- }
2043
- /******/
2044
- Object.defineProperty(exports, '__esModule', {
2045
- value: true
2046
- });
2047
- /******/
2048
- };
2049
- /******/
2050
- })();
2051
- /******/
2052
- /************************************************************************/
2053
- var __webpack_exports__ = {};
2054
- __nested_webpack_require_993__.r(__webpack_exports__);
2055
- /* harmony export */
2056
- __nested_webpack_require_993__.d(__webpack_exports__, {
2057
- /* harmony export */"clsWrite": function clsWrite() {
2058
- return (/* binding */_clsWrite
2059
- );
2060
- },
2061
- /* harmony export */"combinedCls": function combinedCls() {
2062
- return (/* binding */_combinedCls
2063
- );
2064
- }
2065
- /* harmony export */
2066
- });
2067
- function _slicedToArray(arr, i) {
2068
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
2069
- }
2070
- function _nonIterableRest() {
2071
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2072
- }
2073
- function _unsupportedIterableToArray(o, minLen) {
2074
- if (!o) return;
2075
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
2076
- var n = Object.prototype.toString.call(o).slice(8, -1);
2077
- if (n === "Object" && o.constructor) n = o.constructor.name;
2078
- if (n === "Map" || n === "Set") return Array.from(o);
2079
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
2080
- }
2081
- function _arrayLikeToArray(arr, len) {
2082
- if (len == null || len > arr.length) len = arr.length;
2083
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
2084
- return arr2;
2085
- }
2086
- function _iterableToArrayLimit(arr, i) {
2087
- var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
2088
- if (null != _i) {
2089
- var _s,
2090
- _e,
2091
- _x,
2092
- _r,
2093
- _arr = [],
2094
- _n = !0,
2095
- _d = !1;
2096
- try {
2097
- if (_x = (_i = _i.call(arr)).next, 0 === i) {
2098
- if (Object(_i) !== _i) return;
2099
- _n = !1;
2100
- } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
2101
- } catch (err) {
2102
- _d = !0, _e = err;
2103
- } finally {
2104
- try {
2105
- if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
2106
- } finally {
2107
- if (_d) throw _e;
2108
- }
2109
- }
2110
- return _arr;
2111
- }
2112
- }
2113
- function _arrayWithHoles(arr) {
2114
- if (Array.isArray(arr)) return arr;
2115
- }
2116
- function _typeof(obj) {
2117
- "@babel/helpers - typeof";
2118
-
2119
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
2120
- return typeof obj;
2121
- } : function (obj) {
2122
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
2123
- }, _typeof(obj);
2124
- }
2125
- /**
2126
- * Output of class name
2127
- * @param {*} s - Any
2128
- * @param {String} defaultCls - Default string
2129
- * @param {?*} targetCls - Any
2130
- * @returns {*}
2131
- */
2132
- function _clsWrite(s, defaultCls) {
2133
- var targetCls = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
2134
- return s || s === '' ? typeof targetCls === 'undefined' ? s : targetCls : defaultCls;
2135
- }
2136
-
2137
- /**
2138
- * Combined classnames
2139
- * @param {*} args
2140
- * @returns {String|undefined}
2141
- */
2142
- /* Usage:
2143
-
2144
- console.log(combinedCls('a-1', 'a-2', 'a-3', {
2145
- 'p-1': null,
2146
- 'p-2': undefined,
2147
- 'p-3': true,
2148
- 'p-4': false,
2149
- 'p-5': 'kkk',
2150
- 'p-6': 0,
2151
- 'p-7': 1,
2152
- 'p-8': '',
2153
- undefined
2154
- })); // a-1 a-2 a-3 p-3 p-5 p-7
2155
- */
2156
- function _combinedCls() {
2157
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
2158
- args[_key] = arguments[_key];
2159
- }
2160
- if (args) {
2161
- var classes = [];
2162
- for (var i = 0; i < args.length; i++) {
2163
- var className = args[i];
2164
- if (!className) {
2165
- continue;
2166
- }
2167
- var type = _typeof(className);
2168
- if (type === 'string' || type === 'number') {
2169
- classes.push(className);
2170
- } else if (type === 'object') {
2171
- var _classes = Array.isArray(className) ? className : Object.entries(className).map(function (_ref) {
2172
- var _ref2 = _slicedToArray(_ref, 2),
2173
- key = _ref2[0],
2174
- value = _ref2[1];
2175
- return value ? key : null;
2176
- });
2177
- classes = _classes.length ? classes.concat(_classes.filter(function (c) {
2178
- return !!c;
2179
- })) : classes;
2180
- }
2181
- }
2182
- return classes.join(' ').trim();
2183
- }
2184
- return undefined;
2185
- }
2186
-
2187
- /******/
2188
- return __webpack_exports__;
2189
- /******/
2190
- }()
2191
- );
2192
- });
2193
-
2194
- /***/ }),
2195
-
2196
- /***/ 85:
2197
- /***/ (function(module, exports, __webpack_require__) {
2198
-
2199
- /* module decorator */ module = __webpack_require__.nmd(module);
2200
- 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); }
2201
- (function webpackUniversalModuleDefinition(root, factory) {
2202
- 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),
2203
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
2204
- (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
2205
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
2206
- })(this, function (__WEBPACK_EXTERNAL_MODULE__787__) {
2207
- return (/******/function () {
2208
- // webpackBootstrap
2209
- /******/
2210
- "use strict";
2211
-
2212
- /******/
2213
- var __webpack_modules__ = {
2214
- /***/787: /***/function _(module) {
2215
- module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
2216
-
2217
- /***/
2218
- }
2219
-
2220
- /******/
2221
- };
2222
- /************************************************************************/
2223
- /******/ // The module cache
2224
- /******/
2225
- var __webpack_module_cache__ = {};
2226
- /******/
2227
- /******/ // The require function
2228
- /******/
2229
- function __nested_webpack_require_1465__(moduleId) {
2230
- /******/ // Check if module is in cache
2231
- /******/var cachedModule = __webpack_module_cache__[moduleId];
2232
- /******/
2233
- if (cachedModule !== undefined) {
2234
- /******/return cachedModule.exports;
2235
- /******/
2236
- }
2237
- /******/ // Create a new module (and put it into the cache)
2238
- /******/
2239
- var module = __webpack_module_cache__[moduleId] = {
2240
- /******/ // no module.id needed
2241
- /******/ // no module.loaded needed
2242
- /******/exports: {}
2243
- /******/
2244
- };
2245
- /******/
2246
- /******/ // Execute the module function
2247
- /******/
2248
- __webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_1465__);
2249
- /******/
2250
- /******/ // Return the exports of the module
2251
- /******/
2252
- return module.exports;
2253
- /******/
2254
- }
2255
- /******/
2256
- /************************************************************************/
2257
- /******/ /* webpack/runtime/compat get default export */
2258
- /******/
2259
- (function () {
2260
- /******/ // getDefaultExport function for compatibility with non-harmony modules
2261
- /******/__nested_webpack_require_1465__.n = function (module) {
2262
- /******/var getter = module && module.__esModule ? /******/function () {
2263
- return module['default'];
2264
- } : /******/function () {
2265
- return module;
2266
- };
2267
- /******/
2268
- __nested_webpack_require_1465__.d(getter, {
2269
- a: getter
2270
- });
2271
- /******/
2272
- return getter;
2273
- /******/
2274
- };
2275
- /******/
2276
- })();
2277
- /******/
2278
- /******/ /* webpack/runtime/define property getters */
2279
- /******/
2280
- (function () {
2281
- /******/ // define getter functions for harmony exports
2282
- /******/__nested_webpack_require_1465__.d = function (exports, definition) {
2283
- /******/for (var key in definition) {
2284
- /******/if (__nested_webpack_require_1465__.o(definition, key) && !__nested_webpack_require_1465__.o(exports, key)) {
2285
- /******/Object.defineProperty(exports, key, {
2286
- enumerable: true,
2287
- get: definition[key]
2288
- });
2289
- /******/
2290
- }
2291
- /******/
2292
- }
2293
- /******/
2294
- };
2295
- /******/
2296
- })();
2297
- /******/
2298
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
2299
- /******/
2300
- (function () {
2301
- /******/__nested_webpack_require_1465__.o = function (obj, prop) {
2302
- return Object.prototype.hasOwnProperty.call(obj, prop);
2303
- };
2304
- /******/
2305
- })();
2306
- /******/
2307
- /******/ /* webpack/runtime/make namespace object */
2308
- /******/
2309
- (function () {
2310
- /******/ // define __esModule on exports
2311
- /******/__nested_webpack_require_1465__.r = function (exports) {
2312
- /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
2313
- /******/Object.defineProperty(exports, Symbol.toStringTag, {
2314
- value: 'Module'
2315
- });
2316
- /******/
2317
- }
2318
- /******/
2319
- Object.defineProperty(exports, '__esModule', {
2320
- value: true
2321
- });
2322
- /******/
2323
- };
2324
- /******/
2325
- })();
2326
- /******/
2327
- /************************************************************************/
2328
- var __webpack_exports__ = {};
2329
- // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
2330
- (function () {
2331
- __nested_webpack_require_1465__.r(__webpack_exports__);
2332
- /* harmony export */
2333
- __nested_webpack_require_1465__.d(__webpack_exports__, {
2334
- /* harmony export */"default": function _default() {
2335
- return __WEBPACK_DEFAULT_EXPORT__;
2336
- }
2337
- /* harmony export */
2338
- });
2339
- /* harmony import */
2340
- var react__WEBPACK_IMPORTED_MODULE_0__ = __nested_webpack_require_1465__(787);
2341
- /* harmony import */
2342
- var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nested_webpack_require_1465__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2343
- /**
2344
- * Create an available ID
2345
- *
2346
- */
2347
-
2348
- var useComId = function useComId() {
2349
- return "ID-".concat((0, react__WEBPACK_IMPORTED_MODULE_0__.useId)().replace(/\:/g, "-"));
2350
- };
2351
- /* harmony default export */
2352
- var __WEBPACK_DEFAULT_EXPORT__ = useComId;
2353
- })();
2354
-
2355
- /******/
2356
- return __webpack_exports__;
2357
- /******/
2358
- }()
2359
- );
2360
- });
2361
-
2362
- /***/ }),
2363
-
2364
- /***/ 787:
2365
- /***/ ((module) => {
2366
-
2367
- "use strict";
2368
- module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
2369
-
2370
- /***/ })
2371
-
2372
- /******/ });
2373
- /************************************************************************/
2374
- /******/ // The module cache
2375
- /******/ var __webpack_module_cache__ = {};
2376
- /******/
2377
- /******/ // The require function
2378
- /******/ function __webpack_require__(moduleId) {
2379
- /******/ // Check if module is in cache
2380
- /******/ var cachedModule = __webpack_module_cache__[moduleId];
2381
- /******/ if (cachedModule !== undefined) {
2382
- /******/ return cachedModule.exports;
2383
- /******/ }
2384
- /******/ // Create a new module (and put it into the cache)
2385
- /******/ var module = __webpack_module_cache__[moduleId] = {
2386
- /******/ id: moduleId,
2387
- /******/ loaded: false,
2388
- /******/ exports: {}
2389
- /******/ };
2390
- /******/
2391
- /******/ // Execute the module function
2392
- /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
2393
- /******/
2394
- /******/ // Flag the module as loaded
2395
- /******/ module.loaded = true;
2396
- /******/
2397
- /******/ // Return the exports of the module
2398
- /******/ return module.exports;
2399
- /******/ }
2400
- /******/
2401
- /************************************************************************/
2402
- /******/ /* webpack/runtime/compat get default export */
2403
- /******/ (() => {
2404
- /******/ // getDefaultExport function for compatibility with non-harmony modules
2405
- /******/ __webpack_require__.n = (module) => {
2406
- /******/ var getter = module && module.__esModule ?
2407
- /******/ () => (module['default']) :
2408
- /******/ () => (module);
2409
- /******/ __webpack_require__.d(getter, { a: getter });
2410
- /******/ return getter;
2411
- /******/ };
2412
- /******/ })();
2413
- /******/
2414
- /******/ /* webpack/runtime/define property getters */
2415
- /******/ (() => {
2416
- /******/ // define getter functions for harmony exports
2417
- /******/ __webpack_require__.d = (exports, definition) => {
2418
- /******/ for(var key in definition) {
2419
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
2420
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
2421
- /******/ }
2422
- /******/ }
2423
- /******/ };
2424
- /******/ })();
2425
- /******/
2426
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
2427
- /******/ (() => {
2428
- /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
2429
- /******/ })();
2430
- /******/
2431
- /******/ /* webpack/runtime/make namespace object */
2432
- /******/ (() => {
2433
- /******/ // define __esModule on exports
2434
- /******/ __webpack_require__.r = (exports) => {
2435
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
2436
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2437
- /******/ }
2438
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
2439
- /******/ };
2440
- /******/ })();
2441
- /******/
2442
- /******/ /* webpack/runtime/node module decorator */
2443
- /******/ (() => {
2444
- /******/ __webpack_require__.nmd = (module) => {
2445
- /******/ module.paths = [];
2446
- /******/ if (!module.children) module.children = [];
2447
- /******/ return module;
2448
- /******/ };
2449
- /******/ })();
2450
- /******/
2451
- /************************************************************************/
2452
- var __webpack_exports__ = {};
2453
- // This entry need to be wrapped in an IIFE because it need to be in strict mode.
2454
- (() => {
2455
- "use strict";
2456
- __webpack_require__.r(__webpack_exports__);
2457
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2458
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2459
- /* harmony export */ });
2460
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(787);
2461
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2462
- /* harmony import */ var funda_utils_dist_cjs_useComId__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(85);
2463
- /* harmony import */ var funda_utils_dist_cjs_useComId__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(funda_utils_dist_cjs_useComId__WEBPACK_IMPORTED_MODULE_1__);
2464
- /* harmony import */ var funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(188);
2465
- /* harmony import */ var funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__);
2466
- /* harmony import */ var funda_input__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(390);
2467
- /* harmony import */ var funda_input__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(funda_input__WEBPACK_IMPORTED_MODULE_3__);
2468
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2469
- 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."); }
2470
- 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); }
2471
- 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; }
2472
- 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; } }
2473
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2474
-
2475
-
2476
-
2477
-
2478
- var RangeSlider = function RangeSlider(props) {
2479
- var wrapperClassName = props.wrapperClassName,
2480
- controlClassName = props.controlClassName,
2481
- controlExClassName = props.controlExClassName,
2482
- disabled = props.disabled,
2483
- required = props.required,
2484
- value = props.value,
2485
- label = props.label,
2486
- minName = props.minName,
2487
- maxName = props.maxName,
2488
- onlyOne = props.onlyOne,
2489
- step = props.step,
2490
- min = props.min,
2491
- max = props.max,
2492
- id = props.id,
2493
- tabIndex = props.tabIndex,
2494
- onChange = props.onChange;
2495
- var uniqueID = funda_utils_dist_cjs_useComId__WEBPACK_IMPORTED_MODULE_1___default()();
2496
- var idRes = id || uniqueID;
2497
- var rootRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
2498
- var valMinRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
2499
- var valMaxRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
2500
- var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(value ? value.min : min),
2501
- _useState2 = _slicedToArray(_useState, 2),
2502
- minValue = _useState2[0],
2503
- setMinValue = _useState2[1];
2504
- var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(value ? value.max : max),
2505
- _useState4 = _slicedToArray(_useState3, 2),
2506
- maxValue = _useState4[0],
2507
- setMaxValue = _useState4[1];
2508
- var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
2509
- _useState6 = _slicedToArray(_useState5, 2),
2510
- minActive = _useState6[0],
2511
- setMinActive = _useState6[1];
2512
- var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
2513
- _useState8 = _slicedToArray(_useState7, 2),
2514
- maxActive = _useState8[0],
2515
- setMaxActive = _useState8[1];
2516
- var minPos = (minValue - min) / (max - min) * 100;
2517
- var maxPos = (maxValue - min) / (max - min) * 100;
2518
- function initDefaultValue(defaultValue) {
2519
- // change the value to trigger component rendering
2520
- if (typeof defaultValue === 'undefined' || defaultValue === '') {
2521
- setMinValue(min);
2522
- setMaxValue(max);
2523
- } else {
2524
- setMinValue(defaultValue.min);
2525
- setMaxValue(defaultValue.max);
2526
- }
2527
- }
2528
- function handleMinEnter(e) {
2529
- setMinActive(true);
2530
- }
2531
- function handleMinLeave(e) {
2532
- setMinActive(false);
2533
- }
2534
- function handleMaxEnter(e) {
2535
- setMaxActive(true);
2536
- }
2537
- function handleMaxLeave(e) {
2538
- setMaxActive(false);
2539
- }
2540
- function handleMinChange(e) {
2541
- e.preventDefault();
2542
- var newMinVal = Math.min(+e.target.value, onlyOne ? maxValue : maxValue - step);
2543
- setMinValue(newMinVal);
2544
- onChange === null || onChange === void 0 ? void 0 : onChange(e, {
2545
- min: newMinVal,
2546
- max: maxValue
2547
- });
2548
- }
2549
- function handleMaxChange(e) {
2550
- e.preventDefault();
2551
- var newMaxVal = Math.max(+e.target.value, minValue + step);
2552
- setMaxValue(newMaxVal);
2553
- onChange === null || onChange === void 0 ? void 0 : onChange(e, {
2554
- min: minValue,
2555
- max: newMaxVal
2556
- });
2557
- }
2558
- (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
2559
- // update default value
2560
- //--------------
2561
- if (value && (typeof value.min === 'undefined' || typeof value.max === 'undefined')) {
2562
- initDefaultValue({
2563
- min: min,
2564
- max: max
2565
- });
2566
- } else {
2567
- initDefaultValue(value);
2568
- }
2569
- }, [value]);
2570
- 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", {
2571
- className: "range-slider__label"
2572
- }, typeof label === 'string' ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("label", {
2573
- htmlFor: "label-".concat(idRes),
2574
- className: "form-label",
2575
- dangerouslySetInnerHTML: {
2576
- __html: "".concat(label)
2577
- }
2578
- }) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("label", {
2579
- htmlFor: "label-".concat(idRes),
2580
- className: "form-label"
2581
- }, label))) : null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
2582
- className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.combinedCls)('range-slider__wrapper', (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.clsWrite)(wrapperClassName, 'mb-3 position-relative'), {
2583
- 'only-one': onlyOne
2584
- }),
2585
- ref: rootRef
2586
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((funda_input__WEBPACK_IMPORTED_MODULE_3___default()), {
2587
- ref: valMinRef,
2588
- wrapperClassName: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.clsWrite)(wrapperClassName, 'mb-3 position-relative'),
2589
- controlClassName: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.combinedCls)((0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.clsWrite)(controlClassName, 'form-control'), controlExClassName),
2590
- required: required || null,
2591
- type: "text",
2592
- id: idRes + '-min',
2593
- name: minName,
2594
- value: typeof minValue !== 'undefined' ? minValue.toString() : min // Convert to a string to ensure that 0 can also be filled
2595
- }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((funda_input__WEBPACK_IMPORTED_MODULE_3___default()), {
2596
- ref: valMaxRef,
2597
- wrapperClassName: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.clsWrite)(wrapperClassName, 'mb-3 position-relative'),
2598
- controlClassName: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.combinedCls)((0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.clsWrite)(controlClassName, 'form-control'), controlExClassName),
2599
- required: required || null,
2600
- type: "text",
2601
- id: idRes + '-max',
2602
- name: maxName,
2603
- value: typeof maxValue !== 'undefined' ? maxValue.toString() : max // Convert to a string to ensure that 0 can also be filled
2604
- }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
2605
- className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.combinedCls)('range-slider__control-wrapper', {
2606
- 'disabled': disabled
2607
- })
2608
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
2609
- className: "range-slider__input"
2610
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", {
2611
- type: "range",
2612
- value: minValue,
2613
- min: min,
2614
- max: max,
2615
- step: step,
2616
- tabIndex: tabIndex || 0,
2617
- disabled: disabled || null,
2618
- onMouseEnter: handleMinEnter,
2619
- onMouseLeave: handleMinLeave,
2620
- onChange: handleMinChange
2621
- }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", {
2622
- type: "range",
2623
- value: maxValue,
2624
- min: min,
2625
- max: max,
2626
- step: step,
2627
- tabIndex: tabIndex || 0,
2628
- disabled: onlyOne ? true : disabled || null,
2629
- onMouseEnter: handleMaxEnter,
2630
- onMouseLeave: handleMaxLeave,
2631
- onChange: handleMaxChange
2632
- })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
2633
- className: "range-slider__placeholder"
2634
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
2635
- className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.combinedCls)('range-slider__placeholder-grab', {
2636
- 'active': minActive
2637
- }),
2638
- style: {
2639
- left: "".concat(minPos, "%")
2640
- }
2641
- }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
2642
- className: "range-slider__placeholder-rail"
2643
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
2644
- className: "range-slider__placeholder-inner-rail",
2645
- style: {
2646
- left: "".concat(minPos, "%"),
2647
- right: "".concat(100 - maxPos, "%")
2648
- }
2649
- })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
2650
- className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.combinedCls)('range-slider__placeholder-grab', {
2651
- 'active': maxActive,
2652
- 'inactive': onlyOne
2653
- }),
2654
- style: {
2655
- left: "".concat(maxPos, "%")
2656
- }
2657
- })))));
2658
- };
2659
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (RangeSlider);
2660
- })();
2661
-
2662
- /******/ return __webpack_exports__;
2663
- /******/ })()
2664
- ;
2665
- });